const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monacoEnv-BfStDneo.js","assets/initialize-Dcc4x6Mw.js","assets/initialize-BkHOBohE.css","assets/monacoEnv-CtyFC10v.css","assets/ActivitySafeEditor-Cf1NaDwE.js"])))=>i.map(i=>d[i]);
var JDe=Object.defineProperty;var W7=r=>{throw TypeError(r)};var QDe=(r,e,i)=>e in r?JDe(r,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):r[e]=i;var To=(r,e,i)=>QDe(r,typeof e!="symbol"?e+"":e,i),Uz=(r,e,i)=>e.has(r)||W7("Cannot "+i);var Ct=(r,e,i)=>(Uz(r,e,"read from private field"),i?i.call(r):e.get(r)),hi=(r,e,i)=>e.has(r)?W7("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,i),Wr=(r,e,i,n)=>(Uz(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),dn=(r,e,i)=>(Uz(r,e,"access private method"),i);var Oj=(r,e,i,n)=>({set _(t){Wr(r,e,t,i)},get _(){return Ct(r,e,n)}});function eRe(r,e){for(var i=0;i<e.length;i++){const n=e[i];if(typeof n!="string"&&!Array.isArray(n)){for(const t in n)if(t!=="default"&&!(t in r)){const o=Object.getOwnPropertyDescriptor(n,t);o&&Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>n[t]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const t of document.querySelectorAll('link[rel="modulepreload"]'))n(t);new MutationObserver(t=>{for(const o of t)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function i(t){const o={};return t.integrity&&(o.integrity=t.integrity),t.referrerPolicy&&(o.referrerPolicy=t.referrerPolicy),t.crossOrigin==="use-credentials"?o.credentials="include":t.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(t){if(t.ep)return;t.ep=!0;const o=i(t);fetch(t.href,o)}})();var Ch=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Lu(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function tb(r){if(Object.prototype.hasOwnProperty.call(r,"__esModule"))return r;var e=r.default;if(typeof e=="function"){var i=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};i.prototype=e.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var t=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(i,n,t.get?t:{enumerable:!0,get:function(){return r[n]}})}),i}var zz={exports:{}},$L={};/**
 * @license React
 * react-jsx-runtime.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var G7;function tRe(){if(G7)return $L;G7=1;var r=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function i(n,t,o){var a=null;if(o!==void 0&&(a=""+o),t.key!==void 0&&(a=""+t.key),"key"in t){o={};for(var s in t)s!=="key"&&(o[s]=t[s])}else o=t;return t=o.ref,{$$typeof:r,type:n,key:a,ref:t!==void 0?t:null,props:o}}return $L.Fragment=e,$L.jsx=i,$L.jsxs=i,$L}var Y7;function GS(){return Y7||(Y7=1,zz.exports=tRe()),zz.exports}var R=GS(),Wz={exports:{}},hn={};/**
 * @license React
 * react.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var $7;function rRe(){if($7)return hn;$7=1;var r=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),t=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),d=Symbol.for("react.activity"),f=Symbol.iterator;function h(I){return I===null||typeof I!="object"?null:(I=f&&I[f]||I["@@iterator"],typeof I=="function"?I:null)}var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,v={};function y(I,Q,Z){this.props=I,this.context=Q,this.refs=v,this.updater=Z||p}y.prototype.isReactComponent={},y.prototype.setState=function(I,Q){if(typeof I!="object"&&typeof I!="function"&&I!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,I,Q,"setState")},y.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function m(){}m.prototype=y.prototype;function b(I,Q,Z){this.props=I,this.context=Q,this.refs=v,this.updater=Z||p}var S=b.prototype=new m;S.constructor=b,g(S,y.prototype),S.isPureReactComponent=!0;var _=Array.isArray;function C(){}var T={H:null,A:null,T:null,S:null},x=Object.prototype.hasOwnProperty;function A(I,Q,Z){var ee=Z.ref;return{$$typeof:r,type:I,key:Q,ref:ee!==void 0?ee:null,props:Z}}function w(I,Q){return A(I.type,Q,I.props)}function L(I){return typeof I=="object"&&I!==null&&I.$$typeof===r}function k(I){var Q={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(Z){return Q[Z]})}var D=/\/+/g;function j(I,Q){return typeof I=="object"&&I!==null&&I.key!=null?k(""+I.key):Q.toString(36)}function N(I){switch(I.status){case"fulfilled":return I.value;case"rejected":throw I.reason;default:switch(typeof I.status=="string"?I.then(C,C):(I.status="pending",I.then(function(Q){I.status==="pending"&&(I.status="fulfilled",I.value=Q)},function(Q){I.status==="pending"&&(I.status="rejected",I.reason=Q)})),I.status){case"fulfilled":return I.value;case"rejected":throw I.reason}}throw I}function V(I,Q,Z,ee,ie){var de=typeof I;(de==="undefined"||de==="boolean")&&(I=null);var pe=!1;if(I===null)pe=!0;else switch(de){case"bigint":case"string":case"number":pe=!0;break;case"object":switch(I.$$typeof){case r:case e:pe=!0;break;case c:return pe=I._init,V(pe(I._payload),Q,Z,ee,ie)}}if(pe)return ie=ie(I),pe=ee===""?"."+j(I,0):ee,_(ie)?(Z="",pe!=null&&(Z=pe.replace(D,"$&/")+"/"),V(ie,Q,Z,"",function(De){return De})):ie!=null&&(L(ie)&&(ie=w(ie,Z+(ie.key==null||I&&I.key===ie.key?"":(""+ie.key).replace(D,"$&/")+"/")+pe)),Q.push(ie)),1;pe=0;var _e=ee===""?".":ee+":";if(_(I))for(var Te=0;Te<I.length;Te++)ee=I[Te],de=_e+j(ee,Te),pe+=V(ee,Q,Z,de,ie);else if(Te=h(I),typeof Te=="function")for(I=Te.call(I),Te=0;!(ee=I.next()).done;)ee=ee.value,de=_e+j(ee,Te++),pe+=V(ee,Q,Z,de,ie);else if(de==="object"){if(typeof I.then=="function")return V(N(I),Q,Z,ee,ie);throw Q=String(I),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.")}return pe}function W(I,Q,Z){if(I==null)return I;var ee=[],ie=0;return V(I,ee,"","",function(de){return Q.call(Z,de,ie++)}),ee}function K(I){if(I._status===-1){var Q=I._result;Q=Q(),Q.then(function(Z){(I._status===0||I._status===-1)&&(I._status=1,I._result=Z)},function(Z){(I._status===0||I._status===-1)&&(I._status=2,I._result=Z)}),I._status===-1&&(I._status=0,I._result=Q)}if(I._status===1)return I._result.default;throw I._result}var H=typeof reportError=="function"?reportError:function(I){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof I=="object"&&I!==null&&typeof I.message=="string"?String(I.message):String(I),error:I});if(!window.dispatchEvent(Q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",I);return}console.error(I)},U={map:W,forEach:function(I,Q,Z){W(I,function(){Q.apply(this,arguments)},Z)},count:function(I){var Q=0;return W(I,function(){Q++}),Q},toArray:function(I){return W(I,function(Q){return Q})||[]},only:function(I){if(!L(I))throw Error("React.Children.only expected to receive a single React element child.");return I}};return hn.Activity=d,hn.Children=U,hn.Component=y,hn.Fragment=i,hn.Profiler=t,hn.PureComponent=b,hn.StrictMode=n,hn.Suspense=l,hn.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,hn.__COMPILER_RUNTIME={__proto__:null,c:function(I){return T.H.useMemoCache(I)}},hn.cache=function(I){return function(){return I.apply(null,arguments)}},hn.cacheSignal=function(){return null},hn.cloneElement=function(I,Q,Z){if(I==null)throw Error("The argument must be a React element, but you passed "+I+".");var ee=g({},I.props),ie=I.key;if(Q!=null)for(de in Q.key!==void 0&&(ie=""+Q.key),Q)!x.call(Q,de)||de==="key"||de==="__self"||de==="__source"||de==="ref"&&Q.ref===void 0||(ee[de]=Q[de]);var de=arguments.length-2;if(de===1)ee.children=Z;else if(1<de){for(var pe=Array(de),_e=0;_e<de;_e++)pe[_e]=arguments[_e+2];ee.children=pe}return A(I.type,ie,ee)},hn.createContext=function(I){return I={$$typeof:a,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null},I.Provider=I,I.Consumer={$$typeof:o,_context:I},I},hn.createElement=function(I,Q,Z){var ee,ie={},de=null;if(Q!=null)for(ee in Q.key!==void 0&&(de=""+Q.key),Q)x.call(Q,ee)&&ee!=="key"&&ee!=="__self"&&ee!=="__source"&&(ie[ee]=Q[ee]);var pe=arguments.length-2;if(pe===1)ie.children=Z;else if(1<pe){for(var _e=Array(pe),Te=0;Te<pe;Te++)_e[Te]=arguments[Te+2];ie.children=_e}if(I&&I.defaultProps)for(ee in pe=I.defaultProps,pe)ie[ee]===void 0&&(ie[ee]=pe[ee]);return A(I,de,ie)},hn.createRef=function(){return{current:null}},hn.forwardRef=function(I){return{$$typeof:s,render:I}},hn.isValidElement=L,hn.lazy=function(I){return{$$typeof:c,_payload:{_status:-1,_result:I},_init:K}},hn.memo=function(I,Q){return{$$typeof:u,type:I,compare:Q===void 0?null:Q}},hn.startTransition=function(I){var Q=T.T,Z={};T.T=Z;try{var ee=I(),ie=T.S;ie!==null&&ie(Z,ee),typeof ee=="object"&&ee!==null&&typeof ee.then=="function"&&ee.then(C,H)}catch(de){H(de)}finally{Q!==null&&Z.types!==null&&(Q.types=Z.types),T.T=Q}},hn.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},hn.use=function(I){return T.H.use(I)},hn.useActionState=function(I,Q,Z){return T.H.useActionState(I,Q,Z)},hn.useCallback=function(I,Q){return T.H.useCallback(I,Q)},hn.useContext=function(I){return T.H.useContext(I)},hn.useDebugValue=function(){},hn.useDeferredValue=function(I,Q){return T.H.useDeferredValue(I,Q)},hn.useEffect=function(I,Q){return T.H.useEffect(I,Q)},hn.useEffectEvent=function(I){return T.H.useEffectEvent(I)},hn.useId=function(){return T.H.useId()},hn.useImperativeHandle=function(I,Q,Z){return T.H.useImperativeHandle(I,Q,Z)},hn.useInsertionEffect=function(I,Q){return T.H.useInsertionEffect(I,Q)},hn.useLayoutEffect=function(I,Q){return T.H.useLayoutEffect(I,Q)},hn.useMemo=function(I,Q){return T.H.useMemo(I,Q)},hn.useOptimistic=function(I,Q){return T.H.useOptimistic(I,Q)},hn.useReducer=function(I,Q,Z){return T.H.useReducer(I,Q,Z)},hn.useRef=function(I){return T.H.useRef(I)},hn.useState=function(I){return T.H.useState(I)},hn.useSyncExternalStore=function(I,Q,Z){return T.H.useSyncExternalStore(I,Q,Z)},hn.useTransition=function(){return T.H.useTransition()},hn.version="19.2.0",hn}var q7;function $c(){return q7||(q7=1,Wz.exports=rRe()),Wz.exports}var G=$c();const An=Lu(G),OV=eRe({__proto__:null,default:An},[G]);var Gz={exports:{}},qL={},Yz={exports:{}},$z={};/**
 * @license React
 * scheduler.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var X7;function iRe(){return X7||(X7=1,(function(r){function e(V,W){var K=V.length;V.push(W);e:for(;0<K;){var H=K-1>>>1,U=V[H];if(0<t(U,W))V[H]=W,V[K]=U,K=H;else break e}}function i(V){return V.length===0?null:V[0]}function n(V){if(V.length===0)return null;var W=V[0],K=V.pop();if(K!==W){V[0]=K;e:for(var H=0,U=V.length,I=U>>>1;H<I;){var Q=2*(H+1)-1,Z=V[Q],ee=Q+1,ie=V[ee];if(0>t(Z,K))ee<U&&0>t(ie,Z)?(V[H]=ie,V[ee]=K,H=ee):(V[H]=Z,V[Q]=K,H=Q);else if(ee<U&&0>t(ie,K))V[H]=ie,V[ee]=K,H=ee;else break e}}return W}function t(V,W){var K=V.sortIndex-W.sortIndex;return K!==0?K:V.id-W.id}if(r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;r.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();r.unstable_now=function(){return a.now()-s}}var l=[],u=[],c=1,d=null,f=3,h=!1,p=!1,g=!1,v=!1,y=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;function S(V){for(var W=i(u);W!==null;){if(W.callback===null)n(u);else if(W.startTime<=V)n(u),W.sortIndex=W.expirationTime,e(l,W);else break;W=i(u)}}function _(V){if(g=!1,S(V),!p)if(i(l)!==null)p=!0,C||(C=!0,k());else{var W=i(u);W!==null&&N(_,W.startTime-V)}}var C=!1,T=-1,x=5,A=-1;function w(){return v?!0:!(r.unstable_now()-A<x)}function L(){if(v=!1,C){var V=r.unstable_now();A=V;var W=!0;try{e:{p=!1,g&&(g=!1,m(T),T=-1),h=!0;var K=f;try{t:{for(S(V),d=i(l);d!==null&&!(d.expirationTime>V&&w());){var H=d.callback;if(typeof H=="function"){d.callback=null,f=d.priorityLevel;var U=H(d.expirationTime<=V);if(V=r.unstable_now(),typeof U=="function"){d.callback=U,S(V),W=!0;break t}d===i(l)&&n(l),S(V)}else n(l);d=i(l)}if(d!==null)W=!0;else{var I=i(u);I!==null&&N(_,I.startTime-V),W=!1}}break e}finally{d=null,f=K,h=!1}W=void 0}}finally{W?k():C=!1}}}var k;if(typeof b=="function")k=function(){b(L)};else if(typeof MessageChannel<"u"){var D=new MessageChannel,j=D.port2;D.port1.onmessage=L,k=function(){j.postMessage(null)}}else k=function(){y(L,0)};function N(V,W){T=y(function(){V(r.unstable_now())},W)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(V){V.callback=null},r.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):x=0<V?Math.floor(1e3/V):5},r.unstable_getCurrentPriorityLevel=function(){return f},r.unstable_next=function(V){switch(f){case 1:case 2:case 3:var W=3;break;default:W=f}var K=f;f=W;try{return V()}finally{f=K}},r.unstable_requestPaint=function(){v=!0},r.unstable_runWithPriority=function(V,W){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var K=f;f=V;try{return W()}finally{f=K}},r.unstable_scheduleCallback=function(V,W,K){var H=r.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?H+K:H):K=H,V){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}return U=K+U,V={id:c++,callback:W,priorityLevel:V,startTime:K,expirationTime:U,sortIndex:-1},K>H?(V.sortIndex=K,e(u,V),i(l)===null&&V===i(u)&&(g?(m(T),T=-1):g=!0,N(_,K-H))):(V.sortIndex=U,e(l,V),p||h||(p=!0,C||(C=!0,k()))),V},r.unstable_shouldYield=w,r.unstable_wrapCallback=function(V){var W=f;return function(){var K=f;f=W;try{return V.apply(this,arguments)}finally{f=K}}}})($z)),$z}var K7;function nRe(){return K7||(K7=1,Yz.exports=iRe()),Yz.exports}var qz={exports:{}},Nc={};/**
 * @license React
 * react-dom.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Z7;function oRe(){if(Z7)return Nc;Z7=1;var r=$c();function e(l){var u="https://react.dev/errors/"+l;if(1<arguments.length){u+="?args[]="+encodeURIComponent(arguments[1]);for(var c=2;c<arguments.length;c++)u+="&args[]="+encodeURIComponent(arguments[c])}return"Minified React error #"+l+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var n={d:{f:i,r:function(){throw Error(e(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},t=Symbol.for("react.portal");function o(l,u,c){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:t,key:d==null?null:""+d,children:l,containerInfo:u,implementation:c}}var a=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function s(l,u){if(l==="font")return"";if(typeof u=="string")return u==="use-credentials"?u:""}return Nc.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,Nc.createPortal=function(l,u){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!u||u.nodeType!==1&&u.nodeType!==9&&u.nodeType!==11)throw Error(e(299));return o(l,u,null,c)},Nc.flushSync=function(l){var u=a.T,c=n.p;try{if(a.T=null,n.p=2,l)return l()}finally{a.T=u,n.p=c,n.d.f()}},Nc.preconnect=function(l,u){typeof l=="string"&&(u?(u=u.crossOrigin,u=typeof u=="string"?u==="use-credentials"?u:"":void 0):u=null,n.d.C(l,u))},Nc.prefetchDNS=function(l){typeof l=="string"&&n.d.D(l)},Nc.preinit=function(l,u){if(typeof l=="string"&&u&&typeof u.as=="string"){var c=u.as,d=s(c,u.crossOrigin),f=typeof u.integrity=="string"?u.integrity:void 0,h=typeof u.fetchPriority=="string"?u.fetchPriority:void 0;c==="style"?n.d.S(l,typeof u.precedence=="string"?u.precedence:void 0,{crossOrigin:d,integrity:f,fetchPriority:h}):c==="script"&&n.d.X(l,{crossOrigin:d,integrity:f,fetchPriority:h,nonce:typeof u.nonce=="string"?u.nonce:void 0})}},Nc.preinitModule=function(l,u){if(typeof l=="string")if(typeof u=="object"&&u!==null){if(u.as==null||u.as==="script"){var c=s(u.as,u.crossOrigin);n.d.M(l,{crossOrigin:c,integrity:typeof u.integrity=="string"?u.integrity:void 0,nonce:typeof u.nonce=="string"?u.nonce:void 0})}}else u==null&&n.d.M(l)},Nc.preload=function(l,u){if(typeof l=="string"&&typeof u=="object"&&u!==null&&typeof u.as=="string"){var c=u.as,d=s(c,u.crossOrigin);n.d.L(l,c,{crossOrigin:d,integrity:typeof u.integrity=="string"?u.integrity:void 0,nonce:typeof u.nonce=="string"?u.nonce:void 0,type:typeof u.type=="string"?u.type:void 0,fetchPriority:typeof u.fetchPriority=="string"?u.fetchPriority:void 0,referrerPolicy:typeof u.referrerPolicy=="string"?u.referrerPolicy:void 0,imageSrcSet:typeof u.imageSrcSet=="string"?u.imageSrcSet:void 0,imageSizes:typeof u.imageSizes=="string"?u.imageSizes:void 0,media:typeof u.media=="string"?u.media:void 0})}},Nc.preloadModule=function(l,u){if(typeof l=="string")if(u){var c=s(u.as,u.crossOrigin);n.d.m(l,{as:typeof u.as=="string"&&u.as!=="script"?u.as:void 0,crossOrigin:c,integrity:typeof u.integrity=="string"?u.integrity:void 0})}else n.d.m(l)},Nc.requestFormReset=function(l){n.d.r(l)},Nc.unstable_batchedUpdates=function(l,u){return l(u)},Nc.useFormState=function(l,u,c){return a.H.useFormState(l,u,c)},Nc.useFormStatus=function(){return a.H.useHostTransitionStatus()},Nc.version="19.2.0",Nc}var J7;function gye(){if(J7)return qz.exports;J7=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}return r(),qz.exports=oRe(),qz.exports}/**
 * @license React
 * react-dom-client.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Q7;function aRe(){if(Q7)return qL;Q7=1;var r=nRe(),e=$c(),i=gye();function n(P){var E="https://react.dev/errors/"+P;if(1<arguments.length){E+="?args[]="+encodeURIComponent(arguments[1]);for(var M=2;M<arguments.length;M++)E+="&args[]="+encodeURIComponent(arguments[M])}return"Minified React error #"+P+"; visit "+E+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function t(P){return!(!P||P.nodeType!==1&&P.nodeType!==9&&P.nodeType!==11)}function o(P){var E=P,M=P;if(P.alternate)for(;E.return;)E=E.return;else{P=E;do E=P,(E.flags&4098)!==0&&(M=E.return),P=E.return;while(P)}return E.tag===3?M:null}function a(P){if(P.tag===13){var E=P.memoizedState;if(E===null&&(P=P.alternate,P!==null&&(E=P.memoizedState)),E!==null)return E.dehydrated}return null}function s(P){if(P.tag===31){var E=P.memoizedState;if(E===null&&(P=P.alternate,P!==null&&(E=P.memoizedState)),E!==null)return E.dehydrated}return null}function l(P){if(o(P)!==P)throw Error(n(188))}function u(P){var E=P.alternate;if(!E){if(E=o(P),E===null)throw Error(n(188));return E!==P?null:P}for(var M=P,Y=E;;){var ne=M.return;if(ne===null)break;var le=ne.alternate;if(le===null){if(Y=ne.return,Y!==null){M=Y;continue}break}if(ne.child===le.child){for(le=ne.child;le;){if(le===M)return l(ne),P;if(le===Y)return l(ne),E;le=le.sibling}throw Error(n(188))}if(M.return!==Y.return)M=ne,Y=le;else{for(var Le=!1,tt=ne.child;tt;){if(tt===M){Le=!0,M=ne,Y=le;break}if(tt===Y){Le=!0,Y=ne,M=le;break}tt=tt.sibling}if(!Le){for(tt=le.child;tt;){if(tt===M){Le=!0,M=le,Y=ne;break}if(tt===Y){Le=!0,Y=le,M=ne;break}tt=tt.sibling}if(!Le)throw Error(n(189))}}if(M.alternate!==Y)throw Error(n(190))}if(M.tag!==3)throw Error(n(188));return M.stateNode.current===M?P:E}function c(P){var E=P.tag;if(E===5||E===26||E===27||E===6)return P;for(P=P.child;P!==null;){if(E=c(P),E!==null)return E;P=P.sibling}return null}var d=Object.assign,f=Symbol.for("react.element"),h=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),m=Symbol.for("react.consumer"),b=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),A=Symbol.for("react.activity"),w=Symbol.for("react.memo_cache_sentinel"),L=Symbol.iterator;function k(P){return P===null||typeof P!="object"?null:(P=L&&P[L]||P["@@iterator"],typeof P=="function"?P:null)}var D=Symbol.for("react.client.reference");function j(P){if(P==null)return null;if(typeof P=="function")return P.$$typeof===D?null:P.displayName||P.name||null;if(typeof P=="string")return P;switch(P){case g:return"Fragment";case y:return"Profiler";case v:return"StrictMode";case _:return"Suspense";case C:return"SuspenseList";case A:return"Activity"}if(typeof P=="object")switch(P.$$typeof){case p:return"Portal";case b:return P.displayName||"Context";case m:return(P._context.displayName||"Context")+".Consumer";case S:var E=P.render;return P=P.displayName,P||(P=E.displayName||E.name||"",P=P!==""?"ForwardRef("+P+")":"ForwardRef"),P;case T:return E=P.displayName||null,E!==null?E:j(P.type)||"Memo";case x:E=P._payload,P=P._init;try{return j(P(E))}catch{}}return null}var N=Array.isArray,V=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K={pending:!1,data:null,method:null,action:null},H=[],U=-1;function I(P){return{current:P}}function Q(P){0>U||(P.current=H[U],H[U]=null,U--)}function Z(P,E){U++,H[U]=P.current,P.current=E}var ee=I(null),ie=I(null),de=I(null),pe=I(null);function _e(P,E){switch(Z(de,E),Z(ie,P),Z(ee,null),E.nodeType){case 9:case 11:P=(P=E.documentElement)&&(P=P.namespaceURI)?Jy(P):0;break;default:if(P=E.tagName,E=E.namespaceURI)E=Jy(E),P=Tu(E,P);else switch(P){case"svg":P=1;break;case"math":P=2;break;default:P=0}}Q(ee),Z(ee,P)}function Te(){Q(ee),Q(ie),Q(de)}function De(P){P.memoizedState!==null&&Z(pe,P);var E=ee.current,M=Tu(E,P.type);E!==M&&(Z(ie,P),Z(ee,M))}function Pe(P){ie.current===P&&(Q(ee),Q(ie)),pe.current===P&&(Q(pe),lv._currentValue=K)}var Ee,Re;function je(P){if(Ee===void 0)try{throw Error()}catch(M){var E=M.stack.trim().match(/\n( *(at )?)/);Ee=E&&E[1]||"",Re=-1<M.stack.indexOf(`
    at`)?" (<anonymous>)":-1<M.stack.indexOf("@")?"@unknown:0:0":""}return`
`+Ee+P+Re}var Ke=!1;function ot(P,E){if(!P||Ke)return"";Ke=!0;var M=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var Y={DetermineComponentFrameRoot:function(){try{if(E){var mr=function(){throw Error()};if(Object.defineProperty(mr.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(mr,[])}catch(tr){var Kt=tr}Reflect.construct(P,[],mr)}else{try{mr.call()}catch(tr){Kt=tr}P.call(mr.prototype)}}else{try{throw Error()}catch(tr){Kt=tr}(mr=P())&&typeof mr.catch=="function"&&mr.catch(function(){})}}catch(tr){if(tr&&Kt&&typeof tr.stack=="string")return[tr.stack,Kt.stack]}return[null,null]}};Y.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var ne=Object.getOwnPropertyDescriptor(Y.DetermineComponentFrameRoot,"name");ne&&ne.configurable&&Object.defineProperty(Y.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var le=Y.DetermineComponentFrameRoot(),Le=le[0],tt=le[1];if(Le&&tt){var _t=Le.split(`
`),$t=tt.split(`
`);for(ne=Y=0;Y<_t.length&&!_t[Y].includes("DetermineComponentFrameRoot");)Y++;for(;ne<$t.length&&!$t[ne].includes("DetermineComponentFrameRoot");)ne++;if(Y===_t.length||ne===$t.length)for(Y=_t.length-1,ne=$t.length-1;1<=Y&&0<=ne&&_t[Y]!==$t[ne];)ne--;for(;1<=Y&&0<=ne;Y--,ne--)if(_t[Y]!==$t[ne]){if(Y!==1||ne!==1)do if(Y--,ne--,0>ne||_t[Y]!==$t[ne]){var hr=`
`+_t[Y].replace(" at new "," at ");return P.displayName&&hr.includes("<anonymous>")&&(hr=hr.replace("<anonymous>",P.displayName)),hr}while(1<=Y&&0<=ne);break}}}finally{Ke=!1,Error.prepareStackTrace=M}return(M=P?P.displayName||P.name:"")?je(M):""}function We(P,E){switch(P.tag){case 26:case 27:case 5:return je(P.type);case 16:return je("Lazy");case 13:return P.child!==E&&E!==null?je("Suspense Fallback"):je("Suspense");case 19:return je("SuspenseList");case 0:case 15:return ot(P.type,!1);case 11:return ot(P.type.render,!1);case 1:return ot(P.type,!0);case 31:return je("Activity");default:return""}}function xe(P){try{var E="",M=null;do E+=We(P,M),M=P,P=P.return;while(P);return E}catch(Y){return`
Error generating stack: `+Y.message+`
`+Y.stack}}var ve=Object.prototype.hasOwnProperty,he=r.unstable_scheduleCallback,Se=r.unstable_cancelCallback,be=r.unstable_shouldYield,ke=r.unstable_requestPaint,qe=r.unstable_now,rt=r.unstable_getCurrentPriorityLevel,St=r.unstable_ImmediatePriority,xt=r.unstable_UserBlockingPriority,It=r.unstable_NormalPriority,Zt=r.unstable_LowPriority,ct=r.unstable_IdlePriority,Qe=r.log,Et=r.unstable_setDisableYieldValue,Gt=null,Xe=null;function Vt(P){if(typeof Qe=="function"&&Et(P),Xe&&typeof Xe.setStrictMode=="function")try{Xe.setStrictMode(Gt,P)}catch{}}var lr=Math.clz32?Math.clz32:qt,Jt=Math.log,kr=Math.LN2;function qt(P){return P>>>=0,P===0?32:31-(Jt(P)/kr|0)|0}var zt=256,jr=262144,Be=4194304;function Ge(P){var E=P&42;if(E!==0)return E;switch(P&-P){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return P&261888;case 262144:case 524288:case 1048576:case 2097152:return P&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return P&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return P}}function ut(P,E,M){var Y=P.pendingLanes;if(Y===0)return 0;var ne=0,le=P.suspendedLanes,Le=P.pingedLanes;P=P.warmLanes;var tt=Y&134217727;return tt!==0?(Y=tt&~le,Y!==0?ne=Ge(Y):(Le&=tt,Le!==0?ne=Ge(Le):M||(M=tt&~P,M!==0&&(ne=Ge(M))))):(tt=Y&~le,tt!==0?ne=Ge(tt):Le!==0?ne=Ge(Le):M||(M=Y&~P,M!==0&&(ne=Ge(M)))),ne===0?0:E!==0&&E!==ne&&(E&le)===0&&(le=ne&-ne,M=E&-E,le>=M||le===32&&(M&4194048)!==0)?E:ne}function Pt(P,E){return(P.pendingLanes&~(P.suspendedLanes&~P.pingedLanes)&E)===0}function Qt(P,E){switch(P){case 1:case 2:case 4:case 8:case 64:return E+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return E+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function wr(){var P=Be;return Be<<=1,(Be&62914560)===0&&(Be=4194304),P}function Xr(P){for(var E=[],M=0;31>M;M++)E.push(P);return E}function pi(P,E){P.pendingLanes|=E,E!==268435456&&(P.suspendedLanes=0,P.pingedLanes=0,P.warmLanes=0)}function Qr(P,E,M,Y,ne,le){var Le=P.pendingLanes;P.pendingLanes=M,P.suspendedLanes=0,P.pingedLanes=0,P.warmLanes=0,P.expiredLanes&=M,P.entangledLanes&=M,P.errorRecoveryDisabledLanes&=M,P.shellSuspendCounter=0;var tt=P.entanglements,_t=P.expirationTimes,$t=P.hiddenUpdates;for(M=Le&~M;0<M;){var hr=31-lr(M),mr=1<<hr;tt[hr]=0,_t[hr]=-1;var Kt=$t[hr];if(Kt!==null)for($t[hr]=null,hr=0;hr<Kt.length;hr++){var tr=Kt[hr];tr!==null&&(tr.lane&=-536870913)}M&=~mr}Y!==0&&Ur(P,Y,0),le!==0&&ne===0&&P.tag!==0&&(P.suspendedLanes|=le&~(Le&~E))}function Ur(P,E,M){P.pendingLanes|=E,P.suspendedLanes&=~E;var Y=31-lr(E);P.entangledLanes|=E,P.entanglements[Y]=P.entanglements[Y]|1073741824|M&261930}function ci(P,E){var M=P.entangledLanes|=E;for(P=P.entanglements;M;){var Y=31-lr(M),ne=1<<Y;ne&E|P[Y]&E&&(P[Y]|=E),M&=~ne}}function Xt(P,E){var M=E&-E;return M=(M&42)!==0?1:Ui(M),(M&(P.suspendedLanes|E))!==0?0:M}function Ui(P){switch(P){case 2:P=1;break;case 8:P=4;break;case 32:P=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:P=128;break;case 268435456:P=134217728;break;default:P=0}return P}function Dn(P){return P&=-P,2<P?8<P?(P&134217727)!==0?32:268435456:8:2}function Kr(){var P=W.p;return P!==0?P:(P=window.event,P===void 0?32:ED(P.type))}function In(P,E){var M=W.p;try{return W.p=P,E()}finally{W.p=M}}var fn=Math.random().toString(36).slice(2),vt="__reactFiber$"+fn,dr="__reactProps$"+fn,ue="__reactContainer$"+fn,ar="__reactEvents$"+fn,Bt="__reactListeners$"+fn,Ar="__reactHandles$"+fn,br="__reactResources$"+fn,Br="__reactMarker$"+fn;function ai(P){delete P[vt],delete P[dr],delete P[ar],delete P[Bt],delete P[Ar]}function Nn(P){var E=P[vt];if(E)return E;for(var M=P.parentNode;M;){if(E=M[ue]||M[vt]){if(M=E.alternate,E.child!==null||M!==null&&M.child!==null)for(P=uD(P);P!==null;){if(M=P[vt])return M;P=uD(P)}return E}P=M,M=P.parentNode}return null}function nt(P){if(P=P[vt]||P[ue]){var E=P.tag;if(E===5||E===6||E===13||E===31||E===26||E===27||E===3)return P}return null}function _o(P){var E=P.tag;if(E===5||E===26||E===27||E===6)return P.stateNode;throw Error(n(33))}function si(P){var E=P[br];return E||(E=P[br]={hoistableStyles:new Map,hoistableScripts:new Map}),E}function ti(P){P[Br]=!0}var rr=new Set,is={};function wa(P,E){q(P,E),q(P+"Capture",E)}function q(P,E){for(is[P]=E,P=0;P<E.length;P++)rr.add(E[P])}var te=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),fe={},Ue={};function pt(P){return ve.call(Ue,P)?!0:ve.call(fe,P)?!1:te.test(P)?Ue[P]=!0:(fe[P]=!0,!1)}function At(P,E,M){if(pt(E))if(M===null)P.removeAttribute(E);else{switch(typeof M){case"undefined":case"function":case"symbol":P.removeAttribute(E);return;case"boolean":var Y=E.toLowerCase().slice(0,5);if(Y!=="data-"&&Y!=="aria-"){P.removeAttribute(E);return}}P.setAttribute(E,""+M)}}function cr(P,E,M){if(M===null)P.removeAttribute(E);else{switch(typeof M){case"undefined":case"function":case"symbol":case"boolean":P.removeAttribute(E);return}P.setAttribute(E,""+M)}}function Hr(P,E,M,Y){if(Y===null)P.removeAttribute(M);else{switch(typeof Y){case"undefined":case"function":case"symbol":case"boolean":P.removeAttribute(M);return}P.setAttributeNS(E,M,""+Y)}}function Yi(P){switch(typeof P){case"bigint":case"boolean":case"number":case"string":case"undefined":return P;case"object":return P;default:return""}}function Fn(P){var E=P.type;return(P=P.nodeName)&&P.toLowerCase()==="input"&&(E==="checkbox"||E==="radio")}function No(P,E,M){var Y=Object.getOwnPropertyDescriptor(P.constructor.prototype,E);if(!P.hasOwnProperty(E)&&typeof Y<"u"&&typeof Y.get=="function"&&typeof Y.set=="function"){var ne=Y.get,le=Y.set;return Object.defineProperty(P,E,{configurable:!0,get:function(){return ne.call(this)},set:function(Le){M=""+Le,le.call(this,Le)}}),Object.defineProperty(P,E,{enumerable:Y.enumerable}),{getValue:function(){return M},setValue:function(Le){M=""+Le},stopTracking:function(){P._valueTracker=null,delete P[E]}}}}function Ms(P){if(!P._valueTracker){var E=Fn(P)?"checked":"value";P._valueTracker=No(P,E,""+P[E])}}function _a(P){if(!P)return!1;var E=P._valueTracker;if(!E)return!0;var M=E.getValue(),Y="";return P&&(Y=Fn(P)?P.checked?"true":"false":P.value),P=Y,P!==M?(E.setValue(P),!0):!1}function Ua(P){if(P=P||(typeof document<"u"?document:void 0),typeof P>"u")return null;try{return P.activeElement||P.body}catch{return P.body}}var su=/[\n"\\]/g;function Oa(P){return P.replace(su,function(E){return"\\"+E.charCodeAt(0).toString(16)+" "})}function lu(P,E,M,Y,ne,le,Le,tt){P.name="",Le!=null&&typeof Le!="function"&&typeof Le!="symbol"&&typeof Le!="boolean"?P.type=Le:P.removeAttribute("type"),E!=null?Le==="number"?(E===0&&P.value===""||P.value!=E)&&(P.value=""+Yi(E)):P.value!==""+Yi(E)&&(P.value=""+Yi(E)):Le!=="submit"&&Le!=="reset"||P.removeAttribute("value"),E!=null?bl(P,Le,Yi(E)):M!=null?bl(P,Le,Yi(M)):Y!=null&&P.removeAttribute("value"),ne==null&&le!=null&&(P.defaultChecked=!!le),ne!=null&&(P.checked=ne&&typeof ne!="function"&&typeof ne!="symbol"),tt!=null&&typeof tt!="function"&&typeof tt!="symbol"&&typeof tt!="boolean"?P.name=""+Yi(tt):P.removeAttribute("name")}function Qs(P,E,M,Y,ne,le,Le,tt){if(le!=null&&typeof le!="function"&&typeof le!="symbol"&&typeof le!="boolean"&&(P.type=le),E!=null||M!=null){if(!(le!=="submit"&&le!=="reset"||E!=null)){Ms(P);return}M=M!=null?""+Yi(M):"",E=E!=null?""+Yi(E):M,tt||E===P.value||(P.value=E),P.defaultValue=E}Y=Y??ne,Y=typeof Y!="function"&&typeof Y!="symbol"&&!!Y,P.checked=tt?P.checked:!!Y,P.defaultChecked=!!Y,Le!=null&&typeof Le!="function"&&typeof Le!="symbol"&&typeof Le!="boolean"&&(P.name=Le),Ms(P)}function bl(P,E,M){E==="number"&&Ua(P.ownerDocument)===P||P.defaultValue===""+M||(P.defaultValue=""+M)}function Sl(P,E,M,Y){if(P=P.options,E){E={};for(var ne=0;ne<M.length;ne++)E["$"+M[ne]]=!0;for(M=0;M<P.length;M++)ne=E.hasOwnProperty("$"+P[M].value),P[M].selected!==ne&&(P[M].selected=ne),ne&&Y&&(P[M].defaultSelected=!0)}else{for(M=""+Yi(M),E=null,ne=0;ne<P.length;ne++){if(P[ne].value===M){P[ne].selected=!0,Y&&(P[ne].defaultSelected=!0);return}E!==null||P[ne].disabled||(E=P[ne])}E!==null&&(E.selected=!0)}}function uu(P,E,M){if(E!=null&&(E=""+Yi(E),E!==P.value&&(P.value=E),M==null)){P.defaultValue!==E&&(P.defaultValue=E);return}P.defaultValue=M!=null?""+Yi(M):""}function ys(P,E,M,Y){if(E==null){if(Y!=null){if(M!=null)throw Error(n(92));if(N(Y)){if(1<Y.length)throw Error(n(93));Y=Y[0]}M=Y}M==null&&(M=""),E=M}M=Yi(E),P.defaultValue=M,Y=P.textContent,Y===M&&Y!==""&&Y!==null&&(P.value=Y),Ms(P)}function Fo(P,E){if(E){var M=P.firstChild;if(M&&M===P.lastChild&&M.nodeType===3){M.nodeValue=E;return}}P.textContent=E}var Kc=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Pa(P,E,M){var Y=E.indexOf("--")===0;M==null||typeof M=="boolean"||M===""?Y?P.setProperty(E,""):E==="float"?P.cssFloat="":P[E]="":Y?P.setProperty(E,M):typeof M!="number"||M===0||Kc.has(E)?E==="float"?P.cssFloat=M:P[E]=(""+M).trim():P[E]=M+"px"}function vc(P,E,M){if(E!=null&&typeof E!="object")throw Error(n(62));if(P=P.style,M!=null){for(var Y in M)!M.hasOwnProperty(Y)||E!=null&&E.hasOwnProperty(Y)||(Y.indexOf("--")===0?P.setProperty(Y,""):Y==="float"?P.cssFloat="":P[Y]="");for(var ne in E)Y=E[ne],E.hasOwnProperty(ne)&&M[ne]!==Y&&Pa(P,ne,Y)}else for(var le in E)E.hasOwnProperty(le)&&Pa(P,le,E[le])}function Ls(P){if(P.indexOf("-")===-1)return!1;switch(P){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ns=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),el=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ao(P){return el.test(""+P)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":P}function ra(){}var fo=null;function Hn(P){return P=P.target||P.srcElement||window,P.correspondingUseElement&&(P=P.correspondingUseElement),P.nodeType===3?P.parentNode:P}var ks=null,cu=null;function Yl(P){var E=nt(P);if(E&&(P=E.stateNode)){var M=P[dr]||null;e:switch(P=E.stateNode,E.type){case"input":if(lu(P,M.value,M.defaultValue,M.defaultValue,M.checked,M.defaultChecked,M.type,M.name),E=M.name,M.type==="radio"&&E!=null){for(M=P;M.parentNode;)M=M.parentNode;for(M=M.querySelectorAll('input[name="'+Oa(""+E)+'"][type="radio"]'),E=0;E<M.length;E++){var Y=M[E];if(Y!==P&&Y.form===P.form){var ne=Y[dr]||null;if(!ne)throw Error(n(90));lu(Y,ne.value,ne.defaultValue,ne.defaultValue,ne.checked,ne.defaultChecked,ne.type,ne.name)}}for(E=0;E<M.length;E++)Y=M[E],Y.form===P.form&&_a(Y)}break e;case"textarea":uu(P,M.value,M.defaultValue);break e;case"select":E=M.value,E!=null&&Sl(P,!!M.multiple,E,!1)}}}var yc=!1;function ia(P,E,M){if(yc)return P(E,M);yc=!0;try{var Y=P(E);return Y}finally{if(yc=!1,(ks!==null||cu!==null)&&(kb(),ks&&(E=ks,P=cu,cu=ks=null,Yl(E),P)))for(E=0;E<P.length;E++)Yl(P[E])}}function fa(P,E){var M=P.stateNode;if(M===null)return null;var Y=M[dr]||null;if(Y===null)return null;M=Y[E];e:switch(E){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(Y=!Y.disabled)||(P=P.type,Y=!(P==="button"||P==="input"||P==="select"||P==="textarea")),P=!Y;break e;default:P=!1}if(P)return null;if(M&&typeof M!="function")throw Error(n(231,E,typeof M));return M}var qo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Zc=!1;if(qo)try{var Iu={};Object.defineProperty(Iu,"passive",{get:function(){Zc=!0}}),window.addEventListener("test",Iu,Iu),window.removeEventListener("test",Iu,Iu)}catch{Zc=!1}var ms=null,jo=null,zi=null;function on(){if(zi)return zi;var P,E=jo,M=E.length,Y,ne="value"in ms?ms.value:ms.textContent,le=ne.length;for(P=0;P<M&&E[P]===ne[P];P++);var Le=M-P;for(Y=1;Y<=Le&&E[M-Y]===ne[le-Y];Y++);return zi=ne.slice(P,1<Y?1-Y:void 0)}function du(P){var E=P.keyCode;return"charCode"in P?(P=P.charCode,P===0&&E===13&&(P=13)):P=E,P===10&&(P=13),32<=P||P===13?P:0}function me(){return!0}function Fe(){return!1}function Ze(P){function E(M,Y,ne,le,Le){this._reactName=M,this._targetInst=ne,this.type=Y,this.nativeEvent=le,this.target=Le,this.currentTarget=null;for(var tt in P)P.hasOwnProperty(tt)&&(M=P[tt],this[tt]=M?M(le):le[tt]);return this.isDefaultPrevented=(le.defaultPrevented!=null?le.defaultPrevented:le.returnValue===!1)?me:Fe,this.isPropagationStopped=Fe,this}return d(E.prototype,{preventDefault:function(){this.defaultPrevented=!0;var M=this.nativeEvent;M&&(M.preventDefault?M.preventDefault():typeof M.returnValue!="unknown"&&(M.returnValue=!1),this.isDefaultPrevented=me)},stopPropagation:function(){var M=this.nativeEvent;M&&(M.stopPropagation?M.stopPropagation():typeof M.cancelBubble!="unknown"&&(M.cancelBubble=!0),this.isPropagationStopped=me)},persist:function(){},isPersistent:me}),E}var ft={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(P){return P.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Mt=Ze(ft),nr=d({},ft,{view:0,detail:0}),Ot=Ze(nr),Ut,Yr,Jr,li=d({},nr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Jc,button:0,buttons:0,relatedTarget:function(P){return P.relatedTarget===void 0?P.fromElement===P.srcElement?P.toElement:P.fromElement:P.relatedTarget},movementX:function(P){return"movementX"in P?P.movementX:(P!==Jr&&(Jr&&P.type==="mousemove"?(Ut=P.screenX-Jr.screenX,Yr=P.screenY-Jr.screenY):Yr=Ut=0,Jr=P),Ut)},movementY:function(P){return"movementY"in P?P.movementY:Yr}}),Ci=Ze(li),Di=d({},li,{dataTransfer:0}),za=Ze(Di),ha=d({},nr,{relatedTarget:0}),Is=Ze(ha),tl=d({},ft,{animationName:0,elapsedTime:0,pseudoElement:0}),$l=Ze(tl),mc=d({},ft,{clipboardData:function(P){return"clipboardData"in P?P.clipboardData:window.clipboardData}}),os=Ze(mc),Rp=d({},ft,{data:0}),as=Ze(Rp),qd={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},bc={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Da={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Xd(P){var E=this.nativeEvent;return E.getModifierState?E.getModifierState(P):(P=Da[P])?!!E[P]:!1}function Jc(){return Xd}var ho=d({},nr,{key:function(P){if(P.key){var E=qd[P.key]||P.key;if(E!=="Unidentified")return E}return P.type==="keypress"?(P=du(P),P===13?"Enter":String.fromCharCode(P)):P.type==="keydown"||P.type==="keyup"?bc[P.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Jc,charCode:function(P){return P.type==="keypress"?du(P):0},keyCode:function(P){return P.type==="keydown"||P.type==="keyup"?P.keyCode:0},which:function(P){return P.type==="keypress"?du(P):P.type==="keydown"||P.type==="keyup"?P.keyCode:0}}),fu=Ze(ho),kf=d({},li,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Sc=Ze(kf),If=d({},nr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Jc}),Mp=Ze(If),Lp=d({},ft,{propertyName:0,elapsedTime:0,pseudoElement:0}),Kd=Ze(Lp),_c=d({},li,{deltaX:function(P){return"deltaX"in P?P.deltaX:"wheelDeltaX"in P?-P.wheelDeltaX:0},deltaY:function(P){return"deltaY"in P?P.deltaY:"wheelDeltaY"in P?-P.wheelDeltaY:"wheelDelta"in P?-P.wheelDelta:0},deltaZ:0,deltaMode:0}),Zd=Ze(_c),Ti=d({},ft,{newState:0,oldState:0}),Dh=Ze(Ti),Qc=[9,13,27,32],ed=qo&&"CompositionEvent"in window,hu=null;qo&&"documentMode"in document&&(hu=document.documentMode);var td=qo&&"TextEvent"in window&&!hu,Jd=qo&&(!ed||hu&&8<hu&&11>=hu),Nf=" ",Nu=!1;function Fu(P,E){switch(P){case"keyup":return Qc.indexOf(E.keyCode)!==-1;case"keydown":return E.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Rh(P){return P=P.detail,typeof P=="object"&&"data"in P?P.data:null}var ju=!1;function bs(P,E){switch(P){case"compositionend":return Rh(E);case"keypress":return E.which!==32?null:(Nu=!0,Nf);case"textInput":return P=E.data,P===Nf&&Nu?null:P;default:return null}}function Ff(P,E){if(ju)return P==="compositionend"||!ed&&Fu(P,E)?(P=on(),zi=jo=ms=null,ju=!1,P):null;switch(P){case"paste":return null;case"keypress":if(!(E.ctrlKey||E.altKey||E.metaKey)||E.ctrlKey&&E.altKey){if(E.char&&1<E.char.length)return E.char;if(E.which)return String.fromCharCode(E.which)}return null;case"compositionend":return Jd&&E.locale!=="ko"?null:E.data;default:return null}}var rd={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ql(P){var E=P&&P.nodeName&&P.nodeName.toLowerCase();return E==="input"?!!rd[P.type]:E==="textarea"}function jf(P,E,M,Y){ks?cu?cu.push(Y):cu=[Y]:ks=Y,E=qy(E,"onChange"),0<E.length&&(M=new Mt("onChange","change",null,M,Y),P.push({event:M,listeners:E}))}var id=null,_l=null;function jn(P){eD(P,0)}function Pl(P){var E=_o(P);if(_a(E))return P}function Ra(P,E){if(P==="change")return E}var Ma=!1;if(qo){var Bf;if(qo){var Qd="oninput"in document;if(!Qd){var ef=document.createElement("div");ef.setAttribute("oninput","return;"),Qd=typeof ef.oninput=="function"}Bf=Qd}else Bf=!1;Ma=Bf&&(!document.documentMode||9<document.documentMode)}function Vf(){id&&(id.detachEvent("onpropertychange",Xl),_l=id=null)}function Xl(P){if(P.propertyName==="value"&&Pl(_l)){var E=[];jf(E,_l,P,Hn(P)),ia(jn,E)}}function tf(P,E,M){P==="focusin"?(Vf(),id=E,_l=M,id.attachEvent("onpropertychange",Xl)):P==="focusout"&&Vf()}function kp(P){if(P==="selectionchange"||P==="keyup"||P==="keydown")return Pl(_l)}function nd(P,E){if(P==="click")return Pl(E)}function Mh(P,E){if(P==="input"||P==="change")return Pl(E)}function Bu(P,E){return P===E&&(P!==0||1/P===1/E)||P!==P&&E!==E}var ze=typeof Object.is=="function"?Object.is:Bu;function se(P,E){if(ze(P,E))return!0;if(typeof P!="object"||P===null||typeof E!="object"||E===null)return!1;var M=Object.keys(P),Y=Object.keys(E);if(M.length!==Y.length)return!1;for(Y=0;Y<M.length;Y++){var ne=M[Y];if(!ve.call(E,ne)||!ze(P[ne],E[ne]))return!1}return!0}function ye(P){for(;P&&P.firstChild;)P=P.firstChild;return P}function ge(P,E){var M=ye(P);P=0;for(var Y;M;){if(M.nodeType===3){if(Y=P+M.textContent.length,P<=E&&Y>=E)return{node:M,offset:E-P};P=Y}e:{for(;M;){if(M.nextSibling){M=M.nextSibling;break e}M=M.parentNode}M=void 0}M=ye(M)}}function Ce(P,E){return P&&E?P===E?!0:P&&P.nodeType===3?!1:E&&E.nodeType===3?Ce(P,E.parentNode):"contains"in P?P.contains(E):P.compareDocumentPosition?!!(P.compareDocumentPosition(E)&16):!1:!1}function Me(P){P=P!=null&&P.ownerDocument!=null&&P.ownerDocument.defaultView!=null?P.ownerDocument.defaultView:window;for(var E=Ua(P.document);E instanceof P.HTMLIFrameElement;){try{var M=typeof E.contentWindow.location.href=="string"}catch{M=!1}if(M)P=E.contentWindow;else break;E=Ua(P.document)}return E}function Ne(P){var E=P&&P.nodeName&&P.nodeName.toLowerCase();return E&&(E==="input"&&(P.type==="text"||P.type==="search"||P.type==="tel"||P.type==="url"||P.type==="password")||E==="textarea"||P.contentEditable==="true")}var lt=qo&&"documentMode"in document&&11>=document.documentMode,Ve=null,it=null,Je=null,ht=!1;function Nt(P,E,M){var Y=M.window===M?M.document:M.nodeType===9?M:M.ownerDocument;ht||Ve==null||Ve!==Ua(Y)||(Y=Ve,"selectionStart"in Y&&Ne(Y)?Y={start:Y.selectionStart,end:Y.selectionEnd}:(Y=(Y.ownerDocument&&Y.ownerDocument.defaultView||window).getSelection(),Y={anchorNode:Y.anchorNode,anchorOffset:Y.anchorOffset,focusNode:Y.focusNode,focusOffset:Y.focusOffset}),Je&&se(Je,Y)||(Je=Y,Y=qy(it,"onSelect"),0<Y.length&&(E=new Mt("onSelect","select",null,E,M),P.push({event:E,listeners:Y}),E.target=Ve)))}function fr(P,E){var M={};return M[P.toLowerCase()]=E.toLowerCase(),M["Webkit"+P]="webkit"+E,M["Moz"+P]="moz"+E,M}var Or={animationend:fr("Animation","AnimationEnd"),animationiteration:fr("Animation","AnimationIteration"),animationstart:fr("Animation","AnimationStart"),transitionrun:fr("Transition","TransitionRun"),transitionstart:fr("Transition","TransitionStart"),transitioncancel:fr("Transition","TransitionCancel"),transitionend:fr("Transition","TransitionEnd")},Rt={},ur={};qo&&(ur=document.createElement("div").style,"AnimationEvent"in window||(delete Or.animationend.animation,delete Or.animationiteration.animation,delete Or.animationstart.animation),"TransitionEvent"in window||delete Or.transitionend.transition);function so(P){if(Rt[P])return Rt[P];if(!Or[P])return P;var E=Or[P],M;for(M in E)if(E.hasOwnProperty(M)&&M in ur)return Rt[P]=E[M];return P}var qn=so("animationend"),rl=so("animationiteration"),rf=so("animationstart"),Vu=so("transitionrun"),od=so("transitionstart"),ad=so("transitioncancel"),yn=so("transitionend"),Xo=new Map,ro="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");ro.push("scrollEnd");function Xn(P,E){Xo.set(P,E),wa(E,[P])}var Un=typeof reportError=="function"?reportError:function(P){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var E=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof P=="object"&&P!==null&&typeof P.message=="string"?String(P.message):String(P),error:P});if(!window.dispatchEvent(E))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",P);return}console.error(P)},Ns=[],La=0,sd=0;function Tr(){for(var P=La,E=sd=La=0;E<P;){var M=Ns[E];Ns[E++]=null;var Y=Ns[E];Ns[E++]=null;var ne=Ns[E];Ns[E++]=null;var le=Ns[E];if(Ns[E++]=null,Y!==null&&ne!==null){var Le=Y.pending;Le===null?ne.next=ne:(ne.next=Le.next,Le.next=ne),Y.pending=ne}le!==0&&Ip(M,ne,le)}}function ld(P,E,M,Y){Ns[La++]=P,Ns[La++]=E,Ns[La++]=M,Ns[La++]=Y,sd|=Y,P.lanes|=Y,P=P.alternate,P!==null&&(P.lanes|=Y)}function Lh(P,E,M,Y){return ld(P,E,M,Y),Hf(P)}function Er(P,E){return ld(P,null,null,E),Hf(P)}function Ip(P,E,M){P.lanes|=M;var Y=P.alternate;Y!==null&&(Y.lanes|=M);for(var ne=!1,le=P.return;le!==null;)le.childLanes|=M,Y=le.alternate,Y!==null&&(Y.childLanes|=M),le.tag===22&&(P=le.stateNode,P===null||P._visibility&1||(ne=!0)),P=le,le=le.return;return P.tag===3?(le=P.stateNode,ne&&E!==null&&(ne=31-lr(M),P=le.hiddenUpdates,Y=P[ne],Y===null?P[ne]=[E]:Y.push(E),E.lane=M|536870912),le):null}function Hf(P){if(50<Hy)throw Hy=0,W_=null,Error(n(185));for(var E=P.return;E!==null;)P=E,E=P.return;return P.tag===3?P.stateNode:null}var Hu={};function Ng(P,E,M,Y){this.tag=P,this.key=M,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=E,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=Y,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Wa(P,E,M,Y){return new Ng(P,E,M,Y)}function Uu(P){return P=P.prototype,!(!P||!P.isReactComponent)}function il(P,E){var M=P.alternate;return M===null?(M=Wa(P.tag,E,P.key,P.mode),M.elementType=P.elementType,M.type=P.type,M.stateNode=P.stateNode,M.alternate=P,P.alternate=M):(M.pendingProps=E,M.type=P.type,M.flags=0,M.subtreeFlags=0,M.deletions=null),M.flags=P.flags&65011712,M.childLanes=P.childLanes,M.lanes=P.lanes,M.child=P.child,M.memoizedProps=P.memoizedProps,M.memoizedState=P.memoizedState,M.updateQueue=P.updateQueue,E=P.dependencies,M.dependencies=E===null?null:{lanes:E.lanes,firstContext:E.firstContext},M.sibling=P.sibling,M.index=P.index,M.ref=P.ref,M.refCleanup=P.refCleanup,M}function Sr(P,E){P.flags&=65011714;var M=P.alternate;return M===null?(P.childLanes=0,P.lanes=E,P.child=null,P.subtreeFlags=0,P.memoizedProps=null,P.memoizedState=null,P.updateQueue=null,P.dependencies=null,P.stateNode=null):(P.childLanes=M.childLanes,P.lanes=M.lanes,P.child=M.child,P.subtreeFlags=0,P.deletions=null,P.memoizedProps=M.memoizedProps,P.memoizedState=M.memoizedState,P.updateQueue=M.updateQueue,P.type=M.type,E=M.dependencies,P.dependencies=E===null?null:{lanes:E.lanes,firstContext:E.firstContext}),P}function mn(P,E,M,Y,ne,le){var Le=0;if(Y=P,typeof P=="function")Uu(P)&&(Le=1);else if(typeof P=="string")Le=jL(P,M,ee.current)?26:P==="html"||P==="head"||P==="body"?27:5;else e:switch(P){case A:return P=Wa(31,M,E,ne),P.elementType=A,P.lanes=le,P;case g:return Pc(M.children,ne,le,E);case v:Le=8,ne|=24;break;case y:return P=Wa(12,M,E,ne|2),P.elementType=y,P.lanes=le,P;case _:return P=Wa(13,M,E,ne),P.elementType=_,P.lanes=le,P;case C:return P=Wa(19,M,E,ne),P.elementType=C,P.lanes=le,P;default:if(typeof P=="object"&&P!==null)switch(P.$$typeof){case b:Le=10;break e;case m:Le=9;break e;case S:Le=11;break e;case T:Le=14;break e;case x:Le=16,Y=null;break e}Le=29,M=Error(n(130,P===null?"null":typeof P,"")),Y=null}return E=Wa(Le,M,E,ne),E.elementType=P,E.type=Y,E.lanes=le,E}function Pc(P,E,M,Y){return P=Wa(7,P,Y,E),P.lanes=M,P}function yr(P,E,M){return P=Wa(6,P,null,E),P.lanes=M,P}function un(P){var E=Wa(18,null,null,0);return E.stateNode=P,E}function Uf(P,E,M){return E=Wa(4,P.children!==null?P.children:[],P.key,E),E.lanes=M,E.stateNode={containerInfo:P.containerInfo,pendingChildren:null,implementation:P.implementation},E}var Fg=new WeakMap;function Fs(P,E){if(typeof P=="object"&&P!==null){var M=Fg.get(P);return M!==void 0?M:(E={value:P,source:E,stack:xe(E)},Fg.set(P,E),E)}return{value:P,source:E,stack:xe(E)}}var nf=[],of=0,Ko=null,pa=0,js=[],Cl=0,nl=null,Tl=1,xl="";function Ga(P,E){nf[of++]=pa,nf[of++]=Ko,Ko=P,pa=E}function kh(P,E,M){js[Cl++]=Tl,js[Cl++]=xl,js[Cl++]=nl,nl=P;var Y=Tl;P=xl;var ne=32-lr(Y)-1;Y&=~(1<<ne),M+=1;var le=32-lr(E)+ne;if(30<le){var Le=ne-ne%5;le=(Y&(1<<Le)-1).toString(32),Y>>=Le,ne-=Le,Tl=1<<32-lr(E)+ne|M<<ne|Y,xl=le+P}else Tl=1<<le|M<<ne|Y,xl=P}function Cc(P){P.return!==null&&(Ga(P,1),kh(P,1,0))}function ud(P){for(;P===Ko;)Ko=nf[--of],nf[of]=null,pa=nf[--of],nf[of]=null;for(;P===nl;)nl=js[--Cl],js[Cl]=null,xl=js[--Cl],js[Cl]=null,Tl=js[--Cl],js[Cl]=null}function af(P,E){js[Cl++]=Tl,js[Cl++]=xl,js[Cl++]=nl,Tl=E.id,xl=E.overflow,nl=P}var ga=null,zn=null,bn=!1,Tc=null,El=!1,Np=Error(n(519));function xc(P){var E=Error(n(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ac(Fs(E,P)),Np}function zf(P){var E=P.stateNode,M=P.type,Y=P.memoizedProps;switch(E[vt]=P,E[dr]=Y,M){case"dialog":xn("cancel",E),xn("close",E);break;case"iframe":case"object":case"embed":xn("load",E);break;case"video":case"audio":for(M=0;M<$y.length;M++)xn($y[M],E);break;case"source":xn("error",E);break;case"img":case"image":case"link":xn("error",E),xn("load",E);break;case"details":xn("toggle",E);break;case"input":xn("invalid",E),Qs(E,Y.value,Y.defaultValue,Y.checked,Y.defaultChecked,Y.type,Y.name,!0);break;case"select":xn("invalid",E);break;case"textarea":xn("invalid",E),ys(E,Y.value,Y.defaultValue,Y.children)}M=Y.children,typeof M!="string"&&typeof M!="number"&&typeof M!="bigint"||E.textContent===""+M||Y.suppressHydrationWarning===!0||iD(E.textContent,M)?(Y.popover!=null&&(xn("beforetoggle",E),xn("toggle",E)),Y.onScroll!=null&&xn("scroll",E),Y.onScrollEnd!=null&&xn("scrollend",E),Y.onClick!=null&&(E.onclick=ra),E=!0):E=!1,E||xc(P,!0)}function sf(P){for(ga=P.return;ga;)switch(ga.tag){case 5:case 31:case 13:El=!1;return;case 27:case 3:El=!0;return;default:ga=ga.return}}function cd(P){if(P!==ga)return!1;if(!bn)return sf(P),bn=!0,!1;var E=P.tag,M;if((M=E!==3&&E!==27)&&((M=E===5)&&(M=P.type,M=!(M!=="form"&&M!=="button")||tp(P.type,P.memoizedProps)),M=!M),M&&zn&&xc(P),sf(P),E===13){if(P=P.memoizedState,P=P!==null?P.dehydrated:null,!P)throw Error(n(317));zn=lD(P)}else if(E===31){if(P=P.memoizedState,P=P!==null?P.dehydrated:null,!P)throw Error(n(317));zn=lD(P)}else E===27?(E=zn,Ni(P.type)?(P=cP,cP=null,zn=P):zn=E):zn=ga?kc(P.stateNode.nextSibling):null;return!0}function et(){zn=ga=null,bn=!1}function Ec(){var P=Tc;return P!==null&&(_u===null?_u=P:_u.push.apply(_u,P),Tc=null),P}function Ac(P){Tc===null?Tc=[P]:Tc.push(P)}var Bs=I(null),$i=null,zu=null;function wc(P,E,M){Z(Bs,E._currentValue),E._currentValue=M}function Wu(P){P._currentValue=Bs.current,Q(Bs)}function Gu(P,E,M){for(;P!==null;){var Y=P.alternate;if((P.childLanes&E)!==E?(P.childLanes|=E,Y!==null&&(Y.childLanes|=E)):Y!==null&&(Y.childLanes&E)!==E&&(Y.childLanes|=E),P===M)break;P=P.return}}function Fp(P,E,M,Y){var ne=P.child;for(ne!==null&&(ne.return=P);ne!==null;){var le=ne.dependencies;if(le!==null){var Le=ne.child;le=le.firstContext;e:for(;le!==null;){var tt=le;le=ne;for(var _t=0;_t<E.length;_t++)if(tt.context===E[_t]){le.lanes|=M,tt=le.alternate,tt!==null&&(tt.lanes|=M),Gu(le.return,M,P),Y||(Le=null);break e}le=tt.next}}else if(ne.tag===18){if(Le=ne.return,Le===null)throw Error(n(341));Le.lanes|=M,le=Le.alternate,le!==null&&(le.lanes|=M),Gu(Le,M,P),Le=null}else Le=ne.child;if(Le!==null)Le.return=ne;else for(Le=ne;Le!==null;){if(Le===P){Le=null;break}if(ne=Le.sibling,ne!==null){ne.return=Le.return,Le=ne;break}Le=Le.return}ne=Le}}function lf(P,E,M,Y){P=null;for(var ne=E,le=!1;ne!==null;){if(!le){if((ne.flags&524288)!==0)le=!0;else if((ne.flags&262144)!==0)break}if(ne.tag===10){var Le=ne.alternate;if(Le===null)throw Error(n(387));if(Le=Le.memoizedProps,Le!==null){var tt=ne.type;ze(ne.pendingProps.value,Le.value)||(P!==null?P.push(tt):P=[tt])}}else if(ne===pe.current){if(Le=ne.alternate,Le===null)throw Error(n(387));Le.memoizedState.memoizedState!==ne.memoizedState.memoizedState&&(P!==null?P.push(lv):P=[lv])}ne=ne.return}P!==null&&Fp(E,P,M,Y),E.flags|=262144}function Ih(P){for(P=P.firstContext;P!==null;){if(!ze(P.context._currentValue,P.memoizedValue))return!0;P=P.next}return!1}function dd(P){$i=P,zu=null,P=P.dependencies,P!==null&&(P.firstContext=null)}function Ya(P){return jg($i,P)}function Al(P,E){return $i===null&&dd(P),jg(P,E)}function jg(P,E){var M=E._currentValue;if(E={context:E,memoizedValue:M,next:null},zu===null){if(P===null)throw Error(n(308));zu=E,P.dependencies={lanes:0,firstContext:E},P.flags|=524288}else zu=zu.next=E;return M}var py=typeof AbortController<"u"?AbortController:function(){var P=[],E=this.signal={aborted:!1,addEventListener:function(M,Y){P.push(Y)}};this.abort=function(){E.aborted=!0,P.forEach(function(M){return M()})}},gy=r.unstable_scheduleCallback,vy=r.unstable_NormalPriority,va={$$typeof:b,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Kl(){return{controller:new py,data:new Map,refCount:0}}function Wf(P){P.refCount--,P.refCount===0&&gy(vy,function(){P.controller.abort()})}var Gf=null,jp=0,uf=0,cf=null;function fd(P,E){if(Gf===null){var M=Gf=[];jp=0,uf=tc(),cf={status:"pending",value:void 0,then:function(Y){M.push(Y)}}}return jp++,E.then(Bg,Bg),E}function Bg(){if(--jp===0&&Gf!==null){cf!==null&&(cf.status="fulfilled");var P=Gf;Gf=null,uf=0,cf=null;for(var E=0;E<P.length;E++)(0,P[E])()}}function yy(P,E){var M=[],Y={status:"pending",value:null,reason:null,then:function(ne){M.push(ne)}};return P.then(function(){Y.status="fulfilled",Y.value=E;for(var ne=0;ne<M.length;ne++)(0,M[ne])(E)},function(ne){for(Y.status="rejected",Y.reason=ne,ne=0;ne<M.length;ne++)(0,M[ne])(void 0)}),Y}var wl=V.S;V.S=function(P,E){NO=qe(),typeof E=="object"&&E!==null&&typeof E.then=="function"&&fd(P,E),wl!==null&&wl(P,E)};var hd=I(null);function Bp(){var P=hd.current;return P!==null?P:Ho.pooledCache}function Nh(P,E){E===null?Z(hd,hd.current):Z(hd,E.pool)}function Vg(){var P=Bp();return P===null?null:{parent:va._currentValue,pool:P}}var df=Error(n(460)),Fh=Error(n(474)),Yf=Error(n(542)),$f={then:function(){}};function Hg(P){return P=P.status,P==="fulfilled"||P==="rejected"}function jh(P,E,M){switch(M=P[M],M===void 0?P.push(E):M!==E&&(E.then(ra,ra),E=M),E.status){case"fulfilled":return E.value;case"rejected":throw P=E.reason,Vp(P),P;default:if(typeof E.status=="string")E.then(ra,ra);else{if(P=Ho,P!==null&&100<P.shellSuspendCounter)throw Error(n(482));P=E,P.status="pending",P.then(function(Y){if(E.status==="pending"){var ne=E;ne.status="fulfilled",ne.value=Y}},function(Y){if(E.status==="pending"){var ne=E;ne.status="rejected",ne.reason=Y}})}switch(E.status){case"fulfilled":return E.value;case"rejected":throw P=E.reason,Vp(P),P}throw pu=E,df}}function Ol(P){try{var E=P._init;return E(P._payload)}catch(M){throw M!==null&&typeof M=="object"&&typeof M.then=="function"?(pu=M,df):M}}var pu=null;function Ug(){if(pu===null)throw Error(n(459));var P=pu;return pu=null,P}function Vp(P){if(P===df||P===Yf)throw Error(n(483))}var Yu=null,ol=0;function ff(P){var E=ol;return ol+=1,Yu===null&&(Yu=[]),jh(Yu,P,E)}function Vs(P,E){E=E.props.ref,P.ref=E!==void 0?E:null}function ss(P,E){throw E.$$typeof===f?Error(n(525)):(P=Object.prototype.toString.call(E),Error(n(31,P==="[object Object]"?"object with keys {"+Object.keys(E).join(", ")+"}":P)))}function zg(P){function E(Ft,Dt){if(P){var Yt=Ft.deletions;Yt===null?(Ft.deletions=[Dt],Ft.flags|=16):Yt.push(Dt)}}function M(Ft,Dt){if(!P)return null;for(;Dt!==null;)E(Ft,Dt),Dt=Dt.sibling;return null}function Y(Ft){for(var Dt=new Map;Ft!==null;)Ft.key!==null?Dt.set(Ft.key,Ft):Dt.set(Ft.index,Ft),Ft=Ft.sibling;return Dt}function ne(Ft,Dt){return Ft=il(Ft,Dt),Ft.index=0,Ft.sibling=null,Ft}function le(Ft,Dt,Yt){return Ft.index=Yt,P?(Yt=Ft.alternate,Yt!==null?(Yt=Yt.index,Yt<Dt?(Ft.flags|=67108866,Dt):Yt):(Ft.flags|=67108866,Dt)):(Ft.flags|=1048576,Dt)}function Le(Ft){return P&&Ft.alternate===null&&(Ft.flags|=67108866),Ft}function tt(Ft,Dt,Yt,vr){return Dt===null||Dt.tag!==6?(Dt=yr(Yt,Ft.mode,vr),Dt.return=Ft,Dt):(Dt=ne(Dt,Yt),Dt.return=Ft,Dt)}function _t(Ft,Dt,Yt,vr){var _i=Yt.type;return _i===g?hr(Ft,Dt,Yt.props.children,vr,Yt.key):Dt!==null&&(Dt.elementType===_i||typeof _i=="object"&&_i!==null&&_i.$$typeof===x&&Ol(_i)===Dt.type)?(Dt=ne(Dt,Yt.props),Vs(Dt,Yt),Dt.return=Ft,Dt):(Dt=mn(Yt.type,Yt.key,Yt.props,null,Ft.mode,vr),Vs(Dt,Yt),Dt.return=Ft,Dt)}function $t(Ft,Dt,Yt,vr){return Dt===null||Dt.tag!==4||Dt.stateNode.containerInfo!==Yt.containerInfo||Dt.stateNode.implementation!==Yt.implementation?(Dt=Uf(Yt,Ft.mode,vr),Dt.return=Ft,Dt):(Dt=ne(Dt,Yt.children||[]),Dt.return=Ft,Dt)}function hr(Ft,Dt,Yt,vr,_i){return Dt===null||Dt.tag!==7?(Dt=Pc(Yt,Ft.mode,vr,_i),Dt.return=Ft,Dt):(Dt=ne(Dt,Yt),Dt.return=Ft,Dt)}function mr(Ft,Dt,Yt){if(typeof Dt=="string"&&Dt!==""||typeof Dt=="number"||typeof Dt=="bigint")return Dt=yr(""+Dt,Ft.mode,Yt),Dt.return=Ft,Dt;if(typeof Dt=="object"&&Dt!==null){switch(Dt.$$typeof){case h:return Yt=mn(Dt.type,Dt.key,Dt.props,null,Ft.mode,Yt),Vs(Yt,Dt),Yt.return=Ft,Yt;case p:return Dt=Uf(Dt,Ft.mode,Yt),Dt.return=Ft,Dt;case x:return Dt=Ol(Dt),mr(Ft,Dt,Yt)}if(N(Dt)||k(Dt))return Dt=Pc(Dt,Ft.mode,Yt,null),Dt.return=Ft,Dt;if(typeof Dt.then=="function")return mr(Ft,ff(Dt),Yt);if(Dt.$$typeof===b)return mr(Ft,Al(Ft,Dt),Yt);ss(Ft,Dt)}return null}function Kt(Ft,Dt,Yt,vr){var _i=Dt!==null?Dt.key:null;if(typeof Yt=="string"&&Yt!==""||typeof Yt=="number"||typeof Yt=="bigint")return _i!==null?null:tt(Ft,Dt,""+Yt,vr);if(typeof Yt=="object"&&Yt!==null){switch(Yt.$$typeof){case h:return Yt.key===_i?_t(Ft,Dt,Yt,vr):null;case p:return Yt.key===_i?$t(Ft,Dt,Yt,vr):null;case x:return Yt=Ol(Yt),Kt(Ft,Dt,Yt,vr)}if(N(Yt)||k(Yt))return _i!==null?null:hr(Ft,Dt,Yt,vr,null);if(typeof Yt.then=="function")return Kt(Ft,Dt,ff(Yt),vr);if(Yt.$$typeof===b)return Kt(Ft,Dt,Al(Ft,Yt),vr);ss(Ft,Yt)}return null}function tr(Ft,Dt,Yt,vr,_i){if(typeof vr=="string"&&vr!==""||typeof vr=="number"||typeof vr=="bigint")return Ft=Ft.get(Yt)||null,tt(Dt,Ft,""+vr,_i);if(typeof vr=="object"&&vr!==null){switch(vr.$$typeof){case h:return Ft=Ft.get(vr.key===null?Yt:vr.key)||null,_t(Dt,Ft,vr,_i);case p:return Ft=Ft.get(vr.key===null?Yt:vr.key)||null,$t(Dt,Ft,vr,_i);case x:return vr=Ol(vr),tr(Ft,Dt,Yt,vr,_i)}if(N(vr)||k(vr))return Ft=Ft.get(Yt)||null,hr(Dt,Ft,vr,_i,null);if(typeof vr.then=="function")return tr(Ft,Dt,Yt,ff(vr),_i);if(vr.$$typeof===b)return tr(Ft,Dt,Yt,Al(Dt,vr),_i);ss(Dt,vr)}return null}function ri(Ft,Dt,Yt,vr){for(var _i=null,io=null,ui=Dt,cn=Dt=0,Mn=null;ui!==null&&cn<Yt.length;cn++){ui.index>cn?(Mn=ui,ui=null):Mn=ui.sibling;var no=Kt(Ft,ui,Yt[cn],vr);if(no===null){ui===null&&(ui=Mn);break}P&&ui&&no.alternate===null&&E(Ft,ui),Dt=le(no,Dt,cn),io===null?_i=no:io.sibling=no,io=no,ui=Mn}if(cn===Yt.length)return M(Ft,ui),bn&&Ga(Ft,cn),_i;if(ui===null){for(;cn<Yt.length;cn++)ui=mr(Ft,Yt[cn],vr),ui!==null&&(Dt=le(ui,Dt,cn),io===null?_i=ui:io.sibling=ui,io=ui);return bn&&Ga(Ft,cn),_i}for(ui=Y(ui);cn<Yt.length;cn++)Mn=tr(ui,Ft,cn,Yt[cn],vr),Mn!==null&&(P&&Mn.alternate!==null&&ui.delete(Mn.key===null?cn:Mn.key),Dt=le(Mn,Dt,cn),io===null?_i=Mn:io.sibling=Mn,io=Mn);return P&&ui.forEach(function(sp){return E(Ft,sp)}),bn&&Ga(Ft,cn),_i}function Oi(Ft,Dt,Yt,vr){if(Yt==null)throw Error(n(151));for(var _i=null,io=null,ui=Dt,cn=Dt=0,Mn=null,no=Yt.next();ui!==null&&!no.done;cn++,no=Yt.next()){ui.index>cn?(Mn=ui,ui=null):Mn=ui.sibling;var sp=Kt(Ft,ui,no.value,vr);if(sp===null){ui===null&&(ui=Mn);break}P&&ui&&sp.alternate===null&&E(Ft,ui),Dt=le(sp,Dt,cn),io===null?_i=sp:io.sibling=sp,io=sp,ui=Mn}if(no.done)return M(Ft,ui),bn&&Ga(Ft,cn),_i;if(ui===null){for(;!no.done;cn++,no=Yt.next())no=mr(Ft,no.value,vr),no!==null&&(Dt=le(no,Dt,cn),io===null?_i=no:io.sibling=no,io=no);return bn&&Ga(Ft,cn),_i}for(ui=Y(ui);!no.done;cn++,no=Yt.next())no=tr(ui,Ft,cn,no.value,vr),no!==null&&(P&&no.alternate!==null&&ui.delete(no.key===null?cn:no.key),Dt=le(no,Dt,cn),io===null?_i=no:io.sibling=no,io=no);return P&&ui.forEach(function(YL){return E(Ft,YL)}),bn&&Ga(Ft,cn),_i}function Oo(Ft,Dt,Yt,vr){if(typeof Yt=="object"&&Yt!==null&&Yt.type===g&&Yt.key===null&&(Yt=Yt.props.children),typeof Yt=="object"&&Yt!==null){switch(Yt.$$typeof){case h:e:{for(var _i=Yt.key;Dt!==null;){if(Dt.key===_i){if(_i=Yt.type,_i===g){if(Dt.tag===7){M(Ft,Dt.sibling),vr=ne(Dt,Yt.props.children),vr.return=Ft,Ft=vr;break e}}else if(Dt.elementType===_i||typeof _i=="object"&&_i!==null&&_i.$$typeof===x&&Ol(_i)===Dt.type){M(Ft,Dt.sibling),vr=ne(Dt,Yt.props),Vs(vr,Yt),vr.return=Ft,Ft=vr;break e}M(Ft,Dt);break}else E(Ft,Dt);Dt=Dt.sibling}Yt.type===g?(vr=Pc(Yt.props.children,Ft.mode,vr,Yt.key),vr.return=Ft,Ft=vr):(vr=mn(Yt.type,Yt.key,Yt.props,null,Ft.mode,vr),Vs(vr,Yt),vr.return=Ft,Ft=vr)}return Le(Ft);case p:e:{for(_i=Yt.key;Dt!==null;){if(Dt.key===_i)if(Dt.tag===4&&Dt.stateNode.containerInfo===Yt.containerInfo&&Dt.stateNode.implementation===Yt.implementation){M(Ft,Dt.sibling),vr=ne(Dt,Yt.children||[]),vr.return=Ft,Ft=vr;break e}else{M(Ft,Dt);break}else E(Ft,Dt);Dt=Dt.sibling}vr=Uf(Yt,Ft.mode,vr),vr.return=Ft,Ft=vr}return Le(Ft);case x:return Yt=Ol(Yt),Oo(Ft,Dt,Yt,vr)}if(N(Yt))return ri(Ft,Dt,Yt,vr);if(k(Yt)){if(_i=k(Yt),typeof _i!="function")throw Error(n(150));return Yt=_i.call(Yt),Oi(Ft,Dt,Yt,vr)}if(typeof Yt.then=="function")return Oo(Ft,Dt,ff(Yt),vr);if(Yt.$$typeof===b)return Oo(Ft,Dt,Al(Ft,Yt),vr);ss(Ft,Yt)}return typeof Yt=="string"&&Yt!==""||typeof Yt=="number"||typeof Yt=="bigint"?(Yt=""+Yt,Dt!==null&&Dt.tag===6?(M(Ft,Dt.sibling),vr=ne(Dt,Yt),vr.return=Ft,Ft=vr):(M(Ft,Dt),vr=yr(Yt,Ft.mode,vr),vr.return=Ft,Ft=vr),Le(Ft)):M(Ft,Dt)}return function(Ft,Dt,Yt,vr){try{ol=0;var _i=Oo(Ft,Dt,Yt,vr);return Yu=null,_i}catch(ui){if(ui===df||ui===Yf)throw ui;var io=Wa(29,ui,null,Ft.mode);return io.lanes=vr,io.return=Ft,io}finally{}}}var Oc=zg(!0),Bh=zg(!1),Dl=!1;function gu(P){P.updateQueue={baseState:P.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Vh(P,E){P=P.updateQueue,E.updateQueue===P&&(E.updateQueue={baseState:P.baseState,firstBaseUpdate:P.firstBaseUpdate,lastBaseUpdate:P.lastBaseUpdate,shared:P.shared,callbacks:null})}function Dc(P){return{lane:P,tag:0,payload:null,callback:null,next:null}}function Rl(P,E,M){var Y=P.updateQueue;if(Y===null)return null;if(Y=Y.shared,(lo&2)!==0){var ne=Y.pending;return ne===null?E.next=E:(E.next=ne.next,ne.next=E),Y.pending=E,E=Hf(P),Ip(P,null,M),E}return ld(P,Y,E,M),Hf(P)}function hf(P,E,M){if(E=E.updateQueue,E!==null&&(E=E.shared,(M&4194048)!==0)){var Y=E.lanes;Y&=P.pendingLanes,M|=Y,E.lanes=M,ci(P,M)}}function Hh(P,E){var M=P.updateQueue,Y=P.alternate;if(Y!==null&&(Y=Y.updateQueue,M===Y)){var ne=null,le=null;if(M=M.firstBaseUpdate,M!==null){do{var Le={lane:M.lane,tag:M.tag,payload:M.payload,callback:null,next:null};le===null?ne=le=Le:le=le.next=Le,M=M.next}while(M!==null);le===null?ne=le=E:le=le.next=E}else ne=le=E;M={baseState:Y.baseState,firstBaseUpdate:ne,lastBaseUpdate:le,shared:Y.shared,callbacks:Y.callbacks},P.updateQueue=M;return}P=M.lastBaseUpdate,P===null?M.firstBaseUpdate=E:P.next=E,M.lastBaseUpdate=E}var ya=!1;function Rc(){if(ya){var P=cf;if(P!==null)throw P}}function pf(P,E,M,Y){ya=!1;var ne=P.updateQueue;Dl=!1;var le=ne.firstBaseUpdate,Le=ne.lastBaseUpdate,tt=ne.shared.pending;if(tt!==null){ne.shared.pending=null;var _t=tt,$t=_t.next;_t.next=null,Le===null?le=$t:Le.next=$t,Le=_t;var hr=P.alternate;hr!==null&&(hr=hr.updateQueue,tt=hr.lastBaseUpdate,tt!==Le&&(tt===null?hr.firstBaseUpdate=$t:tt.next=$t,hr.lastBaseUpdate=_t))}if(le!==null){var mr=ne.baseState;Le=0,hr=$t=_t=null,tt=le;do{var Kt=tt.lane&-536870913,tr=Kt!==tt.lane;if(tr?(Rn&Kt)===Kt:(Y&Kt)===Kt){Kt!==0&&Kt===uf&&(ya=!0),hr!==null&&(hr=hr.next={lane:0,tag:tt.tag,payload:tt.payload,callback:null,next:null});e:{var ri=P,Oi=tt;Kt=E;var Oo=M;switch(Oi.tag){case 1:if(ri=Oi.payload,typeof ri=="function"){mr=ri.call(Oo,mr,Kt);break e}mr=ri;break e;case 3:ri.flags=ri.flags&-65537|128;case 0:if(ri=Oi.payload,Kt=typeof ri=="function"?ri.call(Oo,mr,Kt):ri,Kt==null)break e;mr=d({},mr,Kt);break e;case 2:Dl=!0}}Kt=tt.callback,Kt!==null&&(P.flags|=64,tr&&(P.flags|=8192),tr=ne.callbacks,tr===null?ne.callbacks=[Kt]:tr.push(Kt))}else tr={lane:Kt,tag:tt.tag,payload:tt.payload,callback:tt.callback,next:null},hr===null?($t=hr=tr,_t=mr):hr=hr.next=tr,Le|=Kt;if(tt=tt.next,tt===null){if(tt=ne.shared.pending,tt===null)break;tr=tt,tt=tr.next,tr.next=null,ne.lastBaseUpdate=tr,ne.shared.pending=null}}while(!0);hr===null&&(_t=mr),ne.baseState=_t,ne.firstBaseUpdate=$t,ne.lastBaseUpdate=hr,le===null&&(ne.shared.lanes=0),Kh|=Le,P.lanes=Le,P.memoizedState=mr}}function Zl(P,E){if(typeof P!="function")throw Error(n(191,P));P.call(E)}function Uh(P,E){var M=P.callbacks;if(M!==null)for(P.callbacks=null,P=0;P<M.length;P++)Zl(M[P],E)}var $u=I(null),vu=I(0);function Hp(P,E){P=bd,Z(vu,P),Z($u,E),bd=P|E.baseLanes}function $a(){Z(vu,bd),Z($u,$u.current)}function qf(){bd=vu.current,Q($u),Q(vu)}var al=I(null),Hs=null;function qu(P){var E=P.alternate;Z(na,na.current&1),Z(al,P),Hs===null&&(E===null||$u.current!==null||E.memoizedState!==null)&&(Hs=P)}function gf(P){Z(na,na.current),Z(al,P),Hs===null&&(Hs=P)}function zh(P){P.tag===22?(Z(na,na.current),Z(al,P),Hs===null&&(Hs=P)):Us()}function Us(){Z(na,na.current),Z(al,al.current)}function Ss(P){Q(al),Hs===P&&(Hs=null),Q(na)}var na=I(0);function po(P){for(var E=P;E!==null;){if(E.tag===13){var M=E.memoizedState;if(M!==null&&(M=M.dehydrated,M===null||Wb(M)||rv(M)))return E}else if(E.tag===19&&(E.memoizedProps.revealOrder==="forwards"||E.memoizedProps.revealOrder==="backwards"||E.memoizedProps.revealOrder==="unstable_legacy-backwards"||E.memoizedProps.revealOrder==="together")){if((E.flags&128)!==0)return E}else if(E.child!==null){E.child.return=E,E=E.child;continue}if(E===P)break;for(;E.sibling===null;){if(E.return===null||E.return===P)return null;E=E.return}E.sibling.return=E.return,E=E.sibling}return null}var zs=0,bi=null,di=null,Eo=null,qa=!1,Ws=!1,Xu=!1,Mc=0,pd=0,Ku=null,Wg=0;function Ao(){throw Error(n(321))}function gd(P,E){if(E===null)return!1;for(var M=0;M<E.length&&M<P.length;M++)if(!ze(P[M],E[M]))return!1;return!0}function Xf(P,E,M,Y,ne,le){return zs=le,bi=E,E.memoizedState=null,E.updateQueue=null,E.lanes=0,V.H=P===null||P.memoizedState===null?pO:bb,Xu=!1,le=M(Y,ne),Xu=!1,Ws&&(le=Zu(E,M,Y,ne)),Wh(P),le}function Wh(P){V.H=Yh;var E=di!==null&&di.next!==null;if(zs=0,Eo=di=bi=null,qa=!1,pd=0,Ku=null,E)throw Error(n(300));P===null||Ta||(P=P.dependencies,P!==null&&Ih(P)&&(Ta=!0))}function Zu(P,E,M,Y){bi=P;var ne=0;do{if(Ws&&(Ku=null),pd=0,Ws=!1,25<=ne)throw Error(n(301));if(ne+=1,Eo=di=null,P.updateQueue!=null){var le=P.updateQueue;le.lastEffect=null,le.events=null,le.stores=null,le.memoCache!=null&&(le.memoCache.index=0)}V.H=Cy,le=E(M,Y)}while(Ws);return le}function z(){var P=V.H,E=P.useState()[0];return E=typeof E.then=="function"?ce(E):E,P=P.useState()[0],(di!==null?di.memoizedState:null)!==P&&(bi.flags|=1024),E}function J(){var P=Mc!==0;return Mc=0,P}function oe(P,E,M){E.updateQueue=P.updateQueue,E.flags&=-2053,P.lanes&=~M}function O(P){if(qa){for(P=P.memoizedState;P!==null;){var E=P.queue;E!==null&&(E.pending=null),P=P.next}qa=!1}zs=0,Eo=di=bi=null,Ws=!1,pd=Mc=0,Ku=null}function B(){var P={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Eo===null?bi.memoizedState=Eo=P:Eo=Eo.next=P,Eo}function X(){if(di===null){var P=bi.alternate;P=P!==null?P.memoizedState:null}else P=di.next;var E=Eo===null?bi.memoizedState:Eo.next;if(E!==null)Eo=E,di=P;else{if(P===null)throw bi.alternate===null?Error(n(467)):Error(n(310));di=P,P={memoizedState:di.memoizedState,baseState:di.baseState,baseQueue:di.baseQueue,queue:di.queue,next:null},Eo===null?bi.memoizedState=Eo=P:Eo=Eo.next=P}return Eo}function re(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ce(P){var E=pd;return pd+=1,Ku===null&&(Ku=[]),P=jh(Ku,P,E),E=bi,(Eo===null?E.memoizedState:Eo.next)===null&&(E=E.alternate,V.H=E===null||E.memoizedState===null?pO:bb),P}function Ae(P){if(P!==null&&typeof P=="object"){if(typeof P.then=="function")return ce(P);if(P.$$typeof===b)return Ya(P)}throw Error(n(438,String(P)))}function Ie(P){var E=null,M=bi.updateQueue;if(M!==null&&(E=M.memoCache),E==null){var Y=bi.alternate;Y!==null&&(Y=Y.updateQueue,Y!==null&&(Y=Y.memoCache,Y!=null&&(E={data:Y.data.map(function(ne){return ne.slice()}),index:0})))}if(E==null&&(E={data:[],index:0}),M===null&&(M=re(),bi.updateQueue=M),M.memoCache=E,M=E.data[E.index],M===void 0)for(M=E.data[E.index]=Array(P),Y=0;Y<P;Y++)M[Y]=w;return E.index++,M}function He(P,E){return typeof E=="function"?E(P):E}function at(P){var E=X();return Tt(E,di,P)}function Tt(P,E,M){var Y=P.queue;if(Y===null)throw Error(n(311));Y.lastRenderedReducer=M;var ne=P.baseQueue,le=Y.pending;if(le!==null){if(ne!==null){var Le=ne.next;ne.next=le.next,le.next=Le}E.baseQueue=ne=le,Y.pending=null}if(le=P.baseState,ne===null)P.memoizedState=le;else{E=ne.next;var tt=Le=null,_t=null,$t=E,hr=!1;do{var mr=$t.lane&-536870913;if(mr!==$t.lane?(Rn&mr)===mr:(zs&mr)===mr){var Kt=$t.revertLane;if(Kt===0)_t!==null&&(_t=_t.next={lane:0,revertLane:0,gesture:null,action:$t.action,hasEagerState:$t.hasEagerState,eagerState:$t.eagerState,next:null}),mr===uf&&(hr=!0);else if((zs&Kt)===Kt){$t=$t.next,Kt===uf&&(hr=!0);continue}else mr={lane:0,revertLane:$t.revertLane,gesture:null,action:$t.action,hasEagerState:$t.hasEagerState,eagerState:$t.eagerState,next:null},_t===null?(tt=_t=mr,Le=le):_t=_t.next=mr,bi.lanes|=Kt,Kh|=Kt;mr=$t.action,Xu&&M(le,mr),le=$t.hasEagerState?$t.eagerState:M(le,mr)}else Kt={lane:mr,revertLane:$t.revertLane,gesture:$t.gesture,action:$t.action,hasEagerState:$t.hasEagerState,eagerState:$t.eagerState,next:null},_t===null?(tt=_t=Kt,Le=le):_t=_t.next=Kt,bi.lanes|=mr,Kh|=mr;$t=$t.next}while($t!==null&&$t!==E);if(_t===null?Le=le:_t.next=tt,!ze(le,P.memoizedState)&&(Ta=!0,hr&&(M=cf,M!==null)))throw M;P.memoizedState=le,P.baseState=Le,P.baseQueue=_t,Y.lastRenderedState=le}return ne===null&&(Y.lanes=0),[P.memoizedState,Y.dispatch]}function mt(P){var E=X(),M=E.queue;if(M===null)throw Error(n(311));M.lastRenderedReducer=P;var Y=M.dispatch,ne=M.pending,le=E.memoizedState;if(ne!==null){M.pending=null;var Le=ne=ne.next;do le=P(le,Le.action),Le=Le.next;while(Le!==ne);ze(le,E.memoizedState)||(Ta=!0),E.memoizedState=le,E.baseQueue===null&&(E.baseState=le),M.lastRenderedState=le}return[le,Y]}function Lt(P,E,M){var Y=bi,ne=X(),le=bn;if(le){if(M===void 0)throw Error(n(407));M=M()}else M=E();var Le=!ze((di||ne).memoizedState,M);if(Le&&(ne.memoizedState=M,Ta=!0),ne=ne.queue,by(pr.bind(null,Y,ne,P),[P]),ne.getSnapshot!==E||Le||Eo!==null&&Eo.memoizedState.tag&1){if(Y.flags|=2048,Sn(9,{destroy:void 0},er.bind(null,Y,ne,M,E),null),Ho===null)throw Error(n(349));le||(zs&127)!==0||or(Y,E,M)}return M}function or(P,E,M){P.flags|=16384,P={getSnapshot:E,value:M},E=bi.updateQueue,E===null?(E=re(),bi.updateQueue=E,E.stores=[P]):(M=E.stores,M===null?E.stores=[P]:M.push(P))}function er(P,E,M,Y){E.value=M,E.getSnapshot=Y,Ir(E)&&$r(P)}function pr(P,E,M){return M(function(){Ir(E)&&$r(P)})}function Ir(P){var E=P.getSnapshot;P=P.value;try{var M=E();return!ze(P,M)}catch{return!0}}function $r(P){var E=Er(P,2);E!==null&&Pu(E,P,2)}function ii(P){var E=B();if(typeof P=="function"){var M=P;if(P=M(),Xu){Vt(!0);try{M()}finally{Vt(!1)}}}return E.memoizedState=E.baseState=P,E.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:He,lastRenderedState:P},E}function Si(P,E,M,Y){return P.baseState=M,Tt(P,di,typeof Y=="function"?Y:He)}function Lr(P,E,M,Y,ne){if(_y(P))throw Error(n(485));if(P=E.action,P!==null){var le={payload:ne,action:P,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(Le){le.listeners.push(Le)}};V.T!==null?M(!0):le.isTransition=!1,Y(le),M=E.pending,M===null?(le.next=E.pending=le,Qi(E,le)):(le.next=M.next,E.pending=M.next=le)}}function Qi(P,E){var M=E.action,Y=E.payload,ne=P.state;if(E.isTransition){var le=V.T,Le={};V.T=Le;try{var tt=M(ne,Y),_t=V.S;_t!==null&&_t(Le,tt),Ri(P,E,tt)}catch($t){Pi(P,E,$t)}finally{le!==null&&Le.types!==null&&(le.types=Le.types),V.T=le}}else try{le=M(ne,Y),Ri(P,E,le)}catch($t){Pi(P,E,$t)}}function Ri(P,E,M){M!==null&&typeof M=="object"&&typeof M.then=="function"?M.then(function(Y){Gr(P,E,Y)},function(Y){return Pi(P,E,Y)}):Gr(P,E,M)}function Gr(P,E,M){E.status="fulfilled",E.value=M,Ca(E),P.state=M,E=P.pending,E!==null&&(M=E.next,M===E?P.pending=null:(M=M.next,E.next=M,Qi(P,M)))}function Pi(P,E,M){var Y=P.pending;if(P.pending=null,Y!==null){Y=Y.next;do E.status="rejected",E.reason=M,Ca(E),E=E.next;while(E!==Y)}P.action=null}function Ca(P){P=P.listeners;for(var E=0;E<P.length;E++)(0,P[E])()}function Bo(P,E){return E}function go(P,E){if(bn){var M=Ho.formState;if(M!==null){e:{var Y=bi;if(bn){if(zn){t:{for(var ne=zn,le=El;ne.nodeType!==8;){if(!le){ne=null;break t}if(ne=kc(ne.nextSibling),ne===null){ne=null;break t}}le=ne.data,ne=le==="F!"||le==="F"?ne:null}if(ne){zn=kc(ne.nextSibling),Y=ne.data==="F!";break e}}xc(Y)}Y=!1}Y&&(E=M[0])}}return M=B(),M.memoizedState=M.baseState=E,Y={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bo,lastRenderedState:E},M.queue=Y,M=m_.bind(null,bi,Y),Y.dispatch=M,Y=ii(!1),le=Yg.bind(null,bi,!1,Y.queue),Y=B(),ne={state:E,dispatch:null,action:P,pending:null},Y.queue=ne,M=Lr.bind(null,bi,ne,le,M),ne.dispatch=M,Y.memoizedState=P,[E,M,!1]}function _s(P){var E=X();return rn(E,di,P)}function rn(P,E,M){if(E=Tt(P,E,Bo)[0],P=at(He)[0],typeof E=="object"&&E!==null&&typeof E.then=="function")try{var Y=ce(E)}catch(Le){throw Le===df?Yf:Le}else Y=E;E=X();var ne=E.queue,le=ne.dispatch;return M!==E.memoizedState&&(bi.flags|=2048,Sn(9,{destroy:void 0},Ps.bind(null,ne,M),null)),[Y,le,P]}function Ps(P,E){P.action=E}function ls(P){var E=X(),M=di;if(M!==null)return rn(E,M,P);X(),E=E.memoizedState,M=X();var Y=M.queue.dispatch;return M.memoizedState=P,[E,Y,!1]}function Sn(P,E,M,Y){return P={tag:P,create:M,deps:Y,inst:E,next:null},E=bi.updateQueue,E===null&&(E=re(),bi.updateQueue=E),M=E.lastEffect,M===null?E.lastEffect=P.next=P:(Y=M.next,M.next=P,P.next=Y,E.lastEffect=P),P}function yu(){return X().memoizedState}function ka(P,E,M,Y){var ne=B();bi.flags|=P,ne.memoizedState=Sn(1|E,{destroy:void 0},M,Y===void 0?null:Y)}function my(P,E,M,Y){var ne=X();Y=Y===void 0?null:Y;var le=ne.memoizedState.inst;di!==null&&Y!==null&&gd(Y,di.memoizedState.deps)?ne.memoizedState=Sn(E,le,M,Y):(bi.flags|=P,ne.memoizedState=Sn(1|E,le,M,Y))}function c_(P,E){ka(8390656,8,P,E)}function by(P,E){my(2048,8,P,E)}function cL(P){bi.flags|=4;var E=bi.updateQueue;if(E===null)E=re(),bi.updateQueue=E,E.events=[P];else{var M=E.events;M===null?E.events=[P]:M.push(P)}}function uO(P){var E=X().memoizedState;return cL({ref:E,nextImpl:P}),function(){if((lo&2)!==0)throw Error(n(440));return E.impl.apply(void 0,arguments)}}function cO(P,E){return my(4,2,P,E)}function d_(P,E){return my(4,4,P,E)}function f_(P,E){if(typeof E=="function"){P=P();var M=E(P);return function(){typeof M=="function"?M():E(null)}}if(E!=null)return P=P(),E.current=P,function(){E.current=null}}function dO(P,E,M){M=M!=null?M.concat([P]):null,my(4,4,f_.bind(null,E,P),M)}function vb(){}function h_(P,E){var M=X();E=E===void 0?null:E;var Y=M.memoizedState;return E!==null&&gd(E,Y[1])?Y[0]:(M.memoizedState=[P,E],P)}function Jl(P,E){var M=X();E=E===void 0?null:E;var Y=M.memoizedState;if(E!==null&&gd(E,Y[1]))return Y[0];if(Y=P(),Xu){Vt(!0);try{P()}finally{Vt(!1)}}return M.memoizedState=[Y,E],Y}function Lc(P,E,M){return M===void 0||(zs&1073741824)!==0&&(Rn&261930)===0?P.memoizedState=E:(P.memoizedState=M,P=jO(),bi.lanes|=P,Kh|=P,M)}function fO(P,E,M,Y){return ze(M,E)?M:$u.current!==null?(P=Lc(P,M,Y),ze(P,E)||(Ta=!0),P):(zs&42)===0||(zs&1073741824)!==0&&(Rn&261930)===0?(Ta=!0,P.memoizedState=M):(P=jO(),bi.lanes|=P,Kh|=P,E)}function hO(P,E,M,Y,ne){var le=W.p;W.p=le!==0&&8>le?le:8;var Le=V.T,tt={};V.T=tt,Yg(P,!1,E,M);try{var _t=ne(),$t=V.S;if($t!==null&&$t(tt,_t),_t!==null&&typeof _t=="object"&&typeof _t.then=="function"){var hr=yy(_t,Y);Gg(P,E,hr,ec(P))}else Gg(P,E,Y,ec(P))}catch(mr){Gg(P,E,{then:function(){},status:"rejected",reason:mr},ec())}finally{W.p=le,Le!==null&&tt.types!==null&&(Le.types=tt.types),V.T=Le}}function yb(){}function Gh(P,E,M,Y){if(P.tag!==5)throw Error(n(476));var ne=p_(P).queue;hO(P,ne,E,K,M===null?yb:function(){return g_(P),M(Y)})}function p_(P){var E=P.memoizedState;if(E!==null)return E;E={memoizedState:K,baseState:K,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:He,lastRenderedState:K},next:null};var M={};return E.next={memoizedState:M,baseState:M,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:He,lastRenderedState:M},next:null},P.memoizedState=E,P=P.alternate,P!==null&&(P.memoizedState=E),E}function g_(P){var E=p_(P);E.next===null&&(E=P.alternate.memoizedState),Gg(P,E.next.queue,{},ec())}function v_(){return Ya(lv)}function y_(){return X().memoizedState}function Up(){return X().memoizedState}function Sy(P){for(var E=P.return;E!==null;){switch(E.tag){case 24:case 3:var M=ec();P=Dc(M);var Y=Rl(E,P,M);Y!==null&&(Pu(Y,E,M),hf(Y,E,M)),E={cache:Kl()},P.payload=E;return}E=E.return}}function dL(P,E,M){var Y=ec();M={lane:Y,revertLane:0,gesture:null,action:M,hasEagerState:!1,eagerState:null,next:null},_y(P)?Py(E,M):(M=Lh(P,E,M,Y),M!==null&&(Pu(M,P,Y),mb(M,E,Y)))}function m_(P,E,M){var Y=ec();Gg(P,E,M,Y)}function Gg(P,E,M,Y){var ne={lane:Y,revertLane:0,gesture:null,action:M,hasEagerState:!1,eagerState:null,next:null};if(_y(P))Py(E,ne);else{var le=P.alternate;if(P.lanes===0&&(le===null||le.lanes===0)&&(le=E.lastRenderedReducer,le!==null))try{var Le=E.lastRenderedState,tt=le(Le,M);if(ne.hasEagerState=!0,ne.eagerState=tt,ze(tt,Le))return ld(P,E,ne,0),Ho===null&&Tr(),!1}catch{}finally{}if(M=Lh(P,E,ne,Y),M!==null)return Pu(M,P,Y),mb(M,E,Y),!0}return!1}function Yg(P,E,M,Y){if(Y={lane:2,revertLane:tc(),gesture:null,action:Y,hasEagerState:!1,eagerState:null,next:null},_y(P)){if(E)throw Error(n(479))}else E=Lh(P,M,Y,2),E!==null&&Pu(E,P,2)}function _y(P){var E=P.alternate;return P===bi||E!==null&&E===bi}function Py(P,E){Ws=qa=!0;var M=P.pending;M===null?E.next=E:(E.next=M.next,M.next=E),P.pending=E}function mb(P,E,M){if((M&4194048)!==0){var Y=E.lanes;Y&=P.pendingLanes,M|=Y,E.lanes=M,ci(P,M)}}var Yh={readContext:Ya,use:Ae,useCallback:Ao,useContext:Ao,useEffect:Ao,useImperativeHandle:Ao,useLayoutEffect:Ao,useInsertionEffect:Ao,useMemo:Ao,useReducer:Ao,useRef:Ao,useState:Ao,useDebugValue:Ao,useDeferredValue:Ao,useTransition:Ao,useSyncExternalStore:Ao,useId:Ao,useHostTransitionStatus:Ao,useFormState:Ao,useActionState:Ao,useOptimistic:Ao,useMemoCache:Ao,useCacheRefresh:Ao};Yh.useEffectEvent=Ao;var pO={readContext:Ya,use:Ae,useCallback:function(P,E){return B().memoizedState=[P,E===void 0?null:E],P},useContext:Ya,useEffect:c_,useImperativeHandle:function(P,E,M){M=M!=null?M.concat([P]):null,ka(4194308,4,f_.bind(null,E,P),M)},useLayoutEffect:function(P,E){return ka(4194308,4,P,E)},useInsertionEffect:function(P,E){ka(4,2,P,E)},useMemo:function(P,E){var M=B();E=E===void 0?null:E;var Y=P();if(Xu){Vt(!0);try{P()}finally{Vt(!1)}}return M.memoizedState=[Y,E],Y},useReducer:function(P,E,M){var Y=B();if(M!==void 0){var ne=M(E);if(Xu){Vt(!0);try{M(E)}finally{Vt(!1)}}}else ne=E;return Y.memoizedState=Y.baseState=ne,P={pending:null,lanes:0,dispatch:null,lastRenderedReducer:P,lastRenderedState:ne},Y.queue=P,P=P.dispatch=dL.bind(null,bi,P),[Y.memoizedState,P]},useRef:function(P){var E=B();return P={current:P},E.memoizedState=P},useState:function(P){P=ii(P);var E=P.queue,M=m_.bind(null,bi,E);return E.dispatch=M,[P.memoizedState,M]},useDebugValue:vb,useDeferredValue:function(P,E){var M=B();return Lc(M,P,E)},useTransition:function(){var P=ii(!1);return P=hO.bind(null,bi,P.queue,!0,!1),B().memoizedState=P,[!1,P]},useSyncExternalStore:function(P,E,M){var Y=bi,ne=B();if(bn){if(M===void 0)throw Error(n(407));M=M()}else{if(M=E(),Ho===null)throw Error(n(349));(Rn&127)!==0||or(Y,E,M)}ne.memoizedState=M;var le={value:M,getSnapshot:E};return ne.queue=le,c_(pr.bind(null,Y,le,P),[P]),Y.flags|=2048,Sn(9,{destroy:void 0},er.bind(null,Y,le,M,E),null),M},useId:function(){var P=B(),E=Ho.identifierPrefix;if(bn){var M=xl,Y=Tl;M=(Y&~(1<<32-lr(Y)-1)).toString(32)+M,E="_"+E+"R_"+M,M=Mc++,0<M&&(E+="H"+M.toString(32)),E+="_"}else M=Wg++,E="_"+E+"r_"+M.toString(32)+"_";return P.memoizedState=E},useHostTransitionStatus:v_,useFormState:go,useActionState:go,useOptimistic:function(P){var E=B();E.memoizedState=E.baseState=P;var M={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return E.queue=M,E=Yg.bind(null,bi,!0,M),M.dispatch=E,[P,E]},useMemoCache:Ie,useCacheRefresh:function(){return B().memoizedState=Sy.bind(null,bi)},useEffectEvent:function(P){var E=B(),M={impl:P};return E.memoizedState=M,function(){if((lo&2)!==0)throw Error(n(440));return M.impl.apply(void 0,arguments)}}},bb={readContext:Ya,use:Ae,useCallback:h_,useContext:Ya,useEffect:by,useImperativeHandle:dO,useInsertionEffect:cO,useLayoutEffect:d_,useMemo:Jl,useReducer:at,useRef:yu,useState:function(){return at(He)},useDebugValue:vb,useDeferredValue:function(P,E){var M=X();return fO(M,di.memoizedState,P,E)},useTransition:function(){var P=at(He)[0],E=X().memoizedState;return[typeof P=="boolean"?P:ce(P),E]},useSyncExternalStore:Lt,useId:y_,useHostTransitionStatus:v_,useFormState:_s,useActionState:_s,useOptimistic:function(P,E){var M=X();return Si(M,di,P,E)},useMemoCache:Ie,useCacheRefresh:Up};bb.useEffectEvent=uO;var Cy={readContext:Ya,use:Ae,useCallback:h_,useContext:Ya,useEffect:by,useImperativeHandle:dO,useInsertionEffect:cO,useLayoutEffect:d_,useMemo:Jl,useReducer:mt,useRef:yu,useState:function(){return mt(He)},useDebugValue:vb,useDeferredValue:function(P,E){var M=X();return di===null?Lc(M,P,E):fO(M,di.memoizedState,P,E)},useTransition:function(){var P=mt(He)[0],E=X().memoizedState;return[typeof P=="boolean"?P:ce(P),E]},useSyncExternalStore:Lt,useId:y_,useHostTransitionStatus:v_,useFormState:ls,useActionState:ls,useOptimistic:function(P,E){var M=X();return di!==null?Si(M,di,P,E):(M.baseState=P,[P,M.queue.dispatch])},useMemoCache:Ie,useCacheRefresh:Up};Cy.useEffectEvent=uO;function Sb(P,E,M,Y){E=P.memoizedState,M=M(Y,E),M=M==null?E:d({},E,M),P.memoizedState=M,P.lanes===0&&(P.updateQueue.baseState=M)}var Ty={enqueueSetState:function(P,E,M){P=P._reactInternals;var Y=ec(),ne=Dc(Y);ne.payload=E,M!=null&&(ne.callback=M),E=Rl(P,ne,Y),E!==null&&(Pu(E,P,Y),hf(E,P,Y))},enqueueReplaceState:function(P,E,M){P=P._reactInternals;var Y=ec(),ne=Dc(Y);ne.tag=1,ne.payload=E,M!=null&&(ne.callback=M),E=Rl(P,ne,Y),E!==null&&(Pu(E,P,Y),hf(E,P,Y))},enqueueForceUpdate:function(P,E){P=P._reactInternals;var M=ec(),Y=Dc(M);Y.tag=2,E!=null&&(Y.callback=E),E=Rl(P,Y,M),E!==null&&(Pu(E,P,M),hf(E,P,M))}};function gO(P,E,M,Y,ne,le,Le){return P=P.stateNode,typeof P.shouldComponentUpdate=="function"?P.shouldComponentUpdate(Y,le,Le):E.prototype&&E.prototype.isPureReactComponent?!se(M,Y)||!se(ne,le):!0}function b_(P,E,M,Y){P=E.state,typeof E.componentWillReceiveProps=="function"&&E.componentWillReceiveProps(M,Y),typeof E.UNSAFE_componentWillReceiveProps=="function"&&E.UNSAFE_componentWillReceiveProps(M,Y),E.state!==P&&Ty.enqueueReplaceState(E,E.state,null)}function Ql(P,E){var M=E;if("ref"in E){M={};for(var Y in E)Y!=="ref"&&(M[Y]=E[Y])}if(P=P.defaultProps){M===E&&(M=d({},M));for(var ne in P)M[ne]===void 0&&(M[ne]=P[ne])}return M}function S_(P){Un(P)}function __(P){console.error(P)}function vO(P){Un(P)}function xy(P,E){try{var M=P.onUncaughtError;M(E.value,{componentStack:E.stack})}catch(Y){setTimeout(function(){throw Y})}}function yO(P,E,M){try{var Y=P.onCaughtError;Y(M.value,{componentStack:M.stack,errorBoundary:E.tag===1?E.stateNode:null})}catch(ne){setTimeout(function(){throw ne})}}function P_(P,E,M){return M=Dc(M),M.tag=3,M.payload={element:null},M.callback=function(){xy(P,E)},M}function vf(P){return P=Dc(P),P.tag=3,P}function _b(P,E,M,Y){var ne=M.type.getDerivedStateFromError;if(typeof ne=="function"){var le=Y.value;P.payload=function(){return ne(le)},P.callback=function(){yO(E,M,Y)}}var Le=M.stateNode;Le!==null&&typeof Le.componentDidCatch=="function"&&(P.callback=function(){yO(E,M,Y),typeof ne!="function"&&(Zh===null?Zh=new Set([this]):Zh.add(this));var tt=Y.stack;this.componentDidCatch(Y.value,{componentStack:tt!==null?tt:""})})}function C_(P,E,M,Y,ne){if(M.flags|=32768,Y!==null&&typeof Y=="object"&&typeof Y.then=="function"){if(E=M.alternate,E!==null&&lf(E,M,ne,!0),M=al.current,M!==null){switch(M.tag){case 31:case 13:return Hs===null?Ib():M.alternate===null&&xa===0&&(xa=3),M.flags&=-257,M.flags|=65536,M.lanes=ne,Y===$f?M.flags|=16384:(E=M.updateQueue,E===null?M.updateQueue=new Set([Y]):E.add(Y),J_(P,Y,ne)),!1;case 22:return M.flags|=65536,Y===$f?M.flags|=16384:(E=M.updateQueue,E===null?(E={transitions:null,markerInstances:null,retryQueue:new Set([Y])},M.updateQueue=E):(M=E.retryQueue,M===null?E.retryQueue=new Set([Y]):M.add(Y)),J_(P,Y,ne)),!1}throw Error(n(435,M.tag))}return J_(P,Y,ne),Ib(),!1}if(bn)return E=al.current,E!==null?((E.flags&65536)===0&&(E.flags|=256),E.flags|=65536,E.lanes=ne,Y!==Np&&(P=Error(n(422),{cause:Y}),Ac(Fs(P,M)))):(Y!==Np&&(E=Error(n(423),{cause:Y}),Ac(Fs(E,M))),P=P.current.alternate,P.flags|=65536,ne&=-ne,P.lanes|=ne,Y=Fs(Y,M),ne=P_(P.stateNode,Y,ne),Hh(P,ne),xa!==4&&(xa=2)),!1;var le=Error(n(520),{cause:Y});if(le=Fs(le,M),By===null?By=[le]:By.push(le),xa!==4&&(xa=2),E===null)return!0;Y=Fs(Y,M),M=E;do{switch(M.tag){case 3:return M.flags|=65536,P=ne&-ne,M.lanes|=P,P=P_(M.stateNode,Y,P),Hh(M,P),!1;case 1:if(E=M.type,le=M.stateNode,(M.flags&128)===0&&(typeof E.getDerivedStateFromError=="function"||le!==null&&typeof le.componentDidCatch=="function"&&(Zh===null||!Zh.has(le))))return M.flags|=65536,ne&=-ne,M.lanes|=ne,ne=vf(ne),_b(ne,P,M,Y),Hh(M,ne),!1}M=M.return}while(M!==null);return!1}var Ey=Error(n(461)),Ta=!1;function Ia(P,E,M,Y){E.child=P===null?Bh(E,null,M,Y):Oc(E,P.child,M,Y)}function Ei(P,E,M,Y,ne){M=M.render;var le=E.ref;if("ref"in Y){var Le={};for(var tt in Y)tt!=="ref"&&(Le[tt]=Y[tt])}else Le=Y;return dd(E),Y=Xf(P,E,M,Le,le,ne),tt=J(),P!==null&&!Ta?(oe(P,E,ne),yf(P,E,ne)):(bn&&tt&&Cc(E),E.flags|=1,Ia(P,E,Y,ne),E.child)}function Ay(P,E,M,Y,ne){if(P===null){var le=M.type;return typeof le=="function"&&!Uu(le)&&le.defaultProps===void 0&&M.compare===null?(E.tag=15,E.type=le,Pb(P,E,le,Y,ne)):(P=mn(M.type,null,Y,E,E.mode,ne),P.ref=E.ref,P.return=E,E.child=P)}if(le=P.child,!Ab(P,ne)){var Le=le.memoizedProps;if(M=M.compare,M=M!==null?M:se,M(Le,Y)&&P.ref===E.ref)return yf(P,E,ne)}return E.flags|=1,P=il(le,Y),P.ref=E.ref,P.return=E,E.child=P}function Pb(P,E,M,Y,ne){if(P!==null){var le=P.memoizedProps;if(se(le,Y)&&P.ref===E.ref)if(Ta=!1,E.pendingProps=Y=le,Ab(P,ne))(P.flags&131072)!==0&&(Ta=!0);else return E.lanes=P.lanes,yf(P,E,ne)}return xb(P,E,M,Y,ne)}function $h(P,E,M,Y){var ne=Y.children,le=P!==null?P.memoizedState:null;if(P===null&&E.stateNode===null&&(E.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),Y.mode==="hidden"){if((E.flags&128)!==0){if(le=le!==null?le.baseLanes|M:M,P!==null){for(Y=E.child=P.child,ne=0;Y!==null;)ne=ne|Y.lanes|Y.childLanes,Y=Y.sibling;Y=ne&~le}else Y=0,E.child=null;return Cb(P,E,le,M,Y)}if((M&536870912)!==0)E.memoizedState={baseLanes:0,cachePool:null},P!==null&&Nh(E,le!==null?le.cachePool:null),le!==null?Hp(E,le):$a(),zh(E);else return Y=E.lanes=536870912,Cb(P,E,le!==null?le.baseLanes|M:M,M,Y)}else le!==null?(Nh(E,le.cachePool),Hp(E,le),Us(),E.memoizedState=null):(P!==null&&Nh(E,null),$a(),Us());return Ia(P,E,ne,M),E.child}function wy(P,E){return P!==null&&P.tag===22||E.stateNode!==null||(E.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),E.sibling}function Cb(P,E,M,Y,ne){var le=Bp();return le=le===null?null:{parent:va._currentValue,pool:le},E.memoizedState={baseLanes:M,cachePool:le},P!==null&&Nh(E,null),$a(),zh(E),P!==null&&lf(P,E,Y,!0),E.childLanes=ne,null}function Oy(P,E){return E=Eb({mode:E.mode,children:E.children},P.mode),E.ref=P.ref,P.child=E,E.return=P,E}function sl(P,E,M){return Oc(E,P.child,null,M),P=Oy(E,E.pendingProps),P.flags|=2,Ss(E),E.memoizedState=null,P}function fL(P,E,M){var Y=E.pendingProps,ne=(E.flags&128)!==0;if(E.flags&=-129,P===null){if(bn){if(Y.mode==="hidden")return P=Oy(E,Y),E.lanes=536870912,wy(null,P);if(gf(E),(P=zn)?(P=sD(P,El),P=P!==null&&P.data==="&"?P:null,P!==null&&(E.memoizedState={dehydrated:P,treeContext:nl!==null?{id:Tl,overflow:xl}:null,retryLane:536870912,hydrationErrors:null},M=un(P),M.return=E,E.child=M,ga=E,zn=null)):P=null,P===null)throw xc(E);return E.lanes=536870912,null}return Oy(E,Y)}var le=P.memoizedState;if(le!==null){var Le=le.dehydrated;if(gf(E),ne)if(E.flags&256)E.flags&=-257,E=sl(P,E,M);else if(E.memoizedState!==null)E.child=P.child,E.flags|=128,E=null;else throw Error(n(558));else if(Ta||lf(P,E,M,!1),ne=(M&P.childLanes)!==0,Ta||ne){if(Y=Ho,Y!==null&&(Le=Xt(Y,M),Le!==0&&Le!==le.retryLane))throw le.retryLane=Le,Er(P,Le),Pu(Y,P,Le),Ey;Ib(),E=sl(P,E,M)}else P=le.treeContext,zn=kc(Le.nextSibling),ga=E,bn=!0,Tc=null,El=!1,P!==null&&af(E,P),E=Oy(E,Y),E.flags|=4096;return E}return P=il(P.child,{mode:Y.mode,children:Y.children}),P.ref=E.ref,E.child=P,P.return=E,P}function Tb(P,E){var M=E.ref;if(M===null)P!==null&&P.ref!==null&&(E.flags|=4194816);else{if(typeof M!="function"&&typeof M!="object")throw Error(n(284));(P===null||P.ref!==M)&&(E.flags|=4194816)}}function xb(P,E,M,Y,ne){return dd(E),M=Xf(P,E,M,Y,void 0,ne),Y=J(),P!==null&&!Ta?(oe(P,E,ne),yf(P,E,ne)):(bn&&Y&&Cc(E),E.flags|=1,Ia(P,E,M,ne),E.child)}function mO(P,E,M,Y,ne,le){return dd(E),E.updateQueue=null,M=Zu(E,Y,M,ne),Wh(P),Y=J(),P!==null&&!Ta?(oe(P,E,le),yf(P,E,le)):(bn&&Y&&Cc(E),E.flags|=1,Ia(P,E,M,le),E.child)}function T_(P,E,M,Y,ne){if(dd(E),E.stateNode===null){var le=Hu,Le=M.contextType;typeof Le=="object"&&Le!==null&&(le=Ya(Le)),le=new M(Y,le),E.memoizedState=le.state!==null&&le.state!==void 0?le.state:null,le.updater=Ty,E.stateNode=le,le._reactInternals=E,le=E.stateNode,le.props=Y,le.state=E.memoizedState,le.refs={},gu(E),Le=M.contextType,le.context=typeof Le=="object"&&Le!==null?Ya(Le):Hu,le.state=E.memoizedState,Le=M.getDerivedStateFromProps,typeof Le=="function"&&(Sb(E,M,Le,Y),le.state=E.memoizedState),typeof M.getDerivedStateFromProps=="function"||typeof le.getSnapshotBeforeUpdate=="function"||typeof le.UNSAFE_componentWillMount!="function"&&typeof le.componentWillMount!="function"||(Le=le.state,typeof le.componentWillMount=="function"&&le.componentWillMount(),typeof le.UNSAFE_componentWillMount=="function"&&le.UNSAFE_componentWillMount(),Le!==le.state&&Ty.enqueueReplaceState(le,le.state,null),pf(E,Y,le,ne),Rc(),le.state=E.memoizedState),typeof le.componentDidMount=="function"&&(E.flags|=4194308),Y=!0}else if(P===null){le=E.stateNode;var tt=E.memoizedProps,_t=Ql(M,tt);le.props=_t;var $t=le.context,hr=M.contextType;Le=Hu,typeof hr=="object"&&hr!==null&&(Le=Ya(hr));var mr=M.getDerivedStateFromProps;hr=typeof mr=="function"||typeof le.getSnapshotBeforeUpdate=="function",tt=E.pendingProps!==tt,hr||typeof le.UNSAFE_componentWillReceiveProps!="function"&&typeof le.componentWillReceiveProps!="function"||(tt||$t!==Le)&&b_(E,le,Y,Le),Dl=!1;var Kt=E.memoizedState;le.state=Kt,pf(E,Y,le,ne),Rc(),$t=E.memoizedState,tt||Kt!==$t||Dl?(typeof mr=="function"&&(Sb(E,M,mr,Y),$t=E.memoizedState),(_t=Dl||gO(E,M,_t,Y,Kt,$t,Le))?(hr||typeof le.UNSAFE_componentWillMount!="function"&&typeof le.componentWillMount!="function"||(typeof le.componentWillMount=="function"&&le.componentWillMount(),typeof le.UNSAFE_componentWillMount=="function"&&le.UNSAFE_componentWillMount()),typeof le.componentDidMount=="function"&&(E.flags|=4194308)):(typeof le.componentDidMount=="function"&&(E.flags|=4194308),E.memoizedProps=Y,E.memoizedState=$t),le.props=Y,le.state=$t,le.context=Le,Y=_t):(typeof le.componentDidMount=="function"&&(E.flags|=4194308),Y=!1)}else{le=E.stateNode,Vh(P,E),Le=E.memoizedProps,hr=Ql(M,Le),le.props=hr,mr=E.pendingProps,Kt=le.context,$t=M.contextType,_t=Hu,typeof $t=="object"&&$t!==null&&(_t=Ya($t)),tt=M.getDerivedStateFromProps,($t=typeof tt=="function"||typeof le.getSnapshotBeforeUpdate=="function")||typeof le.UNSAFE_componentWillReceiveProps!="function"&&typeof le.componentWillReceiveProps!="function"||(Le!==mr||Kt!==_t)&&b_(E,le,Y,_t),Dl=!1,Kt=E.memoizedState,le.state=Kt,pf(E,Y,le,ne),Rc();var tr=E.memoizedState;Le!==mr||Kt!==tr||Dl||P!==null&&P.dependencies!==null&&Ih(P.dependencies)?(typeof tt=="function"&&(Sb(E,M,tt,Y),tr=E.memoizedState),(hr=Dl||gO(E,M,hr,Y,Kt,tr,_t)||P!==null&&P.dependencies!==null&&Ih(P.dependencies))?($t||typeof le.UNSAFE_componentWillUpdate!="function"&&typeof le.componentWillUpdate!="function"||(typeof le.componentWillUpdate=="function"&&le.componentWillUpdate(Y,tr,_t),typeof le.UNSAFE_componentWillUpdate=="function"&&le.UNSAFE_componentWillUpdate(Y,tr,_t)),typeof le.componentDidUpdate=="function"&&(E.flags|=4),typeof le.getSnapshotBeforeUpdate=="function"&&(E.flags|=1024)):(typeof le.componentDidUpdate!="function"||Le===P.memoizedProps&&Kt===P.memoizedState||(E.flags|=4),typeof le.getSnapshotBeforeUpdate!="function"||Le===P.memoizedProps&&Kt===P.memoizedState||(E.flags|=1024),E.memoizedProps=Y,E.memoizedState=tr),le.props=Y,le.state=tr,le.context=_t,Y=hr):(typeof le.componentDidUpdate!="function"||Le===P.memoizedProps&&Kt===P.memoizedState||(E.flags|=4),typeof le.getSnapshotBeforeUpdate!="function"||Le===P.memoizedProps&&Kt===P.memoizedState||(E.flags|=1024),Y=!1)}return le=Y,Tb(P,E),Y=(E.flags&128)!==0,le||Y?(le=E.stateNode,M=Y&&typeof M.getDerivedStateFromError!="function"?null:le.render(),E.flags|=1,P!==null&&Y?(E.child=Oc(E,P.child,null,ne),E.child=Oc(E,null,M,ne)):Ia(P,E,M,ne),E.memoizedState=le.state,P=E.child):P=yf(P,E,ne),P}function bO(P,E,M,Y){return et(),E.flags|=256,Ia(P,E,M,Y),E.child}var x_={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function E_(P){return{baseLanes:P,cachePool:Vg()}}function vd(P,E,M){return P=P!==null?P.childLanes&~M:0,E&&(P|=Qu),P}function Ml(P,E,M){var Y=E.pendingProps,ne=!1,le=(E.flags&128)!==0,Le;if((Le=le)||(Le=P!==null&&P.memoizedState===null?!1:(na.current&2)!==0),Le&&(ne=!0,E.flags&=-129),Le=(E.flags&32)!==0,E.flags&=-33,P===null){if(bn){if(ne?qu(E):Us(),(P=zn)?(P=sD(P,El),P=P!==null&&P.data!=="&"?P:null,P!==null&&(E.memoizedState={dehydrated:P,treeContext:nl!==null?{id:Tl,overflow:xl}:null,retryLane:536870912,hydrationErrors:null},M=un(P),M.return=E,E.child=M,ga=E,zn=null)):P=null,P===null)throw xc(E);return rv(P)?E.lanes=32:E.lanes=536870912,null}var tt=Y.children;return Y=Y.fallback,ne?(Us(),ne=E.mode,tt=Eb({mode:"hidden",children:tt},ne),Y=Pc(Y,ne,M,null),tt.return=E,Y.return=E,tt.sibling=Y,E.child=tt,Y=E.child,Y.memoizedState=E_(M),Y.childLanes=vd(P,Le,M),E.memoizedState=x_,wy(null,Y)):(qu(E),Dy(E,tt))}var _t=P.memoizedState;if(_t!==null&&(tt=_t.dehydrated,tt!==null)){if(le)E.flags&256?(qu(E),E.flags&=-257,E=Ry(P,E,M)):E.memoizedState!==null?(Us(),E.child=P.child,E.flags|=128,E=null):(Us(),tt=Y.fallback,ne=E.mode,Y=Eb({mode:"visible",children:Y.children},ne),tt=Pc(tt,ne,M,null),tt.flags|=2,Y.return=E,tt.return=E,Y.sibling=tt,E.child=Y,Oc(E,P.child,null,M),Y=E.child,Y.memoizedState=E_(M),Y.childLanes=vd(P,Le,M),E.memoizedState=x_,E=wy(null,Y));else if(qu(E),rv(tt)){if(Le=tt.nextSibling&&tt.nextSibling.dataset,Le)var $t=Le.dgst;Le=$t,Y=Error(n(419)),Y.stack="",Y.digest=Le,Ac({value:Y,source:null,stack:null}),E=Ry(P,E,M)}else if(Ta||lf(P,E,M,!1),Le=(M&P.childLanes)!==0,Ta||Le){if(Le=Ho,Le!==null&&(Y=Xt(Le,M),Y!==0&&Y!==_t.retryLane))throw _t.retryLane=Y,Er(P,Y),Pu(Le,P,Y),Ey;Wb(tt)||Ib(),E=Ry(P,E,M)}else Wb(tt)?(E.flags|=192,E.child=P.child,E=null):(P=_t.treeContext,zn=kc(tt.nextSibling),ga=E,bn=!0,Tc=null,El=!1,P!==null&&af(E,P),E=Dy(E,Y.children),E.flags|=4096);return E}return ne?(Us(),tt=Y.fallback,ne=E.mode,_t=P.child,$t=_t.sibling,Y=il(_t,{mode:"hidden",children:Y.children}),Y.subtreeFlags=_t.subtreeFlags&65011712,$t!==null?tt=il($t,tt):(tt=Pc(tt,ne,M,null),tt.flags|=2),tt.return=E,Y.return=E,Y.sibling=tt,E.child=Y,wy(null,Y),Y=E.child,tt=P.child.memoizedState,tt===null?tt=E_(M):(ne=tt.cachePool,ne!==null?(_t=va._currentValue,ne=ne.parent!==_t?{parent:_t,pool:_t}:ne):ne=Vg(),tt={baseLanes:tt.baseLanes|M,cachePool:ne}),Y.memoizedState=tt,Y.childLanes=vd(P,Le,M),E.memoizedState=x_,wy(P.child,Y)):(qu(E),M=P.child,P=M.sibling,M=il(M,{mode:"visible",children:Y.children}),M.return=E,M.sibling=null,P!==null&&(Le=E.deletions,Le===null?(E.deletions=[P],E.flags|=16):Le.push(P)),E.child=M,E.memoizedState=null,M)}function Dy(P,E){return E=Eb({mode:"visible",children:E},P.mode),E.return=P,P.child=E}function Eb(P,E){return P=Wa(22,P,null,E),P.lanes=0,P}function Ry(P,E,M){return Oc(E,P.child,null,M),P=Dy(E,E.pendingProps.children),P.flags|=2,E.memoizedState=null,P}function SO(P,E,M){P.lanes|=E;var Y=P.alternate;Y!==null&&(Y.lanes|=E),Gu(P.return,E,M)}function A_(P,E,M,Y,ne,le){var Le=P.memoizedState;Le===null?P.memoizedState={isBackwards:E,rendering:null,renderingStartTime:0,last:Y,tail:M,tailMode:ne,treeForkCount:le}:(Le.isBackwards=E,Le.rendering=null,Le.renderingStartTime=0,Le.last=Y,Le.tail=M,Le.tailMode=ne,Le.treeForkCount=le)}function $g(P,E,M){var Y=E.pendingProps,ne=Y.revealOrder,le=Y.tail;Y=Y.children;var Le=na.current,tt=(Le&2)!==0;if(tt?(Le=Le&1|2,E.flags|=128):Le&=1,Z(na,Le),Ia(P,E,Y,M),Y=bn?pa:0,!tt&&P!==null&&(P.flags&128)!==0)e:for(P=E.child;P!==null;){if(P.tag===13)P.memoizedState!==null&&SO(P,M,E);else if(P.tag===19)SO(P,M,E);else if(P.child!==null){P.child.return=P,P=P.child;continue}if(P===E)break e;for(;P.sibling===null;){if(P.return===null||P.return===E)break e;P=P.return}P.sibling.return=P.return,P=P.sibling}switch(ne){case"forwards":for(M=E.child,ne=null;M!==null;)P=M.alternate,P!==null&&po(P)===null&&(ne=M),M=M.sibling;M=ne,M===null?(ne=E.child,E.child=null):(ne=M.sibling,M.sibling=null),A_(E,!1,ne,M,le,Y);break;case"backwards":case"unstable_legacy-backwards":for(M=null,ne=E.child,E.child=null;ne!==null;){if(P=ne.alternate,P!==null&&po(P)===null){E.child=ne;break}P=ne.sibling,ne.sibling=M,M=ne,ne=P}A_(E,!0,M,null,le,Y);break;case"together":A_(E,!1,null,null,void 0,Y);break;default:E.memoizedState=null}return E.child}function yf(P,E,M){if(P!==null&&(E.dependencies=P.dependencies),Kh|=E.lanes,(M&E.childLanes)===0)if(P!==null){if(lf(P,E,M,!1),(M&E.childLanes)===0)return null}else return null;if(P!==null&&E.child!==P.child)throw Error(n(153));if(E.child!==null){for(P=E.child,M=il(P,P.pendingProps),E.child=M,M.return=E;P.sibling!==null;)P=P.sibling,M=M.sibling=il(P,P.pendingProps),M.return=E;M.sibling=null}return E.child}function Ab(P,E){return(P.lanes&E)!==0?!0:(P=P.dependencies,!!(P!==null&&Ih(P)))}function hL(P,E,M){switch(E.tag){case 3:_e(E,E.stateNode.containerInfo),wc(E,va,P.memoizedState.cache),et();break;case 27:case 5:De(E);break;case 4:_e(E,E.stateNode.containerInfo);break;case 10:wc(E,E.type,E.memoizedProps.value);break;case 31:if(E.memoizedState!==null)return E.flags|=128,gf(E),null;break;case 13:var Y=E.memoizedState;if(Y!==null)return Y.dehydrated!==null?(qu(E),E.flags|=128,null):(M&E.child.childLanes)!==0?Ml(P,E,M):(qu(E),P=yf(P,E,M),P!==null?P.sibling:null);qu(E);break;case 19:var ne=(P.flags&128)!==0;if(Y=(M&E.childLanes)!==0,Y||(lf(P,E,M,!1),Y=(M&E.childLanes)!==0),ne){if(Y)return $g(P,E,M);E.flags|=128}if(ne=E.memoizedState,ne!==null&&(ne.rendering=null,ne.tail=null,ne.lastEffect=null),Z(na,na.current),Y)break;return null;case 22:return E.lanes=0,$h(P,E,M,E.pendingProps);case 24:wc(E,va,P.memoizedState.cache)}return yf(P,E,M)}function _O(P,E,M){if(P!==null)if(P.memoizedProps!==E.pendingProps)Ta=!0;else{if(!Ab(P,M)&&(E.flags&128)===0)return Ta=!1,hL(P,E,M);Ta=(P.flags&131072)!==0}else Ta=!1,bn&&(E.flags&1048576)!==0&&kh(E,pa,E.index);switch(E.lanes=0,E.tag){case 16:e:{var Y=E.pendingProps;if(P=Ol(E.elementType),E.type=P,typeof P=="function")Uu(P)?(Y=Ql(P,Y),E.tag=1,E=T_(null,E,P,Y,M)):(E.tag=0,E=xb(null,E,P,Y,M));else{if(P!=null){var ne=P.$$typeof;if(ne===S){E.tag=11,E=Ei(null,E,P,Y,M);break e}else if(ne===T){E.tag=14,E=Ay(null,E,P,Y,M);break e}}throw E=j(P)||P,Error(n(306,E,""))}}return E;case 0:return xb(P,E,E.type,E.pendingProps,M);case 1:return Y=E.type,ne=Ql(Y,E.pendingProps),T_(P,E,Y,ne,M);case 3:e:{if(_e(E,E.stateNode.containerInfo),P===null)throw Error(n(387));Y=E.pendingProps;var le=E.memoizedState;ne=le.element,Vh(P,E),pf(E,Y,null,M);var Le=E.memoizedState;if(Y=Le.cache,wc(E,va,Y),Y!==le.cache&&Fp(E,[va],M,!0),Rc(),Y=Le.element,le.isDehydrated)if(le={element:Y,isDehydrated:!1,cache:Le.cache},E.updateQueue.baseState=le,E.memoizedState=le,E.flags&256){E=bO(P,E,Y,M);break e}else if(Y!==ne){ne=Fs(Error(n(424)),E),Ac(ne),E=bO(P,E,Y,M);break e}else{switch(P=E.stateNode.containerInfo,P.nodeType){case 9:P=P.body;break;default:P=P.nodeName==="HTML"?P.ownerDocument.body:P}for(zn=kc(P.firstChild),ga=E,bn=!0,Tc=null,El=!0,M=Bh(E,null,Y,M),E.child=M;M;)M.flags=M.flags&-3|4096,M=M.sibling}else{if(et(),Y===ne){E=yf(P,E,M);break e}Ia(P,E,Y,M)}E=E.child}return E;case 26:return Tb(P,E),P===null?(M=hD(E.type,null,E.pendingProps,null))?E.memoizedState=M:bn||(M=E.type,P=E.pendingProps,Y=Zy(de.current).createElement(M),Y[vt]=E,Y[dr]=P,ll(Y,M,P),ti(Y),E.stateNode=Y):E.memoizedState=hD(E.type,P.memoizedProps,E.pendingProps,P.memoizedState),null;case 27:return De(E),P===null&&bn&&(Y=E.stateNode=cD(E.type,E.pendingProps,de.current),ga=E,El=!0,ne=zn,Ni(E.type)?(cP=ne,zn=kc(Y.firstChild)):zn=ne),Ia(P,E,E.pendingProps.children,M),Tb(P,E),P===null&&(E.flags|=4194304),E.child;case 5:return P===null&&bn&&((ne=Y=zn)&&(Y=OL(Y,E.type,E.pendingProps,El),Y!==null?(E.stateNode=Y,ga=E,zn=kc(Y.firstChild),El=!1,ne=!0):ne=!1),ne||xc(E)),De(E),ne=E.type,le=E.pendingProps,Le=P!==null?P.memoizedProps:null,Y=le.children,tp(ne,le)?Y=null:Le!==null&&tp(ne,Le)&&(E.flags|=32),E.memoizedState!==null&&(ne=Xf(P,E,z,null,null,M),lv._currentValue=ne),Tb(P,E),Ia(P,E,Y,M),E.child;case 6:return P===null&&bn&&((P=M=zn)&&(M=vo(M,E.pendingProps,El),M!==null?(E.stateNode=M,ga=E,zn=null,P=!0):P=!1),P||xc(E)),null;case 13:return Ml(P,E,M);case 4:return _e(E,E.stateNode.containerInfo),Y=E.pendingProps,P===null?E.child=Oc(E,null,Y,M):Ia(P,E,Y,M),E.child;case 11:return Ei(P,E,E.type,E.pendingProps,M);case 7:return Ia(P,E,E.pendingProps,M),E.child;case 8:return Ia(P,E,E.pendingProps.children,M),E.child;case 12:return Ia(P,E,E.pendingProps.children,M),E.child;case 10:return Y=E.pendingProps,wc(E,E.type,Y.value),Ia(P,E,Y.children,M),E.child;case 9:return ne=E.type._context,Y=E.pendingProps.children,dd(E),ne=Ya(ne),Y=Y(ne),E.flags|=1,Ia(P,E,Y,M),E.child;case 14:return Ay(P,E,E.type,E.pendingProps,M);case 15:return Pb(P,E,E.type,E.pendingProps,M);case 19:return $g(P,E,M);case 31:return fL(P,E,M);case 22:return $h(P,E,M,E.pendingProps);case 24:return dd(E),Y=Ya(va),P===null?(ne=Bp(),ne===null&&(ne=Ho,le=Kl(),ne.pooledCache=le,le.refCount++,le!==null&&(ne.pooledCacheLanes|=M),ne=le),E.memoizedState={parent:Y,cache:ne},gu(E),wc(E,va,ne)):((P.lanes&M)!==0&&(Vh(P,E),pf(E,null,null,M),Rc()),ne=P.memoizedState,le=E.memoizedState,ne.parent!==Y?(ne={parent:Y,cache:Y},E.memoizedState=ne,E.lanes===0&&(E.memoizedState=E.updateQueue.baseState=ne),wc(E,va,Y)):(Y=le.cache,wc(E,va,Y),Y!==ne.cache&&Fp(E,[va],M,!0))),Ia(P,E,E.pendingProps.children,M),E.child;case 29:throw E.pendingProps}throw Error(n(156,E.tag))}function Kf(P){P.flags|=4}function w_(P,E,M,Y,ne){if((E=(P.mode&32)!==0)&&(E=!1),E){if(P.flags|=16777216,(ne&335544128)===ne)if(P.stateNode.complete)P.flags|=8192;else if(Uy())P.flags|=8192;else throw pu=$f,Fh}else P.flags&=-16777217}function O_(P,E){if(E.type!=="stylesheet"||(E.state.loading&4)!==0)P.flags&=-16777217;else if(P.flags|=16777216,!mD(E))if(Uy())P.flags|=8192;else throw pu=$f,Fh}function My(P,E){E!==null&&(P.flags|=4),P.flags&16384&&(E=P.tag!==22?wr():536870912,P.lanes|=E,Zg|=E)}function Ly(P,E){if(!bn)switch(P.tailMode){case"hidden":E=P.tail;for(var M=null;E!==null;)E.alternate!==null&&(M=E),E=E.sibling;M===null?P.tail=null:M.sibling=null;break;case"collapsed":M=P.tail;for(var Y=null;M!==null;)M.alternate!==null&&(Y=M),M=M.sibling;Y===null?E||P.tail===null?P.tail=null:P.tail.sibling=null:Y.sibling=null}}function Vo(P){var E=P.alternate!==null&&P.alternate.child===P.child,M=0,Y=0;if(E)for(var ne=P.child;ne!==null;)M|=ne.lanes|ne.childLanes,Y|=ne.subtreeFlags&65011712,Y|=ne.flags&65011712,ne.return=P,ne=ne.sibling;else for(ne=P.child;ne!==null;)M|=ne.lanes|ne.childLanes,Y|=ne.subtreeFlags,Y|=ne.flags,ne.return=P,ne=ne.sibling;return P.subtreeFlags|=Y,P.childLanes=M,E}function PO(P,E,M){var Y=E.pendingProps;switch(ud(E),E.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Vo(E),null;case 1:return Vo(E),null;case 3:return M=E.stateNode,Y=null,P!==null&&(Y=P.memoizedState.cache),E.memoizedState.cache!==Y&&(E.flags|=2048),Wu(va),Te(),M.pendingContext&&(M.context=M.pendingContext,M.pendingContext=null),(P===null||P.child===null)&&(cd(E)?Kf(E):P===null||P.memoizedState.isDehydrated&&(E.flags&256)===0||(E.flags|=1024,Ec())),Vo(E),null;case 26:var ne=E.type,le=E.memoizedState;return P===null?(Kf(E),le!==null?(Vo(E),O_(E,le)):(Vo(E),w_(E,ne,null,Y,M))):le?le!==P.memoizedState?(Kf(E),Vo(E),O_(E,le)):(Vo(E),E.flags&=-16777217):(P=P.memoizedProps,P!==Y&&Kf(E),Vo(E),w_(E,ne,P,Y,M)),null;case 27:if(Pe(E),M=de.current,ne=E.type,P!==null&&E.stateNode!=null)P.memoizedProps!==Y&&Kf(E);else{if(!Y){if(E.stateNode===null)throw Error(n(166));return Vo(E),null}P=ee.current,cd(E)?zf(E):(P=cD(ne,Y,M),E.stateNode=P,Kf(E))}return Vo(E),null;case 5:if(Pe(E),ne=E.type,P!==null&&E.stateNode!=null)P.memoizedProps!==Y&&Kf(E);else{if(!Y){if(E.stateNode===null)throw Error(n(166));return Vo(E),null}if(le=ee.current,cd(E))zf(E);else{var Le=Zy(de.current);switch(le){case 1:le=Le.createElementNS("http://www.w3.org/2000/svg",ne);break;case 2:le=Le.createElementNS("http://www.w3.org/1998/Math/MathML",ne);break;default:switch(ne){case"svg":le=Le.createElementNS("http://www.w3.org/2000/svg",ne);break;case"math":le=Le.createElementNS("http://www.w3.org/1998/Math/MathML",ne);break;case"script":le=Le.createElement("div"),le.innerHTML="<script><\/script>",le=le.removeChild(le.firstChild);break;case"select":le=typeof Y.is=="string"?Le.createElement("select",{is:Y.is}):Le.createElement("select"),Y.multiple?le.multiple=!0:Y.size&&(le.size=Y.size);break;default:le=typeof Y.is=="string"?Le.createElement(ne,{is:Y.is}):Le.createElement(ne)}}le[vt]=E,le[dr]=Y;e:for(Le=E.child;Le!==null;){if(Le.tag===5||Le.tag===6)le.appendChild(Le.stateNode);else if(Le.tag!==4&&Le.tag!==27&&Le.child!==null){Le.child.return=Le,Le=Le.child;continue}if(Le===E)break e;for(;Le.sibling===null;){if(Le.return===null||Le.return===E)break e;Le=Le.return}Le.sibling.return=Le.return,Le=Le.sibling}E.stateNode=le;e:switch(ll(le,ne,Y),ne){case"button":case"input":case"select":case"textarea":Y=!!Y.autoFocus;break e;case"img":Y=!0;break e;default:Y=!1}Y&&Kf(E)}}return Vo(E),w_(E,E.type,P===null?null:P.memoizedProps,E.pendingProps,M),null;case 6:if(P&&E.stateNode!=null)P.memoizedProps!==Y&&Kf(E);else{if(typeof Y!="string"&&E.stateNode===null)throw Error(n(166));if(P=de.current,cd(E)){if(P=E.stateNode,M=E.memoizedProps,Y=null,ne=ga,ne!==null)switch(ne.tag){case 27:case 5:Y=ne.memoizedProps}P[vt]=E,P=!!(P.nodeValue===M||Y!==null&&Y.suppressHydrationWarning===!0||iD(P.nodeValue,M)),P||xc(E,!0)}else P=Zy(P).createTextNode(Y),P[vt]=E,E.stateNode=P}return Vo(E),null;case 31:if(M=E.memoizedState,P===null||P.memoizedState!==null){if(Y=cd(E),M!==null){if(P===null){if(!Y)throw Error(n(318));if(P=E.memoizedState,P=P!==null?P.dehydrated:null,!P)throw Error(n(557));P[vt]=E}else et(),(E.flags&128)===0&&(E.memoizedState=null),E.flags|=4;Vo(E),P=!1}else M=Ec(),P!==null&&P.memoizedState!==null&&(P.memoizedState.hydrationErrors=M),P=!0;if(!P)return E.flags&256?(Ss(E),E):(Ss(E),null);if((E.flags&128)!==0)throw Error(n(558))}return Vo(E),null;case 13:if(Y=E.memoizedState,P===null||P.memoizedState!==null&&P.memoizedState.dehydrated!==null){if(ne=cd(E),Y!==null&&Y.dehydrated!==null){if(P===null){if(!ne)throw Error(n(318));if(ne=E.memoizedState,ne=ne!==null?ne.dehydrated:null,!ne)throw Error(n(317));ne[vt]=E}else et(),(E.flags&128)===0&&(E.memoizedState=null),E.flags|=4;Vo(E),ne=!1}else ne=Ec(),P!==null&&P.memoizedState!==null&&(P.memoizedState.hydrationErrors=ne),ne=!0;if(!ne)return E.flags&256?(Ss(E),E):(Ss(E),null)}return Ss(E),(E.flags&128)!==0?(E.lanes=M,E):(M=Y!==null,P=P!==null&&P.memoizedState!==null,M&&(Y=E.child,ne=null,Y.alternate!==null&&Y.alternate.memoizedState!==null&&Y.alternate.memoizedState.cachePool!==null&&(ne=Y.alternate.memoizedState.cachePool.pool),le=null,Y.memoizedState!==null&&Y.memoizedState.cachePool!==null&&(le=Y.memoizedState.cachePool.pool),le!==ne&&(Y.flags|=2048)),M!==P&&M&&(E.child.flags|=8192),My(E,E.updateQueue),Vo(E),null);case 4:return Te(),P===null&&iP(E.stateNode.containerInfo),Vo(E),null;case 10:return Wu(E.type),Vo(E),null;case 19:if(Q(na),Y=E.memoizedState,Y===null)return Vo(E),null;if(ne=(E.flags&128)!==0,le=Y.rendering,le===null)if(ne)Ly(Y,!1);else{if(xa!==0||P!==null&&(P.flags&128)!==0)for(P=E.child;P!==null;){if(le=po(P),le!==null){for(E.flags|=128,Ly(Y,!1),P=le.updateQueue,E.updateQueue=P,My(E,P),E.subtreeFlags=0,P=M,M=E.child;M!==null;)Sr(M,P),M=M.sibling;return Z(na,na.current&1|2),bn&&Ga(E,Y.treeForkCount),E.child}P=P.sibling}Y.tail!==null&&qe()>Gp&&(E.flags|=128,ne=!0,Ly(Y,!1),E.lanes=4194304)}else{if(!ne)if(P=po(le),P!==null){if(E.flags|=128,ne=!0,P=P.updateQueue,E.updateQueue=P,My(E,P),Ly(Y,!0),Y.tail===null&&Y.tailMode==="hidden"&&!le.alternate&&!bn)return Vo(E),null}else 2*qe()-Y.renderingStartTime>Gp&&M!==536870912&&(E.flags|=128,ne=!0,Ly(Y,!1),E.lanes=4194304);Y.isBackwards?(le.sibling=E.child,E.child=le):(P=Y.last,P!==null?P.sibling=le:E.child=le,Y.last=le)}return Y.tail!==null?(P=Y.tail,Y.rendering=P,Y.tail=P.sibling,Y.renderingStartTime=qe(),P.sibling=null,M=na.current,Z(na,ne?M&1|2:M&1),bn&&Ga(E,Y.treeForkCount),P):(Vo(E),null);case 22:case 23:return Ss(E),qf(),Y=E.memoizedState!==null,P!==null?P.memoizedState!==null!==Y&&(E.flags|=8192):Y&&(E.flags|=8192),Y?(M&536870912)!==0&&(E.flags&128)===0&&(Vo(E),E.subtreeFlags&6&&(E.flags|=8192)):Vo(E),M=E.updateQueue,M!==null&&My(E,M.retryQueue),M=null,P!==null&&P.memoizedState!==null&&P.memoizedState.cachePool!==null&&(M=P.memoizedState.cachePool.pool),Y=null,E.memoizedState!==null&&E.memoizedState.cachePool!==null&&(Y=E.memoizedState.cachePool.pool),Y!==M&&(E.flags|=2048),P!==null&&Q(hd),null;case 24:return M=null,P!==null&&(M=P.memoizedState.cache),E.memoizedState.cache!==M&&(E.flags|=2048),Wu(va),Vo(E),null;case 25:return null;case 30:return null}throw Error(n(156,E.tag))}function ky(P,E){switch(ud(E),E.tag){case 1:return P=E.flags,P&65536?(E.flags=P&-65537|128,E):null;case 3:return Wu(va),Te(),P=E.flags,(P&65536)!==0&&(P&128)===0?(E.flags=P&-65537|128,E):null;case 26:case 27:case 5:return Pe(E),null;case 31:if(E.memoizedState!==null){if(Ss(E),E.alternate===null)throw Error(n(340));et()}return P=E.flags,P&65536?(E.flags=P&-65537|128,E):null;case 13:if(Ss(E),P=E.memoizedState,P!==null&&P.dehydrated!==null){if(E.alternate===null)throw Error(n(340));et()}return P=E.flags,P&65536?(E.flags=P&-65537|128,E):null;case 19:return Q(na),null;case 4:return Te(),null;case 10:return Wu(E.type),null;case 22:case 23:return Ss(E),qf(),P!==null&&Q(hd),P=E.flags,P&65536?(E.flags=P&-65537|128,E):null;case 24:return Wu(va),null;case 25:return null;default:return null}}function wb(P,E){switch(ud(E),E.tag){case 3:Wu(va),Te();break;case 26:case 27:case 5:Pe(E);break;case 4:Te();break;case 31:E.memoizedState!==null&&Ss(E);break;case 13:Ss(E);break;case 19:Q(na);break;case 10:Wu(E.type);break;case 22:case 23:Ss(E),qf(),P!==null&&Q(hd);break;case 24:Wu(va)}}function qg(P,E){try{var M=E.updateQueue,Y=M!==null?M.lastEffect:null;if(Y!==null){var ne=Y.next;M=ne;do{if((M.tag&P)===P){Y=void 0;var le=M.create,Le=M.inst;Y=le(),Le.destroy=Y}M=M.next}while(M!==ne)}}catch(tt){Co(E,E.return,tt)}}function Zf(P,E,M){try{var Y=E.updateQueue,ne=Y!==null?Y.lastEffect:null;if(ne!==null){var le=ne.next;Y=le;do{if((Y.tag&P)===P){var Le=Y.inst,tt=Le.destroy;if(tt!==void 0){Le.destroy=void 0,ne=E;var _t=M,$t=tt;try{$t()}catch(hr){Co(ne,_t,hr)}}}Y=Y.next}while(Y!==le)}}catch(hr){Co(E,E.return,hr)}}function Iy(P){var E=P.updateQueue;if(E!==null){var M=P.stateNode;try{Uh(E,M)}catch(Y){Co(P,P.return,Y)}}}function D_(P,E,M){M.props=Ql(P.type,P.memoizedProps),M.state=P.memoizedState;try{M.componentWillUnmount()}catch(Y){Co(P,E,Y)}}function mu(P,E){try{var M=P.ref;if(M!==null){switch(P.tag){case 26:case 27:case 5:var Y=P.stateNode;break;case 30:Y=P.stateNode;break;default:Y=P.stateNode}typeof M=="function"?P.refCleanup=M(Y):M.current=Y}}catch(ne){Co(P,E,ne)}}function Ll(P,E){var M=P.ref,Y=P.refCleanup;if(M!==null)if(typeof Y=="function")try{Y()}catch(ne){Co(P,E,ne)}finally{P.refCleanup=null,P=P.alternate,P!=null&&(P.refCleanup=null)}else if(typeof M=="function")try{M(null)}catch(ne){Co(P,E,ne)}else M.current=null}function CO(P){var E=P.type,M=P.memoizedProps,Y=P.stateNode;try{e:switch(E){case"button":case"input":case"select":case"textarea":M.autoFocus&&Y.focus();break e;case"img":M.src?Y.src=M.src:M.srcSet&&(Y.srcset=M.srcSet)}}catch(ne){Co(P,P.return,ne)}}function Ob(P,E,M){try{var Y=P.stateNode;EL(Y,P.type,M,E),Y[dr]=E}catch(ne){Co(P,P.return,ne)}}function TO(P){return P.tag===5||P.tag===3||P.tag===26||P.tag===27&&Ni(P.type)||P.tag===4}function R_(P){e:for(;;){for(;P.sibling===null;){if(P.return===null||TO(P.return))return null;P=P.return}for(P.sibling.return=P.return,P=P.sibling;P.tag!==5&&P.tag!==6&&P.tag!==18;){if(P.tag===27&&Ni(P.type)||P.flags&2||P.child===null||P.tag===4)continue e;P.child.return=P,P=P.child}if(!(P.flags&2))return P.stateNode}}function M_(P,E,M){var Y=P.tag;if(Y===5||Y===6)P=P.stateNode,E?(M.nodeType===9?M.body:M.nodeName==="HTML"?M.ownerDocument.body:M).insertBefore(P,E):(E=M.nodeType===9?M.body:M.nodeName==="HTML"?M.ownerDocument.body:M,E.appendChild(P),M=M._reactRootContainer,M!=null||E.onclick!==null||(E.onclick=ra));else if(Y!==4&&(Y===27&&Ni(P.type)&&(M=P.stateNode,E=null),P=P.child,P!==null))for(M_(P,E,M),P=P.sibling;P!==null;)M_(P,E,M),P=P.sibling}function Db(P,E,M){var Y=P.tag;if(Y===5||Y===6)P=P.stateNode,E?M.insertBefore(P,E):M.appendChild(P);else if(Y!==4&&(Y===27&&Ni(P.type)&&(M=P.stateNode),P=P.child,P!==null))for(Db(P,E,M),P=P.sibling;P!==null;)Db(P,E,M),P=P.sibling}function xO(P){var E=P.stateNode,M=P.memoizedProps;try{for(var Y=P.type,ne=E.attributes;ne.length;)E.removeAttributeNode(ne[0]);ll(E,Y,M),E[vt]=P,E[dr]=M}catch(le){Co(P,P.return,le)}}var Jf=!1,us=!1,L_=!1,EO=typeof WeakSet=="function"?WeakSet:Set,Gs=null;function pL(P,E){if(P=P.containerInfo,Ky=Zb,P=Me(P),Ne(P)){if("selectionStart"in P)var M={start:P.selectionStart,end:P.selectionEnd};else e:{M=(M=P.ownerDocument)&&M.defaultView||window;var Y=M.getSelection&&M.getSelection();if(Y&&Y.rangeCount!==0){M=Y.anchorNode;var ne=Y.anchorOffset,le=Y.focusNode;Y=Y.focusOffset;try{M.nodeType,le.nodeType}catch{M=null;break e}var Le=0,tt=-1,_t=-1,$t=0,hr=0,mr=P,Kt=null;t:for(;;){for(var tr;mr!==M||ne!==0&&mr.nodeType!==3||(tt=Le+ne),mr!==le||Y!==0&&mr.nodeType!==3||(_t=Le+Y),mr.nodeType===3&&(Le+=mr.nodeValue.length),(tr=mr.firstChild)!==null;)Kt=mr,mr=tr;for(;;){if(mr===P)break t;if(Kt===M&&++$t===ne&&(tt=Le),Kt===le&&++hr===Y&&(_t=Le),(tr=mr.nextSibling)!==null)break;mr=Kt,Kt=mr.parentNode}mr=tr}M=tt===-1||_t===-1?null:{start:tt,end:_t}}else M=null}M=M||{start:0,end:0}}else M=null;for(sP={focusedElem:P,selectionRange:M},Zb=!1,Gs=E;Gs!==null;)if(E=Gs,P=E.child,(E.subtreeFlags&1028)!==0&&P!==null)P.return=E,Gs=P;else for(;Gs!==null;){switch(E=Gs,le=E.alternate,P=E.flags,E.tag){case 0:if((P&4)!==0&&(P=E.updateQueue,P=P!==null?P.events:null,P!==null))for(M=0;M<P.length;M++)ne=P[M],ne.ref.impl=ne.nextImpl;break;case 11:case 15:break;case 1:if((P&1024)!==0&&le!==null){P=void 0,M=E,ne=le.memoizedProps,le=le.memoizedState,Y=M.stateNode;try{var ri=Ql(M.type,ne);P=Y.getSnapshotBeforeUpdate(ri,le),Y.__reactInternalSnapshotBeforeUpdate=P}catch(Oi){Co(M,M.return,Oi)}}break;case 3:if((P&1024)!==0){if(P=E.stateNode.containerInfo,M=P.nodeType,M===9)zb(P);else if(M===1)switch(P.nodeName){case"HEAD":case"HTML":case"BODY":zb(P);break;default:P.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((P&1024)!==0)throw Error(n(163))}if(P=E.sibling,P!==null){P.return=E.return,Gs=P;break}Gs=E.return}}function k_(P,E,M){var Y=M.flags;switch(M.tag){case 0:case 11:case 15:eh(P,M),Y&4&&qg(5,M);break;case 1:if(eh(P,M),Y&4)if(P=M.stateNode,E===null)try{P.componentDidMount()}catch(Le){Co(M,M.return,Le)}else{var ne=Ql(M.type,E.memoizedProps);E=E.memoizedState;try{P.componentDidUpdate(ne,E,P.__reactInternalSnapshotBeforeUpdate)}catch(Le){Co(M,M.return,Le)}}Y&64&&Iy(M),Y&512&&mu(M,M.return);break;case 3:if(eh(P,M),Y&64&&(P=M.updateQueue,P!==null)){if(E=null,M.child!==null)switch(M.child.tag){case 27:case 5:E=M.child.stateNode;break;case 1:E=M.child.stateNode}try{Uh(P,E)}catch(Le){Co(M,M.return,Le)}}break;case 27:E===null&&Y&4&&xO(M);case 26:case 5:eh(P,M),E===null&&Y&4&&CO(M),Y&512&&mu(M,M.return);break;case 12:eh(P,M);break;case 31:eh(P,M),Y&4&&N_(P,M);break;case 13:eh(P,M),Y&4&&wO(P,M),Y&64&&(P=M.memoizedState,P!==null&&(P=P.dehydrated,P!==null&&(M=jb.bind(null,M),DL(P,M))));break;case 22:if(Y=M.memoizedState!==null||Jf,!Y){E=E!==null&&E.memoizedState!==null||us,ne=Jf;var le=us;Jf=Y,(us=E)&&!le?mf(P,M,(M.subtreeFlags&8772)!==0):eh(P,M),Jf=ne,us=le}break;case 30:break;default:eh(P,M)}}function I_(P){var E=P.alternate;E!==null&&(P.alternate=null,I_(E)),P.child=null,P.deletions=null,P.sibling=null,P.tag===5&&(E=P.stateNode,E!==null&&ai(E)),P.stateNode=null,P.return=null,P.dependencies=null,P.memoizedProps=null,P.memoizedState=null,P.pendingProps=null,P.stateNode=null,P.updateQueue=null}var oa=null,bu=!1;function Qf(P,E,M){for(M=M.child;M!==null;)AO(P,E,M),M=M.sibling}function AO(P,E,M){if(Xe&&typeof Xe.onCommitFiberUnmount=="function")try{Xe.onCommitFiberUnmount(Gt,M)}catch{}switch(M.tag){case 26:us||Ll(M,E),Qf(P,E,M),M.memoizedState?M.memoizedState.count--:M.stateNode&&(M=M.stateNode,M.parentNode.removeChild(M));break;case 27:us||Ll(M,E);var Y=oa,ne=bu;Ni(M.type)&&(oa=M.stateNode,bu=!1),Qf(P,E,M),Qy(M.stateNode),oa=Y,bu=ne;break;case 5:us||Ll(M,E);case 6:if(Y=oa,ne=bu,oa=null,Qf(P,E,M),oa=Y,bu=ne,oa!==null)if(bu)try{(oa.nodeType===9?oa.body:oa.nodeName==="HTML"?oa.ownerDocument.body:oa).removeChild(M.stateNode)}catch(le){Co(M,E,le)}else try{oa.removeChild(M.stateNode)}catch(le){Co(M,E,le)}break;case 18:oa!==null&&(bu?(P=oa,uP(P.nodeType===9?P.body:P.nodeName==="HTML"?P.ownerDocument.body:P,M.stateNode),cv(P)):uP(oa,M.stateNode));break;case 4:Y=oa,ne=bu,oa=M.stateNode.containerInfo,bu=!0,Qf(P,E,M),oa=Y,bu=ne;break;case 0:case 11:case 14:case 15:Zf(2,M,E),us||Zf(4,M,E),Qf(P,E,M);break;case 1:us||(Ll(M,E),Y=M.stateNode,typeof Y.componentWillUnmount=="function"&&D_(M,E,Y)),Qf(P,E,M);break;case 21:Qf(P,E,M);break;case 22:us=(Y=us)||M.memoizedState!==null,Qf(P,E,M),us=Y;break;default:Qf(P,E,M)}}function N_(P,E){if(E.memoizedState===null&&(P=E.alternate,P!==null&&(P=P.memoizedState,P!==null))){P=P.dehydrated;try{cv(P)}catch(M){Co(E,E.return,M)}}}function wO(P,E){if(E.memoizedState===null&&(P=E.alternate,P!==null&&(P=P.memoizedState,P!==null&&(P=P.dehydrated,P!==null))))try{cv(P)}catch(M){Co(E,E.return,M)}}function gL(P){switch(P.tag){case 31:case 13:case 19:var E=P.stateNode;return E===null&&(E=P.stateNode=new EO),E;case 22:return P=P.stateNode,E=P._retryCache,E===null&&(E=P._retryCache=new EO),E;default:throw Error(n(435,P.tag))}}function Rb(P,E){var M=gL(P);E.forEach(function(Y){if(!M.has(Y)){M.add(Y);var ne=PL.bind(null,P,Y);Y.then(ne,ne)}})}function Su(P,E){var M=E.deletions;if(M!==null)for(var Y=0;Y<M.length;Y++){var ne=M[Y],le=P,Le=E,tt=Le;e:for(;tt!==null;){switch(tt.tag){case 27:if(Ni(tt.type)){oa=tt.stateNode,bu=!1;break e}break;case 5:oa=tt.stateNode,bu=!1;break e;case 3:case 4:oa=tt.stateNode.containerInfo,bu=!0;break e}tt=tt.return}if(oa===null)throw Error(n(160));AO(le,Le,ne),oa=null,bu=!1,le=ne.alternate,le!==null&&(le.return=null),ne.return=null}if(E.subtreeFlags&13886)for(E=E.child;E!==null;)OO(E,P),E=E.sibling}var yd=null;function OO(P,E){var M=P.alternate,Y=P.flags;switch(P.tag){case 0:case 11:case 14:case 15:Su(E,P),aa(P),Y&4&&(Zf(3,P,P.return),qg(3,P),Zf(5,P,P.return));break;case 1:Su(E,P),aa(P),Y&512&&(us||M===null||Ll(M,M.return)),Y&64&&Jf&&(P=P.updateQueue,P!==null&&(Y=P.callbacks,Y!==null&&(M=P.shared.hiddenCallbacks,P.shared.hiddenCallbacks=M===null?Y:M.concat(Y))));break;case 26:var ne=yd;if(Su(E,P),aa(P),Y&512&&(us||M===null||Ll(M,M.return)),Y&4){var le=M!==null?M.memoizedState:null;if(Y=P.memoizedState,M===null)if(Y===null)if(P.stateNode===null){e:{Y=P.type,M=P.memoizedProps,ne=ne.ownerDocument||ne;t:switch(Y){case"title":le=ne.getElementsByTagName("title")[0],(!le||le[Br]||le[vt]||le.namespaceURI==="http://www.w3.org/2000/svg"||le.hasAttribute("itemprop"))&&(le=ne.createElement(Y),ne.head.insertBefore(le,ne.querySelector("head > title"))),ll(le,Y,M),le[vt]=P,ti(le),Y=le;break e;case"link":var Le=vD("link","href",ne).get(Y+(M.href||""));if(Le){for(var tt=0;tt<Le.length;tt++)if(le=Le[tt],le.getAttribute("href")===(M.href==null||M.href===""?null:M.href)&&le.getAttribute("rel")===(M.rel==null?null:M.rel)&&le.getAttribute("title")===(M.title==null?null:M.title)&&le.getAttribute("crossorigin")===(M.crossOrigin==null?null:M.crossOrigin)){Le.splice(tt,1);break t}}le=ne.createElement(Y),ll(le,Y,M),ne.head.appendChild(le);break;case"meta":if(Le=vD("meta","content",ne).get(Y+(M.content||""))){for(tt=0;tt<Le.length;tt++)if(le=Le[tt],le.getAttribute("content")===(M.content==null?null:""+M.content)&&le.getAttribute("name")===(M.name==null?null:M.name)&&le.getAttribute("property")===(M.property==null?null:M.property)&&le.getAttribute("http-equiv")===(M.httpEquiv==null?null:M.httpEquiv)&&le.getAttribute("charset")===(M.charSet==null?null:M.charSet)){Le.splice(tt,1);break t}}le=ne.createElement(Y),ll(le,Y,M),ne.head.appendChild(le);break;default:throw Error(n(468,Y))}le[vt]=P,ti(le),Y=le}P.stateNode=Y}else yD(ne,P.type,P.stateNode);else P.stateNode=gD(ne,Y,P.memoizedProps);else le!==Y?(le===null?M.stateNode!==null&&(M=M.stateNode,M.parentNode.removeChild(M)):le.count--,Y===null?yD(ne,P.type,P.stateNode):gD(ne,Y,P.memoizedProps)):Y===null&&P.stateNode!==null&&Ob(P,P.memoizedProps,M.memoizedProps)}break;case 27:Su(E,P),aa(P),Y&512&&(us||M===null||Ll(M,M.return)),M!==null&&Y&4&&Ob(P,P.memoizedProps,M.memoizedProps);break;case 5:if(Su(E,P),aa(P),Y&512&&(us||M===null||Ll(M,M.return)),P.flags&32){ne=P.stateNode;try{Fo(ne,"")}catch(ri){Co(P,P.return,ri)}}Y&4&&P.stateNode!=null&&(ne=P.memoizedProps,Ob(P,ne,M!==null?M.memoizedProps:ne)),Y&1024&&(L_=!0);break;case 6:if(Su(E,P),aa(P),Y&4){if(P.stateNode===null)throw Error(n(162));Y=P.memoizedProps,M=P.stateNode;try{M.nodeValue=Y}catch(ri){Co(P,P.return,ri)}}break;case 3:if(em=null,ne=yd,yd=Gb(E.containerInfo),Su(E,P),yd=ne,aa(P),Y&4&&M!==null&&M.memoizedState.isDehydrated)try{cv(E.containerInfo)}catch(ri){Co(P,P.return,ri)}L_&&(L_=!1,DO(P));break;case 4:Y=yd,yd=Gb(P.stateNode.containerInfo),Su(E,P),aa(P),yd=Y;break;case 12:Su(E,P),aa(P);break;case 31:Su(E,P),aa(P),Y&4&&(Y=P.updateQueue,Y!==null&&(P.updateQueue=null,Rb(P,Y)));break;case 13:Su(E,P),aa(P),P.child.flags&8192&&P.memoizedState!==null!=(M!==null&&M.memoizedState!==null)&&(Vy=qe()),Y&4&&(Y=P.updateQueue,Y!==null&&(P.updateQueue=null,Rb(P,Y)));break;case 22:ne=P.memoizedState!==null;var _t=M!==null&&M.memoizedState!==null,$t=Jf,hr=us;if(Jf=$t||ne,us=hr||_t,Su(E,P),us=hr,Jf=$t,aa(P),Y&8192)e:for(E=P.stateNode,E._visibility=ne?E._visibility&-2:E._visibility|1,ne&&(M===null||_t||Jf||us||zp(P)),M=null,E=P;;){if(E.tag===5||E.tag===26){if(M===null){_t=M=E;try{if(le=_t.stateNode,ne)Le=le.style,typeof Le.setProperty=="function"?Le.setProperty("display","none","important"):Le.display="none";else{tt=_t.stateNode;var mr=_t.memoizedProps.style,Kt=mr!=null&&mr.hasOwnProperty("display")?mr.display:null;tt.style.display=Kt==null||typeof Kt=="boolean"?"":(""+Kt).trim()}}catch(ri){Co(_t,_t.return,ri)}}}else if(E.tag===6){if(M===null){_t=E;try{_t.stateNode.nodeValue=ne?"":_t.memoizedProps}catch(ri){Co(_t,_t.return,ri)}}}else if(E.tag===18){if(M===null){_t=E;try{var tr=_t.stateNode;ne?ic(tr,!0):ic(_t.stateNode,!1)}catch(ri){Co(_t,_t.return,ri)}}}else if((E.tag!==22&&E.tag!==23||E.memoizedState===null||E===P)&&E.child!==null){E.child.return=E,E=E.child;continue}if(E===P)break e;for(;E.sibling===null;){if(E.return===null||E.return===P)break e;M===E&&(M=null),E=E.return}M===E&&(M=null),E.sibling.return=E.return,E=E.sibling}Y&4&&(Y=P.updateQueue,Y!==null&&(M=Y.retryQueue,M!==null&&(Y.retryQueue=null,Rb(P,M))));break;case 19:Su(E,P),aa(P),Y&4&&(Y=P.updateQueue,Y!==null&&(P.updateQueue=null,Rb(P,Y)));break;case 30:break;case 21:break;default:Su(E,P),aa(P)}}function aa(P){var E=P.flags;if(E&2){try{for(var M,Y=P.return;Y!==null;){if(TO(Y)){M=Y;break}Y=Y.return}if(M==null)throw Error(n(160));switch(M.tag){case 27:var ne=M.stateNode,le=R_(P);Db(P,le,ne);break;case 5:var Le=M.stateNode;M.flags&32&&(Fo(Le,""),M.flags&=-33);var tt=R_(P);Db(P,tt,Le);break;case 3:case 4:var _t=M.stateNode.containerInfo,$t=R_(P);M_(P,$t,_t);break;default:throw Error(n(161))}}catch(hr){Co(P,P.return,hr)}P.flags&=-3}E&4096&&(P.flags&=-4097)}function DO(P){if(P.subtreeFlags&1024)for(P=P.child;P!==null;){var E=P;DO(E),E.tag===5&&E.flags&1024&&E.stateNode.reset(),P=P.sibling}}function eh(P,E){if(E.subtreeFlags&8772)for(E=E.child;E!==null;)k_(P,E.alternate,E),E=E.sibling}function zp(P){for(P=P.child;P!==null;){var E=P;switch(E.tag){case 0:case 11:case 14:case 15:Zf(4,E,E.return),zp(E);break;case 1:Ll(E,E.return);var M=E.stateNode;typeof M.componentWillUnmount=="function"&&D_(E,E.return,M),zp(E);break;case 27:Qy(E.stateNode);case 26:case 5:Ll(E,E.return),zp(E);break;case 22:E.memoizedState===null&&zp(E);break;case 30:zp(E);break;default:zp(E)}P=P.sibling}}function mf(P,E,M){for(M=M&&(E.subtreeFlags&8772)!==0,E=E.child;E!==null;){var Y=E.alternate,ne=P,le=E,Le=le.flags;switch(le.tag){case 0:case 11:case 15:mf(ne,le,M),qg(4,le);break;case 1:if(mf(ne,le,M),Y=le,ne=Y.stateNode,typeof ne.componentDidMount=="function")try{ne.componentDidMount()}catch($t){Co(Y,Y.return,$t)}if(Y=le,ne=Y.updateQueue,ne!==null){var tt=Y.stateNode;try{var _t=ne.shared.hiddenCallbacks;if(_t!==null)for(ne.shared.hiddenCallbacks=null,ne=0;ne<_t.length;ne++)Zl(_t[ne],tt)}catch($t){Co(Y,Y.return,$t)}}M&&Le&64&&Iy(le),mu(le,le.return);break;case 27:xO(le);case 26:case 5:mf(ne,le,M),M&&Y===null&&Le&4&&CO(le),mu(le,le.return);break;case 12:mf(ne,le,M);break;case 31:mf(ne,le,M),M&&Le&4&&N_(ne,le);break;case 13:mf(ne,le,M),M&&Le&4&&wO(ne,le);break;case 22:le.memoizedState===null&&mf(ne,le,M),mu(le,le.return);break;case 30:break;default:mf(ne,le,M)}E=E.sibling}}function F_(P,E){var M=null;P!==null&&P.memoizedState!==null&&P.memoizedState.cachePool!==null&&(M=P.memoizedState.cachePool.pool),P=null,E.memoizedState!==null&&E.memoizedState.cachePool!==null&&(P=E.memoizedState.cachePool.pool),P!==M&&(P!=null&&P.refCount++,M!=null&&Wf(M))}function j_(P,E){P=null,E.alternate!==null&&(P=E.alternate.memoizedState.cache),E=E.memoizedState.cache,E!==P&&(E.refCount++,P!=null&&Wf(P))}function md(P,E,M,Y){if(E.subtreeFlags&10256)for(E=E.child;E!==null;)RO(P,E,M,Y),E=E.sibling}function RO(P,E,M,Y){var ne=E.flags;switch(E.tag){case 0:case 11:case 15:md(P,E,M,Y),ne&2048&&qg(9,E);break;case 1:md(P,E,M,Y);break;case 3:md(P,E,M,Y),ne&2048&&(P=null,E.alternate!==null&&(P=E.alternate.memoizedState.cache),E=E.memoizedState.cache,E!==P&&(E.refCount++,P!=null&&Wf(P)));break;case 12:if(ne&2048){md(P,E,M,Y),P=E.stateNode;try{var le=E.memoizedProps,Le=le.id,tt=le.onPostCommit;typeof tt=="function"&&tt(Le,E.alternate===null?"mount":"update",P.passiveEffectDuration,-0)}catch(_t){Co(E,E.return,_t)}}else md(P,E,M,Y);break;case 31:md(P,E,M,Y);break;case 13:md(P,E,M,Y);break;case 23:break;case 22:le=E.stateNode,Le=E.alternate,E.memoizedState!==null?le._visibility&2?md(P,E,M,Y):Ny(P,E):le._visibility&2?md(P,E,M,Y):(le._visibility|=2,qh(P,E,M,Y,(E.subtreeFlags&10256)!==0||!1)),ne&2048&&F_(Le,E);break;case 24:md(P,E,M,Y),ne&2048&&j_(E.alternate,E);break;default:md(P,E,M,Y)}}function qh(P,E,M,Y,ne){for(ne=ne&&((E.subtreeFlags&10256)!==0||!1),E=E.child;E!==null;){var le=P,Le=E,tt=M,_t=Y,$t=Le.flags;switch(Le.tag){case 0:case 11:case 15:qh(le,Le,tt,_t,ne),qg(8,Le);break;case 23:break;case 22:var hr=Le.stateNode;Le.memoizedState!==null?hr._visibility&2?qh(le,Le,tt,_t,ne):Ny(le,Le):(hr._visibility|=2,qh(le,Le,tt,_t,ne)),ne&&$t&2048&&F_(Le.alternate,Le);break;case 24:qh(le,Le,tt,_t,ne),ne&&$t&2048&&j_(Le.alternate,Le);break;default:qh(le,Le,tt,_t,ne)}E=E.sibling}}function Ny(P,E){if(E.subtreeFlags&10256)for(E=E.child;E!==null;){var M=P,Y=E,ne=Y.flags;switch(Y.tag){case 22:Ny(M,Y),ne&2048&&F_(Y.alternate,Y);break;case 24:Ny(M,Y),ne&2048&&j_(Y.alternate,Y);break;default:Ny(M,Y)}E=E.sibling}}var Fy=8192;function Xg(P,E,M){if(P.subtreeFlags&Fy)for(P=P.child;P!==null;)MO(P,E,M),P=P.sibling}function MO(P,E,M){switch(P.tag){case 26:Xg(P,E,M),P.flags&Fy&&P.memoizedState!==null&&sv(M,yd,P.memoizedState,P.memoizedProps);break;case 5:Xg(P,E,M);break;case 3:case 4:var Y=yd;yd=Gb(P.stateNode.containerInfo),Xg(P,E,M),yd=Y;break;case 22:P.memoizedState===null&&(Y=P.alternate,Y!==null&&Y.memoizedState!==null?(Y=Fy,Fy=16777216,Xg(P,E,M),Fy=Y):Xg(P,E,M));break;default:Xg(P,E,M)}}function LO(P){var E=P.alternate;if(E!==null&&(P=E.child,P!==null)){E.child=null;do E=P.sibling,P.sibling=null,P=E;while(P!==null)}}function jy(P){var E=P.deletions;if((P.flags&16)!==0){if(E!==null)for(var M=0;M<E.length;M++){var Y=E[M];Gs=Y,IO(Y,P)}LO(P)}if(P.subtreeFlags&10256)for(P=P.child;P!==null;)kO(P),P=P.sibling}function kO(P){switch(P.tag){case 0:case 11:case 15:jy(P),P.flags&2048&&Zf(9,P,P.return);break;case 3:jy(P);break;case 12:jy(P);break;case 22:var E=P.stateNode;P.memoizedState!==null&&E._visibility&2&&(P.return===null||P.return.tag!==13)?(E._visibility&=-3,Mb(P)):jy(P);break;default:jy(P)}}function Mb(P){var E=P.deletions;if((P.flags&16)!==0){if(E!==null)for(var M=0;M<E.length;M++){var Y=E[M];Gs=Y,IO(Y,P)}LO(P)}for(P=P.child;P!==null;){switch(E=P,E.tag){case 0:case 11:case 15:Zf(8,E,E.return),Mb(E);break;case 22:M=E.stateNode,M._visibility&2&&(M._visibility&=-3,Mb(E));break;default:Mb(E)}P=P.sibling}}function IO(P,E){for(;Gs!==null;){var M=Gs;switch(M.tag){case 0:case 11:case 15:Zf(8,M,E);break;case 23:case 22:if(M.memoizedState!==null&&M.memoizedState.cachePool!==null){var Y=M.memoizedState.cachePool.pool;Y!=null&&Y.refCount++}break;case 24:Wf(M.memoizedState.cache)}if(Y=M.child,Y!==null)Y.return=M,Gs=Y;else e:for(M=P;Gs!==null;){Y=Gs;var ne=Y.sibling,le=Y.return;if(I_(Y),Y===M){Gs=null;break e}if(ne!==null){ne.return=le,Gs=ne;break e}Gs=le}}}var vL={getCacheForType:function(P){var E=Ya(va),M=E.data.get(P);return M===void 0&&(M=P(),E.data.set(P,M)),M},cacheSignal:function(){return Ya(va).controller.signal}},yL=typeof WeakMap=="function"?WeakMap:Map,lo=0,Ho=null,Tn=null,Rn=0,Po=0,Ju=null,Xh=!1,Kg=!1,B_=!1,bd=0,xa=0,Kh=0,Wp=0,V_=0,Qu=0,Zg=0,By=null,_u=null,H_=!1,Vy=0,NO=0,Gp=1/0,Lb=null,Zh=null,Cs=0,Jh=null,Jg=null,th=0,U_=0,z_=null,FO=null,Hy=0,W_=null;function ec(){return(lo&2)!==0&&Rn!==0?Rn&-Rn:V.T!==null?tc():Kr()}function jO(){if(Qu===0)if((Rn&536870912)===0||bn){var P=jr;jr<<=1,(jr&3932160)===0&&(jr=262144),Qu=P}else Qu=536870912;return P=al.current,P!==null&&(P.flags|=32),Qu}function Pu(P,E,M){(P===Ho&&(Po===2||Po===9)||P.cancelPendingCommit!==null)&&(Qg(P,0),rh(P,Rn,Qu,!1)),pi(P,M),((lo&2)===0||P!==Ho)&&(P===Ho&&((lo&2)===0&&(Wp|=M),xa===4&&rh(P,Rn,Qu,!1)),bf(P))}function BO(P,E,M){if((lo&6)!==0)throw Error(n(327));var Y=!M&&(E&127)===0&&(E&P.expiredLanes)===0||Pt(P,E),ne=Y?bL(P,E):Y_(P,E,!0),le=Y;do{if(ne===0){Kg&&!Y&&rh(P,E,0,!1);break}else{if(M=P.current.alternate,le&&!HO(M)){ne=Y_(P,E,!1),le=!1;continue}if(ne===2){if(le=E,P.errorRecoveryDisabledLanes&le)var Le=0;else Le=P.pendingLanes&-536870913,Le=Le!==0?Le:Le&536870912?536870912:0;if(Le!==0){E=Le;e:{var tt=P;ne=By;var _t=tt.current.memoizedState.isDehydrated;if(_t&&(Qg(tt,Le).flags|=256),Le=Y_(tt,Le,!1),Le!==2){if(B_&&!_t){tt.errorRecoveryDisabledLanes|=le,Wp|=le,ne=4;break e}le=_u,_u=ne,le!==null&&(_u===null?_u=le:_u.push.apply(_u,le))}ne=Le}if(le=!1,ne!==2)continue}}if(ne===1){Qg(P,0),rh(P,E,0,!0);break}e:{switch(Y=P,le=ne,le){case 0:case 1:throw Error(n(345));case 4:if((E&4194048)!==E)break;case 6:rh(Y,E,Qu,!Xh);break e;case 2:_u=null;break;case 3:case 5:break;default:throw Error(n(329))}if((E&62914560)===E&&(ne=Vy+300-qe(),10<ne)){if(rh(Y,E,Qu,!Xh),ut(Y,0,!0)!==0)break e;th=E,Y.timeoutHandle=nD(VO.bind(null,Y,M,_u,Lb,H_,E,Qu,Wp,Zg,Xh,le,"Throttled",-0,0),ne);break e}VO(Y,M,_u,Lb,H_,E,Qu,Wp,Zg,Xh,le,null,-0,0)}}break}while(!0);bf(P)}function VO(P,E,M,Y,ne,le,Le,tt,_t,$t,hr,mr,Kt,tr){if(P.timeoutHandle=-1,mr=E.subtreeFlags,mr&8192||(mr&16785408)===16785408){mr={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ra},MO(E,le,mr);var ri=(le&62914560)===le?Vy-qe():(le&4194048)===le?NO-qe():0;if(ri=BL(mr,ri),ri!==null){th=le,P.cancelPendingCommit=ri($O.bind(null,P,E,le,M,Y,ne,Le,tt,_t,hr,mr,null,Kt,tr)),rh(P,le,Le,!$t);return}}$O(P,E,le,M,Y,ne,Le,tt,_t)}function HO(P){for(var E=P;;){var M=E.tag;if((M===0||M===11||M===15)&&E.flags&16384&&(M=E.updateQueue,M!==null&&(M=M.stores,M!==null)))for(var Y=0;Y<M.length;Y++){var ne=M[Y],le=ne.getSnapshot;ne=ne.value;try{if(!ze(le(),ne))return!1}catch{return!1}}if(M=E.child,E.subtreeFlags&16384&&M!==null)M.return=E,E=M;else{if(E===P)break;for(;E.sibling===null;){if(E.return===null||E.return===P)return!0;E=E.return}E.sibling.return=E.return,E=E.sibling}}return!0}function rh(P,E,M,Y){E&=~V_,E&=~Wp,P.suspendedLanes|=E,P.pingedLanes&=~E,Y&&(P.warmLanes|=E),Y=P.expirationTimes;for(var ne=E;0<ne;){var le=31-lr(ne),Le=1<<le;Y[le]=-1,ne&=~Le}M!==0&&Ur(P,M,E)}function kb(){return(lo&6)===0?(Yy(0),!1):!0}function G_(){if(Tn!==null){if(Po===0)var P=Tn.return;else P=Tn,zu=$i=null,O(P),Yu=null,ol=0,P=Tn;for(;P!==null;)wb(P.alternate,P),P=P.return;Tn=null}}function Qg(P,E){var M=P.timeoutHandle;M!==-1&&(P.timeoutHandle=-1,wL(M)),M=P.cancelPendingCommit,M!==null&&(P.cancelPendingCommit=null,M()),th=0,G_(),Ho=P,Tn=M=il(P.current,null),Rn=E,Po=0,Ju=null,Xh=!1,Kg=Pt(P,E),B_=!1,Zg=Qu=V_=Wp=Kh=xa=0,_u=By=null,H_=!1,(E&8)!==0&&(E|=E&32);var Y=P.entangledLanes;if(Y!==0)for(P=P.entanglements,Y&=E;0<Y;){var ne=31-lr(Y),le=1<<ne;E|=P[ne],Y&=~le}return bd=E,Tr(),M}function UO(P,E){bi=null,V.H=Yh,E===df||E===Yf?(E=Ug(),Po=3):E===Fh?(E=Ug(),Po=4):Po=E===Ey?8:E!==null&&typeof E=="object"&&typeof E.then=="function"?6:1,Ju=E,Tn===null&&(xa=1,xy(P,Fs(E,P.current)))}function Uy(){var P=al.current;return P===null?!0:(Rn&4194048)===Rn?Hs===null:(Rn&62914560)===Rn||(Rn&536870912)!==0?P===Hs:!1}function zO(){var P=V.H;return V.H=Yh,P===null?Yh:P}function WO(){var P=V.A;return V.A=vL,P}function Ib(){xa=4,Xh||(Rn&4194048)!==Rn&&al.current!==null||(Kg=!0),(Kh&134217727)===0&&(Wp&134217727)===0||Ho===null||rh(Ho,Rn,Qu,!1)}function Y_(P,E,M){var Y=lo;lo|=2;var ne=zO(),le=WO();(Ho!==P||Rn!==E)&&(Lb=null,Qg(P,E)),E=!1;var Le=xa;e:do try{if(Po!==0&&Tn!==null){var tt=Tn,_t=Ju;switch(Po){case 8:G_(),Le=6;break e;case 3:case 2:case 9:case 6:al.current===null&&(E=!0);var $t=Po;if(Po=0,Ju=null,ev(P,tt,_t,$t),M&&Kg){Le=0;break e}break;default:$t=Po,Po=0,Ju=null,ev(P,tt,_t,$t)}}mL(),Le=xa;break}catch(hr){UO(P,hr)}while(!0);return E&&P.shellSuspendCounter++,zu=$i=null,lo=Y,V.H=ne,V.A=le,Tn===null&&(Ho=null,Rn=0,Tr()),Le}function mL(){for(;Tn!==null;)GO(Tn)}function bL(P,E){var M=lo;lo|=2;var Y=zO(),ne=WO();Ho!==P||Rn!==E?(Lb=null,Gp=qe()+500,Qg(P,E)):Kg=Pt(P,E);e:do try{if(Po!==0&&Tn!==null){E=Tn;var le=Ju;t:switch(Po){case 1:Po=0,Ju=null,ev(P,E,le,1);break;case 2:case 9:if(Hg(le)){Po=0,Ju=null,YO(E);break}E=function(){Po!==2&&Po!==9||Ho!==P||(Po=7),bf(P)},le.then(E,E);break e;case 3:Po=7;break e;case 4:Po=5;break e;case 7:Hg(le)?(Po=0,Ju=null,YO(E)):(Po=0,Ju=null,ev(P,E,le,7));break;case 5:var Le=null;switch(Tn.tag){case 26:Le=Tn.memoizedState;case 5:case 27:var tt=Tn;if(Le?mD(Le):tt.stateNode.complete){Po=0,Ju=null;var _t=tt.sibling;if(_t!==null)Tn=_t;else{var $t=tt.return;$t!==null?(Tn=$t,Nb($t)):Tn=null}break t}}Po=0,Ju=null,ev(P,E,le,5);break;case 6:Po=0,Ju=null,ev(P,E,le,6);break;case 8:G_(),xa=6;break e;default:throw Error(n(462))}}SL();break}catch(hr){UO(P,hr)}while(!0);return zu=$i=null,V.H=Y,V.A=ne,lo=M,Tn!==null?0:(Ho=null,Rn=0,Tr(),xa)}function SL(){for(;Tn!==null&&!be();)GO(Tn)}function GO(P){var E=_O(P.alternate,P,bd);P.memoizedProps=P.pendingProps,E===null?Nb(P):Tn=E}function YO(P){var E=P,M=E.alternate;switch(E.tag){case 15:case 0:E=mO(M,E,E.pendingProps,E.type,void 0,Rn);break;case 11:E=mO(M,E,E.pendingProps,E.type.render,E.ref,Rn);break;case 5:O(E);default:wb(M,E),E=Tn=Sr(E,bd),E=_O(M,E,bd)}P.memoizedProps=P.pendingProps,E===null?Nb(P):Tn=E}function ev(P,E,M,Y){zu=$i=null,O(E),Yu=null,ol=0;var ne=E.return;try{if(C_(P,ne,E,M,Rn)){xa=1,xy(P,Fs(M,P.current)),Tn=null;return}}catch(le){if(ne!==null)throw Tn=ne,le;xa=1,xy(P,Fs(M,P.current)),Tn=null;return}E.flags&32768?(bn||Y===1?P=!0:Kg||(Rn&536870912)!==0?P=!1:(Xh=P=!0,(Y===2||Y===9||Y===3||Y===6)&&(Y=al.current,Y!==null&&Y.tag===13&&(Y.flags|=16384))),zy(E,P)):Nb(E)}function Nb(P){var E=P;do{if((E.flags&32768)!==0){zy(E,Xh);return}P=E.return;var M=PO(E.alternate,E,bd);if(M!==null){Tn=M;return}if(E=E.sibling,E!==null){Tn=E;return}Tn=E=P}while(E!==null);xa===0&&(xa=5)}function zy(P,E){do{var M=ky(P.alternate,P);if(M!==null){M.flags&=32767,Tn=M;return}if(M=P.return,M!==null&&(M.flags|=32768,M.subtreeFlags=0,M.deletions=null),!E&&(P=P.sibling,P!==null)){Tn=P;return}Tn=P=M}while(P!==null);xa=6,Tn=null}function $O(P,E,M,Y,ne,le,Le,tt,_t){P.cancelPendingCommit=null;do Wy();while(Cs!==0);if((lo&6)!==0)throw Error(n(327));if(E!==null){if(E===P.current)throw Error(n(177));if(le=E.lanes|E.childLanes,le|=sd,Qr(P,M,le,Le,tt,_t),P===Ho&&(Tn=Ho=null,Rn=0),Jg=E,Jh=P,th=M,U_=le,z_=ne,FO=Y,(E.subtreeFlags&10256)!==0||(E.flags&10256)!==0?(P.callbackNode=null,P.callbackPriority=0,CL(It,function(){return K_(),null})):(P.callbackNode=null,P.callbackPriority=0),Y=(E.flags&13878)!==0,(E.subtreeFlags&13878)!==0||Y){Y=V.T,V.T=null,ne=W.p,W.p=2,Le=lo,lo|=4;try{pL(P,E,M)}finally{lo=Le,W.p=ne,V.T=Y}}Cs=1,$_(),q_(),Fb()}}function $_(){if(Cs===1){Cs=0;var P=Jh,E=Jg,M=(E.flags&13878)!==0;if((E.subtreeFlags&13878)!==0||M){M=V.T,V.T=null;var Y=W.p;W.p=2;var ne=lo;lo|=4;try{OO(E,P);var le=sP,Le=Me(P.containerInfo),tt=le.focusedElem,_t=le.selectionRange;if(Le!==tt&&tt&&tt.ownerDocument&&Ce(tt.ownerDocument.documentElement,tt)){if(_t!==null&&Ne(tt)){var $t=_t.start,hr=_t.end;if(hr===void 0&&(hr=$t),"selectionStart"in tt)tt.selectionStart=$t,tt.selectionEnd=Math.min(hr,tt.value.length);else{var mr=tt.ownerDocument||document,Kt=mr&&mr.defaultView||window;if(Kt.getSelection){var tr=Kt.getSelection(),ri=tt.textContent.length,Oi=Math.min(_t.start,ri),Oo=_t.end===void 0?Oi:Math.min(_t.end,ri);!tr.extend&&Oi>Oo&&(Le=Oo,Oo=Oi,Oi=Le);var Ft=ge(tt,Oi),Dt=ge(tt,Oo);if(Ft&&Dt&&(tr.rangeCount!==1||tr.anchorNode!==Ft.node||tr.anchorOffset!==Ft.offset||tr.focusNode!==Dt.node||tr.focusOffset!==Dt.offset)){var Yt=mr.createRange();Yt.setStart(Ft.node,Ft.offset),tr.removeAllRanges(),Oi>Oo?(tr.addRange(Yt),tr.extend(Dt.node,Dt.offset)):(Yt.setEnd(Dt.node,Dt.offset),tr.addRange(Yt))}}}}for(mr=[],tr=tt;tr=tr.parentNode;)tr.nodeType===1&&mr.push({element:tr,left:tr.scrollLeft,top:tr.scrollTop});for(typeof tt.focus=="function"&&tt.focus(),tt=0;tt<mr.length;tt++){var vr=mr[tt];vr.element.scrollLeft=vr.left,vr.element.scrollTop=vr.top}}Zb=!!Ky,sP=Ky=null}finally{lo=ne,W.p=Y,V.T=M}}P.current=E,Cs=2}}function q_(){if(Cs===2){Cs=0;var P=Jh,E=Jg,M=(E.flags&8772)!==0;if((E.subtreeFlags&8772)!==0||M){M=V.T,V.T=null;var Y=W.p;W.p=2;var ne=lo;lo|=4;try{k_(P,E.alternate,E)}finally{lo=ne,W.p=Y,V.T=M}}Cs=3}}function Fb(){if(Cs===4||Cs===3){Cs=0,ke();var P=Jh,E=Jg,M=th,Y=FO;(E.subtreeFlags&10256)!==0||(E.flags&10256)!==0?Cs=5:(Cs=0,Jg=Jh=null,X_(P,P.pendingLanes));var ne=P.pendingLanes;if(ne===0&&(Zh=null),Dn(M),E=E.stateNode,Xe&&typeof Xe.onCommitFiberRoot=="function")try{Xe.onCommitFiberRoot(Gt,E,void 0,(E.current.flags&128)===128)}catch{}if(Y!==null){E=V.T,ne=W.p,W.p=2,V.T=null;try{for(var le=P.onRecoverableError,Le=0;Le<Y.length;Le++){var tt=Y[Le];le(tt.value,{componentStack:tt.stack})}}finally{V.T=E,W.p=ne}}(th&3)!==0&&Wy(),bf(P),ne=P.pendingLanes,(M&261930)!==0&&(ne&42)!==0?P===W_?Hy++:(Hy=0,W_=P):Hy=0,Yy(0)}}function X_(P,E){(P.pooledCacheLanes&=E)===0&&(E=P.pooledCache,E!=null&&(P.pooledCache=null,Wf(E)))}function Wy(){return $_(),q_(),Fb(),K_()}function K_(){if(Cs!==5)return!1;var P=Jh,E=U_;U_=0;var M=Dn(th),Y=V.T,ne=W.p;try{W.p=32>M?32:M,V.T=null,M=z_,z_=null;var le=Jh,Le=th;if(Cs=0,Jg=Jh=null,th=0,(lo&6)!==0)throw Error(n(331));var tt=lo;if(lo|=4,kO(le.current),RO(le,le.current,Le,M),lo=tt,Yy(0,!1),Xe&&typeof Xe.onPostCommitFiberRoot=="function")try{Xe.onPostCommitFiberRoot(Gt,le)}catch{}return!0}finally{W.p=ne,V.T=Y,X_(P,E)}}function Z_(P,E,M){E=Fs(M,E),E=P_(P.stateNode,E,2),P=Rl(P,E,2),P!==null&&(pi(P,2),bf(P))}function Co(P,E,M){if(P.tag===3)Z_(P,P,M);else for(;E!==null;){if(E.tag===3){Z_(E,P,M);break}else if(E.tag===1){var Y=E.stateNode;if(typeof E.type.getDerivedStateFromError=="function"||typeof Y.componentDidCatch=="function"&&(Zh===null||!Zh.has(Y))){P=Fs(M,P),M=vf(2),Y=Rl(E,M,2),Y!==null&&(_b(M,Y,E,P),pi(Y,2),bf(Y));break}}E=E.return}}function J_(P,E,M){var Y=P.pingCache;if(Y===null){Y=P.pingCache=new yL;var ne=new Set;Y.set(E,ne)}else ne=Y.get(E),ne===void 0&&(ne=new Set,Y.set(E,ne));ne.has(M)||(B_=!0,ne.add(M),P=_L.bind(null,P,E,M),E.then(P,P))}function _L(P,E,M){var Y=P.pingCache;Y!==null&&Y.delete(E),P.pingedLanes|=P.suspendedLanes&M,P.warmLanes&=~M,Ho===P&&(Rn&M)===M&&(xa===4||xa===3&&(Rn&62914560)===Rn&&300>qe()-Vy?(lo&2)===0&&Qg(P,0):V_|=M,Zg===Rn&&(Zg=0)),bf(P)}function Gy(P,E){E===0&&(E=wr()),P=Er(P,E),P!==null&&(pi(P,E),bf(P))}function jb(P){var E=P.memoizedState,M=0;E!==null&&(M=E.retryLane),Gy(P,M)}function PL(P,E){var M=0;switch(P.tag){case 31:case 13:var Y=P.stateNode,ne=P.memoizedState;ne!==null&&(M=ne.retryLane);break;case 19:Y=P.stateNode;break;case 22:Y=P.stateNode._retryCache;break;default:throw Error(n(314))}Y!==null&&Y.delete(E),Gy(P,M)}function CL(P,E){return he(P,E)}var tv=null,Yp=null,Q_=!1,Bb=!1,eP=!1,Qh=0;function bf(P){P!==Yp&&P.next===null&&(Yp===null?tv=Yp=P:Yp=Yp.next=P),Bb=!0,Q_||(Q_=!0,xL())}function Yy(P,E){if(!eP&&Bb){eP=!0;do for(var M=!1,Y=tv;Y!==null;){if(P!==0){var ne=Y.pendingLanes;if(ne===0)var le=0;else{var Le=Y.suspendedLanes,tt=Y.pingedLanes;le=(1<<31-lr(42|P)+1)-1,le&=ne&~(Le&~tt),le=le&201326741?le&201326741|1:le?le|2:0}le!==0&&(M=!0,ZO(Y,le))}else le=Rn,le=ut(Y,Y===Ho?le:0,Y.cancelPendingCommit!==null||Y.timeoutHandle!==-1),(le&3)===0||Pt(Y,le)||(M=!0,ZO(Y,le));Y=Y.next}while(M);eP=!1}}function TL(){qO()}function qO(){Bb=Q_=!1;var P=0;Qh!==0&&AL()&&(P=Qh);for(var E=qe(),M=null,Y=tv;Y!==null;){var ne=Y.next,le=XO(Y,E);le===0?(Y.next=null,M===null?tv=ne:M.next=ne,ne===null&&(Yp=M)):(M=Y,(P!==0||(le&3)!==0)&&(Bb=!0)),Y=ne}Cs!==0&&Cs!==5||Yy(P),Qh!==0&&(Qh=0)}function XO(P,E){for(var M=P.suspendedLanes,Y=P.pingedLanes,ne=P.expirationTimes,le=P.pendingLanes&-62914561;0<le;){var Le=31-lr(le),tt=1<<Le,_t=ne[Le];_t===-1?((tt&M)===0||(tt&Y)!==0)&&(ne[Le]=Qt(tt,E)):_t<=E&&(P.expiredLanes|=tt),le&=~tt}if(E=Ho,M=Rn,M=ut(P,P===E?M:0,P.cancelPendingCommit!==null||P.timeoutHandle!==-1),Y=P.callbackNode,M===0||P===E&&(Po===2||Po===9)||P.cancelPendingCommit!==null)return Y!==null&&Y!==null&&Se(Y),P.callbackNode=null,P.callbackPriority=0;if((M&3)===0||Pt(P,M)){if(E=M&-M,E===P.callbackPriority)return E;switch(Y!==null&&Se(Y),Dn(M)){case 2:case 8:M=xt;break;case 32:M=It;break;case 268435456:M=ct;break;default:M=It}return Y=KO.bind(null,P),M=he(M,Y),P.callbackPriority=E,P.callbackNode=M,E}return Y!==null&&Y!==null&&Se(Y),P.callbackPriority=2,P.callbackNode=null,2}function KO(P,E){if(Cs!==0&&Cs!==5)return P.callbackNode=null,P.callbackPriority=0,null;var M=P.callbackNode;if(Wy()&&P.callbackNode!==M)return null;var Y=Rn;return Y=ut(P,P===Ho?Y:0,P.cancelPendingCommit!==null||P.timeoutHandle!==-1),Y===0?null:(BO(P,Y,E),XO(P,qe()),P.callbackNode!=null&&P.callbackNode===M?KO.bind(null,P):null)}function ZO(P,E){if(Wy())return null;BO(P,E,!0)}function xL(){aD(function(){(lo&6)!==0?he(St,TL):qO()})}function tc(){if(Qh===0){var P=uf;P===0&&(P=zt,zt<<=1,(zt&261888)===0&&(zt=256)),Qh=P}return Qh}function JO(P){return P==null||typeof P=="symbol"||typeof P=="boolean"?null:typeof P=="function"?P:ao(""+P)}function QO(P,E){var M=E.ownerDocument.createElement("input");return M.name=E.name,M.value=E.value,P.id&&M.setAttribute("form",P.id),E.parentNode.insertBefore(M,E),P=new FormData(P),M.parentNode.removeChild(M),P}function $p(P,E,M,Y,ne){if(E==="submit"&&M&&M.stateNode===ne){var le=JO((ne[dr]||null).action),Le=Y.submitter;Le&&(E=(E=Le[dr]||null)?JO(E.formAction):Le.getAttribute("formAction"),E!==null&&(le=E,Le=null));var tt=new Mt("action","action",null,Y,ne);P.push({event:tt,listeners:[{instance:null,listener:function(){if(Y.defaultPrevented){if(Qh!==0){var _t=Le?QO(ne,Le):new FormData(ne);Gh(M,{pending:!0,data:_t,method:ne.method,action:le},null,_t)}}else typeof le=="function"&&(tt.preventDefault(),_t=Le?QO(ne,Le):new FormData(ne),Gh(M,{pending:!0,data:_t,method:ne.method,action:le},le,_t))},currentTarget:ne}]})}}for(var qi=0;qi<ro.length;qi++){var tP=ro[qi],Cu=tP.toLowerCase(),Xa=tP[0].toUpperCase()+tP.slice(1);Xn(Cu,"on"+Xa)}Xn(qn,"onAnimationEnd"),Xn(rl,"onAnimationIteration"),Xn(rf,"onAnimationStart"),Xn("dblclick","onDoubleClick"),Xn("focusin","onFocus"),Xn("focusout","onBlur"),Xn(Vu,"onTransitionRun"),Xn(od,"onTransitionStart"),Xn(ad,"onTransitionCancel"),Xn(yn,"onTransitionEnd"),q("onMouseEnter",["mouseout","mouseover"]),q("onMouseLeave",["mouseout","mouseover"]),q("onPointerEnter",["pointerout","pointerover"]),q("onPointerLeave",["pointerout","pointerover"]),wa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),wa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),wa("onBeforeInput",["compositionend","keypress","textInput","paste"]),wa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),wa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),wa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var $y="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),ep=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat($y));function eD(P,E){E=(E&4)!==0;for(var M=0;M<P.length;M++){var Y=P[M],ne=Y.event;Y=Y.listeners;e:{var le=void 0;if(E)for(var Le=Y.length-1;0<=Le;Le--){var tt=Y[Le],_t=tt.instance,$t=tt.currentTarget;if(tt=tt.listener,_t!==le&&ne.isPropagationStopped())break e;le=tt,ne.currentTarget=$t;try{le(ne)}catch(hr){Un(hr)}ne.currentTarget=null,le=_t}else for(Le=0;Le<Y.length;Le++){if(tt=Y[Le],_t=tt.instance,$t=tt.currentTarget,tt=tt.listener,_t!==le&&ne.isPropagationStopped())break e;le=tt,ne.currentTarget=$t;try{le(ne)}catch(hr){Un(hr)}ne.currentTarget=null,le=_t}}}}function xn(P,E){var M=E[ar];M===void 0&&(M=E[ar]=new Set);var Y=P+"__bubble";M.has(Y)||(Hb(E,P,2,!1),M.add(Y))}function rP(P,E,M){var Y=0;E&&(Y|=4),Hb(M,P,Y,E)}var Vb="_reactListening"+Math.random().toString(36).slice(2);function iP(P){if(!P[Vb]){P[Vb]=!0,rr.forEach(function(M){M!=="selectionchange"&&(ep.has(M)||rP(M,!1,P),rP(M,!0,P))});var E=P.nodeType===9?P:P.ownerDocument;E===null||E[Vb]||(E[Vb]=!0,rP("selectionchange",!1,E))}}function Hb(P,E,M,Y){switch(ED(E)){case 2:var ne=HL;break;case 8:ne=UL;break;default:ne=gP}M=ne.bind(null,E,M,P),ne=void 0,!Zc||E!=="touchstart"&&E!=="touchmove"&&E!=="wheel"||(ne=!0),Y?ne!==void 0?P.addEventListener(E,M,{capture:!0,passive:ne}):P.addEventListener(E,M,!0):ne!==void 0?P.addEventListener(E,M,{passive:ne}):P.addEventListener(E,M,!1)}function nP(P,E,M,Y,ne){var le=Y;if((E&1)===0&&(E&2)===0&&Y!==null)e:for(;;){if(Y===null)return;var Le=Y.tag;if(Le===3||Le===4){var tt=Y.stateNode.containerInfo;if(tt===ne)break;if(Le===4)for(Le=Y.return;Le!==null;){var _t=Le.tag;if((_t===3||_t===4)&&Le.stateNode.containerInfo===ne)return;Le=Le.return}for(;tt!==null;){if(Le=Nn(tt),Le===null)return;if(_t=Le.tag,_t===5||_t===6||_t===26||_t===27){Y=le=Le;continue e}tt=tt.parentNode}}Y=Y.return}ia(function(){var $t=le,hr=Hn(M),mr=[];e:{var Kt=Xo.get(P);if(Kt!==void 0){var tr=Mt,ri=P;switch(P){case"keypress":if(du(M)===0)break e;case"keydown":case"keyup":tr=fu;break;case"focusin":ri="focus",tr=Is;break;case"focusout":ri="blur",tr=Is;break;case"beforeblur":case"afterblur":tr=Is;break;case"click":if(M.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":tr=Ci;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":tr=za;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":tr=Mp;break;case qn:case rl:case rf:tr=$l;break;case yn:tr=Kd;break;case"scroll":case"scrollend":tr=Ot;break;case"wheel":tr=Zd;break;case"copy":case"cut":case"paste":tr=os;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":tr=Sc;break;case"toggle":case"beforetoggle":tr=Dh}var Oi=(E&4)!==0,Oo=!Oi&&(P==="scroll"||P==="scrollend"),Ft=Oi?Kt!==null?Kt+"Capture":null:Kt;Oi=[];for(var Dt=$t,Yt;Dt!==null;){var vr=Dt;if(Yt=vr.stateNode,vr=vr.tag,vr!==5&&vr!==26&&vr!==27||Yt===null||Ft===null||(vr=fa(Dt,Ft),vr!=null&&Oi.push(rc(Dt,vr,Yt))),Oo)break;Dt=Dt.return}0<Oi.length&&(Kt=new tr(Kt,ri,null,M,hr),mr.push({event:Kt,listeners:Oi}))}}if((E&7)===0){e:{if(Kt=P==="mouseover"||P==="pointerover",tr=P==="mouseout"||P==="pointerout",Kt&&M!==fo&&(ri=M.relatedTarget||M.fromElement)&&(Nn(ri)||ri[ue]))break e;if((tr||Kt)&&(Kt=hr.window===hr?hr:(Kt=hr.ownerDocument)?Kt.defaultView||Kt.parentWindow:window,tr?(ri=M.relatedTarget||M.toElement,tr=$t,ri=ri?Nn(ri):null,ri!==null&&(Oo=o(ri),Oi=ri.tag,ri!==Oo||Oi!==5&&Oi!==27&&Oi!==6)&&(ri=null)):(tr=null,ri=$t),tr!==ri)){if(Oi=Ci,vr="onMouseLeave",Ft="onMouseEnter",Dt="mouse",(P==="pointerout"||P==="pointerover")&&(Oi=Sc,vr="onPointerLeave",Ft="onPointerEnter",Dt="pointer"),Oo=tr==null?Kt:_o(tr),Yt=ri==null?Kt:_o(ri),Kt=new Oi(vr,Dt+"leave",tr,M,hr),Kt.target=Oo,Kt.relatedTarget=Yt,vr=null,Nn(hr)===$t&&(Oi=new Oi(Ft,Dt+"enter",ri,M,hr),Oi.target=Yt,Oi.relatedTarget=Oo,vr=Oi),Oo=vr,tr&&ri)t:{for(Oi=Ub,Ft=tr,Dt=ri,Yt=0,vr=Ft;vr;vr=Oi(vr))Yt++;vr=0;for(var _i=Dt;_i;_i=Oi(_i))vr++;for(;0<Yt-vr;)Ft=Oi(Ft),Yt--;for(;0<vr-Yt;)Dt=Oi(Dt),vr--;for(;Yt--;){if(Ft===Dt||Dt!==null&&Ft===Dt.alternate){Oi=Ft;break t}Ft=Oi(Ft),Dt=Oi(Dt)}Oi=null}else Oi=null;tr!==null&&ma(mr,Kt,tr,Oi,!1),ri!==null&&Oo!==null&&ma(mr,Oo,ri,Oi,!0)}}e:{if(Kt=$t?_o($t):window,tr=Kt.nodeName&&Kt.nodeName.toLowerCase(),tr==="select"||tr==="input"&&Kt.type==="file")var io=Ra;else if(ql(Kt))if(Ma)io=Mh;else{io=kp;var ui=tf}else tr=Kt.nodeName,!tr||tr.toLowerCase()!=="input"||Kt.type!=="checkbox"&&Kt.type!=="radio"?$t&&Ls($t.elementType)&&(io=Ra):io=nd;if(io&&(io=io(P,$t))){jf(mr,io,M,hr);break e}ui&&ui(P,Kt,$t),P==="focusout"&&$t&&Kt.type==="number"&&$t.memoizedProps.value!=null&&bl(Kt,"number",Kt.value)}switch(ui=$t?_o($t):window,P){case"focusin":(ql(ui)||ui.contentEditable==="true")&&(Ve=ui,it=$t,Je=null);break;case"focusout":Je=it=Ve=null;break;case"mousedown":ht=!0;break;case"contextmenu":case"mouseup":case"dragend":ht=!1,Nt(mr,M,hr);break;case"selectionchange":if(lt)break;case"keydown":case"keyup":Nt(mr,M,hr)}var cn;if(ed)e:{switch(P){case"compositionstart":var Mn="onCompositionStart";break e;case"compositionend":Mn="onCompositionEnd";break e;case"compositionupdate":Mn="onCompositionUpdate";break e}Mn=void 0}else ju?Fu(P,M)&&(Mn="onCompositionEnd"):P==="keydown"&&M.keyCode===229&&(Mn="onCompositionStart");Mn&&(Jd&&M.locale!=="ko"&&(ju||Mn!=="onCompositionStart"?Mn==="onCompositionEnd"&&ju&&(cn=on()):(ms=hr,jo="value"in ms?ms.value:ms.textContent,ju=!0)),ui=qy($t,Mn),0<ui.length&&(Mn=new as(Mn,P,null,M,hr),mr.push({event:Mn,listeners:ui}),cn?Mn.data=cn:(cn=Rh(M),cn!==null&&(Mn.data=cn)))),(cn=td?bs(P,M):Ff(P,M))&&(Mn=qy($t,"onBeforeInput"),0<Mn.length&&(ui=new as("onBeforeInput","beforeinput",null,M,hr),mr.push({event:ui,listeners:Mn}),ui.data=cn)),$p(mr,P,$t,M,hr)}eD(mr,E)})}function rc(P,E,M){return{instance:P,listener:E,currentTarget:M}}function qy(P,E){for(var M=E+"Capture",Y=[];P!==null;){var ne=P,le=ne.stateNode;if(ne=ne.tag,ne!==5&&ne!==26&&ne!==27||le===null||(ne=fa(P,M),ne!=null&&Y.unshift(rc(P,ne,le)),ne=fa(P,E),ne!=null&&Y.push(rc(P,ne,le))),P.tag===3)return Y;P=P.return}return[]}function Ub(P){if(P===null)return null;do P=P.return;while(P&&P.tag!==5&&P.tag!==27);return P||null}function ma(P,E,M,Y,ne){for(var le=E._reactName,Le=[];M!==null&&M!==Y;){var tt=M,_t=tt.alternate,$t=tt.stateNode;if(tt=tt.tag,_t!==null&&_t===Y)break;tt!==5&&tt!==26&&tt!==27||$t===null||(_t=$t,ne?($t=fa(M,le),$t!=null&&Le.unshift(rc(M,$t,_t))):ne||($t=fa(M,le),$t!=null&&Le.push(rc(M,$t,_t)))),M=M.return}Le.length!==0&&P.push({event:E,listeners:Le})}var Na=/\r\n?/g,tD=/\u0000|\uFFFD/g;function rD(P){return(typeof P=="string"?P:""+P).replace(Na,`
`).replace(tD,"")}function iD(P,E){return E=rD(E),rD(P)===E}function wo(P,E,M,Y,ne,le){switch(M){case"children":typeof Y=="string"?E==="body"||E==="textarea"&&Y===""||Fo(P,Y):(typeof Y=="number"||typeof Y=="bigint")&&E!=="body"&&Fo(P,""+Y);break;case"className":cr(P,"class",Y);break;case"tabIndex":cr(P,"tabindex",Y);break;case"dir":case"role":case"viewBox":case"width":case"height":cr(P,M,Y);break;case"style":vc(P,Y,le);break;case"data":if(E!=="object"){cr(P,"data",Y);break}case"src":case"href":if(Y===""&&(E!=="a"||M!=="href")){P.removeAttribute(M);break}if(Y==null||typeof Y=="function"||typeof Y=="symbol"||typeof Y=="boolean"){P.removeAttribute(M);break}Y=ao(""+Y),P.setAttribute(M,Y);break;case"action":case"formAction":if(typeof Y=="function"){P.setAttribute(M,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof le=="function"&&(M==="formAction"?(E!=="input"&&wo(P,E,"name",ne.name,ne,null),wo(P,E,"formEncType",ne.formEncType,ne,null),wo(P,E,"formMethod",ne.formMethod,ne,null),wo(P,E,"formTarget",ne.formTarget,ne,null)):(wo(P,E,"encType",ne.encType,ne,null),wo(P,E,"method",ne.method,ne,null),wo(P,E,"target",ne.target,ne,null)));if(Y==null||typeof Y=="symbol"||typeof Y=="boolean"){P.removeAttribute(M);break}Y=ao(""+Y),P.setAttribute(M,Y);break;case"onClick":Y!=null&&(P.onclick=ra);break;case"onScroll":Y!=null&&xn("scroll",P);break;case"onScrollEnd":Y!=null&&xn("scrollend",P);break;case"dangerouslySetInnerHTML":if(Y!=null){if(typeof Y!="object"||!("__html"in Y))throw Error(n(61));if(M=Y.__html,M!=null){if(ne.children!=null)throw Error(n(60));P.innerHTML=M}}break;case"multiple":P.multiple=Y&&typeof Y!="function"&&typeof Y!="symbol";break;case"muted":P.muted=Y&&typeof Y!="function"&&typeof Y!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(Y==null||typeof Y=="function"||typeof Y=="boolean"||typeof Y=="symbol"){P.removeAttribute("xlink:href");break}M=ao(""+Y),P.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",M);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":Y!=null&&typeof Y!="function"&&typeof Y!="symbol"?P.setAttribute(M,""+Y):P.removeAttribute(M);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":Y&&typeof Y!="function"&&typeof Y!="symbol"?P.setAttribute(M,""):P.removeAttribute(M);break;case"capture":case"download":Y===!0?P.setAttribute(M,""):Y!==!1&&Y!=null&&typeof Y!="function"&&typeof Y!="symbol"?P.setAttribute(M,Y):P.removeAttribute(M);break;case"cols":case"rows":case"size":case"span":Y!=null&&typeof Y!="function"&&typeof Y!="symbol"&&!isNaN(Y)&&1<=Y?P.setAttribute(M,Y):P.removeAttribute(M);break;case"rowSpan":case"start":Y==null||typeof Y=="function"||typeof Y=="symbol"||isNaN(Y)?P.removeAttribute(M):P.setAttribute(M,Y);break;case"popover":xn("beforetoggle",P),xn("toggle",P),At(P,"popover",Y);break;case"xlinkActuate":Hr(P,"http://www.w3.org/1999/xlink","xlink:actuate",Y);break;case"xlinkArcrole":Hr(P,"http://www.w3.org/1999/xlink","xlink:arcrole",Y);break;case"xlinkRole":Hr(P,"http://www.w3.org/1999/xlink","xlink:role",Y);break;case"xlinkShow":Hr(P,"http://www.w3.org/1999/xlink","xlink:show",Y);break;case"xlinkTitle":Hr(P,"http://www.w3.org/1999/xlink","xlink:title",Y);break;case"xlinkType":Hr(P,"http://www.w3.org/1999/xlink","xlink:type",Y);break;case"xmlBase":Hr(P,"http://www.w3.org/XML/1998/namespace","xml:base",Y);break;case"xmlLang":Hr(P,"http://www.w3.org/XML/1998/namespace","xml:lang",Y);break;case"xmlSpace":Hr(P,"http://www.w3.org/XML/1998/namespace","xml:space",Y);break;case"is":At(P,"is",Y);break;case"innerText":case"textContent":break;default:(!(2<M.length)||M[0]!=="o"&&M[0]!=="O"||M[1]!=="n"&&M[1]!=="N")&&(M=ns.get(M)||M,At(P,M,Y))}}function oP(P,E,M,Y,ne,le){switch(M){case"style":vc(P,Y,le);break;case"dangerouslySetInnerHTML":if(Y!=null){if(typeof Y!="object"||!("__html"in Y))throw Error(n(61));if(M=Y.__html,M!=null){if(ne.children!=null)throw Error(n(60));P.innerHTML=M}}break;case"children":typeof Y=="string"?Fo(P,Y):(typeof Y=="number"||typeof Y=="bigint")&&Fo(P,""+Y);break;case"onScroll":Y!=null&&xn("scroll",P);break;case"onScrollEnd":Y!=null&&xn("scrollend",P);break;case"onClick":Y!=null&&(P.onclick=ra);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!is.hasOwnProperty(M))e:{if(M[0]==="o"&&M[1]==="n"&&(ne=M.endsWith("Capture"),E=M.slice(2,ne?M.length-7:void 0),le=P[dr]||null,le=le!=null?le[M]:null,typeof le=="function"&&P.removeEventListener(E,le,ne),typeof Y=="function")){typeof le!="function"&&le!==null&&(M in P?P[M]=null:P.hasAttribute(M)&&P.removeAttribute(M)),P.addEventListener(E,Y,ne);break e}M in P?P[M]=Y:Y===!0?P.setAttribute(M,""):At(P,M,Y)}}}function ll(P,E,M){switch(E){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":xn("error",P),xn("load",P);var Y=!1,ne=!1,le;for(le in M)if(M.hasOwnProperty(le)){var Le=M[le];if(Le!=null)switch(le){case"src":Y=!0;break;case"srcSet":ne=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n(137,E));default:wo(P,E,le,Le,M,null)}}ne&&wo(P,E,"srcSet",M.srcSet,M,null),Y&&wo(P,E,"src",M.src,M,null);return;case"input":xn("invalid",P);var tt=le=Le=ne=null,_t=null,$t=null;for(Y in M)if(M.hasOwnProperty(Y)){var hr=M[Y];if(hr!=null)switch(Y){case"name":ne=hr;break;case"type":Le=hr;break;case"checked":_t=hr;break;case"defaultChecked":$t=hr;break;case"value":le=hr;break;case"defaultValue":tt=hr;break;case"children":case"dangerouslySetInnerHTML":if(hr!=null)throw Error(n(137,E));break;default:wo(P,E,Y,hr,M,null)}}Qs(P,le,tt,_t,$t,Le,ne,!1);return;case"select":xn("invalid",P),Y=Le=le=null;for(ne in M)if(M.hasOwnProperty(ne)&&(tt=M[ne],tt!=null))switch(ne){case"value":le=tt;break;case"defaultValue":Le=tt;break;case"multiple":Y=tt;default:wo(P,E,ne,tt,M,null)}E=le,M=Le,P.multiple=!!Y,E!=null?Sl(P,!!Y,E,!1):M!=null&&Sl(P,!!Y,M,!0);return;case"textarea":xn("invalid",P),le=ne=Y=null;for(Le in M)if(M.hasOwnProperty(Le)&&(tt=M[Le],tt!=null))switch(Le){case"value":Y=tt;break;case"defaultValue":ne=tt;break;case"children":le=tt;break;case"dangerouslySetInnerHTML":if(tt!=null)throw Error(n(91));break;default:wo(P,E,Le,tt,M,null)}ys(P,Y,ne,le);return;case"option":for(_t in M)if(M.hasOwnProperty(_t)&&(Y=M[_t],Y!=null))switch(_t){case"selected":P.selected=Y&&typeof Y!="function"&&typeof Y!="symbol";break;default:wo(P,E,_t,Y,M,null)}return;case"dialog":xn("beforetoggle",P),xn("toggle",P),xn("cancel",P),xn("close",P);break;case"iframe":case"object":xn("load",P);break;case"video":case"audio":for(Y=0;Y<$y.length;Y++)xn($y[Y],P);break;case"image":xn("error",P),xn("load",P);break;case"details":xn("toggle",P);break;case"embed":case"source":case"link":xn("error",P),xn("load",P);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for($t in M)if(M.hasOwnProperty($t)&&(Y=M[$t],Y!=null))switch($t){case"children":case"dangerouslySetInnerHTML":throw Error(n(137,E));default:wo(P,E,$t,Y,M,null)}return;default:if(Ls(E)){for(hr in M)M.hasOwnProperty(hr)&&(Y=M[hr],Y!==void 0&&oP(P,E,hr,Y,M,void 0));return}}for(tt in M)M.hasOwnProperty(tt)&&(Y=M[tt],Y!=null&&wo(P,E,tt,Y,M,null))}function EL(P,E,M,Y){switch(E){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var ne=null,le=null,Le=null,tt=null,_t=null,$t=null,hr=null;for(tr in M){var mr=M[tr];if(M.hasOwnProperty(tr)&&mr!=null)switch(tr){case"checked":break;case"value":break;case"defaultValue":_t=mr;default:Y.hasOwnProperty(tr)||wo(P,E,tr,null,Y,mr)}}for(var Kt in Y){var tr=Y[Kt];if(mr=M[Kt],Y.hasOwnProperty(Kt)&&(tr!=null||mr!=null))switch(Kt){case"type":le=tr;break;case"name":ne=tr;break;case"checked":$t=tr;break;case"defaultChecked":hr=tr;break;case"value":Le=tr;break;case"defaultValue":tt=tr;break;case"children":case"dangerouslySetInnerHTML":if(tr!=null)throw Error(n(137,E));break;default:tr!==mr&&wo(P,E,Kt,tr,Y,mr)}}lu(P,Le,tt,_t,$t,hr,le,ne);return;case"select":tr=Le=tt=Kt=null;for(le in M)if(_t=M[le],M.hasOwnProperty(le)&&_t!=null)switch(le){case"value":break;case"multiple":tr=_t;default:Y.hasOwnProperty(le)||wo(P,E,le,null,Y,_t)}for(ne in Y)if(le=Y[ne],_t=M[ne],Y.hasOwnProperty(ne)&&(le!=null||_t!=null))switch(ne){case"value":Kt=le;break;case"defaultValue":tt=le;break;case"multiple":Le=le;default:le!==_t&&wo(P,E,ne,le,Y,_t)}E=tt,M=Le,Y=tr,Kt!=null?Sl(P,!!M,Kt,!1):!!Y!=!!M&&(E!=null?Sl(P,!!M,E,!0):Sl(P,!!M,M?[]:"",!1));return;case"textarea":tr=Kt=null;for(tt in M)if(ne=M[tt],M.hasOwnProperty(tt)&&ne!=null&&!Y.hasOwnProperty(tt))switch(tt){case"value":break;case"children":break;default:wo(P,E,tt,null,Y,ne)}for(Le in Y)if(ne=Y[Le],le=M[Le],Y.hasOwnProperty(Le)&&(ne!=null||le!=null))switch(Le){case"value":Kt=ne;break;case"defaultValue":tr=ne;break;case"children":break;case"dangerouslySetInnerHTML":if(ne!=null)throw Error(n(91));break;default:ne!==le&&wo(P,E,Le,ne,Y,le)}uu(P,Kt,tr);return;case"option":for(var ri in M)if(Kt=M[ri],M.hasOwnProperty(ri)&&Kt!=null&&!Y.hasOwnProperty(ri))switch(ri){case"selected":P.selected=!1;break;default:wo(P,E,ri,null,Y,Kt)}for(_t in Y)if(Kt=Y[_t],tr=M[_t],Y.hasOwnProperty(_t)&&Kt!==tr&&(Kt!=null||tr!=null))switch(_t){case"selected":P.selected=Kt&&typeof Kt!="function"&&typeof Kt!="symbol";break;default:wo(P,E,_t,Kt,Y,tr)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Oi in M)Kt=M[Oi],M.hasOwnProperty(Oi)&&Kt!=null&&!Y.hasOwnProperty(Oi)&&wo(P,E,Oi,null,Y,Kt);for($t in Y)if(Kt=Y[$t],tr=M[$t],Y.hasOwnProperty($t)&&Kt!==tr&&(Kt!=null||tr!=null))switch($t){case"children":case"dangerouslySetInnerHTML":if(Kt!=null)throw Error(n(137,E));break;default:wo(P,E,$t,Kt,Y,tr)}return;default:if(Ls(E)){for(var Oo in M)Kt=M[Oo],M.hasOwnProperty(Oo)&&Kt!==void 0&&!Y.hasOwnProperty(Oo)&&oP(P,E,Oo,void 0,Y,Kt);for(hr in Y)Kt=Y[hr],tr=M[hr],!Y.hasOwnProperty(hr)||Kt===tr||Kt===void 0&&tr===void 0||oP(P,E,hr,Kt,Y,tr);return}}for(var Ft in M)Kt=M[Ft],M.hasOwnProperty(Ft)&&Kt!=null&&!Y.hasOwnProperty(Ft)&&wo(P,E,Ft,null,Y,Kt);for(mr in Y)Kt=Y[mr],tr=M[mr],!Y.hasOwnProperty(mr)||Kt===tr||Kt==null&&tr==null||wo(P,E,mr,Kt,Y,tr)}function aP(P){switch(P){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Xy(){if(typeof performance.getEntriesByType=="function"){for(var P=0,E=0,M=performance.getEntriesByType("resource"),Y=0;Y<M.length;Y++){var ne=M[Y],le=ne.transferSize,Le=ne.initiatorType,tt=ne.duration;if(le&&tt&&aP(Le)){for(Le=0,tt=ne.responseEnd,Y+=1;Y<M.length;Y++){var _t=M[Y],$t=_t.startTime;if($t>tt)break;var hr=_t.transferSize,mr=_t.initiatorType;hr&&aP(mr)&&(_t=_t.responseEnd,Le+=hr*(_t<tt?1:(tt-$t)/(_t-$t)))}if(--Y,E+=8*(le+Le)/(ne.duration/1e3),P++,10<P)break}}if(0<P)return E/P/1e6}return navigator.connection&&(P=navigator.connection.downlink,typeof P=="number")?P:5}var Ky=null,sP=null;function Zy(P){return P.nodeType===9?P:P.ownerDocument}function Jy(P){switch(P){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Tu(P,E){if(P===0)switch(E){case"svg":return 1;case"math":return 2;default:return 0}return P===1&&E==="foreignObject"?0:P}function tp(P,E){return P==="textarea"||P==="noscript"||typeof E.children=="string"||typeof E.children=="number"||typeof E.children=="bigint"||typeof E.dangerouslySetInnerHTML=="object"&&E.dangerouslySetInnerHTML!==null&&E.dangerouslySetInnerHTML.__html!=null}var lP=null;function AL(){var P=window.event;return P&&P.type==="popstate"?P===lP?!1:(lP=P,!0):(lP=null,!1)}var nD=typeof setTimeout=="function"?setTimeout:void 0,wL=typeof clearTimeout=="function"?clearTimeout:void 0,oD=typeof Promise=="function"?Promise:void 0,aD=typeof queueMicrotask=="function"?queueMicrotask:typeof oD<"u"?function(P){return oD.resolve(null).then(P).catch(ih)}:nD;function ih(P){setTimeout(function(){throw P})}function Ni(P){return P==="head"}function uP(P,E){var M=E,Y=0;do{var ne=M.nextSibling;if(P.removeChild(M),ne&&ne.nodeType===8)if(M=ne.data,M==="/$"||M==="/&"){if(Y===0){P.removeChild(ne),cv(E);return}Y--}else if(M==="$"||M==="$?"||M==="$~"||M==="$!"||M==="&")Y++;else if(M==="html")Qy(P.ownerDocument.documentElement);else if(M==="head"){M=P.ownerDocument.head,Qy(M);for(var le=M.firstChild;le;){var Le=le.nextSibling,tt=le.nodeName;le[Br]||tt==="SCRIPT"||tt==="STYLE"||tt==="LINK"&&le.rel.toLowerCase()==="stylesheet"||M.removeChild(le),le=Le}}else M==="body"&&Qy(P.ownerDocument.body);M=ne}while(M);cv(E)}function ic(P,E){var M=P;P=0;do{var Y=M.nextSibling;if(M.nodeType===1?E?(M._stashedDisplay=M.style.display,M.style.display="none"):(M.style.display=M._stashedDisplay||"",M.getAttribute("style")===""&&M.removeAttribute("style")):M.nodeType===3&&(E?(M._stashedText=M.nodeValue,M.nodeValue=""):M.nodeValue=M._stashedText||""),Y&&Y.nodeType===8)if(M=Y.data,M==="/$"){if(P===0)break;P--}else M!=="$"&&M!=="$?"&&M!=="$~"&&M!=="$!"||P++;M=Y}while(M)}function zb(P){var E=P.firstChild;for(E&&E.nodeType===10&&(E=E.nextSibling);E;){var M=E;switch(E=E.nextSibling,M.nodeName){case"HTML":case"HEAD":case"BODY":zb(M),ai(M);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(M.rel.toLowerCase()==="stylesheet")continue}P.removeChild(M)}}function OL(P,E,M,Y){for(;P.nodeType===1;){var ne=M;if(P.nodeName.toLowerCase()!==E.toLowerCase()){if(!Y&&(P.nodeName!=="INPUT"||P.type!=="hidden"))break}else if(Y){if(!P[Br])switch(E){case"meta":if(!P.hasAttribute("itemprop"))break;return P;case"link":if(le=P.getAttribute("rel"),le==="stylesheet"&&P.hasAttribute("data-precedence"))break;if(le!==ne.rel||P.getAttribute("href")!==(ne.href==null||ne.href===""?null:ne.href)||P.getAttribute("crossorigin")!==(ne.crossOrigin==null?null:ne.crossOrigin)||P.getAttribute("title")!==(ne.title==null?null:ne.title))break;return P;case"style":if(P.hasAttribute("data-precedence"))break;return P;case"script":if(le=P.getAttribute("src"),(le!==(ne.src==null?null:ne.src)||P.getAttribute("type")!==(ne.type==null?null:ne.type)||P.getAttribute("crossorigin")!==(ne.crossOrigin==null?null:ne.crossOrigin))&&le&&P.hasAttribute("async")&&!P.hasAttribute("itemprop"))break;return P;default:return P}}else if(E==="input"&&P.type==="hidden"){var le=ne.name==null?null:""+ne.name;if(ne.type==="hidden"&&P.getAttribute("name")===le)return P}else return P;if(P=kc(P.nextSibling),P===null)break}return null}function vo(P,E,M){if(E==="")return null;for(;P.nodeType!==3;)if((P.nodeType!==1||P.nodeName!=="INPUT"||P.type!=="hidden")&&!M||(P=kc(P.nextSibling),P===null))return null;return P}function sD(P,E){for(;P.nodeType!==8;)if((P.nodeType!==1||P.nodeName!=="INPUT"||P.type!=="hidden")&&!E||(P=kc(P.nextSibling),P===null))return null;return P}function Wb(P){return P.data==="$?"||P.data==="$~"}function rv(P){return P.data==="$!"||P.data==="$?"&&P.ownerDocument.readyState!=="loading"}function DL(P,E){var M=P.ownerDocument;if(P.data==="$~")P._reactRetry=E;else if(P.data!=="$?"||M.readyState!=="loading")E();else{var Y=function(){E(),M.removeEventListener("DOMContentLoaded",Y)};M.addEventListener("DOMContentLoaded",Y),P._reactRetry=Y}}function kc(P){for(;P!=null;P=P.nextSibling){var E=P.nodeType;if(E===1||E===3)break;if(E===8){if(E=P.data,E==="$"||E==="$!"||E==="$?"||E==="$~"||E==="&"||E==="F!"||E==="F")break;if(E==="/$"||E==="/&")return null}}return P}var cP=null;function lD(P){P=P.nextSibling;for(var E=0;P;){if(P.nodeType===8){var M=P.data;if(M==="/$"||M==="/&"){if(E===0)return kc(P.nextSibling);E--}else M!=="$"&&M!=="$!"&&M!=="$?"&&M!=="$~"&&M!=="&"||E++}P=P.nextSibling}return null}function uD(P){P=P.previousSibling;for(var E=0;P;){if(P.nodeType===8){var M=P.data;if(M==="$"||M==="$!"||M==="$?"||M==="$~"||M==="&"){if(E===0)return P;E--}else M!=="/$"&&M!=="/&"||E++}P=P.previousSibling}return null}function cD(P,E,M){switch(E=Zy(M),P){case"html":if(P=E.documentElement,!P)throw Error(n(452));return P;case"head":if(P=E.head,!P)throw Error(n(453));return P;case"body":if(P=E.body,!P)throw Error(n(454));return P;default:throw Error(n(451))}}function Qy(P){for(var E=P.attributes;E.length;)P.removeAttributeNode(E[0]);ai(P)}var Ic=new Map,dD=new Set;function Gb(P){return typeof P.getRootNode=="function"?P.getRootNode():P.nodeType===9?P:P.ownerDocument}var nh=W.d;W.d={f:RL,r:ML,D:dP,C:LL,L:kL,m:IL,X:xu,S:Ys,M:NL};function RL(){var P=nh.f(),E=kb();return P||E}function ML(P){var E=nt(P);E!==null&&E.tag===5&&E.type==="form"?g_(E):nh.r(P)}var rp=typeof document>"u"?null:document;function fD(P,E,M){var Y=rp;if(Y&&typeof E=="string"&&E){var ne=Oa(E);ne='link[rel="'+P+'"][href="'+ne+'"]',typeof M=="string"&&(ne+='[crossorigin="'+M+'"]'),dD.has(ne)||(dD.add(ne),P={rel:P,crossOrigin:M,href:E},Y.querySelector(ne)===null&&(E=Y.createElement("link"),ll(E,"link",P),ti(E),Y.head.appendChild(E)))}}function dP(P){nh.D(P),fD("dns-prefetch",P,null)}function LL(P,E){nh.C(P,E),fD("preconnect",P,E)}function kL(P,E,M){nh.L(P,E,M);var Y=rp;if(Y&&P&&E){var ne='link[rel="preload"][as="'+Oa(E)+'"]';E==="image"&&M&&M.imageSrcSet?(ne+='[imagesrcset="'+Oa(M.imageSrcSet)+'"]',typeof M.imageSizes=="string"&&(ne+='[imagesizes="'+Oa(M.imageSizes)+'"]')):ne+='[href="'+Oa(P)+'"]';var le=ne;switch(E){case"style":le=iv(P);break;case"script":le=ov(P)}Ic.has(le)||(P=d({rel:"preload",href:E==="image"&&M&&M.imageSrcSet?void 0:P,as:E},M),Ic.set(le,P),Y.querySelector(ne)!==null||E==="style"&&Y.querySelector(nv(le))||E==="script"&&Y.querySelector(av(le))||(E=Y.createElement("link"),ll(E,"link",P),ti(E),Y.head.appendChild(E)))}}function IL(P,E){nh.m(P,E);var M=rp;if(M&&P){var Y=E&&typeof E.as=="string"?E.as:"script",ne='link[rel="modulepreload"][as="'+Oa(Y)+'"][href="'+Oa(P)+'"]',le=ne;switch(Y){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":le=ov(P)}if(!Ic.has(le)&&(P=d({rel:"modulepreload",href:P},E),Ic.set(le,P),M.querySelector(ne)===null)){switch(Y){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(M.querySelector(av(le)))return}Y=M.createElement("link"),ll(Y,"link",P),ti(Y),M.head.appendChild(Y)}}}function Ys(P,E,M){nh.S(P,E,M);var Y=rp;if(Y&&P){var ne=si(Y).hoistableStyles,le=iv(P);E=E||"default";var Le=ne.get(le);if(!Le){var tt={loading:0,preload:null};if(Le=Y.querySelector(nv(le)))tt.loading=5;else{P=d({rel:"stylesheet",href:P,"data-precedence":E},M),(M=Ic.get(le))&&fP(P,M);var _t=Le=Y.createElement("link");ti(_t),ll(_t,"link",P),_t._p=new Promise(function($t,hr){_t.onload=$t,_t.onerror=hr}),_t.addEventListener("load",function(){tt.loading|=1}),_t.addEventListener("error",function(){tt.loading|=2}),tt.loading|=4,Yb(Le,E,Y)}Le={type:"stylesheet",instance:Le,count:1,state:tt},ne.set(le,Le)}}}function xu(P,E){nh.X(P,E);var M=rp;if(M&&P){var Y=si(M).hoistableScripts,ne=ov(P),le=Y.get(ne);le||(le=M.querySelector(av(ne)),le||(P=d({src:P,async:!0},E),(E=Ic.get(ne))&&$b(P,E),le=M.createElement("script"),ti(le),ll(le,"link",P),M.head.appendChild(le)),le={type:"script",instance:le,count:1,state:null},Y.set(ne,le))}}function NL(P,E){nh.M(P,E);var M=rp;if(M&&P){var Y=si(M).hoistableScripts,ne=ov(P),le=Y.get(ne);le||(le=M.querySelector(av(ne)),le||(P=d({src:P,async:!0,type:"module"},E),(E=Ic.get(ne))&&$b(P,E),le=M.createElement("script"),ti(le),ll(le,"link",P),M.head.appendChild(le)),le={type:"script",instance:le,count:1,state:null},Y.set(ne,le))}}function hD(P,E,M,Y){var ne=(ne=de.current)?Gb(ne):null;if(!ne)throw Error(n(446));switch(P){case"meta":case"title":return null;case"style":return typeof M.precedence=="string"&&typeof M.href=="string"?(E=iv(M.href),M=si(ne).hoistableStyles,Y=M.get(E),Y||(Y={type:"style",instance:null,count:0,state:null},M.set(E,Y)),Y):{type:"void",instance:null,count:0,state:null};case"link":if(M.rel==="stylesheet"&&typeof M.href=="string"&&typeof M.precedence=="string"){P=iv(M.href);var le=si(ne).hoistableStyles,Le=le.get(P);if(Le||(ne=ne.ownerDocument||ne,Le={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},le.set(P,Le),(le=ne.querySelector(nv(P)))&&!le._p&&(Le.instance=le,Le.state.loading=5),Ic.has(P)||(M={rel:"preload",as:"style",href:M.href,crossOrigin:M.crossOrigin,integrity:M.integrity,media:M.media,hrefLang:M.hrefLang,referrerPolicy:M.referrerPolicy},Ic.set(P,M),le||FL(ne,P,M,Le.state))),E&&Y===null)throw Error(n(528,""));return Le}if(E&&Y!==null)throw Error(n(529,""));return null;case"script":return E=M.async,M=M.src,typeof M=="string"&&E&&typeof E!="function"&&typeof E!="symbol"?(E=ov(M),M=si(ne).hoistableScripts,Y=M.get(E),Y||(Y={type:"script",instance:null,count:0,state:null},M.set(E,Y)),Y):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,P))}}function iv(P){return'href="'+Oa(P)+'"'}function nv(P){return'link[rel="stylesheet"]['+P+"]"}function pD(P){return d({},P,{"data-precedence":P.precedence,precedence:null})}function FL(P,E,M,Y){P.querySelector('link[rel="preload"][as="style"]['+E+"]")?Y.loading=1:(E=P.createElement("link"),Y.preload=E,E.addEventListener("load",function(){return Y.loading|=1}),E.addEventListener("error",function(){return Y.loading|=2}),ll(E,"link",M),ti(E),P.head.appendChild(E))}function ov(P){return'[src="'+Oa(P)+'"]'}function av(P){return"script[async]"+P}function gD(P,E,M){if(E.count++,E.instance===null)switch(E.type){case"style":var Y=P.querySelector('style[data-href~="'+Oa(M.href)+'"]');if(Y)return E.instance=Y,ti(Y),Y;var ne=d({},M,{"data-href":M.href,"data-precedence":M.precedence,href:null,precedence:null});return Y=(P.ownerDocument||P).createElement("style"),ti(Y),ll(Y,"style",ne),Yb(Y,M.precedence,P),E.instance=Y;case"stylesheet":ne=iv(M.href);var le=P.querySelector(nv(ne));if(le)return E.state.loading|=4,E.instance=le,ti(le),le;Y=pD(M),(ne=Ic.get(ne))&&fP(Y,ne),le=(P.ownerDocument||P).createElement("link"),ti(le);var Le=le;return Le._p=new Promise(function(tt,_t){Le.onload=tt,Le.onerror=_t}),ll(le,"link",Y),E.state.loading|=4,Yb(le,M.precedence,P),E.instance=le;case"script":return le=ov(M.src),(ne=P.querySelector(av(le)))?(E.instance=ne,ti(ne),ne):(Y=M,(ne=Ic.get(le))&&(Y=d({},M),$b(Y,ne)),P=P.ownerDocument||P,ne=P.createElement("script"),ti(ne),ll(ne,"link",Y),P.head.appendChild(ne),E.instance=ne);case"void":return null;default:throw Error(n(443,E.type))}else E.type==="stylesheet"&&(E.state.loading&4)===0&&(Y=E.instance,E.state.loading|=4,Yb(Y,M.precedence,P));return E.instance}function Yb(P,E,M){for(var Y=M.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),ne=Y.length?Y[Y.length-1]:null,le=ne,Le=0;Le<Y.length;Le++){var tt=Y[Le];if(tt.dataset.precedence===E)le=tt;else if(le!==ne)break}le?le.parentNode.insertBefore(P,le.nextSibling):(E=M.nodeType===9?M.head:M,E.insertBefore(P,E.firstChild))}function fP(P,E){P.crossOrigin==null&&(P.crossOrigin=E.crossOrigin),P.referrerPolicy==null&&(P.referrerPolicy=E.referrerPolicy),P.title==null&&(P.title=E.title)}function $b(P,E){P.crossOrigin==null&&(P.crossOrigin=E.crossOrigin),P.referrerPolicy==null&&(P.referrerPolicy=E.referrerPolicy),P.integrity==null&&(P.integrity=E.integrity)}var em=null;function vD(P,E,M){if(em===null){var Y=new Map,ne=em=new Map;ne.set(M,Y)}else ne=em,Y=ne.get(M),Y||(Y=new Map,ne.set(M,Y));if(Y.has(P))return Y;for(Y.set(P,null),M=M.getElementsByTagName(P),ne=0;ne<M.length;ne++){var le=M[ne];if(!(le[Br]||le[vt]||P==="link"&&le.getAttribute("rel")==="stylesheet")&&le.namespaceURI!=="http://www.w3.org/2000/svg"){var Le=le.getAttribute(E)||"";Le=P+Le;var tt=Y.get(Le);tt?tt.push(le):Y.set(Le,[le])}}return Y}function yD(P,E,M){P=P.ownerDocument||P,P.head.insertBefore(M,E==="title"?P.querySelector("head > title"):null)}function jL(P,E,M){if(M===1||E.itemProp!=null)return!1;switch(P){case"meta":case"title":return!0;case"style":if(typeof E.precedence!="string"||typeof E.href!="string"||E.href==="")break;return!0;case"link":if(typeof E.rel!="string"||typeof E.href!="string"||E.href===""||E.onLoad||E.onError)break;switch(E.rel){case"stylesheet":return P=E.disabled,typeof E.precedence=="string"&&P==null;default:return!0}case"script":if(E.async&&typeof E.async!="function"&&typeof E.async!="symbol"&&!E.onLoad&&!E.onError&&E.src&&typeof E.src=="string")return!0}return!1}function mD(P){return!(P.type==="stylesheet"&&(P.state.loading&3)===0)}function sv(P,E,M,Y){if(M.type==="stylesheet"&&(typeof Y.media!="string"||matchMedia(Y.media).matches!==!1)&&(M.state.loading&4)===0){if(M.instance===null){var ne=iv(Y.href),le=E.querySelector(nv(ne));if(le){E=le._p,E!==null&&typeof E=="object"&&typeof E.then=="function"&&(P.count++,P=qb.bind(P),E.then(P,P)),M.state.loading|=4,M.instance=le,ti(le);return}le=E.ownerDocument||E,Y=pD(Y),(ne=Ic.get(ne))&&fP(Y,ne),le=le.createElement("link"),ti(le);var Le=le;Le._p=new Promise(function(tt,_t){Le.onload=tt,Le.onerror=_t}),ll(le,"link",Y),M.instance=le}P.stylesheets===null&&(P.stylesheets=new Map),P.stylesheets.set(M,E),(E=M.state.preload)&&(M.state.loading&3)===0&&(P.count++,M=qb.bind(P),E.addEventListener("load",M),E.addEventListener("error",M))}}var hP=0;function BL(P,E){return P.stylesheets&&P.count===0&&Kb(P,P.stylesheets),0<P.count||0<P.imgCount?function(M){var Y=setTimeout(function(){if(P.stylesheets&&Kb(P,P.stylesheets),P.unsuspend){var le=P.unsuspend;P.unsuspend=null,le()}},6e4+E);0<P.imgBytes&&hP===0&&(hP=62500*Xy());var ne=setTimeout(function(){if(P.waitingForImages=!1,P.count===0&&(P.stylesheets&&Kb(P,P.stylesheets),P.unsuspend)){var le=P.unsuspend;P.unsuspend=null,le()}},(P.imgBytes>hP?50:800)+E);return P.unsuspend=M,function(){P.unsuspend=null,clearTimeout(Y),clearTimeout(ne)}}:null}function qb(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Kb(this,this.stylesheets);else if(this.unsuspend){var P=this.unsuspend;this.unsuspend=null,P()}}}var Xb=null;function Kb(P,E){P.stylesheets=null,P.unsuspend!==null&&(P.count++,Xb=new Map,E.forEach(bD,P),Xb=null,qb.call(P))}function bD(P,E){if(!(E.state.loading&4)){var M=Xb.get(P);if(M)var Y=M.get(null);else{M=new Map,Xb.set(P,M);for(var ne=P.querySelectorAll("link[data-precedence],style[data-precedence]"),le=0;le<ne.length;le++){var Le=ne[le];(Le.nodeName==="LINK"||Le.getAttribute("media")!=="not all")&&(M.set(Le.dataset.precedence,Le),Y=Le)}Y&&M.set(null,Y)}ne=E.instance,Le=ne.getAttribute("data-precedence"),le=M.get(Le)||Y,le===Y&&M.set(null,ne),M.set(Le,ne),this.count++,Y=qb.bind(this),ne.addEventListener("load",Y),ne.addEventListener("error",Y),le?le.parentNode.insertBefore(ne,le.nextSibling):(P=P.nodeType===9?P.head:P,P.insertBefore(ne,P.firstChild)),E.state.loading|=4}}var lv={$$typeof:b,Provider:null,Consumer:null,_currentValue:K,_currentValue2:K,_threadCount:0};function VL(P,E,M,Y,ne,le,Le,tt,_t){this.tag=1,this.containerInfo=P,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Xr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xr(0),this.hiddenUpdates=Xr(null),this.identifierPrefix=Y,this.onUncaughtError=ne,this.onCaughtError=le,this.onRecoverableError=Le,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=_t,this.incompleteTransitions=new Map}function SD(P,E,M,Y,ne,le,Le,tt,_t,$t,hr,mr){return P=new VL(P,E,M,Le,_t,$t,hr,mr,tt),E=1,le===!0&&(E|=24),le=Wa(3,null,null,E),P.current=le,le.stateNode=P,E=Kl(),E.refCount++,P.pooledCache=E,E.refCount++,le.memoizedState={element:Y,isDehydrated:M,cache:E},gu(le),P}function _D(P){return P?(P=Hu,P):Hu}function PD(P,E,M,Y,ne,le){ne=_D(ne),Y.context===null?Y.context=ne:Y.pendingContext=ne,Y=Dc(E),Y.payload={element:M},le=le===void 0?null:le,le!==null&&(Y.callback=le),M=Rl(P,Y,E),M!==null&&(Pu(M,P,E),hf(M,P,E))}function CD(P,E){if(P=P.memoizedState,P!==null&&P.dehydrated!==null){var M=P.retryLane;P.retryLane=M!==0&&M<E?M:E}}function pP(P,E){CD(P,E),(P=P.alternate)&&CD(P,E)}function TD(P){if(P.tag===13||P.tag===31){var E=Er(P,67108864);E!==null&&Pu(E,P,67108864),pP(P,67108864)}}function xD(P){if(P.tag===13||P.tag===31){var E=ec();E=Ui(E);var M=Er(P,E);M!==null&&Pu(M,P,E),pP(P,E)}}var Zb=!0;function HL(P,E,M,Y){var ne=V.T;V.T=null;var le=W.p;try{W.p=2,gP(P,E,M,Y)}finally{W.p=le,V.T=ne}}function UL(P,E,M,Y){var ne=V.T;V.T=null;var le=W.p;try{W.p=8,gP(P,E,M,Y)}finally{W.p=le,V.T=ne}}function gP(P,E,M,Y){if(Zb){var ne=vP(Y);if(ne===null)nP(P,E,Y,Jb,M),AD(P,Y);else if(wD(ne,P,E,M,Y))Y.stopPropagation();else if(AD(P,Y),E&4&&-1<zL.indexOf(P)){for(;ne!==null;){var le=nt(ne);if(le!==null)switch(le.tag){case 3:if(le=le.stateNode,le.current.memoizedState.isDehydrated){var Le=Ge(le.pendingLanes);if(Le!==0){var tt=le;for(tt.pendingLanes|=2,tt.entangledLanes|=2;Le;){var _t=1<<31-lr(Le);tt.entanglements[1]|=_t,Le&=~_t}bf(le),(lo&6)===0&&(Gp=qe()+500,Yy(0))}}break;case 31:case 13:tt=Er(le,2),tt!==null&&Pu(tt,le,2),kb(),pP(le,2)}if(le=vP(Y),le===null&&nP(P,E,Y,Jb,M),le===ne)break;ne=le}ne!==null&&Y.stopPropagation()}else nP(P,E,Y,null,M)}}function vP(P){return P=Hn(P),yP(P)}var Jb=null;function yP(P){if(Jb=null,P=Nn(P),P!==null){var E=o(P);if(E===null)P=null;else{var M=E.tag;if(M===13){if(P=a(E),P!==null)return P;P=null}else if(M===31){if(P=s(E),P!==null)return P;P=null}else if(M===3){if(E.stateNode.current.memoizedState.isDehydrated)return E.tag===3?E.stateNode.containerInfo:null;P=null}else E!==P&&(P=null)}}return Jb=P,null}function ED(P){switch(P){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(rt()){case St:return 2;case xt:return 8;case It:case Zt:return 32;case ct:return 268435456;default:return 32}default:return 32}}var mP=!1,ip=null,np=null,op=null,tm=new Map,rm=new Map,ap=[],zL="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function AD(P,E){switch(P){case"focusin":case"focusout":ip=null;break;case"dragenter":case"dragleave":np=null;break;case"mouseover":case"mouseout":op=null;break;case"pointerover":case"pointerout":tm.delete(E.pointerId);break;case"gotpointercapture":case"lostpointercapture":rm.delete(E.pointerId)}}function qp(P,E,M,Y,ne,le){return P===null||P.nativeEvent!==le?(P={blockedOn:E,domEventName:M,eventSystemFlags:Y,nativeEvent:le,targetContainers:[ne]},E!==null&&(E=nt(E),E!==null&&TD(E)),P):(P.eventSystemFlags|=Y,E=P.targetContainers,ne!==null&&E.indexOf(ne)===-1&&E.push(ne),P)}function wD(P,E,M,Y,ne){switch(E){case"focusin":return ip=qp(ip,P,E,M,Y,ne),!0;case"dragenter":return np=qp(np,P,E,M,Y,ne),!0;case"mouseover":return op=qp(op,P,E,M,Y,ne),!0;case"pointerover":var le=ne.pointerId;return tm.set(le,qp(tm.get(le)||null,P,E,M,Y,ne)),!0;case"gotpointercapture":return le=ne.pointerId,rm.set(le,qp(rm.get(le)||null,P,E,M,Y,ne)),!0}return!1}function bP(P){var E=Nn(P.target);if(E!==null){var M=o(E);if(M!==null){if(E=M.tag,E===13){if(E=a(M),E!==null){P.blockedOn=E,In(P.priority,function(){xD(M)});return}}else if(E===31){if(E=s(M),E!==null){P.blockedOn=E,In(P.priority,function(){xD(M)});return}}else if(E===3&&M.stateNode.current.memoizedState.isDehydrated){P.blockedOn=M.tag===3?M.stateNode.containerInfo:null;return}}}P.blockedOn=null}function Qb(P){if(P.blockedOn!==null)return!1;for(var E=P.targetContainers;0<E.length;){var M=vP(P.nativeEvent);if(M===null){M=P.nativeEvent;var Y=new M.constructor(M.type,M);fo=Y,M.target.dispatchEvent(Y),fo=null}else return E=nt(M),E!==null&&TD(E),P.blockedOn=M,!1;E.shift()}return!0}function OD(P,E,M){Qb(P)&&M.delete(E)}function WL(){mP=!1,ip!==null&&Qb(ip)&&(ip=null),np!==null&&Qb(np)&&(np=null),op!==null&&Qb(op)&&(op=null),tm.forEach(OD),rm.forEach(OD)}function uv(P,E){P.blockedOn===E&&(P.blockedOn=null,mP||(mP=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,WL)))}var eS=null;function DD(P){eS!==P&&(eS=P,r.unstable_scheduleCallback(r.unstable_NormalPriority,function(){eS===P&&(eS=null);for(var E=0;E<P.length;E+=3){var M=P[E],Y=P[E+1],ne=P[E+2];if(typeof Y!="function"){if(yP(Y||M)===null)continue;break}var le=nt(M);le!==null&&(P.splice(E,3),E-=3,Gh(le,{pending:!0,data:ne,method:M.method,action:Y},Y,ne))}}))}function cv(P){function E(_t){return uv(_t,P)}ip!==null&&uv(ip,P),np!==null&&uv(np,P),op!==null&&uv(op,P),tm.forEach(E),rm.forEach(E);for(var M=0;M<ap.length;M++){var Y=ap[M];Y.blockedOn===P&&(Y.blockedOn=null)}for(;0<ap.length&&(M=ap[0],M.blockedOn===null);)bP(M),M.blockedOn===null&&ap.shift();if(M=(P.ownerDocument||P).$$reactFormReplay,M!=null)for(Y=0;Y<M.length;Y+=3){var ne=M[Y],le=M[Y+1],Le=ne[dr]||null;if(typeof le=="function")Le||DD(M);else if(Le){var tt=null;if(le&&le.hasAttribute("formAction")){if(ne=le,Le=le[dr]||null)tt=Le.formAction;else if(yP(ne)!==null)continue}else tt=Le.action;typeof tt=="function"?M[Y+1]=tt:(M.splice(Y,3),Y-=3),DD(M)}}}function eu(){function P(le){le.canIntercept&&le.info==="react-transition"&&le.intercept({handler:function(){return new Promise(function(Le){return ne=Le})},focusReset:"manual",scroll:"manual"})}function E(){ne!==null&&(ne(),ne=null),Y||setTimeout(M,20)}function M(){if(!Y&&!navigation.transition){var le=navigation.currentEntry;le&&le.url!=null&&navigation.navigate(le.url,{state:le.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var Y=!1,ne=null;return navigation.addEventListener("navigate",P),navigation.addEventListener("navigatesuccess",E),navigation.addEventListener("navigateerror",E),setTimeout(M,100),function(){Y=!0,navigation.removeEventListener("navigate",P),navigation.removeEventListener("navigatesuccess",E),navigation.removeEventListener("navigateerror",E),ne!==null&&(ne(),ne=null)}}}function im(P){this._internalRoot=P}tS.prototype.render=im.prototype.render=function(P){var E=this._internalRoot;if(E===null)throw Error(n(409));var M=E.current,Y=ec();PD(M,Y,P,E,null,null)},tS.prototype.unmount=im.prototype.unmount=function(){var P=this._internalRoot;if(P!==null){this._internalRoot=null;var E=P.containerInfo;PD(P.current,2,null,P,null,null),kb(),E[ue]=null}};function tS(P){this._internalRoot=P}tS.prototype.unstable_scheduleHydration=function(P){if(P){var E=Kr();P={blockedOn:null,target:P,priority:E};for(var M=0;M<ap.length&&E!==0&&E<ap[M].priority;M++);ap.splice(M,0,P),M===0&&bP(P)}};var RD=e.version;if(RD!=="19.2.0")throw Error(n(527,RD,"19.2.0"));W.findDOMNode=function(P){var E=P._reactInternals;if(E===void 0)throw typeof P.render=="function"?Error(n(188)):(P=Object.keys(P).join(","),Error(n(268,P)));return P=u(E),P=P!==null?c(P):null,P=P===null?null:P.stateNode,P};var GL={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:V,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var rS=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!rS.isDisabled&&rS.supportsFiber)try{Gt=rS.inject(GL),Xe=rS}catch{}}return qL.createRoot=function(P,E){if(!t(P))throw Error(n(299));var M=!1,Y="",ne=S_,le=__,Le=vO;return E!=null&&(E.unstable_strictMode===!0&&(M=!0),E.identifierPrefix!==void 0&&(Y=E.identifierPrefix),E.onUncaughtError!==void 0&&(ne=E.onUncaughtError),E.onCaughtError!==void 0&&(le=E.onCaughtError),E.onRecoverableError!==void 0&&(Le=E.onRecoverableError)),E=SD(P,1,!1,null,null,M,Y,null,ne,le,Le,eu),P[ue]=E.current,iP(P),new im(E)},qL.hydrateRoot=function(P,E,M){if(!t(P))throw Error(n(299));var Y=!1,ne="",le=S_,Le=__,tt=vO,_t=null;return M!=null&&(M.unstable_strictMode===!0&&(Y=!0),M.identifierPrefix!==void 0&&(ne=M.identifierPrefix),M.onUncaughtError!==void 0&&(le=M.onUncaughtError),M.onCaughtError!==void 0&&(Le=M.onCaughtError),M.onRecoverableError!==void 0&&(tt=M.onRecoverableError),M.formState!==void 0&&(_t=M.formState)),E=SD(P,1,!0,E,M??null,Y,ne,_t,le,Le,tt,eu),E.context=_D(null),M=E.current,Y=ec(),Y=Ui(Y),ne=Dc(Y),ne.callback=null,Rl(M,ne,Y),M=Y,E.current.lanes=M,pi(E,M),bf(E),P[ue]=E.current,iP(P),new tS(E)},qL.version="19.2.0",qL}var eK;function sRe(){if(eK)return Gz.exports;eK=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}return r(),Gz.exports=aRe(),Gz.exports}var lRe=sRe();const uRe=Lu(lRe),R6=new WeakMap,cRe=new WeakMap,DV={current:[]};let Xz=!1,vN=0;const nN=new Set,Dj=new Map;function vye(r){for(const e of r){if(DV.current.includes(e))continue;DV.current.push(e),e.recompute();const i=cRe.get(e);if(i)for(const n of i){const t=R6.get(n);t!=null&&t.length&&vye(t)}}}function dRe(r){const e={prevVal:r.prevState,currentVal:r.state};for(const i of r.listeners)i(e)}function fRe(r){const e={prevVal:r.prevState,currentVal:r.state};for(const i of r.listeners)i(e)}function yye(r){if(vN>0&&!Dj.has(r)&&Dj.set(r,r.prevState),nN.add(r),!(vN>0)&&!Xz)try{for(Xz=!0;nN.size>0;){const e=Array.from(nN);nN.clear();for(const i of e){const n=Dj.get(i)??i.prevState;i.prevState=n,dRe(i)}for(const i of e){const n=R6.get(i);n&&(DV.current.push(i),vye(n))}for(const i of e){const n=R6.get(i);if(n)for(const t of n)fRe(t)}}}finally{Xz=!1,DV.current=[],Dj.clear()}}function yN(r){vN++;try{r()}finally{if(vN--,vN===0){const e=nN.values().next().value;e&&yye(e)}}}function hRe(r){return typeof r=="function"}class pRe{constructor(e,i){this.listeners=new Set,this.subscribe=n=>{var t,o;this.listeners.add(n);const a=(o=(t=this.options)==null?void 0:t.onSubscribe)==null?void 0:o.call(t,n,this);return()=>{this.listeners.delete(n),a==null||a()}},this.prevState=e,this.state=e,this.options=i}setState(e){var i,n,t;this.prevState=this.state,(i=this.options)!=null&&i.updateFn?this.state=this.options.updateFn(this.prevState)(e):hRe(e)?this.state=e(this.prevState):this.state=e,(t=(n=this.options)==null?void 0:n.onUpdate)==null||t.call(n),yye(this)}}const OS="__TSR_index",tK="popstate",rK="beforeunload";function gRe(r){let e=r.getLocation();const i=new Set,n=a=>{e=r.getLocation(),i.forEach(s=>s({location:e,action:a}))},t=a=>{r.notifyOnIndexChange??!0?n(a):e=r.getLocation()},o=async({task:a,navigateOpts:s,...l})=>{var f,h;if((s==null?void 0:s.ignoreBlocker)??!1){a();return}const c=((f=r.getBlockers)==null?void 0:f.call(r))??[],d=l.type==="PUSH"||l.type==="REPLACE";if(typeof document<"u"&&c.length&&d)for(const p of c){const g=RV(l.path,l.state);if(await p.blockerFn({currentLocation:e,nextLocation:g,action:l.type})){(h=r.onBlocked)==null||h.call(r);return}}a()};return{get location(){return e},get length(){return r.getLength()},subscribers:i,subscribe:a=>(i.add(a),()=>{i.delete(a)}),push:(a,s,l)=>{const u=e.state[OS];s=iK(u+1,s),o({task:()=>{r.pushState(a,s),n({type:"PUSH"})},navigateOpts:l,type:"PUSH",path:a,state:s})},replace:(a,s,l)=>{const u=e.state[OS];s=iK(u,s),o({task:()=>{r.replaceState(a,s),n({type:"REPLACE"})},navigateOpts:l,type:"REPLACE",path:a,state:s})},go:(a,s)=>{o({task:()=>{r.go(a),t({type:"GO",index:a})},navigateOpts:s,type:"GO"})},back:a=>{o({task:()=>{r.back((a==null?void 0:a.ignoreBlocker)??!1),t({type:"BACK"})},navigateOpts:a,type:"BACK"})},forward:a=>{o({task:()=>{r.forward((a==null?void 0:a.ignoreBlocker)??!1),t({type:"FORWARD"})},navigateOpts:a,type:"FORWARD"})},canGoBack:()=>e.state[OS]!==0,createHref:a=>r.createHref(a),block:a=>{var l;if(!r.setBlockers)return()=>{};const s=((l=r.getBlockers)==null?void 0:l.call(r))??[];return r.setBlockers([...s,a]),()=>{var c,d;const u=((c=r.getBlockers)==null?void 0:c.call(r))??[];(d=r.setBlockers)==null||d.call(r,u.filter(f=>f!==a))}},flush:()=>{var a;return(a=r.flush)==null?void 0:a.call(r)},destroy:()=>{var a;return(a=r.destroy)==null?void 0:a.call(r)},notify:n}}function iK(r,e){e||(e={});const i=H$();return{...e,key:i,__TSR_key:i,[OS]:r}}function vRe(r){var x,A;const e=typeof document<"u"?window:void 0,i=e.history.pushState,n=e.history.replaceState;let t=[];const o=()=>t,a=w=>t=w,s=(w=>w),l=(()=>RV(`${e.location.pathname}${e.location.search}${e.location.hash}`,e.history.state));if(!((x=e.history.state)!=null&&x.__TSR_key)&&!((A=e.history.state)!=null&&A.key)){const w=H$();e.history.replaceState({[OS]:0,key:w,__TSR_key:w},"")}let u=l(),c,d=!1,f=!1,h=!1,p=!1;const g=()=>u;let v,y;const m=()=>{v&&(T._ignoreSubscribers=!0,(v.isPush?e.history.pushState:e.history.replaceState)(v.state,"",v.href),T._ignoreSubscribers=!1,v=void 0,y=void 0,c=void 0)},b=(w,L,k)=>{const D=s(L);y||(c=u),u=RV(L,k),v={href:D,state:k,isPush:(v==null?void 0:v.isPush)||w==="push"},y||(y=Promise.resolve().then(()=>m()))},S=w=>{u=l(),T.notify({type:w})},_=async()=>{if(f){f=!1;return}const w=l(),L=w.state[OS]-u.state[OS],k=L===1,D=L===-1,j=!k&&!D||d;d=!1;const N=j?"GO":D?"BACK":"FORWARD",V=j?{type:"GO",index:L}:{type:D?"BACK":"FORWARD"};if(h)h=!1;else{const W=o();if(typeof document<"u"&&W.length){for(const K of W)if(await K.blockerFn({currentLocation:u,nextLocation:w,action:N})){f=!0,e.history.go(1),T.notify(V);return}}}u=l(),T.notify(V)},C=w=>{if(p){p=!1;return}let L=!1;const k=o();if(typeof document<"u"&&k.length)for(const D of k){const j=D.enableBeforeUnload??!0;if(j===!0){L=!0;break}if(typeof j=="function"&&j()===!0){L=!0;break}}if(L)return w.preventDefault(),w.returnValue=""},T=gRe({getLocation:g,getLength:()=>e.history.length,pushState:(w,L)=>b("push",w,L),replaceState:(w,L)=>b("replace",w,L),back:w=>(w&&(h=!0),p=!0,e.history.back()),forward:w=>{w&&(h=!0),p=!0,e.history.forward()},go:w=>{d=!0,e.history.go(w)},createHref:w=>s(w),flush:m,destroy:()=>{e.history.pushState=i,e.history.replaceState=n,e.removeEventListener(rK,C,{capture:!0}),e.removeEventListener(tK,_)},onBlocked:()=>{c&&u!==c&&(u=c)},getBlockers:o,setBlockers:a,notifyOnIndexChange:!1});return e.addEventListener(rK,C,{capture:!0}),e.addEventListener(tK,_),e.history.pushState=function(...w){const L=i.apply(e.history,w);return T._ignoreSubscribers||S("PUSH"),L},e.history.replaceState=function(...w){const L=n.apply(e.history,w);return T._ignoreSubscribers||S("REPLACE"),L},T}function RV(r,e){const i=r.indexOf("#"),n=r.indexOf("?"),t=H$();return{href:r,pathname:r.substring(0,i>0?n>0?Math.min(i,n):i:n>0?n:r.length),hash:i>-1?r.substring(i):"",search:n>-1?r.slice(n,i===-1?void 0:i):"",state:e||{[OS]:0,key:t,__TSR_key:t}}}function H$(){return(Math.random()+1).toString(36).substring(7)}function MV(r){return r[r.length-1]}function yRe(r){return typeof r=="function"}function TS(r,e){return yRe(r)?r(e):r}const mRe=Object.prototype.hasOwnProperty;function cp(r,e){if(r===e)return r;const i=e,n=aK(r)&&aK(i);if(!n&&!(LV(r)&&LV(i)))return i;const t=n?r:nK(r);if(!t)return i;const o=n?i:nK(i);if(!o)return i;const a=t.length,s=o.length,l=n?new Array(s):{};let u=0;for(let c=0;c<s;c++){const d=n?c:o[c],f=r[d],h=i[d];if(f===h){l[d]=f,(n?c<a:mRe.call(r,d))&&u++;continue}if(f===null||h===null||typeof f!="object"||typeof h!="object"){l[d]=h;continue}const p=cp(f,h);l[d]=p,p===f&&u++}return a===s&&u===a?r:l}function nK(r){const e=[],i=Object.getOwnPropertyNames(r);for(const t of i){if(!Object.prototype.propertyIsEnumerable.call(r,t))return!1;e.push(t)}const n=Object.getOwnPropertySymbols(r);for(const t of n){if(!Object.prototype.propertyIsEnumerable.call(r,t))return!1;e.push(t)}return e}function LV(r){if(!oK(r))return!1;const e=r.constructor;if(typeof e>"u")return!0;const i=e.prototype;return!(!oK(i)||!i.hasOwnProperty("isPrototypeOf"))}function oK(r){return Object.prototype.toString.call(r)==="[object Object]"}function aK(r){return Array.isArray(r)&&r.length===Object.keys(r).length}function l1(r,e,i){if(r===e)return!0;if(typeof r!=typeof e)return!1;if(Array.isArray(r)&&Array.isArray(e)){if(r.length!==e.length)return!1;for(let n=0,t=r.length;n<t;n++)if(!l1(r[n],e[n],i))return!1;return!0}if(LV(r)&&LV(e)){const n=(i==null?void 0:i.ignoreUndefined)??!0;if(i!=null&&i.partial){for(const a in e)if((!n||e[a]!==void 0)&&!l1(r[a],e[a],i))return!1;return!0}let t=0;if(!n)t=Object.keys(r).length;else for(const a in r)r[a]!==void 0&&t++;let o=0;for(const a in e)if((!n||e[a]!==void 0)&&(o++,o>t||!l1(r[a],e[a],i)))return!1;return t===o}return!1}function YR(r){let e,i;const n=new Promise((t,o)=>{e=t,i=o});return n.status="pending",n.resolve=t=>{n.status="resolved",n.value=t,e(t),r==null||r(t)},n.reject=t=>{n.status="rejected",i(t)},n}function DS(r){return!!(r&&typeof r=="object"&&typeof r.then=="function")}function sK(r){try{return decodeURI(r)}catch{return r.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}}function lK(r,e){if(!r)return r;const i=/%25|%5C/gi;let n=0,t="",o;for(;(o=i.exec(r))!==null;)t+=sK(r.slice(n,o.index))+o[0],n=i.lastIndex;return t+sK(n?r.slice(n):r)}var bRe="Invariant failed";function Y0(r,e){if(!r)throw new Error(bRe)}function kV(r){const e=new Map;let i,n;const t=o=>{o.next&&(o.prev?(o.prev.next=o.next,o.next.prev=o.prev,o.next=void 0,n&&(n.next=o,o.prev=n)):(o.next.prev=void 0,i=o.next,o.next=void 0,n&&(o.prev=n,n.next=o)),n=o)};return{get(o){const a=e.get(o);if(a)return t(a),a.value},set(o,a){if(e.size>=r&&i){const l=i;e.delete(l.key),l.next&&(i=l.next,l.next.prev=void 0),l===n&&(n=void 0)}const s=e.get(o);if(s)s.value=a,t(s);else{const l={key:o,value:a,prev:n};n&&(n.next=l),n=l,i||(i=l),e.set(o,l)}},clear(){e.clear(),i=void 0,n=void 0}}}const $R=0,S1=1,_1=2,LN=3,SRe=/^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,_Re=/^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,PRe=/^([^{]*)\{\$\}([^}]*)$/;function U$(r,e,i=new Uint16Array(6)){const n=r.indexOf("/",e),t=n===-1?r.length:n,o=r.substring(e,t);if(!o||!o.includes("$"))return i[0]=$R,i[1]=e,i[2]=e,i[3]=t,i[4]=t,i[5]=t,i;if(o==="$"){const u=r.length;return i[0]=_1,i[1]=e,i[2]=e,i[3]=u,i[4]=u,i[5]=u,i}if(o.charCodeAt(0)===36)return i[0]=S1,i[1]=e,i[2]=e+1,i[3]=t,i[4]=t,i[5]=t,i;const a=o.match(PRe);if(a){const c=a[1].length;return i[0]=_1,i[1]=e+c,i[2]=e+c+1,i[3]=e+c+2,i[4]=e+c+3,i[5]=r.length,i}const s=o.match(_Re);if(s){const u=s[1],c=s[2],d=s[3],f=u.length;return i[0]=LN,i[1]=e+f,i[2]=e+f+3,i[3]=e+f+3+c.length,i[4]=t-d.length,i[5]=t,i}const l=o.match(SRe);if(l){const u=l[1],c=l[2],d=l[3],f=u.length;return i[0]=S1,i[1]=e+f,i[2]=e+f+2,i[3]=e+f+2+c.length,i[4]=t-d.length,i[5]=t,i}return i[0]=$R,i[1]=e,i[2]=e,i[3]=t,i[4]=t,i[5]=t,i}function cH(r,e,i,n,t,o,a){var l,u,c,d,f;a==null||a(i);let s=n;{const h=i.fullPath??i.from,p=h.length,g=((l=i.options)==null?void 0:l.caseSensitive)??r;for(;s<p;){const v=U$(h,s,e);let y;const m=s,b=v[5];switch(s=b+1,o++,v[0]){case $R:{const _=h.substring(v[2],v[3]);if(g){const C=(u=t.static)==null?void 0:u.get(_);if(C)y=C;else{t.static??(t.static=new Map);const T=kN(i.fullPath??i.from);T.parent=t,T.depth=o,y=T,t.static.set(_,T)}}else{const C=_.toLowerCase(),T=(c=t.staticInsensitive)==null?void 0:c.get(C);if(T)y=T;else{t.staticInsensitive??(t.staticInsensitive=new Map);const x=kN(i.fullPath??i.from);x.parent=t,x.depth=o,y=x,t.staticInsensitive.set(C,x)}}break}case S1:{const _=h.substring(m,v[1]),C=h.substring(v[4],b),T=g&&!!(_||C),x=_?T?_:_.toLowerCase():void 0,A=C?T?C:C.toLowerCase():void 0,w=(d=t.dynamic)==null?void 0:d.find(L=>L.caseSensitive===T&&L.prefix===x&&L.suffix===A);if(w)y=w;else{const L=Zz(S1,i.fullPath??i.from,T,x,A);y=L,L.depth=o,L.parent=t,t.dynamic??(t.dynamic=[]),t.dynamic.push(L)}break}case LN:{const _=h.substring(m,v[1]),C=h.substring(v[4],b),T=g&&!!(_||C),x=_?T?_:_.toLowerCase():void 0,A=C?T?C:C.toLowerCase():void 0,w=(f=t.optional)==null?void 0:f.find(L=>L.caseSensitive===T&&L.prefix===x&&L.suffix===A);if(w)y=w;else{const L=Zz(LN,i.fullPath??i.from,T,x,A);y=L,L.parent=t,L.depth=o,t.optional??(t.optional=[]),t.optional.push(L)}break}case _1:{const _=h.substring(m,v[1]),C=h.substring(v[4],b),T=g&&!!(_||C),x=_?T?_:_.toLowerCase():void 0,A=C?T?C:C.toLowerCase():void 0,w=Zz(_1,i.fullPath??i.from,T,x,A);y=w,w.parent=t,w.depth=o,t.wildcard??(t.wildcard=[]),t.wildcard.push(w)}}t=y}if((i.path||!i.children)&&!i.isRoot){const v=h.endsWith("/");v||(t.notFound=i),(!t.route||!t.isIndex&&v)&&(t.route=i,t.fullPath=i.fullPath??i.from),t.isIndex||(t.isIndex=v)}}if(i.children)for(const h of i.children)cH(r,e,h,s,t,o,a)}function Kz(r,e){if(r.prefix&&e.prefix&&r.prefix!==e.prefix){if(r.prefix.startsWith(e.prefix))return-1;if(e.prefix.startsWith(r.prefix))return 1}if(r.suffix&&e.suffix&&r.suffix!==e.suffix){if(r.suffix.endsWith(e.suffix))return-1;if(e.suffix.endsWith(r.suffix))return 1}return r.prefix&&!e.prefix?-1:!r.prefix&&e.prefix?1:r.suffix&&!e.suffix?-1:!r.suffix&&e.suffix?1:r.caseSensitive&&!e.caseSensitive?-1:!r.caseSensitive&&e.caseSensitive?1:0}function Hw(r){var e,i,n;if(r.static)for(const t of r.static.values())Hw(t);if(r.staticInsensitive)for(const t of r.staticInsensitive.values())Hw(t);if((e=r.dynamic)!=null&&e.length){r.dynamic.sort(Kz);for(const t of r.dynamic)Hw(t)}if((i=r.optional)!=null&&i.length){r.optional.sort(Kz);for(const t of r.optional)Hw(t)}if((n=r.wildcard)!=null&&n.length){r.wildcard.sort(Kz);for(const t of r.wildcard)Hw(t)}}function kN(r){return{kind:$R,depth:0,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:r,parent:null,isIndex:!1,notFound:null}}function Zz(r,e,i,n,t){return{kind:r,depth:0,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,isIndex:!1,notFound:null,caseSensitive:i,prefix:n,suffix:t}}function CRe(r,e){const i=kN("/"),n=new Uint16Array(6);for(const t of r)cH(!1,n,t,1,i,0);Hw(i),e.masksTree=i,e.flatCache=kV(1e3)}function TRe(r,e){r||(r="/");const i=e.flatCache.get(r);if(i)return i;const n=z$(r,e.masksTree);return e.flatCache.set(r,n),n}function xRe(r,e,i,n,t){r||(r="/"),n||(n="/");const o=e?`case\0${r}`:r;let a=t.singleCache.get(o);if(!a){a=kN("/");const s=new Uint16Array(6);cH(e,s,{from:r},1,a,0),t.singleCache.set(o,a)}return z$(n,a,i)}function ERe(r,e,i=!1){const n=i?r:`nofuzz\0${r}`,t=e.matchCache.get(n);if(t!==void 0)return t;r||(r="/");const o=z$(r,e.segmentTree,i);return o&&(o.branch=DRe(o.route)),e.matchCache.set(n,o),o}function ARe(r){return r==="/"?r:r.replace(/\/{1,}$/,"")}function wRe(r,e=!1,i){const n=kN(r.fullPath),t=new Uint16Array(6),o={},a={};let s=0;return cH(e,t,r,1,n,0,u=>{if(i==null||i(u,s),Y0(!(u.id in o),`Duplicate routes found with id: ${String(u.id)}`),o[u.id]=u,s!==0&&u.path){const c=ARe(u.fullPath);(!a[c]||u.fullPath.endsWith("/"))&&(a[c]=u)}s++}),Hw(n),{processedTree:{segmentTree:n,singleCache:kV(1e3),matchCache:kV(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:a}}function z$(r,e,i=!1){const n=r.split("/"),t=MRe(r,n,e,i);if(!t)return null;const o=ORe(r,n,t),a="**"in t;return a&&(o["**"]=t["**"]),{route:a?t.node.notFound??t.node.route:t.node.route,params:o}}function ORe(r,e,i){var a,s,l,u,c,d;const n=RRe(i.node);let t=null;const o={};for(let f=0,h=0,p=0;h<n.length;f++,h++,p++){const g=n[h],v=e[f],y=p;if(v&&(p+=v.length),g.kind===S1){t??(t=i.node.fullPath.split("/"));const m=t[h],b=((a=g.prefix)==null?void 0:a.length)??0;if(m.charCodeAt(b)===123){const _=((s=g.suffix)==null?void 0:s.length)??0,C=m.substring(b+2,m.length-_-1),T=v.substring(b,v.length-_);o[C]=decodeURIComponent(T)}else{const _=m.substring(1);o[_]=decodeURIComponent(v)}}else if(g.kind===LN){if(i.skipped&1<<h){f--;continue}t??(t=i.node.fullPath.split("/"));const m=t[h],b=((l=g.prefix)==null?void 0:l.length)??0,S=((u=g.suffix)==null?void 0:u.length)??0,_=m.substring(b+3,m.length-S-1),C=g.suffix||g.prefix?v.substring(b,v.length-S):v;C&&(o[_]=decodeURIComponent(C))}else if(g.kind===_1){const m=g,b=r.substring(y+(((c=m.prefix)==null?void 0:c.length)??0),r.length-(((d=m.suffix)==null?void 0:d.length)??0)),S=decodeURIComponent(b);o["*"]=S,o._splat=S;break}}return o}function DRe(r){const e=[r];for(;r.parentRoute;)r=r.parentRoute,e.push(r);return e.reverse(),e}function RRe(r){const e=Array(r.depth+1);do e[r.depth]=r,r=r.parent;while(r);return e}function MRe(r,e,i,n){const t=!MV(e),o=t&&r!=="/",a=e.length-(t?1:0),s=[{node:i,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let l=null,u=null,c=null;for(;s.length;){const d=s.pop();let{node:f,index:h,skipped:p,depth:g,statics:v,dynamics:y,optionals:m}=d;n&&f.notFound&&Rj(u,d)&&(u=d);const b=h===a;if(b){if(f.route&&(!o||f.isIndex)&&(Rj(c,d)&&(c=d),v===a&&f.isIndex))return c;if(!f.optional&&!f.wildcard)continue}const S=b?void 0:e[h];let _;if(f.wildcard&&Rj(l,d))for(const C of f.wildcard){const{prefix:T,suffix:x}=C;if(!(T&&(b||!(C.caseSensitive?S:_??(_=S.toLowerCase())).startsWith(T)))){if(x){if(b)continue;const A=e.slice(h).join("/").slice(-x.length);if((C.caseSensitive?A:A.toLowerCase())!==x)continue}l={node:C,index:h,skipped:p,depth:g,statics:v,dynamics:y,optionals:m};break}}if(f.optional){const C=p|1<<g,T=g+1;for(let x=f.optional.length-1;x>=0;x--){const A=f.optional[x];s.push({node:A,index:h,skipped:C,depth:T,statics:v,dynamics:y,optionals:m})}if(!b)for(let x=f.optional.length-1;x>=0;x--){const A=f.optional[x],{prefix:w,suffix:L}=A;if(w||L){const k=A.caseSensitive?S:_??(_=S.toLowerCase());if(w&&!k.startsWith(w)||L&&!k.endsWith(L))continue}s.push({node:A,index:h+1,skipped:p,depth:T,statics:v,dynamics:y,optionals:m+1})}}if(!b&&f.dynamic&&S)for(let C=f.dynamic.length-1;C>=0;C--){const T=f.dynamic[C],{prefix:x,suffix:A}=T;if(x||A){const w=T.caseSensitive?S:_??(_=S.toLowerCase());if(x&&!w.startsWith(x)||A&&!w.endsWith(A))continue}s.push({node:T,index:h+1,skipped:p,depth:g+1,statics:v,dynamics:y+1,optionals:m})}if(!b&&f.staticInsensitive){const C=f.staticInsensitive.get(_??(_=S.toLowerCase()));C&&s.push({node:C,index:h+1,skipped:p,depth:g+1,statics:v+1,dynamics:y,optionals:m})}if(!b&&f.static){const C=f.static.get(S);C&&s.push({node:C,index:h+1,skipped:p,depth:g+1,statics:v+1,dynamics:y,optionals:m})}}if(c&&l)return Rj(l,c)?c:l;if(c)return c;if(l)return l;if(n&&u){let d=u.index;for(let h=0;h<u.index;h++)d+=e[h].length;const f=d===r.length?"/":r.slice(d);return{node:u.node,skipped:u.skipped,"**":decodeURIComponent(f)}}return null}function Rj(r,e){return r?e.statics>r.statics||e.statics===r.statics&&(e.dynamics>r.dynamics||e.dynamics===r.dynamics&&(e.optionals>r.optionals||e.optionals===r.optionals&&(e.node.isIndex>r.node.isIndex||e.node.isIndex===r.node.isIndex&&e.depth>r.depth))):!0}function iV(r){return W$(r.filter(e=>e!==void 0).join("/"))}function W$(r){return r.replace(/\/{2,}/g,"/")}function mye(r){return r==="/"?r:r.replace(/^\/{1,}/,"")}function u1(r){const e=r.length;return e>1&&r[e-1]==="/"?r.replace(/\/{1,}$/,""):r}function nV(r){return u1(mye(r))}function IV(r,e){return r!=null&&r.endsWith("/")&&r!=="/"&&r!==`${e}/`?r.slice(0,-1):r}function LRe(r,e,i){return IV(r,i)===IV(e,i)}function kRe({base:r,to:e,trailingSlash:i="never",cache:n}){const t=e.startsWith("/"),o=!t&&e===".";let a;if(n){a=t?e:o?r:r+"\0"+e;const d=n.get(a);if(d)return d}let s;if(o)s=r.split("/");else if(t)s=e.split("/");else{for(s=r.split("/");s.length>1&&MV(s)==="";)s.pop();const d=e.split("/");for(let f=0,h=d.length;f<h;f++){const p=d[f];p===""?f?f===h-1&&s.push(p):s=[p]:p===".."?s.pop():p==="."||s.push(p)}}s.length>1&&(MV(s)===""?i==="never"&&s.pop():i==="always"&&s.push(""));let l,u="";for(let d=0;d<s.length;d++){d>0&&(u+="/");const f=s[d];if(!f)continue;l=U$(f,0,l);const h=l[0];if(h===$R){u+=f;continue}const p=l[5],g=f.substring(0,l[1]),v=f.substring(l[4],p),y=f.substring(l[2],l[3]);h===S1?u+=g||v?`${g}{$${y}}${v}`:`$${y}`:h===_1?u+=g||v?`${g}{$}${v}`:"$":u+=`${g}{-$${y}}${v}`}u=W$(u);const c=u||"/";return a&&n&&n.set(a,c),c}function Jz(r,e,i){const n=e[r];return typeof n!="string"?n:r==="_splat"?encodeURI(n):IRe(n,i)}function Qz({path:r,params:e,decodeCharMap:i}){let n=!1;const t={};if(!r||r==="/")return{interpolatedPath:"/",usedParams:t,isMissingParams:n};if(!r.includes("$"))return{interpolatedPath:r,usedParams:t,isMissingParams:n};const o=r.length;let a=0,s,l="";for(;a<o;){const c=a;s=U$(r,c,s);const d=s[5];if(a=d+1,c===d)continue;const f=s[0];if(f===$R){l+="/"+r.substring(c,d);continue}if(f===_1){const h=e._splat;t._splat=h,t["*"]=h;const p=r.substring(c,s[1]),g=r.substring(s[4],d);if(!h){n=!0,(p||g)&&(l+="/"+p+g);continue}const v=Jz("_splat",e,i);l+="/"+p+v+g;continue}if(f===S1){const h=r.substring(s[2],s[3]);!n&&!(h in e)&&(n=!0),t[h]=e[h];const p=r.substring(c,s[1]),g=r.substring(s[4],d),v=Jz(h,e,i)??"undefined";l+="/"+p+v+g;continue}if(f===LN){const h=r.substring(s[2],s[3]),p=e[h];if(p==null)continue;t[h]=p;const g=r.substring(c,s[1]),v=r.substring(s[4],d),y=Jz(h,e,i)??"";l+="/"+g+y+v;continue}}return r.endsWith("/")&&(l+="/"),{usedParams:t,interpolatedPath:l||"/",isMissingParams:n}}function IRe(r,e){let i=encodeURIComponent(r);if(e)for(const[n,t]of e)i=i.replaceAll(n,t);return i}function bp(r){return!!(r!=null&&r.isNotFound)}function NRe(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const NV="tsr-scroll-restoration-v1_3",FRe=(r,e)=>{let i;return(...n)=>{i||(i=setTimeout(()=>{r(...n),i=null},e))}};function jRe(){const r=NRe();if(!r)return null;const e=r.getItem(NV);let i=e?JSON.parse(e):{};return{state:i,set:n=>(i=TS(n,i)||i,r.setItem(NV,JSON.stringify(i)))}}const Mj=jRe(),M6=r=>r.state.__TSR_key||r.href;function BRe(r){const e=[];let i;for(;i=r.parentNode;)e.push(`${r.tagName}:nth-child(${Array.prototype.indexOf.call(i.children,r)+1})`),r=i;return`${e.reverse().join(" > ")}`.toLowerCase()}let FV=!1;function bye({storageKey:r,key:e,behavior:i,shouldScrollRestoration:n,scrollToTopSelectors:t,location:o}){var u,c;let a;try{a=JSON.parse(sessionStorage.getItem(r)||"{}")}catch(d){console.error(d);return}const s=e||((u=window.history.state)==null?void 0:u.__TSR_key),l=a[s];FV=!0;e:{if(n&&l&&Object.keys(l).length>0){for(const h in l){const p=l[h];if(h==="window")window.scrollTo({top:p.scrollY,left:p.scrollX,behavior:i});else if(h){const g=document.querySelector(h);g&&(g.scrollLeft=p.scrollX,g.scrollTop=p.scrollY)}}break e}const d=(o??window.location).hash.split("#",2)[1];if(d){const h=((c=window.history.state)==null?void 0:c.__hashScrollIntoViewOptions)??!0;if(h){const p=document.getElementById(d);p&&p.scrollIntoView(h)}break e}const f={top:0,left:0,behavior:i};if(window.scrollTo(f),t)for(const h of t){if(h==="window")continue;const p=typeof h=="function"?h():document.querySelector(h);p&&p.scrollTo(f)}}FV=!1}function VRe(r,e){if(!Mj&&!r.isServer||((r.options.scrollRestoration??!1)&&(r.isScrollRestoring=!0),r.isServer||r.isScrollRestorationSetup||!Mj))return;r.isScrollRestorationSetup=!0,FV=!1;const n=r.options.getScrollRestorationKey||M6;window.history.scrollRestoration="manual";const t=o=>{if(FV||!r.isScrollRestoring)return;let a="";if(o.target===document||o.target===window)a="window";else{const l=o.target.getAttribute("data-scroll-restoration-id");l?a=`[data-scroll-restoration-id="${l}"]`:a=BRe(o.target)}const s=n(r.state.location);Mj.set(l=>{const u=l[s]||(l[s]={}),c=u[a]||(u[a]={});if(a==="window")c.scrollX=window.scrollX||0,c.scrollY=window.scrollY||0;else if(a){const d=document.querySelector(a);d&&(c.scrollX=d.scrollLeft||0,c.scrollY=d.scrollTop||0)}return l})};typeof document<"u"&&document.addEventListener("scroll",FRe(t,100),!0),r.subscribe("onRendered",o=>{const a=n(o.toLocation);if(!r.resetNextScroll){r.resetNextScroll=!0;return}typeof r.options.scrollRestoration=="function"&&!r.options.scrollRestoration({location:r.latestLocation})||(bye({storageKey:NV,key:a,behavior:r.options.scrollRestorationBehavior,shouldScrollRestoration:r.isScrollRestoring,scrollToTopSelectors:r.options.scrollToTopSelectors,location:r.history.location}),r.isScrollRestoring&&Mj.set(s=>(s[a]||(s[a]={}),s)))})}function HRe(r){if(typeof document<"u"&&document.querySelector){const e=r.state.location.state.__hashScrollIntoViewOptions??!0;if(e&&r.state.location.hash!==""){const i=document.getElementById(r.state.location.hash);i&&i.scrollIntoView(e)}}}function URe(r,e=String){const i=new URLSearchParams;for(const n in r){const t=r[n];t!==void 0&&i.set(n,e(t))}return i.toString()}function e4(r){return r?r==="false"?!1:r==="true"?!0:+r*0===0&&+r+""===r?+r:r:""}function zRe(r){const e=new URLSearchParams(r),i={};for(const[n,t]of e.entries()){const o=i[n];o==null?i[n]=e4(t):Array.isArray(o)?o.push(e4(t)):i[n]=[o,e4(t)]}return i}const WRe=YRe(JSON.parse),GRe=$Re(JSON.stringify,JSON.parse);function YRe(r){return e=>{e[0]==="?"&&(e=e.substring(1));const i=zRe(e);for(const n in i){const t=i[n];if(typeof t=="string")try{i[n]=r(t)}catch{}}return i}}function $Re(r,e){const i=typeof e=="function";function n(t){if(typeof t=="object"&&t!==null)try{return r(t)}catch{}else if(i&&typeof t=="string")try{return e(t),r(t)}catch{}return t}return t=>{const o=URe(t,n);return o?`?${o}`:""}}const mh="__root__";function qRe(r){if(r.statusCode=r.statusCode||r.code||307,!r.reloadDocument&&typeof r.href=="string")try{new URL(r.href),r.reloadDocument=!0}catch{}const e=new Headers(r.headers);r.href&&e.get("Location")===null&&e.set("Location",r.href);const i=new Response(null,{status:r.statusCode,headers:e});if(i.options=r,r.throw)throw i;return i}function pg(r){return r instanceof Response&&!!r.options}const oV=r=>{var e;if(!r.rendered)return r.rendered=!0,(e=r.onReady)==null?void 0:e.call(r)},dH=(r,e)=>!!(r.preload&&!r.router.state.matches.some(i=>i.id===e)),Sye=(r,e)=>{var t;const i=r.router.routesById[e.routeId??""]??r.router.routeTree;!i.options.notFoundComponent&&((t=r.router.options)!=null&&t.defaultNotFoundComponent)&&(i.options.notFoundComponent=r.router.options.defaultNotFoundComponent),Y0(i.options.notFoundComponent);const n=r.matches.find(o=>o.routeId===i.id);Y0(n,"Could not find match for route: "+i.id),r.updateMatch(n.id,o=>({...o,status:"notFound",error:e,isFetching:!1})),e.routerCode==="BEFORE_LOAD"&&i.parentRoute&&(e.routeId=i.parentRoute.id,Sye(r,e))},xS=(r,e,i)=>{var n,t,o;if(!(!pg(i)&&!bp(i))){if(pg(i)&&i.redirectHandled&&!i.options.reloadDocument)throw i;if(e){(n=e._nonReactive.beforeLoadPromise)==null||n.resolve(),(t=e._nonReactive.loaderPromise)==null||t.resolve(),e._nonReactive.beforeLoadPromise=void 0,e._nonReactive.loaderPromise=void 0;const a=pg(i)?"redirected":"notFound";e._nonReactive.error=i,r.updateMatch(e.id,s=>({...s,status:a,isFetching:!1,error:i})),bp(i)&&!i.routeId&&(i.routeId=e.routeId),(o=e._nonReactive.loadPromise)==null||o.resolve()}throw pg(i)?(r.rendered=!0,i.options._fromLocation=r.location,i.redirectHandled=!0,i=r.router.resolveRedirect(i),i):(Sye(r,i),i)}},_ye=(r,e)=>{const i=r.router.getMatch(e);return!!(!r.router.isServer&&i._nonReactive.dehydrated||r.router.isServer&&i.ssr===!1)},XL=(r,e,i,n)=>{var s,l;const{id:t,routeId:o}=r.matches[e],a=r.router.looseRoutesById[o];if(i instanceof Promise)throw i;i.routerCode=n,r.firstBadMatchIndex??(r.firstBadMatchIndex=e),xS(r,r.router.getMatch(t),i);try{(l=(s=a.options).onError)==null||l.call(s,i)}catch(u){i=u,xS(r,r.router.getMatch(t),i)}r.updateMatch(t,u=>{var c,d;return(c=u._nonReactive.beforeLoadPromise)==null||c.resolve(),u._nonReactive.beforeLoadPromise=void 0,(d=u._nonReactive.loadPromise)==null||d.resolve(),{...u,error:i,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}})},XRe=(r,e,i,n)=>{var h;const t=r.router.getMatch(e),o=(h=r.matches[i-1])==null?void 0:h.id,a=o?r.router.getMatch(o):void 0;if(r.router.isShell()){t.ssr=n.id===mh;return}if((a==null?void 0:a.ssr)===!1){t.ssr=!1;return}const s=p=>p===!0&&(a==null?void 0:a.ssr)==="data-only"?"data-only":p,l=r.router.options.defaultSsr??!0;if(n.options.ssr===void 0){t.ssr=s(l);return}if(typeof n.options.ssr!="function"){t.ssr=s(n.options.ssr);return}const{search:u,params:c}=t,d={search:Lj(u,t.searchError),params:Lj(c,t.paramsError),location:r.location,matches:r.matches.map(p=>({index:p.index,pathname:p.pathname,fullPath:p.fullPath,staticData:p.staticData,id:p.id,routeId:p.routeId,search:Lj(p.search,p.searchError),params:Lj(p.params,p.paramsError),ssr:p.ssr}))},f=n.options.ssr(d);if(DS(f))return f.then(p=>{t.ssr=s(p??l)});t.ssr=s(f??l)},Pye=(r,e,i,n)=>{var a;if(n._nonReactive.pendingTimeout!==void 0)return;const t=i.options.pendingMs??r.router.options.defaultPendingMs;if(!!(r.onReady&&!r.router.isServer&&!dH(r,e)&&(i.options.loader||i.options.beforeLoad||xye(i))&&typeof t=="number"&&t!==1/0&&(i.options.pendingComponent??((a=r.router.options)==null?void 0:a.defaultPendingComponent)))){const s=setTimeout(()=>{oV(r)},t);n._nonReactive.pendingTimeout=s}},KRe=(r,e,i)=>{const n=r.router.getMatch(e);if(!n._nonReactive.beforeLoadPromise&&!n._nonReactive.loaderPromise)return;Pye(r,e,i,n);const t=()=>{const o=r.router.getMatch(e);o.preload&&(o.status==="redirected"||o.status==="notFound")&&xS(r,o,o.error)};return n._nonReactive.beforeLoadPromise?n._nonReactive.beforeLoadPromise.then(t):t()},ZRe=(r,e,i,n)=>{var T;const t=r.router.getMatch(e),o=t._nonReactive.loadPromise;t._nonReactive.loadPromise=YR(()=>{o==null||o.resolve()});const{paramsError:a,searchError:s}=t;a&&XL(r,i,a,"PARSE_PARAMS"),s&&XL(r,i,s,"VALIDATE_SEARCH"),Pye(r,e,n,t);const l=new AbortController,u=(T=r.matches[i-1])==null?void 0:T.id,c=u?r.router.getMatch(u):void 0,f={...(c==null?void 0:c.context)??r.router.options.context??void 0,...t.__routeContext};let h=!1;const p=()=>{h||(h=!0,r.updateMatch(e,x=>({...x,isFetching:"beforeLoad",fetchCount:x.fetchCount+1,abortController:l,context:f})))},g=()=>{var x;(x=t._nonReactive.beforeLoadPromise)==null||x.resolve(),t._nonReactive.beforeLoadPromise=void 0,r.updateMatch(e,A=>({...A,isFetching:!1}))};if(!n.options.beforeLoad){yN(()=>{p(),g()});return}t._nonReactive.beforeLoadPromise=YR();const{search:v,params:y,cause:m}=t,b=dH(r,e),S={search:v,abortController:l,params:y,preload:b,context:f,location:r.location,navigate:x=>r.router.navigate({...x,_fromLocation:r.location}),buildLocation:r.router.buildLocation,cause:b?"preload":m,matches:r.matches,...r.router.options.additionalContext},_=x=>{if(x===void 0){yN(()=>{p(),g()});return}(pg(x)||bp(x))&&(p(),XL(r,i,x,"BEFORE_LOAD")),yN(()=>{p(),r.updateMatch(e,A=>({...A,__beforeLoadContext:x,context:{...A.context,...x}})),g()})};let C;try{if(C=n.options.beforeLoad(S),DS(C))return p(),C.catch(x=>{XL(r,i,x,"BEFORE_LOAD")}).then(_)}catch(x){p(),XL(r,i,x,"BEFORE_LOAD")}_(C)},JRe=(r,e)=>{const{id:i,routeId:n}=r.matches[e],t=r.router.looseRoutesById[n],o=()=>{if(r.router.isServer){const l=XRe(r,i,e,t);if(DS(l))return l.then(s)}return s()},a=()=>ZRe(r,i,e,t),s=()=>{if(_ye(r,i))return;const l=KRe(r,i,t);return DS(l)?l.then(a):a()};return o()},mN=(r,e,i)=>{var o,a,s,l,u,c;const n=r.router.getMatch(e);if(!n||!i.options.head&&!i.options.scripts&&!i.options.headers)return;const t={matches:r.matches,match:n,params:n.params,loaderData:n.loaderData};return Promise.all([(a=(o=i.options).head)==null?void 0:a.call(o,t),(l=(s=i.options).scripts)==null?void 0:l.call(s,t),(c=(u=i.options).headers)==null?void 0:c.call(u,t)]).then(([d,f,h])=>{const p=d==null?void 0:d.meta,g=d==null?void 0:d.links,v=d==null?void 0:d.scripts,y=d==null?void 0:d.styles;return{meta:p,links:g,headScripts:v,headers:h,scripts:f,styles:y}})},Cye=(r,e,i,n)=>{const t=r.matchPromises[i-1],{params:o,loaderDeps:a,abortController:s,cause:l}=r.router.getMatch(e);let u=r.router.options.context??{};for(let d=0;d<=i;d++){const f=r.matches[d];if(!f)continue;const h=r.router.getMatch(f.id);h&&(u={...u,...h.__routeContext??{},...h.__beforeLoadContext??{}})}const c=dH(r,e);return{params:o,deps:a,preload:!!c,parentMatchPromise:t,abortController:s,context:u,location:r.location,navigate:d=>r.router.navigate({...d,_fromLocation:r.location}),cause:c?"preload":l,route:n,...r.router.options.additionalContext}},uK=async(r,e,i,n)=>{var t,o,a,s,l,u;try{const c=r.router.getMatch(e);try{(!r.router.isServer||c.ssr===!0)&&Tye(n);const d=(o=(t=n.options).loader)==null?void 0:o.call(t,Cye(r,e,i,n)),f=n.options.loader&&DS(d);if(!!(f||n._lazyPromise||n._componentsPromise||n.options.head||n.options.scripts||n.options.headers||c._nonReactive.minPendingPromise)&&r.updateMatch(e,y=>({...y,isFetching:"loader"})),n.options.loader){const y=f?await d:d;xS(r,r.router.getMatch(e),y),y!==void 0&&r.updateMatch(e,m=>({...m,loaderData:y}))}n._lazyPromise&&await n._lazyPromise;const p=mN(r,e,n),g=p?await p:void 0,v=c._nonReactive.minPendingPromise;v&&await v,n._componentsPromise&&await n._componentsPromise,r.updateMatch(e,y=>({...y,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),...g}))}catch(d){let f=d;const h=c._nonReactive.minPendingPromise;h&&await h,bp(d)&&await((s=(a=n.options.notFoundComponent)==null?void 0:a.preload)==null?void 0:s.call(a)),xS(r,r.router.getMatch(e),d);try{(u=(l=n.options).onError)==null||u.call(l,d)}catch(v){f=v,xS(r,r.router.getMatch(e),v)}const p=mN(r,e,n),g=p?await p:void 0;r.updateMatch(e,v=>({...v,error:f,status:"error",isFetching:!1,...g}))}}catch(c){const d=r.router.getMatch(e);if(d){const f=mN(r,e,n);if(f){const h=await f;r.updateMatch(e,p=>({...p,...h}))}d._nonReactive.loaderPromise=void 0}xS(r,d,c)}},QRe=async(r,e)=>{var u,c;const{id:i,routeId:n}=r.matches[e];let t=!1,o=!1;const a=r.router.looseRoutesById[n];if(_ye(r,i)){if(r.router.isServer){const d=mN(r,i,a);if(d){const f=await d;r.updateMatch(i,h=>({...h,...f}))}return r.router.getMatch(i)}}else{const d=r.router.getMatch(i);if(d._nonReactive.loaderPromise){if(d.status==="success"&&!r.sync&&!d.preload)return d;await d._nonReactive.loaderPromise;const f=r.router.getMatch(i),h=f._nonReactive.error||f.error;h&&xS(r,f,h)}else{const f=Date.now()-d.updatedAt,h=dH(r,i),p=h?a.options.preloadStaleTime??r.router.options.defaultPreloadStaleTime??3e4:a.options.staleTime??r.router.options.defaultStaleTime??0,g=a.options.shouldReload,v=typeof g=="function"?g(Cye(r,i,e,a)):g,y=!!h&&!r.router.state.matches.some(_=>_.id===i),m=r.router.getMatch(i);m._nonReactive.loaderPromise=YR(),y!==m.preload&&r.updateMatch(i,_=>({..._,preload:y}));const{status:b,invalid:S}=m;if(t=b==="success"&&(S||(v??f>p)),!(h&&a.options.preload===!1))if(t&&!r.sync)o=!0,(async()=>{var _,C;try{await uK(r,i,e,a);const T=r.router.getMatch(i);(_=T._nonReactive.loaderPromise)==null||_.resolve(),(C=T._nonReactive.loadPromise)==null||C.resolve(),T._nonReactive.loaderPromise=void 0}catch(T){pg(T)&&await r.router.navigate(T.options)}})();else if(b!=="success"||t&&r.sync)await uK(r,i,e,a);else{const _=mN(r,i,a);if(_){const C=await _;r.updateMatch(i,T=>({...T,...C}))}}}}const s=r.router.getMatch(i);o||((u=s._nonReactive.loaderPromise)==null||u.resolve(),(c=s._nonReactive.loadPromise)==null||c.resolve()),clearTimeout(s._nonReactive.pendingTimeout),s._nonReactive.pendingTimeout=void 0,o||(s._nonReactive.loaderPromise=void 0),s._nonReactive.dehydrated=void 0;const l=o?s.isFetching:!1;return l!==s.isFetching||s.invalid!==!1?(r.updateMatch(i,d=>({...d,isFetching:l,invalid:!1})),r.router.getMatch(i)):s};async function cK(r){const e=Object.assign(r,{matchPromises:[]});!e.router.isServer&&e.router.state.matches.some(i=>i._forcePending)&&oV(e);try{for(let t=0;t<e.matches.length;t++){const o=JRe(e,t);DS(o)&&await o}const i=e.firstBadMatchIndex??e.matches.length;for(let t=0;t<i;t++)e.matchPromises.push(QRe(e,t));await Promise.all(e.matchPromises);const n=oV(e);DS(n)&&await n}catch(i){if(bp(i)&&!e.preload){const n=oV(e);throw DS(n)&&await n,i}if(pg(i))throw i}return e.matches}async function Tye(r){if(!r._lazyLoaded&&r._lazyPromise===void 0&&(r.lazyFn?r._lazyPromise=r.lazyFn().then(e=>{const{id:i,...n}=e.options;Object.assign(r.options,n),r._lazyLoaded=!0,r._lazyPromise=void 0}):r._lazyLoaded=!0),!r._componentsLoaded&&r._componentsPromise===void 0){const e=()=>{var n;const i=[];for(const t of Eye){const o=(n=r.options[t])==null?void 0:n.preload;o&&i.push(o())}if(i.length)return Promise.all(i).then(()=>{r._componentsLoaded=!0,r._componentsPromise=void 0});r._componentsLoaded=!0,r._componentsPromise=void 0};r._componentsPromise=r._lazyPromise?r._lazyPromise.then(e):e()}return r._componentsPromise}function Lj(r,e){return e?{status:"error",error:e}:{status:"success",value:r}}function xye(r){var e;for(const i of Eye)if((e=r.options[i])!=null&&e.preload)return!0;return!1}const Eye=["component","errorComponent","pendingComponent","notFoundComponent"];function eMe(r){return{input:({url:e})=>{for(const i of r)e=Aye(i,e);return e},output:({url:e})=>{for(let i=r.length-1;i>=0;i--)e=wye(r[i],e);return e}}}function tMe(r){const e=nV(r.basepath),i=`/${e}`,n=`${i}/`,t=r.caseSensitive?i:i.toLowerCase(),o=r.caseSensitive?n:n.toLowerCase();return{input:({url:a})=>{const s=r.caseSensitive?a.pathname:a.pathname.toLowerCase();return s===t?a.pathname="/":s.startsWith(o)&&(a.pathname=a.pathname.slice(i.length)),a},output:({url:a})=>(a.pathname=iV(["/",e,a.pathname]),a)}}function Aye(r,e){var n;const i=(n=r==null?void 0:r.input)==null?void 0:n.call(r,{url:e});if(i){if(typeof i=="string")return new URL(i);if(i instanceof URL)return i}return e}function wye(r,e){var n;const i=(n=r==null?void 0:r.output)==null?void 0:n.call(r,{url:e});if(i){if(typeof i=="string")return new URL(i);if(i instanceof URL)return i}return e}function c1(r){const e=r.resolvedLocation,i=r.location,n=(e==null?void 0:e.pathname)!==i.pathname,t=(e==null?void 0:e.href)!==i.href,o=(e==null?void 0:e.hash)!==i.hash;return{fromLocation:e,toLocation:i,pathChanged:n,hrefChanged:t,hashChanged:o}}class rMe{constructor(e){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=i=>i(),this.update=i=>{var f;i.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const n=this.options,t=this.basepath??(n==null?void 0:n.basepath)??"/",o=this.basepath===void 0,a=n==null?void 0:n.rewrite;this.options={...n,...i},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(h=>[encodeURIComponent(h),h])):void 0,(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.isServer||(this.history=vRe())),this.origin=this.options.origin,this.origin||(!this.isServer&&(window!=null&&window.origin)&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),!this.__store&&this.latestLocation&&(this.__store=new pRe(nMe(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(h=>!["redirected"].includes(h.status))}}}),VRe(this));let s=!1;const l=this.options.basepath??"/",u=this.options.rewrite;if(o||t!==l||a!==u){this.basepath=l;const h=[];nV(l)!==""&&h.push(tMe({basepath:l})),u&&h.push(u),this.rewrite=h.length===0?void 0:h.length===1?h[0]:eMe(h),this.history&&this.updateLatestLocation(),s=!0}s&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<"u"&&"CSS"in window&&typeof((f=window.CSS)==null?void 0:f.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const{routesById:i,routesByPath:n,processedTree:t}=wRe(this.routeTree,this.options.caseSensitive,(a,s)=>{a.init({originalIndex:s})});this.options.routeMasks&&CRe(this.options.routeMasks,t),this.routesById=i,this.routesByPath=n,this.processedTree=t;const o=this.options.notFoundRoute;o&&(o.init({originalIndex:99999999999}),this.routesById[o.id]=o)},this.subscribe=(i,n)=>{const t={eventType:i,fn:n};return this.subscribers.add(t),()=>{this.subscribers.delete(t)}},this.emit=i=>{this.subscribers.forEach(n=>{n.eventType===i.type&&n.fn(i)})},this.parseLocation=(i,n)=>{const t=({href:l,state:u})=>{const c=new URL(l,this.origin),d=Aye(this.rewrite,c),f=this.options.parseSearch(d.search),h=this.options.stringifySearch(f);d.search=h;const p=d.href.replace(d.origin,""),{pathname:g,hash:v}=d;return{href:p,publicHref:l,url:d.href,pathname:lK(g),searchStr:h,search:cp(n==null?void 0:n.search,f),hash:v.split("#").reverse()[0]??"",state:cp(n==null?void 0:n.state,u)}},o=t(i),{__tempLocation:a,__tempKey:s}=o.state;if(a&&(!s||s===this.tempLocationKey)){const l=t(a);return l.state.key=o.state.key,l.state.__TSR_key=o.state.__TSR_key,delete l.state.__tempLocation,{...l,maskedLocation:o}}return o},this.resolvePathCache=kV(1e3),this.resolvePathWithBase=(i,n)=>kRe({base:i,to:W$(n),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(i,n,t)=>typeof i=="string"?this.matchRoutesInternal({pathname:i,search:n},t):this.matchRoutesInternal(i,n),this.getMatchedRoutes=i=>oMe({pathname:i,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=i=>{const n=this.getMatch(i);n&&(n.abortController.abort(),clearTimeout(n._nonReactive.pendingTimeout),n._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const i=this.state.matches.filter(o=>o.status==="pending"),n=this.state.matches.filter(o=>o.isFetching==="loader");new Set([...this.state.pendingMatches??[],...i,...n]).forEach(o=>{this.cancelMatch(o.id)})},this.buildLocation=i=>{const n=(o={})=>{var w,L;const a=o._fromLocation||this.pendingBuiltLocation||this.latestLocation,s=this.matchRoutes(a,{_buildLocation:!0}),l=MV(s);o.from;const u=o.unsafeRelative==="path"?a.pathname:o.from??l.fullPath,c=this.resolvePathWithBase(u,"."),d=l.search,f={...l.params},h=o.to?this.resolvePathWithBase(c,`${o.to}`):this.resolvePathWithBase(c,"."),p=o.params===!1||o.params===null?{}:(o.params??!0)===!0?f:Object.assign(f,TS(o.params,f)),g=Qz({path:h,params:p}).interpolatedPath,v=this.matchRoutes(g,void 0,{_buildLocation:!0}).map(k=>this.looseRoutesById[k.routeId]);if(Object.keys(p).length>0)for(const k of v){const D=((w=k.options.params)==null?void 0:w.stringify)??k.options.stringifyParams;D&&Object.assign(p,D(p))}const y=i.leaveParams?h:lK(Qz({path:h,params:p,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath);let m=d;if(i._includeValidateSearch&&((L=this.options.search)!=null&&L.strict)){const k={};v.forEach(D=>{if(D.options.validateSearch)try{Object.assign(k,L6(D.options.validateSearch,{...k,...m}))}catch{}}),m=k}m=aMe({search:m,dest:o,destRoutes:v,_includeValidateSearch:i._includeValidateSearch}),m=cp(d,m);const b=this.options.stringifySearch(m),S=o.hash===!0?a.hash:o.hash?TS(o.hash,a.hash):void 0,_=S?`#${S}`:"";let C=o.state===!0?a.state:o.state?TS(o.state,a.state):{};C=cp(a.state,C);const T=`${y}${b}${_}`,x=new URL(T,this.origin),A=wye(this.rewrite,x);return{publicHref:A.pathname+A.search+A.hash,href:T,url:A.href,pathname:y,search:m,searchStr:b,state:C,hash:S??"",unmaskOnReload:o.unmaskOnReload}},t=(o={},a)=>{const s=n(o);let l=a?n(a):void 0;if(!l){const u={};if(this.options.routeMasks){const c=TRe(s.pathname,this.processedTree);if(c){Object.assign(u,c.params);const{from:d,params:f,...h}=c.route,p=f===!1||f===null?{}:(f??!0)===!0?u:Object.assign(u,TS(f,u));a={from:i.from,...h,params:p},l=n(a)}}}return l&&(s.maskedLocation=l),s};return i.mask?t(i,{from:i.from,...i.mask}):t(i)},this.commitLocation=({viewTransition:i,ignoreBlocker:n,...t})=>{const o=()=>{const l=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];l.forEach(c=>{t.state[c]=this.latestLocation.state[c]});const u=l1(t.state,this.latestLocation.state);return l.forEach(c=>{delete t.state[c]}),u},a=u1(this.latestLocation.href)===u1(t.href),s=this.commitLocationPromise;if(this.commitLocationPromise=YR(()=>{s==null||s.resolve()}),a&&o())this.load();else{let{maskedLocation:l,hashScrollIntoView:u,...c}=t;l&&(c={...l,state:{...l.state,__tempKey:void 0,__tempLocation:{...c,search:c.searchStr,state:{...c.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(c.unmaskOnReload??this.options.unmaskOnReload??!1)&&(c.state.__tempKey=this.tempLocationKey)),c.state.__hashScrollIntoViewOptions=u??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=i,this.history[t.replace?"replace":"push"](c.publicHref,c.state,{ignoreBlocker:n})}return this.resetNextScroll=t.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:i,resetScroll:n,hashScrollIntoView:t,viewTransition:o,ignoreBlocker:a,href:s,...l}={})=>{if(s){const d=this.history.location.state.__TSR_index,f=RV(s,{__TSR_index:i?d:d+1});l.to=f.pathname,l.search=this.options.parseSearch(f.search),l.hash=f.hash.slice(1)}const u=this.buildLocation({...l,_includeValidateSearch:!0});this.pendingBuiltLocation=u;const c=this.commitLocation({...u,viewTransition:o,replace:i,resetScroll:n,hashScrollIntoView:t,ignoreBlocker:a});return Promise.resolve().then(()=>{this.pendingBuiltLocation===u&&(this.pendingBuiltLocation=void 0)}),c},this.navigate=async({to:i,reloadDocument:n,href:t,...o})=>{var a;if(!n&&t)try{new URL(`${t}`),n=!0}catch{}if(n){if(t||(t=this.buildLocation({to:i,...o}).url),!o.ignoreBlocker){const s=this.history,l=((a=s.getBlockers)==null?void 0:a.call(s))??[];for(const u of l)if(u!=null&&u.blockerFn&&await u.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return o.replace?window.location.replace(t):window.location.href=t,Promise.resolve()}return this.buildAndCommitLocation({...o,href:t,to:i,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),this.isServer){const n=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0}),t=o=>{try{return encodeURI(decodeURI(o))}catch{return o}};if(nV(t(this.latestLocation.href))!==nV(t(n.href))){let o=n.url;throw this.origin&&o.startsWith(this.origin)&&(o=o.replace(this.origin,"")||"/"),qRe({href:o})}}const i=this.matchRoutes(this.latestLocation);this.__store.setState(n=>({...n,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:i,cachedMatches:n.cachedMatches.filter(t=>!i.some(o=>o.id===t.id))}))},this.load=async i=>{let n,t,o;for(o=new Promise(s=>{this.startTransition(async()=>{var l;try{this.beforeLoad();const u=this.latestLocation,c=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...c1({resolvedLocation:c,location:u})}),this.emit({type:"onBeforeLoad",...c1({resolvedLocation:c,location:u})}),await cK({router:this,sync:i==null?void 0:i.sync,matches:this.state.pendingMatches,location:u,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let d=[],f=[],h=[];yN(()=>{this.__store.setState(p=>{const g=p.matches,v=p.pendingMatches||p.matches;return d=g.filter(y=>!v.some(m=>m.id===y.id)),f=v.filter(y=>!g.some(m=>m.id===y.id)),h=v.filter(y=>g.some(m=>m.id===y.id)),{...p,isLoading:!1,loadedAt:Date.now(),matches:v,pendingMatches:void 0,cachedMatches:[...p.cachedMatches,...d.filter(y=>y.status!=="error"&&y.status!=="notFound")]}}),this.clearExpiredCache()}),[[d,"onLeave"],[f,"onEnter"],[h,"onStay"]].forEach(([p,g])=>{p.forEach(v=>{var y,m;(m=(y=this.looseRoutesById[v.routeId].options)[g])==null||m.call(y,v)})})})})}})}catch(u){pg(u)?(n=u,this.isServer||this.navigate({...n.options,replace:!0,ignoreBlocker:!0})):bp(u)&&(t=u),this.__store.setState(c=>({...c,statusCode:n?n.status:t?404:c.matches.some(d=>d.status==="error")?500:200,redirect:n}))}this.latestLoadPromise===o&&((l=this.commitLocationPromise)==null||l.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),s()})}),this.latestLoadPromise=o,await o;this.latestLoadPromise&&o!==this.latestLoadPromise;)await this.latestLoadPromise;let a;this.hasNotFoundMatch()?a=404:this.__store.state.matches.some(s=>s.status==="error")&&(a=500),a!==void 0&&this.__store.setState(s=>({...s,statusCode:a}))},this.startViewTransition=i=>{const n=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,n&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let t;if(typeof n=="object"&&this.isViewTransitionTypesSupported){const o=this.latestLocation,a=this.state.resolvedLocation,s=typeof n.types=="function"?n.types(c1({resolvedLocation:a,location:o})):n.types;if(s===!1){i();return}t={update:i,types:s}}else t=i;document.startViewTransition(t)}else i()},this.updateMatch=(i,n)=>{this.startTransition(()=>{var o;const t=(o=this.state.pendingMatches)!=null&&o.some(a=>a.id===i)?"pendingMatches":this.state.matches.some(a=>a.id===i)?"matches":this.state.cachedMatches.some(a=>a.id===i)?"cachedMatches":"";t&&this.__store.setState(a=>{var s;return{...a,[t]:(s=a[t])==null?void 0:s.map(l=>l.id===i?n(l):l)}})})},this.getMatch=i=>{var t;const n=o=>o.id===i;return this.state.cachedMatches.find(n)??((t=this.state.pendingMatches)==null?void 0:t.find(n))??this.state.matches.find(n)},this.invalidate=i=>{const n=t=>{var o;return((o=i==null?void 0:i.filter)==null?void 0:o.call(i,t))??!0?{...t,invalid:!0,...i!=null&&i.forcePending||t.status==="error"||t.status==="notFound"?{status:"pending",error:void 0}:void 0}:t};return this.__store.setState(t=>{var o;return{...t,matches:t.matches.map(n),cachedMatches:t.cachedMatches.map(n),pendingMatches:(o=t.pendingMatches)==null?void 0:o.map(n)}}),this.shouldViewTransition=!1,this.load({sync:i==null?void 0:i.sync})},this.resolveRedirect=i=>{if(!i.options.href){const n=this.buildLocation(i.options);let t=n.url;this.origin&&t.startsWith(this.origin)&&(t=t.replace(this.origin,"")||"/"),i.options.href=n.href,i.headers.set("Location",t)}return i.headers.get("Location")||i.headers.set("Location",i.options.href),i},this.clearCache=i=>{const n=i==null?void 0:i.filter;n!==void 0?this.__store.setState(t=>({...t,cachedMatches:t.cachedMatches.filter(o=>!n(o))})):this.__store.setState(t=>({...t,cachedMatches:[]}))},this.clearExpiredCache=()=>{const i=n=>{const t=this.looseRoutesById[n.routeId];if(!t.options.loader)return!0;const o=(n.preload?t.options.preloadGcTime??this.options.defaultPreloadGcTime:t.options.gcTime??this.options.defaultGcTime)??300*1e3;return n.status==="error"?!0:Date.now()-n.updatedAt>=o};this.clearCache({filter:i})},this.loadRouteChunk=Tye,this.preloadRoute=async i=>{const n=this.buildLocation(i);let t=this.matchRoutes(n,{throwOnError:!0,preload:!0,dest:i});const o=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(s=>s.id)),a=new Set([...o,...this.state.cachedMatches.map(s=>s.id)]);yN(()=>{t.forEach(s=>{a.has(s.id)||this.__store.setState(l=>({...l,cachedMatches:[...l.cachedMatches,s]}))})});try{return t=await cK({router:this,matches:t,location:n,preload:!0,updateMatch:(s,l)=>{o.has(s)?t=t.map(u=>u.id===s?l(u):u):this.updateMatch(s,l)}}),t}catch(s){if(pg(s))return s.options.reloadDocument?void 0:await this.preloadRoute({...s.options,_fromLocation:n});bp(s)||console.error(s);return}},this.matchRoute=(i,n)=>{const t={...i,to:i.to?this.resolvePathWithBase(i.from||"",i.to):void 0,params:i.params||{},leaveParams:!0},o=this.buildLocation(t);if(n!=null&&n.pending&&this.state.status!=="pending")return!1;const s=((n==null?void 0:n.pending)===void 0?!this.state.isLoading:n.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,l=xRe(o.pathname,(n==null?void 0:n.caseSensitive)??!1,(n==null?void 0:n.fuzzy)??!1,s.pathname,this.processedTree);return!l||i.params&&!l1(l.params,i.params,{partial:!0})?!1:(n==null?void 0:n.includeSearch)??!0?l1(s.search,o.search,{partial:!0})?l.params:!1:l.params},this.hasNotFoundMatch=()=>this.__store.state.matches.some(i=>i.status==="notFound"||i.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??GRe,parseSearch:e.parseSearch??WRe}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(e,i){const n=this.getMatchedRoutes(e.pathname),{foundRoute:t,routeParams:o}=n;let{matchedRoutes:a}=n,s=!1;(t?t.path!=="/"&&o["**"]:u1(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:s=!0);const l=(()=>{if(s){if(this.options.notFoundMode!=="root")for(let d=a.length-1;d>=0;d--){const f=a[d];if(f.children)return f.id}return mh}})(),u=[],c=d=>(d==null?void 0:d.id)?d.context??this.options.context??void 0:this.options.context??void 0;return a.forEach((d,f)=>{var D,j,N;const h=u[f-1],[p,g,v]=(()=>{const V=(h==null?void 0:h.search)??e.search,W=(h==null?void 0:h._strictSearch)??void 0;try{const K=L6(d.options.validateSearch,{...V})??void 0;return[{...V,...K},{...W,...K},void 0]}catch(K){let H=K;if(K instanceof jV||(H=new jV(K.message,{cause:K})),i!=null&&i.throwOnError)throw H;return[V,{},H]}})(),y=((j=(D=d.options).loaderDeps)==null?void 0:j.call(D,{search:p}))??"",m=y?JSON.stringify(y):"",{interpolatedPath:b,usedParams:S}=Qz({path:d.fullPath,params:o,decodeCharMap:this.pathParamsDecodeCharMap}),_=d.id+b+m,C=this.getMatch(_),T=this.state.matches.find(V=>V.routeId===d.id),x=(C==null?void 0:C._strictParams)??S;let A;if(!C){const V=((N=d.options.params)==null?void 0:N.parse)??d.options.parseParams;if(V)try{Object.assign(x,V(x))}catch(W){if(bp(W)||pg(W)?A=W:A=new iMe(W.message,{cause:W}),i!=null&&i.throwOnError)throw A}}Object.assign(o,x);const w=T?"stay":"enter";let L;if(C)L={...C,cause:w,params:T?cp(T.params,o):o,_strictParams:x,search:cp(T?T.search:C.search,p),_strictSearch:g};else{const V=d.options.loader||d.options.beforeLoad||d.lazyFn||xye(d)?"pending":"success";L={id:_,ssr:this.isServer?void 0:d.options.ssr,index:f,routeId:d.id,params:T?cp(T.params,o):o,_strictParams:x,pathname:b,updatedAt:Date.now(),search:T?cp(T.search,p):p,_strictSearch:g,searchError:void 0,status:V,isFetching:!1,error:void 0,paramsError:A,__routeContext:void 0,_nonReactive:{loadPromise:YR()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:w,loaderDeps:T?cp(T.loaderDeps,y):y,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:d.options.staticData||{},fullPath:d.fullPath}}i!=null&&i.preload||(L.globalNotFound=l===d.id),L.searchError=v;const k=c(h);L.context={...k,...L.__routeContext,...L.__beforeLoadContext},u.push(L)}),u.forEach((d,f)=>{const h=this.looseRoutesById[d.routeId];if(!this.getMatch(d.id)&&(i==null?void 0:i._buildLocation)!==!0){const g=u[f-1],v=c(g);if(h.options.context){const y={deps:d.loaderDeps,params:d.params,context:v??{},location:e,navigate:m=>this.navigate({...m,_fromLocation:e}),buildLocation:this.buildLocation,cause:d.cause,abortController:d.abortController,preload:!!d.preload,matches:u};d.__routeContext=h.options.context(y)??void 0}d.context={...v,...d.__routeContext,...d.__beforeLoadContext}}}),u}}class jV extends Error{}class iMe extends Error{}function nMe(r){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:r,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function L6(r,e){if(r==null)return{};if("~standard"in r){const i=r["~standard"].validate(e);if(i instanceof Promise)throw new jV("Async validation not supported");if(i.issues)throw new jV(JSON.stringify(i.issues,void 0,2),{cause:i});return i.value}return"parse"in r?r.parse(e):typeof r=="function"?r(e):{}}function oMe({pathname:r,routesById:e,processedTree:i}){const n={},t=u1(r);let o;const a=ERe(t,i,!0);return a&&(o=a.route,Object.assign(n,a.params)),{matchedRoutes:(a==null?void 0:a.branch)||[e[mh]],routeParams:n,foundRoute:o}}function aMe({search:r,dest:e,destRoutes:i,_includeValidateSearch:n}){const t=i.reduce((s,l)=>{var c;const u=[];if("search"in l.options)(c=l.options.search)!=null&&c.middlewares&&u.push(...l.options.search.middlewares);else if(l.options.preSearchFilters||l.options.postSearchFilters){const d=({search:f,next:h})=>{let p=f;"preSearchFilters"in l.options&&l.options.preSearchFilters&&(p=l.options.preSearchFilters.reduce((v,y)=>y(v),f));const g=h(p);return"postSearchFilters"in l.options&&l.options.postSearchFilters?l.options.postSearchFilters.reduce((v,y)=>y(v),g):g};u.push(d)}if(n&&l.options.validateSearch){const d=({search:f,next:h})=>{const p=h(f);try{return{...p,...L6(l.options.validateSearch,p)??void 0}}catch{return p}};u.push(d)}return s.concat(u)},[])??[],o=({search:s})=>e.search?e.search===!0?s:TS(e.search,s):{};t.push(o);const a=(s,l)=>{if(s>=t.length)return l;const u=t[s];return u({search:l,next:d=>a(s+1,d)})};return a(0,r)}const sMe="Error preloading route! ☝️";class Oye{constructor(e){if(this.init=i=>{var u,c;this.originalIndex=i.originalIndex;const n=this.options,t=!(n!=null&&n.path)&&!(n!=null&&n.id);this.parentRoute=(c=(u=this.options).getParentRoute)==null?void 0:c.call(u),t?this._path=mh:this.parentRoute||Y0(!1);let o=t?mh:n==null?void 0:n.path;o&&o!=="/"&&(o=mye(o));const a=(n==null?void 0:n.id)||o;let s=t?mh:iV([this.parentRoute.id===mh?"":this.parentRoute.id,a]);o===mh&&(o="/"),s!==mh&&(s=iV(["/",s]));const l=s===mh?"/":iV([this.parentRoute.fullPath,o]);this._path=o,this._id=s,this._fullPath=l,this._to=l},this.addChildren=i=>this._addFileChildren(i),this._addFileChildren=i=>(Array.isArray(i)&&(this.children=i),typeof i=="object"&&i!==null&&(this.children=Object.values(i)),this),this._addFileTypes=()=>this,this.updateLoader=i=>(Object.assign(this.options,i),this),this.update=i=>(Object.assign(this.options,i),this),this.lazy=i=>(this.lazyFn=i,this),this.options=e||{},this.isRoot=!(e!=null&&e.getParentRoute),e!=null&&e.id&&(e!=null&&e.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class lMe extends Oye{constructor(e){super(e)}}function G$(r){const e=r.errorComponent??fH;return R.jsx(uMe,{getResetKey:r.getResetKey,onCatch:r.onCatch,children:({error:i,reset:n})=>i?G.createElement(e,{error:i,reset:n}):r.children})}class uMe extends G.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(e){return{resetKey:e.getResetKey()}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidUpdate(e,i){i.error&&i.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(e,i){this.props.onCatch&&this.props.onCatch(e,i)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function fH({error:r}){const[e,i]=G.useState(!1);return R.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[R.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[R.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),R.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>i(n=>!n),children:e?"Hide Error":"Show Error"})]}),R.jsx("div",{style:{height:".25rem"}}),e?R.jsx("div",{children:R.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:r.message?R.jsx("code",{children:r.message}):null})}):null]})}function cMe({children:r,fallback:e=null}){return dMe()?R.jsx(An.Fragment,{children:r}):R.jsx(An.Fragment,{children:e})}function dMe(){return An.useSyncExternalStore(fMe,()=>!0,()=>!1)}function fMe(){return()=>{}}var t4={exports:{}},r4={},i4={exports:{}},n4={};/**
 * @license React
 * use-sync-external-store-shim.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var dK;function hMe(){if(dK)return n4;dK=1;var r=$c();function e(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var i=typeof Object.is=="function"?Object.is:e,n=r.useState,t=r.useEffect,o=r.useLayoutEffect,a=r.useDebugValue;function s(d,f){var h=f(),p=n({inst:{value:h,getSnapshot:f}}),g=p[0].inst,v=p[1];return o(function(){g.value=h,g.getSnapshot=f,l(g)&&v({inst:g})},[d,h,f]),t(function(){return l(g)&&v({inst:g}),d(function(){l(g)&&v({inst:g})})},[d]),a(h),h}function l(d){var f=d.getSnapshot;d=d.value;try{var h=f();return!i(d,h)}catch{return!0}}function u(d,f){return f()}var c=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:s;return n4.useSyncExternalStore=r.useSyncExternalStore!==void 0?r.useSyncExternalStore:c,n4}var fK;function pMe(){return fK||(fK=1,i4.exports=hMe()),i4.exports}/**
 * @license React
 * use-sync-external-store-shim/with-selector.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var hK;function gMe(){if(hK)return r4;hK=1;var r=$c(),e=pMe();function i(u,c){return u===c&&(u!==0||1/u===1/c)||u!==u&&c!==c}var n=typeof Object.is=="function"?Object.is:i,t=e.useSyncExternalStore,o=r.useRef,a=r.useEffect,s=r.useMemo,l=r.useDebugValue;return r4.useSyncExternalStoreWithSelector=function(u,c,d,f,h){var p=o(null);if(p.current===null){var g={hasValue:!1,value:null};p.current=g}else g=p.current;p=s(function(){function y(C){if(!m){if(m=!0,b=C,C=f(C),h!==void 0&&g.hasValue){var T=g.value;if(h(T,C))return S=T}return S=C}if(T=S,n(b,C))return T;var x=f(C);return h!==void 0&&h(T,x)?(b=C,T):(b=C,S=x)}var m=!1,b,S,_=d===void 0?null:d;return[function(){return y(c())},_===null?void 0:function(){return y(_())}]},[c,d,f,h]);var v=t(u,p[0],p[1]);return a(function(){g.hasValue=!0,g.value=v},[v]),l(v),v},r4}var pK;function vMe(){return pK||(pK=1,t4.exports=gMe()),t4.exports}var yMe=vMe();function mMe(r,e=n=>n,i={}){const n=i.equal??bMe;return yMe.useSyncExternalStoreWithSelector(r.subscribe,()=>r.state,()=>r.state,e,n)}function bMe(r,e){if(Object.is(r,e))return!0;if(typeof r!="object"||r===null||typeof e!="object"||e===null)return!1;if(r instanceof Map&&e instanceof Map){if(r.size!==e.size)return!1;for(const[n,t]of r)if(!e.has(n)||!Object.is(t,e.get(n)))return!1;return!0}if(r instanceof Set&&e instanceof Set){if(r.size!==e.size)return!1;for(const n of r)if(!e.has(n))return!1;return!0}if(r instanceof Date&&e instanceof Date)return r.getTime()===e.getTime();const i=gK(r);if(i.length!==gK(e).length)return!1;for(let n=0;n<i.length;n++)if(!Object.prototype.hasOwnProperty.call(e,i[n])||!Object.is(r[i[n]],e[i[n]]))return!1;return!0}function gK(r){return Object.keys(r).concat(Object.getOwnPropertySymbols(r))}const o4=G.createContext(null);function Dye(){return typeof document>"u"?o4:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=o4,o4)}function wh(r){const e=G.useContext(Dye());return r==null||r.warn,e}function Df(r){const e=wh({warn:(r==null?void 0:r.router)===void 0}),i=(r==null?void 0:r.router)||e,n=G.useRef(void 0);return mMe(i.__store,t=>{if(r!=null&&r.select){if(r.structuralSharing??i.options.defaultStructuralSharing){const o=cp(n.current,r.select(t));return n.current=o,o}return r.select(t)}return t})}const hH=G.createContext(void 0),SMe=G.createContext(void 0);function zv(r){const e=G.useContext(r.from?SMe:hH);return Df({select:n=>{const t=n.matches.find(o=>r.from?r.from===o.routeId:o.id===e);if(Y0(!((r.shouldThrow??!0)&&!t),`Could not find ${r.from?`an active match from "${r.from}"`:"a nearest match!"}`),t!==void 0)return r.select?r.select(t):t},structuralSharing:r.structuralSharing})}function Y$(r){return zv({from:r.from,strict:r.strict,structuralSharing:r.structuralSharing,select:e=>r.select?r.select(e.loaderData):e.loaderData})}function $$(r){const{select:e,...i}=r;return zv({...i,select:n=>e?e(n.loaderDeps):n.loaderDeps})}function q$(r){return zv({from:r.from,shouldThrow:r.shouldThrow,structuralSharing:r.structuralSharing,strict:r.strict,select:e=>{const i=r.strict===!1?e.params:e._strictParams;return r.select?r.select(i):i}})}function X$(r){return zv({from:r.from,strict:r.strict,shouldThrow:r.shouldThrow,structuralSharing:r.structuralSharing,select:e=>r.select?r.select(e.search):e.search})}const kj=typeof window<"u"?G.useLayoutEffect:G.useEffect;function a4(r){const e=G.useRef({value:r,prev:null}),i=e.current.value;return r!==i&&(e.current={value:r,prev:i}),e.current.prev}function _Me(r,e,i={},n={}){G.useEffect(()=>{if(!r.current||n.disabled||typeof IntersectionObserver!="function")return;const t=new IntersectionObserver(([o])=>{e(o)},i);return t.observe(r.current),()=>{t.disconnect()}},[e,i,n.disabled,r])}function PMe(r){const e=G.useRef(null);return G.useImperativeHandle(r,()=>e.current,[]),e}function K$(r){const e=wh();return G.useCallback(i=>e.navigate({...i,from:i.from??(r==null?void 0:r.from)}),[r==null?void 0:r.from,e])}var au=gye();const CMe=Lu(au);function TMe(r,e){const i=wh(),[n,t]=G.useState(!1),o=G.useRef(!1),a=PMe(e),{activeProps:s,inactiveProps:l,activeOptions:u,to:c,preload:d,preloadDelay:f,hashScrollIntoView:h,replace:p,startTransition:g,resetScroll:v,viewTransition:y,children:m,target:b,disabled:S,style:_,className:C,onClick:T,onFocus:x,onMouseEnter:A,onMouseLeave:w,onTouchStart:L,ignoreBlocker:k,params:D,search:j,hash:N,state:V,mask:W,reloadDocument:K,unsafeRelative:H,from:U,_fromLocation:I,...Q}=r,Z=Df({select:ke=>ke.location.search,structuralSharing:!0}),ee=r.from,ie=G.useMemo(()=>({...r,from:ee}),[i,Z,ee,r._fromLocation,r.hash,r.to,r.search,r.params,r.state,r.mask,r.unsafeRelative]),de=G.useMemo(()=>i.buildLocation({...ie}),[i,ie]),pe=G.useMemo(()=>{if(S)return;let ke=de.maskedLocation?de.maskedLocation.url:de.url,qe=!1;return i.origin&&(ke.startsWith(i.origin)?ke=i.history.createHref(ke.replace(i.origin,""))||"/":qe=!0),{href:ke,external:qe}},[S,de.maskedLocation,de.url,i.origin,i.history]),_e=G.useMemo(()=>{if(pe!=null&&pe.external)return pe.href;try{return new URL(c),c}catch{}},[c,pe]),Te=r.reloadDocument||_e?!1:d??i.options.defaultPreload,De=f??i.options.defaultPreloadDelay??0,Pe=Df({select:ke=>{if(_e)return!1;if(u!=null&&u.exact){if(!LRe(ke.location.pathname,de.pathname,i.basepath))return!1}else{const qe=IV(ke.location.pathname,i.basepath),rt=IV(de.pathname,i.basepath);if(!(qe.startsWith(rt)&&(qe.length===rt.length||qe[rt.length]==="/")))return!1}return((u==null?void 0:u.includeSearch)??!0)&&!l1(ke.location.search,de.search,{partial:!(u!=null&&u.exact),ignoreUndefined:!(u!=null&&u.explicitUndefined)})?!1:u!=null&&u.includeHash?ke.location.hash===de.hash:!0}}),Ee=G.useCallback(()=>{i.preloadRoute({...ie}).catch(ke=>{console.warn(ke),console.warn(sMe)})},[i,ie]),Re=G.useCallback(ke=>{ke!=null&&ke.isIntersecting&&Ee()},[Ee]);_Me(a,Re,OMe,{disabled:!!S||Te!=="viewport"}),G.useEffect(()=>{o.current||!S&&Te==="render"&&(Ee(),o.current=!0)},[S,Ee,Te]);const je=ke=>{const qe=ke.currentTarget.getAttribute("target"),rt=b!==void 0?b:qe;if(!S&&!DMe(ke)&&!ke.defaultPrevented&&(!rt||rt==="_self")&&ke.button===0){ke.preventDefault(),au.flushSync(()=>{t(!0)});const St=i.subscribe("onResolved",()=>{St(),t(!1)});i.navigate({...ie,replace:p,resetScroll:v,hashScrollIntoView:h,startTransition:g,viewTransition:y,ignoreBlocker:k})}};if(_e)return{...Q,ref:a,href:_e,...m&&{children:m},...b&&{target:b},...S&&{disabled:S},..._&&{style:_},...C&&{className:C},...T&&{onClick:T},...x&&{onFocus:x},...A&&{onMouseEnter:A},...w&&{onMouseLeave:w},...L&&{onTouchStart:L}};const Ke=ke=>{S||Te&&Ee()},ot=Ke,We=ke=>{if(!(S||!Te))if(!De)Ee();else{const qe=ke.target;if(KL.has(qe))return;const rt=setTimeout(()=>{KL.delete(qe),Ee()},De);KL.set(qe,rt)}},xe=ke=>{if(S||!Te||!De)return;const qe=ke.target,rt=KL.get(qe);rt&&(clearTimeout(rt),KL.delete(qe))},ve=Pe?TS(s,{})??xMe:s4,he=Pe?s4:TS(l,{})??s4,Se=[C,ve.className,he.className].filter(Boolean).join(" "),be=(_||ve.style||he.style)&&{..._,...ve.style,...he.style};return{...Q,...ve,...he,href:pe==null?void 0:pe.href,ref:a,onClick:ZL([T,je]),onFocus:ZL([x,Ke]),onMouseEnter:ZL([A,We]),onMouseLeave:ZL([w,xe]),onTouchStart:ZL([L,ot]),disabled:!!S,target:b,...be&&{style:be},...Se&&{className:Se},...S&&EMe,...Pe&&AMe,...n&&wMe}}const s4={},xMe={className:"active"},EMe={role:"link","aria-disabled":!0},AMe={"data-status":"active","aria-current":"page"},wMe={"data-transitioning":"transitioning"},KL=new WeakMap,OMe={rootMargin:"100px"},ZL=r=>e=>{for(const i of r)if(i){if(e.defaultPrevented)return;i(e)}},Rye=G.forwardRef((r,e)=>{const{_asChild:i,...n}=r,{type:t,ref:o,...a}=TMe(n,e),s=typeof n.children=="function"?n.children({isActive:a["data-status"]==="active"}):n.children;return i===void 0&&delete a.disabled,G.createElement(i||"a",{...a,ref:o},s)});function DMe(r){return!!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)}class RMe extends Oye{constructor(e){super(e),this.useMatch=i=>zv({select:i==null?void 0:i.select,from:this.id,structuralSharing:i==null?void 0:i.structuralSharing}),this.useRouteContext=i=>zv({...i,from:this.id,select:n=>i!=null&&i.select?i.select(n.context):n.context}),this.useSearch=i=>X$({select:i==null?void 0:i.select,structuralSharing:i==null?void 0:i.structuralSharing,from:this.id}),this.useParams=i=>q$({select:i==null?void 0:i.select,structuralSharing:i==null?void 0:i.structuralSharing,from:this.id}),this.useLoaderDeps=i=>$$({...i,from:this.id}),this.useLoaderData=i=>Y$({...i,from:this.id}),this.useNavigate=()=>K$({from:this.fullPath}),this.Link=An.forwardRef((i,n)=>R.jsx(Rye,{ref:n,from:this.fullPath,...i})),this.$$typeof=Symbol.for("react.memo")}}function MMe(r){return new RMe(r)}class LMe extends lMe{constructor(e){super(e),this.useMatch=i=>zv({select:i==null?void 0:i.select,from:this.id,structuralSharing:i==null?void 0:i.structuralSharing}),this.useRouteContext=i=>zv({...i,from:this.id,select:n=>i!=null&&i.select?i.select(n.context):n.context}),this.useSearch=i=>X$({select:i==null?void 0:i.select,structuralSharing:i==null?void 0:i.structuralSharing,from:this.id}),this.useParams=i=>q$({select:i==null?void 0:i.select,structuralSharing:i==null?void 0:i.structuralSharing,from:this.id}),this.useLoaderDeps=i=>$$({...i,from:this.id}),this.useLoaderData=i=>Y$({...i,from:this.id}),this.useNavigate=()=>K$({from:this.fullPath}),this.Link=An.forwardRef((i,n)=>R.jsx(Rye,{ref:n,from:this.fullPath,...i})),this.$$typeof=Symbol.for("react.memo")}}function kMe(r){return new LMe(r)}function vK(r){return typeof r=="object"?new yK(r,{silent:!0}).createRoute(r):new yK(r,{silent:!0}).createRoute}class yK{constructor(e,i){this.path=e,this.createRoute=n=>{this.silent;const t=MMe(n);return t.isRoot=!1,t},this.silent=i==null?void 0:i.silent}}class mK{constructor(e){this.useMatch=i=>zv({select:i==null?void 0:i.select,from:this.options.id,structuralSharing:i==null?void 0:i.structuralSharing}),this.useRouteContext=i=>zv({from:this.options.id,select:n=>i!=null&&i.select?i.select(n.context):n.context}),this.useSearch=i=>X$({select:i==null?void 0:i.select,structuralSharing:i==null?void 0:i.structuralSharing,from:this.options.id}),this.useParams=i=>q$({select:i==null?void 0:i.select,structuralSharing:i==null?void 0:i.structuralSharing,from:this.options.id}),this.useLoaderDeps=i=>$$({...i,from:this.options.id}),this.useLoaderData=i=>Y$({...i,from:this.options.id}),this.useNavigate=()=>{const i=wh();return K$({from:i.routesById[this.options.id].fullPath})},this.options=e,this.$$typeof=Symbol.for("react.memo")}}function bK(r){return typeof r=="object"?new mK(r):e=>new mK({id:r,...e})}function IMe(){const r=wh(),e=G.useRef({router:r,mounted:!1}),[i,n]=G.useState(!1),{hasPendingMatches:t,isLoading:o}=Df({select:d=>({isLoading:d.isLoading,hasPendingMatches:d.matches.some(f=>f.status==="pending")}),structuralSharing:!0}),a=a4(o),s=o||i||t,l=a4(s),u=o||t,c=a4(u);return r.startTransition=d=>{n(!0),G.startTransition(()=>{d(),n(!1)})},G.useEffect(()=>{const d=r.history.subscribe(r.load),f=r.buildLocation({to:r.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return u1(r.latestLocation.href)!==u1(f.href)&&r.commitLocation({...f,replace:!0}),()=>{d()}},[r,r.history]),kj(()=>{if(typeof window<"u"&&r.ssr||e.current.router===r&&e.current.mounted)return;e.current={router:r,mounted:!0},(async()=>{try{await r.load()}catch(f){console.error(f)}})()},[r]),kj(()=>{a&&!o&&r.emit({type:"onLoad",...c1(r.state)})},[a,r,o]),kj(()=>{c&&!u&&r.emit({type:"onBeforeRouteMount",...c1(r.state)})},[u,c,r]),kj(()=>{if(l&&!s){const d=c1(r.state);r.emit({type:"onResolved",...d}),r.__store.setState(f=>({...f,status:"idle",resolvedLocation:f.location})),d.hrefChanged&&HRe(r)}},[s,l,r]),null}function NMe(r){const e=Df({select:i=>`not-found-${i.location.pathname}-${i.status}`});return R.jsx(G$,{getResetKey:()=>e,onCatch:(i,n)=>{var t;if(bp(i))(t=r.onCatch)==null||t.call(r,i,n);else throw i},errorComponent:({error:i})=>{var n;if(bp(i))return(n=r.fallback)==null?void 0:n.call(r,i);throw i},children:r.children})}function FMe(){return R.jsx("p",{children:"Not Found"})}function eR(r){return R.jsx(R.Fragment,{children:r.children})}function Mye(r,e,i){return e.options.notFoundComponent?R.jsx(e.options.notFoundComponent,{...i}):r.options.defaultNotFoundComponent?R.jsx(r.options.defaultNotFoundComponent,{...i}):R.jsx(FMe,{})}function jMe({children:r}){var i;const e=wh();return e.isServer?R.jsx("script",{nonce:(i=e.options.ssr)==null?void 0:i.nonce,className:"$tsr",dangerouslySetInnerHTML:{__html:r+';typeof $_TSR !== "undefined" && $_TSR.c()'}}):null}function BMe(){const r=wh();if(!r.isScrollRestoring||!r.isServer||typeof r.options.scrollRestoration=="function"&&!r.options.scrollRestoration({location:r.latestLocation}))return null;const i=(r.options.getScrollRestorationKey||M6)(r.latestLocation),n=i!==M6(r.latestLocation)?i:void 0,t={storageKey:NV,shouldScrollRestoration:!0};return n&&(t.key=n),R.jsx(jMe,{children:`(${bye.toString()})(${JSON.stringify(t)})`})}const Lye=G.memo(function({matchId:e}){var y,m;const i=wh(),n=Df({select:b=>{const S=b.matches.find(_=>_.id===e);return Y0(S),{routeId:S.routeId,ssr:S.ssr,_displayPending:S._displayPending}},structuralSharing:!0}),t=i.routesById[n.routeId],o=t.options.pendingComponent??i.options.defaultPendingComponent,a=o?R.jsx(o,{}):null,s=t.options.errorComponent??i.options.defaultErrorComponent,l=t.options.onCatch??i.options.defaultOnCatch,u=t.isRoot?t.options.notFoundComponent??((y=i.options.notFoundRoute)==null?void 0:y.options.component):t.options.notFoundComponent,c=n.ssr===!1||n.ssr==="data-only",d=(!t.isRoot||t.options.wrapInSuspense||c)&&(t.options.wrapInSuspense??o??(((m=t.options.errorComponent)==null?void 0:m.preload)||c))?G.Suspense:eR,f=s?G$:eR,h=u?NMe:eR,p=Df({select:b=>b.loadedAt}),g=Df({select:b=>{var _;const S=b.matches.findIndex(C=>C.id===e);return(_=b.matches[S-1])==null?void 0:_.routeId}}),v=t.isRoot?t.options.shellComponent??eR:eR;return R.jsxs(v,{children:[R.jsx(hH.Provider,{value:e,children:R.jsx(d,{fallback:a,children:R.jsx(f,{getResetKey:()=>p,errorComponent:s||fH,onCatch:(b,S)=>{if(bp(b))throw b;l==null||l(b,S)},children:R.jsx(h,{fallback:b=>{if(!u||b.routeId&&b.routeId!==n.routeId||!b.routeId&&!t.isRoot)throw b;return G.createElement(u,b)},children:c||n._displayPending?R.jsx(cMe,{fallback:a,children:R.jsx(SK,{matchId:e})}):R.jsx(SK,{matchId:e})})})})}),g===mh&&i.options.scrollRestoration?R.jsxs(R.Fragment,{children:[R.jsx(VMe,{}),R.jsx(BMe,{})]}):null]})});function VMe(){const r=wh(),e=G.useRef(void 0);return R.jsx("script",{suppressHydrationWarning:!0,ref:i=>{i&&(e.current===void 0||e.current.href!==r.latestLocation.href)&&(r.emit({type:"onRendered",...c1(r.state)}),e.current=r.latestLocation)}},r.latestLocation.state.__TSR_key)}const SK=G.memo(function({matchId:e}){var l,u,c,d;const i=wh(),{match:n,key:t,routeId:o}=Df({select:f=>{const h=f.matches.find(m=>m.id===e),p=h.routeId,g=i.routesById[p].options.remountDeps??i.options.defaultRemountDeps,v=g==null?void 0:g({routeId:p,loaderDeps:h.loaderDeps,params:h._strictParams,search:h._strictSearch});return{key:v?JSON.stringify(v):void 0,routeId:p,match:{id:h.id,status:h.status,error:h.error,_forcePending:h._forcePending,_displayPending:h._displayPending}}},structuralSharing:!0}),a=i.routesById[o],s=G.useMemo(()=>{const f=a.options.component??i.options.defaultComponent;return f?R.jsx(f,{},t):R.jsx(HMe,{})},[t,a.options.component,i.options.defaultComponent]);if(n._displayPending)throw(l=i.getMatch(n.id))==null?void 0:l._nonReactive.displayPendingPromise;if(n._forcePending)throw(u=i.getMatch(n.id))==null?void 0:u._nonReactive.minPendingPromise;if(n.status==="pending"){const f=a.options.pendingMinMs??i.options.defaultPendingMinMs;if(f){const h=i.getMatch(n.id);if(h&&!h._nonReactive.minPendingPromise&&!i.isServer){const p=YR();h._nonReactive.minPendingPromise=p,setTimeout(()=>{p.resolve(),h._nonReactive.minPendingPromise=void 0},f)}}throw(c=i.getMatch(n.id))==null?void 0:c._nonReactive.loadPromise}if(n.status==="notFound")return Y0(bp(n.error)),Mye(i,a,n.error);if(n.status==="redirected")throw Y0(pg(n.error)),(d=i.getMatch(n.id))==null?void 0:d._nonReactive.loadPromise;if(n.status==="error"){if(i.isServer){const f=(a.options.errorComponent??i.options.defaultErrorComponent)||fH;return R.jsx(f,{error:n.error,reset:void 0,info:{componentStack:""}})}throw n.error}return s}),HMe=G.memo(function(){const e=wh(),i=G.useContext(hH),n=Df({select:u=>{var c;return(c=u.matches.find(d=>d.id===i))==null?void 0:c.routeId}}),t=e.routesById[n],o=Df({select:u=>{const d=u.matches.find(f=>f.id===i);return Y0(d),d.globalNotFound}}),a=Df({select:u=>{var f;const c=u.matches,d=c.findIndex(h=>h.id===i);return(f=c[d+1])==null?void 0:f.id}}),s=e.options.defaultPendingComponent?R.jsx(e.options.defaultPendingComponent,{}):null;if(o)return Mye(e,t,void 0);if(!a)return null;const l=R.jsx(Lye,{matchId:a});return n===mh?R.jsx(G.Suspense,{fallback:s,children:l}):l});function UMe(){const r=wh(),i=r.routesById[mh].options.pendingComponent??r.options.defaultPendingComponent,n=i?R.jsx(i,{}):null,t=r.isServer||typeof document<"u"&&r.ssr?eR:G.Suspense,o=R.jsxs(t,{fallback:n,children:[!r.isServer&&R.jsx(IMe,{}),R.jsx(zMe,{})]});return r.options.InnerWrap?R.jsx(r.options.InnerWrap,{children:o}):o}function zMe(){const r=wh(),e=Df({select:t=>{var o;return(o=t.matches[0])==null?void 0:o.id}}),i=Df({select:t=>t.loadedAt}),n=e?R.jsx(Lye,{matchId:e}):null;return R.jsx(hH.Provider,{value:e,children:r.options.disableGlobalCatchBoundary?n:R.jsx(G$,{getResetKey:()=>i,errorComponent:fH,onCatch:t=>{t.message||t.toString()},children:n})})}const WMe=r=>new GMe(r);class GMe extends rMe{constructor(e){super(e)}}typeof globalThis<"u"?(globalThis.createFileRoute=vK,globalThis.createLazyFileRoute=bK):typeof window<"u"&&(window.createFileRoute=vK,window.createLazyFileRoute=bK);function YMe({router:r,children:e,...i}){Object.keys(i).length>0&&r.update({...r.options,...i,context:{...r.options.context,...i.context}});const n=Dye(),t=R.jsx(n.Provider,{value:r,children:e});return r.options.Wrap?R.jsx(r.options.Wrap,{children:t}):t}function $Me({router:r,...e}){return R.jsx(YMe,{router:r,...e,children:R.jsx(UMe,{})})}function kye(r){var e,i,n="";if(typeof r=="string"||typeof r=="number")n+=r;else if(typeof r=="object")if(Array.isArray(r)){var t=r.length;for(e=0;e<t;e++)r[e]&&(i=kye(r[e]))&&(n&&(n+=" "),n+=i)}else for(i in r)r[i]&&(n&&(n+=" "),n+=i);return n}function Sg(){for(var r,e,i=0,n="",t=arguments.length;i<t;i++)(r=arguments[i])&&(e=kye(r))&&(n&&(n+=" "),n+=e);return n}const Z$="-",qMe=r=>{const e=KMe(r),{conflictingClassGroups:i,conflictingClassGroupModifiers:n}=r;return{getClassGroupId:a=>{const s=a.split(Z$);return s[0]===""&&s.length!==1&&s.shift(),Iye(s,e)||XMe(a)},getConflictingClassGroupIds:(a,s)=>{const l=i[a]||[];return s&&n[a]?[...l,...n[a]]:l}}},Iye=(r,e)=>{var a;if(r.length===0)return e.classGroupId;const i=r[0],n=e.nextPart.get(i),t=n?Iye(r.slice(1),n):void 0;if(t)return t;if(e.validators.length===0)return;const o=r.join(Z$);return(a=e.validators.find(({validator:s})=>s(o)))==null?void 0:a.classGroupId},_K=/^\[(.+)\]$/,XMe=r=>{if(_K.test(r)){const e=_K.exec(r)[1],i=e==null?void 0:e.substring(0,e.indexOf(":"));if(i)return"arbitrary.."+i}},KMe=r=>{const{theme:e,prefix:i}=r,n={nextPart:new Map,validators:[]};return JMe(Object.entries(r.classGroups),i).forEach(([o,a])=>{k6(a,n,o,e)}),n},k6=(r,e,i,n)=>{r.forEach(t=>{if(typeof t=="string"){const o=t===""?e:PK(e,t);o.classGroupId=i;return}if(typeof t=="function"){if(ZMe(t)){k6(t(n),e,i,n);return}e.validators.push({validator:t,classGroupId:i});return}Object.entries(t).forEach(([o,a])=>{k6(a,PK(e,o),i,n)})})},PK=(r,e)=>{let i=r;return e.split(Z$).forEach(n=>{i.nextPart.has(n)||i.nextPart.set(n,{nextPart:new Map,validators:[]}),i=i.nextPart.get(n)}),i},ZMe=r=>r.isThemeGetter,JMe=(r,e)=>e?r.map(([i,n])=>{const t=n.map(o=>typeof o=="string"?e+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([a,s])=>[e+a,s])):o);return[i,t]}):r,QMe=r=>{if(r<1)return{get:()=>{},set:()=>{}};let e=0,i=new Map,n=new Map;const t=(o,a)=>{i.set(o,a),e++,e>r&&(e=0,n=i,i=new Map)};return{get(o){let a=i.get(o);if(a!==void 0)return a;if((a=n.get(o))!==void 0)return t(o,a),a},set(o,a){i.has(o)?i.set(o,a):t(o,a)}}},Nye="!",eLe=r=>{const{separator:e,experimentalParseClassName:i}=r,n=e.length===1,t=e[0],o=e.length,a=s=>{const l=[];let u=0,c=0,d;for(let v=0;v<s.length;v++){let y=s[v];if(u===0){if(y===t&&(n||s.slice(v,v+o)===e)){l.push(s.slice(c,v)),c=v+o;continue}if(y==="/"){d=v;continue}}y==="["?u++:y==="]"&&u--}const f=l.length===0?s:s.substring(c),h=f.startsWith(Nye),p=h?f.substring(1):f,g=d&&d>c?d-c:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:g}};return i?s=>i({className:s,parseClassName:a}):a},tLe=r=>{if(r.length<=1)return r;const e=[];let i=[];return r.forEach(n=>{n[0]==="["?(e.push(...i.sort(),n),i=[]):i.push(n)}),e.push(...i.sort()),e},rLe=r=>({cache:QMe(r.cacheSize),parseClassName:eLe(r),...qMe(r)}),iLe=/\s+/,nLe=(r,e)=>{const{parseClassName:i,getClassGroupId:n,getConflictingClassGroupIds:t}=e,o=[],a=r.trim().split(iLe);let s="";for(let l=a.length-1;l>=0;l-=1){const u=a[l],{modifiers:c,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:h}=i(u);let p=!!h,g=n(p?f.substring(0,h):f);if(!g){if(!p){s=u+(s.length>0?" "+s:s);continue}if(g=n(f),!g){s=u+(s.length>0?" "+s:s);continue}p=!1}const v=tLe(c).join(":"),y=d?v+Nye:v,m=y+g;if(o.includes(m))continue;o.push(m);const b=t(g,p);for(let S=0;S<b.length;++S){const _=b[S];o.push(y+_)}s=u+(s.length>0?" "+s:s)}return s};function oLe(){let r=0,e,i,n="";for(;r<arguments.length;)(e=arguments[r++])&&(i=Fye(e))&&(n&&(n+=" "),n+=i);return n}const Fye=r=>{if(typeof r=="string")return r;let e,i="";for(let n=0;n<r.length;n++)r[n]&&(e=Fye(r[n]))&&(i&&(i+=" "),i+=e);return i};function aLe(r,...e){let i,n,t,o=a;function a(l){const u=e.reduce((c,d)=>d(c),r());return i=rLe(u),n=i.cache.get,t=i.cache.set,o=s,s(l)}function s(l){const u=n(l);if(u)return u;const c=nLe(l,i);return t(l,c),c}return function(){return o(oLe.apply(null,arguments))}}const Ka=r=>{const e=i=>i[r]||[];return e.isThemeGetter=!0,e},jye=/^\[(?:([a-z-]+):)?(.+)\]$/i,sLe=/^\d+\/\d+$/,lLe=new Set(["px","full","screen"]),uLe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,cLe=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,dLe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,fLe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,hLe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,nm=r=>mR(r)||lLe.has(r)||sLe.test(r),iS=r=>mM(r,"length",_Le),mR=r=>!!r&&!Number.isNaN(Number(r)),l4=r=>mM(r,"number",mR),JL=r=>!!r&&Number.isInteger(Number(r)),pLe=r=>r.endsWith("%")&&mR(r.slice(0,-1)),En=r=>jye.test(r),nS=r=>uLe.test(r),gLe=new Set(["length","size","percentage"]),vLe=r=>mM(r,gLe,Bye),yLe=r=>mM(r,"position",Bye),mLe=new Set(["image","url"]),bLe=r=>mM(r,mLe,CLe),SLe=r=>mM(r,"",PLe),QL=()=>!0,mM=(r,e,i)=>{const n=jye.exec(r);return n?n[1]?typeof e=="string"?n[1]===e:e.has(n[1]):i(n[2]):!1},_Le=r=>cLe.test(r)&&!dLe.test(r),Bye=()=>!1,PLe=r=>fLe.test(r),CLe=r=>hLe.test(r),TLe=()=>{const r=Ka("colors"),e=Ka("spacing"),i=Ka("blur"),n=Ka("brightness"),t=Ka("borderColor"),o=Ka("borderRadius"),a=Ka("borderSpacing"),s=Ka("borderWidth"),l=Ka("contrast"),u=Ka("grayscale"),c=Ka("hueRotate"),d=Ka("invert"),f=Ka("gap"),h=Ka("gradientColorStops"),p=Ka("gradientColorStopPositions"),g=Ka("inset"),v=Ka("margin"),y=Ka("opacity"),m=Ka("padding"),b=Ka("saturate"),S=Ka("scale"),_=Ka("sepia"),C=Ka("skew"),T=Ka("space"),x=Ka("translate"),A=()=>["auto","contain","none"],w=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto",En,e],k=()=>[En,e],D=()=>["",nm,iS],j=()=>["auto",mR,En],N=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],V=()=>["solid","dashed","dotted","double","none"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],K=()=>["start","end","center","between","around","evenly","stretch"],H=()=>["","0",En],U=()=>["auto","avoid","all","avoid-page","page","left","right","column"],I=()=>[mR,En];return{cacheSize:500,separator:":",theme:{colors:[QL],spacing:[nm,iS],blur:["none","",nS,En],brightness:I(),borderColor:[r],borderRadius:["none","","full",nS,En],borderSpacing:k(),borderWidth:D(),contrast:I(),grayscale:H(),hueRotate:I(),invert:H(),gap:k(),gradientColorStops:[r],gradientColorStopPositions:[pLe,iS],inset:L(),margin:L(),opacity:I(),padding:k(),saturate:I(),scale:I(),sepia:H(),skew:I(),space:k(),translate:k()},classGroups:{aspect:[{aspect:["auto","square","video",En]}],container:["container"],columns:[{columns:[nS]}],"break-after":[{"break-after":U()}],"break-before":[{"break-before":U()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...N(),En]}],overflow:[{overflow:w()}],"overflow-x":[{"overflow-x":w()}],"overflow-y":[{"overflow-y":w()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",JL,En]}],basis:[{basis:L()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",En]}],grow:[{grow:H()}],shrink:[{shrink:H()}],order:[{order:["first","last","none",JL,En]}],"grid-cols":[{"grid-cols":[QL]}],"col-start-end":[{col:["auto",{span:["full",JL,En]},En]}],"col-start":[{"col-start":j()}],"col-end":[{"col-end":j()}],"grid-rows":[{"grid-rows":[QL]}],"row-start-end":[{row:["auto",{span:[JL,En]},En]}],"row-start":[{"row-start":j()}],"row-end":[{"row-end":j()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",En]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",En]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...K()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...K(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...K(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[m]}],px:[{px:[m]}],py:[{py:[m]}],ps:[{ps:[m]}],pe:[{pe:[m]}],pt:[{pt:[m]}],pr:[{pr:[m]}],pb:[{pb:[m]}],pl:[{pl:[m]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",En,e]}],"min-w":[{"min-w":[En,e,"min","max","fit"]}],"max-w":[{"max-w":[En,e,"none","full","min","max","fit","prose",{screen:[nS]},nS]}],h:[{h:[En,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[En,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[En,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[En,e,"auto","min","max","fit"]}],"font-size":[{text:["base",nS,iS]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",l4]}],"font-family":[{font:[QL]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",En]}],"line-clamp":[{"line-clamp":["none",mR,l4]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",nm,En]}],"list-image":[{"list-image":["none",En]}],"list-style-type":[{list:["none","disc","decimal",En]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[r]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[r]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...V(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",nm,iS]}],"underline-offset":[{"underline-offset":["auto",nm,En]}],"text-decoration-color":[{decoration:[r]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",En]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",En]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...N(),yLe]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",vLe]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},bLe]}],"bg-color":[{bg:[r]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...V(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:V()}],"border-color":[{border:[t]}],"border-color-x":[{"border-x":[t]}],"border-color-y":[{"border-y":[t]}],"border-color-s":[{"border-s":[t]}],"border-color-e":[{"border-e":[t]}],"border-color-t":[{"border-t":[t]}],"border-color-r":[{"border-r":[t]}],"border-color-b":[{"border-b":[t]}],"border-color-l":[{"border-l":[t]}],"divide-color":[{divide:[t]}],"outline-style":[{outline:["",...V()]}],"outline-offset":[{"outline-offset":[nm,En]}],"outline-w":[{outline:[nm,iS]}],"outline-color":[{outline:[r]}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[r]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[nm,iS]}],"ring-offset-color":[{"ring-offset":[r]}],shadow:[{shadow:["","inner","none",nS,SLe]}],"shadow-color":[{shadow:[QL]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...W(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":W()}],filter:[{filter:["","none"]}],blur:[{blur:[i]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",nS,En]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[b]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[i]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",En]}],duration:[{duration:I()}],ease:[{ease:["linear","in","out","in-out",En]}],delay:[{delay:I()}],animate:[{animate:["none","spin","ping","pulse","bounce",En]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[JL,En]}],"translate-x":[{"translate-x":[x]}],"translate-y":[{"translate-y":[x]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",En]}],accent:[{accent:["auto",r]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",En]}],"caret-color":[{caret:[r]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",En]}],fill:[{fill:[r,"none"]}],"stroke-w":[{stroke:[nm,iS,l4]}],stroke:[{stroke:[r,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},J$=aLe(TLe);function Nr(...r){return J$(Sg(r))}const xLe={wide:"max-w-7xl",full:"max-w-full"};function rb(r){const e=r.maxWidth??"wide";return R.jsx("div",{className:Nr("p-1 flex-1 min-h-0 w-full mx-auto animate-fade-in flex flex-col",xLe[e],r.className),children:r.children})}function YS(r){return R.jsxs("div",{className:Nr("p-4",r.className),children:[r.title&&R.jsx("h1",{className:"text-xl font-bold text-foreground mb-1",children:r.title}),r.description&&R.jsx("p",{className:"text-muted-foreground text-md",children:r.description}),r.children]})}function ib(r){return R.jsx("div",{className:Nr("p-5 flex-1 flex flex-col",r.className),children:r.children})}/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ELe=r=>r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ALe=r=>r.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,i,n)=>n?n.toUpperCase():i.toLowerCase()),CK=r=>{const e=ALe(r);return e.charAt(0).toUpperCase()+e.slice(1)},Vye=(...r)=>r.filter((e,i,n)=>!!e&&e.trim()!==""&&n.indexOf(e)===i).join(" ").trim(),wLe=r=>{for(const e in r)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */var OLe={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const DLe=G.forwardRef(({color:r="currentColor",size:e=24,strokeWidth:i=2,absoluteStrokeWidth:n,className:t="",children:o,iconNode:a,...s},l)=>G.createElement("svg",{ref:l,...OLe,width:e,height:e,stroke:r,strokeWidth:n?Number(i)*24/Number(e):i,className:Vye("lucide",t),...!o&&!wLe(s)&&{"aria-hidden":"true"},...s},[...a.map(([u,c])=>G.createElement(u,c)),...Array.isArray(o)?o:[o]]));/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Cr=(r,e)=>{const i=G.forwardRef(({className:n,...t},o)=>G.createElement(DLe,{ref:o,iconNode:e,className:Vye(`lucide-${ELe(CK(r))}`,`lucide-${r}`,n),...t}));return i.displayName=CK(r),i};/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const RLe=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],MLe=Cr("activity",RLe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const LLe=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],kLe=Cr("arrow-left",LLe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ILe=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M16 12h2",key:"7q9ll5"}],["path",{d:"M16 8h2",key:"msurwy"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}],["path",{d:"M6 12h2",key:"32wvfc"}],["path",{d:"M6 8h2",key:"30oboj"}]],TK=Cr("book-open-text",ILe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const NLe=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],FLe=Cr("book-open",NLe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const jLe=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],u4=Cr("box",jLe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const BLe=[["path",{d:"m16 22-1-4",key:"1ow2iv"}],["path",{d:"M19 14a1 1 0 0 0 1-1v-1a2 2 0 0 0-2-2h-3a1 1 0 0 1-1-1V4a2 2 0 0 0-4 0v5a1 1 0 0 1-1 1H6a2 2 0 0 0-2 2v1a1 1 0 0 0 1 1",key:"11gii7"}],["path",{d:"M19 14H5l-1.973 6.767A1 1 0 0 0 4 22h16a1 1 0 0 0 .973-1.233z",key:"bju7h4"}],["path",{d:"m8 22 1-4",key:"s3unb"}]],VLe=Cr("brush-cleaning",BLe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const HLe=[["path",{d:"M8 6v6",key:"18i7km"}],["path",{d:"M15 6v6",key:"1sg6z9"}],["path",{d:"M2 12h19.6",key:"de5uta"}],["path",{d:"M18 18h3s.5-1.7.8-2.8c.1-.4.2-.8.2-1.2 0-.4-.1-.8-.2-1.2l-1.4-5C20.1 6.8 19.1 6 18 6H4a2 2 0 0 0-2 2v10h3",key:"1wwztk"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}],["path",{d:"M9 18h5",key:"lrx6i"}],["circle",{cx:"16",cy:"18",r:"2",key:"1v4tcr"}]],ULe=Cr("bus",HLe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const zLe=[["path",{d:"M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2",key:"5owen"}],["circle",{cx:"7",cy:"17",r:"2",key:"u2ysq9"}],["path",{d:"M9 17h6",key:"r8uit2"}],["circle",{cx:"17",cy:"17",r:"2",key:"axvx0g"}]],WLe=Cr("car",zLe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const GLe=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],xK=Cr("chart-column",GLe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const YLe=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]],$Le=Cr("chart-line",YLe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const qLe=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],pH=Cr("chevron-down",qLe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const XLe=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],KLe=Cr("chevron-left",XLe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ZLe=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],JLe=Cr("chevron-right",ZLe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const QLe=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Hye=Cr("chevron-up",QLe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const eke=[["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"m17 7 5 5-5 5",key:"1xlxn0"}],["path",{d:"m7 7-5 5 5 5",key:"19njba"}],["path",{d:"M8 12h.01",key:"czm47f"}]],tke=Cr("chevrons-left-right-ellipsis",eke);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const rke=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],ike=Cr("circle-alert",rke);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const nke=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],oke=Cr("circle-check-big",nke);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ake=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M17 12h.01",key:"1m0b6t"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M7 12h.01",key:"eqddd0"}]],ske=Cr("circle-ellipsis",ake);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const lke=[["path",{d:"M15.6 2.7a10 10 0 1 0 5.7 5.7",key:"1e0p6d"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M13.4 10.6 19 5",key:"1kr7tw"}]],uke=Cr("circle-gauge",lke);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const cke=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Uye=Cr("circle-question-mark",cke);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const dke=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]],fke=Cr("circle-user",dke);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const hke=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],pke=Cr("circle-x",hke);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const gke=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],vke=Cr("clock",gke);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const yke=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],mke=Cr("code",yke);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const bke=[["path",{d:"M11 10.27 7 3.34",key:"16pf9h"}],["path",{d:"m11 13.73-4 6.93",key:"794ttg"}],["path",{d:"M12 22v-2",key:"1osdcq"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M14 12h8",key:"4f43i9"}],["path",{d:"m17 20.66-1-1.73",key:"eq3orb"}],["path",{d:"m17 3.34-1 1.73",key:"2wel8s"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"m20.66 17-1.73-1",key:"sg0v6f"}],["path",{d:"m20.66 7-1.73 1",key:"1ow05n"}],["path",{d:"m3.34 17 1.73-1",key:"nuk764"}],["path",{d:"m3.34 7 1.73 1",key:"1ulond"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["circle",{cx:"12",cy:"12",r:"8",key:"46899m"}]],Ske=Cr("cog",bke);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const _ke=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],I6=Cr("copy",_ke);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Pke=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],Cke=Cr("cpu",Pke);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Tke=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],EK=Cr("database",Tke);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const xke=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],Eke=Cr("download",xke);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ake=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],wke=Cr("ellipsis-vertical",Ake);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Oke=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Dke=Cr("ellipsis",Oke);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Rke=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Mke=Cr("external-link",Rke);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Lke=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],kke=Cr("eye-off",Lke);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ike=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Nke=Cr("eye",Ike);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Fke=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],jke=Cr("file-braces",Fke);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Bke=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],Vke=Cr("file-code",Bke);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Hke=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}]],Uke=Cr("file-question-mark",Hke);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const zke=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Wke=Cr("file-text",zke);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Gke=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],Yke=Cr("file",Gke);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const $ke=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]],qke=Cr("film",$ke);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Xke=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],Kke=Cr("folder-open",Xke);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Zke=[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]],Jke=Cr("folder-tree",Zke);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Qke=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],eIe=Cr("folder",Qke);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const tIe=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],rIe=Cr("funnel",tIe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const iIe=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],nIe=Cr("github",iIe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const oIe=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],AK=Cr("hard-drive",oIe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const aIe=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],sIe=Cr("heart",aIe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const lIe=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],uIe=Cr("house",lIe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const cIe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],dIe=Cr("image",cIe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const fIe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],N6=Cr("info",fIe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const hIe=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],pIe=Cr("key",hIe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const gIe=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],wK=Cr("layout-dashboard",gIe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const vIe=[["path",{d:"m16 6 4 14",key:"ji33uf"}],["path",{d:"M12 6v14",key:"1n7gus"}],["path",{d:"M8 8v12",key:"1gg7y9"}],["path",{d:"M4 4v16",key:"6qkkli"}]],yIe=Cr("library",vIe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const mIe=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],bIe=Cr("link",mIe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const SIe=[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]],_Ie=Cr("linkedin",SIe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const PIe=[["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"M3 10a2 2 0 0 0 2 2h3",key:"1npucw"}],["path",{d:"M3 5v12a2 2 0 0 0 2 2h3",key:"x1gjn2"}]],CIe=Cr("list-tree",PIe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const TIe=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],zye=Cr("loader-circle",TIe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const xIe=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]],EIe=Cr("lock-open",xIe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const AIe=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],wIe=Cr("lock",AIe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const OIe=[["path",{d:"m10 17 5-5-5-5",key:"1bsop3"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}]],DIe=Cr("log-in",OIe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const RIe=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],MIe=Cr("log-out",RIe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const LIe=[["path",{d:"M3 5h1",key:"1mv5vm"}],["path",{d:"M3 12h1",key:"lp3yf2"}],["path",{d:"M3 19h1",key:"w6f3n9"}],["path",{d:"M8 5h1",key:"1nxr5w"}],["path",{d:"M8 12h1",key:"1con00"}],["path",{d:"M8 19h1",key:"k7p10e"}],["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}]],kIe=Cr("logs",LIe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const IIe=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],NIe=Cr("map-pin",IIe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const FIe=[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]],jIe=Cr("maximize",FIe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const BIe=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],VIe=Cr("menu",BIe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const HIe=[["path",{d:"M8 3v3a2 2 0 0 1-2 2H3",key:"hohbtr"}],["path",{d:"M21 8h-3a2 2 0 0 1-2-2V3",key:"5jw1f3"}],["path",{d:"M3 16h3a2 2 0 0 1 2 2v3",key:"198tvr"}],["path",{d:"M16 21v-3a2 2 0 0 1 2-2h3",key:"ph8mxp"}]],UIe=Cr("minimize",HIe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const zIe=[["path",{d:"M5 12h14",key:"1ays0h"}]],WIe=Cr("minus",zIe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const GIe=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],YIe=Cr("moon",GIe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const $Ie=[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]],qIe=Cr("music",$Ie);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const XIe=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],OK=Cr("network",XIe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const KIe=[["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-4 0v-9a2 2 0 0 1 2-2h2",key:"39pd36"}],["rect",{width:"8",height:"4",x:"10",y:"6",rx:"1",key:"aywv1n"}]],ZIe=Cr("newspaper",KIe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const JIe=[["path",{d:"M2 6h4",key:"aawbzj"}],["path",{d:"M2 10h4",key:"l0bgd4"}],["path",{d:"M2 14h4",key:"1gsvsf"}],["path",{d:"M2 18h4",key:"1bu2t1"}],["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["path",{d:"M16 2v20",key:"rotuqe"}]],QIe=Cr("notebook",JIe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const e2e=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],t2e=Cr("palette",e2e);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const r2e=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],i2e=Cr("panel-left-close",r2e);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const n2e=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],o2e=Cr("panel-left",n2e);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const a2e=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],s2e=Cr("panel-right",a2e);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const l2e=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}]],u2e=Cr("panel-top",l2e);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const c2e=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],d2e=Cr("pause",c2e);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const f2e=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],h2e=Cr("play",f2e);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const p2e=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]],g2e=Cr("plug",p2e);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const v2e=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],y2e=Cr("plus",v2e);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const m2e=[["path",{d:"M18.36 6.64A9 9 0 0 1 20.77 15",key:"dxknvb"}],["path",{d:"M6.16 6.16a9 9 0 1 0 12.68 12.68",key:"1x7qb5"}],["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],b2e=Cr("power-off",m2e);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const S2e=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]],_2e=Cr("power",S2e);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const P2e=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],C2e=Cr("refresh-cw",P2e);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const T2e=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],x2e=Cr("save",T2e);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const E2e=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Wye=Cr("search",E2e);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const A2e=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],w2e=Cr("server",A2e);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const O2e=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],c4=Cr("settings",O2e);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const D2e=[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]],R2e=Cr("share-2",D2e);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const M2e=[["path",{d:"M12 2v13",key:"1km8f5"}],["path",{d:"m16 6-4-4-4 4",key:"13yo43"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}]],L2e=Cr("share",M2e);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const k2e=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],I2e=Cr("shield",k2e);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const N2e=[["path",{d:"m15 15 6 6m-6-6v4.8m0-4.8h4.8",key:"17vawe"}],["path",{d:"M9 19.8V15m0 0H4.2M9 15l-6 6",key:"chjx8e"}],["path",{d:"M15 4.2V9m0 0h4.8M15 9l6-6",key:"lav6yq"}],["path",{d:"M9 4.2V9m0 0H4.2M9 9 3 3",key:"1pxi2q"}]],F2e=Cr("shrink",N2e);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const j2e=[["path",{d:"M2 20h.01",key:"4haj6o"}],["path",{d:"M7 20v-4",key:"j294jx"}],["path",{d:"M12 20v-8",key:"i3yub9"}],["path",{d:"M17 20V8",key:"1tkaf5"}],["path",{d:"M22 4v16",key:"sih9yq"}]],B2e=Cr("signal",j2e);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const V2e=[["path",{d:"M17.971 4.285A2 2 0 0 1 21 6v12a2 2 0 0 1-3.029 1.715l-9.997-5.998a2 2 0 0 1-.003-3.432z",key:"15892j"}],["path",{d:"M3 20V4",key:"1ptbpl"}]],H2e=Cr("skip-back",V2e);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const U2e=[["path",{d:"M21 4v16",key:"7j8fe9"}],["path",{d:"M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z",key:"zs4d6"}]],z2e=Cr("skip-forward",U2e);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const W2e=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],G2e=Cr("square-pen",W2e);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Y2e=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],$2e=Cr("square",Y2e);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const q2e=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],X2e=Cr("star",q2e);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const K2e=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],Z2e=Cr("sun",K2e);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const J2e=[["path",{d:"M15 3v18",key:"14nvp0"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 9H3",key:"1338ky"}],["path",{d:"M21 15H3",key:"9uk58r"}]],Q2e=Cr("table-properties",J2e);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const eNe=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],tNe=Cr("terminal",eNe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const rNe=[["path",{d:"M15 5h6",key:"1pr8yx"}],["path",{d:"M15 12h6",key:"upa0zy"}],["path",{d:"M3 19h18",key:"awlh7x"}],["path",{d:"m3 12 3.553-7.724a.5.5 0 0 1 .894 0L11 12",key:"6lvno8"}],["path",{d:"M3.92 10h6.16",key:"1tl8ex"}]],iNe=Cr("text-initial",rNe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const nNe=[["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],oNe=Cr("trash",nNe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const aNe=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Gye=Cr("triangle-alert",aNe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const sNe=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],lNe=Cr("upload",sNe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const uNe=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],cNe=Cr("user-plus",uNe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const dNe=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],fNe=Cr("user",dNe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const hNe=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],pNe=Cr("users",hNe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const gNe=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]],vNe=Cr("volume-2",gNe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const yNe=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]],mNe=Cr("volume-x",yNe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const bNe=[["path",{d:"M2 6c.6.5 1.2 1 2.5 1C7 7 7 5 9.5 5c2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"knzxuh"}],["path",{d:"M2 12c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"2jd2cc"}],["path",{d:"M2 18c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"rd2r6e"}]],SNe=Cr("waves",bNe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const _Ne=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],PNe=Cr("wifi-off",_Ne);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const CNe=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]],TNe=Cr("wifi",CNe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const xNe=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],IN=Cr("x",xNe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ENe=[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]],ANe=Cr("youtube",ENe);/**
 * @license lucide-react v0.562.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const wNe=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],ONe=Cr("zap",wNe),sr={CONTEXT_OVERVIEW:wK,CONTEXT_FILES:Jke,CONTEXT_DASHBOARD:xK,CONTEXT_TOPOLOGY:OK,CONTEXT_SETTINGS:c4,CONTEXT_ABOUT:N6,CONTEXT_HOME:uIe,FILE_GENERIC:Yke,FILE_CODE:Vke,FILE_JSON:jke,FILE_TEXT:Wke,FILE_IMAGE:dIe,FILE_VIDEO:qke,FILE_AUDIO:qIe,FILE_DATABASE:EK,FILE_RECORDING:AK,FILE_PLATFORM:c4,FILE_INSTANCE:u4,FILE_DASHBOARD:wK,FILE_UNKNOWN:Uke,FOLDER_CLOSED:eIe,FOLDER_OPEN:Kke,NAV_BACK:kLe,NAV_CHEVRON_RIGHT:JLe,NAV_CHEVRON_DOWN:pH,NAV_CHEVRON_UP:Hye,NAV_CHEVRON_LEFT:KLe,NAV_MENU:VIe,NAV_MORE_HORIZONTAL:Dke,NAV_MORE_VERTICAL:wke,PANEL_LEFT:o2e,PANEL_LEFT_CLOSE:i2e,PANEL_RIGHT:s2e,PANEL_TOP:u2e,PANEL_MAXIMIZE:jIe,PANEL_MINIMIZE:UIe,PANEL_SHRINK:F2e,ACTION_CLOSE:IN,ACTION_SEARCH:Wye,ACTION_FILTER:rIe,ACTION_ADD:y2e,ACTION_REMOVE:WIe,ACTION_EDIT:G2e,ACTION_DELETE:oNe,ACTION_CLEAR:VLe,ACTION_COPY:I6,ACTION_DOWNLOAD:Eke,ACTION_UPLOAD:lNe,ACTION_SHARE:L2e,ACTION_REFRESH:C2e,ACTION_SAVE:x2e,ACTION_SETTINGS:c4,ACTION_EXTERNAL_LINK:Mke,ACTION_LINK:bIe,STATUS_INFO:N6,STATUS_WARNING:Gye,STATUS_ERROR:ike,STATUS_SUCCESS:oke,STATUS_FAILED:pke,STATUS_LOADING:zye,STATUS_CLOCK:vke,STATUS_HELP:Uye,USER_PROFILE:fNe,USER_PROFILE_CIRCLE:fke,USER_GROUP:pNe,USER_ADD:cNe,USER_LOGOUT:MIe,USER_LOGIN:DIe,THEME_LIGHT:Z2e,THEME_DARK:YIe,THEME_PALETTE:t2e,VISIBILITY_SHOW:Nke,VISIBILITY_HIDE:kke,BRAND_GITHUB:nIe,BRAND_YOUTUBE:ANe,BRAND_LINKEDIN:_Ie,CONTENT_NEWS:ZIe,CONTENT_BOOK:FLe,CONTENT_BOOK_TEXT:TK,CONTENT_NOTEBOOK:QIe,CONTENT_CODE:mke,CONTENT_TERMINAL:tNe,MEDIA_PLAY:h2e,MEDIA_PAUSE:d2e,MEDIA_STOP:$2e,MEDIA_SKIP_FORWARD:z2e,MEDIA_SKIP_BACK:H2e,MEDIA_VOLUME:vNe,MEDIA_MUTE:mNe,SYSTEM_POWER:_2e,SYSTEM_POWER_OFF:b2e,SYSTEM_NETWORK:OK,SYSTEM_SERVER:w2e,SYSTEM_WIFI:TNe,SYSTEM_WIFI_OFF:PNe,SYSTEM_SIGNAL:B2e,SYSTEM_ACTIVITY:MLe,SYSTEM_ZAP:ONe,DATA_BAR_CHART:xK,DATA_TIMESERIES:$Le,DATA_TRACE:kIe,DATA_DATABASE:EK,DATA_HARD_DRIVE:AK,DATA_TABLE:Q2e,DATA_CIRCLE_GAUGE:uke,TOPOLOGY_SERVICE:yIe,TOPOLOGY_INSTANCE:TK,TOPOLOGY_SOCKET:g2e,TOPOLOGY_ENDPOINT:NIe,TOPOLOGY_ECU:Cke,TOPOLOGY_CHANNEL:tke,TOPOLOGY_CONTAINER:u4,TOPOLOGY_BEHAVIORAL_MODEL:Ske,OBJECT_CAR:WLe,OBJECT_WAVES:SNe,OBJECT_BUS:ULe,OBJECT_BOX:u4,OBJECT_HEART:sIe,OBJECT_STAR:X2e,SECURITY_SHIELD:I2e,SECURITY_KEY:pIe,SECURITY_LOCK:wIe,SECURITY_UNLOCK:EIe,VIEW_TREE:CIe,VIEW_GRAPH:R2e,VIEW_TEXT:iNe,VIEW_MORE:ske},Vi=Object.fromEntries(Object.keys(sr).map(r=>[r,r]));function FF(r){return sr[r]}function Fr(r){const{type:e,size:i,style:n,...t}=r;return R.jsx(e,{...t,style:i?{width:i,height:i,...n}:n})}var Qo=(r=>(r.PRIMARY="primary",r.PRIMARY_OUTLINE="primary_outline",r.SECONDARY="secondary",r.SUCCESS="success",r.SUCCESS_OUTLINE="success_outline",r.DESTRUCTIVE="destructive",r.DESTRUCTIVE_OUTLINE="destructive_outline",r.NO_BACKGROUND="no_background",r))(Qo||{}),Vl=(r=>(r.XS="xs",r.SM="sm",r.MD="md",r.LG="lg",r))(Vl||{});const Q$="inline-flex items-center justify-center font-medium transition-colors duration-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",Yye={[Vl.XS]:"gap-1 px-2 py-1 text-xxs rounded-md",[Vl.SM]:"gap-1 px-3 py-1 text-xs rounded-md",[Vl.MD]:"gap-2 px-5 py-2 text-sm rounded-full",[Vl.LG]:"gap-2 px-6 py-3 text-base rounded-full"},eq={[Qo.PRIMARY]:"bg-[var(--btn-primary-bg)] text-[var(--btn-primary-text)] hover:bg-[var(--btn-primary-hover-bg)] focus-visible:ring-[var(--btn-primary-bg)] disabled:bg-[var(--btn-disabled-bg)] disabled:text-[var(--btn-disabled-text)] disabled:cursor-not-allowed disabled:opacity-50",[Qo.PRIMARY_OUTLINE]:"bg-transparent border-2 border-[var(--btn-primary-bg)] text-[var(--btn-primary-bg)] hover:bg-[var(--btn-primary-bg)] hover:text-[var(--btn-primary-text)] focus-visible:ring-[var(--btn-primary-bg)]",[Qo.SECONDARY]:"bg-slate-50 dark:bg-slate-800/90 border border-[var(--btn-primary-bg)] text-[var(--btn-primary-bg)] dark:text-white hover:bg-[var(--btn-primary-bg)] hover:text-[var(--btn-primary-text)] dark:hover:text-gray-400 hover:border-transparent focus-visible:ring-[var(--btn-primary-bg)] disabled:bg-[var(--btn-disabled-bg)] disabled:text-[var(--btn-disabled-text)] disabled:cursor-not-allowed disabled:opacity-50",[Qo.SUCCESS]:"bg-[var(--btn-success-bg)] text-[var(--btn-success-text)] hover:bg-[var(--btn-success-hover-bg)] focus-visible:ring-[var(--btn-success-bg)] disabled:bg-[var(--btn-disabled-bg)] disabled:text-[var(--btn-disabled-text)] disabled:cursor-not-allowed disabled:opacity-50",[Qo.SUCCESS_OUTLINE]:"bg-transparent border-2 border-[var(--btn-success-bg)] text-[var(--btn-success-bg)] hover:bg-[var(--btn-success-bg)] hover:text-[var(--btn-success-text)] focus-visible:ring-[var(--btn-success-bg)]",[Qo.DESTRUCTIVE]:"bg-[var(--btn-destructive-bg)] text-[var(--btn-destructive-text)] hover:bg-[var(--btn-destructive-hover-bg)] focus-visible:ring-[var(--btn-destructive-bg)] disabled:bg-[var(--btn-disabled-bg)] disabled:text-[var(--btn-disabled-text)] disabled:cursor-not-allowed disabled:opacity-50",[Qo.DESTRUCTIVE_OUTLINE]:"bg-transparent border-2 border-[var(--btn-destructive-bg)] text-[var(--btn-destructive-bg)] hover:bg-[var(--btn-destructive-bg)] hover:text-[var(--btn-destructive-text)] focus-visible:ring-[var(--btn-destructive-bg)]",[Qo.NO_BACKGROUND]:"bg-transparent text-[var(--btn-foreground)] hover:text-[var(--btn-muted)] focus-visible:ring-transparent"},Uc=G.forwardRef(function(e,i){const{icon:n,label:t,title:o,trailing:a,type:s,size:l=Vl.MD,onClick:u,disabled:c,isLoading:d,className:f}=e,h=l===Vl.XS||l===Vl.SM?12:l===Vl.LG?20:16;return R.jsx("button",{ref:i,title:o,onClick:u,disabled:c??d,className:`${Q$} ${Yye[l]} ${eq[s]} ${f??""}`,children:d?R.jsx(Fr,{type:sr.STATUS_LOADING,size:h,className:"animate-spin"}):R.jsxs(R.Fragment,{children:[n&&R.jsx(Fr,{type:n,size:h}),t,a]})})});function an(r,e,{checkForDefaultPrevented:i=!0}={}){return function(t){if(r==null||r(t),i===!1||!t.defaultPrevented)return e==null?void 0:e(t)}}function DK(r,e){if(typeof r=="function")return r(e);r!=null&&(r.current=e)}function gH(...r){return e=>{let i=!1;const n=r.map(t=>{const o=DK(t,e);return!i&&typeof o=="function"&&(i=!0),o});if(i)return()=>{for(let t=0;t<n.length;t++){const o=n[t];typeof o=="function"?o():DK(r[t],null)}}}}function zl(...r){return G.useCallback(gH(...r),r)}function DNe(r,e){const i=G.createContext(e),n=o=>{const{children:a,...s}=o,l=G.useMemo(()=>s,Object.values(s));return R.jsx(i.Provider,{value:l,children:a})};n.displayName=r+"Provider";function t(o){const a=G.useContext(i);if(a)return a;if(e!==void 0)return e;throw new Error(`\`${o}\` must be used within \`${r}\``)}return[n,t]}function $S(r,e=[]){let i=[];function n(o,a){const s=G.createContext(a),l=i.length;i=[...i,a];const u=d=>{var y;const{scope:f,children:h,...p}=d,g=((y=f==null?void 0:f[r])==null?void 0:y[l])||s,v=G.useMemo(()=>p,Object.values(p));return R.jsx(g.Provider,{value:v,children:h})};u.displayName=o+"Provider";function c(d,f){var g;const h=((g=f==null?void 0:f[r])==null?void 0:g[l])||s,p=G.useContext(h);if(p)return p;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${o}\``)}return[u,c]}const t=()=>{const o=i.map(a=>G.createContext(a));return function(s){const l=(s==null?void 0:s[r])||o;return G.useMemo(()=>({[`__scope${r}`]:{...s,[r]:l}}),[s,l])}};return t.scopeName=r,[n,RNe(t,...e)]}function RNe(...r){const e=r[0];if(r.length===1)return e;const i=()=>{const n=r.map(t=>({useScope:t(),scopeName:t.scopeName}));return function(o){const a=n.reduce((s,{useScope:l,scopeName:u})=>{const d=l(o)[`__scope${u}`];return{...s,...d}},{});return G.useMemo(()=>({[`__scope${e.scopeName}`]:a}),[a])}};return i.scopeName=e.scopeName,i}function NN(r){const e=MNe(r),i=G.forwardRef((n,t)=>{const{children:o,...a}=n,s=G.Children.toArray(o),l=s.find(kNe);if(l){const u=l.props.children,c=s.map(d=>d===l?G.Children.count(u)>1?G.Children.only(null):G.isValidElement(u)?u.props.children:null:d);return R.jsx(e,{...a,ref:t,children:G.isValidElement(u)?G.cloneElement(u,void 0,c):null})}return R.jsx(e,{...a,ref:t,children:o})});return i.displayName=`${r}.Slot`,i}function MNe(r){const e=G.forwardRef((i,n)=>{const{children:t,...o}=i;if(G.isValidElement(t)){const a=NNe(t),s=INe(o,t.props);return t.type!==G.Fragment&&(s.ref=n?gH(n,a):a),G.cloneElement(t,s)}return G.Children.count(t)>1?G.Children.only(null):null});return e.displayName=`${r}.SlotClone`,e}var $ye=Symbol("radix.slottable");function LNe(r){const e=({children:i})=>R.jsx(R.Fragment,{children:i});return e.displayName=`${r}.Slottable`,e.__radixId=$ye,e}function kNe(r){return G.isValidElement(r)&&typeof r.type=="function"&&"__radixId"in r.type&&r.type.__radixId===$ye}function INe(r,e){const i={...e};for(const n in e){const t=r[n],o=e[n];/^on[A-Z]/.test(n)?t&&o?i[n]=(...s)=>{const l=o(...s);return t(...s),l}:t&&(i[n]=t):n==="style"?i[n]={...t,...o}:n==="className"&&(i[n]=[t,o].filter(Boolean).join(" "))}return{...r,...i}}function NNe(r){var n,t;let e=(n=Object.getOwnPropertyDescriptor(r.props,"ref"))==null?void 0:n.get,i=e&&"isReactWarning"in e&&e.isReactWarning;return i?r.ref:(e=(t=Object.getOwnPropertyDescriptor(r,"ref"))==null?void 0:t.get,i=e&&"isReactWarning"in e&&e.isReactWarning,i?r.props.ref:r.props.ref||r.ref)}var FNe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],rs=FNe.reduce((r,e)=>{const i=NN(`Primitive.${e}`),n=G.forwardRef((t,o)=>{const{asChild:a,...s}=t,l=a?i:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),R.jsx(l,{...s,ref:o})});return n.displayName=`Primitive.${e}`,{...r,[e]:n}},{});function qye(r,e){r&&au.flushSync(()=>r.dispatchEvent(e))}function Wv(r){const e=G.useRef(r);return G.useEffect(()=>{e.current=r}),G.useMemo(()=>(...i)=>{var n;return(n=e.current)==null?void 0:n.call(e,...i)},[])}function jNe(r,e=globalThis==null?void 0:globalThis.document){const i=Wv(r);G.useEffect(()=>{const n=t=>{t.key==="Escape"&&i(t)};return e.addEventListener("keydown",n,{capture:!0}),()=>e.removeEventListener("keydown",n,{capture:!0})},[i,e])}var BNe="DismissableLayer",F6="dismissableLayer.update",VNe="dismissableLayer.pointerDownOutside",HNe="dismissableLayer.focusOutside",RK,Xye=G.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),vH=G.forwardRef((r,e)=>{const{disableOutsidePointerEvents:i=!1,onEscapeKeyDown:n,onPointerDownOutside:t,onFocusOutside:o,onInteractOutside:a,onDismiss:s,...l}=r,u=G.useContext(Xye),[c,d]=G.useState(null),f=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=G.useState({}),p=zl(e,T=>d(T)),g=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(v),m=c?g.indexOf(c):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,S=m>=y,_=WNe(T=>{const x=T.target,A=[...u.branches].some(w=>w.contains(x));!S||A||(t==null||t(T),a==null||a(T),T.defaultPrevented||s==null||s())},f),C=GNe(T=>{const x=T.target;[...u.branches].some(w=>w.contains(x))||(o==null||o(T),a==null||a(T),T.defaultPrevented||s==null||s())},f);return jNe(T=>{m===u.layers.size-1&&(n==null||n(T),!T.defaultPrevented&&s&&(T.preventDefault(),s()))},f),G.useEffect(()=>{if(c)return i&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(RK=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),MK(),()=>{i&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=RK)}},[c,f,i,u]),G.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),MK())},[c,u]),G.useEffect(()=>{const T=()=>h({});return document.addEventListener(F6,T),()=>document.removeEventListener(F6,T)},[]),R.jsx(rs.div,{...l,ref:p,style:{pointerEvents:b?S?"auto":"none":void 0,...r.style},onFocusCapture:an(r.onFocusCapture,C.onFocusCapture),onBlurCapture:an(r.onBlurCapture,C.onBlurCapture),onPointerDownCapture:an(r.onPointerDownCapture,_.onPointerDownCapture)})});vH.displayName=BNe;var UNe="DismissableLayerBranch",zNe=G.forwardRef((r,e)=>{const i=G.useContext(Xye),n=G.useRef(null),t=zl(e,n);return G.useEffect(()=>{const o=n.current;if(o)return i.branches.add(o),()=>{i.branches.delete(o)}},[i.branches]),R.jsx(rs.div,{...r,ref:t})});zNe.displayName=UNe;function WNe(r,e=globalThis==null?void 0:globalThis.document){const i=Wv(r),n=G.useRef(!1),t=G.useRef(()=>{});return G.useEffect(()=>{const o=s=>{if(s.target&&!n.current){let l=function(){Kye(VNe,i,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(e.removeEventListener("click",t.current),t.current=l,e.addEventListener("click",t.current,{once:!0})):l()}else e.removeEventListener("click",t.current);n.current=!1},a=window.setTimeout(()=>{e.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),e.removeEventListener("pointerdown",o),e.removeEventListener("click",t.current)}},[e,i]),{onPointerDownCapture:()=>n.current=!0}}function GNe(r,e=globalThis==null?void 0:globalThis.document){const i=Wv(r),n=G.useRef(!1);return G.useEffect(()=>{const t=o=>{o.target&&!n.current&&Kye(HNe,i,{originalEvent:o},{discrete:!1})};return e.addEventListener("focusin",t),()=>e.removeEventListener("focusin",t)},[e,i]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function MK(){const r=new CustomEvent(F6);document.dispatchEvent(r)}function Kye(r,e,i,{discrete:n}){const t=i.originalEvent.target,o=new CustomEvent(r,{bubbles:!1,cancelable:!0,detail:i});e&&t.addEventListener(r,e,{once:!0}),n?qye(t,o):t.dispatchEvent(o)}var $0=globalThis!=null&&globalThis.document?G.useLayoutEffect:()=>{},YNe=OV[" useId ".trim().toString()]||(()=>{}),$Ne=0;function Fv(r){const[e,i]=G.useState(YNe());return $0(()=>{i(n=>n??String($Ne++))},[r]),e?`radix-${e}`:""}const qNe=["top","right","bottom","left"],IS=Math.min,bh=Math.max,BV=Math.round,Ij=Math.floor,jv=r=>({x:r,y:r}),XNe={left:"right",right:"left",bottom:"top",top:"bottom"},KNe={start:"end",end:"start"};function j6(r,e,i){return bh(r,IS(e,i))}function q0(r,e){return typeof r=="function"?r(e):r}function X0(r){return r.split("-")[0]}function bM(r){return r.split("-")[1]}function tq(r){return r==="x"?"y":"x"}function rq(r){return r==="y"?"height":"width"}const ZNe=new Set(["top","bottom"]);function Dv(r){return ZNe.has(X0(r))?"y":"x"}function iq(r){return tq(Dv(r))}function JNe(r,e,i){i===void 0&&(i=!1);const n=bM(r),t=iq(r),o=rq(t);let a=t==="x"?n===(i?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(a=VV(a)),[a,VV(a)]}function QNe(r){const e=VV(r);return[B6(r),e,B6(e)]}function B6(r){return r.replace(/start|end/g,e=>KNe[e])}const LK=["left","right"],kK=["right","left"],eFe=["top","bottom"],tFe=["bottom","top"];function rFe(r,e,i){switch(r){case"top":case"bottom":return i?e?kK:LK:e?LK:kK;case"left":case"right":return e?eFe:tFe;default:return[]}}function iFe(r,e,i,n){const t=bM(r);let o=rFe(X0(r),i==="start",n);return t&&(o=o.map(a=>a+"-"+t),e&&(o=o.concat(o.map(B6)))),o}function VV(r){return r.replace(/left|right|bottom|top/g,e=>XNe[e])}function nFe(r){return{top:0,right:0,bottom:0,left:0,...r}}function Zye(r){return typeof r!="number"?nFe(r):{top:r,right:r,bottom:r,left:r}}function HV(r){const{x:e,y:i,width:n,height:t}=r;return{width:n,height:t,top:i,left:e,right:e+n,bottom:i+t,x:e,y:i}}function IK(r,e,i){let{reference:n,floating:t}=r;const o=Dv(e),a=iq(e),s=rq(a),l=X0(e),u=o==="y",c=n.x+n.width/2-t.width/2,d=n.y+n.height/2-t.height/2,f=n[s]/2-t[s]/2;let h;switch(l){case"top":h={x:c,y:n.y-t.height};break;case"bottom":h={x:c,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:d};break;case"left":h={x:n.x-t.width,y:d};break;default:h={x:n.x,y:n.y}}switch(bM(e)){case"start":h[a]-=f*(i&&u?-1:1);break;case"end":h[a]+=f*(i&&u?-1:1);break}return h}async function oFe(r,e){var i;e===void 0&&(e={});const{x:n,y:t,platform:o,rects:a,elements:s,strategy:l}=r,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=q0(e,r),p=Zye(h),v=s[f?d==="floating"?"reference":"floating":d],y=HV(await o.getClippingRect({element:(i=await(o.isElement==null?void 0:o.isElement(v)))==null||i?v:v.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),m=d==="floating"?{x:n,y:t,width:a.floating.width,height:a.floating.height}:a.reference,b=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),S=await(o.isElement==null?void 0:o.isElement(b))?await(o.getScale==null?void 0:o.getScale(b))||{x:1,y:1}:{x:1,y:1},_=HV(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:m,offsetParent:b,strategy:l}):m);return{top:(y.top-_.top+p.top)/S.y,bottom:(_.bottom-y.bottom+p.bottom)/S.y,left:(y.left-_.left+p.left)/S.x,right:(_.right-y.right+p.right)/S.x}}const aFe=async(r,e,i)=>{const{placement:n="bottom",strategy:t="absolute",middleware:o=[],platform:a}=i,s=o.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(e));let u=await a.getElementRects({reference:r,floating:e,strategy:t}),{x:c,y:d}=IK(u,n,l),f=n,h={},p=0;for(let v=0;v<s.length;v++){var g;const{name:y,fn:m}=s[v],{x:b,y:S,data:_,reset:C}=await m({x:c,y:d,initialPlacement:n,placement:f,strategy:t,middlewareData:h,rects:u,platform:{...a,detectOverflow:(g=a.detectOverflow)!=null?g:oFe},elements:{reference:r,floating:e}});c=b??c,d=S??d,h={...h,[y]:{...h[y],..._}},C&&p<=50&&(p++,typeof C=="object"&&(C.placement&&(f=C.placement),C.rects&&(u=C.rects===!0?await a.getElementRects({reference:r,floating:e,strategy:t}):C.rects),{x:c,y:d}=IK(u,f,l)),v=-1)}return{x:c,y:d,placement:f,strategy:t,middlewareData:h}},sFe=r=>({name:"arrow",options:r,async fn(e){const{x:i,y:n,placement:t,rects:o,platform:a,elements:s,middlewareData:l}=e,{element:u,padding:c=0}=q0(r,e)||{};if(u==null)return{};const d=Zye(c),f={x:i,y:n},h=iq(t),p=rq(h),g=await a.getDimensions(u),v=h==="y",y=v?"top":"left",m=v?"bottom":"right",b=v?"clientHeight":"clientWidth",S=o.reference[p]+o.reference[h]-f[h]-o.floating[p],_=f[h]-o.reference[h],C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let T=C?C[b]:0;(!T||!await(a.isElement==null?void 0:a.isElement(C)))&&(T=s.floating[b]||o.floating[p]);const x=S/2-_/2,A=T/2-g[p]/2-1,w=IS(d[y],A),L=IS(d[m],A),k=w,D=T-g[p]-L,j=T/2-g[p]/2+x,N=j6(k,j,D),V=!l.arrow&&bM(t)!=null&&j!==N&&o.reference[p]/2-(j<k?w:L)-g[p]/2<0,W=V?j<k?j-k:j-D:0;return{[h]:f[h]+W,data:{[h]:N,centerOffset:j-N-W,...V&&{alignmentOffset:W}},reset:V}}}),lFe=function(r){return r===void 0&&(r={}),{name:"flip",options:r,async fn(e){var i,n;const{placement:t,middlewareData:o,rects:a,initialPlacement:s,platform:l,elements:u}=e,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...v}=q0(r,e);if((i=o.arrow)!=null&&i.alignmentOffset)return{};const y=X0(t),m=Dv(s),b=X0(s)===s,S=await(l.isRTL==null?void 0:l.isRTL(u.floating)),_=f||(b||!g?[VV(s)]:QNe(s)),C=p!=="none";!f&&C&&_.push(...iFe(s,g,p,S));const T=[s,..._],x=await l.detectOverflow(e,v),A=[];let w=((n=o.flip)==null?void 0:n.overflows)||[];if(c&&A.push(x[y]),d){const j=JNe(t,a,S);A.push(x[j[0]],x[j[1]])}if(w=[...w,{placement:t,overflows:A}],!A.every(j=>j<=0)){var L,k;const j=(((L=o.flip)==null?void 0:L.index)||0)+1,N=T[j];if(N&&(!(d==="alignment"?m!==Dv(N):!1)||w.every(K=>Dv(K.placement)===m?K.overflows[0]>0:!0)))return{data:{index:j,overflows:w},reset:{placement:N}};let V=(k=w.filter(W=>W.overflows[0]<=0).sort((W,K)=>W.overflows[1]-K.overflows[1])[0])==null?void 0:k.placement;if(!V)switch(h){case"bestFit":{var D;const W=(D=w.filter(K=>{if(C){const H=Dv(K.placement);return H===m||H==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(H=>H>0).reduce((H,U)=>H+U,0)]).sort((K,H)=>K[1]-H[1])[0])==null?void 0:D[0];W&&(V=W);break}case"initialPlacement":V=s;break}if(t!==V)return{reset:{placement:V}}}return{}}}};function NK(r,e){return{top:r.top-e.height,right:r.right-e.width,bottom:r.bottom-e.height,left:r.left-e.width}}function FK(r){return qNe.some(e=>r[e]>=0)}const uFe=function(r){return r===void 0&&(r={}),{name:"hide",options:r,async fn(e){const{rects:i,platform:n}=e,{strategy:t="referenceHidden",...o}=q0(r,e);switch(t){case"referenceHidden":{const a=await n.detectOverflow(e,{...o,elementContext:"reference"}),s=NK(a,i.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:FK(s)}}}case"escaped":{const a=await n.detectOverflow(e,{...o,altBoundary:!0}),s=NK(a,i.floating);return{data:{escapedOffsets:s,escaped:FK(s)}}}default:return{}}}}},Jye=new Set(["left","top"]);async function cFe(r,e){const{placement:i,platform:n,elements:t}=r,o=await(n.isRTL==null?void 0:n.isRTL(t.floating)),a=X0(i),s=bM(i),l=Dv(i)==="y",u=Jye.has(a)?-1:1,c=o&&l?-1:1,d=q0(e,r);let{mainAxis:f,crossAxis:h,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof p=="number"&&(h=s==="end"?p*-1:p),l?{x:h*c,y:f*u}:{x:f*u,y:h*c}}const dFe=function(r){return r===void 0&&(r=0),{name:"offset",options:r,async fn(e){var i,n;const{x:t,y:o,placement:a,middlewareData:s}=e,l=await cFe(e,r);return a===((i=s.offset)==null?void 0:i.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:t+l.x,y:o+l.y,data:{...l,placement:a}}}}},fFe=function(r){return r===void 0&&(r={}),{name:"shift",options:r,async fn(e){const{x:i,y:n,placement:t,platform:o}=e,{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:y=>{let{x:m,y:b}=y;return{x:m,y:b}}},...u}=q0(r,e),c={x:i,y:n},d=await o.detectOverflow(e,u),f=Dv(X0(t)),h=tq(f);let p=c[h],g=c[f];if(a){const y=h==="y"?"top":"left",m=h==="y"?"bottom":"right",b=p+d[y],S=p-d[m];p=j6(b,p,S)}if(s){const y=f==="y"?"top":"left",m=f==="y"?"bottom":"right",b=g+d[y],S=g-d[m];g=j6(b,g,S)}const v=l.fn({...e,[h]:p,[f]:g});return{...v,data:{x:v.x-i,y:v.y-n,enabled:{[h]:a,[f]:s}}}}}},hFe=function(r){return r===void 0&&(r={}),{options:r,fn(e){const{x:i,y:n,placement:t,rects:o,middlewareData:a}=e,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=q0(r,e),c={x:i,y:n},d=Dv(t),f=tq(d);let h=c[f],p=c[d];const g=q0(s,e),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const b=f==="y"?"height":"width",S=o.reference[f]-o.floating[b]+v.mainAxis,_=o.reference[f]+o.reference[b]-v.mainAxis;h<S?h=S:h>_&&(h=_)}if(u){var y,m;const b=f==="y"?"width":"height",S=Jye.has(X0(t)),_=o.reference[d]-o.floating[b]+(S&&((y=a.offset)==null?void 0:y[d])||0)+(S?0:v.crossAxis),C=o.reference[d]+o.reference[b]+(S?0:((m=a.offset)==null?void 0:m[d])||0)-(S?v.crossAxis:0);p<_?p=_:p>C&&(p=C)}return{[f]:h,[d]:p}}}},pFe=function(r){return r===void 0&&(r={}),{name:"size",options:r,async fn(e){var i,n;const{placement:t,rects:o,platform:a,elements:s}=e,{apply:l=()=>{},...u}=q0(r,e),c=await a.detectOverflow(e,u),d=X0(t),f=bM(t),h=Dv(t)==="y",{width:p,height:g}=o.floating;let v,y;d==="top"||d==="bottom"?(v=d,y=f===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(y=d,v=f==="end"?"top":"bottom");const m=g-c.top-c.bottom,b=p-c.left-c.right,S=IS(g-c[v],m),_=IS(p-c[y],b),C=!e.middlewareData.shift;let T=S,x=_;if((i=e.middlewareData.shift)!=null&&i.enabled.x&&(x=b),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(T=m),C&&!f){const w=bh(c.left,0),L=bh(c.right,0),k=bh(c.top,0),D=bh(c.bottom,0);h?x=p-2*(w!==0||L!==0?w+L:bh(c.left,c.right)):T=g-2*(k!==0||D!==0?k+D:bh(c.top,c.bottom))}await l({...e,availableWidth:x,availableHeight:T});const A=await a.getDimensions(s.floating);return p!==A.width||g!==A.height?{reset:{rects:!0}}:{}}}};function yH(){return typeof window<"u"}function SM(r){return Qye(r)?(r.nodeName||"").toLowerCase():"#document"}function xh(r){var e;return(r==null||(e=r.ownerDocument)==null?void 0:e.defaultView)||window}function ey(r){var e;return(e=(Qye(r)?r.ownerDocument:r.document)||window.document)==null?void 0:e.documentElement}function Qye(r){return yH()?r instanceof Node||r instanceof xh(r).Node:!1}function Cg(r){return yH()?r instanceof Element||r instanceof xh(r).Element:!1}function Gv(r){return yH()?r instanceof HTMLElement||r instanceof xh(r).HTMLElement:!1}function jK(r){return!yH()||typeof ShadowRoot>"u"?!1:r instanceof ShadowRoot||r instanceof xh(r).ShadowRoot}const gFe=new Set(["inline","contents"]);function jF(r){const{overflow:e,overflowX:i,overflowY:n,display:t}=Tg(r);return/auto|scroll|overlay|hidden|clip/.test(e+n+i)&&!gFe.has(t)}const vFe=new Set(["table","td","th"]);function yFe(r){return vFe.has(SM(r))}const mFe=[":popover-open",":modal"];function mH(r){return mFe.some(e=>{try{return r.matches(e)}catch{return!1}})}const bFe=["transform","translate","scale","rotate","perspective"],SFe=["transform","translate","scale","rotate","perspective","filter"],_Fe=["paint","layout","strict","content"];function nq(r){const e=oq(),i=Cg(r)?Tg(r):r;return bFe.some(n=>i[n]?i[n]!=="none":!1)||(i.containerType?i.containerType!=="normal":!1)||!e&&(i.backdropFilter?i.backdropFilter!=="none":!1)||!e&&(i.filter?i.filter!=="none":!1)||SFe.some(n=>(i.willChange||"").includes(n))||_Fe.some(n=>(i.contain||"").includes(n))}function PFe(r){let e=NS(r);for(;Gv(e)&&!qR(e);){if(nq(e))return e;if(mH(e))return null;e=NS(e)}return null}function oq(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const CFe=new Set(["html","body","#document"]);function qR(r){return CFe.has(SM(r))}function Tg(r){return xh(r).getComputedStyle(r)}function bH(r){return Cg(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:{scrollLeft:r.scrollX,scrollTop:r.scrollY}}function NS(r){if(SM(r)==="html")return r;const e=r.assignedSlot||r.parentNode||jK(r)&&r.host||ey(r);return jK(e)?e.host:e}function eme(r){const e=NS(r);return qR(e)?r.ownerDocument?r.ownerDocument.body:r.body:Gv(e)&&jF(e)?e:eme(e)}function FN(r,e,i){var n;e===void 0&&(e=[]),i===void 0&&(i=!0);const t=eme(r),o=t===((n=r.ownerDocument)==null?void 0:n.body),a=xh(t);if(o){const s=V6(a);return e.concat(a,a.visualViewport||[],jF(t)?t:[],s&&i?FN(s):[])}return e.concat(t,FN(t,[],i))}function V6(r){return r.parent&&Object.getPrototypeOf(r.parent)?r.frameElement:null}function tme(r){const e=Tg(r);let i=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const t=Gv(r),o=t?r.offsetWidth:i,a=t?r.offsetHeight:n,s=BV(i)!==o||BV(n)!==a;return s&&(i=o,n=a),{width:i,height:n,$:s}}function aq(r){return Cg(r)?r:r.contextElement}function bR(r){const e=aq(r);if(!Gv(e))return jv(1);const i=e.getBoundingClientRect(),{width:n,height:t,$:o}=tme(e);let a=(o?BV(i.width):i.width)/n,s=(o?BV(i.height):i.height)/t;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const TFe=jv(0);function rme(r){const e=xh(r);return!oq()||!e.visualViewport?TFe:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function xFe(r,e,i){return e===void 0&&(e=!1),!i||e&&i!==xh(r)?!1:e}function P1(r,e,i,n){e===void 0&&(e=!1),i===void 0&&(i=!1);const t=r.getBoundingClientRect(),o=aq(r);let a=jv(1);e&&(n?Cg(n)&&(a=bR(n)):a=bR(r));const s=xFe(o,i,n)?rme(o):jv(0);let l=(t.left+s.x)/a.x,u=(t.top+s.y)/a.y,c=t.width/a.x,d=t.height/a.y;if(o){const f=xh(o),h=n&&Cg(n)?xh(n):n;let p=f,g=V6(p);for(;g&&n&&h!==p;){const v=bR(g),y=g.getBoundingClientRect(),m=Tg(g),b=y.left+(g.clientLeft+parseFloat(m.paddingLeft))*v.x,S=y.top+(g.clientTop+parseFloat(m.paddingTop))*v.y;l*=v.x,u*=v.y,c*=v.x,d*=v.y,l+=b,u+=S,p=xh(g),g=V6(p)}}return HV({width:c,height:d,x:l,y:u})}function SH(r,e){const i=bH(r).scrollLeft;return e?e.left+i:P1(ey(r)).left+i}function ime(r,e){const i=r.getBoundingClientRect(),n=i.left+e.scrollLeft-SH(r,i),t=i.top+e.scrollTop;return{x:n,y:t}}function EFe(r){let{elements:e,rect:i,offsetParent:n,strategy:t}=r;const o=t==="fixed",a=ey(n),s=e?mH(e.floating):!1;if(n===a||s&&o)return i;let l={scrollLeft:0,scrollTop:0},u=jv(1);const c=jv(0),d=Gv(n);if((d||!d&&!o)&&((SM(n)!=="body"||jF(a))&&(l=bH(n)),Gv(n))){const h=P1(n);u=bR(n),c.x=h.x+n.clientLeft,c.y=h.y+n.clientTop}const f=a&&!d&&!o?ime(a,l):jv(0);return{width:i.width*u.x,height:i.height*u.y,x:i.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:i.y*u.y-l.scrollTop*u.y+c.y+f.y}}function AFe(r){return Array.from(r.getClientRects())}function wFe(r){const e=ey(r),i=bH(r),n=r.ownerDocument.body,t=bh(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),o=bh(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let a=-i.scrollLeft+SH(r);const s=-i.scrollTop;return Tg(n).direction==="rtl"&&(a+=bh(e.clientWidth,n.clientWidth)-t),{width:t,height:o,x:a,y:s}}const BK=25;function OFe(r,e){const i=xh(r),n=ey(r),t=i.visualViewport;let o=n.clientWidth,a=n.clientHeight,s=0,l=0;if(t){o=t.width,a=t.height;const c=oq();(!c||c&&e==="fixed")&&(s=t.offsetLeft,l=t.offsetTop)}const u=SH(n);if(u<=0){const c=n.ownerDocument,d=c.body,f=getComputedStyle(d),h=c.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,p=Math.abs(n.clientWidth-d.clientWidth-h);p<=BK&&(o-=p)}else u<=BK&&(o+=u);return{width:o,height:a,x:s,y:l}}const DFe=new Set(["absolute","fixed"]);function RFe(r,e){const i=P1(r,!0,e==="fixed"),n=i.top+r.clientTop,t=i.left+r.clientLeft,o=Gv(r)?bR(r):jv(1),a=r.clientWidth*o.x,s=r.clientHeight*o.y,l=t*o.x,u=n*o.y;return{width:a,height:s,x:l,y:u}}function VK(r,e,i){let n;if(e==="viewport")n=OFe(r,i);else if(e==="document")n=wFe(ey(r));else if(Cg(e))n=RFe(e,i);else{const t=rme(r);n={x:e.x-t.x,y:e.y-t.y,width:e.width,height:e.height}}return HV(n)}function nme(r,e){const i=NS(r);return i===e||!Cg(i)||qR(i)?!1:Tg(i).position==="fixed"||nme(i,e)}function MFe(r,e){const i=e.get(r);if(i)return i;let n=FN(r,[],!1).filter(s=>Cg(s)&&SM(s)!=="body"),t=null;const o=Tg(r).position==="fixed";let a=o?NS(r):r;for(;Cg(a)&&!qR(a);){const s=Tg(a),l=nq(a);!l&&s.position==="fixed"&&(t=null),(o?!l&&!t:!l&&s.position==="static"&&!!t&&DFe.has(t.position)||jF(a)&&!l&&nme(r,a))?n=n.filter(c=>c!==a):t=s,a=NS(a)}return e.set(r,n),n}function LFe(r){let{element:e,boundary:i,rootBoundary:n,strategy:t}=r;const a=[...i==="clippingAncestors"?mH(e)?[]:MFe(e,this._c):[].concat(i),n],s=a[0],l=a.reduce((u,c)=>{const d=VK(e,c,t);return u.top=bh(d.top,u.top),u.right=IS(d.right,u.right),u.bottom=IS(d.bottom,u.bottom),u.left=bh(d.left,u.left),u},VK(e,s,t));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function kFe(r){const{width:e,height:i}=tme(r);return{width:e,height:i}}function IFe(r,e,i){const n=Gv(e),t=ey(e),o=i==="fixed",a=P1(r,!0,o,e);let s={scrollLeft:0,scrollTop:0};const l=jv(0);function u(){l.x=SH(t)}if(n||!n&&!o)if((SM(e)!=="body"||jF(t))&&(s=bH(e)),n){const h=P1(e,!0,o,e);l.x=h.x+e.clientLeft,l.y=h.y+e.clientTop}else t&&u();o&&!n&&t&&u();const c=t&&!n&&!o?ime(t,s):jv(0),d=a.left+s.scrollLeft-l.x-c.x,f=a.top+s.scrollTop-l.y-c.y;return{x:d,y:f,width:a.width,height:a.height}}function d4(r){return Tg(r).position==="static"}function HK(r,e){if(!Gv(r)||Tg(r).position==="fixed")return null;if(e)return e(r);let i=r.offsetParent;return ey(r)===i&&(i=i.ownerDocument.body),i}function ome(r,e){const i=xh(r);if(mH(r))return i;if(!Gv(r)){let t=NS(r);for(;t&&!qR(t);){if(Cg(t)&&!d4(t))return t;t=NS(t)}return i}let n=HK(r,e);for(;n&&yFe(n)&&d4(n);)n=HK(n,e);return n&&qR(n)&&d4(n)&&!nq(n)?i:n||PFe(r)||i}const NFe=async function(r){const e=this.getOffsetParent||ome,i=this.getDimensions,n=await i(r.floating);return{reference:IFe(r.reference,await e(r.floating),r.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function FFe(r){return Tg(r).direction==="rtl"}const jFe={convertOffsetParentRelativeRectToViewportRelativeRect:EFe,getDocumentElement:ey,getClippingRect:LFe,getOffsetParent:ome,getElementRects:NFe,getClientRects:AFe,getDimensions:kFe,getScale:bR,isElement:Cg,isRTL:FFe};function ame(r,e){return r.x===e.x&&r.y===e.y&&r.width===e.width&&r.height===e.height}function BFe(r,e){let i=null,n;const t=ey(r);function o(){var s;clearTimeout(n),(s=i)==null||s.disconnect(),i=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),o();const u=r.getBoundingClientRect(),{left:c,top:d,width:f,height:h}=u;if(s||e(),!f||!h)return;const p=Ij(d),g=Ij(t.clientWidth-(c+f)),v=Ij(t.clientHeight-(d+h)),y=Ij(c),b={rootMargin:-p+"px "+-g+"px "+-v+"px "+-y+"px",threshold:bh(0,IS(1,l))||1};let S=!0;function _(C){const T=C[0].intersectionRatio;if(T!==l){if(!S)return a();T?a(!1,T):n=setTimeout(()=>{a(!1,1e-7)},1e3)}T===1&&!ame(u,r.getBoundingClientRect())&&a(),S=!1}try{i=new IntersectionObserver(_,{...b,root:t.ownerDocument})}catch{i=new IntersectionObserver(_,b)}i.observe(r)}return a(!0),o}function VFe(r,e,i,n){n===void 0&&(n={});const{ancestorScroll:t=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=aq(r),c=t||o?[...u?FN(u):[],...FN(e)]:[];c.forEach(y=>{t&&y.addEventListener("scroll",i,{passive:!0}),o&&y.addEventListener("resize",i)});const d=u&&s?BFe(u,i):null;let f=-1,h=null;a&&(h=new ResizeObserver(y=>{let[m]=y;m&&m.target===u&&h&&(h.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var b;(b=h)==null||b.observe(e)})),i()}),u&&!l&&h.observe(u),h.observe(e));let p,g=l?P1(r):null;l&&v();function v(){const y=P1(r);g&&!ame(g,y)&&i(),g=y,p=requestAnimationFrame(v)}return i(),()=>{var y;c.forEach(m=>{t&&m.removeEventListener("scroll",i),o&&m.removeEventListener("resize",i)}),d==null||d(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const HFe=dFe,UFe=fFe,zFe=lFe,WFe=pFe,GFe=uFe,UK=sFe,YFe=hFe,$Fe=(r,e,i)=>{const n=new Map,t={platform:jFe,...i},o={...t.platform,_c:n};return aFe(r,e,{...t,platform:o})};var qFe=typeof document<"u",XFe=function(){},aV=qFe?G.useLayoutEffect:XFe;function UV(r,e){if(r===e)return!0;if(typeof r!=typeof e)return!1;if(typeof r=="function"&&r.toString()===e.toString())return!0;let i,n,t;if(r&&e&&typeof r=="object"){if(Array.isArray(r)){if(i=r.length,i!==e.length)return!1;for(n=i;n--!==0;)if(!UV(r[n],e[n]))return!1;return!0}if(t=Object.keys(r),i=t.length,i!==Object.keys(e).length)return!1;for(n=i;n--!==0;)if(!{}.hasOwnProperty.call(e,t[n]))return!1;for(n=i;n--!==0;){const o=t[n];if(!(o==="_owner"&&r.$$typeof)&&!UV(r[o],e[o]))return!1}return!0}return r!==r&&e!==e}function sme(r){return typeof window>"u"?1:(r.ownerDocument.defaultView||window).devicePixelRatio||1}function zK(r,e){const i=sme(r);return Math.round(e*i)/i}function f4(r){const e=G.useRef(r);return aV(()=>{e.current=r}),e}function KFe(r){r===void 0&&(r={});const{placement:e="bottom",strategy:i="absolute",middleware:n=[],platform:t,elements:{reference:o,floating:a}={},transform:s=!0,whileElementsMounted:l,open:u}=r,[c,d]=G.useState({x:0,y:0,strategy:i,placement:e,middlewareData:{},isPositioned:!1}),[f,h]=G.useState(n);UV(f,n)||h(n);const[p,g]=G.useState(null),[v,y]=G.useState(null),m=G.useCallback(K=>{K!==C.current&&(C.current=K,g(K))},[]),b=G.useCallback(K=>{K!==T.current&&(T.current=K,y(K))},[]),S=o||p,_=a||v,C=G.useRef(null),T=G.useRef(null),x=G.useRef(c),A=l!=null,w=f4(l),L=f4(t),k=f4(u),D=G.useCallback(()=>{if(!C.current||!T.current)return;const K={placement:e,strategy:i,middleware:f};L.current&&(K.platform=L.current),$Fe(C.current,T.current,K).then(H=>{const U={...H,isPositioned:k.current!==!1};j.current&&!UV(x.current,U)&&(x.current=U,au.flushSync(()=>{d(U)}))})},[f,e,i,L,k]);aV(()=>{u===!1&&x.current.isPositioned&&(x.current.isPositioned=!1,d(K=>({...K,isPositioned:!1})))},[u]);const j=G.useRef(!1);aV(()=>(j.current=!0,()=>{j.current=!1}),[]),aV(()=>{if(S&&(C.current=S),_&&(T.current=_),S&&_){if(w.current)return w.current(S,_,D);D()}},[S,_,D,w,A]);const N=G.useMemo(()=>({reference:C,floating:T,setReference:m,setFloating:b}),[m,b]),V=G.useMemo(()=>({reference:S,floating:_}),[S,_]),W=G.useMemo(()=>{const K={position:i,left:0,top:0};if(!V.floating)return K;const H=zK(V.floating,c.x),U=zK(V.floating,c.y);return s?{...K,transform:"translate("+H+"px, "+U+"px)",...sme(V.floating)>=1.5&&{willChange:"transform"}}:{position:i,left:H,top:U}},[i,s,V.floating,c.x,c.y]);return G.useMemo(()=>({...c,update:D,refs:N,elements:V,floatingStyles:W}),[c,D,N,V,W])}const ZFe=r=>{function e(i){return{}.hasOwnProperty.call(i,"current")}return{name:"arrow",options:r,fn(i){const{element:n,padding:t}=typeof r=="function"?r(i):r;return n&&e(n)?n.current!=null?UK({element:n.current,padding:t}).fn(i):{}:n?UK({element:n,padding:t}).fn(i):{}}}},JFe=(r,e)=>({...HFe(r),options:[r,e]}),QFe=(r,e)=>({...UFe(r),options:[r,e]}),eje=(r,e)=>({...YFe(r),options:[r,e]}),tje=(r,e)=>({...zFe(r),options:[r,e]}),rje=(r,e)=>({...WFe(r),options:[r,e]}),ije=(r,e)=>({...GFe(r),options:[r,e]}),nje=(r,e)=>({...ZFe(r),options:[r,e]});var oje="Arrow",lme=G.forwardRef((r,e)=>{const{children:i,width:n=10,height:t=5,...o}=r;return R.jsx(rs.svg,{...o,ref:e,width:n,height:t,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:r.asChild?i:R.jsx("polygon",{points:"0,0 30,0 15,10"})})});lme.displayName=oje;var aje=lme;function sje(r){const[e,i]=G.useState(void 0);return $0(()=>{if(r){i({width:r.offsetWidth,height:r.offsetHeight});const n=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;const o=t[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=r.offsetWidth,s=r.offsetHeight;i({width:a,height:s})});return n.observe(r,{box:"border-box"}),()=>n.unobserve(r)}else i(void 0)},[r]),e}var sq="Popper",[ume,_H]=$S(sq),[lje,cme]=ume(sq),dme=r=>{const{__scopePopper:e,children:i}=r,[n,t]=G.useState(null);return R.jsx(lje,{scope:e,anchor:n,onAnchorChange:t,children:i})};dme.displayName=sq;var fme="PopperAnchor",hme=G.forwardRef((r,e)=>{const{__scopePopper:i,virtualRef:n,...t}=r,o=cme(fme,i),a=G.useRef(null),s=zl(e,a),l=G.useRef(null);return G.useEffect(()=>{const u=l.current;l.current=(n==null?void 0:n.current)||a.current,u!==l.current&&o.onAnchorChange(l.current)}),n?null:R.jsx(rs.div,{...t,ref:s})});hme.displayName=fme;var lq="PopperContent",[uje,cje]=ume(lq),pme=G.forwardRef((r,e)=>{var pe,_e,Te,De,Pe,Ee;const{__scopePopper:i,side:n="bottom",sideOffset:t=0,align:o="center",alignOffset:a=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:h="optimized",onPlaced:p,...g}=r,v=cme(lq,i),[y,m]=G.useState(null),b=zl(e,Re=>m(Re)),[S,_]=G.useState(null),C=sje(S),T=(C==null?void 0:C.width)??0,x=(C==null?void 0:C.height)??0,A=n+(o!=="center"?"-"+o:""),w=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},L=Array.isArray(u)?u:[u],k=L.length>0,D={padding:w,boundary:L.filter(fje),altBoundary:k},{refs:j,floatingStyles:N,placement:V,isPositioned:W,middlewareData:K}=KFe({strategy:"fixed",placement:A,whileElementsMounted:(...Re)=>VFe(...Re,{animationFrame:h==="always"}),elements:{reference:v.anchor},middleware:[JFe({mainAxis:t+x,alignmentAxis:a}),l&&QFe({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?eje():void 0,...D}),l&&tje({...D}),rje({...D,apply:({elements:Re,rects:je,availableWidth:Ke,availableHeight:ot})=>{const{width:We,height:xe}=je.reference,ve=Re.floating.style;ve.setProperty("--radix-popper-available-width",`${Ke}px`),ve.setProperty("--radix-popper-available-height",`${ot}px`),ve.setProperty("--radix-popper-anchor-width",`${We}px`),ve.setProperty("--radix-popper-anchor-height",`${xe}px`)}}),S&&nje({element:S,padding:s}),hje({arrowWidth:T,arrowHeight:x}),f&&ije({strategy:"referenceHidden",...D})]}),[H,U]=yme(V),I=Wv(p);$0(()=>{W&&(I==null||I())},[W,I]);const Q=(pe=K.arrow)==null?void 0:pe.x,Z=(_e=K.arrow)==null?void 0:_e.y,ee=((Te=K.arrow)==null?void 0:Te.centerOffset)!==0,[ie,de]=G.useState();return $0(()=>{y&&de(window.getComputedStyle(y).zIndex)},[y]),R.jsx("div",{ref:j.setFloating,"data-radix-popper-content-wrapper":"",style:{...N,transform:W?N.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ie,"--radix-popper-transform-origin":[(De=K.transformOrigin)==null?void 0:De.x,(Pe=K.transformOrigin)==null?void 0:Pe.y].join(" "),...((Ee=K.hide)==null?void 0:Ee.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:r.dir,children:R.jsx(uje,{scope:i,placedSide:H,onArrowChange:_,arrowX:Q,arrowY:Z,shouldHideArrow:ee,children:R.jsx(rs.div,{"data-side":H,"data-align":U,...g,ref:b,style:{...g.style,animation:W?void 0:"none"}})})})});pme.displayName=lq;var gme="PopperArrow",dje={top:"bottom",right:"left",bottom:"top",left:"right"},vme=G.forwardRef(function(e,i){const{__scopePopper:n,...t}=e,o=cje(gme,n),a=dje[o.placedSide];return R.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:R.jsx(aje,{...t,ref:i,style:{...t.style,display:"block"}})})});vme.displayName=gme;function fje(r){return r!==null}var hje=r=>({name:"transformOrigin",options:r,fn(e){var v,y,m;const{placement:i,rects:n,middlewareData:t}=e,a=((v=t.arrow)==null?void 0:v.centerOffset)!==0,s=a?0:r.arrowWidth,l=a?0:r.arrowHeight,[u,c]=yme(i),d={start:"0%",center:"50%",end:"100%"}[c],f=(((y=t.arrow)==null?void 0:y.x)??0)+s/2,h=(((m=t.arrow)==null?void 0:m.y)??0)+l/2;let p="",g="";return u==="bottom"?(p=a?d:`${f}px`,g=`${-l}px`):u==="top"?(p=a?d:`${f}px`,g=`${n.floating.height+l}px`):u==="right"?(p=`${-l}px`,g=a?d:`${h}px`):u==="left"&&(p=`${n.floating.width+l}px`,g=a?d:`${h}px`),{data:{x:p,y:g}}}});function yme(r){const[e,i="center"]=r.split("-");return[e,i]}var uq=dme,mme=hme,bme=pme,Sme=vme,pje="Portal",PH=G.forwardRef((r,e)=>{var s;const{container:i,...n}=r,[t,o]=G.useState(!1);$0(()=>o(!0),[]);const a=i||t&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?CMe.createPortal(R.jsx(rs.div,{...n,ref:e}),a):null});PH.displayName=pje;function gje(r,e){return G.useReducer((i,n)=>e[i][n]??i,r)}var wg=r=>{const{present:e,children:i}=r,n=vje(e),t=typeof i=="function"?i({present:n.isPresent}):G.Children.only(i),o=zl(n.ref,yje(t));return typeof i=="function"||n.isPresent?G.cloneElement(t,{ref:o}):null};wg.displayName="Presence";function vje(r){const[e,i]=G.useState(),n=G.useRef(null),t=G.useRef(r),o=G.useRef("none"),a=r?"mounted":"unmounted",[s,l]=gje(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return G.useEffect(()=>{const u=Nj(n.current);o.current=s==="mounted"?u:"none"},[s]),$0(()=>{const u=n.current,c=t.current;if(c!==r){const f=o.current,h=Nj(u);r?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&f!==h?"ANIMATION_OUT":"UNMOUNT"),t.current=r}},[r,l]),$0(()=>{if(e){let u;const c=e.ownerDocument.defaultView??window,d=h=>{const g=Nj(n.current).includes(CSS.escape(h.animationName));if(h.target===e&&g&&(l("ANIMATION_END"),!t.current)){const v=e.style.animationFillMode;e.style.animationFillMode="forwards",u=c.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=v)})}},f=h=>{h.target===e&&(o.current=Nj(n.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",d),e.addEventListener("animationend",d),()=>{c.clearTimeout(u),e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",d),e.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:G.useCallback(u=>{n.current=u?getComputedStyle(u):null,i(u)},[])}}function Nj(r){return(r==null?void 0:r.animationName)||"none"}function yje(r){var n,t;let e=(n=Object.getOwnPropertyDescriptor(r.props,"ref"))==null?void 0:n.get,i=e&&"isReactWarning"in e&&e.isReactWarning;return i?r.ref:(e=(t=Object.getOwnPropertyDescriptor(r,"ref"))==null?void 0:t.get,i=e&&"isReactWarning"in e&&e.isReactWarning,i?r.props.ref:r.props.ref||r.ref)}var mje=OV[" useInsertionEffect ".trim().toString()]||$0;function _M({prop:r,defaultProp:e,onChange:i=()=>{},caller:n}){const[t,o,a]=bje({defaultProp:e,onChange:i}),s=r!==void 0,l=s?r:t;{const c=G.useRef(r!==void 0);G.useEffect(()=>{const d=c.current;d!==s&&console.warn(`${n} is changing from ${d?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=s},[s,n])}const u=G.useCallback(c=>{var d;if(s){const f=Sje(c)?c(r):c;f!==r&&((d=a.current)==null||d.call(a,f))}else o(c)},[s,r,o,a]);return[l,u]}function bje({defaultProp:r,onChange:e}){const[i,n]=G.useState(r),t=G.useRef(i),o=G.useRef(e);return mje(()=>{o.current=e},[e]),G.useEffect(()=>{var a;t.current!==i&&((a=o.current)==null||a.call(o,i),t.current=i)},[i,t]),[i,n,o]}function Sje(r){return typeof r=="function"}var _je=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Pje="VisuallyHidden",_me=G.forwardRef((r,e)=>R.jsx(rs.span,{...r,ref:e,style:{..._je,...r.style}}));_me.displayName=Pje;var Cje=_me,[CH]=$S("Tooltip",[_H]),TH=_H(),Pme="TooltipProvider",Tje=700,H6="tooltip.open",[xje,cq]=CH(Pme),Cme=r=>{const{__scopeTooltip:e,delayDuration:i=Tje,skipDelayDuration:n=300,disableHoverableContent:t=!1,children:o}=r,a=G.useRef(!0),s=G.useRef(!1),l=G.useRef(0);return G.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),R.jsx(xje,{scope:e,isOpenDelayedRef:a,delayDuration:i,onOpen:G.useCallback(()=>{window.clearTimeout(l.current),a.current=!1},[]),onClose:G.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.current=!0,n)},[n]),isPointerInTransitRef:s,onPointerInTransitChange:G.useCallback(u=>{s.current=u},[]),disableHoverableContent:t,children:o})};Cme.displayName=Pme;var jN="Tooltip",[Eje,BF]=CH(jN),dq=r=>{const{__scopeTooltip:e,children:i,open:n,defaultOpen:t,onOpenChange:o,disableHoverableContent:a,delayDuration:s}=r,l=cq(jN,r.__scopeTooltip),u=TH(e),[c,d]=G.useState(null),f=Fv(),h=G.useRef(0),p=a??l.disableHoverableContent,g=s??l.delayDuration,v=G.useRef(!1),[y,m]=_M({prop:n,defaultProp:t??!1,onChange:T=>{T?(l.onOpen(),document.dispatchEvent(new CustomEvent(H6))):l.onClose(),o==null||o(T)},caller:jN}),b=G.useMemo(()=>y?v.current?"delayed-open":"instant-open":"closed",[y]),S=G.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,m(!0)},[m]),_=G.useCallback(()=>{window.clearTimeout(h.current),h.current=0,m(!1)},[m]),C=G.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,m(!0),h.current=0},g)},[g,m]);return G.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),R.jsx(uq,{...u,children:R.jsx(Eje,{scope:e,contentId:f,open:y,stateAttribute:b,trigger:c,onTriggerChange:d,onTriggerEnter:G.useCallback(()=>{l.isOpenDelayedRef.current?C():S()},[l.isOpenDelayedRef,C,S]),onTriggerLeave:G.useCallback(()=>{p?_():(window.clearTimeout(h.current),h.current=0)},[_,p]),onOpen:S,onClose:_,disableHoverableContent:p,children:i})})};dq.displayName=jN;var U6="TooltipTrigger",fq=G.forwardRef((r,e)=>{const{__scopeTooltip:i,...n}=r,t=BF(U6,i),o=cq(U6,i),a=TH(i),s=G.useRef(null),l=zl(e,s,t.onTriggerChange),u=G.useRef(!1),c=G.useRef(!1),d=G.useCallback(()=>u.current=!1,[]);return G.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),R.jsx(mme,{asChild:!0,...a,children:R.jsx(rs.button,{"aria-describedby":t.open?t.contentId:void 0,"data-state":t.stateAttribute,...n,ref:l,onPointerMove:an(r.onPointerMove,f=>{f.pointerType!=="touch"&&!c.current&&!o.isPointerInTransitRef.current&&(t.onTriggerEnter(),c.current=!0)}),onPointerLeave:an(r.onPointerLeave,()=>{t.onTriggerLeave(),c.current=!1}),onPointerDown:an(r.onPointerDown,()=>{t.open&&t.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:an(r.onFocus,()=>{u.current||t.onOpen()}),onBlur:an(r.onBlur,t.onClose),onClick:an(r.onClick,t.onClose)})})});fq.displayName=U6;var hq="TooltipPortal",[Aje,wje]=CH(hq,{forceMount:void 0}),pq=r=>{const{__scopeTooltip:e,forceMount:i,children:n,container:t}=r,o=BF(hq,e);return R.jsx(Aje,{scope:e,forceMount:i,children:R.jsx(wg,{present:i||o.open,children:R.jsx(PH,{asChild:!0,container:t,children:n})})})};pq.displayName=hq;var XR="TooltipContent",gq=G.forwardRef((r,e)=>{const i=wje(XR,r.__scopeTooltip),{forceMount:n=i.forceMount,side:t="top",...o}=r,a=BF(XR,r.__scopeTooltip);return R.jsx(wg,{present:n||a.open,children:a.disableHoverableContent?R.jsx(Tme,{side:t,...o,ref:e}):R.jsx(Oje,{side:t,...o,ref:e})})}),Oje=G.forwardRef((r,e)=>{const i=BF(XR,r.__scopeTooltip),n=cq(XR,r.__scopeTooltip),t=G.useRef(null),o=zl(e,t),[a,s]=G.useState(null),{trigger:l,onClose:u}=i,c=t.current,{onPointerInTransitChange:d}=n,f=G.useCallback(()=>{s(null),d(!1)},[d]),h=G.useCallback((p,g)=>{const v=p.currentTarget,y={x:p.clientX,y:p.clientY},m=kje(y,v.getBoundingClientRect()),b=Ije(y,m),S=Nje(g.getBoundingClientRect()),_=jje([...b,...S]);s(_),d(!0)},[d]);return G.useEffect(()=>()=>f(),[f]),G.useEffect(()=>{if(l&&c){const p=v=>h(v,c),g=v=>h(v,l);return l.addEventListener("pointerleave",p),c.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",p),c.removeEventListener("pointerleave",g)}}},[l,c,h,f]),G.useEffect(()=>{if(a){const p=g=>{const v=g.target,y={x:g.clientX,y:g.clientY},m=(l==null?void 0:l.contains(v))||(c==null?void 0:c.contains(v)),b=!Fje(y,a);m?f():b&&(f(),u())};return document.addEventListener("pointermove",p),()=>document.removeEventListener("pointermove",p)}},[l,c,a,u,f]),R.jsx(Tme,{...r,ref:o})}),[Dje,Rje]=CH(jN,{isInside:!1}),Mje=LNe("TooltipContent"),Tme=G.forwardRef((r,e)=>{const{__scopeTooltip:i,children:n,"aria-label":t,onEscapeKeyDown:o,onPointerDownOutside:a,...s}=r,l=BF(XR,i),u=TH(i),{onClose:c}=l;return G.useEffect(()=>(document.addEventListener(H6,c),()=>document.removeEventListener(H6,c)),[c]),G.useEffect(()=>{if(l.trigger){const d=f=>{const h=f.target;h!=null&&h.contains(l.trigger)&&c()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,c]),R.jsx(vH,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:R.jsxs(bme,{"data-state":l.stateAttribute,...u,...s,ref:e,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[R.jsx(Mje,{children:n}),R.jsx(Dje,{scope:i,isInside:!0,children:R.jsx(Cje,{id:l.contentId,role:"tooltip",children:t||n})})]})})});gq.displayName=XR;var xme="TooltipArrow",Lje=G.forwardRef((r,e)=>{const{__scopeTooltip:i,...n}=r,t=TH(i);return Rje(xme,i).isInside?null:R.jsx(Sme,{...t,...n,ref:e})});Lje.displayName=xme;function kje(r,e){const i=Math.abs(e.top-r.y),n=Math.abs(e.bottom-r.y),t=Math.abs(e.right-r.x),o=Math.abs(e.left-r.x);switch(Math.min(i,n,t,o)){case o:return"left";case t:return"right";case i:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function Ije(r,e,i=5){const n=[];switch(e){case"top":n.push({x:r.x-i,y:r.y+i},{x:r.x+i,y:r.y+i});break;case"bottom":n.push({x:r.x-i,y:r.y-i},{x:r.x+i,y:r.y-i});break;case"left":n.push({x:r.x+i,y:r.y-i},{x:r.x+i,y:r.y+i});break;case"right":n.push({x:r.x-i,y:r.y-i},{x:r.x-i,y:r.y+i});break}return n}function Nje(r){const{top:e,right:i,bottom:n,left:t}=r;return[{x:t,y:e},{x:i,y:e},{x:i,y:n},{x:t,y:n}]}function Fje(r,e){const{x:i,y:n}=r;let t=!1;for(let o=0,a=e.length-1;o<e.length;a=o++){const s=e[o],l=e[a],u=s.x,c=s.y,d=l.x,f=l.y;c>n!=f>n&&i<(d-u)*(n-c)/(f-c)+u&&(t=!t)}return t}function jje(r){const e=r.slice();return e.sort((i,n)=>i.x<n.x?-1:i.x>n.x?1:i.y<n.y?-1:i.y>n.y?1:0),Bje(e)}function Bje(r){if(r.length<=1)return r.slice();const e=[];for(let n=0;n<r.length;n++){const t=r[n];for(;e.length>=2;){const o=e[e.length-1],a=e[e.length-2];if((o.x-a.x)*(t.y-a.y)>=(o.y-a.y)*(t.x-a.x))e.pop();else break}e.push(t)}e.pop();const i=[];for(let n=r.length-1;n>=0;n--){const t=r[n];for(;i.length>=2;){const o=i[i.length-1],a=i[i.length-2];if((o.x-a.x)*(t.y-a.y)>=(o.y-a.y)*(t.x-a.x))i.pop();else break}i.push(t)}return i.pop(),e.length===1&&i.length===1&&e[0].x===i[0].x&&e[0].y===i[0].y?e:e.concat(i)}var Vje=dq,Hje=fq,Uje=pq,zje=gq;function PM(r){const e=r.side??"bottom",i=r.delay??0;return R.jsxs(dq,{delayDuration:i,children:[R.jsx(fq,{asChild:!0,children:R.jsx("div",{className:Nr("inline-flex",r.className),children:r.children})}),R.jsx(pq,{children:R.jsx(gq,{side:e,sideOffset:8,avoidCollisions:!0,collisionPadding:8,className:Nr("z-[9999] max-w-[var(--radix-tooltip-content-available-width)]","px-3 py-2.5 bg-slate-50 text-slate-950 dark:bg-neutral-800 dark:text-neutral-200 rounded-lg shadow-2xl","transition-opacity duration-150"),children:r.content})})]})}function Wje(r){return R.jsx("div",{className:Nr("flex items-center gap-0.5 p-1 rounded-lg bg-muted",r.className),children:r.options.map(e=>{const i=r.value===e.value,n=e.isLoading,t=e.icon&&!e.label,o=R.jsxs("button",{onClick:()=>r.onChange(e.value),className:Nr("flex items-center justify-center gap-1.5 rounded-md transition-all duration-150",t?"w-8 h-8":"px-3 py-1.5",i?"bg-primary text-primary-foreground dark:bg-background dark:text-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted-foreground/10"),children:[n?R.jsx(Fr,{type:sr.STATUS_LOADING,className:Nr("animate-spin",t?"w-4 h-4":"w-3.5 h-3.5")}):e.icon&&R.jsx(Fr,{type:e.icon,className:t?"w-4 h-4":"w-3.5 h-3.5"}),!t&&e.label&&R.jsx("span",{className:"text-xs font-medium",children:e.label})]},e.value);return e.tooltip?R.jsx(PM,{content:R.jsx("p",{className:"text-xs",children:e.tooltip}),side:"bottom",delay:400,children:o},e.value):o})})}const ps={OVERVIEW:"overview",FILES:"files",TOPOLOGY:"topology",SETTINGS:"settings",ABOUT:"about"},M0={MAIN:"main",BOTTOM:"bottom"},Fj=[{id:ps.OVERVIEW,label:"Overview",icon:Vi.CONTEXT_HOME,position:M0.MAIN},{id:ps.FILES,label:"Files",icon:Vi.CONTEXT_FILES,position:M0.MAIN},{id:ps.TOPOLOGY,label:"Topology",icon:Vi.CONTEXT_TOPOLOGY,position:M0.MAIN},{id:ps.SETTINGS,label:"Settings",icon:Vi.CONTEXT_SETTINGS,position:M0.BOTTOM},{id:ps.ABOUT,label:"About",icon:Vi.CONTEXT_ABOUT,position:M0.BOTTOM}],fc={WELCOME:"/",OVERVIEW:"/overview",FILES:"/files",TOPOLOGY_PLATFORM:"/topology/platform",TOPOLOGY_INSTANCE:"/topology/instance",TOPOLOGY_RESTBUS:"/topology/restbus",TOPOLOGY_API_PLAYGROUND:"/topology/api-playground",SETTINGS:"/settings",ABOUT:"/about"},Eme=G.createContext(null);function Gje({children:r}){const[e,i]=G.useState(Fj[0]),[n,t]=G.useState(!1),o=G.useCallback(c=>{const d=Fj.find(f=>f.id===c);d&&(z7(d)&&t(!1),i(f=>f.id===c?f:d))},[]),a=G.useCallback(c=>{const d=Fj.find(f=>f.id===c);d&&i(f=>f.id!==c?d:f)},[]),s=G.useCallback(()=>{t(c=>!c)},[]),l=G.useCallback(c=>{t(c)},[]),u=G.useCallback(c=>{t(!c)},[]);return R.jsx(Eme.Provider,{value:{contexts:Fj,activeContext:e,panelCollapsed:n,setActiveContext:o,setContextActive:o,setActiveContextHighlight:a,togglePanelCollapsed:s,setPanelCollapsed:l,setContextPanelExpanded:u,isContextActive:()=>!1},children:r})}function CM(r={}){const{onPanelContextSelect:e,onNavigate:i}=r,n=G.useContext(Eme);if(!n)throw new Error("useContextTabs must be used within a ContextTabsProvider");const{activePage:t,pages:o,openPage:a,setActivePage:s}=u_(),l=G.useCallback(p=>{if(!t)return!1;const g=Nz(t.type);return(g==null?void 0:g.contextId)===p},[t]),u=G.useMemo(()=>n.contexts.filter(p=>p.position===M0.MAIN),[n.contexts]),c=G.useMemo(()=>n.contexts.filter(p=>p.position===M0.BOTTOM),[n.contexts]),d=G.useMemo(()=>[...u,...c],[u,c]),f=G.useCallback(p=>{var g;if(!z7(p)){const y=(g=jdt(p.id)[0])==null?void 0:g.route;if(!y)return;const m=o.find(b=>b.type===y);m?s(m.id):a(y),i==null||i();return}e==null||e(p.id)},[o,a,s,e,i]),h=G.useCallback(p=>{a(p),i==null||i()},[a,i]);return{...n,isContextActive:l,mainContexts:u,bottomContexts:c,allContexts:d,handleContextClick:f,handleSubPageSelect:h,activePage:t,getIcon:FF}}var h4="focusScope.autoFocusOnMount",p4="focusScope.autoFocusOnUnmount",WK={bubbles:!1,cancelable:!0},Yje="FocusScope",vq=G.forwardRef((r,e)=>{const{loop:i=!1,trapped:n=!1,onMountAutoFocus:t,onUnmountAutoFocus:o,...a}=r,[s,l]=G.useState(null),u=Wv(t),c=Wv(o),d=G.useRef(null),f=zl(e,g=>l(g)),h=G.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;G.useEffect(()=>{if(n){let g=function(b){if(h.paused||!s)return;const S=b.target;s.contains(S)?d.current=S:sS(d.current,{select:!0})},v=function(b){if(h.paused||!s)return;const S=b.relatedTarget;S!==null&&(s.contains(S)||sS(d.current,{select:!0}))},y=function(b){if(document.activeElement===document.body)for(const _ of b)_.removedNodes.length>0&&sS(s)};document.addEventListener("focusin",g),document.addEventListener("focusout",v);const m=new MutationObserver(y);return s&&m.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",v),m.disconnect()}}},[n,s,h.paused]),G.useEffect(()=>{if(s){YK.add(h);const g=document.activeElement;if(!s.contains(g)){const y=new CustomEvent(h4,WK);s.addEventListener(h4,u),s.dispatchEvent(y),y.defaultPrevented||($je(Jje(Ame(s)),{select:!0}),document.activeElement===g&&sS(s))}return()=>{s.removeEventListener(h4,u),setTimeout(()=>{const y=new CustomEvent(p4,WK);s.addEventListener(p4,c),s.dispatchEvent(y),y.defaultPrevented||sS(g??document.body,{select:!0}),s.removeEventListener(p4,c),YK.remove(h)},0)}}},[s,u,c,h]);const p=G.useCallback(g=>{if(!i&&!n||h.paused)return;const v=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,y=document.activeElement;if(v&&y){const m=g.currentTarget,[b,S]=qje(m);b&&S?!g.shiftKey&&y===S?(g.preventDefault(),i&&sS(b,{select:!0})):g.shiftKey&&y===b&&(g.preventDefault(),i&&sS(S,{select:!0})):y===m&&g.preventDefault()}},[i,n,h.paused]);return R.jsx(rs.div,{tabIndex:-1,...a,ref:f,onKeyDown:p})});vq.displayName=Yje;function $je(r,{select:e=!1}={}){const i=document.activeElement;for(const n of r)if(sS(n,{select:e}),document.activeElement!==i)return}function qje(r){const e=Ame(r),i=GK(e,r),n=GK(e.reverse(),r);return[i,n]}function Ame(r){const e=[],i=document.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const t=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||t?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;i.nextNode();)e.push(i.currentNode);return e}function GK(r,e){for(const i of r)if(!Xje(i,{upTo:e}))return i}function Xje(r,{upTo:e}){if(getComputedStyle(r).visibility==="hidden")return!0;for(;r;){if(e!==void 0&&r===e)return!1;if(getComputedStyle(r).display==="none")return!0;r=r.parentElement}return!1}function Kje(r){return r instanceof HTMLInputElement&&"select"in r}function sS(r,{select:e=!1}={}){if(r&&r.focus){const i=document.activeElement;r.focus({preventScroll:!0}),r!==i&&Kje(r)&&e&&r.select()}}var YK=Zje();function Zje(){let r=[];return{add(e){const i=r[0];e!==i&&(i==null||i.pause()),r=$K(r,e),r.unshift(e)},remove(e){var i;r=$K(r,e),(i=r[0])==null||i.resume()}}}function $K(r,e){const i=[...r],n=i.indexOf(e);return n!==-1&&i.splice(n,1),i}function Jje(r){return r.filter(e=>e.tagName!=="A")}var g4=0;function wme(){G.useEffect(()=>{const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",r[0]??qK()),document.body.insertAdjacentElement("beforeend",r[1]??qK()),g4++,()=>{g4===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),g4--}},[])}function qK(){const r=document.createElement("span");return r.setAttribute("data-radix-focus-guard",""),r.tabIndex=0,r.style.outline="none",r.style.opacity="0",r.style.position="fixed",r.style.pointerEvents="none",r}var Av=function(){return Av=Object.assign||function(e){for(var i,n=1,t=arguments.length;n<t;n++){i=arguments[n];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o])}return e},Av.apply(this,arguments)};function Ome(r,e){var i={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(i[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var t=0,n=Object.getOwnPropertySymbols(r);t<n.length;t++)e.indexOf(n[t])<0&&Object.prototype.propertyIsEnumerable.call(r,n[t])&&(i[n[t]]=r[n[t]]);return i}function Qje(r,e,i){if(i||arguments.length===2)for(var n=0,t=e.length,o;n<t;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))}var sV="right-scroll-bar-position",lV="width-before-scroll-bar",eBe="with-scroll-bars-hidden",tBe="--removed-body-scroll-bar-size";function v4(r,e){return typeof r=="function"?r(e):r&&(r.current=e),r}function rBe(r,e){var i=G.useState(function(){return{value:r,callback:e,facade:{get current(){return i.value},set current(n){var t=i.value;t!==n&&(i.value=n,i.callback(n,t))}}}})[0];return i.callback=e,i.facade}var iBe=typeof window<"u"?G.useLayoutEffect:G.useEffect,XK=new WeakMap;function nBe(r,e){var i=rBe(null,function(n){return r.forEach(function(t){return v4(t,n)})});return iBe(function(){var n=XK.get(i);if(n){var t=new Set(n),o=new Set(r),a=i.current;t.forEach(function(s){o.has(s)||v4(s,null)}),o.forEach(function(s){t.has(s)||v4(s,a)})}XK.set(i,r)},[r]),i}function oBe(r){return r}function aBe(r,e){e===void 0&&(e=oBe);var i=[],n=!1,t={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return i.length?i[i.length-1]:r},useMedium:function(o){var a=e(o,n);return i.push(a),function(){i=i.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(n=!0;i.length;){var a=i;i=[],a.forEach(o)}i={push:function(s){return o(s)},filter:function(){return i}}},assignMedium:function(o){n=!0;var a=[];if(i.length){var s=i;i=[],s.forEach(o),a=i}var l=function(){var c=a;a=[],c.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),i={push:function(c){a.push(c),u()},filter:function(c){return a=a.filter(c),i}}}};return t}function sBe(r){r===void 0&&(r={});var e=aBe(null);return e.options=Av({async:!0,ssr:!1},r),e}var Dme=function(r){var e=r.sideCar,i=Ome(r,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=e.read();if(!n)throw new Error("Sidecar medium not found");return G.createElement(n,Av({},i))};Dme.isSideCarExport=!0;function lBe(r,e){return r.useMedium(e),Dme}var Rme=sBe(),y4=function(){},xH=G.forwardRef(function(r,e){var i=G.useRef(null),n=G.useState({onScrollCapture:y4,onWheelCapture:y4,onTouchMoveCapture:y4}),t=n[0],o=n[1],a=r.forwardProps,s=r.children,l=r.className,u=r.removeScrollBar,c=r.enabled,d=r.shards,f=r.sideCar,h=r.noRelative,p=r.noIsolation,g=r.inert,v=r.allowPinchZoom,y=r.as,m=y===void 0?"div":y,b=r.gapMode,S=Ome(r,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=f,C=nBe([i,e]),T=Av(Av({},S),t);return G.createElement(G.Fragment,null,c&&G.createElement(_,{sideCar:Rme,removeScrollBar:u,shards:d,noRelative:h,noIsolation:p,inert:g,setCallbacks:o,allowPinchZoom:!!v,lockRef:i,gapMode:b}),a?G.cloneElement(G.Children.only(s),Av(Av({},T),{ref:C})):G.createElement(m,Av({},T,{className:l,ref:C}),s))});xH.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};xH.classNames={fullWidth:lV,zeroRight:sV};var uBe=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function cBe(){if(!document)return null;var r=document.createElement("style");r.type="text/css";var e=uBe();return e&&r.setAttribute("nonce",e),r}function dBe(r,e){r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}function fBe(r){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(r)}var hBe=function(){var r=0,e=null;return{add:function(i){r==0&&(e=cBe())&&(dBe(e,i),fBe(e)),r++},remove:function(){r--,!r&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},pBe=function(){var r=hBe();return function(e,i){G.useEffect(function(){return r.add(e),function(){r.remove()}},[e&&i])}},Mme=function(){var r=pBe(),e=function(i){var n=i.styles,t=i.dynamic;return r(n,t),null};return e},gBe={left:0,top:0,right:0,gap:0},m4=function(r){return parseInt(r||"",10)||0},vBe=function(r){var e=window.getComputedStyle(document.body),i=e[r==="padding"?"paddingLeft":"marginLeft"],n=e[r==="padding"?"paddingTop":"marginTop"],t=e[r==="padding"?"paddingRight":"marginRight"];return[m4(i),m4(n),m4(t)]},yBe=function(r){if(r===void 0&&(r="margin"),typeof window>"u")return gBe;var e=vBe(r),i=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-i+e[2]-e[0])}},mBe=Mme(),SR="data-scroll-locked",bBe=function(r,e,i,n){var t=r.left,o=r.top,a=r.right,s=r.gap;return i===void 0&&(i="margin"),`
  .`.concat(eBe,` {
   overflow: hidden `).concat(n,`;
   padding-right: `).concat(s,"px ").concat(n,`;
  }
  body[`).concat(SR,`] {
    overflow: hidden `).concat(n,`;
    overscroll-behavior: contain;
    `).concat([e&&"position: relative ".concat(n,";"),i==="margin"&&`
    padding-left: `.concat(t,`px;
    padding-top: `).concat(o,`px;
    padding-right: `).concat(a,`px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(s,"px ").concat(n,`;
    `),i==="padding"&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),`
  }
  
  .`).concat(sV,` {
    right: `).concat(s,"px ").concat(n,`;
  }
  
  .`).concat(lV,` {
    margin-right: `).concat(s,"px ").concat(n,`;
  }
  
  .`).concat(sV," .").concat(sV,` {
    right: 0 `).concat(n,`;
  }
  
  .`).concat(lV," .").concat(lV,` {
    margin-right: 0 `).concat(n,`;
  }
  
  body[`).concat(SR,`] {
    `).concat(tBe,": ").concat(s,`px;
  }
`)},KK=function(){var r=parseInt(document.body.getAttribute(SR)||"0",10);return isFinite(r)?r:0},SBe=function(){G.useEffect(function(){return document.body.setAttribute(SR,(KK()+1).toString()),function(){var r=KK()-1;r<=0?document.body.removeAttribute(SR):document.body.setAttribute(SR,r.toString())}},[])},_Be=function(r){var e=r.noRelative,i=r.noImportant,n=r.gapMode,t=n===void 0?"margin":n;SBe();var o=G.useMemo(function(){return yBe(t)},[t]);return G.createElement(mBe,{styles:bBe(o,!e,t,i?"":"!important")})},z6=!1;if(typeof window<"u")try{var jj=Object.defineProperty({},"passive",{get:function(){return z6=!0,!0}});window.addEventListener("test",jj,jj),window.removeEventListener("test",jj,jj)}catch{z6=!1}var MD=z6?{passive:!1}:!1,PBe=function(r){return r.tagName==="TEXTAREA"},Lme=function(r,e){if(!(r instanceof Element))return!1;var i=window.getComputedStyle(r);return i[e]!=="hidden"&&!(i.overflowY===i.overflowX&&!PBe(r)&&i[e]==="visible")},CBe=function(r){return Lme(r,"overflowY")},TBe=function(r){return Lme(r,"overflowX")},ZK=function(r,e){var i=e.ownerDocument,n=e;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var t=kme(r,n);if(t){var o=Ime(r,n),a=o[1],s=o[2];if(a>s)return!0}n=n.parentNode}while(n&&n!==i.body);return!1},xBe=function(r){var e=r.scrollTop,i=r.scrollHeight,n=r.clientHeight;return[e,i,n]},EBe=function(r){var e=r.scrollLeft,i=r.scrollWidth,n=r.clientWidth;return[e,i,n]},kme=function(r,e){return r==="v"?CBe(e):TBe(e)},Ime=function(r,e){return r==="v"?xBe(e):EBe(e)},ABe=function(r,e){return r==="h"&&e==="rtl"?-1:1},wBe=function(r,e,i,n,t){var o=ABe(r,window.getComputedStyle(e).direction),a=o*n,s=i.target,l=e.contains(s),u=!1,c=a>0,d=0,f=0;do{if(!s)break;var h=Ime(r,s),p=h[0],g=h[1],v=h[2],y=g-v-o*p;(p||y)&&kme(r,s)&&(d+=y,f+=p);var m=s.parentNode;s=m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE?m.host:m}while(!l&&s!==document.body||l&&(e.contains(s)||e===s));return(c&&Math.abs(d)<1||!c&&Math.abs(f)<1)&&(u=!0),u},Bj=function(r){return"changedTouches"in r?[r.changedTouches[0].clientX,r.changedTouches[0].clientY]:[0,0]},JK=function(r){return[r.deltaX,r.deltaY]},QK=function(r){return r&&"current"in r?r.current:r},OBe=function(r,e){return r[0]===e[0]&&r[1]===e[1]},DBe=function(r){return`
  .block-interactivity-`.concat(r,` {pointer-events: none;}
  .allow-interactivity-`).concat(r,` {pointer-events: all;}
`)},RBe=0,LD=[];function MBe(r){var e=G.useRef([]),i=G.useRef([0,0]),n=G.useRef(),t=G.useState(RBe++)[0],o=G.useState(Mme)[0],a=G.useRef(r);G.useEffect(function(){a.current=r},[r]),G.useEffect(function(){if(r.inert){document.body.classList.add("block-interactivity-".concat(t));var g=Qje([r.lockRef.current],(r.shards||[]).map(QK),!0).filter(Boolean);return g.forEach(function(v){return v.classList.add("allow-interactivity-".concat(t))}),function(){document.body.classList.remove("block-interactivity-".concat(t)),g.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(t))})}}},[r.inert,r.lockRef.current,r.shards]);var s=G.useCallback(function(g,v){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!a.current.allowPinchZoom;var y=Bj(g),m=i.current,b="deltaX"in g?g.deltaX:m[0]-y[0],S="deltaY"in g?g.deltaY:m[1]-y[1],_,C=g.target,T=Math.abs(b)>Math.abs(S)?"h":"v";if("touches"in g&&T==="h"&&C.type==="range")return!1;var x=window.getSelection(),A=x&&x.anchorNode,w=A?A===C||A.contains(C):!1;if(w)return!1;var L=ZK(T,C);if(!L)return!0;if(L?_=T:(_=T==="v"?"h":"v",L=ZK(T,C)),!L)return!1;if(!n.current&&"changedTouches"in g&&(b||S)&&(n.current=_),!_)return!0;var k=n.current||_;return wBe(k,v,g,k==="h"?b:S)},[]),l=G.useCallback(function(g){var v=g;if(!(!LD.length||LD[LD.length-1]!==o)){var y="deltaY"in v?JK(v):Bj(v),m=e.current.filter(function(_){return _.name===v.type&&(_.target===v.target||v.target===_.shadowParent)&&OBe(_.delta,y)})[0];if(m&&m.should){v.cancelable&&v.preventDefault();return}if(!m){var b=(a.current.shards||[]).map(QK).filter(Boolean).filter(function(_){return _.contains(v.target)}),S=b.length>0?s(v,b[0]):!a.current.noIsolation;S&&v.cancelable&&v.preventDefault()}}},[]),u=G.useCallback(function(g,v,y,m){var b={name:g,delta:v,target:y,should:m,shadowParent:LBe(y)};e.current.push(b),setTimeout(function(){e.current=e.current.filter(function(S){return S!==b})},1)},[]),c=G.useCallback(function(g){i.current=Bj(g),n.current=void 0},[]),d=G.useCallback(function(g){u(g.type,JK(g),g.target,s(g,r.lockRef.current))},[]),f=G.useCallback(function(g){u(g.type,Bj(g),g.target,s(g,r.lockRef.current))},[]);G.useEffect(function(){return LD.push(o),r.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,MD),document.addEventListener("touchmove",l,MD),document.addEventListener("touchstart",c,MD),function(){LD=LD.filter(function(g){return g!==o}),document.removeEventListener("wheel",l,MD),document.removeEventListener("touchmove",l,MD),document.removeEventListener("touchstart",c,MD)}},[]);var h=r.removeScrollBar,p=r.inert;return G.createElement(G.Fragment,null,p?G.createElement(o,{styles:DBe(t)}):null,h?G.createElement(_Be,{noRelative:r.noRelative,gapMode:r.gapMode}):null)}function LBe(r){for(var e=null;r!==null;)r instanceof ShadowRoot&&(e=r.host,r=r.host),r=r.parentNode;return e}const kBe=lBe(Rme,MBe);var yq=G.forwardRef(function(r,e){return G.createElement(xH,Av({},r,{ref:e,sideCar:kBe}))});yq.classNames=xH.classNames;var IBe=function(r){if(typeof document>"u")return null;var e=Array.isArray(r)?r[0]:r;return e.ownerDocument.body},kD=new WeakMap,Vj=new WeakMap,Hj={},b4=0,Nme=function(r){return r&&(r.host||Nme(r.parentNode))},NBe=function(r,e){return e.map(function(i){if(r.contains(i))return i;var n=Nme(i);return n&&r.contains(n)?n:(console.error("aria-hidden",i,"in not contained inside",r,". Doing nothing"),null)}).filter(function(i){return!!i})},FBe=function(r,e,i,n){var t=NBe(e,Array.isArray(r)?r:[r]);Hj[i]||(Hj[i]=new WeakMap);var o=Hj[i],a=[],s=new Set,l=new Set(t),u=function(d){!d||s.has(d)||(s.add(d),u(d.parentNode))};t.forEach(u);var c=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(f){if(s.has(f))c(f);else try{var h=f.getAttribute(n),p=h!==null&&h!=="false",g=(kD.get(f)||0)+1,v=(o.get(f)||0)+1;kD.set(f,g),o.set(f,v),a.push(f),g===1&&p&&Vj.set(f,!0),v===1&&f.setAttribute(i,"true"),p||f.setAttribute(n,"true")}catch(y){console.error("aria-hidden: cannot operate on ",f,y)}})};return c(e),s.clear(),b4++,function(){a.forEach(function(d){var f=kD.get(d)-1,h=o.get(d)-1;kD.set(d,f),o.set(d,h),f||(Vj.has(d)||d.removeAttribute(n),Vj.delete(d)),h||d.removeAttribute(i)}),b4--,b4||(kD=new WeakMap,kD=new WeakMap,Vj=new WeakMap,Hj={})}},Fme=function(r,e,i){i===void 0&&(i="data-aria-hidden");var n=Array.from(Array.isArray(r)?r:[r]),t=IBe(r);return t?(n.push.apply(n,Array.from(t.querySelectorAll("[aria-live], script"))),FBe(n,t,i,"aria-hidden")):function(){return null}},EH="Dialog",[jme]=$S(EH),[jBe,Og]=jme(EH),Bme=r=>{const{__scopeDialog:e,children:i,open:n,defaultOpen:t,onOpenChange:o,modal:a=!0}=r,s=G.useRef(null),l=G.useRef(null),[u,c]=_M({prop:n,defaultProp:t??!1,onChange:o,caller:EH});return R.jsx(jBe,{scope:e,triggerRef:s,contentRef:l,contentId:Fv(),titleId:Fv(),descriptionId:Fv(),open:u,onOpenChange:c,onOpenToggle:G.useCallback(()=>c(d=>!d),[c]),modal:a,children:i})};Bme.displayName=EH;var Vme="DialogTrigger",BBe=G.forwardRef((r,e)=>{const{__scopeDialog:i,...n}=r,t=Og(Vme,i),o=zl(e,t.triggerRef);return R.jsx(rs.button,{type:"button","aria-haspopup":"dialog","aria-expanded":t.open,"aria-controls":t.contentId,"data-state":Sq(t.open),...n,ref:o,onClick:an(r.onClick,t.onOpenToggle)})});BBe.displayName=Vme;var mq="DialogPortal",[VBe,Hme]=jme(mq,{forceMount:void 0}),Ume=r=>{const{__scopeDialog:e,forceMount:i,children:n,container:t}=r,o=Og(mq,e);return R.jsx(VBe,{scope:e,forceMount:i,children:G.Children.map(n,a=>R.jsx(wg,{present:i||o.open,children:R.jsx(PH,{asChild:!0,container:t,children:a})}))})};Ume.displayName=mq;var zV="DialogOverlay",zme=G.forwardRef((r,e)=>{const i=Hme(zV,r.__scopeDialog),{forceMount:n=i.forceMount,...t}=r,o=Og(zV,r.__scopeDialog);return o.modal?R.jsx(wg,{present:n||o.open,children:R.jsx(UBe,{...t,ref:e})}):null});zme.displayName=zV;var HBe=NN("DialogOverlay.RemoveScroll"),UBe=G.forwardRef((r,e)=>{const{__scopeDialog:i,...n}=r,t=Og(zV,i);return R.jsx(yq,{as:HBe,allowPinchZoom:!0,shards:[t.contentRef],children:R.jsx(rs.div,{"data-state":Sq(t.open),...n,ref:e,style:{pointerEvents:"auto",...n.style}})})}),C1="DialogContent",Wme=G.forwardRef((r,e)=>{const i=Hme(C1,r.__scopeDialog),{forceMount:n=i.forceMount,...t}=r,o=Og(C1,r.__scopeDialog);return R.jsx(wg,{present:n||o.open,children:o.modal?R.jsx(zBe,{...t,ref:e}):R.jsx(WBe,{...t,ref:e})})});Wme.displayName=C1;var zBe=G.forwardRef((r,e)=>{const i=Og(C1,r.__scopeDialog),n=G.useRef(null),t=zl(e,i.contentRef,n);return G.useEffect(()=>{const o=n.current;if(o)return Fme(o)},[]),R.jsx(Gme,{...r,ref:t,trapFocus:i.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:an(r.onCloseAutoFocus,o=>{var a;o.preventDefault(),(a=i.triggerRef.current)==null||a.focus()}),onPointerDownOutside:an(r.onPointerDownOutside,o=>{const a=o.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&o.preventDefault()}),onFocusOutside:an(r.onFocusOutside,o=>o.preventDefault())})}),WBe=G.forwardRef((r,e)=>{const i=Og(C1,r.__scopeDialog),n=G.useRef(!1),t=G.useRef(!1);return R.jsx(Gme,{...r,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var a,s;(a=r.onCloseAutoFocus)==null||a.call(r,o),o.defaultPrevented||(n.current||(s=i.triggerRef.current)==null||s.focus(),o.preventDefault()),n.current=!1,t.current=!1},onInteractOutside:o=>{var l,u;(l=r.onInteractOutside)==null||l.call(r,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(t.current=!0));const a=o.target;((u=i.triggerRef.current)==null?void 0:u.contains(a))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&t.current&&o.preventDefault()}})}),Gme=G.forwardRef((r,e)=>{const{__scopeDialog:i,trapFocus:n,onOpenAutoFocus:t,onCloseAutoFocus:o,...a}=r,s=Og(C1,i),l=G.useRef(null),u=zl(e,l);return wme(),R.jsxs(R.Fragment,{children:[R.jsx(vq,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:t,onUnmountAutoFocus:o,children:R.jsx(vH,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Sq(s.open),...a,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),R.jsxs(R.Fragment,{children:[R.jsx(qBe,{titleId:s.titleId}),R.jsx(KBe,{contentRef:l,descriptionId:s.descriptionId})]})]})}),bq="DialogTitle",GBe=G.forwardRef((r,e)=>{const{__scopeDialog:i,...n}=r,t=Og(bq,i);return R.jsx(rs.h2,{id:t.titleId,...n,ref:e})});GBe.displayName=bq;var Yme="DialogDescription",YBe=G.forwardRef((r,e)=>{const{__scopeDialog:i,...n}=r,t=Og(Yme,i);return R.jsx(rs.p,{id:t.descriptionId,...n,ref:e})});YBe.displayName=Yme;var $me="DialogClose",$Be=G.forwardRef((r,e)=>{const{__scopeDialog:i,...n}=r,t=Og($me,i);return R.jsx(rs.button,{type:"button",...n,ref:e,onClick:an(r.onClick,()=>t.onOpenChange(!1))})});$Be.displayName=$me;function Sq(r){return r?"open":"closed"}var qme="DialogTitleWarning",[Tft,Xme]=DNe(qme,{contentName:C1,titleName:bq,docsSlug:"dialog"}),qBe=({titleId:r})=>{const e=Xme(qme),i=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.

If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.

For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return G.useEffect(()=>{r&&(document.getElementById(r)||console.error(i))},[i,r]),null},XBe="DialogDescriptionWarning",KBe=({contentRef:r,descriptionId:e})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Xme(XBe).contentName}}.`;return G.useEffect(()=>{var o;const t=(o=r.current)==null?void 0:o.getAttribute("aria-describedby");e&&t&&(document.getElementById(e)||console.warn(n))},[n,r,e]),null},ZBe=Bme,JBe=Ume,QBe=zme,eVe=Wme;const tVe={xs:"max-w-xs",sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl","2xl":"max-w-2xl","3xl":"max-w-3xl","4xl":"max-w-4xl","5xl":"max-w-5xl","6xl":"max-w-6xl","7xl":"max-w-7xl"},rVe=10001;function AH(r){const e=r.show??!1,i=()=>R.jsx("button",{type:"button",onClick:r.onClose,className:Nr("absolute top-4 right-4 z-10","w-8 h-8 rounded-lg flex items-center justify-center","text-neutral-400 hover:text-neutral-600 dark:hover:text-neutral-200","hover:bg-neutral-100 dark:hover:bg-neutral-800","transition-colors"),"aria-label":"Close",children:R.jsx(Fr,{type:sr.ACTION_CLOSE,className:"w-5 h-5"})});return R.jsx(ZBe,{open:e,onOpenChange:n=>!n&&r.onClose(),children:R.jsx(JBe,{children:R.jsxs("div",{className:"fixed inset-0 flex items-center justify-center p-4",style:{zIndex:rVe},children:[R.jsx(QBe,{className:"absolute inset-0 bg-black/50 backdrop-blur-sm cursor-default",onClick:r.onClose}),R.jsxs(eVe,{className:Nr("relative w-full",tVe[r.size],"bg-white dark:bg-neutral-900","rounded-xl shadow-md","border border-neutral-200 dark:border-neutral-700","animate-fade-in overflow-hidden",r.className),onClick:n=>n.stopPropagation(),"aria-describedby":void 0,children:[r.showCloseButton&&i(),r.children]})]})})})}const Kme=G.createContext(null);function iVe(r){const e=G.useRef(null),[i,n]=G.useState(!1),t=G.useCallback(s=>{e.current=s,n(!0)},[]),o=G.useCallback(()=>{const s=e.current;e.current=null,n(!1),s==null||s()},[]),a=G.useCallback(()=>{e.current=null,n(!1)},[]);return R.jsxs(Kme.Provider,{value:{requestConfirmation:t,hasPendingConfirmation:i,confirmPendingAction:o,cancelPendingAction:a},children:[r.children,R.jsx(AH,{show:i,onClose:a,className:"max-w-sm",size:"sm",children:R.jsxs("div",{className:"p-4",children:[R.jsx("h3",{className:"text-sm font-medium mb-2",children:"Unsaved Changes"}),R.jsx("p",{className:"text-xs text-muted-foreground mb-4",children:"You have unsaved changes. If you close this tab, your changes will be lost."}),R.jsxs("div",{className:"flex justify-end gap-2",children:[R.jsx("button",{onClick:a,className:"px-3 py-1.5 text-xs rounded bg-muted text-muted-foreground hover:bg-muted/80",children:"Cancel"}),R.jsx("button",{onClick:o,className:"px-3 py-1.5 text-xs rounded bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Leave Without Saving"})]})]})})]})}function nVe(){const r=G.useContext(Kme);if(!r)throw new Error("useNavigationGuard must be used within a NavigationGuardProvider");return r}const Zme=G.createContext(null),Jme="/api/studio/v1",oVe=`http://localhost:57123${Jme}`,aVe="AIzaSyAWP8ZPH513e9xl6YOunHbItqd3yP9Zlxs",sVe="1.16.0",Qme=!1;function lVe(r){if(typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",e.firstChild?e.insertBefore(i,e.firstChild):e.appendChild(i),i.styleSheet?i.styleSheet.cssText=r:i.appendChild(document.createTextNode(r))}lVe(`:root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-container-width: fit-content;--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
`);var VF=r=>typeof r=="number"&&!isNaN(r),T1=r=>typeof r=="string",K0=r=>typeof r=="function",uVe=r=>T1(r)||VF(r),W6=r=>T1(r)||K0(r)?r:null,cVe=(r,e)=>r===!1||VF(r)&&r>0?r:e,G6=r=>G.isValidElement(r)||T1(r)||K0(r)||VF(r);function dVe(r,e,i=300){let{scrollHeight:n,style:t}=r;requestAnimationFrame(()=>{t.minHeight="initial",t.height=n+"px",t.transition=`all ${i}ms`,requestAnimationFrame(()=>{t.height="0",t.padding="0",t.margin="0",setTimeout(e,i)})})}function fVe({enter:r,exit:e,appendPosition:i=!1,collapse:n=!0,collapseDuration:t=300}){return function({children:o,position:a,preventExitTransition:s,done:l,nodeRef:u,isIn:c,playToast:d}){let f=i?`${r}--${a}`:r,h=i?`${e}--${a}`:e,p=G.useRef(0);return G.useLayoutEffect(()=>{let g=u.current,v=f.split(" "),y=m=>{m.target===u.current&&(d(),g.removeEventListener("animationend",y),g.removeEventListener("animationcancel",y),p.current===0&&m.type!=="animationcancel"&&g.classList.remove(...v))};g.classList.add(...v),g.addEventListener("animationend",y),g.addEventListener("animationcancel",y)},[]),G.useEffect(()=>{let g=u.current,v=()=>{g.removeEventListener("animationend",v),n?dVe(g,l,t):l()};c||(s?v():(p.current=1,g.className+=` ${h}`,g.addEventListener("animationend",v)))},[c]),An.createElement(An.Fragment,null,o)}}function eZ(r,e){return{content:e0e(r.content,r.props),containerId:r.props.containerId,id:r.props.toastId,theme:r.props.theme,type:r.props.type,data:r.props.data||{},isLoading:r.props.isLoading,icon:r.props.icon,reason:r.removalReason,status:e}}function e0e(r,e,i=!1){return G.isValidElement(r)&&!T1(r.type)?G.cloneElement(r,{closeToast:e.closeToast,toastProps:e,data:e.data,isPaused:i}):K0(r)?r({closeToast:e.closeToast,toastProps:e,data:e.data,isPaused:i}):r}function hVe({closeToast:r,theme:e,ariaLabel:i="close"}){return An.createElement("button",{className:`Toastify__close-button Toastify__close-button--${e}`,type:"button",onClick:n=>{n.stopPropagation(),r(!0)},"aria-label":i},An.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},An.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function pVe({delay:r,isRunning:e,closeToast:i,type:n="default",hide:t,className:o,controlledProgress:a,progress:s,rtl:l,isIn:u,theme:c}){let d=t||a&&s===0,f={animationDuration:`${r}ms`,animationPlayState:e?"running":"paused"};a&&(f.transform=`scaleX(${s})`);let h=Sg("Toastify__progress-bar",a?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${c}`,`Toastify__progress-bar--${n}`,{"Toastify__progress-bar--rtl":l}),p=K0(o)?o({rtl:l,type:n,defaultClassName:h}):Sg(h,o),g={[a&&s>=1?"onTransitionEnd":"onAnimationEnd"]:a&&s<1?null:()=>{u&&i()}};return An.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":d},An.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${c} Toastify__progress-bar--${n}`}),An.createElement("div",{role:"progressbar","aria-hidden":d?"true":"false","aria-label":"notification timer",className:p,style:f,...g}))}var gVe=1,t0e=()=>`${gVe++}`;function vVe(r,e,i){let n=1,t=0,o=[],a=[],s=e,l=new Map,u=new Set,c=m=>(u.add(m),()=>u.delete(m)),d=()=>{a=Array.from(l.values()),u.forEach(m=>m())},f=({containerId:m,toastId:b,updateId:S})=>{let _=m?m!==r:r!==1,C=l.has(b)&&S==null;return _||C},h=(m,b)=>{l.forEach(S=>{var _;(b==null||b===S.props.toastId)&&((_=S.toggle)==null||_.call(S,m))})},p=m=>{var b,S;(S=(b=m.props)==null?void 0:b.onClose)==null||S.call(b,m.removalReason),m.isActive=!1},g=m=>{if(m==null)l.forEach(p);else{let b=l.get(m);b&&p(b)}d()},v=()=>{t-=o.length,o=[]},y=m=>{var b,S;let{toastId:_,updateId:C}=m.props,T=C==null;m.staleId&&l.delete(m.staleId),m.isActive=!0,l.set(_,m),d(),i(eZ(m,T?"added":"updated")),T&&((S=(b=m.props).onOpen)==null||S.call(b))};return{id:r,props:s,observe:c,toggle:h,removeToast:g,toasts:l,clearQueue:v,buildToast:(m,b)=>{if(f(b))return;let{toastId:S,updateId:_,data:C,staleId:T,delay:x}=b,A=_==null;A&&t++;let w={...s,style:s.toastStyle,key:n++,...Object.fromEntries(Object.entries(b).filter(([k,D])=>D!=null)),toastId:S,updateId:_,data:C,isIn:!1,className:W6(b.className||s.toastClassName),progressClassName:W6(b.progressClassName||s.progressClassName),autoClose:b.isLoading?!1:cVe(b.autoClose,s.autoClose),closeToast(k){l.get(S).removalReason=k,g(S)},deleteToast(){let k=l.get(S);if(k!=null){if(i(eZ(k,"removed")),l.delete(S),t--,t<0&&(t=0),o.length>0){y(o.shift());return}d()}}};w.closeButton=s.closeButton,b.closeButton===!1||G6(b.closeButton)?w.closeButton=b.closeButton:b.closeButton===!0&&(w.closeButton=G6(s.closeButton)?s.closeButton:!0);let L={content:m,props:w,staleId:T};s.limit&&s.limit>0&&t>s.limit&&A?o.push(L):VF(x)?setTimeout(()=>{y(L)},x):y(L)},setProps(m){s=m},setToggle:(m,b)=>{let S=l.get(m);S&&(S.toggle=b)},isToastActive:m=>{var b;return(b=l.get(m))==null?void 0:b.isActive},getSnapshot:()=>a}}var Bd=new Map,BN=[],Y6=new Set,yVe=r=>Y6.forEach(e=>e(r)),r0e=()=>Bd.size>0;function mVe(){BN.forEach(r=>n0e(r.content,r.options)),BN=[]}var bVe=(r,{containerId:e})=>{var i;return(i=Bd.get(e||1))==null?void 0:i.toasts.get(r)};function i0e(r,e){var i;if(e)return!!((i=Bd.get(e))!=null&&i.isToastActive(r));let n=!1;return Bd.forEach(t=>{t.isToastActive(r)&&(n=!0)}),n}function SVe(r){if(!r0e()){BN=BN.filter(e=>r!=null&&e.options.toastId!==r);return}if(r==null||uVe(r))Bd.forEach(e=>{e.removeToast(r)});else if(r&&("containerId"in r||"id"in r)){let e=Bd.get(r.containerId);e?e.removeToast(r.id):Bd.forEach(i=>{i.removeToast(r.id)})}}var _Ve=(r={})=>{Bd.forEach(e=>{e.props.limit&&(!r.containerId||e.id===r.containerId)&&e.clearQueue()})};function n0e(r,e){G6(r)&&(r0e()||BN.push({content:r,options:e}),Bd.forEach(i=>{i.buildToast(r,e)}))}function PVe(r){var e;(e=Bd.get(r.containerId||1))==null||e.setToggle(r.id,r.fn)}function o0e(r,e){Bd.forEach(i=>{(e==null||!(e!=null&&e.containerId)||(e==null?void 0:e.containerId)===i.id)&&i.toggle(r,e==null?void 0:e.id)})}function CVe(r){let e=r.containerId||1;return{subscribe(i){let n=vVe(e,r,yVe);Bd.set(e,n);let t=n.observe(i);return mVe(),()=>{t(),Bd.delete(e)}},setProps(i){var n;(n=Bd.get(e))==null||n.setProps(i)},getSnapshot(){var i;return(i=Bd.get(e))==null?void 0:i.getSnapshot()}}}function TVe(r){return Y6.add(r),()=>{Y6.delete(r)}}function xVe(r){return r&&(T1(r.toastId)||VF(r.toastId))?r.toastId:t0e()}function HF(r,e){return n0e(r,e),e.toastId}function wH(r,e){return{...e,type:e&&e.type||r,toastId:xVe(e)}}function OH(r){return(e,i)=>HF(e,wH(r,i))}function Gn(r,e){return HF(r,wH("default",e))}Gn.loading=(r,e)=>HF(r,wH("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...e}));function EVe(r,{pending:e,error:i,success:n},t){let o;e&&(o=T1(e)?Gn.loading(e,t):Gn.loading(e.render,{...t,...e}));let a={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},s=(u,c,d)=>{if(c==null){Gn.dismiss(o);return}let f={type:u,...a,...t,data:d},h=T1(c)?{render:c}:c;return o?Gn.update(o,{...f,...h}):Gn(h.render,{...f,...h}),d},l=K0(r)?r():r;return l.then(u=>s("success",n,u)).catch(u=>s("error",i,u)),l}Gn.promise=EVe;Gn.success=OH("success");Gn.info=OH("info");Gn.error=OH("error");Gn.warning=OH("warning");Gn.warn=Gn.warning;Gn.dark=(r,e)=>HF(r,wH("default",{theme:"dark",...e}));function AVe(r){SVe(r)}Gn.dismiss=AVe;Gn.clearWaitingQueue=_Ve;Gn.isActive=i0e;Gn.update=(r,e={})=>{let i=bVe(r,e);if(i){let{props:n,content:t}=i,o={delay:100,...n,...e,toastId:e.toastId||r,updateId:t0e()};o.toastId!==r&&(o.staleId=r);let a=o.render||t;delete o.render,HF(a,o)}};Gn.done=r=>{Gn.update(r,{progress:1})};Gn.onChange=TVe;Gn.play=r=>o0e(!0,r);Gn.pause=r=>o0e(!1,r);function wVe(r){var e;let{subscribe:i,getSnapshot:n,setProps:t}=G.useRef(CVe(r)).current;t(r);let o=(e=G.useSyncExternalStore(i,n,n))==null?void 0:e.slice();function a(s){if(!o)return[];let l=new Map;return r.newestOnTop&&o.reverse(),o.forEach(u=>{let{position:c}=u.props;l.has(c)||l.set(c,[]),l.get(c).push(u)}),Array.from(l,u=>s(u[0],u[1]))}return{getToastToRender:a,isToastActive:i0e,count:o==null?void 0:o.length}}function OVe(r){let[e,i]=G.useState(!1),[n,t]=G.useState(!1),o=G.useRef(null),a=G.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:s,pauseOnHover:l,closeToast:u,onClick:c,closeOnClick:d}=r;PVe({id:r.toastId,containerId:r.containerId,fn:i}),G.useEffect(()=>{if(r.pauseOnFocusLoss)return f(),()=>{h()}},[r.pauseOnFocusLoss]);function f(){document.hasFocus()||y(),window.addEventListener("focus",v),window.addEventListener("blur",y)}function h(){window.removeEventListener("focus",v),window.removeEventListener("blur",y)}function p(T){if(r.draggable===!0||r.draggable===T.pointerType){m();let x=o.current;a.canCloseOnClick=!0,a.canDrag=!0,x.style.transition="none",r.draggableDirection==="x"?(a.start=T.clientX,a.removalDistance=x.offsetWidth*(r.draggablePercent/100)):(a.start=T.clientY,a.removalDistance=x.offsetHeight*(r.draggablePercent===80?r.draggablePercent*1.5:r.draggablePercent)/100)}}function g(T){let{top:x,bottom:A,left:w,right:L}=o.current.getBoundingClientRect();T.nativeEvent.type!=="touchend"&&r.pauseOnHover&&T.clientX>=w&&T.clientX<=L&&T.clientY>=x&&T.clientY<=A?y():v()}function v(){i(!0)}function y(){i(!1)}function m(){a.didMove=!1,document.addEventListener("pointermove",S),document.addEventListener("pointerup",_)}function b(){document.removeEventListener("pointermove",S),document.removeEventListener("pointerup",_)}function S(T){let x=o.current;if(a.canDrag&&x){a.didMove=!0,e&&y(),r.draggableDirection==="x"?a.delta=T.clientX-a.start:a.delta=T.clientY-a.start,a.start!==T.clientX&&(a.canCloseOnClick=!1);let A=r.draggableDirection==="x"?`${a.delta}px, var(--y)`:`0, calc(${a.delta}px + var(--y))`;x.style.transform=`translate3d(${A},0)`,x.style.opacity=`${1-Math.abs(a.delta/a.removalDistance)}`}}function _(){b();let T=o.current;if(a.canDrag&&a.didMove&&T){if(a.canDrag=!1,Math.abs(a.delta)>a.removalDistance){t(!0),r.closeToast(!0),r.collapseAll();return}T.style.transition="transform 0.2s, opacity 0.2s",T.style.removeProperty("transform"),T.style.removeProperty("opacity")}}let C={onPointerDown:p,onPointerUp:g};return s&&l&&(C.onMouseEnter=y,r.stacked||(C.onMouseLeave=v)),d&&(C.onClick=T=>{c&&c(T),a.canCloseOnClick&&u(!0)}),{playToast:v,pauseToast:y,isRunning:e,preventExitTransition:n,toastRef:o,eventHandlers:C}}var DVe=typeof window<"u"?G.useLayoutEffect:G.useEffect,DH=({theme:r,type:e,isLoading:i,...n})=>An.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:r==="colored"?"currentColor":`var(--toastify-icon-color-${e})`,...n});function RVe(r){return An.createElement(DH,{...r},An.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))}function MVe(r){return An.createElement(DH,{...r},An.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))}function LVe(r){return An.createElement(DH,{...r},An.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))}function kVe(r){return An.createElement(DH,{...r},An.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))}function IVe(){return An.createElement("div",{className:"Toastify__spinner"})}var $6={info:MVe,warning:RVe,success:LVe,error:kVe,spinner:IVe},NVe=r=>r in $6;function FVe({theme:r,type:e,isLoading:i,icon:n}){let t=null,o={theme:r,type:e};return n===!1||(K0(n)?t=n({...o,isLoading:i}):G.isValidElement(n)?t=G.cloneElement(n,o):i?t=$6.spinner():NVe(e)&&(t=$6[e](o))),t}var jVe=r=>{let{isRunning:e,preventExitTransition:i,toastRef:n,eventHandlers:t,playToast:o}=OVe(r),{closeButton:a,children:s,autoClose:l,onClick:u,type:c,hideProgressBar:d,closeToast:f,transition:h,position:p,className:g,style:v,progressClassName:y,updateId:m,role:b,progress:S,rtl:_,toastId:C,deleteToast:T,isIn:x,isLoading:A,closeOnClick:w,theme:L,ariaLabel:k}=r,D=Sg("Toastify__toast",`Toastify__toast-theme--${L}`,`Toastify__toast--${c}`,{"Toastify__toast--rtl":_},{"Toastify__toast--close-on-click":w}),j=K0(g)?g({rtl:_,position:p,type:c,defaultClassName:D}):Sg(D,g),N=FVe(r),V=!!S||!l,W={closeToast:f,type:c,theme:L},K=null;return a===!1||(K0(a)?K=a(W):G.isValidElement(a)?K=G.cloneElement(a,W):K=hVe(W)),An.createElement(h,{isIn:x,done:T,position:p,preventExitTransition:i,nodeRef:n,playToast:o},An.createElement("div",{id:C,tabIndex:0,onClick:u,"data-in":x,className:j,...t,style:v,ref:n,...x&&{role:b,"aria-label":k}},N!=null&&An.createElement("div",{className:Sg("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!A})},N),e0e(s,r,!e),K,!r.customProgressBar&&An.createElement(pVe,{...m&&!V?{key:`p-${m}`}:{},rtl:_,theme:L,delay:l,isRunning:e,isIn:x,closeToast:f,hide:d,type:c,className:y,controlledProgress:V,progress:S||0})))},BVe=(r,e=!1)=>({enter:`Toastify--animate Toastify__${r}-enter`,exit:`Toastify--animate Toastify__${r}-exit`,appendPosition:e}),VVe=fVe(BVe("bounce",!0)),HVe={position:"top-right",transition:VVe,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light","aria-label":"Notifications Alt+T",hotKeys:r=>r.altKey&&r.code==="KeyT"};function UVe(r){let e={...HVe,...r},i=r.stacked,[n,t]=G.useState(!0),o=G.useRef(null),{getToastToRender:a,isToastActive:s,count:l}=wVe(e),{className:u,style:c,rtl:d,containerId:f,hotKeys:h}=e;function p(v){let y=Sg("Toastify__toast-container",`Toastify__toast-container--${v}`,{"Toastify__toast-container--rtl":d});return K0(u)?u({position:v,rtl:d,defaultClassName:y}):Sg(y,W6(u))}function g(){i&&(t(!0),Gn.play())}return DVe(()=>{var v;if(i){let y=o.current.querySelectorAll('[data-in="true"]'),m=12,b=(v=e.position)==null?void 0:v.includes("top"),S=0,_=0;Array.from(y).reverse().forEach((C,T)=>{let x=C;x.classList.add("Toastify__toast--stacked"),T>0&&(x.dataset.collapsed=`${n}`),x.dataset.pos||(x.dataset.pos=b?"top":"bot");let A=S*(n?.2:1)+(n?0:m*T);x.style.setProperty("--y",`${b?A:A*-1}px`),x.style.setProperty("--g",`${m}`),x.style.setProperty("--s",`${1-(n?_:0)}`),S+=x.offsetHeight,_+=.025})}},[n,l,i]),G.useEffect(()=>{function v(y){var m;let b=o.current;h(y)&&((m=b.querySelector('[tabIndex="0"]'))==null||m.focus(),t(!1),Gn.pause()),y.key==="Escape"&&(document.activeElement===b||b!=null&&b.contains(document.activeElement))&&(t(!0),Gn.play())}return document.addEventListener("keydown",v),()=>{document.removeEventListener("keydown",v)}},[h]),An.createElement("section",{ref:o,className:"Toastify",id:f,onMouseEnter:()=>{i&&(t(!1),Gn.pause())},onMouseLeave:g,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions text","aria-label":e["aria-label"]},a((v,y)=>{let m=y.length?{...c}:{...c,pointerEvents:"none"};return An.createElement("div",{tabIndex:-1,className:p(v),"data-stacked":i,style:m,key:`c-${v}`},y.map(({content:b,props:S})=>An.createElement(jVe,{...S,stacked:i,collapseAll:g,isIn:s(S.toastId,S.containerId),key:`t-${S.key}`},b)))}))}const tZ="#edf4fa",rZ="#10121c";function zVe(r,e){document.querySelectorAll('meta[name="theme-color"]').forEach(i=>i.remove()),e?(S4(tZ,"(prefers-color-scheme: light)"),S4(rZ,"(prefers-color-scheme: dark)")):S4(r?rZ:tZ)}function S4(r,e){const i=document.createElement("meta");i.setAttribute("name","theme-color"),i.setAttribute("content",r),e&&i.setAttribute("media",e),document.head.appendChild(i)}var _R=(r=>(r.System="system",r.Light="light",r.Dark="dark",r))(_R||{});const a0e="THEME_PREFERENCE";function WVe(){const r=localStorage.getItem(a0e);return r==="light"||r==="dark"||r==="system"?r:"system"}function GVe(){return window.matchMedia("(prefers-color-scheme: dark)").matches}function YVe(r){window.document.documentElement.classList.toggle("dark",r)}const s0e=G.createContext(null);function $Ve(r){const[e,i]=G.useState(WVe),[n,t]=G.useState(GVe),o=e==="system"?n:e==="dark";G.useEffect(()=>{YVe(o),localStorage.setItem(a0e,e),zVe(o,e==="system")},[e,n,o]),G.useEffect(()=>{const s=window.matchMedia("(prefers-color-scheme: dark)"),l=u=>{t(u.matches)};return s.addEventListener("change",l),()=>s.removeEventListener("change",l)},[]);const a=G.useMemo(()=>({theme:e,setTheme:i,systemPrefersDark:n,isDarkMode:o}),[e,n,o]);return R.jsx(s0e.Provider,{value:a,children:r.children})}function TM(){const r=G.useContext(s0e);if(!r)throw new Error("useTheme must be used within a ThemeProvider");return r}const qVe=100002;function XVe(){const{theme:r}=TM(),e=o=>o===_R.Dark?"dark":"light",i=r===_R.Dark,t={borderRadius:"var(--radius)",fontFamily:"'LexendDeca', sans-serif",overflow:"hidden",border:"none",boxShadow:`inset 0 1px 0 0 ${i?"rgba(255, 255, 255, 0.24)":"rgba(16, 35, 82, 0.28)"}`,backgroundColor:"var(--primary-10)",color:i?"var(--foreground)":"black"};return R.jsxs(R.Fragment,{children:[R.jsx("style",{children:`
        .Toastify__toast-icon {
          align-self: center !important;
          margin-right: -30px;
          right: 0;
          opacity: 0.2;
          height: 90px;
          width: 90px;
          position: absolute !important;
        }
      `}),R.jsx(UVe,{stacked:!0,pauseOnFocusLoss:!1,position:"bottom-right",autoClose:9e3,hideProgressBar:!1,newestOnTop:!1,closeOnClick:!0,rtl:!1,draggable:!0,pauseOnHover:!0,theme:e(r),toastStyle:t,style:{zIndex:qVe}})]})}function l0e(r){const e=r.side??"right",[i,n]=G.useState(!1),[t,o]=G.useState(null),a=G.useRef(null),s=G.useCallback(()=>{if(!a.current)return null;const d=a.current.getBoundingClientRect(),f=14;let h=0,p=0;switch(e){case"right":h=d.top+d.height/2,p=d.right+f;break;case"left":h=d.top+d.height/2,p=d.left-f;break;case"top":h=d.top-f,p=d.left+d.width/2;break;case"bottom":h=d.bottom+f,p=d.left+d.width/2;break}return{top:h,left:p}},[e]),l=()=>{const d=s();d&&(o(d),n(!0))},u=()=>{n(!1)},c={right:"-translate-y-1/2",left:"-translate-y-1/2 -translate-x-full",top:"-translate-x-1/2 -translate-y-full",bottom:"-translate-x-1/2"};return R.jsxs(R.Fragment,{children:[R.jsx("div",{ref:a,className:Nr("inline-flex",r.className),onMouseEnter:l,onMouseLeave:u,children:r.children}),t&&au.createPortal(R.jsx("div",{className:Nr("fixed z-[9999] pointer-events-none","transition-opacity duration-150",c[e],i?"opacity-100":"opacity-0"),style:{top:t.top,left:t.left},children:R.jsx("div",{className:"relative px-2.5 py-1.5 bg-neutral-900 text-white text-xs font-medium rounded-md whitespace-nowrap shadow-lg ring-1 ring-neutral-600",children:r.label})}),document.body)]})}function KVe(){return{googleMapsApiKey:aVe}}function ZVe(){return{showHiddenFiles:(localStorage.getItem("SHOW_HIDDEN_FILES_PREFERENCES")??"true")==="true"}}function JVe(r){const[e,i]=G.useState(`${window.location.origin}${Jme}`),[n,t]=G.useState(void 0),[o,a]=G.useState(KVe),[s,l]=G.useState(ZVe),[u,c]=G.useState(!0),d=G.useCallback(g=>{a(v=>({...v,...g}))},[]),f=G.useCallback(async(g,v)=>{c(!0),t(void 0);try{const y=await fetch(`${g}/environment`),m=await y.json();if(!y.ok)throw new Error(`Failed to fetch environment: ${y.status}`);if(!m.workspace||!m.broker_url)throw new Error("Incorrect environment data received from backend");a(S=>({...S}));const b=Array.isArray(m.versions)?m.versions:[];t({brokerUrl:m.broker_url,studioBackendUrl:g,workspace:m.workspace,authMode:m.auth_mode,versions:[...b,{name:"RemotiveStudio",version:sVe}]}),c(!1)}catch(y){throw v?await f(v):c(!1),y}},[]),h=G.useCallback(g=>{g.showHiddenFiles!==void 0&&localStorage.setItem("SHOW_HIDDEN_FILES_PREFERENCES",g.showHiddenFiles.toString()),l(v=>({...v,...g}))},[]);if(G.useEffect(()=>{f(e).catch(async g=>{f(oVe).catch(v=>{})})},[]),u)return R.jsx("div",{className:Nr("h-full flex flex-col items-center justify-center text-muted-foreground"),children:R.jsx(Fr,{type:sr.STATUS_LOADING,className:"w-8 h-8 animate-spin mb-3"})});if(!n)return R.jsx("div",{className:Nr("h-full flex flex-col items-center justify-center text-muted-foreground"),children:R.jsx("p",{className:"text-sm",children:"RemotiveStudio not running."})});const p={settings:o,preferences:s,updateSettings:d,environment:n,updateEnvironment:f,updatePreferences:h};return R.jsx(Zme.Provider,{value:p,children:r.children})}function Dg(){const r=G.useContext(Zme);if(!r)throw new Error("useSettings must be used within a SettingsProvider");return r}const QVe="studio-tabs";function u0e(r){return`${QVe}:${r}`}function iZ(r){try{const e=sessionStorage.getItem(u0e(r));if(!e)return null;const i=JSON.parse(e);return Array.isArray(i.tabs)?i:null}catch{return null}}function e3e(r,e){try{const i=e.tabs.map(n=>{const{hasUnsavedChanges:t,...o}=n;return o});sessionStorage.setItem(u0e(r),JSON.stringify({tabs:i,activeTabId:e.activeTabId}))}catch{}}const nZ=100,_q=G.createContext(null);function t3e(r){const{environment:e}=Dg(),i=e.workspace,{requestConfirmation:n}=nVe(),[t,o]=G.useState(()=>{const v=iZ(i);return(v==null?void 0:v.tabs)??[]}),[a,s]=G.useState(()=>{if(typeof window<"u"&&!IOe(window.location.pathname))return null;const v=iZ(i);return(v==null?void 0:v.activeTabId)??null}),l=t.find(v=>v.id===a)??null,u=G.useCallback((v,y)=>{o(m=>{const b=m.find(S=>S.id===v);return!b||b.hasUnsavedChanges===y?m:m.map(S=>S.id===v?{...S,hasUnsavedChanges:y}:S)})},[]),c=G.useRef(null);G.useEffect(()=>(c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{e3e(i,{tabs:t,activeTabId:a})},300),()=>{c.current&&clearTimeout(c.current)}),[t,a,i]);const d=G.useCallback((v,y)=>{const m=Nz(v),b=(y==null?void 0:y.id)??v,S=m==null?void 0:m.contextId;return o(_=>{if(_.find(x=>x.id===b))return s(b),_;if(_.length>=nZ)return console.warn(`Tab limit (${nZ}) reached`),_;const T={id:b,type:v,params:y==null?void 0:y.params,title:y==null?void 0:y.title,contextId:S};return s(b),[..._,T]}),b},[]),f=G.useCallback(v=>{const y=t.find(b=>b.id===v);if(!y)return!1;const m=()=>{o(b=>{const S=b.findIndex(C=>C.id===v);if(S===-1)return b;const _=b.filter(C=>C.id!==v);return s(C=>{if(C===v){if(_.length===0)return null;const T=Math.max(0,S-1),x=_[T];return(x==null?void 0:x.id)??null}return C}),_})};return y.hasUnsavedChanges?(n(m),!0):(m(),!0)},[t,n]),h=G.useCallback(v=>{o(y=>{const m=y.find(b=>b.id===v);return!m||y.length<=1?y:(s(v),[m])})},[]),p=G.useCallback(v=>{o(y=>(y.find(b=>b.id===v)&&s(v),y))},[]),g={tabs:t,activeTab:l,setTabUnsavedChanges:u,openTab:d,closeTab:f,closeOtherTabs:h,switchActiveTab:p};return R.jsx(_q.Provider,{value:g,children:r.children})}function Pq(){var i;const r=G.useContext(_q);if(!r)throw new Error("useActivityTabs must be used within an ActivityTabsProvider");const e=G.useCallback(n=>{var t;return((t=r.activeTab)==null?void 0:t.id)===n},[(i=r.activeTab)==null?void 0:i.id]);return{tabs:r.tabs,activeTab:r.activeTab,isActivityActive:e,setActiveTab:r.switchActiveTab,closeTab:r.closeTab,closeOtherTabs:r.closeOtherTabs,setHasUnsavedChanges:r.setTabUnsavedChanges}}function r3e(){const{activePage:r,isNotFoundRoute:e}=u_(),{setActiveContextHighlight:i}=CM();G.useEffect(()=>{!e&&(r!=null&&r.contextId)&&i(r.contextId)},[r==null?void 0:r.contextId,e,i])}const i3e=History.prototype.pushState;function n3e(){const{activePage:r,pages:e,openPage:i,setActivePage:n,isNotFoundRoute:t,setEffectivePathname:o}=u_(),a=G.useRef(!1),s=G.useCallback((u,c)=>{const d=Vdt(u,c);if(!d)return;const f=e.find(h=>h.id===d.id);f?n(f.id):d.open(i)},[e,i,n]),l=G.useRef(!1);G.useEffect(()=>{l.current||(l.current=!0,s(window.location.pathname,window.location.search))},[s]),G.useEffect(()=>{function u(){a.current||(o(window.location.pathname),s(window.location.pathname,window.location.search))}return window.addEventListener("popstate",u),()=>window.removeEventListener("popstate",u)},[s,o]),G.useEffect(()=>{if(t&&r===null)return;const u=r?Hdt(r):"/";if(!u)return;const c=window.location.pathname+window.location.search;if(u===c)return;a.current=!0,i3e.call(window.history,null,"",u);const d=u.split("?")[0];o(d),requestAnimationFrame(()=>{a.current=!1})},[r,t,o])}function o3e(r){return n3e(),r3e(),R.jsx(R.Fragment,{children:r.children})}function a3e({children:r}){return R.jsx(Gje,{children:R.jsx(iVe,{children:R.jsx(t3e,{children:R.jsx(zdt,{children:R.jsx(o3e,{children:r})})})})})}function _4(r){const e=R.jsxs("div",{className:"flex gap-3 flex-1 min-w-0",children:[R.jsxs("div",{className:"flex justify-start items-center gap-3 flex-1 min-w-0",children:[R.jsx("div",{className:"flex-shrink-0 w-9 h-9 rounded-md bg-primary/10 dark:bg-primary/20 flex items-center justify-center",children:R.jsx(Fr,{type:r.iconType,className:"w-4 h-4 text-primary"})}),R.jsxs("div",{className:"flex-1 min-w-0 text-start",children:[R.jsx("div",{className:"font-medium text-foreground text-sm",children:r.label}),R.jsx("div",{className:"text-xs text-muted-foreground truncate",children:r.description})]})]}),r.hint&&R.jsx("span",{className:"text-xs text-muted-foreground/60 flex-shrink-0",children:r.hint}),r.external&&R.jsx(Fr,{type:sr.ACTION_EXTERNAL_LINK,className:"w-3.5 h-3.5 text-muted-foreground/60 flex-shrink-0"})]});return R.jsx("button",{onClick:r.onClick,className:"flex items-center gap-3 w-full px-3 py-2 rounded-md transition-colors hover:bg-white/10 group cursor-pointer",children:e})}function s3e(r){return R.jsx("div",{className:r.className,style:{maskImage:"url(/images/rlabs_logo_bw.svg)",maskSize:"contain",maskRepeat:"no-repeat",maskPosition:"center",WebkitMaskImage:"url(/images/rlabs_logo_bw.svg)",WebkitMaskSize:"contain",WebkitMaskRepeat:"no-repeat",WebkitMaskPosition:"center",backgroundColor:"currentColor"},role:"img","aria-label":"RemotiveLabs"})}const l3e={route:fc.WELCOME,title:"Welcome",icon:Vi.CONTEXT_HOME,component:c0e};function c0e(){const{openPage:r}=u_(),{setActiveContext:e}=CM(),i=()=>R.jsx(R.Fragment,{children:R.jsx("div",{className:"mb-12 flex-shrink-0",children:R.jsx(s3e,{className:"w-56 h-56 text-neutral-300 dark:text-neutral-700"})})}),n=()=>R.jsx(R.Fragment,{children:R.jsx("div",{className:"w-full max-w-md space-y-4 px-4",children:R.jsxs("div",{children:[R.jsxs("h3",{className:"text-[11px] font-light uppercase tracking-wider text-muted-foreground mb-1.5 px-1",children:["Let's"," ",R.jsx("span",{className:"font-bold",children:"get stuff done!"})]}),R.jsxs("div",{children:[R.jsx(_4,{iconType:sr.CONTEXT_HOME,label:"Open overview",description:"Get started with helpful links",onClick:()=>{r(fc.OVERVIEW)}}),R.jsx(_4,{iconType:sr.CONTEXT_SETTINGS,label:"Customize your experience",description:"Change the appearance and behavior of RemotiveStudio",onClick:()=>{r(fc.SETTINGS)}}),R.jsx(_4,{iconType:sr.CONTEXT_FILES,label:"Start working with the file tree",description:"E.g. visualize RemotiveTopology files and build dashboards",onClick:()=>{e(ps.FILES)}})]})]})})});return R.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center select-none overflow-auto py-6",children:[i(),n()]})}function P4(r){return R.jsxs("a",{href:r.href,target:"_blank",rel:"noopener noreferrer",className:Nr("group relative flex flex-col items-start p-6 rounded-2xl","bg-card border border-border","hover:border-primary/50 hover:shadow-lg hover:shadow-primary/5","hover:-translate-y-0.5","transition-all duration-300 ease-out","text-left w-full",r.className),children:[R.jsxs("div",{className:"flex items-center justify-between w-full mb-4",children:[R.jsx("div",{className:"p-3 rounded-xl bg-primary/10 text-primary",children:R.jsx(Fr,{type:r.iconType,className:"w-6 h-6"})}),R.jsx(Fr,{type:sr.ACTION_EXTERNAL_LINK,className:"w-4 h-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity duration-200",style:{position:"absolute",right:18,top:18}})]}),R.jsx("h3",{className:"text-lg font-semibold text-card-foreground mb-1",children:r.title}),r.description&&R.jsx("p",{className:"text-sm text-muted-foreground",children:r.description})]})}function oZ(r){return R.jsxs("a",{href:r.link,target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-between py-3 px-0 hover:bg-muted/50 transition-colors border-b border-border/50 last:border-0",children:[R.jsxs("div",{className:"px-8",children:[R.jsx("p",{className:"font-medium text-card-foreground",children:r.title}),R.jsx("p",{className:"text-sm text-muted-foreground",children:r.description})]}),R.jsx("div",{className:"px-8",children:R.jsx(Fr,{type:sr.ACTION_EXTERNAL_LINK,className:"h-4 w-4 text-muted-foreground"})})]})}const u3e={route:fc.OVERVIEW,title:"Overview",contextId:ps.OVERVIEW,icon:Vi.CONTEXT_HOME,component:c3e};function c3e(){const{environment:r}=Dg(),e=()=>R.jsxs(R.Fragment,{children:[R.jsx("h2",{className:"text-lg font-semibold text-foreground mb-4",children:"Getting Started"}),R.jsxs("div",{className:"rounded-2xl border border-border bg-card py-3 space-y-1",children:[R.jsx(oZ,{title:"Signal data playback",description:"Locally playback signal data from a recording session",link:"https://docs.remotivelabs.com/docs/remotive-topology/usage/recordings/usage"}),R.jsx(oZ,{title:"Instantiate & run your own topology",description:"Get up and running in minutes on your local machine",link:"https://docs.remotivelabs.com/docs/remotive-topology/usage/instance"})]})]}),i=()=>R.jsxs(R.Fragment,{children:[R.jsx("h2",{className:"text-lg font-semibold text-foreground mb-4",children:"Quick Links"}),R.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:[R.jsx(P4,{title:"Documentation",description:"Learn how to use RemotiveStudio",iconType:sr.CONTENT_BOOK,href:"https://docs.remotivelabs.com"}),R.jsx(P4,{title:"Jupyter Notebooks",description:"Interact with your running topology",iconType:sr.CONTENT_NOTEBOOK,href:"https://jupyter.org/"}),R.jsx(P4,{title:"EdgeShark",description:"Capture network packets from your running topology",iconType:sr.OBJECT_WAVES,href:"https://edgeshark.siemens.io"})]})]});return R.jsxs(rb,{children:[R.jsx(YS,{title:"Welcome to RemotiveStudio",description:R.jsxs(R.Fragment,{children:["Your current workspace is"," ",R.jsx("span",{className:"font-bold break-all",children:`${r.workspace}`})]})}),R.jsxs(ib,{children:[R.jsx("section",{className:"mb-10",children:e()}),R.jsx("section",{className:"mb-10",children:i()})]})]})}var Cf=(r=>(r.UNKNOWN="FILE_TYPE_UNKNOWN",r.FOLDER="FILE_TYPE_FOLDER",r.VIDEO="FILE_TYPE_VIDEO",r.AUDIO="FILE_TYPE_AUDIO",r.IMAGE="FILE_TYPE_IMAGE",r.RECORDING="FILE_TYPE_RECORDING",r.RECORDING_SESSION="FILE_TYPE_RECORDING_SESSION",r.RECORDING_MAPPING="FILE_TYPE_RECORDING_MAPPING",r.PLATFORM="FILE_TYPE_PLATFORM",r.INSTANCE="FILE_TYPE_INSTANCE",r.TEXT="FILE_TYPE_TEXT",r.SIGNAL_DATABASE="FILE_TYPE_SIGNAL_DATABASE",r.DASHBOARD="FILE_TYPE_DASHBOARD",r))(Cf||{});function d3e(r){const e=r.lastIndexOf(".");if(!(e===-1||e===0))return r.slice(e)}const d0e=new Set(["FILE_TYPE_PLATFORM","FILE_TYPE_SIGNAL_DATABASE"]),f0e=new Set(["FILE_TYPE_INSTANCE"]),h0e=new Set(["FILE_TYPE_DASHBOARD"]),Cq=new Set(["FILE_TYPE_VIDEO"]),Tq=new Set(["FILE_TYPE_AUDIO"]),xq=new Set(["FILE_TYPE_IMAGE"]),p0e=new Set(["FILE_TYPE_RECORDING","FILE_TYPE_RECORDING_SESSION","FILE_TYPE_RECORDING_MAPPING","FILE_TYPE_PLATFORM","FILE_TYPE_INSTANCE","FILE_TYPE_SIGNAL_DATABASE","FILE_TYPE_DASHBOARD","FILE_TYPE_TEXT"]),f3e=["unsupported","text","platform","instance","signal-database","dashboard","image","video","audio"];function h3e(r,e){return r&&f3e.includes(r)?r:g3e(e)}function p3e(r){return r&&Object.values(Cf).includes(r)?r:void 0}function g3e(r){return r?Cq.has(r)?"video":Tq.has(r)?"audio":xq.has(r)?"image":d0e.has(r)?"platform":f0e.has(r)?"instance":h0e.has(r)?"dashboard":p0e.has(r)?"text":"unsupported":"unsupported"}const v3e={FILE_TYPE_IMAGE:Vi.FILE_IMAGE,FILE_TYPE_VIDEO:Vi.FILE_VIDEO,FILE_TYPE_AUDIO:Vi.FILE_AUDIO,FILE_TYPE_SIGNAL_DATABASE:Vi.FILE_DATABASE,FILE_TYPE_PLATFORM:Vi.FILE_PLATFORM,FILE_TYPE_INSTANCE:Vi.FILE_INSTANCE,FILE_TYPE_RECORDING:Vi.FILE_RECORDING,FILE_TYPE_RECORDING_SESSION:Vi.FILE_RECORDING,FILE_TYPE_RECORDING_MAPPING:Vi.FILE_RECORDING,FILE_TYPE_DASHBOARD:Vi.FILE_DASHBOARD,FILE_TYPE_UNKNOWN:Vi.FILE_GENERIC},y3e={".py":Vi.FILE_CODE,".ipynb":Vi.FILE_CODE,".json":Vi.FILE_JSON,".yaml":Vi.FILE_JSON,".yml":Vi.FILE_JSON};function m3e(r){var i;if(r.type==="folder")return Vi.FOLDER_CLOSED;if(r.fileType){const n=v3e[r.fileType];if(n)return n}const e=(i=r.extension)==null?void 0:i.toLowerCase();if(e){const n=y3e[e];if(n)return n}return Vi.FILE_GENERIC}function b3e(r){return FF(m3e(r))}class g0e{constructor(e,i=1e4){To(this,"baseUrl");To(this,"timeoutMs");this.baseUrl=e.endsWith("/")?e.slice(0,-1):e,this.timeoutMs=i}async fetchWithTimeout(e,i){const n=new AbortController,t=setTimeout(()=>n.abort(),this.timeoutMs);try{return await fetch(e,{...i,signal:n.signal})}catch(o){throw o instanceof Error&&o.name==="AbortError"?new Error("Request timed out"):o}finally{clearTimeout(t)}}async getDirectoryContents(e,i=!1){const n=new URL(`${this.baseUrl}/files`);n.searchParams.set("path",e),n.searchParams.set("include_hidden",i.toString());const t=await this.fetchWithTimeout(n.toString());if(!t.ok)throw new Error(`Failed to list files at ${e}: ${t.status}`);return(await t.json()).files.map(s=>{const l=s.path.split("/").pop()||s.path,u=this.getExtension(l);return s.type===Cf.FOLDER?{id:s.path,name:l,path:s.path,type:"folder",children:void 0,fileType:Cf.FOLDER}:{id:s.path,name:l,path:s.path,type:"file",extension:u,fileType:s.type}}).sort((s,l)=>s.type==="folder"&&l.type==="file"?-1:s.type==="file"&&l.type==="folder"?1:s.name.localeCompare(l.name))}async getFileMetadata(e){try{const i=e.lastIndexOf("/"),n=i>0?e.substring(0,i):"/",t=new URL(`${this.baseUrl}/files`);t.searchParams.set("path",n),t.searchParams.set("include_hidden","false");const o=await this.fetchWithTimeout(t.toString());if(!o.ok)return console.error(`Failed to list files at ${n}: ${o.status}`),null;const s=(await o.json()).files.find(l=>l.path===e);return s?{path:s.path,fileType:s.type}:(console.error(`File not found in directory listing: ${e}`),null)}catch(i){return console.error(`Error getting file metadata for ${e}:`,i),null}}async getFileContent(e){try{const i=new URL(`${this.baseUrl}/files/download`);i.searchParams.set("path",e);const n=await this.fetchWithTimeout(i.toString());if(!n.ok)throw console.error(`Failed to fetch file: ${n.status}`),new Error(`Failed to fetch file: ${n.status}`);return await n.text()}catch(i){throw console.error("Error loading file content:",i),i}}async uploadAsFile(e,i){try{const n=new URL(`${this.baseUrl}/files/upload`);n.searchParams.set("path",e);const t=await this.fetchWithTimeout(n.toString(),{method:"PUT",body:i});if(!t.ok)throw console.error(`Failed to upload file: ${t.status}`),new Error(`Failed to upload file: ${t.status}`);return}catch(n){throw console.error("Error loading file content:",n),n}}getFileUrl(e){const i=new URL(`${this.baseUrl}/files/download`);return i.searchParams.set("path",e),i.toString()}async getResolvedPlatform(e){const i=new URL(`${this.baseUrl}/files/platform`);return i.searchParams.set("path",e),this.callApi(i,"resolve platform")}async getResolvedInstance(e){const i=new URL(`${this.baseUrl}/files/instance`);return i.searchParams.set("path",e),this.callApi(i,"resolve instance")}async callApi(e,i){const n=await this.fetchWithTimeout(e.toString());if(n.ok)return n.text();const t=await n.json();if(t.detail){if(typeof t.detail=="string")throw new Error(t.detail);if(typeof t.detail=="object"&&typeof t.detail.message=="string")throw new Error(t.detail.message);if(Array.isArray(t.detail))throw new Error(t.detail.map(o=>o.msg||"").join(", "))}throw new Error(n.statusText||`Failed to ${i}`)}getExtension(e){const i=e.lastIndexOf(".");if(!(i===-1||i===0))return e.slice(i)}}function UF(){const{environment:r}=Dg();return G.useMemo(()=>{const e=new g0e(r.studioBackendUrl);return{getDirectoryContents:i=>e.getDirectoryContents(i),getFileContent:i=>e.getFileContent(i),getFileUrl:i=>e.getFileUrl(i),getFileMetadata:i=>e.getFileMetadata(i),getResolvedPlatform:i=>e.getResolvedPlatform(i),getResolvedInstance:i=>e.getResolvedInstance(i),uploadAsFile:(i,n)=>e.uploadAsFile(i,n)}},[r.studioBackendUrl])}var xM=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(r){return this.listeners.add(r),this.onSubscribe(),()=>{this.listeners.delete(r),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},S3e={setTimeout:(r,e)=>setTimeout(r,e),clearTimeout:r=>clearTimeout(r),setInterval:(r,e)=>setInterval(r,e),clearInterval:r=>clearInterval(r)},gS,V$,nye,_3e=(nye=class{constructor(){hi(this,gS,S3e);hi(this,V$,!1)}setTimeoutProvider(r){Wr(this,gS,r)}setTimeout(r,e){return Ct(this,gS).setTimeout(r,e)}clearTimeout(r){Ct(this,gS).clearTimeout(r)}setInterval(r,e){return Ct(this,gS).setInterval(r,e)}clearInterval(r){Ct(this,gS).clearInterval(r)}},gS=new WeakMap,V$=new WeakMap,nye),Yw=new _3e;function P3e(r){setTimeout(r,0)}var x1=typeof window>"u"||"Deno"in globalThis;function Dd(){}function C3e(r,e){return typeof r=="function"?r(e):r}function q6(r){return typeof r=="number"&&r>=0&&r!==1/0}function v0e(r,e){return Math.max(r+(e||0)-Date.now(),0)}function RS(r,e){return typeof r=="function"?r(e):r}function pp(r,e){return typeof r=="function"?r(e):r}function aZ(r,e){const{type:i="all",exact:n,fetchStatus:t,predicate:o,queryKey:a,stale:s}=r;if(a){if(n){if(e.queryHash!==Eq(a,e.options))return!1}else if(!HN(e.queryKey,a))return!1}if(i!=="all"){const l=e.isActive();if(i==="active"&&!l||i==="inactive"&&l)return!1}return!(typeof s=="boolean"&&e.isStale()!==s||t&&t!==e.state.fetchStatus||o&&!o(e))}function sZ(r,e){const{exact:i,status:n,predicate:t,mutationKey:o}=r;if(o){if(!e.options.mutationKey)return!1;if(i){if(VN(e.options.mutationKey)!==VN(o))return!1}else if(!HN(e.options.mutationKey,o))return!1}return!(n&&e.state.status!==n||t&&!t(e))}function Eq(r,e){return((e==null?void 0:e.queryKeyHashFn)||VN)(r)}function VN(r){return JSON.stringify(r,(e,i)=>X6(i)?Object.keys(i).sort().reduce((n,t)=>(n[t]=i[t],n),{}):i)}function HN(r,e){return r===e?!0:typeof r!=typeof e?!1:r&&e&&typeof r=="object"&&typeof e=="object"?Object.keys(e).every(i=>HN(r[i],e[i])):!1}var T3e=Object.prototype.hasOwnProperty;function Aq(r,e,i=0){if(r===e)return r;if(i>500)return e;const n=lZ(r)&&lZ(e);if(!n&&!(X6(r)&&X6(e)))return e;const o=(n?r:Object.keys(r)).length,a=n?e:Object.keys(e),s=a.length,l=n?new Array(s):{};let u=0;for(let c=0;c<s;c++){const d=n?c:a[c],f=r[d],h=e[d];if(f===h){l[d]=f,(n?c<o:T3e.call(r,d))&&u++;continue}if(f===null||h===null||typeof f!="object"||typeof h!="object"){l[d]=h;continue}const p=Aq(f,h,i+1);l[d]=p,p===f&&u++}return o===s&&u===o?r:l}function WV(r,e){if(!e||Object.keys(r).length!==Object.keys(e).length)return!1;for(const i in r)if(r[i]!==e[i])return!1;return!0}function lZ(r){return Array.isArray(r)&&r.length===Object.keys(r).length}function X6(r){if(!uZ(r))return!1;const e=r.constructor;if(e===void 0)return!0;const i=e.prototype;return!(!uZ(i)||!i.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(r)!==Object.prototype)}function uZ(r){return Object.prototype.toString.call(r)==="[object Object]"}function x3e(r){return new Promise(e=>{Yw.setTimeout(e,r)})}function K6(r,e,i){return typeof i.structuralSharing=="function"?i.structuralSharing(r,e):i.structuralSharing!==!1?Aq(r,e):e}function E3e(r,e,i=0){const n=[...r,e];return i&&n.length>i?n.slice(1):n}function A3e(r,e,i=0){const n=[e,...r];return i&&n.length>i?n.slice(0,-1):n}var wq=Symbol();function y0e(r,e){return!r.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!r.queryFn||r.queryFn===wq?()=>Promise.reject(new Error(`Missing queryFn: '${r.queryHash}'`)):r.queryFn}function m0e(r,e){return typeof r=="function"?r(...e):!!r}function w3e(r,e,i){let n=!1,t;return Object.defineProperty(r,"signal",{enumerable:!0,get:()=>(t??(t=e()),n||(n=!0,t.aborted?i():t.addEventListener("abort",i,{once:!0})),t)}),r}var Qw,vS,RR,oye,O3e=(oye=class extends xM{constructor(){super();hi(this,Qw);hi(this,vS);hi(this,RR);Wr(this,RR,e=>{if(!x1&&window.addEventListener){const i=()=>e();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}})}onSubscribe(){Ct(this,vS)||this.setEventListener(Ct(this,RR))}onUnsubscribe(){var e;this.hasListeners()||((e=Ct(this,vS))==null||e.call(this),Wr(this,vS,void 0))}setEventListener(e){var i;Wr(this,RR,e),(i=Ct(this,vS))==null||i.call(this),Wr(this,vS,e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(e){Ct(this,Qw)!==e&&(Wr(this,Qw,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(i=>{i(e)})}isFocused(){var e;return typeof Ct(this,Qw)=="boolean"?Ct(this,Qw):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Qw=new WeakMap,vS=new WeakMap,RR=new WeakMap,oye),Oq=new O3e;function Z6(){let r,e;const i=new Promise((t,o)=>{r=t,e=o});i.status="pending",i.catch(()=>{});function n(t){Object.assign(i,t),delete i.resolve,delete i.reject}return i.resolve=t=>{n({status:"fulfilled",value:t}),r(t)},i.reject=t=>{n({status:"rejected",reason:t}),e(t)},i}var D3e=P3e;function R3e(){let r=[],e=0,i=s=>{s()},n=s=>{s()},t=D3e;const o=s=>{e?r.push(s):t(()=>{i(s)})},a=()=>{const s=r;r=[],s.length&&t(()=>{n(()=>{s.forEach(l=>{i(l)})})})};return{batch:s=>{let l;e++;try{l=s()}finally{e--,e||a()}return l},batchCalls:s=>(...l)=>{o(()=>{s(...l)})},schedule:o,setNotifyFunction:s=>{i=s},setBatchNotifyFunction:s=>{n=s},setScheduler:s=>{t=s}}}var Fl=R3e(),MR,yS,LR,aye,M3e=(aye=class extends xM{constructor(){super();hi(this,MR,!0);hi(this,yS);hi(this,LR);Wr(this,LR,e=>{if(!x1&&window.addEventListener){const i=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",n)}}})}onSubscribe(){Ct(this,yS)||this.setEventListener(Ct(this,LR))}onUnsubscribe(){var e;this.hasListeners()||((e=Ct(this,yS))==null||e.call(this),Wr(this,yS,void 0))}setEventListener(e){var i;Wr(this,LR,e),(i=Ct(this,yS))==null||i.call(this),Wr(this,yS,e(this.setOnline.bind(this)))}setOnline(e){Ct(this,MR)!==e&&(Wr(this,MR,e),this.listeners.forEach(n=>{n(e)}))}isOnline(){return Ct(this,MR)}},MR=new WeakMap,yS=new WeakMap,LR=new WeakMap,aye),GV=new M3e;function L3e(r){return Math.min(1e3*2**r,3e4)}function b0e(r){return(r??"online")==="online"?GV.isOnline():!0}var J6=class extends Error{constructor(r){super("CancelledError"),this.revert=r==null?void 0:r.revert,this.silent=r==null?void 0:r.silent}};function S0e(r){let e=!1,i=0,n;const t=Z6(),o=()=>t.status!=="pending",a=g=>{var v;if(!o()){const y=new J6(g);f(y),(v=r.onCancel)==null||v.call(r,y)}},s=()=>{e=!0},l=()=>{e=!1},u=()=>Oq.isFocused()&&(r.networkMode==="always"||GV.isOnline())&&r.canRun(),c=()=>b0e(r.networkMode)&&r.canRun(),d=g=>{o()||(n==null||n(),t.resolve(g))},f=g=>{o()||(n==null||n(),t.reject(g))},h=()=>new Promise(g=>{var v;n=y=>{(o()||u())&&g(y)},(v=r.onPause)==null||v.call(r)}).then(()=>{var g;n=void 0,o()||(g=r.onContinue)==null||g.call(r)}),p=()=>{if(o())return;let g;const v=i===0?r.initialPromise:void 0;try{g=v??r.fn()}catch(y){g=Promise.reject(y)}Promise.resolve(g).then(d).catch(y=>{var C;if(o())return;const m=r.retry??(x1?0:3),b=r.retryDelay??L3e,S=typeof b=="function"?b(i,y):b,_=m===!0||typeof m=="number"&&i<m||typeof m=="function"&&m(i,y);if(e||!_){f(y);return}i++,(C=r.onFail)==null||C.call(r,i,y),x3e(S).then(()=>u()?void 0:h()).then(()=>{e?f(y):p()})})};return{promise:t,status:()=>t.status,cancel:a,continue:()=>(n==null||n(),t),cancelRetry:s,continueRetry:l,canStart:c,start:()=>(c()?p():h().then(p),t)}}var e1,sye,_0e=(sye=class{constructor(){hi(this,e1)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),q6(this.gcTime)&&Wr(this,e1,Yw.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(r){this.gcTime=Math.max(this.gcTime||0,r??(x1?1/0:300*1e3))}clearGcTimeout(){Ct(this,e1)&&(Yw.clearTimeout(Ct(this,e1)),Wr(this,e1,void 0))}},e1=new WeakMap,sye),t1,kR,fp,r1,Eu,wF,i1,ag,x0,lye,k3e=(lye=class extends _0e{constructor(e){super();hi(this,ag);hi(this,t1);hi(this,kR);hi(this,fp);hi(this,r1);hi(this,Eu);hi(this,wF);hi(this,i1);Wr(this,i1,!1),Wr(this,wF,e.defaultOptions),this.setOptions(e.options),this.observers=[],Wr(this,r1,e.client),Wr(this,fp,Ct(this,r1).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,Wr(this,t1,dZ(this.options)),this.state=e.state??Ct(this,t1),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=Ct(this,Eu))==null?void 0:e.promise}setOptions(e){if(this.options={...Ct(this,wF),...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=dZ(this.options);i.data!==void 0&&(this.setState(cZ(i.data,i.dataUpdatedAt)),Wr(this,t1,i))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&Ct(this,fp).remove(this)}setData(e,i){const n=K6(this.state.data,e,this.options);return dn(this,ag,x0).call(this,{data:n,type:"success",dataUpdatedAt:i==null?void 0:i.updatedAt,manual:i==null?void 0:i.manual}),n}setState(e,i){dn(this,ag,x0).call(this,{type:"setState",state:e,setStateOptions:i})}cancel(e){var n,t;const i=(n=Ct(this,Eu))==null?void 0:n.promise;return(t=Ct(this,Eu))==null||t.cancel(e),i?i.then(Dd).catch(Dd):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(Ct(this,t1))}isActive(){return this.observers.some(e=>pp(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===wq||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>RS(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!v0e(this.state.dataUpdatedAt,e)}onFocus(){var i;const e=this.observers.find(n=>n.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(i=Ct(this,Eu))==null||i.continue()}onOnline(){var i;const e=this.observers.find(n=>n.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(i=Ct(this,Eu))==null||i.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),Ct(this,fp).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(i=>i!==e),this.observers.length||(Ct(this,Eu)&&(Ct(this,i1)?Ct(this,Eu).cancel({revert:!0}):Ct(this,Eu).cancelRetry()),this.scheduleGc()),Ct(this,fp).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||dn(this,ag,x0).call(this,{type:"invalidate"})}async fetch(e,i){var l,u,c,d,f,h,p,g,v,y,m,b;if(this.state.fetchStatus!=="idle"&&((l=Ct(this,Eu))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(i!=null&&i.cancelRefetch))this.cancel({silent:!0});else if(Ct(this,Eu))return Ct(this,Eu).continueRetry(),Ct(this,Eu).promise}if(e&&this.setOptions(e),!this.options.queryFn){const S=this.observers.find(_=>_.options.queryFn);S&&this.setOptions(S.options)}const n=new AbortController,t=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(Wr(this,i1,!0),n.signal)})},o=()=>{const S=y0e(this.options,i),C=(()=>{const T={client:Ct(this,r1),queryKey:this.queryKey,meta:this.meta};return t(T),T})();return Wr(this,i1,!1),this.options.persister?this.options.persister(S,C,this):S(C)},s=(()=>{const S={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:Ct(this,r1),state:this.state,fetchFn:o};return t(S),S})();(u=this.options.behavior)==null||u.onFetch(s,this),Wr(this,kR,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=s.fetchOptions)==null?void 0:c.meta))&&dn(this,ag,x0).call(this,{type:"fetch",meta:(d=s.fetchOptions)==null?void 0:d.meta}),Wr(this,Eu,S0e({initialPromise:i==null?void 0:i.initialPromise,fn:s.fetchFn,onCancel:S=>{S instanceof J6&&S.revert&&this.setState({...Ct(this,kR),fetchStatus:"idle"}),n.abort()},onFail:(S,_)=>{dn(this,ag,x0).call(this,{type:"failed",failureCount:S,error:_})},onPause:()=>{dn(this,ag,x0).call(this,{type:"pause"})},onContinue:()=>{dn(this,ag,x0).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0}));try{const S=await Ct(this,Eu).start();if(S===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(S),(h=(f=Ct(this,fp).config).onSuccess)==null||h.call(f,S,this),(g=(p=Ct(this,fp).config).onSettled)==null||g.call(p,S,this.state.error,this),S}catch(S){if(S instanceof J6){if(S.silent)return Ct(this,Eu).promise;if(S.revert){if(this.state.data===void 0)throw S;return this.state.data}}throw dn(this,ag,x0).call(this,{type:"error",error:S}),(y=(v=Ct(this,fp).config).onError)==null||y.call(v,S,this),(b=(m=Ct(this,fp).config).onSettled)==null||b.call(m,this.state.data,S,this),S}finally{this.scheduleGc()}}},t1=new WeakMap,kR=new WeakMap,fp=new WeakMap,r1=new WeakMap,Eu=new WeakMap,wF=new WeakMap,i1=new WeakMap,ag=new WeakSet,x0=function(e){const i=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...P0e(n.data,this.options),fetchMeta:e.meta??null};case"success":const t={...n,...cZ(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Wr(this,kR,e.manual?t:void 0),t;case"error":const o=e.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=i(this.state),Fl.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),Ct(this,fp).notify({query:this,type:"updated",action:e})})},lye);function P0e(r,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:b0e(e.networkMode)?"fetching":"paused",...r===void 0&&{error:null,status:"pending"}}}function cZ(r,e){return{data:r,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function dZ(r){const e=typeof r.initialData=="function"?r.initialData():r.initialData,i=e!==void 0,n=i?typeof r.initialDataUpdatedAt=="function"?r.initialDataUpdatedAt():r.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:i?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var Pf,uo,OF,Od,n1,IR,D0,mS,DF,NR,FR,o1,a1,bS,jR,ea,oN,Q6,eY,tY,rY,iY,nY,oY,C0e,uye,Dq=(uye=class extends xM{constructor(e,i){super();hi(this,ea);hi(this,Pf);hi(this,uo);hi(this,OF);hi(this,Od);hi(this,n1);hi(this,IR);hi(this,D0);hi(this,mS);hi(this,DF);hi(this,NR);hi(this,FR);hi(this,o1);hi(this,a1);hi(this,bS);hi(this,jR,new Set);this.options=i,Wr(this,Pf,e),Wr(this,mS,null),Wr(this,D0,Z6()),this.bindMethods(),this.setOptions(i)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(Ct(this,uo).addObserver(this),fZ(Ct(this,uo),this.options)?dn(this,ea,oN).call(this):this.updateResult(),dn(this,ea,rY).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return aY(Ct(this,uo),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return aY(Ct(this,uo),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,dn(this,ea,iY).call(this),dn(this,ea,nY).call(this),Ct(this,uo).removeObserver(this)}setOptions(e){const i=this.options,n=Ct(this,uo);if(this.options=Ct(this,Pf).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof pp(this.options.enabled,Ct(this,uo))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");dn(this,ea,oY).call(this),Ct(this,uo).setOptions(this.options),i._defaulted&&!WV(this.options,i)&&Ct(this,Pf).getQueryCache().notify({type:"observerOptionsUpdated",query:Ct(this,uo),observer:this});const t=this.hasListeners();t&&hZ(Ct(this,uo),n,this.options,i)&&dn(this,ea,oN).call(this),this.updateResult(),t&&(Ct(this,uo)!==n||pp(this.options.enabled,Ct(this,uo))!==pp(i.enabled,Ct(this,uo))||RS(this.options.staleTime,Ct(this,uo))!==RS(i.staleTime,Ct(this,uo)))&&dn(this,ea,Q6).call(this);const o=dn(this,ea,eY).call(this);t&&(Ct(this,uo)!==n||pp(this.options.enabled,Ct(this,uo))!==pp(i.enabled,Ct(this,uo))||o!==Ct(this,bS))&&dn(this,ea,tY).call(this,o)}getOptimisticResult(e){const i=Ct(this,Pf).getQueryCache().build(Ct(this,Pf),e),n=this.createResult(i,e);return N3e(this,n)&&(Wr(this,Od,n),Wr(this,IR,this.options),Wr(this,n1,Ct(this,uo).state)),n}getCurrentResult(){return Ct(this,Od)}trackResult(e,i){return new Proxy(e,{get:(n,t)=>(this.trackProp(t),i==null||i(t),t==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&Ct(this,D0).status==="pending"&&Ct(this,D0).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,t))})}trackProp(e){Ct(this,jR).add(e)}getCurrentQuery(){return Ct(this,uo)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const i=Ct(this,Pf).defaultQueryOptions(e),n=Ct(this,Pf).getQueryCache().build(Ct(this,Pf),i);return n.fetch().then(()=>this.createResult(n,i))}fetch(e){return dn(this,ea,oN).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),Ct(this,Od)))}createResult(e,i){var A;const n=Ct(this,uo),t=this.options,o=Ct(this,Od),a=Ct(this,n1),s=Ct(this,IR),u=e!==n?e.state:Ct(this,OF),{state:c}=e;let d={...c},f=!1,h;if(i._optimisticResults){const w=this.hasListeners(),L=!w&&fZ(e,i),k=w&&hZ(e,n,i,t);(L||k)&&(d={...d,...P0e(c.data,e.options)}),i._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:p,errorUpdatedAt:g,status:v}=d;h=d.data;let y=!1;if(i.placeholderData!==void 0&&h===void 0&&v==="pending"){let w;o!=null&&o.isPlaceholderData&&i.placeholderData===(s==null?void 0:s.placeholderData)?(w=o.data,y=!0):w=typeof i.placeholderData=="function"?i.placeholderData((A=Ct(this,FR))==null?void 0:A.state.data,Ct(this,FR)):i.placeholderData,w!==void 0&&(v="success",h=K6(o==null?void 0:o.data,w,i),f=!0)}if(i.select&&h!==void 0&&!y)if(o&&h===(a==null?void 0:a.data)&&i.select===Ct(this,DF))h=Ct(this,NR);else try{Wr(this,DF,i.select),h=i.select(h),h=K6(o==null?void 0:o.data,h,i),Wr(this,NR,h),Wr(this,mS,null)}catch(w){Wr(this,mS,w)}Ct(this,mS)&&(p=Ct(this,mS),h=Ct(this,NR),g=Date.now(),v="error");const m=d.fetchStatus==="fetching",b=v==="pending",S=v==="error",_=b&&m,C=h!==void 0,x={status:v,fetchStatus:d.fetchStatus,isPending:b,isSuccess:v==="success",isError:S,isInitialLoading:_,isLoading:_,data:h,dataUpdatedAt:d.dataUpdatedAt,error:p,errorUpdatedAt:g,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>u.dataUpdateCount||d.errorUpdateCount>u.errorUpdateCount,isFetching:m,isRefetching:m&&!b,isLoadingError:S&&!C,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:S&&C,isStale:Rq(e,i),refetch:this.refetch,promise:Ct(this,D0),isEnabled:pp(i.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const w=x.data!==void 0,L=x.status==="error"&&!w,k=N=>{L?N.reject(x.error):w&&N.resolve(x.data)},D=()=>{const N=Wr(this,D0,x.promise=Z6());k(N)},j=Ct(this,D0);switch(j.status){case"pending":e.queryHash===n.queryHash&&k(j);break;case"fulfilled":(L||x.data!==j.value)&&D();break;case"rejected":(!L||x.error!==j.reason)&&D();break}}return x}updateResult(){const e=Ct(this,Od),i=this.createResult(Ct(this,uo),this.options);if(Wr(this,n1,Ct(this,uo).state),Wr(this,IR,this.options),Ct(this,n1).data!==void 0&&Wr(this,FR,Ct(this,uo)),WV(i,e))return;Wr(this,Od,i);const n=()=>{if(!e)return!0;const{notifyOnChangeProps:t}=this.options,o=typeof t=="function"?t():t;if(o==="all"||!o&&!Ct(this,jR).size)return!0;const a=new Set(o??Ct(this,jR));return this.options.throwOnError&&a.add("error"),Object.keys(Ct(this,Od)).some(s=>{const l=s;return Ct(this,Od)[l]!==e[l]&&a.has(l)})};dn(this,ea,C0e).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&dn(this,ea,rY).call(this)}},Pf=new WeakMap,uo=new WeakMap,OF=new WeakMap,Od=new WeakMap,n1=new WeakMap,IR=new WeakMap,D0=new WeakMap,mS=new WeakMap,DF=new WeakMap,NR=new WeakMap,FR=new WeakMap,o1=new WeakMap,a1=new WeakMap,bS=new WeakMap,jR=new WeakMap,ea=new WeakSet,oN=function(e){dn(this,ea,oY).call(this);let i=Ct(this,uo).fetch(this.options,e);return e!=null&&e.throwOnError||(i=i.catch(Dd)),i},Q6=function(){dn(this,ea,iY).call(this);const e=RS(this.options.staleTime,Ct(this,uo));if(x1||Ct(this,Od).isStale||!q6(e))return;const n=v0e(Ct(this,Od).dataUpdatedAt,e)+1;Wr(this,o1,Yw.setTimeout(()=>{Ct(this,Od).isStale||this.updateResult()},n))},eY=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(Ct(this,uo)):this.options.refetchInterval)??!1},tY=function(e){dn(this,ea,nY).call(this),Wr(this,bS,e),!(x1||pp(this.options.enabled,Ct(this,uo))===!1||!q6(Ct(this,bS))||Ct(this,bS)===0)&&Wr(this,a1,Yw.setInterval(()=>{(this.options.refetchIntervalInBackground||Oq.isFocused())&&dn(this,ea,oN).call(this)},Ct(this,bS)))},rY=function(){dn(this,ea,Q6).call(this),dn(this,ea,tY).call(this,dn(this,ea,eY).call(this))},iY=function(){Ct(this,o1)&&(Yw.clearTimeout(Ct(this,o1)),Wr(this,o1,void 0))},nY=function(){Ct(this,a1)&&(Yw.clearInterval(Ct(this,a1)),Wr(this,a1,void 0))},oY=function(){const e=Ct(this,Pf).getQueryCache().build(Ct(this,Pf),this.options);if(e===Ct(this,uo))return;const i=Ct(this,uo);Wr(this,uo,e),Wr(this,OF,e.state),this.hasListeners()&&(i==null||i.removeObserver(this),e.addObserver(this))},C0e=function(e){Fl.batch(()=>{e.listeners&&this.listeners.forEach(i=>{i(Ct(this,Od))}),Ct(this,Pf).getQueryCache().notify({query:Ct(this,uo),type:"observerResultsUpdated"})})},uye);function I3e(r,e){return pp(e.enabled,r)!==!1&&r.state.data===void 0&&!(r.state.status==="error"&&e.retryOnMount===!1)}function fZ(r,e){return I3e(r,e)||r.state.data!==void 0&&aY(r,e,e.refetchOnMount)}function aY(r,e,i){if(pp(e.enabled,r)!==!1&&RS(e.staleTime,r)!=="static"){const n=typeof i=="function"?i(r):i;return n==="always"||n!==!1&&Rq(r,e)}return!1}function hZ(r,e,i,n){return(r!==e||pp(n.enabled,r)===!1)&&(!i.suspense||r.state.status!=="error")&&Rq(r,i)}function Rq(r,e){return pp(e.enabled,r)!==!1&&r.isStaleByTime(RS(e.staleTime,r))}function N3e(r,e){return!WV(r.getCurrentResult(),e)}function pZ(r){return{onFetch:(e,i)=>{var c,d,f,h,p;const n=e.options,t=(f=(d=(c=e.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,o=((h=e.state.data)==null?void 0:h.pages)||[],a=((p=e.state.data)==null?void 0:p.pageParams)||[];let s={pages:[],pageParams:[]},l=0;const u=async()=>{let g=!1;const v=b=>{w3e(b,()=>e.signal,()=>g=!0)},y=y0e(e.options,e.fetchOptions),m=async(b,S,_)=>{if(g)return Promise.reject();if(S==null&&b.pages.length)return Promise.resolve(b);const T=(()=>{const L={client:e.client,queryKey:e.queryKey,pageParam:S,direction:_?"backward":"forward",meta:e.options.meta};return v(L),L})(),x=await y(T),{maxPages:A}=e.options,w=_?A3e:E3e;return{pages:w(b.pages,x,A),pageParams:w(b.pageParams,S,A)}};if(t&&o.length){const b=t==="backward",S=b?F3e:gZ,_={pages:o,pageParams:a},C=S(n,_);s=await m(_,C,b)}else{const b=r??o.length;do{const S=l===0?a[0]??n.initialPageParam:gZ(n,s);if(l>0&&S==null)break;s=await m(s,S),l++}while(l<b)}return s};e.options.persister?e.fetchFn=()=>{var g,v;return(v=(g=e.options).persister)==null?void 0:v.call(g,u,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},i)}:e.fetchFn=u}}}function gZ(r,{pages:e,pageParams:i}){const n=e.length-1;return e.length>0?r.getNextPageParam(e[n],e,i[n],i):void 0}function F3e(r,{pages:e,pageParams:i}){var n;return e.length>0?(n=r.getPreviousPageParam)==null?void 0:n.call(r,e[0],e,i[0],i):void 0}var RF,bv,Bc,s1,Sv,lS,cye,j3e=(cye=class extends _0e{constructor(e){super();hi(this,Sv);hi(this,RF);hi(this,bv);hi(this,Bc);hi(this,s1);Wr(this,RF,e.client),this.mutationId=e.mutationId,Wr(this,Bc,e.mutationCache),Wr(this,bv,[]),this.state=e.state||B3e(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){Ct(this,bv).includes(e)||(Ct(this,bv).push(e),this.clearGcTimeout(),Ct(this,Bc).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){Wr(this,bv,Ct(this,bv).filter(i=>i!==e)),this.scheduleGc(),Ct(this,Bc).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){Ct(this,bv).length||(this.state.status==="pending"?this.scheduleGc():Ct(this,Bc).remove(this))}continue(){var e;return((e=Ct(this,s1))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var a,s,l,u,c,d,f,h,p,g,v,y,m,b,S,_,C,T;const i=()=>{dn(this,Sv,lS).call(this,{type:"continue"})},n={client:Ct(this,RF),meta:this.options.meta,mutationKey:this.options.mutationKey};Wr(this,s1,S0e({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(x,A)=>{dn(this,Sv,lS).call(this,{type:"failed",failureCount:x,error:A})},onPause:()=>{dn(this,Sv,lS).call(this,{type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>Ct(this,Bc).canRun(this)}));const t=this.state.status==="pending",o=!Ct(this,s1).canStart();try{if(t)i();else{dn(this,Sv,lS).call(this,{type:"pending",variables:e,isPaused:o}),Ct(this,Bc).config.onMutate&&await Ct(this,Bc).config.onMutate(e,this,n);const A=await((s=(a=this.options).onMutate)==null?void 0:s.call(a,e,n));A!==this.state.context&&dn(this,Sv,lS).call(this,{type:"pending",context:A,variables:e,isPaused:o})}const x=await Ct(this,s1).start();return await((u=(l=Ct(this,Bc).config).onSuccess)==null?void 0:u.call(l,x,e,this.state.context,this,n)),await((d=(c=this.options).onSuccess)==null?void 0:d.call(c,x,e,this.state.context,n)),await((h=(f=Ct(this,Bc).config).onSettled)==null?void 0:h.call(f,x,null,this.state.variables,this.state.context,this,n)),await((g=(p=this.options).onSettled)==null?void 0:g.call(p,x,null,e,this.state.context,n)),dn(this,Sv,lS).call(this,{type:"success",data:x}),x}catch(x){try{await((y=(v=Ct(this,Bc).config).onError)==null?void 0:y.call(v,x,e,this.state.context,this,n))}catch(A){Promise.reject(A)}try{await((b=(m=this.options).onError)==null?void 0:b.call(m,x,e,this.state.context,n))}catch(A){Promise.reject(A)}try{await((_=(S=Ct(this,Bc).config).onSettled)==null?void 0:_.call(S,void 0,x,this.state.variables,this.state.context,this,n))}catch(A){Promise.reject(A)}try{await((T=(C=this.options).onSettled)==null?void 0:T.call(C,void 0,x,e,this.state.context,n))}catch(A){Promise.reject(A)}throw dn(this,Sv,lS).call(this,{type:"error",error:x}),x}finally{Ct(this,Bc).runNext(this)}}},RF=new WeakMap,bv=new WeakMap,Bc=new WeakMap,s1=new WeakMap,Sv=new WeakSet,lS=function(e){const i=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=i(this.state),Fl.batch(()=>{Ct(this,bv).forEach(n=>{n.onMutationUpdate(e)}),Ct(this,Bc).notify({mutation:this,type:"updated",action:e})})},cye);function B3e(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var R0,sg,MF,dye,V3e=(dye=class extends xM{constructor(e={}){super();hi(this,R0);hi(this,sg);hi(this,MF);this.config=e,Wr(this,R0,new Set),Wr(this,sg,new Map),Wr(this,MF,0)}build(e,i,n){const t=new j3e({client:e,mutationCache:this,mutationId:++Oj(this,MF)._,options:e.defaultMutationOptions(i),state:n});return this.add(t),t}add(e){Ct(this,R0).add(e);const i=Uj(e);if(typeof i=="string"){const n=Ct(this,sg).get(i);n?n.push(e):Ct(this,sg).set(i,[e])}this.notify({type:"added",mutation:e})}remove(e){if(Ct(this,R0).delete(e)){const i=Uj(e);if(typeof i=="string"){const n=Ct(this,sg).get(i);if(n)if(n.length>1){const t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&Ct(this,sg).delete(i)}}this.notify({type:"removed",mutation:e})}canRun(e){const i=Uj(e);if(typeof i=="string"){const n=Ct(this,sg).get(i),t=n==null?void 0:n.find(o=>o.state.status==="pending");return!t||t===e}else return!0}runNext(e){var n;const i=Uj(e);if(typeof i=="string"){const t=(n=Ct(this,sg).get(i))==null?void 0:n.find(o=>o!==e&&o.state.isPaused);return(t==null?void 0:t.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Fl.batch(()=>{Ct(this,R0).forEach(e=>{this.notify({type:"removed",mutation:e})}),Ct(this,R0).clear(),Ct(this,sg).clear()})}getAll(){return Array.from(Ct(this,R0))}find(e){const i={exact:!0,...e};return this.getAll().find(n=>sZ(i,n))}findAll(e={}){return this.getAll().filter(i=>sZ(e,i))}notify(e){Fl.batch(()=>{this.listeners.forEach(i=>{i(e)})})}resumePausedMutations(){const e=this.getAll().filter(i=>i.state.isPaused);return Fl.batch(()=>Promise.all(e.map(i=>i.continue().catch(Dd))))}},R0=new WeakMap,sg=new WeakMap,MF=new WeakMap,dye);function Uj(r){var e;return(e=r.options.scope)==null?void 0:e.id}function vZ(r,e){const i=new Set(e);return r.filter(n=>!i.has(n))}function H3e(r,e,i){const n=r.slice(0);return n[e]=i,n}var BR,vh,VR,HR,hp,SS,LF,kF,IF,NF,pc,sY,lY,uY,cY,dY,fye,U3e=(fye=class extends xM{constructor(e,i,n){super();hi(this,pc);hi(this,BR);hi(this,vh);hi(this,VR);hi(this,HR);hi(this,hp);hi(this,SS);hi(this,LF);hi(this,kF);hi(this,IF);hi(this,NF,[]);Wr(this,BR,e),Wr(this,HR,n),Wr(this,VR,[]),Wr(this,hp,[]),Wr(this,vh,[]),this.setQueries(i)}onSubscribe(){this.listeners.size===1&&Ct(this,hp).forEach(e=>{e.subscribe(i=>{dn(this,pc,cY).call(this,e,i)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,Ct(this,hp).forEach(e=>{e.destroy()})}setQueries(e,i){Wr(this,VR,e),Wr(this,HR,i),Fl.batch(()=>{const n=Ct(this,hp),t=dn(this,pc,uY).call(this,Ct(this,VR));t.forEach(d=>d.observer.setOptions(d.defaultedQueryOptions));const o=t.map(d=>d.observer),a=o.map(d=>d.getCurrentResult()),s=n.length!==o.length,l=o.some((d,f)=>d!==n[f]),u=s||l,c=u?!0:a.some((d,f)=>{const h=Ct(this,vh)[f];return!h||!WV(d,h)});!u&&!c||(u&&(Wr(this,NF,t),Wr(this,hp,o)),Wr(this,vh,a),this.hasListeners()&&(u&&(vZ(n,o).forEach(d=>{d.destroy()}),vZ(o,n).forEach(d=>{d.subscribe(f=>{dn(this,pc,cY).call(this,d,f)})})),dn(this,pc,dY).call(this)))})}getCurrentResult(){return Ct(this,vh)}getQueries(){return Ct(this,hp).map(e=>e.getCurrentQuery())}getObservers(){return Ct(this,hp)}getOptimisticResult(e,i){const n=dn(this,pc,uY).call(this,e),t=n.map(a=>a.observer.getOptimisticResult(a.defaultedQueryOptions)),o=n.map(a=>a.defaultedQueryOptions.queryHash);return[t,a=>dn(this,pc,lY).call(this,a??t,i,o),()=>dn(this,pc,sY).call(this,t,n)]}},BR=new WeakMap,vh=new WeakMap,VR=new WeakMap,HR=new WeakMap,hp=new WeakMap,SS=new WeakMap,LF=new WeakMap,kF=new WeakMap,IF=new WeakMap,NF=new WeakMap,pc=new WeakSet,sY=function(e,i){return i.map((n,t)=>{const o=e[t];return n.defaultedQueryOptions.notifyOnChangeProps?o:n.observer.trackResult(o,a=>{i.forEach(s=>{s.observer.trackProp(a)})})})},lY=function(e,i,n){if(i){const t=Ct(this,IF),o=n!==void 0&&t!==void 0&&(t.length!==n.length||n.some((a,s)=>a!==t[s]));return(!Ct(this,SS)||Ct(this,vh)!==Ct(this,kF)||o||i!==Ct(this,LF))&&(Wr(this,LF,i),Wr(this,kF,Ct(this,vh)),n!==void 0&&Wr(this,IF,n),Wr(this,SS,Aq(Ct(this,SS),i(e)))),Ct(this,SS)}return e},uY=function(e){const i=new Map;Ct(this,hp).forEach(t=>{const o=t.options.queryHash;if(!o)return;const a=i.get(o);a?a.push(t):i.set(o,[t])});const n=[];return e.forEach(t=>{var l;const o=Ct(this,BR).defaultQueryOptions(t),s=((l=i.get(o.queryHash))==null?void 0:l.shift())??new Dq(Ct(this,BR),o);n.push({defaultedQueryOptions:o,observer:s})}),n},cY=function(e,i){const n=Ct(this,hp).indexOf(e);n!==-1&&(Wr(this,vh,H3e(Ct(this,vh),n,i)),dn(this,pc,dY).call(this))},dY=function(){var e;if(this.hasListeners()){const i=Ct(this,SS),n=dn(this,pc,sY).call(this,Ct(this,vh),Ct(this,NF)),t=dn(this,pc,lY).call(this,n,(e=Ct(this,HR))==null?void 0:e.combine);i!==t&&Fl.batch(()=>{this.listeners.forEach(o=>{o(Ct(this,vh))})})}},fye),_v,hye,z3e=(hye=class extends xM{constructor(e={}){super();hi(this,_v);this.config=e,Wr(this,_v,new Map)}build(e,i,n){const t=i.queryKey,o=i.queryHash??Eq(t,i);let a=this.get(o);return a||(a=new k3e({client:e,queryKey:t,queryHash:o,options:e.defaultQueryOptions(i),state:n,defaultOptions:e.getQueryDefaults(t)}),this.add(a)),a}add(e){Ct(this,_v).has(e.queryHash)||(Ct(this,_v).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const i=Ct(this,_v).get(e.queryHash);i&&(e.destroy(),i===e&&Ct(this,_v).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Fl.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return Ct(this,_v).get(e)}getAll(){return[...Ct(this,_v).values()]}find(e){const i={exact:!0,...e};return this.getAll().find(n=>aZ(i,n))}findAll(e={}){const i=this.getAll();return Object.keys(e).length>0?i.filter(n=>aZ(e,n)):i}notify(e){Fl.batch(()=>{this.listeners.forEach(i=>{i(e)})})}onFocus(){Fl.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Fl.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},_v=new WeakMap,hye),Xs,_S,PS,UR,zR,CS,WR,GR,pye,W3e=(pye=class{constructor(r={}){hi(this,Xs);hi(this,_S);hi(this,PS);hi(this,UR);hi(this,zR);hi(this,CS);hi(this,WR);hi(this,GR);Wr(this,Xs,r.queryCache||new z3e),Wr(this,_S,r.mutationCache||new V3e),Wr(this,PS,r.defaultOptions||{}),Wr(this,UR,new Map),Wr(this,zR,new Map),Wr(this,CS,0)}mount(){Oj(this,CS)._++,Ct(this,CS)===1&&(Wr(this,WR,Oq.subscribe(async r=>{r&&(await this.resumePausedMutations(),Ct(this,Xs).onFocus())})),Wr(this,GR,GV.subscribe(async r=>{r&&(await this.resumePausedMutations(),Ct(this,Xs).onOnline())})))}unmount(){var r,e;Oj(this,CS)._--,Ct(this,CS)===0&&((r=Ct(this,WR))==null||r.call(this),Wr(this,WR,void 0),(e=Ct(this,GR))==null||e.call(this),Wr(this,GR,void 0))}isFetching(r){return Ct(this,Xs).findAll({...r,fetchStatus:"fetching"}).length}isMutating(r){return Ct(this,_S).findAll({...r,status:"pending"}).length}getQueryData(r){var i;const e=this.defaultQueryOptions({queryKey:r});return(i=Ct(this,Xs).get(e.queryHash))==null?void 0:i.state.data}ensureQueryData(r){const e=this.defaultQueryOptions(r),i=Ct(this,Xs).build(this,e),n=i.state.data;return n===void 0?this.fetchQuery(r):(r.revalidateIfStale&&i.isStaleByTime(RS(e.staleTime,i))&&this.prefetchQuery(e),Promise.resolve(n))}getQueriesData(r){return Ct(this,Xs).findAll(r).map(({queryKey:e,state:i})=>{const n=i.data;return[e,n]})}setQueryData(r,e,i){const n=this.defaultQueryOptions({queryKey:r}),t=Ct(this,Xs).get(n.queryHash),o=t==null?void 0:t.state.data,a=C3e(e,o);if(a!==void 0)return Ct(this,Xs).build(this,n).setData(a,{...i,manual:!0})}setQueriesData(r,e,i){return Fl.batch(()=>Ct(this,Xs).findAll(r).map(({queryKey:n})=>[n,this.setQueryData(n,e,i)]))}getQueryState(r){var i;const e=this.defaultQueryOptions({queryKey:r});return(i=Ct(this,Xs).get(e.queryHash))==null?void 0:i.state}removeQueries(r){const e=Ct(this,Xs);Fl.batch(()=>{e.findAll(r).forEach(i=>{e.remove(i)})})}resetQueries(r,e){const i=Ct(this,Xs);return Fl.batch(()=>(i.findAll(r).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...r},e)))}cancelQueries(r,e={}){const i={revert:!0,...e},n=Fl.batch(()=>Ct(this,Xs).findAll(r).map(t=>t.cancel(i)));return Promise.all(n).then(Dd).catch(Dd)}invalidateQueries(r,e={}){return Fl.batch(()=>(Ct(this,Xs).findAll(r).forEach(i=>{i.invalidate()}),(r==null?void 0:r.refetchType)==="none"?Promise.resolve():this.refetchQueries({...r,type:(r==null?void 0:r.refetchType)??(r==null?void 0:r.type)??"active"},e)))}refetchQueries(r,e={}){const i={...e,cancelRefetch:e.cancelRefetch??!0},n=Fl.batch(()=>Ct(this,Xs).findAll(r).filter(t=>!t.isDisabled()&&!t.isStatic()).map(t=>{let o=t.fetch(void 0,i);return i.throwOnError||(o=o.catch(Dd)),t.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(Dd)}fetchQuery(r){const e=this.defaultQueryOptions(r);e.retry===void 0&&(e.retry=!1);const i=Ct(this,Xs).build(this,e);return i.isStaleByTime(RS(e.staleTime,i))?i.fetch(e):Promise.resolve(i.state.data)}prefetchQuery(r){return this.fetchQuery(r).then(Dd).catch(Dd)}fetchInfiniteQuery(r){return r.behavior=pZ(r.pages),this.fetchQuery(r)}prefetchInfiniteQuery(r){return this.fetchInfiniteQuery(r).then(Dd).catch(Dd)}ensureInfiniteQueryData(r){return r.behavior=pZ(r.pages),this.ensureQueryData(r)}resumePausedMutations(){return GV.isOnline()?Ct(this,_S).resumePausedMutations():Promise.resolve()}getQueryCache(){return Ct(this,Xs)}getMutationCache(){return Ct(this,_S)}getDefaultOptions(){return Ct(this,PS)}setDefaultOptions(r){Wr(this,PS,r)}setQueryDefaults(r,e){Ct(this,UR).set(VN(r),{queryKey:r,defaultOptions:e})}getQueryDefaults(r){const e=[...Ct(this,UR).values()],i={};return e.forEach(n=>{HN(r,n.queryKey)&&Object.assign(i,n.defaultOptions)}),i}setMutationDefaults(r,e){Ct(this,zR).set(VN(r),{mutationKey:r,defaultOptions:e})}getMutationDefaults(r){const e=[...Ct(this,zR).values()],i={};return e.forEach(n=>{HN(r,n.mutationKey)&&Object.assign(i,n.defaultOptions)}),i}defaultQueryOptions(r){if(r._defaulted)return r;const e={...Ct(this,PS).queries,...this.getQueryDefaults(r.queryKey),...r,_defaulted:!0};return e.queryHash||(e.queryHash=Eq(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===wq&&(e.enabled=!1),e}defaultMutationOptions(r){return r!=null&&r._defaulted?r:{...Ct(this,PS).mutations,...(r==null?void 0:r.mutationKey)&&this.getMutationDefaults(r.mutationKey),...r,_defaulted:!0}}clear(){Ct(this,Xs).clear(),Ct(this,_S).clear()}},Xs=new WeakMap,_S=new WeakMap,PS=new WeakMap,UR=new WeakMap,zR=new WeakMap,CS=new WeakMap,WR=new WeakMap,GR=new WeakMap,pye),T0e=G.createContext(void 0),Mq=r=>{const e=G.useContext(T0e);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},G3e=({client:r,children:e})=>(G.useEffect(()=>(r.mount(),()=>{r.unmount()}),[r]),R.jsx(T0e.Provider,{value:r,children:e})),x0e=G.createContext(!1),E0e=()=>G.useContext(x0e);x0e.Provider;function Y3e(){let r=!1;return{clearReset:()=>{r=!1},reset:()=>{r=!0},isReset:()=>r}}var $3e=G.createContext(Y3e()),A0e=()=>G.useContext($3e),w0e=(r,e,i)=>{const n=i!=null&&i.state.error&&typeof r.throwOnError=="function"?m0e(r.throwOnError,[i.state.error,i]):r.throwOnError;(r.suspense||r.experimental_prefetchInRender||n)&&(e.isReset()||(r.retryOnMount=!1))},O0e=r=>{G.useEffect(()=>{r.clearReset()},[r])},D0e=({result:r,errorResetBoundary:e,throwOnError:i,query:n,suspense:t})=>r.isError&&!e.isReset()&&!r.isFetching&&n&&(t&&r.data===void 0||m0e(i,[r.error,n])),R0e=r=>{if(r.suspense){const i=t=>t==="static"?t:Math.max(t??1e3,1e3),n=r.staleTime;r.staleTime=typeof n=="function"?(...t)=>i(n(...t)):i(n),typeof r.gcTime=="number"&&(r.gcTime=Math.max(r.gcTime,1e3))}},M0e=(r,e)=>r.isLoading&&r.isFetching&&!e,fY=(r,e)=>(r==null?void 0:r.suspense)&&e.isPending,YV=(r,e,i)=>e.fetchOptimistic(r).catch(()=>{i.clearReset()});function q3e({queries:r,...e},i){const n=Mq(),t=E0e(),o=A0e(),a=G.useMemo(()=>r.map(g=>{const v=n.defaultQueryOptions(g);return v._optimisticResults=t?"isRestoring":"optimistic",v}),[r,n,t]);a.forEach(g=>{R0e(g);const v=n.getQueryCache().get(g.queryHash);w0e(g,o,v)}),O0e(o);const[s]=G.useState(()=>new U3e(n,a,e)),[l,u,c]=s.getOptimisticResult(a,e.combine),d=!t&&e.subscribed!==!1;G.useSyncExternalStore(G.useCallback(g=>d?s.subscribe(Fl.batchCalls(g)):Dd,[s,d]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),G.useEffect(()=>{s.setQueries(a,e)},[a,e,s]);const h=l.some((g,v)=>fY(a[v],g))?l.flatMap((g,v)=>{const y=a[v];if(y){const m=new Dq(n,y);if(fY(y,g))return YV(y,m,o);M0e(g,t)&&YV(y,m,o)}return[]}):[];if(h.length>0)throw Promise.all(h);const p=l.find((g,v)=>{const y=a[v];return y&&D0e({result:g,errorResetBoundary:o,throwOnError:y.throwOnError,query:n.getQueryCache().get(y.queryHash),suspense:y.suspense})});if(p!=null&&p.error)throw p.error;return u(c())}function X3e(r,e,i){var f,h,p,g;const n=E0e(),t=A0e(),o=Mq(),a=o.defaultQueryOptions(r);(h=(f=o.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||h.call(f,a);const s=o.getQueryCache().get(a.queryHash);a._optimisticResults=n?"isRestoring":"optimistic",R0e(a),w0e(a,t,s),O0e(t);const l=!o.getQueryCache().get(a.queryHash),[u]=G.useState(()=>new e(o,a)),c=u.getOptimisticResult(a),d=!n&&r.subscribed!==!1;if(G.useSyncExternalStore(G.useCallback(v=>{const y=d?u.subscribe(Fl.batchCalls(v)):Dd;return u.updateResult(),y},[u,d]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),G.useEffect(()=>{u.setOptions(a)},[a,u]),fY(a,c))throw YV(a,u,t);if(D0e({result:c,errorResetBoundary:t,throwOnError:a.throwOnError,query:s,suspense:a.suspense}))throw c.error;if((g=(p=o.getDefaultOptions().queries)==null?void 0:p._experimental_afterQuery)==null||g.call(p,a,c),a.experimental_prefetchInRender&&!x1&&M0e(c,n)){const v=l?YV(a,u,t):s==null?void 0:s.promise;v==null||v.catch(Dd).finally(()=>{u.updateResult()})}return a.notifyOnChangeProps?c:u.trackResult(c)}function K3e(r,e){return X3e(r,Dq)}function Lq(){const r=Mq(),{environment:e,preferences:i}=Dg(),n=G.useMemo(()=>new g0e(e.studioBackendUrl),[e.studioBackendUrl]),[t,o]=G.useState(new Set),a=K3e({queryKey:["folder","/",i.showHiddenFiles],queryFn:()=>n.getDirectoryContents("/",i.showHiddenFiles),networkMode:"always"}),s=G.useMemo(()=>Array.from(t),[t]),l=q3e({queries:s.map(b=>({queryKey:["folder",b,i.showHiddenFiles],queryFn:()=>n.getDirectoryContents(b,i.showHiddenFiles),networkMode:"always"}))}),u=l.map(b=>b.data),c=l.map(b=>b.error),d=G.useMemo(()=>{const b=new Map;return b.set("/",a.data??[]),s.forEach((S,_)=>{const C=u[_];C&&b.set(S,C)}),b},[a.data,s,u]),f=G.useMemo(()=>{if(!a.data)return null;const b={id:"/",name:"root",path:"/",type:"folder",children:a.data};return L0e(b,d)},[a.data,d]);G.useEffect(()=>{s.forEach((b,S)=>{c[S]&&(Gn.error(`Failed to load folder: ${b}`,{toastId:`folder-error-${b}`}),o(C=>{const T=new Set(C);return T.delete(b),T}))})},[s,c]);const h=G.useCallback(b=>{var _;const S=s.indexOf(b);return S===-1?!1:((_=l[S])==null?void 0:_.isLoading)??!1},[s,l]),p=G.useCallback(b=>{o(S=>{const _=new Set(S);return _.has(b)?_.delete(b):_.add(b),_})},[]),g=G.useCallback(b=>t.has(b),[t]),v=G.useCallback(b=>{if(!b)return;const S=Z3e(b);o(_=>{const C=new Set(_);return S.forEach(T=>C.add(T)),C})},[]),y=G.useCallback(()=>{r.invalidateQueries({queryKey:["folder"]})},[r]),m=G.useCallback(b=>{r.invalidateQueries({queryKey:["folder",b]})},[r]);return{fileTree:f,expandedFolders:t,isLoading:a.isLoading,toggleFolder:p,setExpandedFolders:o,isFolderExpanded:g,isFolderLoading:h,expandToPath:v,refreshFileTree:y,refreshFolder:m}}function L0e(r,e){if(r.type!=="folder")return r;const i=e.get(r.path);return i?{...r,children:i.map(n=>L0e(n,e))}:r}function Z3e(r){const e=r.split("/").filter(Boolean),i=["/"];let n="";for(let t=0;t<e.length-1;t++)n+="/"+e[t],i.push(n);return i}const J3e=new W3e({defaultOptions:{queries:{staleTime:600*1e3,gcTime:1/0,refetchOnWindowFocus:!1}}});function Q3e(r){return R.jsx(G3e,{client:J3e,children:r.children})}function kq(){const{openPage:r}=u_();return G.useCallback((e,i)=>{const n=e.split("/").pop()||"File";r(fc.FILES,{id:`file:${e}`,title:n,params:{path:e,fileType:i}})},[r])}const eHe=50;function tHe(r,e=eHe){const[i,n]=G.useState(!1);return G.useEffect(()=>{if(!r)return;const t=setTimeout(()=>n(!0),e);return()=>{clearTimeout(t),n(!1)}},[r,e]),i}const rHe=12,iHe=(r,e,i)=>{i?r():e()},nHe=(r,e)=>R.jsx(R.Fragment,{children:e?R.jsx("span",{className:"w-4 h-4 flex items-center justify-center",children:R.jsx(Fr,{type:sr.NAV_CHEVRON_RIGHT,className:Nr("w-3.5 h-3.5 text-white/50 transition-transform duration-100",r&&"rotate-90")})}):R.jsx("span",{className:"w-4"})}),oHe=(r,e,i,n)=>r?R.jsx(Fr,{type:sr.STATUS_LOADING,className:"w-4 h-4 text-white/50 animate-spin"}):e?R.jsxs("span",{className:"relative w-4 h-4 shrink-0",children:[R.jsx(Fr,{type:sr.FOLDER_OPEN,className:Nr("absolute inset-0 w-4 h-4 text-green-500/90 transition-opacity duration-200",i?"opacity-100":"opacity-0")}),R.jsx(Fr,{type:sr.FOLDER_CLOSED,className:Nr("absolute inset-0 w-4 h-4 text-green-500/90 transition-opacity duration-200",i?"opacity-0":"opacity-100")})]}):R.jsx(Fr,{type:n,className:"w-4 h-4 shrink-0 text-blue-300/90"}),aHe=r=>R.jsx(R.Fragment,{children:R.jsx("span",{className:"truncate",children:r})});function sHe(r){const e=r.node.type==="folder",i=tHe(r.isLoading??!1)&&e,n=e?r.isExpanded?sr.FOLDER_OPEN:sr.FOLDER_CLOSED:b3e(r.node);return R.jsxs("div",{className:Nr("flex items-center gap-1.5 py-1.5 px-2 cursor-pointer ms-1","text-white hover:text-white/80 text-xs","transition-colors duration-150",r.isActive?"bg-white/[0.08] hover:bg-white/[0.14]":"hover:bg-white/10"),style:{paddingLeft:`${r.depth*rHe}px`},onClick:()=>iHe(r.onToggle,r.onSelect,e),"data-testid":`file-${r.node.id}`,children:[nHe(r.isExpanded,e),oHe(i,e,r.isExpanded,n),aHe(r.node.name)]})}function k0e(){const{fileTree:r,isLoading:e,isFolderExpanded:i,isFolderLoading:n,toggleFolder:t,expandToPath:o}=Lq(),{activePage:a}=u_(),s=kq(),l=G.useRef(null);G.useEffect(()=>{(()=>{var f;if(!r||e||!a||a.type!==fc.FILES)return;const d=(f=a.params)==null?void 0:f.path;d&&d!==l.current&&(l.current=d,o(d))})()},[r,e,a,o]);const u=(c,d)=>{var g;const f=i(c.id),h=n(c.path),p=c.type==="file"&&(a==null?void 0:a.id)===`file:${c.path}`;return R.jsxs("div",{children:[R.jsx(sHe,{node:c,depth:d,isExpanded:f,isActive:p,isLoading:h,onToggle:()=>t(c.id),onSelect:()=>{c.type==="file"&&s(c.path,c.fileType)}}),c.type==="folder"&&f&&R.jsx("div",{children:(g=c.children)==null?void 0:g.map(v=>u(v,d+1))})]},c.id)};return r?e||r.children===void 0?R.jsx("div",{className:"p-4 text-sm text-white/60",children:"Loading files..."}):R.jsx("div",{className:"py-2","data-testid":"file-tree",children:r.children.map(c=>u(c,0))}):R.jsx("div",{className:"p-4 text-sm text-white/60",children:"No files found"})}function lHe(r){return R.jsx("div",{className:"h-full flex items-center justify-center bg-muted/30 rounded-sm border border-border overflow-hidden",children:R.jsx("img",{src:r.url,alt:r.fileName,className:"max-w-full max-h-full object-contain",onError:r.onError})})}function uHe(r){return R.jsx("div",{className:"h-full flex items-center justify-center bg-black rounded-sm border border-border overflow-hidden",children:R.jsx("video",{src:r.url,controls:!0,className:"max-w-full max-h-full",onError:r.onError,children:"Your browser does not support video playback."})})}function cHe(r){return R.jsx("div",{className:"h-full flex flex-col items-center justify-center",children:R.jsxs("div",{className:"p-4 rounded-sm bg-muted/30 border border-border",children:[R.jsx(Fr,{type:sr.FILE_AUDIO,className:"w-16 h-16 text-muted-foreground mb-4 mx-auto"}),R.jsx("audio",{src:r.url,controls:!0,className:"w-full max-w-md",onError:r.onError,children:"Your browser does not support audio playback."})]})})}const dHe="modulepreload",fHe=function(r){return"/"+r},yZ={},mZ=function(e,i,n){let t=Promise.resolve();if(i&&i.length>0){let a=function(u){return Promise.all(u.map(c=>Promise.resolve(c).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),l=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));t=a(i.map(u=>{if(u=fHe(u),u in yZ)return;yZ[u]=!0;const c=u.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${d}`))return;const f=document.createElement("link");if(f.rel=c?"stylesheet":dHe,c||(f.as="script"),f.crossOrigin="",f.href=u,l&&f.setAttribute("nonce",l),document.head.appendChild(f),c)return new Promise((h,p)=>{f.addEventListener("load",h),f.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${u}`)))})}))}function o(a){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=a,window.dispatchEvent(s),!s.defaultPrevented)throw a}return t.then(a=>{for(const s of a||[])s.status==="rejected"&&o(s.reason);return e().catch(o)})};function hHe(r){return r?{text:"plaintext",json:"json",yaml:"yaml",yml:"yaml",javascript:"javascript",js:"javascript",typescript:"typescript",ts:"typescript",xml:"xml",html:"html",css:"css",markdown:"markdown",md:"markdown",python:"python",py:"python"}[r.toLowerCase()]??"plaintext":"plaintext"}const pHe=G.lazy(()=>mZ(()=>import("./monacoEnv-BfStDneo.js"),__vite__mapDeps([0,1,2,3])).then(()=>mZ(()=>import("./ActivitySafeEditor-Cf1NaDwE.js"),__vite__mapDeps([4,1,2])).then(r=>({default:r.ActivitySafeEditor}))));function gHe(){return R.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center min-h-[200px] text-muted-foreground text-sm gap-2",children:[R.jsx(Fr,{type:sr.STATUS_LOADING,className:"w-6 h-6 animate-spin"}),"Loading editor…"]})}function I0e(r){const{isDarkMode:e}=TM(),i=hHe(r.language);return R.jsx("div",{className:`rounded-sm overflow-hidden border border-border bg-muted dark:bg-[#1a1b26] flex flex-col min-h-0 ${r.className}`,children:R.jsx("div",{className:"flex-1 min-h-0 relative",children:R.jsx("div",{className:"absolute inset-0 overflow-hidden",children:R.jsx(G.Suspense,{fallback:R.jsx(gHe,{}),children:R.jsx(pHe,{value:r.text,language:i,theme:e?"vs-dark":"vs-light",options:{readOnly:!0,minimap:{enabled:!0},scrollBeyondLastLine:!1,lineNumbers:"on",wordWrap:"on",folding:!0,automaticLayout:!0}})})})})})}function N0e(r){const e=r+"CollectionProvider",[i,n]=$S(e),[t,o]=i(e,{collectionRef:{current:null},itemMap:new Map}),a=g=>{const{scope:v,children:y}=g,m=An.useRef(null),b=An.useRef(new Map).current;return R.jsx(t,{scope:v,itemMap:b,collectionRef:m,children:y})};a.displayName=e;const s=r+"CollectionSlot",l=NN(s),u=An.forwardRef((g,v)=>{const{scope:y,children:m}=g,b=o(s,y),S=zl(v,b.collectionRef);return R.jsx(l,{ref:S,children:m})});u.displayName=s;const c=r+"CollectionItemSlot",d="data-radix-collection-item",f=NN(c),h=An.forwardRef((g,v)=>{const{scope:y,children:m,...b}=g,S=An.useRef(null),_=zl(v,S),C=o(c,y);return An.useEffect(()=>(C.itemMap.set(S,{ref:S,...b}),()=>void C.itemMap.delete(S))),R.jsx(f,{[d]:"",ref:_,children:m})});h.displayName=c;function p(g){const v=o(r+"CollectionConsumer",g);return An.useCallback(()=>{const m=v.collectionRef.current;if(!m)return[];const b=Array.from(m.querySelectorAll(`[${d}]`));return Array.from(v.itemMap.values()).sort((C,T)=>b.indexOf(C.ref.current)-b.indexOf(T.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:a,Slot:u,ItemSlot:h},p,n]}var vHe=G.createContext(void 0);function F0e(r){const e=G.useContext(vHe);return r||e||"ltr"}var C4="rovingFocusGroup.onEntryFocus",yHe={bubbles:!1,cancelable:!0},zF="RovingFocusGroup",[hY,j0e,mHe]=N0e(zF),[bHe,B0e]=$S(zF,[mHe]),[SHe,_He]=bHe(zF),V0e=G.forwardRef((r,e)=>R.jsx(hY.Provider,{scope:r.__scopeRovingFocusGroup,children:R.jsx(hY.Slot,{scope:r.__scopeRovingFocusGroup,children:R.jsx(PHe,{...r,ref:e})})}));V0e.displayName=zF;var PHe=G.forwardRef((r,e)=>{const{__scopeRovingFocusGroup:i,orientation:n,loop:t=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:c=!1,...d}=r,f=G.useRef(null),h=zl(e,f),p=F0e(o),[g,v]=_M({prop:a,defaultProp:s??null,onChange:l,caller:zF}),[y,m]=G.useState(!1),b=Wv(u),S=j0e(i),_=G.useRef(!1),[C,T]=G.useState(0);return G.useEffect(()=>{const x=f.current;if(x)return x.addEventListener(C4,b),()=>x.removeEventListener(C4,b)},[b]),R.jsx(SHe,{scope:i,orientation:n,dir:p,loop:t,currentTabStopId:g,onItemFocus:G.useCallback(x=>v(x),[v]),onItemShiftTab:G.useCallback(()=>m(!0),[]),onFocusableItemAdd:G.useCallback(()=>T(x=>x+1),[]),onFocusableItemRemove:G.useCallback(()=>T(x=>x-1),[]),children:R.jsx(rs.div,{tabIndex:y||C===0?-1:0,"data-orientation":n,...d,ref:h,style:{outline:"none",...r.style},onMouseDown:an(r.onMouseDown,()=>{_.current=!0}),onFocus:an(r.onFocus,x=>{const A=!_.current;if(x.target===x.currentTarget&&A&&!y){const w=new CustomEvent(C4,yHe);if(x.currentTarget.dispatchEvent(w),!w.defaultPrevented){const L=S().filter(V=>V.focusable),k=L.find(V=>V.active),D=L.find(V=>V.id===g),N=[k,D,...L].filter(Boolean).map(V=>V.ref.current);z0e(N,c)}}_.current=!1}),onBlur:an(r.onBlur,()=>m(!1))})})}),H0e="RovingFocusGroupItem",U0e=G.forwardRef((r,e)=>{const{__scopeRovingFocusGroup:i,focusable:n=!0,active:t=!1,tabStopId:o,children:a,...s}=r,l=Fv(),u=o||l,c=_He(H0e,i),d=c.currentTabStopId===u,f=j0e(i),{onFocusableItemAdd:h,onFocusableItemRemove:p,currentTabStopId:g}=c;return G.useEffect(()=>{if(n)return h(),()=>p()},[n,h,p]),R.jsx(hY.ItemSlot,{scope:i,id:u,focusable:n,active:t,children:R.jsx(rs.span,{tabIndex:d?0:-1,"data-orientation":c.orientation,...s,ref:e,onMouseDown:an(r.onMouseDown,v=>{n?c.onItemFocus(u):v.preventDefault()}),onFocus:an(r.onFocus,()=>c.onItemFocus(u)),onKeyDown:an(r.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){c.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const y=xHe(v,c.orientation,c.dir);if(y!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let b=f().filter(S=>S.focusable).map(S=>S.ref.current);if(y==="last")b.reverse();else if(y==="prev"||y==="next"){y==="prev"&&b.reverse();const S=b.indexOf(v.currentTarget);b=c.loop?EHe(b,S+1):b.slice(S+1)}setTimeout(()=>z0e(b))}}),children:typeof a=="function"?a({isCurrentTabStop:d,hasTabStop:g!=null}):a})})});U0e.displayName=H0e;var CHe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function THe(r,e){return e!=="rtl"?r:r==="ArrowLeft"?"ArrowRight":r==="ArrowRight"?"ArrowLeft":r}function xHe(r,e,i){const n=THe(r.key,i);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return CHe[n]}function z0e(r,e=!1){const i=document.activeElement;for(const n of r)if(n===i||(n.focus({preventScroll:e}),document.activeElement!==i))return}function EHe(r,e){return r.map((i,n)=>r[(e+n)%r.length])}var AHe=V0e,wHe=U0e,pY=["Enter"," "],OHe=["ArrowDown","PageUp","Home"],W0e=["ArrowUp","PageDown","End"],DHe=[...OHe,...W0e],RHe={ltr:[...pY,"ArrowRight"],rtl:[...pY,"ArrowLeft"]},MHe={ltr:["ArrowLeft"],rtl:["ArrowRight"]},WF="Menu",[UN,LHe,kHe]=N0e(WF),[L1,G0e]=$S(WF,[kHe,_H,B0e]),GF=_H(),Y0e=B0e(),[$0e,qS]=L1(WF),[IHe,YF]=L1(WF),q0e=r=>{const{__scopeMenu:e,open:i=!1,children:n,dir:t,onOpenChange:o,modal:a=!0}=r,s=GF(e),[l,u]=G.useState(null),c=G.useRef(!1),d=Wv(o),f=F0e(t);return G.useEffect(()=>{const h=()=>{c.current=!0,document.addEventListener("pointerdown",p,{capture:!0,once:!0}),document.addEventListener("pointermove",p,{capture:!0,once:!0})},p=()=>c.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",p,{capture:!0}),document.removeEventListener("pointermove",p,{capture:!0})}},[]),R.jsx(uq,{...s,children:R.jsx($0e,{scope:e,open:i,onOpenChange:d,content:l,onContentChange:u,children:R.jsx(IHe,{scope:e,onClose:G.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:c,dir:f,modal:a,children:n})})})};q0e.displayName=WF;var NHe="MenuAnchor",Iq=G.forwardRef((r,e)=>{const{__scopeMenu:i,...n}=r,t=GF(i);return R.jsx(mme,{...t,...n,ref:e})});Iq.displayName=NHe;var Nq="MenuPortal",[FHe,X0e]=L1(Nq,{forceMount:void 0}),K0e=r=>{const{__scopeMenu:e,forceMount:i,children:n,container:t}=r,o=qS(Nq,e);return R.jsx(FHe,{scope:e,forceMount:i,children:R.jsx(wg,{present:i||o.open,children:R.jsx(PH,{asChild:!0,container:t,children:n})})})};K0e.displayName=Nq;var Sp="MenuContent",[jHe,Fq]=L1(Sp),Z0e=G.forwardRef((r,e)=>{const i=X0e(Sp,r.__scopeMenu),{forceMount:n=i.forceMount,...t}=r,o=qS(Sp,r.__scopeMenu),a=YF(Sp,r.__scopeMenu);return R.jsx(UN.Provider,{scope:r.__scopeMenu,children:R.jsx(wg,{present:n||o.open,children:R.jsx(UN.Slot,{scope:r.__scopeMenu,children:a.modal?R.jsx(BHe,{...t,ref:e}):R.jsx(VHe,{...t,ref:e})})})})}),BHe=G.forwardRef((r,e)=>{const i=qS(Sp,r.__scopeMenu),n=G.useRef(null),t=zl(e,n);return G.useEffect(()=>{const o=n.current;if(o)return Fme(o)},[]),R.jsx(jq,{...r,ref:t,trapFocus:i.open,disableOutsidePointerEvents:i.open,disableOutsideScroll:!0,onFocusOutside:an(r.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>i.onOpenChange(!1)})}),VHe=G.forwardRef((r,e)=>{const i=qS(Sp,r.__scopeMenu);return R.jsx(jq,{...r,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>i.onOpenChange(!1)})}),HHe=NN("MenuContent.ScrollLock"),jq=G.forwardRef((r,e)=>{const{__scopeMenu:i,loop:n=!1,trapFocus:t,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:h,disableOutsideScroll:p,...g}=r,v=qS(Sp,i),y=YF(Sp,i),m=GF(i),b=Y0e(i),S=LHe(i),[_,C]=G.useState(null),T=G.useRef(null),x=zl(e,T,v.onContentChange),A=G.useRef(0),w=G.useRef(""),L=G.useRef(0),k=G.useRef(null),D=G.useRef("right"),j=G.useRef(0),N=p?yq:G.Fragment,V=p?{as:HHe,allowPinchZoom:!0}:void 0,W=H=>{var pe,_e;const U=w.current+H,I=S().filter(Te=>!Te.disabled),Q=document.activeElement,Z=(pe=I.find(Te=>Te.ref.current===Q))==null?void 0:pe.textValue,ee=I.map(Te=>Te.textValue),ie=QHe(ee,U,Z),de=(_e=I.find(Te=>Te.textValue===ie))==null?void 0:_e.ref.current;(function Te(De){w.current=De,window.clearTimeout(A.current),De!==""&&(A.current=window.setTimeout(()=>Te(""),1e3))})(U),de&&setTimeout(()=>de.focus())};G.useEffect(()=>()=>window.clearTimeout(A.current),[]),wme();const K=G.useCallback(H=>{var I,Q;return D.current===((I=k.current)==null?void 0:I.side)&&tUe(H,(Q=k.current)==null?void 0:Q.area)},[]);return R.jsx(jHe,{scope:i,searchRef:w,onItemEnter:G.useCallback(H=>{K(H)&&H.preventDefault()},[K]),onItemLeave:G.useCallback(H=>{var U;K(H)||((U=T.current)==null||U.focus(),C(null))},[K]),onTriggerLeave:G.useCallback(H=>{K(H)&&H.preventDefault()},[K]),pointerGraceTimerRef:L,onPointerGraceIntentChange:G.useCallback(H=>{k.current=H},[]),children:R.jsx(N,{...V,children:R.jsx(vq,{asChild:!0,trapped:t,onMountAutoFocus:an(o,H=>{var U;H.preventDefault(),(U=T.current)==null||U.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:R.jsx(vH,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:h,children:R.jsx(AHe,{asChild:!0,...b,dir:y.dir,orientation:"vertical",loop:n,currentTabStopId:_,onCurrentTabStopIdChange:C,onEntryFocus:an(l,H=>{y.isUsingKeyboardRef.current||H.preventDefault()}),preventScrollOnEntryFocus:!0,children:R.jsx(bme,{role:"menu","aria-orientation":"vertical","data-state":pbe(v.open),"data-radix-menu-content":"",dir:y.dir,...m,...g,ref:x,style:{outline:"none",...g.style},onKeyDown:an(g.onKeyDown,H=>{const I=H.target.closest("[data-radix-menu-content]")===H.currentTarget,Q=H.ctrlKey||H.altKey||H.metaKey,Z=H.key.length===1;I&&(H.key==="Tab"&&H.preventDefault(),!Q&&Z&&W(H.key));const ee=T.current;if(H.target!==ee||!DHe.includes(H.key))return;H.preventDefault();const de=S().filter(pe=>!pe.disabled).map(pe=>pe.ref.current);W0e.includes(H.key)&&de.reverse(),ZHe(de)}),onBlur:an(r.onBlur,H=>{H.currentTarget.contains(H.target)||(window.clearTimeout(A.current),w.current="")}),onPointerMove:an(r.onPointerMove,zN(H=>{const U=H.target,I=j.current!==H.clientX;if(H.currentTarget.contains(U)&&I){const Q=H.clientX>j.current?"right":"left";D.current=Q,j.current=H.clientX}}))})})})})})})});Z0e.displayName=Sp;var UHe="MenuGroup",Bq=G.forwardRef((r,e)=>{const{__scopeMenu:i,...n}=r;return R.jsx(rs.div,{role:"group",...n,ref:e})});Bq.displayName=UHe;var zHe="MenuLabel",J0e=G.forwardRef((r,e)=>{const{__scopeMenu:i,...n}=r;return R.jsx(rs.div,{...n,ref:e})});J0e.displayName=zHe;var $V="MenuItem",bZ="menu.itemSelect",RH=G.forwardRef((r,e)=>{const{disabled:i=!1,onSelect:n,...t}=r,o=G.useRef(null),a=YF($V,r.__scopeMenu),s=Fq($V,r.__scopeMenu),l=zl(e,o),u=G.useRef(!1),c=()=>{const d=o.current;if(!i&&d){const f=new CustomEvent(bZ,{bubbles:!0,cancelable:!0});d.addEventListener(bZ,h=>n==null?void 0:n(h),{once:!0}),qye(d,f),f.defaultPrevented?u.current=!1:a.onClose()}};return R.jsx(Q0e,{...t,ref:l,disabled:i,onClick:an(r.onClick,c),onPointerDown:d=>{var f;(f=r.onPointerDown)==null||f.call(r,d),u.current=!0},onPointerUp:an(r.onPointerUp,d=>{var f;u.current||(f=d.currentTarget)==null||f.click()}),onKeyDown:an(r.onKeyDown,d=>{const f=s.searchRef.current!=="";i||f&&d.key===" "||pY.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});RH.displayName=$V;var Q0e=G.forwardRef((r,e)=>{const{__scopeMenu:i,disabled:n=!1,textValue:t,...o}=r,a=Fq($V,i),s=Y0e(i),l=G.useRef(null),u=zl(e,l),[c,d]=G.useState(!1),[f,h]=G.useState("");return G.useEffect(()=>{const p=l.current;p&&h((p.textContent??"").trim())},[o.children]),R.jsx(UN.ItemSlot,{scope:i,disabled:n,textValue:t??f,children:R.jsx(wHe,{asChild:!0,...s,focusable:!n,children:R.jsx(rs.div,{role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...o,ref:u,onPointerMove:an(r.onPointerMove,zN(p=>{n?a.onItemLeave(p):(a.onItemEnter(p),p.defaultPrevented||p.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:an(r.onPointerLeave,zN(p=>a.onItemLeave(p))),onFocus:an(r.onFocus,()=>d(!0)),onBlur:an(r.onBlur,()=>d(!1))})})})}),WHe="MenuCheckboxItem",ebe=G.forwardRef((r,e)=>{const{checked:i=!1,onCheckedChange:n,...t}=r;return R.jsx(obe,{scope:r.__scopeMenu,checked:i,children:R.jsx(RH,{role:"menuitemcheckbox","aria-checked":qV(i)?"mixed":i,...t,ref:e,"data-state":Uq(i),onSelect:an(t.onSelect,()=>n==null?void 0:n(qV(i)?!0:!i),{checkForDefaultPrevented:!1})})})});ebe.displayName=WHe;var tbe="MenuRadioGroup",[GHe,YHe]=L1(tbe,{value:void 0,onValueChange:()=>{}}),rbe=G.forwardRef((r,e)=>{const{value:i,onValueChange:n,...t}=r,o=Wv(n);return R.jsx(GHe,{scope:r.__scopeMenu,value:i,onValueChange:o,children:R.jsx(Bq,{...t,ref:e})})});rbe.displayName=tbe;var ibe="MenuRadioItem",nbe=G.forwardRef((r,e)=>{const{value:i,...n}=r,t=YHe(ibe,r.__scopeMenu),o=i===t.value;return R.jsx(obe,{scope:r.__scopeMenu,checked:o,children:R.jsx(RH,{role:"menuitemradio","aria-checked":o,...n,ref:e,"data-state":Uq(o),onSelect:an(n.onSelect,()=>{var a;return(a=t.onValueChange)==null?void 0:a.call(t,i)},{checkForDefaultPrevented:!1})})})});nbe.displayName=ibe;var Vq="MenuItemIndicator",[obe,$He]=L1(Vq,{checked:!1}),abe=G.forwardRef((r,e)=>{const{__scopeMenu:i,forceMount:n,...t}=r,o=$He(Vq,i);return R.jsx(wg,{present:n||qV(o.checked)||o.checked===!0,children:R.jsx(rs.span,{...t,ref:e,"data-state":Uq(o.checked)})})});abe.displayName=Vq;var qHe="MenuSeparator",sbe=G.forwardRef((r,e)=>{const{__scopeMenu:i,...n}=r;return R.jsx(rs.div,{role:"separator","aria-orientation":"horizontal",...n,ref:e})});sbe.displayName=qHe;var XHe="MenuArrow",lbe=G.forwardRef((r,e)=>{const{__scopeMenu:i,...n}=r,t=GF(i);return R.jsx(Sme,{...t,...n,ref:e})});lbe.displayName=XHe;var Hq="MenuSub",[KHe,ube]=L1(Hq),cbe=r=>{const{__scopeMenu:e,children:i,open:n=!1,onOpenChange:t}=r,o=qS(Hq,e),a=GF(e),[s,l]=G.useState(null),[u,c]=G.useState(null),d=Wv(t);return G.useEffect(()=>(o.open===!1&&d(!1),()=>d(!1)),[o.open,d]),R.jsx(uq,{...a,children:R.jsx($0e,{scope:e,open:n,onOpenChange:d,content:u,onContentChange:c,children:R.jsx(KHe,{scope:e,contentId:Fv(),triggerId:Fv(),trigger:s,onTriggerChange:l,children:i})})})};cbe.displayName=Hq;var aN="MenuSubTrigger",dbe=G.forwardRef((r,e)=>{const i=qS(aN,r.__scopeMenu),n=YF(aN,r.__scopeMenu),t=ube(aN,r.__scopeMenu),o=Fq(aN,r.__scopeMenu),a=G.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:l}=o,u={__scopeMenu:r.__scopeMenu},c=G.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return G.useEffect(()=>c,[c]),G.useEffect(()=>{const d=s.current;return()=>{window.clearTimeout(d),l(null)}},[s,l]),R.jsx(Iq,{asChild:!0,...u,children:R.jsx(Q0e,{id:t.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":t.contentId,"data-state":pbe(i.open),...r,ref:gH(e,t.onTriggerChange),onClick:d=>{var f;(f=r.onClick)==null||f.call(r,d),!(r.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),i.open||i.onOpenChange(!0))},onPointerMove:an(r.onPointerMove,zN(d=>{o.onItemEnter(d),!d.defaultPrevented&&!r.disabled&&!i.open&&!a.current&&(o.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{i.onOpenChange(!0),c()},100))})),onPointerLeave:an(r.onPointerLeave,zN(d=>{var h,p;c();const f=(h=i.content)==null?void 0:h.getBoundingClientRect();if(f){const g=(p=i.content)==null?void 0:p.dataset.side,v=g==="right",y=v?-5:5,m=f[v?"left":"right"],b=f[v?"right":"left"];o.onPointerGraceIntentChange({area:[{x:d.clientX+y,y:d.clientY},{x:m,y:f.top},{x:b,y:f.top},{x:b,y:f.bottom},{x:m,y:f.bottom}],side:g}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(d),d.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:an(r.onKeyDown,d=>{var h;const f=o.searchRef.current!=="";r.disabled||f&&d.key===" "||RHe[n.dir].includes(d.key)&&(i.onOpenChange(!0),(h=i.content)==null||h.focus(),d.preventDefault())})})})});dbe.displayName=aN;var fbe="MenuSubContent",hbe=G.forwardRef((r,e)=>{const i=X0e(Sp,r.__scopeMenu),{forceMount:n=i.forceMount,...t}=r,o=qS(Sp,r.__scopeMenu),a=YF(Sp,r.__scopeMenu),s=ube(fbe,r.__scopeMenu),l=G.useRef(null),u=zl(e,l);return R.jsx(UN.Provider,{scope:r.__scopeMenu,children:R.jsx(wg,{present:n||o.open,children:R.jsx(UN.Slot,{scope:r.__scopeMenu,children:R.jsx(jq,{id:s.contentId,"aria-labelledby":s.triggerId,...t,ref:u,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:c=>{var d;a.isUsingKeyboardRef.current&&((d=l.current)==null||d.focus()),c.preventDefault()},onCloseAutoFocus:c=>c.preventDefault(),onFocusOutside:an(r.onFocusOutside,c=>{c.target!==s.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:an(r.onEscapeKeyDown,c=>{a.onClose(),c.preventDefault()}),onKeyDown:an(r.onKeyDown,c=>{var h;const d=c.currentTarget.contains(c.target),f=MHe[a.dir].includes(c.key);d&&f&&(o.onOpenChange(!1),(h=s.trigger)==null||h.focus(),c.preventDefault())})})})})})});hbe.displayName=fbe;function pbe(r){return r?"open":"closed"}function qV(r){return r==="indeterminate"}function Uq(r){return qV(r)?"indeterminate":r?"checked":"unchecked"}function ZHe(r){const e=document.activeElement;for(const i of r)if(i===e||(i.focus(),document.activeElement!==e))return}function JHe(r,e){return r.map((i,n)=>r[(e+n)%r.length])}function QHe(r,e,i){const t=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,o=i?r.indexOf(i):-1;let a=JHe(r,Math.max(o,0));t.length===1&&(a=a.filter(u=>u!==i));const l=a.find(u=>u.toLowerCase().startsWith(t.toLowerCase()));return l!==i?l:void 0}function eUe(r,e){const{x:i,y:n}=r;let t=!1;for(let o=0,a=e.length-1;o<e.length;a=o++){const s=e[o],l=e[a],u=s.x,c=s.y,d=l.x,f=l.y;c>n!=f>n&&i<(d-u)*(n-c)/(f-c)+u&&(t=!t)}return t}function tUe(r,e){if(!e)return!1;const i={x:r.clientX,y:r.clientY};return eUe(i,e)}function zN(r){return e=>e.pointerType==="mouse"?r(e):void 0}var rUe=q0e,iUe=Iq,nUe=K0e,oUe=Z0e,aUe=Bq,sUe=J0e,lUe=RH,uUe=ebe,cUe=rbe,dUe=nbe,fUe=abe,hUe=sbe,pUe=lbe,gUe=cbe,vUe=dbe,yUe=hbe,MH="DropdownMenu",[mUe]=$S(MH,[G0e]),qc=G0e(),[bUe,gbe]=mUe(MH),vbe=r=>{const{__scopeDropdownMenu:e,children:i,dir:n,open:t,defaultOpen:o,onOpenChange:a,modal:s=!0}=r,l=qc(e),u=G.useRef(null),[c,d]=_M({prop:t,defaultProp:o??!1,onChange:a,caller:MH});return R.jsx(bUe,{scope:e,triggerId:Fv(),triggerRef:u,contentId:Fv(),open:c,onOpenChange:d,onOpenToggle:G.useCallback(()=>d(f=>!f),[d]),modal:s,children:R.jsx(rUe,{...l,open:c,onOpenChange:d,dir:n,modal:s,children:i})})};vbe.displayName=MH;var ybe="DropdownMenuTrigger",mbe=G.forwardRef((r,e)=>{const{__scopeDropdownMenu:i,disabled:n=!1,...t}=r,o=gbe(ybe,i),a=qc(i);return R.jsx(iUe,{asChild:!0,...a,children:R.jsx(rs.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...t,ref:gH(e,o.triggerRef),onPointerDown:an(r.onPointerDown,s=>{!n&&s.button===0&&s.ctrlKey===!1&&(o.onOpenToggle(),o.open||s.preventDefault())}),onKeyDown:an(r.onKeyDown,s=>{n||(["Enter"," "].includes(s.key)&&o.onOpenToggle(),s.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});mbe.displayName=ybe;var SUe="DropdownMenuPortal",bbe=r=>{const{__scopeDropdownMenu:e,...i}=r,n=qc(e);return R.jsx(nUe,{...n,...i})};bbe.displayName=SUe;var Sbe="DropdownMenuContent",_be=G.forwardRef((r,e)=>{const{__scopeDropdownMenu:i,...n}=r,t=gbe(Sbe,i),o=qc(i),a=G.useRef(!1);return R.jsx(oUe,{id:t.contentId,"aria-labelledby":t.triggerId,...o,...n,ref:e,onCloseAutoFocus:an(r.onCloseAutoFocus,s=>{var l;a.current||(l=t.triggerRef.current)==null||l.focus(),a.current=!1,s.preventDefault()}),onInteractOutside:an(r.onInteractOutside,s=>{const l=s.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,c=l.button===2||u;(!t.modal||c)&&(a.current=!0)}),style:{...r.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});_be.displayName=Sbe;var _Ue="DropdownMenuGroup",Pbe=G.forwardRef((r,e)=>{const{__scopeDropdownMenu:i,...n}=r,t=qc(i);return R.jsx(aUe,{...t,...n,ref:e})});Pbe.displayName=_Ue;var PUe="DropdownMenuLabel",Cbe=G.forwardRef((r,e)=>{const{__scopeDropdownMenu:i,...n}=r,t=qc(i);return R.jsx(sUe,{...t,...n,ref:e})});Cbe.displayName=PUe;var CUe="DropdownMenuItem",Tbe=G.forwardRef((r,e)=>{const{__scopeDropdownMenu:i,...n}=r,t=qc(i);return R.jsx(lUe,{...t,...n,ref:e})});Tbe.displayName=CUe;var TUe="DropdownMenuCheckboxItem",xUe=G.forwardRef((r,e)=>{const{__scopeDropdownMenu:i,...n}=r,t=qc(i);return R.jsx(uUe,{...t,...n,ref:e})});xUe.displayName=TUe;var EUe="DropdownMenuRadioGroup",AUe=G.forwardRef((r,e)=>{const{__scopeDropdownMenu:i,...n}=r,t=qc(i);return R.jsx(cUe,{...t,...n,ref:e})});AUe.displayName=EUe;var wUe="DropdownMenuRadioItem",OUe=G.forwardRef((r,e)=>{const{__scopeDropdownMenu:i,...n}=r,t=qc(i);return R.jsx(dUe,{...t,...n,ref:e})});OUe.displayName=wUe;var DUe="DropdownMenuItemIndicator",RUe=G.forwardRef((r,e)=>{const{__scopeDropdownMenu:i,...n}=r,t=qc(i);return R.jsx(fUe,{...t,...n,ref:e})});RUe.displayName=DUe;var MUe="DropdownMenuSeparator",xbe=G.forwardRef((r,e)=>{const{__scopeDropdownMenu:i,...n}=r,t=qc(i);return R.jsx(hUe,{...t,...n,ref:e})});xbe.displayName=MUe;var LUe="DropdownMenuArrow",kUe=G.forwardRef((r,e)=>{const{__scopeDropdownMenu:i,...n}=r,t=qc(i);return R.jsx(pUe,{...t,...n,ref:e})});kUe.displayName=LUe;var IUe=r=>{const{__scopeDropdownMenu:e,children:i,open:n,onOpenChange:t,defaultOpen:o}=r,a=qc(e),[s,l]=_M({prop:n,defaultProp:o??!1,onChange:t,caller:"DropdownMenuSub"});return R.jsx(gUe,{...a,open:s,onOpenChange:l,children:i})},NUe="DropdownMenuSubTrigger",Ebe=G.forwardRef((r,e)=>{const{__scopeDropdownMenu:i,...n}=r,t=qc(i);return R.jsx(vUe,{...t,...n,ref:e})});Ebe.displayName=NUe;var FUe="DropdownMenuSubContent",Abe=G.forwardRef((r,e)=>{const{__scopeDropdownMenu:i,...n}=r,t=qc(i);return R.jsx(yUe,{...t,...n,ref:e,style:{...r.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Abe.displayName=FUe;var zq=vbe,Wq=mbe,XV=bbe,Gq=_be,wbe=Pbe,Obe=Cbe,E1=Tbe,jUe=xbe,BUe=IUe,VUe=Ebe,HUe=Abe;const SZ=Nr("flex items-center gap-2 px-3 py-1.5 text-xs outline-none cursor-pointer transition-colors","text-foreground data-[highlighted]:bg-muted rounded-sm");function UUe(r){var i;const e=((i=r.viewModeOptions.find(n=>n.value===r.currentViewMode))==null?void 0:i.label)??r.currentViewMode;return R.jsx("div",{className:"flex-shrink-0 p-0 ps-1 pt-1 pb-2",children:R.jsxs("div",{className:"flex items-center gap-3",children:[R.jsx("div",{className:"min-w-0 flex-1",children:R.jsx("p",{title:r.filePath,className:"text-xs text-muted-foreground font-mono truncate",children:r.filePath})}),R.jsxs(zq,{children:[R.jsx(Wq,{asChild:!0,children:R.jsx("button",{className:Nr("py-0.5 -my-0.5 rounded transition-all","text-muted-foreground hover:bg-muted hover:text-foreground","data-[state=open]:bg-muted data-[state=open]:text-foreground"),children:R.jsx(Fr,{type:sr.NAV_MORE_VERTICAL,className:"w-4 h-4"})})}),R.jsx(XV,{children:R.jsxs(Gq,{align:"end",sideOffset:4,className:"z-50 min-w-[160px] bg-popover border border-border rounded-md shadow-lg p-1 animate-in fade-in-0 zoom-in-95",children:[R.jsxs(BUe,{children:[R.jsxs(VUe,{disabled:r.viewModeOptions.length<=1,title:r.viewModeOptions.length<=1?"There is only one view mode available for this file.":"",className:Nr("flex items-center justify-between px-3 py-1.5 text-xs outline-none cursor-pointer transition-colors","text-popover-foreground data-[highlighted]:bg-muted rounded-sm",r.viewModeOptions.length<=1&&"cursor-not-allowed opacity-50"),children:[R.jsx("span",{children:"View Mode"}),R.jsxs("div",{className:"flex items-center gap-1.5 ml-4",children:[R.jsx("span",{className:"text-muted-foreground",children:e}),R.jsx(Fr,{type:sr.NAV_CHEVRON_RIGHT,className:"w-3 h-3 text-muted-foreground"})]})]}),R.jsx(XV,{children:R.jsx(HUe,{sideOffset:4,className:"z-50 min-w-[140px] bg-popover border border-border rounded-md shadow-lg p-1 animate-in fade-in-0 zoom-in-95",children:r.viewModeOptions.map(n=>R.jsxs(E1,{onSelect:()=>r.onViewModeChange(n.value),className:SZ,children:[n.icon&&R.jsx(Fr,{type:n.icon,className:"w-3.5 h-3.5"}),R.jsx("span",{children:n.label||n.value})]},n.value))})})]}),R.jsx(R.Fragment,{children:R.jsx(E1,{disabled:!r.hasOtherTabs,onSelect:r.onCloseOtherTabs,className:Nr(SZ,!r.hasOtherTabs&&"cursor-not-allowed opacity-50"),children:"Close all other tabs"})})]})})]})]})})}function zUe(r){if(!r)return"text";const e=r.toLowerCase().replace(/^\./,"");return{dbc:"dbc",arxml:"xml",json:"json",yaml:"yaml",yml:"yaml",toml:"toml",platform:"toml",py:"python",ipynb:"json",js:"javascript",ts:"typescript",tsx:"typescript",jsx:"javascript",csv:"csv",xml:"xml",md:"markdown",txt:"text",record:"text",remotivedb:"text"}[e]||"text"}const WUe={[Cf.IMAGE]:Vi.FILE_IMAGE,[Cf.VIDEO]:Vi.FILE_VIDEO,[Cf.AUDIO]:Vi.FILE_AUDIO,[Cf.SIGNAL_DATABASE]:Vi.FILE_DATABASE,[Cf.PLATFORM]:Vi.FILE_PLATFORM,[Cf.INSTANCE]:Vi.FILE_INSTANCE,[Cf.RECORDING]:Vi.FILE_RECORDING,[Cf.RECORDING_SESSION]:Vi.FILE_RECORDING,[Cf.RECORDING_MAPPING]:Vi.FILE_RECORDING,[Cf.DASHBOARD]:Vi.FILE_DASHBOARD},GUe={".py":Vi.FILE_CODE,".ipynb":Vi.FILE_CODE,".js":Vi.FILE_CODE,".ts":Vi.FILE_CODE};function YUe(r,e){if(r){const n=WUe[r];if(n)return n}const i=e==null?void 0:e.toLowerCase();if(i){const n=GUe[i];if(n)return n}return Vi.FILE_GENERIC}function $Ue(r,e){return FF(YUe(r,e))}function qUe(r){if(Cq.has(r))return[];if(Tq.has(r))return[];if(xq.has(r))return[];const e=[];return p0e.has(r)&&e.push("text"),d0e.has(r)&&e.push("platform"),f0e.has(r)&&e.push("instance"),h0e.has(r)&&e.push("dashboard"),e}function XUe(r){return r?xq.has(r)||Cq.has(r)||Tq.has(r):!1}const KUe={text:{label:"Text",iconName:Vi.CONTENT_CODE},platform:{label:"Platform",iconName:Vi.SYSTEM_NETWORK},instance:{label:"Instance",iconName:Vi.SYSTEM_NETWORK},"signal-database":{label:"Table",iconName:Vi.DATA_TABLE},dashboard:{label:"Dashboard",iconName:Vi.FILE_DASHBOARD}};var T4={},ek={},SP={},tk={},rk={},_Z;function Oh(){if(_Z)return rk;_Z=1,Object.defineProperty(rk,"__esModule",{value:!0}),rk.isRealNumber=void 0;function r(e){return!isNaN(e)&&isFinite(e)&&e!==Number.MAX_VALUE&&e!==Number.MIN_VALUE&&e!==Number.NEGATIVE_INFINITY}return rk.isRealNumber=r,rk}var PZ;function ni(){if(PZ)return tk;PZ=1,Object.defineProperty(tk,"__esModule",{value:!0}),tk.Guard=void 0;var r=Oh(),e=(function(){function i(){}return i.notNull=function(n,t){if(n==null)throw new Error("Argument "+t+" must not be undefined")},i.isTrue=function(n,t){if(!n)throw new Error(t)},i.arraysSameLength=function(n,t,o,a){if(this.notNull(n,t),this.notNull(o,a),n.length!==o.length)throw new Error("Arrays ".concat(t," and ").concat(a," must have the same length"))},i.arraysSameLengthArr=function(n){var t=this;if(n===void 0&&(n=[]),n.forEach(function(s){t.notNull(s.arg,s.name)}),n.length>=0){var o=n[0].arg.length,a=n[0].name;n.forEach(function(s){if(s.arg.length!==o)throw new Error("Arrays ".concat(a," and ").concat(s.name," must have the same length"))})}},i.argumentIsRealNumber=function(n,t){if(!(0,r.isRealNumber)(n))throw new Error("Argument ".concat(t,' must be a real number (not infinite, not NAN). Current value="').concat(n,'".'))},i.argumentIsRealInteger=function(n,t){if(!Number.isInteger(n)||!(0,r.isRealNumber)(n))throw new Error("Argument ".concat(t," must be a real integer number (not infinite, not NAN)"))},i})();return tk.Guard=e,tk}var ik={},CZ;function Ii(){if(CZ)return ik;CZ=1,Object.defineProperty(ik,"__esModule",{value:!0}),ik.Point=void 0;var r=(function(){function e(i,n){this.x=i,this.y=n}return e.isEqual=function(i,n){return!((i==null?void 0:i.x)!==(n==null?void 0:n.x)||(i==null?void 0:i.y)!==(n==null?void 0:n.y))},e})();return ik.Point=r,ik}var x4={},TZ;function Ha(){return TZ||(TZ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.getIs3DSurfaceType=r.getIs2DSurfaceType=r.ESurfaceType=void 0;var e;(function(t){t.SciChartSurfaceType="SciChartSurfaceType",t.SciChartPolarSurfaceType="SciChartPolarSurfaceType",t.SciChart3DSurfaceType="SciChart3DSurfaceType",t.SciChartPieSurfaceType="SciChartPieSurfaceType"})(e=r.ESurfaceType||(r.ESurfaceType={}));function i(t){return t===e.SciChartSurfaceType||e.SciChartPolarSurfaceType}r.getIs2DSurfaceType=i;function n(t){return t===e.SciChart3DSurfaceType}r.getIs3DSurfaceType=n})(x4)),x4}var E4={},xZ;function Os(){return xZ||(xZ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EXyDirection=void 0,(function(e){e.XDirection="XDirection",e.YDirection="YDirection",e.XyDirection="XyDirection"})(r.EXyDirection||(r.EXyDirection={}))})(E4)),E4}var A4={},w4={},EZ;function cc(){return EZ||(EZ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.handleInvalidAxisAlignment=r.getIsVertical=r.getIsHorizontal=r.EAxisAlignment=void 0;var e;(function(o){o.Right="Right",o.Left="Left",o.Top="Top",o.Bottom="Bottom"})(e=r.EAxisAlignment||(r.EAxisAlignment={}));var i=function(o){if([e.Bottom,e.Top].includes(o))return!0;if([e.Right,e.Left].includes(o))return!1};r.getIsHorizontal=i;var n=function(o){if((0,r.getIsHorizontal)(o)===!1)return!0;if((0,r.getIsHorizontal)(o)===!0)return!1};r.getIsVertical=n;var t=function(o){throw new Error('Invalid Axis Alignment value: "'.concat(o,'"!'))};r.handleInvalidAxisAlignment=t})(w4)),w4}var AZ;function oo(){return AZ||(AZ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.testPointInTriangle=r.calcDistanceFromLineSegment=r.calcDotProduct=r.testIsInInterval=r.testIsInXBounds=r.calcAnnotationBordersForAxisMarker=r.testIsInBounds=r.calcDistance=r.calcCrossProduct=r.calcDistanceFromLine=void 0;var e=cc(),i=function(p,g,v,y,m,b){return Math.abs((0,r.calcCrossProduct)(v,y,m,b,p,g)/(0,r.calcDistance)(v,y,m,b))};r.calcDistanceFromLine=i;var n=function(p,g,v,y,m,b){return(v-p)*(b-g)-(y-g)*(m-p)};r.calcCrossProduct=n;var t=function(p,g,v,y){var m=p-v,b=g-y;return Math.sqrt(m*m+b*b)};r.calcDistance=t;var o=function(p,g,v,y,m,b,S){return S===void 0&&(S=0),a(p,v-S,m+S)&&a(g,b+S,y-S)};r.testIsInBounds=o;var a=function(p,g,v){return p>=g&&p<=v||p>=v&&p<=g},s=function(p,g,v,y,m,b,S,_,C,T,x,A,w,L){var k={x1:0,x2:0,y1:0,y2:0};return p?g?y.axisAlignment===e.EAxisAlignment.Top?m.axisAlignment===e.EAxisAlignment.Left?(k.x1=b-S.y,k.y1=C-S.y,k.x2=0,k.y2=C+T-S.y):m.axisAlignment===e.EAxisAlignment.Right&&(k.x1=S.width-b+S.y,k.y1=C-S.y,k.x2=S.width,k.y2=C+T-S.y):m.axisAlignment===e.EAxisAlignment.Left?(k.x1=b-S.x+x,k.y1=C-S.y,k.x2=0,k.y2=C+T-S.y):m.axisAlignment===e.EAxisAlignment.Right&&(k.x1=_-x,k.y1=C-S.y,k.x2=S.width,k.y2=C+T-S.y):v&&(y.axisAlignment===e.EAxisAlignment.Top?(k.x1=_+b/2-S.x+A,k.y1=T-S.y+A,k.x2=_-b/2-S.x+A,k.y2=0):(k.x1=_-b/2-S.x+A,k.y1=C-A,k.x2=_+b/2-S.x+A,k.y2=S.height)):g?w?(k.x1=_-b/2+A,k.y1=C+T-S.y,k.x2=_+b/2,k.y2=C):L?(k.x1=_-b/2+x-S.x,k.y1=C-x,k.x2=_+b/2+x-S.x,k.y2=S.height):(k.x1=_-b/2-A,k.y1=C-x,k.x2=_+b/2-A,k.y2=C+T-S.y):v&&(L?(k.x1=b-S.x+A,k.y1=C-T/2,k.x2=0,k.y2=C+T/2):(k.x1=_-A,k.y1=C-T/2-x,k.x2=_+b,k.y2=C+T/2-x)),k};r.calcAnnotationBordersForAxisMarker=s;var l=function(p,g,v){var y=Math.abs(p-g);return y<v};r.testIsInXBounds=l;var u=function(p,g,v,y){return y===void 0&&(y=0),g<=v?g-y<=p&&p<=v+y:v-y<=p&&p<=g+y};r.testIsInInterval=u;var c=function(p,g,v,y,m,b){return(v-p)*(m-v)+(y-g)*(b-y)};r.calcDotProduct=c;var d=function(p,g,v,y,m,b){return(0,r.calcDotProduct)(v,y,m,b,p,g)>0?(0,r.calcDistance)(m,b,p,g):(0,r.calcDotProduct)(m,b,v,y,p,g)>0?(0,r.calcDistance)(v,y,p,g):(0,r.calcDistanceFromLine)(p,g,v,y,m,b)};r.calcDistanceFromLineSegment=d;var f=function(p,g,v,y,m,b){return Math.abs((p*(y-b)+v*(b-g)+m*(g-y))/2)},h=function(p,g,v,y,m,b,S,_){var C=1e-6,T=f(v,y,m,b,S,_),x=f(p,g,m,b,S,_),A=f(v,y,p,g,S,_),w=f(v,y,m,b,p,g);return Math.abs(x+A+w-T)<C};r.testPointInTriangle=h})(A4)),A4}var nk={},ok={},wZ;function Mr(){if(wZ)return ok;wZ=1,Object.defineProperty(ok,"__esModule",{value:!0}),ok.deleteSafe=void 0;function r(e){e==null||e.delete()}return ok.deleteSafe=r,ok}var oc={},OZ;function xf(){if(OZ)return oc;OZ=1,Object.defineProperty(oc,"__esModule",{value:!0}),oc.appendRangeFifo=oc.makeIncArray=oc.isArraySorted=oc.arrayRemove=oc.areArraysEqual=oc.countUnique=oc.getUniqueValues=void 0;function r(s){var l=function(u,c,d){return u==null?!1:d.indexOf(u)===c};return s.filter(l)}oc.getUniqueValues=r;function e(s){return new Set(s).size}oc.countUnique=e;var i=function(s,l){if(s===l)return!0;if((s==null?void 0:s.length)!==(l==null?void 0:l.length))return!1;if(s&&l){for(var u=0;u<s.length;++u)if(s[u]!==l[u])return!1}return!0};oc.areArraysEqual=i;function n(s,l){for(var u=0;u<s.length;u++)if(s[u]===l){s.splice(u,1);break}return s}oc.arrayRemove=n;function t(s,l){l===void 0&&(l=!0);for(var u=!0,c=l?function(f){return s[f]>s[f+1]}:function(f){return s[f]<s[f+1]},d=0;d<s.length-1;d++)if(c(d)){u=!1;break}return u}oc.isArraySorted=t;function o(s,l,u){var c=Array.from(Array(s)).map(function(d,f){return(l??1)*f});return u?c.map(u):c}oc.makeIncArray=o;function a(s,l,u,c){var d=l.length,f=s.length;if(u>=d+f){l.length+=f;for(var h=0;h<f;++h)l[d+h]=s[h]}else if(f>u){var p=f-u,g=s.slice(p);l=g}else if(u>d){var v=u-d;l.length=u;for(var h=0;h<f;++h)h<v?l[d+h]=s[h]:l[v-h]=s[h]}else{var v=f;c+f>u&&(v=u-c);for(var h=0;h<f;++h)h<v?l[c+h]=s[h]:l[v-h]=s[h]}}return oc.appendRangeFifo=a,oc}var O4={},DZ;function mi(){return DZ||(DZ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.webColors=r.parseTArgbToHtmlColor=r.parseArgbToHtmlColor=r.parseColorToTArgb=r.toHex=r.parseColorToUIntAbgr=r.parseColorToUIntArgb=r.parseColorToHexStringAbgr=r.parseColorToHexStringArgb=void 0;function e(h,p){var g=a(h);return"0x"+o(p??g.opacity)+o(g.red)+o(g.green)+o(g.blue)}r.parseColorToHexStringArgb=e;function i(h,p){var g=a(h);return"0x"+o(p||g.opacity)+o(g.blue)+o(g.green)+o(g.red)}r.parseColorToHexStringAbgr=i;function n(h,p){return parseInt(e(h,p),16)}r.parseColorToUIntArgb=n;function t(h,p){return parseInt(i(h,p),16)}r.parseColorToUIntAbgr=t;function o(h){var p=h.toString(16);return p.length===1?"0"+p:p}r.toHex=o;function a(h){if(!h||!h.length||h.length>50)throw Error("'"+h+"' is not a valid color...");var p=h.match(/^#?([0-9a-f]{3})$/i);if(p){var g=p[1],v=255,y=parseInt(g.charAt(0),16)*17,m=parseInt(g.charAt(1),16)*17,b=parseInt(g.charAt(2),16)*17;return u([y,m,b],["red","green","blue"]),{opacity:v,red:y,green:m,blue:b}}var S=h.match(/^#?([0-9a-f]{6})$/i);if(S){var g=S[1],v=255,y=parseInt(g.substr(0,2),16),m=parseInt(g.substr(2,2),16),b=parseInt(g.substr(4,2),16);return u([y,m,b],["red","green","blue"]),{opacity:v,red:y,green:m,blue:b}}var _=h.match(/^#?([0-9a-f]{8})$/i);if(_){var g=_[1],y=parseInt(g.substr(0,2),16),m=parseInt(g.substr(2,2),16),b=parseInt(g.substr(4,2),16),v=parseInt(g.substr(6,2),16);return u([v,y,m,b],["opacity","red","green","blue"]),{opacity:v,red:y,green:m,blue:b}}var C=h.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d*\.?\d*)\s*\)$/i);if(C){var T=parseFloat(C[4]);c(T);var v=d(T),y=parseInt(C[1],10),m=parseInt(C[2],10),b=parseInt(C[3],10);return u([y,m,b],["red","green","blue"]),{opacity:v,red:y,green:m,blue:b}}var x=r.webColors[h.toLowerCase()];if(x)return a(x);throw Error("'"+h+"' is not a valid color...")}r.parseColorToTArgb=a;var s=function(h){var p=h.toString(16),g=p.length;if(g>8)throw new Error("HTML color length cannot be greater than 8");var v=function(b,S){var _=S-b.length,C=new Array(_+1).join("0");return C+b},y=v(p.substr(-6),6),m=v(p.substring(0,p.length-6),2);return"#"+y+m};r.parseArgbToHtmlColor=s;var l=function(h){var p=f(h.red),g=f(h.green),v=f(h.blue),y=f(h.opacity);return("#"+p+g+v+y).toUpperCase()};r.parseTArgbToHtmlColor=l;function u(h,p){h.forEach(function(g,v){var y=p[v];if(g===void 0)throw Error("parseColor error ".concat(y," color should not be null"));if(Number.isNaN(g))throw Error("parseColor error ".concat(y," color should not be NaN"));if(g<0||g>255)throw Error("parseColor error ".concat(y," color should be within [0, 255] range"))})}function c(h){if(h===void 0)throw Error("parseColor error opacity should not be null");if(Number.isNaN(h))throw Error("parseColor error opacity should not be NaN");if(h<0||h>1)throw Error("parseColor error opacity should be within [0, 1] range")}var d=function(h){return h>=1?255:h<=0?0:Math.floor(h*256)},f=function(h){if(h>=256)return"ff";if(h<=0)return"00";var p=h.toString(16);return p.length===1?"0"+p:p};r.webColors={transparent:"#00000000",aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}})(O4)),O4}var ak={},Sf={},RZ;function So(){if(RZ)return Sf;RZ=1;var r={},e;Object.defineProperty(Sf,"__esModule",{value:!0}),Sf.NEUTRAL_COLOR=Sf.EPSILON=Sf.DEFAULT_HEIGHT=Sf.DEFAULT_WIDTH=Sf.IS_TEST_ENV=void 0;var i=!1;return Sf.IS_TEST_ENV=i,typeof process<"u"&&(Sf.IS_TEST_ENV=i=((e=r)===null||e===void 0?void 0:e.TEST_ENV)==="1"),Sf.DEFAULT_WIDTH=900,Sf.DEFAULT_HEIGHT=600,Sf.EPSILON=1e-4,Sf.NEUTRAL_COLOR=4294967295,Sf}var D4={},sk={},lk={},MZ;function Yo(){if(MZ)return lk;MZ=1,Object.defineProperty(lk,"__esModule",{value:!0}),lk.Thickness=void 0;var r=ni(),e=(function(){function i(n,t,o,a){this.top=n,this.right=t,this.bottom=o,this.left=a}return i.fromString=function(n){r.Guard.notNull(n,"str");var t=n.split(" ").map(function(o){return parseFloat(o)});if(t.length!==4)throw new Error("Expected string in the format '1 2 3 4' where values are top, right bottom and left");return new i(t[0],t[1],t[2],t[3])},i.fromNumber=function(n){return new i(n,n,n,n)},i.areEqual=function(n,t){return!n||!t?!1:n.top===t.top&&n.right===t.right&&n.bottom===t.bottom&&n.left===t.left},i.mergeMax=function(n,t){var o=new i(0,0,0,0);return o.top=Math.max(n.top,t.top),o.left=Math.max(n.left,t.left),o.bottom=Math.max(n.bottom,t.bottom),o.right=Math.max(n.right,t.right),o},i.mergeAdd=function(n,t){return new i(n.top+t.top,n.right+t.right,n.bottom+t.bottom,n.left+t.left)},i.mergeSubtract=function(n,t){return new i(n.top-t.top,n.right-t.right,n.bottom-t.bottom,n.left-t.left)},i})();return lk.Thickness=e,lk}var _P={},LZ;function Lf(){if(LZ)return _P;LZ=1;var r=_P&&_P.__spreadArray||function(i,n,t){if(t||arguments.length===2)for(var o=0,a=n.length,s;o<a;o++)(s||!(o in n))&&(s||(s=Array.prototype.slice.call(n,0,o)),s[o]=n[o]);return i.concat(s||Array.prototype.slice.call(n))};Object.defineProperty(_P,"__esModule",{value:!0}),_P.Logger=void 0;var e=(function(){function i(){}return i.log=function(n){for(var t=[],o=1;o<arguments.length;o++)t[o-1]=arguments[o];console.log(n,t)},i.debug=function(n){for(var t=[],o=1;o<arguments.length;o++)t[o-1]=arguments[o];i.enableDebug&&console.debug.apply(console,r([n],t,!1))},i.enableDebug=!1,i})();return _P.Logger=e,_P}var kZ;function k1(){if(kZ)return sk;kZ=1,Object.defineProperty(sk,"__esModule",{value:!0}),sk.labelCache=void 0;var r=Mr(),e=Yo(),i=Lf(),n=new Map,t={},o=0,a=function(x){for(var A in t)if(t.hasOwnProperty(A)){var w=t[A];if(w&&_(x,w.style))return w.uses++,A}o++;var L=o.toString();return t[L]={style:x,uses:1},L},s=function(x){var A=t[x];if(A){A.uses--;var w=t[x];w&&w.uses===0&&h(x)}},l=function(x,A){return"".concat(x,"|:|").concat(A)},u=function(x){var A=x.indexOf("|:|"),w=x.substring(0,A-1),L=x.substring(A+3);return{text:w,styleId:L}},c=function(x,A){var w=l(x,A),L=n.get(w);return L&&(L.lastUsed=Date.now()),L},d=function(x,A,w){var L=l(x,A);n.set(L,w)},f=function(x,A){var w=t[x.toString()];return w?_(w.style,A):!1},h=function(x){for(var A=0,w=Array.from(n.keys());A<w.length;A++){var L=w[A],k=u(L);k.text;var D=k.styleId;if(D===x){var j=n.get(L);n.delete(L);try{(0,r.deleteSafe)(j.bitmapTexture)}catch(N){i.Logger.debug(N)}}}},p=200,g=1e3*60,v=function(){return p},y=function(x){p=x},m=function(){return g},b=function(x){g=x},S=function(){if(n.size>p)try{var x=Math.min(Math.floor(n.size/2),(n.size-p)*2),A=Array.from(n.entries());A.sort(function(j,N){return j[1].lastUsed-N[1].lastUsed});for(var w=0;w<x;w++){var L=A[w],k=L[0],D=L[1];D.bitmapTexture=(0,r.deleteSafe)(D.bitmapTexture),n.delete(k)}}catch(j){console.warn(j)}},_=function(x,A){return x.alignment===A.alignment&&x.multilineAlignment===A.multilineAlignment&&x.color===A.color&&x.fontFamily===A.fontFamily&&x.fontSize===A.fontSize&&x.fontStyle===A.fontStyle&&x.fontWeight===A.fontWeight&&(x.padding===void 0&&A.padding===void 0||e.Thickness.areEqual(x.padding,A.padding))&&x.extras===A.extras&&x.rotation===A.rotation&&x.providerId===A.providerId},C=function(){n.clear();for(var x in t)delete t[x]},T=function(){return n.size};return sk.labelCache={getStyleId:a,freeStyle:s,getLabel:c,setLabel:d,checkStyle:f,getMaxSize:v,setMaxSize:y,getSize:T,getMinAge:m,setMinAge:b,pruneCache:S,resetCache:C},sk}var R4={},IZ;function Rg(){return IZ||(IZ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.getOtherPieDestinations=r.getOther3DDestinations=r.getOther2DDestinations=r.getOther3DMultiChartDestinations=r.getOther2DMultiChartDestinations=r.sciChartPieDestinations=r.sciChart3DSingleDestinations=r.sciChartSingleDestinations=r.sciChart3DDestinations=r.sciChartDestinations=void 0,r.sciChartDestinations=[],r.sciChart3DDestinations=[],r.sciChartSingleDestinations=[],r.sciChart3DSingleDestinations=[],r.sciChartPieDestinations=[];function e(a){return r.sciChartDestinations.filter(function(s){return s.sciChartSurface!==a})}r.getOther2DMultiChartDestinations=e;function i(a){return r.sciChart3DDestinations.filter(function(s){return s.sciChartSurface!==a})}r.getOther3DMultiChartDestinations=i;function n(a){return r.sciChartDestinations.concat(r.sciChartSingleDestinations).filter(function(s){return s.sciChartSurface!==a})}r.getOther2DDestinations=n;function t(a){return r.sciChart3DDestinations.concat(r.sciChart3DSingleDestinations).filter(function(s){return s.sciChartSurface!==a})}r.getOther3DDestinations=t;function o(a){return r.sciChartPieDestinations.filter(function(s){return s.sciChartSurface!==a})}r.getOtherPieDestinations=o})(R4)),R4}var PP={},NZ;function ws(){if(NZ)return PP;NZ=1,Object.defineProperty(PP,"__esModule",{value:!0}),PP.base64Id=PP.generateGuid=void 0;var r=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(i){var n=Math.random()*16|0,t=i==="x"?n:n&3|8;return t.toString(16)})};PP.generateGuid=r;var e=function(i){i===void 0&&(i=22);for(var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t="";t.length<i;){var o=Math.floor(Math.random()*64);t+=n.charAt(o)}return t};return PP.base64Id=e,PP}var FZ;function Yv(){return FZ||(FZ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.MemoryUsageHelper=r.generateIdentifier=r.ObjectRegistry=void 0;var e=k1(),i=Rg(),n=ws(),t=(function(){function s(){var l=this;this.weakMapRegistry=new WeakMap,this.undeletedObjectsMap=new Map,this.uncollectedObjectsMap=new Map,this.finalizationRegistry=new FinalizationRegistry(function(u){l.uncollectedObjectsMap.delete(u),l.onCollect(u)})}return s.prototype.add=function(l,u,c){var d,f;c===void 0&&(c={isWasmObject:!1});var h=c.isWasmObject;this.weakMapRegistry.has(l)&&console.warn("Adding existing entry to the registry!",u),this.undeletedObjectsMap.has(u)&&console.warn("Adding existing entry id to the registry!",u),this.finalizationRegistry.register(l,u),this.weakMapRegistry.set(l,u);var p=(f=(d=c==null?void 0:c.revocableToken)===null||d===void 0?void 0:d.proxy)!==null&&f!==void 0?f:c==null?void 0:c.proxy,g=c==null?void 0:c.revocableToken;p&&this.weakMapRegistry.set(p,u);var v=new WeakRef(l),y=p&&new WeakRef(p),m=g&&new WeakRef(g),b={isWasmObject:h,objectRef:v,proxyRef:y,revocableTokenRef:m};l.delete&&this.undeletedObjectsMap.set(u,b),this.uncollectedObjectsMap.set(u,b)},s.prototype.remove=function(l){return!this.undeletedObjectsMap.has(l)&&!this.uncollectedObjectsMap.has(l)&&console.warn("".concat(l," was not found in the ObjectRegistry!")),this.undeletedObjectsMap.delete(l)},s.prototype.getObjectId=function(l){return this.weakMapRegistry.get(l)},s.prototype.deleteIDeletableObjects=function(){var l=this;this.undeletedObjectsMap.forEach(function(u,c){u.isWasmObject||l.deleteEntry(u,c)})},s.prototype.deleteWasmObjects=function(){var l=this;this.undeletedObjectsMap.forEach(function(u,c){u.isWasmObject&&l.deleteEntry(u,c)})},s.prototype.log=function(){var l=this,u=Array.from(this.undeletedObjectsMap.keys()),c=Array.from(this.uncollectedObjectsMap.keys()),d=u.filter(function(p){return!l.uncollectedObjectsMap.has(p)}),f=c.filter(function(p){return!l.undeletedObjectsMap.has(p)}),h=e.labelCache.getSize();console.log("Object Registry Log Start:"),console.log("undeletedObjectsMap",this.undeletedObjectsMap),console.log("uncollectedObjectsMap",this.uncollectedObjectsMap),console.log("collectedNotDeleted",d),console.log("deletedNotCollected",f),console.log("weakMap",this.weakMapRegistry),console.log("axisLabelCacheSize",h),console.log("Object Registry Log End")},s.prototype.getState=function(){var l=Array.from(this.undeletedObjectsMap.keys()),u=Array.from(this.uncollectedObjectsMap.keys()),c={};return l.length&&(c.undeletedObjectsIds=l),u.length&&(c.uncollectedObjectsIds=u),c},s.prototype.deleteEntry=function(l,u){var c=l.objectRef.deref();c?(c.delete(),this.remove(u)):console.warn("Looks like the ".concat(u," has already been garbage collected, thus the proper cleanup could not be executed!"))},s.prototype.onCollect=function(l){},s})();r.ObjectRegistry=t;var o=function(s){return"".concat(s==null?void 0:s.constructor.name,"_").concat((0,n.generateGuid)())};r.generateIdentifier=o;var a=(function(){function s(){}return Object.defineProperty(s,"isMemoryUsageDebugEnabled",{get:function(){return this.isMemoryUsageDebugEnabledProperty},set:function(l){l&&console.warn("Memory usage debug enabled! Make sure to disable it for production build!")},enumerable:!1,configurable:!0}),s.register=function(l,u){var c;if(!l){console.warn('Registering invalid object "'.concat(l,'"!'));return}(c=s.objectRegistry)===null||c===void 0||c.add(l,u??(0,r.generateIdentifier)(l))},s.unregister=function(l){var u;(u=s.objectRegistry)===null||u===void 0||u.remove(l)},s.destroyMultiChart=function(){i.sciChartDestinations.forEach(function(l){return l.sciChartSurface.delete(!0)}),i.sciChart3DDestinations.forEach(function(l){return l.sciChartSurface.delete(!0)})},s.destroySingleCharts=function(){i.sciChartSingleDestinations.forEach(function(l){return l.sciChartSurface.delete(!0)}),i.sciChart3DSingleDestinations.forEach(function(l){return l.sciChartSurface.delete(!0)})},s.destroyPieCharts=function(){i.sciChartPieDestinations.forEach(function(l){return l.sciChartSurface.delete(!0)})},s.destroyAllCharts=function(){s.destroyMultiChart(),s.destroySingleCharts(),s.destroyPieCharts()},s.isMemoryUsageDebugEnabledProperty=!1,s})();r.MemoryUsageHelper=a})(D4)),D4}var tu={},M4={},jZ;function Dbe(){return jZ||(jZ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EColorMapMode=void 0,(function(e){e.Interpolated="Interpolated",e.Stepped="Stepped"})(r.EColorMapMode||(r.EColorMapMode={}))})(M4)),M4}var BZ;function iu(){if(BZ)return tu;BZ=1,Object.defineProperty(tu,"__esModule",{value:!0}),tu.applyOpacityToHtmlColor=tu.uintArgbColorIsTransparent=tu.uintArgbColorOverrideOpacity=tu.uintArgbColorMultiplyOpacity=tu.uintArgbColorToAbgr=tu.linearColorMapLerp=tu.uintArgbColorLerp=tu.uintArgbColorLerp24bit=void 0;var r=Dbe(),e=mi();function i(c,d,f){var h=16711935,p=4278255360,g=256*f,v=256-g;return(c&h)*v+(d&h)*g>>8&h|(c&p)*v+(d&p)*g>>8&p}tu.uintArgbColorLerp24bit=i;function n(c,d,f){var h=c>>>16,p=(c&65535)>>>0,g=d>>>16,v=(d&65535)>>>0,y=i(h,g,f),m=i(p,v,f);return(y<<16>>>0)+m}tu.uintArgbColorLerp=n;function t(c,d){if(d<c.Minimum)return(0,e.parseColorToUIntArgb)(c.GradientStops[0].color);var f=1/(c.Maximum-c.Minimum),h=(d-c.Minimum)*f,p=c.GradientStops,g=[],v;for(v=1;v<p.length;v++)g.push(1/(p[v].offset-p[v-1].offset));for(v=0;v<p.length-1;v++){var y=p[v],m=p[v+1];if(h>=y.offset&&h<m.offset){if(c.Mode===r.EColorMapMode.Stepped)return(0,e.parseColorToUIntArgb)(y.color);var b=(h-y.offset)*g[v];return n((0,e.parseColorToUIntArgb)(y.color),(0,e.parseColorToUIntArgb)(m.color),b)}}return(0,e.parseColorToUIntArgb)(c.GradientStops[v].color)}tu.linearColorMapLerp=t;function o(c){var d=(c&16711680)>>16,f=(c&65280)>>8,h=c&255,p=c-(c&16777215);return p+=h<<16,p+=f<<8,p+=d,p}tu.uintArgbColorToAbgr=o;function a(c,d){var f=c-(c&16777215);f=f>>>24,f*=d,f=Math.floor(f),f=f*16777216;var h=c&16777215;return f+h}tu.uintArgbColorMultiplyOpacity=a;function s(c,d){var f=d*255;f=Math.floor(f),f=f*16777216;var h=c&16777215;return f+h}tu.uintArgbColorOverrideOpacity=s;function l(c){var d=c-(c&16777215);return d!==4278190080}tu.uintArgbColorIsTransparent=l;function u(c,d){var f=(0,e.parseColorToTArgb)(c);return f.opacity=Math.floor(d*256),(0,e.parseTArgbToHtmlColor)(f)}return tu.applyOpacityToHtmlColor=u,tu}var VZ;function Rbe(){if(VZ)return ak;VZ=1,Object.defineProperty(ak,"__esModule",{value:!0}),ak.createSCRTPen=void 0;var r=So();Yv();var e=iu(),i=mi(),n=function(t,o,a,s,l,u){if(u===void 0&&(u=!0),!(r.IS_TEST_ENV||!o)){var c=(0,e.uintArgbColorMultiplyOpacity)((0,i.parseColorToUIntArgb)(o),s);if(isNaN(c))throw new Error("Color code ".concat(o," cannot be converted to an ARGB integer"));var d=new t.SCRTPenDescriptor;if(d.m_uiColor=c,d.m_fThickness=a,d.m_bAntiAliased=u,l&&l.length){var f=new t.FloatVector;l.forEach(function(p){return f.push_back(p)}),d.SetDashPattern(f)}var h=new t.SCRTPen(d);return d.delete(),h}};return ak.createSCRTPen=n,ak}var CP={},TP={},HZ;function Ba(){if(HZ)return TP;HZ=1,Object.defineProperty(TP,"__esModule",{value:!0}),TP.receiveNextEvent=TP.EventHandler=void 0;var r=(function(){function i(){this.handlers=[]}return i.prototype.subscribe=function(n){this.handlers.includes(n)||this.handlers.push(n)},i.prototype.unsubscribe=function(n){this.handlers=this.handlers.filter(function(t){return t!==n})},i.prototype.unsubscribeAll=function(){this.handlers=[]},i.prototype.raiseEvent=function(n){this.handlers.slice(0).forEach(function(t){return t(n)})},i})();TP.EventHandler=r;function e(i){return new Promise(function(n,t){var o=function(a){try{i.unsubscribe(o),n(a)}catch(s){t(s)}};try{i.subscribe(o)}catch(a){t(a)}})}return TP.receiveNextEvent=e,TP}var om={},Pd={},UZ;function Jn(){if(UZ)return Pd;UZ=1,Object.defineProperty(Pd,"__esModule",{value:!0}),Pd.getSubTypes=Pd.createType=Pd.getFunction=Pd.registerFunction=Pd.registerWasmType=Pd.registerType=void 0;var r=new Map,e=function(s,l,u,c){c===void 0&&(c=!1);var d=s+":"+l;if(r.has(d)&&!c)throw new Error("Type "+d+" is already registered.  Call with overWrite: true if you intended to replace it.");r.set(d,{func:u})};Pd.registerType=e;var i=function(s,l,u,c){c===void 0&&(c=!1);var d=s+":"+l;if(r.has(d)&&!c)throw new Error("Type "+d+" is already registered.  Call with overWrite: true if you intended to replace it.");r.set(d,{wasm:!0,func:u})};Pd.registerWasmType=i;var n=function(s,l,u,c){c===void 0&&(c=!1);var d=s+":"+l;if(r.has(d)&&!c)throw new Error("Function "+d+" is already registered.  Call with overWrite: true if you intended to replace it.");r.set(d,{func:u})};Pd.registerFunction=n;var t=function(s,l){var u=s+":"+l,c=r.get(u);if(c)return c.func;throw new Error("Nothing registered for "+u)};Pd.getFunction=t;var o=function(s,l,u,c){var d=s+":"+l,f=r.get(d);if(f){var h=f.wasm,p=f.func;return h?p(u,c):p(c)}else throw new Error("Nothing registered for "+d)};Pd.createType=o;var a=function(s){var l=Array.from(r.keys());return l.map(function(u){return u.split(":")}).filter(function(u){return u[0]===s}).map(function(u){return u[1]})};return Pd.getSubTypes=a,Pd}var xP={},EP={},zZ;function $v(){if(zZ)return EP;zZ=1,Object.defineProperty(EP,"__esModule",{value:!0}),EP.checkBuildStamp=EP.libraryVersion=void 0;var r="2026-02-02T00:00:00",e;EP.libraryVersion="5.0.178";var i=function(n){if(e!==void 0)return e;if(!n)return!1;if(n.SCRTCredentials.GetBuildStamp){var t=n.SCRTCredentials.GetBuildStamp();if(t===r)return e=!0,e;console.warn("Build stamp diff: JS - ".concat(r,"; WASM - ").concat(t))}return console.warn(`The SciChart webassembly module is from a different version than the javascript that is calling it.
    Ensure that your build process is copying the correct wasm and data files.`),e=!1,e};return EP.checkBuildStamp=i,EP}var uk={},WZ;function Yq(){if(WZ)return uk;WZ=1,Object.defineProperty(uk,"__esModule",{value:!0}),uk.Dictionary=void 0;var r=(function(){function e(){this.items={},this.countProperty=0}return e.prototype.containsKey=function(i){return this.items.hasOwnProperty(i)},Object.defineProperty(e.prototype,"count",{get:function(){return this.countProperty},enumerable:!1,configurable:!0}),e.prototype.add=function(i,n){this.items.hasOwnProperty(i)||this.countProperty++,this.items[i]=n},e.prototype.remove=function(i){var n=this.items[i];return delete this.items[i],this.countProperty--,n},e.prototype.item=function(i){return this.items[i]},Object.defineProperty(e.prototype,"keys",{get:function(){return Object.keys(this.items)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"values",{get:function(){var i=this;return this.keys.map(function(n){return i.items[n]})},enumerable:!1,configurable:!0}),e.prototype.clear=function(){this.items={},this.countProperty=0},e})();return uk.Dictionary=r,uk}var ck={},GZ;function Mbe(){if(GZ)return ck;GZ=1,Object.defineProperty(ck,"__esModule",{value:!0}),ck.localStorageApi=void 0;var r=void 0;function e(){if(r!==void 0)return r;try{var s=window.localStorage,l="__storage_test__";return s.setItem(l,l),s.removeItem(l),r=!0,!0}catch{return r=!1,!1}}function i(){if(e())return localStorage.getItem("LICENSE_DEBUG")==="1"}function n(s){e()&&localStorage.setItem("LICENSE_DEBUG",s?"1":"0")}function t(){e()&&localStorage.removeItem("LICENSE_DEBUG")}function o(){if(e()){var s=localStorage.getItem("LICENSE_WIZARD_PORT"),l=Number(s);if(!isNaN(l))return l}}function a(){if(e()){var s=localStorage.getItem("LICENSE_WIZARD_MAXPORT"),l=Number(s);if(!isNaN(l))return l}}return ck.localStorageApi={storageAvailable:e,getIsLicenseDebug:i,setIsLicenseDebug:n,clearLicensingDebug:t,getLicenseWizardMaxPort:a,getLicenseWizardPort:o},ck}var L4={},dk={},k4={},YZ;function $q(){return YZ||(YZ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.LicenseCheckStatus=r.LicenseType=void 0,(function(e){e[e.NoLicense=0]="NoLicense",e[e.Trial=1]="Trial",e[e.Full=2]="Full",e[e.Full_Expired=3]="Full_Expired",e[e.Trial_Expired=4]="Trial_Expired",e[e.Subscription_Expired=5]="Subscription_Expired",e[e.Invalid_Developer=6]="Invalid_Developer",e[e.Requres_Validation=7]="Requres_Validation",e[e.Invalid=8]="Invalid",e[e.Community=9]="Community"})(r.LicenseType||(r.LicenseType={})),(function(e){e[e.NoLicense=0]="NoLicense",e[e.FetchingFromServer=1]="FetchingFromServer",e[e.StartLookingForLicenseWizard=2]="StartLookingForLicenseWizard",e[e.LookingForLicenseWizard=3]="LookingForLicenseWizard",e[e.ValidatingDeveloperLicense=4]="ValidatingDeveloperLicense",e[e.NoLicenseInWizard=5]="NoLicenseInWizard",e[e.FailedToFindLicenseWizard=6]="FailedToFindLicenseWizard",e[e.FailedToValidateDeveloperLicense=7]="FailedToValidateDeveloperLicense",e[e.DevKeyInRuntimeKey=8]="DevKeyInRuntimeKey",e[e.LicenseOK=9]="LicenseOK"})(r.LicenseCheckStatus||(r.LicenseCheckStatus={}))})(k4)),k4}var $Z;function LH(){if($Z)return dk;$Z=1,Object.defineProperty(dk,"__esModule",{value:!0}),dk.licenseManager2dState=void 0;var r=$q(),e=(function(){function i(){this.isDev=!1,this.orderId="",this.productCode="",this.devCount=1,this.licenseType=r.LicenseType.NoLicense,this.licenseType3D=r.LicenseType.NoLicense,this.telemetryEnabled=!1,this.error=""}return i})();return dk.licenseManager2dState=new e,dk}var am={},qZ;function Lbe(){if(qZ)return am;qZ=1,Object.defineProperty(am,"__esModule",{value:!0}),am.deleteCookie=am.getCookie=am.setCookie=void 0;function r(n,t,o){var a=new Date,s=t;a.setTime(a.getTime()+o*24*60*60*1e3),typeof document<"u"&&(document.cookie=n+"="+s+"; expires="+a.toUTCString()+"; path=/")}am.setCookie=r;function e(n){if(typeof document>"u")return null;var t="; "+document.cookie,o=t.split("; "+n+"=");return o.length===2?o.pop().split(";").shift():""}am.getCookie=e;function i(n){if(!(typeof document>"u")){var t=new Date;t.setTime(t.getTime()+-1440*60*1e3),document.cookie=n+"=; expires="+t.toUTCString()+"; path=/"}}return am.deleteCookie=i,am}var XZ;function uV(){return XZ||(XZ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.sendTelemetry=r.shouldSendTelemetry=r.getUserCookie=void 0;var e=LH(),i=Lbe(),n=$v(),t=So(),o=ws(),a=$q(),s=3600*1e3,l=!1,u=function(h,p,g){var v="".concat(h,",").concat(p,",").concat(g);return(0,i.setCookie)("scUser",v,365)},c=function(){var h=(0,i.getCookie)("scUser");if(h){var p=h.split(",");if(p.length===3)return{userId:p[0],sessionId:p[1],sessionStart:Number.parseInt(p[2],10)}}return{userId:(0,o.base64Id)(),sessionId:(0,o.base64Id)(),sessionStart:0}};r.getUserCookie=c;var d=function(){return!(t.IS_TEST_ENV||l||e.licenseManager2dState.licenseType!==a.LicenseType.Community&&!e.licenseManager2dState.isDev||!e.licenseManager2dState.telemetryEnabled||window&&!window.navigator.onLine)};r.shouldSendTelemetry=d;var f=function(){if((0,r.shouldSendTelemetry)()){var h=(0,r.getUserCookie)(),p=new Date().toISOString();if(!(Date.now()-h.sessionStart<s)){h.sessionId=(0,o.base64Id)(),h.sessionStart=Date.now(),u(h.userId,h.sessionId,h.sessionStart);var g={time:p,iKey:"210b4d64-8147-471e-b6cb-244a2c939455",name:"Microsoft.ApplicationInsights.210b4d648147471eb6cb244a2c939455.Event",tags:{"ai.user.id":h.userId,"ai.session.id":h.sessionId,"ai.device.id":"browser","ai.device.type":"Browser"},data:{baseType:"EventData",baseData:{ver:2,name:"LicenseSet",properties:{platform:"JS",licenseType:e.licenseManager2dState.licenseType,orderId:e.licenseManager2dState.orderId,productCode:e.licenseManager2dState.productCode,isDev:e.licenseManager2dState.isDev,devCount:e.licenseManager2dState.devCount,sciChartVersion:n.libraryVersion},measurements:{}}}};e.licenseManager2dState.licenseType===a.LicenseType.Community&&(g.data.baseData.properties.url=window.location.href);var v="https://dc.services.visualstudio.com/v2/track",y=JSON.stringify([g]);fetch(v,{method:"POST",headers:{"Content-Type":"application/json"},body:y}).catch(function(m){}),l=!0}}};r.sendTelemetry=f})(L4)),L4}var I4={},KZ;function kbe(){return KZ||(KZ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EColor=void 0,(function(e){e.Aqua="#00ffff",e.BackgroundColor="#1c1c1e",e.Blue="#368BC1",e.DarkGreen="#03925e",e.DarkRed="#be0000",e.DarkGrey="#7e8486",e.DefaultGridBandsColor="#202123",e.DefaultTextColor="#c8c7c3",e.DodgerBlue="#1E90FF",e.Green="#228B22",e.LightGrey="#eeeeee",e.LightSteelBlue="#b0c4de",e.LimeGreen="#32CD32",e.Orange="#ff6600",e.OrangeRed="#FF4500",e.Purple="#B200FF",e.Red="#ff0000",e.White="#ffffff",e.Yellow="#FFFF00"})(r.EColor||(r.EColor={}))})(I4)),I4}var ZZ;function EM(){return ZZ||(ZZ=1,(function(r){var e=xP&&xP.__awaiter||function(ct,Qe,Et,Gt){function Xe(Vt){return Vt instanceof Et?Vt:new Et(function(lr){lr(Vt)})}return new(Et||(Et=Promise))(function(Vt,lr){function Jt(zt){try{qt(Gt.next(zt))}catch(jr){lr(jr)}}function kr(zt){try{qt(Gt.throw(zt))}catch(jr){lr(jr)}}function qt(zt){zt.done?Vt(zt.value):Xe(zt.value).then(Jt,kr)}qt((Gt=Gt.apply(ct,Qe||[])).next())})},i=xP&&xP.__generator||function(ct,Qe){var Et={label:0,sent:function(){if(Vt[0]&1)throw Vt[1];return Vt[1]},trys:[],ops:[]},Gt,Xe,Vt,lr;return lr={next:Jt(0),throw:Jt(1),return:Jt(2)},typeof Symbol=="function"&&(lr[Symbol.iterator]=function(){return this}),lr;function Jt(qt){return function(zt){return kr([qt,zt])}}function kr(qt){if(Gt)throw new TypeError("Generator is already executing.");for(;Et;)try{if(Gt=1,Xe&&(Vt=qt[0]&2?Xe.return:qt[0]?Xe.throw||((Vt=Xe.return)&&Vt.call(Xe),0):Xe.next)&&!(Vt=Vt.call(Xe,qt[1])).done)return Vt;switch(Xe=0,Vt&&(qt=[qt[0]&2,Vt.value]),qt[0]){case 0:case 1:Vt=qt;break;case 4:return Et.label++,{value:qt[1],done:!1};case 5:Et.label++,Xe=qt[1],qt=[0];continue;case 7:qt=Et.ops.pop(),Et.trys.pop();continue;default:if(Vt=Et.trys,!(Vt=Vt.length>0&&Vt[Vt.length-1])&&(qt[0]===6||qt[0]===2)){Et=0;continue}if(qt[0]===3&&(!Vt||qt[1]>Vt[0]&&qt[1]<Vt[3])){Et.label=qt[1];break}if(qt[0]===6&&Et.label<Vt[1]){Et.label=Vt[1],Vt=qt;break}if(Vt&&Et.label<Vt[2]){Et.label=Vt[2],Et.ops.push(qt);break}Vt[2]&&Et.ops.pop(),Et.trys.pop();continue}qt=Qe.call(ct,Et)}catch(zt){qt=[6,zt],Xe=0}finally{Gt=Vt=0}if(qt[0]&5)throw qt[1];return{value:qt[0]?qt[1]:void 0,done:!0}}};Object.defineProperty(r,"__esModule",{value:!0}),r.licenseManager=r.getLicenseInfo=r.applyLicense=r.getLicenseCookie=r.setUseLicenseWizard=r.setRuntimeLicenseKey=r.setLicenseCallback=r.setIsDebugLicensing=r.setDependencies=void 0;var n=So(),t=$v(),o=Yq(),a=Rg(),s=Mbe(),l=uV(),u=kbe(),c=$q(),d=Ha(),f=Lbe(),h=LH(),p=24278,g=24279,v=s.localStorageApi.getLicenseWizardPort();v&&(p=v,g=p+1);var y=function(ct){return e(void 0,void 0,void 0,function(){var Gt,Xe,Qe,Et,Gt,Xe;return i(this,function(Vt){switch(Vt.label){case 0:return Vt.trys.push([0,2,,9]),Gt="http://localhost:"+p.toString()+ct,[4,fetch(Gt)];case 1:return Xe=Vt.sent(),[2,Xe];case 2:if(Qe=Vt.sent(),C("Could not connect to license wizard on port "+p.toString()),!(typeof localStorage<"u"))return[3,8];if(Et=s.localStorageApi.getLicenseWizardMaxPort(),!Et)return[3,8];Vt.label=3;case 3:if(!(g<=Et))return[3,8];Vt.label=4;case 4:return Vt.trys.push([4,6,,7]),Gt="http://localhost:"+g.toString()+ct,[4,fetch(Gt)];case 5:return Xe=Vt.sent(),p=g,[2,Xe];case 6:return Vt.sent(),C("Could not connect to license wizard on port "+g.toString()),g=g+1,[3,7];case 7:return[3,3];case 8:throw Qe;case 9:return[2]}})})},m={fetchFromWizard:function(ct){return y(ct)},setCookie:function(ct,Qe,Et){return(0,f.setCookie)(ct,Qe,Et)},getCookie:function(ct){return(0,f.getCookie)(ct)},fetchForChallenge:function(ct){return fetch(ct)},debug:function(ct){return console.log(ct)}},b=function(ct){return m=ct};r.setDependencies=b;var S=null,_=function(ct,Qe){Qe===void 0&&(Qe=!1),S=ct,(Qe||!ct)&&s.localStorageApi.setIsLicenseDebug(ct)};r.setIsDebugLicensing=_;var C=function(ct){S===null&&(S=s.localStorageApi.getIsLicenseDebug()),(n.IS_TEST_ENV||S)&&m.debug(ct)};C("SciChart version "+t.libraryVersion);var T,x=function(ct){T=ct};r.setLicenseCallback=x;var A="",w=function(){return A},L=function(ct){var Qe=A;A=ct,A!==Qe&&A!==""&&ee().forEach(function(Et){return(0,r.applyLicense)(Et,"setRuntimeLicenseKey")})};r.setRuntimeLicenseKey=L;var k=!0,D=function(ct){k=ct};r.setUseLicenseWizard=D;var j=n.IS_TEST_ENV?.1:5,N=n.IS_TEST_ENV?12:10,V="api/license",W=function(ct){V=ct},K=0,H,U,I=function(ct){return e(void 0,void 0,void 0,function(){var Qe,Et,Gt,Xe,Vt,lr;return i(this,function(Jt){switch(Jt.label){case 0:return Jt.trys.push([0,5,,6]),Te!==c.LicenseCheckStatus.StartLookingForLicenseWizard&&Te!==c.LicenseCheckStatus.LookingForLicenseWizard&&Te!==c.LicenseCheckStatus.NoLicenseInWizard?[2]:(C("Trying to get license from local license wizard"),Qe=void 0,[4,m.fetchFromWizard("/license")]);case 1:return Qe=Jt.sent(),Qe.ok?[4,Qe.text()]:[3,3];case 2:return Et=Jt.sent(),Gt=Ke(Et,ct),Xe=Gt.requiresValidation,Vt=Gt.trialExpired,Xe?(C("Got a developer license from local license wizard.  Validating..."),Te=c.LicenseCheckStatus.ValidatingDeveloperLicense,_e(ct)):Vt?(Te=c.LicenseCheckStatus.NoLicenseInWizard,C("No valid license available in licensing wizard. Trying again in ".concat(j," seconds")),H=setTimeout(function(){return I(ct)},j*1e3)):(C("Got a valid license from local license wizard."),Te=c.LicenseCheckStatus.LicenseOK),[3,4];case 3:Te=c.LicenseCheckStatus.NoLicenseInWizard,C("No license available in licensing wizard. Trying again in ".concat(j," seconds")),H=setTimeout(function(){return I(ct)},j*1e3),Jt.label=4;case 4:return[3,6];case 5:return Jt.sent(),Te=c.LicenseCheckStatus.LookingForLicenseWizard,K+=1,K<N?(C("Could not find licensing wizard. Trying again in ".concat(j," seconds")),H=setTimeout(function(){return I(ct)},j*1e3)):(console.log("Failed to connect to licensing wizard. Refresh page to retry."),K=0,Te=c.LicenseCheckStatus.FailedToFindLicenseWizard),[3,6];case 6:return lr=(0,r.getLicenseInfo)(ct),lr.hasChanged&&ie().forEach(function(kr){xt(lr,kr,kr.surfaceType!==d.ESurfaceType.SciChart3DSurfaceType)}),[2]}})})},Q=function(ct,Qe,Et,Gt){var Xe="".concat(ct,",").concat(Qe,",").concat(Et,",").concat(Gt);return m.setCookie("scLicense",Xe,365)},Z=function(){var ct;ct=m.getCookie("scLicense");var Qe=ct.split(",");return Qe.length===4?{key:Qe[0],token:Qe[1],expiry:new Date(Number.parseInt(Qe[2],10)*1e3),lastValidated:new Date(Number.parseInt(Qe[3],10)*1e3)}:{key:Qe[0],token:null,expiry:null,lastValidated:null}};r.getLicenseCookie=Z;var ee=function(){var ct=[];return a.sciChartDestinations.length>0&&ct.push(a.sciChartDestinations[0].sciChartSurface.getLicenseContext()),a.sciChart3DDestinations.length>0&&ct.push(a.sciChart3DDestinations[0].sciChartSurface.getLicenseContext()),a.sciChartSingleDestinations.forEach(function(Qe){return ct.push(Qe.sciChartSurface.getLicenseContext())}),a.sciChart3DSingleDestinations.forEach(function(Qe){return ct.push(Qe.sciChartSurface.getLicenseContext())}),ct},ie=function(){var ct=[];return a.sciChartDestinations.forEach(function(Qe){return ct.push(Qe.sciChartSurface)}),a.sciChart3DDestinations.forEach(function(Qe){return ct.push(Qe.sciChartSurface)}),a.sciChartSingleDestinations.forEach(function(Qe){return ct.push(Qe.sciChartSurface)}),a.sciChart3DSingleDestinations.forEach(function(Qe){return ct.push(Qe.sciChartSurface)}),ct},de=function(ct,Qe){var Et=-1;return Et=Qe.SCRTCredentials.ApplyLicenseResponse(ct),ee().forEach(function(Gt){return Gt.SCRTCredentials.ApplyLicenseResponse(ct)}),Et},pe=0,_e=function(ct){return e(void 0,void 0,void 0,function(){var Qe,Et,Gt,Xe,Vt,lr,Jt,Jt,kr,qt,zt,jr,Be,Ge,ut,Pt,Qt;return i(this,function(wr){switch(wr.label){case 0:if(Qe=ee(),ct===void 0)if(Qe.length>0)ct=Qe[0];else return[2];Et=h.licenseManager2dState.isDev?"license wizard":"server",wr.label=1;case 1:return wr.trys.push([1,11,,12]),Te!==c.LicenseCheckStatus.ValidatingDeveloperLicense?[2]:(C("Attempting to validate license with ".concat(Et)),Gt=ct.SCRTCredentials.GetLicenseChallenge(),Xe=ct.SCRTCredentials.GetOrderId(),Vt=void 0,lr="orderid=".concat(Xe,"&challenge=").concat(Gt),h.licenseManager2dState.isDev?(Jt="/validate?".concat(lr),[4,m.fetchFromWizard(Jt)]):[3,3]);case 2:return Vt=wr.sent(),[3,7];case 3:return typeof T<"u"?[4,T(lr)]:[3,5];case 4:return Vt=wr.sent(),[3,7];case 5:return Jt="/"+V+(V.indexOf("?")>0?"&":"?")+lr,[4,m.fetchForChallenge(Jt)];case 6:Vt=wr.sent(),wr.label=7;case 7:return Vt.ok?[4,Vt.text()]:[3,9];case 8:return kr=wr.sent(),kr.startsWith("Error")?(C("Server rejected the license challenge: "+kr),Te=c.LicenseCheckStatus.FailedToValidateDeveloperLicense):(qt=de(kr,ct),qt>0?(zt=(0,r.getLicenseCookie)().key,zt||(zt=w()),jr=Math.floor(new Date().getTime()/1e3),Q(zt,kr,qt,jr),C("License validated"),Te=c.LicenseCheckStatus.LicenseOK,Be=qt-jr,pe=0,U=setTimeout(function(){Te=c.LicenseCheckStatus.ValidatingDeveloperLicense,h.licenseManager2dState.checkStatus=c.LicenseCheckStatus.ValidatingDeveloperLicense,_e(void 0)},Math.floor(Be*.95*1e3))):(C("license challenge response was invalid: ".concat(kr," ").concat(qt)),Te=c.LicenseCheckStatus.FailedToValidateDeveloperLicense)),[3,10];case 9:if(h.licenseManager2dState.isDev)console.warn("Error during license validation: "+Vt.statusText),Te=c.LicenseCheckStatus.FailedToValidateDeveloperLicense;else throw new Error(Vt.statusText);wr.label=10;case 10:return[3,12];case 11:return wr.sent(),h.licenseManager2dState.isDev?(pe+=1,pe<N?(C("Could not find ".concat(Et,"/").concat(V,". Trying again in ").concat(j," seconds")),U=setTimeout(function(){return _e(ct)},j*1e3)):(ut=(0,r.getLicenseCookie)().expiry,Pt=h.licenseManager2dState.isDev?"Please run the license wizard, ensure your license is activated, then refresh page to retry.":"Please check that the endpoint is configured correctly.",console.error("Failed to connect to ".concat(Et,"/").concat(V,".  ").concat(Pt)),ut&&console.warn("License must be revalidated before ".concat(ut.toLocaleString(),".")),pe=0,new Date>ut&&(Te=c.LicenseCheckStatus.FailedToFindLicenseWizard)),[3,12]):(console.warn("Server license validation failed.  Looking for local developer license"),A="",Te=c.LicenseCheckStatus.NoLicense,ct.SCRTCredentials.ResetRuntimeLicense(),Qe.forEach(function(Xr){return Xr.SCRTCredentials.ResetRuntimeLicense()}),De=!1,h.licenseManager2dState.isDev=!0,Te=c.LicenseCheckStatus.StartLookingForLicenseWizard,Ge=(0,r.getLicenseInfo)(ct),Ge.hasChanged&&ie().forEach(function(Xr){xt(Ge,Xr,Xr.surfaceType!==d.ESurfaceType.SciChart3DSurfaceType)}),I(ct),[2]);case 12:return Qt=(0,r.getLicenseInfo)(ct),Qt.hasChanged&&ie().forEach(function(Xr){xt(Qt,Xr,Xr.surfaceType!==d.ESurfaceType.SciChart3DSurfaceType)}),[2]}})})},Te=c.LicenseCheckStatus.NoLicense,De=!1,Pe=!1,Ee=function(ct,Qe){var Et,Gt,Xe,Vt;C("applyLicense from "+Qe);var lr="",Jt=ct.SCRTCredentials.GetLicenseType();C("Initial license status is "+c.LicenseType[rt(Jt,ct)]);var kr=w();if((Te===c.LicenseCheckStatus.NoLicense||Te===c.LicenseCheckStatus.LicenseOK||Te===c.LicenseCheckStatus.StartLookingForLicenseWizard||Te===c.LicenseCheckStatus.LookingForLicenseWizard)&&kr){C("Runtime license found");var qt=kr.indexOf(";");if(qt>0){var zt=Math.floor(new Date().getTime()/1e3),jr=kr.substring(qt+1);Q(kr.substr(0,qt),jr,zt+60,zt)}else{ct.SCRTCredentials.SetRuntimeLicenseKeyW(kr),Jt=ct.SCRTCredentials.GetLicenseType();var Be=rt(Jt,ct);if(C("Runtime license status is "+c.LicenseType[Be]),Jt===ct.SCRTLicenseType.LICENSE_TYPE_FULL||Jt===ct.SCRTLicenseType.LICENSE_TYPE_TRIAL||Jt===ct.SCRTLicenseType.LICENSE_TYPE_COMMUNITY||Jt===ct.SCRTLicenseType.LICENSE_TYPE_REQUIRES_VALIDATION)De=!0,lr=kr;else{var Ge=ct.SCRTCredentials.GetLicenseErrors();window&&(!((Et=window.location)===null||Et===void 0)&&Et.hostname)&&!(!((Xe=(Gt=window.location)===null||Gt===void 0?void 0:Gt.hostname)===null||Xe===void 0)&&Xe.includes("localhost"))||!Ge.startsWith("License is not valid for this domain")?S?C("Runtime license is invalid: "+Ge):console.warn("Runtime license is invalid.  Call setIsDebugLicensing(true) for details."):C("Runtime license is invalid: "+Ge),lr=""}}}var ut=(0,r.getLicenseCookie)();if(lr===""&&ut&&ut.key!==""?(C("Found license in cookie."),lr=ut.key,ct.SCRTCredentials.SetRuntimeLicenseKeyW(lr),Jt=ct.SCRTCredentials.GetLicenseType(),Jt===ct.SCRTLicenseType.LICENSE_TYPE_FULL||Jt===ct.SCRTLicenseType.LICENSE_TYPE_TRIAL||Jt===ct.SCRTLicenseType.LICENSE_TYPE_REQUIRES_VALIDATION||(C("License cookie is invalid. "+ct.SCRTCredentials.GetLicenseErrors()),(0,f.deleteCookie)("scLicense"),lr="",Jt=ct.SCRTLicenseType.LICENSE_TYPE_COMMUNITY)):Te===c.LicenseCheckStatus.FetchingFromServer&&(Te=c.LicenseCheckStatus.NoLicense),lr!=="")if(Jt===ct.SCRTLicenseType.LICENSE_TYPE_COMMUNITY&&(ct.SCRTCredentials.SetRuntimeLicenseKeyW(lr),Jt=ct.SCRTCredentials.GetLicenseType()),h.licenseManager2dState.isDev=ct.SCRTCredentials.GetAllowDebugging(),Jt===ct.SCRTLicenseType.LICENSE_TYPE_FULL||Jt===ct.SCRTLicenseType.LICENSE_TYPE_TRIAL||Jt===ct.SCRTLicenseType.LICENSE_TYPE_COMMUNITY){if(Te=c.LicenseCheckStatus.LicenseOK,C("license ok"),Jt===ct.SCRTLicenseType.LICENSE_TYPE_COMMUNITY&&De&&!Pe){console.log("Using SciChart Community Edition. To use a license from the License Wizard, remove the call to UseCommunityLicense");var Pt=ct.SCRTCredentials.GetLicenseDaysRemaining();console.log("The community license is valid for 6 months from the date the version in use was released.  This version ".concat(t.libraryVersion," has ").concat(Pt," day").concat(Pt===1?"":"s"," remaining")),Pe=!0}}else if(ct.SCRTCredentials.RequiresValidation())if(C("license requires validation"),De&&h.licenseManager2dState.isDev)ct.SCRTCredentials.ResetRuntimeLicense(),(0,f.deleteCookie)("scLicense"),Te=c.LicenseCheckStatus.DevKeyInRuntimeKey;else if(ut.expiry>new Date&&ut.key===lr){C("current token in cookie");var Qt=de(ut.token,ct);Jt=ct.SCRTCredentials.GetLicenseType(),(Jt===ct.SCRTLicenseType.LICENSE_TYPE_FULL||Jt===ct.SCRTLicenseType.LICENSE_TYPE_TRIAL)&&(Te=c.LicenseCheckStatus.LicenseOK);var zt=Math.floor(new Date().getTime()/1e3);Qt*1e3>ut.expiry.getTime()&&Q(lr,ut.token,Qt,zt);var wr=3600*24,Xr=(new Date().getTime()-ut.lastValidated.getTime())/1e3;C("License expires in ".concat(Qt-zt," seconds.  Last validated ").concat(Xr," seconds ago")),Xr>wr&&Te!==c.LicenseCheckStatus.ValidatingDeveloperLicense?(Te=c.LicenseCheckStatus.ValidatingDeveloperLicense,h.licenseManager2dState.checkStatus=c.LicenseCheckStatus.ValidatingDeveloperLicense,_e(ct)):U===void 0&&(U=setTimeout(function(){Te=c.LicenseCheckStatus.ValidatingDeveloperLicense,h.licenseManager2dState.checkStatus=c.LicenseCheckStatus.ValidatingDeveloperLicense,_e(void 0)},Math.floor((Qt-zt)*.95*1e3)))}else Te===c.LicenseCheckStatus.NoLicense&&(Te=c.LicenseCheckStatus.ValidatingDeveloperLicense,_e(ct));else C("license is invalid: "+ct.SCRTCredentials.GetLicenseErrors());if(C("checkstatus: "+c.LicenseCheckStatus[Te]),Te===c.LicenseCheckStatus.NoLicense){if(Jt===ct.SCRTLicenseType.LICENSE_TYPE_COMMUNITY&&!Pe){console.log("Defaulting to SciChart Community Edition. Usage constitutes acceptance of our EULA and terms at https://www.scichart.com/community-licensing. See https://store.scichart.com for commercial licensing options.");var Pt=ct.SCRTCredentials.GetLicenseDaysRemaining();console.log("The community license is valid for 6 months from the date the version in use was released.  This version ".concat(t.libraryVersion," has ").concat(Pt," day").concat(Pt===1?"":"s"," remaining")),!n.IS_TEST_ENV&&(!((Vt=document==null?void 0:document.location)===null||Vt===void 0)&&Vt.hostname.startsWith("localhost"))&&k&&console.log("SciChart is looking for a paid developer activation from the scichart licensing wizard... To disable this call SciChartSurface.UseCommunityLicense()"),Pe=!0}H===void 0&&k&&(Te=c.LicenseCheckStatus.StartLookingForLicenseWizard,h.licenseManager2dState.isDev=!0,I(ct))}};r.applyLicense=Ee;var Re,je=function(){console.error("Modal not initialized")},Ke=function(ct,Qe){var Et=!1,Gt;return Re&&(Re.style.display="none"),De=!1,Q(ct,null,null,null),Qe.SCRTCredentials.SetRuntimeLicenseKeyW(ct),Et=Qe.SCRTCredentials.RequiresValidation(),Gt=Qe.SCRTCredentials.GetLicenseType()===Qe.SCRTLicenseType.LICENSE_TYPE_TRIAL_EXPIRED,ee().forEach(function(Xe){return Xe.SCRTCredentials.SetRuntimeLicenseKeyW(ct)}),{requiresValidation:Et,trialExpired:Gt}},ot=new o.Dictionary,We=function(ct,Qe){if(!ot.containsKey(ct)){var Et=document.styleSheets;if(Et.length===0){var Gt=document.createElement("style");Gt.appendChild(document.createTextNode("")),document.head.appendChild(Gt)}var Xe=Et[Et.length-1],Vt=Xe.insertRule(Qe,Xe.cssRules.length);ot.add(ct,Vt)}},xe=function(){We("licenseModalClose",`.licenseModalClose {
        color: #aaa;
        float: right;
        font-size: 28px;
        font-weight: bold;
      }`),We("licenseModalClose:hover",`.licenseModalClose:hover {
        color: black;
        text-decoration: none;
        cursor: pointer;
      }`),We("licenseModalClose:focus",`.licenseModalClose:focus {
        color: black;
        text-decoration: none;
        cursor: pointer;
      }`)},ve=function(ct,Qe){Re=document.createElement("div"),Re.id="scichartLicenseModal",Re.style.display="none",Re.style.position="fixed",Re.style.zIndex="100",Re.style.left="0",Re.style.top="0",Re.style.width="100%",Re.style.height="100%",Re.style.overflow="auto",Re.style.backgroundColor="rgb(0,0,0)",Re.style.backgroundColor="rgba(0,0,0,0.4)";var Et=document.createElement("div");Et.style.backgroundColor="#fefefe",Et.style.position="absolute",Et.style.left="50%",Et.style.top="50%",Et.style.transform="translate(-50%, -50%)",Et.style.borderRadius="4px",Et.style.padding="20px",Et.style.maxWidth="460px",Re.appendChild(Et);var Gt=document.createElement("div");Gt.style.display="block",Et.appendChild(Gt);var Xe=document.createElement("div");Xe.style.display="none",Et.appendChild(Xe),je=function(){Re.style.display="block",Gt.style.display="block",Xe.style.display="none"};var Vt=document.createElement("div");Vt.style.display="flex",Vt.style.padding="8px 16px",Vt.style.backgroundColor="#5cb85c",Vt.style.color="white",Gt.appendChild(Vt);var lr=document.createElement("div");lr.style.flexGrow="1",lr.innerHTML=ct,Vt.appendChild(lr),xe();var Jt=document.createElement("span");Jt.innerHTML="&times;",Jt.className="licenseModalClose",Vt.appendChild(Jt);var kr=document.createElement("div");kr.innerHTML=`If you contact support with a licensing issue, we will ask you to send us the license debug log.
    To toggle License debug mode use the button below and refresh the page, then check the console output.  
    When copying the log, make sure to start from the beginning, indicated by the reported version number`;var qt=document.createElement("button");qt.style.margin="10px";var zt=function(){qt.textContent=S?"Disable licensing debug mode":"Enable licensing debug mode"};zt(),qt.onclick=function(){(0,r.setIsDebugLicensing)(!S,!0),zt()},Gt.appendChild(kr),Gt.appendChild(qt);var jr=document.createElement("div");jr.innerHTML=Qe,jr.style.padding="8px 16px",jr.style.backgroundColor="#5cb85c",jr.style.color="white",Gt.appendChild(jr),window.onclick=function(Ge){Ge.target===Re&&(Re.style.display="none")};var Be=document.querySelector("[id='".concat(Re.id,"']"));return Be==null?document.body.appendChild(Re):document.body.replaceChild(Re,Be),Jt.onclick=function(){Re.style.display="none"},Re},he="licenseMessage",Se="licenseMessageChild",be=null,ke=null,qe=function(ct,Qe){if(ct){var Et=Qe.cloneNode(!0),Gt=Array.from(ct.children).find(function(Xe){return Xe.className===he});Gt?ct.replaceChild(Et,Gt):ct.appendChild(Et),k&&(Et.onclick=je)}},rt=function(ct,Qe){var Et=c.LicenseType.NoLicense;switch(ct){case Qe.SCRTLicenseType.LICENSE_TYPE_NO_LICENSE:{Et=c.LicenseType.NoLicense;break}case Qe.SCRTLicenseType.LICENSE_TYPE_TRIAL:{Et=c.LicenseType.Trial;break}case Qe.SCRTLicenseType.LICENSE_TYPE_COMMUNITY:{Et=c.LicenseType.Community;break}case Qe.SCRTLicenseType.LICENSE_TYPE_FULL:{Et=c.LicenseType.Full;break}case Qe.SCRTLicenseType.LICENSE_TYPE_FULL_EXPIRED:{Et=c.LicenseType.Full_Expired;break}case Qe.SCRTLicenseType.LICENSE_TYPE_TRIAL_EXPIRED:{Et=c.LicenseType.Trial_Expired;break}case Qe.SCRTLicenseType.LICENSE_TYPE_SUBSCRIPTION_EXPIRED:{Et=c.LicenseType.Subscription_Expired;break}case Qe.SCRTLicenseType.LICENSE_TYPE_INVALID_DEVELOPER_LICENSE:{Et=c.LicenseType.Invalid_Developer;break}case Qe.SCRTLicenseType.LICENSE_TYPE_REQUIRES_VALIDATION:{Et=c.LicenseType.Requres_Validation;break}case Qe.SCRTLicenseType.LICENSE_TYPE_INVALID_LICENSE:{Et=c.LicenseType.Invalid;break}}return Et},St=function(ct){var Qe=ct.SCRTCredentials.GetLicenseType(),Et=rt(Qe,ct),Gt=ct.SCRTCredentials.GetLicenseDaysRemaining(),Xe=!1;if(Te!==h.licenseManager2dState.checkStatus||Et!==h.licenseManager2dState.licenseType){Xe=!0,C("License status updated ".concat(c.LicenseCheckStatus[Te]," ").concat(c.LicenseType[Et])),Et===c.LicenseType.Community?h.licenseManager2dState.orderId="Community":h.licenseManager2dState.orderId=ct.SCRTCredentials.GetEncryptedOrderId(),h.licenseManager2dState.productCode=ct.SCRTCredentials.GetProductCode(),h.licenseManager2dState.licenseType=Et,h.licenseManager2dState.checkStatus=Te,h.licenseManager2dState.devCount=ct.SCRTCredentials.GetDeveloperCount();var Vt=rt(ct.SCRTCredentials.HasFeature("JS-3D"),ct);Et!==c.LicenseType.Full&&Et!==c.LicenseType.Trial&&(Vt=Et),h.licenseManager2dState.licenseType3D=Vt;var lr=ct.SCRTCredentials.GetLicenseErrors();h.licenseManager2dState.error=lr;var Jt=ct.SCRTCredentials.HasFeature("TE");h.licenseManager2dState.telemetryEnabled=Jt===ct.SCRTLicenseType.LICENSE_TYPE_FULL||Jt===ct.SCRTLicenseType.LICENSE_TYPE_TRIAL,S&&C(ct.SCRTCredentials.Dump())}return{hasChanged:Xe,licenseType:Et,licenseType3D:h.licenseManager2dState.licenseType3D,daysRemaining:Gt,error:h.licenseManager2dState.error}};r.getLicenseInfo=St;var xt=function(ct,Qe,Et,Gt){var Xe;Gt===void 0&&(Gt=!1),be==null&&(be=document.createElement("div"),be.className=he,ke=document.createElement("div"),ke.className=Se,ke.innerHTML="",be.appendChild(ke));var Vt="",lr="",Jt="",kr=ct.hasChanged,qt=ct.licenseType,zt=ct.licenseType3D,jr=ct.daysRemaining,Be=ct.error;if(kr||Gt||Te==c.LicenseCheckStatus.LicenseOK&&qt!==zt){C("updateLicenseDisplay for ".concat((Xe=Qe.domChartRoot)===null||Xe===void 0?void 0:Xe.id));var Ge=Et?qt:zt;if(Qe.invalidateElement(),Ge===c.LicenseType.Community&&Te===c.LicenseCheckStatus.StartLookingForLicenseWizard)return;var ut=!Et&&qt!==zt,Pt='<a href="https://www.scichart.com/licensing-scichart-js"  target="_blank" style="color: white">www.scichart.com/licensing-scichart-js</a>',Qt='<a href="https://www.scichart.com/contact-us/"  target="_blank" style="color: orange">contact support</a>';Ge===c.LicenseType.NoLicense?(Vt="You need to have a license to use SciChart.  ",Jt="Instructions can be seen at ".concat(Pt)):Ge===c.LicenseType.Invalid?(Be.startsWith("License is not valid for this domain")?Vt=`Sorry! The runtime license key is not valid for this domain</br>
                Please `.concat(Qt,` with your OrderID if you believe this to be incorrect. <u>Click for more information</u></br>
                For local development, make sure the Licensing Wizard is running and activated.</br>
                To use Community Edition, remove the call to setRuntimeLicenseKey`):Be.startsWith("This version of SciChart can no longer be trialed")?Vt="Sorry! This version of SciChart is too old to be trialed.  Please update to the latest version":Be.startsWith("This version of SciChart can no longer be used for the community edition")?Vt="Sorry! This version of SciChart is too old to be used for the community edition.  Please update to the latest version":ut?Vt="Sorry! Your license is for ".concat(h.licenseManager2dState.productCode," which does not support 3D Charts."):Vt="Sorry! Your license key appears to be invalid</br>Please ".concat(Qt," with your OrderID if you believe this to be incorrect."),Jt="Instructions can be seen at ".concat(Pt)):Ge===c.LicenseType.Invalid_Developer?(Vt="Sorry! You need a developer license to use SciChart on a domain not included in your runtime key.",Jt="Instructions can be seen at ".concat(Pt,`</br>
                    Please `).concat(Qt," with your OrderID if you are experiencing issues.")):Ge===c.LicenseType.Requres_Validation?(h.licenseManager2dState.isDev?Vt="Your developer license must be validated by the SciChart Licensing Wizard running locally":Vt="This runtime key must be validated by a server side key.",Jt="Instructions can be seen at ".concat(Pt,`</br>
                    Please `).concat(Qt," with your OrderID if you are experiencing issues.")):Ge===c.LicenseType.Subscription_Expired?(Vt="Sorry! Your support subscription has expired.<br>",Jt="Please ".concat(Qt," if you would like to renew your subscription.")):Ge===c.LicenseType.Trial_Expired&&jr<1?(Vt="Sorry! Your trial has expired.",Jt="Please ".concat(Qt," if you require an extension.")):Ge===c.LicenseType.Trial_Expired&&jr>1?(Vt="This version is too old to trial.",Jt="Please ".concat(Qt," if you require an extension.")):Ge===c.LicenseType.Trial&&jr<=7?Vt="You have ".concat(jr," day").concat(jr===1?"":"s"," remaining of the trial."):Ge===c.LicenseType.Community&&jr<=7?Vt="You have ".concat(jr," day").concat(jr===1?"":"s"," remaining on the community license for this version.  Please update to the latest version of SciChart"):(Ge===c.LicenseType.Full||(Ge===c.LicenseType.Trial||Ge===c.LicenseType.Community)&&jr>7)&&(be.style.display="none",ke.innerHTML=""),Te!==c.LicenseCheckStatus.LicenseOK||ut?(Te===c.LicenseCheckStatus.FetchingFromServer?lr="<br>Fetching license from server...":Te===c.LicenseCheckStatus.LookingForLicenseWizard?(Ge===c.LicenseType.Community&&(0,l.sendTelemetry)(),lr="<br>Looking for Licensing Wizard..."):Te===c.LicenseCheckStatus.FailedToFindLicenseWizard?h.licenseManager2dState.isDev?lr="<br><u>Could not connect to the Licensing Wizard.  Please run it, then reload this page.</u>":lr="<br><u>Could not connect to the server licensing endpoint</u>":Te===c.LicenseCheckStatus.ValidatingDeveloperLicense?h.licenseManager2dState.isDev?lr="<br><u>Trying to validate your license...":lr="<br><u>Trying to validate your license with the server...</u>.":Te===c.LicenseCheckStatus.FailedToValidateDeveloperLicense?h.licenseManager2dState.isDev?lr="<br><u>Failed to validate your developer license with the Licensing Wizard.  If you have changed your activated license, try clearing your cookies for this site.</u>.":lr="<br><u>Failed to validate the runtime license with the server</u>.":Te===c.LicenseCheckStatus.NoLicenseInWizard&&Ge===c.LicenseType.NoLicense?lr="<br><u>Please use the Licensing wizard to start a trial or activate a serial key.  Click for more information</u>.":Te===c.LicenseCheckStatus.DevKeyInRuntimeKey?lr="<br><u>You have set a developer key as a runtime key, which will not work on any other machine.  Click for more information</u>":Ge===c.LicenseType.Trial_Expired&&jr>1?lr="<br><u>Please update to the latest version of SciChart. Click for more information</u>.":Te===c.LicenseCheckStatus.NoLicenseInWizard&&Ge===c.LicenseType.Trial_Expired&&(lr="<br><u>Please activate a serial key in the Licensing Wizard, or contact sales for an extension.  Click for more information</u>."),Vt&&(be.style.width="100%",be.style.height="100%",be.style.top="0",be.style.left="0",be.style.position="absolute",be.style.pointerEvents="auto",be.style.cursor="pointer",be.style.background=u.EColor.BackgroundColor,be.style.zIndex="10",be.style.display="block",ke.style.display="block",ke.style.color="orange",ke.style.width="80%",ke.style.position="absolute",ke.style.left="50%",ke.style.top="50%",ke.style.transform="translate(-50%, -50%)",ke.style.textAlign="center",ke.style.pointerEvents="auto",k?(ke.innerHTML=Vt+lr,ve(Vt,Jt)):ke.innerHTML=Vt+'<br><a href="https://www.scichart.com/licensing-scichart-js/"  target="_blank" style="color: white">Click here for licensing information</a>',C(Vt+`
`+lr))):(0,l.sendTelemetry)()}qe(Qe.domDivContainer,be)},It=function(){!a.sciChartDestinations.length&&!a.sciChartSingleDestinations.length&&!a.sciChart3DDestinations.length&&(clearTimeout(H),clearTimeout(U),ke=null,be=null)},Zt=function(ct){var Qe=(0,r.getLicenseInfo)(ct.getLicenseContext()),Et=ct.surfaceType!==d.ESurfaceType.SciChart3DSurfaceType;xt(Qe,ct,Et,!0)};r.licenseManager={clear:It,setRuntimeLicenseKey:function(ct){return(0,r.setRuntimeLicenseKey)(ct)},setIsDebugLicensing:function(ct){return(0,r.setIsDebugLicensing)(ct)},setLicenseCallback:function(ct){return(0,r.setLicenseCallback)(ct)},setServerLicenseEndpoint:function(ct){return W(ct)},applyLicense:function(ct,Qe){return(0,r.applyLicense)(ct,Qe)},updateLicenseDisplay:function(ct){return Zt(ct)}}})(xP)),xP}var AP={},sm={},fk={},JZ;function Ibe(){if(JZ)return fk;JZ=1,Object.defineProperty(fk,"__esModule",{value:!0}),fk.ModifierArgsBase=void 0;var r=(function(){function e(){this.handled=!1}return e})();return fk.ModifierArgsBase=r,fk}var QZ;function Nbe(){if(QZ)return sm;QZ=1;var r=sm&&sm.__extends||(function(){var s=function(l,u){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(c[f]=d[f])},s(l,u)};return function(l,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");s(l,u);function c(){this.constructor=l}l.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}})(),e=sm&&sm.__assign||function(){return e=Object.assign||function(s){for(var l,u=1,c=arguments.length;u<c;u++){l=arguments[u];for(var d in l)Object.prototype.hasOwnProperty.call(l,d)&&(s[d]=l[d])}return s},e.apply(this,arguments)};Object.defineProperty(sm,"__esModule",{value:!0}),sm.ModifierMouseArgs=void 0;var i=ni(),n=Ii(),t=Hi(),o=Ibe(),a=(function(s){r(l,s);function l(u,c){var d=this,f;return d=s.call(this)||this,d.isActiveSubChartEvent=!0,d.mousePoint=u,d.button=c==null?void 0:c.button,d.mouseWheelDelta=(f=c==null?void 0:c.mouseWheelDelta)!==null&&f!==void 0?f:0,d.pointerId=c==null?void 0:c.pointerId,d.pointerType=c==null?void 0:c.pointerType,d.target=c==null?void 0:c.target,d.isMaster=c==null?void 0:c.isMaster,d.modifierGroup=c==null?void 0:c.modifierGroup,d.shiftKey=c==null?void 0:c.shiftKey,d.altKey=c==null?void 0:c.altKey,d.ctrlKey=c==null?void 0:c.ctrlKey,d.nativeEvent=c==null?void 0:c.nativeEvent,d}return l.fromMouseEvent=function(u){i.Guard.notNull(u,"mouseEvent");var c=new n.Point(u.offsetX*t.DpiHelper.PIXEL_RATIO,u.offsetY*t.DpiHelper.PIXEL_RATIO),d={target:u.target,isMaster:!0,shiftKey:u.shiftKey,ctrlKey:u.ctrlKey,altKey:u.altKey,nativeEvent:u};return new l(c,d)},l.fromWheelEvent=function(u){i.Guard.notNull(u,"wheelEvent");var c=new n.Point(u.offsetX*t.DpiHelper.PIXEL_RATIO,u.offsetY*t.DpiHelper.PIXEL_RATIO),d={mouseWheelDelta:u.deltaY,target:u.target,isMaster:!0,shiftKey:u.shiftKey,ctrlKey:u.ctrlKey,altKey:u.altKey,nativeEvent:u};return new l(c,d)},l.fromPointerEvent=function(u){i.Guard.notNull(u,"pointerEvent");var c=new n.Point(u.offsetX*t.DpiHelper.PIXEL_RATIO,u.offsetY*t.DpiHelper.PIXEL_RATIO),d={button:u.button,pointerId:u.pointerId,pointerType:u.pointerType,target:u.target,isMaster:!0,shiftKey:u.shiftKey,ctrlKey:u.ctrlKey,altKey:u.altKey,nativeEvent:u};return new l(c,d)},l.copy=function(u,c,d,f,h){var p=u.mousePoint;if(d&&f){var g=u.mousePoint.x-d.x,v=u.mousePoint.y-d.y,y=f.width/d.width,m=f.height/d.height;p=new n.Point(f.x+g*y,f.y+v*m)}return e(e({},u),{isMaster:!1,masterData:h,handled:!1,modifierGroup:c,mousePoint:p})},l.copyForSubChart=function(u,c,d,f,h){var p=u.mousePoint;if(d&&f){var g=f.width/d.width,v=f.height/d.height;p=new n.Point((u.mousePoint.x-d.x)*g+f.x,(u.mousePoint.y-d.y)*v+f.y)}return e(e({},u),{isMaster:!1,masterData:h,handled:!1,modifierGroup:c,mousePoint:p})},l})(o.ModifierArgsBase);return sm.ModifierMouseArgs=a,sm}var hk={},eJ;function ca(){return eJ||(eJ=1,(function(r){var e=hk&&hk.__rest||function(a,s){var l={};for(var u in a)Object.prototype.hasOwnProperty.call(a,u)&&s.indexOf(u)<0&&(l[u]=a[u]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,u=Object.getOwnPropertySymbols(a);c<u.length;c++)s.indexOf(u[c])<0&&Object.prototype.propertyIsEnumerable.call(a,u[c])&&(l[u[c]]=a[u[c]]);return l};Object.defineProperty(r,"__esModule",{value:!0}),r.runAfterFramePaint=r.PerformanceDebugHelper=r.EPerformanceDebugLevel=r.EPerformanceMarkType=void 0;var i=ws();(function(a){a.InitializationStart="InitializationStart",a.InitializationEnd="InitializationEnd",a.EngineInitStart="EngineInitStart",a.EngineInitEnd="EngineInitEnd",a.LeadingInvalidate="LeadingInvalidate",a.Invalidate="Invalidate",a.DataUpdateStart="DataUpdateStart",a.DataUpdateEnd="DataUpdateEnd",a.RenderStart="RenderStart",a.RenderEnd="RenderEnd",a.Rendered="Rendered",a.FullStateRendered="FullStateRendered",a.Painted="Painted",a.Resize="Resize",a.DpiChange="DpiChange",a.SetupStart="SetupStart",a.SetupEnd="SetupEnd",a.CanvasInitializationStart="CanvasInitializationStart",a.CanvasInitializationEnd="CanvasInitializationEnd",a.AddSubSurfaceStart="AddSubSurfaceStart",a.AddSubSurfaceEnd="AddSubSurfaceEnd",a.RenderSurfaceDrawStart="RenderSurfaceDrawStart",a.RenderSurfaceDrawEnd="RenderSurfaceDrawEnd",a.DrawingLoopStart="DrawingLoopStart",a.DrawingLoopEnd="DrawingLoopEnd",a.CopyToCanvasStart="CopyToCanvasStart",a.CopyToCanvasEnd="CopyToCanvasEnd",a.GenericAnimationStart="GenericAnimationStart",a.GenericAnimationEnd="GenericAnimationEnd",a.AutoRangeStart="AutoRangeStart",a.AutoRangeEnd="AutoRangeEnd",a.LayoutStart="LayoutStart",a.LayoutEnd="LayoutEnd",a.GetTicksStart="GetTicksStart",a.GetTicksEnd="GetTicksEnd",a.DrawAxisBorderStart="DrawAxisBorderStart",a.DrawAxisBorderEnd="DrawAxisBorderEnd",a.DrawAxisBandsStart="DrawAxisBandsStart",a.DrawAxisBandsEnd="DrawAxisBandsEnd",a.DrawMinorGridLinesStart="DrawMinorGridLinesStart",a.DrawMinorGridLinesEnd="DrawMinorGridLinesEnd",a.DrawMajorGridLinesStart="DrawMajorGridLinesStart",a.DrawMajorGridLinesEnd="DrawMajorGridLinesEnd",a.DrawAxisBackgroundStart="DrawAxisBackgroundStart",a.DrawAxisBackgroundEnd="DrawAxisBackgroundEnd",a.DrawAxisLabelsStart="DrawAxisLabelsStart",a.DrawAxisLabelsEnd="DrawAxisLabelsEnd",a.DrawMinorTicksStart="DrawMinorTicksStart",a.DrawMinorTicksEnd="DrawMinorTicksEnd",a.DrawMajorTicksStart="DrawMajorTicksStart",a.DrawMajorTicksEnd="DrawMajorTicksEnd",a.DrawNativeTextStart="DrawNativeTextStart",a.DrawNativeTextEnd="DrawNativeTextEnd",a.DrawAnnotationStart="DrawAnnotationStart",a.DrawAnnotationEnd="DrawAnnotationEnd",a.ResampleSingleSeriesStart="ResampleSingleSeriesStart",a.ResampleSingleSeriesEnd="ResampleSingleSeriesEnd",a.DrawSingleSeriesStart="DrawSingleSeriesStart",a.DrawSingleSeriesEnd="DrawSingleSeriesEnd",a.DrawCollectionSeriesStart="DrawCollectionSeriesStart",a.DrawCollectionSeriesEnd="DrawCollectionSeriesEnd",a.PerformTextLayoutStart="PerformTextLayoutStart",a.PerformTextLayoutEnd="PerformTextLayoutEnd",a.DrawDataLabelsStart="DrawDataLabelsStart",a.DrawDataLabelsEnd="DrawDataLabelsEnd",a.SingleLayerDrawStart="SingleLayerDrawStart",a.SingleLayerDrawEnd="SingleLayerDrawEnd",a.AllLayersDrawStart="AllLayersDrawStart",a.AllLayersDrawEnd="AllLayersDrawEnd",a.PostDrawActionsStart="PostDrawActionsStart",a.PostDrawActionsEnd="PostDrawActionsEnd",a.PointerMoveStart="PointerMoveStart",a.PointerMoveEnd="PointerMoveEnd",a.PointerDownStart="PointerDownStart",a.PointerDownEnd="PointerDownEnd",a.PointerUpStart="PointerUpStart",a.PointerUpEnd="PointerUpEnd",a.ScrollStart="ScrollStart",a.ScrollEnd="ScrollEnd",a.DoubleClickStart="DoubleClickStart",a.DoubleClickEnd="DoubleClickEnd",a.MouseLeaveStart="MouseLeaveStart",a.MouseLeaveEnd="MouseLeaveEnd",a.MouseEnterStart="MouseEnterStart",a.MouseEnterEnd="MouseEnterEnd",a.PaletteProviderStart="PaletteProviderStart",a.PaletteProviderEnd="PaletteProviderEnd",a.GenerateDataLabelsStart="GenerateDataLabelsStart",a.GenerateDataLabelsEnd="GenerateDataLabelsEnd",a.RenderDataTransformStart="RenderDataTransformStart",a.RenderDataTransformEnd="RenderDataTransformEnd",a.DataFilterStart="DataFilterStart",a.DataFilterEnd="DataFilterEnd",a.AccumulatedVectorStart="AccumulatedVectorStart",a.AccumulatedVectorEnd="AccumulatedVectorEnd"})(r.EPerformanceMarkType||(r.EPerformanceMarkType={}));var n;(function(a){a[a.Info=0]="Info",a[a.Verbose=1]="Verbose"})(n=r.EPerformanceDebugLevel||(r.EPerformanceDebugLevel={}));var t=(function(){function a(){this.separator="_"}return a.mark=function(s,l){if(a.enableDebug){var u=a.instance.addMark(s,l),c=s.replace("End","Start");return s.includes("End")&&(a.measuredMarks.includes(s)||a.measuredMarks.includes(c))&&a.instance.createMeasureFromEndMark(u),u}},a.getMarks=function(){return a.instance.getMarks()},a.clearMarks=function(s){return a.instance.clearMarks(s)},a.outputLogs=function(){var s=a.instance.getMarks();s.forEach(function(l){console.log(l.name,l.startTime)})},a.getMeasures=function(){return a.instance.getMeasures()},a.toJSON=function(){var s=a.instance.getMarks(),l=s.map(function(u){var c=u.name,d=u.startTime,f=u.detail;return{name:c,startTime:d,detail:f}});return{name:self.name,timeOrigin:performance.timeOrigin,marks:l}},a.measure=function(s,l,u){return a.instance.createMeasure(s,l,u)},a.prototype.getMarks=function(){return performance.getEntriesByType("mark")},a.prototype.getMeasures=function(){return performance.getEntriesByType("measure")},a.prototype.clearMarks=function(s){performance.clearMarks(s)},a.prototype.addMark=function(s,l){var u,c=l??{level:n.Info},d=c.level,f=e(c,["level"]),h=d??n.Info,p=s.includes("Start")?s.replace("Start","End"):s.replace("End","Start");if(h<=a.debugLevel||a.measuredMarks.includes(s)||a.measuredMarks.includes(p)){var g=(u=l==null?void 0:l.relatedId)!==null&&u!==void 0?u:(0,i.generateGuid)();return f.relatedId=g,this.createMark(s,g,f)}return null},a.prototype.createMeasure=function(s,l,u){var c=this.getMarks().filter(function(g){return g.name.startsWith(s)});if(c.length>0){var d=c[c.length-1];if(u&&(d=c.find(function(g){return g.detail.contextId===u})),!d)return;var f=d.name.replace("End","Start"),h=d.name.replace("Start","End"),p=l??h.replace("End","Time");return performance.measure(p,f,h)}},a.prototype.createMeasureFromEndMark=function(s,l){var u=s.name.replace("End","Start"),c=l??u.replace("Start","Time");return performance.measure(c,u,s.name)},a.prototype.createMark=function(s,l,u){return performance.mark("".concat(s).concat(this.separator).concat(l),{detail:u})},a.enableDebug=!1,a.debugLevel=n.Info,a.instance=new a,a.measuredMarks=[],a})();r.PerformanceDebugHelper=t;function o(a){var s=new MessageChannel;s.port1.onmessage=a,s.port2.postMessage(void 0)}r.runAfterFramePaint=o})(hk)),hk}var tJ;function Fbe(){if(tJ)return AP;tJ=1;var r=AP&&AP.__assign||function(){return r=Object.assign||function(u){for(var c,d=1,f=arguments.length;d<f;d++){c=arguments[d];for(var h in c)Object.prototype.hasOwnProperty.call(c,h)&&(u[h]=c[h])}return u},r.apply(this,arguments)};Object.defineProperty(AP,"__esModule",{value:!0}),AP.MouseManager=void 0;var e=Nbe(),i=Ha(),n=xf(),t=ca(),o=ni(),a;(function(u){u[u.Move=0]="Move",u[u.Down=1]="Down",u[u.Up=2]="Up",u[u.Wheel=3]="Wheel",u[u.Click=4]="Click",u[u.Leave=5]="Leave",u[u.Enter=6]="Enter",u[u.Cancel=7]="Cancel",u[u.Drop=8]="Drop"})(a||(a={}));var s=[i.ESurfaceType.SciChartSurfaceType,i.ESurfaceType.SciChartPolarSurfaceType],l=(function(){function u(c){this.isOver=!1,this.maxTapDuration=500,this.enableDoubleTapPolyfill=!0,this.forceDoubleTapPolyfill=!1,this.sciChartSurface=c,this.onPointerMove=this.onPointerMove.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onMouseWheel=this.onMouseWheel.bind(this),this.onDoubleClick=this.onDoubleClick.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this),this.onMouseEnter=this.onMouseEnter.bind(this),this.onContextMenu=this.onContextMenu.bind(this),this.onPointerCancel=this.onPointerCancel.bind(this),this.onDrop=this.onDrop.bind(this)}return u.prototype.subscribe=function(c){o.Guard.notNull(c,"source"),this.unsubscribe(),this.canvas=c,c.addEventListener("pointermove",this.onPointerMove),c.addEventListener("pointerdown",this.onPointerDown),c.addEventListener("pointerup",this.onPointerUp),c.addEventListener("pointercancel",this.onPointerCancel),c.addEventListener("wheel",this.onMouseWheel),c.addEventListener("dblclick",this.onDoubleClick),c.addEventListener("mouseleave",this.onMouseLeave),c.addEventListener("mouseenter",this.onMouseEnter),c.addEventListener("contextmenu",this.onContextMenu),c.addEventListener("drop",this.onDrop)},u.prototype.unsubscribe=function(){this.canvas&&(this.canvas.removeEventListener("pointermove",this.onPointerMove),this.canvas.removeEventListener("pointerdown",this.onPointerDown),this.canvas.removeEventListener("pointerup",this.onPointerUp),this.canvas.removeEventListener("pointercancel",this.onPointerCancel),this.canvas.removeEventListener("wheel",this.onMouseWheel),this.canvas.removeEventListener("dblclick",this.onDoubleClick),this.canvas.removeEventListener("mouseleave",this.onMouseLeave),this.canvas.removeEventListener("mouseenter",this.onMouseEnter),this.canvas.removeEventListener("contextmenu",this.onContextMenu),this.canvas.removeEventListener("drop",this.onDrop)),this.canvas=null},u.prototype.onPointerCancel=function(c){var d=e.ModifierMouseArgs.fromPointerEvent(c);this.modifierPointerCancel(d)},u.prototype.onPointerMove=function(c){var d,f=t.PerformanceDebugHelper.mark(t.EPerformanceMarkType.PointerMoveStart,{contextId:this.sciChartSurface.id,level:t.EPerformanceDebugLevel.Verbose}),h=e.ModifierMouseArgs.fromPointerEvent(c);this.modifierMouseMove(h),t.PerformanceDebugHelper.mark(t.EPerformanceMarkType.PointerMoveEnd,{contextId:this.sciChartSurface.id,relatedId:(d=f==null?void 0:f.detail)===null||d===void 0?void 0:d.relatedId,level:t.EPerformanceDebugLevel.Verbose})},u.prototype.onPointerDown=function(c){var d,f=t.PerformanceDebugHelper.mark(t.EPerformanceMarkType.PointerDownStart,{contextId:this.sciChartSurface.id,level:t.EPerformanceDebugLevel.Verbose}),h=e.ModifierMouseArgs.fromPointerEvent(c);this.modifierMouseDown(h);var p=this.forceDoubleTapPolyfill||this.enableDoubleTapPolyfill&&!this.supportsDoubleTap,g=c.pointerType==="touch"||c.pointerType==="pen";if(p&&g){var v=new Date().getTime(),y=!!this.lastTapTime,m=v-this.lastTapTime<this.maxTapDuration,b=c.isPrimary;if(y&&b&&m){this.lastTapTime=void 0,this.doubleTapHandled=!0;var S=e.ModifierMouseArgs.fromPointerEvent(c);this.modifierDoubleClick(S)}else this.lastTapTime=v,this.doubleTapHandled=!1}else this.doubleTapHandled=!1;t.PerformanceDebugHelper.mark(t.EPerformanceMarkType.PointerDownEnd,{contextId:this.sciChartSurface.id,relatedId:(d=f==null?void 0:f.detail)===null||d===void 0?void 0:d.relatedId,level:t.EPerformanceDebugLevel.Verbose})},u.prototype.onPointerUp=function(c){var d,f=t.PerformanceDebugHelper.mark(t.EPerformanceMarkType.PointerUpStart,{contextId:this.sciChartSurface.id,level:t.EPerformanceDebugLevel.Verbose}),h=e.ModifierMouseArgs.fromPointerEvent(c);this.modifierMouseUp(h),t.PerformanceDebugHelper.mark(t.EPerformanceMarkType.PointerUpEnd,{contextId:this.sciChartSurface.id,relatedId:(d=f==null?void 0:f.detail)===null||d===void 0?void 0:d.relatedId,level:t.EPerformanceDebugLevel.Verbose})},u.prototype.onDoubleClick=function(c){var d,f=t.PerformanceDebugHelper.mark(t.EPerformanceMarkType.DoubleClickStart,{contextId:this.sciChartSurface.id,level:t.EPerformanceDebugLevel.Verbose});if(this.doubleTapHandled){this.supportsDoubleTap=!0;return}var h=e.ModifierMouseArgs.fromMouseEvent(c);this.modifierDoubleClick(h),t.PerformanceDebugHelper.mark(t.EPerformanceMarkType.DoubleClickEnd,{contextId:this.sciChartSurface.id,relatedId:(d=f==null?void 0:f.detail)===null||d===void 0?void 0:d.relatedId,level:t.EPerformanceDebugLevel.Verbose})},u.prototype.onMouseWheel=function(c){var d,f=t.PerformanceDebugHelper.mark(t.EPerformanceMarkType.ScrollStart,{contextId:this.sciChartSurface.id,level:t.EPerformanceDebugLevel.Verbose}),h=e.ModifierMouseArgs.fromWheelEvent(c);this.modifierMouseWheel(h),h.handled&&c.preventDefault(),t.PerformanceDebugHelper.mark(t.EPerformanceMarkType.ScrollEnd,{contextId:this.sciChartSurface.id,relatedId:(d=f==null?void 0:f.detail)===null||d===void 0?void 0:d.relatedId,level:t.EPerformanceDebugLevel.Verbose})},u.prototype.onMouseLeave=function(c){var d,f=t.PerformanceDebugHelper.mark(t.EPerformanceMarkType.MouseLeaveStart,{contextId:this.sciChartSurface.id,level:t.EPerformanceDebugLevel.Verbose}),h=e.ModifierMouseArgs.fromMouseEvent(c);this.modifierMouseLeave(h),t.PerformanceDebugHelper.mark(t.EPerformanceMarkType.MouseLeaveEnd,{contextId:this.sciChartSurface.id,relatedId:(d=f==null?void 0:f.detail)===null||d===void 0?void 0:d.relatedId,level:t.EPerformanceDebugLevel.Verbose})},u.prototype.onMouseEnter=function(c){var d,f=t.PerformanceDebugHelper.mark(t.EPerformanceMarkType.MouseEnterStart,{contextId:this.sciChartSurface.id,level:t.EPerformanceDebugLevel.Verbose}),h=e.ModifierMouseArgs.fromMouseEvent(c);this.modifierMouseEnter(h),t.PerformanceDebugHelper.mark(t.EPerformanceMarkType.MouseEnterEnd,{contextId:this.sciChartSurface.id,relatedId:(d=f==null?void 0:f.detail)===null||d===void 0?void 0:d.relatedId,level:t.EPerformanceDebugLevel.Verbose})},u.prototype.onContextMenu=function(c){c.preventDefault()},u.prototype.onDrop=function(c){var d=e.ModifierMouseArgs.fromMouseEvent(c);this.modifierDrop(d)},u.prototype.modifierPointerCancel=function(c){var d=this;if(c.isMaster&&c.target.releasePointerCapture(c.pointerId),this.chartModifiers.forEach(function(h){h.canReceiveMouseEvents&&(!c.handled||h.receiveHandledEvents)&&(c.isMaster||!c.isMaster&&h.modifierGroup===c.modifierGroup)&&h.modifierPointerCancel(c,d.sciChartSurface)}),c.isMaster){var f=this.getMasterData(this.sciChartSurface,c);this.chartModifierGroups.forEach(function(h){d.sciChartSurface.otherSurfaces.forEach(function(p){var g=e.ModifierMouseArgs.copy(c,h,d.sciChartSurface.seriesViewRect,p.seriesViewRect,f);p.mouseManager.modifierPointerCancel(g)})}),this.updateSubCharts(c,a.Cancel)}},u.prototype.modifierMouseMove=function(c){var d=this;if(s.includes(this.sciChartSurface.surfaceType)){var f=this.sciChartSurface;if(f.adornerLayer.isAnnotationSelected){var h=f.adornerLayer.selectedAnnotation;h.isDraggingStarted&&h.onDragAdorner(c)}}if(this.chartModifiers.forEach(function(g){g.canReceiveMouseEvents&&(!c.handled||g.receiveHandledEvents)&&(c.isMaster||!c.isMaster&&g.modifierGroup===c.modifierGroup)&&g.modifierMouseMove(c,d.sciChartSurface)}),c.isMaster){var p=this.getMasterData(this.sciChartSurface,c);this.chartModifierGroups.forEach(function(g){d.sciChartSurface.otherSurfaces.forEach(function(v){var y=e.ModifierMouseArgs.copy(c,g,d.sciChartSurface.seriesViewRect,v.seriesViewRect,p);v.mouseManager.modifierMouseMove(y)})}),this.updateSubCharts(c,a.Move)}},u.prototype.modifierMouseDown=function(c){var d=this,f;c.isMaster&&((f=c.target)===null||f===void 0||f.setPointerCapture(c.pointerId));var h=function(){if(d.chartModifiers.forEach(function(S){S.canReceiveMouseEvents&&(!c.handled||S.receiveHandledEvents)&&(c.isMaster||!c.isMaster&&S.modifierGroup===c.modifierGroup)&&S.modifierMouseDown(c,d.sciChartSurface)}),c.isMaster){var b=d.getMasterData(d.sciChartSurface,c);d.chartModifierGroups.forEach(function(S){d.sciChartSurface.otherSurfaces.forEach(function(_){var C=e.ModifierMouseArgs.copy(c,S,d.sciChartSurface.seriesViewRect,_.seriesViewRect,b);_.mouseManager.modifierMouseDown(C)})}),d.updateSubCharts(c,a.Down)}};if(c.isMaster){var p=function(b){b.adornerLayer.selectAnnotation(c);var S=b.adornerLayer.selectedAnnotation;S?S.onDragStarted(c)&&d.modifierMouseMove(c):h()};if(s.includes(this.sciChartSurface.surfaceType)){var g=this.sciChartSurface,v=g.adornerLayer.selectedAnnotation;if(v){var y=v.checkIsPointWithinClipArea(c.mousePoint),m=y&&v.onDragStarted(c);m||p(g)}else p(g)}else h()}else h()},u.prototype.modifierMouseUp=function(c){var d=this,f;if(c.isMaster&&((f=c.target)===null||f===void 0||f.releasePointerCapture(c.pointerId)),s.includes(this.sciChartSurface.surfaceType)){var h=this.sciChartSurface;if(h.adornerLayer.isAnnotationSelected){var p=h.adornerLayer.selectedAnnotation;p.isDraggingStarted&&p.onDragEnded()}}if(this.chartModifiers.forEach(function(v){v.canReceiveMouseEvents&&(!c.handled||v.receiveHandledEvents)&&(c.isMaster||!c.isMaster&&v.modifierGroup===c.modifierGroup)&&v.modifierMouseUp(c,d.sciChartSurface)}),c.isMaster){var g=this.getMasterData(this.sciChartSurface,c);this.chartModifierGroups.forEach(function(v){d.sciChartSurface.otherSurfaces.forEach(function(y){var m=e.ModifierMouseArgs.copy(c,v,d.sciChartSurface.seriesViewRect,y.seriesViewRect,g);y.mouseManager.modifierMouseUp(m)})}),this.updateSubCharts(c,a.Up)}},u.prototype.modifierMouseWheel=function(c){var d=this;if(this.chartModifiers.forEach(function(h){h.canReceiveMouseEvents&&(!c.handled||h.receiveHandledEvents)&&(c.isMaster||!c.isMaster&&h.modifierGroup===c.modifierGroup)&&h.modifierMouseWheel(c,d.sciChartSurface)}),c.isMaster){var f=this.getMasterData(this.sciChartSurface,c);this.chartModifierGroups.forEach(function(h){d.sciChartSurface.otherSurfaces.forEach(function(p){var g=e.ModifierMouseArgs.copy(c,h,d.sciChartSurface.seriesViewRect,p.seriesViewRect,f);p.mouseManager.modifierMouseWheel(g)})}),this.updateSubCharts(c,a.Wheel)}},u.prototype.modifierDoubleClick=function(c){var d=this;if(this.chartModifiers.forEach(function(h){h.canReceiveMouseEvents&&(!c.handled||h.receiveHandledEvents)&&(c.isMaster||!c.isMaster&&h.modifierGroup===c.modifierGroup)&&h.modifierDoubleClick(c,d.sciChartSurface)}),c.isMaster){var f=this.getMasterData(this.sciChartSurface,c);this.chartModifierGroups.forEach(function(h){d.sciChartSurface.otherSurfaces.forEach(function(p){var g=e.ModifierMouseArgs.copy(c,h,d.sciChartSurface.seriesViewRect,p.seriesViewRect,f);p.mouseManager.modifierDoubleClick(g)})}),this.updateSubCharts(c,a.Click)}},u.prototype.modifierMouseLeave=function(c){var d=this;if(this.chartModifiers.forEach(function(h){h.canReceiveMouseEvents&&(!c.handled||h.receiveHandledEvents)&&(c.isMaster||!c.isMaster&&h.modifierGroup===c.modifierGroup)&&h.modifierMouseLeave(c,d.sciChartSurface)}),c.isMaster){var f=this.getMasterData(this.sciChartSurface,c);this.chartModifierGroups.forEach(function(h){d.sciChartSurface.otherSurfaces.forEach(function(p){var g=e.ModifierMouseArgs.copy(c,h,d.sciChartSurface.seriesViewRect,p.seriesViewRect,f);p.mouseManager.modifierMouseLeave(g)})}),this.updateSubCharts(c,a.Leave)}},u.prototype.modifierMouseEnter=function(c){var d=this;if(this.chartModifiers.forEach(function(h){h.canReceiveMouseEvents&&(!c.handled||h.receiveHandledEvents)&&(c.isMaster||!c.isMaster&&h.modifierGroup===c.modifierGroup)&&h.modifierMouseEnter(c,d.sciChartSurface)}),c.isMaster){var f=this.getMasterData(this.sciChartSurface,c);this.chartModifierGroups.forEach(function(h){d.sciChartSurface.otherSurfaces.forEach(function(p){var g=e.ModifierMouseArgs.copy(c,h,d.sciChartSurface.seriesViewRect,p.seriesViewRect,f);p.mouseManager.modifierMouseEnter(g)})}),this.updateSubCharts(c,a.Enter)}},u.prototype.modifierDrop=function(c){var d=this;if(this.chartModifiers.forEach(function(h){h.canReceiveMouseEvents&&(!c.handled||h.receiveHandledEvents)&&(c.isMaster||!c.isMaster&&h.modifierGroup===c.modifierGroup)&&h.modifierDrop(c,d.sciChartSurface)}),c.isMaster){var f=this.getMasterData(this.sciChartSurface,c);this.chartModifierGroups.forEach(function(h){d.sciChartSurface.otherSurfaces.forEach(function(p){var g=e.ModifierMouseArgs.copy(c,h,d.sciChartSurface.seriesViewRect,p.seriesViewRect,f);p.mouseManager.modifierDrop(g)})}),this.updateSubCharts(c,a.Drop)}},u.prototype.getMasterData=function(c,d){return{}},Object.defineProperty(u.prototype,"chartModifiers",{get:function(){return this.sciChartSurface.chartModifiers.asArray()},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"chartModifierGroups",{get:function(){var c=this.chartModifiers.filter(function(d){return d.modifierGroup!==void 0}).map(function(d){return d.modifierGroup});return(0,n.getUniqueValues)(c)},enumerable:!1,configurable:!0}),u.prototype.updateSubCharts=function(c,d){var f=this,h=this.sciChartSurface.subCharts;if(!(!h||h.length===0)){var p=h==null?void 0:h.find(function(v){if(!v.offset)return!1;var y=v.offset,m=y.top,b=y.left,S=y.bottom,_=y.right,C=c.mousePoint,T=C.x,x=C.y,A=f.sciChartSurface.renderSurface.viewportSize,w=A.width,L=A.height;return b<=T&&T<=w-_&&m<=x&&x<=L-S}),g=!1;h==null||h.forEach(function(v){if(v.offset){var y=d,m=!0;if(v.mouseManager.isOver){if(v!==p){if(v.mouseManager.isOver=!1,y===a.Move){var b=new e.ModifierMouseArgs(c.mousePoint,c);g=g||f.processSubChartEvent(a.Leave,v,b,h,void 0)}y!==a.Cancel&&y!==a.Up&&(y=void 0)}}else if(v===p){if(v.mouseManager.isOver=!0,y===a.Move){var S=new e.ModifierMouseArgs(c.mousePoint,c);g=g||f.processSubChartEvent(a.Enter,v,S,h,void 0)}}else[a.Cancel,a.Up,a.Move].includes(y)||(y=void 0),m=!1;if(y!==void 0){var _=f.getMasterData(p,c);g=g||f.processSubChartEvent(y,v,r(r({},c),{isActiveSubChartEvent:m}),h,_)}}}),c.handled=c.handled||g}},u.prototype.processSubChartEvent=function(c,d,f,h,p){var g=this;f.handled=!1,this.callEvent(c,d,f);var v=f.handled;return f.isActiveSubChartEvent&&d.chartModifierGroups.forEach(function(y){h.filter(function(m){return m.id!==d.id}).forEach(function(m){var b=e.ModifierMouseArgs.copyForSubChart(f,y,d.seriesViewRect,m.seriesViewRect,p);g.callEvent(c,m,b),v=v||b.handled})}),v},u.prototype.callEvent=function(c,d,f){switch(c){case a.Cancel:d.mouseManager.modifierPointerCancel(f);break;case a.Click:d.mouseManager.modifierDoubleClick(f);break;case a.Down:d.mouseManager.modifierMouseDown(f);break;case a.Enter:d.mouseManager.modifierMouseEnter(f);break;case a.Leave:d.mouseManager.modifierMouseLeave(f);break;case a.Move:d.mouseManager.modifierMouseMove(f);break;case a.Up:d.mouseManager.modifierMouseUp(f);break;case a.Wheel:d.mouseManager.modifierMouseWheel(f);break;case a.Drop:d.mouseManager.modifierDrop(f);break}},u})();return AP.MouseManager=l,AP}var lm={},N4={},rJ;function gY(){return rJ||(rJ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.ObservableArrayChangedArgs=r.EObservableArrayChangedAction=void 0,(function(i){i[i.Add=0]="Add",i[i.Remove=1]="Remove",i[i.Replace=2]="Replace",i[i.Reset=3]="Reset"})(r.EObservableArrayChangedAction||(r.EObservableArrayChangedAction={}));var e=(function(){function i(n,t,o){this.action=n,this.oldItems=o,this.newItems=t}return i.prototype.getAction=function(){return this.action},i.prototype.getNewItems=function(){return this.newItems},i.prototype.getOldItems=function(){return this.oldItems},i})();r.ObservableArrayChangedArgs=e})(N4)),N4}var iJ;function FS(){if(iJ)return lm;iJ=1;var r=lm&&lm.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(lm,"__esModule",{value:!0}),lm.ObservableArray=lm.ObservableArrayBase=void 0;var e=Ba(),i=gY(),n=(function(){function o(){this.items=[],this.collectionChanged=new e.EventHandler}return o.prototype.size=function(){return this.items.length},o.prototype.add=function(){for(var a=this,s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];s.forEach(function(u){return a.items.push(u)}),this.collectionChanged.raiseEvent(new i.ObservableArrayChangedArgs(i.EObservableArrayChangedAction.Add,s,void 0))},o.prototype.asArray=function(){return this.items},o.prototype.insert=function(a,s){if(a<0&&(a=0),a>=this.items.length){this.add(s);return}this.items.splice(a,0,s),this.collectionChanged.raiseEvent(new i.ObservableArrayChangedArgs(i.EObservableArrayChangedAction.Add,[s],void 0))},o.prototype.contains=function(a){return this.items.includes(a)},o.prototype.removeAt=function(a,s){if(s===void 0&&(s=!0),!(a<0||a>=this.items.length)){var l=this.items[a];this.items.splice(a,1),this.collectionChanged.raiseEvent(new i.ObservableArrayChangedArgs(i.EObservableArrayChangedAction.Remove,void 0,[l])),s&&(l!=null&&l.delete)&&l.delete()}},o.prototype.remove=function(a,s){s===void 0&&(s=!0);for(var l=0;l<this.size();l++)if(this.items[l]===a){this.removeAt(l,s);break}},o.prototype.clear=function(a){a===void 0&&(a=!0);var s=this.items;this.items=[],this.collectionChanged.raiseEvent(new i.ObservableArrayChangedArgs(i.EObservableArrayChangedAction.Reset,void 0,s)),a&&(s==null||s.forEach(function(l){l!=null&&l.delete&&l.delete()}))},o.prototype.get=function(a){return this.items[a]},o.prototype.set=function(a,s){this.items[a]=s,this.collectionChanged.raiseEvent(new i.ObservableArrayChangedArgs(i.EObservableArrayChangedAction.Replace,[s],void 0))},o})();lm.ObservableArrayBase=n;var t=(function(o){r(a,o);function a(){return o!==null&&o.apply(this,arguments)||this}return a.prototype.getById=function(s){return this.items.find(function(l){return l.id===s})},a.prototype.checkIdUniqueness=function(s){return this.items.filter(function(l){return l.id===s}).length<=1},a})(n);return lm.ObservableArray=t,lm}var pk={},nJ;function ZUe(){if(nJ)return pk;nJ=1,Object.defineProperty(pk,"__esModule",{value:!0}),pk.VisibilityObserver=void 0;var r=(function(){function e(i,n){this.callback=n,this.element=i}return e.observe=function(i,n){var t=new e(i,n);return t.init(),t},e.prototype.disconnect=function(){this.observer.disconnect()},e.prototype.init=function(){var i=this;this.observer=new IntersectionObserver(function(n){for(var t=0,o=n;t<o.length;t++){var a=o[t];i.callback(a.isIntersecting)}},{root:null,threshold:.01}),this.observer.observe(this.element)},e})();return pk.VisibilityObserver=r,pk}var gk={},oJ;function XS(){if(oJ)return gk;oJ=1,Object.defineProperty(gk,"__esModule",{value:!0}),gk.PropertyChangedEventArgs=void 0;var r=(function(){function e(i){this.propertyName=i}return e})();return gk.PropertyChangedEventArgs=r,gk}var vk={},aJ;function jbe(){if(aJ)return vk;aJ=1,Object.defineProperty(vk,"__esModule",{value:!0}),vk.SimdHelper=void 0;var r=(function(){function e(){}return e.supportsWasmSIMD=function(){if(e.supportsSimd!==void 0)return e.supportsSimd;try{if(typeof WebAssembly>"u"||typeof WebAssembly.validate!="function")return e.supportsSimd=!1,!1;var i=new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]);return e.supportsSimd=WebAssembly.validate(i),e.supportsSimd}catch{return e.supportsSimd=!1,!1}},e.supportsSimd=void 0,e})();return vk.SimdHelper=r,vk}var yk={},sJ;function A1(){return sJ||(sJ=1,(function(r){var e=yk&&yk.__assign||function(){return e=Object.assign||function(o){for(var a,s=1,l=arguments.length;s<l;s++){a=arguments[s];for(var u in a)Object.prototype.hasOwnProperty.call(a,u)&&(o[u]=a[u])}return o},e.apply(this,arguments)};Object.defineProperty(r,"__esModule",{value:!0}),r.WebGlHelper=r.EWebGLSupport=void 0;var i=So(),n;(function(o){o.WebGL2="WebGL 2",o.WebGL1="WebGL 1",o.NoWebGL="No WebGL support"})(n=r.EWebGLSupport||(r.EWebGLSupport={}));var t=(function(){function o(){}return o.initialize=function(){if(!o.initialized){if(!o.webGlSupport&&!i.IS_TEST_ENV){var a=document.createElement("canvas");a.getContext("webgl2",{powerPreference:"high-performance"})?o.webGlSupport=n.WebGL2:a.getContext("webgl")?o.webGlSupport=n.WebGL1:o.webGlSupport=n.NoWebGL}if(o.initialized=!0,o.webGlSupport!==n.WebGL2)throw new Error("SciChart.js requires WebGL2 support.  This browser has "+o.webGlSupport)}},o.getWebGlSupport=function(){return o.initialize(),o.webGlSupport},o.getContext=function(a,s){if(!(!a||i.IS_TEST_ENV)){if(o.webGlSupport===n.WebGL1)return a.getContext("webgl",e({},s));if(o.webGlSupport===n.WebGL2)return a.getContext("webgl2",e(e({},s),{powerPreference:"high-performance"}));throw new Error("SciChart: WebGL not supported!")}},o.webGlSupport=void 0,o.initialized=!1,o})();r.WebGlHelper=t})(yk)),yk}var F4={},lJ;function $o(){return lJ||(lJ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EBaseType=void 0,(function(e){e.Axis="Axis",e.Annotation="Annotation",e.RenderableSeries="RenderableSeries",e.LayoutManager="LayoutManager",e.ThemeProvider="ThemeProvider",e.Chart2DModifier="Chart2DModifier",e.Chart3DModifier="Chart3DModifier",e.LabelProvider="LabelProvider",e.PointMarker="PointMarker",e.PointMarker3D="PointMarker3D",e.ShaderEffect="ShaderEffect",e.PaletteProvider="PaletteProvider",e.Animation="Animation",e.Loader="Loader",e.MetadataGenerator="MetadataGenerator",e.OptionFunction="OptionFunction",e.OnCreateFunction="OnCreateFunction",e.DataFilter="DataFilter",e.LayoutStrategy="LayoutStrategy",e.DataLabelProvider="DataLabelProvider"})(r.EBaseType||(r.EBaseType={}))})(F4)),F4}var j4={},uJ;function Wd(){return uJ||(uJ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EModifierType=void 0,(function(e){e.Chart2DModifier="2D Chart Modifier",e.Chart2DPolarModifier="2D Polar Chart Modifier",e.Chart3DModifier="3D Chart Modifier",e.MultiChart2DModifier="Multiple 2D Chart Modifier"})(r.EModifierType||(r.EModifierType={}))})(j4)),j4}var B4={},cJ;function qq(){return cJ||(cJ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EUseWasmSimd=void 0,(function(e){e.Always="Always",e.Auto="Auto",e.Never="Never"})(r.EUseWasmSimd||(r.EUseWasmSimd={}))})(B4)),B4}var wP={},V4={},dJ;function AM(){return dJ||(dJ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EThemeProviderType=void 0,(function(e){e.Light="Light",e.Dark="Dark",e.DarkV2="DarkV2",e.Navy="Navy",e.Custom="Custom"})(r.EThemeProviderType||(r.EThemeProviderType={}))})(V4)),V4}var OP={},mk={},bk={},H4={},fJ;function I1(){return fJ||(fJ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EPaletteProviderType=void 0,(function(e){e.Gradient="Gradient",e.DataPointSelection="DataPointSelection",e.Custom="Custom",e.Gradient3D="Gradient3D",e.Solid3D="Solid3D"})(r.EPaletteProviderType||(r.EPaletteProviderType={}))})(H4)),H4}var U4={},hJ;function H0(){return hJ||(hJ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.DefaultPaletteProvider=r.EFillPaletteMode=r.EStrokePaletteMode=void 0;var e;(function(t){t.GRADIENT="GRADIENT",t.SOLID="SOLID"})(e=r.EStrokePaletteMode||(r.EStrokePaletteMode={}));var i;(function(t){t.GRADIENT="GRADIENT",t.SOLID="SOLID"})(i=r.EFillPaletteMode||(r.EFillPaletteMode={}));var n=(function(){function t(){this.strokePaletteMode=e.GRADIENT,this.fillPaletteMode=i.GRADIENT}return t.createEmpty=function(){var o=new t;return o.overrideFillArgb=void 0,o.overrideStrokeArgb=void 0,o.overridePointMarkerArgb=void 0,o},t.prototype.onAttached=function(o){this.parentSeries=o},t.prototype.onDetached=function(){this.parentSeries=void 0},Object.defineProperty(t.prototype,"isRangeIndependant",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.shouldUpdatePalette=function(){return!0},t.prototype.overrideFillArgb=function(o,a,s,l,u,c){},t.prototype.overrideStrokeArgb=function(o,a,s,l,u,c){},t.prototype.overridePointMarkerArgb=function(o,a,s,l,u,c){},t.prototype.toJSON=function(){},t})();r.DefaultPaletteProvider=n})(U4)),U4}var pJ;function Xq(){if(pJ)return bk;pJ=1,Object.defineProperty(bk,"__esModule",{value:!0}),bk.PaletteFactory=void 0;var r=I1(),e=iu(),i=mi(),n=H0(),t=(function(){function o(){}return o.createGradient=function(a,s,l){s.endPoint.x-s.startPoint.x,s.endPoint.y-s.startPoint.y;var u=o.createColorMap(a,s.gradientStops.slice(0)),c,d=function(v,y,m,b){b===void 0&&(b=1);var S=c.getDataSeriesValuesCount(),_=m/(S-1),C=a.NumberUtil.Constrain(Math.round(_*(u.length-1)),0,u.length-1),T=u[C];return(0,e.uintArgbColorMultiplyOpacity)(T,b)},f=l===void 0||(l==null?void 0:l.enableStroke)===!0,h=(l==null?void 0:l.enableFill)===!0,p=(l==null?void 0:l.enablePointMarkers)===!0,g={strokePaletteMode:n.EStrokePaletteMode.GRADIENT,fillPaletteMode:n.EFillPaletteMode.GRADIENT,onAttached:function(v){c=v},onDetached:function(){},overrideStrokeArgb:function(v,y,m){var b;return f?d(v,y,m,(b=l==null?void 0:l.strokeOpacity)!==null&&b!==void 0?b:1):void 0},overrideFillArgb:function(v,y,m,b,S){var _;return h?d(v,y,m,(_=l==null?void 0:l.fillOpacity)!==null&&_!==void 0?_:1):void 0},overridePointMarkerArgb:function(v,y,m,b,S){var _,C=(_=l==null?void 0:l.pointMarkerOpacity)!==null&&_!==void 0?_:1;return p?{fill:d(v,y,m,C),stroke:d(v,y,m,C)}:void 0},toJSON:function(){return{type:r.EPaletteProviderType.Gradient,options:s}}};return g},o.createYGradient=function(a,s,l,u){var c=o.createColorMap(a,s.gradientStops.slice(0)),d=function(v,y){y===void 0&&(y=1);var m=(v-l.min)/l.diff,b=a.NumberUtil.Constrain(Math.round(m*(c.length-1)),0,c.length-1),S=c[b];return(0,e.uintArgbColorMultiplyOpacity)(S,y)},f=u===void 0||(u==null?void 0:u.enableStroke)===!0,h=(u==null?void 0:u.enableFill)===!0,p=(u==null?void 0:u.enablePointMarkers)===!0,g={strokePaletteMode:n.EStrokePaletteMode.GRADIENT,fillPaletteMode:n.EFillPaletteMode.GRADIENT,onAttached:function(v){},onDetached:function(){},overrideStrokeArgb:function(v,y,m){var b;return f?d(y,(b=u==null?void 0:u.strokeOpacity)!==null&&b!==void 0?b:1):void 0},overrideFillArgb:function(v,y,m,b,S){var _;return h?d(y,(_=u==null?void 0:u.strokeOpacity)!==null&&_!==void 0?_:1):void 0},overridePointMarkerArgb:function(v,y,m,b,S){var _,C=(_=u==null?void 0:u.pointMarkerOpacity)!==null&&_!==void 0?_:1;return p?{fill:d(y,C),stroke:d(y,C)}:void 0},toJSON:function(){return{type:r.EPaletteProviderType.Gradient,options:s}}};return g},o.createColorMap=function(a,s){var l=[],u=s.length,c=s[0].offset,d=s[s.length-1].offset,f=d-c,h=f/(o.precision-1),p=(0,i.parseColorToUIntArgb)(s[0].color),g=s[0].offset,v=p,y=g;u>1&&(v=(0,i.parseColorToUIntArgb)(s[1].color),y=s[1].offset),f=y-g;for(var m=0,b=0;b<o.precision;++b){var S=c+b*h;S>=y&&(m++,g=y,p=v,m+1<u&&(v=(0,i.parseColorToUIntArgb)(s[m+1].color),y=s[m+1].offset),f=y-g);var _=0;if(p===v||f<=1e-11)_=v;else{var C=(S-g)/f;_=a.NumberUtil.LinearInterpolateI(p,v,C)}l.push(_)}return l},o.precision=500,o})();return bk.PaletteFactory=t,bk}var gJ;function gs(){return gJ||(gJ=1,(function(r){var e=mk&&mk.__assign||function(){return e=Object.assign||function(a){for(var s,l=1,u=arguments.length;l<u;l++){s=arguments[l];for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&(a[c]=s[c])}return a},e.apply(this,arguments)};Object.defineProperty(r,"__esModule",{value:!0}),r.stripAutoColor=r.ThemeProvider=r.AUTO_COLOR=void 0;var i=mi(),n=Xq();r.AUTO_COLOR="auto";var t=(function(){function a(){this.strokePalette=[],this.fillPalette=[]}return a.prototype.getStrokeColor=function(s,l,u){return this.getPaletteColor(s,l,u,!0)},a.prototype.getFillColor=function(s,l,u){return this.getPaletteColor(s,l,u,!1)},a.prototype.applyOverrides=function(s){this.overrides=s,Object.assign(this,s)},a.prototype.toJSON=function(){return e({type:this.type},this.overrides)},a.prototype.getPaletteColor=function(s,l,u,c){var d=c?this.strokePalette:this.fillPalette;if(!d||d.length===0)throw new Error("".concat(c?"stroke":"fill","Palette must not be empty to use get").concat(c?"Stroke":"Fill","Color"));if(d.length<2)return this.toColor(d[0]);if(s>l)throw new Error("index must be less than or equal to max");if(l<=d.length)return this.toColor(d[s]);var f=c?this.strokeGradient:this.fillGradient;if(!f){var h=typeof d[0]=="string"?d.map(function(y,m){return{color:y,offset:m/d.length-1}}):d;f=n.PaletteFactory.createColorMap(u,h),c?this.strokeGradient=f:this.fillGradient=f}var p=s/l,g=u.NumberUtil.Constrain(Math.round(p*(f.length-1)),0,f.length-1),v=f[g];return(0,i.parseArgbToHtmlColor)(v)},a.prototype.toColor=function(s){return typeof s=="string"?s:s.color},a})();r.ThemeProvider=t;var o=function(a){return a===r.AUTO_COLOR?"#00000000":a&&a.startsWith(r.AUTO_COLOR)?a.substring(r.AUTO_COLOR.length):a};r.stripAutoColor=o})(mk)),mk}var vJ;function kH(){if(vJ)return OP;vJ=1;var r=OP&&OP.__extends||(function(){var t=function(o,a){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");t(o,a);function s(){this.constructor=o}o.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}})();Object.defineProperty(OP,"__esModule",{value:!0}),OP.SciChartJSDarkTheme=void 0;var e=AM(),i=gs(),n=(function(t){r(o,t);function o(){var a=t!==null&&t.apply(this,arguments)||this;return a.type=e.EThemeProviderType.Dark,a.sciChartBackground="#1C1C1EFF",a.loadingAnimationBackground="#1C1C1EFF",a.loadingAnimationForeground="#AAA",a.gridBorderBrush="#5A5B5BFF",a.axisBandsFill="#202123E1",a.axisBorder="#00000000",a.tickTextBrush="#A6A7ACFF",a.majorGridLineBrush="#323539FF",a.minorGridLineBrush="#232426FF",a.polarMajorGridLineBrush="#323539FF",a.polarMinorGridLineBrush="#232426FF",a.gridBackgroundBrush="TRANSPARENT",a.rolloverLineBrush="#42b64933",a.cursorLineBrush="#228B22FF",a.rubberBandFillBrush="#42b64933",a.rubberBandStrokeBrush="#42b64977",a.legendBackgroundBrush="#1D2C35FF",a.labelBackgroundBrush="#42b649AA",a.labelBorderBrush="#42b649FF",a.labelForegroundBrush="#EEEEEEFF",a.textAnnotationForeground="#EEEEEEFF",a.textAnnotationBackground="#42b649AA",a.annotationsGripsBorderBrush="#CDCDCD99",a.annotationsGripsBackgroundBrush="#CDCDCD22",a.annotationSelectionStroke="#f00e0e66",a.overviewFillBrush="#262728BB",a.scrollbarBackgroundBrush="#262728FF",a.scrollbarBorderBrush="#121212FF",a.scrollbarGripsBackgroundBrush="#535353FF",a.scrollbarViewportBackgroundBrush="#222222FF",a.scrollbarViewportBorderBrush="#232323FF",a.upWickColor="#50ff50FF",a.downWickColor="#ff5050FF",a.upBodyBrush="#50ff50B2",a.downBodyBrush="#ff5050B2",a.upBandSeriesLineColor="#279B27FF",a.downBandSeriesLineColor="#FF1919FF",a.upBandSeriesFillColor="#279B2733",a.downBandSeriesFillColor="#FF191933",a.mountainAreaBrush="#4083B777",a.mountainLineColor="#C6E6FFFF",a.lineSeriesColor="#C6E6FFFF",a.columnLineColor="#FFFFFFFF",a.columnFillBrush="#FFFFFFFF",a.impulseFillBrush="#FFFFFFFF",a.defaultColorMapBrush=[{offset:0,color:"DARKBLUE"},{offset:.5,color:"CORNFLOWERBLUE"},{offset:1,color:"#FF22AAFF"}],a.axisTitleColor="#C8C7C3FF",a.chartTitleColor="#C8C7C3FF",a.shadowEffectColor="#000000FF",a.planeBorderColor="#333333FF",a.axisPlaneBackgroundFill="TRANSPARENT",a.axis3DBandsFill="#202123E1",a.isLightBackground=!1,a}return o})(i.ThemeProvider);return OP.SciChartJSDarkTheme=n,OP}var yJ;function IH(){if(yJ)return wP;yJ=1;var r=wP&&wP.__extends||(function(){var t=function(o,a){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");t(o,a);function s(){this.constructor=o}o.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}})();Object.defineProperty(wP,"__esModule",{value:!0}),wP.SciChartJSDarkv2Theme=void 0;var e=AM(),i=kH(),n=(function(t){r(o,t);function o(){var a=t.call(this)||this;return a.type=e.EThemeProviderType.DarkV2,a.sciChartBackground="radial-gradient(circle, #3C3C3FFF 0%, #1C1C1EFF 100%)",a.loadingAnimationBackground="radial-gradient(circle, #3C3C3FFF 0%, #1C1C1EFF 100%)",a.axisBandsFill="#20212333",a.strokePalette=["#F48420","#AE408E","#209FD9","#264B93"],a.fillPalette=["#F4842077","#AE408E77","#209FD977","#264B9377"],a.isLightBackground=!1,a.majorGridLineBrush="#AAAAAA37",a.minorGridLineBrush="#77777719",a.polarMajorGridLineBrush="#494949",a.polarMinorGridLineBrush="#393939",a}return o})(i.SciChartJSDarkTheme);return wP.SciChartJSDarkv2Theme=n,wP}var Sk={},z4={},mJ;function Kq(){return mJ||(mJ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EWatermarkPosition=void 0,(function(e){e.BottomLeft="BottomLeft",e.BottomRight="BottomRight",e.TopLeft="TopLeft",e.TopRight="TopRight"})(r.EWatermarkPosition||(r.EWatermarkPosition={}))})(z4)),z4}var _k={},bJ;function Zq(){if(bJ)return _k;bJ=1,Object.defineProperty(_k,"__esModule",{value:!0}),_k.DefaultSciChartLoader=void 0;var r=ni(),e=(function(){function n(){}return n.prototype.addChartLoader=function(t,o){this.addLoaderStyles(),r.Guard.notNull(t,"domDivContainer"),r.Guard.notNull(o,"theme");var a=document.createElement("div");a.style.background=o.loadingAnimationBackground,a.style.height="100%",a.style.width="100%",a.style.position="relative",a.style.zIndex="11";var s=document.createElement("div"),l='<div><span style="background: '.concat(o.loadingAnimationForeground,'"/></div>');return s.innerHTML=l.repeat(8),s.classList.add("scichart_loader"),a.appendChild(s),t.appendChild(a),a},n.prototype.removeChartLoader=function(t,o){try{t.removeChild(o)}catch(a){console.error(a)}},n.prototype.toJSON=function(){return{type:this.type}},n.prototype.addLoaderStyles=function(){if(!n.hasStyles){var t=document.head,o=document.createElement("style");o.id=n.sciChartLoaderStylesId,t.appendChild(o),o.appendChild(document.createTextNode(i)),n.hasStyles=!0}},n.hasStyles=!1,n.sciChartLoaderStylesId="scichart_default_loader_styles_id",n})();_k.DefaultSciChartLoader=e;var i=`
    .scichart_loader {
      display: inline-block;
      position: relative;
      width: 80px;
      height: 80px;
      top: 50%;
      transform: translateY(-50%);
    }
    .scichart_loader div {
      animation: scichart_loader 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
      transform-origin: 40px 40px;
    }
    .scichart_loader div span {
      display: block;
      position: absolute;
      width: 7px;
      height: 7px;
      border-radius: 50%;
      margin: -4px 0 0 -4px;
    }
    .scichart_loader div:nth-child(1) {
      animation-delay: -0.036s;
    }
    .scichart_loader div:nth-child(1) span {
      top: 63px;
      left: 63px;
    }
    .scichart_loader div:nth-child(2) {
      animation-delay: -0.072s;
    }
    .scichart_loader div:nth-child(2) span {
      top: 68px;
      left: 56px;
    }
    .scichart_loader div:nth-child(3) {
      animation-delay: -0.108s;
    }
    .scichart_loader div:nth-child(3) span {
      top: 71px;
      left: 48px;
    }
    .scichart_loader div:nth-child(4) {
      animation-delay: -0.144s;
    }
    .scichart_loader div:nth-child(4) span {
      top: 72px;
      left: 40px;
    }
    .scichart_loader div:nth-child(5) {
      animation-delay: -0.18s;
    }
    .scichart_loader div:nth-child(5) span {
      top: 71px;
      left: 32px;
    }
    .scichart_loader div:nth-child(6) {
      animation-delay: -0.216s;
    }
    .scichart_loader div:nth-child(6) span {
      top: 68px;
      left: 24px;
    }
    .scichart_loader div:nth-child(7) {
      animation-delay: -0.252s;
    }
    .scichart_loader div:nth-child(7) span {
      top: 63px;
      left: 17px;
    }
    .scichart_loader div:nth-child(8) {
      animation-delay: -0.288s;
    }
    .scichart_loader div:nth-child(8) span {
      top: 56px;
      left: 12px;
    }
    @keyframes scichart_loader {
      0% {
        transform: rotate(0deg);
      }
      100% {
        transform: rotate(360deg);
      }
    }
`;return _k}var SJ;function Gd(){if(SJ)return Sk;SJ=1,Object.defineProperty(Sk,"__esModule",{value:!0}),Sk.SciChartDefaults=void 0;var r=qq(),e=Kq(),i=Zq(),n=(function(){function t(){}return t.useSharedCache=!0,t.debugDisableResampling=!1,t.performanceWarnings=!0,t.useNativeText=!0,t.nativeFontTimeout=2e3,t.watermarkPosition=e.EWatermarkPosition.BottomLeft,t.watermarkRelativeToCanvas=!1,t.defaultLoader=new i.DefaultSciChartLoader,t.disableAspect=!1,t.wasmBufferSizesKb=1024*8,t.createSuspended=!1,t.useWasmSimd=r.EUseWasmSimd.Auto,t.autoFontName="auto",t.nativeFontFamily="default",t.canvasFontFamily="Arial",t.alwaysRedrawFullChartOnSvgChange=!1,t})();return Sk.SciChartDefaults=n,Sk}var Pk={},_J;function Bbe(){if(_J)return Pk;_J=1,Object.defineProperty(Pk,"__esModule",{value:!0}),Pk.UpdateSuspender=void 0;var r=Ba(),e=(function(){function i(){this.onResumed=new r.EventHandler,this.suspendCounter=0,this.locks=new Set}return Object.defineProperty(i.prototype,"isSuspended",{get:function(){return this.suspendCounter>0||this.locks.size>0},enumerable:!1,configurable:!0}),i.prototype.suspend=function(){this.suspendCounter++},i.prototype.resume=function(n){n===void 0&&(n=!1),this.suspendCounter=n?0:Math.max(this.suspendCounter-1,0),this.suspendCounter===0&&this.onResumed.raiseEvent()},i.prototype.lock=function(){var n=this,t=function(){var o=n.locks.delete(t);return o||console.warn('Seems like a suspender unlock token has been called multiple times. Make sure the logic is correct."'),o};return this.locks.add(t),t},i})();return Pk.UpdateSuspender=e,Pk}var Ck={},Tk={},PJ;function Vbe(){if(PJ)return Tk;PJ=1,Object.defineProperty(Tk,"__esModule",{value:!0}),Tk.OneTimePerformanceWarning=void 0;var r=LH(),e=Gd(),i=(function(){function n(t,o){o===void 0&&(o=!0),this.warnedProperty=!1,this.messageProperty=t,this.checkLicense=o}return n.prototype.warn=function(){return!e.SciChartDefaults.performanceWarnings||this.warnedProperty||this.checkLicense&&!r.licenseManager2dState.isDev?!1:(console.warn(this.messageProperty),this.warnedProperty=!0,!0)},n})();return Tk.OneTimePerformanceWarning=i,Tk}var CJ;function $F(){if(CJ)return Ck;CJ=1,Object.defineProperty(Ck,"__esModule",{value:!0}),Ck.performanceWarnings=void 0;var r=Vbe(),e=". To disable this warning set SciChartDefaults.performanceWarnings = false";return Ck.performanceWarnings={dataDistributionFlagNaN:new r.OneTimePerformanceWarning("Data Distribution flag (BaseDataSeries.containsNaN = false) can be applied to improve performance. Read this website article https://www.scichart.com/documentation/js/current/DataSeries_Resampling.html for more info"+e),dataDistributionFlagSortedAscending:new r.OneTimePerformanceWarning("Data Distribution flag (BaseDataSeries.isSorted = true) can be applied to improve performance. Read this website article https://www.scichart.com/documentation/js/current/DataSeries_Resampling.html for more info"+e),subchartBackgroundNotSimpleColor:new r.OneTimePerformanceWarning("When using isTransparent: false on a SubChart, the background needs to be a simple color, not an html gradient (which the default theme uses)"+e),dataLabelsSkippingMany:new r.OneTimePerformanceWarning("DataLabelProvider generated many more labels than it could display.  To improve performance consider increasing the pointGapThreshold, increasing the skipNumber, or decreasing the pointCountThreshold"+e),dateTimeDeltaCalculatorBadDelta:new r.OneTimePerformanceWarning("The DateTimeDeltaCalculator could not find a suitable delta given the current settings. Either increase axis.maxAutoTicks, set axis.deltaCalculator.minTicks less than maxAutoTicks / 3, or set possibleDeltas to an array containing more closely spaced values"+e),wasmSimdWarning:new r.OneTimePerformanceWarning("WebAssembly SIMD is not supported by your browser or disabled by config. Ensure you serve the files scichart2d-nosimd.wasm and scichart3d-nosimd.wasm"+e,!1)},Ck}var DP={},xk={},TJ;function $n(){return TJ||(TJ=1,(function(r){var e=xk&&xk.__spreadArray||function(d,f,h){if(h||arguments.length===2)for(var p=0,g=f.length,v;p<g;p++)(v||!(p in f))&&(v||(v=Array.prototype.slice.call(f,0,p)),v[p]=f[p]);return d.concat(v||Array.prototype.slice.call(f))};Object.defineProperty(r,"__esModule",{value:!0}),r.createWasmContextRevocableProxy=r.WasmContextProxyHandler=r.WasmObjectConstructorProxyHandler=r.DeletableEntityProxyHandler=r.DeletableEntity=r.createTrackableProxy=void 0;var i=Yv(),n=function(d,f){f===void 0&&(f=!1);var h=(0,i.generateIdentifier)(d),p=Proxy.revocable(d,new o(h));return i.MemoryUsageHelper.objectRegistry.add(d,h,{proxy:p.proxy,revocableToken:p,isWasmObject:f}),p.proxy};r.createTrackableProxy=n;var t=(function(){function d(f){try{var h}catch(p){console.warn("Error while creating an object proxy: ".concat(p," "))}}return d})();r.DeletableEntity=t;var o=(function(){function d(f){this.disposableEntityId=f}return d.prototype.construct=function(f,h){return console.warn("construct called on Deletable",this.disposableEntityId),f},d.prototype.apply=function(f,h,p){console.warn("apply called on Deletable",this.disposableEntityId)},d.prototype.get=function(f,h,p){var g=this;return h==="delete"?function(){for(var v=[],y=0;y<arguments.length;y++)v[y]=arguments[y];var m=i.MemoryUsageHelper.objectRegistry.remove(g.disposableEntityId);return m||console.warn("Failed to remove ".concat(g.disposableEntityId," from the Object Registry Probably it has been already deleted!")),f[h].apply(f,v)}:f[h]},d})();r.DeletableEntityProxyHandler=o;var a=(function(){function d(){}return d.prototype.construct=function(f,h,p){var g=new(f.bind.apply(f,e([void 0],h,!1)));return(0,r.createTrackableProxy)(g,!0)},d})();r.WasmObjectConstructorProxyHandler=a;var s={construct:function(){return s}},l=function(d){try{return!!new new Proxy(d,s)}catch{return!1}},u=(function(){function d(){this.constructorProxyHandler=new a}return d.prototype.get=function(f,h,p){var g=f[h],v=l(g);return v?new Proxy(g,this.constructorProxyHandler):g},d})();r.WasmContextProxyHandler=u;var c=function(d,f){i.MemoryUsageHelper.register(d,"wasmContext_".concat(f));var h={};return Proxy.revocable(d,h)};r.createWasmContextRevocableProxy=c})(xk)),xk}var Ek={},xJ;function Ep(){if(xJ)return Ek;xJ=1,Object.defineProperty(Ek,"__esModule",{value:!0}),Ek.Size=void 0;var r=(function(){function e(i,n){this.width=i,this.height=n}return e.isEqual=function(i,n){return(i==null?void 0:i.width)===(n==null?void 0:n.width)&&(i==null?void 0:i.height)===(n==null?void 0:n.height)},e.EMPTY=new e(0,0),e})();return Ek.Size=r,Ek}var EJ;function Jq(){if(EJ)return DP;EJ=1;var r=DP&&DP.__extends||(function(){var c=function(d,f){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(h[g]=p[g])},c(d,f)};return function(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");c(d,f);function h(){this.constructor=d}d.prototype=f===null?Object.create(f):(h.prototype=f.prototype,new h)}})();Object.defineProperty(DP,"__esModule",{value:!0}),DP.SciChartSurfaceCore=void 0;var e=$n(),i=Ba(),n=Rg(),t=Ep(),o=Ha(),a=ws(),s=Lf(),l=ca(),u=(function(c){r(d,c);function d(f){var h=c.call(this)||this;return h.preRender=new i.EventHandler,h.rendered=new i.EventHandler,h.painted=new i.EventHandler,h.resized=new i.EventHandler,h.idProperty=(0,a.generateGuid)(),h.isDeletedProperty=!1,h.deletables=[],h.domChartRoot=f.domChartRoot,h.domCanvas2D=f.domCanvas2D,h.domSvgContainer=f.domSvgContainer,h.domSvgAdornerLayer=f.domSvgAdornerLayer,h.domDivContainer=f.domDivContainer,h.domBackgroundSvgContainer=f.domBackgroundSvgContainer,h}return Object.defineProperty(d.prototype,"id",{get:function(){return this.idProperty},set:function(f){this.idProperty=f},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isDeleted",{get:function(){return this.isDeletedProperty},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"otherSurfaces",{get:function(){return this.getOtherSurfaces()},enumerable:!1,configurable:!0}),d.prototype.addDeletable=function(f){this.deletables.push(f)},d.prototype.onResize=function(f,h){l.PerformanceDebugHelper.mark(l.EPerformanceMarkType.Resize,{contextId:this.id}),s.Logger.debug("onResize",f,h),this.changeViewportSize(f,h),this.resized.raiseEvent(new t.Size(f,h))},d.prototype.getOtherSurfaces=function(){var f;return(0,o.getIs2DSurfaceType)(this.surfaceType)?f=(0,n.getOther2DDestinations)(this):(0,o.getIs3DSurfaceType)(this.surfaceType)?f=(0,n.getOther3DDestinations)(this):f=(0,n.getOtherPieDestinations)(this),f.map(function(h){return h.sciChartSurface})},d})(e.DeletableEntity);return DP.SciChartSurfaceCore=u,DP}var AJ;function ln(){return AJ||(AJ=1,(function(r){var e=om&&om.__extends||(function(){var K=function(H,U){return K=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(I,Q){I.__proto__=Q}||function(I,Q){for(var Z in Q)Object.prototype.hasOwnProperty.call(Q,Z)&&(I[Z]=Q[Z])},K(H,U)};return function(H,U){if(typeof U!="function"&&U!==null)throw new TypeError("Class extends value "+String(U)+" is not a constructor or null");K(H,U);function I(){this.constructor=H}H.prototype=U===null?Object.create(U):(I.prototype=U.prototype,new I)}})(),i=om&&om.__awaiter||function(K,H,U,I){function Q(Z){return Z instanceof U?Z:new U(function(ee){ee(Z)})}return new(U||(U=Promise))(function(Z,ee){function ie(_e){try{pe(I.next(_e))}catch(Te){ee(Te)}}function de(_e){try{pe(I.throw(_e))}catch(Te){ee(Te)}}function pe(_e){_e.done?Z(_e.value):Q(_e.value).then(ie,de)}pe((I=I.apply(K,H||[])).next())})},n=om&&om.__generator||function(K,H){var U={label:0,sent:function(){if(Z[0]&1)throw Z[1];return Z[1]},trys:[],ops:[]},I,Q,Z,ee;return ee={next:ie(0),throw:ie(1),return:ie(2)},typeof Symbol=="function"&&(ee[Symbol.iterator]=function(){return this}),ee;function ie(pe){return function(_e){return de([pe,_e])}}function de(pe){if(I)throw new TypeError("Generator is already executing.");for(;U;)try{if(I=1,Q&&(Z=pe[0]&2?Q.return:pe[0]?Q.throw||((Z=Q.return)&&Z.call(Q),0):Q.next)&&!(Z=Z.call(Q,pe[1])).done)return Z;switch(Q=0,Z&&(pe=[pe[0]&2,Z.value]),pe[0]){case 0:case 1:Z=pe;break;case 4:return U.label++,{value:pe[1],done:!1};case 5:U.label++,Q=pe[1],pe=[0];continue;case 7:pe=U.ops.pop(),U.trys.pop();continue;default:if(Z=U.trys,!(Z=Z.length>0&&Z[Z.length-1])&&(pe[0]===6||pe[0]===2)){U=0;continue}if(pe[0]===3&&(!Z||pe[1]>Z[0]&&pe[1]<Z[3])){U.label=pe[1];break}if(pe[0]===6&&U.label<Z[1]){U.label=Z[1],Z=pe;break}if(Z&&U.label<Z[2]){U.label=Z[2],U.ops.push(pe);break}Z[2]&&U.ops.pop(),U.trys.pop();continue}pe=H.call(K,U)}catch(_e){pe=[6,_e],Q=0}finally{I=Z=0}if(pe[0]&5)throw pe[1];return{value:pe[0]?pe[1]:void 0,done:!0}}};Object.defineProperty(r,"__esModule",{value:!0}),r.getLocateFile=r.getMasterCanvas=r.createChartDestination=r.SciChartSurfaceBase=r.DebugForDpi=void 0;var t=Jn(),o=EM(),a=So(),s=Mr(),l=Ba(),u=Rg(),c=ni(),d=Fbe(),f=FS(),h=ZUe(),p=XS(),g=jbe(),v=A1(),y=$o(),m=Wd(),b=Ha(),S=qq(),_=xf(),C=Yv(),T=IH(),x=Gd(),A=Hi(),w=Bbe(),L=$F(),k=Jq();r.DebugForDpi=!1;var D="http://www.w3.org/2000/svg",j=(function(K){e(H,K);function H(U,I){I===void 0&&(I={});var Q=K.call(this,I)||this;Q.suspender=new w.UpdateSuspender,Q.redrawRequested=new l.EventHandler,Q.layoutMeasured=new l.EventHandler,Q.genericAnimationsRun=new l.EventHandler,Q.renderedToWebGl=new l.EventHandler,Q.renderedToDestination=new l.EventHandler,Q.hasInvalidState=!1,Q.isWebGLContextActive=!0,Q.themeProviderProperty=H.DEFAULT_THEME,Q.previousThemeProviderProperty=H.DEFAULT_THEME,Q.isInitializedProperty=!1,Q.freezeWhenOutOfViewProperty=!1,c.Guard.notNull(U,"webAssemblyContext"),Q.domCanvasWebGL=I.domCanvasWebGL,Q.domSeriesBackground=I.domSeriesBackground,Q.sharedWasmContext=U,Q.propertyChanged=new l.EventHandler,Q.detachChartModifier=Q.detachChartModifier.bind(Q),Q.attachChartModifier=Q.attachChartModifier.bind(Q),Q.chartModifiers=new f.ObservableArray,Q.chartModifiers.collectionChanged.subscribe(function(pe){var _e,Te;(_e=pe.getOldItems())===null||_e===void 0||_e.forEach(function(De){return Q.detachChartModifier(De)}),(Te=pe.getNewItems())===null||Te===void 0||Te.forEach(function(De){return Q.attachChartModifier(De)})}),Q.detachAnnotation=Q.detachAnnotation.bind(Q),Q.attachAnnotation=Q.attachAnnotation.bind(Q),Q.annotations=new f.ObservableArray,Q.modifierAnnotations=new f.ObservableArray,Q.annotations.collectionChanged.subscribe(function(pe){var _e,Te;(_e=pe.getOldItems())===null||_e===void 0||_e.forEach(function(De){return Q.detachAnnotation(De)}),(Te=pe.getNewItems())===null||Te===void 0||Te.forEach(function(De){return Q.attachAnnotation(De)})}),Q.modifierAnnotations.collectionChanged.subscribe(function(pe){var _e,Te;(_e=pe.getOldItems())===null||_e===void 0||_e.forEach(function(De){return Q.detachAnnotation(De)}),(Te=pe.getNewItems())===null||Te===void 0||Te.forEach(function(De){return Q.attachAnnotation(De)})}),Q.mouseManager=new d.MouseManager(Q),I.domCanvasWebGL?Q.mouseManager.subscribe(I.domCanvasWebGL):I.domCanvas2D&&Q.mouseManager.subscribe(I.domCanvas2D),Q.onDpiChanged=Q.onDpiChanged.bind(Q),A.DpiHelper.dpiChanged.subscribe(Q.onDpiChanged);try{var Z,ee,ie}catch(pe){console.warn(pe)}if(!a.IS_TEST_ENV&&H.invalidateOnTabVisible){var de=function(){document.visibilityState==="visible"&&Q.invalidateElement({force:!0})};document.addEventListener("visibilitychange",de),Q.addDeletable({delete:function(){return document.removeEventListener("visibilitychange",de)}})}return Q}return H.disposeSharedWasmContext=function(){u.sciChart3DDestinations.length===0&&u.sciChartDestinations.length===0&&H.domMasterCanvas&&(document.body.removeChild(H.domMasterCanvas),H.domMasterCanvas=void 0)},H.setRuntimeLicenseKey=function(U){o.licenseManager.setRuntimeLicenseKey(U)},H.UseCommunityLicense=function(){o.licenseManager.setRuntimeLicenseKey("community")},H.setServerLicenseEndpoint=function(U){o.licenseManager.setServerLicenseEndpoint(U)},H.setLicenseCallback=function(U){o.licenseManager.setLicenseCallback(U)},H.resolveOptions=function(U){if(U!=null&&U.theme&&"type"in U.theme){if(!("applyOverrides"in U.theme)){var I=(0,t.createType)(y.EBaseType.ThemeProvider,U.theme.type,null,U.theme);"applyOverrides"in I&&I.applyOverrides(U.theme),U.theme=I}}else U?U.theme=H.DEFAULT_THEME:U={theme:H.DEFAULT_THEME};return U!=null&&U.loader&&("addChartLoader"in U.loader||(U.loader=(0,t.createType)(y.EBaseType.Loader,U.loader.type,null,U.loader))),U},Object.defineProperty(H.prototype,"background",{get:function(){return this.backgroundProperty},set:function(U){this.backgroundProperty!==U&&(this.backgroundProperty=U,this.notifyPropertyChanged("Background"))},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"isCopyCanvasSurface",{get:function(){return!this.domCanvasWebGL&&this.domCanvas2D},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"seriesViewRect",{get:function(){return this.seriesViewRectProperty},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"viewRect",{get:function(){return this.chartViewRect},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"clipRect",{get:function(){return this.viewRect},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"otherSurfaces",{get:function(){return this.getOtherSurfaces()},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"isInitialized",{get:function(){return this.isInitializedProperty},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"isSuspended",{get:function(){return this.suspender.isSuspended},enumerable:!1,configurable:!0}),H.prototype.resumeUpdates=function(U){var I;this.suspender.resume(U==null?void 0:U.force),(!((I=U==null?void 0:U.invalidateOnResume)!==null&&I!==void 0)||I)&&this.invalidateElement()},H.prototype.suspendUpdates=function(){this.suspender.suspend()},H.prototype.applyTheme=function(U){this.previousThemeProviderProperty=this.themeProviderProperty,this.themeProviderProperty=U,this.chartModifiers.asArray().forEach(function(I){return I.applyTheme(U)}),this.invalidateElement()},Object.defineProperty(H.prototype,"themeProvider",{get:function(){return this.themeProviderProperty},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"previousThemeProvider",{get:function(){return this.previousThemeProviderProperty},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"isPolar",{get:function(){return this.surfaceType===b.ESurfaceType.SciChartPolarSurfaceType},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"freezeWhenOutOfView",{get:function(){return this.freezeWhenOutOfViewProperty},set:function(U){var I=this,Q,Z;this.freezeWhenOutOfViewProperty=U,U&&!this.visibilityObserver?this.visibilityObserver=h.VisibilityObserver.observe(this.domChartRoot,function(ee){!ee&&!I.cleanupLockToken?I.cleanupLockToken=I.suspender.lock():ee&&I.cleanupLockToken&&(I.cleanupLockToken(),I.cleanupLockToken=void 0)}):!U&&this.visibilityObserver&&((Q=this.visibilityObserver)===null||Q===void 0||Q.disconnect(),this.visibilityObserver=void 0,(Z=this.cleanupLockToken)===null||Z===void 0||Z.call(this))},enumerable:!1,configurable:!0}),H.prototype.delete=function(U){var I=this,Q,Z;this.isDeletedProperty=!0;var ee=(Q=this.destinations)===null||Q===void 0?void 0:Q.findIndex(function(_e){return _e.sciChartSurface.id===I.id});ee>=0&&this.destinations.splice(ee,1),A.DpiHelper.dpiChanged.unsubscribe(this.onDpiChanged),this.mouseManager.unsubscribe(),this.mouseManager=void 0,this.chartModifiers.asArray().forEach(function(_e){return _e.delete()}),this.modifierAnnotations.asArray().forEach(function(_e){return _e.delete()}),this.annotations.asArray().forEach(function(_e){return _e.delete()}),this.adornerLayer=void 0;for(var ie=0,de=this.deletables;ie<de.length;ie++){var pe=de[ie];(0,s.deleteSafe)(pe)}this.domChartRoot=void 0,this.domCanvasWebGL=void 0,this.domCanvas2D=void 0,this.domSvgContainer=void 0,this.domSvgAdornerLayer=void 0,this.domBackgroundSvgContainer=void 0,this.domSeriesBackground=void 0,this.domDivContainer=void 0,this.sharedWasmContext=void 0,this.deletables=[],(Z=this.visibilityObserver)===null||Z===void 0||Z.disconnect(),this.visibilityObserver=void 0},H.prototype.getMainCanvas=function(){return this.domCanvasWebGL||this.domCanvas2D},H.prototype.setSeriesViewRect=function(U){this.seriesViewRectProperty=U},H.prototype.setDestinations=function(U){this.destinations=U},H.prototype.setIsInitialized=function(){this.isInitializedProperty=!0},H.prototype.getLicenseContext=function(){return this.sharedWasmContext},H.prototype.onDpiChanged=function(U){this.annotations.asArray().forEach(function(I){return I.onDpiChanged(U)}),this.modifierAnnotations.asArray().forEach(function(I){return I.onDpiChanged(U)}),this.invalidateElement()},H.prototype.nextStateRender=function(U){return i(this,void 0,void 0,function(){var I=this;return n(this,function(Q){return[2,new Promise(function(Z,ee){var ie=function(de){try{if(!de){if(U!=null&&U.suspendAfter){var pe=I.suspendUpdates();Z(pe)}else Z(null);I.rendered.unsubscribe(ie)}}catch(_e){console.error(_e),ee(_e)}};I.rendered.subscribe(ie),U!=null&&U.resumeBefore&&(I.resumeUpdates(),U!=null&&U.invalidateOnResume&&I.invalidateElement())})]})})},Object.defineProperty(H.prototype,"chartModifierGroups",{get:function(){var U=this.chartModifiers.asArray().filter(function(I){return I.modifierGroup!==void 0}).map(function(I){return I.modifierGroup});return(0,_.getUniqueValues)(U)},enumerable:!1,configurable:!0}),H.prototype.clearRootElement=function(U){if(U&&this.domChartRoot){var I=this.domChartRoot.style;I&&(I.background="",I.position=""),this.domChartRoot.hasOwnProperty("replaceChildren")?this.domChartRoot.replaceChildren():this.domChartRoot.innerHTML=""}},H.prototype.applyOptions=function(U){var I,Q;this.idProperty=(I=U==null?void 0:U.id)!==null&&I!==void 0?I:this.idProperty,this.widthAspect=U==null?void 0:U.widthAspect,this.heightAspect=U==null?void 0:U.heightAspect,this.disableAspect=U==null?void 0:U.disableAspect,this.freezeWhenOutOfView=(Q=U==null?void 0:U.freezeWhenOutOfView)!==null&&Q!==void 0?Q:!1},H.prototype.detachChartModifier=function(U){U.modifierType!==m.EModifierType.MultiChart2DModifier&&(U.invalidateParentCallback=void 0,U.onDetach(),U.setParentSurface(void 0),this.invalidateElement())},H.prototype.attachChartModifier=function(U){if(U.modifierType===m.EModifierType.MultiChart2DModifier){if(this.chartModifiers.asArray().filter(function(I){return I===U}).length>1)throw Error("Invalid operation in sciChartSurface.attachChartModifier, this FinChartModifier has already been attached to this SciChartSurface.")}else if(U.invalidateParentCallback)throw Error("Invalid operation in sciChartSurface.attachChartModifier, this chartModifier has already been attached to a SciChartSurface. Please detach it from a SciChartSurface before attaching to another");this.themeProviderProperty&&U.applyTheme(this.themeProviderProperty)},H.prototype.notifyPropertyChanged=function(U){var I;(I=this.propertyChanged)===null||I===void 0||I.raiseEvent(new p.PropertyChangedEventArgs(U)),this.invalidateElement()},H.prototype.changeMasterCanvasViewportSize=function(U,I,Q){if(H.domMasterCanvas){var Z=I,ee=Q,ie=H.domMasterCanvas.width/A.DpiHelper.PIXEL_RATIO,de=H.domMasterCanvas.height/A.DpiHelper.PIXEL_RATIO;ie>Z&&(Z=ie),de>ee&&(ee=de),A.DpiHelper.setSize(H.domMasterCanvas,Z,ee);var pe=H.domMasterCanvas.width,_e=H.domMasterCanvas.height;U.SCRTSetMainWindowSize(pe,_e)}},H.prototype.changeWebGLCanvasViewportSize=function(U,I,Q){if(this.domCanvasWebGL){var Z=I*A.DpiHelper.PIXEL_RATIO,ee=Q*A.DpiHelper.PIXEL_RATIO;A.DpiHelper.setSize(this.domCanvasWebGL,I,Q),U.SCRTSetMainWindowSize(Z,ee)}},H.prototype.setSvgClipPathDefinitions=function(U,I,Q){var Z=U.querySelector("defs"),ee="seriesViewRectClip_".concat(this.id),ie="surfaceViewRectClip_".concat(this.id);if(Z||(Z=document.createElementNS(D,"defs")),!Z.querySelector("[id='".concat(ee,"']"))){var de=document.createElementNS(D,"clipPath");de.setAttribute("id",ee);var pe=document.createElementNS(D,"rect");de.appendChild(document.createElementNS(D,"rect")),de.appendChild(pe),Z.appendChild(de);var _e=document.createElementNS(D,"clipPath");_e.setAttribute("id",ie);var Te=document.createElementNS(D,"rect");_e.appendChild(document.createElementNS(D,"rect")),_e.appendChild(Te),Z.appendChild(_e),U.appendChild(Z)}var De=Z.querySelector("[id='".concat(ee,"']")).firstElementChild,Pe=Z.querySelector("[id='".concat(ie,"']")).firstElementChild;De.setAttribute("x","".concat(I.x)),De.setAttribute("y","".concat(I.y)),De.setAttribute("width","".concat(I.width)),De.setAttribute("height","".concat(I.height)),Pe.setAttribute("x","".concat(Q.x)),Pe.setAttribute("y","".concat(Q.y)),Pe.setAttribute("width","".concat(Q.width)),Pe.setAttribute("height","".concat(Q.height))},H.prototype.detachAnnotation=function(U){U.onDetach(),U.invalidateParentCallback=void 0,U.parentSurface=void 0,this.invalidateElement()},H.prototype.attachAnnotation=function(U){if(U.invalidateParentCallback)throw new Error("Invalid operation in sciChartSurface.attachAnnotation, this annotation has already been attached to a SciChartSurface. Please detach it from a SciChartSurface before attaching to another");U.parentSurface=this,U.invalidateParentCallback=this.invalidateElement,U.onAttach(this),this.invalidateElement()},H.DEFAULT_THEME=new T.SciChartJSDarkv2Theme,H.AntiAliasWebGlBackbuffer=!1,H.wasmContextDisposeTimeout=0,H.autoDisposeWasmContext=!1,H.invalidateOnTabVisible=!0,H})(k.SciChartSurfaceCore);r.SciChartSurfaceBase=j;var N=function(K){if(K)return{canvas:K,GetHeight:function(){return this.canvas.height},GetWidth:function(){return this.canvas.width},GetID:function(){return this.canvas.id}}};r.createChartDestination=N;var V=function(){var K="SciChartMasterCanvas";if(!j.domMasterCanvas){var H=document.createElement("canvas");H.id=K,H.style.display="none",H.style.position="absolute",H.style.left="0",H.style.top="0",r.DebugForDpi&&(H.style.background="#00000077",H.style.pointerEvents="none",H.style.left="",H.style.top="",H.style.display="inline"),H.addEventListener("webglcontextcreationerror",function(U){console.warn("WebGL Context creation error: ",U.statusMessage||"Unknown error")},!1),document.body.appendChild(H),v.WebGlHelper.getContext(H,{premultipliedAlpha:!0,antialias:j.AntiAliasWebGlBackbuffer}),j.domMasterCanvas=H}return j.domMasterCanvas};r.getMasterCanvas=V;var W=function(K){return function(H,U){var I,Q;if(H.endsWith(".wasm")){var Z=void 0;switch(x.SciChartDefaults.useWasmSimd){case S.EUseWasmSimd.Always:Z=!0;break;case S.EUseWasmSimd.Never:Z=!1;break;case S.EUseWasmSimd.Auto:default:Z=g.SimdHelper.supportsWasmSIMD();break}if(K!=null&&K.wasmUrl){var ee=K.wasmUrl;return Z||(L.performanceWarnings.wasmSimdWarning.warn(),ee=(I=K==null?void 0:K.wasmNoSimdUrl)!==null&&I!==void 0?I:ee.replace(/\.wasm(\?|$)/,"-nosimd.wasm$1")),ee}else{var ie=H;return Z||(L.performanceWarnings.wasmSimdWarning.warn(),ie=(Q=K==null?void 0:K.wasmNoSimdUrl)!==null&&Q!==void 0?Q:H.replace(/\.wasm(\?|$)/,"-nosimd.wasm$1")),U+ie}}return U+H}};r.getLocateFile=W})(om)),om}var wJ;function Hi(){if(wJ)return CP;wJ=1;var r=CP&&CP.__assign||function(){return r=Object.assign||function(a){for(var s,l=1,u=arguments.length;l<u;l++){s=arguments[l];for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&(a[c]=s[c])}return a},r.apply(this,arguments)};Object.defineProperty(CP,"__esModule",{value:!0}),CP.DpiHelper=void 0;var e=So(),i=Ba(),n=Yo(),t=ln(),o=(function(){function a(){}return a.initialize=function(){a.initialized||(a.PIXEL_RATIO=1,a.IsDpiScaleEnabled&&typeof window<"u"&&window.devicePixelRatio&&(a.PIXEL_RATIO=window.devicePixelRatio),t.DebugForDpi&&console.log("Initializing Dpi Helper. Scaling factor = "+a.PIXEL_RATIO),a.IsDpiScaleEnabled&&!e.IS_TEST_ENV&&window.addEventListener("resize",function(){var s=window.devicePixelRatio||1,l=a.PIXEL_RATIO;l!==s&&(t.DebugForDpi&&console.log("Dpi Changing, was ".concat(l,", now ").concat(s)),a.PIXEL_RATIO=s,a.dpiChanged.raiseEvent({newValue:s,oldValue:l}))}),a.initialized=!0)},a.createCanvas=function(s,l){s===void 0&&(s=0),l===void 0&&(l=0);var u=document.createElement("canvas");return s&&l&&a.setSize(u,s,l),u},a.setSize=function(s,l,u){a.setWidth(s,l),a.setHeight(s,u)},a.setWidth=function(s,l){t.DebugForDpi&&console.log("setWidth ".concat(s.id," backBuffer=").concat(l*a.PIXEL_RATIO," display=").concat(l)),s.width=l*a.PIXEL_RATIO},a.setHeight=function(s,l){t.DebugForDpi&&console.log("setHeight ".concat(s.id," backBuffer=").concat(l*a.PIXEL_RATIO," display=").concat(l)),s.height=l*a.PIXEL_RATIO},a.adjustLineStyle=function(s,l){l===void 0&&(l=a.PIXEL_RATIO);var u=r({},s);return u.end*=l,u.start*=l,u.strokeThickness*=l,u},a.adjustTextStyle=function(s,l){l===void 0&&(l=a.PIXEL_RATIO);var u=r({},s);return u.fontSize=Math.round(u.fontSize*l),s.padding&&(u.padding=a.adjustThickness(s.padding,l)),u},a.adjustStrokeSize=function(s,l){var u;l===void 0&&(l=a.PIXEL_RATIO);var c=r({},s),d=Math.round(s.strokeThickness*l);return c.strokeDashArray=(u=s.strokeDashArray)===null||u===void 0?void 0:u.map(function(f){return Math.round(f*l)}),c.strokeThickness=d>0||s.strokeThickness===0?d:1,c},a.adjustThickness=function(s,l){return l===void 0&&(l=a.PIXEL_RATIO),new n.Thickness(Math.round(s.top*l),Math.round(s.right*l),Math.round(s.bottom*l),Math.round(s.left*l))},a.IsDpiScaleEnabled=!0,a.dpiChanged=new i.EventHandler,a})();return CP.DpiHelper=o,CP}var RP={},Ak={},wk={},OJ;function vn(){if(OJ)return wk;OJ=1,Object.defineProperty(wk,"__esModule",{value:!0}),wk.Rect=void 0;var r=Ii(),e=(function(){function i(n,t,o,a){if(o<0||a<0)throw new Error("Can not create Rect with negative width/height");this.x=n,this.y=t,this.width=o,this.height=a}return i.create=function(n,t,o,a){if(o<0||a<0)throw new Error("Rect.create width and height cannot be less than zero");return new i(n,t,o,a)},i.createWithCoords=function(n,t,o,a){var s=n,l=t,u=o-n,c=a-t;return new i(s,l,u,c)},i.createWithPoints=function(n,t){var o=Math.min(n.x,t.x),a=Math.min(n.y,t.y),s=Math.max(Math.max(n.x,t.x)-o,0),l=Math.max(Math.max(n.y,t.y)-a,0);return i.create(o,a,s,l)},i.createCopy=function(n){return new i(n.x,n.y,n.width,n.height)},i.createZero=function(){return new i(0,0,0,0)},i.isEqual=function(n,t){return n.x===t.x&&n.y===t.y&&n.width===t.width&&n.height===t.height},i.clipPointToRect=function(n,t){var o=n.x<t.x?t.x:n.x>t.x+t.width?t.x+t.width:n.x,a=n.y<t.y?t.y:n.y>t.y+t.height?t.y+t.height:n.y;return new r.Point(o,a)},i.intersect=function(n,t){var o=Math.max(n.left,t.left),a=Math.max(n.top,t.top),s=Math.min(n.right,t.right),l=Math.min(n.bottom,t.bottom);return o>s||a>l?i.createZero():i.createWithCoords(o,a,s,l)},Object.defineProperty(i.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),i.hydrate=function(n){if(n){var t=n.x,o=n.y,a=n.width,s=n.height;return new i(t,o,a,s)}else return},i})();return wk.Rect=e,wk}var Ok={},Dk={},W4={},DJ;function Vd(){return DJ||(DJ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.getFontFamily=r.getDefaultFontName=r.getFontString=void 0;var e=Gd(),i=function(o,a,s,l){var u=(0,r.getFontFamily)(l,!1);return a?"".concat(o," ").concat(a," ").concat(s,"px ").concat(u):"".concat(o," ").concat(s,"px ").concat(u)};r.getFontString=i;var n=function(){return e.SciChartDefaults.autoFontName.toLowerCase()};r.getDefaultFontName=n;var t=function(o,a){return o.toLowerCase()===(0,r.getDefaultFontName)()?a?e.SciChartDefaults.nativeFontFamily:e.SciChartDefaults.canvasFontFamily:o};r.getFontFamily=t})(W4)),W4}var RJ;function Xi(){return RJ||(RJ=1,(function(r){var e=Dk&&Dk.__extends||(function(){var k=function(D,j){return k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(N,V){N.__proto__=V}||function(N,V){for(var W in V)Object.prototype.hasOwnProperty.call(V,W)&&(N[W]=V[W])},k(D,j)};return function(D,j){if(typeof j!="function"&&j!==null)throw new TypeError("Class extends value "+String(j)+" is not a constructor or null");k(D,j);function N(){this.constructor=D}D.prototype=j===null?Object.create(j):(N.prototype=j.prototype,new N)}})();Object.defineProperty(r,"__esModule",{value:!0}),r.getAllFontKeys=r.getFontKey=r.getVector3=r.getVector2=r.getVector4=r.getNativeRect=r.getTextBounds=r.getTextureVertex=r.getArcParams=r.getArcVertex=r.getVertex=r.getVectorArcVertex=r.getVectorColorTextureVertex=r.getVectorColorVertex=r.getVectorRectVertex=r.freeCache=r.deleteCache=r.FontKey=void 0;var i=So(),n=$n(),t=Mr(),o=Vd(),a=k1(),s=Gd(),l=(function(k){e(D,k);function D(j){var N=k.call(this)||this;return N.firstLoadTime=Date.now(),N.nativeKey=j,N}return D.prototype.delete=function(){(0,t.deleteSafe)(this.nativeKey)},D})(n.DeletableEntity);r.FontKey=l;var u=new Map,c=function(k){var D,j,N=(j=(D=k==null?void 0:k.canvas)===null||D===void 0?void 0:D.id)!==null&&j!==void 0?j:"TEST";return u.has(N)||u.set(N,{vecRects:void 0,vecColorVertex:void 0,vecColorTextureVertex:void 0,vecArcVertex:void 0,vertex:void 0,arcVertex:void 0,textureVertex:void 0,rect:void 0,vector4:void 0,vector2:void 0,vector3:void 0,textBounds:void 0,arcParams:void 0,keyCache:new Map}),u.get(N)},d=function(k){if(k.canvas){var D=k.canvas.id,j=u.get(D);j&&((0,t.deleteSafe)(j.vecRects),(0,t.deleteSafe)(j.vecColorVertex),(0,t.deleteSafe)(j.vecColorTextureVertex),(0,t.deleteSafe)(j.vecArcVertex),(0,t.deleteSafe)(j.vertex),(0,t.deleteSafe)(j.arcVertex),(0,t.deleteSafe)(j.textureVertex),(0,t.deleteSafe)(j.rect),(0,t.deleteSafe)(j.vector4),(0,t.deleteSafe)(j.vector2),(0,t.deleteSafe)(j.vector3),(0,t.deleteSafe)(j.arcParams),(0,t.deleteSafe)(j.textBounds),j.keyCache.forEach(function(N){return(0,t.deleteSafe)(N)})),u.delete(D)}};r.deleteCache=d;var f=function(k){return{delete:function(){return(0,r.deleteCache)(k)}}};r.freeCache=f;var h=function(k,D){D===void 0&&(D=100);var j=c(k);if(j){var N=j.vecRects;return N||(N=new k.VectorRectVertex,N.reserve(D),j.vecRects=N),N.clear(),N}};r.getVectorRectVertex=h;var p=function(k,D){D===void 0&&(D=100);var j=c(k);if(j){var N=j.vecColorVertex;return N||(N=new k.VectorColorVertex,N.reserve(D),j.vecColorVertex=N),N.clear(),N}};r.getVectorColorVertex=p;var g=function(k,D){D===void 0&&(D=100);var j=c(k);if(j){var N=j.vecColorTextureVertex;return N||(N=new k.VectorColorTextureVertex,N.reserve(D),j.vecColorTextureVertex=N),N.clear(),N}};r.getVectorColorTextureVertex=g;var v=function(k,D){D===void 0&&(D=100);var j=c(k);if(j){var N=j.vecArcVertex;return N||(N=new k.VectorArcVertex,N.reserve(D),j.vecArcVertex=N),N.clear(),N}};r.getVectorArcVertex=v;var y=function(k,D,j,N){var V=c(k);if(V){var W=V.vertex;return W?(W.SetPosition(D,j),W.m_uiColor=N??i.NEUTRAL_COLOR):(W=new k.SCRTColorVertex(D,j),V.vertex=W),W}};r.getVertex=y;var m=function(k){var D=c(k);if(D){var j=D.arcVertex;return j||(j=new k.SCRTArcVertex,D.arcVertex=j),j}};r.getArcVertex=m;var b=function(k,D,j,N,V,W,K,H,U,I){var Q=c(k);if(Q){var Z=Q.arcParams;return Z||(Z=new k.SCRTArcParams,Q.arcParams=Z),Z.m_fCenterX=D,Z.m_fCenterY=j,Z.m_fStartAngle=N,Z.m_fEndAngle=V,Z.m_fRadius=W,Z.m_fInnerRadius=K,Z.m_fIsGridLineMode=H,Z.m_fAspectRatio=U,Z.m_fLineThickness=I,Z}};r.getArcParams=b;var S=function(k,D,j,N,V,W){var K=c(k);if(K){var H=K.textureVertex;return H?(H.SetPosition(D,j),H.m_uiColor=N??i.NEUTRAL_COLOR):(H=new k.SCRTColorTextureVertex(D,j),K.textureVertex=H),V!==void 0&&W!==void 0&&H.SetTexCoord(V,W),H}};r.getTextureVertex=S;var _=function(k){var D=c(k);if(D){var j=D.textBounds;return j||(j=new k.TSRTextBounds,D.textBounds=j),j}};r.getTextBounds=_;var C=function(k,D,j,N,V){var W=c(k),K=W.rect;return K?K.Assign(D,j,N-D,V-j):(K=new k.SCRTRectVertex(D,j,N-D,V-j),W.rect=K),K};r.getNativeRect=C;var T=function(k,D,j,N,V){var W=c(k),K=W.vector4;return K?K.Assign(D,j,N,V):(K=new k.TSRVector4(D,j,N,V),W.vector4=K),K};r.getVector4=T;var x=function(k,D,j){D===void 0&&(D=0),j===void 0&&(j=0);var N=c(k),V=N.vector2;return V?(V.x=D,V.y=j):(V=new k.TSRVector2(D,j),N.vector2=V),V};r.getVector2=x;var A=function(k,D,j,N){var V=c(k),W=V.vector3;return W?W.Assign(D,j,N):(W=new k.TSRVector3(D,j,N),V.vector3=W),W};r.getVector3=A;var w=function(k,D,j,N){j===void 0&&(j=!1),N===void 0&&(N=!1);var V=c(k);if(V){var W=V.keyCache,K=(0,o.getFontFamily)(D.fontFamily,!0),H={fontFamily:K,fontSize:D.fontSize,extras:(j?"advanced":"")+(N?"transformed":""),providerId:void 0},U=a.labelCache.getStyleId(H);if(!W.has(U)){var I=new l(new k.SCRTFontKey(K,D.fontSize,N,j));W.set(U,I)}var Q=W.get(U),Z=Date.now()-Q.firstLoadTime;return Z>s.SciChartDefaults.nativeFontTimeout&&(Q.nativeKey.m_reload=!1),Q.nativeKey}};r.getFontKey=w;var L=function(k){var D=c(k);return Array.from(D.keyCache.values()).map(function(j){return j.nativeKey})};r.getAllFontKeys=L})(Dk)),Dk}var MJ;function KS(){if(MJ)return Ok;MJ=1,Object.defineProperty(Ok,"__esModule",{value:!0}),Ok.createNativeRect=void 0;var r=Xi(),e=function(i,n,t,o,a){return(0,r.getNativeRect)(i,n,t,o,a)};return Ok.createNativeRect=e,Ok}var G4={},LJ;function xg(){return LJ||(LJ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EVerticalAnchorPoint=r.EHorizontalAnchorPoint=void 0,(function(e){e.Left="Left",e.Center="Center",e.Right="Right"})(r.EHorizontalAnchorPoint||(r.EHorizontalAnchorPoint={})),(function(e){e.Top="Top",e.Center="Center",e.Bottom="Bottom"})(r.EVerticalAnchorPoint||(r.EVerticalAnchorPoint={}))})(G4)),G4}var Y4={},kJ;function Du(){return kJ||(kJ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertMultiLineAlignment=r.EMultiLineAlignment=r.EVerticalTextPosition=r.EHorizontalTextPosition=void 0,(function(n){n.Left="Left",n.Center="Center",n.Right="Right"})(r.EHorizontalTextPosition||(r.EHorizontalTextPosition={})),(function(n){n.Above="Above",n.Center="Center",n.Below="Below"})(r.EVerticalTextPosition||(r.EVerticalTextPosition={}));var e;(function(n){n.Left="Left",n.Right="Right",n.Center="Center"})(e=r.EMultiLineAlignment||(r.EMultiLineAlignment={}));var i=function(n,t){var o=t.eTSRTextAlignMode.Left;switch(n){case e.Left:o=t.eTSRTextAlignMode.Left;break;case e.Right:o=t.eTSRTextAlignMode.Right;break;case e.Center:o=t.eTSRTextAlignMode.Center;break}return o};r.convertMultiLineAlignment=i})(Y4)),Y4}var $4={},IJ;function lc(){return IJ||(IJ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.getNativeTextPosition=r.getMultilineTextHeight=r.getTextHeightToBaseline=r.getFirstLineHeightToBaseline=r.getNativeTextSize=r.convertToNativeLineSpacing=r.wrapNativeText=void 0;var e=Xi(),i=xg(),n=function(c,d,f,h){if(d===0)return c;if(!c)return"";var p=[],g=c.split(" "),v=g[0].trim(),y=v+" "+v+`
`+g.map(function(k){return k.trim()}).join(`
`);f.CalculateStringBounds(y??"",h,0);var m="",b=0,S=h.GetLineBounds(0),_=h.GetLineBounds(1),C=S.m_fWidth-2*_.m_fWidth;S.delete(),_.delete();for(var T=0;T<g.length;T++){var x=g[T],A=h.GetLineBounds(T+1),w=A.m_fWidth;A.delete();var L=m+(m!==""?" ":"")+x;b+=(m!==""?C:0)+w,b>d?m===""?(p.push(x),b=0):(p.push(m),m=x,b=w):m=L,m.endsWith(`
`)&&(b=0)}return p.push(m),p.join(`
`)};r.wrapNativeText=n;var t=function(c,d){var f=2;return Math.round(c*(d-1))+f};r.convertToNativeLineSpacing=t;var o=function(c,d,f,h,p){p===void 0&&(p=0);var g=(0,e.getTextBounds)(h);d.CalculateStringBounds(c,g,0);for(var v=0,y=0;y<g.GetLinesCount();y++){var m=g.GetLineBounds(y),b=m.m_fHeight;v<b&&(v=b),m.delete()}var S=(0,r.convertToNativeLineSpacing)(v,f.lineSpacing),_=Math.round(g.m_fHeight+(g.GetLinesCount()-1)*S+f.padding.top+f.padding.bottom),C=Math.round(g.m_fWidth+f.padding.left+f.padding.right),T=g.GetLineBounds(0),x=(0,r.getFirstLineHeightToBaseline)(T);T.delete();var A=p%360*Math.PI/180,w=Math.sin(A),L=Math.cos(A),k=Math.round(C*Math.abs(L)+_*Math.abs(w)),D=Math.round(C*Math.abs(w)+_*Math.abs(L)),j=0,N=0;return p>=0&&p<90?(j=(_-f.padding.top-x)*w+f.padding.left*L,N=f.padding.left*w+(f.padding.top+x)*L):p>=90&&p<=180?(j=k-(f.padding.top+x)*w+f.padding.left*L,N=-(_-f.padding.top-x)*L+f.padding.left*w):p>180&&p<=270?(j=k-(f.padding.top+x-_)*w+f.padding.left*L,N=D+(f.padding.top+x)*L+f.padding.left*w):p>270&&p<360&&(j=-(f.padding.top+x)*w+f.padding.left*L,N=D-(_-x-f.padding.top)*L+f.padding.left*w),{textHeight:D,textWidth:k,nativeLineSpacing:S,deltaX:j,deltaY:N}};r.getNativeTextSize=o;var a=function(c){return c.m_fHeight+c.m_fOffsetY};r.getFirstLineHeightToBaseline=a;var s=function(c){var d=c.GetLinesCount();if(d<1)return 0;if(d===1){var f=c.GetLineBounds(0),h=(0,r.getFirstLineHeightToBaseline)(f);return f.delete(),h}return(0,r.getMultilineTextHeight)(c)};r.getTextHeightToBaseline=s;var l=function(c){var d=c.GetLinesCount();if(d<1)return 0;if(d===1)return c.m_fHeight;for(var f=c.m_fHeight,h=0;h<d-1;h++){var p=c.GetLineBounds(h);f+=p.m_fOffsetY,p.delete()}return f};r.getMultilineTextHeight=l;var u=function(c,d,f,h,p,g){var v=c,y=d;f===i.EHorizontalAnchorPoint.Center?v-=p.m_fWidth/2+(g.right-g.left)/2:f===i.EHorizontalAnchorPoint.Right?v-=p.m_fWidth+g.right:v+=g.left;var m=p.GetLinesCount()>1,b=p.GetLineBounds(0);return m?h===i.EVerticalAnchorPoint.Center?y+=(0,r.getFirstLineHeightToBaseline)(b)-(0,r.getMultilineTextHeight)(p)/2+(g.top-g.bottom)/2:h===i.EVerticalAnchorPoint.Top?y+=(0,r.getFirstLineHeightToBaseline)(b)+g.top:(y+=(0,r.getFirstLineHeightToBaseline)(b)-(0,r.getMultilineTextHeight)(p),y-=g.bottom):h===i.EVerticalAnchorPoint.Center?y+=(0,r.getFirstLineHeightToBaseline)(b)/2+(g.top-g.bottom)/2:h===i.EVerticalAnchorPoint.Top?y+=(0,r.getFirstLineHeightToBaseline)(b)+g.top:y-=g.bottom,b.delete(),{x:v,y}};r.getNativeTextPosition=u})($4)),$4}var NJ;function Ul(){return NJ||(NJ=1,(function(r){var e=Ak&&Ak.__extends||(function(){var b=function(S,_){return b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,T){C.__proto__=T}||function(C,T){for(var x in T)Object.prototype.hasOwnProperty.call(T,x)&&(C[x]=T[x])},b(S,_)};return function(S,_){if(typeof _!="function"&&_!==null)throw new TypeError("Class extends value "+String(_)+" is not a constructor or null");b(S,_);function C(){this.constructor=S}S.prototype=_===null?Object.create(_):(C.prototype=_.prototype,new C)}})();Object.defineProperty(r,"__esModule",{value:!0}),r.WebGlRenderContext2D=r.ELineDrawMode=r.calculateAbsoluteRenderLayer=void 0;var i=So(),n=ni(),t=vn(),o=KS(),a=Xi(),s=$n(),l=ca(),u=Ii(),c=xg(),d=Du(),f=iu(),h=mi(),p=lc(),g=1e3,v=function(b,S,_){return b*g+_*S};r.calculateAbsoluteRenderLayer=v;var y;(function(b){b.PolyLine="PolyLine",b.DiscontinuousLine="DiscontinuousLine"})(y=r.ELineDrawMode||(r.ELineDrawMode={}));var m=(function(b){e(S,b);function S(_,C,T){var x=b.call(this)||this;return x.layers=new Map,x.effects=[],x.webAssemblyContext=_,x.viewportSize=C,x.canvasId=T,x.currentClipRect=t.Rect.create(0,0,C.width,C.height),x.currentRotation=0,x.currentTranslationX=0,x.currentTranslationY=0,x}return S.prototype.getNativeContext=function(){return this.nativeContext||(this.nativeContext=this.webAssemblyContext.SCRTGetMainRenderContext2D()),this.nativeContext},S.prototype.drawLinesNative=function(_,C,T,x,A,w){A===void 0&&(A=0),w===void 0&&(w=0);var L=T===y.PolyLine,k=this.getNativeContext();this.resetTransform(),this.translate(A,w),this.setClipRect(x);var D=new this.webAssemblyContext.SCRTDrawLinesParams;D.m_Type=L?this.webAssemblyContext.SCRTLineType.Strip:this.webAssemblyContext.SCRTLineType.List,D.SetPen(C),D.SetPointsVec(_),k.DrawLines(D),D.delete()},S.prototype.drawRects=function(_,C,T,x,A){x===void 0&&(x=0),A===void 0&&(A=0);var w=(0,a.getVector4)(this.webAssemblyContext,0,0,0,0),L=this.getNativeContext();this.resetTransform(),this.translate(x,A),this.setClipRect(T);var k=new this.webAssemblyContext.SCRTDrawRectsParams;k.SetVerticesVec(_),k.SetBrush(C),k.m_vAnchorParams=w,L.DrawRects(k),k==null||k.delete()},S.prototype.drawEllipses=function(_,C,T,x){T===void 0&&(T=0),x===void 0&&(x=0);var A=this.getNativeContext();this.resetTransform(),this.translate(T,x);var w=new this.webAssemblyContext.SCRTDrawRectsParams;w.SetVerticesVec(_),w.SetPen(C),w.SetBrush(null),w.m_bIsEllipses=!0,A.DrawRects(w),w==null||w.delete()},S.prototype.drawArcs=function(_,C,T,x,A,w,L,k,D){k===void 0&&(k=0),D===void 0&&(D=0);var j=this.getNativeContext(),N=0,V=0;if(x!==0){var W=Math.sqrt(C*C+T*T),K=Math.atan2(T,C);N=C-W*Math.cos(K+x),V=T-W*Math.sin(K+x)}this.resetTransform(),this.translate(N+k,V-D),this.rotate(x*180/Math.PI),this.setClipRect(A);var H=new this.webAssemblyContext.SCRTDrawArcsParams;H.SetVerticesVec(_),H.SetPen(w),H.SetBrush(L||null),j.DrawArcs(H),H==null||H.delete()},S.prototype.enqueueLayeredDraw=function(_,C){this.layers.has(C)||this.layers.set(C,[]),this.layers.get(C).push(_)},S.prototype.drawLayers=function(){for(var _,C,T=this.canvasId,x=l.PerformanceDebugHelper.mark(l.EPerformanceMarkType.AllLayersDrawStart,{parentContextId:T,level:l.EPerformanceDebugLevel.Verbose}),A=Array.from(this.layers.keys()).sort(function(K,H){return K-H}),w=0,L=A;w<L.length;w++){for(var k=L[w],D=l.PerformanceDebugHelper.mark(l.EPerformanceMarkType.SingleLayerDrawStart,{contextId:"Layer-".concat(k),parentContextId:T,level:l.EPerformanceDebugLevel.Verbose}),j=this.layers.get(k),N=0,V=j;N<V.length;N++){var W=V[N];W()}l.PerformanceDebugHelper.mark(l.EPerformanceMarkType.SingleLayerDrawEnd,{relatedId:(_=D==null?void 0:D.detail)===null||_===void 0?void 0:_.relatedId,contextId:"Layer-".concat(k),parentContextId:T,level:l.EPerformanceDebugLevel.Verbose})}l.PerformanceDebugHelper.mark(l.EPerformanceMarkType.AllLayersDrawEnd,{relatedId:(C=x==null?void 0:x.detail)===null||C===void 0?void 0:C.relatedId,parentContextId:T,level:l.EPerformanceDebugLevel.Verbose})},S.prototype.pushShaderEffect=function(_){_&&(this.effects.push(_),i.IS_TEST_ENV||this.getNativeContext().AddSeriesEffect(_.getNativeEffect()))},S.prototype.popShaderEffect=function(){var _=this.effects.pop();_&&!i.IS_TEST_ENV&&this.getNativeContext().RemoveSeriesEffect(_.getNativeEffect())},S.prototype.createPen=function(_,C,T,x){throw new Error("Use Pen2DCache for creating pens instead!")},S.prototype.createSolidBrush=function(_,C){throw new Error("Use BrushCache for creating brushes instead!")},S.prototype.delete=function(){},S.prototype.drawLine=function(_,C,T,x,A,w,L){if(!(!_&&!C&&!T&&!x)){n.Guard.notNull(A,"pen"),n.Guard.isTrue(A.getPenType()==="WasmPen","pen must be an instance of WasmPen to be used with the WasmRenderContext");var k=A.scrtPen;n.Guard.notNull(k,"WasmPen.scrtPen");var D=this.getNativeContext(),j=(0,a.getVectorColorVertex)(this.webAssemblyContext),N=(0,a.getVertex)(this.webAssemblyContext,_,C);j.push_back(N);var V=(0,a.getVertex)(this.webAssemblyContext,T,x);j.push_back(V),this.resetTransform(),this.translate(w.x,w.y),this.setClipRect(L);var W=new this.webAssemblyContext.SCRTDrawLinesParams;W.m_Type=this.webAssemblyContext.SCRTLineType.Strip,W.SetPen(k),W.SetPointsVec(j),D.DrawLines(W),W.delete()}},S.prototype.drawLines=function(_,C,T,x,A){A===void 0&&(A=y.PolyLine),n.Guard.notNull(C,"pen"),n.Guard.notNull(_,"xyValues"),n.Guard.isTrue(C.getPenType()==="WasmPen","pen must be an instance of WasmPen to be used with the WasmRenderContext"),n.Guard.isTrue(_.length>0&&_.length%2===0,"xyValues length must be a multiple of 2, values arranged as x0y0 x1y1 x2y2...");var w=C.scrtPen;n.Guard.notNull(w,"WebGlPen.scrtPen");for(var L=A===y.PolyLine,k=this.getNativeContext(),D=(0,a.getVectorColorVertex)(this.webAssemblyContext),j=0;j<_.length;j+=2){var N=(0,a.getVertex)(this.webAssemblyContext,_[j],_[j+1]);D.push_back(N)}this.resetTransform(),this.translate(T.x,T.y),this.setClipRect(x);var V=new this.webAssemblyContext.SCRTDrawLinesParams;V.m_Type=L?this.webAssemblyContext.SCRTLineType.Strip:this.webAssemblyContext.SCRTLineType.List,V.SetPen(w),V.SetPointsVec(D),k.DrawLines(V),V.delete()},S.prototype.drawTriangleStrip=function(_,C,T,x,A){if(A){n.Guard.arraysSameLength(_,"xValues",C,"yValues");var w=this.getNativeContext(),L=A.scrtBrush;n.Guard.notNull(L,"WebGlBrush.scrtBrush");for(var k=(0,a.getVectorColorTextureVertex)(this.webAssemblyContext),D=_.length,j=0;j<D;j++){var N=_[j],V=C[j],W=(0,a.getTextureVertex)(this.webAssemblyContext,N,V);k.push_back(W)}this.resetTransform(),this.translate(T.x,T.y),this.setClipRect(x);var K=new this.webAssemblyContext.SCRTDrawPrimitivesParams;K.SetVerticesVec(k),K.SetBrush(L),w.DrawPrimitives(K),K.delete()}},S.prototype.drawTexture=function(_,C,T,x,A){var w=this.getNativeContext(),L=new this.webAssemblyContext.SCRTTextureBrush(_,this.webAssemblyContext.eSCRTBrushMappingMode.PerPrimitive,1),k=(0,a.getVectorColorTextureVertex)(this.webAssemblyContext),D=(0,a.getTextureVertex)(this.webAssemblyContext,C,T,i.NEUTRAL_COLOR,0,0);k.push_back(D);var j=(0,a.getTextureVertex)(this.webAssemblyContext,C+x,T,i.NEUTRAL_COLOR,1,0);k.push_back(j);var N=(0,a.getTextureVertex)(this.webAssemblyContext,C,T+A,i.NEUTRAL_COLOR,0,1);k.push_back(N);var V=(0,a.getTextureVertex)(this.webAssemblyContext,C+x,T+A,i.NEUTRAL_COLOR,1,1);k.push_back(V);var W=new this.webAssemblyContext.SCRTDrawPrimitivesParams;W.SetVerticesVec(k),W.SetBrush(L),w.DrawPrimitives(W),L==null||L.delete(),W.delete()},S.prototype.drawRotatedRect=function(_,C,T,x,A,w,L,k,D,j){var N=j.scrtBrush;n.Guard.notNull(N,"WebGlBrush.scrtBrush");var V,W;switch(A){case c.EVerticalAnchorPoint.Bottom:V=T+x.bottom+x.top,W=C-T;break;case c.EVerticalAnchorPoint.Top:V=0,W=C+x.bottom+x.top;break;default:V=T/2+(x.bottom+x.top)/2,W=C-T/2+(x.bottom+x.top)/2}var K,H;switch(w){case c.EHorizontalAnchorPoint.Right:K=_+x.left+x.right,H=0;break;case c.EHorizontalAnchorPoint.Left:K=0,H=_+x.left+x.right;break;default:K=_/2+x.left,H=_/2+x.right}var U=t.Rect.createWithPoints(new u.Point(-K,-V),new u.Point(H,W)),I=this.getNativeContext(),Q=(0,a.getVectorRectVertex)(this.webAssemblyContext),Z=(0,a.getVector4)(this.webAssemblyContext,0,0,0,0),ee=(0,o.createNativeRect)(this.webAssemblyContext,U.x,U.y,U.right,U.bottom);Q.push_back(ee),this.resetTransform(),this.translate(L.x,L.y),this.rotate(k),this.setClipRect(D);var ie=new this.webAssemblyContext.SCRTDrawRectsParams;ie.SetVerticesVec(Q),ie.SetBrush(N),ie.m_vAnchorParams=Z,I.DrawRects(ie),ie==null||ie.delete()},S.prototype.drawRect=function(_,C,T,x,A,w,L){if(A){var k=this.getNativeContext(),D=A.scrtBrush;n.Guard.notNull(D,"WebGlBrush.scrtBrush");var j=(0,a.getVectorRectVertex)(this.webAssemblyContext),N=(0,a.getVector4)(this.webAssemblyContext,0,0,0,0),V=(0,o.createNativeRect)(this.webAssemblyContext,_.x,_.y,_.right,_.bottom);j.push_back(V),this.resetTransform(),this.translate(C.x,C.y),this.setClipRect(T);var W=new this.webAssemblyContext.SCRTDrawRectsParams;W.SetVerticesVec(j),W.SetBrush(D),W.m_vAnchorParams=N,k.DrawRects(W),W==null||W.delete()}if(x)if(w)this.drawLines([_.right,_.top,_.right,_.bottom,_.left,_.bottom,_.left,_.top,_.right,_.top,_.right,_.bottom],x,C,T,y.PolyLine);else{var K=Math.round(L/2)-1;this.drawLines([_.right,_.top-K,_.right,_.bottom+K,_.right,_.bottom,_.left,_.bottom,_.left,_.bottom+K,_.left,_.top-K,_.left,_.top,_.right,_.top],x,C,T,y.DiscontinuousLine)}},S.prototype.drawTextBackground=function(_,C,T,x,A,w,L,k,D){this.drawRotatedRect(_,C,C,k,w,L,x,T,A,D)},S.prototype.drawNativeText=function(_,C,T,x,A,w,L,k,D,j,N,V,W,K,H,U){H===void 0&&(H=1),U===void 0&&(U=3);var I=(0,h.parseColorToUIntArgb)(k),Q=(0,f.uintArgbColorOverrideOpacity)(I,D),Z={fontFamily:w,fontSize:L},ee=this.getFont(Z,!1,!1),ie=(0,a.getTextBounds)(this.webAssemblyContext);ee.CalculateStringBounds(W??"",ie,U);var de=C+x.x,pe=T+x.y,_e=(0,p.getNativeTextPosition)(C,T,V,N,ie,K),Te=_e.x,De=_e.y,Pe=ie.m_fWidth,Ee=ie.m_fHeight,Re=(0,d.convertMultiLineAlignment)(d.EMultiLineAlignment.Center,this.webAssemblyContext),je=ee.GetScale(),Ke=!1;je!==H&&(ee.SetScale(H),Ke=!0);var ot=Te+x.x,We=De+x.y;j&&(this.drawTextBackground(Pe,Ee,-(_*180/Math.PI),new u.Point(de,pe),A,N,V,K,j),this.resetTransform());var xe=(0,a.getVector4)(this.webAssemblyContext,de,pe,_,0);ee.DrawStringAdvanced(W,Q,Math.round(ot),Math.round(We),xe,Re,U),Ke&&ee.SetScale(je),ee.End()},S.prototype.printBlendMode=function(){var _=this.getNativeContext().GetBlendMode();switch(_){case this.webAssemblyContext.eSCRTBlendMode.BlendDefault:console.log("BlendDefault");break;case this.webAssemblyContext.eSCRTBlendMode.BlendAdditiveOneAlpha:console.log("BlendAdditiveOneAlpha");break;case this.webAssemblyContext.eSCRTBlendMode.BlendAdditiveColor:console.log("BlendAdditiveColor");break;case this.webAssemblyContext.eSCRTBlendMode.BlendAdditiveAlpha:console.log("BlendAdditiveAlpha");break;case this.webAssemblyContext.eSCRTBlendMode.BlendDisabled:console.log("BlendDisabled");break;default:throw new Error("Unhandled blendmode ")}},S.prototype.getFont=function(_,C,T){var x=this;C===void 0&&(C=!1),T===void 0&&(T=!1);var A=(0,a.getFontKey)(this.webAssemblyContext,_,C,T),w=this.getNativeContext(),L=w.AquireFont(A);if(L)L.m_isDrawing||L.Begin();else throw new Error("Could not create font "+A.m_strName);var k=L.GetFaceName();return k==="SCRT_Loading"?setTimeout(function(){var D;l.PerformanceDebugHelper.mark(l.EPerformanceMarkType.Invalidate,{parentContextId:x.canvasId}),x.webAssemblyContext.TSRRequestCanvasDraw((D=x.canvasId)!==null&&D!==void 0?D:"undefinedCanvasId")},100):k!==A.m_strName&&(A.warned||(console.warn("Font ".concat(A.m_strName,` could not be found on the server and has not been registered. Falling back to default font.
                Use await scichartSurface.registerFont if you need to load the font from a remote url`)),A.warned=!0)),L},S.prototype.endFonts=function(_){for(var C,T=l.PerformanceDebugHelper.mark(l.EPerformanceMarkType.DrawNativeTextStart,{contextId:this.canvasId,level:l.EPerformanceDebugLevel.Verbose}),x=this.getNativeContext(),A=(0,a.getAllFontKeys)(this.webAssemblyContext),w=0,L=A;w<L.length;w++){var k=L[w],D=x.AquireFont(k);D&&D.m_isDrawing&&D.End()}l.PerformanceDebugHelper.mark(l.EPerformanceMarkType.DrawNativeTextEnd,{contextId:this.canvasId,relatedId:(C=T==null?void 0:T.detail)===null||C===void 0?void 0:C.relatedId,level:l.EPerformanceDebugLevel.Verbose})},S.prototype.setClipRect=function(_){var C=this.getNativeContext();C.SetClipRect(_.x,_.y,_.width,_.height),this.currentClipRect=_},S.prototype.setTranslationRotationAndClip=function(_,C,T,x){x===void 0&&(x=0),this.resetTransform(),this.translate(C,T),x!==0&&this.rotate(x),this.setClipRect(_)},S.prototype.resetAndClip=function(_){this.resetTransform(),this.setClipRect(_)},S.prototype.rotate=function(_){var C=this.getNativeContext();C.Rotate(_)},S.prototype.translate=function(_,C){var T=this.getNativeContext();T.Translate(_,C)},S.prototype.resetTransform=function(){var _=this.getNativeContext();_.ResetTransform()},S.webGlResourcesRefs=new Set,S})(s.DeletableEntity);r.WebGlRenderContext2D=m})(Ak)),Ak}var FJ;function NH(){if(FJ)return RP;FJ=1;var r=RP&&RP.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(u[d]=c[d])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})();Object.defineProperty(RP,"__esModule",{value:!0}),RP.BaseCache=void 0;var e=$n(),i=Mr(),n=Yv(),t=Ul(),o=(function(a){r(s,a);function s(l){var u=a.call(this)||this;return u.webAssemblyContext=l,l&&t.WebGlRenderContext2D.webGlResourcesRefs.add(u),u}return Object.defineProperty(s.prototype,"value",{get:function(){return this.cachedEntity},enumerable:!1,configurable:!0}),s.prototype.invalidateCache=function(){this.cachedEntity=(0,i.deleteSafe)(this.cachedEntity)},s.prototype.resetCache=function(){this.invalidateCache()},s.prototype.delete=function(){var l=this;this.cachedEntity=(0,i.deleteSafe)(this.cachedEntity),t.WebGlRenderContext2D.webGlResourcesRefs.delete(this),this.webAssemblyContext=void 0},s})(e.DeletableEntity);return RP.BaseCache=o,RP}var MP={},q4={},jJ;function Hbe(){return jJ||(jJ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EDrawingTypes=void 0,(function(e){e.WasmBrush="WasmBrush",e.WasmPen="WasmPen"})(r.EDrawingTypes||(r.EDrawingTypes={}))})(q4)),q4}var BJ;function Ube(){if(BJ)return MP;BJ=1;var r=MP&&MP.__extends||(function(){var s=function(l,u){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(c[f]=d[f])},s(l,u)};return function(l,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");s(l,u);function c(){this.constructor=l}l.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}})();Object.defineProperty(MP,"__esModule",{value:!0}),MP.WebGlPen=void 0;var e=So(),i=$n(),n=Mr(),t=iu(),o=Hbe(),a=(function(s){r(l,s);function l(u,c){var d=s.call(this)||this;return d.scrtPenProperty=u,d.originalColor=c??(u==null?void 0:u.m_uiColor),d}return Object.defineProperty(l.prototype,"scrtPen",{get:function(){return this.scrtPenProperty},enumerable:!1,configurable:!0}),l.prototype.delete=function(){this.scrtPenProperty=(0,n.deleteSafe)(this.scrtPenProperty)},l.prototype.getPenType=function(){return o.EDrawingTypes.WasmPen},l.prototype.setOpacity=function(u){e.IS_TEST_ENV||(this.scrtPen.m_uiColor=(0,t.uintArgbColorMultiplyOpacity)(this.originalColor,u))},l})(i.DeletableEntity);return MP.WebGlPen=a,MP}var VJ;function ts(){return VJ||(VJ=1,(function(r){var e=nk&&nk.__extends||(function(){var p=function(g,v){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,m){y.__proto__=m}||function(y,m){for(var b in m)Object.prototype.hasOwnProperty.call(m,b)&&(y[b]=m[b])},p(g,v)};return function(g,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");p(g,v);function y(){this.constructor=g}g.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}})();Object.defineProperty(r,"__esModule",{value:!0}),r.createPenInCache=r.getScrtPenFromCache=r.getWebGlPenFromCache=r.Pen2DCache=void 0;var i=Mr(),n=ni(),t=xf(),o=mi(),a=Rbe(),s=Hi(),l=NH(),u=Ube(),c=(function(p){e(g,p);function g(){return p!==null&&p.apply(this,arguments)||this}return Object.defineProperty(g.prototype,"value",{get:function(){var v=!this.cachedEntity&&this.stroke;if(v){var y=this,m=y.stroke,b=y.strokeThickness,S=y.strokeDashArray,_=y.antiAliased,C=y.opacity;this.cachedEntity=this.create({stroke:m,strokeThickness:b,strokeDashArray:S,antiAliased:_,opacity:C})}return this.cachedEntity},enumerable:!1,configurable:!0}),g.prototype.create=function(v){var y=v.stroke,m=v.strokeThickness,b=m===void 0?1:m,S=v.strokeDashArray,_=v.antiAliased,C=_===void 0?!0:_,T=v.opacity,x=T===void 0?1:T,A=s.DpiHelper.adjustStrokeSize({strokeThickness:b,strokeDashArray:S}),w=A.strokeThickness,L=A.strokeDashArray;if(this.cachedEntity&&y===this.stroke&&w===this.adjustedStrokeThickness&&C===this.antiAliased&&(0,t.areArraysEqual)(L,this.adjustedStrokeDashArray))return x!==this.opacity&&(this.opacity=x,this.cachedEntity.setOpacity(x)),this.strokeThickness=b,this.strokeDashArray=S,this.cachedEntity;(0,i.deleteSafe)(this.cachedEntity),this.stroke=y,this.opacity=x,this.antiAliased=C,this.strokeThickness=b,this.adjustedStrokeThickness=w,this.strokeDashArray=S,this.adjustedStrokeDashArray=L;var k=(0,a.createSCRTPen)(this.webAssemblyContext,y,w,x,L,C);return this.cachedEntity=new u.WebGlPen(k,y?(0,o.parseColorToUIntArgb)(y):void 0)},g})(l.BaseCache);r.Pen2DCache=c;var d=function(p){return n.Guard.notNull(p,"penCache"),p.value};r.getWebGlPenFromCache=d;var f=function(p){var g=(0,r.getWebGlPenFromCache)(p);return g==null?void 0:g.scrtPen};r.getScrtPenFromCache=f;var h=function(p,g,v,y,m,b){n.Guard.notNull(p,"penCache");var S=p.create({stroke:g,strokeThickness:v,opacity:y,strokeDashArray:m,antiAliased:b});return S.scrtPen};r.createPenInCache=h})(nk)),nk}var Rk={},Mk={},HJ;function FH(){if(HJ)return Mk;HJ=1,Object.defineProperty(Mk,"__esModule",{value:!0}),Mk.updateAxisIds=void 0;function r(e){var i,n;e.parentSurface&&(e.xAxisId||(e.xAxisId=(i=e.parentSurface.getDefaultXAxis())===null||i===void 0?void 0:i.id),e.yAxisId||(e.yAxisId=(n=e.parentSurface.getDefaultYAxis())===null||n===void 0?void 0:n.id))}return Mk.updateAxisIds=r,Mk}var X4={},UJ;function N1(){return UJ||(UJ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EDefaultRenderLayer=void 0,(function(e){e[e.Background=0]="Background",e[e.AxisBandsLayer=1]="AxisBandsLayer",e[e.MinorGridLinesLayer=2]="MinorGridLinesLayer",e[e.MajorGridLinesLayer=3]="MajorGridLinesLayer",e[e.AnnotationsBelowSeriesLayer=4]="AnnotationsBelowSeriesLayer",e[e.SeriesLayer=5]="SeriesLayer",e[e.HoveredSeriesLayer=6]="HoveredSeriesLayer",e[e.SelectedSeriesLayer=7]="SelectedSeriesLayer",e[e.AxisBordersLayer=8]="AxisBordersLayer",e[e.AxesLayer=9]="AxesLayer",e[e.AnnotationsAboveSeriesLayer=10]="AnnotationsAboveSeriesLayer",e[e.Foreground=11]="Foreground"})(r.EDefaultRenderLayer||(r.EDefaultRenderLayer={}))})(X4)),X4}var K4={},zJ;function pn(){return zJ||(zJ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.fitSvgToViewRect=r.fitElementToViewRect=r.convertToHtmlPx=r.translateDataValueRectToAbsolute=r.translateToNotScaledRect=r.translateToScaledRect=r.translateToNotScaled=r.translateToScaled=r.translateFromSeriesViewRectToCanvasY=r.translateFromSeriesViewRectToCanvasX=r.translateFromCanvasToSeriesViewRectY=r.translateFromCanvasToSeriesViewRectX=r.translateFromSeriesViewRectToCanvas=r.translateFromCanvasToSeriesViewRect=void 0;var e=Hi(),i=Ii(),n=vn(),t=function(m,b,S){if(S===void 0&&(S=!1),!!b){var _=m.x-b.x,C=m.y-b.y;if(!(!S&&(_<0||_>b.width||C<0||C>b.height)))return new i.Point(_,C)}};r.translateFromCanvasToSeriesViewRect=t;var o=function(m,b,S){if(S===void 0&&(S=!1),!!b){var _=m.x+b.x,C=m.y+b.y;if(!(!S&&(_<0||_>b.width||C<0||C>b.height)))return new i.Point(_,C)}};r.translateFromSeriesViewRectToCanvas=o;var a=function(m,b,S){if(S===void 0&&(S=!1),!!b){var _=m-b.x;if(!(!S&&(_<0||_>b.width)))return _}};r.translateFromCanvasToSeriesViewRectX=a;var s=function(m,b,S){if(S===void 0&&(S=!1),!!b){var _=m-b.y;if(!(!S&&(_<0||_>b.height)))return _}};r.translateFromCanvasToSeriesViewRectY=s;var l=function(m,b,S){if(S===void 0&&(S=!1),!!b){var _=m+b.x;if(!(!S&&(_<0||_>b.width)))return _}};r.translateFromSeriesViewRectToCanvasX=l;var u=function(m,b,S){if(S===void 0&&(S=!1),!!b){var _=m+b.y;if(!(!S&&(_<0||_>b.height)))return _}};r.translateFromSeriesViewRectToCanvasY=u;var c=function(m){return m*e.DpiHelper.PIXEL_RATIO};r.translateToScaled=c;var d=function(m){return m/e.DpiHelper.PIXEL_RATIO};r.translateToNotScaled=d;var f=function(m){return new n.Rect(m.x*e.DpiHelper.PIXEL_RATIO,m.y*e.DpiHelper.PIXEL_RATIO,m.width*e.DpiHelper.PIXEL_RATIO,m.height*e.DpiHelper.PIXEL_RATIO)};r.translateToScaledRect=f;var h=function(m){return new n.Rect(m.x/e.DpiHelper.PIXEL_RATIO,m.y/e.DpiHelper.PIXEL_RATIO,m.width/e.DpiHelper.PIXEL_RATIO,m.height/e.DpiHelper.PIXEL_RATIO)};r.translateToNotScaledRect=h;var p=function(m,b,S,_){var C=m.x,T=m.y,x=m.width,A=m.height,w=(0,r.translateToNotScaled)(_.left),L=(0,r.translateToNotScaled)(_.top),k=b.getCurrentCoordinateCalculator(),D=S.getCurrentCoordinateCalculator(),j=b.isVerticalChart?D.getCoordinate(C):k.getCoordinate(C),N=b.isVerticalChart?k.getCoordinate(T):D.getCoordinate(T);j=Math.max((0,r.translateToNotScaled)(j),0),N=Math.max((0,r.translateToNotScaled)(N),0);var V=b.flippedCoordinates?C-x:C+x,W=S.flippedCoordinates?T+A:T-A,K=(0,r.translateToNotScaled)(b.isVerticalChart?k.getCoordinate(W):D.getCoordinate(W)),H=(0,r.translateToNotScaled)(b.isVerticalChart?D.getCoordinate(V):k.getCoordinate(V));return j+=w,N+=L,H+=w,K+=L,new n.Rect(j,N,Math.abs(H-j),Math.abs(N-K))};r.translateDataValueRectToAbsolute=p;var g=function(m){return"".concat(m,"px")};r.convertToHtmlPx=g;var v=function(m,b){m.style.marginLeft="".concat(b.x,"px"),m.style.marginTop="".concat(b.y,"px"),m.setAttribute("width",b.width.toString()),m.setAttribute("height",b.height.toString()),m.style.width=b.width+"px",m.style.height=b.height+"px"};r.fitElementToViewRect=v;var y=function(m,b){(0,r.fitElementToViewRect)(m,b),m.currentScale=1};r.fitSvgToViewRect=y})(K4)),K4}var ah={},LP={},WJ;function hc(){return WJ||(WJ=1,Object.defineProperty(LP,"__esModule",{value:!0}),LP.autoReverseEasing=LP.easing=void 0,LP.easing={linear:function(r){return r},quadratic:function(r){return r*(-(r*r)*r+4*r*r-6*r+4)},cubic:function(r){return r*(4*r*r-9*r+6)},elastic:function(r){return r*(33*r*r*r*r-106*r*r*r+126*r*r-67*r+15)},inQuad:function(r){return r*r},outQuad:function(r){return r*(2-r)},inOutQuad:function(r){return r<.5?2*r*r:-1+(4-2*r)*r},inCubic:function(r){return r*r*r},outCubic:function(r){return--r*r*r+1},inOutCubic:function(r){return r<.5?4*r*r*r:(r-1)*(2*r-2)*(2*r-2)+1},inQuart:function(r){return r*r*r*r},outQuart:function(r){return 1- --r*r*r*r},inOutQuart:function(r){return r<.5?8*r*r*r*r:1-8*--r*r*r*r},inQuint:function(r){return r*r*r*r*r},outQuint:function(r){return 1+--r*r*r*r*r},inOutQuint:function(r){return r<.5?16*r*r*r*r*r:1+16*--r*r*r*r*r},inSine:function(r){return-Math.cos(r*(Math.PI/2))+1},outSine:function(r){return Math.sin(r*(Math.PI/2))},inOutSine:function(r){return-(Math.cos(Math.PI*r)-1)/2},inExpo:function(r){return Math.pow(2,10*(r-1))},outExpo:function(r){return r===1?1:-Math.pow(2,-10*r)+1},inOutExpo:function(r){return r/=.5,r<1?Math.pow(2,10*(r-1))/2:(r--,(-Math.pow(2,-10*r)+2)/2)},inCirc:function(r){return-Math.sqrt(1-r*r)+1},outCirc:function(r){return Math.sqrt(1-(r=r-1)*r)},inOutCirc:function(r){return r/=.5,r<1?-(Math.sqrt(1-r*r)-1)/2:(r-=2,(Math.sqrt(1-r*r)+1)/2)}},LP.autoReverseEasing={linear:function(r){return r<.5?r*2:2-r*2}}),LP}var Z4={},GJ;function zbe(){return GJ||(GJ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EAutoColorMode=void 0,(function(e){e.Never="Never",e.Once="Once",e.OnAddRemoveSeries="OnAddRemoveSeries",e.Always="Always"})(r.EAutoColorMode||(r.EAutoColorMode={}))})(Z4)),Z4}var J4={},YJ;function tn(){return YJ||(YJ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.ESeriesType=void 0,(function(e){e.BandSeries="BandSeries",e.PolarBandSeries="PolarBandSeries",e.SplineBandSeries="SplineBandSeries",e.BubbleSeries="BubbleSeries",e.CandlestickSeries="CandlestickSeries",e.ColumnSeries="ColumnSeries",e.PolarColumnSeries="PolarColumnSeries",e.ImpulseSeries="ImpulseSeries",e.LineSeries="LineSeries",e.PolarLineSeries="PolarLineSeries",e.LineSegmentSeries="LineSegmentSeries",e.SplineLineSeries="SplineLineSeries",e.MountainSeries="MountainSeries",e.PolarMountainSeries="PolarMountainSeries",e.SplineMountainSeries="SplineMountainSeries",e.OhlcSeries="OhlcSeries",e.StackedColumnSeries="StackedColumnSeries",e.PolarStackedColumnSeries="PolarStackedColumnSeries",e.StackedMountainSeries="StackedMountainSeries",e.PolarStackedMountainSeries="PolarStackedMountainSeries",e.SmoothStackedMountainSeries="SmoothStackedMountainSeries",e.UniformContoursSeries="UniformContoursSeries",e.UniformHeatmapSeries="UniformHeatmapSeries",e.PolarUniformHeatmapSeries="PolarUniformHeatmapSeries",e.NonUniformHeatmapSeries="NonUniformHeatmapSeries",e.StackedMountainCollection="StackedMountainCollection",e.PolarStackedMountainCollection="PolarStackedMountainCollection",e.StackedColumnCollection="StackedColumnCollection",e.PolarStackedColumnCollection="PolarStackedColumnCollection",e.ScatterSeries="ScatterSeries",e.PolarScatterSeries="PolarScatterSeries",e.ErrorBarsSeries="ErrorBarsSeries",e.TextSeries="TextSeries",e.RectangleSeries="RectangleSeries",e.BoxPlotSeries="BoxPlotSeries",e.TriangleSeries="TriangleSeries",e.PolarTriangleSeries="PolarTriangleSeries",e.PolarTextSeries="PolarTextSeries",e.Custom="Custom"})(r.ESeriesType||(r.ESeriesType={}))})(J4)),J4}var Q4={},$J;function ty(){return $J||($J=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EZoomState=void 0,(function(e){e.AtExtents="AtExtents",e.UserZooming="UserZooming"})(r.EZoomState||(r.EZoomState={}))})(Q4)),Q4}var kP={},qJ;function Wbe(){if(qJ)return kP;qJ=1;var r=kP&&kP.__extends||(function(){var n=function(t,o){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(a[l]=s[l])},n(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");n(t,o);function a(){this.constructor=t}t.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}})();Object.defineProperty(kP,"__esModule",{value:!0}),kP.BatchRenderContext=void 0;var e=Ul(),i=(function(n){r(t,n);function t(){var o=n!==null&&n.apply(this,arguments)||this;return o.doDraw=!1,o}return t.prototype.drawLayers=function(){this.doDraw&&n.prototype.drawLayers.call(this)},t.prototype.endFonts=function(o){o===void 0&&(o=!1),(this.doDraw||o)&&n.prototype.endFonts.call(this)},t})(e.WebGlRenderContext2D);return kP.BatchRenderContext=i,kP}var Lk={},XJ;function JUe(){if(XJ)return Lk;XJ=1,Object.defineProperty(Lk,"__esModule",{value:!0}),Lk.RenderSurface=void 0;var r=So(),e=Ul(),i=(function(){function n(t,o,a){this.webAssemblyContext=t,this.viewportSize=o,this.canvasId=a}return n.prototype.getRenderContext=function(){return this.renderContextProperty||(this.renderContextProperty=new e.WebGlRenderContext2D(this.webAssemblyContext,this.viewportSize,this.canvasId)),this.renderContextProperty},n.prototype.invalidateElement=function(t){return r.IS_TEST_ENV||this.webAssemblyContext.TSRRequestCanvasDraw(t),!0},n.prototype.onRenderTimeElapsed=function(){this.handleDraw(),this.renderContextProperty=void 0},n})();return Lk.RenderSurface=i,Lk}var IP={},KJ;function Gbe(){if(KJ)return IP;KJ=1;var r=IP&&IP.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(IP,"__esModule",{value:!0}),IP.SolidBrushCache=void 0;var e=$n(),i=Mr(),n=mi(),t=(function(o){r(a,o);function a(s){var l=o.call(this)||this;return l.webAssemblyContext=s,l}return a.prototype.newBrush=function(s,l){return l===void 0&&(l=!1),this.brush&&s===this.color&&l===this.transparent?this.brush:(this.brush&&this.brush.delete(),this.color=s,this.transparent=l,this.brush=new this.webAssemblyContext.SCRTSolidBrush((0,n.parseColorToUIntArgb)(s),l),this.brush)},a.prototype.delete=function(){this.brush=(0,i.deleteSafe)(this.brush),this.webAssemblyContext=void 0},a})(e.DeletableEntity);return IP.SolidBrushCache=t,IP}var kk={},e5={},ZJ;function nb(){return ZJ||(ZJ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.ELayoutManagerType=void 0,(function(e){e.Default="Default",e.CentralAxes="CentralAxes",e.Synchronised="Synchronised",e.Polar="Polar"})(r.ELayoutManagerType||(r.ELayoutManagerType={}))})(e5)),e5}var t5={},JJ;function Xc(){return JJ||(JJ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.ELayoutStrategyType=void 0,(function(e){e.LeftOuter="LeftOuter",e.RightOuter="RightOuter",e.TopOuter="TopOuter",e.BottomOuter="BottomOuter",e.LeftInner="LeftInner",e.RightInner="RightInner",e.TopInner="TopInner",e.BottomInner="BottomInner",e.LeftStacked="LeftStacked",e.RightStacked="RightStacked",e.TopStacked="TopStacked",e.BottomStacked="BottomStacked",e.AngularOuter="AngularOuter",e.AngularInner="AngularInner",e.RadialOuter="RadialOuter",e.RadialInner="RadialInner",e.Custom="Custom"})(r.ELayoutStrategyType||(r.ELayoutStrategyType={}))})(t5)),t5}var NP={},sa={},r5={},QJ;function jH(){return QJ||(QJ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EInnerAxisPlacementCoordinateMode=void 0,(function(e){e[e.DataValue=0]="DataValue",e[e.Pixel=1]="Pixel",e[e.Relative=2]="Relative"})(r.EInnerAxisPlacementCoordinateMode||(r.EInnerAxisPlacementCoordinateMode={}))})(r5)),r5}var eQ;function ja(){if(eQ)return sa;eQ=1,Object.defineProperty(sa,"__esModule",{value:!0}),sa.testLayoutManager=sa.getCoordinateWithCoordinateMode=sa.getValueWithCoordinateMode=sa.updateTopAndBottomChartLayoutState=sa.updateLeftAndRightChartLayoutState=sa.getVerticalAxisRequiredSize=sa.getHorizontalAxisRequiredSize=sa.layoutAxisPartsBottomStrategy=sa.layoutAxisPartsTopStrategy=sa.layoutAxisPartsRightStrategy=sa.layoutAxisPartsLeftStrategy=sa.layoutAxisParts=sa.updateAxisLayoutState=void 0;var r=ni(),e=vn(),i=jH();function n(g){var v=g.axisRenderer,y=g.axisTitleRenderer,m=g.axisLayoutState,b=g.isHorizontalAxis,S=g.axisBorder;m.clear(),m.axisSize=b?v.desiredHeight+y.desiredHeight:v.desiredWidth+y.desiredWidth,m.additionalBottomSize=S.borderBottom,m.additionalTopSize=S.borderTop,m.additionalRightSize=S.borderRight,m.additionalLeftSize=S.borderLeft}sa.updateAxisLayoutState=n;function t(g,v){var y=g.isHorizontalAxis,m=g.viewRect,b=g.axisRenderer,S=g.axisTitleRenderer,_=g.axisBorder,C=y?m.width:b.desiredWidth,T=y?b.desiredHeight:m.height,x=S.desiredWidth,A=S.desiredHeight,w=v(C,T,x,A,m,_),L=w.axisRendererViewRect,k=w.axisTitleRendererViewRect;b.layout(L),S.layout(k)}sa.layoutAxisParts=t;function o(g,v,y,m,b){return{axisTitleRendererViewRect:e.Rect.createWithCoords(b.left,b.top,b.left+y,b.bottom),axisRendererViewRect:e.Rect.createWithCoords(b.left+y,b.top,b.right,b.bottom)}}sa.layoutAxisPartsLeftStrategy=o;function a(g,v,y,m,b){return{axisRendererViewRect:e.Rect.createWithCoords(b.left,b.top,b.left+g,b.bottom),axisTitleRendererViewRect:e.Rect.createWithCoords(b.left+g,b.top,b.right,b.bottom)}}sa.layoutAxisPartsRightStrategy=a;function s(g,v,y,m,b){return{axisTitleRendererViewRect:e.Rect.createWithCoords(b.left,b.top,b.right,b.top+m),axisRendererViewRect:e.Rect.createWithCoords(b.left,b.top+m,b.right,b.bottom)}}sa.layoutAxisPartsTopStrategy=s;function l(g,v,y,m,b){return{axisRendererViewRect:e.Rect.createWithCoords(b.left,b.top,b.right,b.top+v),axisTitleRendererViewRect:e.Rect.createWithCoords(b.left,b.top+v,b.right,b.bottom)}}sa.layoutAxisPartsBottomStrategy=l;function u(g){return g.axisSize+g.additionalTopSize+g.additionalBottomSize}sa.getHorizontalAxisRequiredSize=u;function c(g){return g.axisSize+g.additionalLeftSize+g.additionalRightSize}sa.getVerticalAxisRequiredSize=c;function d(g,v,y){v===void 0&&(v=0),y===void 0&&(y=0),g.leftOuterAreaSize=g.leftOuterAreaSize<0?g.leftOuterAreaSize+v:Math.max(g.leftOuterAreaSize,v),g.rightOuterAreaSize=g.rightOuterAreaSize<0?g.rightOuterAreaSize+y:Math.max(g.rightOuterAreaSize,y)}sa.updateLeftAndRightChartLayoutState=d;function f(g,v,y){v===void 0&&(v=0),y===void 0&&(y=0),g.topOuterAreaSize=g.topOuterAreaSize<0?g.topOuterAreaSize+v:Math.max(g.topOuterAreaSize,v),g.bottomOuterAreaSize=g.bottomOuterAreaSize<0?g.bottomOuterAreaSize+y:Math.max(g.bottomOuterAreaSize,y)}sa.updateTopAndBottomChartLayoutState=f;var h=function(g,v,y){switch(y){case i.EInnerAxisPlacementCoordinateMode.Pixel:return v.getDataValue(g);case i.EInnerAxisPlacementCoordinateMode.DataValue:return g;case i.EInnerAxisPlacementCoordinateMode.Relative:return(v.visibleMax-v.visibleMin)*g+v.visibleMin;default:throw new Error("CoordinateMode ".concat(y," is not supported"))}};sa.getValueWithCoordinateMode=h;var p=function(g,v,y){switch(r.Guard.notNull(y,"coordinateMode"),r.Guard.notNull(v,"calculator"),y){case i.EInnerAxisPlacementCoordinateMode.Pixel:return g;case i.EInnerAxisPlacementCoordinateMode.DataValue:return v.getCoordinate(g);case i.EInnerAxisPlacementCoordinateMode.Relative:return g*v.viewportDimension;default:throw new Error("CoordinateMode ".concat(y," is not supported"))}};return sa.getCoordinateWithCoordinateMode=p,sa.testLayoutManager={updateAxisLayoutState:n,layoutAxisPartsLeftStrategy:o,layoutAxisPartsRightStrategy:a,layoutAxisPartsTopStrategy:s,layoutAxisPartsBottomStrategy:l},sa}var FP={},Ik={},tQ;function F1(){if(tQ)return Ik;tQ=1,Object.defineProperty(Ik,"__esModule",{value:!0}),Ik.BaseAxisLayoutStrategy=void 0;var r=vn(),e=ja(),i=(function(){function o(){this.isStacked=!1}return o.prototype.toJSON=function(){return{type:this.type}},o.prototype.updateAxisLayoutState=function(a){(0,e.updateAxisLayoutState)(a)},o.prototype.updateLeftAndRightChartLayoutState=function(a,s,l){(0,e.updateLeftAndRightChartLayoutState)(a,s,l)},o.prototype.updateTopAndBottomChartLayoutState=function(a,s,l){(0,e.updateTopAndBottomChartLayoutState)(a,s,l)},o.prototype.layoutAxesFromBottomToTop=function(a,s,l,u,c){var d=this,f=u;c.forEach(function(h){var p=h.axisLayoutState,g=p.axisSize,v=p.additionalTopSize,y=p.additionalBottomSize,m=f-g-y-v;h.viewRect=r.Rect.createWithCoords(a,m+v,l,f-y),f=m,(0,e.layoutAxisParts)(h,d.layoutAxisPartsStrategy)})},o.prototype.layoutAxesFromTopToBottom=function(a,s,l,u,c){var d=this,f=s;c.forEach(function(h){var p=h.axisLayoutState,g=p.axisSize,v=p.additionalTopSize,y=p.additionalBottomSize,m=f+g+y+v;h.viewRect=r.Rect.createWithCoords(a,f+v,l,m-y),f=m,(0,e.layoutAxisParts)(h,d.layoutAxisPartsStrategy)})},o.prototype.layoutAxesFromLeftToRight=function(a,s,l,u,c){var d=this,f=a;c.forEach(function(h){var p=h.axisLayoutState,g=p.axisSize,v=p.additionalLeftSize,y=p.additionalRightSize,m=f+g+v+y;h.viewRect=r.Rect.createWithCoords(f+v,s,m-y,u),f=m,(0,e.layoutAxisParts)(h,d.layoutAxisPartsStrategy)})},o.prototype.layoutAxesFromRightToLeft=function(a,s,l,u,c){var d=this,f=l;c.forEach(function(h){var p=h.axisLayoutState,g=p.axisSize,v=p.additionalLeftSize,y=p.additionalRightSize,m=f-g-v-y;h.viewRect=r.Rect.createWithCoords(m+v,s,f-y,u),f=m,(0,e.layoutAxisParts)(h,d.layoutAxisPartsStrategy)})},o.prototype.calculateTotalAxisHeight=function(a,s){return n(a.stackedAxisLength,s)+a.axisLayoutState.additionalBottomSize+a.axisLayoutState.additionalTopSize},o.prototype.calculateTotalAxisWidth=function(a,s){return n(a.stackedAxisLength,s)+a.axisLayoutState.additionalRightSize+a.axisLayoutState.additionalLeftSize},o})();Ik.BaseAxisLayoutStrategy=i;var n=function(o,a){if(typeof o=="number"){if(o<0)throw new Error("stackedAxisLength must be a positive value!");return o}if(o.includes("%"))return t(o,a);var s=parseFloat(o);if(!isNaN(s))return s;throw new Error("stackedAxisLength must be a number or a percentage")},t=function(o,a){var s=parseFloat(o);if(s<0||s>100)throw new Error("stackedAxisLength percentage must be from 0 to 100");return Math.round(a*s/10)/10};return Ik}var i5={},rQ;function Ybe(){return rQ||(rQ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.PROPERTY=void 0,(function(e){e.AXIS_POSITION_COORDINATE="AXIS_POSITION_COORDINATE",e.COORDINATE_MODE="COORDINATE_MODE",e.VERTICAL_AXIS_ID="VERTICAL_AXIS_ID"})(r.PROPERTY||(r.PROPERTY={}))})(i5)),i5}var iQ;function qF(){if(iQ)return FP;iQ=1;var r=FP&&FP.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(FP,"__esModule",{value:!0}),FP.BaseCenteredAxisLayoutStrategy=void 0;var e=F1(),i=Ybe(),n=jH(),t=(function(o){r(a,o);function a(s){var l=this,u,c,d;return l=o.call(this)||this,l.coordinateModeProperty=n.EInnerAxisPlacementCoordinateMode.DataValue,l.orthogonalAxisIdProperty=(u=s==null?void 0:s.orthogonalAxisId)!==null&&u!==void 0?u:l.orthogonalAxisIdProperty,l.coordinateModeProperty=(c=s==null?void 0:s.coordinateMode)!==null&&c!==void 0?c:l.coordinateModeProperty,l.axisPositionProperty=(d=s==null?void 0:s.axisPosition)!==null&&d!==void 0?d:l.axisPositionProperty,l}return Object.defineProperty(a.prototype,"orthogonalAxisId",{get:function(){return this.orthogonalAxisIdProperty},set:function(s){this.orthogonalAxisId!==s&&(this.orthogonalAxisIdProperty=s,this.notifyPropertyChanged(i.PROPERTY.VERTICAL_AXIS_ID))},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"coordinateMode",{get:function(){return this.coordinateModeProperty},set:function(s){this.coordinateModeProperty!==s&&(this.coordinateModeProperty=s,this.notifyPropertyChanged(i.PROPERTY.COORDINATE_MODE))},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"axisPosition",{get:function(){return this.axisPositionProperty},set:function(s){this.axisPositionProperty!==s&&(this.axisPositionProperty=s,this.notifyPropertyChanged(i.PROPERTY.AXIS_POSITION_COORDINATE))},enumerable:!1,configurable:!0}),a.prototype.toJSON=function(){var s={axisPosition:this.axisPosition,coordinateMode:this.coordinateMode,orthogonalAxisId:this.orthogonalAxisId};return{type:this.type,options:s}},a.prototype.notifyPropertyChanged=function(s){var l;!((l=this.sciChartSurface)===null||l===void 0)&&l.invalidateElement&&this.sciChartSurface.invalidateElement()},a})(e.BaseAxisLayoutStrategy);return FP.BaseCenteredAxisLayoutStrategy=t,FP}var nQ;function BH(){if(nQ)return NP;nQ=1;var r=NP&&NP.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(NP,"__esModule",{value:!0}),NP.BottomAlignedInnerAxisLayoutStrategy=void 0;var e=Xc(),i=ja(),n=qF(),t=(function(o){r(a,o);function a(s){var l=o.call(this,s)||this;return l.type=e.ELayoutStrategyType.BottomInner,l.layoutAxisPartsStrategy=i.layoutAxisPartsTopStrategy,l}return a.prototype.measureAxes=function(s,l,u){var c=this;this.sciChartSurface=s;var d=0;return u.forEach(function(f){f.measure(),c.updateAxisLayoutState(f),d+=(0,i.getHorizontalAxisRequiredSize)(f.axisLayoutState)}),d},a.prototype.updateAreaSize=function(s,l){s.bottomInnerAreaSize=l},a.prototype.layoutAxes=function(s,l,u,c,d){var f;if(d.forEach(function(m){m.axisLength=void 0,m.offset=0}),d.length!==0){var h=c;if(this.axisPosition!==void 0){var p=(f=this.sciChartSurface.getYAxisById(this.orthogonalAxisId))!==null&&f!==void 0?f:this.sciChartSurface.getDefaultYAxis();if(!p||p.isHorizontalAxis)throw new Error("orthogonalAxisId should be a valid id of vertical axis on the surface!");var g=p.getCurrentCoordinateCalculator(),v=(0,i.getCoordinateWithCoordinateMode)(this.axisPosition,g,this.coordinateMode),y=p.viewRect.top;h=v+y}this.layoutAxesFromBottomToTop(s,l,u,h,d)}},a})(n.BaseCenteredAxisLayoutStrategy);return NP.BottomAlignedInnerAxisLayoutStrategy=t,NP}var jP={},oQ;function VH(){if(oQ)return jP;oQ=1;var r=jP&&jP.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(jP,"__esModule",{value:!0}),jP.BottomAlignedOuterAxisLayoutStrategy=void 0;var e=Xc(),i=ja(),n=F1(),t=(function(o){r(a,o);function a(){var s=o.call(this)||this;return s.type=e.ELayoutStrategyType.BottomOuter,s.layoutAxisPartsStrategy=i.layoutAxisPartsBottomStrategy,s}return a.prototype.measureAxes=function(s,l,u){var c=this,d,f,h=(f=(d=s.adjustedPadding)===null||d===void 0?void 0:d.bottom)!==null&&f!==void 0?f:0;return h+=s.bottomViewportBorder+s.bottomCanvasBorder,u.forEach(function(p){p.measure(),c.updateAxisLayoutState(p),h+=(0,i.getHorizontalAxisRequiredSize)(p.axisLayoutState),c.updateLeftAndRightChartLayoutState(l,p.axisLayoutState.additionalLeftSize,p.axisLayoutState.additionalRightSize)}),h},a.prototype.updateAreaSize=function(s,l){s.bottomOuterAreaSize=l},a.prototype.layoutAxes=function(s,l,u,c,d){d.forEach(function(f){f.axisLength=void 0,f.offset=0}),this.layoutAxesFromTopToBottom(s,l,u,c,d)},a})(n.BaseAxisLayoutStrategy);return jP.BottomAlignedOuterAxisLayoutStrategy=t,jP}var Nk={},aQ;function $be(){if(aQ)return Nk;aQ=1,Object.defineProperty(Nk,"__esModule",{value:!0}),Nk.ChartLayoutState=void 0;var r=(function(){function e(){this.leftInnerAreaSize=e.DEFAULT_SIZE,this.topInnerAreaSize=e.DEFAULT_SIZE,this.bottomInnerAreaSize=e.DEFAULT_SIZE,this.rightInnerAreaSize=e.DEFAULT_SIZE,this.leftOuterAreaSize=e.DEFAULT_SIZE,this.topOuterAreaSize=e.DEFAULT_SIZE,this.bottomOuterAreaSize=e.DEFAULT_SIZE,this.rightOuterAreaSize=e.DEFAULT_SIZE}return e.prototype.clear=function(){this.leftInnerAreaSize=e.DEFAULT_SIZE,this.topInnerAreaSize=e.DEFAULT_SIZE,this.bottomInnerAreaSize=e.DEFAULT_SIZE,this.rightInnerAreaSize=e.DEFAULT_SIZE,this.leftOuterAreaSize=e.DEFAULT_SIZE,this.topOuterAreaSize=e.DEFAULT_SIZE,this.bottomOuterAreaSize=e.DEFAULT_SIZE,this.rightOuterAreaSize=e.DEFAULT_SIZE},e.DEFAULT_SIZE=0,e})();return Nk.ChartLayoutState=r,Nk}var Fk={},sQ;function QUe(){if(sQ)return Fk;sQ=1,Object.defineProperty(Fk,"__esModule",{value:!0}),Fk.LayoutStrategyAxes=void 0;var r=(function(){function e(){this.topInnerAxes=[],this.bottomInnerAxes=[],this.leftInnerAxes=[],this.rightInnerAxes=[],this.topOuterAxes=[],this.bottomOuterAxes=[],this.leftOuterAxes=[],this.rightOuterAxes=[]}return e.prototype.clear=function(){this.topInnerAxes=[],this.bottomInnerAxes=[],this.leftInnerAxes=[],this.rightInnerAxes=[],this.topOuterAxes=[],this.bottomOuterAxes=[],this.leftOuterAxes=[],this.rightOuterAxes=[]},e})();return Fk.LayoutStrategyAxes=r,Fk}var BP={},lQ;function HH(){if(lQ)return BP;lQ=1;var r=BP&&BP.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(BP,"__esModule",{value:!0}),BP.LeftAlignedInnerAxisLayoutStrategy=void 0;var e=Xc(),i=ja(),n=qF(),t=(function(o){r(a,o);function a(s){var l=o.call(this,s)||this;return l.type=e.ELayoutStrategyType.LeftInner,l.layoutAxisPartsStrategy=i.layoutAxisPartsRightStrategy,l}return a.prototype.measureAxes=function(s,l,u){var c=this;this.sciChartSurface=s;var d=0;return u.forEach(function(f){f.measure(),c.updateAxisLayoutState(f),d+=(0,i.getVerticalAxisRequiredSize)(f.axisLayoutState)}),d},a.prototype.updateAreaSize=function(s,l){s.leftInnerAreaSize=l},a.prototype.layoutAxes=function(s,l,u,c,d){var f;if(d.forEach(function(m){m.axisLength=void 0,m.offset=0}),d.length!==0){var h=s;if(this.axisPosition!==void 0){var p=(f=this.sciChartSurface.getXAxisById(this.orthogonalAxisId))!==null&&f!==void 0?f:this.sciChartSurface.getDefaultXAxis();if(!p||!p.isHorizontalAxis)throw new Error("orthogonalAxisId should be a valid id of horizontal axis on the surface!");var g=p.getCurrentCoordinateCalculator(),v=(0,i.getCoordinateWithCoordinateMode)(this.axisPosition,g,this.coordinateMode),y=p.parentSurface.seriesViewRect.left;h=v+y}this.layoutAxesFromLeftToRight(h,l,u,c,d)}},a})(n.BaseCenteredAxisLayoutStrategy);return BP.LeftAlignedInnerAxisLayoutStrategy=t,BP}var VP={},uQ;function UH(){if(uQ)return VP;uQ=1;var r=VP&&VP.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(VP,"__esModule",{value:!0}),VP.LeftAlignedOuterAxisLayoutStrategy=void 0;var e=Xc(),i=ja(),n=F1(),t=(function(o){r(a,o);function a(){var s=o.call(this)||this;return s.type=e.ELayoutStrategyType.LeftOuter,s.layoutAxisPartsStrategy=i.layoutAxisPartsLeftStrategy,s}return a.prototype.measureAxes=function(s,l,u){var c=this,d,f,h=(f=(d=s.adjustedPadding)===null||d===void 0?void 0:d.left)!==null&&f!==void 0?f:0;return h+=s.leftViewportBorder+s.leftCanvasBorder,u.forEach(function(p){p.measure(),c.updateAxisLayoutState(p),h+=(0,i.getVerticalAxisRequiredSize)(p.axisLayoutState),c.updateTopAndBottomChartLayoutState(l,p.axisLayoutState.additionalTopSize,p.axisLayoutState.additionalBottomSize)}),h},a.prototype.updateAreaSize=function(s,l){s.leftOuterAreaSize=l},a.prototype.layoutAxes=function(s,l,u,c,d){d.forEach(function(f){f.axisLength=void 0,f.offset=0}),this.layoutAxesFromRightToLeft(s,l,u,c,d)},a})(n.BaseAxisLayoutStrategy);return VP.LeftAlignedOuterAxisLayoutStrategy=t,VP}var HP={},cQ;function zH(){if(cQ)return HP;cQ=1;var r=HP&&HP.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(HP,"__esModule",{value:!0}),HP.RightAlignedInnerAxisLayoutStrategy=void 0;var e=Xc(),i=ja(),n=qF(),t=(function(o){r(a,o);function a(s){var l=o.call(this,s)||this;return l.type=e.ELayoutStrategyType.RightInner,l.layoutAxisPartsStrategy=i.layoutAxisPartsLeftStrategy,l}return a.prototype.measureAxes=function(s,l,u){var c=this;this.sciChartSurface=s;var d=0;return u.forEach(function(f){f.measure(),c.updateAxisLayoutState(f),d+=(0,i.getVerticalAxisRequiredSize)(f.axisLayoutState)}),d},a.prototype.updateAreaSize=function(s,l){s.rightInnerAreaSize=Math.max(s.rightInnerAreaSize,l)},a.prototype.layoutAxes=function(s,l,u,c,d){var f;if(d.forEach(function(m){m.axisLength=void 0,m.offset=0}),d.length!==0){var h=u;if(this.axisPosition!==void 0){var p=(f=this.sciChartSurface.getXAxisById(this.orthogonalAxisId))!==null&&f!==void 0?f:this.sciChartSurface.getDefaultXAxis();if(!p||!p.isHorizontalAxis)throw new Error("orthogonalAxisId should be a valid id of horizontal axis on the surface!");var g=p.getCurrentCoordinateCalculator(),v=(0,i.getCoordinateWithCoordinateMode)(this.axisPosition,g,this.coordinateMode),y=p.parentSurface.seriesViewRect.left;h=v+y}this.layoutAxesFromRightToLeft(s,l,h,c,d)}},a})(n.BaseCenteredAxisLayoutStrategy);return HP.RightAlignedInnerAxisLayoutStrategy=t,HP}var UP={},dQ;function WH(){if(dQ)return UP;dQ=1;var r=UP&&UP.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(UP,"__esModule",{value:!0}),UP.RightAlignedOuterAxisLayoutStrategy=void 0;var e=Xc(),i=ja(),n=F1(),t=(function(o){r(a,o);function a(){var s=o.call(this)||this;return s.type=e.ELayoutStrategyType.RightOuter,s.layoutAxisPartsStrategy=i.layoutAxisPartsRightStrategy,s}return a.prototype.measureAxes=function(s,l,u){var c=this,d,f,h=(f=(d=s.adjustedPadding)===null||d===void 0?void 0:d.right)!==null&&f!==void 0?f:0;return h+=s.rightViewportBorder+s.rightCanvasBorder,u.forEach(function(p){p.measure(),c.updateAxisLayoutState(p),h+=(0,i.getVerticalAxisRequiredSize)(p.axisLayoutState),c.updateTopAndBottomChartLayoutState(l,p.axisLayoutState.additionalTopSize,p.axisLayoutState.additionalBottomSize)}),h},a.prototype.updateAreaSize=function(s,l){s.rightOuterAreaSize=l},a.prototype.layoutAxes=function(s,l,u,c,d){d.forEach(function(f){f.axisLength=void 0,f.offset=0}),this.layoutAxesFromLeftToRight(s,l,u,c,d)},a})(n.BaseAxisLayoutStrategy);return UP.RightAlignedOuterAxisLayoutStrategy=t,UP}var zP={},fQ;function GH(){if(fQ)return zP;fQ=1;var r=zP&&zP.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(zP,"__esModule",{value:!0}),zP.TopAlignedInnerAxisLayoutStrategy=void 0;var e=Xc(),i=ja(),n=qF(),t=(function(o){r(a,o);function a(s){var l=o.call(this,s)||this;return l.type=e.ELayoutStrategyType.TopInner,l.layoutAxisPartsStrategy=i.layoutAxisPartsBottomStrategy,l}return a.prototype.measureAxes=function(s,l,u){var c=this;this.sciChartSurface=s;var d=0;return u.forEach(function(f){f.measure(),c.updateAxisLayoutState(f),d+=(0,i.getHorizontalAxisRequiredSize)(f.axisLayoutState)}),d},a.prototype.updateAreaSize=function(s,l){s.topInnerAreaSize=l},a.prototype.layoutAxes=function(s,l,u,c,d){var f;if(d.forEach(function(m){m.axisLength=void 0,m.offset=0}),d.length!==0){var h=l;if(this.axisPosition!==void 0){var p=(f=this.sciChartSurface.getYAxisById(this.orthogonalAxisId))!==null&&f!==void 0?f:this.sciChartSurface.getDefaultYAxis();if(!p||p.isHorizontalAxis)throw new Error("orthogonalAxisId should be a valid id of vertical axis on the surface!");var g=p.getCurrentCoordinateCalculator(),v=(0,i.getCoordinateWithCoordinateMode)(this.axisPosition,g,this.coordinateMode),y=p.viewRect.top;h=v+y}this.layoutAxesFromTopToBottom(s,h,u,c,d)}},a})(n.BaseCenteredAxisLayoutStrategy);return zP.TopAlignedInnerAxisLayoutStrategy=t,zP}var WP={},hQ;function YH(){if(hQ)return WP;hQ=1;var r=WP&&WP.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(WP,"__esModule",{value:!0}),WP.TopAlignedOuterAxisLayoutStrategy=void 0;var e=Xc(),i=ja(),n=F1(),t=(function(o){r(a,o);function a(){var s=o.call(this)||this;return s.type=e.ELayoutStrategyType.TopOuter,s.layoutAxisPartsStrategy=i.layoutAxisPartsTopStrategy,s}return a.prototype.measureAxes=function(s,l,u){var c=this,d,f,h=(f=(d=s.adjustedPadding)===null||d===void 0?void 0:d.top)!==null&&f!==void 0?f:0;return h+=s.topViewportBorder+s.topCanvasBorder,u.forEach(function(p){p.measure(),c.updateAxisLayoutState(p),h+=(0,i.getHorizontalAxisRequiredSize)(p.axisLayoutState),c.updateLeftAndRightChartLayoutState(l,p.axisLayoutState.additionalLeftSize,p.axisLayoutState.additionalRightSize)}),h},a.prototype.updateAreaSize=function(s,l){s.topOuterAreaSize=l},a.prototype.layoutAxes=function(s,l,u,c,d){d.forEach(function(f){f.axisLength=void 0,f.offset=0}),this.layoutAxesFromBottomToTop(s,l,u,c,d)},a})(n.BaseAxisLayoutStrategy);return WP.TopAlignedOuterAxisLayoutStrategy=t,WP}var pQ;function ZS(){if(pQ)return kk;pQ=1,Object.defineProperty(kk,"__esModule",{value:!0}),kk.LayoutManager=void 0;var r=Jn(),e=vn(),i=cc(),n=$o(),t=nb(),o=Xc(),a=BH(),s=VH(),l=$be(),u=QUe(),c=HH(),d=UH(),f=zH(),h=WH(),p=GH(),g=YH(),v=10,y=(function(){function m(b){this.type=t.ELayoutManagerType.Default,this.leftOuterAxesLayoutStrategyProperty=new d.LeftAlignedOuterAxisLayoutStrategy,this.rightOuterAxesLayoutStrategyProperty=new h.RightAlignedOuterAxisLayoutStrategy,this.topOuterAxesLayoutStrategyProperty=new g.TopAlignedOuterAxisLayoutStrategy,this.bottomOuterAxesLayoutStrategyProperty=new s.BottomAlignedOuterAxisLayoutStrategy,this.leftInnerAxesLayoutStrategy=new c.LeftAlignedInnerAxisLayoutStrategy,this.rightInnerAxesLayoutStrategy=new f.RightAlignedInnerAxisLayoutStrategy,this.topInnerAxesLayoutStrategy=new p.TopAlignedInnerAxisLayoutStrategy,this.bottomInnerAxesLayoutStrategy=new a.BottomAlignedInnerAxisLayoutStrategy,this.chartLayoutState=new l.ChartLayoutState,this.axesGroupedByLayoutStrategy=new u.LayoutStrategyAxes,this.leftOuterAxesLayoutStrategy=this.createStrategy(b==null?void 0:b.LeftOuter,this.leftOuterAxesLayoutStrategy),this.rightOuterAxesLayoutStrategy=this.createStrategy(b==null?void 0:b.RightOuter,this.rightOuterAxesLayoutStrategy),this.topOuterAxesLayoutStrategy=this.createStrategy(b==null?void 0:b.TopOuter,this.topOuterAxesLayoutStrategy),this.bottomOuterAxesLayoutStrategy=this.createStrategy(b==null?void 0:b.BottomOuter,this.bottomOuterAxesLayoutStrategy),this.leftInnerAxesLayoutStrategy=this.createStrategy(b==null?void 0:b.LeftInner,this.leftInnerAxesLayoutStrategy),this.rightInnerAxesLayoutStrategy=this.createStrategy(b==null?void 0:b.RightInner,this.rightInnerAxesLayoutStrategy),this.topInnerAxesLayoutStrategy=this.createStrategy(b==null?void 0:b.TopInner,this.topInnerAxesLayoutStrategy),this.bottomInnerAxesLayoutStrategy=this.createStrategy(b==null?void 0:b.BottomInner,this.bottomInnerAxesLayoutStrategy)}return Object.defineProperty(m.prototype,"leftOuterAxesLayoutStrategy",{get:function(){return this.leftOuterAxesLayoutStrategyProperty},set:function(b){var S,_=this.leftOuterAxesLayoutStrategyProperty;_!==b&&(this.leftOuterAxesLayoutStrategyProperty=b,_.isStacked&&!b.isStacked&&(this.groupAxesByLayoutStrategy(),this.resetAxes(this.axesGroupedByLayoutStrategy.leftOuterAxes)),(S=this.sciChartSurface)===null||S===void 0||S.invalidateElement())},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"rightOuterAxesLayoutStrategy",{get:function(){return this.rightOuterAxesLayoutStrategyProperty},set:function(b){var S,_=this.rightOuterAxesLayoutStrategyProperty;_!==b&&(this.rightOuterAxesLayoutStrategyProperty=b,_.isStacked&&!b.isStacked&&(this.groupAxesByLayoutStrategy(),this.resetAxes(this.axesGroupedByLayoutStrategy.rightOuterAxes)),(S=this.sciChartSurface)===null||S===void 0||S.invalidateElement())},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"topOuterAxesLayoutStrategy",{get:function(){return this.topOuterAxesLayoutStrategyProperty},set:function(b){var S,_=this.topOuterAxesLayoutStrategyProperty;_!==b&&(this.topOuterAxesLayoutStrategyProperty=b,_.isStacked&&!b.isStacked&&(this.groupAxesByLayoutStrategy(),this.resetAxes(this.axesGroupedByLayoutStrategy.topOuterAxes)),(S=this.sciChartSurface)===null||S===void 0||S.invalidateElement())},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"bottomOuterAxesLayoutStrategy",{get:function(){return this.bottomOuterAxesLayoutStrategyProperty},set:function(b){var S,_=this.bottomOuterAxesLayoutStrategyProperty;_!==b&&(this.bottomOuterAxesLayoutStrategyProperty=b,_.isStacked&&!b.isStacked&&(this.groupAxesByLayoutStrategy(),this.resetAxes(this.axesGroupedByLayoutStrategy.bottomOuterAxes)),(S=this.sciChartSurface)===null||S===void 0||S.invalidateElement())},enumerable:!1,configurable:!0}),m.prototype.getAxisLayoutStrategy=function(b){var S=b.axisAlignment,_=b.isInnerAxis;switch(S){case i.EAxisAlignment.Left:return _?this.leftInnerAxesLayoutStrategy:this.leftOuterAxesLayoutStrategy;case i.EAxisAlignment.Right:return _?this.rightInnerAxesLayoutStrategy:this.rightOuterAxesLayoutStrategy;case i.EAxisAlignment.Top:return _?this.topInnerAxesLayoutStrategy:this.topOuterAxesLayoutStrategy;case i.EAxisAlignment.Bottom:return _?this.bottomInnerAxesLayoutStrategy:this.bottomOuterAxesLayoutStrategy;default:return(0,i.handleInvalidAxisAlignment)(S)}},m.prototype.layoutChart=function(b,S){var _,C,T,x;this.groupAxesByLayoutStrategy();var A=(_=S==null?void 0:S.right)!==null&&_!==void 0?_:0,w=(C=S==null?void 0:S.left)!==null&&C!==void 0?C:0,L=(T=S==null?void 0:S.top)!==null&&T!==void 0?T:0,k=(x=S==null?void 0:S.bottom)!==null&&x!==void 0?x:0,D=b.width-w-A,j=b.height-L-k;try{this.measureTopOuterAxes(),this.measureBottomOuterAxes(),this.measureLeftOuterAxes(),this.measureRightOuterAxes(),this.measureTopInnerAxes(),this.measureBottomInnerAxes(),this.measureLeftInnerAxes(),this.measureRightInnerAxes();var N=D-this.chartLayoutState.leftOuterAreaSize-this.chartLayoutState.rightOuterAreaSize,V=j-this.chartLayoutState.topOuterAreaSize-this.chartLayoutState.bottomOuterAreaSize,W=w,K=W+this.chartLayoutState.leftOuterAreaSize,H=K+(N<v?v:N),U=H+this.chartLayoutState.rightOuterAreaSize,I=L,Q=I+this.chartLayoutState.topOuterAreaSize,Z=Q+(V<v?v:V),ee=Z+this.chartLayoutState.bottomOuterAreaSize;this.sciChartSurface.drawSeriesBehindAxis?this.layoutChartCenter(W,I,U,ee):this.layoutChartCenter(K,Q,H,Z),this.leftOuterAxesLayoutStrategy.layoutAxes(W,Q,K-this.sciChartSurface.leftViewportBorder,Z,this.axesGroupedByLayoutStrategy.leftOuterAxes),this.rightOuterAxesLayoutStrategy.layoutAxes(H+this.sciChartSurface.rightViewportBorder,Q,U,Z,this.axesGroupedByLayoutStrategy.rightOuterAxes),this.topOuterAxesLayoutStrategy.layoutAxes(K,I,H,Q-this.sciChartSurface.topViewportBorder,this.axesGroupedByLayoutStrategy.topOuterAxes),this.bottomOuterAxesLayoutStrategy.layoutAxes(K,Z+this.sciChartSurface.bottomViewportBorder,H,ee,this.axesGroupedByLayoutStrategy.bottomOuterAxes);var ie=K+this.chartLayoutState.leftInnerAreaSize,de=H-this.chartLayoutState.rightInnerAreaSize,pe=Q+this.chartLayoutState.topInnerAreaSize,_e=Z-this.chartLayoutState.bottomInnerAreaSize;return this.leftInnerAxesLayoutStrategy.layoutAxes(K,Q,ie,Z,this.axesGroupedByLayoutStrategy.leftInnerAxes),this.rightInnerAxesLayoutStrategy.layoutAxes(de,Q,H,Z,this.axesGroupedByLayoutStrategy.rightInnerAxes),this.topInnerAxesLayoutStrategy.layoutAxes(K,Q,H,pe,this.axesGroupedByLayoutStrategy.topInnerAxes),this.bottomInnerAxesLayoutStrategy.layoutAxes(K,_e,H,Z,this.axesGroupedByLayoutStrategy.bottomInnerAxes),this.sciChartSurface.seriesViewRect}finally{this.chartLayoutState.clear()}},m.prototype.toJSON=function(){var b={BottomInner:this.bottomInnerAxesLayoutStrategy.toJSON(),BottomOuter:this.bottomOuterAxesLayoutStrategy.toJSON(),LeftInner:this.leftInnerAxesLayoutStrategy.toJSON(),LeftOuter:this.leftOuterAxesLayoutStrategy.toJSON(),RightInner:this.rightInnerAxesLayoutStrategy.toJSON(),RightOuter:this.rightOuterAxesLayoutStrategy.toJSON(),TopInner:this.topInnerAxesLayoutStrategy.toJSON(),TopOuter:this.topOuterAxesLayoutStrategy.toJSON()};return{type:this.type,options:b}},m.prototype.measureLeftOuterAxes=function(){var b=this.leftOuterAxesLayoutStrategy.measureAxes(this.sciChartSurface,this.chartLayoutState,this.axesGroupedByLayoutStrategy.leftOuterAxes);this.leftOuterAxesLayoutStrategy.updateAreaSize(this.chartLayoutState,b)},m.prototype.measureRightOuterAxes=function(){var b=this.rightOuterAxesLayoutStrategy.measureAxes(this.sciChartSurface,this.chartLayoutState,this.axesGroupedByLayoutStrategy.rightOuterAxes);this.rightOuterAxesLayoutStrategy.updateAreaSize(this.chartLayoutState,b)},m.prototype.measureTopOuterAxes=function(){var b=this.topOuterAxesLayoutStrategy.measureAxes(this.sciChartSurface,this.chartLayoutState,this.axesGroupedByLayoutStrategy.topOuterAxes);this.topOuterAxesLayoutStrategy.updateAreaSize(this.chartLayoutState,b)},m.prototype.measureBottomOuterAxes=function(){var b=this.bottomOuterAxesLayoutStrategy.measureAxes(this.sciChartSurface,this.chartLayoutState,this.axesGroupedByLayoutStrategy.bottomOuterAxes);this.bottomOuterAxesLayoutStrategy.updateAreaSize(this.chartLayoutState,b)},m.prototype.measureLeftInnerAxes=function(){var b=this.leftInnerAxesLayoutStrategy.measureAxes(this.sciChartSurface,this.chartLayoutState,this.axesGroupedByLayoutStrategy.leftInnerAxes);this.leftInnerAxesLayoutStrategy.updateAreaSize(this.chartLayoutState,b)},m.prototype.measureRightInnerAxes=function(){var b=this.rightInnerAxesLayoutStrategy.measureAxes(this.sciChartSurface,this.chartLayoutState,this.axesGroupedByLayoutStrategy.rightInnerAxes);this.rightInnerAxesLayoutStrategy.updateAreaSize(this.chartLayoutState,b)},m.prototype.measureTopInnerAxes=function(){var b=this.topInnerAxesLayoutStrategy.measureAxes(this.sciChartSurface,this.chartLayoutState,this.axesGroupedByLayoutStrategy.topInnerAxes);this.topInnerAxesLayoutStrategy.updateAreaSize(this.chartLayoutState,b)},m.prototype.measureBottomInnerAxes=function(){var b=this.bottomInnerAxesLayoutStrategy.measureAxes(this.sciChartSurface,this.chartLayoutState,this.axesGroupedByLayoutStrategy.bottomInnerAxes);this.bottomInnerAxesLayoutStrategy.updateAreaSize(this.chartLayoutState,b)},m.prototype.groupAxesByLayoutStrategy=function(){this.axesGroupedByLayoutStrategy.clear();var b=this.axesGroupedByLayoutStrategy,S=b.topInnerAxes,_=b.bottomInnerAxes,C=b.leftInnerAxes,T=b.rightInnerAxes,x=b.topOuterAxes,A=b.bottomOuterAxes,w=b.leftOuterAxes,L=b.rightOuterAxes,k=function(D){D.forEach(function(j){var N=j.axisAlignment,V=j.isInnerAxis;if(j.isVisible,V)switch(N){case i.EAxisAlignment.Top:S.push(j);break;case i.EAxisAlignment.Bottom:_.push(j);break;case i.EAxisAlignment.Left:C.push(j);break;case i.EAxisAlignment.Right:T.push(j);break}else switch(N){case i.EAxisAlignment.Top:x.push(j);break;case i.EAxisAlignment.Bottom:A.push(j);break;case i.EAxisAlignment.Left:w.push(j);break;case i.EAxisAlignment.Right:L.push(j);break}})};k(this.sciChartSurface.xAxes.asArray()),k(this.sciChartSurface.yAxes.asArray())},m.prototype.layoutChartCenter=function(b,S,_,C){this.setSeriesViewRect(b,S,_,C),this.sciChartSurface.annotationUnderlaySurfaceViewRect=e.Rect.createWithCoords(b,S,_,C),this.sciChartSurface.annotationOverlaySurfaceViewRect=e.Rect.createWithCoords(b,S,_,C),this.sciChartSurface.chartModifierSurfaceViewRect=e.Rect.createWithCoords(b,S,_,C)},m.prototype.setSeriesViewRect=function(b,S,_,C){var T=this.sciChartSurface.seriesViewRect,x=e.Rect.createWithCoords(b,S,_,C);(!T||!e.Rect.isEqual(T,x))&&this.sciChartSurface.setSeriesViewRect(x)},m.prototype.createStrategy=function(b,S){return b&&b.type!==S.type?"measureAxes"in b?b:b.type===o.ELayoutStrategyType.Custom?(0,r.createType)(n.EBaseType.LayoutStrategy,b.customType,void 0,b.options):(0,r.createType)(n.EBaseType.LayoutStrategy,b.type,void 0,b.options):S},m.prototype.resetAxes=function(b){b.length>0&&(b[0].isPrimaryAxis=!0)},m})();return kk.LayoutManager=y,kk}var GP={},n5={},gQ;function j1(){return gQ||(gQ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EAutoRange=void 0,(function(e){e.Once="Once",e.Always="Always",e.Never="Never"})(r.EAutoRange||(r.EAutoRange={}))})(n5)),n5}var jk={},vQ;function JS(){if(vQ)return jk;vQ=1,Object.defineProperty(jk,"__esModule",{value:!0}),jk.RenderPassData=void 0;var r=(function(){function e(i,n,t,o,a,s){this.indexRange=i,this.getxCoordinateCalculator=n,this.getyCoordinateCalculator=t,this.isVerticalChart=o,this.pointSeries=a,this.resamplingHash=s}return Object.defineProperty(e.prototype,"xCoordinateCalculator",{get:function(){return this.getxCoordinateCalculator()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"yCoordinateCalculator",{get:function(){return this.getyCoordinateCalculator()},enumerable:!1,configurable:!0}),e})();return jk.RenderPassData=r,jk}var Bk={},Vk={},Hk={},Uk={},yQ;function Qq(){if(yQ)return Uk;yQ=1,Object.defineProperty(Uk,"__esModule",{value:!0}),Uk.NumberUtil=void 0;var r=(function(){function e(){}return e.constrain=function(i,n,t){return Math.max(Math.min(i,t),n)},e})();return Uk.NumberUtil=r,Uk}var mQ;function ES(){return mQ||(mQ=1,(function(r){var e=Hk&&Hk.__extends||(function(){var s=function(l,u){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(c[f]=d[f])},s(l,u)};return function(l,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");s(l,u);function c(){this.constructor=l}l.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}})();Object.defineProperty(r,"__esModule",{value:!0}),r.SeriesAnimationFiniteStateMachine=r.AnimationFiniteStateMachine=r.EAnimationStateTransition=r.EAnimationState=void 0;var i=Qq(),n;(function(s){s.InitialState="InitialState",s.Delayed="Delayed",s.Running="Running",s.Completed="Completed"})(n=r.EAnimationState||(r.EAnimationState={}));var t;(function(s){s.NoChange="NoChange",s.InitialState_Delayed="InitialState_Delayed",s.InitialState_Running="InitialState_Running",s.InitialState_Completed="InitialState_Completed",s.Delayed_Running="Delayed_Running",s.Running_Completed="Running_Completed"})(t=r.EAnimationStateTransition||(r.EAnimationStateTransition={}));var o=(function(){function s(l){this.stateProperty=n.InitialState,this.animationProperty=l}return Object.defineProperty(s.prototype,"state",{get:function(){return this.stateProperty},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"animation",{get:function(){return this.animationProperty},enumerable:!1,configurable:!0}),s.prototype.is=function(l){return l.includes(this.stateProperty)},s.prototype.update=function(l){return this.stateProperty===n.InitialState?this.animationProperty.delay?(this.toDelayed(),t.InitialState_Delayed):this.animationProperty.duration?(this.toRunning(),t.InitialState_Running):(this.toCompleted(),t.InitialState_Completed):this.stateProperty===n.Delayed?this.updateDelayedState(l):this.stateProperty===n.Running?this.updateRunningState(l):t.NoChange},Object.defineProperty(s.prototype,"animationProgress",{get:function(){if(this.stateProperty===n.Running){var l=i.NumberUtil.constrain(this.animationElapsed/this.animationProperty.duration,0,1);return this.animationProperty.ease(l)}else return this.stateProperty===n.Completed?1:0},enumerable:!1,configurable:!0}),s.prototype.toCompleted=function(){this.stateProperty=n.Completed},s.prototype.validate=function(l,u){if(!l.includes(this.stateProperty))throw Error("Transition from state ".concat(this.stateProperty," to ").concat(u," if forbidden"))},s.prototype.toDelayed=function(){this.animationDelayStartTimestamp=Date.now(),this.animationDelayElapsed=0,this.stateProperty=n.Delayed},s.prototype.toRunning=function(){this.animationStartTimestamp=Date.now(),this.animationElapsed=0,this.stateProperty=n.Running},s.prototype.updateDelayedState=function(l){return this.animationDelayElapsed+=l,this.animationDelayElapsed>=this.animationProperty.delay?(this.toRunning(),t.Delayed_Running):t.NoChange},s.prototype.updateRunningState=function(l){return this.animationElapsed+=l,this.animationElapsed>=this.animationProperty.duration?(this.toCompleted(),t.Running_Completed):t.NoChange},s})();r.AnimationFiniteStateMachine=o;var a=(function(s){e(l,s);function l(u,c){var d=s.call(this,u)||this;return c&&(d.initialStylesProperty=u.getSeriesStyle(c)),d}return Object.defineProperty(l.prototype,"animation",{get:function(){return this.animationProperty},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"initialStyles",{get:function(){return this.initialStylesProperty},enumerable:!1,configurable:!0}),l})(o);r.SeriesAnimationFiniteStateMachine=a})(Hk)),Hk}var zk={},um={},bQ;function bN(){if(bQ)return um;bQ=1,Object.defineProperty(um,"__esModule",{value:!0}),um.logToBase=um.fillNoisySinewave=um.getNoisySinewave=void 0;var r=function(n,t,o,a,s){for(var l=[],u=[],c=o/t,d=2*Math.PI*c,f=0;f<n;f++){var h=f*t/(n-1);l.push(h);var p=a*Math.sin(h*d),g=(Math.random()-.5)*s;u.push(p+g)}return[l,u]};um.getNoisySinewave=r;var e=function(n,t,o,a,s,l){var u=o/t,c=2*Math.PI*u,d=l.getNativeXValues(),f=l.getNativeYValues();d.reserve(n),f.reserve(n);for(var h=0;h<n;h++){var p=h*t/(n-1),g=a*Math.sin(p*c),v=(Math.random()-.5)*s;d.push_back(p),f.push_back(g+v)}};um.fillNoisySinewave=e;var i=function(n,t){return t===10?Math.log10(n):Math.log(n)/(t?Math.log(t):1)};return um.logToBase=i,um}var SQ;function oi(){if(SQ)return zk;SQ=1,Object.defineProperty(zk,"__esModule",{value:!0}),zk.NumberRange=void 0;var r=Oh(),e=bN(),i=(function(){function n(t,o){t===void 0&&(t=0),o===void 0&&(o=10),this.min=t,this.max=o}return n.prototype.union=function(t){var o=Math.min(this.min,t.min),a=Math.max(this.max,t.max);return new n(o,a)},n.prototype.clip=function(t){var o=Math.max(this.min,t.min),a=Math.min(this.max,t.max);return new n(o,a)},n.prototype.growBy=function(t){var o=this.max-this.min,a=this.min-t.min*(this.isZero()?this.min:o),s=this.max+t.max*(this.isZero()?this.max:o);if(a>s){var l=a;a=s,s=l}return new n(a,s)},n.prototype.growByLog=function(t,o){var a=this.min<0?-1:1,s=this.min!==0?(0,e.logToBase)(Math.abs(this.min),o):0,l=this.max!==0?(0,e.logToBase)(Math.abs(this.max),o):0,u=l-s,c=u*t.min,d=u*t.max,f=a*(this.min!==0?Math.pow(o,s-c):0),h=a*(this.max!==0?Math.pow(o,l+d):0);if(f>h){var p=h;h=f,f=p}return new n(f,h)},n.prototype.isDefined=function(){return(0,r.isRealNumber)(this.max)&&(0,r.isRealNumber)(this.min)},n.prototype.equals=function(t){return t?t.min===this.min&&t.max===this.max:!1},n.prototype.toString=function(){return"NumberRange (".concat(this.min,", ").concat(this.max,")")},Object.defineProperty(n.prototype,"diff",{get:function(){return this.max-this.min},enumerable:!1,configurable:!0}),n.prototype.isZero=function(){return this.min===this.max},n.areEqual=function(t,o){return t===o?!0:t&&!o||!t&&o?!1:o.min===t.min&&o.max===t.max},n.hydrate=function(t){return t&&!("growBy"in t)?new n(t.min,t.max):t},n})();return zk.NumberRange=i,zk}var o5={},_Q;function Yd(){return _Q||(_Q=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EAnimationType=void 0,(function(e){e.Fade="Fade",e.Scale="Scale",e.Sweep="Sweep",e.Wave="Wave",e.Style="Style",e.Custom="Custom"})(r.EAnimationType||(r.EAnimationType={}))})(o5)),o5}var a5={},PQ;function zc(){return PQ||(PQ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertYColumnMode=r.EColumnYMode=r.convertColumnMode=r.EColumnMode=void 0;var e;(function(o){o.Mid="Mid",o.MidWidth="MidWidth",o.Start="Start",o.StartWidth="StartWidth",o.StartEnd="StartEnd"})(e=r.EColumnMode||(r.EColumnMode={}));function i(o,a){switch(o){case e.Mid:return a.SCRTColumnXMode.ColumnXMode_Mid;case e.MidWidth:return a.SCRTColumnXMode.ColumnXMode_MidX2Width;case e.Start:return a.SCRTColumnXMode.ColumnXMode_Start;case e.StartEnd:return a.SCRTColumnXMode.ColumnXMode_StartX2End;case e.StartWidth:return a.SCRTColumnXMode.ColumnXMode_StartX2Width;default:return a.SCRTColumnXMode.ColumnXMode_Mid}}r.convertColumnMode=i;var n;(function(o){o.TopBottom="TopBottom",o.TopHeight="TopHeight",o.CenterHeight="CenterHeight"})(n=r.EColumnYMode||(r.EColumnYMode={}));function t(o,a){switch(o){case n.TopBottom:return a.SCRTColumnYMode.ColumnYMode_TopBottom;case n.TopHeight:return a.SCRTColumnYMode.ColumnYMode_TopHeight;case n.CenterHeight:return a.SCRTColumnYMode.ColumnYMode_CenterHeight;default:return a.SCRTColumnYMode.ColumnYMode_TopBottom}}r.convertYColumnMode=t})(a5)),a5}var s5={},CQ;function ku(){return CQ||(CQ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EDataLabelProviderType=void 0,(function(e){e.Default="Default",e.Line="Line",e.Column="Column",e.Rectangle="Rectangle",e.Text="Text",e.Heatmap="Heatmap",e.Band="Band",e.Bubble="Bubble",e.NonUniformHeatmap="NonUniformHeatmap",e.Contours="Contours",e.StackedCollection="StackedCollection",e.Custom="Custom",e.PolarDefault="PolarDefault",e.PolarColumn="PolarColumn",e.PolarText="PolarText"})(r.EDataLabelProviderType||(r.EDataLabelProviderType={}))})(s5)),s5}var l5={},TQ;function ry(){return TQ||(TQ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EDataPointWidthMode=void 0,(function(e){e.Absolute="Absolute",e.Relative="Relative",e.Range="Range"})(r.EDataPointWidthMode||(r.EDataPointWidthMode={}))})(l5)),l5}var u5={},xQ;function Ap(){return xQ||(xQ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EPointMarkerType=void 0,(function(e){e.Ellipse="Ellipse",e.Cross="Cross",e.Sprite="Sprite",e.Square="Square",e.Triangle="Triangle",e.X="X",e.Custom="Custom"})(r.EPointMarkerType||(r.EPointMarkerType={}))})(u5)),u5}var c5={},EQ;function QS(){return EQ||(EQ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EYRangeMode=void 0,(function(e){e.Visible="Visible",e.Drawn="Drawn"})(r.EYRangeMode||(r.EYRangeMode={}))})(c5)),c5}var YP={},cm={},AQ;function PR(){if(AQ)return cm;AQ=1,Object.defineProperty(cm,"__esModule",{value:!0}),cm.subArray=cm.isNumberArray=cm.isTypedArray=void 0;function r(n){return n instanceof Float64Array}cm.isTypedArray=r;function e(n){return Array.isArray(n)&&(n.length>0?typeof n[0]=="number":!0)}cm.isNumberArray=e;function i(n,t,o){return r(n)?n.subarray(t,o):n.slice(t,o)}return cm.subArray=i,cm}var d5={},wQ;function qv(){return wQ||(wQ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertSearchMode=r.ESearchMode=void 0;var e;(function(n){n.Exact="Exact",n.Nearest="Nearest",n.RoundDown="RoundDown",n.RoundUp="RoundUp"})(e=r.ESearchMode||(r.ESearchMode={}));var i=function(n,t){switch(t){case e.Exact:return n.SCRTFindIndexSearchMode.Exact;case e.Nearest:return n.SCRTFindIndexSearchMode.Nearest;case e.RoundDown:return n.SCRTFindIndexSearchMode.RoundDown;case e.RoundUp:return n.SCRTFindIndexSearchMode.RoundUp}};r.convertSearchMode=i})(d5)),d5}var f5={},OQ;function xo(){return OQ||(OQ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.generateValueNamesForDataSeries=r.EValueName=void 0,(function(i){i.Y="y",i.Y1="y1",i.X1="x1",i.Z="z",i.BoxPlotMedian="median",i.BoxPlotMax="max",i.BoxPlotUpper="upper",i.BoxPlotLower="lower",i.BoxPlotMinimum="minimum",i.Close="close",i.High="high",i.Low="low",i.Open="open"})(r.EValueName||(r.EValueName={}));function e(i){for(var n=[],t=0;t<i;t++)n.push("y"+(t>0?t.toString():""));return n}r.generateValueNamesForDataSeries=e})(f5)),f5}var h5={},DQ;function Ld(){return DQ||(DQ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.appendDoubleVectorFromBuffer=r.appendDoubleVectorFromJsArray=r.memCopyFloat32=r.insertDoubleVectorFromJsArray=r.SIZEOF_FLOAT32=r.SIZEOF_NUMBER=void 0;var e=ni(),i=Lf();r.SIZEOF_NUMBER=8,r.SIZEOF_FLOAT32=4;function n(s,l,u,c){e.Guard.notNull(s,"wasmContext"),e.Guard.notNull(l,"source"),e.Guard.notNull(u,"dest"),e.Guard.isTrue(c>=0,"destIndex must be greater than or equal to zero"),e.Guard.isTrue(c<=u.size(),"destIndex must be less than or equal to dest.size()");var d=l.length;if(d!==0){var f=u.size();u.resizeFast(f+d),c<f&&s.SCRTMemMove(u.dataPtr(c+d),u.dataPtr(c),(f-c)*r.SIZEOF_NUMBER),s.HEAPF64.set(l,u.dataPtr(c)/r.SIZEOF_NUMBER)}}r.insertDoubleVectorFromJsArray=n;function t(s,l,u,c){e.Guard.notNull(s,"wasmContext"),e.Guard.notNull(l,"source"),e.Guard.notNull(u,"dest"),e.Guard.isTrue(c>=0,"destIndex must be greater than or equal to zero"),e.Guard.isTrue(c<=u.size()+l.length,"destIndex must be less than or equal to dest.size() + source.Length");var d=l.length;d!==0&&s.HEAPF32.set(l,u.dataPtr(c)/r.SIZEOF_FLOAT32)}r.memCopyFloat32=t;function o(s,l,u){var c=l.size(),d=u.length,f=c,h=f+d;try{l.resizeFast(h)}catch(g){throw new Error("Out of memory exception. Heap size: ".concat(s.HEAPF64.buffer.byteLength/(1024*1024)," mb"),g)}var p=l.dataPtr(f);s.HEAPF64.set(u,p/r.SIZEOF_NUMBER)}r.appendDoubleVectorFromJsArray=o;function a(s,l,u){try{var c=l.size(),d=u.byteLength/Float64Array.BYTES_PER_ELEMENT,f=c,h=f+d;l.resizeFast(h);var p=l.dataPtr(f),g=s.HEAPF64;g.set(u,p/r.SIZEOF_NUMBER)}catch(v){throw i.Logger.log("Append Error",v),v}}r.appendDoubleVectorFromBuffer=a})(h5)),h5}var Wk={},RQ;function XF(){if(RQ)return Wk;RQ=1,Object.defineProperty(Wk,"__esModule",{value:!0}),Wk.copyDoubleVector=void 0;var r=Ld(),e=function(i,n,t){var o=i.size();n.resizeFast(o),t.SCRTMemCopy(n.dataPtr(0),i.dataPtr(0),o*r.SIZEOF_NUMBER)};return Wk.copyDoubleVector=e,Wk}var Gk={},MQ;function e8(){if(MQ)return Gk;MQ=1,Object.defineProperty(Gk,"__esModule",{value:!0}),Gk.memoize=void 0;function r(e,i){var n,t,o=function(s,l){return!s.some(function(u,c){return u!==l[c]})},a=i??o;return function(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];var u=t&&a(s,t);return(!t||!u)&&(t=s,n=e.apply(void 0,s)),n}}return Gk.memoize=r,Gk}var Yk={},p5={},g5={},LQ;function wp(){return LQ||(LQ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.ENumericFormat=void 0,(function(e){e.NoFormat="NoFormat",e.Decimal="Decimal",e.SignificantFigures="SignificantFigures",e.Date_DDMMYYYY="Date_DDMMYYYY",e.Date_DDMMYY="Date_DDMMYY",e.Date_DDMMHHMM="Date_DDMMHHMM",e.Date_DDMM="Date_DDMM",e.Date_HHMM="Date_HHMM",e.Date_HHMMSS="Date_HHMMSS",e.Date_SSms="Date_SSms",e.Exponential="Exponential",e.Scientific="Scientific",e.Engineering="Engineering"})(r.ENumericFormat||(r.ENumericFormat={}))})(g5)),g5}var v5={},kQ;function wd(){return kQ||(kQ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.formatUnixDateToHumanStringSSns=r.formatUnixDateToHumanStringSSus=r.formatUnixDateToHumanStringYYYY=r.formatUnixDateToHumanStringDD=r.formatUnixDateToHumanStringMMM=r.formatUnixDateToHumanStringMMMDD=r.formatUnixDateToHumanStringHHMM=r.formatUnixDateToHumanStringSSms=r.formatUnixDateToHumanStringHHMMSS=r.formatUnixDateToHumanStringDDMM=r.formatUnixDateToHumanStringDDMMHHMM=r.formatUnixDateToHumanStringDDMMYY=r.formatUnixDateToHumanString=void 0;var e=function(y,m){m===void 0&&(m="en-US");var b=new Date(y*1e3).toLocaleDateString(m,{month:"numeric",year:"numeric",day:"numeric"});return b==="Invalid Date"?"":b};r.formatUnixDateToHumanString=e;var i=function(y){var m=new Date(y*1e3).toLocaleDateString("en-GB",{timeZone:"utc",year:"2-digit",month:"2-digit",day:"2-digit"});return m==="Invalid Date"?"":m};r.formatUnixDateToHumanStringDDMMYY=i;var n=function(y){var m=(0,r.formatUnixDateToHumanStringDDMM)(y),b=(0,r.formatUnixDateToHumanStringHHMM)(y);return"".concat(m," ").concat(b)};r.formatUnixDateToHumanStringDDMMHHMM=n;var t=function(y){var m=new Date(y*1e3).toLocaleDateString("en-GB",{timeZone:"utc",day:"numeric",month:"numeric"});return m==="Invalid Date"?"":m};r.formatUnixDateToHumanStringDDMM=t;var o=function(y){var m=new Date(y*1e3),b=m.getUTCHours(),S=m.getUTCMinutes(),_=m.getUTCSeconds();if(isNaN(b)||isNaN(S)||isNaN(_))return"";var C=b<=9?"0".concat(b):b.toString(10),T=S<=9?"0".concat(S):S.toString(10),x=_<=9?"0".concat(_):_.toString(10);return"".concat(C,":").concat(T,":").concat(x)};r.formatUnixDateToHumanStringHHMMSS=o;var a=function(y,m){var b=new Date(y*1e3),S=b.getUTCSeconds(),_=m!==void 0?m:b.getUTCMilliseconds();if(isNaN(S)||isNaN(_))return"";var C=S<=9?"0".concat(S):S.toString(10),T=p(_,3);return"".concat(C,".").concat(T)};r.formatUnixDateToHumanStringSSms=a;var s=function(y){var m=new Date(y*1e3),b=m.getUTCHours(),S=m.getUTCMinutes();if(isNaN(b)||isNaN(S))return"";var _=b<=9?"0".concat(b):b.toString(10),C=S<=9?"0".concat(S):S.toString(10);return"".concat(_,":").concat(C)};r.formatUnixDateToHumanStringHHMM=s;var l=function(y){var m=new Date(y*1e3),b=m.getUTCMonth(),S=m.getUTCDate();return isNaN(b)||isNaN(S)?"":"".concat(h(b)," ").concat(S)};r.formatUnixDateToHumanStringMMMDD=l;var u=function(y){var m=new Date(y*1e3),b=m.getUTCMonth();return isNaN(b)?"":h(b)};r.formatUnixDateToHumanStringMMM=u;var c=function(y){var m=new Date(y*1e3),b=m.getUTCDate();if(isNaN(b))return"";var S=b.toString();return S.length===2?S:S.length===1?"0".concat(S):""};r.formatUnixDateToHumanStringDD=c;var d=function(y){var m=new Date(y*1e3),b=m.getUTCFullYear();return isNaN(b)?"":b.toString(10)};r.formatUnixDateToHumanStringYYYY=d;var f=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],h=function(y){if(y<0||y>11)throw new Error("Invalid month index");return f[y]},p=function(y,m){for(var b=Math.floor(Math.abs(y)).toString();b.length<m;)b="0"+b;return b},g=function(y,m){var b=new Date(y*1e3),S=b.getUTCSeconds();return isNaN(S)?"":"".concat(p(S,2),".").concat(p(m,6))};r.formatUnixDateToHumanStringSSus=g;var v=function(y,m){var b=new Date(y*1e3),S=b.getUTCSeconds();return isNaN(S)?"":"".concat(p(S,2),".").concat(p(m,9))};r.formatUnixDateToHumanStringSSns=v})(v5)),v5}var IQ;function Il(){return IQ||(IQ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.checkIsNaN=r.toEngineering=r.toScientific=r.toSuperScript=r.formatNumber=r.numericHashCode=r.formatNumber2Digits=void 0;var e=wp(),i=wd(),n=bN(),t=function(f){return(Math.round((f+Number.EPSILON)*100)/100).toFixed(2)};r.formatNumber2Digits=t;var o=function(f,h){return f=f*31-f+h,f|=0,f};r.numericHashCode=o;var a=function(f,h,p,g){if(f===void 0)return"";switch(h){case e.ENumericFormat.NoFormat:return f.toString();case e.ENumericFormat.Decimal:return f.toFixed(p);case e.ENumericFormat.SignificantFigures:return Number(f.toPrecision(p)).toString();case e.ENumericFormat.Exponential:return f.toExponential(p);case e.ENumericFormat.Scientific:return(0,r.toScientific)(f,p,10);case e.ENumericFormat.Date_DDMMYYYY:return(0,i.formatUnixDateToHumanString)(f);case e.ENumericFormat.Date_DDMMYY:return(0,i.formatUnixDateToHumanStringDDMMYY)(f);case e.ENumericFormat.Date_DDMMHHMM:return(0,i.formatUnixDateToHumanStringDDMMHHMM)(f);case e.ENumericFormat.Date_DDMM:return(0,i.formatUnixDateToHumanStringDDMM)(f);case e.ENumericFormat.Date_HHMM:return(0,i.formatUnixDateToHumanStringHHMM)(f);case e.ENumericFormat.Date_HHMMSS:return(0,i.formatUnixDateToHumanStringHHMMSS)(f);case e.ENumericFormat.Date_SSms:return(0,i.formatUnixDateToHumanStringSSms)(f);case e.ENumericFormat.Engineering:return(0,r.toEngineering)(f,g==null?void 0:g.large,g==null?void 0:g.small,p)}};r.formatNumber=a;var s=["⁰","¹","²","³","⁴","⁵","⁶","⁷","⁸","⁹"],l=function(f){for(var h="",p=f<0,g=Math.abs(f).toString(),v=0,y=g;v<y.length;v++){var m=y[v],b=Number.parseInt(m);isNaN(b)||(h+=s[b])}return(p?"⁻":"")+h};r.toSuperScript=l;var u=function(f,h,p){if(f===0)return"0";var g=(0,n.logToBase)(Math.abs(f),p);g=Math.floor(g);var v=f/Math.pow(p,g);return v.toPrecision(h).toString()+"x"+p.toString()+(0,r.toSuperScript)(g)};r.toScientific=u;var c=function(f,h,p,g){if(g===void 0&&(g=1),f===0)return"0";var v=Math.abs(f);if(h??(h=["K","M","B","T"]),p??(p=["m","µ","n","p"]),h.length===0&&p.length===0)return f.toString();var y=function(_){var C=Math.pow(10,g),T=Math.trunc(_*C)/C,x=T.toFixed(g);return x.replace(/\.?0+$/,"")};if(v>=1&&v<1e3)return y(f);if(v>=1e3&&h.length>0)for(var m=1;m<=h.length;m++){var b=Math.pow(10,3*(m+1));if(v<b||m===h.length){var S=f/Math.pow(10,3*m);return y(S)+h[m-1]}}if(v<1&&v>0&&p.length>0)for(var m=0;m<p.length;m++){var b=Math.pow(10,-3*(m+1));if(v>=b||m===p.length-1){var S=f*Math.pow(10,3*(m+1));return y(S)+p[m]}}return f.toString()};r.toEngineering=c;var d=function(f){return f!==f};r.checkIsNaN=d})(p5)),p5}var NQ;function qbe(){if(NQ)return Yk;NQ=1,Object.defineProperty(Yk,"__esModule",{value:!0}),Yk.DataDistributionCalculator=void 0;var r=$F(),e=xf(),i=Il(),n=(function(){function t(){this.containsNanProperty=!1,this.isSortedAscendingProperty=!0}return Object.defineProperty(t.prototype,"containsNaN",{get:function(){return this.containsNanProperty},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isSortedAscending",{get:function(){return this.isSortedAscendingProperty},enumerable:!1,configurable:!0}),t.prototype.onAppend=function(o,a,s,l,u){if(a!==void 0?this.containsNanProperty=a:this.containsNanProperty===!1&&u&&(this.containsNanProperty=u.some(i.checkIsNaN),this.containsNanProperty===!1&&r.performanceWarnings.dataDistributionFlagNaN.warn()),o!==void 0)this.isSortedAscendingProperty=o;else if(this.isSortedAscendingProperty===!0){var c=(0,e.isArraySorted)(l),d=s.size(),f=d===0||s.get(d-1)<l[0];this.isSortedAscendingProperty=c&&f,this.isSortedAscendingProperty===!0&&r.performanceWarnings.dataDistributionFlagSortedAscending.warn()}},t.prototype.onInsert=function(o,a,s,l,u,c){if(a!==void 0?this.containsNanProperty=a:this.containsNanProperty===!1&&u&&(this.containsNanProperty=u.some(i.checkIsNaN),this.containsNanProperty===!1&&r.performanceWarnings.dataDistributionFlagNaN.warn()),o!==void 0)this.isSortedAscendingProperty=o;else if(this.isSortedAscendingProperty===!0&&l){var d=(0,e.isArraySorted)(l),f=c===0||s.get(c-1)<l[0],h=c>=s.size()||l[l.length-1]<s.get(c);this.isSortedAscendingProperty=d&&f&&h,this.isSortedAscendingProperty===!0&&r.performanceWarnings.dataDistributionFlagSortedAscending.warn()}},t.prototype.onUpdate=function(o,a,s,l,u,c){if(a!==void 0?this.containsNanProperty=a:this.containsNanProperty===!1&&u&&(this.containsNanProperty=u.some(i.checkIsNaN)),o!==void 0)this.isSortedAscendingProperty=o;else if(this.isSortedAscendingProperty===!0&&l){var d=(0,e.isArraySorted)(l),f=c===0||s.get(c-1)<l[0],h=s.size(),p=c+l.length,g=p>=h||l[l.length-1]<s.get(p);this.isSortedAscendingProperty=d&&f&&g}},t.prototype.clear=function(o,a){this.isSortedAscendingProperty=o??!0,this.containsNanProperty=a??!1},t.prototype.setIsSortedAscending=function(o){this.isSortedAscendingProperty=o},t.prototype.setContainsNaN=function(o){this.containsNanProperty=o},t})();return Yk.DataDistributionCalculator=n,Yk}var $P={},FQ;function vY(){if(FQ)return $P;FQ=1,Object.defineProperty($P,"__esModule",{value:!0}),$P.FIFOVectorProvider=$P.DoubleVectorProvider=void 0;var r=PR(),e=Ld(),i=(function(){function t(){}return t.prototype.getDoubleVector=function(o){return this.capacity?new o.SCRTDoubleVector(this.capacity):new o.SCRTDoubleVector},t.prototype.appendArray=function(o,a,s){(0,e.appendDoubleVectorFromJsArray)(o,a,s)},t.prototype.appendBuffer=function(o,a,s){(0,e.appendDoubleVectorFromBuffer)(o,a,s)},t})();$P.DoubleVectorProvider=i;var n=(function(){function t(o){this.capacity=o}return t.prototype.getDoubleVector=function(o){return new o.SCRTFifoVector(this.capacity)},t.prototype.appendArray=function(o,a,s){var l=a.size(),u=a.capacity(),c=s.length,d=a.getStartIndex();if(u>=l+c){var f=a.dataPtr(l);o.HEAPF64.set(s,f/e.SIZEOF_NUMBER),a.notifyAppend(c)}else if(c>u){var h=c-u,p=(0,r.subArray)(s,h),g=a.dataPtrZero();o.HEAPF64.set(p,g/e.SIZEOF_NUMBER),a.notifyAppend(u)}else if(u>l){var v=u-l,y=(0,r.subArray)(s,0,v),m=a.dataPtr(l);o.HEAPF64.set(y,m/e.SIZEOF_NUMBER);var b=(0,r.subArray)(s,v),g=a.dataPtrZero();o.HEAPF64.set(b,g/e.SIZEOF_NUMBER),a.notifyAppend(c)}else{if(d+c>u){var v=u-d,y=(0,r.subArray)(s,0,v),m=a.dataPtr(0);o.HEAPF64.set(y,m/e.SIZEOF_NUMBER);var b=(0,r.subArray)(s,v),g=a.dataPtrZero();o.HEAPF64.set(b,g/e.SIZEOF_NUMBER)}else{var m=a.dataPtr(0);o.HEAPF64.set(s,m/e.SIZEOF_NUMBER)}a.notifyAppend(c)}},t.prototype.appendBuffer=function(o,a,s){(0,e.appendDoubleVectorFromBuffer)(o,a,s)},t})();return $P.FIFOVectorProvider=n,$P}var y5={},jQ;function ki(){return jQ||(jQ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EDataSeriesValueType=r.EDataChangeType=r.EDataSeriesType=void 0,(function(e){e.XyN="XyN",e.Xy="Xy",e.Xyy="Xyy",e.Xyz="Xyz",e.Ohlc="Ohlc",e.HeatmapUniform="UniformHeatmap",e.HeatmapNonUniform="NonUniformHeatmap",e.Hlc="Hlc",e.XyText="XyText",e.Xyxy="Xyxy",e.Xyx="Xyx",e.X="X",e.BoxPlot="BoxPlot"})(r.EDataSeriesType||(r.EDataSeriesType={})),(function(e){e[e.Append=0]="Append",e[e.Insert=1]="Insert",e[e.Update=2]="Update",e[e.Remove=3]="Remove",e[e.Clear=4]="Clear",e[e.Property=5]="Property"})(r.EDataChangeType||(r.EDataChangeType={})),(function(e){e.Default="Default",e.InitialAnimationValues="InitialAnimationValues",e.FinalAnimationValues="FinalAnimationValues"})(r.EDataSeriesValueType||(r.EDataSeriesValueType={}))})(y5)),y5}var $k={},BQ;function KF(){if(BQ)return $k;BQ=1,Object.defineProperty($k,"__esModule",{value:!0}),$k.TemplateMetadataGenerator=void 0;var r=(function(){function e(i){this.template=i}return e.prototype.getSingleMetadata=function(){return Object.assign({},this.template)},e.prototype.getMetadata=function(){},e.prototype.toJSON=function(){return"toJSON"in this.template?this.template.toJSON():this.template},e})();return $k.TemplateMetadataGenerator=r,$k}var qk={},VQ;function iy(){if(VQ)return qk;VQ=1,Object.defineProperty(qk,"__esModule",{value:!0}),qk.BasePointSeriesWrapped=void 0;var r=ki(),e=(function(){function i(n,t,o,a){var s;if(this.type=r.EDataSeriesType.XyN,this.yValuesArray=[],this.resampled=!1,this.dataSeries=n,this.xValues=this.dataSeries.getXValues(o),!t||t.length===0||t[0]===void 0)this.count=n.count(),this.yValuesArray=n.getYValuesArray(o);else{this.count=t.length;for(var l=0;l<t.length;l++)this.yValuesArray.push((s=t[l])!==null&&s!==void 0?s:n.yValuesArray[l])}this.valueNamesProperty=a??this.dataSeries.valueNames,this.fifoStartIndex=n.fifoStartIndex}return Object.defineProperty(i.prototype,"indexes",{get:function(){return this.indexesProperty||(this.indexesProperty=this.dataSeries.getNativeIndexes()),this.indexesProperty},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"valueNames",{get:function(){return this.valueNamesProperty},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"arrayCount",{get:function(){return this.dataSeries.arrayCount},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"yValues",{get:function(){return this.yValuesArray[0]},enumerable:!1,configurable:!0}),i.prototype.getYValues=function(n){return this.yValuesArray[n??0]},i.prototype.getYValuesByName=function(n){var t=this.valueNames.indexOf(n);if(t>=0)return this.yValuesArray[t]},i.prototype.delete=function(){},i})();return qk.BasePointSeriesWrapped=e,qk}var HQ;function Wl(){return HQ||(HQ=1,(function(r){var e=YP&&YP.__extends||(function(){var D=function(j,N){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(V,W){V.__proto__=W}||function(V,W){for(var K in W)Object.prototype.hasOwnProperty.call(W,K)&&(V[K]=W[K])},D(j,N)};return function(j,N){if(typeof N!="function"&&N!==null)throw new TypeError("Class extends value "+String(N)+" is not a constructor or null");D(j,N);function V(){this.constructor=j}j.prototype=N===null?Object.create(N):(V.prototype=N.prototype,new V)}})(),i=YP&&YP.__assign||function(){return i=Object.assign||function(D){for(var j,N=1,V=arguments.length;N<V;N++){j=arguments[N];for(var W in j)Object.prototype.hasOwnProperty.call(j,W)&&(D[W]=j[W])}return D},i.apply(this,arguments)};Object.defineProperty(r,"__esModule",{value:!0}),r.getWindowedYRange=r.getIndicesRange=r.BaseDataSeries=void 0;var n=Jn(),t=$n(),o=Mr(),a=Ba(),s=ni(),l=oi(),u=$o(),c=PR(),d=qv(),f=xo(),h=QS(),p=xf(),g=Ld(),v=XF(),y=ws(),m=Oh(),b=e8(),S=ca(),_=qbe(),C=vY(),T=ki(),x=KF(),A=iy(),w=(function(D){e(j,D);function j(N,V){var W=this,K,H,U,I,Q,Z,ee,ie,de,pe;if(W=D.call(this)||this,W.dataChanged=new a.EventHandler,W.dataDistributionCalculator=new _.DataDistributionCalculator,W.minXSpacing=0,W.yInitialAnimationValuesArray=[],W.yFinalAnimationValuesArray=[],W.yValuesArray=[],W.arrayCount=1,W.doubleVectorProvider=new C.DoubleVectorProvider,W.isSortedProperty=void 0,W.containsNaNProperty=void 0,W.isEvenlySpacedProperty=!1,W.metadataGeneratorProperty=void 0,W.changeCountProperty=0,W.fifoCapacityProperty=void 0,W.fifoSweepingProperty=!1,W.fifoSweepingGapProperty=1,W.webAssemblyContext=N,W.id=(K=V==null?void 0:V.id)!==null&&K!==void 0?K:(0,y.generateGuid)(),V!=null&&V.fifoCapacity)W.fifoCapacityProperty=V.fifoCapacity,W.doubleVectorProvider=new C.FIFOVectorProvider(V.fifoCapacity);else{var _e=W.calculateInitialCapacity(V);s.Guard.argumentIsRealInteger(_e,"initialCapacity"),W.doubleVectorProvider.capacity=_e}W.fifoSweepingProperty=(V==null?void 0:V.fifoSweeping)||W.fifoSweepingProperty,W.fifoSweepingGapProperty=(V==null?void 0:V.fifoSweepingGap)||W.fifoSweepingGapProperty,W.xValues=W.doubleVectorProvider.getDoubleVector(N),W.arrayCount=(H=V==null?void 0:V.arrayCount)!==null&&H!==void 0?H:W.arrayCount;for(var Te=0;Te<W.arrayCount;Te++)W.yValuesArray.push(W.doubleVectorProvider.getDoubleVector(N));return W.valueNames=(U=V==null?void 0:V.valueNames)!==null&&U!==void 0?U:(0,f.generateValueNamesForDataSeries)(W.yValuesArray.length),W.indexes=new N.SCRTDoubleVector,W.dataSeriesNameProperty=(I=V==null?void 0:V.dataSeriesName)!==null&&I!==void 0?I:W.dataSeriesNameProperty,W.isSorted=(Z=(Q=V==null?void 0:V.dataIsSortedInX)!==null&&Q!==void 0?Q:V==null?void 0:V.isSorted)!==null&&Z!==void 0?Z:W.isSortedProperty,W.containsNaN=(ee=V==null?void 0:V.containsNaN)!==null&&ee!==void 0?ee:W.containsNaNProperty,W.isEvenlySpaced=(ie=V==null?void 0:V.dataEvenlySpacedInX)!==null&&ie!==void 0?ie:W.isEvenlySpacedProperty,W.includeInYRange=(de=V==null?void 0:V.includeInYRange)!==null&&de!==void 0?de:W.valueNames.map(function(De){return!0}),V!=null&&V.metadata&&("type"in V.metadata?(W.metadataGeneratorProperty=(0,n.createType)(u.EBaseType.MetadataGenerator,V.metadata.type,N,V.metadata.data),V.metadata=(pe=W.metadataGeneratorProperty)===null||pe===void 0?void 0:pe.getMetadata()):Array.isArray(V==null?void 0:V.metadata)||(W.metadataGeneratorProperty=new x.TemplateMetadataGenerator(V==null?void 0:V.metadata),V.metadata=void 0)),W}return j.prototype.getYValuesByName=function(N,V){V===void 0&&(V=T.EDataSeriesValueType.Default);var W=this.valueNames.indexOf(N);if(W>=0)switch(V){case T.EDataSeriesValueType.FinalAnimationValues:return this.yFinalAnimationValuesArray[W];case T.EDataSeriesValueType.InitialAnimationValues:return this.yInitialAnimationValuesArray[W];default:return this.yValuesArray[W]}else return},j.prototype.appendN=function(N,V,W,K){var H,U=S.PerformanceDebugHelper.mark(S.EPerformanceMarkType.DataUpdateStart,{contextId:this.id});if(!this.getIsDeleted()){var I=this.getNativeXValues();this.dataDistributionCalculator.onAppend(this.isSorted,this.containsNaN,I,[N],[V[0]]),this.appendMetadata(W),I.push_back(N);for(var Q=0;Q<this.arrayCount;Q++)this.yValuesArray[Q].push_back(V[Q]);K&&K(),this.notifyDataChanged(T.EDataChangeType.Append,null,1)}S.PerformanceDebugHelper.mark(S.EPerformanceMarkType.DataUpdateEnd,{relatedId:(H=U==null?void 0:U.detail)===null||H===void 0?void 0:H.relatedId,contextId:this.id})},j.prototype.appendRangeN=function(N,V,W,K){var H,U=S.PerformanceDebugHelper.mark(S.EPerformanceMarkType.DataUpdateStart,{contextId:this.id});if(!this.getIsDeleted()){s.Guard.isTrue((0,c.isNumberArray)(N)||(0,c.isTypedArray)(N),"xValues must be an array of numbers");for(var I=0;I<this.arrayCount;I++){var Q=this.valueNames[I];if(s.Guard.isTrue((0,c.isNumberArray)(V[I])||(0,c.isTypedArray)(V[I]),"".concat(Q,"Values must be an array of numbers")),V[I].length!==N.length)throw new Error("Arrays xValues and ".concat(Q," must have the same length"))}W&&(s.Guard.isTrue(Array.isArray(W),"metadata must be an array of IPointMetadata"),s.Guard.arraysSameLength(N,"xValues",W,"metadata"));var Z=this.getNativeXValues();this.dataDistributionCalculator.onAppend(this.isSorted,this.containsNaN,Z,N,V[0]),this.appendMetadataRange(W,N.length),this.doubleVectorProvider.appendArray(this.webAssemblyContext,Z,N);for(var I=0;I<this.arrayCount;I++)this.doubleVectorProvider.appendArray(this.webAssemblyContext,this.yValuesArray[I],V[I]);K&&K(),this.notifyDataChanged(T.EDataChangeType.Append,null,N.length)}S.PerformanceDebugHelper.mark(S.EPerformanceMarkType.DataUpdateEnd,{relatedId:(H=U==null?void 0:U.detail)===null||H===void 0?void 0:H.relatedId,contextId:this.id})},j.prototype.appendBufferRangeN=function(N,V,W,K){var H,U=S.PerformanceDebugHelper.mark(S.EPerformanceMarkType.DataUpdateStart,{contextId:this.id});if(!this.getIsDeleted()){s.Guard.isTrue(N instanceof ArrayBuffer,"xValues must be a valid ArrayBuffer");for(var I=0;I<this.arrayCount;I++){var Q=this.valueNames[I];if(s.Guard.isTrue(V[I]instanceof ArrayBuffer,"".concat(Q,"Values must be a valid ArrayBuffer")),V[I].byteLength!==N.byteLength)throw new Error("Arrays xValues and ".concat(Q," must have the same length"))}W&&(s.Guard.isTrue(Array.isArray(W),"metadata must be an array of IPointMetadata"),s.Guard.isTrue(N.byteLength/Float64Array.BYTES_PER_ELEMENT===W.length,"Arrays xValues and metadata must have the same length"));var Z=this.getNativeXValues();this.appendMetadataRange(W,N.byteLength/Float64Array.BYTES_PER_ELEMENT),this.doubleVectorProvider.appendBuffer(this.webAssemblyContext,Z,N);for(var I=0;I<this.arrayCount;I++)this.doubleVectorProvider.appendBuffer(this.webAssemblyContext,this.yValuesArray[I],V[I]);K&&K(),this.notifyDataChanged(T.EDataChangeType.Append,null,N.byteLength/Float64Array.BYTES_PER_ELEMENT)}S.PerformanceDebugHelper.mark(S.EPerformanceMarkType.DataUpdateEnd,{relatedId:(H=U==null?void 0:U.detail)===null||H===void 0?void 0:H.relatedId,contextId:this.id})},j.prototype.updateN=function(N,V,W,K){var H,U=S.PerformanceDebugHelper.mark(S.EPerformanceMarkType.DataUpdateStart,{contextId:this.id});if(!this.getIsDeleted()){this.validateIndex(N),this.dataDistributionCalculator.onUpdate(this.isSorted,this.containsNaN,void 0,void 0,[V[0]],N);for(var I=0;I<this.arrayCount;I++)this.yValuesArray[I].set(N,V[I]);K&&K(),this.setMetadataAt(N,W),this.notifyDataChanged(T.EDataChangeType.Update,N,1)}S.PerformanceDebugHelper.mark(S.EPerformanceMarkType.DataUpdateEnd,{relatedId:(H=U==null?void 0:U.detail)===null||H===void 0?void 0:H.relatedId,contextId:this.id})},j.prototype.updateXyN=function(N,V,W,K,H){var U,I=S.PerformanceDebugHelper.mark(S.EPerformanceMarkType.DataUpdateStart,{contextId:this.id});if(!this.getIsDeleted()){this.validateIndex(N);var Q=this.getNativeXValues();this.dataDistributionCalculator.onUpdate(this.isSorted,this.containsNaN,Q,[V],[W[0]],N),Q.set(N,V);for(var Z=0;Z<this.arrayCount;Z++)this.yValuesArray[Z].set(N,W[Z]);H&&H(),this.setMetadataAt(N,K),this.notifyDataChanged(T.EDataChangeType.Update,N,1)}S.PerformanceDebugHelper.mark(S.EPerformanceMarkType.DataUpdateEnd,{relatedId:(U=I==null?void 0:I.detail)===null||U===void 0?void 0:U.relatedId,contextId:this.id})},j.prototype.insertN=function(N,V,W,K,H){var U,I=S.PerformanceDebugHelper.mark(S.EPerformanceMarkType.DataUpdateStart,{contextId:this.id});if(!this.getIsDeleted()){this.validateIndex(N,"Start index is out of range"),this.throwIfFifo("insert");var Q=this.getNativeXValues();this.getNativeYValues(),this.dataDistributionCalculator.onInsert(this.isSorted,this.containsNaN,Q,[V],[W[0]],N),Q.insertAt(N,V);for(var Z=0;Z<this.arrayCount;Z++)this.yValuesArray[Z].insertAt(N,W[Z]);H&&H(),this.insertMetadata(N,K),this.notifyDataChanged(T.EDataChangeType.Insert,N,1)}S.PerformanceDebugHelper.mark(S.EPerformanceMarkType.DataUpdateEnd,{relatedId:(U=I==null?void 0:I.detail)===null||U===void 0?void 0:U.relatedId,contextId:this.id})},j.prototype.insertRangeN=function(N,V,W,K,H){var U,I=S.PerformanceDebugHelper.mark(S.EPerformanceMarkType.DataUpdateStart,{contextId:this.id});if(!this.getIsDeleted()){s.Guard.isTrue((0,c.isNumberArray)(V)||(0,c.isTypedArray)(V),"xValues must be an array of numbers"),this.validateIndex(N,"Start index is out of range");for(var Q=0;Q<this.arrayCount;Q++){var Z=this.valueNames[Q];if(s.Guard.isTrue((0,c.isNumberArray)(W[Q])||(0,c.isTypedArray)(W[Q]),"".concat(Z,"Values must be an array of numbers")),W[Q].length!==V.length)throw new Error("Arrays xValues and ".concat(Z," must have the same length"))}this.throwIfFifo("insertRange"),K&&(s.Guard.isTrue(Array.isArray(K),"metadata must be an array of IPointMetadata"),s.Guard.arraysSameLength(V,"xValues",K,"metadata"));var ee=this.getNativeXValues();this.dataDistributionCalculator.onInsert(this.isSorted,this.containsNaN,ee,V,W[0],N),(0,g.insertDoubleVectorFromJsArray)(this.webAssemblyContext,V,this.getNativeXValues(),N);for(var Q=0;Q<this.arrayCount;Q++)(0,g.insertDoubleVectorFromJsArray)(this.webAssemblyContext,W[Q],this.yValuesArray[Q],N);H&&H(),this.insertMetadataRange(N,K),this.notifyDataChanged(T.EDataChangeType.Insert,N,V.length)}S.PerformanceDebugHelper.mark(S.EPerformanceMarkType.DataUpdateEnd,{relatedId:(U=I==null?void 0:I.detail)===null||U===void 0?void 0:U.relatedId,contextId:this.id})},j.prototype.removeAt=function(N){var V,W=S.PerformanceDebugHelper.mark(S.EPerformanceMarkType.DataUpdateStart,{contextId:this.id});if(!this.getIsDeleted()){this.validateIndex(N),this.throwIfFifo("removeAt"),this.getNativeXValues().removeAt(N);for(var K=0;K<this.arrayCount;K++)this.yValuesArray[K].removeAt(N);this.removeMetadataAt(N),this.notifyDataChanged(T.EDataChangeType.Remove,N,1)}S.PerformanceDebugHelper.mark(S.EPerformanceMarkType.DataUpdateEnd,{relatedId:(V=W==null?void 0:W.detail)===null||V===void 0?void 0:V.relatedId,contextId:this.id})},j.prototype.removeRange=function(N,V){var W,K=S.PerformanceDebugHelper.mark(S.EPerformanceMarkType.DataUpdateStart,{contextId:this.id});if(!this.getIsDeleted()){this.validateIndex(N,"Start index is out of range"),this.throwIfFifo("removeRange"),this.getNativeXValues().removeRange(N,V);for(var H=0;H<this.arrayCount;H++)this.yValuesArray[H].removeRange(N,V);this.removeMetadataRange(N,V),this.notifyDataChanged(T.EDataChangeType.Remove,N,V)}S.PerformanceDebugHelper.mark(S.EPerformanceMarkType.DataUpdateEnd,{relatedId:(W=K==null?void 0:K.detail)===null||W===void 0?void 0:W.relatedId,contextId:this.id})},j.prototype.clear=function(){var N,V,W=S.PerformanceDebugHelper.mark(S.EPerformanceMarkType.DataUpdateStart,{contextId:this.id});if(!this.getIsDeleted()){(N=this.indexes)===null||N===void 0||N.clear(),this.dataDistributionCalculator.clear(this.isSorted,this.containsNaN),this.getNativeXValues().clear();for(var K=0;K<this.arrayCount;K++)this.yValuesArray[K].clear();this.setMetadata(void 0),this.notifyDataChanged(T.EDataChangeType.Clear,null,null)}S.PerformanceDebugHelper.mark(S.EPerformanceMarkType.DataUpdateEnd,{relatedId:(V=W==null?void 0:W.detail)===null||V===void 0?void 0:V.relatedId,contextId:this.id})},Object.defineProperty(j.prototype,"capacity",{get:function(){return this.xValues.capacity()},set:function(N){N>this.capacity&&this.reserve(N)},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"containsNaN",{get:function(){return this.containsNaNProperty},set:function(N){this.containsNaNProperty=N,N!==void 0&&this.dataDistributionCalculator.setContainsNaN(N),this.notifyDataChanged(T.EDataChangeType.Property,void 0,void 0,"containsNaN")},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"isSorted",{get:function(){return this.isSortedProperty},set:function(N){this.isSortedProperty=N,N!==void 0&&this.dataDistributionCalculator.setIsSortedAscending(N),this.notifyDataChanged(T.EDataChangeType.Property,void 0,void 0,"isSorted")},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"isEvenlySpaced",{get:function(){return this.isEvenlySpacedProperty},set:function(N){this.isEvenlySpacedProperty=N,this.notifyDataChanged(T.EDataChangeType.Property,void 0,void 0,"isEvenlySpaced")},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"dataSeriesName",{get:function(){return this.dataSeriesNameProperty},set:function(N){this.dataSeriesNameProperty=N,this.notifyDataChanged(T.EDataChangeType.Property,void 0,void 0,"dataSeriesName")},enumerable:!1,configurable:!0}),j.prototype.count=function(){return this.xValues?this.xValues.size():0},j.prototype.getIsDeleted=function(){return this.isDeleted},Object.defineProperty(j.prototype,"fifoCapacity",{get:function(){return this.fifoCapacityProperty},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"fifoStartIndex",{get:function(){return this.fifoCapacity>0?this.xValues.getStartIndex():0},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"fifoSweeping",{get:function(){return this.fifoCapacity&&this.fifoSweepingProperty},set:function(N){this.fifoSweepingProperty=N,this.notifyDataChanged(T.EDataChangeType.Property,void 0,void 0,"fifoSweeping")},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"fifoSweepingGap",{get:function(){return this.fifoSweepingGapProperty},set:function(N){this.fifoSweepingGapProperty=N,this.notifyDataChanged(T.EDataChangeType.Property,void 0,void 0,"fifoSweepingGap")},enumerable:!1,configurable:!0}),j.prototype.getNativeIndexes=function(){if(this.indexes){var N=this.count(),V=this.indexes.size();return V<N?this.webAssemblyContext.SCRTFillVectorSequential(this.indexes,N):V>N&&this.indexes.resizeFast(N),this.indexes}},j.prototype.getNativeXValues=function(){return this.xValues},j.prototype.getNativeYValues=function(N){return N===void 0&&(N=0),this.yValuesArray[N]},Object.defineProperty(j.prototype,"yInitialAnimationValues",{get:function(){return this.yInitialAnimationValuesArray[0]},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"yFinalAnimationValues",{get:function(){return this.yFinalAnimationValuesArray[0]},enumerable:!1,configurable:!0}),j.prototype.getNativeValue=function(N,V){if(N)return!this.fifoSweeping||!N.getRaw?N.get(V):N.getRaw(V)},j.prototype.delete=function(){this.isDeleted||(this.xValues=(0,o.deleteSafe)(this.xValues),this.yValuesArray.forEach(function(N){return(0,o.deleteSafe)(N)}),this.yValuesArray.length=0,this.indexes=(0,o.deleteSafe)(this.indexes),this.xInitialAnimationValues=(0,o.deleteSafe)(this.xInitialAnimationValues),this.yInitialAnimationValuesArray.forEach(function(N){return(0,o.deleteSafe)(N)}),this.xFinalAnimationValues=(0,o.deleteSafe)(this.xFinalAnimationValues),this.yFinalAnimationValuesArray.forEach(function(N){return(0,o.deleteSafe)(N)}),this.setMetadata(void 0),this.isDeleted=!0)},j.prototype.notifyDataChanged=function(N,V,W,K){this.changeCountProperty++,this.dataChanged.raiseEvent({changeType:N,index:V,count:W})},Object.defineProperty(j.prototype,"xRange",{get:function(){return this.getXRange()},enumerable:!1,configurable:!0}),j.prototype.getXRange=function(N){return this.getXRangeByName(N)},j.prototype.getXRangeByName=function(N,V){var W=this;return this.memoizedgetXRange||(this.memoizedgetXRange=(0,b.memoize)(function(K,H,U){var I=U?W.getYValuesByName(U,H):W.getXValues(H),Q;if(W.count()===1){var Z=I.get(0)-1,ee=I.get(0)+1;return new l.NumberRange(Z,ee)}else if(W.count()>1){var Z=I.get(0),ee=I.get(W.count()-1);if(!W.dataDistributionCalculator.isSortedAscending){var ie=void 0;try{if(ie=W.webAssemblyContext.NumberUtil.MinMax(I,!1),!(0,m.isRealNumber)(ie.minD)||!(0,m.isRealNumber)(ie.maxD))return new l.NumberRange(0,0);Z=ie.minD,ee=ie.maxD}finally{(0,o.deleteSafe)(ie)}}return Z===ee?new l.NumberRange(Z-1,ee+1):(Z>ee&&(Q=Z,Z=ee,ee=Q),new l.NumberRange(Z,ee))}return new l.NumberRange(0,0)})),this.memoizedgetXRange(this.changeCount,N,V)},j.prototype.getWindowedYRange=function(N,V,W,K,H){var U=this;return W===void 0&&(W=!1),K===void 0&&(K=T.EDataSeriesValueType.Default),H===void 0&&(H=h.EYRangeMode.Visible),this.memoizedGetWindowedYRange||(this.memoizedGetWindowedYRange=(0,b.memoize)(function(I){var Q=I._xRange;I._getPositiveRange;var Z=I._isXCategoryAxis,ee=I._dataSeriesValueType,ie=I._yRangeMode,de=Number.MAX_VALUE,pe=Number.NEGATIVE_INFINITY,_e=ie===h.EYRangeMode.Visible?d.ESearchMode.RoundUp:d.ESearchMode.RoundDown,Te=ie===h.EYRangeMode.Visible?d.ESearchMode.RoundDown:d.ESearchMode.RoundUp;if(U.count()===1){for(var De=0;De<U.arrayCount;De++)if(U.includeInYRange[De]){var Pe=U.yValuesArray[De].get(0);de=Math.min(de,Pe),pe=Math.max(pe,Pe)}return new l.NumberRange(de,pe)}var Ee=U.getXValues(ee),Re=Z?Q:(0,r.getIndicesRange)(U.webAssemblyContext,Ee,Q,U.dataDistributionCalculator.isSortedAscending,_e,Te),je=Math.max(Math.floor(Re.min),0),Ke=Math.min(Math.ceil(Re.max),U.count()-1);if(!(Ke<je)){var ot;try{for(var De=0;De<U.arrayCount;De++)if(U.includeInYRange[De]){if(ot=U.webAssemblyContext.NumberUtil.MinMaxWithIndex(U.getYValues(ee,De),je,Ke-je+1,U.dataDistributionCalculator.containsNaN),!(0,m.isRealNumber)(ot.minD)||!(0,m.isRealNumber)(ot.maxD))return;de=Math.min(de,ot.minD),pe=Math.max(pe,ot.maxD)}return new l.NumberRange(de,pe)}finally{(0,o.deleteSafe)(ot)}}},function(I,Q){var Z=I[0],ee=Q[0];return Z._xRange.equals(ee._xRange)&&Z._changeCount===ee._changeCount&&Z._dataSeriesValueType===ee._dataSeriesValueType&&Z._isXCategoryAxis===ee._isXCategoryAxis&&Z._yRangeMode===ee._yRangeMode})),this.memoizedGetWindowedYRange({_changeCount:this.changeCount,_xRange:N,_getPositiveRange:V,_isXCategoryAxis:W,_dataSeriesValueType:K,_yRangeMode:H})},j.prototype.getIndicesRange=function(N,V,W,K){V===void 0&&(V=!1),W===void 0&&(W=d.ESearchMode.RoundDown),K===void 0&&(K=d.ESearchMode.RoundUp);var H=V?this.getNativeIndexes():this.xValues;return(0,r.getIndicesRange)(this.webAssemblyContext,H,N,this.dataDistributionCalculator.isSortedAscending,W,K)},Object.defineProperty(j.prototype,"hasValues",{get:function(){return this.count()>0},enumerable:!1,configurable:!0}),j.prototype.hasMetadataGenerator=function(){return typeof this.metadataGeneratorProperty<"u"},j.prototype.setMetadataGenerator=function(N){var V=this,W=!this.hasMetadataGenerator();if(this.metadataGeneratorProperty=N,W&&!this.metadataProperty){var K=Array(this.xValues.size()).fill(1).map(function(H){return V.metadataGeneratorProperty.getSingleMetadata()});this.metadataProperty=K}},j.prototype.getMetadataAt=function(N,V){if(V===void 0&&(V=!1),this.validateIndex(N),!!this.metadataProperty)if(this.fifoCapacity&&!V){var W=(this.xValues.getStartIndex()+N)%this.fifoCapacity;return this.metadataProperty[W]}else return this.metadataProperty[N]},j.prototype.getMetadataLength=function(){return this.metadataProperty?this.metadataProperty.length:this.count()},Object.defineProperty(j.prototype,"hasMetadata",{get:function(){return this.metadataProperty!==void 0},enumerable:!1,configurable:!0}),j.prototype.createAnimationVectors=function(){this.xInitialAnimationValues=this.doubleVectorProvider.getDoubleVector(this.webAssemblyContext),this.xFinalAnimationValues=this.doubleVectorProvider.getDoubleVector(this.webAssemblyContext);for(var N=0;N<this.arrayCount;N++)this.yInitialAnimationValuesArray.push(this.doubleVectorProvider.getDoubleVector(this.webAssemblyContext)),this.yFinalAnimationValuesArray.push(this.doubleVectorProvider.getDoubleVector(this.webAssemblyContext))},j.prototype.setInitialAnimationVectors=function(N){var V=this;if(!N){this.xInitialAnimationValues.resize(0,0),this.yInitialAnimationValuesArray.forEach(function(W){return W.resize(0,0)});return}(0,v.copyDoubleVector)(N.getNativeXValues(),this.xInitialAnimationValues,this.webAssemblyContext),this.yInitialAnimationValuesArray.forEach(function(W,K){return(0,v.copyDoubleVector)(N.getNativeYValues(K),W,V.webAssemblyContext)})},j.prototype.setFinalAnimationVectors=function(N){var V=this;if(!N){this.xFinalAnimationValues.resize(0,0),this.yFinalAnimationValuesArray.forEach(function(W){return W.resize(0,0)});return}(0,v.copyDoubleVector)(N.getNativeXValues(),this.xFinalAnimationValues,this.webAssemblyContext),this.yFinalAnimationValuesArray.forEach(function(W,K){return(0,v.copyDoubleVector)(N.getNativeYValues(K),W,V.webAssemblyContext)})},j.prototype.revertAnimationVectors=function(N){N=N??this,(0,v.copyDoubleVector)(this.xFinalAnimationValues,N.getNativeXValues(),this.webAssemblyContext),(0,v.copyDoubleVector)(this.yFinalAnimationValues,N.getNativeYValues(),this.webAssemblyContext)},j.prototype.validateAnimationVectors=function(){var N=this.xInitialAnimationValues.size();if(this.yInitialAnimationValuesArray.some(function(V){return V.size()!==N})||N!==this.xFinalAnimationValues.size()||this.yFinalAnimationValuesArray.some(function(V){return V.size()!==N}))throw Error("initialAnimationValues and finalAnimationValues must have the same length")},j.prototype.updateAnimationProperties=function(N,V){var W=this;if(V.isOnStartAnimation)this.yFinalAnimationValuesArray.forEach(function(H,U){return V.calculateAnimationValues(W.webAssemblyContext,H,W.getNativeYValues(U),N)});else if(V.isDataSeriesAnimation){V.calculateDataSeriesAnimationValues(this.webAssemblyContext,this.xInitialAnimationValues,this.xFinalAnimationValues,this.getNativeXValues(),N);for(var K=0;K<this.arrayCount;K++)V.calculateDataSeriesAnimationValues(this.webAssemblyContext,this.yInitialAnimationValuesArray[K],this.yFinalAnimationValuesArray[K],this.getNativeYValues(K),N)}},j.prototype.isUsedForYRange=function(N){var V=this.valueNames.indexOf(N);return V>=0?this.includeInYRange[V]:!1},j.prototype.setUsedForYRange=function(N,V){var W=this.valueNames.indexOf(N);W>=0&&(this.includeInYRange[W]=V)},j.prototype.toJSON=function(N){N===void 0&&(N=!1);var V=this.getOptions(N);return{type:this.type,options:V}},Object.defineProperty(j.prototype,"changeCount",{get:function(){return this.changeCountProperty},enumerable:!1,configurable:!0}),j.prototype.getOptions=function(N){N===void 0&&(N=!1);var V=i({id:this.id,containsNaN:this.containsNaN,isSorted:this.isSorted,dataIsSortedInX:this.isSorted,dataEvenlySpacedInX:this.isEvenlySpaced,dataSeriesName:this.dataSeriesName,fifoCapacity:this.fifoCapacity,fifoSweeping:this.fifoSweeping,fifoSweepingGap:this.fifoSweepingGap,fifoStartIndex:this.fifoSweeping?this.fifoStartIndex:0,capacity:this.capacity,metadata:void 0,arrayCount:this.arrayCount,valueNames:this.valueNames,includeInYRange:this.includeInYRange,xValues:void 0,yValues:void 0},this.dataIds);return V.metadata=N?void 0:this.metadataProperty,V},j.prototype.toPointSeries=function(N,V,W){return new A.BasePointSeriesWrapped(this)},j.prototype.findIndex=function(N,V){var W,K;if(V===void 0&&(V=d.ESearchMode.Nearest),this.count()===0)return-1;var H=(K=(W=this.dataDistributionCalculator)===null||W===void 0?void 0:W.isSortedAscending)!==null&&K!==void 0?K:!1,U=H?(0,d.convertSearchMode)(this.webAssemblyContext,V):this.webAssemblyContext.SCRTFindIndexSearchMode.Exact;return this.webAssemblyContext.NumberUtil.FindIndex(this.xValues,N,U,H)},j.prototype.validateIndex=function(N,V){if(Math.round(N)!==N)throw Error("Index must be an integer");var W=V??"Index is out of range";if(N<0||N>=this.count())throw new Error(W)},j.prototype.setMetadataAt=function(N,V){if(V)if(this.validateIndex(N),this.fillMetadataIfUndefined(),this.fifoCapacity){var W=(this.xValues.getStartIndex()+N)%this.fifoCapacity;this.metadataProperty[W]=V}else this.metadataProperty[N]=V},j.prototype.appendMetadata=function(N){if(!N)if(this.metadataGeneratorProperty)N=this.metadataGeneratorProperty.getSingleMetadata();else return;this.fillMetadataIfUndefined(),this.fifoCapacity&&this.count()===this.fifoCapacity?this.metadataProperty[this.xValues.getStartIndex()]=N:this.metadataProperty.push(N)},j.prototype.appendMetadataRange=function(N,V){var W=this;if(!N)if(this.metadataGeneratorProperty)N=Array(V).fill(1).map(function(U){return W.metadataGeneratorProperty.getSingleMetadata()});else return;if(this.fillMetadataIfUndefined(),this.fifoCapacity)(0,p.appendRangeFifo)(N,this.metadataProperty,this.fifoCapacity,this.xValues.getStartIndex());else{var K=this.metadataProperty.length;this.metadataProperty.length+=V;for(var H=0;H<V;++H)this.metadataProperty[K+H]=N[H]}},j.prototype.insertMetadata=function(N,V){if(!V)if(this.metadataGeneratorProperty)V=this.metadataGeneratorProperty.getSingleMetadata();else return;this.fillMetadataIfUndefined(),this.metadataProperty.splice(N,0,V)},j.prototype.insertMetadataRange=function(N,V){var W=this;if(!V)if(this.metadataGeneratorProperty)V=Array(length).fill(1).map(function(U){return W.metadataGeneratorProperty.getSingleMetadata()});else return;this.fillMetadataIfUndefined();var K=this.metadataProperty.slice(0,N),H=this.metadataProperty.slice(N);this.metadataProperty=K.concat(V,H)},j.prototype.removeMetadataAt=function(N){this.metadataProperty&&this.metadataProperty.splice(N,1)},j.prototype.removeMetadataRange=function(N,V){this.metadataProperty&&this.metadataProperty.splice(N,V)},j.prototype.setMetadata=function(N){this.metadataProperty=N},j.prototype.getXValues=function(N){var V;switch(N){case T.EDataSeriesValueType.FinalAnimationValues:V=this.xFinalAnimationValues;break;case T.EDataSeriesValueType.InitialAnimationValues:V=this.xInitialAnimationValues;break;default:V=this.xValues}return V},j.prototype.getYValuesArray=function(N){var V;switch(N){case T.EDataSeriesValueType.FinalAnimationValues:V=this.yFinalAnimationValuesArray;break;case T.EDataSeriesValueType.InitialAnimationValues:V=this.yInitialAnimationValuesArray;break;default:V=this.yValuesArray}return V},j.prototype.throwIfFifo=function(N){if(this.fifoCapacity)throw new Error("".concat(N," is not supported in fifo mode"))},j.prototype.reserve=function(N){if(this.fifoCapacity)throw new Error("Resizing a fifo dataSeries is not currently supported.");s.Guard.argumentIsRealInteger(N,"capacity"),this.xValues.reserve(N),this.yValuesArray.forEach(function(V){return V.reserve(N)})},j.prototype.calculateInitialCapacity=function(N){var V,W,K;return Math.max((V=N==null?void 0:N.capacity)!==null&&V!==void 0?V:0,(K=(W=N==null?void 0:N.xValues)===null||W===void 0?void 0:W.length)!==null&&K!==void 0?K:0)},j.prototype.fillMetadataIfUndefined=function(){if(this.metadataProperty===void 0){var N=this.count();this.metadataProperty=Array(N).fill(void 0)}},j.prototype.getYValues=function(N,V){V===void 0&&(V=0);var W;switch(N){case T.EDataSeriesValueType.FinalAnimationValues:W=this.yFinalAnimationValuesArray[V];break;case T.EDataSeriesValueType.InitialAnimationValues:W=this.yInitialAnimationValuesArray[V];break;default:W=this.getNativeYValues(V)}return W},j})(t.DeletableEntity);r.BaseDataSeries=w;var L=function(D,j,N,V,W,K){W===void 0&&(W=d.ESearchMode.RoundDown),K===void 0&&(K=d.ESearchMode.RoundUp);var H=j.size(),U=new l.NumberRange(0,-1);if(H>0){if(!V)return new l.NumberRange(0,H-1);var I=function(ee){switch(ee){case d.ESearchMode.Exact:return D.SCRTFindIndexSearchMode.Exact;case d.ESearchMode.Nearest:return D.SCRTFindIndexSearchMode.Nearest;case d.ESearchMode.RoundDown:return D.SCRTFindIndexSearchMode.RoundDown;case d.ESearchMode.RoundUp:return D.SCRTFindIndexSearchMode.RoundUp}},Q=D.NumberUtil.FindIndex(j,N.min,I(W),!0),Z=D.NumberUtil.FindIndex(j,N.max,I(K),!0);U=new l.NumberRange(Q,Z)}return U};r.getIndicesRange=L;var k=function(D,j,N,V,W,K,H,U,I,Q){I===void 0&&(I=d.ESearchMode.RoundUp),Q===void 0&&(Q=d.ESearchMode.RoundDown);var Z=j.size();if(Z===1){var ee=N.get(0);return new l.NumberRange(ee,ee)}var ie=0,de=Z;if(K)ie=Math.max(Math.floor(V.min),0),de=Math.min(Math.ceil(V.max),Z-1);else{var pe=(0,r.getIndicesRange)(D,j,V,H,I,Q);ie=Math.max(Math.floor(pe.min),0),de=Math.min(Math.ceil(pe.max),Z-1)}if(!(de<ie)){var _e;try{return _e=D.NumberUtil.MinMaxWithIndex(N,ie,de-ie+1,U),!(0,m.isRealNumber)(_e.minD)||!(0,m.isRealNumber)(_e.maxD)?void 0:new l.NumberRange(_e.minD,_e.maxD)}finally{(0,o.deleteSafe)(_e)}}};r.getWindowedYRange=k})(YP)),YP}var qP={},Xk={},UQ;function ny(){if(UQ)return Xk;UQ=1,Object.defineProperty(Xk,"__esModule",{value:!0}),Xk.SeriesInfo=void 0;var r=Ii(),e=tn(),i=(function(){function n(t,o){this.renderableSeries=t,this.seriesName=t.seriesName,this.stroke=t.stroke,this.dataSeriesType=o.dataSeriesType,this.dataSeriesIndex=o.dataSeriesIndex,this.isHit=o.isHit,this.isWithinDataBounds=o.isWithinDataBounds,this.hitTestPointValues=o.hitTestPointValues,this.xValue=o.isCategoryAxis?o.xCategoryValue:o.xValue,this.point2xValue=o.point2xValue,this.yValue=o.yValue,this.point2yValue=o.point2yValue,this.xCoordinate=o.xCoord,this.yCoordinate=o.yCoord,this.point2xCoordinate=o.point2xCoord,this.point2yCoordinate=o.point2yCoord,this.pointMetadata=o.metadata,this.point2metadata=o.point2metadata,this.distance=o.distance,t.type===e.ESeriesType.ColumnSeries?this.fill=t.fill:t.type===e.ESeriesType.MountainSeries?this.fill=t.fill:t.type===e.ESeriesType.BandSeries&&(this.fill=t.fill),this.hitTestInfo=o}return Object.defineProperty(n.prototype,"isVisible",{get:function(){return this.renderableSeries.isVisible},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"formattedYValue",{get:function(){return this.getYCursorFormattedValue(this.yValue)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"formattedXValue",{get:function(){return this.getXCursorFormattedValue(this.xValue)},enumerable:!1,configurable:!0}),n.prototype.getYCursorFormattedValue=function(t){return this.renderableSeries.yAxis.labelProvider.formatCursorLabel(t)},n.prototype.getXCursorFormattedValue=function(t){return this.renderableSeries.xAxis.labelProvider.formatCursorLabel(t)},n.prototype.equals=function(t){return t?t&&this.renderableSeries.id===t.renderableSeries.id&&this.isHit===t.isHit&&r.Point.isEqual(this.hitTestPointValues,t.hitTestPointValues)&&this.formattedYValue===t.formattedYValue&&this.formattedXValue===t.formattedXValue&&this.pointMetadata===t.pointMetadata:!1},n.prototype.getValuesWithLabels=function(t,o,a,s){var l=[];return t&&l.push(t),l},n.prototype.concatValueWithLabel=function(t,o){return"".concat(o,": ").concat(t)},n.prototype.concatTwoValuesWithLabels=function(t,o,a,s){if(a){var l=s??"Y";return"".concat(a,": ").concat(t," ").concat(l,": ").concat(o)}else{var l=s?"".concat(s,": "):"";return"".concat(l).concat(o)}},n})();return Xk.SeriesInfo=i,Xk}var zQ;function Xbe(){if(zQ)return qP;zQ=1;var r=qP&&qP.__extends||(function(){var n=function(t,o){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(a[l]=s[l])},n(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");n(t,o);function a(){this.constructor=t}t.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}})();Object.defineProperty(qP,"__esModule",{value:!0}),qP.BoxPlotSeriesInfo=void 0;var e=ny(),i=(function(n){r(t,n);function t(o,a){var s=this,l;return s=n.call(this,o,a)||this,((l=a.yValues)===null||l===void 0?void 0:l.length)===5&&(s.max=a.yValues[0],s.upper=a.yValues[1],s.median=a.yValues[2],s.lower=a.yValues[3],s.minimum=a.yValues[4]),s}return Object.defineProperty(t.prototype,"formattedMaxValue",{get:function(){return this.getYCursorFormattedValue(this.max)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"formattedUpperValue",{get:function(){return this.getYCursorFormattedValue(this.upper)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"formattedMedianValue",{get:function(){return this.getYCursorFormattedValue(this.median)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"formattedLowerValue",{get:function(){return this.getYCursorFormattedValue(this.lower)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"formattedMinimumValue",{get:function(){return this.getYCursorFormattedValue(this.minimum)},enumerable:!1,configurable:!0}),t.prototype.getValuesWithLabels=function(o,a,s,l){var u=n.prototype.getValuesWithLabels.call(this,o,a,s,l);return a&&u.push(this.concatValueWithLabel(this.formattedXValue,a)),u.push(this.concatValueWithLabel(this.formattedMaxValue,"Max")),u.push(this.concatValueWithLabel(this.formattedUpperValue,"Upper")),u.push(this.concatValueWithLabel(this.formattedMedianValue,"Median")),u.push(this.concatValueWithLabel(this.formattedLowerValue,"Lower")),u.push(this.concatValueWithLabel(this.formattedMinimumValue,"Minimum")),u},t})(e.SeriesInfo);return qP.BoxPlotSeriesInfo=i,qP}var XP={},WQ;function Kbe(){if(WQ)return XP;WQ=1;var r=XP&&XP.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(XP,"__esModule",{value:!0}),XP.HeatmapSeriesInfo=void 0;var e=wp(),i=Il(),n=ny(),t=(function(o){r(a,o);function a(s,l){var u=o.call(this,s,l)||this;return u.xIndex=l.heatmapXIndex,u.yIndex=l.heatmapYIndex,u.zValue=l.zValue,u.color=void 0,u}return Object.defineProperty(a.prototype,"formattedZValue",{get:function(){var s=this.renderableSeries;return s?s.zLabelProvider.formatCursorLabel(this.zValue):(0,i.formatNumber)(this.zValue,e.ENumericFormat.Decimal,2)},enumerable:!1,configurable:!0}),a.prototype.getValuesWithLabels=function(s,l,u,c){var d=o.prototype.getValuesWithLabels.call(this,s,l,u,c);return l&&d.push(this.concatValueWithLabel(this.formattedXValue,l)),u&&d.push(this.concatValueWithLabel(this.formattedYValue,u)),this.zValue!==null&&this.zValue!==void 0&&d.push(this.concatValueWithLabel(this.formattedZValue,"Z")),d},a})(n.SeriesInfo);return XP.HeatmapSeriesInfo=t,XP}var KP={},GQ;function Zbe(){if(GQ)return KP;GQ=1;var r=KP&&KP.__extends||(function(){var n=function(t,o){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(a[l]=s[l])},n(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");n(t,o);function a(){this.constructor=t}t.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}})();Object.defineProperty(KP,"__esModule",{value:!0}),KP.HlcSeriesInfo=void 0;var e=ny(),i=(function(n){r(t,n);function t(o,a){var s=n.call(this,o,a)||this;return s.highValue=a.highValue,s.lowValue=a.lowValue,s.closeValue=a.closeValue,s}return Object.defineProperty(t.prototype,"formattedHighValue",{get:function(){return this.getYCursorFormattedValue(this.highValue)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"formattedLowValue",{get:function(){return this.getYCursorFormattedValue(this.lowValue)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"formattedCloseValue",{get:function(){return this.getYCursorFormattedValue(this.closeValue)},enumerable:!1,configurable:!0}),t.prototype.getValuesWithLabels=function(o,a,s,l){var u=n.prototype.getValuesWithLabels.call(this,o,a,s,l);return a&&u.push(this.concatValueWithLabel(this.formattedXValue,a)),u.push(this.concatValueWithLabel(this.formattedHighValue,"High")),u.push(this.concatValueWithLabel(this.formattedLowValue,"Low")),u},t})(e.SeriesInfo);return KP.HlcSeriesInfo=i,KP}var ZP={},YQ;function Jbe(){if(YQ)return ZP;YQ=1;var r=ZP&&ZP.__extends||(function(){var n=function(t,o){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(a[l]=s[l])},n(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");n(t,o);function a(){this.constructor=t}t.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}})();Object.defineProperty(ZP,"__esModule",{value:!0}),ZP.OhlcSeriesInfo=void 0;var e=ny(),i=(function(n){r(t,n);function t(o,a){var s=n.call(this,o,a)||this;return s.openValue=a.openValue,s.highValue=a.highValue,s.lowValue=a.lowValue,s.closeValue=a.closeValue,s}return Object.defineProperty(t.prototype,"formattedOpenValue",{get:function(){return this.getYCursorFormattedValue(this.openValue)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"formattedHighValue",{get:function(){return this.getYCursorFormattedValue(this.highValue)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"formattedLowValue",{get:function(){return this.getYCursorFormattedValue(this.lowValue)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"formattedCloseValue",{get:function(){return this.getYCursorFormattedValue(this.closeValue)},enumerable:!1,configurable:!0}),t.prototype.getValuesWithLabels=function(o,a,s,l){var u=n.prototype.getValuesWithLabels.call(this,o,a,s,l);return a&&u.push(this.concatValueWithLabel(this.formattedXValue,a)),u.push(this.concatValueWithLabel(this.formattedOpenValue,"Open")),u.push(this.concatValueWithLabel(this.formattedHighValue,"Highest")),u.push(this.concatValueWithLabel(this.formattedLowValue,"Lowest")),u.push(this.concatValueWithLabel(this.formattedCloseValue,"Close")),u},t})(e.SeriesInfo);return ZP.OhlcSeriesInfo=i,ZP}var JP={},$Q;function Qbe(){if($Q)return JP;$Q=1;var r=JP&&JP.__extends||(function(){var n=function(t,o){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(a[l]=s[l])},n(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");n(t,o);function a(){this.constructor=t}t.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}})();Object.defineProperty(JP,"__esModule",{value:!0}),JP.XySeriesInfo=void 0;var e=ny(),i=(function(n){r(t,n);function t(o,a){return n.call(this,o,a)||this}return t.prototype.getValuesWithLabels=function(o,a,s,l){var u=n.prototype.getValuesWithLabels.call(this,o,a,s,l);return u.push(this.concatTwoValuesWithLabels(this.formattedXValue,this.formattedYValue,a,s)),u},t})(e.SeriesInfo);return JP.XySeriesInfo=i,JP}var QP={},qQ;function eSe(){if(qQ)return QP;qQ=1;var r=QP&&QP.__extends||(function(){var n=function(t,o){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(a[l]=s[l])},n(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");n(t,o);function a(){this.constructor=t}t.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}})();Object.defineProperty(QP,"__esModule",{value:!0}),QP.XyySeriesInfo=void 0;var e=ny(),i=(function(n){r(t,n);function t(o,a){var s=n.call(this,o,a)||this;return s.isFirstSeries=!0,s.y1Value=a.y1Value,s.point2y1Value=a.point2y1Value,s.y1Coordinate=a.y1Coord,s.point2y1Coordinate=a.point2y1Coord,s}return Object.defineProperty(t.prototype,"formattedY1Value",{get:function(){return this.getYCursorFormattedValue(this.y1Value)},enumerable:!1,configurable:!0}),t.prototype.getValuesWithLabels=function(o,a,s,l){var u=n.prototype.getValuesWithLabels.call(this,o,a,s,l);return l?this.isFirstSeries?u.push(this.concatTwoValuesWithLabels(this.formattedXValue,this.formattedYValue,a,s)):u.push(this.concatTwoValuesWithLabels(this.formattedXValue,this.formattedY1Value,a,s)):(u.push(this.concatValueWithLabel(this.formattedXValue,"X")),u.push(this.concatValueWithLabel(this.formattedYValue,"Y")),u.push(this.concatValueWithLabel(this.formattedY1Value,"Y1"))),u},t})(e.SeriesInfo);return QP.XyySeriesInfo=i,QP}var eC={},XQ;function tSe(){if(XQ)return eC;XQ=1;var r=eC&&eC.__extends||(function(){var n=function(t,o){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(a[l]=s[l])},n(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");n(t,o);function a(){this.constructor=t}t.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}})();Object.defineProperty(eC,"__esModule",{value:!0}),eC.XyzSeriesInfo=void 0;var e=ny(),i=(function(n){r(t,n);function t(o,a){var s=n.call(this,o,a)||this;return s.zValue=a.zValue,s}return Object.defineProperty(t.prototype,"formattedZValue",{get:function(){return this.getYCursorFormattedValue(this.zValue)},enumerable:!1,configurable:!0}),t.prototype.getValuesWithLabels=function(o,a,s,l){var u=n.prototype.getValuesWithLabels.call(this,o,a,s,l);return l?(u.push(this.concatTwoValuesWithLabels(this.formattedXValue,this.formattedYValue,a,s)),u.push(this.concatValueWithLabel(this.formattedZValue,"Z"))):(u.push(this.concatValueWithLabel(this.formattedXValue,"X")),u.push(this.concatValueWithLabel(this.formattedYValue,"Y")),u.push(this.concatValueWithLabel(this.formattedZValue,"Z"))),u},t})(e.SeriesInfo);return eC.XyzSeriesInfo=i,eC}var tC={},KQ;function wM(){if(KQ)return tC;KQ=1;var r=tC&&tC.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(tC,"__esModule",{value:!0}),tC.XyPointSeriesWrapped=void 0;var e=ki(),i=iy(),n=xo(),t=(function(o){r(a,o);function a(s,l,u){var c=o.call(this,s,[l],u,[n.EValueName.Y])||this;return c.type=e.EDataSeriesType.Xy,c}return a})(i.BasePointSeriesWrapped);return tC.XyPointSeriesWrapped=t,tC}var rC={},Kk={},ZQ;function rSe(){if(ZQ)return Kk;ZQ=1,Object.defineProperty(Kk,"__esModule",{value:!0}),Kk.hashUtils=void 0;var r=function(o){return o.split("").reduce(function(a,s){return a=(a<<5)-a+s.charCodeAt(0),a&a},0)},e=function(o){var a=JSON.stringify(o);return r(a)},i=function(o){return r(o===!1?"0":o===!0?"1":"-1")},n=function(o){var a=o.toString(10);return r(a)},t=function(o){return o.reduce(function(a,s){return a*397^s},0)};return Kk.hashUtils={generateHash:r,generateObjectHash:e,generateBooleanHash:i,generateNumberHash:n,generateCombinedHash:t},Kk}var m5={},JQ;function oy(){return JQ||(JQ=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EResamplingMode=void 0,(function(e){e.None="None",e.MinMax="MinMax",e.Mid="Mid",e.Max="Max",e.Min="Min",e.MinMaxWithUnevenSpacing="MinMaxWithUnevenSpacing",e.Auto="Auto",e.MinOrMax="MinOrMax"})(r.EResamplingMode||(r.EResamplingMode={}))})(m5)),m5}var Zk={},QQ;function t8(){if(QQ)return Zk;QQ=1,Object.defineProperty(Zk,"__esModule",{value:!0}),Zk.ResamplingParams=void 0;var r=j1(),e=(function(){function i(n,t,o){if(this.zeroLineY=0,this.precision=0,this.enableExperimentalResampling=!1,this.fifoCapacity=0,this.fifoStartIndex=0,t){var a=t.dataSeries;this.resamplingMode=t.resamplingMode,this.precision=t.resamplingPrecision,o&&(this.indexesRange=t.getIndicesRange(o.visibleRange,o.isCategoryAxis),this.isCategoryAxis=o.isCategoryAxis,this.isXAxisAutoRanged=o.autoRange===r.EAutoRange.Always,this.xVisibleRange=o.visibleRange,this.viewportSize=o.isVerticalChart?n.height:n.width),a&&(this.dataHasNaN=a==null?void 0:a.dataDistributionCalculator.containsNaN,this.dataEvenlySpaced=a==null?void 0:a.isEvenlySpaced,this.fifoCapacity=a.fifoCapacity,this.fifoStartIndex=a.fifoStartIndex,this.dataIsFifo=a.fifoCapacity>0&&!a.fifoSweeping)}}return i.prototype.clone=function(n){var t,o,a,s,l,u,c,d,f,h,p,g,v,y,m=new i(void 0,void 0,void 0);return m.zeroLineY=(t=n==null?void 0:n.zeroLineY)!==null&&t!==void 0?t:this.zeroLineY,m.precision=(o=n==null?void 0:n.precision)!==null&&o!==void 0?o:this.precision,m.xVisibleRange=(a=n==null?void 0:n.xVisibleRange)!==null&&a!==void 0?a:this.xVisibleRange,m.indexesRange=(s=n==null?void 0:n.indicesRange)!==null&&s!==void 0?s:this.indexesRange,m.viewportSize=(l=n==null?void 0:n.viewportSize)!==null&&l!==void 0?l:this.viewportSize,m.isCategoryAxis=(u=n==null?void 0:n.isCategoryAxis)!==null&&u!==void 0?u:this.isCategoryAxis,m.isXAxisAutoRanged=(c=n==null?void 0:n.isXAxisAutoRanged)!==null&&c!==void 0?c:this.isXAxisAutoRanged,m.resamplingMode=(d=n==null?void 0:n.resamplingMode)!==null&&d!==void 0?d:this.resamplingMode,m.enableExperimentalResampling=(f=n==null?void 0:n.enableExperimentalResampling)!==null&&f!==void 0?f:this.enableExperimentalResampling,m.dataHasNaN=(h=n==null?void 0:n.dataHasNaN)!==null&&h!==void 0?h:this.dataHasNaN,m.dataEvenlySpaced=(p=n==null?void 0:n.dataEvenlySpaced)!==null&&p!==void 0?p:this.dataEvenlySpaced,m.fifoCapacity=(g=n.fifoCapacity)!==null&&g!==void 0?g:this.fifoCapacity,m.fifoStartIndex=(v=n.fifoStartIndex)!==null&&v!==void 0?v:this.fifoStartIndex,m.dataIsFifo=(y=n.dataIsFifo)!==null&&y!==void 0?y:this.dataIsFifo,m},i})();return Zk.ResamplingParams=e,Zk}var eee;function r8(){if(eee)return rC;eee=1;var r=rC&&rC.__extends||(function(){var l=function(u,c){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(d[h]=f[h])},l(u,c)};return function(u,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");l(u,c);function d(){this.constructor=u}u.prototype=c===null?Object.create(c):(d.prototype=c.prototype,new d)}})();Object.defineProperty(rC,"__esModule",{value:!0}),rC.ExtremeResamplerHelper=void 0;var e=$n(),i=Mr(),n=ni(),t=rSe(),o=oy(),a=t8(),s=(function(l){r(u,l);function u(c){var d=l.call(this)||this;return d.isDeleted=!1,d.nativeMergeIndexParams=new c.SCRTDoubleResamplerMergeIndicesParams,d.wasmContext=c,d.nativeResampler=new d.wasmContext.SCRTDoubleResampler,d.xInput=new d.wasmContext.SCRTXvaluesProvider,d.nativeArgs=new d.wasmContext.ResamplingArgs,d.output=new d.wasmContext.SCRTDoubleArraysXyResampleOutput,d}return u.resampleSeries=function(c,d,f){if(!d.supportsResampling)return{pointSeries:d.toPointSeries(),renderableSeries:d,indicesRange:d.isStacked?void 0:d.getIndicesRange(c.visibleRange,c.isCategoryAxis),resamplingHash:void 0};var h=d.getResamplingParams(),p=d.getCurrentRenderPassData();if(!h||h.resampleRequired&&!p){if(h=new a.ResamplingParams(f,d,c),!d.needsResampling(h))return{pointSeries:d.toPointSeries(),renderableSeries:d,indicesRange:h.indexesRange,resamplingHash:void 0};var g=u.calculateResamplingHash(d,h),v=d.getCurrentRenderPassData(),y=!!(v&&v.resamplingHash===g),m=y?v.pointSeries:d.toPointSeries(h);return{pointSeries:m,renderableSeries:d,indicesRange:h.indexesRange,resamplingHash:g}}else return h.resampleRequired?{pointSeries:p.pointSeries,renderableSeries:d,indicesRange:h.indexesRange,resamplingHash:h.hash}:{pointSeries:d.toPointSeries(),renderableSeries:d,indicesRange:h.indexesRange,resamplingHash:void 0}},u.calculateResamplingHash=function(c,d){var f=[],h=c.dataSeries;if(h){var p=t.hashUtils.generateHash(h.id);f.push(p);var g=t.hashUtils.generateNumberHash(h.count());f.push(g);var v=t.hashUtils.generateBooleanHash(h.dataDistributionCalculator.isSortedAscending);f.push(v);var y=t.hashUtils.generateNumberHash(h.changeCount);f.push(y)}var m=t.hashUtils.generateObjectHash(d);return f.push(m),d.hash=t.hashUtils.generateCombinedHash(f),d.hash},u.prototype.needsResampling=function(c,d,f,h){f===void 0&&(f=!0),h===void 0&&(h=!1),f&&this.resetAndFillBasicNativeArgs(c,d);var p=this.nativeResampler.RequiresReduction(this.nativeArgs),g=c.dataIsFifo||p;return(h&&!g||g&&!p)&&(this.nativeArgs.Resampling=this.getNativeResamplingMode(o.EResamplingMode.None)),g},u.prototype.resampleIntoPointSeries=function(c,d,f,h,p,g,v,y,m){if(m===void 0&&(m=!0),this.isDeleted)throw new Error("should not call resampleIntoPointSeries() if deleted");n.Guard.notNull(f,"xDataValues"),n.Guard.notNull(h,"yDataValues"),n.Guard.notNull(f,"xOriginalValues"),n.Guard.notNull(h,"yOriginalValues"),n.Guard.notNull(d,"resamplingParams"),m&&this.resetAndFillBasicNativeArgs(d,f),this.xInput.SetInput(f),this.nativeArgs.ResamplingPrecision=d.precision,this.nativeArgs.ZeroLineY=d.zeroLineY,this.nativeArgs.NewDataPointCount=-1,m===!0&&this.needsResampling(d,f,!1,!0);var b=this.nativeResampler.UpdateIndices(p,this.xInput,h,this.nativeArgs.Resampling,this.nativeArgs);g&&g.resizeFast(b+1),v.resizeFast(b+1),y.resizeFast(b+1),g?this.output.ResetWithIndices(g,v,y):this.output.Reset(v,y),this.nativeResampler.Execute(this.xInput,h,this.output,p,this.nativeArgs.Resampling,this.nativeArgs);var S=p.size();return g&&g.resizeFast(S),v.resizeFast(S),y.resizeFast(S),{OutputSplitIndex:this.output.OutputSplitIndex||this.nativeArgs.OutputSplitIndex}},u.prototype.mergeIndexes=function(c,d,f,h){return this.nativeResampler.MergeIndices(c,d,f,h)},u.prototype.copyValuesByIndexes=function(c,d,f,h,p,g,v,y,m,b,S,_){_===void 0&&(_=0);var C=this.nativeMergeIndexParams;C.SetIndices(c),C.SetXInput(d),C.SetYInput(f),C.SetY1Input(h),C.SetY1Offset(_),C.count=p,C.isCategoryData=g,C.isFifoSweeping=v,C.SetIndicesOut(y),C.SetXOut(m),C.SetYOut(b),C.SetY1Out(S),this.nativeResampler.CopyValuesByIndices(C)},u.prototype.delete=function(){this.isDeleted||((0,i.deleteSafe)(this.nativeResampler),(0,i.deleteSafe)(this.xInput),(0,i.deleteSafe)(this.nativeArgs),(0,i.deleteSafe)(this.output),(0,i.deleteSafe)(this.nativeMergeIndexParams),this.isDeleted=!0,this.wasmContext=void 0)},u.prototype.getNativeResamplingMode=function(c){switch(c){case o.EResamplingMode.Auto:return this.wasmContext.ResamplingMode.Auto;case o.EResamplingMode.Max:return this.wasmContext.ResamplingMode.Max;case o.EResamplingMode.Mid:return this.wasmContext.ResamplingMode.Mid;case o.EResamplingMode.Min:return this.wasmContext.ResamplingMode.Min;case o.EResamplingMode.MinMax:return this.wasmContext.ResamplingMode.MinMax;case o.EResamplingMode.MinOrMax:return this.wasmContext.ResamplingMode.MinOrMax;case o.EResamplingMode.None:return this.wasmContext.ResamplingMode.None;default:throw new Error("Unknown resamplingMode ".concat(c))}},u.prototype.resetAndFillBasicNativeArgs=function(c,d){if(this.nativeArgs.Reset(),this.nativeArgs.Data=this.getDataDistribution(c.dataEvenlySpaced,c.isCategoryAxis),this.nativeArgs.StartIndex=c.indexesRange.min,this.nativeArgs.EndIndex=c.indexesRange.max,this.nativeArgs.MaxXInclusive=c.xVisibleRange.max,this.nativeArgs.MinXInclusive=c.xVisibleRange.min,this.nativeArgs.Resampling=this.getNativeResamplingMode(c.resamplingMode),this.nativeArgs.ViewportWidth=c.viewportSize,this.nativeArgs.FifoCapacity=c.fifoCapacity||0,this.nativeArgs.HasNaN=c.dataHasNaN,this.nativeArgs.IsFifo=c.dataIsFifo,this.nativeArgs.InputBaseIndex=c.fifoStartIndex||0,c.isCategoryAxis)this.nativeArgs.MinXInclusive=c.indexesRange.min,this.nativeArgs.MaxXInclusive=c.indexesRange.max;else if(c.fifoCapacity&&!c.dataIsFifo){var f=d.getRaw(c.indexesRange.min),h=d.getRaw(c.indexesRange.max);this.nativeArgs.MinXInclusive=Math.max(f,c.xVisibleRange.min),this.nativeArgs.MaxXInclusive=Math.min(h,c.xVisibleRange.max)}else{var f=d.get(c.indexesRange.min),h=d.get(c.indexesRange.max);this.nativeArgs.MinXInclusive=Math.max(f,c.xVisibleRange.min),this.nativeArgs.MaxXInclusive=Math.min(h,c.xVisibleRange.max)}},u.prototype.debugParameters=function(c,d){console.log("ResamplingParams:"),console.log(".. zeroLineY: ".concat(c.zeroLineY)),console.log(".. resamplingPrecision: ".concat(c.precision)),console.log(".. xVisibleRange: ".concat(c.xVisibleRange)),console.log(".. indicesRange: ".concat(c.indexesRange)),console.log(".. viewportSize: ".concat(c.viewportSize)),console.log(".. isCategoryAxis: ".concat(c.isCategoryAxis)),console.log(".. isXAxisAutoRanged: ".concat(c.isXAxisAutoRanged)),console.log(".. resamplingMode: ".concat(c.resamplingMode)),console.log(".. enableExperimentalResampling: ".concat(c.enableExperimentalResampling)),console.log(".. dataHasNan: ".concat(c.dataHasNaN)),console.log(".. dataIsFifo: ".concat(c.dataIsFifo)),console.log(".. fifoCapacity: ".concat(c.fifoCapacity)),console.log(".. dataEvenlySpaced: ".concat(c.dataEvenlySpaced)),console.log("native Resampling Args:"),console.log(".. ResamplingData: ".concat(this.debugResamplingDataEnum(d.Data))),console.log(".. StartIndex: ".concat(d.StartIndex)),console.log(".. EndIndex: ".concat(d.EndIndex)),console.log(".. FifoCapacity: ".concat(d.FifoCapacity)),console.log(".. HasNaN: ".concat(d.HasNaN)),console.log(".. IsFifo: ".concat(d.IsFifo)),console.log(".. MaxXInclusive: ".concat(d.MaxXInclusive)),console.log(".. MinXInclusive: ".concat(d.MinXInclusive)),console.log(".. ResamplingMode: ".concat(this.debugResamplingModeEnum(d.Resampling))),console.log(".. ResamplingPrecision: ".concat(d.ResamplingPrecision)),console.log(".. ViewportWidth: ".concat(d.ViewportWidth)),console.log(".. ZeroLineY: ".concat(d.ZeroLineY)),console.log(".. NewDataPointCount: ".concat(d.NewDataPointCount)),console.log(".. InputBaseIndex: ".concat(d.InputBaseIndex))},u.prototype.debugRect=function(c){return"X ".concat(c.x," Y ").concat(c.y," Width ").concat(c.width," Height ").concat(c.height)},u.prototype.debugResamplingDataEnum=function(c){return c===this.wasmContext.ResamplingData.LinearData?"LinearData":c===this.wasmContext.ResamplingData.CategoryData?"CategoryData":c===this.wasmContext.ResamplingData.UnsortedData?"UnsortedData":c===this.wasmContext.ResamplingData.UnevenlySpacedData?"UnevenlySpacedData":"Unknown"},u.prototype.debugResamplingModeEnum=function(c){return c===this.wasmContext.ResamplingMode.MinMax?"MinMax":c===this.wasmContext.ResamplingMode.Auto?"Auto":"Unknown"},u.prototype.getDataDistribution=function(c,d){return d?this.wasmContext.ResamplingData.CategoryData:c?this.wasmContext.ResamplingData.LinearData:this.wasmContext.ResamplingData.UnevenlySpacedData},u})(e.DeletableEntity);return rC.ExtremeResamplerHelper=s,rC}var dm={},iC={},nC={},oC={},Jk={},tee;function i8(){if(tee)return Jk;tee=1,Object.defineProperty(Jk,"__esModule",{value:!0}),Jk.BasePointMarkerStyle=void 0;var r=Ap(),e=(function(){function i(n){var t,o,a;this.width=0,this.height=0,this.type=(t=n==null?void 0:n.type)!==null&&t!==void 0?t:this.type,this.width=(o=n==null?void 0:n.width)!==null&&o!==void 0?o:this.width,this.height=(a=n==null?void 0:n.height)!==null&&a!==void 0?a:this.height}return Object.defineProperty(i.prototype,"isCustomPointMarker",{get:function(){return this.type===r.EPointMarkerType.Sprite},enumerable:!1,configurable:!0}),i})();return Jk.BasePointMarkerStyle=e,Jk}var ree;function OM(){if(ree)return oC;ree=1;var r=oC&&oC.__extends||(function(){var t=function(o,a){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");t(o,a);function s(){this.constructor=o}o.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}})();Object.defineProperty(oC,"__esModule",{value:!0}),oC.PointMarkerStyle=void 0;var e=mi(),i=i8(),n=(function(t){r(o,t);function o(a){var s=this,l,u,c;return s=t.call(this,a)||this,s.strokeThickness=0,s.strokeThickness=(l=a==null?void 0:a.strokeThickness)!==null&&l!==void 0?l:s.strokeThickness,s.stroke=(u=a==null?void 0:a.stroke)!==null&&u!==void 0?u:"#ffffff00",s.fill=(c=a==null?void 0:a.fill)!==null&&c!==void 0?c:"#ffffff00",s}return Object.defineProperty(o.prototype,"stroke",{get:function(){return this.strokeProperty},set:function(a){this.strokeProperty=a,a&&(this.strokeARGBProperty=(0,e.parseColorToUIntArgb)(a))},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"strokeARGB",{get:function(){return this.strokeARGBProperty},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"fill",{get:function(){return this.fillProperty},set:function(a){this.fillProperty=a,a&&(this.fillARGBProperty=(0,e.parseColorToUIntArgb)(a))},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"fillARGB",{get:function(){return this.fillARGBProperty},enumerable:!1,configurable:!0}),o})(i.BasePointMarkerStyle);return oC.PointMarkerStyle=n,oC}var aC={},sC={},iee;function $H(){if(iee)return sC;iee=1;var r=sC&&sC.__extends||(function(){var t=function(o,a){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");t(o,a);function s(){this.constructor=o}o.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}})();Object.defineProperty(sC,"__esModule",{value:!0}),sC.TextureCache=void 0;var e=Mr(),i=NH(),n=(function(t){r(o,t);function o(a){var s=t.call(this,a)||this;return s.wasmContext=a,s}return Object.defineProperty(o.prototype,"value",{get:function(){return!this.cachedEntity&&this.textureFormat&&(this.cachedEntity=this.create(this.width,this.height,this.textureFormat)),this.cachedEntity},enumerable:!1,configurable:!0}),o.prototype.create=function(a,s,l){return this.cachedEntity&&a===this.width&&s===this.height&&l===this.textureFormat?this.cachedEntity:(this.cachedEntity=(0,e.deleteSafe)(this.cachedEntity),this.width=a,this.height=s,this.textureFormat=l,this.cachedEntity=this.wasmContext.SCRTCreateBitmapTexture(this.width,this.height,l),this.cachedEntity)},o.prototype.resetCache=function(){this.invalidateCache(),this.width=void 0,this.height=void 0,this.textureFormat=void 0},o})(i.BaseCache);return sC.TextureCache=n,sC}var nee;function B1(){if(nee)return aC;nee=1;var r=aC&&aC.__extends||(function(){var s=function(l,u){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(c[f]=d[f])},s(l,u)};return function(l,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");s(l,u);function c(){this.constructor=l}l.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}})();Object.defineProperty(aC,"__esModule",{value:!0}),aC.CanvasTexture=void 0;var e=So(),i=Mr(),n=$H(),t=ni(),o=$n(),a=(function(s){r(l,s);function l(u,c,d){var f=s.call(this)||this;f.width=Math.floor(c),f.height=Math.floor(d),t.Guard.isTrue(f.width>0,"CanvasTexture.width must be greater than zero"),t.Guard.isTrue(f.height>0,"CanvasTexture.height must be greater than zero"),e.IS_TEST_ENV||(f.canvas=document.createElement("canvas"),f.canvas.width=f.width,f.canvas.height=f.height),f.wasmContext=u,f.intermediateVector=new f.wasmContext.UIntVector,f.intermediateVector.resize(f.height*f.width,0),f.originalIntermediateVector=new f.wasmContext.UIntVector,f.originalIntermediateVector.resize(f.height*f.width,0);var h=f.wasmContext.eTSRTextureFormat.TSR_TEXTUREFORMAT_A8B8G8R8;return f.tsrTextureCache=new n.TextureCache(u),f.tsrTextureCache.create(f.width,f.height,h),f}return l.prototype.getContext=function(){return this.canvas.getContext("2d",{willReadFrequently:!0})},l.prototype.getTexture=function(){return this.tsrTextureCache.value},l.prototype.clear=function(){this.getContext().clearRect(0,0,this.width,this.height),this.intermediateVector.fill(0),this.originalIntermediateVector.fill(0)},l.prototype.delete=function(){this.intermediateVector=(0,i.deleteSafe)(this.intermediateVector),this.originalIntermediateVector=(0,i.deleteSafe)(this.originalIntermediateVector),this.tsrTextureCache=(0,i.deleteSafe)(this.tsrTextureCache),this.wasmContext=void 0},l.prototype.copyTexture=function(){var u,c=this.width*this.height;if(!this.intermediateVector||this.intermediateVector.size()!==c)throw new Error("CanvasTexture.ts: IntermediateVector size is ".concat((u=this.intermediateVector)===null||u===void 0?void 0:u.size()," and expected ").concat(c));for(var d=this.getContext().getImageData(0,0,this.width,this.height),f=d.data,h=this.width*this.height,p=0;p<h;p++){var g=p*4,v=f[g+3];if(v!==0){var y=f[g],m=f[g+1],b=f[g+2],S=v<<24|y<<16|m<<8|b;this.intermediateVector.set(p,S>>>0),this.originalIntermediateVector.set(p,S>>>0)}}var _=this.tsrTextureCache.value;this.wasmContext.SCRTFillTextureAbgr(_,this.width,this.height,this.intermediateVector)},l.prototype.applyOpacity=function(u){this.wasmContext.SCRTMultiplyColorVectorOpacity(this.originalIntermediateVector,this.intermediateVector,u);var c=this.tsrTextureCache.value;this.wasmContext.SCRTFillTextureAbgr(c,this.width,this.height,this.intermediateVector)},l})(o.DeletableEntity);return aC.CanvasTexture=a,aC}var b5={},oee;function iSe(){return oee||(oee=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.PROPERTY=void 0,(function(e){e.FILL="fill",e.HEIGHT="height",e.IMAGE="image",e.SIZE_TO_IMAGE="size_to_image",e.STROKE="stroke",e.STROKE_THICKNESS="strokeThickness",e.WIDTH="width",e.OPACITY="opacity",e.LAST_POINT_ONLY="lastPointOnly",e.ANTIALIAS="antiAlias"})(r.PROPERTY||(r.PROPERTY={}))})(b5)),b5}var aee;function V1(){if(aee)return nC;aee=1;var r=nC&&nC.__extends||(function(){var h=function(p,g){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var m in y)Object.prototype.hasOwnProperty.call(y,m)&&(v[m]=y[m])},h(p,g)};return function(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");h(p,g);function v(){this.constructor=p}p.prototype=g===null?Object.create(g):(v.prototype=g.prototype,new v)}})();Object.defineProperty(nC,"__esModule",{value:!0}),nC.BasePointMarker=void 0;var e=So(),i=$n(),n=Mr(),t=Yv(),o=Ul(),a=gs(),s=OM(),l=ln(),u=B1(),c=Hi(),d=iSe(),f=(function(h){r(p,h);function p(g,v){var y=this,m,b,S,_,C,T,x,A;return y=h.call(this)||this,y.fillProperty="#5555FF",y.heightProperty=5,y.opacityProperty=1,y.strokeProperty="#3333FF",y.strokeThicknessProperty=1,y.widthProperty=5,y.lastPointOnlyProperty=!1,y.isUpdateSuspended=!1,y.antiAliasProperty=!0,y.webAssemblyContext=g,y.widthProperty=(m=v==null?void 0:v.width)!==null&&m!==void 0?m:y.widthProperty,y.heightProperty=(b=v==null?void 0:v.height)!==null&&b!==void 0?b:y.heightProperty,y.fillProperty=(S=v==null?void 0:v.fill)!==null&&S!==void 0?S:y.fillProperty,y.strokeProperty=(_=v==null?void 0:v.stroke)!==null&&_!==void 0?_:y.strokeProperty,y.strokeThicknessProperty=(C=v==null?void 0:v.strokeThickness)!==null&&C!==void 0?C:y.strokeThicknessProperty,y.opacityProperty=(T=v==null?void 0:v.opacity)!==null&&T!==void 0?T:y.opacityProperty,y.lastPointOnlyProperty=(x=v==null?void 0:v.lastPointOnly)!==null&&x!==void 0?x:y.lastPointOnlyProperty,y.antiAliasProperty=(A=v==null?void 0:v.antiAlias)!==null&&A!==void 0?A:y.antiAliasProperty,o.WebGlRenderContext2D.webGlResourcesRefs.add(y),y}return Object.defineProperty(p.prototype,"fill",{get:function(){return this.fillProperty===a.AUTO_COLOR?"#00000000":this.fillProperty.startsWith(a.AUTO_COLOR)?this.fillProperty.substring(a.AUTO_COLOR.length):this.fillProperty},set:function(g){var v=this.fillProperty;this.fillProperty=g,this.notifyPropertyChanged(d.PROPERTY.FILL,g,v)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"stroke",{get:function(){return this.strokeProperty===a.AUTO_COLOR?"#00000000":this.strokeProperty.startsWith(a.AUTO_COLOR)?this.strokeProperty.substring(a.AUTO_COLOR.length):this.strokeProperty},set:function(g){var v=this.strokeProperty;this.strokeProperty=g,this.notifyPropertyChanged(d.PROPERTY.STROKE,g,v)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"width",{get:function(){return this.widthProperty},set:function(g){var v=this.widthProperty;this.widthProperty=g,this.notifyPropertyChanged(d.PROPERTY.WIDTH,g,v)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"height",{get:function(){return this.heightProperty},set:function(g){var v=this.heightProperty;this.heightProperty=g,this.notifyPropertyChanged(d.PROPERTY.HEIGHT,g,v)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"strokeThickness",{get:function(){return this.strokeThicknessProperty},set:function(g){var v=this.strokeThicknessProperty;this.strokeThicknessProperty=g,this.notifyPropertyChanged(d.PROPERTY.STROKE_THICKNESS,g,v)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"opacity",{get:function(){return this.opacityProperty},set:function(g){var v=this.opacityProperty;this.opacityProperty=g,this.applyOpacity(g),this.notifyPropertyChanged(d.PROPERTY.OPACITY,g,v)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"lastPointOnly",{get:function(){return this.lastPointOnlyProperty},set:function(g){var v=this.lastPointOnlyProperty;this.lastPointOnlyProperty=g,this.notifyPropertyChanged(d.PROPERTY.LAST_POINT_ONLY,g,v)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"antiAlias",{get:function(){return this.antiAliasProperty},set:function(g){var v=this.antiAliasProperty;this.antiAliasProperty=g,this.notifyPropertyChanged(d.PROPERTY.ANTIALIAS,g,v)},enumerable:!1,configurable:!0}),p.prototype.getSprite=function(){return this.spriteTextures===void 0&&(this.spriteTextures=this.createCanvasTexture(),this.applyOpacity(this.opacityProperty)),this.spriteTextures.spriteTexture},p.prototype.getStrokeMask=function(){return this.spriteTextures===void 0&&(this.spriteTextures=this.createCanvasTexture(),this.applyOpacity(this.opacityProperty)),this.spriteTextures.strokeMask},p.prototype.getFillMask=function(){return this.spriteTextures===void 0&&(this.spriteTextures=this.createCanvasTexture(),this.applyOpacity(this.opacityProperty)),this.spriteTextures.fillMask},p.prototype.invalidateCache=function(){this.spriteTextures&&((0,n.deleteSafe)(this.spriteTextures.spriteTexture),(0,n.deleteSafe)(this.spriteTextures.strokeMask),(0,n.deleteSafe)(this.spriteTextures.fillMask),this.spriteTextures=void 0)},p.prototype.resetCache=function(){this.invalidateCache(),this.widthProperty=void 0,this.heightProperty=void 0,this.fillProperty=void 0,this.strokeProperty=void 0,this.strokeThicknessProperty=void 0,this.opacityProperty=void 0},p.prototype.delete=function(){var g=this;this.invalidateCache(),o.WebGlRenderContext2D.webGlResourcesRefs.delete(this)},p.prototype.createCanvasTexture=function(){if(e.IS_TEST_ENV)return{spriteTexture:void 0,strokeMask:void 0,fillMask:void 0};var g=c.DpiHelper.PIXEL_RATIO*(this.width+this.strokeThickness)+1,v=c.DpiHelper.PIXEL_RATIO*(this.height+this.strokeThickness)+1,y=new u.CanvasTexture(this.webAssemblyContext,g,v);y.clear(),this.drawSprite(y.getContext(),this.width*c.DpiHelper.PIXEL_RATIO,this.height*c.DpiHelper.PIXEL_RATIO,this.stroke,this.strokeThickness*c.DpiHelper.PIXEL_RATIO,this.fill),y.copyTexture();var m=new u.CanvasTexture(this.webAssemblyContext,g,v);m.clear(),this.drawSprite(m.getContext(),this.width*c.DpiHelper.PIXEL_RATIO,this.height*c.DpiHelper.PIXEL_RATIO,"#ffffffff",this.strokeThickness*c.DpiHelper.PIXEL_RATIO,"#00000000"),m.copyTexture();var b=new u.CanvasTexture(this.webAssemblyContext,g,v);return b.clear(),this.drawSprite(b.getContext(),this.width*c.DpiHelper.PIXEL_RATIO-3,this.height*c.DpiHelper.PIXEL_RATIO-3,"#00000000",0,"#ffffffff"),b.copyTexture(),{spriteTexture:y,strokeMask:m,fillMask:b}},p.prototype.getPointMarkerStyle=function(){return new s.PointMarkerStyle({type:this.type,width:this.width,height:this.height,fill:this.fill,stroke:this.stroke,strokeThickness:this.strokeThickness})},p.prototype.toJSON=function(){var g={fill:this.fill,height:this.height,opacity:this.opacity,stroke:this.stroke,strokeThickness:this.strokeThickness,width:this.width,lastPointOnly:this.lastPointOnly,antiAlias:this.antiAlias};return{type:this.type,options:g}},p.prototype.onDpiChanged=function(g){l.DebugForDpi&&console.log("basePointMarker onDpiChanged Scaling factor = "+g.newValue),this.invalidateCache()},p.prototype.resolveAutoColors=function(g,v,y){if(this.strokeProperty.startsWith(a.AUTO_COLOR)){var m=y.getStrokeColor(g,v,this.webAssemblyContext);this.stroke=a.AUTO_COLOR+this.adjustAutoColor("stroke",m)}if(this.fillProperty.startsWith(a.AUTO_COLOR)){var m=y.getFillColor(g,v,this.webAssemblyContext);this.fill=a.AUTO_COLOR+this.adjustAutoColor("fill",m)}},p.prototype.adjustAutoColor=function(g,v){return v},p.prototype.resumeUpdates=function(){this.isUpdateSuspended=!1,this.recreateSpriteTextures()},p.prototype.suspendUpdates=function(){this.isUpdateSuspended=!0},p.prototype.notifyPropertyChanged=function(g,v,y){v===y||g===d.PROPERTY.OPACITY||this.isUpdateSuspended||this.recreateSpriteTextures()},p.prototype.recreateSpriteTextures=function(){var g,v,y;this.spriteTextures&&((g=this.spriteTextures.spriteTexture)===null||g===void 0||g.delete(),(v=this.spriteTextures.strokeMask)===null||v===void 0||v.delete(),(y=this.spriteTextures.fillMask)===null||y===void 0||y.delete(),this.spriteTextures=void 0),this.spriteTextures=this.createCanvasTexture(),this.invalidateParentCallback&&this.invalidateParentCallback()},p.prototype.applyOpacity=function(g){var v,y,m;this.spriteTextures&&((v=this.spriteTextures.spriteTexture)===null||v===void 0||v.applyOpacity(g),(y=this.spriteTextures.strokeMask)===null||y===void 0||y.applyOpacity(g),(m=this.spriteTextures.fillMask)===null||m===void 0||m.applyOpacity(g))},p})(i.DeletableEntity);return nC.BasePointMarker=f,nC}var see;function n8(){if(see)return iC;see=1;var r=iC&&iC.__extends||(function(){var t=function(o,a){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");t(o,a);function s(){this.constructor=o}o.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}})();Object.defineProperty(iC,"__esModule",{value:!0}),iC.CrossPointMarker=void 0;var e=Ap(),i=V1(),n=(function(t){r(o,t);function o(a,s){var l=t.call(this,a,s)||this;return l.type=e.EPointMarkerType.Cross,l}return o.prototype.drawSprite=function(a,s,l,u,c,d){if(c>0){a.strokeStyle=u,a.lineWidth=c;var f=a.canvas.width/2,h=a.canvas.height/2,p=l/2,g=s/2;a.beginPath(),a.moveTo(f,h-p),a.lineTo(f,h+p),a.stroke(),a.beginPath(),a.moveTo(f-g,h),a.lineTo(f+g,h),a.stroke()}},o})(i.BasePointMarker);return iC.CrossPointMarker=n,iC}var lC={},lee;function DM(){if(lee)return lC;lee=1;var r=lC&&lC.__extends||(function(){var t=function(o,a){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");t(o,a);function s(){this.constructor=o}o.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}})();Object.defineProperty(lC,"__esModule",{value:!0}),lC.EllipsePointMarker=void 0;var e=Ap(),i=V1(),n=(function(t){r(o,t);function o(a,s){var l=t.call(this,a,s)||this;return l.type=e.EPointMarkerType.Ellipse,l}return o.prototype.drawSprite=function(a,s,l,u,c,d){var f=a.canvas.width/2,h=a.canvas.height/2,p=c/2,g=s/2-p<0?0:s/2-p,v=l/2-p<0?0:l/2-p;a.fillStyle=d,a.ellipse(f,h,g,v,0,0,2*Math.PI,!1),a.fill(),c>0&&(a.strokeStyle=u,a.lineWidth=c,a.stroke())},o})(i.BasePointMarker);return lC.EllipsePointMarker=n,lC}var uC={},cC={},uee;function o8(){if(uee)return cC;uee=1;var r=cC&&cC.__extends||(function(){var n=function(t,o){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(a[l]=s[l])},n(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");n(t,o);function a(){this.constructor=t}t.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}})();Object.defineProperty(cC,"__esModule",{value:!0}),cC.CustomPointMarkerStyle=void 0;var e=i8(),i=(function(n){r(t,n);function t(o){var a=this,s;return a=n.call(this,o)||this,a.image=(s=o==null?void 0:o.image)!==null&&s!==void 0?s:a.image,a}return t})(e.BasePointMarkerStyle);return cC.CustomPointMarkerStyle=i,cC}var cee;function a8(){if(cee)return uC;cee=1;var r=uC&&uC.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(u[d]=c[d])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})();Object.defineProperty(uC,"__esModule",{value:!0}),uC.SpritePointMarker=void 0;var e=Ap(),i=o8(),n=V1(),t=iSe(),o=(function(a){r(s,a);function s(l,u){var c=a.call(this,l,u)||this;return c.type=e.EPointMarkerType.Sprite,c.image=u==null?void 0:u.image,u!=null&&u.width&&(c.width=u.width),u!=null&&u.height&&(c.height=u.height),c}return Object.defineProperty(s.prototype,"image",{get:function(){return this.imageProperty},set:function(l){var u=this.imageProperty;this.imageProperty=l,this.imageProperty&&(this.width=this.imageProperty.width,this.height=this.imageProperty.height),this.notifyPropertyChanged(t.PROPERTY.IMAGE,l,u)},enumerable:!1,configurable:!0}),s.prototype.drawSprite=function(l,u,c,d,f,h){var p=l.canvas.width/2,g=l.canvas.height/2,v=this.height/2,y=this.width/2;this.image&&l.drawImage(this.image,p-y,g-v,this.width,this.height)},s.prototype.getPointMarkerStyle=function(){return new i.CustomPointMarkerStyle({type:this.type,width:this.width,height:this.height,image:this.image})},s.prototype.toJSON=function(){var l=a.prototype.toJSON.call(this),u={image:this.image};return Object.assign(l.options,u),l},s})(n.BasePointMarker);return uC.SpritePointMarker=o,uC}var dC={},dee;function s8(){if(dee)return dC;dee=1;var r=dC&&dC.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(dC,"__esModule",{value:!0}),dC.SquarePointMarker=void 0;var e=Ii(),i=Ap(),n=V1(),t=(function(o){r(a,o);function a(s,l){var u=o.call(this,s,l)||this;return u.type=i.EPointMarkerType.Square,u}return a.prototype.drawSprite=function(s,l,u,c,d,f){var h=s.canvas.width/2,p=s.canvas.height/2,g=u/2,v=l/2,y=d/2,m=new e.Point(h-v+y,p-g+y),b=new e.Point(h+v-y,p+g-y);s.fillStyle=f,s.beginPath(),s.moveTo(m.x,m.y),s.lineTo(b.x,m.y),s.lineTo(b.x,b.y),s.lineTo(m.x,b.y),s.closePath(),s.fill(),d>0&&(s.strokeStyle=c,s.lineWidth=d,s.stroke())},a})(n.BasePointMarker);return dC.SquarePointMarker=t,dC}var fC={},fee;function l8(){if(fee)return fC;fee=1;var r=fC&&fC.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(fC,"__esModule",{value:!0}),fC.TrianglePointMarker=void 0;var e=Ii(),i=Ap(),n=V1(),t=(function(o){r(a,o);function a(s,l){var u=o.call(this,s,l)||this;return u.type=i.EPointMarkerType.Triangle,u}return a.prototype.drawSprite=function(s,l,u,c,d,f){var h=s.canvas.width/2,p=s.canvas.height/2,g=u/2,v=l/2,y=d/2,m=new e.Point(h,p-g+y),b=new e.Point(h+v-y,p+g-y),S=new e.Point(h-v+y,p+g-y);s.fillStyle=f,s.beginPath(),s.moveTo(m.x,m.y),s.lineTo(b.x,b.y),s.lineTo(S.x,S.y),s.lineTo(m.x,m.y),s.closePath(),s.fill(),d>0&&(s.strokeStyle=c,s.lineWidth=d,s.stroke())},a})(n.BasePointMarker);return fC.TrianglePointMarker=t,fC}var hC={},hee;function u8(){if(hee)return hC;hee=1;var r=hC&&hC.__extends||(function(){var t=function(o,a){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");t(o,a);function s(){this.constructor=o}o.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}})();Object.defineProperty(hC,"__esModule",{value:!0}),hC.XPointMarker=void 0;var e=Ap(),i=V1(),n=(function(t){r(o,t);function o(a,s){var l=t.call(this,a,s)||this;return l.type=e.EPointMarkerType.X,l}return o.prototype.drawSprite=function(a,s,l,u,c,d){var f=a.canvas.width/2,h=a.canvas.height/2,p=l/2,g=s/2,v=c/4;c>0&&(a.strokeStyle=u,a.lineWidth=c*1.5,a.beginPath(),a.moveTo(f-g+v,h-p+v),a.lineTo(f+g-v,h+p-v),a.stroke(),a.beginPath(),a.moveTo(f+g-v,h-p+v),a.lineTo(f-g+v,h+p-v),a.stroke())},o})(i.BasePointMarker);return hC.XPointMarker=n,hC}var pee;function ob(){if(pee)return dm;pee=1;var r=dm&&dm.__assign||function(){return r=Object.assign||function(y){for(var m,b=1,S=arguments.length;b<S;b++){m=arguments[b];for(var _ in m)Object.prototype.hasOwnProperty.call(m,_)&&(y[_]=m[_])}return y},r.apply(this,arguments)},e=dm&&dm.__rest||function(y,m){var b={};for(var S in y)Object.prototype.hasOwnProperty.call(y,S)&&m.indexOf(S)<0&&(b[S]=y[S]);if(y!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _=0,S=Object.getOwnPropertySymbols(y);_<S.length;_++)m.indexOf(S[_])<0&&Object.prototype.propertyIsEnumerable.call(y,S[_])&&(b[S[_]]=y[S[_]]);return b};Object.defineProperty(dm,"__esModule",{value:!0}),dm.animationHelpers=void 0;var i=ES(),n=Ap(),t=iu(),o=n8(),a=DM(),s=a8(),l=s8(),u=l8(),c=u8(),d=function(y){return y?y.is([i.EAnimationState.Running,i.EAnimationState.Completed]):!0},f=function(y,m){return y.length>0?!0:m?!m.is([i.EAnimationState.Completed]):!1},h=function(y,m,b,S,_){var C=y.update(m);y.animation.isOnStartAnimation&&C===i.EAnimationStateTransition.InitialState_Delayed&&(b(),_(0,y)),(C===i.EAnimationStateTransition.InitialState_Running||!y.animation.isOnStartAnimation&&C===i.EAnimationStateTransition.Delayed_Running)&&b(),y.is([i.EAnimationState.Running,i.EAnimationState.Completed])&&_(y.animationProgress,y),[i.EAnimationStateTransition.Running_Completed,i.EAnimationStateTransition.InitialState_Completed].includes(C)&&y.animation.onCompleted&&y.animation.onCompleted(),C===i.EAnimationStateTransition.Running_Completed&&S()},p=function(y,m){if(m)if(m.type===n.EPointMarkerType.Sprite){var b=m,S=b.type,_=e(b,["type"]);return new s.SpritePointMarker(y,r({},_))}else{var C=m,S=C.type,_=e(C,["type"]);switch(S){case n.EPointMarkerType.Cross:return new o.CrossPointMarker(y,r({},_));case n.EPointMarkerType.Ellipse:return new a.EllipsePointMarker(y,r({},_));case n.EPointMarkerType.X:return new c.XPointMarker(y,r({},_));case n.EPointMarkerType.Square:return new l.SquarePointMarker(y,r({},_));case n.EPointMarkerType.Triangle:return new u.TrianglePointMarker(y,r({},_))}}},g=function(y,m,b){return b<0?y:b>1?m:y+(m-y)*b},v=function(y,m,b){return b<0?y:b>1?m:(0,t.uintArgbColorLerp)(y,m,b)};return dm.animationHelpers={checkCanDraw:d,checkIsAnimationRunning:f,animationUpdate:h,createPointMarker:p,interpolateNumber:g,interpolateColor:v},dm}var S5={},gee;function Ji(){return gee||(gee=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.PROPERTY=void 0,(function(e){e.BOTTOM_CORNER_RADIUS="BOTTOM_CORNER_RADIUS",e.BOX_SERIES_CAP="BOX_SERIES_CAP",e.BOX_SERIES_WHISKERS="BOX_SERIES_WHISKERS",e.BOX_SERIES_MEDIAN="BOX_SERIES_MEDIAN",e.BRUSH_UP="BRUSH_UP",e.BRUSH_DOWN="BRUSH_DOWN",e.COLOR="COLOR",e.COLOR_MAP="COLOR_MAP",e.CONTOUR_DRAWING_MODE="CONTOUR_DRAWING_MODE",e.CONTOUR_MINORS_PER_MAJOR="CONTOUR_MINORS_PER_MAJOR",e.CONTOUR_MINOR_LINE_STYLE="CONTOUR_MINOR_LINE_STYLE",e.CONTOUR_MAJOR_LINE_STYLE="CONTOUR_MAJOR_LINE_STYLE",e.CONTOUR_COLOR_MAP_MODE="CONTOUR_COLOR_MAP_MODE",e.CORNER_RADIUS="CORNER_RADIUS",e.DATA_POINT_WIDTH="dataPointWidth",e.DATA_POINT_WIDTH_MODE="DATA_POINT_WIDTH_MODE",e.DATA_SERIES="dataSeries",e.DEFAULT_Y1="DEFAULT_Y1",e.DRAWING_PROVIDERS="DRAWING_PROVIDERS",e.DRAW_NAN_AS="drawNaNAs",e.DRAW_CONNECTOR="DRAW_CONNECTOR",e.DRAW_WHISKERS="DRAW_WHISKERS",e.EFFECT="EFFECT",e.ENABLE_DRAWING_OPTIMISATIONS="ENABLE_DRAWING_OPTIMISATIONS",e.ERROR_DIRECTION="ERROR_DIRECTION",e.ERROR_MODE="ERROR_MODE",e.FILL="fill",e.FILL_Y1="FILL_Y1",e.FILL_LINEAR_GRADIENT="FILL_LINEAR_GRADIENT",e.FILL_LINEAR_GRADIENT_Y1="FILL_LINEAR_GRADIENT_Y1",e.FILL_VALUES_OUT_OF_RANGE="FILL_VALUES_OUT_OF_RANGE",e.GRADIENT_STOPS="GRADIENT_STOPS",e.HOVERED="HOVERED",e.INTERPOLATION_POINTS="INTERPOLATION_POINTS",e.IS_DIGITAL_LINE="IS_DIGITAL_LINE",e.IS_ONE_HUNDRED_PERCENT="IS_ONE_HUNDRED_PERCENT",e.IS_SELECTED="IS_SELECTED",e.IS_VISIBLE="IS_VISIBLE",e.INTENSITY="INTENSITY",e.LINE_TYPE="LINE_TYPE",e.MAXIMUM="MAXIMUM",e.MINIMUM="MINIMUM",e.OFFSET="OFFSET",e.OPACITY="OPACITY",e.PALETTE_PROVIDER="PALETTE_PROVIDER",e.PARENT_SURFACE="PARENT_SURFACE",e.POINT_MARKER="pointMarker",e.POLYGON_VERTICES="POLYGON_VERTICES",e.RANGE="RANGE",e.RESAMPLING_MODE="RESAMPLING_MODE",e.RESAMPLING_PRECISION="RESAMPLING_PRECISION",e.SERIES_NAME="SERIES_NAME",e.SPACING="SPACING",e.STACKED_GROUP_ID="STACKED_GROUP_ID",e.STROKE="STROKE",e.STROKE_Y1="STROKE_Y1",e.STROKE_DASH_ARRAY="STROKE_DASH_ARRAY",e.STROKE_Y1_DASH_ARRAY="STROKE_Y1_DASH_ARRAY",e.STROKE_DOWN="STROKE_DOWN",e.STROKE_UP="STROKE_UP",e.STROKE_THICKNESS="STROKE_THICKNESS",e.TOP_CORNER_RADIUS="TOP_CORNER_RADIUS",e.TRIANGLE_DRAW_MODE="TRIANGLE_DRAW_MODE",e.STROKE_THICKNESS_Y1="STROKE_THICKNESS_Y1",e.USE_LINEAR_TEXTURE_FILTERING="USE_LINEAR_TEXTURE_FILTERING",e.XAXIS_ID="XAXIS_ID",e.YAXIS_ID="YAXIS_ID",e.ZERO_LINE_Y="ZERO_LINE_Y",e.Z_CONTOUR_START="Z_CONTOUR_START",e.Z_MAX="Z_MAX",e.Z_MIN="Z_MIN",e.Z_OFFSET="Z_OFFSET",e.Z_STEP="Z_STEP",e.Z_MULTIPLIER="Z_MULTIPLIER",e.Z_LABEL_PROVIDER="Z_LABEL_PROVIDER",e.Z_LIMITS="Z_LIMITS",e.SERIES_TEXT_PROVIDER="SERIES_TEXT_PROVIDER",e.CLIPTOYRANGE="CLIPTOYRANGE",e.YRANGEMODE="YRANGEMODE",e.IS_REVERSE_HEIGHT="IS_REVERSE_HEIGHT",e.CUSTOM_TEXTURE_OPTIONS="CUSTOM_TEXTURE_OPTIONS",e.YARRAYFILTER="YARRAYFILTER",e.SURFACE_RENDER_ORDER="SURFACE_RENDER_ORDER",e.RENDER_LAYER="RENDER_LAYER"})(r.PROPERTY||(r.PROPERTY={}))})(S5)),S5}var Qk={},_5={},vee;function eze(){return vee||(vee=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.PROPERTY=void 0,(function(e){e.MARKER_COLOR="MARKER_COLOR",e.SHOWS_ROLLOVER="SHOWS_ROLLOVER",e.TOOLTIP_COLOR="TOOLTIP_COLOR",e.TOOLTIP_DATA_TEMPLATE="TOOLTIP_DATA_TEMPLATE",e.TOOLTIP_TEXT_COLOR="TOOLTIP_TEXT_COLOR",e.TOOLTIP_TITLE="TOOLTIP_TITLE",e.TOOLTIP_SHADOW_COLOR="TOOLTIP_SHADOW_COLOR"})(r.PROPERTY||(r.PROPERTY={}))})(_5)),_5}var yee;function qH(){if(yee)return Qk;yee=1,Object.defineProperty(Qk,"__esModule",{value:!0}),Qk.RolloverModifierRenderableSeriesProps=void 0;var r=Mr(),e=ln(),i=eze(),n=(function(){function t(o,a){a===void 0&&(a=!1),this.tooltipLegendOffsetX=20,this.tooltipLegendOffsetY=20,this.showsRolloverProperty=!0,this.tooltipTextColorProperty=e.SciChartSurfaceBase.DEFAULT_THEME.textAnnotationForeground,this.renderableSeries=o,this.isY1=a}return t.copy=function(o,a){a.markerColorProperty=o.markerColor,a.showsRolloverProperty=o.showRollover,a.tooltipColorProperty=o.tooltipColor,a.tooltipDataTemplateProperty=o.tooltipDataTemplate,a.tooltipLabelX=o.tooltipLabelX,a.tooltipLabelY=o.tooltipLabelY,a.tooltipLegendOffsetX=o.tooltipLegendOffsetX,a.tooltipLegendOffsetY=o.tooltipLegendOffsetY,a.tooltipTemplate=o.tooltipTemplate,a.tooltipTextColorProperty=o.tooltipTextColorProperty,a.tooltipTitleProperty=o.tooltipTitle,a.shadowColorProperty=o.shadowColorProperty,a.invalidateParentCallback=o.invalidateParentCallback},t.prototype.setInvalidateParentCallback=function(o){this.invalidateParentCallback=o},Object.defineProperty(t.prototype,"showRollover",{get:function(){return this.showsRolloverProperty},set:function(o){this.showsRolloverProperty=o,this.notifyPropertyChanged(i.PROPERTY.SHOWS_ROLLOVER)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tooltipColor",{get:function(){return this.tooltipColorProperty?this.tooltipColorProperty:this.getRenderableSeriesStroke()?this.getRenderableSeriesStroke():e.SciChartSurfaceBase.DEFAULT_THEME.textAnnotationBackground},set:function(o){this.tooltipColorProperty=o,this.notifyPropertyChanged(i.PROPERTY.TOOLTIP_COLOR)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tooltipTextColor",{get:function(){return this.tooltipTextColorProperty},set:function(o){this.tooltipTextColorProperty=o,this.notifyPropertyChanged(i.PROPERTY.TOOLTIP_TEXT_COLOR)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tooltipTitle",{get:function(){return this.tooltipTitleProperty},set:function(o){this.tooltipTitleProperty=o,this.notifyPropertyChanged(i.PROPERTY.TOOLTIP_TITLE)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"markerColor",{get:function(){return this.markerColorProperty?this.markerColorProperty:this.getRenderableSeriesStroke()?this.getRenderableSeriesStroke():e.SciChartSurfaceBase.DEFAULT_THEME.textAnnotationBackground},set:function(o){this.markerColorProperty=o,this.notifyPropertyChanged(i.PROPERTY.MARKER_COLOR)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shadowColor",{get:function(){return this.shadowColorProperty},set:function(o){this.shadowColorProperty=o,this.notifyPropertyChanged(i.PROPERTY.TOOLTIP_SHADOW_COLOR)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tooltipDataTemplate",{get:function(){return this.tooltipDataTemplateProperty},set:function(o){this.tooltipDataTemplateProperty=o,this.notifyPropertyChanged(i.PROPERTY.TOOLTIP_DATA_TEMPLATE)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tooltipLegendTemplate",{get:function(){return this.tooltipLegendTemplateProperty},set:function(o){console.warn("tooltipLegendTemplate property on the RolloverModifierRenderableSeriesProps will be removed in version 2.0, please set tooltipLegendTemplate on the RolloverModifier instead"),this.tooltipLegendTemplateProperty=o},enumerable:!1,configurable:!0}),t.prototype.delete=function(){var o,a;this.rolloverModifier=void 0,!((o=this.marker)===null||o===void 0)&&o.isDeleted||(this.marker=(0,r.deleteSafe)(this.marker)),this.marker=void 0,!((a=this.tooltip)===null||a===void 0)&&a.isDeleted||(this.tooltip=(0,r.deleteSafe)(this.tooltip)),this.tooltip=void 0},t.prototype.notifyPropertyChanged=function(o){this.invalidateParentCallback&&this.invalidateParentCallback()},t.prototype.getRenderableSeriesStroke=function(){if(this.isY1){var o=this.renderableSeries;return o.strokeY1Property}return this.renderableSeries.strokeProperty},t})();return Qk.RolloverModifierRenderableSeriesProps=n,Qk}var eI={},mee;function nSe(){if(mee)return eI;mee=1,Object.defineProperty(eI,"__esModule",{value:!0}),eI.SeriesHoveredArgs=void 0;var r=(function(){function e(i,n){this.sourceSeries=i,this.hovered=n}return e})();return eI.SeriesHoveredArgs=r,eI}var tI={},bee;function oSe(){if(bee)return tI;bee=1,Object.defineProperty(tI,"__esModule",{value:!0}),tI.SeriesSelectedArgs=void 0;var r=(function(){function e(i,n){this.sourceSeries=i,this.isSelected=n}return e})();return tI.SeriesSelectedArgs=r,tI}var rI={},See;function aSe(){if(See)return rI;See=1,Object.defineProperty(rI,"__esModule",{value:!0}),rI.SeriesVisibleChangedArgs=void 0;var r=(function(){function e(i,n){this.sourceSeries=i,this.isVisible=n}return e})();return rI.SeriesVisibleChangedArgs=r,rI}var _ee;function Gl(){return _ee||(_ee=1,(function(r){var e=Vk&&Vk.__extends||(function(){var xe=function(ve,he){return xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Se,be){Se.__proto__=be}||function(Se,be){for(var ke in be)Object.prototype.hasOwnProperty.call(be,ke)&&(Se[ke]=be[ke])},xe(ve,he)};return function(ve,he){if(typeof he!="function"&&he!==null)throw new TypeError("Class extends value "+String(he)+" is not a constructor or null");xe(ve,he);function Se(){this.constructor=ve}ve.prototype=he===null?Object.create(he):(Se.prototype=he.prototype,new Se)}})();Object.defineProperty(r,"__esModule",{value:!0}),r.getDataPointWidthAdjustment=r.adjustRangeByStrokeThickness=r.getDelta=r.getDataPointWidth=r.BaseRenderableSeries=void 0;var i=Jn(),n=ES(),t=$n(),o=Mr(),a=Ba(),s=FH(),l=oi(),u=vn(),c=Yd(),d=$o(),f=zc(),h=ku(),p=ry(),g=N1(),v=I1(),y=Ap(),m=tn(),b=Ha(),S=QS(),_=ws(),C=ca(),T=Ul(),x=Wl(),A=Xbe(),w=Kbe(),L=Zbe(),k=Jbe(),D=Qbe(),j=eSe(),N=tSe(),V=ki(),W=H0(),K=wM(),H=r8(),U=oy(),I=t8(),Q=JS(),Z=gs(),ee=Gd(),ie=ln(),de=Hi(),pe=ob(),_e=Ji(),Te=qH(),De=nSe(),Pe=oSe(),Ee=aSe(),Re=(function(xe){e(ve,xe);function ve(he,Se){var be=this,ke,qe,rt,St,xt,It,Zt,ct,Qe,Et,Gt,Xe,Vt,lr,Jt,kr,qt,zt,jr,Be,Ge,ut,Pt,Qt;if(be=xe.call(this)||this,be.isCollection=!1,be.isPolar=!1,be.rolloverModifierProps=new Te.RolloverModifierRenderableSeriesProps(be),be.rolloverModifierProps1=new Te.RolloverModifierRenderableSeriesProps(be,!0),be.selected=new a.EventHandler,be.hovered=new a.EventHandler,be.isVisibleChanged=new a.EventHandler,be.animationQueue=[],be.paletteProviderProperty=W.DefaultPaletteProvider.createEmpty(),be.typeMap=new Map,be.opacityProperty=1,be.drawingProvidersProperty=[],be.strokeThicknessProperty=2,be.strokeProperty=ie.SciChartSurfaceBase.DEFAULT_THEME.lineSeriesColor,be.drawNaNAsProperty=T.ELineDrawMode.DiscontinuousLine,be.isVisibleProperty=!0,be.isDigitalLineProperty=!1,be.resamplingModeProperty=U.EResamplingMode.Auto,be.resamplingPrecisionProperty=0,be.clipToYRangeProperty=!1,be.yRangeModeProperty=S.EYRangeMode.Drawn,be.yArrayFilterProperty=void 0,be.seriesNameProperty=void 0,be.surfaceRenderOrderProperty=void 0,be.renderLayerProperty=g.EDefaultRenderLayer.SeriesLayer,be.renderOrderProperty=void 0,be.isStacked=!1,be.webAssemblyContext=he,be.id=(ke=Se==null?void 0:Se.id)!==null&&ke!==void 0?ke:(0,_.generateGuid)(),be.dataSeriesDataChanged=be.dataSeriesDataChanged.bind(be),be.effectPropertyChanged=be.effectPropertyChanged.bind(be),be.invalidateParent=be.invalidateParent.bind(be),be.getDataPointWidth=be.getDataPointWidth.bind(be),be.updateAnimationProperties=be.updateAnimationProperties.bind(be),be.beforeAnimationStart=be.beforeAnimationStart.bind(be),be.afterAnimationComplete=be.afterAnimationComplete.bind(be),be.dataSeries=(qe=Se==null?void 0:Se.dataSeries)!==null&&qe!==void 0?qe:be.dataSeriesProperty,Se!=null&&Se.pointMarker&&("drawSprite"in Se.pointMarker||(Se.pointMarker.type===y.EPointMarkerType.Custom?Se.pointMarker=(0,i.createType)(d.EBaseType.PointMarker,Se.pointMarker.customType,he,Se.pointMarker.options):Se.pointMarker=(0,i.createType)(d.EBaseType.PointMarker,Se.pointMarker.type,he,Se.pointMarker.options))),be.pointMarkerProperty=(rt=Se==null?void 0:Se.pointMarker)!==null&&rt!==void 0?rt:be.pointMarkerProperty,be.strokeProperty=(St=Se==null?void 0:Se.stroke)!==null&&St!==void 0?St:be.strokeProperty,be.strokeThicknessProperty=(xt=Se==null?void 0:Se.strokeThickness)!==null&&xt!==void 0?xt:be.strokeThicknessProperty,be.opacityProperty=(It=Se==null?void 0:Se.opacity)!==null&&It!==void 0?It:be.opacityProperty,be.xAxisIdProperty=(Zt=Se==null?void 0:Se.xAxisId)!==null&&Zt!==void 0?Zt:be.xAxisIdProperty,be.yAxisIdProperty=(ct=Se==null?void 0:Se.yAxisId)!==null&&ct!==void 0?ct:be.yAxisIdProperty,be.isVisibleProperty=(Qe=Se==null?void 0:Se.isVisible)!==null&&Qe!==void 0?Qe:be.isVisibleProperty,be.isDigitalLineProperty=(Et=Se==null?void 0:Se.isDigitalLine)!==null&&Et!==void 0?Et:be.isDigitalLineProperty,be.resamplingModeProperty=(Gt=Se==null?void 0:Se.resamplingMode)!==null&&Gt!==void 0?Gt:be.resamplingModeProperty,be.resamplingPrecisionProperty=(Xe=Se==null?void 0:Se.resamplingPrecision)!==null&&Xe!==void 0?Xe:be.resamplingPrecisionProperty,be.surfaceRenderOrderProperty=(Vt=Se==null?void 0:Se.surfaceRenderOrder)!==null&&Vt!==void 0?Vt:be.surfaceRenderOrderProperty,be.renderLayerProperty=(lr=Se==null?void 0:Se.renderLayer)!==null&&lr!==void 0?lr:be.renderLayerProperty,be.renderOrderProperty=(Jt=Se==null?void 0:Se.renderOrder)!==null&&Jt!==void 0?Jt:be.renderOrderProperty,be.renderNextToProperty=(kr=Se==null?void 0:Se.renderNextTo)!==null&&kr!==void 0?kr:be.renderNextToProperty,Se!=null&&Se.effect&&("getNativeEffect"in Se.effect||(Se.effect=(0,i.createType)(d.EBaseType.ShaderEffect,Se.effect.type,he,Se.effect.options))),be.effectProperty=Se==null?void 0:Se.effect,Se!=null&&Se.paletteProvider&&("onAttached"in Se.paletteProvider||(Se.paletteProvider.type===v.EPaletteProviderType.Custom?Se.paletteProvider=(0,i.createType)(d.EBaseType.PaletteProvider,Se.paletteProvider.customType,he,Se.paletteProvider.options):Se.paletteProvider=(0,i.createType)(d.EBaseType.PaletteProvider,Se.paletteProvider.type,he,Se.paletteProvider.options))),be.paletteProviderProperty=(qt=Se==null?void 0:Se.paletteProvider)!==null&&qt!==void 0?qt:be.paletteProviderProperty,be.drawNaNAsProperty=(zt=Se==null?void 0:Se.drawNaNAs)!==null&&zt!==void 0?zt:be.drawNaNAsProperty,be.hitTestProvider=be.newHitTestProvider(),be.isSelected=(jr=Se==null?void 0:Se.isSelected)!==null&&jr!==void 0?jr:!1,be.isHovered=(Be=Se==null?void 0:Se.isHovered)!==null&&Be!==void 0?Be:!1,be.clipToYRangeProperty=(Ge=Se==null?void 0:Se.clipToYRange)!==null&&Ge!==void 0?Ge:be.clipToYRangeProperty,be.yRangeModeProperty=(ut=Se==null?void 0:Se.yRangeMode)!==null&&ut!==void 0?ut:be.yRangeModeProperty,be.yArrayFilterProperty=(Pt=Se==null?void 0:Se.yArrayFilter)!==null&&Pt!==void 0?Pt:be.yArrayFilterProperty,be.seriesNameProperty=(Qt=Se==null?void 0:Se.seriesName)!==null&&Qt!==void 0?Qt:be.seriesNameProperty,Se!=null&&Se.onIsVisibleChanged)if(typeof Se.onIsVisibleChanged=="string"){be.typeMap.set("onIsVisibleChanged",Se.onIsVisibleChanged);var wr=(0,i.getFunction)(d.EBaseType.OptionFunction,Se.onIsVisibleChanged);be.isVisibleChanged.subscribe(function(Xt){return wr(Xt.sourceSeries,Xt.isVisible)})}else{var Xr=Se==null?void 0:Se.onIsVisibleChanged;be.isVisibleChanged.subscribe(function(Xt){return Xr(Xt.sourceSeries,Xt.isVisible)})}if(Se!=null&&Se.onSelectedChanged)if(typeof Se.onSelectedChanged=="string"){be.typeMap.set("onSelectedChanged",Se.onSelectedChanged);var pi=(0,i.getFunction)(d.EBaseType.OptionFunction,Se.onSelectedChanged);be.selected.subscribe(function(Xt){return pi(Xt.sourceSeries,Xt.isSelected)})}else{var Qr=Se==null?void 0:Se.onSelectedChanged;be.selected.subscribe(function(Xt){return Qr(Xt.sourceSeries,Xt.isSelected)})}if(Se!=null&&Se.onHoveredChanged)if(typeof Se.onHoveredChanged=="string"){be.typeMap.set("onHoveredChanged",Se.onHoveredChanged);var Ur=(0,i.getFunction)(d.EBaseType.OptionFunction,Se.onHoveredChanged);be.hovered.subscribe(function(Xt){return Ur(Xt.sourceSeries,Xt.hovered)})}else{var ci=Se==null?void 0:Se.onHoveredChanged;be.hovered.subscribe(function(Xt){return ci(Xt.sourceSeries,Xt.hovered)})}return Se!=null&&Se.animation&&("toJSON"in Se.animation||(Se.animation.type===c.EAnimationType.Custom?Se.animation=(0,i.createType)(d.EBaseType.Animation,Se.animation.customType,he,Se.animation.options):Se.animation=(0,i.createType)(d.EBaseType.Animation,Se.animation.type,he,Se.animation.options))),be.onDpiChanged=be.onDpiChanged.bind(be),be.resamplerHelper=new H.ExtremeResamplerHelper(he),Se!=null&&Se.dataLabelProvider&&("draw"in Se.dataLabelProvider||(Se.dataLabelProvider.type===h.EDataLabelProviderType.Custom?Se.dataLabelProvider=(0,i.createType)(d.EBaseType.DataLabelProvider,Se.dataLabelProvider.customType,he,Se.dataLabelProvider.options):Se.dataLabelProvider=(0,i.createType)(d.EBaseType.DataLabelProvider,Se.dataLabelProvider.type,he,Se.dataLabelProvider.options))),be.dataLabelProviderProperty=Se==null?void 0:Se.dataLabelProvider,be.dataLabelProviderProperty&&be.dataLabelProviderProperty.onAttach(he,be),be.addDrawingProviders(he,Se),be}return ve.prototype.applyTheme=function(he){var Se=this.parentSurface.previousThemeProvider;this.rolloverModifierProps.tooltipTextColor===Se.textAnnotationForeground&&(this.rolloverModifierProps.tooltipTextColor=he.textAnnotationForeground),this.rolloverModifierProps.tooltipColor===Se.textAnnotationBackground&&(this.rolloverModifierProps.tooltipColor=he.textAnnotationBackground),this.rolloverModifierProps.markerColor===Se.textAnnotationBackground&&(this.rolloverModifierProps.markerColor=he.textAnnotationBackground)},Object.defineProperty(ve.prototype,"parentSurface",{get:function(){return this.parentSurfaceProperty},set:function(he){this.parentSurfaceProperty=he,this.notifyPropertyChanged(_e.PROPERTY.PARENT_SURFACE)},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"drawingProviders",{get:function(){return this.drawingProvidersProperty},set:function(he){this.drawingProvidersProperty=he,this.notifyPropertyChanged(_e.PROPERTY.DRAWING_PROVIDERS)},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"isSelected",{get:function(){return this.isSelectedProperty},set:function(he){var Se;this.valueChanged(this.isSelectedProperty,he)&&(this.isSelectedProperty=he,(Se=this.selected)===null||Se===void 0||Se.raiseEvent(new Pe.SeriesSelectedArgs(this,he)),this.notifyPropertyChanged(_e.PROPERTY.IS_SELECTED))},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"isHovered",{get:function(){return this.isHoveredProperty},set:function(he){var Se;this.valueChanged(this.isHoveredProperty,he)&&(this.isHoveredProperty=he,(Se=this.hovered)===null||Se===void 0||Se.raiseEvent(new De.SeriesHoveredArgs(this,he)),this.notifyPropertyChanged(_e.PROPERTY.HOVERED))},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"paletteProvider",{get:function(){return this.paletteProviderProperty},set:function(he){this.setPaletteProvider(he)},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"isDigitalLine",{get:function(){return this.isDigitalLineProperty},set:function(he){this.isDigitalLineProperty=he,this.notifyPropertyChanged(_e.PROPERTY.IS_DIGITAL_LINE)},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"isVisible",{get:function(){return this.isVisibleProperty},set:function(he){var Se;this.valueChanged(this.isVisibleProperty,he)&&(this.isVisibleProperty=he,he?this.resamplingParams=void 0:(this.rolloverModifierProps.marker&&this.rolloverModifierProps.tooltip&&(this.rolloverModifierProps.marker.suspendInvalidate(),this.rolloverModifierProps.tooltip.suspendInvalidate(),this.rolloverModifierProps.marker.isHidden=!0,this.rolloverModifierProps.tooltip.isHidden=!0,this.rolloverModifierProps.tooltip.x1=void 0,this.rolloverModifierProps.tooltip.y1=void 0),this.type===m.ESeriesType.BandSeries&&this.rolloverModifierProps1.marker&&this.rolloverModifierProps1.tooltip&&(this.rolloverModifierProps1.marker.suspendInvalidate(),this.rolloverModifierProps1.tooltip.suspendInvalidate(),this.rolloverModifierProps1.marker.isHidden=!0,this.rolloverModifierProps1.tooltip.isHidden=!0,this.rolloverModifierProps1.tooltip.x1=void 0,this.rolloverModifierProps1.tooltip.y1=void 0)),(Se=this.isVisibleChanged)===null||Se===void 0||Se.raiseEvent(new Ee.SeriesVisibleChangedArgs(this,he)),this.notifyPropertyChanged(_e.PROPERTY.IS_VISIBLE))},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"pointMarker",{get:function(){return this.pointMarkerProperty},set:function(he){this.pointMarkerProperty&&(this.pointMarkerProperty.invalidateParentCallback=void 0),this.pointMarkerProperty=he,this.notifyPropertyChanged(_e.PROPERTY.POINT_MARKER),this.pointMarkerProperty&&(this.pointMarkerProperty.invalidateParentCallback=this.invalidateParent)},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"drawNaNAs",{get:function(){return this.drawNaNAsProperty},set:function(he){this.drawNaNAsProperty=he,this.notifyPropertyChanged(_e.PROPERTY.DRAW_NAN_AS)},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"stroke",{get:function(){return(0,Z.stripAutoColor)(this.strokeProperty)},set:function(he){this.strokeProperty!==he&&(this.strokeProperty=he,this.notifyPropertyChanged(_e.PROPERTY.STROKE))},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"strokeThickness",{get:function(){return this.strokeThicknessProperty},set:function(he){this.strokeThicknessProperty!==he&&(this.strokeThicknessProperty=he,this.notifyPropertyChanged(_e.PROPERTY.STROKE_THICKNESS))},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"opacity",{get:function(){return this.opacityProperty},set:function(he){this.opacityProperty!==he&&(this.opacityProperty=he,this.notifyPropertyChanged(_e.PROPERTY.OPACITY))},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"xAxisId",{get:function(){return this.xAxisIdProperty},set:function(he){he!==this.xAxisIdProperty&&(this.xAxisIdProperty=he,this.xAxisProperty=void 0,this.notifyPropertyChanged(_e.PROPERTY.XAXIS_ID))},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"xAxis",{get:function(){return this.xAxisProperty},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"yAxis",{get:function(){return this.yAxisProperty},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"yAxisId",{get:function(){return this.yAxisIdProperty},set:function(he){he!==this.yAxisIdProperty&&(this.yAxisIdProperty=he,this.yAxisProperty=void 0,this.notifyPropertyChanged(_e.PROPERTY.YAXIS_ID))},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"dataSeries",{get:function(){return this.dataSeriesProperty},set:function(he){var Se,be;if(this.dataSeriesProperty){var ke=this.xAxis;ke&&ke.isCategoryAxis&&ke.clearCoordCalcCache()}(Se=this.dataSeriesProperty)===null||Se===void 0||Se.dataChanged.unsubscribe(this.dataSeriesDataChanged),this.dataSeriesProperty=he,(be=this.dataSeriesProperty)===null||be===void 0||be.dataChanged.subscribe(this.dataSeriesDataChanged),this.notifyPropertyChanged(_e.PROPERTY.DATA_SERIES)},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"enableDrawingOptimisations",{get:function(){return this.resamplingModeProperty!==U.EResamplingMode.None},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"effect",{get:function(){return this.effectProperty},set:function(he){var Se,be;(Se=this.effectProperty)===null||Se===void 0||Se.propertyChanged.unsubscribe(this.effectPropertyChanged),this.effectProperty=he,(be=this.effectProperty)===null||be===void 0||be.propertyChanged.subscribe(this.effectPropertyChanged),this.notifyPropertyChanged(_e.PROPERTY.EFFECT)},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"resamplingMode",{get:function(){return this.resamplingModeProperty},set:function(he){this.resamplingModeProperty=he,this.notifyPropertyChanged(_e.PROPERTY.RESAMPLING_MODE)},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"resamplingPrecision",{get:function(){return this.resamplingPrecisionProperty},set:function(he){this.resamplingPrecisionProperty=he,this.notifyPropertyChanged(_e.PROPERTY.RESAMPLING_PRECISION)},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"clipToYRange",{get:function(){return this.clipToYRangeProperty},set:function(he){this.clipToYRangeProperty!==he&&(this.clipToYRangeProperty=he,this.notifyPropertyChanged(_e.PROPERTY.CLIPTOYRANGE))},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"yRangeMode",{get:function(){return this.yRangeModeProperty},set:function(he){this.yRangeModeProperty!==he&&(this.yRangeModeProperty=he,this.notifyPropertyChanged(_e.PROPERTY.YRANGEMODE))},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"yArrayFilter",{get:function(){return this.yArrayFilterProperty},set:function(he){this.yArrayFilterProperty!==he&&(this.yArrayFilterProperty=he,this.notifyPropertyChanged(_e.PROPERTY.YARRAYFILTER))},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"seriesName",{get:function(){var he;return(he=this.seriesNameProperty)!==null&&he!==void 0?he:this.getDataSeriesName()},set:function(he){this.seriesNameProperty!==he&&(this.seriesNameProperty=he,this.notifyPropertyChanged(_e.PROPERTY.SERIES_NAME))},enumerable:!1,configurable:!0}),ve.prototype.getSurfaceRenderOrder=function(){var he,Se;return(he=this.surfaceRenderOrderProperty)!==null&&he!==void 0?he:(Se=this.parentSurface)===null||Se===void 0?void 0:Se.getSurfaceRenderOrder()},ve.prototype.setSurfaceRenderOrder=function(he){this.surfaceRenderOrderProperty!=he&&(this.surfaceRenderOrderProperty=he,this.notifyPropertyChanged(_e.PROPERTY.SURFACE_RENDER_ORDER))},ve.prototype.getRenderLayer=function(){if(this.renderLayerProperty===g.EDefaultRenderLayer.SeriesLayer){if(this.isSelected)return g.EDefaultRenderLayer.SelectedSeriesLayer;if(this.isHovered)return g.EDefaultRenderLayer.HoveredSeriesLayer}return this.renderLayerProperty},ve.prototype.setRenderLayer=function(he){this.renderLayerProperty!=he&&(this.renderLayerProperty=he,this.notifyPropertyChanged(_e.PROPERTY.RENDER_LAYER))},ve.prototype.getRenderOrder=function(){return this.renderOrderProperty},ve.prototype.setRenderOrder=function(he){this.renderOrderProperty!=he&&(this.renderOrderProperty=he,this.notifyPropertyChanged(_e.PROPERTY.RENDER_LAYER))},ve.prototype.setRenderNextTo=function(he,Se){Se===void 0&&(Se=0),he===void 0?this.renderNextToProperty=void 0:this.renderNextToProperty={renderable:he,offset:Se}},ve.prototype.getRenderNextTo=function(){return this.renderNextToProperty},Object.defineProperty(ve.prototype,"isSpline",{get:function(){return[m.ESeriesType.SplineBandSeries,m.ESeriesType.SplineLineSeries,m.ESeriesType.SplineMountainSeries].includes(this.type)},enumerable:!1,configurable:!0}),ve.prototype.getResamplingParams=function(){return this.resamplingParams},ve.prototype.draw=function(he,Se){var be=this,ke,qe,rt,St,xt,It,Zt,ct,Qe=C.PerformanceDebugHelper.mark(C.EPerformanceMarkType.DrawSingleSeriesStart,{contextId:this.id,parentContextId:(ke=this.parentSurface)===null||ke===void 0?void 0:ke.id,level:C.EPerformanceDebugLevel.Verbose});if(this.currentRenderPassData=Se,(qe=this.hitTestProvider)===null||qe===void 0||qe.update(Se),this.canDraw){he.getNativeContext();var Et=(rt=this.parentSurface)===null||rt===void 0?void 0:rt.seriesViewRect;try{if(he.pushShaderEffect(this.effect),this.clipToYRange){var Gt=Se.xCoordinateCalculator,Xe=Gt.offset,Vt=Gt.viewportDimension,lr=Se.yCoordinateCalculator,Jt=lr.offset,kr=lr.viewportDimension;if(Se.isVerticalChart){var qt=new u.Rect(Et.x+Jt,Et.y+Xe,kr,Vt);he.setClipRect(qt)}else{var qt=new u.Rect(Et.x+Xe,Et.y+Jt,Vt,kr);he.setClipRect(qt)}}this.drawingProviders.forEach(function(jr){var Be;if(!((Be=be.xAxis)===null||Be===void 0)&&Be.isVerticalChart&&Et&&he.setTranslationRotationAndClip(Et,Et.x,Et.y),be.renderDataTransform&&be.renderDataTransform.drawingProviders.includes(jr)){var Ge=be.renderDataTransform.runTransform(Se);jr.draw(he,Ge)}else jr.draw(he,Se)})}finally{this.clipToYRange&&he.setClipRect(Et),he.popShaderEffect()}if(this.dataLabelProvider){var zt=C.PerformanceDebugHelper.mark(C.EPerformanceMarkType.GenerateDataLabelsStart,{contextId:this.id,parentContextId:(St=this.parentSurface)===null||St===void 0?void 0:St.id,level:C.EPerformanceDebugLevel.Verbose});this.dataLabelProvider.generateDataLabels(he,Se),C.PerformanceDebugHelper.mark(C.EPerformanceMarkType.GenerateDataLabelsEnd,{contextId:this.id,parentContextId:(xt=this.parentSurface)===null||xt===void 0?void 0:xt.id,relatedId:(It=zt==null?void 0:zt.detail)===null||It===void 0?void 0:It.relatedId,level:C.EPerformanceDebugLevel.Verbose})}}this.resamplingParams=void 0,C.PerformanceDebugHelper.mark(C.EPerformanceMarkType.DrawSingleSeriesEnd,{contextId:this.id,parentContextId:(Zt=this.parentSurface)===null||Zt===void 0?void 0:Zt.id,relatedId:(ct=Qe==null?void 0:Qe.detail)===null||ct===void 0?void 0:ct.relatedId,level:C.EPerformanceDebugLevel.Verbose})},ve.prototype.delete=function(){this.drawingProviders.forEach(function(he){return he.delete()}),this.drawingProviders=[],this.dataSeries=(0,o.deleteSafe)(this.dataSeries),this.effect=(0,o.deleteSafe)(this.effect),this.pointMarker=(0,o.deleteSafe)(this.pointMarker),this.resamplerHelper=(0,o.deleteSafe)(this.resamplerHelper),this.pointSeries=(0,o.deleteSafe)(this.pointSeries),this.dataLabelProviderProperty=(0,o.deleteSafe)(this.dataLabelProvider),this.renderDataTransformProperty=(0,o.deleteSafe)(this.renderDataTransform)},ve.prototype.getXRange=function(){return this.dataSeries.getXRange(V.EDataSeriesValueType.Default)},ve.prototype.getYRange=function(he,Se){Se===void 0&&(Se=!1);var be=this.isRunningDataAnimation?V.EDataSeriesValueType.FinalAnimationValues:V.EDataSeriesValueType.Default,ke=this.getResampledPointSeries(Se);return this.renderDataTransform&&this.renderDataTransform.useForYRange?(this.updateTransformedValues(be),(0,x.getWindowedYRange)(this.webAssemblyContext,this.transformedRenderPassData.pointSeries.xValues,this.transformedRenderPassData.pointSeries.yValues,ke&&Se?new l.NumberRange(0,ke.count-1):he,!0,Se,this.dataSeries.dataDistributionCalculator.isSortedAscending,this.dataSeries.dataDistributionCalculator.containsNaN)):ke?(0,x.getWindowedYRange)(this.webAssemblyContext,ke.xValues,ke.yValues,Se?new l.NumberRange(0,ke.count-1):he,!0,Se,this.dataSeries.dataDistributionCalculator.isSortedAscending,this.dataSeries.dataDistributionCalculator.containsNaN):this.dataSeries.getWindowedYRange(he,!0,Se,be,this.yRangeMode)},ve.prototype.getResampledPointSeries=function(he){var Se,be;he===void 0&&(he=!1);var ke;if(!((Se=this.parentSurface)===null||Se===void 0)&&Se.renderSurface&&this.supportsResampling){var qe=this.getCurrentRenderPassData();if(this.resamplingParams)this.resamplingParams.resampleRequired&&(ke=this.currentRenderPassData.pointSeries);else{var rt=this.parentSurface.renderSurface.viewportSize,St=rt.width,xt=rt.height,It=(be=this.parentSurface.seriesViewRect)!==null&&be!==void 0?be:u.Rect.create(0,0,St,xt),Zt=this.xAxis,ct=new I.ResamplingParams(It,this,Zt);if(this.needsResampling(ct)){var Qe=H.ExtremeResamplerHelper.calculateResamplingHash(this,ct),Et=!!(qe&&qe.resamplingHash===Qe);ke=Et?qe.pointSeries:this.toPointSeries(ct),this.currentRenderPassData=new Q.RenderPassData(this.getIndicesRange(this.xAxis.visibleRange,he),this.xAxis.getCurrentCoordinateCalculator,this.yAxis.getCurrentCoordinateCalculator,this.xAxis.isVerticalChart,ke,Qe)}}}return ke},ve.prototype.notifyPropertyChanged=function(he){this.drawingProviders.forEach(function(Se){return Se.onSeriesPropertyChange(he)}),this.invalidateParent()},ve.prototype.getDataPointWidth=function(he,Se,be){var ke=this.dataSeries.getNativeXValues(),qe=he.viewportDimension,rt=he.isCategoryCoordinateCalculator;if(be===p.EDataPointWidthMode.Range){var St=he.visibleMax-he.visibleMin;return he.viewportDimension/St*Se}else{if(be===p.EDataPointWidthMode.Absolute)return Se;var xt=Math.floor((0,r.getDataPointWidth)(ke,he,qe,Se,rt,this.dataSeries.dataDistributionCalculator.isSortedAscending,this.webAssemblyContext));return xt%2!==0&&(xt-=1),xt<=1&&(xt=1),xt}},ve.prototype.onDetach=function(){this.invalidateParentCallback=void 0,this.parentSurface=void 0,this.drawingProviders.forEach(function(he){return he.onDetachSeries()}),this.rolloverModifierProps.setInvalidateParentCallback(void 0)},ve.prototype.setParentSurface=function(he){if(he.surfaceType===b.ESurfaceType.SciChartSurfaceType&&this.isPolar)throw new Error("Polar renderable series can not be attached to a 2D SciChartSurface. Please check ".concat(this.constructor.name," to match SciChartSurface.surfaceType"));if(he.surfaceType===b.ESurfaceType.SciChartPolarSurfaceType&&!this.isPolar)throw new Error("Only polar renderable series can be attached to a 2D SciChartPolarSurface. Please check ".concat(this.constructor.name," to match SciChartSurface.surfaceType"));if(this.parentSurface=he,this.invalidateParentCallback)throw new Error("Invalid operation in sciChartSurface.attachSeries, this series has already been attached to a SciChartSurface. Please detach it from a SciChartSurface before attaching to another");this.invalidateParentCallback=he.invalidateElement},ve.prototype.onAttach=function(he){this.setParentSurface(he),this.linkAxes(),this.drawingProviders.forEach(function(Se){return Se.onAttachSeries()}),this.rolloverModifierProps.setInvalidateParentCallback(he.invalidateElement),this.resamplingParams=void 0},ve.prototype.hasStrokePaletteProvider=function(){var he=this.paletteProvider;return(he==null?void 0:he.overrideStrokeArgb)!==void 0},ve.prototype.hasFillPaletteProvider=function(){var he=this.paletteProvider;return(he==null?void 0:he.overrideFillArgb)!==void 0},ve.prototype.hasPointMarkerPaletteProvider=function(){var he=this.paletteProvider;return(he==null?void 0:he.overridePointMarkerArgb)!==void 0},ve.prototype.hasDataSeriesValues=function(){var he;return(he=this.dataSeries)===null||he===void 0?void 0:he.hasValues},ve.prototype.hasDataSeries=function(){return!!this.dataSeries},ve.prototype.getDataSeriesValuesCount=function(){return this.dataSeries.count()},ve.prototype.getDataSeriesName=function(){var he;return(he=this.dataSeries)===null||he===void 0?void 0:he.dataSeriesName},ve.prototype.getNativeXValues=function(){return this.dataSeries.getNativeXValues()},ve.prototype.getNativeYValues=function(){var he;return this.yArrayFilter?typeof this.yArrayFilter=="number"?this.dataSeries.getNativeYValues(this.yArrayFilter):(he=this.dataSeries.getYValuesByName(this.yArrayFilter,V.EDataSeriesValueType.Default))!==null&&he!==void 0?he:this.getNativeYValues():this.dataSeries.getNativeYValues()},ve.prototype.checkIsOutOfDataRange=function(he,Se){var be=this.getDataSeriesValuesCount(),ke=this.xAxis.getCurrentCoordinateCalculator().isCategoryCoordinateCalculator,qe=ke?0:this.getNativeXValues().get(0),rt=ke?be-1:this.getNativeXValues().get(be-1);return he<qe||he>rt},ve.prototype.pushPalettedColors=function(he,Se){Se.palettedColors.push_back(he)},ve.prototype.getSeriesInfo=function(he){switch(he.dataSeriesType){case V.EDataSeriesType.Ohlc:return new k.OhlcSeriesInfo(this,he);case V.EDataSeriesType.Xyy:return new j.XyySeriesInfo(this,he);case V.EDataSeriesType.Xyz:return new N.XyzSeriesInfo(this,he);case V.EDataSeriesType.HeatmapUniform:return new w.HeatmapSeriesInfo(this,he);case V.EDataSeriesType.HeatmapNonUniform:return new w.HeatmapSeriesInfo(this,he);case V.EDataSeriesType.Hlc:return new L.HlcSeriesInfo(this,he);case V.EDataSeriesType.BoxPlot:return new A.BoxPlotSeriesInfo(this,he);default:return new D.XySeriesInfo(this,he)}},ve.prototype.onDpiChanged=function(he){var Se,be;(Se=this.drawingProviders)===null||Se===void 0||Se.forEach(function(ke){ke.onDpiChanged(he)}),(be=this.pointMarker)===null||be===void 0||be.onDpiChanged(he)},ve.prototype.toJSON=function(he){var Se,be,ke,qe,rt,St;he===void 0&&(he=!1);var xt;if(this.paletteProvider)if("toJSON"in this.paletteProvider)xt=this.paletteProvider.toJSON();else throw new Error("Series contains a palletProvider.  This must implement toJSON to be correctly serialized");var It=this.getRenderNextTo(),Zt=It&&{renderable:typeof It.renderable=="string"?It.renderable:It.renderable.id,offset:It.offset},ct={id:this.id,drawNaNAs:this.drawNaNAs,effect:(Se=this.effect)===null||Se===void 0?void 0:Se.toJSON(),isDigitalLine:this.isDigitalLine,isHovered:this.isHovered,isSelected:this.isSelected,isVisible:this.isVisible,opacity:this.opacity,paletteProvider:xt,pointMarker:(be=this.pointMarker)===null||be===void 0?void 0:be.toJSON(),stroke:this.stroke,strokeThickness:this.strokeThickness,xAxisId:this.xAxisId,yAxisId:this.yAxisId,animation:this.animationQueue.length>0?this.animationQueue[0].toJSON():void 0,resamplingMode:this.resamplingMode,resamplingPrecision:this.resamplingPrecision,clipToYRange:this.clipToYRange,yRangeMode:this.yRangeMode,surfaceRenderOrder:this.surfaceRenderOrderProperty,renderLayer:this.getRenderLayer(),renderOrder:this.getRenderOrder(),renderNextTo:Zt,onIsVisibleChanged:this.typeMap.get("onIsVisibleChanged"),onSelectedChanged:this.typeMap.get("onSelectedChanged"),onHoveredChanged:this.typeMap.get("onHoveredChanged"),dataLabelProvider:(ke=this.dataLabelProvider)===null||ke===void 0?void 0:ke.toJSON()},Qe=(qe=this.dataSeries)===null||qe===void 0?void 0:qe.toJSON(he),Et=Qe==null?void 0:Qe.options;if(this.type===m.ESeriesType.ColumnSeries||this.type===m.ESeriesType.ImpulseSeries||this.type===m.ESeriesType.LineSeries||this.type===m.ESeriesType.PolarLineSeries||this.type===m.ESeriesType.TriangleSeries||this.type===m.ESeriesType.MountainSeries||this.type===m.ESeriesType.PolarMountainSeries||this.type===m.ESeriesType.ScatterSeries||this.type===m.ESeriesType.PolarScatterSeries||this.type===m.ESeriesType.SplineLineSeries||this.type===m.ESeriesType.SplineMountainSeries||this.type===m.ESeriesType.SmoothStackedMountainSeries||this.type===m.ESeriesType.StackedColumnSeries||this.type===m.ESeriesType.PolarStackedColumnSeries||this.type===m.ESeriesType.StackedMountainSeries||this.type===m.ESeriesType.PolarStackedMountainSeries)return{type:this.type,options:ct,xyData:Et};if(this.type===m.ESeriesType.LineSegmentSeries)return((rt=this.dataSeries)===null||rt===void 0?void 0:rt.type)===V.EDataSeriesType.Xyxy?{type:this.type,options:ct,xyxyData:Et}:{type:this.type,options:ct,xyData:Et};if(this.type===m.ESeriesType.PolarColumnSeries){var Gt=this.columnXMode;return Gt===f.EColumnMode.MidWidth||Gt===f.EColumnMode.StartWidth||Gt===f.EColumnMode.StartEnd?{type:this.type,options:ct,xyxData:Et}:{type:this.type,options:ct,xyData:Et}}else return this.type===m.ESeriesType.BandSeries||this.type===m.ESeriesType.SplineBandSeries||this.type===m.ESeriesType.PolarBandSeries?{type:this.type,options:ct,xyyData:Et}:this.type===m.ESeriesType.BubbleSeries?{type:this.type,options:ct,xyzData:Et}:this.type===m.ESeriesType.CandlestickSeries||this.type===m.ESeriesType.OhlcSeries?{type:this.type,options:ct,ohlcData:Et}:this.type===m.ESeriesType.ErrorBarsSeries?{type:this.type,options:ct,hlcData:Et}:this.type===m.ESeriesType.TextSeries?{type:this.type,options:ct,xyTextData:Et}:this.type===m.ESeriesType.UniformHeatmapSeries||this.type===m.ESeriesType.UniformContoursSeries||this.type===m.ESeriesType.PolarUniformHeatmapSeries?{type:this.type,options:ct,heatmapData:Et}:this.type===m.ESeriesType.NonUniformHeatmapSeries?{type:this.type,options:ct,heatmapData:Et}:this.type===m.ESeriesType.RectangleSeries?((St=this.dataSeries)===null||St===void 0?void 0:St.type)===V.EDataSeriesType.Xyxy?{type:this.type,options:ct,xyxyData:Et}:{type:this.type,options:ct,xyxData:Et}:this.type===m.ESeriesType.BoxPlotSeries?{type:this.type,options:ct,boxPlotData:Et}:{type:this.type,options:ct}},ve.prototype.enqueueAnimation=function(he){this.animationQueue.push(he),this.invalidateParent()},ve.prototype.runAnimation=function(he){var Se;this.animationQueue=[],(Se=this.animationFSM)===null||Se===void 0||Se.toCompleted(),this.enqueueAnimation(he)},Object.defineProperty(ve.prototype,"animation",{set:function(he){he&&this.animationQueue.push(he),this.invalidateParent()},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"isRunningAnimation",{get:function(){return pe.animationHelpers.checkIsAnimationRunning(this.animationQueue,this.animationFSM)},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"isRunningDataAnimation",{get:function(){return this.isRunningAnimation&&this.animationFSM&&(this.animationFSM.animation.isDataSeriesAnimation||this.animationFSM.animation.isOnStartAnimation)},enumerable:!1,configurable:!0}),ve.prototype.onAnimate=function(he){var Se;if(!this.animationFSM||!((Se=this.animationFSM)===null||Se===void 0)&&Se.is([n.EAnimationState.Completed]))if(this.animationQueue.length>=1){var be=this.animationQueue.shift();this.animationFSM=new n.SeriesAnimationFiniteStateMachine(be,this)}else this.animationFSM=void 0;this.animationFSM&&(this.dataSeries.xInitialAnimationValues||this.dataSeries.createAnimationVectors(),pe.animationHelpers.animationUpdate(this.animationFSM,he,this.beforeAnimationStart,this.afterAnimationComplete,this.updateAnimationProperties))},ve.prototype.toPointSeries=function(he){return he?(this.pointSeries=this.dataSeries.toPointSeries(he,this.pointSeries,this.resamplerHelper),this.pointSeries.type===V.EDataSeriesType.XyN&&this.yArrayFilter!==void 0?typeof this.yArrayFilter=="number"?this.pointSeries.subSeries[this.yArrayFilter]:this.pointSeries.getSubSeriesByName(this.yArrayFilter):this.pointSeries):this.dataSeries.toPointSeries()},ve.prototype.getIndicesRange=function(he,Se){var be;return Se===void 0&&(Se=!1),(be=this.dataSeries)===null||be===void 0?void 0:be.getIndicesRange(he,Se)},ve.prototype.getCurrentRenderPassData=function(){return this.currentRenderPassData},ve.prototype.setCurrentRenderPassData=function(he){var Se;this.currentRenderPassData=he,(Se=this.hitTestProvider)===null||Se===void 0||Se.update(he)},Object.defineProperty(ve.prototype,"supportsResampling",{get:function(){var he=![m.ESeriesType.UniformContoursSeries,m.ESeriesType.UniformHeatmapSeries,m.ESeriesType.PolarUniformHeatmapSeries,m.ESeriesType.NonUniformHeatmapSeries,m.ESeriesType.BubbleSeries,m.ESeriesType.ErrorBarsSeries,m.ESeriesType.BoxPlotSeries,m.ESeriesType.LineSegmentSeries].includes(this.type);return he&&!ee.SciChartDefaults.debugDisableResampling&&!this.isStacked&&this.dataSeries&&this.dataSeries.count()>0&&(this.enableDrawingOptimisations||this.dataSeries.fifoCapacity)&&(this.dataSeries.dataDistributionCalculator.isSortedAscending||this.xAxis.isCategoryAxis)},enumerable:!1,configurable:!0}),ve.prototype.needsResampling=function(he){return this.resamplingParams=he,this.resamplingParams.resampleRequired=this.resamplerHelper.needsResampling(he,this.getNativeXValues()),this.resamplingParams.resampleRequired},Object.defineProperty(ve.prototype,"dataLabelProvider",{get:function(){return this.dataLabelProviderProperty},set:function(he){this.dataLabelProviderProperty=he,he.onAttach(this.webAssemblyContext,this),this.notifyPropertyChanged(_e.PROPERTY.SERIES_TEXT_PROVIDER)},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"renderDataTransform",{get:function(){return this.renderDataTransformProperty},set:function(he){if(he.parentSeries!==this)throw new Error("renderDataTransform can only be added to the series it was created with");this.renderDataTransformProperty=he,this.notifyPropertyChanged(_e.PROPERTY.SERIES_TEXT_PROVIDER)},enumerable:!1,configurable:!0}),ve.prototype.resolveAutoColors=function(he,Se,be){if(this.strokeProperty&&this.strokeProperty.startsWith(Z.AUTO_COLOR)){var ke=this.parentSurface.themeProvider.getStrokeColor(he,Se,this.webAssemblyContext);this.stroke=Z.AUTO_COLOR+this.adjustAutoColor("stroke",ke)}this.pointMarker&&this.pointMarker.resolveAutoColors(he,Se,be),this.dataLabelProvider&&this.dataLabelProvider.resolveAutoColors(he,Se,be)},ve.prototype.adjustAutoColor=function(he,Se){return Se},ve.prototype.linkAxes=function(){if((0,s.updateAxisIds)(this),!!this.parentSurface){if(!this.xAxisProperty&&this.xAxisId){var he=this.parentSurface.getXAxisById(this.xAxisId);he?this.xAxisProperty=he:(console.warn('RenderableSeries looked for xAxis Id "'.concat(this.xAxisId,'" but did not find. Default xAxis will be used')),this.xAxisProperty=this.parentSurface.getDefaultXAxis())}if(!this.yAxisProperty&&this.yAxisId){var Se=this.parentSurface.getYAxisById(this.yAxisId);Se?this.yAxisProperty=Se:(console.warn('RenderableSeries looked for yAxis Id "'.concat(this.yAxisId,'" but did not find. Default yAxis will be used')),this.yAxisProperty=this.parentSurface.getDefaultYAxis())}}},ve.prototype.addDrawingProviders=function(he,Se){},ve.prototype.updateTransformedValues=function(he){var Se;if(!(!this.dataSeries||!this.parentSurface||!this.renderDataTransform)){var be;if(this.currentRenderPassData&&(he??V.EDataSeriesValueType.Default)===V.EDataSeriesValueType.Default)be=this.currentRenderPassData;else{var ke=!((Se=this.resamplingParams)===null||Se===void 0)&&Se.resampleRequired?this.pointSeries:new K.XyPointSeriesWrapped(this.dataSeries,void 0,he);be=new Q.RenderPassData(this.getIndicesRange(this.xAxis.visibleRange,this.xAxis.isCategoryAxis),this.xAxis.getCurrentCoordinateCalculator,this.yAxis.getCurrentCoordinateCalculator,this.xAxis.isVerticalChart,ke)}this.transformedRenderPassData=this.renderDataTransform.runTransform(be)}},ve.prototype.setAnimationVectors=function(he){var Se=this.dataSeries;he.isOnStartAnimation?Se.setFinalAnimationVectors(Se):he.isDataSeriesAnimation&&(Se.setInitialAnimationVectors(Se),Se.setFinalAnimationVectors(he.dataSeries),Se.validateAnimationVectors())},ve.prototype.beforeAnimationStart=function(){var he,Se=this.animationFSM.animation;this.setAnimationVectors(Se);var be=(he=Se==null?void 0:Se.styles)===null||he===void 0?void 0:he.pointMarker;be&&(this.pointMarker=pe.animationHelpers.createPointMarker(this.webAssemblyContext,be))},ve.prototype.afterAnimationComplete=function(){if(this.dataSeries){var he=this.dataSeries;he.setInitialAnimationVectors(void 0),he.setFinalAnimationVectors(void 0)}},ve.prototype.updateAnimationProperties=function(he,Se){var be=Se.animation;be.updateSeriesProperties(this,Se.initialStyles,Se.animationProgress);var ke=this.dataSeries;ke&&(ke.updateAnimationProperties(he,be),this.currentRenderPassData=void 0),this.renderDataTransform&&(this.renderDataTransform.requiresTransform=!0),this.invalidateParentCallback&&this.invalidateParentCallback()},ve.prototype.dataSeriesDataChanged=function(he){this.renderDataTransform&&this.renderDataTransform.onDataChange(he),this.invalidateParent()},ve.prototype.valueChanged=function(he,Se){return he!==Se},ve.prototype.setPaletteProvider=function(he){var Se,be;!((Se=this.paletteProviderProperty)===null||Se===void 0)&&Se.onDetached&&this.paletteProviderProperty.onDetached(),this.paletteProviderProperty=he,!((be=this.paletteProviderProperty)===null||be===void 0)&&be.onAttached&&this.paletteProviderProperty.onAttached(this),this.notifyPropertyChanged(_e.PROPERTY.PALETTE_PROVIDER)},ve.prototype.invalidateParent=function(){this.invalidateParentCallback&&this.invalidateParentCallback()},ve.prototype.effectPropertyChanged=function(){this.invalidateParent()},Object.defineProperty(ve.prototype,"canDraw",{get:function(){return pe.animationHelpers.checkCanDraw(this.animationFSM)},enumerable:!1,configurable:!0}),ve})(t.DeletableEntity);r.BaseRenderableSeries=Re;var je=function(xe,ve,he,Se,be,ke,qe){if(Se<0||Se>1)throw new Error("WidthFraction should be between 0.0 and 1.0 inclusive");var rt=xe.size(),St=he,xt=rt;if(xt>1){var It=Number.NEGATIVE_INFINITY,Zt=Number.MAX_VALUE;if(be)It=ve.getCoordinate(rt-1),Zt=ve.getCoordinate(0);else if(ke)It=ve.getCoordinate(xe.get(rt-1)),Zt=ve.getCoordinate(xe.get(0));else{var ct=void 0;try{ct=qe.NumberUtil.MinMax(xe,!1),Zt=ct.minD,It=ct.maxD}finally{(0,o.deleteSafe)(ct)}It=ve.getCoordinate(It),Zt=ve.getCoordinate(Zt)}St=Math.abs(It-Zt)/(xt-1)}return St*Se};r.getDataPointWidth=je;var Ke=function(xe){var ve=xe.pointSize,he=xe.areaSize,Se=xe.range;if(he===0)return 0;var be=ve*de.DpiHelper.PIXEL_RATIO,ke=he/(he-be);return Math.abs(Se.diff)*(ke-1)/2};r.getDelta=Ke;var ot=function(xe,ve,he){he===void 0&&(he=0);var Se=he&&(0,r.getDelta)({pointSize:ve,areaSize:he,range:xe});return new l.NumberRange(xe.min-Se,xe.max+Se)};r.adjustRangeByStrokeThickness=ot;var We=function(xe,ve,he,Se,be){var ke=ve/2;return xe===p.EDataPointWidthMode.Relative&&(he>1?ke=Se.diff/(he-1)*ve/2:ke=0),xe===p.EDataPointWidthMode.Absolute&&(ke=be.getDataWidth(ve)/2),ke};r.getDataPointWidthAdjustment=We})(Vk)),Vk}var Pee;function sSe(){if(Pee)return Bk;Pee=1,Object.defineProperty(Bk,"__esModule",{value:!0}),Bk.RenderPassInfo=void 0;var r=N1(),e=Gl(),i=(function(){function n(t,o){this.renderableSeriesArray=[],this.rendermap=new Map,this.reverseMap=new Map,this.relativeItems=[],this.hasOtherSeriesLayerRenderables=!1,this.seriesViewRect=o}return n.prototype.addRenderable=function(t,o){var a;this.hasOtherSeriesLayerRenderables||!(t instanceof e.BaseRenderableSeries)&&t.getRenderOrder()===r.EDefaultRenderLayer.SeriesLayer&&(this.hasOtherSeriesLayerRenderables=!0);var s=t.getSurfaceRenderOrder(),l=t.getRenderLayer();if(t.getRenderNextTo()){this.hasOtherSeriesLayerRenderables||t.getRenderNextTo().renderable instanceof e.BaseRenderableSeries&&(this.hasOtherSeriesLayerRenderables=!0),this.relativeItems.push({renderable:t,drawFunction:o,tries:0});return}this.rendermap.has(s)||this.rendermap.set(s,new Map),this.rendermap.get(s).get(l)||this.rendermap.get(s).set(l,[]);var u=this.rendermap.get(s).get(l),c=(a=t.getRenderOrder())!==null&&a!==void 0?a:u.length;u.push({renderable:t,resolvedOrder:c,drawFunction:o}),this.reverseMap.set(t.id,{surfaceOrder:s,layer:l,resolvedOrder:c})},n.prototype.resolveNextTo=function(){for(;this.relativeItems.length>0;){var t=this.relativeItems.shift(),o=t.renderable.getRenderNextTo(),a=typeof o.renderable=="string"?o.renderable:o.renderable.id;if(t.tries<this.relativeItems.length+3)if(this.reverseMap.has(a)){var s=this.reverseMap.get(a),l=s.surfaceOrder,u=s.layer,c=s.resolvedOrder,d=this.rendermap.get(l).get(u),f=c+o.offset;d.push({renderable:t.renderable,resolvedOrder:f,drawFunction:t.drawFunction}),this.reverseMap.set(t.renderable.id,{surfaceOrder:l,layer:u,resolvedOrder:f})}else t.tries+=1,this.relativeItems.push(t);else console.warn("Could not find relative item ".concat(a," "))}},n})();return Bk.RenderPassInfo=i,Bk}var iI={},Cee;function c8(){if(Cee)return iI;Cee=1,Object.defineProperty(iI,"__esModule",{value:!0}),iI.watermarkHelpers=void 0;var r=vn(),e=Ep(),i=Kq();function n(t,o,a,s,l,u){var c=l??r.Rect.create(0,0,t,o),d=u??new e.Size(t,o),f=t>500,h=0,p=0,g=0,v=0;if(f){var y=32,m=42,b=124;h=y+b,p=m,g=5,v=10}else{var y=16,m=21,b=63;h=y+b,p=m,g=3,v=6}var S=c.x+g,_=o-(c.top+c.height)+v;if(s)switch(a){case i.EWatermarkPosition.BottomRight:S=t-h-g,_=o-d.height+v;break;case i.EWatermarkPosition.TopLeft:S=g,_=o-(v+p);break;case i.EWatermarkPosition.TopRight:S=t-h-g,_=o-(v+p);break;case i.EWatermarkPosition.BottomLeft:S=g,_=o-d.height+v;break}else switch(a){case i.EWatermarkPosition.BottomRight:S=c.left+c.width-h-g;break;case i.EWatermarkPosition.TopLeft:_=o-(c.top+v+p);break;case i.EWatermarkPosition.TopRight:S=c.left+c.width-h-g,_=o-(c.top+v+p);break;case i.EWatermarkPosition.BottomLeft:}return{left:S,bottom:_}}return iI.watermarkHelpers={calcPosition:n},iI}var nI={},Tee;function lSe(){if(Tee)return nI;Tee=1,Object.defineProperty(nI,"__esModule",{value:!0}),nI.OrderedRenderable=void 0;var r=ws(),e=(function(){function i(n,t,o){this.isVisible=!0,this.setRenderNextTo=function(a,s){},this.getRenderNextTo=function(){},this.id=(0,r.generateGuid)(),this.surfaceRenderOrder=n,this.renderLayer=t,this.renderOrder=o}return i.prototype.getSurfaceRenderOrder=function(){return this.surfaceRenderOrder},i.prototype.getRenderLayer=function(){return this.renderLayer},i.prototype.getRenderOrder=function(){return this.renderOrder},i.prototype.setRenderOrder=function(n){this.renderOrder=n},i})();return nI.OrderedRenderable=e,nI}var xee;function uSe(){if(xee)return GP;xee=1;var r=GP&&GP.__spreadArray||function(T,x,A){if(A||arguments.length===2)for(var w=0,L=x.length,k;w<L;w++)(k||!(w in x))&&(k||(k=Array.prototype.slice.call(x,0,w)),k[w]=x[w]);return T.concat(k||Array.prototype.slice.call(x))};Object.defineProperty(GP,"__esModule",{value:!0}),GP.SciChartRenderer=void 0;var e=So(),i=vn(),n=j1(),t=N1(),o=Ul(),a=Tp(),s=ln(),l=Hi(),u=JS(),c=sSe(),d=Xi(),f=KS(),h=mi(),p=Lf(),g=ca(),v=r8(),y=Wd(),m=pn(),b=c8(),S=Yo(),_=lSe(),C=(function(){function T(x){this.isInvalidated=!1,this.svgRenderRequestId=void 0,this.domRenderRun=!1,this.sciChartSurface=x}return T.prototype.renderDomOnly=function(){var x=this,A;if(!this.sciChartSurface.isDeleted){p.Logger.debug("svg only render start"),this.domRenderRun=!0,this.sciChartSurface.preRender.raiseEvent(void 0);var w=this.previousTime?Date.now()-this.previousTime:0;this.previousTime=Date.now();var L=g.PerformanceDebugHelper.mark(g.EPerformanceMarkType.GenericAnimationStart,{contextId:this.sciChartSurface.id,level:g.EPerformanceDebugLevel.Verbose});if(this.sciChartSurface.onAnimate(w),this.sciChartSurface.genericAnimationsRun.raiseEvent(),this.domRenderRun=!0,g.PerformanceDebugHelper.mark(g.EPerformanceMarkType.GenericAnimationEnd,{contextId:this.sciChartSurface.id,relatedId:(A=L==null?void 0:L.detail)===null||A===void 0?void 0:A.relatedId,level:g.EPerformanceDebugLevel.Verbose}),this.sciChartSurface.layoutMeasured.raiseEvent(),this.isInvalidated){p.Logger.debug("main chart invalidated during dom prerender.  Reverting to full render"),this.sciChartSurface.webAssemblyContext2D.TSRRequestDraw();return}var k=this.sciChartSurface.annotations.asArray(),D=this.sciChartSurface.modifierAnnotations.asArray(),j=r(r([],k,!0),D,!0),N=j.filter(function(V){return V.isDomAnnotation});N.length>0&&this.drawSvgAnnotations(N,this.sciChartSurface.getCoordSvgTranslation()),this.sciChartSurface.rendered.raiseEvent(!1),this.domRenderRun=!1,this.sciChartSurface.isRunningAnimation&&setTimeout(function(){return x.sciChartSurface.invalidateElement({svgOnly:!0})},0),p.Logger.debug("dom only render end")}},T.prototype.render=function(x){var A=this,w,L,k,D,j,N,V;if(!this.sciChartSurface.isDeleted){if(this.sciChartSurface.hasInvalidState){this.displayErrorMessage();return}var W=g.PerformanceDebugHelper.mark(g.EPerformanceMarkType.RenderStart,{contextId:this.sciChartSurface.id,level:g.EPerformanceDebugLevel.Verbose});p.Logger.debug("render start");var K=x.getNativeContext(),H=this.sciChartSurface.webAssemblyContext2D,U;if(e.IS_TEST_ENV||(U=K.GetBlendMode(),K.SetBlendMode(H.eSCRTBlendMode.BlendAdditiveOneAlpha)),this.validate(),!this.domRenderRun){var I=this.previousTime?Date.now()-this.previousTime:0;this.previousTime=Date.now();var Q=g.PerformanceDebugHelper.mark(g.EPerformanceMarkType.GenericAnimationStart,{contextId:this.sciChartSurface.id,level:g.EPerformanceDebugLevel.Verbose});this.isInvalidated=!1,this.sciChartSurface.onAnimate(I),this.sciChartSurface.genericAnimationsRun.raiseEvent(),this.isInvalidated=!0,g.PerformanceDebugHelper.mark(g.EPerformanceMarkType.GenericAnimationEnd,{contextId:this.sciChartSurface.id,relatedId:(w=Q==null?void 0:Q.detail)===null||w===void 0?void 0:w.relatedId,level:g.EPerformanceDebugLevel.Verbose})}this.sciChartSurface.updateStackedCollectionAccumulatedVectors();var Z=g.PerformanceDebugHelper.mark(g.EPerformanceMarkType.AutoRangeStart,{contextId:this.sciChartSurface.id,level:g.EPerformanceDebugLevel.Verbose});this.sciChartSurface.xAxes.asArray().forEach(function(Re){return A.tryPerformAutoRangeOn(Re,A.sciChartSurface)});var ee=(L=this.sciChartSurface.seriesViewRect)!==null&&L!==void 0?L:i.Rect.create(0,0,x.viewportSize.width,x.viewportSize.height),ie=this.prepareSeriesRenderData(ee);this.sciChartSurface.yAxes.asArray().forEach(function(Re){return A.tryPerformAutoRangeOn(Re,A.sciChartSurface)}),g.PerformanceDebugHelper.mark(g.EPerformanceMarkType.AutoRangeEnd,{contextId:this.sciChartSurface.id,relatedId:(k=Z==null?void 0:Z.detail)===null||k===void 0?void 0:k.relatedId,level:g.EPerformanceDebugLevel.Verbose});var de=g.PerformanceDebugHelper.mark(g.EPerformanceMarkType.LayoutStart,{contextId:this.sciChartSurface.id,level:g.EPerformanceDebugLevel.Verbose});a.SciChartSurface.isSubSurface(this.sciChartSurface)&&this.sciChartSurface.updateSubLayout();var pe=this.measureTitle(x),_e=S.Thickness.mergeAdd((D=this.sciChartSurface.offset)!==null&&D!==void 0?D:S.Thickness.fromNumber(0),pe),Te=this.sciChartSurface.layoutManager.layoutChart(x.viewportSize,_e);if(this.sciChartSurface.setCoordSvgTranslation(Te.x,Te.y),this.resizeAnnotationRootElements(Te),this.prepareAxesRenderData(),x.enqueueLayeredDraw(function(){A.sciChartSurface.updateBackground(x)},this.getAbsoluteLayer(t.EDefaultRenderLayer.Background)),this.layoutTitle(Te),this.scheduleTitleDraw(x),g.PerformanceDebugHelper.mark(g.EPerformanceMarkType.LayoutEnd,{contextId:this.sciChartSurface.id,relatedId:(j=de==null?void 0:de.detail)===null||j===void 0?void 0:j.relatedId,level:g.EPerformanceDebugLevel.Verbose}),this.sciChartSurface.isSubSurface||this.sciChartSurface.chartModifiers.asArray().forEach(function(Re){Re.modifierType!==y.EModifierType.Chart3DModifier&&Re.linkAxes(),Re.onParentSurfaceLayoutComplete()}),this.domRenderRun||this.sciChartSurface.layoutMeasured.raiseEvent(),this.isInvalidated=!1,this.domRenderRun=!1,x.enqueueLayeredDraw(function(){A.sciChartSurface.drawBorder(x)},this.getAbsoluteLayer(t.EDefaultRenderLayer.AxisBandsLayer)),this.sciChartSurface.debugRendering&&this.drawDebugAxes(this.sciChartSurface,x),this.drawAxes(this.sciChartSurface,x),this.getSeriesDrawFunctions(this.sciChartSurface,ie,x),this.getAnnotationDrawFunctions(this.sciChartSurface,ie,x),this.sciChartSurface.dataLabelLayoutManager){var De=new _.OrderedRenderable(this.sciChartSurface.getSurfaceRenderOrder(),t.EDefaultRenderLayer.AxesLayer,void 0);ie.addRenderable(De,function(){var Re,je=g.PerformanceDebugHelper.mark(g.EPerformanceMarkType.PerformTextLayoutStart,{contextId:A.sciChartSurface.id,level:g.EPerformanceDebugLevel.Verbose});A.sciChartSurface.dataLabelLayoutManager.performTextLayout(A.sciChartSurface,ie),g.PerformanceDebugHelper.mark(g.EPerformanceMarkType.PerformTextLayoutEnd,{contextId:A.sciChartSurface.id,relatedId:(Re=je==null?void 0:je.detail)===null||Re===void 0?void 0:Re.relatedId,level:g.EPerformanceDebugLevel.Verbose})})}var Pe=new _.OrderedRenderable(this.sciChartSurface.getSurfaceRenderOrder(),t.EDefaultRenderLayer.AxesLayer,void 0);ie.addRenderable(Pe,function(){ie.renderableSeriesArray.forEach(function(Re,je){var Ke;if(Re.dataLabelProvider){var ot=g.PerformanceDebugHelper.mark(g.EPerformanceMarkType.DrawDataLabelsStart,{contextId:Re.id,parentContextId:A.sciChartSurface.id,level:g.EPerformanceDebugLevel.Verbose});Re.dataLabelProvider.draw(x),g.PerformanceDebugHelper.mark(g.EPerformanceMarkType.DrawDataLabelsEnd,{contextId:Re.id,parentContextId:A.sciChartSurface.id,relatedId:(Ke=ot==null?void 0:ot.detail)===null||Ke===void 0?void 0:Ke.relatedId,level:g.EPerformanceDebugLevel.Verbose})}})}),this.enqueueRenderables(x,ie),x.enqueueLayeredDraw(function(){var Re=A.sciChartSurface.clipRect;x.resetAndClip(Re),x.endFonts()},this.getAbsoluteLayer(t.EDefaultRenderLayer.AxesLayer)),x.enqueueLayeredDraw(function(){},this.getAbsoluteLayer(t.EDefaultRenderLayer.Foreground)),x.drawLayers(),a.SciChartSurface.isSubSurface(this.sciChartSurface)?x.doDraw&&this.updateWatermark(x,this.sciChartSurface.parentSurface.seriesViewRect):this.updateWatermark(x,Te);var Ee=g.PerformanceDebugHelper.mark(g.EPerformanceMarkType.PostDrawActionsStart,{contextId:this.sciChartSurface.id,level:g.EPerformanceDebugLevel.Verbose});this.onParentSurfaceRendered(),e.IS_TEST_ENV||K.SetBlendMode(U),this.sciChartSurface.isRunningAnimation&&this.svgRenderRequestId===void 0&&setTimeout(this.sciChartSurface.invalidateElement,0),g.PerformanceDebugHelper.mark(g.EPerformanceMarkType.PostDrawActionsEnd,{contextId:this.sciChartSurface.id,relatedId:(N=Ee==null?void 0:Ee.detail)===null||N===void 0?void 0:N.relatedId,level:g.EPerformanceDebugLevel.Verbose}),g.PerformanceDebugHelper.mark(g.EPerformanceMarkType.RenderEnd,{contextId:this.sciChartSurface.id,relatedId:(V=W==null?void 0:W.detail)===null||V===void 0?void 0:V.relatedId,level:g.EPerformanceDebugLevel.Verbose}),p.Logger.debug("render end")}},T.prototype.getSeriesDrawFunctions=function(x,A,w){for(var L=A.renderableSeriesArray,k=this.sciChartSurface.seriesViewRect,D=i.Rect.intersect(this.sciChartSurface.seriesViewRect,this.sciChartSurface.clipRect),j=x.xAxes.asArray().some(function(U){return U.isVerticalChart}),N=!0,V=function(U){if(!U.isVisible)return"continue";var I=function(){(j||A.hasOtherSeriesLayerRenderables||N)&&w.setTranslationRotationAndClip(D,k.x,k.y),U.draw(w,U.getCurrentRenderPassData()),N=!1};A.addRenderable(U,I)},W=0,K=L;W<K.length;W++){var H=K[W];V(H)}},T.prototype.getAnnotationDrawFunctions=function(x,A,w){for(var L=this.sciChartSurface.seriesViewRect,k=this.sciChartSurface.annotations.asArray(),D=this.sciChartSurface.modifierAnnotations.asArray(),j=this.sciChartSurface.getCoordSvgTranslation(),N=0,V=k;N<V.length;N++){var W=V[N];W.isDomAnnotation?this.getHTMLAnnotationDrawFunction(W,j):W.isVisible&&this.getRenderContextAnnotationDrawFunction(W,w,L,A)}for(var K=0,H=D;K<H.length;K++){var W=H[K];W.isDomAnnotation?this.getHTMLAnnotationDrawFunction(W,j):W.isVisible&&this.getRenderContextAnnotationDrawFunction(W,w,L,A)}},T.prototype.getHTMLAnnotationDrawFunction=function(x,A){var w;x.linkAxes();var L=x.xAxis,k=x.yAxis;if(!L||!k)console.error("Cannot draw annotations before axes have been configured. Add axes first, or use suspendUpdates to pause drawing until axes are available.");else{var D=g.PerformanceDebugHelper.mark(g.EPerformanceMarkType.DrawAnnotationStart,{contextId:x.id,parentContextId:this.sciChartSurface.id,level:g.EPerformanceDebugLevel.Verbose});x.update(L.getCurrentCoordinateCalculator(),k.getCurrentCoordinateCalculator(),A.x/l.DpiHelper.PIXEL_RATIO,A.y/l.DpiHelper.PIXEL_RATIO),g.PerformanceDebugHelper.mark(g.EPerformanceMarkType.DrawAnnotationEnd,{contextId:x.id,parentContextId:this.sciChartSurface.id,relatedId:(w=D==null?void 0:D.detail)===null||w===void 0?void 0:w.relatedId,level:g.EPerformanceDebugLevel.Verbose})}},T.prototype.getRenderContextAnnotationDrawFunction=function(x,A,w,L){var k=this,D=this.sciChartSurface.viewRect,j=this.sciChartSurface.chartViewRect;if(x.isVisible){var N=function(){var V,W,K;x.linkAxes();var H=x.xAxis,U=x.yAxis;if(!H||!U)console.error("Cannot draw annotations before axes have been configured. Add axes first, or use suspendUpdates to pause drawing until axes are available.");else if(!H.parentSurface)console.error("Cannot draw annotation ".concat((V=x==null?void 0:x.constructor)===null||V===void 0?void 0:V.name," with X-axis detached from sciChartSurface. Set a correct xAxisId on the annotation."));else if(!U.parentSurface)console.error("Cannot draw annotation ".concat((W=x==null?void 0:x.constructor)===null||W===void 0?void 0:W.name," with Y-axis detached from sciChartSurface. Set a correct yAxisId on the annotation."));else{var I=g.PerformanceDebugHelper.mark(g.EPerformanceMarkType.DrawAnnotationStart,{contextId:x.id,parentContextId:k.sciChartSurface.id,level:g.EPerformanceDebugLevel.Verbose});x.drawWithContext(A,H.getCurrentCoordinateCalculator(),U.getCurrentCoordinateCalculator(),w,D,j),g.PerformanceDebugHelper.mark(g.EPerformanceMarkType.DrawAnnotationEnd,{contextId:x.id,parentContextId:k.sciChartSurface.id,relatedId:(K=I==null?void 0:I.detail)===null||K===void 0?void 0:K.relatedId,level:g.EPerformanceDebugLevel.Verbose})}};L.addRenderable(x,N)}},T.prototype.enqueueRenderables=function(x,A){A.resolveNextTo();var w=Array.from(A.rendermap.keys());w.sort(function(Z,ee){return Z-ee});for(var L=0,k=w;L<k.length;L++){var D=k[L],j=Array.from(A.rendermap.get(D).keys());j.sort(function(Z,ee){return Z-ee});for(var N=0,V=j;N<V.length;N++){var W=V[N],K=A.rendermap.get(D).get(W);K.sort(function(Z,ee){return Z.resolvedOrder-ee.resolvedOrder});for(var H=(0,o.calculateAbsoluteRenderLayer)(D,this.sciChartSurface.stepBetweenLayers,W),U=0,I=K;U<I.length;U++){var Q=I[U];Q!=null&&Q.drawFunction&&this.enqueueRenderable(x,Q,H)}}}},T.prototype.enqueueRenderable=function(x,A,w){x.enqueueLayeredDraw(A.drawFunction,w)},T.prototype.displayErrorMessage=function(){var x=document.createElement("div");x.style.width="100%",x.style.height="100%",x.style.color="white",x.style.background="black",x.style.display="flex",x.style.justifyContent="center",x.style.alignItems="center";var A=document.createElement("span");A.innerText="The surface with id ".concat(this.sciChartSurface.id," has an invalid state. Check the console for errors."),x.appendChild(A),this.sciChartSurface.domDivContainer.style.background="black",this.sciChartSurface.domDivContainer.appendChild(x)},T.prototype.drawRenderContextAnnotations=function(x,A,w,L){var k=this,D=this.sciChartSurface.viewRect,j=this.sciChartSurface.chartViewRect;x.filter(function(N){return N.annotationLayer===A}).forEach(function(N){var V;N.linkAxes();var W=N.xAxis,K=N.yAxis;if(!W||!K)console.error("Cannot draw annotations before axes have been configured. Add axes first, or use suspendUpdates to pause drawing until axes are available.");else if(!N.isHidden){var H=g.PerformanceDebugHelper.mark(g.EPerformanceMarkType.DrawAnnotationStart,{contextId:N.id,parentContextId:k.sciChartSurface.id,level:g.EPerformanceDebugLevel.Verbose});N.drawWithContext(w,W.getCurrentCoordinateCalculator(),K.getCurrentCoordinateCalculator(),L,D,j),g.PerformanceDebugHelper.mark(g.EPerformanceMarkType.DrawAnnotationEnd,{contextId:N.id,parentContextId:k.sciChartSurface.id,relatedId:(V=H==null?void 0:H.detail)===null||V===void 0?void 0:V.relatedId,level:g.EPerformanceDebugLevel.Verbose})}})},T.prototype.drawHtmlBasedAnnotations=function(x,A){var w=this;x.forEach(function(L){var k;L.linkAxes();var D=L.xAxis,j=L.yAxis;if(!D||!j)console.error("Cannot draw annotations before axes have been configured. Add axes first, or use suspendUpdates to pause drawing until axes are available.");else{var N=g.PerformanceDebugHelper.mark(g.EPerformanceMarkType.DrawAnnotationStart,{contextId:w.sciChartSurface.id,level:g.EPerformanceDebugLevel.Verbose});L.update(D.getCurrentCoordinateCalculator(),j.getCurrentCoordinateCalculator(),A.x/l.DpiHelper.PIXEL_RATIO,A.y/l.DpiHelper.PIXEL_RATIO),g.PerformanceDebugHelper.mark(g.EPerformanceMarkType.DrawAnnotationEnd,{contextId:w.sciChartSurface.id,relatedId:(k=N==null?void 0:N.detail)===null||k===void 0?void 0:k.relatedId,level:g.EPerformanceDebugLevel.Verbose})}})},T.prototype.drawSvgAnnotations=function(x,A){var w=this;x.forEach(function(L){var k,D,j;L.linkAxes();var N=L.xAxis,V=L.yAxis;if(!N||!V){console.error("Cannot draw SVG annotations before axes have been configured. Add axes first, or use suspendUpdates to pause drawing until axes are available.");return}(N.id!==L.xAxisId||V.id!==L.yAxisId)&&p.Logger.log("SVG Annotation ".concat((D=(k=L.constructor)===null||k===void 0?void 0:k.name)!==null&&D!==void 0?D:""," has mismatched axis IDs. Expected xAxisId=").concat(L.xAxisId,", yAxisId=").concat(L.yAxisId," but got xAxis=").concat(N.id,", yAxis=").concat(V.id));var W=g.PerformanceDebugHelper.mark(g.EPerformanceMarkType.DrawAnnotationStart,{contextId:L.id,parentContextId:w.sciChartSurface.id,level:g.EPerformanceDebugLevel.Verbose});L.update(N.getCurrentCoordinateCalculator(),V.getCurrentCoordinateCalculator(),A.x/l.DpiHelper.PIXEL_RATIO,A.y/l.DpiHelper.PIXEL_RATIO),g.PerformanceDebugHelper.mark(g.EPerformanceMarkType.DrawAnnotationEnd,{contextId:L.id,parentContextId:w.sciChartSurface.id,relatedId:(j=W==null?void 0:W.detail)===null||j===void 0?void 0:j.relatedId,level:g.EPerformanceDebugLevel.Verbose})})},T.prototype.validate=function(){if(this.sciChartSurface.xAxes.asArray().forEach(function(A){return A.isMeasured=!1}),this.sciChartSurface.yAxes.asArray().forEach(function(A){return A.isMeasured=!1}),this.sciChartSurface.renderableSeries.size()>0){var x=this.sciChartSurface.validateAndLink();if(x.length>0)throw new Error(x.join(`
`))}},T.prototype.resizeAnnotationRootElements=function(x){var A=this.sciChartSurface.clipRect,w=(0,m.translateToNotScaledRect)(A),L=i.Rect.intersect((0,m.translateToNotScaledRect)(x),w),k=this.sciChartSurface.viewRect,D=i.Rect.intersect((0,m.translateToNotScaledRect)(k),w);if(!this.prevRect||!this.prevSurfaceRect)this.prevRect=L,this.prevSurfaceRect=D;else if(i.Rect.isEqual(this.prevRect,L)&&i.Rect.isEqual(this.prevSurfaceRect,D))return;this.prevRect=L,this.prevSurfaceRect=k;var j=this.sciChartSurface.domSvgContainer;j&&this.sciChartSurface.setSvgClipPathDefinitions(j,L,D);var N=this.sciChartSurface.domBackgroundSvgContainer;N&&this.sciChartSurface.setSvgClipPathDefinitions(N,L,D);var V=this.sciChartSurface.domSvgAdornerLayer;V&&this.sciChartSurface.setSvgClipPathDefinitions(V,L,D)},T.prototype.prepareAxesRenderData=function(){this.sciChartSurface.xAxes.asArray().forEach(function(x){x.prepareRenderData()}),this.sciChartSurface.yAxes.asArray().forEach(function(x){x.prepareRenderData()})},T.prototype.prepareSeriesRenderData=function(x){for(var A,w,L,k=this.sciChartSurface.renderableSeries.size(),D=new c.RenderPassInfo(k,x),j=0;j<this.sciChartSurface.renderableSeries.size();j++){var N=this.sciChartSurface.renderableSeries.get(j);if(!(!N.isCollection&&!N.dataSeries)){if(!N.isCollection&&N.dataSeries.getIsDeleted())throw new Error("SciChartSurface.renderableSeries[index=".concat(j,"] dataSeries has been deleted. ")+"This is an invalid state for SciChart. Have you shared this DataSeries between chart surfaces?");var V=g.PerformanceDebugHelper.mark(g.EPerformanceMarkType.ResampleSingleSeriesStart,{contextId:N.id,parentContextId:this.sciChartSurface.id,level:g.EPerformanceDebugLevel.Verbose}),W=N.xAxis;if(!W.parentSurface){console.error("Cannot draw series ".concat((A=N==null?void 0:N.constructor)===null||A===void 0?void 0:A.name," with X-axis detached from sciChartSurface. Set a correct xAxisId on the series"));continue}var K=N.yAxis;if(!K.parentSurface){console.error("Cannot draw series ".concat((w=N==null?void 0:N.constructor)===null||w===void 0?void 0:w.name," with Y-axis detached from sciChartSurface. Set a correct yAxisId on the series"));continue}var H=v.ExtremeResamplerHelper.resampleSeries(W,N,x);D.renderableSeriesArray.push(H.renderableSeries);var U=new u.RenderPassData(H.indicesRange,W.getCurrentCoordinateCalculator,K.getCurrentCoordinateCalculator,W.isVerticalChart,H.pointSeries,H.resamplingHash);N.setCurrentRenderPassData(U),g.PerformanceDebugHelper.mark(g.EPerformanceMarkType.ResampleSingleSeriesEnd,{contextId:N.id,parentContextId:this.sciChartSurface.id,relatedId:(L=V==null?void 0:V.detail)===null||L===void 0?void 0:L.relatedId,level:g.EPerformanceDebugLevel.Verbose})}}return D},T.prototype.drawAxes=function(x,A){x.xAxes.asArray().forEach(function(w){w.draw(A)}),x.yAxes.asArray().forEach(function(w){w.draw(A)})},T.prototype.drawSeries=function(x,A,w){var L=this,k,D=A.renderableSeriesArray,j=this.sciChartSurface.seriesViewRect,N=i.Rect.intersect(this.sciChartSurface.seriesViewRect,this.sciChartSurface.clipRect);if(w.setTranslationRotationAndClip(N,j.x,j.y),D.forEach(function(W,K){W.isVisible&&!W.isSelected&&!W.isHovered&&W.draw(w,W.getCurrentRenderPassData())}),D.forEach(function(W,K){W.isVisible&&W.isHovered&&W.draw(w,W.getCurrentRenderPassData())}),D.forEach(function(W,K){W.isVisible&&W.isSelected&&W.draw(w,W.getCurrentRenderPassData())}),this.sciChartSurface.dataLabelLayoutManager){var V=g.PerformanceDebugHelper.mark(g.EPerformanceMarkType.PerformTextLayoutStart,{contextId:this.sciChartSurface.id,level:g.EPerformanceDebugLevel.Verbose});this.sciChartSurface.dataLabelLayoutManager.performTextLayout(this.sciChartSurface,A),g.PerformanceDebugHelper.mark(g.EPerformanceMarkType.PerformTextLayoutEnd,{contextId:this.sciChartSurface.id,relatedId:(k=V==null?void 0:V.detail)===null||k===void 0?void 0:k.relatedId,level:g.EPerformanceDebugLevel.Verbose})}D.forEach(function(W,K){var H;if(W.isVisible&&W.dataLabelProvider){var U=g.PerformanceDebugHelper.mark(g.EPerformanceMarkType.DrawDataLabelsStart,{contextId:W.id,parentContextId:L.sciChartSurface.id,level:g.EPerformanceDebugLevel.Verbose});W.dataLabelProvider.draw(w),g.PerformanceDebugHelper.mark(g.EPerformanceMarkType.DrawDataLabelsEnd,{contextId:W.id,parentContextId:L.sciChartSurface.id,relatedId:(H=U==null?void 0:U.detail)===null||H===void 0?void 0:H.relatedId,level:g.EPerformanceDebugLevel.Verbose})}})},T.prototype.drawDebugAxes=function(x,A){A.enqueueLayeredDraw(function(){x.xAxes.asArray().forEach(function(w){w.drawDebug(A)}),x.yAxes.asArray().forEach(function(w){w.drawDebug(A)})})},T.prototype.tryPerformAutoRangeOn=function(x,A){var w=!x.hasValidVisibleRange()||x.hasDefaultVisibleRange(),L=x.autoRange===n.EAutoRange.Always||x.autoRange===n.EAutoRange.Once&&w;if(L){var k=x.getMaximumRange();k.equals(x.visibleRange)||(!x.autoRangeAnimation||w&&!x.autoRangeAnimation.animateInitialRanging||!w&&!x.autoRangeAnimation.animateSubsequentRanging?x.visibleRange=k:k.equals(x.animatedVisibleRange)||x.animateVisibleRange(k,x.autoRangeAnimation.duration,x.autoRangeAnimation.easing))}},T.prototype.onParentSurfaceRendered=function(){var x;this.sciChartSurface.isSubSurface||this.sciChartSurface.chartModifiers.asArray().forEach(function(A){A.modifierType!==y.EModifierType.Chart3DModifier&&A.linkAxes(),A.onParentSurfaceRendered()}),(x=this.sciChartSurface.subCharts)===null||x===void 0||x.forEach(function(A){A.hasInvalidState||A.chartModifiers.asArray().forEach(function(w){w.onParentSurfaceRendered()})})},T.prototype.updateWatermark=function(x,A){var w=this.sciChartSurface.isCopyCanvasSurface?s.SciChartSurfaceBase.domMasterCanvas.height:x.viewportSize.height,L=this.sciChartSurface.isCopyCanvasSurface?s.SciChartSurfaceBase.domMasterCanvas.width:x.viewportSize.width,k=b.watermarkHelpers.calcPosition(L,w,this.sciChartSurface.watermarkPosition,this.sciChartSurface.watermarkRelativeToCanvas,A,x.viewportSize),D=k.left,j=k.bottom;this.sciChartSurface.updateWatermark(D,j)},T.prototype.scheduleTitleDraw=function(x){var A=this;x.enqueueLayeredDraw(function(){A.sciChartSurface.chartTitleRenderer.draw(x,A.sciChartSurface.clipRect)},this.getAbsoluteLayer(t.EDefaultRenderLayer.AnnotationsAboveSeriesLayer))},T.prototype.measureTitle=function(x){return this.sciChartSurface.chartTitleRenderer.measure(this.sciChartSurface.title,this.sciChartSurface.titleStyle,x),this.sciChartSurface.chartTitleRenderer.titleOffset},T.prototype.layoutTitle=function(x){var A=this.sciChartSurface.titleStyle.placeWithinChart?x:this.sciChartSurface.viewRect;this.sciChartSurface.chartTitleRenderer.layout(A)},T.prototype.getAbsoluteLayer=function(x){return(0,o.calculateAbsoluteRenderLayer)(this.sciChartSurface.getSurfaceRenderOrder(),this.sciChartSurface.stepBetweenLayers,x)},T.prototype.drawDebugSurfaceRect=function(x,A,w){var L=(0,d.getVectorRectVertex)(w),k=new w.SCRTSolidBrush((0,h.parseColorToUIntArgb)("rgba(0,255,0,0.7)"),!1),D=(0,f.createNativeRect)(w,0,0,A.width,A.height);L.push_back(D),x.drawRects(L,k,this.sciChartSurface.chartViewRect,A.left,A.top),k.delete()},T})();return GP.SciChartRenderer=C,GP}var oI={},Eee;function cSe(){if(Eee)return oI;Eee=1,Object.defineProperty(oI,"__esModule",{value:!0}),oI.AdornerLayer=void 0;var r=(function(){function e(i){this.parentSurface=i}return e.prototype.selectAnnotation=function(i){var n=this.parentSurface,t,o=function(a){for(var s=a.length-1;s>=0;s--){var l=a[s],u=l.click(i,!t&&l.isEditable);u&&(t=l)}};return o(n.annotations.asArray()),o(n.modifierAnnotations.asArray()),this.selectedAnnotationProperty=t,!!t},e.prototype.deselectAnnotation=function(i){this.selectedAnnotationProperty===i&&(this.selectedAnnotationProperty=void 0)},Object.defineProperty(e.prototype,"selectedAnnotation",{get:function(){return this.selectedAnnotationProperty},set:function(i){this.selectedAnnotationProperty=i},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isAnnotationSelected",{get:function(){return!!this.selectedAnnotationProperty},enumerable:!1,configurable:!0}),e})();return oI.AdornerLayer=r,oI}var pC={},P5={exports:{}},Aee;function dSe(){return Aee||(Aee=1,(function(r,e){var i=(()=>{var t;var n=typeof document<"u"?(t=document.currentScript)==null?void 0:t.src:void 0;return(function(o={}){var a,s=o,l,u,c=new Promise((z,J)=>{l=z,u=J}),d=Object.assign({},s),f=[],h="./this.program",p=(z,J)=>{throw J},g="";function v(z){return s.locateFile?s.locateFile(z,g):g+z}var y,m;typeof document<"u"&&document.currentScript&&(g=document.currentScript.src),n&&(g=n),g.startsWith("blob:")?g="":g=g.substr(0,g.replace(/[?#].*/,"").lastIndexOf("/")+1),y=async z=>{var J=await fetch(z,{credentials:"same-origin"});if(J.ok)return J.arrayBuffer();throw new Error(J.status+" : "+J.url)};var b=s.print||console.log.bind(console),S=s.printErr||console.error.bind(console);Object.assign(s,d),d=null,s.arguments&&(f=s.arguments),s.thisProgram&&(h=s.thisProgram);var _=s.wasmBinary,C,T=!1,x,A,w,L,k,D,j,N,V;function W(){var z=C.buffer;s.HEAP8=A=new Int8Array(z),s.HEAP16=L=new Int16Array(z),s.HEAPU8=w=new Uint8Array(z),s.HEAPU16=k=new Uint16Array(z),s.HEAP32=D=new Int32Array(z),s.HEAPU32=j=new Uint32Array(z),s.HEAPF32=N=new Float32Array(z),s.HEAPF64=V=new Float64Array(z)}var K=[],H=[],U=[],I=[];function Q(){if(s.preRun)for(typeof s.preRun=="function"&&(s.preRun=[s.preRun]);s.preRun.length;)de(s.preRun.shift());Zt(K)}function Z(){!s.noFSInit&&!ue.initialized&&ue.init(),ue.ignorePermissions=!1,Zt(H)}function ee(){Zt(U)}function ie(){if(s.postRun)for(typeof s.postRun=="function"&&(s.postRun=[s.postRun]);s.postRun.length;)_e(s.postRun.shift());Zt(I)}function de(z){K.unshift(z)}function pe(z){H.unshift(z)}function _e(z){I.unshift(z)}var Te=0,De=null;function Pe(z){var J;Te++,(J=s.monitorRunDependencies)==null||J.call(s,Te)}function Ee(z){var oe;if(Te--,(oe=s.monitorRunDependencies)==null||oe.call(s,Te),Te==0&&De){var J=De;De=null,J()}}function Re(z){var oe;(oe=s.onAbort)==null||oe.call(s,z),z="Aborted("+z+")",S(z),T=!0,z+=". Build with -sASSERTIONS for more info.";var J=new WebAssembly.RuntimeError(z);throw u(J),J}var je="data:application/octet-stream;base64,",Ke=z=>z.startsWith(je);function ot(){var z="scichart2d.wasm";return Ke(z)?z:v(z)}var We;function xe(z){if(z==We&&_)return new Uint8Array(_);throw"both async and sync fetching of the wasm failed"}async function ve(z){if(!_)try{var J=await y(z);return new Uint8Array(J)}catch{}return xe(z)}async function he(z,J){try{var oe=await ve(z),O=await WebAssembly.instantiate(oe,J);return O}catch(B){S(`failed to asynchronously prepare wasm: ${B}`),Re(B)}}async function Se(z,J,oe){if(!z&&typeof WebAssembly.instantiateStreaming=="function"&&!Ke(J)&&typeof fetch=="function")try{var O=fetch(J,{credentials:"same-origin"}),B=await WebAssembly.instantiateStreaming(O,oe);return B}catch(X){S(`wasm streaming compile failed: ${X}`),S("falling back to ArrayBuffer instantiation")}return he(J,oe)}function be(){return{a:na}}async function ke(){function z(B,X){return po=B.exports,po=Ao(po),C=po.lb,W(),Ot=po.qb,pe(po.mb),Ee(),po}Pe();function J(B){z(B.instance)}var oe=be();if(s.instantiateWasm)try{return s.instantiateWasm(oe,z)}catch(B){S(`Module.instantiateWasm callback failed with error: ${B}`),u(B)}We??(We=ot());try{var O=await Se(_,We,oe);return J(O),O}catch(B){u(B);return}}var qe,rt,St={458517:()=>s.getRandomValue(),458533:()=>s.getRandomValue(),458553:()=>{if(s.getRandomValue===void 0)try{var z=typeof window=="object"?window:self,J=typeof z.crypto<"u"?z.crypto:z.msCrypto,oe=function(){var X=new Uint32Array(1);return J.getRandomValues(X),X[0]>>>0};oe(),s.getRandomValue=oe}catch{try{var O=Math.pow(2,32),B=function(){var re=Math.floor(Math.random()*Math.floor(O));return re>>>0};B(),s.getRandomValue=B}catch{throw"No secure random number generator found"}}},458569:()=>{if(s.getRandomValue===void 0)try{var z=typeof window=="object"?window:self,J=typeof z.crypto<"u"?z.crypto:z.msCrypto,oe=function(){var X=new Uint32Array(1);return J.getRandomValues(X),X[0]>>>0};oe(),s.getRandomValue=oe}catch{try{var O=Math.pow(2,32),B=function(){var re=Math.floor(Math.random()*Math.floor(O));return re>>>0};B(),s.getRandomValue=B}catch{throw"No secure random number generator found"}}}};function xt(){var z="";typeof window<"u"?z=window.location.hostname:typeof process<"u"&&(z="node");var J=Qt(z)+1,oe=di(J);return Ti(z,oe,J),oe}class It{constructor(J){To(this,"name","ExitStatus");this.message=`Program terminated with exit(${J})`,this.status=J}}var Zt=z=>{for(;z.length>0;)z.shift()(s)},ct=s.noExitRuntime||!0,Qe=z=>Ws(z),Et=()=>Mc();class Gt{constructor(J){this.excPtr=J,this.ptr=J-24}set_type(J){j[this.ptr+4>>>2>>>0]=J}get_type(){return j[this.ptr+4>>>2>>>0]}set_destructor(J){j[this.ptr+8>>>2>>>0]=J}get_destructor(){return j[this.ptr+8>>>2>>>0]}set_caught(J){J=J?1:0,A[this.ptr+12>>>0]=J}get_caught(){return A[this.ptr+12>>>0]!=0}set_rethrown(J){J=J?1:0,A[this.ptr+13>>>0]=J}get_rethrown(){return A[this.ptr+13>>>0]!=0}init(J,oe){this.set_adjusted_ptr(0),this.set_type(J),this.set_destructor(oe)}set_adjusted_ptr(J){j[this.ptr+16>>>2>>>0]=J}get_adjusted_ptr(){return j[this.ptr+16>>>2>>>0]}}var Xe=0,Vt=(z,J)=>J+2097152>>>0<4194305-!!z?(z>>>0)+J*4294967296:NaN;function lr(z,J,oe){z>>>=0,J>>>=0,oe>>>=0;var O=new Gt(z);throw O.init(J,oe),Xe=z,Xe}var Jt=()=>{var z=D[+Bt.varargs>>>2>>>0];return Bt.varargs+=4,z},kr=Jt,qt={isAbs:z=>z.charAt(0)==="/",splitPath:z=>{var J=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return J.exec(z).slice(1)},normalizeArray:(z,J)=>{for(var oe=0,O=z.length-1;O>=0;O--){var B=z[O];B==="."?z.splice(O,1):B===".."?(z.splice(O,1),oe++):oe&&(z.splice(O,1),oe--)}if(J)for(;oe;oe--)z.unshift("..");return z},normalize:z=>{var J=qt.isAbs(z),oe=z.substr(-1)==="/";return z=qt.normalizeArray(z.split("/").filter(O=>!!O),!J).join("/"),!z&&!J&&(z="."),z&&oe&&(z+="/"),(J?"/":"")+z},dirname:z=>{var J=qt.splitPath(z),oe=J[0],O=J[1];return!oe&&!O?".":(O&&(O=O.substr(0,O.length-1)),oe+O)},basename:z=>{if(z==="/")return"/";z=qt.normalize(z),z=z.replace(/\/$/,"");var J=z.lastIndexOf("/");return J===-1?z:z.substr(J+1)},join:(...z)=>qt.normalize(z.join("/")),join2:(z,J)=>qt.normalize(z+"/"+J)},zt=()=>{if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function")return z=>crypto.getRandomValues(z);Re("initRandomDevice")},jr=z=>(jr=zt())(z),Be={resolve:(...z)=>{for(var J="",oe=!1,O=z.length-1;O>=-1&&!oe;O--){var B=O>=0?z[O]:ue.cwd();if(typeof B!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!B)return"";J=B+"/"+J,oe=qt.isAbs(B)}return J=qt.normalizeArray(J.split("/").filter(X=>!!X),!oe).join("/"),(oe?"/":"")+J||"."},relative:(z,J)=>{z=Be.resolve(z).substr(1),J=Be.resolve(J).substr(1);function oe(Ie){for(var He=0;He<Ie.length&&Ie[He]==="";He++);for(var at=Ie.length-1;at>=0&&Ie[at]==="";at--);return He>at?[]:Ie.slice(He,at-He+1)}for(var O=oe(z.split("/")),B=oe(J.split("/")),X=Math.min(O.length,B.length),re=X,ce=0;ce<X;ce++)if(O[ce]!==B[ce]){re=ce;break}for(var Ae=[],ce=re;ce<O.length;ce++)Ae.push("..");return Ae=Ae.concat(B.slice(re)),Ae.join("/")}},Ge=typeof TextDecoder<"u"?new TextDecoder:void 0,ut=(z,J=0,oe=NaN)=>{J>>>=0;for(var O=J+oe,B=J;z[B]&&!(B>=O);)++B;if(B-J>16&&z.buffer&&Ge)return Ge.decode(z.subarray(J,B));for(var X="";J<B;){var re=z[J++];if(!(re&128)){X+=String.fromCharCode(re);continue}var ce=z[J++]&63;if((re&224)==192){X+=String.fromCharCode((re&31)<<6|ce);continue}var Ae=z[J++]&63;if((re&240)==224?re=(re&15)<<12|ce<<6|Ae:re=(re&7)<<18|ce<<12|Ae<<6|z[J++]&63,re<65536)X+=String.fromCharCode(re);else{var Ie=re-65536;X+=String.fromCharCode(55296|Ie>>10,56320|Ie&1023)}}return X},Pt=[],Qt=z=>{for(var J=0,oe=0;oe<z.length;++oe){var O=z.charCodeAt(oe);O<=127?J++:O<=2047?J+=2:O>=55296&&O<=57343?(J+=4,++oe):J+=3}return J},wr=(z,J,oe,O)=>{if(oe>>>=0,!(O>0))return 0;for(var B=oe,X=oe+O-1,re=0;re<z.length;++re){var ce=z.charCodeAt(re);if(ce>=55296&&ce<=57343){var Ae=z.charCodeAt(++re);ce=65536+((ce&1023)<<10)|Ae&1023}if(ce<=127){if(oe>=X)break;J[oe++>>>0]=ce}else if(ce<=2047){if(oe+1>=X)break;J[oe++>>>0]=192|ce>>6,J[oe++>>>0]=128|ce&63}else if(ce<=65535){if(oe+2>=X)break;J[oe++>>>0]=224|ce>>12,J[oe++>>>0]=128|ce>>6&63,J[oe++>>>0]=128|ce&63}else{if(oe+3>=X)break;J[oe++>>>0]=240|ce>>18,J[oe++>>>0]=128|ce>>12&63,J[oe++>>>0]=128|ce>>6&63,J[oe++>>>0]=128|ce&63}}return J[oe>>>0]=0,oe-B};function Xr(z,J,oe){var O=Qt(z)+1,B=new Array(O),X=wr(z,B,0,B.length);return B.length=X,B}var pi=()=>{if(!Pt.length){var z=null;if(typeof window<"u"&&typeof window.prompt=="function"&&(z=window.prompt("Input: "),z!==null&&(z+=`
`)),!z)return null;Pt=Xr(z)}return Pt.shift()},Qr={ttys:[],init(){},shutdown(){},register(z,J){Qr.ttys[z]={input:[],output:[],ops:J},ue.registerDevice(z,Qr.stream_ops)},stream_ops:{open(z){var J=Qr.ttys[z.node.rdev];if(!J)throw new ue.ErrnoError(43);z.tty=J,z.seekable=!1},close(z){z.tty.ops.fsync(z.tty)},fsync(z){z.tty.ops.fsync(z.tty)},read(z,J,oe,O,B){if(!z.tty||!z.tty.ops.get_char)throw new ue.ErrnoError(60);for(var X=0,re=0;re<O;re++){var ce;try{ce=z.tty.ops.get_char(z.tty)}catch{throw new ue.ErrnoError(29)}if(ce===void 0&&X===0)throw new ue.ErrnoError(6);if(ce==null)break;X++,J[oe+re]=ce}return X&&(z.node.atime=Date.now()),X},write(z,J,oe,O,B){if(!z.tty||!z.tty.ops.put_char)throw new ue.ErrnoError(60);try{for(var X=0;X<O;X++)z.tty.ops.put_char(z.tty,J[oe+X])}catch{throw new ue.ErrnoError(29)}return O&&(z.node.mtime=z.node.ctime=Date.now()),X}},default_tty_ops:{get_char(z){return pi()},put_char(z,J){J===null||J===10?(b(ut(z.output)),z.output=[]):J!=0&&z.output.push(J)},fsync(z){z.output&&z.output.length>0&&(b(ut(z.output)),z.output=[])},ioctl_tcgets(z){return{c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},ioctl_tcsets(z,J,oe){return 0},ioctl_tiocgwinsz(z){return[24,80]}},default_tty1_ops:{put_char(z,J){J===null||J===10?(S(ut(z.output)),z.output=[]):J!=0&&z.output.push(J)},fsync(z){z.output&&z.output.length>0&&(S(ut(z.output)),z.output=[])}}},Ur=(z,J)=>Math.ceil(z/J)*J,ci=z=>{Re()},Xt={ops_table:null,mount(z){return Xt.createNode(null,"/",16895,0)},createNode(z,J,oe,O){if(ue.isBlkdev(oe)||ue.isFIFO(oe))throw new ue.ErrnoError(63);Xt.ops_table||(Xt.ops_table={dir:{node:{getattr:Xt.node_ops.getattr,setattr:Xt.node_ops.setattr,lookup:Xt.node_ops.lookup,mknod:Xt.node_ops.mknod,rename:Xt.node_ops.rename,unlink:Xt.node_ops.unlink,rmdir:Xt.node_ops.rmdir,readdir:Xt.node_ops.readdir,symlink:Xt.node_ops.symlink},stream:{llseek:Xt.stream_ops.llseek}},file:{node:{getattr:Xt.node_ops.getattr,setattr:Xt.node_ops.setattr},stream:{llseek:Xt.stream_ops.llseek,read:Xt.stream_ops.read,write:Xt.stream_ops.write,allocate:Xt.stream_ops.allocate,mmap:Xt.stream_ops.mmap,msync:Xt.stream_ops.msync}},link:{node:{getattr:Xt.node_ops.getattr,setattr:Xt.node_ops.setattr,readlink:Xt.node_ops.readlink},stream:{}},chrdev:{node:{getattr:Xt.node_ops.getattr,setattr:Xt.node_ops.setattr},stream:ue.chrdev_stream_ops}});var B=ue.createNode(z,J,oe,O);return ue.isDir(B.mode)?(B.node_ops=Xt.ops_table.dir.node,B.stream_ops=Xt.ops_table.dir.stream,B.contents={}):ue.isFile(B.mode)?(B.node_ops=Xt.ops_table.file.node,B.stream_ops=Xt.ops_table.file.stream,B.usedBytes=0,B.contents=null):ue.isLink(B.mode)?(B.node_ops=Xt.ops_table.link.node,B.stream_ops=Xt.ops_table.link.stream):ue.isChrdev(B.mode)&&(B.node_ops=Xt.ops_table.chrdev.node,B.stream_ops=Xt.ops_table.chrdev.stream),B.atime=B.mtime=B.ctime=Date.now(),z&&(z.contents[J]=B,z.atime=z.mtime=z.ctime=B.atime),B},getFileDataAsTypedArray(z){return z.contents?z.contents.subarray?z.contents.subarray(0,z.usedBytes):new Uint8Array(z.contents):new Uint8Array(0)},expandFileStorage(z,J){var oe=z.contents?z.contents.length:0;if(!(oe>=J)){var O=1024*1024;J=Math.max(J,oe*(oe<O?2:1.125)>>>0),oe!=0&&(J=Math.max(J,256));var B=z.contents;z.contents=new Uint8Array(J),z.usedBytes>0&&z.contents.set(B.subarray(0,z.usedBytes),0)}},resizeFileStorage(z,J){if(z.usedBytes!=J)if(J==0)z.contents=null,z.usedBytes=0;else{var oe=z.contents;z.contents=new Uint8Array(J),oe&&z.contents.set(oe.subarray(0,Math.min(J,z.usedBytes))),z.usedBytes=J}},node_ops:{getattr(z){var J={};return J.dev=ue.isChrdev(z.mode)?z.id:1,J.ino=z.id,J.mode=z.mode,J.nlink=1,J.uid=0,J.gid=0,J.rdev=z.rdev,ue.isDir(z.mode)?J.size=4096:ue.isFile(z.mode)?J.size=z.usedBytes:ue.isLink(z.mode)?J.size=z.link.length:J.size=0,J.atime=new Date(z.atime),J.mtime=new Date(z.mtime),J.ctime=new Date(z.ctime),J.blksize=4096,J.blocks=Math.ceil(J.size/J.blksize),J},setattr(z,J){for(const oe of["mode","atime","mtime","ctime"])J[oe]&&(z[oe]=J[oe]);J.size!==void 0&&Xt.resizeFileStorage(z,J.size)},lookup(z,J){throw Xt.doesNotExistError},mknod(z,J,oe,O){return Xt.createNode(z,J,oe,O)},rename(z,J,oe){var O;try{O=ue.lookupNode(J,oe)}catch{}if(O){if(ue.isDir(z.mode))for(var B in O.contents)throw new ue.ErrnoError(55);ue.hashRemoveNode(O)}delete z.parent.contents[z.name],J.contents[oe]=z,z.name=oe,J.ctime=J.mtime=z.parent.ctime=z.parent.mtime=Date.now()},unlink(z,J){delete z.contents[J],z.ctime=z.mtime=Date.now()},rmdir(z,J){var oe=ue.lookupNode(z,J);for(var O in oe.contents)throw new ue.ErrnoError(55);delete z.contents[J],z.ctime=z.mtime=Date.now()},readdir(z){return[".","..",...Object.keys(z.contents)]},symlink(z,J,oe){var O=Xt.createNode(z,J,41471,0);return O.link=oe,O},readlink(z){if(!ue.isLink(z.mode))throw new ue.ErrnoError(28);return z.link}},stream_ops:{read(z,J,oe,O,B){var X=z.node.contents;if(B>=z.node.usedBytes)return 0;var re=Math.min(z.node.usedBytes-B,O);if(re>8&&X.subarray)J.set(X.subarray(B,B+re),oe);else for(var ce=0;ce<re;ce++)J[oe+ce]=X[B+ce];return re},write(z,J,oe,O,B,X){if(J.buffer===A.buffer&&(X=!1),!O)return 0;var re=z.node;if(re.mtime=re.ctime=Date.now(),J.subarray&&(!re.contents||re.contents.subarray)){if(X)return re.contents=J.subarray(oe,oe+O),re.usedBytes=O,O;if(re.usedBytes===0&&B===0)return re.contents=J.slice(oe,oe+O),re.usedBytes=O,O;if(B+O<=re.usedBytes)return re.contents.set(J.subarray(oe,oe+O),B),O}if(Xt.expandFileStorage(re,B+O),re.contents.subarray&&J.subarray)re.contents.set(J.subarray(oe,oe+O),B);else for(var ce=0;ce<O;ce++)re.contents[B+ce]=J[oe+ce];return re.usedBytes=Math.max(re.usedBytes,B+O),O},llseek(z,J,oe){var O=J;if(oe===1?O+=z.position:oe===2&&ue.isFile(z.node.mode)&&(O+=z.node.usedBytes),O<0)throw new ue.ErrnoError(28);return O},allocate(z,J,oe){Xt.expandFileStorage(z.node,J+oe),z.node.usedBytes=Math.max(z.node.usedBytes,J+oe)},mmap(z,J,oe,O,B){if(!ue.isFile(z.node.mode))throw new ue.ErrnoError(43);var X,re,ce=z.node.contents;if(!(B&2)&&ce&&ce.buffer===A.buffer)re=!1,X=ce.byteOffset;else{if(re=!0,X=ci(),!X)throw new ue.ErrnoError(48);ce&&((oe>0||oe+J<ce.length)&&(ce.subarray?ce=ce.subarray(oe,oe+J):ce=Array.prototype.slice.call(ce,oe,oe+J)),A.set(ce,X>>>0))}return{ptr:X,allocated:re}},msync(z,J,oe,O,B){return Xt.stream_ops.write(z,J,0,O,oe,!1),0}}},Ui=async z=>{var J=await y(z);return new Uint8Array(J)},Dn=(z,J,oe,O,B,X)=>{ue.createDataFile(z,J,oe,O,B,X)},Kr=s.preloadPlugins||[],In=(z,J,oe,O)=>{typeof Browser<"u"&&Browser.init();var B=!1;return Kr.forEach(X=>{B||X.canHandle(J)&&(X.handle(z,J,oe,O),B=!0)}),B},fn=(z,J,oe,O,B,X,re,ce,Ae,Ie)=>{var He=J?Be.resolve(qt.join2(z,J)):z;function at(Tt){function mt(Lt){Ie==null||Ie(),ce||Dn(z,J,Lt,O,B,Ae),X==null||X(),Ee()}In(Tt,He,mt,()=>{re==null||re(),Ee()})||mt(Tt)}Pe(),typeof oe=="string"?Ui(oe).then(at,re):at(oe)},vt=z=>{var J={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},oe=J[z];if(typeof oe>"u")throw new Error(`Unknown file open mode: ${z}`);return oe},dr=(z,J)=>{var oe=0;return z&&(oe|=365),J&&(oe|=146),oe},ue={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:class{constructor(z){To(this,"name","ErrnoError");this.errno=z}},filesystems:null,syncFSRequests:0,readFiles:{},FSStream:class{constructor(){To(this,"shared",{})}get object(){return this.node}set object(z){this.node=z}get isRead(){return(this.flags&2097155)!==1}get isWrite(){return(this.flags&2097155)!==0}get isAppend(){return this.flags&1024}get flags(){return this.shared.flags}set flags(z){this.shared.flags=z}get position(){return this.shared.position}set position(z){this.shared.position=z}},FSNode:class{constructor(z,J,oe,O){To(this,"node_ops",{});To(this,"stream_ops",{});To(this,"readMode",365);To(this,"writeMode",146);To(this,"mounted",null);z||(z=this),this.parent=z,this.mount=z.mount,this.id=ue.nextInode++,this.name=J,this.mode=oe,this.rdev=O,this.atime=this.mtime=this.ctime=Date.now()}get read(){return(this.mode&this.readMode)===this.readMode}set read(z){z?this.mode|=this.readMode:this.mode&=~this.readMode}get write(){return(this.mode&this.writeMode)===this.writeMode}set write(z){z?this.mode|=this.writeMode:this.mode&=~this.writeMode}get isFolder(){return ue.isDir(this.mode)}get isDevice(){return ue.isChrdev(this.mode)}},lookupPath(z,J={}){if(!z)return{path:"",node:null};J.follow_mount??(J.follow_mount=!0),qt.isAbs(z)||(z=ue.cwd()+"/"+z);e:for(var oe=0;oe<40;oe++){for(var O=z.split("/").filter(Ie=>!!Ie&&Ie!=="."),B=ue.root,X="/",re=0;re<O.length;re++){var ce=re===O.length-1;if(ce&&J.parent)break;if(O[re]===".."){X=qt.dirname(X),B=B.parent;continue}X=qt.join2(X,O[re]);try{B=ue.lookupNode(B,O[re])}catch(Ie){if((Ie==null?void 0:Ie.errno)===44&&ce&&J.noent_okay)return{path:X};throw Ie}if(ue.isMountpoint(B)&&(!ce||J.follow_mount)&&(B=B.mounted.root),ue.isLink(B.mode)&&(!ce||J.follow)){if(!B.node_ops.readlink)throw new ue.ErrnoError(52);var Ae=B.node_ops.readlink(B);qt.isAbs(Ae)||(Ae=qt.dirname(X)+"/"+Ae),z=Ae+"/"+O.slice(re+1).join("/");continue e}}return{path:X,node:B}}throw new ue.ErrnoError(32)},getPath(z){for(var J;;){if(ue.isRoot(z)){var oe=z.mount.mountpoint;return J?oe[oe.length-1]!=="/"?`${oe}/${J}`:oe+J:oe}J=J?`${z.name}/${J}`:z.name,z=z.parent}},hashName(z,J){for(var oe=0,O=0;O<J.length;O++)oe=(oe<<5)-oe+J.charCodeAt(O)|0;return(z+oe>>>0)%ue.nameTable.length},hashAddNode(z){var J=ue.hashName(z.parent.id,z.name);z.name_next=ue.nameTable[J],ue.nameTable[J]=z},hashRemoveNode(z){var J=ue.hashName(z.parent.id,z.name);if(ue.nameTable[J]===z)ue.nameTable[J]=z.name_next;else for(var oe=ue.nameTable[J];oe;){if(oe.name_next===z){oe.name_next=z.name_next;break}oe=oe.name_next}},lookupNode(z,J){var oe=ue.mayLookup(z);if(oe)throw new ue.ErrnoError(oe);for(var O=ue.hashName(z.id,J),B=ue.nameTable[O];B;B=B.name_next){var X=B.name;if(B.parent.id===z.id&&X===J)return B}return ue.lookup(z,J)},createNode(z,J,oe,O){var B=new ue.FSNode(z,J,oe,O);return ue.hashAddNode(B),B},destroyNode(z){ue.hashRemoveNode(z)},isRoot(z){return z===z.parent},isMountpoint(z){return!!z.mounted},isFile(z){return(z&61440)===32768},isDir(z){return(z&61440)===16384},isLink(z){return(z&61440)===40960},isChrdev(z){return(z&61440)===8192},isBlkdev(z){return(z&61440)===24576},isFIFO(z){return(z&61440)===4096},isSocket(z){return(z&49152)===49152},flagsToPermissionString(z){var J=["r","w","rw"][z&3];return z&512&&(J+="w"),J},nodePermissions(z,J){return ue.ignorePermissions?0:J.includes("r")&&!(z.mode&292)||J.includes("w")&&!(z.mode&146)||J.includes("x")&&!(z.mode&73)?2:0},mayLookup(z){if(!ue.isDir(z.mode))return 54;var J=ue.nodePermissions(z,"x");return J||(z.node_ops.lookup?0:2)},mayCreate(z,J){if(!ue.isDir(z.mode))return 54;try{var oe=ue.lookupNode(z,J);return 20}catch{}return ue.nodePermissions(z,"wx")},mayDelete(z,J,oe){var O;try{O=ue.lookupNode(z,J)}catch(X){return X.errno}var B=ue.nodePermissions(z,"wx");if(B)return B;if(oe){if(!ue.isDir(O.mode))return 54;if(ue.isRoot(O)||ue.getPath(O)===ue.cwd())return 10}else if(ue.isDir(O.mode))return 31;return 0},mayOpen(z,J){return z?ue.isLink(z.mode)?32:ue.isDir(z.mode)&&(ue.flagsToPermissionString(J)!=="r"||J&512)?31:ue.nodePermissions(z,ue.flagsToPermissionString(J)):44},MAX_OPEN_FDS:4096,nextfd(){for(var z=0;z<=ue.MAX_OPEN_FDS;z++)if(!ue.streams[z])return z;throw new ue.ErrnoError(33)},getStreamChecked(z){var J=ue.getStream(z);if(!J)throw new ue.ErrnoError(8);return J},getStream:z=>ue.streams[z],createStream(z,J=-1){return z=Object.assign(new ue.FSStream,z),J==-1&&(J=ue.nextfd()),z.fd=J,ue.streams[J]=z,z},closeStream(z){ue.streams[z]=null},dupStream(z,J=-1){var O,B;var oe=ue.createStream(z,J);return(B=(O=oe.stream_ops)==null?void 0:O.dup)==null||B.call(O,oe),oe},chrdev_stream_ops:{open(z){var oe,O;var J=ue.getDevice(z.node.rdev);z.stream_ops=J.stream_ops,(O=(oe=z.stream_ops).open)==null||O.call(oe,z)},llseek(){throw new ue.ErrnoError(70)}},major:z=>z>>8,minor:z=>z&255,makedev:(z,J)=>z<<8|J,registerDevice(z,J){ue.devices[z]={stream_ops:J}},getDevice:z=>ue.devices[z],getMounts(z){for(var J=[],oe=[z];oe.length;){var O=oe.pop();J.push(O),oe.push(...O.mounts)}return J},syncfs(z,J){typeof z=="function"&&(J=z,z=!1),ue.syncFSRequests++,ue.syncFSRequests>1&&S(`warning: ${ue.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var oe=ue.getMounts(ue.root.mount),O=0;function B(re){return ue.syncFSRequests--,J(re)}function X(re){if(re)return X.errored?void 0:(X.errored=!0,B(re));++O>=oe.length&&B(null)}oe.forEach(re=>{if(!re.type.syncfs)return X(null);re.type.syncfs(re,z,X)})},mount(z,J,oe){var O=oe==="/",B=!oe,X;if(O&&ue.root)throw new ue.ErrnoError(10);if(!O&&!B){var re=ue.lookupPath(oe,{follow_mount:!1});if(oe=re.path,X=re.node,ue.isMountpoint(X))throw new ue.ErrnoError(10);if(!ue.isDir(X.mode))throw new ue.ErrnoError(54)}var ce={type:z,opts:J,mountpoint:oe,mounts:[]},Ae=z.mount(ce);return Ae.mount=ce,ce.root=Ae,O?ue.root=Ae:X&&(X.mounted=ce,X.mount&&X.mount.mounts.push(ce)),Ae},unmount(z){var J=ue.lookupPath(z,{follow_mount:!1});if(!ue.isMountpoint(J.node))throw new ue.ErrnoError(28);var oe=J.node,O=oe.mounted,B=ue.getMounts(O);Object.keys(ue.nameTable).forEach(re=>{for(var ce=ue.nameTable[re];ce;){var Ae=ce.name_next;B.includes(ce.mount)&&ue.destroyNode(ce),ce=Ae}}),oe.mounted=null;var X=oe.mount.mounts.indexOf(O);oe.mount.mounts.splice(X,1)},lookup(z,J){return z.node_ops.lookup(z,J)},mknod(z,J,oe){var O=ue.lookupPath(z,{parent:!0}),B=O.node,X=qt.basename(z);if(!X||X==="."||X==="..")throw new ue.ErrnoError(28);var re=ue.mayCreate(B,X);if(re)throw new ue.ErrnoError(re);if(!B.node_ops.mknod)throw new ue.ErrnoError(63);return B.node_ops.mknod(B,X,J,oe)},statfs(z){var J={bsize:4096,frsize:4096,blocks:1e6,bfree:5e5,bavail:5e5,files:ue.nextInode,ffree:ue.nextInode-1,fsid:42,flags:2,namelen:255},oe=ue.lookupPath(z,{follow:!0}).node;return oe!=null&&oe.node_ops.statfs&&Object.assign(J,oe.node_ops.statfs(oe.mount.opts.root)),J},create(z,J=438){return J&=4095,J|=32768,ue.mknod(z,J,0)},mkdir(z,J=511){return J&=1023,J|=16384,ue.mknod(z,J,0)},mkdirTree(z,J){for(var oe=z.split("/"),O="",B=0;B<oe.length;++B)if(oe[B]){O+="/"+oe[B];try{ue.mkdir(O,J)}catch(X){if(X.errno!=20)throw X}}},mkdev(z,J,oe){return typeof oe>"u"&&(oe=J,J=438),J|=8192,ue.mknod(z,J,oe)},symlink(z,J){if(!Be.resolve(z))throw new ue.ErrnoError(44);var oe=ue.lookupPath(J,{parent:!0}),O=oe.node;if(!O)throw new ue.ErrnoError(44);var B=qt.basename(J),X=ue.mayCreate(O,B);if(X)throw new ue.ErrnoError(X);if(!O.node_ops.symlink)throw new ue.ErrnoError(63);return O.node_ops.symlink(O,B,z)},rename(z,J){var oe=qt.dirname(z),O=qt.dirname(J),B=qt.basename(z),X=qt.basename(J),re,ce,Ae;if(re=ue.lookupPath(z,{parent:!0}),ce=re.node,re=ue.lookupPath(J,{parent:!0}),Ae=re.node,!ce||!Ae)throw new ue.ErrnoError(44);if(ce.mount!==Ae.mount)throw new ue.ErrnoError(75);var Ie=ue.lookupNode(ce,B),He=Be.relative(z,O);if(He.charAt(0)!==".")throw new ue.ErrnoError(28);if(He=Be.relative(J,oe),He.charAt(0)!==".")throw new ue.ErrnoError(55);var at;try{at=ue.lookupNode(Ae,X)}catch{}if(Ie!==at){var Tt=ue.isDir(Ie.mode),mt=ue.mayDelete(ce,B,Tt);if(mt)throw new ue.ErrnoError(mt);if(mt=at?ue.mayDelete(Ae,X,Tt):ue.mayCreate(Ae,X),mt)throw new ue.ErrnoError(mt);if(!ce.node_ops.rename)throw new ue.ErrnoError(63);if(ue.isMountpoint(Ie)||at&&ue.isMountpoint(at))throw new ue.ErrnoError(10);if(Ae!==ce&&(mt=ue.nodePermissions(ce,"w"),mt))throw new ue.ErrnoError(mt);ue.hashRemoveNode(Ie);try{ce.node_ops.rename(Ie,Ae,X),Ie.parent=Ae}catch(Lt){throw Lt}finally{ue.hashAddNode(Ie)}}},rmdir(z){var J=ue.lookupPath(z,{parent:!0}),oe=J.node,O=qt.basename(z),B=ue.lookupNode(oe,O),X=ue.mayDelete(oe,O,!0);if(X)throw new ue.ErrnoError(X);if(!oe.node_ops.rmdir)throw new ue.ErrnoError(63);if(ue.isMountpoint(B))throw new ue.ErrnoError(10);oe.node_ops.rmdir(oe,O),ue.destroyNode(B)},readdir(z){var J=ue.lookupPath(z,{follow:!0}),oe=J.node;if(!oe.node_ops.readdir)throw new ue.ErrnoError(54);return oe.node_ops.readdir(oe)},unlink(z){var J=ue.lookupPath(z,{parent:!0}),oe=J.node;if(!oe)throw new ue.ErrnoError(44);var O=qt.basename(z),B=ue.lookupNode(oe,O),X=ue.mayDelete(oe,O,!1);if(X)throw new ue.ErrnoError(X);if(!oe.node_ops.unlink)throw new ue.ErrnoError(63);if(ue.isMountpoint(B))throw new ue.ErrnoError(10);oe.node_ops.unlink(oe,O),ue.destroyNode(B)},readlink(z){var J=ue.lookupPath(z),oe=J.node;if(!oe)throw new ue.ErrnoError(44);if(!oe.node_ops.readlink)throw new ue.ErrnoError(28);return oe.node_ops.readlink(oe)},stat(z,J){var oe=ue.lookupPath(z,{follow:!J}),O=oe.node;if(!O)throw new ue.ErrnoError(44);if(!O.node_ops.getattr)throw new ue.ErrnoError(63);return O.node_ops.getattr(O)},lstat(z){return ue.stat(z,!0)},chmod(z,J,oe){var O;if(typeof z=="string"){var B=ue.lookupPath(z,{follow:!oe});O=B.node}else O=z;if(!O.node_ops.setattr)throw new ue.ErrnoError(63);O.node_ops.setattr(O,{mode:J&4095|O.mode&-4096,ctime:Date.now()})},lchmod(z,J){ue.chmod(z,J,!0)},fchmod(z,J){var oe=ue.getStreamChecked(z);ue.chmod(oe.node,J)},chown(z,J,oe,O){var B;if(typeof z=="string"){var X=ue.lookupPath(z,{follow:!O});B=X.node}else B=z;if(!B.node_ops.setattr)throw new ue.ErrnoError(63);B.node_ops.setattr(B,{timestamp:Date.now()})},lchown(z,J,oe){ue.chown(z,J,oe,!0)},fchown(z,J,oe){var O=ue.getStreamChecked(z);ue.chown(O.node,J,oe)},truncate(z,J){if(J<0)throw new ue.ErrnoError(28);var oe;if(typeof z=="string"){var O=ue.lookupPath(z,{follow:!0});oe=O.node}else oe=z;if(!oe.node_ops.setattr)throw new ue.ErrnoError(63);if(ue.isDir(oe.mode))throw new ue.ErrnoError(31);if(!ue.isFile(oe.mode))throw new ue.ErrnoError(28);var B=ue.nodePermissions(oe,"w");if(B)throw new ue.ErrnoError(B);oe.node_ops.setattr(oe,{size:J,timestamp:Date.now()})},ftruncate(z,J){var oe=ue.getStreamChecked(z);if((oe.flags&2097155)===0)throw new ue.ErrnoError(28);ue.truncate(oe.node,J)},utime(z,J,oe){var O=ue.lookupPath(z,{follow:!0}),B=O.node;B.node_ops.setattr(B,{atime:J,mtime:oe})},open(z,J,oe=438){if(z==="")throw new ue.ErrnoError(44);J=typeof J=="string"?vt(J):J,J&64?oe=oe&4095|32768:oe=0;var O;if(typeof z=="object")O=z;else{var B=ue.lookupPath(z,{follow:!(J&131072),noent_okay:!0});O=B.node,z=B.path}var X=!1;if(J&64)if(O){if(J&128)throw new ue.ErrnoError(20)}else O=ue.mknod(z,oe,0),X=!0;if(!O)throw new ue.ErrnoError(44);if(ue.isChrdev(O.mode)&&(J&=-513),J&65536&&!ue.isDir(O.mode))throw new ue.ErrnoError(54);if(!X){var re=ue.mayOpen(O,J);if(re)throw new ue.ErrnoError(re)}J&512&&!X&&ue.truncate(O,0),J&=-131713;var ce=ue.createStream({node:O,path:ue.getPath(O),flags:J,seekable:!0,position:0,stream_ops:O.stream_ops,ungotten:[],error:!1});return ce.stream_ops.open&&ce.stream_ops.open(ce),s.logReadFiles&&!(J&1)&&(z in ue.readFiles||(ue.readFiles[z]=1)),ce},close(z){if(ue.isClosed(z))throw new ue.ErrnoError(8);z.getdents&&(z.getdents=null);try{z.stream_ops.close&&z.stream_ops.close(z)}catch(J){throw J}finally{ue.closeStream(z.fd)}z.fd=null},isClosed(z){return z.fd===null},llseek(z,J,oe){if(ue.isClosed(z))throw new ue.ErrnoError(8);if(!z.seekable||!z.stream_ops.llseek)throw new ue.ErrnoError(70);if(oe!=0&&oe!=1&&oe!=2)throw new ue.ErrnoError(28);return z.position=z.stream_ops.llseek(z,J,oe),z.ungotten=[],z.position},read(z,J,oe,O,B){if(O<0||B<0)throw new ue.ErrnoError(28);if(ue.isClosed(z))throw new ue.ErrnoError(8);if((z.flags&2097155)===1)throw new ue.ErrnoError(8);if(ue.isDir(z.node.mode))throw new ue.ErrnoError(31);if(!z.stream_ops.read)throw new ue.ErrnoError(28);var X=typeof B<"u";if(!X)B=z.position;else if(!z.seekable)throw new ue.ErrnoError(70);var re=z.stream_ops.read(z,J,oe,O,B);return X||(z.position+=re),re},write(z,J,oe,O,B,X){if(O<0||B<0)throw new ue.ErrnoError(28);if(ue.isClosed(z))throw new ue.ErrnoError(8);if((z.flags&2097155)===0)throw new ue.ErrnoError(8);if(ue.isDir(z.node.mode))throw new ue.ErrnoError(31);if(!z.stream_ops.write)throw new ue.ErrnoError(28);z.seekable&&z.flags&1024&&ue.llseek(z,0,2);var re=typeof B<"u";if(!re)B=z.position;else if(!z.seekable)throw new ue.ErrnoError(70);var ce=z.stream_ops.write(z,J,oe,O,B,X);return re||(z.position+=ce),ce},allocate(z,J,oe){if(ue.isClosed(z))throw new ue.ErrnoError(8);if(J<0||oe<=0)throw new ue.ErrnoError(28);if((z.flags&2097155)===0)throw new ue.ErrnoError(8);if(!ue.isFile(z.node.mode)&&!ue.isDir(z.node.mode))throw new ue.ErrnoError(43);if(!z.stream_ops.allocate)throw new ue.ErrnoError(138);z.stream_ops.allocate(z,J,oe)},mmap(z,J,oe,O,B){if((O&2)!==0&&(B&2)===0&&(z.flags&2097155)!==2)throw new ue.ErrnoError(2);if((z.flags&2097155)===1)throw new ue.ErrnoError(2);if(!z.stream_ops.mmap)throw new ue.ErrnoError(43);if(!J)throw new ue.ErrnoError(28);return z.stream_ops.mmap(z,J,oe,O,B)},msync(z,J,oe,O,B){return z.stream_ops.msync?z.stream_ops.msync(z,J,oe,O,B):0},ioctl(z,J,oe){if(!z.stream_ops.ioctl)throw new ue.ErrnoError(59);return z.stream_ops.ioctl(z,J,oe)},readFile(z,J={}){if(J.flags=J.flags||0,J.encoding=J.encoding||"binary",J.encoding!=="utf8"&&J.encoding!=="binary")throw new Error(`Invalid encoding type "${J.encoding}"`);var oe,O=ue.open(z,J.flags),B=ue.stat(z),X=B.size,re=new Uint8Array(X);return ue.read(O,re,0,X,0),J.encoding==="utf8"?oe=ut(re):J.encoding==="binary"&&(oe=re),ue.close(O),oe},writeFile(z,J,oe={}){oe.flags=oe.flags||577;var O=ue.open(z,oe.flags,oe.mode);if(typeof J=="string"){var B=new Uint8Array(Qt(J)+1),X=wr(J,B,0,B.length);ue.write(O,B,0,X,void 0,oe.canOwn)}else if(ArrayBuffer.isView(J))ue.write(O,J,0,J.byteLength,void 0,oe.canOwn);else throw new Error("Unsupported data type");ue.close(O)},cwd:()=>ue.currentPath,chdir(z){var J=ue.lookupPath(z,{follow:!0});if(J.node===null)throw new ue.ErrnoError(44);if(!ue.isDir(J.node.mode))throw new ue.ErrnoError(54);var oe=ue.nodePermissions(J.node,"x");if(oe)throw new ue.ErrnoError(oe);ue.currentPath=J.path},createDefaultDirectories(){ue.mkdir("/tmp"),ue.mkdir("/home"),ue.mkdir("/home/web_user")},createDefaultDevices(){ue.mkdir("/dev"),ue.registerDevice(ue.makedev(1,3),{read:()=>0,write:(O,B,X,re,ce)=>re,llseek:()=>0}),ue.mkdev("/dev/null",ue.makedev(1,3)),Qr.register(ue.makedev(5,0),Qr.default_tty_ops),Qr.register(ue.makedev(6,0),Qr.default_tty1_ops),ue.mkdev("/dev/tty",ue.makedev(5,0)),ue.mkdev("/dev/tty1",ue.makedev(6,0));var z=new Uint8Array(1024),J=0,oe=()=>(J===0&&(J=jr(z).byteLength),z[--J]);ue.createDevice("/dev","random",oe),ue.createDevice("/dev","urandom",oe),ue.mkdir("/dev/shm"),ue.mkdir("/dev/shm/tmp")},createSpecialDirectories(){ue.mkdir("/proc");var z=ue.mkdir("/proc/self");ue.mkdir("/proc/self/fd"),ue.mount({mount(){var J=ue.createNode(z,"fd",16895,73);return J.stream_ops={llseek:Xt.stream_ops.llseek},J.node_ops={lookup(oe,O){var B=+O,X=ue.getStreamChecked(B),re={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>X.path},id:B+1};return re.parent=re,re},readdir(){return Array.from(ue.streams.entries()).filter(([oe,O])=>O).map(([oe,O])=>oe.toString())}},J}},{},"/proc/self/fd")},createStandardStreams(z,J,oe){z?ue.createDevice("/dev","stdin",z):ue.symlink("/dev/tty","/dev/stdin"),J?ue.createDevice("/dev","stdout",null,J):ue.symlink("/dev/tty","/dev/stdout"),oe?ue.createDevice("/dev","stderr",null,oe):ue.symlink("/dev/tty1","/dev/stderr"),ue.open("/dev/stdin",0),ue.open("/dev/stdout",1),ue.open("/dev/stderr",1)},staticInit(){ue.nameTable=new Array(4096),ue.mount(Xt,{},"/"),ue.createDefaultDirectories(),ue.createDefaultDevices(),ue.createSpecialDirectories(),ue.filesystems={MEMFS:Xt}},init(z,J,oe){ue.initialized=!0,z??(z=s.stdin),J??(J=s.stdout),oe??(oe=s.stderr),ue.createStandardStreams(z,J,oe)},quit(){ue.initialized=!1;for(var z=0;z<ue.streams.length;z++){var J=ue.streams[z];J&&ue.close(J)}},findObject(z,J){var oe=ue.analyzePath(z,J);return oe.exists?oe.object:null},analyzePath(z,J){try{var oe=ue.lookupPath(z,{follow:!J});z=oe.path}catch{}var O={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var oe=ue.lookupPath(z,{parent:!0});O.parentExists=!0,O.parentPath=oe.path,O.parentObject=oe.node,O.name=qt.basename(z),oe=ue.lookupPath(z,{follow:!J}),O.exists=!0,O.path=oe.path,O.object=oe.node,O.name=oe.node.name,O.isRoot=oe.path==="/"}catch(B){O.error=B.errno}return O},createPath(z,J,oe,O){z=typeof z=="string"?z:ue.getPath(z);for(var B=J.split("/").reverse();B.length;){var X=B.pop();if(X){var re=qt.join2(z,X);try{ue.mkdir(re)}catch{}z=re}}return re},createFile(z,J,oe,O,B){var X=qt.join2(typeof z=="string"?z:ue.getPath(z),J),re=dr(O,B);return ue.create(X,re)},createDataFile(z,J,oe,O,B,X){var re=J;z&&(z=typeof z=="string"?z:ue.getPath(z),re=J?qt.join2(z,J):z);var ce=dr(O,B),Ae=ue.create(re,ce);if(oe){if(typeof oe=="string"){for(var Ie=new Array(oe.length),He=0,at=oe.length;He<at;++He)Ie[He]=oe.charCodeAt(He);oe=Ie}ue.chmod(Ae,ce|146);var Tt=ue.open(Ae,577);ue.write(Tt,oe,0,oe.length,0,X),ue.close(Tt),ue.chmod(Ae,ce)}},createDevice(z,J,oe,O){var ce;var B=qt.join2(typeof z=="string"?z:ue.getPath(z),J),X=dr(!!oe,!!O);(ce=ue.createDevice).major??(ce.major=64);var re=ue.makedev(ue.createDevice.major++,0);return ue.registerDevice(re,{open(Ae){Ae.seekable=!1},close(Ae){var Ie;(Ie=O==null?void 0:O.buffer)!=null&&Ie.length&&O(10)},read(Ae,Ie,He,at,Tt){for(var mt=0,Lt=0;Lt<at;Lt++){var or;try{or=oe()}catch{throw new ue.ErrnoError(29)}if(or===void 0&&mt===0)throw new ue.ErrnoError(6);if(or==null)break;mt++,Ie[He+Lt]=or}return mt&&(Ae.node.atime=Date.now()),mt},write(Ae,Ie,He,at,Tt){for(var mt=0;mt<at;mt++)try{O(Ie[He+mt])}catch{throw new ue.ErrnoError(29)}return at&&(Ae.node.mtime=Ae.node.ctime=Date.now()),mt}}),ue.mkdev(B,X,re)},forceLoadFile(z){if(z.isDevice||z.isFolder||z.link||z.contents)return!0;if(typeof XMLHttpRequest<"u")throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");try{z.contents=m(z.url),z.usedBytes=z.contents.length}catch{throw new ue.ErrnoError(29)}},createLazyFile(z,J,oe,O,B){class X{constructor(){To(this,"lengthKnown",!1);To(this,"chunks",[])}get(mt){if(!(mt>this.length-1||mt<0)){var Lt=mt%this.chunkSize,or=mt/this.chunkSize|0;return this.getter(or)[Lt]}}setDataGetter(mt){this.getter=mt}cacheLength(){var mt=new XMLHttpRequest;if(mt.open("HEAD",oe,!1),mt.send(null),!(mt.status>=200&&mt.status<300||mt.status===304))throw new Error("Couldn't load "+oe+". Status: "+mt.status);var Lt=Number(mt.getResponseHeader("Content-length")),or,er=(or=mt.getResponseHeader("Accept-Ranges"))&&or==="bytes",pr=(or=mt.getResponseHeader("Content-Encoding"))&&or==="gzip",Ir=1024*1024;er||(Ir=Lt);var $r=(Si,Lr)=>{if(Si>Lr)throw new Error("invalid range ("+Si+", "+Lr+") or no bytes requested!");if(Lr>Lt-1)throw new Error("only "+Lt+" bytes available! programmer error!");var Qi=new XMLHttpRequest;if(Qi.open("GET",oe,!1),Lt!==Ir&&Qi.setRequestHeader("Range","bytes="+Si+"-"+Lr),Qi.responseType="arraybuffer",Qi.overrideMimeType&&Qi.overrideMimeType("text/plain; charset=x-user-defined"),Qi.send(null),!(Qi.status>=200&&Qi.status<300||Qi.status===304))throw new Error("Couldn't load "+oe+". Status: "+Qi.status);return Qi.response!==void 0?new Uint8Array(Qi.response||[]):Xr(Qi.responseText||"")},ii=this;ii.setDataGetter(Si=>{var Lr=Si*Ir,Qi=(Si+1)*Ir-1;if(Qi=Math.min(Qi,Lt-1),typeof ii.chunks[Si]>"u"&&(ii.chunks[Si]=$r(Lr,Qi)),typeof ii.chunks[Si]>"u")throw new Error("doXHR failed!");return ii.chunks[Si]}),(pr||!Lt)&&(Ir=Lt=1,Lt=this.getter(0).length,Ir=Lt,b("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=Lt,this._chunkSize=Ir,this.lengthKnown=!0}get length(){return this.lengthKnown||this.cacheLength(),this._length}get chunkSize(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}if(typeof XMLHttpRequest<"u"){throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var re,ce}else var ce={isDevice:!1,url:oe};var Ae=ue.createFile(z,J,ce,O,B);ce.contents?Ae.contents=ce.contents:ce.url&&(Ae.contents=null,Ae.url=ce.url),Object.defineProperties(Ae,{usedBytes:{get:function(){return this.contents.length}}});var Ie={},He=Object.keys(Ae.stream_ops);He.forEach(Tt=>{var mt=Ae.stream_ops[Tt];Ie[Tt]=(...Lt)=>(ue.forceLoadFile(Ae),mt(...Lt))});function at(Tt,mt,Lt,or,er){var pr=Tt.node.contents;if(er>=pr.length)return 0;var Ir=Math.min(pr.length-er,or);if(pr.slice)for(var $r=0;$r<Ir;$r++)mt[Lt+$r]=pr[er+$r];else for(var $r=0;$r<Ir;$r++)mt[Lt+$r]=pr.get(er+$r);return Ir}return Ie.read=(Tt,mt,Lt,or,er)=>(ue.forceLoadFile(Ae),at(Tt,mt,Lt,or,er)),Ie.mmap=(Tt,mt,Lt,or,er)=>{ue.forceLoadFile(Ae);var pr=ci();if(!pr)throw new ue.ErrnoError(48);return at(Tt,A,pr,mt,Lt),{ptr:pr,allocated:!0}},Ae.stream_ops=Ie,Ae}},ar=(z,J)=>(z>>>=0,z?ut(w,z,J):""),Bt={DEFAULT_POLLMASK:5,calculateAt(z,J,oe){if(qt.isAbs(J))return J;var O;if(z===-100)O=ue.cwd();else{var B=Bt.getStreamFromFD(z);O=B.path}if(J.length==0){if(!oe)throw new ue.ErrnoError(44);return O}return O+"/"+J},doStat(z,J,oe){var O=z(J);D[oe>>>2>>>0]=O.dev,D[oe+4>>>2>>>0]=O.mode,j[oe+8>>>2>>>0]=O.nlink,D[oe+12>>>2>>>0]=O.uid,D[oe+16>>>2>>>0]=O.gid,D[oe+20>>>2>>>0]=O.rdev,rt=[O.size>>>0,(qe=O.size,+Math.abs(qe)>=1?qe>0?+Math.floor(qe/4294967296)>>>0:~~+Math.ceil((qe-+(~~qe>>>0))/4294967296)>>>0:0)],D[oe+24>>>2>>>0]=rt[0],D[oe+28>>>2>>>0]=rt[1],D[oe+32>>>2>>>0]=4096,D[oe+36>>>2>>>0]=O.blocks;var B=O.atime.getTime(),X=O.mtime.getTime(),re=O.ctime.getTime();return rt=[Math.floor(B/1e3)>>>0,(qe=Math.floor(B/1e3),+Math.abs(qe)>=1?qe>0?+Math.floor(qe/4294967296)>>>0:~~+Math.ceil((qe-+(~~qe>>>0))/4294967296)>>>0:0)],D[oe+40>>>2>>>0]=rt[0],D[oe+44>>>2>>>0]=rt[1],j[oe+48>>>2>>>0]=B%1e3*1e3*1e3,rt=[Math.floor(X/1e3)>>>0,(qe=Math.floor(X/1e3),+Math.abs(qe)>=1?qe>0?+Math.floor(qe/4294967296)>>>0:~~+Math.ceil((qe-+(~~qe>>>0))/4294967296)>>>0:0)],D[oe+56>>>2>>>0]=rt[0],D[oe+60>>>2>>>0]=rt[1],j[oe+64>>>2>>>0]=X%1e3*1e3*1e3,rt=[Math.floor(re/1e3)>>>0,(qe=Math.floor(re/1e3),+Math.abs(qe)>=1?qe>0?+Math.floor(qe/4294967296)>>>0:~~+Math.ceil((qe-+(~~qe>>>0))/4294967296)>>>0:0)],D[oe+72>>>2>>>0]=rt[0],D[oe+76>>>2>>>0]=rt[1],j[oe+80>>>2>>>0]=re%1e3*1e3*1e3,rt=[O.ino>>>0,(qe=O.ino,+Math.abs(qe)>=1?qe>0?+Math.floor(qe/4294967296)>>>0:~~+Math.ceil((qe-+(~~qe>>>0))/4294967296)>>>0:0)],D[oe+88>>>2>>>0]=rt[0],D[oe+92>>>2>>>0]=rt[1],0},doMsync(z,J,oe,O,B){if(!ue.isFile(J.node.mode))throw new ue.ErrnoError(43);if(O&2)return 0;var X=w.slice(z,z+oe);ue.msync(J,X,B,oe,O)},getStreamFromFD(z){var J=ue.getStreamChecked(z);return J},varargs:void 0,getStr(z){var J=ar(z);return J}};function Ar(z,J,oe){oe>>>=0,Bt.varargs=oe;try{var O=Bt.getStreamFromFD(z);switch(J){case 0:{var B=Jt();if(B<0)return-28;for(;ue.streams[B];)B++;var X;return X=ue.dupStream(O,B),X.fd}case 1:case 2:return 0;case 3:return O.flags;case 4:{var B=Jt();return O.flags|=B,0}case 12:{var B=kr(),re=0;return L[B+re>>>1>>>0]=2,0}case 13:case 14:return 0}return-28}catch(ce){if(typeof ue>"u"||ce.name!=="ErrnoError")throw ce;return-ce.errno}}function br(z,J,oe){oe>>>=0,Bt.varargs=oe;try{var O=Bt.getStreamFromFD(z);switch(J){case 21509:return O.tty?0:-59;case 21505:{if(!O.tty)return-59;if(O.tty.ops.ioctl_tcgets){var B=O.tty.ops.ioctl_tcgets(O),X=kr();D[X>>>2>>>0]=B.c_iflag||0,D[X+4>>>2>>>0]=B.c_oflag||0,D[X+8>>>2>>>0]=B.c_cflag||0,D[X+12>>>2>>>0]=B.c_lflag||0;for(var re=0;re<32;re++)A[X+re+17>>>0]=B.c_cc[re]||0;return 0}return 0}case 21510:case 21511:case 21512:return O.tty?0:-59;case 21506:case 21507:case 21508:{if(!O.tty)return-59;if(O.tty.ops.ioctl_tcsets){for(var X=kr(),ce=D[X>>>2>>>0],Ae=D[X+4>>>2>>>0],Ie=D[X+8>>>2>>>0],He=D[X+12>>>2>>>0],at=[],re=0;re<32;re++)at.push(A[X+re+17>>>0]);return O.tty.ops.ioctl_tcsets(O.tty,J,{c_iflag:ce,c_oflag:Ae,c_cflag:Ie,c_lflag:He,c_cc:at})}return 0}case 21519:{if(!O.tty)return-59;var X=kr();return D[X>>>2>>>0]=0,0}case 21520:return O.tty?-28:-59;case 21531:{var X=kr();return ue.ioctl(O,J,X)}case 21523:{if(!O.tty)return-59;if(O.tty.ops.ioctl_tiocgwinsz){var Tt=O.tty.ops.ioctl_tiocgwinsz(O.tty),X=kr();L[X>>>1>>>0]=Tt[0],L[X+2>>>1>>>0]=Tt[1]}return 0}case 21524:return O.tty?0:-59;case 21515:return O.tty?0:-59;default:return-28}}catch(mt){if(typeof ue>"u"||mt.name!=="ErrnoError")throw mt;return-mt.errno}}function Br(z,J,oe,O){J>>>=0,O>>>=0,Bt.varargs=O;try{J=Bt.getStr(J),J=Bt.calculateAt(z,J);var B=O?Jt():0;return ue.open(J,oe,B).fd}catch(X){if(typeof ue>"u"||X.name!=="ErrnoError")throw X;return-X.errno}}function ai(z,J){z>>>=0,J>>>=0;try{return z=Bt.getStr(z),Bt.doStat(ue.stat,z,J)}catch(oe){if(typeof ue>"u"||oe.name!=="ErrnoError")throw oe;return-oe.errno}}var Nn=()=>Re(""),nt=(z,J)=>Object.defineProperty(J,"name",{value:z}),_o=[],si=[],ti,rr=z=>{throw new ti(z)},is=()=>si.length/2-5-_o.length,wa=()=>{si.push(0,1,void 0,1,null,1,!0,1,!1,1),s.count_emval_handles=is},q={toValue:z=>(z||rr("Cannot use deleted val. handle = "+z),si[z]),toHandle:z=>{switch(z){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const J=_o.pop()||si.length;return si[J]=z,si[J+1]=1,J}}}},te=(z,J)=>{var oe=nt(J,function(O){this.name=J,this.message=O;var B=new Error(O).stack;B!==void 0&&(this.stack=this.toString()+`
`+B.replace(/^Error(:[^\n]*)?\n/,""))});return oe.prototype=Object.create(z.prototype),oe.prototype.constructor=oe,oe.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},oe},fe,Ue=()=>{for(var z=new Array(256),J=0;J<256;++J)z[J]=String.fromCharCode(J);pt=z},pt,At=z=>{for(var J="",oe=z;w[oe>>>0];)J+=pt[w[oe++>>>0]];return J},cr={},Hr=(z,J)=>{for(J===void 0&&rr("ptr should not be undefined");z.baseClass;)J=z.upcast(J),z=z.baseClass;return J},Yi=(z,J,oe)=>{J=Hr(z,J),cr.hasOwnProperty(J)?rr(`Tried to register registered instance: ${J}`):cr[J]=oe},Fn={},No=z=>{var J=zs(z),oe=At(J);return bi(J),oe},Ms=(z,J)=>{var oe=Fn[z];return oe===void 0&&rr(`${J} has unknown type ${No(z)}`),oe},_a=(z,J)=>{J=Hr(z,J),cr.hasOwnProperty(J)?delete cr[J]:rr(`Tried to unregister unregistered instance: ${J}`)},Ua=z=>{},su=!1,Oa=z=>{z.smartPtr?z.smartPtrType.rawDestructor(z.smartPtr):z.ptrType.registeredClass.rawDestructor(z.ptr)},lu=z=>{z.count.value-=1;var J=z.count.value===0;J&&Oa(z)},Qs=(z,J,oe)=>{if(J===oe)return z;if(oe.baseClass===void 0)return null;var O=Qs(z,J,oe.baseClass);return O===null?null:oe.downcast(O)},bl={},Sl=(z,J)=>(J=Hr(z,J),cr[J]),uu,ys=z=>{throw new uu(z)},Fo=(z,J)=>{(!J.ptrType||!J.ptr)&&ys("makeClassHandle requires ptr and ptrType");var oe=!!J.smartPtrType,O=!!J.smartPtr;return oe!==O&&ys("Both smartPtrType and smartPtr must be specified"),J.count={value:1},Pa(Object.create(z,{$$:{value:J,writable:!0}}))};function Kc(z){var J=this.getPointee(z);if(!J)return this.destructor(z),null;var oe=Sl(this.registeredClass,J);if(oe!==void 0){if(oe.$$.count.value===0)return oe.$$.ptr=J,oe.$$.smartPtr=z,oe.clone();var O=oe.clone();return this.destructor(z),O}function B(){return this.isSmartPointer?Fo(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:J,smartPtrType:this,smartPtr:z}):Fo(this.registeredClass.instancePrototype,{ptrType:this,ptr:z})}var X=this.registeredClass.getActualType(J),re=bl[X];if(!re)return B.call(this);var ce;this.isConst?ce=re.constPointerType:ce=re.pointerType;var Ae=Qs(J,this.registeredClass,ce.registeredClass);return Ae===null?B.call(this):this.isSmartPointer?Fo(ce.registeredClass.instancePrototype,{ptrType:ce,ptr:Ae,smartPtrType:this,smartPtr:z}):Fo(ce.registeredClass.instancePrototype,{ptrType:ce,ptr:Ae})}var Pa=z=>typeof FinalizationRegistry>"u"?(Pa=J=>J,z):(su=new FinalizationRegistry(J=>{lu(J.$$)}),Pa=J=>{var oe=J.$$,O=!!oe.smartPtr;if(O){var B={$$:oe};su.register(J,B,J)}return J},Ua=J=>su.unregister(J),Pa(z));function vc(z,J,oe){z>>>=0,J>>>=0,oe>>>=0,z=At(z),J=Ms(J,"wrapper"),oe=q.toValue(oe);var O=J.registeredClass,B=O.instancePrototype,X=O.baseClass,re=X.instancePrototype,ce=O.baseClass.constructor,Ae=nt(z,function(...Ie){O.baseClass.pureVirtualFunctions.forEach((function(He){if(this[He]===re[He])throw new fe(`Pure virtual function ${He} must be implemented in JavaScript`)}).bind(this)),Object.defineProperty(this,"__parent",{value:B}),this.__construct(...Ie)});return B.__construct=function(...He){this===B&&rr("Pass correct 'this' to __construct");var at=ce.implement(this,...He);Ua(at);var Tt=at.$$;at.notifyOnDestruction(),Tt.preservePointerOnDelete=!0,Object.defineProperties(this,{$$:{value:Tt}}),Pa(this),Yi(O,Tt.ptr,this)},B.__destruct=function(){this===B&&rr("Pass correct 'this' to __destruct"),Ua(this),_a(O,this.$$.ptr)},Ae.prototype=Object.create(B),Object.assign(Ae.prototype,oe),q.toHandle(Ae)}function Ls(z,J,oe,O,B){}var ns={},el={},ao=(z,J,oe)=>{z.forEach(ce=>el[ce]=J);function O(ce){var Ae=oe(ce);Ae.length!==z.length&&ys("Mismatched type converter count");for(var Ie=0;Ie<z.length;++Ie)fo(z[Ie],Ae[Ie])}var B=new Array(J.length),X=[],re=0;J.forEach((ce,Ae)=>{Fn.hasOwnProperty(ce)?B[Ae]=Fn[ce]:(X.push(ce),ns.hasOwnProperty(ce)||(ns[ce]=[]),ns[ce].push(()=>{B[Ae]=Fn[ce],++re,re===X.length&&O(B)}))}),X.length===0&&O(B)};function ra(z,J,oe={}){var O=J.name;if(z||rr(`type "${O}" must have a positive integer typeid pointer`),Fn.hasOwnProperty(z)){if(oe.ignoreDuplicateRegistrations)return;rr(`Cannot register type '${O}' twice`)}if(Fn[z]=J,delete el[z],ns.hasOwnProperty(z)){var B=ns[z];delete ns[z],B.forEach(X=>X())}}function fo(z,J,oe={}){return ra(z,J,oe)}var Hn=8;function ks(z,J,oe,O){z>>>=0,J>>>=0,J=At(J),fo(z,{name:J,fromWireType:function(B){return!!B},toWireType:function(B,X){return X?oe:O},argPackAdvance:Hn,readValueFromPointer:function(B){return this.fromWireType(w[B>>>0])},destructorFunction:null})}var cu=z=>({count:z.count,deleteScheduled:z.deleteScheduled,preservePointerOnDelete:z.preservePointerOnDelete,ptr:z.ptr,ptrType:z.ptrType,smartPtr:z.smartPtr,smartPtrType:z.smartPtrType}),Yl=z=>{function J(oe){return oe.$$.ptrType.registeredClass.name}rr(J(z)+" instance already deleted")},yc=()=>{Object.assign(ia.prototype,{isAliasOf(z){if(!(this instanceof ia)||!(z instanceof ia))return!1;var J=this.$$.ptrType.registeredClass,oe=this.$$.ptr;z.$$=z.$$;for(var O=z.$$.ptrType.registeredClass,B=z.$$.ptr;J.baseClass;)oe=J.upcast(oe),J=J.baseClass;for(;O.baseClass;)B=O.upcast(B),O=O.baseClass;return J===O&&oe===B},clone(){if(this.$$.ptr||Yl(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var z=Pa(Object.create(Object.getPrototypeOf(this),{$$:{value:cu(this.$$)}}));return z.$$.count.value+=1,z.$$.deleteScheduled=!1,z},delete(){this.$$.ptr||Yl(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&rr("Object already scheduled for deletion"),Ua(this),lu(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Yl(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&rr("Object already scheduled for deletion"),this.$$.deleteScheduled=!0,this}})};function ia(){}var fa=(z,J,oe)=>{if(z[J].overloadTable===void 0){var O=z[J];z[J]=function(...B){return z[J].overloadTable.hasOwnProperty(B.length)||rr(`Function '${oe}' called with an invalid number of arguments (${B.length}) - expects one of (${z[J].overloadTable})!`),z[J].overloadTable[B.length].apply(this,B)},z[J].overloadTable=[],z[J].overloadTable[O.argCount]=O}},qo=(z,J,oe)=>{s.hasOwnProperty(z)?((oe===void 0||s[z].overloadTable!==void 0&&s[z].overloadTable[oe]!==void 0)&&rr(`Cannot register public name '${z}' twice`),fa(s,z,z),s[z].overloadTable.hasOwnProperty(oe)&&rr(`Cannot register multiple overloads of a function with the same number of arguments (${oe})!`),s[z].overloadTable[oe]=J):(s[z]=J,s[z].argCount=oe)},Zc=48,Iu=57,ms=z=>{z=z.replace(/[^a-zA-Z0-9_]/g,"$");var J=z.charCodeAt(0);return J>=Zc&&J<=Iu?`_${z}`:z};function jo(z,J,oe,O,B,X,re,ce){this.name=z,this.constructor=J,this.instancePrototype=oe,this.rawDestructor=O,this.baseClass=B,this.getActualType=X,this.upcast=re,this.downcast=ce,this.pureVirtualFunctions=[]}var zi=(z,J,oe)=>{for(;J!==oe;)J.upcast||rr(`Expected null or instance of ${oe.name}, got an instance of ${J.name}`),z=J.upcast(z),J=J.baseClass;return z};function on(z,J){if(J===null)return this.isReference&&rr(`null is not a valid ${this.name}`),0;J.$$||rr(`Cannot pass "${Sc(J)}" as a ${this.name}`),J.$$.ptr||rr(`Cannot pass deleted object as a pointer of type ${this.name}`);var oe=J.$$.ptrType.registeredClass,O=zi(J.$$.ptr,oe,this.registeredClass);return O}function du(z,J){var oe;if(J===null)return this.isReference&&rr(`null is not a valid ${this.name}`),this.isSmartPointer?(oe=this.rawConstructor(),z!==null&&z.push(this.rawDestructor,oe),oe):0;(!J||!J.$$)&&rr(`Cannot pass "${Sc(J)}" as a ${this.name}`),J.$$.ptr||rr(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&J.$$.ptrType.isConst&&rr(`Cannot convert argument of type ${J.$$.smartPtrType?J.$$.smartPtrType.name:J.$$.ptrType.name} to parameter type ${this.name}`);var O=J.$$.ptrType.registeredClass;if(oe=zi(J.$$.ptr,O,this.registeredClass),this.isSmartPointer)switch(J.$$.smartPtr===void 0&&rr("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:J.$$.smartPtrType===this?oe=J.$$.smartPtr:rr(`Cannot convert argument of type ${J.$$.smartPtrType?J.$$.smartPtrType.name:J.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:oe=J.$$.smartPtr;break;case 2:if(J.$$.smartPtrType===this)oe=J.$$.smartPtr;else{var B=J.clone();oe=this.rawShare(oe,q.toHandle(()=>B.delete())),z!==null&&z.push(this.rawDestructor,oe)}break;default:rr("Unsupporting sharing policy")}return oe}function me(z,J){if(J===null)return this.isReference&&rr(`null is not a valid ${this.name}`),0;J.$$||rr(`Cannot pass "${Sc(J)}" as a ${this.name}`),J.$$.ptr||rr(`Cannot pass deleted object as a pointer of type ${this.name}`),J.$$.ptrType.isConst&&rr(`Cannot convert argument of type ${J.$$.ptrType.name} to parameter type ${this.name}`);var oe=J.$$.ptrType.registeredClass,O=zi(J.$$.ptr,oe,this.registeredClass);return O}function Fe(z){return this.fromWireType(j[z>>>2>>>0])}var Ze=()=>{Object.assign(ft.prototype,{getPointee(z){return this.rawGetPointee&&(z=this.rawGetPointee(z)),z},destructor(z){var J;(J=this.rawDestructor)==null||J.call(this,z)},argPackAdvance:Hn,readValueFromPointer:Fe,fromWireType:Kc})};function ft(z,J,oe,O,B,X,re,ce,Ae,Ie,He){this.name=z,this.registeredClass=J,this.isReference=oe,this.isConst=O,this.isSmartPointer=B,this.pointeeType=X,this.sharingPolicy=re,this.rawGetPointee=ce,this.rawConstructor=Ae,this.rawShare=Ie,this.rawDestructor=He,!B&&J.baseClass===void 0?O?(this.toWireType=on,this.destructorFunction=null):(this.toWireType=me,this.destructorFunction=null):this.toWireType=du}var Mt=(z,J,oe)=>{s.hasOwnProperty(z)||ys("Replacing nonexistent public symbol"),s[z].overloadTable!==void 0&&oe!==void 0?s[z].overloadTable[oe]=J:(s[z]=J,s[z].argCount=oe)},nr=(z,J,oe)=>{z=z.replace(/p/g,"i");var O=s["dynCall_"+z];return O(J,...oe)},Ot,Ut=z=>Ot.get(z),Yr=(z,J,oe=[])=>{if(z.includes("j"))return nr(z,J,oe);var O=Ut(J)(...oe);return z[0]=="p"?O>>>0:O},Jr=(z,J)=>(...oe)=>Yr(z,J,oe),li=(z,J)=>{z=At(z);function oe(){return z.includes("j")||z.includes("p")?Jr(z,J):Ut(J)}var O=oe();return typeof O!="function"&&rr(`unknown function pointer with signature ${z}: ${J}`),O},Ci,Di=(z,J)=>{var oe=[],O={};function B(X){if(!O[X]&&!Fn[X]){if(el[X]){el[X].forEach(B);return}oe.push(X),O[X]=!0}}throw J.forEach(B),new Ci(`${z}: `+oe.map(No).join([", "]))};function za(z,J,oe,O,B,X,re,ce,Ae,Ie,He,at,Tt){z>>>=0,J>>>=0,oe>>>=0,O>>>=0,B>>>=0,X>>>=0,re>>>=0,ce>>>=0,Ae>>>=0,Ie>>>=0,He>>>=0,at>>>=0,Tt>>>=0,He=At(He),X=li(B,X),ce&&(ce=li(re,ce)),Ie&&(Ie=li(Ae,Ie)),Tt=li(at,Tt);var mt=ms(He);qo(mt,function(){Di(`Cannot construct ${He} due to unbound types`,[O])}),ao([z,J,oe],O?[O]:[],Lt=>{var Qi;Lt=Lt[0];var or,er;O?(or=Lt.registeredClass,er=or.instancePrototype):er=ia.prototype;var pr=nt(He,function(...Ri){if(Object.getPrototypeOf(this)!==Ir)throw new ti("Use 'new' to construct "+He);if($r.constructor_body===void 0)throw new ti(He+" has no accessible constructor");var Gr=$r.constructor_body[Ri.length];if(Gr===void 0)throw new ti(`Tried to invoke ctor of ${He} with invalid number of parameters (${Ri.length}) - expected (${Object.keys($r.constructor_body).toString()}) parameters instead!`);return Gr.apply(this,Ri)}),Ir=Object.create(er,{constructor:{value:pr}});pr.prototype=Ir;var $r=new jo(He,pr,Ir,Tt,or,X,ce,Ie);$r.baseClass&&((Qi=$r.baseClass).__derivedClasses??(Qi.__derivedClasses=[]),$r.baseClass.__derivedClasses.push($r));var ii=new ft(He,$r,!0,!1,!1),Si=new ft(He+"*",$r,!1,!1,!1),Lr=new ft(He+" const*",$r,!1,!0,!1);return bl[z]={pointerType:Si,constPointerType:Lr},Mt(mt,pr),[ii,Si,Lr]})}var ha=z=>{for(;z.length;){var J=z.pop(),oe=z.pop();oe(J)}};function Is(z){for(var J=1;J<z.length;++J)if(z[J]!==null&&z[J].destructorFunction===void 0)return!0;return!1}function tl(z,J,oe,O,B,X){var re=J.length;re<2&&rr("argTypes array size mismatch! Must at least get return value and 'this' types!");var ce=J[1]!==null&&oe!==null,Ae=Is(J),Ie=J[0].name!=="void",He=re-2,at=new Array(He),Tt=[],mt=[],Lt=function(...or){mt.length=0;var er;Tt.length=ce?2:1,Tt[0]=B,ce&&(er=J[1].toWireType(mt,this),Tt[1]=er);for(var pr=0;pr<He;++pr)at[pr]=J[pr+2].toWireType(mt,or[pr]),Tt.push(at[pr]);var Ir=O(...Tt);function $r(ii){if(Ae)ha(mt);else for(var Si=ce?1:2;Si<J.length;Si++){var Lr=Si===1?er:at[Si-2];J[Si].destructorFunction!==null&&J[Si].destructorFunction(Lr)}if(Ie)return J[0].fromWireType(ii)}return $r(Ir)};return nt(z,Lt)}var $l=(z,J)=>{for(var oe=[],O=0;O<z;O++)oe.push(j[J+O*4>>>2>>>0]);return oe},mc=z=>{z=z.trim();const J=z.indexOf("(");return J!==-1?z.substr(0,J):z},os=function(z,J,oe,O,B,X,re,ce,Ae){z>>>=0,J>>>=0,O>>>=0,B>>>=0,X>>>=0,re>>>=0;var Ie=$l(oe,O);J=At(J),J=mc(J),X=li(B,X),ao([],[z],He=>{He=He[0];var at=`${He.name}.${J}`;function Tt(){Di(`Cannot call ${at} due to unbound types`,Ie)}J.startsWith("@@")&&(J=Symbol[J.substring(2)]);var mt=He.registeredClass.constructor;return mt[J]===void 0?(Tt.argCount=oe-1,mt[J]=Tt):(fa(mt,J,at),mt[J].overloadTable[oe-1]=Tt),ao([],Ie,Lt=>{var or=[Lt[0],null].concat(Lt.slice(1)),er=tl(at,or,null,X,re);if(mt[J].overloadTable===void 0?(er.argCount=oe-1,mt[J]=er):mt[J].overloadTable[oe-1]=er,He.registeredClass.__derivedClasses)for(const pr of He.registeredClass.__derivedClasses)pr.constructor.hasOwnProperty(J)||(pr.constructor[J]=er);return[]}),[]})},Rp=function(z,J,oe,O,B,X){z>>>=0,oe>>>=0,O>>>=0,B>>>=0,X>>>=0;var re=$l(J,oe);B=li(O,B),ao([],[z],ce=>{ce=ce[0];var Ae=`constructor ${ce.name}`;if(ce.registeredClass.constructor_body===void 0&&(ce.registeredClass.constructor_body=[]),ce.registeredClass.constructor_body[J-1]!==void 0)throw new ti(`Cannot register multiple constructors with identical number of parameters (${J-1}) for class '${ce.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return ce.registeredClass.constructor_body[J-1]=()=>{Di(`Cannot construct ${ce.name} due to unbound types`,re)},ao([],re,Ie=>(Ie.splice(1,0,null),ce.registeredClass.constructor_body[J-1]=tl(Ae,Ie,null,B,X),[])),[]})},as=function(z,J,oe,O,B,X,re,ce,Ae,Ie){z>>>=0,J>>>=0,O>>>=0,B>>>=0,X>>>=0,re>>>=0;var He=$l(oe,O);J=At(J),J=mc(J),X=li(B,X),ao([],[z],at=>{at=at[0];var Tt=`${at.name}.${J}`;J.startsWith("@@")&&(J=Symbol[J.substring(2)]),ce&&at.registeredClass.pureVirtualFunctions.push(J);function mt(){Di(`Cannot call ${Tt} due to unbound types`,He)}var Lt=at.registeredClass.instancePrototype,or=Lt[J];return or===void 0||or.overloadTable===void 0&&or.className!==at.name&&or.argCount===oe-2?(mt.argCount=oe-2,mt.className=at.name,Lt[J]=mt):(fa(Lt,J,Tt),Lt[J].overloadTable[oe-2]=mt),ao([],He,er=>{var pr=tl(Tt,er,at,X,re);return Lt[J].overloadTable===void 0?(pr.argCount=oe-2,Lt[J]=pr):Lt[J].overloadTable[oe-2]=pr,[]}),[]})},qd=(z,J,oe)=>(z instanceof Object||rr(`${oe} with invalid "this": ${z}`),z instanceof J.registeredClass.constructor||rr(`${oe} incompatible with "this" of type ${z.constructor.name}`),z.$$.ptr||rr(`cannot call emscripten binding method ${oe} on deleted object`),zi(z.$$.ptr,z.$$.ptrType.registeredClass,J.registeredClass)),bc=function(z,J,oe,O,B,X,re,ce,Ae,Ie){z>>>=0,J>>>=0,oe>>>=0,O>>>=0,B>>>=0,X>>>=0,re>>>=0,ce>>>=0,Ae>>>=0,Ie>>>=0,J=At(J),B=li(O,B),ao([],[z],He=>{He=He[0];var at=`${He.name}.${J}`,Tt={get(){Di(`Cannot access ${at} due to unbound types`,[oe,re])},enumerable:!0,configurable:!0};return Ae?Tt.set=()=>Di(`Cannot access ${at} due to unbound types`,[oe,re]):Tt.set=mt=>rr(at+" is a read-only property"),Object.defineProperty(He.registeredClass.instancePrototype,J,Tt),ao([],Ae?[oe,re]:[oe],mt=>{var Lt=mt[0],or={get(){var pr=qd(this,He,at+" getter");return Lt.fromWireType(B(X,pr))},enumerable:!0};if(Ae){Ae=li(ce,Ae);var er=mt[1];or.set=function(pr){var Ir=qd(this,He,at+" setter"),$r=[];Ae(Ie,Ir,er.toWireType($r,pr)),ha($r)}}return Object.defineProperty(He.registeredClass.instancePrototype,J,or),[]}),[]})};function Da(z){z>>>=0,z>9&&--si[z+1]===0&&(si[z]=void 0,_o.push(z))}var Xd={name:"emscripten::val",fromWireType:z=>{var J=q.toValue(z);return Da(z),J},toWireType:(z,J)=>q.toHandle(J),argPackAdvance:Hn,readValueFromPointer:Fe,destructorFunction:null};function Jc(z){return z>>>=0,fo(z,Xd)}var ho=(z,J,oe)=>{switch(J){case 1:return oe?function(O){return this.fromWireType(A[O>>>0])}:function(O){return this.fromWireType(w[O>>>0])};case 2:return oe?function(O){return this.fromWireType(L[O>>>1>>>0])}:function(O){return this.fromWireType(k[O>>>1>>>0])};case 4:return oe?function(O){return this.fromWireType(D[O>>>2>>>0])}:function(O){return this.fromWireType(j[O>>>2>>>0])};default:throw new TypeError(`invalid integer width (${J}): ${z}`)}};function fu(z,J,oe,O){z>>>=0,J>>>=0,oe>>>=0,J=At(J);function B(){}B.values={},fo(z,{name:J,constructor:B,fromWireType:function(X){return this.constructor.values[X]},toWireType:(X,re)=>re.value,argPackAdvance:Hn,readValueFromPointer:ho(J,oe,O),destructorFunction:null}),qo(J,B)}function kf(z,J,oe){z>>>=0,J>>>=0;var O=Ms(z,"enum");J=At(J);var B=O.constructor,X=Object.create(O.constructor.prototype,{value:{value:oe},constructor:{value:nt(`${O.name}_${J}`,function(){})}});B.values[oe]=X,B[J]=X}var Sc=z=>{if(z===null)return"null";var J=typeof z;return J==="object"||J==="array"||J==="function"?z.toString():""+z},If=(z,J)=>{switch(J){case 4:return function(oe){return this.fromWireType(N[oe>>>2>>>0])};case 8:return function(oe){return this.fromWireType(V[oe>>>3>>>0])};default:throw new TypeError(`invalid float width (${J}): ${z}`)}},Mp=function(z,J,oe){z>>>=0,J>>>=0,oe>>>=0,J=At(J),fo(z,{name:J,fromWireType:O=>O,toWireType:(O,B)=>B,argPackAdvance:Hn,readValueFromPointer:If(J,oe),destructorFunction:null})};function Lp(z,J,oe,O,B,X,re,ce){z>>>=0,oe>>>=0,O>>>=0,B>>>=0,X>>>=0;var Ae=$l(J,oe);z=At(z),z=mc(z),B=li(O,B),qo(z,function(){Di(`Cannot call ${z} due to unbound types`,Ae)},J-1),ao([],Ae,Ie=>{var He=[Ie[0],null].concat(Ie.slice(1));return Mt(z,tl(z,He,null,B,X),J-1),[]})}var Kd=(z,J,oe)=>{switch(J){case 1:return oe?O=>A[O>>>0]:O=>w[O>>>0];case 2:return oe?O=>L[O>>>1>>>0]:O=>k[O>>>1>>>0];case 4:return oe?O=>D[O>>>2>>>0]:O=>j[O>>>2>>>0];default:throw new TypeError(`invalid integer width (${J}): ${z}`)}};function _c(z,J,oe,O,B){z>>>=0,J>>>=0,oe>>>=0,J=At(J);var X=He=>He;if(O===0){var re=32-8*oe;X=He=>He<<re>>>re}var ce=J.includes("unsigned"),Ae=(He,at)=>{},Ie;ce?Ie=function(He,at){return Ae(at,this.name),at>>>0}:Ie=function(He,at){return Ae(at,this.name),at},fo(z,{name:J,fromWireType:X,toWireType:Ie,argPackAdvance:Hn,readValueFromPointer:Kd(J,oe,O!==0),destructorFunction:null})}function Zd(z,J,oe){z>>>=0,oe>>>=0;var O=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],B=O[J];function X(re){var ce=j[re>>>2>>>0],Ae=j[re+4>>>2>>>0];return new B(A.buffer,Ae,ce)}oe=At(oe),fo(z,{name:oe,fromWireType:X,argPackAdvance:Hn,readValueFromPointer:X},{ignoreDuplicateRegistrations:!0})}var Ti=(z,J,oe)=>wr(z,w,J,oe);function Dh(z,J){z>>>=0,J>>>=0,J=At(J),fo(z,{name:J,fromWireType(oe){for(var O=j[oe>>>2>>>0],B=oe+4,X,re,ce=B,re=0;re<=O;++re){var Ae=B+re;if(re==O||w[Ae>>>0]==0){var Ie=Ae-ce,He=ar(ce,Ie);X===void 0?X=He:(X+="\0",X+=He),ce=Ae+1}}return bi(oe),X},toWireType(oe,O){O instanceof ArrayBuffer&&(O=new Uint8Array(O));var B,X=typeof O=="string";X||O instanceof Uint8Array||O instanceof Uint8ClampedArray||O instanceof Int8Array||rr("Cannot pass non-string to std::string"),X?B=Qt(O):B=O.length;var re=di(4+B+1),ce=re+4;if(j[re>>>2>>>0]=B,X)Ti(O,ce,B+1);else if(X)for(var Ae=0;Ae<B;++Ae){var Ie=O.charCodeAt(Ae);Ie>255&&(bi(ce),rr("String has UTF-16 code units that do not fit in 8 bits")),w[ce+Ae>>>0]=Ie}else for(var Ae=0;Ae<B;++Ae)w[ce+Ae>>>0]=O[Ae];return oe!==null&&oe.push(bi,re),re},argPackAdvance:Hn,readValueFromPointer:Fe,destructorFunction(oe){bi(oe)}})}var Qc=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,ed=(z,J)=>{for(var oe=z,O=oe>>1,B=O+J/2;!(O>=B)&&k[O>>>0];)++O;if(oe=O<<1,oe-z>32&&Qc)return Qc.decode(w.subarray(z>>>0,oe>>>0));for(var X="",re=0;!(re>=J/2);++re){var ce=L[z+re*2>>>1>>>0];if(ce==0)break;X+=String.fromCharCode(ce)}return X},hu=(z,J,oe)=>{if(oe??(oe=2147483647),oe<2)return 0;oe-=2;for(var O=J,B=oe<z.length*2?oe/2:z.length,X=0;X<B;++X){var re=z.charCodeAt(X);L[J>>>1>>>0]=re,J+=2}return L[J>>>1>>>0]=0,J-O},td=z=>z.length*2,Jd=(z,J)=>{for(var oe=0,O="";!(oe>=J/4);){var B=D[z+oe*4>>>2>>>0];if(B==0)break;if(++oe,B>=65536){var X=B-65536;O+=String.fromCharCode(55296|X>>10,56320|X&1023)}else O+=String.fromCharCode(B)}return O},Nf=(z,J,oe)=>{if(J>>>=0,oe??(oe=2147483647),oe<4)return 0;for(var O=J,B=O+oe-4,X=0;X<z.length;++X){var re=z.charCodeAt(X);if(re>=55296&&re<=57343){var ce=z.charCodeAt(++X);re=65536+((re&1023)<<10)|ce&1023}if(D[J>>>2>>>0]=re,J+=4,J+4>B)break}return D[J>>>2>>>0]=0,J-O},Nu=z=>{for(var J=0,oe=0;oe<z.length;++oe){var O=z.charCodeAt(oe);O>=55296&&O<=57343&&++oe,J+=4}return J},Fu=function(z,J,oe){z>>>=0,J>>>=0,oe>>>=0,oe=At(oe);var O,B,X,re;J===2?(O=ed,B=hu,re=td,X=ce=>k[ce>>>1>>>0]):J===4&&(O=Jd,B=Nf,re=Nu,X=ce=>j[ce>>>2>>>0]),fo(z,{name:oe,fromWireType:ce=>{for(var Ae=j[ce>>>2>>>0],Ie,He=ce+4,at=0;at<=Ae;++at){var Tt=ce+4+at*J;if(at==Ae||X(Tt)==0){var mt=Tt-He,Lt=O(He,mt);Ie===void 0?Ie=Lt:(Ie+="\0",Ie+=Lt),He=Tt+J}}return bi(ce),Ie},toWireType:(ce,Ae)=>{typeof Ae!="string"&&rr(`Cannot pass non-string to C++ string type ${oe}`);var Ie=re(Ae),He=di(4+Ie+J);return j[He>>>2>>>0]=Ie/J,B(Ae,He+4,Ie+J),ce!==null&&ce.push(bi,He),He},argPackAdvance:Hn,readValueFromPointer:Fe,destructorFunction(ce){bi(ce)}})},Rh=function(z,J){z>>>=0,J>>>=0,J=At(J),fo(z,{isVoid:!0,name:J,argPackAdvance:0,fromWireType:()=>{},toWireType:(oe,O)=>{}})};function ju(z){if(Xo.xhrs.has(z)){var J=Xo.xhrs.get(z);Xo.xhrs.free(z),J.readyState>0&&J.readyState<4&&J.abort()}}var bs=()=>{throw 1/0},Ff={},rd=z=>{var J=Ff[z];return J===void 0?At(z):J},ql=[];function jf(z,J,oe,O,B){return z>>>=0,J>>>=0,oe>>>=0,O>>>=0,B>>>=0,z=ql[z],J=q.toValue(J),oe=rd(oe),z(J,J[oe],O,B)}var id=z=>{var J=ql.length;return ql.push(z),J},_l=(z,J)=>{for(var oe=new Array(z),O=0;O<z;++O)oe[O]=Ms(j[J+O*4>>>2>>>0],"parameter "+O);return oe},jn=Reflect.construct,Pl=(z,J,oe)=>{var O=[],B=z.toWireType(O,oe);return O.length&&(j[J>>>2>>>0]=q.toHandle(O)),B},Ra=function(z,J,oe){J>>>=0;var O=_l(z,J),B=O.shift();z--;var X=new Array(z),re=(Ae,Ie,He,at)=>{for(var Tt=0,mt=0;mt<z;++mt)X[mt]=O[mt].readValueFromPointer(at+Tt),Tt+=O[mt].argPackAdvance;var Lt=oe===1?jn(Ie,X):Ie.apply(Ae,X);return Pl(B,He,Lt)},ce=`methodCaller<(${O.map(Ae=>Ae.name).join(", ")}) => ${B.name}>`;return id(nt(ce,re))};function Ma(z){z>>>=0;var J=q.toValue(z);ha(J),Da(z)}function Bf(z,J){z>>>=0,J>>>=0,z=Ms(z,"_emval_take_value");var oe=z.readValueFromPointer(J);return q.toHandle(oe)}var Qd=z=>z%4===0&&(z%100!==0||z%400===0),ef=[0,31,60,91,121,152,182,213,244,274,305,335],Vf=[0,31,59,90,120,151,181,212,243,273,304,334],Xl=z=>{var J=Qd(z.getFullYear()),oe=J?ef:Vf,O=oe[z.getMonth()]+z.getDate()-1;return O};function tf(z,J,oe){var O=Vt(z,J);oe>>>=0;var B=new Date(O*1e3);D[oe>>>2>>>0]=B.getSeconds(),D[oe+4>>>2>>>0]=B.getMinutes(),D[oe+8>>>2>>>0]=B.getHours(),D[oe+12>>>2>>>0]=B.getDate(),D[oe+16>>>2>>>0]=B.getMonth(),D[oe+20>>>2>>>0]=B.getFullYear()-1900,D[oe+24>>>2>>>0]=B.getDay();var X=Xl(B)|0;D[oe+28>>>2>>>0]=X,D[oe+36>>>2>>>0]=-(B.getTimezoneOffset()*60);var re=new Date(B.getFullYear(),0,1),ce=new Date(B.getFullYear(),6,1).getTimezoneOffset(),Ae=re.getTimezoneOffset(),Ie=(ce!=Ae&&B.getTimezoneOffset()==Math.min(Ae,ce))|0;D[oe+32>>>2>>>0]=Ie}var kp=function(z,J,oe,O){z>>>=0,J>>>=0,oe>>>=0,O>>>=0;var B=new Date().getFullYear(),X=new Date(B,0,1),re=new Date(B,6,1),ce=X.getTimezoneOffset(),Ae=re.getTimezoneOffset(),Ie=Math.max(ce,Ae);j[z>>>2>>>0]=Ie*60,D[J>>>2>>>0]=+(ce!=Ae);var He=mt=>{var Lt=mt>=0?"-":"+",or=Math.abs(mt),er=String(Math.floor(or/60)).padStart(2,"0"),pr=String(or%60).padStart(2,"0");return`UTC${Lt}${er}${pr}`},at=He(ce),Tt=He(Ae);Ae<ce?(Ti(at,oe,17),Ti(Tt,O,17)):(Ti(at,O,17),Ti(Tt,oe,17))},nd=()=>performance.now(),Mh=()=>Date.now(),Bu=z=>z>=0&&z<=3;function ze(z,J,oe,O){if(O>>>=0,!Bu(z))return 28;var B;z===0?B=Mh():B=nd();var X=Math.round(B*1e3*1e3);return rt=[X>>>0,(qe=X,+Math.abs(qe)>=1?qe>0?+Math.floor(qe/4294967296)>>>0:~~+Math.ceil((qe-+(~~qe>>>0))/4294967296)>>>0:0)],D[O>>>2>>>0]=rt[0],D[O+4>>>2>>>0]=rt[1],0}var se=[],ye=(z,J)=>{se.length=0;for(var oe;oe=w[z++>>>0];){var O=oe!=105;O&=oe!=112,J+=O&&J%8?4:0,se.push(oe==112?j[J>>>2>>>0]:oe==105?D[J>>>2>>>0]:V[J>>>3>>>0]),J+=O?8:4}return se},ge=(z,J,oe)=>{var O=ye(J,oe);return St[z](...O)};function Ce(z,J,oe){return z>>>=0,J>>>=0,oe>>>=0,ge(z,J,oe)}var Me=(z,J)=>{if(Rt.timingMode=z,Rt.timingValue=J,!Rt.func)return 1;if(Rt.running||(Rt.running=!0),z==0)Rt.scheduler=function(){var re=Math.max(0,Rt.tickStartTime+J-nd())|0;setTimeout(Rt.runner,re)},Rt.method="timeout";else if(z==1)Rt.scheduler=function(){Rt.requestAnimationFrame(Rt.runner)},Rt.method="rAF";else if(z==2){if(typeof Rt.setImmediate>"u")if(typeof setImmediate>"u"){var oe=[],O="setimmediate",B=X=>{(X.data===O||X.data.target===O)&&(X.stopPropagation(),oe.shift()())};addEventListener("message",B,!0),Rt.setImmediate=X=>{oe.push(X),postMessage(O,"*")}}else Rt.setImmediate=setImmediate;Rt.scheduler=function(){Rt.setImmediate(Rt.runner)},Rt.method="immediate"}return 0},Ne=0,lt=()=>ct||Ne>0,Ve=z=>{var J;x=z,lt()||((J=s.onExit)==null||J.call(s,z),T=!0),p(z,new It(z))},it=(z,J)=>{x=z,Ve(z)},Je=it,ht=z=>{if(z instanceof It||z=="unwind")return x;p(1,z)},Nt=()=>{if(!lt())try{Je(x)}catch(z){ht(z)}},fr=(z,J,oe,O,B)=>{Rt.func=z,Rt.arg=O;var X=Rt.currentlyRunningMainloop;function re(){return X<Rt.currentlyRunningMainloop?(Nt(),!1):!0}if(Rt.running=!1,Rt.runner=function(){if(!T){if(Rt.queue.length>0){var Ae=Rt.queue.shift();if(Ae.func(Ae.arg),Rt.remainingBlockers){var Ie=Rt.remainingBlockers,He=Ie%1==0?Ie-1:Math.floor(Ie);Ae.counted?Rt.remainingBlockers=He:(He=He+.5,Rt.remainingBlockers=(8*Ie+He)/9)}if(Rt.updateStatus(),!re())return;setTimeout(Rt.runner,0);return}if(re()){if(Rt.currentFrameNumber=Rt.currentFrameNumber+1|0,Rt.timingMode==1&&Rt.timingValue>1&&Rt.currentFrameNumber%Rt.timingValue!=0){Rt.scheduler();return}else Rt.timingMode==0&&(Rt.tickStartTime=nd());Rt.runIter(z),re()&&Rt.scheduler()}}},B||(J&&J>0?Me(0,1e3/J):Me(1,1),Rt.scheduler()),oe)throw"unwind"},Or=z=>{if(!T)try{z(),Nt()}catch(J){ht(J)}},Rt={running:!1,scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],preMainLoop:[],postMainLoop:[],pause(){Rt.scheduler=null,Rt.currentlyRunningMainloop++},resume(){Rt.currentlyRunningMainloop++;var z=Rt.timingMode,J=Rt.timingValue,oe=Rt.func;Rt.func=null,fr(oe,0,!1,Rt.arg,!0),Me(z,J),Rt.scheduler()},updateStatus(){if(s.setStatus){var z=s.statusMessage||"Please wait...",J=Rt.remainingBlockers??0,oe=Rt.expectedBlockers??0;J?J<oe?s.setStatus("{message} ({expected - remaining}/{expected})"):s.setStatus(z):s.setStatus("")}},init(){s.preMainLoop&&Rt.preMainLoop.push(s.preMainLoop),s.postMainLoop&&Rt.postMainLoop.push(s.postMainLoop)},runIter(z){if(!T){for(var J of Rt.preMainLoop)if(J()===!1)return;Or(z);for(var oe of Rt.postMainLoop)oe()}},nextRAF:0,fakeRequestAnimationFrame(z){var J=Date.now();if(Rt.nextRAF===0)Rt.nextRAF=J+1e3/60;else for(;J+2>=Rt.nextRAF;)Rt.nextRAF+=1e3/60;var oe=Math.max(Rt.nextRAF-J,0);setTimeout(z,oe)},requestAnimationFrame(z){if(typeof requestAnimationFrame=="function"){requestAnimationFrame(z);return}var J=Rt.fakeRequestAnimationFrame;J(z)}},ur=()=>{Rt.pause(),Rt.func=null},so=()=>{ct=!1,Ne=0},qn=z=>{so(),Je(z)},rl=()=>!0,rf=()=>4294901760,Vu=z=>{var J=C.buffer,oe=(z-J.byteLength+65535)/65536|0;try{return C.grow(oe),W(),1}catch{}};function od(z){z>>>=0;var J=w.length,oe=rf();if(z>oe)return!1;for(var O=1;O<=4;O*=2){var B=J*(1+.2/O);B=Math.min(B,z+100663296);var X=Math.min(oe,Ur(Math.max(z,B),65536)),re=Vu(X);if(re)return!0}return!1}function ad(z,J,oe){z>>>=0;var O=Ut(z);fr(O,J,oe)}class yn{constructor(){To(this,"allocated",[void 0]);To(this,"freelist",[])}get(J){return this.allocated[J]}has(J){return this.allocated[J]!==void 0}allocate(J){var oe=this.freelist.pop()||this.allocated.length;return this.allocated[oe]=J,oe}free(J){this.allocated[J]=void 0,this.freelist.push(J)}}var Xo={openDatabase(z,J,oe,O){try{var B=indexedDB.open(z,J)}catch(X){return O(X)}B.onupgradeneeded=X=>{var re=X.target.result;re.objectStoreNames.contains("FILES")&&re.deleteObjectStore("FILES"),re.createObjectStore("FILES")},B.onsuccess=X=>oe(X.target.result),B.onerror=O},init(){Xo.xhrs=new yn;var z=oe=>{Xo.dbInstance=oe,Ee()},J=()=>{Xo.dbInstance=!1,Ee()};Pe(),Xo.openDatabase("emscripten_filesystem",1,z,J)}};function ro(z,J,oe,O,B){var X=j[z+8>>>2>>>0];if(!X){oe(z,0,"no url specified!");return}var re=ar(X),ce=z+108,Ae=ar(ce+0);Ae||(Ae="GET");var Ie=j[ce+56>>>2>>>0],He=j[ce+68>>>2>>>0],at=j[ce+72>>>2>>>0],Tt=j[ce+76>>>2>>>0],mt=j[ce+80>>>2>>>0],Lt=j[ce+84>>>2>>>0],or=j[ce+88>>>2>>>0],er=j[ce+52>>>2>>>0],pr=!!(er&1),Ir=!!(er&2),$r=!!(er&64),ii=He?ar(He):void 0,Si=at?ar(at):void 0,Lr=new XMLHttpRequest;if(Lr.withCredentials=!!w[ce+60>>>0],Lr.open(Ae,re,!$r,ii,Si),$r||(Lr.timeout=Ie),Lr.url_=re,Lr.responseType="arraybuffer",mt){var Qi=ar(mt);Lr.overrideMimeType(Qi)}if(Tt)for(;;){var Ri=j[Tt>>>2>>>0];if(!Ri)break;var Gr=j[Tt+4>>>2>>>0];if(!Gr)break;Tt+=8;var Pi=ar(Ri),Ca=ar(Gr);Lr.setRequestHeader(Pi,Ca)}var Bo=Xo.xhrs.allocate(Lr);j[z>>>2>>>0]=Bo;var go=Lt&&or?w.slice(Lt,Lt+or):null;function _s(){var rn=0,Ps=0;Lr.response&&pr&&j[z+12>>>2>>>0]===0&&(Ps=Lr.response.byteLength),Ps>0&&(rn=di(Ps),w.set(new Uint8Array(Lr.response),rn>>>0)),j[z+12>>>2>>>0]=rn,Xn(z+16,Ps),Xn(z+24,0);var ls=Lr.response?Lr.response.byteLength:0;ls&&Xn(z+32,ls),L[z+40>>>1>>>0]=Lr.readyState,L[z+42>>>1>>>0]=Lr.status,Lr.statusText&&Ti(Lr.statusText,z+44,64)}Lr.onload=rn=>{Xo.xhrs.has(Bo)&&(_s(),Lr.status>=200&&Lr.status<300?J==null||J(z,Lr,rn):oe==null||oe(z,Lr,rn))},Lr.onerror=rn=>{Xo.xhrs.has(Bo)&&(_s(),oe==null||oe(z,Lr,rn))},Lr.ontimeout=rn=>{Xo.xhrs.has(Bo)&&(oe==null||oe(z,Lr,rn))},Lr.onprogress=rn=>{if(Xo.xhrs.has(Bo)){var Ps=pr&&Ir&&Lr.response?Lr.response.byteLength:0,ls=0;Ps>0&&pr&&Ir&&(ls=di(Ps),w.set(new Uint8Array(Lr.response),ls>>>0)),j[z+12>>>2>>>0]=ls,Xn(z+16,Ps),Xn(z+24,rn.loaded-Ps),Xn(z+32,rn.total),L[z+40>>>1>>>0]=Lr.readyState,Lr.readyState>=3&&Lr.status===0&&rn.loaded>0&&(Lr.status=200),L[z+42>>>1>>>0]=Lr.status,Lr.statusText&&Ti(Lr.statusText,z+44,64),O==null||O(z,Lr,rn),ls&&bi(ls)}},Lr.onreadystatechange=rn=>{Xo.xhrs.has(Bo)&&(L[z+40>>>1>>>0]=Lr.readyState,Lr.readyState>=2&&(L[z+42>>>1>>>0]=Lr.status),B==null||B(z,Lr,rn))};try{Lr.send(go)}catch(rn){oe==null||oe(z,Lr,rn)}}var Xn=(z,J)=>{j[z>>>2>>>0]=J;var oe=j[z>>>2>>>0];j[z+4>>>2>>>0]=(J-oe)/4294967296};function Un(z,J,oe,O,B){if(!z){B(J,0,"IndexedDB not available!");return}var X=J+108,re=j[X+64>>>2>>>0];re||(re=j[J+8>>>2>>>0]);var ce=ar(re);try{var Ae=z.transaction(["FILES"],"readwrite"),Ie=Ae.objectStore("FILES"),He=Ie.put(oe,ce);He.onsuccess=at=>{L[J+40>>>1>>>0]=4,L[J+42>>>1>>>0]=200,Ti("OK",J+44,64),O(J,0,ce)},He.onerror=at=>{L[J+40>>>1>>>0]=4,L[J+42>>>1>>>0]=413,Ti("Payload Too Large",J+44,64),B(J,0,at)}}catch(at){B(J,0,at)}}function Ns(z,J,oe,O){if(!z){O(J,0,"IndexedDB not available!");return}var B=J+108,X=j[B+64>>>2>>>0];X||(X=j[J+8>>>2>>>0]);var re=ar(X);try{var ce=z.transaction(["FILES"],"readonly"),Ae=ce.objectStore("FILES"),Ie=Ae.get(re);Ie.onsuccess=He=>{if(He.target.result){var at=He.target.result,Tt=at.byteLength||at.length,mt=di(Tt);w.set(new Uint8Array(at),mt>>>0),j[J+12>>>2>>>0]=mt,Xn(J+16,Tt),Xn(J+24,0),Xn(J+32,Tt),L[J+40>>>1>>>0]=4,L[J+42>>>1>>>0]=200,Ti("OK",J+44,64),oe(J,0,at)}else L[J+40>>>1>>>0]=4,L[J+42>>>1>>>0]=404,Ti("Not Found",J+44,64),O(J,0,"no data")},Ie.onerror=He=>{L[J+40>>>1>>>0]=4,L[J+42>>>1>>>0]=404,Ti("Not Found",J+44,64),O(J,0,He)}}catch(He){O(J,0,He)}}function La(z,J,oe,O){if(!z){O(J,0,"IndexedDB not available!");return}var B=J+108,X=j[B+64>>>2>>>0];X||(X=j[J+8>>>2>>>0]);var re=ar(X);try{var ce=z.transaction(["FILES"],"readwrite"),Ae=ce.objectStore("FILES"),Ie=Ae.delete(re);Ie.onsuccess=He=>{var at=He.target.result;j[J+12>>>2>>>0]=0,Xn(J+16,0),Xn(J+24,0),Xn(J+32,0),L[J+40>>>1>>>0]=4,L[J+42>>>1>>>0]=200,Ti("OK",J+44,64),oe(J,0,at)},Ie.onerror=He=>{L[J+40>>>1>>>0]=4,L[J+42>>>1>>>0]=404,Ti("Not Found",J+44,64),O(J,0,He)}}catch(He){O(J,0,He)}}function sd(z,J,oe,O,B){z>>>=0;var X=z+108,re=j[X+36>>>2>>>0],ce=j[X+40>>>2>>>0],Ae=j[X+44>>>2>>>0],Ie=j[X+48>>>2>>>0],He=j[X+52>>>2>>>0],at=!!(He&64);function Tt(Pi){at?Pi():Or(Pi)}var mt=(Pi,Ca,Bo)=>{Tt(()=>{re?Ut(re)(Pi):J==null||J(Pi)})},Lt=(Pi,Ca,Bo)=>{Tt(()=>{Ae?Ut(Ae)(Pi):O==null||O(Pi)})},or=(Pi,Ca,Bo)=>{Tt(()=>{ce?Ut(ce)(Pi):oe==null||oe(Pi)})},er=(Pi,Ca,Bo)=>{Tt(()=>{Ie?Ut(Ie)(Pi):B==null||B(Pi)})},pr=(Pi,Ca,Bo)=>{ro(Pi,mt,or,Lt,er)},Ir=(Pi,Ca,Bo)=>{var go=(rn,Ps,ls)=>{Tt(()=>{re?Ut(re)(rn):J==null||J(rn)})},_s=(rn,Ps,ls)=>{Tt(()=>{re?Ut(re)(rn):J==null||J(rn)})};Un(Xo.dbInstance,Pi,Ca.response,go,_s)},$r=(Pi,Ca,Bo)=>{ro(Pi,Ir,or,Lt,er)},ii=ar(X+0),Si=!!(He&16),Lr=!!(He&4),Qi=!!(He&32);if(ii==="EM_IDB_STORE"){var Ri=j[X+84>>>2>>>0],Gr=j[X+88>>>2>>>0];Un(Xo.dbInstance,z,w.slice(Ri,Ri+Gr),mt,or)}else if(ii==="EM_IDB_DELETE")La(Xo.dbInstance,z,mt,or);else if(!Si)Ns(Xo.dbInstance,z,mt,Qi?or:Lr?$r:pr);else if(!Qi)ro(z,Lr?Ir:mt,or,Lt,er);else return 0;return z}var Tr,ld=z=>{var J=z.getExtension("ANGLE_instanced_arrays");if(J)return z.vertexAttribDivisor=(oe,O)=>J.vertexAttribDivisorANGLE(oe,O),z.drawArraysInstanced=(oe,O,B,X)=>J.drawArraysInstancedANGLE(oe,O,B,X),z.drawElementsInstanced=(oe,O,B,X,re)=>J.drawElementsInstancedANGLE(oe,O,B,X,re),1},Lh=z=>{var J=z.getExtension("OES_vertex_array_object");if(J)return z.createVertexArray=()=>J.createVertexArrayOES(),z.deleteVertexArray=oe=>J.deleteVertexArrayOES(oe),z.bindVertexArray=oe=>J.bindVertexArrayOES(oe),z.isVertexArray=oe=>J.isVertexArrayOES(oe),1},Er=z=>{var J=z.getExtension("WEBGL_draw_buffers");if(J)return z.drawBuffers=(oe,O)=>J.drawBuffersWEBGL(oe,O),1},Ip=z=>!!(z.dibvbi=z.getExtension("WEBGL_draw_instanced_base_vertex_base_instance")),Hf=z=>!!(z.mdibvbi=z.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance")),Hu=z=>!!(z.extPolygonOffsetClamp=z.getExtension("EXT_polygon_offset_clamp")),Ng=z=>!!(z.extClipControl=z.getExtension("EXT_clip_control")),Wa=z=>!!(z.webglPolygonMode=z.getExtension("WEBGL_polygon_mode")),Uu=z=>!!(z.multiDrawWebgl=z.getExtension("WEBGL_multi_draw")),il=z=>{var J=["ANGLE_instanced_arrays","EXT_blend_minmax","EXT_disjoint_timer_query","EXT_frag_depth","EXT_shader_texture_lod","EXT_sRGB","OES_element_index_uint","OES_fbo_render_mipmap","OES_standard_derivatives","OES_texture_float","OES_texture_half_float","OES_texture_half_float_linear","OES_vertex_array_object","WEBGL_color_buffer_float","WEBGL_depth_texture","WEBGL_draw_buffers","EXT_color_buffer_float","EXT_conservative_depth","EXT_disjoint_timer_query_webgl2","EXT_texture_norm16","NV_shader_noperspective_interpolation","WEBGL_clip_cull_distance","EXT_clip_control","EXT_color_buffer_half_float","EXT_depth_clamp","EXT_float_blend","EXT_polygon_offset_clamp","EXT_texture_compression_bptc","EXT_texture_compression_rgtc","EXT_texture_filter_anisotropic","KHR_parallel_shader_compile","OES_texture_float_linear","WEBGL_blend_func_extended","WEBGL_compressed_texture_astc","WEBGL_compressed_texture_etc","WEBGL_compressed_texture_etc1","WEBGL_compressed_texture_s3tc","WEBGL_compressed_texture_s3tc_srgb","WEBGL_debug_renderer_info","WEBGL_debug_shaders","WEBGL_lose_context","WEBGL_multi_draw","WEBGL_polygon_mode"];return(z.getSupportedExtensions()||[]).filter(oe=>J.includes(oe))},Sr={counter:1,buffers:[],programs:[],framebuffers:[],renderbuffers:[],textures:[],shaders:[],vaos:[],contexts:[],offscreenCanvases:{},queries:[],samplers:[],transformFeedbacks:[],syncs:[],stringCache:{},stringiCache:{},unpackAlignment:4,unpackRowLength:0,recordError:z=>{Sr.lastError||(Sr.lastError=z)},getNewId:z=>{for(var J=Sr.counter++,oe=z.length;oe<J;oe++)z[oe]=null;return J},genObject:(z,J,oe,O)=>{for(var B=0;B<z;B++){var X=Tr[oe](),re=X&&Sr.getNewId(O);X?(X.name=re,O[re]=X):Sr.recordError(1282),D[J+B*4>>>2>>>0]=re}},getSource:(z,J,oe,O)=>{for(var B="",X=0;X<J;++X){var re=O?j[O+X*4>>>2>>>0]:void 0;B+=ar(j[oe+X*4>>>2>>>0],re)}return B},createContext:(z,J)=>{var oe=J.majorVersion>1?z.getContext("webgl2",J):z.getContext("webgl",J);if(!oe)return 0;var O=Sr.registerContext(oe,J);return O},registerContext:(z,J)=>{var oe=Sr.getNewId(Sr.contexts),O={handle:oe,attributes:J,version:J.majorVersion,GLctx:z};return z.canvas&&(z.canvas.GLctxObject=O),Sr.contexts[oe]=O,(typeof J.enableExtensionsByDefault>"u"||J.enableExtensionsByDefault)&&Sr.initExtensions(O),oe},makeContextCurrent:z=>{var J;return Sr.currentContext=Sr.contexts[z],s.ctx=Tr=(J=Sr.currentContext)==null?void 0:J.GLctx,!(z&&!Tr)},getContext:z=>Sr.contexts[z],deleteContext:z=>{Sr.currentContext===Sr.contexts[z]&&(Sr.currentContext=null),typeof mn=="object"&&mn.removeAllHandlersOnTarget(Sr.contexts[z].GLctx.canvas),Sr.contexts[z]&&Sr.contexts[z].GLctx.canvas&&(Sr.contexts[z].GLctx.canvas.GLctxObject=void 0),Sr.contexts[z]=null},initExtensions:z=>{if(z||(z=Sr.currentContext),!z.initExtensionsDone){z.initExtensionsDone=!0;var J=z.GLctx;Uu(J),Hu(J),Ng(J),Wa(J),ld(J),Lh(J),Er(J),Ip(J),Hf(J),z.version>=2&&(J.disjointTimerQueryExt=J.getExtension("EXT_disjoint_timer_query_webgl2")),(z.version<2||!J.disjointTimerQueryExt)&&(J.disjointTimerQueryExt=J.getExtension("EXT_disjoint_timer_query")),il(J).forEach(oe=>{!oe.includes("lose_context")&&!oe.includes("debug")&&J.getExtension(oe)})}}},mn={memcpy(z,J,oe){A.set(A.subarray(J>>>0,J+oe>>>0),z>>>0)},removeAllEventListeners(){for(;mn.eventHandlers.length;)mn._removeHandler(mn.eventHandlers.length-1);mn.deferredCalls=[]},inEventHandler:0,deferredCalls:[],deferCall(z,J,oe){function O(X,re){if(X.length!=re.length)return!1;for(var ce in X)if(X[ce]!=re[ce])return!1;return!0}for(var B of mn.deferredCalls)if(B.targetFunction==z&&O(B.argsList,oe))return;mn.deferredCalls.push({targetFunction:z,precedence:J,argsList:oe}),mn.deferredCalls.sort((X,re)=>X.precedence<re.precedence)},removeDeferredCalls(z){mn.deferredCalls=mn.deferredCalls.filter(J=>J.targetFunction!=z)},canPerformEventHandlerRequests(){return navigator.userActivation?navigator.userActivation.isActive:mn.inEventHandler&&mn.currentEventHandler.allowsDeferredCalls},runDeferredCalls(){if(mn.canPerformEventHandlerRequests()){var z=mn.deferredCalls;mn.deferredCalls=[];for(var J of z)J.targetFunction(...J.argsList)}},eventHandlers:[],removeAllHandlersOnTarget:(z,J)=>{for(var oe=0;oe<mn.eventHandlers.length;++oe)mn.eventHandlers[oe].target==z&&(!J||J==mn.eventHandlers[oe].eventTypeString)&&mn._removeHandler(oe--)},_removeHandler(z){var J=mn.eventHandlers[z];J.target.removeEventListener(J.eventTypeString,J.eventListenerFunc,J.useCapture),mn.eventHandlers.splice(z,1)},registerOrRemoveHandler(z){if(!z.target)return-4;if(z.callbackfunc)z.eventListenerFunc=function(oe){++mn.inEventHandler,mn.currentEventHandler=z,mn.runDeferredCalls(),z.handlerFunc(oe),mn.runDeferredCalls(),--mn.inEventHandler},z.target.addEventListener(z.eventTypeString,z.eventListenerFunc,z.useCapture),mn.eventHandlers.push(z);else for(var J=0;J<mn.eventHandlers.length;++J)mn.eventHandlers[J].target==z.target&&mn.eventHandlers[J].eventTypeString==z.eventTypeString&&mn._removeHandler(J--);return 0},getNodeNameForTarget(z){return z?z==window?"#window":z==screen?"#screen":(z==null?void 0:z.nodeName)||"":""},fullscreenEnabled(){return document.fullscreenEnabled||document.webkitFullscreenEnabled}},Pc=["default","low-power","high-performance"],yr=z=>z>2?ar(z):z,un=[0,document,window],Uf=z=>{z=yr(z);var J=un[z]||document.querySelector(z);return J},Fg=Uf;function Fs(z,J){z>>>=0,J>>>=0;var oe=J>>>2,O=D[oe+2>>>0],B={alpha:!!A[J+0>>>0],depth:!!A[J+1>>>0],stencil:!!A[J+2>>>0],antialias:!!A[J+3>>>0],premultipliedAlpha:!!A[J+4>>>0],preserveDrawingBuffer:!!A[J+5>>>0],powerPreference:Pc[O],failIfMajorPerformanceCaveat:!!A[J+12>>>0],majorVersion:D[oe+4>>>0],minorVersion:D[oe+5>>>0],enableExtensionsByDefault:A[J+24>>>0],explicitSwapControl:A[J+25>>>0],proxyContextToMainThread:D[oe+7>>>0],renderViaOffscreenBackBuffer:A[J+32>>>0]},X=Fg(z);if(!X||B.explicitSwapControl)return 0;var re=Sr.createContext(X,B);return re}var nf=Fs;function of(){return Sr.currentContext?Sr.currentContext.handle:0}var Ko=of;function pa(z){z>>>=0;var J=Sr.makeContextCurrent(z);return J?0:-5}var js={},Cl=()=>h||"./this.program",nl=()=>{if(!nl.strings){var z=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",J={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:z,_:Cl()};for(var oe in js)js[oe]===void 0?delete J[oe]:J[oe]=js[oe];var O=[];for(var oe in J)O.push(`${oe}=${J[oe]}`);nl.strings=O}return nl.strings},Tl=(z,J)=>{for(var oe=0;oe<z.length;++oe)A[J++>>>0]=z.charCodeAt(oe);A[J>>>0]=0},xl=function(z,J){z>>>=0,J>>>=0;var oe=0;return nl().forEach((O,B)=>{var X=J+oe;j[z+B*4>>>2>>>0]=X,Tl(O,X),oe+=O.length+1}),0},Ga=function(z,J){z>>>=0,J>>>=0;var oe=nl();j[z>>>2>>>0]=oe.length;var O=0;return oe.forEach(B=>O+=B.length+1),j[J>>>2>>>0]=O,0};function kh(z){try{var J=Bt.getStreamFromFD(z);return ue.close(J),0}catch(oe){if(typeof ue>"u"||oe.name!=="ErrnoError")throw oe;return oe.errno}}var Cc=(z,J,oe,O)=>{for(var B=0,X=0;X<oe;X++){var re=j[J>>>2>>>0],ce=j[J+4>>>2>>>0];J+=8;var Ae=ue.read(z,A,re,ce,O);if(Ae<0)return-1;if(B+=Ae,Ae<ce)break}return B};function ud(z,J,oe,O){J>>>=0,oe>>>=0,O>>>=0;try{var B=Bt.getStreamFromFD(z),X=Cc(B,J,oe);return j[O>>>2>>>0]=X,0}catch(re){if(typeof ue>"u"||re.name!=="ErrnoError")throw re;return re.errno}}function af(z,J,oe,O,B){var X=Vt(J,oe);B>>>=0;try{if(isNaN(X))return 61;var re=Bt.getStreamFromFD(z);return ue.llseek(re,X,O),rt=[re.position>>>0,(qe=re.position,+Math.abs(qe)>=1?qe>0?+Math.floor(qe/4294967296)>>>0:~~+Math.ceil((qe-+(~~qe>>>0))/4294967296)>>>0:0)],D[B>>>2>>>0]=rt[0],D[B+4>>>2>>>0]=rt[1],re.getdents&&X===0&&O===0&&(re.getdents=null),0}catch(ce){if(typeof ue>"u"||ce.name!=="ErrnoError")throw ce;return ce.errno}}var ga=(z,J,oe,O)=>{for(var B=0,X=0;X<oe;X++){var re=j[J>>>2>>>0],ce=j[J+4>>>2>>>0];J+=8;var Ae=ue.write(z,A,re,ce,O);if(Ae<0)return-1;if(B+=Ae,Ae<ce)break}return B};function zn(z,J,oe,O){J>>>=0,oe>>>=0,O>>>=0;try{var B=Bt.getStreamFromFD(z),X=ga(B,J,oe);return j[O>>>2>>>0]=X,0}catch(re){if(typeof ue>"u"||re.name!=="ErrnoError")throw re;return re.errno}}var bn=z=>Tr.activeTexture(z),Tc=(z,J)=>{Tr.attachShader(Sr.programs[z],Sr.shaders[J])};function El(z,J,oe){oe>>>=0,Tr.bindAttribLocation(Sr.programs[z],J,ar(oe))}var Np=(z,J)=>{z==35051?Tr.currentPixelPackBufferBinding=J:z==35052&&(Tr.currentPixelUnpackBufferBinding=J),Tr.bindBuffer(z,Sr.buffers[J])},xc=(z,J,oe)=>{Tr.bindBufferBase(z,J,Sr.buffers[oe])},zf=(z,J)=>{Tr.bindFramebuffer(z,Sr.framebuffers[J])},sf=(z,J)=>{Tr.bindTexture(z,Sr.textures[J])},cd=(z,J,oe,O)=>Tr.blendColor(z,J,oe,O),et=z=>Tr.blendEquation(z),Ec=(z,J,oe,O)=>Tr.blendFuncSeparate(z,J,oe,O);function Ac(z,J,oe,O){J>>>=0,oe>>>=0,Tr.bufferData(z,oe?w.subarray(oe>>>0,oe+J>>>0):J,O)}function Bs(z,J,oe,O){J>>>=0,oe>>>=0,O>>>=0,Tr.bufferSubData(z,J,w.subarray(O>>>0,O+oe>>>0))}var $i=z=>Tr.checkFramebufferStatus(z),zu=z=>Tr.clear(z),wc=(z,J,oe,O)=>Tr.clearColor(z,J,oe,O),Wu=(z,J,oe,O)=>{Tr.colorMask(!!z,!!J,!!oe,!!O)},Gu=z=>{Tr.compileShader(Sr.shaders[z])};function Fp(z,J,oe,O,B,X,re,ce){if(ce>>>=0,Sr.currentContext.version>=2&&(Tr.currentPixelUnpackBufferBinding||!re)){Tr.compressedTexImage2D(z,J,oe,O,B,X,re,ce);return}Tr.compressedTexImage2D(z,J,oe,O,B,X,w.subarray(ce>>>0,ce+re>>>0))}var lf=()=>{var z=Sr.getNewId(Sr.programs),J=Tr.createProgram();return J.name=z,J.maxUniformLength=J.maxAttributeLength=J.maxUniformBlockNameLength=0,J.uniformIdCounter=1,Sr.programs[z]=J,z},Ih=z=>{var J=Sr.getNewId(Sr.shaders);return Sr.shaders[J]=Tr.createShader(z),J},dd=z=>Tr.cullFace(z);function Ya(z,J){J>>>=0;for(var oe=0;oe<z;oe++){var O=D[J+oe*4>>>2>>>0],B=Sr.buffers[O];B&&(Tr.deleteBuffer(B),B.name=0,Sr.buffers[O]=null,O==Tr.currentPixelPackBufferBinding&&(Tr.currentPixelPackBufferBinding=0),O==Tr.currentPixelUnpackBufferBinding&&(Tr.currentPixelUnpackBufferBinding=0))}}function Al(z,J){J>>>=0;for(var oe=0;oe<z;++oe){var O=D[J+oe*4>>>2>>>0],B=Sr.framebuffers[O];B&&(Tr.deleteFramebuffer(B),B.name=0,Sr.framebuffers[O]=null)}}var jg=z=>{if(z){var J=Sr.programs[z];if(!J){Sr.recordError(1281);return}Tr.deleteProgram(J),J.name=0,Sr.programs[z]=null}};function py(z,J){J>>>=0;for(var oe=0;oe<z;oe++){var O=D[J+oe*4>>>2>>>0],B=Sr.renderbuffers[O];B&&(Tr.deleteRenderbuffer(B),B.name=0,Sr.renderbuffers[O]=null)}}var gy=z=>{if(z){var J=Sr.shaders[z];if(!J){Sr.recordError(1281);return}Tr.deleteShader(J),Sr.shaders[z]=null}};function vy(z,J){J>>>=0;for(var oe=0;oe<z;oe++){var O=D[J+oe*4>>>2>>>0],B=Sr.textures[O];B&&(Tr.deleteTexture(B),B.name=0,Sr.textures[O]=null)}}var va=z=>Tr.depthFunc(z),Kl=z=>{Tr.depthMask(!!z)},Wf=(z,J)=>{Tr.detachShader(Sr.programs[z],Sr.shaders[J])},Gf=z=>Tr.disable(z),jp=z=>{Tr.disableVertexAttribArray(z)},uf=(z,J,oe)=>{Tr.drawArrays(z,J,oe)};function cf(z,J,oe,O){O>>>=0,Tr.drawElements(z,J,oe,O)}function fd(z,J,oe,O,B){O>>>=0,Tr.drawElementsInstanced(z,J,oe,O,B)}var Bg=z=>Tr.enable(z),yy=z=>{Tr.enableVertexAttribArray(z)},wl=(z,J,oe,O,B)=>{Tr.framebufferTexture2D(z,J,oe,Sr.textures[O],B)},hd=z=>Tr.frontFace(z);function Bp(z,J){J>>>=0,Sr.genObject(z,J,"createBuffer",Sr.buffers)}function Nh(z,J){J>>>=0,Sr.genObject(z,J,"createFramebuffer",Sr.framebuffers)}function Vg(z,J){J>>>=0,Sr.genObject(z,J,"createTexture",Sr.textures)}var df=z=>Tr.generateMipmap(z),Fh=(z,J,oe,O,B,X,re,ce)=>{J=Sr.programs[J];var Ae=Tr[z](J,oe);if(Ae){var Ie=ce&&Ti(Ae.name,ce,O);B&&(D[B>>>2>>>0]=Ie),X&&(D[X>>>2>>>0]=Ae.size),re&&(D[re>>>2>>>0]=Ae.type)}};function Yf(z,J,oe,O,B,X,re){return O>>>=0,B>>>=0,X>>>=0,re>>>=0,Fh("getActiveUniform",z,J,oe,O,B,X,re)}var $f=()=>{var z=il(Tr);return z=z.concat(z.map(J=>"GL_"+J)),z},Hg=(z,J,oe)=>{if(!J){Sr.recordError(1281);return}var O=void 0;switch(z){case 36346:O=1;break;case 36344:return;case 34814:case 36345:O=0;break;case 34466:var B=Tr.getParameter(34467);O=B?B.length:0;break;case 33309:if(Sr.currentContext.version<2){Sr.recordError(1282);return}O=$f().length;break;case 33307:case 33308:if(Sr.currentContext.version<2){Sr.recordError(1280);return}O=z==33307?3:0;break}if(O===void 0){var X=Tr.getParameter(z);switch(typeof X){case"number":O=X;break;case"boolean":O=X?1:0;break;case"string":Sr.recordError(1280);return;case"object":if(X===null)switch(z){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 36662:case 36663:case 35053:case 35055:case 36010:case 35097:case 35869:case 32874:case 36389:case 35983:case 35368:case 34068:{O=0;break}default:{Sr.recordError(1280);return}}else if(X instanceof Float32Array||X instanceof Uint32Array||X instanceof Int32Array||X instanceof Array){for(var re=0;re<X.length;++re)switch(oe){case 0:D[J+re*4>>>2>>>0]=X[re];break;case 2:N[J+re*4>>>2>>>0]=X[re];break;case 4:A[J+re>>>0]=X[re]?1:0;break}return}else try{O=X.name|0}catch(ce){Sr.recordError(1280),S(`GL_INVALID_ENUM in glGet${oe}v: Unknown object returned from WebGL getParameter(${z})! (error: ${ce})`);return}break;default:Sr.recordError(1280),S(`GL_INVALID_ENUM in glGet${oe}v: Native code calling glGet${oe}v(${z}) and it returns ${X} of type ${typeof X}!`);return}}switch(oe){case 1:Xn(J,O);break;case 0:D[J>>>2>>>0]=O;break;case 2:N[J>>>2>>>0]=O;break;case 4:A[J>>>0]=O?1:0;break}};function jh(z,J){return J>>>=0,Hg(z,J,0)}function Ol(z,J,oe,O){oe>>>=0,O>>>=0;var B=Tr.getProgramInfoLog(Sr.programs[z]);B===null&&(B="(unknown error)");var X=J>0&&O?Ti(B,O,J):0;oe&&(D[oe>>>2>>>0]=X)}function pu(z,J,oe){if(oe>>>=0,!oe){Sr.recordError(1281);return}if(z>=Sr.counter){Sr.recordError(1281);return}if(z=Sr.programs[z],J==35716){var O=Tr.getProgramInfoLog(z);O===null&&(O="(unknown error)"),D[oe>>>2>>>0]=O.length+1}else if(J==35719){if(!z.maxUniformLength)for(var B=Tr.getProgramParameter(z,35718),X=0;X<B;++X)z.maxUniformLength=Math.max(z.maxUniformLength,Tr.getActiveUniform(z,X).name.length+1);D[oe>>>2>>>0]=z.maxUniformLength}else if(J==35722){if(!z.maxAttributeLength)for(var re=Tr.getProgramParameter(z,35721),X=0;X<re;++X)z.maxAttributeLength=Math.max(z.maxAttributeLength,Tr.getActiveAttrib(z,X).name.length+1);D[oe>>>2>>>0]=z.maxAttributeLength}else if(J==35381){if(!z.maxUniformBlockNameLength)for(var ce=Tr.getProgramParameter(z,35382),X=0;X<ce;++X)z.maxUniformBlockNameLength=Math.max(z.maxUniformBlockNameLength,Tr.getActiveUniformBlockName(z,X).length+1);D[oe>>>2>>>0]=z.maxUniformBlockNameLength}else D[oe>>>2>>>0]=Tr.getProgramParameter(z,J)}function Ug(z,J,oe,O){oe>>>=0,O>>>=0;var B=Tr.getShaderInfoLog(Sr.shaders[z]);B===null&&(B="(unknown error)");var X=J>0&&O?Ti(B,O,J):0;oe&&(D[oe>>>2>>>0]=X)}function Vp(z,J,oe){if(oe>>>=0,!oe){Sr.recordError(1281);return}if(J==35716){var O=Tr.getShaderInfoLog(Sr.shaders[z]);O===null&&(O="(unknown error)");var B=O?O.length+1:0;D[oe>>>2>>>0]=B}else if(J==35720){var X=Tr.getShaderSource(Sr.shaders[z]),re=X?X.length+1:0;D[oe>>>2>>>0]=re}else D[oe>>>2>>>0]=Tr.getShaderParameter(Sr.shaders[z],J)}var Yu=z=>{var J=Qt(z)+1,oe=di(J);return oe&&Ti(z,oe,J),oe};function ol(z){var J=Sr.stringCache[z];if(!J){switch(z){case 7939:J=Yu($f().join(" "));break;case 7936:case 7937:case 37445:case 37446:var oe=Tr.getParameter(z);oe||Sr.recordError(1280),J=oe?Yu(oe):0;break;case 7938:var O=Tr.getParameter(7938),B=`OpenGL ES 2.0 (${O})`;Sr.currentContext.version>=2&&(B=`OpenGL ES 3.0 (${O})`),J=Yu(B);break;case 35724:var X=Tr.getParameter(35724),re=/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/,ce=X.match(re);ce!==null&&(ce[1].length==3&&(ce[1]=ce[1]+"0"),X=`OpenGL ES GLSL ES ${ce[1]} (${X})`),J=Yu(X);break;default:Sr.recordError(1280)}Sr.stringCache[z]=J}return J}function ff(z,J){return J>>>=0,Tr.getUniformBlockIndex(Sr.programs[z],ar(J))}var Vs=z=>parseInt(z),ss=z=>z.slice(-1)=="]"&&z.lastIndexOf("["),zg=z=>{var J=z.uniformLocsById,oe=z.uniformSizeAndIdsByName,O,B;if(!J){z.uniformLocsById=J={},z.uniformArrayNamesById={};var X=Tr.getProgramParameter(z,35718);for(O=0;O<X;++O){var re=Tr.getActiveUniform(z,O),ce=re.name,Ae=re.size,Ie=ss(ce),He=Ie>0?ce.slice(0,Ie):ce,at=z.uniformIdCounter;for(z.uniformIdCounter+=Ae,oe[He]=[Ae,at],B=0;B<Ae;++B)J[at]=B,z.uniformArrayNamesById[at++]=He}}};function Oc(z,J){if(J>>>=0,J=ar(J),z=Sr.programs[z]){zg(z);var oe=z.uniformLocsById,O=0,B=J,X=ss(J);X>0&&(O=Vs(J.slice(X+1))>>>0,B=J.slice(0,X));var re=z.uniformSizeAndIdsByName[B];if(re&&O<re[0]&&(O+=re[1],oe[O]=oe[O]||Tr.getUniformLocation(z,J)))return O}else Sr.recordError(1281);return-1}var Bh=z=>{z=Sr.programs[z],Tr.linkProgram(z),z.uniformLocsById=0,z.uniformSizeAndIdsByName={}},Dl=(z,J)=>{z==3317?Sr.unpackAlignment=J:z==3314&&(Sr.unpackRowLength=J),Tr.pixelStorei(z,J)},gu=(z,J,oe)=>{function O(re,ce){return re+ce-1&-ce}var B=(Sr.unpackRowLength||z)*oe,X=O(B,Sr.unpackAlignment);return J*X},Vh=z=>{var J={5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4};return J[z-6402]||1},Dc=z=>(z-=5120,z==0?A:z==1?w:z==2?L:z==4?D:z==6?N:z==5||z==28922||z==28520||z==30779||z==30782?j:k),Rl=(z,J)=>z>>>31-Math.clz32(J.BYTES_PER_ELEMENT),hf=(z,J,oe,O,B,X)=>{var re=Dc(z),ce=Vh(J)*re.BYTES_PER_ELEMENT,Ae=gu(oe,O,ce);return re.subarray(Rl(B,re)>>>0,Rl(B+Ae,re)>>>0)};function Hh(z,J,oe,O,B,X,re){if(re>>>=0,Sr.currentContext.version>=2&&Tr.currentPixelPackBufferBinding){Tr.readPixels(z,J,oe,O,B,X,re);return}var ce=hf(X,B,oe,O,re);if(!ce){Sr.recordError(1280);return}Tr.readPixels(z,J,oe,O,B,X,ce)}var ya=(z,J,oe,O)=>Tr.scissor(z,J,oe,O);function Rc(z,J,oe,O){oe>>>=0,O>>>=0;var B=Sr.getSource(z,J,oe,O);Tr.shaderSource(Sr.shaders[z],B)}function pf(z,J,oe,O,B,X,re,ce,Ae){if(Ae>>>=0,Sr.currentContext.version>=2&&Tr.currentPixelUnpackBufferBinding){Tr.texImage2D(z,J,oe,O,B,X,re,ce,Ae);return}var Ie=Ae?hf(ce,re,O,B,Ae):null;Tr.texImage2D(z,J,oe,O,B,X,re,ce,Ie)}var Zl=(z,J,oe)=>Tr.texParameteri(z,J,oe),Uh=z=>{var J=Tr.currentProgram;if(J){var oe=J.uniformLocsById[z];return typeof oe=="number"&&(J.uniformLocsById[z]=oe=Tr.getUniformLocation(J,J.uniformArrayNamesById[z]+(oe>0?`[${oe}]`:""))),oe}else Sr.recordError(1282)},$u=(z,J)=>{Tr.uniform1i(Uh(z),J)},vu=(z,J,oe)=>{z=Sr.programs[z],Tr.uniformBlockBinding(z,J,oe)},Hp=z=>{z=Sr.programs[z],Tr.useProgram(z),Tr.currentProgram=z},$a=(z,J)=>{Tr.vertexAttribDivisor(z,J)};function qf(z,J,oe,O,B,X){X>>>=0,Tr.vertexAttribPointer(z,J,oe,!!O,B,X)}var al=(z,J,oe,O)=>Tr.viewport(z,J,oe,O),Hs=z=>Xu(z),qu=z=>{var J=Qt(z)+1,oe=Hs(J);return Ti(z,oe,J),oe},gf=z=>{var J=s["_"+z];return J},zh=(z,J)=>{A.set(z,J>>>0)},Us=(z,J,oe,O,B)=>{var X={string:Lt=>{var or=0;return Lt!=null&&Lt!==0&&(or=qu(Lt)),or},array:Lt=>{var or=Hs(Lt.length);return zh(Lt,or),or}};function re(Lt){return J==="string"?ar(Lt):J==="boolean"?!!Lt:Lt}var ce=gf(z),Ae=[],Ie=0;if(O)for(var He=0;He<O.length;He++){var at=X[oe[He]];at?(Ie===0&&(Ie=Et()),Ae[He]=at(O[He])):Ae[He]=O[He]}var Tt=ce(...Ae);function mt(Lt){return Ie!==0&&Qe(Ie),re(Lt)}return Tt=mt(Tt),Tt},Ss=(z,J,oe,O)=>{var B=!oe||oe.every(re=>re==="number"||re==="boolean"),X=J!=="string";return X&&B&&!O?gf(z):(...re)=>Us(z,J,oe,re)};ue.createPreloadedFile=fn,ue.staticInit(),Xt.doesNotExistError=new ue.ErrnoError(44),Xt.doesNotExistError.stack="<generic error, no stack>",ti=s.BindingError=class extends Error{constructor(J){super(J),this.name="BindingError"}},wa(),fe=s.PureVirtualError=te(Error,"PureVirtualError"),Ue(),uu=s.InternalError=class extends Error{constructor(J){super(J),this.name="InternalError"}},yc(),Ze(),Ci=s.UnboundTypeError=te(Error,"UnboundTypeError"),s.requestAnimationFrame=Rt.requestAnimationFrame,s.pauseMainLoop=Rt.pause,s.resumeMainLoop=Rt.resume,Rt.init(),Xo.init();var na={g:lr,U:Ar,ib:br,jb:Br,gb:ai,W:Nn,$:vc,Za:Ls,Z:ks,c:za,f:os,d:Rp,a:as,b:bc,X:Jc,j:fu,e:kf,H:Mp,i:Lp,o:_c,k:Zd,Y:Dh,D:Fu,_:Rh,Ca:ju,bb:bs,u:jf,ba:Da,t:Ra,aa:Ma,r:Bf,Wa:tf,db:kp,Ya:ze,K:Ce,wa:ur,kb:qn,Sa:rl,cb:od,na:ad,La:sd,J:nf,ha:Ko,I:pa,eb:xl,fb:Ga,V:kh,hb:ud,Xa:af,T:zn,ca:xt,ra:bn,P:Tc,l:El,m:Np,ua:xc,s:zf,q:sf,Ka:cd,Ja:et,Ma:Ec,w:Ac,da:Bs,L:$i,Ta:zu,Ua:wc,Ga:Wu,oa:Gu,B:Fp,Ba:lf,qa:Ih,Qa:dd,S:Ya,Ea:Al,Q:jg,Da:py,O:gy,Fa:vy,Na:va,Oa:Kl,R:Wf,z:Gf,Ra:jp,fa:uf,ga:cf,ea:fd,y:Bg,ka:yy,E:wl,Pa:hd,x:Bp,M:Nh,C:Vg,Va:df,xa:Yf,p:jh,za:Ol,F:pu,ma:Ug,N:Vp,v:ol,ya:ff,va:Oc,Aa:Bh,la:Dl,Ia:Hh,Ha:ya,pa:Rc,n:pf,h:Zl,sa:$u,ta:vu,G:Hp,ia:$a,ja:qf,A:al,$a:Ku,ab:pd,_a:Wg},po;ke();var zs=z=>(zs=po.nb)(z),bi=s._free=z=>(bi=s._free=po.ob)(z),di=s._malloc=z=>(di=s._malloc=po.pb)(z);s._SCRTFillActiveTextureCharArray=(z,J,oe)=>(s._SCRTFillActiveTextureCharArray=po.rb)(z,J,oe),s._SCRTFillActiveTextureFloat=(z,J,oe)=>(s._SCRTFillActiveTextureFloat=po.sb)(z,J,oe);var Eo=s._main=(z,J)=>(Eo=s._main=po.tb)(z,J),qa=s._setThrew=(z,J)=>(qa=s._setThrew=po.ub)(z,J),Ws=z=>(Ws=po.vb)(z),Xu=z=>(Xu=po.wb)(z),Mc=()=>(Mc=po.xb)();s.dynCall_jiji=(z,J,oe,O,B)=>(s.dynCall_jiji=po.yb)(z,J,oe,O,B),s.dynCall_viijii=(z,J,oe,O,B,X,re)=>(s.dynCall_viijii=po.zb)(z,J,oe,O,B,X,re),s.dynCall_iiiiij=(z,J,oe,O,B,X,re)=>(s.dynCall_iiiiij=po.Ab)(z,J,oe,O,B,X,re),s.dynCall_iiiiijj=(z,J,oe,O,B,X,re,ce,Ae)=>(s.dynCall_iiiiijj=po.Bb)(z,J,oe,O,B,X,re,ce,Ae),s.dynCall_iiiiiijj=(z,J,oe,O,B,X,re,ce,Ae,Ie)=>(s.dynCall_iiiiiijj=po.Cb)(z,J,oe,O,B,X,re,ce,Ae,Ie);function pd(z,J,oe,O){var B=Et();try{return Ut(z)(J,oe,O)}catch(X){if(Qe(B),X!==X+0)throw X;qa(1,0)}}function Ku(z,J,oe){var O=Et();try{return Ut(z)(J,oe)}catch(B){if(Qe(O),B!==B+0)throw B;qa(1,0)}}function Wg(z,J,oe,O,B){var X=Et();try{return Ut(z)(J,oe,O,B)}catch(re){if(Qe(X),re!==re+0)throw re;qa(1,0)}}function Ao(z){z=Object.assign({},z);var J=O=>B=>O(B)>>>0,oe=O=>()=>O()>>>0;return z.nb=J(z.nb),z.pb=J(z.pb),z.wb=J(z.wb),z.xb=oe(z.xb),z}s.callMain=Xf,s.ccall=Us,s.cwrap=Ss,s.UTF8ToString=ar,s.stringToUTF8=Ti,s.lengthBytesUTF8=Qt,s.specialHTMLTargets=un;var gd;De=function z(){gd||Wh(),gd||(De=z)};function Xf(z=[]){var J=Eo;z.unshift(h);var oe=z.length,O=Hs((oe+1)*4),B=O;z.forEach(re=>{j[B>>>2>>>0]=qu(re),B+=4}),j[B>>>2>>>0]=0;try{var X=J(oe,O);return it(X,!0),X}catch(re){return ht(re)}}function Wh(z=f){if(Te>0||(Q(),Te>0))return;function J(){var oe;gd||(gd=!0,s.calledRun=!0,!T&&(Z(),ee(),l(s),(oe=s.onRuntimeInitialized)==null||oe.call(s),Zu&&Xf(z),ie()))}s.setStatus?(s.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>s.setStatus(""),1),J()},1)):J()}if(s.preInit)for(typeof s.preInit=="function"&&(s.preInit=[s.preInit]);s.preInit.length>0;)s.preInit.pop()();var Zu=!0;return s.noInitialRun&&(Zu=!1),Wh(),Sr&&(Sr.getNewId=function(z){Sr.counter++;var J=z.length;if(J===0)return 1;for(var oe=1;oe<J;++oe)if(z[oe]===null)return oe;return J}),a=c,a})})();r.exports=i,r.exports.default=i})(P5)),P5.exports}var C5={},wee;function e_(){return wee||(wee=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.createSvgLayer=r.ELayerClass=void 0;var e=A1(),i=ca(),n=ln(),t=Hi(),o;(function(y){y[y.canvasWebGL=0]="canvasWebGL",y[y.canvas2D=1]="canvas2D",y[y.svg=2]="svg"})(o||(o={}));var a;(function(y){y.DIV_ROOT="div-root",y.SVG_ROOT="svg-root",y.BACK_DIV_ROOT="back-div-root",y.FRONT_DIV_ROOT="front-div-root",y.BACK_SVG_ROOT="back-svg-root",y.FRONT_SVG_ROOT="front-svg-root",y.ADORNER_SVG_ROOT="adorner-svg-root",y.CANVAS_ROOT="canvas-root"})(a=r.ELayerClass||(r.ELayerClass={}));var s=1.5,l=function(y){return"".concat(y,"_2D")},u=function(y,m,b,S,_){S===void 0&&(S=0),_===void 0&&(_=0);var C;S&&_?C=S/_:y&&m?C=void 0:C=s;var T=Math.round(y||600);if(C){var x=Math.round(T/C);return x>b&&(x=b),{width:T,height:x,aspectRatio:C}}else{var x=Math.round(m);return{width:T,height:x,aspectRatio:C}}},c=function(y){var m=typeof y=="string"?document.querySelector("#".concat(y)):y;if(!m)throw new Error('Check div element with id "'.concat(m.id,'" exists'));if(m.nodeName.toLowerCase()!=="div")throw new Error('Element with id "'.concat(m.id,'" should be of type div'));return m},d=function(y){var m=y.style.maxHeight;if(m){var b=m.includes("px");if(b){var S=parseInt(m.replace("px",""),10);if(!isNaN(S))return S}}},f=function(y,m,b,S,_,C){var T;S===void 0&&(S=o.canvasWebGL);var x=i.PerformanceDebugHelper.mark(i.EPerformanceMarkType.CanvasInitializationStart,{level:i.EPerformanceDebugLevel.Verbose});e.WebGlHelper.initialize(),t.DpiHelper.initialize();var A=c(y);A.innerHTML="",A.style.position===""&&(A.style.position="relative"),A.style.overflow===""&&(A.style.overflow="hidden");var w=A.id,L=A.offsetWidth,k=A.offsetHeight,D=d(A),j=u(L,k,D,m,b),N=j.width,V=j.height,W=j.aspectRatio;!_&&W&&(A.style.aspectRatio="".concat(W));var K=document.createElement("div");K.id="".concat(w,"_background_div"),K.classList.add(a.DIV_ROOT,a.BACK_DIV_ROOT),K.style.width="100%",K.style.height="100%",K.style.position="absolute",K.style.pointerEvents="none",A.appendChild(K);var H=(0,r.createSvgLayer)("".concat(w,"_BACKGROUND_SVG"),N,V);H.style.width="100%",H.style.height="100%",H.style.pointerEvents="none",H.classList.add(a.BACK_SVG_ROOT),A.appendChild(H);var U;S===o.canvasWebGL&&(U=document.createElement("canvas"),U.id="".concat(w,"_WebGL"),U.classList.add(a.CANVAS_ROOT),U.style.position="absolute",U.style.display="block",U.style.width="100%",U.style.height="100%",e.WebGlHelper.getContext(U,{premultipliedAlpha:!0,antialias:n.SciChartSurfaceBase.AntiAliasWebGlBackbuffer}),A.appendChild(U));var I=document.createElement("canvas");I.id=l(w),I.classList.add(a.CANVAS_ROOT),I.style.width="100%",I.style.height="100%",t.DpiHelper.setSize(I,N,V),I.style.position="absolute",S!==o.canvas2D&&(I.style.pointerEvents="none"),S===o.canvasWebGL?I.style.display="none":I.style.display="block",A.appendChild(I),I.style.touchAction=C??"none",I.onselectstart=function(){return!1};var Q=(0,r.createSvgLayer)("".concat(w,"_SVG"),N,V);Q.style.width="100%",Q.style.height="100%",S!==o.svg&&(Q.style.pointerEvents="none"),Q.classList.add(a.FRONT_SVG_ROOT),A.appendChild(Q);var Z=(0,r.createSvgLayer)("".concat(w,"_Adorner"),N,V);Z.style.pointerEvents="none",Z.style.width="100%",Z.style.height="100%",Z.style.zIndex="1",Z.classList.add(a.ADORNER_SVG_ROOT),A.appendChild(Z);var ee=document.createElement("div");return ee.id="".concat(w,"_div"),ee.classList.add(a.DIV_ROOT,a.FRONT_DIV_ROOT),ee.style.width="100%",ee.style.height="100%",ee.style.position="relative",ee.style.pointerEvents="none",ee.style.textAlign="center",A.appendChild(ee),S===o.canvasWebGL&&U.addEventListener("webglcontextlost",function(ie){console.warn("WebGL context lost. Reloading the page."),ie.preventDefault(),location.reload()},!1),i.PerformanceDebugHelper.mark(i.EPerformanceMarkType.CanvasInitializationEnd,{level:i.EPerformanceDebugLevel.Verbose,contextId:I.id,relatedId:(T=x==null?void 0:x.detail)===null||T===void 0?void 0:T.relatedId}),{domChartRoot:A,domCanvasWebGL:U,domCanvas2D:I,domSvgContainer:Q,domSvgAdornerLayer:Z,domDivContainer:ee,domSeriesBackground:K,domBackgroundSvgContainer:H,aspect:W,disableAspect:_}},h=function(y,m,b,S){var _=new ResizeObserver(function(T){for(var x=function(k){var D,j;k.contentRect?(D=k.contentRect.width,j=k.contentRect.height):k.contentBoxSize?k.contentBoxSize.inlineSize?D=k.contentBoxSize.inlineSize:k.contentBoxSize[0]&&(D=k.contentBoxSize[0].inlineSize):(console.error("ResizeObserver is not supported"),D=900);var N=d(y);N&&j>N&&(j=N);var V=D!==0&&j!==0,W=b.domCanvas2D.width!==D*t.DpiHelper.PIXEL_RATIO||b.domCanvas2D.height!==j*t.DpiHelper.PIXEL_RATIO;V&&W&&setTimeout(function(){b.onResize(D,j)},0)},A=0,w=T;A<w.length;A++){var L=w[A];x(L)}});_.observe(y,{box:"border-box"});var C={delete:function(){return _.disconnect()}};return C},p=function(y){if(typeof y=="string"){var m=document.querySelectorAll("[id=".concat(y,"]")).length;m>1?console.error('Please provide a unique ID for each chart div element, "'.concat(y,'" it is not a unique identifier')):m===0&&console.error('Chart div element with the ID "'.concat(y,'" is not present in the DOM'))}else if(!y)throw new Error("Provided div element doesn't exist!")},g=function(y,m,b){var S=document.createElementNS("http://www.w3.org/2000/svg","svg");return S.id=y,S.setAttribute("width",m.toString()),S.setAttribute("height",b.toString()),S.setAttribute("role","img"),S.setAttribute("xmlns","http://www.w3.org/2000/svg"),S.style.position="absolute",S.style.display="block",S.classList.add(a.SVG_ROOT),S};r.createSvgLayer=g;var v={checkChartDivExists:p,ECanvasType:o,getCanvas2dId:l,initCanvas:f,subscribeToResize:h};r.default=v})(C5)),C5}var aI={},Oee;function fSe(){if(Oee)return aI;Oee=1,Object.defineProperty(aI,"__esModule",{value:!0}),aI.copyToCanvas=void 0;var r=Lf(),e=ca(),i=function(n,t){return function(o){var a;r.Logger.debug("copyToCanvas");var s=e.PerformanceDebugHelper.mark(e.EPerformanceMarkType.CopyToCanvasStart,{parentContextId:o,level:e.EPerformanceDebugLevel.Verbose}),l=t(o),u=l==null?void 0:l.sciChartSurface,c=l==null?void 0:l.sciChartSurface.domCanvas2D;if(c){var d=c.getContext("2d");d.globalCompositeOperation="copy",d.drawImage(n,0,0,c.width,c.height,0,0,c.width,c.height),e.PerformanceDebugHelper.mark(e.EPerformanceMarkType.CopyToCanvasEnd,{contextId:u.id,parentContextId:o,relatedId:(a=s==null?void 0:s.detail)===null||a===void 0?void 0:a.relatedId,level:e.EPerformanceDebugLevel.Verbose});var f=u.isInvalidated;u.renderedToDestination.raiseEvent(f)}}};return aI.copyToCanvas=i,aI}var sI={},Dee;function XH(){if(Dee)return sI;Dee=1,Object.defineProperty(sI,"__esModule",{value:!0}),sI.preRun=void 0;var r=function(e){e.specialHTMLTargets[0]=e.canvas};return sI.preRun=r,sI}var Ree;function WN(){return Ree||(Ree=1,(function(r){var e=pC&&pC.__awaiter||function(W,K,H,U){function I(Q){return Q instanceof H?Q:new H(function(Z){Z(Q)})}return new(H||(H=Promise))(function(Q,Z){function ee(pe){try{de(U.next(pe))}catch(_e){Z(_e)}}function ie(pe){try{de(U.throw(pe))}catch(_e){Z(_e)}}function de(pe){pe.done?Q(pe.value):I(pe.value).then(ee,ie)}de((U=U.apply(W,K||[])).next())})},i=pC&&pC.__generator||function(W,K){var H={label:0,sent:function(){if(Q[0]&1)throw Q[1];return Q[1]},trys:[],ops:[]},U,I,Q,Z;return Z={next:ee(0),throw:ee(1),return:ee(2)},typeof Symbol=="function"&&(Z[Symbol.iterator]=function(){return this}),Z;function ee(de){return function(pe){return ie([de,pe])}}function ie(de){if(U)throw new TypeError("Generator is already executing.");for(;H;)try{if(U=1,I&&(Q=de[0]&2?I.return:de[0]?I.throw||((Q=I.return)&&Q.call(I),0):I.next)&&!(Q=Q.call(I,de[1])).done)return Q;switch(I=0,Q&&(de=[de[0]&2,Q.value]),de[0]){case 0:case 1:Q=de;break;case 4:return H.label++,{value:de[1],done:!1};case 5:H.label++,I=de[1],de=[0];continue;case 7:de=H.ops.pop(),H.trys.pop();continue;default:if(Q=H.trys,!(Q=Q.length>0&&Q[Q.length-1])&&(de[0]===6||de[0]===2)){H=0;continue}if(de[0]===3&&(!Q||de[1]>Q[0]&&de[1]<Q[3])){H.label=de[1];break}if(de[0]===6&&H.label<Q[1]){H.label=Q[1],Q=de;break}if(Q&&H.label<Q[2]){H.label=Q[2],H.ops.push(de);break}Q[2]&&H.ops.pop(),H.trys.pop();continue}de=K.call(W,H)}catch(pe){de=[6,pe],I=0}finally{U=Q=0}if(de[0]&5)throw de[1];return{value:de[0]?de[1]:void 0,done:!0}}};Object.defineProperty(r,"__esModule",{value:!0}),r.monitorWebGL=r.disposeMultiChart=r.initializeChartEngine2D=r.getSharedWasmContext=r.createMultichart=void 0;var n=dSe(),t=$v(),o=ni(),a=Ul(),s=EM(),l=Gd(),u=e_(),c=Tp(),d=ln(),f=Rg(),h=$n(),p=Xi(),g=k1(),v=Yv(),y=A1(),m=Lf(),b=fSe(),S=ca(),_=ws(),C=XH(),T={id:void 0,wasmContext:void 0,getChildSurfaces:void 0,createChildSurface:void 0},x,A=function(W,K,H){return e(void 0,void 0,void 0,function(){var U,I,Q,Z,ee,ie,de,pe,_e,Te,De,Pe,Ee,Re,je;return i(this,function(Ke){switch(Ke.label){case 0:u.default.checkChartDivExists(W),U=u.default.initCanvas(W,(_e=H==null?void 0:H.widthAspect)!==null&&_e!==void 0?_e:0,(Te=H==null?void 0:H.heightAspect)!==null&&Te!==void 0?Te:0,u.default.ECanvasType.canvas2D,(De=H==null?void 0:H.disableAspect)!==null&&De!==void 0?De:l.SciChartDefaults.disableAspect,H==null?void 0:H.touchAction),I=(Pe=H==null?void 0:H.loader)!==null&&Pe!==void 0?Pe:l.SciChartDefaults.defaultLoader,Q=(Ee=I.addChartLoader)===null||Ee===void 0?void 0:Ee.call(I,U.domDivContainer,H==null?void 0:H.theme),Ke.label=1;case 1:return Ke.trys.push([1,3,,4]),[4,(0,r.initializeChartEngine2D)({destinationCanvas:U.domCanvas2D})];case 2:return Ke.sent(),Z=T.createChildSurface,ee=T.wasmContext,ee.TSRSetDrawRequestsEnabled((Re=!(H!=null&&H.disableEngineLoop))!==null&&Re!==void 0?Re:!0),ie=U?U.domChartRoot.id:"divElementId",de=Z(ie,U,H==null?void 0:H.theme,K),[2,new Promise(function(ot){setTimeout(function(){var We,xe;((We=H==null?void 0:H.createSuspended)!==null&&We!==void 0?We:l.SciChartDefaults.createSuspended)&&de.suspendUpdates(),(xe=I.removeChartLoader)===null||xe===void 0||xe.call(I,U.domDivContainer,Q),Q=void 0,de.setIsInitialized(),ot({wasmContext:ee,sciChartSurface:de})},0)})];case 3:return pe=Ke.sent(),console.error(pe),(je=I.removeChartLoader)===null||je===void 0||je.call(I,U.domDivContainer,Q),Q=void 0,[2,Promise.reject(pe)];case 4:return[2]}})})};r.createMultichart=A;var w=function(){return e(void 0,void 0,void 0,function(){var W;return i(this,function(K){switch(K.label){case 0:return[4,(0,r.initializeChartEngine2D)()];case 1:return W=K.sent().wasmContext,[2,W]}})})};r.getSharedWasmContext=w;var L=function(W){return e(void 0,void 0,void 0,function(){var K,H,U,I,Q;return i(this,function(Z){switch(Z.label){case 0:return K=(I=W==null?void 0:W.destinationCanvas)===null||I===void 0?void 0:I.id,H=S.PerformanceDebugHelper.mark(S.EPerformanceMarkType.EngineInitStart,{parentContextId:K}),y.WebGlHelper.initialize(),!T.wasmContext||!T.createChildSurface||!T.getChildSurfaces?(x||(x=N()),[4,x]):[3,2];case 1:U=Z.sent(),T.id=U.id,T.wasmContext=U.wasmContext,(0,t.checkBuildStamp)(U.wasmContext),T.createChildSurface=U.createChildSurface,T.getChildSurfaces=U.getChildSurfaces,(0,r.monitorWebGL)(U.wasmContext,!0),Z.label=2;case 2:return S.PerformanceDebugHelper.mark(S.EPerformanceMarkType.EngineInitEnd,{relatedId:(Q=H==null?void 0:H.detail)===null||Q===void 0?void 0:Q.relatedId,contextId:T.id,parentContextId:K}),[2,x]}})})};r.initializeChartEngine2D=L;var k,D=function(){k&&k(),T.createChildSurface=void 0,T.getChildSurfaces=void 0,T.wasmContext=void 0,T.id=void 0,x=void 0,s.licenseManager.clear()};r.disposeMultiChart=D;var j=function(W,K){var H=function(){return K?f.sciChartDestinations:f.sciChartSingleDestinations},U=function(){W.SCRTInitEngine2D();for(var Z=0,ee=H();Z<ee.length;Z++){var ie=ee[Z];ie.sciChartSurface.isWebGLContextActive=!0,ie.sciChartSurface.invalidateElement({force:!0})}},I=function(Z){console.warn("WebGL context lost: ",Z.statusMessage),Z.preventDefault();for(var ee=0,ie=H();ee<ie.length;ee++){var de=ie[ee];de.sciChartSurface.isWebGLContextActive=!1}a.WebGlRenderContext2D.webGlResourcesRefs.forEach(function(pe){pe.invalidateCache()}),g.labelCache.resetCache(),(0,p.deleteCache)(W),W.SCRTShutdownEngine2D()},Q=function(Z){console.warn("WebGL context restored: ",Z.statusMessage),U()};W.canvas.addEventListener("webglcontextlost",I,!1),W.canvas.addEventListener("webglcontextrestored",Q,!1)};r.monitorWebGL=j;var N=function(){var W=function(H,U,I,Q){o.Guard.notNull(Q,"theme");var Z=I(H,{canvases:U});Z.applyTheme(Q);var ee=u.default.subscribeToResize(U.domChartRoot,U.aspect,Z,U.disableAspect);return Z.addDeletable(ee),Z.setDestinations(f.sciChartDestinations),Z},K=function(H,U,I,Q,Z,ee){var ie=(0,d.createChartDestination)(I.domCanvas2D);if(!ie){I.delete();return}var de=H.SCRTSurfaceDestination.implement(ie);ee.AddDestination(de),ee.SetFPSCounterEnabled(!1),f.sciChartDestinations.push({canvasElementId:U,sciChartSurface:I,width:Q,height:Z})};return new Promise(function(H,U){var I=(0,d.getMasterCanvas)(),Q=(0,d.getLocateFile)(c.sciChartConfig);new n({locateFile:Q,noInitialRun:!0,canvas:I,preRun:C.preRun}).then(function(Z,ee){var ie=(0,_.generateGuid)(),de=(0,h.createWasmContextRevocableProxy)(Z,ie),pe=de.proxy;s.licenseManager.applyLicense(pe,"2D master"),k=function(){g.labelCache.resetCache(),pe.TSRRequestExit(),_e.delete(),pe.SCRTGetGlobalSampleChartInterface().SetFrameRenderer(null),pe.SCRTGetGlobalSampleChartInterface().delete(),pe.SCRTSetGlobalSampleChartInterface(null),(0,p.deleteCache)(pe),Te.delete(),pe.SCRTSetGlobalCopyToDestinationInterface(null),de.revoke(),de=void 0,k=void 0};var _e=new pe.SCRTFrameRenderer2D,Te=pe.SCRTCopyToDestinationInterface.implement({CopyToDestination:(0,b.copyToCanvas)(d.SciChartSurfaceBase.domMasterCanvas,V)}),De=function(){return f.sciChartDestinations.map(function(je){return je.sciChartSurface})},Pe=function(je,Ke,ot,We){o.Guard.notNull(ot,"theme");var xe=u.default.getCanvas2dId(je),ve=f.sciChartDestinations.filter(function(be){return be.canvasElementId===xe}),he=f.sciChartDestinations.filter(function(be){return be.canvasElementId!==xe});for(Re.ClearDestinations();f.sciChartDestinations.length>0;)f.sciChartDestinations.pop();he.forEach(function(be){return K(pe,be.canvasElementId,be.sciChartSurface,be.width,be.height,Re)});var Se=W(pe,Ke,We,ot);return Se.addDeletable({delete:function(){c.SciChartSurface.autoDisposeWasmContext&&(0,f.getOther2DMultiChartDestinations)(Se).length===0&&(c.SciChartSurface.wasmContextDisposeTimeout?setTimeout(function(){f.sciChartDestinations.length===0&&c.SciChartSurface.disposeSharedWasmContext()},c.SciChartSurface.wasmContextDisposeTimeout):c.SciChartSurface.disposeSharedWasmContext())}}),K(pe,xe,Se,Ke.domCanvas2D.width,Ke.domCanvas2D.height,Re),ve.forEach(function(be){return be.sciChartSurface.delete(!1)}),s.licenseManager.updateLicenseDisplay(Se),Se},Ee={InitializeChart:function(){m.Logger.debug("InitializeChart"),H({id:ie,getChildSurfaces:De,createChildSurface:Pe,wasmContext:pe})},Draw:function(je){m.Logger.debug("Draw",je);var Ke=f.sciChartDestinations.find(function(ot){return ot.canvasElementId===je});Ke&&Ke.sciChartSurface.renderSurface.onRenderTimeElapsed()},Update:function(je){m.Logger.debug("sciChartInitCommon.ts Update",je)},ShutDownChart:function(){m.Logger.debug("sciChartInitCommon.ts ShutDownChart")}},Re=pe.SCRTSampleChartInterface.implement(Ee);Re.SetFrameRenderer(_e),Re.SetWasmBufferSizesKb(l.SciChartDefaults.wasmBufferSizesKb),pe.SCRTSetGlobalSampleChartInterface(Re),pe.SCRTSetGlobalCopyToDestinationInterface(Te),d.SciChartSurfaceBase.domMasterCanvas&&pe.SCRTSetMainWindowSize(d.SciChartSurfaceBase.domMasterCanvas.width,d.SciChartSurfaceBase.domMasterCanvas.height),pe.callMain()}).catch(function(Z){console.error(Z),U(`Could not load SciChart WebAssembly module.
                Check your build process and ensure that your "scichart2d.wasm" and "scichart2d.js" files are from the same version`)})})},V=function(W){return f.sciChartDestinations.find(function(K){return K.canvasElementId===W})}})(pC)),pC}var T5={},Mee;function hSe(){return Mee||(Mee=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.initDrawEngineSingleChart=r.createSingleInternal=void 0;var e=dSe(),i=$v(),n=ni(),t=Lf(),o=EM(),a=Gd(),s=e_(),l=Tp(),u=ln(),c=Xi(),d=$n(),f=Rg(),h=k1(),p=WN(),g=ca(),v=XH(),y=function(b,S,_){return new Promise(function(C,T){var x,A,w,L=s.default.initCanvas(b,_==null?void 0:_.widthAspect,_==null?void 0:_.heightAspect,void 0,(x=_==null?void 0:_.disableAspect)!==null&&x!==void 0?x:a.SciChartDefaults.disableAspect,_==null?void 0:_.touchAction),k=(A=_==null?void 0:_.loader)!==null&&A!==void 0?A:a.SciChartDefaults.defaultLoader,D=(w=k.addChartLoader)===null||w===void 0?void 0:w.call(k,L.domDivContainer,_==null?void 0:_.theme),j=g.PerformanceDebugHelper.mark(g.EPerformanceMarkType.EngineInitStart,{parentContextId:L.domCanvas2D.id}),N=(0,u.getLocateFile)(l.sciChartConfig);new e({locateFile:N,noInitialRun:!0,canvas:L.domCanvasWebGL,preRun:v.preRun}).then(function(V){var W,K;(W=k.removeChartLoader)===null||W===void 0||W.call(k,L.domDivContainer,D),V.doNotCaptureKeyboard=!0,o.licenseManager.applyLicense(V,"2D single");var H=(0,d.createWasmContextRevocableProxy)(V,L.domCanvas2D.id),U=function(I){var Q;((Q=_==null?void 0:_.createSuspended)!==null&&Q!==void 0?Q:a.SciChartDefaults.createSuspended)&&I.sciChartSurface.suspendUpdates(),I.sciChartSurface.addDeletable({delete:function(){H.revoke(),H=void 0}}),g.PerformanceDebugHelper.mark(g.EPerformanceMarkType.EngineInitEnd,{relatedId:j==null?void 0:j.detail.relatedId,contextId:I.sciChartSurface.id,parentContextId:L.domCanvas2D.id}),C(I)};(0,r.initDrawEngineSingleChart)(H.proxy,L,U,_==null?void 0:_.theme,S),V.TSRSetDrawRequestsEnabled((K=!(_!=null&&_.disableEngineLoop))!==null&&K!==void 0?K:!0),(0,i.checkBuildStamp)(V),(0,p.monitorWebGL)(V,!1)}).catch(function(V){var W;t.Logger.debug(V),(W=k.removeChartLoader)===null||W===void 0||W.call(k,L.domDivContainer,D),T(`Could not load SciChart WebAssembly module.
                Check your build process and ensure that your "scichart2d.wasm" and "scichart2d.js" files are from the same version`)})})};r.createSingleInternal=y;var m=function(b,S,_,C,T){n.Guard.notNull(C,"theme");var x=S.domCanvas2D.width,A=S.domCanvas2D.height,w;b.canvas=S.domCanvasWebGL;var L=new b.SCRTFrameRenderer2D,k=S.domCanvasWebGL.id,D={InitializeChart:function(){w=T(b,{canvases:S}),w.applyTheme(C),f.sciChartSingleDestinations.push({canvasElementId:k,sciChartSurface:w,width:x,height:A}),w.setDestinations(f.sciChartSingleDestinations),w.addDeletable({delete:function(){b.TSRRequestExit(),L.delete(),b.SCRTGetGlobalSampleChartInterface().SetFrameRenderer(null),b.SCRTGetGlobalSampleChartInterface().delete(),b.SCRTSetGlobalSampleChartInterface(null),h.labelCache.resetCache()}}),setTimeout(function(){w.invalidateElement(),o.licenseManager.updateLicenseDisplay(w);var N=s.default.subscribeToResize(S.domChartRoot,S.aspect,w,S.disableAspect);w.addDeletable(N),w.addDeletable((0,c.freeCache)(b)),w.setIsInitialized(),_({wasmContext:b,sciChartSurface:w})},0)},Draw:function(N){w.renderSurface.onRenderTimeElapsed()},Update:function(N){},ShutDownChart:function(){}},j=b.SCRTSampleChartInterface.implement(D);j.SetFrameRenderer(L),j.SetFPSCounterEnabled(!1),j.SetWasmBufferSizesKb(a.SciChartDefaults.wasmBufferSizesKb),b.SCRTSetGlobalSampleChartInterface(j),b.callMain()};r.initDrawEngineSingleChart=m})(T5)),T5}var lI={},Lee;function d8(){if(Lee)return lI;Lee=1,Object.defineProperty(lI,"__esModule",{value:!0}),lI.drawBorder=void 0;var r=KS(),e=Xi(),i=function(n,t,o,a,s,l,u,c,d,f){if(!(d===0&&u===0&&l===0&&c===0)){var h=o.newBrush(f,!0),p=(0,e.getVectorRectVertex)(t);p.push_back((0,r.createNativeRect)(t,a.x,a.y-u,a.x+a.width+c,a.y)),p.push_back((0,r.createNativeRect)(t,a.x+a.width,a.y,a.x+a.width+c,a.y+a.height+d)),p.push_back((0,r.createNativeRect)(t,a.x-l,a.y+a.height,a.x+a.width,a.y+a.height+d)),p.push_back((0,r.createNativeRect)(t,a.x-l,a.y-u,a.x,a.y+a.height)),n.drawRects(p,h,s,0,0)}};return lI.drawBorder=i,lI}var gC={},vC={},kee;function f8(){if(kee)return vC;kee=1;var r=vC&&vC.__extends||(function(){var y=function(m,b){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,_){S.__proto__=_}||function(S,_){for(var C in _)Object.prototype.hasOwnProperty.call(_,C)&&(S[C]=_[C])},y(m,b)};return function(m,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");y(m,b);function S(){this.constructor=m}m.prototype=b===null?Object.create(b):(S.prototype=b.prototype,new S)}})();Object.defineProperty(vC,"__esModule",{value:!0}),vC.BaseStackedCollection=void 0;var e=ES(),i=$n(),n=Mr(),t=FH(),o=oi(),a=FS(),s=N1(),l=qv(),u=QS(),c=XF(),d=ws(),f=Yv(),h=Wl(),p=ob(),g=Ji(),v=(function(y){r(m,y);function m(b,S){var _=this,C,T,x,A,w,L,k,D,j;return _=y.call(this)||this,_.id=(0,d.generateGuid)(),_.isStacked=!0,_.isCollection=!0,_.isPolar=!1,_.supportsResampling=!1,_.isSpline=!1,_.enableDrawingOptimisations=!0,_.isAccumulatedVectorDirty=!0,_.firstAnimationRender=!1,_.isVisibleProperty=!0,_.isOneHundredPercentProperty=!1,_.animationQueue=[],_.yRangeModeProperty=u.EYRangeMode.Drawn,_.seriesNameProperty=void 0,_.surfaceRenderOrderProperty=void 0,_.renderLayerProperty=s.EDefaultRenderLayer.SeriesLayer,_.renderOrderProperty=void 0,_.webAssemblyContext=b,_.isVisibleProperty=(C=S==null?void 0:S.isVisible)!==null&&C!==void 0?C:_.isVisibleProperty,_.xAxisIdProperty=(T=S==null?void 0:S.xAxisId)!==null&&T!==void 0?T:_.xAxisIdProperty,_.yAxisIdProperty=(x=S==null?void 0:S.yAxisId)!==null&&x!==void 0?x:_.yAxisIdProperty,_.isOneHundredPercentProperty=(A=S==null?void 0:S.isOneHundredPercent)!==null&&A!==void 0?A:_.isOneHundredPercentProperty,_.yRangeModeProperty=(w=S==null?void 0:S.yRangeMode)!==null&&w!==void 0?w:_.yRangeModeProperty,_.updateAnimationProperties=_.updateAnimationProperties.bind(_),_.notifyPropertyChanged=_.notifyPropertyChanged.bind(_),_.getParentSurface=_.getParentSurface.bind(_),_.beforeAnimationStart=_.beforeAnimationStart.bind(_),_.afterAnimationComplete=_.afterAnimationComplete.bind(_),_.updateAnimationProperties=_.updateAnimationProperties.bind(_),_.surfaceRenderOrderProperty=(L=S==null?void 0:S.surfaceRenderOrder)!==null&&L!==void 0?L:_.surfaceRenderOrderProperty,_.renderLayerProperty=(k=S==null?void 0:S.renderLayer)!==null&&k!==void 0?k:_.renderLayerProperty,_.renderOrderProperty=(D=S==null?void 0:S.renderOrder)!==null&&D!==void 0?D:_.renderOrderProperty,_.renderNextToProperty=(j=S==null?void 0:S.renderNextTo)!==null&&j!==void 0?j:_.renderNextToProperty,_.accumulatedValues0=new _.webAssemblyContext.SCRTDoubleVector,_.accumulatedFinalAnimationValues0=new _.webAssemblyContext.SCRTDoubleVector,_}return Object.defineProperty(m.prototype,"isVisibleChanged",{get:function(){throw new Error("getting visibleChanged event is not supported for BaseStackedCollection")},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"selected",{get:function(){throw new Error("getting selected event is not supported for BaseStackedCollection")},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"hovered",{get:function(){throw new Error("getting hovered event is not supported for BaseStackedCollection")},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"isSelected",{get:function(){return!1},set:function(b){throw new Error("Setting isSelected is not supported for BaseStackedCollection")},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"isHovered",{get:function(){return!1},set:function(b){throw new Error("Setting isHovered is not supported for BaseStackedCollection")},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"isDigitalLine",{get:function(){throw new Error("Setting or getting isDigitalLine is not supported for BaseStackedCollection")},set:function(b){throw new Error("Setting or getting isDigitalLine is not supported for BaseStackedCollection")},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"isVisible",{get:function(){return this.isVisibleProperty},set:function(b){this.isVisibleProperty=b,this.notifyPropertyChanged(g.PROPERTY.IS_VISIBLE)},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"xAxisId",{get:function(){return this.xAxisIdProperty},set:function(b){b!==this.xAxisIdProperty&&(this.xAxisIdProperty=b,this.xAxisProperty=void 0,this.notifyPropertyChanged(g.PROPERTY.XAXIS_ID))},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"xAxis",{get:function(){return this.xAxisProperty},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"yAxis",{get:function(){return this.yAxisProperty},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"yAxisId",{get:function(){return this.yAxisIdProperty},set:function(b){b!==this.yAxisIdProperty&&(this.yAxisIdProperty=b,this.yAxisProperty=void 0,this.notifyPropertyChanged(g.PROPERTY.YAXIS_ID))},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"seriesName",{get:function(){var b;return(b=this.seriesNameProperty)!==null&&b!==void 0?b:this.getDataSeriesName()},set:function(b){this.seriesNameProperty!==b&&(this.seriesNameProperty=b,this.notifyPropertyChanged(g.PROPERTY.SERIES_NAME))},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"isOneHundredPercent",{get:function(){return this.isOneHundredPercentProperty},set:function(b){this.isOneHundredPercentProperty=b,this.notifyPropertyChanged(g.PROPERTY.IS_ONE_HUNDRED_PERCENT)},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"yRangeMode",{get:function(){return this.yRangeModeProperty},set:function(b){this.yRangeModeProperty!==b&&(this.yRangeModeProperty=b,this.notifyPropertyChanged(g.PROPERTY.YRANGEMODE))},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"dataSeries",{get:function(){throw Error("dataSeries property is not supported for BaseStackedCollection")},set:function(b){throw Error("dataSeries property is not supported for BaseStackedCollection")},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"drawNaNAs",{get:function(){throw Error("drawNaNAs property is not supported for BaseStackedCollection")},set:function(b){throw Error("drawNaNAs property is not supported for BaseStackedCollection")},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"drawingProviders",{get:function(){throw Error("drawingProviders property is not supported for BaseStackedCollection")},set:function(b){throw Error("drawingProviders property is not supported for BaseStackedCollection")},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"hitTestProvider",{get:function(){throw Error("hitTestProvider property is not supported for BaseStackedCollection, call hitTestProvider on BaseStackedRenderableSeries instead")},set:function(b){throw Error("hitTestProvider property is not supported for BaseStackedCollection, call hitTestProvider on BaseStackedRenderableSeries instead")},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"paletteProvider",{get:function(){throw Error("paletteProvider property is not supported for BaseStackedCollection")},set:function(b){throw Error("paletteProvider property is not supported for BaseStackedCollection")},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"pointMarker",{get:function(){throw Error("pointMarker property is not supported for BaseStackedCollection")},set:function(b){throw Error("pointMarker property is not supported for BaseStackedCollection")},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"rolloverModifierProps",{get:function(){throw Error("rolloverModifierProps property is not supported for BaseStackedCollection")},set:function(b){throw Error("rolloverModifierProps property is not supported for BaseStackedCollection")},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"stroke",{get:function(){throw Error("stroke property is not supported for BaseStackedCollection")},set:function(b){throw Error("stroke property is not supported for BaseStackedCollection")},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"strokeThickness",{get:function(){throw Error("strokeThickness property is not supported for BaseStackedCollection")},set:function(b){throw Error("strokeThickness property is not supported for BaseStackedCollection")},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"effect",{get:function(){throw Error("effect property is not supported for BaseStackedCollection")},set:function(b){throw Error("effect property is not supported for BaseStackedCollection")},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"opacity",{get:function(){throw Error("opacity property is not supported for BaseStackedCollection")},set:function(b){throw Error("effect property is not supported for BaseStackedCollection")},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"rolloverModifierProps1",{get:function(){throw Error("rolloverModifierProps1() method is not supported for BaseStackedCollection")},set:function(b){throw Error("rolloverModifierProps1() method is not supported for BaseStackedCollection")},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"resamplingMode",{get:function(){throw Error("resamplingMode property is not supported for BaseStackedCollection")},set:function(b){throw Error("resamplingMode property is not supported for BaseStackedCollection")},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"resamplingPrecision",{get:function(){throw Error("resamplingPrecision property is not supported for BaseStackedCollection")},set:function(b){throw Error("resamplingPrecision property is not supported for BaseStackedCollection")},enumerable:!1,configurable:!0}),m.prototype.getSurfaceRenderOrder=function(){var b,S;return(b=this.surfaceRenderOrderProperty)!==null&&b!==void 0?b:(S=this.parentSurface)===null||S===void 0?void 0:S.getSurfaceRenderOrder()},m.prototype.setSurfaceRenderOrder=function(b){this.surfaceRenderOrderProperty!=b&&(this.surfaceRenderOrderProperty=b,this.notifyPropertyChanged(g.PROPERTY.SURFACE_RENDER_ORDER))},m.prototype.getRenderLayer=function(){if(this.renderLayerProperty===s.EDefaultRenderLayer.SeriesLayer){if(this.isSelected)return s.EDefaultRenderLayer.SelectedSeriesLayer;if(this.isHovered)return s.EDefaultRenderLayer.HoveredSeriesLayer}return this.renderLayerProperty},m.prototype.setRenderLayer=function(b){this.renderLayerProperty!=b&&(this.renderLayerProperty=b,this.notifyPropertyChanged(g.PROPERTY.RENDER_LAYER))},m.prototype.getRenderOrder=function(){return this.renderOrderProperty},m.prototype.setRenderOrder=function(b){this.renderOrderProperty!=b&&(this.renderOrderProperty=b,this.notifyPropertyChanged(g.PROPERTY.RENDER_LAYER))},m.prototype.setRenderNextTo=function(b,S){S===void 0&&(S=0),b===void 0?this.renderNextToProperty=void 0:this.renderNextToProperty={renderable:b,offset:S}},m.prototype.getRenderNextTo=function(){return this.renderNextToProperty},m.prototype.setAccumulatedValuesDirty=function(){this.isAccumulatedVectorDirty=!0},m.prototype.getIndicesRange=function(b){throw Error("getIndicesRange() method is not supported for BaseStackedCollection")},m.prototype.getDataPointWidth=function(b,S,_){throw Error("getDataPointWidth() method is not supported for BaseStackedCollection")},Object.defineProperty(m.prototype,"canDraw",{get:function(){return p.animationHelpers.checkCanDraw(this.animationFSM)},enumerable:!1,configurable:!0}),m.prototype.pushPalettedColors=function(b,S){throw new Error("Method not implemented.")},m.prototype.getSeriesInfo=function(b){throw new Error("Method not implemented.")},m.prototype.applyTheme=function(b){this.asArray().forEach(function(S){S.applyTheme(b)})},m.prototype.delete=function(){this.accumulatedValues0=(0,n.deleteSafe)(this.accumulatedValues0),this.accumulatedFinalAnimationValues0=(0,n.deleteSafe)(this.accumulatedFinalAnimationValues0),this.dataLabelProviderProperty=(0,n.deleteSafe)(this.dataLabelProvider),this.asArray().forEach(function(b){b.delete()})},m.prototype.notifyPropertyChanged=function(b){this.invalidateParent()},m.prototype.onDpiChanged=function(b){this.asArray().forEach(function(S){return S.onDpiChanged(b)})},m.prototype.getBaseXValues=function(){return[]},m.prototype.getDataSeriesName=function(){return"Stacked Collection"},m.prototype.getDataSeriesValuesCount=function(){if(this.getNativeXValues())return this.getNativeXValues().size()},Object.defineProperty(m.prototype,"isRunningDataAnimation",{get:function(){return this.isRunningAnimation&&this.animationFSM&&(this.animationFSM.animation.isDataSeriesAnimation||this.animationFSM.animation.isOnStartAnimation)},enumerable:!1,configurable:!0}),m.prototype.getNativeXValues=function(){var b;if(this.size()!==0)return(b=this.get(0).dataSeries)===null||b===void 0?void 0:b.getNativeXValues()},m.prototype.getNativeYValues=function(){throw Error("getNativeYValues() method is not supported for BaseStackedCollection")},m.prototype.getYRange=function(b,S){var _=this;if(!this.isEnoughDataToDraw())return new o.NumberRange;this.updateAccumulatedVectors();var C;return this.getVisibleSeries().forEach(function(T){if(T.accumulatedValues.size()===_.getNativeXValues().size()){var x=(0,h.getWindowedYRange)(_.webAssemblyContext,_.getNativeXValues(),T.getAccumulatedValues(_.isRunningDataAnimation),b,!0,S,T.dataSeries.dataDistributionCalculator.isSortedAscending,!0,_.yRangeMode===u.EYRangeMode.Visible?l.ESearchMode.RoundUp:l.ESearchMode.RoundDown,_.yRangeMode===u.EYRangeMode.Visible?l.ESearchMode.RoundDown:l.ESearchMode.RoundUp);x&&(C=C?C.union(x):x)}}),C||new o.NumberRange},m.prototype.hasDataSeries=function(){return!!this.getNativeXValues()},m.prototype.hasStrokePaletteProvider=function(){return!1},m.prototype.hasFillPaletteProvider=function(){return!1},m.prototype.hasPointMarkerPaletteProvider=function(){return!1},m.prototype.onAttach=function(b){if(this.parentSurface=b,this.linkAxes(),this.invalidateParentCallback)throw new Error("Invalid operation in sciChartSurface.attachSeries, this series has already been attached to a SciChartSurface. Please detach it from a SciChartSurface before attaching to another");this.invalidateParentCallback=b.invalidateElement},m.prototype.onDetach=function(){this.invalidateParentCallback=void 0,this.parentSurface=void 0},m.prototype.getVisibleSeries=function(){return this.asArray().filter(function(b){return b.isVisible})},m.prototype.enqueueAnimation=function(b){this.animationQueue.push(b),this.invalidateParent()},m.prototype.runAnimation=function(b){this.animationQueue=[],this.animationFSM.toCompleted(),this.afterAnimationComplete()},Object.defineProperty(m.prototype,"animation",{set:function(b){b&&this.animationQueue.push(b),this.invalidateParent()},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"isRunningAnimation",{get:function(){return!!(p.animationHelpers.checkIsAnimationRunning(this.animationQueue,this.animationFSM)||this.getVisibleSeries().some(function(b){return b.isRunningAnimation}))},enumerable:!1,configurable:!0}),m.prototype.onAnimate=function(b){var S;if(!this.animationFSM||!((S=this.animationFSM)===null||S===void 0)&&S.is([e.EAnimationState.Completed]))if(this.animationQueue.length>=1){var _=this.animationQueue.shift();this.animationFSM=new e.SeriesAnimationFiniteStateMachine(_,void 0)}else this.animationFSM=void 0;this.getVisibleSeries().forEach(function(C){C.isRunningAnimation&&C.onAnimate(b)}),this.animationFSM&&p.animationHelpers.animationUpdate(this.animationFSM,b,this.beforeAnimationStart,this.afterAnimationComplete,this.updateAnimationProperties)},m.prototype.checkIsOutOfDataRange=function(b,S){throw Error("checkIsOutOfDataRange() method is not supported for BaseStackedCollection")},m.prototype.toPointSeries=function(b){},m.prototype.getCurrentRenderPassData=function(){return this.currentRenderPassData},m.prototype.setCurrentRenderPassData=function(b){this.currentRenderPassData=b},m.prototype.getResamplingParams=function(){},Object.defineProperty(m.prototype,"dataLabelProvider",{get:function(){return this.dataLabelProviderProperty},set:function(b){this.dataLabelProviderProperty=b,b.onAttach(this.webAssemblyContext,this),this.notifyPropertyChanged(g.PROPERTY.SERIES_TEXT_PROVIDER)},enumerable:!1,configurable:!0}),m.prototype.toJSON=function(b){var S;b===void 0&&(b=!1);for(var _=[],C=0,T=this.asArray();C<T.length;C++){var x=T[C];_.push(x.toJSON(b))}var A=this.getRenderNextTo(),w=A&&{renderable:typeof A.renderable=="string"?A.renderable:A.renderable.id,offset:A.offset},L={isVisible:this.isVisible,isOneHundredPercent:this.isOneHundredPercent,xAxisId:this.xAxisId,yAxisId:this.yAxisId,yRangeMode:this.yRangeMode,dataLabelProvider:(S=this.dataLabelProvider)===null||S===void 0?void 0:S.toJSON(),surfaceRenderOrder:this.surfaceRenderOrderProperty,renderLayer:this.getRenderLayer(),renderOrder:this.getRenderOrder(),renderNextTo:w};return{type:this.type,series:_,options:L}},m.prototype.resolveAutoColors=function(b,S,_){throw Error("resolveAutoColors method is not supported for BaseStackedCollection.  Call on collection items individually")},m.prototype.adjustAutoColor=function(b,S){return S},m.prototype.linkAxes=function(){if((0,t.updateAxisIds)(this),!!this.parentSurface){if(!this.xAxisProperty&&this.xAxisId){var b=this.parentSurface.getXAxisById(this.xAxisId);b?this.xAxisProperty=b:(console.warn('StackedCollection looked for xAxis Id "'.concat(this.xAxisId,'" but did not find. Default xAxis will be used')),this.xAxisProperty=this.parentSurface.getDefaultXAxis())}if(!this.yAxisProperty&&this.yAxisId){var S=this.parentSurface.getYAxisById(this.yAxisId);S?this.yAxisProperty=S:(console.warn('StackedCollection looked for yAxis Id "'.concat(this.yAxisId,'" but did not find. Default yAxis will be used')),this.yAxisProperty=this.parentSurface.getDefaultYAxis())}}},m.prototype.isAllDataSeriesSet=function(){var b=!0;return this.asArray().forEach(function(S){S.dataSeries||(b=!1)}),b},m.prototype.invalidateParent=function(){this.invalidateParentCallback&&this.invalidateParentCallback()},m.prototype.getFirstSeries=function(){if(this.size()!==0)return this.get(0)},m.prototype.getParentSurface=function(){return this.parentSurface},m.prototype.beforeAnimationStart=function(){this.updateAccumulatedVectors(),(0,c.copyDoubleVector)(this.accumulatedValues0,this.accumulatedFinalAnimationValues0,this.webAssemblyContext),this.getVisibleSeries().forEach(function(b){b.beforeAnimationStart()})},m.prototype.afterAnimationComplete=function(){this.getVisibleSeries().forEach(function(b){b.afterAnimationComplete()})},m.prototype.updateAnimationProperties=function(b,S){this.isAllDataSeriesSet()&&(S.animation.calculateAnimationValues(this.webAssemblyContext,this.accumulatedFinalAnimationValues0,this.accumulatedValues0,b),this.getVisibleSeries().forEach(function(_){_.updateAnimationProperties(b,S)})),this.invalidateParentCallback&&this.invalidateParentCallback()},m.prototype.updateHitTestProviders=function(b){this.getVisibleSeries().forEach(function(S){var _;(_=S.hitTestProvider)===null||_===void 0||_.update(b)})},m.prototype.isEnoughDataToDraw=function(){var b=this.getVisibleSeries().length;if(b<1)return!1;for(var S=0;S<b;S++)if(!this.get(S).dataSeries)return!1;for(var S=0;S<b;S++)if(this.get(S).dataSeries.count()===0)return!1;return!0},m})(a.ObservableArray);return vC.BaseStackedCollection=v,vC}var yC={},mC={},Iee;function RM(){if(Iee)return mC;Iee=1;var r=mC&&mC.__assign||function(){return r=Object.assign||function(l){for(var u,c=1,d=arguments.length;c<d;c++){u=arguments[c];for(var f in u)Object.prototype.hasOwnProperty.call(u,f)&&(l[f]=u[f])}return l},r.apply(this,arguments)};Object.defineProperty(mC,"__esModule",{value:!0}),mC.BaseDataLabelProvider=void 0;var e=ni(),i=Du(),n=mi(),t=gs(),o=Xi(),a=Hi(),s=(function(){function l(u){var c=this,d;this.dataLabels=[],this.drawImmediate=!1,this.getstyleProxy=function(f){return new Proxy(f,{set:function(h,p,g){return h[p]=g,c.invalidateParent(),!0}})},this.styleProperty=r({fontFamily:"Default"},u==null?void 0:u.style),this.colorProperty=u==null?void 0:u.color,this.drawImmediate=(d=u==null?void 0:u.drawImmediate)!==null&&d!==void 0?d:this.drawImmediate}return Object.defineProperty(l.prototype,"useRotation",{get:function(){return!1},enumerable:!1,configurable:!0}),l.prototype.onAttach=function(u,c){e.Guard.notNull(u,"webAssemblyContext"),e.Guard.notNull(c,"parentSeries"),this.webAssemblyContext=u,this.parentSeries=c},l.prototype.onDetach=function(){this.webAssemblyContext=void 0,this.parentSeries=void 0},l.prototype.delete=function(){},Object.defineProperty(l.prototype,"style",{get:function(){return this.styleProperty},set:function(u){this.styleProperty=this.getstyleProxy(u),this.invalidateParent()},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"color",{get:function(){var u,c,d;return this.colorProperty?(0,t.stripAutoColor)(this.colorProperty):(d=(c=(u=this.parentSeries)===null||u===void 0?void 0:u.parentSurface)===null||c===void 0?void 0:c.themeProvider)===null||d===void 0?void 0:d.tickTextBrush},set:function(u){this.colorProperty=u,this.invalidateParent()},enumerable:!1,configurable:!0}),l.prototype.updateStyle=function(u){this.styleProperty=this.getstyleProxy(r(r({},this.styleProperty),u)),this.invalidateParent()},l.prototype.generateDataLabels=function(u,c){},l.prototype.draw=function(u){var c,d;if(!(!this.dataLabels||this.dataLabels.length===0)&&!(!this.style||!this.style.fontFamily||!this.style.fontSize)){for(var f=(0,n.parseColorToUIntArgb)(this.color),h=a.DpiHelper.adjustTextStyle(this.style),p=u.getFont(h,this.useRotation),g=(0,i.convertMultiLineAlignment)(this.style.multiLineAlignment,this.webAssemblyContext),v=0,y=this.dataLabels;v<y.length;v++){var m=y[v],b=this.parentSeries.parentSurface.seriesViewRect,S=b.left,_=b.top,C=(0,o.getVector4)(this.webAssemblyContext,m.rotationCenter.x+S,m.rotationCenter.y+_,m.rotationAngle,0);p.DrawStringAdvanced((c=m.text)!==null&&c!==void 0?c:"",(d=m.color)!==null&&d!==void 0?d:f,Math.round(S+m.position.x),Math.round(_+m.position.y),C,g,this.getLineSpacing())}this.drawImmediate&&p.End(),this.dataLabels=[]}},l.prototype.resolveAutoColors=function(u,c,d){if(this.colorProperty&&this.colorProperty.startsWith(t.AUTO_COLOR)){var f=d.getStrokeColor(u,c,this.webAssemblyContext);this.color=t.AUTO_COLOR+f}},l.prototype.toJSON=function(){return{type:this.type,options:{style:this.style,color:this.color}}},l.prototype.invalidateParent=function(){var u;!((u=this.parentSeries)===null||u===void 0)&&u.invalidateParentCallback&&this.parentSeries.invalidateParentCallback()},l.prototype.getLineSpacing=function(){var u,c;return(c=(u=this.style)===null||u===void 0?void 0:u.lineSpacing)!==null&&c!==void 0?c:3},l})();return mC.BaseDataLabelProvider=s,mC}var Nee;function pSe(){if(Nee)return yC;Nee=1;var r=yC&&yC.__extends||(function(){var n=function(t,o){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(a[l]=s[l])},n(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");n(t,o);function a(){this.constructor=t}t.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}})();Object.defineProperty(yC,"__esModule",{value:!0}),yC.StackedCollectionDataLabelProvider=void 0;var e=RM(),i=(function(n){r(t,n);function t(){return n.call(this)||this}return t.prototype.generateDataLabels=function(o,a){},t.prototype.draw=function(o){for(var a=0,s=this.parentSeries.asArray();a<s.length;a++){var l=s[a];l.isVisible&&l.dataLabelProvider.draw(o)}},t})(e.BaseDataLabelProvider);return yC.StackedCollectionDataLabelProvider=i,yC}var sh={},Fee;function Qn(){if(Fee)return sh;Fee=1,Object.defineProperty(sh,"__esModule",{value:!0}),sh.vectorToArrayViewI32=sh.vectorToArrayViewUi32=sh.vectorToArrayViewF32=sh.vectorToArrayViewF64=sh.vectorToArray=void 0;function r(o,a){var s;return a.UIntVector&&o instanceof a.UIntVector||a.SCRTUintVector&&o instanceof a.SCRTUintVector?s=n(o,a):a.IntVector&&o instanceof a.IntVector?s=t(o,a):a.FloatVector&&o instanceof a.FloatVector||a.SCRTFloatVector&&o instanceof a.SCRTFloatVector?s=i(o,a):s=e(o,a),Array.from(s)}sh.vectorToArray=r;function e(o,a){if(o){var s=o.dataPtrZero?o.dataPtrZero():o.dataPtr(0),l=o.size();return new Float64Array(a.HEAPF64.buffer,s,l)}}sh.vectorToArrayViewF64=e;function i(o,a){var s=o.dataPtr(0),l=o.size();return new Float32Array(a.HEAPF32.buffer,s,l)}sh.vectorToArrayViewF32=i;function n(o,a){var s=o.dataPtr(0),l=o.size();return new Uint32Array(a.HEAPU32.buffer,s,l)}sh.vectorToArrayViewUi32=n;function t(o,a){var s=o.dataPtr(0),l=o.size();return new Int32Array(a.HEAP32.buffer,s,l)}return sh.vectorToArrayViewI32=t,sh}var bC={},jee;function ZF(){if(jee)return bC;jee=1;var r=bC&&bC.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(bC,"__esModule",{value:!0}),bC.XyyPointSeriesWrapped=void 0;var e=xo(),i=ki(),n=iy(),t=(function(o){r(a,o);function a(s,l,u){var c=o.call(this,s,[l,u],i.EDataSeriesValueType.Default,[e.EValueName.Y,e.EValueName.Y1])||this;return c.type=i.EDataSeriesType.Xyy,c}return Object.defineProperty(a.prototype,"y1Values",{get:function(){return this.yValuesArray[1]},enumerable:!1,configurable:!0}),a.prototype.getYValues=function(s){return s===1?this.y1Values:this.yValues},a})(n.BasePointSeriesWrapped);return bC.XyyPointSeriesWrapped=t,bC}var fm={},SC={},uI={},Bee;function h8(){if(Bee)return uI;Bee=1,Object.defineProperty(uI,"__esModule",{value:!0}),uI.createSolidBrush=void 0;var r=So(),e=iu(),i=mi(),n=function(t,o,a){if(!(r.IS_TEST_ENV||!o)){var s=(0,e.uintArgbColorMultiplyOpacity)((0,i.parseColorToUIntArgb)(o),a),l=(0,e.uintArgbColorIsTransparent)(s);if(isNaN(s))throw new Error("Color code ".concat(o," cannot be converted to an ARGB integer"));return new t.SCRTSolidBrush(s,l)}};return uI.createSolidBrush=n,uI}var _C={},Vee;function gSe(){if(Vee)return _C;Vee=1;var r=_C&&_C.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(_C,"__esModule",{value:!0}),_C.WebGlBrush=void 0;var e=$n(),i=Mr(),n=Hbe(),t=(function(o){r(a,o);function a(s){var l=o.call(this)||this;return l.scrtBrushProperty=s,l}return Object.defineProperty(a.prototype,"scrtBrush",{get:function(){return this.scrtBrushProperty},enumerable:!1,configurable:!0}),a.prototype.delete=function(){this.scrtBrushProperty=(0,i.deleteSafe)(this.scrtBrushProperty)},a.prototype.getBrushType=function(){return n.EDrawingTypes.WasmBrush},a.prototype.setOpacity=function(s){var l;(l=this.scrtBrushProperty)===null||l===void 0||l.SetOpacity(s)},a})(e.DeletableEntity);return _C.WebGlBrush=t,_C}var Hee;function hl(){return Hee||(Hee=1,(function(r){var e=SC&&SC.__extends||(function(){var g=function(v,y){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,b){m.__proto__=b}||function(m,b){for(var S in b)Object.prototype.hasOwnProperty.call(b,S)&&(m[S]=b[S])},g(v,y)};return function(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");g(v,y);function m(){this.constructor=v}v.prototype=y===null?Object.create(y):(m.prototype=y.prototype,new m)}})(),i=SC&&SC.__assign||function(){return i=Object.assign||function(g){for(var v,y=1,m=arguments.length;y<m;y++){v=arguments[y];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(g[b]=v[b])}return g},i.apply(this,arguments)};Object.defineProperty(r,"__esModule",{value:!0}),r.createBrushInCache=r.getScrtBrushFromCache=r.getWebGlBrushFromCache=r.BrushCache=void 0;var n=Mr(),t=ni(),o=h8(),a=B1(),s=NH(),l=gSe(),u=256,c=(function(g){e(v,g);function v(){return g!==null&&g.apply(this,arguments)||this}return Object.defineProperty(v.prototype,"value",{get:function(){return!this.cachedEntity&&(this.fill||this.fillLinearGradient||this.customTextureOptions)&&(this.cachedEntity=this.create(this.fill,this.opacity,this.textureHeightRatio,this.textureWidthRatio,this.fillLinearGradient,this.customTextureOptions)),this.cachedEntity},enumerable:!1,configurable:!0}),v.prototype.defaultCustomEquals=function(y,m){return y===m},v.prototype.create=function(y,m,b,S,_,C){var T,x,A,w;b=(T=C==null?void 0:C.textureHeight)!==null&&T!==void 0?T:b,S=(x=C==null?void 0:C.textureWidth)!==null&&x!==void 0?x:S;var L=(A=C==null?void 0:C.areEqual)!==null&&A!==void 0?A:this.defaultCustomEquals;if(this.cachedEntity&&y===this.fill&&m===this.opacity&&b===this.textureHeightRatio&&S===this.textureWidthRatio&&_===this.fillLinearGradient&&C===this.customTextureOptions&&L((w=this.customTextureOptions)===null||w===void 0?void 0:w.options,C==null?void 0:C.options))return this.cachedEntity;this.invalidateCache(),this.fill=y,this.opacity=m,this.textureHeightRatio=b,this.textureWidthRatio=S,this.fillLinearGradient=_,this.customTextureOptions=C;var k;return C?k=this.createCustomBrush():_?k=this.createGradientBrush():k=this.createSolidBrush(y,m),this.cachedEntity=new l.WebGlBrush(k)},v.prototype.createCustomBrush=function(){var y;this.canvasTexture=new a.CanvasTexture(this.webAssemblyContext,this.textureWidthRatio,this.textureHeightRatio),this.canvasTexture.clear();var m=this.canvasTexture.getContext();this.customTextureOptions.createTexture(m,i({fill:this.fill,opacity:this.opacity},this.customTextureOptions.options)),this.canvasTexture.copyTexture();var b=this.canvasTexture.getTexture(),S=new this.webAssemblyContext.SCRTTextureBrush(b,(y=this.customTextureOptions.isPerPrimitive)!==null&&y!==void 0&&y?this.webAssemblyContext.eSCRTBrushMappingMode.PerPrimitive:this.webAssemblyContext.eSCRTBrushMappingMode.PerScreen,1);return this.customTextureOptions.repeat&&(S.SetSamplerMode(this.webAssemblyContext.SCRTTextureBrushSamplerMode.Wrap),S.SetMappingMode(this.webAssemblyContext.eSCRTBrushMappingMode.PerScreen)),S},v.prototype.invalidateCache=function(){g.prototype.invalidateCache.call(this),this.canvasTexture=(0,n.deleteSafe)(this.canvasTexture)},v.prototype.reset=function(){this.invalidateCache(),this.fill=void 0,this.opacity=void 0,this.fillLinearGradient=void 0},v.prototype.delete=function(){this.invalidateCache()},v.prototype.createSolidBrush=function(y,m){return(0,o.createSolidBrush)(this.webAssemblyContext,y,m)},v.prototype.createGradientBrush=function(){var y=this.createGradientTexture().getTexture();return new this.webAssemblyContext.SCRTTextureBrush(y,this.webAssemblyContext.eSCRTBrushMappingMode.PerPrimitive,1)},v.prototype.createGradientTexture=function(){t.Guard.notNull(this.fillLinearGradient,"fillLinearGradient");var y=this.fillLinearGradient,m=y.startPoint,b=y.endPoint,S=y.gradientStops;this.canvasTexture=new a.CanvasTexture(this.webAssemblyContext,u,u),this.canvasTexture.clear();var _=this.canvasTexture.getContext(),C=p(m.x,u*this.textureWidthRatio),T=p(m.y,u*this.textureHeightRatio),x=p(b.x,u*this.textureWidthRatio),A=p(b.y,u*this.textureHeightRatio),w=_.createLinearGradient(C,T,x,A);return S.forEach(function(L){w.addColorStop(L.offset,L.color)}),_.fillStyle=w,_.fillRect(0,0,u,u),this.canvasTexture.copyTexture(),this.canvasTexture},v})(s.BaseCache);r.BrushCache=c;var d=function(g){return t.Guard.notNull(g,"cache"),g.value};r.getWebGlBrushFromCache=d;var f=function(g){var v=(0,r.getWebGlBrushFromCache)(g);return v==null?void 0:v.scrtBrush};r.getScrtBrushFromCache=f;var h=function(g,v,y,m,b,S,_){t.Guard.notNull(g,"brushCache");var C=g.create(v,y,m,b,S,_);return C.scrtBrush};r.createBrushInCache=h;var p=function(g,v){return g*v}})(SC)),SC}var PC={},CC={},Uee;function tze(){if(Uee)return CC;Uee=1;var r=CC&&CC.__extends||(function(){var t=function(o,a){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");t(o,a);function s(){this.constructor=o}o.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}})();Object.defineProperty(CC,"__esModule",{value:!0}),CC.PaletteCache=void 0;var e=Mr(),i=NH(),n=(function(t){r(o,t);function o(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(o.prototype,"value",{get:function(){return!this.cachedEntity&&this.fillColors&&(this.cachedEntity=this.create(this.fillColors)),this.cachedEntity},enumerable:!1,configurable:!0}),o.prototype.create=function(a){return this.cachedEntity&&a===this.fillColors?this.cachedEntity:((0,e.deleteSafe)(this.cachedEntity),this.fillColors=a,this.cachedEntity=new this.webAssemblyContext.SCRTCreatePalette(a))},o.prototype.reset=function(){this.invalidateCache(),this.fillColors=void 0},o})(i.BaseCache);return CC.PaletteCache=n,CC}var zee;function vl(){if(zee)return PC;zee=1;var r=PC&&PC.__extends||(function(){var v=function(y,m){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,S){b.__proto__=S}||function(b,S){for(var _ in S)Object.prototype.hasOwnProperty.call(S,_)&&(b[_]=S[_])},v(y,m)};return function(y,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");v(y,m);function b(){this.constructor=y}y.prototype=m===null?Object.create(m):(b.prototype=m.prototype,new b)}})();Object.defineProperty(PC,"__esModule",{value:!0}),PC.BaseSeriesDrawingProvider=void 0;var e=So(),i=$n(),n=Mr(),t=ni(),o=xo(),a=iu(),s=Il(),l=mi(),u=ca(),c=Qn(),d=tze(),f=H0(),h=h8(),p=Ji(),g=(function(v){r(y,v);function y(m,b,S,_){var C=this,T;return C=v.call(this)||this,t.Guard.notNull(m,"webAssemblyContext"),t.Guard.notNull(b,"parentSeries"),C.webAssemblyContext=m,C.parentSeries=b,_&&(C.xSelector=_),S&&(C.ySelector=S),C.palettingState={palettedColors:void 0,palettedColorsHashCode:0,gradientPaletting:!1,paletteTextureCache:new d.PaletteCache(m),requiresUpdate:!0},C.seriesHasDataChanges=C.seriesHasDataChanges.bind(C),C.parentDataSeries=C.parentSeries.dataSeries,(T=C.parentDataSeries)===null||T===void 0||T.dataChanged.subscribe(C.seriesHasDataChanges),C}return y.prototype.xSelector=function(m){return m.xValues},y.prototype.ySelector=function(m){var b=this.parentSeries.yArrayFilter;return b?typeof b=="number"?m.getYValues(b,!1):m.getYValuesByName(b,!1):m.yValues},y.prototype.getStartAndCount=function(m,b){var S,_,C,T=m==null?void 0:m.pointSeries,x=(S=this.parentSeries)===null||S===void 0?void 0:S.xAxis,A=(_=x==null?void 0:x.clipToXRange)!==null&&_!==void 0?_:!0,w=b.size(),L=Math.min(T?T.xValues.size():w,w),k=0;return A&&!(T!=null&&T.resampled)&&((C=m==null?void 0:m.indexRange)===null||C===void 0?void 0:C.diff)>=0&&(m.indexRange.diff+1<L&&(k=m.indexRange.min),L=Math.min(m.indexRange.diff+1,L)),{startIndex:k,count:L}},y.prototype.applyStrokePaletting=function(m,b){var S,_,C,T,x,A,w,L=u.PerformanceDebugHelper.mark(u.EPerformanceMarkType.PaletteProviderStart,{contextId:this.parentSeries.id,parentContextId:(S=this.parentSeries.parentSurface)===null||S===void 0?void 0:S.id,level:u.EPerformanceDebugLevel.Verbose}),k=this.parentSeries.paletteProvider;if(this.parentSeries.hasStrokePaletteProvider()||k.applyPaletting!==void 0){var D=(0,a.uintArgbColorMultiplyOpacity)((0,l.parseColorToUIntArgb)(this.parentSeries.stroke),this.parentSeries.opacity);if(isNaN(D))throw Error("applyStrokePaletting(): renderSeries.stroke "+this.parentSeries.stroke+" cannot be converted to a valid color");var j=this.parentSeries.paletteProvider,N=this.parentSeries.dataSeries;b=b??this.parentSeries.getCurrentRenderPassData();var V=b==null?void 0:b.pointSeries,W=(_=V?this.xSelector(V):void 0)!==null&&_!==void 0?_:N.getNativeXValues(),K=(C=V?this.ySelector(V):void 0)!==null&&C!==void 0?C:N.getNativeYValues(),H=this.getStartAndCount(b,W),U=H.startIndex,I=H.count;this.palettingState.palettedColors||(this.palettingState.palettedColors=new this.webAssemblyContext.UIntVector),this.palettingState.originalPenColor=m.m_uiColor,m.m_uiColor=e.NEUTRAL_COLOR,m.m_bGradient=j.strokePaletteMode===f.EStrokePaletteMode.GRADIENT;for(var Q=new Map,Z=0,ee=N.valueNames;Z<ee.length;Z++){var ie=ee[Z];ie!==o.EValueName.Y&&Q.set(ie,(0,c.vectorToArrayViewF64)(N.getYValuesByName(ie),this.webAssemblyContext))}if(k.applyPaletting){k.applyPaletting(this.palettingState,W,K,(T=V==null?void 0:V.indexes)!==null&&T!==void 0?T:N.getNativeIndexes(),U,I,Q);return}if(this.shouldUpdatePalette(b,j,U,I,!1),!this.palettingState.requiresUpdate)return;this.palettingState.palettedColors.resize(I,0);for(var de=N.count(),pe=V&&V.indexes.size()>0,_e=(0,c.vectorToArrayViewF64)(V==null?void 0:V.indexes,this.webAssemblyContext),Te=(0,c.vectorToArrayViewF64)(W,this.webAssemblyContext),De=(0,c.vectorToArrayViewF64)(K,this.webAssemblyContext),Pe=(0,c.vectorToArrayViewUi32)(this.palettingState.palettedColors,this.webAssemblyContext),Ee=0,Re=U;Re<U+I;Re++){var je=pe?_e[Re]:Re;je<0?je=0:je>=de&&(je=de-1);var Ke=Te[Re],ot=K?De[Re]:void 0,We=j.overrideStrokeArgb(Ke,ot,je,this.parentSeries.opacity,N.getMetadataAt(je),Q);Pe[Ee]=We||D,Ee++}this.palettingState.requiresUpdate=!1}else this.palettingState.originalPenColor&&(m.m_uiColor=this.palettingState.originalPenColor,this.palettingState.originalPenColor=void 0),(x=this.palettingState.palettedColors)===null||x===void 0||x.clear();this.palettingState.palettedColors||(this.palettingState.palettedColors=new this.webAssemblyContext.UIntVector),u.PerformanceDebugHelper.mark(u.EPerformanceMarkType.PaletteProviderEnd,{contextId:this.parentSeries.id,parentContextId:(A=this.parentSeries.parentSurface)===null||A===void 0?void 0:A.id,relatedId:(w=L==null?void 0:L.detail)===null||w===void 0?void 0:w.relatedId,level:u.EPerformanceDebugLevel.Verbose})},y.prototype.applyStrokeFillPaletting=function(m,b,S,_,C,T,x,A){var w,L,k,D,j,N,V,W,K;T===void 0&&(T=!1),x===void 0&&(x=!0);var H=u.PerformanceDebugHelper.mark(u.EPerformanceMarkType.PaletteProviderStart,{contextId:this.parentSeries.id,parentContextId:(w=this.parentSeries.parentSurface)===null||w===void 0?void 0:w.id,level:u.EPerformanceDebugLevel.Verbose}),U=this.parentSeries.hasStrokePaletteProvider(),I=this.parentSeries.hasFillPaletteProvider(),Q=this.parentSeries.hasPointMarkerPaletteProvider(),Z=this.parentSeries.paletteProvider,ee=this.parentSeries.paletteProvider,ie=(ee==null?void 0:ee.applyPaletting)!==void 0;if(U||I||Q||ie){var de=void 0,pe=void 0;if(T)de=pe=this.webAssemblyContext.SCRTPalette.GetNoOverrideColorCode();else{var _e=C!==void 0;de=m&&_e?(0,a.uintArgbColorMultiplyOpacity)((0,l.parseColorToUIntArgb)(m),C):e.NEUTRAL_COLOR,pe=S&&_e?(0,a.uintArgbColorMultiplyOpacity)((0,l.parseColorToUIntArgb)(S),C):e.NEUTRAL_COLOR}if(isNaN(de))throw Error("updatePalette(): parentSeries.stroke "+m+" cannot be converted to a valid color");if(isNaN(pe))throw Error("updatePalette(): fillColor "+pe+" cannot be converted to a valid color");var Te=this.parentSeries.dataSeries;A=A??this.parentSeries.getCurrentRenderPassData();var De=A==null?void 0:A.pointSeries,Pe=(L=De?this.xSelector(De):void 0)!==null&&L!==void 0?L:Te.getNativeXValues(),Ee=(k=De?this.ySelector(De):void 0)!==null&&k!==void 0?k:Te.getNativeYValues(),Re=this.getStartAndCount(A,Pe),je=Re.startIndex,Ke=Re.count;this.palettingState.palettedColors||(this.palettingState.palettedColors=new this.webAssemblyContext.UIntVector);for(var ot=new Map,We=0,xe=Te.valueNames;We<xe.length;We++){var ve=xe[We];ve!==o.EValueName.Y&&ot.set(ve,(0,c.vectorToArrayViewF64)(Te.getYValuesByName(ve),this.webAssemblyContext))}if(ee.applyPaletting){ee.applyPaletting(this.palettingState,Pe,Ee,(D=De==null?void 0:De.indexes)!==null&&D!==void 0?D:Te.getNativeIndexes(),je,Ke,ot);return}if(this.shouldUpdatePalette(A,Z,je,Ke,!0),!this.palettingState.requiresUpdate)return;this.palettingState.paletteTextureCache.reset(),this.palettingState.palettedColors.resize(Ke*2,0),x&&(b&&U&&(this.palettingState.originalPenColor=b.m_uiColor,b.m_uiColor=e.NEUTRAL_COLOR,this.palettingState.originalPenGradient=b.m_bGradient,b.m_bGradient=Z.strokePaletteMode===f.EStrokePaletteMode.GRADIENT),_&&(this.palettingState.originalBrushColor=_.GetColor(),_.SetColor(e.NEUTRAL_COLOR)));for(var he=0,Se=De&&De.indexes.size()>0,be=(0,c.vectorToArrayViewF64)(De==null?void 0:De.indexes,this.webAssemblyContext),ke=(0,c.vectorToArrayViewF64)(Pe,this.webAssemblyContext),qe=(0,c.vectorToArrayViewF64)(Ee,this.webAssemblyContext),rt=(0,c.vectorToArrayViewUi32)(this.palettingState.palettedColors,this.webAssemblyContext),St=0,xt=Te.count(),It=je;It<je+Ke;It++){var Zt=Se?be[It]:It;Zt<0?Zt=0:Zt>=xt&&(Zt=xt-1);var ct=ke[It],Qe=Ee?qe[It]:void 0,Et=this.overridePaletteProviderColors(this.parentSeries,ct,Qe,Zt,C,Te.getMetadataAt(Zt),ot),Gt=(j=Et.stroke)!==null&&j!==void 0?j:de,Xe=(N=Et.fill)!==null&&N!==void 0?N:pe;rt[St]=Gt,St++,rt[St]=Xe,St++,T&&(he=(0,s.numericHashCode)(he,Gt),he=(0,s.numericHashCode)(he,Xe))}T&&(this.palettingState.palettedColorsHashCode!==he&&this.palettingState.paletteTextureCache.reset(),this.palettingState.paletteTextureCache.create(this.palettingState.palettedColors),this.palettingState.palettedColorsHashCode=he),this.palettingState.requiresUpdate=!1}else this.palettingState.paletteTextureCache.reset(),(V=this.palettingState.palettedColors)===null||V===void 0||V.clear(),b&&(this.palettingState.originalPenColor&&(b.m_uiColor=this.palettingState.originalPenColor,this.palettingState.originalPenColor=void 0),this.palettingState.originalPenGradient&&(b.m_bGradient=this.palettingState.originalPenGradient,this.palettingState.originalPenGradient=void 0)),_&&this.palettingState.originalBrushColor&&(_.SetColor(this.palettingState.originalBrushColor),this.palettingState.originalBrushColor=void 0);this.palettingState.palettedColors||(this.palettingState.palettedColors=new this.webAssemblyContext.UIntVector),this.palettingState.gradientPaletting=this.isGradientFillPaletting(this.parentSeries),u.PerformanceDebugHelper.mark(u.EPerformanceMarkType.PaletteProviderEnd,{contextId:this.parentSeries.id,parentContextId:(W=this.parentSeries.parentSurface)===null||W===void 0?void 0:W.id,relatedId:(K=H==null?void 0:H.detail)===null||K===void 0?void 0:K.relatedId,level:u.EPerformanceDebugLevel.Verbose})},y.prototype.createSolidBrush=function(m,b){return(0,h.createSolidBrush)(this.webAssemblyContext,m,b)},y.prototype.delete=function(){var m;this.palettingState.palettedColors&&(this.palettingState.palettedColors=(0,n.deleteSafe)(this.palettingState.palettedColors)),this.palettingState.paletteTextureCache=(0,n.deleteSafe)(this.palettingState.paletteTextureCache),this.parentDataSeries=this.parentSeries.dataSeries,(m=this.parentDataSeries)===null||m===void 0||m.dataChanged.unsubscribe(this.seriesHasDataChanges)},y.prototype.onSeriesPropertyChange=function(m){var b,S;m===p.PROPERTY.DATA_SERIES&&((b=this.parentDataSeries)===null||b===void 0||b.dataChanged.unsubscribe(this.seriesHasDataChanges),this.parentDataSeries=this.parentSeries.dataSeries,(S=this.parentDataSeries)===null||S===void 0||S.dataChanged.subscribe(this.seriesHasDataChanges),this.palettingState.requiresUpdate=!0)},y.prototype.onDpiChanged=function(m){},y.prototype.onAttachSeries=function(){},y.prototype.onDetachSeries=function(){},y.prototype.updateArgs=function(m){},y.prototype.seriesHasDataChanges=function(){this.palettingState.requiresUpdate=!0},y.prototype.shouldUpdatePalette=function(m,b,S,_,C){var T,x,A,w,L,k;!((T=m==null?void 0:m.pointSeries)===null||T===void 0)&&T.resampled&&(m==null?void 0:m.resamplingHash)!==this.palettingState.lastResamplingHash&&(this.palettingState.lastResamplingHash=m==null?void 0:m.resamplingHash,this.palettingState.requiresUpdate=!0),(x=b.isRangeIndependant)!==null&&x!==void 0&&x?((L=this.palettingState.lastStartIndex)!==null&&L!==void 0?L:Number.MAX_SAFE_INTEGER)>S||((k=this.palettingState.lastCount)!==null&&k!==void 0?k:0)<_||S+_>this.palettingState.lastStartIndex+this.palettingState.lastCount?(this.palettingState.lastStartIndex=S,this.palettingState.lastCount=_,this.palettingState.requiresUpdate=!0,this.palettingState.paletteStartIndex=0):this.palettingState.paletteStartIndex=S*(C?2:1)-this.palettingState.lastStartIndex:(((A=this.palettingState.lastStartIndex)!==null&&A!==void 0?A:0)!==S||((w=this.palettingState.lastCount)!==null&&w!==void 0?w:0)!==_)&&(this.palettingState.lastStartIndex=S,this.palettingState.lastCount=_,this.palettingState.requiresUpdate=!0,this.palettingState.paletteStartIndex=0),(!b.shouldUpdatePalette||b.shouldUpdatePalette())&&(this.palettingState.requiresUpdate=!0)},y.prototype.overridePaletteProviderColors=function(m,b,S,_,C,T,x){var A,w;if(m.hasStrokePaletteProvider()){var L=m.paletteProvider;A=L.overrideStrokeArgb(b,S,_,C,T,x)}if(m.hasFillPaletteProvider()){var k=m.paletteProvider;w=k.overrideFillArgb(b,S,_,C,T,x)}return{stroke:A,fill:w}},y.prototype.isGradientFillPaletting=function(m){if(m.hasFillPaletteProvider()){var b=m.paletteProvider;return b.fillPaletteMode===f.EFillPaletteMode.GRADIENT}return!1},y})(i.DeletableEntity);return PC.BaseSeriesDrawingProvider=g,PC}var Wee;function KV(){if(Wee)return fm;Wee=1;var r=fm&&fm.__extends||(function(){var c=function(d,f){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(h[g]=p[g])},c(d,f)};return function(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");c(d,f);function h(){this.constructor=d}d.prototype=f===null?Object.create(f):(h.prototype=f.prototype,new h)}})();Object.defineProperty(fm,"__esModule",{value:!0}),fm.StackedColumnSeriesDrawingProvider=fm.StackedColumnRenderPassData=void 0;var e=Mr(),i=hl(),n=ts(),t=JS(),o=ln(),a=Ji(),s=vl(),l=(function(c){r(d,c);function d(f,h,p,g,v,y,m,b,S,_){var C=c.call(this,f,h,p,g,S,_)||this;return C.columnWidth=v,C.stackedGroupCount=y,C.groupIndex=m,C.spacing=b,C}return d})(t.RenderPassData);fm.StackedColumnRenderPassData=l;var u=(function(c){r(d,c);function d(f,h,p,g){var v=c.call(this,f,h,p,g)||this;return v.nativeDrawingProvider=new f.SCRTStackedColumnSeriesDrawingProvider,v.args=new v.webAssemblyContext.SCRTStackedColumnDrawingParams,v.strokePenCache=new n.Pen2DCache(f),v.strokePenFillColoredCache=new n.Pen2DCache(f),v.fillBrushCache=new i.BrushCache(f),v}return d.prototype.onAttachSeries=function(){c.prototype.onAttachSeries.call(this);var f=this.getProperties(this.parentSeries),h=f.stroke,p=f.strokeThickness,g=f.fill,v=f.opacity;(0,n.createPenInCache)(this.strokePenCache,h,p,v),p===0&&(0,n.createPenInCache)(this.strokePenFillColoredCache,g,1,v),this.createBrush()},d.prototype.delete=function(){this.nativeDrawingProvider=(0,e.deleteSafe)(this.nativeDrawingProvider),this.args=(0,e.deleteSafe)(this.args),this.strokePenCache=(0,e.deleteSafe)(this.strokePenCache),this.strokePenFillColoredCache=(0,e.deleteSafe)(this.strokePenFillColoredCache),this.fillBrushCache=(0,e.deleteSafe)(this.fillBrushCache),c.prototype.delete.call(this)},d.prototype.getProperties=function(f){var h=f.stroke,p=f.strokeThickness,g=f.opacity,v=f.fill,y=f.fillLinearGradient,m=f.customTextureOptions;return{stroke:h,strokeThickness:p,opacity:g,fill:v,fillLinearGradient:y,customTextureOptions:m}},d.prototype.draw=function(f,h){var p=h.pointSeries,g=this.parentSeries.parentSurface.seriesViewRect,v=this.getProperties(this.parentSeries),y=v.strokeThickness;v.fill,this.args.Reset(),this.args.forceShaderMethod=!0,this.args.verticalChart=h.isVerticalChart,this.args.columnWidth=h.columnWidth,this.args.spacing=h.spacing,this.args.stackedGroupCount=h.stackedGroupCount,this.args.stackedGroupIndex=h.groupIndex;var m=this.strokePenCache;h.columnWidth===1&&y===0&&(this.args.columnWidth=0,m=this.strokePenFillColoredCache);var b=(0,n.getScrtPenFromCache)(m);b&&this.args.SetLinesPen(b);var S=(0,i.getScrtBrushFromCache)(this.fillBrushCache);S&&this.args.SetFillBrush(S),this.args.viewportWidth=g.width,this.args.viewportHeight=g.height,c.prototype.applyStrokeFillPaletting.call(this,this.parentSeries.stroke,b,this.parentSeries.fill,S,this.parentSeries.opacity,!1,this.parentSeries.fillLinearGradient!==void 0,h),this.args.SetPalettedColors(this.palettingState.palettedColors),this.args.paletteStart=this.palettingState.paletteStartIndex;var _=h.xCoordinateCalculator.isCategoryCoordinateCalculator,C=_?p.indexes:p.xValues,T=this.getStartAndCount(h,C),x=T.startIndex,A=T.count;this.args.count=A,this.args.startIndex=x;var w=f.getNativeContext();this.args.SetNativeContext(w),this.args.SetXValues(C),this.args.SetYValues(p.yValues),this.args.SetZValues(p.y1Values),this.args.SetXCoordinateCalculator(h.xCoordinateCalculator.nativeCalculator),this.args.SetYCoordinateCalculator(h.yCoordinateCalculator.nativeCalculator),this.nativeDrawingProvider.DrawPointsVec(this.args)},d.prototype.onDpiChanged=function(f){c.prototype.onDpiChanged.call(this,f),this.onSeriesPropertyChange(a.PROPERTY.STROKE)},d.prototype.onSeriesPropertyChange=function(f){c.prototype.onSeriesPropertyChange.call(this,f);var h=this.getProperties(this.parentSeries),p=h.stroke,g=h.strokeThickness,v=h.opacity,y=h.fill;(f===a.PROPERTY.STROKE||f===a.PROPERTY.STROKE_THICKNESS||f===a.PROPERTY.OPACITY)&&(0,n.createPenInCache)(this.strokePenCache,p,g,v),(f===a.PROPERTY.FILL||f===a.PROPERTY.OPACITY||f===a.PROPERTY.CUSTOM_TEXTURE_OPTIONS)&&this.createBrush(),g===0&&(f===a.PROPERTY.STROKE_THICKNESS||f===a.PROPERTY.STROKE||f===a.PROPERTY.OPACITY||f===a.PROPERTY.FILL)&&(0,n.createPenInCache)(this.strokePenFillColoredCache,y,1,v)},d.prototype.createBrush=function(){var f=this.parentSeries.parentSurface,h=this.getProperties(this.parentSeries),p=h.fillLinearGradient,g=h.fill,v=h.opacity,y=h.customTextureOptions,m=f!=null&&f.isCopyCanvasSurface?f.domCanvas2D.height/o.SciChartSurfaceBase.domMasterCanvas.height:1,b=f!=null&&f.isCopyCanvasSurface?f.domCanvas2D.width/o.SciChartSurfaceBase.domMasterCanvas.width:1,S=this.fillBrushCache.create(g,v,m,b,p,y);return S.scrtBrush},d})(s.BaseSeriesDrawingProvider);return fm.StackedColumnSeriesDrawingProvider=u,fm}var Gee;function p8(){if(Gee)return gC;Gee=1;var r=gC&&gC.__extends||(function(){var v=function(y,m){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,S){b.__proto__=S}||function(b,S){for(var _ in S)Object.prototype.hasOwnProperty.call(S,_)&&(b[_]=S[_])},v(y,m)};return function(y,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");v(y,m);function b(){this.constructor=y}y.prototype=m===null?Object.create(m):(b.prototype=m.prototype,new b)}})();Object.defineProperty(gC,"__esModule",{value:!0}),gC.StackedColumnCollection=void 0;var e=Mr(),i=oi(),n=tn(),t=JS(),o=Gl(),a=f8(),s=Ji(),l=wM(),u=pSe(),c=ry(),d=ca(),f=Qn(),h=ZF(),p=KV(),g=(function(v){r(y,v);function y(m,b){var S=this,_,C,T,x,A;return S=v.call(this,m,b)||this,S.type=n.ESeriesType.StackedColumnCollection,S.seriesGroups={},S.dataPointWidthProperty=.5,S.dataPointWidthModeProperty=c.EDataPointWidthMode.Relative,S.zeroLineYProperty=0,S.dataPointWidthProperty=(_=b==null?void 0:b.dataPointWidth)!==null&&_!==void 0?_:S.dataPointWidthProperty,S.dataPointWidthMode=(C=b==null?void 0:b.dataPointWidthMode)!==null&&C!==void 0?C:S.dataPointWidthModeProperty,S.zeroLineYProperty=(T=b==null?void 0:b.zeroLineY)!==null&&T!==void 0?T:S.zeroLineYProperty,S.spacingProperty=(A=(x=b==null?void 0:b.spacing)!==null&&x!==void 0?x:S.spacingProperty)!==null&&A!==void 0?A:0,S.getColumnWidth=S.getColumnWidth.bind(S),S.detachChildSeries=S.detachChildSeries.bind(S),S.attachChildSeries=S.attachChildSeries.bind(S),S.collectionChanged.subscribe(function(w){var L,k;(L=w.getOldItems())===null||L===void 0||L.forEach(S.detachChildSeries),(k=w.getNewItems())===null||k===void 0||k.forEach(S.attachChildSeries)}),S.dataLabelProvider=new u.StackedCollectionDataLabelProvider,S.dataLabelProviderProperty.onAttach(S.webAssemblyContext,S),S}return y.prototype.delete=function(){this.nativeDrawingProvider=(0,e.deleteSafe)(this.nativeDrawingProvider),v.prototype.delete.call(this)},y.prototype.updateAccumulatedVectors=function(){var m=this,b=this.getDataSeriesValuesCount();if(!(!this.isAccumulatedVectorDirty||!b)){this.checkXValuesCorrect(),this.isAccumulatedVectorDirty=!1,this.clearAccumulatedVectors(b),this.updateGroups();var S=this.seriesGroups,_=this.getGroupsCount(),C=new Map;Object.keys(S).forEach(function(w,L){var k=S[w];k.forEach(function(D){D.setGroupsCount(_),D.setGroupIndex(L)}),C.set(w,k.map(function(D){return(0,f.vectorToArrayViewF64)(D.dataSeries.getNativeYValues(),m.webAssemblyContext)}))});for(var T=function(w){x.accumulatedValues0.push_back(x.zeroLineY),Object.keys(S).forEach(function(L){var k=S[L],D=C.get(L),j;m.isOneHundredPercent&&(j=D.reduce(function(V,W){return V+W[w]},0));var N=0;k.forEach(function(V,W){var K=D[W][w];m.isOneHundredPercent&&(K=K*100/j);var H=N+K;V.accumulatedValues.push_back(H),N=H})})},x=this,A=0;A<b;A++)T(A)}},y.prototype.draw=function(m,b){var S=this,_,C,T,x,A,w;if(this.canDraw){if(this.updateHitTestProviders(b),!this.isEnoughDataToDraw())return;var L=d.PerformanceDebugHelper.mark(d.EPerformanceMarkType.DrawCollectionSeriesStart,{contextId:this.id,parentContextId:(_=this.parentSurface)===null||_===void 0?void 0:_.id,level:d.EPerformanceDebugLevel.Verbose}),k=d.PerformanceDebugHelper.mark(d.EPerformanceMarkType.AccumulatedVectorStart,{contextId:this.id,parentContextId:(C=this.parentSurface)===null||C===void 0?void 0:C.id,level:d.EPerformanceDebugLevel.Verbose});this.updateAccumulatedVectors(),d.PerformanceDebugHelper.mark(d.EPerformanceMarkType.AccumulatedVectorEnd,{contextId:this.id,parentContextId:(T=this.parentSurface)===null||T===void 0?void 0:T.id,relatedId:(x=k==null?void 0:k.detail)===null||x===void 0?void 0:x.relatedId,level:d.EPerformanceDebugLevel.Verbose});var D=this.getFirstSeries().dataSeries;if(D!=null&&D.fifoCapacity)throw new Error("Sorry, fifo is not currently supported for stacked series");var j=this.seriesGroups,N=this.getGroupsCount(),V=this.getColumnWidth(b.xCoordinateCalculator);Object.keys(j).forEach(function(W,K){var H=j[W],U;H.forEach(function(I,Q){var Z,ee=Q===0?S.accumulatedValues0:U.accumulatedValues,ie=I.accumulatedValues,de=new h.XyyPointSeriesWrapped(I.dataSeries,I.accumulatedValues,ee);S.setDataLabelProviderProperties(I.dataLabelProvider,ie,K,N,V,S.spacingProperty,S.isOneHundredPercent),I.dataLabelProvider.generateDataLabels(m,new t.RenderPassData((Z=I.dataSeries)===null||Z===void 0?void 0:Z.getIndicesRange(S.xAxis.visibleRange,S.xAxis.isCategoryAxis),S.xAxis.getCurrentCoordinateCalculator,S.yAxis.getCurrentCoordinateCalculator,S.xAxis.isVerticalChart,new l.XyPointSeriesWrapped(I.dataSeries)));var pe=new p.StackedColumnRenderPassData(b.indexRange,b.getxCoordinateCalculator,b.getyCoordinateCalculator,b.isVerticalChart,V,N,K,S.spacingProperty,de,b.resamplingHash);I.draw(m,pe),U=I})}),d.PerformanceDebugHelper.mark(d.EPerformanceMarkType.DrawCollectionSeriesEnd,{contextId:this.id,parentContextId:(A=this.parentSurface)===null||A===void 0?void 0:A.id,relatedId:(w=L==null?void 0:L.detail)===null||w===void 0?void 0:w.relatedId,level:d.EPerformanceDebugLevel.Verbose})}},y.prototype.getXRange=function(){if(!this.isEnoughDataToDraw())return new i.NumberRange;var m=this.getFirstSeries().dataSeries.xRange,b=this.getFirstSeries().dataSeries.count(),S=this.dataPointWidth/2;if(this.dataPointWidthMode===c.EDataPointWidthMode.Relative&&(b>1?S=m.diff/(b-1)*this.dataPointWidth/2:S=0),this.dataPointWidthMode===c.EDataPointWidthMode.Absolute){var _=this.xAxis.getCurrentCoordinateCalculator();S=_.getDataWidth(this.dataPointWidth)/2}return new i.NumberRange(m.min-S,m.max+S)},y.prototype.getYRange=function(m,b){var S=v.prototype.getYRange.call(this,m,b);return new i.NumberRange(Math.min(S.min,this.zeroLineY),Math.max(S.max,this.zeroLineY))},y.prototype.onAttach=function(m){v.prototype.onAttach.call(this,m),this.nativeDrawingProvider=new this.webAssemblyContext.SCRTStackedColumnSeriesDrawingProvider},y.prototype.notifyPropertyChanged=function(m){v.prototype.notifyPropertyChanged.call(this,m),(m===s.PROPERTY.DATA_SERIES||m===s.PROPERTY.IS_VISIBLE||m===s.PROPERTY.IS_ONE_HUNDRED_PERCENT||m===s.PROPERTY.STACKED_GROUP_ID)&&(this.isAccumulatedVectorDirty=!0)},y.prototype.hasDataSeriesValues=function(){return this.isEnoughDataToDraw()},y.prototype.getColumnWidth=function(m){var b=this.dataPointWidth,S=this.dataPointWidthMode,_=this.getFirstSeries().dataSeries,C=m.isCategoryCoordinateCalculator,T=C?_.getNativeIndexes():_.getNativeXValues(),x=this.parentSurface.seriesViewRect,A=this.getGroupsCount();if(S===c.EDataPointWidthMode.Range){var w=m.visibleMax-m.visibleMin;return m.viewportDimension/w*b/A}else return S===c.EDataPointWidthMode.Absolute?b/A:(0,o.getDataPointWidth)(T,m,x.width,b,C,_.dataDistributionCalculator.isSortedAscending,this.webAssemblyContext)/A},y.prototype.toJSON=function(m){m===void 0&&(m=!1);var b=v.prototype.toJSON.call(this,m),S={dataPointWidth:this.dataPointWidth,dataPointWidthMode:this.dataPointWidthMode,zeroLineY:this.zeroLineY,spacing:this.spacingProperty};return Object.assign(b.options,S),b},Object.defineProperty(y.prototype,"dataPointWidth",{get:function(){return this.dataPointWidthProperty},set:function(m){this.dataPointWidthProperty=m,this.notifyPropertyChanged(s.PROPERTY.DATA_POINT_WIDTH)},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"dataPointWidthMode",{get:function(){return this.dataPointWidthModeProperty},set:function(m){this.dataPointWidthModeProperty=m,this.notifyPropertyChanged(s.PROPERTY.DATA_POINT_WIDTH_MODE)},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"zeroLineY",{get:function(){return this.zeroLineYProperty},set:function(m){this.zeroLineYProperty=m,this.notifyPropertyChanged(s.PROPERTY.ZERO_LINE_Y)},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"spacing",{get:function(){return this.spacingProperty},set:function(m){this.spacingProperty=m,this.notifyPropertyChanged(s.PROPERTY.SPACING)},enumerable:!1,configurable:!0}),y.prototype.detachChildSeries=function(m){m.onDetachFromParentCollection(),this.isAccumulatedVectorDirty=!0,this.invalidateParent()},y.prototype.attachChildSeries=function(m){m.onAttachToParentCollection(this,this.getParentSurface,this.notifyPropertyChanged,this.getColumnWidth),this.isAccumulatedVectorDirty=!0,this.invalidateParent()},y.prototype.checkXValuesCorrect=function(){var m=this.getDataSeriesValuesCount();this.getVisibleSeries().forEach(function(b){var S;if(((S=b.dataSeries)===null||S===void 0?void 0:S.count())!==m)throw Error("All stacked series in on collection should have the same amount of X Values")})},y.prototype.setDataLabelProviderProperties=function(m,b,S,_,C,T,x){m.topVector=b,m.groupIndex=S,m.groupSize=_,m.columnWidth=C,m.spacing=T,m.isOneHundredPercent=x},y.prototype.clearAccumulatedVectors=function(m){this.accumulatedValues0.clear(),this.accumulatedValues0.reserve(m),this.asArray().forEach(function(b){b.accumulatedValues.clear(),b.accumulatedValues.reserve(m)})},y.prototype.getLastVisibleSeries=function(){var m=this.getVisibleSeries().slice(-1)[0];return m},y.prototype.updateGroups=function(){var m={};this.getVisibleSeries().forEach(function(b){var S=b.stackedGroupId;m[S]||(m[S]=[]),m[S].push(b)}),this.seriesGroups=m},y.prototype.getGroupsCount=function(){return Object.keys(this.seriesGroups).length},y})(a.BaseStackedCollection);return gC.StackedColumnCollection=g,gC}var TC={},xC={},Yee;function g8(){if(Yee)return xC;Yee=1;var r=xC&&xC.__extends||(function(){var c=function(d,f){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(h[g]=p[g])},c(d,f)};return function(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");c(d,f);function h(){this.constructor=d}d.prototype=f===null?Object.create(f):(h.prototype=f.prototype,new h)}})();Object.defineProperty(xC,"__esModule",{value:!0}),xC.StackedXyCollection=void 0;var e=oi(),i=XF(),n=ca(),t=Qn(),o=ZF(),a=JS(),s=f8(),l=Ji(),u=(function(c){r(d,c);function d(f,h){var p=c.call(this,f,h)||this;return p.detachChildSeries=p.detachChildSeries.bind(p),p.attachChildSeries=p.attachChildSeries.bind(p),p.collectionChanged.subscribe(function(g){var v,y;(v=g.getOldItems())===null||v===void 0||v.forEach(p.detachChildSeries),(y=g.getNewItems())===null||y===void 0||y.forEach(p.attachChildSeries)}),p}return d.prototype.updateAccumulatedVectors=function(){var f=this,h=this.getDataSeriesValuesCount();if(!(!this.isAccumulatedVectorDirty||!h)){this.checkXValuesCorrect(),this.isAccumulatedVectorDirty=!1,this.clearAccumulatedVectors(h);for(var p=this.getVisibleSeries().map(function(m){return(0,t.vectorToArrayViewF64)(m.dataSeries.getNativeYValues(),f.webAssemblyContext)}),g=function(m){v.accumulatedValues0.push_back(0);var b=0,S;v.isOneHundredPercent&&(S=v.getVisibleSeries().reduce(function(_,C,T){return _+p[T][m]},0)),v.getVisibleSeries().forEach(function(_,C){var T=p[C][m];f.isOneHundredPercent&&(T=T*100/S);var x=b+T;_.accumulatedValues.push_back(x),b=x,_.renderDataTransform&&(_.renderDataTransform.requiresTransform=!0)})},v=this,y=0;y<h;y++)g(y)}},d.prototype.draw=function(f,h){var p=this,g,v,y,m;if(this.canDraw){if(this.updateHitTestProviders(h),!this.isEnoughDataToDraw())return;if(!((g=this.getFirstSeries().dataSeries)===null||g===void 0)&&g.fifoCapacity)throw new Error("Sorry, fifo is not currently supported for stacked series");var b=n.PerformanceDebugHelper.mark(n.EPerformanceMarkType.DrawCollectionSeriesStart,{contextId:this.id,parentContextId:(v=this.parentSurface)===null||v===void 0?void 0:v.id,level:n.EPerformanceDebugLevel.Verbose});this.updateAccumulatedVectors();var S=this.xAxis,_=this.getVisibleSeries();_.reduceRight(function(C,T,x,A){var w=T.accumulatedValues,L=x===0?p.accumulatedValues0:A[x-1].accumulatedValues,k=new o.XyyPointSeriesWrapped(T.dataSeries,L,w),D=new a.RenderPassData(T.getIndicesRange(S.visibleRange),h.getxCoordinateCalculator,h.getyCoordinateCalculator,S.isVerticalChart,k);if(T.renderDataTransform){var j=new a.RenderPassData(T.getIndicesRange(S.visibleRange),h.getxCoordinateCalculator,h.getyCoordinateCalculator,S.isVerticalChart,k);return j=T.renderDataTransform.runTransform(j),x<_.length-1&&(0,i.copyDoubleVector)(A[x+1].renderDataTransform.pointSeries.yValues,j.pointSeries.y1Values,p.webAssemblyContext),"strokeY1"in T&&(T.strokeY1=x===0?"transparent":A[x-1].stroke,T.strokeY1DashArray=x===0?[]:A[x-1].strokeDashArray),T.drawingProviders[0].draw(f,j),T}return"strokeY1"in T&&(T.strokeY1=x===0?"transparent":A[x-1].stroke,T.strokeY1DashArray=x===0?[]:A[x-1].strokeDashArray),T.draw(f,D),T},void 0),n.PerformanceDebugHelper.mark(n.EPerformanceMarkType.DrawCollectionSeriesEnd,{contextId:this.id,parentContextId:(y=this.parentSurface)===null||y===void 0?void 0:y.id,relatedId:(m=b==null?void 0:b.detail)===null||m===void 0?void 0:m.relatedId,level:n.EPerformanceDebugLevel.Verbose})}},d.prototype.getXRange=function(){return this.isEnoughDataToDraw()?this.getFirstSeries().dataSeries.xRange:new e.NumberRange},d.prototype.onAttach=function(f){c.prototype.onAttach.call(this,f),this.getVisibleSeries().forEach(function(h){h.onAttach(f)})},d.prototype.onDetach=function(){this.getVisibleSeries().forEach(function(f){f.onDetach()}),c.prototype.onDetach.call(this)},d.prototype.notifyPropertyChanged=function(f){c.prototype.notifyPropertyChanged.call(this,f),(f===l.PROPERTY.DATA_SERIES||f===l.PROPERTY.IS_VISIBLE||f===l.PROPERTY.IS_ONE_HUNDRED_PERCENT)&&(this.isAccumulatedVectorDirty=!0)},d.prototype.hasDataSeriesValues=function(){return this.isEnoughDataToDraw()},d.prototype.detachChildSeries=function(f){f.onDetachFromParentCollection(),this.isAccumulatedVectorDirty=!0,this.invalidateParent()},d.prototype.attachChildSeries=function(f){f.onAttachToParentCollection(this,this.getParentSurface,this.notifyPropertyChanged),this.parentSurface&&f.onAttach(this.parentSurface),this.isAccumulatedVectorDirty=!0,this.invalidateParent()},d.prototype.checkXValuesCorrect=function(){var f=this.getDataSeriesValuesCount();this.getVisibleSeries().forEach(function(h){if(h.dataSeries.count()!==f)throw Error("All stacked series in on collection should have the same amount of X Values")})},d.prototype.clearAccumulatedVectors=function(f){this.accumulatedValues0.clear(),this.accumulatedValues0.reserve(f),this.asArray().forEach(function(h){h.accumulatedValues.clear(),h.accumulatedValues.reserve(f)})},d.prototype.getLastVisibleSeries=function(){var f=this.getVisibleSeries().slice(-1)[0];return f},d})(s.BaseStackedCollection);return xC.StackedXyCollection=u,xC}var $ee;function KH(){if($ee)return TC;$ee=1;var r=TC&&TC.__extends||(function(){var t=function(o,a){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");t(o,a);function s(){this.constructor=o}o.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}})();Object.defineProperty(TC,"__esModule",{value:!0}),TC.StackedMountainCollection=void 0;var e=tn(),i=g8(),n=(function(t){r(o,t);function o(a,s){var l=t.call(this,a,s)||this;return l.type=e.ESeriesType.StackedMountainCollection,l}return o})(i.StackedXyCollection);return TC.StackedMountainCollection=n,TC}var hm={},x5={},qee;function KR(){return qee||(qee=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.adjustTextStyle=r.areEqualTextStyles=r.areEqualSimpleTextStyles=r.areEqualNativeTextStyles=r.areEqualTextureTextStyles=r.handleInvalidTextAlignment=r.handleInvalidChartTitlePosition=r.getIsHorizontalPlacement=r.ETitlePosition=r.ETextAlignment=void 0;var e=Hi(),i=Yo();(function(f){f.Center="Center",f.Left="Left",f.Right="Right"})(r.ETextAlignment||(r.ETextAlignment={}));var n;(function(f){f.Top="Top",f.Bottom="Bottom",f.Right="Right",f.Left="Left"})(n=r.ETitlePosition||(r.ETitlePosition={}));var t=function(f){return f===n.Top||f===n.Bottom};r.getIsHorizontalPlacement=t;var o=function(f){throw new Error("Invalid chart title position: ".concat(f,"!"))};r.handleInvalidChartTitlePosition=o;var a=function(f){throw new Error('Invalid text alignment "'.concat(f,'"!'))};r.handleInvalidTextAlignment=a;var s=function(f,h){return f.color===h.color&&f.fontFamily===h.fontFamily&&f.fontSize===h.fontSize&&f.fontStyle===h.fontStyle&&f.fontWeight===h.fontWeight&&f.lineSpacing===h.lineSpacing&&(f.padding===void 0&&h.padding===void 0||i.Thickness.areEqual(f.padding,h.padding))};r.areEqualTextureTextStyles=s;var l=function(f,h){return f.color===h.color&&f.fontFamily===h.fontFamily&&f.fontSize===h.fontSize&&f.lineSpacing===h.lineSpacing&&(f.padding===void 0&&h.padding===void 0||i.Thickness.areEqual(f.padding,h.padding))};r.areEqualNativeTextStyles=l;var u=function(f,h){return!f||!h||!f.useNativeText!=!h.useNativeText?!1:f.useNativeText&&h.useNativeText?(0,r.areEqualNativeTextStyles)(f,h):(0,r.areEqualTextureTextStyles)(f,h)};r.areEqualSimpleTextStyles=u;var c=function(f,h){var p=(0,r.areEqualSimpleTextStyles)(f,h);return p&&f.rotation===h.rotation&&f.multilineAlignment===h.multilineAlignment};r.areEqualTextStyles=c;var d=function(f){var h=e.DpiHelper.adjustTextStyle(f);return h};r.adjustTextStyle=d})(x5)),x5}var cI={},dI={},E5={},Xee;function MM(){return Xee||(Xee=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.ELabelAlignment=void 0,(function(e){e.Auto="Auto",e.Left="Left",e.Right="Right",e.Center="Center"})(r.ELabelAlignment||(r.ELabelAlignment={}))})(E5)),E5}var Kee;function d1(){return Kee||(Kee=1,(function(r){var e=dI&&dI.__extends||(function(){var y=function(m,b){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,_){S.__proto__=_}||function(S,_){for(var C in _)Object.prototype.hasOwnProperty.call(_,C)&&(S[C]=_[C])},y(m,b)};return function(m,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");y(m,b);function S(){this.constructor=m}m.prototype=b===null?Object.create(b):(S.prototype=b.prototype,new S)}})();Object.defineProperty(r,"__esModule",{value:!0}),r.measureTextWidth=r.measureTextHeight=r.TextureManager=void 0;var i=So(),n=$n(),t=cc(),o=MM(),a=Vd(),s=mi(),l=lc(),u=Xi(),c=Hi(),d=1080,f=1920,h=(function(y){e(m,y);function m(b){var S=y.call(this)||this;return S.webAssemblyContext=b,i.IS_TEST_ENV||(S.canvas=document.createElement("canvas"),S.canvas.width=f,S.canvas.height=d,S.ctx=S.canvas.getContext("2d",{willReadFrequently:!0})),S}return m.prototype.createSimpleTextTexture=function(b,S,_,C,T,x,A){var w=0;return C&&(T?w=90:w=-90),this.createTextTexture([b],S,w,void 0,_,x,A)},m.prototype.createTextTextureNative=function(b,S,_,C,T,x){S.fontStyle,S.fontWeight;var A=S.fontFamily,w=S.fontSize;S.padding,S.alignment;var L=S.color,k=this.webAssemblyContext.SCRTGetMainRenderContext2D(),D=(0,u.getFontKey)(this.webAssemblyContext,{fontFamily:A,fontSize:w??12}),j=T?(0,s.parseColorToUIntArgb)(T):0,N=k.CreateTextTexture(D,b.join(`
`),(0,s.parseColorToUIntArgb)(L),j);this.webAssemblyContext.SCRTSetTextureLinearSamplerEnabled(N,!1);var V=N.GetWidth(),W=N.GetHeight();return{bitmapTexture:N,textureWidth:V,textureHeight:W}},m.prototype.createTextTexture=function(b,S,_,C,T,x,A){var w;if(i.IS_TEST_ENV)return{bitmapTexture:void 0,textureWidth:1,textureHeight:1};var L=S.fontStyle,k=S.fontWeight,D=S.fontFamily,j=S.fontSize,N=S.padding,V=S.alignment,W=S.color;this.ctx.save(),this.ctx.globalAlpha=x??1,this.ctx.textBaseline="alphabetic",this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.ctx.fillStyle=W,this.ctx.font=(0,a.getFontString)(L,k,j,D);for(var K=0,H=N.top+N.bottom,U=0,I=0,Q=[],Z=0;Z<b.length;Z++){var ee=b[Z],ie=this.ctx.measureText(ee),de=Math.round(ie.actualBoundingBoxAscent+ie.actualBoundingBoxDescent);Q.push(de),de>U&&(U=de),Z===0&&(I=ie.actualBoundingBoxAscent);var pe=Math.round(ie.width+N.left+N.right);pe>K&&(K=pe),H+=de}var _e=(0,l.convertToNativeLineSpacing)(U,C??1.1);H+=(b.length-1)*_e;var Te=N.top+I,De=N.left;if(!K||!H)return{bitmapTexture:void 0,textureWidth:K,textureHeight:H};var Pe=K,Ee=H;if(_){var Re=_*Math.PI/180;Pe=Math.round(K*Math.abs(Math.cos(Re))+H*Math.abs(Math.sin(Re))),Ee=Math.round(K*Math.abs(Math.sin(Re))+H*Math.abs(Math.cos(Re))),this.ctx.translate(Pe/2,Ee/2),this.ctx.rotate(Re),this.ctx.translate(-K/2,-H/2)}if(T){this.ctx.save(),this.ctx.fillStyle=T;var je=K,Ke=H,ot=Math.min(A*c.DpiHelper.PIXEL_RATIO,je/2,Ke/2);ot>0?(this.ctx.beginPath(),this.ctx.moveTo(ot,0),this.ctx.lineTo(je-ot,0),this.ctx.quadraticCurveTo(je,0,je,ot),this.ctx.lineTo(je,Ke-ot),this.ctx.quadraticCurveTo(je,Ke,je-ot,Ke),this.ctx.lineTo(ot,Ke),this.ctx.quadraticCurveTo(0,Ke,0,Ke-ot),this.ctx.lineTo(0,ot),this.ctx.quadraticCurveTo(0,0,ot,0),this.ctx.closePath(),this.ctx.fill()):this.ctx.fillRect(0,0,je,Ke),this.ctx.restore()}for(var We=(w=S.multilineAlignment)!==null&&w!==void 0?w:V,xe=K-N.right-N.left,Z=0;Z<b.length;Z++){var ee=b[Z];if(We===o.ELabelAlignment.Center||We===o.ELabelAlignment.Right){var pe=(0,r.measureTextWidth)(this.ctx,ee);De=We===o.ELabelAlignment.Right?K-pe-N.right:(xe-pe)/2+N.left}this.ctx.fillText(ee,Math.round(De),Math.round(Te)),Te+=Q[Z]+_e}return this.ctx.strokeStyle=W,this.ctx.restore(),this.createTextureFromCtxBuffer(Pe,Ee)},m.prototype.createAxisMarkerTexture=function(b,S,_,C,T,x,A,w,L,k){w===void 0&&(w=0),this.ctx.globalAlpha=k??1,this.ctx.textBaseline="top",this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.ctx.font=(0,a.getFontString)(_,C,T,x);var D=(0,r.measureTextWidth)(this.ctx,S)+4*w,j=(0,r.measureTextHeight)(T)+2*w,N=v(j,D,S,b),V=N.angle,W=N.alignmentLeft,K=N.alignmentTop,H=N.finalTextureWidth,U=N.finalTextureHeight,I=N.halfHeight;if(this.ctx.save(),this.ctx.translate((D+I)/2,j/2),this.ctx.rotate(V),this.ctx.translate(W,K),L){var Q=new Path2D,Z=j,ee=D;Q.moveTo(0,0),Q.lineTo(ee,0),Q.lineTo(I+ee,I),Q.lineTo(ee,Z),Q.lineTo(0,Z),Q.closePath(),this.ctx.fillStyle=L,this.ctx.fill(Q)}return b!==t.EAxisAlignment.Right&&(this.ctx.fillStyle=A,this.ctx.fillText(S,2*w,w)),this.ctx.restore(),b===t.EAxisAlignment.Right&&(this.ctx.fillStyle=A,this.ctx.fillText(S,2*w+I,w)),this.createTextureFromCtxBuffer(H,U)},m.prototype.createTextureFromImage=function(b,S,_){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height);var C=(S??b.width)*c.DpiHelper.PIXEL_RATIO,T=(_??b.height)*c.DpiHelper.PIXEL_RATIO;return this.ctx.drawImage(b,0,0,C,T),this.createTextureFromCtxBuffer(C,T)},m.prototype.getTextureContext=function(b,S){if(!i.IS_TEST_ENV)return b>this.canvas.width&&(this.canvas.width=b),S>this.canvas.height&&(this.canvas.height=S),this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.ctx},m.prototype.createTextureFromCtxBuffer=function(b,S){var _=this.ctx.getImageData(0,0,b,S);return this.createTextureFromImageData(_,b,S)},m.prototype.createTextureFromImageData=function(b,S,_){var C=this.webAssemblyContext.eTSRTextureFormat.TSR_TEXTUREFORMAT_A8B8G8R8,T=this.webAssemblyContext.SCRTCreateBitmapTexture(S,_,C),x;try{var A=b.data;this.webAssemblyContext.SCRTSetActiveTexture(T),x=this.webAssemblyContext._malloc(A.length),this.webAssemblyContext.HEAP8.set(A,x);var w=this.webAssemblyContext.ccall("SCRTFillActiveTextureCharArray",null,["number","number","number"],[S,_,x])}catch(L){console.error(L)}finally{this.webAssemblyContext._free(x),this.webAssemblyContext.SCRTSetTextureLinearSamplerEnabled(T,!1)}return{bitmapTexture:T,textureWidth:S,textureHeight:_}},m.prototype.delete=function(){this.canvas=void 0,this.ctx=void 0,this.webAssemblyContext=void 0},m.prototype.createTextureFromCtx=function(b,S){var _=this.ctx.getImageData(0,0,b,S),C=_.data,T=b*S,x=new this.webAssemblyContext.UIntVector;x.resize(T,0);for(var A=0;A<T;A++){var w=A*4,L=C[w+3];if(L!==0){var k=C[w],D=C[w+1],j=C[w+2],N=L<<24|j<<16|D<<8|k;x.set(A,N>>>0)}}var V=this.webAssemblyContext.eTSRTextureFormat.TSR_TEXTUREFORMAT_A8B8G8R8,W=this.webAssemblyContext.SCRTCreateBitmapTexture(b,S,V);return this.webAssemblyContext.SCRTFillTextureAbgr(W,b,S,x),x.delete(),{bitmapTexture:W,textureWidth:b,textureHeight:S}},m})(n.DeletableEntity);r.TextureManager=h;var p=function(y){return y};r.measureTextHeight=p;var g=function(y,m){if(i.IS_TEST_ENV)return 1;if(y){var b=y.measureText(m);return Math.ceil(b.width)}return 0};r.measureTextWidth=g;var v=function(y,m,b,S){var _=Math.ceil(y/2),C=0,T=0,x=0,A=m+_,w=y;switch(S){case t.EAxisAlignment.Left:C=0,T=-(m+_)/2,x=-y/2;break;case t.EAxisAlignment.Top:C=Math.PI*.5,T=-y/2,x=(m+_)/2-y,A=y,w=m+_;break;case t.EAxisAlignment.Right:C=Math.PI,T=-(m+_)/2,x=-y/2;break;case t.EAxisAlignment.Bottom:C=Math.PI*1.5,T=-m,x=-(m+_)/2,A=y,w=m+_;break}return{angle:C,alignmentLeft:T,alignmentTop:x,finalTextureWidth:A,finalTextureHeight:w,halfHeight:_}}})(dI)),dI}var Zee;function ZV(){return Zee||(Zee=1,(function(r){var e=cI&&cI.__extends||(function(){var y=function(m,b){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,_){S.__proto__=_}||function(S,_){for(var C in _)Object.prototype.hasOwnProperty.call(_,C)&&(S[C]=_[C])},y(m,b)};return function(m,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");y(m,b);function S(){this.constructor=m}m.prototype=b===null?Object.create(b):(S.prototype=b.prototype,new S)}})();Object.defineProperty(r,"__esModule",{value:!0}),r.getAdjustedRotation=r.TitleRendererBase=void 0;var i=So(),n=$n(),t=Mr(),o=vn(),a=Du(),s=KR(),l=mi(),u=lc(),c=KS(),d=Xi(),f=Gd(),h=Hi(),p=d1(),g=(function(y){e(m,y);function m(b){var S=y.call(this)||this;return S.drawDebug=!1,S.useCache=!0,S.viewRectProperty=o.Rect.createZero(),S.textHeight=0,S.textWidth=0,S.desiredHeightProperty=0,S.desiredWidthProperty=0,S.useNativeTextProperty=f.SciChartDefaults.useNativeText,S.webAssemblyContext=b,S.textureManager=new p.TextureManager(b),S.onDpiChanged=S.onDpiChanged.bind(S),h.DpiHelper.dpiChanged.subscribe(S.onDpiChanged),S}return Object.defineProperty(m.prototype,"viewRect",{get:function(){return this.viewRectProperty},enumerable:!1,configurable:!0}),m.prototype.measure=function(){},m.prototype.layout=function(b){},m.prototype.draw=function(){},m.prototype.delete=function(){this.resetCache(),this.textureManager=(0,t.deleteSafe)(this.textureManager),this.webAssemblyContext=void 0,h.DpiHelper.dpiChanged.unsubscribe(this.onDpiChanged)},m.prototype.resetCache=function(){this.invalidateCache(),this.textStyle=void 0,this.originalTextStyle=void 0},m.prototype.invalidateCache=function(){var b;(0,t.deleteSafe)((b=this.texture)===null||b===void 0?void 0:b.bitmapTexture),this.texture=void 0},m.prototype.onDpiChanged=function(b){this.resetCache()},m.prototype.drawInternal=function(b,S,_,C){!this.text||this.text.length===0||(S?this.drawWithNativeText(b,_,C):this.drawWithTexture(b,_,C))},m.prototype.drawWithNativeText=function(b,S,_){var C=Array.isArray(this.text)?this.text.join(`
`):this.text,T=b.getFont(this.textStyle,!0),x=this.viewRect.left+this.nativeTextShiftX,A=this.viewRect.top+this.nativeTextShiftY,w=(0,r.getAdjustedRotation)(this.textStyle.rotation,S),L=-(w*Math.PI)/180,k=(0,a.convertMultiLineAlignment)(this.textStyle.multilineAlignment,this.webAssemblyContext),D=(0,l.parseColorToUIntArgb)(this.textStyle.color);b.resetAndClip(_),T.DrawStringAdvanced(C,D,Math.round(x),Math.round(A),(0,d.getVector4)(this.webAssemblyContext,x,A,L,0),k,this.nativeLineSpacing),T.End()},m.prototype.drawWithTexture=function(b,S,_){var C=this.texture,T=C.bitmapTexture,x=C.textureHeight,A=C.textureWidth;if(T)try{b.resetAndClip(_),b.drawTexture(T,Math.round(this.viewRect.left),Math.round(this.viewRect.top),A,x),this.useCache||(T.delete(),this.texture=void 0)}catch(w){console.error("Error while drawing title: ",w),this.resetCache()}},m.prototype.getTextSize=function(b,S,_){if(b===void 0&&(b=""),!b||b.length===0){this.desiredHeightProperty=0,this.desiredWidthProperty=0,this.textHeight=0,this.textWidth=0;return}var C=(0,s.getIsHorizontalPlacement)(this.titlePosition);if(i.IS_TEST_ENV)C?(this.desiredHeightProperty=(0,p.measureTextHeight)(S.fontSize)+this.textStyle.padding.top+this.textStyle.padding.bottom,this.desiredWidthProperty=0):(this.desiredHeightProperty=0,this.desiredWidthProperty=(0,p.measureTextHeight)(S.fontSize)+this.textStyle.padding.top+this.textStyle.padding.bottom);else if(this.useNativeTextProperty){var T=_.getFont(S,!C);this.currentNativeFontName=T.GetFaceName();var x=Array.isArray(b)?b.join(`
`):b,A=(0,r.getAdjustedRotation)(S.rotation,this.titlePosition),w=(0,u.getNativeTextSize)(x,T,S,this.webAssemblyContext,A),L=w.textHeight,k=w.textWidth,D=w.nativeLineSpacing,j=w.deltaX,N=w.deltaY;this.textHeight=C?L:k,this.textWidth=C?k:L,this.nativeLineSpacing=D,this.nativeTextShiftX=j,this.nativeTextShiftY=N,this.desiredHeightProperty=C?this.textHeight:this.textWidth,this.desiredWidthProperty=C?this.textWidth:this.textHeight}else{var V=this.getTitleTexture();this.texture=V,this.desiredHeightProperty=V.textureHeight,this.desiredWidthProperty=V.textureWidth,this.textHeight=C?this.desiredHeightProperty:this.desiredWidthProperty,this.textWidth=C?this.desiredWidthProperty:this.desiredHeightProperty}},m.prototype.getTitleTexture=function(){var b=Array.isArray(this.text)?this.text:this.text.split(`
`),S=this.textureManager.createTextTexture(b,this.textStyle);return S},m.prototype.getViewRect=function(b,S,_,C){if(b===void 0&&(b=""),!b||b.length===0)return o.Rect.createZero();var T=(0,s.getIsHorizontalPlacement)(_),x=this.getAlignmentAdjustmentDelta(T?S.width:S.height,_,C);switch(_){case s.ETitlePosition.Top:return new o.Rect(S.x+x,S.y,this.textWidth,this.textHeight);case s.ETitlePosition.Bottom:return new o.Rect(S.x+x,S.bottom-this.textHeight,this.textWidth,this.textHeight);case s.ETitlePosition.Left:return new o.Rect(S.x,S.y+x,this.textHeight,this.textWidth);case s.ETitlePosition.Right:return new o.Rect(S.right-this.textHeight,S.y+x,this.textHeight,this.textWidth);default:return(0,s.handleInvalidChartTitlePosition)(_)}},m.prototype.drawTitleDebugViewRect=function(b){var S=this.viewRect,_=(0,d.getVectorRectVertex)(this.webAssemblyContext),C=new this.webAssemblyContext.SCRTSolidBrush((0,l.parseColorToUIntArgb)("rgba(0,255,0,0.7)"),!1),T=(0,c.createNativeRect)(this.webAssemblyContext,0,0,S.width,S.height);_.push_back(T),b.drawRects(_,C,S,S.left,S.top),C.delete()},m.prototype.getAlignmentAdjustmentDelta=function(b,S,_){switch(_){case s.ETextAlignment.Center:return b/2-this.textWidth/2;case s.ETextAlignment.Left:return S===s.ETitlePosition.Left?b-this.textWidth:0;case s.ETextAlignment.Right:return S===s.ETitlePosition.Left?0:b-this.textWidth;default:return(0,s.handleInvalidTextAlignment)(_)}},m})(n.DeletableEntity);r.TitleRendererBase=g;var v=function(y,m){if(y!==void 0)return(y+360)%360;var b=0;return m===s.ETitlePosition.Left?b+=-90:m===s.ETitlePosition.Right&&(b+=90),(b+360)%360};r.getAdjustedRotation=v})(cI)),cI}var Jee;function vSe(){if(Jee)return hm;Jee=1;var r=hm&&hm.__extends||(function(){var s=function(l,u){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(c[f]=d[f])},s(l,u)};return function(l,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");s(l,u);function c(){this.constructor=l}l.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}})(),e=hm&&hm.__assign||function(){return e=Object.assign||function(s){for(var l,u=1,c=arguments.length;u<c;u++){l=arguments[u];for(var d in l)Object.prototype.hasOwnProperty.call(l,d)&&(s[d]=l[d])}return s},e.apply(this,arguments)};Object.defineProperty(hm,"__esModule",{value:!0}),hm.ChartTitleRenderer=void 0;var i=Yo(),n=KR(),t=ln(),o=ZV(),a=(function(s){r(l,s);function l(){var u=s!==null&&s.apply(this,arguments)||this;return u.titleOffsetProperty=i.Thickness.fromNumber(0),u}return Object.defineProperty(l.prototype,"titleOffset",{get:function(){return this.titleOffsetProperty},enumerable:!1,configurable:!0}),l.prototype.measure=function(u,c,d){var f,h=u!==this.text||!(0,n.areEqualTextStyles)(c,this.originalTextStyle)||((f=this.originalTextStyle)===null||f===void 0?void 0:f.position)!==c.position;if(this.currentNativeFontName==="SCRT_Loading"){var p=(0,n.getIsHorizontalPlacement)(this.titlePosition),g=d.getFont(this.textStyle,!p);g.GetFaceName()!==this.currentNativeFontName&&(h=!0)}u&&u.length>0?!this.useCache||!this.texture&&!c.useNativeText||h?(this.invalidateCache(),this.text=u,this.originalTextStyle=e({},c),this.textStyle=(0,n.adjustTextStyle)(c),this.useNativeTextProperty=c.useNativeText,this.titlePosition=c.position,this.getTextSize(u,this.textStyle,d)):(this.textStyle.alignment=c.alignment,this.textStyle.placeWithinChart=c.placeWithinChart):this.text=u,this.titleOffsetProperty=this.getTitleOffset(u,this.textStyle)},l.prototype.layout=function(u){if(!this.text||this.text.length===0){this.viewRectProperty=void 0;return}this.viewRectProperty=this.getViewRect(this.text,u,this.textStyle.position,this.textStyle.alignment)},l.prototype.draw=function(u,c){if(!(!this.text||this.text.length===0)){t.DebugForDpi&&console.log("ChartTitleRenderer.draw fontSize: ".concat(this.textStyle.fontSize));var d=this.textStyle,f=d.useNativeText,h=d.position;d.lineSpacing,this.drawInternal(u,f,h,c),this.drawDebug&&this.drawTitleDebugViewRect(u)}},l.prototype.getTitleTexture=function(){var u=this.textStyle.position,c=(0,o.getAdjustedRotation)(this.textStyle.rotation,u),d=Array.isArray(this.text)?this.text:this.text.split(`
`),f=this.textureManager.createTextTexture(d,this.textStyle,c,this.textStyle.lineSpacing);return f},l.prototype.getTitleOffset=function(u,c){if(!this.text||this.text.length===0||c.placeWithinChart)return i.Thickness.fromNumber(0);var d=this.textHeight;switch(c.position){case n.ETitlePosition.Top:return new i.Thickness(d,0,0,0);case n.ETitlePosition.Bottom:return new i.Thickness(0,0,d,0);case n.ETitlePosition.Left:return new i.Thickness(0,0,0,d);case n.ETitlePosition.Right:return new i.Thickness(0,d,0,0);default:return(0,n.handleInvalidChartTitlePosition)(c.position)}},l})(o.TitleRendererBase);return hm.ChartTitleRenderer=a,hm}var A5={},Qee;function ab(){return Qee||(Qee=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.ESciChartSurfaceType=void 0,(function(e){e.Default2D="Default2D",e.Pie2D="Pie2D",e.Polar2D="Polar2D",e.Default3D="Default3D"})(r.ESciChartSurfaceType||(r.ESciChartSurfaceType={}))})(A5)),A5}var ete;function Tp(){return ete||(ete=1,(function(r){var e=ah&&ah.__extends||(function(){var ot=function(We,xe){return ot=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ve,he){ve.__proto__=he}||function(ve,he){for(var Se in he)Object.prototype.hasOwnProperty.call(he,Se)&&(ve[Se]=he[Se])},ot(We,xe)};return function(We,xe){if(typeof xe!="function"&&xe!==null)throw new TypeError("Class extends value "+String(xe)+" is not a constructor or null");ot(We,xe);function ve(){this.constructor=We}We.prototype=xe===null?Object.create(xe):(ve.prototype=xe.prototype,new ve)}})(),i=ah&&ah.__assign||function(){return i=Object.assign||function(ot){for(var We,xe=1,ve=arguments.length;xe<ve;xe++){We=arguments[xe];for(var he in We)Object.prototype.hasOwnProperty.call(We,he)&&(ot[he]=We[he])}return ot},i.apply(this,arguments)},n=ah&&ah.__awaiter||function(ot,We,xe,ve){function he(Se){return Se instanceof xe?Se:new xe(function(be){be(Se)})}return new(xe||(xe=Promise))(function(Se,be){function ke(St){try{rt(ve.next(St))}catch(xt){be(xt)}}function qe(St){try{rt(ve.throw(St))}catch(xt){be(xt)}}function rt(St){St.done?Se(St.value):he(St.value).then(ke,qe)}rt((ve=ve.apply(ot,We||[])).next())})},t=ah&&ah.__generator||function(ot,We){var xe={label:0,sent:function(){if(Se[0]&1)throw Se[1];return Se[1]},trys:[],ops:[]},ve,he,Se,be;return be={next:ke(0),throw:ke(1),return:ke(2)},typeof Symbol=="function"&&(be[Symbol.iterator]=function(){return this}),be;function ke(rt){return function(St){return qe([rt,St])}}function qe(rt){if(ve)throw new TypeError("Generator is already executing.");for(;xe;)try{if(ve=1,he&&(Se=rt[0]&2?he.return:rt[0]?he.throw||((Se=he.return)&&Se.call(he),0):he.next)&&!(Se=Se.call(he,rt[1])).done)return Se;switch(he=0,Se&&(rt=[rt[0]&2,Se.value]),rt[0]){case 0:case 1:Se=rt;break;case 4:return xe.label++,{value:rt[1],done:!1};case 5:xe.label++,he=rt[1],rt=[0];continue;case 7:rt=xe.ops.pop(),xe.trys.pop();continue;default:if(Se=xe.trys,!(Se=Se.length>0&&Se[Se.length-1])&&(rt[0]===6||rt[0]===2)){xe=0;continue}if(rt[0]===3&&(!Se||rt[1]>Se[0]&&rt[1]<Se[3])){xe.label=rt[1];break}if(rt[0]===6&&xe.label<Se[1]){xe.label=Se[1],Se=rt;break}if(Se&&xe.label<Se[2]){xe.label=Se[2],xe.ops.push(rt);break}Se[2]&&xe.ops.pop(),xe.trys.pop();continue}rt=We.call(ot,xe)}catch(St){rt=[6,St],he=0}finally{ve=Se=0}if(rt[0]&5)throw rt[1];return{value:rt[0]?rt[1]:void 0,done:!0}}},o=ah&&ah.__spreadArray||function(ot,We,xe){if(xe||arguments.length===2)for(var ve=0,he=We.length,Se;ve<he;ve++)(Se||!(ve in We))&&(Se||(Se=Array.prototype.slice.call(We,0,ve)),Se[ve]=We[ve]);return ot.concat(Se||Array.prototype.slice.call(We))};Object.defineProperty(r,"__esModule",{value:!0}),r.SciChartSurface=r.sciChartConfig=void 0;var a=Jn(),s=So(),l=hc(),u=$v(),c=Mr(),d=Yq(),f=Ba(),h=FS(),p=vn(),g=Yo(),v=zbe(),y=$o(),m=tn(),b=Ep(),S=ty(),_=Wbe(),C=JUe(),T=Gbe(),x=ZS(),A=uSe(),w=cSe(),L=WN(),k=hSe(),D=d8(),j=Xi(),N=p8(),V=KH(),W=e_(),K=ln(),H=Hi(),U=Ii(),I=Gd(),Q=vSe(),Z=KR(),ee=Du(),ie=Rg(),de=nb(),pe=Lf(),_e=ca(),Te=Ha(),De=Wd(),Pe=cc(),Ee=Vd(),Re=ab(),je={wasmUrl:"scichart2d.wasm",wasmNoSimdUrl:void 0};r.sciChartConfig=je;var Ke=(function(ot){e(We,ot);function We(xe,ve){var he=this,Se,be,ke,qe,rt;he=ot.call(this,xe,ve==null?void 0:ve.canvases)||this,he.preRender=new f.EventHandler,he.preRenderAll=new f.EventHandler,he.stepBetweenLayers=10,he.isSubSurface=!1,he.renderNativeAxisLabelsImmediately=!1,he.watermarkPosition=I.SciChartDefaults.watermarkPosition,he.watermarkRelativeToCanvas=!1,he.animationList=[],he.titleStyleProperty={fontSize:60,fontFamily:(0,Ee.getDefaultFontName)(),color:K.SciChartSurfaceBase.DEFAULT_THEME.chartTitleColor,fontWeight:"normal",fontStyle:"normal",lineSpacing:1.1,padding:g.Thickness.fromString("10 4 10 4"),multilineAlignment:ee.EMultiLineAlignment.Center,rotation:void 0,alignment:Z.ETextAlignment.Center,position:Z.ETitlePosition.Top,placeWithinChart:!1,useNativeText:I.SciChartDefaults.useNativeText},he.getPaddingProxy=function(Et){return new Proxy(Et,{set:function(Gt,Xe,Vt){return Gt[Xe]!==Vt&&(Gt[Xe]=Vt,he.invalidateElement()),!0}})},he.paddingProperty=he.getPaddingProxy(g.Thickness.fromNumber(10)),he.zoomStateProperty=S.EZoomState.AtExtents,he.viewportBorderProperty={borderBottom:void 0,borderLeft:void 0,borderRight:void 0,borderTop:void 0,color:"#00000000",border:void 0},he.canvasBorderProperty={borderBottom:void 0,borderLeft:void 0,borderRight:void 0,borderTop:void 0,color:"#00000000",border:void 0},he.subChartsProperty=[],he.drawSeriesBehindAxisProperty=!1,he.autoColorModeProperty=v.EAutoColorMode.OnAddRemoveSeries,he.autoColorRequired=!0,he.xCoordSvgTrans=0,he.yCoordSvgTrans=0,he.subChartCounterProperty=1,he.surfaceRenderOrderProperty=void 0,he.resolvedSurfaceRenderOrder=0;var St=(be=(Se=he.domCanvas2D)===null||Se===void 0?void 0:Se.width)!==null&&be!==void 0?be:s.DEFAULT_WIDTH,xt=(qe=(ke=he.domCanvas2D)===null||ke===void 0?void 0:ke.height)!==null&&qe!==void 0?qe:s.DEFAULT_HEIGHT;if(he.webAssemblyContext2D=xe,!s.IS_TEST_ENV){var It=St/H.DpiHelper.PIXEL_RATIO,Zt=xt/H.DpiHelper.PIXEL_RATIO;he.isCopyCanvasSurface?he.changeMasterCanvasViewportSize(xe,It,Zt):he.changeWebGLCanvasViewportSize(xe,It,Zt)}he.invalidateElement=he.invalidateElement.bind(he),he.onRenderSurfaceDraw=he.onRenderSurfaceDraw.bind(he);var ct=he.domCanvas2D?new b.Size(St,xt):new b.Size(s.DEFAULT_WIDTH,s.DEFAULT_HEIGHT);he.renderSurface=new C.RenderSurface(xe,ct,(rt=he.domCanvas2D)===null||rt===void 0?void 0:rt.id),he.renderSurface.handleDraw=he.onRenderSurfaceDraw,he.sciChartRenderer=new A.SciChartRenderer(he),he.chartTitleRendererProperty=new Q.ChartTitleRenderer(he.webAssemblyContext2D),he.layoutManager=new x.LayoutManager,he.detachSeries=he.detachSeries.bind(he),he.attachSeries=he.attachSeries.bind(he),he.renderableSeries=new h.ObservableArray,he.renderableSeries.collectionChanged.subscribe(function(Et){var Gt,Xe;(Gt=Et.getOldItems())===null||Gt===void 0||Gt.forEach(he.detachSeries),(Xe=Et.getNewItems())===null||Xe===void 0||Xe.forEach(he.attachSeries)}),he.detachAxis=he.detachAxis.bind(he),he.attachAxis=he.attachAxis.bind(he),he.xAxes=new h.ObservableArray,he.yAxes=new h.ObservableArray;var Qe=function(Et,Gt){var Xe,Vt;(Xe=Et.getOldItems())===null||Xe===void 0||Xe.forEach(function(lr){lr.visibleRangeChanged.unsubscribeAll(),he.detachAxis(lr)}),(Vt=Et.getNewItems())===null||Vt===void 0||Vt.forEach(function(lr){return he.attachAxis(lr,Gt)})};return he.xAxes.collectionChanged.subscribe(function(Et){return Qe(Et,!0)}),he.yAxes.collectionChanged.subscribe(function(Et){return Qe(Et,!1)}),he.adornerLayer=new w.AdornerLayer(he),he.solidBrushCacheViewportBorder=new T.SolidBrushCache(xe),he.solidBrushCacheCanvasBorder=new T.SolidBrushCache(xe),s.IS_TEST_ENV||(he.watermarkProperties=new xe.SCRTWaterMarkProperties,he.watermarkPropertyPosition=new xe.TSRVector2(0,0),he.watermarkProperties.SetPosition(he.watermarkPropertyPosition),he.watermarkProperties.SetOpacity(.5),xe.SCRTSetWaterMarkProperties(he.watermarkProperties)),he}return We.create=function(xe,ve){var he=_e.PerformanceDebugHelper.mark(_e.EPerformanceMarkType.InitializationStart,{contextId:ve==null?void 0:ve.id});if(ve=We.resolveOptions(ve),s.IS_TEST_ENV)return this.createTest(xe,ve);var Se=function(be,ke){return new We(be,ke)};return(0,L.createMultichart)(xe,Se,ve).then(function(be){var ke,qe;return be.sciChartSurface.applyOptions(ve),_e.PerformanceDebugHelper.mark(_e.EPerformanceMarkType.InitializationEnd,{parentContextId:(ke=be.sciChartSurface.domCanvas2D)===null||ke===void 0?void 0:ke.id,contextId:be.sciChartSurface.id,relatedId:(qe=he==null?void 0:he.detail)===null||qe===void 0?void 0:qe.relatedId}),be})},We.disposeSharedWasmContext=function(){ie.sciChartDestinations.length===0&&(0,L.disposeMultiChart)(),ot.disposeSharedWasmContext.call(this)},We.createSingle=function(xe,ve){var he=_e.PerformanceDebugHelper.mark(_e.EPerformanceMarkType.InitializationStart,{contextId:ve==null?void 0:ve.id});if(ve=We.resolveOptions(ve),s.IS_TEST_ENV)return this.createTest(xe,ve);var Se=function(be,ke){return new We(be,ke)};return(0,k.createSingleInternal)(xe,Se,ve).then(function(be){var ke,qe;return be.sciChartSurface.applyOptions(ve),_e.PerformanceDebugHelper.mark(_e.EPerformanceMarkType.InitializationEnd,{parentContextId:(ke=be.sciChartSurface.domCanvas2D)===null||ke===void 0?void 0:ke.id,contextId:be.sciChartSurface.id,relatedId:(qe=he==null?void 0:he.detail)===null||qe===void 0?void 0:qe.relatedId}),be})},We.configure=function(xe){var ve,he;r.sciChartConfig.wasmUrl=(ve=xe==null?void 0:xe.wasmUrl)!==null&&ve!==void 0?ve:je.wasmUrl,r.sciChartConfig.wasmNoSimdUrl=(he=xe==null?void 0:xe.wasmNoSimdUrl)!==null&&he!==void 0?he:je.wasmNoSimdUrl},We.useWasmFromCDN=function(){r.sciChartConfig.wasmUrl="https://cdn.jsdelivr.net/npm/scichart@".concat(u.libraryVersion,"/_wasm/scichart2d.wasm"),r.sciChartConfig.wasmNoSimdUrl="https://cdn.jsdelivr.net/npm/scichart@".concat(u.libraryVersion,"/_wasm/scichart2d-nosimd.wasm")},We.useWasmLocal=function(){We.configure(je)},We.loadWasmFromCDN=function(){return We.useWasmFromCDN()},We.loadWasmLocal=function(){return We.useWasmLocal()},We.isSubSurface=function(xe){return xe.isSubSurface},We.createTest=function(xe,ve){var he,Se,be=W.default.initCanvas(xe,(he=ve==null?void 0:ve.widthAspect)!==null&&he!==void 0?he:0,(Se=ve==null?void 0:ve.heightAspect)!==null&&Se!==void 0?Se:0,W.default.ECanvasType.canvas2D),ke=new We(r.sciChartConfig.testWasm,{canvases:be});return ke.applyTheme(ve==null?void 0:ve.theme),ke.applyOptions(ve),new Promise(function(qe){return qe({wasmContext:ke.webAssemblyContext2D,sciChartSurface:ke})})},Object.defineProperty(We.prototype,"subChartCounter",{get:function(){return this.subChartCounterProperty},enumerable:!1,configurable:!0}),We.prototype.addSubChartInternal=function(xe){var ve;if(this.isSubSurface)throw new Error("Can not add subChart to subChart.");this.subChartCounterProperty++,(ve=xe.mouseManager)===null||ve===void 0||ve.unsubscribe(),this.subChartsProperty.push(xe),this.onAttachSubSurface(xe),xe.setIsInitialized()},We.prototype.removeSubChart=function(xe){var ve=this.subChartsProperty.findIndex(function(he){return he===xe});ve>-1&&(this.subChartsProperty.splice(ve,1),xe.delete(!0))},Object.defineProperty(We.prototype,"subCharts",{get:function(){return this.subChartsProperty},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"surfaceType",{get:function(){return Te.ESurfaceType.SciChartSurfaceType},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"layoutManager",{get:function(){return this.layoutManagerProperty},set:function(xe){this.layoutManagerProperty&&(this.layoutManagerProperty.sciChartSurface=void 0),this.layoutManagerProperty=xe,this.layoutManagerProperty.sciChartSurface=this,this.invalidateElement()},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"chartTitleRenderer",{get:function(){return this.chartTitleRendererProperty},set:function(xe){var ve;(ve=this.chartTitleRendererProperty)===null||ve===void 0||ve.delete(),this.chartTitleRendererProperty=xe,this.invalidateElement()},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"dataLabelLayoutManager",{get:function(){return this.dataLabelLayoutManagerProperty},set:function(xe){this.dataLabelLayoutManagerProperty=xe,this.invalidateElement()},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"title",{get:function(){return this.titleProperty},set:function(xe){this.titleProperty!==xe&&(this.titleProperty=xe,this.invalidateElement())},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"titleStyle",{get:function(){return this.titleStyleProperty},set:function(xe){this.titleStyleProperty!==xe&&(this.titleStyleProperty=Object.assign({},this.titleStyleProperty,xe),this.invalidateElement())},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"padding",{get:function(){return this.paddingProperty},set:function(xe){g.Thickness.areEqual(this.paddingProperty,xe)||(this.paddingProperty=this.getPaddingProxy(xe),this.invalidateElement())},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"adjustedPadding",{get:function(){return H.DpiHelper.adjustThickness(this.padding)},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"debugRendering",{get:function(){return this.debugRenderingProperty},set:function(xe){this.debugRenderingProperty=xe,this.invalidateElement()},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"autoColorMode",{get:function(){return this.autoColorModeProperty},set:function(xe){this.autoColorModeProperty=xe,xe!==v.EAutoColorMode.Never&&!this.autoColorRequired?this.autoColorRequired=!0:xe===v.EAutoColorMode.Never&&(this.autoColorRequired=!1),this.invalidateElement()},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"isInvalidated",{get:function(){var xe;return(xe=this.sciChartRenderer)===null||xe===void 0?void 0:xe.isInvalidated},enumerable:!1,configurable:!0}),We.prototype.applyTheme=function(xe){var ve=this.previousThemeProvider;this.titleStyle.color===ve.chartTitleColor&&(this.titleStyle={color:xe.chartTitleColor}),ot.prototype.applyTheme.call(this,xe),this.renderableSeries.asArray().forEach(function(he){return he.applyTheme(xe)}),this.xAxes.asArray().forEach(function(he){return he.applyTheme(xe)}),this.yAxes.asArray().forEach(function(he){return he.applyTheme(xe)})},We.prototype.changeViewportSize=function(xe,ve){if(pe.Logger.debug("changeViewportSize"),!(!xe||!ve||this.isDeleted)){var he=xe*H.DpiHelper.PIXEL_RATIO,Se=ve*H.DpiHelper.PIXEL_RATIO;this.renderSurface.viewportSize=new b.Size(he,Se),this.isCopyCanvasSurface?(this.changeMasterCanvasViewportSize(this.webAssemblyContext2D,xe,ve),this.domCanvas2D&&H.DpiHelper.setSize(this.domCanvas2D,xe,ve)):this.changeWebGLCanvasViewportSize(this.webAssemblyContext2D,xe,ve);for(var be=0,ke=this.subChartsProperty;be<ke.length;be++){var qe=ke[be];qe.changeViewportSize(he,Se)}this.invalidateElement({force:!0})}},We.prototype.invalidateElement=function(xe){var ve=this,he,Se,be;if(pe.Logger.debug("Invalidating ".concat((he=this.id)!==null&&he!==void 0?he:(Se=this.domChartRoot)===null||Se===void 0?void 0:Se.id,": force=").concat(xe==null?void 0:xe.force," isSuspended=").concat(this.isSuspended," isInitialized=").concat(this.isInitialized,". svgOnly: ").concat(xe==null?void 0:xe.svgOnly," isInvalidated: ").concat((be=this.sciChartRenderer)===null||be===void 0?void 0:be.isInvalidated)),!(!(xe!=null&&xe.force)&&(this.isSuspended||this.isDeleted||!this.isInitialized||!this.isWebGLContextActive))){if(_e.PerformanceDebugHelper.mark(this.sciChartRenderer.isInvalidated?_e.EPerformanceMarkType.Invalidate:_e.EPerformanceMarkType.LeadingInvalidate,{contextId:this.id}),xe!=null&&xe.svgOnly){if(this.sciChartRenderer.isInvalidated||this.sciChartRenderer.svgRenderRequestId)return;this.sciChartRenderer.svgRenderRequestId=requestAnimationFrame(function(){ve.sciChartRenderer.svgRenderRequestId=void 0,ve.sciChartRenderer.isInvalidated||ve.sciChartRenderer.renderDomOnly()})}else if(this.sciChartRenderer.svgRenderRequestId&&(cancelAnimationFrame(this.sciChartRenderer.svgRenderRequestId),this.sciChartRenderer.svgRenderRequestId=void 0),!this.sciChartRenderer.isInvalidated){var ke=this.domCanvas2D?this.domCanvas2D.id:"undefinedCanvasId";this.sciChartRenderer.isInvalidated=this.renderSurface.invalidateElement(ke),this.redrawRequested.raiseEvent(this.sciChartRenderer.isInvalidated)}}},We.prototype.doDrawingLoop=function(xe){var ve;if(!this.isDeleted){var he=_e.PerformanceDebugHelper.mark(_e.EPerformanceMarkType.DrawingLoopStart,{contextId:this.id,parentContextId:We.isSubSurface(this)?this.parentSurface.id:void 0,level:_e.EPerformanceDebugLevel.Verbose});xe=xe??this.renderSurface.getRenderContext(),this.currentWebGlRenderContextProperty=xe;try{var Se=this.suspender.lock();try{this.autoColorRequired&&(this.themeProvider.strokePalette&&this.themeProvider.strokePalette.length>0||this.themeProvider.fillPalette&&this.themeProvider.fillPalette.length>0)&&(this.resolveAutoColors(),this.autoColorMode!==v.EAutoColorMode.Always&&(this.autoColorRequired=!1)),this.sciChartRenderer.domRenderRun||this.preRender.raiseEvent(xe)}catch(ke){ke!=null&&ke.message&&console.error(ke==null?void 0:ke.message),console.error(ke)}finally{Se()}this.sciChartRenderer.render(xe);var be=this.isInvalidated;_e.PerformanceDebugHelper.mark(be?_e.EPerformanceMarkType.Rendered:_e.EPerformanceMarkType.FullStateRendered,{contextId:this.id}),this.rendered.raiseEvent(be)}catch(ke){if(ke.name==="BindingError")console.error(ke),console.warn("Binding errors can occur if a previous chart using the same div id was not deleted correctly, or if you try to share data or series between charts that use different webassembly contexts."),(0,j.freeCache)(this.webAssemblyContext2D).delete();else if(this.domChartRoot)console.error("Error from chart in div ".concat(this.domChartRoot.id,":"),ke);else throw ke}_e.PerformanceDebugHelper.mark(_e.EPerformanceMarkType.DrawingLoopEnd,{contextId:this.id,parentContextId:We.isSubSurface(this)?this.parentSurface.id:void 0,relatedId:(ve=he==null?void 0:he.detail)===null||ve===void 0?void 0:ve.relatedId,level:_e.EPerformanceDebugLevel.Verbose})}},We.prototype.delete=function(xe){if(xe===void 0&&(xe=!0),!this.isDeleted){this.sciChartRenderer.svgRenderRequestId&&(cancelAnimationFrame(this.sciChartRenderer.svgRenderRequestId),this.sciChartRenderer.svgRenderRequestId=void 0);for(var ve=0,he=this.subChartsProperty;ve<he.length;ve++){var Se=he[ve];Se.delete(!0)}this.subChartsProperty=[],this.layoutManagerProperty.type===de.ELayoutManagerType.Synchronised&&(this.layoutManagerProperty.verticalGroup&&this.layoutManagerProperty.verticalGroup.removeSurface(this),this.layoutManagerProperty.horizontalGroup&&this.layoutManagerProperty.horizontalGroup.removeSurface(this)),this.layoutManagerProperty.sciChartSurface=void 0,this.layoutManagerProperty=void 0,this.renderableSeries.asArray().forEach(function(be){return be.delete()}),this.renderableSeries.clear(!1),this.xAxes.asArray().forEach(function(be){return be.delete()}),this.yAxes.asArray().forEach(function(be){return be.delete()}),this.solidBrushCacheViewportBorder=(0,c.deleteSafe)(this.solidBrushCacheViewportBorder),this.solidBrushCacheCanvasBorder=(0,c.deleteSafe)(this.solidBrushCacheCanvasBorder),this.watermarkProperties=(0,c.deleteSafe)(this.watermarkProperties),this.watermarkPropertyPosition=(0,c.deleteSafe)(this.watermarkPropertyPosition),this.chartTitleRendererProperty=(0,c.deleteSafe)(this.chartTitleRenderer),this.sciChartRenderer=void 0,this.renderSurface=void 0,this.clearRootElement(xe),ot.prototype.delete.call(this)}},We.prototype.onDpiChanged=function(xe){var ve,he;_e.PerformanceDebugHelper.mark(_e.EPerformanceMarkType.DpiChange,{contextId:this.id}),pe.Logger.debug("onDpiChanged"),this.renderableSeries.asArray().forEach(function(Se){return Se.onDpiChanged(xe)}),this.xAxes.asArray().forEach(function(Se){return Se.onDpiChanged()}),this.yAxes.asArray().forEach(function(Se){return Se.onDpiChanged()}),this.isSubSurface||this.changeViewportSize((ve=this.getMainCanvas())===null||ve===void 0?void 0:ve.clientWidth,(he=this.getMainCanvas())===null||he===void 0?void 0:he.clientHeight),ot.prototype.onDpiChanged.call(this,xe)},We.prototype.getXAxisById=function(xe){return this.xAxes.getById(xe)},We.prototype.getDefaultXAxis=function(){return this.xAxes.get(0)},We.prototype.getYAxisById=function(xe){return this.yAxes.getById(xe)},We.prototype.getDefaultYAxis=function(){return this.yAxes.get(0)},We.prototype.updateStackedCollectionAccumulatedVectors=function(){var xe=this.renderableSeries.asArray().filter(function(ve){return ve.isCollection});xe.forEach(function(ve){return ve.updateAccumulatedVectors()})},We.prototype.zoomExtents=function(xe,ve,he,Se,be){xe===void 0&&(xe=0),ve===void 0&&(ve=l.easing.outExpo),he===void 0&&(he=function(){}),Se===void 0&&(Se=function(){return!0}),be===void 0&&(be=function(){return!0}),this.updateStackedCollectionAccumulatedVectors();var ke=this.xAxes===void 0?0:this.xAxes.size(),qe=this.yAxes===void 0?0:this.yAxes.size();if(ke===0||qe===0)throw new Error("Cannot ZoomExtents when XAxes or YAxes is undefined or empty");var rt=this.zoomExtentsXInternal(xe,ve,Se,he);this.zoomExtentsYInternal(rt,xe,ve,be,he)},We.prototype.zoomExtentsX=function(xe,ve,he){xe===void 0&&(xe=0),ve===void 0&&(ve=l.easing.outExpo),he===void 0&&(he=function(){return!0}),this.zoomExtentsXInternal(xe,ve,he)},We.prototype.zoomExtentsY=function(xe,ve,he){xe===void 0&&(xe=0),ve===void 0&&(ve=l.easing.outExpo),he===void 0&&(he=function(){return!0}),this.zoomExtentsYInternal(void 0,xe,ve,he)},We.prototype.updateWatermark=function(xe,ve){var he;if(!s.IS_TEST_ENV){this.watermarkPropertyPosition.x=xe,this.watermarkPropertyPosition.y=ve,this.watermarkProperties.m_fCanvasWidth=this.renderSurface.viewportSize.width,this.watermarkProperties.SetPosition(this.watermarkPropertyPosition);var Se=(he=this.themeProvider)===null||he===void 0?void 0:he.isLightBackground;this.watermarkProperties.m_bIsDarkBackground=Se!==void 0?!Se:!1,this.webAssemblyContext2D.SCRTSetWaterMarkProperties(this.watermarkProperties)}},We.prototype.setZoomState=function(xe){this.zoomStateProperty=xe},Object.defineProperty(We.prototype,"zoomState",{get:function(){return this.zoomStateProperty},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"viewportBorder",{get:function(){return this.viewportBorderProperty},set:function(xe){this.viewportBorderProperty=i(i({},this.viewportBorderProperty),xe),this.notifyPropertyChanged("ViewportBorder")},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"canvasBorder",{get:function(){return this.canvasBorderProperty},set:function(xe){this.canvasBorderProperty=i(i({},this.canvasBorderProperty),xe),this.notifyPropertyChanged("canvasBorder")},enumerable:!1,configurable:!0}),We.prototype.getSurfaceRenderOrder=function(){var xe;return(xe=this.surfaceRenderOrderProperty)!==null&&xe!==void 0?xe:this.resolvedSurfaceRenderOrder},We.prototype.setSurfaceRenderOrder=function(xe){this.surfaceRenderOrderProperty!=xe&&(this.surfaceRenderOrderProperty=xe,this.notifyPropertyChanged("surfaceRenderOrder"))},We.prototype.drawBorder=function(xe){(0,D.drawBorder)(xe,this.webAssemblyContext2D,this.solidBrushCacheViewportBorder,this.seriesViewRect,this.clipRect,this.leftViewportBorder,this.topViewportBorder,this.rightViewportBorder,this.bottomViewportBorder,this.viewportBorder.color);var ve=xe.viewportSize,he=We.isSubSurface(this)?this.getSubChartRect():p.Rect.create(this.leftCanvasBorder,this.topCanvasBorder,Math.floor(ve.width-this.leftCanvasBorder-this.rightCanvasBorder),Math.floor(ve.height-this.topCanvasBorder-this.bottomCanvasBorder));(0,D.drawBorder)(xe,this.webAssemblyContext2D,this.solidBrushCacheCanvasBorder,he,this.clipRect,this.leftCanvasBorder,this.topCanvasBorder,this.rightCanvasBorder,this.bottomCanvasBorder,this.canvasBorder.color)},Object.defineProperty(We.prototype,"leftViewportBorder",{get:function(){var xe,ve;return(ve=(xe=this.viewportBorder.borderLeft)!==null&&xe!==void 0?xe:this.viewportBorder.border)!==null&&ve!==void 0?ve:0},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"rightViewportBorder",{get:function(){var xe,ve;return(ve=(xe=this.viewportBorder.borderRight)!==null&&xe!==void 0?xe:this.viewportBorder.border)!==null&&ve!==void 0?ve:0},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"topViewportBorder",{get:function(){var xe,ve;return(ve=(xe=this.viewportBorder.borderTop)!==null&&xe!==void 0?xe:this.viewportBorder.border)!==null&&ve!==void 0?ve:0},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"bottomViewportBorder",{get:function(){var xe,ve;return(ve=(xe=this.viewportBorder.borderBottom)!==null&&xe!==void 0?xe:this.viewportBorder.border)!==null&&ve!==void 0?ve:0},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"leftCanvasBorder",{get:function(){var xe,ve;return(ve=(xe=this.canvasBorder.borderLeft)!==null&&xe!==void 0?xe:this.canvasBorder.border)!==null&&ve!==void 0?ve:0},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"rightCanvasBorder",{get:function(){var xe,ve;return(ve=(xe=this.canvasBorder.borderRight)!==null&&xe!==void 0?xe:this.canvasBorder.border)!==null&&ve!==void 0?ve:0},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"topCanvasBorder",{get:function(){var xe,ve;return(ve=(xe=this.canvasBorder.borderTop)!==null&&xe!==void 0?xe:this.canvasBorder.border)!==null&&ve!==void 0?ve:0},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"bottomCanvasBorder",{get:function(){var xe,ve;return(ve=(xe=this.canvasBorder.borderBottom)!==null&&xe!==void 0?xe:this.canvasBorder.border)!==null&&ve!==void 0?ve:0},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"currentWebGlRenderContext",{get:function(){return this.currentWebGlRenderContextProperty},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"chartViewRect",{get:function(){var xe=this.renderSurface.viewportSize;return new p.Rect(0,0,xe.width,xe.height)},enumerable:!1,configurable:!0}),We.prototype.updateBackground=function(xe){var ve;this.applySciChartBackground((ve=this.background)!==null&&ve!==void 0?ve:this.themeProvider.sciChartBackground,xe)},We.prototype.onAnimate=function(xe){this.renderableSeries.asArray().forEach(function(be){return be.onAnimate(xe)});for(var ve=[],he=0;he<this.animationList.length;he++){var Se=this.animationList[he];Se.isComplete||(Se.update(xe),Se.isComplete||ve.push(Se))}this.animationList=ve},We.prototype.getAnimations=function(){return this.animationList},We.prototype.addAnimation=function(){for(var xe=this,ve=[],he=0;he<arguments.length;he++)ve[he]=arguments[he];ve!==void 0&&(ve.forEach(function(Se){return xe.animationList.push(Se)}),this.invalidateElement())},Object.defineProperty(We.prototype,"isRunningAnimation",{get:function(){for(var xe=0;xe<this.renderableSeries.size();xe++)if(this.renderableSeries.get(xe).isRunningAnimation)return!0;return this.animationList.some(function(ve){return!ve.isComplete})},enumerable:!1,configurable:!0}),We.prototype.getSeriesViewRectPadding=function(xe){if(xe===void 0&&(xe=!0),!this.seriesViewRect)throw new Error("Cannot get seriesViewRect before layout has ocurred. Move code that calls to be triggered by sciChartSurface.rendered");var ve=xe?1:H.DpiHelper.PIXEL_RATIO,he=this.seriesViewRect,Se=he.left/ve,be=he.top/ve,ke=(this.domCanvas2D.width-he.right)/ve,qe=(this.domCanvas2D.height-he.bottom)/ve;return new g.Thickness(be,ke,qe,Se)},We.prototype.resolveAutoColors=function(){var xe=this,ve=0;if(this.autoColorFilter){var he=this.renderableSeries.asArray().filter(function(Et){return Et.isCollection&&xe.autoColorFilter(Et)});ve=this.renderableSeries.asArray().filter(this.autoColorFilter).length-he.length;for(var Se=0,be=he;Se<be.length;Se++){var ke=be[Se];ve+=ke.asArray().filter(this.autoColorFilter).length}}else{var he=this.renderableSeries.asArray().filter(function(Gt){return Gt.isCollection});ve=this.renderableSeries.size()-he.length;for(var qe=0,rt=he;qe<rt.length;qe++){var ke=rt[qe];ve+=ke.size()}}for(var St=0,xt=0;xt<this.renderableSeries.size();xt++){var It=this.renderableSeries.get(xt);if(!(this.autoColorFilter&&!this.autoColorFilter(It)))if(It.isCollection)for(var Zt=0,ct=It.asArray();Zt<ct.length;Zt++){var Qe=ct[Zt];this.autoColorFilter&&!this.autoColorFilter(Qe)||(Qe.resolveAutoColors(St,ve,this.themeProvider),St+=1)}else It.resolveAutoColors(St,ve,this.themeProvider),St+=1}},We.prototype.registerFont=function(xe,ve){return n(this,void 0,void 0,function(){var he=this;return t(this,function(Se){return xe.includes(".")||(xe+=".ttf"),[2,new Promise(function(be,ke){var qe=he.webAssemblyContext2D.SCRTFileLoadCallbackInterface.implement({OnLoadComplete:function(rt,St){rt?be(!0):(console.error("Failed to load ".concat(xe," from ").concat(ve,".  Error: ").concat(St)),be(!1))}});he.webAssemblyContext2D.SCRTRegisterFile(xe,ve,qe)})]})})},We.prototype.setCoordSvgTranslation=function(xe,ve){this.xCoordSvgTrans=xe,this.yCoordSvgTrans=ve},We.prototype.getCoordSvgTranslation=function(){return new U.Point(this.xCoordSvgTrans,this.yCoordSvgTrans)},We.prototype.getOptions=function(){var xe,ve;"toJSON"in this.themeProvider?ve=this.themeProvider.toJSON():ve=this.themeProvider;var he={id:this.id,title:this.title,titleStyle:this.titleStyle,background:this.background,canvasBorder:this.canvasBorder,heightAspect:this.heightAspect,widthAspect:this.widthAspect,layoutManager:(xe=this.layoutManager)===null||xe===void 0?void 0:xe.toJSON(),padding:this.padding,theme:ve,viewportBorder:this.viewportBorder,loader:this.loaderJson,drawSeriesBehindAxis:this.drawSeriesBehindAxis,disableAspect:this.disableAspect,createSuspended:this.createSuspended,autoColorMode:this.autoColorMode,touchAction:this.touchActionProperty,freezeWhenOutOfView:this.freezeWhenOutOfView};return he},We.prototype.toJSON=function(xe){xe===void 0&&(xe=!1);var ve=this.getOptions(),he={type:Re.ESciChartSurfaceType.Default2D,surface:ve,xAxes:this.xAxes.asArray().map(function(Se){return Se.toJSON()}),yAxes:this.yAxes.asArray().map(function(Se){return Se.toJSON()}),series:this.renderableSeries.asArray().map(function(Se){return Se.toJSON(xe)}),modifiers:this.chartModifiers.asArray().map(function(Se){return Se.toJSON()}),annotations:this.annotations.asArray().map(function(Se){return Se.toJSON()}),onCreated:this.onCreatedName,subCharts:this.subCharts.map(function(Se){return Se.toJSON(!1)}),createSingle:!this.isCopyCanvasSurface};return he},We.prototype.getNextState=function(xe){return xe===void 0&&(xe=!1),n(this,void 0,void 0,function(){return t(this,function(ve){switch(ve.label){case 0:return[4,this.nextStateRender({resumeBefore:!0,invalidateOnResume:!0,suspendAfter:!0})];case 1:return ve.sent(),[2,this.toJSON(xe)]}})})},We.prototype.validateAndLink=function(){var xe=[];return this.renderableSeries.size()>0&&(this.xAxes.size()===0&&xe.push("Chart must have at least one X axis"),this.yAxes.size()===0&&xe.push("Chart must have at least one Y axis"),this.renderableSeries.asArray().forEach(function(ve,he){ve.linkAxes();var Se=ve.xAxis;Se||xe.push("".concat(ve.type,", index ").concat(he,", id ").concat(ve.id," references xAxisId ").concat(ve.xAxisId," which does not exist on the surface"));var be=ve.yAxis;be||xe.push("".concat(ve.type,", index ").concat(he,", id ").concat(ve.id," references yAxisId ").concat(ve.yAxisId," which does not exist on the surface")),Se&&be&&(Se.isVerticalChart&&![Pe.EAxisAlignment.Top,Pe.EAxisAlignment.Bottom].includes(be.axisAlignment)&&xe.push("For vertical chart (chart with X Axis alignment Left or Right) Y Axis alignment should be Top or Bottom, X Axis ID = ".concat(Se.id)),(0,Pe.getIsVertical)(Se.axisAlignment)&&(0,Pe.getIsVertical)(be.axisAlignment)&&xe.push("Both x and y axes can't have vertical alignment"),(0,Pe.getIsHorizontal)(Se.axisAlignment)&&(0,Pe.getIsHorizontal)(be.axisAlignment)&&xe.push("Both x and y axes can't have horizontal alignment"))})),xe},We.prototype.getWasmId=function(){return this.webAssemblyContext2D.canvas.id},We.prototype.applyOptions=function(xe){ot.prototype.applyOptions.call(this,xe),xe!=null&&xe.layoutManager&&("layoutChart"in xe.layoutManager||(xe.layoutManager=(0,a.createType)(y.EBaseType.LayoutManager,xe.layoutManager.type,null,xe.layoutManager.options)),this.layoutManager=xe.layoutManager),xe!=null&&xe.padding&&(this.padding=xe.padding),xe!=null&&xe.viewportBorder&&(this.viewportBorder=xe.viewportBorder),xe!=null&&xe.canvasBorder&&(this.canvasBorder=xe.canvasBorder),xe!=null&&xe.loader&&"toJSON"in xe.loader?this.loaderJson=xe.loader.toJSON():(xe==null?void 0:xe.loader)===!1&&(this.loaderJson=!1),xe!=null&&xe.drawSeriesBehindAxis&&(this.drawSeriesBehindAxisProperty=xe.drawSeriesBehindAxis),xe!=null&&xe.autoColorMode&&(this.autoColorMode=xe.autoColorMode),xe!=null&&xe.title&&(this.title=xe.title),xe!=null&&xe.titleStyle&&(this.titleStyle=xe.titleStyle),xe!=null&&xe.background&&(this.background=xe.background),xe!=null&&xe.touchAction&&(this.touchActionProperty=xe.touchAction)},We.prototype.resolveSurfaceOrders=function(){var xe;if(this.isSubSurface)throw new Error("resolveSurfaceOrders should only be called on a parent surface");for(var ve=o([this],this.subCharts.filter(function(rt){return rt.isVisible}),!0),he=[],Se=0,be=ve;Se<be.length;Se++){var ke=be[Se];ke.resolvedSurfaceRenderOrder=void 0;var qe=(xe=ke.getSurfaceRenderOrder())!==null&&xe!==void 0?xe:he.length;ke.resolvedSurfaceRenderOrder=qe,he.push(ke)}return he.sort(function(rt,St){return rt.getSurfaceRenderOrder()-St.getSurfaceRenderOrder()}),he},We.prototype.detachChartModifier=function(xe){ot.prototype.detachChartModifier.call(this,xe),this.subCharts.forEach(function(ve){xe.onDetachSubSurface(ve)})},We.prototype.attachChartModifier=function(xe){ot.prototype.attachChartModifier.call(this,xe),xe.modifierType!==De.EModifierType.MultiChart2DModifier&&(xe.setParentSurface(this),xe.invalidateParentCallback=this.invalidateElement,xe.onAttach(),this.subCharts.forEach(function(ve){xe.onAttachSubSurface(ve)}),this.invalidateElement())},We.prototype.applySciChartBackground=function(xe,ve){var he=ve.getNativeContext();this.domChartRoot&&(this.domChartRoot.style.background=xe),he&&(he.SetClearColor(0,0,0,0),he.Clear())},We.prototype.setClearAlphaParams=function(xe,ve){this.webAssemblyContext2D.SCRTSetClearAlphaParams(xe,ve)},We.prototype.zoomExtentsYInternal=function(xe,ve,he,Se,be){ve===void 0&&(ve=0),he===void 0&&(he=l.easing.outExpo),Se===void 0&&(Se=function(){return!0}),be===void 0&&(be=function(){}),this.yAxes.asArray().forEach(function(ke){if(Se(ke)){var qe=ke.getWindowedYRange(xe);qe&&ke.animateVisibleRange(qe,ve,he,be)}})},We.prototype.zoomExtentsXInternal=function(xe,ve,he,Se){xe===void 0&&(xe=0),ve===void 0&&(ve=l.easing.outExpo),he===void 0&&(he=function(){return!0}),Se===void 0&&(Se=function(){});var be=new d.Dictionary;return this.xAxes.asArray().forEach(function(ke){if(he(ke)){var qe=ke.getMaximumRange();ke.animateVisibleRange(qe,xe,ve,Se),be.add(ke.id,qe)}}),be},We.prototype.onRenderSurfaceDraw=function(){var xe=this,ve,he,Se=_e.PerformanceDebugHelper.mark(_e.EPerformanceMarkType.RenderSurfaceDrawStart,{contextId:this.id}),be=this.suspender.lock();try{this.preRenderAll.raiseEvent()}finally{be()}if(this.subChartsProperty.length>0){var ke=new _.BatchRenderContext(this.webAssemblyContext2D,this.renderSurface.viewportSize,(ve=this.domCanvas2D)===null||ve===void 0?void 0:ve.id),qe=this.resolveSurfaceOrders();qe.forEach(function(rt,St){St===qe.length-1&&(ke.doDraw=!0),rt.doDrawingLoop(ke)})}else this.doDrawingLoop();this.renderedToWebGl.raiseEvent(this.sciChartRenderer.isInvalidated),this.isCopyCanvasSurface||this.renderedToDestination.raiseEvent(this.sciChartRenderer.isInvalidated),(this.painted.handlers.length>0||_e.PerformanceDebugHelper.enableDebug)&&(0,_e.runAfterFramePaint)(function(){var rt;_e.PerformanceDebugHelper.mark(_e.EPerformanceMarkType.Painted,{contextId:xe.id}),xe.painted.raiseEvent((rt=xe.sciChartRenderer)===null||rt===void 0?void 0:rt.isInvalidated)}),this.currentWebGlRenderContextProperty=(0,c.deleteSafe)(this.currentWebGlRenderContext),_e.PerformanceDebugHelper.mark(_e.EPerformanceMarkType.RenderSurfaceDrawEnd,{contextId:this.id,relatedId:(he=Se==null?void 0:Se.detail)===null||he===void 0?void 0:he.relatedId})},We.prototype.detachSeries=function(xe){xe.type===m.ESeriesType.StackedColumnSeries||xe.type===m.ESeriesType.StackedMountainSeries||(this.chartModifiers.asArray().forEach(function(ve){ve.onDetachSeries(xe)}),xe.onDetach(),this.autoColorMode===v.EAutoColorMode.OnAddRemoveSeries&&(this.autoColorRequired=!0),this.invalidateElement())},We.prototype.attachSeries=function(xe){if(xe.type===m.ESeriesType.StackedColumnSeries){var ve=this.renderableSeries.asArray().find(function(Se){return Se.type===m.ESeriesType.StackedColumnCollection});if(!ve){ve=new N.StackedColumnCollection(this.webAssemblyContext2D);var he=this.renderableSeries.asArray().findIndex(function(Se){return Se===xe});this.renderableSeries.insert(he,ve)}ve.add(xe),this.renderableSeries.remove(xe,!1);return}else if(xe.type===m.ESeriesType.StackedMountainSeries||xe.type===m.ESeriesType.SmoothStackedMountainSeries){var ve=this.renderableSeries.asArray().find(function(be){return be.type===m.ESeriesType.StackedMountainCollection});if(!ve){ve=new V.StackedMountainCollection(this.webAssemblyContext2D);var he=this.renderableSeries.asArray().findIndex(function(ke){return ke===xe});this.renderableSeries.insert(he,ve)}ve.add(xe),this.renderableSeries.remove(xe,!1)}(!xe.isStacked||xe.isCollection)&&xe.onAttach(this),this.themeProviderProperty&&xe.applyTheme(this.themeProviderProperty),this.chartModifiers.asArray().forEach(function(Se){Se.onAttachSeries(xe)}),this.autoColorMode===v.EAutoColorMode.OnAddRemoveSeries&&(this.autoColorRequired=!0),this.invalidateElement()},We.prototype.detachAxis=function(xe){xe.onDetach(),this.invalidateElement()},We.prototype.checkAxisIdUniqueness=function(xe,ve){ve&&!this.xAxes.checkIdUniqueness(xe)&&console.error("The X axis Id ".concat(xe," is not unique")),!ve&&!this.yAxes.checkIdUniqueness(xe)&&console.error("The Y axis Id ".concat(xe," is not unique"))},We.prototype.attachAxis=function(xe,ve){if(xe.invalidateParentCallback)throw new Error("Invalid operation in sciChartSurface.attachAxis, this axis has already been attached to a SciChartSurface. Please detach it from a SciChartSurface before attaching to another");this.checkAxisIdUniqueness(xe.id,ve);var he=!1;ve&&!this.xAxes.asArray().some(function(Se){return Se.isPrimaryAxis})&&(he=!0),!ve&&!this.yAxes.asArray().some(function(Se){return Se.isPrimaryAxis})&&(he=!0),xe.onAttach(this,ve,he),this.themeProviderProperty&&xe.applyTheme(this.themeProviderProperty),xe.invalidateParentCallback=this.invalidateElement,this.invalidateElement()},We.prototype.onAttachSubSurface=function(xe){this.chartModifiers.asArray().forEach(function(ve){ve.onAttachSubSurface(xe)})},We.prototype.onDetachSubSurface=function(xe){this.chartModifiers.asArray().forEach(function(ve){ve.onDetachSubSurface(xe)})},Object.defineProperty(We.prototype,"drawSeriesBehindAxis",{get:function(){return this.drawSeriesBehindAxisProperty},set:function(xe){this.drawSeriesBehindAxisProperty=xe,this.invalidateElement()},enumerable:!1,configurable:!0}),We})(K.SciChartSurfaceBase);r.SciChartSurface=Ke})(ah)),ah}var fI={},tte;function ySe(){if(tte)return fI;tte=1,Object.defineProperty(fI,"__esModule",{value:!0}),fI.AnnotationClickEventArgs=void 0;var r=(function(){function e(i,n,t){this.sender=i,this.mouseArgs=n,this.relativeCoords=t}return e})();return fI.AnnotationClickEventArgs=r,fI}var w5={},rte;function LM(){return rte||(rte=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EAnnotationClippingMode=void 0,(function(e){e.SeriesViewRect="SeriesViewRect",e.SubChart="SubChart",e.Chart="Chart"})(r.EAnnotationClippingMode||(r.EAnnotationClippingMode={}))})(w5)),w5}var hI={},ite;function mSe(){if(ite)return hI;ite=1,Object.defineProperty(hI,"__esModule",{value:!0}),hI.AnnotationDragDeltaEventArgs=void 0;var r=(function(){function e(i){this.sender=i}return e})();return hI.AnnotationDragDeltaEventArgs=r,hI}var pI={},nte;function Ds(){if(nte)return pI;nte=1,Object.defineProperty(pI,"__esModule",{value:!0}),pI.annotationHelpers=void 0;var r=Xi(),e=Hi(),i=ta(),n=function(s,l,u){var c=document.createRange().createContextualFragment(s);return u?(l.insertBefore(c,u),u.previousElementSibling):(l.appendChild(c),l.lastChild)},t=function(s){var l="http://www.w3.org/2000/svg",u=document.createElementNS(l,"svg"),c=document.createElementNS(l,"g"),d=document.createElementNS(l,"line");c.appendChild(d);var f=void 0;return s&&(f=document.createElementNS(l,"g"),f.setAttribute("class","scichart__line-annotation-labels"),f.setAttribute("pointer-events","none"),c.appendChild(f)),u.appendChild(c),{svgElement:u,svgLine:d,svgLabelsContainer:f}},o=function(s,l,u,c,d){var f={x:s,y:l},h=d?{x:s,y:c}:{x:u,y:l},p=d?{x:u,y:l}:{x:s,y:c},g={x:u,y:c};return{x1y1:f,x2y1:h,x1y2:p,x2y2:g}},a=function(s,l,u,c,d,f){var h=s.getTransform(l),p=(0,r.getVector2)(u);if(l){var g=c!==i.ECoordinateMode.Pixel?d*e.DpiHelper.PIXEL_RATIO:d;h.TransformPoint(f,g,p)}else{var g=c!==i.ECoordinateMode.Pixel?d:d/e.DpiHelper.PIXEL_RATIO;h.TransformPoint(f,g,p)}var v=p.x,y=p.y;return{x:v,y}};return pI.annotationHelpers={createSvg:n,calcNewApex:o,convertPolarToCartesian:a,createSvgLineAndLabel:t},pI}var gI={},ote;function bSe(){if(ote)return gI;ote=1,Object.defineProperty(gI,"__esModule",{value:!0}),gI.AnnotationHoverEventArgs=void 0;var r=Ii(),e=Hi(),i=(function(){function n(t){var o=t.sender,a=t.mouseArgs,s=t.isHovered;this.sender=o,this.mouseArgs=a,this.isHovered=s}return n.prototype.getRelativeCoordinates=function(){var t=this.sender.getAdornerAnnotationBorders(!0),o=this.mouseArgs.mousePoint.x/e.DpiHelper.PIXEL_RATIO,a=this.mouseArgs.mousePoint.y/e.DpiHelper.PIXEL_RATIO;return new r.Point(o-t.x1,a-t.y1)},n})();return gI.AnnotationHoverEventArgs=i,gI}var O5={},ate;function Zs(){return ate||(ate=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.DISTANCE_TO_LINE=r.ADORNER_GRIP_RADIUS=r.PROPERTY=void 0,(function(e){e.ADORNER_TEMPLATE="ADORNER_TEMPLATE",e.ANNOTATION_CANVAS="ANNOTATION_CANVAS",e.RESIZE_DIRECTIONS="RESIZE_DIRECTIONS",e.AXIS_LABELS_FILL="AXIS_LABELS_FILL",e.AXIS_LABELS_STROKE="AXIS_LABELS_STROKE",e.AXIS_FONT_FAMILY="AXIS_FONT_FAMILY",e.AXIS_FONT_SIZE="AXIS_FONT_SIZE",e.BACKGROUND_COLOR="BACKGROUND_COLOR",e.CENTER_X="CENTER_X",e.CENTER_Y="CENTER_Y",e.CLASS_NAME="CLASS_NAME",e.COLOR="COLOR",e.CONTAINER_BACKGROUND="CONTAINER_BACKGROUND",e.CLIPPING="CLIPPING",e.FILL="FILL",e.FONT_FAMILY="FONT_FAMILY",e.FONT_SIZE="FONT_SIZE",e.FONT_STYLE="FONT_STYLE",e.FONT_WEIGHT="FONT_WEIGHT",e.FORMATTED_VALUE="FORMATTED_VALUE",e.HEIGHT="HEIGHT",e.HORIZONTAL_ANCHOR_POINT="HORIZONTAL_ANCHOR_POINT",e.IMAGE="IMAGE",e.IMAGE_HEIGHT="IMAGE_HEIGHT",e.IMAGE_WIDTH="IMAGE_WIDTH",e.IS_EDITABLE="IS_EDITABLE",e.IS_LINE_MODE="IS_LINE_MODE",e.IS_HIDDEN="IS_HIDDEN",e.IS_SELECTED="IS_SELECTED",e.IS_HOVERED="IS_HOVERED",e.LABEL_PLACEMENT="LABEL_PLACEMENT",e.LABEL_VALUE="LABEL_VALUE",e.MINIMUM_WIDTH="MINIMUM_WIDTH",e.MINIMUM_HEIGHT="MINIMUM_HEIGHT",e.OPACITY="OPACITY",e.PADDING="PADDING",e.PARENT_SURFACE="PARENT_SURFACE",e.SERIES_INFO="SERIES_INFO",e.SERIES_INFOS="SERIES_INFOS",e.STROKE="STROKE",e.STROKE_THICKNESS="STROKE_THICKNESS",e.STROKE_DASH_ARRAY="STROKE_DASH_ARRAY",e.SHOW_LABEL="SHOW_LABEL",e.TEXT="TEXT",e.TEXT_STROKE="TEXT_STROKE",e.TEXT_STYLE="TEXT_STYLE",e.TITLE="TITLE",e.TOOLTIP_LEGEND_OFFSET_X="TOOLTIP_LEGEND_OFFSET_X",e.TOOLTIP_LEGEND_OFFSET_Y="TOOLTIP_LEGEND_OFFSET_Y",e.TOOLTIP_LEGEND_TEMPLATE="TOOLTIP_LEGEND_TEMPLATE",e.TOOLTIP_DATA_TEMPLATE="TOOLTIP_DATA_TEMPLATE",e.TOOLTIP_SVG_TEMPLATE="TOOLTIP_SVG_TEMPLATE",e.VERTICAL_ANCHOR_POINT="VERTICAL_ANCHOR_POINT",e.X1="X1",e.X2="X2",e.XAXIS_ID="XAXIS_ID",e.X_COORDINATE_MODE="X_COORDINATE_MODE",e.X_COORD_SHIFT="X_COORD_SHIFT",e.Y1="Y1",e.Y2="Y2",e.YAXIS_ID="YAXIS_ID",e.Y_COORDINATE_MODE="Y_COORDINATE_MODE",e.Y_COORD_SHIFT="Y_COORD_SHIFT",e.PLACEMENT_DIV_ID="PLACEMENT_DIV_ID",e.ROTATION="ROTATION",e.ADORNER_STROKE="ADORNER_STROKE",e.ADORNER_FILL="ADORNER_FILL",e.ADORNER_RADIUS="ADORNER_RADIUS",e.SELECTION_STROKE="SELECTION_STROKE",e.SELECTION_DELTA="SELECTION_DELTA",e.SELECTION_THICKNESS="SELECTION_THICKNESS",e.DRAGPOINTS="DRAGPOINTS",e.MULTILINE_ALIGNMENT="MULTILINE_ALIGNMENT",e.WRAP_TO="WRAP_TO",e.LINE_SPACING="LINE_SPACING",e.SCALE="SCALE",e.OUTLINE="OUTLINE",e.RADIUS="RADIUS",e.INNER_RADIUS="INNER_RADIUS",e.ARC_COORDINATE_MODE="ARC_COORDINATE_MODE",e.VIEW_BOX_SIZE="VIEW_BOX_SIZE",e.SVG_STRING="SVG_STRING",e.ARROW_HEAD_LENGTH="ARROW_HEAD_LENGTH",e.ARROW_HEAD_WIDTH="ARROW_HEAD_WIDTH",e.ARROW_HEAD_DEPTH="ARROW_HEAD_DEPTH",e.ARROW_HEAD_STROKE_THICKNESS="ARROW_HEAD_STROKE_THICKNESS",e.ARROW_HEAD_COLOR="ARROW_HEAD_COLOR",e.ARROW_HEAD_POSITION="ARROW_HEAD_POSITION",e.IS_ARROW_HEAD_RELATIVE="IS_ARROW_HEAD_RELATIVE",e.SURFACE_RENDER_ORDER="SURFACE_RENDER_ORDER",e.RENDER_LAYER="RENDER_LAYER",e.LABEL_PADDING="LABEL_PADDING",e.LABEL_CORNER_RADIUS="LABEL_CORNER_RADIUS"})(r.PROPERTY||(r.PROPERTY={})),r.ADORNER_GRIP_RADIUS=10,r.DISTANCE_TO_LINE=10})(O5)),O5}var D5={},ste;function Aa(){return ste||(ste=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EAnnotationType=r.EAnnotationLayer=void 0,(function(e){e.AboveChart="AboveChart",e.BelowChart="BelowChart",e.Background="Background"})(r.EAnnotationLayer||(r.EAnnotationLayer={})),(function(e){e.SVG="SVG",e.RenderContextBoxAnnotation="RenderContextBoxAnnotation",e.RenderContextLineAnnotation="RenderContextLineAnnotation",e.RenderContextHorizontalLineAnnotation="RenderContextHorizontalLineAnnotation",e.RenderContextVerticalLineAnnotation="RenderContextVerticalLineAnnotation",e.RenderContextLineArrowAnnotation="RenderContextLineArrowAnnotation",e.RenderContextArcAnnotation="RenderContextArcAnnotation",e.RenderContextPolarArcAnnotation="RenderContextPolarArcAnnotation",e.RenderContextAxisMarkerAnnotation="RenderContextAxisMarkerAnnotation",e.RenderContextNativeTextAnnotation="RenderContextNativeTextAnnotation",e.RenderContextCustomAnnotation="RenderContextCustomAnnotation",e.SVGTextAnnotation="SVGTextAnnotation",e.SVGCustomAnnotation="SVGCustomAnnotation",e.SVGPolarPointerAnnotation="SVGPolarPointerAnnotation",e.HtmlCustomAnnotation="HtmlCustomAnnotation",e.HtmlTextAnnotation="HtmlTextAnnotation",e.SvgLineAnnotation="SvgLineAnnotation"})(r.EAnnotationType||(r.EAnnotationType={}))})(D5)),D5}var lte;function ta(){return lte||(lte=1,(function(r){var e=Rk&&Rk.__extends||(function(){var D=function(j,N){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(V,W){V.__proto__=W}||function(V,W){for(var K in W)Object.prototype.hasOwnProperty.call(W,K)&&(V[K]=W[K])},D(j,N)};return function(j,N){if(typeof N!="function"&&N!==null)throw new TypeError("Class extends value "+String(N)+" is not a constructor or null");D(j,N);function V(){this.constructor=j}j.prototype=N===null?Object.create(N):(V.prototype=N.prototype,new V)}})();Object.defineProperty(r,"__esModule",{value:!0}),r.AnnotationBase=r.ECoordinateMode=r.EDraggingGripPoint=void 0;var i=Jn(),n=$n(),t=Ba(),o=ni(),a=FH(),s=Ii(),l=vn(),u=$o(),c=N1(),d=Ha(),f=Os(),h=ws(),p=oo(),g=pn(),v=Tp(),y=ln(),m=Hi(),b=ySe(),S=LM(),_=mSe(),C=Ds(),T=bSe(),x=Zs(),A=Aa(),w;(function(D){D.x1y1="x1y1",D.x1y2="x1y2",D.x2y2="x2y2",D.x2y1="x2y1",D.x3y3="x3y3",D.Body="Body"})(w=r.EDraggingGripPoint||(r.EDraggingGripPoint={}));var L;(function(D){D.DataValue="DataValue",D.Pixel="Pixel",D.Relative="Relative"})(L=r.ECoordinateMode||(r.ECoordinateMode={}));var k=(function(D){e(j,D);function j(N){var V=this,W,K,H,U,I,Q,Z,ee,ie,de,pe,_e,Te,De,Pe,Ee,Re,je,Ke,ot,We,xe,ve,he,Se,be,ke;return V=D.call(this)||this,V.surfaceTypes=[d.ESurfaceType.SciChartSurfaceType],V.prevIsSelected=!0,V.annotationBorders={x1:0,x2:0,y1:0,y2:0},V.typeMap=new Map,V.isHiddenProperty=!1,V.annotationsGripsStrokeProperty=y.SciChartSurfaceBase.DEFAULT_THEME.annotationsGripsBorderBrush,V.annotationsGripsFillProperty=y.SciChartSurfaceBase.DEFAULT_THEME.annotationsGripsBackgroundBrush,V.annotationsGripsRadiusProperty=x.ADORNER_GRIP_RADIUS,V.selectionBoxStrokeProperty=y.SciChartSurfaceBase.DEFAULT_THEME.annotationSelectionStroke,V.selectionBoxDeltaProperty=1.5,V.selectionBoxThicknessProperty=6,V.dragPointsProperty=[w.Body,w.x1y1,w.x2y2,w.x2y1,w.x1y2],V.clippingProperty=S.EAnnotationClippingMode.SeriesViewRect,V.adornerClippingProperty=S.EAnnotationClippingMode.Chart,V.surfaceRenderOrderProperty=void 0,V.renderOrderProperty=void 0,V.annotationLayerProperty=A.EAnnotationLayer.AboveChart,V.isEditableProperty=!1,V.xCoordinateModeProperty=L.DataValue,V.yCoordinateModeProperty=L.DataValue,V.isSelectedProperty=!1,V.isHoveredProperty=!1,V.resizeDirectionsProperty=f.EXyDirection.XyDirection,V.id=(W=N==null?void 0:N.id)!==null&&W!==void 0?W:(0,h.generateGuid)(),V.dragStarted=new t.EventHandler,V.dragEnded=new t.EventHandler,V.dragDelta=new t.EventHandler,V.selectedChanged=new t.EventHandler,V.clicked=new t.EventHandler,V.hovered=new t.EventHandler,V.annotationLayerProperty=(K=N==null?void 0:N.annotationLayer)!==null&&K!==void 0?K:V.annotationLayerProperty,V.resizeDirectionsProperty=(H=N==null?void 0:N.resizeDirections)!==null&&H!==void 0?H:V.resizeDirectionsProperty,V.isEditableProperty=(U=N==null?void 0:N.isEditable)!==null&&U!==void 0?U:V.isEditableProperty,V.isHiddenProperty=(I=N==null?void 0:N.isHidden)!==null&&I!==void 0?I:V.isHiddenProperty,V.x1Property=(Q=N==null?void 0:N.x1)!==null&&Q!==void 0?Q:V.x1Property,V.y1Property=(Z=N==null?void 0:N.y1)!==null&&Z!==void 0?Z:V.y1Property,V.x2Property=(ee=N==null?void 0:N.x2)!==null&&ee!==void 0?ee:V.x2Property,V.y2Property=(ie=N==null?void 0:N.y2)!==null&&ie!==void 0?ie:V.y2Property,V.xAxisIdProperty=(de=N==null?void 0:N.xAxisId)!==null&&de!==void 0?de:V.xAxisIdProperty,V.yAxisIdProperty=(pe=N==null?void 0:N.yAxisId)!==null&&pe!==void 0?pe:V.yAxisIdProperty,V.xCoordinateModeProperty=(_e=N==null?void 0:N.xCoordinateMode)!==null&&_e!==void 0?_e:V.xCoordinateModeProperty,V.yCoordinateModeProperty=(Te=N==null?void 0:N.yCoordinateMode)!==null&&Te!==void 0?Te:V.yCoordinateModeProperty,V.isSelectedProperty=(De=N==null?void 0:N.isSelected)!==null&&De!==void 0?De:V.isSelectedProperty,V.opacityProperty=(Pe=N==null?void 0:N.opacity)!==null&&Pe!==void 0?Pe:1,V.annotationsGripsStrokeProperty=(Ee=N==null?void 0:N.annotationsGripsStroke)!==null&&Ee!==void 0?Ee:V.annotationsGripsStrokeProperty,V.annotationsGripsFillProperty=(Re=N==null?void 0:N.annotationsGripsFill)!==null&&Re!==void 0?Re:V.annotationsGripsFillProperty,V.annotationsGripsRadiusProperty=(je=N==null?void 0:N.annotationsGripsRadius)!==null&&je!==void 0?je:V.annotationsGripsRadius,V.selectionBoxStroke=(Ke=N==null?void 0:N.selectionBoxStroke)!==null&&Ke!==void 0?Ke:V.selectionBoxStrokeProperty,V.selectionBoxDelta=(ot=N==null?void 0:N.selectionBoxDelta)!==null&&ot!==void 0?ot:V.selectionBoxDeltaProperty,V.selectionBoxThickness=(We=N==null?void 0:N.selectionBoxThickness)!==null&&We!==void 0?We:V.selectionBoxThicknessProperty,V.dragPointsProperty=(xe=N==null?void 0:N.dragPoints)!==null&&xe!==void 0?xe:V.dragPointsProperty,V.clippingProperty=(ve=N==null?void 0:N.clipping)!==null&&ve!==void 0?ve:V.clippingProperty,V.surfaceRenderOrderProperty=(he=N==null?void 0:N.surfaceRenderOrder)!==null&&he!==void 0?he:V.surfaceRenderOrderProperty,V.renderLayerProperty=(Se=N==null?void 0:N.renderLayer)!==null&&Se!==void 0?Se:V.renderLayerProperty,V.renderOrderProperty=(be=N==null?void 0:N.renderOrder)!==null&&be!==void 0?be:V.renderOrderProperty,V.renderNextToProperty=(ke=N==null?void 0:N.renderNextTo)!==null&&ke!==void 0?ke:V.renderNextToProperty,N!=null&&N.onDragStarted&&(typeof N.onDragStarted=="string"?(V.typeMap.set("onDragStarted",N.onDragStarted),V.dragStarted.subscribe((0,i.getFunction)(u.EBaseType.OptionFunction,N.onDragStarted))):V.dragStarted.subscribe(N.onDragStarted)),N!=null&&N.onDragEnded&&(typeof N.onDragEnded=="string"?(V.typeMap.set("onDragEnded",N.onDragEnded),V.dragEnded.subscribe((0,i.getFunction)(u.EBaseType.OptionFunction,N.onDragEnded))):V.dragEnded.subscribe(N.onDragEnded)),N!=null&&N.onDrag&&(typeof N.onDrag=="string"?(V.typeMap.set("onDrag",N.onDrag),V.dragDelta.subscribe((0,i.getFunction)(u.EBaseType.OptionFunction,N.onDrag))):V.dragDelta.subscribe(N.onDrag)),N!=null&&N.onClick&&(typeof N.onClick=="string"?(V.typeMap.set("onClick",N.onClick),V.clicked.subscribe((0,i.getFunction)(u.EBaseType.OptionFunction,N.onClick))):V.clicked.subscribe(N.onClick)),N!=null&&N.onHover&&(typeof N.onHover=="string"?(V.typeMap.set("onHover",N.onHover),V.hovered.subscribe((0,i.getFunction)(u.EBaseType.OptionFunction,N.onHover))):V.hovered.subscribe(N.onHover)),V}return Object.defineProperty(j.prototype,"annotationLayer",{get:function(){return this.annotationLayerProperty},set:function(N){this.annotationLayerProperty!==N&&(this.annotationLayerProperty=N,this.notifyPropertyChanged(x.PROPERTY.ANNOTATION_CANVAS))},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"adornerDraggingPoint",{get:function(){return this.adornerDraggingPointProperty},set:function(N){var V;this.adornerDraggingPointProperty!==N&&(this.adornerDraggingPointProperty=N,N&&((V=this.dragStarted)===null||V===void 0||V.raiseEvent()))},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"parentSurface",{get:function(){return this.parentSurfaceProperty},set:function(N){this.parentSurfaceProperty!==N&&(this.parentSurfaceProperty=N,this.notifyPropertyChanged(x.PROPERTY.PARENT_SURFACE))},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"isEditable",{get:function(){return this.isEditableProperty},set:function(N){this.isEditableProperty!==N&&(this.isEditableProperty=N,this.notifyPropertyChanged(x.PROPERTY.IS_EDITABLE))},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"isHidden",{get:function(){return this.isHiddenProperty},set:function(N){this.isHiddenProperty!==N&&(this.isHiddenProperty=N,this.notifyPropertyChanged(x.PROPERTY.IS_HIDDEN))},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"isVisible",{get:function(){return!this.isHidden},set:function(N){this.isHidden=!N},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"xCoordinateMode",{get:function(){return this.xCoordinateModeProperty},set:function(N){this.xCoordinateModeProperty!==N&&(this.xCoordinateModeProperty=N,this.notifyPropertyChanged(x.PROPERTY.X_COORDINATE_MODE))},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"yCoordinateMode",{get:function(){return this.yCoordinateModeProperty},set:function(N){this.yCoordinateModeProperty!==N&&(this.yCoordinateModeProperty=N,this.notifyPropertyChanged(x.PROPERTY.Y_COORDINATE_MODE))},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"x1",{get:function(){return this.x1Property},set:function(N){this.x1Property!==N&&(this.x1Property=N,this.notifyPropertyChanged(x.PROPERTY.X1))},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"x2",{get:function(){return this.x2Property},set:function(N){this.x2Property!==N&&(this.x2Property=N,this.notifyPropertyChanged(x.PROPERTY.X2))},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"y1",{get:function(){return this.y1Property},set:function(N){this.y1Property!==N&&(this.y1Property=N,this.notifyPropertyChanged(x.PROPERTY.Y1))},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"y2",{get:function(){return this.y2Property},set:function(N){this.y2Property!==N&&(this.y2Property=N,this.notifyPropertyChanged(x.PROPERTY.Y2))},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"xAxisId",{get:function(){return this.xAxisIdProperty},set:function(N){this.xAxisIdProperty!==N&&(this.xAxisIdProperty=N,this.xAxisProperty=void 0,this.notifyPropertyChanged(x.PROPERTY.XAXIS_ID))},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"yAxisId",{get:function(){return this.yAxisIdProperty},set:function(N){this.yAxisIdProperty!==N&&(this.yAxisIdProperty=N,this.yAxisProperty=void 0,this.notifyPropertyChanged(x.PROPERTY.YAXIS_ID))},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"xAxis",{get:function(){return this.xAxisProperty},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"yAxis",{get:function(){return this.yAxisProperty},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"isVerticalChart",{get:function(){var N;return(N=this.xAxis)===null||N===void 0?void 0:N.isVerticalChart},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"resizeDirections",{get:function(){return this.resizeDirectionsProperty},set:function(N){this.resizeDirectionsProperty!==N&&(this.resizeDirectionsProperty=N,this.notifyPropertyChanged(x.PROPERTY.RESIZE_DIRECTIONS))},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"isSelected",{get:function(){return this.isSelectedProperty},set:function(N){this.isSelectedProperty!==N&&(this.isSelectedProperty=N,this.selectedChanged.raiseEvent(this.isSelectedProperty),this.notifyPropertyChanged(x.PROPERTY.IS_SELECTED))},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"isHovered",{get:function(){return this.isHoveredProperty},set:function(N){this.isHoveredProperty!==N&&(this.isHoveredProperty=N,this.hovered.raiseEvent(new T.AnnotationHoverEventArgs({sender:this,mouseArgs:void 0,isHovered:N})),this.notifyPropertyChanged(x.PROPERTY.IS_HOVERED))},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"annotationsGripsStroke",{get:function(){return this.annotationsGripsStrokeProperty},set:function(N){this.annotationsGripsStrokeProperty!==N&&(this.annotationsGripsStrokeProperty=N,this.notifyPropertyChanged(x.PROPERTY.ADORNER_STROKE))},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"annotationsGripsFill",{get:function(){return this.annotationsGripsFillProperty},set:function(N){this.annotationsGripsFillProperty!==N&&(this.annotationsGripsFillProperty=N,this.notifyPropertyChanged(x.PROPERTY.ADORNER_FILL))},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"annotationsGripsRadius",{get:function(){return this.annotationsGripsRadiusProperty},set:function(N){this.annotationsGripsRadiusProperty!==N&&(this.annotationsGripsRadiusProperty=N,this.notifyPropertyChanged(x.PROPERTY.ADORNER_RADIUS))},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"selectionBoxStroke",{get:function(){return this.selectionBoxStrokeProperty},set:function(N){this.selectionBoxStrokeProperty!==N&&(this.selectionBoxStrokeProperty=N,this.notifyPropertyChanged(x.PROPERTY.SELECTION_STROKE))},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"selectionBoxDelta",{get:function(){return this.selectionBoxDeltaProperty},set:function(N){this.selectionBoxDeltaProperty!==N&&(this.selectionBoxDeltaProperty=N,this.notifyPropertyChanged(x.PROPERTY.SELECTION_DELTA))},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"selectionBoxThickness",{get:function(){return this.selectionBoxThicknessProperty},set:function(N){this.selectionBoxThicknessProperty!==N&&(this.selectionBoxThicknessProperty=N,this.notifyPropertyChanged(x.PROPERTY.SELECTION_DELTA))},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"isDraggingStarted",{get:function(){return!!this.adornerDraggingPoint},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"opacity",{get:function(){return this.opacityProperty},set:function(N){this.opacityProperty!==N&&(this.opacityProperty=N,this.notifyPropertyChanged(x.PROPERTY.OPACITY))},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"clipping",{get:function(){return this.clippingProperty},set:function(N){this.clippingProperty!==N&&(this.clippingProperty=N,this.notifyPropertyChanged(x.PROPERTY.CLIPPING))},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"adornerClipping",{get:function(){return this.adornerClippingProperty},set:function(N){this.adornerClippingProperty!==N&&(this.adornerClippingProperty=N,this.notifyPropertyChanged(x.PROPERTY.CLIPPING))},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"svgAdornerRoot",{get:function(){return this.svgAdornerRootProperty},enumerable:!1,configurable:!0}),j.prototype.onAttach=function(N){if(!this.surfaceTypes.includes(N.surfaceType))throw N.hasInvalidState=!0,new Error("Annotation's type does not match SciChartSurface type. Please check ".concat(this.constructor.name,".surfaceTypes property to match ").concat(N.constructor.name,".surfaceType"));this.linkAxes(),this.svgAdornerRootProperty=N.domSvgAdornerLayer,this.isSelected&&(this.parentSurface.adornerLayer.selectedAnnotation=this)},j.prototype.onDetach=function(){this.isSelected&&(this.isSelected=!1,this.parentSurface.adornerLayer.deselectAnnotation(this)),this.isHovered&&(this.isHovered=!1),this.selectedChanged.unsubscribeAll(),this.deleteAdorner(),this.svgAdornerRootProperty=void 0},Object.defineProperty(j.prototype,"dragPoints",{get:function(){return this.dragPointsProperty},set:function(N){this.dragPointsProperty=N,this.notifyPropertyChanged(x.PROPERTY.DRAGPOINTS)},enumerable:!1,configurable:!0}),j.prototype.checkIsWithinBounds=function(N){var V=(0,g.translateFromCanvasToSeriesViewRect)(N.mousePoint,this.parentSurface.seriesViewRect,!0);return V?this.checkIsClickedOnAnnotationInternal(V.x,V.y):!1},j.prototype.hover=function(N){var V=N.args,W=N.notifyPositionUpdate,K=N.notifyOutEvent,H=N.isHovered!==void 0?N.isHovered:this.checkIsWithinBounds(V),U=this.isHovered;this.isHoveredProperty=H;var I=H&&!U,Q=U&&!H&&K,Z=H&&U&&W;(I||Q||Z)&&this.hovered.raiseEvent(new T.AnnotationHoverEventArgs({sender:this,mouseArgs:V,isHovered:H})),H!==U&&this.notifyPropertyChanged(x.PROPERTY.IS_HOVERED)},j.prototype.click=function(N,V){var W=(0,g.translateFromCanvasToSeriesViewRect)(N.mousePoint,this.parentSurface.seriesViewRect,!0);if(!W)return!1;var K=this.checkIsPointWithinClipArea(N.mousePoint);if(K&&this.checkIsClickedOnAnnotationInternal(W.x,W.y)){var H=this.getAdornerAnnotationBorders(!0),U=N.mousePoint.x/m.DpiHelper.PIXEL_RATIO,I=N.mousePoint.y/m.DpiHelper.PIXEL_RATIO,Q=new s.Point(U-H.x1,I-H.y1);return this.isSelected=V,this.clicked.raiseEvent(new b.AnnotationClickEventArgs(this,N,Q)),this.isSelected}else this.isSelected=!1;return this.isSelected},j.prototype.clickToSelect=function(N){var V=(0,g.translateFromCanvasToSeriesViewRect)(N.mousePoint,this.parentSurface.seriesViewRect,!0);return V?(this.isSelected=this.checkIsClickedOnAnnotationInternal(V.x,V.y),this.isSelected):!1},j.prototype.calcDragDistance=function(N){},j.prototype.onDragStarted=function(N){return!1},j.prototype.checkIsClickedOnAnnotation=function(N,V){var W=(0,g.translateFromCanvasToSeriesViewRect)(new s.Point(N*m.DpiHelper.PIXEL_RATIO,V*m.DpiHelper.PIXEL_RATIO),this.parentSurface.seriesViewRect,!0);return W?this.checkIsClickedOnAnnotationInternal(W.x,W.y):!1},j.prototype.checkIsPointWithinClipArea=function(N){var V=this.getClippingRect(this.adornerClipping,this.parentSurface.seriesViewRect,this.parentSurface.viewRect,this.parentSurface.chartViewRect),W=V.left,K=V.bottom,H=V.right,U=V.top;return(0,p.testIsInBounds)(N.x,N.y,W,K,H,U)},j.prototype.onDragAdorner=function(N){var V=this.getValuesFromCoordinates(N.mousePoint,!0);V&&this.calcDragDistance(V),this.dragDelta.raiseEvent(new _.AnnotationDragDeltaEventArgs(this))},j.prototype.onDragEnded=function(){var N;(N=this.dragEnded)===null||N===void 0||N.raiseEvent(),this.adornerDraggingPoint=void 0,this.prevValue=void 0},j.prototype.onDpiChanged=function(N){},j.prototype.suspendInvalidate=function(){this.invalidateState={isHidden:this.isHidden,x1:this.x1,y1:this.y1}},j.prototype.resumeInvalidate=function(){this.invalidateState&&((this.isHidden!==this.invalidateState.isHidden||this.x1!==this.invalidateState.x1||this.y1!==this.invalidateState.y1)&&this.invalidateParentCallback&&this.invalidateParentCallback(),this.invalidateState=void 0)},j.prototype.getSurfaceRenderOrder=function(){var N,V,W;return(N=this.surfaceRenderOrderProperty)!==null&&N!==void 0?N:(W=(V=this.parentSurface)===null||V===void 0?void 0:V.getSurfaceRenderOrder)===null||W===void 0?void 0:W.call(V)},j.prototype.setSurfaceRenderOrder=function(N){this.surfaceRenderOrderProperty!=N&&(this.surfaceRenderOrderProperty=N,this.notifyPropertyChanged(x.PROPERTY.SURFACE_RENDER_ORDER))},j.prototype.getRenderLayer=function(){if(this.renderLayerProperty)return this.renderLayerProperty;switch(this.annotationLayer){case A.EAnnotationLayer.AboveChart:return c.EDefaultRenderLayer.AnnotationsAboveSeriesLayer;case A.EAnnotationLayer.BelowChart:return c.EDefaultRenderLayer.AnnotationsBelowSeriesLayer;case A.EAnnotationLayer.Background:return c.EDefaultRenderLayer.Background;default:throw new Error("Invalid annotationLayer ".concat(this.annotationLayer,"!"))}},j.prototype.setRenderLayer=function(N){this.renderLayerProperty!=N&&(this.renderLayerProperty=N,this.notifyPropertyChanged(x.PROPERTY.RENDER_LAYER))},j.prototype.getRenderOrder=function(){return this.renderOrderProperty},j.prototype.setRenderOrder=function(N){this.renderOrderProperty!=N&&(this.renderOrderProperty=N,this.notifyPropertyChanged(x.PROPERTY.RENDER_LAYER))},j.prototype.setRenderNextTo=function(N,V){V===void 0&&(V=0),N===void 0?this.renderNextToProperty=void 0:this.renderNextToProperty={renderable:N,offset:V}},j.prototype.getRenderNextTo=function(){return this.renderNextToProperty},j.prototype.toJSON=function(){var N=this.getRenderNextTo(),V=N&&{renderable:typeof N.renderable=="string"?N.renderable:N.renderable.id,offset:N.offset},W={id:this.id,annotationLayer:this.annotationLayer,isEditable:this.isEditable,isHidden:this.isHidden,isSelected:this.isSelected,onDrag:this.typeMap.get("onDrag"),onDragEnded:this.typeMap.get("onDragEnded"),onDragStarted:this.typeMap.get("onDragStarted"),onClick:this.typeMap.get("onClick"),onHover:this.typeMap.get("onHover"),opacity:this.opacity,resizeDirections:this.resizeDirections,x1:this.x1Property,x2:this.x2Property,y1:this.y1Property,y2:this.y2Property,xAxisId:this.xAxisId,yAxisId:this.yAxisId,xCoordinateMode:this.xCoordinateMode,yCoordinateMode:this.yCoordinateMode,surfaceRenderOrder:this.surfaceRenderOrderProperty,renderLayer:this.getRenderLayer(),renderOrder:this.getRenderOrder(),renderNextTo:V,annotationsGripsStroke:this.annotationsGripsStroke,annotationsGripsFill:this.annotationsGripsFill,annotationsGripsRadius:this.annotationsGripsRadius,selectionBoxStroke:this.selectionBoxStroke,selectionBoxDelta:this.selectionBoxDelta,selectionBoxThickness:this.selectionBoxThickness,dragPoints:this.dragPointsProperty,clipping:this.clippingProperty};return{type:this.type,options:W}},j.prototype.getAnnotationBorders=function(N,V){var W,K;if(N===void 0&&(N=!1),V===void 0&&(V=!1),!N&&!V)return this.annotationBorders;var H=this.annotationBorders,U=H.x1,I=H.x2,Q=H.y1,Z=H.y2,ee=V?this.selectionBoxDelta:0;return N?(I<U?(W=[I-ee,U+ee],U=W[0],I=W[1]):(U-=ee,I+=ee),Z<Q?(K=[Z-ee,Q+ee],Q=K[0],Z=K[1]):(Q-=ee,Z+=ee)):(I<U?(U+=ee,I-=ee):(U-=ee,I+=ee),Z<Q?(Q+=ee,Z-=ee):(Q-=ee,Z+=ee)),{x1:U,x2:I,y1:Q,y2:Z}},j.prototype.getAdornerAnnotationBorders=function(N,V){N===void 0&&(N=!1),V===void 0&&(V=!1);var W=this.getAnnotationBorders(N,V),K=this.isDomAnnotation?W.x1*m.DpiHelper.PIXEL_RATIO:W.x1,H=this.isDomAnnotation?W.x2*m.DpiHelper.PIXEL_RATIO:W.x2,U=this.isDomAnnotation?W.y1*m.DpiHelper.PIXEL_RATIO:W.y1,I=this.isDomAnnotation?W.y2*m.DpiHelper.PIXEL_RATIO:W.y2,Q=(0,g.translateFromSeriesViewRectToCanvas)(new s.Point(K,U),this.parentSurface.seriesViewRect,!0),Z=(0,g.translateFromSeriesViewRectToCanvas)(new s.Point(H,I),this.parentSurface.seriesViewRect,!0);return{x1:Q.x/m.DpiHelper.PIXEL_RATIO,x2:Z.x/m.DpiHelper.PIXEL_RATIO,y1:Q.y/m.DpiHelper.PIXEL_RATIO,y2:Z.y/m.DpiHelper.PIXEL_RATIO}},j.prototype.getAnnotationGripSvg=function(N,V){return'<circle cx="'.concat(N,'" cy="').concat(V,'" r="').concat(this.annotationsGripsRadius,'" fill="').concat(this.annotationsGripsFill,'" stroke="').concat(this.annotationsGripsStroke,'"/>')},j.prototype.canDragPoint=function(N){return this.dragPointsProperty.includes(N)},j.prototype.svgStringAdornerTemplate=function(N,V,W,K){return'<svg xmlns="http://www.w3.org/2000/svg"></svg>'},j.prototype.getClippingRect=function(N,V,W,K){var H;switch(N){case S.EAnnotationClippingMode.SeriesViewRect:{H=V;break}case S.EAnnotationClippingMode.SubChart:{H=W;break}case S.EAnnotationClippingMode.Chart:{H=K;break}default:throw new Error('Unhandled clipping value: "'.concat(N,'"'))}var U=this.parentSurface.clipRect;return l.Rect.intersect(H,U)},j.prototype.linkAxes=function(){if((0,a.updateAxisIds)(this),!!this.parentSurface){if(!this.xAxisProperty&&this.xAxisId){var N=this.parentSurface.getXAxisById(this.xAxisId);N?this.xAxisProperty=N:(console.warn('Annotation looked for xAxis Id "'.concat(this.xAxisId,'" but did not find. Default xAxis will be used')),this.xAxisProperty=this.parentSurface.getDefaultXAxis())}if(!this.yAxisProperty&&this.yAxisId){var V=this.parentSurface.getYAxisById(this.yAxisId);V?this.yAxisProperty=V:(console.warn('Annotation looked for yAxis Id "'.concat(this.yAxisId,'" but did not find. Default yAxis will be used')),this.yAxisProperty=this.parentSurface.getDefaultYAxis())}}},j.prototype.getClipPath=function(N){switch(N){case S.EAnnotationClippingMode.Chart:{var V=this.parentSurface,W=v.SciChartSurface.isSubSurface(V)?V.parentSurface.id:V.id;return"url(#surfaceViewRectClip_".concat(W,")")}case S.EAnnotationClippingMode.SeriesViewRect:return"url(#seriesViewRectClip_".concat(this.parentSurface.id,")");case S.EAnnotationClippingMode.SubChart:return"url(#surfaceViewRectClip_".concat(this.parentSurface.id,")");default:return N}},j.prototype.applySvgClipping=function(N,V){var W=this.getClipPath(V);return W?'<svg clip-path="'.concat(W,'" >').concat(N,"</svg>"):"<svg>".concat(N,"</svg>")},j.prototype.notifyPropertyChanged=function(N){this.invalidateParentCallback&&!this.invalidateState&&this.invalidateParentCallback({svgOnly:this.isDomAnnotation})},j.prototype.getCoordinate=function(N,V,W){if(o.Guard.notNull(W,"coordinateMode"),o.Guard.notNull(V,"calculator"),N!==void 0)switch(W){case L.Pixel:return this.isDomAnnotation?N:N*m.DpiHelper.PIXEL_RATIO;case L.DataValue:{var K=N!=null?V.getCoordinate(N):void 0;return this.isDomAnnotation?K/m.DpiHelper.PIXEL_RATIO:K}case L.Relative:return this.isDomAnnotation?(N*V.viewportDimension+V.offset)/m.DpiHelper.PIXEL_RATIO:N*V.viewportDimension+V.offset;default:throw new Error("AnnotationBase.getCoordinate with CoordinateMode.".concat(W," is not implemented"))}},j.prototype.getResolvedCoordinate=function(N,V,W,K,H){var U=H?this.isVerticalChart:!this.isVerticalChart;return U?this.getCoordinate(K??0,V,this.yCoordinateMode):this.getCoordinate(W??0,N,this.xCoordinateMode)},j.prototype.getX1Coordinate=function(N,V){return this.getResolvedCoordinate(N,V,this.x1,this.y1,!0)},j.prototype.getX2Coordinate=function(N,V){return this.getResolvedCoordinate(N,V,this.x2,this.y2,!0)},j.prototype.getY1Coordinate=function(N,V){return this.getResolvedCoordinate(N,V,this.x1,this.y1,!1)},j.prototype.getY2Coordinate=function(N,V){return this.getResolvedCoordinate(N,V,this.x2,this.y2,!1)},j.prototype.getValue=function(N,V,W){switch(W){case L.Pixel:return this.isDomAnnotation?V.getDataValue(N*m.DpiHelper.PIXEL_RATIO):V.getDataValue(N);case L.DataValue:return N;case L.Relative:return(V.visibleMax-V.visibleMin)*N+V.visibleMin;default:throw new Error("Not implemented")}},j.prototype.checkIsClickedOnAnnotationInternal=function(N,V){return!1},j.prototype.deleteAdorner=function(){!this.svgAdorner||!this.parentSurface||this.parentSurface.isDeleted||(this.svgAdornerRoot.removeChild(this.svgAdorner),this.svgAdorner=void 0)},j.prototype.getValuesFromCoordinates=function(N,V){var W=this.parentSurface.seriesViewRect,K=V?(0,g.translateFromCanvasToSeriesViewRect)(N,W,!0):N;if(K){var H=this.convertCartesianToPolar(K.x,K.y),U=H.x,I=H.y,Q=this.xAxis.getCurrentCoordinateCalculator(),Z=this.yAxis.getCurrentCoordinateCalculator(),ee=this.convertFromCoordinate(this.xAxis.isHorizontalAxis?U:I,Q,this.xCoordinateMode),ie=this.convertFromCoordinate(this.yAxis.isHorizontalAxis?U:I,Z,this.yCoordinateMode);return new s.Point(ee,ie)}},j.prototype.getXYCoordinatesFromValues=function(N){var V=this.parentSurface.seriesViewRect,W=this.getAbsoluteCoordinates(N),K=W.x,H=W.y,U=this.convertPolarToCartesian(K,H,this.isDomAnnotation),I=(0,g.translateFromSeriesViewRectToCanvas)(new s.Point(U.x,U.y),V,!0);if(I)return new s.Point(I.x,I.y)},j.prototype.convertFromCoordinate=function(N,V,W){switch(W){case L.Pixel:return N/m.DpiHelper.PIXEL_RATIO;case L.DataValue:return N!=null?V.getDataValue(N):void 0;case L.Relative:return(N-V.offset)/V.viewportDimension;default:throw new Error("Not implemented")}},j.prototype.getAbsoluteCoordinates=function(N){var V=this.xAxis.getCurrentCoordinateCalculator(),W=this.yAxis.getCurrentCoordinateCalculator(),K=this.getCoordinate(N.x,V,this.xCoordinateMode),H=this.getCoordinate(N.y,W,this.yCoordinateMode);return this.isVerticalChart?new s.Point(H,K):new s.Point(K,H)},j.prototype.getAbsoluteHorizontalCoordinate=function(N){var V=this.xAxis.getCurrentCoordinateCalculator(),W=this.yAxis.getCurrentCoordinateCalculator();return this.isVerticalChart?this.getCoordinate(N,W,this.yCoordinateMode):this.getCoordinate(N,V,this.xCoordinateMode)},j.prototype.getAbsoluteVerticalCoordinate=function(N){var V=this.xAxis.getCurrentCoordinateCalculator(),W=this.yAxis.getCurrentCoordinateCalculator();return this.isVerticalChart?this.getCoordinate(N,V,this.xCoordinateMode):this.getCoordinate(N,W,this.yCoordinateMode)},j.prototype.setAnnotationBorders=function(N,V,W,K){this.annotationBorders={x1:N,x2:V,y1:W,y2:K}},j.prototype.convertPolarToCartesian=function(N,V,W){if(W===void 0&&(W=!1),!this.parentSurface.isPolar)return{x:N,y:V};var K=this.parentSurface;return C.annotationHelpers.convertPolarToCartesian(this.xAxis,W,K.webAssemblyContext2D,this.xCoordinateMode,N,V)},j.prototype.convertCartesianToPolar=function(N,V){if(!this.parentSurface.isPolar)return{x:N,y:V};var W=this.parentSurface,K=this.xAxis.getTransform(),H=new W.webAssemblyContext2D.TSRVector2;K.ReverseTransformPoint(N,V,H);var U=-H.y,I=H.x;return H.delete(),{x:U,y:I}},j.prototype.applyPixelRatioToDragDist=function(N){return this.parentSurface.isPolar&&this.xCoordinateMode===L.Pixel?N*m.DpiHelper.PIXEL_RATIO:N},j})(n.DeletableEntity);r.AnnotationBase=k})(Rk)),Rk}var EC={},R5={},M5={},ute;function wv(){return ute||(ute=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.ERadialAxisLabelPlacement=r.EAngularAxisLabelPlacement=r.EVerticalAlignment=r.EHorizontalAlignment=r.ELabelPlacement=void 0,(function(e){e.Right="Right",e.TopRight="TopRight",e.BottomRight="BottomRight",e.Bottom="Bottom",e.Left="Left",e.TopLeft="TopLeft",e.BottomLeft="BottomLeft",e.Top="Top",e.Axis="Axis",e.Auto="Auto"})(r.ELabelPlacement||(r.ELabelPlacement={})),(function(e){e.Right="Right",e.Left="Left"})(r.EHorizontalAlignment||(r.EHorizontalAlignment={})),(function(e){e.Top="Top",e.Bottom="Bottom"})(r.EVerticalAlignment||(r.EVerticalAlignment={})),(function(e){e.Inner="Inner",e.Outer="Outer",e.Center="Center"})(r.EAngularAxisLabelPlacement||(r.EAngularAxisLabelPlacement={})),(function(e){e.Top="Top",e.Bottom="Bottom",e.Center="Center"})(r.ERadialAxisLabelPlacement||(r.ERadialAxisLabelPlacement={}))})(M5)),M5}var L5={},cte;function kM(){return cte||(cte=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EPolarLabelMode=void 0,(function(e){e.Horizontal="Horizontal",e.Parallel="Parallel",e.Perpendicular="Perpendicular"})(r.EPolarLabelMode||(r.EPolarLabelMode={}))})(L5)),L5}var dte;function H1(){return dte||(dte=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.labelHelper=void 0;var e=xg(),i=wv(),n=kM();function t(d){return 180*d/Math.PI}function o(d){for(var f=d;f<0;)f+=2*Math.PI;return f=f%(2*Math.PI),f}function a(d,f){if(d===n.EPolarLabelMode.Parallel){var h=Math.round(t(o(f)));return h%360<=180?f-Math.PI/2:f-3*Math.PI/2}else if(d===n.EPolarLabelMode.Perpendicular)return Math.cos(f)>0?f:f-Math.PI;return 0}function s(d){return d===i.ERadialAxisLabelPlacement.Top?e.EVerticalAnchorPoint.Bottom:d===i.ERadialAxisLabelPlacement.Bottom?e.EVerticalAnchorPoint.Top:e.EVerticalAnchorPoint.Center}function l(d,f){return d===i.EAngularAxisLabelPlacement.Outer?f?e.EHorizontalAnchorPoint.Right:e.EHorizontalAnchorPoint.Left:d===i.EAngularAxisLabelPlacement.Inner?f?e.EHorizontalAnchorPoint.Left:e.EHorizontalAnchorPoint.Right:e.EHorizontalAnchorPoint.Center}function u(d,f){return d===i.EAngularAxisLabelPlacement.Outer?f?e.EVerticalAnchorPoint.Top:e.EVerticalAnchorPoint.Bottom:d===i.EAngularAxisLabelPlacement.Inner?f?e.EVerticalAnchorPoint.Bottom:e.EVerticalAnchorPoint.Top:e.EVerticalAnchorPoint.Center}function c(d,f,h){if(f===n.EPolarLabelMode.Parallel){var p=r.labelHelper.radiansToDegrees(Math.PI/2-d),g=p<-90;return{resultAngle:g?p+180:p,horizontalAnchorPoint:e.EHorizontalAnchorPoint.Center,verticalAnchorPoint:u(h,g)}}else if(f===n.EPolarLabelMode.Perpendicular){var p=r.labelHelper.radiansToDegrees(-d),g=p<-90&&p>-270;return{resultAngle:g?p+180:p,horizontalAnchorPoint:l(h,g),verticalAnchorPoint:e.EVerticalAnchorPoint.Center}}return{resultAngle:0,horizontalAnchorPoint:e.EHorizontalAnchorPoint.Center,verticalAnchorPoint:e.EVerticalAnchorPoint.Center}}r.labelHelper={getPolarLabelRotation:a,radiansToDegrees:t,getLabelPlacementForRadialAxis:s,getLabelRotationAndPlacementForAngularAxis:c,normalizeAngle:o}})(R5)),R5}var AC={},fte;function IM(){if(fte)return AC;fte=1;var r=AC&&AC.__extends||(function(){var t=function(o,a){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");t(o,a);function s(){this.constructor=o}o.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}})();Object.defineProperty(AC,"__esModule",{value:!0}),AC.RenderContextAnnotationBase=void 0;var e=ta(),i=Zs(),n=(function(t){r(o,t);function o(a){var s=t.call(this,a)||this;return s.isSvgAnnotation=!1,s.isDomAnnotation=!1,s}return Object.defineProperty(o.prototype,"parentSurface",{get:function(){return this.parentSurfaceProperty},set:function(a){this.parentSurfaceProperty!==a&&(this.parentSurfaceProperty=a,this.notifyPropertyChanged(i.PROPERTY.PARENT_SURFACE))},enumerable:!1,configurable:!0}),o})(e.AnnotationBase);return AC.RenderContextAnnotationBase=n,AC}var hte;function v8(){if(hte)return EC;hte=1;var r=EC&&EC.__extends||(function(){var g=function(v,y){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,b){m.__proto__=b}||function(m,b){for(var S in b)Object.prototype.hasOwnProperty.call(b,S)&&(m[S]=b[S])},g(v,y)};return function(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");g(v,y);function m(){this.constructor=v}v.prototype=y===null?Object.create(y):(m.prototype=y.prototype,new m)}})();Object.defineProperty(EC,"__esModule",{value:!0}),EC.ArcAnnotationBase=void 0;var e=Mr(),i=Ii(),n=oo(),t=pn(),o=hl(),a=ts(),s=H1(),l=ln(),u=Hi(),c=ta(),d=Ds(),f=Zs(),h=IM(),p=(function(g){r(v,g);function v(y){var m=this,b,S,_,C,T;return m=g.call(this,y)||this,m.dragPointsProperty=[c.EDraggingGripPoint.Body,c.EDraggingGripPoint.x1y1,c.EDraggingGripPoint.x2y2,c.EDraggingGripPoint.x3y3],m.arcAnnotationBorders={x1:0,x2:0,y1:0,y2:0,xCenter:0,yCenter:0},m.strokeThicknessProperty=1,m.strokeDashArrayProperty=[],m.strokeProperty="#FFFFFF",m.isLineModeProperty=!1,m.strokeProperty=(b=y==null?void 0:y.stroke)!==null&&b!==void 0?b:m.strokeProperty,m.strokeThicknessProperty=(S=y==null?void 0:y.strokeThickness)!==null&&S!==void 0?S:m.strokeThicknessProperty,m.strokeDashArrayProperty=(_=y==null?void 0:y.strokeDashArray)!==null&&_!==void 0?_:m.strokeDashArrayProperty,m.isLineModeProperty=(C=y==null?void 0:y.isLineMode)!==null&&C!==void 0?C:m.isLineModeProperty,m.fillProperty=(T=y==null?void 0:y.fill)!==null&&T!==void 0?T:m.fillProperty,m}return Object.defineProperty(v.prototype,"stroke",{get:function(){return this.strokeProperty},set:function(y){y!==this.strokeProperty&&(this.strokeProperty=y,this.notifyPropertyChanged(f.PROPERTY.STROKE))},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"strokeThickness",{get:function(){return this.strokeThicknessProperty},set:function(y){y!==this.strokeThicknessProperty&&(this.strokeThicknessProperty=y,this.notifyPropertyChanged(f.PROPERTY.STROKE_THICKNESS))},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"strokeDashArray",{get:function(){return this.strokeDashArrayProperty},set:function(y){y!==this.strokeDashArrayProperty&&(this.strokeDashArrayProperty=y,this.notifyPropertyChanged(f.PROPERTY.STROKE_DASH_ARRAY))},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"isLineMode",{get:function(){return this.isLineModeProperty},set:function(y){y!==this.isLineModeProperty&&(this.isLineModeProperty=y,this.notifyPropertyChanged(f.PROPERTY.IS_LINE_MODE))},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"fill",{get:function(){return this.fillProperty},set:function(y){y!==this.fillProperty&&(this.fillProperty=y,this.notifyPropertyChanged(f.PROPERTY.FILL))},enumerable:!1,configurable:!0}),v.prototype.delete=function(){this.strokePenCache=(0,e.deleteSafe)(this.strokePenCache),this.fillBrushCache=(0,e.deleteSafe)(this.fillBrushCache)},v.prototype.onAttach=function(y){g.prototype.onAttach.call(this,y),this.strokePenCache||(this.strokePenCache=new a.Pen2DCache(y.webAssemblyContext2D)),(0,a.createPenInCache)(this.strokePenCache,this.stroke,this.strokeThickness>0?this.strokeThickness+1:0,this.opacity,this.strokeDashArray),this.fillBrushCache||(this.fillBrushCache=new o.BrushCache(y.webAssemblyContext2D)),(0,o.createBrushInCache)(this.fillBrushCache,this.fill,this.opacity)},v.prototype.onDpiChanged=function(y){g.prototype.onDpiChanged.call(this,y),this.notifyPropertyChanged(f.PROPERTY.STROKE)},v.prototype.toJSON=function(){var y=g.prototype.toJSON.call(this),m={stroke:this.stroke,strokeDashArray:this.strokeDashArray,strokeThickness:this.strokeThickness,isLineMode:this.isLineMode,fill:this.fill};return Object.assign(y.options,m),y},v.prototype.onDragStarted=function(y){g.prototype.onDragStarted.call(this,y);var m=this.getArcAnnotationBorders(!0),b=m.x1,S=m.x2,_=m.xCenter,C=m.y1,T=m.y2,x=m.yCenter,A=y.mousePoint.x,w=y.mousePoint.y;if(this.canDragPoint(c.EDraggingGripPoint.x1y1)){var L=(0,n.calcDistance)(b,C,A,w);if(L<this.annotationsGripsRadius*u.DpiHelper.PIXEL_RATIO)return this.adornerDraggingPoint=c.EDraggingGripPoint.x1y1,!0}if(this.canDragPoint(c.EDraggingGripPoint.x2y2)){var L=(0,n.calcDistance)(S,T,A,w);if(L<this.annotationsGripsRadius*u.DpiHelper.PIXEL_RATIO)return this.adornerDraggingPoint=c.EDraggingGripPoint.x2y2,!0}if(this.canDragPoint(c.EDraggingGripPoint.x3y3)){var L=(0,n.calcDistance)(_,x,A,w);if(L<this.annotationsGripsRadius*u.DpiHelper.PIXEL_RATIO)return this.adornerDraggingPoint=c.EDraggingGripPoint.x3y3,!0}return this.canDragPoint(c.EDraggingGripPoint.Body)&&this.clickToSelect(y)?(this.adornerDraggingPoint=c.EDraggingGripPoint.Body,!0):!1},v.prototype.notifyPropertyChanged=function(y){g.prototype.notifyPropertyChanged.call(this,y);var m=[f.PROPERTY.STROKE,f.PROPERTY.STROKE_THICKNESS,f.PROPERTY.STROKE_DASH_ARRAY,f.PROPERTY.OPACITY];m.includes(y)&&this.strokePenCache&&(0,a.createPenInCache)(this.strokePenCache,this.stroke,this.strokeThickness,this.opacity,this.strokeDashArray);var b=[f.PROPERTY.FILL,f.PROPERTY.OPACITY];b.includes(y)&&this.fillBrushCache&&(0,o.createBrushInCache)(this.fillBrushCache,this.fill,this.opacity)},v.prototype.getBrush=function(){if(!this.isLineMode){var y=this.fill?(0,o.getWebGlBrushFromCache)(this.fillBrushCache):void 0;return y==null||y.setOpacity(this.opacity),y?y.scrtBrush:void 0}},v.prototype.getDrawMode=function(){return this.isLineMode?1:0},v.prototype.setArcAnnotationBorders=function(y,m,b,S,_,C){this.arcAnnotationBorders={x1:y,x2:m,xCenter:b,y1:S,y2:_,yCenter:C}},v.prototype.getArcAnnotationBorders=function(y,m){if(y===void 0&&(y=!1),m===void 0&&(m=1),y){var b=this.parentSurface.seriesViewRect,S=this.arcAnnotationBorders,_=S.x1,C=S.x2,T=S.xCenter,x=S.y1,A=S.y2,w=S.yCenter,L=(0,t.translateFromSeriesViewRectToCanvas)(new i.Point(_,x),b,!0),k=(0,t.translateFromSeriesViewRectToCanvas)(new i.Point(C,A),b,!0),D=(0,t.translateFromSeriesViewRectToCanvas)(new i.Point(T,w),b,!0);return{x1:L.x*m,y1:L.y*m,x2:k.x*m,y2:k.y*m,xCenter:D.x*m,yCenter:D.y*m}}return this.arcAnnotationBorders},v.prototype.svgStringArcAdornerTemplate=function(y,m,b,S,_,C){var T=this.selectionBoxStroke;return`<svg xmlns="http://www.w3.org/2000/svg">
    <line x1="`.concat(y,'" y1="').concat(m,'" x2="').concat(b,'" y2="').concat(S,'" stroke="').concat(T,`" stroke-width="6" />
    <line x1="`).concat(y,'" y1="').concat(m,'" x2="').concat(_,'" y2="').concat(C,'" stroke="').concat(T,`" stroke-width="6" />
    <line x1="`).concat(_,'" y1="').concat(C,'" x2="').concat(b,'" y2="').concat(S,'" stroke="').concat(T,`" stroke-width="6" />
    `).concat(this.canDragPoint(c.EDraggingGripPoint.x1y1)?this.getAnnotationGripSvg(y,m):"",`
    `).concat(this.canDragPoint(c.EDraggingGripPoint.x2y2)?this.getAnnotationGripSvg(b,S):"",`
    `).concat(this.getAnnotationGripSvg(_,C),`
    </svg>`)},v.prototype.updateAdornerInner=function(){if(this.deleteAdorner(),this.isSelected){var y=this.getArcAnnotationBorders(!0,1/u.DpiHelper.PIXEL_RATIO),m=y.x1,b=y.x2,S=y.y1,_=y.y2,C=y.xCenter,T=y.yCenter,x=this.svgStringArcAdornerTemplate(m,S,b,_,C,T);this.svgAdorner=d.annotationHelpers.createSvg(x,this.svgAdornerRoot)}},v.prototype.getViewportHeight=function(){return this.parentSurface.isCopyCanvasSurface?l.SciChartSurfaceBase.domMasterCanvas.height:this.parentSurface.renderSurface.viewportSize.height},v.prototype.normalizeAnglesAndHitTest=function(y,m,b){var S=s.labelHelper.normalizeAngle(y),_=s.labelHelper.normalizeAngle(m);S>_&&(_+=2*Math.PI);var C=!1;if(b){var T=s.labelHelper.normalizeAngle(b);T<S&&(T+=2*Math.PI),S<=T&&T<=_&&(C=!0)}return{startAngle:S,endAngle:_,isHit:C}},v.prototype.isDataValueMode=function(){return this.xCoordinateMode===c.ECoordinateMode.DataValue},v})(h.RenderContextAnnotationBase);return EC.ArcAnnotationBase=p,EC}var pte;function SSe(){if(pte)return SP;pte=1;var r=SP&&SP.__extends||(function(){var p=function(g,v){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,m){y.__proto__=m}||function(y,m){for(var b in m)Object.prototype.hasOwnProperty.call(m,b)&&(y[b]=m[b])},p(g,v)};return function(g,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");p(g,v);function y(){this.constructor=g}g.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}})();Object.defineProperty(SP,"__esModule",{value:!0}),SP.ArcAnnotation=void 0;var e=ni(),i=Ii(),n=Ha(),t=Os(),o=oo(),a=ts(),s=Xi(),l=Hi(),u=ta(),c=v8(),d=Zs(),f=Aa(),h=(function(p){r(g,p);function g(v){var y=this,m,b;if(y=p.call(this,v)||this,y.type=f.EAnnotationType.RenderContextArcAnnotation,y.surfaceTypes=[n.ESurfaceType.SciChartSurfaceType],y.innerRadiusProperty=0,y.heightProperty=0,y.xCoordinateMode===u.ECoordinateMode.Relative)throw new Error("ECoordinateMode.Relative is not supported for ArcAnnotation use DataValue or Pixel mode");if(y.xCoordinateMode!==y.yCoordinateMode)throw new Error("xCoordinateMode and yCoordinateMode should be the same for ArcAnnotation");return y.innerRadiusProperty=(m=v==null?void 0:v.innerRadius)!==null&&m!==void 0?m:y.innerRadiusProperty,y.heightProperty=(b=v==null?void 0:v.height)!==null&&b!==void 0?b:y.heightProperty,y}return Object.defineProperty(g.prototype,"innerRadius",{get:function(){return this.innerRadiusProperty},set:function(v){v!==this.innerRadiusProperty&&(this.innerRadiusProperty=v,this.notifyPropertyChanged(d.PROPERTY.INNER_RADIUS))},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"height",{get:function(){return this.heightProperty},set:function(v){v!==this.heightProperty&&(this.heightProperty=v,this.notifyPropertyChanged(d.PROPERTY.HEIGHT))},enumerable:!1,configurable:!0}),g.prototype.drawWithContext=function(v,y,m,b,S,_){e.Guard.notNull(v,"renderContext"),e.Guard.notNull(y,"xCalc"),e.Guard.notNull(m,"yCalc");var C=this.stroke&&this.strokeThickness!==void 0?(0,a.getWebGlPenFromCache)(this.strokePenCache):void 0,T=this.getResolvedCoordinate(y,m,this.x1,this.y1,!0),x=this.getResolvedCoordinate(y,m,this.x1,this.y1,!1),A=this.getResolvedCoordinate(y,m,this.x2,this.y2,!0),w=this.getResolvedCoordinate(y,m,this.x2,this.y2,!1),L=v.webAssemblyContext,k=(0,s.getVectorArcVertex)(L),D=(0,s.getArcVertex)(L),j=this.getCircleCenterXCoordinate(y,m),N=j,V=this.getCircleCenterYCoordinate(y,m),W=this.getViewportHeight()-V,K=this.calcStartEndAngles(y.isFlipped,m.isFlipped),H=K.startAngle,U=K.endAngle,I=(0,s.getArcParams)(L,N,W,H,U,this.getRadius(y,m),this.getInnerRadius(y,m),this.getDrawMode(),this.getAspectRatio(y,m),this.strokeThickness);D.MakeCircularArc(I),k.push_back(D);var Q=this.getClippingRect(this.clipping,b,S,_);v.drawArcs(k,N,W,0,Q,C.scrtPen,this.getBrush(),b.left,b.top),this.setArcAnnotationBorders(T,A,j,x,w,V),this.updateAdornerInner()},g.prototype.calcDragDistance=function(v){if(!this.prevValue){this.prevValue=v;return}if(this.adornerDraggingPoint===u.EDraggingGripPoint.Body?(this.x1=this.x1-(this.prevValue.x-v.x),this.x2=this.x2-(this.prevValue.x-v.x),this.y1=this.y1-(this.prevValue.y-v.y),this.y2=this.y2-(this.prevValue.y-v.y)):this.adornerDraggingPoint===u.EDraggingGripPoint.x1y1?this.resizeDirections===t.EXyDirection.XDirection?this.x1-=this.prevValue.x-v.x:this.resizeDirections===t.EXyDirection.YDirection?this.y1-=this.prevValue.y-v.y:(this.x1-=this.prevValue.x-v.x,this.y1-=this.prevValue.y-v.y):this.adornerDraggingPoint===u.EDraggingGripPoint.x2y2&&(this.resizeDirections===t.EXyDirection.XDirection?this.x2-=this.prevValue.x-v.x:this.resizeDirections===t.EXyDirection.YDirection?this.y2-=this.prevValue.y-v.y:(this.x2-=this.prevValue.x-v.x,this.y2-=this.prevValue.y-v.y)),this.adornerDraggingPoint===u.EDraggingGripPoint.x3y3){var y=(0,o.calcDistanceFromLineSegment)(v.x,v.y,this.x1,this.y1,this.x2,this.y2),m=(0,o.calcCrossProduct)(v.x,v.y,this.x1,this.y1,this.x2,this.y2)>0?1:-1;this.height=m*y}this.prevValue=v},g.prototype.toJSON=function(){var v=p.prototype.toJSON.call(this),y={innerRadius:this.innerRadius,height:this.height};return Object.assign(v.options,y),v},g.prototype.checkIsClickedOnAnnotationInternal=function(v,y){var m=this.getArcAnnotationBorders(),b=m.x1,S=m.x2,_=m.y1,C=m.y2,T=m.xCenter,x=m.yCenter;if((0,o.calcDistance)(v,y,b,_)<=d.DISTANCE_TO_LINE*l.DpiHelper.PIXEL_RATIO||(0,o.calcDistance)(v,y,S,C)<=d.DISTANCE_TO_LINE*l.DpiHelper.PIXEL_RATIO||(0,o.calcDistance)(v,y,T,x)<=d.DISTANCE_TO_LINE)return!0;var A=this.getDataValuesFromCoordinates(v,y),w=A.x,L=A.y,k=this.getCircleCenterDataCoords(),D=k.x,j=k.y,N=(0,o.calcDistance)(w,L,D,j)<this.calcDataRadius(),V=this.calcStartEndAngles(this.xAxis.getCurrentCoordinateCalculator().isFlipped,this.yAxis.getCurrentCoordinateCalculator().isFlipped,new i.Point(w,L)).isHit,W=N&&V,K=(0,o.testPointInTriangle)(v,y,b,_,S,C,T,x);return W||K},g.prototype.getCircleCenterDataCoords=function(){var v=(this.x1+this.x2)/2,y=(this.y1+this.y2)/2,m=this.x1-this.x2,b=this.y1-this.y2,S=Math.sqrt(m*m+b*b),_=b/S,C=-m/S,T=this.height,x=v+_*T,A=y+C*T;return{x,y:A}},g.prototype.getCircleCenterXCoordinate=function(v,y){var m=this.getCircleCenterDataCoords();return this.getResolvedCoordinate(v,y,m.x,m.y,!0)},g.prototype.getCircleCenterYCoordinate=function(v,y){var m=this.getCircleCenterDataCoords();return this.getResolvedCoordinate(v,y,m.x,m.y,!1)},g.prototype.calcDataRadius=function(){var v=this.x1-this.x2,y=this.y1-this.y2,m=Math.sqrt(v*v+y*y)/2;return Math.sqrt(m*m+this.height*this.height)},g.prototype.getRadius=function(v,y){var m=this.calcDataRadius();return this.isDataValueMode()?this.isVerticalChart?v.getCoordWidth(m):y.getCoordWidth(m):m*l.DpiHelper.PIXEL_RATIO},g.prototype.getInnerRadius=function(v,y){return this.isLineMode?0:this.getRadius(v,y)*this.innerRadius},g.prototype.getAspectRatio=function(v,y){return this.isDataValueMode()?this.isVerticalChart?y.getCoordWidth(1)/v.getCoordWidth(1):v.getCoordWidth(1)/y.getCoordWidth(1):1},g.prototype.calcStartEndAngles=function(v,y,m){var b=this.getCircleCenterDataCoords(),S=0,_=0,C=0,T=!1,x=!1;if(this.isVerticalChart?(_=Math.atan2(this.x1-b.x,this.y1-b.y),S=Math.atan2(this.x2-b.x,this.y2-b.y),C=m?Math.atan2(m.x-b.x,m.y-b.y):0,T=!y,x=v):(S=Math.atan2(this.y1-b.y,this.x1-b.x),_=Math.atan2(this.y2-b.y,this.x2-b.x),C=m?Math.atan2(m.y-b.y,m.x-b.x):0,T=!v,x=y),this.isDataValueMode()){if(!x){var A=S;S=2*Math.PI-_,_=2*Math.PI-A,C=2*Math.PI-C}if(!T){var A=S;S=Math.PI-_,_=Math.PI-A,C=Math.PI-C}}else{var A=S;S=2*Math.PI-_,_=2*Math.PI-A,C=2*Math.PI-C}return this.normalizeAnglesAndHitTest(S,_,m?C:void 0)},g.prototype.getDataValuesFromCoordinates=function(v,y){var m=0,b=0;if(this.isDataValueMode()){var S=this.xAxis.getCurrentCoordinateCalculator(),_=this.yAxis.getCurrentCoordinateCalculator();return m=S.getDataValue(this.isVerticalChart?y:v),b=_.getDataValue(this.isVerticalChart?v:y),{x:m,y:b}}else return m=v/l.DpiHelper.PIXEL_RATIO,b=y/l.DpiHelper.PIXEL_RATIO,this.isVerticalChart?{x:b,y:m}:{x:m,y:b}},g})(c.ArcAnnotationBase);return SP.ArcAnnotation=h,SP}var wC={},gte;function ZH(){if(gte)return wC;gte=1;var r=wC&&wC.__extends||(function(){var h=function(p,g){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var m in y)Object.prototype.hasOwnProperty.call(y,m)&&(v[m]=y[m])},h(p,g)};return function(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");h(p,g);function v(){this.constructor=p}p.prototype=g===null?Object.create(g):(v.prototype=g.prototype,new v)}})();Object.defineProperty(wC,"__esModule",{value:!0}),wC.PolarArcAnnotation=void 0;var e=ni(),i=Ha(),n=Os(),t=oo(),o=ts(),a=Xi(),s=Hi(),l=ta(),u=v8(),c=Zs(),d=Aa(),f=(function(h){r(p,h);function p(g){var v=this,y,m;return v=h.call(this,g)||this,v.type=d.EAnnotationType.RenderContextPolarArcAnnotation,v.surfaceTypes=[i.ESurfaceType.SciChartPolarSurfaceType],v.centerXProperty=(y=g==null?void 0:g.centerX)!==null&&y!==void 0?y:v.centerXProperty,v.centerYProperty=(m=g==null?void 0:g.centerY)!==null&&m!==void 0?m:v.centerYProperty,v}return Object.defineProperty(p.prototype,"centerX",{get:function(){var g;return(g=this.centerXProperty)!==null&&g!==void 0?g:this.xAxis.visibleRange.min},set:function(g){g!==this.centerXProperty&&(this.centerXProperty=g,this.notifyPropertyChanged(c.PROPERTY.CENTER_X))},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"centerY",{get:function(){var g;return(g=this.centerYProperty)!==null&&g!==void 0?g:this.yAxis.visibleRange.min},set:function(g){g!==this.centerYProperty&&(this.centerYProperty=g,this.notifyPropertyChanged(c.PROPERTY.CENTER_Y))},enumerable:!1,configurable:!0}),p.prototype.drawWithContext=function(g,v,y,m,b,S){var _,C,T,x;e.Guard.notNull(g,"renderContext"),e.Guard.notNull(v,"xCalc"),e.Guard.notNull(y,"yCalc");var A=this.stroke&&this.strokeThickness!==void 0?(0,o.getWebGlPenFromCache)(this.strokePenCache):void 0,w=0,L=this.getAngleSign()*this.getX1Coordinate(v,y),k=this.getAngleSign()*this.getX2Coordinate(v,y),D=this.getY1Coordinate(v,y),j=this.convertPolarToCartesian(L,D,!1),N=this.convertPolarToCartesian(k,D,!1),V=this.xAxis,W=this.yAxis,K=V.visibleRange.min,H=W.visibleRange.min,U=this.getResolvedCoordinate(v,y,K,H,!0),I=this.getResolvedCoordinate(v,y,K,H,!1),Q=this.convertPolarToCartesian(U,I,!1),Z=this.getResolvedCoordinate(v,y,this.centerX,this.centerY,!0),ee=this.getResolvedCoordinate(v,y,this.centerX,this.centerY,!1),ie=this.convertPolarToCartesian(Z,ee,!1),de=ie.x-Q.x,pe=ie.y-Q.y;w=this.isVerticalChart?W.startAngle:V.startAngle;var _e=g.webAssemblyContext,Te=(0,a.getVectorArcVertex)(_e),De=(0,a.getArcVertex)(_e),Pe=((C=(_=this.parentSurface.padding)===null||_===void 0?void 0:_.left)!==null&&C!==void 0?C:0)*s.DpiHelper.PIXEL_RATIO,Ee=((x=(T=this.parentSurface.padding)===null||T===void 0?void 0:T.top)!==null&&x!==void 0?x:0)*s.DpiHelper.PIXEL_RATIO,Re=this.transformAngles(L,k,this.isVerticalChart,v.isFlipped,y.isFlipped),je=this.normalizeAnglesAndHitTest(Re.startAngle,Re.endAngle),Ke=je.startAngle,ot=je.endAngle,We=ie.x,xe=this.getViewportHeight()-ie.y,ve=(0,a.getArcParams)(_e,We,xe,Ke,ot,this.getRadius(v,y),this.getInnerRadius(v,y),this.getDrawMode()?1:0,1,this.strokeThickness);De.MakeCircularArc(ve),Te.push_back(De);var he=this.getClippingRect(this.clipping,m,b,S);g.drawArcs(Te,We,xe,w,he,A.scrtPen,this.getBrush(),Pe,Ee),this.setArcAnnotationBorders(j.x+de,N.x+de,ie.x,j.y+pe,N.y+pe,ie.y),this.updateAdornerInner()},p.prototype.calcDragDistance=function(g){var v=this.xAxis,y=this.yAxis;if(!this.prevValue){this.prevValue=g;return}this.adornerDraggingPoint===l.EDraggingGripPoint.Body?(this.resizeDirections!==n.EXyDirection.YDirection&&(this.x1=this.x1-this.multByPixelRatio(this.prevValue.x-g.x,v),this.x2=this.x2-this.multByPixelRatio(this.prevValue.x-g.x,v)),this.resizeDirections!==n.EXyDirection.XDirection&&(this.y1=this.y1-this.multByPixelRatio(this.prevValue.y-g.y,y),this.y2=this.y2-this.multByPixelRatio(this.prevValue.y-g.y,y))):this.adornerDraggingPoint===l.EDraggingGripPoint.x1y1?(this.resizeDirections!==n.EXyDirection.YDirection&&(this.x1-=this.multByPixelRatio(this.prevValue.x-g.x,v)),this.resizeDirections!==n.EXyDirection.XDirection&&(this.y1-=this.multByPixelRatio(this.prevValue.y-g.y,y))):this.adornerDraggingPoint===l.EDraggingGripPoint.x2y2&&(this.resizeDirections!==n.EXyDirection.YDirection&&(this.x2-=this.multByPixelRatio(this.prevValue.x-g.x,v)),this.resizeDirections!==n.EXyDirection.XDirection&&(this.y2-=this.multByPixelRatio(this.prevValue.y-g.y,y))),this.adornerDraggingPoint===l.EDraggingGripPoint.x3y3&&(this.centerX=this.multByPixelRatio(g.x,v,!0),this.centerY=this.multByPixelRatio(g.y,y,!0)),this.validateInnerRadius(),this.prevValue=g},p.prototype.toJSON=function(){var g=h.prototype.toJSON.call(this),v={centerX:this.centerX,centerY:this.centerY};return Object.assign(g.options,v),g},p.prototype.onDragStarted=function(g){h.prototype.onDragStarted.call(this,g);var v=this.getArcAnnotationBorders(!0),y=v.x1,m=v.x2,b=v.xCenter,S=v.y1,_=v.y2,C=v.yCenter,T=g.mousePoint.x,x=g.mousePoint.y;if(this.canDragPoint(l.EDraggingGripPoint.x1y1)){var A=(0,t.calcDistance)(y,S,T,x);if(A<this.annotationsGripsRadius*s.DpiHelper.PIXEL_RATIO)return this.adornerDraggingPoint=l.EDraggingGripPoint.x1y1,!0}if(this.canDragPoint(l.EDraggingGripPoint.x2y2)){var w=(m+b)/2,L=(_+C)/2,A=(0,t.calcDistance)(w,L,T,x);if(A<this.annotationsGripsRadius*s.DpiHelper.PIXEL_RATIO)return this.adornerDraggingPoint=l.EDraggingGripPoint.x2y2,!0}if(this.canDragPoint(l.EDraggingGripPoint.x3y3)){var A=(0,t.calcDistance)(b,C,T,x);if(A<this.annotationsGripsRadius*s.DpiHelper.PIXEL_RATIO)return this.adornerDraggingPoint=l.EDraggingGripPoint.x3y3,!0}return this.canDragPoint(l.EDraggingGripPoint.Body)&&this.clickToSelect(g)?(this.adornerDraggingPoint=l.EDraggingGripPoint.Body,!0):!1},p.prototype.checkIsClickedOnAnnotationInternal=function(g,v){var y=this.getArcAnnotationBorders(),m=y.x1,b=y.x2,S=y.y1,_=y.y2,C=y.xCenter,T=y.yCenter;if((0,t.calcDistance)(g,v,m,S)<=c.DISTANCE_TO_LINE*s.DpiHelper.PIXEL_RATIO||(0,t.calcDistance)(g,v,b,_)<=c.DISTANCE_TO_LINE*s.DpiHelper.PIXEL_RATIO||(0,t.calcDistance)(g,v,C,T)<=c.DISTANCE_TO_LINE)return!0;var x=(0,t.calcDistance)(m,S,C,T),A=(0,t.calcDistance)(g,v,C,T)<x,w=this.transformAngles(this.calcAngleFromCoordinates(C,T,m,S),this.calcAngleFromCoordinates(C,T,b,_),this.isVerticalChart,this.xAxis.getCurrentCoordinateCalculator().isFlipped,this.yAxis.getCurrentCoordinateCalculator().isFlipped),L=w.startAngle,k=w.endAngle,D=this.calcAngleFromCoordinates(C,T,g,v),j=this.normalizeAnglesAndHitTest(L,k,D).isHit,N=A&&j,V=(0,t.testPointInTriangle)(g,v,m,S,b,_,C,T);return N||V},p.prototype.svgStringArcAdornerTemplate=function(g,v,y,m,b,S){var _=this.selectionBoxStroke,C=(y+b)/2,T=(m+S)/2;return`<svg xmlns="http://www.w3.org/2000/svg">
    <line x1="`.concat(g,'" y1="').concat(v,'" x2="').concat(y,'" y2="').concat(m,'" stroke="').concat(_,`" stroke-width="6" />
    <line x1="`).concat(g,'" y1="').concat(v,'" x2="').concat(b,'" y2="').concat(S,'" stroke="').concat(_,`" stroke-width="6" />
    <line x1="`).concat(b,'" y1="').concat(S,'" x2="').concat(y,'" y2="').concat(m,'" stroke="').concat(_,`" stroke-width="6" />
    `).concat(this.canDragPoint(l.EDraggingGripPoint.x1y1)?this.getAnnotationGripSvg(g,v):"",`
    `).concat(this.canDragPoint(l.EDraggingGripPoint.x2y2)?this.getAnnotationGripSvg(C,T):"",`
    `).concat(this.getAnnotationGripSvg(b,S),`
    </svg>`)},p.prototype.getRadius=function(g,v){return this.getY1Coordinate(g,v)},p.prototype.getInnerRadius=function(g,v){return this.isLineMode?0:this.getY2Coordinate(g,v)},p.prototype.calcAngleFromCoordinates=function(g,v,y,m){return-Math.atan2(m-v,y-g)},p.prototype.transformAngles=function(g,v,y,m,b){var S=this.isDataValueMode()?g:g/s.DpiHelper.PIXEL_RATIO,_=this.isDataValueMode()?v:v/s.DpiHelper.PIXEL_RATIO;if(y){if(b)return{startAngle:_,endAngle:S}}else if(m)return{startAngle:_,endAngle:S};return{startAngle:S,endAngle:_}},p.prototype.multByPixelRatio=function(g,v,y){if(y===void 0&&(y=!1),v.isAngular&&!this.isDataValueMode()){var m=1;return!y&&v.getCurrentCoordinateCalculator().isFlipped&&(m=-1),m*s.DpiHelper.PIXEL_RATIO*g}return g},p.prototype.validateInnerRadius=function(){this.isVerticalChart?this.x1<this.x2&&(this.x2=this.x1):this.y1<this.y2&&(this.y2=this.y1)},p.prototype.getAngleSign=function(){if(this.isDataValueMode())return 1;var g=this.xAxis;if(g.isAngular)return g.getCurrentCoordinateCalculator().isFlipped?-1:1;var v=this.yAxis;return v.getCurrentCoordinateCalculator().isFlipped?-1:1},p})(u.ArcAnnotationBase);return wC.PolarArcAnnotation=f,wC}var OC={},vI={},vte;function ug(){return vte||(vte=1,(function(r){var e=vI&&vI.__assign||function(){return e=Object.assign||function(d){for(var f,h=1,p=arguments.length;h<p;h++){f=arguments[h];for(var g in f)Object.prototype.hasOwnProperty.call(f,g)&&(d[g]=f[g])}return d},e.apply(this,arguments)};Object.defineProperty(r,"__esModule",{value:!0}),r.getLabelValue=r.getLineCoordinates=r.getLabelCoordinates=r.drawAxisMarkerAnnotation=r.drawLineAnnotation=r.drawModifiersAxisLabel=void 0;var i=vn(),n=cc(),t=wv(),o=function(d,f,h,p,g,v,y){if(d.isVisible){var m=(0,r.getLabelValue)(d,h),b=e(e({},d.dpiAdjustedLabelStyle),{color:g});return d.axisRenderer.drawModifiersAxisLabel(f,m,h,d.axisAlignment,b,p,v,y)}};r.drawModifiersAxisLabel=o;var a=function(d,f,h,p,g,v,y,m,b,S,_,C,T,x,A,w){f.getNativeContext();var L=d.axisAlignment,k=(L===n.EAxisAlignment.Top||L===n.EAxisAlignment.Bottom)&&![t.ELabelPlacement.Top,t.ELabelPlacement.Bottom,t.ELabelPlacement.Auto,t.ELabelPlacement.Axis].includes(h),D=[t.ELabelPlacement.Right,t.ELabelPlacement.TopRight,t.ELabelPlacement.BottomRight].includes(h),j=L===n.EAxisAlignment.Top||L===n.EAxisAlignment.Bottom?g:y,N=p||(0,r.getLabelValue)(d,j),V=h===t.ELabelPlacement.Auto||h===t.ELabelPlacement.Axis,W=V?S:null,K=V?b:e(e({},b),{color:S}),H=0,U=0,I,Q=(0,r.getLineCoordinates)(g,y,v,m,H,U,h,d),Z=Q.x1LineCoord,ee=Q.y1LineCoord,ie=Q.x2LineCoord,de=Q.y2LineCoord;if(_&&f.drawLine(Z,ee,ie,de,_,C,C),T){var pe=d.axisRenderer.createAnnotationLabelTexture(N,K,W,k,D,x),_e=pe.bitmapTexture,Te=pe.textureHeight,De=pe.textureWidth,Pe=(0,r.getLabelCoordinates)(d,h,g,v,y,m,Te,De,A,w),Ee=Pe.xPosition,Re=Pe.yPosition;H=Te,U=De,I=new i.Rect(Ee,Re,De,Te);var je=d.parentSurface.viewRect;f.resetAndClip(je),f.drawTexture(_e,Math.round(Ee),Math.round(Re),De,Te),_e.delete()}return I};r.drawLineAnnotation=a;var s=function(d,f,h,p,g,v,y,m,b,S,_,C){f.getNativeContext();var T=d.axisAlignment,x=h||(0,r.getLabelValue)(d,p),A=S?d.axisRenderer.createAxisMarkerFromImage(S,_,C):d.axisRenderer.createAxisMarker(T,x,y,m,b),w=A.bitmapTexture,L=A.textureHeight,k=A.textureWidth,D=(0,r.getLabelCoordinates)(d,t.ELabelPlacement.Axis,g,g,v,v,L,k),j=D.xPosition,N=D.yPosition;if(w){var V=d.parentSurface.clipRect;f.resetAndClip(V),f.drawTexture(w,Math.round(j),Math.round(N),k,L),w.delete()}return{xPosition:j,yPosition:N,textureWidth:k,textureHeight:L}};r.drawAxisMarkerAnnotation=s;var l=function(d,f,h,p,g,v,y,m,b,S){var _=d.axisAlignment,C=d.parentSurface.seriesViewRect,T=d.viewRect,x=0,A=0,w=function(){switch(_){case n.EAxisAlignment.Right:case n.EAxisAlignment.Left:A=C.top+g-y/2;break;case n.EAxisAlignment.Top:A=C.top+v/2-y/2;break;case n.EAxisAlignment.Bottom:A=C.top+g+(v-g)/2-y/2;break}},L=function(){switch(_){case n.EAxisAlignment.Right:x=C.left+p+(h-p)/2-m/2;break;case n.EAxisAlignment.Left:x=C.left+p/2-m/2;break;case n.EAxisAlignment.Top:case n.EAxisAlignment.Bottom:x=C.left+p-m/2;break}},k=function(){switch(_){case n.EAxisAlignment.Right:x=C.left+h-m;break;case n.EAxisAlignment.Left:x=C.left+p-m;break;case n.EAxisAlignment.Top:case n.EAxisAlignment.Bottom:x=C.left+h;break}},D=function(){switch(_){case n.EAxisAlignment.Right:x=C.left+p;break;case n.EAxisAlignment.Left:x=C.left;break;case n.EAxisAlignment.Top:case n.EAxisAlignment.Bottom:x=C.left+h-m;break}},j=function(){switch(_){case n.EAxisAlignment.Right:case n.EAxisAlignment.Left:A=C.top+g-y;break;case n.EAxisAlignment.Top:A=C.top;break;case n.EAxisAlignment.Bottom:A=C.top+v;break}},N=function(){switch(_){case n.EAxisAlignment.Right:case n.EAxisAlignment.Left:A=C.top+g;break;case n.EAxisAlignment.Top:A=C.top+v-y;break;case n.EAxisAlignment.Bottom:A=C.top+g-y;break}},V=function(){switch(_){case n.EAxisAlignment.Right:w(),b===t.EHorizontalAlignment.Left?x=C.left:x=T.width<m?x=T.right-m:T.left;break;case n.EAxisAlignment.Left:w(),b===t.EHorizontalAlignment.Right?x=C.left+C.width-m:x=T.width<m?x=T.left:T.right-m;break;case n.EAxisAlignment.Top:S===t.EVerticalAlignment.Bottom?A=C.top+C.height-y:A=T.height<y?T.top:T.bottom-y,L();break;case n.EAxisAlignment.Bottom:S===t.EVerticalAlignment.Top?A=C.top:A=T.height<y?T.bottom-y:T.top,L();break}};switch(f){case t.ELabelPlacement.Right:w(),k();break;case t.ELabelPlacement.TopRight:j(),k();break;case t.ELabelPlacement.BottomRight:N(),k();break;case t.ELabelPlacement.Bottom:N(),L();break;case t.ELabelPlacement.Left:w(),D();break;case t.ELabelPlacement.TopLeft:j(),D();break;case t.ELabelPlacement.BottomLeft:N(),D();break;case t.ELabelPlacement.Top:j(),L();break;case t.ELabelPlacement.Axis:case t.ELabelPlacement.Auto:V();break;default:throw Error("Unexpected LabelPlacement "+f)}return f!==t.ELabelPlacement.Auto&&f!==t.ELabelPlacement.Axis&&(A<C.top&&(A=C.top),A+y>C.bottom&&(A=C.bottom-y),x<C.left&&(x=C.left),x+m>C.right&&(x=C.right-m)),{xPosition:x,yPosition:A}};r.getLabelCoordinates=l;var u=function(d,f,h,p,g,v,y,m){var b=m.axisAlignment,S=m.parentSurface.seriesViewRect,_=m.viewRect,C=d,T=f,x=h,A=p;switch(y){case t.ELabelPlacement.Right:switch(b){case n.EAxisAlignment.Right:C=Math.abs(d-h)<v?x:d-v;break;case n.EAxisAlignment.Left:x=h>S.width?S.width-v:h-v;break}break;case t.ELabelPlacement.Bottom:switch(b){case n.EAxisAlignment.Top:A=p>S.height?S.height-g:p-g;break;case n.EAxisAlignment.Bottom:T=Math.abs(f-p)<g?A:f-g;break}break;case t.ELabelPlacement.Left:switch(b){case n.EAxisAlignment.Right:x=h<0?v:h+v;break;case n.EAxisAlignment.Left:C=Math.abs(d-h)<v?x:d+v;break}break;case t.ELabelPlacement.Top:switch(b){case n.EAxisAlignment.Top:T=Math.abs(f-p)<g?A:f+g;break;case n.EAxisAlignment.Bottom:A=p<0?g:p+g;break}break;case t.ELabelPlacement.Auto:case t.ELabelPlacement.Axis:switch(b){case n.EAxisAlignment.Right:C=_.width<v?S.width+_.width-v:S.width,x>C&&(x=C);break;case n.EAxisAlignment.Left:C=_.width<v?v-_.width:0,x<C&&(x=C);break;case n.EAxisAlignment.Top:T=_.height<g?g-_.height:0,A<T&&(A=T);break;case n.EAxisAlignment.Bottom:T=_.height<g?_.bottom-g:S.bottom,A>T&&(A=T);break}break}return{x1LineCoord:C,y1LineCoord:T,x2LineCoord:x,y2LineCoord:A}};r.getLineCoordinates=u;var c=function(d,f){var h,p=d.getCurrentCoordinateCalculator();if(d.isCategoryAxis){var g=p.getDataValue(f);h=p.transformIndexToData(g)}else h=p.getDataValue(f);return d.labelProvider.formatCursorLabel(h)};r.getLabelValue=c})(vI)),vI}var yte;function _Se(){if(yte)return OC;yte=1;var r=OC&&OC.__extends||(function(){var g=function(v,y){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,b){m.__proto__=b}||function(m,b){for(var S in b)Object.prototype.hasOwnProperty.call(b,S)&&(m[S]=b[S])},g(v,y)};return function(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");g(v,y);function m(){this.constructor=v}v.prototype=y===null?Object.create(y):(m.prototype=y.prototype,new m)}})();Object.defineProperty(OC,"__esModule",{value:!0}),OC.AxisMarkerAnnotation=void 0;var e=ni(),i=Ii(),n=Vd(),t=oo(),o=pn(),a=ug(),s=Hi(),l=ta(),u=LM(),c=Ds(),d=Zs(),f=Aa(),h=IM(),p=(function(g){r(v,g);function v(y){var m=this,b,S,_,C,T,x,A,w,L,k,D;return m=g.call(this,y)||this,m.type=f.EAnnotationType.RenderContextAxisMarkerAnnotation,m.clippingProperty=u.EAnnotationClippingMode.Chart,m.fontSizeProperty=14,m.fontFamilyProperty=(0,n.getDefaultFontName)(),m.fontWeightProperty="Normal",m.fontStyleProperty="Normal",m.colorProperty="#FFFFFF",m.backgroundColorProperty="#b36200",m.fontSizeProperty=(b=y==null?void 0:y.fontSize)!==null&&b!==void 0?b:m.fontSizeProperty,m.fontFamilyProperty=(S=y==null?void 0:y.fontFamily)!==null&&S!==void 0?S:m.fontFamilyProperty,m.fontWeightProperty=(_=y==null?void 0:y.fontWeight)!==null&&_!==void 0?_:m.fontWeightProperty,m.fontStyleProperty=(C=y==null?void 0:y.fontStyle)!==null&&C!==void 0?C:m.fontStyleProperty,m.colorProperty=(T=y==null?void 0:y.color)!==null&&T!==void 0?T:m.colorProperty,m.paddingProperty=(x=y==null?void 0:y.padding)!==null&&x!==void 0?x:m.paddingProperty,m.backgroundColorProperty=(A=y==null?void 0:y.backgroundColor)!==null&&A!==void 0?A:m.backgroundColorProperty,m.formattedValueProperty=(w=y==null?void 0:y.formattedValue)!==null&&w!==void 0?w:m.formattedValueProperty,m.imageProperty=(L=y==null?void 0:y.image)!==null&&L!==void 0?L:m.imageProperty,m.imageWidthProperty=(k=y==null?void 0:y.imageWidth)!==null&&k!==void 0?k:m.imageWidthProperty,m.imageHeightProperty=(D=y==null?void 0:y.imageHeight)!==null&&D!==void 0?D:m.imageHeightProperty,y!=null&&y.x1&&(m.x1=y.x1),y!=null&&y.x2&&(m.x2=y.x2),y!=null&&y.y2&&(m.y2=y.y2),m}return v.prototype.delete=function(){},Object.defineProperty(v.prototype,"y2",{get:function(){throw Error("y2 property is not supported for AxisMarkerAnnotation")},set:function(y){throw Error("y2 property is not supported for AxisMarkerAnnotation")},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"x2",{get:function(){throw Error("x2 property is not supported for AxisMarkerAnnotation")},set:function(y){throw Error("x2 property is not supported for AxisMarkerAnnotation")},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"backgroundColor",{get:function(){return this.backgroundColorProperty},set:function(y){this.backgroundColorProperty=y,this.notifyPropertyChanged(d.PROPERTY.BACKGROUND_COLOR)},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"color",{get:function(){return this.colorProperty},set:function(y){this.colorProperty=y,this.notifyPropertyChanged(d.PROPERTY.COLOR)},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"fontSize",{get:function(){return this.fontSizeProperty},set:function(y){this.fontSizeProperty=y,this.notifyPropertyChanged(d.PROPERTY.FONT_SIZE)},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"fontFamily",{get:function(){return this.fontFamilyProperty},set:function(y){this.fontFamilyProperty=y,this.notifyPropertyChanged(d.PROPERTY.FONT_FAMILY)},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"fontWeight",{get:function(){return this.fontWeightProperty},set:function(y){this.fontWeightProperty=y,this.notifyPropertyChanged(d.PROPERTY.FONT_WEIGHT)},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"fontStyle",{get:function(){return this.fontStyleProperty},set:function(y){this.fontStyleProperty=y,this.notifyPropertyChanged(d.PROPERTY.FONT_STYLE)},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"padding",{get:function(){return this.paddingProperty},set:function(y){this.paddingProperty=y,this.notifyPropertyChanged(d.PROPERTY.PADDING)},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"formattedValue",{get:function(){return this.formattedValueProperty},set:function(y){this.formattedValueProperty=y,this.notifyPropertyChanged(d.PROPERTY.FORMATTED_VALUE)},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"image",{get:function(){return this.imageProperty},set:function(y){this.imageProperty=y,this.notifyPropertyChanged(d.PROPERTY.IMAGE)},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"imageWidth",{get:function(){return this.imageWidthProperty},set:function(y){this.imageWidthProperty=y,this.notifyPropertyChanged(d.PROPERTY.IMAGE_WIDTH)},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"imageHeight",{get:function(){return this.imageHeightProperty},set:function(y){this.imageHeightProperty=y,this.notifyPropertyChanged(d.PROPERTY.IMAGE_HEIGHT)},enumerable:!1,configurable:!0}),v.prototype.drawWithContext=function(y,m,b,S,_,C){e.Guard.notNull(y,"renderContext"),e.Guard.notNull(m,"xCalc"),e.Guard.notNull(b,"yCalc");var T=this.getX1Coordinate(m,b),x=this.getY1Coordinate(m,b),A=function(I){return I==null},w=A(this.x1),L=w?this.y1:this.x1;e.Guard.argumentIsRealNumber(L,"x1 or y1");var k=w?this.yAxis:this.xAxis;if(!(!k||k.isVisible===!1)){var D=w?this.yCoordinateMode:this.xCoordinateMode,j=w?b:m,N=this.getCoordinate(L,j,D),V=k.isHorizontalAxis?N>=0&&N<=S.width:N>=0&&N<=S.height;if(V){var W={fontFamily:this.fontFamilyProperty,fontSize:this.fontSizeProperty*s.DpiHelper.PIXEL_RATIO,fontStyle:this.fontStyleProperty,color:this.colorProperty},K=(0,a.drawAxisMarkerAnnotation)(k,y,this.formattedValueProperty,N,T,x,W,this.backgroundColorProperty,this.opacity,this.image,this.imageWidth,this.imageHeight),H=(0,o.translateFromCanvasToSeriesViewRect)(new i.Point(K.xPosition,K.yPosition),S,!0),U=(0,o.translateFromCanvasToSeriesViewRect)(new i.Point(K.xPosition+K.textureWidth,K.yPosition+K.textureHeight),S,!0);this.setAnnotationBorders(H.x,U.x,H.y,U.y),this.updateAdornerInner()}else this.deleteAdorner()}},v.prototype.onDragStarted=function(y){g.prototype.onDragStarted.call(this,y);var m=this.calculateAdornerCenter(),b=m.x,S=m.y,_=(0,o.translateFromCanvasToSeriesViewRect)(new i.Point(y.mousePoint.x,y.mousePoint.y),this.parentSurface.seriesViewRect,!0),C=(0,o.translateFromCanvasToSeriesViewRect)(new i.Point(b*s.DpiHelper.PIXEL_RATIO,S*s.DpiHelper.PIXEL_RATIO),this.parentSurface.seriesViewRect,!0);if(_){if(C){var T=(0,t.calcDistance)(C.x,C.y,_.x,_.y);if(T<this.annotationsGripsRadius*s.DpiHelper.PIXEL_RATIO)return this.adornerDraggingPoint=l.EDraggingGripPoint.x1y1,!0}if(this.clickToSelect(y))return this.adornerDraggingPoint=l.EDraggingGripPoint.Body,!0}return!1},v.prototype.calcDragDistance=function(y){if(!this.prevValue){this.prevValue=y;return}this.x1!==void 0?this.x1-=this.prevValue.x-y.x:this.y1!==void 0&&(this.y1-=this.prevValue.y-y.y),this.prevValue=y},v.prototype.toJSON=function(){var y=g.prototype.toJSON.call(this),m={backgroundColor:this.backgroundColor,color:this.color,fontFamily:this.fontFamily,fontSize:this.fontSize,fontStyle:this.fontStyle,fontWeight:this.fontWeight,formattedValue:this.formattedValue,padding:this.padding,image:void 0,imageHeight:this.imageHeight,imageWidth:this.imageWidth};return Object.assign(y.options,m),y},v.prototype.checkIsClickedOnAnnotationInternal=function(y,m){var b=this.getAnnotationBorders(!0),S=b.x1,_=b.x2,C=b.y1,T=b.y2;return(0,t.testIsInBounds)(y,m,S,T,_,C)},v.prototype.updateAdornerInner=function(){if(this.deleteAdorner(),this.isSelected){var y=this.getAdornerAnnotationBorders(!0,!0),m=y.x1,b=y.x2,S=y.y1,_=y.y2,C=this.svgStringAdornerTemplate(m,S,b,_),T=this.applySvgClipping(C,this.adornerClipping);this.svgAdorner=c.annotationHelpers.createSvg(T,this.svgAdornerRoot)}},v.prototype.svgStringAdornerTemplate=function(y,m,b,S){var _=this.selectionBoxStroke,C=this.calculateAdornerCenter(),T=C.x,x=C.y,A=b-y,w=S-m;return`<svg xmlns="http://www.w3.org/2000/svg">
        <rect x="`.concat(y,'" y="').concat(m,'" width="').concat(A,'" height="').concat(w,'" stroke="').concat(_,'" stroke-width="').concat(this.selectionBoxThickness,`px" fill="none" />
        `).concat(this.getAnnotationGripSvg(T,x),`
        </svg>`)},v.prototype.calculateAdornerCenter=function(){var y=this.getAdornerAnnotationBorders(),m=y.x1,b=y.x2,S=y.y1,_=y.y2,C=Math.abs((m+b)/2),T=Math.abs((S+_)/2);return{x:C,y:T}},v})(h.RenderContextAnnotationBase);return OC.AxisMarkerAnnotation=p,OC}var DC={},mte;function PSe(){if(mte)return DC;mte=1;var r=DC&&DC.__extends||(function(){var b=function(S,_){return b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,T){C.__proto__=T}||function(C,T){for(var x in T)Object.prototype.hasOwnProperty.call(T,x)&&(C[x]=T[x])},b(S,_)};return function(S,_){if(typeof _!="function"&&_!==null)throw new TypeError("Class extends value "+String(_)+" is not a constructor or null");b(S,_);function C(){this.constructor=S}S.prototype=_===null?Object.create(_):(C.prototype=_.prototype,new C)}})();Object.defineProperty(DC,"__esModule",{value:!0}),DC.BoxAnnotation=void 0;var e=So(),i=Mr(),n=ni(),t=Ii(),o=vn(),a=Ha(),s=Os(),l=oo(),u=pn(),c=hl(),d=ts(),f=Hi(),h=ta(),p=Ds(),g=Zs(),v=Aa(),y=IM(),m=(function(b){r(S,b);function S(_){var C=this,T,x,A;return C=b.call(this,_)||this,C.type=v.EAnnotationType.RenderContextBoxAnnotation,C.surfaceTypes=[a.ESurfaceType.SciChartSurfaceType,a.ESurfaceType.SciChartPolarSurfaceType],C.strokeThicknessProperty=1,C.stroke=(T=_==null?void 0:_.stroke)!==null&&T!==void 0?T:"#ffffff",C.strokeThickness=(x=_==null?void 0:_.strokeThickness)!==null&&x!==void 0?x:1,C.fill=(A=_==null?void 0:_.fill)!==null&&A!==void 0?A:"#777777",C}return Object.defineProperty(S.prototype,"stroke",{get:function(){return this.strokeProperty},set:function(_){this.strokeProperty=_,this.notifyPropertyChanged(g.PROPERTY.STROKE)},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"strokeThickness",{get:function(){return this.strokeThicknessProperty},set:function(_){this.strokeThicknessProperty=_,this.notifyPropertyChanged(g.PROPERTY.STROKE_THICKNESS)},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"fill",{get:function(){return this.fillProperty},set:function(_){this.fillProperty=_,this.notifyPropertyChanged(g.PROPERTY.FILL)},enumerable:!1,configurable:!0}),S.prototype.delete=function(){this.strokePenCache=(0,i.deleteSafe)(this.strokePenCache),this.fillBrushCache=(0,i.deleteSafe)(this.fillBrushCache),this.nativeDrawingProvider=(0,i.deleteSafe)(this.nativeDrawingProvider),this.xValues=(0,i.deleteSafe)(this.xValues),this.yValues=(0,i.deleteSafe)(this.yValues)},S.prototype.drawWithContext=function(_,C,T,x,A,w){n.Guard.notNull(_,"renderContext"),n.Guard.notNull(C,"xCalc"),n.Guard.notNull(T,"yCalc");var L=this.stroke&&this.strokeThickness?(0,d.getWebGlPenFromCache)(this.strokePenCache):void 0;L==null||L.setOpacity(this.opacity);var k=this.fill?(0,c.getWebGlBrushFromCache)(this.fillBrushCache):void 0;k==null||k.setOpacity(this.opacity);var D=this.convertPolarToCartesian(this.getX1Coordinate(C,T),this.getY1Coordinate(C,T)),j=D.x,N=D.y,V=this.convertPolarToCartesian(this.getX2Coordinate(C,T),this.getY2Coordinate(C,T)),W=V.x,K=V.y;this.setAnnotationBorders(j,W,N,K);var H=o.Rect.createWithPoints(new t.Point(j,N),new t.Point(W,K));if(!e.IS_TEST_ENV){var U=this.getClippingRect(this.clipping,x,A,w);this.strokeThickness>0?this.drawWithProvider(_,L.scrtPen,k.scrtBrush,C,T,H,x,U):_.drawRect(H,x,U,L,k,!1,this.strokeThickness)}this.updateAdornerInner()},S.prototype.onAttach=function(_){b.prototype.onAttach.call(this,_),this.nativeDrawingProvider=new _.webAssemblyContext2D.SCRTColumnSeriesDrawingProvider,this.strokePenCache||(this.strokePenCache=new d.Pen2DCache(_.webAssemblyContext2D)),(0,d.createPenInCache)(this.strokePenCache,this.stroke,this.strokeThickness,this.opacity),this.fillBrushCache||(this.fillBrushCache=new c.BrushCache(_.webAssemblyContext2D)),(0,c.createBrushInCache)(this.fillBrushCache,this.fill,this.opacity)},S.prototype.onDragStarted=function(_){b.prototype.onDragStarted.call(this,_);var C=this.getAnnotationBorders(!1,!0),T=C.x1,x=C.x2,A=C.y1,w=C.y2,L=p.annotationHelpers.calcNewApex(T,A,x,w,this.isVerticalChart),k=L.x1y1,D=L.x2y1,j=L.x1y2,N=L.x2y2,V=(0,u.translateFromCanvasToSeriesViewRect)(new t.Point(_.mousePoint.x,_.mousePoint.y),this.parentSurface.seriesViewRect,!0);if(k&&this.canDragPoint(h.EDraggingGripPoint.x1y1)){var W=(0,l.calcDistance)(k.x,k.y,V.x,V.y);if(W<this.annotationsGripsRadius*f.DpiHelper.PIXEL_RATIO)return this.adornerDraggingPoint=h.EDraggingGripPoint.x1y1,!0}if(D&&this.canDragPoint(h.EDraggingGripPoint.x2y1)){var W=(0,l.calcDistance)(D.x,D.y,V.x,V.y);if(W<this.annotationsGripsRadius*f.DpiHelper.PIXEL_RATIO)return this.adornerDraggingPoint=h.EDraggingGripPoint.x2y1,!0}if(j&&this.canDragPoint(h.EDraggingGripPoint.x1y2)){var W=(0,l.calcDistance)(j.x,j.y,V.x,V.y);if(W<this.annotationsGripsRadius*f.DpiHelper.PIXEL_RATIO)return this.adornerDraggingPoint=h.EDraggingGripPoint.x1y2,!0}if(N&&this.canDragPoint(h.EDraggingGripPoint.x2y2)){var W=(0,l.calcDistance)(N.x,N.y,V.x,V.y);if(W<this.annotationsGripsRadius*f.DpiHelper.PIXEL_RATIO)return this.adornerDraggingPoint=h.EDraggingGripPoint.x2y2,!0}return V&&this.canDragPoint(h.EDraggingGripPoint.Body)&&this.clickToSelect(_)?(this.adornerDraggingPoint=h.EDraggingGripPoint.Body,!0):!1},S.prototype.calcDragDistance=function(_){if(!this.prevValue){this.prevValue=_;return}this.adornerDraggingPoint===h.EDraggingGripPoint.Body?(this.x1=this.x1-(this.prevValue.x-_.x),this.x2=this.x2-(this.prevValue.x-_.x),this.y1=this.y1-(this.prevValue.y-_.y),this.y2=this.y2-(this.prevValue.y-_.y)):this.adornerDraggingPoint===h.EDraggingGripPoint.x1y1?this.resizeDirections===s.EXyDirection.XDirection?this.x1-=this.prevValue.x-_.x:this.resizeDirections===s.EXyDirection.YDirection?this.y1-=this.prevValue.y-_.y:(this.x1-=this.prevValue.x-_.x,this.y1-=this.prevValue.y-_.y):this.adornerDraggingPoint===h.EDraggingGripPoint.x2y2?this.resizeDirections===s.EXyDirection.XDirection?this.x2-=this.prevValue.x-_.x:this.resizeDirections===s.EXyDirection.YDirection?this.y2-=this.prevValue.y-_.y:(this.x2-=this.prevValue.x-_.x,this.y2-=this.prevValue.y-_.y):this.adornerDraggingPoint===h.EDraggingGripPoint.x2y1?this.resizeDirections===s.EXyDirection.XDirection?this.x2-=this.prevValue.x-_.x:this.resizeDirections===s.EXyDirection.YDirection?this.y1-=this.prevValue.y-_.y:(this.x2-=this.prevValue.x-_.x,this.y1-=this.prevValue.y-_.y):this.adornerDraggingPoint===h.EDraggingGripPoint.x1y2&&(this.resizeDirections===s.EXyDirection.XDirection?this.x1-=this.prevValue.x-_.x:this.resizeDirections===s.EXyDirection.YDirection?this.y2-=this.prevValue.y-_.y:(this.x1-=this.prevValue.x-_.x,this.y2-=this.prevValue.y-_.y)),this.prevValue=_},S.prototype.onDpiChanged=function(_){b.prototype.onDpiChanged.call(this,_),this.notifyPropertyChanged(g.PROPERTY.STROKE)},S.prototype.toJSON=function(){var _=b.prototype.toJSON.call(this),C={fill:this.fill,stroke:this.stroke,strokeThickness:this.strokeThickness};return Object.assign(_.options,C),_},S.prototype.checkIsClickedOnAnnotationInternal=function(_,C){var T=this.getAnnotationBorders(!0),x=T.x1,A=T.x2,w=T.y1,L=T.y2;return(0,l.testIsInBounds)(_,C,x,L,A,w)},S.prototype.notifyPropertyChanged=function(_){b.prototype.notifyPropertyChanged.call(this,_);var C=[g.PROPERTY.STROKE,g.PROPERTY.STROKE_THICKNESS,g.PROPERTY.STROKE_DASH_ARRAY,g.PROPERTY.OPACITY];this.strokePenCache&&C.includes(_)&&(0,d.createPenInCache)(this.strokePenCache,this.stroke,this.strokeThickness,this.opacity);var T=[g.PROPERTY.FILL,g.PROPERTY.OPACITY];this.fillBrushCache&&T.includes(_)&&(0,c.createBrushInCache)(this.fillBrushCache,this.fill,this.opacity)},S.prototype.updateAdornerInner=function(){if(this.deleteAdorner(),this.isSelected){var _=this.getAdornerAnnotationBorders(!0,!0),C=_.x1,T=_.x2,x=_.y1,A=_.y2,w=this.svgStringAdornerTemplate(C,x,T,A),L=this.applySvgClipping(w,this.adornerClipping);this.svgAdorner=p.annotationHelpers.createSvg(L,this.svgAdornerRoot)}},S.prototype.svgStringAdornerTemplate=function(_,C,T,x){var A=this.selectionBoxStroke,w=T-_,L=x-C,k=`<svg xmlns="http://www.w3.org/2000/svg">
        <rect x="`.concat(_,'" y="').concat(C,'" width="').concat(w,'" height="').concat(L,'" stroke="').concat(A,'" stroke-width="').concat(this.selectionBoxThickness,`px" fill="none" />
        `),D=this.getAdornerAnnotationBorders(!1,!0);return this.canDragPoint(h.EDraggingGripPoint.x1y1)&&(k+=this.getAnnotationGripSvg(D.x1,D.y1)),this.canDragPoint(h.EDraggingGripPoint.x2y2)&&(k+=this.getAnnotationGripSvg(D.x2,D.y2)),this.canDragPoint(h.EDraggingGripPoint.x2y1)&&(k+=this.getAnnotationGripSvg(D.x2,D.y1)),this.canDragPoint(h.EDraggingGripPoint.x1y2)&&(k+=this.getAnnotationGripSvg(D.x1,D.y2)),k+="</svg>",k},S.prototype.drawWithProvider=function(_,C,T,x,A,w,L,k){var D=this.parentSurface.webAssemblyContext2D,j=new D.SCRTColumnDrawingParams;j.forceShaderMethod=!0,j.verticalChart=this.isVerticalChart,j.zeroLineY=this.isVerticalChart?A.getDataValue(w.left):A.getDataValue(w.bottom),j.columnWidth=this.isVerticalChart?w.height:w.width,j.clipCoordinates=!1,C&&j.SetLinesPen(C),T&&j.SetFillBrush(T),j.viewportWidth=L.width,j.viewportHeight=L.height;var N=this.isVerticalChart?(w.top+w.bottom)/2:(w.left+w.right)/2,V=x.getDataValue(N);this.xValues?this.xValues.clear():this.xValues=new D.SCRTDoubleVector(1),this.xValues.push_back(V);var W=this.isVerticalChart?A.getDataValue(w.right):A.getDataValue(w.top);this.yValues?this.yValues.clear():this.yValues=new D.SCRTDoubleVector(1),this.yValues.push_back(W),j.count=1;var K=_,H=K.getNativeContext();K.setTranslationRotationAndClip(k,L.x,L.y),j.SetNativeContext(H),j.SetXValues(this.xValues),j.SetYValues(this.yValues),j.SetXCoordinateCalculator(x.nativeCalculator),j.SetYCoordinateCalculator(A.nativeCalculator),this.nativeDrawingProvider.DrawPointsVec(j),j.delete()},S})(y.RenderContextAnnotationBase);return DC.BoxAnnotation=m,DC}var RC={},MC={},LC={},bte;function y8(){if(bte)return LC;bte=1;var r=LC&&LC.__extends||(function(){var p=function(g,v){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,m){y.__proto__=m}||function(y,m){for(var b in m)Object.prototype.hasOwnProperty.call(m,b)&&(y[b]=m[b])},p(g,v)};return function(g,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");p(g,v);function y(){this.constructor=g}g.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}})();Object.defineProperty(LC,"__esModule",{value:!0}),LC.DomAnnotationBase=void 0;var e=Ii(),i=xg(),n=LM(),t=oo(),o=pn(),a=Gd(),s=Hi(),l=ta(),u=Ds(),c=Zs(),d=(function(p){r(g,p);function g(v){var y=this,m,b,S,_,C;return y=p.call(this,v)||this,y.isDomAnnotation=!0,y.isDeleted=!1,y.xCoordShiftProperty=0,y.yCoordShiftProperty=0,y.verticalAnchorPointProperty=i.EVerticalAnchorPoint.Top,y.horizontalAnchorPointProperty=i.EHorizontalAnchorPoint.Left,y.prevX1Coordinate=0,y.prevY1Coordinate=0,y.xCoordSvgTransProperty=0,y.yCoordSvgTransProperty=0,y.reDrawChartOnChange=!1,y.xCoordShiftProperty=(m=v==null?void 0:v.xCoordShift)!==null&&m!==void 0?m:y.xCoordShiftProperty,y.yCoordShiftProperty=(b=v==null?void 0:v.yCoordShift)!==null&&b!==void 0?b:y.yCoordShiftProperty,y.verticalAnchorPointProperty=(S=v==null?void 0:v.verticalAnchorPoint)!==null&&S!==void 0?S:y.verticalAnchorPointProperty,y.horizontalAnchorPointProperty=(_=v==null?void 0:v.horizontalAnchorPoint)!==null&&_!==void 0?_:y.horizontalAnchorPointProperty,y.reDrawChartOnChange=(C=v==null?void 0:v.reDrawChartOnChange)!==null&&C!==void 0?C:a.SciChartDefaults.alwaysRedrawFullChartOnSvgChange,y}return g.prototype.onAttach=function(v){p.prototype.onAttach.call(this,v),this.selectLayerRoot()},Object.defineProperty(g.prototype,"xCoordShift",{get:function(){return this.xCoordShiftProperty},set:function(v){this.xCoordShiftProperty!==v&&(this.xCoordShiftProperty=v,this.notifyPropertyChanged(c.PROPERTY.X_COORD_SHIFT))},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"yCoordShift",{get:function(){return this.yCoordShiftProperty},set:function(v){this.yCoordShiftProperty!==v&&(this.yCoordShiftProperty=v,this.notifyPropertyChanged(c.PROPERTY.Y_COORD_SHIFT))},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"verticalAnchorPoint",{get:function(){return this.verticalAnchorPointProperty},set:function(v){this.verticalAnchorPointProperty!==v&&(this.verticalAnchorPointProperty=v,this.notifyPropertyChanged(c.PROPERTY.VERTICAL_ANCHOR_POINT))},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"horizontalAnchorPoint",{get:function(){return this.horizontalAnchorPointProperty},set:function(v){this.horizontalAnchorPointProperty!==v&&(this.horizontalAnchorPointProperty=v,this.notifyPropertyChanged(c.PROPERTY.HORIZONTAL_ANCHOR_POINT))},enumerable:!1,configurable:!0}),g.prototype.suspendInvalidate=function(){p.prototype.suspendInvalidate.call(this),this.invalidateState.xCoordShift=this.xCoordShift,this.invalidateState.yCoordShift=this.yCoordShift},g.prototype.resumeInvalidate=function(){this.invalidateState&&((this.isHidden!==this.invalidateState.isHidden||this.x1!==this.invalidateState.x1||this.y1!==this.invalidateState.y1||this.xCoordShift!==this.invalidateState.xCoordShift||this.yCoordShift!==this.invalidateState.yCoordShift)&&this.invalidateParentCallback&&this.invalidateParentCallback({svgOnly:!this.reDrawChartOnChange}),this.invalidateState=void 0,p.prototype.resumeInvalidate.call(this))},g.prototype.calcDragDistance=function(v){if(!this.prevValue){this.prevValue=v;return}if(this.adornerDraggingPoint===l.EDraggingGripPoint.Body||this.adornerDraggingPoint===l.EDraggingGripPoint.x1y1){var y=this.x1+this.applyPixelRatioToDragDist(v.x-this.prevValue.x),m=this.y1+v.y-this.prevValue.y;this.x2!==void 0&&(this.x2=this.x2+this.applyPixelRatioToDragDist(v.x-this.prevValue.x)),this.y2!==void 0&&(this.y2=this.y2+v.y-this.prevValue.y),this.parentSurface.isPolar&&this.x1===0&&this.y1===0&&(y=v.x,m=v.y),this.x1=y,this.y1=m}this.prevValue=v},g.prototype.getAnnotationBorders=function(v,y){var m=p.prototype.getAnnotationBorders.call(this,v,y),b=m.x1,S=m.x2,_=m.y1,C=m.y2;return{x1:b+this.xCoordSvgTransProperty,x2:S+this.xCoordSvgTransProperty,y1:_+this.yCoordSvgTransProperty,y2:C+this.yCoordSvgTransProperty}},g.prototype.getAdornerAnnotationBorders=function(v){var y=p.prototype.getAdornerAnnotationBorders.call(this,v),m=y.x1,b=y.x2,S=y.y1,_=y.y2;return{x1:m+this.xCoordSvgTransProperty,x2:b+this.xCoordSvgTransProperty,y1:S+this.yCoordSvgTransProperty,y2:_+this.yCoordSvgTransProperty}},g.prototype.onDragStarted=function(v){p.prototype.onDragStarted.call(this,v);var y=this.getAnnotationBorders(),m=y.x1,b=y.x2,S=y.y1,_=y.y2,C=new e.Point(m,S),T=m,x=S,A=Math.abs((S-_)/2),w=Math.abs((m-b)/2);this.verticalAnchorPoint===i.EVerticalAnchorPoint.Center&&(x=x+A),this.horizontalAnchorPoint===i.EHorizontalAnchorPoint.Center&&(T=T+w);var L=(0,o.translateFromCanvasToSeriesViewRect)(new e.Point(v.mousePoint.x,v.mousePoint.y),this.parentSurface.seriesViewRect,this.clipping!==n.EAnnotationClippingMode.SeriesViewRect);if(!L)return!1;if(C&&this.canDragPoint(l.EDraggingGripPoint.x1y1)){var k=(0,t.calcDistance)(T,x,(0,o.translateToNotScaled)(L.x),(0,o.translateToNotScaled)(L.y));if(k<this.annotationsGripsRadius)return this.adornerDraggingPoint=l.EDraggingGripPoint.x1y1,!0}return this.canDragPoint(l.EDraggingGripPoint.Body)&&this.clickToSelect(v)?(this.adornerDraggingPoint=l.EDraggingGripPoint.Body,!0):!1},g.prototype.delete=function(){this.isDeleted=!0},g.prototype.toJSON=function(){var v=p.prototype.toJSON.call(this),y={xCoordShift:this.xCoordShift,yCoordShift:this.yCoordShift,verticalAnchorPoint:this.verticalAnchorPoint,horizontalAnchorPoint:this.horizontalAnchorPoint,reDrawChartOnChange:this.reDrawChartOnChange};return Object.assign(v.options,y),v},g.prototype.checkIsClickedOnAnnotationInternal=function(v,y){var m=this.getAnnotationBorders(!0),b=m.x1,S=m.x2,_=m.y1,C=m.y2,T=v/s.DpiHelper.PIXEL_RATIO+this.xCoordSvgTransProperty,x=y/s.DpiHelper.PIXEL_RATIO+this.yCoordSvgTransProperty;return(0,t.testIsInBounds)(T,x,b,C,S,_)},g.prototype.updateAdornerInner=function(){if(this.deleteAdorner(),this.isSelected){var v=this.getAnnotationBorders(!0),y=v.x1,m=v.x2,b=v.y1,S=v.y2,_=this.svgStringAdornerTemplate(y,b,m,S),C=this.applySvgClipping(_,this.adornerClipping);this.svgAdorner=u.annotationHelpers.createSvg(C,this.svgAdornerRoot)}},g.prototype.notifyPropertyChanged=function(v){v===c.PROPERTY.ANNOTATION_CANVAS&&this.selectLayerRoot(),this.invalidateParentCallback&&!this.invalidateState&&this.invalidateParentCallback({svgOnly:!this.reDrawChartOnChange})},g.prototype.calcAndSetAnnotationBorders=function(v,y){var m=this.getSize();if(m){var b=m.width,S=m.height,_=this.convertPolarToCartesian(this.getX1Coordinate(v,y),this.getY1Coordinate(v,y),!0),C=_.x,T=_.y,x=this.convertPolarToCartesian(this.getX2Coordinate(v,y),this.getY2Coordinate(v,y),!0),A=x.x,w=x.y,L=C+this.xCoordShift,k=T+this.yCoordShift,D=L+b,j=k+S;if(this.isVerticalChart?this.y2===void 0:this.x2===void 0){var N=h(this.horizontalAnchorPoint,L,D,b),V=N.x1,W=N.x2;L=V,D=W}else D=A+this.xCoordShift;if(this.isVerticalChart?this.x2===void 0:this.y2===void 0){var K=f(this.verticalAnchorPoint,k,j,S),H=K.y1,U=K.y2;k=H,j=U}else j=w+this.yCoordShift;this.setAnnotationBorders(L,D,k,j)}},g.prototype.svgStringAdornerTemplate=function(v,y,m,b){var S=v,_=y,C=Math.abs((y-b)/2),T=Math.abs((v-m)/2);return this.verticalAnchorPoint===i.EVerticalAnchorPoint.Center&&(_=_+C),this.horizontalAnchorPoint===i.EHorizontalAnchorPoint.Center&&(S=S+T),`<svg xmlns="http://www.w3.org/2000/svg">
        <rect x="`.concat(v,'" y="').concat(y,'" width="').concat(Math.abs(v-m),'" height="').concat(Math.abs(y-b),'" stroke="').concat(this.selectionBoxStroke,'" stroke-width="').concat(this.selectionBoxThickness,`px" fill="none" />
        `).concat(this.canDragPoint(l.EDraggingGripPoint.x1y1)?this.getAnnotationGripSvg(S,_):"",`
      </svg>`)},g})(l.AnnotationBase);LC.DomAnnotationBase=d;function f(p,g,v,y){return p===i.EVerticalAnchorPoint.Bottom&&(v=g-y),p===i.EVerticalAnchorPoint.Center&&(v=g+y/2,g=g-y/2),{y1:g,y2:v}}function h(p,g,v,y){return p===i.EHorizontalAnchorPoint.Right?(v=g-y,{x1:v,x2:g}):(p===i.EHorizontalAnchorPoint.Center&&(v=g+y/2,g=g-y/2),{x1:g,x2:v})}return LC}var Ste;function ay(){if(Ste)return MC;Ste=1;var r=MC&&MC.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(u[d]=c[d])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})();Object.defineProperty(MC,"__esModule",{value:!0}),MC.SvgAnnotationBase=void 0;var e=xg(),i=Zs(),n=y8(),t=Aa(),o=(function(a){r(s,a);function s(l){var u=a.call(this,l)||this;return u.isSvgAnnotation=!0,u}return s.prototype.onDetach=function(){a.prototype.onDetach.call(this),this.delete()},s.prototype.update=function(l,u,c,d){var f,h;this.xCoordSvgTransProperty=c,this.yCoordSvgTransProperty=d,this.create(l,u,c,d);var p=(f=this.xCoordShift)!==null&&f!==void 0?f:0,g=(h=this.yCoordShift)!==null&&h!==void 0?h:0,v=this.getSvgDomRect(),y=v.width,m=v.height;this.horizontalAnchorPointProperty===e.EHorizontalAnchorPoint.Center?p-=y/2:this.horizontalAnchorPointProperty===e.EHorizontalAnchorPoint.Right&&(p-=y),this.verticalAnchorPointProperty===e.EVerticalAnchorPoint.Center?g-=m/2:this.verticalAnchorPointProperty===e.EVerticalAnchorPoint.Bottom&&(g-=m),this.svg.style.visibility=this.isHidden?"hidden":"visible",this.svg.style.opacity=this.opacity.toString();var b=this.convertPolarToCartesian(this.getX1Coordinate(l,u),this.getY1Coordinate(l,u),!0),S=b.x,_=b.y,C=p+S+c,T=g+_+d;isNaN(C)||isNaN(T)||!isFinite(C)||!isFinite(T)?this.svg.style.display="none":(this.setSvgAttribute("x",C),this.setSvgAttribute("y",T))},s.prototype.delete=function(){this.clear(),a.prototype.delete.call(this)},Object.defineProperty(s.prototype,"svg",{get:function(){return this.svgProperty},enumerable:!1,configurable:!0}),s.prototype.getSvgDomRect=function(){var l,u,c;return this.svgDOMRect||(this.svgDOMRect=(c=(u=(l=this.svg.firstChild)===null||l===void 0?void 0:l.getBBox)===null||u===void 0?void 0:u.call(l))!==null&&c!==void 0?c:this.svg.getBBox()),this.svgDOMRect},s.prototype.clear=function(){!this.parentSurface||this.parentSurface.isDeleted||!this.svg||(this.nextSibling=this.svg.nextElementSibling,this.svg.parentNode.removeChild(this.svg),this.svgDOMRect=void 0,this.setSvg(void 0))},s.prototype.create=function(l,u,c,d){this.xCoordSvgTransProperty=c,this.yCoordSvgTransProperty=d},Object.defineProperty(s.prototype,"svgRoot",{get:function(){return this.svgRootProperty},enumerable:!1,configurable:!0}),s.prototype.selectLayerRoot=function(){if(this.annotationLayer===t.EAnnotationLayer.AboveChart)this.svgRootProperty=this.parentSurface.domSvgContainer;else if(this.annotationLayer===t.EAnnotationLayer.BelowChart)this.svgRootProperty=this.parentSurface.domSvgContainer;else if(this.annotationLayer===t.EAnnotationLayer.Background)this.svgRootProperty=this.parentSurface.domBackgroundSvgContainer;else throw new Error('Unexpected annotationLayer value: "'.concat(this.annotationLayer,'!"'))},s.prototype.setSvgAttribute=function(l,u){var c=u.toString(10);this.svg.firstElementChild.setAttribute(l,c)},s.prototype.setSvg=function(l){this.svgProperty=l},s.prototype.applyClipping=function(l,u){return this.applySvgClipping(l,u)},s.prototype.notifyPropertyChanged=function(l){var u;l===i.PROPERTY.ANNOTATION_CANVAS&&!(!((u=this.svgRootProperty)===null||u===void 0)&&u.isConnected)&&(this.clear(),this.nextSibling=void 0),a.prototype.notifyPropertyChanged.call(this,l)},s.prototype.getSize=function(){if(this.svg){var l=this.getSvgDomRect(),u=l.width,c=l.height;return{width:u,height:c}}},s})(n.DomAnnotationBase);return MC.SvgAnnotationBase=o,MC}var _te;function m8(){if(_te)return RC;_te=1;var r=RC&&RC.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(u[d]=c[d])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})();Object.defineProperty(RC,"__esModule",{value:!0}),RC.CustomAnnotation=void 0;var e=Ha(),i=Ds(),n=Aa(),t=ay(),o=(function(a){r(s,a);function s(l){var u=this,c;return u=a.call(this,l)||this,u.type=n.EAnnotationType.SVGCustomAnnotation,u.surfaceTypes=[e.ESurfaceType.SciChartSurfaceType,e.ESurfaceType.SciChartPolarSurfaceType],u.isPositionDependent=!1,u.isDirty=!0,u.svgStringProperty=(c=l==null?void 0:l.svgString)!==null&&c!==void 0?c:void 0,u}return Object.defineProperty(s.prototype,"svgString",{get:function(){return this.svgStringProperty},set:function(l){this.svgStringProperty!==l&&(this.isDirty=!0,this.svgStringProperty=l,this.notifyPropertyChanged("svgString"))},enumerable:!1,configurable:!0}),s.prototype.getSvgString=function(l){return l.svgString},s.prototype.updateSvg=function(l,u){return u},s.prototype.toJSON=function(){var l=a.prototype.toJSON.call(this),u={svgString:this.svgString};return Object.assign(l.options,u),l},s.prototype.create=function(l,u,c,d){if(this.svg&&!this.isDirty&&!this.isPositionDependent){this.calcAndSetAnnotationBorders(l,u),(this.isSelected||this.prevIsSelected!==this.isSelected)&&(this.updateAdornerInner(),this.prevIsSelected=this.isSelected);return}if(this.isDirty||!this.svg||this.svg&&this.isPositionDependent&&(this.prevX1Coordinate!==this.getX1Coordinate(l,u)||this.prevY1Coordinate!==this.getY1Coordinate(l,u))){this.prevX1Coordinate=this.getX1Coordinate(l,u),this.prevY1Coordinate=this.getY1Coordinate(l,u),this.svg&&this.clear();var f=this.getSvgString(this),h=this.applyClipping(f,this.clipping),p=i.annotationHelpers.createSvg(h,this.svgRoot,this.nextSibling);this.updateSvg(this,p.firstChild),this.setSvg(p),this.calcAndSetAnnotationBorders(l,u),this.updateAdornerInner(),this.prevIsSelected=this.isSelected,this.isDirty=!1}this.prevIsSelected!==this.isSelected&&this.svg&&this.isEditable&&(this.updateAdornerInner(),this.prevIsSelected=this.isSelected)},s})(t.SvgAnnotationBase);return RC.CustomAnnotation=o,RC}var kC={},Pte;function b8(){if(Pte)return kC;Pte=1;var r=kC&&kC.__extends||(function(){var s=function(l,u){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(c[f]=d[f])},s(l,u)};return function(l,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");s(l,u);function c(){this.constructor=l}l.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}})();Object.defineProperty(kC,"__esModule",{value:!0}),kC.HtmlCustomAnnotation=void 0;var e=Aa(),i=y8(),n=Zs(),t=Ep(),o=Ha(),a=(function(s){r(l,s);function l(u){var c=s.call(this,u)||this;return c.type=e.EAnnotationType.HtmlCustomAnnotation,c.isSvgAnnotation=!1,c.isDomAnnotation=!0,c.surfaceTypes=[o.ESurfaceType.SciChartSurfaceType,o.ESurfaceType.SciChartPolarSurfaceType],c.create(),c}return l.prototype.onAttach=function(u){s.prototype.onAttach.call(this,u),this.attachToLayerRoot()},l.prototype.onDetach=function(){s.prototype.onDetach.call(this),this.layerRoot.removeChild(this.htmlElement.parentElement)},Object.defineProperty(l.prototype,"htmlElement",{get:function(){return this.htmlElementProperty},enumerable:!1,configurable:!0}),l.prototype.update=function(u,c,d,f){var h=this;this.xCoordSvgTransProperty=d,this.yCoordSvgTransProperty=f,this.calcAndSetAnnotationBorders(u,c);var p=this.getAnnotationBorders(),g=p.x1,v=p.x2,y=p.y1,m=p.y2;if(this.htmlElementProperty.parentElement.style.opacity=this.opacity.toString(),isNaN(g)||isNaN(y)||!isFinite(g)||!isFinite(y))this.htmlElementProperty.parentElement.style.visibility="hidden";else if(this.htmlElementProperty.parentElement.style.visibility=this.isHidden?"hidden":"visible",this.htmlElementProperty.style.left="".concat(g,"px"),this.htmlElementProperty.style.top="".concat(y,"px"),this.x2!==void 0||this.y2!==void 0){(this.isVerticalChart?this.y2!==void 0:this.x2!==void 0)&&(this.htmlElementProperty.style.width="".concat(v-g,"px")),(this.isVerticalChart?this.x2!==void 0:this.y2!==void 0)&&(this.htmlElementProperty.style.height="".concat(m-y,"px")),this.calcAndSetAnnotationBorders(u,c);var b=this.getAnnotationBorders(),S=b.x1,_=b.y1;this.htmlElementProperty.style.left="".concat(S,"px"),this.htmlElementProperty.style.top="".concat(_,"px")}this.updateAdornerInner(),this.resizeObserver||(this.resizeObserver=new ResizeObserver(function(C){var T,x=h.measure();t.Size.isEqual(h.sizeProperty,x)||(h.sizeProperty=x,(T=h.invalidateParentCallback)===null||T===void 0||T.call(h,{svgOnly:!h.reDrawChartOnChange}))}),this.resizeObserver.observe(this.htmlElement,{box:"border-box"}))},l.prototype.delete=function(){var u,c;(c=(u=this.resizeObserver)===null||u===void 0?void 0:u.disconnect)===null||c===void 0||c.call(u),s.prototype.delete.call(this)},l.prototype.create=function(){if(!this.htmlElementProperty){var u=document.createElement("div");u.id="sciChartHtmlAnnotationContainer_".concat(this.id),u.className="sciChartHtmlAnnotationContainer",u.style.position="absolute",this.htmlElementProperty=u}},Object.defineProperty(l.prototype,"layerRoot",{get:function(){return this.layerRootProperty},enumerable:!1,configurable:!0}),l.prototype.attachToLayerRoot=function(){if(this.layerRoot){var u=document.createElement("div");u.style.visibility="hidden";var c=this.getClipPath(this.clipping);c&&(u.style.clipPath=c),u.appendChild(this.htmlElement),this.layerRoot.appendChild(u)}},l.prototype.selectLayerRoot=function(){var u,c,d;if(this.annotationLayer===e.EAnnotationLayer.AboveChart)this.layerRootProperty=(u=this.parentSurface)===null||u===void 0?void 0:u.domDivContainer;else if(this.annotationLayer===e.EAnnotationLayer.BelowChart)this.layerRootProperty=(c=this.parentSurface)===null||c===void 0?void 0:c.domDivContainer;else if(this.annotationLayer===e.EAnnotationLayer.Background)this.layerRootProperty=(d=this.parentSurface)===null||d===void 0?void 0:d.domSeriesBackground;else throw new Error('Unexpected annotationLayer value: "'.concat(this.annotationLayer,'!"'))},l.prototype.notifyPropertyChanged=function(u){var c,d;if(u===n.PROPERTY.ANNOTATION_CANVAS){(d=(c=this.layerRoot)===null||c===void 0?void 0:c.removeChild)===null||d===void 0||d.call(c,this.htmlElement.parentElement),s.prototype.notifyPropertyChanged.call(this,u),this.attachToLayerRoot();return}s.prototype.notifyPropertyChanged.call(this,u)},l.prototype.getSize=function(){if(this.htmlElementProperty)return this.sizeProperty||(this.sizeProperty=this.measure()),this.sizeProperty},l.prototype.measure=function(){var u=this.htmlElementProperty.getBoundingClientRect(),c=u.width,d=u.height;return new t.Size(c,d)},l})(i.DomAnnotationBase);return kC.HtmlCustomAnnotation=a,kC}var pm={},gm={},Cte;function t_(){if(Cte)return gm;Cte=1;var r=gm&&gm.__extends||(function(){var _=function(C,T){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,A){x.__proto__=A}||function(x,A){for(var w in A)Object.prototype.hasOwnProperty.call(A,w)&&(x[w]=A[w])},_(C,T)};return function(C,T){if(typeof T!="function"&&T!==null)throw new TypeError("Class extends value "+String(T)+" is not a constructor or null");_(C,T);function x(){this.constructor=C}C.prototype=T===null?Object.create(T):(x.prototype=T.prototype,new x)}})(),e=gm&&gm.__spreadArray||function(_,C,T){if(T||arguments.length===2)for(var x=0,A=C.length,w;x<A;x++)(w||!(x in C))&&(w||(w=Array.prototype.slice.call(C,0,x)),w[x]=C[x]);return _.concat(w||Array.prototype.slice.call(C))};Object.defineProperty(gm,"__esModule",{value:!0}),gm.LineAnnotation=void 0;var i=Mr(),n=ni(),t=Ii(),o=Yo(),a=cc(),s=wv(),l=Ha(),u=Os(),c=Vd(),d=oo(),f=ts(),h=ug(),p=Hi(),g=ta(),v=Ds(),y=Zs(),m=Aa(),b=IM(),S=(function(_){r(C,_);function C(T){var x=this,A,w,L,k,D,j,N,V,W,K,H,U;return x=_.call(this,T)||this,x.type=m.EAnnotationType.RenderContextLineAnnotation,x.surfaceTypes=[l.ESurfaceType.SciChartSurfaceType,l.ESurfaceType.SciChartPolarSurfaceType],x.axisFontSizeProperty=14,x.axisFontFamilyProperty=(0,c.getDefaultFontName)(),x.strokeThicknessProperty=1,x.strokeDashArrayProperty=[],x.strokeProperty="#FFFFFF",x.showLabelProperty=!1,x.axisLabelStrokeProperty="#ffffff",x.axisLabelFillProperty="#b36200",x.labelPlacementProperty=s.ELabelPlacement.Auto,x.labelValueProperty="",x.labelPaddingProperty=new o.Thickness(3,4,3,4),x.labelCornerRadiusProperty=2,x.stroke=(A=T==null?void 0:T.stroke)!==null&&A!==void 0?A:x.strokeProperty,x.strokeThickness=(w=T==null?void 0:T.strokeThickness)!==null&&w!==void 0?w:x.strokeThicknessProperty,x.strokeDashArray=(L=T==null?void 0:T.strokeDashArray)!==null&&L!==void 0?L:x.strokeDashArrayProperty,x.showLabelProperty=(k=T==null?void 0:T.showLabel)!==null&&k!==void 0?k:x.showLabelProperty,x.axisLabelStrokeProperty=(D=T==null?void 0:T.axisLabelStroke)!==null&&D!==void 0?D:x.axisLabelStrokeProperty,x.axisLabelFillProperty=(j=T==null?void 0:T.axisLabelFill)!==null&&j!==void 0?j:x.axisLabelFillProperty,x.axisFontSizeProperty=(N=T==null?void 0:T.axisFontSize)!==null&&N!==void 0?N:x.axisFontSizeProperty,x.axisFontFamilyProperty=(V=T==null?void 0:T.axisFontFamily)!==null&&V!==void 0?V:x.axisFontFamilyProperty,x.labelPlacementProperty=(W=T==null?void 0:T.labelPlacement)!==null&&W!==void 0?W:x.labelPlacementProperty,x.labelValueProperty=(K=T==null?void 0:T.labelValue)!==null&&K!==void 0?K:x.labelValueProperty,x.labelPaddingProperty=(H=T==null?void 0:T.labelPadding)!==null&&H!==void 0?H:x.labelPaddingProperty,x.labelCornerRadiusProperty=(U=T==null?void 0:T.labelCornerRadius)!==null&&U!==void 0?U:x.labelCornerRadiusProperty,x}return Object.defineProperty(C.prototype,"stroke",{get:function(){return this.strokeProperty},set:function(T){this.strokeProperty=T,this.notifyPropertyChanged(y.PROPERTY.STROKE)},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"strokeThickness",{get:function(){return this.strokeThicknessProperty},set:function(T){this.strokeThicknessProperty=T,this.notifyPropertyChanged(y.PROPERTY.STROKE_THICKNESS)},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"strokeDashArray",{get:function(){return this.strokeDashArrayProperty},set:function(T){this.strokeDashArrayProperty=T,this.notifyPropertyChanged(y.PROPERTY.STROKE_DASH_ARRAY)},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"showLabel",{get:function(){return this.showLabelProperty},set:function(T){this.showLabelProperty=T,this.notifyPropertyChanged(y.PROPERTY.SHOW_LABEL)},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"axisLabelStroke",{get:function(){return this.axisLabelStrokeProperty},set:function(T){this.axisLabelStrokeProperty=T,this.notifyPropertyChanged(y.PROPERTY.AXIS_LABELS_STROKE)},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"axisLabelFill",{get:function(){return this.axisLabelFillProperty},set:function(T){this.axisLabelFillProperty=T,this.notifyPropertyChanged(y.PROPERTY.AXIS_LABELS_FILL)},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"axisFontSize",{get:function(){return this.axisFontSizeProperty},set:function(T){this.axisFontSizeProperty=T,this.notifyPropertyChanged(y.PROPERTY.AXIS_FONT_SIZE)},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"axisFontFamily",{get:function(){return this.axisFontFamilyProperty},set:function(T){this.axisFontFamilyProperty=T,this.notifyPropertyChanged(y.PROPERTY.AXIS_FONT_FAMILY)},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"labelPlacement",{get:function(){return this.labelPlacementProperty},set:function(T){this.labelPlacementProperty=T,this.notifyPropertyChanged(y.PROPERTY.LABEL_PLACEMENT)},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"labelValue",{get:function(){return this.labelValueProperty},set:function(T){this.labelValueProperty=T,this.notifyPropertyChanged(y.PROPERTY.LABEL_VALUE)},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"labelPadding",{get:function(){return this.labelPaddingProperty},set:function(T){this.labelPaddingProperty=T,this.notifyPropertyChanged(y.PROPERTY.LABEL_PADDING)},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"labelCornerRadius",{get:function(){return this.labelCornerRadiusProperty},set:function(T){this.labelCornerRadiusProperty=T,this.notifyPropertyChanged(y.PROPERTY.LABEL_CORNER_RADIUS)},enumerable:!1,configurable:!0}),C.prototype.delete=function(){this.strokePenCache=(0,i.deleteSafe)(this.strokePenCache)},C.prototype.onAttach=function(T){_.prototype.onAttach.call(this,T),this.strokePenCache||(this.strokePenCache=new f.Pen2DCache(T.webAssemblyContext2D)),(0,f.createPenInCache)(this.strokePenCache,this.stroke,this.strokeThickness,this.opacity,this.strokeDashArray)},C.prototype.drawWithContext=function(T,x,A,w,L,k){var D,j,N,V;n.Guard.notNull(T,"renderContext"),n.Guard.notNull(x,"xCalc"),n.Guard.notNull(A,"yCalc");var W=this.stroke&&this.strokeThickness&&this.strokePenCache?(0,f.getWebGlPenFromCache)(this.strokePenCache):void 0,K=this.convertPolarToCartesian(this.getX1Coordinate(x,A),this.getY1Coordinate(x,A)),H=K.x,U=K.y,I=this.convertPolarToCartesian(this.getX2Coordinate(x,A),this.getY2Coordinate(x,A)),Q=I.x,Z=I.y;if(this.setAnnotationBorders(H,Q,U,Z),!this.parentSurface.isPolar&&this.showLabel){var ee=this.parentSurface.xAxes.asArray().filter(function(be){return be.isVisible}),ie=this.parentSurface.yAxes.asArray().filter(function(be){return be.isVisible}),de=e(e([],ee.filter(function(be){return!be.isVerticalChart}),!0),ie.filter(function(be){return be.isVerticalChart}),!0),pe=e(e([],ie.filter(function(be){return!be.isVerticalChart}),!0),ee.filter(function(be){return be.isVerticalChart}),!0),_e=void 0,Te=[];if(H===Q&&U===0){Z-=this.parentSurface.seriesViewRect.y,_e=H,Te=de;var De=de.find(function(be){return be.axisAlignment===a.EAxisAlignment.Top}),Pe=de.find(function(be){return be.axisAlignment===a.EAxisAlignment.Bottom}),Ee=(D=De==null?void 0:De.axisRenderer.getAxisReservedSpace(!0))!==null&&D!==void 0?D:0,Re=(j=Pe==null?void 0:Pe.axisRenderer.getAxisReservedSpace(!0))!==null&&j!==void 0?j:0;U-=Ee*p.DpiHelper.PIXEL_RATIO,Z+=Re*p.DpiHelper.PIXEL_RATIO}else if(U===Z&&H===0){Q-=this.parentSurface.seriesViewRect.x,_e=U,Te=pe;var je=pe.find(function(be){return be.axisAlignment===a.EAxisAlignment.Left}),Ke=pe.find(function(be){return be.axisAlignment===a.EAxisAlignment.Right}),ot=(N=je==null?void 0:je.axisRenderer.getAxisReservedSpace(!0))!==null&&N!==void 0?N:0,We=(V=Ke==null?void 0:Ke.axisRenderer.getAxisReservedSpace(!0))!==null&&V!==void 0?V:0;H-=ot*p.DpiHelper.PIXEL_RATIO,Q+=We*p.DpiHelper.PIXEL_RATIO}if(W){var xe=this.getClippingRect(this.clipping,L,L,k);T.drawLine(H,U,Q,Z,W,w,xe)}if(_e!==void 0)for(var ve=0,he=Te;ve<he.length;ve++){var Se=he[ve];Se.drawLabels&&(!Se.isStackedAxis||Se.offset<_e&&Se.offset+Se.getAxisSize()>_e)&&(0,h.drawModifiersAxisLabel)(Se,T,_e,this.axisLabelFill,this.axisLabelStroke,this.labelPaddingProperty,this.labelCornerRadiusProperty)}}else if(W){var xe=this.getClippingRect(this.clipping,L,L,k);T.drawLine(H,U,Q,Z,W,w,xe)}this.updateAdornerInner()},C.prototype.onDragStarted=function(T){_.prototype.onDragStarted.call(this,T);var x=this.x1,A=this.type===m.EAnnotationType.RenderContextHorizontalLineAnnotation||this.type===m.EAnnotationType.RenderContextVerticalLineAnnotation?this.x1:this.x2,w=this.y1,L=this.type===m.EAnnotationType.RenderContextHorizontalLineAnnotation||this.type===m.EAnnotationType.RenderContextVerticalLineAnnotation?this.y1:this.y2,k=this.getXYCoordinatesFromValues(new t.Point(x,w)),D=this.getXYCoordinatesFromValues(new t.Point(A,L)),j=new t.Point(T.mousePoint.x,T.mousePoint.y);if(k&&this.canDragPoint(g.EDraggingGripPoint.x1y1)){var N=(0,d.calcDistance)(k.x,k.y,T.mousePoint.x,T.mousePoint.y);if(N<this.annotationsGripsRadius*p.DpiHelper.PIXEL_RATIO)return this.adornerDraggingPoint=g.EDraggingGripPoint.x1y1,!0}if(D&&this.canDragPoint(g.EDraggingGripPoint.x2y2)){var N=(0,d.calcDistance)(D.x,D.y,T.mousePoint.x,T.mousePoint.y);if(N<this.annotationsGripsRadius*p.DpiHelper.PIXEL_RATIO)return this.adornerDraggingPoint=g.EDraggingGripPoint.x2y2,!0}return j&&this.canDragPoint(g.EDraggingGripPoint.Body)&&this.clickToSelect(T)?(this.adornerDraggingPoint=g.EDraggingGripPoint.Body,!0):!1},C.prototype.calcDragDistance=function(T){if(!this.prevValue){this.prevValue=T;return}var x=this.yAxis.isVerticalChart;this.adornerDraggingPoint===g.EDraggingGripPoint.Body?this.type===m.EAnnotationType.RenderContextHorizontalLineAnnotation?x?this.x1=this.x1-(this.prevValue.x-T.x):this.y1=this.y1-(this.prevValue.y-T.y):this.type===m.EAnnotationType.RenderContextVerticalLineAnnotation?x?this.y1=this.y1-(this.prevValue.y-T.y):this.x1=this.x1-(this.prevValue.x-T.x):this.type===m.EAnnotationType.RenderContextLineAnnotation&&(this.x1=this.x1+this.applyPixelRatioToDragDist(T.x-this.prevValue.x),this.x2=this.x2+this.applyPixelRatioToDragDist(T.x-this.prevValue.x),this.y1=this.y1+(T.y-this.prevValue.y),this.y2=this.y2+(T.y-this.prevValue.y)):this.adornerDraggingPoint===g.EDraggingGripPoint.x1y1?this.resizeDirections===u.EXyDirection.XDirection?this.x1+=this.applyPixelRatioToDragDist(T.x-this.prevValue.x):this.resizeDirections===u.EXyDirection.YDirection?this.y1+=T.y-this.prevValue.y:(this.x1+=this.applyPixelRatioToDragDist(T.x-this.prevValue.x),this.y1+=T.y-this.prevValue.y):this.adornerDraggingPoint===g.EDraggingGripPoint.x2y2&&(this.resizeDirections===u.EXyDirection.XDirection?this.x2+=this.applyPixelRatioToDragDist(T.x-this.prevValue.x):this.resizeDirections===u.EXyDirection.YDirection?this.y2+=T.y-this.prevValue.y:(this.x2+=this.applyPixelRatioToDragDist(T.x-this.prevValue.x),this.y2+=T.y-this.prevValue.y)),this.prevValue=T},C.prototype.onDpiChanged=function(T){_.prototype.onDpiChanged.call(this,T),this.notifyPropertyChanged(y.PROPERTY.STROKE)},C.prototype.toJSON=function(){var T=_.prototype.toJSON.call(this),x={axisFontFamily:this.axisFontFamily,axisFontSize:this.axisFontSize,axisLabelFill:this.axisLabelFill,axisLabelStroke:this.axisLabelStroke,labelPlacement:this.labelPlacement,labelValue:this.labelValue,showLabel:this.showLabel,stroke:this.stroke,strokeDashArray:this.strokeDashArray,strokeThickness:this.strokeThickness,labelPadding:this.labelPadding,labelCornerRadius:this.labelCornerRadius};return Object.assign(T.options,x),T},C.prototype.checkIsClickedOnAnnotationInternal=function(T,x){var A=this.getAnnotationBorders(),w=A.x1,L=A.x2,k=A.y1,D=A.y2,j=(0,d.calcDistanceFromLineSegment)(T,x,w,k,L,D);return j<=y.DISTANCE_TO_LINE*p.DpiHelper.PIXEL_RATIO},C.prototype.notifyPropertyChanged=function(T){_.prototype.notifyPropertyChanged.call(this,T);var x=[y.PROPERTY.STROKE,y.PROPERTY.STROKE_THICKNESS,y.PROPERTY.STROKE_DASH_ARRAY,y.PROPERTY.OPACITY];x.includes(T)&&this.strokePenCache&&(0,f.createPenInCache)(this.strokePenCache,this.stroke,this.strokeThickness,this.opacity,this.strokeDashArray)},C.prototype.updateAdornerInner=function(){if(this.deleteAdorner(),this.isSelected){var T=this.getAdornerAnnotationBorders(),x=T.x1,A=T.x2,w=T.y1,L=T.y2,k=this.svgStringAdornerTemplate(x,w,A,L),D=this.applySvgClipping(k,this.adornerClipping);this.svgAdorner=v.annotationHelpers.createSvg(D,this.svgAdornerRoot)}},C.prototype.svgStringAdornerTemplate=function(T,x,A,w){var L=this.selectionBoxStroke;return`<svg xmlns="http://www.w3.org/2000/svg">
    <line x1="`.concat(T,'" y1="').concat(x,'" x2="').concat(A,'" y2="').concat(w,'" stroke="').concat(L,`" stroke-width="6" />
    `).concat(this.canDragPoint(g.EDraggingGripPoint.x1y1)?this.getAnnotationGripSvg(T,x):"",`
    `).concat(this.canDragPoint(g.EDraggingGripPoint.x2y2)?this.getAnnotationGripSvg(A,w):"",`
    </svg>`)},C})(b.RenderContextAnnotationBase);return gm.LineAnnotation=S,gm}var Tte;function CSe(){if(Tte)return pm;Tte=1;var r=pm&&pm.__extends||(function(){var y=function(m,b){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,_){S.__proto__=_}||function(S,_){for(var C in _)Object.prototype.hasOwnProperty.call(_,C)&&(S[C]=_[C])},y(m,b)};return function(m,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");y(m,b);function S(){this.constructor=m}m.prototype=b===null?Object.create(b):(S.prototype=b.prototype,new S)}})(),e=pm&&pm.__assign||function(){return e=Object.assign||function(y){for(var m,b=1,S=arguments.length;b<S;b++){m=arguments[b];for(var _ in m)Object.prototype.hasOwnProperty.call(m,_)&&(y[_]=m[_])}return y},e.apply(this,arguments)};Object.defineProperty(pm,"__esModule",{value:!0}),pm.HorizontalLineAnnotation=void 0;var i=ni(),n=Ii(),t=vn(),o=Yo(),a=cc(),s=Ha(),l=oo(),u=pn(),c=ts(),d=ug(),f=Hi(),h=ta(),p=Aa(),g=t_(),v=(function(y){r(m,y);function m(b){var S=this,_,C,T;return S=y.call(this,b)||this,S.type=p.EAnnotationType.RenderContextHorizontalLineAnnotation,S.surfaceTypes=[s.ESurfaceType.SciChartSurfaceType],S.dragOnLine=!0,S.dragOnLabel=!0,b!=null&&b.x2&&(S.x2=b.x2),b!=null&&b.y2&&(S.y2=b.y2),S.dragOnLine=(_=b==null?void 0:b.dragOnLine)!==null&&_!==void 0?_:S.dragOnLine,S.dragOnLabel=(C=b==null?void 0:b.dragOnLabel)!==null&&C!==void 0?C:S.dragOnLabel,S.horizontalAlignment=(T=b==null?void 0:b.horizontalAlignment)!==null&&T!==void 0?T:S.horizontalAlignment,S}return Object.defineProperty(m.prototype,"y2",{get:function(){throw Error("y2 property is not supported for HorizontalLineAnnotation")},set:function(b){throw Error("y2 property is not supported for HorizontalLineAnnotation")},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"x2",{get:function(){throw Error("x2 property is not supported for HorizontalLineAnnotation")},set:function(b){throw Error("x2 property is not supported for HorizontalLineAnnotation")},enumerable:!1,configurable:!0}),m.prototype.drawWithContext=function(b,S,_,C,T,x){i.Guard.notNull(b,"renderContext"),i.Guard.notNull(S,"xCalc"),i.Guard.notNull(_,"yCalc");var A=this.stroke&&this.strokeThickness?(0,c.getWebGlPenFromCache)(this.strokePenCache):void 0,w=this.getDrawConfig(S,_),L=w.annotationCoord,k=w.lineAnnotationEdgeCoord,D=w.horizontalAxis,j=w.verticalAxis,N=w.horizontalAxisCoordinateMode,V=w.verticalAxisCoordinateMode,W=w.horizontalCoordinateCalculator,K=w.verticalCoordinateCalculator,H=w.isAlignmentRight;if(!(!D||!j)){var U=0,I=C.width;H&&(U=C.width,I=0);var Q=this.getValue(k,W,N),Z=Q||Q===0;Z&&(I=I=this.getX1Coordinate(S,_));var ee=this.getY1Coordinate(S,_),ie=ee;this.setAnnotationBorders(U,I,ee,ie);var de=this.getCoordinate(k,W,N),pe=this.getCoordinate(L,K,V),_e=pe>=0&&pe<=j.parentSurface.seriesViewRect.height,Te=H?de<=D.parentSurface.seriesViewRect.width:de>=0,De=!Z||Te;if(_e&&De){var Pe=e(e({},j.labelStyle),{padding:new o.Thickness(2,2,2,2),color:this.axisLabelStroke,fontSize:this.axisFontSize*f.DpiHelper.PIXEL_RATIO,fontFamily:this.axisFontFamily}),Ee=(0,d.drawLineAnnotation)(j,b,this.labelPlacement,this.labelValue,U,I,ee,ie,Pe,this.axisLabelFill,A,C,this.showLabel,this.opacity,this.horizontalAlignment);if(Ee){var Re=(0,u.translateFromCanvasToSeriesViewRect)(new n.Point(Ee.left,Ee.top),C,!0),je=(0,u.translateFromCanvasToSeriesViewRect)(new n.Point(Ee.right,Ee.bottom),C,!0);this.labelRect=t.Rect.createWithPoints(Re,je)}}this.dragOnLine&&this.updateAdornerInner()}},m.prototype.onDragStarted=function(b){return this.dragOnLine?y.prototype.onDragStarted.call(this,b):this.dragOnLabel&&this.labelRect&&this.clickToSelect(b)?(this.adornerDraggingPoint=h.EDraggingGripPoint.Body,!0):!1},m.prototype.toJSON=function(){var b=y.prototype.toJSON.call(this),S={dragOnLabel:this.dragOnLabel,dragOnLine:this.dragOnLine,horizontalAlignment:this.horizontalAlignment,verticalAlignment:void 0};return Object.assign(b.options,S),b},m.prototype.checkIsClickedOnAnnotationInternal=function(b,S){if(this.dragOnLine&&y.prototype.checkIsClickedOnAnnotationInternal.call(this,b,S))return!0;if(this.dragOnLabel&&this.labelRect){var _=this.labelRect,C=_.left,T=_.top,x=_.right,A=_.bottom;if((0,l.testIsInBounds)(b,S,C,A,x,T))return!0}return!1},m.prototype.getDrawConfig=function(b,S){var _=this.xAxis,C=this.yAxis,T={annotationCoord:this.y1,lineAnnotationEdgeCoord:this.x1,horizontalAxis:_,verticalAxis:C,horizontalAxisCoordinateMode:this.xCoordinateMode,verticalAxisCoordinateMode:this.yCoordinateMode,horizontalCoordinateCalculator:b,verticalCoordinateCalculator:S,isAlignmentRight:(C==null?void 0:C.axisAlignment)===a.EAxisAlignment.Right},x={annotationCoord:this.x1,lineAnnotationEdgeCoord:this.y1,horizontalAxis:C,verticalAxis:_,horizontalAxisCoordinateMode:this.yCoordinateMode,verticalAxisCoordinateMode:this.xCoordinateMode,horizontalCoordinateCalculator:S,verticalCoordinateCalculator:b,isAlignmentRight:(_==null?void 0:_.axisAlignment)===a.EAxisAlignment.Right};return this.isVerticalChart?x:T},m})(g.LineAnnotation);return pm.HorizontalLineAnnotation=v,pm}var IC={},xte;function TSe(){if(xte)return IC;xte=1;var r=IC&&IC.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(IC,"__esModule",{value:!0}),IC.HtmlTextAnnotation=void 0;var e=Zs(),i=b8(),n=Aa(),t=(function(o){r(a,o);function a(s){var l=this,u,c;return l=o.call(this,s)||this,l.type=n.EAnnotationType.HtmlTextAnnotation,l.textProperty=null,l.text=(u=s==null?void 0:s.text)!==null&&u!==void 0?u:l.textProperty,l.textContainerStyle=(c=s==null?void 0:s.textContainerStyle)!==null&&c!==void 0?c:l.textContainerStyleProperty,l}return Object.defineProperty(a.prototype,"text",{get:function(){return this.textProperty},set:function(s){this.textProperty!==s&&(this.textProperty=s,this.setText(this.textProperty),this.notifyPropertyChanged(e.PROPERTY.TEXT_STYLE))},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"textContainerStyle",{get:function(){return this.textContainerStyleProperty},set:function(s){this.textContainerStyleProperty!==s&&(this.textContainerStyleProperty=s,this.setStyle(this.textContainerStyle),this.notifyPropertyChanged(e.PROPERTY.TEXT))},enumerable:!1,configurable:!0}),a.prototype.toJSON=function(){var s=o.prototype.toJSON.call(this),l={textContainerStyle:this.textContainerStyle,text:this.text};return Object.assign(s.options,l),s},a.prototype.setText=function(s){this.htmlElement.innerText=s},a.prototype.setStyle=function(s){var l=this;Object.entries(s).forEach(function(u){var c=u[0],d=u[1],f=c.replace(/[A-Z]/g,function(h){return"-"+h.toLowerCase()});l.htmlElement.style.setProperty(f,d)})},a})(i.HtmlCustomAnnotation);return IC.HtmlTextAnnotation=t,IC}var NC={},yI={},Ete;function xSe(){if(Ete)return yI;Ete=1,Object.defineProperty(yI,"__esModule",{value:!0}),yI.geometryHelpers=void 0;function r(e,i,n,t,o,a){var s=o/2,l=Math.cos(n),u=Math.sin(n),c=e-t*l,d=i-t*u,f=c+s*u,h=d-s*l,p=c-s*u,g=d+s*l,v=e-a*l,y=i-a*u;return{baseMidX:v,baseMidY:y,leftX:f,leftY:h,rightX:p,rightY:g}}return yI.geometryHelpers={calcArrowHeadParameters:r},yI}var Ate;function yY(){return Ate||(Ate=1,(function(r){var e=NC&&NC.__extends||(function(){var y=function(m,b){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,_){S.__proto__=_}||function(S,_){for(var C in _)Object.prototype.hasOwnProperty.call(_,C)&&(S[C]=_[C])},y(m,b)};return function(m,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");y(m,b);function S(){this.constructor=m}m.prototype=b===null?Object.create(b):(S.prototype=b.prototype,new S)}})(),i=NC&&NC.__assign||function(){return i=Object.assign||function(y){for(var m,b=1,S=arguments.length;b<S;b++){m=arguments[b];for(var _ in m)Object.prototype.hasOwnProperty.call(m,_)&&(y[_]=m[_])}return y},i.apply(this,arguments)};Object.defineProperty(r,"__esModule",{value:!0}),r.LineArrowAnnotation=r.EArrowHeadPosition=void 0;var n=Jn(),t=Mr(),o=ni(),a=$o(),s=xSe(),l=hl(),u=ts(),c=Hi(),d=Zs(),f=Aa(),h=t_(),p;(function(y){y.End="End",y.Start="Start",y.StartEnd="StartEnd"})(p=r.EArrowHeadPosition||(r.EArrowHeadPosition={}));var g="transparent",v=(function(y){e(m,y);function m(b){var S=this,_,C,T,x,A,w,L,k,D,j,N,V,W,K,H,U;return S=y.call(this,b)||this,S.type=f.EAnnotationType.RenderContextLineArrowAnnotation,S.arrowHeadPositionProperty=p.End,S.isArrowHeadScalableProperty=!1,S.getArrowStyleProxy=function(I){return new Proxy(I,{set:function(Q,Z,ee){return Q[Z]=ee,S.notifyPropertyChanged("arrowStyle"),!0}})},S.arrowHeadPositionProperty=(_=b==null?void 0:b.arrowHeadPosition)!==null&&_!==void 0?_:p.End,S.isArrowHeadScalable=(C=b==null?void 0:b.isArrowHeadScalable)!==null&&C!==void 0?C:!1,S.arrowStyleProperty=S.getArrowStyleProxy({headLength:(x=(T=b==null?void 0:b.arrowStyle)===null||T===void 0?void 0:T.headLength)!==null&&x!==void 0?x:10,headWidth:(w=(A=b==null?void 0:b.arrowStyle)===null||A===void 0?void 0:A.headWidth)!==null&&w!==void 0?w:8,headDepth:(k=(L=b==null?void 0:b.arrowStyle)===null||L===void 0?void 0:L.headDepth)!==null&&k!==void 0?k:0,fill:(j=(D=b==null?void 0:b.arrowStyle)===null||D===void 0?void 0:D.fill)!==null&&j!==void 0?j:g,stroke:(W=(V=(N=b==null?void 0:b.arrowStyle)===null||N===void 0?void 0:N.stroke)!==null&&V!==void 0?V:S.stroke)!==null&&W!==void 0?W:"#FFFFFF",strokeThickness:(U=(H=(K=b==null?void 0:b.arrowStyle)===null||K===void 0?void 0:K.strokeThickness)!==null&&H!==void 0?H:S.strokeThickness)!==null&&U!==void 0?U:1}),b!=null&&b.onArrowHeadSizeChanged&&(typeof b.onArrowHeadSizeChanged=="string"?(S.typeMap.set("onArrowHeadSizeChanged",b.onArrowHeadSizeChanged),S.onArrowHeadSizeChangedCallback=(0,n.getFunction)(a.EBaseType.OptionFunction,b.onArrowHeadSizeChanged)):S.onArrowHeadSizeChangedCallback=b.onArrowHeadSizeChanged),S}return Object.defineProperty(m.prototype,"arrowStyle",{get:function(){return this.arrowStyleProperty},set:function(b){var S=i(i({},this.arrowStyle),b);this.arrowStyleProperty=this.getArrowStyleProxy(S),this.notifyPropertyChanged("arrowStyle")},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"arrowHeadPosition",{get:function(){return this.arrowHeadPositionProperty},set:function(b){this.arrowHeadPositionProperty=b,this.notifyPropertyChanged(d.PROPERTY.ARROW_HEAD_POSITION)},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"isArrowHeadScalable",{get:function(){return this.isArrowHeadScalableProperty},set:function(b){this.isArrowHeadScalableProperty=b,this.notifyPropertyChanged(d.PROPERTY.IS_ARROW_HEAD_RELATIVE)},enumerable:!1,configurable:!0}),m.prototype.onAttach=function(b){y.prototype.onAttach.call(this,b),this.updateArrowheadBrushes(b)},m.prototype.updateArrowheadBrushes=function(b){this.arrowheadStrokePenCache||(this.arrowheadStrokePenCache=new u.Pen2DCache(b.webAssemblyContext2D)),(0,u.createPenInCache)(this.arrowheadStrokePenCache,this.arrowStyle.stroke,this.arrowStyle.strokeThickness,this.opacity),this.arrowStyle.fill&&this.arrowStyle.fill!==g&&(this.arrowheadFillBrushCache||(this.arrowheadFillBrushCache=new l.BrushCache(b.webAssemblyContext2D)),(0,l.createBrushInCache)(this.arrowheadFillBrushCache,this.arrowStyle.fill,this.opacity))},m.prototype.delete=function(){y.prototype.delete.call(this),this.arrowheadFillBrushCache=(0,t.deleteSafe)(this.arrowheadFillBrushCache),this.arrowheadStrokePenCache=(0,t.deleteSafe)(this.arrowheadStrokePenCache)},m.prototype.drawWithContext=function(b,S,_,C,T,x){o.Guard.notNull(b,"renderContext"),o.Guard.notNull(S,"xCalc"),o.Guard.notNull(_,"yCalc");var A=this.convertPolarToCartesian(this.getX1Coordinate(S,_),this.getY1Coordinate(S,_)),w=A.x,L=A.y,k=this.convertPolarToCartesian(this.getX2Coordinate(S,_),this.getY2Coordinate(S,_)),D=k.x,j=k.y;this.setAnnotationBorders(w,D,L,j);var N=this.getClippingRect(this.clipping,C,T,x),V=this.getAnnotationBorders(),W=V.x1,K=V.x2,H=V.y1,U=V.y2,I=K-W,Q=U-H;if(!(I===0&&Q===0)){var Z=Math.atan2(Q,I),ee,ie;if(this.isArrowHeadScalable){var de=this.xAxis.visibleRange.max-this.xAxis.visibleRange.min,pe=this.yAxis.visibleRange.max-this.yAxis.visibleRange.min;(!this.storedXRange||!this.storedYRange)&&(this.storedXRange=de,this.storedYRange=pe);var _e=de/this.storedXRange,Te=pe/this.storedYRange,De=(_e+Te)/2;ee=this.arrowStyle.headLength/De*c.DpiHelper.PIXEL_RATIO,ie=this.arrowStyle.headWidth/De*c.DpiHelper.PIXEL_RATIO}else ee=this.arrowStyle.headLength*c.DpiHelper.PIXEL_RATIO,ie=this.arrowStyle.headWidth*c.DpiHelper.PIXEL_RATIO;var Pe=this.arrowStyle.headDepth*ee;if(this.onArrowHeadSizeChangedCallback){var Ee={headLength:this.arrowStyle.headLength,headWidth:this.arrowStyle.headWidth,headDepth:this.arrowStyle.headDepth,angle:Z,x1:W,y1:H,x2:K,y2:U},Re=this.onArrowHeadSizeChangedCallback(Ee);Re&&(Re.headLength!==void 0&&(ee=Re.headLength*c.DpiHelper.PIXEL_RATIO),Re.headWidth!==void 0&&(ie=Re.headWidth*c.DpiHelper.PIXEL_RATIO),Re.headDepth!==void 0&&(Pe=Re.headDepth*ee))}var je=s.geometryHelpers.calcArrowHeadParameters(W,H,Z+Math.PI,ee,ie,Pe),Ke=je.baseMidX,ot=je.baseMidY,We=je.leftX,xe=je.leftY,ve=je.rightX,he=je.rightY,Se=s.geometryHelpers.calcArrowHeadParameters(K,U,Z,ee,ie,Pe),be=Se.baseMidX,ke=Se.baseMidY,qe=Se.leftX,rt=Se.leftY,St=Se.rightX,xt=Se.rightY,It=W,Zt=H,ct=K,Qe=U;this.arrowStyle.headWidth>0&&this.arrowStyle.headLength>0&&([p.Start,p.StartEnd].includes(this.arrowHeadPosition)&&(It=Ke,Zt=ot,this.drawArrowHead(b,W,H,Pe===0,Ke,ot,We,xe,ve,he,C,N)),[p.End,p.StartEnd].includes(this.arrowHeadPosition)&&(ct=be,Qe=ke,this.drawArrowHead(b,K,U,Pe===0,be,ke,qe,rt,St,xt,C,N))),this.drawLine(b,It,Zt,ct,Qe,C,T,x)}},m.prototype.drawLine=function(b,S,_,C,T,x,A,w){var L=this.stroke&&this.strokeThickness&&this.strokePenCache?(0,u.getWebGlPenFromCache)(this.strokePenCache):void 0;if(L){var k=this.getClippingRect(this.clipping,x,A,w);b.drawLine(S,_,C,T,L,x,k)}this.updateAdornerInner()},m.prototype.drawArrowHead=function(b,S,_,C,T,x,A,w,L,k,D,j){var N=(0,u.getWebGlPenFromCache)(this.arrowheadStrokePenCache);if(N){var V=this.arrowStyle.fill&&this.arrowStyle.fill!==g,W=V?(0,l.getWebGlBrushFromCache)(this.arrowheadFillBrushCache):void 0;C?b.drawLines([A,w,S,_,L,k],N,D,j):(V&&b.drawTriangleStrip([A,T,S,L],[w,x,_,k],D,j,W),b.drawLines([T,x,A,w,S,_,L,k,T,x],N,D,j))}},m.prototype.notifyPropertyChanged=function(b){y.prototype.notifyPropertyChanged.call(this,b),(b==="arrowStyle"||b===d.PROPERTY.OPACITY)&&this.updateArrowheadBrushes(this.parentSurface)},m.prototype.toJSON=function(){var b=y.prototype.toJSON.call(this),S={arrowStyle:{headLength:this.arrowStyle.headLength,headWidth:this.arrowStyle.headWidth,headDepth:this.arrowStyle.headDepth,fill:this.arrowStyle.fill,stroke:this.arrowStyle.stroke,strokeThickness:this.arrowStyle.strokeThickness},arrowHeadPosition:this.arrowHeadPosition,isArrowHeadScalable:this.isArrowHeadScalable,onArrowHeadSizeChanged:this.typeMap.get("onArrowHeadSizeChanged")};return Object.assign(b.options,S),b},m})(h.LineAnnotation);r.LineArrowAnnotation=v})(NC)),NC}var mI={},wte;function JV(){return wte||(wte=1,(function(r){var e=mI&&mI.__extends||(function(){var w=function(L,k){return w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,j){D.__proto__=j}||function(D,j){for(var N in j)Object.prototype.hasOwnProperty.call(j,N)&&(D[N]=j[N])},w(L,k)};return function(L,k){if(typeof k!="function"&&k!==null)throw new TypeError("Class extends value "+String(k)+" is not a constructor or null");w(L,k);function D(){this.constructor=L}L.prototype=k===null?Object.create(k):(D.prototype=k.prototype,new D)}})();Object.defineProperty(r,"__esModule",{value:!0}),r.NativeTextAnnotation=r.EWrapTo=void 0;var i=Mr(),n=ni(),t=Ii(),o=xg(),a=Du(),s=Os(),l=iu(),u=mi(),c=oo(),d=lc(),f=pn(),h=Xi(),p=Hi(),g=ta(),v=Ds(),y=Zs(),m=Aa(),b=IM(),S=hl(),_=Yo(),C=Ha(),T=Vd(),x;(function(w){w.ViewRect="ViewRect",w.Annotation="Annotation"})(x=r.EWrapTo||(r.EWrapTo={}));var A=(function(w){e(L,w);function L(k){var D=this,j,N,V,W,K,H,U,I,Q,Z,ee,ie,de,pe;return D=w.call(this,k)||this,D.type=m.EAnnotationType.RenderContextNativeTextAnnotation,D.surfaceTypes=[C.ESurfaceType.SciChartSurfaceType,C.ESurfaceType.SciChartPolarSurfaceType],D.scaleOnResize=!1,D.fontSizeProperty=14,D.fontFamilyProperty=(0,T.getDefaultFontName)(),D.textColorProperty="#ffffff",D.rotationProperty=0,D.textProperty="",D.verticalAnchorPointProperty=o.EVerticalAnchorPoint.Top,D.horizontalAnchorPointProperty=o.EHorizontalAnchorPoint.Left,D.multiLineAlignmentProperty=a.EMultiLineAlignment.Center,D.lineSpacingProperty=3,D.scaleProperty=1,D.paddingProperty=_.Thickness.fromNumber(2),D.textColorProperty=(j=k==null?void 0:k.textColor)!==null&&j!==void 0?j:D.textColorProperty,D.fontSizeProperty=(N=k==null?void 0:k.fontSize)!==null&&N!==void 0?N:D.fontSizeProperty,D.fontFamilyProperty=(V=k==null?void 0:k.fontFamily)!==null&&V!==void 0?V:D.fontFamilyProperty,D.rotationProperty=(W=k==null?void 0:k.rotation)!==null&&W!==void 0?W:D.rotationProperty,D.textProperty=(K=k==null?void 0:k.text)!==null&&K!==void 0?K:D.textProperty,D.verticalAnchorPointProperty=(H=k==null?void 0:k.verticalAnchorPoint)!==null&&H!==void 0?H:D.verticalAnchorPointProperty,D.horizontalAnchorPointProperty=(U=k==null?void 0:k.horizontalAnchorPoint)!==null&&U!==void 0?U:D.horizontalAnchorPointProperty,D.multiLineAlignmentProperty=(I=k==null?void 0:k.multiLineAlignment)!==null&&I!==void 0?I:D.multiLineAlignmentProperty,D.wrapToProperty=(Q=k==null?void 0:k.wrapTo)!==null&&Q!==void 0?Q:D.wrapToProperty,D.lineSpacingProperty=(Z=k==null?void 0:k.lineSpacing)!==null&&Z!==void 0?Z:D.lineSpacingProperty,D.scaleProperty=(ee=k==null?void 0:k.scale)!==null&&ee!==void 0?ee:D.scaleProperty,D.initialWidth=Math.abs(D.x2-D.x1),D.scaleOnResize=(ie=k==null?void 0:k.scaleOnResize)!==null&&ie!==void 0?ie:D.scaleOnResize,D.backgroundProperty=(de=k==null?void 0:k.background)!==null&&de!==void 0?de:D.backgroundProperty,D.paddingProperty=(pe=k==null?void 0:k.padding)!==null&&pe!==void 0?pe:D.paddingProperty,D}return Object.defineProperty(L.prototype,"textColor",{get:function(){return this.textColorProperty},set:function(k){this.textColorProperty!==k&&(this.textColorProperty=k,this.notifyPropertyChanged(y.PROPERTY.COLOR))},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"background",{get:function(){return this.backgroundProperty},set:function(k){this.backgroundProperty!==k&&(this.backgroundProperty=k,this.notifyPropertyChanged(y.PROPERTY.FILL))},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"padding",{get:function(){return this.paddingProperty},set:function(k){this.paddingProperty!==k&&(this.paddingProperty=k,this.notifyPropertyChanged(y.PROPERTY.PADDING))},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"fontSize",{get:function(){return this.fontSizeProperty},set:function(k){this.fontSizeProperty!==k&&(this.fontSizeProperty=k,this.notifyPropertyChanged(y.PROPERTY.AXIS_FONT_SIZE))},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"fontFamily",{get:function(){return this.fontFamilyProperty},set:function(k){this.fontFamilyProperty!==k&&(this.fontFamilyProperty=k,this.notifyPropertyChanged(y.PROPERTY.AXIS_FONT_FAMILY))},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"rotation",{get:function(){return this.rotationProperty},set:function(k){this.rotationProperty!==k&&(this.rotationProperty=k,this.notifyPropertyChanged(y.PROPERTY.ROTATION))},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"text",{get:function(){return this.textProperty},set:function(k){this.textProperty!==k&&(this.textProperty=k,this.notifyPropertyChanged(y.PROPERTY.TEXT))},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"verticalAnchorPoint",{get:function(){return this.verticalAnchorPointProperty},set:function(k){this.verticalAnchorPointProperty!==k&&(this.verticalAnchorPointProperty=k,this.notifyPropertyChanged(y.PROPERTY.VERTICAL_ANCHOR_POINT))},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"horizontalAnchorPoint",{get:function(){return this.horizontalAnchorPointProperty},set:function(k){this.horizontalAnchorPointProperty!==k&&(this.horizontalAnchorPointProperty=k,this.notifyPropertyChanged(y.PROPERTY.HORIZONTAL_ANCHOR_POINT))},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"multiLineAlignment",{get:function(){return this.multiLineAlignmentProperty},set:function(k){this.multiLineAlignmentProperty!==k&&(this.multiLineAlignmentProperty=k,this.notifyPropertyChanged(y.PROPERTY.MULTILINE_ALIGNMENT))},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"wrapTo",{get:function(){return this.wrapToProperty},set:function(k){this.wrapToProperty!==k&&(this.wrapToProperty=k,this.notifyPropertyChanged(y.PROPERTY.WRAP_TO))},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"lineSpacing",{get:function(){return this.lineSpacingProperty},set:function(k){this.lineSpacingProperty!==k&&(this.lineSpacingProperty=k,this.notifyPropertyChanged(y.PROPERTY.LINE_SPACING))},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"scale",{get:function(){return this.scaleProperty},set:function(k){k!==this.scaleProperty&&(this.scaleProperty=k,this.notifyPropertyChanged(y.PROPERTY.SCALE))},enumerable:!1,configurable:!0}),L.prototype.delete=function(){this.fillBrushCache=(0,i.deleteSafe)(this.fillBrushCache)},L.prototype.onAttach=function(k){w.prototype.onAttach.call(this,k),this.background&&(this.fillBrushCache||(this.fillBrushCache=new S.BrushCache(k.webAssemblyContext2D)),(0,S.createBrushInCache)(this.fillBrushCache,this.background,this.opacity))},L.prototype.getRotationCenter=function(k,D,j){return new t.Point(k,D)},L.prototype.drawWithContext=function(k,D,j,N,V,W){n.Guard.notNull(k,"renderContext"),n.Guard.notNull(D,"xCalc"),n.Guard.notNull(j,"yCalc"),k.getNativeContext();var K=this.convertPolarToCartesian(this.getX1Coordinate(D,j),this.getY1Coordinate(D,j)),H=K.x,U=K.y,I={fontFamily:this.fontFamily,fontSize:Math.round(this.fontSize*p.DpiHelper.PIXEL_RATIO)},Q=(0,u.parseColorToUIntArgb)(this.textColor);Q=(0,l.uintArgbColorOverrideOpacity)(Q,this.opacity);var Z,ee=-(this.rotation*Math.PI)/180,ie=this.rotation!==0||this.scale!==1,de=k.getFont(I,ie,!0),pe=(0,h.getTextBounds)(this.parentSurface.webAssemblyContext2D),_e=this.text;if(this.wrapTo){var Te=1/0;if(typeof this.wrapTo=="number")Te=this.wrapTo;else if(this.wrapTo===x.ViewRect)this.horizontalAnchorPoint===o.EHorizontalAnchorPoint.Left?Te=this.parentSurface.seriesViewRect.width-H:this.horizontalAnchorPoint===o.EHorizontalAnchorPoint.Center?Te=2*Math.min(H,this.parentSurface.seriesViewRect.width-H):this.horizontalAnchorPoint===o.EHorizontalAnchorPoint.Right&&(Te=H);else if(this.wrapTo===x.Annotation){var De=this.getX2Coordinate(D,j);De>H&&(Te=De-H)}_e=(0,d.wrapNativeText)(this.text,Te,de,pe)}var Pe=this.lineSpacing;de.CalculateStringBounds(_e??"",pe,Pe);var Ee=pe.GetLineBounds(0);Pe<1&&(Pe=this.lineSpacing*(Ee.m_fHeight-Ee.m_fOffsetY),de.CalculateStringBounds(_e??"",pe,Pe)),Ee.delete();var Re=this.getRotationCenter(H+N.x,U+N.y,pe);Z=(0,h.getVector4)(this.parentSurface.webAssemblyContext2D,Re.x,Re.y,ee,0);var je=(0,d.getNativeTextPosition)(H,U,this.horizontalAnchorPointProperty,this.verticalAnchorPointProperty,pe,this.padding),Ke=je.x,ot=je.y,We=pe.GetLineBounds(0),xe=pe.m_fWidth,ve=(0,d.getFirstLineHeightToBaseline)(We);We.delete();var he=(0,d.getTextHeightToBaseline)(pe),Se=(0,d.getMultilineTextHeight)(pe),be=Ke,ke=ot-ve,qe=Ke+xe,rt=ke+Se;if(this.rotation!==0){var St=Math.sin(ee),xt=Math.cos(ee),It=this.getRotationCenter(H,U,pe),Zt=function(zt,jr){var Be=(zt-It.x)*xt+(jr-It.y)*St,Ge=(jr-It.y)*xt-(zt-It.x)*St;return{x:Be,y:Ge}},ct=Zt(be,ke),Qe=Zt(qe,ke),Et=Zt(be,rt),Gt=Zt(qe,rt);be=Math.min(ct.x,Qe.x,Et.x,Gt.x)+It.x,qe=Math.max(ct.x,Qe.x,Et.x,Gt.x)+It.x,ke=Math.min(ct.y,Qe.y,Et.y,Gt.y)+It.y,rt=Math.max(ct.y,Qe.y,Et.y,Gt.y)+It.y}var Xe=(0,a.convertMultiLineAlignment)(this.multiLineAlignment,this.parentSurface.webAssemblyContext2D),Vt=de.GetScale(),lr=!1;Vt!==this.scale&&(de.SetScale(this.scale),lr=!0),this.setAnnotationBorders(be,be+(qe-be)*this.scale,ke,ke+(rt-ke)*this.scale);var Jt=Ke+N.x,kr=ot+N.y;de.DrawStringAdvanced(_e,Q,Math.round(Jt),Math.round(kr),Z,Xe,Pe),lr&&de.SetScale(Vt);var qt=this.getClippingRect(this.clipping,N,V,W);this.background&&this.drawBackground(k,xe,Se,he,Re,qt),k.resetAndClip(qt),de.End(),this.updateAdornerInner()},L.prototype.onDragStarted=function(k){w.prototype.onDragStarted.call(this,k);var D=this.getAnnotationBorders(!1,!0),j=D.x1,N=D.x2,V=D.y1,W=D.y2,K=v.annotationHelpers.calcNewApex(j,V,N,W,this.isVerticalChart),H=K.x1y1,U=K.x2y1,I=K.x1y2,Q=K.x2y2,Z=(0,f.translateFromCanvasToSeriesViewRect)(new t.Point(k.mousePoint.x,k.mousePoint.y),this.parentSurface.seriesViewRect,!0);if(H&&this.canDragPoint(g.EDraggingGripPoint.x1y1)){var ee=(0,c.calcDistance)(H.x,H.y,Z.x,Z.y);if(ee<this.annotationsGripsRadius*p.DpiHelper.PIXEL_RATIO)return this.adornerDraggingPoint=g.EDraggingGripPoint.x1y1,!0}if(U&&this.canDragPoint(g.EDraggingGripPoint.x2y1)){var ee=(0,c.calcDistance)(U.x,U.y,Z.x,Z.y);if(ee<this.annotationsGripsRadius*p.DpiHelper.PIXEL_RATIO)return this.adornerDraggingPoint=g.EDraggingGripPoint.x2y1,!0}if(I&&this.canDragPoint(g.EDraggingGripPoint.x1y2)){var ee=(0,c.calcDistance)(I.x,I.y,Z.x,Z.y);if(ee<this.annotationsGripsRadius*p.DpiHelper.PIXEL_RATIO)return this.adornerDraggingPoint=g.EDraggingGripPoint.x1y2,!0}if(Q&&this.canDragPoint(g.EDraggingGripPoint.x2y2)){var ee=(0,c.calcDistance)(Q.x,Q.y,Z.x,Z.y);if(ee<this.annotationsGripsRadius*p.DpiHelper.PIXEL_RATIO)return this.adornerDraggingPoint=g.EDraggingGripPoint.x2y2,!0}return Z&&this.canDragPoint(g.EDraggingGripPoint.Body)&&this.clickToSelect(k)?(this.adornerDraggingPoint=g.EDraggingGripPoint.Body,!0):!1},L.prototype.calcDragDistance=function(k){if(!this.prevValue){this.prevValue=k;return}this.adornerDraggingPoint===g.EDraggingGripPoint.Body?(this.x1+=this.applyPixelRatioToDragDist(k.x-this.prevValue.x),this.x2+=this.applyPixelRatioToDragDist(k.x-this.prevValue.x),this.y1+=k.y-this.prevValue.y,this.y2+=k.y-this.prevValue.y):this.adornerDraggingPoint===g.EDraggingGripPoint.x1y1?this.resizeDirections===s.EXyDirection.XDirection?this.x1+=this.applyPixelRatioToDragDist(k.x-this.prevValue.x):this.resizeDirections===s.EXyDirection.YDirection?this.y1+=k.y-this.prevValue.y:(this.x1+=this.applyPixelRatioToDragDist(k.x-this.prevValue.x),this.y1+=k.y-this.prevValue.y):this.adornerDraggingPoint===g.EDraggingGripPoint.x2y2?this.resizeDirections===s.EXyDirection.XDirection?this.x2+=this.applyPixelRatioToDragDist(k.x-this.prevValue.x):this.resizeDirections===s.EXyDirection.YDirection?this.y2+=k.y-this.prevValue.y:(this.x2+=this.applyPixelRatioToDragDist(k.x-this.prevValue.x),this.y2+=k.y-this.prevValue.y):this.adornerDraggingPoint===g.EDraggingGripPoint.x2y1?this.resizeDirections===s.EXyDirection.XDirection?this.x2+=this.applyPixelRatioToDragDist(k.x-this.prevValue.x):this.resizeDirections===s.EXyDirection.YDirection?this.y1+=k.y-this.prevValue.y:(this.x2+=this.applyPixelRatioToDragDist(k.x-this.prevValue.x),this.y1+=k.y-this.prevValue.y):this.adornerDraggingPoint===g.EDraggingGripPoint.x1y2&&(this.resizeDirections===s.EXyDirection.XDirection?this.x1+=this.applyPixelRatioToDragDist(k.x-this.prevValue.x):this.resizeDirections===s.EXyDirection.YDirection?this.y2+=k.y-this.prevValue.y:(this.x1+=this.applyPixelRatioToDragDist(k.x-this.prevValue.x),this.y2+=k.y-this.prevValue.y));var D=Math.abs(this.x2-this.x1)/this.initialWidth;this.scaleOnResize&&D&&(this.scale=D),this.prevValue=k},L.prototype.onDpiChanged=function(k){w.prototype.onDpiChanged.call(this,k),this.notifyPropertyChanged(y.PROPERTY.STROKE)},L.prototype.toJSON=function(){var k=w.prototype.toJSON.call(this),D={fontFamily:this.fontFamily,fontSize:this.fontSize,textColor:this.textColor,padding:this.padding,verticalAnchorPoint:this.verticalAnchorPoint,horizontalAnchorPoint:this.horizontalAnchorPoint,wrapTo:this.wrapTo,scale:this.scale,scaleOnResize:this.scaleOnResize,multiLineAlignment:this.multiLineAlignment,lineSpacing:this.lineSpacing,background:this.background,rotation:this.rotation,text:this.text};return Object.assign(k.options,D),k},L.prototype.checkIsClickedOnAnnotationInternal=function(k,D){var j=this.getAnnotationBorders(!0),N=j.x1,V=j.x2,W=j.y1,K=j.y2;return(0,c.testIsInBounds)(k,D,N,K,V,W)},L.prototype.notifyPropertyChanged=function(k){w.prototype.notifyPropertyChanged.call(this,k);var D=[y.PROPERTY.FILL,y.PROPERTY.OPACITY];D.includes(k)&&this.background&&this.fillBrushCache&&(0,S.createBrushInCache)(this.fillBrushCache,this.background,this.opacity)},L.prototype.updateAdornerInner=function(){if(this.deleteAdorner(),this.isSelected){var k=this.getAdornerAnnotationBorders(),D=k.x1,j=k.x2,N=k.y1,V=k.y2,W=this.svgStringAdornerTemplate(D,N,j,V),K=this.applySvgClipping(W,this.adornerClipping);this.svgAdorner=v.annotationHelpers.createSvg(K,this.svgAdornerRoot)}},L.prototype.drawBackground=function(k,D,j,N,V,W){var K=(0,S.getWebGlBrushFromCache)(this.fillBrushCache);k.drawRotatedRect(D,j,N,this.padding,this.verticalAnchorPoint,this.horizontalAnchorPoint,V,this.rotation,W,K)},L.prototype.svgStringAdornerTemplate=function(k,D,j,N){var V=this.selectionBoxStroke,W=j-k,K=N-D,H=`<svg xmlns="http://www.w3.org/2000/svg">
        <rect x="`.concat(k,'" y="').concat(D,'" width="').concat(W,'" height="').concat(K,'" stroke="').concat(V,'" stroke-width="').concat(this.selectionBoxThickness,`px" fill="none" />
        `),U=this.getAdornerAnnotationBorders(!1,!0);return this.canDragPoint(g.EDraggingGripPoint.x1y1)&&(H+=this.getAnnotationGripSvg(U.x1,U.y1)),this.canDragPoint(g.EDraggingGripPoint.x2y2)&&(H+=this.getAnnotationGripSvg(U.x2,U.y2)),this.canDragPoint(g.EDraggingGripPoint.x2y1)&&(H+=this.getAnnotationGripSvg(U.x2,U.y1)),this.canDragPoint(g.EDraggingGripPoint.x1y2)&&(H+=this.getAnnotationGripSvg(U.x1,U.y2)),H+="</svg>",H},L.prototype.getAnnotationBorders=function(k,D){k===void 0&&(k=!1),D===void 0&&(D=!1);var j=w.prototype.getAnnotationBorders.call(this,k,D);return{x1:j.x1-this.padding.left,x2:j.x2+this.padding.right,y1:j.y1-this.padding.top,y2:j.y2+this.padding.bottom}},L})(b.RenderContextAnnotationBase);r.NativeTextAnnotation=A})(mI)),mI}var vm={},k5={},Ote;function ESe(){return Ote||(Ote=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EStrokeLineJoin=void 0,(function(e){e.Arcs="arcs",e.Bevel="bevel",e.Miter="miter",e.MiterClip="miter-clip",e.Round="round"})(r.EStrokeLineJoin||(r.EStrokeLineJoin={}))})(k5)),k5}var Dte;function ASe(){if(Dte)return vm;Dte=1;var r=vm&&vm.__extends||(function(){var f=function(h,p){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,v){g.__proto__=v}||function(g,v){for(var y in v)Object.prototype.hasOwnProperty.call(v,y)&&(g[y]=v[y])},f(h,p)};return function(h,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");f(h,p);function g(){this.constructor=h}h.prototype=p===null?Object.create(p):(g.prototype=p.prototype,new g)}})(),e=vm&&vm.__assign||function(){return e=Object.assign||function(f){for(var h,p=1,g=arguments.length;p<g;p++){h=arguments[p];for(var v in h)Object.prototype.hasOwnProperty.call(h,v)&&(f[v]=h[v])}return f},e.apply(this,arguments)};Object.defineProperty(vm,"__esModule",{value:!0}),vm.PolarPointerAnnotation=void 0;var i=xg(),n=ESe(),t=Ha(),o=Hi(),a=ta(),s=Ds(),l=Zs(),u=Aa(),c=ay(),d=(function(f){r(h,f);function h(p){var g=this,v,y,m,b,S,_,C,T,x,A,w,L,k,D,j,N,V,W,K,H,U,I,Q,Z,ee,ie,de,pe,_e,Te,De,Pe;return g=f.call(this,p)||this,g.type=u.EAnnotationType.SVGPolarPointerAnnotation,g.surfaceTypes=[t.ESurfaceType.SciChartPolarSurfaceType],g.isDirty=!0,g.isStrokeAboveCenterProperty=!1,g.strokeLineJoinProperty=n.EStrokeLineJoin.Miter,g.getPointerStyleProxy=function(Ee){return new Proxy(Ee,{set:function(Re,je,Ke){return Re[je]=Ke,g.isDirty=!0,g.notifyPropertyChanged("pointerStyle"),!0}})},g.getPointerCenterStyleProxy=function(Ee){return new Proxy(Ee,{set:function(Re,je,Ke){return Re[je]=Ke,g.isDirty=!0,g.notifyPropertyChanged("pointerCenterStyle"),!0}})},g.getPointerArrowStyleProxy=function(Ee){return new Proxy(Ee,{set:function(Re,je,Ke){return Re[je]=Ke,g.isDirty=!0,g.notifyPropertyChanged("pointerArrowStyle"),!0}})},g.strokeLineJoinProperty=(v=p==null?void 0:p.strokeLineJoin)!==null&&v!==void 0?v:g.strokeLineJoinProperty,g.isStrokeAboveCenterProperty=(y=p==null?void 0:p.isStrokeAboveCenter)!==null&&y!==void 0?y:g.isStrokeAboveCenterProperty,g.pointerStyleProperty=g.getPointerStyleProxy({baseSize:(b=(m=p==null?void 0:p.pointerStyle)===null||m===void 0?void 0:m.baseSize)!==null&&b!==void 0?b:.1,stroke:(_=(S=p==null?void 0:p.pointerStyle)===null||S===void 0?void 0:S.stroke)!==null&&_!==void 0?_:"black",strokeWidth:(T=(C=p==null?void 0:p.pointerStyle)===null||C===void 0?void 0:C.strokeWidth)!==null&&T!==void 0?T:3,fill:(A=(x=p==null?void 0:p.pointerStyle)===null||x===void 0?void 0:x.fill)!==null&&A!==void 0?A:"gray",backExtensionSize:(L=(w=p==null?void 0:p.pointerStyle)===null||w===void 0?void 0:w.backExtensionSize)!==null&&L!==void 0?L:0}),g.pointerCenterStyleProperty=g.getPointerCenterStyleProxy({size:(D=(k=p==null?void 0:p.pointerCenterStyle)===null||k===void 0?void 0:k.size)!==null&&D!==void 0?D:0,stroke:(N=(j=p==null?void 0:p.pointerCenterStyle)===null||j===void 0?void 0:j.stroke)!==null&&N!==void 0?N:"black",strokeWidth:(W=(V=p==null?void 0:p.pointerCenterStyle)===null||V===void 0?void 0:V.strokeWidth)!==null&&W!==void 0?W:3,fill:(H=(K=p==null?void 0:p.pointerCenterStyle)===null||K===void 0?void 0:K.fill)!==null&&H!==void 0?H:"gray"}),g.pointerArrowStyleProperty=g.getPointerArrowStyleProxy({height:(I=(U=p==null?void 0:p.pointerArrowStyle)===null||U===void 0?void 0:U.height)!==null&&I!==void 0?I:0,width:(Z=(Q=p==null?void 0:p.pointerArrowStyle)===null||Q===void 0?void 0:Q.width)!==null&&Z!==void 0?Z:0,headDepth:(ie=(ee=p==null?void 0:p.pointerArrowStyle)===null||ee===void 0?void 0:ee.headDepth)!==null&&ie!==void 0?ie:1,stroke:(pe=(de=p==null?void 0:p.pointerArrowStyle)===null||de===void 0?void 0:de.stroke)!==null&&pe!==void 0?pe:"black",strokeWidth:(Te=(_e=p==null?void 0:p.pointerArrowStyle)===null||_e===void 0?void 0:_e.strokeWidth)!==null&&Te!==void 0?Te:3,fill:(Pe=(De=p==null?void 0:p.pointerArrowStyle)===null||De===void 0?void 0:De.fill)!==null&&Pe!==void 0?Pe:"none"}),g}return Object.defineProperty(h.prototype,"pointerStyle",{get:function(){return this.pointerStyleProperty},set:function(p){var g=e(e({},this.pointerStyle),p);this.pointerStyleProperty=this.getPointerStyleProxy(g),this.isDirty=!0,this.notifyPropertyChanged("pointerStyle")},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"pointerCenterStyle",{get:function(){return this.pointerCenterStyleProperty},set:function(p){var g=e(e({},this.pointerCenterStyle),p);this.pointerCenterStyleProperty=this.getPointerCenterStyleProxy(g),this.isDirty=!0,this.notifyPropertyChanged("pointerCenterStyle")},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"pointerArrowStyle",{get:function(){return this.pointerArrowStyleProperty},set:function(p){var g=e(e({},this.pointerArrowStyle),p);this.pointerArrowStyleProperty=this.getPointerArrowStyleProxy(g),this.isDirty=!0,this.notifyPropertyChanged("pointerArrowStyle")},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"horizontalAnchorPoint",{get:function(){return i.EHorizontalAnchorPoint.Center},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"verticalAnchorPoint",{get:function(){return i.EVerticalAnchorPoint.Center},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"isStrokeAboveCenter",{get:function(){return this.isStrokeAboveCenterProperty},set:function(p){this.isStrokeAboveCenterProperty!==p&&(this.isStrokeAboveCenterProperty=p,this.isDirty=!0,this.notifyPropertyChanged("isStrokeAboveCenter"))},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"strokeLineJoin",{get:function(){return this.strokeLineJoinProperty},set:function(p){this.strokeLineJoinProperty!==p&&(this.strokeLineJoinProperty=p,this.isDirty=!0,this.notifyPropertyChanged("strokeLineJoin"))},enumerable:!1,configurable:!0}),h.prototype.getAngularAxis=function(){var p=this.xAxis,g=this.yAxis;return p.isAngular?p:g},h.prototype.getRadialAxis=function(){var p=this.xAxis,g=this.yAxis;return p.isAngular?g:p},h.prototype.getSvgString=function(p){var g=this.getAngularAxis(),v=this.getRadialAxis(),y=this.getState(),m=y.axisSize,b=y.startAngle,S=y.direction,_;this.yCoordinateMode===a.ECoordinateMode.Relative?_=this.y1*m:this.yCoordinateMode===a.ECoordinateMode.DataValue?_=v.getCurrentCoordinateCalculator().getCoordinate(this.y1)/o.DpiHelper.PIXEL_RATIO:_=this.y1;var C;this.xCoordinateMode===a.ECoordinateMode.DataValue?C=b+g.getCurrentCoordinateCalculator().getCoordinate(this.x1):C=b+S*this.x1;var T=this.parentSurface,x=s.annotationHelpers.convertPolarToCartesian(g,!0,T.webAssemblyContext2D,a.ECoordinateMode.DataValue,0,0);this.state={axisSize:m,startAngle:b,direction:S,seriesViewRect:T.seriesViewRect};var A=-(180*C)/Math.PI,w=this.pointerStyleProperty.baseSize*_,L=this.pointerCenterStyleProperty.size*_,k=this.pointerArrowStyleProperty.height*_,D=this.pointerArrowStyleProperty.width*_,j=this.getPointerStickSvg(_,w,this.pointerStyleProperty.backExtensionSize),N=this.getPointerCenterSvg(_,L),V=this.getPointerArrowSvg(_,k,D,this.pointerArrowStyleProperty.headDepth),W=this.isStrokeAboveCenterProperty?N+j+V:j+V+N,K=x.x+T.seriesViewRect.left/o.DpiHelper.PIXEL_RATIO-_,H=x.y+T.seriesViewRect.top/o.DpiHelper.PIXEL_RATIO-_,U=T.viewRect,I=U.width,Q=U.height,Z=I/o.DpiHelper.PIXEL_RATIO,ee=Q/o.DpiHelper.PIXEL_RATIO,ie='<svg height="'.concat(ee,'" width="').concat(Z,'" viewBox="0 0 ').concat(Z," ").concat(ee,`">
            <g id="pointer" style="padding:100;" transform="translate(`).concat(K," ").concat(H,") rotate(").concat(A," ").concat(_," ").concat(_,`)">
                `).concat(W,`
            </g>
        </svg>`);return ie},h.prototype.getPointerStickSvg=function(p,g,v){var y,m=p*2,b=Math.max((y=this.pointerStyle.strokeWidth)!==null&&y!==void 0?y:1.5,0);return"<path stroke-linejoin=".concat(this.strokeLineJoinProperty,`
            d="
                M`).concat(m-b," ").concat(p,`
                L`).concat(p-p*v," ").concat(p-g/2,`
                l0 `).concat(g,`
                L`).concat(m-b," ").concat(p,`Z
            " 
            fill="`).concat(this.pointerStyleProperty.fill,`"
            stroke="`).concat(this.pointerStyleProperty.stroke,`"  
            stroke-width="`).concat(this.pointerStyleProperty.strokeWidth,`"
        />`)},h.prototype.getPointerCenterSvg=function(p,g){return`<rect
            x="`.concat(p-g/2,`" 
            y="`).concat(p-g/2,`"
            width=`).concat(g,` 
            height=`).concat(g,`
            rx=`).concat(g/2,`
            ry=`).concat(g/2,`
            stroke=`).concat(this.pointerCenterStyleProperty.stroke,`
            stroke-width=`).concat(this.pointerCenterStyleProperty.strokeWidth,`
            fill=`).concat(this.pointerCenterStyleProperty.fill,`
        />`)},h.prototype.getPointerArrowSvg=function(p,g,v,y){var m,b=2*p,S=Math.max((m=this.pointerArrowStyleProperty.strokeWidth)!==null&&m!==void 0?m:1.5,0);return`<path 
            stroke="`.concat(this.pointerArrowStyleProperty.stroke,`"
            stroke-width="`).concat(this.pointerArrowStyleProperty.strokeWidth,`"
            fill="`).concat(this.pointerArrowStyleProperty.fill,`"
            stroke-linejoin=`).concat(this.strokeLineJoinProperty,`
            d="
                M`).concat(b-g/2-S," ").concat(p-v/2,`
                l`).concat(g/2," ").concat(v/2,`
                l-`).concat(g/2," ").concat(v/2,`
                `).concat(y===0?"":`
                    l`.concat((1-y)*g/2," ").concat(-v/2,`
                    l`).concat(-(1-y)*g/2," ").concat(-v/2,`Z
                `),`
            " 
        />`)},h.prototype.notifyPropertyChanged=function(p){(p===l.PROPERTY.X_COORDINATE_MODE||p===l.PROPERTY.Y_COORDINATE_MODE||p===l.PROPERTY.X1||p===l.PROPERTY.Y1)&&(this.isDirty=!0),f.prototype.notifyPropertyChanged.call(this,p)},h.prototype.toJSON=function(){var p=f.prototype.toJSON.call(this),g={isStrokeAboveCenter:this.isStrokeAboveCenter,pointerArrowStyle:this.pointerArrowStyle,pointerCenterStyle:this.pointerCenterStyle,pointerStyle:this.pointerStyle,strokeLineJoin:this.strokeLineJoin};return Object.assign(p.options,g),p},h.prototype.getX1Coordinate=function(p,g){return 0},h.prototype.getY1Coordinate=function(p,g){return 0},h.prototype.getState=function(){var p=this.getAngularAxis(),g=this.getRadialAxis(),v=g.getAxisSize(),y=p.flippedCoordinates?-1:1,m=p.startAngle,b=this.parentSurface.seriesViewRect;return{axisSize:v,startAngle:m,direction:y,seriesViewRect:b}},h.prototype.create=function(p,g,v,y){var m=this.getState(),b=m.axisSize,S=m.startAngle,_=m.direction,C=m.seriesViewRect;if((!this.state||b!==this.state.axisSize||S!==this.state.startAngle||_!==this.state.direction||C!==this.state.seriesViewRect)&&(this.isDirty=!0),this.svg&&!this.isEditable&&!this.isDirty){this.calcAndSetAnnotationBorders(p,g);return}if(this.isDirty||!this.svg||this.svg&&this.isSelected){this.svg&&this.clear();var T=s.annotationHelpers.createSvg(this.getSvgString(this),this.svgRoot,this.nextSibling);this.setSvg(T),this.calcAndSetAnnotationBorders(p,g),this.updateAdornerInner(),this.prevIsSelected=this.isSelected,this.isDirty=!1}else this.calcAndSetAnnotationBorders(p,g);this.prevIsSelected!==this.isSelected&&this.svg&&this.isEditable&&(this.updateAdornerInner(),this.prevIsSelected=this.isSelected)},h})(c.SvgAnnotationBase);return vm.PolarPointerAnnotation=d,vm}var FC={},Rte;function wSe(){if(Rte)return FC;Rte=1;var r=FC&&FC.__extends||(function(){var u=function(c,d){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,h){f.__proto__=h}||function(f,h){for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(f[p]=h[p])},u(c,d)};return function(c,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");u(c,d);function f(){this.constructor=c}c.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}})();Object.defineProperty(FC,"__esModule",{value:!0}),FC.TextAnnotation=void 0;var e=Yo(),i=Ha(),n=Vd(),t=Ds(),o=Zs(),a=Aa(),s=ay(),l=(function(u){r(c,u);function c(d){var f=this,h,p,g,v,y,m,b,S;return f=u.call(this,d)||this,f.type=a.EAnnotationType.SVGTextAnnotation,f.surfaceTypes=[i.ESurfaceType.SciChartSurfaceType,i.ESurfaceType.SciChartPolarSurfaceType],f.textProperty="DEFAULT TEXT",f.textColorProperty="#ffffff",f.fontSizeProperty=14,f.fontFamilyProperty=(0,n.getDefaultFontName)(),f.fontWeightProperty="Normal",f.paddingProperty=e.Thickness.fromNumber(0),f.classNameProperty="scichart__text-annotation",f.isDirty=!0,f.textProperty=(h=d==null?void 0:d.text)!==null&&h!==void 0?h:f.textProperty,f.textColorProperty=(p=d==null?void 0:d.textColor)!==null&&p!==void 0?p:f.textColorProperty,f.fontSizeProperty=(g=d==null?void 0:d.fontSize)!==null&&g!==void 0?g:f.fontSizeProperty,f.fontFamilyProperty=(v=d==null?void 0:d.fontFamily)!==null&&v!==void 0?v:f.fontFamilyProperty,f.backgroundProperty=(y=d==null?void 0:d.background)!==null&&y!==void 0?y:f.backgroundProperty,f.paddingProperty=(m=d==null?void 0:d.padding)!==null&&m!==void 0?m:f.paddingProperty,f.classNameProperty=(b=d==null?void 0:d.className)!==null&&b!==void 0?b:f.classNameProperty,f.fontWeight=(S=d==null?void 0:d.fontWeight)!==null&&S!==void 0?S:f.fontWeight,f}return Object.defineProperty(c.prototype,"text",{get:function(){return this.textProperty},set:function(d){this.textProperty!==d&&(this.textProperty=d,this.notifyPropertyChanged(o.PROPERTY.TEXT))},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"background",{get:function(){return this.backgroundProperty},set:function(d){this.backgroundProperty!==d&&(this.backgroundProperty=d,this.notifyPropertyChanged(o.PROPERTY.BACKGROUND_COLOR))},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"padding",{get:function(){return this.paddingProperty},set:function(d){this.paddingProperty!==d&&(this.paddingProperty=d,this.notifyPropertyChanged(o.PROPERTY.PADDING))},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"className",{get:function(){return this.classNameProperty},set:function(d){this.classNameProperty!==d&&(this.classNameProperty=d,this.notifyPropertyChanged(o.PROPERTY.CLASS_NAME))},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"textColor",{get:function(){return this.textColorProperty},set:function(d){this.textColorProperty!==d&&(this.textColorProperty=d,this.notifyPropertyChanged(o.PROPERTY.TEXT_STROKE))},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"fontSize",{get:function(){return this.fontSizeProperty},set:function(d){this.fontSizeProperty!==d&&(this.fontSizeProperty=d,this.notifyPropertyChanged(o.PROPERTY.FONT_SIZE))},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"fontFamily",{get:function(){return this.fontFamilyProperty},set:function(d){this.fontFamilyProperty!==d&&(this.fontFamilyProperty=d,this.notifyPropertyChanged(o.PROPERTY.FONT_FAMILY))},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"fontWeight",{get:function(){return this.fontWeightProperty},set:function(d){this.fontWeightProperty!==d&&(this.fontWeightProperty=d,this.notifyPropertyChanged(o.PROPERTY.FONT_WEIGHT))},enumerable:!1,configurable:!0}),c.prototype.toJSON=function(){var d=u.prototype.toJSON.call(this),f={fontFamily:this.fontFamily,fontSize:this.fontSize,fontWeight:this.fontWeight,text:this.text,textColor:this.textColor,background:this.background,className:this.className,padding:this.padding};return Object.assign(d.options,f),d},c.prototype.notifyPropertyChanged=function(d){d!==o.PROPERTY.IS_HIDDEN&&d!==o.PROPERTY.X_COORD_SHIFT&&d!==o.PROPERTY.Y_COORD_SHIFT&&d!==o.PROPERTY.HORIZONTAL_ANCHOR_POINT&&d!==o.PROPERTY.VERTICAL_ANCHOR_POINT&&d!==o.PROPERTY.X1&&d!==o.PROPERTY.X2&&d!==o.PROPERTY.Y1&&d!==o.PROPERTY.Y2&&(this.isDirty=!0),this.invalidateParentCallback&&this.invalidateParentCallback({svgOnly:!this.reDrawChartOnChange})},c.prototype.create=function(d,f,h,p){if(this.svg&&!this.isDirty){this.calcAndSetAnnotationBorders(d,f),(this.isSelected||this.prevIsSelected!==this.isSelected)&&(this.updateAdornerInner(),this.prevIsSelected=this.isSelected);return}this.svg&&this.clear(),this.setSvg(this.createSvg()),this.calcAndSetAnnotationBorders(d,f),this.updateAdornerInner(),this.isDirty=!1},c.prototype.createSvg=function(){var d=this.padding.left,f=this.fontSize+this.padding.top,h=(0,n.getFontFamily)(this.fontFamily,!1),p='<svg id="scichart__text-annotation-'.concat(this.id,'" class="').concat(this.className,`">
            <text x="`).concat(d,'" y="').concat(f,'" fill="').concat(this.textColor,'"  font-size="').concat(this.fontSize,'" font-family="').concat(h,'" font-weight="').concat(this.fontWeight,'">').concat(this.text,`</text>
        </svg>`),g=this.applyClipping(p,this.clipping),v=t.annotationHelpers.createSvg(g,this.svgRoot,this.nextSibling);return this.background&&this.attachSvgBackgroundRect(v,this.background,this.padding),v},c.prototype.getSize=function(){var d=u.prototype.getSize.call(this);return d&&!this.background?{width:d.width+this.padding.left+this.padding.right,height:d.height+this.padding.top+this.padding.bottom}:d},c.prototype.attachSvgBackgroundRect=function(d,f,h){var p=d.getBBox(),g=p.width+h.left+h.right,v=p.height+h.top+h.bottom,y="http://www.w3.org/2000/svg",m=document.createElementNS(y,"rect");m.setAttribute("x","0"),m.setAttribute("y","0"),m.setAttribute("width","".concat(g)),m.setAttribute("height","".concat(v)),m.setAttribute("fill","".concat(f)),d.firstChild.insertBefore(m,d.firstChild.firstChild)},c})(s.SvgAnnotationBase);return FC.TextAnnotation=l,FC}var ym={},Mte;function OSe(){if(Mte)return ym;Mte=1;var r=ym&&ym.__extends||(function(){var y=function(m,b){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,_){S.__proto__=_}||function(S,_){for(var C in _)Object.prototype.hasOwnProperty.call(_,C)&&(S[C]=_[C])},y(m,b)};return function(m,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");y(m,b);function S(){this.constructor=m}m.prototype=b===null?Object.create(b):(S.prototype=b.prototype,new S)}})(),e=ym&&ym.__assign||function(){return e=Object.assign||function(y){for(var m,b=1,S=arguments.length;b<S;b++){m=arguments[b];for(var _ in m)Object.prototype.hasOwnProperty.call(m,_)&&(y[_]=m[_])}return y},e.apply(this,arguments)};Object.defineProperty(ym,"__esModule",{value:!0}),ym.VerticalLineAnnotation=void 0;var i=ni(),n=Ii(),t=vn(),o=Yo(),a=cc(),s=Ha(),l=oo(),u=pn(),c=ts(),d=ug(),f=Hi(),h=ta(),p=Aa(),g=t_(),v=(function(y){r(m,y);function m(b){var S=this,_,C,T;return S=y.call(this,b)||this,S.type=p.EAnnotationType.RenderContextVerticalLineAnnotation,S.surfaceTypes=[s.ESurfaceType.SciChartSurfaceType],S.dragOnLine=!0,S.dragOnLabel=!0,b!=null&&b.x2&&(S.x2=b.x2),b!=null&&b.y2&&(S.y2=b.y2),S.dragOnLine=(_=b==null?void 0:b.dragOnLine)!==null&&_!==void 0?_:S.dragOnLine,S.dragOnLabel=(C=b==null?void 0:b.dragOnLabel)!==null&&C!==void 0?C:S.dragOnLabel,S.verticalAlignment=(T=b==null?void 0:b.verticalAlignment)!==null&&T!==void 0?T:S.verticalAlignment,S}return Object.defineProperty(m.prototype,"y2",{get:function(){throw Error("y2 property is not supported for VerticalLineAnnotation")},set:function(b){throw Error("y2 property is not supported for VerticalLineAnnotation")},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"x2",{get:function(){throw Error("x2 property is not supported for VerticalLineAnnotation")},set:function(b){throw Error("x2 property is not supported for VerticalLineAnnotation")},enumerable:!1,configurable:!0}),m.prototype.drawWithContext=function(b,S,_,C,T,x){i.Guard.notNull(b,"renderContext"),i.Guard.notNull(S,"xCalc"),i.Guard.notNull(_,"yCalc");var A=(0,c.getWebGlPenFromCache)(this.strokePenCache),w=this.getDrawConfig(S,_),L=w.annotationCoord,k=w.lineAnnotationEdgeCoord,D=w.horizontalAxis,j=w.verticalAxis,N=w.horizontalAxisCoordinateMode,V=w.verticalAxisCoordinateMode,W=w.horizontalCoordinateCalculator,K=w.verticalCoordinateCalculator,H=w.isAlignmentTop;if(!(!D||!j)){var U=C.height,I=0;H&&(U=U=0,I=I=C.height);var Q=this.getValue(k,K,V),Z=Q||Q===0;Z&&(I=I=this.getY1Coordinate(S,_));var ee=this.getX1Coordinate(S,_),ie=ee;this.setAnnotationBorders(ee,ie,U,I);var de=this.getCoordinate(k,K,V),pe=this.getCoordinate(L,W,N),_e=pe>=0&&pe<=D.parentSurface.seriesViewRect.width,Te=H?de>=0:de<=j.parentSurface.seriesViewRect.height,De=!Z||Te;if(_e&&De){var Pe=e(e({},j.labelStyle),{padding:new o.Thickness(2,2,2,2),color:this.axisLabelStroke,fontSize:this.axisFontSize*f.DpiHelper.PIXEL_RATIO,fontFamily:this.axisFontFamily}),Ee=(0,d.drawLineAnnotation)(D,b,this.labelPlacement,this.labelValue,ee,ie,U,I,Pe,this.axisLabelFill,A,C,this.showLabel,this.opacity,null,this.verticalAlignment);if(Ee){var Re=(0,u.translateFromCanvasToSeriesViewRect)(new n.Point(Ee.left,Ee.top),C,!0),je=(0,u.translateFromCanvasToSeriesViewRect)(new n.Point(Ee.right,Ee.bottom),C,!0);this.labelRect=t.Rect.createWithPoints(Re,je)}}this.dragOnLine&&this.updateAdornerInner()}},m.prototype.onDragStarted=function(b){return this.dragOnLine?y.prototype.onDragStarted.call(this,b):this.dragOnLabel&&this.labelRect&&this.clickToSelect(b)?(this.adornerDraggingPoint=h.EDraggingGripPoint.Body,!0):!1},m.prototype.toJSON=function(){var b=y.prototype.toJSON.call(this),S={dragOnLabel:this.dragOnLabel,dragOnLine:this.dragOnLine,horizontalAlignment:void 0,verticalAlignment:this.verticalAlignment};return Object.assign(b.options,S),b},m.prototype.checkIsClickedOnAnnotationInternal=function(b,S){if(this.dragOnLine&&y.prototype.checkIsClickedOnAnnotationInternal.call(this,b,S))return!0;if(this.dragOnLabel&&this.labelRect){var _=this.labelRect,C=_.left,T=_.top,x=_.right,A=_.bottom;if((0,l.testIsInBounds)(b,S,C,A,x,T))return!0}return!1},m.prototype.getDrawConfig=function(b,S){var _=this.xAxis,C=this.yAxis,T={annotationCoord:this.x1,lineAnnotationEdgeCoord:this.y1,horizontalAxis:_,verticalAxis:C,horizontalAxisCoordinateMode:this.xCoordinateMode,verticalAxisCoordinateMode:this.yCoordinateMode,horizontalCoordinateCalculator:b,verticalCoordinateCalculator:S,isAlignmentTop:(_==null?void 0:_.axisAlignment)===a.EAxisAlignment.Top},x={annotationCoord:this.y1,lineAnnotationEdgeCoord:this.x1,horizontalAxis:C,verticalAxis:_,horizontalAxisCoordinateMode:this.yCoordinateMode,verticalAxisCoordinateMode:this.xCoordinateMode,horizontalCoordinateCalculator:S,verticalCoordinateCalculator:b,isAlignmentTop:(C==null?void 0:C.axisAlignment)===a.EAxisAlignment.Top};return this.isVerticalChart?x:T},m})(g.LineAnnotation);return ym.VerticalLineAnnotation=v,ym}var I5={},jC={},BC={},N5={},Lte;function gc(){return Lte||(Lte=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EAxisType=void 0,(function(e){e.CategoryAxis="CategoryAxis",e.NumericAxis="NumericAxis",e.LogarithmicAxis="LogarithmicAxis",e.NumericAxis3D="NumericAxis3D",e.DateTimeNumericAxis="DateTimeNumericAxis",e.PolarNumericAxis="PolarNumericAxis",e.PolarCategoryAxis="PolarCategoryAxis",e.BaseValueAxis="BaseValueAxis",e.DiscontinuousDateAxis="DiscontinuousDateAxis"})(r.EAxisType||(r.EAxisType={}))})(N5)),N5}var VC={},HC={},UC={},kte;function r_(){if(kte)return UC;kte=1;var r=UC&&UC.__extends||(function(){var t=function(o,a){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");t(o,a);function s(){this.constructor=o}o.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}})();Object.defineProperty(UC,"__esModule",{value:!0}),UC.CoordinateCalculatorBase=void 0;var e=$n(),i=oi(),n=(function(t){r(o,t);function o(a,s,l,u,c,d,f){f===void 0&&(f=!1);var h=t.call(this)||this;return h.webAssemblyContext=a,h.visibleMax=u,h.visibleMin=l,h.viewportDimension=s,h.offset=c,h.hasFlippedCoordinates=d,h.isCategoryCoordinateCalculator=f,h}return o.prototype.getCoordinate=function(a){return this.nativeCalculator.GetCoordinate(a)},o.prototype.getDataValue=function(a){return this.nativeCalculator.GetDataValue(a)},o.prototype.translateBy=function(a,s){var l=this.getDataValue(a)-this.getDataValue(0);return this.hasFlippedCoordinates&&(l=-l),new i.NumberRange(s.min+l,s.max+l)},o.prototype.zoomTranslateBy=function(a,s,l){return l.growBy(new i.NumberRange(a,s))},o.prototype.getDataWidth=function(a){return Math.abs(this.getDataValue(a)-this.getDataValue(0))},o.prototype.getCoordWidth=function(a){return Math.abs(this.getCoordinate(a)-this.getCoordinate(0))},Object.defineProperty(o.prototype,"isFlipped",{get:function(){return this.nativeCalculator.IsFlipped()},enumerable:!1,configurable:!0}),o.prototype.delete=function(){var a;(a=this.nativeCalculator)===null||a===void 0||a.delete(),this.nativeCalculator=void 0,this.webAssemblyContext=void 0},o})(e.DeletableEntity);return UC.CoordinateCalculatorBase=n,UC}var Ite;function DSe(){if(Ite)return HC;Ite=1;var r=HC&&HC.__extends||(function(){var n=function(t,o){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(a[l]=s[l])},n(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");n(t,o);function a(){this.constructor=t}t.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}})();Object.defineProperty(HC,"__esModule",{value:!0}),HC.CategoryCoordinateCalculator=void 0;var e=r_(),i=(function(n){r(t,n);function t(o,a,s,l,u){u===void 0&&(u=0);var c=n.call(this,o,a,s,l,u,!0,!0)||this;return c.indexMin=s,c.indexMax=l,c.nativeCalculator=new o.CategoryCoordinateCalculatorDouble(c.viewportDimension,c.visibleMin,c.visibleMax,-1,c.offset,c.indexMin,c.indexMax),c}return t.prototype.transformIndexToData=function(o){var a=this.nativeCalculator.TransformIndexToData(o,this.baseXValues);return a},t.prototype.transformDataToIndex=function(o){var a=this.nativeCalculator.TransformDataToIndex(o,this.baseXValues);return a},t})(e.CoordinateCalculatorBase);return HC.CategoryCoordinateCalculator=i,HC}var zC={},Nte;function RSe(){if(Nte)return zC;Nte=1;var r=zC&&zC.__extends||(function(){var n=function(t,o){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(a[l]=s[l])},n(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");n(t,o);function a(){this.constructor=t}t.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}})();Object.defineProperty(zC,"__esModule",{value:!0}),zC.FlippedCategoryCoordinateCalculator=void 0;var e=r_(),i=(function(n){r(t,n);function t(o,a,s,l,u){u===void 0&&(u=0);var c=n.call(this,o,a,s,l,u,!1,!0)||this;return c.indexMin=s,c.indexMax=l,c.nativeCalculator=new o.FlippedCategoryCoordinateCalculatorDouble(c.viewportDimension,c.visibleMin,c.visibleMax,-1,c.offset,c.indexMin,c.indexMax),c}return t.prototype.transformIndexToData=function(o){var a=this.nativeCalculator.TransformIndexToData(o,this.baseXValues);return a},t.prototype.transformDataToIndex=function(o){var a=this.nativeCalculator.TransformDataToIndex(o,this.baseXValues);return a},t})(e.CoordinateCalculatorBase);return zC.FlippedCategoryCoordinateCalculator=i,zC}var WC={},bI={},Fte;function JH(){if(Fte)return bI;Fte=1,Object.defineProperty(bI,"__esModule",{value:!0}),bI.TickProvider=void 0;var r=(function(){function e(){}return e.prototype.attachedToAxis=function(i){this.parentAxis=i},e.prototype.detachedFromAxis=function(){this.parentAxis=void 0},e})();return bI.TickProvider=r,bI}var jte;function U1(){if(jte)return WC;jte=1;var r=WC&&WC.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(u[d]=c[d])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})();Object.defineProperty(WC,"__esModule",{value:!0}),WC.NumericTickProvider=void 0;var e=ni(),i=oi(),n=Oh(),t=JH(),o=(function(a){r(s,a);function s(l){var u=a.call(this)||this;return u.minDeltaValue=1e-13,u.webAssemblyContext=l,u}return s.prototype.getMinorTicks=function(l,u,c){var d=new i.NumberRange(l,u),f=c;return this.isParamsValid(f,d)?this.calculateTicks(f,d.min,d.max):[]},s.prototype.getMajorTicks=function(l,u,c){var d=new i.NumberRange(l,u),f=c;return this.isParamsValid(f,d)?this.calculateTicks(f,d.max,d.max):[]},s.prototype.isParamsValid=function(l,u){return e.Guard.notNull(l,"visibleRange"),e.Guard.notNull(u,"deltaRange"),(0,n.isRealNumber)(l.min)&&(0,n.isRealNumber)(l.max)&&u.min>0&&u.max>0},s.prototype.calculateTicks=function(l,u,c){for(var d=[],f=l.min,h=l.max,p=u===c,g=this.webAssemblyContext.NumberUtil,v=g.RoundUp(f,u),y=v,m=0;v<=h;)g.IsDivisibleBy(v,c)===p&&d.push(v),v=y+ ++m*u;return d},s})(t.TickProvider);return WC.NumericTickProvider=o,WC}var GC={},SI={},_I={},Bte;function JF(){if(Bte)return _I;Bte=1,Object.defineProperty(_I,"__esModule",{value:!0}),_I.GenericAnimation=void 0;var r=ws(),e=ES(),i=hc(),n=(function(){function t(o){var a,s,l,u;this.delay=0,this.duration=1e3,this.ease=i.easing.linear,this.id=(a=o==null?void 0:o.id)!==null&&a!==void 0?a:(0,r.generateGuid)(),this.delay=(s=o==null?void 0:o.delay)!==null&&s!==void 0?s:this.delay,this.duration=(l=o==null?void 0:o.duration)!==null&&l!==void 0?l:this.duration,o!=null&&o.ease&&typeof o.ease=="string"&&(o.ease=i.easing[o.ease]),this.ease=(u=o==null?void 0:o.ease)!==null&&u!==void 0?u:this.ease,this.from=o.from,this.to=o.to,this.onAnimate=o.onAnimate,this.onCompleted=o==null?void 0:o.onCompleted,this.animationFSM=new e.AnimationFiniteStateMachine(this),o!=null&&o.setInitialValueImmediately&&this.onAnimate(this.from,this.to,0)}return Object.defineProperty(t.prototype,"isComplete",{get:function(){return this.animationFSM.is([e.EAnimationState.Completed])},enumerable:!1,configurable:!0}),t.prototype.reset=function(){this.animationFSM=new e.AnimationFiniteStateMachine(this)},t.prototype.update=function(o){var a=this.animationFSM.update(o);[e.EAnimationStateTransition.InitialState_Running,e.EAnimationStateTransition.Delayed_Running].includes(a)&&this.onAnimate(this.from,this.to,0),this.animationFSM.is([e.EAnimationState.Running,e.EAnimationState.Completed])&&this.onAnimate(this.from,this.to,this.animationFSM.animationProgress),[e.EAnimationStateTransition.Running_Completed,e.EAnimationStateTransition.InitialState_Completed].includes(a)&&this.onCompleted&&this.onCompleted()},t.prototype.cancel=function(){this.animationFSM.toCompleted()},t})();return _I.GenericAnimation=n,_I}var Vte;function QF(){if(Vte)return SI;Vte=1,Object.defineProperty(SI,"__esModule",{value:!0}),SI.NumberRangeAnimator=void 0;var r=ni(),e=oi(),i=hc(),n=JF(),t=(function(){function o(){}return o.animate=function(a,s,l,u,c,d,f){d===void 0&&(d=i.easing.outExpo),f===void 0&&(f=!1);var h=new n.GenericAnimation({from:a,to:s,duration:l,onAnimate:function(p,g,v){var y=f?o.interpolateLog:o.interpolate,m=y(p,g,v);u(m)},delay:0,ease:d,onCompleted:c});return h},o.interpolate=function(a,s,l){r.Guard.notNull(a,"from"),r.Guard.notNull(s,"to");var u=(s.min-a.min)*l+a.min,c=(s.max-a.max)*l+a.max,d=new e.NumberRange(u,c);return d},o.interpolateLog=function(a,s,l){r.Guard.notNull(a,"from"),r.Guard.notNull(s,"to");var u=Math.pow(s.min/a.min,l)*a.min,c=Math.pow(s.max/a.max,l)*a.max,d=new e.NumberRange(u,c);return d},o})();return SI.NumberRangeAnimator=t,SI}var YC={},PI={},Hte;function S8(){if(Hte)return PI;Hte=1,Object.defineProperty(PI,"__esModule",{value:!0}),PI.TickCoordinatesProvider=void 0;var r=(function(){function e(){}return e.prototype.attachedToAxis=function(i){this.parentAxis=i},e.prototype.detachedFromAxis=function(){this.parentAxis=void 0},e})();return PI.TickCoordinatesProvider=r,PI}var Ute;function _8(){if(Ute)return YC;Ute=1;var r=YC&&YC.__extends||(function(){var n=function(t,o){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(a[l]=s[l])},n(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");n(t,o);function a(){this.constructor=t}t.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}})();Object.defineProperty(YC,"__esModule",{value:!0}),YC.DefaultTickCoordinatesProvider=void 0;var e=S8(),i=(function(n){r(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.getTickCoordinates=function(o,a){if(o===void 0)return{majorTickCoords:void 0,minorTickCoords:void 0,majorTickOverrides:void 0,minorTickOverRides:void 0};var s=this.parentAxis.getCurrentCoordinateCalculator(),l=o.map(function(c){return Math.round(s.getCoordinate(c))+.5}),u=a.map(function(c){return Math.round(s.getCoordinate(c))+.5});return{majorTickCoords:l,minorTickCoords:u,majorTickOverrides:o,minorTickOverRides:a}},t})(e.TickCoordinatesProvider);return YC.DefaultTickCoordinatesProvider=i,YC}var $C={},zte;function MSe(){if(zte)return $C;zte=1;var r=$C&&$C.__extends||(function(){var n=function(t,o){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(a[l]=s[l])},n(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");n(t,o);function a(){this.constructor=t}t.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}})();Object.defineProperty($C,"__esModule",{value:!0}),$C.StaticTickCoordinatesProvider=void 0;var e=_8(),i=(function(n){r(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.getTickCoordinates=function(o,a){var s=!this.parentAxis.visibleRange.equals(this.prevRange),l=this.parentAxis.getAxisSize()!==this.prevSize,u=this.parentAxis.getCurrentCoordinateCalculator(),c,d;if(this.tickCoords===void 0||l){if(o===void 0)return{majorTickCoords:void 0,minorTickCoords:void 0,majorTickOverrides:void 0,minorTickOverRides:void 0};var f=o.map(function(p){return u.getCoordinate(p)}),h=a.map(function(p){return u.getCoordinate(p)});this.tickCoords={majorTickCoords:f,minorTickCoords:h,majorTicks:o,minorTicks:a,majorTickLabels:void 0}}else s?(this.OverrideTickValues(this.tickCoords),c=this.tickCoords.majorTicks,d=this.tickCoords.minorTicks):this.OverrideTickCoordinates(this.tickCoords);return this.prevRange=this.parentAxis.visibleRange,this.prevSize=this.parentAxis.getAxisSize(),{majorTickCoords:this.tickCoords.majorTickCoords.map(function(p){return Math.round(p+.5)}),minorTickCoords:this.tickCoords.minorTickCoords.map(function(p){return Math.round(p+.5)}),majorTickOverrides:c,minorTickOverRides:d}},t.prototype.forceRecalculateCoords=function(){this.tickCoords=void 0},t.prototype.OverrideTickValues=function(o){var a=this.parentAxis.getCurrentCoordinateCalculator();a!=null&&(o.minorTickCoords.forEach(function(s,l){return o.minorTicks[l]=a.getDataValue(s)}),o.majorTickCoords.forEach(function(s,l){return o.majorTicks[l]=a.getDataValue(s)}))},t.prototype.OverrideTickCoordinates=function(o){var a=this.parentAxis.getCurrentCoordinateCalculator();a!=null&&a!=null&&(o.minorTicks.forEach(function(s,l){return o.minorTickCoords[l]=a.getCoordinate(s)}),o.majorTicks.forEach(function(s,l){return o.majorTickCoords[l]=a.getCoordinate(s)}))},t})(e.DefaultTickCoordinatesProvider);return $C.StaticTickCoordinatesProvider=i,$C}var mm={},F5={},Wte;function QH(){return Wte||(Wte=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.PROPERTY=void 0,(function(e){e.ALLOW_FAST_MATH="ALLOW_FAST_MATH",e.AUTO_RANGE="AUTO_RANGE",e.AUTO_TICKS="AUTO_TICKS",e.AXIS_ALIGNMENT="AXIS_ALIGNMENT",e.AXIS_BANDS_FILL="AXIS_BANDS_FILL",e.AXIS_TITLE="AXIS_TITLE",e.AXIS_LENGTH="AXIS_LENGTH",e.AXIS_THICKNESS="AXIS_THICKNESS",e.BORDER="BORDER",e.CURSOR_TEXT_FORMATTING="CURSOR_TEXT_FORMATTING",e.DELTA_CALCULATOR="DELTA_CALCULATOR",e.TICK_COORDINATES_CALCULATOR="TICK_COORDINATES_CALCULATOR",e.DRAW_MAJOR_GRID_LINES="DRAW_MAJOR_GRID_LINES",e.DRAW_MINOR_GRID_LINES="DRAW_MINOR_GRID_LINES",e.DRAW_MAJOR_TICK_LINES="DRAW_MAJOR_TICK_LINES",e.DRAW_MINOR_TICK_LINES="DRAW_MINOR_TICK_LINES",e.DRAW_MAJOR_BANDS="DRAW_MAJOR_BANDS",e.DRAW_LABELS="DRAW_LABELS",e.FLIPPED_COORDINATES="FLIPPED_COORDINATES",e.GROW_BY="GROW_BY",e.ID="ID",e.IS_AXIS_FLIPPED="IS_AXIS_FLIPPED",e.IS_NEGATIVE="IS_NEGATIVE",e.IS_INNER_AXIS="IS_INNER_AXIS",e.IS_PRIMARY_AXIS="IS_PRIMARY_AXIS",e.IS_VISIBLE="IS_VISIBLE",e.IS_XAXIS="IS_XAXIS",e.LABEL_PROVIDER="LABEL_PROVIDER",e.AXIS_RENDERER="LABEL_PROVIDER",e.LOG_BASE="LOG_BASE",e.MAJOR_DELTA="MAJOR_DELTA",e.MAJOR_GRID_LINE_STYLE="MAJOR_GRID_LINE_STYLE",e.MAJOR_TICK_LINE_STYLE="MAJOR_TICK_LINE_STYLE",e.MAX_AUTO_TICKS="MAX_AUTO_TICKS",e.MINOR_DELTA="MINOR_DELTA",e.MINOR_GRID_LINE_STYLE="MINOR_GRID_LINE_STYLE",e.MINOR_TICK_LINE_STYLE="MINOR_TICK_LINE_STYLE",e.MINORS_PER_MAJOR="MINORS_PER_MAJOR",e.OFFSET="OFFSET",e.TEXT_FORMATTING="TEXT_FORMATTING",e.TEXT_STYLE="TEXT_STYLE",e.TICK_TEXT_BRUSH="TICK_TEXT_BRUSH",e.VISIBLE_RANGE="VISIBLE_RANGE",e.VISIBLE_RANGE_LIMIT="VISIBLE_RANGE_LIMIT",e.VISIBLE_RANGE_SIZE_LIMIT="VISIBLE_RANGE_SIZE_LIMIT",e.TICK_PROVIDER="TICK_PROVIDER",e.VIEW_RECT="VIEW_RECT",e.ZOOMEXTENTS_RANGE="ZOOMEXTENTS_RANGE",e.DRAW_ONLY_WITHIN_XRANGE="DRAW_ONLY_WITHIN_XRANGE",e.HIGH_PRECISION_TICKS="HIGH_PRECISION_TICKS"})(r.PROPERTY||(r.PROPERTY={}))})(F5)),F5}var CI={},Gte;function LSe(){if(Gte)return CI;Gte=1,Object.defineProperty(CI,"__esModule",{value:!0}),CI.VisibleRangeChangedArgs=void 0;var r=(function(){function e(i){this.visibleRange=i}return e})();return CI.VisibleRangeChangedArgs=r,CI}var Yte;function P8(){if(Yte)return mm;Yte=1;var r=mm&&mm.__extends||(function(){var m=function(b,S){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,C){_.__proto__=C}||function(_,C){for(var T in C)Object.prototype.hasOwnProperty.call(C,T)&&(_[T]=C[T])},m(b,S)};return function(b,S){if(typeof S!="function"&&S!==null)throw new TypeError("Class extends value "+String(S)+" is not a constructor or null");m(b,S);function _(){this.constructor=b}b.prototype=S===null?Object.create(S):(_.prototype=S.prototype,new _)}})(),e=mm&&mm.__assign||function(){return e=Object.assign||function(m){for(var b,S=1,_=arguments.length;S<_;S++){b=arguments[S];for(var C in b)Object.prototype.hasOwnProperty.call(b,C)&&(m[C]=b[C])}return m},e.apply(this,arguments)};Object.defineProperty(mm,"__esModule",{value:!0}),mm.AxisCore=void 0;var i=$n(),n=Mr(),t=Ba(),o=ni(),a=oi(),s=Yo(),l=j1(),u=MM(),c=Vd(),d=ws(),f=Oh(),h=ln(),p=Hi(),g=QH(),v=LSe(),y=(function(m){r(b,m);function b(S){var _=this,C,T,x,A,w,L,k,D,j,N,V,W,K,H,U,I,Q,Z,ee;return _=m.call(this)||this,_.visibleRangeChanged=new t.EventHandler,_.isMeasured=!1,_.ZeroRangeGrowBy=.01,_.isXAxisProperty=!0,_.minorsPerMajorProperty=5,_.drawMajorGridLinesProperty=!0,_.drawMinorGridLinesProperty=!0,_.drawMajorTickLinesProperty=!0,_.drawMinorTickLinesProperty=!0,_.drawMajorBandsProperty=!0,_.drawLabelsProperty=!0,_.flippedCoordinatesProperty=!1,_.tickTextBrushProperty=h.SciChartSurfaceBase.DEFAULT_THEME.tickTextBrush,_.axisBandsFillProperty=h.SciChartSurfaceBase.DEFAULT_THEME.axisBandsFill,_.autoRangeProperty=l.EAutoRange.Once,_.majorTickLineStyleProperty={tickSize:5,strokeThickness:1,color:h.SciChartSurfaceBase.DEFAULT_THEME.majorGridLineBrush},_.minorTickLineStyleProperty={tickSize:3,strokeThickness:1,color:h.SciChartSurfaceBase.DEFAULT_THEME.minorGridLineBrush},_.majorGridLineStyleProperty={strokeThickness:1,color:h.SciChartSurfaceBase.DEFAULT_THEME.majorGridLineBrush,strokeDashArray:void 0},_.minorGridLineStyleProperty={strokeThickness:1,color:h.SciChartSurfaceBase.DEFAULT_THEME.minorGridLineBrush,strokeDashArray:void 0},_.axisTitleStyleProperty={fontSize:24,fontFamily:(0,c.getDefaultFontName)(),color:h.SciChartSurfaceBase.DEFAULT_THEME.axisTitleColor,fontStyle:"normal",fontWeight:"normal",padding:s.Thickness.fromNumber(6),alignment:u.ELabelAlignment.Center},_.isVisibleProperty=!0,_.autoTicksProperty=!0,_.maxAutoTicksProperty=10,_.defaultVisibleRange=new a.NumberRange(0,10),_.allowFastMathProperty=!1,_.hasVisibleRangeSet=!1,_.visibleRange=a.NumberRange.hydrate(S==null?void 0:S.visibleRange)||_.defaultVisibleRange,S!=null&&S.visibleRange||(_.hasVisibleRangeSet=!1),_.id=(C=S==null?void 0:S.id)!==null&&C!==void 0?C:(0,d.generateGuid)(),_.growBy=(T=a.NumberRange.hydrate(S==null?void 0:S.growBy))!==null&&T!==void 0?T:_.growBy,_.autoRange=(x=S==null?void 0:S.autoRange)!==null&&x!==void 0?x:_.autoRange,_.isVisible=(A=S==null?void 0:S.isVisible)!==null&&A!==void 0?A:_.isVisible,_.axisTitle=(w=S==null?void 0:S.axisTitle)!==null&&w!==void 0?w:_.axisTitle,_.axisTitleStyle=S==null?void 0:S.axisTitleStyle,_.allowFastMath=(L=S==null?void 0:S.allowFastMath)!==null&&L!==void 0?L:_.allowFastMathProperty,_.autoTicksProperty=(k=S==null?void 0:S.autoTicks)!==null&&k!==void 0?k:_.autoTicksProperty,_.maxAutoTicksProperty=(D=S==null?void 0:S.maxAutoTicks)!==null&&D!==void 0?D:_.maxAutoTicksProperty,_.minorsPerMajorProperty=(j=S==null?void 0:S.minorsPerMajor)!==null&&j!==void 0?j:_.minorsPerMajorProperty,_.majorDeltaProperty=(N=S==null?void 0:S.majorDelta)!==null&&N!==void 0?N:_.majorDeltaProperty,_.minorDeltaProperty=(V=S==null?void 0:S.minorDelta)!==null&&V!==void 0?V:_.minorDeltaProperty,_.drawLabelsProperty=(W=S==null?void 0:S.drawLabels)!==null&&W!==void 0?W:_.drawLabelsProperty,_.drawMajorTickLinesProperty=(K=S==null?void 0:S.drawMajorTickLines)!==null&&K!==void 0?K:_.drawMajorTickLinesProperty,_.drawMinorTickLinesProperty=(H=S==null?void 0:S.drawMinorTickLines)!==null&&H!==void 0?H:_.drawMinorTickLinesProperty,_.drawMinorGridLinesProperty=(U=S==null?void 0:S.drawMinorGridLines)!==null&&U!==void 0?U:_.drawMinorGridLinesProperty,_.drawMajorGridLinesProperty=(I=S==null?void 0:S.drawMajorGridLines)!==null&&I!==void 0?I:_.drawMajorGridLinesProperty,_.majorGridLineStyle=S==null?void 0:S.majorGridLineStyle,_.minorGridLineStyle=S==null?void 0:S.minorGridLineStyle,_.majorTickLineStyle=S==null?void 0:S.majorTickLineStyle,_.minorTickLineStyle=S==null?void 0:S.minorTickLineStyle,_.drawMajorBandsProperty=(Q=S==null?void 0:S.drawMajorBands)!==null&&Q!==void 0?Q:_.drawMajorBandsProperty,_.axisBandsFillProperty=(Z=S==null?void 0:S.axisBandsFill)!==null&&Z!==void 0?Z:_.axisBandsFillProperty,_.flippedCoordinatesProperty=(ee=S==null?void 0:S.flippedCoordinates)!==null&&ee!==void 0?ee:_.flippedCoordinatesProperty,_.getCurrentCoordinateCalculator=_.getCurrentCoordinateCalculator.bind(_),_}return Object.defineProperty(b.prototype,"isCategoryAxis",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"isXAxis",{get:function(){return this.isXAxisProperty},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"allowFastMath",{get:function(){return this.allowFastMathProperty},set:function(S){this.allowFastMathProperty=S,this.notifyPropertyChanged(g.PROPERTY.ALLOW_FAST_MATH)},enumerable:!1,configurable:!0}),b.prototype.hasValidVisibleRange=function(){if(this.visibleRange===void 0)return!1;var S=this.visibleRange.diff===0;return!S&&(0,f.isRealNumber)(this.visibleRange.max)&&(0,f.isRealNumber)(this.visibleRange.min)},b.prototype.hasDefaultVisibleRange=function(){return!this.hasVisibleRangeSet},Object.defineProperty(b.prototype,"isVisible",{get:function(){return this.isVisibleProperty},set:function(S){this.isVisibleProperty=S,this.notifyPropertyChanged(g.PROPERTY.IS_VISIBLE)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"growBy",{get:function(){return this.growByProperty},set:function(S){this.growByProperty=S,this.notifyPropertyChanged(g.PROPERTY.GROW_BY)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"visibleRange",{get:function(){return this.visibleRangeProperty},set:function(S){var _;this.hasVisibleRangeSet=!0,!((_=this.visibleRangeProperty)===null||_===void 0)&&_.equals(S)||(this.visibleRangeProperty=S,this.clearCoordCalcCache(),this.visibleRangeChanged.raiseEvent(new v.VisibleRangeChangedArgs(S)),this.notifyPropertyChanged(g.PROPERTY.VISIBLE_RANGE))},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"animatedVisibleRange",{get:function(){if(!this.visibleRangeAnimationToken)return this.visibleRange;var S=this.visibleRangeAnimationToken;return S.to},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"majorDelta",{get:function(){return this.majorDeltaProperty},set:function(S){this.majorDeltaProperty=S,this.notifyPropertyChanged(g.PROPERTY.MAJOR_DELTA)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"minorDelta",{get:function(){return this.minorDeltaProperty},set:function(S){this.minorDeltaProperty=S,this.notifyPropertyChanged(g.PROPERTY.MINOR_DELTA)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"minorsPerMajor",{get:function(){return this.minorsPerMajorProperty},set:function(S){this.minorsPerMajorProperty=S,this.notifyPropertyChanged(g.PROPERTY.MINORS_PER_MAJOR)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"textFormatting",{get:function(){return this.textFormattingProperty},set:function(S){this.textFormattingProperty=S,this.notifyPropertyChanged(g.PROPERTY.TEXT_FORMATTING)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"cursorTextFormatting",{get:function(){return this.cursorTextFormattingProperty},set:function(S){this.cursorTextFormattingProperty=S,this.notifyPropertyChanged(g.PROPERTY.CURSOR_TEXT_FORMATTING)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"drawMajorGridLines",{get:function(){return this.drawMajorGridLinesProperty},set:function(S){this.drawMajorGridLinesProperty=S,this.notifyPropertyChanged(g.PROPERTY.DRAW_MAJOR_GRID_LINES)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"drawMinorGridLines",{get:function(){return this.drawMinorGridLinesProperty},set:function(S){this.drawMinorGridLinesProperty=S,this.notifyPropertyChanged(g.PROPERTY.DRAW_MINOR_GRID_LINES)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"drawMajorTickLines",{get:function(){return this.drawMajorTickLinesProperty},set:function(S){this.drawMajorTickLinesProperty=S,this.notifyPropertyChanged(g.PROPERTY.DRAW_MAJOR_TICK_LINES)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"drawMinorTickLines",{get:function(){return this.drawMinorTickLinesProperty},set:function(S){this.drawMinorTickLinesProperty=S,this.notifyPropertyChanged(g.PROPERTY.DRAW_MINOR_TICK_LINES)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"drawMajorBands",{get:function(){return this.drawMajorBandsProperty},set:function(S){this.drawMajorBandsProperty=S,this.notifyPropertyChanged(g.PROPERTY.DRAW_MAJOR_BANDS)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"drawLabels",{get:function(){return this.drawLabelsProperty},set:function(S){this.drawLabelsProperty=S,this.notifyPropertyChanged(g.PROPERTY.DRAW_LABELS)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"flippedCoordinates",{get:function(){return this.flippedCoordinatesProperty},set:function(S){this.flippedCoordinatesProperty!==S&&(this.flippedCoordinatesProperty=S,this.clearCoordCalcCache(),this.notifyPropertyChanged(g.PROPERTY.FLIPPED_COORDINATES))},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"axisBandsFill",{get:function(){return this.axisBandsFillProperty},set:function(S){this.axisBandsFillProperty=S,this.notifyPropertyChanged(g.PROPERTY.AXIS_BANDS_FILL)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"autoRange",{get:function(){return this.autoRangeProperty},set:function(S){this.autoRangeProperty=S,this.notifyPropertyChanged(g.PROPERTY.AUTO_RANGE)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"majorTickLineStyle",{get:function(){return this.majorTickLineStyleProperty},set:function(S){this.majorTickLineStyleProperty=e(e({},this.majorTickLineStyle),S),this.notifyPropertyChanged(g.PROPERTY.MAJOR_TICK_LINE_STYLE)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"minorTickLineStyle",{get:function(){return this.minorTickLineStyleProperty},set:function(S){this.minorTickLineStyleProperty=e(e({},this.minorTickLineStyle),S),this.notifyPropertyChanged(g.PROPERTY.MINOR_TICK_LINE_STYLE)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"majorGridLineStyle",{get:function(){return this.majorGridLineStyleProperty},set:function(S){this.majorGridLineStyleProperty=e(e({},this.majorGridLineStyle),S),this.notifyPropertyChanged(g.PROPERTY.MAJOR_GRID_LINE_STYLE)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"minorGridLineStyle",{get:function(){return this.minorGridLineStyleProperty},set:function(S){this.minorGridLineStyleProperty=e(e({},this.minorGridLineStyle),S),this.notifyPropertyChanged(g.PROPERTY.MINOR_GRID_LINE_STYLE)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"dpiAdjustedAxisTitleStyle",{get:function(){return p.DpiHelper.adjustTextStyle(this.axisTitleStyleProperty)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"axisTitleStyle",{get:function(){return this.axisTitleStyleProperty},set:function(S){this.axisTitleStyleProperty=e(e({},this.axisTitleStyle),S),this.notifyPropertyChanged(g.PROPERTY.TEXT_STYLE)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"axisTitle",{get:function(){return this.axisTitleProperty},set:function(S){this.axisTitleProperty=S,this.notifyPropertyChanged(g.PROPERTY.AXIS_TITLE)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"tickProvider",{get:function(){return this.tickProviderProperty},set:function(S){var _;(_=this.tickProviderProperty)===null||_===void 0||_.detachedFromAxis(),this.tickProviderProperty=S,this.notifyPropertyChanged(g.PROPERTY.TICK_PROVIDER)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"labelProvider",{get:function(){return this.labelProviderProperty},set:function(S){var _;(_=this.labelProviderProperty)===null||_===void 0||_.detachedFromAxis(),this.labelProviderProperty=S,this.notifyPropertyChanged(g.PROPERTY.LABEL_PROVIDER)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"deltaCalculator",{get:function(){return this.deltaCalculatorProperty},set:function(S){var _;(_=this.deltaCalculator)===null||_===void 0||_.detachedFromAxis(),this.deltaCalculatorProperty=S,this.notifyPropertyChanged(g.PROPERTY.DELTA_CALCULATOR)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"tickCoordinatesProvider",{get:function(){return this.tickCoordinatesProviderProperty},set:function(S){var _;(_=this.tickCoordinatesProviderProperty)===null||_===void 0||_.detachedFromAxis(),this.tickCoordinatesProviderProperty=S,this.notifyPropertyChanged(g.PROPERTY.TICK_COORDINATES_CALCULATOR)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"maxAutoTicks",{get:function(){return this.maxAutoTicksProperty},set:function(S){this.maxAutoTicksProperty=S,this.notifyPropertyChanged(g.PROPERTY.MAX_AUTO_TICKS)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"autoTicks",{get:function(){return this.autoTicksProperty},set:function(S){this.autoTicksProperty=S,this.notifyPropertyChanged(g.PROPERTY.AUTO_TICKS)},enumerable:!1,configurable:!0}),b.prototype.getCurrentCoordinateCalculator=function(){return this.coordCalcCache&&this.coordCalcCache.viewportDimension!==this.getAxisSize()&&this.clearCoordCalcCache(),this.coordCalcCache||(this.coordCalcCache=this.getCurrentCoordinateCalculatorInternal()),this.coordCalcCache},b.prototype.clearCoordCalcCache=function(){this.coordCalcCache=(0,n.deleteSafe)(this.coordCalcCache)},b.prototype.delete=function(){this.deltaCalculator=void 0,this.tickProvider=void 0,this.tickCoordinatesProvider=void 0,this.labelProviderProperty=(0,n.deleteSafe)(this.labelProvider),this.coordCalcCache=(0,n.deleteSafe)(this.coordCalcCache)},b.prototype.isValidRange=function(S){var _=!S||!S.isDefined()||S.min>S.max;return!_},Object.defineProperty(b.prototype,"isVerticalChart",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"isHorizontalAxis",{get:function(){return this.isXAxis},enumerable:!1,configurable:!0}),b.prototype.setIsXAxis=function(S){this.isXAxisProperty=S,this.notifyPropertyChanged(g.PROPERTY.IS_XAXIS)},b.prototype.coerceZeroVisibleRange=function(S){return o.Guard.notNull(S,"range"),S.isZero()?S.min===0?new a.NumberRange(-1,1):S.growBy(new a.NumberRange(this.ZeroRangeGrowBy,this.ZeroRangeGrowBy)):S},b.prototype.notifyPropertyChanged=function(S){var _,C,T,x;S===g.PROPERTY.DELTA_CALCULATOR&&((_=this.deltaCalculator)===null||_===void 0||_.attachedToAxis(this)),S===g.PROPERTY.TICK_PROVIDER&&((C=this.tickProvider)===null||C===void 0||C.attachedToAxis(this)),S===g.PROPERTY.LABEL_PROVIDER&&((T=this.labelProvider)===null||T===void 0||T.attachedToAxis(this)),S===g.PROPERTY.TICK_COORDINATES_CALCULATOR&&((x=this.tickCoordinatesProvider)===null||x===void 0||x.attachedToAxis(this)),this.isMeasured&&this.invalidateParentCallback&&this.invalidateParentCallback()},b.prototype.getMaxAutoTicks=function(){return Math.max(1,this.maxAutoTicks)},b})(i.DeletableEntity);return mm.AxisCore=y,mm}var bm={},$te;function QV(){if($te)return bm;$te=1;var r=bm&&bm.__extends||(function(){var n=function(t,o){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(a[l]=s[l])},n(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");n(t,o);function a(){this.constructor=t}t.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}})();Object.defineProperty(bm,"__esModule",{value:!0}),bm.PolarAxisLayoutState=bm.AxisLayoutState=void 0;var e=(function(){function n(){this.axisSize=0,this.additionalLeftSize=0,this.additionalRightSize=0,this.additionalTopSize=0,this.additionalBottomSize=0}return n.prototype.clear=function(){this.axisSize=0,this.additionalLeftSize=0,this.additionalRightSize=0,this.additionalTopSize=0,this.additionalBottomSize=0},n})();bm.AxisLayoutState=e;var i=(function(n){r(t,n);function t(){var o=n!==null&&n.apply(this,arguments)||this;return o.leftScale=-1,o.rightScale=1,o.topScale=1,o.bottomScale=-1,o}return t.prototype.clear=function(){this.leftScale=-1,this.rightScale=1,this.topScale=1,this.bottomScale=-1},t})(e);return bm.PolarAxisLayoutState=i,bm}var qC={},qte;function C8(){return qte||(qte=1,(function(r){var e=qC&&qC.__extends||(function(){var C=function(T,x){return C=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,w){A.__proto__=w}||function(A,w){for(var L in w)Object.prototype.hasOwnProperty.call(w,L)&&(A[L]=w[L])},C(T,x)};return function(T,x){if(typeof x!="function"&&x!==null)throw new TypeError("Class extends value "+String(x)+" is not a constructor or null");C(T,x);function A(){this.constructor=T}T.prototype=x===null?Object.create(x):(A.prototype=x.prototype,new A)}})(),i=qC&&qC.__assign||function(){return i=Object.assign||function(C){for(var T,x=1,A=arguments.length;x<A;x++){T=arguments[x];for(var w in T)Object.prototype.hasOwnProperty.call(T,w)&&(C[w]=T[w])}return C},i.apply(this,arguments)};Object.defineProperty(r,"__esModule",{value:!0}),r.layoutLabelsHelper=r.AxisRenderer=void 0;var n=So(),t=$n(),o=Mr(),a=vn(),s=Yo(),l=cc(),u=MM(),c=Du(),d=Lf(),f=mi(),h=lc(),p=Ul(),g=KS(),v=Xi(),y=ln(),m=Hi(),b=d1(),S=(function(C){e(T,C);function T(x){var A=C.call(this)||this;return A.viewRect=a.Rect.createZero(),A.drawDebug=!1,A.desiredLabelsSize=0,A.desiredTicksSize=0,A.desiredHeightProperty=0,A.desiredWidthProperty=0,A.axisThicknessProperty=0,A.keepLabelsWithinAxisProperty=!0,A.hideOverlappingLabelsProperty=!0,A.webAssemblyContext=x,A.textureManager=new b.TextureManager(x),n.IS_TEST_ENV||(A.measureTextCanvas=document.createElement("canvas"),A.measureTextCanvas.width=1,A.measureTextCanvas.height=1),A}return T.prototype.delete=function(){this.webAssemblyContext=void 0,this.measureTextCanvas=void 0,this.parentAxis=void 0,this.textureManager=(0,o.deleteSafe)(this.textureManager)},T.prototype.attachedToAxis=function(x){this.parentAxis=x},T.prototype.measure=function(x,A,w,L,k,D,j){y.DebugForDpi&&console.log("AxisRenderer.measure. fontSize: ".concat(A.fontSize)),this.desiredLabelsSize=D?this.calcDesiredLabelsSize(x,k,A,w):0,this.desiredTicksSize=j?L:0;var N=Math.max(this.desiredLabelsSize,this.axisThicknessProperty*m.DpiHelper.PIXEL_RATIO),V=N+this.desiredTicksSize;x?this.desiredHeightProperty=V:this.desiredWidthProperty=V},T.prototype.calcDesiredLabelsSize=function(x,A,w,L){if(n.IS_TEST_ENV)return 0;var k,D=this.measureTextCanvas.getContext("2d");return x?k=A.getMaxLabelHeightForHorizontalAxis(L,D,w):k=A.getMaxLabelWidthForVerticalAxis(L,D,w),k},Object.defineProperty(T.prototype,"desiredHeight",{get:function(){return this.desiredHeightProperty},set:function(x){this.desiredHeightProperty=x},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"desiredWidth",{get:function(){return this.desiredWidthProperty},set:function(x){this.desiredWidthProperty=x},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"keepLabelsWithinAxis",{get:function(){return this.keepLabelsWithinAxisProperty},set:function(x){this.keepLabelsWithinAxisProperty=x,this.invalidateParent()},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"hideOverlappingLabels",{get:function(){return this.hideOverlappingLabelsProperty},set:function(x){this.hideOverlappingLabelsProperty=x,this.invalidateParent()},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"axisThickness",{get:function(){return this.axisThicknessProperty},set:function(x){this.axisThicknessProperty=x,this.invalidateParent()},enumerable:!1,configurable:!0}),T.prototype.layout=function(x){this.viewRect=x},T.prototype.getClipRect=function(){return this.parentAxis.parentSurface.clipRect},T.prototype.drawLabels=function(x,A,w,L,k,D,j,N,V,W){y.DebugForDpi&&console.log("AxisRenderer.drawLabels. fontSize: ".concat(j.fontSize));var K=this,H=K.viewRect,U=K.textureManager,I=N?(0,l.getIsHorizontal)(A):(0,l.getIsVertical)(A),Q=Math.floor(H.width),Z=Math.floor(H.height),ee=this.desiredTicksSize,ie,de=j.padding,pe=j.alignment,_e=j.multilineAlignment;I&&(k=k.reverse(),L=L.reverse());var Te=[],De=(0,f.parseColorToUIntArgb)(j.color),Pe=W.useNativeText?x.getFont(j,W.rotation!==0):null,Ee=W.useNativeText?(0,v.getTextBounds)(this.webAssemblyContext):null;Pe||(ie=U.getTextureContext(Q,Z));var Re=W.rotation;Re>90?Re-=180:Re<-90&&(Re+=180);var je=-(Re*Math.PI)/180;k=k.map(function(vt){return vt-D});var Ke=(0,c.convertMultiLineAlignment)(_e,this.webAssemblyContext),ot=W.lineSpacing,We=this.calculateLineHightForNativeFont(Pe,Ee),xe=this.getClipRect();if((0,l.getIsHorizontal)(A)){var ve=[],he=[];if(!W.useCache&&W.useNativeText)for(var Se=0,be=L;Se<be.length;Se++){var ke=be[Se];Pe.CalculateStringBounds(ke??"",Ee,ot),ve.push(Ee.m_fHeight+j.padding.top+j.padding.bottom),he.push(Ee.m_fWidth+j.padding.left+j.padding.right)}else ve=L.map(function(vt){return W.getLabelHeight(ie,vt,j)}),he=L.map(function(vt){return W.getLabelWidth(ie,vt,j)});for(var qe=this.layoutLabels(Q,k,he,V,de==null?void 0:de.top,de==null?void 0:de.bottom),rt=qe.labelCoords,St=qe.labelIndexes,xt=0;xt<St.length;xt++){var It=rt[xt],Zt=L[St[xt]],ct=ve[St[xt]],Qe=he[St[xt]],Et=0;A===l.EAxisAlignment.Bottom&&!w||A===l.EAxisAlignment.Top&&w?Et+=ee:Et+=Z-ct-ee,this.drawDebug&&Te.push(a.Rect.create(It,Et,Qe,ct));try{if(Pe){var Gt=It+H.left+de.left,Xe=Et+H.top+We+de.top,Vt=Gt,lr=Xe-We;if(je!==0){var Jt=W.getNativeLabelInfo(Zt),kr=Jt.textWidth,qt=Jt.textHeight;Gt=k[St[xt]]+H.left-qt*Math.sin(je)/2,Vt=Gt,je>0&&(Gt-=kr)}var zt=W.adjustLabel(xt,Zt,Qe,ct,Gt,Xe,Vt,lr,je),jr=zt.text,Be=zt.x,Ge=zt.y,ut=zt.rx,Pt=zt.ry,Qt=zt.rotationRadians,wr=zt.color;Pe.DrawStringAdvanced(jr??"",wr??De,Math.round(Be),Math.round(Ge),(0,v.getVector4)(this.webAssemblyContext,ut,Pt,Qt,0),Ke,ot)}else{var Xr=W.getCachedLabelTexture(Zt,U,j),pi=Xr.bitmapTexture,Qr=Xr.textureHeight,Ur=Xr.textureWidth;if(pi){x.resetAndClip(xe);var ci=W.adjustLabel(xt,Zt,Qe,ct,It+H.left,Et+H.top,0,0,0),Be=ci.x,Ge=ci.y;x.drawTexture(pi,Math.round(Be),Math.round(Ge),Ur,Qr),W.useCache||pi.delete()}}}catch(vt){d.Logger.debug(vt),W.delete()}}}else{var ve=[],he=[];if(!W.useCache&&W.useNativeText)for(var Xt=0,Ui=L;Xt<Ui.length;Xt++){var ke=Ui[Xt];Pe.CalculateStringBounds(ke??"",Ee,ot),ve.push(Ee.m_fHeight+j.padding.top+j.padding.bottom),he.push(Ee.m_fWidth+j.padding.left+j.padding.right)}else ve=L.map(function(Bt){return W.getLabelHeight(ie,Bt,j)}),he=L.map(function(Bt){return W.getLabelWidth(ie,Bt,j)});for(var Dn=this.layoutLabels(Z,k,ve,V,de==null?void 0:de.left,de==null?void 0:de.right),rt=Dn.labelCoords,St=Dn.labelIndexes,xt=0;xt<St.length;xt++){var It=0,Zt=L[St[xt]],Qe=he[St[xt]],ct=ve[St[xt]];It=this.adjustForLabelAlignment(It,Qe,pe,A,w,Q,ee);var Et=rt[xt];this.drawDebug&&Te.push(a.Rect.create(It,Et,Qe,ct));try{if(Pe){var Gt=It+H.left+de.left,Xe=Et+H.top+We+de.top,Kr=W.adjustLabel(xt,Zt,Qe,ct,Gt,Xe,Gt,Xe,je),jr=Kr.text,Be=Kr.x,Ge=Kr.y,ut=Kr.rx,Pt=Kr.ry,Qt=Kr.rotationRadians,wr=Kr.color;Pe.DrawStringAdvanced(jr??"",wr??De,Math.round(Be),Math.round(Ge),(0,v.getVector4)(this.webAssemblyContext,ut,Pt,Qt,0),Ke,ot)}else{var In=W.getCachedLabelTexture(Zt,U,j),pi=In.bitmapTexture,Qr=In.textureHeight,Ur=In.textureWidth;if(pi){x.resetAndClip(xe);var fn=W.adjustLabel(xt,Zt,Qe,ct,It+H.left,Et+H.top,0,0,0),Be=fn.x,Ge=fn.y;x.drawTexture(pi,Math.round(Be),Math.round(Ge),Ur,Qr),W.useCache||pi.delete()}}}catch(nt){d.Logger.debug(nt),W.delete()}}}this.drawDebug&&this.drawLabelViewRects(x,H,Te)},T.prototype.adjustForLabelAlignment=function(x,A,w,L,k,D,j){var N=D-j-A;return L===l.EAxisAlignment.Left&&!k||L===l.EAxisAlignment.Right&&k?w===u.ELabelAlignment.Right||w===u.ELabelAlignment.Auto?x+=N:w===u.ELabelAlignment.Center&&(x+=N/2):w===u.ELabelAlignment.Left||w===u.ELabelAlignment.Auto?x+=j:w===u.ELabelAlignment.Center?x+=j+N/2:x+=D-A,x},T.prototype.layoutLabels=function(x,A,w,L,k,D){var j,N;return(0,r.layoutLabelsHelper)(this.keepLabelsWithinAxis,this.hideOverlappingLabels,x,A,w,L,(N=(j=this.parentAxis)===null||j===void 0?void 0:j.labelProvider)===null||N===void 0?void 0:N.alwaysShowFirstLabel)},T.prototype.drawTicks=function(x,A,w,L,k,D,j){if(!(!L||L.length===0)){var N=this.viewRect,V=j.tickSize,W=(0,v.getVectorColorVertex)(this.webAssemblyContext),K=(0,l.getIsHorizontal)(A),H=(0,v.getVertex)(this.webAssemblyContext,0,0);if(K!==void 0){L.forEach(function(Q){var Z,ee,ie,de;w?K?(Z=Q,ee=Q,ie=A===l.EAxisAlignment.Top?0:N.height,de=A===l.EAxisAlignment.Top?V:N.height-V):(Z=A===l.EAxisAlignment.Left?0:N.width,ee=A===l.EAxisAlignment.Left?V:N.width-V,ie=Q,de=Q):K?(Z=Q,ee=Q,ie=A===l.EAxisAlignment.Bottom?0:N.height,de=A===l.EAxisAlignment.Bottom?V:N.height-V):(Z=A===l.EAxisAlignment.Right?0:N.width,ee=A===l.EAxisAlignment.Right?V:N.width-V,ie=Q,de=Q),H.SetPosition(Z,ie),W.push_back(H),H.SetPosition(ee,de),W.push_back(H)});var U=N.left-(K?k:0),I=N.top-(K?0:k);x.drawLinesNative(W,D,p.ELineDrawMode.DiscontinuousLine,this.getClipRect(),U,I)}}},T.prototype.getAxisReservedSpace=function(x){var A,w,L,k,D,j,N,V,W,K,H,U,I,Q,Z,ee,ie,de,pe,_e,Te,De,Pe,Ee=0;!((A=this.parentAxis)===null||A===void 0)&&A.drawMajorTickLines&&(Ee=Math.max(Ee,(L=(w=this.parentAxis.majorTickLineStyle)===null||w===void 0?void 0:w.tickSize)!==null&&L!==void 0?L:0)),!((k=this.parentAxis)===null||k===void 0)&&k.drawMinorTickLines&&(Ee=Math.max(Ee,(j=(D=this.parentAxis.minorTickLineStyle)===null||D===void 0?void 0:D.tickSize)!==null&&j!==void 0?j:0));var Re=(N=this.parentAxis)===null||N===void 0?void 0:N.axisAlignment;switch(Re){case l.EAxisAlignment.Left:Ee+=(W=(V=this.parentAxis.labelStyle)===null||V===void 0?void 0:V.padding.right)!==null&&W!==void 0?W:0,Ee+=(H=(K=this.parentAxis.axisBorder.borderRight)!==null&&K!==void 0?K:this.parentAxis.axisBorder.border)!==null&&H!==void 0?H:0;break;case l.EAxisAlignment.Right:Ee+=(I=(U=this.parentAxis.labelStyle)===null||U===void 0?void 0:U.padding.left)!==null&&I!==void 0?I:0,Ee+=(Z=(Q=this.parentAxis.axisBorder.borderLeft)!==null&&Q!==void 0?Q:this.parentAxis.axisBorder.border)!==null&&Z!==void 0?Z:0;break;case l.EAxisAlignment.Top:Ee+=(ie=(ee=this.parentAxis.labelStyle)===null||ee===void 0?void 0:ee.padding.bottom)!==null&&ie!==void 0?ie:0,Ee+=(pe=(de=this.parentAxis.axisBorder.borderBottom)!==null&&de!==void 0?de:this.parentAxis.axisBorder.border)!==null&&pe!==void 0?pe:0;break;case l.EAxisAlignment.Bottom:Ee+=(Te=(_e=this.parentAxis.labelStyle)===null||_e===void 0?void 0:_e.padding.top)!==null&&Te!==void 0?Te:0,Ee+=(Pe=(De=this.parentAxis.axisBorder.borderTop)!==null&&De!==void 0?De:this.parentAxis.axisBorder.border)!==null&&Pe!==void 0?Pe:0;break}Ee-=1.5,(Re===l.EAxisAlignment.Top||Re===l.EAxisAlignment.Bottom)&&(Ee-=4/m.DpiHelper.PIXEL_RATIO);var je=this.parentAxis.isInnerAxis?-1:1;return Ee*je},T.prototype.drawModifiersAxisLabel=function(x,A,w,L,k,D,j,N){if(A){var V=this.parentAxis.parentSurface,W=a.Rect.intersect(V.viewRect,V.clipRect);x.resetAndClip(W);var K=this.textureManager.createSimpleTextTexture(A,i(i({},k),{padding:new s.Thickness(j.top+2*m.DpiHelper.PIXEL_RATIO,j.right,j.bottom+2*m.DpiHelper.PIXEL_RATIO,j.left)}),D,void 0,void 0,void 0,N),H=K.bitmapTexture,U=K.textureHeight,I=K.textureWidth,Q=function(pe,_e,Te){return pe+_e-Te/2},Z=this.parentAxis.offset,ee=0,ie=0,de=this.getAxisReservedSpace()*m.DpiHelper.PIXEL_RATIO;switch(L){case l.EAxisAlignment.Top:{ee=Q(this.viewRect.x-Z,w,I),this.parentAxis.isInnerAxis?ie=this.viewRect.y:ie=this.viewRect.y+this.viewRect.height-U,ie-=de;break}case l.EAxisAlignment.Bottom:{ee=Q(this.viewRect.x-Z,w,I),this.parentAxis.isInnerAxis?ie=this.viewRect.y+this.viewRect.height-U:ie=this.viewRect.y,ie+=de;break}case l.EAxisAlignment.Left:{ie=Q(this.viewRect.y-Z,w,U),this.parentAxis.isInnerAxis?ee=this.viewRect.x:ee=this.viewRect.x+this.viewRect.width-I,ee-=de;break}case l.EAxisAlignment.Right:{ie=Q(this.viewRect.y-Z,w,U),this.parentAxis.isInnerAxis?ee=this.viewRect.x+this.viewRect.width-I:ee=this.viewRect.x,ee+=de;break}}return x.drawTexture(H,Math.round(ee),Math.round(ie),I,U),H.delete(),new a.Rect(ee,ie,I,U)}},T.prototype.createAxisMarker=function(x,A,w,L,k){var D=w.fontStyle,j=w.fontWeight,N=w.fontSize,V=w.fontFamily,W=w.color;return this.textureManager.createAxisMarkerTexture(x,A,D,j,N,V,W,2*m.DpiHelper.PIXEL_RATIO,L,k)},T.prototype.createAxisMarkerFromImage=function(x,A,w){return this.textureManager.createTextureFromImage(x,A,w)},T.prototype.createAnnotationLabelTexture=function(x,A,w,L,k,D){return this.textureManager.createSimpleTextTexture(x,A,w,L,k,D)},T.prototype.invalidateParent=function(){this.parentAxis&&this.parentAxis.invalidateParentCallback&&this.parentAxis.invalidateParentCallback()},T.prototype.drawLabelViewRects=function(x,A,w){for(var L=(0,v.getVectorRectVertex)(this.webAssemblyContext),k=new this.webAssemblyContext.SCRTSolidBrush((0,f.parseColorToUIntArgb)("rgba(30,30,255,0.7)"),!1),D=0,j=w;D<j.length;D++){var N=j[D],V=(0,g.createNativeRect)(this.webAssemblyContext,N.left,N.top,N.right,N.bottom);L.push_back(V)}x.drawRects(L,k,this.getClipRect(),A.left,A.top),k.delete()},T.prototype.calculateLineHightForNativeFont=function(x,A){if(x&&A){x.CalculateStringBounds("Ag",A,0);var w=A.GetLineBounds(0),L=(0,h.getFirstLineHeightToBaseline)(w);return w.delete(),L}return 0},T})(t.DeletableEntity);r.AxisRenderer=S;var _=function(C,T,x,A,w,L,k){k===void 0&&(k=!1);for(var D=0,j=[],N=[],V=w.length,W=function(De){return L?A[V-1-De]:A[De]},K=function(De){return L?w[V-1-De]:w[De]},H=function(De){return L?N.push(V-1-De):N.push(De)},U=0,I=0;I<V;I++){var Q=I===0,Z=I===V-1,ee=K(I),ie=Math.ceil(ee/2),de=W(I),pe=0;if(C&&Q){if(de>ie?(pe=de+ie,de=de-ie):(de=0,pe=de+ee),!k){var _e=W(1),Te=K(1)/2;if(T&&pe>=_e-Te-D)continue}}else C&&Z?de=de+ie<x?de-ie:x-ee:(pe=de+ie,de-=ie);T&&I>0&&de<U+D||(U=pe,j.push(de),H(I))}return{labelCoords:j,labelIndexes:N}};r.layoutLabelsHelper=_})(qC)),qC}var XC={},Xte;function kSe(){if(Xte)return XC;Xte=1;var r=XC&&XC.__extends||(function(){var l=function(u,c){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(d[h]=f[h])},l(u,c)};return function(u,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");l(u,c);function d(){this.constructor=u}u.prototype=c===null?Object.create(c):(d.prototype=c.prototype,new d)}})();Object.defineProperty(XC,"__esModule",{value:!0}),XC.AxisTitleRenderer=void 0;var e=Yo(),i=MM(),n=KR(),t=ZV(),o=(function(l){r(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.lineSpacing=1.1,c}return u.prototype.measure=function(c,d,f){var h;c===void 0&&(c=""),this.text=c;var p=(h=d.useNativeText)!==null&&h!==void 0?h:this.useNativeText,g=!this.useCache||!this.texture&&!p||this.text!==this.previousText||this.lineSpacing!==this.previousLineSpacing||f!==this.previousAxisAlignment||this.previousNativeTextMode!==p||!a(d,this.textStyle);if(this.currentNativeFontName==="SCRT_Loading"){var v=(0,n.getIsHorizontalPlacement)(this.titlePosition),y=this.parentSurface.currentWebGlRenderContext,m=y.getFont(this.textStyle,!v);m.GetFaceName()!==this.currentNativeFontName&&(g=!0)}if(g){this.invalidateCache(),this.previousLineSpacing=this.lineSpacing,this.previousNativeTextMode=p,this.previousAxisAlignment=f,this.previousText=c,this.textStyle=d,this.titlePosition=n.ETitlePosition[f],this.textStyle=d,this.textStyle.lineSpacing=this.lineSpacing;var b=this.useNativeTextProperty;this.useNativeTextProperty=p;var y=this.parentSurface.currentWebGlRenderContext;this.getTextSize(c,this.textStyle,y),this.useNativeTextProperty=b}},Object.defineProperty(u.prototype,"useNativeText",{get:function(){return this.useNativeTextProperty},set:function(c){this.useNativeTextProperty=c},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"desiredHeight",{get:function(){return this.desiredHeightProperty},set:function(c){this.desiredWidthProperty!==c&&this.invalidateCache(),this.desiredHeightProperty=c},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"desiredWidth",{get:function(){return this.desiredWidthProperty},set:function(c){this.desiredWidthProperty!==c&&this.invalidateCache(),this.desiredWidthProperty=c},enumerable:!1,configurable:!0}),u.prototype.layout=function(c){if(!this.text){this.viewRectProperty=c;return}var d=s(this.textStyle.alignment);this.viewRectProperty=this.getViewRect(this.text,c,this.titlePosition,d)},u.prototype.getTitleTexture=function(){var c=this.titlePosition,d=(0,t.getAdjustedRotation)(this.textStyle.rotation,c),f=Array.isArray(this.text)?this.text:this.text.split(`
`),h=this.textureManager.createTextTexture(f,this.textStyle,d,this.lineSpacing);return h},u.prototype.draw=function(c){var d;this.drawDebug&&this.drawTitleDebugViewRect(c);var f=(d=this.textStyle.useNativeText)!==null&&d!==void 0?d:this.useNativeText;return this.drawInternal(c,f,this.titlePosition,this.parentSurface.clipRect)},u.prototype.delete=function(){this.parentSurface=void 0,l.prototype.delete.call(this)},u})(t.TitleRendererBase);XC.AxisTitleRenderer=o;var a=function(l,u){return!l||!u?!1:l.color===u.color&&l.fontFamily===u.fontFamily&&l.fontSize===u.fontSize&&l.fontStyle===u.fontStyle&&l.fontWeight===u.fontWeight&&l.alignment===u.alignment&&l.rotation===u.rotation&&l.multilineAlignment===u.multilineAlignment&&l.useNativeText===u.useNativeText&&(l.padding===void 0&&u.padding===void 0||e.Thickness.areEqual(l.padding,u.padding))},s=function(l){return l===i.ELabelAlignment.Auto?n.ETextAlignment.Center:n.ETextAlignment[l]};return XC}var Kte;function Eg(){return Kte||(Kte=1,(function(r){var e=GC&&GC.__extends||(function(){var W=function(K,H){return W=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(U,I){U.__proto__=I}||function(U,I){for(var Q in I)Object.prototype.hasOwnProperty.call(I,Q)&&(U[Q]=I[Q])},W(K,H)};return function(K,H){if(typeof H!="function"&&H!==null)throw new TypeError("Class extends value "+String(H)+" is not a constructor or null");W(K,H);function U(){this.constructor=K}K.prototype=H===null?Object.create(H):(U.prototype=H.prototype,new U)}})(),i=GC&&GC.__assign||function(){return i=Object.assign||function(W){for(var K,H=1,U=arguments.length;H<U;H++){K=arguments[H];for(var I in K)Object.prototype.hasOwnProperty.call(K,I)&&(W[I]=K[I])}return W},i.apply(this,arguments)};Object.defineProperty(r,"__esModule",{value:!0}),r.AxisBase2D=r.EClipMode=void 0;var n=Jn(),t=hc(),o=QF(),a=Mr(),s=oi(),l=Yo(),u=cc(),c=$o(),d=N1(),f=MM(),h=Os(),p=Vd(),g=mi(),v=ca(),y=ts(),m=Gbe(),b=Ul(),S=_8(),_=MSe(),C=KS(),T=d8(),x=Xi(),A=ln(),w=Hi(),L=P8(),k=QV(),D=C8(),j=kSe(),N=QH();(function(W){W.None="None",W.StretchAtExtents="StretchAtExtents",W.ClipAtMin="ClipAtMin",W.ClipAtMax="ClipAtMax",W.ClipAtExtents="ClipAtExtents"})(r.EClipMode||(r.EClipMode={}));var V=(function(W){e(K,W);function K(H,U){var I=this,Q,Z,ee,ie,de,pe,_e,Te,De,Pe,Ee,Re,je;return I=W.call(this,U)||this,I.axisLayoutState=new k.AxisLayoutState,I.isPolarAxis=!1,I.getlabelStyleProxy=function(Ke){return new Proxy(Ke,{set:function(ot,We,xe){return ot[We]=xe,I.notifyPropertyChanged(N.PROPERTY.TEXT_STYLE),I.dpiAdjustedLabelStyleCache=void 0,!0}})},I.labelStyleProperty=I.getlabelStyleProxy({fontSize:14,fontFamily:(0,p.getDefaultFontName)(),color:A.SciChartSurfaceBase.DEFAULT_THEME.tickTextBrush,fontWeight:"normal",fontStyle:"normal",padding:l.Thickness.fromString("2 4 2 4"),alignment:f.ELabelAlignment.Auto}),I.isInnerAxisProperty=!1,I.isPrimaryAxisProperty=!1,I.axisBorderProperty={borderBottom:0,borderLeft:0,borderRight:0,borderTop:0,color:A.SciChartSurfaceBase.DEFAULT_THEME.axisBorder,border:0},I.offsetProperty=0,I.offsetOverrideProperty=void 0,I.tickCache=void 0,I.clipToXRangeProperty=!0,I.isStaticAxisProperty=!1,I.webAssemblyContext2D=H,I.penCacheForMajorGridLines=new y.Pen2DCache(H),I.penCacheForMinorGridLines=new y.Pen2DCache(H),I.penCacheForMajorTickLines=new y.Pen2DCache(H),I.penCacheForMinorTickLines=new y.Pen2DCache(H),I.solidBrushCacheAxisBands=new m.SolidBrushCache(H),I.solidBrushCacheAxisBackground=new m.SolidBrushCache(H),I.axisRenderer=I.createAxisRender(),I.axisRenderer.keepLabelsWithinAxis=(Q=U==null?void 0:U.keepLabelsWithinAxis)!==null&&Q!==void 0?Q:I.axisRenderer.keepLabelsWithinAxis,I.axisRenderer.hideOverlappingLabels=(Z=U==null?void 0:U.hideOverlappingLabels)!==null&&Z!==void 0?Z:I.axisRenderer.hideOverlappingLabels,I.axisRenderer.axisThickness=(ee=U==null?void 0:U.axisThickness)!==null&&ee!==void 0?ee:I.axisRenderer.axisThickness,I.axisTitleRenderer=new j.AxisTitleRenderer(H),I.axisTitleRenderer.useNativeText=(ie=U==null?void 0:U.useNativeText)!==null&&ie!==void 0?ie:I.axisTitleRenderer.useNativeText,I.isStaticAxis=(de=U==null?void 0:U.isStaticAxis)!==null&&de!==void 0?de:I.isStaticAxisProperty,I.visibleRangeLimit=(pe=s.NumberRange.hydrate(U==null?void 0:U.visibleRangeLimit))!==null&&pe!==void 0?pe:I.visibleRangeLimit,I.visibleRangeSizeLimit=(_e=s.NumberRange.hydrate(U==null?void 0:U.visibleRangeSizeLimit))!==null&&_e!==void 0?_e:I.visibleRangeSizeLimit,I.zoomExtentsRange=U!=null&&U.zoomExtentsToInitialRange?I.visibleRange:s.NumberRange.hydrate(U==null?void 0:U.zoomExtentsRange),I.axisAlignment=(Te=U==null?void 0:U.axisAlignment)!==null&&Te!==void 0?Te:I.axisAlignment,I.axisTitle=(De=U==null?void 0:U.axisTitle)!==null&&De!==void 0?De:I.axisTitle,I.labelStyle=I.getlabelStyleProxy(i(i({},I.labelStyle),U==null?void 0:U.labelStyle)),I.axisBorder=U==null?void 0:U.axisBorder,I.isInnerAxis=(Pe=U==null?void 0:U.isInnerAxis)!==null&&Pe!==void 0?Pe:I.isInnerAxis,I.stackedAxisLength=(Ee=U==null?void 0:U.stackedAxisLength)!==null&&Ee!==void 0?Ee:I.stackedAxisLength,I.solidBrushCacheBorder=new m.SolidBrushCache(H),U!=null&&U.labelProvider&&("getLabels"in(U==null?void 0:U.labelProvider)||(U.labelProvider=(0,n.createType)(c.EBaseType.LabelProvider,U.labelProvider.type,H,U.labelProvider.options))),I.autoRangeAnimationProperty=U==null?void 0:U.autoRangeAnimation,I.backgroundColor=(Re=U==null?void 0:U.backgroundColor)!==null&&Re!==void 0?Re:I.backgroundColor,I.offsetOverrideProperty=U==null?void 0:U.overrideOffset,I.clipToXRangeProperty=(je=U==null?void 0:U.clipToXRange)!==null&&je!==void 0?je:I.clipToXRange,I}return Object.defineProperty(K.prototype,"isLinearAxis",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"labelProvider",{get:function(){return this.labelProviderProperty},set:function(H){var U;(U=this.labelProviderProperty)===null||U===void 0||U.detachedFromAxis(),this.labelProviderProperty=H,this.notifyPropertyChanged(N.PROPERTY.LABEL_PROVIDER)},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"axisRenderer",{get:function(){return this.axisRendererProperty},set:function(H){this.axisRendererProperty=H,this.notifyPropertyChanged(N.PROPERTY.AXIS_RENDERER)},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"isHorizontalAxis",{get:function(){return(0,u.getIsHorizontal)(this.axisAlignment)},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"isAxisFlipped",{get:function(){return!this.isXAxis},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"axisAlignment",{get:function(){return this.axisAlignmentProperty},set:function(H){this.axisAlignmentProperty!==H&&(this.axisAlignmentProperty=H,this.notifyPropertyChanged(N.PROPERTY.AXIS_ALIGNMENT))},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"visibleRangeLimit",{get:function(){return this.visibleRangeLimitProperty},set:function(H){s.NumberRange.areEqual(this.visibleRangeLimitProperty,H)||(this.visibleRangeLimitProperty=H,this.notifyPropertyChanged(N.PROPERTY.VISIBLE_RANGE_LIMIT))},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"visibleRangeSizeLimit",{get:function(){return this.visibleRangeSizeLimitProperty},set:function(H){if(!s.NumberRange.areEqual(this.visibleRangeSizeLimitProperty,H)){if(H.min<0)throw Error("visibleRangeSizeLimit min value must be more or equal 0");if(H.min>=H.max)throw Error("visibleRangeSizeLimit min value must be less than max value");this.visibleRangeSizeLimitProperty=H,this.notifyPropertyChanged(N.PROPERTY.VISIBLE_RANGE_SIZE_LIMIT)}},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"zoomExtentsRange",{get:function(){return this.zoomExtentsRangeProperty},set:function(H){s.NumberRange.areEqual(this.zoomExtentsRangeProperty,H)||(this.zoomExtentsRangeProperty=H,this.notifyPropertyChanged(N.PROPERTY.ZOOMEXTENTS_RANGE))},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"isInnerAxis",{get:function(){return this.isInnerAxisProperty},set:function(H){this.isInnerAxisProperty!==H&&(this.isInnerAxisProperty=H,this.notifyPropertyChanged(N.PROPERTY.IS_INNER_AXIS))},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"isPrimaryAxis",{get:function(){return this.isPrimaryAxisProperty},set:function(H){var U=this;if(this.isPrimaryAxisProperty!==H&&(this.isPrimaryAxisProperty=H,this.notifyPropertyChanged(N.PROPERTY.IS_PRIMARY_AXIS)),H&&!this.isStackedAxis){var I=this.isXAxis?this.parentSurface.xAxes:this.parentSurface.yAxes;I.asArray().forEach(function(Q){Q!==U&&!Q.isStackedAxis&&(Q.isPrimaryAxis=!1)})}},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"isStackedAxis",{get:function(){var H=this.parentSurface.layoutManager.getAxisLayoutStrategy(this);return H.isStacked},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"backgroundColor",{get:function(){return this.backgroundColorProperty},set:function(H){this.backgroundColorProperty=H,this.invalidateParentCallback&&this.invalidateParentCallback()},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"stackedAxisLength",{get:function(){return this.stackedAxisLengthProperty},set:function(H){this.stackedAxisLengthProperty!==H&&(this.stackedAxisLengthProperty=H,this.notifyPropertyChanged(N.PROPERTY.AXIS_LENGTH))},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"axisLength",{get:function(){var H,U,I=this.parentSurface.seriesViewRect;if(!I)return(H=this.axisLengthProperty)!==null&&H!==void 0?H:0;var Q=this.isHorizontalAxis?I.width:I.height;return(U=this.axisLengthProperty)!==null&&U!==void 0?U:Q},set:function(H){this.axisLengthProperty!==H&&(this.axisLengthProperty=H,this.notifyPropertyChanged(N.PROPERTY.AXIS_LENGTH))},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"axisThickness",{get:function(){return this.axisRenderer.axisThickness},set:function(H){this.axisRenderer.axisThickness!==H&&(this.axisLengthProperty=H,this.notifyPropertyChanged(N.PROPERTY.AXIS_THICKNESS))},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"offset",{get:function(){var H;return(H=this.offsetOverrideProperty)!==null&&H!==void 0?H:this.offsetProperty},set:function(H){this.offsetProperty!==H&&(this.offsetProperty=H,this.offsetOverrideProperty===void 0&&(this.clearCoordCalcCache(),this.notifyPropertyChanged(N.PROPERTY.OFFSET)))},enumerable:!1,configurable:!0}),K.prototype.overrideOffset=function(H){this.offsetOverrideProperty!==H&&(this.offsetOverrideProperty=H,this.clearCoordCalcCache(),this.notifyPropertyChanged(N.PROPERTY.OFFSET))},Object.defineProperty(K.prototype,"isVerticalChart",{get:function(){return this.isXAxis?!![u.EAxisAlignment.Left,u.EAxisAlignment.Right].includes(this.axisAlignment):!![u.EAxisAlignment.Top,u.EAxisAlignment.Bottom].includes(this.axisAlignment)},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"dpiAdjustedLabelStyle",{get:function(){return this.dpiAdjustedLabelStyleCache||(this.dpiAdjustedLabelStyleCache=w.DpiHelper.adjustTextStyle(this.labelStyleProperty)),this.dpiAdjustedLabelStyleCache},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"labelStyle",{get:function(){return this.labelStyleProperty},set:function(H){var U=i(i({},this.labelStyle),H);this.labelStyleProperty=this.getlabelStyleProxy(U),this.notifyPropertyChanged(N.PROPERTY.TEXT_STYLE),this.dpiAdjustedLabelStyleCache=void 0},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"axisBorder",{get:function(){return this.axisBorderProperty},set:function(H){var U,I,Q,Z,ee,ie,de,pe,_e,Te;this.axisBorder.borderTop=(I=(U=H==null?void 0:H.borderTop)!==null&&U!==void 0?U:H==null?void 0:H.border)!==null&&I!==void 0?I:this.axisBorder.borderTop,this.axisBorder.borderLeft=(Z=(Q=H==null?void 0:H.borderLeft)!==null&&Q!==void 0?Q:H==null?void 0:H.border)!==null&&Z!==void 0?Z:this.axisBorder.borderLeft,this.axisBorder.borderBottom=(ie=(ee=H==null?void 0:H.borderBottom)!==null&&ee!==void 0?ee:H==null?void 0:H.border)!==null&&ie!==void 0?ie:this.axisBorder.borderBottom,this.axisBorder.borderRight=(pe=(de=H==null?void 0:H.borderRight)!==null&&de!==void 0?de:H==null?void 0:H.border)!==null&&pe!==void 0?pe:this.axisBorder.borderRight,this.axisBorder.border=(_e=H==null?void 0:H.border)!==null&&_e!==void 0?_e:this.axisBorder.border,this.axisBorder.color=(Te=H==null?void 0:H.color)!==null&&Te!==void 0?Te:this.axisBorder.color,this.notifyPropertyChanged(N.PROPERTY.BORDER)},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"autoRangeAnimation",{get:function(){return this.autoRangeAnimationProperty},set:function(H){this.autoRangeAnimationProperty=i(i({},this.autoRangeAnimation),H)},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"clipToXRange",{get:function(){return this.clipToXRangeProperty},set:function(H){this.clipToXRangeProperty!==H&&(this.clipToXRangeProperty=H,this.notifyPropertyChanged(N.PROPERTY.DRAW_ONLY_WITHIN_XRANGE))},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"isStaticAxis",{get:function(){return this.isStaticAxisProperty},set:function(H){this.isStaticAxisProperty=H,H?this.tickCoordinatesProvider=new _.StaticTickCoordinatesProvider:this.tickCoordinatesProvider=new S.DefaultTickCoordinatesProvider},enumerable:!1,configurable:!0}),K.prototype.applyTheme=function(H){var U=this.parentSurface.previousThemeProvider;this.axisBandsFill===U.axisBandsFill&&(this.axisBandsFill=H.axisBandsFill),this.labelStyle.color===U.tickTextBrush&&(this.labelStyle={color:H.tickTextBrush}),this.minorGridLineStyle.color===U.minorGridLineBrush&&(this.minorGridLineStyle={color:H.minorGridLineBrush}),this.majorGridLineStyle.color===U.majorGridLineBrush&&(this.majorGridLineStyle={color:H.majorGridLineBrush}),this.minorTickLineStyle.color===U.minorGridLineBrush&&(this.minorTickLineStyle={color:H.minorGridLineBrush}),this.majorTickLineStyle.color===U.majorGridLineBrush&&(this.majorTickLineStyle={color:H.majorGridLineBrush}),this.axisTitleStyle.color===U.axisTitleColor&&(this.axisTitleStyle={color:H.axisTitleColor})},K.prototype.setParentSurface=function(H){this.parentSurface=H,this.axisTitleRenderer.parentSurface=H},K.prototype.onAttach=function(H,U,I){this.setParentSurface(H),this.setIsXAxis(U),this.isPrimaryAxisProperty=I},K.prototype.onDetach=function(){this.removeLinksToAxis(),this.parentSurface=void 0,this.isPrimaryAxisProperty=!1,this.invalidateParentCallback=void 0},K.prototype.measure=function(){if(this.isVisible){var H=this.getTicks(!0).majorTickLabels,U=this.drawMinorTickLines||this.drawMajorTickLines;A.DebugForDpi&&console.log("Measure. fontSize: ".concat(this.labelStyle.fontSize,", dpiAdjusted: ").concat(this.dpiAdjustedLabelStyle.fontSize)),this.axisRenderer.measure(this.isHorizontalAxis,this.dpiAdjustedLabelStyle,H,this.getTicksMaxSize(),this.labelProvider,this.drawLabels,U),this.axisTitleRenderer.measure(this.axisTitle,this.dpiAdjustedAxisTitleStyle,this.axisAlignment)}else this.axisRenderer.desiredHeight=0,this.axisRenderer.desiredWidth=0,this.axisTitleRenderer.desiredHeight=0,this.axisTitleRenderer.desiredWidth=0;this.isMeasured=!0},K.prototype.onDpiChanged=function(){this.dpiAdjustedLabelStyleCache=void 0},K.prototype.prepareRenderData=function(){this.getCurrentCoordinateCalculator()},K.prototype.getCurrentCoordinateCalculator=function(){var H=W.prototype.getCurrentCoordinateCalculator.call(this);return H},K.prototype.draw=function(H){var U=this,I,Q,Z;if(this.getIsValidForDrawing()){var ee=this.parentSurface.clipRect,ie=(0,b.calculateAbsoluteRenderLayer)(this.parentSurface.getSurfaceRenderOrder(),this.parentSurface.stepBetweenLayers,d.EDefaultRenderLayer.AxisBordersLayer);this.isPolarAxis||H.enqueueLayeredDraw(function(){var We,xe,ve,he=v.PerformanceDebugHelper.mark(v.EPerformanceMarkType.DrawAxisBorderStart,{contextId:U.id,parentContextId:(We=U.parentSurface)===null||We===void 0?void 0:We.id,level:v.EPerformanceDebugLevel.Verbose});(0,T.drawBorder)(H,U.webAssemblyContext2D,U.solidBrushCacheBorder,U.viewRect,ee,U.axisBorder.borderLeft||U.axisBorder.border,U.axisBorder.borderTop||U.axisBorder.border,U.axisBorder.borderRight||U.axisBorder.border,U.axisBorder.borderBottom||U.axisBorder.border,U.axisBorder.color),v.PerformanceDebugHelper.mark(v.EPerformanceMarkType.DrawAxisBorderEnd,{contextId:U.id,parentContextId:(xe=U.parentSurface)===null||xe===void 0?void 0:xe.id,relatedId:(ve=he==null?void 0:he.detail)===null||ve===void 0?void 0:ve.relatedId,level:v.EPerformanceDebugLevel.Verbose})},ie);var de=v.PerformanceDebugHelper.mark(v.EPerformanceMarkType.GetTicksStart,{contextId:this.id,parentContextId:(I=this.parentSurface)===null||I===void 0?void 0:I.id,level:v.EPerformanceDebugLevel.Verbose}),pe=this.getTicksWithCoords();v.PerformanceDebugHelper.mark(v.EPerformanceMarkType.GetTicksEnd,{contextId:this.id,parentContextId:(Q=this.parentSurface)===null||Q===void 0?void 0:Q.id,relatedId:(Z=de==null?void 0:de.detail)===null||Z===void 0?void 0:Z.relatedId,level:v.EPerformanceDebugLevel.Verbose});var _e=this.minorGridLineStyle,Te=this.majorGridLineStyle,De=this.minorTickLineStyle,Pe=this.majorTickLineStyle,Ee=this.getPenForLines(this.penCacheForMinorGridLines,_e.color,_e.strokeThickness,_e.strokeDashArray),Re=this.getPenForLines(this.penCacheForMajorGridLines,Te.color,Te.strokeThickness,Te.strokeDashArray),je=this.getPenForLines(this.penCacheForMinorTickLines,De.color,De.strokeThickness),Ke=this.getPenForLines(this.penCacheForMajorTickLines,Pe.color,Pe.strokeThickness);this.isPrimaryAxis&&this.drawAxisBandsAndGridLines(H,pe,Ee,Re);var ot=(0,b.calculateAbsoluteRenderLayer)(this.parentSurface.getSurfaceRenderOrder(),this.parentSurface.stepBetweenLayers,d.EDefaultRenderLayer.AxesLayer);H.enqueueLayeredDraw(function(){var We,xe,ve,he,Se,be,ke,qe,rt,St,xt,It;if(U.backgroundColorProperty){var Zt=v.PerformanceDebugHelper.mark(v.EPerformanceMarkType.DrawAxisBackgroundStart,{contextId:U.id,parentContextId:(We=U.parentSurface)===null||We===void 0?void 0:We.id,level:v.EPerformanceDebugLevel.Verbose});U.axisRenderer.viewRect,U.axisTitleRenderer.viewRect;var ct=U.solidBrushCacheAxisBackground.newBrush(U.backgroundColorProperty,!1),Qe=void 0;if(Qe=(0,C.createNativeRect)(U.webAssemblyContext2D,0,0,U.viewRect.width,U.viewRect.height),Qe){var Et=(0,x.getVectorRectVertex)(U.webAssemblyContext2D);Et.push_back(Qe),H.drawRects(Et,ct,ee,U.viewRect.x,U.viewRect.y)}v.PerformanceDebugHelper.mark(v.EPerformanceMarkType.DrawAxisBackgroundEnd,{contextId:U.id,parentContextId:(xe=U.parentSurface)===null||xe===void 0?void 0:xe.id,relatedId:(ve=Zt==null?void 0:Zt.detail)===null||ve===void 0?void 0:ve.relatedId,level:v.EPerformanceDebugLevel.Verbose})}if(U.drawLabels){A.DebugForDpi&&console.log("Draw. fontSize: ".concat(U.labelStyle.fontSize,", dpiAdjusted: ").concat(U.dpiAdjustedLabelStyle.fontSize));var Zt=v.PerformanceDebugHelper.mark(v.EPerformanceMarkType.DrawAxisLabelsStart,{contextId:U.id,parentContextId:(he=U.parentSurface)===null||he===void 0?void 0:he.id,level:v.EPerformanceDebugLevel.Verbose});U.axisRenderer.drawLabels(H,U.axisAlignment,U.isInnerAxis,pe.majorTickLabels,pe.majorTickCoords,U.offset,U.dpiAdjustedLabelStyle,U.isVerticalChart,U.flippedCoordinates,U.labelProvider),v.PerformanceDebugHelper.mark(v.EPerformanceMarkType.DrawAxisLabelsEnd,{contextId:U.id,parentContextId:(Se=U.parentSurface)===null||Se===void 0?void 0:Se.id,relatedId:(be=Zt==null?void 0:Zt.detail)===null||be===void 0?void 0:be.relatedId,level:v.EPerformanceDebugLevel.Verbose})}if(U.drawMinorTickLines){var Zt=v.PerformanceDebugHelper.mark(v.EPerformanceMarkType.DrawMinorTicksStart,{contextId:U.id,parentContextId:(ke=U.parentSurface)===null||ke===void 0?void 0:ke.id,level:v.EPerformanceDebugLevel.Verbose});U.axisRenderer.drawTicks(H,U.axisAlignment,U.isInnerAxis,pe.minorTickCoords,U.offset,je,De),v.PerformanceDebugHelper.mark(v.EPerformanceMarkType.DrawMinorTicksEnd,{contextId:U.id,parentContextId:(qe=U.parentSurface)===null||qe===void 0?void 0:qe.id,relatedId:(rt=Zt==null?void 0:Zt.detail)===null||rt===void 0?void 0:rt.relatedId,level:v.EPerformanceDebugLevel.Verbose})}if(U.drawMajorTickLines){var Zt=v.PerformanceDebugHelper.mark(v.EPerformanceMarkType.DrawMajorTicksStart,{contextId:U.id,parentContextId:(St=U.parentSurface)===null||St===void 0?void 0:St.id,level:v.EPerformanceDebugLevel.Verbose});U.axisRenderer.drawTicks(H,U.axisAlignment,U.isInnerAxis,pe.majorTickCoords,U.offset,Ke,Pe),v.PerformanceDebugHelper.mark(v.EPerformanceMarkType.DrawMajorTicksEnd,{contextId:U.id,parentContextId:(xt=U.parentSurface)===null||xt===void 0?void 0:xt.id,relatedId:(It=Zt==null?void 0:Zt.detail)===null||It===void 0?void 0:It.relatedId,level:v.EPerformanceDebugLevel.Verbose})}U.axisTitleRenderer.draw(H),U.labelProvider.useNativeText&&U.parentSurface.renderNativeAxisLabelsImmediately&&(H.resetAndClip(ee),H.endFonts(!0))},ot)}},K.prototype.drawDebug=function(H){var U=this;this.axisRenderer.drawDebug=!0;var I=this.parentSurface.chartViewRect,Q=function(){var ee=U.axisRenderer.viewRect,ie=(0,x.getVectorRectVertex)(U.webAssemblyContext2D),de=new U.webAssemblyContext2D.SCRTSolidBrush((0,g.parseColorToUIntArgb)("rgba(255,0,0,0.3)"),!1),pe=(0,C.createNativeRect)(U.webAssemblyContext2D,0,0,ee.width,ee.height);ie.push_back(pe),H.drawRects(ie,de,I,ee.left,ee.top),de.delete()};Q();var Z=function(){var ee=U.axisTitleRenderer.viewRect,ie=(0,x.getVectorRectVertex)(U.webAssemblyContext2D),de=new U.webAssemblyContext2D.SCRTSolidBrush((0,g.parseColorToUIntArgb)("rgba(0,255,0,0.7)"),!1),pe=(0,C.createNativeRect)(U.webAssemblyContext2D,0,0,ee.width,ee.height);ie.push_back(pe),H.drawRects(ie,de,I,ee.left,ee.top),de.delete()};Z()},K.prototype.getDefaultNonZeroRange=function(){return new s.NumberRange(0,10)},K.prototype.getMaximumRange=function(){if(this.zoomExtentsRange)return this.zoomExtentsRange;var H;this.parentSurface&&this.parentSurface.renderableSeries.size()>0&&(H=this.isXAxis?this.getMaxXRange():this.getWindowedYRange(void 0));var U=this.visibleRange||this.getDefaultNonZeroRange();return H||U},K.prototype.getWindowedYRange=function(H){var U=this;if(this.zoomExtentsRange)return this.zoomExtentsRange;var I;return this.parentSurface&&this.getVisibleRenderableSeriesByYAxis().forEach(function(Q){var Z=Q.xAxisId,ee=H!=null&&H.containsKey(Z)?H.item(Z):U.getXVisibleRange(Z),ie=U.getIsXCategoryAxis(Z);if(ee){var de=Q.getYRange(ee,ie);de&&(I=I?I.union(de):de)}}),I!=null&&I.isZero()&&(I=this.coerceZeroVisibleRange(I)),this.growBy&&I&&(I=I.growBy(this.growBy)),I=this.applyVisibleRangeLimit(I),I=this.applyVisibleRangeSizeLimit(I),I||new s.NumberRange},K.prototype.scroll=function(H,U){var I=this.visibleRange;if(I===void 0)return!1;var Q=this.getCurrentCoordinateCalculator().translateBy(H,I);if(this.visibleRangeLimit){var Z=0;Q.min<this.visibleRangeLimit.min?Z=this.visibleRangeLimit.min-Q.min:this.visibleRangeLimit.max<Q.max&&(Z=this.visibleRangeLimit.max-Q.max),Z&&(Q=new s.NumberRange(Q.min+Z,Q.max+Z))}return this.visibleRange=this.applyVisibleRangeSizeLimit(Q),!0},K.prototype.setVisibleRangeWithLimits=function(H){var U=this.applyVisibleRangeLimit(H);this.visibleRange=this.applyVisibleRangeSizeLimit(U)},K.prototype.zoomBy=function(H,U){var I=this.getCurrentCoordinateCalculator(),Q=I.zoomTranslateBy(H,U,this.visibleRange);if(!(Q.max<Q.min)){var Z=this.applyVisibleRangeLimit(Q);this.visibleRange=this.applyVisibleRangeSizeLimit(Z)}},K.prototype.zoom=function(H,U,I,Q){I===void 0&&(I=0),Q===void 0&&(Q=t.easing.outExpo);var Z=this.getCurrentCoordinateCalculator(),ee=Z.getDataValue(H),ie=Z.getDataValue(U),de=ee<ie?ee:ie,pe=ee<ie?ie:ee,_e=this.applyVisibleRangeLimit(new s.NumberRange(de,pe)),Te=this.applyVisibleRangeSizeLimit(_e);this.animateVisibleRange(Te,I,Q)},K.prototype.scale=function(H,U,I){var Q=H.max-H.min,Z,ee,ie=this.flippedCoordinates?!I:I,de=this.flippedCoordinates?-U:U;ie?(Z=H.min,ee=de>0?Z+Q/(1+de):Z+Q*(1+Math.abs(de))):(ee=H.max,Z=de>0?ee-Q*(1+de):ee-Q/(1+Math.abs(de)));var pe=this.applyVisibleRangeLimit(new s.NumberRange(Z,ee));this.visibleRange=this.applyVisibleRangeSizeLimit(pe)},K.prototype.animateVisibleRange=function(H,U,I,Q){var Z=this,ee;if(I===void 0&&(I=t.easing.outCubic),Q===void 0&&(Q=function(){}),U<=0){this.visibleRange=H||this.visibleRange,Q();return}return(ee=this.visibleRangeAnimationToken)===null||ee===void 0||ee.cancel(),this.visibleRangeAnimationToken=o.NumberRangeAnimator.animate(this.visibleRange,H,U,function(ie){Z.visibleRange=ie},function(){Z.visibleRangeAnimationToken=void 0,Q()},I),this.parentSurface.addAnimation(this.visibleRangeAnimationToken),this.visibleRangeAnimationToken},K.prototype.getVisibleRenderableSeriesByXAxis=function(){var H=this;return this.parentSurface?this.parentSurface.renderableSeries.asArray().filter(function(U){return U.xAxis===H&&U.isVisible&&U.hasDataSeriesValues()}):[]},K.prototype.getVisibleRenderableSeriesByYAxis=function(){var H=this;if(!this.parentSurface)return[];var U=this.parentSurface.renderableSeries.asArray();return U.filter(function(I){return I.linkAxes(),I.yAxis===H&&I.isVisible&&I.hasDataSeriesValues()})},K.prototype.delete=function(){this.penCacheForMajorGridLines=(0,a.deleteSafe)(this.penCacheForMajorGridLines),this.penCacheForMinorGridLines=(0,a.deleteSafe)(this.penCacheForMinorGridLines),this.penCacheForMajorTickLines=(0,a.deleteSafe)(this.penCacheForMajorTickLines),this.penCacheForMinorTickLines=(0,a.deleteSafe)(this.penCacheForMinorTickLines),this.solidBrushCacheBorder=(0,a.deleteSafe)(this.solidBrushCacheBorder),this.solidBrushCacheAxisBands=(0,a.deleteSafe)(this.solidBrushCacheAxisBands),this.solidBrushCacheAxisBackground=(0,a.deleteSafe)(this.solidBrushCacheAxisBackground),this.axisRendererProperty=(0,a.deleteSafe)(this.axisRenderer),this.axisTitleRenderer=(0,a.deleteSafe)(this.axisTitleRenderer),this.webAssemblyContext2D=void 0,this.parentSurface=void 0,W.prototype.delete.call(this)},K.prototype.toJSON=function(){var H=this.labelProvider.toJSON(),U={autoRange:this.autoRange,autoTicks:this.autoTicks,axisAlignment:this.axisAlignment,axisBandsFill:this.axisBandsFill,axisBorder:this.axisBorder,axisTitle:this.axisTitle,axisTitleStyle:this.axisTitleStyle,drawLabels:this.drawLabels,drawMajorBands:this.drawMajorBands,drawMajorGridLines:this.drawMajorGridLines,drawMajorTickLines:this.drawMajorTickLines,drawMinorGridLines:this.drawMinorGridLines,drawMinorTickLines:this.drawMinorTickLines,flippedCoordinates:this.flippedCoordinates,growBy:this.growBy,id:this.id,isInnerAxis:this.isInnerAxis,isVisible:this.isVisible,labelStyle:this.labelStyle,majorGridLineStyle:this.majorGridLineStyle,majorTickLineStyle:this.majorTickLineStyle,maxAutoTicks:this.maxAutoTicks,minorGridLineStyle:this.minorGridLineStyle,minorTickLineStyle:this.minorTickLineStyle,visibleRange:this.hasDefaultVisibleRange()?void 0:this.visibleRange,visibleRangeLimit:this.visibleRangeLimit,zoomExtentsRange:this.zoomExtentsRange,minorsPerMajor:this.minorsPerMajor,majorDelta:this.majorDelta,minorDelta:this.minorDelta,labelProvider:H,keepLabelsWithinAxis:this.axisRenderer.keepLabelsWithinAxis,clipToXRange:this.clipToXRange,isStaticAxis:this.isStaticAxis,stackedAxisLength:this.stackedAxisLength,axisThickness:this.axisThickness,autoRangeAnimation:this.autoRangeAnimation,visibleRangeSizeLimit:this.visibleRangeSizeLimit,hideOverlappingLabels:this.axisRenderer.hideOverlappingLabels,backgroundColor:this.backgroundColor,overrideOffset:this.offsetOverrideProperty,allowFastMath:this.allowFastMath};return{type:this.type,options:U}},K.prototype.createAxisRender=function(){return new D.AxisRenderer(this.webAssemblyContext2D)},K.prototype.getTicksMaxSize=function(){var H,U,I=!((H=this.majorTickLineStyle)===null||H===void 0)&&H.tickSize?this.majorTickLineStyle.tickSize*w.DpiHelper.PIXEL_RATIO:0,Q=!((U=this.minorTickLineStyle)===null||U===void 0)&&U.tickSize?this.minorTickLineStyle.tickSize*w.DpiHelper.PIXEL_RATIO:0;return Math.max(I,Q)},K.prototype.getIsValidForDrawing=function(){return this.isVisible},K.prototype.drawAxisBandsAndGridLines=function(H,U,I,Q){var Z=this;if(this.drawMajorBands){var ee=this.solidBrushCacheAxisBands.newBrush(this.axisBandsFill,!0),ie=(0,b.calculateAbsoluteRenderLayer)(this.parentSurface.getSurfaceRenderOrder(),this.parentSurface.stepBetweenLayers,d.EDefaultRenderLayer.AxisBandsLayer);H.enqueueLayeredDraw(function(){var _e,Te,De,Pe=v.PerformanceDebugHelper.mark(v.EPerformanceMarkType.DrawAxisBandsStart,{contextId:Z.id,parentContextId:(_e=Z.parentSurface)===null||_e===void 0?void 0:_e.id,level:v.EPerformanceDebugLevel.Verbose});Z.drawAxisBands(H,U.majorTicks,U.majorTickCoords,ee),v.PerformanceDebugHelper.mark(v.EPerformanceMarkType.DrawAxisBandsEnd,{contextId:Z.id,parentContextId:(Te=Z.parentSurface)===null||Te===void 0?void 0:Te.id,relatedId:(De=Pe==null?void 0:Pe.detail)===null||De===void 0?void 0:De.relatedId,level:v.EPerformanceDebugLevel.Verbose})},ie)}if(this.drawMinorGridLines){var de=(0,b.calculateAbsoluteRenderLayer)(this.parentSurface.getSurfaceRenderOrder(),this.parentSurface.stepBetweenLayers,d.EDefaultRenderLayer.MinorGridLinesLayer);H.enqueueLayeredDraw(function(){var _e,Te,De,Pe=v.PerformanceDebugHelper.mark(v.EPerformanceMarkType.DrawMinorGridLinesStart,{contextId:Z.id,parentContextId:(_e=Z.parentSurface)===null||_e===void 0?void 0:_e.id,level:v.EPerformanceDebugLevel.Verbose});Z.drawGridLines(H,U.minorTickCoords,I,!1),v.PerformanceDebugHelper.mark(v.EPerformanceMarkType.DrawMinorGridLinesEnd,{contextId:Z.id,parentContextId:(Te=Z.parentSurface)===null||Te===void 0?void 0:Te.id,relatedId:(De=Pe==null?void 0:Pe.detail)===null||De===void 0?void 0:De.relatedId,level:v.EPerformanceDebugLevel.Verbose})},de)}if(this.drawMajorGridLines){var pe=(0,b.calculateAbsoluteRenderLayer)(this.parentSurface.getSurfaceRenderOrder(),this.parentSurface.stepBetweenLayers,d.EDefaultRenderLayer.MajorGridLinesLayer);H.enqueueLayeredDraw(function(){var _e,Te,De,Pe=v.PerformanceDebugHelper.mark(v.EPerformanceMarkType.DrawMajorGridLinesStart,{contextId:Z.id,parentContextId:(_e=Z.parentSurface)===null||_e===void 0?void 0:_e.id,level:v.EPerformanceDebugLevel.Verbose});Z.drawGridLines(H,U.majorTickCoords,Q,!0),v.PerformanceDebugHelper.mark(v.EPerformanceMarkType.DrawMajorGridLinesEnd,{contextId:Z.id,parentContextId:(Te=Z.parentSurface)===null||Te===void 0?void 0:Te.id,relatedId:(De=Pe==null?void 0:Pe.detail)===null||De===void 0?void 0:De.relatedId,level:v.EPerformanceDebugLevel.Verbose})},pe)}},K.prototype.drawAxisBands=function(H,U,I,Q){var Z=this;if(!(!U||U.length===0)){var ee=this.parentSurface.seriesViewRect,ie=this.isHorizontalAxis?h.EXyDirection.XDirection:h.EXyDirection.YDirection,de=this.offset,pe=this.axisLength+this.offset,_e=this.isAxisFlipped!==this.flippedCoordinates;if(_e){var Te=pe;pe=de,de=Te}var De=this.getMajorTickIndex(U[0]),Pe=De%2===0,Ee=(0,x.getVectorRectVertex)(this.webAssemblyContext2D),Re=function(je,Ke,ot){if(ot){var We=(0,C.createNativeRect)(Z.webAssemblyContext2D,ie===h.EXyDirection.YDirection?0:je,ie===h.EXyDirection.YDirection?je:0,ie===h.EXyDirection.YDirection?ee.width:Ke,ie===h.EXyDirection.YDirection?Ke:ee.height);Ee.push_back(We)}};U.forEach(function(je,Ke){var ot=Ke===0?de:I[Ke-1],We=I[Ke];Re(ot,We,Pe),Pe=!Pe}),Re(pe,I[U.length-1],Pe),H.drawRects(Ee,Q,this.parentSurface.clipRect,ee.left,ee.top)}},K.prototype.drawGridLines=function(H,U,I,Q){var Z=this;if(!(!U||U.length===0)){var ee=this.parentSurface.seriesViewRect,ie=(0,x.getVectorColorVertex)(this.webAssemblyContext2D),de=(0,x.getVertex)(this.webAssemblyContext2D,0,0);U.forEach(function(pe){var _e=Z.isHorizontalAxis?pe:0,Te=Z.isHorizontalAxis?pe:ee.width,De=Z.isHorizontalAxis?0:pe,Pe=Z.isHorizontalAxis?ee.height:pe;de.SetPosition(_e,De),ie.push_back(de),de.SetPosition(Te,Pe),ie.push_back(de)}),H.drawLinesNative(ie,I,b.ELineDrawMode.DiscontinuousLine,this.parentSurface.clipRect,ee.left,ee.top)}},K.prototype.getXVisibleRange=function(H){return this.parentSurface.getXAxisById(H).visibleRange},K.prototype.getIsXCategoryAxis=function(H){return this.parentSurface.getXAxisById(H).isCategoryAxis},K.prototype.getLabels=function(H){return this.labelProvider.getLabels(H)},K.prototype.getXDataRange=function(){var H;return this.parentSurface&&this.getVisibleRenderableSeriesByXAxis().forEach(function(U){var I=U.getXRange();I&&(H=H?H.union(I):I)}),H},K.prototype.notifyPropertyChanged=function(H){H===N.PROPERTY.IS_XAXIS&&this.axisAlignmentProperty===void 0&&(this.axisAlignmentProperty=this.isXAxisProperty?u.EAxisAlignment.Bottom:u.EAxisAlignment.Right),H===N.PROPERTY.AXIS_RENDERER&&this.axisRendererProperty.attachedToAxis(this),W.prototype.notifyPropertyChanged.call(this,H)},K.prototype.getMaxXRange=function(){var H=this.getXDataRange();if(H)return this.growBy&&(H=H.growBy(this.growBy)),H=this.applyVisibleRangeLimit(H??this.visibleRange),H=this.applyVisibleRangeSizeLimit(H),H},K.prototype.removeLinksToAxis=function(){var H=this,U=this.parentSurface;U&&(this.isXAxis?(U.renderableSeries.asArray().forEach(function(I){I.xAxisId===H.id&&(I.xAxisId=void 0)}),U.annotations.asArray().forEach(function(I){I.xAxisId===H.id&&(I.xAxisId=void 0)}),U.chartModifiers.asArray().forEach(function(I){var Q=I;Q.xAxisId===H.id&&(Q.xAxisId=void 0),Q.includedXAxes.removeId(H.id)})):(U.renderableSeries.asArray().forEach(function(I){I.yAxisId===H.id&&(I.yAxisId=void 0)}),U.annotations.asArray().forEach(function(I){I.yAxisId===H.id&&(I.yAxisId=void 0)}),U.chartModifiers.asArray().forEach(function(I){var Q=I;Q.yAxisId===H.id&&(Q.yAxisId=void 0),Q.includedYAxes.removeId(H.id)})))},K.prototype.getAxisSize=function(){return this.axisLength},K.prototype.getMajorTickIndex=function(H){var U=this.majorDeltaProperty,I=H/U;return Math.round(I)},K.prototype.getTicks=function(H){var U,I;if(H||!this.tickCache){var Q=this.getMaxAutoTicks();if(this.autoTicks){var Z=this.deltaCalculator.getDeltaFromRange(this.visibleRange.min,this.visibleRange.max,this.minorsPerMajor,Q);this.minorDeltaProperty=Z.min,this.majorDeltaProperty=Z.max}var ee=this.tickCoordinatesProvider.getTickCoordinates(void 0,void 0),ie=ee.majorTickCoords,de=ee.minorTickCoords,pe=ee.majorTickOverrides,_e=ee.minorTickOverRides,Te=this.drawLabels||this.drawMajorGridLines||this.drawMajorTickLines?pe??this.tickProvider.getMajorTicks((U=this.minorDeltaProperty)!==null&&U!==void 0?U:this.majorDeltaProperty/this.minorsPerMajor,this.majorDeltaProperty,this.visibleRange,this.getCurrentCoordinateCalculator()):[],De=this.drawMinorGridLines||this.drawMinorTickLines?_e??this.tickProvider.getMinorTicks((I=this.minorDeltaProperty)!==null&&I!==void 0?I:this.majorDeltaProperty/this.minorsPerMajor,this.majorDeltaProperty,this.visibleRange,this.getCurrentCoordinateCalculator()):[],Pe=this.visibleRange,Ee=Pe.min,Re=Pe.max;Te=Te.filter(function(Ke){return Ke>=Ee&&Ke<=Re}),De=De.filter(function(Ke){return Ke>=Ee&&Ke<=Re});var je=[];Te.length>1e3&&this.drawLabels?console.warn("Axis settings result in more than 1000 labels.  Label drawing is disabled.  If using autoTicks: false, check that you have set sensible deltas."):je=this.drawLabels?this.getLabels(Te):[],this.tickCache={majorTicks:Te,majorTickLabels:je,majorTickCoords:ie,minorTicks:De,minorTickCoords:de}}return this.tickCache},K.prototype.getTicksWithCoords=function(){if(this.tickCache||this.getTicks(!0),this.tickCache.majorTickCoords===void 0){var H=this.tickCoordinatesProvider.getTickCoordinates(this.tickCache.majorTicks,this.tickCache.minorTicks),U=H.majorTickCoords,I=H.minorTickCoords;this.tickCache.majorTickCoords=U,this.tickCache.minorTickCoords=I}return this.tickCache},K.prototype.getPenForLines=function(H,U,I,Q){return(0,y.createPenInCache)(H,U,I,1,Q,!1)},K.prototype.applyVisibleRangeLimit=function(H){if(H){if(!this.visibleRangeLimit)return H;var U=H.clip(this.visibleRangeLimit);return U.min>=U.max?(console.warn("Can not apply visibleRangeLimit for the ".concat(this.isXAxis?"xAxis":"yAxis"," with ID ").concat(this.id)),H):U}},K.prototype.applyVisibleRangeSizeLimit=function(H){if(H){var U=Math.abs(H.min)/Math.pow(10,14),I=H.diff;if(I<U){var Q=H.min+I/2;return new s.NumberRange(Q-U/2,Q+U/2)}if(!this.visibleRangeSizeLimit)return H;if(I<0)return console.warn("Can not apply visibleRangeSizeLimit for the ".concat(this.isXAxis?"xAxis":"yAxis"," with ID ").concat(this.id)),H;var Z=H,ee=this.visibleRangeSizeLimit,ie=ee.min,de=ee.max,Q=H.min+I/2;return I<ie?Z=new s.NumberRange(Q-ie/2,Q+ie/2):I>de&&(Z=new s.NumberRange(Q-de/2,Q+de/2)),Z}},K})(L.AxisCore);r.AxisBase2D=V})(GC)),GC}var KC={},ZC={},TI={},Zte;function eU(){if(Zte)return TI;Zte=1,Object.defineProperty(TI,"__esModule",{value:!0}),TI.DeltaCalculator=void 0;var r=(function(){function e(){}return e.prototype.attachedToAxis=function(i){this.parentAxis=i},e.prototype.detachedFromAxis=function(){this.parentAxis=void 0},e})();return TI.DeltaCalculator=r,TI}var Jte;function z1(){if(Jte)return ZC;Jte=1;var r=ZC&&ZC.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(ZC,"__esModule",{value:!0}),ZC.NumericDeltaCalculator=void 0;var e=ni(),i=oi(),n=eU(),t=(function(o){r(a,o);function a(s){var l=o.call(this)||this;return l.webAssemblyContext=s,l}return a.prototype.getDeltaFromRange=function(s,l,u,c){e.Guard.argumentIsRealNumber(s,"min"),e.Guard.argumentIsRealNumber(l,"max");var d=this.webAssemblyContext.NiceDoubleScale.CalculateTickSpacing(s,l,u,c),f=new i.NumberRange(d.minD,d.maxD);return d.delete(),f},a})(n.DeltaCalculator);return ZC.NumericDeltaCalculator=t,ZC}var Qte;function T8(){if(Qte)return KC;Qte=1;var r=KC&&KC.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(KC,"__esModule",{value:!0}),KC.CategoryDeltaCalculator=void 0;var e=ni(),i=oi(),n=z1(),t=(function(o){r(a,o);function a(s){return o.call(this,s)||this}return a.prototype.getDeltaFromRange=function(s,l,u,c){return e.Guard.argumentIsRealNumber(s,"min"),e.Guard.argumentIsRealNumber(l,"max"),l<=c?new i.NumberRange(1/u,1):o.prototype.getDeltaFromRange.call(this,s,l,u,c)},a})(n.NumericDeltaCalculator);return KC.CategoryDeltaCalculator=t,KC}var ere;function ISe(){if(ere)return VC;ere=1;var r=VC&&VC.__extends||(function(){var d=function(f,h){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,g){p.__proto__=g}||function(p,g){for(var v in g)Object.prototype.hasOwnProperty.call(g,v)&&(p[v]=g[v])},d(f,h)};return function(f,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");d(f,h);function p(){this.constructor=f}f.prototype=h===null?Object.create(h):(p.prototype=h.prototype,new p)}})();Object.defineProperty(VC,"__esModule",{value:!0}),VC.CategoryAxisBase=void 0;var e=Mr(),i=oi(),n=tn(),t=Ld(),o=DSe(),a=RSe(),s=U1(),l=Eg(),u=T8(),c=(function(d){r(f,d);function f(h,p){var g=this,v,y,m;return g=d.call(this,h,p)||this,g.defaultXValuesProperty=[],g.defaultXStartProperty=0,g.defaultXStepProperty=1,g.defaultXValuesProperty=(v=p==null?void 0:p.defaultXValues)!==null&&v!==void 0?v:g.defaultXValuesProperty,g.defaultXStartProperty=(y=p==null?void 0:p.defaultXStart)!==null&&y!==void 0?y:g.defaultXStartProperty,g.defaultXStepProperty=(m=p==null?void 0:p.defaultXStep)!==null&&m!==void 0?m:g.defaultXStepProperty,g.tickProvider=new s.NumericTickProvider(g.webAssemblyContext2D),g.deltaCalculator=new u.CategoryDeltaCalculator(g.webAssemblyContext2D),g.defaultBaseXValues=new g.webAssemblyContext2D.SCRTDoubleVector,g}return Object.defineProperty(f.prototype,"isCategoryAxis",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"defaultXValues",{get:function(){return this.defaultXValuesProperty},set:function(h){this.defaultXValuesProperty=h,this.invalidateParentCallback&&this.invalidateParentCallback()},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"defaultXStart",{get:function(){return this.defaultXStartProperty},set:function(h){this.defaultXStartProperty=h,this.invalidateParentCallback&&this.invalidateParentCallback()},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"defaultXStep",{get:function(){return this.defaultXStepProperty},set:function(h){this.defaultXStepProperty=h,this.invalidateParentCallback&&this.invalidateParentCallback()},enumerable:!1,configurable:!0}),f.prototype.prepareRenderData=function(){(0,e.deleteSafe)(this.coordCalcCache);var h=this.getCurrentCoordinateCalculatorInternal();this.coordCalcCache=h},f.prototype.delete=function(){this.defaultBaseXValues=(0,e.deleteSafe)(this.defaultBaseXValues),d.prototype.delete.call(this)},f.prototype.getCurrentCoordinateCalculatorInternal=function(){var h=this.visibleRange.min,p=this.visibleRange.max,g=this.axisLength,v=this.isXAxis!==this.flippedCoordinates?new o.CategoryCoordinateCalculator(this.webAssemblyContext2D,g,h,p,this.offset):new a.FlippedCategoryCoordinateCalculator(this.webAssemblyContext2D,g,h,p,this.offset);return this.updateBaseXValues(v),v},f.prototype.getXDataRange=function(){var h;return this.parentSurface&&this.getVisibleRenderableSeriesByXAxis().forEach(function(p){var g=p.getDataSeriesValuesCount(),v=1/2,y=new i.NumberRange(0-v,g-1+v);y&&(h=h?h.union(y):y)}),h},f.prototype.getMaxAutoTicks=function(){var h=this.getCurrentCoordinateCalculator();return Math.min(Math.max(1,this.maxAutoTicks),h.baseXValues.size())},f.prototype.generateDefaultXValuesForCategoryAxis=function(h,p){if(this.defaultBaseXValues.clear(),this.defaultXValues&&this.defaultXValues.length>0)(0,t.appendDoubleVectorFromJsArray)(this.webAssemblyContext2D,this.defaultBaseXValues,this.defaultXValues);else{for(var g=[],v=10,y=0;y<v;y++)g.push(h+y*p);(0,t.appendDoubleVectorFromJsArray)(this.webAssemblyContext2D,this.defaultBaseXValues,g)}return this.defaultBaseXValues},f.prototype.updateBaseXValues=function(h){var p=this,g=this.parentSurface,v=g.renderableSeries.asArray().find(function(C){return C.xAxisId===p.id});if((v==null?void 0:v.type)===n.ESeriesType.UniformHeatmapSeries)throw Error("Category Axis is not supported for UniformHeatmapRenderableSeries");if(v!=null&&v.isCollection){var y=v;if(y.size()===0)throw Error("BaseStackedCollection should have at least one BaseStackedRenderableSeries");var m=y.get(0);if(!(m!=null&&m.dataSeries)){h.baseXValues||(h.baseXValues=this.generateDefaultXValuesForCategoryAxis(this.defaultXStart,this.defaultXStep));return}h.baseXValues=m.dataSeries.getNativeXValues()}else{if(!(v!=null&&v.dataSeries)||v.dataSeries.count()<10){var b=this.defaultXStart,S=this.defaultXStep;if(v!=null&&v.dataSeries&&(v==null?void 0:v.dataSeries.count())>0){var _=v.dataSeries.getNativeXValues();b=_.get(0),v.dataSeries.count()>0&&(S=_.get(1)-_.get(0))}h.baseXValues||(h.baseXValues=this.generateDefaultXValuesForCategoryAxis(b,S));return}h.baseXValues=v.dataSeries.getNativeXValues()}},f})(l.AxisBase2D);return VC.CategoryAxisBase=c,VC}var Sm={},j5={},tre;function W1(){return tre||(tre=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.ELabelProviderType=void 0,(function(e){e.Numeric="Numeric",e.Logarithmic="Logarithmic",e.Date="Date",e.SmartDate="SmartDate",e.Text="Text",e.Pie="Pie"})(r.ELabelProviderType||(r.ELabelProviderType={}))})(j5)),j5}var Cd={},JC={},rre;function x8(){if(rre)return JC;rre=1;var r=JC&&JC.__extends||(function(){var n=function(t,o){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(a[l]=s[l])},n(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");n(t,o);function a(){this.constructor=t}t.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}})();Object.defineProperty(JC,"__esModule",{value:!0}),JC.LabelProvider=void 0;var e=$n(),i=(function(n){r(t,n);function t(o){var a=n.call(this)||this;return a.numericFormatProperty=o==null?void 0:o.labelFormat,a.precisionProperty=o==null?void 0:o.labelPrecision,a.cursorNumericFormatProperty=o==null?void 0:o.cursorLabelFormat,a.cursorPrecisionProperty=o==null?void 0:o.cursorLabelPrecision,a.prefixProperty=o==null?void 0:o.labelPrefix,a.postfixProperty=o==null?void 0:o.labelPostfix,a}return t.prototype.attachedToAxis=function(o){this.parentAxis=o},t.prototype.detachedFromAxis=function(){this.parentAxis=void 0},Object.defineProperty(t.prototype,"numericFormat",{get:function(){return this.numericFormatProperty},set:function(o){this.numericFormatProperty=o,this.invalidateParent()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"precision",{get:function(){return this.precisionProperty},set:function(o){this.precisionProperty=o,this.invalidateParent()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cursorNumericFormat",{get:function(){return this.cursorNumericFormatProperty},set:function(o){this.cursorNumericFormatProperty=o,this.invalidateParent()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cursorPrecision",{get:function(){return this.cursorPrecisionProperty},set:function(o){this.cursorPrecisionProperty=o,this.invalidateParent()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"prefix",{get:function(){return this.prefixProperty},set:function(o){this.prefixProperty=o,this.invalidateParent()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"postfix",{get:function(){return this.postfixProperty},set:function(o){this.postfixProperty=o,this.invalidateParent()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"formatLabel",{get:function(){return this.formatLabelProperty},set:function(o){this.formatLabelProperty=o,this.invalidateParent()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"formatCursorLabel",{get:function(){return this.formatCursorLabelProperty},set:function(o){this.formatCursorLabelProperty=o,this.invalidateParent()},enumerable:!1,configurable:!0}),t.prototype.applyFormat=function(o){var a,s;return((a=this.prefix)!==null&&a!==void 0?a:"")+o+((s=this.postfix)!==null&&s!==void 0?s:"")},t.prototype.toJSON=function(){var o={cursorLabelFormat:this.cursorNumericFormat,cursorLabelPrecision:this.cursorPrecision,labelFormat:this.numericFormat,labelPrecision:this.precision,labelPrefix:this.prefix,labelPostfix:this.postfix};return{type:this.type,options:o}},t.prototype.invalidateParent=function(){this.parentAxis&&this.parentAxis.invalidateParentCallback&&this.parentAxis.invalidateParentCallback()},t})(e.DeletableEntity);return JC.LabelProvider=i,JC}var ire;function ZR(){if(ire)return Cd;ire=1;var r=Cd&&Cd.__extends||(function(){var v=function(y,m){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,S){b.__proto__=S}||function(b,S){for(var _ in S)Object.prototype.hasOwnProperty.call(S,_)&&(b[_]=S[_])},v(y,m)};return function(y,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");v(y,m);function b(){this.constructor=y}y.prototype=m===null?Object.create(m):(b.prototype=m.prototype,new b)}})(),e=Cd&&Cd.__assign||function(){return e=Object.assign||function(v){for(var y,m=1,b=arguments.length;m<b;m++){y=arguments[m];for(var S in y)Object.prototype.hasOwnProperty.call(y,S)&&(v[S]=y[S])}return v},e.apply(this,arguments)},i=Cd&&Cd.__awaiter||function(v,y,m,b){function S(_){return _ instanceof m?_:new m(function(C){C(_)})}return new(m||(m=Promise))(function(_,C){function T(w){try{A(b.next(w))}catch(L){C(L)}}function x(w){try{A(b.throw(w))}catch(L){C(L)}}function A(w){w.done?_(w.value):S(w.value).then(T,x)}A((b=b.apply(v,y||[])).next())})},n=Cd&&Cd.__generator||function(v,y){var m={label:0,sent:function(){if(_[0]&1)throw _[1];return _[1]},trys:[],ops:[]},b,S,_,C;return C={next:T(0),throw:T(1),return:T(2)},typeof Symbol=="function"&&(C[Symbol.iterator]=function(){return this}),C;function T(A){return function(w){return x([A,w])}}function x(A){if(b)throw new TypeError("Generator is already executing.");for(;m;)try{if(b=1,S&&(_=A[0]&2?S.return:A[0]?S.throw||((_=S.return)&&_.call(S),0):S.next)&&!(_=_.call(S,A[1])).done)return _;switch(S=0,_&&(A=[A[0]&2,_.value]),A[0]){case 0:case 1:_=A;break;case 4:return m.label++,{value:A[1],done:!1};case 5:m.label++,S=A[1],A=[0];continue;case 7:A=m.ops.pop(),m.trys.pop();continue;default:if(_=m.trys,!(_=_.length>0&&_[_.length-1])&&(A[0]===6||A[0]===2)){m=0;continue}if(A[0]===3&&(!_||A[1]>_[0]&&A[1]<_[3])){m.label=A[1];break}if(A[0]===6&&m.label<_[1]){m.label=_[1],_=A;break}if(_&&m.label<_[2]){m.label=_[2],m.ops.push(A);break}_[2]&&m.ops.pop(),m.trys.pop();continue}A=y.call(v,m)}catch(w){A=[6,w],S=0}finally{b=_=0}if(A[0]&5)throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}};Object.defineProperty(Cd,"__esModule",{value:!0}),Cd.LabelProviderBase2D=Cd.LabelInfo=void 0;var t=So(),o=ws(),a=lc(),s=Xi(),l=Gd(),u=d1(),c=k1(),d=x8(),f=1.1,h=3,p=(function(){function v(y,m,b,S,_){this.tick=y,this.text=m,this.bitmapTexture=b,this.textureHeight=S,this.textureWidth=_,this.lastUsed=Date.now()}return v})();Cd.LabelInfo=p;var g=(function(v){r(y,v);function y(m){var b=this,S,_,C,T,x;return b=v.call(this,m)||this,b.useCache=!t.IS_TEST_ENV,b.alwaysShowFirstLabel=!1,b.tickToText=new Map,b.textVariesForSameTick=!1,b.rotationProperty=0,b.lineSpacingProperty=f,b.providerId=(0,o.generateGuid)(),b.rotationProperty=(S=m==null?void 0:m.rotation)!==null&&S!==void 0?S:b.rotationProperty,b.lineSpacing=(_=m==null?void 0:m.lineSpacing)!==null&&_!==void 0?_:b.lineSpacing,b.alwaysShowFirstLabel=(C=m==null?void 0:m.alwaysShowFirstLabel)!==null&&C!==void 0?C:b.alwaysShowFirstLabel,b.useSharedCache=(T=m==null?void 0:m.useSharedCache)!==null&&T!==void 0?T:l.SciChartDefaults.useSharedCache,b.useNativeText=(x=m==null?void 0:m.useNativeText)!==null&&x!==void 0?x:l.SciChartDefaults.useNativeText,b}return Object.defineProperty(y.prototype,"rotation",{get:function(){return this.rotationProperty},set:function(m){this.rotationProperty!==m&&(this.rotationProperty=m,this.invalidateParent())},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"lineSpacing",{get:function(){return this.useNativeText?this.lineSpacingProperty===f?h:this.lineSpacingProperty:this.lineSpacingProperty},set:function(m){this.lineSpacingProperty=m,this.invalidateParent()},enumerable:!1,configurable:!0}),y.prototype.getLabels=function(m){var b=this,S=this.parentAxis;this.useCache&&(this.styleId?c.labelCache.checkStyle(this.styleId,this.getCachedStyle())||(this.resetCache(),this.styleId=c.labelCache.getStyleId(this.getCachedStyle())):this.styleId=c.labelCache.getStyleId(this.getCachedStyle()));var _=m;if(this.parentAxis.isCategoryAxis){var C=this.parentAxis.getCurrentCoordinateCalculator();_=m.map(function(U){return C.transformIndexToData(U)})}var T=[];if(this.useCache){if(this.useNativeText){if(this.currentNativeFontName==="SCRT_Loading"){var N=this.parentAxis.parentSurface.currentWebGlRenderContext,V=N.getFont(this.getCachedStyle(),this.rotation!==0,!1);V.GetFaceName()!==this.currentNativeFontName&&this.invalidateCache()}for(var W=[],K=0,H=_;K<H.length;K++){var w=H[K],D=this.tickToText.get(w);if(this.textVariesForSameTick){var k=this.formatLabel(w);D&&D===k?T.push(D):(this.tickToText.set(w,k),W.push(k),T.push(k))}else if(D){T.push(D);var L=c.labelCache.getLabel(D,this.styleId);L||W.push(D)}else{var k=this.formatLabel(w);this.tickToText.set(w,k),W.push(k),T.push(k)}}this.getLabelSizesNative(W,S.dpiAdjustedLabelStyle)}else for(var x=0,A=_;x<A.length;x++){var w=A[x],L=void 0,k=void 0,D=this.tickToText.get(w);if(this.textVariesForSameTick?(k=this.formatLabel(w),D&&D===k?(L=c.labelCache.getLabel(D,this.styleId),L&&T.push(D)):this.tickToText.set(w,k)):D?(k=D,L=c.labelCache.getLabel(D,this.styleId),L&&T.push(D)):(k=this.formatLabel(w),this.tickToText.set(w,k)),!L){var j=this.getCachedLabelTexture(k,S.axisRenderer.textureManager,S.dpiAdjustedLabelStyle);j.textureWidth!==null&&(L=new p(w,k,j.bitmapTexture,j.textureHeight,j.textureWidth),c.labelCache.setLabel(k,this.styleId,L)),T.push(k)}}c.labelCache.pruneCache(),this.pruneTickTextCache()}else T=_.map(function(U){return b.formatLabel(U)});return T},y.prototype.getLabelHeight=function(m,b,S){if(this.rotationProperty%90===0||this.parentAxis.isHorizontalAxis){var _=this.useCache?c.labelCache.getLabel(b,this.styleId):void 0;if(!_||!_.textureHeight){var C=S.fontSize,T=S.padding;if(!m){var x=this.parentAxis.axisRenderer,A=x.viewRect,w=x.textureManager;m=w.getTextureContext(Math.floor(A.width),Math.floor(A.height))}return(0,u.measureTextHeight)(C)+(T==null?void 0:T.top)+(T==null?void 0:T.bottom)}return _.textureHeight}else return S.fontSize+S.padding.top+S.padding.bottom},y.prototype.getLabelWidth=function(m,b,S){if(this.rotationProperty%90===0||!this.parentAxis.isHorizontalAxis){var _=this.useCache?c.labelCache.getLabel(b,this.styleId):void 0;if(!_||!_.textureWidth){var C=S.padding;return(0,u.measureTextWidth)(m,b)+C.left+C.right}return _.textureWidth}else return S.fontSize+S.padding.left+S.padding.right},y.prototype.getMaxLabelHeightForHorizontalAxis=function(m,b,S){var _=this,C=0;return m.forEach(function(T){var x=_.getLabelHeight(b,T,S);C=x>C?x:C}),C},y.prototype.getMaxLabelWidthForVerticalAxis=function(m,b,S){var _=this,C=0;return m.forEach(function(T){var x=_.getLabelWidth(b,T,S);C=x>C?x:C}),C},y.prototype.getCachedLabelTexture=function(m,b,S){var _,C=c.labelCache.getLabel(m,this.styleId);return C?{textureWidth:(_=C.textureWidth)!==null&&_!==void 0?_:null,textureHeight:C.textureHeight,bitmapTexture:C.bitmapTexture}:this.getLabelTexture(m,b,S)},y.prototype.getLabelTextureAsync=function(m,b,S){return i(this,void 0,void 0,function(){return n(this,function(_){return[2,this.getLabelTexture(m,b,S)]})})},y.prototype.getLabelTexture=function(m,b,S){return b.createTextTexture([m],S,this.rotationProperty)},y.prototype.getNativeLabelInfo=function(m){return c.labelCache.getLabel(m,this.styleId)},y.prototype.invalidateCache=function(){this.styleId&&c.labelCache.freeStyle(this.styleId),this.tickToText.clear(),this.styleId=null},y.prototype.resetCache=function(){this.invalidateCache()},y.prototype.delete=function(){this.resetCache()},y.prototype.adjustLabel=function(m,b,S,_,C,T,x,A,w){return{text:b,x:C,y:T,rx:x,ry:A,rotationRadians:w,color:void 0}},y.prototype.toJSON=function(){var m=v.prototype.toJSON.call(this),b={rotation:this.rotation,lineSpacing:this.lineSpacing,asyncLabels:!1,useSharedCache:this.useSharedCache,useNativeText:this.useNativeText,alwaysShowFirstLabel:this.alwaysShowFirstLabel};return Object.assign(m.options,b),m},y.prototype.getLabelSizesNative=function(m,b){var S=this;if(!(!m||m.length===0||t.IS_TEST_ENV)){var _="",C=[],T=this.parentAxis.parentSurface.currentWebGlRenderContext;if(T){var x=T.getFont(this.getCachedStyle(),this.rotation!==0,!1),A=this.parentAxis.parentSurface.webAssemblyContext2D,w=(0,s.getTextBounds)(A);this.currentNativeFontName=x.GetFaceName();var L=this.rotation*(Math.PI/180),k=Math.abs(Math.sin(L)),D=Math.abs(Math.cos(L)),j=function(K,H,U){var I,Q,Z=K,ee=H;S.rotation!==0&&(ee=K*k+H*D,Z=K*D+H*k);var ie=new p(void 0,U,void 0,ee+((I=b.padding)===null||I===void 0?void 0:I.top)+(b==null?void 0:b.padding.bottom),Z+((Q=b.padding)===null||Q===void 0?void 0:Q.left)+(b==null?void 0:b.padding.right));ie.textWidth=K,ie.textHeight=H,c.labelCache.setLabel(U,S.styleId,ie)};if(m.forEach(function(K){K&&!K.includes(`
`)?(C.push(K),_+=K+`
`):(x.CalculateStringBounds(K??"",w,S.lineSpacing),j(w.m_fWidth,(0,a.getMultilineTextHeight)(w),K))}),C.length>0){x.CalculateStringBounds(_??"",w,this.lineSpacing);for(var N=0;N<C.length;N++){var V=C[N],W=w.GetLineBounds(N);j(W.m_fWidth,W.m_fHeight,V),W.delete()}}}}},y.prototype.pruneTickTextCache=function(){this.tickToText.size>1e3&&this.tickToText.clear()},y.prototype.getCachedStyle=function(){var m=this.parentAxis,b=m.parentSurface.getWasmId();return e(e({},m.dpiAdjustedLabelStyle),{rotation:this.rotation,providerId:this.useSharedCache?this.useNativeText?"native":b:this.providerId})},y.prototype.clearCache=function(){this.useCache&&this.styleId&&(c.labelCache.freeStyle(this.styleId),this.styleId=void 0),this.tickToText.clear()},y.prototype.invalidateParent=function(){this.clearCache(),v.prototype.invalidateParent.call(this)},y})(d.LabelProvider);return Cd.LabelProviderBase2D=g,Cd}var nre;function tU(){if(nre)return Sm;nre=1;var r=Sm&&Sm.__extends||(function(){var s=function(l,u){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(c[f]=d[f])},s(l,u)};return function(l,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");s(l,u);function c(){this.constructor=l}l.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}})(),e=Sm&&Sm.__assign||function(){return e=Object.assign||function(s){for(var l,u=1,c=arguments.length;u<c;u++){l=arguments[u];for(var d in l)Object.prototype.hasOwnProperty.call(l,d)&&(s[d]=l[d])}return s},e.apply(this,arguments)};Object.defineProperty(Sm,"__esModule",{value:!0}),Sm.DateLabelProvider=void 0;var i=W1(),n=wp(),t=Il(),o=ZR(),a=(function(s){r(l,s);function l(u){var c=this,d,f;return c=s.call(this,e({labelFormat:(d=u==null?void 0:u.labelFormat)!==null&&d!==void 0?d:n.ENumericFormat.Date_DDMMYYYY,cursorLabelFormat:(f=u==null?void 0:u.cursorLabelFormat)!==null&&f!==void 0?f:n.ENumericFormat.Date_DDMMYYYY},u))||this,c.type=i.ELabelProviderType.Date,c.formatLabelProperty=function(h){return c.applyFormat((0,t.formatNumber)(h,c.numericFormat,c.precision))},c.formatCursorLabelProperty=function(h){var p,g;return c.applyFormat((0,t.formatNumber)(h,(p=c.cursorNumericFormat)!==null&&p!==void 0?p:c.numericFormat,(g=c.cursorPrecision)!==null&&g!==void 0?g:c.precision))},c}return l.prototype.onBeginAxisDraw=function(){},l})(o.LabelProviderBase2D);return Sm.DateLabelProvider=a,Sm}var QC={},ore;function GN(){return ore||(ore=1,(function(r){var e=QC&&QC.__extends||(function(){var u=function(c,d){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,h){f.__proto__=h}||function(f,h){for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(f[p]=h[p])},u(c,d)};return function(c,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");u(c,d);function f(){this.constructor=c}c.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}})(),i=QC&&QC.__assign||function(){return i=Object.assign||function(u){for(var c,d=1,f=arguments.length;d<f;d++){c=arguments[d];for(var h in c)Object.prototype.hasOwnProperty.call(c,h)&&(u[h]=c[h])}return u},i.apply(this,arguments)};Object.defineProperty(r,"__esModule",{value:!0}),r.wrapText=r.TextLabelProvider=void 0;var n=W1(),t=d1(),o=k1(),a=ZR(),s=(function(u){e(c,u);function c(d){var f=this,h,p;return f=u.call(this,d)||this,f.type=n.ELabelProviderType.Text,f.maxLengthProperty=0,f.labelsProperty=(h=d==null?void 0:d.labels)!==null&&h!==void 0?h:[],f.maxLength=(p=d==null?void 0:d.maxLength)!==null&&p!==void 0?p:f.maxLength,f.formatLabelProperty=function(g){var v,y;if(f.parentAxis.isCategoryAxis&&Array.isArray(f.labels)){var m=f.parentAxis.getCurrentCoordinateCalculator(),b=m.transformDataToIndex(g);return f.wrapText((v=f.labels[b])!==null&&v!==void 0?v:"")}return f.wrapText((y=f.labels[g])!==null&&y!==void 0?y:"")},f.formatCursorLabelProperty=f.formatLabelProperty,f}return Object.defineProperty(c.prototype,"labels",{get:function(){return this.labelsProperty},set:function(d){this.labelsProperty=d,this.invalidateParent()},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"maxLength",{get:function(){return this.maxLengthProperty},set:function(d){this.maxLengthProperty=d,this.invalidateParent()},enumerable:!1,configurable:!0}),c.prototype.onBeginAxisDraw=function(){},c.prototype.getLabelWidth=function(d,f,h){if(this.useNativeText||this.rotation%90===0||!this.parentAxis.isHorizontalAxis){var p=o.labelCache.getLabel(f,this.styleId);if(!p){var g=h.padding;return(0,t.measureTextWidth)(d,f)+g.left+g.right}return p.textureWidth}else{var v=Array.isArray(f)?f:f.split(`
`);return v.length*this.lineSpacing*h.fontSize+h.padding.left+h.padding.right}},c.prototype.getLabelTexture=function(d,f,h){var p=d.split(`
`);return f.createTextTexture(p,h,this.rotation,this.lineSpacing)},c.prototype.wrapText=function(d){return d&&Array.isArray(d)?d.join(`
`):(0,r.wrapText)(d,this.maxLength).join(`
`)},c.prototype.toJSON=function(){var d=u.prototype.toJSON.call(this),f={labels:this.labels,maxLength:this.maxLength};return Object.assign(d.options,f),d},c.prototype.getCachedStyle=function(){var d=this.parentAxis;return i(i({},d.dpiAdjustedLabelStyle),{rotation:this.rotation,extras:"ls".concat(this.lineSpacing,",ml").concat(this.maxLength),providerId:this.useSharedCache?void 0:this.providerId})},c})(a.LabelProviderBase2D);r.TextLabelProvider=s;var l=function(u,c){if(c===0)return[u];var d=[];if(!u)return d;for(var f=u.split(" "),h="",p=0,g=f;p<g.length;p++){var v=g[p],y=h+(h!==""?" ":"")+v;y.length>c?h===""?d.push(v):(d.push(h),h=v):h=y}return d.push(h),d};r.wrapText=l})(QC)),QC}var are;function rU(){if(are)return BC;are=1;var r=BC&&BC.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(u[d]=c[d])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})();Object.defineProperty(BC,"__esModule",{value:!0}),BC.CategoryAxis=void 0;var e=gc(),i=ISe(),n=tU(),t=GN(),o=(function(a){r(s,a);function s(l,u){var c=a.call(this,l,u)||this;return c.type=e.EAxisType.CategoryAxis,u!=null&&u.labelProvider?c.labelProvider=u==null?void 0:u.labelProvider:u!=null&&u.labels?c.labelProvider=new t.TextLabelProvider(u):c.labelProvider=new n.DateLabelProvider(u),c}return s})(i.CategoryAxisBase);return BC.CategoryAxis=o,BC}var eT={},tT={},rT={},sre;function L0(){return sre||(sre=1,(function(r){var e=rT&&rT.__extends||(function(){var S=function(_,C){return S=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(T,x){T.__proto__=x}||function(T,x){for(var A in x)Object.prototype.hasOwnProperty.call(x,A)&&(T[A]=x[A])},S(_,C)};return function(_,C){if(typeof C!="function"&&C!==null)throw new TypeError("Class extends value "+String(C)+" is not a constructor or null");S(_,C);function T(){this.constructor=_}_.prototype=C===null?Object.create(C):(T.prototype=C.prototype,new T)}})(),i=rT&&rT.__assign||function(){return i=Object.assign||function(S){for(var _,C=1,T=arguments.length;C<T;C++){_=arguments[C];for(var x in _)Object.prototype.hasOwnProperty.call(_,x)&&(S[x]=_[x])}return S},i.apply(this,arguments)},n;Object.defineProperty(r,"__esModule",{value:!0}),r.SmartDateLabelProvider=r.DEFAULT_LABEL_THRESHOLDS=r.EHighPrecisionLabelMode=r.EDatePrecision=r.ETradeChartLabelFormat=void 0;var t=W1(),o=wp(),a=wd(),s=Il(),l=ZR(),u;(function(S){S.Nanoseconds="Nanoseconds",S.Microseconds="Microseconds",S.MilliSeconds="MilliSeconds",S.Seconds="Seconds",S.Minutes="Minutes",S.Days="Days",S.Months="Months"})(u=r.ETradeChartLabelFormat||(r.ETradeChartLabelFormat={}));var c;(function(S){S[S.Seconds=1]="Seconds",S[S.Milliseconds=1e3]="Milliseconds",S[S.Microseconds=1e6]="Microseconds",S[S.Nanoseconds=1e9]="Nanoseconds"})(c=r.EDatePrecision||(r.EDatePrecision={}));var d;(function(S){S.Suffix="Suffix",S.Fractional="Fractional",S.Scientific="Scientific"})(d=r.EHighPrecisionLabelMode||(r.EHighPrecisionLabelMode={}));var f=1e-5,h=.01,p=10,g=3600,v=3600*24*5,y=3600*24*50;r.DEFAULT_LABEL_THRESHOLDS=(n={},n[u.Nanoseconds]=f,n[u.Microseconds]=h,n[u.MilliSeconds]=p,n[u.Seconds]=g,n[u.Minutes]=v,n[u.Days]=y,n[u.Months]=1/0,n);var m=[u.Nanoseconds,u.Microseconds,u.MilliSeconds,u.Seconds,u.Minutes,u.Days,u.Months],b=(function(S){e(_,S);function _(C){var T=this,x,A,w,L,k,D,j,N,V,W,K;return T=S.call(this,i(i({},C),{labelFormat:(x=C==null?void 0:C.labelFormat)!==null&&x!==void 0?x:o.ENumericFormat.Date_DDMMYYYY,cursorLabelFormat:(A=C==null?void 0:C.cursorLabelFormat)!==null&&A!==void 0?A:o.ENumericFormat.Date_DDMMYYYY,alwaysShowFirstLabel:(w=C==null?void 0:C.alwaysShowFirstLabel)!==null&&w!==void 0?w:!0}))||this,T.type=t.ELabelProviderType.SmartDate,T.textVariesForSameTick=!0,T.showWiderDateOnFirstLabelProperty=!0,T.showYearOnWiderDateProperty=!1,T.dateOffsetProperty=0,T.datePrecisionProperty=c.Seconds,T.highPrecisionLabelModeProperty=d.Suffix,T.labelThresholdsProperty=r.DEFAULT_LABEL_THRESHOLDS,T.labelThresholdsUpdated=!1,T.splitWideDateWithCommaProperty=!0,T.showSecondsOnWideDateProperty=!0,T.showSecondsOnPreciseDateProperty=!1,T.firstLabel=!0,T.showWiderDateOnFirstLabelProperty=(L=C==null?void 0:C.showWiderDateOnFirstLabel)!==null&&L!==void 0?L:T.showWiderDateOnFirstLabelProperty,T.showYearOnWiderDateProperty=(k=C==null?void 0:C.showYearOnWiderDate)!==null&&k!==void 0?k:T.showYearOnWiderDateProperty,T.dateOffsetProperty=(D=C==null?void 0:C.dateOffset)!==null&&D!==void 0?D:T.dateOffsetProperty,T.datePrecisionProperty=(j=C==null?void 0:C.datePrecision)!==null&&j!==void 0?j:T.datePrecisionProperty,T.highPrecisionLabelModeProperty=(N=C==null?void 0:C.highPrecisionLabelMode)!==null&&N!==void 0?N:T.highPrecisionLabelModeProperty,T.splitWideDateWithCommaProperty=(V=C==null?void 0:C.splitWideDateWithComma)!==null&&V!==void 0?V:T.splitWideDateWithCommaProperty,T.showSecondsOnWideDateProperty=(W=C==null?void 0:C.showSecondsOnWideDate)!==null&&W!==void 0?W:T.showSecondsOnWideDateProperty,T.showSecondsOnPreciseDateProperty=(K=C==null?void 0:C.showSecondsOnPreciseDate)!==null&&K!==void 0?K:T.showSecondsOnPreciseDateProperty,C!=null&&C.labelThresholds&&(T.labelThresholdsProperty=i(i({},r.DEFAULT_LABEL_THRESHOLDS),C.labelThresholds),T.labelThresholdsUpdated=!0),T.formatCursorLabelProperty=function(H){var U,I,Q=T.convertToUnixSeconds(H)+T.dateOffset;return T.applyFormat((0,s.formatNumber)(Q,(U=T.cursorNumericFormat)!==null&&U!==void 0?U:T.numericFormat,(I=T.cursorPrecision)!==null&&I!==void 0?I:T.precision))},T.doFormat=T.doFormat.bind(T),T.formatLabelProperty=T.doFormat,T}return _.prototype.convertToUnixSeconds=function(C){return C/this.datePrecisionProperty},_.prototype.getWholeSeconds=function(C){var T=this.datePrecisionProperty;return Math.floor(C/T)},Object.defineProperty(_.prototype,"showWiderDateOnFirstLabel",{get:function(){return this.showWiderDateOnFirstLabelProperty},set:function(C){this.showWiderDateOnFirstLabelProperty!==C&&(this.showWiderDateOnFirstLabelProperty=C,this.invalidateParent())},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"dateOffset",{get:function(){var C;return(C=this.dateOffsetProperty)!==null&&C!==void 0?C:0},set:function(C){this.dateOffsetProperty!==C&&(this.dateOffsetProperty=C,this.invalidateParent())},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"datePrecision",{get:function(){return this.datePrecisionProperty},set:function(C){this.datePrecisionProperty!==C&&(this.datePrecisionProperty=C,this.invalidateParent())},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"highPrecisionLabelMode",{get:function(){return this.highPrecisionLabelModeProperty},set:function(C){this.highPrecisionLabelModeProperty!==C&&(this.highPrecisionLabelModeProperty=C,this.invalidateParent())},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"showYearOnWiderDate",{get:function(){return this.showYearOnWiderDateProperty},set:function(C){this.showYearOnWiderDateProperty!==C&&(this.showYearOnWiderDateProperty=C,this.invalidateParent())},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"labelThresholds",{get:function(){return this.labelThresholdsProperty},set:function(C){this.labelThresholdsProperty!==C&&(this.labelThresholdsProperty=i(i({},this.labelThresholdsProperty),C),this.labelThresholdsUpdated=!0,this.invalidateParent())},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"splitWideDateWithComma",{get:function(){return this.splitWideDateWithCommaProperty},set:function(C){this.splitWideDateWithCommaProperty!==C&&(this.splitWideDateWithCommaProperty=C,this.invalidateParent())},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"showSecondsOnWideDate",{get:function(){return this.showSecondsOnWideDateProperty},set:function(C){this.showSecondsOnWideDateProperty!==C&&(this.showSecondsOnWideDateProperty=C,this.invalidateParent())},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"showSecondsOnPreciseDate",{get:function(){return this.showSecondsOnPreciseDateProperty},set:function(C){this.showSecondsOnPreciseDateProperty!==C&&(this.showSecondsOnPreciseDateProperty=C,this.invalidateParent())},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"numericFormat",{get:function(){},set:function(C){},enumerable:!1,configurable:!0}),_.prototype.onBeginAxisDraw=function(){},_.prototype.getLabels=function(C){var T=C[0],x=C.length,A=C[x-1];if(this.parentAxis.isCategoryAxis){var w=this.parentAxis.getCurrentCoordinateCalculator();T=w.transformIndexToData(T),A=w.transformIndexToData(A)}this.prevPrevValue=void 0,this.prevValue=void 0,this.firstLabel=!0;var L=A-T,k=L/this.datePrecisionProperty;this.format=this.getLabelRange(k,x);var D=S.prototype.getLabels.call(this,C);return this.format=void 0,D},_.prototype.formatDateWide=function(C,T){var x=(0,a.formatUnixDateToHumanStringYYYY)(T),A=this.showYearOnWiderDate?" "+x:"",w=this.splitWideDateWithComma?",":"";switch(C){case u.Nanoseconds:case u.Microseconds:case u.MilliSeconds:{var L=this.showSecondsOnWideDate?(0,a.formatUnixDateToHumanStringHHMMSS)(T):(0,a.formatUnixDateToHumanStringHHMM)(T);return(0,a.formatUnixDateToHumanStringMMMDD)(T)+w+A+" "+L}case u.Seconds:case u.Minutes:return(0,a.formatUnixDateToHumanStringMMMDD)(T)+(this.showYearOnWiderDateProperty?w+A:"");case u.Days:return(0,a.formatUnixDateToHumanStringMMM)(T)+A;default:return x}},_.prototype.formatDatePrecise=function(C,T,x){var A=x??0;switch(C){case u.Nanoseconds:case u.Microseconds:case u.MilliSeconds:{var w=this.getTicksPerSecond(),L=this.getTicksWithinSecond(A),k=L/w,D=this.showSecondsOnPreciseDate?"".concat(this.getWholeSeconds(A)%60):"";switch(this.highPrecisionLabelModeProperty){case d.Scientific:return"".concat(k.toExponential(2),"s");case d.Fractional:return C===u.Nanoseconds?"".concat(D,".").concat(this.getNanosecondsWithinSecond(A)):C===u.Microseconds?"".concat(D,".").concat(this.getMicrosecondsWithinSecond(A)):"".concat(D,".").concat(this.getMillisecondsWithinSecond(A));case d.Suffix:default:{var j=D?D+"s":"";return C===u.Nanoseconds?"".concat(j).concat(Math.round(k*1e9),"ns"):C===u.Microseconds?"".concat(j).concat(Math.round(k*1e6),"µs"):"".concat(j).concat(Math.round(k*1e3),"ms")}}}case u.Seconds:return(0,a.formatUnixDateToHumanStringHHMMSS)(T);case u.Minutes:return(0,a.formatUnixDateToHumanStringHHMM)(T);case u.Days:case u.Months:return(0,a.formatUnixDateToHumanStringDD)(T);default:return(0,s.formatNumber)(T,o.ENumericFormat.Date_DDMMYY,0)}},_.prototype.toJSON=function(){var C=S.prototype.toJSON.call(this),T={dateOffset:this.dateOffset,highPrecisionLabelMode:this.highPrecisionLabelMode,showWiderDateOnFirstLabel:this.showWiderDateOnFirstLabel,showYearOnWiderDate:this.showYearOnWiderDate,datePrecision:this.datePrecision,splitWideDateWithComma:this.splitWideDateWithComma,showSecondsOnWideDate:this.showSecondsOnWideDate,showSecondsOnPreciseDate:this.showSecondsOnPreciseDate,labelThresholds:this.labelThresholdsUpdated?this.labelThresholds:void 0};return Object.assign(C.options,T),C},_.prototype.doFormat=function(C){var T,x,A=this.convertToUnixSeconds(C)+this.dateOffset;if(this.format){var w=this.formatSmartLabel(this.format,A,this.prevValue,this.prevPrevValue,C);return this.prevPrevValue=this.prevValue,this.prevValue=A,w}else return this.applyFormat((0,s.formatNumber)(A,(T=this.cursorNumericFormat)!==null&&T!==void 0?T:this.numericFormat,(x=this.cursorPrecision)!==null&&x!==void 0?x:this.precision))},_.prototype.getLabelRange=function(C,T){for(var x=0,A=m;x<A.length;x++){var w=A[x],L=this.labelThresholdsProperty[w];if(L!==void 0&&C<=L)return w}return u.Months},_.prototype.formatSmartLabel=function(C,T,x,A,w){var L=!this.firstLabel||this.showWiderDateOnFirstLabel;this.firstLabel=!1;var k=this.formatDateWide(C,T),D=x!==void 0?this.formatDateWide(C,x):void 0,j=D===void 0||k!==D;if(C!==u.Months)return j&&L?k:this.formatDatePrecise(C,T,w);if(j&&L)return k;var N=A!==void 0&&x!==void 0?this.formatDateWide(C,A):void 0,V=N===void 0||D!==N,W=V||(0,a.formatUnixDateToHumanStringMMM)(T)!==(0,a.formatUnixDateToHumanStringMMM)(x);return W?(0,a.formatUnixDateToHumanStringMMM)(T):this.formatDatePrecise(C,T,w)},_.prototype.getTicksPerSecond=function(){return this.datePrecisionProperty},_.prototype.getTicksWithinSecond=function(C){var T=this.getTicksPerSecond();if(!T)return 0;var x=Math.floor(C/T);return C-x*T},_.prototype.getMillisecondsWithinSecond=function(C){var T=this.getTicksPerSecond();if(!T)return 0;var x=this.getTicksWithinSecond(C);return Math.floor(x*1e3/T)},_.prototype.getMicrosecondsWithinSecond=function(C){var T=this.getTicksPerSecond();if(!T)return 0;var x=this.getTicksWithinSecond(C);return Math.floor(x*1e6/T)},_.prototype.getNanosecondsWithinSecond=function(C){var T=this.getTicksPerSecond();if(!T)return 0;var x=this.getTicksWithinSecond(C);return Math.floor(x*1e9/T)},_})(l.LabelProviderBase2D);r.SmartDateLabelProvider=b})(rT)),rT}var lre;function E8(){if(lre)return tT;lre=1;var r=tT&&tT.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(u[d]=c[d])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})();Object.defineProperty(tT,"__esModule",{value:!0}),tT.DateTimeDeltaCalculator=void 0;var e=$F(),i=oi(),n=L0(),t=z1(),o=(function(a){r(s,a);function s(l,u){var c=this,d,f;return c=a.call(this,l)||this,c.possibleDeltasProperty=[1,2,5,10,15,30,60,120,300,600,900,1800,3600,7200,10800,360*60,720*60,1440*60,2880*60,4320*60,7200*60,14400*60,360*60*60,480*60*60,720*60*60,1440*60*60,2880*60*60,4320*60*60,365.25*24*60*60],c.currIndex=1,c.possibleDeltasProperty=(d=u==null?void 0:u.possibleDeltas)!==null&&d!==void 0?d:c.possibleDeltasProperty,c.minTicks=u==null?void 0:u.minTicks,c.datePrecisionProperty=(f=u==null?void 0:u.datePrecision)!==null&&f!==void 0?f:n.EDatePrecision.Seconds,c.currIndex=Math.floor(c.possibleDeltas.length/2),c}return Object.defineProperty(s.prototype,"datePrecisionValue",{get:function(){return this.datePrecisionProperty},set:function(l){this.datePrecisionProperty!==l&&(this.datePrecisionProperty=l)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"possibleDeltas",{get:function(){return this.possibleDeltasProperty},set:function(l){this.possibleDeltasProperty!==l&&(this.possibleDeltasProperty=l,this.currIndex=Math.floor(this.possibleDeltas.length/2))},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"minTicks",{get:function(){return this.minTicksProperty},set:function(l){this.minTicksProperty!==l&&(this.minTicksProperty=l)},enumerable:!1,configurable:!0}),s.prototype.getDeltaFromRange=function(l,u,c,d){var f=this,h=u-l;this.prevIndex=void 0,this.currIndex>=this.possibleDeltas.length&&(this.currIndex=Math.floor(this.possibleDeltas.length/2));var p=0,g=function(y){var m,b,S=f.possibleDeltasProperty[y];if(p++,p>f.possibleDeltas.length+1)return e.performanceWarnings.dateTimeDeltaCalculatorBadDelta.warn(),S;var _=Math.floor(h/S);if(_<((m=f.minTicks)!==null&&m!==void 0?m:d/3)&&y===0&&y!==f.prevIndex)return f.prevIndex||(f.prevIndex=y),a.prototype.getDeltaFromRange.call(f,l,u,c,d).max;if(_<((b=f.minTicks)!==null&&b!==void 0?b:d/3)&&y>0&&y!==f.prevIndex)return f.prevIndex||(f.prevIndex=y),g(y-1);if(_>d&&y<f.possibleDeltasProperty.length-1&&y!==f.prevIndex)return f.prevIndex||(f.prevIndex=y),g(y+1);if(_>d&&y===f.possibleDeltasProperty.length-1){var C=a.prototype.getDeltaFromRange.call(f,l/S,u/S,c,d);return C.max*S}else return f.currIndex!==y&&(f.currIndex=y),S},v=g(this.currIndex);return new i.NumberRange(v/c,v)},s})(t.NumericDeltaCalculator);return tT.DateTimeDeltaCalculator=o,tT}var iT={},nT={},ure;function iU(){if(ure)return nT;ure=1;var r=nT&&nT.__extends||(function(){var n=function(t,o){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(a[l]=s[l])},n(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");n(t,o);function a(){this.constructor=t}t.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}})();Object.defineProperty(nT,"__esModule",{value:!0}),nT.FlippedNumericCoordinateCalculator=void 0;var e=r_(),i=(function(n){r(t,n);function t(o,a,s,l,u,c,d){u===void 0&&(u=0),c===void 0&&(c=!1),d===void 0&&(d=-1);var f=n.call(this,o,a,s,l,u,!0)||this;return f.nativeCalculator=c?new o.FlippedLinearCoordinateCalculatorSingle(f.viewportDimension,f.visibleMin,f.visibleMax,d,f.offset):new o.FlippedLinearCoordinateCalculatorDouble(f.viewportDimension,f.visibleMin,f.visibleMax,d,f.offset),f}return t})(e.CoordinateCalculatorBase);return nT.FlippedNumericCoordinateCalculator=i,nT}var oT={},cre;function nU(){if(cre)return oT;cre=1;var r=oT&&oT.__extends||(function(){var n=function(t,o){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(a[l]=s[l])},n(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");n(t,o);function a(){this.constructor=t}t.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}})();Object.defineProperty(oT,"__esModule",{value:!0}),oT.NumericCoordinateCalculator=void 0;var e=r_(),i=(function(n){r(t,n);function t(o,a,s,l,u,c,d,f){u===void 0&&(u=0),c===void 0&&(c=!1),d===void 0&&(d=-1),f===void 0&&(f=1);var h=n.call(this,o,a,s,l,u,!1)||this,p=c?new o.LinearCoordinateCalculatorSingle(h.viewportDimension,h.visibleMin,h.visibleMax,d,h.offset):new o.LinearCoordinateCalculatorDouble(h.viewportDimension,h.visibleMin,h.visibleMax,d,h.offset);return p.extraOffset=f,h.nativeCalculator=p,h}return t})(e.CoordinateCalculatorBase);return oT.NumericCoordinateCalculator=i,oT}var _m={},dre;function sy(){if(dre)return _m;dre=1;var r=_m&&_m.__extends||(function(){var s=function(l,u){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(c[f]=d[f])},s(l,u)};return function(l,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");s(l,u);function c(){this.constructor=l}l.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}})(),e=_m&&_m.__assign||function(){return e=Object.assign||function(s){for(var l,u=1,c=arguments.length;u<c;u++){l=arguments[u];for(var d in l)Object.prototype.hasOwnProperty.call(l,d)&&(s[d]=l[d])}return s},e.apply(this,arguments)};Object.defineProperty(_m,"__esModule",{value:!0}),_m.NumericLabelProvider=void 0;var i=W1(),n=wp(),t=Il(),o=ZR(),a=(function(s){r(l,s);function l(u){var c=this,d,f;return c=s.call(this,e({labelFormat:(d=u==null?void 0:u.labelFormat)!==null&&d!==void 0?d:n.ENumericFormat.Decimal,labelPrecision:(f=u==null?void 0:u.labelPrecision)!==null&&f!==void 0?f:1},u))||this,c.type=i.ELabelProviderType.Numeric,c.formatLabelProperty=function(h){return c.applyFormat((0,t.formatNumber)(h,c.numericFormat,c.precision,c.engineeringPrefix))},c.formatCursorLabelProperty=function(h){var p,g;return c.applyFormat((0,t.formatNumber)(h,(p=c.cursorNumericFormat)!==null&&p!==void 0?p:c.numericFormat,(g=c.cursorPrecision)!==null&&g!==void 0?g:c.precision,c.engineeringPrefix))},c}return Object.defineProperty(l.prototype,"engineeringPrefix",{get:function(){return this.engineeringPrefixProperty},set:function(u){this.engineeringPrefixProperty=u,this.invalidateParent()},enumerable:!1,configurable:!0}),l.prototype.onBeginAxisDraw=function(){},l})(o.LabelProviderBase2D);return _m.NumericLabelProvider=a,_m}var fre;function NM(){if(fre)return iT;fre=1;var r=iT&&iT.__extends||(function(){var u=function(c,d){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,h){f.__proto__=h}||function(f,h){for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(f[p]=h[p])},u(c,d)};return function(c,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");u(c,d);function f(){this.constructor=c}c.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}})();Object.defineProperty(iT,"__esModule",{value:!0}),iT.NumericAxis=void 0;var e=gc(),i=iU(),n=nU(),t=U1(),o=Eg(),a=z1(),s=sy(),l=(function(u){r(c,u);function c(d,f){var h=this,p;return h=u.call(this,d,f)||this,h.type=e.EAxisType.NumericAxis,h.tickProvider=new t.NumericTickProvider(h.webAssemblyContext2D),h.labelProvider=(p=f==null?void 0:f.labelProvider)!==null&&p!==void 0?p:new s.NumericLabelProvider(f),h.deltaCalculator=new a.NumericDeltaCalculator(h.webAssemblyContext2D),h}return c.prototype.getCurrentCoordinateCalculatorInternal=function(){var d=this.visibleRange.min,f=this.visibleRange.max,h=this.offset,p=this.axisLength;return this.isXAxis!==this.flippedCoordinates?new i.FlippedNumericCoordinateCalculator(this.webAssemblyContext2D,p,d,f,h,this.allowFastMath):new n.NumericCoordinateCalculator(this.webAssemblyContext2D,p,d,f,h,this.allowFastMath)},c})(o.AxisBase2D);return iT.NumericAxis=l,iT}var hre;function NSe(){if(hre)return eT;hre=1;var r=eT&&eT.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(u[d]=c[d])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})();Object.defineProperty(eT,"__esModule",{value:!0}),eT.DateTimeNumericAxis=void 0;var e=gc(),i=E8(),n=L0(),t=NM(),o=(function(a){r(s,a);function s(l,u){var c=this;return u!=null&&u.labelProvider||(u=u??{},u.labelProvider=new n.SmartDateLabelProvider(u)),c=a.call(this,l,u)||this,c.type=e.EAxisType.DateTimeNumericAxis,c.possibleDeltasOption=u==null?void 0:u.possibleDeltas,c.minTicksOption=u==null?void 0:u.minTicks,c.deltaCalculator=new i.DateTimeDeltaCalculator(l,{possibleDeltas:u==null?void 0:u.possibleDeltas,minTicks:u==null?void 0:u.minTicks,datePrecision:u==null?void 0:u.datePrecision}),c}return s.prototype.toJSON=function(){var l=a.prototype.toJSON.call(this),u={possibleDeltas:this.possibleDeltasOption,minTicks:this.minTicksOption};return Object.assign(l.options,u),l},s})(t.NumericAxis);return eT.DateTimeNumericAxis=o,eT}var Pm={},pre;function A8(){if(pre)return Pm;pre=1;var r=Pm&&Pm.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(u[d]=c[d])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})(),e=Pm&&Pm.__assign||function(){return e=Object.assign||function(a){for(var s,l=1,u=arguments.length;l<u;l++){s=arguments[l];for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&(a[c]=s[c])}return a},e.apply(this,arguments)};Object.defineProperty(Pm,"__esModule",{value:!0}),Pm.LogarithmicLabelProvider=void 0;var i=wp(),n=Il(),t=sy(),o=(function(a){r(s,a);function s(l){var u=this,c,d;return u=a.call(this,e({labelFormat:(c=l==null?void 0:l.labelFormat)!==null&&c!==void 0?c:i.ENumericFormat.Scientific,labelPrecision:(d=l==null?void 0:l.labelPrecision)!==null&&d!==void 0?d:1},l))||this,u.formatLabelProperty=function(f){return u.numericFormat===i.ENumericFormat.Scientific?u.applyFormat((0,n.toScientific)(f,u.precision,u.logarithmicBase)):u.applyFormat((0,n.formatNumber)(f,u.numericFormat,u.precision,u.engineeringPrefix))},u}return s})(t.NumericLabelProvider);return Pm.LogarithmicLabelProvider=o,Pm}var Cm={},Tm={},aT={},xI={},sT={},gre;function mY(){if(gre)return sT;gre=1,Object.defineProperty(sT,"__esModule",{value:!0}),sT.stringOccurrences=sT.htmlToElement=void 0;function r(i){var n=document.createElement("template");return i=i.trim(),n.innerHTML=i,n.content.firstChild}sT.htmlToElement=r;function e(i,n,t){if(t===void 0&&(t=!1),i+="",n+="",n.length<=0)return i.length+1;for(var o=0,a=0,s=t?1:n.length;a=i.indexOf(n,a),a>=0;)++o,a+=s;return o}return sT.stringOccurrences=e,sT}var lT={},B5={},vre;function w8(){return vre||(vre=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.ESubChartClippingMode=void 0,(function(e){e.SeriesViewRect="SeriesViewRect",e.Chart="Chart"})(r.ESubChartClippingMode||(r.ESubChartClippingMode={}))})(B5)),B5}var V5={},yre;function oU(){return yre||(yre=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.ESubSurfacePositionCoordinateMode=void 0,(function(e){e.DataValue="DataValue",e.Pixel="Pixel",e.Relative="Relative"})(r.ESubSurfacePositionCoordinateMode||(r.ESubSurfacePositionCoordinateMode={}))})(V5)),V5}var uT={},mre;function O8(){if(mre)return uT;mre=1,Object.defineProperty(uT,"__esModule",{value:!0}),uT.hasProperties=uT.areEqual=void 0;function r(i,n){if(i===n)return!0;var t=Object.keys(i),o=Object.keys(i);return t.length===o.length&&t.every(function(a){return Object.prototype.hasOwnProperty.call(n,a)&&i[a]===n[a]})}uT.areEqual=r;var e=function(i,n){return n.every(function(t){return Object.prototype.hasOwnProperty.call(i,t)})};return uT.hasProperties=e,uT}var cT={},dT={},fT={},hT={},bre;function D8(){if(bre)return hT;bre=1;var r=hT&&hT.__extends||(function(){var n=function(t,o){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(a[l]=s[l])},n(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");n(t,o);function a(){this.constructor=t}t.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}})();Object.defineProperty(hT,"__esModule",{value:!0}),hT.BasePolarAxisLayoutStrategy=void 0;var e=F1(),i=(function(n){r(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.updateAreaSize=function(o,a){},t})(e.BaseAxisLayoutStrategy);return hT.BasePolarAxisLayoutStrategy=i,hT}var Sre;function FSe(){if(Sre)return fT;Sre=1;var r=fT&&fT.__extends||(function(){var l=function(u,c){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(d[h]=f[h])},l(u,c)};return function(u,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");l(u,c);function d(){this.constructor=u}u.prototype=c===null?Object.create(c):(d.prototype=c.prototype,new d)}})();Object.defineProperty(fT,"__esModule",{value:!0}),fT.AngularAxisLayoutStrategy=void 0;var e=vn(),i=Xc(),n=D8(),t=H1(),o=2*Math.PI,a=Math.PI/2,s=(function(l){r(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=i.ELayoutStrategyType.TopOuter,c}return u.prototype.measureAxes=function(c,d,f){if(!f||f.length===0)return 0;var h=f[0],p=h.isXAxis?c.yAxes.get(0):c.xAxes.get(0),g=f[0].startAngle,v=f[0].totalAngle,y=this.partialArcLayout(p.innerRadius,g,v),m=y.rightScale,b=y.topScale,S=y.leftScale,_=y.bottomScale;return f.forEach(function(C){var T=C;if(g!==T.startAngle||v!==T.totalAngle)throw new Error("AngularAxisLayoutStrategy assumes all angular axes have the same startAngle and totalAngle.  To vary this use StackedAngularAxisLayoutStrategy.");C.measure();var x=T.axisRenderer,A=T.axisLayoutState,w=T.axisBorder;A.clear();var L=w.borderBottom+w.borderTop,k=0,D=k+x.desiredHeight+L;A.axisSize=D;var j=w.borderLeft+w.borderRight,N=k+x.desiredWidth+j;A.leftScale=S,A.rightScale=m,A.topScale=b,A.bottomScale=_,T.isAngular&&(d.topOuterAreaSize+=D,d.bottomOuterAreaSize+=D,d.leftOuterAreaSize+=N,d.rightOuterAreaSize+=N)}),0},u.prototype.layoutAxes=function(c,d,f,h,p){if(!(!p||p.length===0)){var g=p[0],v=g.axisLayoutState,y=v.leftScale,m=v.rightScale,b=v.topScale,S=v.bottomScale;v.axisSize;var _=m-y,C=b-S,T=_/C,x=h-d,A=f-c,w=A/x,L=w>T?x*T:A,k=w>T?x:A/T,D=L/_,j=c+(A-L)/2-L*y/(m-y),N=d+(x-k)/2+k*(1+S/(b-S));p.forEach(function(V){V.axisLength=V.totalAngle,V.offset=0;var W=V,K=W.axisLayoutState.axisSize,H=W.axisRenderer,U=W.xCenterOffset,I=W.yCenterOffset;V.viewRect=e.Rect.create(j+U,N+I,D,D+K),H.layout(V.viewRect),D+=K})}},u.prototype.partialArcLayout=function(c,d,f){var h=1,p=1,g=-1,v=-1;if(f<o){var y=t.labelHelper.normalizeAngle(d),m=y+f,b=Math.cos(y),S=Math.cos(m),_=Math.sin(y),C=Math.sin(m),T=y===0||o<=m;T||(h=Math.max(b,S,b*c,S*c));var x=y<=Math.PI&&Math.PI<=m||3*Math.PI<=m;x||(g=Math.min(b,S,b*c,S*c));var A=y<=a&&a<=m||o+a<=m;A||(p=Math.max(_,C,_*c,C*c));var w=y<=3*a&&3*a<=m||o+3*a<=m;w||(v=Math.min(_,C,_*c,C*c))}return{rightScale:h,leftScale:g,topScale:p,bottomScale:v}},u})(n.BasePolarAxisLayoutStrategy);return fT.AngularAxisLayoutStrategy=s,fT}var pT={},_re;function jSe(){if(_re)return pT;_re=1;var r=pT&&pT.__extends||(function(){var t=function(o,a){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");t(o,a);function s(){this.constructor=o}o.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}})();Object.defineProperty(pT,"__esModule",{value:!0}),pT.RadialAxisLayoutStrategy=void 0;var e=vn(),i=D8(),n=(function(t){r(o,t);function o(){return t!==null&&t.apply(this,arguments)||this}return o.prototype.measureAxes=function(a,s,l){return l.forEach(function(u){u.measure()}),0},o.prototype.layoutAxes=function(a,s,l,u,c){c.forEach(function(d){d.axisLength=l,d.offset=0,d.viewRect=e.Rect.create(a,s,l,1)})},o})(i.BasePolarAxisLayoutStrategy);return pT.RadialAxisLayoutStrategy=n,pT}var Pre;function R8(){if(Pre)return dT;Pre=1;var r=dT&&dT.__extends||(function(){var l=function(u,c){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(d[h]=f[h])},l(u,c)};return function(u,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");l(u,c);function d(){this.constructor=u}u.prototype=c===null?Object.create(c):(d.prototype=c.prototype,new d)}})();Object.defineProperty(dT,"__esModule",{value:!0}),dT.PolarLayoutManager=void 0;var e=vn(),i=nb(),n=FSe(),t=ZS(),o=jSe(),a=10,s=(function(l){r(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=i.ELayoutManagerType.Polar,c.angularOuterAxesLayoutStrategyProperty=new n.AngularAxisLayoutStrategy,c.angularInnerAxesLayoutStrategyProperty=new n.AngularAxisLayoutStrategy,c.radialOuterAxesLayoutStrategyProperty=new o.RadialAxisLayoutStrategy,c.radialInnerAxesLayoutStrategyProperty=new o.RadialAxisLayoutStrategy,c}return Object.defineProperty(u.prototype,"angularOuterAxesLayoutStrategy",{get:function(){return this.angularOuterAxesLayoutStrategyProperty},set:function(c){var d,f=this.angularOuterAxesLayoutStrategyProperty;f!==c&&(this.angularOuterAxesLayoutStrategyProperty=c,f.isStacked&&!c.isStacked&&(this.groupAxesByLayoutStrategy(),this.resetAxes(this.axesGroupedByLayoutStrategy.topOuterAxes)),(d=this.sciChartSurface)===null||d===void 0||d.invalidateElement())},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"angularInnerAxesLayoutStrategy",{get:function(){return this.angularInnerAxesLayoutStrategyProperty},set:function(c){var d,f=this.angularInnerAxesLayoutStrategyProperty;f!==c&&(this.angularInnerAxesLayoutStrategyProperty=c,f.isStacked&&!c.isStacked&&(this.groupAxesByLayoutStrategy(),this.resetAxes(this.axesGroupedByLayoutStrategy.topInnerAxes)),(d=this.sciChartSurface)===null||d===void 0||d.invalidateElement())},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"radialOuterAxesLayoutStrategy",{get:function(){return this.radialOuterAxesLayoutStrategyProperty},set:function(c){var d,f=this.radialOuterAxesLayoutStrategyProperty;f!==c&&(this.radialOuterAxesLayoutStrategyProperty=c,f.isStacked&&!c.isStacked&&(this.groupAxesByLayoutStrategy(),this.resetAxes(this.axesGroupedByLayoutStrategy.rightOuterAxes)),(d=this.sciChartSurface)===null||d===void 0||d.invalidateElement())},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"radialInnerAxesLayoutStrategy",{get:function(){return this.radialInnerAxesLayoutStrategyProperty},set:function(c){var d,f=this.radialInnerAxesLayoutStrategyProperty;f!==c&&(this.radialInnerAxesLayoutStrategyProperty=c,f.isStacked&&!c.isStacked&&(this.groupAxesByLayoutStrategy(),this.resetAxes(this.axesGroupedByLayoutStrategy.rightInnerAxes)),(d=this.sciChartSurface)===null||d===void 0||d.invalidateElement())},enumerable:!1,configurable:!0}),u.prototype.getAxisLayoutStrategy=function(c){if(!c.isPolarAxis)throw new Error("Cannot get Polar LayoutStrategy for a non-polar axis");return c.isAngular?c.isInnerAxis?this.angularInnerAxesLayoutStrategy:this.angularOuterAxesLayoutStrategy:c.isInnerAxis?this.radialInnerAxesLayoutStrategy:this.radialOuterAxesLayoutStrategy},u.prototype.layoutChart=function(c,d){var f,h,p,g,v,y,m,b,S,_,C,T;this.groupAxesByLayoutStrategy();var x=(f=d==null?void 0:d.right)!==null&&f!==void 0?f:0,A=(h=d==null?void 0:d.left)!==null&&h!==void 0?h:0,w=(p=d==null?void 0:d.top)!==null&&p!==void 0?p:0,L=(g=d==null?void 0:d.bottom)!==null&&g!==void 0?g:0,k=c.width-A-x,D=c.height-w-L,j=this.sciChartSurface.adjustedPadding;this.chartLayoutState.leftOuterAreaSize=((v=j==null?void 0:j.left)!==null&&v!==void 0?v:0)+this.sciChartSurface.leftViewportBorder+this.sciChartSurface.leftCanvasBorder,this.chartLayoutState.rightOuterAreaSize=((y=j==null?void 0:j.right)!==null&&y!==void 0?y:0)+this.sciChartSurface.rightViewportBorder+this.sciChartSurface.rightCanvasBorder,this.chartLayoutState.topOuterAreaSize=((m=j==null?void 0:j.top)!==null&&m!==void 0?m:0)+this.sciChartSurface.topViewportBorder+this.sciChartSurface.topCanvasBorder,this.chartLayoutState.bottomOuterAreaSize=((b=j==null?void 0:j.bottom)!==null&&b!==void 0?b:0)+this.sciChartSurface.bottomViewportBorder+this.sciChartSurface.bottomCanvasBorder,this.setSeriesViewRect(this.chartLayoutState.leftOuterAreaSize,this.chartLayoutState.topOuterAreaSize,c.width-this.chartLayoutState.rightOuterAreaSize,c.height-this.chartLayoutState.bottomOuterAreaSize);try{this.angularOuterAxesLayoutStrategy.measureAxes(this.sciChartSurface,this.chartLayoutState,this.axesGroupedByLayoutStrategy.topOuterAxes),this.angularInnerAxesLayoutStrategy.measureAxes(this.sciChartSurface,this.chartLayoutState,this.axesGroupedByLayoutStrategy.topInnerAxes),this.radialOuterAxesLayoutStrategy.measureAxes(this.sciChartSurface,this.chartLayoutState,this.axesGroupedByLayoutStrategy.rightOuterAxes),this.radialInnerAxesLayoutStrategy.measureAxes(this.sciChartSurface,this.chartLayoutState,this.axesGroupedByLayoutStrategy.rightInnerAxes);var N=k-this.chartLayoutState.leftOuterAreaSize-this.chartLayoutState.rightOuterAreaSize,V=D-this.chartLayoutState.topOuterAreaSize-this.chartLayoutState.bottomOuterAreaSize,W=A,K=W+this.chartLayoutState.leftOuterAreaSize,H=K+(N<a?a:N),U=H+this.chartLayoutState.rightOuterAreaSize,I=w,Q=I+this.chartLayoutState.topOuterAreaSize,Z=Q+(V<a?a:V),ee=Z+this.chartLayoutState.bottomOuterAreaSize;this.sciChartSurface.annotationUnderlaySurfaceViewRect=e.Rect.createWithCoords(W,I,U,ee),this.sciChartSurface.annotationOverlaySurfaceViewRect=e.Rect.createWithCoords(W,I,U,ee),this.sciChartSurface.chartModifierSurfaceViewRect=e.Rect.createWithCoords(W,I,U,ee),this.angularOuterAxesLayoutStrategy.layoutAxes(K,Q,H,Z,this.axesGroupedByLayoutStrategy.topOuterAxes);var ie=(T=(_=(S=this.axesGroupedByLayoutStrategy.rightOuterAxes[0])===null||S===void 0?void 0:S.offset)!==null&&_!==void 0?_:(C=this.axesGroupedByLayoutStrategy.rightInnerAxes[0])===null||C===void 0?void 0:C.offset)!==null&&T!==void 0?T:0;this.angularInnerAxesLayoutStrategy.layoutAxes(K+ie,Q+ie,H-ie,Z-ie,this.axesGroupedByLayoutStrategy.topInnerAxes);var de=e.Rect.createZero();return this.axesGroupedByLayoutStrategy.topOuterAxes.length>0?de=this.axesGroupedByLayoutStrategy.topOuterAxes[0].viewRect:this.axesGroupedByLayoutStrategy.topInnerAxes.length>0&&(de=this.axesGroupedByLayoutStrategy.topInnerAxes[0].viewRect),this.radialOuterAxesLayoutStrategy.layoutAxes(de.left,de.top,de.width,de.height,this.axesGroupedByLayoutStrategy.rightOuterAxes),this.radialInnerAxesLayoutStrategy.layoutAxes(de.left,de.top,de.width,de.height,this.axesGroupedByLayoutStrategy.rightInnerAxes),this.sciChartSurface.seriesViewRect}finally{this.chartLayoutState.clear()}},u.prototype.groupAxesByLayoutStrategy=function(){this.axesGroupedByLayoutStrategy.clear();var c=this.axesGroupedByLayoutStrategy,d=c.topOuterAxes,f=c.topInnerAxes,h=c.rightOuterAxes,p=c.rightInnerAxes,g=function(v){v.forEach(function(y){if(y.isPolarAxis){var m=y.isAngular;m?y.isInnerAxis?f.push(y):d.push(y):y.isInnerAxis?p.push(y):h.push(y)}})};g(this.sciChartSurface.xAxes.asArray()),g(this.sciChartSurface.yAxes.asArray())},u})(t.LayoutManager);return dT.PolarLayoutManager=s,dT}var Cre;function M8(){if(Cre)return cT;Cre=1;var r=cT&&cT.__extends||(function(){var c=function(d,f){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(h[g]=p[g])},c(d,f)};return function(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");c(d,f);function h(){this.constructor=d}d.prototype=f===null?Object.create(f):(h.prototype=f.prototype,new h)}})();Object.defineProperty(cT,"__esModule",{value:!0}),cT.SciChartPolarSurface=void 0;var e=So(),i=ab(),n=Ha(),t=R8(),o=WN(),a=hSe(),s=e_(),l=Tp(),u=(function(c){r(d,c);function d(f,h){var p=c.call(this,f,h)||this;return p.layoutManager=new t.PolarLayoutManager,p}return d.create=function(f,h){if(h=l.SciChartSurface.resolveOptions(h),e.IS_TEST_ENV)return this.createPolarTest(f,h);var p=function(g,v){return new d(g,v)};return(0,o.createMultichart)(f,p,h).then(function(g){return g.sciChartSurface.applyOptions(h),g})},d.createSingle=function(f,h){if(h=l.SciChartSurface.resolveOptions(h),e.IS_TEST_ENV)return this.createPolarTest(f,h);var p=function(g,v){return new d(g,v)};return(0,a.createSingleInternal)(f,p,h).then(function(g){return g.sciChartSurface.applyOptions(h),g})},Object.defineProperty(d.prototype,"surfaceType",{get:function(){return n.ESurfaceType.SciChartPolarSurfaceType},enumerable:!1,configurable:!0}),d.createPolarTest=function(f,h){var p,g,v=s.default.initCanvas(f,(p=h==null?void 0:h.widthAspect)!==null&&p!==void 0?p:0,(g=h==null?void 0:h.heightAspect)!==null&&g!==void 0?g:0,s.default.ECanvasType.canvas2D),y=new d(l.sciChartConfig.testWasm,{canvases:v});return y.applyTheme(h==null?void 0:h.theme),y.applyOptions(h),new Promise(function(m){return m({wasmContext:y.webAssemblyContext2D,sciChartSurface:y})})},d.prototype.toJSON=function(f){f===void 0&&(f=!1);var h=c.prototype.toJSON.call(this,f);return h.type=i.ESciChartSurfaceType.Polar2D,h},d})(l.SciChartSurface);return cT.SciChartPolarSurface=u,cT}var EI={},xm={},Tre;function rze(){return Tre||(Tre=1,Object.defineProperty(xm,"__esModule",{value:!0}),xm.polygonFormatRequiredFieldNames=xm.ltrbFormatRequiredFieldNames=xm.xywhFormatRequiredFieldNames=void 0,xm.xywhFormatRequiredFieldNames=["x","y","width","height"],xm.ltrbFormatRequiredFieldNames=["left","top","right","bottom"],xm.polygonFormatRequiredFieldNames=["x1","x2","y1","y2"]),xm}var xre;function L8(){if(xre)return EI;xre=1,Object.defineProperty(EI,"__esModule",{value:!0}),EI.sciChartSubSurfaceCommon=void 0;var r=$F(),e=Mr(),i=vn(),n=Yo(),t=rze(),o=oU(),a=O8(),s=mi(),l=pn(),u=hl(),c=KS(),d=Xi();function f(T){var x={domChartRoot:T.domChartRoot,domCanvasWebGL:T.domCanvasWebGL,domCanvas2D:T.domCanvas2D,domSvgContainer:T.domSvgContainer,domSvgAdornerLayer:T.domSvgAdornerLayer,domDivContainer:T.domDivContainer,domBackgroundSvgContainer:T.domBackgroundSvgContainer,domSeriesBackground:T.domSeriesBackground};return x}function h(T){var x=T.renderSurface.viewportSize,A=x.width,w=x.height,L=T.offset,k=L.top,D=L.left,j=L.bottom,N=L.right,V=A-D-N>0?A-D-N:0,W=w-k-j>0?w-k-j:0;return new i.Rect(D,k,V,W)}function p(T,x){T.backgroundFillBrushCache=(0,e.deleteSafe)(T.backgroundFillBrushCache)}function g(T){var x=Array.isArray(T);if(x){if(T.length===1)return[T[0],T[0],T[0],T[0]];if(T.length===2)return[T[0],T[1],T[0],T[1]];if(T.length===4)return T;throw new Error("Invalid subChart coordinate mode provided: ".concat(T))}else return[T,T,T,T]}function v(T){var x=T.parentSurface.viewRect,A=x.width,w=x.height,L=g(T.coordinateMode),k=T.coordinateMode===o.ESubSurfacePositionCoordinateMode.DataValue||T.coordinateMode.includes(o.ESubSurfacePositionCoordinateMode.DataValue),D=T.subPosition,j=(0,a.hasProperties)(D,t.xywhFormatRequiredFieldNames),N=(0,a.hasProperties)(D,t.ltrbFormatRequiredFieldNames),V=(0,a.hasProperties)(D,t.polygonFormatRequiredFieldNames),W=T.parentSurface.seriesViewRect,K=W.left,H=W.top,U=S(T),I=U.horizontalCalc,Q=U.verticalCalc,Z=U.xFlipped,ee=U.yFlipped;if(j&&k){var ie=L[0],de=L[1],pe=L[2],_e=L[3],Te=D.x,De=D.y,Pe=D.width,Ee=D.height,Re=_(Te,ie,A,I,K),je=_(De,de,w,Q,H),Ke=C(Re,pe,A,I,K),ot=Z?Ke-Pe:Ke+Pe,We=_(ot,pe,A,I,K),xe=C(je,_e,w,Q,H),ve=ee?xe+Ee:xe-Ee,he=_(ve,_e,w,Q,H);return new n.Thickness(je,A-We,w-he,Re)}else if(j&&!k){var ie=L[0],de=L[1],pe=L[2],_e=L[3],Te=D.x,De=D.y,Pe=D.width,Ee=D.height,Re=_(Te,ie,A),je=_(De,de,w),Se=_(Pe,pe,A),be=_(Ee,_e,w),We=Re+Se,ke=je+be;return new n.Thickness(je,A-We,w-ke,Re)}else if(N){var qe=L[0],rt=L[1],St=L[2],xt=L[3],It=D.left,Zt=D.top,ot=D.right,ve=D.bottom,Re=_(It,qe,A,I,K),je=_(Zt,rt,w,Q,H),We=_(ot,St,A,I,K),he=_(ve,xt,w,Q,H);return new n.Thickness(je,A-We,w-he,Re)}else if(V){var ct=L[0],Qe=L[1],Et=L[2],Gt=L[3],Xe=D.x1,Vt=D.y1,lr=D.x2,Jt=D.y2,kr=_(Xe,ct,A,I,K),qt=_(Vt,Qe,w,Q,H),zt=_(lr,Et,A,I,K),jr=_(Jt,Gt,w,Q,H),Re=Math.min(kr,zt),je=Math.min(qt,jr),We=Math.max(kr,zt),he=Math.max(qt,jr);return new n.Thickness(je,A-We,w-he,Re)}throw new Error("Unexpected position format or coordinate mode ".concat(T.coordinateMode,"!"))}function y(T,x,A){if(!T.isTransparent&&T.isSubSurface){var w=A.getNativeContext(),L=T.viewRect,k=i.Rect.intersect(L,T.clipRect);A.setTranslationRotationAndClip(k,L.x,L.y),w.SetClearColor(0,0,0,0),w.Clear();try{var D=(0,s.parseColorToUIntArgb)(x),j=(0,d.getVectorRectVertex)(T.webAssemblyContext2D);j.push_back((0,c.createNativeRect)(T.webAssemblyContext2D,L.left,L.top,L.right,L.bottom));var N=(0,u.createBrushInCache)(T.backgroundFillBrushCache,x,1);A.drawRects(j,N,k,0,0)}catch{r.performanceWarnings.subchartBackgroundNotSimpleColor.warn()}}}function m(T,x){if(!(!T.parentSurface||!T.subChartContainer)){var A=(0,l.translateToNotScaledRect)(T.parentSurface.viewRect),w=A.width,L=A.height;T.subChartContainer.style.left=(0,l.convertToHtmlPx)(x.left),T.subChartContainer.style.top=(0,l.convertToHtmlPx)(x.top),T.subChartContainer.style.width=(0,l.convertToHtmlPx)(w-x.left-x.right),T.subChartContainer.style.height=(0,l.convertToHtmlPx)(L-x.top-x.bottom)}}function b(T,x){var A,w,L,k;if(!x)return n.Thickness.fromNumber(0);var D=x.getElementsByClassName(T.leftSectionClass)[0],j=x.getElementsByClassName(T.topSectionClass)[0],N=x.getElementsByClassName(T.rightSectionClass)[0],V=x.getElementsByClassName(T.bottomSectionClass)[0],W=(A=D==null?void 0:D.clientWidth)!==null&&A!==void 0?A:0,K=(w=j==null?void 0:j.clientHeight)!==null&&w!==void 0?w:0,H=(L=N==null?void 0:N.clientWidth)!==null&&L!==void 0?L:0,U=(k=V==null?void 0:V.clientHeight)!==null&&k!==void 0?k:0;return new n.Thickness((0,l.translateToScaled)(K*T.sectionScale),(0,l.translateToScaled)(H*T.sectionScale),(0,l.translateToScaled)(U*T.sectionScale),(0,l.translateToScaled)(W*T.sectionScale))}EI.sciChartSubSurfaceCommon={createSubSurfaceCanvases:f,getSubChartRect:h,deleteSubChart:p,calcPadding:v,applySciChartBackground:y,updateWrapper:m,getOffsets:b};var S=function(T){var x,A,w=T.coordinateMode===o.ESubSurfacePositionCoordinateMode.DataValue||T.coordinateMode.includes(o.ESubSurfacePositionCoordinateMode.DataValue);if(!w)return{};var L=(x=T.parentSurface.getXAxisById(T.parentXAxisId))!==null&&x!==void 0?x:T.parentSurface.getDefaultXAxis();if(!L)throw new Error("No x axis with id ".concat(T.parentXAxisId," found on parent surface"));var k=L.getCurrentCoordinateCalculator(),D=(A=T.parentSurface.getYAxisById(T.parentYAxisId))!==null&&A!==void 0?A:T.parentSurface.getDefaultYAxis();if(!D)throw new Error("No y axis with id ".concat(T.parentYAxisId," found on parent surface"));var j=D.getCurrentCoordinateCalculator(),N=L.isVerticalChart?j:k,V=L.isVerticalChart?k:j,W=L.flippedCoordinates,K=D.flippedCoordinates;return{horizontalCalc:N,verticalCalc:V,xFlipped:W,yFlipped:K}};function _(T,x,A,w,L){switch(x){case o.ESubSurfacePositionCoordinateMode.Pixel:return(0,l.translateToScaled)(T);case o.ESubSurfacePositionCoordinateMode.Relative:return A*T;case o.ESubSurfacePositionCoordinateMode.DataValue:return L+w.getCoordinate(T)}}function C(T,x,A,w,L){switch(x){case o.ESubSurfacePositionCoordinateMode.Pixel:return(0,l.translateToNotScaled)(T);case o.ESubSurfacePositionCoordinateMode.Relative:return T/A;case o.ESubSurfacePositionCoordinateMode.DataValue:return w.getDataValue(T-L)}}return EI}var Ere;function k8(){if(Ere)return lT;Ere=1;var r=lT&&lT.__extends||(function(){var g=function(v,y){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,b){m.__proto__=b}||function(m,b){for(var S in b)Object.prototype.hasOwnProperty.call(b,S)&&(m[S]=b[S])},g(v,y)};return function(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");g(v,y);function m(){this.constructor=v}v.prototype=y===null?Object.create(y):(m.prototype=y.prototype,new m)}})();Object.defineProperty(lT,"__esModule",{value:!0}),lT.SciChartPolarSubSurface=void 0;var e=Mr(),i=vn(),n=Yo(),t=ab(),o=Ep(),a=w8(),s=oU(),l=O8(),u=pn(),c=hl(),d=M8(),f=L8(),h=Tp(),p=(function(g){r(v,g);function v(y,m){var b=this,S,_,C,T,x,A,w,L,k,D,j,N,V,W,K,H,U;return b=g.call(this,y,m)||this,b.isSubSurface=!0,b.topSectionClass="top-section",b.leftSectionClass="left-section",b.bottomSectionClass="bottom-section",b.rightSectionClass="right-section",b.isTransparentProperty=!0,b.clippingModeProperty=a.ESubChartClippingMode.Chart,b.subPositionProperty=new i.Rect(0,0,1,1),b.coordinateModeProperty=s.ESubSurfacePositionCoordinateMode.Relative,b.isVisibleProperty=!0,b.sectionScaleProperty=1,b.parentSurfaceProperty=m.parentSurface,b.subChartContainerId=(S=m.subSurfaceOptions)===null||S===void 0?void 0:S.subChartContainerId,b.isTransparentProperty=(C=(_=m==null?void 0:m.subSurfaceOptions)===null||_===void 0?void 0:_.isTransparent)!==null&&C!==void 0?C:b.isTransparent,b.coordinateModeProperty=(x=(T=m==null?void 0:m.subSurfaceOptions)===null||T===void 0?void 0:T.coordinateMode)!==null&&x!==void 0?x:b.coordinateMode,b.parentXAxisIdProperty=(w=(A=m==null?void 0:m.subSurfaceOptions)===null||A===void 0?void 0:A.parentXAxisId)!==null&&w!==void 0?w:b.parentXAxisId,b.parentYAxisIdProperty=(k=(L=m==null?void 0:m.subSurfaceOptions)===null||L===void 0?void 0:L.parentYAxisId)!==null&&k!==void 0?k:b.parentYAxisId,b.sectionScaleProperty=(j=(D=m==null?void 0:m.subSurfaceOptions)===null||D===void 0?void 0:D.sectionScale)!==null&&j!==void 0?j:b.sectionScaleProperty,b.isVisible=(V=(N=m==null?void 0:m.subSurfaceOptions)===null||N===void 0?void 0:N.isVisible)!==null&&V!==void 0?V:b.isVisible,b.clippingModeProperty=(K=(W=m==null?void 0:m.subSurfaceOptions)===null||W===void 0?void 0:W.clippingMode)!==null&&K!==void 0?K:b.clippingMode,b.subChartContainerId&&(b.subChartContainer=typeof b.subChartContainerId=="string"?document.querySelector("[id='".concat(b.subChartContainerId,"']")):b.subChartContainerId),b.applyOptions(m.subSurfaceOptions),b.subPosition=(U=(H=m.subSurfaceOptions)===null||H===void 0?void 0:H.position)!==null&&U!==void 0?U:b.subPositionProperty,b.backgroundFillBrushCache=new c.BrushCache(y),b}return v.createSubSurface=function(y,m){var b=f.sciChartSubSurfaceCommon.createSubSurfaceCanvases(y),S=new v(y.webAssemblyContext2D,{canvases:b,parentSurface:y,subSurfaceOptions:h.SciChartSurface.resolveOptions(m)});return m!=null&&m.theme&&S.applyTheme(m.theme),y.addSubChartInternal(S),S},Object.defineProperty(v.prototype,"viewRect",{get:function(){return this.getSubChartRect()},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"clipRect",{get:function(){return this.clippingMode===a.ESubChartClippingMode.Chart?this.parentSurface.viewRect:this.parentSurface.seriesViewRect},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"clippingMode",{get:function(){return this.clippingModeProperty},set:function(y){this.clippingModeProperty!==y&&(this.clippingModeProperty=y,this.notifyPropertyChanged("clippingMode"))},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"isTransparent",{get:function(){return this.isTransparentProperty},set:function(y){this.isTransparentProperty!==y&&(this.isTransparentProperty=y,this.offset=void 0,this.notifyPropertyChanged("isTransparent"))},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"coordinateMode",{get:function(){return this.coordinateModeProperty},set:function(y){this.coordinateMode!==y&&(this.coordinateModeProperty=y,this.offset=void 0,this.notifyPropertyChanged("coordinateMode"))},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"parentXAxisId",{get:function(){return this.parentXAxisIdProperty},set:function(y){this.parentXAxisIdProperty!==y&&(this.parentXAxisIdProperty=y,this.offset=void 0,this.notifyPropertyChanged("parentXAxisId"))},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"parentYAxisId",{get:function(){return this.parentYAxisIdProperty},set:function(y){this.parentYAxisIdProperty!==y&&(this.parentYAxisIdProperty=y,this.offset=void 0,this.notifyPropertyChanged("parentYAxisId"))},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"subPosition",{get:function(){return this.subPositionProperty},set:function(y){if(this.subPositionProperty!==y){if(!this.parentSurface)throw new Error("subPosition can only be changed for subCharts.");(0,l.areEqual)(this.subPositionProperty,y)||(this.subPositionProperty=y,this.offset=void 0,this.notifyPropertyChanged("subPosition"))}},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"isVisible",{get:function(){return this.isVisibleProperty},set:function(y){this.isVisibleProperty!==y&&(this.isVisibleProperty=y,this.offset=void 0,this.notifyPropertyChanged("isVisible"))},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"sectionScale",{get:function(){return this.sectionScaleProperty},set:function(y){this.sectionScaleProperty!==y&&(this.sectionScaleProperty=y,this.offset=void 0,this.notifyPropertyChanged("sectionScale"))},enumerable:!1,configurable:!0}),v.prototype.updateSubLayout=function(){if(!this.offset||this.coordinateMode===s.ESubSurfacePositionCoordinateMode.DataValue||this.coordinateMode.includes(s.ESubSurfacePositionCoordinateMode.DataValue)){var y=this.calcPadding(),m=new n.Thickness((0,u.translateToNotScaled)(y.top),(0,u.translateToNotScaled)(y.right),(0,u.translateToNotScaled)(y.bottom),(0,u.translateToNotScaled)(y.left));this.updateWrapper(m);var b=this.getOffsets(this.subChartContainer);this.offset=n.Thickness.mergeAdd(y,b)}},Object.defineProperty(v.prototype,"parentSurface",{get:function(){return this.parentSurfaceProperty},enumerable:!1,configurable:!0}),v.prototype.changeViewportSize=function(y,m){this.offset=void 0,this.renderSurface.viewportSize=new o.Size(y,m)},v.prototype.getSubChartContainer=function(){return this.subChartContainer},v.prototype.getSubChartRect=function(){return f.sciChartSubSurfaceCommon.getSubChartRect(this)},Object.defineProperty(v.prototype,"currentWebGlRenderContext",{get:function(){return this.parentSurface.currentWebGlRenderContext},enumerable:!1,configurable:!0}),v.prototype.delete=function(y){y===void 0&&(y=!0),f.sciChartSubSurfaceCommon.deleteSubChart(this,y),this.backgroundFillBrushCache=(0,e.deleteSafe)(this.backgroundFillBrushCache),g.prototype.delete.call(this,!1)},v.prototype.getOptions=function(){var y;"toJSON"in this.themeProvider?this.themeProvider.toJSON():this.themeProvider;var m=g.prototype.getOptions.call(this),b={surfaceType:t.ESciChartSurfaceType.Polar2D,clippingMode:this.clippingMode,isTransparent:this.isTransparent,isVisible:this.isVisible,sectionScale:this.sectionScale,position:this.subPosition,subChartContainerId:typeof this.subChartContainerId=="string"?this.subChartContainerId:(y=this.subChartContainerId)===null||y===void 0?void 0:y.id,coordinateMode:this.coordinateMode,parentXAxisId:this.parentXAxisId,parentYAxisId:this.parentYAxisId},S=Object.assign(m,b);return S},v.prototype.toJSON=function(y){y===void 0&&(y=!1);var m=this.getOptions(),b={type:t.ESciChartSurfaceType.Polar2D,surface:m,xAxes:this.xAxes.asArray().map(function(S){return S.toJSON()}),yAxes:this.yAxes.asArray().map(function(S){return S.toJSON()}),series:this.renderableSeries.asArray().map(function(S){return S.toJSON(y)}),modifiers:this.chartModifiers.asArray().map(function(S){return S.toJSON()}),annotations:this.annotations.asArray().map(function(S){return S.toJSON()})};return b},v.prototype.calcPadding=function(){return f.sciChartSubSurfaceCommon.calcPadding(this)},v.prototype.applySciChartBackground=function(y,m){f.sciChartSubSurfaceCommon.applySciChartBackground(this,y,m)},v.prototype.updateWrapper=function(y){f.sciChartSubSurfaceCommon.updateWrapper(this,y)},v.prototype.getOffsets=function(y){return f.sciChartSubSurfaceCommon.getOffsets(this,y)},v})(d.SciChartPolarSurface);return lT.SciChartPolarSubSurface=p,lT}var gT={},Are;function I8(){if(Are)return gT;Are=1;var r=gT&&gT.__extends||(function(){var g=function(v,y){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,b){m.__proto__=b}||function(m,b){for(var S in b)Object.prototype.hasOwnProperty.call(b,S)&&(m[S]=b[S])},g(v,y)};return function(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");g(v,y);function m(){this.constructor=v}v.prototype=y===null?Object.create(y):(m.prototype=y.prototype,new m)}})();Object.defineProperty(gT,"__esModule",{value:!0}),gT.SciChartSubSurface=void 0;var e=Mr(),i=vn(),n=Yo(),t=ab(),o=Ep(),a=w8(),s=oU(),l=O8(),u=ca(),c=pn(),d=hl(),f=L8(),h=Tp(),p=(function(g){r(v,g);function v(y,m){var b=this,S,_,C,T,x,A,w,L,k,D,j,N,V,W,K,H,U;return b=g.call(this,y,m)||this,b.isSubSurface=!0,b.topSectionClass="top-section",b.leftSectionClass="left-section",b.bottomSectionClass="bottom-section",b.rightSectionClass="right-section",b.isTransparentProperty=!0,b.clippingModeProperty=a.ESubChartClippingMode.Chart,b.subPositionProperty=new i.Rect(0,0,1,1),b.coordinateModeProperty=s.ESubSurfacePositionCoordinateMode.Relative,b.isVisibleProperty=!0,b.sectionScaleProperty=1,b.parentSurfaceProperty=m.parentSurface,b.subChartContainerId=(S=m.subSurfaceOptions)===null||S===void 0?void 0:S.subChartContainerId,b.isTransparentProperty=(C=(_=m==null?void 0:m.subSurfaceOptions)===null||_===void 0?void 0:_.isTransparent)!==null&&C!==void 0?C:b.isTransparent,b.coordinateModeProperty=(x=(T=m==null?void 0:m.subSurfaceOptions)===null||T===void 0?void 0:T.coordinateMode)!==null&&x!==void 0?x:b.coordinateMode,b.parentXAxisIdProperty=(w=(A=m==null?void 0:m.subSurfaceOptions)===null||A===void 0?void 0:A.parentXAxisId)!==null&&w!==void 0?w:b.parentXAxisId,b.parentYAxisIdProperty=(k=(L=m==null?void 0:m.subSurfaceOptions)===null||L===void 0?void 0:L.parentYAxisId)!==null&&k!==void 0?k:b.parentYAxisId,b.sectionScaleProperty=(j=(D=m==null?void 0:m.subSurfaceOptions)===null||D===void 0?void 0:D.sectionScale)!==null&&j!==void 0?j:b.sectionScaleProperty,b.isVisible=(V=(N=m==null?void 0:m.subSurfaceOptions)===null||N===void 0?void 0:N.isVisible)!==null&&V!==void 0?V:b.isVisible,b.clippingModeProperty=(K=(W=m==null?void 0:m.subSurfaceOptions)===null||W===void 0?void 0:W.clippingMode)!==null&&K!==void 0?K:b.clippingMode,b.subChartContainerId&&(b.subChartContainer=typeof b.subChartContainerId=="string"?document.querySelector("[id='".concat(b.subChartContainerId,"']")):b.subChartContainerId),b.applyOptions(m.subSurfaceOptions),b.subPosition=(U=(H=m.subSurfaceOptions)===null||H===void 0?void 0:H.position)!==null&&U!==void 0?U:b.subPositionProperty,b.backgroundFillBrushCache=new d.BrushCache(y),b}return v.createSubSurface=function(y,m){var b,S=u.PerformanceDebugHelper.mark(u.EPerformanceMarkType.AddSubSurfaceStart,{contextId:m==null?void 0:m.id,parentContextId:y.id,level:u.EPerformanceDebugLevel.Verbose}),_=f.sciChartSubSurfaceCommon.createSubSurfaceCanvases(y),C=new v(y.webAssemblyContext2D,{canvases:_,parentSurface:y,subSurfaceOptions:h.SciChartSurface.resolveOptions(m)});return m!=null&&m.theme&&C.applyTheme(m.theme),y.addSubChartInternal(C),u.PerformanceDebugHelper.mark(u.EPerformanceMarkType.AddSubSurfaceEnd,{contextId:C.id,relatedId:(b=S==null?void 0:S.detail)===null||b===void 0?void 0:b.relatedId,parentContextId:y.id,level:u.EPerformanceDebugLevel.Verbose}),C},Object.defineProperty(v.prototype,"viewRect",{get:function(){return this.getSubChartRect()},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"clipRect",{get:function(){return this.clippingMode===a.ESubChartClippingMode.Chart?this.parentSurface.viewRect:this.parentSurface.seriesViewRect},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"clippingMode",{get:function(){return this.clippingModeProperty},set:function(y){this.clippingModeProperty!==y&&(this.clippingModeProperty=y,this.notifyPropertyChanged("clippingMode"))},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"isTransparent",{get:function(){return this.isTransparentProperty},set:function(y){this.isTransparentProperty!==y&&(this.isTransparentProperty=y,this.offset=void 0,this.notifyPropertyChanged("isTransparent"))},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"coordinateMode",{get:function(){return this.coordinateModeProperty},set:function(y){this.coordinateMode!==y&&(this.coordinateModeProperty=y,this.offset=void 0,this.notifyPropertyChanged("coordinateMode"))},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"parentXAxisId",{get:function(){return this.parentXAxisIdProperty},set:function(y){this.parentXAxisIdProperty!==y&&(this.parentXAxisIdProperty=y,this.offset=void 0,this.notifyPropertyChanged("parentXAxisId"))},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"parentYAxisId",{get:function(){return this.parentYAxisIdProperty},set:function(y){this.parentYAxisIdProperty!==y&&(this.parentYAxisIdProperty=y,this.offset=void 0,this.notifyPropertyChanged("parentYAxisId"))},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"subPosition",{get:function(){return this.subPositionProperty},set:function(y){if(this.subPositionProperty!==y){if(!this.parentSurface)throw new Error("subPosition can only be changed for subCharts.");(0,l.areEqual)(this.subPositionProperty,y)||(this.subPositionProperty=y,this.offset=void 0,this.notifyPropertyChanged("subPosition"))}},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"isVisible",{get:function(){return this.isVisibleProperty},set:function(y){this.isVisibleProperty!==y&&(this.isVisibleProperty=y,this.offset=void 0,this.notifyPropertyChanged("isVisible"))},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"sectionScale",{get:function(){return this.sectionScaleProperty},set:function(y){this.sectionScaleProperty!==y&&(this.sectionScaleProperty=y,this.offset=void 0,this.notifyPropertyChanged("sectionScale"))},enumerable:!1,configurable:!0}),v.prototype.updateSubLayout=function(){if(!this.offset||this.coordinateMode===s.ESubSurfacePositionCoordinateMode.DataValue||this.coordinateMode.includes(s.ESubSurfacePositionCoordinateMode.DataValue)){var y=this.calcPadding(),m=new n.Thickness((0,c.translateToNotScaled)(y.top),(0,c.translateToNotScaled)(y.right),(0,c.translateToNotScaled)(y.bottom),(0,c.translateToNotScaled)(y.left));this.updateWrapper(m);var b=this.getOffsets(this.subChartContainer);this.offset=n.Thickness.mergeAdd(y,b)}},Object.defineProperty(v.prototype,"parentSurface",{get:function(){return this.parentSurfaceProperty},enumerable:!1,configurable:!0}),v.prototype.changeViewportSize=function(y,m){this.offset=void 0,this.renderSurface.viewportSize=new o.Size(y,m)},v.prototype.getSubChartContainer=function(){return this.subChartContainer},v.prototype.getSubChartRect=function(){return f.sciChartSubSurfaceCommon.getSubChartRect(this)},Object.defineProperty(v.prototype,"currentWebGlRenderContext",{get:function(){return this.parentSurface.currentWebGlRenderContext},enumerable:!1,configurable:!0}),v.prototype.delete=function(y){y===void 0&&(y=!0),f.sciChartSubSurfaceCommon.deleteSubChart(this,y),this.backgroundFillBrushCache=(0,e.deleteSafe)(this.backgroundFillBrushCache),g.prototype.delete.call(this,!1)},v.prototype.getOptions=function(){var y,m=g.prototype.getOptions.call(this),b={surfaceType:t.ESciChartSurfaceType.Default2D,clippingMode:this.clippingMode,isTransparent:this.isTransparent,isVisible:this.isVisible,sectionScale:this.sectionScale,position:this.subPosition,subChartContainerId:typeof this.subChartContainerId=="string"?this.subChartContainerId:(y=this.subChartContainerId)===null||y===void 0?void 0:y.id,coordinateMode:this.coordinateMode,parentXAxisId:this.parentXAxisId,parentYAxisId:this.parentYAxisId},S=Object.assign(m,b);return S},v.prototype.toJSON=function(y){y===void 0&&(y=!1);var m=this.getOptions(),b={type:t.ESciChartSurfaceType.Default2D,surface:m,xAxes:this.xAxes.asArray().map(function(S){return S.toJSON()}),yAxes:this.yAxes.asArray().map(function(S){return S.toJSON()}),series:this.renderableSeries.asArray().map(function(S){return S.toJSON(y)}),modifiers:this.chartModifiers.asArray().map(function(S){return S.toJSON()}),annotations:this.annotations.asArray().map(function(S){return S.toJSON()})};return b},v.prototype.calcPadding=function(){return f.sciChartSubSurfaceCommon.calcPadding(this)},v.prototype.applySciChartBackground=function(y,m){f.sciChartSubSurfaceCommon.applySciChartBackground(this,y,m)},v.prototype.updateWrapper=function(y){f.sciChartSubSurfaceCommon.updateWrapper(this,y)},v.prototype.getOffsets=function(y){return f.sciChartSubSurfaceCommon.getOffsets(this,y)},v})(h.SciChartSurface);return gT.SciChartSubSurface=p,gT}var wre;function Pv(){return wre||(wre=1,(function(r){var e=xI&&xI.__extends||(function(){var h=function(p,g){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var m in y)Object.prototype.hasOwnProperty.call(y,m)&&(v[m]=y[m])},h(p,g)};return function(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");h(p,g);function v(){this.constructor=p}p.prototype=g===null?Object.create(g):(v.prototype=g.prototype,new v)}})();Object.defineProperty(r,"__esModule",{value:!0}),r.getLegendContainerHtml=r.getLegendItemHtml=r.SciChartLegendBase=r.ELegendType=r.ELegendPlacement=r.ELegendOrientation=void 0;var i=So(),n=$n(),t=Ep(),o=mY(),a=k8(),s=I8(),l;(function(h){h.Vertical="Vertical",h.Horizontal="Horizontal"})(l=r.ELegendOrientation||(r.ELegendOrientation={}));var u;(function(h){h.TopLeft="TopLeft",h.TopRight="TopRight",h.BottomLeft="BottomLeft",h.BottomRight="BottomRight"})(u=r.ELegendPlacement||(r.ELegendPlacement={})),(function(h){h.SciChartLegend="SciChartLegend",h.ManualLegend="ManualLegend",h.SciChartPieLegend="SciChartPieLegend",h.SciChart3DLegend="SciChart3DLegend"})(r.ELegendType||(r.ELegendType={}));var c=(function(h){e(p,h);function p(g){var v=this,y,m,b,S,_;return v=h.call(this)||this,v.orientationProperty=l.Vertical,v.showLegendProperty=!0,v.placementProperty=u.TopLeft,v.marginProperty=10,v.isDirty=!0,v.eventListenersCollection=new Map,v.removeEventListenerFromSeries=function(C){var T;(T=v.eventListenersCollection.get(C))===null||T===void 0||T.forEach(function(x){var A=x.element,w=x.eventListener,L=x.eventType;A.removeEventListener(L,w)}),v.eventListenersCollection.delete(C)},v.orientationProperty=(y=g==null?void 0:g.orientation)!==null&&y!==void 0?y:v.orientationProperty,v.showLegendProperty=(m=g==null?void 0:g.showLegend)!==null&&m!==void 0?m:v.showLegend,v.placementProperty=(b=g==null?void 0:g.placement)!==null&&b!==void 0?b:v.placement,v.marginProperty=(S=g==null?void 0:g.margin)!==null&&S!==void 0?S:v.margin,v.placementDivIdProperty=(_=g==null?void 0:g.placementDivId)!==null&&_!==void 0?_:v.placementDivId,v.backgroundColorProperty=g==null?void 0:g.backgroundColor,v.textColorProperty=g==null?void 0:g.textColor,v.update=v.update.bind(v),v.onResize=v.onResize.bind(v),v}return p.prototype.setInvalidateParentSurface=function(g){this.invalidateParentSurface=g},p.prototype.setRootDiv=function(g){this.rootDiv=g},p.prototype.setSeriesViewRect=function(g){},p.prototype.setParentSurface=function(g){this.parentSurfaceProperty=g},p.prototype.attachTo=function(g){this.setParentSurface(g),this.setRootDiv(g.domDivContainer),this.setInvalidateParentSurface(g.invalidateElement),g.rendered.subscribe(this.update),(g instanceof s.SciChartSubSurface||g instanceof a.SciChartPolarSubSurface)&&(this.lastViewportSize=g.renderSurface.viewportSize,g.preRender.subscribe(this.onResize))},p.prototype.detach=function(){this.setRootDiv(void 0),this.parentSurfaceProperty.rendered.unsubscribe(this.update),this.lastViewportSize&&this.parentSurfaceProperty.preRender.unsubscribe(this.onResize),this.setInvalidateParentSurface(void 0),this.setParentSurface(void 0),this.delete()},p.prototype.onResize=function(){var g=this.parentSurface.renderSurface.viewportSize;t.Size.isEqual(this.lastViewportSize,g)||(this.invalidateLegend(),this.lastViewportSize=g)},p.prototype.update=function(){if(!(!this.isDirty&&this.div))try{this.clear(),this.showLegend&&this.create(),this.isDirty=!1}catch{}},p.prototype.invalidateLegend=function(){this.isDirty=!0},Object.defineProperty(p.prototype,"orientation",{get:function(){return this.orientationProperty},set:function(g){this.orientationProperty=g,this.notifyPropertyChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"showLegend",{get:function(){return this.showLegendProperty},set:function(g){this.showLegendProperty=g,this.notifyPropertyChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"placement",{get:function(){return this.placementProperty},set:function(g){this.placementProperty=g,this.notifyPropertyChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"margin",{get:function(){return this.marginProperty},set:function(g){this.marginProperty=g,this.notifyPropertyChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"placementDivId",{get:function(){return this.placementDivIdProperty},set:function(g){this.clear(),this.placementDivIdProperty=g,this.notifyPropertyChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"backgroundColor",{get:function(){return this.backgroundColorProperty},set:function(g){this.backgroundColorProperty=g,this.notifyPropertyChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"textColor",{get:function(){return this.textColorProperty},set:function(g){this.textColorProperty=g,this.notifyPropertyChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"parentSurface",{get:function(){return this.parentSurfaceProperty},enumerable:!1,configurable:!0}),p.prototype.clear=function(){var g;this.div&&(this.removeEventListeners(),(g=this.parentDiv)===null||g===void 0||g.removeChild(this.div),this.div=void 0,this.parentDiv=void 0)},p.prototype.delete=function(){this.clear()},p.prototype.isExternal=function(){return!!this.placementDivId},p.prototype.getLegendHTML=function(g,v,y,m,b,S,_,C){var T=this,x=C.reduce(function(A,w){var L;return A+T.getLegendItemHTML(b,S,(L=w.showMarker)!==null&&L!==void 0?L:_,w)},"");return(0,r.getLegendContainerHtml)(g,v,y,m,x,this.isExternal())},p.prototype.getLegendItemHTML=function(g,v,y,m){return(0,r.getLegendItemHtml)(g,v,y,m)},p.prototype.notifyPropertyChanged=function(){this.isDirty=!0,this.invalidateParentSurface&&this.invalidateParentSurface()},p.prototype.create=function(){var g=this.getInnerHTML();if(g){var v=(0,o.htmlToElement)(g);this.parentDiv=this.getParentDiv(),this.parentDiv.appendChild(v),this.div=v,i.IS_TEST_ENV||this.addEventListeners()}},p.prototype.getParentDiv=function(){return this.placementDivId?typeof this.placementDivId=="string"?document.querySelector("[id='".concat(this.placementDivId,"']")):this.placementDivId:this.rootDiv},p})(n.DeletableEntity);r.SciChartLegendBase=c;var d=function(h,p,g,v){var y=h===l.Vertical?"flex":"inline-flex",m='<span class="scichart__legend-item" style="display: '.concat(y,'; align-items: center; margin-right: 4px; white-space: nowrap;">');if(p){var b=v.checked?"checked":"";m+="<input ".concat(b,' type="checkbox" id="').concat(v.id,'">')}if(g)if(v.gradient){var S="";v.gradient.gradientStops.forEach(function(_){S+=",".concat(_.color)}),m+='<label for="'.concat(v.id,'" style="background-image: linear-gradient(to right').concat(S,'); margin: 4px; width: 30px; height: 13px;"></label>')}else m+='<label for="'.concat(v.id,'" style="background-color: ').concat(v.color,'; margin: 4px; width: 30px; height: 13px;"></label>');return m+='<label for="'.concat(v.id,'" style="margin-left: 4px;">').concat(v.name,"</label>"),m+="</span>",m};r.getLegendItemHtml=d;var f=function(h,p,g,v,y,m){if(m===void 0&&(m=!1),!y)return"";var b="",S="";m||(b="position: absolute;"),h===u.TopLeft?S="left: 0; top: 0;":h===u.TopRight?S="right: 0; top: 0;":h===u.BottomLeft?S="left: 0; bottom: 0;":h===u.BottomRight&&(S="right: 0; bottom: 0;");var _='<div class="scichart__legend" style="height: 100%; '.concat(b," display: flex; ").concat(S,' text-align: center;">'),C=[u.TopLeft,u.TopRight].includes(h)?"flex-start":"flex-end",T=v.left,x=v.right,A=v.bottom,w=v.top,L="margin-left: ".concat(T,"px; margin-top: ").concat(w,"px; margin-right: ").concat(x,"px; margin-bottom: ").concat(A,"px;");return _+='<div style="display: block; align-self: '.concat(C,"; width: fit-content; pointer-events: auto; ").concat(L," padding: 5px; border-radius: 3px; background-color: ").concat(g,"; color: ").concat(p,'">'),_+=y,_+="</div></div>",_};r.getLegendContainerHtml=f})(xI)),xI}var Ore;function BSe(){if(Ore)return aT;Ore=1;var r=aT&&aT.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(u[d]=c[d])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})();Object.defineProperty(aT,"__esModule",{value:!0}),aT.SciChartPieLegend=void 0;var e=Yo(),i=$w(),n=Pv(),t=(function(a){r(s,a);function s(){var l=a!==null&&a.apply(this,arguments)||this;return l.type=n.ELegendType.SciChartPieLegend,l.animate=!0,l.showCheckboxesProperty=!1,l.showSeriesMarkersProperty=!0,l}return Object.defineProperty(s.prototype,"showCheckboxes",{get:function(){return this.showCheckboxesProperty},set:function(l){this.showCheckboxesProperty=l,this.notifyPropertyChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"showSeriesMarkers",{get:function(){return this.showSeriesMarkersProperty},set:function(l){this.showSeriesMarkersProperty=l,this.notifyPropertyChanged()},enumerable:!1,configurable:!0}),s.prototype.applyTheme=function(){},s.prototype.setPieSegmentArray=function(l){this.pieSegmentArray=l},s.prototype.update=function(){this.clear(),this.showLegend&&this.create()},s.prototype.addEventListeners=function(){var l=this;this.pieSegmentArray.forEach(function(u){var c=l.parentDiv.querySelector("#".concat(o(u.id)));if(c){var d=(0,i.addEventListenerToPieSegment)(u,c,l.animate),f=l.eventListenersCollection.get(u.id);f?f.push(d):l.eventListenersCollection.set(u.id,[d])}})},s.prototype.removeEventListeners=function(){var l=this;this.pieSegmentArray.forEach(function(u){return l.removeEventListenerFromSeries(u.id)})},s.prototype.getInnerHTML=function(){var l=this.parentSurfaceProperty.themeProvider.legendBackgroundBrush,u=this.parentSurfaceProperty.themeProvider.labelForegroundBrush,c=this.pieSegmentArray.map(function(f,h){var p;return{id:o(f.id),name:(p=f.text)!==null&&p!==void 0?p:"Segment ".concat(h+1),color:f.color,checked:f.isSelected,gradient:f.colorLinearGradient}}),d=new e.Thickness(this.margin,this.margin,this.margin,this.margin);return this.getLegendHTML(this.placement,u,l,d,this.orientation,this.showCheckboxes,this.showSeriesMarkers,c)},s})(n.SciChartLegendBase);aT.SciChartPieLegend=t;var o=function(a){return"check".concat(a)};return aT}var H5={},Dre;function ize(){return Dre||(Dre=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.PROPERTY=void 0,(function(e){e.HOLE_RADIUS="HOLE_RADIUS",e.HOLE_RADIUS_SIZING_MODE="HOLE_RADIUS_SIZING_MODE",e.PIE_TYPE="PIE_TYPE",e.SERIES_SPACING="SERIES_SPACING",e.PADDING="PADDING",e.CANVAS_BORDER="CANVAS_BORDER",e.LABEL_PROVIDER="LABEL_PROVIDER",e.VALUE_MODE="VALUE_MODE",e.LABEL_RADIUS="LABEL_RADIUS",e.TEXT_STYLE="TEXT_STYLE"})(r.PROPERTY||(r.PROPERTY={}))})(H5)),H5}var U5={},Rre;function VSe(){return Rre||(Rre=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.PROPERTY=void 0,(function(e){e.COLOR="COLOR",e.COLOR_LINEAR_GRADIENT="COLOR_LINEAR_GRADIENT",e.DELTA="DELTA",e.IS_SELECTED="IS_SELECTED",e.PERCENTAGE="PERCENTAGE",e.TEXT="TEXT",e.VALUE="VALUE",e.SHIFT="SHIFT",e.LABEL_PROVIDER="LABEL_PROVIDER",e.LABEL_STYLE="LABEL_STYLE",e.LABEL_OFFSET="LABEL_OFFSET",e.RADIUS_ADJUSTMENT="RADIUS_ADJUSTMENT",e.SHOW_LABEL="SHOW_LABEL"})(r.PROPERTY||(r.PROPERTY={}))})(U5)),U5}var Mre;function $w(){return Mre||(Mre=1,(function(r){var e=Tm&&Tm.__extends||(function(){var U=function(I,Q){return U=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Z,ee){Z.__proto__=ee}||function(Z,ee){for(var ie in ee)Object.prototype.hasOwnProperty.call(ee,ie)&&(Z[ie]=ee[ie])},U(I,Q)};return function(I,Q){if(typeof Q!="function"&&Q!==null)throw new TypeError("Class extends value "+String(Q)+" is not a constructor or null");U(I,Q);function Z(){this.constructor=I}I.prototype=Q===null?Object.create(Q):(Z.prototype=Q.prototype,new Z)}})(),i=Tm&&Tm.__assign||function(){return i=Object.assign||function(U){for(var I,Q=1,Z=arguments.length;Q<Z;Q++){I=arguments[Q];for(var ee in I)Object.prototype.hasOwnProperty.call(I,ee)&&(U[ee]=I[ee])}return U},i.apply(this,arguments)},n=Tm&&Tm.__spreadArray||function(U,I,Q){if(Q||arguments.length===2)for(var Z=0,ee=I.length,ie;Z<ee;Z++)(ie||!(Z in I))&&(ie||(ie=Array.prototype.slice.call(I,0,Z)),ie[Z]=I[Z]);return U.concat(ie||Array.prototype.slice.call(I))};Object.defineProperty(r,"__esModule",{value:!0}),r.addEventListenerToPieSegment=r.SciChartPieSurface=r.EPieValueMode=r.EPieType=r.ESizingMode=void 0;var t=Jn(),o=So(),a=hc(),s=Mr(),l=Rg(),u=FS(),c=vn(),d=$o(),f=ab(),h=Ha(),p=Vd(),g=ws(),v=kH(),y=Ds(),m=aU(),b=BSe(),S=e_(),_=ln(),C=Jq(),T=Hi(),x=ize(),A=VSe(),w=Math.PI/180,L=90,k;(function(U){U.Absolute="Absolute",U.Relative="Relative"})(k=r.ESizingMode||(r.ESizingMode={}));var D;(function(U){U.Pie="Pie",U.Donut="Donut"})(D=r.EPieType||(r.EPieType={}));var j;(function(U){U.Percentage="Percentage",U.Raw="Raw"})(j=r.EPieValueMode||(r.EPieValueMode={}));var N=(function(U){e(I,U);function I(Q,Z){Q===void 0&&(Q={});var ee=this,ie,de,pe,_e,Te,De,Pe,Ee,Re,je,Ke,ot,We,xe,ve,he;ee=U.call(this,Q)||this,ee.animate=!0,ee.animationFrames=30,ee.surfaceType=h.ESurfaceType.SciChartPieSurfaceType,ee.pieTypeProperty=D.Pie,ee.holeRadiusProperty=.5,ee.holeRadiusSizingModeProperty=k.Relative,ee.seriesSpacingProperty=0,ee.labelRadiusProperty=1,ee.titleDivs=[],ee.sweepAnimationDone=!1,ee.suspendUpdate=!1,ee.themeProviderProperty=new v.SciChartJSDarkTheme,ee.previousThemeProviderProperty=new v.SciChartJSDarkTheme,ee.valueModeProperty=j.Percentage,ee.labelStyleProperty={fontSize:14,fontFamily:(0,p.getDefaultFontName)(),color:"#1e323d",fontWeight:"bold"},ee.id=(ie=Z==null?void 0:Z.id)!==null&&ie!==void 0?ie:(0,g.generateGuid)();var Se=ee.domCanvas2D.width/T.DpiHelper.PIXEL_RATIO,be=ee.domCanvas2D.height/T.DpiHelper.PIXEL_RATIO;return ee.viewRectProperty=new c.Rect(0,0,Se,be),o.IS_TEST_ENV||(ee.resizeSubscriptionToken=S.default.subscribeToResize(Q.domCanvas2D,Q.aspect,ee)),ee.drawChart=ee.drawChart.bind(ee),ee.deleteInternals=ee.deleteInternals.bind(ee),ee.invalidateElement=ee.invalidateElement.bind(ee),ee.detachPieSegment=ee.detachPieSegment.bind(ee),ee.attachPieSegment=ee.attachPieSegment.bind(ee),ee.pieSegments=new u.ObservableArray,o.IS_TEST_ENV||ee.pieSegments.collectionChanged.subscribe(function(ke){var qe,rt;(qe=ke.getOldItems())===null||qe===void 0||qe.forEach(ee.detachPieSegment),(rt=ke.getNewItems())===null||rt===void 0||rt.forEach(ee.attachPieSegment),ee.invalidateElement()}),ee.applySciChartBackground(_.SciChartSurfaceBase.DEFAULT_THEME.sciChartBackground),ee.legend=new b.SciChartPieLegend,ee.legend.setRootDiv(ee.domDivContainer),ee.legend.setPieSegmentArray(ee.pieSegments.asArray()),ee.legend.setInvalidateParentSurface(ee.invalidateElement),ee.legend.setParentSurface(ee),ee.heightAspect=(de=Z==null?void 0:Z.heightAspect)!==null&&de!==void 0?de:0,ee.widthAspect=(pe=Z==null?void 0:Z.widthAspect)!==null&&pe!==void 0?pe:0,ee.pieTypeProperty=(_e=Z==null?void 0:Z.pieType)!==null&&_e!==void 0?_e:ee.pieType,ee.holeRadiusProperty=(Te=Z==null?void 0:Z.holeRadius)!==null&&Te!==void 0?Te:ee.holeRadius,ee.animate=(De=Z==null?void 0:Z.animate)!==null&&De!==void 0?De:ee.animate,ee.holeRadiusSizingModeProperty=(Pe=Z==null?void 0:Z.holeRadiusSizingMode)!==null&&Pe!==void 0?Pe:ee.holeRadiusSizingModeProperty,ee.seriesSpacingProperty=(Ee=Z==null?void 0:Z.seriesSpacing)!==null&&Ee!==void 0?Ee:ee.seriesSpacingProperty,ee.labelRadiusProperty=(Re=Z==null?void 0:Z.labelRadiusAdjustment)!==null&&Re!==void 0?Re:ee.labelRadiusProperty,ee.legend.showLegend=(je=Z==null?void 0:Z.showLegend)!==null&&je!==void 0?je:ee.legend.showLegend,ee.legend.animate=(Ke=Z==null?void 0:Z.animateLegend)!==null&&Ke!==void 0?Ke:ee.legend.animate,ee.legend.showCheckboxes=(ot=Z==null?void 0:Z.showLegendCheckBoxes)!==null&&ot!==void 0?ot:ee.legend.showCheckboxes,ee.legend.showSeriesMarkers=(We=Z==null?void 0:Z.showLegendSeriesMarkers)!==null&&We!==void 0?We:ee.legend.showSeriesMarkers,ee.paddingProperty=(xe=Z==null?void 0:Z.padding)!==null&&xe!==void 0?xe:ee.paddingProperty,Z!=null&&Z.labelProvider&&("getSegmentText"in(Z==null?void 0:Z.labelProvider)||(Z.labelProvider=(0,t.createType)(d.EBaseType.LabelProvider,Z.labelProvider.type,void 0,Z.labelProvider.options))),ee.labelProvider=(ve=Z==null?void 0:Z.labelProvider)!==null&&ve!==void 0?ve:new m.PieLabelProvider,ee.valueModeProperty=(he=Z==null?void 0:Z.valueMode)!==null&&he!==void 0?he:ee.valueModeProperty,ee}return I.create=function(Q,Z){var ee,ie,de=S.default.initCanvas(Q,(ee=Z==null?void 0:Z.widthAspect)!==null&&ee!==void 0?ee:0,(ie=Z==null?void 0:Z.heightAspect)!==null&&ie!==void 0?ie:0,S.default.ECanvasType.svg,void 0,Z==null?void 0:Z.touchAction);return new Promise(function(pe){var _e,Te,De,Pe=n(n(n(n([],l.sciChartDestinations,!0),l.sciChart3DDestinations,!0),l.sciChartSingleDestinations,!0),l.sciChartPieDestinations,!0).filter(function(Re){return Re.sciChartSurface.domChartRoot.id===de.domChartRoot.id});Pe.forEach(function(Re){return Re.sciChartSurface.delete()}),Z=_.SciChartSurfaceBase.resolveOptions(Z);var Ee=new I(de,Z);Ee.applyTheme(Z==null?void 0:Z.theme),l.sciChartPieDestinations.push({canvasElementId:(_e=de.domCanvas2D)===null||_e===void 0?void 0:_e.id,sciChartSurface:Ee,width:(Te=de.domCanvas2D)===null||Te===void 0?void 0:Te.width,height:(De=de.domCanvas2D)===null||De===void 0?void 0:De.height}),Ee.setDestinations(l.sciChartPieDestinations),setTimeout(function(){return pe(Ee)},0)})},Object.defineProperty(I.prototype,"isDeleted",{get:function(){return this.isDeletedProperty},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"labelProvider",{get:function(){return this.labelProviderProperty},set:function(Q){Q&&this.labelProviderProperty!==Q&&(this.labelProviderProperty=Q,this.notifyPropertyChanged(x.PROPERTY.LABEL_PROVIDER))},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"labelStyle",{get:function(){return this.labelStyleProperty},set:function(Q){this.labelStyleProperty=i(i({},this.labelStyle),Q),this.notifyPropertyChanged(x.PROPERTY.TEXT_STYLE)},enumerable:!1,configurable:!0}),I.prototype.applyTheme=function(Q){this.previousThemeProviderProperty=this.themeProviderProperty,this.themeProviderProperty=Q,this.applySciChartBackground(Q.sciChartBackground),this.labelStyle.color===this.previousThemeProvider.tickTextBrush&&(this.labelStyle={color:Q.tickTextBrush}),this.invalidateElement()},Object.defineProperty(I.prototype,"themeProvider",{get:function(){return this.themeProviderProperty},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"previousThemeProvider",{get:function(){return this.previousThemeProviderProperty},enumerable:!1,configurable:!0}),I.prototype.setDestinations=function(Q){this.destinations=Q},I.prototype.invalidateElement=function(Q){this.isValidToDraw()&&(typeof Q=="string"&&Q===A.PROPERTY.VALUE&&(this.sweepAnimationDone=!1),this.update())},I.prototype.update=function(){var Q;this.suspendUpdate||(this.draw(),(Q=this.legend)===null||Q===void 0||Q.update())},I.prototype.delete=function(){var Q=this,Z;this.deleteInternals(),this.legend=(0,s.deleteSafe)(this.legend),this.labelProvider=(0,s.deleteSafe)(this.labelProvider),this.resizeSubscriptionToken=(0,s.deleteSafe)(this.resizeSubscriptionToken);var ee=(Z=this.destinations)===null||Z===void 0?void 0:Z.findIndex(function(ie){return ie.sciChartSurface.id===Q.id});ee>=0&&this.destinations.splice(ee,1),this.isDeletedProperty=!0},I.prototype.deleteInternals=function(Q){var Z=this;this.svg&&(this.domSvgContainer.removeChild(this.svg),this.svg=void 0),Q||(this.titleDivs.forEach(function(pe){Z.domDivContainer.removeChild(pe)}),this.titleDivs=[]);for(var ee=0,ie=this.deletables;ee<ie.length;ee++){var de=ie[ee];(0,s.deleteSafe)(de)}this.deletables=[]},I.prototype.changeViewportSize=function(Q,Z){var ee=Q,ie=Z;this.viewRectProperty=new c.Rect(0,0,Q,Z),this.changeDomViewportSize(ee,ie),this.invalidateElement()},Object.defineProperty(I.prototype,"pieType",{get:function(){return this.pieTypeProperty},set:function(Q){this.pieTypeProperty=Q,this.notifyPropertyChanged(x.PROPERTY.PIE_TYPE)},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"holeRadius",{get:function(){return this.holeRadiusProperty},set:function(Q){this.holeRadiusProperty=Q,this.notifyPropertyChanged(x.PROPERTY.HOLE_RADIUS)},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"holeRadiusSizingMode",{get:function(){return this.holeRadiusSizingModeProperty},set:function(Q){this.holeRadiusSizingModeProperty=Q,this.notifyPropertyChanged(x.PROPERTY.HOLE_RADIUS_SIZING_MODE)},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"padding",{get:function(){return this.paddingProperty},set:function(Q){this.paddingProperty!==Q&&(this.paddingProperty=Q,this.updateLegendMargin(),this.notifyPropertyChanged(x.PROPERTY.PADDING))},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"canvasBorder",{get:function(){return this.canvasBorderProperty},set:function(Q){this.canvasBorderProperty!==Q&&(this.canvasBorderProperty=Q,this.updateLegendMargin(),this.notifyPropertyChanged(x.PROPERTY.PADDING))},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"seriesSpacing",{get:function(){return this.seriesSpacingProperty},set:function(Q){this.seriesSpacingProperty!==Q&&(this.seriesSpacingProperty=Q,this.notifyPropertyChanged(x.PROPERTY.SERIES_SPACING))},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"valueMode",{get:function(){return this.valueModeProperty},set:function(Q){this.valueModeProperty=Q,this.notifyPropertyChanged(x.PROPERTY.VALUE_MODE)},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"labelRadiusAdjustment",{get:function(){return this.labelRadiusProperty},set:function(Q){this.labelRadiusProperty=Q,this.notifyPropertyChanged(x.PROPERTY.VALUE_MODE)},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"viewRect",{get:function(){return this.viewRectProperty},enumerable:!1,configurable:!0}),I.prototype.getOptions=function(){var Q;"toJSON"in this.themeProvider?Q=this.themeProvider.toJSON():Q=this.themeProvider;var Z={animate:this.animate,animateLegend:this.legend.animate,heightAspect:this.heightAspect,widthAspect:this.widthAspect,holeRadius:this.holeRadius,holeRadiusSizingMode:this.holeRadiusSizingMode,pieType:this.pieType,showLegend:this.legend.showLegend,showLegendCheckBoxes:this.legend.showCheckboxes,showLegendSeriesMarkers:this.legend.showSeriesMarkers,padding:this.padding,canvasBorder:this.canvasBorder,seriesSpacing:this.seriesSpacing,labelProvider:this.labelProvider.toJSON(),valueMode:this.valueMode,labelRadiusAdjustment:this.labelRadiusAdjustment,animationFrames:this.animationFrames,theme:Q};return Z},I.prototype.toJSON=function(Q){Q===void 0&&(Q=!1);var Z=this.getOptions(),ee={type:f.ESciChartSurfaceType.Pie2D,surface:Z,onCreated:this.onCreatedName,segments:Q?void 0:this.pieSegments.asArray().map(function(ie){return ie.toJSON()})};return ee},I.prototype.calcTitlePosition=function(Q,Z,ee,ie,de,pe,_e,Te,De){var Pe=ie<ee/2?ee*2/3+ie/6:(ee+ie)/2,Ee=(de+pe)/2,Re=Q+Math.cos(w*Ee)*(Pe*this.labelRadiusProperty+_e)-Te/2,je=Z+Math.sin(w*Ee)*(Pe*this.labelRadiusProperty+_e)-De/2;return{left:Re,top:je}},I.prototype.changeDomViewportSize=function(Q,Z){this.domSvgContainer&&(this.domSvgContainer.setAttribute("width",Q.toString()),this.domSvgContainer.setAttribute("height",Z.toString())),this.domSvgAdornerLayer&&(this.domSvgAdornerLayer.setAttribute("width",Q.toString()),this.domSvgAdornerLayer.setAttribute("height",Z.toString()))},I.prototype.notifyPropertyChanged=function(Q){this.invalidateElement(),Q===x.PROPERTY.LABEL_PROVIDER&&this.labelProviderProperty&&this.labelProviderProperty.attachedToSurface(this)},I.prototype.isValidToDraw=function(){return!0},I.prototype.detachPieSegment=function(Q){Q.onDetach()},I.prototype.attachPieSegment=function(Q){Q.onAttach(this)},I.prototype.updateLegendMargin=function(){var Q,Z,ee,ie=((Q=this.padding)===null||Q===void 0?void 0:Q.top)||0,de=((Z=this.canvasBorder)===null||Z===void 0?void 0:Z.border)||((ee=this.canvasBorder)===null||ee===void 0?void 0:ee.borderTop)||0;this.legend.margin=ie+de+10},I.prototype.calculateViewRectWidth=function(Q){var Z,ee,ie,de,pe;return!((Z=this.padding)===null||Z===void 0)&&Z.left&&(Q-=this.padding.left),!((ee=this.padding)===null||ee===void 0)&&ee.right&&(Q-=this.padding.right),!((ie=this.canvasBorder)===null||ie===void 0)&&ie.border?Q-=this.canvasBorder.border*2:(!((de=this.canvasBorder)===null||de===void 0)&&de.borderLeft&&(Q-=this.canvasBorder.borderLeft),!((pe=this.canvasBorder)===null||pe===void 0)&&pe.borderRight&&(Q-=this.canvasBorder.borderRight)),Q},I.prototype.calculateViewRectHeight=function(Q){var Z,ee,ie,de,pe;return!((Z=this.padding)===null||Z===void 0)&&Z.top&&(Q-=this.padding.top),!((ee=this.padding)===null||ee===void 0)&&ee.bottom&&(Q-=this.padding.bottom),!((ie=this.canvasBorder)===null||ie===void 0)&&ie.border?Q-=this.canvasBorder.border*2:(!((de=this.canvasBorder)===null||de===void 0)&&de.borderTop&&(Q-=this.canvasBorder.borderTop),!((pe=this.canvasBorder)===null||pe===void 0)&&pe.borderBottom&&(Q-=this.canvasBorder.borderBottom)),Q},I.prototype.draw=function(){var Q=this;if(this.preRender.raiseEvent(),this.pieSegments.size()!==0){if(this.sweepAnimationDone||!this.animate)this.deleteInternals(),this.drawChart();else{var Z=this.animationFrames;this.suspendUpdate=!0;var ee=function(){return Q.suspendUpdate=!1},ie=function(){return Q.sweepAnimationDone=!0},de=this.invalidateElement,pe=this.drawChart,_e=this.deleteInternals;(function Te(De){setTimeout(function(){var Pe=De/Z;_e(!0),pe(Pe),De===Z&&(ee(),ie(),de()),++De<=Z&&Te(De)},20)})(1)}o.IS_TEST_ENV||this.pieSegments.asArray().forEach(function(Te){var De=Q.domChartRoot.querySelector("[id='".concat(Te.id,"']"));if(De){var Pe=(0,r.addEventListenerToPieSegment)(Te,De,Q.animate);Q.addDeletable(Pe)}}),this.rendered.raiseEvent()}},I.prototype.drawChart=function(Q){var Z=this;Q===void 0&&(Q=1);var ee=this.pieSegmentsTotalValue();if(ee){var ie=2,de=this.themeProviderProperty.sciChartBackground,pe=this.pieSegments.asArray(),_e=this.pieSegmentsTotalOldValue(),Te=Math.min(this.calculateViewRectWidth(this.viewRect.width),this.calculateViewRectHeight(this.viewRect.height))*.8/2,De=0;this.pieType===D.Donut&&(De=this.holeRadiusSizingMode===k.Absolute?this.holeRadius:Te*this.holeRadius);var Pe=this.calculateViewRectWidth(this.viewRect.width)/2,Ee=this.calculateViewRectHeight(this.viewRect.height)/2,Re="<defs>",je="",Ke=0,ot=0;pe.forEach(function(ve,he){var Se;if(ve.value!==0){var be=(Se=ve.oldValue)!==null&&Se!==void 0?Se:0,ke=360*Ke/ee-L,qe=360*(Ke+ve.value)/ee-L-1e-4,rt=360*ot/_e-L,St=360*(ot+be)/_e-L;Ke+=ve.value,ot+=be;var xt=rt+(ke-rt)*a.easing.inOutCubic(Q),It=St+(qe-St)*a.easing.inOutCubic(Q),Zt=!!ve.colorLinearGradient,ct="grad".concat(ve.id);if(Zt){var Qe=ve.colorLinearGradient.startPoint.x*100,Et=ve.colorLinearGradient.startPoint.y*100,Gt=ve.colorLinearGradient.endPoint.x*100,Xe=ve.colorLinearGradient.endPoint.y*100,Vt='<linearGradient id="'.concat(ct,'" x1="').concat(Qe,'%" y1="').concat(Et,'%" x2="').concat(Gt,'%" y2="').concat(Xe,'%">');ve.colorLinearGradient.gradientStops.forEach(function(kr){var qt=kr.offset*100;Vt+='<stop offset="'.concat(qt,'%" style="stop-color:').concat(kr.color,';stop-opacity:1" />')}),Vt+="</linearGradient>",Re+=Vt}var lr=Z.pieType===D.Donut?W(Pe,Ee,Te*ve.radiusAdjustment,De,xt,It,ve.shift+Z.seriesSpacing):V(Pe,Ee,Te*ve.radiusAdjustment,xt,It,ve.shift+Z.seriesSpacing),Jt=Zt?'<g fill="url(#'.concat(ct,')"><path id="').concat(ve.id,'" stroke="').concat(de,'" stroke-width="').concat(ie,'" d="').concat(lr,'" /></g>'):'<path id="'.concat(ve.id,'" stroke="').concat(de,'" stroke-width="').concat(ie,'" d="').concat(lr,'" fill="').concat(ve.color,'" />');je+=Jt,(Q===1||ve.oldValue)&&Z.drawSegmentLabel(ve,he,ee,xt,It,Pe,Ee,Te*ve.radiusAdjustment,De)}}),Re+="</defs>",this.adjustDomContainer();var We='<svg width="'.concat(this.calculateViewRectWidth(this.viewRect.width),'" height="').concat(this.calculateViewRectHeight(this.viewRect.height),'">').concat(Re).concat(je,"</svg>"),xe=y.annotationHelpers.createSvg(We,this.domSvgContainer);this.svg=xe}},I.prototype.adjustDomContainer=function(){var Q,Z,ee,ie,de,pe;this.padding&&this.padding.left&&(this.domSvgContainer.style.paddingLeft=this.padding.left+"px"),this.padding&&this.padding.right&&(this.domSvgContainer.style.paddingRight=this.padding.right+"px"),this.padding&&this.padding.top&&(this.domSvgContainer.style.paddingTop=this.padding.top+"px"),this.padding&&this.padding.bottom&&(this.domSvgContainer.style.paddingBottom=this.padding.bottom+"px"),this.canvasBorder&&(this.domSvgContainer.style.borderStyle="solid"),!((Q=this.canvasBorder)===null||Q===void 0)&&Q.border&&(this.domSvgContainer.style.borderWidth=this.canvasBorder.border+"px"),!((Z=this.canvasBorder)===null||Z===void 0)&&Z.color&&(this.domSvgContainer.style.borderColor=this.canvasBorder.color),!((ee=this.canvasBorder)===null||ee===void 0)&&ee.borderBottom&&(this.domSvgContainer.style.borderBottomWidth=this.canvasBorder.borderBottom+"px"),!((ie=this.canvasBorder)===null||ie===void 0)&&ie.borderTop&&(this.domSvgContainer.style.borderTopWidth=this.canvasBorder.borderTop+"px"),!((de=this.canvasBorder)===null||de===void 0)&&de.borderLeft&&(this.domSvgContainer.style.borderLeftWidth=this.canvasBorder.borderLeft+"px"),!((pe=this.canvasBorder)===null||pe===void 0)&&pe.borderRight&&(this.domSvgContainer.style.borderRightWidth=this.canvasBorder.borderRight+"px")},I.prototype.drawSegmentLabel=function(Q,Z,ee,ie,de,pe,_e,Te,De){var Pe,Ee,Re,je,Ke,ot,We,xe,ve,he,Se;if(Q.showLabel!==!1){var be="segment"+Z,ke=this.titleDivs.find(function(Zt){return Zt.id===be});ke||(ke=document.createElement("div"),ke.className="scichart-pie-text-container",ke.id=be,ke.style.position="absolute",ke.style.pointerEvents="none",ke.style.padding="5px",ke.style.borderRadius="3px",this.titleDivs.push(ke),this.domDivContainer.appendChild(ke),ke.style.display="block"),ke.style.color=Q.labelStyle.color,ke.style.fontWeight=Q.labelStyle.fontWeight,ke.style.fontFamily=(0,p.getFontFamily)(Q.labelStyle.fontFamily,!1),ke.style.fontSize=Q.labelStyle.fontSize.toString()+"px",ke.innerHTML=Q.getLabelText(ee);var qe=ke.offsetWidth,rt=ke.offsetHeight,St=0,xt=0;!((Pe=this.padding)===null||Pe===void 0)&&Pe.left&&(St+=(Ee=this.padding)===null||Ee===void 0?void 0:Ee.left),!((Re=this.padding)===null||Re===void 0)&&Re.top&&(xt+=(je=this.padding)===null||je===void 0?void 0:je.top),!((Ke=this.canvasBorder)===null||Ke===void 0)&&Ke.border?(St+=(ot=this.canvasBorder)===null||ot===void 0?void 0:ot.border,xt+=(We=this.canvasBorder)===null||We===void 0?void 0:We.border):(!((xe=this.canvasBorder)===null||xe===void 0)&&xe.borderLeft&&(St+=(ve=this.canvasBorder)===null||ve===void 0?void 0:ve.borderLeft),!((he=this.canvasBorder)===null||he===void 0)&&he.borderTop&&(St+=(Se=this.canvasBorder)===null||Se===void 0?void 0:Se.borderTop));var It=this.calcTitlePosition(pe+St,_e+xt,Te,De,ie,de,Q.shift+this.seriesSpacing,qe,rt);ke.style.left="".concat(It.left+Q.labelOffset.x,"px"),ke.style.top="".concat(It.top+Q.labelOffset.y,"px")}},I.prototype.pieSegmentsTotalValue=function(){return this.pieSegments.asArray().reduce(function(Q,Z){return Q+Z.value},0)},I.prototype.pieSegmentsTotalOldValue=function(){var Q=this.pieSegments.asArray().reduce(function(Z,ee){var ie;return Z+((ie=ee.oldValue)!==null&&ie!==void 0?ie:0)},0);return Q>0?Q:1},I.prototype.applySciChartBackground=function(Q){this.domCanvas2D.style.background=Q},I})(C.SciChartSurfaceCore);r.SciChartPieSurface=N;var V=function(U,I,Q,Z,ee,ie){var de=Math.abs(ee-Z)>180?1:0,pe=(Z+ee)/2,_e=Math.cos(w*pe)*ie,Te=Math.sin(w*pe)*ie,De=Math.cos(w*ee)*Q+U+_e,Pe=Math.sin(w*ee)*Q+I+Te,Ee=Math.cos(w*Z)*Q+U+_e,Re=Math.sin(w*Z)*Q+I+Te;return Math.abs(De-Ee)<1e-4&&(Ee+=.001),"M".concat(U+_e," ").concat(I+Te," ").concat(De," ").concat(Pe," A").concat(Q," ").concat(Q," 0 ").concat(de," 0 ").concat(Ee," ").concat(Re,"Z")},W=function(U,I,Q,Z,ee,ie,de){var pe=Math.abs(ie-ee)>180?1:0,_e=(ee+ie)/2,Te=Math.cos(w*_e)*de,De=Math.sin(w*_e)*de,Pe=Math.cos(w*ie)*Q+U+Te,Ee=Math.sin(w*ie)*Q+I+De,Re=Math.cos(w*ee)*Q+U+Te,je=Math.sin(w*ee)*Q+I+De,Ke=Math.cos(w*ie)*Z+U+Te,ot=Math.sin(w*ie)*Z+I+De,We=Math.cos(w*ee)*Z+U+Te,xe=Math.sin(w*ee)*Z+I+De;return"M".concat(Pe," ").concat(Ee," A").concat(Q," ").concat(Q," 0 ").concat(pe," 0 ").concat(Re," ").concat(je," L").concat(We," ").concat(xe," A").concat(Z," ").concat(Z," 0 ").concat(pe," 1 ").concat(Ke," ").concat(ot,"Z")},K=!1,H=function(U,I,Q){var Z=function(ee){if(!Q){U.isSelected=!U.isSelected;return}if(!K){var ie=10,de=U.isSelected,pe=de?U.delta:0,_e=de?-U.delta/ie:U.delta/ie;K=!0,U.isSelected=!U.isSelected,(function Te(De){setTimeout(function(){U.shift=pe+_e*De,De===ie&&(K=!1),++De<=ie&&Te(De)},20)})(1)}};return I.addEventListener("click",Z),{eventListener:Z,eventType:"click",element:I,delete:function(){return I.removeEventListener("click",Z)}}};r.addEventListenerToPieSegment=H})(Tm)),Tm}var Lre;function aU(){if(Lre)return Cm;Lre=1;var r=Cm&&Cm.__extends||(function(){var l=function(u,c){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(d[h]=f[h])},l(u,c)};return function(u,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");l(u,c);function d(){this.constructor=u}u.prototype=c===null?Object.create(c):(d.prototype=c.prototype,new d)}})(),e=Cm&&Cm.__assign||function(){return e=Object.assign||function(l){for(var u,c=1,d=arguments.length;c<d;c++){u=arguments[c];for(var f in u)Object.prototype.hasOwnProperty.call(u,f)&&(l[f]=u[f])}return l},e.apply(this,arguments)};Object.defineProperty(Cm,"__esModule",{value:!0}),Cm.PieLabelProvider=void 0;var i=W1(),n=wp(),t=Il(),o=$w(),a=x8(),s=(function(l){r(u,l);function u(c){var d=this,f,h;return d=l.call(this,e({labelFormat:(f=c==null?void 0:c.labelFormat)!==null&&f!==void 0?f:n.ENumericFormat.Decimal,labelPrecision:(h=c==null?void 0:c.labelPrecision)!==null&&h!==void 0?h:2},c))||this,d.type=i.ELabelProviderType.Pie,d.formatLabelProperty=function(p){return d.applyFormat((0,t.formatNumber)(p,d.numericFormat,d.precision))+(d.parentSurface.valueMode===o.EPieValueMode.Percentage?" %":"")},d}return u.prototype.delete=function(){},u.prototype.getSegmentText=function(c,d){var f=this.parentSurface.valueMode===o.EPieValueMode.Percentage?c.getPercentage(d):c.value;return this.formatLabel(f)},u.prototype.attachedToSurface=function(c){this.parentSurface=c},u.prototype.onBeginAxisDraw=function(){},u.prototype.invalidateParent=function(){this.parentSurface&&this.parentSurface.invalidateElement&&this.parentSurface.invalidateElement()},u})(a.LabelProvider);return Cm.PieLabelProvider=s,Cm}var AI={},vT={},kre;function HSe(){if(kre)return vT;kre=1;var r=vT&&vT.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(vT,"__esModule",{value:!0}),vT.LogarithmicCoordinateCalculator=void 0;var e=oi(),i=Os(),n=r_(),t=(function(o){r(a,o);function a(s,l,u,c,d,f,h,p){p===void 0&&(p=0);var g=this;return i.EXyDirection.XDirection,g=o.call(this,s,l,u,c,p,h)||this,g.logBaseProperty=f,g.nativeCalculator=h?new s.FlippedLogarithmicCoordinateCalculator(g.viewportDimension,g.visibleMin,g.visibleMax,-1,g.offset,g.logBase):new s.LogarithmicCoordinateCalculator(g.viewportDimension,g.visibleMin,g.visibleMax,-1,g.offset,g.logBase),g}return Object.defineProperty(a.prototype,"logBase",{get:function(){return this.logBaseProperty},enumerable:!1,configurable:!0}),a.prototype.translateBy=function(s,l){if(s===0)return l;var u=Math.abs(this.nativeCalculator.GetDataValue(0)),c=Math.abs(this.nativeCalculator.GetDataValue(s)),d=this.webAssemblyContext.NumberUtil,f=l.min<0;f&&(l=new e.NumberRange(Math.abs(l.max),Math.abs(l.min)));var h=d.Log(c,this.logBase)-d.Log(u,this.logBase);this.hasFlippedCoordinates&&(h=-h);var p=d.Log(l.min,this.logBase),g=d.Log(l.max,this.logBase),v=Math.pow(this.logBase,p+h),y=Math.pow(this.logBase,g+h);return f?new e.NumberRange(-y,-v):new e.NumberRange(v,y)},a.prototype.zoomTranslateBy=function(s,l,u){return u.growByLog(new e.NumberRange(s,l),this.logBase)},a})(n.CoordinateCalculatorBase);return vT.LogarithmicCoordinateCalculator=t,vT}var wI={},Ire;function cV(){return Ire||(Ire=1,(function(r){var e=wI&&wI.__extends||(function(){var u=function(c,d){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,h){f.__proto__=h}||function(f,h){for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(f[p]=h[p])},u(c,d)};return function(c,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");u(c,d);function f(){this.constructor=c}c.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}})();Object.defineProperty(r,"__esModule",{value:!0}),r.LogarithmicTickProvider=r.ELogarithmicMajorTickMode=r.ELogarithmicMinorTickMode=void 0;var i=ni(),n=oi(),t=Oh(),o=JH(),a;(function(u){u.Linear="Linear",u.Logarithmic="Logarithmic",u.Auto="Auto"})(a=r.ELogarithmicMinorTickMode||(r.ELogarithmicMinorTickMode={}));var s;(function(u){u.EqualSpacing="EqualSpacing",u.RoundNumbers="RoundNumbers"})(s=r.ELogarithmicMajorTickMode||(r.ELogarithmicMajorTickMode={}));var l=(function(u){e(c,u);function c(d){var f=u.call(this)||this;return f.logarithmicBase=10,f.isHighPrecisionTicks=!0,f.majorTickModeProperty=s.EqualSpacing,f.minorTickModeProperty=a.Linear,f.wasmContext=d,f}return Object.defineProperty(c.prototype,"majorTickMode",{get:function(){return this.majorTickModeProperty},set:function(d){var f;this.majorTickModeProperty=d,!((f=this.parentAxis)===null||f===void 0)&&f.invalidateParentCallback&&this.parentAxis.invalidateParentCallback()},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"minorTickMode",{get:function(){return this.minorTickModeProperty},set:function(d){var f;this.minorTickModeProperty=d,!((f=this.parentAxis)===null||f===void 0)&&f.invalidateParentCallback&&this.parentAxis.invalidateParentCallback()},enumerable:!1,configurable:!0}),c.prototype.getMajorTicks=function(d,f,h){var p=new n.NumberRange(d,f),g=this.parentAxis,v=1;if(g!=null&&g.isNegative&&h.min<0&&(v=-1,h=new n.NumberRange(Math.abs(h.max),Math.abs(h.min))),!this.isParamsValid(h,p))return[];if(this.majorTickMode===s.RoundNumbers)return this.getRoundNumberMajorTicks(d,f,h);var y=[];if(this.logarithmicBase===0)return y;var m=h.min;h.min;var b=h.max,S=this.wasmContext.NumberUtil;!this.isHighPrecisionTicks&&!S.IsPowerOf(m,this.logarithmicBase,this.logarithmicBase)&&(m=S.RoundDownPower(m,this.logarithmicBase,this.logarithmicBase));var _=S.Log(m,this.logarithmicBase);_=S.RoundToDigits(_,10),S.IsDivisibleBy(_,f)||(_=S.RoundUp(_,f));var C=_;m=Math.pow(this.logarithmicBase,C);for(var T=0;m<=b;)S.IsDivisibleBy(C,f)&&y.push(v*m),C=_+ ++T*f,m=Math.pow(this.logarithmicBase,C);return v===-1?y.reverse():y},c.prototype.getRoundNumberMajorTicks=function(d,f,h){var p=[],g=h.min,v=h.min,y=h.max,m=Math.pow(this.logarithmicBase,f),b=this.roundNum(v*(m-1));for(g=this.roundNum(g,b),p.push(g);g<=y;){for(var S=g*(m-1),_=this.roundNum(g*m,S),C=_;_===g;)C=C*m,_=this.roundNum(C,S);g=_,p.push(g)}return p},c.prototype.roundNum=function(d,f){if(d===0)return 0;var h=Math.floor(Math.log10(d));f&&(h=Math.min(h,Math.round(Math.log10(f))));var p=this.wasmContext.NumberUtil.RoundToDigits(d/Math.pow(10,h),1),g=Math.floor(p),v=p-g,y=NaN;return v<.3?y=0:v<.7?y=.5:y=1,(g+y)*Math.pow(10,h)},c.prototype.getMinorTicks=function(d,f,h){var p=this.parentAxis,g=1;p!=null&&p.isNegative&&(g=-1,h=new n.NumberRange(Math.abs(h.max),Math.abs(h.min)));var v=h.min*d,y=h.min*Math.pow(this.logarithmicBase,f*.7),m=(Math.pow(this.logarithmicBase,f)-1)/d,b=this.minorTickMode===a.Logarithmic||this.minorTickMode===a.Auto&&y<v,S=[],_=this.getMajorTicks(d,f,h),C=_.length,T=Math.pow(this.logarithmicBase,f);if(C>0)for(var x=0;x<=C;x++){var A=x<C?_[x]:_[x-1]*T,w=Math.max(A/T,h.min),L=w*d;if(b){var k=this.getMajorTicks(1,f/m,new n.NumberRange(w,A));k.forEach(function(j){return S.push(g*j)})}else for(var D=w+L;D<A&&L>0;)S.push(g*D),D+=L}return S},c.prototype.isParamsValid=function(d,f){return i.Guard.notNull(d,"visibleRange"),i.Guard.notNull(f,"deltaRange"),(0,t.isRealNumber)(d.min)&&(0,t.isRealNumber)(d.max)&&(0,t.isRealNumber)(f.min)&&(0,t.isRealNumber)(f.max)},c})(o.TickProvider);r.LogarithmicTickProvider=l})(wI)),wI}var yT={},Nre;function USe(){if(Nre)return yT;Nre=1;var r=yT&&yT.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(yT,"__esModule",{value:!0}),yT.LogarithmicDeltaCalculator=void 0;var e=ni(),i=oi(),n=eU(),t=(function(o){r(a,o);function a(s){var l=o.call(this)||this;return l.logarithmicBase=10,l.isHighPrecisionTicks=!0,l.webAssemblyContext=s,l}return a.prototype.getDeltaFromRange=function(s,l,u,c){if(e.Guard.argumentIsRealNumber(s,"min"),e.Guard.argumentIsRealNumber(l,"max"),s=Math.abs(s),l=Math.abs(l),s>l){var d=s;s=l,l=d}if(this.isHighPrecisionTicks){var f=this.webAssemblyContext.NiceLogScale.CalculateTickSpacing(s,l,this.logarithmicBase,u,c),h=new i.NumberRange(f.minD,f.maxD);return f.delete(),h}else{var f=this.webAssemblyContext.NiceLogScale.CalculateLowPrecisionTickSpacing(s,l,this.logarithmicBase,u,c),h=new i.NumberRange(f.minD,f.maxD);return f.delete(),h}},a})(n.DeltaCalculator);return yT.LogarithmicDeltaCalculator=t,yT}var Fre;function YN(){return Fre||(Fre=1,(function(r){var e=AI&&AI.__extends||(function(){var p=function(g,v){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,m){y.__proto__=m}||function(y,m){for(var b in m)Object.prototype.hasOwnProperty.call(m,b)&&(y[b]=m[b])},p(g,v)};return function(g,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");p(g,v);function y(){this.constructor=g}g.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}})();Object.defineProperty(r,"__esModule",{value:!0}),r.LogarithmicAxis=r.MIN_LOG_AXIS_VALUE=void 0;var i=hc(),n=QF(),t=oi(),o=gc(),a=Os(),s=HSe(),l=cV(),u=Eg(),c=QH(),d=USe(),f=A8();r.MIN_LOG_AXIS_VALUE=1e-10;var h=(function(p){e(g,p);function g(v,y){var m=this,b,S,_,C,T;return m=p.call(this,v,y)||this,m.type=o.EAxisType.LogarithmicAxis,m.logBaseProperty=10,m.isHighPrecisionTicksProperty=!0,m.tickProvider=new l.LogarithmicTickProvider(v),m.deltaCalculator=new d.LogarithmicDeltaCalculator(v),m.labelProvider=(b=y==null?void 0:y.labelProvider)!==null&&b!==void 0?b:new f.LogarithmicLabelProvider(y),m.logBase=(S=y==null?void 0:y.logBase)!==null&&S!==void 0?S:m.logBaseProperty,m.isNegativeProperty=(_=y==null?void 0:y.isNegative)!==null&&_!==void 0?_:!1,m.visibleRange=t.NumberRange.hydrate(y==null?void 0:y.visibleRange)||m.getDefaultNonZeroRange(),y!=null&&y.visibleRange||(m.hasVisibleRangeSet=!1),m.majorTickMode=(y==null?void 0:y.majorTickMode)||m.majorTickMode,m.minorTickMode=(y==null?void 0:y.minorTickMode)||m.minorTickMode,m.isHighPrecisionTicks=(C=y==null?void 0:y.isHighPrecisionTicks)!==null&&C!==void 0?C:m.isHighPrecisionTicksProperty,y!=null&&y.visibleRangeLimit?m.visibleRangeLimit=(T=t.NumberRange.hydrate(y==null?void 0:y.visibleRangeLimit))!==null&&T!==void 0?T:y.visibleRangeLimit:m.isNegativeProperty?m.visibleRangeLimit=new t.NumberRange(-1/0,-r.MIN_LOG_AXIS_VALUE):m.visibleRangeLimit=new t.NumberRange(r.MIN_LOG_AXIS_VALUE,1/0),m}return Object.defineProperty(g.prototype,"isLinearAxis",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"logBase",{get:function(){return this.logBaseProperty},set:function(v){this.logBaseProperty!==v&&(this.logBaseProperty=v,this.clearCoordCalcCache(),this.updateProviders(),this.notifyPropertyChanged(c.PROPERTY.LOG_BASE))},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"isNegative",{get:function(){return this.isNegativeProperty},set:function(v){this.isNegativeProperty=v,this.isNegativeProperty?this.visibleRangeLimit=new t.NumberRange(-1/0,-1e-10):this.visibleRangeLimit=new t.NumberRange(1e-10,1/0),this.notifyPropertyChanged(c.PROPERTY.IS_NEGATIVE)},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"isHighPrecisionTicks",{get:function(){return this.isHighPrecisionTicksProperty},set:function(v){this.isHighPrecisionTicksProperty=v,this.updateProviders(),this.notifyPropertyChanged(c.PROPERTY.HIGH_PRECISION_TICKS)},enumerable:!1,configurable:!0}),g.prototype.getDefaultNonZeroRange=function(){var v=this.isNegativeProperty?-1:1;return new t.NumberRange(v*Math.pow(this.logBase,-1),v*Math.pow(this.logBase,2))},g.prototype.hasValidVisibleRange=function(){return p.prototype.hasValidVisibleRange.call(this)&&this.visibleRange.min*this.visibleRange.max>0},Object.defineProperty(g.prototype,"tickProvider",{get:function(){return this.tickProviderProperty},set:function(v){this.tickProviderProperty=v,this.updateProviders(),this.notifyPropertyChanged(c.PROPERTY.TICK_PROVIDER)},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"deltaCalculator",{get:function(){return this.deltaCalculatorProperty},set:function(v){this.deltaCalculatorProperty=v,this.updateProviders(),this.notifyPropertyChanged(c.PROPERTY.DELTA_CALCULATOR)},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"labelProvider",{get:function(){return this.labelProviderProperty},set:function(v){this.labelProviderProperty=v,this.updateProviders(),this.notifyPropertyChanged(c.PROPERTY.LABEL_PROVIDER)},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"majorTickMode",{get:function(){return this.logTickProvider.majorTickMode},set:function(v){this.logTickProvider.majorTickMode=v},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"minorTickMode",{get:function(){return this.logTickProvider.minorTickMode},set:function(v){this.logTickProvider.minorTickMode=v},enumerable:!1,configurable:!0}),g.prototype.getWindowedYRange=function(v){var y=this,m;return this.parentSurface&&this.getVisibleRenderableSeriesByYAxis().forEach(function(b){var S=b.xAxisId,_=v!=null&&v.containsKey(S)?v.item(S):y.getXVisibleRange(S),C=y.getIsXCategoryAxis(S);if(_){var T=b.getYRange(_,C);T&&(m=m?m.union(T):T)}}),m!=null&&m.isZero()&&(m=this.coerceZeroVisibleRange(m)),this.growBy&&m&&(m=m.growByLog(this.growBy,this.logBase)),this.visibleRangeLimit&&m&&(m=m.clip(this.visibleRangeLimit)),m},g.prototype.animateVisibleRange=function(v,y,m,b){var S=this,_;if(m===void 0&&(m=i.easing.outCubic),b===void 0&&(b=function(){}),y<=0){this.visibleRange=v||this.visibleRange,b();return}return(_=this.visibleRangeAnimationToken)===null||_===void 0||_.cancel(),this.visibleRangeAnimationToken=n.NumberRangeAnimator.animate(this.visibleRange,v,y,function(C){S.visibleRange=C},b,m,!0),this.parentSurface.addAnimation(this.visibleRangeAnimationToken),this.visibleRangeAnimationToken},g.prototype.scale=function(v,y,m){var b=v.max/v.min,S,_,C=this.flippedCoordinates?!m:m,T=this.flippedCoordinates?-y:y;if(C){S=v.min;var x=T>0?Math.pow(b,1-T):Math.pow(b,1+Math.abs(T));_=x*S}else{_=v.max;var x=(T>0,Math.pow(b,1+T));S=_/x}this.visibleRange=new t.NumberRange(S,_)},g.prototype.toJSON=function(){var v=p.prototype.toJSON.call(this),y={logBase:this.logBase,isNegative:this.isNegative,majorTickMode:this.majorTickMode,minorTickMode:this.minorTickMode,isHighPrecisionTicks:this.isHighPrecisionTicks};return Object.assign(v.options,y),v},g.prototype.getCurrentCoordinateCalculatorInternal=function(){var v=this.visibleRange.min,y=this.visibleRange.max,m=this.axisLength,b=this.isXAxis?a.EXyDirection.XDirection:a.EXyDirection.YDirection;return new s.LogarithmicCoordinateCalculator(this.webAssemblyContext2D,m,v,y,b,this.logBase,this.isXAxis!==this.flippedCoordinates,this.offset)},g.prototype.getMaxXRange=function(){var v=this.getXDataRange();if(v)return this.growBy&&v&&(v=v.growByLog(this.growBy,this.logBase)),this.visibleRangeLimit&&v&&(v=v.clip(this.visibleRangeLimit)),v},Object.defineProperty(g.prototype,"logTickProvider",{get:function(){return this.tickProvider},enumerable:!1,configurable:!0}),g.prototype.updateProviders=function(){var v=this.tickProvider;v&&(v.logarithmicBase=this.logBase,v.isHighPrecisionTicks=this.isHighPrecisionTicks);var y=this.deltaCalculator;y&&(y.logarithmicBase=this.logBase,y.isHighPrecisionTicks=this.isHighPrecisionTicks);var m=this.labelProvider;m&&(m.logarithmicBase=this.logBase)},g})(u.AxisBase2D);r.LogarithmicAxis=h})(AI)),AI}var mT={},bT={},jre;function N8(){if(jre)return bT;jre=1;var r=bT&&bT.__extends||(function(){var n=function(t,o){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(a[l]=s[l])},n(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");n(t,o);function a(){this.constructor=t}t.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}})();Object.defineProperty(bT,"__esModule",{value:!0}),bT.PolarTickCoordinatesProvider=void 0;var e=S8(),i=(function(n){r(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.getTickCoordinates=function(o,a){if(o===void 0)return{majorTickCoords:void 0,minorTickCoords:void 0,majorTickOverrides:void 0,minorTickOverRides:void 0};var s=this.parentAxis.getCurrentCoordinateCalculator(),l=o.map(function(c){return s.getCoordinate(c)}),u=a.map(function(c){return s.getCoordinate(c)});return{majorTickCoords:l,minorTickCoords:u,majorTickOverrides:o,minorTickOverRides:a}},t})(e.TickCoordinatesProvider);return bT.PolarTickCoordinatesProvider=i,bT}var Em={},ST={},OI={},Bre;function zSe(){if(Bre)return OI;Bre=1,Object.defineProperty(OI,"__esModule",{value:!0}),OI.polarChartHelper=void 0;function r(i,n,t,o){var a=n?t+o:t;return n?i?{direction:1,tickRotation:o,startAngle:a}:{direction:-1,tickRotation:o,startAngle:a}:i?{direction:-1,tickRotation:0,startAngle:a}:{direction:1,tickRotation:0,startAngle:a}}function e(i,n,t,o){var a=!n&&i||n&&!i,s=n?t+o:t,l=n?o:0;return{isAntiClockWise:a,labelRotation:l,startAngle:s}}return OI.polarChartHelper={calcTickDirection:r,calcLabelPosition:e},OI}var Vre;function WSe(){if(Vre)return ST;Vre=1;var r=ST&&ST.__extends||(function(){var p=function(g,v){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,m){y.__proto__=m}||function(y,m){for(var b in m)Object.prototype.hasOwnProperty.call(m,b)&&(y[b]=m[b])},p(g,v)};return function(g,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");p(g,v);function y(){this.constructor=g}g.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}})();Object.defineProperty(ST,"__esModule",{value:!0}),ST.PolarAxisRenderer=void 0;var e=vn(),i=Du(),n=Lf(),t=mi(),o=Ul(),a=H1(),s=Xi(),l=zSe(),u=ln(),c=Hi(),d=C8(),f=kM(),h=(function(p){r(g,p);function g(){return p!==null&&p.apply(this,arguments)||this}return g.prototype.layout=function(v){this.outerRadius=v.width},g.prototype.measure=function(v,y,m,b,S,_,C){var T=this.parentAxis,x=this.measureTextCanvas.getContext("2d");this.desiredTicksSize=C?b:0,_&&T.isAngular&&(T.isInnerAxis?(this.desiredHeight=0,this.desiredWidth=0):T.polarLabelMode===f.EPolarLabelMode.Parallel?(this.desiredHeight=S.getMaxLabelHeightForHorizontalAxis(m,x,y)+this.desiredTicksSize,this.desiredWidth=this.desiredHeight):T.polarLabelMode===f.EPolarLabelMode.Perpendicular?(this.desiredHeight=S.getMaxLabelWidthForVerticalAxis(m,x,y)+this.desiredTicksSize,this.desiredWidth=this.desiredHeight):(this.desiredHeight=S.getMaxLabelHeightForHorizontalAxis(m,x,y)+this.desiredTicksSize,this.desiredWidth=S.getMaxLabelWidthForVerticalAxis(m,x,y)+this.desiredTicksSize))},g.prototype.drawLabels=function(v,y,m,b,S,_,C,T,x,A){u.DebugForDpi&&console.log("AxisRenderer.drawLabels. fontSize: ".concat(C.fontSize));var w=this;w.viewRect;var L=w.textureManager;v.getNativeContext();var k,D=C.padding;C.alignment;var j=C.multilineAlignment,N=this.parentAxis,V=N.parentSurface.seriesViewRect;v.resetAndClip(V);var W=[],K=(0,t.parseColorToUIntArgb)(C.color),H=A.useNativeText?v.getFont(C,!0):null,U=A.useNativeText?(0,s.getTextBounds)(this.webAssemblyContext):null;if(!H&&(k=L.getTextureContext(V.width,V.height),N.polarLabelMode!==f.EPolarLabelMode.Horizontal))throw new Error("Original text drawing only supports EPolarLabelMode.Horizontal.  To use rotated labels, set useNativeText: true");S=S.map(function(vt){return vt-_});var I=(0,i.convertMultiLineAlignment)(j,this.webAssemblyContext),Q=A.lineSpacing,Z=this.calculateLineHightForNativeFont(H,U),ee=new this.webAssemblyContext.TSRVector2;if(N.isAngular){var ie=(C.padding.left+C.padding.right)/2,de=[],pe=[];if(!A.useCache&&A.useNativeText)for(var _e=0,Te=b;_e<Te.length;_e++){var De=Te[_e];H.CalculateStringBounds(De??"",U,Q),de.push(U.m_fHeight),pe.push(U.m_fWidth)}else if(A.useNativeText){var Pe=(C.padding.top+C.padding.bottom)/2;de=b.map(function(vt){return A.getLabelHeight(k,vt,C)-2*Pe}),pe=b.map(function(vt){return A.getLabelWidth(k,vt,C)-2*ie})}else de=b.map(function(vt){return A.getLabelHeight(k,vt,C)}),pe=b.map(function(vt){return A.getLabelWidth(k,vt,C)});for(var Ee=m?this.outerRadius*Math.min(N.otherAxis.lengthScale,1)-this.desiredTicksSize:this.outerRadius*Math.min(N.otherAxis.lengthScale,1)+this.desiredTicksSize,Re=N.getTransform(),je=10,Ke=N.totalAngle<2*Math.PI?S.length:S.length-1,ot=0;ot<Ke;ot++){var We=S[ot],xe=b[ot],ve=de[ot],he=pe[ot],Se=Ee;if(N.polarLabelMode===f.EPolarLabelMode.Parallel){var be=m?-C.padding.top:C.padding.bottom;Se=Ee+(m?-1:1)*.5*ve+be}else if(N.polarLabelMode===f.EPolarLabelMode.Perpendicular){var ke=Math.cos(We+N.startAngle)<0?m?0:1:m?-1:0;Se=Ee+ke*he+(m?-1:1)*ie}else N.polarLabelMode===f.EPolarLabelMode.Horizontal&&A.useNativeText&&(Se=Ee+(m?-C.padding.top:C.padding.bottom));Re.TransformPoint(Se,We,ee),We+=N.startAngle;var qe=ee.x,rt=ee.y,St=0,xt=0;if(N.polarLabelMode===f.EPolarLabelMode.Horizontal){m&&(We=We+Math.PI);var It=Math.round(We*180/Math.PI),Zt=Math.abs(It)%90<je||Math.abs(It)%90>90-je,ct=((It+je)/90%4+4)%4;Zt?ct<1?rt-=ve/2:ct<2?(qe-=he/2,rt-=ve):ct<3?(qe-=he,rt-=ve/2):qe-=he/2:(Math.cos(We)<0&&(qe-=he),Math.sin(We)>0&&(rt-=ve))}else N.polarLabelMode===f.EPolarLabelMode.Parallel?(St=qe+V.left,xt=rt+V.top,qe-=he/2,Math.sin(We)>=0?rt-=ve/2:rt+=ve/2-Z):N.polarLabelMode===f.EPolarLabelMode.Perpendicular&&(St=qe+V.left,xt=rt+V.top,rt-=ve/2);var Qe=a.labelHelper.getPolarLabelRotation(N.polarLabelMode,We);try{if(H){var Et=qe+V.left,Gt=rt+V.top+Z,Xe=A.adjustLabel(ot,xe,he,ve,Et,Gt,St,xt,Qe),Vt=Xe.text,lr=Xe.x,Jt=Xe.y,kr=Xe.rx,qt=Xe.ry,zt=Xe.rotationRadians,jr=Xe.color;this.drawDebug&&W.push(e.Rect.create(lr,Jt,he,ve)),H.DrawStringAdvanced(Vt??"",jr??K,Math.round(lr),Math.round(Jt),(0,s.getVector4)(this.webAssemblyContext,kr,qt,zt,0),I,Q)}else{var Be=A.getCachedLabelTexture(xe,L,C),Ge=Be.bitmapTexture,ut=Be.textureHeight,Pt=Be.textureWidth,Qt=A.adjustLabel(ot,xe,he,ve,qe+V.left,rt+V.top,0,0,0),lr=Qt.x,Jt=Qt.y;Ge&&(v.drawTexture(Ge,Math.round(lr),Math.round(Jt),Pt,ut),A.useCache||Ge.delete())}}catch(vt){n.Logger.debug(vt),A.delete()}}}else{var wr=l.polarChartHelper.calcLabelPosition(m,N.otherAxis.flippedCoordinates,N.startAngle,N.otherAxis.totalAngle),Xr=wr.isAntiClockWise,pi=wr.labelRotation,Qr=wr.startAngle,We=Qr,Re=N.getTransform(),de=[],pe=[];if(!A.useCache&&A.useNativeText)for(var Ur=0,ci=b;Ur<ci.length;Ur++){var De=ci[Ur];H.CalculateStringBounds(De??"",U,Q),de.push(U.m_fHeight+C.padding.top+C.padding.bottom),pe.push(U.m_fWidth+C.padding.left+C.padding.right)}else de=b.map(function(Bt){return A.getLabelHeight(k,Bt,C)}),pe=b.map(function(Bt){return A.getLabelWidth(k,Bt,C)});for(var Xt=this.desiredTicksSize,ot=0;ot<S.length;ot++){var Ee=S[ot]+_,xe=b[ot],he=pe[ot],ve=de[ot];Re.TransformPoint(Ee,pi,ee);var qe=ee.x,rt=ee.y;Xr&&(We=Qr+Math.PI),qe+=(Math.sin(We)/2-.5)*he,qe+=Math.sin(We)*Xt;var Ui=(We<0?2*Math.PI-We:We)%(2*Math.PI),Dn=Ui<Math.PI?Ui/Math.PI:2-Ui/Math.PI;rt-=Dn*ve,rt+=Math.cos(We)*Xt,this.drawDebug&&W.push(e.Rect.create(qe,rt,he,ve));try{if(H){var Et=qe+V.left+D.left,Gt=rt+V.top+Z+D.top,Kr=A.adjustLabel(ot,xe,he,ve,Et,Gt,Et,Gt,0),Vt=Kr.text,lr=Kr.x,Jt=Kr.y,kr=Kr.rx,qt=Kr.ry,zt=Kr.rotationRadians,jr=Kr.color;H.DrawStringAdvanced(Vt??"",jr??K,Math.round(lr),Math.round(Jt),(0,s.getVector4)(this.webAssemblyContext,kr,qt,zt,0),I,Q)}else{var In=A.getCachedLabelTexture(xe,L,C),Ge=In.bitmapTexture,ut=In.textureHeight,Pt=In.textureWidth;if(Ge){var fn=A.adjustLabel(ot,xe,he,ve,qe+V.left,rt+V.top,0,0,0),lr=fn.x,Jt=fn.y;v.drawTexture(Ge,Math.round(lr),Math.round(Jt),Pt,ut),A.useCache||Ge.delete()}}}catch(_o){n.Logger.debug(_o),A.delete()}}}ee.delete(),this.drawDebug&&this.drawLabelViewRects(v,new e.Rect(0,0,0,0),W),H&&H.End()},g.prototype.drawTicks=function(v,y,m,b,S,_,C){var T,x,A,w;if(!(!b||b.length===0)){var L=c.DpiHelper.PIXEL_RATIO*((x=(T=this.parentAxis.parentSurface.padding)===null||T===void 0?void 0:T.left)!==null&&x!==void 0?x:0),k=c.DpiHelper.PIXEL_RATIO*((w=(A=this.parentAxis.parentSurface.padding)===null||A===void 0?void 0:A.top)!==null&&w!==void 0?w:0),D=this.parentAxis,j=C.tickSize,N=D.getTransform(),V=e.Rect.intersect(this.parentAxis.parentSurface.viewRect,this.parentAxis.parentSurface.seriesViewRect);if(D.isAngular){var W=D.otherAxis.offset,K=D.otherAxis.axisLength+W,H=m?K-j*c.DpiHelper.PIXEL_RATIO:K+j*c.DpiHelper.PIXEL_RATIO,U=(0,s.getVectorColorVertex)(this.webAssemblyContext),I=(0,s.getVertex)(this.webAssemblyContext,0,0),Q=(0,s.getVector2)(this.webAssemblyContext);b.forEach(function(Ee){N.TransformPoint(K,Ee,Q),I.SetPosition(Q.x,Q.y),U.push_back(I),N.TransformPoint(H,Ee,Q),I.SetPosition(Q.x,Q.y),U.push_back(I)}),v.drawLinesNative(U,_,o.ELineDrawMode.DiscontinuousLine,V,L,k)}else{var Z=(0,s.getVectorColorVertex)(this.webAssemblyContext),ee=(0,s.getVertex)(this.webAssemblyContext,0,0),ie=(0,s.getVector2)(this.webAssemblyContext),de=l.polarChartHelper.calcTickDirection(m,D.otherAxis.flippedCoordinates,D.startAngle,D.otherAxis.totalAngle),pe=de.direction,_e=de.tickRotation,Te=de.startAngle,De=pe*Math.sin(Te)*j,Pe=pe*Math.cos(Te)*j;b.forEach(function(Ee){N.TransformPoint(Ee,_e,ie),ee.SetPosition(ie.x,ie.y),Z.push_back(ee),ee.SetPosition(ie.x+De,ie.y+Pe),Z.push_back(ee)}),v.drawLinesNative(Z,_,o.ELineDrawMode.DiscontinuousLine,V,L,k)}}},g})(d.AxisRenderer);return ST.PolarAxisRenderer=h,ST}var z5={},Hre;function F8(){return Hre||(Hre=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EPolarAxisMode=void 0,(function(e){e.Angular="Angular",e.Radial="Radial"})(r.EPolarAxisMode||(r.EPolarAxisMode={}))})(z5)),z5}var W5={},Ure;function GSe(){return Ure||(Ure=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EPolarGridlineMode=void 0,(function(e){e.Circles="Circles",e.Polygons="Polygons"})(r.EPolarGridlineMode||(r.EPolarGridlineMode={}))})(W5)),W5}var zre;function j8(){if(zre)return Em;zre=1;var r=Em&&Em.__extends||(function(){var m=function(b,S){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,C){_.__proto__=C}||function(_,C){for(var T in C)Object.prototype.hasOwnProperty.call(C,T)&&(_[T]=C[T])},m(b,S)};return function(b,S){if(typeof S!="function"&&S!==null)throw new TypeError("Class extends value "+String(S)+" is not a constructor or null");m(b,S);function _(){this.constructor=b}b.prototype=S===null?Object.create(S):(_.prototype=S.prototype,new _)}})(),e=Em&&Em.__assign||function(){return e=Object.assign||function(m){for(var b,S=1,_=arguments.length;S<_;S++){b=arguments[S];for(var C in b)Object.prototype.hasOwnProperty.call(b,C)&&(m[C]=b[C])}return m},e.apply(this,arguments)};Object.defineProperty(Em,"__esModule",{value:!0}),Em.PolarAxisBase=void 0;var i=Mr(),n=Ii(),t=vn(),o=ts(),a=Ul(),s=Xi(),l=ln(),u=Hi(),c=Eg(),d=QV(),f=QH(),h=WSe(),p=F8(),g=GSe(),v=kM(),y=(function(m){r(b,m);function b(S,_){var C=this,T,x,A,w,L,k,D,j,N,V;return Object.assign(_??{},{majorGridLineStyle:e({strokeThickness:1,color:(T=l.SciChartSurfaceBase.DEFAULT_THEME.polarMajorGridLineBrush)!==null&&T!==void 0?T:l.SciChartSurfaceBase.DEFAULT_THEME.majorGridLineBrush},_==null?void 0:_.majorGridLineStyle),minorGridLineStyle:e({strokeThickness:1,color:(x=l.SciChartSurfaceBase.DEFAULT_THEME.polarMinorGridLineBrush)!==null&&x!==void 0?x:l.SciChartSurfaceBase.DEFAULT_THEME.minorGridLineBrush},_==null?void 0:_.minorGridLineStyle)}),C=m.call(this,S,_)||this,C.isPolarAxis=!0,C.axisLayoutState=new d.PolarAxisLayoutState,C.startAngleProperty=0,C.totalAngleProperty=2*Math.PI,C.xCenterOffsetProperty=0,C.yCenterOffsetProperty=0,C.lengthScaleProperty=1,C.gridlineModeProperty=g.EPolarGridlineMode.Circles,C.polarLabelModeProperty=v.EPolarLabelMode.Horizontal,C.innerRadiusProperty=0,C.polarAxisModeProperty=_==null?void 0:_.polarAxisMode,C.gridlineMode=(A=_==null?void 0:_.gridlineMode)!==null&&A!==void 0?A:C.gridlineModeProperty,C.coordTransform=new S.SCRTPolarCoordinateTransform(0,0,0),C.drawMajorBandsProperty=!1,C.innerRadius=(w=_==null?void 0:_.innerRadius)!==null&&w!==void 0?w:C.innerRadiusProperty,C.xCenterOffset=(L=_==null?void 0:_.xCenterOffset)!==null&&L!==void 0?L:C.xCenterOffsetProperty,C.yCenterOffset=(k=_==null?void 0:_.yCenterOffset)!==null&&k!==void 0?k:C.yCenterOffsetProperty,C.lengthScaleProperty=(D=_==null?void 0:_.lengthScale)!==null&&D!==void 0?D:C.lengthScaleProperty,C.polarLabelMode=(j=_==null?void 0:_.polarLabelMode)!==null&&j!==void 0?j:C.polarLabelModeProperty,C.startAngleProperty=(N=_==null?void 0:_.startAngle)!==null&&N!==void 0?N:(_==null?void 0:_.startAngleDegrees)!==void 0?C.toRadians(_.startAngleDegrees):C.startAngleProperty,C.totalAngleProperty=(V=_==null?void 0:_.totalAngle)!==null&&V!==void 0?V:(_==null?void 0:_.totalAngleDegrees)!==void 0?C.toRadians(_.totalAngleDegrees):C.totalAngleProperty,C}return b.prototype.onAttach=function(S,_,C){m.prototype.onAttach.call(this,S,_,C),this.polarAxisMode===void 0&&(this.polarAxisModeProperty=_?p.EPolarAxisMode.Angular:p.EPolarAxisMode.Radial)},Object.defineProperty(b.prototype,"isAngular",{get:function(){return this.polarAxisModeProperty===p.EPolarAxisMode.Angular},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"polarAxisMode",{get:function(){return this.polarAxisModeProperty},set:function(S){this.polarAxisMode!==S&&(this.polarAxisModeProperty=S,this.notifyPropertyChanged("polarAxisMode"))},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"gridlineMode",{get:function(){return this.gridlineModeProperty},set:function(S){if(this.gridlineMode!==S){if(this.isAngular){console.warn("PolarAxisBase.gridlineMode property is ignored for the angular axis");return}this.gridlineModeProperty=S,this.notifyPropertyChanged("gridlineMode")}},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"startAngle",{get:function(){return this.startAngleProperty},set:function(S){this.startAngleProperty!==S&&(this.startAngleProperty=S,this.notifyPropertyChanged("startAngle"))},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"totalAngle",{get:function(){return this.totalAngleProperty},set:function(S){if(this.totalAngleProperty!==S){if(!this.isAngular){console.warn("PolarAxisBase.totalAngle property is ignored for the radial axis");return}S===0&&console.warn("PolarAxisBase.totalAngle can not be zero"),this.totalAngleProperty=S,this.notifyPropertyChanged("totalAngle")}},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"startAngleDegrees",{get:function(){return Math.round(this.startAngleProperty*180/Math.PI*10)/10},set:function(S){S!==void 0&&(this.startAngleProperty=this.toRadians(S),this.notifyPropertyChanged("startAngle"))},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"totalAngleDegrees",{get:function(){return Math.round(this.totalAngleProperty*180/Math.PI*10)/10},set:function(S){if(S!==void 0){if(!this.isAngular){console.warn("PolarAxisBase.totalAngleDegrees property is ignored for the radial axis");return}S===0&&console.warn("PolarAxisBase.totalAngleDegrees can not be zero"),this.totalAngleProperty=this.toRadians(S),this.notifyPropertyChanged("totalAngle")}},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"xCenterOffset",{get:function(){return this.xCenterOffsetProperty},set:function(S){if(this.xCenterOffsetProperty!==S){if(!this.isAngular){console.warn("PolarAxisBase.xCenterOffset property is ignored for the radial axis");return}this.xCenterOffsetProperty=S,this.notifyPropertyChanged("xCenterOffset")}},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"yCenterOffset",{get:function(){return this.yCenterOffsetProperty},set:function(S){if(this.yCenterOffsetProperty!==S){if(!this.isAngular){console.warn("PolarAxisBase.yCenterOffset property is ignored for the radial axis");return}this.yCenterOffsetProperty=S,this.notifyPropertyChanged("yCenterOffset")}},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"lengthScale",{get:function(){return this.lengthScaleProperty},set:function(S){this.lengthScaleProperty!==S&&(this.lengthScaleProperty=S,this.notifyPropertyChanged("lengthScale"))},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"axisLength",{get:function(){var S;return((S=this.axisLengthProperty)!==null&&S!==void 0?S:1)*this.lengthScale-this.offset},set:function(S){this.axisLengthProperty!==S&&(this.axisLengthProperty=S,this.notifyPropertyChanged(f.PROPERTY.AXIS_LENGTH))},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"maxRadius",{get:function(){var S;return(S=this.axisLengthProperty)!==null&&S!==void 0?S:1},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"polarLabelMode",{get:function(){return this.polarLabelModeProperty},set:function(S){if(this.polarLabelMode!==S){if(!this.isAngular){console.warn("PolarAxisBase.polarLabelMode property is ignored for the radial axis");return}this.polarLabelModeProperty=S,this.notifyPropertyChanged("polarLabelMode")}},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"offset",{get:function(){var S,_=this.offsetProperty;return this.offsetOverrideProperty?_=this.offsetOverrideProperty:this.innerRadius!==void 0&&(_=this.innerRadius*((S=this.axisLengthProperty)!==null&&S!==void 0?S:1)),_*this.lengthScale},set:function(S){this.offsetProperty!==S&&(this.offsetProperty=S,this.innerRadius===void 0&&(this.clearCoordCalcCache(),this.notifyPropertyChanged(f.PROPERTY.OFFSET)))},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"innerRadius",{get:function(){return this.innerRadiusProperty},set:function(S){if(this.innerRadius!==S){if(this.isAngular){console.warn("PolarAxisBase.innerRadius property is ignored for the angular axis");return}if(S<0||S>1)throw Error("innerRadius must be between 0 and 1");this.innerRadiusProperty=S,this.clearCoordCalcCache(),this.notifyPropertyChanged("innerRadius")}},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"otherAxis",{get:function(){return this.otherAxisProperty},enumerable:!1,configurable:!0}),b.prototype.measure=function(){var S=this;if(this.isXAxis){var _=this.parentSurface.yAxes.asArray().find(function(T){return T.isPolarAxis&&T.isAngular!==S.isAngular});if(!_)throw new Error("Could not find a polar y axis with isAngluar: ".concat(!this.isAngular));this.otherAxisProperty=_,this.isAngular||(this.xCenterOffsetProperty=_.xCenterOffset,this.yCenterOffsetProperty=_.yCenterOffset)}else{var C=this.parentSurface.xAxes.asArray().find(function(T){return T.isPolarAxis&&T.isAngular!==S.isAngular});if(!C)throw new Error("Could not find a polar x axis with isAngluar: ".concat(!this.isAngular));this.otherAxisProperty=C,this.isAngular||(this.xCenterOffsetProperty=C.xCenterOffset,this.yCenterOffsetProperty=C.yCenterOffset)}m.prototype.measure.call(this)},b.prototype.zoomBy=function(S,_){return this.isAngular?m.prototype.zoomBy.call(this,S,_):m.prototype.zoomBy.call(this,0,_/10)},b.prototype.scroll=function(S,_){return this.isAngular?m.prototype.scroll.call(this,S/this.otherAxis.axisLength*this.axisLength,_):m.prototype.scroll.call(this,S,c.EClipMode.ClipAtMin)},b.prototype.getTransform=function(S){S===void 0&&(S=!1);var _=this.viewRect,C=_.x,T=_.y;this.coordTransform.yIsPolar=this.isAngular&&!this.isXAxisProperty;var x=S?u.DpiHelper.PIXEL_RATIO:1;return this.coordTransform.XCenter=(C-this.parentSurface.seriesViewRect.left)/x,this.coordTransform.YCenter=(T-this.parentSurface.seriesViewRect.top)/x,this.coordTransform.StartAngle=this.startAngle,this.coordTransform},Object.defineProperty(b.prototype,"isHorizontalAxis",{get:function(){return this.isAngular},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"isVerticalChart",{get:function(){return this.isXAxis&&!this.isAngular},enumerable:!1,configurable:!0}),b.prototype.applyTheme=function(S){var _,C,T,x,A=this.parentSurface.previousThemeProvider;this.axisBandsFill===A.axisBandsFill&&(this.axisBandsFill=S.axisBandsFill),this.labelStyle.color===A.tickTextBrush&&(this.labelStyle={color:S.tickTextBrush});var w=(_=A.polarMinorGridLineBrush)!==null&&_!==void 0?_:A.minorGridLineBrush,L=(C=S.polarMinorGridLineBrush)!==null&&C!==void 0?C:S.minorGridLineBrush;this.minorGridLineStyle.color===w&&(this.minorGridLineStyle={color:L});var k=(T=A.polarMajorGridLineBrush)!==null&&T!==void 0?T:A.majorGridLineBrush,D=(x=S.polarMajorGridLineBrush)!==null&&x!==void 0?x:S.majorGridLineBrush;this.majorGridLineStyle.color===k&&(this.majorGridLineStyle={color:D}),this.minorTickLineStyle.color===A.minorGridLineBrush&&(this.minorTickLineStyle={color:S.minorGridLineBrush}),this.majorTickLineStyle.color===A.majorGridLineBrush&&(this.majorTickLineStyle={color:S.majorGridLineBrush}),this.axisTitleStyle.color===A.axisTitleColor&&(this.axisTitleStyle={color:S.axisTitleColor})},b.prototype.toJSON=function(){var S=m.prototype.toJSON.call(this),_={gridlineMode:this.gridlineMode,innerRadius:this.innerRadius,lengthScale:this.lengthScale,polarAxisMode:this.polarAxisMode,polarLabelMode:this.polarLabelMode,startAngle:this.startAngle,totalAngle:this.totalAngle,xCenterOffset:this.xCenterOffset,yCenterOffset:this.yCenterOffset},C=e(e({},S),{options:e(e({},S.options),_)});return C},b.prototype.delete=function(){this.coordTransform=(0,i.deleteSafe)(this.coordTransform),m.prototype.delete.call(this)},b.prototype.drawAxisBands=function(S,_,C,T){},b.prototype.getPenForLines=function(S,_,C,T){if((S===this.penCacheForMajorGridLines||S===this.penCacheForMinorGridLines)&&!this.isAngular&&this.gridlineMode===g.EPolarGridlineMode.Circles){var x=C>0?C+1:0;return(0,o.createPenInCache)(S,_,x,1,T,!1)}var A=C>0?C+1:0;return(0,o.createPenInCache)(S,_,A,1,T,!0)},b.prototype.drawGridLines=function(S,_,C,T){var x=this,A,w,L,k;if(!(!_||_.length===0)){var D=((w=(A=this.parentSurface.padding)===null||A===void 0?void 0:A.left)!==null&&w!==void 0?w:0)*u.DpiHelper.PIXEL_RATIO,j=((k=(L=this.parentSurface.padding)===null||L===void 0?void 0:L.top)!==null&&k!==void 0?k:0)*u.DpiHelper.PIXEL_RATIO,N=this.viewRect;N.x,N.y;var V=N.width,W=this.getTransform();V=V*this.otherAxis.lengthScale;var K=t.Rect.intersect(this.parentSurface.clipRect,this.parentSurface.seriesViewRect);if(this.isAngular){var H=(0,s.getVectorColorVertex)(this.webAssemblyContext2D),U=(0,s.getVector2)(this.webAssemblyContext2D),I=(0,s.getVertex)(this.webAssemblyContext2D,0,0),Q=15;_.forEach(function(Ee,Re){W.TransformPoint(V,Ee,U),I.SetPosition(U.x,U.y),H.push_back(I),x.otherAxis.offset>0?(W.TransformPoint(x.otherAxis.offset,Ee,U),I.SetPosition(U.x,U.y),H.push_back(I)):T?(I.SetPosition(W.XCenter,W.YCenter),H.push_back(I)):(W.TransformPoint(Q,Ee,U),I.SetPosition(U.x,U.y),H.push_back(I))}),S.drawLinesNative(H,C,a.ELineDrawMode.DiscontinuousLine,K,D,j)}else if(this.gridlineMode===g.EPolarGridlineMode.Polygons){var Z=this.otherAxis.getTicksWithCoords().majorTickCoords,ee=(0,s.getVectorColorVertex)(this.webAssemblyContext2D),ie=(0,s.getVector2)(this.webAssemblyContext2D),de=(0,s.getVertex)(this.webAssemblyContext2D,0,0);_.forEach(function(Ee){Z.forEach(function(Re,je){W.TransformPoint(Ee,Re,ie),de.SetPosition(ie.x,ie.y),ee.push_back(de),je>0&&je<Z.length-1&&ee.push_back(de)})}),S.drawLinesNative(ee,C,a.ELineDrawMode.DiscontinuousLine,K,D,j)}else{var pe=(0,s.getVectorArcVertex)(this.webAssemblyContext2D),_e=(0,s.getArcVertex)(this.webAssemblyContext2D),Te=0;this.parentSurface.isCopyCanvasSurface?Te=l.SciChartSurfaceBase.domMasterCanvas.height:Te=this.parentSurface.renderSurface.viewportSize.height;var De=this.otherAxis.startAngle,Pe=this.otherAxis.axisLength;_.forEach(function(Ee){var Re=(0,s.getArcParams)(x.webAssemblyContext2D,W.XCenter,Te-W.YCenter,0,Pe,Ee,0,1,1,C.m_fThickness);_e.MakeCircularArc(Re),pe.push_back(_e)}),S.drawArcs(pe,W.XCenter,Te-W.YCenter,De,K,C,void 0,D,j)}}},b.prototype.toRadians=function(S){return S*Math.PI/180},b.prototype.reverseTransform=function(S,_,C){C===void 0&&(C=!0);var T=this.getTransform(),x=new this.webAssemblyContext2D.TSRVector2;T.ReverseTransformPoint(S,_,x);var A;return C?this.isXAxis&&this.isAngular?A=new n.Point(-x.y,x.x):A=new n.Point(x.x,-x.y):this.isXAxis?A=new n.Point(-x.y,x.x):A=new n.Point(x.x,-x.y),x.delete(),A},b.prototype.createAxisRender=function(){return new h.PolarAxisRenderer(this.webAssemblyContext2D)},b})(c.AxisBase2D);return Em.PolarAxisBase=y,Em}var Wre;function YSe(){if(Wre)return mT;Wre=1;var r=mT&&mT.__extends||(function(){var d=function(f,h){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,g){p.__proto__=g}||function(p,g){for(var v in g)Object.prototype.hasOwnProperty.call(g,v)&&(p[v]=g[v])},d(f,h)};return function(f,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");d(f,h);function p(){this.constructor=f}f.prototype=h===null?Object.create(h):(p.prototype=h.prototype,new p)}})();Object.defineProperty(mT,"__esModule",{value:!0}),mT.PolarCategoryAxis=void 0;var e=oi(),i=gc(),n=N8(),t=U1(),o=rU(),a=T8(),s=tU(),l=GN(),u=j8(),c=(function(d){r(f,d);function f(h,p){var g=this,v,y,m;return g=d.call(this,h,p)||this,g.type=i.EAxisType.PolarCategoryAxis,g.defaultXValuesProperty=[],g.defaultXStartProperty=0,g.defaultXStepProperty=1,g.defaultXValuesProperty=(v=p==null?void 0:p.defaultXValues)!==null&&v!==void 0?v:g.defaultXValuesProperty,g.defaultXStartProperty=(y=p==null?void 0:p.defaultXStart)!==null&&y!==void 0?y:g.defaultXStartProperty,g.defaultXStepProperty=(m=p==null?void 0:p.defaultXStep)!==null&&m!==void 0?m:g.defaultXStepProperty,g.tickProvider=new t.NumericTickProvider(g.webAssemblyContext2D),g.deltaCalculator=new a.CategoryDeltaCalculator(g.webAssemblyContext2D),g.defaultBaseXValues=new g.webAssemblyContext2D.SCRTDoubleVector,g.tickCoordinatesProvider=new n.PolarTickCoordinatesProvider,p!=null&&p.labelProvider?g.labelProvider=p==null?void 0:p.labelProvider:p!=null&&p.labels?g.labelProvider=new l.TextLabelProvider(p):g.labelProvider=new s.DateLabelProvider(p),g}return Object.defineProperty(f.prototype,"isCategoryAxis",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"defaultXValues",{get:function(){return this.defaultXValuesProperty},set:function(h){this.defaultXValuesProperty=h,this.invalidateParentCallback&&this.invalidateParentCallback()},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"defaultXStart",{get:function(){return this.defaultXStartProperty},set:function(h){this.defaultXStartProperty=h,this.invalidateParentCallback&&this.invalidateParentCallback()},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"defaultXStep",{get:function(){return this.defaultXStepProperty},set:function(h){this.defaultXStepProperty=h,this.invalidateParentCallback&&this.invalidateParentCallback()},enumerable:!1,configurable:!0}),f.prototype.prepareRenderData=function(){o.CategoryAxis.prototype.prepareRenderData.call(this)},f.prototype.delete=function(){d.prototype.delete.call(this),o.CategoryAxis.prototype.delete.call(this)},f.prototype.getCurrentCoordinateCalculatorInternal=function(){return o.CategoryAxis.prototype.getCurrentCoordinateCalculatorInternal.call(this)},f.prototype.getXDataRange=function(){var h;return this.parentSurface&&this.getVisibleRenderableSeriesByXAxis().forEach(function(p){var g=p.getDataSeriesValuesCount(),v=new e.NumberRange(0,g-1);v&&(h=h?h.union(v):v)}),h},f.prototype.getMaxAutoTicks=function(){return o.CategoryAxis.prototype.getMaxAutoTicks.call(this)},f.prototype.generateDefaultXValuesForCategoryAxis=function(h,p){return o.CategoryAxis.prototype.generateDefaultXValuesForCategoryAxis.call(this,h,p)},f.prototype.updateBaseXValues=function(h){return o.CategoryAxis.prototype.updateBaseXValues.call(this,h)},f})(u.PolarAxisBase);return mT.PolarCategoryAxis=c,mT}var _T={},Gre;function B8(){if(Gre)return _T;Gre=1;var r=_T&&_T.__extends||(function(){var c=function(d,f){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(h[g]=p[g])},c(d,f)};return function(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");c(d,f);function h(){this.constructor=d}d.prototype=f===null?Object.create(f):(h.prototype=f.prototype,new h)}})();Object.defineProperty(_T,"__esModule",{value:!0}),_T.PolarNumericAxis=void 0;var e=gc(),i=iU(),n=nU(),t=N8(),o=U1(),a=z1(),s=sy(),l=j8(),u=(function(c){r(d,c);function d(f,h){var p=this,g;return p=c.call(this,f,h)||this,p.type=e.EAxisType.PolarNumericAxis,p.tickProvider=new o.NumericTickProvider(p.webAssemblyContext2D),p.tickCoordinatesProvider=new t.PolarTickCoordinatesProvider,p.labelProvider=(g=h==null?void 0:h.labelProvider)!==null&&g!==void 0?g:new s.NumericLabelProvider(h),p.deltaCalculator=new a.NumericDeltaCalculator(p.webAssemblyContext2D),p}return d.prototype.getCurrentCoordinateCalculatorInternal=function(){var f=this.visibleRange.min,h=this.visibleRange.max,p=this.getAxisSize(),g=this.offset;return this.flippedCoordinates?new n.NumericCoordinateCalculator(this.webAssemblyContext2D,p,f,h,g,this.allowFastMath,0,0):new i.FlippedNumericCoordinateCalculator(this.webAssemblyContext2D,p,f,h,g,this.allowFastMath,0)},d})(l.PolarAxisBase);return _T.PolarNumericAxis=u,_T}var PT={},CT={},G5={},Yre;function sN(){return Yre||(Yre=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.convert3DTitleRotationMode=r.convert3DLabelOrientationMode=r.E3DTitleRotationMode=r.E3DLabelOrientationMode=void 0;var e;(function(o){o.Auto="Auto",o.Horizontal="Horizontal"})(e=r.E3DLabelOrientationMode||(r.E3DLabelOrientationMode={}));var i;(function(o){o.Auto="Auto",o.Horizontal="Horizontal",o.Vertical="Vertical"})(i=r.E3DTitleRotationMode||(r.E3DTitleRotationMode={}));var n=function(o,a){var s=a.eSCRTTickLabelOrientationMode.TickLabelOrientationHorizontal;switch(o){case e.Auto:s=a.eSCRTTickLabelOrientationMode.TickLabelOrientationAuto;break;case e.Horizontal:s=a.eSCRTTickLabelOrientationMode.TickLabelOrientationHorizontal;break}return s};r.convert3DLabelOrientationMode=n;var t=function(o,a){var s=a.eSCRTAxisTitleRotationMode.AxisTitleRotationHorizontal;switch(o){case i.Auto:s=a.eSCRTAxisTitleRotationMode.AxisTitleRotationAuto;break;case i.Horizontal:s=a.eSCRTAxisTitleRotationMode.AxisTitleRotationHorizontal;break;case i.Vertical:s=a.eSCRTAxisTitleRotationMode.AxisTitleRotationVertical;break}return s};r.convert3DTitleRotationMode=t})(G5)),G5}var Y5={},$re;function nze(){return $re||($re=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.TEXT_STYLE_PROPERTY=r.PROPERTY=void 0,(function(e){e.AXIS_PLANE_BACKGROUND_FILL="AXIS_PLANE_BACKGROUND_FILL",e.IS_Y_AXIS="IS_Y_AXIS",e.IS_Z_AXIS="IS_Z_AXIS",e.LABEL_DEPTH_TEST="LABEL_DEPTH_TEST",e.LABEL_ORIENTATION_MODE="LABEL_ORIENTATION_MODE",e.NEGATIVE_SIDE_CLIPPING="NEGATIVE_SIDE_CLIPPING",e.PLANE_BORDER_COLOR="PLANE_BORDER_COLOR",e.PLANE_BORDER_THICKNESS="PLANE_BORDER_THICKNESS",e.POSITIVE_SIDE_CLIPPING="POSITIVE_SIDE_CLIPPING",e.TEXT_STYLE="TEXT_STYLE",e.TICK_LABEL_ALIGNMENT="TICK_LABEL_ALIGNMENT",e.TICK_LABELS_OFFSET="TICK_LABELS_OFFSET",e.TITLE_OFFSET="TITLE_OFFSET",e.TITLE_ORIENTATION_MODE="TITLE_ORIENTATION_MODE",e.BACKGROUND_COLOR="BACKGROUND_COLOR"})(r.PROPERTY||(r.PROPERTY={})),(function(e){e.ALIGNMENT="ALIGNMENT",e.DPI_SCALING="DPI_SCALING",e.FONT_FAMILY="FONT_FAMILY",e.FONT_SIZE="FONT_SIZE",e.FOREGROUND="FOREGROUND"})(r.TEXT_STYLE_PROPERTY||(r.TEXT_STYLE_PROPERTY={}))})(Y5)),Y5}var qre;function bY(){return qre||(qre=1,(function(r){var e=CT&&CT.__extends||(function(){var m=function(b,S){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,C){_.__proto__=C}||function(_,C){for(var T in C)Object.prototype.hasOwnProperty.call(C,T)&&(_[T]=C[T])},m(b,S)};return function(b,S){if(typeof S!="function"&&S!==null)throw new TypeError("Class extends value "+String(S)+" is not a constructor or null");m(b,S);function _(){this.constructor=b}b.prototype=S===null?Object.create(S):(_.prototype=S.prototype,new _)}})(),i=CT&&CT.__assign||function(){return i=Object.assign||function(m){for(var b,S=1,_=arguments.length;S<_;S++){b=arguments[S];for(var C in b)Object.prototype.hasOwnProperty.call(b,C)&&(m[C]=b[C])}return m},i.apply(this,arguments)};Object.defineProperty(r,"__esModule",{value:!0}),r.AxisBase3D=r.EWhichAxis=void 0;var n=Jn(),t=P8(),o=ln(),a=Hi(),s=oi(),l=$o(),u=sN(),c=Vd(),d=mi(),f=nze(),h=Du(),p;(function(m){m.xAxis="xAxis",m.yAxis="yAxis",m.zAxis="zAxis"})(p=r.EWhichAxis||(r.EWhichAxis={}));var g=(function(m){e(b,m);function b(S,_){var C=this,T,x,A,w,L,k,D;return C=m.call(this,_)||this,C.getlabelStyleProxy=function(j){return new Proxy(j,{set:function(N,V,W){return N[V]=W,C.notifyPropertyChanged(f.PROPERTY.TEXT_STYLE),!0}})},C.labelDepthTestEnabledProperty=!1,C.planeBorderColorProperty=o.SciChartSurfaceBase.DEFAULT_THEME.planeBorderColor,C.axisPlaneBackgroundFillProperty=o.SciChartSurfaceBase.DEFAULT_THEME.axisPlaneBackgroundFill,C.isYAxisProperty=!1,C.isZAxisProperty=!1,C.titleOffsetProperty=10,C.tickLabelsOffsetProperty=10,C.labelStyleProperty=C.getlabelStyleProxy(i({dpiScaling:96,fontFamily:(0,c.getFontFamily)((0,c.getDefaultFontName)(),!0),fontSize:14,color:o.SciChartSurfaceBase.DEFAULT_THEME.labelForegroundBrush,multilineAlignment:h.EMultiLineAlignment.Center,multilineSpacing:3},_==null?void 0:_.labelStyle)),C.titleStyleProperty=C.getlabelStyleProxy(i({dpiScaling:96,fontFamily:(0,c.getFontFamily)((0,c.getDefaultFontName)(),!0),fontSize:14,color:o.SciChartSurfaceBase.DEFAULT_THEME.labelForegroundBrush,multilineAlignment:h.EMultiLineAlignment.Center,multilineSpacing:3},_==null?void 0:_.axisTitleStyle)),_!=null&&_.labelProvider&&("getLabels"in(_==null?void 0:_.labelProvider)||(_.labelProvider=(0,n.createType)(l.EBaseType.LabelProvider,_.labelProvider.type,S,_.labelProvider.options))),C.webAssemblyContext3D=S,C.isXAxisProperty=!1,C.tickLabelsOffsetProperty=(T=_==null?void 0:_.tickLabelsOffset)!==null&&T!==void 0?T:C.tickLabelsOffsetProperty,C.titleOffsetProperty=(x=_==null?void 0:_.titleOffset)!==null&&x!==void 0?x:C.titleOffsetProperty,C.planeBorderColorProperty=(A=_==null?void 0:_.planeBorderColor)!==null&&A!==void 0?A:C.planeBorderColorProperty,C.planeBorderThicknessProperty=(w=_==null?void 0:_.planeBorderThickness)!==null&&w!==void 0?w:2,C.axisPlaneBackgroundFillProperty=(L=_==null?void 0:_.planeBackgroundFill)!==null&&L!==void 0?L:C.axisPlaneBackgroundFillProperty,C.labelOrientationModeProperty=(k=_==null?void 0:_.labelOrientationMode)!==null&&k!==void 0?k:C.labelOrientationModeProperty,C.titleOrientationModeProperty=(D=_==null?void 0:_.titleOrientationMode)!==null&&D!==void 0?D:C.titleOrientationModeProperty,C}return Object.defineProperty(b.prototype,"labelStyle",{get:function(){return this.labelStyleProperty},set:function(S){var _=i(i({},this.labelStyle),S);this.labelStyleProperty=this.getlabelStyleProxy(_),this.notifyPropertyChanged(f.PROPERTY.TEXT_STYLE)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"titleStyle",{get:function(){return this.titleStyleProperty},set:function(S){var _=i(i({},this.titleStyle),S);this.titleStyleProperty=this.getlabelStyleProxy(_),this.notifyPropertyChanged(f.PROPERTY.TEXT_STYLE)},enumerable:!1,configurable:!0}),b.prototype.applyTheme=function(S){var _,C,T,x,A,w,L=this.parentSurface.previousThemeProvider;this.axisBandsFill===L.axisBandsFill&&(this.axisBandsFill=S.axisBandsFill),((_=this.majorGridLineStyle)===null||_===void 0?void 0:_.color)===L.majorGridLineBrush&&(this.majorGridLineStyle={color:S.majorGridLineBrush}),((C=this.majorTickLineStyle)===null||C===void 0?void 0:C.color)===L.majorGridLineBrush&&(this.majorTickLineStyle={color:S.majorGridLineBrush}),((T=this.minorGridLineStyle)===null||T===void 0?void 0:T.color)===L.minorGridLineBrush&&(this.minorGridLineStyle={color:S.minorGridLineBrush}),((x=this.minorTickLineStyle)===null||x===void 0?void 0:x.color)===L.minorGridLineBrush&&(this.minorTickLineStyle={color:S.minorGridLineBrush}),((A=this.axisTitleStyle)===null||A===void 0?void 0:A.color)===L.axisTitleColor&&(this.axisTitleStyle={color:S.axisTitleColor}),this.planeBorderColor===L.planeBorderColor&&(this.planeBorderColor=S.planeBorderColor),this.axisPlaneBackgroundFill===L.axisPlaneBackgroundFill&&(this.axisPlaneBackgroundFill=S.axisPlaneBackgroundFill),((w=this.labelStyle)===null||w===void 0?void 0:w.color)===L.labelForegroundBrush&&(this.labelStyle.color=S.labelForegroundBrush)},Object.defineProperty(b.prototype,"isYAxis",{get:function(){return this.isYAxisProperty},enumerable:!1,configurable:!0}),b.prototype.setIsYAxis=function(S){this.isYAxisProperty=S,this.notifyPropertyChanged(f.PROPERTY.IS_Y_AXIS)},Object.defineProperty(b.prototype,"isZAxis",{get:function(){return this.isZAxisProperty},enumerable:!1,configurable:!0}),b.prototype.setIsZAxis=function(S){this.isZAxisProperty=S,this.notifyPropertyChanged(f.PROPERTY.IS_Z_AXIS)},Object.defineProperty(b.prototype,"labelDepthTestEnabled",{get:function(){return this.labelDepthTestEnabledProperty},set:function(S){this.labelDepthTestEnabledProperty=S,this.notifyPropertyChanged(f.PROPERTY.LABEL_DEPTH_TEST)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"planeBorderThickness",{get:function(){return this.planeBorderThicknessProperty},set:function(S){this.planeBorderThicknessProperty=S,this.notifyPropertyChanged(f.PROPERTY.PLANE_BORDER_THICKNESS)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"planeBorderColor",{get:function(){return this.planeBorderColorProperty},set:function(S){this.planeBorderColorProperty=S,this.notifyPropertyChanged(f.PROPERTY.PLANE_BORDER_COLOR)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"tickLabelAlignment",{get:function(){return this.tickLabelAlignmentProperty},set:function(S){this.tickLabelAlignmentProperty=S,this.notifyPropertyChanged(f.PROPERTY.TICK_LABEL_ALIGNMENT)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"positiveSideClipping",{get:function(){return this.positiveSideClippingProperty},set:function(S){this.positiveSideClippingProperty=S,this.notifyPropertyChanged(f.PROPERTY.POSITIVE_SIDE_CLIPPING)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"negativeSideClipping",{get:function(){return this.negativeSideClippingProperty},set:function(S){this.negativeSideClippingProperty=S,this.notifyPropertyChanged(f.PROPERTY.NEGATIVE_SIDE_CLIPPING)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"axisPlaneBackgroundFill",{get:function(){return this.axisPlaneBackgroundFillProperty},set:function(S){this.axisPlaneBackgroundFillProperty=S,this.notifyPropertyChanged(f.PROPERTY.AXIS_PLANE_BACKGROUND_FILL)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"titleOffset",{get:function(){return this.titleOffsetProperty},set:function(S){this.titleOffsetProperty=S,this.notifyPropertyChanged(f.PROPERTY.TITLE_OFFSET)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"backgroundColor",{get:function(){return this.axisPlaneBackgroundFill},set:function(S){this.axisPlaneBackgroundFill=S,this.notifyPropertyChanged(f.PROPERTY.BACKGROUND_COLOR)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"tickLabelsOffset",{get:function(){return this.tickLabelsOffsetProperty},set:function(S){this.tickLabelsOffsetProperty=S,this.notifyPropertyChanged(f.PROPERTY.TICK_LABELS_OFFSET)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"labelOrientationMode",{get:function(){return this.labelOrientationModeProperty},set:function(S){this.labelOrientationModeProperty=S,this.notifyPropertyChanged(f.PROPERTY.LABEL_ORIENTATION_MODE)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"titleOrientationMode",{get:function(){return this.titleOrientationModeProperty},set:function(S){this.titleOrientationModeProperty=S,this.notifyPropertyChanged(f.PROPERTY.TITLE_ORIENTATION_MODE)},enumerable:!1,configurable:!0}),b.prototype.onAttach=function(S,_,C,T){this.parentSurface=S,this.setIsXAxis(_),this.setIsYAxis(C),this.setIsZAxis(T)},b.prototype.toAxisDescriptor=function(){var S,_,C="transparent",T="#202123",x=this.getTickCoordsAndLabels(),A=x.majorTickCoords,w=x.minorTickCoords,L=x.majorTickLabels,k={axisTitle:this.isVisible?Array.isArray(this.axisTitle)?this.axisTitle.join(" "):this.axisTitle:"",axisSize:this.getAxisSize(),backgroundColor:(0,d.parseColorToTArgb)(this.axisPlaneBackgroundFill||C),bandColor:(0,d.parseColorToTArgb)(this.axisBandsFill||T),borderColor:(0,d.parseColorToTArgb)(this.planeBorderColor||C),borderThickness:this.planeBorderThickness,drawBands:this.isVisible&&this.drawMajorBands,drawLabels:this.isVisible&&this.drawLabels,drawMajorGridlines:this.isVisible&&this.drawMajorGridLines,drawMajorTicks:this.isVisible&&this.drawMajorTickLines,drawMinorGridlines:this.isVisible&&this.drawMinorGridLines,drawMinorTicks:this.isVisible&&this.drawMinorTickLines,isVisible:this.isVisible,labelDepthTestEnabled:this.labelDepthTestEnabled,labelStyle:{dpiScaling:this.labelStyle.dpiScaling/96,fontFamily:this.labelStyle.fontFamily,fontSize:this.labelStyle.fontSize*a.DpiHelper.PIXEL_RATIO,foreground:(0,d.parseColorToUIntAbgr)((S=this.labelStyle.color)!==null&&S!==void 0?S:this.parentSurface.themeProvider.labelForegroundBrush),multilineSpacing:this.labelStyle.multilineSpacing,multilineAlignment:(0,h.convertMultiLineAlignment)(this.labelStyle.multilineAlignment,this.webAssemblyContext3D)},majorCoordinates:A,majorLineStyle:v(this.majorGridLineStyle),minorLineStyle:v(this.minorGridLineStyle),majorTickStyle:y(this.majorTickLineStyle),minorTickStyle:y(this.minorTickLineStyle),minorCoordinates:w,smoothLabelOverlapAvoidance:!1,tickLabels:L,tickLabelsOffset:this.tickLabelsOffset*a.DpiHelper.PIXEL_RATIO,titleOffset:this.titleOffset*a.DpiHelper.PIXEL_RATIO,titleStyle:{dpiScaling:this.titleStyle.dpiScaling/96,fontFamily:this.titleStyle.fontFamily,fontSize:this.titleStyle.fontSize*a.DpiHelper.PIXEL_RATIO,foreground:(0,d.parseColorToUIntAbgr)((_=this.titleStyle.color)!==null&&_!==void 0?_:this.parentSurface.themeProvider.labelForegroundBrush),multilineSpacing:this.titleStyle.multilineSpacing,multilineAlignment:(0,h.convertMultiLineAlignment)(this.titleStyle.multilineAlignment,this.webAssemblyContext3D)},labelOrientationMode:(0,u.convert3DLabelOrientationMode)(this.labelOrientationMode,this.webAssemblyContext3D),titleOrientationMode:(0,u.convert3DTitleRotationMode)(this.titleOrientationMode,this.webAssemblyContext3D)};return k},b.prototype.validateAxis=function(){},b.prototype.getMaximumRange=function(){var S,_,C,T,x,A=new s.NumberRange(NaN,NaN);if(((_=(S=this.parentSurface)===null||S===void 0?void 0:S.renderableSeries)===null||_===void 0?void 0:_.size())>0){var w=void 0;if(this.isXAxis)w=p.xAxis;else if(this.isYAxis)w=p.yAxis;else if(this.isZAxis)w=p.zAxis;else throw Error("AxisBase3D: isXAxis, isYAxis, isZAxis flag are not set");A=(C=this.getMaximumRangeAs(this.parentSurface.renderableSeries,w))!==null&&C!==void 0?C:A,A.isZero()&&(A=this.coerceZeroVisibleRange(A)),!((T=this.growBy)===null||T===void 0)&&T.isDefined()&&(A=A.growBy(this.growBy))}var L=!((x=this.visibleRange)===null||x===void 0)&&x.isDefined()?this.visibleRange:this.getDefaultNonZeroRange();return A!=null&&A.isDefined()?A:L},b.prototype.getMaximumRangeAs=function(S,_){var C;return S.asArray().forEach(function(T){if(T.isVisible&&T.dataSeries){var x=_===p.xAxis?T.dataSeries.xRange:_===p.yAxis?T.dataSeries.yRange:T.dataSeries.zRange;x!=null&&x.isDefined()&&(C=C?x.union(C):x)}}),C},b.prototype.getAxisSize=function(){if(!this.parentSurface)return 0;var S=this.parentSurface.worldDimensions;if(!S)throw new Error("Must set property sciChart3DSurface.worldDimensions to a valid Vector3 with X,Y,Z world size");var _=this.isXAxis?S.x:this.isYAxis?S.y:S.z;return _},b.prototype.getLabels=function(S){var _=this;return S.map(function(C){return _.labelProvider.formatLabel(C)})},b.prototype.getTicks=function(){var S=this.getMaxAutoTicks();if(this.autoTicks){var _=this.deltaCalculator.getDeltaFromRange(this.visibleRange.min,this.visibleRange.max,this.minorsPerMajor,S);this.minorDeltaProperty=_.min,this.majorDeltaProperty=_.max}var C=this.tickProvider.getMajorTicks(this.minorDeltaProperty,this.majorDeltaProperty,this.visibleRange),T=this.tickProvider.getMinorTicks(this.minorDeltaProperty,this.majorDeltaProperty,this.visibleRange);return{majorTicks:C,minorTicks:T}},b.prototype.getTickCoordsAndLabels=function(){var S=this.getCurrentCoordinateCalculator(),_=function(k){return k.map(function(D){return S.getCoordinate(D)})},C=this.getTicks(),T=C.majorTicks,x=C.minorTicks,A=this.getLabels(T),w=_(T),L=_(x);return{majorTicks:T,majorTickLabels:A,majorTickCoords:w,minorTicks:x,minorTickCoords:L}},b.prototype.toJSON=function(){var S={autoRange:this.autoRange,autoTicks:this.autoTicks,axisTitle:this.axisTitle,axisTitleStyle:this.titleStyle,drawLabels:this.drawLabels,drawMajorBands:this.drawMajorBands,drawMajorGridLines:this.drawMajorGridLines,drawMajorTickLines:this.drawMajorTickLines,drawMinorGridLines:this.drawMinorGridLines,drawMinorTickLines:this.drawMinorTickLines,flippedCoordinates:this.flippedCoordinates,growBy:this.growBy,id:this.id,isVisible:this.isVisible,labelStyle:this.labelStyle,majorGridLineStyle:this.majorGridLineStyle,majorTickLineStyle:this.majorTickLineStyle,maxAutoTicks:this.maxAutoTicks,minorGridLineStyle:this.minorGridLineStyle,minorTickLineStyle:this.minorTickLineStyle,visibleRange:this.hasDefaultVisibleRange()?void 0:this.visibleRange,minorsPerMajor:this.minorsPerMajor,majorDelta:this.majorDelta,minorDelta:this.minorDelta,labelProvider:this.labelProvider.toJSON()};return{type:this.type,options:S}},b})(t.AxisCore);r.AxisBase3D=g;var v=function(m){return{stroke:(0,d.parseColorToTArgb)(m.color),strokeThickness:m.strokeThickness*a.DpiHelper.PIXEL_RATIO,start:1,end:1}},y=function(m){return{stroke:(0,d.parseColorToTArgb)(m.color),strokeThickness:m.strokeThickness*a.DpiHelper.PIXEL_RATIO,start:0,end:m.tickSize*a.DpiHelper.PIXEL_RATIO}}})(CT)),CT}var Xre;function V8(){if(Xre)return PT;Xre=1;var r=PT&&PT.__extends||(function(){var f=function(h,p){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,v){g.__proto__=v}||function(g,v){for(var y in v)Object.prototype.hasOwnProperty.call(v,y)&&(g[y]=v[y])},f(h,p)};return function(h,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");f(h,p);function g(){this.constructor=h}h.prototype=p===null?Object.create(p):(g.prototype=p.prototype,new g)}})();Object.defineProperty(PT,"__esModule",{value:!0}),PT.NumericAxis3D=void 0;var e=iU(),i=nU(),n=U1(),t=z1(),o=sy(),a=hc(),s=QF(),l=oi(),u=gc(),c=bY(),d=(function(f){r(h,f);function h(p,g){var v=this,y;return v=f.call(this,p,g)||this,v.type=u.EAxisType.NumericAxis3D,v.tickProvider=new n.NumericTickProvider(v.webAssemblyContext3D),v.deltaCalculator=new t.NumericDeltaCalculator(v.webAssemblyContext3D),g!=null&&g.precision&&(g.labelPrecision=g.precision),v.labelProvider=(y=g==null?void 0:g.labelProvider)!==null&&y!==void 0?y:new o.NumericLabelProvider(g),v}return h.prototype.getDefaultNonZeroRange=function(){return new l.NumberRange(0,10)},h.prototype.animateVisibleRange=function(p,g,v,y){var m=this,b;if(v===void 0&&(v=a.easing.outCubic),y===void 0&&(y=function(){}),g<=0){this.visibleRange=p||this.visibleRange,y();return}return(b=this.visibleRangeAnimationToken)===null||b===void 0||b.cancel(),this.visibleRangeAnimationToken=s.NumberRangeAnimator.animate(this.visibleRange,p,g,function(S){m.visibleRange=S},function(){m.visibleRangeAnimationToken=void 0,y()},v),this.parentSurface.addAnimation(this.visibleRangeAnimationToken),this.visibleRangeAnimationToken},h.prototype.getCurrentCoordinateCalculatorInternal=function(){var p=this.visibleRange.min,g=this.visibleRange.max,v=this.getAxisSize(),y=!this.flippedCoordinatesProperty;return y?new e.FlippedNumericCoordinateCalculator(this.webAssemblyContext3D,v,p,g):new i.NumericCoordinateCalculator(this.webAssemblyContext3D,v,p,g)},h})(c.AxisBase3D);return PT.NumericAxis3D=d,PT}var TT={},xT={},Am={},wm={},Kre;function $Se(){if(Kre)return wm;Kre=1;var r=wm&&wm.__extends||(function(){var c=function(d,f){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(h[g]=p[g])},c(d,f)};return function(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");c(d,f);function h(){this.constructor=d}d.prototype=f===null?Object.create(f):(h.prototype=f.prototype,new h)}})(),e=wm&&wm.__assign||function(){return e=Object.assign||function(c){for(var d,f=1,h=arguments.length;f<h;f++){d=arguments[f];for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(c[p]=d[p])}return c},e.apply(this,arguments)};Object.defineProperty(wm,"__esModule",{value:!0}),wm.BoxPlotDataSeries=void 0;var i=oi(),n=qv(),t=xo(),o=QS(),a=Qn(),s=Wl(),l=ki(),u=(function(c){r(d,c);function d(f,h){var p=c.call(this,f,e(e({},h),{arrayCount:5,valueNames:[t.EValueName.BoxPlotMedian,t.EValueName.BoxPlotMax,t.EValueName.BoxPlotUpper,t.EValueName.BoxPlotLower,t.EValueName.BoxPlotMinimum],includeInYRange:[!0,!0,!0,!0,!0]}))||this;return p.type=l.EDataSeriesType.BoxPlot,h!=null&&h.xValues&&(p.appendRange(h.xValues,h.maximumValues,h.upperQuartileValues,h.medianValues,h.lowerQuartileValues,h.minimumValues,h.metadata),h!=null&&h.fifoCapacity&&(h!=null&&h.fifoStartIndex)&&(p.xValues.notifyAppend(h==null?void 0:h.fifoStartIndex),p.medianValues.notifyAppend(h==null?void 0:h.fifoStartIndex),p.maximumValues.notifyAppend(h==null?void 0:h.fifoStartIndex),p.upperQuartileValues.notifyAppend(h==null?void 0:h.fifoStartIndex),p.lowerQuartileValues.notifyAppend(h==null?void 0:h.fifoStartIndex),p.minimumValues.notifyAppend(h==null?void 0:h.fifoStartIndex))),p}return Object.defineProperty(d.prototype,"yValues",{get:function(){return this.getNativeYValues()},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"medianValues",{get:function(){return this.getNativeYValues()},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"maximumValues",{get:function(){return this.getNativeMaximumValues()},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"upperQuartileValues",{get:function(){return this.getNativeUpperQuartileValues()},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"lowerQuartileValues",{get:function(){return this.getNativeLowerQuartileValues()},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"minimumValues",{get:function(){return this.getNativeMinimumValues()},enumerable:!1,configurable:!0}),d.prototype.getNativeMaximumValues=function(){return this.getNativeYValues(1)},d.prototype.getNativeUpperQuartileValues=function(){return this.getNativeYValues(2)},d.prototype.getNativeMedianValues=function(){return this.getNativeYValues()},d.prototype.getNativeLowerQuartileValues=function(){return this.getNativeYValues(3)},d.prototype.getNativeMinimumValues=function(){return this.getNativeYValues(4)},d.prototype.append=function(f,h,p,g,v,y,m){c.prototype.appendN.call(this,f,[g,h,p,v,y],m)},d.prototype.appendRange=function(f,h,p,g,v,y,m){c.prototype.appendRangeN.call(this,f,[g,h,p,v,y],m)},d.prototype.update=function(f,h,p,g,v,y,m){c.prototype.updateN.call(this,f,[h,p,g,v,y],m)},d.prototype.updateXBoxPlot=function(f,h,p,g,v,y,m,b){c.prototype.updateXyN.call(this,f,h,[v,p,g,y,m],b)},d.prototype.insert=function(f,h,p,g,v,y,m,b){c.prototype.insertN.call(this,f,h,[v,p,g,y,m],b)},d.prototype.insertRange=function(f,h,p,g,v,y,m,b){c.prototype.insertRangeN.call(this,f,h,[v,p,g,y,m],b)},d.prototype.getWindowedYRange=function(f,h,p,g,v){p===void 0&&(p=!1),g===void 0&&(g=l.EDataSeriesValueType.Default),v===void 0&&(v=o.EYRangeMode.Visible);var y=this.getBoxPlotValues(g),m=y.maximumValues,b=y.minimumValues;if(this.count()===1)return new i.NumberRange(m.get(0),b.get(0));var S=p?f:this.getIndicesRange(f,!1,v===o.EYRangeMode.Visible?n.ESearchMode.RoundUp:n.ESearchMode.RoundDown,v===o.EYRangeMode.Visible?n.ESearchMode.RoundDown:n.ESearchMode.RoundUp),_=Number.MAX_VALUE,C=Number.NEGATIVE_INFINITY,T=Math.max(S.min,0),x=Math.min(S.max,this.count()-1);if(!(x<T)){for(var A=T;A<=x;A++){var w=m.get(A),L=b.get(A);L<_&&(_=L),w>C&&(C=w)}return new i.NumberRange(_,C)}},d.prototype.getOptions=function(f){f===void 0&&(f=!1);var h=c.prototype.getOptions.call(this,f);if(!f){var p=(0,a.vectorToArray)(this.xValues,this.webAssemblyContext),g=(0,a.vectorToArray)(this.maximumValues,this.webAssemblyContext),v=(0,a.vectorToArray)(this.upperQuartileValues,this.webAssemblyContext),y=(0,a.vectorToArray)(this.medianValues,this.webAssemblyContext),m=(0,a.vectorToArray)(this.lowerQuartileValues,this.webAssemblyContext),b=(0,a.vectorToArray)(this.minimumValues,this.webAssemblyContext),S={xValues:p,maximumValues:g,upperQuartileValues:v,medianValues:y,lowerQuartileValues:m,minimumValues:b};Object.assign(h,S)}return h},d.prototype.getBoxPlotValues=function(f){var h,p;switch(f){case l.EDataSeriesValueType.FinalAnimationValues:h=this.yFinalAnimationValuesArray[1],p=this.yFinalAnimationValuesArray[4];break;case l.EDataSeriesValueType.InitialAnimationValues:h=this.yInitialAnimationValuesArray[1],p=this.yInitialAnimationValuesArray[4];break;default:h=this.maximumValues,p=this.minimumValues}return{maximumValues:h,minimumValues:p}},d})(s.BaseDataSeries);return wm.BoxPlotDataSeries=u,wm}var Om={},$5={},Zre;function ly(){return Zre||(Zre=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EDataFilterType=void 0,(function(e){e.XyLinearTrend="XyLinearTrend",e.XyMovingAverage="XyMovingAverage",e.XyRatio="XyRatio",e.XyScaleOffset="XyScaleOffset",e.XyyScaleOffset="XyyScaleOffset",e.XyzScaleOffset="XyzScaleOffset",e.HlcScaleOffset="HlcScaleOffset",e.OhlcScaleOffset="OhlcScaleOffset"})(r.EDataFilterType||(r.EDataFilterType={}))})($5)),$5}var ET={},AT={},Dm={},Jre;function H8(){if(Jre)return Dm;Jre=1;var r=Dm&&Dm.__extends||(function(){var h=function(p,g){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var m in y)Object.prototype.hasOwnProperty.call(y,m)&&(v[m]=y[m])},h(p,g)};return function(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");h(p,g);function v(){this.constructor=p}p.prototype=g===null?Object.create(g):(v.prototype=g.prototype,new v)}})(),e=Dm&&Dm.__assign||function(){return e=Object.assign||function(h){for(var p,g=1,v=arguments.length;g<v;g++){p=arguments[g];for(var y in p)Object.prototype.hasOwnProperty.call(p,y)&&(h[y]=p[y])}return h},e.apply(this,arguments)};Object.defineProperty(Dm,"__esModule",{value:!0}),Dm.HlcDataSeries=void 0;var i=Mr(),n=ni(),t=oi(),o=qv(),a=xo(),s=QS(),l=Oh(),u=Qn(),c=Wl(),d=ki(),f=(function(h){r(p,h);function p(g,v){var y=h.call(this,g,e(e({},v),{arrayCount:3,valueNames:[a.EValueName.Close,a.EValueName.High,a.EValueName.Low],includeInYRange:[!0,!0,!0]}))||this;return y.type=d.EDataSeriesType.Hlc,v!=null&&v.xValues&&(n.Guard.notNull(v.yValues,"options.yValues"),n.Guard.notNull(v.highValues,"options.highValues"),n.Guard.notNull(v.lowValues,"options.lowValues"),y.appendRange(v.xValues,v.yValues,v.highValues,v.lowValues,v.metadata),v!=null&&v.fifoCapacity&&(v!=null&&v.fifoStartIndex)&&(y.xValues.notifyAppend(v==null?void 0:v.fifoStartIndex),y.yValues.notifyAppend(v==null?void 0:v.fifoStartIndex),y.highValues.notifyAppend(v==null?void 0:v.fifoStartIndex),y.lowValues.notifyAppend(v==null?void 0:v.fifoStartIndex))),y}return Object.defineProperty(p.prototype,"yValues",{get:function(){return this.getNativeYValues()},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"highValues",{get:function(){return this.getNativeYValues(1)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"lowValues",{get:function(){return this.getNativeYValues(2)},enumerable:!1,configurable:!0}),p.prototype.getNativeHighValues=function(){return this.highValues},p.prototype.getNativeLowValues=function(){return this.lowValues},p.prototype.append=function(g,v,y,m,b){h.prototype.appendN.call(this,g,[v,y,m],b)},p.prototype.appendRange=function(g,v,y,m,b){h.prototype.appendRangeN.call(this,g,[v,y,m],b)},p.prototype.update=function(g,v,y,m,b){h.prototype.updateN.call(this,g,[v,y,m],b)},p.prototype.updateXyhl=function(g,v,y,m,b,S){h.prototype.updateXyN.call(this,g,v,[y,m,b],S)},p.prototype.insert=function(g,v,y,m,b,S){h.prototype.insertN.call(this,g,v,[y,m,b],S)},p.prototype.insertRange=function(g,v,y,m,b,S){h.prototype.insertRangeN.call(this,g,v,[y,m,b],S)},p.prototype.getXRange=function(g,v,y,m){var b=this.getXValues(g),S=this.getHlcValues(g),_=S.hValues,C=S.lValues,T;if(v){if(this.count()===1){var x=m?C:b,A=y?_:b,w=x.get(0)-1,L=A.get(0)+1;return new t.NumberRange(w,L)}else if(this.count()>1){var w=void 0,L=void 0,k=void 0;try{if(k=this.webAssemblyContext.NumberUtil.MinMax(m?this.getNativeLowValues():this.getNativeXValues(),this.dataDistributionCalculator.containsNaN),w=k.minD,k=this.webAssemblyContext.NumberUtil.MinMax(y?this.getNativeHighValues():this.getNativeXValues(),this.dataDistributionCalculator.containsNaN),L=k.maxD,!(0,l.isRealNumber)(w)||!(0,l.isRealNumber)(L))return new t.NumberRange(0,0)}finally{(0,i.deleteSafe)(k)}return w===L?new t.NumberRange(w-1,L+1):(w>L&&(T=w,w=L,L=T),new t.NumberRange(w,L))}}else if(this.count()===1){var w=b.get(0)-1,L=b.get(0)+1;return new t.NumberRange(w,L)}else if(this.count()>1){var w=b.get(0),L=b.get(this.count()-1);if(!this.dataDistributionCalculator.isSortedAscending){var k=void 0;try{if(k=this.webAssemblyContext.NumberUtil.MinMax(this.getNativeXValues(),!1),!(0,l.isRealNumber)(k.minD)||!(0,l.isRealNumber)(k.maxD))return new t.NumberRange(0,0);w=k.minD,L=k.maxD}finally{(0,i.deleteSafe)(k)}}return w===L?new t.NumberRange(w-1,L+1):(w>L&&(T=w,w=L,L=T),new t.NumberRange(w,L))}return new t.NumberRange(0,0)},p.prototype.getWindowedYRange=function(g,v,y,m,b,S,_,C){y===void 0&&(y=!1),m===void 0&&(m=d.EDataSeriesValueType.Default),b===void 0&&(b=s.EYRangeMode.Visible),S===void 0&&(S=!1);var T=this.getHlcValues(m),x=T.hValues,A=T.lValues,w=T.yValues;if(this.count()===1&&!S)if(S){var L=w.get(0);return new t.NumberRange(L,L)}else{var k=Math.min(x.get(0),A.get(0)),D=Math.max(x.get(0),A.get(0));return new t.NumberRange(k,D)}var j=y?g:this.getIndicesRange(g,!1,b===s.EYRangeMode.Visible?o.ESearchMode.RoundUp:o.ESearchMode.RoundDown,b===s.EYRangeMode.Visible?o.ESearchMode.RoundDown:o.ESearchMode.RoundUp),N=Number.MAX_VALUE,V=Number.NEGATIVE_INFINITY,W=Math.max(Math.floor(j.min),0),K=Math.min(Math.ceil(j.max),this.count()-1);if(!(K<W)){if(S){var H=void 0;try{if(H=this.webAssemblyContext.NumberUtil.MinMaxWithIndex(w,W,K-W+1,this.dataDistributionCalculator.containsNaN),!(0,l.isRealNumber)(H.minD)||!(0,l.isRealNumber)(H.maxD))return;N=H.minD,V=H.maxD}finally{(0,i.deleteSafe)(H)}}else{var U=_?x:w,I=C?A:w,H=void 0;try{if(H=this.webAssemblyContext.NumberUtil.MinMaxWithIndex(U,W,K-W+1,this.dataDistributionCalculator.containsNaN),!(0,l.isRealNumber)(H.minD)||!(0,l.isRealNumber)(H.maxD)||(V=H.maxD,H=this.webAssemblyContext.NumberUtil.MinMaxWithIndex(I,W,K-W+1,this.dataDistributionCalculator.containsNaN),!(0,l.isRealNumber)(H.minD)||!(0,l.isRealNumber)(H.maxD)))return;N=H.minD}finally{(0,i.deleteSafe)(H)}}return new t.NumberRange(N,V)}},p.prototype.getOptions=function(g){g===void 0&&(g=!1);var v=h.prototype.getOptions.call(this,g);if(!g){var y=(0,u.vectorToArray)(this.xValues,this.webAssemblyContext),m=(0,u.vectorToArray)(this.yValues,this.webAssemblyContext),b=(0,u.vectorToArray)(this.highValues,this.webAssemblyContext),S=(0,u.vectorToArray)(this.lowValues,this.webAssemblyContext),_={xValues:y,yValues:m,highValues:b,lowValues:S};Object.assign(v,_)}return v},p.prototype.getHlcValues=function(g){var v,y,m;switch(g){case d.EDataSeriesValueType.FinalAnimationValues:v=this.yFinalAnimationValuesArray[1],y=this.yFinalAnimationValuesArray[2],m=this.yFinalAnimationValuesArray[0];break;case d.EDataSeriesValueType.InitialAnimationValues:v=this.yInitialAnimationValuesArray[1],y=this.yInitialAnimationValuesArray[2],m=this.yInitialAnimationValuesArray[0];break;default:v=this.highValues,y=this.lowValues,m=this.yValues}return{hValues:v,lValues:y,yValues:m}},p})(c.BaseDataSeries);return Dm.HlcDataSeries=f,Dm}var DI={},Rm={},wT={},OT={},Qre;function FM(){if(Qre)return OT;Qre=1;var r=OT&&OT.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(OT,"__esModule",{value:!0}),OT.BasePointSeriesResampled=void 0;var e=$n(),i=xo(),n=ki(),t=(function(o){r(a,o);function a(s,l,u,c){u===void 0&&(u=1);var d=o.call(this)||this;d.type=n.EDataSeriesType.Xy,d.yValuesArray=[],d.arrayCount=1,d.resampled=!0,d.wasmContext=s,d.arrayCount=u,d.intIndexes=new s.IntVector,d.indexes=new s.SCRTDoubleVector,d.xValues=new s.SCRTDoubleVector;for(var f=0;f<d.arrayCount;f++)d.yValuesArray.push(new s.SCRTDoubleVector);return d.valueNames=c??(0,i.generateValueNamesForDataSeries)(d.yValuesArray.length),d.xRange=l,d}return Object.defineProperty(a.prototype,"count",{get:function(){return this.xValues.size()},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"yValues",{get:function(){return this.yValuesArray[0]},enumerable:!1,configurable:!0}),a.prototype.getYValues=function(s,l){return l===void 0&&(l=!0),s<this.arrayCount?this.yValuesArray[s]:l&&s!==void 0?void 0:this.yValuesArray[0]},a.prototype.getYValuesByName=function(s,l){l===void 0&&(l=!0);var u=this.valueNames.indexOf(s);return u>=0?this.getYValues(u,l):l?void 0:this.yValuesArray[0]},a.prototype.delete=function(){this.intIndexes.delete(),this.indexes.delete(),this.xValues.delete(),this.yValuesArray.forEach(function(s){return s.delete()}),this.yValuesArray.length=0,this.wasmContext=void 0},a.prototype.clearIntIndexes=function(){this.intIndexes.clear()},a.prototype.debugOutputForUnitTests=function(){console.log("points count ".concat(this.count)),console.log("xResampled at min",this.xValues.get(0)),console.log("openResampled at min",this.yValues.get(0));var s=Math.round(this.count/2);console.log("middle",s),console.log("xResampled at middle",this.xValues.get(s)),console.log("yValues at middle",this.yValues.get(s));var l=this.count-1;console.log("xResampled at end",this.xValues.get(l)),console.log("yValues at end",this.yValues.get(l))},a})(e.DeletableEntity);return OT.BasePointSeriesResampled=t,OT}var eie;function G1(){if(eie)return wT;eie=1;var r=wT&&wT.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(wT,"__esModule",{value:!0}),wT.XyPointSeriesResampled=void 0;var e=xo(),i=ki(),n=FM(),t=(function(o){r(a,o);function a(s,l,u){u===void 0&&(u=e.EValueName.Y);var c=o.call(this,s,l,1,[u])||this;return c.type=i.EDataSeriesType.Xy,c}return a})(n.BasePointSeriesResampled);return wT.XyPointSeriesResampled=t,wT}var tie;function U8(){if(tie)return Rm;tie=1;var r=Rm&&Rm.__extends||(function(){var c=function(d,f){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(h[g]=p[g])},c(d,f)};return function(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");c(d,f);function h(){this.constructor=d}d.prototype=f===null?Object.create(f):(h.prototype=f.prototype,new h)}})(),e=Rm&&Rm.__assign||function(){return e=Object.assign||function(c){for(var d,f=1,h=arguments.length;f<h;f++){d=arguments[f];for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(c[p]=d[p])}return c},e.apply(this,arguments)};Object.defineProperty(Rm,"__esModule",{value:!0}),Rm.XyDataSeries=void 0;var i=ni(),n=xo(),t=Qn(),o=Wl(),a=ki(),s=G1(),l=wM(),u=(function(c){r(d,c);function d(f,h){var p=this,g=e(e({},h),{arrayCount:1,valueNames:[n.EValueName.Y],includeInYRange:[!0]});return p=c.call(this,f,g)||this,p.type=a.EDataSeriesType.Xy,g!=null&&g.xValues&&(i.Guard.notNull(g.yValues,"options.yValues"),p.appendRange(g.xValues,g.yValues,g.metadata),g!=null&&g.fifoCapacity&&(g!=null&&g.fifoStartIndex)&&(p.xValues.notifyAppend(g==null?void 0:g.fifoStartIndex),p.yValues.notifyAppend(g==null?void 0:g.fifoStartIndex))),p}return Object.defineProperty(d.prototype,"yValues",{get:function(){return this.getNativeYValues()},enumerable:!1,configurable:!0}),d.prototype.append=function(f,h,p){c.prototype.appendN.call(this,f,[h],p,void 0)},d.prototype.appendRange=function(f,h,p){c.prototype.appendRangeN.call(this,f,[h],p)},d.prototype.update=function(f,h,p){c.prototype.updateN.call(this,f,[h],p)},d.prototype.updateXy=function(f,h,p,g){c.prototype.updateXyN.call(this,f,h,[p],g)},d.prototype.insert=function(f,h,p,g){c.prototype.insertN.call(this,f,h,[p],g)},d.prototype.insertRange=function(f,h,p,g){c.prototype.insertRangeN.call(this,f,h,[p],g)},d.prototype.toPointSeries=function(f,h,p){if(f){h?h.xRange=f.xVisibleRange:h=new s.XyPointSeriesResampled(this.webAssemblyContext,f.xVisibleRange),i.Guard.notNull(p,"resamplerHelper");var g=p.resampleIntoPointSeries(this.webAssemblyContext,f,this.getNativeXValues(),this.getNativeYValues(),h.intIndexes,h.indexes,h.xValues,h.yValues,!1);return h.fifoStartIndex=g.OutputSplitIndex,h.clearIntIndexes(),h}else return new l.XyPointSeriesWrapped(this)},d.prototype.getOptions=function(f){f===void 0&&(f=!1);var h=c.prototype.getOptions.call(this,f);if(!f){var p=(0,t.vectorToArray)(this.xValues,this.webAssemblyContext),g=(0,t.vectorToArray)(this.yValues,this.webAssemblyContext),v={xValues:p,yValues:g};Object.assign(h,v)}return h},d})(o.BaseDataSeries);return Rm.XyDataSeries=u,Rm}var rie;function Bv(){return rie||(rie=1,(function(r){var e=DI&&DI.__extends||(function(){var l=function(u,c){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(d[h]=f[h])},l(u,c)};return function(u,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");l(u,c);function d(){this.constructor=u}u.prototype=c===null?Object.create(c):(d.prototype=c.prototype,new d)}})();Object.defineProperty(r,"__esModule",{value:!0}),r.switchData=r.XyFilterBase=r.EDataSeriesField=void 0;var i=Mr(),n=ki(),t=U8(),o;(function(l){l.X="x",l.Open="open",l.High="high",l.Low="low",l.Close="close",l.Y="y",l.Y1="y1",l.Z="z"})(o=r.EDataSeriesField||(r.EDataSeriesField={}));var a=(function(l){e(u,l);function u(c,d){var f=this,h,p;switch(f=l.call(this,c.webAssemblyContext,d)||this,f.field=o.Y,f.xField=o.X,f.originalSeriesProperty=c,f.field=(h=d==null?void 0:d.field)!==null&&h!==void 0?h:f.field,f.xField=(p=d==null?void 0:d.xField)!==null&&p!==void 0?p:f.xField,f.onBaseDataChanged=f.onBaseDataChanged.bind(f),c.dataChanged.subscribe(f.onBaseDataChanged),f.originalSeries.type){case n.EDataSeriesType.Xy:f.xField===o.Y&&(f.getOriginalXValues=function(){return f.originalSeries.getNativeYValues()}),f.field===o.X&&(f.getOriginalYValues=function(){return f.originalSeries.getNativeXValues()});break;case n.EDataSeriesType.Ohlc:f.getOriginalXValues=function(){return f.getValuesFromOHLC(f.xField,f.originalSeries)},f.getOriginalYValues=function(){return f.getValuesFromOHLC(f.field,f.originalSeries)};break;case n.EDataSeriesType.Xyy:f.getOriginalXValues=function(){return f.getValuesFromXyy(f.xField,f.originalSeries)},f.getOriginalYValues=function(){return f.getValuesFromXyy(f.field,f.originalSeries)};break;case n.EDataSeriesType.Xyz:f.getOriginalXValues=function(){return f.getValuesFromXyz(f.xField,f.originalSeries)},f.getOriginalYValues=function(){return f.getValuesFromXyz(f.field,f.originalSeries)};break;case n.EDataSeriesType.Hlc:f.getOriginalXValues=function(){return f.getValuesFromHlc(f.xField,f.originalSeries)},f.getOriginalYValues=function(){return f.getValuesFromHlc(f.field,f.originalSeries)};break}return f}return Object.defineProperty(u.prototype,"originalSeries",{get:function(){return this.originalSeriesProperty},enumerable:!1,configurable:!0}),u.prototype.detachFromOriginalSeries=function(){this.originalSeries.dataChanged.unsubscribe(this.onBaseDataChanged),this.originalSeriesProperty=void 0},u.prototype.delete=function(){this.originalSeriesProperty=(0,i.deleteSafe)(this.originalSeries),l.prototype.delete.call(this)},u.prototype.getOriginalXValues=function(){return this.originalSeries.getNativeXValues()},u.prototype.getOriginalYValues=function(){return this.originalSeries.getNativeYValues()},u.prototype.getOriginalCount=function(){return this.originalSeries.count()},u.prototype.onOriginalPropertyChanged=function(c){},u.prototype.filterOnAppend=function(c){this.filterAll()},u.prototype.filterOnUpdate=function(c){this.filterAll()},u.prototype.filterOnInsert=function(c,d){this.filterAll()},u.prototype.filterOnRemove=function(c,d){this.filterAll()},u.prototype.onClear=function(){this.clear()},u.prototype.onBaseDataChanged=function(c){var d=c.changeType,f=c.name,h=c.index,p=c.count;switch(d){case n.EDataChangeType.Property:this.onOriginalPropertyChanged(f);return;case n.EDataChangeType.Append:this.filterOnAppend(p);break;case n.EDataChangeType.Clear:this.onClear();break;case n.EDataChangeType.Insert:this.filterOnInsert(h,p);break;case n.EDataChangeType.Remove:this.filterOnRemove(h,p);break;case n.EDataChangeType.Update:this.filterOnUpdate(h);break}},u.prototype.getValuesFromOHLC=function(c,d){return(0,r.switchData)(c,d.getNativeXValues(),d.getNativeYValues(),d.getNativeOpenValues(),d.getNativeHighValues(),d.getNativeLowValues())},u.prototype.getValuesFromXyy=function(c,d){return(0,r.switchData)(c,d.getNativeXValues(),d.getNativeYValues(),d.getNativeY1Values())},u.prototype.getValuesFromXyz=function(c,d){return(0,r.switchData)(c,d.getNativeXValues(),d.getNativeYValues(),d.getNativeZValues())},u.prototype.getValuesFromHlc=function(c,d){return(0,r.switchData)(c,d.getNativeXValues(),d.getNativeYValues(),void 0,d.getNativeHighValues(),d.getNativeLowValues())},u})(t.XyDataSeries);r.XyFilterBase=a;var s=function(l,u,c,d,f,h){var p;switch(l){case o.X:p=u;break;case o.Close:case o.Y:p=c;break;case o.Open:case o.Y1:case o.Z:p=d;break;case o.High:p=f;break;case o.Low:p=h;break}if(!p)throw new Error("".concat(l," does not exist"));return p};r.switchData=s})(DI)),DI}var iie;function qSe(){if(iie)return AT;iie=1;var r=AT&&AT.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(u[d]=c[d])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})();Object.defineProperty(AT,"__esModule",{value:!0}),AT.HlcFilterBase=void 0;var e=Mr(),i=H8(),n=ki(),t=Bv(),o=(function(a){r(s,a);function s(l,u){var c=this,d,f;switch(c=a.call(this,l.webAssemblyContext,u)||this,c.closefield=t.EDataSeriesField.Close,c.highfield=t.EDataSeriesField.High,c.lowfield=t.EDataSeriesField.Low,c.originalSeriesProperty=l,c.closefield=(d=u==null?void 0:u.closefield)!==null&&d!==void 0?d:c.closefield,c.highfield=(f=u==null?void 0:u.highfield)!==null&&f!==void 0?f:c.highfield,c.onBaseDataChanged=c.onBaseDataChanged.bind(c),l.dataChanged.subscribe(c.onBaseDataChanged),c.originalSeries.type){case n.EDataSeriesType.Ohlc:var h=c.originalSeries;c.getOriginalYValues=function(){return(0,t.switchData)(c.closefield,h.getNativeYValues(),h.getNativeOpenValues(),h.getNativeHighValues(),h.getNativeLowValues())},c.getOriginalHighValues=function(){return(0,t.switchData)(c.highfield,h.getNativeYValues(),h.getNativeOpenValues(),h.getNativeHighValues(),h.getNativeLowValues())},c.getOriginalLowValues=function(){return(0,t.switchData)(c.lowfield,h.getNativeYValues(),h.getNativeOpenValues(),h.getNativeHighValues(),h.getNativeLowValues())};break;case n.EDataSeriesType.Xy:var p=c.originalSeries;c.getOriginalYValues=function(){return p.getNativeYValues()},c.getOriginalHighValues=function(){return p.getNativeYValues()},c.getOriginalLowValues=function(){return p.getNativeYValues()};break;case n.EDataSeriesType.Xyy:var g=c.originalSeries;c.getOriginalYValues=function(){return(0,t.switchData)(c.closefield,g.getNativeYValues(),g.getNativeY1Values())},c.getOriginalHighValues=function(){return(0,t.switchData)(c.highfield,g.getNativeYValues(),g.getNativeY1Values())},c.getOriginalLowValues=function(){return(0,t.switchData)(c.lowfield,g.getNativeYValues(),g.getNativeY1Values())};break;case n.EDataSeriesType.Xyz:var v=c.originalSeries;c.getOriginalYValues=function(){return(0,t.switchData)(c.closefield,v.getNativeYValues(),v.getNativeZValues())},c.getOriginalHighValues=function(){return(0,t.switchData)(c.highfield,v.getNativeYValues(),v.getNativeZValues())},c.getOriginalLowValues=function(){return(0,t.switchData)(c.lowfield,v.getNativeYValues(),v.getNativeZValues())};break}return c}return Object.defineProperty(s.prototype,"originalSeries",{get:function(){return this.originalSeriesProperty},enumerable:!1,configurable:!0}),s.prototype.detachFromOriginalSeries=function(){this.originalSeries.dataChanged.unsubscribe(this.onBaseDataChanged),this.originalSeriesProperty=void 0},s.prototype.delete=function(){this.originalSeriesProperty=(0,e.deleteSafe)(this.originalSeries),a.prototype.delete.call(this)},s.prototype.getOriginalXValues=function(){return this.originalSeries.getNativeXValues()},s.prototype.getOriginalYValues=function(){return this.originalSeries.getNativeYValues()},s.prototype.getOriginalHighValues=function(){return this.originalSeries.getNativeHighValues()},s.prototype.getOriginalLowValues=function(){return this.originalSeries.getNativeLowValues()},s.prototype.getOriginalCount=function(){return this.originalSeries.count()},s.prototype.onOriginalPropertyChanged=function(l){},s.prototype.filterOnAppend=function(l){this.filterAll()},s.prototype.filterOnUpdate=function(l){this.filterAll()},s.prototype.filterOnInsert=function(l,u){this.filterAll()},s.prototype.filterOnRemove=function(l,u){this.filterAll()},s.prototype.onClear=function(){this.clear()},s.prototype.onBaseDataChanged=function(l){var u=l.changeType,c=l.name,d=l.index,f=l.count;switch(u){case n.EDataChangeType.Property:this.onOriginalPropertyChanged(c);return;case n.EDataChangeType.Append:this.filterOnAppend(f);break;case n.EDataChangeType.Clear:this.onClear();break;case n.EDataChangeType.Insert:this.filterOnInsert(d,f);break;case n.EDataChangeType.Remove:this.filterOnRemove(d,f);break;case n.EDataChangeType.Update:this.filterOnUpdate(d);break}},s})(i.HlcDataSeries);return AT.HlcFilterBase=o,AT}var nie;function XSe(){if(nie)return ET;nie=1;var r=ET&&ET.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(ET,"__esModule",{value:!0}),ET.HlcCustomFilter=void 0;var e=ki(),i=qSe(),n=Qn(),t=(function(o){r(a,o);function a(s,l){var u=this,c,d,f;if(u=o.call(this,s,l)||this,s.type!==e.EDataSeriesType.Hlc)throw new Error("HlcCustomFilter only supports Hlc original series");return u.closefilterFunctionProperty=(c=l==null?void 0:l.closefilterFunction)!==null&&c!==void 0?c:u.closefilterFunctionProperty,u.highfilterFunctionProperty=(d=l==null?void 0:l.highfilterFunction)!==null&&d!==void 0?d:u.closefilterFunction,u.lowfilterFunctionProperty=(f=l==null?void 0:l.lowfilterFunction)!==null&&f!==void 0?f:u.closefilterFunction,u.getOriginalCount()>0&&(l!=null&&l.closefilterFunction||l!=null&&l.highfilterFunction||l!=null&&l.lowfilterFunction)&&u.filterAll(),u}return Object.defineProperty(a.prototype,"closefilterFunction",{get:function(){return this.closefilterFunctionProperty},set:function(s){this.closefilterFunctionProperty=s,this.filterAll()},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"highfilterFunction",{get:function(){return this.highfilterFunctionProperty},set:function(s){this.highfilterFunctionProperty=s,this.filterAll()},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"lowfilterFunction",{get:function(){return this.lowfilterFunctionProperty},set:function(s){this.lowfilterFunctionProperty=s,this.filterAll()},enumerable:!1,configurable:!0}),a.prototype.highfilterFunctionProperty=function(s,l){return l},a.prototype.lowfilterFunctionProperty=function(s,l){return l},a.prototype.closefilterFunctionProperty=function(s,l){return l},a.prototype.filterOnAppend=function(s){var l=this.filter(this.count(),s),u=l.xValues,c=l.highValues,d=l.lowValues,f=l.closeValues,h=l.metadata;this.appendRange(u,f,c,d,h)},a.prototype.filterOnUpdate=function(s){var l=this.originalSeries;this.update(s,this.highfilterFunction(s,l.getNativeHighValues().get(s)),this.lowfilterFunction(s,l.getNativeLowValues().get(s)),this.closefilterFunction(s,l.getNativeYValues().get(s)),this.originalSeries.getMetadataAt(s))},a.prototype.filterOnInsert=function(s,l){var u=this.filter(s,l),c=u.xValues,d=u.highValues,f=u.lowValues,h=u.closeValues,p=u.metadata;this.insertRange(s,c,h,d,f,p)},a.prototype.filterOnRemove=function(s,l){this.removeRange(s,l)},a.prototype.filterAll=function(){this.clear();var s=this.filter(0,this.getOriginalCount()),l=s.xValues,u=s.highValues,c=s.lowValues,d=s.closeValues,f=s.metadata;this.appendRange(l,d,u,c,f)},a.prototype.filter=function(s,l){var u=(0,n.vectorToArrayViewF64)(this.getOriginalXValues(),this.webAssemblyContext),c=(0,n.vectorToArrayViewF64)(this.getOriginalHighValues(),this.webAssemblyContext),d=(0,n.vectorToArrayViewF64)(this.getOriginalLowValues(),this.webAssemblyContext),f=(0,n.vectorToArrayViewF64)(this.getOriginalYValues(),this.webAssemblyContext),h=[],p=[],g=[],v=[],y=void 0;if(this.originalSeries.hasMetadata){y=[];for(var m=s;m<s+l;m++)h.push(u[m]),p.push(this.highfilterFunction(m,c[m])),g.push(this.lowfilterFunction(m,d[m])),v.push(this.closefilterFunction(m,f[m])),y.push(this.originalSeries.getMetadataAt(m))}else for(var m=s;m<s+l;m++)h.push(u[m]),p.push(this.highfilterFunction(m,c[m])),g.push(this.lowfilterFunction(m,d[m])),v.push(this.closefilterFunction(m,f[m]));return{xValues:h,highValues:p,lowValues:g,closeValues:v,metadata:y}},a})(i.HlcFilterBase);return ET.HlcCustomFilter=t,ET}var oie;function KSe(){if(oie)return Om;oie=1;var r=Om&&Om.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(u[d]=c[d])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})(),e=Om&&Om.__assign||function(){return e=Object.assign||function(a){for(var s,l=1,u=arguments.length;l<u;l++){s=arguments[l];for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&(a[c]=s[c])}return a},e.apply(this,arguments)};Object.defineProperty(Om,"__esModule",{value:!0}),Om.HlcScaleOffsetFilter=void 0;var i=ly(),n=ki(),t=XSe(),o=(function(a){r(s,a);function s(l,u){var c=this,d,f;if(c=a.call(this,l,u)||this,c.scaleProperty=1,c.offsetProperty=0,l.type!==n.EDataSeriesType.Hlc)throw new Error("HlcScaleOffsetFilter only supports Hlc original series");return c.scaleProperty=(d=u==null?void 0:u.scale)!==null&&d!==void 0?d:c.scaleProperty,c.offsetProperty=(f=u==null?void 0:u.offset)!==null&&f!==void 0?f:c.offsetProperty,c.getOriginalCount()>0&&c.filterAll(),c}return Object.defineProperty(s.prototype,"scale",{get:function(){return this.scaleProperty},set:function(l){this.scaleProperty=l,this.filterAll()},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"offset",{get:function(){return this.offsetProperty},set:function(l){this.offsetProperty=l,this.filterAll()},enumerable:!1,configurable:!0}),s.prototype.toJSON=function(l){l===void 0&&(l=!1);var u=this.originalSeries.toJSON(l);return e(e({},u),{filter:{type:i.EDataFilterType.HlcScaleOffset,options:{scale:this.scale,offset:this.offset}}})},s.prototype.defaultFunction=function(l,u){return u*this.scaleProperty+this.offsetProperty},s})(t.HlcCustomFilter);return Om.HlcScaleOffsetFilter=o,Om}var Mm={},DT={},RT={},Kp={},aie;function $N(){if(aie)return Kp;aie=1;var r=Kp&&Kp.__extends||(function(){var d=function(f,h){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,g){p.__proto__=g}||function(p,g){for(var v in g)Object.prototype.hasOwnProperty.call(g,v)&&(p[v]=g[v])},d(f,h)};return function(f,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");d(f,h);function p(){this.constructor=f}f.prototype=h===null?Object.create(h):(p.prototype=h.prototype,new p)}})(),e=Kp&&Kp.__assign||function(){return e=Object.assign||function(d){for(var f,h=1,p=arguments.length;h<p;h++){f=arguments[h];for(var g in f)Object.prototype.hasOwnProperty.call(f,g)&&(d[g]=f[g])}return d},e.apply(this,arguments)};Object.defineProperty(Kp,"__esModule",{value:!0}),Kp.getOHLCYRange=Kp.OhlcDataSeries=void 0;var i=oi(),n=qv(),t=xo(),o=QS(),a=Qn(),s=Wl(),l=ki(),u=(function(d){r(f,d);function f(h,p){var g=this,v=e(e({},p),{arrayCount:4,valueNames:[t.EValueName.Close,t.EValueName.Open,t.EValueName.High,t.EValueName.Low],includeInYRange:[!0,!0,!0,!0]});return g=d.call(this,h,v)||this,g.type=l.EDataSeriesType.Ohlc,v!=null&&v.xValues&&(g.appendRange(v.xValues,v.openValues,v.highValues,v.lowValues,v.closeValues,v.metadata),v!=null&&v.fifoCapacity&&(v!=null&&v.fifoStartIndex)&&(g.xValues.notifyAppend(v==null?void 0:v.fifoStartIndex),g.yValues.notifyAppend(v==null?void 0:v.fifoStartIndex),g.openValues.notifyAppend(v==null?void 0:v.fifoStartIndex),g.highValues.notifyAppend(v==null?void 0:v.fifoStartIndex),g.lowValues.notifyAppend(v==null?void 0:v.fifoStartIndex))),g}return Object.defineProperty(f.prototype,"yValues",{get:function(){return this.getNativeYValues()},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"openValues",{get:function(){return this.getNativeOpenValues()},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"highValues",{get:function(){return this.getNativeHighValues()},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"lowValues",{get:function(){return this.getNativeLowValues()},enumerable:!1,configurable:!0}),f.prototype.getNativeOpenValues=function(){return this.getNativeYValues(1)},f.prototype.getNativeHighValues=function(){return this.getNativeYValues(2)},f.prototype.getNativeLowValues=function(){return this.getNativeYValues(3)},f.prototype.getNativeCloseValues=function(){return this.getNativeYValues()},f.prototype.append=function(h,p,g,v,y,m){d.prototype.appendN.call(this,h,[y,p,g,v],m)},f.prototype.appendRange=function(h,p,g,v,y,m){d.prototype.appendRangeN.call(this,h,[y,p,g,v],m)},f.prototype.update=function(h,p,g,v,y,m){d.prototype.updateN.call(this,h,[y,p,g,v],m)},f.prototype.updateXohlc=function(h,p,g,v,y,m,b){d.prototype.updateXyN.call(this,h,p,[m,g,v,y],b)},f.prototype.insert=function(h,p,g,v,y,m,b){d.prototype.insertN.call(this,h,p,[m,g,v,y],b)},f.prototype.insertRange=function(h,p,g,v,y,m,b){d.prototype.insertRangeN.call(this,h,p,[m,g,v,y],b)},f.prototype.getWindowedYRange=function(h,p,g,v,y){g===void 0&&(g=!1),v===void 0&&(v=l.EDataSeriesValueType.Default),y===void 0&&(y=o.EYRangeMode.Visible);var m=this.getOHLCValues(v),b=m.openValues,S=m.closeValues,_=m.highValues,C=m.lowValues;if(this.count()===1){var T=Math.min(b.get(0),C.get(0)),x=Math.max(S.get(0),_.get(0));return new i.NumberRange(T,x)}var A=g?h:this.getIndicesRange(h,!1,y===o.EYRangeMode.Visible?n.ESearchMode.RoundUp:n.ESearchMode.RoundDown,y===o.EYRangeMode.Visible?n.ESearchMode.RoundDown:n.ESearchMode.RoundUp);return c(A,b,_,C)},f.prototype.getOptions=function(h){h===void 0&&(h=!1);var p=d.prototype.getOptions.call(this,h);if(!h){var g=(0,a.vectorToArray)(this.xValues,this.webAssemblyContext),v=(0,a.vectorToArray)(this.openValues,this.webAssemblyContext),y=(0,a.vectorToArray)(this.highValues,this.webAssemblyContext),m=(0,a.vectorToArray)(this.lowValues,this.webAssemblyContext),b=(0,a.vectorToArray)(this.yValues,this.webAssemblyContext),S={xValues:g,openValues:v,highValues:y,lowValues:m,closeValues:b};Object.assign(p,S)}return p},f.prototype.getOHLCValues=function(h){var p,g,v,y;switch(h){case l.EDataSeriesValueType.FinalAnimationValues:p=this.yFinalAnimationValuesArray[1],g=this.yFinalAnimationValuesArray[2],v=this.yFinalAnimationValuesArray[3],y=this.yFinalAnimationValuesArray[0];break;case l.EDataSeriesValueType.InitialAnimationValues:p=this.yInitialAnimationValuesArray[1],g=this.yInitialAnimationValuesArray[2],v=this.yInitialAnimationValuesArray[3],y=this.yInitialAnimationValuesArray[0];break;default:p=this.openValues,g=this.highValues,v=this.lowValues,y=this.yValues}return{openValues:p,highValues:g,lowValues:v,closeValues:y}},f})(s.BaseDataSeries);Kp.OhlcDataSeries=u;function c(d,f,h,p,g){var v=Number.MAX_VALUE,y=Number.NEGATIVE_INFINITY,m=Math.max(d.min,0),b=Math.min(d.max,f.size()-1);if(!(b<m)){for(var S=m;S<=b;S++){var _=h.get(S),C=p.get(S);C<v&&(v=C),_>y&&(y=_)}return new i.NumberRange(v,y)}}return Kp.getOHLCYRange=c,Kp}var sie;function ZSe(){if(sie)return RT;sie=1;var r=RT&&RT.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(RT,"__esModule",{value:!0}),RT.OhlcFilterBase=void 0;var e=Mr(),i=ki(),n=$N(),t=(function(o){r(a,o);function a(s,l){var u=o.call(this,s.webAssemblyContext,l)||this;return u.originalSeriesProperty=s,u.onBaseDataChanged=u.onBaseDataChanged.bind(u),s.dataChanged.subscribe(u.onBaseDataChanged),u}return Object.defineProperty(a.prototype,"originalSeries",{get:function(){return this.originalSeriesProperty},enumerable:!1,configurable:!0}),a.prototype.detachFromOriginalSeries=function(){this.originalSeries.dataChanged.unsubscribe(this.onBaseDataChanged),this.originalSeriesProperty=void 0},a.prototype.delete=function(){this.originalSeriesProperty=(0,e.deleteSafe)(this.originalSeries),o.prototype.delete.call(this)},a.prototype.getOriginalXValues=function(){return this.originalSeries.getNativeXValues()},a.prototype.getOriginalOpenValues=function(){return this.originalSeries.getNativeOpenValues()},a.prototype.getOriginalYValues=function(){return this.originalSeries.getNativeYValues()},a.prototype.getOriginalHighValues=function(){return this.originalSeries.getNativeHighValues()},a.prototype.getOriginalLowValues=function(){return this.originalSeries.getNativeLowValues()},a.prototype.getOriginalCount=function(){return this.originalSeries.count()},a.prototype.onOriginalPropertyChanged=function(s){},a.prototype.filterOnAppend=function(s){this.filterAll()},a.prototype.filterOnUpdate=function(s){this.filterAll()},a.prototype.filterOnInsert=function(s,l){this.filterAll()},a.prototype.filterOnRemove=function(s,l){this.filterAll()},a.prototype.onClear=function(){this.clear()},a.prototype.onBaseDataChanged=function(s){var l=s.changeType,u=s.name,c=s.index,d=s.count;switch(l){case i.EDataChangeType.Property:this.onOriginalPropertyChanged(u);return;case i.EDataChangeType.Append:this.filterOnAppend(d);break;case i.EDataChangeType.Clear:this.onClear();break;case i.EDataChangeType.Insert:this.filterOnInsert(c,d);break;case i.EDataChangeType.Remove:this.filterOnRemove(c,d);break;case i.EDataChangeType.Update:this.filterOnUpdate(c);break}},a})(n.OhlcDataSeries);return RT.OhlcFilterBase=t,RT}var lie;function JSe(){if(lie)return DT;lie=1;var r=DT&&DT.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(DT,"__esModule",{value:!0}),DT.OhlcCustomFilter=void 0;var e=ki(),i=ZSe(),n=Qn(),t=(function(o){r(a,o);function a(s,l){var u=this,c,d,f,h;if(u=o.call(this,s,l)||this,s.type!==e.EDataSeriesType.Ohlc)throw new Error("OhlcCustomFilter only supports Ohlc original series");return u.closefilterFunctionProperty=(c=l==null?void 0:l.closefilterFunction)!==null&&c!==void 0?c:u.closefilterFunctionProperty,u.openfilterFunctionProperty=(d=l==null?void 0:l.openfilterFunction)!==null&&d!==void 0?d:u.closefilterFunction,u.highfilterFunctionProperty=(f=l==null?void 0:l.highfilterFunction)!==null&&f!==void 0?f:u.closefilterFunction,u.lowfilterFunctionProperty=(h=l==null?void 0:l.lowfilterFunction)!==null&&h!==void 0?h:u.closefilterFunction,u.getOriginalCount()>0&&(l!=null&&l.closefilterFunction||l!=null&&l.openfilterFunction||l!=null&&l.highfilterFunction||l!=null&&l.lowfilterFunction)&&u.filterAll(),u}return Object.defineProperty(a.prototype,"closefilterFunction",{get:function(){return this.closefilterFunctionProperty},set:function(s){this.closefilterFunctionProperty=s,this.filterAll()},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"openfilterFunction",{get:function(){return this.openfilterFunctionProperty},set:function(s){this.openfilterFunctionProperty=s,this.filterAll()},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"highfilterFunction",{get:function(){return this.highfilterFunctionProperty},set:function(s){this.highfilterFunctionProperty=s,this.filterAll()},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"lowfilterFunction",{get:function(){return this.lowfilterFunctionProperty},set:function(s){this.lowfilterFunctionProperty=s,this.filterAll()},enumerable:!1,configurable:!0}),a.prototype.openfilterFunctionProperty=function(s,l){return l},a.prototype.highfilterFunctionProperty=function(s,l){return l},a.prototype.lowfilterFunctionProperty=function(s,l){return l},a.prototype.closefilterFunctionProperty=function(s,l){return l},a.prototype.filterOnAppend=function(s){var l=this.filter(this.count(),s),u=l.xValues,c=l.openValues,d=l.highValues,f=l.lowValues,h=l.closeValues,p=l.metadata;this.appendRange(u,c,d,f,h,p)},a.prototype.filterOnUpdate=function(s){var l=this.originalSeries;this.update(s,this.openfilterFunction(s,l.getNativeOpenValues().get(s)),this.highfilterFunction(s,l.getNativeHighValues().get(s)),this.lowfilterFunction(s,l.getNativeLowValues().get(s)),this.closefilterFunction(s,l.getNativeCloseValues().get(s)),this.originalSeries.getMetadataAt(s))},a.prototype.filterOnInsert=function(s,l){var u=this.filter(s,l),c=u.xValues,d=u.openValues,f=u.highValues,h=u.lowValues,p=u.closeValues,g=u.metadata;this.insertRange(s,c,d,f,h,p,g)},a.prototype.filterOnRemove=function(s,l){this.removeRange(s,l)},a.prototype.filterAll=function(){this.clear();var s=this.filter(0,this.getOriginalCount()),l=s.xValues,u=s.openValues,c=s.highValues,d=s.lowValues,f=s.closeValues,h=s.metadata;this.appendRange(l,u,c,d,f,h)},a.prototype.filter=function(s,l){var u=(0,n.vectorToArrayViewF64)(this.getOriginalXValues(),this.webAssemblyContext),c=(0,n.vectorToArrayViewF64)(this.getOriginalOpenValues(),this.webAssemblyContext),d=(0,n.vectorToArrayViewF64)(this.getOriginalHighValues(),this.webAssemblyContext),f=(0,n.vectorToArrayViewF64)(this.getOriginalLowValues(),this.webAssemblyContext),h=(0,n.vectorToArrayViewF64)(this.getOriginalYValues(),this.webAssemblyContext),p=[],g=[],v=[],y=[],m=[],b=void 0;if(this.originalSeries.hasMetadata){b=[];for(var S=s;S<s+l;S++)p.push(u[S]),g.push(this.openfilterFunction(S,c[S])),v.push(this.highfilterFunction(S,d[S])),y.push(this.lowfilterFunction(S,f[S])),m.push(this.closefilterFunction(S,h[S])),b.push(this.originalSeries.getMetadataAt(S))}else for(var S=s;S<s+l;S++)p.push(u[S]),g.push(this.openfilterFunction(S,c[S])),v.push(this.highfilterFunction(S,d[S])),y.push(this.lowfilterFunction(S,f[S])),m.push(this.closefilterFunction(S,h[S]));return{xValues:p,openValues:g,highValues:v,lowValues:y,closeValues:m,metadata:b}},a})(i.OhlcFilterBase);return DT.OhlcCustomFilter=t,DT}var uie;function QSe(){if(uie)return Mm;uie=1;var r=Mm&&Mm.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(u[d]=c[d])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})(),e=Mm&&Mm.__assign||function(){return e=Object.assign||function(a){for(var s,l=1,u=arguments.length;l<u;l++){s=arguments[l];for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&(a[c]=s[c])}return a},e.apply(this,arguments)};Object.defineProperty(Mm,"__esModule",{value:!0}),Mm.OhlcScaleOffsetFilter=void 0;var i=ly(),n=ki(),t=JSe(),o=(function(a){r(s,a);function s(l,u){var c=this,d,f;if(c=a.call(this,l,u)||this,c.scaleProperty=1,c.offsetProperty=0,l.type!==n.EDataSeriesType.Ohlc)throw new Error("OhlcScaleOffsetFilter only supports Ohlc original series");return c.scaleProperty=(d=u==null?void 0:u.scale)!==null&&d!==void 0?d:c.scaleProperty,c.offsetProperty=(f=u==null?void 0:u.offset)!==null&&f!==void 0?f:c.offsetProperty,c.getOriginalCount()>0&&c.filterAll(),c}return Object.defineProperty(s.prototype,"scale",{get:function(){return this.scaleProperty},set:function(l){this.scaleProperty=l,this.filterAll()},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"offset",{get:function(){return this.offsetProperty},set:function(l){this.offsetProperty=l,this.filterAll()},enumerable:!1,configurable:!0}),s.prototype.toJSON=function(l){l===void 0&&(l=!1);var u=this.originalSeries.toJSON(l);return e(e({},u),{filter:{type:i.EDataFilterType.OhlcScaleOffset,options:{scale:this.scale,offset:this.offset}}})},s.prototype.defaultFunction=function(l,u){return u*this.scaleProperty+this.offsetProperty},s})(t.OhlcCustomFilter);return Mm.OhlcScaleOffsetFilter=o,Mm}var Lm={},cie;function e_e(){if(cie)return Lm;cie=1;var r=Lm&&Lm.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(u[d]=c[d])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})(),e=Lm&&Lm.__assign||function(){return e=Object.assign||function(a){for(var s,l=1,u=arguments.length;l<u;l++){s=arguments[l];for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&(a[c]=s[c])}return a},e.apply(this,arguments)};Object.defineProperty(Lm,"__esModule",{value:!0}),Lm.XyLinearTrendFilter=void 0;var i=ly(),n=Bv(),t=Qn(),o=(function(a){r(s,a);function s(l,u){var c=a.call(this,l,u)||this;return c.getOriginalCount()>0&&c.filterAll(),c}return Object.defineProperty(s.prototype,"slope",{get:function(){return this.slopeProperty},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"intercept",{get:function(){return this.interceptProperty},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"correlation",{get:function(){return this.correlationProperty},enumerable:!1,configurable:!0}),s.prototype.toJSON=function(l){l===void 0&&(l=!1);var u=a.prototype.toJSON.call(this,l);return e(e({},u),{filter:{type:i.EDataFilterType.XyLinearTrend,options:{field:this.field,slope:this.slope,intercept:this.intercept}}})},s.prototype.filterAll=function(){for(var l=0,u=0,c=0,d=0,f=0,h=this.getOriginalCount(),p=(0,t.vectorToArrayViewF64)(this.getOriginalXValues(),this.webAssemblyContext),g=(0,t.vectorToArrayViewF64)(this.getOriginalYValues(),this.webAssemblyContext),v=0;v<this.getOriginalCount();v++){var y=g[v],m=p[v];l+=m*y,u+=m,c+=y,d+=Math.pow(m,2),f+=Math.pow(y,2)}var b=l*h,S=u*c,_=d*h,C=Math.pow(u,2);this.correlationProperty=(b-S)/Math.sqrt((_-C)*(f*h-Math.pow(c,2))),this.slopeProperty=(b-S)/(_-C);var T=this.slopeProperty*u;this.interceptProperty=(c-T)/h;for(var x=[],A=[],v=0;v<h;v++){var w=p[v];A.push(w),x.push(w*this.slopeProperty+this.interceptProperty)}this.clear(),this.appendRange(A,x)},s})(n.XyFilterBase);return Lm.XyLinearTrendFilter=o,Lm}var km={},die;function t_e(){if(die)return km;die=1;var r=km&&km.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(u[d]=c[d])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})(),e=km&&km.__assign||function(){return e=Object.assign||function(a){for(var s,l=1,u=arguments.length;l<u;l++){s=arguments[l];for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&(a[c]=s[c])}return a},e.apply(this,arguments)};Object.defineProperty(km,"__esModule",{value:!0}),km.XyMovingAverageFilter=void 0;var i=ly(),n=Bv(),t=Qn(),o=(function(a){r(s,a);function s(l,u){var c=this,d;if(c=a.call(this,l,u)||this,c.lengthProperty=30,c.lengthProperty=(d=u==null?void 0:u.length)!==null&&d!==void 0?d:c.lengthProperty,!l.dataDistributionCalculator.isSortedAscending)throw new Error("XyMovingAverageFilter requires original data to be sorted in X");return c.getOriginalCount()>0&&c.calculate(0),c}return Object.defineProperty(s.prototype,"length",{get:function(){return this.lengthProperty},set:function(l){this.lengthProperty=l,this.calculate(0)},enumerable:!1,configurable:!0}),s.prototype.toJSON=function(l){l===void 0&&(l=!1);var u=this.originalSeries.toJSON(l);return e(e({},u),{filter:{type:i.EDataFilterType.XyMovingAverage,options:{field:this.field,length:this.length}}})},s.prototype.onOriginalPropertyChanged=function(l){},s.prototype.filterOnAppend=function(l){this.calculate(this.count())},s.prototype.filterOnUpdate=function(l){var u=this.getOriginalYValues().get(l)||0;this.calculateUpdate(l,u)},s.prototype.filterOnInsert=function(l,u){this.calculate(l)},s.prototype.filterOnRemove=function(l,u){this.calculate(l)},s.prototype.filterAll=function(){this.calculate(0)},s.prototype.calculateUpdate=function(l,u){if(l<this.count()-1)this.calculate(l);else if(l>=this.length-1){for(var c=0,d=(0,t.vectorToArrayViewF64)(this.getOriginalYValues(),this.webAssemblyContext),f=l-(this.length-1);f<=l;f++)c+=d[f];this.update(l,c/this.length)}},s.prototype.calculate=function(l){var u=(0,t.vectorToArrayViewF64)(this.getOriginalXValues(),this.webAssemblyContext),c=(0,t.vectorToArrayViewF64)(this.getOriginalYValues(),this.webAssemblyContext),d=0;l<this.count()&&(l===0?this.clear():this.removeRange(l,this.count()-l));for(var f=Math.max(0,l-this.length),h=f;h<l;h++)d+=c[h]||0;var p=this.getOriginalCount(),g=[],v=[];if(this.originalSeries.dataDistributionCalculator.containsNaN)for(var h=l;h<p;h++){var y=u[h],m=c[h]||0;if(g.push(y),h>this.length-1){var b=h-this.length,S=c[b]||0;d=d+m-S,v.push(d/this.length)}else h===this.length-1?(d=d+m,v.push(d/this.length)):(d=d+m,v.push(NaN))}else for(var h=l;h<p;h++){var y=u[h],m=c[h];if(g.push(y),h>this.length-1){var b=h-this.length,S=c[b];d=d+m-S,v.push(d/this.length)}else h===this.length-1?(d=d+m,v.push(d/this.length)):(d=d+m,v.push(NaN))}this.appendRange(g,v)},s})(n.XyFilterBase);return km.XyMovingAverageFilter=o,km}var Im={},fie;function r_e(){if(fie)return Im;fie=1;var r=Im&&Im.__extends||(function(){var l=function(u,c){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(d[h]=f[h])},l(u,c)};return function(u,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");l(u,c);function d(){this.constructor=u}u.prototype=c===null?Object.create(c):(d.prototype=c.prototype,new d)}})(),e=Im&&Im.__assign||function(){return e=Object.assign||function(l){for(var u,c=1,d=arguments.length;c<d;c++){u=arguments[c];for(var f in u)Object.prototype.hasOwnProperty.call(u,f)&&(l[f]=u[f])}return l},e.apply(this,arguments)};Object.defineProperty(Im,"__esModule",{value:!0}),Im.XyRatioFilter=void 0;var i=ni(),n=ly(),t=ki(),o=Bv(),a=Qn(),s=(function(l){r(u,l);function u(c,d){var f=this,h;return f=l.call(this,c,d)||this,f.divisorField=o.EDataSeriesField.Y,i.Guard.notNull(d.divisorSeries,"divisorSeries"),f.divisorSeries=d.divisorSeries,f.divisorField=(h=d.divisorField)!==null&&h!==void 0?h:f.divisorField,f.onDivisorDataChanged=f.onDivisorDataChanged.bind(f),f.divisorSeries.dataChanged.subscribe(f.onDivisorDataChanged),f.getOriginalCount()>0&&f.filterAll(),f}return u.prototype.toJSON=function(c){c===void 0&&(c=!1);for(var d=this.originalSeries.toJSON(c),f=[],h=this.getDivisorYValues(),p=(0,a.vectorToArrayViewF64)(h,this.webAssemblyContext),g=0;g<this.divisorSeries.count();g++)f.push(p[g]);return e(e({},d),{filter:{type:n.EDataFilterType.XyRatio,options:{field:this.field,divisorSeries:f}}})},u.prototype.filterOnAppend=function(c){if(this.getOriginalCount()===this.divisorSeries.count()){var d=this.filter(this.count(),c),f=d.xValues,h=d.yValues;this.appendRange(f,h)}},u.prototype.filterOnUpdate=function(c){this.update(c,this.getOriginalYValues().get(c)/this.getDivisorYValues().get(c))},u.prototype.filterOnInsert=function(c,d){if(this.getOriginalCount()===this.divisorSeries.count()){var f=this.filter(c,d),h=f.xValues,p=f.yValues;this.insertRange(c,h,p)}},u.prototype.filterOnRemove=function(c,d){this.getOriginalCount()===this.divisorSeries.count()&&this.removeRange(c,d)},u.prototype.filterAll=function(){if(this.getOriginalCount()===this.divisorSeries.count()){this.clear();var c=this.filter(0,this.getOriginalCount()),d=c.xValues,f=c.yValues;this.appendRange(d,f)}},u.prototype.filter=function(c,d){for(var f=[],h=[],p=(0,a.vectorToArrayViewF64)(this.getOriginalXValues(),this.webAssemblyContext),g=(0,a.vectorToArrayViewF64)(this.getOriginalYValues(),this.webAssemblyContext),v=(0,a.vectorToArrayViewF64)(this.getDivisorYValues(),this.webAssemblyContext),y=c;y<c+d;y++)f.push(p[y]),h.push(g[y]/v[y]);return{xValues:f,yValues:h}},u.prototype.getDivisorYValues=function(){var c=this.divisorSeries.getNativeYValues();if(this.divisorSeries.type===t.EDataSeriesType.Xyy){var d=this.divisorSeries;c=(0,o.switchData)(this.divisorField,d.getNativeYValues(),d.getNativeY1Values())}else if(this.divisorSeries.type===t.EDataSeriesType.Xyz){var f=this.divisorSeries;c=(0,o.switchData)(this.field,f.getNativeYValues(),f.getNativeZValues())}else if(this.divisorSeries.type===t.EDataSeriesType.Ohlc){var h=this.divisorSeries;c=(0,o.switchData)(this.field,h.getNativeYValues(),h.getNativeOpenValues(),h.getNativeHighValues(),h.getNativeLowValues())}return c},u.prototype.onDivisorDataChanged=function(c){var d=c.changeType;c.name;var f=c.index,h=c.count;switch(d){case t.EDataChangeType.Append:this.filterOnAppend(h);break;case t.EDataChangeType.Clear:this.onClear();break;case t.EDataChangeType.Insert:this.filterOnInsert(f,h);break;case t.EDataChangeType.Remove:this.filterOnRemove(f,h);break;case t.EDataChangeType.Update:this.filterOnUpdate(f);break}},u})(o.XyFilterBase);return Im.XyRatioFilter=s,Im}var Nm={},MT={},hie;function i_e(){if(hie)return MT;hie=1;var r=MT&&MT.__extends||(function(){var t=function(o,a){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");t(o,a);function s(){this.constructor=o}o.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}})();Object.defineProperty(MT,"__esModule",{value:!0}),MT.XyCustomFilter=void 0;var e=Bv(),i=Qn(),n=(function(t){r(o,t);function o(a,s){var l=this,u;return l=t.call(this,a,s)||this,l.filterFunctionProperty=(u=s==null?void 0:s.filterFunction)!==null&&u!==void 0?u:l.filterFunctionProperty,l.getOriginalCount()>0&&(s!=null&&s.filterFunction)&&l.filterAll(),l}return Object.defineProperty(o.prototype,"filterFunction",{get:function(){return this.filterFunctionProperty},set:function(a){this.filterFunctionProperty=a,this.filterAll()},enumerable:!1,configurable:!0}),o.prototype.filterFunctionProperty=function(a,s){return s},o.prototype.filterOnAppend=function(a){var s=this.filter(this.count(),a),l=s.xValues,u=s.yValues,c=s.metadata;this.appendRange(l,u,c)},o.prototype.filterOnUpdate=function(a){this.update(a,this.filterFunction(a,this.getOriginalYValues().get(a)),this.originalSeries.getMetadataAt(a))},o.prototype.filterOnInsert=function(a,s){var l=this.filter(a,s),u=l.xValues,c=l.yValues,d=l.metadata;this.insertRange(a,u,c,d)},o.prototype.filterOnRemove=function(a,s){this.removeRange(a,s)},o.prototype.filterAll=function(){this.clear();var a=this.filter(0,this.getOriginalCount()),s=a.xValues,l=a.yValues,u=a.metadata;this.appendRange(s,l,u)},o.prototype.filter=function(a,s){var l=[],u=[],c=(0,i.vectorToArrayViewF64)(this.getOriginalXValues(),this.webAssemblyContext),d=(0,i.vectorToArrayViewF64)(this.getOriginalYValues(),this.webAssemblyContext),f=void 0;if(this.originalSeries.hasMetadata){f=[];for(var h=a;h<a+s;h++)l.push(c[h]),u.push(this.filterFunction(h,d[h])),f.push(this.originalSeries.getMetadataAt(h))}else for(var h=a;h<a+s;h++)l.push(c[h]),u.push(this.filterFunction(h,d[h]));return{xValues:l,yValues:u,metadata:f}},o})(e.XyFilterBase);return MT.XyCustomFilter=n,MT}var pie;function n_e(){if(pie)return Nm;pie=1;var r=Nm&&Nm.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})(),e=Nm&&Nm.__assign||function(){return e=Object.assign||function(o){for(var a,s=1,l=arguments.length;s<l;s++){a=arguments[s];for(var u in a)Object.prototype.hasOwnProperty.call(a,u)&&(o[u]=a[u])}return o},e.apply(this,arguments)};Object.defineProperty(Nm,"__esModule",{value:!0}),Nm.XyScaleOffsetFilter=void 0;var i=ly(),n=i_e(),t=(function(o){r(a,o);function a(s,l){var u=this,c,d;return u=o.call(this,s,l)||this,u.scaleProperty=1,u.offsetProperty=0,u.scaleProperty=(c=l==null?void 0:l.scale)!==null&&c!==void 0?c:u.scaleProperty,u.offsetProperty=(d=l==null?void 0:l.offset)!==null&&d!==void 0?d:u.offsetProperty,u.getOriginalCount()>0&&u.filterAll(),u}return Object.defineProperty(a.prototype,"scale",{get:function(){return this.scaleProperty},set:function(s){this.scaleProperty=s,this.filterAll()},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"offset",{get:function(){return this.offsetProperty},set:function(s){this.offsetProperty=s,this.filterAll()},enumerable:!1,configurable:!0}),a.prototype.toJSON=function(s){s===void 0&&(s=!1);var l=this.originalSeries.toJSON(s);return e(e({},l),{filter:{type:i.EDataFilterType.XyScaleOffset,options:{field:this.field,scale:this.scale,offset:this.offset}}})},a.prototype.filterFunctionProperty=function(s,l){return l*this.scaleProperty+this.offsetProperty},a})(n.XyCustomFilter);return Nm.XyScaleOffsetFilter=t,Nm}var Fm={},LT={},kT={},Zp={},gie;function qN(){if(gie)return Zp;gie=1;var r=Zp&&Zp.__extends||(function(){var p=function(g,v){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,m){y.__proto__=m}||function(y,m){for(var b in m)Object.prototype.hasOwnProperty.call(m,b)&&(y[b]=m[b])},p(g,v)};return function(g,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");p(g,v);function y(){this.constructor=g}g.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}})(),e=Zp&&Zp.__assign||function(){return e=Object.assign||function(p){for(var g,v=1,y=arguments.length;v<y;v++){g=arguments[v];for(var m in g)Object.prototype.hasOwnProperty.call(g,m)&&(p[m]=g[m])}return p},e.apply(this,arguments)};Object.defineProperty(Zp,"__esModule",{value:!0}),Zp.getYyYRange=Zp.XyyDataSeries=void 0;var i=Mr(),n=ni(),t=oi(),o=qv(),a=xo(),s=QS(),l=Oh(),u=Qn(),c=Wl(),d=ki(),f=(function(p){r(g,p);function g(v,y){var m=this,b=e(e({},y),{arrayCount:2,valueNames:[a.EValueName.Y,a.EValueName.Y1],includeInYRange:[!0,!0]});return m=p.call(this,v,b)||this,m.type=d.EDataSeriesType.Xyy,b!=null&&b.xValues&&(n.Guard.notNull(b.yValues,"baseOptions.yValues"),n.Guard.notNull(b.y1Values,"baseOptions.y1Values"),m.appendRange(b.xValues,b.yValues,b.y1Values,b.metadata),b!=null&&b.fifoCapacity&&(b!=null&&b.fifoStartIndex)&&(m.xValues.notifyAppend(b==null?void 0:b.fifoStartIndex),m.yValues.notifyAppend(b==null?void 0:b.fifoStartIndex),m.y1Values.notifyAppend(b==null?void 0:b.fifoStartIndex))),m}return Object.defineProperty(g.prototype,"yValues",{get:function(){return this.getNativeYValues()},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"y1Values",{get:function(){return this.getNativeY1Values()},enumerable:!1,configurable:!0}),g.prototype.getNativeY1Values=function(){return this.getNativeYValues(1)},g.prototype.append=function(v,y,m,b){p.prototype.appendN.call(this,v,[y,m],b)},g.prototype.appendRange=function(v,y,m,b){p.prototype.appendRangeN.call(this,v,[y,m],b)},g.prototype.update=function(v,y,m,b){p.prototype.updateN.call(this,v,[y,m],b)},g.prototype.updateXyy1=function(v,y,m,b,S){p.prototype.updateXyN.call(this,v,y,[m,b],S)},g.prototype.insert=function(v,y,m,b,S){p.prototype.insertN.call(this,v,y,[m,b],S)},g.prototype.insertRange=function(v,y,m,b,S){p.prototype.insertRangeN.call(this,v,y,[m,b],S)},g.prototype.getWindowedYRange=function(v,y,m,b,S){m===void 0&&(m=!1),b===void 0&&(b=d.EDataSeriesValueType.Default),S===void 0&&(S=s.EYRangeMode.Visible);var _=this.getYY1Values(b),C=_.yValues,T=_.y1Values;if(this.count()===1){var x=Math.min(C.get(0),T.get(0)),A=Math.max(C.get(0),T.get(0));return new t.NumberRange(x,A)}var w=m?v:this.getIndicesRange(v,!1,S===s.EYRangeMode.Visible?o.ESearchMode.RoundUp:o.ESearchMode.RoundDown,S===s.EYRangeMode.Visible?o.ESearchMode.RoundDown:o.ESearchMode.RoundUp);return h(this.webAssemblyContext,w,C,T,this.dataDistributionCalculator.containsNaN)},g.prototype.getOptions=function(v){v===void 0&&(v=!1);var y=p.prototype.getOptions.call(this,v);if(!v){var m=(0,u.vectorToArray)(this.xValues,this.webAssemblyContext),b=(0,u.vectorToArray)(this.yValues,this.webAssemblyContext),S=(0,u.vectorToArray)(this.y1Values,this.webAssemblyContext),_={xValues:m,yValues:b,y1Values:S};Object.assign(y,_)}return y},g.prototype.getYY1Values=function(v){var y,m;switch(v){case d.EDataSeriesValueType.FinalAnimationValues:y=this.yFinalAnimationValuesArray[0],m=this.yFinalAnimationValuesArray[1];break;case d.EDataSeriesValueType.InitialAnimationValues:y=this.yInitialAnimationValuesArray[0],m=this.yInitialAnimationValuesArray[1];break;default:y=this.yValues,m=this.y1Values}return{yValues:y,y1Values:m}},g})(c.BaseDataSeries);Zp.XyyDataSeries=f;function h(p,g,v,y,m){var b=Math.max(Math.floor(g.min),0),S=Math.min(Math.ceil(g.max),v.size()-1);if(!(S<b)){var _,C;try{return _=p.NumberUtil.MinMaxWithIndex(v,b,S-b+1,m),!(0,l.isRealNumber)(_.minD)||!(0,l.isRealNumber)(_.maxD)||(C=p.NumberUtil.MinMaxWithIndex(y,b,S-b+1,m),!(0,l.isRealNumber)(C.minD)||!(0,l.isRealNumber)(C.maxD))?void 0:new t.NumberRange(Math.min(_.minD,C.minD),Math.max(_.maxD,C.maxD))}finally{(0,i.deleteSafe)(_),(0,i.deleteSafe)(C)}}}return Zp.getYyYRange=h,Zp}var vie;function o_e(){if(vie)return kT;vie=1;var r=kT&&kT.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(u[d]=c[d])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})();Object.defineProperty(kT,"__esModule",{value:!0}),kT.XyyFilterBase=void 0;var e=Mr(),i=ki(),n=qN(),t=Bv(),o=(function(a){r(s,a);function s(l,u){var c=this,d,f;switch(c=a.call(this,l.webAssemblyContext,u)||this,c.yfield=t.EDataSeriesField.Y,c.y1field=t.EDataSeriesField.Y1,c.originalSeriesProperty=l,c.yfield=(d=u==null?void 0:u.yfield)!==null&&d!==void 0?d:c.yfield,c.yfield=(f=u==null?void 0:u.yfield)!==null&&f!==void 0?f:c.yfield,c.onBaseDataChanged=c.onBaseDataChanged.bind(c),l.dataChanged.subscribe(c.onBaseDataChanged),c.originalSeries.type){case i.EDataSeriesType.Ohlc:var h=c.originalSeries;c.getOriginalYValues=function(){return(0,t.switchData)(c.yfield,h.getNativeYValues(),h.getNativeOpenValues(),h.getNativeHighValues(),h.getNativeLowValues())},c.getOriginalY1Values=function(){return(0,t.switchData)(c.y1field,h.getNativeYValues(),h.getNativeOpenValues(),h.getNativeHighValues(),h.getNativeLowValues())};break;case i.EDataSeriesType.Xy:var p=c.originalSeries;c.getOriginalYValues=function(){return p.getNativeYValues()},c.getOriginalY1Values=function(){return p.getNativeYValues()};break;case i.EDataSeriesType.Xyz:var g=c.originalSeries;c.getOriginalYValues=function(){return(0,t.switchData)(c.yfield,g.getNativeYValues(),g.getNativeZValues())},c.getOriginalY1Values=function(){return(0,t.switchData)(c.y1field,g.getNativeYValues(),g.getNativeZValues())};break;case i.EDataSeriesType.Hlc:var v=c.originalSeries;c.getOriginalYValues=function(){return(0,t.switchData)(c.yfield,v.getNativeYValues(),void 0,v.getNativeHighValues(),v.getNativeLowValues())},c.getOriginalY1Values=function(){return(0,t.switchData)(c.y1field,v.getNativeYValues(),void 0,v.getNativeHighValues(),v.getNativeLowValues())};break}return c}return Object.defineProperty(s.prototype,"originalSeries",{get:function(){return this.originalSeriesProperty},enumerable:!1,configurable:!0}),s.prototype.detachFromOriginalSeries=function(){this.originalSeries.dataChanged.unsubscribe(this.onBaseDataChanged),this.originalSeriesProperty=void 0},s.prototype.delete=function(){this.originalSeriesProperty=(0,e.deleteSafe)(this.originalSeries),a.prototype.delete.call(this)},s.prototype.getOriginalXValues=function(){return this.originalSeries.getNativeXValues()},s.prototype.getOriginalYValues=function(){return this.originalSeries.getNativeYValues()},s.prototype.getOriginalY1Values=function(){return this.originalSeries.getNativeY1Values()},s.prototype.getOriginalCount=function(){return this.originalSeries.count()},s.prototype.onOriginalPropertyChanged=function(l){},s.prototype.filterOnAppend=function(l){this.filterAll()},s.prototype.filterOnUpdate=function(l){this.filterAll()},s.prototype.filterOnInsert=function(l,u){this.filterAll()},s.prototype.filterOnRemove=function(l,u){this.filterAll()},s.prototype.onClear=function(){this.clear()},s.prototype.onBaseDataChanged=function(l){var u=l.changeType,c=l.name,d=l.index,f=l.count;switch(u){case i.EDataChangeType.Property:this.onOriginalPropertyChanged(c);return;case i.EDataChangeType.Append:this.filterOnAppend(f);break;case i.EDataChangeType.Clear:this.onClear();break;case i.EDataChangeType.Insert:this.filterOnInsert(d,f);break;case i.EDataChangeType.Remove:this.filterOnRemove(d,f);break;case i.EDataChangeType.Update:this.filterOnUpdate(d);break}},s})(n.XyyDataSeries);return kT.XyyFilterBase=o,kT}var yie;function a_e(){if(yie)return LT;yie=1;var r=LT&&LT.__extends||(function(){var t=function(o,a){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");t(o,a);function s(){this.constructor=o}o.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}})();Object.defineProperty(LT,"__esModule",{value:!0}),LT.XyyCustomFilter=void 0;var e=o_e(),i=Qn(),n=(function(t){r(o,t);function o(a,s){var l=this,u,c;return l=t.call(this,a,s)||this,l.filterFunctionProperty=(u=s==null?void 0:s.filterFunction)!==null&&u!==void 0?u:l.filterFunctionProperty,l.y1filterFunctionProperty=(c=s==null?void 0:s.y1filterFunction)!==null&&c!==void 0?c:l.filterFunctionProperty,l.getOriginalCount()>0&&(s!=null&&s.filterFunction||s!=null&&s.y1filterFunction)&&l.filterAll(),l}return Object.defineProperty(o.prototype,"filterFunction",{get:function(){return this.filterFunctionProperty},set:function(a){this.filterFunctionProperty=a,this.filterAll()},enumerable:!1,configurable:!0}),o.prototype.filterFunctionProperty=function(a,s){return s},Object.defineProperty(o.prototype,"y1filterFunction",{get:function(){return this.y1filterFunctionProperty},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"y1yfilterFunction",{set:function(a){this.y1filterFunctionProperty=a,this.filterAll()},enumerable:!1,configurable:!0}),o.prototype.y1filterFunctionProperty=function(a,s){return s},o.prototype.filterOnAppend=function(a){var s=this.filter(this.count(),a),l=s.xValues,u=s.yValues,c=s.y1Values,d=s.metadata;this.appendRange(l,u,c,d)},o.prototype.filterOnUpdate=function(a){this.update(a,this.filterFunction(a,this.getOriginalYValues().get(a)),this.y1filterFunction(a,this.getOriginalY1Values().get(a)),this.originalSeries.getMetadataAt(a))},o.prototype.filterOnInsert=function(a,s){var l=this.filter(a,s),u=l.xValues,c=l.yValues,d=l.y1Values,f=l.metadata;this.insertRange(a,u,c,d,f)},o.prototype.filterOnRemove=function(a,s){this.removeRange(a,s)},o.prototype.filterAll=function(){this.clear();var a=this.filter(0,this.getOriginalCount()),s=a.xValues,l=a.yValues,u=a.y1Values,c=a.metadata;this.appendRange(s,l,u,c)},o.prototype.filter=function(a,s){var l=[],u=[],c=[],d=(0,i.vectorToArrayViewF64)(this.getOriginalXValues(),this.webAssemblyContext),f=(0,i.vectorToArrayViewF64)(this.getOriginalYValues(),this.webAssemblyContext),h=(0,i.vectorToArrayViewF64)(this.getOriginalY1Values(),this.webAssemblyContext),p=void 0;if(this.originalSeries.hasMetadata){p=[];for(var g=a;g<a+s;g++)l.push(d[g]),u.push(this.filterFunction(g,f[g])),c.push(this.y1filterFunction(g,h[g])),p.push(this.originalSeries.getMetadataAt(g))}else for(var g=a;g<a+s;g++)l.push(d[g]),u.push(this.filterFunction(g,f[g])),c.push(this.y1filterFunction(g,h[g]));return{xValues:l,yValues:u,y1Values:c,metadata:p}},o})(e.XyyFilterBase);return LT.XyyCustomFilter=n,LT}var mie;function s_e(){if(mie)return Fm;mie=1;var r=Fm&&Fm.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})(),e=Fm&&Fm.__assign||function(){return e=Object.assign||function(o){for(var a,s=1,l=arguments.length;s<l;s++){a=arguments[s];for(var u in a)Object.prototype.hasOwnProperty.call(a,u)&&(o[u]=a[u])}return o},e.apply(this,arguments)};Object.defineProperty(Fm,"__esModule",{value:!0}),Fm.XyyScaleOffsetFilter=void 0;var i=ly(),n=a_e(),t=(function(o){r(a,o);function a(s,l){var u=this,c,d;return u=o.call(this,s,l)||this,u.scaleProperty=1,u.offsetProperty=0,u.scaleProperty=(c=l==null?void 0:l.scale)!==null&&c!==void 0?c:u.scaleProperty,u.offsetProperty=(d=l==null?void 0:l.offset)!==null&&d!==void 0?d:u.offsetProperty,u.getOriginalCount()>0&&u.filterAll(),u}return Object.defineProperty(a.prototype,"scale",{get:function(){return this.scaleProperty},set:function(s){this.scaleProperty=s,this.filterAll()},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"offset",{get:function(){return this.offsetProperty},set:function(s){this.offsetProperty=s,this.filterAll()},enumerable:!1,configurable:!0}),a.prototype.toJSON=function(s){s===void 0&&(s=!1);var l=this.originalSeries.toJSON(s);return e(e({},l),{filter:{type:i.EDataFilterType.XyyScaleOffset,options:{yfield:this.yfield,y1field:this.y1field,scale:this.scale,offset:this.offset}}})},a.prototype.filterFunctionProperty=function(s,l){return l*this.scaleProperty+this.offsetProperty},a})(n.XyyCustomFilter);return Fm.XyyScaleOffsetFilter=t,Fm}var jm={},IT={},NT={},Bm={},bie;function z8(){if(bie)return Bm;bie=1;var r=Bm&&Bm.__extends||(function(){var l=function(u,c){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(d[h]=f[h])},l(u,c)};return function(u,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");l(u,c);function d(){this.constructor=u}u.prototype=c===null?Object.create(c):(d.prototype=c.prototype,new d)}})(),e=Bm&&Bm.__assign||function(){return e=Object.assign||function(l){for(var u,c=1,d=arguments.length;c<d;c++){u=arguments[c];for(var f in u)Object.prototype.hasOwnProperty.call(u,f)&&(l[f]=u[f])}return l},e.apply(this,arguments)};Object.defineProperty(Bm,"__esModule",{value:!0}),Bm.XyzDataSeries=void 0;var i=ni(),n=xo(),t=Qn(),o=Wl(),a=ki(),s=(function(l){r(u,l);function u(c,d){var f=this,h=e(e({},d),{arrayCount:2,valueNames:[n.EValueName.Y,n.EValueName.Z],includeInYRange:[!0,!1]});return f=l.call(this,c,h)||this,f.type=a.EDataSeriesType.Xyz,h!=null&&h.xValues&&(i.Guard.notNull(h.yValues,"baseOptions.yValues"),i.Guard.notNull(h.zValues,"baseOptions.zValues"),f.appendRange(h.xValues,h.yValues,h.zValues,h.metadata),h!=null&&h.fifoCapacity&&(h!=null&&h.fifoStartIndex)&&(f.xValues.notifyAppend(h==null?void 0:h.fifoStartIndex),f.yValues.notifyAppend(h==null?void 0:h.fifoStartIndex),f.zValues.notifyAppend(h==null?void 0:h.fifoStartIndex))),f}return Object.defineProperty(u.prototype,"yValues",{get:function(){return this.getNativeYValues()},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"zValues",{get:function(){return this.getNativeZValues()},enumerable:!1,configurable:!0}),u.prototype.getNativeZValues=function(){return this.getNativeYValues(1)},u.prototype.append=function(c,d,f,h){l.prototype.appendN.call(this,c,[d,f],h)},u.prototype.appendRange=function(c,d,f,h){l.prototype.appendRangeN.call(this,c,[d,f],h)},u.prototype.update=function(c,d,f,h){l.prototype.updateN.call(this,c,[d,f],h)},u.prototype.updateXyz=function(c,d,f,h,p){l.prototype.updateXyN.call(this,c,d,[f,h],p)},u.prototype.insert=function(c,d,f,h,p){l.prototype.insertN.call(this,c,d,[f,h],p)},u.prototype.insertRange=function(c,d,f,h,p){l.prototype.insertRangeN.call(this,c,d,[f,h],p)},u.prototype.getOptions=function(c){c===void 0&&(c=!1);var d=l.prototype.getOptions.call(this,c);if(!c){var f=(0,t.vectorToArray)(this.xValues,this.webAssemblyContext),h=(0,t.vectorToArray)(this.yValues,this.webAssemblyContext),p=(0,t.vectorToArray)(this.zValues,this.webAssemblyContext),g={xValues:f,yValues:h,zValues:p};Object.assign(d,g)}return d},u})(o.BaseDataSeries);return Bm.XyzDataSeries=s,Bm}var Sie;function l_e(){if(Sie)return NT;Sie=1;var r=NT&&NT.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(u[d]=c[d])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})();Object.defineProperty(NT,"__esModule",{value:!0}),NT.XyzFilterBase=void 0;var e=Mr(),i=ki(),n=z8(),t=Bv(),o=(function(a){r(s,a);function s(l,u){var c=this,d,f;switch(c=a.call(this,l.webAssemblyContext,u)||this,c.yfield=t.EDataSeriesField.Y,c.zfield=t.EDataSeriesField.Z,c.originalSeriesProperty=l,c.yfield=(d=u==null?void 0:u.yfield)!==null&&d!==void 0?d:c.yfield,c.zfield=(f=u==null?void 0:u.zfield)!==null&&f!==void 0?f:c.zfield,c.onBaseDataChanged=c.onBaseDataChanged.bind(c),l.dataChanged.subscribe(c.onBaseDataChanged),c.originalSeries.type){case i.EDataSeriesType.Ohlc:var h=c.originalSeries;c.getOriginalYValues=function(){return(0,t.switchData)(c.yfield,h.getNativeYValues(),h.getNativeOpenValues(),h.getNativeHighValues(),h.getNativeLowValues())},c.getOriginalZValues=function(){return(0,t.switchData)(c.zfield,h.getNativeYValues(),h.getNativeOpenValues(),h.getNativeHighValues(),h.getNativeLowValues())};break;case i.EDataSeriesType.Xy:var p=c.originalSeries;c.getOriginalYValues=function(){return p.getNativeYValues()},c.getOriginalZValues=function(){return p.getNativeYValues()};break;case i.EDataSeriesType.Xyy:var g=c.originalSeries;c.getOriginalYValues=function(){return(0,t.switchData)(c.yfield,g.getNativeYValues(),g.getNativeY1Values())},c.getOriginalZValues=function(){return(0,t.switchData)(c.zfield,g.getNativeYValues(),g.getNativeY1Values())};break;case i.EDataSeriesType.Hlc:var v=c.originalSeries;c.getOriginalYValues=function(){return(0,t.switchData)(c.yfield,v.getNativeYValues(),void 0,v.getNativeHighValues(),v.getNativeLowValues())},c.getOriginalZValues=function(){return(0,t.switchData)(c.zfield,v.getNativeYValues(),void 0,v.getNativeHighValues(),v.getNativeLowValues())};break}return c}return Object.defineProperty(s.prototype,"originalSeries",{get:function(){return this.originalSeriesProperty},enumerable:!1,configurable:!0}),s.prototype.detachFromOriginalSeries=function(){this.originalSeries.dataChanged.unsubscribe(this.onBaseDataChanged),this.originalSeriesProperty=void 0},s.prototype.delete=function(){this.originalSeriesProperty=(0,e.deleteSafe)(this.originalSeries),a.prototype.delete.call(this)},s.prototype.getOriginalXValues=function(){return this.originalSeries.getNativeXValues()},s.prototype.getOriginalYValues=function(){return this.originalSeries.getNativeYValues()},s.prototype.getOriginalZValues=function(){return this.originalSeries.getNativeZValues()},s.prototype.getOriginalCount=function(){return this.originalSeries.count()},s.prototype.onOriginalPropertyChanged=function(l){},s.prototype.filterOnAppend=function(l){this.filterAll()},s.prototype.filterOnUpdate=function(l){this.filterAll()},s.prototype.filterOnInsert=function(l,u){this.filterAll()},s.prototype.filterOnRemove=function(l,u){this.filterAll()},s.prototype.onClear=function(){this.clear()},s.prototype.onBaseDataChanged=function(l){var u=l.changeType,c=l.name,d=l.index,f=l.count;switch(u){case i.EDataChangeType.Property:this.onOriginalPropertyChanged(c);return;case i.EDataChangeType.Append:this.filterOnAppend(f);break;case i.EDataChangeType.Clear:this.onClear();break;case i.EDataChangeType.Insert:this.filterOnInsert(d,f);break;case i.EDataChangeType.Remove:this.filterOnRemove(d,f);break;case i.EDataChangeType.Update:this.filterOnUpdate(d);break}},s})(n.XyzDataSeries);return NT.XyzFilterBase=o,NT}var _ie;function u_e(){if(_ie)return IT;_ie=1;var r=IT&&IT.__extends||(function(){var t=function(o,a){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");t(o,a);function s(){this.constructor=o}o.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}})();Object.defineProperty(IT,"__esModule",{value:!0}),IT.XyzCustomFilter=void 0;var e=l_e(),i=Qn(),n=(function(t){r(o,t);function o(a,s){var l=this,u,c;return l=t.call(this,a,s)||this,l.filterFunctionProperty=(u=s==null?void 0:s.filterFunction)!==null&&u!==void 0?u:l.filterFunctionProperty,l.zfilterFunctionProperty=(c=s==null?void 0:s.zfilterFunction)!==null&&c!==void 0?c:l.filterFunctionProperty,l.getOriginalCount()>0&&(s!=null&&s.filterFunction||s!=null&&s.zfilterFunction)&&l.filterAll(),l}return Object.defineProperty(o.prototype,"filterFunction",{get:function(){return this.filterFunctionProperty},set:function(a){this.filterFunctionProperty=a,this.filterAll()},enumerable:!1,configurable:!0}),o.prototype.filterFunctionProperty=function(a,s){return s},Object.defineProperty(o.prototype,"zfilterFunction",{get:function(){return this.zfilterFunctionProperty},set:function(a){this.zfilterFunctionProperty=a,this.filterAll()},enumerable:!1,configurable:!0}),o.prototype.zfilterFunctionProperty=function(a,s){return s},o.prototype.filterOnAppend=function(a){var s=this.filter(this.count(),a),l=s.xValues,u=s.yValues,c=s.zValues,d=s.metadata;this.appendRange(l,u,c,d)},o.prototype.filterOnUpdate=function(a){this.update(a,this.filterFunction(a,this.getOriginalYValues().get(a)),this.zfilterFunction(a,this.getOriginalZValues().get(a)),this.originalSeries.getMetadataAt(a))},o.prototype.filterOnInsert=function(a,s){var l=this.filter(a,s),u=l.xValues,c=l.yValues,d=l.zValues,f=l.metadata;this.insertRange(a,u,c,d,f)},o.prototype.filterOnRemove=function(a,s){this.removeRange(a,s)},o.prototype.filterAll=function(){this.clear();var a=this.filter(0,this.getOriginalCount()),s=a.xValues,l=a.yValues,u=a.zValues,c=a.metadata;this.appendRange(s,l,u,c)},o.prototype.filter=function(a,s){var l=(0,i.vectorToArrayViewF64)(this.getOriginalXValues(),this.webAssemblyContext),u=(0,i.vectorToArrayViewF64)(this.getOriginalYValues(),this.webAssemblyContext),c=(0,i.vectorToArrayViewF64)(this.getOriginalZValues(),this.webAssemblyContext),d=[],f=[],h=[],p=void 0;if(this.originalSeries.hasMetadata){p=[];for(var g=a;g<a+s;g++)d.push(l[g]),f.push(this.filterFunction(g,u[g])),h.push(this.zfilterFunction(g,c[g])),p.push(this.originalSeries.getMetadataAt(g))}else for(var g=a;g<a+s;g++)d.push(l[g]),f.push(this.filterFunction(g,u[g])),h.push(this.zfilterFunction(g,c[g]));return{xValues:d,yValues:f,zValues:h,metadata:p}},o})(e.XyzFilterBase);return IT.XyzCustomFilter=n,IT}var Pie;function c_e(){if(Pie)return jm;Pie=1;var r=jm&&jm.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})(),e=jm&&jm.__assign||function(){return e=Object.assign||function(o){for(var a,s=1,l=arguments.length;s<l;s++){a=arguments[s];for(var u in a)Object.prototype.hasOwnProperty.call(a,u)&&(o[u]=a[u])}return o},e.apply(this,arguments)};Object.defineProperty(jm,"__esModule",{value:!0}),jm.XyzScaleOffsetFilter=void 0;var i=ly(),n=u_e(),t=(function(o){r(a,o);function a(s,l){var u=this,c,d;return u=o.call(this,s,l)||this,u.scaleProperty=1,u.offsetProperty=0,u.scaleProperty=(c=l==null?void 0:l.scale)!==null&&c!==void 0?c:u.scaleProperty,u.offsetProperty=(d=l==null?void 0:l.offset)!==null&&d!==void 0?d:u.offsetProperty,u.getOriginalCount()>0&&u.filterAll(),u}return Object.defineProperty(a.prototype,"scale",{get:function(){return this.scaleProperty},set:function(s){this.scaleProperty=s,this.filterAll()},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"offset",{get:function(){return this.offsetProperty},set:function(s){this.offsetProperty=s,this.filterAll()},enumerable:!1,configurable:!0}),a.prototype.toJSON=function(s){s===void 0&&(s=!1);var l=this.originalSeries.toJSON(s);return e(e({},l),{filter:{type:i.EDataFilterType.XyzScaleOffset,options:{yfield:this.yfield,zfield:this.zfield,scale:this.scale,offset:this.offset}}})},a.prototype.filterFunctionProperty=function(s,l){return l*this.scaleProperty+this.offsetProperty},a})(n.XyzCustomFilter);return jm.XyzScaleOffsetFilter=t,jm}var FT={},q5={},Cie;function oze(){return Cie||(Cie=1,Object.defineProperty(q5,"__esModule",{value:!0})),q5}var RI={},Tie;function W8(){if(Tie)return RI;Tie=1,Object.defineProperty(RI,"__esModule",{value:!0}),RI.BaseHeatmapDataSeries=void 0;var r=Jn(),e=Mr(),i=Ba(),n=ni(),t=oi(),o=$o(),a=Ld(),s=ws(),l=Oh(),u=ki(),c=KF(),d=(function(){function h(p,g){var v,y,m,b;this.dataChanged=new i.EventHandler,this.minXSpacing=0,this.arrayWidth=0,this.arrayHeight=0,this.hasDataChangesProperty=!1,this.hasNaNsProperty=!1,this.lastZMin=-1,this.lastZMax=-1,this.lastFillValuesOutOfRange=void 0,this.metadataGeneratorProperty=void 0,this.changeCountProperty=0,this.cachedZRange=void 0,this.lastChangeCountForZRange=-1,this.webAssemblyContext=p,this.id=(v=g==null?void 0:g.id)!==null&&v!==void 0?v:(0,s.generateGuid)(),this.dataSeriesNameProperty=(y=g==null?void 0:g.dataSeriesName)!==null&&y!==void 0?y:this.dataSeriesNameProperty,this.hasNaNsProperty=(m=g==null?void 0:g.containsNaN)!==null&&m!==void 0?m:this.hasNaNsProperty,this.normalizedVector=new this.webAssemblyContext.SCRTFloatVector,g!=null&&g.metadata&&("type"in g.metadata?(this.metadataGeneratorProperty=(0,r.createType)(o.EBaseType.MetadataGenerator,g.metadata.type,p,g.metadata.data),g.metadata=(b=this.metadataGeneratorProperty)===null||b===void 0?void 0:b.getMetadata()):Array.isArray(g==null?void 0:g.metadata)||(this.metadataGeneratorProperty=new c.TemplateMetadataGenerator(g==null?void 0:g.metadata),g.metadata=void 0)),this.setZValues(g==null?void 0:g.zValues,g==null?void 0:g.metadata)}return Object.defineProperty(h.prototype,"isSorted",{get:function(){return!0},set:function(p){throw new Error("setting isSorted on a heatmap series is not supported")},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"isEvenlySpaced",{get:function(){return!0},set:function(p){throw new Error("setting isEvenlySpaced on a heatmap series is not supported")},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"containsNaN",{get:function(){return!1},set:function(p){throw new Error("setting containsNaN is not supported on BaseHeatmapDataSeries")},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"dataDistributionCalculator",{get:function(){throw new Error("dataDistributionCalculator is not supported on BaseHeatmapDataSeries")},enumerable:!1,configurable:!0}),h.prototype.getNativeValue=function(p,g){throw new Error("getNativeValue not supported for HeatmapDataSeries")},Object.defineProperty(h.prototype,"hasDataChanges",{get:function(){return this.hasDataChangesProperty},enumerable:!1,configurable:!0}),h.prototype.getZValues=function(){return this.zValuesProperty},h.prototype.setZValues=function(p,g){if(!p||!p[0]){this.zValuesProperty=void 0,this.arrayHeight=0,this.arrayWidth=0,this.size=0;return}var v=p[0].length;p.forEach(function(b){if(!b)throw new Error("Each row in zValues must be defined. See how to declare a 2D array in Javascript here https://stackoverflow.com/a/966234/303612");if(b.length!==v)throw new Error("Each row in zValues must be the same length, so that the overall 2D array is square")}),g&&f(p,g);var y=p[0].length,m=p.length;this.arrayWidth=y,this.arrayHeight=m,this.size=y*m,this.zValuesProperty=p,this.setMetadata(g),this.notifyDataChanged(u.EDataChangeType.Append)},h.prototype.getZValue=function(p,g){return this.zValuesProperty[p][g]},h.prototype.setZValue=function(p,g,v,y){this.zValuesProperty[p][g]=v,this.setMetadataAt(p,g,y),this.notifyDataChanged(u.EDataChangeType.Update,g,p)},h.prototype.clear=function(){this.getIsDeleted()||(this.setZValues(void 0),this.setMetadata(void 0),this.notifyDataChanged(u.EDataChangeType.Clear,null,null))},Object.defineProperty(h.prototype,"xMin",{get:function(){return this.xRange.min},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"xMax",{get:function(){return this.xRange.max},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"yMin",{get:function(){return this.yRange.min},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"yMax",{get:function(){return this.yRange.max},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"zMin",{get:function(){return this.zRange.min},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"zMax",{get:function(){return this.zRange.max},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"xRange",{get:function(){return this.getXRange()},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"yRange",{get:function(){return this.getYRange()},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"zRange",{get:function(){return(this.cachedZRange===void 0||this.lastChangeCountForZRange!==this.changeCountProperty)&&(this.cachedZRange=this.getZRange(),this.lastChangeCountForZRange=this.changeCountProperty),this.cachedZRange},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"dataSeriesName",{get:function(){return this.dataSeriesNameProperty},set:function(p){this.dataSeriesNameProperty=p,this.notifyDataChanged(u.EDataChangeType.Property,null,null,"dataSeriesName")},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"hasValues",{get:function(){return this.arrayWidth>0&&this.arrayHeight>0},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"hasNaNs",{get:function(){return this.hasNaNsProperty},set:function(p){this.hasNaNsProperty=p,this.notifyDataChanged(u.EDataChangeType.Property,null,null,"hasNaNs")},enumerable:!1,configurable:!0}),h.prototype.count=function(){return this.arrayWidth*this.arrayHeight},h.prototype.setMetadataGenerator=function(p){var g=typeof this.metadataGeneratorProperty>"u";this.metadataGeneratorProperty=p,g&&this.setMetadata(null)},h.prototype.delete=function(){this.isDeleted=!0,this.cachedZRange=void 0,this.normalizedVector=(0,e.deleteSafe)(this.normalizedVector)},h.prototype.getIsDeleted=function(){return this.isDeleted},h.prototype.getNativeIndexes=function(){throw new Error("getNativeIndexes is invalid for heatmap type series. Try getting or setting zValues instead")},h.prototype.getNativeXValues=function(){throw new Error("getNativeXValues is invalid for heatmap type series. Try getting or setting zValues instead")},h.prototype.getNativeYValues=function(){throw new Error("getNativeYValues is invalid for heatmap type series. Try getting or setting zValues instead")},h.prototype.getWindowedYRange=function(p,g,v){return this.yRange},h.prototype.notifyDataChanged=function(p,g,v,y){this.changeCountProperty++,this.hasDataChangesProperty=!0,this.dataChanged.raiseEvent({changeType:p,index:g,yIndex:v,name:y})},h.prototype.getNormalizedVector=function(p,g){n.Guard.notNull(p,"colorMap"),n.Guard.argumentIsRealNumber(p.minimum,"colorMap.minimum"),n.Guard.argumentIsRealNumber(p.maximum,"colorMap.maximum");var v=this.arrayWidth*this.arrayHeight;return(this.hasDataChangesProperty||v!==this.normalizedVector.size()||p.minimum!==this.lastZMin||p.maximum!==this.lastZMax||g!==this.lastFillValuesOutOfRange)&&(this.recreateNormalizedVector(p.minimum,p.maximum,g),this.lastZMin=p.minimum,this.lastZMax=p.maximum,this.lastFillValuesOutOfRange=g,this.hasDataChangesProperty=!1),this.normalizedVector},h.prototype.recreateNormalizedVector=function(p,g,v){var y=this.arrayWidth*this.arrayHeight;this.normalizedVector.clear(),this.normalizedVector.resizeFast(y);var m=this.hasNaNs?p-(g-p)/128:p;if(!(0,l.isRealNumber)(m))throw Error("Can not create newZMin for try to use different zMin and zMax values");for(var b=0,S=1/(g-m),_=new Float32Array(this.arrayWidth),C=0;C<this.arrayHeight;C++){for(var T=0;T<this.arrayWidth;T++){var x=this.zValuesProperty[C][T],A=x-m;x!==x?A=0:A<p-m?A=v?p-m:0:A>g-m&&(A=v?g-m:0);var w=A*S;_[T]=w}(0,a.memCopyFloat32)(this.webAssemblyContext,_,this.normalizedVector,b),b+=this.arrayWidth}},h.prototype.getMetadataAt=function(p,g){if(this.validateIndexes(p,g),!!this.metadataProperty)return this.metadataProperty[p][g]},h.prototype.getMetadataHeight=function(){return this.metadataProperty?this.metadataProperty.length:this.arrayHeight},h.prototype.getMetadataWidth=function(){return this.metadataProperty?this.metadataProperty[0].length:this.arrayWidth},h.prototype.toJSON=function(p){p===void 0&&(p=!1);var g=this.getOptions(p);return{type:this.type,options:g}},h.prototype.getIndicesRange=function(p,g,v,y){},Object.defineProperty(h.prototype,"changeCount",{get:function(){return this.changeCountProperty},enumerable:!1,configurable:!0}),h.prototype.getOptions=function(p){p===void 0&&(p=!1);var g={id:this.id,containsNaN:this.hasNaNs,dataSeriesName:this.dataSeriesName,zValues:p?void 0:this.zValuesProperty,metadata:this.metadataGeneratorProperty?this.metadataGeneratorProperty.toJSON():p?void 0:this.metadataProperty};return g},h.prototype.getZRange=function(){var p=this.getZValues();if(p){for(var g=Number.MAX_VALUE,v=-Number.MAX_VALUE,y=0;y<this.arrayHeight;++y)for(var m=0;m<this.arrayWidth;m++){var b=p[y][m];b<g&&(g=b),b>v&&(v=b)}return new t.NumberRange(g,v)}},h.prototype.validateIndexes=function(p,g){if(Math.round(p)!==p)throw Error("yIndex must be an integer");if(Math.round(g)!==g)throw Error("xIndex must be an integer");if(p<0||p>=this.arrayHeight)throw new Error("yIndex is out of range");if(g<0||g>=this.arrayWidth)throw new Error("xIndex is out of range")},h.prototype.setMetadata=function(p){if(!p&&this.metadataGeneratorProperty){p=[];for(var g=0;g<this.arrayHeight;g++){p[g]=[];for(var v=0;v<this.arrayWidth;v++)p[g][v]=this.metadataGeneratorProperty.getSingleMetadata()}}this.metadataProperty=p},h.prototype.setMetadataAt=function(p,g,v){v&&(this.validateIndexes(p,g),this.fillMetadataIfUndefined(),this.metadataProperty[p][g]=v)},h.prototype.fillMetadataIfUndefined=function(){if(this.metadataProperty===void 0)for(var p=Array(this.arrayHeight).fill(void 0),g=0;g<this.arrayHeight;g++)p[g]=Array(this.arrayWidth).fill(void 0)},h})();RI.BaseHeatmapDataSeries=d;var f=function(h,p){n.Guard.arraysSameLengthArr([{arg:h,name:"zValues"},{arg:p,name:"metadata"}]);for(var g=0;g<h.length;g++)n.Guard.arraysSameLengthArr([{arg:h[g],name:"zValues[".concat(g,"]")},{arg:p[g],name:"metadata[".concat(g,"]")}])};return RI}var xie;function d_e(){if(xie)return FT;xie=1;var r=FT&&FT.__extends||(function(){var c=function(d,f){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(h[g]=p[g])},c(d,f)};return function(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");c(d,f);function h(){this.constructor=d}d.prototype=f===null?Object.create(f):(h.prototype=f.prototype,new h)}})();Object.defineProperty(FT,"__esModule",{value:!0}),FT.NonUniformHeatmapDataSeries=void 0;var e=Mr(),i=ni(),n=oi(),t=oze(),o=Ld(),a=Wl(),s=W8(),l=ki(),u=(function(c){r(d,c);function d(f,h){var p=c.call(this,f,h)||this;if(p.type=l.EDataSeriesType.HeatmapNonUniform,i.Guard.notNull(h.xCellOffsets,"options.xCellOffsets"),i.Guard.notNull(h.yCellOffsets,"options.yCellOffsets"),!Array.isArray(h.xCellOffsets))p.xCellOffsetsGeneratorFunction=h.xCellOffsets;else{if(h.xCellOffsets.length<p.arrayWidth+1)throw new Error("xCellOffsets array should not be smaller than zValues width!");p.xCellOffsetsProperty=h.xCellOffsets}if(!Array.isArray(h.yCellOffsets))p.yCellOffsetsGeneratorFunction=h.yCellOffsets;else{if(h.yCellOffsets.length<p.arrayHeight+1)throw new Error("yCellOffsets array should not be smaller than zValues height!");p.yCellOffsetsProperty=h.yCellOffsets}return p.nativeXOffsetsProperty=new p.webAssemblyContext.SCRTDoubleVector,p.nativeYOffsetsProperty=new p.webAssemblyContext.SCRTDoubleVector,p.getZValues()&&p.notifyDataChanged(l.EDataChangeType.Append),p}return d.prototype.getXCellSizes=function(f){return this.xCellSizesProperty||(this.xCellSizesProperty=this.calculateCellSizes(this.xCellOffsetsProperty,f)),this.xCellSizesProperty},d.prototype.getYCellSizes=function(){return this.yCellSizesProperty||(this.yCellSizesProperty=this.calculateCellSizes(this.yCellOffsetsProperty,function(f){return f})),this.yCellSizesProperty},Object.defineProperty(d.prototype,"xCellOffsets",{get:function(){return this.xCellOffsetsProperty},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"yCellOffsets",{get:function(){return this.yCellOffsetsProperty},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"nativeXCellOffsets",{get:function(){return this.nativeXOffsetsProperty||(this.nativeXOffsetsProperty=new t.SCRTDoubleVector,(0,o.appendDoubleVectorFromJsArray)(this.webAssemblyContext,this.nativeXOffsetsProperty,this.xCellOffsets)),this.nativeXOffsetsProperty},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"nativeYCellOffsets",{get:function(){return this.nativeYOffsetsProperty||(this.nativeYOffsetsProperty=new t.SCRTDoubleVector,(0,o.appendDoubleVectorFromJsArray)(this.webAssemblyContext,this.nativeYOffsetsProperty,this.yCellOffsets)),this.nativeYOffsetsProperty},enumerable:!1,configurable:!0}),d.prototype.getXValue=function(f){var h=this.xCellOffsetsProperty[f];return h},d.prototype.getYValue=function(f){var h=this.yCellOffsetsProperty[f];return h},d.prototype.notifyDataChanged=function(f,h){!this.xCellOffsets&&!this.xCellOffsetsGeneratorFunction||!this.yCellOffsets&&!this.yCellOffsetsGeneratorFunction||(f===l.EDataChangeType.Append&&(this.xCellOffsetsGeneratorFunction&&(this.xCellOffsetsProperty=this.mapCellSizes(this.arrayWidth,this.xCellOffsetsGeneratorFunction),this.xCellSizesProperty=void 0),this.yCellOffsetsGeneratorFunction&&(this.yCellOffsetsProperty=this.mapCellSizes(this.arrayHeight,this.yCellOffsetsGeneratorFunction),this.yCellSizesProperty=void 0),this.nativeXOffsetsProperty.clear(),this.nativeYOffsetsProperty.clear(),(0,o.appendDoubleVectorFromJsArray)(this.webAssemblyContext,this.nativeXOffsetsProperty,this.xCellOffsetsProperty),(0,o.appendDoubleVectorFromJsArray)(this.webAssemblyContext,this.nativeYOffsetsProperty,this.yCellOffsetsProperty)),this.xRangeProperty=new n.NumberRange(this.getXValue(0),this.getXValue(this.arrayWidth)),this.yRangeProperty=new n.NumberRange(this.getYValue(0),this.getYValue(this.arrayHeight)),c.prototype.notifyDataChanged.call(this,f,h))},d.prototype.getXRange=function(){return this.xRangeProperty},d.prototype.getYRange=function(){return this.yRangeProperty},d.prototype.getXIndicesRange=function(f,h,p,g){return(0,a.getIndicesRange)(this.webAssemblyContext,this.nativeXCellOffsets,f,!0)},d.prototype.getYIndicesRange=function(f,h,p,g){return(0,a.getIndicesRange)(this.webAssemblyContext,this.nativeYCellOffsets,f,!0)},d.prototype.delete=function(){c.prototype.delete.call(this),this.nativeXOffsetsProperty=(0,e.deleteSafe)(this.nativeXOffsetsProperty),this.nativeYOffsetsProperty=(0,e.deleteSafe)(this.nativeYOffsetsProperty)},d.prototype.getOptions=function(f){var h=c.prototype.getOptions.call(this,f),p={xCellOffsets:this.xCellOffsetsProperty,yCellOffsets:this.yCellOffsetsProperty};return Object.assign(h,p)},d.prototype.mapCellSizes=function(f,h){for(var p=[],g=f+1,v=0;v<g;++v)p.push(h(v));return p},d.prototype.calculateCellSizes=function(f,h){if(!f||f.length===0)return[];for(var p=f.length,g=h(f[p-1])-h(f[0]),v=[],y=0;y<p-1;++y){var m=h(f[y+1])-h(f[y]);v.push(m/g)}return v},d})(s.BaseHeatmapDataSeries);return FT.NonUniformHeatmapDataSeries=u,FT}var jT={},Eie;function G8(){if(Eie)return jT;Eie=1;var r=jT&&jT.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(jT,"__esModule",{value:!0}),jT.UniformHeatmapDataSeries=void 0;var e=oi(),i=W8(),n=ki(),t=(function(o){r(a,o);function a(s,l){var u=o.call(this,s,l)||this;return u.type=n.EDataSeriesType.HeatmapUniform,u.xStartProperty=l.xStart,u.xStepProperty=l.xStep,u.yStartProperty=l.yStart,u.yStepProperty=l.yStep,u.xRangeProperty=new e.NumberRange(u.xStart,u.getXValue(u.arrayWidth)),u.yRangeProperty=new e.NumberRange(u.yStart,u.getYValue(u.arrayHeight)),u}return Object.defineProperty(a.prototype,"xStart",{get:function(){return this.xStartProperty},set:function(s){this.xStartProperty=s,this.notifyDataChanged(n.EDataChangeType.Update)},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"xStep",{get:function(){return this.xStepProperty},set:function(s){this.xStepProperty=s,this.notifyDataChanged(n.EDataChangeType.Update)},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"yStart",{get:function(){return this.yStartProperty},set:function(s){this.yStartProperty=s,this.notifyDataChanged(n.EDataChangeType.Update)},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"yStep",{get:function(){return this.yStepProperty},set:function(s){this.yStepProperty=s,this.notifyDataChanged(n.EDataChangeType.Update)},enumerable:!1,configurable:!0}),a.prototype.getXValue=function(s){var l=this.xStep*s;return this.xStart+l},a.prototype.getYValue=function(s){var l=this.yStep*s;return this.yStart+l},a.prototype.notifyDataChanged=function(s,l){this.xRangeProperty=new e.NumberRange(this.xStart,this.getXValue(this.arrayWidth)),this.yRangeProperty=new e.NumberRange(this.yStart,this.getYValue(this.arrayHeight)),o.prototype.notifyDataChanged.call(this,s,l)},a.prototype.getXRange=function(){return this.xRangeProperty},a.prototype.getYRange=function(){return this.yRangeProperty},a.prototype.getOptions=function(s){var l=o.prototype.getOptions.call(this,s),u={xStart:this.xStart,xStep:this.xStep,yStart:this.yStart,yStep:this.yStep};return Object.assign(l,u)},a})(i.BaseHeatmapDataSeries);return jT.UniformHeatmapDataSeries=t,jT}var Vm={},Aie;function Y8(){if(Aie)return Vm;Aie=1;var r=Vm&&Vm.__extends||(function(){var s=function(l,u){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(c[f]=d[f])},s(l,u)};return function(l,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");s(l,u);function c(){this.constructor=l}l.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}})(),e=Vm&&Vm.__assign||function(){return e=Object.assign||function(s){for(var l,u=1,c=arguments.length;u<c;u++){l=arguments[u];for(var d in l)Object.prototype.hasOwnProperty.call(l,d)&&(s[d]=l[d])}return s},e.apply(this,arguments)};Object.defineProperty(Vm,"__esModule",{value:!0}),Vm.XDataSeries=void 0;var i=oi(),n=Qn(),t=Wl(),o=ki(),a=(function(s){r(l,s);function l(u,c){var d=this,f=e(e({},c),{arrayCount:0});return d=s.call(this,u,f)||this,d.type=o.EDataSeriesType.X,f!=null&&f.xValues&&(d.appendRange(f.xValues,f.metadata),f!=null&&f.fifoCapacity&&(f!=null&&f.fifoStartIndex)&&d.xValues.notifyAppend(f==null?void 0:f.fifoStartIndex)),d}return l.prototype.append=function(u,c){s.prototype.appendN.call(this,u,[],c,void 0)},l.prototype.appendRange=function(u,c){s.prototype.appendRangeN.call(this,u,[],c)},l.prototype.updateX=function(u,c,d){s.prototype.updateXyN.call(this,u,c,[],d)},l.prototype.insert=function(u,c,d){s.prototype.insertN.call(this,u,c,[],d)},l.prototype.insertRange=function(u,c,d){s.prototype.insertRangeN.call(this,u,c,[],d)},l.prototype.getWindowedYRange=function(u,c,d,f,h){return new i.NumberRange(0,1)},l.prototype.getOptions=function(u){u===void 0&&(u=!1);var c=s.prototype.getOptions.call(this,u);if(!u){var d=(0,n.vectorToArray)(this.xValues,this.webAssemblyContext),f={xValues:d,yValues:void 0};Object.assign(c,f)}return c},l})(t.BaseDataSeries);return Vm.XDataSeries=a,Vm}var Hm={},BT={},wie;function f_e(){if(wie)return BT;wie=1;var r=BT&&BT.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(u[d]=c[d])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})();Object.defineProperty(BT,"__esModule",{value:!0}),BT.XyNPointSeriesResampled=void 0;var e=$n(),i=xo(),n=ki(),t=G1(),o=(function(a){r(s,a);function s(l,u,c,d){c===void 0&&(c=1);var f=a.call(this)||this;f.type=n.EDataSeriesType.XyN,f.subSeries=[],f.arrayCount=1,f.resampled=!0,f.wasmContext=l,f.arrayCount=c,f.valueNames=d??(0,i.generateValueNamesForDataSeries)(f.arrayCount);for(var h=0;h<f.arrayCount;h++)f.subSeries.push(new t.XyPointSeriesResampled(l,u,f.valueNames[h]));return f.xRange=u,f}return Object.defineProperty(s.prototype,"intIndexes",{get:function(){return this.subSeries[0].intIndexes},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"indexes",{get:function(){return this.subSeries[0].indexes},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"xValues",{get:function(){return this.subSeries[0].xValues},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"count",{get:function(){return this.subSeries[0].xValues.size()},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"yValues",{get:function(){return this.subSeries[0].yValues},enumerable:!1,configurable:!0}),s.prototype.getYValues=function(l){return this.subSeries[0].getYValues(l)},s.prototype.getYValuesByName=function(l){return this.subSeries[0].getYValuesByName(l)},s.prototype.getSubSeriesByName=function(l){var u=this.valueNames.indexOf(l);if(u>=0)return this.subSeries[u]},s.prototype.delete=function(){this.subSeries.forEach(function(l){return l.delete()}),this.subSeries.length=0,this.wasmContext=void 0},s.prototype.clearIntIndexes=function(){},s})(e.DeletableEntity);return BT.XyNPointSeriesResampled=o,BT}var Oie;function h_e(){if(Oie)return Hm;Oie=1;var r=Hm&&Hm.__extends||(function(){var c=function(d,f){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(h[g]=p[g])},c(d,f)};return function(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");c(d,f);function h(){this.constructor=d}d.prototype=f===null?Object.create(f):(h.prototype=f.prototype,new h)}})(),e=Hm&&Hm.__assign||function(){return e=Object.assign||function(c){for(var d,f=1,h=arguments.length;f<h;f++){d=arguments[f];for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(c[p]=d[p])}return c},e.apply(this,arguments)};Object.defineProperty(Hm,"__esModule",{value:!0}),Hm.XyNDataSeries=void 0;var i=ni(),n=Qn(),t=oy(),o=Wl(),a=ki(),s=iy(),l=f_e(),u=(function(c){r(d,c);function d(f,h){var p=this,g,v,y,m=e(e({},h),{arrayCount:(v=(g=h.yValuesArray)===null||g===void 0?void 0:g.length)!==null&&v!==void 0?v:h.arrayCount});if(p=c.call(this,f,m)||this,p.type=a.EDataSeriesType.XyN,!m.arrayCount&&!m.yValuesArray)throw new Error("XyNDataSeries requres either arrayCount or yValuesArray to initialize the size");return p.resamplingModes=(y=m==null?void 0:m.resamplingModes)!==null&&y!==void 0?y:p.valueNames.map(function(b){return t.EResamplingMode.Auto}),m!=null&&m.xValues&&(m!=null&&m.yValuesArray)&&(p.appendRangeN(m.xValues,m.yValuesArray,m.metadata),m!=null&&m.fifoCapacity&&(m!=null&&m.fifoStartIndex)&&(p.xValues.notifyAppend(m==null?void 0:m.fifoStartIndex),p.yValuesArray.forEach(function(b){b.notifyAppend(m==null?void 0:m.fifoStartIndex)}))),p}return d.prototype.notifyDataChanged=function(f,h,p,g){this.resamplingParams=void 0,c.prototype.notifyDataChanged.call(this,f,h,p,g)},d.prototype.toPointSeries=function(f,h,p){if(f&&(f.dataIsFifo||f.resamplingMode!==t.EResamplingMode.None)){if(this.pointSeries?this.pointSeries.xRange=f.xVisibleRange:this.pointSeries=new l.XyNPointSeriesResampled(this.webAssemblyContext,f.xVisibleRange,this.arrayCount,this.valueNames),!this.resamplingParams)this.resamplingParams=f;else if(this.resamplingParams.indexesRange.equals(f.indexesRange)&&this.resamplingParams.precision==f.precision&&this.resamplingParams.viewportSize===f.viewportSize)return this.pointSeries;this.resamplingParams=f;var g=this.pointSeries;i.Guard.notNull(p,"resamplerHelper");for(var v=0;v<this.arrayCount;v++){var y=g.subSeries[v],m=f.clone({resamplingMode:this.resamplingModes[v]}),b=p.resampleIntoPointSeries(this.webAssemblyContext,m,this.getNativeXValues(),this.getNativeYValues(v),y.intIndexes,y.indexes,y.xValues,y.yValues,!1);y.fifoStartIndex=b.OutputSplitIndex,y.clearIntIndexes()}return this.pointSeries}else return new s.BasePointSeriesWrapped(this)},d.prototype.getOptions=function(f){f===void 0&&(f=!1);var h=c.prototype.getOptions.call(this,f);if(!f){for(var p=(0,n.vectorToArray)(this.xValues,this.webAssemblyContext),g=[],v=0;v<this.arrayCount;v++)g[v]=(0,n.vectorToArray)(this.yValuesArray[v],this.webAssemblyContext);var y={xValues:p,yValuesArray:g,resamplingModes:this.resamplingModes,yValues:void 0};Object.assign(h,y)}return h},d})(o.BaseDataSeries);return Hm.XyNDataSeries=u,Hm}var Um={},Die;function p_e(){if(Die)return Um;Die=1;var r=Um&&Um.__extends||(function(){var l=function(u,c){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(d[h]=f[h])},l(u,c)};return function(u,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");l(u,c);function d(){this.constructor=u}u.prototype=c===null?Object.create(c):(d.prototype=c.prototype,new d)}})(),e=Um&&Um.__spreadArray||function(l,u,c){if(c||arguments.length===2)for(var d=0,f=u.length,h;d<f;d++)(h||!(d in u))&&(h||(h=Array.prototype.slice.call(u,0,d)),h[d]=u[d]);return l.concat(h||Array.prototype.slice.call(u))};Object.defineProperty(Um,"__esModule",{value:!0}),Um.XyTextDataSeries=void 0;var i=ni(),n=xf(),t=Qn(),o=Wl(),a=ki(),s=(function(l){r(u,l);function u(c,d){var f=l.call(this,c,d)||this;return f.type=a.EDataSeriesType.XyText,f.textValuesProperty=[],d!=null&&d.xValues&&(i.Guard.notNull(d.yValues,"options.yValues"),f.appendRange(d.xValues,d.yValues,d.textValues,d.metadata)),f}return Object.defineProperty(u.prototype,"textValues",{get:function(){return this.textValuesProperty},enumerable:!1,configurable:!0}),u.prototype.getTextValue=function(c){if(!this.fifoCapacity)return this.textValuesProperty[c];if(this.fifoSweeping)return this.fifoCapacity-c<this.fifoSweepingGap?"":this.textValuesProperty[c];var d=(this.xValues.getStartIndex()+c)%this.fifoCapacity;return this.textValuesProperty[d]},u.prototype.append=function(c,d,f,h){var p=this,g=function(){p.fifoCapacity&&p.count()===p.fifoCapacity?p.textValuesProperty[p.xValues.getStartIndex()]=f:p.textValuesProperty.push(f)};l.prototype.appendN.call(this,c,[d],h,g)},u.prototype.appendRange=function(c,d,f,h){var p=this,g=function(){p.fifoCapacity?(0,n.appendRangeFifo)(f,p.textValuesProperty,p.fifoCapacity,p.xValues.getStartIndex()):p.textValuesProperty=p.textValuesProperty.concat(f)};l.prototype.appendRangeN.call(this,c,[d],h,g)},u.prototype.update=function(c,d,f,h){var p=this,g=function(){return p.textValuesProperty[c]=f};l.prototype.updateN.call(this,c,[d],h,g)},u.prototype.updateXyText=function(c,d,f,h,p){var g=this,v=function(){return g.textValuesProperty[c]=h};l.prototype.updateXyN.call(this,c,d,[f],p,v)},u.prototype.insert=function(c,d,f,h,p){var g=this,v=function(){return g.textValuesProperty.splice(c,0,h)};l.prototype.insertN.call(this,c,d,[f],p,v)},u.prototype.insertRange=function(c,d,f,h,p){var g=this,v=function(){var y;return(y=g.textValuesProperty).splice.apply(y,e([c,0],h,!1))};l.prototype.insertRangeN.call(this,c,d,[f],p,v)},u.prototype.removeAt=function(c){this.getIsDeleted()||(this.textValuesProperty.splice(c,1),l.prototype.removeAt.call(this,c))},u.prototype.removeRange=function(c,d){this.getIsDeleted()||(this.textValuesProperty.splice(c,d),l.prototype.removeRange.call(this,c,d))},u.prototype.clear=function(){this.getIsDeleted()||(this.textValuesProperty=[],l.prototype.clear.call(this))},Object.defineProperty(u.prototype,"yValues",{get:function(){return this.getNativeYValues()},enumerable:!1,configurable:!0}),u.prototype.getOptions=function(c){c===void 0&&(c=!1);var d=l.prototype.getOptions.call(this);if(!c){var f=(0,t.vectorToArray)(this.xValues,this.webAssemblyContext),h=(0,t.vectorToArray)(this.yValues,this.webAssemblyContext),p={xValues:f,yValues:h,textValues:this.textValuesProperty};Object.assign(d,p)}return d},u})(o.BaseDataSeries);return Um.XyTextDataSeries=s,Um}var zm={},Rie;function g_e(){if(Rie)return zm;Rie=1;var r=zm&&zm.__extends||(function(){var l=function(u,c){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(d[h]=f[h])},l(u,c)};return function(u,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");l(u,c);function d(){this.constructor=u}u.prototype=c===null?Object.create(c):(d.prototype=c.prototype,new d)}})(),e=zm&&zm.__assign||function(){return e=Object.assign||function(l){for(var u,c=1,d=arguments.length;c<d;c++){u=arguments[c];for(var f in u)Object.prototype.hasOwnProperty.call(u,f)&&(l[f]=u[f])}return l},e.apply(this,arguments)};Object.defineProperty(zm,"__esModule",{value:!0}),zm.XyxDataSeries=void 0;var i=ni(),n=xo(),t=Qn(),o=Wl(),a=ki(),s=(function(l){r(u,l);function u(c,d){var f=this,h=e(e({},d),{arrayCount:2,valueNames:[n.EValueName.Y,n.EValueName.X1],includeInYRange:[!0,!1]});return f=l.call(this,c,h)||this,f.type=a.EDataSeriesType.Xyx,h!=null&&h.xValues&&(i.Guard.notNull(h.yValues,"baseOptions.yValues"),i.Guard.notNull(h.x1Values,"baseOptions.x1Values"),f.appendRange(h.xValues,h.yValues,h.x1Values,h.metadata),h!=null&&h.fifoCapacity&&(h!=null&&h.fifoStartIndex)&&(f.xValues.notifyAppend(h==null?void 0:h.fifoStartIndex),f.yValues.notifyAppend(h==null?void 0:h.fifoStartIndex),f.x1Values.notifyAppend(h==null?void 0:h.fifoStartIndex))),f}return Object.defineProperty(u.prototype,"yValues",{get:function(){return this.getNativeYValues()},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"x1Values",{get:function(){return this.getNativeYValues(1)},enumerable:!1,configurable:!0}),u.prototype.append=function(c,d,f,h){l.prototype.appendN.call(this,c,[d,f],h)},u.prototype.appendRange=function(c,d,f,h){l.prototype.appendRangeN.call(this,c,[d,f],h)},u.prototype.update=function(c,d,f,h){l.prototype.updateN.call(this,c,[d,f],h)},u.prototype.updateXyz=function(c,d,f,h,p){l.prototype.updateXyN.call(this,c,d,[f,h],p)},u.prototype.insert=function(c,d,f,h,p){l.prototype.insertN.call(this,c,d,[f,h],p)},u.prototype.insertRange=function(c,d,f,h,p){l.prototype.insertRangeN.call(this,c,d,[f,h],p)},u.prototype.getOptions=function(c){c===void 0&&(c=!1);var d=l.prototype.getOptions.call(this,c);if(!c){var f=(0,t.vectorToArray)(this.xValues,this.webAssemblyContext),h=(0,t.vectorToArray)(this.yValues,this.webAssemblyContext),p=(0,t.vectorToArray)(this.x1Values,this.webAssemblyContext),g={xValues:f,yValues:h,x1Values:p};Object.assign(d,g)}return d},u})(o.BaseDataSeries);return zm.XyxDataSeries=s,zm}var Wm={},Mie;function v_e(){if(Mie)return Wm;Mie=1;var r=Wm&&Wm.__extends||(function(){var f=function(h,p){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,v){g.__proto__=v}||function(g,v){for(var y in v)Object.prototype.hasOwnProperty.call(v,y)&&(g[y]=v[y])},f(h,p)};return function(h,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");f(h,p);function g(){this.constructor=h}h.prototype=p===null?Object.create(p):(g.prototype=p.prototype,new g)}})(),e=Wm&&Wm.__assign||function(){return e=Object.assign||function(f){for(var h,p=1,g=arguments.length;p<g;p++){h=arguments[p];for(var v in h)Object.prototype.hasOwnProperty.call(h,v)&&(f[v]=h[v])}return f},e.apply(this,arguments)};Object.defineProperty(Wm,"__esModule",{value:!0}),Wm.XyxyDataSeries=void 0;var i=Mr(),n=ni(),t=oi(),o=qv(),a=xo(),s=Oh(),l=Qn(),u=Wl(),c=ki(),d=(function(f){r(h,f);function h(p,g){var v=this,y=e(e({},g),{arrayCount:3,valueNames:[a.EValueName.Y,a.EValueName.X1,a.EValueName.Y1],includeInYRange:[!0,!1,!0]});return v=f.call(this,p,y)||this,v.type=c.EDataSeriesType.Xyxy,y!=null&&y.xValues&&(n.Guard.notNull(y.yValues,"baseOptions.yValues"),n.Guard.notNull(y.x1Values,"baseOptions.x1Values"),n.Guard.notNull(y.y1Values,"baseOptions.y1Values"),v.appendRange(y.xValues,y.yValues,y.x1Values,y.y1Values,y.metadata),y!=null&&y.fifoCapacity&&(y!=null&&y.fifoStartIndex)&&(v.xValues.notifyAppend(y==null?void 0:y.fifoStartIndex),v.yValues.notifyAppend(y==null?void 0:y.fifoStartIndex),v.x1Values.notifyAppend(y==null?void 0:y.fifoStartIndex),v.y1Values.notifyAppend(y==null?void 0:y.fifoStartIndex))),v}return Object.defineProperty(h.prototype,"yValues",{get:function(){return this.getNativeYValues()},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"x1Values",{get:function(){return this.getNativeYValues(1)},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"y1Values",{get:function(){return this.getNativeYValues(2)},enumerable:!1,configurable:!0}),h.prototype.append=function(p,g,v,y,m){f.prototype.appendN.call(this,p,[g,v,y],m)},h.prototype.appendRange=function(p,g,v,y,m){f.prototype.appendRangeN.call(this,p,[g,v,y],m)},h.prototype.update=function(p,g,v,y,m){f.prototype.updateN.call(this,p,[g,v,y],m)},h.prototype.updateXyz=function(p,g,v,y,m,b){f.prototype.updateXyN.call(this,p,g,[v,y,m],b)},h.prototype.insert=function(p,g,v,y,m,b){f.prototype.insertN.call(this,p,g,[v,y,m],b)},h.prototype.insertRange=function(p,g,v,y,m,b){f.prototype.insertRangeN.call(this,p,g,[v,y,m],b)},h.prototype.getIndicesRange=function(p,g,v,y){g===void 0&&(g=!1),v===void 0&&(v=o.ESearchMode.RoundDown),y===void 0&&(y=o.ESearchMode.RoundUp);var m=g?this.getNativeIndexes():this.xValues,b=(0,u.getIndicesRange)(this.webAssemblyContext,m,p,this.dataDistributionCalculator.isSortedAscending,v,y),S=g?this.getNativeIndexes():this.x1Values,_=(0,u.getIndicesRange)(this.webAssemblyContext,S,p,this.dataDistributionCalculator.isSortedAscending,v,y);return b.union(_)},h.prototype.getXRange=function(p){var g=this.getXValues(p),v=this.getXyxyValues(p).x1Values,y;if(this.count()===1){var m=g.get(0),b=v.get(0),S=Math.min(m,b),_=Math.max(m,b);return S===_&&(S-=1,_+=1),new t.NumberRange(S,_)}else if(this.count()>1){var S=void 0,_=void 0,C=void 0,T=void 0;try{if(C=this.webAssemblyContext.NumberUtil.MinMax(g,!1),T=this.webAssemblyContext.NumberUtil.MinMax(v,!1),S=Math.min(C.minD,T.minD),_=Math.max(C.maxD,T.maxD),!(0,s.isRealNumber)(S)||!(0,s.isRealNumber)(_))return new t.NumberRange(0,0)}finally{(0,i.deleteSafe)(C),(0,i.deleteSafe)(T)}return S===_?new t.NumberRange(S-1,_+1):(S>_&&(y=S,S=_,_=y),new t.NumberRange(S,_))}return new t.NumberRange(0,0)},h.prototype.getOptions=function(p){p===void 0&&(p=!1);var g=f.prototype.getOptions.call(this,p);if(!p){var v=(0,l.vectorToArray)(this.xValues,this.webAssemblyContext),y=(0,l.vectorToArray)(this.yValues,this.webAssemblyContext),m=(0,l.vectorToArray)(this.x1Values,this.webAssemblyContext),b=(0,l.vectorToArray)(this.y1Values,this.webAssemblyContext),S={xValues:v,yValues:y,x1Values:m,y1Values:b};Object.assign(g,S)}return g},h.prototype.getXyxyValues=function(p){var g,v,y;switch(p){case c.EDataSeriesValueType.FinalAnimationValues:g=this.yFinalAnimationValuesArray[0],v=this.yFinalAnimationValuesArray[1],y=this.yFinalAnimationValuesArray[2];break;case c.EDataSeriesValueType.InitialAnimationValues:g=this.yInitialAnimationValuesArray[0],v=this.yInitialAnimationValuesArray[1],y=this.yInitialAnimationValuesArray[2];break;default:g=this.yValues,v=this.x1Values,y=this.y1Values}return{yValues:g,x1Values:v,y1Values:y}},h})(u.BaseDataSeries);return Wm.XyxyDataSeries=d,Wm}var MI={},Lie;function zd(){return Lie||(Lie=1,(function(r){var e=MI&&MI.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(r,"__esModule",{value:!0}),r.BaseDataSeries3D=r.EDataSeriesType3D=void 0;var i=$n(),n=Ba();(function(o){o.Xyz3D="Xyz",o.UniformGrid3D="UniformGrid3D",o.NonUniformGrid3D="NonUniformGrid3D"})(r.EDataSeriesType3D||(r.EDataSeriesType3D={}));var t=(function(o){e(a,o);function a(s,l){var u=this,c;return u=o.call(this)||this,u.webAssemblyContext=s,u.dataSeriesNameProperty=(c=l==null?void 0:l.dataSeriesName)!==null&&c!==void 0?c:u.dataSeriesNameProperty,u.dataChanged=new n.EventHandler,u.isModifiedProperty=!0,u}return Object.defineProperty(a.prototype,"dataSeriesName",{get:function(){return this.dataSeriesNameProperty},set:function(s){this.dataSeriesNameProperty=s,this.notifyDataChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"isModified",{get:function(){return this.isModifiedProperty},enumerable:!1,configurable:!0}),a.prototype.getIsDeleted=function(){return this.isDeleted},a.prototype.delete=function(){this.isDeleted=!0,this.webAssemblyContext=void 0},a.prototype.notifyDataChanged=function(){this.isModifiedProperty=!0,this.dataChanged.raiseEvent()},a.prototype.resetModified=function(){this.isModifiedProperty=!1},a.prototype.toJSON=function(s){s===void 0&&(s=!1);var l=this.getOptions(s);return{type:this.type,options:l}},a.prototype.getOptions=function(s){var l={dataSeriesName:this.dataSeriesName};return l},a})(i.DeletableEntity);r.BaseDataSeries3D=t})(MI)),MI}var VT={},HT={},kie;function y_e(){if(kie)return HT;kie=1;var r=HT&&HT.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(u[d]=c[d])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})();Object.defineProperty(HT,"__esModule",{value:!0}),HT.BaseGridDataSeries3D=void 0;var e=ni(),i=oi(),n=zd(),t=(function(a){r(s,a);function s(l,u){var c=a.call(this,l,u)||this;return c.setYValues(u==null?void 0:u.yValues,u==null?void 0:u.metadata),c}return Object.defineProperty(s.prototype,"yRange",{get:function(){if(!this.yRangeCached){for(var l=-Number.MAX_VALUE,u=Number.MAX_VALUE,c=0;c<this.zSizeProperty;c++)for(var d=0;d<this.xSizeProperty;d++){var f=this.yValuesProperty[c][d];l=Math.max(f,l),u=Math.min(f,u)}this.yRangeCached=new i.NumberRange(u,l)}return this.yRangeCached},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"zSize",{get:function(){return this.zSizeProperty},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"xSize",{get:function(){return this.xSizeProperty},enumerable:!1,configurable:!0}),s.prototype.getMetadataValues=function(){return this.metadataProperty},s.prototype.setYValues=function(l,u){if(!l||!l[0]){this.yValuesProperty=void 0,this.xSizeProperty=0,this.zSizeProperty=0;return}var c=l[0].length;l.forEach(function(h){if(!h)throw new Error("Each row in YValues must be defined. See how to declare a 2D array in Javascript here https://stackoverflow.com/a/966234/303612");if(h.length!==c)throw new Error("Each row in YValues must be the same length, so that the overall 2D array is square")}),u&&(o(l,u),this.metadataProperty=u);var d=l[0].length,f=l.length;this.xSizeProperty=d,this.zSizeProperty=f,this.yValuesProperty=l,this.notifyDataChanged()},s.prototype.getYValues=function(){return this.yValuesProperty},s.prototype.getYValue=function(l,u){try{return this.yValuesProperty[l][u]}catch{return console.log("error at get z,x ".concat(l,", ").concat(u)),0}},s.prototype.setYValue=function(l,u,c,d){this.yValuesProperty[l][u]=c,d&&(this.validateIndexes(l,u),this.metadataProperty[l][u]=d),this.notifyDataChanged()},s.prototype.notifyDataChanged=function(){a.prototype.notifyDataChanged.call(this),this.yRangeCached=void 0},s.prototype.getMetadataAt=function(l,u){if(this.metadataProperty)return this.validateIndexes(l,u),this.metadataProperty[l][u]},s.prototype.getMetadataHeight=function(){return this.metadataProperty?this.metadataProperty.length:this.zSizeProperty},s.prototype.getMetadataWidth=function(){return this.metadataProperty?this.metadataProperty[0].length:this.xSizeProperty},s.prototype.setMetadata=function(l){this.metadataProperty=l},s.prototype.setMetadataAt=function(l,u,c){c&&(this.metadataProperty[l][u]=c)},s.prototype.delete=function(){this.yValuesProperty=void 0,this.metadataProperty=void 0,this.yRangeCached=void 0,a.prototype.delete.call(this)},s.prototype.getOptions=function(l){var u=a.prototype.getOptions.call(this,l);if(l)return u;var c={yValues:this.getYValues(),metadata:this.metadataProperty};return Object.assign(u,c)},s.prototype.validateIndexes=function(l,u){if(Math.round(l)!==l)throw Error("zIndex must be an integer");if(Math.round(u)!==u)throw Error("xIndex must be an integer");if(l<0||l>=this.zSizeProperty)throw new Error("zIndex is out of range");if(u<0||u>=this.xSizeProperty)throw new Error("xIndex is out of range")},s})(n.BaseDataSeries3D);HT.BaseGridDataSeries3D=t;var o=function(a,s){e.Guard.arraysSameLengthArr([{arg:a,name:"yValues"},{arg:s,name:"metadata"}]);for(var l=0;l<a.length;l++)e.Guard.arraysSameLengthArr([{arg:a[l],name:"yValues[".concat(l,"]")},{arg:s[l],name:"metadata[".concat(l,"]")}])};return HT}var Iie;function m_e(){if(Iie)return VT;Iie=1;var r=VT&&VT.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(VT,"__esModule",{value:!0}),VT.UniformGridDataSeries3D=void 0;var e=oi(),i=zd(),n=y_e(),t=(function(o){r(a,o);function a(s,l){var u=o.call(this,s,l)||this;return u.type=i.EDataSeriesType3D.UniformGrid3D,u.xStartProperty=(l==null?void 0:l.xStart)||0,u.xStepProperty=(l==null?void 0:l.xStep)||1,u.zStartProperty=(l==null?void 0:l.zStart)||0,u.zStepProperty=(l==null?void 0:l.zStep)||1,u}return Object.defineProperty(a.prototype,"xStart",{get:function(){return this.xStartProperty},set:function(s){this.xStartProperty=s,this.notifyDataChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"xStep",{get:function(){return this.xStepProperty},set:function(s){this.xStepProperty=s,this.notifyDataChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"zStart",{get:function(){return this.zStartProperty},set:function(s){this.zStartProperty=s,this.notifyDataChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"zStep",{get:function(){return this.zStepProperty},set:function(s){this.zStepProperty=s,this.notifyDataChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"xRange",{get:function(){return new e.NumberRange(this.xStart,this.xStart+this.xStep*(this.xSize-1))},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"zRange",{get:function(){return new e.NumberRange(this.zStart,this.zStart+this.zStep*(this.zSize-1))},enumerable:!1,configurable:!0}),a.prototype.getX=function(s){return this.xStart+s*this.xStep},a.prototype.getZ=function(s){return this.zStart+s*this.zStep},a.prototype.getOptions=function(s){var l=o.prototype.getOptions.call(this,s);if(s)return l;var u={xStart:this.xStart,xStep:this.xStep,zStart:this.zStart,zStep:this.zStep};return Object.assign(l,u)},a})(n.BaseGridDataSeries3D);return VT.UniformGridDataSeries3D=t,VT}var UT={},Nie;function b_e(){if(Nie)return UT;Nie=1;var r=UT&&UT.__extends||(function(){var u=function(c,d){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,h){f.__proto__=h}||function(f,h){for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(f[p]=h[p])},u(c,d)};return function(c,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");u(c,d);function f(){this.constructor=c}c.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}})();Object.defineProperty(UT,"__esModule",{value:!0}),UT.XyzDataSeries3D=void 0;var e=Mr(),i=ni(),n=oi(),t=Ld(),o=ca(),a=Qn(),s=zd(),l=(function(u){r(c,u);function c(d,f){var h=u.call(this,d,f)||this;return h.type=s.EDataSeriesType3D.Xyz3D,h.xValues=new d.SCRTDoubleVector,h.yValues=new d.SCRTDoubleVector,h.zValues=new d.SCRTDoubleVector,h.metadata=[],f!=null&&f.xValues&&(f!=null&&f.yValues)&&(f!=null&&f.zValues)&&h.appendRange(f.xValues,f.yValues,f.zValues,f==null?void 0:f.metadata),h}return c.prototype.getNativeXValues=function(){return this.xValues},c.prototype.getNativeYValues=function(){return this.yValues},c.prototype.getNativeZValues=function(){return this.zValues},c.prototype.getMetadataValues=function(){return this.metadata},Object.defineProperty(c.prototype,"xRange",{get:function(){var d=this.webAssemblyContext.NumberUtil.MinMax(this.xValues,!0),f=new n.NumberRange(d.minD,d.maxD);return d.delete(),f},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"yRange",{get:function(){var d=this.webAssemblyContext.NumberUtil.MinMax(this.yValues,!0),f=new n.NumberRange(d.minD,d.maxD);return d.delete(),f},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"zRange",{get:function(){var d=this.webAssemblyContext.NumberUtil.MinMax(this.zValues,!0),f=new n.NumberRange(d.minD,d.maxD);return d.delete(),f},enumerable:!1,configurable:!0}),c.prototype.append=function(d,f,h,p){this.getIsDeleted()||(this.xValues.push_back(d),this.yValues.push_back(f),this.zValues.push_back(h),this.metadata.push(p),this.notifyDataChanged())},c.prototype.appendRange=function(d,f,h,p){if(!this.getIsDeleted()){if(i.Guard.arraysSameLength(d,"xValues",f,"yValues"),i.Guard.arraysSameLength(f,"yValues",h,"zValues"),p){i.Guard.arraysSameLength(p,"metadatas",d,"xValues");var g=this.metadata.length;this.metadata.length=g+d.length;for(var v=0;v<d.length;v++)this.metadata[g+v]=p[v]}else{var g=this.metadata.length;this.metadata.length=g+d.length}(0,t.appendDoubleVectorFromJsArray)(this.webAssemblyContext,this.xValues,d),(0,t.appendDoubleVectorFromJsArray)(this.webAssemblyContext,this.yValues,f),(0,t.appendDoubleVectorFromJsArray)(this.webAssemblyContext,this.zValues,h),this.notifyDataChanged()}},c.prototype.update=function(d,f,h,p,g){this.getIsDeleted()||(this.xValues.set(d,f),this.yValues.set(d,h),this.zValues.set(d,p),this.metadata[d]=g,this.notifyDataChanged())},c.prototype.insert=function(d,f,h,p,g){var v,y=o.PerformanceDebugHelper.mark(o.EPerformanceMarkType.DataUpdateStart,{contextId:this.dataSeriesName});if(!this.getIsDeleted()){if(d<0||d>this.count())throw new Error("Start index is out of range");this.xValues.insertAt(d,f),this.yValues.insertAt(d,h),this.zValues.insertAt(d,p),this.metadata.splice(d,0,g),this.notifyDataChanged()}o.PerformanceDebugHelper.mark(o.EPerformanceMarkType.DataUpdateEnd,{relatedId:(v=y==null?void 0:y.detail)===null||v===void 0?void 0:v.relatedId,contextId:this.dataSeriesName})},c.prototype.insertRange=function(d,f,h,p,g){var v,y=o.PerformanceDebugHelper.mark(o.EPerformanceMarkType.DataUpdateStart,{contextId:this.dataSeriesName});if(!this.getIsDeleted()){if(i.Guard.arraysSameLength(f,"xValues",h,"yValues"),i.Guard.arraysSameLength(p,"zValues",h,"yValues"),d<0||d>this.count())throw new Error("Start index is out of range");if((0,t.insertDoubleVectorFromJsArray)(this.webAssemblyContext,f,this.xValues,d),(0,t.insertDoubleVectorFromJsArray)(this.webAssemblyContext,h,this.yValues,d),(0,t.insertDoubleVectorFromJsArray)(this.webAssemblyContext,p,this.zValues,d),g){var m=this.metadata.slice(0,d),b=this.metadata.slice(d);this.metadata=m.concat(g,b)}else{var S=Array(f.length).fill(void 0),m=this.metadata.slice(0,d),b=this.metadata.slice(d);this.metadata=m.concat(S,b)}this.notifyDataChanged()}o.PerformanceDebugHelper.mark(o.EPerformanceMarkType.DataUpdateEnd,{relatedId:(v=y==null?void 0:y.detail)===null||v===void 0?void 0:v.relatedId,contextId:this.dataSeriesName})},c.prototype.removeAt=function(d){if(!this.getIsDeleted()){if(d<0||d>=this.count())throw new Error("index is out of range");this.xValues.removeAt(d),this.yValues.removeAt(d),this.zValues.removeAt(d),this.metadata.splice(d,1),this.notifyDataChanged()}},c.prototype.removeRange=function(d,f){if(!this.getIsDeleted()){if(d<0||d+f>this.count())throw new Error("index is out of range");this.xValues.removeRange(d,f),this.yValues.removeRange(d,f),this.zValues.removeRange(d,f),this.metadata.splice(d,f),this.notifyDataChanged()}},c.prototype.clear=function(){this.getIsDeleted()||(this.xValues.clear(),this.yValues.clear(),this.zValues.clear(),this.metadata=[],this.notifyDataChanged())},c.prototype.delete=function(){this.xValues=(0,e.deleteSafe)(this.xValues),this.yValues=(0,e.deleteSafe)(this.yValues),this.zValues=(0,e.deleteSafe)(this.zValues),this.metadata=[],u.prototype.delete.call(this)},c.prototype.count=function(){return this.xValues?this.xValues.size():0},Object.defineProperty(c.prototype,"capacity",{get:function(){return this.xValues.capacity()},set:function(d){d>this.capacity&&this.reserve(d)},enumerable:!1,configurable:!0}),c.prototype.reserve=function(d){i.Guard.argumentIsRealInteger(d,"capacity"),this.xValues.reserve(d),this.yValues.reserve(d),this.zValues.reserve(d)},c.prototype.getOptions=function(d){var f=u.prototype.getOptions.call(this,d);if(d)return f;var h=(0,a.vectorToArray)(this.xValues,this.webAssemblyContext),p=(0,a.vectorToArray)(this.yValues,this.webAssemblyContext),g=(0,a.vectorToArray)(this.zValues,this.webAssemblyContext),v={xValues:h,yValues:p,zValues:g,metadata:this.metadata};return Object.assign(f,v)},c})(s.BaseDataSeries3D);return UT.XyzDataSeries3D=l,UT}var Fie;function XN(){if(Fie)return Am;Fie=1;var r=Am&&Am.__assign||function(){return r=Object.assign||function(W){for(var K,H=1,U=arguments.length;H<U;H++){K=arguments[H];for(var I in K)Object.prototype.hasOwnProperty.call(K,I)&&(W[I]=K[I])}return W},r.apply(this,arguments)};Object.defineProperty(Am,"__esModule",{value:!0}),Am.buildDataSeries3D=Am.buildDataSeries=void 0;var e=$Se(),i=KSe(),n=QSe(),t=e_e(),o=t_e(),a=r_e(),s=n_e(),l=s_e(),u=c_e(),c=H8(),d=ki(),f=d_e(),h=$N(),p=G8(),g=Y8(),v=U8(),y=h_e(),m=p_e(),b=g_e(),S=v_e(),_=qN(),C=z8(),T=zd(),x=m_e(),A=b_e(),w=ly(),L=fg(),k=function(W,K,H,U){if(K){typeof K=="string"&&(K=JSON.parse(K,L.chartReviver)),typeof H=="string"&&(H=JSON.parse(H,L.chartReviver));var I,Q;if(I=j(W,K,H),"filter"in K.options&&(Q=K.options.filter),Q&&K.type!==d.EDataSeriesType.HeatmapUniform&&K.type!==d.EDataSeriesType.HeatmapNonUniform&&I){var Z=D(U??I,Q);Z&&(I=Z)}return I}};Am.buildDataSeries=k;var D=function(W,K){if(K.type===w.EDataFilterType.HlcScaleOffset)return new i.HlcScaleOffsetFilter(W,K.options);if(K.type===w.EDataFilterType.OhlcScaleOffset)return new n.OhlcScaleOffsetFilter(W,K.options);if(K.type===w.EDataFilterType.XyLinearTrend)return new t.XyLinearTrendFilter(W,K.options);if(K.type===w.EDataFilterType.XyMovingAverage)return new o.XyMovingAverageFilter(W,K.options);if(K.type===w.EDataFilterType.XyRatio){var H=K.options;if(Array.isArray(H.divisorSeries)){var U=new Array(W.count()).fill(0);K.options.divisorSeries=new v.XyDataSeries(W.webAssemblyContext,{xValues:U,yValues:H.divisorSeries})}return new a.XyRatioFilter(W,K.options)}else return K.type===w.EDataFilterType.XyScaleOffset?new s.XyScaleOffsetFilter(W,K.options):K.type===w.EDataFilterType.XyyScaleOffset?new l.XyyScaleOffsetFilter(W,K.options):K.type===w.EDataFilterType.XyzScaleOffset?new u.XyzScaleOffsetFilter(W,K.options):void 0},j=function(W,K,H){var U=r({},K.options);switch(K.type){case d.EDataSeriesType.Xy:{var I=U;return I.arrayCount=1,H&&I.xDataId&&(I.xValues=H[I.xDataId],I.yValues=H[I.yDataId]),new v.XyDataSeries(W,I)}case d.EDataSeriesType.Xyy:{var I=U;return H&&I.xDataId&&(I.xValues=H[I.xDataId],I.yValues=H[I.yDataId],I.y1Values=H[I.y1DataId]),new _.XyyDataSeries(W,I)}case d.EDataSeriesType.Xyz:{var I=U;return H&&I.xDataId&&(I.xValues=H[I.xDataId],I.yValues=H[I.yDataId],I.zValues=H[I.zDataId]),new C.XyzDataSeries(W,I)}case d.EDataSeriesType.Xyxy:{var I=U;return H&&I.xDataId&&(I.xValues=H[I.xDataId],I.yValues=H[I.yDataId],I.x1Values=H[I.x1DataId],I.y1Values=H[I.y1DataId]),new S.XyxyDataSeries(W,I)}case d.EDataSeriesType.XyN:{var I=U;return H&&I.xDataId,new y.XyNDataSeries(W,I)}case d.EDataSeriesType.XyText:{var I=U;return H&&I.xDataId&&(I.xValues=H[I.xDataId],I.yValues=H[I.yDataId]),new m.XyTextDataSeries(W,I)}case d.EDataSeriesType.Hlc:{var I=U;return H&&I.xDataId&&(I.xValues=H[I.xDataId],I.highValues=H[I.highDataId],I.lowValues=H[I.lowDataId],I.yValues=H[I.closeDataId]),new c.HlcDataSeries(W,I)}case d.EDataSeriesType.Ohlc:{var I=U;return H&&I.xDataId&&(I.xValues=H[I.xDataId],I.openValues=H[I.openDataId],I.highValues=H[I.highDataId],I.lowValues=H[I.lowDataId],I.closeValues=H[I.closeDataId]),new h.OhlcDataSeries(W,I)}case d.EDataSeriesType.HeatmapUniform:{var I=U;return new p.UniformHeatmapDataSeries(W,I)}case d.EDataSeriesType.HeatmapNonUniform:{var I=U;return new f.NonUniformHeatmapDataSeries(W,I)}case d.EDataSeriesType.XyN:throw new Error("XyN data series is not supported yet!");case d.EDataSeriesType.Xyx:{var I=U;return H&&I.xDataId&&(I.xValues=H[I.xDataId],I.yValues=H[I.yDataId],I.x1Values=H[I.x1DataId]),new b.XyxDataSeries(W,I)}case d.EDataSeriesType.X:return new g.XDataSeries(W,U);case d.EDataSeriesType.BoxPlot:{var I=U;return H&&I.xDataId&&(I.xValues=H[I.xDataId],I.lowerQuartileValues=H[I.lowerDataId],I.upperQuartileValues=H[I.upperDataId],I.maximumValues=H[I.maxDataId],I.minimumValues=H[I.minDataId],I.yValues=H[I.medianDataId],I.medianValues=H[I.medianDataId]),new e.BoxPlotDataSeries(W,I)}default:{var Q=function(Z){throw new Error('Invalid Data Series Type value: "'.concat(Z,'"!'))};return Q(K.type)}}},N=function(W,K,H){if(K)return typeof K=="string"&&(K=JSON.parse(K,L.chartReviver)),typeof H=="string"&&(H=JSON.parse(H,L.chartReviver)),V(W,K,H)};Am.buildDataSeries3D=N;var V=function(W,K,H){var U=r({},K.options);switch(K.type){case T.EDataSeriesType3D.Xyz3D:{var I=U;return H&&I.xDataId&&(I.xValues=H[I.xDataId],I.yValues=H[I.yDataId],I.zValues=H[I.zDataId]),new A.XyzDataSeries3D(W,I)}case T.EDataSeriesType3D.UniformGrid3D:{var I=U;return new x.UniformGridDataSeries3D(W,I)}case T.EDataSeriesType3D.NonUniformGrid3D:throw new Error("NonUniformGrid3D data series is not supported yet!");default:{var Q=function(Z){throw new Error('Invalid Data Series Type value: "'.concat(Z,'"!'))};return Q(K.type)}}};return Am}var zT={},jie;function S_e(){if(jie)return zT;jie=1;var r=zT&&zT.__extends||(function(){var t=function(o,a){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");t(o,a);function s(){this.constructor=o}o.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}})();Object.defineProperty(zT,"__esModule",{value:!0}),zT.FlippedIndexCoordinateCalculator=void 0;var e=oi(),i=r_(),n=(function(t){r(o,t);function o(a,s,l,u,c,d,f,h,p){h===void 0&&(h=0),p===void 0&&(p=-1);var g=t.call(this,a,l,u,c,h,!1)||this,v=new a.IndexCalculatorParams;v.SetIndexCalculator(s),v.m_dViewportDimension=l,v.m_dVisibleMin=u,v.m_dVisibleMax=c,v.m_dViewportOffset=p,v.m_dCoordOffset=g.offset,v.m_dIndexMin=d,v.m_dIndexMax=f;var y=new a.FlippedIndexCoordinateCalculator(v);return v.delete(),g.nativeCalculator=y,g.indexCalculator=s,g.indexRange=new e.NumberRange(s.GetIndex(u),s.GetIndex(c)),g.dimensionOverMaxMinusMin=l/(g.indexRange.max-g.indexRange.min),g.minEdgeCoord=-g.indexRange.min*g.dimensionOverMaxMinusMin,g}return o.prototype.getCoordinate=function(a){var s=this.indexCalculator.GetIndex(a);return this.viewportDimension-(this.minEdgeCoord+s*this.dimensionOverMaxMinusMin)+this.offset},o.prototype.getDataValue=function(a){var s=(this.viewportDimension-a-this.offset-this.minEdgeCoord)/this.dimensionOverMaxMinusMin;return this.indexCalculator.GetValue(s)},o.prototype.translateBy=function(a,s){var l=this.getCoordinate(s.min)+a,u=this.getCoordinate(s.max)+a;return new e.NumberRange(this.getDataValue(l),this.getDataValue(u))},o.prototype.transformIndexToData=function(a){return this.indexCalculator.GetValue(a)},o.prototype.transformDataToIndex=function(a){return this.indexCalculator.GetIndex(a)},o.prototype.zoomTranslateBy=function(a,s,l){var u=this.transformDataToIndex(l.min),c=this.transformDataToIndex(l.max),d=c-u,f=d==0;return u-=a*(f?u:d),c+=s*(f?c:d),c>=u?new e.NumberRange(this.transformIndexToData(u),this.transformIndexToData(c)):new e.NumberRange(this.transformIndexToData(c),this.transformIndexToData(u))},o})(i.CoordinateCalculatorBase);return zT.FlippedIndexCoordinateCalculator=n,zT}var WT={},Bie;function __e(){if(Bie)return WT;Bie=1;var r=WT&&WT.__extends||(function(){var t=function(o,a){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");t(o,a);function s(){this.constructor=o}o.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}})();Object.defineProperty(WT,"__esModule",{value:!0}),WT.IndexCoordinateCalculator=void 0;var e=oi(),i=r_(),n=(function(t){r(o,t);function o(a,s,l,u,c,d,f,h,p){h===void 0&&(h=0),p===void 0&&(p=-1);var g=t.call(this,a,l,u,c,h,!0)||this,v=new a.IndexCalculatorParams;v.SetIndexCalculator(s),v.m_dViewportDimension=l,v.m_dVisibleMin=u,v.m_dVisibleMax=c,v.m_dViewportOffset=p,v.m_dCoordOffset=g.offset,v.m_dIndexMin=d,v.m_dIndexMax=f;var y=new a.IndexCoordinateCalculator(v);return v.delete(),g.nativeCalculator=y,g.indexCalculator=s,g.indexRange=new e.NumberRange(s.GetIndex(u),s.GetIndex(c)),g.dimensionOverMaxMinusMin=l/(g.indexRange.max-g.indexRange.min),g.minEdgeCoord=-g.indexRange.min*g.dimensionOverMaxMinusMin,g}return o.prototype.getCoordinate=function(a){var s=this.indexCalculator.GetIndex(a);return this.minEdgeCoord+s*this.dimensionOverMaxMinusMin+this.offset},o.prototype.getDataValue=function(a){var s=(a-this.offset-this.minEdgeCoord)/this.dimensionOverMaxMinusMin;return this.indexCalculator.GetValue(s)},o.prototype.translateBy=function(a,s){var l=this.getCoordinate(s.min)-a,u=this.getCoordinate(s.max)-a;return new e.NumberRange(this.getDataValue(l),this.getDataValue(u))},o.prototype.transformIndexToData=function(a){return this.indexCalculator.GetValue(a)},o.prototype.transformDataToIndex=function(a){return this.indexCalculator.GetIndex(a)},o.prototype.zoomTranslateBy=function(a,s,l){var u=this.transformDataToIndex(l.min),c=this.transformDataToIndex(l.max),d=c-u,f=d==0;return u-=a*(f?u:d),c+=s*(f?c:d),c>=u?new e.NumberRange(this.transformIndexToData(u),this.transformIndexToData(c)):new e.NumberRange(this.transformIndexToData(c),this.transformIndexToData(u))},o})(i.CoordinateCalculatorBase);return WT.IndexCoordinateCalculator=n,WT}var GT={},Vie;function P_e(){if(Vie)return GT;Vie=1;var r=GT&&GT.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(GT,"__esModule",{value:!0}),GT.IndexTickProvider=void 0;var e=oi(),i=U1(),n=JH(),t=(function(o){r(a,o);function a(s){var l=o.call(this)||this;return l.webAssemblyContext=s,l.numericTickProvider=new i.NumericTickProvider(s),l}return a.prototype.getMinorTicks=function(s,l,u,c){var d=this.parentAxis.dataGap;if(d===0)return this.numericTickProvider.getMinorTicks(s,l,u);var f=c,h=this.numericTickProvider.getMinorTicks(s/d,l/d,this.getIndexRange(f,u));return h.map(function(p){return f.transformIndexToData(p)})},a.prototype.getMajorTicks=function(s,l,u,c){var d=this.parentAxis.dataGap;if(d===0)return this.numericTickProvider.getMajorTicks(s,l,u);var f=c,h=this.numericTickProvider.getMajorTicks(s/d,l/d,this.getIndexRange(f,u));return h.map(function(p){return f.transformIndexToData(p)})},a.prototype.getIndexRange=function(s,l){var u=s.transformDataToIndex(l.min),c=s.transformDataToIndex(l.max);return new e.NumberRange(u,c)},a})(n.TickProvider);return GT.IndexTickProvider=t,GT}var Hie;function sU(){if(Hie)return xT;Hie=1;var r=xT&&xT.__extends||(function(){var p=function(g,v){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,m){y.__proto__=m}||function(y,m){for(var b in m)Object.prototype.hasOwnProperty.call(m,b)&&(y[b]=m[b])},p(g,v)};return function(g,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");p(g,v);function y(){this.constructor=g}g.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}})();Object.defineProperty(xT,"__esModule",{value:!0}),xT.BaseValueAxis=void 0;var e=XN(),i=Mr(),n=gc(),t=PR(),o=tn(),a=Y8(),s=S_e(),l=__e(),u=P_e(),c=Eg(),d=z1(),f=sy(),h=(function(p){r(g,p);function g(v,y){var m=this,b,S;if(m=p.call(this,v,y)||this,m.type=n.EAxisType.BaseValueAxis,m.baseValuesDataSeries=void 0,m.lastBaseValuesDataSeries=void 0,m.lastBaseValuesDataSeriesChangeCount=0,m.baseValuesDataSeriesFromArray=void 0,m.labelProvider=(b=y==null?void 0:y.labelProvider)!==null&&b!==void 0?b:new f.NumericLabelProvider(y),m.tickProvider=new u.IndexTickProvider(m.webAssemblyContext2D),m.deltaCalculator=new d.NumericDeltaCalculator(v),m.indexCalculator=new v.IndexCalculator,m.emptyVector=new v.SCRTDoubleVector,m.dataGap=(S=y==null?void 0:y.dataGap)!==null&&S!==void 0?S:0,y!=null&&y.baseValues){if("options"in y.baseValues){var _=(0,e.buildDataSeries)(v,y.baseValues);m.baseValuesDataSeries=_}if("changeCount"in y.baseValues)m.baseValuesDataSeries=y.baseValues;else if((0,t.isNumberArray)(y.baseValues))m.setBaseValuesFromArray(y.baseValues);else throw new Error("Invalid baseXValues type. Expected IDataSeries or NumberArray")}return m}return Object.defineProperty(g.prototype,"isLinearAxis",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"dataGap",{get:function(){return this.indexCalculator.dataPointWidth},set:function(v){this.indexCalculator.dataPointWidth!==v&&(this.indexCalculator.dataPointWidth=v,this.notifyPropertyChanged("dataGap"))},enumerable:!1,configurable:!0}),g.prototype.getMajorTickIndex=function(v){if(this.autoTicks&&this.dataGap>0){var y=this.getCurrentCoordinateCalculator(),m=y.transformDataToIndex(v),b=this.majorDelta/this.dataGap,S=m/b;return Math.round(S)}else return p.prototype.getMajorTickIndex.call(this,v)},g.prototype.prepareRenderData=function(){this.updateIndexCalculatorBaseValues(),p.prototype.prepareRenderData.call(this)},g.prototype.getCurrentCoordinateCalculatorInternal=function(){var v=this.visibleRange.min,y=this.visibleRange.max,m=this.indexCalculator.GetIndex(v),b=this.indexCalculator.GetIndex(y),S=this.offset,_=this.axisLength,C=this.isXAxis!==this.flippedCoordinates?new l.IndexCoordinateCalculator(this.webAssemblyContext2D,this.indexCalculator,_,v,y,m,b,S):new s.FlippedIndexCoordinateCalculator(this.webAssemblyContext2D,this.indexCalculator,_,v,y,m,b,S);return this.updateIndexCalculatorBaseValues(),C},g.prototype.delete=function(){this.indexCalculator=(0,i.deleteSafe)(this.indexCalculator),this.baseValuesDataSeriesFromArray=(0,i.deleteSafe)(this.baseValuesDataSeriesFromArray),this.emptyVector=(0,i.deleteSafe)(this.emptyVector),p.prototype.delete.call(this)},g.prototype.getBaseValues=function(){var v=this,y;if(this.baseValuesDataSeries&&!this.baseValuesDataSeries.getIsDeleted())y=this.baseValuesDataSeries;else{var m=this.parentSurface,b=m.renderableSeries.asArray().find(function(C){return C.xAxisId===v.id});if(b){if((b==null?void 0:b.type)===o.ESeriesType.UniformHeatmapSeries)throw Error("Index Axis is not supported for UniformHeatmapRenderableSeries use NonUniformHeatmapSeries instead");if((b==null?void 0:b.type)===o.ESeriesType.NonUniformHeatmapSeries)throw Error("In order to use NonUniformHeatmapSeries with BaseValueAxis please set base X values using xBaseValueAxis.setBaseXValuesFromArray() method");if(b!=null&&b.isCollection){var S=b;if(S.size()===0)throw Error("BaseStackedCollection should have at least one BaseStackedRenderableSeries");var _=S.get(0);_.dataSeries&&!_.dataSeries.getIsDeleted()&&(y=_.dataSeries)}else b.dataSeries&&!b.dataSeries.getIsDeleted()&&(y=b.dataSeries)}}return y},g.prototype.setBaseValues=function(v){this.baseValuesDataSeries=v,this.notifyPropertyChanged("baseValues")},g.prototype.setBaseValuesFromArray=function(v){(0,i.deleteSafe)(this.baseValuesDataSeriesFromArray),this.baseValuesDataSeriesFromArray=new a.XDataSeries(this.webAssemblyContext2D,{xValues:v}),this.setBaseValues(this.baseValuesDataSeriesFromArray)},g.prototype.updateIndexCalculatorBaseValues=function(){var v=this.getBaseValues();v&&!v.getIsDeleted()?(v!==this.lastBaseValuesDataSeries||v.changeCount!==this.lastBaseValuesDataSeriesChangeCount)&&(this.updateIndexCalculatorBaseValuesInternal(v.getNativeXValues()),this.lastBaseValuesDataSeries=v,this.lastBaseValuesDataSeriesChangeCount=v.changeCount):this.updateIndexCalculatorBaseValuesInternal(this.emptyVector)},g.prototype.updateIndexCalculatorBaseValuesInternal=function(v){this.indexCalculator.UpdateVec(v,!1)},g.prototype.toJSON=function(){var v,y=p.prototype.toJSON.call(this),m=(v=this.baseValuesDataSeries)===null||v===void 0?void 0:v.toJSON(!1),b={baseValues:m,dataGap:this.dataGap};return Object.assign(y.options,b),y},g})(c.AxisBase2D);return xT.BaseValueAxis=h,xT}var YT={},Uie;function C_e(){if(Uie)return YT;Uie=1;var r=YT&&YT.__extends||(function(){var t=function(o,a){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");t(o,a);function s(){this.constructor=o}o.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}})();Object.defineProperty(YT,"__esModule",{value:!0}),YT.IndexDeltaCalculator=void 0;var e=E8(),i=eU(),n=(function(t){r(o,t);function o(a,s){var l=t.call(this)||this;return l.baseDeltaCalculator=new e.DateTimeDeltaCalculator(a,s),l}return o.prototype.getDeltaFromRange=function(a,s,l,u){var c=this.parentAxis.dataGap,d=this.parentAxis.getCurrentCoordinateCalculator();if(c>0){var f=d.transformDataToIndex(a),h=d.transformDataToIndex(s),p=a+c*(h-f);return this.baseDeltaCalculator.getDeltaFromRange(a,p,l,u)}else return this.baseDeltaCalculator.getDeltaFromRange(a,s,l,u)},o})(i.DeltaCalculator);return YT.IndexDeltaCalculator=n,YT}var zie;function $8(){if(zie)return TT;zie=1;var r=TT&&TT.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(u[d]=c[d])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})();Object.defineProperty(TT,"__esModule",{value:!0}),TT.DiscontinuousDateAxis=void 0;var e=gc(),i=sU(),n=C_e(),t=L0(),o=(function(a){r(s,a);function s(l,u){var c=this;return u!=null&&u.labelProvider||(u=u??{},u.labelProvider=new t.SmartDateLabelProvider(u)),c=a.call(this,l,u)||this,c.type=e.EAxisType.DiscontinuousDateAxis,c.possibleDeltasOption=u==null?void 0:u.possibleDeltas,c.minTicksOption=u==null?void 0:u.minTicks,c.deltaCalculator=new n.IndexDeltaCalculator(l,{possibleDeltas:u==null?void 0:u.possibleDeltas,minTicks:u==null?void 0:u.minTicks,datePrecision:u==null?void 0:u.datePrecision}),c}return s.prototype.setBaseXValues=function(l){a.prototype.setBaseValues.call(this,l)},s.prototype.toJSON=function(){var l=a.prototype.toJSON.call(this),u={possibleDeltas:this.possibleDeltasOption,minTicks:this.minTicksOption};return Object.assign(l.options,u),l},s.prototype.updateIndexCalculatorBaseValuesInternal=function(l){this.indexCalculator.UpdateVec(l,this.dataGap===0)},s})(i.BaseValueAxis);return TT.DiscontinuousDateAxis=o,TT}var Wie;function e3(){if(Wie)return jC;Wie=1,Object.defineProperty(jC,"__esModule",{value:!0}),jC.buildAxis3D=jC.buildAxes=void 0;var r=rU(),e=NSe(),i=tU(),n=A8(),t=sy(),o=aU(),a=L0(),s=GN(),l=YN(),u=NM(),c=YSe(),d=B8(),f=V8(),h=gc(),p=$o(),g=W1(),v=fg(),y=Jn(),m=$8(),b=sU();(0,y.registerType)(p.EBaseType.LabelProvider,g.ELabelProviderType.Numeric,function(T){return new t.NumericLabelProvider(T)},!0),(0,y.registerType)(p.EBaseType.LabelProvider,g.ELabelProviderType.Date,function(T){return new i.DateLabelProvider(T)},!0),(0,y.registerType)(p.EBaseType.LabelProvider,g.ELabelProviderType.Logarithmic,function(T){return new n.LogarithmicLabelProvider(T)},!0),(0,y.registerType)(p.EBaseType.LabelProvider,g.ELabelProviderType.SmartDate,function(T){return new a.SmartDateLabelProvider(T)},!0),(0,y.registerType)(p.EBaseType.LabelProvider,g.ELabelProviderType.Text,function(T){return new s.TextLabelProvider(T)},!0),(0,y.registerType)(p.EBaseType.LabelProvider,g.ELabelProviderType.Pie,function(T){return new o.PieLabelProvider(T)},!0);var S=function(T,x){typeof x=="string"&&(x=JSON.parse(x,v.chartReviver));var A=[];if(Array.isArray(x))for(var w=0,L=x;w<L.length;w++){var k=L[w];A.push(_(T,k))}else A.push(_(T,x));return A};jC.buildAxes=S;var _=function(T,x){var A;switch(x.type){case h.EAxisType.CategoryAxis:A=new r.CategoryAxis(T,x.options);break;case h.EAxisType.BaseValueAxis:A=new b.BaseValueAxis(T,x.options);break;case h.EAxisType.DiscontinuousDateAxis:A=new m.DiscontinuousDateAxis(T,x.options);break;case h.EAxisType.NumericAxis:A=new u.NumericAxis(T,x.options);break;case h.EAxisType.LogarithmicAxis:A=new l.LogarithmicAxis(T,x.options);break;case h.EAxisType.DateTimeNumericAxis:A=new e.DateTimeNumericAxis(T,x.options);break;case h.EAxisType.PolarNumericAxis:A=new d.PolarNumericAxis(T,x.options);break;case h.EAxisType.PolarCategoryAxis:A=new c.PolarCategoryAxis(T,x.options);break;default:A=new u.NumericAxis(T,{});break}return A},C=function(T,x){var A;switch(x.type){case h.EAxisType.NumericAxis3D:A=new f.NumericAxis3D(T,x.options);break;default:A=new f.NumericAxis3D(T,{});break}return A};return jC.buildAxis3D=C,jC}var $T={},LI={},X5={},Gie;function bo(){return Gie||(Gie=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EChart3DModifierType=r.EChart2DModifierType=void 0,(function(e){e.Cursor="Cursor",e.PolarCursor="PolarCursor",e.DataPointSelection="DataPointSelection",e.PolarDataPointSelection="PolarDataPointSelection",e.Legend="Legend",e.PolarLegend="PolarLegend",e.MouseWheelZoom="MouseWheelZoom",e.PolarMouseWheelZoom="PolarMouseWheelZoom",e.PinchZoom="PinchZoom",e.Rollover="Rollover",e.VerticalSlice="VerticalSlice",e.RubberBandXYZoom="RubberBandXYZoom",e.PolarArcZoom="PolarArcZoom",e.SeriesSelection="SeriesSelection",e.PolarSeriesSelection="PolarSeriesSelection",e.XAxisDrag="XAxisDrag",e.YAxisDrag="YAxisDrag",e.ZoomExtents="ZoomExtents",e.PolarZoomExtents="PolarZoomExtents",e.ZoomPan="ZoomPan",e.PolarPan="PolarPan",e.OverviewRangeSelection="OverviewRangeSelection",e.AnnotationHover="AnnotationHover",e.Custom="Custom"})(r.EChart2DModifierType||(r.EChart2DModifierType={})),(function(e){e.MouseWheelZoom="MouseWheelZoom",e.Orbit="Orbit",e.ZoomExtents="ZoomExtents",e.Tooltip="Tooltip",e.PinchZoom="PinchZoom",e.Legend="Legend",e.Custom="Custom"})(r.EChart3DModifierType||(r.EChart3DModifierType={}))})(X5)),X5}var K5={},Yie;function sb(){return Yie||(Yie=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EMousePosition=void 0,(function(e){e.OutOfCanvas="OutOfCanvas",e.AxisArea="AxisArea",e.SeriesArea="SeriesArea"})(r.EMousePosition||(r.EMousePosition={}))})(K5)),K5}var qT={},$ie;function q8(){if($ie)return qT;$ie=1;var r=qT&&qT.__extends||(function(){var l=function(u,c){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(d[h]=f[h])},l(u,c)};return function(u,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");l(u,c);function d(){this.constructor=u}u.prototype=c===null?Object.create(c):(d.prototype=c.prototype,new d)}})();Object.defineProperty(qT,"__esModule",{value:!0}),qT.CursorTooltipSvgAnnotation=void 0;var e=sb(),i=Ha(),n=Ds(),t=Zs(),o=Aa(),a=ay(),s=(function(l){r(u,l);function u(c){var d=this,f,h,p,g,v,y,m,b,S;if(d=l.call(this,c)||this,d.type=o.EAnnotationType.SVG,d.surfaceTypes=[i.ESurfaceType.SciChartSurfaceType,i.ESurfaceType.SciChartPolarSurfaceType],d.showTooltipProperty=!1,d.seriesInfosProperty=[],d.isHidden=!0,d.titleProperty=(f=c==null?void 0:c.title)!==null&&f!==void 0?f:d.titleProperty,d.tooltipSvgTemplateProperty=(h=c==null?void 0:c.tooltipSvgTemplate)!==null&&h!==void 0?h:d.tooltipSvgTemplateProperty,d.tooltipLegendTemplateProperty=(p=c==null?void 0:c.tooltipLegendTemplate)!==null&&p!==void 0?p:d.tooltipLegendTemplateProperty,d.seriesInfosProperty=(g=c==null?void 0:c.seriesInfos)!==null&&g!==void 0?g:d.seriesInfosProperty,d.containerBackgroundProperty=(v=c==null?void 0:c.containerBackground)!==null&&v!==void 0?v:d.containerBackgroundProperty,d.textStrokeProperty=(y=c==null?void 0:c.textStroke)!==null&&y!==void 0?y:d.textStrokeProperty,d.tooltipLegendOffsetXProperty=(m=c==null?void 0:c.tooltipLegendOffsetX)!==null&&m!==void 0?m:d.tooltipLegendOffsetXProperty,d.tooltipLegendOffsetYProperty=(b=c==null?void 0:c.tooltipLegendOffsetY)!==null&&b!==void 0?b:d.tooltipLegendOffsetYProperty,d.cursorModifier=c.cursorModifier,d.placementDivId=(S=c==null?void 0:c.placementDivId)!==null&&S!==void 0?S:d.placementDivId,d.placementDivId){var _=document.querySelector("[id='".concat(d.placementDivId,"']"));d.svgDivRoot=_}return d}return Object.defineProperty(u.prototype,"seriesInfos",{get:function(){return this.seriesInfosProperty},set:function(c){if(c){var d=this.tooltipSvgTemplate(c,this);d!==this.svgString&&(this.svgString=d,this.notifyPropertyChanged(t.PROPERTY.SERIES_INFOS)),this.seriesInfosProperty=c}},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"title",{get:function(){return this.titleProperty},set:function(c){this.titleProperty!==c&&(this.titleProperty=c,this.notifyPropertyChanged(t.PROPERTY.TITLE))},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"tooltipSvgTemplate",{get:function(){return this.tooltipSvgTemplateProperty},set:function(c){this.tooltipSvgTemplateProperty=c,this.notifyPropertyChanged(t.PROPERTY.TOOLTIP_SVG_TEMPLATE)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"tooltipLegendTemplate",{get:function(){return this.tooltipLegendTemplateProperty},set:function(c){this.tooltipLegendTemplateProperty=c,this.svgString=void 0,this.notifyPropertyChanged(t.PROPERTY.TOOLTIP_LEGEND_TEMPLATE)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"containerBackground",{get:function(){return this.containerBackgroundProperty},set:function(c){this.containerBackgroundProperty!==c&&(this.containerBackgroundProperty=c,this.notifyPropertyChanged(t.PROPERTY.CONTAINER_BACKGROUND))},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"tooltipLegendOffsetX",{get:function(){return this.tooltipLegendOffsetXProperty},set:function(c){this.tooltipLegendOffsetXProperty!==c&&(this.tooltipLegendOffsetXProperty=c,this.notifyPropertyChanged(t.PROPERTY.TOOLTIP_LEGEND_OFFSET_X))},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"tooltipLegendOffsetY",{get:function(){return this.tooltipLegendOffsetYProperty},set:function(c){this.tooltipLegendOffsetYProperty!==c&&(this.tooltipLegendOffsetYProperty=c,this.notifyPropertyChanged(t.PROPERTY.TOOLTIP_LEGEND_OFFSET_Y))},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"textStroke",{get:function(){return this.textStrokeProperty},set:function(c){this.textStrokeProperty!==c&&(this.textStrokeProperty=c,this.notifyPropertyChanged(t.PROPERTY.TEXT_STROKE))},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"showTooltip",{get:function(){return this.showTooltipProperty},set:function(c){this.showTooltipProperty!==c&&(this.showTooltipProperty=c,this.notifyPropertyChanged(t.PROPERTY.SHOW_LABEL))},enumerable:!1,configurable:!0}),u.prototype.update=function(c,d,f,h){var p=this.cursorModifier.getMousePosition();this.previousMousePosition===p&&p!==e.EMousePosition.SeriesArea||(this.previousMousePosition=this.cursorModifier.getMousePosition(),this.svg&&this.clear(),this.create(c,d,f,h),this.placementDivId?this.updateExternalLegendTooltip():(this.updateTooltip(f,h),this.updateLegendTooltip(f,h)))},u.prototype.clear=function(){!this.parentSurface||this.parentSurface.isDeleted||!this.svg||(this.placementDivId?this.svgDivRoot.removeChild(this.svg):this.svgRoot.removeChild(this.svg),this.setSvg(void 0),this.svgLegend&&(this.svgRoot.removeChild(this.svgLegend),this.svgLegend=void 0))},u.prototype.create=function(c,d,f,h){var p;if(!this.tooltipSvgTemplate)throw Error("Please provide a tooltipSvgTemplate for CursorTooltipSvgAnnotation");var g=(p=this.svgString)!==null&&p!==void 0?p:this.tooltipSvgTemplate(this.seriesInfos,this),v=this.applyClipping(g,this.clipping);if(this.placementDivId){var y=n.annotationHelpers.createSvg(v,this.svgDivRoot);this.setSvg(y)}else{var y=n.annotationHelpers.createSvg(v,this.svgRoot,this.nextSibling);this.setSvg(y)}},u.prototype.updateTooltip=function(c,d){var f,h,p,g,v=(f=this.xCoordShift)!==null&&f!==void 0?f:0,y=(h=this.yCoordShift)!==null&&h!==void 0?h:0;this.svg.style.display=this.showTooltip?"block":"none";var m=(p=this.x1)!==null&&p!==void 0?p:0,b=(g=this.y1)!==null&&g!==void 0?g:0,S=v+m+c,_=y+b+d;isNaN(S)||isNaN(_)?this.svg.style.display="none":(this.setSvgAttribute("x",S),this.setSvgAttribute("y",_))},u.prototype.updateLegendTooltip=function(c,d){if(this.tooltipLegendTemplate){var f=this.seriesInfos?this.tooltipLegendTemplate(this.seriesInfos,this):"<svg></svg>";this.svgLegend&&this.svgRoot.removeChild(this.svgLegend);var h=this.applyClipping(f,this.clipping),p=n.annotationHelpers.createSvg(h,this.svgRoot);this.svgLegend=p,this.svgLegend.setAttribute("x",(this.tooltipLegendOffsetX+c).toString()),this.svgLegend.setAttribute("y",(this.tooltipLegendOffsetY+d).toString())}},u.prototype.updateExternalLegendTooltip=function(){if(this.tooltipLegendTemplate){var c=this.seriesInfos?this.tooltipLegendTemplate(this.seriesInfos,this):"<svg style='display: none'></svg>";this.svgLegend&&this.svgLegend.removeChild(this.svgLegend);var d=this.applyClipping(c,this.clipping),f=n.annotationHelpers.createSvg(d,this.svgRoot);this.svgLegend=f}},u})(a.SvgAnnotationBase);return qT.CursorTooltipSvgAnnotation=s,qT}var Jp={},XT={},Z5={},qie;function Y1(){return qie||(qie=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EModifierMouseArgKey=void 0,(function(e){e.Shift="Shift",e.Ctrl="Ctrl",e.Alt="Alt",e.None="None"})(r.EModifierMouseArgKey||(r.EModifierMouseArgKey={}))})(Z5)),Z5}var J5={},Xie;function uy(){return Xie||(Xie=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EExecuteOn=void 0,(function(e){e[e.MouseLeftButton=0]="MouseLeftButton",e[e.MouseMiddleButton=1]="MouseMiddleButton",e[e.MouseRightButton=2]="MouseRightButton",e[e.BrowserBackButton=3]="BrowserBackButton",e[e.BrowserForwardButton=4]="BrowserForwardButton"})(r.EExecuteOn||(r.EExecuteOn={}))})(J5)),J5}var Q5={},Kie;function cy(){return Kie||(Kie=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.PROPERTY=void 0,(function(e){e.ALLOWS_MULTI_SELECTION="ALLOWS_MULTI_SELECTION",e.ALLOW_TOOLTIP_OVERLAPPING="ALLOW_TOOLTIP_OVERLAPPING",e.CROSSHAIR_STROKE="CROSSHAIR_STROKE",e.EXECUTE_CONDITION="EXECUTE_CONDITION",e.FILL="FILL",e.HIT_TEST_RADIUS="HIT_TEST_RADIUS",e.IS_ATTACHED="IS_ATTACHED",e.IS_ENABLED="IS_ENABLED",e.PARENT_SURFACE="PARENT_SURFACE",e.RECEIVE_HANDLED_EVENTS="RECEIVE_HANDLED_EVENTS",e.SHOW_ROLLOVER_LINE="SHOW_ROLLOVER_LINE",e.SHOW_TOOLTIP="SHOW_TOOLTIP",e.SECONDARY_EXECUTE_CONDITION="SECONDARY_EXECUTE_CONDITION",e.SELECTED_AREA="SELECTED_AREA",e.SELECTION_FILL="SELECTION_FILL",e.SELECTION_STROKE="SELECTION_STROKE",e.SELECTION_STROKE_THICKNESS="SELECTION_STROKE_THICKNESS",e.STROKE="STROKE",e.STROKE_THICKNESS="STROKE_THICKNESS",e.STROKE_DASH_ARRAY="STROKE_DASH_ARRAY",e.TOOLTIP_DATA_TEMPLATE="TOOLTIP_DATA_TEMPLATE",e.X_AXIS_ID="X_AXIS_ID",e.Y_AXIS_ID="Y_AXIS_ID",e.PLACEMENT_DIV_ID="PLACEMENT_DIV_ID",e.X_LINE="X_LINE",e.Y_LINE="Y_LINE",e.AXIS_LABELS="AXIS_LABELS",e.ANGULAR_AXIS_LABELS_PLACEMENT="ANGULAR_AXIS_LABELS_PLACEMENT",e.RADIAL_AXIS_LABELS_PLACEMENT="RADIAL_AXIS_LABELS_PLACEMENT",e.X1="X1",e.X_COORDINATE_MODE="X_COORDINATE_MODE",e.IS_DRAGGABLE="IS_DRAGGABLE",e.LINE_ANNOTATIONS_OPTIONS="LINE_ANNOTATIONS_OPTIONS",e.LINE_SELECTION_COLOR="LINE_SELECTION_COLOR",e.TOOLTIP_SHADOW="TOOLTIP_SHADOW",e.IS_SVG_ONLY="IS_SVG_ONLY"})(r.PROPERTY||(r.PROPERTY={}))})(Q5)),Q5}var Zie;function X8(){if(Zie)return XT;Zie=1;var r=XT&&XT.__extends||(function(){var u=function(c,d){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,h){f.__proto__=h}||function(f,h){for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(f[p]=h[p])},u(c,d)};return function(c,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");u(c,d);function f(){this.constructor=c}c.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}})();Object.defineProperty(XT,"__esModule",{value:!0}),XT.ChartModifierBase=void 0;var e=$n(),i=Y1(),n=uy(),t=Wd(),o=Ha(),a=ws(),s=cy(),l=(function(u){r(c,u);function c(d){var f=this,h,p;return f=u.call(this)||this,f.isEnabledProperty=!0,f.executeConditionProperty={button:n.EExecuteOn.MouseLeftButton},f.activePointerEvents=new Map,f.id=(h=d==null?void 0:d.id)!==null&&h!==void 0?h:(0,a.generateGuid)(),f.executeConditionProperty=(p=d==null?void 0:d.executeCondition)!==null&&p!==void 0?p:f.executeConditionProperty,f.secondaryExecuteConditionProperty=d==null?void 0:d.secondaryExecuteCondition,f}return c.prototype.applyTheme=function(d){},Object.defineProperty(c.prototype,"parentSurface",{get:function(){return this.parentSurfaceProperty},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isEnabled",{get:function(){return this.isEnabledProperty},set:function(d){this.isEnabledProperty=d,this.notifyPropertyChanged(s.PROPERTY.IS_ENABLED)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isAttached",{get:function(){return this.isAttachedProperty},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"receiveHandledEvents",{get:function(){return this.receiveHandledEventsProperty},set:function(d){this.receiveHandledEventsProperty=d,this.notifyPropertyChanged(s.PROPERTY.RECEIVE_HANDLED_EVENTS)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"executeCondition",{get:function(){return this.executeConditionProperty},set:function(d){this.executeConditionProperty=d,this.notifyPropertyChanged(s.PROPERTY.EXECUTE_CONDITION)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"secondaryExecuteCondition",{get:function(){return this.secondaryExecuteConditionProperty},set:function(d){this.secondaryExecuteConditionProperty=d,this.notifyPropertyChanged(s.PROPERTY.SECONDARY_EXECUTE_CONDITION)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"canReceiveMouseEvents",{get:function(){return this.isEnabled&&this.isAttached&&this.parentSurfaceProperty!==void 0},enumerable:!1,configurable:!0}),c.prototype.onAttach=function(){},c.prototype.onDetach=function(){},c.prototype.onAttachSeries=function(d){},c.prototype.onDetachSeries=function(d){},c.prototype.onAttachSubSurface=function(d){},c.prototype.onDetachSubSurface=function(d){},c.prototype.onParentSurfaceRendered=function(){},c.prototype.onParentSurfaceLayoutComplete=function(){},c.prototype.modifierMouseDown=function(d){var f;((f=this.executeCondition)===null||f===void 0?void 0:f.button)===n.EExecuteOn.MouseMiddleButton&&d.nativeEvent.preventDefault();var h=d.pointerType==="touch"||d.pointerType==="pen";h&&this.activePointerEvents.set(d.pointerId,d)},c.prototype.modifierMouseMove=function(d){this.updatePointerInfo(d)},c.prototype.modifierMouseUp=function(d){var f=d.pointerType==="touch"||d.pointerType==="pen";f&&this.activePointerEvents.delete(d.pointerId)},c.prototype.modifierMouseWheel=function(d){},c.prototype.modifierDoubleClick=function(d){},c.prototype.modifierMouseEnter=function(d){},c.prototype.modifierMouseLeave=function(d){this.activePointerEvents.delete(d.pointerId)},c.prototype.modifierDrop=function(d){},c.prototype.modifierPointerCancel=function(d){this.activePointerEvents.delete(d.pointerId)},c.prototype.setParentSurface=function(d){if(!d)this.parentSurfaceProperty=void 0;else{if(d.surfaceType===o.ESurfaceType.SciChartSurfaceType&&this.modifierType!==t.EModifierType.Chart2DModifier)throw d.hasInvalidState=!0,new Error("Only 2D Chart Modifiers can be attached to a 2D SciChartSurface. Please check ".concat(this.constructor.name,".modifierType property to match SciChartSurface.surfaceType"));if(d.surfaceType===o.ESurfaceType.SciChartPolarSurfaceType&&this.modifierType!==t.EModifierType.Chart2DPolarModifier)throw d.hasInvalidState=!0,new Error("Only 2D Polar Chart Modifiers can be attached to a 2D SciChartPolarSurface. Please check ".concat(this.constructor.name,".modifierType property to match SciChartSurface.surfaceType"));if(d.surfaceType===o.ESurfaceType.SciChart3DSurfaceType&&this.modifierType!==t.EModifierType.Chart3DModifier)throw d.hasInvalidState=!0,new Error("Only 3D Chart Modifiers can be attached to a 3D SciChartSurface. Please check ".concat(this.constructor.name,".modifierType property to match SciChartSurface.surfaceType"));this.parentSurfaceProperty=d}this.isAttachedProperty=this.parentSurfaceProperty!==void 0,this.notifyPropertyChanged(s.PROPERTY.PARENT_SURFACE)},c.prototype.checkExecuteCondition=function(d,f){if(f){if(f.button!==void 0&&f.button!==d.button)return!1;if(f.key!==void 0){if(f.key===i.EModifierMouseArgKey.Ctrl){if(!d.ctrlKey)return!1}else if(f.key===i.EModifierMouseArgKey.Alt){if(!d.altKey)return!1}else if(f.key===i.EModifierMouseArgKey.Shift){if(!d.shiftKey)return!1}else if(f.key===i.EModifierMouseArgKey.None&&(d.ctrlKey||d.altKey||d.shiftKey))return!1}return!0}},c.prototype.checkExecuteConditions=function(d){var f=this.checkExecuteCondition(d,this.executeCondition),h=this.checkExecuteCondition(d,this.secondaryExecuteCondition);return{isPrimary:f,isSecondary:h}},c.prototype.delete=function(){},c.prototype.notifyPropertyChanged=function(d){this.invalidateParentCallback&&this.invalidateParentCallback()},c.prototype.updatePointerInfo=function(d){var f;(this.activePointerEvents.size===0||this.activePointerEvents.keys().next().value===d.pointerId)&&(this.mousePoint=d.mousePoint),this.previousPoint=(f=this.activePointerEvents.get(d.pointerId))===null||f===void 0?void 0:f.mousePoint,this.activePointerEvents.has(d.pointerId)&&this.activePointerEvents.set(d.pointerId,d)},c.prototype.getIsActionAllowed=function(d){return!0},c})(e.DeletableEntity);return XT.ChartModifierBase=l,XT}var kI={},Jie;function K8(){if(Jie)return kI;Jie=1,Object.defineProperty(kI,"__esModule",{value:!0}),kI.IncludedItems=void 0;var r=(function(){function e(){this.itemIdsSet=new Set,this.isInclusionSet=!1}return e.prototype.include=function(i){var n=this.itemIdsSet.size===0;return n&&(this.isInclusionSet=!0),this.isInclusionSet?this.itemIdsSet.has(i)?!1:(this.itemIdsSet.add(i),!0):this.itemIdsSet.has(i)?(this.itemIdsSet.delete(i),!0):!1},e.prototype.includeList=function(i){var n=this,t=!1;return i.forEach(function(o){n.include(o)===!0&&(t=!0)}),t},e.prototype.exclude=function(i){var n=this.itemIdsSet.size===0;if(n&&(this.isInclusionSet=!1),this.isInclusionSet)if(this.itemIdsSet.has(i))this.itemIdsSet.delete(i);else return!1;else return this.itemIdsSet.has(i)?!1:(this.itemIdsSet.add(i),!0);return!0},e.prototype.excludeList=function(i){var n=this,t=!1;return i.forEach(function(o){n.exclude(o)===!0&&(t=!0)}),t},e.prototype.testIsIncluded=function(i){return this.isInclusionSet?this.itemIdsSet.has(i):!this.itemIdsSet.has(i)},e.prototype.getIncludedItems=function(i){var n=this;return this.isInclusionSet?i.filter(function(t){return n.itemIdsSet.has(t.id)}):i.filter(function(t){return!n.itemIdsSet.has(t.id)})},e.prototype.getIncludedItemIds=function(){return this.isInclusionSet?Array.from(this.itemIdsSet):[]},e.prototype.getExcludedItemIds=function(){return this.isInclusionSet?[]:Array.from(this.itemIdsSet)},e.prototype.includeAll=function(){this.itemIdsSet.clear(),this.isInclusionSet=!1},e.prototype.excludeAll=function(){this.itemIdsSet.clear(),this.isInclusionSet=!0},e.prototype.reconcile=function(i){var n=this,t=new Set;i.forEach(function(a){return t.add(a.id)});var o=[];this.itemIdsSet.forEach(function(a){t.has(a)||o.push(a)}),o.forEach(function(a){return n.itemIdsSet.delete(a)})},e.prototype.getItemIdsSetSize=function(){return this.itemIdsSet.size},e.prototype.removeId=function(i){this.itemIdsSet.has(i)&&this.itemIdsSet.delete(i)},e})();return kI.IncludedItems=r,kI}var Qie;function nu(){if(Qie)return Jp;Qie=1;var r=Jp&&Jp.__extends||(function(){var d=function(f,h){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,g){p.__proto__=g}||function(p,g){for(var v in g)Object.prototype.hasOwnProperty.call(g,v)&&(p[v]=g[v])},d(f,h)};return function(f,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");d(f,h);function p(){this.constructor=f}f.prototype=h===null?Object.create(h):(p.prototype=h.prototype,new p)}})();Object.defineProperty(Jp,"__esModule",{value:!0}),Jp.getActiveAxes=Jp.testIsOverAxes=Jp.ChartModifierBase2D=void 0;var e=Wd(),i=Os(),n=oo(),t=X8(),o=cy(),a=K8(),s=FH(),l=(function(d){r(f,d);function f(h){var p=this,g,v,y,m,b,S,_,C,T,x,A,w,L,k,D,j;if(p=d.call(this,h)||this,p.xyDirection=i.EXyDirection.XyDirection,p.includedSeries=new a.IncludedItems,p.includedXAxes=new a.IncludedItems,p.includedYAxes=new a.IncludedItems,p.changedPropertiesList=[],p.typeMap=new Map,p.xyDirection=(g=h==null?void 0:h.xyDirection)!==null&&g!==void 0?g:p.xyDirection,p.modifierGroup=(v=h==null?void 0:h.modifierGroup)!==null&&v!==void 0?v:p.modifierGroup,p.xAxisIdProperty=(y=h==null?void 0:h.xAxisId)!==null&&y!==void 0?y:p.xAxisIdProperty,p.yAxisIdProperty=(m=h==null?void 0:h.yAxisId)!==null&&m!==void 0?m:p.yAxisIdProperty,((b=h==null?void 0:h.includedSeriesIds)===null||b===void 0?void 0:b.length)>0&&((S=h==null?void 0:h.excludedSeriesIds)===null||S===void 0?void 0:S.length)>0)throw new Error("You should either use `includedSeriesIds` or `excludedSeriesIds`, not both.");if(((_=h==null?void 0:h.includedXAxisIds)===null||_===void 0?void 0:_.length)>0&&((C=h==null?void 0:h.excludedXAxisIds)===null||C===void 0?void 0:C.length)>0)throw new Error("You should either use `includedXAxisIds` or `excludedXAxisIds`, not both.");if(((T=h==null?void 0:h.includedYAxisIds)===null||T===void 0?void 0:T.length)>0&&((x=h==null?void 0:h.excludedYAxisIds)===null||x===void 0?void 0:x.length)>0)throw new Error("You should either use `includedYAxisIds` or `excludedYAxisIds`, not both.");return((A=h==null?void 0:h.includedSeriesIds)===null||A===void 0?void 0:A.length)>0&&p.includedSeries.includeList(h.includedSeriesIds),((w=h==null?void 0:h.excludedSeriesIds)===null||w===void 0?void 0:w.length)>0&&p.includedSeries.excludeList(h.excludedSeriesIds),((L=h==null?void 0:h.includedXAxisIds)===null||L===void 0?void 0:L.length)>0&&p.includedXAxes.includeList(h.includedXAxisIds),((k=h==null?void 0:h.excludedXAxisIds)===null||k===void 0?void 0:k.length)>0&&p.includedXAxes.excludeList(h.excludedXAxisIds),((D=h==null?void 0:h.includedYAxisIds)===null||D===void 0?void 0:D.length)>0&&p.includedYAxes.includeList(h.includedYAxisIds),((j=h==null?void 0:h.excludedYAxisIds)===null||j===void 0?void 0:j.length)>0&&p.includedYAxes.excludeList(h.excludedYAxisIds),p}return Object.defineProperty(f.prototype,"modifierType",{get:function(){return e.EModifierType.Chart2DModifier},enumerable:!1,configurable:!0}),f.prototype.onAttach=function(){d.prototype.onAttach.call(this),this.linkAxes()},Object.defineProperty(f.prototype,"xAxisId",{get:function(){return this.xAxisIdProperty},set:function(h){h!==this.xAxisIdProperty&&(this.xAxisIdProperty=h,this.xAxisProperty=void 0,this.notifyPropertyChanged(o.PROPERTY.X_AXIS_ID))},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"yAxisId",{get:function(){return this.yAxisIdProperty},set:function(h){h!==this.yAxisIdProperty&&(this.yAxisIdProperty=h,this.yAxisProperty=void 0,this.notifyPropertyChanged(o.PROPERTY.Y_AXIS_ID))},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"xAxis",{get:function(){return this.xAxisProperty},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"yAxis",{get:function(){return this.yAxisProperty},enumerable:!1,configurable:!0}),f.prototype.getAllSeries=function(){return this.parentSurface.renderableSeries.asArray()},f.prototype.getIncludedXAxis=function(){return this.includedXAxes.getIncludedItems(this.parentSurface.xAxes.asArray())},f.prototype.getIncludedYAxis=function(){return this.includedYAxes.getIncludedItems(this.parentSurface.yAxes.asArray())},f.prototype.includeXAxis=function(h,p){p?this.includedXAxes.include(h.id):this.includedXAxes.exclude(h.id)},f.prototype.includeYAxis=function(h,p){p?this.includedYAxes.include(h.id):this.includedYAxes.exclude(h.id)},f.prototype.includeAllAxes=function(){this.includedXAxes.includeAll(),this.includedYAxes.includeAll()},f.prototype.testIsIncludedSeries=function(h){return h.isVisible&&this.includedSeries.testIsIncluded(h.id)},f.prototype.includeSeries=function(h,p){if(p){var g=this.includedSeries.include(h.id);return g&&this.isAttached&&this.onAttachSeries(h),g}else{var g=this.includedSeries.exclude(h.id);return g&&this.isAttached&&this.onDetachSeries(h),g}},f.prototype.getIncludedRenderableSeries=function(){var h=this,p=this.getAllSeries().filter(function(y){return!y.isCollection&&h.testIsIncludedSeries(y)}),g=this.getAllSeries().filter(function(y){return y.isCollection}),v=p;return g.forEach(function(y){y.getVisibleSeries().forEach(function(m){h.testIsIncludedSeries(m)&&v.push(m)})}),v},f.prototype.toJSON=function(){var h={id:this.id,modifierGroup:this.modifierGroup,executeCondition:this.executeCondition,secondaryExecuteCondition:this.secondaryExecuteCondition,xyDirection:this.xyDirection,xAxisId:this.xAxisId,yAxisId:this.yAxisId,includedXAxisIds:this.includedXAxes.getIncludedItemIds(),excludedXAxisIds:this.includedXAxes.getExcludedItemIds(),includedYAxisIds:this.includedYAxes.getIncludedItemIds(),excludedYAxisIds:this.includedYAxes.getExcludedItemIds(),includedSeriesIds:this.includedSeries.getIncludedItemIds(),excludedSeriesIds:this.includedSeries.getExcludedItemIds()};return{type:this.type,options:h}},f.prototype.linkAxes=function(){if((0,s.updateAxisIds)(this),!!this.parentSurface){if(!this.xAxisProperty&&this.xAxisId){var h=this.parentSurface.getXAxisById(this.xAxisId);h?this.xAxisProperty=h:(console.warn('ChartModifier looked for xAxis Id "'.concat(this.xAxisId,'" but did not find. Default xAxis will be used')),this.xAxisProperty=this.parentSurface.getDefaultXAxis())}if(!this.yAxisProperty&&this.yAxisId){var p=this.parentSurface.getYAxisById(this.yAxisId);p?this.yAxisProperty=p:(console.warn('ChartModifier looked for yAxis Id "'.concat(this.yAxisId,'" but did not find. Default yAxis will be used')),this.yAxisProperty=this.parentSurface.getDefaultYAxis())}}},f.prototype.testPropertyChanged=function(h){return this.changedPropertiesList.includes(h)},f.prototype.notifyPropertyChanged=function(h){this.changedPropertiesList.includes(h)||this.changedPropertiesList.push(h),d.prototype.notifyPropertyChanged.call(this,h)},f.prototype.growBy=function(h,p,g){var v=p.isHorizontalAxis,y=p.isAxisFlipped,m=p.viewRect,b=p.flippedCoordinates,S=this.parentSurface.seriesViewRect,_=v?m.width:m.height;p.isStackedAxis&&this.parentSurface&&(_=v?S.width:S.height);var C=v?h.x:h.y,T=C/_*g,x=(1-C/_)*g,A=y&&!b||!y&&b;A?p.zoomBy(x,T):p.zoomBy(T,x)},f})(t.ChartModifierBase);Jp.ChartModifierBase2D=l;var u=function(d,f){var h=!1;return d.forEach(function(p){if(p.viewRect){var g=p.viewRect,v=g.left,y=g.right,m=g.top,b=g.bottom;(0,n.testIsInBounds)(f.x,f.y,v,b,y,m)&&(h=!0)}}),h};Jp.testIsOverAxes=u;var c=function(d,f){var h=[];return d.forEach(function(p){if(p.viewRect){var g=p.viewRect,v=g.left,y=g.right,m=g.top,b=g.bottom;(0,n.testIsInBounds)(f.x,f.y,v,b,y,m)&&h.push(p)}}),h};return Jp.getActiveAxes=c,Jp}var Gm={},ene;function lU(){if(ene)return Gm;ene=1;var r=Gm&&Gm.__extends||(function(){var y=function(m,b){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,_){S.__proto__=_}||function(S,_){for(var C in _)Object.prototype.hasOwnProperty.call(_,C)&&(S[C]=_[C])},y(m,b)};return function(m,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");y(m,b);function S(){this.constructor=m}m.prototype=b===null?Object.create(b):(S.prototype=b.prototype,new S)}})(),e=Gm&&Gm.__spreadArray||function(y,m,b){if(b||arguments.length===2)for(var S=0,_=m.length,C;S<_;S++)(C||!(S in m))&&(C||(C=Array.prototype.slice.call(m,0,S)),C[S]=m[S]);return y.concat(C||Array.prototype.slice.call(m))};Object.defineProperty(Gm,"__esModule",{value:!0}),Gm.SvgLineAnnotation=void 0;var i=wv(),n=Ha(),t=Os(),o=ug(),a=cc(),s=Hi(),l=ta(),u=Zs(),c=Aa(),d=ay(),f=Yo(),h=Vd(),p=Ds(),g=oo(),v=(function(y){r(m,y);function m(b){var S=this,_,C,T,x,A,w,L,k,D,j,N,V;return S=y.call(this,b)||this,S.type=c.EAnnotationType.SvgLineAnnotation,S.surfaceTypes=[n.ESurfaceType.SciChartSurfaceType,n.ESurfaceType.SciChartPolarSurfaceType],S.strokeProperty="#FFFFFF",S.strokeThicknessProperty=1,S.strokeDashArrayProperty=[],S.showLabelProperty=!1,S.axisLabelStrokeProperty="#ffffff",S.axisLabelFillProperty="#b36200",S.labelPlacementProperty=i.ELabelPlacement.Top,S.labelValueProperty="",S.labelPaddingProperty=new f.Thickness(2,4,2,4),S.labelCornerRadiusProperty=2,S.labelCache=new Map,S.axisFontSizeProperty=13,S.axisFontFamilyProperty="Arial",S.stroke=(_=b==null?void 0:b.stroke)!==null&&_!==void 0?_:S.strokeProperty,S.strokeThickness=(C=b==null?void 0:b.strokeThickness)!==null&&C!==void 0?C:S.strokeThicknessProperty,S.strokeDashArray=(T=b==null?void 0:b.strokeDashArray)!==null&&T!==void 0?T:S.strokeDashArrayProperty,S.showLabelProperty=(x=b==null?void 0:b.showLabel)!==null&&x!==void 0?x:S.showLabelProperty,S.axisLabelStrokeProperty=(A=b==null?void 0:b.axisLabelStroke)!==null&&A!==void 0?A:S.axisLabelStrokeProperty,S.axisLabelFillProperty=(w=b==null?void 0:b.axisLabelFill)!==null&&w!==void 0?w:S.axisLabelFillProperty,S.axisFontSizeProperty=(L=b==null?void 0:b.axisFontSize)!==null&&L!==void 0?L:S.axisFontSizeProperty,S.axisFontFamilyProperty=(k=b==null?void 0:b.axisFontFamily)!==null&&k!==void 0?k:S.axisFontFamilyProperty,S.labelPlacementProperty=(D=b==null?void 0:b.labelPlacement)!==null&&D!==void 0?D:S.labelPlacementProperty,S.labelValueProperty=(j=b==null?void 0:b.labelValue)!==null&&j!==void 0?j:S.labelValueProperty,S.labelPaddingProperty=(N=b==null?void 0:b.labelPadding)!==null&&N!==void 0?N:S.labelPaddingProperty,S.labelCornerRadiusProperty=(V=b==null?void 0:b.labelCornerRadius)!==null&&V!==void 0?V:S.labelCornerRadiusProperty,S.resizeDirections=t.EXyDirection.XyDirection,S}return Object.defineProperty(m.prototype,"stroke",{get:function(){return this.strokeProperty},set:function(b){this.strokeProperty=b,this.notifyPropertyChanged(u.PROPERTY.STROKE)},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"strokeThickness",{get:function(){return this.strokeThicknessProperty},set:function(b){this.strokeThicknessProperty=b,this.notifyPropertyChanged(u.PROPERTY.STROKE_THICKNESS)},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"strokeDashArray",{get:function(){return this.strokeDashArrayProperty},set:function(b){this.strokeDashArrayProperty=b,this.notifyPropertyChanged(u.PROPERTY.STROKE_DASH_ARRAY)},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"showLabel",{get:function(){return this.showLabelProperty},set:function(b){this.showLabelProperty=b,this.notifyPropertyChanged(u.PROPERTY.SHOW_LABEL)},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"axisLabelStroke",{get:function(){return this.axisLabelStrokeProperty},set:function(b){this.axisLabelStrokeProperty=b,this.notifyPropertyChanged(u.PROPERTY.AXIS_LABELS_STROKE)},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"axisLabelFill",{get:function(){return this.axisLabelFillProperty},set:function(b){this.axisLabelFillProperty=b,this.notifyPropertyChanged(u.PROPERTY.AXIS_LABELS_FILL)},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"axisFontSize",{get:function(){return this.axisFontSizeProperty},set:function(b){this.axisFontSizeProperty=b,this.notifyPropertyChanged(u.PROPERTY.AXIS_FONT_SIZE)},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"axisFontFamily",{get:function(){return this.axisFontFamilyProperty},set:function(b){this.axisFontFamilyProperty=b,this.notifyPropertyChanged(u.PROPERTY.AXIS_FONT_FAMILY)},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"labelPlacement",{get:function(){return this.labelPlacementProperty},set:function(b){this.labelPlacementProperty=b,this.notifyPropertyChanged(u.PROPERTY.LABEL_PLACEMENT)},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"labelValue",{get:function(){return this.labelValueProperty},set:function(b){this.labelValueProperty=b,this.notifyPropertyChanged(u.PROPERTY.LABEL_VALUE)},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"labelPadding",{get:function(){return this.labelPaddingProperty},set:function(b){this.labelPaddingProperty=b,this.notifyPropertyChanged(u.PROPERTY.LABEL_PADDING)},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"labelCornerRadius",{get:function(){return this.labelCornerRadiusProperty},set:function(b){this.labelCornerRadiusProperty=b,this.notifyPropertyChanged(u.PROPERTY.LABEL_CORNER_RADIUS)},enumerable:!1,configurable:!0}),m.prototype.create=function(b,S,_,C){this.clear();var T=p.annotationHelpers.createSvgLineAndLabel(this.showLabel),x=T.svgElement,A=T.svgLine,w=T.svgLabelsContainer;this.lineEl=A,this.updateLineStyle(),w&&(this.labelsContainer=w),this.setSvg(x),this.svgRoot&&this.svg&&(this.nextSibling?this.svgRoot.insertBefore(this.svg,this.nextSibling):this.svgRoot.appendChild(this.svg)),this.update(b,S,_,C)},m.prototype.update=function(b,S,_,C){var T=this;if(!this.svg||!this.lineEl){this.create(b,S,_,C);return}this.xCoordSvgTransProperty=_,this.yCoordSvgTransProperty=C;var x=this.convertPolarToCartesian(this.getX1Coordinate(b,S),this.getY1Coordinate(b,S),!0),A=x.x,w=x.y,L=this.convertPolarToCartesian(this.getX2Coordinate(b,S),this.getY2Coordinate(b,S),!0),k=L.x,D=L.y,j=Math.floor(A),N=Math.floor(w),V=Math.floor(k),W=Math.floor(D),K=this.parentSurface.xAxes.asArray().filter(function(Ee){return Ee.isVisible}),H=this.parentSurface.yAxes.asArray().filter(function(Ee){return Ee.isVisible}),U=e(e([],K.filter(function(Ee){return!Ee.isVerticalChart}),!0),H.filter(function(Ee){return Ee.isVerticalChart}),!0),I=e(e([],H.filter(function(Ee){return!Ee.isVerticalChart}),!0),K.filter(function(Ee){return Ee.isVerticalChart}),!0);if(this.showLabel&&this.labelsContainer&&!this.parentSurface.isPolar){this.labelCache.forEach(function(Ee){return Ee.inUse=!1});var Q,Z=[];j===V&&N===0?(Q=A,Z=U):N===W&&j===0&&(Q=w,Z=I),Z.forEach(function(Ee){var Re=Q*s.DpiHelper.PIXEL_RATIO;Ee.drawLabels&&(!Ee.isStackedAxis||Ee.offset<Re&&Ee.offset+Ee.getAxisSize()>Re)&&T.drawSvgAxisLabel(Ee,Re)}),this.labelCache.forEach(function(Ee){Ee.inUse||(Ee.group.remove(),T.labelCache.delete(Ee.axisId))}),this.labelsContainer.style.display="block"}else this.labelsContainer&&(this.labelsContainer.style.display="none");if(j===V&&N===0&&(W-=C,this.showLabel&&U.length>0)){var ee=U.find(function(Ee){return Ee.axisAlignment===a.EAxisAlignment.Top}),ie=ee?ee.axisRenderer.getAxisReservedSpace(!0):0,de=U.find(function(Ee){return Ee.axisAlignment===a.EAxisAlignment.Bottom}),pe=de?de.axisRenderer.getAxisReservedSpace(!0):0;N-=ie,W+=pe}if(N===W&&j===0&&(V-=_,this.showLabel&&I.length>0)){var _e=I.find(function(Ee){return Ee.axisAlignment===a.EAxisAlignment.Left}),Te=_e?_e.axisRenderer.getAxisReservedSpace(!0):0,De=I.find(function(Ee){return Ee.axisAlignment===a.EAxisAlignment.Right}),Pe=De?De.axisRenderer.getAxisReservedSpace(!0):0;j-=Te,V+=Pe}j+=_,N+=C,V+=_,W+=C,this.lineEl.setAttribute("x1",j.toString()),this.lineEl.setAttribute("y1",N.toString()),this.lineEl.setAttribute("x2",V.toString()),this.lineEl.setAttribute("y2",W.toString()),this.svg.style.visibility=this.isHidden?"hidden":"visible",this.svg.style.opacity=this.opacity.toString(),this.setAnnotationBorders(j,N,V,W),this.updateAdornerInner()},m.prototype.drawSvgAxisLabel=function(b,S){var _,C,T,x;if(this.labelsContainer){var A=this.labelValue||(0,o.getLabelValue)(b,S);if(A){var w=this.labelCache.get(b.id);if(!w){var L="http://www.w3.org/2000/svg",k=document.createElementNS(L,"g"),D=document.createElementNS(L,"rect"),j=document.createElementNS(L,"text");k.appendChild(D),k.appendChild(j),this.labelsContainer.appendChild(k),w={group:k,rect:D,text:j,axisId:b.id,inUse:!0},this.labelCache.set(b.id,w)}w.inUse=!0,w.group.style.display="block";var N=this.axisLabelFill,V=this.axisLabelStroke,W=(0,h.getFontFamily)((C=(_=b.labelStyle)===null||_===void 0?void 0:_.fontFamily)!==null&&C!==void 0?C:this.axisFontFamily,!1),K=(x=(T=b.labelStyle)===null||T===void 0?void 0:T.fontSize)!==null&&x!==void 0?x:this.axisFontSize;w.text.setAttribute("font-family",W),w.text.setAttribute("font-size",K.toString()),w.text.setAttribute("fill",V),w.text.setAttribute("text-anchor","middle"),w.text.setAttribute("dominant-baseline","central"),w.text.textContent=A,w.rect.setAttribute("fill",N),w.rect.setAttribute("stroke","none"),w.rect.setAttribute("rx",this.labelCornerRadiusProperty.toString());var H=w.text.getBBox(),U=s.DpiHelper.PIXEL_RATIO,I=new f.Thickness(this.labelPaddingProperty.top/U,this.labelPaddingProperty.right/U,this.labelPaddingProperty.bottom/U,this.labelPaddingProperty.left/U),Q=H.width+I.left+I.right,Z=H.height+I.top+I.bottom,ee=b.viewRect,ie=b.offset,de=0,pe=0,_e=function(xe,ve,he){var Se=he*U;return xe+ve-Se/2},Te=ee.y/U,De=ee.height/U,Pe=ee.x/U,Ee=ee.width/U,Re=b.axisRenderer.getAxisReservedSpace(!0);switch(b.axisAlignment){case a.EAxisAlignment.Top:de=_e(ee.x-ie,S,Q)/U,b.isInnerAxis?pe=Te:pe=Te+De-Z,pe-=Re;break;case a.EAxisAlignment.Bottom:de=_e(ee.x-ie,S,Q)/U,b.isInnerAxis?pe=Te+De-Z:pe=Te,pe+=Re;break;case a.EAxisAlignment.Left:pe=_e(ee.y-ie,S,Z)/U,b.isInnerAxis?de=Pe:de=Pe+Ee-Q,de-=Re;break;case a.EAxisAlignment.Right:pe=_e(ee.y-ie,S,Z)/U,b.isInnerAxis?de=Pe+Ee-Q:de=Pe,de+=Re;break}var je=Math.round(de),Ke=Math.round(pe);w.rect.setAttribute("x",je.toString()),w.rect.setAttribute("y",Ke.toString()),w.rect.setAttribute("width",Q.toString()),w.rect.setAttribute("height",Z.toString());var ot=je+Q/2,We=Ke+Z/2;w.text.setAttribute("x",ot.toString()),w.text.setAttribute("y",We.toString())}}},m.prototype.getAnnotationBorders=function(){var b=this.xAxis.getCurrentCoordinateCalculator(),S=this.yAxis.getCurrentCoordinateCalculator(),_=this.convertPolarToCartesian(this.getX1Coordinate(b,S),this.getY1Coordinate(b,S),!0),C=_.x,T=_.y,x=this.convertPolarToCartesian(this.getX2Coordinate(b,S),this.getY2Coordinate(b,S),!0),A=x.x,w=x.y;return{x1:C+this.xCoordSvgTransProperty,x2:A+this.xCoordSvgTransProperty,y1:T+this.yCoordSvgTransProperty,y2:w+this.yCoordSvgTransProperty}},m.prototype.getAdornerAnnotationBorders=function(b,S){var _=this.getAnnotationBorders(),C=_.x1,T=_.x2,x=_.y1,A=_.y2;if(S){var w=this.strokeThickness/2,L=this.strokeThickness/2;C-=w,T+=w,x-=L,A+=L}return{x1:C,x2:T,y1:x,y2:A}},m.prototype.svgStringAdornerTemplate=function(b,S,_,C){var T=this.selectionBoxStroke;return`<svg xmlns="http://www.w3.org/2000/svg">
    <line x1="`.concat(b,'" y1="').concat(S,'" x2="').concat(_,'" y2="').concat(C,'" stroke="').concat(T,`" stroke-width="6" />
    `).concat(this.canDragPoint(l.EDraggingGripPoint.x1y1)?this.getAnnotationGripSvg(b,S):"",`
    `).concat(this.canDragPoint(l.EDraggingGripPoint.x2y2)?this.getAnnotationGripSvg(_,C):"",`
    </svg>`)},m.prototype.onDragStarted=function(b){y.prototype.onDragStarted.call(this,b);var S=this.getAnnotationBorders(),_=S.x1,C=S.x2,T=S.y1,x=S.y2,A=b.mousePoint.x/s.DpiHelper.PIXEL_RATIO,w=b.mousePoint.y/s.DpiHelper.PIXEL_RATIO;if(this.canDragPoint(l.EDraggingGripPoint.x1y1)){var L=(0,g.calcDistance)(_,T,A,w);if(L<this.annotationsGripsRadius*s.DpiHelper.PIXEL_RATIO)return this.adornerDraggingPoint=l.EDraggingGripPoint.x1y1,!0}if(this.canDragPoint(l.EDraggingGripPoint.x2y2)){var L=(0,g.calcDistance)(C,x,A,w);if(L<this.annotationsGripsRadius*s.DpiHelper.PIXEL_RATIO)return this.adornerDraggingPoint=l.EDraggingGripPoint.x2y2,!0}return this.canDragPoint(l.EDraggingGripPoint.Body)&&this.clickToSelect(b)?(this.adornerDraggingPoint=l.EDraggingGripPoint.Body,!0):!1},m.prototype.calcDragDistance=function(b){if(!this.prevValue){this.prevValue=b;return}this.adornerDraggingPoint===l.EDraggingGripPoint.Body?(this.x1=this.x1+this.applyPixelRatioToDragDist(b.x-this.prevValue.x),this.x2=this.x2+this.applyPixelRatioToDragDist(b.x-this.prevValue.x),this.y1=this.y1+(b.y-this.prevValue.y),this.y2=this.y2+(b.y-this.prevValue.y)):this.adornerDraggingPoint===l.EDraggingGripPoint.x1y1?this.resizeDirections===t.EXyDirection.XDirection?this.x1+=this.applyPixelRatioToDragDist(b.x-this.prevValue.x):this.resizeDirections===t.EXyDirection.YDirection?this.y1+=b.y-this.prevValue.y:(this.x1+=this.applyPixelRatioToDragDist(b.x-this.prevValue.x),this.y1+=b.y-this.prevValue.y):this.adornerDraggingPoint===l.EDraggingGripPoint.x2y2&&(this.resizeDirections===t.EXyDirection.XDirection?this.x2+=this.applyPixelRatioToDragDist(b.x-this.prevValue.x):this.resizeDirections===t.EXyDirection.YDirection?this.y2+=b.y-this.prevValue.y:(this.x2+=this.applyPixelRatioToDragDist(b.x-this.prevValue.x),this.y2+=b.y-this.prevValue.y)),this.prevValue=b},m.prototype.checkIsClickedOnAnnotationInternal=function(b,S){var _=this.getAnnotationBorders(),C=_.x1,T=_.x2,x=_.y1,A=_.y2,w=b/s.DpiHelper.PIXEL_RATIO+this.xCoordSvgTransProperty,L=S/s.DpiHelper.PIXEL_RATIO+this.yCoordSvgTransProperty,k=(0,g.calcDistanceFromLineSegment)(w,L,C,x,T,A);return k<=m.DISTANCE_TO_LINE},m.prototype.notifyPropertyChanged=function(b){y.prototype.notifyPropertyChanged.call(this,b);var S=[u.PROPERTY.STROKE,u.PROPERTY.STROKE_THICKNESS,u.PROPERTY.STROKE_DASH_ARRAY,u.PROPERTY.OPACITY],_=[u.PROPERTY.AXIS_LABELS_FILL,u.PROPERTY.AXIS_LABELS_STROKE,u.PROPERTY.SHOW_LABEL];S.includes(b)&&this.updateLineStyle(),_.includes(b)&&(this.labelsContainer&&(this.labelsContainer.innerHTML=""),this.labelCache.clear())},m.prototype.updateLineStyle=function(){this.lineEl&&(this.lineEl.setAttribute("stroke",this.stroke),this.lineEl.setAttribute("stroke-width",this.strokeThickness.toString()),this.lineEl.setAttribute("stroke-opacity",this.opacity.toString()),this.lineEl.setAttribute("shape-rendering","crispEdges"),this.strokeDashArray&&this.strokeDashArray.length>0?this.lineEl.setAttribute("stroke-dasharray",this.strokeDashArray.join(" ")):this.lineEl.removeAttribute("stroke-dasharray"))},m.prototype.toJSON=function(){var b=y.prototype.toJSON.call(this),S={axisFontFamily:this.axisFontFamily,axisFontSize:this.axisFontSize,axisLabelFill:this.axisLabelFill,axisLabelStroke:this.axisLabelStroke,labelPlacement:this.labelPlacement,labelValue:this.labelValue,showLabel:this.showLabel,stroke:this.stroke,strokeDashArray:this.strokeDashArray,strokeThickness:this.strokeThickness,labelPadding:this.labelPadding,labelCornerRadius:this.labelCornerRadius};return Object.assign(b.options,S),b},m.DISTANCE_TO_LINE=10,m})(d.SvgAnnotationBase);return Gm.SvgLineAnnotation=v,Gm}var tne;function qw(){return tne||(tne=1,(function(r){var e=LI&&LI.__extends||(function(){var C=function(T,x){return C=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,w){A.__proto__=w}||function(A,w){for(var L in w)Object.prototype.hasOwnProperty.call(w,L)&&(A[L]=w[L])},C(T,x)};return function(T,x){if(typeof x!="function"&&x!==null)throw new TypeError("Class extends value "+String(x)+" is not a constructor or null");C(T,x);function A(){this.constructor=T}T.prototype=x===null?Object.create(x):(A.prototype=x.prototype,new A)}})();Object.defineProperty(r,"__esModule",{value:!0}),r.adjustTooltipPosition=r.calcTooltipSize=r.defaultCursorTooltipSvgTemplate=r.CursorModifier=void 0;var i=Jn(),n=Mr(),t=$o(),o=bo(),a=sb(),s=mi(),l=pn(),u=ta(),c=LM(),d=q8(),f=t_(),h=ln(),p=nu(),g=cy(),v=lU(),y=(function(C){e(T,C);function T(x){var A=this,w,L,k,D,j,N,V,W,K,H,U,I,Q,Z,ee,ie,de,pe,_e,Te,De,Pe,Ee,Re,je,Ke,ot;return A=C.call(this,x)||this,A.type=o.EChart2DModifierType.Cursor,A.tooltipSvgTemplate=r.defaultCursorTooltipSvgTemplate,A.crosshairStrokeThickness=2,A.crosshairStrokeDashArray=[],A.tooltipContainerBackground="#228B22",A.tooltipTextStroke="#fff",A.showTooltip=!1,A.axisLabelStroke="#fff",A.axisLabelFill="#228B22",A.xAxisLabelStroke=void 0,A.xAxisLabelFill=void 0,A.yAxisLabelStroke=void 0,A.yAxisLabelFill=void 0,A.tooltipLegendOffsetX=0,A.tooltipLegendOffsetY=0,A.axisLabelPadding=void 0,A.axisLabelCornerRadius=2,A.hitTestRadius=0,A.showOnOthersInGroup={xLine:!0,yLine:!0,tooltip:!0},A.mousePosition=a.EMousePosition.OutOfCanvas,A.crosshairStrokeProperty=h.SciChartSurfaceBase.DEFAULT_THEME.cursorLineBrush,A.tooltipShadowProperty=h.SciChartSurfaceBase.DEFAULT_THEME.shadowEffectColor,A.showXLineProperty=!0,A.showYLineProperty=!0,A.showAxisLabelsProperty=!0,A.isSvgOnlyProperty=!0,x!=null&&x.tooltipSvgTemplate&&typeof x.tooltipSvgTemplate=="string"&&(A.typeMap.set("tooltipSvgTemplate",x.tooltipSvgTemplate),x.tooltipSvgTemplate=(0,i.getFunction)(t.EBaseType.OptionFunction,x.tooltipSvgTemplate)),A.tooltipSvgTemplate=(w=x==null?void 0:x.tooltipSvgTemplate)!==null&&w!==void 0?w:A.tooltipSvgTemplate,A.crosshairStrokeThickness=(L=x==null?void 0:x.crosshairStrokeThickness)!==null&&L!==void 0?L:A.crosshairStrokeThickness,A.crosshairStrokeDashArray=(k=x==null?void 0:x.crosshairStrokeDashArray)!==null&&k!==void 0?k:A.crosshairStrokeDashArray,A.crosshairStroke=(D=x==null?void 0:x.crosshairStroke)!==null&&D!==void 0?D:A.crosshairStroke,A.tooltipContainerBackground=(j=x==null?void 0:x.tooltipContainerBackground)!==null&&j!==void 0?j:A.tooltipContainerBackground,A.tooltipTextStroke=(N=x==null?void 0:x.tooltipTextStroke)!==null&&N!==void 0?N:A.tooltipTextStroke,A.tooltipShadow=(V=x==null?void 0:x.tooltipShadow)!==null&&V!==void 0?V:A.tooltipShadowProperty,A.showTooltip=(W=x==null?void 0:x.showTooltip)!==null&&W!==void 0?W:A.showTooltip,A.showAxisLabels=(K=x==null?void 0:x.showAxisLabels)!==null&&K!==void 0?K:A.showAxisLabels,A.axisLabelFill=(H=x==null?void 0:x.axisLabelFill)!==null&&H!==void 0?H:A.axisLabelFill,A.axisLabelStroke=(U=x==null?void 0:x.axisLabelStroke)!==null&&U!==void 0?U:A.axisLabelStroke,A.xAxisLabelStroke=(I=x==null?void 0:x.xAxisLabelStroke)!==null&&I!==void 0?I:A.xAxisLabelStroke,A.xAxisLabelFill=(Q=x==null?void 0:x.xAxisLabelFill)!==null&&Q!==void 0?Q:A.xAxisLabelFill,A.yAxisLabelStroke=(Z=x==null?void 0:x.yAxisLabelStroke)!==null&&Z!==void 0?Z:A.yAxisLabelStroke,A.yAxisLabelFill=(ee=x==null?void 0:x.yAxisLabelFill)!==null&&ee!==void 0?ee:A.yAxisLabelFill,A.axisLabelPadding=(ie=x==null?void 0:x.axisLabelPadding)!==null&&ie!==void 0?ie:A.axisLabelPadding,A.axisLabelCornerRadius=(de=x==null?void 0:x.axisLabelCornerRadius)!==null&&de!==void 0?de:A.axisLabelCornerRadius,A.isSvgOnlyProperty=(pe=x==null?void 0:x.isSvgOnly)!==null&&pe!==void 0?pe:A.isSvgOnlyProperty,A.placementDivIdProperty=(_e=x==null?void 0:x.placementDivId)!==null&&_e!==void 0?_e:A.placementDivIdProperty,A.showOnOthersInGroup=(Te=x==null?void 0:x.showOnOthersInGroup)!==null&&Te!==void 0?Te:A.showOnOthersInGroup,x!=null&&x.tooltipLegendTemplate&&typeof x.tooltipLegendTemplate=="string"&&(A.typeMap.set("tooltipLegendTemplate",x.tooltipLegendTemplate),x.tooltipLegendTemplate=(0,i.getFunction)(t.EBaseType.OptionFunction,x.tooltipLegendTemplate)),A.tooltipLegendTemplate=(De=x==null?void 0:x.tooltipLegendTemplate)!==null&&De!==void 0?De:A.tooltipLegendTemplate,A.tooltipLegendOffsetX=(Pe=x==null?void 0:x.tooltipLegendOffsetX)!==null&&Pe!==void 0?Pe:A.tooltipLegendOffsetX,A.tooltipLegendOffsetY=(Ee=x==null?void 0:x.tooltipLegendOffsetY)!==null&&Ee!==void 0?Ee:A.tooltipLegendOffsetY,x!=null&&x.tooltipDataTemplate&&typeof x.tooltipDataTemplate=="string"&&(A.typeMap.set("tooltipDataTemplate",x.tooltipDataTemplate),x.tooltipDataTemplate=(0,i.getFunction)(t.EBaseType.OptionFunction,x.tooltipDataTemplate)),A.tooltipDataTemplateProperty=(Re=x==null?void 0:x.tooltipDataTemplate)!==null&&Re!==void 0?Re:A.tooltipDataTemplateProperty,A.showXLine=(je=x==null?void 0:x.showXLine)!==null&&je!==void 0?je:A.showXLine,A.showYLine=(Ke=x==null?void 0:x.showYLine)!==null&&Ke!==void 0?Ke:A.showYLine,A.hitTestRadius=(ot=x==null?void 0:x.hitTestRadius)!==null&&ot!==void 0?ot:A.hitTestRadius,A}return T.prototype.applyTheme=function(x){this.testPropertyChanged(g.PROPERTY.CROSSHAIR_STROKE)||(this.crosshairStroke=x.cursorLineBrush),this.testPropertyChanged(g.PROPERTY.TOOLTIP_SHADOW)||(this.tooltipShadow=x.shadowEffectColor)},T.prototype.onAttach=function(){var x;C.prototype.onAttach.call(this);var A=this.xAxisLabelFill?this.xAxisLabelFill:this.axisLabelFill,w=this.yAxisLabelFill?this.yAxisLabelFill:this.axisLabelFill,L=this.xAxisLabelStroke?this.xAxisLabelStroke:this.axisLabelStroke,k=this.yAxisLabelStroke?this.yAxisLabelStroke:this.axisLabelStroke;this.showXLine&&(this.xLineAnnotation=this.newLineAnnotation(A,L),this.parentSurface.modifierAnnotations.add(this.xLineAnnotation)),this.showYLine&&(this.yLineAnnotation=this.newLineAnnotation(w,k),this.parentSurface.modifierAnnotations.add(this.yLineAnnotation)),this.tooltipAnnotation=new d.CursorTooltipSvgAnnotation({cursorModifier:this,xCoordinateMode:u.ECoordinateMode.Pixel,yCoordinateMode:u.ECoordinateMode.Pixel,tooltipSvgTemplate:(x=this.tooltipSvgTemplate)!==null&&x!==void 0?x:r.defaultCursorTooltipSvgTemplate,containerBackground:this.tooltipContainerBackground,textStroke:this.tooltipTextStroke,tooltipLegendTemplate:this.tooltipLegendTemplate,tooltipLegendOffsetX:this.tooltipLegendOffsetX,tooltipLegendOffsetY:this.tooltipLegendOffsetY,xAxisId:this.xAxisId,yAxisId:this.yAxisId,placementDivId:this.placementDivId,clipping:c.EAnnotationClippingMode.Chart}),this.parentSurface.modifierAnnotations.add(this.tooltipAnnotation)},T.prototype.onDetach=function(){C.prototype.onDetach.call(this),this.xLineAnnotation&&this.parentSurface.modifierAnnotations.remove(this.xLineAnnotation,!0),this.yLineAnnotation&&this.parentSurface.modifierAnnotations.remove(this.yLineAnnotation,!0),this.parentSurface.modifierAnnotations.remove(this.tooltipAnnotation,!0)},T.prototype.onAttachSeries=function(x){this.tooltipAnnotation.seriesInfos=this.getSeriesInfos()},T.prototype.onDetachSeries=function(x){this.tooltipAnnotation.seriesInfos=this.getSeriesInfos()},T.prototype.modifierMouseMove=function(x){if(!(this.parentSurface.isSubSurface&&!x.isActiveSubChartEvent)){this.isMasterEvent=x.isMaster,this.activePointerEvents.set(x.pointerId,x),C.prototype.modifierMouseMove.call(this,x);var A;this.mousePoint?(A=(0,l.translateFromCanvasToSeriesViewRect)(this.mousePoint,this.parentSurface.seriesViewRect),A?this.mousePosition=a.EMousePosition.SeriesArea:this.mousePosition=a.EMousePosition.AxisArea):this.mousePosition=a.EMousePosition.OutOfCanvas;var w=this.getIsActionAllowed(x);w&&this.update()}},T.prototype.modifierMouseLeave=function(x){C.prototype.modifierMouseLeave.call(this,x),this.mousePosition=a.EMousePosition.OutOfCanvas,this.update()},T.prototype.onParentSurfaceRendered=function(){},T.prototype.onParentSurfaceLayoutComplete=function(){this.update()},Object.defineProperty(T.prototype,"crosshairStroke",{get:function(){return this.crosshairStrokeProperty},set:function(x){this.crosshairStrokeProperty!==x&&(this.crosshairStrokeProperty=x,this.notifyPropertyChanged(g.PROPERTY.CROSSHAIR_STROKE))},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"tooltipShadow",{get:function(){return this.tooltipShadowProperty},set:function(x){this.tooltipShadowProperty!==x&&(this.tooltipShadowProperty=x,this.notifyPropertyChanged(g.PROPERTY.TOOLTIP_SHADOW))},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"showXLine",{get:function(){return this.showXLineProperty},set:function(x){if(this.showXLineProperty!==x){if(this.showXLineProperty=x,this.showXLineProperty&&!this.xLineAnnotation){var A=this.xAxisLabelFill?this.xAxisLabelFill:this.axisLabelFill,w=this.xAxisLabelStroke?this.xAxisLabelStroke:this.axisLabelStroke;this.xLineAnnotation=this.newLineAnnotation(A,w),this.parentSurface.modifierAnnotations.add(this.xLineAnnotation)}else!this.showXLineProperty&&this.xLineAnnotation&&(this.parentSurface.modifierAnnotations.remove(this.xLineAnnotation,!1),this.xLineAnnotation=(0,n.deleteSafe)(this.xLineAnnotation));this.notifyPropertyChanged(g.PROPERTY.X_LINE)}},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"showYLine",{get:function(){return this.showYLineProperty},set:function(x){if(this.showYLineProperty!==x){if(this.showYLineProperty=x,this.showYLineProperty&&!this.yLineAnnotation){var A=this.yAxisLabelFill?this.yAxisLabelFill:this.axisLabelFill,w=this.yAxisLabelStroke?this.yAxisLabelStroke:this.axisLabelStroke;this.yLineAnnotation=this.newLineAnnotation(A,w),this.parentSurface.modifierAnnotations.add(this.yLineAnnotation)}else!this.showYLineProperty&&this.yLineAnnotation&&(this.parentSurface.modifierAnnotations.remove(this.yLineAnnotation,!1),this.yLineAnnotation=(0,n.deleteSafe)(this.yLineAnnotation));this.notifyPropertyChanged(g.PROPERTY.Y_LINE)}},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"showAxisLabels",{get:function(){return this.showAxisLabelsProperty},set:function(x){this.showAxisLabelsProperty!==x&&(this.showAxisLabelsProperty=x,this.xLineAnnotation&&(this.xLineAnnotation.showLabel=this.showAxisLabelsProperty),this.yLineAnnotation&&(this.yLineAnnotation.showLabel=this.showAxisLabelsProperty),this.notifyPropertyChanged(g.PROPERTY.AXIS_LABELS))},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"isSvgOnly",{get:function(){return this.isSvgOnlyProperty},set:function(x){this.isSvgOnlyProperty!==x&&(this.isSvgOnlyProperty=x,this.notifyPropertyChanged(g.PROPERTY.IS_SVG_ONLY))},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"placementDivId",{get:function(){return this.placementDivIdProperty},set:function(x){this.placementDivIdProperty!==x&&(this.placementDivIdProperty=x,this.notifyPropertyChanged(g.PROPERTY.PLACEMENT_DIV_ID))},enumerable:!1,configurable:!0}),T.prototype.includeSeries=function(x,A){return C.prototype.includeSeries.call(this,x,A)?(this.isAttached&&(this.tooltipAnnotation.seriesInfos=this.getSeriesInfos()),!0):!1},Object.defineProperty(T.prototype,"tooltipDataTemplate",{get:function(){return this.tooltipDataTemplateProperty},set:function(x){this.tooltipDataTemplateProperty=x,this.notifyPropertyChanged(g.PROPERTY.TOOLTIP_DATA_TEMPLATE)},enumerable:!1,configurable:!0}),T.prototype.hitTestRenderableSeries=function(x,A){if(A)return this.hitTestRadius<=0?x.hitTestProvider.hitTestXSlice(A.x,A.y):x.hitTestProvider.hitTestDataPoint(A.x,A.y,this.hitTestRadius)},T.prototype.getMousePosition=function(){return this.mousePosition},T.prototype.toJSON=function(){var x=C.prototype.toJSON.call(this),A={axisLabelFill:this.axisLabelFill,axisLabelStroke:this.axisLabelStroke,xAxisLabelFill:this.xAxisLabelFill,xAxisLabelStroke:this.xAxisLabelStroke,yAxisLabelFill:this.yAxisLabelFill,yAxisLabelStroke:this.yAxisLabelStroke,crosshairStroke:this.crosshairStroke,crosshairStrokeDashArray:this.crosshairStrokeDashArray,crosshairStrokeThickness:this.crosshairStrokeThickness,hitTestRadius:this.hitTestRadius,placementDivId:this.placementDivId,showAxisLabels:this.showAxisLabels,axisLabelPadding:this.axisLabelPadding,axisLabelCornerRadius:this.axisLabelCornerRadius,showTooltip:this.showTooltip,showXLine:this.showXLine,showYLine:this.showYLine,tooltipContainerBackground:this.tooltipContainerBackground,tooltipDataTemplate:this.typeMap.get("tooltipDataTemplate"),tooltipLegendOffsetX:this.tooltipLegendOffsetX,tooltipLegendOffsetY:this.tooltipLegendOffsetY,tooltipLegendTemplate:this.typeMap.get("tooltipLegendTemplate"),tooltipSvgTemplate:this.typeMap.get("tooltipSvgTemplate"),tooltipTextStroke:this.tooltipTextStroke,tooltipShadow:this.tooltipShadow,isSvgOnly:this.isSvgOnlyProperty,showOnOthersInGroup:this.showOnOthersInGroup};return Object.assign(x.options,A),x},T.prototype.notifyPropertyChanged=function(x){C.prototype.notifyPropertyChanged.call(this,x),x===g.PROPERTY.X_AXIS_ID&&(this.tooltipAnnotation&&(this.tooltipAnnotation.xAxisId=this.xAxisId),this.xLineAnnotation&&(this.xLineAnnotation.xAxisId=this.xAxisId),this.yLineAnnotation&&(this.yLineAnnotation.xAxisId=this.xAxisId)),x===g.PROPERTY.Y_AXIS_ID&&(this.tooltipAnnotation&&(this.tooltipAnnotation.yAxisId=this.yAxisId),this.xLineAnnotation&&(this.xLineAnnotation.yAxisId=this.yAxisId),this.yLineAnnotation&&(this.yLineAnnotation.yAxisId=this.yAxisId))},T.prototype.getSeriesInfos=function(){var x=this;return this.getIncludedRenderableSeries().map(function(A){var w=x.hitTestRenderableSeries(A,x.mousePoint);if(w)return A.getSeriesInfo(w)}).filter(function(A){return A!==void 0})},T.prototype.update=function(){var x,A,w,L,k,D;if(this.mousePosition!==a.EMousePosition.SeriesArea){this.xLineAnnotation&&(this.xLineAnnotation.isHidden=!0),this.yLineAnnotation&&(this.yLineAnnotation.isHidden=!0),this.tooltipAnnotation.isHidden=!0,this.tooltipAnnotation.seriesInfos=[],this.placementDivId&&this.tooltipAnnotation.delete();return}var j=(0,l.translateFromCanvasToSeriesViewRect)(this.mousePoint,this.parentSurface.seriesViewRect);this.xLineAnnotation&&(this.isMasterEvent||(!((A=(x=this.showOnOthersInGroup)===null||x===void 0?void 0:x.xLine)!==null&&A!==void 0)||A))&&(this.xLineAnnotation.isHidden=!1),this.yLineAnnotation&&(this.isMasterEvent||(!((L=(w=this.showOnOthersInGroup)===null||w===void 0?void 0:w.yLine)!==null&&L!==void 0)||L))&&(this.yLineAnnotation.isHidden=!1);var N=this.showTooltip&&(this.isMasterEvent||((D=(k=this.showOnOthersInGroup)===null||k===void 0?void 0:k.tooltip)!==null&&D!==void 0?D:!0));if(this.tooltipAnnotation.isHidden=!1,this.tooltipAnnotation.showTooltip=N,j){var V=(0,l.translateToNotScaled)(j.x),W=(0,l.translateToNotScaled)(j.y);if(this.xLineAnnotation&&(this.xLineAnnotation.y1=0),this.yLineAnnotation&&(this.yLineAnnotation.x1=0),this.parentSurface.isPolar){var K=this.yAxis,H=K.reverseTransform(V,W);this.xLineAnnotation&&(this.xLineAnnotation.x1=0,this.xLineAnnotation.x2=H.y,this.xLineAnnotation.y2=K.getAxisSize())}else this.isVerticalChart()?(this.xLineAnnotation&&(this.xLineAnnotation.y2=(0,l.translateToNotScaled)(this.parentSurface.seriesViewRect.right),this.xLineAnnotation.x1=W,this.xLineAnnotation.x2=W),this.yLineAnnotation&&(this.yLineAnnotation.x2=(0,l.translateToNotScaled)(this.parentSurface.seriesViewRect.bottom),this.yLineAnnotation.y1=V,this.yLineAnnotation.y2=V)):(this.xLineAnnotation&&(this.xLineAnnotation.y2=(0,l.translateToNotScaled)(this.parentSurface.seriesViewRect.bottom),this.xLineAnnotation.x1=V,this.xLineAnnotation.x2=V),this.yLineAnnotation&&(this.yLineAnnotation.x2=(0,l.translateToNotScaled)(this.parentSurface.seriesViewRect.right),this.yLineAnnotation.y1=W,this.yLineAnnotation.y2=W));N&&(this.tooltipAnnotation.x1=V,this.tooltipAnnotation.y1=W),(N||this.tooltipLegendTemplate)&&(this.tooltipAnnotation.seriesInfos=this.getSeriesInfos())}},T.prototype.newLineAnnotation=function(x,A){var w={xCoordinateMode:u.ECoordinateMode.Pixel,yCoordinateMode:u.ECoordinateMode.Pixel,strokeThickness:this.crosshairStrokeThickness,strokeDashArray:this.crosshairStrokeDashArray,stroke:this.crosshairStroke,isHidden:!0,showLabel:this.showAxisLabels,axisLabelFill:x,axisLabelStroke:A,xAxisId:this.xAxisId,yAxisId:this.yAxisId,labelPadding:this.axisLabelPadding,labelCornerRadius:this.axisLabelCornerRadius};return this.isSvgOnlyProperty?new v.SvgLineAnnotation(w):new f.LineAnnotation(w)},T.prototype.isVerticalChart=function(){var x,A;return(A=(x=this.xAxis)===null||x===void 0?void 0:x.isVerticalChart)!==null&&A!==void 0?A:!1},T})(p.ChartModifierBase2D);r.CursorModifier=y;var m=function(C,T){var x=[];return T&&x.push(T),C.forEach(function(A,w){var L;if(A.isHit){var k=(L=A.seriesName)!==null&&L!==void 0?L:"Series #".concat(w+1);x.push.apply(x,A.getValuesWithLabels(k,"X","Y",!1))}}),x},b=function(C,T){var x,A="id_".concat(Date.now()),w=(x=T.cursorModifier.tooltipDataTemplate)!==null&&x!==void 0?x:m,L=w(C,T.title);if(L.length===0)return"<svg></svg>";var k=(0,r.calcTooltipSize)(L,13),D=k.width,j=k.height;(0,r.adjustTooltipPosition)(D,j,T);var N="";L.forEach(function(Z,ee){N+='<tspan x="8" dy="1.2em">'.concat(Z,"</tspan>")});var V="95%";if(T.yCoordShift<0){var W=(0,l.translateToNotScaled)(T.parentSurface.seriesViewRect.height)-T.y1;j>W&&(V=(j-5).toFixed(0))}var K=T.containerBackground,H=T.textStroke,U=T.cursorModifier.tooltipShadow,I='<feGaussianBlur result="blurOut" in="offOut" stdDeviation="3" />';if(U!==void 0){var Q=(0,s.parseColorToTArgb)(U);I=`<feColorMatrix result="matrixOut" in="offOut" type="matrix"
        values="0 0 0 0 `.concat(Q.red/255,`
                0 0 0 0 `).concat(Q.green/255,`
                0 0 0 0 `).concat(Q.blue/255,`
                0 0 0 `).concat(Q.opacity/255,` 0" />
        <feGaussianBlur result="blurOut" in="matrixOut" stdDeviation="3" />`)}return'<svg class="scichart__cursor-tooltip" width="'.concat(D,'" height="').concat(j,`">
        <defs>
            <filter id="`).concat(A,`" x="0" y="0" width="200%" height="200%">
                <feOffset result="offOut" in="SourceAlpha" dx="3" dy="3" />
                `).concat(I,`
                <feBlend in="SourceGraphic" in2="blurOut" mode="normal" />
            </filter>
        </defs>
        <rect rx="4" ry="4" width="95%" height="`).concat(V,'" fill="').concat(K,'" filter="url(#').concat(A,`)" />
        <svg width="100%">
            <text x="8" y="3" font-size="13" font-family="Verdana" dy="0" fill="`).concat(H,'">').concat(N,`</text>
        </svg>
    </svg>`)};r.defaultCursorTooltipSvgTemplate=b;var S=function(C,T){T===void 0&&(T=13);var x=C.reduce(function(L,k){return(k==null?void 0:k.length)>L?k.length:L},0),A=x*8+20,w=T*1.2*C.length+16;return{width:A,height:w}};r.calcTooltipSize=S;var _=function(C,T,x){var A=x.parentSurface.seriesViewRect,w=x.x1,L=x.y1,k=(0,l.translateToNotScaled)(A.width)-w<C?-C:5,D=(0,l.translateToNotScaled)(A.height)-L<T?-T:5;x.xCoordShift=k,x.yCoordShift=D};r.adjustTooltipPosition=_})(LI)),LI}var II={},NI={},FI={},eW={},rne;function ej(){return rne||(rne=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EErrorDirection=void 0,(function(e){e.Horizontal="Horizontal",e.Vertical="Vertical"})(r.EErrorDirection||(r.EErrorDirection={}))})(eW)),eW}var jI={},ine;function vs(){if(ine)return jI;ine=1,Object.defineProperty(jI,"__esModule",{value:!0}),jI.HitTestInfo=void 0;var r=(function(){function e(i,n){n===void 0&&(n=!1),this.isEmpty=n,this.associatedSeries=i}return e.empty=function(){return new e(void 0,!0)},e.prototype.getEuclideanDistance=function(){var i,n,t=((i=this.hitTestPoint)===null||i===void 0?void 0:i.x)-this.xCoord,o=((n=this.hitTestPoint)===null||n===void 0?void 0:n.y)-this.yCoord;return Math.sqrt(t*t+o*o)},Object.defineProperty(e.prototype,"distance",{get:function(){return this.distanceProperty!==void 0?this.distanceProperty:this.getEuclideanDistance()},set:function(i){this.distanceProperty=i},enumerable:!1,configurable:!0}),e})();return jI.HitTestInfo=r,jI}var tW={},nne;function jM(){return nne||(nne=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.ETriangleSeriesDrawMode=void 0,(function(e){e.List="List",e.Polygon="Polygon",e.Strip="Strip"})(r.ETriangleSeriesDrawMode||(r.ETriangleSeriesDrawMode={}))})(tW)),tW}var one;function Rs(){if(one)return FI;one=1,Object.defineProperty(FI,"__esModule",{value:!0}),FI.hitTestHelpers=void 0;var r=Mr(),e=Ii(),i=ej(),n=oo();zc();var t=vs(),o=jM(),a=function(A,w,L,k,D){return L+(D-L)*(A-w)/(k-w)},s=function(A,w,L,k,D,j,N,V,W,K,H,U,I){var Q=w.isCategoryCoordinateCalculator,Z=new t.HitTestInfo(A);Z.seriesName=A.seriesName,Z.dataSeriesType=D.type,Z.hitTestPoint=new e.Point(V,W);var ee=w.getDataValue(V),ie=L.getDataValue(W);if(Z.hitTestPointValues=new e.Point(ee,ie),Z.dataSeriesIndex=K,Z.hitTestRadius=H,Z.isCategoryAxis=Q,Z.distance=U,K>=0){var de=D.valueNames.reduce(function(Pe,Ee){return Pe[Ee]=D.getNativeValue(D.getYValuesByName(Ee),K),Pe},{}),pe=Q?K:D.getNativeValue(j,K),_e=D.getNativeValue(N,K);Z.xCoord=w.getCoordinate(pe),Z.yCoord=L.getCoordinate(_e),Z.xValue=pe,Q&&(Z.xCategoryValue=j.get(K)),Z.yValueByName=de,Z.yValue=_e;var Te=Q?D.getIndicesRange(D.getXRange()):D.getXRange(),De=I!==void 0?w.getDataWidth(I):0;Z.isWithinDataBounds=(0,n.testIsInInterval)(ee,Te.min,Te.max,De/2),Z.metadata=D.getMetadataAt(K)}else Z.isWithinDataBounds=!1;return Z.isHit=void 0,Z},l=function(A,w,L,k,D){var j=u(A,w,w,L,k,0,0);return j.nearestPointIndex},u=function(A,w,L,k,D,j,N){var V=w.isCategoryCoordinateCalculator,W=V?k.getNativeIndexes():k.getNativeXValues(),K=k.getNativeYValues();return c(A,w,L,W,K,k.dataDistributionCalculator.isSortedAscending,D,j,N)},c=function(A,w,L,k,D,j,N,V,W){var K;try{return K=A.SCRTHitTestHelper.GetNearestXyPoint(w.nativeCalculator,L.nativeCalculator,k,D,j,N,V,W??1),{nearestPointIndex:K.minD,distance:K.maxD}}finally{(0,r.deleteSafe)(K)}},d=function(A,w,L,k,D,j,N){var V=w.isCategoryCoordinateCalculator,W=V?k.getNativeIndexes():k.getNativeXValues(),K=k.getNativeYValues(),H,U,I;try{H=A.SCRTHitTestHelper.GetNearestXyPoint(w.nativeCalculator,L.nativeCalculator,W,K,k.dataDistributionCalculator.isSortedAscending,D,j,N??1),U=H.minD,I=H.maxD}finally{(0,r.deleteSafe)(H)}try{return H=A.SCRTHitTestHelper.GetNearestXyPoint(w.nativeCalculator,L.nativeCalculator,W,k.getNativeY1Values(),k.dataDistributionCalculator.isSortedAscending,D,j,N??1),I<H.maxD?{nearestPointIndex:U,distance:I}:{nearestPointIndex:H.minD,distance:H.maxD}}finally{(0,r.deleteSafe)(H)}},f=function(A,w,L,k,D){var j=A.getDataValue(k),N=w.getDataValue(D),V=Math.floor((j-L.xStart)/L.xStep),W=Math.floor((N-L.yStart)/L.yStep);if(V<0||V>=L.arrayWidth||W<0||W>=L.arrayHeight)return{xIndex:-1,yIndex:-1,zValue:void 0};var K=L.getZValue(W,V);return{xIndex:V,yIndex:W,zValue:K}},h=function(A,w,L,k,D){var j=A.getDataValue(k),N=w.getDataValue(D),V=L.xCellOffsets,W=L.yCellOffsets,K=-1;if(j>=V[0]&&j<=V[V.length-1])for(var H=0;H<V.length;H++){var U=j>=V[H]&&j<=V[H+1];if(U){K=H;break}}var I=-1;if(N>=W[0]&&N<=W[W.length-1])for(var H=0;H<W.length-1;H++){var U=N>=W[H]&&N<=W[H+1];if(U){I=H;break}}if(K<0||K>=L.arrayWidth||I<0||I>=L.arrayHeight)return{xIndex:-1,yIndex:-1,zValue:void 0};var Q=L.getZValue(I,K);return{xIndex:K,yIndex:I,zValue:Q}},p=function(A,w,L,k,D,j,N,V,W){var K=V===o.ETriangleSeriesDrawMode.Polygon||V===o.ETriangleSeriesDrawMode.List,H=V===o.ETriangleSeriesDrawMode.List?3:W,U=A.SCRTHitTestHelper.GetNearestTriangle(K,H,w.nativeCalculator,L.nativeCalculator,k,D,j,N);return{nearestPointIndex:U.minD,nearestPointIndex2:U.maxD,isHit:U.minD>=0}},g=function(A,w,L,k,D,j,N,V,W,K){var H=Number.MAX_VALUE,U=Number.NEGATIVE_INFINITY,I=Number.MAX_VALUE,Q=Number.NEGATIVE_INFINITY,Z=function(be,ke){for(var qe=0;qe<L;qe++){var rt=be(qe),St=ke(qe);H=rt<H?rt:H,U=rt>U?rt:U,I=St<I?St:I,Q=St>Q?St:Q}};Z(k,D),Z(j,N);for(var ee=A.getDataValue(V),ie=w.getDataValue(W),de=H<=ee&&ee<=U&&I<=ie&&ie<=Q,pe=Number.MAX_VALUE,_e=-1,Te=0;Te<L;Te++){var De=k(Te),Pe=D(Te),Ee=j(Te),Re=N(Te),je=A.getCoordinate(De),Ke=w.getCoordinate(Pe),ot=A.getCoordinate(Ee),We=w.getCoordinate(Re),xe=(0,n.calcDistance)(je,Ke,ot,We),ve=(0,n.calcDistance)(je,Ke,V,W),he=(0,n.calcDistance)(ot,We,V,W);if(ve<=xe+K&&he<=xe+K){var Se=(0,n.calcDistanceFromLine)(V,W,je,Ke,ot,We);Se<=pe&&(pe=Se,_e=Te)}}return{isHit:pe<=K,isWithinDataBounds:de,nearestPointIndex:_e,nearestDistance:_e>=0?pe:void 0}},v=function(A,w,L,k,D,j,N,V,W){var K=A.isCategoryCoordinateCalculator,H=K?D:W.getNativeValue(L,D),U=W.getNativeValue(k,D),I=A.getCoordinate(H),Q=w.getCoordinate(U),Z=(0,n.calcDistance)(j,N,I,Q);return Z<V},y=function(A,w,L,k,D,j,N,V,W){var K,H,U,I,Q,Z,ee=A.isCategoryCoordinateCalculator,ie=ee?D:W.getNativeValue(L,D),de=W.getNativeValue(k,D),pe=A.getDataValue(j);ie<=pe?(U=ie,Q=de,I=ee?D+1:W.getNativeValue(L,D+1),Z=W.getNativeValue(k,D+1),H=D+1):(U=ee?D-1:W.getNativeValue(L,D-1),Q=W.getNativeValue(k,D-1),H=D-1,I=ie,Z=de);var _e=A.getCoordinate(U),Te=A.getCoordinate(I),De=w.getCoordinate(Q),Pe=w.getCoordinate(Z),Ee=(0,n.calcDistance)(_e,De,Te,Pe),Re=(0,n.calcDistance)(_e,De,j,N),je=(0,n.calcDistance)(Te,Pe,j,N);return Re>Ee+V||je>Ee+V?K=!1:K=(0,n.calcDistanceFromLine)(j,N,_e,De,Te,Pe)<V,{isHit:K,secondPointIndex:H}},m=function(A,w,L,k,D,j,N,V,W,K){var H,U=w.getDataValue(V),I=w.isCategoryCoordinateCalculator,Q=I?N:K.getNativeValue(k,N),Z=Q<=U,ee=Z?N+1:N-1;if(ee<0||ee>=k.size())return{isHit:!1,secondPointIndex:void 0};var ie=I?ee:K.getNativeValue(k,ee),de=Z?Q:ie,pe=D(Z?N:ee),_e=j(Z?N:ee),Te=Z?ie:Q,De=D(Z?ee:N),Pe=j(Z?ee:N),Ee=w.getCoordinate(de),Re=w.getCoordinate(Te),je=L.getCoordinate(pe),Ke=L.getCoordinate(De),ot=L.getCoordinate(_e),We=L.getCoordinate(Pe);if(A)je<ot?H=W>=je&&W<=ot:H=W>=ot&&W<=je;else{var xe=a(V,Ee,je,Re,Ke),ve=a(V,Ee,ot,Re,We);xe<ve?H=W>=xe&&W<=ve:H=W>=ve&&W<=xe}return{isHit:H,secondPointIndex:ee}},b=function(A,w,L,k,D,j,N,V,W,K,H){H===void 0&&(H=void 0);var U=A.isCategoryCoordinateCalculator,I=U?V:D.getNativeValue(j,V),Q=D.getNativeValue(N,V),Z=A.getCoordinate(I),ee=w.getCoordinate(Q),ie=w.getCoordinate(k),de=L/2,pe=ie>ee?ie:ee,_e=ie>ee?ee:ie;if(H!==void 0){var Te=H<=de,De=K<=pe&&K>=_e;return Te&&De}else return(0,n.testIsInBounds)(W,K,Z-de,pe,Z+de,_e)},S=function(A,w,L,k,D,j,N,V,W,K){var H=A.isCategoryCoordinateCalculator,U=H?V:k.getNativeValue(D,V),I=k.getNativeValue(j,V),Q=k.getNativeValue(N,V),Z=A.getCoordinate(U),ee=w.getCoordinate(I),ie=w.getCoordinate(Q),de=L/2,pe=ie>ee?ie:ee,_e=ie>ee?ee:ie;return(0,n.testIsInBounds)(W,K,Z-de,pe,Z+de,_e)},_=function(A,w,L,k,D,j,N,V){var W=L.getDataPointWidth,K=L.dataPointWidth,H=L.errorDirection,U=L.dataSeries,I=L.dataPointWidthMode,Q=A.isCategoryCoordinateCalculator,Z=H===i.EErrorDirection.Vertical,ee=Q?j:U.getNativeValue(k,j),ie=U.getNativeValue(D,j),de=U.getNativeValue(U.getNativeHighValues(),j),pe=U.getNativeValue(U.getNativeLowValues(),j);isNaN(de)&&(de=ie),isNaN(pe)&&(pe=ie);var _e=A.getCoordinate(ee),Te=w.getCoordinate(ie),De=Z?w.getCoordinate(de):A.getCoordinate(de),Pe=Z?w.getCoordinate(pe):A.getCoordinate(pe),Ee=W(Z?A:w,K,I),Re=Ee/2,je=!1,Ke=De>Pe?De:Pe,ot=De>Pe?Pe:De;return Z?je=(0,n.testIsInBounds)(N,V,_e-Re,Ke,_e+Re,ot):je=(0,n.testIsInBounds)(N,V,ot,Te+Re,Ke,Te-Re),{isHit:je,highValue:de,lowValue:pe}},C=function(A,w,L,k,D,j,N,V,W){var K=L.zeroLineY,H=L.dataSeries,U=A.isCategoryCoordinateCalculator,I=U?j:H.getNativeValue(k,j),Q=H.getNativeValue(D,j),Z=A.getCoordinate(I),ee=w.getCoordinate(Q),ie=w.getCoordinate(K),de=ie>ee?ie:ee,pe=ie>ee?ee:ie;return(0,n.testIsInBounds)(N,V,Z,de,Z,pe,W)},T=function(A,w,L,k,D,j,N,V){var W=L.getDataPointWidth,K=L.dataPointWidth,H=L.dataPointWidthMode,U=A.isCategoryCoordinateCalculator,I=U?D:k.getNativeValue(k.getNativeXValues(),D),Q=A.getCoordinate(I),Z=k.getNativeValue(k.getNativeOpenValues(),D),ee=w.getCoordinate(Z),ie=k.getNativeValue(k.getNativeHighValues(),D),de=w.getCoordinate(ie),pe=k.getNativeValue(k.getNativeLowValues(),D),_e=w.getCoordinate(pe),Te=k.getNativeValue(k.getNativeCloseValues(),D),De=w.getCoordinate(Te),Pe=W(A,K,H),Ee=Pe/2,Re=De>ee?De:ee,je=De>ee?ee:De,Ke=(0,n.testIsInBounds)(j,N,Q-Ee,Re,Q+Ee,je),ot=(0,n.calcDistanceFromLineSegment)(j,N,Q,de,Q,_e),We=Ke||ot<V;return{isHit:We,openValue:Z,highValue:ie,lowValue:pe,closeValue:Te}},x=function(A,w,L,k,D,j,N,V){var W,K=k.getNativeXValues(),H=w.isCategoryCoordinateCalculator,U=H?j:k.getNativeValue(K,j),I=k.getNativeYValues(),Q=w.getDataValue(N),Z=U<=Q,ee=Z?j+1:j-1;if(ee<0||ee>=k.count())return{isHit:!1,secondPointIndex:void 0};var ie=H?ee:K.get(ee),de=Z?U:ie,pe=Z?k.getNativeValue(I,j):k.getNativeValue(I,ee),_e=Z?ie:U,Te=Z?k.getNativeValue(I,ee):k.getNativeValue(I,j),De=w.getCoordinate(de),Pe=w.getCoordinate(_e),Ee=L.getCoordinate(pe),Re=L.getCoordinate(Te),je=L.getCoordinate(D);if(A)Ee<je?W=V>=Ee&&V<=je:W=V>=je&&V<=Ee;else{var Ke=a(N,De,Ee,Pe,Re);Ke<je?W=V>=Ke&&V<=je:W=V>=je&&V<=Ke}return{isHit:W,secondPointIndex:ee}};return FI.hitTestHelpers={createHitTestInfo:s,getNearestPoint:c,getNearestXPoint:l,getNearestXyPoint:u,getNearestXyyPoint:d,getNearestUniformHeatmapPoint:f,getNearestNonUniformHeatmapPoint:h,getNearestTriangle:p,getNearestLineSegment:g,testIsHitForPoint:v,testIsHitForLine:y,testIsHitForBand:m,testIsHitForColumn:b,testIsHitForOHLC:T,testIsHitForMountain:x,testIsHitForErrorBars:_,testIsHitForImpulse:C,testIsHitForBoxPlot:S},FI}var ane;function Js(){if(ane)return NI;ane=1,Object.defineProperty(NI,"__esModule",{value:!0}),NI.BaseHitTestProvider=void 0;var r=ni(),e=Ii(),i=pn(),n=Rs(),t=vs(),o=(function(){function a(s,l){r.Guard.notNull(s,"parentSeries"),this.parentSeries=s,this.webAssemblyContext=l}return a.prototype.update=function(s){this.currentRenderPassData=s},a.prototype.hitTestDataPoint=function(s,l,u){u===void 0&&(u=a.DEFAULT_HIT_TEST_RADIUS);var c=this.getTranslatedHitTestPoint(s,l);if(!c)return t.HitTestInfo.empty();var d=this.currentRenderPassData,f=d.xCoordinateCalculator,h=d.yCoordinateCalculator,p=d.isVerticalChart,g=p?c.y:c.x,v=p?c.x:c.y,y=this.parentSeries.dataSeries;if(!y)return t.HitTestInfo.empty();var m=f.isCategoryCoordinateCalculator,b=m?y.getNativeIndexes():y.getNativeXValues(),S=this.parentSeries.getNativeYValues(),_=n.hitTestHelpers.getNearestPoint(this.webAssemblyContext,f,h,b,S,y.dataDistributionCalculator.isSortedAscending,g,v,u),C=y.getNativeXValues(),T=this.parentSeries.getNativeYValues(),x=n.hitTestHelpers.createHitTestInfo(this.parentSeries,f,h,p,y,C,T,g,v,_.nearestPointIndex,u,_.distance);return _.nearestPointIndex>=0?x.isHit=n.hitTestHelpers.testIsHitForPoint(f,h,C,T,_.nearestPointIndex,g,v,u,y):x.isHit=!1,x},a.prototype.hitTestForDataPointSelectionModifier=function(s,l,u){return u===void 0&&(u=a.DEFAULT_HIT_TEST_RADIUS),this.hitTestDataPoint(s,l,u)},a.prototype.hitTestXSlice=function(s,l){var u=this.getTranslatedHitTestPoint(s,l);if(!u)return t.HitTestInfo.empty();var c=this.currentRenderPassData,d=c.xCoordinateCalculator,f=c.yCoordinateCalculator,h=c.isVerticalChart,p=h?u.y:u.x,g=h?u.x:u.y,v=this.parentSeries.dataSeries;if(!v)return t.HitTestInfo.empty();var y=n.hitTestHelpers.getNearestXPoint(this.webAssemblyContext,d,v,p,v.dataDistributionCalculator.isSortedAscending),m=v.getNativeXValues(),b=this.parentSeries.getNativeYValues(),S=n.hitTestHelpers.createHitTestInfo(this.parentSeries,d,f,h,v,m,b,p,g,y,0,void 0);if(S.isHit=S.isWithinDataBounds,v.dataDistributionCalculator.isSortedAscending&&y>=0){var _=m.size(),C=d.getCoordinate(d.isCategoryCoordinateCalculator?y:m.get(y));if(!(y===_-1&&(d.hasFlippedCoordinates?p>=C:p<=C))&&!(y===0&&(d.hasFlippedCoordinates?p<=C:p>=C))){var T=n.hitTestHelpers.testIsHitForLine(d,f,m,b,y,p,g,0,v);S.point2dataSeriesIndex=T.secondPointIndex,S.point2xValue=m.get(T.secondPointIndex),S.point2xCoord=d.getCoordinate(S.point2xValue),S.point2yValue=b.get(T.secondPointIndex),S.point2yCoord=f.getCoordinate(S.point2yValue),S.point2metadata=v.getMetadataAt(T.secondPointIndex);var x=v.valueNames.reduce(function(A,w){return A[w]=v.getNativeValue(v.getYValuesByName(w),S.point2dataSeriesIndex),A},{});S.point2yValueByName=x}}return S},a.prototype.getTranslatedHitTestPoint=function(s,l){if(!(!this.currentRenderPassData||s===void 0||l===void 0))return(0,i.translateFromCanvasToSeriesViewRect)(new e.Point(s,l),this.parentSeries.parentSurface.seriesViewRect)},a.DEFAULT_HIT_TEST_RADIUS=7.07,a})();return NI.BaseHitTestProvider=o,NI}var KT={},rW={},sne;function aze(){return sne||(sne=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.PROPERTY=void 0,(function(e){e.IS_HIDDEN="IS_HIDDEN",e.X1="X1",e.X2="X2",e.Y1="Y1",e.Y2="Y2"})(r.PROPERTY||(r.PROPERTY={}))})(rW)),rW}var lne;function Z8(){if(lne)return KT;lne=1;var r=KT&&KT.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(KT,"__esModule",{value:!0}),KT.RubberBandSvgRect=void 0;var e=$n(),i=aze(),n=(function(o){r(a,o);function a(s,l,u,c){var d=o.call(this)||this;return d.svgTemplate=t,d.x1Property=0,d.x2Property=0,d.y1Property=0,d.y2Property=0,d.isHiddenProperty=!0,d.svgRoot=s,d.create(l,u,c),d}return Object.defineProperty(a.prototype,"x1",{get:function(){return this.x1Property},set:function(s){this.x1Property=s,this.notifyPropertyChanged(i.PROPERTY.X1)},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"x2",{get:function(){return this.x2Property},set:function(s){this.x2Property=s,this.notifyPropertyChanged(i.PROPERTY.X2)},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"y1",{get:function(){return this.y1Property},set:function(s){this.y1Property=s,this.notifyPropertyChanged(i.PROPERTY.Y1)},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"y2",{get:function(){return this.y2Property},set:function(s){this.y2Property=s,this.notifyPropertyChanged(i.PROPERTY.Y2)},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"isHidden",{get:function(){return this.isHiddenProperty},set:function(s){this.isHiddenProperty=s,this.notifyPropertyChanged(i.PROPERTY.IS_HIDDEN)},enumerable:!1,configurable:!0}),a.prototype.clear=function(){this.svgRoot.removeChild(this.svg)},a.prototype.delete=function(){this.clear()},a.prototype.create=function(s,l,u){if(this.svg&&this.clear(),this.svgRoot){var c=this.svgTemplate(s,l,u,0,0);this.svgRoot.appendChild(c),this.svg=c,this.svg.setAttribute("x","100px"),this.svg.setAttribute("y","100px")}},a.prototype.update=function(s){if(this.svgRoot){if(s===i.PROPERTY.IS_HIDDEN&&(this.svg.style.display=this.isHidden?"none":"block"),s===i.PROPERTY.X1||s===i.PROPERTY.X2){var l=Math.abs(this.x2-this.x1);this.svg.setAttribute("x",this.x1.toString()),this.svg.setAttribute("width","".concat(l,"px"))}if(s===i.PROPERTY.Y1||s===i.PROPERTY.Y2){var u=Math.abs(this.y2-this.y1);this.svg.setAttribute("y",this.y1.toString()),this.svg.setAttribute("height","".concat(u,"px"))}}},a.prototype.notifyPropertyChanged=function(s){this.update(s)},a})(e.DeletableEntity);KT.RubberBandSvgRect=n;var t=function(o,a,s,l,u){l===void 0&&(l=0),u===void 0&&(u=0);var c="http://www.w3.org/2000/svg",d=document.createElementNS(c,"svg");d.setAttributeNS(null,"width",l.toString()),d.setAttributeNS(null,"height",u.toString()),d.style.display="none";var f=document.createElementNS(c,"rect");return d.appendChild(f),f.setAttributeNS(null,"width","100%"),f.setAttributeNS(null,"height","100%"),f.setAttributeNS(null,"fill",o),f.setAttributeNS(null,"stroke",a),f.setAttributeNS(null,"stroke-width",s.toString()),d};return KT}var BI={},une;function T_e(){if(une)return BI;une=1,Object.defineProperty(BI,"__esModule",{value:!0}),BI.DataPointInfo=void 0;var r=(function(){function e(i,n,t){this.renderableSeriesProperty=i,this.indexProperty=t,this.metadataProperty=n}return Object.defineProperty(e.prototype,"metadata",{get:function(){return this.metadataProperty},set:function(i){this.metadataProperty=i},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"index",{get:function(){return this.indexProperty},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"xValue",{get:function(){return this.dataSeries.getNativeXValues().get(this.index)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"yValue",{get:function(){return this.dataSeries.getNativeYValues().get(this.index)},enumerable:!1,configurable:!0}),e.prototype.getValueByName=function(i){var n=this.dataSeries.getYValuesByName(i);if(n)return this.dataSeries.getNativeValue(n,this.index)},Object.defineProperty(e.prototype,"renderableSeries",{get:function(){return this.renderableSeriesProperty},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dataSeries",{get:function(){return this.renderableSeries.dataSeries},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"seriesName",{get:function(){return this.renderableSeries.seriesName},enumerable:!1,configurable:!0}),e})();return BI.DataPointInfo=r,BI}var VI={},cne;function x_e(){if(cne)return VI;cne=1,Object.defineProperty(VI,"__esModule",{value:!0}),VI.DataPointSelectionChangedArgs=void 0;var r=(function(){function e(i,n){this.source=i,this.selectedDataPoints=n}return e})();return VI.DataPointSelectionChangedArgs=r,VI}var Ym={},dne;function KN(){if(dne)return Ym;dne=1;var r=Ym&&Ym.__extends||(function(){var g=function(v,y){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,b){m.__proto__=b}||function(m,b){for(var S in b)Object.prototype.hasOwnProperty.call(b,S)&&(m[S]=b[S])},g(v,y)};return function(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");g(v,y);function m(){this.constructor=v}v.prototype=y===null?Object.create(y):(m.prototype=y.prototype,new m)}})();Object.defineProperty(Ym,"__esModule",{value:!0}),Ym.getRubberBandRect=Ym.RubberBandXyZoomModifier=void 0;var e=hc(),i=Mr(),n=Ii(),t=vn(),o=uy(),a=bo(),s=Os(),l=ty(),u=pn(),c=Z8(),d=nu(),f=cy(),h=(function(g){r(v,g);function v(y){var m=this,b,S,_,C,T,x,A;return m=g.call(this,y)||this,m.type=a.EChart2DModifierType.RubberBandXYZoom,m.isAnimated=!0,m.animationDuration=400,m.easingFunction=e.easing.outExpo,m.isClicked=!1,m.fillProperty="#42b64933",m.strokeProperty="#42b64977",m.strokeThicknessProperty=2,m.fill=(b=y==null?void 0:y.fill)!==null&&b!==void 0?b:m.fillProperty,m.stroke=(S=y==null?void 0:y.stroke)!==null&&S!==void 0?S:m.strokeProperty,m.strokeThickness=(_=y==null?void 0:y.strokeThickness)!==null&&_!==void 0?_:m.strokeThicknessProperty,m.isAnimated=(C=y==null?void 0:y.isAnimated)!==null&&C!==void 0?C:!0,m.animationDuration=(T=y==null?void 0:y.animationDuration)!==null&&T!==void 0?T:400,y!=null&&y.easingFunction&&typeof y.easingFunction=="string"&&(y.easingFunction=e.easing[y.easingFunction]),m.easingFunction=(x=y==null?void 0:y.easingFunction)!==null&&x!==void 0?x:e.easing.outExpo,m.executeCondition=(A=y==null?void 0:y.executeCondition)!==null&&A!==void 0?A:{button:o.EExecuteOn.MouseLeftButton},m}return v.prototype.applyTheme=function(y){this.testPropertyChanged(f.PROPERTY.FILL)||(this.fill=y.rubberBandFillBrush),this.testPropertyChanged(f.PROPERTY.STROKE)||(this.stroke=y.rubberBandStrokeBrush)},v.prototype.onDetach=function(){g.prototype.onDetach.call(this),this.rubberBandRect=(0,i.deleteSafe)(this.rubberBandRect)},v.prototype.modifierMouseDown=function(y){if(g.prototype.modifierMouseDown.call(this,y),!!this.checkExecuteConditions(y).isPrimary){if(!this.isAttached)throw new Error("Should not call RubberBandXyZoomModifier.modifierMouseDown if not attached");this.parentSurface.setZoomState(l.EZoomState.UserZooming);var m=(0,u.translateFromCanvasToSeriesViewRect)(y.mousePoint,this.parentSurface.seriesViewRect);m&&(this.pointFrom=m,this.isClicked=!0)}},v.prototype.modifierMouseMove=function(y){g.prototype.modifierMouseMove.call(this,y);var m=this.parentSurface.seriesViewRect;if(this.isClicked){this.pointTo=(0,u.translateFromCanvasToSeriesViewRect)(t.Rect.clipPointToRect(y.mousePoint,m),m);var b=this.parentSurface.getCoordSvgTranslation(),S=p(this.pointFrom,this.pointTo,this.xyDirection,this.parentSurface.seriesViewRect),_=S.x,C=S.right,T=S.y,x=S.bottom;this.rubberBandRect.isHidden=!1,this.rubberBandRect.x1=(0,u.translateToNotScaled)(_+b.x),this.rubberBandRect.x2=(0,u.translateToNotScaled)(C+b.x),this.rubberBandRect.y1=(0,u.translateToNotScaled)(T+b.y),this.rubberBandRect.y2=(0,u.translateToNotScaled)(x+b.y)}},v.prototype.modifierMouseUp=function(y){if(g.prototype.modifierMouseUp.call(this,y),!!this.checkExecuteConditions(y).isPrimary&&this.isClicked){var m=this.parentSurface.seriesViewRect;this.pointTo=(0,u.translateFromCanvasToSeriesViewRect)(t.Rect.clipPointToRect(y.mousePoint,m),m);var b=p(this.pointFrom,this.pointTo,this.xyDirection,this.parentSurface.seriesViewRect),S=b.x,_=b.right,C=b.y,T=b.bottom;this.isClicked=!1,this.rubberBandRect.isHidden=!0,this.calculateDraggedDistance()>v.MIN_DRAG_SENSITIVITY&&this.performZoom(new n.Point(S,C),new n.Point(_,T))}},Object.defineProperty(v.prototype,"strokeThickness",{get:function(){return this.strokeThicknessProperty},set:function(y){this.strokeThicknessProperty=y,this.notifyPropertyChanged(f.PROPERTY.STROKE_THICKNESS)},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"stroke",{get:function(){return this.strokeProperty},set:function(y){this.strokeProperty=y,this.notifyPropertyChanged(f.PROPERTY.STROKE)},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"fill",{get:function(){return this.fillProperty},set:function(y){this.fillProperty=y,this.notifyPropertyChanged(f.PROPERTY.FILL)},enumerable:!1,configurable:!0}),v.prototype.toJSON=function(){var y=g.prototype.toJSON.call(this),m={animationDuration:this.animationDuration,easingFunction:this.easingFunction.name,fill:this.fill,isAnimated:this.isAnimated,stroke:this.stroke,strokeThickness:this.strokeThickness};return Object.assign(y.options,m),y},v.prototype.delete=function(){this.parentSurfaceProperty=void 0,this.rubberBandRect=(0,i.deleteSafe)(this.rubberBandRect),g.prototype.delete.call(this)},v.prototype.performZoom=function(y,m){var b=this,S=[s.EXyDirection.XDirection,s.EXyDirection.XyDirection].includes(this.xyDirection),_=[s.EXyDirection.YDirection,s.EXyDirection.XyDirection].includes(this.xyDirection);this.parentSurface.xAxes.asArray().forEach(function(C){(!C.isVerticalChart&&S||C.isVerticalChart&&_)&&b.performZoomOnAxis(C,C.isVerticalChart?y.y:y.x,C.isVerticalChart?m.y:m.x)}),this.parentSurface.yAxes.asArray().forEach(function(C){(!C.isVerticalChart&&_||C.isVerticalChart&&S)&&b.performZoomOnAxis(C,C.isVerticalChart?y.x:y.y,C.isVerticalChart?m.x:m.y)})},v.prototype.performZoomOnAxis=function(y,m,b){y.zoom(m,b,this.isAnimated?this.animationDuration:0,this.easingFunction)},v.prototype.notifyPropertyChanged=function(y){g.prototype.notifyPropertyChanged.call(this,y),this.updateRubberBandRect()},v.prototype.calculateDraggedDistance=function(){var y=Math.pow(this.pointFrom.x-this.pointTo.x,2),m=Math.pow(this.pointFrom.y-this.pointTo.y,2);return Math.sqrt(y+m)},v.prototype.updateRubberBandRect=function(){this.parentSurface&&(this.rubberBandRect=(0,i.deleteSafe)(this.rubberBandRect),this.rubberBandRect=new c.RubberBandSvgRect(this.parentSurface.domSvgContainer,this.fill,this.stroke,this.strokeThickness))},v.MIN_DRAG_SENSITIVITY=5,v})(d.ChartModifierBase2D);Ym.RubberBandXyZoomModifier=h;function p(g,v,y,m){var b=v.x<=g.x?v.x:g.x,S=v.x<=g.x?g.x:v.x,_=v.y<=g.y?v.y:g.y,C=v.y<=g.y?g.y:v.y;return y===s.EXyDirection.XDirection&&(_=0,C=m.height),y===s.EXyDirection.YDirection&&(b=0,S=m.width),t.Rect.createWithPoints(new n.Point(b,_),new n.Point(S,C))}return Ym.getRubberBandRect=p,Ym}var fne;function t3(){return fne||(fne=1,(function(r){var e=II&&II.__extends||(function(){var w=function(L,k){return w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,j){D.__proto__=j}||function(D,j){for(var N in j)Object.prototype.hasOwnProperty.call(j,N)&&(D[N]=j[N])},w(L,k)};return function(L,k){if(typeof k!="function"&&k!==null)throw new TypeError("Class extends value "+String(k)+" is not a constructor or null");w(L,k);function D(){this.constructor=L}L.prototype=k===null?Object.create(k):(D.prototype=k.prototype,new D)}})();Object.defineProperty(r,"__esModule",{value:!0}),r.DataPointSelectionModifier=r.ESelectionMode=void 0;var i=Jn(),n=Mr(),t=Ba(),o=oi(),a=vn(),s=$o(),l=uy(),u=bo(),c=qv(),d=oo(),f=pn(),h=Qn(),p=ki(),g=KF(),v=Js(),y=Z8(),m=nu(),b=cy(),S=T_e(),_=x_e(),C=KN(),T;(function(w){w.Union="Union",w.Inverse="Inverse",w.Replace="Replace"})(T=r.ESelectionMode||(r.ESelectionMode={}));var x=(function(w){e(L,w);function L(k){var D=this,j,N,V,W,K;return D=w.call(this,k)||this,D.type=u.EChart2DModifierType.DataPointSelection,D.selectionChanged=new t.EventHandler,D.selectedDataPointsMap=new Map,D.selectionHasChanged=!1,D.hitTestRadius=v.BaseHitTestProvider.DEFAULT_HIT_TEST_RADIUS,D.allowClickSelect=(j=k==null?void 0:k.allowClickSelect)!==null&&j!==void 0?j:!0,D.allowDragSelect=(N=k==null?void 0:k.allowDragSelect)!==null&&N!==void 0?N:!0,D.executeCondition=(V=k==null?void 0:k.executeCondition)!==null&&V!==void 0?V:{button:l.EExecuteOn.MouseLeftButton},D.hitTestRadius=(W=k==null?void 0:k.hitTestRadius)!==null&&W!==void 0?W:D.hitTestRadius,k!=null&&k.selectionStroke&&(D.selectionStroke=k.selectionStroke),k!=null&&k.selectionFill&&(D.selectionFill=k==null?void 0:k.selectionFill),D.selectionStrokeThicknessProperty=(K=k==null?void 0:k.selectionStrokeThickness)!==null&&K!==void 0?K:1,k!=null&&k.onSelectionChanged&&(typeof k.onSelectionChanged=="string"?(D.typeMap.set("onSelectionChanged",k.onSelectionChanged),D.selectionChanged.subscribe((0,i.getFunction)(s.EBaseType.OptionFunction,k.onSelectionChanged))):D.selectionChanged.subscribe(k.onSelectionChanged)),k!=null&&k.getSelectionMode&&(typeof k.getSelectionMode=="string"?(D.typeMap.set("getSelectionMode",k.getSelectionMode),D.getSelectionMode=(0,i.getFunction)(s.EBaseType.OptionFunction,k.getSelectionMode)):D.getSelectionMode=k.getSelectionMode),D}return L.prototype.applyTheme=function(k){this.testPropertyChanged(b.PROPERTY.SELECTION_FILL)||(this.selectionFill=k.rubberBandFillBrush),this.testPropertyChanged(b.PROPERTY.SELECTION_STROKE)||(this.selectionStroke=k.rubberBandStrokeBrush)},L.prototype.onAttach=function(){var k=this,D,j;w.prototype.onAttach.call(this),this.selectionRect=new y.RubberBandSvgRect((D=this.parentSurface)===null||D===void 0?void 0:D.domSvgContainer,this.selectionFill,this.selectionStroke,this.selectionStrokeThickness),this.clearSelectedDataPoints(),(j=this.getIncludedRenderableSeries())===null||j===void 0||j.forEach(function(N){return k.onAttachSeries(N)})},L.prototype.onDetach=function(){var k=this,D;w.prototype.onDetach.call(this),this.selectionRect=(0,n.deleteSafe)(this.selectionRect),this.clearSelectedDataPoints(),(D=this.getIncludedRenderableSeries())===null||D===void 0||D.forEach(function(j){return k.onDetachSeries(j)})},Object.defineProperty(L.prototype,"selectedDataPoints",{get:function(){return Array.from(this.selectedDataPointsMap.values())},enumerable:!1,configurable:!0}),L.prototype.onAttachSeries=function(k){if(w.prototype.onAttachSeries.call(this,k),!(!k.dataSeries||k.dataSeries.type===p.EDataSeriesType.HeatmapUniform)){var D=k.dataSeries;D.hasMetadataGenerator()||D.setMetadataGenerator(new g.TemplateMetadataGenerator({isSelected:!1}));for(var j=0;j<D.getMetadataLength();j++){var N=D.getMetadataAt(j);if(N!=null&&N.isSelected){var V=new S.DataPointInfo(k,N,j);this.addSelectedDataPoint(k,j,V)}}this.raiseSelectionChanged(!1)}},L.prototype.onDetachSeries=function(k){w.prototype.onDetachSeries.call(this,k),!(k.isStacked||!k.dataSeries)&&(this.removeSelectedDataPointsForSeries(k),this.raiseSelectionChanged(!1))},L.prototype.modifierMouseDown=function(k){if(w.prototype.modifierMouseDown.call(this,k),!!this.checkExecuteConditions(k).isPrimary){if(!this.isAttached)throw new Error("Should not call DataPointSelectionModifier.modifierMouseDown if not attached");var D=(0,f.translateFromCanvasToSeriesViewRect)(k.mousePoint,this.parentSurface.seriesViewRect);D&&(this.startPoint=D,this.isClicked=!0,k.handled=!0)}},L.prototype.modifierMouseMove=function(k){w.prototype.modifierMouseMove.call(this,k);var D=this.parentSurface.seriesViewRect;if(this.isClicked){this.endPoint=(0,f.translateFromCanvasToSeriesViewRect)(a.Rect.clipPointToRect(k.mousePoint,D),D);var j=this.parentSurface.getCoordSvgTranslation(),N=(0,C.getRubberBandRect)(this.startPoint,this.endPoint,this.xyDirection,this.parentSurface.seriesViewRect),V=N.x,W=N.right,K=N.y,H=N.bottom;this.selectionRect.isHidden=!this.allowDragSelect,this.selectionRect.x1=(0,f.translateToNotScaled)(V+j.x),this.selectionRect.x2=(0,f.translateToNotScaled)(W+j.x),this.selectionRect.y1=(0,f.translateToNotScaled)(K+j.y),this.selectionRect.y2=(0,f.translateToNotScaled)(H+j.y)}},L.prototype.modifierMouseUp=function(k){if(w.prototype.modifierMouseUp.call(this,k),!!this.checkExecuteConditions(k).isPrimary){if(!this.isAttached)throw new Error("Should not call DataPointSelectionModifier.modifierMouseUp if not attached");if(this.isClicked){var D=this.parentSurface.seriesViewRect;this.endPoint=(0,f.translateFromCanvasToSeriesViewRect)(a.Rect.clipPointToRect(k.mousePoint,D),D);var j=(0,C.getRubberBandRect)(this.startPoint,this.endPoint,this.xyDirection,this.parentSurface.seriesViewRect),N=j.width>=3&&j.height>=3&&this.allowDragSelect,V=this.getSelectionMode(k,N);N&&this.allowDragSelect?this.selectManyPoints(j,V):this.allowClickSelect&&this.selectSinglePoint(k.mousePoint,V),this.isClicked=!1,this.selectionRect.isHidden=!0}}},Object.defineProperty(L.prototype,"selectionStrokeThickness",{get:function(){return this.selectionStrokeThicknessProperty},set:function(k){this.selectionStrokeThicknessProperty=k,this.notifyPropertyChanged(b.PROPERTY.SELECTION_STROKE_THICKNESS)},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"selectionStroke",{get:function(){return this.selectionStrokeProperty},set:function(k){this.selectionStrokeProperty=k,this.notifyPropertyChanged(b.PROPERTY.SELECTION_STROKE)},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"selectionFill",{get:function(){return this.selectionFillProperty},set:function(k){this.selectionFillProperty=k,this.notifyPropertyChanged(b.PROPERTY.SELECTION_FILL)},enumerable:!1,configurable:!0}),L.prototype.getSelectionMode=function(k,D){return k.ctrlKey?T.Union:k.shiftKey?T.Inverse:T.Replace},L.prototype.toJSON=function(){var k=w.prototype.toJSON.call(this),D={allowClickSelect:this.allowClickSelect,allowDragSelect:this.allowDragSelect,getSelectionMode:this.typeMap.get("getSelectionMode"),onSelectionChanged:this.typeMap.get("onSelectionChanged"),selectionFill:this.selectionFill,selectionStroke:this.selectionStroke,selectionStrokeThickness:this.selectionStrokeThickness};return Object.assign(k.options,D),k},L.prototype.delete=function(){this.selectionChanged.unsubscribeAll(),this.selectionRect=(0,n.deleteSafe)(this.selectionRect),w.prototype.delete.call(this)},L.prototype.selectManyPoints=function(k,D){var j=this;if(this.parentSurface){var N=D!==T.Replace;N||this.deselectAllPoints(!1),this.getIncludedRenderableSeries().filter(function(V){return V.isVisible&&V.dataSeries}).forEach(function(V,W){var K=V.xAxis.getCurrentCoordinateCalculator(),H=V.yAxis.getCurrentCoordinateCalculator(),U,I;K.getDataValue(k.left)<=K.getDataValue(k.right)?(U=K.getDataValue(k.left),I=K.getDataValue(k.right)):(U=K.getDataValue(k.right),I=K.getDataValue(k.left));var Q,Z;if(H.getDataValue(k.top)<=H.getDataValue(k.bottom)?(Q=H.getDataValue(k.top),Z=H.getDataValue(k.bottom)):(Q=H.getDataValue(k.bottom),Z=H.getDataValue(k.top)),V.dataSeries.type!==p.EDataSeriesType.HeatmapUniform){var ee=V.dataSeries,ie=0,de=ee.count();if(ee.dataDistributionCalculator.isSortedAscending){var pe=ee.getIndicesRange(new o.NumberRange(U,I),K.isCategoryCoordinateCalculator,c.ESearchMode.RoundDown,c.ESearchMode.RoundUp);ie=pe.min,de=pe.max}for(var _e=(0,h.vectorToArrayViewF64)(ee.getNativeXValues(),ee.webAssemblyContext),Te=(0,h.vectorToArrayViewF64)(ee.getNativeYValues(),ee.webAssemblyContext),De=ie;De<de;De++){var Pe=_e[De],Ee=Te[De];if((0,d.testIsInBounds)(Pe,Ee,U,Z,I,Q)){var Re=ee.getMetadataAt(De);D!==T.Inverse?(Re.isSelected=!0,j.addSelectedDataPoint(V,De,new S.DataPointInfo(V,Re,De))):Re.isSelected?(Re.isSelected=!1,j.removeSelectedDataPoint(V,De)):(Re.isSelected=!0,j.addSelectedDataPoint(V,De,new S.DataPointInfo(V,Re,De)))}}}}),this.raiseSelectionChanged(!0)}},L.prototype.selectSinglePoint=function(k,D){var j=this;if(this.parentSurface){var N=this.getIncludedRenderableSeries().filter(function(W){return W.isVisible&&W.dataSeries}).map(function(W){return{renderableSeries:W,hitTestInfo:W.hitTestProvider.hitTestForDataPointSelectionModifier(k.x,k.y,j.hitTestRadius)}}),V=D!==T.Replace;V||this.deselectAllPoints(!1),N.forEach(function(W){var K=W.hitTestInfo,H=W.renderableSeries;if(K.isHit){if(!K.metadata){console.warn("Cannot select datapoint for series ".concat(K.seriesName,` as it does not have metadata. To solve this either:
Configure metadata when you create the series or when you add data eg renderableSeries.dataSeries = new XyDataSeries(wasmContext, { metadata: { isSelected: false }}), or:
Add the DataPointSelectionModifier after all series have had their dataSeries set.`));return}if(D===T.Union){K.metadata.isSelected=!0;var U=new S.DataPointInfo(K.associatedSeries,K.metadata,K.dataSeriesIndex);j.addSelectedDataPoint(K.associatedSeries,K.dataSeriesIndex,U)}else K.metadata.isSelected=!K.metadata.isSelected,K.metadata.isSelected?j.addSelectedDataPoint(H,K.dataSeriesIndex,new S.DataPointInfo(K.associatedSeries,K.metadata,K.dataSeriesIndex)):j.removeSelectedDataPoint(H,K.dataSeriesIndex)}}),this.raiseSelectionChanged(!0)}},L.prototype.deselectAllPoints=function(k){k===void 0&&(k=!0),this.selectedDataPoints.forEach(function(D){D.renderableSeries&&D.metadata&&(D.metadata.isSelected=!1)}),this.clearSelectedDataPoints(),k&&this.raiseSelectionChanged(!0)},L.prototype.selectPoint=function(k,D){var j=k.dataSeries.getMetadataAt(D);j.isSelected=!0,this.addSelectedDataPoint(k,D,new S.DataPointInfo(k,j,D))},L.prototype.addSelectedDataPoint=function(k,D,j){j||(j=new S.DataPointInfo(k,k.dataSeries.getMetadataAt(D),D)),this.selectedDataPointsMap.set(A(k,D),j),this.selectionHasChanged=!0},L.prototype.removeSelectedDataPoint=function(k,D){this.selectedDataPointsMap.delete(A(k,D)),this.selectionHasChanged=!0},L.prototype.clearSelectedDataPoints=function(){this.selectedDataPointsMap.size>0&&(this.selectionHasChanged=!0),this.selectedDataPointsMap.clear()},L.prototype.removeSelectedDataPointsForSeries=function(k){var D=this;this.selectedDataPointsMap.forEach(function(j,N){j.renderableSeries===k&&(D.selectedDataPointsMap.delete(N),D.selectionHasChanged=!0)})},L.prototype.raiseSelectionChanged=function(k){var D;this.selectionHasChanged&&(this.selectionChanged.raiseEvent(new _.DataPointSelectionChangedArgs(this,this.selectedDataPoints)),this.selectionHasChanged=!1,k&&((D=this.parentSurface)===null||D===void 0||D.invalidateElement()))},L})(m.ChartModifierBase2D);r.DataPointSelectionModifier=x;var A=function(w,L){return"".concat(w.id,"_").concat(L)}})(II)),II}var $m={},ZT={},hne;function E_e(){if(hne)return ZT;hne=1;var r=ZT&&ZT.__extends||(function(){var t=function(o,a){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");t(o,a);function s(){this.constructor=o}o.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}})();Object.defineProperty(ZT,"__esModule",{value:!0}),ZT.SciChartLegend=void 0;var e=Yo(),i=Pv(),n=(function(t){r(o,t);function o(){var a=t!==null&&t.apply(this,arguments)||this;return a.type=i.ELegendType.SciChartLegend,a.showCheckboxesProperty=!1,a.showSeriesMarkersProperty=!0,a}return o.prototype.applyTheme=function(){},Object.defineProperty(o.prototype,"showCheckboxes",{get:function(){return this.showCheckboxesProperty},set:function(a){this.showCheckboxesProperty=a,this.notifyPropertyChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"showSeriesMarkers",{get:function(){return this.showSeriesMarkersProperty},set:function(a){this.showSeriesMarkersProperty=a,this.notifyPropertyChanged()},enumerable:!1,configurable:!0}),o.prototype.setRenderableSeriesArray=function(a){this.renderableSeriesArray=a,this.invalidateLegend()},o.prototype.addEventListeners=function(){var a=this;this.renderableSeriesArray.forEach(function(s){return a.addEventListenerToSeries(s)})},o.prototype.removeEventListeners=function(){var a=this;this.renderableSeriesArray.forEach(function(s){return a.removeEventListenerFromSeries(s.id)})},o.prototype.addEventListenerToSeries=function(a){var s=this,l=this.parentDiv.querySelector("[id='".concat(a.id,"']"));if(l){var u=function(h){a.isVisible=h.target.checked,s.legendItemCheckedChangedCallback&&s.legendItemCheckedChangedCallback(a,a.isVisible)};l.addEventListener("change",u);var c=function(h){s.invalidateLegend()};a.isVisibleChanged.subscribe(c);var d={element:l,eventType:"change",eventListener:u,delete:function(){l.removeEventListener("change",u),a.isVisibleChanged.unsubscribe(c)}},f=this.eventListenersCollection.get(a.id);f?f.push(d):this.eventListenersCollection.set(a.id,[d])}},o.prototype.getInnerHTML=function(){var a,s,l,u,c,d,f=(a=this.backgroundColor)!==null&&a!==void 0?a:(l=(s=this.parentSurfaceProperty)===null||s===void 0?void 0:s.themeProvider)===null||l===void 0?void 0:l.legendBackgroundBrush,h=(u=this.textColor)!==null&&u!==void 0?u:(d=(c=this.parentSurfaceProperty)===null||c===void 0?void 0:c.themeProvider)===null||d===void 0?void 0:d.labelForegroundBrush,p=this.renderableSeriesArray.map(function(_,C){var T;return{id:_.id,name:(T=_.seriesName)!==null&&T!==void 0?T:"Series ".concat(C+1),color:_.isStacked?_.fill:_.stroke,checked:_.isVisible,gradient:void 0}}),g=this.parentSurfaceProperty.getSeriesViewRectPadding(!1),v=g.left,y=g.top,m=g.right,b=g.bottom,S=this.isExternal()?new e.Thickness(this.margin,this.margin,this.margin,this.margin):new e.Thickness(y+this.margin,m+this.margin,b+this.margin,v+this.margin);return this.getLegendHTML(this.placement,h,f,S,this.orientation,this.showCheckboxes,this.showSeriesMarkers,p)},o})(i.SciChartLegendBase);return ZT.SciChartLegend=n,ZT}var pne;function J8(){if(pne)return $m;pne=1;var r=$m&&$m.__extends||(function(){var s=function(l,u){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(c[f]=d[f])},s(l,u)};return function(l,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");s(l,u);function c(){this.constructor=l}l.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}})(),e=$m&&$m.__assign||function(){return e=Object.assign||function(s){for(var l,u=1,c=arguments.length;u<c;u++){l=arguments[u];for(var d in l)Object.prototype.hasOwnProperty.call(l,d)&&(s[d]=l[d])}return s},e.apply(this,arguments)};Object.defineProperty($m,"__esModule",{value:!0}),$m.LegendModifier=void 0;var i=Ba(),n=bo(),t=E_e(),o=nu(),a=(function(s){r(l,s);function l(u){var c=this,d;return c=s.call(this,u)||this,c._legendOptions={},c.type=n.EChart2DModifierType.Legend,c.isCheckedChanged=new i.EventHandler,c._legendOptions=e({},u),c.legendItemCheckedChanged=c.legendItemCheckedChanged.bind(c),c.sciChartLegend=(d=u==null?void 0:u.legend)!==null&&d!==void 0?d:new t.SciChartLegend(u),c.applyLegendOptions(c.sciChartLegend,u),c}return l.prototype.applyLegendOptions=function(u,c){var d,f,h,p,g,v;u.showCheckboxes=(d=c==null?void 0:c.showCheckboxes)!==null&&d!==void 0?d:u.showCheckboxes,u.showSeriesMarkers=(f=c==null?void 0:c.showSeriesMarkers)!==null&&f!==void 0?f:u.showSeriesMarkers,u.margin=(h=c==null?void 0:c.margin)!==null&&h!==void 0?h:u.margin,u.orientation=(p=c==null?void 0:c.orientation)!==null&&p!==void 0?p:u.orientation,u.placement=(g=c==null?void 0:c.placement)!==null&&g!==void 0?g:u.placement,u.showLegend=(v=c==null?void 0:c.showLegend)!==null&&v!==void 0?v:u.showLegend,u.legendItemCheckedChangedCallback=this.legendItemCheckedChanged,c!=null&&c.isCheckedChangedCallback&&this.isCheckedChanged.subscribe(function(y){return c.isCheckedChangedCallback(y.series,y.isChecked,u)})},l.prototype.applyTheme=function(u){var c;s.prototype.applyTheme.call(this,u),(c=this.sciChartLegend)===null||c===void 0||c.applyTheme()},l.prototype.onAttachSeries=function(u){s.prototype.onAttachSeries.call(this,u),this.sciChartLegend.setRenderableSeriesArray(this.getIncludedRenderableSeries())},l.prototype.onDetachSeries=function(u){s.prototype.onDetachSeries.call(this,u),this.sciChartLegend.setRenderableSeriesArray(this.getIncludedRenderableSeries())},l.prototype.onParentSurfaceRendered=function(){s.prototype.onParentSurfaceRendered.call(this)},l.prototype.onAttach=function(){var u;s.prototype.onAttach.call(this),this.sciChartLegend||(this.sciChartLegend=(u=this._legendOptions.legend)!==null&&u!==void 0?u:new t.SciChartLegend(this._legendOptions),this.applyLegendOptions(this.sciChartLegend,this._legendOptions)),this.sciChartLegend.attachTo(this.parentSurface),this.sciChartLegend.setInvalidateParentSurface(this.parentSurface.invalidateElement),this.sciChartLegend.setRenderableSeriesArray(this.getIncludedRenderableSeries())},l.prototype.onDetach=function(){var u,c;this.sciChartLegend&&(this._legendOptions.margin=this.sciChartLegend.margin,this._legendOptions.orientation=this.sciChartLegend.orientation,this._legendOptions.placement=this.sciChartLegend.placement,this._legendOptions.showCheckboxes=this.sciChartLegend.showCheckboxes,this._legendOptions.showLegend=this.sciChartLegend.showLegend,this._legendOptions.showSeriesMarkers=this.sciChartLegend.showSeriesMarkers),s.prototype.onDetach.call(this),(u=this.sciChartLegend)===null||u===void 0||u.setRenderableSeriesArray([]),(c=this.sciChartLegend)===null||c===void 0||c.detach(),this.sciChartLegend=void 0},l.prototype.includeSeries=function(u,c){var d;return s.prototype.includeSeries.call(this,u,c)?(this.isAttached&&this.sciChartLegend.setRenderableSeriesArray(this.getIncludedRenderableSeries()),(d=this.parentSurface)===null||d===void 0||d.invalidateElement(),!0):!1},l.prototype.testIsIncludedSeries=function(u){return this.includedSeries.testIsIncluded(u.id)},l.prototype.toJSON=function(){var u=s.prototype.toJSON.call(this),c={margin:this.sciChartLegend.margin,orientation:this.sciChartLegend.orientation,placement:this.sciChartLegend.placement,showCheckboxes:this.sciChartLegend.showCheckboxes,showLegend:this.sciChartLegend.showLegend,showSeriesMarkers:this.sciChartLegend.showSeriesMarkers};return Object.assign(u.options,c),u},l.prototype.delete=function(){s.prototype.delete.call(this),this.onDetach()},l.prototype.legendItemCheckedChanged=function(u,c){var d;(d=this.isCheckedChanged)===null||d===void 0||d.raiseEvent({series:u,isChecked:c})},l})(o.ChartModifierBase2D);return $m.LegendModifier=a,$m}var HI={},gne;function r3(){return gne||(gne=1,(function(r){var e=HI&&HI.__extends||(function(){var d=function(f,h){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,g){p.__proto__=g}||function(p,g){for(var v in g)Object.prototype.hasOwnProperty.call(g,v)&&(p[v]=g[v])},d(f,h)};return function(f,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");d(f,h);function p(){this.constructor=f}f.prototype=h===null?Object.create(h):(p.prototype=h.prototype,new p)}})();Object.defineProperty(r,"__esModule",{value:!0}),r.MouseWheelZoomModifier=r.EActionType=void 0;var i=Y1(),n=bo(),t=Os(),o=ty(),a=pn(),s=Eg(),l=nu(),u;(function(d){d.Zoom="Zoom",d.Pan="Pan"})(u=r.EActionType||(r.EActionType={}));var c=(function(d){e(f,d);function f(h){var p=this,g,v,y,m,b;return p=d.call(this,h)||this,p.type=n.EChart2DModifierType.MouseWheelZoom,p.growFactor=.001,p.actionType=u.Zoom,p.applyToSeriesViewRect=!0,p.applyToAxes=!0,p.growFactor=(g=h==null?void 0:h.growFactor)!==null&&g!==void 0?g:p.growFactor,p.actionType=(v=h==null?void 0:h.actionType)!==null&&v!==void 0?v:p.actionType,p.applyToSeriesViewRect=(y=h==null?void 0:h.applyToSeriesViewRect)!==null&&y!==void 0?y:p.applyToSeriesViewRect,p.applyToAxes=(m=h==null?void 0:h.applyToAxes)!==null&&m!==void 0?m:p.applyToAxes,p.actionType===u.Pan&&p.xyDirection===t.EXyDirection.XyDirection&&(console.warn("SciChart MouseWheelZoomModifier: actionType=Pan and xyDirection=Xy conflict. Auto setting XyDirection to X"),p.xyDirection=t.EXyDirection.XDirection),p.executeCondition=(b=h==null?void 0:h.executeCondition)!==null&&b!==void 0?b:{button:void 0,key:i.EModifierMouseArgKey.None},p}return f.prototype.modifierMouseWheel=function(h){var p=this;if(this.checkExecuteConditions(h).isPrimary){d.prototype.modifierMouseWheel.call(this,h);var g=(0,a.translateFromCanvasToSeriesViewRect)(h.mousePoint,this.parentSurface.seriesViewRect);if(g&&this.applyToSeriesViewRect)this.actionType===u.Zoom?h.handled=this.performZoom(g,h.mouseWheelDelta):this.actionType===u.Pan&&(h.handled=this.performPan(h.mouseWheelDelta));else if(this.applyToAxes){var v=[];[t.EXyDirection.XDirection,t.EXyDirection.XyDirection].includes(this.xyDirection)&&v.push.apply(v,this.getIncludedXAxis()),[t.EXyDirection.YDirection,t.EXyDirection.XyDirection].includes(this.xyDirection)&&v.push.apply(v,this.getIncludedYAxis());var y=(0,l.getActiveAxes)(v,h.mousePoint);if(y.length>0)if(h.handled=!0,this.actionType===u.Zoom){var m=this.growFactor*h.mouseWheelDelta,b=(0,a.translateFromCanvasToSeriesViewRect)(h.mousePoint,this.parentSurface.seriesViewRect,!0);y.forEach(function(S){p.growBy(b,S,m)})}else this.actionType===u.Pan&&y.forEach(function(S){var _=p.getAxisSize(S),C=h.mouseWheelDelta*p.growFactor*_;S.scroll(C,s.EClipMode.None)})}h.handled&&this.parentSurface.setZoomState(o.EZoomState.UserZooming)}},f.prototype.performZoom=function(h,p){var g=this,v=this.growFactor*p,y=!1;return[t.EXyDirection.XDirection,t.EXyDirection.XyDirection].includes(this.xyDirection)&&this.getIncludedXAxis().forEach(function(m){g.growBy(h,m,v),y=!0}),[t.EXyDirection.YDirection,t.EXyDirection.XyDirection].includes(this.xyDirection)&&this.getIncludedYAxis().forEach(function(m){g.growBy(h,m,v),y=!0}),y},f.prototype.performPan=function(h){var p=this,g=!1;return[t.EXyDirection.XDirection,t.EXyDirection.XyDirection].includes(this.xyDirection)&&this.getIncludedXAxis().forEach(function(v){var y=p.getAxisSize(v),m=h*p.growFactor*y;v.scroll(m,s.EClipMode.None),g=!0}),[t.EXyDirection.YDirection,t.EXyDirection.XyDirection].includes(this.xyDirection)&&this.getIncludedYAxis().forEach(function(v){var y=p.getAxisSize(v),m=h*p.growFactor*y;v.scroll(m,s.EClipMode.None),g=!0}),g},f.prototype.toJSON=function(){var h=d.prototype.toJSON.call(this),p={actionType:this.actionType,growFactor:this.growFactor,applyToSeriesViewRect:this.applyToSeriesViewRect,applyToAxes:this.applyToAxes};return Object.assign(h.options,p),h},f.prototype.getAxisSize=function(h){var p=h.isHorizontalAxis?h.viewRect.width:h.viewRect.height;return Math.abs(p)<1e-8&&this.parentSurface&&(p=h.isHorizontalAxis?this.parentSurface.seriesViewRect.width:this.parentSurface.seriesViewRect.height),p},f})(l.ChartModifierBase2D);r.MouseWheelZoomModifier=c})(HI)),HI}var qm={},Zn={},vne;function ru(){if(vne)return Zn;vne=1,Object.defineProperty(Zn,"__esModule",{value:!0}),Zn.convertCoordinateFromRelativeValue=Zn.convertCoordinateFromPixelValue=Zn.convertCoordinateFromDataValue=Zn.convertToRelativeCoordinate=Zn.convertToPixelCoordinate=Zn.convertToDataValue=Zn.convertCoordinateMode=Zn.convertFromAbsoluteCoordinate=Zn.convertAbsoluteCoordinateToRelativeValue=Zn.convertAbsoluteCoordinateToPixelValue=Zn.convertAbsoluteCoordinateToDataValue=Zn.convertToAbsoluteCoordinate=Zn.convertRelativeValueToAbsoluteCoordinate=Zn.convertPixelValueToAbsoluteCoordinate=Zn.convertDataValueToAbsoluteCoordinate=Zn.subtractCoord=Zn.addCoord=void 0;var r=ta(),e=pn();function i(b,S){return b+S}Zn.addCoord=i;function n(b,S){return b-S}Zn.subtractCoord=n;function t(b,S){return S.getCoordinate(b)}Zn.convertDataValueToAbsoluteCoordinate=t;function o(b){return(0,e.translateToScaled)(b)}Zn.convertPixelValueToAbsoluteCoordinate=o;function a(b,S){return b*S.viewportDimension}Zn.convertRelativeValueToAbsoluteCoordinate=a;function s(b,S,_){switch(_){case r.ECoordinateMode.DataValue:return t(b,S);case r.ECoordinateMode.Pixel:return o(b);case r.ECoordinateMode.Relative:return a(b,S);default:throw new Error('Unexpected coordinate mode: "'.concat(_,'"!'))}}Zn.convertToAbsoluteCoordinate=s;function l(b,S){return S.getDataValue(b)}Zn.convertAbsoluteCoordinateToDataValue=l;function u(b){return(0,e.translateToNotScaled)(b)}Zn.convertAbsoluteCoordinateToPixelValue=u;function c(b,S){return b/S.viewportDimension}Zn.convertAbsoluteCoordinateToRelativeValue=c;function d(b,S,_){switch(_){case r.ECoordinateMode.DataValue:return l(b,S);case r.ECoordinateMode.Pixel:return u(b);case r.ECoordinateMode.Relative:return c(b,S);default:throw new Error('Unexpected coordinate mode: "'.concat(_,'"!'))}}Zn.convertFromAbsoluteCoordinate=d;function f(b,S,_,C){if(_===C)return b;var T=s(b,S,_);return d(T,S,C)}Zn.convertCoordinateMode=f;function h(b,S,_){return f(b,S,_,r.ECoordinateMode.DataValue)}Zn.convertToDataValue=h;function p(b,S,_){return f(b,S,_,r.ECoordinateMode.Pixel)}Zn.convertToPixelCoordinate=p;function g(b,S,_){return f(b,S,_,r.ECoordinateMode.Relative)}Zn.convertToRelativeCoordinate=g;function v(b,S,_){return f(b,S,r.ECoordinateMode.DataValue,_)}Zn.convertCoordinateFromDataValue=v;function y(b,S,_){return f(b,S,r.ECoordinateMode.Pixel,_)}Zn.convertCoordinateFromPixelValue=y;function m(b,S,_){return f(b,S,r.ECoordinateMode.Relative,_)}return Zn.convertCoordinateFromRelativeValue=m,Zn}var JT={},UI={},yne;function sze(){if(yne)return UI;yne=1,Object.defineProperty(UI,"__esModule",{value:!0}),UI.TypedPoint=void 0;var r=(function(){function e(i,n){this.x=i,this.y=n}return e})();return UI.TypedPoint=r,UI}var mne;function A_e(){if(mne)return JT;mne=1;var r=JT&&JT.__extends||(function(){var h=function(p,g){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var m in y)Object.prototype.hasOwnProperty.call(y,m)&&(v[m]=y[m])},h(p,g)};return function(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");h(p,g);function v(){this.constructor=p}p.prototype=g===null?Object.create(g):(v.prototype=g.prototype,new v)}})();Object.defineProperty(JT,"__esModule",{value:!0}),JT.OverviewCustomResizableAnnotation=void 0;var e=sze(),i=ru(),n=Os(),t=oo(),o=pn(),a=ta(),s=Ds(),l=Zs(),u=m8(),c=a.ECoordinateMode.DataValue,d=(function(h){r(p,h);function p(g){var v=this,y,m,b;return v=h.call(this,g)||this,v.minWidthProperty=10,v.minHeightProperty=10,v.adornerSvgStringTemplateProperty=(y=g==null?void 0:g.adornerSvgStringTemplate)!==null&&y!==void 0?y:v.adornerSvgStringTemplateProperty,v.minWidthProperty=(m=g==null?void 0:g.minWidth)!==null&&m!==void 0?m:v.minWidthProperty,v.minHeightProperty=(b=g==null?void 0:g.minHeight)!==null&&b!==void 0?b:v.minHeightProperty,v}return Object.defineProperty(p.prototype,"minWidth",{get:function(){return this.minWidthProperty},set:function(g){this.minWidthProperty=g,this.notifyPropertyChanged(l.PROPERTY.MINIMUM_WIDTH)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"minHeight",{get:function(){return this.minHeightProperty},set:function(g){this.minHeightProperty=g,this.notifyPropertyChanged(l.PROPERTY.MINIMUM_HEIGHT)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"adornerSvgStringTemplate",{get:function(){return this.adornerSvgStringTemplateProperty},set:function(g){this.adornerSvgStringTemplateProperty=g,this.notifyPropertyChanged(l.PROPERTY.ADORNER_TEMPLATE)},enumerable:!1,configurable:!0}),p.prototype.setCoordinates=function(g){var v,y,m,b;if(this.parentSurface){var S=this.xAxis,_=S.getCurrentCoordinateCalculator(),C=this.yAxis,T=C.getCurrentCoordinateCalculator(),x=(0,i.convertCoordinateMode)(this.x1,_,this.xCoordinateMode,c),A=(0,i.convertCoordinateMode)(this.x2,_,this.xCoordinateMode,c),w=(0,i.convertCoordinateMode)(this.y1,T,this.yCoordinateMode,c),L=(0,i.convertCoordinateMode)(this.y2,T,this.yCoordinateMode,c),k=g.x1,D=k===void 0?x:k,j=g.x2,N=j===void 0?A:j,V=g.y1,W=V===void 0?w:V,K=g.y2,H=K===void 0?L:K,U=this.convertPointToAbsoluteCoordinates(new e.TypedPoint(D,W),c,c),I=this.convertPointToAbsoluteCoordinates(new e.TypedPoint(N,H),c,c),Q=S.isHorizontalAxis?_:T,Z=C.isHorizontalAxis?_:T,ee=Q.hasFlippedCoordinates?D:N,ie=Q.hasFlippedCoordinates?N:D,de=Z.hasFlippedCoordinates?D:N,pe=Z.hasFlippedCoordinates?N:D,_e=(0,i.convertToAbsoluteCoordinate)(ee,Q,c),Te=(0,i.convertToAbsoluteCoordinate)(ie,Q,c),De=(0,i.convertToAbsoluteCoordinate)(de,Z,c),Pe=(0,i.convertToAbsoluteCoordinate)(pe,Z,c),Ee=this.isVerticalChart?new e.TypedPoint(De,_e):new e.TypedPoint(_e,De),Re=this.isVerticalChart?new e.TypedPoint(Pe,Te):new e.TypedPoint(Te,Pe);S.isHorizontalAxis?D-x>=A-N?(this.x2=(v=(0,i.convertFromAbsoluteCoordinate)(I.x,_,this.xCoordinateMode))!==null&&v!==void 0?v:this.x2,_.hasFlippedCoordinates?this.adjustLeftSideToLimits(I.x,Ee,_):this.adjustRightSideToLimits(I.x,Re,_)):(this.x1=(y=(0,i.convertFromAbsoluteCoordinate)(U.x,_,this.xCoordinateMode))!==null&&y!==void 0?y:this.x1,_.hasFlippedCoordinates?this.adjustRightSideToLimits(U.x,Re,_):this.adjustLeftSideToLimits(U.x,Ee,_)):(0,i.subtractCoord)(D,x)>=(0,i.subtractCoord)(A,N)?(this.x2=(m=(0,i.convertFromAbsoluteCoordinate)(I.y,_,this.xCoordinateMode))!==null&&m!==void 0?m:this.x2,_.hasFlippedCoordinates?this.adjustTopSideToLimits(I.y,Ee,_):this.adjustBottomSideToLimits(I.y,Re,_)):(this.x1=(b=(0,i.convertFromAbsoluteCoordinate)(U.y,_,this.xCoordinateMode))!==null&&b!==void 0?b:this.x1,_.hasFlippedCoordinates?this.adjustBottomSideToLimits(U.y,Re,_):this.adjustTopSideToLimits(U.y,Ee,_))}},p.prototype.onDragStarted=function(g){var v;g.nativeEvent.preventDefault(),(v=this.dragStarted)===null||v===void 0||v.raiseEvent();var y=this.getAnnotationBorders(!0),m=y.x1,b=y.x2,S=y.y1,_=y.y2,C=(0,o.translateFromCanvasToSeriesViewRect)(new e.TypedPoint(g.mousePoint.x,g.mousePoint.y),this.parentSurface.seriesViewRect,!0);if(!C)return!1;var T=(0,o.translateToNotScaled)(C.x),x=(0,o.translateToNotScaled)(C.y),A=this.isVerticalChart?this.resizeDirections!==n.EXyDirection.XDirection:this.resizeDirections!==n.EXyDirection.YDirection,w=this.isVerticalChart?this.resizeDirections!==n.EXyDirection.YDirection:this.resizeDirections!==n.EXyDirection.XDirection;if(A){if((0,t.testIsInBounds)(T,x,m-l.ADORNER_GRIP_RADIUS,_,m+l.ADORNER_GRIP_RADIUS,S))return this.adornerDraggingPoint=a.EDraggingGripPoint.x1y1,!0;if((0,t.testIsInBounds)(T,x,b-l.ADORNER_GRIP_RADIUS,_,b+l.ADORNER_GRIP_RADIUS,S))return this.adornerDraggingPoint=a.EDraggingGripPoint.x2y2,!0}if(w){if((0,t.testIsInBounds)(T,x,m,S+l.ADORNER_GRIP_RADIUS,b,S-l.ADORNER_GRIP_RADIUS))return this.adornerDraggingPoint=a.EDraggingGripPoint.x2y1,!0;if((0,t.testIsInBounds)(T,x,m,_+l.ADORNER_GRIP_RADIUS,b,_-l.ADORNER_GRIP_RADIUS))return this.adornerDraggingPoint=a.EDraggingGripPoint.x1y2,!0}return this.clickToSelect(g)?(this.adornerDraggingPoint=a.EDraggingGripPoint.Body,!0):!1},p.prototype.update=function(g,v,y,m){this.create(g,v,y,m),this.svg.style.display=this.isHidden?"none":"block",this.svg.style.opacity=this.opacity.toString();var b=this.getX1Coordinate(g,v),S=this.getY1Coordinate(g,v),_=this.getX2Coordinate(g,v),C=this.getY2Coordinate(g,v);if(this.setAnnotationBorders(b,_,S,C),isNaN(b)||isNaN(S)||!isFinite(b)||!isFinite(S)||isNaN(_)||isNaN(C)||!isFinite(_)||!isFinite(C))this.svg.style.display="none";else{var T=Math.abs(_-b),x=Math.abs(C-S),A=(b<_?b:_)+y,w=(S<C?S:C)+m;this.setSvgAttribute("x",A),this.setSvgAttribute("y",w),this.setSvgAttribute("width",T),this.setSvgAttribute("height",x),this.svgDOMRect=this.svg.getBoundingClientRect()}this.updateAdornerInner()},p.prototype.calcDragDistance=function(g){var v=this.xAxis,y=v.getCurrentCoordinateCalculator(),m=this.yAxis,b=m.getCurrentCoordinateCalculator(),S=v.isHorizontalAxis?y:b,_=m.isHorizontalAxis?y:b,C=this.convertPointToAbsoluteCoordinates(new e.TypedPoint(this.x1,this.y1),this.xCoordinateMode,this.yCoordinateMode),T=C.x,x=C.y,A=this.convertPointToAbsoluteCoordinates(new e.TypedPoint(this.x2,this.y2),this.xCoordinateMode,this.yCoordinateMode),w=A.x,L=A.y,k=this.convertPointToAbsoluteCoordinates(g,this.xCoordinateMode,this.yCoordinateMode),D=this.isVerticalChart?this.resizeDirections!==n.EXyDirection.XDirection:this.resizeDirections!==n.EXyDirection.YDirection,j=this.isVerticalChart?this.resizeDirections!==n.EXyDirection.YDirection:this.resizeDirections!==n.EXyDirection.XDirection;switch(this.adornerDraggingPoint){case a.EDraggingGripPoint.Body:{if(!this.prevValue){this.prevValue=g;return}var N=this.x1-(this.prevValue.x-g.x),V=this.x2-(this.prevValue.x-g.x),W=this.y1-(this.prevValue.y-g.y),K=this.y2-(this.prevValue.y-g.y),H=(0,i.convertToAbsoluteCoordinate)(N,y,this.xCoordinateMode),U=(0,i.convertToAbsoluteCoordinate)(V,y,this.xCoordinateMode),I=(0,i.convertToAbsoluteCoordinate)(W,b,this.yCoordinateMode),Q=(0,i.convertToAbsoluteCoordinate)(K,b,this.yCoordinateMode),Z=(0,i.convertAbsoluteCoordinateToDataValue)(H,y),ee=(0,i.convertAbsoluteCoordinateToDataValue)(U,y),ie=(0,i.convertAbsoluteCoordinateToDataValue)(I,b),de=(0,i.convertAbsoluteCoordinateToDataValue)(Q,b),pe=(0,i.convertDataValueToAbsoluteCoordinate)(v.visibleRange.min,y),_e=(0,i.convertDataValueToAbsoluteCoordinate)(v.visibleRange.max,y),Te=(0,i.convertDataValueToAbsoluteCoordinate)(m.visibleRange.min,b),De=(0,i.convertDataValueToAbsoluteCoordinate)(m.visibleRange.max,b),Pe=(0,i.convertFromAbsoluteCoordinate)(pe,y,this.xCoordinateMode),Ee=(0,i.convertFromAbsoluteCoordinate)(_e,y,this.xCoordinateMode),Re=(0,i.convertFromAbsoluteCoordinate)(Te,b,this.yCoordinateMode),je=(0,i.convertFromAbsoluteCoordinate)(De,b,this.yCoordinateMode);if(this.resizeDirections!==n.EXyDirection.YDirection)if(Z<v.visibleRange.min){var Ke=(0,i.subtractCoord)(H,pe);this.x1=Pe,this.x2=(0,i.convertFromAbsoluteCoordinate)((0,i.subtractCoord)(U,Ke),y,this.xCoordinateMode)}else if(ee>v.visibleRange.max){var Ke=(0,i.subtractCoord)(_e,U);this.x1=(0,i.convertFromAbsoluteCoordinate)((0,i.addCoord)(H,Ke),y,this.xCoordinateMode),this.x2=Ee}else this.x1=N,this.x2=V;if(this.resizeDirections!==n.EXyDirection.XDirection)if(de>m.visibleRange.max){var Ke=(0,i.subtractCoord)(Q,De);this.y2=je,this.y1=(0,i.convertFromAbsoluteCoordinate)((0,i.addCoord)(I,Ke),b,this.yCoordinateMode)}else if(ie<m.visibleRange.min){var Ke=(0,i.subtractCoord)(I,Te);this.y2=(0,i.convertFromAbsoluteCoordinate)((0,i.subtractCoord)(Q,Ke),b,this.yCoordinateMode),this.y1=Re}else this.y1=W,this.y2=K;this.prevValue=g;break}case a.EDraggingGripPoint.x1y1:{D&&(S.hasFlippedCoordinates?this.adjustLeftSideToLimits(w,k,S):this.adjustLeftSideToLimits(T,k,S));break}case a.EDraggingGripPoint.x2y2:{D&&(S.hasFlippedCoordinates?this.adjustRightSideToLimits(T,k,S):this.adjustRightSideToLimits(w,k,S));break}case a.EDraggingGripPoint.x2y1:{j&&(_.hasFlippedCoordinates?this.adjustTopSideToLimits(L,k,_):this.adjustTopSideToLimits(x,k,_));break}case a.EDraggingGripPoint.x1y2:{j&&(_.hasFlippedCoordinates?this.adjustBottomSideToLimits(x,k,_):this.adjustBottomSideToLimits(L,k,_));break}default:throw new Error("Unexpected adornerDraggingPoint value ".concat(this.adornerDraggingPoint))}},p.prototype.create=function(g,v,y,m){if(!this.svg){var b=this.applyClipping(this.svgString,this.clipping);this.setSvg(s.annotationHelpers.createSvg(b,this.svgRoot,this.nextSibling));var S=this.svg.getBBox(),_=this.getX1Coordinate(g,v),C=this.getY1Coordinate(g,v);this.isVerticalChart?(this.x2===void 0&&(this.x2=this.getValue(_+S.width,g,a.ECoordinateMode.Pixel)),this.y2===void 0&&(this.y2=this.getValue(C+S.height,v,a.ECoordinateMode.Pixel))):(this.x2===void 0&&(this.x2=this.getValue(C+S.height,g,a.ECoordinateMode.Pixel)),this.y2===void 0&&(this.y2=this.getValue(_+S.width,v,a.ECoordinateMode.Pixel)));var T=this.getX2Coordinate(g,v),x=this.getY2Coordinate(g,v),A=Math.abs(T-_),w=Math.abs(x-C);if(this.isVerticalChart){if(A<this.minWidth){var L=this.isVerticalChart?v:g;this.y2=this.getValue(_+this.minWidth,L,a.ECoordinateMode.Pixel)}if(w<this.minHeight){var k=this.isVerticalChart?g:v;this.x2=this.getValue(C+this.minHeight,k,a.ECoordinateMode.Pixel)}}else{if(A<this.minWidth){var L=this.isVerticalChart?v:g;this.x2=this.getValue(_+this.minWidth,L,a.ECoordinateMode.Pixel)}if(w<this.minHeight){var k=this.isVerticalChart?g:v;this.y2=this.getValue(C+this.minHeight,k,a.ECoordinateMode.Pixel)}}}},p.prototype.updateAdornerInner=function(){if(this.deleteAdorner(),this.adornerSvgStringTemplate){var g=this.getAdornerAnnotationBorders(!0),v=g.x1,y=g.x2,m=g.y1,b=g.y2,S=this.adornerSvgStringTemplate(v,m,y,b),_=this.applySvgClipping(S,this.adornerClipping);this.svgAdorner=s.annotationHelpers.createSvg(_,this.svgAdornerRoot)}},p.prototype.checkIsClickedOnAnnotationInternal=function(g,v){var y=this.getAnnotationBorders(!0),m=y.x1,b=y.x2,S=y.y1,_=y.y2,C=(0,o.translateToNotScaled)(g),T=(0,o.translateToNotScaled)(v);if((0,t.testIsInBounds)(C,T,m,_,b,S))return!0;var x=this.isVerticalChart?this.resizeDirections!==n.EXyDirection.XDirection:this.resizeDirections!==n.EXyDirection.YDirection,A=this.isVerticalChart?this.resizeDirections!==n.EXyDirection.YDirection:this.resizeDirections!==n.EXyDirection.XDirection;if(x){if((0,t.testIsInBounds)(C,T,m-l.ADORNER_GRIP_RADIUS,_,m+l.ADORNER_GRIP_RADIUS,S))return!0;if((0,t.testIsInBounds)(C,T,b-l.ADORNER_GRIP_RADIUS,_,b+l.ADORNER_GRIP_RADIUS,S))return!0}if(A){if((0,t.testIsInBounds)(C,T,m,S+l.ADORNER_GRIP_RADIUS,b,S-l.ADORNER_GRIP_RADIUS))return!0;if((0,t.testIsInBounds)(C,T,m,_+l.ADORNER_GRIP_RADIUS,b,_-l.ADORNER_GRIP_RADIUS))return!0}return!1},p.prototype.adjustLeftSideToLimits=function(g,v,y){var m=this.isVerticalChart?v.y:v.x,b=f(m,y),S=g-b>=(0,o.translateToScaled)(this.minWidth),_=S?b:g-(0,o.translateToScaled)(this.minWidth),C=(0,i.convertFromAbsoluteCoordinate)(_,y,this.isVerticalChart?this.yCoordinateMode:this.xCoordinateMode);this.isVerticalChart?y.hasFlippedCoordinates?this.y1=C:this.y2=C:y.hasFlippedCoordinates?this.x1=C:this.x2=C},p.prototype.adjustRightSideToLimits=function(g,v,y){var m=this.isVerticalChart?v.y:v.x,b=f(m,y),S=b-g>=(0,o.translateToScaled)(this.minWidth),_=S?b:g+(0,o.translateToScaled)(this.minWidth),C=(0,i.convertFromAbsoluteCoordinate)(_,y,this.isVerticalChart?this.yCoordinateMode:this.xCoordinateMode);this.isVerticalChart?y.hasFlippedCoordinates?this.y2=C:this.y1=C:y.hasFlippedCoordinates?this.x2=C:this.x1=C},p.prototype.adjustTopSideToLimits=function(g,v,y){var m=this.isVerticalChart?v.x:v.y,b=f(m,y),S=g-b>=(0,o.translateToScaled)(this.minHeight),_=S?b:g-(0,o.translateToScaled)(this.minHeight),C=this.convertFromCoordinate(_,y,this.isVerticalChart?this.xCoordinateMode:this.yCoordinateMode);this.isVerticalChart?y.hasFlippedCoordinates?this.x1=C:this.x2=C:y.hasFlippedCoordinates?this.y1=C:this.y2=C},p.prototype.adjustBottomSideToLimits=function(g,v,y){var m=this.isVerticalChart?v.x:v.y,b=f(m,y),S=b-g>=(0,o.translateToScaled)(this.minHeight),_=S?b:g+(0,o.translateToScaled)(this.minHeight),C=this.convertFromCoordinate(_,y,this.isVerticalChart?this.xCoordinateMode:this.yCoordinateMode);this.isVerticalChart?y.hasFlippedCoordinates?this.x2=C:this.x1=C:y.hasFlippedCoordinates?this.y2=C:this.y1=C},p.prototype.convertPointToAbsoluteCoordinates=function(g,v,y){var m=this.xAxis,b=m.getCurrentCoordinateCalculator(),S=this.yAxis,_=S.getCurrentCoordinateCalculator(),C=(0,i.convertToAbsoluteCoordinate)(g.x,b,v),T=(0,i.convertToAbsoluteCoordinate)(g.y,_,y);return this.isVerticalChart?new e.TypedPoint(T,C):new e.TypedPoint(C,T)},p})(u.CustomAnnotation);JT.OverviewCustomResizableAnnotation=d;var f=function(h,p){return h<=0?0:h>=p.viewportDimension?p.viewportDimension:h};return JT}var bne;function Q8(){if(bne)return qm;bne=1;var r=qm&&qm.__extends||(function(){var b=function(S,_){return b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,T){C.__proto__=T}||function(C,T){for(var x in T)Object.prototype.hasOwnProperty.call(T,x)&&(C[x]=T[x])},b(S,_)};return function(S,_){if(typeof _!="function"&&_!==null)throw new TypeError("Class extends value "+String(_)+" is not a constructor or null");b(S,_);function C(){this.constructor=S}S.prototype=_===null?Object.create(_):(C.prototype=_.prototype,new C)}})(),e=qm&&qm.__assign||function(){return e=Object.assign||function(b){for(var S,_=1,C=arguments.length;_<C;_++){S=arguments[_];for(var T in S)Object.prototype.hasOwnProperty.call(S,T)&&(b[T]=S[T])}return b},e.apply(this,arguments)};Object.defineProperty(qm,"__esModule",{value:!0}),qm.OverviewRangeSelectionModifier=void 0;var i=QF(),n=Mr(),t=oi(),o=vn(),a=uy(),s=bo(),l=ru(),u=Os(),c=pn(),d=ta(),f=A_e(),h=nu(),p=(function(b){r(S,b);function S(_){var C=this,T,x,A;return C=b.call(this,_)||this,C.type=s.EChart2DModifierType.OverviewRangeSelection,C.animationDuration=1e3,C.animate=!0,C.isClicked=!1,C.onSelectedAreaChanged=_==null?void 0:_.onSelectedAreaChanged,C.xAxisId=(T=_==null?void 0:_.xAxisId)!==null&&T!==void 0?T:C.xAxisId,C.yAxisId=(x=_==null?void 0:_.yAxisId)!==null&&x!==void 0?x:C.yAxisId,C.executeCondition=(A=_==null?void 0:_.executeCondition)!==null&&A!==void 0?A:{button:a.EExecuteOn.MouseLeftButton},C}return S.prototype.onAttach=function(){var _=this;b.prototype.onAttach.call(this),this.updateSelectionAnnotation();var C=function(){_.setInitialAnnotationCoordinates(),_.parentSurface.layoutMeasured.unsubscribe(C)};this.parentSurface.layoutMeasured.subscribe(C)},S.prototype.modifierMouseDown=function(_){if(b.prototype.modifierMouseDown.call(this,_),!!this.checkExecuteConditions(_).isPrimary){if(!this.isAttached)throw new Error("Should not call OverviewRangeSelectionModifier.modifierMouseDown if not attached");var C=(0,c.translateFromCanvasToSeriesViewRect)(_.mousePoint,this.parentSurface.seriesViewRect);C&&(this.isClicked=!0)}},S.prototype.modifierMouseUp=function(_){var C=this,T;if(b.prototype.modifierMouseUp.call(this,_),!!this.checkExecuteConditions(_).isPrimary){if(!this.isAttached)throw new Error("Should not call OverviewRangeSelectionModifier.modifierMouseUp if not attached");if(this.isClicked){_.handled=!0,(T=this.overviewPositionAnimation)===null||T===void 0||T.cancel();var x=this.parentSurface.seriesViewRect;this.pointTo=(0,c.translateFromCanvasToSeriesViewRect)(o.Rect.clipPointToRect(_.mousePoint,x),x),this.isClicked=!1;var A=(0,c.translateToNotScaled)(this.xAxis.isHorizontalAxis?this.pointTo.x:this.pointTo.y),w=(0,l.subtractCoord)(A,(this.rangeSelectionAnnotation.x1+this.rangeSelectionAnnotation.x2)/2),L=new t.NumberRange(this.rangeSelectionAnnotation.x1,this.rangeSelectionAnnotation.x2),k=new t.NumberRange(this.rangeSelectionAnnotation.x1+w,this.rangeSelectionAnnotation.x2+w),D=function(j){var N,V,W,K=C.xAxis.getCurrentCoordinateCalculator(),H=C.rangeSelectionAnnotation.xCoordinateMode;(N=C.rangeSelectionAnnotation)===null||N===void 0||N.setCoordinates({x1:(0,l.convertToDataValue)(j.min,K,H),x2:(0,l.convertToDataValue)(j.max,K,H)}),C.annotationBeforeSelectedAreaProperty.x2=(V=C.rangeSelectionAnnotation)===null||V===void 0?void 0:V.x1,C.annotationAfterSelectedAreaProperty.x1=(W=C.rangeSelectionAnnotation)===null||W===void 0?void 0:W.x2,C.onSelectedAreaChanged(new t.NumberRange((0,l.convertToDataValue)(C.rangeSelectionAnnotation.x1,K,H),(0,l.convertToDataValue)(C.rangeSelectionAnnotation.x2,K,H)))};this.animate?(this.overviewPositionAnimation=i.NumberRangeAnimator.animate(L,k,this.animationDuration,D,null),this.parentSurface.addAnimation(this.overviewPositionAnimation)):D(k)}}},Object.defineProperty(S.prototype,"rangeSelectionAnnotation",{get:function(){return this.rangeSelectionAnnotationProperty},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"unselectedsvgString",{get:function(){return this.annotationBeforeSelectedAreaProperty.svgString},set:function(_){this.annotationBeforeSelectedAreaProperty.svgString=_,this.annotationAfterSelectedAreaProperty.svgString=_},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"selectedArea",{get:function(){return this.selectedAreaProperty},set:function(_){var C,T;this.selectedAreaProperty=_;var x=this.xAxis;if(x){var A=x.getCurrentCoordinateCalculator();(C=this.rangeSelectionAnnotation)===null||C===void 0||C.setCoordinates({x1:_.min,x2:_.max}),this.annotationBeforeSelectedAreaProperty&&(this.annotationBeforeSelectedAreaProperty.x1=(0,l.convertCoordinateFromDataValue)(x.visibleRange.min,A,this.annotationAfterSelectedAreaProperty.xCoordinateMode),this.annotationBeforeSelectedAreaProperty.x2=this.rangeSelectionAnnotation.x1),this.annotationAfterSelectedAreaProperty&&(this.annotationAfterSelectedAreaProperty.x1=(T=this.rangeSelectionAnnotation)===null||T===void 0?void 0:T.x2,this.annotationAfterSelectedAreaProperty.x2=(0,l.convertCoordinateFromDataValue)(x.visibleRange.max,A,this.annotationAfterSelectedAreaProperty.xCoordinateMode))}},enumerable:!1,configurable:!0}),S.prototype.createAnnotation=function(_){return new f.OverviewCustomResizableAnnotation(_)},S.prototype.updateSelectionAnnotation=function(){var _=this;if(this.parentSurface){var C=function(){var k;(k=_.overviewPositionAnimation)===null||k===void 0||k.cancel();var D=_.xAxis,j=D.getCurrentCoordinateCalculator(),N=new t.NumberRange((0,l.convertToDataValue)(_.rangeSelectionAnnotation.x1,j,_.rangeSelectionAnnotation.xCoordinateMode),(0,l.convertToDataValue)(_.rangeSelectionAnnotation.x2,j,_.rangeSelectionAnnotation.xCoordinateMode));_.selectedAreaProperty=N,_.annotationBeforeSelectedAreaProperty.x2=_.rangeSelectionAnnotation.x1,_.annotationAfterSelectedAreaProperty.x1=_.rangeSelectionAnnotation.x2,_.onSelectedAreaChanged(N)},T=this.xAxis,x={xAxisId:this.xAxisId,yAxisId:this.yAxisId,opacity:.5,y1:0,y2:1,xCoordinateMode:d.ECoordinateMode.Pixel,yCoordinateMode:d.ECoordinateMode.Relative,resizeDirections:u.EXyDirection.XDirection},A=this.createAnnotation(e(e({},x),{isEditable:!0,svgString:y,onDrag:C})),w=this.createAnnotation(e(e({},x),{svgString:m})),L=this.createAnnotation(e(e({},x),{svgString:m}));T.isHorizontalAxis?(A.adornerSvgStringTemplate=g,w.minWidth=0,L.minWidth=0):(A.adornerSvgStringTemplate=v,w.minHeight=0,L.minHeight=0),this.rangeSelectionAnnotationProperty=(0,n.deleteSafe)(this.rangeSelectionAnnotation),this.annotationBeforeSelectedAreaProperty=(0,n.deleteSafe)(this.annotationBeforeSelectedAreaProperty),this.annotationAfterSelectedAreaProperty=(0,n.deleteSafe)(this.annotationAfterSelectedAreaProperty),this.parentSurface.modifierAnnotations.remove(this.rangeSelectionAnnotation,!1),this.parentSurface.modifierAnnotations.remove(this.annotationBeforeSelectedAreaProperty,!1),this.parentSurface.modifierAnnotations.remove(this.annotationAfterSelectedAreaProperty,!1),this.parentSurface.modifierAnnotations.add(A),this.parentSurface.modifierAnnotations.add(w),this.parentSurface.modifierAnnotations.add(L),this.rangeSelectionAnnotationProperty=A,this.annotationBeforeSelectedAreaProperty=w,this.annotationAfterSelectedAreaProperty=L}},S.prototype.setInitialAnnotationCoordinates=function(){var _=this.xAxis,C=_.getCurrentCoordinateCalculator();this.rangeSelectionAnnotation.x1=(0,l.convertCoordinateFromDataValue)(this.selectedArea.min,C,this.rangeSelectionAnnotation.xCoordinateMode),this.rangeSelectionAnnotation.x2=(0,l.convertCoordinateFromDataValue)(this.selectedArea.max,C,this.rangeSelectionAnnotation.xCoordinateMode),this.annotationBeforeSelectedAreaProperty.x1=(0,l.convertCoordinateFromDataValue)(_.visibleRange.min,C,this.annotationBeforeSelectedAreaProperty.xCoordinateMode),this.annotationBeforeSelectedAreaProperty.x2=(0,l.convertCoordinateFromDataValue)(this.selectedArea.min,C,this.annotationBeforeSelectedAreaProperty.xCoordinateMode),this.annotationAfterSelectedAreaProperty.x1=(0,l.convertCoordinateFromDataValue)(this.selectedArea.max,C,this.annotationAfterSelectedAreaProperty.xCoordinateMode),this.annotationAfterSelectedAreaProperty.x2=(0,l.convertCoordinateFromDataValue)(_.visibleRange.max,C,this.annotationAfterSelectedAreaProperty.xCoordinateMode)},S})(h.ChartModifierBase2D);qm.OverviewRangeSelectionModifier=p;var g=function(b,S,_,C){var T="black",x="#2e2e2e",A=3,w="40%",L="30%",k=_-b,D=C-S;return'<svg x="'.concat(b,'" y="').concat(S,'" width="').concat(k,'px" height="').concat(D,'px" viewBox="0 0 ').concat(k," ").concat(D,`" overflow="visible" xmlns="http://www.w3.org/2000/svg">
        <line x1="0" y1="0" x2="`).concat(k,'" y2="0" stroke="').concat(T,`" stroke-width="1" />
        <line x1="0" y1="`).concat(D,'" x2="').concat(k,'" y2="').concat(D,'" stroke="').concat(T,`" stroke-width="1" />
        <line x1="0" y1="0" x2="0" y2="`).concat(D,'" stroke="').concat(T,`" stroke-width="1" />
        <line x1="`).concat(k,'" y1="0" x2="').concat(k,'" y2="').concat(D,'" stroke="').concat(T,`" stroke-width="1" />
        <rect x="`).concat(0-A,'" y="').concat(L,'" width="7" height="').concat(w,'" fill="').concat(x,'" rx="5" stroke="').concat(T,`" />
        <rect x="`).concat(k-A,'" y="').concat(L,'" width="7" height="').concat(w,'" fill="').concat(x,'" rx="5" stroke="').concat(T,`" />
        </svg>`)},v=function(b,S,_,C){var T="black",x="#2e2e2e",A="40%",w=3,L="30%",k=_-b,D=C-S;return'<svg x="'.concat(b,'" y="').concat(S,'" width="').concat(k,'px" height="').concat(D,'px" viewBox="0 0 ').concat(k," ").concat(D,`" overflow="visible" xmlns="http://www.w3.org/2000/svg">
        <line x1="0" y1="0" x2="`).concat(k,'" y2="0" stroke="').concat(T,`" stroke-width="1" />
        <line x1="0" y1="`).concat(D,'" x2="').concat(k,'" y2="').concat(D,'" stroke="').concat(T,`" stroke-width="1" />
        <line x1="0" y1="0" x2="0" y2="`).concat(D,'" stroke="').concat(T,`" stroke-width="1" />
        <line x1="`).concat(k,'" y1="0" x2="').concat(k,'" y2="').concat(D,'" stroke="').concat(T,`" stroke-width="1" />
        <rect x="`).concat(L,'" y="').concat(0-w,'" width="').concat(A,'" height="7" fill="').concat(x,'" rx="5" stroke="').concat(T,`" />
        <rect x="`).concat(L,'" y="').concat(D-w,'" width="').concat(A,'" height="7" fill="').concat(x,'" rx="5" stroke="').concat(T,`" />
        </svg>`)},y=`<svg width="50" height="50" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg">
    <rect width="100%" height="100%" style="fill:transparent">
    </rect>
</svg>`,m=`<svg width="50" height="50" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg">
        <rect width="100%" height="100%" style="fill:black">
        </rect>
    </svg>`;return qm}var QT={},Sne;function uU(){if(Sne)return QT;Sne=1;var r=QT&&QT.__extends||(function(){var l=function(u,c){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(d[h]=f[h])},l(u,c)};return function(u,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");l(u,c);function d(){this.constructor=u}u.prototype=c===null?Object.create(c):(d.prototype=c.prototype,new d)}})();Object.defineProperty(QT,"__esModule",{value:!0}),QT.PinchZoomModifier=void 0;var e=Ii(),i=bo(),n=Os(),t=ty(),o=pn(),a=nu(),s=(function(l){r(u,l);function u(c){var d=this,f,h;return d=l.call(this,c)||this,d.horizontalGrowFactor=.005,d.verticalGrowFactor=.005,d.getMiddlePoint=function(p,g){return new e.Point((p.x+g.x)/2,(p.y+g.y)/2)},d.type=i.EChart2DModifierType.PinchZoom,d.horizontalGrowFactor=(f=c==null?void 0:c.horizontalGrowFactor)!==null&&f!==void 0?f:d.horizontalGrowFactor,d.verticalGrowFactor=(h=c==null?void 0:c.verticalGrowFactor)!==null&&h!==void 0?h:d.verticalGrowFactor,d}return u.prototype.modifierMouseDown=function(c){if(l.prototype.modifierMouseDown.call(this,c),!this.isAttached)throw new Error("Should not call PinchZoomModifier.modifierMouseDown if not attached");var d=(0,o.translateFromCanvasToSeriesViewRect)(c.mousePoint,this.parentSurface.seriesViewRect);if(d){var f=c.pointerType==="touch"||c.pointerType==="pen";f&&this.activePointerEvents.set(c.pointerId,c)}},u.prototype.modifierMouseMove=function(c){l.prototype.modifierMouseMove.call(this,c);var d=this.getIsActionAllowed(c);d&&(this.parentSurface.setZoomState(t.EZoomState.UserZooming),this.performModifierAction(c))},u.prototype.modifierMouseUp=function(c){l.prototype.modifierMouseUp.call(this,c),this.removeFromActiveTouchEvents(c)},u.prototype.modifierPointerCancel=function(c){l.prototype.modifierPointerCancel.call(this,c),this.removeFromActiveTouchEvents(c)},u.prototype.toJSON=function(){var c=l.prototype.toJSON.call(this),d={horizontalGrowFactor:this.horizontalGrowFactor,verticalGrowFactor:this.verticalGrowFactor};return Object.assign(c.options,d),c},u.prototype.performZoom=function(c,d,f,h,p){var g=this,v=h*d,y=p*f;[n.EXyDirection.XDirection,n.EXyDirection.XyDirection].includes(this.xyDirection)&&this.getIncludedXAxis().forEach(function(m){g.growBy(c,m,v)}),[n.EXyDirection.YDirection,n.EXyDirection.XyDirection].includes(this.xyDirection)&&this.getIncludedYAxis().forEach(function(m){g.growBy(c,m,y)})},u.prototype.removeFromActiveTouchEvents=function(c){this.activePointerEvents.delete(c.pointerId),this.activePointerEvents.size<2&&(this.previousHorizontalTouchPointsDistance=void 0,this.previousVerticalTouchPointsDistance=void 0)},u.prototype.performModifierAction=function(c){var d=Array.from(this.activePointerEvents.values()),f=d[0].mousePoint,h=d[1].mousePoint,p=Math.abs(f.x-h.x),g=Math.abs(f.y-h.y),v=this.getMiddlePoint(f,h),y=(0,o.translateFromCanvasToSeriesViewRect)(v,this.parentSurface.seriesViewRect);if(y&&this.previousHorizontalTouchPointsDistance!==void 0&&this.previousVerticalTouchPointsDistance!==void 0){var m=this.previousHorizontalTouchPointsDistance-p,b=this.previousVerticalTouchPointsDistance-g;this.performZoom(y,m,b,this.horizontalGrowFactor,this.verticalGrowFactor)}this.previousHorizontalTouchPointsDistance=p,this.previousVerticalTouchPointsDistance=g},u.prototype.getIsActionAllowed=function(c){var d=c.pointerType==="touch"||c.pointerType==="pen";return d&&this.activePointerEvents.size>=2},u})(a.ChartModifierBase2D);return QT.PinchZoomModifier=s,QT}var ex={},iW={},_ne;function dV(){return _ne||(_ne=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.getTooltipPositionProperties=r.getUpdatedPoints=r.getEndPoint=r.getStartPoint=r.getTotalSpacing=r.getTotalSize=r.checkHasOverlap=r.spreadTooltips=r.EShift=r.ECoord=r.ESize=void 0;var e;(function(f){f.width="width",f.height="height"})(e=r.ESize||(r.ESize={}));var i;(function(f){f.xCoord="xCoord",f.yCoord="yCoord"})(i=r.ECoord||(r.ECoord={}));var n;(function(f){f.xCoordShift="xCoordShift",f.yCoordShift="yCoordShift"})(n=r.EShift||(r.EShift={}));var t=function(f,h,p,g,v){var y=new Map,m=f.length,b=(0,r.getTotalSize)(f,p.sizePropertyName),S=(0,r.getTotalSpacing)(f,g),_=b+S,C=f[0],T=f[m-1],x=(0,r.getStartPoint)(C[p.coordPropertyName],C[p.shiftPropertyName],h),A=(0,r.getEndPoint)(T[p.coordPropertyName],T[p.shiftPropertyName],h,T[p.sizePropertyName]),w=(0,r.getUpdatedPoints)(x,A,_,v[p.sizePropertyName]);x=w.start,A=w.end;var L=(A-x-b)/(f.length-1);return f.reduce(function(k,D){return y.set(D.index,(k-D[p.coordPropertyName])/h),k+D[p.sizePropertyName]+L},x),y};r.spreadTooltips=t;var o=function(f,h,p,g){for(var v=f.length,y=0;y<v-1;y++){var m=f[y],b=m[g.coordPropertyName]+m[g.sizePropertyName]+m[g.shiftPropertyName]*p,S=f[y+1],_=S[g.coordPropertyName]+S[g.shiftPropertyName]*p,C=_-b;if(C<h)return!0}return!1};r.checkHasOverlap=o;var a=function(f,h){return f.reduce(function(p,g){var v=g[h];return typeof v=="number"?p+v:p},0)};r.getTotalSize=a;var s=function(f,h){return(f.length-1)*h};r.getTotalSpacing=s;var l=function(f,h,p){return f+h*p};r.getStartPoint=l;var u=function(f,h,p,g){return f+h*p+g};r.getEndPoint=u;var c=function(f,h,p,g){var v=p-(h-f),y=v/2,m=f,b=g-h,S=f-y,_=h+y;return m<y&&(S=0,_=h+(v-m)),b<y&&(S=f-(v-b),_=g),{start:S,end:_}};r.getUpdatedPoints=c;var d=function(f){return f?{sizePropertyName:e.width,coordPropertyName:i.xCoord,shiftPropertyName:n.xCoordShift}:{sizePropertyName:e.height,coordPropertyName:i.yCoord,shiftPropertyName:n.yCoordShift}};r.getTooltipPositionProperties=d})(iW)),iW}var tx={},Pne;function w_e(){if(Pne)return tx;Pne=1;var r=tx&&tx.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(u[d]=c[d])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})();Object.defineProperty(tx,"__esModule",{value:!0}),tx.RolloverLegendSvgAnnotation=void 0;var e=Ds(),i=Zs(),n=Aa(),t=ay(),o=(function(a){r(s,a);function s(l){var u=this,c,d,f;return u=a.call(this,l)||this,u.type=n.EAnnotationType.SVG,u.seriesInfosProperty=[],u.tooltipLegendTemplateProperty=(c=l==null?void 0:l.tooltipLegendTemplate)!==null&&c!==void 0?c:u.tooltipLegendTemplateProperty,u.tooltipLegendOffsetXProperty=(d=l==null?void 0:l.tooltipLegendOffsetX)!==null&&d!==void 0?d:u.tooltipLegendOffsetXProperty,u.tooltipLegendOffsetYProperty=(f=l==null?void 0:l.tooltipLegendOffsetY)!==null&&f!==void 0?f:u.tooltipLegendOffsetYProperty,u}return Object.defineProperty(s.prototype,"seriesInfos",{get:function(){return this.seriesInfosProperty},set:function(l){this.seriesInfosProperty&&l&&(l.length!==this.seriesInfosProperty.length||this.seriesInfosProperty.map(function(u){return u.equals(l.find(function(c){return c.renderableSeries.id===u.renderableSeries.id}))}).some(function(u){return u===!1}))&&(this.seriesInfosProperty=l,this.notifyPropertyChanged(i.PROPERTY.SERIES_INFOS))},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"tooltipLegendTemplate",{get:function(){return this.tooltipLegendTemplateProperty},set:function(l){this.tooltipLegendTemplateProperty=l,this.notifyPropertyChanged(i.PROPERTY.TOOLTIP_LEGEND_TEMPLATE)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"tooltipLegendOffsetX",{get:function(){return this.tooltipLegendOffsetXProperty},set:function(l){this.tooltipLegendOffsetXProperty=l,this.notifyPropertyChanged(i.PROPERTY.TOOLTIP_LEGEND_OFFSET_X)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"tooltipLegendOffsetY",{get:function(){return this.tooltipLegendOffsetYProperty},set:function(l){this.tooltipLegendOffsetYProperty=l,this.notifyPropertyChanged(i.PROPERTY.TOOLTIP_LEGEND_OFFSET_Y)},enumerable:!1,configurable:!0}),s.prototype.update=function(l,u,c,d){this.tooltipLegendTemplate&&(this.svg&&this.delete(),this.create(l,u,c,d))},s.prototype.create=function(l,u,c,d){var f=this.tooltipLegendTemplate(this.seriesInfos,this),h=this.applyClipping(f,this.clipping),p=e.annotationHelpers.createSvg(h,this.svgRoot,this.nextSibling);this.setSvg(p),this.setSvgAttribute("x",this.tooltipLegendOffsetX+c),this.setSvgAttribute("y",this.tooltipLegendOffsetY+d)},s})(t.SvgAnnotationBase);return tx.RolloverLegendSvgAnnotation=o,tx}var rx={},Cne;function O_e(){if(Cne)return rx;Cne=1;var r=rx&&rx.__extends||(function(){var s=function(l,u){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(c[f]=d[f])},s(l,u)};return function(l,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");s(l,u);function c(){this.constructor=l}l.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}})();Object.defineProperty(rx,"__esModule",{value:!0}),rx.RolloverMarkerSvgAnnotation=void 0;var e=sb(),i=Ds(),n=Aa(),t=ay(),o=(function(s){r(l,s);function l(u){var c=s.call(this)||this;return c.type=n.EAnnotationType.SVG,c.tooltipProps=u,c.isHiddenProperty=!0,c.x1=0,c.y1=0,c.xCoordShift=-4,c.yCoordShift=-4,c}return l.prototype.update=function(u,c,d,f){var h=this.tooltipProps.rolloverModifier.getMousePosition();this.previousMousePosition===h&&h!==e.EMousePosition.SeriesArea||(this.previousMousePosition=this.tooltipProps.rolloverModifier.getMousePosition(),s.prototype.update.call(this,u,c,d,f))},l.prototype.create=function(u,c,d,f){var h=this.tooltipProps,p=h.tooltipColor,g=h.markerColor,v=g??p;if(this.svg&&this.currentColor!==v&&this.clear(),!this.svg){this.currentColor;var y=a(v),m=this.applyClipping(y,this.clipping),b=i.annotationHelpers.createSvg(m,this.svgRoot,this.nextSibling);this.setSvg(b)}},l})(t.SvgAnnotationBase);rx.RolloverMarkerSvgAnnotation=o;var a=function(s){return'<svg width="8" height="8"><circle cx="50%" cy="50%" r="4" fill="'.concat(s,'"/></svg>')};return rx}var ix={},Tne;function D_e(){if(Tne)return ix;Tne=1;var r=ix&&ix.__extends||(function(){var h=function(p,g){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var m in y)Object.prototype.hasOwnProperty.call(y,m)&&(v[m]=y[m])},h(p,g)};return function(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");h(p,g);function v(){this.constructor=p}p.prototype=g===null?Object.create(g):(v.prototype=g.prototype,new v)}})();Object.defineProperty(ix,"__esModule",{value:!0}),ix.RolloverTooltipSvgAnnotation=void 0;var e=sb(),i=ta(),n=Ds(),t=Zs(),o=Aa(),a=ay(),s=mi(),l=(function(h){r(p,h);function p(g,v){var y=this,m,b;return y=h.call(this,v)||this,y.type=o.EAnnotationType.SVG,y.width=0,y.height=0,y.tooltipProps=g,y.height=(m=v==null?void 0:v.height)!==null&&m!==void 0?m:y.height,y.xCoordinateMode=i.ECoordinateMode.DataValue,y.yCoordinateMode=i.ECoordinateMode.DataValue,y.isHidden=!0,y.updateSize=y.updateSize.bind(y),y.placementDivIdProperty=(b=v==null?void 0:v.placementDivId)!==null&&b!==void 0?b:y.placementDivIdProperty,y}return Object.defineProperty(p.prototype,"seriesInfo",{get:function(){return this.seriesInfoProperty},set:function(g){(g&&!this.seriesInfoProperty||!this.seriesInfoProperty.equals(g))&&(this.seriesInfoProperty=g,this.notifyPropertyChanged(t.PROPERTY.SERIES_INFO))},enumerable:!1,configurable:!0}),p.prototype.update=function(g,v,y,m){var b=this.tooltipProps.rolloverModifier.getMousePosition();this.previousMousePosition===b&&b!==e.EMousePosition.SeriesArea||(this.previousMousePosition=this.tooltipProps.rolloverModifier.getMousePosition(),this.svg&&this.clear(),this.placementDivId?this.updateExternalLegendTooltip():(h.prototype.update.call(this,g,v,y,m),this.updateLegendTooltip(y,m)))},p.prototype.updateSize=function(g,v){this.width=g,this.height=v},p.prototype.clear=function(){var g,v,y,m;if(!(!this.parentSurface||this.parentSurface.isDeleted)){if(this.svg){if(this.placementDivId){(v=(g=this.svg)===null||g===void 0?void 0:g.parentNode)===null||v===void 0||v.removeChild(this.svg);return}(y=this.svgRoot)===null||y===void 0||y.removeChild(this.svg)}this.svgLegend&&((m=this.svgLegend.parentNode)===null||m===void 0||m.removeChild(this.svgLegend))}},p.prototype.create=function(g,v,y,m){var b;this.seriesInfo?b=this.generateSvgString():b="<svg></svg>";var S=this.applyClipping(b,this.clipping),_=n.annotationHelpers.createSvg(S,this.svgRoot,this.nextSibling);this.setSvg(_)},p.prototype.generateSvgString=function(){var g,v=this.tooltipProps.tooltipTitle,y=(""+v).replace(/\s/g,""),m="id".concat(Math.floor(this.y1),"_").concat(y,"_").concat(Date.now()),b=(g=this.tooltipProps.tooltipTemplate)!==null&&g!==void 0?g:c;return b(m,this.seriesInfo,this)},p.prototype.updateLegendTooltip=function(g,v){if(this.tooltipProps.tooltipLegendTemplate){var y=this.seriesInfo?this.tooltipProps.tooltipLegendTemplate(this.tooltipProps,this.seriesInfo):"<svg></svg>",m=this.applyClipping(y,this.clipping),b=n.annotationHelpers.createSvg(m,this.svgRoot,this.nextSibling);this.svgLegend=b,this.svgLegend.setAttribute("x",this.tooltipProps.tooltipLegendOffsetX.toString()+g),this.svgLegend.setAttribute("y",this.tooltipProps.tooltipLegendOffsetY.toString()+v)}},p.prototype.updateExternalLegendTooltip=function(){var g;this.seriesInfo?g=this.generateSvgString():g="<svg style='display: none;'></svg>",this.svgDivRoot=document.querySelector("[id='".concat(this.placementDivId,"']"));var v=this.applyClipping(g,this.clipping),y=n.annotationHelpers.createSvg(v,this.svgDivRoot,this.nextSibling);this.setSvg(y)},Object.defineProperty(p.prototype,"placementDivId",{get:function(){return this.placementDivIdProperty},set:function(g){this.placementDivIdProperty!==g&&(this.placementDivIdProperty=g,this.notifyPropertyChanged(t.PROPERTY.PLACEMENT_DIV_ID))},enumerable:!1,configurable:!0}),p})(a.SvgAnnotationBase);ix.RolloverTooltipSvgAnnotation=l;var u=function(h,p,g,v){return h.getValuesWithLabels(p,g,v,!0)},c=function(h,p,g){var v,y,m,b,S,_="",C=g.tooltipProps,T=C.tooltipTitle,x=C.tooltipColor,A=C.tooltipTextColor,w=C.tooltipLabelX,L=C.tooltipLabelY,k=C.shadowColor,D=(m=(v=g.tooltipProps.tooltipDataTemplate)!==null&&v!==void 0?v:(y=g.tooltipProps.rolloverModifier)===null||y===void 0?void 0:y.tooltipDataTemplate)!==null&&m!==void 0?m:u,j=D(p,T,w,L),N=(b=C.width)!==null&&b!==void 0?b:d(j.reduce(function(H,U){return(U==null?void 0:U.length)>H?U.length:H},0)),V=(S=C.height)!==null&&S!==void 0?S:f(j.length);g.updateSize(N,V),j.forEach(function(H,U){_+='<tspan x="8" dy="1.2em">'.concat(H,"</tspan>")});var W='<feGaussianBlur result="blurOut" in="offOut" stdDeviation="3" />';if(k!==void 0){var K=(0,s.parseColorToTArgb)(k);W=`<feColorMatrix result="matrixOut" in="offOut" type="matrix"
        values="0 0 0 0 `.concat(K.red/255,`
                0 0 0 0 `).concat(K.green/255,`
                0 0 0 0 `).concat(K.blue/255,`
                0 0 0 `).concat(K.opacity/255,` 0" />
        <feGaussianBlur result="blurOut" in="matrixOut" stdDeviation="3" />`)}return'<svg class="scichart__rollover-tooltip" width="'.concat(N,'" height="').concat(V,`">
        <defs>
            <filter id="`).concat(h,`" x="0" y="0" width="200%" height="200%">
                <feOffset result="offOut" in="SourceAlpha" dx="3" dy="3" />
                `).concat(W,`
                <feBlend in="SourceGraphic" in2="blurOut" mode="normal" />
            </filter>
        </defs>
        <rect rx="4" ry="4" width="90%" height="90%" fill="`).concat(x,'" filter="url(#').concat(h,`)" />
        <svg width="100%">
            <text x="8" y="3" font-size="13" font-family="Verdana" dy="0" fill="`).concat(A,'">').concat(_,`</text>
        </svg>
    </svg>`)},d=function(h,p){return h===void 0&&(h=20),h*8+20},f=function(h,p){return h===void 0&&(h=2),17*h+16};return ix}var xne;function i3(){return xne||(xne=1,(function(r){var e=ex&&ex.__extends||(function(){var L=function(k,D){return L=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(j,N){j.__proto__=N}||function(j,N){for(var V in N)Object.prototype.hasOwnProperty.call(N,V)&&(j[V]=N[V])},L(k,D)};return function(k,D){if(typeof D!="function"&&D!==null)throw new TypeError("Class extends value "+String(D)+" is not a constructor or null");L(k,D);function j(){this.constructor=k}k.prototype=D===null?Object.create(D):(j.prototype=D.prototype,new j)}})(),i=ex&&ex.__spreadArray||function(L,k,D){if(D||arguments.length===2)for(var j=0,N=k.length,V;j<N;j++)(V||!(j in k))&&(V||(V=Array.prototype.slice.call(k,0,j)),V[j]=k[j]);return L.concat(V||Array.prototype.slice.call(k))};Object.defineProperty(r,"__esModule",{value:!0}),r.updateRolloverModifierProps=r.splitIntoClusters=r.calcTooltipPositions=r.calcTooltipProps=r.RolloverModifier=r.TOOLTIP_SPACING=void 0;var n=Jn(),t=$o(),o=bo(),a=sb(),s=tn(),l=dV(),u=pn(),c=gs(),d=ta(),f=t_(),h=w_e(),p=O_e(),g=D_e(),v=lU(),y=ln(),m=Hi(),b=nu(),S=cy();r.TOOLTIP_SPACING=4;var _=(function(L){e(k,L);function k(D){var j=this,N,V,W,K,H,U,I,Q,Z,ee,ie,de,pe;return j=L.call(this,D)||this,j.type=o.EChart2DModifierType.Rollover,j.tooltipLegendOffsetX=0,j.tooltipLegendOffsetY=0,j.snapToDataPoint=!1,j.hitTestRadius=0,j.axisLabelPadding=void 0,j.axisLabelCornerRadius=2,j.showRolloverLineProperty=!0,j.showTooltipProperty=!0,j.absoluteXCoord=0,j.isSvgOnlyProperty=!0,j.mousePosition=a.EMousePosition.OutOfCanvas,j.allowTooltipOverlappingProperty=!1,j.hitTestRenderableSeries=j.hitTestRenderableSeries.bind(j),j.placementDivIdProperty=(N=D==null?void 0:D.placementDivId)!==null&&N!==void 0?N:j.placementDivIdProperty,j.isSvgOnlyProperty=(V=D==null?void 0:D.isSvgOnly)!==null&&V!==void 0?V:j.isSvgOnlyProperty,j.axisLabelPadding=(W=D==null?void 0:D.axisLabelPadding)!==null&&W!==void 0?W:j.axisLabelPadding,j.axisLabelCornerRadius=(K=D==null?void 0:D.axisLabelCornerRadius)!==null&&K!==void 0?K:j.axisLabelCornerRadius,j.rolloverLineAnnotation=j.createLine(D),D!=null&&D.tooltipLegendTemplate&&typeof D.tooltipLegendTemplate=="string"&&(j.typeMap.set("tooltipLegendTemplate",D.tooltipLegendTemplate),D.tooltipLegendTemplate=(0,n.getFunction)(t.EBaseType.OptionFunction,D.tooltipLegendTemplate)),j.tooltipLegendTemplate=(H=D==null?void 0:D.tooltipLegendTemplate)!==null&&H!==void 0?H:j.tooltipLegendTemplate,j.tooltipLegendOffsetX=(U=D==null?void 0:D.tooltipLegendOffsetX)!==null&&U!==void 0?U:j.tooltipLegendOffsetX,j.tooltipLegendOffsetY=(I=D==null?void 0:D.tooltipLegendOffsetY)!==null&&I!==void 0?I:j.tooltipLegendOffsetY,D!=null&&D.tooltipDataTemplate&&typeof D.tooltipDataTemplate=="string"&&(j.typeMap.set("tooltipDataTemplate",D.tooltipDataTemplate),D.tooltipDataTemplate=(0,n.getFunction)(t.EBaseType.OptionFunction,D.tooltipDataTemplate)),j.tooltipDataTemplateProperty=(Q=D==null?void 0:D.tooltipDataTemplate)!==null&&Q!==void 0?Q:j.tooltipDataTemplateProperty,j.showRolloverLineProperty=(Z=D==null?void 0:D.showRolloverLine)!==null&&Z!==void 0?Z:j.showRolloverLineProperty,j.showTooltipProperty=(ee=D==null?void 0:D.showTooltip)!==null&&ee!==void 0?ee:j.showTooltipProperty,j.legendAnnotation=new h.RolloverLegendSvgAnnotation({tooltipLegendTemplate:j.tooltipLegendTemplate,tooltipLegendOffsetX:j.tooltipLegendOffsetX,tooltipLegendOffsetY:j.tooltipLegendOffsetY,xAxisId:j.xAxisId,yAxisId:j.yAxisId}),j.allowTooltipOverlappingProperty=(ie=D==null?void 0:D.allowTooltipOverlapping)!==null&&ie!==void 0?ie:j.allowTooltipOverlappingProperty,j.snapToDataPoint=(de=D==null?void 0:D.snapToDataPoint)!==null&&de!==void 0?de:j.snapToDataPoint,j.hitTestRadius=(pe=D==null?void 0:D.hitTestRadius)!==null&&pe!==void 0?pe:j.hitTestRadius,j}return k.prototype.createLine=function(D){var j,N,V,W={xCoordinateMode:d.ECoordinateMode.Pixel,yCoordinateMode:d.ECoordinateMode.Pixel,strokeDashArray:D==null?void 0:D.rolloverLineStrokeDashArray,strokeThickness:(j=D==null?void 0:D.rolloverLineStrokeThickness)!==null&&j!==void 0?j:2,stroke:(N=D==null?void 0:D.rolloverLineStroke)!==null&&N!==void 0?N:y.SciChartSurfaceBase.DEFAULT_THEME.cursorLineBrush,xAxisId:this.xAxisId,yAxisId:this.yAxisId,showLabel:(V=D==null?void 0:D.showAxisLabel)!==null&&V!==void 0?V:!1,labelPadding:D==null?void 0:D.axisLabelPadding,labelCornerRadius:D==null?void 0:D.axisLabelCornerRadius,isHidden:!0};return this.isSvgOnlyProperty?new v.SvgLineAnnotation(W):new f.LineAnnotation(W)},k.prototype.applyTheme=function(D){if(this.parentSurface){var j=this.parentSurface.previousThemeProvider;this.rolloverLineAnnotation.stroke===j.cursorLineBrush&&(this.rolloverLineAnnotation.stroke=D.cursorLineBrush)}},Object.defineProperty(k.prototype,"rolloverLineStroke",{get:function(){return this.rolloverLineAnnotation.stroke},set:function(D){this.rolloverLineAnnotation.stroke=D,this.notifyPropertyChanged(S.PROPERTY.STROKE)},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"rolloverLineStrokeThickness",{get:function(){return this.rolloverLineAnnotation.strokeThickness},set:function(D){this.rolloverLineAnnotation.strokeThickness=D,this.notifyPropertyChanged(S.PROPERTY.STROKE_THICKNESS)},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"rolloverLineStrokeDashArray",{get:function(){return this.rolloverLineAnnotation.strokeDashArray},set:function(D){this.rolloverLineAnnotation.strokeDashArray=D,this.notifyPropertyChanged(S.PROPERTY.STROKE_DASH_ARRAY)},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"showRolloverLine",{get:function(){return this.showRolloverLineProperty},set:function(D){this.showRolloverLineProperty=D,this.notifyPropertyChanged(S.PROPERTY.SHOW_ROLLOVER_LINE)},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"tooltipDataTemplate",{get:function(){return this.tooltipDataTemplateProperty},set:function(D){this.tooltipDataTemplateProperty=D,this.notifyPropertyChanged(S.PROPERTY.TOOLTIP_DATA_TEMPLATE)},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"showTooltip",{get:function(){return this.showTooltipProperty},set:function(D){this.showTooltipProperty=D,this.notifyPropertyChanged(S.PROPERTY.SHOW_TOOLTIP)},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"allowTooltipOverlapping",{get:function(){return this.allowTooltipOverlappingProperty},set:function(D){this.allowTooltipOverlappingProperty=D,this.notifyPropertyChanged(S.PROPERTY.ALLOW_TOOLTIP_OVERLAPPING)},enumerable:!1,configurable:!0}),k.prototype.onAttach=function(){var D=this;L.prototype.onAttach.call(this),this.addLineAnnotationToSurface(),this.parentSurface.modifierAnnotations.add(this.legendAnnotation),this.getIncludedRenderableSeries().forEach(function(j){return D.addSeriesAnnotationsToParentSurface(j)})},k.prototype.addLineAnnotationToSurface=function(){this.parentSurface.modifierAnnotations.add(this.rolloverLineAnnotation)},k.prototype.onDetach=function(){var D=this;L.prototype.onDetach.call(this),this.parentSurface.modifierAnnotations.remove(this.rolloverLineAnnotation,!0),this.parentSurface.modifierAnnotations.remove(this.legendAnnotation,!1),this.getIncludedRenderableSeries().forEach(function(j){return D.removeSeriesAnnotationsFromParentSurface(j)})},k.prototype.onAttachSeries=function(D){L.prototype.onAttachSeries.call(this,D),this.getIncludedRenderableSeries().includes(D)&&(this.addSeriesAnnotationsToParentSurface(D),this.legendAnnotation.seriesInfos=this.getSeriesInfos())},k.prototype.onDetachSeries=function(D){L.prototype.onDetachSeries.call(this,D),this.removeSeriesAnnotationsFromParentSurface(D)},k.prototype.modifierMouseMove=function(D){if(!(this.parentSurface.isSubSurface&&!D.isActiveSubChartEvent)){this.activePointerEvents.set(D.pointerId,D),L.prototype.modifierMouseMove.call(this,D);var j;this.mousePoint?(j=(0,u.translateFromCanvasToSeriesViewRect)(this.mousePoint,this.parentSurface.seriesViewRect),j?this.mousePosition=a.EMousePosition.SeriesArea:this.mousePosition=a.EMousePosition.AxisArea):this.mousePosition=a.EMousePosition.OutOfCanvas;var N=this.getIsActionAllowed(D);N&&this.update()}},k.prototype.hideAllTooltips=function(){this.mousePosition=a.EMousePosition.OutOfCanvas,this.update()},k.prototype.modifierMouseLeave=function(D){L.prototype.modifierMouseLeave.call(this,D),this.hideAllTooltips()},k.prototype.onParentSurfaceRendered=function(){},k.prototype.onParentSurfaceLayoutComplete=function(){this.update()},k.prototype.includeSeries=function(D,j){var N,V;return L.prototype.includeSeries.call(this,D,j)?(this.isAttached&&(j===!0&&this.addSeriesAnnotationsToParentSurface(D),j===!1&&this.removeSeriesAnnotationsFromParentSurface(D),this.parentSurface&&(this.legendAnnotation.seriesInfos=this.getSeriesInfos()),(N=this.parentSurface)===null||N===void 0||N.invalidateElement()),(V=this.parentSurface)===null||V===void 0||V.invalidateElement(),!0):!1},k.prototype.getIncludedRenderableSeries=function(){var D=this,j=this.parentSurface.renderableSeries.asArray().filter(function(W){return!W.isStacked&&W.isVisible&&W.rolloverModifierProps.showRollover&&D.testIsIncludedSeries(W)}),N=this.parentSurface.renderableSeries.asArray().filter(function(W){return W.isCollection}),V=j;return N.forEach(function(W){W.getVisibleSeries().forEach(function(K){K.rolloverModifierProps.showRollover&&D.testIsIncludedSeries(K)&&V.push(K)})}),V},k.prototype.hitTestRenderableSeries=function(D,j){if(j)return this.hitTestRadius<=0?D.hitTestProvider.hitTestXSlice(j.x,j.y):D.hitTestProvider.hitTestDataPoint(j.x,j.y,this.hitTestRadius)},k.prototype.getMousePosition=function(){return this.mousePosition},k.prototype.toJSON=function(){var D,j,N,V,W=L.prototype.toJSON.call(this),K={snapToDataPoint:this.snapToDataPoint,placementDivId:this.placementDivId,hitTestRadius:this.hitTestRadius,allowTooltipOverlapping:this.allowTooltipOverlapping,rolloverLineStrokeDashArray:this.rolloverLineStrokeDashArray,rolloverLineStroke:this.rolloverLineStroke,rolloverLineStrokeThickness:this.rolloverLineStrokeThickness,showRolloverLine:this.showRolloverLine,showTooltip:this.showTooltip,showAxisLabel:(j=(D=this.rolloverLineAnnotation)===null||D===void 0?void 0:D.showLabel)!==null&&j!==void 0?j:!1,tooltipDataTemplate:this.typeMap.get("tooltipDataTemplate"),tooltipLegendOffsetX:this.tooltipLegendOffsetX,tooltipLegendOffsetY:this.tooltipLegendOffsetY,tooltipLegendTemplate:this.typeMap.get("tooltipLegendTemplate"),isSvgOnly:this.isSvgOnlyProperty,axisLabelPadding:(N=this.rolloverLineAnnotation)===null||N===void 0?void 0:N.labelPadding,axisLabelCornerRadius:(V=this.rolloverLineAnnotation)===null||V===void 0?void 0:V.labelCornerRadius};return Object.assign(W.options,K),W},k.prototype.CalculateTooltipPositions=function(D,j,N,V,W,K){return K===void 0&&(K=!1),(0,r.calcTooltipPositions)(D,j,N,V,W,K)},k.prototype.notifyPropertyChanged=function(D){L.prototype.notifyPropertyChanged.call(this,D),D===S.PROPERTY.X_AXIS_ID&&(this.rolloverLineAnnotation.xAxisId=this.xAxisId,this.legendAnnotation.xAxisId=this.xAxisId),D===S.PROPERTY.Y_AXIS_ID&&(this.rolloverLineAnnotation.yAxisId=this.yAxisId,this.legendAnnotation.yAxisId=this.yAxisId)},k.prototype.isVerticalChart=function(){var D,j;return(j=(D=this.xAxis)===null||D===void 0?void 0:D.isVerticalChart)!==null&&j!==void 0?j:!1},k.prototype.removeSeriesAnnotationsFromParentSurface=function(D){var j=this;if(this.parentSurface)if(D.isCollection){var N=D;N.asArray().forEach(function(V){j.parentSurface.modifierAnnotations.remove(j.getRolloverProps(V).marker,!1),j.parentSurface.modifierAnnotations.remove(j.getRolloverProps(V).tooltip,!1),j.getRolloverProps(V).delete()})}else this.parentSurface.modifierAnnotations.remove(this.getRolloverProps(D).marker,!1),this.parentSurface.modifierAnnotations.remove(this.getRolloverProps(D).tooltip,!1),this.getRolloverProps(D).delete(),D.type===s.ESeriesType.BandSeries&&(this.parentSurface.modifierAnnotations.remove(this.getRolloverProps1(D).marker,!1),this.parentSurface.modifierAnnotations.remove(this.getRolloverProps1(D).tooltip,!1),this.getRolloverProps1(D).delete())},k.prototype.addSeriesAnnotationsToParentSurface=function(D){if(!(!this.parentSurface||D.type===s.ESeriesType.StackedMountainCollection||D.type===s.ESeriesType.StackedColumnCollection)){this.getRolloverProps(D).rolloverModifier=this,A(D,this.getRolloverProps(D),this.getRolloverProps1(D),this.placementDivIdProperty);var j=this.getRolloverProps(D).marker;this.parentSurface.modifierAnnotations.contains(j)||(this.parentSurface.modifierAnnotations.add(this.getRolloverProps(D).marker),this.parentSurface.modifierAnnotations.add(this.getRolloverProps(D).tooltip),D.type===s.ESeriesType.BandSeries&&(this.getRolloverProps1(D).rolloverModifier=this,this.parentSurface.modifierAnnotations.add(this.getRolloverProps1(D).marker),this.parentSurface.modifierAnnotations.add(this.getRolloverProps1(D).tooltip)))}},k.prototype.getRolloverProps=function(D){return D.rolloverModifierProps},k.prototype.getRolloverProps1=function(D){return D.rolloverModifierProps1},k.prototype.update=function(){this.updateLine(),this.updateSeriesAnnotations(),this.tooltipLegendTemplate&&(this.legendAnnotation.seriesInfos=this.getSeriesInfos())},k.prototype.updateLine=function(){if(this.mousePosition!==a.EMousePosition.SeriesArea){this.rolloverLineAnnotation.isHidden=!0;return}if(!this.showRolloverLineProperty){this.rolloverLineAnnotation.isHidden=!0;return}if(this.snapToDataPoint){var D=this.getIncludedRenderableSeries()[0];if(D){var j=this.hitTestRenderableSeries(D,this.mousePoint);if(j&&j.isWithinDataBounds){this.rolloverLineAnnotation.isHidden=!1;var N=(0,u.translateToNotScaled)(j.xCoord);this.rolloverLineAnnotation.x1=N,this.rolloverLineAnnotation.x2=N,this.rolloverLineAnnotation.y1=0,this.rolloverLineAnnotation.y2=this.isVerticalChart()?(0,u.translateToNotScaled)(this.parentSurface.seriesViewRect.right):(0,u.translateToNotScaled)(this.parentSurface.seriesViewRect.bottom)}else this.rolloverLineAnnotation.isHidden=!0}else this.rolloverLineAnnotation.isHidden=!0}else{this.rolloverLineAnnotation.isHidden=!1;var V=(0,u.translateFromCanvasToSeriesViewRect)(this.mousePoint,this.parentSurface.seriesViewRect);if(V){var N=(0,u.translateToNotScaled)(V.x),W=(0,u.translateToNotScaled)(V.y);if(this.parentSurface.isPolar){var K=this.yAxis,H=K.reverseTransform(N,W);this.rolloverLineAnnotation.x1=0,this.rolloverLineAnnotation.x2=H.y,this.rolloverLineAnnotation.y1=0,this.rolloverLineAnnotation.y2=K.getAxisSize()}else this.isVerticalChart()?(this.rolloverLineAnnotation.x1=W,this.rolloverLineAnnotation.x2=W,this.rolloverLineAnnotation.y1=0,this.rolloverLineAnnotation.y2=(0,u.translateToNotScaled)(this.parentSurface.seriesViewRect.right)):(this.rolloverLineAnnotation.x1=N,this.rolloverLineAnnotation.x2=N,this.rolloverLineAnnotation.y1=0,this.rolloverLineAnnotation.y2=(0,u.translateToNotScaled)(this.parentSurface.seriesViewRect.bottom))}}},k.prototype.updateSeriesAnnotations=function(){var D=this,j=this.getIncludedRenderableSeries();if(j.forEach(function(H){var U=D.getRolloverProps(H);if(U.marker||D.addSeriesAnnotationsToParentSurface(H),U.marker.suspendInvalidate(),U.tooltip.suspendInvalidate(),U.marker.isHidden=!0,U.tooltip.isHidden=!0,U.tooltip.x1=void 0,U.tooltip.y1=void 0,H.type===s.ESeriesType.BandSeries){var I=D.getRolloverProps1(H);I.marker.suspendInvalidate(),I.tooltip.suspendInvalidate(),I.marker.isHidden=!0,I.tooltip.isHidden=!0,I.tooltip.x1=void 0,I.tooltip.y1=void 0}}),this.mousePosition!==a.EMousePosition.SeriesArea){j.forEach(function(H){var U=D.getRolloverProps(H);if(U.marker.resumeInvalidate(),U.tooltip.resumeInvalidate(),H.type===s.ESeriesType.BandSeries){var I=D.getRolloverProps1(H);I.marker.resumeInvalidate(),I.tooltip.resumeInvalidate()}});return}var N=[],V=this.isVerticalChart()?this.parentSurface.seriesViewRect.width:this.parentSurface.seriesViewRect.height;j.forEach(function(H,U){var I=D.hitTestRenderableSeries(H,D.mousePoint);if(I){if(D.hitTestRadius===0||I.isHit){var Q=0<=I.yCoord&&I.yCoord<=V;if(Q){D.absoluteXCoord=D.isVerticalChart()?I.yCoord:I.xCoord;var Z=D.isVerticalChart()?I.xCoord:I.yCoord,ee=(0,r.calcTooltipProps)(U,H,D.getRolloverProps(H),D.parentSurface.seriesViewRect,I.xValue,I.yValue,D.absoluteXCoord,Z,I,m.DpiHelper.PIXEL_RATIO,!1,D.isVerticalChart());ee&&N.push(ee)}}if(H.type===s.ESeriesType.BandSeries){var ie=0<=I.y1Coord&&I.y1Coord<=V;if(ie){var de=D.isVerticalChart()?I.y1Coord:I.xCoord,Z=D.isVerticalChart()?I.xCoord:I.y1Coord,pe=(0,r.calcTooltipProps)(U,H,D.getRolloverProps1(H),D.parentSurface.seriesViewRect,I.xValue,I.y1Value,de,Z,I,m.DpiHelper.PIXEL_RATIO,!0,D.isVerticalChart());pe&&N.push(pe)}}}});var W;this.isVerticalChart()?W=N.sort(function(H,U){return H.xCoord>U.xCoord?1:U.xCoord>H.xCoord?-1:0}):W=N.sort(function(H,U){return H.yCoord>U.yCoord?1:U.yCoord>H.yCoord?-1:0});var K=this.CalculateTooltipPositions(W,this.allowTooltipOverlapping,r.TOOLTIP_SPACING*m.DpiHelper.PIXEL_RATIO,this.parentSurface.seriesViewRect,m.DpiHelper.PIXEL_RATIO,this.isVerticalChart());K.forEach(function(H){var U=j[H.index],I=D.showTooltip&&H.seriesInfo.isHit,Q=H.seriesInfo.isHit;H.isY1?(0,r.updateRolloverModifierProps)(D.getRolloverProps1(U),U,H,I,Q,D.placementDivId):(0,r.updateRolloverModifierProps)(D.getRolloverProps(U),U,H,I,Q,D.placementDivId)}),j.forEach(function(H){D.getRolloverProps(H).marker.resumeInvalidate(),D.getRolloverProps(H).tooltip.resumeInvalidate(),H.type===s.ESeriesType.BandSeries&&(D.getRolloverProps1(H).marker.resumeInvalidate(),D.getRolloverProps1(H).tooltip.resumeInvalidate())})},k.prototype.getSeriesInfos=function(){var D=this;return this.getIncludedRenderableSeries().map(function(j){var N=D.hitTestRenderableSeries(j,D.mousePoint);if(N)return j.getSeriesInfo(N)}).filter(function(j){return j!==void 0})},Object.defineProperty(k.prototype,"placementDivId",{get:function(){return this.placementDivIdProperty},set:function(D){var j=this,N;this.placementDivIdProperty!==D&&(this.placementDivIdProperty=D,(N=this.parentSurface)===null||N===void 0||N.renderableSeries.asArray().forEach(function(V){j.getRolloverProps(V).tooltip.placementDivId=j.placementDivIdProperty,j.getRolloverProps1(V).tooltip.placementDivId=j.placementDivIdProperty}))},enumerable:!1,configurable:!0}),k})(b.ChartModifierBase2D);r.RolloverModifier=_;var C=function(L,k,D,j,N,V,W,K,H,U,I,Q){I===void 0&&(I=!1),Q===void 0&&(Q=!1);var Z=k.getSeriesInfo(H),ee=D.tooltip.width,ie=ee*U,de=D.tooltip.height,pe=de*U,_e=K,Te=j.height-K,De=5*U,Pe=j.width-W<ie?-ee:5,Ee=Q?De:-de/2;Q?Te<pe+De&&(Ee=(pe+De)/U*-1):_e<pe/2?Ee=-_e/U:Te<pe/2&&(Ee=-(pe-Te)/U);var Re={index:L,isY1:I,xValue:N,yValue:V,xCoord:W,yCoord:K,hitTestPointValues:H.hitTestPointValues,isCategoryAxis:H.isCategoryAxis,xCoordShift:Pe,yCoordShift:Ee,height:pe,width:ie,seriesInfo:Z};return Re};r.calcTooltipProps=C;var T=function(L,k,D,j,N,V){V===void 0&&(V=!1);var W=(0,l.getTooltipPositionProperties)(V);V&&L.forEach(function(ee){var ie=ee.width/2/N;ee.xCoord>ie&&(ee[W.shiftPropertyName]=-(ee.width/2)/N)});var K=(0,l.checkHasOverlap)(L,D,N,W),H=L.length;if(!k&&H>=2&&K)for(var U=0,I=0,Q=3;I<Q;){var Z=(0,r.splitIntoClusters)(L,D,N,W);if(Z.length===U)break;U=Z.length,Z.forEach(function(ee){if(ee.length>=2){var ie=(0,l.spreadTooltips)(ee,N,W,D,j);ee.forEach(function(de){de[W.shiftPropertyName]=ie.get(de.index)})}}),I++}return L};r.calcTooltipPositions=T;var x=function(L,k,D,j){for(var N=i([],L,!0).sort(function(ee,ie){return ee[j.coordPropertyName]-ie[j.coordPropertyName]}),V=[],W=[],K=0,H=N;K<H.length;K++){var U=H[K];if(W.length===0)W.push(U);else{var I=(0,l.getStartPoint)(U[j.coordPropertyName],U[j.shiftPropertyName],D),Q=W[W.length-1],Z=(0,l.getEndPoint)(Q[j.coordPropertyName],Q[j.shiftPropertyName],D,Q[j.sizePropertyName]);I<=Z+k?W.push(U):(V.push(W),W=[U])}}return W.length>0&&V.push(W),V};r.splitIntoClusters=x;var A=function(L,k,D,j){var N,V,W,K;if(k.marker||(k.marker=new p.RolloverMarkerSvgAnnotation(k),k.marker.xAxisId=L.xAxisId,k.marker.yAxisId=L.yAxisId),k.tooltip||(k.tooltipTitle=(V=(N=k.tooltipTitle)!==null&&N!==void 0?N:L.seriesName)!==null&&V!==void 0?V:"",k.tooltipColor=k.tooltipColor,k.shadowColor=L.parentSurface.themeProvider.shadowEffectColor,k.tooltip=new g.RolloverTooltipSvgAnnotation(k,{seriesType:L.type,placementDivId:j}),k.tooltip.xAxisId=L.xAxisId,k.tooltip.yAxisId=L.yAxisId),L.type===s.ESeriesType.BandSeries){var H=L;D.marker||(D.marker=new p.RolloverMarkerSvgAnnotation(D),D.marker.xAxisId=H.xAxisId,D.marker.yAxisId=H.yAxisId),D.tooltip||(D.tooltipTitle=(K=(W=D.tooltipTitle)!==null&&W!==void 0?W:H.seriesName)!==null&&K!==void 0?K:"",D.tooltipColor=D.tooltipColor,D.tooltip=new g.RolloverTooltipSvgAnnotation(D,{placementDivId:j}),D.tooltip.xAxisId=H.xAxisId,D.tooltip.yAxisId=H.yAxisId)}},w=function(L,k,D,j,N,V){L.tooltip.seriesInfo=D.seriesInfo,D.isY1&&(L.tooltip.seriesInfo.isFirstSeries=!1),N&&(L.marker.isHidden=!1,L.marker.x1=D.xValue,L.marker.y1=D.yValue,L.markerColor.startsWith(c.AUTO_COLOR)&&(L.markerColor=D.isY1?k.strokeY1:k.stroke)),j?(L.tooltip.isHidden=!1,L.tooltip.x1=D.xValue,L.tooltip.y1=D.yValue,L.tooltip.xCoordShift=D.xCoordShift,L.tooltip.yCoordShift=D.yCoordShift,L.tooltipColor.startsWith(c.AUTO_COLOR)&&(L.tooltipColor=D.isY1?k.strokeY1:k.stroke)):V&&L.tooltip.delete()};r.updateRolloverModifierProps=w})(ex)),ex}var nx={},Ene;function R_e(){if(Ene)return nx;Ene=1;var r=nx&&nx.__extends||(function(){var f=function(h,p){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,v){g.__proto__=v}||function(g,v){for(var y in v)Object.prototype.hasOwnProperty.call(v,y)&&(g[y]=v[y])},f(h,p)};return function(h,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");f(h,p);function g(){this.constructor=h}h.prototype=p===null?Object.create(p):(g.prototype=p.prototype,new g)}})();Object.defineProperty(nx,"__esModule",{value:!0}),nx.VerticalSliceModifier=void 0;var e=i3(),i=pn(),n=Ii(),t=sb(),o=qH(),a=ta(),s=tn(),l=cy(),u=bo(),c=Hi(),d=(function(f){r(h,f);function h(p){var g=this,v,y,m;return g=f.call(this,p)||this,g.xCoordinateModeProperty=a.ECoordinateMode.Pixel,g.isDraggableProperty=!1,g.rmrsProps=new Map,g.rmrsProps1=new Map,g.type=u.EChart2DModifierType.VerticalSlice,g.x1Property=(v=p.x1)!==null&&v!==void 0?v:0,g.mousePosition=t.EMousePosition.SeriesArea,g.xCoordinateModeProperty=(y=p.xCoordinateMode)!==null&&y!==void 0?y:g.xCoordinateModeProperty,g.isDraggableProperty=(m=p.isDraggable)!==null&&m!==void 0?m:g.isDraggableProperty,g.lineSelectionColorProperty=p.lineSelectionColor,g.rolloverLineAnnotation.isEditable=g.isDraggableProperty,g.rolloverLineAnnotation.selectionBoxStroke=g.lineSelectionColor,g}return Object.defineProperty(h.prototype,"x1",{get:function(){return this.x1Property},set:function(p){p!==this.x1Property&&(this.x1Property=p,this.notifyPropertyChanged(l.PROPERTY.X1))},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"xCoordinateMode",{get:function(){return this.xCoordinateModeProperty},set:function(p){p!==this.xCoordinateModeProperty&&(this.xCoordinateModeProperty=p,this.notifyPropertyChanged(l.PROPERTY.X_COORDINATE_MODE))},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"verticalLine",{get:function(){return this.rolloverLineAnnotation},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"isDraggable",{get:function(){return this.isDraggableProperty},set:function(p){p!=this.isDraggableProperty&&(this.isDraggableProperty=p,this.notifyPropertyChanged(l.PROPERTY.IS_DRAGGABLE))},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"lineSelectionColor",{get:function(){return this.lineSelectionColorProperty},set:function(p){p!==this.lineSelectionColorProperty&&(this.lineSelectionColorProperty=p,this.notifyPropertyChanged(l.PROPERTY.LINE_SELECTION_COLOR))},enumerable:!1,configurable:!0}),h.prototype.modifierMouseMove=function(p){if(this.rolloverLineAnnotation.isDraggingStarted){this.mousePoint=new n.Point(p.mousePoint.x,p.mousePoint.y);var g=this.isVerticalChart(),v=g?p.mousePoint.y:p.mousePoint.x,y=this.xAxis,m=y.getCurrentCoordinateCalculator();switch(this.xCoordinateMode){case a.ECoordinateMode.Pixel:{var b=g?y.viewRect.top:y.viewRect.left,S=g?y.viewRect.height:y.viewRect.width;this.x1=Math.min(Math.max(0,(v-b)/c.DpiHelper.PIXEL_RATIO),S/c.DpiHelper.PIXEL_RATIO);break}case a.ECoordinateMode.Relative:{var b=g?y.viewRect.top:y.viewRect.left,_=(v-b)/m.viewportDimension;this.x1=Math.min(Math.max(0,_),1);break}case a.ECoordinateMode.DataValue:{var C=g?(0,i.translateFromCanvasToSeriesViewRectY)(v,this.parentSurface.seriesViewRect):(0,i.translateFromCanvasToSeriesViewRectX)(v,this.parentSurface.seriesViewRect),_=m.getDataValue(C);isNaN(_)||(this.x1=_);break}}this.update()}},h.prototype.modifierMouseLeave=function(p){},h.prototype.toJSON=function(){var p=f.prototype.toJSON.call(this),g={x1:this.x1,xCoordinateMode:this.xCoordinateMode,isDraggable:this.isDraggable,lineSelectionColor:this.lineSelectionColor};return Object.assign(p.options,g),p},h.prototype.getRolloverProps=function(p){return this.rmrsProps.get(p)},h.prototype.getRolloverProps1=function(p){return this.rmrsProps.get(p)},h.prototype.removeSeriesAnnotationsFromParentSurface=function(p){f.prototype.removeSeriesAnnotationsFromParentSurface.call(this,p),this.rmrsProps.get(p).delete(),this.rmrsProps.delete(p),p.type===s.ESeriesType.BandSeries&&(this.rmrsProps1.get(p).delete(),this.rmrsProps1.delete(p))},h.prototype.addSeriesAnnotationsToParentSurface=function(p){var g=new o.RolloverModifierRenderableSeriesProps(p,!1);if(o.RolloverModifierRenderableSeriesProps.copy(p.rolloverModifierProps,g),this.rmrsProps.set(p,g),p.type===s.ESeriesType.BandSeries){var v=new o.RolloverModifierRenderableSeriesProps(p,!1);o.RolloverModifierRenderableSeriesProps.copy(p.rolloverModifierProps1,v),this.rmrsProps1.set(p,v)}f.prototype.addSeriesAnnotationsToParentSurface.call(this,p)},h.prototype.createLine=function(p){var g=f.prototype.createLine.call(this,p);return g.annotationsGripsRadius=0,g},h.prototype.update=function(){this.calculateXPosition(),this.updateLine(),this.updateSeriesAnnotations(),Array.from(this.rmrsProps.values()).forEach(function(p){(!p.renderableSeries.isVisible||!p.showRollover)&&(p.tooltip.isHidden=!0,p.marker.isHidden=!0)}),this.tooltipLegendTemplate&&(this.legendAnnotation.seriesInfos=this.getSeriesInfos())},h.prototype.notifyPropertyChanged=function(p){switch(f.prototype.notifyPropertyChanged.call(this,p),p){case l.PROPERTY.X1:{this.calculateXPosition();break}case l.PROPERTY.X_COORDINATE_MODE:{this.calculateXPosition();break}case l.PROPERTY.IS_DRAGGABLE:{this.rolloverLineAnnotation.isEditable=this.isDraggableProperty;break}}},h.prototype.calculateXPosition=function(){var p=this.xAxis;if(p){var g=p.getCurrentCoordinateCalculator(),v=this.isVerticalChart(),y=v?p.viewRect.top:p.viewRect.left,m=this.isSvgOnlyProperty?c.DpiHelper.PIXEL_RATIO:1,b=this.rolloverLineAnnotation.getCoordinate(this.x1Property,g,this.xCoordinateModeProperty),S=b*m+y,_=v?this.parentSurface.seriesViewRect.width/2:this.parentSurface.seriesViewRect.height/2;this.mousePoint=v?new n.Point(_,S):new n.Point(S,_)}},h})(e.RolloverModifier);return nx.VerticalSliceModifier=d,nx}var Xm={},zI={},Ane;function M_e(){if(Ane)return zI;Ane=1,Object.defineProperty(zI,"__esModule",{value:!0}),zI.HoveredChangedArgs=void 0;var r=(function(){function e(i,n,t,o){this.source=i,this.hoveredSeries=n,this.allSeries=t,this.hitTestInfo=o}return e})();return zI.HoveredChangedArgs=r,zI}var WI={},wne;function L_e(){if(wne)return WI;wne=1,Object.defineProperty(WI,"__esModule",{value:!0}),WI.SelectionChangedArgs=void 0;var r=(function(){function e(i,n,t,o){this.source=i,this.selectedSeries=n,this.allSeries=t,this.hitTestInfo=o}return e})();return WI.SelectionChangedArgs=r,WI}var One;function eX(){if(One)return Xm;One=1;var r=Xm&&Xm.__extends||(function(){var p=function(g,v){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,m){y.__proto__=m}||function(y,m){for(var b in m)Object.prototype.hasOwnProperty.call(m,b)&&(y[b]=m[b])},p(g,v)};return function(g,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");p(g,v);function y(){this.constructor=g}g.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}})(),e=Xm&&Xm.__spreadArray||function(p,g,v){if(v||arguments.length===2)for(var y=0,m=g.length,b;y<m;y++)(b||!(y in g))&&(b||(b=Array.prototype.slice.call(g,0,y)),b[y]=g[y]);return p.concat(b||Array.prototype.slice.call(g))};Object.defineProperty(Xm,"__esModule",{value:!0}),Xm.SeriesSelectionModifier=void 0;var i=Jn(),n=Ba(),t=$o(),o=uy(),a=bo(),s=xf(),l=Js(),u=M_e(),c=L_e(),d=nu(),f=cy(),h=(function(p){r(g,p);function g(v){var y=this,m,b,S;if(y=p.call(this,v)||this,y.type=a.EChart2DModifierType.SeriesSelection,y.selectedSeries=[],y.hoveredSeries=[],y.selectionChanged=new n.EventHandler,y.hoverChanged=new n.EventHandler,y.hitTestRadiusProperty=(v==null?void 0:v.hitTestRadius)||l.BaseHitTestProvider.DEFAULT_HIT_TEST_RADIUS,y.enableSelection=(m=v==null?void 0:v.enableSelection)!==null&&m!==void 0?m:!0,y.enableHover=(b=v==null?void 0:v.enableHover)!==null&&b!==void 0?b:!1,y.executeCondition=(S=v==null?void 0:v.executeCondition)!==null&&S!==void 0?S:{button:o.EExecuteOn.MouseLeftButton},v!=null&&v.onSelectionChanged)if(typeof v.onSelectionChanged=="string"){y.typeMap.set("onSelectionChanged",v.onSelectionChanged);var _=(0,i.getFunction)(t.EBaseType.OptionFunction,v.onSelectionChanged);y.selectionChanged.subscribe(_)}else y.selectionChanged.subscribe(v.onSelectionChanged);if(v!=null&&v.onHoverChanged)if(typeof v.onHoverChanged=="string"){y.typeMap.set("onHoverChanged",v.onHoverChanged);var C=(0,i.getFunction)(t.EBaseType.OptionFunction,v.onHoverChanged);y.hoverChanged.subscribe(C)}else y.hoverChanged.subscribe(v.onHoverChanged);return y.updateSeriesSelected=y.updateSeriesSelected.bind(y),y.updateSeriesHovered=y.updateSeriesHovered.bind(y),y}return Object.defineProperty(g.prototype,"hitTestRadius",{get:function(){return this.hitTestRadiusProperty},set:function(v){this.hitTestRadiusProperty=v,this.notifyPropertyChanged(f.PROPERTY.HIT_TEST_RADIUS)},enumerable:!1,configurable:!0}),g.prototype.onAttach=function(){var v=this,y;p.prototype.onAttach.call(this),this.selectedSeries=[],(y=this.getIncludedRenderableSeries())===null||y===void 0||y.forEach(function(m){return v.onAttachSeries(m)})},g.prototype.onDetach=function(){var v=this,y;p.prototype.onDetach.call(this),this.selectedSeries=[],(y=this.getIncludedRenderableSeries())===null||y===void 0||y.forEach(function(m){return v.onDetachSeries(m)})},g.prototype.onAttachSeries=function(v){p.prototype.onAttachSeries.call(this,v),!v.isCollection&&(v.isSelected&&this.selectedSeries.push(v),v.selected.subscribe(this.updateSeriesSelected),v.isHovered&&this.hoveredSeries.push(v),v.hovered.subscribe(this.updateSeriesHovered))},g.prototype.onDetachSeries=function(v){p.prototype.onDetachSeries.call(this,v),!v.isCollection&&(this.selectedSeries=(0,s.arrayRemove)(this.selectedSeries,v),v.selected.unsubscribe(this.updateSeriesSelected),this.hoveredSeries=(0,s.arrayRemove)(this.hoveredSeries,v),v.hovered.unsubscribe(this.updateSeriesHovered))},g.prototype.modifierMouseDown=function(v){if(p.prototype.modifierMouseDown.call(this,v),!!this.checkExecuteConditions(v).isPrimary&&!this.isAttached)throw new Error("Should not call SeriesSelectionModifier.modifierMouseDown if not attached")},g.prototype.modifierMouseMove=function(v){var y=this,m;if(p.prototype.modifierMouseMove.call(this,v),!!this.enableHover){var b=this.getIncludedRenderableSeries(),S=b.map(function(T){return T.hitTestProvider.hitTest(v.mousePoint.x,v.mousePoint.y,y.hitTestRadius)});try{this.preventReentrancy=!0;var _=e([],this.hoveredSeries,!0);this.hoveredSeries=[];var C;(S==null?void 0:S.length)>0?(C=S.filter(function(T){return T.isHit}).sort(function(T,x){return T.getEuclideanDistance()-x.getEuclideanDistance()})[0],C?(C.associatedSeries.isHovered=!0,this.hoveredSeries.push(C.associatedSeries)):b.forEach(function(T){return T.isHovered=!1}),S.filter(function(T){return T!==C}).forEach(function(T){T!=null&&T.associatedSeries&&(T.associatedSeries.isHovered=!1)})):b.forEach(function(T){return T.isHovered=!1}),(_.length!==this.hoveredSeries.length||_.some(function(T){return!y.hoveredSeries.includes(T)}))&&((m=this.hoverChanged)===null||m===void 0||m.raiseEvent(new u.HoveredChangedArgs(this,this.hoveredSeries,b,C)))}finally{this.preventReentrancy=!1}}},g.prototype.modifierMouseLeave=function(v){var y;this.preventReentrancy=!0;var m=this.getIncludedRenderableSeries(),b=e([],this.hoveredSeries,!0),S=void 0;b.length>0&&(m.forEach(function(_){return _.isHovered=!1}),(y=this.hoverChanged)===null||y===void 0||y.raiseEvent(new u.HoveredChangedArgs(this,this.hoveredSeries,m,S))),this.preventReentrancy=!1},g.prototype.modifierPointerCancel=function(v){this.modifierMouseLeave(v)},g.prototype.modifierMouseUp=function(v){var y=this,m;if(p.prototype.modifierMouseUp.call(this,v),!!this.checkExecuteConditions(v).isPrimary&&this.enableSelection){if(!this.isAttached)throw new Error("Should not call SeriesSelectionModifier.modifierMouseUp if not attached");var b=this.getIncludedRenderableSeries(),S=b.map(function(C){return C.hitTestProvider.hitTest(v.mousePoint.x,v.mousePoint.y,y.hitTestRadius)});try{this.preventReentrancy=!0,this.selectedSeries=[],b.forEach(function(C){return C.isSelected=!1});var _=void 0;(S==null?void 0:S.length)>0&&(_=S.filter(function(C){return C.isHit}).sort(function(C,T){return C.getEuclideanDistance()-T.getEuclideanDistance()})[0],_!=null&&_.isHit&&(_.associatedSeries.isSelected=!0,this.selectedSeries.push(_.associatedSeries))),(m=this.selectionChanged)===null||m===void 0||m.raiseEvent(new c.SelectionChangedArgs(this,this.selectedSeries,b,_))}finally{this.preventReentrancy=!1}}},g.prototype.toJSON=function(){var v=p.prototype.toJSON.call(this),y={enableHover:this.enableHover,enableSelection:this.enableSelection,hitTestRadius:this.hitTestRadius,onHoverChanged:this.typeMap.get("onHoverChanged"),onSelectionChanged:this.typeMap.get("onSelectionChanged")};return Object.assign(v.options,y),v},g.prototype.updateSeriesSelected=function(v){var y,m;this.preventReentrancy||(v.isSelected?(this.selectedSeries.push(v.sourceSeries),(y=this.selectionChanged)===null||y===void 0||y.raiseEvent(new c.SelectionChangedArgs(this,this.selectedSeries,this.getIncludedRenderableSeries(),void 0))):(this.selectedSeries=(0,s.arrayRemove)(this.selectedSeries,v.sourceSeries),(m=this.selectionChanged)===null||m===void 0||m.raiseEvent(new c.SelectionChangedArgs(this,this.selectedSeries,this.getIncludedRenderableSeries(),void 0))))},g.prototype.updateSeriesHovered=function(v){var y,m;this.preventReentrancy||(v.hovered?(this.hoveredSeries.push(v.sourceSeries),(y=this.hoverChanged)===null||y===void 0||y.raiseEvent(new u.HoveredChangedArgs(this,this.hoveredSeries,this.getIncludedRenderableSeries(),void 0))):(this.hoveredSeries=(0,s.arrayRemove)(this.hoveredSeries,v.sourceSeries),(m=this.hoverChanged)===null||m===void 0||m.raiseEvent(new u.HoveredChangedArgs(this,this.hoveredSeries,this.getIncludedRenderableSeries(),void 0))))},g})(d.ChartModifierBase2D);return Xm.SeriesSelectionModifier=h,Xm}var ox={},nW={},Dne;function tX(){return Dne||(Dne=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.ECursorStyle=void 0,(function(e){e.NS="ns-resize",e.EW="ew-resize",e.Defalut="auto"})(r.ECursorStyle||(r.ECursorStyle={}))})(nW)),nW}var oW={},Rne;function rX(){return Rne||(Rne=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EDragMode=void 0,(function(e){e.Scaling="Scaling",e.Panning="Panning"})(r.EDragMode||(r.EDragMode={}))})(oW)),oW}var Mne;function k_e(){if(Mne)return ox;Mne=1;var r=ox&&ox.__extends||(function(){var l=function(u,c){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(d[h]=f[h])},l(u,c)};return function(u,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");l(u,c);function d(){this.constructor=u}u.prototype=c===null?Object.create(c):(d.prototype=c.prototype,new d)}})();Object.defineProperty(ox,"__esModule",{value:!0}),ox.XAxisDragModifier=void 0;var e=tX(),i=rX(),n=pn(),t=Eg(),o=nu(),a=bo(),s=(function(l){r(u,l);function u(c){var d=this,f;return d=l.call(this,c)||this,d.type=a.EChart2DModifierType.XAxisDrag,d.dragMode=i.EDragMode.Scaling,d.isClickedOverXAxis=!1,d.isVerticalChart=!1,d.cursorStyle=e.ECursorStyle.Defalut,d.dragMode=(f=c==null?void 0:c.dragMode)!==null&&f!==void 0?f:d.dragMode,d}return u.prototype.includeYAxis=function(c,d){throw Error("method includeYAxis() is not supported for XAxisDragModifier, use includeXAxis() instead")},u.prototype.getIncludedYAxis=function(){throw Error("method getIncludedYAxis() is not supported for XAxisDragModifier, use getIncludedXAxis() instead")},u.prototype.modifierMouseDown=function(c){if(l.prototype.modifierMouseDown.call(this,c),!this.isAttached)throw new Error("Should not call XAxisDragModifier.modifierMouseDown if not attached");(0,o.testIsOverAxes)(this.getHorizontalXAxes(),c.mousePoint)?(this.isVerticalChart=!1,this.startDragging(this.getHorizontalXAxes(),c)):(0,o.testIsOverAxes)(this.getVerticalXAxes(),c.mousePoint)&&(this.isVerticalChart=!0,this.startDragging(this.getVerticalXAxes(),c))},u.prototype.modifierMouseMove=function(c){if(this.isClickedOverXAxis){if(l.prototype.modifierMouseMove.call(this,c),this.pointFrom===void 0)return;this.dragMode===i.EDragMode.Panning?this.doPanning(c.mousePoint):this.dragMode===i.EDragMode.Scaling&&this.doScaling(c.mousePoint)}else this.updateCursor(c.mousePoint)},u.prototype.modifierMouseUp=function(c){l.prototype.modifierMouseUp.call(this,c),this.updateCursor(c.mousePoint),this.pointFrom=void 0,this.isClickedOverXAxis=!1},u.prototype.toJSON=function(){var c=l.prototype.toJSON.call(this),d={dragMode:this.dragMode};return Object.assign(c.options,d),c},u.prototype.updateCursor=function(c){var d=this.parentSurface.getMainCanvas();(0,o.testIsOverAxes)(this.getHorizontalXAxes(),c)?this.cursorStyle!==e.ECursorStyle.EW&&(d.style.cursor=e.ECursorStyle.EW,this.cursorStyle=e.ECursorStyle.EW):(0,o.testIsOverAxes)(this.getVerticalXAxes(),c)?this.cursorStyle!==e.ECursorStyle.NS&&(d.style.cursor=e.ECursorStyle.NS,this.cursorStyle=e.ECursorStyle.NS):this.cursorStyle!==e.ECursorStyle.Defalut&&(d.style.cursor=e.ECursorStyle.Defalut,this.cursorStyle=e.ECursorStyle.Defalut)},u.prototype.doPanning=function(c){var d=c;if(this.isVerticalChart){var f=d.y-this.pointFrom.y;this.activeAxes.forEach(function(p){var g=p.flippedCoordinates?-f:f;p.scroll(g,t.EClipMode.None)})}else{var h=d.x-this.pointFrom.x;this.activeAxes.forEach(function(p){var g=p.flippedCoordinates?-h:h;p.scroll(g,t.EClipMode.None)})}this.pointFrom=d},u.prototype.doScaling=function(c){var d=this;this.isVerticalChart?this.activeAxes.forEach(function(f,h){var p=f.viewRect,g=(0,n.translateFromCanvasToSeriesViewRectY)(d.pointFrom.y,p),v=g>=p.height/2,y=(c.y-d.pointFrom.y)/p.height;f.scale(d.initialVisibleRanges[h],y,v)}):this.activeAxes.forEach(function(f,h){var p=f.viewRect,g=(0,n.translateFromCanvasToSeriesViewRectX)(d.pointFrom.x,p),v=g>=p.width/2,y=(c.x-d.pointFrom.x)/p.width;f.scale(d.initialVisibleRanges[h],y,v)})},u.prototype.getHorizontalXAxes=function(){return this.getIncludedXAxis().filter(function(c){return c.isHorizontalAxis})},u.prototype.getVerticalXAxes=function(){return this.getIncludedXAxis().filter(function(c){return!c.isHorizontalAxis})},u.prototype.startDragging=function(c,d){this.isClickedOverXAxis=!0;var f=(0,o.getActiveAxes)(c,d.mousePoint),h=[];f.forEach(function(p){h.push(p.visibleRange)}),this.activeAxes=f,this.initialVisibleRanges=h,this.pointFrom=d.mousePoint,d.handled=!0},u})(o.ChartModifierBase2D);return ox.XAxisDragModifier=s,ox}var ax={},Lne;function I_e(){if(Lne)return ax;Lne=1;var r=ax&&ax.__extends||(function(){var l=function(u,c){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(d[h]=f[h])},l(u,c)};return function(u,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");l(u,c);function d(){this.constructor=u}u.prototype=c===null?Object.create(c):(d.prototype=c.prototype,new d)}})();Object.defineProperty(ax,"__esModule",{value:!0}),ax.YAxisDragModifier=void 0;var e=bo(),i=tX(),n=rX(),t=pn(),o=Eg(),a=nu(),s=(function(l){r(u,l);function u(c){var d=this,f;return d=l.call(this,c)||this,d.type=e.EChart2DModifierType.YAxisDrag,d.dragMode=n.EDragMode.Scaling,d.isClickedOverYAxis=!1,d.isVerticalChart=!1,d.cursorStyle=i.ECursorStyle.Defalut,d.dragMode=(f=c==null?void 0:c.dragMode)!==null&&f!==void 0?f:d.dragMode,d}return u.prototype.includeXAxis=function(c,d){throw Error("method includeXAxis() is not supported for YAxisDragModifier, use includeYAxis() instead")},u.prototype.getIncludedXAxis=function(){throw Error("method getIncludedXAxis() is not supported for YAxisDragModifier, use getIncludedXAxis() instead")},u.prototype.modifierMouseDown=function(c){if(l.prototype.modifierMouseDown.call(this,c),!this.isAttached)throw new Error("Should not call YAxisDragModifier.modifierMouseDown if not attached");(0,a.testIsOverAxes)(this.getVerticalYAxes(),c.mousePoint)?(this.isVerticalChart=!1,this.startDragging(this.getVerticalYAxes(),c)):(0,a.testIsOverAxes)(this.getHorizontalYAxes(),c.mousePoint)&&(this.isVerticalChart=!0,this.startDragging(this.getHorizontalYAxes(),c))},u.prototype.modifierMouseMove=function(c){if(this.isClickedOverYAxis){if(l.prototype.modifierMouseMove.call(this,c),this.pointFrom===void 0)return;this.dragMode===n.EDragMode.Panning?this.doPanning(c.mousePoint):this.dragMode===n.EDragMode.Scaling&&this.doScaling(c.mousePoint)}else this.updateCursor(c.mousePoint)},u.prototype.modifierMouseUp=function(c){l.prototype.modifierMouseUp.call(this,c),this.updateCursor(c.mousePoint),this.pointFrom=void 0,this.isClickedOverYAxis=!1},u.prototype.toJSON=function(){var c=l.prototype.toJSON.call(this),d={dragMode:this.dragMode};return Object.assign(c.options,d),c},u.prototype.updateCursor=function(c){var d=this.parentSurface.getMainCanvas();(0,a.testIsOverAxes)(this.getVerticalYAxes(),c)?this.cursorStyle!==i.ECursorStyle.NS&&(d.style.cursor=i.ECursorStyle.NS,this.cursorStyle=i.ECursorStyle.NS):(0,a.testIsOverAxes)(this.getHorizontalYAxes(),c)?this.cursorStyle!==i.ECursorStyle.EW&&(d.style.cursor=i.ECursorStyle.EW,this.cursorStyle=i.ECursorStyle.EW):this.cursorStyle!==i.ECursorStyle.Defalut&&(d.style.cursor=i.ECursorStyle.Defalut,this.cursorStyle=i.ECursorStyle.Defalut)},u.prototype.doPanning=function(c){var d=c;if(this.isVerticalChart){var f=d.x-this.pointFrom.x;this.activeAxes.forEach(function(p){var g=p.flippedCoordinates?f:-f;p.scroll(g,o.EClipMode.None)})}else{var h=d.y-this.pointFrom.y;this.activeAxes.forEach(function(p){var g=p.flippedCoordinates?h:-h;p.scroll(g,o.EClipMode.None)})}this.pointFrom=d},u.prototype.doScaling=function(c){var d=this;this.isVerticalChart?this.activeAxes.forEach(function(f,h){var p=f.viewRect,g=(0,t.translateFromCanvasToSeriesViewRectX)(d.pointFrom.x,p),v=g<=p.width/2,y=-(c.x-d.pointFrom.x)/p.width;f.scale(d.initialVisibleRanges[h],y,v)}):this.activeAxes.forEach(function(f,h){var p=f.viewRect,g=(0,t.translateFromCanvasToSeriesViewRectY)(d.pointFrom.y,p),v=g<=p.height/2,y=-(c.y-d.pointFrom.y)/p.height;f.scale(d.initialVisibleRanges[h],y,v)})},u.prototype.getVerticalYAxes=function(){return this.getIncludedYAxis().filter(function(c){return!c.isHorizontalAxis})},u.prototype.getHorizontalYAxes=function(){return this.getIncludedYAxis().filter(function(c){return c.isHorizontalAxis})},u.prototype.startDragging=function(c,d){this.isClickedOverYAxis=!0;var f=(0,a.getActiveAxes)(c,d.mousePoint),h=[];f.forEach(function(p){h.push(p.visibleRange)}),this.activeAxes=f,this.initialVisibleRanges=h,this.pointFrom=d.mousePoint,d.handled=!0},u})(a.ChartModifierBase2D);return ax.YAxisDragModifier=s,ax}var sx={},kne;function iX(){if(kne)return sx;kne=1;var r=sx&&sx.__extends||(function(){var d=function(f,h){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,g){p.__proto__=g}||function(p,g){for(var v in g)Object.prototype.hasOwnProperty.call(g,v)&&(p[v]=g[v])},d(f,h)};return function(f,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");d(f,h);function p(){this.constructor=f}f.prototype=h===null?Object.create(h):(p.prototype=h.prototype,new p)}})();Object.defineProperty(sx,"__esModule",{value:!0}),sx.ZoomExtentsModifier=void 0;var e=Jn(),i=hc(),n=$o(),t=Y1(),o=bo(),a=Os(),s=ty(),l=pn(),u=nu(),c=(function(d){r(f,d);function f(h){var p=this,g,v,y,m,b,S;return p=d.call(this,h)||this,p.type=o.EChart2DModifierType.ZoomExtents,p.isAnimated=!0,p.animationDuration=400,p.easingFunction=i.easing.outExpo,p.applyToSeriesViewRect=!0,p.applyToAxes=!0,p.isAnimated=(g=h==null?void 0:h.isAnimated)!==null&&g!==void 0?g:p.isAnimated,p.animationDuration=(v=h==null?void 0:h.animationDuration)!==null&&v!==void 0?v:p.animationDuration,p.applyToSeriesViewRect=(y=h==null?void 0:h.applyToSeriesViewRect)!==null&&y!==void 0?y:p.applyToSeriesViewRect,p.applyToAxes=(m=h==null?void 0:h.applyToAxes)!==null&&m!==void 0?m:p.applyToAxes,h!=null&&h.easingFunction&&typeof h.easingFunction=="string"&&(h.easingFunction=i.easing[h.easingFunction]),p.easingFunction=(b=h==null?void 0:h.easingFunction)!==null&&b!==void 0?b:i.easing.outExpo,h!=null&&h.onZoomExtents&&typeof h.onZoomExtents=="string"&&(p.typeMap.set("onZoomExtents",h.onZoomExtents),h.onZoomExtents=(0,e.getFunction)(n.EBaseType.OptionFunction,h.onZoomExtents)),p.onZoomExtents=h==null?void 0:h.onZoomExtents,p.executeCondition=(S=h==null?void 0:h.executeCondition)!==null&&S!==void 0?S:{button:void 0,key:t.EModifierMouseArgKey.None},p}return f.prototype.modifierDoubleClick=function(h){var p=this;if(this.checkExecuteConditions(h).isPrimary){var g=this.parentSurface,v=this.isAnimated?this.animationDuration:0;if(g!==void 0){var y=(0,l.translateFromCanvasToSeriesViewRect)(h.mousePoint,this.parentSurface.seriesViewRect);if(y&&this.applyToSeriesViewRect){if(!this.onZoomExtents||this.onZoomExtents(g)){switch(this.xyDirection){case a.EXyDirection.XyDirection:g.zoomExtents(v,this.easingFunction,function(){return g.setZoomState(s.EZoomState.AtExtents)},function(S){return p.includedXAxes.testIsIncluded(S.id)},function(S){return p.includedYAxes.testIsIncluded(S.id)});break;case a.EXyDirection.XDirection:g.zoomExtentsX(v,this.easingFunction,function(S){return p.includedXAxes.testIsIncluded(S.id)});break;case a.EXyDirection.YDirection:g.zoomExtentsY(v,this.easingFunction,function(S){return p.includedYAxes.testIsIncluded(S.id)});break}h.handled=!0}}else if(this.applyToAxes){var m=[];[a.EXyDirection.XDirection,a.EXyDirection.XyDirection].includes(this.xyDirection)&&m.push.apply(m,this.getIncludedXAxis()),[a.EXyDirection.YDirection,a.EXyDirection.XyDirection].includes(this.xyDirection)&&m.push.apply(m,this.getIncludedYAxis());var b=(0,u.getActiveAxes)(m,h.mousePoint);b.length>0&&(h.handled=!0,b.forEach(function(S){if(S.isXAxis){var _=S.getMaximumRange();S.animateVisibleRange(_,v,p.easingFunction)}else{var C=S.getWindowedYRange(void 0);S.animateVisibleRange(C,v,p.easingFunction)}}))}}}},f.prototype.toJSON=function(){var h=d.prototype.toJSON.call(this),p={animationDuration:this.animationDuration,easingFunction:this.easingFunction.name,isAnimated:this.isAnimated,applyToSeriesViewRect:this.applyToSeriesViewRect,applyToAxes:this.applyToAxes,onZoomExtents:this.typeMap.get("onZoomExtents")};return Object.assign(h.options,p),h},f})(u.ChartModifierBase2D);return sx.ZoomExtentsModifier=c,sx}var lx={},Ine;function N_e(){if(Ine)return lx;Ine=1;var r=lx&&lx.__extends||(function(){var c=function(d,f){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(h[g]=p[g])},c(d,f)};return function(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");c(d,f);function h(){this.constructor=d}d.prototype=f===null?Object.create(f):(h.prototype=f.prototype,new h)}})();Object.defineProperty(lx,"__esModule",{value:!0}),lx.ZoomPanModifier=void 0;var e=uy(),i=Y1(),n=bo(),t=Os(),o=ty(),a=pn(),s=Eg(),l=uU(),u=(function(c){r(d,c);function d(f){var h=this,p,g;return h=c.call(this,f)||this,h.enableZoom=!0,h.type=n.EChart2DModifierType.ZoomPan,h.enableZoom=(p=f==null?void 0:f.enableZoom)!==null&&p!==void 0?p:h.enableZoom,h.executeCondition=(g=f==null?void 0:f.executeCondition)!==null&&g!==void 0?g:{button:e.EExecuteOn.MouseLeftButton,key:i.EModifierMouseArgKey.None},h}return d.prototype.modifierMouseDown=function(f){if(f.nativeEvent.preventDefault(),!!this.checkExecuteConditions(f).isPrimary){if(!this.isAttached)throw new Error("Should not call ZoomPanModifier.modifierMouseDown if not attached");c.prototype.modifierMouseDown.call(this,f);var h=(0,a.translateFromCanvasToSeriesViewRect)(f.mousePoint,this.parentSurface.seriesViewRect);h&&(this.activePointerEvents.set(f.pointerId,f),this.parentSurface.setZoomState(o.EZoomState.UserZooming))}},d.prototype.modifierMouseMove=function(f){if(!(this.parentSurface.isSubSurface&&!f.isActiveSubChartEvent)&&(this.updatePointerInfo(f),!!this.previousPoint)){this.enableZoom&&c.prototype.getIsActionAllowed.call(this,f)&&c.prototype.performModifierAction.call(this,f);var h=this.getIsActionAllowed(f);h&&this.performModifierAction(f)}},d.prototype.modifierMouseUp=function(f){if(c.prototype.modifierMouseUp.call(this,f),this.activePointerEvents.size>0){var h=this.activePointerEvents.values().next().value;f.target.setPointerCapture(h.pointerId)}},d.prototype.modifierPointerCancel=function(f){c.prototype.modifierPointerCancel.call(this,f),this.activePointerEvents.clear()},d.prototype.toJSON=function(){var f=c.prototype.toJSON.call(this),h={enableZoom:this.enableZoom};return Object.assign(f.options,h),f},d.prototype.performModifierAction=function(f){var h=f.mousePoint,p=h.x-this.previousPoint.x,g=this.previousPoint.y-h.y;this.performPan(p,g)},d.prototype.getIsActionAllowed=function(f){var h=this.activePointerEvents.values().next().value;return h.pointerId===f.pointerId},d.prototype.performPan=function(f,h){[t.EXyDirection.XDirection,t.EXyDirection.XyDirection].includes(this.xyDirection)&&this.getIncludedXAxis().forEach(function(p){var g=p.isHorizontalAxis?f:-h;p.scroll(p.flippedCoordinates?-g:g,s.EClipMode.None)}),[t.EXyDirection.YDirection,t.EXyDirection.XyDirection].includes(this.xyDirection)&&this.getIncludedYAxis().forEach(function(p){var g=p.isHorizontalAxis?-f:h;p.scroll(p.flippedCoordinates?-g:g,s.EClipMode.None)})},d})(l.PinchZoomModifier);return lx.ZoomPanModifier=u,lx}var Km={},Zm={},aW={},Nne;function F_e(){return Nne||(Nne=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EHoverMode=void 0,(function(e){e.Multi="Multi",e.TopmostIncluded="TopmostIncluded",e.AbsoluteTopmost="AbsoluteTopmost"})(r.EHoverMode||(r.EHoverMode={}))})(aW)),aW}var Fne;function j_e(){if(Fne)return Zm;Fne=1;var r=Zm&&Zm.__extends||(function(){var c=function(d,f){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(h[g]=p[g])},c(d,f)};return function(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");c(d,f);function h(){this.constructor=d}d.prototype=f===null?Object.create(f):(h.prototype=f.prototype,new h)}})(),e=Zm&&Zm.__assign||function(){return e=Object.assign||function(c){for(var d,f=1,h=arguments.length;f<h;f++){d=arguments[f];for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(c[p]=d[p])}return c},e.apply(this,arguments)};Object.defineProperty(Zm,"__esModule",{value:!0}),Zm.PointerEventsMediatorModifier=void 0;var i=Jn(),n=nu(),t=Ba(),o=$o(),a=F_e(),s=sb(),l=pn(),u=(function(c){r(d,c);function d(f){var h=this,p,g,v,y;if(h=c.call(this,f)||this,h.notifyOutEvent=!0,h.notifyPositionUpdate=!1,h.hoverChanged=new t.EventHandler,h.previousHoveredEntities=[],h.mousePosition=s.EMousePosition.OutOfCanvas,h.enableHoverProperty=!1,h.hoverModeProperty=a.EHoverMode.AbsoluteTopmost,h.enableHoverProperty=(p=f==null?void 0:f.enableHover)!==null&&p!==void 0?p:h.enableHoverProperty,h.hoverModeProperty=(g=f==null?void 0:f.hoverMode)!==null&&g!==void 0?g:h.hoverModeProperty,h.notifyOutEvent=(v=f==null?void 0:f.notifyOutEvent)!==null&&v!==void 0?v:h.notifyOutEvent,h.notifyPositionUpdate=(y=f==null?void 0:f.notifyPositionUpdate)!==null&&y!==void 0?y:h.notifyPositionUpdate,f!=null&&f.onHover&&(typeof f.onHover=="string"&&(h.typeMap.set("onHover",f.onHover),f.onHover=(0,i.getFunction)(o.EBaseType.OptionFunction,f.onHover)),h.hoverChanged.subscribe(f==null?void 0:f.onHover)),f!=null&&f.targets)if(Array.isArray(f.targets)&&typeof f.targets[0]!="string")h.targets=f.targets;else if(Array.isArray(f.targets)&&typeof f.targets[0]=="string"){var m=f.targets;h.includeList=new Map(m.map(function(b){return[b,!0]})),h.targetsSelector=function(){return h.getAllTargets().filter(function(b){return h.includeList.get(b.id)})}}else typeof f.targets=="string"&&(h.typeMap.set("targetsSelector",f.targets),f.targets=(0,i.getFunction)(o.EBaseType.OptionFunction,f.targets)),h.targetsSelector=f.targets;return h}return Object.defineProperty(d.prototype,"hoverMode",{get:function(){return this.hoverModeProperty},set:function(f){this.hoverModeProperty=f},enumerable:!1,configurable:!0}),d.prototype.toJSON=function(){var f,h=c.prototype.toJSON.call(this).options,p={hoverMode:this.hoverMode,enableHover:this.enableHoverProperty,notifyOutEvent:this.notifyOutEvent,notifyPositionUpdate:this.notifyPositionUpdate,onHover:this.typeMap.get("onHover"),targets:this.includeList?Array.from(this.includeList).filter(function(g){g[0];var v=g[1];return v}).map(function(g){var v=g[0];return v}):this.typeMap.get("targetsSelector")||((f=this.targets)===null||f===void 0?void 0:f.map(function(g){var v=g.id;return v}))};return{type:this.type,options:e(e({},h),p)}},d.prototype.modifierMouseMove=function(f){if(!(this.parentSurface.isSubSurface&&!f.isActiveSubChartEvent)){this.activePointerEvents.set(f.pointerId,f),c.prototype.modifierMouseMove.call(this,f);var h;if(this.mousePoint)h=(0,l.translateFromCanvasToSeriesViewRect)(this.mousePoint,this.parentSurface.seriesViewRect),h?this.mousePosition=s.EMousePosition.SeriesArea:this.mousePosition=s.EMousePosition.AxisArea;else{this.mousePosition=s.EMousePosition.OutOfCanvas;return}var p=this.getIsActionAllowed(f);p&&this.enableHoverProperty&&this.performHoverAction(f)}},d.prototype.modifierMouseLeave=function(f){if(c.prototype.modifierMouseLeave.call(this,f),this.mousePosition=s.EMousePosition.OutOfCanvas,this.enableHoverProperty){for(var h=this.getIncludedTargets(),p=h.length,g=null,v=!1,y=p-1;y>-1;--y)g=h[y],this.performHoverOnEntity(g,f,v);var m=this.previousHoveredEntities.length>0;m&&this.hoverChanged.raiseEvent({sender:this,mouseArgs:f,hoveredEntities:[],includedEntities:h,unhoveredEntities:this.previousHoveredEntities,previousHoveredEntities:this.previousHoveredEntities}),this.previousHoveredEntities=[]}},d.prototype.modifierPointerCancel=function(f){this.modifierMouseLeave(f)},d.prototype.getIncludedTargets=function(){var f,h,p;return(p=(f=this.targets)!==null&&f!==void 0?f:(h=this.targetsSelector)===null||h===void 0?void 0:h.call(this,this))!==null&&p!==void 0?p:this.getAllTargets()},d.prototype.performHoverAction=function(f){var h=this,p=this.getIncludedTargets(),g=[],v=[];if(this.hoverMode===a.EHoverMode.TopmostIncluded){for(var y=p.length,m=y-1;m>-1;--m){var b=p[m],S=b.checkIsWithinBounds(f);if(S){g.push(b),this.performHoverOnEntity(b,f,S);break}}this.previousHoveredEntities.forEach(function(D){D!==g[0]&&(v.push(D),h.performHoverOnEntity(D,f,!1))})}else if(this.hoverMode===a.EHoverMode.AbsoluteTopmost){for(var _=this.getAllTargets(),y=_.length,C=function(j){var N=_[j],V=N.checkIsWithinBounds(f);if(V){var W=p.find(function(K){return K===N});return W&&(g.push(N),T.performHoverOnEntity(N,f,V)),"break"}},T=this,m=y-1;m>-1;--m){var x=C(m);if(x==="break")break}this.previousHoveredEntities.forEach(function(j){j!==g[0]&&(v.push(j),h.performHoverOnEntity(j,f,!1))})}else if(this.hoverMode===a.EHoverMode.Multi)for(var y=p.length,m=y-1;m>-1;--m){var b=p[m],S=b.checkIsWithinBounds(f),A=b.isHovered;S?(g.push(b),this.performHoverOnEntity(b,f,S)):A&&(v.push(b),this.performHoverOnEntity(b,f,S))}var w=g.length>this.previousHoveredEntities.length||v.length&&g.length===this.previousHoveredEntities.length,L=this.notifyOutEvent&&v.length,k=this.notifyPositionUpdate&&g.length;(w||k||L)&&this.hoverChanged.raiseEvent({sender:this,mouseArgs:f,hoveredEntities:g,previousHoveredEntities:this.previousHoveredEntities,includedEntities:p,unhoveredEntities:v}),this.previousHoveredEntities=g},d.prototype.performHoverOnEntity=function(f,h,p){f.hover({args:h,isHovered:p,notifyOutEvent:this.notifyOutEvent,notifyPositionUpdate:this.notifyPositionUpdate})},d})(n.ChartModifierBase2D);return Zm.PointerEventsMediatorModifier=u,Zm}var jne;function B_e(){if(jne)return Km;jne=1;var r=Km&&Km.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(u[d]=c[d])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})(),e=Km&&Km.__spreadArray||function(a,s,l){if(l||arguments.length===2)for(var u=0,c=s.length,d;u<c;u++)(d||!(u in s))&&(d||(d=Array.prototype.slice.call(s,0,u)),d[u]=s[u]);return a.concat(d||Array.prototype.slice.call(s))};Object.defineProperty(Km,"__esModule",{value:!0}),Km.AnnotationHoverModifier=void 0;var i=Aa(),n=bo(),t=j_e(),o=(function(a){r(s,a);function s(l){var u=a.call(this,l)||this;return u.type=n.EChart2DModifierType.AnnotationHover,u.enableHoverProperty=!0,u}return s.prototype.getAllTargets=function(){var l=this.parentSurface.annotations.asArray().filter(function(C){return!C.isHidden}),u=l.filter(function(C){return C.isDomAnnotation}),c=u.filter(function(C){return C.isSvgAnnotation}),d=u.filter(function(C){return!C.isSvgAnnotation}),f=l.filter(function(C){return!C.isSvgAnnotation}),h=d.filter(function(C){return C.annotationLayer===i.EAnnotationLayer.Background}),p=d.filter(function(C){return C.annotationLayer===i.EAnnotationLayer.BelowChart}),g=d.filter(function(C){return C.annotationLayer===i.EAnnotationLayer.AboveChart}),v=c.filter(function(C){return C.annotationLayer===i.EAnnotationLayer.Background}),y=c.filter(function(C){return C.annotationLayer===i.EAnnotationLayer.BelowChart}),m=c.filter(function(C){return C.annotationLayer===i.EAnnotationLayer.AboveChart}),b=f.filter(function(C){return C.annotationLayer===i.EAnnotationLayer.Background}),S=f.filter(function(C){return C.annotationLayer===i.EAnnotationLayer.BelowChart}),_=f.filter(function(C){return C.annotationLayer===i.EAnnotationLayer.AboveChart});return e(e(e(e(e(e(e(e(e([],h,!0),v,!0),b,!0),S,!0),_,!0),y,!0),p,!0),m,!0),g,!0)},s})(t.PointerEventsMediatorModifier);return Km.AnnotationHoverModifier=o,Km}var ux={},GI={},YI={},$I={},Bne;function V_e(){if(Bne)return $I;Bne=1,Object.defineProperty($I,"__esModule",{value:!0}),$I.AnimationToken=void 0;var r=(function(){function e(i,n){this.token=i,this.onCompleted=n}return e.prototype.cancelAnimation=function(){this.token&&(clearInterval(this.token),this.token=void 0)},e.prototype.completeAnimation=function(){this.token&&(clearInterval(this.token),this.token=void 0),this.onCompleted&&this.onCompleted()},e})();return $I.AnimationToken=r,$I}var Vne;function H_e(){if(Vne)return YI;Vne=1,Object.defineProperty(YI,"__esModule",{value:!0}),YI.animateAny=void 0;var r=V_e(),e=ni(),i=Qq();function n(t,o,a,s,l,u,c){e.Guard.notNull(s,"onAnimate"),e.Guard.notNull(o,"from"),e.Guard.notNull(a,"to"),e.Guard.notNull(l,"interpolate");var d=new Date().getTime(),f=d+t;s(o);var h=new r.AnimationToken(setInterval(function(){var p=new Date().getTime(),g=i.NumberUtil.constrain(1-(f-p)/t,0,1),v=c(g),y=l(o,a,v);s(y),p>f&&(v!==1&&s(l(o,a,c(1))),h.completeAnimation())},16.67),u);return h}return YI.animateAny=n,YI}var Hne;function cU(){if(Hne)return GI;Hne=1,Object.defineProperty(GI,"__esModule",{value:!0}),GI.DoubleAnimator=void 0;var r=H_e(),e=hc(),i=(function(){function n(){}return n.animate=function(t,o,a,s,l,u){return u===void 0&&(u=e.easing.outExpo),(0,r.animateAny)(a,t,o,s,n.interpolate,l,u)},n.interpolate=function(t,o,a){var s=(o-t)*a+t;return s},n})();return GI.DoubleAnimator=i,GI}var Une;function U_e(){if(Une)return ux;Une=1;var r=ux&&ux.__extends||(function(){var m=function(b,S){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,C){_.__proto__=C}||function(_,C){for(var T in C)Object.prototype.hasOwnProperty.call(C,T)&&(_[T]=C[T])},m(b,S)};return function(b,S){if(typeof S!="function"&&S!==null)throw new TypeError("Class extends value "+String(S)+" is not a constructor or null");m(b,S);function _(){this.constructor=b}b.prototype=S===null?Object.create(S):(_.prototype=S.prototype,new _)}})();Object.defineProperty(ux,"__esModule",{value:!0}),ux.PolarArcZoomModifier=void 0;var e=cU(),i=hc(),n=JF(),t=Mr(),o=oi(),a=Ii(),s=uy(),l=bo(),u=Wd(),c=Os(),d=ty(),f=pn(),h=ZH(),p=nu(),g=cy(),v=KN(),y=(function(m){r(b,m);function b(S){var _=this,C,T,x,A,w,L,k;return _=m.call(this,S)||this,_.type=l.EChart2DModifierType.PolarArcZoom,_.isAnimated=!0,_.animationDuration=1e3,_.easingFunction=i.easing.outCubic,_.isClicked=!1,_.fillProperty="#42b64933",_.strokeProperty="#42b64977",_.strokeThicknessProperty=2,_.fill=(C=S==null?void 0:S.fill)!==null&&C!==void 0?C:_.fillProperty,_.stroke=(T=S==null?void 0:S.stroke)!==null&&T!==void 0?T:_.strokeProperty,_.strokeThickness=(x=S==null?void 0:S.strokeThickness)!==null&&x!==void 0?x:_.strokeThicknessProperty,_.isAnimated=(A=S==null?void 0:S.isAnimated)!==null&&A!==void 0?A:_.isAnimated,_.animationDuration=(w=S==null?void 0:S.animationDuration)!==null&&w!==void 0?w:_.animationDuration,S!=null&&S.easingFunction&&typeof S.easingFunction=="string"&&(S.easingFunction=i.easing[S.easingFunction]),_.easingFunction=(L=S==null?void 0:S.easingFunction)!==null&&L!==void 0?L:_.easingFunction,_.executeCondition=(k=S==null?void 0:S.executeCondition)!==null&&k!==void 0?k:{button:s.EExecuteOn.MouseLeftButton},_}return Object.defineProperty(b.prototype,"modifierType",{get:function(){return u.EModifierType.Chart2DPolarModifier},enumerable:!1,configurable:!0}),b.prototype.applyTheme=function(S){this.testPropertyChanged(g.PROPERTY.FILL)||(this.fill=S.rubberBandFillBrush),this.testPropertyChanged(g.PROPERTY.STROKE)||(this.stroke=S.rubberBandStrokeBrush)},b.prototype.onAttach=function(){m.prototype.onAttach.call(this),this.handleAddArcAnnotation()},b.prototype.onDetach=function(){m.prototype.onDetach.call(this),this.handleRemoveArcAnnotation()},b.prototype.modifierMouseDown=function(S){if(m.prototype.modifierMouseDown.call(this,S),!!this.checkExecuteConditions(S).isPrimary){if(!this.isAttached)throw new Error("Should not call PolarArcZoomModifier.modifierMouseDown if not attached");this.parentSurface.setZoomState(d.EZoomState.UserZooming);var _=(0,f.translateFromCanvasToSeriesViewRect)(S.mousePoint,this.parentSurface.seriesViewRect);if(_){var C=this.xAxis,T=this.yAxis,x=T.maxRadius,A=C.reverseTransform(_.x,_.y);A.y<=x&&(this.pointFrom=_,this.polarPointFrom=this.capPolarCoordinates(A),this.isClicked=!0)}}},b.prototype.capPolarCoordinates=function(S){var _=this.xAxis,C=this.yAxis,T=_.getCurrentCoordinateCalculator(),x=C.getCurrentCoordinateCalculator(),A=T.getDataValue(S.x),w=x.getDataValue(S.y),L=Math.max(_.visibleRange.min,Math.min(_.visibleRange.max,A)),k=Math.max(C.visibleRange.min,Math.min(C.visibleRange.max,w));return new a.Point(T.getCoordinate(L),x.getCoordinate(k))},b.prototype.getArcParams=function(){var S=this.xAxis,_=this.yAxis,C=S.getCurrentCoordinateCalculator(),T=_.getCurrentCoordinateCalculator(),x=this.polarPointFrom,A=this.polarPointTo,w=Math.min(C.getDataValue(x.x),C.getDataValue(A.x)),L=Math.max(C.getDataValue(x.x),C.getDataValue(A.x)),k=Math.min(T.getDataValue(x.y),T.getDataValue(A.y)),D=Math.max(T.getDataValue(x.y),T.getDataValue(A.y));return this.xyDirection===c.EXyDirection.XDirection?(k=_.visibleRange.min,D=_.visibleRange.max):this.xyDirection===c.EXyDirection.YDirection&&(w=S.visibleRange.min,L=S.visibleRange.max),{angleStart:w,angleEnd:L,radiusInner:k,radiusOuter:D}},b.prototype.updateArcAnnotation=function(S){var _=this.parentSurface.seriesViewRect,C=(0,f.translateFromCanvasToSeriesViewRect)(S,_);if(C){this.pointTo=C;var T=this.xAxis,x=T.reverseTransform(C.x,C.y);this.polarPointTo=this.capPolarCoordinates(x);var A=this.getArcParams();this.arcAnnotation.isHidden=!1,this.arcAnnotation.x1=A.angleStart,this.arcAnnotation.x2=A.angleEnd,this.arcAnnotation.y1=A.radiusOuter,this.arcAnnotation.y2=A.radiusInner;var w=this.calculateArcOrigin(),L=w.centerX,k=w.centerY;return this.arcAnnotation.centerX=L,this.arcAnnotation.centerY=k,A}else return this.getArcParams()},b.prototype.modifierMouseMove=function(S){m.prototype.modifierMouseMove.call(this,S),this.isClicked&&this.updateArcAnnotation(S.mousePoint)},b.prototype.clear=function(){this.pointFrom=void 0,this.polarPointFrom=void 0,this.pointTo=void 0,this.polarPointTo=void 0,this.isClicked=!1},b.prototype.modifierMouseUp=function(S){if(m.prototype.modifierMouseUp.call(this,S),!!this.checkExecuteConditions(S).isPrimary&&this.isClicked){var _=this.updateArcAnnotation(S.mousePoint);this.arcAnnotation.isHidden=!0;var C=this.calculateDraggedDistance();this.clear(),_&&C>v.RubberBandXyZoomModifier.MIN_DRAG_SENSITIVITY&&this.performZoom(_)}},Object.defineProperty(b.prototype,"strokeThickness",{get:function(){return this.strokeThicknessProperty},set:function(S){this.strokeThicknessProperty=S,this.notifyPropertyChanged(g.PROPERTY.STROKE_THICKNESS)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"stroke",{get:function(){return this.strokeProperty},set:function(S){this.strokeProperty=S,this.notifyPropertyChanged(g.PROPERTY.STROKE)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"fill",{get:function(){return this.fillProperty},set:function(S){this.fillProperty=S,this.notifyPropertyChanged(g.PROPERTY.FILL)},enumerable:!1,configurable:!0}),b.prototype.toJSON=function(){var S=m.prototype.toJSON.call(this),_={animationDuration:this.animationDuration,easingFunction:this.easingFunction.name,fill:this.fill,isAnimated:this.isAnimated,stroke:this.stroke,strokeThickness:this.strokeThickness};return Object.assign(S.options,_),S},b.prototype.delete=function(){this.parentSurfaceProperty=void 0,this.handleRemoveArcAnnotation(),m.prototype.delete.call(this)},b.prototype.performZoom=function(S){var _=this.parentSurface;if(_){var C=S.angleStart,T=S.angleEnd,x=S.radiusInner,A=S.radiusOuter,w=this.xAxis,L=this.yAxis,k=w.visibleRange,D=k.min,j=k.max,N=L.visibleRange,V=N.min,W=N.max,K=w.startAngle,H=w.totalAngle,U=w.flippedCoordinates;if(this.isAnimated&&this.animationDuration>0){var I=new n.GenericAnimation({from:{x1:D,x2:j,y1:V,y2:W},to:{x1:C,x2:T,y1:x,y2:A},duration:this.animationDuration,ease:this.easingFunction,onAnimate:function(Z,ee,ie){var de=e.DoubleAnimator.interpolate(Z.x1,ee.x1,ie),pe=e.DoubleAnimator.interpolate(Z.x2,ee.x2,ie),_e=e.DoubleAnimator.interpolate(Z.y1,ee.y1,ie),Te=e.DoubleAnimator.interpolate(Z.y2,ee.y2,ie);w.visibleRange=new o.NumberRange(de,pe),L.visibleRange=new o.NumberRange(_e,Te);var De=U?K-H*(pe-j)/(j-D):K+H*(de-D)/(j-D);w.startAngle=De,L.startAngle=De,w.totalAngle=H*(pe-de)/(j-D),L.innerRadius=_e/Te}});_.addAnimation(I)}else{w.visibleRange=new o.NumberRange(C,T),L.visibleRange=new o.NumberRange(x,A);var Q=U?K-H*(T-j)/(j-D):K+H*(C-D)/(j-D);w.startAngle=Q,L.startAngle=Q,w.totalAngle=H*(T-C)/(j-D),L.innerRadius=x/A}}},b.prototype.calculateDraggedDistance=function(){var S=Math.pow(this.pointFrom.x-this.pointTo.x,2),_=Math.pow(this.pointFrom.y-this.pointTo.y,2);return Math.sqrt(S+_)},b.prototype.calculateArcOrigin=function(){var S=this.xAxis,_=this.yAxis,C=S.isAngular?_:S,T=C.visibleRange.max-C.visibleRange.min,x=T*(C.innerRadius/(1-C.innerRadius)),A;return C.flippedCoordinates?(A=C.visibleRange.max,C.innerRadius>0&&(A+=x)):(A=C.visibleRange.min,C.innerRadius>0&&(A-=x)),{centerX:0,centerY:A}},b.prototype.handleAddArcAnnotation=function(){var S=this.calculateArcOrigin(),_=S.centerX,C=S.centerY;this.arcAnnotation=new h.PolarArcAnnotation({isHidden:!0,x1:0,x2:1,y2:0,y1:1,centerX:_,centerY:C,stroke:this.stroke,strokeThickness:this.strokeThickness,fill:this.fill,opacity:1,xAxisId:this.xAxisId,yAxisId:this.yAxisId}),this.parentSurface.modifierAnnotations.add(this.arcAnnotation)},b.prototype.handleRemoveArcAnnotation=function(){var S;(S=this.parentSurface)===null||S===void 0||S.modifierAnnotations.remove(this.arcAnnotation,!0),this.arcAnnotation=(0,t.deleteSafe)(this.arcAnnotation)},b.MIN_DRAG_SENSITIVITY=5,b})(p.ChartModifierBase2D);return ux.PolarArcZoomModifier=y,ux}var cx={},zne;function z_e(){if(zne)return cx;zne=1;var r=cx&&cx.__extends||(function(){var x=function(A,w){return x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(L,k){L.__proto__=k}||function(L,k){for(var D in k)Object.prototype.hasOwnProperty.call(k,D)&&(L[D]=k[D])},x(A,w)};return function(A,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");x(A,w);function L(){this.constructor=A}A.prototype=w===null?Object.create(w):(L.prototype=w.prototype,new L)}})();Object.defineProperty(cx,"__esModule",{value:!0}),cx.PolarCursorModifier=void 0;var e=Jn(),i=Yo(),n=xg(),t=$o(),o=bo(),a=wv(),s=Wd(),l=sb(),u=pn(),c=ta(),d=LM(),f=q8(),h=Aa(),p=t_(),g=JV(),v=ZH(),y=H1(),m=ln(),b=Hi(),S=nu(),_=cy(),C=qw(),T=(function(x){r(A,x);function A(w){var L=this,k,D,j,N,V,W,K,H,U,I,Q,Z,ee,ie,de,pe,_e,Te,De,Pe,Ee,Re,je,Ke,ot;return L=x.call(this,w)||this,L.type=o.EChart2DModifierType.PolarCursor,L.tooltipSvgTemplate=C.defaultCursorTooltipSvgTemplate,L.lineThickness=2,L.lineDashArray=[],L.tooltipContainerBackground="#228B22",L.tooltipTextStroke="#fff",L.showTooltip=!1,L.axisLabelStroke="#fff",L.axisLabelFill="#228B22",L.xAxisLabelStroke=void 0,L.xAxisLabelFill=void 0,L.yAxisLabelStroke=void 0,L.yAxisLabelFill=void 0,L.tooltipLegendOffsetX=0,L.tooltipLegendOffsetY=0,L.hitTestRadius=0,L.mousePosition=l.EMousePosition.OutOfCanvas,L.lineColorProperty=m.SciChartSurfaceBase.DEFAULT_THEME.cursorLineBrush,L.tooltipShadowProperty=m.SciChartSurfaceBase.DEFAULT_THEME.shadowEffectColor,L.showRadialLineProperty=!0,L.showCircularLineProperty=!0,L.showAxisLabelsProperty=!0,L.angularAxisLabelPlacementProperty=a.EAngularAxisLabelPlacement.Outer,L.radialAxisLabelPlacementProperty=a.ERadialAxisLabelPlacement.Bottom,w!=null&&w.tooltipSvgTemplate&&typeof w.tooltipSvgTemplate=="string"&&(L.typeMap.set("tooltipSvgTemplate",w.tooltipSvgTemplate),w.tooltipSvgTemplate=(0,e.getFunction)(t.EBaseType.OptionFunction,w.tooltipSvgTemplate)),L.tooltipSvgTemplate=(k=w==null?void 0:w.tooltipSvgTemplate)!==null&&k!==void 0?k:L.tooltipSvgTemplate,L.lineThickness=(D=w==null?void 0:w.lineThickness)!==null&&D!==void 0?D:L.lineThickness,L.lineDashArray=(j=w==null?void 0:w.lineDashArray)!==null&&j!==void 0?j:L.lineDashArray,L.lineColor=(N=w==null?void 0:w.lineColor)!==null&&N!==void 0?N:L.lineColor,L.tooltipContainerBackground=(V=w==null?void 0:w.tooltipContainerBackground)!==null&&V!==void 0?V:L.tooltipContainerBackground,L.tooltipTextStroke=(W=w==null?void 0:w.tooltipTextStroke)!==null&&W!==void 0?W:L.tooltipTextStroke,L.tooltipShadow=(K=w==null?void 0:w.tooltipShadow)!==null&&K!==void 0?K:L.tooltipShadowProperty,L.showTooltip=(H=w==null?void 0:w.showTooltip)!==null&&H!==void 0?H:L.showTooltip,L.showAxisLabels=(U=w==null?void 0:w.showAxisLabels)!==null&&U!==void 0?U:L.showAxisLabels,L.axisLabelFill=(I=w==null?void 0:w.axisLabelFill)!==null&&I!==void 0?I:L.axisLabelFill,L.axisLabelStroke=(Q=w==null?void 0:w.axisLabelStroke)!==null&&Q!==void 0?Q:L.axisLabelStroke,L.angularAxisLabelPlacement=(Z=w==null?void 0:w.angularAxisLabelPlacement)!==null&&Z!==void 0?Z:L.angularAxisLabelPlacementProperty,L.radialAxisLabelPlacement=(ee=w==null?void 0:w.radialAxisLabelPlacement)!==null&&ee!==void 0?ee:L.radialAxisLabelPlacementProperty,L.xAxisLabelStroke=(ie=w==null?void 0:w.xAxisLabelStroke)!==null&&ie!==void 0?ie:L.xAxisLabelStroke,L.xAxisLabelFill=(de=w==null?void 0:w.xAxisLabelFill)!==null&&de!==void 0?de:L.xAxisLabelFill,L.yAxisLabelStroke=(pe=w==null?void 0:w.yAxisLabelStroke)!==null&&pe!==void 0?pe:L.yAxisLabelStroke,L.yAxisLabelFill=(_e=w==null?void 0:w.yAxisLabelFill)!==null&&_e!==void 0?_e:L.yAxisLabelFill,L.placementDivIdProperty=(Te=w==null?void 0:w.placementDivId)!==null&&Te!==void 0?Te:L.placementDivIdProperty,w!=null&&w.tooltipLegendTemplate&&typeof w.tooltipLegendTemplate=="string"&&(L.typeMap.set("tooltipLegendTemplate",w.tooltipLegendTemplate),w.tooltipLegendTemplate=(0,e.getFunction)(t.EBaseType.OptionFunction,w.tooltipLegendTemplate)),L.tooltipLegendTemplate=(De=w==null?void 0:w.tooltipLegendTemplate)!==null&&De!==void 0?De:L.tooltipLegendTemplate,L.tooltipLegendOffsetX=(Pe=w==null?void 0:w.tooltipLegendOffsetX)!==null&&Pe!==void 0?Pe:L.tooltipLegendOffsetX,L.tooltipLegendOffsetY=(Ee=w==null?void 0:w.tooltipLegendOffsetY)!==null&&Ee!==void 0?Ee:L.tooltipLegendOffsetY,w!=null&&w.tooltipDataTemplate&&typeof w.tooltipDataTemplate=="string"&&(L.typeMap.set("tooltipDataTemplate",w.tooltipDataTemplate),w.tooltipDataTemplate=(0,e.getFunction)(t.EBaseType.OptionFunction,w.tooltipDataTemplate)),L.tooltipDataTemplateProperty=(Re=w==null?void 0:w.tooltipDataTemplate)!==null&&Re!==void 0?Re:L.tooltipDataTemplateProperty,L.showRadialLine=(je=w==null?void 0:w.showRadialLine)!==null&&je!==void 0?je:L.showRadialLine,L.showCircularLine=(Ke=w==null?void 0:w.showCircularLine)!==null&&Ke!==void 0?Ke:L.showCircularLine,L.hitTestRadius=(ot=w==null?void 0:w.hitTestRadius)!==null&&ot!==void 0?ot:L.hitTestRadius,L}return Object.defineProperty(A.prototype,"modifierType",{get:function(){return s.EModifierType.Chart2DPolarModifier},enumerable:!1,configurable:!0}),A.prototype.applyTheme=function(w){this.testPropertyChanged(_.PROPERTY.CROSSHAIR_STROKE)||(this.lineColor=w.cursorLineBrush),this.testPropertyChanged(_.PROPERTY.TOOLTIP_SHADOW)||(this.tooltipShadow=w.shadowEffectColor)},A.prototype.onAttach=function(){var w;x.prototype.onAttach.call(this),this.showRadialLine&&this.handleAddRadialLine(),this.showCircularLine&&this.handleAddCircularLine(),this.showRadialLine&&this.handleAddRadialLabel(),this.showCircularLine&&this.handleAddCircularLabel(),this.tooltipAnnotation=new f.CursorTooltipSvgAnnotation({cursorModifier:this,xCoordinateMode:c.ECoordinateMode.Pixel,yCoordinateMode:c.ECoordinateMode.Pixel,tooltipSvgTemplate:(w=this.tooltipSvgTemplate)!==null&&w!==void 0?w:C.defaultCursorTooltipSvgTemplate,containerBackground:this.tooltipContainerBackground,textStroke:this.tooltipTextStroke,tooltipLegendTemplate:this.tooltipLegendTemplate,tooltipLegendOffsetX:this.tooltipLegendOffsetX,tooltipLegendOffsetY:this.tooltipLegendOffsetY,xAxisId:this.xAxisId,yAxisId:this.yAxisId,placementDivId:this.placementDivId}),this.parentSurface.modifierAnnotations.add(this.tooltipAnnotation)},A.prototype.onDetach=function(){x.prototype.onDetach.call(this),this.radialAnnotation&&(this.handleRemoveRadialLine(),this.handleRemoveRadialLabel()),this.circularAnnotation&&(this.handleRemoveCircularLine(),this.handleRemoveCircularLabel()),this.parentSurface.modifierAnnotations.remove(this.tooltipAnnotation,!0)},A.prototype.onAttachSeries=function(w){this.tooltipAnnotation.seriesInfos=this.getSeriesInfos()},A.prototype.onDetachSeries=function(w){this.tooltipAnnotation.seriesInfos=this.getSeriesInfos()},A.prototype.modifierMouseMove=function(w){if(!(this.parentSurface.isSubSurface&&!w.isActiveSubChartEvent)){this.activePointerEvents.set(w.pointerId,w),x.prototype.modifierMouseMove.call(this,w);var L;this.mousePoint?(L=(0,u.translateFromCanvasToSeriesViewRect)(this.mousePoint,this.parentSurface.seriesViewRect),L?this.mousePosition=l.EMousePosition.SeriesArea:this.mousePosition=l.EMousePosition.AxisArea):this.mousePosition=l.EMousePosition.OutOfCanvas;var k=this.getIsActionAllowed(w);k&&this.update()}},A.prototype.modifierMouseLeave=function(w){x.prototype.modifierMouseLeave.call(this,w),this.mousePosition=l.EMousePosition.OutOfCanvas,this.update()},A.prototype.onParentSurfaceRendered=function(){this.update()},Object.defineProperty(A.prototype,"lineColor",{get:function(){return this.lineColorProperty},set:function(w){this.lineColorProperty!==w&&(this.lineColorProperty=w,this.notifyPropertyChanged(_.PROPERTY.CROSSHAIR_STROKE))},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"tooltipShadow",{get:function(){return this.tooltipShadowProperty},set:function(w){this.tooltipShadowProperty!==w&&(this.tooltipShadowProperty=w,this.notifyPropertyChanged(_.PROPERTY.TOOLTIP_SHADOW))},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"showRadialLine",{get:function(){return this.showRadialLineProperty},set:function(w){this.showRadialLineProperty!==w&&(this.showRadialLineProperty=w,this.showRadialLineProperty&&!this.radialAnnotation?(this.handleAddRadialLine(),this.handleRemoveCircularLabel(),this.handleAddCircularLabel(),this.handleAddRadialLabel()):!this.showRadialLineProperty&&this.radialAnnotation&&(this.handleRemoveRadialLine(),this.handleRemoveRadialLabel()),this.notifyPropertyChanged(_.PROPERTY.X_LINE))},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"showCircularLine",{get:function(){return this.showCircularLineProperty},set:function(w){this.showCircularLineProperty!==w&&(this.showCircularLineProperty=w,this.showCircularLineProperty&&!this.circularAnnotation?(this.handleAddCircularLine(),this.handleRemoveRadialLabel(),this.handleAddRadialLabel(),this.handleAddCircularLabel()):!this.showCircularLineProperty&&this.circularAnnotation&&(this.handleRemoveCircularLine(),this.handleRemoveCircularLabel()),this.notifyPropertyChanged(_.PROPERTY.Y_LINE))},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"showAxisLabels",{get:function(){return this.showAxisLabelsProperty},set:function(w){this.showAxisLabelsProperty!==w&&(this.showAxisLabelsProperty=w,this.notifyPropertyChanged(_.PROPERTY.AXIS_LABELS))},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"angularAxisLabelPlacement",{get:function(){return this.angularAxisLabelPlacementProperty},set:function(w){this.angularAxisLabelPlacementProperty!==w&&(this.angularAxisLabelPlacementProperty=w,this.notifyPropertyChanged(_.PROPERTY.ANGULAR_AXIS_LABELS_PLACEMENT))},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"radialAxisLabelPlacement",{get:function(){return this.radialAxisLabelPlacementProperty},set:function(w){this.radialAxisLabelPlacementProperty!==w&&(this.radialAxisLabelPlacementProperty=w,this.notifyPropertyChanged(_.PROPERTY.RADIAL_AXIS_LABELS_PLACEMENT))},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"placementDivId",{get:function(){return this.placementDivIdProperty},set:function(w){this.placementDivIdProperty!==w&&(this.placementDivIdProperty=w,this.notifyPropertyChanged(_.PROPERTY.PLACEMENT_DIV_ID))},enumerable:!1,configurable:!0}),A.prototype.includeSeries=function(w,L){return x.prototype.includeSeries.call(this,w,L)?(this.tooltipAnnotation.seriesInfos=this.getSeriesInfos(),!0):!1},Object.defineProperty(A.prototype,"tooltipDataTemplate",{get:function(){return this.tooltipDataTemplateProperty},set:function(w){this.tooltipDataTemplateProperty=w,this.notifyPropertyChanged(_.PROPERTY.TOOLTIP_DATA_TEMPLATE)},enumerable:!1,configurable:!0}),A.prototype.hitTestRenderableSeries=function(w,L){if(L)return this.hitTestRadius<=0?w.hitTestProvider.hitTestXSlice(L.x,L.y):w.hitTestProvider.hitTestDataPoint(L.x,L.y,this.hitTestRadius)},A.prototype.getMousePosition=function(){return this.mousePosition},A.prototype.toJSON=function(){var w=x.prototype.toJSON.call(this),L={axisLabelFill:this.axisLabelFill,axisLabelStroke:this.axisLabelStroke,angularAxisLabelPlacement:this.angularAxisLabelPlacement,radialAxisLabelPlacement:this.radialAxisLabelPlacement,xAxisLabelFill:this.xAxisLabelFill,xAxisLabelStroke:this.xAxisLabelStroke,yAxisLabelFill:this.yAxisLabelFill,yAxisLabelStroke:this.yAxisLabelStroke,lineColor:this.lineColor,lineDashArray:this.lineDashArray,lineThickness:this.lineThickness,hitTestRadius:this.hitTestRadius,placementDivId:this.placementDivId,showAxisLabels:this.showAxisLabels,showTooltip:this.showTooltip,showRadialLine:this.showRadialLine,showCircularLine:this.showCircularLine,tooltipContainerBackground:this.tooltipContainerBackground,tooltipDataTemplate:this.typeMap.get("tooltipDataTemplate"),tooltipLegendOffsetX:this.tooltipLegendOffsetX,tooltipLegendOffsetY:this.tooltipLegendOffsetY,tooltipLegendTemplate:this.typeMap.get("tooltipLegendTemplate"),tooltipSvgTemplate:this.typeMap.get("tooltipSvgTemplate"),tooltipTextStroke:this.tooltipTextStroke,tooltipShadow:this.tooltipShadow};return Object.assign(w.options,L),w},A.prototype.notifyPropertyChanged=function(w){x.prototype.notifyPropertyChanged.call(this,w),w===_.PROPERTY.X_AXIS_ID&&(this.tooltipAnnotation&&(this.tooltipAnnotation.xAxisId=this.xAxisId),this.radialAnnotation&&(this.radialAnnotation.xAxisId=this.xAxisId,this.angularAxisLabelAnnotation.xAxisId=this.xAxisId),this.circularAnnotation&&(this.circularAnnotation.xAxisId=this.xAxisId,this.radialAxisLabelAnnotation.xAxisId=this.xAxisId)),w===_.PROPERTY.Y_AXIS_ID&&(this.tooltipAnnotation&&(this.tooltipAnnotation.yAxisId=this.yAxisId),this.radialAnnotation&&(this.radialAnnotation.yAxisId=this.yAxisId,this.angularAxisLabelAnnotation.yAxisId=this.yAxisId),this.circularAnnotation&&(this.circularAnnotation.yAxisId=this.yAxisId,this.radialAxisLabelAnnotation.yAxisId=this.yAxisId))},A.prototype.getSeriesInfos=function(){var w=this;return this.getIncludedRenderableSeries().map(function(L){var k=w.hitTestRenderableSeries(L,w.mousePoint);if(k)return L.getSeriesInfo(k)}).filter(function(L){return L!==void 0})},A.prototype.update=function(){if(this.mousePosition!==l.EMousePosition.SeriesArea){this.radialAnnotation&&(this.radialAnnotation.isHidden=!0,this.angularAxisLabelAnnotation.isHidden=!0),this.circularAnnotation&&(this.circularAnnotation.isHidden=!0,this.radialAxisLabelAnnotation.isHidden=!0),this.tooltipAnnotation&&(this.tooltipAnnotation.isHidden=!0,this.tooltipAnnotation.seriesInfos=[],this.placementDivId&&this.tooltipAnnotation.delete());return}var w=(0,u.translateFromCanvasToSeriesViewRect)(this.mousePoint,this.parentSurface.seriesViewRect);if(w){var L=w.x,k=w.y,D=this.xAxis,j=this.yAxis,N=D.reverseTransform(L,k);if(N.x>D.totalAngle){this.radialAnnotation.isHidden=!0,this.angularAxisLabelAnnotation.isHidden=!0,this.circularAnnotation.isHidden=!0,this.radialAxisLabelAnnotation.isHidden=!0,this.tooltipAnnotation.isHidden=!0;return}this.radialAnnotation&&(this.radialAnnotation.isHidden=!1,this.angularAxisLabelAnnotation.isHidden=!this.showAxisLabels),this.circularAnnotation&&(this.circularAnnotation.isHidden=!1,this.radialAxisLabelAnnotation.isHidden=!this.showAxisLabels),this.tooltipAnnotation.isHidden=!1,this.tooltipAnnotation.showTooltip=this.showTooltip;var V=j.getAxisSize(),W=D.getCurrentCoordinateCalculator(),K=j.getCurrentCoordinateCalculator();if(this.radialAnnotation){var H=W.getDataValue(N.x);this.radialAnnotation.x1=0,this.radialAnnotation.y1=0,this.radialAnnotation.x2=N.x,this.radialAnnotation.y2=V/b.DpiHelper.PIXEL_RATIO,this.angularAxisLabelAnnotation.x1=N.x,this.angularAxisLabelAnnotation.y1=V/b.DpiHelper.PIXEL_RATIO,this.angularAxisLabelAnnotation.text=H.toFixed(3);var U=y.labelHelper.getLabelRotationAndPlacementForAngularAxis(N.x+D.startAngle,D.polarLabelMode,this.angularAxisLabelPlacement),I=U.resultAngle,Q=U.horizontalAnchorPoint,Z=U.verticalAnchorPoint;this.angularAxisLabelAnnotation.verticalAnchorPoint=Z,this.angularAxisLabelAnnotation.horizontalAnchorPoint=Q,this.angularAxisLabelAnnotation.rotation=I}if(this.circularAnnotation){var ee=Math.min(N.y,V),ie=K.getDataValue(ee),de=this.circularAnnotation,pe=W.isFlipped;de.y1=K.getDataValue(ee),de.x1=pe?W.getDataValue(D.totalAngle-.001):W.getDataValue(0),de.x2=pe?W.getDataValue(0):W.getDataValue(D.totalAngle-.001),this.radialAxisLabelAnnotation.x1=j.startAngle-D.startAngle,this.radialAxisLabelAnnotation.y1=ee/b.DpiHelper.PIXEL_RATIO,this.radialAxisLabelAnnotation.text=ie.toFixed(3),this.radialAxisLabelAnnotation.verticalAnchorPoint=y.labelHelper.getLabelPlacementForRadialAxis(this.radialAxisLabelPlacement),this.radialAxisLabelAnnotation.horizontalAnchorPoint=n.EHorizontalAnchorPoint.Center,this.radialAxisLabelAnnotation.rotation=0}this.showTooltip&&(this.tooltipAnnotation.x1=(0,u.translateToNotScaled)(w.x),this.tooltipAnnotation.y1=(0,u.translateToNotScaled)(w.y)),(this.showTooltip||this.tooltipLegendTemplate)&&(this.tooltipAnnotation.seriesInfos=this.getSeriesInfos())}},A.prototype.newLineAnnotation=function(w,L){return new p.LineAnnotation({xCoordinateMode:c.ECoordinateMode.Pixel,yCoordinateMode:c.ECoordinateMode.Pixel,strokeThickness:this.lineThickness,strokeDashArray:this.lineDashArray,stroke:this.lineColor,isHidden:!0,showLabel:this.showAxisLabels,axisLabelFill:w,axisLabelStroke:L,xAxisId:this.xAxisId,yAxisId:this.yAxisId})},A.prototype.newNativeTextAnnotation=function(w,L){return new g.NativeTextAnnotation({isHidden:!0,xCoordinateMode:c.ECoordinateMode.Pixel,yCoordinateMode:c.ECoordinateMode.Pixel,fontSize:18,textColor:L,background:w,padding:i.Thickness.fromNumber(4),isEditable:!1,annotationLayer:h.EAnnotationLayer.AboveChart,clipping:d.EAnnotationClippingMode.Chart})},A.prototype.newArcAnnotation=function(w,L){return new v.PolarArcAnnotation({isHidden:!0,y2:0,stroke:this.lineColor,strokeThickness:this.lineThickness,xAxisId:this.xAxisId,yAxisId:this.yAxisId,isLineMode:!0})},A.prototype.isVerticalChart=function(){var w,L;return(L=(w=this.xAxis)===null||w===void 0?void 0:w.isVerticalChart)!==null&&L!==void 0?L:!1},A.prototype.handleAddRadialLine=function(){var w,L,k=(w=this.xAxisLabelFill)!==null&&w!==void 0?w:this.axisLabelFill,D=(L=this.xAxisLabelStroke)!==null&&L!==void 0?L:this.axisLabelStroke;this.radialAnnotation=this.newLineAnnotation(k,D),this.parentSurface.modifierAnnotations.add(this.radialAnnotation)},A.prototype.handleRemoveRadialLine=function(){this.parentSurface.modifierAnnotations.remove(this.radialAnnotation,!0),this.radialAnnotation=void 0},A.prototype.handleAddRadialLabel=function(){var w,L,k=(w=this.xAxisLabelFill)!==null&&w!==void 0?w:this.axisLabelFill,D=(L=this.xAxisLabelStroke)!==null&&L!==void 0?L:this.axisLabelStroke;this.angularAxisLabelAnnotation=this.newNativeTextAnnotation(k,D),this.parentSurface.modifierAnnotations.add(this.angularAxisLabelAnnotation)},A.prototype.handleRemoveRadialLabel=function(){this.parentSurface.modifierAnnotations.remove(this.angularAxisLabelAnnotation,!0),this.angularAxisLabelAnnotation=void 0},A.prototype.handleAddCircularLine=function(){var w,L,k=(w=this.yAxisLabelFill)!==null&&w!==void 0?w:this.axisLabelFill,D=(L=this.yAxisLabelStroke)!==null&&L!==void 0?L:this.axisLabelStroke;this.circularAnnotation=this.newArcAnnotation(k,D),this.parentSurface.modifierAnnotations.add(this.circularAnnotation)},A.prototype.handleRemoveCircularLine=function(){this.parentSurface.modifierAnnotations.remove(this.circularAnnotation,!0),this.circularAnnotation=void 0},A.prototype.handleAddCircularLabel=function(){var w,L,k=(w=this.yAxisLabelFill)!==null&&w!==void 0?w:this.axisLabelFill,D=(L=this.yAxisLabelStroke)!==null&&L!==void 0?L:this.axisLabelStroke;this.radialAxisLabelAnnotation=this.newNativeTextAnnotation(k,D),this.parentSurface.modifierAnnotations.add(this.radialAxisLabelAnnotation)},A.prototype.handleRemoveCircularLabel=function(){this.parentSurface.modifierAnnotations.remove(this.radialAxisLabelAnnotation,!0),this.radialAxisLabelAnnotation=void 0},A})(S.ChartModifierBase2D);return cx.PolarCursorModifier=T,cx}var dx={},Wne;function W_e(){if(Wne)return dx;Wne=1;var r=dx&&dx.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(dx,"__esModule",{value:!0}),dx.PolarDataPointSelectionModifier=void 0;var e=bo(),i=Wd(),n=t3(),t=(function(o){r(a,o);function a(s){var l=o.call(this,s)||this;return l.type=e.EChart2DModifierType.PolarDataPointSelection,l}return Object.defineProperty(a.prototype,"modifierType",{get:function(){return i.EModifierType.Chart2DPolarModifier},enumerable:!1,configurable:!0}),a})(n.DataPointSelectionModifier);return dx.PolarDataPointSelectionModifier=t,dx}var fx={},Gne;function G_e(){if(Gne)return fx;Gne=1;var r=fx&&fx.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(fx,"__esModule",{value:!0}),fx.PolarSeriesSelectionModifier=void 0;var e=bo(),i=Wd(),n=eX(),t=(function(o){r(a,o);function a(s){var l=o.call(this,s)||this;return l.type=e.EChart2DModifierType.PolarSeriesSelection,l}return Object.defineProperty(a.prototype,"modifierType",{get:function(){return i.EModifierType.Chart2DPolarModifier},enumerable:!1,configurable:!0}),a})(n.SeriesSelectionModifier);return fx.PolarSeriesSelectionModifier=t,fx}var hx={},Yne;function Y_e(){if(Yne)return hx;Yne=1;var r=hx&&hx.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(hx,"__esModule",{value:!0}),hx.PolarLegendModifier=void 0;var e=bo(),i=Wd(),n=J8(),t=(function(o){r(a,o);function a(s){var l=o.call(this,s)||this;return l.type=e.EChart2DModifierType.PolarLegend,l}return Object.defineProperty(a.prototype,"modifierType",{get:function(){return i.EModifierType.Chart2DPolarModifier},enumerable:!1,configurable:!0}),a})(n.LegendModifier);return hx.PolarLegendModifier=t,hx}var Jm={},$ne;function $_e(){if($ne)return Jm;$ne=1;var r=Jm&&Jm.__extends||(function(){var u=function(c,d){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,h){f.__proto__=h}||function(f,h){for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(f[p]=h[p])},u(c,d)};return function(c,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");u(c,d);function f(){this.constructor=c}c.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}})(),e=Jm&&Jm.__rest||function(u,c){var d={};for(var f in u)Object.prototype.hasOwnProperty.call(u,f)&&c.indexOf(f)<0&&(d[f]=u[f]);if(u!=null&&typeof Object.getOwnPropertySymbols=="function")for(var h=0,f=Object.getOwnPropertySymbols(u);h<f.length;h++)c.indexOf(f[h])<0&&Object.prototype.propertyIsEnumerable.call(u,f[h])&&(d[f[h]]=u[f[h]]);return d};Object.defineProperty(Jm,"__esModule",{value:!0}),Jm.PolarMouseWheelZoomModifier=void 0;var i=bo(),n=Wd(),t=Os(),o=Y1(),a=r3(),s=oi(),l=(function(u){r(c,u);function c(d){var f=this,h,p,g,v,y=d??{};y.executeCondition,y.secondaryExecuteCondition;var m=e(y,["executeCondition","secondaryExecuteCondition"]);return f=u.call(this,m)||this,f.type=i.EChart2DModifierType.PolarMouseWheelZoom,f.defaultActionType=a.EActionType.Zoom,f.zoomSize=!0,f.defaultActionType=(h=d==null?void 0:d.defaultActionType)!==null&&h!==void 0?h:f.defaultActionType,f.executeCondition=(p=d==null?void 0:d.executeCondition)!==null&&p!==void 0?p:{key:o.EModifierMouseArgKey.None},f.secondaryExecuteCondition=(g=d==null?void 0:d.secondaryExecuteCondition)!==null&&g!==void 0?g:{key:o.EModifierMouseArgKey.Ctrl},f.zoomSize=(v=d==null?void 0:d.zoomSize)!==null&&v!==void 0?v:f.zoomSize,f}return Object.defineProperty(c.prototype,"modifierType",{get:function(){return n.EModifierType.Chart2DPolarModifier},enumerable:!1,configurable:!0}),c.prototype.modifierMouseWheel=function(d){var f=this.checkExecuteConditions(d),h=f.isPrimary,p=f.isSecondary;h?this.actionType=this.defaultActionType:p?this.actionType=this.defaultActionType===a.EActionType.Pan?a.EActionType.Zoom:a.EActionType.Pan:this.actionType=void 0,this.xyDirection=t.EXyDirection.XyDirection,u.prototype.modifierMouseWheel.call(this,d)},c.prototype.performPan=function(d){var f=this,h=!1;return[t.EXyDirection.XDirection,t.EXyDirection.XyDirection].includes(this.xyDirection)&&this.getIncludedXAxis().forEach(function(p){var g=Math.PI,v=d*f.growFactor*g;p.startAngle+=v,h=!0}),[t.EXyDirection.YDirection,t.EXyDirection.XyDirection].includes(this.xyDirection)&&this.getIncludedYAxis().forEach(function(p){var g=Math.PI,v=d*f.growFactor*g;p.startAngle+=v,h=!0}),h},c.prototype.toJSON=function(){var d=u.prototype.toJSON.call(this),f={zoomSize:this.zoomSize,defaultActionType:this.defaultActionType};return Object.assign(d.options,f),d},c.prototype.growBy=function(d,f,h){var p=f;if(!p.isAngular)if(this.zoomSize)p.lengthScale-=h;else{var g=p.visibleRange,v=g.min,y=g.max,m=y*(1+h);p.visibleRange=new s.NumberRange(v,m)}},c})(a.MouseWheelZoomModifier);return Jm.PolarMouseWheelZoomModifier=l,Jm}var px={},qne;function q_e(){if(qne)return px;qne=1;var r=px&&px.__extends||(function(){var d=function(f,h){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,g){p.__proto__=g}||function(p,g){for(var v in g)Object.prototype.hasOwnProperty.call(g,v)&&(p[v]=g[v])},d(f,h)};return function(f,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");d(f,h);function p(){this.constructor=f}f.prototype=h===null?Object.create(h):(p.prototype=h.prototype,new p)}})();Object.defineProperty(px,"__esModule",{value:!0}),px.PolarZoomExtentsModifier=void 0;var e=cU(),i=hc(),n=JF(),t=Ii(),o=bo(),a=Wd(),s=Os(),l=ty(),u=iX(),c=(function(d){r(f,d);function f(h){var p=this,g,v,y,m,b,S;return p=d.call(this,h)||this,p.type=o.EChart2DModifierType.PolarZoomExtents,p.resetRanges=!0,p.resetStartAngles=!0,p.resetTotalAngle=!0,p.resetLengthScale=!0,p.resetCenterPoint=!0,p.resetInnerRadius=!0,p.xStartAngle=h==null?void 0:h.xStartAngle,p.yStartAngle=h==null?void 0:h.yStartAngle,p.totalAngle=h==null?void 0:h.totalAngle,p.lengthScale=h==null?void 0:h.lengthScale,p.centerPoint=h==null?void 0:h.centerPoint,p.innerRadius=h==null?void 0:h.innerRadius,p.resetRanges=(g=h==null?void 0:h.resetRanges)!==null&&g!==void 0?g:p.resetRanges,p.resetStartAngles=(v=h==null?void 0:h.resetStartAngles)!==null&&v!==void 0?v:p.resetStartAngles,p.resetTotalAngle=(y=h==null?void 0:h.resetTotalAngle)!==null&&y!==void 0?y:p.resetTotalAngle,p.resetLengthScale=(m=h==null?void 0:h.resetLengthScale)!==null&&m!==void 0?m:p.resetLengthScale,p.resetCenterPoint=(b=h==null?void 0:h.resetCenterPoint)!==null&&b!==void 0?b:p.resetCenterPoint,p.resetInnerRadius=(S=h==null?void 0:h.resetInnerRadius)!==null&&S!==void 0?S:p.resetInnerRadius,h!=null&&h.easingFunction||(p.easingFunction=i.easing.outCubic),p}return Object.defineProperty(f.prototype,"modifierType",{get:function(){return a.EModifierType.Chart2DPolarModifier},enumerable:!1,configurable:!0}),f.prototype.getAngularAxis=function(){var h=this.xAxis;return h.isAngular?h:this.yAxis},f.prototype.getRadialAxis=function(){var h=this.yAxis;return h.isAngular?this.xAxis:h},f.prototype.onAttach=function(){d.prototype.onAttach.call(this);var h=this.xAxis,p=this.yAxis;this.xStartAngle===void 0&&(this.xStartAngle=h.startAngle),this.yStartAngle===void 0&&(this.yStartAngle=p.startAngle),this.totalAngle===void 0&&(this.totalAngle=this.getAngularAxis().totalAngle),this.lengthScale===void 0&&(this.lengthScale=this.getRadialAxis().lengthScale),this.centerPoint===void 0&&(this.centerPoint=new t.Point(h.xCenterOffset,h.yCenterOffset)),this.innerRadius===void 0&&(this.innerRadius=this.getRadialAxis().innerRadius)},f.prototype.modifierDoubleClick=function(h){var p=this,g=this.parentSurface;if(g){var v=this.xAxis,y=this.yAxis;if(this.resetRanges&&(!this.onZoomExtents||this.onZoomExtents(g)))switch(this.xyDirection){case s.EXyDirection.XyDirection:g.zoomExtents(this.animationDuration,this.easingFunction,function(){return g.setZoomState(l.EZoomState.AtExtents)});break;case s.EXyDirection.XDirection:g.zoomExtentsX(this.animationDuration,this.easingFunction);break;case s.EXyDirection.YDirection:g.zoomExtentsY(this.animationDuration,this.easingFunction);break}var m=v.startAngle,b=y.startAngle,S=this.getAngularAxis().totalAngle,_=this.resetStartAngles?this.xStartAngle:m,C=this.resetStartAngles?this.yStartAngle:b,T=this.resetTotalAngle?this.totalAngle:S,x=this.getRadialAxis().lengthScale,A=this.resetLengthScale?this.lengthScale:x,w=v.xCenterOffset,L=v.yCenterOffset,k=this.resetCenterPoint?this.centerPoint.x:w,D=this.resetCenterPoint?this.centerPoint.y:L,j=this.getRadialAxis().innerRadius,N=this.resetInnerRadius?this.innerRadius:j,V=this.isAnimated?this.animationDuration:0,W=this.easingFunction;h.handled=!0;var K=new n.GenericAnimation({from:{xStartAngle:m,yStartAngle:b,totalAngle:S,lengthScale:x,xAxisXCenterOffset:w,xAxisYCenterOffset:L,innerRadius:j},to:{xStartAngle:_,yStartAngle:C,totalAngle:T,lengthScale:A,xAxisXCenterOffset:k,xAxisYCenterOffset:D,innerRadius:N},duration:V,ease:W,onAnimate:function(H,U,I){var Q=e.DoubleAnimator.interpolate(H.xStartAngle,U.xStartAngle,I),Z=e.DoubleAnimator.interpolate(H.yStartAngle,U.yStartAngle,I),ee=e.DoubleAnimator.interpolate(H.totalAngle,U.totalAngle,I),ie=e.DoubleAnimator.interpolate(H.lengthScale,U.lengthScale,I);v.startAngle=Q,y.startAngle=Z;var de=p.getAngularAxis();de.totalAngle=ee,p.getRadialAxis().lengthScale=ie;var pe=e.DoubleAnimator.interpolate(H.xAxisXCenterOffset,U.xAxisXCenterOffset,I),_e=e.DoubleAnimator.interpolate(H.xAxisYCenterOffset,U.xAxisYCenterOffset,I),Te=e.DoubleAnimator.interpolate(H.innerRadius,U.innerRadius,I);de.xCenterOffset=pe,de.yCenterOffset=_e,p.getRadialAxis().innerRadius=Te}});g.addAnimation(K)}},f.prototype.toJSON=function(){var h=d.prototype.toJSON.call(this),p={centerPoint:this.centerPoint,innerRadius:this.innerRadius,lengthScale:this.lengthScale,resetCenterPoint:this.resetCenterPoint,resetInnerRadius:this.resetInnerRadius,resetLengthScale:this.resetLengthScale,resetRanges:this.resetRanges,resetStartAngles:this.resetStartAngles,resetTotalAngle:this.resetTotalAngle,totalAngle:this.totalAngle,xStartAngle:this.xStartAngle,yStartAngle:this.yStartAngle};return Object.assign(h.options,p),h},f})(u.ZoomExtentsModifier);return px.PolarZoomExtentsModifier=c,px}var qI={},Xne;function SY(){return Xne||(Xne=1,(function(r){var e=qI&&qI.__extends||(function(){var h=function(p,g){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var m in y)Object.prototype.hasOwnProperty.call(y,m)&&(v[m]=y[m])},h(p,g)};return function(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");h(p,g);function v(){this.constructor=p}p.prototype=g===null?Object.create(g):(v.prototype=g.prototype,new v)}})();Object.defineProperty(r,"__esModule",{value:!0}),r.PolarPanModifier=r.EPolarPanModifierPanMode=void 0;var i=oi(),n=uy(),t=Y1(),o=bo(),a=Wd(),s=Os(),l=ty(),u=pn(),c=uU(),d;(function(h){h.PolarStartAngle="PolarStartAngle",h.PolarVisibleRange="PolarVisibleRange",h.Cartesian="Cartesian"})(d=r.EPolarPanModifierPanMode||(r.EPolarPanModifierPanMode={}));var f=(function(h){e(p,h);function p(g){var v=this,y,m,b,S,_,C;return v=h.call(this,g)||this,v.primaryPanMode=d.Cartesian,v.secondaryPanMode=d.PolarStartAngle,v.growFactor=1,v.zoomSize=!0,v.type=o.EChart2DModifierType.PolarPan,v.primaryPanMode=(y=g==null?void 0:g.primaryPanMode)!==null&&y!==void 0?y:v.primaryPanMode,v.secondaryPanMode=(m=g==null?void 0:g.secondaryPanMode)!==null&&m!==void 0?m:v.secondaryPanMode,v.growFactor=(b=g==null?void 0:g.growFactor)!==null&&b!==void 0?b:v.growFactor,v.executeCondition=(S=g==null?void 0:g.executeCondition)!==null&&S!==void 0?S:{button:n.EExecuteOn.MouseLeftButton,key:t.EModifierMouseArgKey.None},v.secondaryExecuteCondition=(_=g==null?void 0:g.secondaryExecuteCondition)!==null&&_!==void 0?_:{button:n.EExecuteOn.MouseRightButton,key:t.EModifierMouseArgKey.None},v.zoomSize=(C=g==null?void 0:g.zoomSize)!==null&&C!==void 0?C:v.zoomSize,v}return Object.defineProperty(p.prototype,"modifierType",{get:function(){return a.EModifierType.Chart2DPolarModifier},enumerable:!1,configurable:!0}),p.prototype.modifierMouseDown=function(g){g.nativeEvent.preventDefault();var v=this.checkExecuteConditions(g),y=v.isPrimary,m=v.isSecondary;if(y?this.panMode=this.primaryPanMode:m?this.panMode=this.secondaryPanMode:this.panMode=void 0,!!this.panMode){if(!this.isAttached)throw new Error("Should not call PolarPanModifier.modifierMouseDown if not attached");var b=(0,u.translateFromCanvasToSeriesViewRect)(g.mousePoint,this.parentSurface.seriesViewRect);b&&(this.activePointerEvents.set(g.pointerId,g),this.parentSurface.setZoomState(l.EZoomState.UserZooming))}},p.prototype.modifierMouseMove=function(g){if(!(this.parentSurface.isSubSurface&&!g.isActiveSubChartEvent)&&(this.updatePointerInfo(g),!!this.previousPoint)){var v=this.getIsActionAllowed(g);v&&(this.panMode===d.Cartesian?this.performCartesianPan(g):this.panMode===d.PolarStartAngle?this.performPolarPan(!0,this.zoomSize):this.panMode===d.PolarVisibleRange&&this.performPolarPan(!1,this.zoomSize))}},p.prototype.modifierPointerCancel=function(g){h.prototype.modifierPointerCancel.call(this,g),this.activePointerEvents.clear()},p.prototype.modifierMouseUp=function(g){h.prototype.modifierMouseUp.call(this,g),this.panMode=void 0},p.prototype.toJSON=function(){var g=h.prototype.toJSON.call(this),v={primaryPanMode:this.primaryPanMode,secondaryPanMode:this.secondaryPanMode,growFactor:this.growFactor,zoomSize:this.zoomSize};return Object.assign(g.options,v),g},p.prototype.getIsActionAllowed=function(g){var v=this.activePointerEvents.values().next().value;return v.pointerId===g.pointerId},p.prototype.performCartesianPan=function(g){var v=g.mousePoint,y=v.x-this.previousPoint.x,m=this.previousPoint.y-v.y;this.xyDirection===s.EXyDirection.XDirection&&(m=0),this.xyDirection===s.EXyDirection.YDirection&&(y=0),this.getIncludedXAxis().forEach(function(b){if(b.isPolarAxis){var S=b;S.isAngular&&(S.xCenterOffset+=y,S.yCenterOffset-=m)}}),this.getIncludedYAxis().forEach(function(b){if(b.isPolarAxis){var S=b;S.isAngular&&(S.xCenterOffset+=y,S.yCenterOffset-=m)}})},p.prototype.performPolarPan=function(g,v){var y=this,m=this.parentSurface.seriesViewRect,b=(0,u.translateFromCanvasToSeriesViewRect)(this.previousPoint,m),S=(0,u.translateFromCanvasToSeriesViewRect)(this.mousePoint,m);b&&S&&this.getIncludedXAxis().forEach(function(_){if(_.isPolarAxis){var C=_,T=C.otherAxis;if(C.isAngular){var x=C.reverseTransform(b.x,b.y),A=C.reverseTransform(S.x,S.y),w=A.x-x.x,L=C.startAngle;if(y.xyDirection!==s.EXyDirection.YDirection)if(g){var k=L+w*y.growFactor;C.startAngle=k,T.startAngle=k}else{var D=C.visibleRange,j=C.totalAngle,N=w*y.growFactor*(D.max-D.min)/j;C.visibleRange=new i.NumberRange(D.min-N,D.max-N)}if(y.xyDirection!==s.EXyDirection.XDirection)if(v)T.lengthScale=T.lengthScale+T.lengthScale*(A.y/x.y-1)*y.growFactor;else{var V=T.visibleRange,W=V.min,K=V.max,H=K+(K*x.y/A.y-K)*y.growFactor;T.visibleRange=new i.NumberRange(W,H)}}else{var x=C.reverseTransform(b.x,b.y),A=C.reverseTransform(S.x,S.y),w=A.y-x.y,L=C.startAngle;if(y.xyDirection!==s.EXyDirection.XDirection)if(g){var k=L+w*y.growFactor;C.startAngle=k,T.startAngle=k}else{var D=T.visibleRange,j=T.totalAngle,N=w*y.growFactor*(D.max-D.min)/j;T.visibleRange=new i.NumberRange(D.min-N,D.max-N)}if(y.xyDirection!==s.EXyDirection.YDirection)if(v)C.lengthScale=C.lengthScale+C.lengthScale*(A.x/x.x-1)*y.growFactor;else{var U=C.visibleRange,W=U.min,K=U.max,H=K+(K*x.x/A.x-K)*y.growFactor;C.visibleRange=new i.NumberRange(W,H)}}}})},p})(c.PinchZoomModifier);r.PolarPanModifier=f})(qI)),qI}var gx={},sW={},XI={},Kne;function $1(){if(Kne)return XI;Kne=1,Object.defineProperty(XI,"__esModule",{value:!0}),XI.Vector3=void 0;var r=ni(),e=(function(){function i(n,t,o){this.xProperty=n,this.yProperty=t,this.zProperty=o}return Object.defineProperty(i,"zero",{get:function(){return i.zeroVector},enumerable:!1,configurable:!0}),i.hydrate=function(n){if(n){var t=n.x,o=n.y,a=n.z;return new i(t,o,a)}else return},i.isEqual=function(n,t){return!((n==null?void 0:n.x)!==(t==null?void 0:t.x)||(n==null?void 0:n.y)!==(t==null?void 0:t.y)||(n==null?void 0:n.z)!==(t==null?void 0:t.z))},Object.defineProperty(i.prototype,"x",{get:function(){return this.xProperty},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"y",{get:function(){return this.yProperty},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"z",{get:function(){return this.zProperty},enumerable:!1,configurable:!0}),i.prototype.toTsrVector3=function(n){return r.Guard.notNull(n,"webAssemblyContext"),new n.TSRVector3(this.x,this.y,this.z)},i.prototype.subtract=function(n){return new i(this.x-n.x,this.y-n.y,this.z-n.z)},i.prototype.add=function(n){return new i(this.x+n.x,this.y+n.y,this.z+n.z)},i.prototype.scalarMultiply=function(n){return new i(this.x*n,this.y*n,this.z*n)},i.prototype.dotProduct=function(n){return this.x*n.x+this.y*n.y+this.z*n.z},i.prototype.crossProduct=function(n){return new i(this.y*n.z-this.z*n.y,this.z*n.x-this.x*n.z,this.x*n.y-this.y*n.x)},Object.defineProperty(i.prototype,"length",{get:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},enumerable:!1,configurable:!0}),i.prototype.normalize=function(){var n=1/this.length;if(n===0)throw new Error("Vector3 magnitude is zero, cannot normalize!");this.xProperty=this.xProperty*n,this.yProperty=this.yProperty*n,this.zProperty=this.zProperty*n},i.prototype.toString=function(){return"Vector3 (".concat(this.xProperty.toFixed(2),", ").concat(this.yProperty.toFixed(2),", ").concat(this.zProperty.toFixed(2),")")},i.prototype.toJSON=function(){return{x:this.x,y:this.y,z:this.z}},i.zeroVector=new i(0,0,0),i})();return XI.Vector3=e,XI}var lW={},Zne;function X_e(){return Zne||(Zne=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.PROPERTY=void 0,(function(e){e.CAMERA_POSITION="CAMERA_POSITION",e.CAMERA_TARGET="CAMERA_TARGET",e.CAMERA_ORTHOHEIGHT="CAMERA_ORTHOHEIGHT",e.CAMERA_ORTHOWIDTH="CAMERA_ORTHOWIDTH",e.CAMERA_FIELDOFVIEW="CAMERA_FIELDOFVIEW",e.CAMERA_PROJECTIONMODE="CAMERA_PROJECTIONMODE",e.CAMERA_ISATTACHED="CAMERA_ISATTACHED",e.CAMERA_ORBITALPITCH="CAMERA_ORBITALPITCH",e.CAMERA_ORBITALYAW="CAMERA_ORBITALYAW",e.CAMERA_RADIUS="CAMERA_RADIUS",e.CAMERA_FORWARD="CAMERA_FORWARD",e.CAMERA_SIDE="CAMERA_SIDE",e.CAMERA_UP="CAMERA_UP",e.CAMERA_UPGLOBAL="CAMERA_UPGLOBAL",e.CAMERA_ASPECTRATIO="CAMERA_ASPECTRATIO",e.CAMERA_ID="CAMERA_ID",e.CAMERA_FARCLIP="CAMERA_FARCLIP",e.CAMERA_NEARCLIP="CAMERA_NEARCLIP",e.PLANE_VISIBILITY="PLANE_VISIBILITY",e.PLANE_LABEL_MODE="PLANE_LABEL_MODE",e.PLANE_TITLE_MODE="PLANE_TITLE_MODE",e.SURFACE_CAMERA="SURFACE_CAMERA",e.SURFACE_XAXIS="SURFACE_XAXIS",e.SURFACE_YAXIS="SURFACE_YAXIS",e.SURFACE_ZAXIS="SURFACE_ZAXIS",e.SURFACE_VIEWPORT_MANAGER="SURFACE_VIEWPORT_MANAGER",e.SURFACE_WORLD_DIMENSIONS="SURFACE_WORLD_DIMENSIONS"})(r.PROPERTY||(r.PROPERTY={}))})(lW)),lW}var Jne;function JR(){return Jne||(Jne=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.CameraController=r.ECameraProjectionMode=void 0;var e=Ba(),i=ni(),n=XS(),t=$1(),o=X_e(),a;(function(l){l.Perspective="Perspective",l.Orthogonal="Orthogonal"})(a=r.ECameraProjectionMode||(r.ECameraProjectionMode={}));var s=(function(){function l(u,c){var d,f,h,p,g,v,y,m,b;this.aspectRatioProperty=1.5,this.idProperty="Default",this.farClipProperty=4e3,this.fieldOfViewProperty=60,this.isAttachedProperty=!1,this.nearClipProperty=1,this.orbitalPitchProperty=0,this.orbitalYawProperty=0,this.orthoHeightProperty=400,this.orthoWidthProperty=600,this.positionProperty=t.Vector3.zero,this.projectionModeProperty=a.Perspective,this.targetProperty=t.Vector3.zero,this.webAssemblyContext=u,this.propertyChanged=new e.EventHandler,this.resetToDefaults(),this.id=(d=c==null?void 0:c.id)!==null&&d!==void 0?d:this.id,this.farClipProperty=(f=c==null?void 0:c.farClip)!==null&&f!==void 0?f:this.farClip,this.fieldOfViewProperty=(h=c==null?void 0:c.fieldOfView)!==null&&h!==void 0?h:this.fieldOfView,this.nearClipProperty=(p=c==null?void 0:c.nearClip)!==null&&p!==void 0?p:this.nearClip,this.orthoHeightProperty=(g=c==null?void 0:c.orthoHeight)!==null&&g!==void 0?g:this.orthoHeight,this.orthoWidthProperty=(v=c==null?void 0:c.orthoWidth)!==null&&v!==void 0?v:this.orthoWidth,this.projectionModeProperty=(y=c==null?void 0:c.projectionMode)!==null&&y!==void 0?y:this.projectionMode,this.position=c!=null&&c.position?t.Vector3.hydrate(c==null?void 0:c.position):this.position,this.target=c!=null&&c.target?t.Vector3.hydrate(c==null?void 0:c.target):this.target,this.id=(m=c==null?void 0:c.id)!==null&&m!==void 0?m:this.id,this.debugPositionsProperty=(b=c==null?void 0:c.debugPositions)!==null&&b!==void 0?b:!1}return Object.defineProperty(l.prototype,"id",{get:function(){return this.idProperty},set:function(u){this.idProperty=u,this.notifyPropertyChanged(o.PROPERTY.CAMERA_ID)},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"orthoHeight",{get:function(){return this.orthoHeightProperty},set:function(u){this.orthoHeightProperty!==u&&(this.orthoHeightProperty=u,this.notifyPropertyChanged(o.PROPERTY.CAMERA_ORTHOHEIGHT))},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"orthoWidth",{get:function(){return this.orthoWidthProperty},set:function(u){this.orthoWidthProperty!==u&&(this.orthoWidthProperty=u,this.notifyPropertyChanged(o.PROPERTY.CAMERA_ORTHOWIDTH))},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"projectionMode",{get:function(){return this.projectionModeProperty},set:function(u){this.projectionModeProperty!==u&&(this.projectionModeProperty=u,this.notifyPropertyChanged(o.PROPERTY.CAMERA_PROJECTIONMODE))},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"aspectRatio",{get:function(){return this.aspectRatioProperty},set:function(u){this.aspectRatioProperty!==u&&(this.aspectRatioProperty=u,this.orthoWidth=this.orthoHeight*this.aspectRatioProperty,this.notifyPropertyChanged(o.PROPERTY.CAMERA_ASPECTRATIO))},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"isAttached",{get:function(){return this.isAttachedProperty},set:function(u){this.isAttachedProperty=u,this.notifyPropertyChanged(o.PROPERTY.CAMERA_ISATTACHED)},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"radius",{get:function(){var u=this.target.subtract(this.position).length;return u},set:function(u){u<=1&&(u=1),this.radius!==u&&(this.position=this.target.subtract(this.forward.scalarMultiply(u)),this.notifyPropertyChanged(o.PROPERTY.CAMERA_RADIUS))},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"orbitalPitch",{get:function(){return this.orbitalPitchProperty},set:function(u){if(this.orbitalPitchProperty!==u){this.orbitalPitchProperty=u>90?89.9:u<-90?-89.9:u;var c=this.webAssemblyContext.Math3D.PitchAndYawToDirection(this.orbitalPitchProperty,this.orbitalYawProperty);try{var d=new t.Vector3(c.x,c.y,c.z);d=d.scalarMultiply(this.radius),this.position=this.target.subtract(d),this.notifyPropertyChanged(o.PROPERTY.CAMERA_ORBITALPITCH)}finally{c==null||c.delete()}}},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"orbitalYaw",{get:function(){return this.orbitalYawProperty},set:function(u){if(this.orbitalYawProperty!==u){this.orbitalYawProperty=u;var c=this.webAssemblyContext.Math3D.PitchAndYawToDirection(this.orbitalPitchProperty,this.orbitalYawProperty);try{var d=new t.Vector3(c.x,c.y,c.z);d=d.scalarMultiply(this.radius),this.position=this.target.subtract(d),this.notifyPropertyChanged(o.PROPERTY.CAMERA_ORBITALYAW)}finally{c==null||c.delete()}}},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"farClip",{get:function(){return this.farClipProperty},set:function(u){this.farClipProperty=u,this.notifyPropertyChanged(o.PROPERTY.CAMERA_FARCLIP)},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"nearClip",{get:function(){return this.nearClipProperty},set:function(u){this.nearClipProperty=u,this.notifyPropertyChanged(o.PROPERTY.CAMERA_NEARCLIP)},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"fieldOfView",{get:function(){return this.fieldOfViewProperty},set:function(u){this.fieldOfViewProperty=u,this.notifyPropertyChanged(o.PROPERTY.CAMERA_FIELDOFVIEW)},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"upGlobal",{get:function(){return new t.Vector3(0,1,0)},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"side",{get:function(){var u=this.forward,c=u.crossProduct(this.upGlobal).crossProduct(u),d=c.crossProduct(u);return d.normalize(),d},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"forward",{get:function(){var u=this.target.subtract(this.position);return u.normalize(),u},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"up",{get:function(){var u=this.forward,c=u.crossProduct(this.upGlobal).crossProduct(u);return c.normalize(),c},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"target",{get:function(){return this.targetProperty},set:function(u){if(this.targetProperty!==u){this.targetProperty=u;var c,d;try{c=this.forward.toTsrVector3(this.webAssemblyContext),d=this.webAssemblyContext.Math3D.DirectionToPitchAndYaw(c),this.orbitalPitchProperty=d.pitch,this.orbitalYawProperty=d.yaw,this.notifyPropertyChanged(o.PROPERTY.CAMERA_TARGET)}finally{c==null||c.delete(),d==null||d.delete()}}},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"position",{get:function(){return this.positionProperty},set:function(u){if(this.positionProperty!==u){this.positionProperty=u;var c,d;try{c=this.forward.toTsrVector3(this.webAssemblyContext),d=this.webAssemblyContext.Math3D.DirectionToPitchAndYaw(c),this.orbitalPitchProperty=d.pitch,this.orbitalYawProperty=d.yaw,this.notifyPropertyChanged(o.PROPERTY.CAMERA_POSITION)}finally{c==null||c.delete(),d==null||d.delete()}}},enumerable:!1,configurable:!0}),l.prototype.toOrthogonal=function(){this.projectionModeProperty!==a.Orthogonal&&(this.projectionModeProperty=a.Orthogonal,this.orthoWidthProperty=this.radius,this.orthoHeightProperty=this.orthoWidth/this.aspectRatio,this.notifyPropertyChanged(o.PROPERTY.CAMERA_PROJECTIONMODE))},l.prototype.toPerspective=function(){this.projectionModeProperty!==a.Perspective&&(this.projectionModeProperty=a.Perspective,this.radius=this.orthoWidth,this.notifyPropertyChanged(o.PROPERTY.CAMERA_PROJECTIONMODE))},l.prototype.resetToDefaults=function(){this.positionProperty=new t.Vector3(-1e3,1e3,-1e3),this.targetProperty=new t.Vector3(0,0,0),this.fieldOfViewProperty=60,this.nearClipProperty=1,this.farClipProperty=4e3,this.projectionModeProperty=a.Perspective,this.aspectRatioProperty=1.5,this.orthoWidthProperty=600,this.orthoHeightProperty=400;var u,c;try{u=this.forward.toTsrVector3(this.webAssemblyContext),c=this.webAssemblyContext.Math3D.DirectionToPitchAndYaw(u),this.orbitalPitch=c.pitch,this.orbitalYaw=c.yaw}finally{c==null||c.delete(),u==null||u.delete()}},l.prototype.updateEngineCamera=function(u){i.Guard.notNull(u,"tsrCamera");var c,d,f;try{c=this.position.toTsrVector3(this.webAssemblyContext),d=this.target.toTsrVector3(this.webAssemblyContext),f=this.up.toTsrVector3(this.webAssemblyContext),u.SetLoc(c),u.SetAt(d),u.SetFarClip(this.farClip),u.SetNearClip(this.nearClip),u.SetFovAngle(this.webAssemblyContext.Math3D.DegToRad(this.fieldOfView)),u.SetProjectionMode(this.projectionMode===a.Perspective?this.webAssemblyContext.eTSRCameraProjectionMode.CAMERA_PROJECTIONMODE_PERSPECTIVE:this.webAssemblyContext.eTSRCameraProjectionMode.CAMERA_PROJECTIONMODE_ORTHOGONAL),u.SetOrthoWidth(this.orthoWidth),u.SetOrthoHeight(this.orthoHeight),u.SetAspectRatio(this.aspectRatio),u.SetYaw(this.webAssemblyContext.Math3D.DegToRad(this.orbitalYaw)),u.SetPitch(this.webAssemblyContext.Math3D.DegToRad(this.orbitalPitch)),u.SetUp(f)}finally{c==null||c.delete(),d==null||d.delete(),f==null||f.delete()}},l.prototype.notifyPropertyChanged=function(u){var c;this.debugPositionsProperty&&(u===o.PROPERTY.CAMERA_POSITION||u===o.PROPERTY.CAMERA_TARGET)&&console.log("SciChart.js Camera P=".concat(this.position.toString(),", T=").concat(this.target.toString())),(c=this.propertyChanged)===null||c===void 0||c.raiseEvent(new n.PropertyChangedEventArgs(u))},l.prototype.debugOutput=function(){var u=["Camera id='".concat(this.id,"': "),"  position: ".concat(this.position.toString()),"  target: ".concat(this.target.toString()),"  pitch: ".concat(this.orbitalPitch.toFixed(2)," degrees"),"  yaw: ".concat(this.orbitalYaw.toFixed(2)," degrees"),"  up Vector: ".concat(this.up.toString()),"  forward Vector: ".concat(this.forward.toString()),"  projectionMode: ".concat(this.projectionMode)];return this.projectionMode===a.Orthogonal?(u.push("  orthoWidth: ".concat(this.orthoWidth.toFixed(2))),u.push("  orthoHeight: ".concat(this.orthoHeight.toFixed(2)))):(u.push("  radius: ".concat(this.radius.toFixed(2))),u.push("  fieldOfView: ".concat(this.fieldOfView.toFixed(2)," degrees"))),u.forEach(function(c){return console.log(c)}),u},l.prototype.toJSON=function(){var u={id:this.id,position:this.position,target:this.target,fieldOfView:this.fieldOfView,nearClip:this.nearClip,farClip:this.farClip,projectionMode:this.projectionMode,orthoWidth:this.orthoWidth,orthoHeight:this.orthoHeight};return u},l})();r.CameraController=s})(sW)),sW}var vx={},Qne;function q1(){if(Qne)return vx;Qne=1;var r=vx&&vx.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(vx,"__esModule",{value:!0}),vx.ChartModifierBase3D=void 0;var e=X8(),i=K8(),n=Wd(),t=(function(o){r(a,o);function a(s){var l=this,u,c,d,f;if(l=o.call(this,s)||this,l.typeMap=new Map,l.includedSeries=new i.IncludedItems,((u=s==null?void 0:s.includedSeriesIds)===null||u===void 0?void 0:u.length)>0&&((c=s==null?void 0:s.excludedSeriesIds)===null||c===void 0?void 0:c.length)>0)throw new Error("You should either use `includedSeriesIds` or `excludedSeriesIds`, not both.");return((d=s==null?void 0:s.includedSeriesIds)===null||d===void 0?void 0:d.length)>0&&l.includedSeries.includeList(s.includedSeriesIds),((f=s==null?void 0:s.excludedSeriesIds)===null||f===void 0?void 0:f.length)>0&&l.includedSeries.excludeList(s.excludedSeriesIds),l}return Object.defineProperty(a.prototype,"modifierType",{get:function(){return n.EModifierType.Chart3DModifier},enumerable:!1,configurable:!0}),a.prototype.getAllSeries=function(){return this.parentSurface.renderableSeries.asArray()},a.prototype.testIsIncludedSeries=function(s){return s.isVisible&&this.includedSeries.testIsIncluded(s.id)},a.prototype.includeSeries=function(s,l){return l?this.includedSeries.include(s.id):this.includedSeries.exclude(s.id)},a.prototype.getIncludedRenderableSeries=function(){var s=this;return this.getAllSeries().filter(function(l){return s.testIsIncludedSeries(l)})},a.prototype.toJSON=function(){var s={id:this.id,executeCondition:this.executeCondition,includedSeriesIds:this.includedSeries.getIncludedItemIds(),excludedSeriesIds:this.includedSeries.getExcludedItemIds()};return{type:this.type,options:s}},a})(e.ChartModifierBase);return vx.ChartModifierBase3D=t,vx}var eoe;function K_e(){if(eoe)return gx;eoe=1;var r=gx&&gx.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(gx,"__esModule",{value:!0}),gx.MouseWheelZoomModifier3D=void 0;var e=bo(),i=JR(),n=q1(),t=(function(o){r(a,o);function a(s){var l=o.call(this,s)||this;return l.type=e.EChart3DModifierType.MouseWheelZoom,l.mouseWheelSensitivity=(s==null?void 0:s.mouseWheelSensitivity)||.1,l}return a.prototype.modifierMouseWheel=function(s){o.prototype.modifierMouseWheel.call(this,s);var l=this.parentSurface;if(l){var u=l.camera;if(u){var c=s.mouseWheelDelta,d=u.radius,f=(d+c*this.mouseWheelSensitivity)/d;u.projectionMode===i.ECameraProjectionMode.Perspective?u.radius*=f:(u.orthoWidth*=f,u.orthoHeight*=f),s.handled=!0}}},a.prototype.toJSON=function(){var s=o.prototype.toJSON.call(this),l={mouseWheelSensitivity:this.mouseWheelSensitivity};return Object.assign(s.options,l),s},a})(n.ChartModifierBase3D);return gx.MouseWheelZoomModifier3D=t,gx}var yx={},toe;function nX(){if(toe)return yx;toe=1;var r=yx&&yx.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(yx,"__esModule",{value:!0}),yx.PinchZoomModifier3D=void 0;var e=bo(),i=JR(),n=q1(),t=(function(o){r(a,o);function a(s){var l=this,u;return l=o.call(this,s)||this,l.growFactor=.5,l.type=e.EChart3DModifierType.PinchZoom,l.growFactor=(u=s==null?void 0:s.growFactor)!==null&&u!==void 0?u:l.growFactor,l}return a.prototype.modifierMouseDown=function(s){if(o.prototype.modifierMouseDown.call(this,s),!this.isAttached)throw new Error("Should not call PinchZoomModifier3D.modifierMouseDown if not attached");var l=s.pointerType==="touch"||s.pointerType==="pen";l&&this.activePointerEvents.set(s.pointerId,s)},a.prototype.modifierMouseMove=function(s){var l;o.prototype.modifierMouseMove.call(this,s),(l=this.activePointerEvents.get(s.pointerId))===null||l===void 0||l.mousePoint,this.activePointerEvents.has(s.pointerId)&&this.activePointerEvents.set(s.pointerId,s);var u=this.getIsActionAllowed(s);u&&this.performModifierAction(s)},a.prototype.modifierMouseUp=function(s){o.prototype.modifierMouseUp.call(this,s),this.removeFromActiveTouchEvents(s)},a.prototype.toJSON=function(){var s=o.prototype.toJSON.call(this),l={growFactor:this.growFactor};return Object.assign(s.options,l),s},a.prototype.performZoom=function(s,l,u){var c=this.parentSurface;if(c){var d=c.camera;if(d){var f=Math.sqrt(Math.pow(l,2)+Math.pow(u,2)),h=Math.sqrt(Math.pow(this.previousHorizontalTouchPointsDistance,2)+Math.pow(this.previousVerticalTouchPointsDistance,2)),p=d.radius,g=(h-f)*this.growFactor,v=(p+g)/p;d.projectionMode===i.ECameraProjectionMode.Perspective?d.radius*=v:(d.orthoWidth*=v,d.orthoHeight*=v)}}},a.prototype.removeFromActiveTouchEvents=function(s){this.activePointerEvents.delete(s.pointerId),this.activePointerEvents.size<2&&(this.previousHorizontalTouchPointsDistance=void 0,this.previousVerticalTouchPointsDistance=void 0)},a.prototype.performModifierAction=function(s){var l=Array.from(this.activePointerEvents.values()),u=l[0].mousePoint,c=l[1].mousePoint,d=Math.abs(u.x-c.x),f=Math.abs(u.y-c.y);this.previousHorizontalTouchPointsDistance!==void 0&&this.previousVerticalTouchPointsDistance!==void 0&&this.performZoom(s.mousePoint,d,f),this.previousHorizontalTouchPointsDistance=d,this.previousVerticalTouchPointsDistance=f},a.prototype.getIsActionAllowed=function(s){var l=s.pointerType==="touch"||s.pointerType==="pen";return l&&this.activePointerEvents.size>=2},a})(n.ChartModifierBase3D);return yx.PinchZoomModifier3D=t,yx}var mx={},roe;function Z_e(){if(roe)return mx;roe=1;var r=mx&&mx.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(mx,"__esModule",{value:!0}),mx.OrbitModifier3D=void 0;var e=uy(),i=bo(),n=nX(),t=(function(o){r(a,o);function a(s){var l=this,u,c;return l=o.call(this,s)||this,l.type=i.EChart3DModifierType.Orbit,l.enableZoom=!0,l.enableZoom=(u=s==null?void 0:s.enableZoom)!==null&&u!==void 0?u:l.enableZoom,l.executeCondition=(c=s==null?void 0:s.executeCondition)!==null&&c!==void 0?c:{button:e.EExecuteOn.MouseLeftButton},l}return a.prototype.modifierMouseDown=function(s){if(!this.isAttached)throw new Error("Should not call OrbitModifier3D.modifierMouseDown if not attached");this.checkExecuteConditions(s).isPrimary&&(o.prototype.modifierMouseDown.call(this,s),this.activePointerEvents.set(s.pointerId,s))},a.prototype.modifierMouseMove=function(s){if(this.updatePointerInfo(s),!!this.previousPoint){this.enableZoom&&o.prototype.getIsActionAllowed.call(this,s)&&o.prototype.performModifierAction.call(this,s);var l=this.getIsActionAllowed(s);l&&this.performModifierAction(s)}},a.prototype.modifierMouseUp=function(s){if(o.prototype.modifierMouseUp.call(this,s),this.activePointerEvents.size>0){var l=this.activePointerEvents.values().next().value;s.target.setPointerCapture(l.pointerId)}},a.prototype.toJSON=function(){var s=o.prototype.toJSON.call(this),l={enableZoom:this.enableZoom};return Object.assign(s.options,l),s},a.prototype.performModifierAction=function(s){var l=this.parentSurface.camera;if(l){var u=.2,c=s.mousePoint,d=this.previousPoint.x-c.x,f=this.previousPoint.y-c.y,h=d*u,p=f*u;l.orbitalYaw+=h,l.orbitalPitch-=p}},a.prototype.getIsActionAllowed=function(s){var l=this.activePointerEvents.values().next().value;return!(l.pointerId!==s.pointerId||this.activePointerEvents.size>1)},a})(n.PinchZoomModifier3D);return mx.OrbitModifier3D=t,mx}var KI={},bx={},ZI={},JI={},ioe;function dU(){if(ioe)return JI;ioe=1,Object.defineProperty(JI,"__esModule",{value:!0}),JI.HitTestInfo3D=void 0;var r=Ii(),e=(function(){function i(n,t){t===void 0&&(t=!1),this.isEmpty=t,this.associatedSeries=n}return i.empty=function(){return new i(void 0,!0)},i.isEqual=function(n,t){return n===t?!0:n===void 0&&t!==void 0||n!==void 0&&t===void 0?!1:!(n.isEmpty!==t.isEmpty||n.associatedSeries!==t.associatedSeries||!r.Point.isEqual(n.hitTestPoint,t.hitTestPoint)||n.isHit!==t.isHit||n.selectionIndex!==t.selectionIndex||n.selectionIjIndices!==t.selectionIjIndices)},i})();return JI.HitTestInfo3D=e,JI}var noe;function tj(){if(noe)return ZI;noe=1,Object.defineProperty(ZI,"__esModule",{value:!0}),ZI.SeriesInfo3D=void 0;var r=$1(),e=dU(),i=(function(){function n(t,o){var a;this.isEmpty=!1,this.renderableSeries=t,this.dataSeriesName=(a=t==null?void 0:t.dataSeries)===null||a===void 0?void 0:a.dataSeriesName,this.isHit=o==null?void 0:o.isHit,this.hitTestInfo=o}return n.empty=function(){var t=new n(void 0,void 0);return t.isEmpty=!0,t},n.isEqual=function(t,o){return t===o?!0:t!==void 0&&o===void 0||t===void 0&&o!==void 0?!1:t.equals(o)},n.prototype.equals=function(t){return!(this.isHit!==t.isHit||this.isEmpty!==t.isEmpty||this.xValue!==t.xValue||this.yValue!==t.yValue||this.zValue!==t.zValue||this.dataSeriesName!==t.dataSeriesName||this.dataSeriesType!==t.dataSeriesType||this.renderableSeries!==t.renderableSeries||!r.Vector3.isEqual(this.hitWorldCoords,t.hitWorldCoords)||!e.HitTestInfo3D.isEqual(this.hitTestInfo,t.hitTestInfo))},n})();return ZI.SeriesInfo3D=i,ZI}var ooe;function J_e(){if(ooe)return bx;ooe=1;var r=bx&&bx.__extends||(function(){var l=function(u,c){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(d[h]=f[h])},l(u,c)};return function(u,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");l(u,c);function d(){this.constructor=u}u.prototype=c===null?Object.create(c):(d.prototype=c.prototype,new d)}})();Object.defineProperty(bx,"__esModule",{value:!0}),bx.TooltipSvgAnnotation3D=void 0;var e=Ds(),i=Aa(),n=ay(),t=Zs(),o=tj(),a=Ha(),s=(function(l){r(u,l);function u(c){var d=this,f,h,p,g,v,y,m,b;if(d=l.call(this,c)||this,d.type=i.EAnnotationType.SVG,d.surfaceTypes=[a.ESurfaceType.SciChart3DSurfaceType],d.tooltipLegendOffsetXProperty=10,d.tooltipLegendOffsetYProperty=10,d.isDirty=!0,d.isHidden=!0,d.titleProperty=(f=c==null?void 0:c.title)!==null&&f!==void 0?f:d.titleProperty,d.tooltipSvgTemplateProperty=(h=c==null?void 0:c.tooltipSvgTemplate)!==null&&h!==void 0?h:d.tooltipSvgTemplateProperty,d.containerBackgroundProperty=(p=c==null?void 0:c.containerBackground)!==null&&p!==void 0?p:d.containerBackgroundProperty,d.textStrokeProperty=(g=c==null?void 0:c.textStroke)!==null&&g!==void 0?g:d.textStrokeProperty,d.tooltipLegendTemplateProperty=(v=c==null?void 0:c.tooltipLegendTemplate)!==null&&v!==void 0?v:d.tooltipLegendTemplateProperty,d.tooltipLegendOffsetXProperty=(y=c==null?void 0:c.tooltipLegendOffsetX)!==null&&y!==void 0?y:d.tooltipLegendOffsetXProperty,d.tooltipLegendOffsetYProperty=(m=c==null?void 0:c.tooltipLegendOffsetY)!==null&&m!==void 0?m:d.tooltipLegendOffsetYProperty,d.placementDivIdProperty=(b=c==null?void 0:c.placementDivId)!==null&&b!==void 0?b:d.placementDivId,d.tooltipDataTemplateProperty=c==null?void 0:c.tooltipDataTemplate,d.placementDivId){var S=document.querySelector("[id='".concat(d.placementDivId,"']"));d.svgDivRoot=S}return d}return Object.defineProperty(u.prototype,"seriesInfo",{get:function(){return this.seriesInfoProperty},set:function(c){o.SeriesInfo3D.isEqual(this.seriesInfoProperty,c)||(this.seriesInfoProperty=c,this.notifyPropertyChanged(t.PROPERTY.SERIES_INFOS))},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"title",{get:function(){return this.titleProperty},set:function(c){this.titleProperty!==c&&(this.titleProperty=c,this.notifyPropertyChanged(t.PROPERTY.TITLE))},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"tooltipSvgTemplate",{get:function(){return this.tooltipSvgTemplateProperty},set:function(c){this.tooltipSvgTemplateProperty=c,this.notifyPropertyChanged(t.PROPERTY.TOOLTIP_SVG_TEMPLATE)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"tooltipLegendTemplate",{get:function(){return this.tooltipLegendTemplateProperty},set:function(c){this.tooltipLegendTemplateProperty=c,this.notifyPropertyChanged(t.PROPERTY.TOOLTIP_LEGEND_TEMPLATE)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"tooltipDataTemplate",{get:function(){return this.tooltipDataTemplateProperty},set:function(c){this.tooltipDataTemplateProperty=c,this.notifyPropertyChanged(t.PROPERTY.TOOLTIP_DATA_TEMPLATE)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"containerBackground",{get:function(){return this.containerBackgroundProperty},set:function(c){this.containerBackgroundProperty!==c&&(this.containerBackgroundProperty=c,this.notifyPropertyChanged(t.PROPERTY.CONTAINER_BACKGROUND))},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"tooltipLegendOffsetX",{get:function(){return this.tooltipLegendOffsetXProperty},set:function(c){this.tooltipLegendOffsetXProperty!==c&&(this.tooltipLegendOffsetXProperty=c,this.notifyPropertyChanged(t.PROPERTY.TOOLTIP_LEGEND_OFFSET_X))},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"tooltipLegendOffsetY",{get:function(){return this.tooltipLegendOffsetYProperty},set:function(c){this.tooltipLegendOffsetYProperty!==c&&(this.tooltipLegendOffsetYProperty=c,this.notifyPropertyChanged(t.PROPERTY.TOOLTIP_LEGEND_OFFSET_Y))},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"textStroke",{get:function(){return this.textStrokeProperty},set:function(c){this.textStrokeProperty!==c&&(this.textStrokeProperty=c,this.notifyPropertyChanged(t.PROPERTY.TEXT_STROKE))},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"placementDivId",{get:function(){return this.placementDivIdProperty},set:function(c){this.placementDivIdProperty!==c&&(this.placementDivIdProperty=c,this.notifyPropertyChanged("PLACEMENT_DIV_ID"))},enumerable:!1,configurable:!0}),u.prototype.update=function(c,d,f,h){this.isDirty&&(this.isDirty=!1,this.svg&&this.clear(),this.create(c,d,f,h),this.placementDivId?this.updateExternalLegendTooltip():(this.updateTooltip(f,h),this.updateLegendTooltip()))},u.prototype.clear=function(){!this.parentSurface||this.parentSurface.isDeleted||!this.svg||(this.placementDivId?this.svgDivRoot.removeChild(this.svg):this.svgRoot.removeChild(this.svg),this.setSvg(void 0),this.svgLegend&&(this.svgRoot.removeChild(this.svgLegend),this.svgLegend=void 0))},u.prototype.notifyPropertyChanged=function(c){l.prototype.notifyPropertyChanged.call(this,c),this.isDirty=!0},u.prototype.create=function(c,d,f,h){if(!this.tooltipSvgTemplate)throw Error("Please provide a tooltipSvgTemplate for CursorTooltipSvgAnnotation");var p=this.tooltipSvgTemplate(this.seriesInfo,this),g=this.applySvgClipping(p,this.clipping);if(this.placementDivId){var v=e.annotationHelpers.createSvg(g,this.svgDivRoot,this.nextSibling);this.setSvg(v)}else{var v=e.annotationHelpers.createSvg(g,this.svgRoot,this.nextSibling);this.setSvg(v)}},u.prototype.updateTooltip=function(c,d){var f,h,p,g,v=(f=this.xCoordShift)!==null&&f!==void 0?f:0,y=(h=this.yCoordShift)!==null&&h!==void 0?h:0;this.svg.style.display=this.isHidden?"none":"block";var m=(p=this.x1)!==null&&p!==void 0?p:0,b=(g=this.y1)!==null&&g!==void 0?g:0,S=v+m+c,_=y+b+d;isNaN(S)||isNaN(_)?this.svg.style.display="none":(this.setSvgAttribute("x",S),this.setSvgAttribute("y",_))},u.prototype.updateLegendTooltip=function(){if(this.tooltipLegendTemplate){var c=this.seriesInfo?this.tooltipLegendTemplate(this.seriesInfo,this):"<svg></svg>";this.svgLegend&&this.svgRoot.removeChild(this.svgLegend);var d=this.applySvgClipping(c,this.clipping),f=e.annotationHelpers.createSvg(d,this.svgRoot,this.nextSibling);this.svgLegend=f,this.svgLegend.setAttribute("x",this.tooltipLegendOffsetX.toString()),this.svgLegend.setAttribute("y",this.tooltipLegendOffsetY.toString())}},u.prototype.updateExternalLegendTooltip=function(){if(this.tooltipLegendTemplate){var c=this.seriesInfo?this.tooltipLegendTemplate(this.seriesInfo,this):"<svg style='display: none'></svg>";this.svgLegend&&this.svgLegend.removeChild(this.svgLegend);var d=this.applySvgClipping(c,this.clipping),f=e.annotationHelpers.createSvg(d,this.svgRoot,this.nextSibling);this.svgLegend=f}},u})(n.SvgAnnotationBase);return bx.TooltipSvgAnnotation3D=s,bx}var Sx={},uW={},aoe;function dy(){return aoe||(aoe=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.ESceneEntityType=void 0,(function(e){e.AxisCubeEntity="AxisCubeEntity",e.Custom="Custom",e.GizmoEntity="GizmoEntity",e.RootSceneEntity="RootSceneEntity",e.ScatterPointsSceneEntity="ScatterPointsSceneEntity",e.SCRTSceneEntity="SCRTSceneEntity",e.SurfaceMeshSceneEntity="SurfaceMeshSceneEntity",e.PointLine3DSceneEntity="PointLine3DSceneEntity",e.ColumnSceneEntity="ColumnSceneEntity"})(r.ESceneEntityType||(r.ESceneEntityType={}))})(uW)),uW}var _x={},soe;function BM(){if(soe)return _x;soe=1;var r=_x&&_x.__extends||(function(){var l=function(u,c){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(d[h]=f[h])},l(u,c)};return function(u,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");l(u,c);function d(){this.constructor=u}u.prototype=c===null?Object.create(c):(d.prototype=c.prototype,new d)}})();Object.defineProperty(_x,"__esModule",{value:!0}),_x.BaseSceneEntity3D=void 0;var e=$n(),i=Mr(),n=ni(),t=FS(),o=dy(),a=ws(),s=(function(l){r(u,l);function u(c){var d=l.call(this)||this;return d.id=(0,a.generateGuid)(),d.isVisibleProperty=!0,d.entityIdProperty=void 0,d.isDeletedProperty=!1,n.Guard.notNull(c,"webAssemblyContext"),d.webAssemblyContext=c,d.detachChild=d.detachChild.bind(d),d.attachChild=d.attachChild.bind(d),d.children=new t.ObservableArray,d.children.collectionChanged.subscribe(function(f){var h,p;(h=f.getOldItems())===null||h===void 0||h.forEach(d.detachChild),(p=f.getNewItems())===null||p===void 0||p.forEach(d.attachChild)}),d.onDpiChanged=d.onDpiChanged.bind(d),d}return Object.defineProperty(u.prototype,"isVisible",{get:function(){return this.isVisibleProperty},set:function(c){var d;this.isVisibleProperty!==c&&(this.isVisibleProperty=c,(d=this.nativeEntity)===null||d===void 0||d.SetVisible(this.isVisible))},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"entityIdProvider",{get:function(){return this.entityIdProviderProperty},set:function(c){var d=this;this.entityIdProviderProperty=c,!this.entityId&&this.entityIdProviderProperty&&(this.entityId=this.entityIdProviderProperty.getNextEntityId()),this.visitEntities(function(f){f!==d&&(f.entityIdProvider=c)})},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"entityId",{get:function(){return this.entityIdProperty},set:function(c){var d;this.entityIdProperty=c,(d=this.nativeEntityProperty)===null||d===void 0||d.SetEntityId(c),this.invalidateScene()},enumerable:!1,configurable:!0}),u.prototype.getRoot=function(){if(this.type===o.ESceneEntityType.RootSceneEntity)return this;for(var c=this.parent;c!==void 0;){if(c.type===o.ESceneEntityType.RootSceneEntity)return c;c=c.parent}},u.prototype.delete=function(){var c;this.isDeletedProperty=!0,this.children.asArray().forEach(function(d){return!d.isDeletedProperty&&d.delete()}),(c=this.entityIdProvider)===null||c===void 0||c.releaseEntityId(this.entityId),this.nativeEntity&&this.world&&this.world.RemoveEntity(this.nativeEntity),this.nativeEntityProperty=(0,i.deleteSafe)(this.nativeEntityProperty),this.webAssemblyContext=void 0},u.prototype.Update=function(c){if(this.currentRenderPassData){if(!this.nativeEntity)throw new Error("BaseSceneEntity.nativeSceneEntity must be set by calling setEntity() in the constructor");this.isVisible&&this.nativeEntity.Update(c)}},u.prototype.Render=function(){if(this.currentRenderPassData){if(!this.nativeEntity)throw new Error("BaseSceneEntity.nativeSceneEntity must be set by calling setEntity() in the constructor");this.isVisible&&this.nativeEntity.Render()}},u.prototype.onEngineRestart=function(){},u.prototype.onDpiChanged=function(c){},u.prototype.setRenderPassData=function(c){this.currentRenderPassData=c},u.prototype.getEntity=function(c){for(var d=0;d<this.children.size();d++){var f=this.children.get(d);if(f.type===c)return f}},u.prototype.invalidateScene=function(){var c,d;(d=(c=this.rootSceneEntity)===null||c===void 0?void 0:c.parentSurface)===null||d===void 0||d.invalidateElement()},u.prototype.onAttached=function(){this.parent.type,o.ESceneEntityType.SCRTSceneEntity},u.prototype.onDetached=function(){},u.prototype.visitEntities=function(c){c(this),this.children.asArray().forEach(function(d){d.visitEntities(c)})},Object.defineProperty(u.prototype,"nativeEntity",{get:function(){return this.nativeEntityProperty},enumerable:!1,configurable:!0}),u.prototype.attachChild=function(c){var d,f=this;(d=f.nativeEntity)===null||d===void 0||d.AddChildEntityInternal(c.nativeEntity),c.parent=f,c.entityIdProvider=this.entityIdProvider,c.onAttached()},u.prototype.detachChild=function(c){var d,f=this;(d=f.nativeEntity)===null||d===void 0||d.RemoveChildEntityInternal(c.nativeEntity),c.onDetached(),c.parent=void 0},u.prototype.setNativeEntity=function(c){var d;this.nativeEntityProperty=c,this.entityId&&((d=this.nativeEntityProperty)===null||d===void 0||d.SetEntityId(this.entityId))},Object.defineProperty(u.prototype,"world",{get:function(){var c,d;return(d=(c=this.getRoot())===null||c===void 0?void 0:c.parentSurface)===null||d===void 0?void 0:d.getSceneWorld()},enumerable:!1,configurable:!0}),u.prototype.getOrCreateVector=function(c,d,f,h){h===void 0&&(h=0);var p=c??new f;return p.size()!==d&&p.resize(d,h),p},u})(e.DeletableEntity);return _x.BaseSceneEntity3D=s,_x}var loe;function Q_e(){if(loe)return Sx;loe=1;var r=Sx&&Sx.__extends||(function(){var s=function(l,u){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(c[f]=d[f])},s(l,u)};return function(l,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");s(l,u);function c(){this.constructor=l}l.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}})();Object.defineProperty(Sx,"__esModule",{value:!0}),Sx.CrosshairLinesSceneEntity=void 0;var e=Mr(),i=dy(),n=mi(),t=$1(),o=BM(),a=(function(s){r(l,s);function l(u){var c=s.call(this,u)||this;return c.type=i.ESceneEntityType.Custom,c.strokeThickness=2,c.stroke="#FF6600",c.antiAliased=!0,c.setNativeEntity(u.SCRTSceneEntity.implement(c)),c}return l.prototype.delete=function(){s.prototype.delete.call(this),this.linesMesh=(0,e.deleteSafe)(this.linesMesh)},l.prototype.Render=function(){if(!(!this.isVisible||!this.worldDimensions||!this.cameraPosition||!this.location)){var u=this.getWallVector();this.linesMesh=(0,e.deleteSafe)(this.linesMesh);var c=new this.webAssemblyContext.SCRTLinesMesh(this.strokeThickness,!1,this.antiAliased);c.SetVertexColor((0,n.parseColorToUIntArgb)(this.stroke)),this.inInWorldDimensions(this.location.x,this.location.y,0,this.worldDimensions)&&(c.SetVertex3(this.location.x,this.location.y,this.location.z),c.SetVertex3(this.location.x,this.location.y,u.z)),this.inInWorldDimensions(this.location.x,0,this.location.z,this.worldDimensions)&&(c.SetVertex3(this.location.x,this.location.y,this.location.z),c.SetVertex3(this.location.x,u.y,this.location.z)),this.inInWorldDimensions(0,this.location.y,0,this.worldDimensions)&&(c.SetVertex3(this.location.x,this.location.y,this.location.z),c.SetVertex3(u.x,this.location.y,this.location.z)),c.Freeze(),c.Render()}},l.prototype.inInWorldDimensions=function(u,c,d,f){return c>=0&&c<=f.y&&d>=-f.z/2&&d<=f.z/2&&u>=-f.x/2&&u<=f.x/2},l.prototype.getWallVector=function(){var u=this.cameraPosition.dotProduct(new t.Vector3(1,0,0))>0?-this.worldDimensions.x*.5:this.worldDimensions.x*.5,c=this.cameraPosition.dotProduct(new t.Vector3(0,1,0))>0?0:this.worldDimensions.y,d=this.cameraPosition.dotProduct(new t.Vector3(0,0,1))>0?-this.worldDimensions.z*.5:this.worldDimensions.z*.5;return new t.Vector3(u,c,d)},l})(o.BaseSceneEntity3D);return Sx.CrosshairLinesSceneEntity=a,Sx}var uoe;function _Y(){return uoe||(uoe=1,(function(r){var e=KI&&KI.__extends||(function(){var g=function(v,y){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,b){m.__proto__=b}||function(m,b){for(var S in b)Object.prototype.hasOwnProperty.call(b,S)&&(m[S]=b[S])},g(v,y)};return function(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");g(v,y);function m(){this.constructor=v}v.prototype=y===null?Object.create(y):(m.prototype=y.prototype,new m)}})();Object.defineProperty(r,"__esModule",{value:!0}),r.adjustTooltipPosition3D=r.TooltipModifier3D=void 0;var i=qw(),n=ta(),t=Mr(),o=bo(),a=pn(),s=zd(),l=J_e(),u=Q_e(),c=q1(),d=(function(g){e(v,g);function v(y){var m=this,b,S,_,C,T,x,A,w,L,k,D,j;return m=g.call(this,y)||this,m.type=o.EChart3DModifierType.Tooltip,m.showTooltip=!0,m.tooltipSvgTemplateProperty=h,m.tooltipContainerBackgroundProperty="#228B22",m.tooltipTextStrokeProperty="#fff",m.tooltipDataTemplateProperty=f,m.crosshairStrokeProperty=(b=y==null?void 0:y.crosshairStroke)!==null&&b!==void 0?b:"#FF6600",m.crosshairStrokeThicknessProperty=(S=y==null?void 0:y.crosshairStrokeThickness)!==null&&S!==void 0?S:2,m.isCrosshairVisibleProperty=(_=y==null?void 0:y.isCrosshairVisible)!==null&&_!==void 0?_:!0,y!=null&&y.tooltipSvgTemplate&&typeof y.tooltipSvgTemplate=="string"&&(m.typeMap.set("tooltipSvgTemplate",y.tooltipSvgTemplate),y.tooltipSvgTemplate=getFunction(EBaseType.OptionFunction,y.tooltipSvgTemplate)),m.tooltipSvgTemplateProperty=(C=y==null?void 0:y.tooltipSvgTemplate)!==null&&C!==void 0?C:m.tooltipSvgTemplateProperty,m.tooltipContainerBackgroundProperty=(T=y==null?void 0:y.tooltipContainerBackground)!==null&&T!==void 0?T:m.tooltipContainerBackgroundProperty,m.tooltipTextStrokeProperty=(x=y==null?void 0:y.tooltipTextStroke)!==null&&x!==void 0?x:m.tooltipTextStrokeProperty,m.showTooltip=(A=y==null?void 0:y.showTooltip)!==null&&A!==void 0?A:m.showTooltip,m.placementDivIdProperty=(w=y==null?void 0:y.placementDivId)!==null&&w!==void 0?w:m.placementDivIdProperty,y!=null&&y.tooltipLegendTemplate&&typeof y.tooltipLegendTemplate=="string"&&(m.typeMap.set("tooltipLegendTemplate",y.tooltipLegendTemplate),y.tooltipLegendTemplate=getFunction(EBaseType.OptionFunction,y.tooltipLegendTemplate)),m.tooltipLegendTemplateProperty=(L=y==null?void 0:y.tooltipLegendTemplate)!==null&&L!==void 0?L:m.tooltipLegendTemplateProperty,m.tooltipLegendOffsetXProperty=(k=y==null?void 0:y.tooltipLegendOffsetX)!==null&&k!==void 0?k:m.tooltipLegendOffsetX,m.tooltipLegendOffsetYProperty=(D=y==null?void 0:y.tooltipLegendOffsetY)!==null&&D!==void 0?D:m.tooltipLegendOffsetY,y!=null&&y.tooltipDataTemplate&&typeof y.tooltipDataTemplate=="string"&&(m.typeMap.set("tooltipDataTemplate",y.tooltipDataTemplate),y.tooltipDataTemplate=getFunction(EBaseType.OptionFunction,y.tooltipDataTemplate)),m.tooltipDataTemplateProperty=(j=y==null?void 0:y.tooltipDataTemplate)!==null&&j!==void 0?j:m.tooltipDataTemplateProperty,m}return Object.defineProperty(v.prototype,"isCrosshairVisible",{get:function(){return this.isCrosshairVisibleProperty},set:function(y){var m;this.isCrosshairVisibleProperty=y,(m=this.parentSurface)===null||m===void 0||m.invalidateElement()},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"crosshairStroke",{get:function(){return this.crosshairStrokeProperty},set:function(y){var m;this.crosshairStrokeProperty=y,(m=this.parentSurface)===null||m===void 0||m.invalidateElement()},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"crosshairStrokeThickness",{get:function(){return this.crosshairStrokeThicknessProperty},set:function(y){var m;this.crosshairStrokeThicknessProperty=y,(m=this.parentSurface)===null||m===void 0||m.invalidateElement()},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"tooltipSvgTemplate",{get:function(){return this.tooltipSvgTemplateProperty},set:function(y){this.tooltipSvgTemplateProperty=y,this.tooltipAnnotation&&(this.tooltipAnnotation.tooltipSvgTemplate=y)},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"tooltipLegendTemplate",{get:function(){return this.tooltipLegendTemplateProperty},set:function(y){this.tooltipLegendTemplateProperty=y,this.tooltipAnnotation&&(this.tooltipAnnotation.tooltipLegendTemplate=y)},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"tooltipDataTemplate",{get:function(){return this.tooltipDataTemplateProperty},set:function(y){this.tooltipDataTemplateProperty=y,this.tooltipAnnotation&&(this.tooltipAnnotation.tooltipDataTemplate=y)},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"tooltipContainerBackground",{get:function(){return this.tooltipContainerBackgroundProperty},set:function(y){this.tooltipContainerBackgroundProperty!==y&&(this.tooltipContainerBackgroundProperty=y,this.tooltipAnnotation&&(this.tooltipAnnotation.containerBackground=y))},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"tooltipLegendOffsetX",{get:function(){return this.tooltipLegendOffsetXProperty},set:function(y){this.tooltipLegendOffsetXProperty!==y&&(this.tooltipLegendOffsetXProperty=y,this.tooltipAnnotation&&(this.tooltipAnnotation.tooltipLegendOffsetX=y))},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"tooltipLegendOffsetY",{get:function(){return this.tooltipLegendOffsetYProperty},set:function(y){this.tooltipLegendOffsetYProperty!==y&&(this.tooltipLegendOffsetYProperty=y,this.tooltipAnnotation&&(this.tooltipAnnotation.tooltipLegendOffsetY=y))},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"tooltipTextStroke",{get:function(){return this.tooltipTextStrokeProperty},set:function(y){this.tooltipTextStrokeProperty!==y&&(this.tooltipTextStrokeProperty=y,this.tooltipAnnotation&&(this.tooltipAnnotation.textStroke=y))},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"placementDivId",{get:function(){return this.placementDivIdProperty},set:function(y){this.placementDivIdProperty!==y&&(this.placementDivIdProperty=y,this.notifyPropertyChanged("PLACEMENT_DIV_ID"))},enumerable:!1,configurable:!0}),v.prototype.onAttach=function(){g.prototype.onAttach.call(this),this.parentSurface&&(this.parentSurface.isHitTestEnabled=!0,this.crosshairEntity=(0,t.deleteSafe)(this.crosshairEntity),this.crosshairEntity=new u.CrosshairLinesSceneEntity(this.parentSurface.webAssemblyContext3D),this.parentSurface.rootEntity.children.add(this.crosshairEntity),this.tooltipAnnotation=new l.TooltipSvgAnnotation3D({xCoordinateMode:n.ECoordinateMode.Pixel,yCoordinateMode:n.ECoordinateMode.Pixel,tooltipSvgTemplate:this.tooltipSvgTemplate,containerBackground:this.tooltipContainerBackground,textStroke:this.tooltipTextStroke,tooltipLegendTemplate:this.tooltipLegendTemplate,tooltipLegendOffsetX:this.tooltipLegendOffsetX,tooltipLegendOffsetY:this.tooltipLegendOffsetY,placementDivId:this.placementDivId,tooltipDataTemplate:this.tooltipDataTemplate}),this.parentSurface.modifierAnnotations.add(this.tooltipAnnotation))},v.prototype.onDetach=function(){g.prototype.onDetach.call(this),this.parentSurface&&(this.parentSurface.rootEntity.children.remove(this.crosshairEntity),this.parentSurface.modifierAnnotations.remove(this.tooltipAnnotation,!1),this.tooltipAnnotation=void 0),this.crosshairEntity=(0,t.deleteSafe)(this.crosshairEntity)},v.prototype.modifierMouseMove=function(y){this.activePointerEvents.set(y.pointerId,y),g.prototype.modifierMouseMove.call(this,y),this.getIsActionAllowed(y)&&this.update()},v.prototype.onParentSurfaceRendered=function(){this.update()},v.prototype.update=function(){var y=this,m,b,S;if(this.mousePoint){var _=this.mousePoint,C=_.x,T=_.y,x=this.getIncludedRenderableSeries().map(function(L){return L.hitTest(y.mousePoint)}).find(function(L){return L.isHit});if(x!=null&&x.isHit){if(this.crosshairEntity&&this.isCrosshairVisible&&(this.crosshairEntity.worldDimensions=(m=this.parentSurface)===null||m===void 0?void 0:m.worldDimensions,this.crosshairEntity.cameraPosition=(S=(b=this.parentSurface)===null||b===void 0?void 0:b.camera)===null||S===void 0?void 0:S.position,this.crosshairEntity.stroke=this.crosshairStroke,this.crosshairEntity.strokeThickness=this.crosshairStrokeThickness,this.crosshairEntity.location=x.hitWorldCoords,this.crosshairEntity.isVisible=this.isCrosshairVisible),this.tooltipAnnotation.isHidden=!this.showTooltip,this.showTooltip){var A=(0,a.translateToNotScaled)(C),w=(0,a.translateToNotScaled)(T);this.tooltipAnnotation.x1=A,this.tooltipAnnotation.y1=w}(this.showTooltip||this.tooltipLegendTemplate)&&(this.tooltipAnnotation.seriesInfo=x)}else this.tooltipAnnotation.seriesInfo=void 0,this.crosshairEntity.isVisible=!1,this.tooltipAnnotation.isHidden=!0}},v})(c.ChartModifierBase3D);r.TooltipModifier3D=d;var f=function(g,v){var y=[];return v.title&&y.push(v.title),g&&g.isHit&&(g.dataSeriesName&&y.push(g.dataSeriesName),(g.dataSeriesType===s.EDataSeriesType3D.Xyz3D||g.dataSeriesType===s.EDataSeriesType3D.UniformGrid3D)&&(y.push("X: ".concat(g.xValue)),y.push("Y: ".concat(g.yValue)),y.push("Z: ".concat(g.zValue)))),y},h=function(g,v){var y,m="id_".concat(Date.now()),b=(y=v.tooltipDataTemplate)!==null&&y!==void 0?y:f,S=b(g,v);if(S.length===0)return"<svg></svg>";var _=(0,i.calcTooltipSize)(S),C=_.width,T=_.height;(0,r.adjustTooltipPosition3D)(C,T,v);var x="";S.forEach(function(L,k){x+='<tspan x="8" dy="1.2em">'.concat(L,"</tspan>")});var A=v.containerBackground,w=v.textStroke;return'<svg class="scichart__cursor-tooltip" width="'.concat(C,'" height="').concat(T,`">
        <defs>
            <filter id="`).concat(m,`" x="0" y="0" width="200%" height="200%">
                <feOffset result="offOut" in="SourceAlpha" dx="3" dy="3" />
                <feGaussianBlur result="blurOut" in="offOut" stdDeviation="3" />
                <feBlend in="SourceGraphic" in2="blurOut" mode="normal" />
            </filter>
        </defs>
        <rect rx="4" ry="4" width="95%" height="90%" fill="`).concat(A,'" filter="url(#').concat(m,`)" />
        <svg width="100%">
            <text x="8" y="3" font-size="13" font-family="Verdana" dy="0" fill="`).concat(w,'">').concat(x,`</text>
        </svg>
    </svg>`)},p=function(g,v,y){var m=y.parentSurface.seriesViewRect,b=y.x1,S=y.y1,_=(0,a.translateToNotScaled)(m.width)-b<g?-g:5,C=(0,a.translateToNotScaled)(m.height)-S<v?-v:5;y.xCoordShift=_,y.yCoordShift=C};r.adjustTooltipPosition3D=p})(KI)),KI}var Px={},coe;function ePe(){if(coe)return Px;coe=1;var r=Px&&Px.__extends||(function(){var l=function(u,c){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(d[h]=f[h])},l(u,c)};return function(u,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");l(u,c);function d(){this.constructor=u}u.prototype=c===null?Object.create(c):(d.prototype=c.prototype,new d)}})();Object.defineProperty(Px,"__esModule",{value:!0}),Px.ResetCamera3DModifier=void 0;var e=cU(),i=hc(),n=JF(),t=bo(),o=JR(),a=q1(),s=(function(l){r(u,l);function u(c){var d=this,f,h,p;return d=l.call(this,c)||this,d.type=t.EChart3DModifierType.ZoomExtents,d.isAnimated=!0,d.animationDuration=400,d.easingFunction=i.easing.outExpo,d.isAnimated=(f=c==null?void 0:c.isAnimated)!==null&&f!==void 0?f:!0,d.animationDuration=(h=c==null?void 0:c.animationDuration)!==null&&h!==void 0?h:400,c!=null&&c.easingFunction&&typeof c.easingFunction=="string"&&(c.easingFunction=i.easing[c.easingFunction]),d.easingFunction=(p=c==null?void 0:c.easingFunction)!==null&&p!==void 0?p:i.easing.outExpo,d.destination=c==null?void 0:c.destination,d}return u.prototype.onAttach=function(){if(!this.destination){var c=this.parentSurface;if(!c)return;var d=c.camera;if(!d)return;this.destination={radius:d.radius,pitch:d.orbitalPitch,yaw:d.orbitalYaw,width:d.orthoWidth,height:d.orthoHeight}}},u.prototype.modifierDoubleClick=function(c){var d,f,h=this.parentSurface;if(h){var p=h.camera;if(p){if(p.projectionMode===o.ECameraProjectionMode.Perspective){var g=new n.GenericAnimation({from:{radius:p.radius,pitch:p.orbitalPitch,yaw:p.orbitalYaw},to:(d=this.destination)!==null&&d!==void 0?d:{radius:1,pitch:0,yaw:0},onAnimate:function(v,y,m){p.radius=e.DoubleAnimator.interpolate(v.radius,y.radius,m),p.orbitalPitch=e.DoubleAnimator.interpolate(v.pitch,y.pitch,m),p.orbitalYaw=e.DoubleAnimator.interpolate(v.yaw,y.yaw,m)},duration:this.isAnimated?this.animationDuration:0,ease:this.easingFunction});h.addAnimation(g)}else{var g=new n.GenericAnimation({from:{width:p.orthoWidth,height:p.orthoHeight},to:(f=this.destination)!==null&&f!==void 0?f:{width:1,height:1},onAnimate:function(y,m,b){p.orthoWidth=e.DoubleAnimator.interpolate(y.width,m.width,b),p.orthoHeight=e.DoubleAnimator.interpolate(y.height,m.height,b)},duration:this.isAnimated?this.animationDuration:0,ease:this.easingFunction});h.addAnimation(g)}c.handled=!0}}},u.prototype.toJSON=function(){var c=l.prototype.toJSON.call(this),d={animationDuration:this.animationDuration,easingFunction:this.easingFunction.name,isAnimated:this.isAnimated,destination:this.destination};return Object.assign(c.options,d),c},u})(a.ChartModifierBase3D);return Px.ResetCamera3DModifier=s,Px}var Qm={},Cx={},doe;function tPe(){if(doe)return Cx;doe=1;var r=Cx&&Cx.__extends||(function(){var t=function(o,a){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");t(o,a);function s(){this.constructor=o}o.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}})();Object.defineProperty(Cx,"__esModule",{value:!0}),Cx.SciChart3DLegend=void 0;var e=Pv(),i=Yo(),n=(function(t){r(o,t);function o(){var a=t!==null&&t.apply(this,arguments)||this;return a.type=e.ELegendType.SciChart3DLegend,a.showCheckboxesProperty=!1,a.showSeriesMarkersProperty=!0,a}return o.prototype.applyTheme=function(){},Object.defineProperty(o.prototype,"showCheckboxes",{get:function(){return this.showCheckboxesProperty},set:function(a){this.showCheckboxesProperty=a,this.notifyPropertyChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"showSeriesMarkers",{get:function(){return this.showSeriesMarkersProperty},set:function(a){this.showSeriesMarkersProperty=a,this.notifyPropertyChanged()},enumerable:!1,configurable:!0}),o.prototype.setRenderableSeriesArray=function(a){this.renderableSeriesArray=a,this.invalidateLegend()},o.prototype.addEventListeners=function(){var a=this;this.renderableSeriesArray.forEach(function(s){return a.addEventListenerToSeries(s)})},o.prototype.removeEventListeners=function(){var a=this;this.renderableSeriesArray.forEach(function(s){return a.removeEventListenerFromSeries(s.id)})},o.prototype.addEventListenerToSeries=function(a){var s=this,l=this.parentDiv.querySelector("[id='".concat(a.id,"']"));if(l){var u=function(h){a.isVisible=h.target.checked,s.legendItemCheckedChangedCallback&&s.legendItemCheckedChangedCallback(a,a.isVisible)};l.addEventListener("change",u);var c=function(h){s.invalidateLegend()};a.isVisibleChanged.subscribe(c);var d={element:l,eventType:"change",eventListener:u,delete:function(){l.removeEventListener("change",u),a.isVisibleChanged.unsubscribe(c)}},f=this.eventListenersCollection.get(a.id);f?f.push(d):this.eventListenersCollection.set(a.id,[d])}},o.prototype.getInnerHTML=function(){var a,s,l,u,c,d,f=(a=this.backgroundColor)!==null&&a!==void 0?a:(l=(s=this.parentSurfaceProperty)===null||s===void 0?void 0:s.themeProvider)===null||l===void 0?void 0:l.legendBackgroundBrush,h=(u=this.textColor)!==null&&u!==void 0?u:(d=(c=this.parentSurfaceProperty)===null||c===void 0?void 0:c.themeProvider)===null||d===void 0?void 0:d.labelForegroundBrush,p=this.renderableSeriesArray.map(function(_,C){var T;return{id:_.id,name:(T=_.seriesName)!==null&&T!==void 0?T:"Series ".concat(C+1),color:_.stroke,checked:_.isVisible,gradient:void 0}}),g=this.parentSurfaceProperty.getSeriesViewRectPadding(!1),v=g.left,y=g.top,m=g.right,b=g.bottom,S=this.isExternal()?new i.Thickness(this.margin,this.margin,this.margin,this.margin):new i.Thickness(y+this.margin,m+this.margin,b+this.margin,v+this.margin);return this.getLegendHTML(this.placement,h,f,S,this.orientation,this.showCheckboxes,this.showSeriesMarkers,p)},o})(e.SciChartLegendBase);return Cx.SciChart3DLegend=n,Cx}var foe;function rPe(){if(foe)return Qm;foe=1;var r=Qm&&Qm.__extends||(function(){var s=function(l,u){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(c[f]=d[f])},s(l,u)};return function(l,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");s(l,u);function c(){this.constructor=l}l.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}})(),e=Qm&&Qm.__assign||function(){return e=Object.assign||function(s){for(var l,u=1,c=arguments.length;u<c;u++){l=arguments[u];for(var d in l)Object.prototype.hasOwnProperty.call(l,d)&&(s[d]=l[d])}return s},e.apply(this,arguments)};Object.defineProperty(Qm,"__esModule",{value:!0}),Qm.LegendModifier3D=void 0;var i=Ba(),n=bo(),t=q1(),o=tPe(),a=(function(s){r(l,s);function l(u){var c=this,d;return c=s.call(this,u)||this,c._legendOptions={},c.type=n.EChart3DModifierType.Legend,c.isCheckedChanged=new i.EventHandler,c._legendOptions=e({},u),c.legendItemCheckedChanged=c.legendItemCheckedChanged.bind(c),c.sciChart3DLegend=(d=u==null?void 0:u.legend)!==null&&d!==void 0?d:new o.SciChart3DLegend(u),c.applyLegendOptions(c.sciChart3DLegend,u),c}return l.prototype.applyLegendOptions=function(u,c){var d,f,h,p,g,v;u.showCheckboxes=(d=c==null?void 0:c.showCheckboxes)!==null&&d!==void 0?d:u.showCheckboxes,u.showSeriesMarkers=(f=c==null?void 0:c.showSeriesMarkers)!==null&&f!==void 0?f:u.showSeriesMarkers,u.margin=(h=c==null?void 0:c.margin)!==null&&h!==void 0?h:u.margin,u.orientation=(p=c==null?void 0:c.orientation)!==null&&p!==void 0?p:u.orientation,u.placement=(g=c==null?void 0:c.placement)!==null&&g!==void 0?g:u.placement,u.showLegend=(v=c==null?void 0:c.showLegend)!==null&&v!==void 0?v:u.showLegend,u.legendItemCheckedChangedCallback=this.legendItemCheckedChanged,c!=null&&c.isCheckedChangedCallback&&this.isCheckedChanged.subscribe(function(y){return c.isCheckedChangedCallback(y.series,y.isChecked)})},l.prototype.applyTheme=function(u){var c;s.prototype.applyTheme.call(this,u),(c=this.sciChart3DLegend)===null||c===void 0||c.applyTheme()},l.prototype.onParentSurfaceRendered=function(){s.prototype.onParentSurfaceRendered.call(this)},l.prototype.onAttach=function(){var u;s.prototype.onAttach.call(this),this.sciChart3DLegend||(this.sciChart3DLegend=(u=this._legendOptions.legend)!==null&&u!==void 0?u:new o.SciChart3DLegend(this._legendOptions),this.applyLegendOptions(this.sciChart3DLegend,this._legendOptions)),this.sciChart3DLegend.attachTo(this.parentSurface),this.sciChart3DLegend.setRenderableSeriesArray(this.getIncludedRenderableSeries())},l.prototype.onDetach=function(){var u,c;this.sciChart3DLegend&&(this._legendOptions.margin=this.sciChart3DLegend.margin,this._legendOptions.orientation=this.sciChart3DLegend.orientation,this._legendOptions.placement=this.sciChart3DLegend.placement,this._legendOptions.showCheckboxes=this.sciChart3DLegend.showCheckboxes,this._legendOptions.showLegend=this.sciChart3DLegend.showLegend,this._legendOptions.showSeriesMarkers=this.sciChart3DLegend.showSeriesMarkers),s.prototype.onDetach.call(this),(u=this.sciChart3DLegend)===null||u===void 0||u.setRenderableSeriesArray([]),(c=this.sciChart3DLegend)===null||c===void 0||c.detach(),this.sciChart3DLegend=void 0},l.prototype.includeSeries=function(u,c){var d;return s.prototype.includeSeries.call(this,u,c)?(this.isAttached&&this.sciChart3DLegend.setRenderableSeriesArray(this.getIncludedRenderableSeries()),(d=this.parentSurface)===null||d===void 0||d.invalidateElement(),!0):!1},l.prototype.testIsIncludedSeries=function(u){return this.includedSeries.testIsIncluded(u.id)},l.prototype.toJSON=function(){var u=s.prototype.toJSON.call(this),c={margin:this.sciChart3DLegend.margin,orientation:this.sciChart3DLegend.orientation,placement:this.sciChart3DLegend.placement,showCheckboxes:this.sciChart3DLegend.showCheckboxes,showLegend:this.sciChart3DLegend.showLegend,showSeriesMarkers:this.sciChart3DLegend.showSeriesMarkers};return Object.assign(u.options,c),u},l.prototype.delete=function(){s.prototype.delete.call(this),this.onDetach()},l.prototype.legendItemCheckedChanged=function(u,c){var d;(d=this.isCheckedChanged)===null||d===void 0||d.raiseEvent({series:u,isChecked:c})},l})(t.ChartModifierBase3D);return Qm.LegendModifier3D=a,Qm}var hoe;function n3(){if(hoe)return $T;hoe=1,Object.defineProperty($T,"__esModule",{value:!0}),$T.buildModifiers3D=$T.buildModifiers=void 0;var r=qw(),e=t3(),i=J8(),n=r3(),t=Q8(),o=uU(),a=i3(),s=R_e(),l=KN(),u=eX(),c=k_e(),d=I_e(),f=iX(),h=N_e(),p=$o(),g=bo(),v=fg(),y=Jn(),m=B_e(),b=U_e(),S=z_e(),_=W_e(),C=G_e(),T=Y_e(),x=$_e(),A=q_e(),w=SY(),L=K_e(),k=nX(),D=Z_e(),j=_Y(),N=ePe(),V=rPe();(0,y.registerType)(p.EBaseType.Chart2DModifier,g.EChart2DModifierType.Cursor,function(I){return new r.CursorModifier(I)},!0),(0,y.registerType)(p.EBaseType.Chart2DModifier,g.EChart2DModifierType.PolarCursor,function(I){return new S.PolarCursorModifier(I)},!0),(0,y.registerType)(p.EBaseType.Chart2DModifier,g.EChart2DModifierType.DataPointSelection,function(I){return new e.DataPointSelectionModifier(I)},!0),(0,y.registerType)(p.EBaseType.Chart2DModifier,g.EChart2DModifierType.PolarDataPointSelection,function(I){return new _.PolarDataPointSelectionModifier(I)},!0),(0,y.registerType)(p.EBaseType.Chart2DModifier,g.EChart2DModifierType.PolarSeriesSelection,function(I){return new C.PolarSeriesSelectionModifier(I)},!0),(0,y.registerType)(p.EBaseType.Chart2DModifier,g.EChart2DModifierType.MouseWheelZoom,function(I){return new n.MouseWheelZoomModifier(I)},!0),(0,y.registerType)(p.EBaseType.Chart2DModifier,g.EChart2DModifierType.PolarMouseWheelZoom,function(I){return new x.PolarMouseWheelZoomModifier(I)},!0),(0,y.registerType)(p.EBaseType.Chart2DModifier,g.EChart2DModifierType.PinchZoom,function(I){return new o.PinchZoomModifier(I)},!0),(0,y.registerType)(p.EBaseType.Chart2DModifier,g.EChart2DModifierType.Rollover,function(I){return new a.RolloverModifier(I)},!0),(0,y.registerType)(p.EBaseType.Chart2DModifier,g.EChart2DModifierType.VerticalSlice,function(I){return new s.VerticalSliceModifier(I)},!0),(0,y.registerType)(p.EBaseType.Chart2DModifier,g.EChart2DModifierType.RubberBandXYZoom,function(I){return new l.RubberBandXyZoomModifier(I)},!0),(0,y.registerType)(p.EBaseType.Chart2DModifier,g.EChart2DModifierType.PolarArcZoom,function(I){return new b.PolarArcZoomModifier(I)},!0),(0,y.registerType)(p.EBaseType.Chart2DModifier,g.EChart2DModifierType.SeriesSelection,function(I){return new u.SeriesSelectionModifier(I)},!0),(0,y.registerType)(p.EBaseType.Chart2DModifier,g.EChart2DModifierType.AnnotationHover,function(I){return new m.AnnotationHoverModifier(I)},!0),(0,y.registerType)(p.EBaseType.Chart2DModifier,g.EChart2DModifierType.XAxisDrag,function(I){return new c.XAxisDragModifier(I)},!0),(0,y.registerType)(p.EBaseType.Chart2DModifier,g.EChart2DModifierType.YAxisDrag,function(I){return new d.YAxisDragModifier(I)},!0),(0,y.registerType)(p.EBaseType.Chart2DModifier,g.EChart2DModifierType.ZoomExtents,function(I){return new f.ZoomExtentsModifier(I)},!0),(0,y.registerType)(p.EBaseType.Chart2DModifier,g.EChart2DModifierType.PolarZoomExtents,function(I){return new A.PolarZoomExtentsModifier(I)},!0),(0,y.registerType)(p.EBaseType.Chart2DModifier,g.EChart2DModifierType.ZoomPan,function(I){return new h.ZoomPanModifier(I)},!0),(0,y.registerType)(p.EBaseType.Chart2DModifier,g.EChart2DModifierType.PolarPan,function(I){return new w.PolarPanModifier(I)},!0),(0,y.registerType)(p.EBaseType.Chart2DModifier,g.EChart2DModifierType.OverviewRangeSelection,function(I){return new t.OverviewRangeSelectionModifier(I)},!0),(0,y.registerType)(p.EBaseType.Chart2DModifier,g.EChart2DModifierType.Legend,function(I){return new i.LegendModifier(I)},!0),(0,y.registerType)(p.EBaseType.Chart2DModifier,g.EChart2DModifierType.PolarLegend,function(I){return new T.PolarLegendModifier(I)},!0);var W=function(I){typeof I=="string"&&(I=JSON.parse(I,v.chartReviver));var Q=[];if(Array.isArray(I))for(var Z=0,ee=I;Z<ee.length;Z++){var ie=ee[Z];Q.push(K(ie))}else Q.push(K(I));return Q};$T.buildModifiers=W;var K=function(I){return I.type===g.EChart2DModifierType.Custom?(0,y.createType)(p.EBaseType.Chart2DModifier,I.customType,null,I.options):(0,y.createType)(p.EBaseType.Chart2DModifier,I.type,null,I.options)};(0,y.registerType)(p.EBaseType.Chart3DModifier,g.EChart3DModifierType.MouseWheelZoom,function(I){return new L.MouseWheelZoomModifier3D(I)},!0),(0,y.registerType)(p.EBaseType.Chart3DModifier,g.EChart3DModifierType.Orbit,function(I){return new D.OrbitModifier3D(I)},!0),(0,y.registerType)(p.EBaseType.Chart3DModifier,g.EChart3DModifierType.PinchZoom,function(I){return new k.PinchZoomModifier3D(I)},!0),(0,y.registerType)(p.EBaseType.Chart3DModifier,g.EChart3DModifierType.Tooltip,function(I){return new j.TooltipModifier3D(I)},!0),(0,y.registerType)(p.EBaseType.Chart3DModifier,g.EChart3DModifierType.ZoomExtents,function(I){return new N.ResetCamera3DModifier(I)},!0),(0,y.registerType)(p.EBaseType.Chart3DModifier,g.EChart3DModifierType.Legend,function(I){return new V.LegendModifier3D(I)},!0);var H=function(I){typeof I=="string"&&(I=JSON.parse(I,v.chartReviver));var Q=[];if(Array.isArray(I))for(var Z=0,ee=I;Z<ee.length;Z++){var ie=ee[Z];Q.push(U(ie))}else Q.push(U(I));return Q};$T.buildModifiers3D=H;var U=function(I){return I.type===g.EChart3DModifierType.Custom?(0,y.createType)(p.EBaseType.Chart3DModifier,I.customType,null,I.options):(0,y.createType)(p.EBaseType.Chart3DModifier,I.type,null,I.options)};return $T}var cW={},QI={},poe;function iPe(){if(poe)return QI;poe=1,Object.defineProperty(QI,"__esModule",{value:!0}),QI.DataPointSelectionPaletteProvider=void 0;var r=I1(),e=tn(),i=mi(),n=H0(),t=(function(){function a(s){this.strokePaletteMode=n.EStrokePaletteMode.SOLID,this.fillPaletteMode=n.EFillPaletteMode.SOLID,s!=null&&s.stroke&&(this.selectedStroke=(0,i.parseColorToUIntArgb)(s==null?void 0:s.stroke)),s!=null&&s.fill&&(this.selectedFill=(0,i.parseColorToUIntArgb)(s==null?void 0:s.fill)),this.selectedPointMarker={stroke:this.selectedStroke,fill:this.selectedFill}}return a.prototype.onAttached=function(s){this.seriesType?this.seriesType!==s.type&&(s.paletteProvider=n.DefaultPaletteProvider.createEmpty(),console.error("One instance of a DataPointSelectionPaletteProvider cannot be shared between series of different types")):this.seriesType=s.type;var l=[e.ESeriesType.OhlcSeries,e.ESeriesType.CandlestickSeries,e.ESeriesType.ColumnSeries,e.ESeriesType.StackedColumnSeries,e.ESeriesType.RectangleSeries];l.includes(this.seriesType)||(this.selectedStroke=void 0);var u=[e.ESeriesType.StackedColumnSeries,e.ESeriesType.ColumnSeries,e.ESeriesType.CandlestickSeries,e.ESeriesType.RectangleSeries];u.includes(this.seriesType)||(this.selectedFill=void 0)},a.prototype.onDetached=function(){},a.prototype.overridePointMarkerArgb=function(s,l,u,c,d){if(d!=null&&d.isSelected)return this.selectedPointMarker},a.prototype.overrideStrokeArgb=function(s,l,u,c,d){if(d!=null&&d.isSelected)return this.selectedStroke},a.prototype.overrideFillArgb=function(s,l,u,c,d){if(d!=null&&d.isSelected)return this.selectedFill},a.prototype.toJSON=function(){return{type:r.EPaletteProviderType.DataPointSelection,options:{stroke:o(this.selectedStroke,i.parseArgbToHtmlColor),fill:o(this.selectedFill,i.parseArgbToHtmlColor)}}},a})();QI.DataPointSelectionPaletteProvider=t;var o=function(a,s){if(a)return s(a)};return QI}var Tx={},e2={},t2={},goe;function lb(){if(goe)return t2;goe=1,Object.defineProperty(t2,"__esModule",{value:!0}),t2.BaseAnimationStyle=void 0;var r=Ap(),e=mi(),i=o8(),n=OM(),t=(function(){function o(a){var s,l,u;this.opacity=void 0,this.strokeProperty=void 0,this.strokeThickness=(s=a==null?void 0:a.strokeThickness)!==null&&s!==void 0?s:this.strokeThickness,this.stroke=(l=a==null?void 0:a.stroke)!==null&&l!==void 0?l:this.strokeProperty,a!=null&&a.pointMarker&&(this.pointMarker=a.pointMarker.type===r.EPointMarkerType.Sprite?new i.CustomPointMarkerStyle(a.pointMarker):new n.PointMarkerStyle(a.pointMarker)),this.opacity=(u=a==null?void 0:a.opacity)!==null&&u!==void 0?u:this.opacity}return Object.defineProperty(o.prototype,"stroke",{get:function(){return this.strokeProperty},set:function(a){this.strokeProperty=a,a&&(this.strokeARGBProperty=(0,e.parseColorToUIntArgb)(a))},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"strokeARGB",{get:function(){return this.strokeARGBProperty},enumerable:!1,configurable:!0}),o})();return t2.BaseAnimationStyle=t,t2}var voe;function Op(){if(voe)return e2;voe=1,Object.defineProperty(e2,"__esModule",{value:!0}),e2.SeriesAnimation=void 0;var r=Jn(),e=hc(),i=$o(),n=mi(),t=Qn(),o=ob(),a=lb(),s=OM(),l=(function(){function u(c){var d,f,h,p,g;if(this.delay=0,this.duration=3e3,this.ease=e.easing.linear,this.isFadeEffectAnimation=!1,this.isOnStartAnimation=!1,this.typeMap=new Map,this.delay=(d=c==null?void 0:c.delay)!==null&&d!==void 0?d:this.delay,this.duration=(f=c==null?void 0:c.duration)!==null&&f!==void 0?f:this.duration,this.isFadeEffectAnimation=(h=c==null?void 0:c.fadeEffect)!==null&&h!==void 0?h:this.isFadeEffectAnimation,c!=null&&c.ease&&typeof c.ease=="string"&&(c.ease=e.easing[c.ease]),this.ease=(p=c==null?void 0:c.ease)!==null&&p!==void 0?p:this.ease,this.reverse=(g=c==null?void 0:c.reverse)!==null&&g!==void 0?g:this.reverse,c!=null&&c.onCompleted)if(typeof c.onCompleted=="string"){this.typeMap.set("onCompleted",c.onCompleted);var v=(0,r.getFunction)(i.EBaseType.OptionFunction,c.onCompleted);this.onCompleted=v}else this.onCompleted=c.onCompleted}return u.prototype.toJSON=function(){var c={delay:this.delay,duration:this.duration,ease:this.ease.name,fadeEffect:this.isFadeEffectAnimation,reverse:this.reverse,onCompleted:this.typeMap.get("onCompleted")};return{type:this.type,options:c}},u.prototype.calculateAnimationValues=function(c,d,f,h,p){},u.prototype.calculateDataSeriesAnimationValues=function(c,d,f,h,p){var g=d.size();if(g!==f.size())throw new Error("DoubleVectors with initialValues and finalValues must have the same length");typeof h.getRaw!="function"&&h.resize(g,0);for(var v=(0,t.vectorToArrayViewF64)(d,c),y=(0,t.vectorToArrayViewF64)(f,c),m=(0,t.vectorToArrayViewF64)(h,c),b=0;b<g;b++)m[b]=o.animationHelpers.interpolateNumber(v[b],y[b],p)},u.prototype.getSeriesStyle=function(c){var d,f,h=c;if(!h.isStacked)return new a.BaseAnimationStyle({stroke:h.stroke,strokeThickness:h.strokeThickness,opacity:h.opacity,pointMarker:(f=(d=h.pointMarker)===null||d===void 0?void 0:d.getPointMarkerStyle())!==null&&f!==void 0?f:new s.PointMarkerStyle})},u.prototype.updateSeriesProperties=function(c,d,f){var h,p,g,v,y;this.reverse&&(f=1-f);var m=c,b=m.pointMarker;if(this.isStyleAnimation){if(this.styles.strokeThickness!==void 0){var S=d==null?void 0:d.strokeThickness,_=this.styles.strokeThickness;m.strokeThickness=S+(_-S)*f}if(this.styles.stroke!==void 0){var C=o.animationHelpers.interpolateColor(d.strokeARGB,this.styles.strokeARGB,f);m.stroke=(0,n.parseArgbToHtmlColor)(C)}if(this.styles.opacity!==void 0&&(m.opacity=o.animationHelpers.interpolateNumber(d.opacity,this.styles.opacity,f)),this.styles.pointMarker!==void 0){m.pointMarker.suspendUpdates();var T=(p=(h=d.pointMarker)===null||h===void 0?void 0:h.width)!==null&&p!==void 0?p:0,x=(v=(g=d.pointMarker)===null||g===void 0?void 0:g.height)!==null&&v!==void 0?v:0;if(m.pointMarker.width=o.animationHelpers.interpolateNumber(T,this.styles.pointMarker.width,f),m.pointMarker.height=o.animationHelpers.interpolateNumber(x,this.styles.pointMarker.height,f),!this.styles.pointMarker.isCustomPointMarker){var A=d.pointMarker,w=this.styles.pointMarker,L=(y=A==null?void 0:A.strokeThickness)!==null&&y!==void 0?y:0;m.pointMarker.strokeThickness=o.animationHelpers.interpolateNumber(L,w.strokeThickness,f);var k=o.animationHelpers.interpolateColor(A.fillARGB,w.fillARGB,f);m.pointMarker.fill=(0,n.parseArgbToHtmlColor)(k);var D=o.animationHelpers.interpolateColor(A.strokeARGB,w.strokeARGB,f);m.pointMarker.stroke=(0,n.parseArgbToHtmlColor)(D)}m.pointMarker.resumeUpdates()}}if(this.isFadeEffectAnimation){var j=d.opacity*f;m.opacity=j,b&&(b.opacity=j)}},Object.defineProperty(u.prototype,"isStyleAnimation",{get:function(){return!!this.styles},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"isDataSeriesAnimation",{get:function(){return!!this.dataSeries},enumerable:!1,configurable:!0}),u})();return e2.SeriesAnimation=l,e2}var yoe;function nPe(){if(yoe)return Tx;yoe=1;var r=Tx&&Tx.__extends||(function(){var t=function(o,a){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");t(o,a);function s(){this.constructor=o}o.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}})();Object.defineProperty(Tx,"__esModule",{value:!0}),Tx.FadeAnimation=void 0;var e=Yd(),i=Op(),n=(function(t){r(o,t);function o(a){var s=this,l;return s=t.call(this,a)||this,s.type=e.EAnimationType.Fade,s.isFadeEffectAnimation=(l=a==null?void 0:a.fadeEffect)!==null&&l!==void 0?l:!0,s}return o.prototype.calculateAnimationValues=function(a,s,l,u,c){a.SCRTAnimationHelperFade(s,u,l)},o})(i.SeriesAnimation);return Tx.FadeAnimation=n,Tx}var xx={},moe;function oPe(){if(moe)return xx;moe=1;var r=xx&&xx.__extends||(function(){var t=function(o,a){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");t(o,a);function s(){this.constructor=o}o.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}})();Object.defineProperty(xx,"__esModule",{value:!0}),xx.ScaleAnimation=void 0;var e=Yd(),i=Op(),n=(function(t){r(o,t);function o(a){var s=this,l;return s=t.call(this,a)||this,s.type=e.EAnimationType.Scale,s.zeroLine=0,s.isOnStartAnimation=!0,s.zeroLine=(l=a==null?void 0:a.zeroLine)!==null&&l!==void 0?l:s.zeroLine,s}return o.prototype.calculateAnimationValues=function(a,s,l,u,c){c===void 0&&(c=!1);var d=c?0:this.zeroLine;a.SCRTAnimationHelperScale(s,d,this.reverse?1-u:u,l)},o.prototype.toJSON=function(){var a=t.prototype.toJSON.call(this),s={zeroLine:this.zeroLine};return Object.assign(a.options,s),a},o})(i.SeriesAnimation);return xx.ScaleAnimation=n,xx}var Ex={},boe;function aPe(){if(boe)return Ex;boe=1;var r=Ex&&Ex.__extends||(function(){var t=function(o,a){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");t(o,a);function s(){this.constructor=o}o.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}})();Object.defineProperty(Ex,"__esModule",{value:!0}),Ex.SweepAnimation=void 0;var e=Yd(),i=Op(),n=(function(t){r(o,t);function o(a){var s=t.call(this,a)||this;return s.type=e.EAnimationType.Sweep,s.isOnStartAnimation=!0,s}return o.prototype.updateSeriesProperties=function(a,s,l){t.prototype.updateSeriesProperties.call(this,a,s,l),l===0?a.dataSeries.containsNaN=!0:l===1&&(a.dataSeries.containsNaN=!1)},o.prototype.calculateAnimationValues=function(a,s,l,u,c){a.SCRTAnimationHelperSweep(s,this.reverse?1-u:u,l)},o})(i.SeriesAnimation);return Ex.SweepAnimation=n,Ex}var Ax={},Soe;function sPe(){if(Soe)return Ax;Soe=1;var r=Ax&&Ax.__extends||(function(){var t=function(o,a){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");t(o,a);function s(){this.constructor=o}o.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}})();Object.defineProperty(Ax,"__esModule",{value:!0}),Ax.WaveAnimation=void 0;var e=Yd(),i=Op(),n=(function(t){r(o,t);function o(a){var s=this,l,u;return s=t.call(this,a)||this,s.type=e.EAnimationType.Wave,s.pointDurationFraction=.2,s.zeroLine=0,s.isOnStartAnimation=!0,s.pointDurationFraction=(l=a==null?void 0:a.pointDurationFraction)!==null&&l!==void 0?l:s.pointDurationFraction,s.zeroLine=(u=a==null?void 0:a.zeroLine)!==null&&u!==void 0?u:s.zeroLine,s}return o.prototype.updateSeriesProperties=function(a,s,l){t.prototype.updateSeriesProperties.call(this,a,s,l),l===0?a.dataSeries.containsNaN=!0:l===1&&(a.dataSeries.containsNaN=!1)},o.prototype.calculateAnimationValues=function(a,s,l,u,c){c===void 0&&(c=!1);var d=this.pointDurationFraction,f=c?0:this.zeroLine;a.SCRTAnimationHelperWave(s,d,f,this.reverse?1-u:u,l)},o.prototype.toJSON=function(){var a=t.prototype.toJSON.call(this),s={zeroLine:this.zeroLine,pointDurationFraction:this.pointDurationFraction};return Object.assign(a.options,s),a},o})(i.SeriesAnimation);return Ax.WaveAnimation=n,Ax}var wx={},r2={},_oe;function VM(){if(_oe)return r2;_oe=1,Object.defineProperty(r2,"__esModule",{value:!0}),r2.DataLabelState=void 0;var r=oi(),e=mi(),i=Qn(),n=Hi(),t=(function(){function o(a,s,l,u,c,d){var f,h,p,g,v,y,m,b,S,_,C;this.dataLabels=[],this.indexProperty=0,this.xCoordCache=void 0,this.yCoordCache=void 0;var T=s.pointSeries,x=s.xCoordinateCalculator.isCategoryCoordinateCalculator;if(this.style=n.DpiHelper.adjustTextStyle(l),this.color=(0,e.parseColorToUIntArgb)(u),this.xValues=(0,i.vectorToArrayViewF64)(x?T.indexes:T.xValues,a.webAssemblyContext),this.yValues=(0,i.vectorToArrayViewF64)(c,a.webAssemblyContext),this.indexes=(0,i.vectorToArrayViewF64)((f=s.pointSeries)===null||f===void 0?void 0:f.indexes,a.webAssemblyContext),this.parentSeries=d,this.renderPassData=s,!((h=this.parentSeries.dataSeries)===null||h===void 0)&&h.yFinalAnimationValues&&(this.yFinalValues=(0,i.vectorToArrayViewF64)((p=this.parentSeries.dataSeries)===null||p===void 0?void 0:p.yFinalAnimationValues,a.webAssemblyContext)),this.isXFlipped=(s.isVerticalChart?this.renderPassData.yCoordinateCalculator:this.renderPassData.xCoordinateCalculator).hasFlippedCoordinates,this.isYFlipped=(s.isVerticalChart?this.renderPassData.xCoordinateCalculator:this.renderPassData.yCoordinateCalculator).hasFlippedCoordinates,s.indexRange)this.indexStart=T.resampled?0:s.indexRange.min,this.pointCount=T.resampled?T.count:s.indexRange.diff+1,this.indexEnd=T.resampled?T.count-1:s.indexRange.max,this.pointCount>1?this.pointGap=s.isVerticalChart?Math.abs(this.yCoord(this.indexStart)-this.yCoord(this.indexEnd))/this.pointCount:Math.abs(this.xCoord(this.indexStart)-this.xCoord(this.indexEnd))/this.pointCount:this.pointGap=1/0;else{var A=this.parentSeries.getIndicesRange(new r.NumberRange(s.xCoordinateCalculator.visibleMin,s.xCoordinateCalculator.visibleMax),x);this.indexStart=A.min,this.indexEnd=A.max,this.pointCount=s.indexRange.diff+1,this.pointCount>1?this.pointGap=s.isVerticalChart?Math.abs(this.yCoord(this.indexStart)-this.yCoord(this.indexEnd))/this.pointCount:Math.abs(this.xCoord(this.indexStart)-this.xCoord(this.indexEnd))/this.pointCount:this.pointGap=1/0}this.index=this.indexStart,this.font=a.getFont(this.style),this.xPadding=((v=(g=this.style.padding)===null||g===void 0?void 0:g.left)!==null&&v!==void 0?v:0)+((m=(y=this.style.padding)===null||y===void 0?void 0:y.right)!==null&&m!==void 0?m:0),this.yPadding=((S=(b=this.style.padding)===null||b===void 0?void 0:b.top)!==null&&S!==void 0?S:0)+((C=(_=this.style.padding)===null||_===void 0?void 0:_.bottom)!==null&&C!==void 0?C:0),this.fifoSweeping=d.dataSeries.fifoSweeping}return Object.defineProperty(o.prototype,"index",{get:function(){return this.indexProperty},set:function(a){this.xCoordCache=void 0,this.yCoordCache=void 0,this.indexProperty=a},enumerable:!1,configurable:!0}),o.prototype.getIndexInternal=function(a){var s=a??this.indexProperty;return this.isXFlipped||(s=this.indexEnd-(s-this.indexStart)),s},o.prototype.xVal=function(a){return this.xValues[this.getIndexInternal(a)]},o.prototype.yVal=function(a){return this.yValues[this.getIndexInternal(a)]},o.prototype.yValAfterAnimation=function(a){return this.yFinalValues?this.yFinalValues[this.getIndexInternal(a)]:this.yVal(a)},o.prototype.xCoord=function(a){return this.renderPassData.isVerticalChart?this.yCoordInternal(a):this.xCoordInternal(a)},o.prototype.yCoord=function(a){return this.renderPassData.isVerticalChart?this.xCoordInternal(a):this.yCoordInternal(a)},o.prototype.hasNext=function(a){var s=a??this.indexProperty;return this.isXFlipped?s<this.indexEnd:s>0},Object.defineProperty(o.prototype,"lastLabel",{get:function(){if(this.dataLabels.length>0)return this.dataLabels[this.dataLabels.length-1]},enumerable:!1,configurable:!0}),o.prototype.getMetaData=function(){var a=this.indexes[this.getIndexInternal()];return this.parentSeries.dataSeries.getMetadataAt(a,this.fifoSweeping)},Object.defineProperty(o.prototype,"isVerticalChart",{get:function(){return this.renderPassData.isVerticalChart},enumerable:!1,configurable:!0}),o.prototype.getXCoord=function(a){return this.renderPassData.xCoordinateCalculator.getCoordinate(a)},o.prototype.getYCoord=function(a){return this.renderPassData.yCoordinateCalculator.getCoordinate(a)},o.prototype.xCoordInternal=function(a){return a!==void 0?this.renderPassData.xCoordinateCalculator.getCoordinate(this.xVal(a)):this.xCoordCache!==void 0?this.xCoordCache:(this.xCoordCache=this.renderPassData.xCoordinateCalculator.getCoordinate(this.xVal()),this.xCoordCache)},o.prototype.yCoordInternal=function(a){return a!==void 0?this.renderPassData.yCoordinateCalculator.getCoordinate(this.yVal(a)):this.yCoordCache!==void 0?this.yCoordCache:(this.yCoordCache=this.renderPassData.yCoordinateCalculator.getCoordinate(this.yVal()),this.yCoordCache)},o})();return r2.DataLabelState=t,r2}var Ox={},Dx={},dW={},Poe;function oX(){return Poe||(Poe=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EDataLabelSkipMode=void 0,(function(e){e.ShowAll="ShowAll",e.SkipIfOverlapPrevious="SkipIfOverlapPrevious",e.SkipIfOverlapNext="SkipIfOverlapNext",e.SkipIfSame="SkipIfSame"})(r.EDataLabelSkipMode||(r.EDataLabelSkipMode={}))})(dW)),dW}var Coe;function Mg(){if(Coe)return Dx;Coe=1;var r=Dx&&Dx.__extends||(function(){var y=function(m,b){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,_){S.__proto__=_}||function(S,_){for(var C in _)Object.prototype.hasOwnProperty.call(_,C)&&(S[C]=_[C])},y(m,b)};return function(m,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");y(m,b);function S(){this.constructor=m}m.prototype=b===null?Object.create(b):(S.prototype=b.prototype,new S)}})();Object.defineProperty(Dx,"__esModule",{value:!0}),Dx.DataLabelProvider=void 0;var e=ni(),i=Ii(),n=vn(),t=Du(),o=ku(),a=oX(),s=wp(),l=Il(),u=Xi(),c=RM(),d=VM(),f=$F(),h=Yo(),p=lc(),g=xg(),v=(function(y){r(m,y);function m(b){var S=this,_,C,T,x,A,w,L,k,D,j,N,V;return S=y.call(this,b)||this,S.type=o.EDataLabelProviderType.Default,S.dataLabels=[],S.updateTextInAnimation=!1,S.pointGapThresholdProperty=0,S.pointCountThresholdProperty=1/0,S.numericFormatProperty=s.ENumericFormat.Decimal,S.engineeringPrefixProperty={},S.precisionProperty=1,S.skipModeProperty=a.EDataLabelSkipMode.SkipIfOverlapPrevious,S.skipNumberProperty=0,S.horizontalTextPositionProperty=t.EHorizontalTextPosition.Right,S.verticalTextPositionProperty=t.EVerticalTextPosition.Above,S.isEnabledProperty=!0,S.pointGapThresholdProperty=(_=b==null?void 0:b.pointGapThreshold)!==null&&_!==void 0?_:S.pointGapThresholdProperty,S.pointCountThresholdProperty=(C=b==null?void 0:b.pointCountThreshold)!==null&&C!==void 0?C:S.pointCountThresholdProperty,S.numericFormatProperty=(T=b==null?void 0:b.numericFormat)!==null&&T!==void 0?T:S.numericFormatProperty,S.engineeringPrefixProperty=(x=b==null?void 0:b.engineeringPrefix)!==null&&x!==void 0?x:S.engineeringPrefixProperty,S.precision=(A=b==null?void 0:b.precision)!==null&&A!==void 0?A:S.precisionProperty,S.skipNumberProperty=(w=b==null?void 0:b.skipNumber)!==null&&w!==void 0?w:S.skipNumberProperty,S.skipModeProperty=(L=b==null?void 0:b.skipMode)!==null&&L!==void 0?L:S.skipModeProperty,S.metaDataSelector=b==null?void 0:b.metaDataSelector,S.ySelector=(k=b==null?void 0:b.ySelector)!==null&&k!==void 0?k:(function(W){return W.yValues}),S.updateTextInAnimation=(D=b==null?void 0:b.updateTextInAnimation)!==null&&D!==void 0?D:S.updateTextInAnimation,S.horizontalTextPositionProperty=(j=b==null?void 0:b.horizontalTextPosition)!==null&&j!==void 0?j:S.horizontalTextPosition,S.verticalTextPositionProperty=(N=b==null?void 0:b.verticalTextPosition)!==null&&N!==void 0?N:S.verticalTextPosition,S.isEnabledProperty=(V=b==null?void 0:b.isEnabled)!==null&&V!==void 0?V:S.isEnabledProperty,S}return m.prototype.onAttach=function(b,S){e.Guard.notNull(b,"webAssemblyContext"),e.Guard.notNull(S,"parentSeries"),this.webAssemblyContext=b,this.parentSeries=S},Object.defineProperty(m.prototype,"pointGapThreshold",{get:function(){return this.pointGapThresholdProperty},set:function(b){this.pointGapThresholdProperty=b,this.invalidateParent()},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"pointCountThreshold",{get:function(){return this.pointCountThresholdProperty},set:function(b){this.pointCountThresholdProperty=b,this.invalidateParent()},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"skipMode",{get:function(){return this.skipModeProperty},set:function(b){this.skipModeProperty=b,this.invalidateParent()},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"skipNumber",{get:function(){return this.skipNumberProperty},set:function(b){this.skipNumberProperty=b,this.invalidateParent()},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"numericFormat",{get:function(){return this.numericFormatProperty},set:function(b){this.numericFormatProperty=b,this.invalidateParent()},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"engineeringPrefix",{get:function(){return this.engineeringPrefixProperty},set:function(b){this.engineeringPrefixProperty=b,this.invalidateParent()},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"precision",{get:function(){return this.precisionProperty},set:function(b){this.precisionProperty=b,this.invalidateParent()},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"horizontalTextPosition",{get:function(){return this.horizontalTextPositionProperty},set:function(b){this.horizontalTextPositionProperty=b,this.invalidateParent()},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"verticalTextPosition",{get:function(){return this.verticalTextPositionProperty},set:function(b){this.verticalTextPositionProperty=b,this.invalidateParent()},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"isEnabled",{get:function(){return this.isEnabledProperty},set:function(b){this.isEnabledProperty!==b&&(this.isEnabledProperty=b,this.invalidateParent())},enumerable:!1,configurable:!0}),m.prototype.getText=function(b){var S;if(this.metaDataSelector)return this.metaDataSelector(b.getMetaData());var _=!this.updateTextInAnimation&&b.parentSeries.isRunningAnimation,C=_?b.yValAfterAnimation():b.yVal();if(C===C)return this.engineeringPrefix?(0,l.formatNumber)(C,this.numericFormat,this.precision,this.engineeringPrefixProperty):(0,l.formatNumber)(C,(S=this.numericFormat)!==null&&S!==void 0?S:s.ENumericFormat.Decimal,this.precision)},m.prototype.shouldGenerate=function(b){if(b.pointCount>this.pointCountThresholdProperty||!b.font)return!1;var S=this.getText(b),_=(0,u.getTextBounds)(this.webAssemblyContext);return b.font.CalculateStringBounds(S??"",_,this.getLineSpacing()),b.pointGap>=_.m_fWidth*this.pointGapThreshold},m.prototype.getPosition=function(b,S){var _=b.xCoord(),C=b.yCoord(),T=new i.Point(_,C),x=(0,p.getNativeTextPosition)(_,C,this.horizontalTextPositionToAnchorPoint(this.horizontalTextPosition),this.verticalTextPositionToAnchorPoint(this.verticalTextPosition),S,this.getPadding());return{position:new i.Point(x.x,x.y),rotationAngle:0,rotationCenter:T}},m.prototype.getColor=function(b,S){return b.color},m.prototype.shouldSkipLabel=function(b,S){var _,C=b.parentSeries.parentSurface.seriesViewRect;if(S.rect.y<0||S.rect.bottom>C.height||S.rect.x<0||S.rect.right>C.width)return!0;switch(this.skipModeProperty){case a.EDataLabelSkipMode.SkipIfOverlapPrevious:return this.skipIfOverlapPrevious(b,S);case a.EDataLabelSkipMode.SkipIfOverlapNext:return this.skipIfOverlapNext(b,S);case a.EDataLabelSkipMode.SkipIfSame:return((_=b.lastLabel)===null||_===void 0?void 0:_.text)===S.text;case a.EDataLabelSkipMode.ShowAll:return!1;default:return!1}},m.prototype.getDataLabelState=function(b,S,_,C,T,x){return new d.DataLabelState(b,S,_,C,T,x)},m.prototype.generateDataLabels=function(b,S){if(this.dataLabels=[],!(!this.isEnabled||!this.style||!this.style.fontFamily||!this.style.fontSize)){var _=this.ySelector(S.pointSeries);if(!(!_||_.size()===0)){this.state=this.getDataLabelState(b,S,this.style,this.color,_,this.parentSeries);var C=this.parentSeries.dataSeries,T=C.fifoCapacity,x=C.fifoSweeping,A=C.fifoSweepingGap,w=C.fifoStartIndex,L=(0,u.getTextBounds)(this.webAssemblyContext);if(this.shouldGenerate(this.state)){for(var k=0,D=Math.max(0,this.skipNumberProperty),j=this.state.indexStart;j<=this.state.indexEnd;j+=D+1)if(this.state.index=this.skipModeProperty===a.EDataLabelSkipMode.SkipIfOverlapNext?this.state.indexEnd-(j-this.state.indexStart):j,!(x&&this.state.pointCount===T&&this.state.index>=w&&this.state.index<w+A)){var N=this.getText(this.state);if(N){this.state.font.CalculateStringBounds(N??"",L,this.getLineSpacing());var V=this.getPosition(this.state,L),W=V.position,K=V.rotationAngle,H=V.rotationCenter,U=this.getColor(this.state,N),I=L.GetLineBounds(0),Q=I.m_fHeight;I.delete();var Z={text:N,position:W,rect:new n.Rect(W.x,W.y-Q,L.m_fWidth,L.m_fHeight),color:U,dataX:this.state.xCoord(),dataY:this.state.yCoord(),rotationAngle:K,rotationCenter:H};this.shouldSkipLabel(this.state,Z)?k++:this.state.dataLabels.push(Z)}}k>100&&k/(this.state.indexEnd-this.state.indexStart)>.8&&f.performanceWarnings.dataLabelsSkippingMany.warn(),this.dataLabels=this.state.dataLabels}}}},m.prototype.toJSON=function(){var b=y.prototype.toJSON.call(this),S={numericFormat:this.numericFormat,pointGapThreshold:this.pointGapThreshold,precision:this.precision,pointCountThreshold:this.pointCountThreshold,skipNumber:this.skipNumber,skipMode:this.skipMode,updateTextInAnimation:this.updateTextInAnimation,horizontalTextPosition:this.horizontalTextPosition,verticalTextPosition:this.verticalTextPosition,isEnabled:this.isEnabled,engineeringPrefix:this.engineeringPrefixProperty};return Object.assign(b.options,S),b},m.prototype.horizontalTextPositionToAnchorPoint=function(b){return b===t.EHorizontalTextPosition.Left?g.EHorizontalAnchorPoint.Right:b===t.EHorizontalTextPosition.Right?g.EHorizontalAnchorPoint.Left:g.EHorizontalAnchorPoint.Center},m.prototype.verticalTextPositionToAnchorPoint=function(b){return b===t.EVerticalTextPosition.Above?g.EVerticalAnchorPoint.Bottom:b===t.EVerticalTextPosition.Below?g.EVerticalAnchorPoint.Top:g.EVerticalAnchorPoint.Center},m.prototype.getPadding=function(){var b;return(b=this.style.padding)!==null&&b!==void 0?b:h.Thickness.fromNumber(0)},m.prototype.skipIfOverlapPrevious=function(b,S){var _=b.lastLabel;return!(!_||_.rect.right+b.xPadding<S.rect.left||Math.abs(_.rect.y-S.rect.y)>S.rect.height+b.yPadding)},m.prototype.skipIfOverlapNext=function(b,S){var _=b.lastLabel;return!(!_||S.rect.right+b.xPadding<_.rect.left||Math.abs(_.rect.y-S.rect.y)>S.rect.height+b.yPadding)},m})(c.BaseDataLabelProvider);return Dx.DataLabelProvider=v,Dx}var Toe;function X1(){if(Toe)return Ox;Toe=1;var r=Ox&&Ox.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(u[d]=c[d])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})();Object.defineProperty(Ox,"__esModule",{value:!0}),Ox.LineSeriesDataLabelProvider=void 0;var e=Ii(),i=ku(),n=lc(),t=Mg(),o=(function(a){r(s,a);function s(l){var u=this,c;return u=a.call(this,l)||this,u.type=i.EDataLabelProviderType.Line,u.aboveBelowProperty=!0,u.aboveBelowProperty=(c=l==null?void 0:l.aboveBelow)!==null&&c!==void 0?c:u.aboveBelow,u}return Object.defineProperty(s.prototype,"aboveBelow",{get:function(){return this.aboveBelowProperty},set:function(l){this.aboveBelowProperty=l,this.invalidateParent()},enumerable:!1,configurable:!0}),s.prototype.generateDataLabels=function(l,u){var c=this.parentSeries;this.yAdj=Math.ceil(c.strokeThickness/2),c.pointMarker&&(this.yAdj=Math.max(this.yAdj,Math.ceil(c.pointMarker.height/2))),a.prototype.generateDataLabels.call(this,l,u)},s.prototype.getPosition=function(l,u){var c,d,f,h,p,g;if(this.aboveBelow){var v=l.xCoord(),y=l.yCoord(),m=new e.Point(v,y),b=u.GetLineBounds(0),S=u.m_fHeight-b.m_fHeight;if(b.delete(),y-=S,v+=(d=(c=this.style.padding)===null||c===void 0?void 0:c.left)!==null&&d!==void 0?d:0,l.hasNext()){var _=l.yCoord(l.index+1),C=l.xCoord(l.index+1);C>v&&_>y||C<v&&_<y?y-=this.yAdj+((h=(f=l.style.padding)===null||f===void 0?void 0:f.bottom)!==null&&h!==void 0?h:1):y+=(0,n.getTextHeightToBaseline)(u)+this.yAdj+((g=(p=l.style.padding)===null||p===void 0?void 0:p.top)!==null&&g!==void 0?g:1)}return{position:new e.Point(v,y),rotationAngle:0,rotationCenter:m}}else return a.prototype.getPosition.call(this,l,u)},s.prototype.toJSON=function(){var l=a.prototype.toJSON.call(this),u={aboveBelow:this.aboveBelow};return Object.assign(l.options,u),l},s})(t.DataLabelProvider);return Ox.LineSeriesDataLabelProvider=o,Ox}var xoe;function aX(){if(xoe)return wx;xoe=1;var r=wx&&wx.__extends||(function(){var u=function(c,d){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,h){f.__proto__=h}||function(f,h){for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(f[p]=h[p])},u(c,d)};return function(c,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");u(c,d);function f(){this.constructor=c}c.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}})();Object.defineProperty(wx,"__esModule",{value:!0}),wx.BandSeriesDataLabelProvider=void 0;var e=Ii(),i=ku(),n=wp(),t=Il(),o=lc(),a=VM(),s=X1(),l=(function(u){r(c,u);function c(d){var f=this,h;return f=u.call(this,d)||this,f.type=i.EDataLabelProviderType.Band,f.singleLabelProperty=!1,f.singleLabelProperty=(h=d==null?void 0:d.singleLabel)!==null&&h!==void 0?h:f.singleLabelProperty,f}return Object.defineProperty(c.prototype,"singleLabel",{get:function(){return this.singleLabelProperty},set:function(d){this.singleLabelProperty=d,this.invalidateParent()},enumerable:!1,configurable:!0}),c.prototype.getText=function(d){if(this.singleLabel){if(this.state1.index=d.index,this.metaDataSelector){var f=d.renderPassData.pointSeries.indexes.get(d.index);return this.metaDataSelector(d.parentSeries.dataSeries.getMetadataAt(f))}var h=!this.updateTextInAnimation&&d.parentSeries.isRunningAnimation,p=h?d.yValAfterAnimation():d.yVal(),g=h?this.state1.yValAfterAnimation():this.state1.yVal();return this.getSingleLabelText(d.xVal(),p,g)}else return u.prototype.getText.call(this,d)},c.prototype.getSingleLabelText=function(d,f,h){var p,g,v,y;if(f===f||h===h){var m="";return f===f&&(m=(0,t.formatNumber)(f,(p=this.numericFormat)!==null&&p!==void 0?p:n.ENumericFormat.Decimal,(g=this.precision)!==null&&g!==void 0?g:1)),f===f&&h===h&&(m+=`
`),h===h&&(m+=(0,t.formatNumber)(h,(v=this.numericFormat)!==null&&v!==void 0?v:n.ENumericFormat.Decimal,(y=this.precision)!==null&&y!==void 0?y:1)),m}else return},c.prototype.getPosition=function(d,f){if(this.singleLabel){var h=d.xCoord(),p=d.yCoord(),g=this.state1.yCoord(),v=(p+g)/2,y=new e.Point(h,v),m=(0,o.getNativeTextPosition)(h,v,this.horizontalTextPositionToAnchorPoint(this.horizontalTextPosition),this.verticalTextPositionToAnchorPoint(this.verticalTextPosition),f,this.getPadding());return{position:new e.Point(m.x,m.y),rotationAngle:0,rotationCenter:y}}else return u.prototype.getPosition.call(this,d,f)},c.prototype.getY1Provider=function(d){return new s.LineSeriesDataLabelProvider(d.toJSON().options)},c.prototype.generateDataLabels=function(d,f){var h;if(this.singleLabel){var g=f.pointSeries.y1Values;this.state1=new a.DataLabelState(d,f,this.style,this.color,g,this.parentSeries),u.prototype.generateDataLabels.call(this,d,f)}else{u.prototype.generateDataLabels.call(this,d,f);var p=this.getY1Provider(this);p.ySelector=function(v){return v.y1Values},p.onAttach(this.webAssemblyContext,this.parentSeries),p.generateDataLabels(d,f),(h=this.dataLabels).push.apply(h,p.dataLabels)}},c.prototype.toJSON=function(){var d=u.prototype.toJSON.call(this),f={singleLabel:this.singleLabel};return Object.assign(d.options,f),d},c})(s.LineSeriesDataLabelProvider);return wx.BandSeriesDataLabelProvider=l,wx}var Rx={},Eoe;function sX(){if(Eoe)return Rx;Eoe=1;var r=Rx&&Rx.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(u[d]=c[d])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})();Object.defineProperty(Rx,"__esModule",{value:!0}),Rx.BubbleSeriesDataLabelProvider=void 0;var e=Ii(),i=Du(),n=ku(),t=Mg(),o=(function(a){r(s,a);function s(l){var u=this,c,d;return u=a.call(this,l)||this,u.type=n.EDataLabelProviderType.Bubble,u.horizontalTextPositionProperty=(c=l==null?void 0:l.horizontalTextPosition)!==null&&c!==void 0?c:i.EHorizontalTextPosition.Center,u.verticalTextPositionProperty=(d=l==null?void 0:l.verticalTextPosition)!==null&&d!==void 0?d:i.EVerticalTextPosition.Center,u}return s.prototype.getPosition=function(l,u){var c,d,f,h,p,g,v,y,m=l.xCoord(),b=l.yCoord(),S=new e.Point(m,b),_=u.GetLineBounds(0),C=u.m_fHeight-_.m_fHeight;_.delete(),b-=C;var T=Math.abs(l.parentSeries.getBubbleDiameter(l.getIndexInternal(l.index)))/2;return this.horizontalTextPosition===i.EHorizontalTextPosition.Center?m-=u.m_fWidth/2:this.horizontalTextPosition===i.EHorizontalTextPosition.Left?m-=u.m_fWidth+((d=(c=this.style.padding)===null||c===void 0?void 0:c.right)!==null&&d!==void 0?d:0)+T:m+=((h=(f=this.style.padding)===null||f===void 0?void 0:f.right)!==null&&h!==void 0?h:0)+T,this.verticalTextPosition===i.EVerticalTextPosition.Center?b+=u.m_fHeight/2:this.verticalTextPosition===i.EVerticalTextPosition.Below?b+=u.m_fHeight+((g=(p=this.style.padding)===null||p===void 0?void 0:p.top)!==null&&g!==void 0?g:0)+T:b-=((y=(v=this.style.padding)===null||v===void 0?void 0:v.bottom)!==null&&y!==void 0?y:0)+T,{position:new e.Point(m,b),rotationCenter:S,rotationAngle:0}},s})(t.DataLabelProvider);return Rx.BubbleSeriesDataLabelProvider=o,Rx}var Mx={},Aoe;function QR(){return Aoe||(Aoe=1,(function(r){var e=Mx&&Mx.__extends||(function(){var u=function(c,d){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,h){f.__proto__=h}||function(f,h){for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(f[p]=h[p])},u(c,d)};return function(c,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");u(c,d);function f(){this.constructor=c}c.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}})(),i=Mx&&Mx.__assign||function(){return i=Object.assign||function(u){for(var c,d=1,f=arguments.length;d<f;d++){c=arguments[d];for(var h in c)Object.prototype.hasOwnProperty.call(c,h)&&(u[h]=c[h])}return u},i.apply(this,arguments)};Object.defineProperty(r,"__esModule",{value:!0}),r.ColumnSeriesDataLabelProvider=r.EColumnDataLabelPosition=void 0;var n=Ii(),t=ku(),o=Du(),a=Mg(),s;(function(u){u.Outside="Outside",u.Inside="Inside",u.Position="Position"})(s=r.EColumnDataLabelPosition||(r.EColumnDataLabelPosition={}));var l=(function(u){e(c,u);function c(d){var f=this,h;return f=u.call(this,i({horizontalTextPosition:o.EHorizontalTextPosition.Center,verticalTextPosition:o.EVerticalTextPosition.Center},d))||this,f.type=t.EDataLabelProviderType.Column,f.positionModeProperty=s.Outside,f.positionModeProperty=(h=d==null?void 0:d.positionMode)!==null&&h!==void 0?h:f.positionMode,f}return Object.defineProperty(c.prototype,"positionMode",{get:function(){return this.positionModeProperty},set:function(d){this.positionModeProperty=d,this.invalidateParent()},enumerable:!1,configurable:!0}),c.prototype.generateDataLabels=function(d,f){var h=this.parentSeries;this.yAdj=Math.ceil(h.strokeThickness/2),h.pointMarker&&(this.yAdj=Math.max(this.yAdj,Math.ceil(h.pointMarker.height/2))),u.prototype.generateDataLabels.call(this,d,f)},c.prototype.getPosition=function(d,f){var h,p,g,v,y,m,b,S,_,C,T,x,A,w,L,k,D,j,N,V,W,K,H,U,I=d.xCoord(),Q=d.yCoord(),Z=new n.Point(I,Q),ee=f.GetLineBounds(0),ie=f.m_fHeight-ee.m_fHeight;ee.delete(),Q-=ie;var de=d.isXFlipped?-1:1,pe=d.isYFlipped?-1:1;return d.isVerticalChart?(this.verticalTextPosition===o.EVerticalTextPosition.Center?Q+=f.m_fHeight/2:this.verticalTextPosition===o.EVerticalTextPosition.Below?Q+=f.m_fHeight+((p=(h=this.style.padding)===null||h===void 0?void 0:h.top)!==null&&p!==void 0?p:0):Q-=(v=(g=this.style.padding)===null||g===void 0?void 0:g.bottom)!==null&&v!==void 0?v:0,this.positionMode===s.Outside?(d.yVal()*de<0?I+=this.yAdj+((m=(y=d.style.padding)===null||y===void 0?void 0:y.left)!==null&&m!==void 0?m:1):I-=f.m_fWidth+this.yAdj+((S=(b=d.style.padding)===null||b===void 0?void 0:b.right)!==null&&S!==void 0?S:1),{position:new n.Point(I,Q),rotationCenter:Z,rotationAngle:0}):this.positionMode===s.Inside?(d.yVal()*de<0?I-=f.m_fWidth+this.yAdj+((C=(_=d.style.padding)===null||_===void 0?void 0:_.right)!==null&&C!==void 0?C:1):I+=this.yAdj+((x=(T=d.style.padding)===null||T===void 0?void 0:T.left)!==null&&x!==void 0?x:1),{position:new n.Point(I,Q),rotationCenter:Z,rotationAngle:0}):u.prototype.getPosition.call(this,d,f)):(this.horizontalTextPosition===o.EHorizontalTextPosition.Center?I-=f.m_fWidth/2:this.horizontalTextPosition===o.EHorizontalTextPosition.Left?I-=f.m_fWidth+((w=(A=this.style.padding)===null||A===void 0?void 0:A.right)!==null&&w!==void 0?w:0):I+=(k=(L=this.style.padding)===null||L===void 0?void 0:L.left)!==null&&k!==void 0?k:0,this.positionMode===s.Outside?(d.yVal()*pe>=0?Q-=this.yAdj+((j=(D=d.style.padding)===null||D===void 0?void 0:D.bottom)!==null&&j!==void 0?j:1):Q+=f.m_fHeight+this.yAdj+((V=(N=d.style.padding)===null||N===void 0?void 0:N.top)!==null&&V!==void 0?V:1),{position:new n.Point(I,Q),rotationCenter:Z,rotationAngle:0}):this.positionMode===s.Inside?(d.yVal()*pe>=0?Q+=f.m_fHeight+this.yAdj+((K=(W=d.style.padding)===null||W===void 0?void 0:W.top)!==null&&K!==void 0?K:1):Q-=this.yAdj+((U=(H=d.style.padding)===null||H===void 0?void 0:H.bottom)!==null&&U!==void 0?U:1),{position:new n.Point(I,Q),rotationCenter:Z,rotationAngle:0}):u.prototype.getPosition.call(this,d,f))},c.prototype.toJSON=function(){var d=u.prototype.toJSON.call(this),f={positionMode:this.positionMode};return Object.assign(d.options,f),d},c})(a.DataLabelProvider);r.ColumnSeriesDataLabelProvider=l})(Mx)),Mx}var Lx={},woe;function lX(){if(woe)return Lx;woe=1;var r=Lx&&Lx.__extends||(function(){var f=function(h,p){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,v){g.__proto__=v}||function(g,v){for(var y in v)Object.prototype.hasOwnProperty.call(v,y)&&(g[y]=v[y])},f(h,p)};return function(h,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");f(h,p);function g(){this.constructor=h}h.prototype=p===null?Object.create(p):(g.prototype=p.prototype,new g)}})();Object.defineProperty(Lx,"__esModule",{value:!0}),Lx.ContoursDataLabelProvider=void 0;var e=Ii(),i=vn(),n=ku(),t=wp(),o=Ep(),a=Il(),s=mi(),l=Xi(),u=Hi(),c=RM(),d=(function(f){r(h,f);function h(p){var g=this,v,y,m,b;return g=f.call(this,p)||this,g.type=n.EDataLabelProviderType.Contours,g.isEnabledProperty=!0,g.numericFormatProperty=t.ENumericFormat.Decimal,g.precisionProperty=1,g.labelRowCountProperty=10,g.numericFormatProperty=(v=p==null?void 0:p.numericFormat)!==null&&v!==void 0?v:g.numericFormatProperty,g.precision=(y=p==null?void 0:p.precision)!==null&&y!==void 0?y:g.precisionProperty,g.labelRowCountProperty=(m=p==null?void 0:p.labelRowCount)!==null&&m!==void 0?m:g.labelRowCountProperty,g.metaDataSelector=p==null?void 0:p.metaDataSelector,g.isEnabledProperty=(b=p==null?void 0:p.isEnabled)!==null&&b!==void 0?b:g.isEnabledProperty,g}return Object.defineProperty(h.prototype,"numericFormat",{get:function(){return this.numericFormatProperty},set:function(p){var g;this.numericFormatProperty=p,(g=this.parentSeries)===null||g===void 0||g.invalidateParentCallback()},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"precision",{get:function(){return this.precisionProperty},set:function(p){var g;this.precisionProperty=p,(g=this.parentSeries)===null||g===void 0||g.invalidateParentCallback()},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"labelRowCount",{get:function(){return this.labelRowCountProperty},set:function(p){var g;this.labelRowCountProperty=p,(g=this.parentSeries)===null||g===void 0||g.invalidateParentCallback()},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"isEnabled",{get:function(){return this.isEnabledProperty},set:function(p){this.isEnabledProperty!==p&&(this.isEnabledProperty=p,this.invalidateParent())},enumerable:!1,configurable:!0}),h.prototype.getText=function(p,g){var v,y;if(this.metaDataSelector)return this.metaDataSelector(this.dataSeries.getMetadataAt(g,p));var m=this.zValues[g][p];if(m===m)return(0,a.formatNumber)(m,(v=this.numericFormat)!==null&&v!==void 0?v:t.ENumericFormat.Decimal,(y=this.precision)!==null&&y!==void 0?y:1)},h.prototype.getPosition=function(p,g,v,y,m,b){var S=b.xCoordinateCalculator.getCoordinate(v),_=b.yCoordinateCalculator.getCoordinate(y);if(b.isVerticalChart){var C=S;S=_,_=C}return new e.Point(S,_)},h.prototype.shouldGenerate=function(p,g,v){return p.height<v&&p.width<g},h.prototype.getColor=function(p,g,v){return this.colorValue},h.prototype.shouldSkipLabel=function(p,g,v,y,m){var b=this.parentSeries.parentSurface.seriesViewRect;return v.rect.y<0||v.rect.bottom>b.height||v.rect.x<0||v.rect.right>b.width},h.prototype.generateDataLabels=function(p,g){if(this.dataLabels=[],!(!this.isEnabled||!this.style||!this.style.fontFamily||!this.style.fontSize)){this.dataSeries=this.parentSeries.dataSeries,this.zValues=this.dataSeries.getZValues();var v=(0,l.getTextBounds)(this.webAssemblyContext),y=u.DpiHelper.adjustTextStyle(this.style),m=p.getFont(y);Math.abs(g.xCoordinateCalculator.getCoordinate(this.dataSeries.getXValue(1))-g.xCoordinateCalculator.getCoordinate(this.dataSeries.getXValue(0))),Math.abs(g.yCoordinateCalculator.getCoordinate(this.dataSeries.getYValue(1))-g.yCoordinateCalculator.getCoordinate(this.dataSeries.getYValue(0))),this.colorValue=(0,s.parseColorToUIntArgb)(this.color);var b=this.parentSeries.dataSeries,S=b.xStart,_=b.xStep,C=b.yStart,T=b.yStep,x=this.parentSeries.getContourDrawingParams();this.makeContourLabels(x,C,T,g,S,_,m,v)}},h.prototype.makeContourLabels=function(p,g,v,y,m,b,S,_){for(var C,T,x,A,w=p.majorStepZ,L=p.zOffset<0?w+p.zOffset:p.zOffset%w,k=(p.yMax-p.yMin)/(this.labelRowCount+1),D=g,j=0;j<this.dataSeries.arrayHeight;j++){var N=g+v*j;if(!(N<=D+k)&&(D=N,!(y.yCoordinateCalculator.visibleMin>N+v||y.yCoordinateCalculator.visibleMax<N)))for(var V=void 0,W=0;W<this.dataSeries.arrayWidth;W++){var K=m+b*W;if(!(y.xCoordinateCalculator.visibleMin>K+b||y.xCoordinateCalculator.visibleMax<K)){var H=this.zValues[j][W],U=void 0,I=K;if(!(H<p.zMin||H>p.zMax)){var Q=!0;if(V!==void 0){var Z=L+Math.floor((V-L)/w)*w,ee=Z+w;Z===V&&(Z=Z-w),H<=Z?(U=(0,a.formatNumber)(Z,(C=this.numericFormat)!==null&&C!==void 0?C:t.ENumericFormat.Decimal,(T=this.precision)!==null&&T!==void 0?T:1),I=Q?K:b*(Z-H)/(V-H)-b/2+K,Q=!1):H>=ee&&(U=(0,a.formatNumber)(ee,(x=this.numericFormat)!==null&&x!==void 0?x:t.ENumericFormat.Decimal,(A=this.precision)!==null&&A!==void 0?A:1),I=Q?K:b*(ee-H)/(H-V)-b/2+K,Q=!1)}if(V=H,!!U){S.CalculateStringBounds(U??"",_,this.getLineSpacing());var ie=new o.Size(_.m_fWidth,_.m_fHeight),de=this.dataSeries.getXValue(W),pe=this.dataSeries.getYValue(j),_e=this.getPosition(W,j,I,pe,ie,y),Te=_.GetLineBounds(0),De={text:U,position:_e,rect:new i.Rect(_e.x,_e.y-Te.m_fHeight,ie.width,ie.height),color:this.getColor(W,j,U),dataX:de,dataY:pe,rotationAngle:0,rotationCenter:_e};Te.delete(),this.dataLabels.push(De)}}}}}},h.prototype.toJSON=function(){var p=f.prototype.toJSON.call(this),g={numericFormat:this.numericFormat,precision:this.precision,labelRowCount:this.labelRowCount,isEnabled:this.isEnabled};return Object.assign(p.options,g),p},h})(c.BaseDataLabelProvider);return Lx.ContoursDataLabelProvider=d,Lx}var kx={},Ooe;function rj(){if(Ooe)return kx;Ooe=1;var r=kx&&kx.__extends||(function(){var f=function(h,p){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,v){g.__proto__=v}||function(g,v){for(var y in v)Object.prototype.hasOwnProperty.call(v,y)&&(g[y]=v[y])},f(h,p)};return function(h,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");f(h,p);function g(){this.constructor=h}h.prototype=p===null?Object.create(p):(g.prototype=p.prototype,new g)}})();Object.defineProperty(kx,"__esModule",{value:!0}),kx.HeatMapDataLabelProvider=void 0;var e=Ii(),i=vn(),n=ku(),t=wp(),o=Ep(),a=Il(),s=mi(),l=Xi(),u=Hi(),c=RM(),d=(function(f){r(h,f);function h(p){var g=this,v,y,m;return g=f.call(this,p)||this,g.type=n.EDataLabelProviderType.Heatmap,g.isEnabledProperty=!0,g.numericFormatProperty=t.ENumericFormat.Decimal,g.precisionProperty=1,g.numericFormatProperty=(v=p==null?void 0:p.numericFormat)!==null&&v!==void 0?v:g.numericFormatProperty,g.precision=(y=p==null?void 0:p.precision)!==null&&y!==void 0?y:g.precisionProperty,g.metaDataSelector=p==null?void 0:p.metaDataSelector,g.isEnabledProperty=(m=p==null?void 0:p.isEnabled)!==null&&m!==void 0?m:g.isEnabledProperty,g}return Object.defineProperty(h.prototype,"numericFormat",{get:function(){return this.numericFormatProperty},set:function(p){var g;this.numericFormatProperty=p,(g=this.parentSeries)===null||g===void 0||g.invalidateParentCallback()},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"precision",{get:function(){return this.precisionProperty},set:function(p){var g;this.precisionProperty=p,(g=this.parentSeries)===null||g===void 0||g.invalidateParentCallback()},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"isEnabled",{get:function(){return this.isEnabledProperty},set:function(p){this.isEnabledProperty!==p&&(this.isEnabledProperty=p,this.invalidateParent())},enumerable:!1,configurable:!0}),h.prototype.getText=function(p,g){var v,y;if(this.metaDataSelector)return this.metaDataSelector(this.dataSeries.getMetadataAt(g,p));var m=this.zValues[g][p];if(m===m)return(0,a.formatNumber)(m,(v=this.numericFormat)!==null&&v!==void 0?v:t.ENumericFormat.Decimal,(y=this.precision)!==null&&y!==void 0?y:1)},h.prototype.getPosition=function(p,g,v,y,m,b,S,_){var C=_.xCoordinateCalculator.getCoordinate(v),T=_.yCoordinateCalculator.getCoordinate(y);if(_.isVerticalChart){var x=C;C=T,T=x}return(_.isVerticalChart?_.yCoordinateCalculator.hasFlippedCoordinates:_.xCoordinateCalculator.hasFlippedCoordinates)?C+=(b-m.width)/2:C-=b-(b-m.width)/2,(_.isVerticalChart?_.xCoordinateCalculator.hasFlippedCoordinates:_.yCoordinateCalculator.hasFlippedCoordinates)?T+=S-(S-m.height)/2:T-=(S-m.height)/2,{position:new e.Point(C,T),rotationCenter:new e.Point(C,T),rotationAngle:0}},h.prototype.shouldGenerate=function(p,g,v){return p.height<v&&p.width<g},h.prototype.getColor=function(p,g,v){return this.colorValue},h.prototype.shouldSkipLabel=function(p,g,v,y,m){var b=this.parentSeries.parentSurface.seriesViewRect;return v.rect.y<0||v.rect.bottom>b.height||v.rect.x<0||v.rect.right>b.width},h.prototype.generateDataLabels=function(p,g){var v,y;if(this.dataLabels=[],!(!this.isEnabled||!this.style||!this.style.fontFamily||!this.style.fontSize)){this.dataSeries=this.parentSeries.dataSeries,this.zValues=this.dataSeries.getZValues();var m=(0,l.getTextBounds)(this.webAssemblyContext),b=u.DpiHelper.adjustTextStyle(this.style),S=p.getFont(b),_=Math.abs(g.xCoordinateCalculator.getCoordinate(this.dataSeries.getXValue(1))-g.xCoordinateCalculator.getCoordinate(this.dataSeries.getXValue(0))),C=Math.abs(g.yCoordinateCalculator.getCoordinate(this.dataSeries.getYValue(1))-g.yCoordinateCalculator.getCoordinate(this.dataSeries.getYValue(0)));if(S.CalculateStringBounds((y=this.getText(0,0))!==null&&y!==void 0?y:"",m,this.getLineSpacing()),g.isVerticalChart&&(v=[_,C],C=v[0],_=v[1]),!!this.shouldGenerate(new o.Size(m.m_fWidth,m.m_fHeight),_,C)){this.colorValue=(0,s.parseColorToUIntArgb)(this.color);for(var T=this.parentSeries.dataSeries,x=T.xStart,A=T.xStep,w=T.yStart,L=T.yStep,k=0;k<this.dataSeries.arrayHeight;k++){var D=w+L*k;if(!(g.yCoordinateCalculator.visibleMin>D+L||g.yCoordinateCalculator.visibleMax<D))for(var j=0;j<this.dataSeries.arrayWidth;j++){var N=x+A*j;if(!(g.xCoordinateCalculator.visibleMin>N+A||g.xCoordinateCalculator.visibleMax<N)){var V=this.getText(j,k);if(V){S.CalculateStringBounds(V??"",m,this.getLineSpacing());var W=new o.Size(m.m_fWidth,m.m_fHeight),K=this.dataSeries.getXValue(j),H=this.dataSeries.getYValue(k),U=this.getPosition(j,k,K,H,W,_,C,g),I=U.position,Q=U.rotationCenter,Z=U.rotationAngle,ee=m.GetLineBounds(0),ie={text:V,position:I,rect:new i.Rect(I.x,I.y-ee.m_fHeight,W.width,W.height),color:this.getColor(j,k,V),dataX:this.dataSeries.getXValue(j),dataY:this.dataSeries.getYValue(k),rotationAngle:Z,rotationCenter:Q};ee.delete(),this.shouldSkipLabel(j,k,ie,_,C)||this.dataLabels.push(ie)}}}}}}},h.prototype.toJSON=function(){var p=f.prototype.toJSON.call(this),g={numericFormat:this.numericFormat,precision:this.precision,isEnabled:this.isEnabled};return Object.assign(p.options,g),p},h})(c.BaseDataLabelProvider);return kx.HeatMapDataLabelProvider=d,kx}var Ix={},Doe;function uX(){if(Doe)return Ix;Doe=1;var r=Ix&&Ix.__extends||(function(){var d=function(f,h){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,g){p.__proto__=g}||function(p,g){for(var v in g)Object.prototype.hasOwnProperty.call(g,v)&&(p[v]=g[v])},d(f,h)};return function(f,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");d(f,h);function p(){this.constructor=f}f.prototype=h===null?Object.create(h):(p.prototype=h.prototype,new p)}})();Object.defineProperty(Ix,"__esModule",{value:!0}),Ix.NonUniformHeatMapDataLabelProvider=void 0;var e=Ii(),i=vn(),n=gc(),t=ku(),o=Ep(),a=mi(),s=Xi(),l=Hi(),u=rj(),c=(function(d){r(f,d);function f(){var h=d!==null&&d.apply(this,arguments)||this;return h.type=t.EDataLabelProviderType.NonUniformHeatmap,h.cellSizeThresholdCoefficient=1,h}return f.prototype.getPosition=function(h,p,g,v,y,m,b,S){var _=S.xCoordinateCalculator.getCoordinate(g),C=S.yCoordinateCalculator.getCoordinate(v);if(S.isVerticalChart){var T=_;_=C,C=T}var x=S.isVerticalChart?S.yCoordinateCalculator:S.xCoordinateCalculator,A=S.isVerticalChart?S.xCoordinateCalculator:S.yCoordinateCalculator;return x.hasFlippedCoordinates?_+=(m-y.width)/2:_-=m-(m-y.width)/2,A.hasFlippedCoordinates?C+=b-(b-y.height)/2:C-=(b-y.height)/2,{position:new e.Point(_,C),rotationCenter:new e.Point(_,C),rotationAngle:0}},f.prototype.generateDataLabels=function(h,p){var g;if(this.dataLabels=[],!(!this.style||!this.style.fontFamily||!this.style.fontSize)){this.dataSeries=this.parentSeries.dataSeries,this.zValues=this.dataSeries.getZValues();var v=(0,s.getTextBounds)(this.webAssemblyContext),y=l.DpiHelper.adjustTextStyle(this.style),m=h.getFont(y),b=Math.abs(p.xCoordinateCalculator.getCoordinate(this.dataSeries.getXValue(this.dataSeries.arrayWidth))-p.xCoordinateCalculator.getCoordinate(this.dataSeries.getXValue(0))),S=Math.abs(p.yCoordinateCalculator.getCoordinate(this.dataSeries.getYValue(this.dataSeries.arrayHeight))-p.yCoordinateCalculator.getCoordinate(this.dataSeries.getYValue(0))),_=function(_e){return _e};(this.parentSeries.xAxis.type===n.EAxisType.BaseValueAxis||this.parentSeries.xAxis.type===n.EAxisType.DiscontinuousDateAxis)&&(_=function(_e){return p.xCoordinateCalculator.getCoordinate(_e)});var C=this.dataSeries.getXCellSizes(_),T=this.dataSeries.getYCellSizes();m.CalculateStringBounds((g=this.getText(0,0))!==null&&g!==void 0?g:"",v,this.getLineSpacing());var x=v.m_fHeight*this.cellSizeThresholdCoefficient,A=v.m_fWidth*this.cellSizeThresholdCoefficient;this.colorValue=(0,a.parseColorToUIntArgb)(this.color);for(var w=0;w<this.dataSeries.arrayHeight;w++){var L=S*T[w];if(!(L<x)){var k=this.dataSeries.getYValue(w),D=this.dataSeries.yCellOffsets[w+1];if(!(p.yCoordinateCalculator.visibleMin>k||p.yCoordinateCalculator.visibleMax<D))for(var j=0;j<this.dataSeries.arrayWidth;j++){var N=b*C[j];if(!(N<A)){var V=this.dataSeries.getXValue(j),W=this.dataSeries.xCellOffsets[j+1];if(!(p.xCoordinateCalculator.visibleMin>V||p.xCoordinateCalculator.visibleMax<W)){var K=this.getText(j,w);if(K){m.CalculateStringBounds(K??"",v,this.getLineSpacing());var H=new o.Size(v.m_fWidth,v.m_fHeight),U=p.isVerticalChart?L:N,I=p.isVerticalChart?N:L,Q=this.getPosition(j,w,V,k,H,U,I,p),Z=Q.position,ee=Q.rotationAngle,ie=Q.rotationCenter,de=v.GetLineBounds(0),pe={text:K,position:Z,rect:new i.Rect(Z.x,Z.y-de.m_fHeight,H.width,H.height),color:this.getColor(j,w,K),dataX:V,dataY:k,rotationAngle:ee,rotationCenter:ie};de.delete(),this.shouldSkipLabel(j,w,pe,N,L)||this.dataLabels.push(pe)}}}}}}}},f})(u.HeatMapDataLabelProvider);return Ix.NonUniformHeatMapDataLabelProvider=c,Ix}var e0={},Roe;function fU(){if(Roe)return e0;Roe=1;var r=e0&&e0.__extends||(function(){var c=function(d,f){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(h[g]=p[g])},c(d,f)};return function(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");c(d,f);function h(){this.constructor=d}d.prototype=f===null?Object.create(f):(h.prototype=f.prototype,new h)}})(),e=e0&&e0.__assign||function(){return e=Object.assign||function(c){for(var d,f=1,h=arguments.length;f<h;f++){d=arguments[f];for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(c[p]=d[p])}return c},e.apply(this,arguments)};Object.defineProperty(e0,"__esModule",{value:!0}),e0.TextDataLabelProvider=void 0;var i=Ii(),n=vn(),t=Xi(),o=RM(),a=ku(),s=VM(),l=Du(),u=(function(c){r(d,c);function d(f){var h=this,p,g,v,y;return h=c.call(this,e(e({},f),{style:e({fontSize:12},f==null?void 0:f.style)}))||this,h.type=a.EDataLabelProviderType.Text,h.calculateTextBounds=!1,h.horizontalTextPositionProperty=l.EHorizontalTextPosition.Right,h.verticalTextPositionProperty=l.EVerticalTextPosition.Above,h.isEnabledProperty=!0,h.calculateTextBounds=(p=f==null?void 0:f.calculateTextBounds)!==null&&p!==void 0?p:h.calculateTextBounds,h.horizontalTextPositionProperty=(g=f==null?void 0:f.horizontalTextPosition)!==null&&g!==void 0?g:h.horizontalTextPosition,h.verticalTextPositionProperty=(v=f==null?void 0:f.verticalTextPosition)!==null&&v!==void 0?v:h.verticalTextPosition,h.isEnabledProperty=(y=f==null?void 0:f.isEnabled)!==null&&y!==void 0?y:h.isEnabledProperty,h}return Object.defineProperty(d.prototype,"horizontalTextPosition",{get:function(){return this.horizontalTextPositionProperty},set:function(f){this.horizontalTextPositionProperty=f,this.invalidateParent()},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"verticalTextPosition",{get:function(){return this.verticalTextPositionProperty},set:function(f){this.verticalTextPositionProperty=f,this.invalidateParent()},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"isEnabled",{get:function(){return this.isEnabledProperty},set:function(f){this.isEnabledProperty!==f&&(this.isEnabledProperty=f,this.invalidateParent())},enumerable:!1,configurable:!0}),d.prototype.getPosition=function(f,h){var p,g,v,y,m,b,S,_,C=f.xCoord();this.horizontalTextPosition===l.EHorizontalTextPosition.Center?C-=h.m_fWidth/2:this.horizontalTextPosition===l.EHorizontalTextPosition.Left?C-=h.m_fWidth+((g=(p=this.style.padding)===null||p===void 0?void 0:p.right)!==null&&g!==void 0?g:0):C+=(y=(v=this.style.padding)===null||v===void 0?void 0:v.right)!==null&&y!==void 0?y:0;var T=h.GetLineBounds(0),x=h.m_fHeight-T.m_fHeight;T.delete();var A=f.yCoord()-x;return this.verticalTextPosition===l.EVerticalTextPosition.Center?A+=h.m_fHeight/2:this.verticalTextPosition===l.EVerticalTextPosition.Below?A+=h.m_fHeight+((b=(m=this.style.padding)===null||m===void 0?void 0:m.top)!==null&&b!==void 0?b:0):A-=(_=(S=this.style.padding)===null||S===void 0?void 0:S.bottom)!==null&&_!==void 0?_:0,new i.Point(C,A)},d.prototype.getColor=function(f,h){return f.color},d.prototype.getDataLabelState=function(f,h,p,g,v,y){return new s.DataLabelState(f,h,p,g,v,y)},d.prototype.shouldGenerate=function(f){return!0},d.prototype.generateDataLabels=function(f,h){var p;if(this.dataLabels=[],!(!this.isEnabled||!this.style||!this.style.fontFamily||!this.style.fontSize)){var g=this.parentSeries.dataSeries;if(!g||!g.textValues){console.warn("TextDataLabelProvider requires an XyTextDataSeries");return}if(this.state=this.getDataLabelState(f,h,this.style,this.color,h.pointSeries.yValues,this.parentSeries),!!this.shouldGenerate(this.state)){var v=(0,t.getTextBounds)(this.webAssemblyContext),y=this.parentSeries.dataSeries,m=y.fifoCapacity,b=y.fifoSweeping,S=y.fifoSweepingGap,_=y.fifoStartIndex,C=h.pointSeries.indexes,T=this.verticalTextPosition!==l.EVerticalTextPosition.Above||this.horizontalTextPosition!==l.EHorizontalTextPosition.Right||this.calculateTextBounds;if(g){this.state.font.CalculateStringBounds((p=g.getTextValue(0))!==null&&p!==void 0?p:"",v,this.getLineSpacing());for(var x=0;x<C.size();x++){this.state.index=x;var A=C.get(this.state.index);if(!(b&&this.state.pointCount===m&&this.state.index>=_&&this.state.index<_+S)){var w=g.getTextValue(this.state.getIndexInternal(A));T&&this.state.font.CalculateStringBounds(w??"",v,this.getLineSpacing());var L=this.getPosition(this.state,v),k=v.GetLineBounds(0),D=k.m_fHeight;k.delete();var j={text:w,position:L,rect:new n.Rect(L.x,L.y-D,v.m_fWidth,v.m_fHeight),color:this.getColor(this.state,w),dataX:this.state.xCoord(),dataY:this.state.yCoord(),rotationAngle:0,rotationCenter:L};this.dataLabels.push(j)}}}this.onAfterGenerate(this.dataLabels)}}},d.prototype.onAfterGenerate=function(f){},d.prototype.toJSON=function(){var f=c.prototype.toJSON.call(this),h={calculateTextBounds:this.calculateTextBounds,horizontalTextPosition:this.horizontalTextPosition,verticalTextPosition:this.verticalTextPosition,isEnabled:this.isEnabled};return Object.assign(f.options,h),f},d})(o.BaseDataLabelProvider);return e0.TextDataLabelProvider=u,e0}var Nx={},Fx={},jx={},Moe;function K1(){if(Moe)return jx;Moe=1;var r=jx&&jx.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(jx,"__esModule",{value:!0}),jx.XyyPointSeriesResampled=void 0;var e=xo(),i=ki(),n=FM(),t=(function(o){r(a,o);function a(s,l){var u=o.call(this,s,l,2,[e.EValueName.Y,e.EValueName.Y1])||this;return u.type=i.EDataSeriesType.Xyy,u}return Object.defineProperty(a.prototype,"y1Values",{get:function(){return this.yValuesArray[1]},enumerable:!1,configurable:!0}),a.prototype.debugOutputForUnitTests=function(){console.log("points count ".concat(this.count)),console.log("xResampled at min",this.xValues.get(0)),console.log("yValues at min",this.yValues.get(0)),console.log("y1Values at min",this.y1Values.get(0));var s=Math.round(this.count/2);console.log("middle",s),console.log("xResampled at middle",this.xValues.get(s)),console.log("yValues at middle",this.yValues.get(s)),console.log("y1Values at middle",this.y1Values.get(s));var l=this.count-1;console.log("xResampled at end",this.xValues.get(l)),console.log("yValues at end",this.yValues.get(l)),console.log("y1Values at end",this.y1Values.get(l))},a})(n.BasePointSeriesResampled);return jx.XyyPointSeriesResampled=t,jx}var Bx={},Loe;function cX(){if(Loe)return Bx;Loe=1;var r=Bx&&Bx.__extends||(function(){var u=function(c,d){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,h){f.__proto__=h}||function(f,h){for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(f[p]=h[p])},u(c,d)};return function(c,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");u(c,d);function f(){this.constructor=c}c.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}})();Object.defineProperty(Bx,"__esModule",{value:!0}),Bx.BandSeriesDrawingProvider=void 0;var e=Mr(),i=hl(),n=ts(),t=Ul(),o=ln(),a=Ji(),s=vl(),l=(function(u){r(c,u);function c(d,f,h,p){var g=u.call(this,d,f,h)||this;return g.args=new g.webAssemblyContext.SCRTBandDrawingParams,g.y1Selector=p??(function(v){return v.y1Values}),g.linesPenCache=new n.Pen2DCache(d),g.strokePenY1Cache=new n.Pen2DCache(d),g.fillBrushCache=new i.BrushCache(d),g.fillBrushY1Cache=new i.BrushCache(d),g}return c.prototype.onAttachSeries=function(){u.prototype.onAttachSeries.call(this),this.nativeDrawingProvider=new this.webAssemblyContext.SCRTBandSeriesDrawingProvider;var d=this.parentSeries,f=d.parentSurface,h=d.stroke,p=d.strokeThickness,g=d.strokeY1Thickness,v=d.fill,y=d.strokeY1,m=d.fillY1,b=d.opacity,S=d.strokeDashArray,_=d.strokeY1DashArray,C=d.fillLinearGradient,T=d.fillLinearGradientY1,x=d.customTextureOptions,A=f!=null&&f.isCopyCanvasSurface?f.domCanvas2D.height/o.SciChartSurfaceBase.domMasterCanvas.height:1,w=f!=null&&f.isCopyCanvasSurface?f.domCanvas2D.width/o.SciChartSurfaceBase.domMasterCanvas.width:1;(0,n.createPenInCache)(this.linesPenCache,h,p,b,S),(0,n.createPenInCache)(this.strokePenY1Cache,y,g,b,_),this.fillBrushCache.create(v,b,A,w,C,x),this.fillBrushY1Cache.create(m,b,A,w,T,x)},c.prototype.onDetachSeries=function(){u.prototype.onDetachSeries.call(this),this.nativeDrawingProvider=(0,e.deleteSafe)(this.nativeDrawingProvider)},c.prototype.delete=function(){this.nativeDrawingProvider=(0,e.deleteSafe)(this.nativeDrawingProvider),this.args=(0,e.deleteSafe)(this.args),this.linesPenCache=(0,e.deleteSafe)(this.linesPenCache),this.fillBrushCache=(0,e.deleteSafe)(this.fillBrushCache),this.strokePenY1Cache=(0,e.deleteSafe)(this.strokePenY1Cache),this.fillBrushY1Cache=(0,e.deleteSafe)(this.fillBrushY1Cache),u.prototype.delete.call(this)},c.prototype.draw=function(d,f){var h,p=f.pointSeries,g=this.parentSeries.dataSeries.dataDistributionCalculator.containsNaN;this.args.Reset(),this.args.forceShaderMethod=!0,this.args.verticalChart=f.isVerticalChart,this.args.lineGaps=g?this.parentSeries.drawNaNAs===t.ELineDrawMode.DiscontinuousLine?this.webAssemblyContext.SCRTLineGapMode.DrawGaps:this.webAssemblyContext.SCRTLineGapMode.CloseGaps:this.webAssemblyContext.SCRTLineGapMode.Default,this.args.isDigitalLine=this.parentSeries.isDigitalLine;var v=(0,i.getScrtBrushFromCache)(this.fillBrushCache);v&&this.args.SetFillBrush(v);var y=(0,n.getScrtPenFromCache)(this.linesPenCache);y&&this.args.SetLinesPen(y);var m=(0,i.getScrtBrushFromCache)(this.fillBrushY1Cache);m&&this.args.SetFillBrush1(m);var b=(0,n.getScrtPenFromCache)(this.strokePenY1Cache);b&&this.args.SetLinesPen1(b);var S=f.xCoordinateCalculator.isCategoryCoordinateCalculator,_=p.xValues,C=this.parentSeries.dataSeries,T=C.fifoCapacity,x=C.fifoSweeping,A=C.fifoSweepingGap,w=p.fifoStartIndex,L=S?p.indexes:_,k=this.ySelector(p),D=this.y1Selector(p),j=this.getStartAndCount(f,L),N=j.startIndex,V=j.count;this.args.count=V,this.args.startIndex=N,T>0&&x&&T===this.parentSeries.dataSeries.count()&&(this.args.count=w),u.prototype.applyStrokeFillPaletting.call(this,void 0,void 0,void 0,void 0,this.parentSeries.opacity,!0,!0,f);var W=(h=this.palettingState.paletteTextureCache)===null||h===void 0?void 0:h.value;W&&this.args.SetPalette(W),this.args.isSmoothColors=this.palettingState.gradientPaletting;var K=d.getNativeContext();this.args.SetNativeContext(K),this.args.SetXValues(L),this.args.SetYValues(k),this.args.SetZValues(D),this.args.SetXCoordinateCalculator(f.xCoordinateCalculator.nativeCalculator),this.args.SetYCoordinateCalculator(f.yCoordinateCalculator.nativeCalculator),this.nativeDrawingProvider.DrawPointsVec(this.args),T>0&&x&&T===this.parentSeries.dataSeries.count()&&(this.args.startIndex=Math.min(k.size(),w+A),this.args.count=Math.max(0,k.size()-w-A),this.args.count>0&&this.nativeDrawingProvider.DrawPointsVec(this.args))},c.prototype.onDpiChanged=function(d){u.prototype.onDpiChanged.call(this,d),this.onSeriesPropertyChange(a.PROPERTY.STROKE),this.onSeriesPropertyChange(a.PROPERTY.STROKE_Y1)},c.prototype.onSeriesPropertyChange=function(d){u.prototype.onSeriesPropertyChange.call(this,d);var f=this.parentSeries,h=f.parentSurface,p=f.stroke,g=f.strokeY1,v=f.strokeThickness,y=f.strokeY1Thickness,m=f.fill,b=f.fillY1,S=f.opacity,_=f.strokeDashArray,C=f.strokeY1DashArray,T=f.fillLinearGradient,x=f.fillLinearGradientY1,A=f.customTextureOptions;if(d===a.PROPERTY.STROKE||d===a.PROPERTY.STROKE_THICKNESS||d===a.PROPERTY.OPACITY||d===a.PROPERTY.STROKE_DASH_ARRAY){this.palettingState.requiresUpdate=!0,(0,n.createPenInCache)(this.linesPenCache,p,v,S,_);return}if(d===a.PROPERTY.STROKE_Y1||d===a.PROPERTY.STROKE_THICKNESS||d===a.PROPERTY.OPACITY||d===a.PROPERTY.STROKE_Y1_DASH_ARRAY||d===a.PROPERTY.STROKE_THICKNESS_Y1){this.palettingState.requiresUpdate=!0,(0,n.createPenInCache)(this.strokePenY1Cache,g,y,S,C);return}var w=h!=null&&h.isCopyCanvasSurface?h.domCanvas2D.height/o.SciChartSurfaceBase.domMasterCanvas.height:1,L=h!=null&&h.isCopyCanvasSurface?h.domCanvas2D.width/o.SciChartSurfaceBase.domMasterCanvas.width:1;(d===a.PROPERTY.FILL||d===a.PROPERTY.OPACITY||d===a.PROPERTY.FILL_LINEAR_GRADIENT||d==a.PROPERTY.CUSTOM_TEXTURE_OPTIONS)&&(this.palettingState.requiresUpdate=!0,this.fillBrushCache.create(m,S,w,L,T,A)),(d===a.PROPERTY.FILL_Y1||d===a.PROPERTY.OPACITY||d===a.PROPERTY.FILL_LINEAR_GRADIENT_Y1||d==a.PROPERTY.CUSTOM_TEXTURE_OPTIONS)&&(this.palettingState.requiresUpdate=!0,this.fillBrushY1Cache.create(b,S,w,L,x,A))},c})(s.BaseSeriesDrawingProvider);return Bx.BandSeriesDrawingProvider=l,Bx}var Vx={},koe;function $d(){if(koe)return Vx;koe=1;var r=Vx&&Vx.__extends||(function(){var t=function(o,a){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");t(o,a);function s(){this.constructor=o}o.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}})();Object.defineProperty(Vx,"__esModule",{value:!0}),Vx.PointMarkerDrawingProvider=void 0;var e=Mr(),i=vl(),n=(function(t){r(o,t);function o(a,s,l,u,c){var d=t.call(this,a,s,l,c)||this;return d.ySplineValuesSelector=u===void 0?function(f){return f.ySplineValues}:u,d.nativeDrawingProvider=new d.webAssemblyContext.SCRTScatterSeriesDrawingProvider,d.xAnimationPointMarkerValues=new d.webAssemblyContext.SCRTDoubleVector,d.yAnimationPointMarkerValues=new d.webAssemblyContext.SCRTDoubleVector,d.args=new d.webAssemblyContext.SCRTPointDrawingParams,d}return o.prototype.onSeriesPropertyChange=function(a){},o.prototype.getProperties=function(a){return a},o.prototype.draw=function(a,s){var l,u,c=(l=this.getProperties(this.parentSeries))===null||l===void 0?void 0:l.pointMarker;if(c!==void 0){var d,f;this.parentSeries.hasPointMarkerPaletteProvider()?(d=c.getFillMask(),f=c.getStrokeMask()):(d=c.getSprite(),f=void 0);var h=s.pointSeries,p=s.xCoordinateCalculator.isCategoryCoordinateCalculator,g=this.xSelector(h),v=this.ySelector(h);this.args.Reset(),this.args.verticalChart=s.isVerticalChart,this.args.forceShaderMethod=!0,this.args.usePointSampling=!c.antiAlias,this.args.SetSpriteTexture(d.getTexture()),f&&this.args.SetStrokeMask(f.getTexture());var y=this.parentSeries.dataSeries,m=y.fifoCapacity,b=y.fifoSweeping,S=y.fifoSweepingGap,_=h.fifoStartIndex;if(c.lastPointOnly&&v.size()>0)this.args.count=1,this.args.startIndex=b&&this.parentSeries.dataSeries.count()===m?_-1:v.size()-1;else{var C=this.getStartAndCount(s,g),T=C.startIndex,x=C.count;this.args.count=x,this.args.startIndex=T,b&&m===this.parentSeries.dataSeries.count()&&(this.args.count=_)}this.applyStrokeFillPaletting(c.stroke,void 0,c.fill,void 0,this.parentSeries.opacity),this.args.SetPalettedColors(this.palettingState.palettedColors),this.args.paletteStart=(u=this.palettingState.paletteStartIndex)!==null&&u!==void 0?u:0,this.updateArgs(s);var A=a.getNativeContext();this.drawPoints(A,p?h.indexes:g,v,s.xCoordinateCalculator.nativeCalculator,s.yCoordinateCalculator.nativeCalculator,this.args,this.parentSeries.parentSurface.seriesViewRect),b&&m===this.parentSeries.dataSeries.count()&&!c.lastPointOnly&&(this.args.startIndex=Math.min(v.size(),_+S),this.args.count=Math.max(0,v.size()-_-S),this.args.count>0&&this.drawPoints(A,p?h.indexes:g,v,s.xCoordinateCalculator.nativeCalculator,s.yCoordinateCalculator.nativeCalculator,this.args,this.parentSeries.parentSurface.seriesViewRect))}},o.prototype.delete=function(){this.nativeDrawingProvider=(0,e.deleteSafe)(this.nativeDrawingProvider),this.xAnimationPointMarkerValues=(0,e.deleteSafe)(this.xAnimationPointMarkerValues),this.yAnimationPointMarkerValues=(0,e.deleteSafe)(this.yAnimationPointMarkerValues),this.args=(0,e.deleteSafe)(this.args),t.prototype.delete.call(this)},o.prototype.overridePaletteProviderColors=function(a,s,l,u,c,d,f){if(a.hasPointMarkerPaletteProvider()){var h=a.paletteProvider,p=h.overridePointMarkerArgb(s,l,u,c,d,f);if(p)return p}return{stroke:void 0,fill:void 0}},o.prototype.isGradientFillPaletting=function(a){return!1},o.prototype.drawPoints=function(a,s,l,u,c,d,f){d.SetNativeContext(a),d.SetXValues(s),d.SetYValues(l),d.SetXCoordinateCalculator(u),d.SetYCoordinateCalculator(c),this.nativeDrawingProvider.DrawPointsVec(d)},o})(i.BaseSeriesDrawingProvider);return Vx.PointMarkerDrawingProvider=n,Vx}var Hx={},Ioe;function lPe(){if(Ioe)return Hx;Ioe=1;var r=Hx&&Hx.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(Hx,"__esModule",{value:!0}),Hx.BandSeriesHitTestProvider=void 0;var e=Js(),i=Rs(),n=vs(),t=(function(o){r(a,o);function a(){return o!==null&&o.apply(this,arguments)||this}return a.prototype.hitTest=function(s,l){var u=this.getTranslatedHitTestPoint(s,l);if(!u)return n.HitTestInfo.empty();var c=this.currentRenderPassData,d=c.xCoordinateCalculator,f=c.yCoordinateCalculator,h=c.isVerticalChart,p=h?u.y:u.x,g=h?u.x:u.y,v=this.parentSeries.dataSeries;if(!v)return n.HitTestInfo.empty();var y=i.hitTestHelpers.getNearestXPoint(this.webAssemblyContext,d,v,p,v.dataDistributionCalculator.isSortedAscending),m=v.getNativeXValues(),b=v.getNativeYValues(),S=v.getNativeY1Values(),_=i.hitTestHelpers.createHitTestInfo(this.parentSeries,d,f,h,v,m,b,p,g,y,0);if(v.dataDistributionCalculator.isSortedAscending&&y>=0){_.y1Value=S.get(y),_.y1Coord=f.getCoordinate(_.y1Value);var C=i.hitTestHelpers.testIsHitForBand(this.parentSeries.isDigitalLine,d,f,v.getNativeXValues(),function(x){return b.get(x)},function(x){return S.get(x)},y,p,g,v);if(_.isHit=C.isHit,_.point2dataSeriesIndex=C.secondPointIndex,C.secondPointIndex!==void 0){_.point2xValue=m.get(C.secondPointIndex),_.point2xCoord=d.getCoordinate(_.point2xValue),_.point2yValue=b.get(C.secondPointIndex),_.point2yCoord=f.getCoordinate(_.point2yValue),_.point2y1Value=S.get(C.secondPointIndex),_.point2y1Coord=f.getCoordinate(_.point2y1Value),_.point2metadata=v.getMetadataAt(C.secondPointIndex);var T=v.valueNames.reduce(function(x,A){return x[A]=v.getNativeValue(v.getYValuesByName(A),_.point2dataSeriesIndex),x},{});_.point2yValueByName=T}}else _.isHit=!1;return _},a.prototype.hitTestDataPoint=function(s,l,u){u===void 0&&(u=e.BaseHitTestProvider.DEFAULT_HIT_TEST_RADIUS);var c=this.getTranslatedHitTestPoint(s,l);if(!c)return n.HitTestInfo.empty();var d=this.currentRenderPassData,f=d.xCoordinateCalculator,h=d.yCoordinateCalculator,p=d.isVerticalChart,g=p?c.y:c.x,v=p?c.x:c.y,y=this.parentSeries.dataSeries;if(!y)return n.HitTestInfo.empty();var m=i.hitTestHelpers.getNearestXyyPoint(this.webAssemblyContext,f,h,y,g,v,u),b=m.nearestPointIndex,S=m.distance,_=i.hitTestHelpers.createHitTestInfo(this.parentSeries,f,h,p,y,y.getNativeXValues(),y.getNativeYValues(),g,v,b,u,S);return b>=0?(_.y1Value=y.getNativeY1Values().get(b),_.y1Coord=h.getCoordinate(_.y1Value),_.isHit=i.hitTestHelpers.testIsHitForPoint(f,h,y.getNativeXValues(),y.getNativeYValues(),b,g,v,u,y)||i.hitTestHelpers.testIsHitForPoint(f,h,y.getNativeXValues(),y.getNativeY1Values(),b,g,v,u,y)):_.isHit=!1,_},a.prototype.hitTestXSlice=function(s,l){var u=this.getTranslatedHitTestPoint(s,l);if(!u)return n.HitTestInfo.empty();var c=this.currentRenderPassData,d=c.xCoordinateCalculator,f=c.yCoordinateCalculator,h=c.isVerticalChart,p=h?u.y:u.x,g=h?u.x:u.y,v=this.parentSeries.dataSeries;if(!v)return n.HitTestInfo.empty();var y=i.hitTestHelpers.getNearestXPoint(this.webAssemblyContext,d,v,p,v.dataDistributionCalculator.isSortedAscending),m=v.getNativeXValues(),b=v.getNativeYValues(),S=v.getNativeY1Values(),_=i.hitTestHelpers.createHitTestInfo(this.parentSeries,d,f,h,v,m,b,p,g,y,0);if(y>=0?(_.isHit=_.isWithinDataBounds,_.y1Value=S.get(y),_.y1Coord=f.getCoordinate(_.y1Value)):_.isHit=!1,v.dataDistributionCalculator.isSortedAscending&&y>=0){var C=m.size(),T=d.getCoordinate(d.isCategoryCoordinateCalculator?y:m.get(y));if(!(y===C-1&&(d.hasFlippedCoordinates?p>=T:p<=T))&&!(y===0&&(d.hasFlippedCoordinates?p<=T:p>=T))){var x=i.hitTestHelpers.testIsHitForLine(d,f,m,b,y,p,g,0,v);if(_.point2dataSeriesIndex=x.secondPointIndex,x.secondPointIndex!==void 0){_.point2xValue=m.get(x.secondPointIndex),_.point2xCoord=d.getCoordinate(_.point2xValue),_.point2yValue=b.get(x.secondPointIndex),_.point2yCoord=f.getCoordinate(_.point2yValue),_.point2y1Value=S.get(x.secondPointIndex),_.point2y1Coord=f.getCoordinate(_.point2y1Value),_.point2metadata=v.getMetadataAt(x.secondPointIndex);var A=v.valueNames.reduce(function(w,L){return w[L]=v.getNativeValue(v.getYValuesByName(L),_.point2dataSeriesIndex),w},{});_.point2yValueByName=A}}}return _},a})(e.BaseHitTestProvider);return Hx.BandSeriesHitTestProvider=t,Hx}var Noe;function hU(){if(Noe)return Fx;Noe=1;var r=Fx&&Fx.__extends||(function(){var y=function(m,b){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,_){S.__proto__=_}||function(S,_){for(var C in _)Object.prototype.hasOwnProperty.call(_,C)&&(S[C]=_[C])},y(m,b)};return function(m,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");y(m,b);function S(){this.constructor=m}m.prototype=b===null?Object.create(b):(S.prototype=b.prototype,new S)}})();Object.defineProperty(Fx,"__esModule",{value:!0}),Fx.BaseBandRenderableSeries=void 0;var e=Mr(),i=oi(),n=Wl(),t=ki(),o=K1(),a=ZF(),s=qN(),l=gs(),u=ln(),c=Gl(),d=Ji(),f=aX(),h=cX(),p=$d(),g=lPe(),v=(function(y){r(m,y);function m(b,S){var _=this,C,T,x,A;return _=y.call(this,b,S)||this,_.stroke=(C=S==null?void 0:S.stroke)!==null&&C!==void 0?C:u.SciChartSurfaceBase.DEFAULT_THEME.downBandSeriesLineColor,_.strokeY1Property=(T=S==null?void 0:S.strokeY1)!==null&&T!==void 0?T:u.SciChartSurfaceBase.DEFAULT_THEME.upBandSeriesLineColor,_.fillProperty=(x=S==null?void 0:S.fill)!==null&&x!==void 0?x:u.SciChartSurfaceBase.DEFAULT_THEME.upBandSeriesFillColor,_.fillY1Property=(A=S==null?void 0:S.fillY1)!==null&&A!==void 0?A:u.SciChartSurfaceBase.DEFAULT_THEME.downBandSeriesFillColor,_.fillLinearGradient=S==null?void 0:S.fillLinearGradient,_.fillLinearGradientY1=S==null?void 0:S.fillLinearGradientY1,_.strokeY1DashArrayProperty=S==null?void 0:S.strokeY1DashArray,_.strokeDashArrayProperty=S==null?void 0:S.strokeDashArray,_.customTextureOptionsProperty=S==null?void 0:S.customTextureOptions,_.dataLabelProviderProperty||(_.dataLabelProviderProperty=new f.BandSeriesDataLabelProvider(S==null?void 0:S.dataLabels),_.dataLabelProviderProperty.onAttach(_.webAssemblyContext,_)),S!=null&&S.animation&&_.animationQueue.push(S.animation),_}return m.prototype.addDrawingProviders=function(b,S){this.drawingProviders.push(new h.BandSeriesDrawingProvider(b,this)),this.drawingProviders.push(new p.PointMarkerDrawingProvider(b,this)),this.drawingProviders.push(new p.PointMarkerDrawingProvider(b,this,function(_){return _.y1Values},function(_){return _.y1SplineValues}))},m.prototype.applyTheme=function(b){y.prototype.applyTheme.call(this,b);var S=this.parentSurface.previousThemeProvider;this.stroke===S.downBandSeriesLineColor&&(this.stroke=b.downBandSeriesLineColor),this.strokeY1===S.upBandSeriesLineColor&&(this.strokeY1=b.upBandSeriesLineColor),this.fill===S.upBandSeriesFillColor&&(this.fill=b.upBandSeriesFillColor),this.fillY1===S.downBandSeriesFillColor&&(this.fillY1=b.downBandSeriesFillColor)},Object.defineProperty(m.prototype,"fill",{get:function(){return(0,l.stripAutoColor)(this.fillProperty)},set:function(b){this.fillProperty!==b&&(this.fillProperty=b,this.notifyPropertyChanged(d.PROPERTY.FILL))},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"strokeY1",{get:function(){return(0,l.stripAutoColor)(this.strokeY1Property)},set:function(b){this.strokeY1Property!==b&&(this.strokeY1Property=b,this.notifyPropertyChanged(d.PROPERTY.STROKE_Y1))},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"fillY1",{get:function(){return(0,l.stripAutoColor)(this.fillY1Property)},set:function(b){this.fillY1Property!==b&&(this.fillY1Property=b,this.notifyPropertyChanged(d.PROPERTY.FILL_Y1))},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"strokeDashArray",{get:function(){return this.strokeDashArrayProperty},set:function(b){this.strokeDashArrayProperty=b,this.notifyPropertyChanged(d.PROPERTY.STROKE_DASH_ARRAY)},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"strokeY1DashArray",{get:function(){return this.strokeY1DashArrayProperty},set:function(b){this.strokeY1DashArrayProperty=b,this.notifyPropertyChanged(d.PROPERTY.STROKE_Y1_DASH_ARRAY)},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"strokeY1Thickness",{get:function(){var b;return(b=this.strokeY1ThicknessProperty)!==null&&b!==void 0?b:this.strokeThickness},set:function(b){this.strokeY1ThicknessProperty!==b&&(this.strokeY1ThicknessProperty=b,this.notifyPropertyChanged(d.PROPERTY.STROKE_THICKNESS_Y1))},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"fillLinearGradient",{get:function(){return this.fillLinearGradientProperty},set:function(b){b!==this.fillLinearGradientProperty&&(this.fillLinearGradientProperty=b,this.notifyPropertyChanged(d.PROPERTY.FILL_LINEAR_GRADIENT))},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"customTextureOptions",{get:function(){return this.customTextureOptionsProperty},set:function(b){b!==this.customTextureOptionsProperty&&(this.customTextureOptionsProperty=b,this.notifyPropertyChanged(d.PROPERTY.CUSTOM_TEXTURE_OPTIONS))},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"fillLinearGradientY1",{get:function(){return this.fillLinearGradientY1Property},set:function(b){b!==this.fillLinearGradientY1Property&&(this.fillLinearGradientY1Property=b,this.notifyPropertyChanged(d.PROPERTY.FILL_LINEAR_GRADIENT_Y1))},enumerable:!1,configurable:!0}),m.prototype.getNativeY1Values=function(){return this.dataSeries.getNativeY1Values()},m.prototype.delete=function(){this.xyyTempPointSeries=(0,e.deleteSafe)(this.xyyTempPointSeries),y.prototype.delete.call(this)},m.prototype.toPointSeries=function(b){if(b){this.xyyTempPointSeries?this.xyyTempPointSeries.xRange=b.xVisibleRange:this.xyyTempPointSeries=new o.XyyPointSeriesResampled(this.webAssemblyContext,b.xVisibleRange),this.pointSeries?this.pointSeries.xRange=b.xVisibleRange:this.pointSeries=new o.XyyPointSeriesResampled(this.webAssemblyContext,b.xVisibleRange);var S=this.pointSeries,_=this.dataSeries,C=_.getNativeXValues(),T=_.getNativeYValues(),x=_.getNativeY1Values(),A=this.resamplerHelper.resampleIntoPointSeries(this.webAssemblyContext,b,C,T,this.xyyTempPointSeries.intIndexes,void 0,this.xyyTempPointSeries.xValues,this.xyyTempPointSeries.yValues,!1);this.pointSeries.fifoStartIndex=A.OutputSplitIndex;var w=this.xyyTempPointSeries.intIndexes.size();this.resamplerHelper.resampleIntoPointSeries(this.webAssemblyContext,b,C,x,this.xyyTempPointSeries.intIndexes,void 0,this.xyyTempPointSeries.xValues,this.xyyTempPointSeries.y1Values);var L=this.xyyTempPointSeries.intIndexes.size()-w,k=this.resamplerHelper.mergeIndexes(this.xyyTempPointSeries.intIndexes,w,L,S.intIndexes);return this.xyyTempPointSeries.intIndexes.clear(),b.dataIsFifo?S.indexes.resizeFast(k):S.indexes.resizeFast(k+1),this.resamplerHelper.copyValuesByIndexes(S.intIndexes,C,T,x,k,b.isCategoryAxis,this.dataSeries.fifoSweeping,S.indexes,S.xValues,S.yValues,S.y1Values),S.clearIntIndexes(),S}else return new a.XyyPointSeriesWrapped(this.dataSeries)},m.prototype.getYRange=function(b,S){S===void 0&&(S=!1);var _=this.isRunningDataAnimation?t.EDataSeriesValueType.FinalAnimationValues:t.EDataSeriesValueType.Default,C=this.getResampledPointSeries(S);if(this.renderDataTransform&&this.renderDataTransform.useForYRange)return this.updateTransformedValues(_),(0,n.getWindowedYRange)(this.webAssemblyContext,this.transformedRenderPassData.pointSeries.xValues,this.transformedRenderPassData.pointSeries.yValues,b,!0,S,this.dataSeries.dataDistributionCalculator.isSortedAscending,this.dataSeries.dataDistributionCalculator.containsNaN);if(C){var T=C,x=T.yValues,A=T.y1Values,w=new i.NumberRange(0,C.count-1);return(0,s.getYyYRange)(this.webAssemblyContext,w,x,A,this.dataSeries.dataDistributionCalculator.containsNaN)}return this.dataSeries.getWindowedYRange(b,!0,S,_,this.yRangeMode)},m.prototype.toJSON=function(b){b===void 0&&(b=!1);var S=y.prototype.toJSON.call(this,b),_={fill:this.fill,fillY1:this.fillY1,strokeDashArray:this.strokeDashArray,strokeY1:this.strokeY1,strokeY1DashArray:this.strokeY1DashArray};return Object.assign(S.options,_),S},m.prototype.resolveAutoColors=function(b,S,_){if(y.prototype.resolveAutoColors.call(this,b,S,_),this.fillProperty.startsWith(l.AUTO_COLOR)){var C=_.getFillColor(b,S,this.webAssemblyContext);this.fill=l.AUTO_COLOR+this.adjustAutoColor("fill",C)}var T=(b+Math.floor(S/2))%S;if(this.strokeY1Property.startsWith(l.AUTO_COLOR)){var C=_.getStrokeColor(T,S,this.webAssemblyContext);this.strokeY1=l.AUTO_COLOR+this.adjustAutoColor("strokeY1",C)}if(this.fillY1Property.startsWith(l.AUTO_COLOR)){var C=_.getFillColor(T,S,this.webAssemblyContext);this.fillY1=l.AUTO_COLOR+this.adjustAutoColor("fillY1",C)}},m.prototype.newHitTestProvider=function(){return new g.BandSeriesHitTestProvider(this,this.webAssemblyContext)},m})(c.BaseRenderableSeries);return Fx.BaseBandRenderableSeries=v,Fx}var Foe;function uPe(){if(Foe)return Nx;Foe=1;var r=Nx&&Nx.__extends||(function(){var t=function(o,a){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");t(o,a);function s(){this.constructor=o}o.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}})();Object.defineProperty(Nx,"__esModule",{value:!0}),Nx.FastBandRenderableSeries=void 0;var e=tn(),i=hU(),n=(function(t){r(o,t);function o(a,s){var l=this,u,c;return l=t.call(this,a,s)||this,l.type=e.ESeriesType.BandSeries,!((u=l.paletteProvider)===null||u===void 0)&&u.onAttached&&((c=l.paletteProvider)===null||c===void 0||c.onAttached(l)),l}return o})(i.BaseBandRenderableSeries);return Nx.FastBandRenderableSeries=n,Nx}var Ux={},zx={},joe;function cPe(){if(joe)return zx;joe=1;var r=zx&&zx.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(zx,"__esModule",{value:!0}),zx.XyzPointSeriesWrapped=void 0;var e=xo(),i=ki(),n=iy(),t=(function(o){r(a,o);function a(s){var l=o.call(this,s,void 0,i.EDataSeriesValueType.Default,[e.EValueName.Y,e.EValueName.Z])||this;return l.type=i.EDataSeriesType.Xyz,l}return Object.defineProperty(a.prototype,"zValues",{get:function(){return this.yValuesArray[1]},enumerable:!1,configurable:!0}),a.prototype.getYValues=function(s){return s===1?this.zValues:this.yValues},a})(n.BasePointSeriesWrapped);return zx.XyzPointSeriesWrapped=t,zx}var Wx={},Boe;function dPe(){if(Boe)return Wx;Boe=1;var r=Wx&&Wx.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(Wx,"__esModule",{value:!0}),Wx.BubbleSeriesDrawingProvider=void 0;var e=Mr(),i=Hi(),n=vl(),t=(function(o){r(a,o);function a(s,l){var u=o.call(this,s,l)||this;return u.nativeDrawingProvider=new u.webAssemblyContext.SCRTBubbleSeriesDrawingProvider,u.args=new u.webAssemblyContext.SCRTPointDrawingParams,u}return a.prototype.onSeriesPropertyChange=function(s){},a.prototype.draw=function(s,l){var u,c=this.parentSeries.pointMarker;if(c!==void 0){var d=c.getSprite(),f=l.pointSeries,h=l.xCoordinateCalculator.isCategoryCoordinateCalculator;this.args.Reset();var p=f.xValues,g=f.yValues,v=f.zValues,y=this.getStartAndCount(l,p),m=y.startIndex,b=y.count;this.args.count=b,this.args.startIndex=m;var S=this.parentSeries.dataSeries,_=S.fifoCapacity,C=S.fifoSweeping,T=S.fifoSweepingGap,x=f.fifoStartIndex;C&&_===this.parentSeries.dataSeries.count()&&(this.args.count=x),this.args.verticalChart=l.isVerticalChart,this.args.forceShaderMethod=!0,this.args.SetSpriteTexture(d.getTexture()),o.prototype.applyStrokeFillPaletting.call(this,this.parentSeries.stroke,void 0,void 0,void 0,this.parentSeries.opacity),this.args.SetPalettedColors(this.palettingState.palettedColors),this.args.paletteStart=(u=this.palettingState.paletteStartIndex)!==null&&u!==void 0?u:0,this.args.zMultiplier=this.parentSeries.zMultiplier*i.DpiHelper.PIXEL_RATIO;var A=h?f.indexes:p,w=s.getNativeContext();this.drawPoints(w,A,g,v,l.xCoordinateCalculator.nativeCalculator,l.yCoordinateCalculator.nativeCalculator,this.args,this.parentSeries.parentSurface.seriesViewRect),C&&_===this.parentSeries.dataSeries.count()&&(this.args.startIndex=Math.min(g.size(),x+T),this.args.count=Math.max(0,g.size()-x-T),this.args.count>0&&this.drawPoints(w,A,g,v,l.xCoordinateCalculator.nativeCalculator,l.yCoordinateCalculator.nativeCalculator,this.args,this.parentSeries.parentSurface.seriesViewRect))}},a.prototype.delete=function(){this.nativeDrawingProvider=(0,e.deleteSafe)(this.nativeDrawingProvider),this.args=(0,e.deleteSafe)(this.args),o.prototype.delete.call(this)},a.prototype.overridePaletteProviderColors=function(s,l,u,c,d,f,h){if(s.hasPointMarkerPaletteProvider()){var p=s.paletteProvider,g=p.overridePointMarkerArgb(l,u,c,d,f,h);if(g)return g}return{stroke:void 0,fill:void 0}},a.prototype.isGradientFillPaletting=function(s){return!1},a.prototype.drawPoints=function(s,l,u,c,d,f,h,p){h.SetNativeContext(s),h.SetXValues(l),h.SetYValues(u),h.SetZValues(c),h.SetXCoordinateCalculator(d),h.SetYCoordinateCalculator(f),this.nativeDrawingProvider.DrawPointsVec(h)},a})(n.BaseSeriesDrawingProvider);return Wx.BubbleSeriesDrawingProvider=t,Wx}var Gx={},Voe;function fPe(){if(Voe)return Gx;Voe=1;var r=Gx&&Gx.__extends||(function(){var s=function(l,u){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(c[f]=d[f])},s(l,u)};return function(l,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");s(l,u);function c(){this.constructor=l}l.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}})();Object.defineProperty(Gx,"__esModule",{value:!0}),Gx.BubbleSeriesHitTestProvider=void 0;var e=oo(),i=Hi(),n=Js(),t=Rs(),o=vs(),a=(function(s){r(l,s);function l(){return s!==null&&s.apply(this,arguments)||this}return l.prototype.hitTest=function(u,c,d){d===void 0&&(d=0);var f=this.getTranslatedHitTestPoint(u,c);if(!f)return o.HitTestInfo.empty();var h=this.currentRenderPassData,p=h.xCoordinateCalculator,g=h.yCoordinateCalculator,v=h.isVerticalChart,y=v?f.y:f.x,m=v?f.x:f.y,b=this.parentSeries.dataSeries;if(!b)return o.HitTestInfo.empty();var S=t.hitTestHelpers.getNearestXyPoint(this.webAssemblyContext,p,g,b,y,m,d),_=b.getNativeXValues(),C=b.getNativeYValues(),T=b.getNativeZValues(),x=t.hitTestHelpers.createHitTestInfo(this.parentSeries,p,g,v,b,_,C,y,m,S.nearestPointIndex,d);if(S.nearestPointIndex>=0){x.zValue=T.get(S.nearestPointIndex);var A=(0,e.calcDistance)(y,m,x.xCoord,x.yCoord);x.isHit=A<x.zValue*i.DpiHelper.PIXEL_RATIO/2+d;var w=p.isCategoryCoordinateCalculator,L=w?0:_.get(0),k=p.getCoordinate(L),D=b.getNativeZValues().get(0)/2,j=w?_.size()-1:_.get(_.size()-1),N=p.getCoordinate(j),V=b.getNativeZValues().get(_.size()-1)/2;k<N?x.isWithinDataBounds=k-D<=x.hitTestPoint.x&&x.hitTestPoint.x<=N+V:x.isWithinDataBounds=N-V<=x.hitTestPoint.x&&x.hitTestPoint.x<=k+D}else x.isHit=!1;return x},l.prototype.hitTestDataPoint=function(u,c,d){return d===void 0&&(d=n.BaseHitTestProvider.DEFAULT_HIT_TEST_RADIUS),this.hitTest(u,c,d)},l.prototype.hitTestXSlice=function(u,c){var d=this.getTranslatedHitTestPoint(u,c);if(!d)return o.HitTestInfo.empty();var f=this.currentRenderPassData,h=f.xCoordinateCalculator,p=f.yCoordinateCalculator,g=f.isVerticalChart,v=g?d.y:d.x,y=g?d.x:d.y,m=this.parentSeries.dataSeries;if(!m)return o.HitTestInfo.empty();var b=m.getNativeXValues(),S=m.getNativeYValues(),_=m.getNativeZValues(),C=t.hitTestHelpers.getNearestXPoint(this.webAssemblyContext,h,m,v,m.dataDistributionCalculator.isSortedAscending),T=t.hitTestHelpers.createHitTestInfo(this.parentSeries,h,p,g,m,b,S,v,y,C,0);if(C>=0){T.zValue=_.get(C);var x=h.isCategoryCoordinateCalculator,A=x?0:b.get(0),w=h.getCoordinate(A),L=m.getNativeZValues().get(0)/2,k=x?b.size()-1:b.get(b.size()-1),D=h.getCoordinate(k),j=m.getNativeZValues().get(b.size()-1)/2;w<D?T.isWithinDataBounds=w-L<=T.hitTestPoint.x&&T.hitTestPoint.x<=D+j:T.isWithinDataBounds=D-j<=T.hitTestPoint.x&&T.hitTestPoint.x<=w+L,T.isHit=T.isWithinDataBounds}else T.isHit=!1;return T},l})(n.BaseHitTestProvider);return Gx.BubbleSeriesHitTestProvider=a,Gx}var Hoe;function hPe(){if(Hoe)return Ux;Hoe=1;var r=Ux&&Ux.__extends||(function(){var c=function(d,f){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(h[g]=p[g])},c(d,f)};return function(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");c(d,f);function h(){this.constructor=d}d.prototype=f===null?Object.create(f):(h.prototype=f.prototype,new h)}})();Object.defineProperty(Ux,"__esModule",{value:!0}),Ux.FastBubbleRenderableSeries=void 0;var e=tn(),i=cPe(),n=DM(),t=Gl(),o=dPe(),a=fPe(),s=sX(),l=Ji(),u=(function(c){r(d,c);function d(f,h){var p=this,g,v,y;return p=c.call(this,f,h)||this,p.type=e.ESeriesType.BubbleSeries,p.zMultiplierProperty=1,p.zMultiplierProperty=(g=h==null?void 0:h.zMultiplier)!==null&&g!==void 0?g:p.zMultiplierProperty,p.pointMarker||(p.pointMarker=new n.EllipsePointMarker(f,{width:64,height:64})),!((v=p.paletteProvider)===null||v===void 0)&&v.onAttached&&((y=p.paletteProvider)===null||y===void 0||y.onAttached(p)),p.drawingProviders=[],p.drawingProviders.push(new o.BubbleSeriesDrawingProvider(f,p)),p.dataLabelProviderProperty||(p.dataLabelProviderProperty=new s.BubbleSeriesDataLabelProvider(h==null?void 0:h.dataLabels),p.dataLabelProviderProperty.onAttach(p.webAssemblyContext,p)),h!=null&&h.animation&&p.animationQueue.push(h.animation),p}return Object.defineProperty(d.prototype,"paletteProvider",{get:function(){return this.paletteProviderProperty},set:function(f){this.setPaletteProvider(f)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"zMultiplier",{get:function(){return this.zMultiplierProperty},set:function(f){this.zMultiplierProperty=f,this.notifyPropertyChanged(l.PROPERTY.Z_MULTIPLIER)},enumerable:!1,configurable:!0}),d.prototype.applyTheme=function(f){c.prototype.applyTheme.call(this,f);var h=this.parentSurface.previousThemeProvider;this.stroke===h.lineSeriesColor&&(this.stroke=f.lineSeriesColor)},d.prototype.getBubbleDiameter=function(f){return this.dataSeries.getNativeZValues().get(f)},d.prototype.getNativeZValues=function(){return this.dataSeries.getNativeZValues()},d.prototype.toPointSeries=function(f){return new i.XyzPointSeriesWrapped(this.dataSeries)},d.prototype.newHitTestProvider=function(){return new a.BubbleSeriesHitTestProvider(this,this.webAssemblyContext)},d.prototype.toJSON=function(f){f===void 0&&(f=!1);var h=c.prototype.toJSON.call(this,f),p={zMultiplier:this.zMultiplier};return Object.assign(h.options,p),h},d})(t.BaseRenderableSeries);return Ux.FastBubbleRenderableSeries=u,Ux}var Yx={},$x={},qx={},Uoe;function dX(){if(Uoe)return qx;Uoe=1;var r=qx&&qx.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(qx,"__esModule",{value:!0}),qx.OhlcPointSeriesResampled=void 0;var e=xo(),i=ki(),n=FM(),t=(function(o){r(a,o);function a(s,l){var u=o.call(this,s,l,4,[e.EValueName.Close,e.EValueName.Open,e.EValueName.High,e.EValueName.Low])||this;return u.type=i.EDataSeriesType.Ohlc,u}return Object.defineProperty(a.prototype,"closeValues",{get:function(){return this.yValuesArray[0]},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"openValues",{get:function(){return this.yValuesArray[1]},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"highValues",{get:function(){return this.yValuesArray[2]},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"lowValues",{get:function(){return this.yValuesArray[3]},enumerable:!1,configurable:!0}),a.prototype.debugOutputForUnitTests=function(){console.log("points count ".concat(this.count)),console.log("xResampled at min",this.xValues.get(0)),console.log("openResampled at min",this.openValues.get(0)),console.log("highResampled at min",this.highValues.get(0)),console.log("lowResampled at min",this.lowValues.get(0)),console.log("closeResampled at min",this.closeValues.get(0));var s=Math.round(this.count/2);console.log("middle",s),console.log("xResampled at middle",this.xValues.get(s)),console.log("openResampled at middle",this.openValues.get(s)),console.log("highResampled at middle",this.highValues.get(s)),console.log("lowResampled at middle",this.lowValues.get(s)),console.log("closeResampled at middle",this.closeValues.get(s));var l=this.count-1;console.log("xResampled at end",this.xValues.get(l)),console.log("openResampled at end",this.openValues.get(l)),console.log("highResampled at end",this.highValues.get(l)),console.log("lowResampled at end",this.lowValues.get(l)),console.log("closeResampled at end",this.closeValues.get(l))},a})(n.BasePointSeriesResampled);return qx.OhlcPointSeriesResampled=t,qx}var Xx={},zoe;function pPe(){if(zoe)return Xx;zoe=1;var r=Xx&&Xx.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(Xx,"__esModule",{value:!0}),Xx.OhlcPointSeriesWrapped=void 0;var e=xo(),i=ki(),n=iy(),t=(function(o){r(a,o);function a(s){var l=o.call(this,s,void 0,i.EDataSeriesValueType.Default,[e.EValueName.Close,e.EValueName.Open,e.EValueName.High,e.EValueName.Low])||this;return l.type=i.EDataSeriesType.Ohlc,l}return Object.defineProperty(a.prototype,"closeValues",{get:function(){return this.yValuesArray[0]},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"openValues",{get:function(){return this.yValuesArray[1]},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"highValues",{get:function(){return this.yValuesArray[2]},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"lowValues",{get:function(){return this.yValuesArray[3]},enumerable:!1,configurable:!0}),a})(n.BasePointSeriesWrapped);return Xx.OhlcPointSeriesWrapped=t,Xx}var Kx={},Woe;function gPe(){if(Woe)return Kx;Woe=1;var r=Kx&&Kx.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(u[d]=c[d])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})();Object.defineProperty(Kx,"__esModule",{value:!0}),Kx.OhlcSeriesHitTestProvider=void 0;var e=oo(),i=Js(),n=Rs(),t=vs(),o=(function(a){r(s,a);function s(){return a!==null&&a.apply(this,arguments)||this}return s.prototype.hitTest=function(l,u,c){c===void 0&&(c=0);var d=this.getTranslatedHitTestPoint(l,u);if(!d)return t.HitTestInfo.empty();var f=this.currentRenderPassData,h=f.xCoordinateCalculator,p=f.yCoordinateCalculator,g=f.isVerticalChart,v=g?d.y:d.x,y=g?d.x:d.y,m=this.parentSeries,b=this.parentSeries.dataSeries;if(!b)return t.HitTestInfo.empty();var S=n.hitTestHelpers.getNearestXPoint(this.webAssemblyContext,h,b,v,b.dataDistributionCalculator.isSortedAscending),_=b.getNativeXValues(),C=b.getNativeYValues(),T=n.hitTestHelpers.createHitTestInfo(this.parentSeries,h,p,g,b,_,C,v,y,S,c);if(S>=0){var x=n.hitTestHelpers.testIsHitForOHLC(h,p,m,b,S,v,y,c);T.isHit=x.isHit,T.openValue=x.openValue,T.highValue=x.highValue,T.lowValue=x.lowValue,T.closeValue=x.closeValue}else T.isHit=!1;return T},s.prototype.hitTestForDataPointSelectionModifier=function(l,u,c){return c===void 0&&(c=i.BaseHitTestProvider.DEFAULT_HIT_TEST_RADIUS),this.hitTest(l,u,c)},s.prototype.hitTestXSlice=function(l,u){var c=this.getTranslatedHitTestPoint(l,u);if(!c)return t.HitTestInfo.empty();var d=this.currentRenderPassData,f=d.xCoordinateCalculator,h=d.yCoordinateCalculator,p=d.isVerticalChart,g=p?c.y:c.x,v=p?c.x:c.y,y=this.parentSeries.dataSeries;if(!y)return t.HitTestInfo.empty();var m=y.getNativeXValues(),b=y.getNativeYValues(),S=n.hitTestHelpers.getNearestXPoint(this.webAssemblyContext,f,y,g,y.dataDistributionCalculator.isSortedAscending),_=n.hitTestHelpers.createHitTestInfo(this.parentSeries,f,h,p,y,m,b,g,v,S,0);if(S>=0){_.openValue=y.getNativeOpenValues().get(S),_.highValue=y.getNativeHighValues().get(S),_.lowValue=y.getNativeLowValues().get(S),_.closeValue=y.getNativeCloseValues().get(S);var C=f.isCategoryCoordinateCalculator,T=C?0:m.get(0),x=C?m.size()-1:m.get(m.size()-1),A=this.parentSeries.dataPointWidth;_.isWithinDataBounds=(0,e.testIsInInterval)(_.hitTestPointValues.x,T,x,A/2),_.isHit=_.isWithinDataBounds}else _.isHit=!1;return _},s})(i.BaseHitTestProvider);return Kx.OhlcSeriesHitTestProvider=o,Kx}var Goe;function fX(){if(Goe)return $x;Goe=1;var r=$x&&$x.__extends||(function(){var y=function(m,b){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,_){S.__proto__=_}||function(S,_){for(var C in _)Object.prototype.hasOwnProperty.call(_,C)&&(S[C]=_[C])},y(m,b)};return function(m,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");y(m,b);function S(){this.constructor=m}m.prototype=b===null?Object.create(b):(S.prototype=b.prototype,new S)}})();Object.defineProperty($x,"__esModule",{value:!0}),$x.BaseOhlcRenderableSeries=void 0;var e=Mr(),i=oi(),n=ry(),t=Wl(),o=ki(),a=$N(),s=dX(),l=pPe(),u=K1(),c=oy(),d=gs(),f=ln(),h=Gl(),p=Ji(),g=gPe(),v=(function(y){r(m,y);function m(b,S){var _=this,C,T,x,A,w;return _=y.call(this,b,S)||this,_.dataPointWidthModeProperty=n.EDataPointWidthMode.Relative,_.strokeUp=(C=S==null?void 0:S.strokeUp)!==null&&C!==void 0?C:f.SciChartSurfaceBase.DEFAULT_THEME.upWickColor,_.strokeDown=(T=S==null?void 0:S.strokeDown)!==null&&T!==void 0?T:f.SciChartSurfaceBase.DEFAULT_THEME.downWickColor,_.dataPointWidth=(x=S==null?void 0:S.dataPointWidth)!==null&&x!==void 0?x:.5,_.dataPointWidthMode=(A=S==null?void 0:S.dataPointWidthMode)!==null&&A!==void 0?A:_.dataPointWidthModeProperty,_.strokeThickness=(w=S==null?void 0:S.strokeThickness)!==null&&w!==void 0?w:1,S!=null&&S.animation&&_.animationQueue.push(S.animation),_}return m.prototype.applyTheme=function(b){y.prototype.applyTheme.call(this,b);var S=this.parentSurface.previousThemeProvider;this.stroke===S.lineSeriesColor&&(this.stroke=b.lineSeriesColor),this.strokeUp===S.upWickColor&&(this.strokeUp=b.upWickColor),this.strokeDown===S.downWickColor&&(this.strokeDown=b.downWickColor)},Object.defineProperty(m.prototype,"strokeUp",{get:function(){return(0,d.stripAutoColor)(this.strokeUpProperty)},set:function(b){this.strokeUpProperty=b,this.notifyPropertyChanged(p.PROPERTY.STROKE_UP)},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"strokeDown",{get:function(){return(0,d.stripAutoColor)(this.strokeDownProperty)},set:function(b){this.strokeDownProperty=b,this.notifyPropertyChanged(p.PROPERTY.STROKE_DOWN)},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"dataPointWidth",{get:function(){return this.dataPointWidthProperty},set:function(b){this.dataPointWidthProperty=b,this.notifyPropertyChanged(p.PROPERTY.DATA_POINT_WIDTH)},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"dataPointWidthMode",{get:function(){return this.dataPointWidthModeProperty},set:function(b){this.dataPointWidthModeProperty=b,this.notifyPropertyChanged(p.PROPERTY.DATA_POINT_WIDTH_MODE)},enumerable:!1,configurable:!0}),m.prototype.notifyPropertyChanged=function(b){if(y.prototype.notifyPropertyChanged.call(this,b),b===p.PROPERTY.DATA_SERIES&&this.dataSeries!==void 0&&this.dataSeries.type!==o.EDataSeriesType.Ohlc)throw new Error("DataSeries for Candlestick or Ohlc series must be type OhlcDataSeries")},m.prototype.getXRange=function(){var b=y.prototype.getXRange.call(this),S=(0,h.getDataPointWidthAdjustment)(this.dataPointWidthMode,this.dataPointWidth,this.dataSeries.count(),b,this.xAxis.getCurrentCoordinateCalculator());return new i.NumberRange(b.min-S,b.max+S)},m.prototype.delete=function(){this.resamplerHelper=(0,e.deleteSafe)(this.resamplerHelper),this.xyyTempPointSeries=(0,e.deleteSafe)(this.xyyTempPointSeries),this.pointSeries=(0,e.deleteSafe)(this.pointSeries),y.prototype.delete.call(this)},m.prototype.getNativeOpenValues=function(){return this.dataSeries.getNativeOpenValues()},m.prototype.getNativeHighValues=function(){return this.dataSeries.getNativeHighValues()},m.prototype.getNativeLowValues=function(){return this.dataSeries.getNativeLowValues()},m.prototype.getNativeCloseValues=function(){return this.dataSeries.getNativeYValues()},m.prototype.resolveAutoColors=function(b,S,_){if(this.strokeUpProperty.startsWith(d.AUTO_COLOR)){var C=_.getStrokeColor(b,S,this.webAssemblyContext);this.strokeUp=d.AUTO_COLOR+this.adjustAutoColor("strokeUp",C)}var T=(b+Math.floor(S/2))%S;if(this.strokeDownProperty.startsWith(d.AUTO_COLOR)){var C=_.getStrokeColor(T,S,this.webAssemblyContext);this.strokeDown=d.AUTO_COLOR+this.adjustAutoColor("strokeDown",C)}},m.prototype.toJSON=function(b){b===void 0&&(b=!1);var S=y.prototype.toJSON.call(this,b),_={dataPointWidth:this.dataPointWidth,dataPointWidthMode:this.dataPointWidthMode,strokeDown:this.strokeDown,strokeUp:this.strokeUp};return Object.assign(S.options,_),S},m.prototype.getYRange=function(b,S){S===void 0&&(S=!1);var _=this.isRunningDataAnimation?o.EDataSeriesValueType.FinalAnimationValues:o.EDataSeriesValueType.Default,C=this.getResampledPointSeries(S);if(this.renderDataTransform&&this.renderDataTransform.useForYRange)return this.updateTransformedValues(_),(0,t.getWindowedYRange)(this.webAssemblyContext,this.transformedRenderPassData.pointSeries.xValues,this.transformedRenderPassData.pointSeries.yValues,C?new i.NumberRange(0,C.count-1):b,!0,S,this.dataSeries.dataDistributionCalculator.isSortedAscending,this.dataSeries.dataDistributionCalculator.containsNaN);if(C){var T=C,x=T.openValues,A=T.closeValues,w=T.highValues,L=T.lowValues,k=new i.NumberRange(0,C.count-1);return(0,a.getOHLCYRange)(k,x,w,L,A)}return this.dataSeries.getWindowedYRange(b,!0,S,_,this.yRangeMode)},m.prototype.toPointSeries=function(b){if(b){this.xyyTempPointSeries?this.xyyTempPointSeries.xRange=b.xVisibleRange:this.xyyTempPointSeries=new u.XyyPointSeriesResampled(this.webAssemblyContext,b.xVisibleRange),this.pointSeries?this.pointSeries.xRange=b.xVisibleRange:this.pointSeries=new s.OhlcPointSeriesResampled(this.webAssemblyContext,b.xVisibleRange);var S=this.pointSeries,_=this.dataSeries,C=_.getNativeXValues(),T=_.getNativeOpenValues(),x=_.getNativeHighValues(),A=_.getNativeLowValues(),w=_.getNativeCloseValues(),L=_.getNativeIndexes(),k=b.clone({resamplingMode:b.resamplingMode===c.EResamplingMode.None?c.EResamplingMode.None:c.EResamplingMode.Max}),D=this.resamplerHelper.resampleIntoPointSeries(this.webAssemblyContext,k,C,x,this.xyyTempPointSeries.intIndexes,void 0,this.xyyTempPointSeries.xValues,S.highValues);this.pointSeries.fifoStartIndex=D.OutputSplitIndex,this.xyyTempPointSeries.clearIntIndexes();var j=b.clone({resamplingMode:b.resamplingMode===c.EResamplingMode.None?c.EResamplingMode.None:c.EResamplingMode.Min});this.resamplerHelper.resampleIntoPointSeries(this.webAssemblyContext,j,C,A,this.xyyTempPointSeries.intIndexes,void 0,this.xyyTempPointSeries.xValues,S.lowValues),this.xyyTempPointSeries.clearIntIndexes(),this.xyyTempPointSeries.y1Values.clear();var N=b.clone({resamplingMode:b.resamplingMode===c.EResamplingMode.None?c.EResamplingMode.None:c.EResamplingMode.Min});this.resamplerHelper.resampleIntoPointSeries(this.webAssemblyContext,N,C,L,S.intIndexes,void 0,this.xyyTempPointSeries.xValues,this.xyyTempPointSeries.y1Values);var V=S.intIndexes.size();this.xyyTempPointSeries.y1Values.clear();var W=S.intIndexes.get(3)-S.intIndexes.get(2)-1;return S.indexes.resizeFast(V+1),this.resamplerHelper.copyValuesByIndexes(S.intIndexes,C,T,w,V,b.isCategoryAxis,this.dataSeries.fifoSweeping,S.indexes,S.xValues,S.openValues,S.closeValues,W),S.clearIntIndexes(),S}else return new l.OhlcPointSeriesWrapped(this.dataSeries)},m.prototype.newHitTestProvider=function(){return new g.OhlcSeriesHitTestProvider(this,this.webAssemblyContext)},m})(h.BaseRenderableSeries);return $x.BaseOhlcRenderableSeries=v,$x}var i2={},Yoe;function o3(){return Yoe||(Yoe=1,(function(r){var e=i2&&i2.__extends||(function(){var u=function(c,d){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,h){f.__proto__=h}||function(f,h){for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(f[p]=h[p])},u(c,d)};return function(c,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");u(c,d);function f(){this.constructor=c}c.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}})();Object.defineProperty(r,"__esModule",{value:!0}),r.OhlcSeriesDrawingProvider=r.EOhlcDrawingMode=void 0;var i=Mr(),n=hl(),t=ts(),o=Ji(),a=vl(),s;(function(u){u.Candles="Candles",u.Ohlc="Ohlc"})(s=r.EOhlcDrawingMode||(r.EOhlcDrawingMode={}));var l=(function(u){e(c,u);function c(d,f,h){var p=u.call(this,d,f)||this;p.drawingMode=h,p.nativeDrawingProvider=new p.webAssemblyContext.SCRTCandlestickSeriesDrawingProvider,p.args=new p.webAssemblyContext.SCRTOhlcDrawingParams;var g=f.strokeThickness,v=f.strokeUp,y=f.strokeDown,m=f.opacity,b=f;return p.strokeUpPenCache=new t.Pen2DCache(d),p.strokeDownPenCache=new t.Pen2DCache(d),p.brushUpCache=new n.BrushCache(d),p.brushDownCache=new n.BrushCache(d),(0,t.createPenInCache)(p.strokeUpPenCache,v,g,m),(0,t.createPenInCache)(p.strokeDownPenCache,y,g,m),b.brushUp&&(0,n.createBrushInCache)(p.brushUpCache,b.brushUp,m),b.brushDown&&(0,n.createBrushInCache)(p.brushDownCache,b.brushDown,m),p}return c.prototype.onDpiChanged=function(d){u.prototype.onDpiChanged.call(this,d),this.onSeriesPropertyChange(o.PROPERTY.STROKE_UP),this.onSeriesPropertyChange(o.PROPERTY.STROKE_DOWN)},c.prototype.onSeriesPropertyChange=function(d){u.prototype.onSeriesPropertyChange.call(this,d);var f=this.parentSeries,h=f.strokeThickness,p=f.strokeUp,g=f.strokeDown,v=f.opacity;(d===o.PROPERTY.STROKE_UP||d===o.PROPERTY.STROKE_THICKNESS||d===o.PROPERTY.OPACITY)&&(0,t.createPenInCache)(this.strokeUpPenCache,p,h,v),(d===o.PROPERTY.STROKE_DOWN||d===o.PROPERTY.STROKE_THICKNESS||d===o.PROPERTY.OPACITY)&&(0,t.createPenInCache)(this.strokeDownPenCache,g,h,v);var y=this.parentSeries;(d===o.PROPERTY.BRUSH_DOWN||d===o.PROPERTY.OPACITY)&&(0,n.createBrushInCache)(this.brushDownCache,y==null?void 0:y.brushDown,v),(d===o.PROPERTY.BRUSH_UP||d===o.PROPERTY.OPACITY)&&(0,n.createBrushInCache)(this.brushUpCache,y==null?void 0:y.brushUp,v)},c.prototype.draw=function(d,f){var h=f.pointSeries;if(this.args.Reset(),this.drawingMode===s.Candles){var p=(0,n.getScrtBrushFromCache)(this.brushUpCache),g=(0,n.getScrtBrushFromCache)(this.brushDownCache);if(!p||!g)return;this.args.SetBrushes(p,g)}var v=(0,t.getScrtPenFromCache)(this.strokeUpPenCache),y=(0,t.getScrtPenFromCache)(this.strokeDownPenCache);if(!(!v||!y)){this.args.SetPens(v,y);var m="#ffffffff";u.prototype.applyStrokeFillPaletting.call(this,m,void 0,m,void 0,this.parentSeries.opacity),this.args.SetPalettedColors(this.palettingState.palettedColors),this.args.forceShaderMethod=!0,this.args.verticalChart=f.isVerticalChart,this.args.candleWidth=this.parentSeries.getDataPointWidth(f.xCoordinateCalculator,this.parentSeries.dataPointWidth,this.parentSeries.dataPointWidthMode),this.args.drawAsOhlc=this.drawingMode===s.Ohlc;var b=d.getNativeContext();this.parentSeries.parentSurface.seriesViewRect,this.parentSeries.dataSeries;var S=f.xCoordinateCalculator.isCategoryCoordinateCalculator,_=h.xValues,C=h.openValues,T=h.highValues,x=h.lowValues,A=h.closeValues,w=this.getStartAndCount(f,_),L=w.startIndex,k=w.count;this.args.count=k,this.args.startIndex=L;var D=this.parentSeries.dataSeries,j=D.fifoCapacity,N=D.fifoSweeping,V=D.fifoSweepingGap,W=h.fifoStartIndex;N&&j===this.parentSeries.dataSeries.count()&&(this.args.count=W);var K=S?h.indexes:_;this.args.SetValues(K,C,T,x,A),this.args.SetNativeContext(b),this.args.SetXCoordinateCalculator(f.xCoordinateCalculator.nativeCalculator),this.args.SetYCoordinateCalculator(f.yCoordinateCalculator.nativeCalculator),this.nativeDrawingProvider.DrawPointsVec(this.args),N&&j===this.parentSeries.dataSeries.count()&&(this.args.startIndex=Math.min(A.size(),W+V),this.args.count=Math.max(0,A.size()-W-V),this.args.count>0&&(this.args.SetNativeContext(b),this.args.SetXCoordinateCalculator(f.xCoordinateCalculator.nativeCalculator),this.args.SetYCoordinateCalculator(f.yCoordinateCalculator.nativeCalculator),this.nativeDrawingProvider.DrawPointsVec(this.args)))}},c.prototype.delete=function(){this.strokeDownPenCache=(0,i.deleteSafe)(this.strokeDownPenCache),this.strokeUpPenCache=(0,i.deleteSafe)(this.strokeUpPenCache),this.brushUpCache=(0,i.deleteSafe)(this.brushUpCache),this.brushDownCache=(0,i.deleteSafe)(this.brushDownCache),this.nativeDrawingProvider=(0,i.deleteSafe)(this.nativeDrawingProvider),this.args=(0,i.deleteSafe)(this.args),u.prototype.delete.call(this)},c})(a.BaseSeriesDrawingProvider);r.OhlcSeriesDrawingProvider=l})(i2)),i2}var $oe;function vPe(){if($oe)return Yx;$oe=1;var r=Yx&&Yx.__extends||(function(){var l=function(u,c){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(d[h]=f[h])},l(u,c)};return function(u,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");l(u,c);function d(){this.constructor=u}u.prototype=c===null?Object.create(c):(d.prototype=c.prototype,new d)}})();Object.defineProperty(Yx,"__esModule",{value:!0}),Yx.FastCandlestickRenderableSeries=void 0;var e=tn(),i=gs(),n=ln(),t=fX(),o=Ji(),a=o3(),s=(function(l){r(u,l);function u(c,d){var f=this,h,p;return f=l.call(this,c,d)||this,f.type=e.ESeriesType.CandlestickSeries,f.brushUp=(d==null?void 0:d.brushUp)||n.SciChartSurfaceBase.DEFAULT_THEME.upBodyBrush,f.brushDown=(d==null?void 0:d.brushDown)||n.SciChartSurfaceBase.DEFAULT_THEME.downBodyBrush,!((h=f.paletteProvider)===null||h===void 0)&&h.onAttached&&((p=f.paletteProvider)===null||p===void 0||p.onAttached(f)),f.drawingProviders=[],f.drawingProviders.push(new a.OhlcSeriesDrawingProvider(c,f,a.EOhlcDrawingMode.Candles)),f}return u.prototype.applyTheme=function(c){l.prototype.applyTheme.call(this,c);var d=this.parentSurface.previousThemeProvider;this.brushUp===d.upBodyBrush&&(this.brushUp=c.upBodyBrush),this.brushDown===d.downBodyBrush&&(this.brushDown=c.downBodyBrush)},Object.defineProperty(u.prototype,"brushUp",{get:function(){return(0,i.stripAutoColor)(this.brushUpProperty)},set:function(c){this.brushUpProperty=c,this.notifyPropertyChanged(o.PROPERTY.BRUSH_UP)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"brushDown",{get:function(){return(0,i.stripAutoColor)(this.brushDownProperty)},set:function(c){this.brushDownProperty=c,this.notifyPropertyChanged(o.PROPERTY.BRUSH_DOWN)},enumerable:!1,configurable:!0}),u.prototype.toJSON=function(c){c===void 0&&(c=!1);var d=l.prototype.toJSON.call(this,c),f={brushDown:this.brushDown,brushUp:this.brushUp};return Object.assign(d.options,f),d},u.prototype.resolveAutoColors=function(c,d,f){if(l.prototype.resolveAutoColors.call(this,c,d,f),this.brushUpProperty.startsWith(i.AUTO_COLOR)){var h=f.getFillColor(c,d,this.webAssemblyContext);this.brushUp=i.AUTO_COLOR+this.adjustAutoColor("brushUp",h)}var p=(c+Math.floor(d/2))%d;if(this.brushDownProperty.startsWith(i.AUTO_COLOR)){var h=f.getFillColor(p,d,this.webAssemblyContext);this.brushDown=i.AUTO_COLOR+this.adjustAutoColor("brushDown",h)}},u})(t.BaseOhlcRenderableSeries);return Yx.FastCandlestickRenderableSeries=s,Yx}var t0={},Zx={},qoe;function yPe(){if(qoe)return Zx;qoe=1;var r=Zx&&Zx.__extends||(function(){var l=function(u,c){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(d[h]=f[h])},l(u,c)};return function(u,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");l(u,c);function d(){this.constructor=u}u.prototype=c===null?Object.create(c):(d.prototype=c.prototype,new d)}})();Object.defineProperty(Zx,"__esModule",{value:!0}),Zx.ColumnSeriesDrawingProvider=void 0;var e=Mr(),i=hl(),n=ts(),t=ln(),o=Ji(),a=vl(),s=(function(l){r(u,l);function u(c,d,f,h){var p=l.call(this,c,d,f,h)||this;return p.nativeDrawingProvider=new c.SCRTColumnSeriesDrawingProvider,p.args=new p.webAssemblyContext.SCRTColumnDrawingParams,p.strokePenCache=new n.Pen2DCache(c),p.strokePenFillColoredCache=new n.Pen2DCache(c),p.fillBrushCache=new i.BrushCache(c),p}return u.prototype.onAttachSeries=function(){l.prototype.onAttachSeries.call(this);var c=this.getProperties(this.parentSeries),d=c.stroke,f=c.strokeThickness,h=c.fill,p=c.opacity;(0,n.createPenInCache)(this.strokePenCache,d,f,p),f===0&&(0,n.createPenInCache)(this.strokePenFillColoredCache,h,1,p),this.createBrush()},u.prototype.delete=function(){this.nativeDrawingProvider=(0,e.deleteSafe)(this.nativeDrawingProvider),this.args=(0,e.deleteSafe)(this.args),this.strokePenCache=(0,e.deleteSafe)(this.strokePenCache),this.strokePenFillColoredCache=(0,e.deleteSafe)(this.strokePenFillColoredCache),this.fillBrushCache=(0,e.deleteSafe)(this.fillBrushCache),l.prototype.delete.call(this)},u.prototype.getProperties=function(c){var d=c.stroke,f=c.strokeThickness,h=c.opacity,p=c.fill,g=c.fillLinearGradient,v=c.customTextureOptions;return{stroke:d,strokeThickness:f,opacity:h,fill:p,fillLinearGradient:g,customTextureOptions:v}},u.prototype.draw=function(c,d){var f=d.pointSeries,h=this.parentSeries.parentSurface.seriesViewRect,p=this.getProperties(this.parentSeries).strokeThickness;this.args.Reset(),this.args.forceShaderMethod=!0,this.args.verticalChart=d.isVerticalChart,this.args.zeroLineY=this.parentSeries.zeroLineY,this.args.columnWidth=this.parentSeries.getDataPointWidth(d.xCoordinateCalculator,this.parentSeries.dataPointWidth,this.parentSeries.dataPointWidthMode),this.args.bottomRadius=this.parentSeries.cornerRadius;var g=this.strokePenCache;this.args.columnWidth===1&&p===0&&(this.args.columnWidth=0,g=this.strokePenFillColoredCache);var v=(0,n.getScrtPenFromCache)(g);v&&this.args.SetLinesPen(v);var y=(0,i.getScrtBrushFromCache)(this.fillBrushCache);y&&this.args.SetFillBrush(y),this.args.viewportWidth=h.width,this.args.viewportHeight=h.height,l.prototype.applyStrokeFillPaletting.call(this,this.parentSeries.stroke,v,this.parentSeries.fill,y,this.parentSeries.opacity,!1,this.parentSeries.fillLinearGradient!==void 0),this.args.SetPalettedColors(this.palettingState.palettedColors),this.args.paletteStart=this.palettingState.paletteStartIndex;var m=d.xCoordinateCalculator.isCategoryCoordinateCalculator,b=this.xSelector(f),S=this.ySelector(f),_=m?f.indexes:b,C=this.getStartAndCount(d,_),T=C.startIndex,x=C.count;this.args.count=x,this.args.startIndex=T;var A=this.parentSeries.dataSeries,w=A.fifoCapacity,L=A.fifoSweeping,k=A.fifoSweepingGap,D=f.fifoStartIndex;L&&w===this.parentSeries.dataSeries.count()&&(this.args.count=D);var j=c.getNativeContext();this.args.SetNativeContext(j),this.args.SetXValues(_),this.args.SetYValues(S),this.args.SetXCoordinateCalculator(d.xCoordinateCalculator.nativeCalculator),this.args.SetYCoordinateCalculator(d.yCoordinateCalculator.nativeCalculator),this.nativeDrawingProvider.DrawPointsVec(this.args),L&&w===this.parentSeries.dataSeries.count()&&(this.args.startIndex=Math.min(S.size(),D+k),this.args.count=Math.max(0,S.size()-D-k),this.args.count>0&&this.nativeDrawingProvider.DrawPointsVec(this.args))},u.prototype.onDpiChanged=function(c){l.prototype.onDpiChanged.call(this,c),this.onSeriesPropertyChange(o.PROPERTY.STROKE)},u.prototype.onSeriesPropertyChange=function(c){l.prototype.onSeriesPropertyChange.call(this,c);var d=this.parentSeries,f=d.stroke,h=d.strokeThickness,p=d.opacity,g=d.fill;(c===o.PROPERTY.STROKE||c===o.PROPERTY.STROKE_THICKNESS||c===o.PROPERTY.OPACITY)&&(0,n.createPenInCache)(this.strokePenCache,f,h,p),(c===o.PROPERTY.FILL||c===o.PROPERTY.OPACITY||c===o.PROPERTY.CUSTOM_TEXTURE_OPTIONS)&&this.createBrush(),h===0&&(c===o.PROPERTY.STROKE_THICKNESS||c===o.PROPERTY.STROKE||c===o.PROPERTY.OPACITY||c===o.PROPERTY.FILL)&&(0,n.createPenInCache)(this.strokePenFillColoredCache,g,1,p)},u.prototype.createBrush=function(){var c=this.parentSeries.parentSurface,d=this.getProperties(this.parentSeries),f=d.fillLinearGradient,h=d.fill,p=d.opacity,g=d.customTextureOptions,v=c!=null&&c.isCopyCanvasSurface?c.domCanvas2D.height/t.SciChartSurfaceBase.domMasterCanvas.height:1,y=c!=null&&c.isCopyCanvasSurface?c.domCanvas2D.width/t.SciChartSurfaceBase.domMasterCanvas.width:1,m=this.fillBrushCache.create(h,p,v,y,f,g);return m.scrtBrush},u})(a.BaseSeriesDrawingProvider);return Zx.ColumnSeriesDrawingProvider=s,Zx}var Jx={},Xoe;function mPe(){if(Xoe)return Jx;Xoe=1;var r=Jx&&Jx.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(Jx,"__esModule",{value:!0}),Jx.ColumnSeriesHitTestProvider=void 0;var e=Js(),i=Rs(),n=vs(),t=(function(o){r(a,o);function a(){return o!==null&&o.apply(this,arguments)||this}return a.prototype.hitTest=function(s,l){var u=this.getTranslatedHitTestPoint(s,l);if(!u)return n.HitTestInfo.empty();var c=this.currentRenderPassData,d=c.xCoordinateCalculator,f=c.yCoordinateCalculator,h=c.isVerticalChart,p=h?u.y:u.x,g=h?u.x:u.y,v=this.parentSeries.dataSeries;if(!v)return n.HitTestInfo.empty();var y=i.hitTestHelpers.getNearestXPoint(this.webAssemblyContext,d,v,p,v.dataDistributionCalculator.isSortedAscending),m=v.getNativeXValues(),b=v.getNativeYValues(),S=this.parentSeries,_=S.getDataPointWidth,C=S.dataPointWidth,T=S.zeroLineY,x=S.dataPointWidthMode,A=_(d,C,x),w=i.hitTestHelpers.createHitTestInfo(this.parentSeries,d,f,h,v,m,b,p,g,y,0,void 0,A);return y>=0?w.isHit=i.hitTestHelpers.testIsHitForColumn(d,f,A,T,v,m,b,y,p,g):w.isHit=!1,w},a.prototype.hitTestForDataPointSelectionModifier=function(s,l,u){return u===void 0&&(u=e.BaseHitTestProvider.DEFAULT_HIT_TEST_RADIUS),this.hitTest(s,l)},a.prototype.hitTestXSlice=function(s,l){var u=this.hitTest(s,l);return u.dataSeriesIndex>=0&&(u.isHit=u.isWithinDataBounds),u},a})(e.BaseHitTestProvider);return Jx.ColumnSeriesHitTestProvider=t,Jx}var Koe;function ZN(){if(Koe)return t0;Koe=1;var r=t0&&t0.__extends||(function(){var p=function(g,v){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,m){y.__proto__=m}||function(y,m){for(var b in m)Object.prototype.hasOwnProperty.call(m,b)&&(y[b]=m[b])},p(g,v)};return function(g,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");p(g,v);function y(){this.constructor=g}g.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}})();Object.defineProperty(t0,"__esModule",{value:!0}),t0.getXRange=t0.FastColumnRenderableSeries=void 0;var e=oi(),i=ry(),n=tn(),t=gs(),o=ln(),a=Gl(),s=Ji(),l=QR(),u=yPe(),c=$d(),d=mPe(),f=(function(p){r(g,p);function g(v,y){var m=this,b,S,_,C,T,x,A,w;return m=p.call(this,v,y)||this,m.type=n.ESeriesType.ColumnSeries,m.fillProperty=o.SciChartSurfaceBase.DEFAULT_THEME.columnFillBrush,m.zeroLineYProperty=0,m.dataPointWidthProperty=.8,m.dataPointWidthModeProperty=i.EDataPointWidthMode.Relative,m.cornerRadiusProperty=0,m.fillProperty=(b=y==null?void 0:y.fill)!==null&&b!==void 0?b:m.fillProperty,m.zeroLineY=(S=y==null?void 0:y.zeroLineY)!==null&&S!==void 0?S:m.zeroLineYProperty,m.dataPointWidthProperty=(_=y==null?void 0:y.dataPointWidth)!==null&&_!==void 0?_:m.dataPointWidthProperty,m.dataPointWidthMode=(C=y==null?void 0:y.dataPointWidthMode)!==null&&C!==void 0?C:m.dataPointWidthModeProperty,m.fillLinearGradientProperty=(T=y==null?void 0:y.fillLinearGradient)!==null&&T!==void 0?T:m.fillLinearGradientProperty,m.cornerRadiusProperty=(x=y==null?void 0:y.cornerRadius)!==null&&x!==void 0?x:m.cornerRadiusProperty,m.customTextureOptionsProperty=y==null?void 0:y.customTextureOptions,!((A=m.paletteProvider)===null||A===void 0)&&A.onAttached&&((w=m.paletteProvider)===null||w===void 0||w.onAttached(m)),m.dataLabelProviderProperty||(m.dataLabelProviderProperty=new l.ColumnSeriesDataLabelProvider(y==null?void 0:y.dataLabels),m.dataLabelProviderProperty.onAttach(m.webAssemblyContext,m)),y!=null&&y.animation&&m.animationQueue.push(y.animation),m}return g.prototype.addDrawingProviders=function(v,y){this.drawingProviders.push(new u.ColumnSeriesDrawingProvider(v,this)),this.drawingProviders.push(new c.PointMarkerDrawingProvider(v,this))},g.prototype.applyTheme=function(v){p.prototype.applyTheme.call(this,v);var y=this.parentSurface.previousThemeProvider;this.fill===y.columnFillBrush&&(this.fill=v.columnFillBrush),this.stroke===y.columnLineColor&&(this.stroke=v.columnLineColor)},Object.defineProperty(g.prototype,"fill",{get:function(){return(0,t.stripAutoColor)(this.fillProperty)},set:function(v){this.fillProperty!==v&&(this.fillProperty=v,this.notifyPropertyChanged(s.PROPERTY.FILL))},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"fillLinearGradient",{get:function(){return this.fillLinearGradientProperty},set:function(v){v!==this.fillLinearGradientProperty&&(this.fillLinearGradientProperty=v,this.notifyPropertyChanged(s.PROPERTY.FILL_LINEAR_GRADIENT))},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"zeroLineY",{get:function(){return this.zeroLineYProperty},set:function(v){this.zeroLineYProperty=v,this.notifyPropertyChanged(s.PROPERTY.ZERO_LINE_Y)},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"dataPointWidth",{get:function(){return this.dataPointWidthProperty},set:function(v){this.dataPointWidthProperty=v,this.notifyPropertyChanged(s.PROPERTY.DATA_POINT_WIDTH)},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"dataPointWidthMode",{get:function(){return this.dataPointWidthModeProperty},set:function(v){this.dataPointWidthModeProperty=v,this.notifyPropertyChanged(s.PROPERTY.DATA_POINT_WIDTH_MODE)},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"cornerRadius",{get:function(){return this.cornerRadiusProperty},set:function(v){this.cornerRadiusProperty=v,this.notifyPropertyChanged(s.PROPERTY.CORNER_RADIUS)},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"customTextureOptions",{get:function(){return this.customTextureOptionsProperty},set:function(v){v!==this.customTextureOptionsProperty&&(this.customTextureOptionsProperty=v,this.notifyPropertyChanged(s.PROPERTY.CUSTOM_TEXTURE_OPTIONS))},enumerable:!1,configurable:!0}),g.prototype.getXRange=function(){var v=p.prototype.getXRange.call(this),y=(0,a.getDataPointWidthAdjustment)(this.dataPointWidthMode,this.dataPointWidth,this.dataSeries.count(),v,this.xAxis.getCurrentCoordinateCalculator());return new e.NumberRange(v.min-y,v.max+y)},g.prototype.getYRange=function(v,y){y===void 0&&(y=!1);var m=p.prototype.getYRange.call(this,v,y);if(m)return new e.NumberRange(Math.min(m.min,this.zeroLineY),Math.max(m.max,this.zeroLineY))},g.prototype.resolveAutoColors=function(v,y,m){if(p.prototype.resolveAutoColors.call(this,v,y,m),this.fillProperty.startsWith(t.AUTO_COLOR)){var b=m.getFillColor(v,y,this.webAssemblyContext);this.fill=t.AUTO_COLOR+this.adjustAutoColor("fill",b)}},g.prototype.toJSON=function(v){v===void 0&&(v=!1);var y=p.prototype.toJSON.call(this,v),m={dataPointWidth:this.dataPointWidth,dataPointWidthMode:this.dataPointWidthMode,fill:this.fill,zeroLineY:this.zeroLineY,fillLinearGradient:this.fillLinearGradient,cornerRadius:this.cornerRadius};return Object.assign(y.options,m),y},g.prototype.newHitTestProvider=function(){return new d.ColumnSeriesHitTestProvider(this,this.webAssemblyContext)},g})(a.BaseRenderableSeries);t0.FastColumnRenderableSeries=f;var h=function(p,g,v){if(g>1){var y=p.diff/(g-1)*v/2;return new e.NumberRange(p.min-y,p.max+y)}return p};return t0.getXRange=h,t0}var Qx={},fW={},Zoe;function pU(){return Zoe||(Zoe=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EErrorMode=void 0,(function(e){e.Both="Both",e.High="High",e.Low="Low"})(r.EErrorMode||(r.EErrorMode={}))})(fW)),fW}var eE={},Joe;function bPe(){if(Joe)return eE;Joe=1;var r=eE&&eE.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(eE,"__esModule",{value:!0}),eE.HlcPointSeriesWrapped=void 0;var e=xo(),i=ki(),n=iy(),t=(function(o){r(a,o);function a(s){var l=o.call(this,s,void 0,i.EDataSeriesValueType.Default,[e.EValueName.Close,e.EValueName.High,e.EValueName.Low])||this;return l.type=i.EDataSeriesType.Hlc,l}return Object.defineProperty(a.prototype,"closeValues",{get:function(){return this.yValuesArray[0]},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"highValues",{get:function(){return this.yValuesArray[1]},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"lowValues",{get:function(){return this.yValuesArray[2]},enumerable:!1,configurable:!0}),a})(n.BasePointSeriesWrapped);return eE.HlcPointSeriesWrapped=t,eE}var tE={},Qoe;function SPe(){if(Qoe)return tE;Qoe=1;var r=tE&&tE.__extends||(function(){var p=function(g,v){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,m){y.__proto__=m}||function(y,m){for(var b in m)Object.prototype.hasOwnProperty.call(m,b)&&(y[b]=m[b])},p(g,v)};return function(g,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");p(g,v);function y(){this.constructor=g}g.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}})();Object.defineProperty(tE,"__esModule",{value:!0}),tE.ErrorSeriesDrawingProvider=void 0;var e=ub(),i=Mr(),n=vn(),t=gc(),o=ej(),a=pU(),s=ts(),l=Ul(),u=YN(),c=Xi(),d=Ji(),f=vl(),h=(function(p){r(g,p);function g(v,y){var m=p.call(this,v,y)||this;return m.linesPenCache=new s.Pen2DCache(v),m.tempXVec=new m.webAssemblyContext.SCRTDoubleVector,m.tempYVec=new m.webAssemblyContext.SCRTDoubleVector,m}return g.prototype.onAttachSeries=function(){p.prototype.onAttachSeries.call(this),this.args=new this.webAssemblyContext.SCRTLineDrawingParams,this.nativeDrawingProvider=new this.webAssemblyContext.SCRTLineSegmentDrawingProvider;var v=this.parentSeries,y=v.stroke,m=v.strokeThickness,b=v.opacity,S=v.strokeDashArray;(0,s.createPenInCache)(this.linesPenCache,y,m,b,S)},g.prototype.onDetachSeries=function(){p.prototype.onDetachSeries.call(this)},g.prototype.delete=function(){this.nativeDrawingProvider=(0,i.deleteSafe)(this.nativeDrawingProvider),this.linesPenCache=(0,i.deleteSafe)(this.linesPenCache),this.args=(0,i.deleteSafe)(this.args),this.tempXVec=(0,i.deleteSafe)(this.tempXVec),this.tempYVec=(0,i.deleteSafe)(this.tempYVec),p.prototype.delete.call(this)},g.prototype.draw=function(v,y){var m=(0,s.getScrtPenFromCache)(this.linesPenCache);if(!(!m||m.m_fThickness===0)){var b=y.pointSeries,S=(0,c.getVectorColorVertex)(this.webAssemblyContext),_=y.xCoordinateCalculator.isCategoryCoordinateCalculator,C=b.xValues,T=_?b.indexes:C,x=b.yValues,A=b.highValues,w=b.lowValues,L=this.parentSeries.errorDirection===o.EErrorDirection.Vertical,k=L?y.xCoordinateCalculator:y.yCoordinateCalculator,D=this.parentSeries.getDataPointWidth(k,this.parentSeries.dataPointWidth,this.parentSeries.dataPointWidthMode),j=k.getDataWidth(D),N=D*.5,V=this.parentSeries.xAxis.type===t.EAxisType.LogarithmicAxis,W=this.parentSeries.yAxis.type===t.EAxisType.LogarithmicAxis,K=this.parentSeries.xAxis.isNegative,H=this.parentSeries.yAxis.isNegative,U=this.parentSeries.errorMode!==a.EErrorMode.Low,I=this.parentSeries.errorMode!==a.EErrorMode.High,Q=T.size(),Z=(0,e.vectorToArrayViewF64)(T,this.webAssemblyContext),ee=(0,e.vectorToArrayViewF64)(x,this.webAssemblyContext),ie=(0,e.vectorToArrayViewF64)(A,this.webAssemblyContext),de=(0,e.vectorToArrayViewF64)(w,this.webAssemblyContext);if(this.args.Reset(),this.args.SetLinesPen(m),this.args.forceShaderMethod=!0,this.args.verticalChart=y.isVerticalChart,this.args.startIndex=0,this.args.count=Q,W){if(L)for(var _e=0;_e<Q;++_e){var Te=Z[_e],De=ee[_e],Pe=U?ie[_e]:De,Ee=I?de[_e]:De,Re=W&&!H&&Ee<=0;Re&&(Ee=this.parentSeries.yAxis.visibleRange.min);var je=W&&H&&Pe>=0;je&&(Pe=this.parentSeries.yAxis.visibleRange.max);var Ke=y.xCoordinateCalculator.getCoordinate(Te),ot=y.yCoordinateCalculator.getCoordinate(De),We=y.yCoordinateCalculator.getCoordinate(Pe),xe=y.yCoordinateCalculator.getCoordinate(Ee),ve=Ke-N,he=Ke+N;this.parentSeries.drawConnector&&this.addLineVertices(S,Ke,isNaN(Pe)?ot:We,Ke,isNaN(Ee)?ot:xe),U&&!je&&this.parentSeries.drawWhiskers&&this.addLineVertices(S,ve,We,he,We),I&&!Re&&this.parentSeries.drawWhiskers&&this.addLineVertices(S,ve,xe,he,xe)}else for(var _e=0;_e<Q;++_e){var Te=Z[_e],De=ee[_e],Pe=U?ie[_e]:Te,Ee=I?de[_e]:Te,Re=V&&!K&&Ee<=0;Re&&(Ee=u.MIN_LOG_AXIS_VALUE);var je=V&&K&&Pe>=0;je&&(Pe=-u.MIN_LOG_AXIS_VALUE);var Ke=y.xCoordinateCalculator.getCoordinate(Te),ot=y.yCoordinateCalculator.getCoordinate(De),We=y.xCoordinateCalculator.getCoordinate(Pe),xe=y.xCoordinateCalculator.getCoordinate(Ee),ve=ot-N,he=ot+N;this.parentSeries.drawConnector&&this.addLineVertices(S,isNaN(Ee)?Ke:xe,ot,isNaN(Pe)?Ke:We,ot),U&&!je&&this.parentSeries.drawWhiskers&&this.addLineVertices(S,We,ve,We,he),I&&!Re&&this.parentSeries.drawWhiskers&&this.addLineVertices(S,xe,ve,xe,he)}var Se=this.parentSeries.parentSurface.seriesViewRect,be=n.Rect.intersect(this.parentSeries.parentSurface.clipRect,Se);v.drawLinesNative(S,m,l.ELineDrawMode.DiscontinuousLine,be,Se.x,Se.y)}else if(L){this.parentSeries.drawConnector&&(this.args.fourVectorsMode=!0,this.args.SetXValues(T),this.args.SetYValues(U?A:x),this.args.SetZValues(T),this.args.SetWValues(I?w:x),this.args.SetNativeContext(v.getNativeContext()),this.args.SetXCoordinateCalculator(y.xCoordinateCalculator.nativeCalculator),this.args.SetYCoordinateCalculator(y.yCoordinateCalculator.nativeCalculator),this.nativeDrawingProvider.DrawLinesVec(this.args));var pe=this.prepareTempCapVectors(0,Q,j,T,w,A,!0,U,I);this.drawCaps(v,y,m,pe)}else{this.parentSeries.drawConnector&&(this.args.fourVectorsMode=!0,this.args.SetXValues(U?A:T),this.args.SetYValues(x),this.args.SetZValues(I?w:T),this.args.SetWValues(x),this.args.SetNativeContext(v.getNativeContext()),this.args.SetXCoordinateCalculator(y.xCoordinateCalculator.nativeCalculator),this.args.SetYCoordinateCalculator(y.yCoordinateCalculator.nativeCalculator),this.nativeDrawingProvider.DrawLinesVec(this.args));var pe=this.prepareTempCapVectors(0,Q,j,x,w,A,!1,U,I);this.drawCaps(v,y,m,pe)}}},g.prototype.onDpiChanged=function(v){p.prototype.onDpiChanged.call(this,v),this.onSeriesPropertyChange(d.PROPERTY.STROKE)},g.prototype.onSeriesPropertyChange=function(v){p.prototype.onSeriesPropertyChange.call(this,v);var y=this.parentSeries,m=y.stroke,b=y.strokeThickness,S=y.opacity,_=y.strokeDashArray;(v===d.PROPERTY.STROKE||v===d.PROPERTY.STROKE_THICKNESS||v===d.PROPERTY.OPACITY||v===d.PROPERTY.STROKE_DASH_ARRAY)&&(0,s.createPenInCache)(this.linesPenCache,m,b,S,_)},g.prototype.prepareTempCapVectors=function(v,y,m,b,S,_,C,T,x){var A=(T?2:0)+(x?2:0);this.tempXVec.resizeFast(y*A),this.tempYVec.resizeFast(y*A);var w=m/2,L=(0,e.vectorToArrayViewF64)(b,this.webAssemblyContext),k=(0,e.vectorToArrayViewF64)(C?this.tempXVec:this.tempYVec,this.webAssemblyContext),D=(0,e.vectorToArrayViewF64)(C?this.tempYVec:this.tempXVec,this.webAssemblyContext);if(T&&x)for(var j=(0,e.vectorToArrayViewF64)(S,this.webAssemblyContext),N=(0,e.vectorToArrayViewF64)(_,this.webAssemblyContext),V=v;V<v+y;V++){var W=L[V],K=j[V],H=N[V],U=V*4;k[U]=W-w,D[U]=H,k[U+1]=W+w,D[U+1]=H,k[U+2]=W-w,D[U+2]=K,k[U+3]=W+w,D[U+3]=K}else for(var N=(0,e.vectorToArrayViewF64)(T?_:S,this.webAssemblyContext),V=v;V<v+y;V++){var W=L[V],H=N[V],U=V*2;k[U]=W-w,D[U]=H,k[U+1]=W+w,D[U+1]=H}return y*A},g.prototype.drawCaps=function(v,y,m,b){m&&(this.args.Reset(),this.args.SetLinesPen(m),this.args.forceShaderMethod=!0,this.args.forceClamp=!0,this.args.verticalChart=!1,this.args.SetXValues(this.tempXVec),this.args.SetYValues(this.tempYVec),this.args.SetXCoordinateCalculator(y.xCoordinateCalculator.nativeCalculator),this.args.SetYCoordinateCalculator(y.yCoordinateCalculator.nativeCalculator),this.args.SetNativeContext(v.getNativeContext()),this.args.count=b,this.args.startIndex=0,this.args.SetNativeContext(v.getNativeContext()),this.args.SetXValues(this.tempXVec),this.args.SetYValues(this.tempYVec),this.args.SetXCoordinateCalculator(y.xCoordinateCalculator.nativeCalculator),this.args.SetYCoordinateCalculator(y.yCoordinateCalculator.nativeCalculator),this.nativeDrawingProvider.DrawLinesVec(this.args))},g.prototype.addLineVertices=function(v,y,m,b,S){var _=this.parentSeries.xAxis.isVerticalChart;_?(v.push_back((0,c.getVertex)(this.webAssemblyContext,m,y)),v.push_back((0,c.getVertex)(this.webAssemblyContext,S,b))):(v.push_back((0,c.getVertex)(this.webAssemblyContext,y,m)),v.push_back((0,c.getVertex)(this.webAssemblyContext,b,S)))},g})(f.BaseSeriesDrawingProvider);return tE.ErrorSeriesDrawingProvider=h,tE}var rE={},eae;function _Pe(){if(eae)return rE;eae=1;var r=rE&&rE.__extends||(function(){var l=function(u,c){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(d[h]=f[h])},l(u,c)};return function(u,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");l(u,c);function d(){this.constructor=u}u.prototype=c===null?Object.create(c):(d.prototype=c.prototype,new d)}})();Object.defineProperty(rE,"__esModule",{value:!0}),rE.ErrorSeriesHitTestProvider=void 0;var e=ej(),i=pU(),n=oo(),t=Js(),o=Rs(),a=vs(),s=(function(l){r(u,l);function u(){return l!==null&&l.apply(this,arguments)||this}return u.prototype.hitTest=function(c,d){var f=this.getTranslatedHitTestPoint(c,d);if(!f)return a.HitTestInfo.empty();var h=this.currentRenderPassData,p=h.xCoordinateCalculator,g=h.yCoordinateCalculator,v=h.isVerticalChart,y=v?f.y:f.x,m=v?f.x:f.y,b=this.parentSeries.dataSeries;if(!b)return a.HitTestInfo.empty();var S=o.hitTestHelpers.getNearestXPoint(this.webAssemblyContext,p,b,y,b.dataDistributionCalculator.isSortedAscending),_=b.getNativeXValues(),C=b.getNativeYValues(),T=o.hitTestHelpers.createHitTestInfo(this.parentSeries,p,g,v,b,_,C,y,m,S,0);if(S>=0){var x=o.hitTestHelpers.testIsHitForErrorBars(p,g,this.parentSeries,_,C,S,y,m);T.isHit=x.isHit,T.highValue=x.highValue,T.lowValue=x.lowValue}else T.isHit=!1;return T},u.prototype.hitTestForDataPointSelectionModifier=function(c,d,f){return f===void 0&&(f=t.BaseHitTestProvider.DEFAULT_HIT_TEST_RADIUS),this.hitTest(c,d)},u.prototype.hitTestXSlice=function(c,d){var f=this.getTranslatedHitTestPoint(c,d);if(!f)return a.HitTestInfo.empty();var h=this.currentRenderPassData,p=h.xCoordinateCalculator,g=h.yCoordinateCalculator,v=h.isVerticalChart,y=v?f.y:f.x,m=v?f.x:f.y,b=this.parentSeries.dataSeries;if(!b)return a.HitTestInfo.empty();var S=b.getNativeXValues(),_=b.getNativeYValues(),C=b.getNativeLowValues(),T=b.getNativeHighValues(),x=o.hitTestHelpers.getNearestXPoint(this.webAssemblyContext,p,b,y,b.dataDistributionCalculator.isSortedAscending),A=o.hitTestHelpers.createHitTestInfo(this.parentSeries,p,g,v,b,S,_,y,m,x,0),w=p.isCategoryCoordinateCalculator;if(x>=0){var L=this.parentSeries.errorDirection===e.EErrorDirection.Vertical;A.highValue=T.get(x),A.lowValue=C.get(x);var k=this.parentSeries.errorMode!==i.EErrorMode.High,D=this.parentSeries.errorMode!==i.EErrorMode.Low,j=void 0,N=void 0;L?(j=w?0:S.get(0),N=w?S.size()-1:S.get(S.size()-1)):(j=k?C.get(0):S.get(0),N=D?T.get(S.size()-1):S.get(S.size()-1));var V=this.parentSeries.getDataPointWidth(L?p:g,this.parentSeries.dataPointWidth,this.parentSeries.dataPointWidthMode),W=V/2,K=p.getCoordinate(A.hitTestPointValues.x),H=p.getCoordinate(j),U=p.getCoordinate(N);A.isWithinDataBounds=(0,n.testIsInInterval)(K,H-W,U+W),A.isHit=A.isWithinDataBounds}else A.isHit=!1;return A},u})(t.BaseHitTestProvider);return rE.ErrorSeriesHitTestProvider=s,rE}var tae;function PPe(){if(tae)return Qx;tae=1;var r=Qx&&Qx.__extends||(function(){var v=function(y,m){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,S){b.__proto__=S}||function(b,S){for(var _ in S)Object.prototype.hasOwnProperty.call(S,_)&&(b[_]=S[_])},v(y,m)};return function(y,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");v(y,m);function b(){this.constructor=y}y.prototype=m===null?Object.create(m):(b.prototype=m.prototype,new b)}})();Object.defineProperty(Qx,"__esModule",{value:!0}),Qx.FastErrorBarsRenderableSeries=void 0;var e=Mr(),i=oi(),n=gc(),t=ry(),o=ej(),a=pU(),s=tn(),l=ki(),u=bPe(),c=Gl(),d=Ji(),f=SPe(),h=$d(),p=_Pe(),g=(function(v){r(y,v);function y(m,b){var S=this,_,C,T,x,A,w,L,k,D;return S=v.call(this,m,b)||this,S.type=s.ESeriesType.ErrorBarsSeries,S.dataPointWidthProperty=.5,S.dataPointWidthModeProperty=t.EDataPointWidthMode.Relative,S.errorModeProperty=a.EErrorMode.Both,S.errorDirectionProperty=o.EErrorDirection.Vertical,S.strokeDashArrayProperty=[],S.drawWhiskersProperty=!0,S.drawConnectorProperty=!0,S.dataPointWidth=(_=b==null?void 0:b.dataPointWidth)!==null&&_!==void 0?_:S.dataPointWidthProperty,S.errorModeProperty=(C=b==null?void 0:b.errorMode)!==null&&C!==void 0?C:S.errorModeProperty,S.errorDirectionProperty=(T=b==null?void 0:b.errorDirection)!==null&&T!==void 0?T:S.errorDirectionProperty,S.dataPointWidthMode=(x=b==null?void 0:b.dataPointWidthMode)!==null&&x!==void 0?x:S.dataPointWidthModeProperty,S.strokeDashArray=(A=b==null?void 0:b.strokeDashArray)!==null&&A!==void 0?A:S.strokeDashArrayProperty,S.drawWhiskers=(w=b==null?void 0:b.drawWhiskers)!==null&&w!==void 0?w:S.drawWhiskersProperty,S.drawConnector=(L=b==null?void 0:b.drawConnector)!==null&&L!==void 0?L:S.drawConnectorProperty,S.drawingProviders=[new f.ErrorSeriesDrawingProvider(m,S),new h.PointMarkerDrawingProvider(m,S)],!((k=S.paletteProvider)===null||k===void 0)&&k.onAttached&&((D=S.paletteProvider)===null||D===void 0||D.onAttached(S)),b!=null&&b.animation&&S.animationQueue.push(b.animation),S}return y.prototype.applyTheme=function(m){v.prototype.applyTheme.call(this,m);var b=this.parentSurface.previousThemeProvider;this.stroke===b.lineSeriesColor&&(this.stroke=m.lineSeriesColor)},Object.defineProperty(y.prototype,"strokeDashArray",{get:function(){return this.strokeDashArrayProperty},set:function(m){this.strokeDashArrayProperty=m,this.notifyPropertyChanged(d.PROPERTY.STROKE_DASH_ARRAY)},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"drawWhiskers",{get:function(){return this.drawWhiskersProperty},set:function(m){this.drawWhiskersProperty=m,this.notifyPropertyChanged(d.PROPERTY.DRAW_WHISKERS)},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"drawConnector",{get:function(){return this.drawConnectorProperty},set:function(m){this.drawConnectorProperty=m,this.notifyPropertyChanged(d.PROPERTY.DRAW_CONNECTOR)},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"paletteProvider",{get:function(){},set:function(m){throw new Error("paletteProvider is not supported by FastErrorBarsRenderableSeries!")},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"dataPointWidth",{get:function(){return this.dataPointWidthProperty},set:function(m){this.dataPointWidthProperty=m,this.notifyPropertyChanged(d.PROPERTY.DATA_POINT_WIDTH)},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"errorMode",{get:function(){return this.errorModeProperty},set:function(m){this.errorModeProperty=m,this.notifyPropertyChanged(d.PROPERTY.ERROR_MODE)},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"errorDirection",{get:function(){return this.errorDirectionProperty},set:function(m){this.errorDirectionProperty=m,this.notifyPropertyChanged(d.PROPERTY.ERROR_DIRECTION)},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"dataPointWidthMode",{get:function(){return this.dataPointWidthModeProperty},set:function(m){this.dataPointWidthModeProperty=m,this.notifyPropertyChanged(d.PROPERTY.DATA_POINT_WIDTH_MODE)},enumerable:!1,configurable:!0}),y.prototype.delete=function(){v.prototype.delete.call(this),this.pointSeries=(0,e.deleteSafe)(this.pointSeries)},y.prototype.getDataPointWidth=function(m,b,S){var _=this.errorDirection===o.EErrorDirection.Vertical,C=_?this.dataSeries.getNativeXValues():this.dataSeries.getNativeYValues(),T=m.viewportDimension,x=m.isCategoryCoordinateCalculator;if(S===t.EDataPointWidthMode.Range){var A=m.visibleMax-m.visibleMin;return m.viewportDimension/A*b}else{if(S===t.EDataPointWidthMode.Absolute)return b;var w=Math.floor((0,c.getDataPointWidth)(C,m,T,b,x,_&&this.dataSeries.dataDistributionCalculator.isSortedAscending,this.webAssemblyContext));return w%2!==0&&(w-=1),w<=1&&(w=1),w}},y.prototype.getXRange=function(){var m,b=this.errorDirection===o.EErrorDirection.Vertical,S=this.errorMode!==a.EErrorMode.Low,_=this.errorMode!==a.EErrorMode.High,C=this.dataSeries.getXRange(l.EDataSeriesValueType.Default,!b,S,_);return this.xAxis.type===n.EAxisType.LogarithmicAxis?C:b?this.adjustRangeByDataPointWidth(C,this.xAxis):(0,c.adjustRangeByStrokeThickness)(C,this.strokeThickness,(m=this.parentSurface.seriesViewRect)===null||m===void 0?void 0:m.width)},y.prototype.getYRange=function(m,b){var S;b===void 0&&(b=!1);var _=this.errorDirection===o.EErrorDirection.Horizontal,C=this.errorMode!==a.EErrorMode.Low,T=this.errorMode!==a.EErrorMode.High,x=this.isRunningDataAnimation?l.EDataSeriesValueType.FinalAnimationValues:l.EDataSeriesValueType.Default,A=this.dataSeries.getWindowedYRange(m,!0,b,x,this.yRangeMode,_,C,T);if(A!==void 0)return this.yAxis.type===n.EAxisType.LogarithmicAxis?A:_?this.adjustRangeByDataPointWidth(A,this.yAxis):(0,c.adjustRangeByStrokeThickness)(A,this.strokeThickness,(S=this.parentSurface.seriesViewRect)===null||S===void 0?void 0:S.height)},y.prototype.toJSON=function(m){m===void 0&&(m=!1);var b=v.prototype.toJSON.call(this,m),S={dataPointWidth:this.dataPointWidth,dataPointWidthMode:this.dataPointWidthMode,errorDirection:this.errorDirection,errorMode:this.errorMode,drawWhiskers:this.drawWhiskers,drawConnector:this.drawConnector,strokeDashArray:this.strokeDashArray};return Object.assign(b.options,S),b},y.prototype.toPointSeries=function(m){if(m)throw new Error("Error Bars Series don't support resampling!");return new u.HlcPointSeriesWrapped(this.dataSeries)},y.prototype.newHitTestProvider=function(){return new p.ErrorSeriesHitTestProvider(this,this.webAssemblyContext)},y.prototype.adjustRangeByDataPointWidth=function(m,b){var S=(0,c.getDataPointWidthAdjustment)(this.dataPointWidthMode,this.dataPointWidth,this.dataSeries.count(),m,b.getCurrentCoordinateCalculator());return new i.NumberRange(m.min-S,m.max+S)},y})(c.BaseRenderableSeries);return Qx.FastErrorBarsRenderableSeries=g,Qx}var iE={},nE={},rae;function CPe(){if(rae)return nE;rae=1;var r=nE&&nE.__extends||(function(){var s=function(l,u){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(c[f]=d[f])},s(l,u)};return function(l,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");s(l,u);function c(){this.constructor=l}l.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}})();Object.defineProperty(nE,"__esModule",{value:!0}),nE.ImpulseSeriesHitTestProvider=void 0;var e=oo(),i=Hi(),n=Js(),t=Rs(),o=vs(),a=(function(s){r(l,s);function l(){return s!==null&&s.apply(this,arguments)||this}return l.prototype.hitTest=function(u,c,d){d===void 0&&(d=n.BaseHitTestProvider.DEFAULT_HIT_TEST_RADIUS);var f=this.getTranslatedHitTestPoint(u,c);if(!f)return o.HitTestInfo.empty();var h=this.currentRenderPassData,p=h.xCoordinateCalculator,g=h.yCoordinateCalculator,v=h.isVerticalChart,y=v?f.y:f.x,m=v?f.x:f.y,b=this.parentSeries.dataSeries;if(!b)return o.HitTestInfo.empty();var S=t.hitTestHelpers.getNearestXyPoint(this.webAssemblyContext,p,g,b,y,m,d),_=t.hitTestHelpers.getNearestXPoint(this.webAssemblyContext,p,b,y,b.dataDistributionCalculator.isSortedAscending),C=b.getNativeXValues(),T=b.getNativeYValues(),x=t.hitTestHelpers.createHitTestInfo(this.parentSeries,p,g,v,b,C,T,y,m,_,0);return _>=0||S.nearestPointIndex>=0?x.isHit=t.hitTestHelpers.testIsHitForImpulse(p,g,this.parentSeries,C,T,_,y,m,d)||t.hitTestHelpers.testIsHitForPoint(p,g,C,T,S.nearestPointIndex,y,m,this.parentSeries.size,b):x.isHit=!1,x},l.prototype.hitTestForDataPointSelectionModifier=function(u,c,d){return d===void 0&&(d=n.BaseHitTestProvider.DEFAULT_HIT_TEST_RADIUS),this.hitTest(u,c,d)},l.prototype.hitTestXSlice=function(u,c){var d,f=this.getTranslatedHitTestPoint(u,c);if(!f)return o.HitTestInfo.empty();var h=this.currentRenderPassData,p=h.xCoordinateCalculator,g=h.yCoordinateCalculator,v=h.isVerticalChart,y=v?f.y:f.x,m=v?f.x:f.y,b=this.parentSeries.dataSeries;if(!b)return o.HitTestInfo.empty();var S=b.getNativeXValues(),_=b.getNativeYValues(),C=t.hitTestHelpers.getNearestXPoint(this.webAssemblyContext,p,b,y,b.dataDistributionCalculator.isSortedAscending),T=t.hitTestHelpers.createHitTestInfo(this.parentSeries,p,g,v,b,S,_,y,m,C,0),x=p.isCategoryCoordinateCalculator,A=((d=this.parentSeries.size)!==null&&d!==void 0?d:0)*i.DpiHelper.PIXEL_RATIO,w=p.getDataWidth(A);if(C>=0){var L=x?0:S.get(0),k=x?S.size()-1:S.get(S.size()-1);T.isWithinDataBounds=(0,e.testIsInInterval)(T.hitTestPointValues.x,L,k,w/2),T.isHit=T.isWithinDataBounds}else T.isHit=!1;return T},l})(n.BaseHitTestProvider);return nE.ImpulseSeriesHitTestProvider=a,nE}var iae;function TPe(){if(iae)return iE;iae=1;var r=iE&&iE.__extends||(function(){var d=function(f,h){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,g){p.__proto__=g}||function(p,g){for(var v in g)Object.prototype.hasOwnProperty.call(g,v)&&(p[v]=g[v])},d(f,h)};return function(f,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");d(f,h);function p(){this.constructor=f}f.prototype=h===null?Object.create(h):(p.prototype=h.prototype,new p)}})();Object.defineProperty(iE,"__esModule",{value:!0}),iE.FastImpulseRenderableSeries=void 0;var e=oi(),i=tn(),n=gs(),t=DM(),o=ln(),a=Gl(),s=Ji(),l=ZN(),u=CPe(),c=(function(d){r(f,d);function f(h,p){var g=this,v,y,m,b;return g=d.call(this,h,p)||this,g.type=i.ESeriesType.ImpulseSeries,g.impulseFillProperty=o.SciChartSurfaceBase.DEFAULT_THEME.impulseFillBrush,g.impulseSizeProperty=10,g.impulseDataPointWidthProperty=0,g.impulseStrokeThicknessProperty=1,g.strokeThickness=(v=p==null?void 0:p.strokeThickness)!==null&&v!==void 0?v:g.impulseStrokeThicknessProperty,g.fill=(y=p==null?void 0:p.fill)!==null&&y!==void 0?y:g.impulseFillProperty,g.size=(m=p==null?void 0:p.size)!==null&&m!==void 0?m:g.impulseSizeProperty,g.stroke=(b=p==null?void 0:p.fill)!==null&&b!==void 0?b:g.impulseFillProperty,g.dataPointWidth=g.impulseDataPointWidthProperty,p!=null&&p.pointMarker||(g.pointMarker=new t.EllipsePointMarker(h,{width:g.impulseSizeProperty,height:g.impulseSizeProperty,fill:g.fill,stroke:g.fill})),g}return Object.defineProperty(f.prototype,"fill",{get:function(){return(0,n.stripAutoColor)(this.impulseFillProperty)},set:function(h){this.impulseFillProperty=h,this.stroke=h,this.pointMarker&&(this.pointMarker.fill=h,this.pointMarker.stroke=h),this.impulseFillProperty!==h&&this.notifyPropertyChanged(s.PROPERTY.STROKE)},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"size",{get:function(){return this.impulseSizeProperty},set:function(h){this.impulseSizeProperty=h,this.pointMarker&&(this.pointMarker.width=h,this.pointMarker.height=h)},enumerable:!1,configurable:!0}),f.prototype.getXRange=function(){var h,p,g=d.prototype.getXRange.call(this),v=(0,a.getDelta)({pointSize:this.size,areaSize:(p=(h=this.parentSurface.seriesViewRect)===null||h===void 0?void 0:h.width)!==null&&p!==void 0?p:0,range:g});return new e.NumberRange(g.min-v,g.max+v)},f.prototype.getYRange=function(h,p){var g,v;p===void 0&&(p=!1);var y=d.prototype.getYRange.call(this,h,p);if(y){var m=(0,a.getDelta)({pointSize:this.size,areaSize:(v=(g=this.parentSurface.seriesViewRect)===null||g===void 0?void 0:g.height)!==null&&v!==void 0?v:0,range:y});return new e.NumberRange(y.min-m,y.max+m)}},f.prototype.toJSON=function(h){h===void 0&&(h=!1);var p=d.prototype.toJSON.call(this,h),g={fill:this.fill,size:this.size,zeroLineY:this.zeroLineY};return Object.assign(p.options,g),p},f.prototype.applyTheme=function(h){d.prototype.applyTheme.call(this,h);var p=this.parentSurface.previousThemeProvider;this.fill===p.impulseFillBrush&&(this.fill=h.impulseFillBrush)},f.prototype.resolveAutoColors=function(h,p,g){if(d.prototype.resolveAutoColors.call(this,h,p,g),this.impulseFillProperty.startsWith(n.AUTO_COLOR)){var v=g.getStrokeColor(h,p,this.webAssemblyContext);this.fill=n.AUTO_COLOR+this.adjustAutoColor("impulseFill",v)}},f.prototype.newHitTestProvider=function(){return new u.ImpulseSeriesHitTestProvider(this,this.webAssemblyContext)},f})(l.FastColumnRenderableSeries);return iE.FastImpulseRenderableSeries=c,iE}var oE={},n2={},aE={},nae;function hX(){if(nae)return aE;nae=1;var r=aE&&aE.__extends||(function(){var l=function(u,c){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(d[h]=f[h])},l(u,c)};return function(u,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");l(u,c);function d(){this.constructor=u}u.prototype=c===null?Object.create(c):(d.prototype=c.prototype,new d)}})();Object.defineProperty(aE,"__esModule",{value:!0}),aE.LineSeriesDrawingProvider=void 0;var e=Mr(),i=ts(),n=Ul(),t=Xv(),o=Ji(),a=vl(),s=(function(l){r(u,l);function u(c,d,f,h){var p=l.call(this,c,d,f,h)||this;return p.linesPenCache=new i.Pen2DCache(c),p.args=new c.SCRTLineDrawingParams,p}return u.prototype.onDpiChanged=function(c){l.prototype.onDpiChanged.call(this,c),this.onSeriesPropertyChange(o.PROPERTY.STROKE)},u.prototype.onSeriesPropertyChange=function(c){if(l.prototype.onSeriesPropertyChange.call(this,c),c===o.PROPERTY.PALETTE_PROVIDER&&this.linesPenCache.invalidateCache(),c===o.PROPERTY.STROKE||c===o.PROPERTY.STROKE_THICKNESS||c===o.PROPERTY.PALETTE_PROVIDER||c===o.PROPERTY.OPACITY||c===o.PROPERTY.STROKE_DASH_ARRAY){this.palettingState.requiresUpdate=!0;var d=this.getProperties(this.parentSeries),f=d.stroke,h=d.strokeThickness,p=d.opacity,g=d.strokeDashArray;f&&(0,i.createPenInCache)(this.linesPenCache,f,h,p??1,g)}},u.prototype.getProperties=function(c){var d=c.stroke,f=c.strokeThickness,h=c.opacity,p=c.strokeDashArray,g=c.isDigitalLine,v=c.drawNaNAs,y=c.lineType;return{stroke:d,strokeThickness:f,opacity:h,strokeDashArray:p,isDigitalLine:g,drawNaNAs:v,lineType:y,containsNaN:void 0}},u.prototype.onAttachSeries=function(){l.prototype.onAttachSeries.call(this),this.nativeDrawingProvider=new this.webAssemblyContext.SCRTLineSeriesDrawingProvider;var c=this.getProperties(this.parentSeries),d=c.stroke,f=c.strokeThickness,h=c.opacity,p=c.strokeDashArray;d&&(0,i.createPenInCache)(this.linesPenCache,d,f,h??1,p)},u.prototype.onDetachSeries=function(){l.prototype.onDetachSeries.call(this),this.nativeDrawingProvider=(0,e.deleteSafe)(this.nativeDrawingProvider)},u.prototype.draw=function(c,d){var f,h=this.getProperties(this.parentSeries),p=h.stroke,g=h.isDigitalLine,v=h.lineType,y=h.drawNaNAs,m=h.containsNaN,b=(0,i.getScrtPenFromCache)(this.linesPenCache);if(!(!b||!p)){var S=d.pointSeries,_=this.parentSeries.dataSeries.dataDistributionCalculator.containsNaN;_=m??_,this.args.Reset(),this.args.SetLinesPen(b),this.args.isDigitalLine=g||v!==t.ELineType.Normal,this.args.drawDigitalVertical=v!==t.ELineType.DigitalNoEdge,this.args.digitalYX=v===t.ELineType.DigitalYX,this.args.forceShaderMethod=!0,this.args.containsNaN=_,this.parentSeries.xAxis.isLinearAxis?this.args.forceClamp=!this.args.isDigitalLine:this.args.forceClamp=!1,this.args.lineGaps=_?y===n.ELineDrawMode.DiscontinuousLine?this.webAssemblyContext.SCRTLineGapMode.DrawGaps:this.webAssemblyContext.SCRTLineGapMode.CloseGaps:this.webAssemblyContext.SCRTLineGapMode.Default,this.args.verticalChart=d.isVerticalChart;var C=d.xCoordinateCalculator.isCategoryCoordinateCalculator,T=this.parentSeries.dataSeries,x=T.fifoCapacity,A=T.fifoSweeping,w=T.fifoSweepingGap,L=S.fifoStartIndex,k=this.xSelector(S),D=C?S.indexes:k,j=this.ySelector(S),N=this.getStartAndCount(d,D),V=N.startIndex,W=N.count;this.args.count=W,this.args.startIndex=V,A&&x===this.parentSeries.dataSeries.count()&&(this.args.count=L),this.applyStrokePaletting(b,d),this.palettingState.palettedColors&&(this.args.SetPalettedColors(this.palettingState.palettedColors),this.args.paletteStart=(f=this.palettingState.paletteStartIndex)!==null&&f!==void 0?f:0),this.updateArgs(d);var K=c.getNativeContext();this.drawLines(c,K,D,j,d.xCoordinateCalculator.nativeCalculator,d.yCoordinateCalculator.nativeCalculator,this.args,this.parentSeries.parentSurface.seriesViewRect),A&&x===this.parentSeries.dataSeries.count()&&(this.args.startIndex=Math.min(j.size(),L+w),this.args.count=Math.max(0,j.size()-L-w),this.args.count>0&&this.drawLines(c,K,D,j,d.xCoordinateCalculator.nativeCalculator,d.yCoordinateCalculator.nativeCalculator,this.args,this.parentSeries.parentSurface.seriesViewRect))}},u.prototype.delete=function(){this.linesPenCache=(0,e.deleteSafe)(this.linesPenCache),this.nativeDrawingProvider=(0,e.deleteSafe)(this.nativeDrawingProvider),this.args=(0,e.deleteSafe)(this.args),l.prototype.delete.call(this)},u.prototype.drawLines=function(c,d,f,h,p,g,v,y){v.SetNativeContext(d),v.SetXValues(f),v.SetYValues(h),v.SetXCoordinateCalculator(p),v.SetYCoordinateCalculator(g),this.nativeDrawingProvider.DrawLinesVec(v)},u})(a.BaseSeriesDrawingProvider);return aE.LineSeriesDrawingProvider=s,aE}var sE={},oae;function xPe(){if(oae)return sE;oae=1;var r=sE&&sE.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(sE,"__esModule",{value:!0}),sE.LineSeriesHitTestProvider=void 0;var e=Js(),i=Rs(),n=vs(),t=(function(o){r(a,o);function a(){return o!==null&&o.apply(this,arguments)||this}return a.prototype.hitTest=function(s,l,u){u===void 0&&(u=e.BaseHitTestProvider.DEFAULT_HIT_TEST_RADIUS);var c=this.getTranslatedHitTestPoint(s,l);if(!c)return n.HitTestInfo.empty();var d=this.currentRenderPassData.isVerticalChart,f=d?c.y:c.x,h=d?c.x:c.y,p=this.parentSeries.dataSeries.dataDistributionCalculator.isSortedAscending;return p?this.hitTestSorted(f,h,u):this.hitTestUnsorted(f,h,u)},a.prototype.hitTestSorted=function(s,l,u){var c=this.currentRenderPassData,d=c.xCoordinateCalculator,f=c.yCoordinateCalculator,h=c.isVerticalChart,p=this.parentSeries.dataSeries;if(!p)return n.HitTestInfo.empty();var g=i.hitTestHelpers.getNearestXPoint(this.webAssemblyContext,d,p,s,p.dataDistributionCalculator.isSortedAscending),v=p.getNativeXValues(),y=this.parentSeries.getNativeYValues(),m=i.hitTestHelpers.createHitTestInfo(this.parentSeries,d,f,h,p,v,y,s,l,g,u,void 0);if(g>=0){var b=v.size(),S=d.getCoordinate(d.isCategoryCoordinateCalculator?g:v.get(g));if(g===b-1&&(d.hasFlippedCoordinates?s>=S:s<=S)||g===0&&(d.hasFlippedCoordinates?s<=S:s>=S))m.isHit=i.hitTestHelpers.testIsHitForPoint(d,f,v,y,g,s,l,u,p);else{var _=i.hitTestHelpers.testIsHitForLine(d,f,v,y,g,s,l,u,p);m.isHit=_.isHit,m.point2dataSeriesIndex=_.secondPointIndex,m.point2xValue=v.get(_.secondPointIndex),m.point2xCoord=d.getCoordinate(m.point2xValue),m.point2yValue=y.get(_.secondPointIndex),m.point2yCoord=f.getCoordinate(m.point2yValue),m.point2metadata=p.getMetadataAt(_.secondPointIndex);var C=p.valueNames.reduce(function(T,x){return T[x]=p.getNativeValue(p.getYValuesByName(x),m.point2dataSeriesIndex),T},{});m.point2yValueByName=C}}else m.isHit=!1;return m},a.prototype.hitTestUnsorted=function(s,l,u){var c=this.currentRenderPassData,d=c.xCoordinateCalculator,f=c.yCoordinateCalculator,h=c.isVerticalChart,p=this.parentSeries.dataSeries;if(!p)return n.HitTestInfo.empty();var g=i.hitTestHelpers.getNearestXyPoint(this.webAssemblyContext,d,f,p,s,l,u),v=p.getNativeXValues(),y=this.parentSeries.getNativeYValues(),m=i.hitTestHelpers.createHitTestInfo(this.parentSeries,d,f,h,p,v,y,s,l,g.nearestPointIndex,u,g.distance);if(g.nearestPointIndex>=0){var b=v.size(),S=function(D){return v.get(D)},_=function(D){return y.get(D)},C=function(D){return v.get(D+1)},T=function(D){return y.get(D+1)},x=i.hitTestHelpers.getNearestLineSegment(d,f,b-1,S,_,C,T,s,l,u),A=x.isHit,w=x.isWithinDataBounds,L=x.nearestPointIndex;if(L!==-1){m.dataSeriesIndex=L,m.isWithinDataBounds=w,m.isHit=A,m.xValue=v.get(L),m.xCoord=d.getCoordinate(m.xValue),m.yValue=y.get(L),m.yCoord=f.getCoordinate(m.yValue),m.point2dataSeriesIndex=L+1,m.point2xValue=v.get(L+1),m.point2xCoord=d.getCoordinate(m.point2xValue),m.point2yValue=y.get(L+1),m.point2yCoord=f.getCoordinate(m.point2yValue),m.point2metadata=p.getMetadataAt(L+1);var k=p.valueNames.reduce(function(D,j){return D[j]=p.getNativeValue(p.getYValuesByName(j),m.point2dataSeriesIndex),D},{});return m.point2yValueByName=k,m}}return m.isHit=!1,m},a})(e.BaseHitTestProvider);return sE.LineSeriesHitTestProvider=t,sE}var aae;function Xv(){return aae||(aae=1,(function(r){var e=n2&&n2.__extends||(function(){var u=function(c,d){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,h){f.__proto__=h}||function(f,h){for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(f[p]=h[p])},u(c,d)};return function(c,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");u(c,d);function f(){this.constructor=c}c.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}})();Object.defineProperty(r,"__esModule",{value:!0}),r.BaseLineRenderableSeries=r.ELineType=void 0;var i=Gl(),n=Ji(),t=hX(),o=$d(),a=xPe(),s;(function(u){u.Normal="Normal",u.Digital="Digital",u.DigitalNoEdge="DigitalNoEdge",u.DigitalYX="DigitalYX"})(s=r.ELineType||(r.ELineType={}));var l=(function(u){e(c,u);function c(d,f){var h=this,p;return h=u.call(this,d,f)||this,h.strokeDashArrayProperty=[],h.lineTypeProperty=s.Normal,h.strokeDashArrayProperty=f==null?void 0:f.strokeDashArray,h.lineTypeProperty=(p=f==null?void 0:f.lineType)!==null&&p!==void 0?p:h.lineTypeProperty,f!=null&&f.animation&&h.animationQueue.push(f.animation),h}return c.prototype.addDrawingProviders=function(d,f){this.drawingProviders.push(new t.LineSeriesDrawingProvider(d,this)),this.drawingProviders.push(new o.PointMarkerDrawingProvider(d,this))},c.prototype.applyTheme=function(d){u.prototype.applyTheme.call(this,d);var f=this.parentSurface.previousThemeProvider;this.stroke===f.lineSeriesColor&&(this.stroke=d.lineSeriesColor)},Object.defineProperty(c.prototype,"strokeDashArray",{get:function(){return this.strokeDashArrayProperty},set:function(d){this.strokeDashArrayProperty=d,this.notifyPropertyChanged(n.PROPERTY.STROKE_DASH_ARRAY)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"lineType",{get:function(){return this.lineTypeProperty},set:function(d){this.lineTypeProperty=d,this.notifyPropertyChanged(n.PROPERTY.LINE_TYPE)},enumerable:!1,configurable:!0}),c.prototype.toJSON=function(d){d===void 0&&(d=!1);var f=u.prototype.toJSON.call(this,d),h={strokeDashArray:this.strokeDashArray,lineType:this.lineTypeProperty};return Object.assign(f.options,h),f},c.prototype.newHitTestProvider=function(){return new a.LineSeriesHitTestProvider(this,this.webAssemblyContext)},c})(i.BaseRenderableSeries);r.BaseLineRenderableSeries=l})(n2)),n2}var sae;function EPe(){if(sae)return oE;sae=1;var r=oE&&oE.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(oE,"__esModule",{value:!0}),oE.FastLineRenderableSeries=void 0;var e=tn(),i=Xv(),n=X1(),t=(function(o){r(a,o);function a(s,l){var u=this,c,d;return u=o.call(this,s,l)||this,u.type=e.ESeriesType.LineSeries,u.dataLabelProviderProperty||(u.dataLabelProviderProperty=new n.LineSeriesDataLabelProvider(l==null?void 0:l.dataLabels),u.dataLabelProviderProperty.onAttach(u.webAssemblyContext,u)),!((c=u.paletteProvider)===null||c===void 0)&&c.onAttached&&((d=u.paletteProvider)===null||d===void 0||d.onAttached(u)),u}return a})(i.BaseLineRenderableSeries);return oE.FastLineRenderableSeries=t,oE}var lE={},uE={},cE={},lae;function APe(){if(lae)return cE;lae=1;var r=cE&&cE.__extends||(function(){var u=function(c,d){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,h){f.__proto__=h}||function(f,h){for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(f[p]=h[p])},u(c,d)};return function(c,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");u(c,d);function f(){this.constructor=c}c.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}})();Object.defineProperty(cE,"__esModule",{value:!0}),cE.MountainSeriesDrawingProvider=void 0;var e=Mr(),i=hl(),n=ts(),t=Ul(),o=ln(),a=Ji(),s=vl(),l=(function(u){r(c,u);function c(d,f){var h=u.call(this,d,f)||this;return h.nativeDrawingProvider=new h.webAssemblyContext.SCRTMountainSeriesDrawingProvider,h.args=new h.webAssemblyContext.SCRTMountainDrawingParams,h.strokePenCache=new n.Pen2DCache(d),h.fillBrushCache=new i.BrushCache(d),h}return c.prototype.delete=function(){this.nativeDrawingProvider=(0,e.deleteSafe)(this.nativeDrawingProvider),this.args=(0,e.deleteSafe)(this.args),this.strokePenCache=(0,e.deleteSafe)(this.strokePenCache),this.fillBrushCache=(0,e.deleteSafe)(this.fillBrushCache),u.prototype.delete.call(this)},c.prototype.draw=function(d,f){var h,p=f.pointSeries,g=this.parentSeries.dataSeries.dataDistributionCalculator.containsNaN;this.args.Reset(),this.args.forceShaderMethod=!0,this.args.lineGaps=g?this.parentSeries.drawNaNAs===t.ELineDrawMode.DiscontinuousLine?this.webAssemblyContext.SCRTLineGapMode.DrawGaps:this.webAssemblyContext.SCRTLineGapMode.CloseGaps:this.webAssemblyContext.SCRTLineGapMode.Default,this.args.verticalChart=f.isVerticalChart;var v=f.getyCoordinateCalculator(),y=v.visibleMin,m=v.visibleMax;this.args.zeroLineY=Math.max(Math.min(this.parentSeries.zeroLineY,m),y),this.args.isDigitalLine=this.parentSeries.isDigitalLine;var b=this.createBrush();b&&this.args.SetFillBrush(b);var S=(0,n.getScrtPenFromCache)(this.strokePenCache);S&&this.args.SetLinesPen(S),u.prototype.applyStrokeFillPaletting.call(this,this.parentSeries.stroke,S,this.parentSeries.fill,b,this.parentSeries.opacity,!0,this.parentSeries.fillLinearGradient!==void 0,f);var _=(h=this.palettingState.paletteTextureCache)===null||h===void 0?void 0:h.value;_&&this.args.SetPalette(_),this.args.isSmoothColors=this.palettingState.gradientPaletting;var C=this.parentSeries.dataSeries,T=C.fifoCapacity,x=C.fifoSweeping,A=C.fifoSweepingGap,w=p.fifoStartIndex,L=f.xCoordinateCalculator.isCategoryCoordinateCalculator,k=p.xValues,D=L?p.indexes:k,j=p.yValues,N=this.getStartAndCount(f,D),V=N.startIndex,W=N.count;this.args.count=W,this.args.startIndex=V,x&&T===this.parentSeries.dataSeries.count()&&(this.args.count=w);var K=d.getNativeContext();this.parentSeries.parentSurface.seriesViewRect,this.args.SetNativeContext(K),this.args.SetXValues(D),this.args.SetYValues(j),this.args.SetXCoordinateCalculator(f.xCoordinateCalculator.nativeCalculator),this.args.SetYCoordinateCalculator(f.yCoordinateCalculator.nativeCalculator),this.nativeDrawingProvider.DrawPointsVec(this.args),x&&T===this.parentSeries.dataSeries.count()&&(this.args.startIndex=Math.min(j.size(),w+A),this.args.count=Math.max(0,j.size()-w-A),this.args.count>0&&this.nativeDrawingProvider.DrawPointsVec(this.args))},c.prototype.onDpiChanged=function(d){u.prototype.onDpiChanged.call(this,d),this.onSeriesPropertyChange(a.PROPERTY.STROKE)},c.prototype.onSeriesPropertyChange=function(d){u.prototype.onSeriesPropertyChange.call(this,d),(d===a.PROPERTY.STROKE||d===a.PROPERTY.STROKE_DASH_ARRAY||d===a.PROPERTY.STROKE_THICKNESS||d===a.PROPERTY.OPACITY)&&this.createPen(),(d===a.PROPERTY.FILL||d===a.PROPERTY.OPACITY||d===a.PROPERTY.FILL_LINEAR_GRADIENT)&&this.createBrush()},c.prototype.onAttachSeries=function(){u.prototype.onAttachSeries.call(this),this.createPen(),this.createBrush()},c.prototype.createBrush=function(){this.palettingState.requiresUpdate=!0;var d=this.parentSeries,f=d.fill,h=d.opacity,p=d.fillLinearGradient,g=d.parentSurface,v=d.customTextureOptions,y=g!=null&&g.isCopyCanvasSurface?g.domCanvas2D.height/o.SciChartSurfaceBase.domMasterCanvas.height:1,m=g!=null&&g.isCopyCanvasSurface?g.domCanvas2D.width/o.SciChartSurfaceBase.domMasterCanvas.width:1;return this.fillBrushCache.create(f,h,y,m,p,v),(0,i.getScrtBrushFromCache)(this.fillBrushCache)},c.prototype.createPen=function(){var d=this.parentSeries,f=d.stroke,h=d.strokeThickness,p=d.opacity,g=d.strokeDashArray;return this.palettingState.requiresUpdate=!0,(0,n.createPenInCache)(this.strokePenCache,f,h,p,g)},c})(s.BaseSeriesDrawingProvider);return cE.MountainSeriesDrawingProvider=l,cE}var dE={},uae;function wPe(){if(uae)return dE;uae=1;var r=dE&&dE.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(dE,"__esModule",{value:!0}),dE.MountainSeriesHitTestProvider=void 0;var e=Js(),i=Rs(),n=vs(),t=(function(o){r(a,o);function a(){return o!==null&&o.apply(this,arguments)||this}return a.prototype.hitTest=function(s,l){var u=this.getTranslatedHitTestPoint(s,l);if(!u)return n.HitTestInfo.empty();var c=this.currentRenderPassData,d=c.xCoordinateCalculator,f=c.yCoordinateCalculator,h=c.isVerticalChart,p=h?u.y:u.x,g=h?u.x:u.y,v=this.parentSeries,y=v.dataSeries;if(!y)return n.HitTestInfo.empty();var m=i.hitTestHelpers.getNearestXPoint(this.webAssemblyContext,d,y,p,y.dataDistributionCalculator.isSortedAscending),b=y.getNativeXValues(),S=y.getNativeYValues(),_=i.hitTestHelpers.createHitTestInfo(v,d,f,h,y,b,S,p,g,m,0);if(y.dataDistributionCalculator.isSortedAscending&&m>=0){var C=i.hitTestHelpers.testIsHitForMountain(this.parentSeries.isDigitalLine,d,f,y,v.zeroLineY,m,p,g);if(_.isHit=C.isHit,_.point2dataSeriesIndex=C.secondPointIndex,C.secondPointIndex!==void 0){_.point2xValue=b.get(C.secondPointIndex),_.point2xCoord=d.getCoordinate(_.point2xValue),_.point2yValue=S.get(C.secondPointIndex),_.point2yCoord=f.getCoordinate(_.point2yValue),_.point2metadata=y.getMetadataAt(C.secondPointIndex);var T=y.valueNames.reduce(function(x,A){return x[A]=y.getNativeValue(y.getYValuesByName(A),_.point2dataSeriesIndex),x},{});_.point2yValueByName=T}}else _.isHit=!1;return _},a})(e.BaseHitTestProvider);return dE.MountainSeriesHitTestProvider=t,dE}var cae;function gU(){if(cae)return uE;cae=1;var r=uE&&uE.__extends||(function(){var u=function(c,d){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,h){f.__proto__=h}||function(f,h){for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(f[p]=h[p])},u(c,d)};return function(c,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");u(c,d);function f(){this.constructor=c}c.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}})();Object.defineProperty(uE,"__esModule",{value:!0}),uE.BaseMountainRenderableSeries=void 0;var e=gs(),i=ln(),n=Gl(),t=Ji(),o=APe(),a=$d(),s=wPe(),l=(function(u){r(c,u);function c(d,f){var h=this,p,g,v,y,m;return h=u.call(this,d,f)||this,h.zeroLineYProperty=0,h.fillProperty=i.SciChartSurfaceBase.DEFAULT_THEME.mountainAreaBrush,h.strokeDashArrayProperty=[],h.stroke=(p=f==null?void 0:f.stroke)!==null&&p!==void 0?p:i.SciChartSurfaceBase.DEFAULT_THEME.mountainLineColor,h.strokeDashArrayProperty=(g=f==null?void 0:f.strokeDashArray)!==null&&g!==void 0?g:h.strokeDashArrayProperty,h.fillProperty=(v=f==null?void 0:f.fill)!==null&&v!==void 0?v:h.fillProperty,h.zeroLineYProperty=(y=f==null?void 0:f.zeroLineY)!==null&&y!==void 0?y:h.zeroLineYProperty,h.fillLinearGradientProperty=(m=f==null?void 0:f.fillLinearGradient)!==null&&m!==void 0?m:h.fillLinearGradientProperty,h.customTextureOptionsProperty=f==null?void 0:f.customTextureOptions,f!=null&&f.animation&&h.animationQueue.push(f.animation),h}return c.prototype.addDrawingProviders=function(d,f){this.drawingProviders.push(new o.MountainSeriesDrawingProvider(d,this)),this.drawingProviders.push(new a.PointMarkerDrawingProvider(d,this))},c.prototype.applyTheme=function(d){u.prototype.applyTheme.call(this,d);var f=this.parentSurface.previousThemeProvider;this.fill===f.mountainAreaBrush&&(this.fill=d.mountainAreaBrush),this.stroke===f.mountainLineColor&&(this.stroke=d.mountainLineColor)},Object.defineProperty(c.prototype,"fill",{get:function(){return(0,e.stripAutoColor)(this.fillProperty)},set:function(d){this.fillProperty=d,this.notifyPropertyChanged(t.PROPERTY.FILL)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"zeroLineY",{get:function(){return this.zeroLineYProperty},set:function(d){this.zeroLineYProperty=d,this.notifyPropertyChanged(t.PROPERTY.ZERO_LINE_Y)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"fillLinearGradient",{get:function(){return this.fillLinearGradientProperty},set:function(d){d!==this.fillLinearGradientProperty&&(this.fillLinearGradientProperty=d,this.notifyPropertyChanged(t.PROPERTY.FILL_LINEAR_GRADIENT))},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"customTextureOptions",{get:function(){return this.customTextureOptionsProperty},set:function(d){d!==this.customTextureOptionsProperty&&(this.customTextureOptionsProperty=d,this.notifyPropertyChanged(t.PROPERTY.CUSTOM_TEXTURE_OPTIONS))},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"strokeDashArray",{get:function(){return this.strokeDashArrayProperty},set:function(d){this.strokeDashArrayProperty=d,this.notifyPropertyChanged(t.PROPERTY.STROKE_DASH_ARRAY)},enumerable:!1,configurable:!0}),c.prototype.toJSON=function(d){d===void 0&&(d=!1);var f=u.prototype.toJSON.call(this,d),h={fill:this.fill,fillLinearGradient:this.fillLinearGradient,strokeDashArray:this.strokeDashArray,zeroLineY:this.zeroLineY};return Object.assign(f.options,h),f},c.prototype.resolveAutoColors=function(d,f,h){if(u.prototype.resolveAutoColors.call(this,d,f,h),this.fillProperty.startsWith(e.AUTO_COLOR)){var p=h.getFillColor(d,f,this.webAssemblyContext);this.fill=e.AUTO_COLOR+this.adjustAutoColor("fill",p)}},c.prototype.newHitTestProvider=function(){return new s.MountainSeriesHitTestProvider(this,this.webAssemblyContext)},c})(n.BaseRenderableSeries);return uE.BaseMountainRenderableSeries=l,uE}var dae;function OPe(){if(dae)return lE;dae=1;var r=lE&&lE.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(lE,"__esModule",{value:!0}),lE.FastMountainRenderableSeries=void 0;var e=tn(),i=gU(),n=Mg(),t=(function(o){r(a,o);function a(s,l){var u=this,c,d;return u=o.call(this,s,l)||this,u.type=e.ESeriesType.MountainSeries,u.dataLabelProviderProperty||(u.dataLabelProviderProperty=new n.DataLabelProvider(l==null?void 0:l.dataLabels),u.dataLabelProviderProperty.onAttach(u.webAssemblyContext,u)),!((c=u.paletteProvider)===null||c===void 0)&&c.onAttached&&((d=u.paletteProvider)===null||d===void 0||d.onAttached(u)),u}return a})(i.BaseMountainRenderableSeries);return lE.FastMountainRenderableSeries=t,lE}var fE={},fae;function DPe(){if(fae)return fE;fae=1;var r=fE&&fE.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(fE,"__esModule",{value:!0}),fE.FastOhlcRenderableSeries=void 0;var e=tn(),i=fX(),n=o3(),t=(function(o){r(a,o);function a(s,l){var u=this,c,d;return u=o.call(this,s,l)||this,u.type=e.ESeriesType.OhlcSeries,!((c=u.paletteProvider)===null||c===void 0)&&c.onAttached&&((d=u.paletteProvider)===null||d===void 0||d.onAttached(u)),u.drawingProviders=[],u.drawingProviders.push(new n.OhlcSeriesDrawingProvider(s,u,n.EOhlcDrawingMode.Ohlc)),u}return a})(i.BaseOhlcRenderableSeries);return fE.FastOhlcRenderableSeries=t,fE}var hE={},pE={},hae;function RPe(){if(hae)return pE;hae=1;var r=pE&&pE.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(u[d]=c[d])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})();Object.defineProperty(pE,"__esModule",{value:!0}),pE.TextSeriesHitTestProvider=void 0;var e=oo(),i=Js(),n=Rs(),t=vs(),o=(function(a){r(s,a);function s(){return a!==null&&a.apply(this,arguments)||this}return s.prototype.hitTest=function(l,u,c){var d=this.getTranslatedHitTestPoint(l,u);if(!d)return t.HitTestInfo.empty();for(var f=this.currentRenderPassData,h=f.xCoordinateCalculator,p=f.yCoordinateCalculator,g=f.isVerticalChart,v=g?d.y:d.x,y=g?d.x:d.y,m=this.parentSeries.dataSeries,b=n.hitTestHelpers.getNearestXyPoint(this.webAssemblyContext,h,p,m,v,y,c),S=m.getNativeXValues(),_=m.getNativeYValues(),C=n.hitTestHelpers.createHitTestInfo(this.parentSeries,h,p,g,m,S,_,v,y,b.nearestPointIndex,c,b.distance),T=this.parentSeries.dataLabelProvider.dataLabels,x=!1,A=0,w=T;A<w.length;A++){var L=w[A],k=L.rect,D=k.left,j=k.top,N=k.right,V=k.bottom;if((0,e.testIsInBounds)(d.x,d.y,D,j,N,V)){x=!0;break}}return C.isHit=x,C},s})(i.BaseHitTestProvider);return pE.TextSeriesHitTestProvider=o,pE}var pae;function pX(){if(pae)return hE;pae=1;var r=hE&&hE.__extends||(function(){var l=function(u,c){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(d[h]=f[h])},l(u,c)};return function(u,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");l(u,c);function d(){this.constructor=u}u.prototype=c===null?Object.create(c):(d.prototype=c.prototype,new d)}})();Object.defineProperty(hE,"__esModule",{value:!0}),hE.FastTextRenderableSeries=void 0;var e=tn(),i=oy(),n=Gl(),t=fU(),o=$d(),a=RPe(),s=(function(l){r(u,l);function u(c,d){var f=l.call(this,c,d)||this;return f.type=e.ESeriesType.TextSeries,f.dataLabelProviderProperty||(f.dataLabelProviderProperty=new t.TextDataLabelProvider(d==null?void 0:d.dataLabels),f.dataLabelProviderProperty.onAttach(f.webAssemblyContext,f)),d!=null&&d.animation&&f.animationQueue.push(d.animation),f}return u.prototype.addDrawingProviders=function(c,d){this.drawingProviders.push(new o.PointMarkerDrawingProvider(c,this))},u.prototype.needsResampling=function(c){return this.dataSeries.fifoCapacity?(c.resamplingMode=i.EResamplingMode.None,this.resamplerHelper.resetAndFillBasicNativeArgs(c,this.getNativeXValues()),!0):!1},u.prototype.newHitTestProvider=function(){return new a.TextSeriesHitTestProvider(this,this.webAssemblyContext)},u})(n.BaseRenderableSeries);return hE.FastTextRenderableSeries=s,hE}var gE={},hW={},gae;function vU(){return gae||(gae=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EShaderEffectType=void 0,(function(e){e.Glow="Glow",e.Shadow="Shadow"})(r.EShaderEffectType||(r.EShaderEffectType={}))})(hW)),hW}var vE={},yE={},vae;function JN(){if(vae)return yE;vae=1,Object.defineProperty(yE,"__esModule",{value:!0}),yE.fromTsrVector4=yE.updateTsrVector4=void 0;var r=ni(),e=function(n,t){r.Guard.notNull(n,"color");var o=1/255;t.x=n.red*o,t.y=n.green*o,t.z=n.blue*o,t.w=n.opacity*o};yE.updateTsrVector4=e;var i=function(n){return r.Guard.notNull(n,"tsrColor"),{red:Math.round(n.x*255),green:Math.round(n.y*255),blue:Math.round(n.z*255),opacity:Math.round(n.w*255)}};return yE.fromTsrVector4=i,yE}var yae;function gX(){if(yae)return vE;yae=1;var r=vE&&vE.__extends||(function(){var h=function(p,g){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var m in y)Object.prototype.hasOwnProperty.call(y,m)&&(v[m]=y[m])},h(p,g)};return function(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");h(p,g);function v(){this.constructor=p}p.prototype=g===null?Object.create(g):(v.prototype=g.prototype,new v)}})();Object.defineProperty(vE,"__esModule",{value:!0}),vE.ShaderEffect=void 0;var e=So(),i=Mr(),n=Ba(),t=ni(),o=Ii(),a=XS(),s=mi(),l=JN(),u=Ji(),c=Xi(),d=$n(),f=(function(h){r(p,h);function p(g,v,y){var m=h.call(this)||this;return t.Guard.notNull(g,"webAssemblyContext"),e.IS_TEST_ENV||t.Guard.notNull(v,"seriesEffect"),m.webAssemblyContext=g,m.propertyChanged=new n.EventHandler,m.nativeEffect=v,m.intensity=(y==null?void 0:y.intensity)||1,m.range=(y==null?void 0:y.range)||0,m.offset=(y==null?void 0:y.offset)||new o.Point(0,0),m.color=(y==null?void 0:y.color)||"#444444",m}return p.prototype.delete=function(){this.nativeEffect=(0,i.deleteSafe)(this.nativeEffect),this.webAssemblyContext=void 0},p.prototype.getNativeEffect=function(){return this.nativeEffect},Object.defineProperty(p.prototype,"intensity",{get:function(){return this.intensityProperty},set:function(g){this.intensityProperty=g,this.nativeEffect.SetIntensity(g),this.notifyPropertyChanged(u.PROPERTY.INTENSITY)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"offset",{get:function(){return this.offsetProperty},set:function(g){t.Guard.notNull(g,"offset"),this.offsetProperty=g;var v=new this.webAssemblyContext.TSRVector2(g.x,g.y);this.nativeEffect.SetOffset(v),v.delete(),this.notifyPropertyChanged(u.PROPERTY.OFFSET)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"color",{get:function(){return this.colorProperty},set:function(g){this.colorProperty=g;var v=(0,s.parseColorToTArgb)(g),y=(0,c.getVector4)(this.webAssemblyContext,0,0,0,0);(0,l.updateTsrVector4)(v,y),this.nativeEffect.SetColor(y),this.notifyPropertyChanged(u.PROPERTY.COLOR)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"range",{get:function(){return this.rangeProperty},set:function(g){this.rangeProperty=g,this.nativeEffect.SetRange(g),this.notifyPropertyChanged(u.PROPERTY.RANGE)},enumerable:!1,configurable:!0}),p.prototype.notifyPropertyChanged=function(g){var v;(v=this.propertyChanged)===null||v===void 0||v.raiseEvent(new a.PropertyChangedEventArgs(g))},p.prototype.toJSON=function(){var g={color:this.color,intensity:this.intensity,offset:this.offset,range:this.range};return{type:this.type,options:g}},p})(d.DeletableEntity);return vE.ShaderEffect=f,vE}var mae;function MPe(){if(mae)return gE;mae=1;var r=gE&&gE.__extends||(function(){var t=function(o,a){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");t(o,a);function s(){this.constructor=o}o.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}})();Object.defineProperty(gE,"__esModule",{value:!0}),gE.GlowEffect=void 0;var e=vU(),i=gX(),n=(function(t){r(o,t);function o(a,s){var l=t.call(this,a,new a.SCRTGlowEffect,{range:(s==null?void 0:s.range)||1,intensity:(s==null?void 0:s.intensity)||1})||this;return l.type=e.EShaderEffectType.Glow,l}return o})(i.ShaderEffect);return gE.GlowEffect=n,gE}var mE={},o2={},a2={},bae;function yU(){if(bae)return a2;bae=1,Object.defineProperty(a2,"__esModule",{value:!0}),a2.HeatmapColorMap=void 0;var r=Ba(),e=XS(),i=Ji(),n=(function(){function t(o){var a,s;this.minimumProperty=(a=o==null?void 0:o.minimum)!==null&&a!==void 0?a:0,this.maximumProperty=(s=o==null?void 0:o.maximum)!==null&&s!==void 0?s:100,this.gradientStops=(o==null?void 0:o.gradientStops)||[{offset:0,color:"Red"},{offset:1,color:"Green"}],this.propertyChanged=new r.EventHandler,this.calculateScaleFactor()}return Object.defineProperty(t.prototype,"gradientStops",{get:function(){return this.gradientStopsProperty},set:function(o){this.gradientStopsProperty=o,this.notifyPropertyChanged(i.PROPERTY.GRADIENT_STOPS)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minimum",{get:function(){return this.minimumProperty},set:function(o){this.minimumProperty=o,this.notifyPropertyChanged(i.PROPERTY.MINIMUM)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maximum",{get:function(){return this.maximumProperty},set:function(o){this.maximumProperty=o,this.notifyPropertyChanged(i.PROPERTY.MAXIMUM)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){return{minimum:this.minimum,maximum:this.maximum,gradientStops:this.gradientStops}},t.prototype.notifyPropertyChanged=function(o){var a;(a=this.propertyChanged)===null||a===void 0||a.raiseEvent(new e.PropertyChangedEventArgs(o))},t.prototype.calculateScaleFactor=function(){this.scaleFactorProperty=(t.DefaultPrecision-1)/Math.abs(this.maximumProperty-this.minimumProperty)},t.DefaultPrecision=1e3,t})();return a2.HeatmapColorMap=n,a2}var Sae;function HM(){return Sae||(Sae=1,(function(r){var e=o2&&o2.__extends||(function(){var c=function(d,f){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(h[g]=p[g])},c(d,f)};return function(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");c(d,f);function h(){this.constructor=d}d.prototype=f===null?Object.create(f):(h.prototype=f.prototype,new h)}})();Object.defineProperty(r,"__esModule",{value:!0}),r.BaseHeatmapRenderableSeries=r.COLOR_MAP_PREFIX=void 0;var i=Jn(),n=Mr(),t=$o(),o=sy(),a=Gl(),s=Ji(),l=yU();r.COLOR_MAP_PREFIX="colorMap.";var u=(function(c){e(d,c);function d(f,h){var p=this,g,v,y,m,b;return p=c.call(this,f,h)||this,p.useLinearTextureFilteringProperty=!1,p.fillValuesOutOfRangeProperty=!0,p.colorMapPropertyChanged=p.colorMapPropertyChanged.bind(p),h!=null&&h.colorMap&&("toJSON"in h.colorMap||(h.colorMap=new l.HeatmapColorMap(h.colorMap))),p.colorMap=h==null?void 0:h.colorMap,p.xAxisId=h==null?void 0:h.xAxisId,p.yAxisId=h==null?void 0:h.yAxisId,p.useLinearTextureFilteringProperty=(g=h==null?void 0:h.useLinearTextureFiltering)!==null&&g!==void 0?g:p.useLinearTextureFilteringProperty,p.fillValuesOutOfRangeProperty=(v=h==null?void 0:h.fillValuesOutOfRange)!==null&&v!==void 0?v:p.fillValuesOutOfRangeProperty,p.dataSeries=h==null?void 0:h.dataSeries,!((y=p.paletteProvider)===null||y===void 0)&&y.onAttached&&((m=p.paletteProvider)===null||m===void 0||m.onAttached(p)),h!=null&&h.zLabelProvider&&("getLabels"in(h==null?void 0:h.zLabelProvider)||(h.zLabelProvider=(0,i.createType)(t.EBaseType.LabelProvider,h.zLabelProvider.type,f,h.zLabelProvider.options))),p.zLabelProviderProperty=(b=h==null?void 0:h.zLabelProvider)!==null&&b!==void 0?b:new o.NumericLabelProvider({labelPrecision:2}),p}return Object.defineProperty(d.prototype,"colorMap",{get:function(){return this.colorMapProperty},set:function(f){var h,p;(h=this.colorMapProperty)===null||h===void 0||h.propertyChanged.unsubscribe(this.colorMapPropertyChanged),this.colorMapProperty=f,(p=this.colorMapProperty)===null||p===void 0||p.propertyChanged.subscribe(this.colorMapPropertyChanged),this.notifyPropertyChanged(s.PROPERTY.COLOR_MAP)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"useLinearTextureFiltering",{get:function(){return this.useLinearTextureFilteringProperty},set:function(f){this.useLinearTextureFilteringProperty=f,this.notifyPropertyChanged(s.PROPERTY.USE_LINEAR_TEXTURE_FILTERING)},enumerable:!1,configurable:!0}),d.prototype.checkIsOutOfDataRange=function(f,h){var p=this.dataSeries;return!p||f<=p.xRange.min||f>=p.xRange.max||h<=p.yRange.min||h>=p.yRange.max},Object.defineProperty(d.prototype,"zLabelProvider",{get:function(){return this.zLabelProviderProperty},set:function(f){this.zLabelProviderProperty=f,this.notifyPropertyChanged(s.PROPERTY.Z_LABEL_PROVIDER)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"fillValuesOutOfRange",{get:function(){return this.fillValuesOutOfRangeProperty},set:function(f){this.fillValuesOutOfRangeProperty=f,this.notifyPropertyChanged(s.PROPERTY.FILL_VALUES_OUT_OF_RANGE)},enumerable:!1,configurable:!0}),d.prototype.toPointSeries=function(f){},d.prototype.toJSON=function(f){var h,p;f===void 0&&(f=!1);var g=c.prototype.toJSON.call(this,f),v={colorMap:(h=this.colorMap)===null||h===void 0?void 0:h.toJSON(),fillValuesOutOfRange:this.fillValuesOutOfRange,useLinearTextureFiltering:this.useLinearTextureFiltering,zLabelProvider:(p=this.zLabelProvider)===null||p===void 0?void 0:p.toJSON()};return Object.assign(g.options,v),g},d.prototype.delete=function(){this.zLabelProviderProperty=(0,n.deleteSafe)(this.zLabelProviderProperty),c.prototype.delete.call(this)},d.prototype.colorMapPropertyChanged=function(f){this.notifyPropertyChanged(r.COLOR_MAP_PREFIX+f.propertyName)},d})(a.BaseRenderableSeries);r.BaseHeatmapRenderableSeries=u})(o2)),o2}var r0={},s2={},_ae;function Fw(){return _ae||(_ae=1,(function(r){var e=s2&&s2.__spreadArray||function(f,h,p){if(p||arguments.length===2)for(var g=0,v=h.length,y;g<v;g++)(y||!(g in h))&&(y||(y=Array.prototype.slice.call(h,0,g)),y[g]=h[g]);return f.concat(y||Array.prototype.slice.call(h))};Object.defineProperty(r,"__esModule",{value:!0}),r.calculateHeatmapTexture=r.calculateCellCoordinates=r.calculateOffsets=r.createColorMap=r.getCellColor=r.getColor=r.getColorDataForTexture=void 0;var i=iu(),n=mi(),t=function(f,h,p){var g=f.xStartInd,v=f.textureWidth,y=f.xInc,m=f.yStartInd,b=f.textureHeight,S=f.yInc,_=f.zValues,C=f.webAssemblyContext,T=f.colorMap,x=f.opacity,A=f.horCellCount;f.vertCellCount;var w=f.horCellOffsets,L=f.vertCellOffsets,k=f.colorMin,D=f.colorMax,j=f.arrayWidth,N=f.arrayHeight,V=f.fillValuesOutOfRange;h.resize(v*b,0);for(var W=0,K=L[W],H=new Array(A),U=!1,I=g,Q=m,Z,ee=0;ee<b;ee++){var ie=0,de=w[ie];if(ee>K){U=!1,W++,K=L[W];var pe=ee-K;if(pe>Number.EPSILON&&Math.floor(K)+1===ee){ee--;continue}}U?Z=H[ie]:(I=g+ie*y,Q=m+W*S,Z=(0,r.getColor)(Q,I,T,x,_,C,k,D,j,N,V,p),H[ie]=Z);for(var _e=0;_e<v;_e++){if(_e>de){ie++,de=w[ie];var Te=_e-de;if(Te>Number.EPSILON&&Math.floor(de)+1===_e){_e--;continue}U?Z=H[ie]:(I=g+ie*y,Z=(0,r.getColor)(Q,I,T,x,_,C,k,D,j,N,V,p),H[ie]=Z)}h.set(ee*v+_e,Z)}U=!0}return h};r.getColorDataForTexture=t;var o=function(f,h,p,g,v,y,m,b,S,_,C,T){if(f>=_||h>=S)return 0;var x=v[f][h],A=(0,r.getCellColor)(x,p,m,b,C,y,T);return(0,i.uintArgbColorMultiplyOpacity)(A,g)};r.getColor=o;var a=function(f,h,p,g,v,y,m){if(isNaN(f))return 0;if(v)f=f<p?p:f,f=f>g?g:f;else if(f<p||f>g)return 0;var b=(m-1)/Math.abs(g-p),S=(f-p)*b,_=Math.floor(S+Math.sign(f)*.5);return _=y.NumberUtil.Constrain(_,0,h.length-1),h[_]};r.getCellColor=a;var s=function(f,h){var p=Array.from(Array(h)),g=e([],f,!0);g.sort(function(j,N){return j.offset<N.offset?-1:j.offset>N.offset?1:0});var v=g.length,y=g[0].offset,m=g[g.length-1].offset,b=m-y,S=b/(h-1),_=g[0].color,C=g[0].offset,T=_,x=C;v>1&&(T=g[1].color,x=g[1].offset),b=x-C;for(var A=0,w=0;w<h;++w){var L=y+w*S;L>=x&&(A++,C=x,_=T,A+1<v&&(T=g[A+1].color,x=g[A+1].offset),b=x-C);var k=void 0;if(_===T||b<=Number.EPSILON)k=Number.parseInt((0,n.parseColorToHexStringArgb)(T),16);else{var D=(L-C)/b;k=l(_,T,D)}p[w]=k}return p};r.createColorMap=s;var l=function(f,h,p){var g=(0,n.parseColorToTArgb)(f),v=(0,n.parseColorToTArgb)(h),y=g.opacity,m=v.opacity,b=g.red,S=v.red,_=g.green,C=v.green,T=g.blue,x=v.blue,A=b+Math.floor((S-b)*p),w=_+Math.floor((C-_)*p),L=T+Math.floor((x-T)*p),k=y+Math.floor((m-y)*p);return Number.parseInt("0x"+(0,n.toHex)(k)+(0,n.toHex)(A)+(0,n.toHex)(w)+(0,n.toHex)(L),16)},u=function(f,h,p,g,v,y,m,b,S,_,C){var T=f.left<0?-f.left:0,x=f.top<0?-f.top:0;h&&(T=f.right>C.bottom?f.right-C.bottom:0);var A=(0,r.calculateCellCoordinates)(p,f.width,v,y,m,-T),w=(0,r.calculateCellCoordinates)(g,f.height,b,S,_,-x);return{horCellOffsets:A,vertCellOffsets:w}};r.calculateOffsets=u;var c=function(f,h,p,g,v,y){for(var m=0,b=p,S=0;S<g;S++,b+=v)m+=f[b];for(var _=1/m,C=new Array(g),T=y,S=0;S<g-1;S++){var x=S*v+p,A=f[x]*_*h;T=T+A,C[S]=T}return C[g-1]=h+y,C};r.calculateCellCoordinates=c;var d=function(f,h,p,g){var v=f.textureWidth,y=f.textureHeight,m=f.webAssemblyContext,b=f.useInterpolation,S=(0,r.getColorDataForTexture)(f,h,g),_=p.create(v,y,m.eTSRTextureFormat.TSR_TEXTUREFORMAT_A8B8G8R8);return m.SCRTSetTextureLinearSamplerEnabled(_,b),m.SCRTFillTextureAbgr(_,v,y,S),_};r.calculateHeatmapTexture=d})(s2)),s2}var Pae;function LPe(){if(Pae)return r0;Pae=1;var r=r0&&r0.__extends||(function(){var p=function(g,v){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,m){y.__proto__=m}||function(y,m){for(var b in m)Object.prototype.hasOwnProperty.call(m,b)&&(y[b]=m[b])},p(g,v)};return function(g,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");p(g,v);function y(){this.constructor=g}g.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}})(),e=r0&&r0.__rest||function(p,g){var v={};for(var y in p)Object.prototype.hasOwnProperty.call(p,y)&&g.indexOf(y)<0&&(v[y]=p[y]);if(p!=null&&typeof Object.getOwnPropertySymbols=="function")for(var m=0,y=Object.getOwnPropertySymbols(p);m<y.length;m++)g.indexOf(y[m])<0&&Object.prototype.propertyIsEnumerable.call(p,y[m])&&(v[y[m]]=p[y[m]]);return v};Object.defineProperty(r0,"__esModule",{value:!0}),r0.NonUniformHeatmapDrawingProvider=void 0;var i=Mr(),n=oi(),t=vn(),o=e8(),a=$H(),s=HM(),l=Ji(),u=vl(),c=Fw(),d=gc(),f=100,h=(function(p){r(g,p);function g(v,y){var m=p.call(this,v,y)||this;return m.heatTextureCache=new a.TextureCache(v),m.colorDataVector=new v.UIntVector,m.onSeriesPropertyChange(l.PROPERTY.DATA_SERIES),m.onSeriesPropertyChange(l.PROPERTY.COLOR_MAP),m}return g.prototype.delete=function(){this.colorDataVector=(0,i.deleteSafe)(this.colorDataVector),this.heatTextureCache=(0,i.deleteSafe)(this.heatTextureCache),p.prototype.delete.call(this)},g.prototype.onSeriesPropertyChange=function(v){var y=v===l.PROPERTY.DATA_SERIES||v===l.PROPERTY.COLOR_MAP||v.includes(s.COLOR_MAP_PREFIX)||v===l.PROPERTY.OPACITY;y&&(this.colorGradientScale=(0,c.createColorMap)(this.parentSeries.colorMap.gradientStops,f))},g.prototype.draw=function(v,y){var m=y.isVerticalChart,b=this.parentSeries.dataSeries,S=this.parentSeries.parentSurface.seriesViewRect,_=this.parentSeries.colorMap,C=this.colorGradientScale,T=b.getZValues(),x=b.getXIndicesRange(new n.NumberRange(y.xCoordinateCalculator.visibleMin,y.xCoordinateCalculator.visibleMax),!1),A=b.getYIndicesRange(new n.NumberRange(y.yCoordinateCalculator.visibleMin,y.yCoordinateCalculator.visibleMax),!1),w=b.getXValue(x.min),L=b.getXValue(x.max),k=b.getYValue(A.min),D=b.getYValue(A.max),j=!y.xCoordinateCalculator.hasFlippedCoordinates,N=y.yCoordinateCalculator.hasFlippedCoordinates,V=y.xCoordinateCalculator.getCoordinate(j?L:w),W=y.xCoordinateCalculator.getCoordinate(j?w:L),K=y.yCoordinateCalculator.getCoordinate(N?k:D),H=y.yCoordinateCalculator.getCoordinate(N?D:k),U=Math.ceil(Math.abs(V-W)),I=Math.ceil(Math.abs(K-H)),Q=U<=0||I<=0,Z=V>(m?S.height:S.width)||K>(m?S.width:S.height)||W<0||H<0;if(!Z&&!Q){var ee=x,ie=A,de=j?ee.max-1:ee.min,pe=N?ie.min:ie.max-1,_e=j?-1:1,Te=N?1:-1;m&&(de=j?ee.min:ee.max-1,_e=j?1:-1);var De=ee.diff,Pe=ie.diff;v.getNativeContext();var Ee=function(Re){return Re};(this.parentSeries.xAxis.type===d.EAxisType.BaseValueAxis||this.parentSeries.xAxis.type===d.EAxisType.DiscontinuousDateAxis)&&(Ee=function(Re){return y.xCoordinateCalculator.getCoordinate(Re)}),this.drawHeatmapInTypescript(v,b.xCellOffsets,b.yCellOffsets,T,y.xCoordinateCalculator,y.yCoordinateCalculator,{horCellCount:De,vertCellCount:Pe,arrayWidth:b.arrayWidth,arrayHeight:b.arrayHeight,opacity:this.parentSeries.opacity,colorGradientScale:C,colorMin:_.minimum,colorMax:_.maximum,horStartInd:de,vertStartInd:pe,horInc:_e,vertInc:Te,isVerticalChart:m,heatmapStartX:V,heatmapStartY:K,heatmapWidth:U,heatmapHeight:I,xCellSizes:b.getXCellSizes(Ee),yCellSizes:b.getYCellSizes(),seriesViewRect:S})}},g.prototype.drawHeatmapInTypescript=function(v,y,m,b,S,_,C){var T=C.horStartInd,x=C.horInc,A=C.vertStartInd,w=C.vertInc,L=C.horCellCount,k=C.vertCellCount,D=C.heatmapStartX,j=C.heatmapStartY,N=C.heatmapWidth,V=C.heatmapHeight,W=C.opacity,K=C.colorGradientScale,H=C.colorMin,U=C.colorMax,I=C.isVerticalChart,Q=C.arrayWidth,Z=C.arrayHeight,ee=C.xCellSizes,ie=C.yCellSizes,de=C.seriesViewRect,pe=y[0],_e=y[y.length-1],Te=m[0],De=m[m.length-1],Pe=Math.max(pe,S.visibleMin),Ee=Math.min(_e,S.visibleMax),Re=Math.max(Te,_.visibleMin),je=Math.min(De,_.visibleMax),Ke=!S.hasFlippedCoordinates,ot=_.hasFlippedCoordinates,We=S.getCoordinate(Ke?Ee:Pe),xe=S.getCoordinate(Ke?Pe:Ee),ve=_.getCoordinate(ot?je:Re),he=_.getCoordinate(ot?Re:je),Se=Math.ceil(Math.abs(We-xe)),be=Math.ceil(Math.abs(ve-he)),ke=new t.Rect(D,j,N,V),qe=(0,c.calculateOffsets)(ke,I,ee,ie,T,L,x,A,k,w,de),rt=qe.horCellOffsets,St=qe.vertCellOffsets,xt=this.calculateHeatmapTexture({xStartInd:T,textureWidth:Se,xInc:x,yStartInd:A,textureHeight:be,yInc:w,zValues:b,webAssemblyContext:this.webAssemblyContext,colorMap:K,opacity:W,horCellCount:L,vertCellCount:k,horCellOffsets:rt,vertCellOffsets:St,colorMin:H,colorMax:U,arrayWidth:Q,arrayHeight:Z,fillValuesOutOfRange:this.parentSeries.fillValuesOutOfRange,useInterpolation:this.parentSeries.useLinearTextureFiltering});if(v.getNativeContext(),I){var It=t.Rect.intersect(this.parentSeries.parentSurface.clipRect,de);v.setTranslationRotationAndClip(It,de.x-be,de.y+xe+(Ke?0:Se),-90);var Zt=Ke?0:Se,ct=ve;v.drawTexture(xt,Zt,ct,Se,be);return}v.drawTexture(xt,We,he,Se,be)},g.prototype.calculateHeatmapTexture=function(v){if(!this.getMemoizedHeatmapTexture){var y=function(b,S){var _=b,C=_[0],T=C.horCellOffsets,x=C.vertCellOffsets,A=e(C,["horCellOffsets","vertCellOffsets"]),w=S[0],L=w.horCellOffsets,k=w.vertCellOffsets,D=e(w,["horCellOffsets","vertCellOffsets"]);return m(Object.values(A),Object.values(D))&&m(T,L)&&m(x,k)};this.getMemoizedHeatmapTexture=(0,o.memoize)(c.calculateHeatmapTexture,y)}var m=function(b,S){return!b.some(function(_,C){return _!==S[C]})};return this.getMemoizedHeatmapTexture(v,this.colorDataVector,this.heatTextureCache,f)},g})(u.BaseSeriesDrawingProvider);return r0.NonUniformHeatmapDrawingProvider=h,r0}var bE={},Cae;function kPe(){if(Cae)return bE;Cae=1;var r=bE&&bE.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(u[d]=c[d])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})();Object.defineProperty(bE,"__esModule",{value:!0}),bE.NonUniformHeatmapHitTestProvider=void 0;var e=Ii(),i=Js(),n=Rs(),t=vs(),o=(function(a){r(s,a);function s(){return a!==null&&a.apply(this,arguments)||this}return s.prototype.hitTest=function(l,u){var c=this.getTranslatedHitTestPoint(l,u);if(!c)return t.HitTestInfo.empty();var d=this.currentRenderPassData,f=d.xCoordinateCalculator,h=d.yCoordinateCalculator,p=d.isVerticalChart,g=p?c.y:c.x,v=p?c.x:c.y,y=this.parentSeries.dataSeries;if(!y)return t.HitTestInfo.empty();var m=n.hitTestHelpers.getNearestNonUniformHeatmapPoint(f,h,y,g,v),b=m.xIndex,S=m.yIndex,_=m.zValue,C=new t.HitTestInfo(this.parentSeries);C.seriesName=this.parentSeries.seriesName,C.dataSeriesType=y.type,C.hitTestPoint=new e.Point(g,v);var T=f.getDataValue(g),x=h.getDataValue(v);return C.hitTestPointValues=new e.Point(T,x),C.xValue=T,C.yValue=x,C.heatmapXIndex=b,C.heatmapYIndex=S,C.zValue=_,C.heatmapValue=_,C.xCoord=g,C.yCoord=v,C.isHit=b!==-1&&S!==-1,C.isWithinDataBounds=C.isHit,b!==-1&&S!==-1&&(C.metadata=y.getMetadataAt(S,b)),C},s.prototype.hitTestDataPoint=function(l,u){return this.hitTest(l,u)},s.prototype.hitTestXSlice=function(l,u){return this.hitTest(l,u)},s})(i.BaseHitTestProvider);return bE.NonUniformHeatmapHitTestProvider=o,bE}var Tae;function IPe(){if(Tae)return mE;Tae=1;var r=mE&&mE.__extends||(function(){var l=function(u,c){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(d[h]=f[h])},l(u,c)};return function(u,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");l(u,c);function d(){this.constructor=u}u.prototype=c===null?Object.create(c):(d.prototype=c.prototype,new d)}})();Object.defineProperty(mE,"__esModule",{value:!0}),mE.NonUniformHeatmapRenderableSeries=void 0;var e=So(),i=tn(),n=HM(),t=uX(),o=LPe(),a=kPe(),s=(function(l){r(u,l);function u(c,d){var f=l.call(this,c,d)||this;return f.type=i.ESeriesType.NonUniformHeatmapSeries,f.drawingProviders=[],e.IS_TEST_ENV||f.drawingProviders.push(new o.NonUniformHeatmapDrawingProvider(c,f)),f.dataLabelProviderProperty||(f.dataLabelProviderProperty=new t.NonUniformHeatMapDataLabelProvider(d==null?void 0:d.dataLabels),f.dataLabelProviderProperty.onAttach(f.webAssemblyContext,f)),f}return u.prototype.newHitTestProvider=function(){return new a.NonUniformHeatmapHitTestProvider(this,this.webAssemblyContext)},u})(n.BaseHeatmapRenderableSeries);return mE.NonUniformHeatmapRenderableSeries=s,mE}var SE={},xae;function NPe(){if(xae)return SE;xae=1;var r=SE&&SE.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(SE,"__esModule",{value:!0}),SE.ShadowEffect=void 0;var e=Ii(),i=vU(),n=gX(),t=(function(o){r(a,o);function a(s,l){var u=o.call(this,s,new s.SCRTShadowEffect,{offset:(l==null?void 0:l.offset)||new e.Point(10,10),range:(l==null?void 0:l.range)||1,color:l?"rgba(".concat((l==null?void 0:l.brightness)||68,",").concat((l==null?void 0:l.brightness)||68,",").concat((l==null?void 0:l.brightness)||68,",1)"):"#444444"})||this;return u.type=i.EShaderEffectType.Shadow,u}return a})(n.ShaderEffect);return SE.ShadowEffect=t,SE}var _E={},PE={},Td={},CE={},Eae;function FPe(){if(Eae)return CE;Eae=1;var r=CE&&CE.__extends||(function(){var t=function(o,a){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");t(o,a);function s(){this.constructor=o}o.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}})();Object.defineProperty(CE,"__esModule",{value:!0}),CE.XyzPointSeriesResampled=void 0;var e=xo(),i=FM(),n=(function(t){r(o,t);function o(a,s){return t.call(this,a,s,2,[e.EValueName.Y,e.EValueName.Z])||this}return Object.defineProperty(o.prototype,"zValues",{get:function(){return this.yValuesArray[1]},enumerable:!1,configurable:!0}),o})(i.BasePointSeriesResampled);return CE.XyzPointSeriesResampled=n,CE}var Aae;function dg(){if(Aae)return Td;Aae=1;var r=Td&&Td.__extends||(function(){var v=function(y,m){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,S){b.__proto__=S}||function(b,S){for(var _ in S)Object.prototype.hasOwnProperty.call(S,_)&&(b[_]=S[_])},v(y,m)};return function(y,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");v(y,m);function b(){this.constructor=y}y.prototype=m===null?Object.create(m):(b.prototype=m.prototype,new b)}})();Object.defineProperty(Td,"__esModule",{value:!0}),Td.XyzBaseRenderDataTransform=Td.OhlcBaseRenderDataTransform=Td.XyyBaseRenderDataTransform=Td.XyBaseRenderDataTransform=Td.BaseRenderDataTransform=void 0;var e=$n(),i=Mr(),n=ni(),t=oi(),o=ca(),a=dX(),s=G1(),l=K1(),u=FPe(),c=JS(),d=(function(v){r(y,v);function y(m,b,S){var _=v.call(this)||this;return _.requiresTransform=!0,_.useForYRange=!1,_.parentSeries=m,_.wasmContext=b,_.parentSeries.dataSeries,_.pointSeries=_.createPointSeries(),_.drawingProviders=S??[],_}return y.prototype.runTransform=function(m){var b,S,_;if(this.requiresTransform||m.indexRange&&!m.indexRange.equals(this.lastIndexRange)||m.resamplingHash&&m.resamplingHash!==this.lastResamplingHash){n.Guard.notNull(m,"renderPassData"),n.Guard.notNull(m.pointSeries,"renderPassData.pointSeries");var C=o.PerformanceDebugHelper.mark(o.EPerformanceMarkType.RenderDataTransformStart,{contextId:this.parentSeries.id,parentContextId:(b=this.parentSeries.parentSurface)===null||b===void 0?void 0:b.id,level:o.EPerformanceDebugLevel.Verbose}),T=this.runTransformInternal(m);return o.PerformanceDebugHelper.mark(o.EPerformanceMarkType.RenderDataTransformEnd,{contextId:this.parentSeries.id,parentContextId:(S=this.parentSeries.parentSurface)===null||S===void 0?void 0:S.id,relatedId:(_=C==null?void 0:C.detail)===null||_===void 0?void 0:_.relatedId,level:o.EPerformanceDebugLevel.Verbose}),T===this.pointSeries&&(this.requiresTransform=!1),this.lastIndexRange=m.indexRange,this.lastResamplingHash=m.resamplingHash,this.makeRenderPassData(m,T)}return this.makeRenderPassData(m,this.pointSeries)},y.prototype.onDataChange=function(m){this.requiresTransform=!0},y.prototype.delete=function(){this.pointSeries=(0,i.deleteSafe)(this.pointSeries),this.wasmContext=void 0},y.prototype.makeRenderPassData=function(m,b){var S=new t.NumberRange(0,b.xValues.size()-1);return b.xRange=m.pointSeries.xRange,b.fifoStartIndex=m.pointSeries.fifoStartIndex,new c.RenderPassData(S,m.getxCoordinateCalculator,m.getyCoordinateCalculator,m.isVerticalChart,b,m.resamplingHash)},y})(e.DeletableEntity);Td.BaseRenderDataTransform=d;var f=(function(v){r(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y.prototype.createPointSeries=function(){return new s.XyPointSeriesResampled(this.wasmContext,new t.NumberRange(0,0))},y.prototype.runTransformInternal=function(m){throw new Error("runTransformInternal not implemented.")},y})(d);Td.XyBaseRenderDataTransform=f;var h=(function(v){r(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y.prototype.createPointSeries=function(){return new l.XyyPointSeriesResampled(this.wasmContext,new t.NumberRange(0,0))},y.prototype.runTransformInternal=function(m){throw new Error("runTransformInternal not implemented.")},y})(d);Td.XyyBaseRenderDataTransform=h;var p=(function(v){r(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y.prototype.createPointSeries=function(){return new a.OhlcPointSeriesResampled(this.wasmContext,new t.NumberRange(0,0))},y.prototype.runTransformInternal=function(m){throw new Error("runTransformInternal not implemented.")},y})(d);Td.OhlcBaseRenderDataTransform=p;var g=(function(v){r(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y.prototype.createPointSeries=function(){return new u.XyzPointSeriesResampled(this.wasmContext,new t.NumberRange(0,0))},y.prototype.runTransformInternal=function(m){throw new Error("runTransformInternal not implemented.")},y})(d);return Td.XyzBaseRenderDataTransform=g,Td}var wae;function jPe(){if(wae)return PE;wae=1;var r=PE&&PE.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(PE,"__esModule",{value:!0}),PE.XyySplineRenderDataTransform=void 0;var e=oi(),i=K1(),n=dg(),t=(function(o){r(a,o);function a(){var s=o!==null&&o.apply(this,arguments)||this;return s.interpolationPoints=10,s.warnOnSplineFailure=!0,s.useForYRange=!0,s}return a.prototype.createPointSeries=function(){return new i.XyyPointSeriesResampled(this.wasmContext,new e.NumberRange(0,0))},a.prototype.runTransformInternal=function(s){var l=this.parentSeries.xAxis.isCategoryAxis?s.pointSeries.indexes:s.pointSeries.xValues,u=s.pointSeries.yValues,c=s.pointSeries.y1Values,d=l.size();if(d==0)return s.pointSeries;var f=this.parentSeries.dataSeries.dataDistributionCalculator.containsNaN;return this.wasmContext.SCRTSplineHelperCubicSpline(l,u,this.pointSeries.xValues,this.pointSeries.yValues,d,this.interpolationPoints,f),!f&&isNaN(this.pointSeries.yValues.get(0))?(this.warnOnSplineFailure&&console.warn(`Could not calculate spline values.  X data may contain duplicates.  Falling back to original values.
    To disable this warning set warnOnSplineFailure = false.`),s.pointSeries):(this.wasmContext.SCRTSplineHelperCubicSpline(l,c,this.pointSeries.xValues,this.pointSeries.y1Values,d,this.interpolationPoints,f),this.pointSeries)},a})(n.BaseRenderDataTransform);return PE.XyySplineRenderDataTransform=t,PE}var Oae;function BPe(){if(Oae)return _E;Oae=1;var r=_E&&_E.__extends||(function(){var h=function(p,g){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var m in y)Object.prototype.hasOwnProperty.call(y,m)&&(v[m]=y[m])},h(p,g)};return function(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");h(p,g);function v(){this.constructor=p}p.prototype=g===null?Object.create(g):(v.prototype=g.prototype,new v)}})();Object.defineProperty(_E,"__esModule",{value:!0}),_E.SplineBandRenderableSeries=void 0;var e=Mr(),i=oi(),n=tn(),t=Oh(),o=Wl(),a=ki(),s=ZF(),l=JS(),u=hU(),c=Ji(),d=jPe(),f=(function(h){r(p,h);function p(g,v){var y=this,m,b,S;return y=h.call(this,g,v)||this,y.type=n.ESeriesType.SplineBandSeries,y.isSplineProperty=!0,y.interpolationPointsProperty=10,y.interpolationPointsProperty=(m=v==null?void 0:v.interpolationPoints)!==null&&m!==void 0?m:y.interpolationPointsProperty,y.renderDataTransform=new d.XyySplineRenderDataTransform(y,g,[y.drawingProviders[0]]),y.renderDataTransform.interpolationPoints=y.interpolationPoints,!((b=y.paletteProvider)===null||b===void 0)&&b.onAttached&&((S=y.paletteProvider)===null||S===void 0||S.onAttached(y)),y}return Object.defineProperty(p.prototype,"isSpline",{get:function(){return this.isSplineProperty},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"interpolationPoints",{get:function(){return this.interpolationPointsProperty},set:function(g){this.interpolationPointsProperty=g,this.renderDataTransform.interpolationPoints=this.interpolationPoints,this.renderDataTransform.requiresTransform=!0,this.notifyPropertyChanged(c.PROPERTY.INTERPOLATION_POINTS)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"xSplineValues",{get:function(){if(!this.transformedRenderPassData)throw Error("Spline values are not available until after first render, or call updateSplineValues");return this.transformedRenderPassData.pointSeries.xValues},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"ySplineValues",{get:function(){if(!this.transformedRenderPassData)throw Error("Spline values are not available until after first render, or call updateSplineValues");return this.transformedRenderPassData.pointSeries.yValues},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"y1SplineValues",{get:function(){if(!this.transformedRenderPassData)throw Error("Spline values are not available until after first render, or call updateSplineValues");return this.transformedRenderPassData.pointSeries.y1Values},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"warnOnSplineFailure",{get:function(){return this.renderDataTransform.warnOnSplineFailure},set:function(g){this.renderDataTransform.warnOnSplineFailure=g},enumerable:!1,configurable:!0}),p.prototype.updateTransformedValues=function(){var g;if(!(!this.dataSeries||!this.parentSurface)){if(!this.currentRenderPassData){var v=!((g=this.resamplingParams)===null||g===void 0)&&g.resampleRequired?this.pointSeries:new s.XyyPointSeriesWrapped(this.dataSeries,void 0);this.currentRenderPassData=new l.RenderPassData(this.getIndicesRange(this.xAxis.visibleRange,this.xAxis.isCategoryAxis),this.xAxis.getCurrentCoordinateCalculator,this.yAxis.getCurrentCoordinateCalculator,this.xAxis.isVerticalChart,v)}this.transformedRenderPassData=this.renderDataTransform.runTransform(this.currentRenderPassData)}},p.prototype.updateSplineValues=function(){this.updateTransformedValues()},p.prototype.onSplineFailure=function(){},p.prototype.getYRange=function(g,v){var y;if(v===void 0&&(v=!1),this.isRunningAnimation)return this.dataSeries.getWindowedYRange(g,!0,v,a.EDataSeriesValueType.Default,this.yRangeMode);this.updateSplineValues();var m=this.xSplineValues,b=this.ySplineValues,S=this.y1SplineValues;if(m.size()===1){var _=Math.min(b.get(0),S.get(0)),C=Math.max(b.get(0),S.get(0));return new i.NumberRange(_,C)}var T=v?g:(0,o.getIndicesRange)(this.webAssemblyContext,m,g,(y=this.dataSeries)===null||y===void 0?void 0:y.dataDistributionCalculator.isSortedAscending),x=Math.max(Math.floor(T.min),0),A=Math.min(Math.ceil(T.max),m.size()-1);if(!(A<x)){var w,L;try{return w=this.webAssemblyContext.NumberUtil.MinMaxWithIndex(b,x,A-x+1,this.dataSeries.dataDistributionCalculator.containsNaN),!(0,t.isRealNumber)(w.minD)||!(0,t.isRealNumber)(w.maxD)||(L=this.webAssemblyContext.NumberUtil.MinMaxWithIndex(S,x,A-x+1,this.dataSeries.dataDistributionCalculator.containsNaN),!(0,t.isRealNumber)(L.minD)||!(0,t.isRealNumber)(L.maxD))?void 0:new i.NumberRange(Math.min(w.minD,L.minD),Math.max(w.maxD,L.maxD))}finally{(0,e.deleteSafe)(w),(0,e.deleteSafe)(L)}}},p.prototype.toJSON=function(g){g===void 0&&(g=!1);var v=h.prototype.toJSON.call(this,g),y={interpolationPoints:this.interpolationPoints};return Object.assign(v.options,y),v},p})(u.BaseBandRenderableSeries);return _E.SplineBandRenderableSeries=f,_E}var TE={},xE={},Dae;function vX(){if(Dae)return xE;Dae=1;var r=xE&&xE.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(xE,"__esModule",{value:!0}),xE.SplineRenderDataTransform=void 0;var e=oi(),i=G1(),n=dg(),t=(function(o){r(a,o);function a(){var s=o!==null&&o.apply(this,arguments)||this;return s.interpolationPoints=10,s.warnOnSplineFailure=!0,s.useForYRange=!0,s}return a.prototype.createPointSeries=function(){return new i.XyPointSeriesResampled(this.wasmContext,new e.NumberRange(0,0))},a.prototype.runTransformInternal=function(s){var l=this.parentSeries.xAxis.isCategoryAxis?s.pointSeries.indexes:s.pointSeries.xValues,u=l.size();if(u==0||u===1)return s.pointSeries;var c=s.pointSeries.yValues,d=this.parentSeries.dataSeries.dataDistributionCalculator.containsNaN;return this.wasmContext.SCRTSplineHelperCubicSpline(l,c,this.pointSeries.xValues,this.pointSeries.yValues,u,this.interpolationPoints,this.parentSeries.dataSeries.dataDistributionCalculator.containsNaN),!d&&isNaN(this.pointSeries.yValues.get(0))?(this.warnOnSplineFailure&&console.error(`Could not calculate spline values.  X data may contain duplicates.  Falling back to original values.
    To disable this warning set warnOnSplineFailure = false.`),s.pointSeries):this.pointSeries},a})(n.BaseRenderDataTransform);return xE.SplineRenderDataTransform=t,xE}var Rae;function VPe(){if(Rae)return TE;Rae=1;var r=TE&&TE.__extends||(function(){var s=function(l,u){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(c[f]=d[f])},s(l,u)};return function(l,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");s(l,u);function c(){this.constructor=l}l.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}})();Object.defineProperty(TE,"__esModule",{value:!0}),TE.SplineLineRenderableSeries=void 0;var e=tn(),i=Xv(),n=Ji(),t=X1(),o=vX(),a=(function(s){r(l,s);function l(u,c){var d=this,f,h,p;return d=s.call(this,u,c)||this,d.type=e.ESeriesType.SplineLineSeries,d.isSplineProperty=!0,d.interpolationPointsProperty=10,d.dataLabelProviderProperty||(d.dataLabelProviderProperty=new t.LineSeriesDataLabelProvider(c==null?void 0:c.dataLabels),d.dataLabelProviderProperty.onAttach(d.webAssemblyContext,d)),d.interpolationPointsProperty=(f=c==null?void 0:c.interpolationPoints)!==null&&f!==void 0?f:d.interpolationPointsProperty,d.renderDataTransform=new o.SplineRenderDataTransform(d,u,[d.drawingProviders[0]]),d.renderDataTransform.interpolationPoints=d.interpolationPoints,!((h=d.paletteProvider)===null||h===void 0)&&h.onAttached&&((p=d.paletteProvider)===null||p===void 0||p.onAttached(d)),d}return Object.defineProperty(l.prototype,"xSplineValues",{get:function(){if(!this.transformedRenderPassData)throw Error("Spline values are not available until after first render, or call updateSplineValues");return this.transformedRenderPassData.pointSeries.xValues},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"ySplineValues",{get:function(){if(!this.transformedRenderPassData)throw Error("Spline values are not available until after first render, or call updateSplineValues");return this.transformedRenderPassData.pointSeries.yValues},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"isSpline",{get:function(){return this.isSplineProperty},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"interpolationPoints",{get:function(){return this.interpolationPointsProperty},set:function(u){this.interpolationPointsProperty=u,this.renderDataTransform.interpolationPoints=this.interpolationPoints,this.renderDataTransform.requiresTransform=!0,this.notifyPropertyChanged(n.PROPERTY.INTERPOLATION_POINTS)},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"warnOnSplineFailure",{get:function(){return this.renderDataTransform.warnOnSplineFailure},set:function(u){this.renderDataTransform.warnOnSplineFailure=u},enumerable:!1,configurable:!0}),l.prototype.updateSplineValues=function(){this.updateTransformedValues()},l.prototype.onSplineFailure=function(){},l.prototype.toJSON=function(u){u===void 0&&(u=!1);var c=s.prototype.toJSON.call(this,u),d={interpolationPoints:this.interpolationPoints};return Object.assign(c.options,d),c},l})(i.BaseLineRenderableSeries);return TE.SplineLineRenderableSeries=a,TE}var EE={},Mae;function HPe(){if(Mae)return EE;Mae=1;var r=EE&&EE.__extends||(function(){var s=function(l,u){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(c[f]=d[f])},s(l,u)};return function(l,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");s(l,u);function c(){this.constructor=l}l.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}})();Object.defineProperty(EE,"__esModule",{value:!0}),EE.SplineMountainRenderableSeries=void 0;var e=tn(),i=gU(),n=Ji(),t=Mg(),o=vX(),a=(function(s){r(l,s);function l(u,c){var d=this,f,h,p;return d=s.call(this,u,c)||this,d.type=e.ESeriesType.SplineMountainSeries,d.isSplineProperty=!0,d.interpolationPointsProperty=10,d.dataLabelProviderProperty||(d.dataLabelProviderProperty=new t.DataLabelProvider(c==null?void 0:c.dataLabels),d.dataLabelProviderProperty.onAttach(d.webAssemblyContext,d)),d.interpolationPointsProperty=(f=c==null?void 0:c.interpolationPoints)!==null&&f!==void 0?f:d.interpolationPointsProperty,d.renderDataTransform=new o.SplineRenderDataTransform(d,u,[d.drawingProviders[0]]),d.renderDataTransform.interpolationPoints=d.interpolationPoints,!((h=d.paletteProvider)===null||h===void 0)&&h.onAttached&&((p=d.paletteProvider)===null||p===void 0||p.onAttached(d)),d}return Object.defineProperty(l.prototype,"isSpline",{get:function(){return this.isSplineProperty},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"interpolationPoints",{get:function(){return this.interpolationPointsProperty},set:function(u){this.interpolationPointsProperty=u,this.renderDataTransform.interpolationPoints=this.interpolationPoints,this.renderDataTransform.requiresTransform=!0,this.notifyPropertyChanged(n.PROPERTY.INTERPOLATION_POINTS)},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"xSplineValues",{get:function(){if(!this.transformedRenderPassData)throw Error("Spline values are not available until after first render, or call updateSplineValues");return this.transformedRenderPassData.pointSeries.xValues},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"ySplineValues",{get:function(){if(!this.transformedRenderPassData)throw Error("Spline values are not available until after first render, or call updateSplineValues");return this.transformedRenderPassData.pointSeries.yValues},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"warnOnSplineFailure",{get:function(){return this.renderDataTransform.warnOnSplineFailure},set:function(u){this.renderDataTransform.warnOnSplineFailure=u},enumerable:!1,configurable:!0}),l.prototype.updateSplineValues=function(){this.updateTransformedValues()},l.prototype.onSplineFailure=function(){},l.prototype.toJSON=function(u){u===void 0&&(u=!1);var c=s.prototype.toJSON.call(this,u),d={interpolationPoints:this.interpolationPoints};return Object.assign(c.options,d),c},l})(i.BaseMountainRenderableSeries);return EE.SplineMountainRenderableSeries=a,EE}var AE={},l2={},Lae;function lN(){return Lae||(Lae=1,(function(r){var e=l2&&l2.__extends||(function(){var h=function(p,g){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var m in y)Object.prototype.hasOwnProperty.call(y,m)&&(v[m]=y[m])},h(p,g)};return function(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");h(p,g);function v(){this.constructor=p}p.prototype=g===null?Object.create(g):(v.prototype=g.prototype,new v)}})();Object.defineProperty(r,"__esModule",{value:!0}),r.SmoothStackedRenderDataTransform=r.XyyBezierRenderDataTransform=r.BezierRenderDataTransform=r.bezierTransform=void 0;var i=hc(),n=oi(),t=Ld(),o=Qn(),a=G1(),s=K1(),l=dg(),u=function(h,p,g,v,y,m,b){for(var S,_,C=h.length,T=[],x=[],A=[],w=function(de,pe,_e,Te,De,Pe,Ee){if(Te!==Te)return{xc:de,yc:pe};if(de===_e&&pe===Te)return{xc:de,yc:pe};var Re=Number.MAX_VALUE;de!==_e&&(Re=(pe-Te)/(de-_e));var je,Ke,ot=(De-de)*Ee;return je=de+ot,Ke=pe+Re*ot,Ke=Math.max(Math.min(Ke,Math.max(pe,Pe)),Math.min(pe,Pe)),{xc:je,yc:Ke}},L=function(de,pe,_e,Te,De){var Pe=1-De;return Math.pow(Pe,3)*de+3*Pe*Pe*De*pe+3*Pe*De*De*_e+Math.pow(De,3)*Te},k=function(de){return{x:h[de],y:p[de]}},D=function(de){if(!b)return 1/0;var pe=b[H];return pe!==pe?1/0:pe},j=k(Math.max(g-1,0)),N=k(g),V=k(g+1),W=k(Math.min(g+2,C-1)),K,H=0,U=g;U<v;U++){T.push(N.x),A.push(H),x.push(Math.min(N.y,D())),H++;var I=w(N.x,N.y,(S=K==null?void 0:K.xc)!==null&&S!==void 0?S:j.x,(_=K==null?void 0:K.yc)!==null&&_!==void 0?_:j.y,V.x,V.y,m);K=w(V.x,V.y,W.x,W.y,N.x,N.y,m);for(var Q=1;Q<y;Q++){var Z=i.easing.inOutCubic(Q/y),ee=L(N.x,I.xc,K.xc,V.x,Z),ie=L(N.y,I.yc,K.yc,V.y,Z);T.push(ee),x.push(Math.min(ie,D())),A.push(H),H++}U>g&&(j=N),N=V,V=W,U<C-3&&(W=k(U+3))}return T.push(V.x),x.push(Math.min(V.y,D())),A.push(H),{newxValues:T,newyValues:x,newindexes:A}};r.bezierTransform=u;var c=(function(h){e(p,h);function p(g,v,y,m){var b=this,S,_;return b=h.call(this,g,v,y)||this,b.interpolationPointsProperty=20,b.curvatureProperty=.5,b.interpolationPointsProperty=(S=m==null?void 0:m.interpolationPoints)!==null&&S!==void 0?S:b.interpolationPoints,b.curvatureProperty=(_=m==null?void 0:m.curvature)!==null&&_!==void 0?_:b.curvature,b}return Object.defineProperty(p.prototype,"interpolationPoints",{get:function(){return this.interpolationPointsProperty},set:function(g){var v,y;this.interpolationPointsProperty!==g&&(this.interpolationPointsProperty=g,this.requiresTransform=!0,!((v=this.parentSeries)===null||v===void 0)&&v.invalidateParentCallback&&((y=this.parentSeries)===null||y===void 0||y.invalidateParentCallback()))},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"curvature",{get:function(){return this.curvatureProperty},set:function(g){var v,y;this.curvatureProperty!==g&&(this.curvatureProperty=g,this.requiresTransform=!0,!((v=this.parentSeries)===null||v===void 0)&&v.invalidateParentCallback&&((y=this.parentSeries)===null||y===void 0||y.invalidateParentCallback()))},enumerable:!1,configurable:!0}),p.prototype.createPointSeries=function(){return new a.XyPointSeriesResampled(this.wasmContext,new n.NumberRange(0,0))},p.prototype.runTransformInternal=function(g){var v,y=g.pointSeries,m=y.xValues,b=y.yValues;y.indexes;var S=y.resampled,_=this.pointSeries,C=_.xValues,T=_.yValues,x=_.indexes,A=S?0:g.indexRange.min,w=S?m.size()-1:(v=g.indexRange)===null||v===void 0?void 0:v.max;if(m.size()==0)return g.pointSeries;C.clear(),T.clear(),x.clear();var L=(0,r.bezierTransform)((0,o.vectorToArrayViewF64)(m,this.wasmContext),(0,o.vectorToArrayViewF64)(b,this.wasmContext),A,w,this.interpolationPoints,this.curvature),k=L.newxValues,D=L.newyValues,j=L.newindexes;return(0,t.appendDoubleVectorFromJsArray)(this.wasmContext,C,k),(0,t.appendDoubleVectorFromJsArray)(this.wasmContext,T,D),(0,t.appendDoubleVectorFromJsArray)(this.wasmContext,x,j),this.pointSeries},p})(l.BaseRenderDataTransform);r.BezierRenderDataTransform=c;var d=(function(h){e(p,h);function p(g,v,y,m){var b=this,S,_;return b=h.call(this,g,v,y)||this,b.interpolationPointsProperty=20,b.curvatureProperty=.5,b.forceYGreaterThanY1=!1,b.interpolationPointsProperty=(S=m==null?void 0:m.interpolationPoints)!==null&&S!==void 0?S:b.interpolationPoints,b.curvatureProperty=(_=m==null?void 0:m.curvature)!==null&&_!==void 0?_:b.curvature,b}return Object.defineProperty(p.prototype,"interpolationPoints",{get:function(){return this.interpolationPointsProperty},set:function(g){var v,y;this.interpolationPointsProperty!==g&&(this.interpolationPointsProperty=g,this.requiresTransform=!0,!((v=this.parentSeries)===null||v===void 0)&&v.invalidateParentCallback&&((y=this.parentSeries)===null||y===void 0||y.invalidateParentCallback()))},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"curvature",{get:function(){return this.curvatureProperty},set:function(g){var v,y;this.curvatureProperty!==g&&(this.curvatureProperty=g,this.requiresTransform=!0,!((v=this.parentSeries)===null||v===void 0)&&v.invalidateParentCallback&&((y=this.parentSeries)===null||y===void 0||y.invalidateParentCallback()))},enumerable:!1,configurable:!0}),p.prototype.createPointSeries=function(){return new s.XyyPointSeriesResampled(this.wasmContext,new n.NumberRange(0,0))},p.prototype.runTransformInternal=function(g){var v,y=g.pointSeries,m=y.xValues,b=y.yValues,S=y.y1Values;y.indexes;var _=y.resampled,C=this.pointSeries,T=C.xValues,x=C.yValues,A=C.y1Values,w=C.indexes,L=_?0:g.indexRange.min,k=_?m.size()-1:(v=g.indexRange)===null||v===void 0?void 0:v.max;if(m.size()==0)return g.pointSeries;T.clear(),x.clear(),A.clear(),w.clear();var D=(0,r.bezierTransform)((0,o.vectorToArrayViewF64)(m,this.wasmContext),(0,o.vectorToArrayViewF64)(S,this.wasmContext),L,k,this.interpolationPoints,this.curvature);D.newxValues;var j=D.newyValues;D.newindexes,(0,t.appendDoubleVectorFromJsArray)(this.wasmContext,A,j);var N=(0,r.bezierTransform)((0,o.vectorToArrayViewF64)(m,this.wasmContext),(0,o.vectorToArrayViewF64)(b,this.wasmContext),L,k,this.interpolationPoints,this.curvature,this.forceYGreaterThanY1?(0,o.vectorToArrayViewF64)(A,this.wasmContext):void 0),V=N.newxValues,W=N.newyValues,K=N.newindexes;return(0,t.appendDoubleVectorFromJsArray)(this.wasmContext,T,V),(0,t.appendDoubleVectorFromJsArray)(this.wasmContext,x,W),(0,t.appendDoubleVectorFromJsArray)(this.wasmContext,w,K),this.pointSeries},p})(l.BaseRenderDataTransform);r.XyyBezierRenderDataTransform=d;var f=(function(h){e(p,h);function p(){var g=h!==null&&h.apply(this,arguments)||this;return g.forceYGreaterThanY1=!0,g}return p})(d);r.SmoothStackedRenderDataTransform=f})(l2)),l2}var wE={},OE={},DE={},RE={},kae;function UPe(){if(kae)return RE;kae=1;var r=RE&&RE.__extends||(function(){var n=function(t,o){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(a[l]=s[l])},n(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");n(t,o);function a(){this.constructor=t}t.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}})();Object.defineProperty(RE,"__esModule",{value:!0}),RE.StackedXySeriesInfo=void 0;var e=ny(),i=(function(n){r(t,n);function t(o,a){var s=n.call(this,o,a)||this;return s.yValue=a.y1Value,s.accumulatedValue=a.yValue,s}return t.prototype.getValuesWithLabels=function(o,a,s,l){var u=n.prototype.getValuesWithLabels.call(this,o,a,s,l);return u.push(this.concatTwoValuesWithLabels(this.formattedXValue,this.formattedYValue,a,s)),u},t})(e.SeriesInfo);return RE.StackedXySeriesInfo=i,RE}var Iae;function mU(){if(Iae)return DE;Iae=1;var r=DE&&DE.__extends||(function(){var p=function(g,v){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,m){y.__proto__=m}||function(y,m){for(var b in m)Object.prototype.hasOwnProperty.call(m,b)&&(y[b]=m[b])},p(g,v)};return function(g,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");p(g,v);function y(){this.constructor=g}g.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}})();Object.defineProperty(DE,"__esModule",{value:!0}),DE.BaseStackedRenderableSeries=void 0;var e=Jn(),i=Mr(),n=$o(),t=ku(),o=XF(),a=ca(),s=UPe(),l=ki(),u=oy(),c=Gl(),d=Ji(),f=qH(),h=(function(p){r(g,p);function g(v,y){var m=p.call(this,v,y)||this;return m.isStacked=!0,m.rolloverModifierProps=new f.RolloverModifierRenderableSeriesProps(m),m.getParentSurfaceFn=function(){},m.typeMap=new Map,m.opacityOriginalValue=1,m.isStacked=!0,m.accumulatedValues=new v.SCRTDoubleVector,m.accumulatedFinalAnimationValues=new v.SCRTDoubleVector,y!=null&&y.dataLabelProvider&&("draw"in y.dataLabelProvider||(y.dataLabelProvider.type===t.EDataLabelProviderType.Custom?y.dataLabelProvider=(0,e.createType)(n.EBaseType.DataLabelProvider,y.dataLabelProvider.customType,v,y.dataLabelProvider.options):y.dataLabelProvider=(0,e.createType)(n.EBaseType.DataLabelProvider,y.dataLabelProvider.type,v,y.dataLabelProvider.options))),m.dataLabelProviderProperty=y==null?void 0:y.dataLabelProvider,m.dataLabelProviderProperty&&m.dataLabelProviderProperty.onAttach(v,m),y!=null&&y.animation&&m.animationQueue.push(y.animation),m}return g.prototype.dataSeriesDataChanged=function(){this.notifyPropertyChanged(d.PROPERTY.DATA_SERIES)},g.prototype.draw=function(v,y){var m,b,S,_,C=a.PerformanceDebugHelper.mark(a.EPerformanceMarkType.DrawSingleSeriesStart,{contextId:this.id,parentContextId:(m=this.parentSurface)===null||m===void 0?void 0:m.id,level:a.EPerformanceDebugLevel.Verbose});this.currentRenderPassData=y,(b=this.hitTestProvider)===null||b===void 0||b.update(y),this.dataLabelProvider&&this.dataLabelProvider.generateDataLabels(v,y),a.PerformanceDebugHelper.mark(a.EPerformanceMarkType.DrawSingleSeriesEnd,{contextId:this.id,parentContextId:(S=this.parentSurface)===null||S===void 0?void 0:S.id,relatedId:(_=C==null?void 0:C.detail)===null||_===void 0?void 0:_.relatedId,level:a.EPerformanceDebugLevel.Verbose})},g.prototype.delete=function(){this.accumulatedValues=(0,i.deleteSafe)(this.accumulatedValues),this.accumulatedFinalAnimationValues=(0,i.deleteSafe)(this.accumulatedFinalAnimationValues),p.prototype.delete.call(this)},g.prototype.onDetachFromParentCollection=function(){this.parentCollection=void 0,this.getParentSurfaceFn=void 0,this.notifyParentPropertyChangedFn=void 0},g.prototype.notifyPropertyChanged=function(v){this.drawingProviders.forEach(function(y){return y.onSeriesPropertyChange(v)}),this.notifyParentPropertyChangedFn&&this.notifyParentPropertyChangedFn(v)},g.prototype.checkIsOutOfDataRange=function(v,y){var m=this.getDataSeriesValuesCount(),b=this.xAxis.getCurrentCoordinateCalculator().isCategoryCoordinateCalculator,S=b?0:this.getNativeXValues().get(0),_=b?m-1:this.getNativeXValues().get(m-1);return v<S||v>_},g.prototype.getAccumulatedValues=function(v){return v?this.accumulatedFinalAnimationValues:this.accumulatedValues},g.prototype.getBaseXValues=function(){throw Error("getBaseXValues() is not supported for BaseStackedRenderableSeries")},g.prototype.onAttach=function(v){throw Error("onAttach() method is not supported for BaseStackedRenderableSeries")},g.prototype.onDetach=function(){throw Error("onDetach() method is not supported for BaseStackedRenderableSeries")},Object.defineProperty(g.prototype,"resamplingMode",{get:function(){return u.EResamplingMode.None},set:function(v){throw Error("Setting resamplingMode property is not supported for BaseStackedRenderableSeries")},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"resamplingPrecision",{get:function(){throw Error("resamplingPrecision property is not supported for BaseStackedRenderableSeries")},set:function(v){throw Error("resamplingPrecision property is not supported for BaseStackedRenderableSeries")},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"dataLabelProvider",{get:function(){return this.dataLabelProviderProperty},set:function(v){this.dataLabelProviderProperty=v,v.onAttach(this.webAssemblyContext,this),this.notifyPropertyChanged(d.PROPERTY.SERIES_TEXT_PROVIDER)},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"parentSurface",{get:function(){if(this.getParentSurfaceFn)return this.getParentSurfaceFn()},set:function(v){throw Error("set parentSurface property is not supported for BaseStackedRenderableSeries")},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"xAxis",{get:function(){return this.parentCollection.xAxis},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"yAxis",{get:function(){return this.parentCollection.yAxis},enumerable:!1,configurable:!0}),g.prototype.beforeAnimationStart=function(){if(this.opacityOriginalValue=this.opacity,this.isRunningAnimation){p.prototype.beforeAnimationStart.call(this);return}(0,o.copyDoubleVector)(this.accumulatedValues,this.accumulatedFinalAnimationValues,this.webAssemblyContext)},g.prototype.afterAnimationComplete=function(){this.opacityProperty=this.opacityOriginalValue,this.isRunningAnimation&&p.prototype.afterAnimationComplete.call(this)},g.prototype.updateAnimationProperties=function(v,y){if(this.isRunningAnimation){p.prototype.updateAnimationProperties.call(this,v,this.animationFSM),this.parentCollection.setAccumulatedValuesDirty();return}y.animation.isFadeEffectAnimation?this.opacity=v*this.opacityOriginalValue:this.opacity=this.opacityOriginalValue,y.animation.calculateAnimationValues(this.webAssemblyContext,this.accumulatedFinalAnimationValues,this.accumulatedValues,v),this.renderDataTransform&&(this.renderDataTransform.requiresTransform=!0)},g.prototype.getSeriesInfo=function(v){return new s.StackedXySeriesInfo(this,v)},g.prototype.toJSON=function(v){var y,m,b;v===void 0&&(v=!1);var S;if(this.paletteProvider)if("toJSON"in this.paletteProvider)S=this.paletteProvider.toJSON();else throw new Error("Series contains a palletProvider.  This must implement toJSON to be correctly serialized");var _={id:this.id,opacity:this.opacity,animation:this.animation,dataLabelProvider:(y=this.dataLabelProvider)===null||y===void 0?void 0:y.toJSON(),pointMarker:(m=this.pointMarker)===null||m===void 0?void 0:m.toJSON(),stroke:this.stroke,paletteProvider:S};return((b=this.dataSeries)===null||b===void 0?void 0:b.type)===l.EDataSeriesType.Xy?{type:this.type,options:_,xyData:this.dataSeries.toJSON(v).options}:{type:this.type,options:_}},g.prototype.toPointSeries=function(v){throw Error("toPointSeries method is not supported for BaseStackedRenderableSeries")},g.prototype.getCurrentRenderPassData=function(){throw Error("getCurrentRenderPassData method is not supported for BaseStackedRenderableSeries")},Object.defineProperty(g.prototype,"xAxisId",{get:function(){var v;return(v=this.parentCollection)===null||v===void 0?void 0:v.xAxisId},set:function(v){throw Error("Setting xAxisId property is not supported for BaseStackedRenderableSeries")},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"yAxisId",{get:function(){var v;return(v=this.parentCollection)===null||v===void 0?void 0:v.yAxisId},set:function(v){throw Error("yAxisId property is not supported for BaseStackedRenderableSeries")},enumerable:!1,configurable:!0}),g.prototype.linkAxes=function(){},g})(c.BaseRenderableSeries);return DE.BaseStackedRenderableSeries=h,DE}var ME={},Nae;function zPe(){if(Nae)return ME;Nae=1;var r=ME&&ME.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(ME,"__esModule",{value:!0}),ME.StackedMountainSeriesHitTestProvider=void 0;var e=Js(),i=Rs(),n=vs(),t=(function(o){r(a,o);function a(){return o!==null&&o.apply(this,arguments)||this}return a.prototype.hitTest=function(s,l){var u=this.getTranslatedHitTestPoint(s,l);if(!u)return n.HitTestInfo.empty();var c=this.currentRenderPassData,d=c.xCoordinateCalculator,f=c.yCoordinateCalculator,h=c.isVerticalChart,p=h?u.y:u.x,g=h?u.x:u.y,v=this.parentSeries.dataSeries;if(!v)return n.HitTestInfo.empty();var y=i.hitTestHelpers.getNearestXPoint(this.webAssemblyContext,d,v,p,v.dataDistributionCalculator.isSortedAscending),m=v.getNativeXValues(),b=this.parentSeries.accumulatedValues,S=i.hitTestHelpers.createHitTestInfo(this.parentSeries,d,f,h,v,m,b,p,g,y,0);if(y>=0){var _=function(A){return b.get(A)},C=function(A){return b.get(A)-v.getNativeYValues().get(A)},T=i.hitTestHelpers.testIsHitForBand(this.parentSeries.isDigitalLine,d,f,m,_,C,y,p,g,v);S.isHit=T.isHit,S.point2dataSeriesIndex=T.secondPointIndex;var x=v.valueNames.reduce(function(A,w){return A[w]=v.getNativeValue(v.getYValuesByName(w),S.point2dataSeriesIndex),A},{});S.point2yValueByName=x}else S.isHit=!1;return S},a.prototype.hitTestXSlice=function(s,l){var u=this.getTranslatedHitTestPoint(s,l);if(!u)return n.HitTestInfo.empty();var c=this.currentRenderPassData,d=c.xCoordinateCalculator,f=c.yCoordinateCalculator,h=c.isVerticalChart,p=h?u.y:u.x,g=h?u.x:u.y,v=this.parentSeries.dataSeries;if(!v)return n.HitTestInfo.empty();var y=i.hitTestHelpers.getNearestXPoint(this.webAssemblyContext,d,v,p,v.dataDistributionCalculator.isSortedAscending),m=v.getNativeXValues(),b=v.getNativeYValues(),S=this.parentSeries.accumulatedValues,_=i.hitTestHelpers.createHitTestInfo(this.parentSeries,d,f,h,v,m,S,p,g,y,0);return y>=0?(_.y1Value=b.get(y),_.isHit=_.isWithinDataBounds):_.isHit=!1,_},a.prototype.hitTestDataPoint=function(s,l,u){return u===void 0&&(u=e.BaseHitTestProvider.DEFAULT_HIT_TEST_RADIUS),this.hitTest(s,l)},a})(e.BaseHitTestProvider);return ME.StackedMountainSeriesHitTestProvider=t,ME}var Fae;function WPe(){if(Fae)return OE;Fae=1;var r=OE&&OE.__extends||(function(){var d=function(f,h){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,g){p.__proto__=g}||function(p,g){for(var v in g)Object.prototype.hasOwnProperty.call(g,v)&&(p[v]=g[v])},d(f,h)};return function(f,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");d(f,h);function p(){this.constructor=f}f.prototype=h===null?Object.create(h):(p.prototype=h.prototype,new p)}})();Object.defineProperty(OE,"__esModule",{value:!0}),OE.BaseStackedMountainRenderableSeries=void 0;var e=ca(),i=wM(),n=gs(),t=ln(),o=mU(),a=Ji(),s=cX(),l=$d(),u=zPe(),c=(function(d){r(f,d);function f(h,p){var g=this,v,y,m;return g=d.call(this,h,p)||this,g.fillProperty="#7e8486",g.strokeY1Property="transparent",g.strokeDashArrayProperty=[],g.strokeY1DashArrayProperty=[],g.fillProperty=(v=p==null?void 0:p.fill)!==null&&v!==void 0?v:g.fillProperty,g.stroke=(y=p==null?void 0:p.stroke)!==null&&y!==void 0?y:t.SciChartSurfaceBase.DEFAULT_THEME.mountainLineColor,g.strokeDashArrayProperty=(m=p==null?void 0:p.strokeDashArray)!==null&&m!==void 0?m:g.strokeDashArrayProperty,g.customTextureOptionsProperty=p==null?void 0:p.customTextureOptions,g}return f.prototype.onAttachToParentCollection=function(h,p,g){if(this.parentCollection)throw new Error("Invalid operation in StackedMountainRenderableSeries.onAttachToParentCollection, this series has been already attached to collection. Please detach it from the collection before attaching to another");this.parentCollection=h,this.getParentSurfaceFn=p,this.notifyParentPropertyChangedFn=g},f.prototype.onAttach=function(h){if(this.invalidateParentCallback)throw new Error("Invalid operation in sciChartSurface.attachSeries, this series has already been attached to a SciChartSurface. Please detach it from a SciChartSurface before attaching to another");this.invalidateParentCallback=h.invalidateElement,this.drawingProviders.forEach(function(p){return p.onAttachSeries()}),this.rolloverModifierProps.setInvalidateParentCallback(h.invalidateElement)},f.prototype.onDetach=function(){this.invalidateParentCallback=void 0,this.drawingProviders.forEach(function(h){return h.onDetachSeries()}),this.rolloverModifierProps.setInvalidateParentCallback(void 0)},f.prototype.draw=function(h,p){var g=this,v,y,m,b,S=e.PerformanceDebugHelper.mark(e.EPerformanceMarkType.DrawSingleSeriesStart,{contextId:this.id,parentContextId:(v=this.parentSurface)===null||v===void 0?void 0:v.id,level:e.EPerformanceDebugLevel.Verbose});this.currentRenderPassData=p,(y=this.hitTestProvider)===null||y===void 0||y.update(p);try{h.pushShaderEffect(this.effect);var _=this.parentSurface.seriesViewRect;this.drawingProviders.forEach(function(C){var T;if(!((T=g.xAxis)===null||T===void 0)&&T.isVerticalChart&&h.setTranslationRotationAndClip(_,_.x,_.y),g.renderDataTransform&&g.renderDataTransform.drawingProviders.includes(C)){var x=g.renderDataTransform.runTransform(p);C.draw(h,x)}else C.draw(h,p)})}finally{h.popShaderEffect()}e.PerformanceDebugHelper.mark(e.EPerformanceMarkType.DrawSingleSeriesEnd,{contextId:this.id,parentContextId:(m=this.parentSurface)===null||m===void 0?void 0:m.id,relatedId:(b=S==null?void 0:S.detail)===null||b===void 0?void 0:b.relatedId,level:e.EPerformanceDebugLevel.Verbose})},f.prototype.onDpiChanged=function(h){d.prototype.onDpiChanged.call(this,h),this.notifyPropertyChanged(a.PROPERTY.STROKE)},Object.defineProperty(f.prototype,"fill",{get:function(){return(0,n.stripAutoColor)(this.fillProperty)},set:function(h){this.fillProperty!==h&&(this.fillProperty=h,this.drawingProviders.forEach(function(p){return p.onSeriesPropertyChange(a.PROPERTY.FILL)}),this.drawingProviders.forEach(function(p){return p.onSeriesPropertyChange(a.PROPERTY.FILL_Y1)}),this.notifyPropertyChanged(a.PROPERTY.FILL))},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"strokeY1",{get:function(){return this.strokeY1Property},set:function(h){this.strokeY1Property!==h&&(this.strokeY1Property=h,this.drawingProviders.forEach(function(p){return p.onSeriesPropertyChange(a.PROPERTY.STROKE_Y1)}))},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"fillY1",{get:function(){return(0,n.stripAutoColor)(this.fillProperty)},set:function(h){throw new Error("Setting fillY1 property is not supported on StackedMountainRenderableSeries")},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"strokeDashArray",{get:function(){return this.strokeDashArrayProperty},set:function(h){this.strokeDashArrayProperty=h,this.notifyPropertyChanged(a.PROPERTY.STROKE_DASH_ARRAY)},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"strokeY1DashArray",{get:function(){return this.strokeY1DashArrayProperty},set:function(h){this.strokeY1DashArrayProperty=h,this.drawingProviders.forEach(function(p){return p.onSeriesPropertyChange(a.PROPERTY.STROKE_Y1_DASH_ARRAY)})},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"customTextureOptions",{get:function(){return this.customTextureOptionsProperty},set:function(h){h!==this.customTextureOptionsProperty&&(this.customTextureOptionsProperty=h,this.notifyPropertyChanged(a.PROPERTY.CUSTOM_TEXTURE_OPTIONS))},enumerable:!1,configurable:!0}),f.prototype.getCurrentRenderPassData=function(){return this.currentRenderPassData},f.prototype.toJSON=function(h){h===void 0&&(h=!1);var p=d.prototype.toJSON.call(this,h),g={fill:this.fill,stroke:this.stroke,strokeThickness:this.strokeThickness,strokeDashArray:this.strokeDashArray};return Object.assign(p.options,g),p},f.prototype.toPointSeries=function(h){return new i.XyPointSeriesWrapped(this.dataSeries)},f.prototype.resolveAutoColors=function(h,p,g){if(d.prototype.resolveAutoColors.call(this,h,p,g),this.fillProperty.startsWith(n.AUTO_COLOR)){var v=g.getFillColor(h,p,this.webAssemblyContext);this.fill=n.AUTO_COLOR+this.adjustAutoColor("fill",v)}},f.prototype.newHitTestProvider=function(){return new u.StackedMountainSeriesHitTestProvider(this,this.webAssemblyContext)},f.prototype.addDrawingProviders=function(h){this.drawingProviders.push(new s.BandSeriesDrawingProvider(h,this,function(p){return p.y1Values},function(p){return p.yValues}),new l.PointMarkerDrawingProvider(h,this,function(p){return p.y1Values}))},f})(o.BaseStackedRenderableSeries);return OE.BaseStackedMountainRenderableSeries=c,OE}var jae;function bU(){if(jae)return wE;jae=1;var r=wE&&wE.__extends||(function(){var t=function(o,a){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");t(o,a);function s(){this.constructor=o}o.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}})();Object.defineProperty(wE,"__esModule",{value:!0}),wE.StackedMountainRenderableSeries=void 0;var e=tn(),i=WPe(),n=(function(t){r(o,t);function o(a,s){var l=this,u,c;return l=t.call(this,a,s)||this,l.type=e.ESeriesType.StackedMountainSeries,!((u=l.paletteProvider)===null||u===void 0)&&u.onAttached&&((c=l.paletteProvider)===null||c===void 0||c.onAttached(l)),l}return o})(i.BaseStackedMountainRenderableSeries);return wE.StackedMountainRenderableSeries=n,wE}var Bae;function GPe(){if(Bae)return AE;Bae=1;var r=AE&&AE.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(AE,"__esModule",{value:!0}),AE.SmoothStackedMountainRenderableSeries=void 0;var e=tn(),i=lN(),n=bU(),t=(function(o){r(a,o);function a(s,l){var u=this,c,d;u=o.call(this,s,l)||this,u.type=e.ESeriesType.SmoothStackedMountainSeries;var f=new i.SmoothStackedRenderDataTransform(u,s,[]);return f.interpolationPoints=(c=l==null?void 0:l.interpolationPoints)!==null&&c!==void 0?c:f.interpolationPoints,f.curvature=(d=l==null?void 0:l.curvature)!==null&&d!==void 0?d:f.curvature,u.renderDataTransform=f,u}return a})(n.StackedMountainRenderableSeries);return AE.SmoothStackedMountainRenderableSeries=t,AE}var LE={},kE={},Vae;function YPe(){if(Vae)return kE;Vae=1;var r=kE&&kE.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(u[d]=c[d])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})();Object.defineProperty(kE,"__esModule",{value:!0}),kE.StackedColumnSeriesHitTestProvider=void 0;var e=oo(),i=Js(),n=Rs(),t=vs(),o=(function(a){r(s,a);function s(){return a!==null&&a.apply(this,arguments)||this}return s.prototype.hitTest=function(l,u){var c=this.getTranslatedHitTestPoint(l,u);if(!c)return t.HitTestInfo.empty();var d=this.currentRenderPassData,f=d.xCoordinateCalculator,h=d.yCoordinateCalculator,p=d.isVerticalChart,g=p?c.y:c.x,v=p?c.x:c.y,y=this.parentSeries.dataSeries;if(!y)return t.HitTestInfo.empty();var m=n.hitTestHelpers.getNearestXPoint(this.webAssemblyContext,f,y,g,y.dataDistributionCalculator.isSortedAscending),b=y.getNativeXValues(),S=y.getNativeYValues(),_=this.parentSeries,C=_.accumulatedValues,T=_.getGroupIndex,x=_.getGroupsCount,A=_.getColumnWidth,w=n.hitTestHelpers.createHitTestInfo(this.parentSeries,f,h,p,y,b,C,g,v,m,0);if(m>=0){var L=T(),k=x(),D=A(f),j=D/2,N=(.5+L-k/2)*D;w.xValue=f.getDataValue(w.xCoord+N);var V=S.get(m),W=C.get(m),K=h.getCoordinate(W),H=h.getCoordinate(W-V),U=w.xCoord+N;w.isHit=(0,e.testIsInBounds)(g,v,U-j,H,U+j,K);var I=f.isCategoryCoordinateCalculator,Q=I?0:b.get(0),Z=f.getCoordinate(Q),ee=I?b.size()-1:b.get(b.size()-1),ie=f.getCoordinate(ee);w.isWithinDataBounds=(0,e.testIsInInterval)(w.hitTestPoint.x,Z,ie,D*k/2),w.y1Value=S.get(m)}else w.isHit=!1;return w},s.prototype.hitTestDataPoint=function(l,u,c){return c===void 0&&(c=i.BaseHitTestProvider.DEFAULT_HIT_TEST_RADIUS),this.hitTest(l,u)},s.prototype.hitTestForDataPointSelectionModifier=function(l,u,c){return c===void 0&&(c=i.BaseHitTestProvider.DEFAULT_HIT_TEST_RADIUS),this.hitTest(l,u)},s.prototype.hitTestXSlice=function(l,u){var c=this.getTranslatedHitTestPoint(l,u);if(!c)return t.HitTestInfo.empty();var d=this.currentRenderPassData,f=d.xCoordinateCalculator,h=d.yCoordinateCalculator,p=d.isVerticalChart,g=p?c.y:c.x,v=p?c.x:c.y,y=this.parentSeries.dataSeries;if(!y)return t.HitTestInfo.empty();var m=n.hitTestHelpers.getNearestXPoint(this.webAssemblyContext,f,y,g,y.dataDistributionCalculator.isSortedAscending),b=y.getNativeXValues(),S=y.getNativeYValues(),_=this.parentSeries,C=_.accumulatedValues,T=_.getGroupIndex,x=_.getGroupsCount,A=_.getColumnWidth,w=n.hitTestHelpers.createHitTestInfo(this.parentSeries,f,h,p,y,b,C,g,v,m,0);if(m>=0){var L=T(),k=x(),D=A(f),j=D/2,N=f.isCategoryCoordinateCalculator,V=N?0:b.get(0),W=f.getCoordinate(V),K=N?b.size()-1:b.get(b.size()-1),H=f.getCoordinate(K);w.isWithinDataBounds=(0,e.testIsInInterval)(w.hitTestPoint.x,W,H,D*k/2);var U=(.5+L-k/2)*D;w.xValue=f.getDataValue(w.xCoord+U);var I=w.xCoord+U;w.isHit=(0,e.testIsInInterval)(g,I-j,I+j),w.y1Value=S.get(m)}else w.isHit=!1;return w},s})(i.BaseHitTestProvider);return kE.StackedColumnSeriesHitTestProvider=o,kE}var i0={},Hae;function $Pe(){if(Hae)return i0;Hae=1;var r=i0&&i0.__extends||(function(){var l=function(u,c){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(d[h]=f[h])},l(u,c)};return function(u,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");l(u,c);function d(){this.constructor=u}u.prototype=c===null?Object.create(c):(d.prototype=c.prototype,new d)}})(),e=i0&&i0.__assign||function(){return e=Object.assign||function(l){for(var u,c=1,d=arguments.length;c<d;c++){u=arguments[c];for(var f in u)Object.prototype.hasOwnProperty.call(u,f)&&(l[f]=u[f])}return l},e.apply(this,arguments)};Object.defineProperty(i0,"__esModule",{value:!0}),i0.StackedColumnSeriesDataLabelProvider=void 0;var i=Ii(),n=ku(),t=Du(),o=QR(),a=Mg(),s=(function(l){r(u,l);function u(c){var d=this,f;return d=l.call(this,e({horizontalTextPosition:t.EHorizontalTextPosition.Center,verticalTextPosition:t.EVerticalTextPosition.Center},c))||this,d.type=n.EDataLabelProviderType.Column,d.positionModeProperty=o.EColumnDataLabelPosition.Outside,d.positionModeProperty=(f=c==null?void 0:c.positionMode)!==null&&f!==void 0?f:d.positionMode,d}return Object.defineProperty(u.prototype,"positionMode",{get:function(){return this.positionModeProperty},set:function(c){this.positionModeProperty=c,this.invalidateParent()},enumerable:!1,configurable:!0}),u.prototype.CalculateShift=function(c){var d=this.columnWidth,f=this.groupSize;return c-d*f/2-this.spacing*(f-1)/2+this.groupIndex*(this.spacing+d)+.5*d},u.prototype.generateDataLabels=function(c,d){var f=this.parentSeries;this.yAdj=Math.ceil(f.strokeThickness/2),f.pointMarker&&(this.yAdj=Math.max(this.yAdj,Math.ceil(f.pointMarker.height/2))),l.prototype.generateDataLabels.call(this,c,d)},u.prototype.getPosition=function(c,d){var f,h,p,g,v,y,m,b,S,_,C,T,x,A,w,L,k,D,j,N,V,W,K,H,U,I,Q,Z,ee,ie,de,pe,_e=c.isXFlipped?c.index:c.indexEnd-(c.index-c.indexStart),Te=this.topVector.get(_e),De=c.xCoord(),Pe=c.yCoord(),Ee=c.renderPassData.yCoordinateCalculator;c.isVerticalChart?(Pe=this.CalculateShift(Pe),De=Ee.getCoordinate(Te)):(De=this.CalculateShift(De),Pe=Ee.getCoordinate(Te));var Re=d.GetLineBounds(0),je=d.m_fHeight-Re.m_fHeight;Re.delete(),Pe=Pe-je,c.isXFlipped;var Ke=c.isYFlipped?-1:1;return c.isVerticalChart?(this.verticalTextPosition===t.EVerticalTextPosition.Center?Pe+=d.m_fHeight/2:this.verticalTextPosition===t.EVerticalTextPosition.Below?Pe+=d.m_fHeight+((h=(f=this.style.padding)===null||f===void 0?void 0:f.top)!==null&&h!==void 0?h:1):Pe-=(g=(p=this.style.padding)===null||p===void 0?void 0:p.bottom)!==null&&g!==void 0?g:0,this.positionMode===o.EColumnDataLabelPosition.Outside?(c.yVal()*Ke>=0?(De+=this.yAdj,c.isXFlipped?De+=(b=(m=c.style.padding)===null||m===void 0?void 0:m.left)!==null&&b!==void 0?b:1:De-=d.m_fWidth+((y=(v=c.style.padding)===null||v===void 0?void 0:v.right)!==null&&y!==void 0?y:1)):(De-=this.yAdj-((_=(S=c.style.padding)===null||S===void 0?void 0:S.right)!==null&&_!==void 0?_:1),(c.isXFlipped||c.isYFlipped)&&(De-=d.m_fWidth+((T=(C=c.style.padding)===null||C===void 0?void 0:C.left)!==null&&T!==void 0?T:1))),{position:new i.Point(De,Pe),rotationCenter:new i.Point(De,Pe),rotationAngle:0}):this.positionMode===o.EColumnDataLabelPosition.Inside?(c.yVal()*Ke>=0?(De-=this.yAdj+((A=(x=c.style.padding)===null||x===void 0?void 0:x.right)!==null&&A!==void 0?A:1),(c.isXFlipped||c.isYFlipped)&&(De-=d.m_fWidth+((L=(w=c.style.padding)===null||w===void 0?void 0:w.left)!==null&&L!==void 0?L:1))):(De+=this.yAdj+((D=(k=c.style.padding)===null||k===void 0?void 0:k.left)!==null&&D!==void 0?D:1),c.isXFlipped||(De-=d.m_fWidth+((N=(j=c.style.padding)===null||j===void 0?void 0:j.right)!==null&&N!==void 0?N:1))),{position:new i.Point(De,Pe),rotationCenter:new i.Point(De,Pe),rotationAngle:0}):l.prototype.getPosition.call(this,c,d)):(this.horizontalTextPosition===t.EHorizontalTextPosition.Center?De-=d.m_fWidth/2:this.horizontalTextPosition===t.EHorizontalTextPosition.Left?De-=d.m_fWidth+((W=(V=this.style.padding)===null||V===void 0?void 0:V.right)!==null&&W!==void 0?W:0)+d.m_fWidth:De+=(H=(K=this.style.padding)===null||K===void 0?void 0:K.left)!==null&&H!==void 0?H:0+d.m_fWidth,this.positionMode===o.EColumnDataLabelPosition.Outside?(c.yVal()*Ke>=0?Pe-=this.yAdj+((I=(U=c.style.padding)===null||U===void 0?void 0:U.bottom)!==null&&I!==void 0?I:1):Pe+=d.m_fHeight+this.yAdj+((Z=(Q=c.style.padding)===null||Q===void 0?void 0:Q.top)!==null&&Z!==void 0?Z:1),{position:new i.Point(De,Pe),rotationCenter:new i.Point(De,Pe),rotationAngle:0}):this.positionMode===o.EColumnDataLabelPosition.Inside?(c.yVal()*Ke>=0?Pe+=d.m_fHeight+this.yAdj+((ie=(ee=c.style.padding)===null||ee===void 0?void 0:ee.top)!==null&&ie!==void 0?ie:1):Pe-=this.yAdj+((pe=(de=c.style.padding)===null||de===void 0?void 0:de.bottom)!==null&&pe!==void 0?pe:1),{position:new i.Point(De,Pe),rotationCenter:new i.Point(De,Pe),rotationAngle:0}):l.prototype.getPosition.call(this,c,d))},u.prototype.toJSON=function(){var c=l.prototype.toJSON.call(this),d={positionMode:this.positionMode};return Object.assign(c.options,d),c},u})(a.DataLabelProvider);return i0.StackedColumnSeriesDataLabelProvider=s,i0}var Uae;function qPe(){if(Uae)return LE;Uae=1;var r=LE&&LE.__extends||(function(){var c=function(d,f){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(h[g]=p[g])},c(d,f)};return function(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");c(d,f);function h(){this.constructor=d}d.prototype=f===null?Object.create(f):(h.prototype=f.prototype,new h)}})();Object.defineProperty(LE,"__esModule",{value:!0}),LE.StackedColumnRenderableSeries=void 0;var e=tn(),i=gs(),n=ln(),t=mU(),o=Ji(),a=YPe(),s=$Pe(),l=KV(),u=(function(c){r(d,c);function d(f,h){var p=this,g,v,y,m,b,S,_,C,T,x;return p=c.call(this,f,h)||this,p.type=e.ESeriesType.StackedColumnSeries,p.fillProperty="#7e8486",p.spacingProperty=0,p.stackedGroupIdProperty="default",p.getGroupIndex=p.getGroupIndex.bind(p),p.getGroupsCount=p.getGroupsCount.bind(p),p.getColumnWidth=p.getColumnWidth.bind(p),p.isOneHundredPercent=(v=(g=p.parentCollection)===null||g===void 0?void 0:g.isOneHundredPercent)!==null&&v!==void 0?v:!1,p.fill=(y=h==null?void 0:h.fill)!==null&&y!==void 0?y:p.fillProperty,p.stroke=(m=h==null?void 0:h.stroke)!==null&&m!==void 0?m:n.SciChartSurfaceBase.DEFAULT_THEME.mountainLineColor,p.strokeThickness=(b=h==null?void 0:h.strokeThickness)!==null&&b!==void 0?b:1,p.spacingProperty=(S=h==null?void 0:h.spacing)!==null&&S!==void 0?S:p.spacingProperty,p.stackedGroupIdProperty=(_=h==null?void 0:h.stackedGroupId)!==null&&_!==void 0?_:p.stackedGroupIdProperty,p.fillLinearGradientProperty=(C=h==null?void 0:h.fillLinearGradient)!==null&&C!==void 0?C:p.fillLinearGradientProperty,p.customTextureOptionsProperty=h==null?void 0:h.customTextureOptions,p.dataLabelProviderProperty||(p.dataLabelProviderProperty=new s.StackedColumnSeriesDataLabelProvider(h==null?void 0:h.dataLabels),p.dataLabelProviderProperty.onAttach(p.webAssemblyContext,p)),!((T=p.paletteProvider)===null||T===void 0)&&T.onAttached&&((x=p.paletteProvider)===null||x===void 0||x.onAttached(p)),p}return d.prototype.addDrawingProviders=function(f,h){this.drawingProviders.push(new l.StackedColumnSeriesDrawingProvider(f,this))},d.prototype.delete=function(){c.prototype.delete.call(this)},d.prototype.onAttachToParentCollection=function(f,h,p,g){if(this.parentCollection)throw new Error("Invalid operation in StackedColumnRenderableSeries.onAttachToParentCollection, this series has been already attached to collection. Please detach it from the collection before attaching to another");this.parentCollection=f,this.getParentSurfaceFn=h,this.notifyParentPropertyChangedFn=p,this.getColumnWidthFn=g},d.prototype.getGroupIndex=function(){return this.groupIndex},d.prototype.setGroupIndex=function(f){this.groupIndex=f},d.prototype.getGroupsCount=function(){return this.groupsCount},d.prototype.setGroupsCount=function(f){this.groupsCount=f},d.prototype.getColumnWidth=function(f){return this.getColumnWidthFn(f)},d.prototype.onDpiChanged=function(f){this.notifyPropertyChanged(o.PROPERTY.STROKE)},Object.defineProperty(d.prototype,"fill",{get:function(){return(0,i.stripAutoColor)(this.fillProperty)},set:function(f){this.fillProperty=f,this.notifyPropertyChanged(o.PROPERTY.FILL)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"effect",{get:function(){},set:function(f){},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"spacing",{get:function(){return this.spacingProperty},set:function(f){this.spacingProperty=f,this.notifyPropertyChanged(o.PROPERTY.SPACING)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"stackedGroupId",{get:function(){return this.stackedGroupIdProperty},set:function(f){this.stackedGroupIdProperty=f,this.notifyPropertyChanged(o.PROPERTY.STACKED_GROUP_ID)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"fillLinearGradient",{get:function(){return this.fillLinearGradientProperty},set:function(f){f!==this.fillLinearGradientProperty&&(this.fillLinearGradientProperty=f,this.notifyPropertyChanged(o.PROPERTY.FILL_LINEAR_GRADIENT))},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"customTextureOptions",{get:function(){return this.customTextureOptionsProperty},set:function(f){f!==this.customTextureOptionsProperty&&(this.customTextureOptionsProperty=f,this.notifyPropertyChanged(o.PROPERTY.CUSTOM_TEXTURE_OPTIONS))},enumerable:!1,configurable:!0}),d.prototype.draw=function(f,h){var p=this,g,v=(g=this.parentSurface)===null||g===void 0?void 0:g.seriesViewRect;this.drawingProviders.forEach(function(y){var m;if(!((m=p.xAxis)===null||m===void 0)&&m.isVerticalChart&&v&&f.setTranslationRotationAndClip(v,v.x,v.y),p.renderDataTransform&&p.renderDataTransform.drawingProviders.includes(y)){var b=p.renderDataTransform.runTransform(h);y.draw(f,b)}else y.draw(f,h)})},d.prototype.toJSON=function(f){f===void 0&&(f=!1);var h=c.prototype.toJSON.call(this,f),p={fill:this.fill,stroke:this.stroke,strokeThickness:this.strokeThickness,spacing:this.spacing,stackedGroupId:this.stackedGroupId,fillLinearGradient:this.fillLinearGradient};return Object.assign(h.options,p),h},d.prototype.resolveAutoColors=function(f,h,p){if(c.prototype.resolveAutoColors.call(this,f,h,p),this.fillProperty.startsWith(i.AUTO_COLOR)){var g=p.getFillColor(f,h,this.webAssemblyContext);this.fill=i.AUTO_COLOR+this.adjustAutoColor("fill",g)}},d.prototype.newHitTestProvider=function(){return new a.StackedColumnSeriesHitTestProvider(this,this.webAssemblyContext)},d})(t.BaseStackedRenderableSeries);return LE.StackedColumnRenderableSeries=u,LE}var u2={},IE={},zae;function XPe(){if(zae)return IE;zae=1;var r=IE&&IE.__extends||(function(){var h=function(p,g){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var m in y)Object.prototype.hasOwnProperty.call(y,m)&&(v[m]=y[m])},h(p,g)};return function(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");h(p,g);function v(){this.constructor=p}p.prototype=g===null?Object.create(g):(v.prototype=g.prototype,new v)}})();Object.defineProperty(IE,"__esModule",{value:!0}),IE.UniformContoursDrawingProvider=void 0;var e=So(),i=Mr(),n=ni(),t=vn(),o=mi(),a=$H(),s=Xi(),l=B1(),u=HM(),c=Ji(),d=vl(),f=(function(h){r(p,h);function p(g,v){var y=h.call(this,g,v)||this;return y.heightsTextureCache=new a.TextureCache(g),y.onSeriesPropertyChange(c.PROPERTY.DATA_SERIES),y.onSeriesPropertyChange(c.PROPERTY.COLOR_MAP),y}return p.prototype.delete=function(){this.heightsTextureCache=(0,i.deleteSafe)(this.heightsTextureCache),this.heightData=(0,i.deleteSafe)(this.heightData),this.paletteTexture=(0,i.deleteSafe)(this.paletteTexture),h.prototype.delete.call(this)},p.prototype.onSeriesPropertyChange=function(g){var v=g===c.PROPERTY.COLOR_MAP||g.includes(u.COLOR_MAP_PREFIX),y=g===c.PROPERTY.DATA_SERIES;if(v&&(this.paletteTexture=(0,i.deleteSafe)(this.paletteTexture),this.parentSeries.colorMap&&this.parentSeries.colorMap.gradientStops?this.paletteTexture=this.createPaletteTexture(256,1,this.parentSeries.colorMap.gradientStops):this.paletteTexture=this.createPaletteTexture(256,1,void 0)),y){var m=this.parentSeries.dataSeries;if(m){var b=this.heightsTextureCache.create(m.arrayWidth,m.arrayHeight,this.webAssemblyContext.eTSRTextureFormat.TSR_TEXTUREFORMAT_R32F);this.webAssemblyContext.SCRTSetTextureLinearSamplerEnabled(b,!0)}}},p.prototype.draw=function(g,v){var y=this,m,b,S=(m=this.heightsTextureCache)===null||m===void 0?void 0:m.value;if(S){var _=this.parentSeries.dataSeries;this.webAssemblyContext.SCRTFillTextureFloat32(S,_.arrayWidth,_.arrayHeight,_.getNormalizedVector((b=this.parentSeries.colorMap)!==null&&b!==void 0?b:this.getDefaultColorMap(_)));var C=this.parentSeries.getContourDrawingParams(),T=v.isVerticalChart,x=v.xCoordinateCalculator.getCoordinate(C.xMin),A=v.yCoordinateCalculator.getCoordinate(C.yMin),w=v.xCoordinateCalculator.getCoordinate(C.xMax),L=v.yCoordinateCalculator.getCoordinate(C.yMax),k=Math.abs(x-w),D=function(){y.parentSeries.minorsPerMajor>0&&y.drawContours(g,x,A,w,L,C.zMin,C.zMax,C.zOffset,C.minorStepZ,C.minorLineStyle,C.dataZRange),y.drawContours(g,x,A,w,L,C.zMin,C.zMax,C.zOffset,C.majorStepZ,C.majorLineStyle,C.dataZRange)};if(T){var j=!v.xCoordinateCalculator.hasFlippedCoordinates,N=this.parentSeries.parentSurface.seriesViewRect,V=t.Rect.intersect(this.parentSeries.parentSurface.clipRect,N);g.setTranslationRotationAndClip(V,N.x,N.y+k+(j?w:x),-90),w=j?k:0,x=j?0:k,D()}else D()}},p.prototype.drawContours=function(g,v,y,m,b,S,_,C,T,x,A){var w=(0,s.getVector4)(this.webAssemblyContext,0,1,0,0),L=new this.webAssemblyContext.SCRTContourParams,k=_-S,D=C/k,j=(0,o.parseColorToTArgb)(x.color);L.SetColorVector(j.red/255,j.green/255,j.blue/255,j.opacity/255);var N=A.diff/T;L.SetParamsAVector(x.strokeThickness,N,-D,0);var V=(S-A.min)/A.diff,W=(_-A.min)/A.diff;L.SetParamsBVector(V,W,0,0);var K=g.getNativeContext(),H=this.heightsTextureCache.value,U=(0,s.getVectorColorTextureVertex)(this.webAssemblyContext),I=(0,s.getTextureVertex)(this.webAssemblyContext,v,y,e.NEUTRAL_COLOR,0,0);U.push_back(I);var Q=(0,s.getTextureVertex)(this.webAssemblyContext,m,y,e.NEUTRAL_COLOR,1,0);U.push_back(Q);var Z=(0,s.getTextureVertex)(this.webAssemblyContext,v,b,e.NEUTRAL_COLOR,0,1);U.push_back(Z);var ee=(0,s.getTextureVertex)(this.webAssemblyContext,m,b,e.NEUTRAL_COLOR,1,1);U.push_back(ee);var ie=new this.webAssemblyContext.SCRTDrawPrimitivesParams;ie.SetVerticesVec(U),ie.SetHeightMapTexture(H),ie.m_vPackedFloatParams=w,ie.SetContourParams(L),ie.m_Effect=this.webAssemblyContext.SCRTPrimitivesEffect.Heatmap,K.DrawPrimitives(ie),ie.delete(),L.delete()},p.prototype.computeHeightMap=function(g,v,y,m,b,S){var _,C=g*v;((_=this.heightData)===null||_===void 0?void 0:_.size())!==C&&(this.heightData=(0,i.deleteSafe)(this.heightData),this.heightData=new this.webAssemblyContext.FloatVector,this.heightData.resize(C,0));for(var T=0;T<g;T++)for(var x=0;x<v;x++){var A=m?y[S?x:v-1-x][b?g-T-1:T]:y[S?T:g-1-T][b?v-x-1:x];this.heightData.set(T*v+x,isNaN(A)?-1:A)}return this.heightData},p.prototype.createPaletteTexture=function(g,v,y){if(!e.IS_TEST_ENV){n.Guard.isTrue(g>0,"width must be greater than 0"),n.Guard.isTrue(v>0,"height must be greater than 0");var m=new l.CanvasTexture(this.webAssemblyContext,g,v);m.clear();var b=m.getContext(),S=0,_=0,C=g,T=0;if(y){var x=b.createLinearGradient(S,_,C,T);y.forEach(function(A){x.addColorStop(A.offset,A.color)}),b.fillStyle=x}else b.fillStyle="black";return b.fillRect(0,0,g,v),m.copyTexture(),m}},p.prototype.getDefaultColorMap=function(g){var v=g.zRange;return{minimum:v.min,maximum:v.max}},p})(d.BaseSeriesDrawingProvider);return IE.UniformContoursDrawingProvider=f,IE}var NE={},Wae;function yX(){if(Wae)return NE;Wae=1;var r=NE&&NE.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(u[d]=c[d])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})();Object.defineProperty(NE,"__esModule",{value:!0}),NE.UniformHeatmapHitTestProvider=void 0;var e=Ii(),i=Js(),n=Rs(),t=vs(),o=(function(a){r(s,a);function s(){return a!==null&&a.apply(this,arguments)||this}return s.prototype.hitTest=function(l,u){var c=this.getTranslatedHitTestPoint(l,u);if(!c)return t.HitTestInfo.empty();var d=this.currentRenderPassData,f=d.xCoordinateCalculator,h=d.yCoordinateCalculator,p=d.isVerticalChart,g=p?c.y:c.x,v=p?c.x:c.y,y=this.parentSeries.dataSeries;if(!y)return t.HitTestInfo.empty();var m=n.hitTestHelpers.getNearestUniformHeatmapPoint(f,h,y,g,v),b=m.xIndex,S=m.yIndex,_=m.zValue,C=new t.HitTestInfo(this.parentSeries);C.seriesName=this.parentSeries.seriesName,C.dataSeriesType=y.type,C.hitTestPoint=new e.Point(g,v);var T=f.getDataValue(g),x=h.getDataValue(v);return C.hitTestPointValues=new e.Point(T,x),C.xValue=T,C.yValue=x,C.heatmapXIndex=b,C.heatmapYIndex=S,C.zValue=_,C.heatmapValue=_,C.xCoord=g,C.yCoord=v,C.isHit=b!==-1&&S!==-1,C.isWithinDataBounds=C.isHit,b!==-1&&S!==-1&&(C.metadata=y.getMetadataAt(S,b)),C},s.prototype.hitTestDataPoint=function(l,u){return this.hitTest(l,u)},s.prototype.hitTestXSlice=function(l,u){return this.hitTest(l,u)},s})(i.BaseHitTestProvider);return NE.UniformHeatmapHitTestProvider=o,NE}var Gae;function PY(){return Gae||(Gae=1,(function(r){var e=u2&&u2.__extends||(function(){var g=function(v,y){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,b){m.__proto__=b}||function(m,b){for(var S in b)Object.prototype.hasOwnProperty.call(b,S)&&(m[S]=b[S])},g(v,y)};return function(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");g(v,y);function m(){this.constructor=v}v.prototype=y===null?Object.create(y):(m.prototype=y.prototype,new m)}})();Object.defineProperty(r,"__esModule",{value:!0}),r.UniformContoursRenderableSeries=r.EContourColorMapMode=r.COLOR_MAP_PREFIX=void 0;var i=Jn(),n=Mr(),t=$o(),o=tn(),a=Oh(),s=sy(),l=Gl(),u=Ji(),c=lX(),d=XPe(),f=yU(),h=yX();r.COLOR_MAP_PREFIX="colorMap.",(function(g){g.AlternateColors="AlternateColors",g.GradientColors="GradientColors"})(r.EContourColorMapMode||(r.EContourColorMapMode={}));var p=(function(g){e(v,g);function v(y,m){var b=this,S,_,C,T;return b=g.call(this,y,m)||this,b.type=o.ESeriesType.UniformContoursSeries,b.colorMapPropertyChanged=b.colorMapPropertyChanged.bind(b),m!=null&&m.colorMap&&("toJSON"in m.colorMap||(m.colorMap=new f.HeatmapColorMap(m.colorMap))),b.colorMap=m==null?void 0:m.colorMap,b.dataSeries=m==null?void 0:m.dataSeries,b.xAxisId=m==null?void 0:m.xAxisId,b.yAxisId=m==null?void 0:m.yAxisId,b.zMin=m==null?void 0:m.zMin,b.zMax=m==null?void 0:m.zMax,b.zStep=(m==null?void 0:m.zStep)||NaN,b.xOffsetProperty=(S=m==null?void 0:m.zOffset)!==null&&S!==void 0?S:0,b.majorLineStyle=(m==null?void 0:m.majorLineStyle)||v.DEFAULT_MAJOR_LINE_STYLE,b.minorLineStyle=(m==null?void 0:m.minorLineStyle)||v.DEFAULT_MINOR_LINE_STYLE,b.minorsPerMajor=(m==null?void 0:m.minorsPerMajor)||0,b.majorLineStyleProperty=m==null?void 0:m.majorLineStyle,b.minorLineStyleProperty=m==null?void 0:m.minorLineStyle,m!=null&&m.zLabelProvider&&("getLabels"in(m==null?void 0:m.zLabelProvider)||(m.zLabelProvider=(0,i.createType)(t.EBaseType.LabelProvider,m.zLabelProvider.type,y,m.zLabelProvider.options))),b.zLabelProviderProperty=(_=m==null?void 0:m.zLabelProvider)!==null&&_!==void 0?_:new s.NumericLabelProvider({labelPrecision:2}),!((C=b.paletteProvider)===null||C===void 0)&&C.onAttached&&((T=b.paletteProvider)===null||T===void 0||T.onAttached(b)),b.dataLabelProviderProperty||(b.dataLabelProviderProperty=new c.ContoursDataLabelProvider(m==null?void 0:m.dataLabels),b.dataLabelProviderProperty.onAttach(b.webAssemblyContext,b)),b.drawingProviders=[],b.drawingProviders.push(new d.UniformContoursDrawingProvider(y,b)),b}return Object.defineProperty(v.prototype,"zMin",{get:function(){return this.zMinProperty},set:function(y){this.zMinProperty=y,this.notifyPropertyChanged(u.PROPERTY.Z_MIN)},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"zMax",{get:function(){return this.zMaxProperty},set:function(y){this.zMaxProperty=y,this.notifyPropertyChanged(u.PROPERTY.Z_MAX)},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"zStep",{get:function(){return this.zStepProperty},set:function(y){this.zStepProperty=y,this.notifyPropertyChanged(u.PROPERTY.Z_STEP)},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"zOffset",{get:function(){return this.xOffsetProperty},set:function(y){this.xOffsetProperty=y,this.notifyPropertyChanged(u.PROPERTY.Z_OFFSET)},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"colorMap",{get:function(){return this.colorMapProperty},set:function(y){var m,b;(m=this.colorMapProperty)===null||m===void 0||m.propertyChanged.unsubscribe(this.colorMapPropertyChanged),this.colorMapProperty=y,(b=this.colorMapProperty)===null||b===void 0||b.propertyChanged.subscribe(this.colorMapPropertyChanged),this.notifyPropertyChanged(u.PROPERTY.COLOR_MAP)},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"colorMapMode",{get:function(){return this.colorMapModeProperty},set:function(y){this.colorMapModeProperty=y,this.notifyPropertyChanged(u.PROPERTY.CONTOUR_COLOR_MAP_MODE)},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"zLabelProvider",{get:function(){return this.zLabelProviderProperty},set:function(y){this.zLabelProviderProperty=y,this.notifyPropertyChanged(u.PROPERTY.Z_LABEL_PROVIDER)},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"majorLineStyle",{get:function(){return this.majorLineStyleProperty},set:function(y){this.majorLineStyleProperty=y,this.notifyPropertyChanged(u.PROPERTY.CONTOUR_MAJOR_LINE_STYLE)},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"minorLineStyle",{get:function(){return this.minorLineStyleProperty},set:function(y){this.minorLineStyleProperty=y,this.notifyPropertyChanged(u.PROPERTY.CONTOUR_MINOR_LINE_STYLE)},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"minorsPerMajor",{get:function(){return this.minorsPerMajorProperty},set:function(y){this.minorsPerMajorProperty=y,this.notifyPropertyChanged(u.PROPERTY.CONTOUR_MINORS_PER_MAJOR)},enumerable:!1,configurable:!0}),v.prototype.getContourDrawingParams=function(){var y,m,b=this.dataSeries,S=b.zRange,_=this.zMin&&(0,a.isRealNumber)(this.zMin)?this.zMin:S.min,C=this.zMax&&(0,a.isRealNumber)(this.zMax)?this.zMax:S.max;_=Math.max(_,S.min),C=Math.min(C,S.max);var T=this.zStep&&(0,a.isRealNumber)(this.zStep)?this.zStep:Math.abs(C-_)/v.DEFAULT_CONTOURS_COUNT,x=this.minorsPerMajor&&this.minorsPerMajor>0?T/(this.minorsPerMajor+1):T,A=(y=this.minorLineStyle)!==null&&y!==void 0?y:{strokeThickness:this.strokeThickness,color:this.stroke},w=(m=this.majorLineStyle)!==null&&m!==void 0?m:{strokeThickness:this.strokeThickness,color:this.stroke},L=this.zOffset,k={xMax:b.xMax,yMin:b.yMin,yMax:b.yMax,xMin:b.xMin,zMin:_,zMax:C,majorStepZ:T,minorStepZ:x,minorLineStyle:A,majorLineStyle:w,zOffset:L,dataZRange:S};return k},v.prototype.toPointSeries=function(y){},v.prototype.delete=function(){g.prototype.delete.call(this),this.zLabelProviderProperty=(0,n.deleteSafe)(this.zLabelProviderProperty)},v.prototype.toJSON=function(y){var m,b;y===void 0&&(y=!1);var S=g.prototype.toJSON.call(this,y),_={colorMap:(m=this.colorMap)===null||m===void 0?void 0:m.toJSON(),majorLineStyle:this.majorLineStyle,minorLineStyle:this.minorLineStyle,zOffset:this.zOffset,zStep:this.zStep,zMax:this.zMax,zMin:this.zMin,minorsPerMajor:this.minorsPerMajor,zLabelProvider:(b=this.zLabelProvider)===null||b===void 0?void 0:b.toJSON()};return Object.assign(S.options,_),S},v.prototype.colorMapPropertyChanged=function(y){this.notifyPropertyChanged(r.COLOR_MAP_PREFIX+y.propertyName)},v.prototype.newHitTestProvider=function(){return new h.UniformHeatmapHitTestProvider(this,this.webAssemblyContext)},v.DEFAULT_CONTOURS_COUNT=15,v.DEFAULT_MAJOR_LINE_STYLE={strokeThickness:2,color:"white"},v.DEFAULT_MINOR_LINE_STYLE={strokeThickness:1,color:"white"},v})(l.BaseRenderableSeries);r.UniformContoursRenderableSeries=p})(u2)),u2}var FE={},jE={},Yae;function mX(){if(Yae)return jE;Yae=1;var r=jE&&jE.__extends||(function(){var f=function(h,p){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,v){g.__proto__=v}||function(g,v){for(var y in v)Object.prototype.hasOwnProperty.call(v,y)&&(g[y]=v[y])},f(h,p)};return function(h,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");f(h,p);function g(){this.constructor=h}h.prototype=p===null?Object.create(p):(g.prototype=p.prototype,new g)}})();Object.defineProperty(jE,"__esModule",{value:!0}),jE.UniformHeatmapDrawingProvider=void 0;var e=So(),i=Mr(),n=ni(),t=vn(),o=$H(),a=B1(),s=HM(),l=Ji(),u=vl(),c=Xi(),d=(function(f){r(h,f);function h(p,g){var v=f.call(this,p,g)||this;return v.heatTextureCache=new o.TextureCache(p),v.recreatePalette(),v.onSeriesPropertyChange(l.PROPERTY.DATA_SERIES),v.onSeriesPropertyChange(l.PROPERTY.COLOR_MAP),v}return h.prototype.delete=function(){this.paletteTexture=(0,i.deleteSafe)(this.paletteTexture),this.heatTextureCache=(0,i.deleteSafe)(this.heatTextureCache),f.prototype.delete.call(this)},h.prototype.onSeriesPropertyChange=function(p){var g=p===l.PROPERTY.COLOR_MAP||p.includes(s.COLOR_MAP_PREFIX)||p===l.PROPERTY.OPACITY,v=p===l.PROPERTY.DATA_SERIES||p===l.PROPERTY.USE_LINEAR_TEXTURE_FILTERING;if(g&&this.recreatePalette(),v){var y=this.parentSeries.dataSeries,m=this.parentSeries,b=m.useLinearTextureFiltering;if(y){var S=this.heatTextureCache.create(y.arrayWidth,y.arrayHeight,this.webAssemblyContext.eTSRTextureFormat.TSR_TEXTUREFORMAT_R32F);this.webAssemblyContext.SCRTSetTextureLinearSamplerEnabled(S,b)}}},h.prototype.draw=function(p,g){var v,y=g.isVerticalChart,m=!g.xCoordinateCalculator.hasFlippedCoordinates;g.yCoordinateCalculator.hasFlippedCoordinates;var b=(v=this.heatTextureCache)===null||v===void 0?void 0:v.value;if(b){var S=this.parentSeries.dataSeries,_=S.getNormalizedVector(this.parentSeries.colorMap,this.parentSeries.fillValuesOutOfRange);this.packedFloatParams=this.webAssemblyContext.SCRTFillTextureFloat32(b,S.arrayWidth,S.arrayHeight,_),this.packedFloatParams.x=0,this.packedFloatParams.y=1;var C=S.xRange,T=S.yRange,x=g.xCoordinateCalculator.getCoordinate(C.min),A=g.yCoordinateCalculator.getCoordinate(T.min),w=g.xCoordinateCalculator.getCoordinate(C.max),L=g.yCoordinateCalculator.getCoordinate(T.max),k=p.getNativeContext(),D=Math.abs(x-w);if(y){var j=this.parentSeries.parentSurface.seriesViewRect,N=t.Rect.intersect(this.parentSeries.parentSurface.clipRect,j);p.setTranslationRotationAndClip(N,j.x,j.y+D+(m?w:x),-90);var V=m?0:D,W=m?D:0,K=A,H=L;this.drawHeatmap(k,V,K,W,H)}else this.drawHeatmap(k,x,A,w,L)}},h.prototype.seriesHasDataChanges=function(){this.onSeriesPropertyChange(l.PROPERTY.DATA_SERIES)},h.prototype.createPaletteTexture=function(p,g,v,y,m){if(!e.IS_TEST_ENV){n.Guard.isTrue(p>0,"width must be greater than 0"),n.Guard.isTrue(g>0,"height must be greater than 0"),n.Guard.notNull(v,"gradientStops");var b=new a.CanvasTexture(this.webAssemblyContext,p,g);b.clear();var S=b.getContext();m&&(S.fillStyle="#ffffff00",S.fillRect(0,0,1,g));var _=0,C=0,T=p,x=0,A=S.createLinearGradient(_,C,T,x);v.forEach(function(L){A.addColorStop(L.offset,L.color)}),S.fillStyle=A,S.globalAlpha=y;var w=m?1:0;return S.fillRect(w,0,p,g),b.copyTexture(),b}},h.prototype.recreatePalette=function(){var p,g,v=(p=this.parentSeries.dataSeries)===null||p===void 0?void 0:p.hasNaNs;this.hasNaNs===v&&this.opacity===this.parentSeries.opacity&&this.gradientStops===((g=this.parentSeries.colorMap)===null||g===void 0?void 0:g.gradientStops)||(this.paletteTexture=(0,i.deleteSafe)(this.paletteTexture),this.parentSeries.colorMap&&this.parentSeries.colorMap.gradientStops&&(this.hasNaNs=v,this.opacity=this.parentSeries.opacity,this.gradientStops=this.parentSeries.colorMap.gradientStops,this.paletteTexture=this.createPaletteTexture(256,1,this.parentSeries.colorMap.gradientStops,this.parentSeries.opacity,v)))},h.prototype.drawHeatmap=function(p,g,v,y,m){var b=this.packedFloatParams,S=new this.webAssemblyContext.SCRTContourParams,_=this.heatTextureCache.value;this.recreatePalette();var C=(0,c.getVectorColorTextureVertex)(this.webAssemblyContext),T=(0,c.getTextureVertex)(this.webAssemblyContext,g,v,e.NEUTRAL_COLOR,0,0);C.push_back(T);var x=(0,c.getTextureVertex)(this.webAssemblyContext,y,v,e.NEUTRAL_COLOR,1,0);C.push_back(x);var A=(0,c.getTextureVertex)(this.webAssemblyContext,g,m,e.NEUTRAL_COLOR,0,1);C.push_back(A);var w=(0,c.getTextureVertex)(this.webAssemblyContext,y,m,e.NEUTRAL_COLOR,1,1);C.push_back(w);var L=new this.webAssemblyContext.SCRTDrawPrimitivesParams;L.SetVerticesVec(C),L.SetGradientTexture(this.paletteTexture.getTexture()),L.SetHeightMapTexture(_),L.m_vPackedFloatParams=b,L.SetContourParams(S),L.m_Effect=this.webAssemblyContext.SCRTPrimitivesEffect.Heatmap,p.DrawPrimitives(L),S.delete(),L.delete(),b.delete()},h})(u.BaseSeriesDrawingProvider);return jE.UniformHeatmapDrawingProvider=d,jE}var $ae;function SU(){if($ae)return FE;$ae=1;var r=FE&&FE.__extends||(function(){var l=function(u,c){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(d[h]=f[h])},l(u,c)};return function(u,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");l(u,c);function d(){this.constructor=u}u.prototype=c===null?Object.create(c):(d.prototype=c.prototype,new d)}})();Object.defineProperty(FE,"__esModule",{value:!0}),FE.UniformHeatmapRenderableSeries=void 0;var e=So(),i=tn(),n=HM(),t=rj(),o=mX(),a=yX(),s=(function(l){r(u,l);function u(c,d){var f=l.call(this,c,d)||this;return f.type=i.ESeriesType.UniformHeatmapSeries,f.dataLabelProviderProperty||(f.dataLabelProviderProperty=new t.HeatMapDataLabelProvider(d==null?void 0:d.dataLabels),f.dataLabelProviderProperty.onAttach(f.webAssemblyContext,f)),f}return u.prototype.addDrawingProviders=function(c,d){e.IS_TEST_ENV||this.drawingProviders.push(new o.UniformHeatmapDrawingProvider(c,this))},u.prototype.newHitTestProvider=function(){return new a.UniformHeatmapHitTestProvider(this,this.webAssemblyContext)},u})(n.BaseHeatmapRenderableSeries);return FE.UniformHeatmapRenderableSeries=s,FE}var BE={},VE={},qae;function KPe(){if(qae)return VE;qae=1;var r=VE&&VE.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(u[d]=c[d])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})();Object.defineProperty(VE,"__esModule",{value:!0}),VE.ScatterSeriesHitTestProvider=void 0;var e=oo(),i=Js(),n=Rs(),t=vs(),o=(function(a){r(s,a);function s(){return a!==null&&a.apply(this,arguments)||this}return s.prototype.hitTest=function(l,u,c){c===void 0&&(c=0);var d=this.getTranslatedHitTestPoint(l,u);if(!d)return t.HitTestInfo.empty();var f=this.currentRenderPassData,h=f.xCoordinateCalculator,p=f.yCoordinateCalculator,g=f.isVerticalChart,v=g?d.y:d.x,y=g?d.x:d.y,m=this.parentSeries.dataSeries;if(!m)return t.HitTestInfo.empty();var b=n.hitTestHelpers.getNearestXyPoint(this.webAssemblyContext,h,p,m,v,y,c),S=m.getNativeXValues(),_=m.getNativeYValues(),C=n.hitTestHelpers.createHitTestInfo(this.parentSeries,h,p,g,m,S,_,v,y,b.nearestPointIndex,c);if(b.nearestPointIndex>=0){var T=this.parentSeries.pointMarker,x=T.width,A=T.height,w=h.isCategoryCoordinateCalculator,L=w?0:S.get(0),k=h.getCoordinate(L),D=w?S.size()-1:S.get(S.size()-1),j=h.getCoordinate(D);C.isWithinDataBounds=(0,e.testIsInInterval)(v,k,j,x/2),C.isHit=(0,e.testIsInBounds)(v,y,C.xCoord-x/2-c,C.yCoord+A/2+c,C.xCoord+x/2+c,C.yCoord-A/2-c)}else C.isHit=!1;return C},s.prototype.hitTestXSlice=function(l,u){var c=this.getTranslatedHitTestPoint(l,u);if(!c)return t.HitTestInfo.empty();var d=this.currentRenderPassData,f=d.xCoordinateCalculator,h=d.yCoordinateCalculator,p=d.isVerticalChart,g=p?c.y:c.x,v=p?c.x:c.y,y=this.parentSeries.dataSeries;if(!y)return t.HitTestInfo.empty();var m=y.getNativeXValues(),b=y.getNativeYValues(),S=n.hitTestHelpers.getNearestXPoint(this.webAssemblyContext,f,y,g,y.dataDistributionCalculator.isSortedAscending),_=n.hitTestHelpers.createHitTestInfo(this.parentSeries,f,h,p,y,m,b,g,v,S,0);if(S>=0){var C=this.parentSeries.pointMarker.width,T=f.isCategoryCoordinateCalculator,x=void 0,A=void 0;if(y.dataDistributionCalculator.isSortedAscending){var w=T?0:m.get(0);x=f.getCoordinate(w);var L=T?m.size()-1:m.get(m.size()-1);A=f.getCoordinate(L)}else{var k=y.getXRange();x=f.getCoordinate(k.min),A=f.getCoordinate(k.max)}_.isWithinDataBounds=(0,e.testIsInInterval)(g,x,A,C/2),_.isHit=_.isWithinDataBounds}else _.isHit=!1;return _},s})(i.BaseHitTestProvider);return VE.ScatterSeriesHitTestProvider=o,VE}var Xae;function bX(){if(Xae)return BE;Xae=1;var r=BE&&BE.__extends||(function(){var c=function(d,f){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(h[g]=p[g])},c(d,f)};return function(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");c(d,f);function h(){this.constructor=d}d.prototype=f===null?Object.create(f):(h.prototype=f.prototype,new h)}})();Object.defineProperty(BE,"__esModule",{value:!0}),BE.XyScatterRenderableSeries=void 0;var e=tn(),i=oy(),n=DM(),t=Gl(),o=Ji(),a=Mg(),s=$d(),l=KPe(),u=(function(c){r(d,c);function d(f,h){var p=this,g,v,y;return p=c.call(this,f,h)||this,p.type=e.ESeriesType.ScatterSeries,p.scatterOpacityProperty=1,p.pointMarker||(p.pointMarker=new n.EllipsePointMarker(f,{width:10,height:10})),h!=null&&h.animation&&p.animationQueue.push(h.animation),p.dataLabelProviderProperty||(p.dataLabelProviderProperty=new a.DataLabelProvider(h==null?void 0:h.dataLabels),p.dataLabelProviderProperty.onAttach(p.webAssemblyContext,p)),!((g=p.paletteProvider)===null||g===void 0)&&g.onAttached&&((v=p.paletteProvider)===null||v===void 0||v.onAttached(p)),p.scatterOpacityProperty=(y=h==null?void 0:h.opacity)!==null&&y!==void 0?y:p.scatterOpacityProperty,p}return d.prototype.addDrawingProviders=function(f,h){this.drawingProviders.push(new s.PointMarkerDrawingProvider(f,this))},d.prototype.needsResampling=function(f){return this.dataSeries.fifoCapacity?(f.resamplingMode=i.EResamplingMode.None,this.resamplerHelper.resetAndFillBasicNativeArgs(f,this.getNativeXValues()),!0):!1},d.prototype.newHitTestProvider=function(){return new l.ScatterSeriesHitTestProvider(this,this.webAssemblyContext)},Object.defineProperty(d.prototype,"opacity",{get:function(){return this.scatterOpacityProperty},set:function(f){this.scatterOpacityProperty=f,this.notifyPropertyChanged(o.PROPERTY.OPACITY),this.pointMarker&&(this.pointMarker.opacity=f,this.notifyPropertyChanged(o.PROPERTY.POINT_MARKER))},enumerable:!1,configurable:!0}),d})(t.BaseRenderableSeries);return BE.XyScatterRenderableSeries=u,BE}var HE={},UE={},Kae;function ZPe(){if(Kae)return UE;Kae=1;var r=UE&&UE.__extends||(function(){var l=function(u,c){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(d[h]=f[h])},l(u,c)};return function(u,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");l(u,c);function d(){this.constructor=u}u.prototype=c===null?Object.create(c):(d.prototype=c.prototype,new d)}})();Object.defineProperty(UE,"__esModule",{value:!0}),UE.LineSegmentSeriesDrawingProvider=void 0;var e=Mr(),i=xo(),n=ts(),t=ki(),o=Ji(),a=vl(),s=(function(l){r(u,l);function u(c,d,f,h){var p=l.call(this,c,d,f,h)||this;return p.linesPenCache=new n.Pen2DCache(c),p.args=new c.SCRTLineDrawingParams,p}return u.prototype.onDpiChanged=function(c){l.prototype.onDpiChanged.call(this,c),this.onSeriesPropertyChange(o.PROPERTY.STROKE)},u.prototype.onSeriesPropertyChange=function(c){if(l.prototype.onSeriesPropertyChange.call(this,c),c===o.PROPERTY.PALETTE_PROVIDER&&this.linesPenCache.invalidateCache(),c===o.PROPERTY.STROKE||c===o.PROPERTY.STROKE_THICKNESS||c===o.PROPERTY.PALETTE_PROVIDER||c===o.PROPERTY.OPACITY||c===o.PROPERTY.STROKE_DASH_ARRAY){this.palettingState.requiresUpdate=!0;var d=this.getProperties(this.parentSeries),f=d.stroke,h=d.strokeThickness,p=d.opacity,g=d.strokeDashArray;f&&(0,n.createPenInCache)(this.linesPenCache,f,h,p??1,g,!0)}},u.prototype.getProperties=function(c){var d,f=c.stroke,h=c.strokeThickness,p=c.opacity,g=c.strokeDashArray,v=c.dataSeries;return{stroke:f,strokeThickness:h,opacity:p,strokeDashArray:g,dataSeriesType:(d=v==null?void 0:v.type)!==null&&d!==void 0?d:t.EDataSeriesType.Xy}},u.prototype.onAttachSeries=function(){l.prototype.onAttachSeries.call(this),this.nativeDrawingProvider=new this.webAssemblyContext.SCRTLineSegmentDrawingProvider;var c=this.getProperties(this.parentSeries),d=c.stroke,f=c.strokeThickness,h=c.opacity,p=c.strokeDashArray;d&&(0,n.createPenInCache)(this.linesPenCache,d,f,h??1,p,!0)},u.prototype.onDetachSeries=function(){l.prototype.onDetachSeries.call(this),this.nativeDrawingProvider=(0,e.deleteSafe)(this.nativeDrawingProvider)},u.prototype.getStartAndCount=function(c,d){var f,h,p,g=c==null?void 0:c.pointSeries,v=(f=this.parentSeries)===null||f===void 0?void 0:f.xAxis,y=(h=v==null?void 0:v.clipToXRange)!==null&&h!==void 0?h:!0,m=d.size(),b=Math.min(g?g.xValues.size():m,m),S=0;return y&&!(g!=null&&g.resampled)&&((p=c==null?void 0:c.indexRange)===null||p===void 0?void 0:p.diff)>=0&&(c.indexRange.diff+1<b&&(S=c.indexRange.min),b=Math.min(c.indexRange.diff+1,b),S%2===1&&(S--,b++)),{startIndex:S,count:b}},u.prototype.updateArgs=function(c){},u.prototype.drawXy=function(c,d){var f=this.getProperties(this.parentSeries).stroke,h=(0,n.getScrtPenFromCache)(this.linesPenCache);if(!(!h||!f)){this.args.Reset(),this.args.SetLinesPen(h),this.args.forceShaderMethod=!0,this.args.forceClamp=!0,this.args.verticalChart=d.isVerticalChart;var p=d.xCoordinateCalculator.isCategoryCoordinateCalculator;if(p){console.error("Category Axis is not supported for LineSegmentRenderableSeries");return}var g=d.pointSeries,v=this.xSelector(g),y=this.ySelector(g),m=this.getStartAndCount(d,v),b=m.startIndex,S=m.count;this.args.count=S,this.args.startIndex=b,this.applyStrokePaletting(h,d),this.palettingState.palettedColors&&this.args.SetPalettedColors(this.palettingState.palettedColors),this.updateArgs(d);var _=c.getNativeContext();this.drawLines(c,_,v,y,d.xCoordinateCalculator.nativeCalculator,d.yCoordinateCalculator.nativeCalculator,this.args,this.parentSeries.parentSurface.seriesViewRect)}},u.prototype.drawXyXy=function(c,d){var f=this.getProperties(this.parentSeries).stroke,h=(0,n.getScrtPenFromCache)(this.linesPenCache);if(!(!h||!f)){this.args.Reset(),this.args.fourVectorsMode=!0,this.args.SetLinesPen(h),this.args.forceShaderMethod=!0,this.args.verticalChart=d.isVerticalChart;var p=d.xCoordinateCalculator.isCategoryCoordinateCalculator;if(p){console.error("Category Axis is not supported for LineSegmentRenderableSeries");return}var g=d.pointSeries,v=this.xSelector(g),y=this.ySelector(g),m=g.getYValuesByName(i.EValueName.X1),b=g.getYValuesByName(i.EValueName.Y1),S=this.getStartAndCount(d,v),_=S.startIndex,C=S.count;this.args.count=C,this.args.startIndex=_,this.args.SetZValues(m),this.args.SetWValues(b),this.applyStrokePaletting(h,d),this.palettingState.palettedColors&&(this.args.SetPalettedColors(this.palettingState.palettedColors),this.args.SetPalettedColors2(this.palettingState.palettedColors)),this.updateArgs(d);var T=c.getNativeContext();this.drawLines(c,T,v,y,d.xCoordinateCalculator.nativeCalculator,d.yCoordinateCalculator.nativeCalculator,this.args,this.parentSeries.parentSurface.seriesViewRect)}},u.prototype.draw=function(c,d){var f=this.getProperties(this.parentSeries).dataSeriesType;f===t.EDataSeriesType.Xyxy?this.drawXyXy(c,d):this.drawXy(c,d)},u.prototype.delete=function(){this.linesPenCache=(0,e.deleteSafe)(this.linesPenCache),this.nativeDrawingProvider=(0,e.deleteSafe)(this.nativeDrawingProvider),this.args=(0,e.deleteSafe)(this.args),l.prototype.delete.call(this)},u.prototype.drawLines=function(c,d,f,h,p,g,v,y){v.count<=0||(v.SetNativeContext(d),v.SetXValues(f),v.SetYValues(h),v.SetXCoordinateCalculator(p),v.SetYCoordinateCalculator(g),this.nativeDrawingProvider.DrawLinesVec(v))},u})(a.BaseSeriesDrawingProvider);return UE.LineSegmentSeriesDrawingProvider=s,UE}var zE={},Zae;function JPe(){if(Zae)return zE;Zae=1;var r=zE&&zE.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(u[d]=c[d])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})();Object.defineProperty(zE,"__esModule",{value:!0}),zE.LineSegmentSeriesHitTestProvider=void 0;var e=ki(),i=Js(),n=Rs(),t=vs(),o=(function(a){r(s,a);function s(){return a!==null&&a.apply(this,arguments)||this}return s.prototype.hitTest=function(l,u,c){c===void 0&&(c=i.BaseHitTestProvider.DEFAULT_HIT_TEST_RADIUS);var d=this.parentSeries.dataSeries.type;return d===e.EDataSeriesType.Xyxy?this.hitTestXyXy(l,u,c):this.hitTestXy(l,u,c)},s.prototype.hitTestXy=function(l,u,c){c===void 0&&(c=i.BaseHitTestProvider.DEFAULT_HIT_TEST_RADIUS);var d=this.getTranslatedHitTestPoint(l,u);if(!d)return t.HitTestInfo.empty();var f=this.currentRenderPassData,h=f.xCoordinateCalculator,p=f.yCoordinateCalculator,g=f.isVerticalChart,v=g?d.y:d.x,y=g?d.x:d.y,m=this.parentSeries.dataSeries;if(!m)return t.HitTestInfo.empty();var b=m.getNativeXValues(),S=m.getNativeYValues(),_=b.size();if(_<2)return t.HitTestInfo.empty();var C=function(K){return b.get(2*K)},T=function(K){return S.get(2*K)},x=function(K){return b.get(2*K+1)},A=function(K){return S.get(2*K+1)},w=n.hitTestHelpers.getNearestLineSegment(h,p,_/2,C,T,x,A,v,y,c),L=w.isHit,k=w.isWithinDataBounds,D=w.nearestPointIndex,j=w.nearestDistance,N=D>=0?D*2:-1,V=n.hitTestHelpers.createHitTestInfo(this.parentSeries,h,p,g,m,b,S,v,y,N,c,j);if(N!==-1){V.dataSeriesIndex=N,V.isWithinDataBounds=k,V.isHit=L,V.xValue=b.get(N),V.xCoord=h.getCoordinate(V.xValue),V.yValue=S.get(N),V.yCoord=p.getCoordinate(V.yValue),V.point2dataSeriesIndex=N+1,V.point2xValue=b.get(N+1),V.point2xCoord=h.getCoordinate(V.point2xValue),V.point2yValue=S.get(N+1),V.point2yCoord=p.getCoordinate(V.point2yValue),V.point2metadata=m.getMetadataAt(N+1);var W=m.valueNames.reduce(function(K,H){return K[H]=m.getNativeValue(m.getYValuesByName(H),V.point2dataSeriesIndex),K},{});V.point2yValueByName=W}return V},s.prototype.hitTestXyXy=function(l,u,c){c===void 0&&(c=i.BaseHitTestProvider.DEFAULT_HIT_TEST_RADIUS);var d=this.getTranslatedHitTestPoint(l,u);if(!d)return t.HitTestInfo.empty();var f=this.currentRenderPassData,h=f.xCoordinateCalculator,p=f.yCoordinateCalculator,g=f.isVerticalChart,v=g?d.y:d.x,y=g?d.x:d.y,m=this.parentSeries.dataSeries;if(!m)return t.HitTestInfo.empty();var b=m.getNativeXValues(),S=m.yValues,_=m.x1Values,C=m.y1Values,T=b.size();if(T<1)return t.HitTestInfo.empty();var x=function(H){return b.get(H)},A=function(H){return S.get(H)},w=function(H){return _.get(H)},L=function(H){return C.get(H)},k=n.hitTestHelpers.getNearestLineSegment(h,p,T,x,A,w,L,v,y,c),D=k.isHit,j=k.isWithinDataBounds,N=k.nearestPointIndex,V=k.nearestDistance,W=n.hitTestHelpers.createHitTestInfo(this.parentSeries,h,p,g,m,b,S,v,y,N,c,V);if(N!==-1){W.dataSeriesIndex=N,W.isWithinDataBounds=j,W.isHit=D,W.xValue=b.get(N),W.xCoord=h.getCoordinate(W.xValue),W.yValue=S.get(N),W.yCoord=p.getCoordinate(W.yValue),W.point2dataSeriesIndex=N,W.point2xValue=_.get(N),W.point2xCoord=h.getCoordinate(W.point2xValue),W.point2yValue=C.get(N),W.point2yCoord=p.getCoordinate(W.point2yValue),W.point2metadata=m.getMetadataAt(N);var K=m.valueNames.reduce(function(H,U){return H[U]=m.getNativeValue(m.getYValuesByName(U),W.point2dataSeriesIndex),H},{});W.point2yValueByName=K}return W},s.prototype.hitTestForDataPointSelectionModifier=function(l,u,c){return c===void 0&&(c=i.BaseHitTestProvider.DEFAULT_HIT_TEST_RADIUS),this.hitTest(l,u,c)},s.prototype.hitTestXSlice=function(l,u){return this.hitTest(l,u)},s.prototype.hitTestDataPoint=function(l,u,c){return this.hitTest(l,u)},s})(i.BaseHitTestProvider);return zE.LineSegmentSeriesHitTestProvider=o,zE}var Jae;function QPe(){if(Jae)return HE;Jae=1;var r=HE&&HE.__extends||(function(){var u=function(c,d){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,h){f.__proto__=h}||function(f,h){for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(f[p]=h[p])},u(c,d)};return function(c,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");u(c,d);function f(){this.constructor=c}c.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}})();Object.defineProperty(HE,"__esModule",{value:!0}),HE.FastLineSegmentRenderableSeries=void 0;var e=tn(),i=iy(),n=Xv(),t=X1(),o=ZPe(),a=$d(),s=JPe(),l=(function(u){r(c,u);function c(d,f){var h=this,p,g;return h=u.call(this,d,f)||this,h.type=e.ESeriesType.LineSegmentSeries,h.dataLabelProviderProperty||(h.dataLabelProviderProperty=new t.LineSeriesDataLabelProvider(f==null?void 0:f.dataLabels),h.dataLabelProviderProperty.onAttach(h.webAssemblyContext,h)),!((p=h.paletteProvider)===null||p===void 0)&&p.onAttached&&((g=h.paletteProvider)===null||g===void 0||g.onAttached(h)),h}return c.prototype.toPointSeries=function(d){return new i.BasePointSeriesWrapped(this.dataSeries)},c.prototype.addDrawingProviders=function(d,f){this.drawingProviders.push(new o.LineSegmentSeriesDrawingProvider(d,this)),this.drawingProviders.push(new a.PointMarkerDrawingProvider(d,this))},c.prototype.newHitTestProvider=function(){return new s.LineSegmentSeriesHitTestProvider(this,this.webAssemblyContext)},c})(n.BaseLineRenderableSeries);return HE.FastLineSegmentRenderableSeries=l,HE}var WE={},GE={},Qae;function eCe(){if(Qae)return GE;Qae=1;var r=GE&&GE.__extends||(function(){var u=function(c,d){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,h){f.__proto__=h}||function(f,h){for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(f[p]=h[p])},u(c,d)};return function(c,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");u(c,d);function f(){this.constructor=c}c.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}})();Object.defineProperty(GE,"__esModule",{value:!0}),GE.RectangleSeriesDrawingProvider=void 0;var e=Mr(),i=zc(),n=xo(),t=hl(),o=ts(),a=Ji(),s=vl(),l=(function(u){r(c,u);function c(d,f,h,p){var g=u.call(this,d,f,h,p)||this;return g.nativeDrawingProvider=new d.SCRTRectangleSeriesDrawingProvider,g.args=new g.webAssemblyContext.SCRTRectangleDrawingParams,g.strokePenCache=new o.Pen2DCache(d),g.strokePenFillColoredCache=new o.Pen2DCache(d),g.fillBrushCache=new t.BrushCache(d),g}return c.prototype.onAttachSeries=function(){u.prototype.onAttachSeries.call(this);var d=this.getProperties(this.parentSeries),f=d.stroke,h=d.strokeThickness,p=d.fill,g=d.opacity;(0,o.createPenInCache)(this.strokePenCache,f,h,g),h===0&&(0,o.createPenInCache)(this.strokePenFillColoredCache,p,1,g),this.createBrush()},c.prototype.delete=function(){this.nativeDrawingProvider=(0,e.deleteSafe)(this.nativeDrawingProvider),this.args=(0,e.deleteSafe)(this.args),this.strokePenCache=(0,e.deleteSafe)(this.strokePenCache),this.strokePenFillColoredCache=(0,e.deleteSafe)(this.strokePenFillColoredCache),this.fillBrushCache=(0,e.deleteSafe)(this.fillBrushCache),u.prototype.delete.call(this)},c.prototype.getProperties=function(d){var f=d.stroke,h=d.strokeThickness,p=d.opacity,g=d.fill,v=d.fillLinearGradient,y=d.customTextureOptions;return{stroke:f,strokeThickness:h,opacity:p,fill:g,fillLinearGradient:v,customTextureOptions:y}},c.prototype.draw=function(d,f){var h=f.pointSeries,p=this.parentSeries.parentSurface.seriesViewRect,g=this.getProperties(this.parentSeries).strokeThickness;this.args.Reset(),this.args.verticalChart=f.isVerticalChart,this.args.columnWidth=this.parentSeries.getDataPointWidth(f.xCoordinateCalculator,this.parentSeries.dataPointWidth,this.parentSeries.dataPointWidthMode),this.args.bottomRadius=this.parentSeries.topCornerRadius,this.args.topRadius=this.parentSeries.bottomCornerRadius,this.args.xMode=(0,i.convertColumnMode)(this.parentSeries.columnXMode,this.webAssemblyContext),this.args.defaultY2=this.parentSeries.defaultY1,this.args.yMode=(0,i.convertYColumnMode)(this.parentSeries.columnYMode,this.webAssemblyContext);var v=this.strokePenCache;this.args.columnWidth===1&&g===0&&(this.args.columnWidth=0,v=this.strokePenFillColoredCache);var y=(0,o.getScrtPenFromCache)(v);y&&this.args.SetLinesPen(y);var m=(0,t.getScrtBrushFromCache)(this.fillBrushCache);m&&this.args.SetFillBrush(m),this.args.viewportWidth=p.width,this.args.viewportHeight=p.height,u.prototype.applyStrokeFillPaletting.call(this,this.parentSeries.stroke,y,this.parentSeries.fill,m,this.parentSeries.opacity,!1,this.parentSeries.fillLinearGradient!==void 0),this.args.SetPalettedColors(this.palettingState.palettedColors),this.args.paletteStart=this.palettingState.paletteStartIndex;var b=f.xCoordinateCalculator.isCategoryCoordinateCalculator,S=this.xSelector(h),_=this.ySelector(h),C=b?h.indexes:S,T=this.getStartAndCount(f,C),x=T.startIndex,A=T.count;if(this.args.count=A,this.args.startIndex=x,this.args.SetXValues(C),_&&this.args.SetYValues(_),this.parentSeries.columnXMode===i.EColumnMode.MidWidth||this.parentSeries.columnXMode===i.EColumnMode.StartEnd||this.parentSeries.columnXMode===i.EColumnMode.StartWidth){var w=h.getYValuesByName(n.EValueName.X1);if(w)this.args.SetZValues(w);else throw new Error("columnMode ".concat(this.parentSeries.columnXMode," requires an DataSeries with a yValue called ").concat(n.EValueName.X1))}var L=h.getYValuesByName(n.EValueName.Y1);L&&this.args.SetWValues(L);var k=this.parentSeries.dataSeries,D=k.fifoCapacity,j=k.fifoSweeping,N=k.fifoSweepingGap,V=h.fifoStartIndex;j&&D===this.parentSeries.dataSeries.count()&&(this.args.count=V);var W=d.getNativeContext();this.args.SetNativeContext(W),this.args.SetXCoordinateCalculator(f.xCoordinateCalculator.nativeCalculator),this.args.SetYCoordinateCalculator(f.yCoordinateCalculator.nativeCalculator),this.nativeDrawingProvider.DrawPoints(this.args),j&&D===this.parentSeries.dataSeries.count()&&(this.args.startIndex=Math.min(_.size(),V+N),this.args.count=Math.max(0,_.size()-V-N),this.args.count>0&&this.nativeDrawingProvider.DrawPoints(this.args))},c.prototype.onDpiChanged=function(d){u.prototype.onDpiChanged.call(this,d),this.onSeriesPropertyChange(a.PROPERTY.STROKE)},c.prototype.onSeriesPropertyChange=function(d){u.prototype.onSeriesPropertyChange.call(this,d);var f=this.parentSeries,h=f.stroke,p=f.strokeThickness,g=f.opacity,v=f.fill;(d===a.PROPERTY.STROKE||d===a.PROPERTY.STROKE_THICKNESS||d===a.PROPERTY.OPACITY)&&(0,o.createPenInCache)(this.strokePenCache,h,p,g),(d===a.PROPERTY.FILL||d===a.PROPERTY.OPACITY||d===a.PROPERTY.CUSTOM_TEXTURE_OPTIONS)&&this.createBrush(),p===0&&(d===a.PROPERTY.STROKE_THICKNESS||d===a.PROPERTY.STROKE||d===a.PROPERTY.OPACITY||d===a.PROPERTY.FILL)&&(0,o.createPenInCache)(this.strokePenFillColoredCache,v,1,g)},c.prototype.createBrush=function(){this.parentSeries.parentSurface;var d=this.getProperties(this.parentSeries),f=d.fillLinearGradient,h=d.fill,p=d.opacity,g=d.customTextureOptions,v=this.fillBrushCache.create(h,p,1,1,f,g);return v.scrtBrush},c})(s.BaseSeriesDrawingProvider);return GE.RectangleSeriesDrawingProvider=l,GE}var YE={},c2={},ese;function tCe(){if(ese)return c2;ese=1,Object.defineProperty(c2,"__esModule",{value:!0}),c2.hitTestHelpersRectangleSeries=void 0;var r=zc(),e=Qn();function i(a,s,l,u,c,d,f){var h=a?a.get(d):1,p=s?s.get(d):c,g=h,v=p;switch(f){case r.EColumnYMode.TopBottom:break;case r.EColumnYMode.TopHeight:v=h-p;break;case r.EColumnYMode.CenterHeight:var y=p/2;g=h+y,v=h-y;break}var m=l.getCoordinate(g),b=l.getCoordinate(v),S=Math.max(m,b),_=Math.min(m,b);return _<=u&&u<=S}function n(a,s,l,u,c,d,f,h,p,g,v,y,m){var b,S=s.getDataValue(f),_=[[S,f]];if(m){var C=f-2*Math.PI,T=s.getDataValue(C);_.push([T,C]);var x=f+2*Math.PI,A=s.getDataValue(x);_.push([A,x])}var w=u.size(),L=s.isFlipped?-1:1,k=v===r.EColumnMode.Mid?0:g/2,D=s.getDataWidth(k),j=function(pe,_e){var Te=a.NumberUtil.FindIndex(u,pe-D,a.SCRTFindIndexSearchMode.Nearest,!0);if(Te===-1)return{index:-1,dist:Number.MAX_VALUE,xCoord:void 0,xHitCoord:void 0};var De=s.getCoordinate(u.get(Te)),Pe=Math.abs(De+L*k-_e);return{index:Te,dist:Pe,xCoord:De,xHitCoord:_e}},N=-1,V=Number.MAX_VALUE,W=void 0,K=void 0;if(_.forEach(function(pe){var _e=pe[0],Te=pe[1],De=j(_e,Te);De.index>=0&&De.dist<V&&(N=De.index,V=De.dist,W=De.xCoord,K=De.xHitCoord)}),N===-1)return{isHit:!1,nearestPointIndex:-1,isWithinDataBounds:!1};var H=V<=g/2,U=i(c,d,l,h,p,N,y),I=!1;N>0&&N<w-1&&(I=!0),u.size()<=1?I=H:s.isFlipped?(N===0&&(K<=W+L*k||H)&&(I=!0),N===w-1&&(K>=W+L*k||H)&&(I=!0)):(N===0&&(K>=W+L*k||H)&&(I=!0),N===w-1&&(K<=W+L*k||H)&&(I=!0));var Q=s.isCategoryCoordinateCalculator,Z=Q?N:u.get(N),ee=c.get(N),ie=void 0,de=(b=d==null?void 0:d.get)===null||b===void 0?void 0:b.call(d,N);return{nearestPointIndex:N,isHit:H&&U,isWithinDataBounds:I,xValue:Z,yValue:ee,x1Value:ie,y1Value:de}}function t(a,s,l,u,c,d,f,h,p,g,v,y,m,b,S){var _,C,T=u.size(),x=v/2,A=-1,w=Number.MAX_VALUE,L=!1,k=void 0,D=Number.MAX_VALUE,j=Number.NEGATIVE_INFINITY,N=function(We,xe,ve){var he=xe-ve,Se=ve-We;return he>=0&&Se>=0?0:Math.min(Math.abs(he),Math.abs(Se))},V=function(We,xe){var ve=N(We,xe,h),he=ve,Se=h;if(S&&!b){var be=h-2*Math.PI,ke=h+2*Math.PI;[be,ke].forEach(function(qe){var rt=N(We,xe,qe);rt<he&&(he=rt,Se=qe)})}return{xCoordDist:he,xHitCoord:Se,isHit:he===0}},W=function(We,xe,ve){We<D&&(D=We),xe>j&&(j=xe);var he=i(d,f,l,p,g,ve,m),Se=V(We,xe),be=Se.isHit,ke=Se.xCoordDist,qe=Se.xHitCoord,rt=be&&he;L?rt&&ke<w&&(A=ve,w=ke,k=qe):rt?(L=!0,A=ve,w=ke,k=qe):ke<w&&(A=ve,w=ke,k=qe)},K=s.isFlipped,H=(0,e.vectorToArrayViewF64)(u,a),U=c?(0,e.vectorToArrayViewF64)(c,a):void 0;switch(y){case r.EColumnMode.Mid:for(var I=0;I<T;I++){var Q=H[I],Z=s.getCoordinate(Q),ee=Z-x,ie=Z+x;W(ee,ie,I)}break;case r.EColumnMode.Start:for(var I=0;I<T;I++){var de=H[I],Z=s.getCoordinate(de),ee=K?Z-v:Z,ie=K?Z:Z+v;W(ee,ie,I)}break;case r.EColumnMode.MidWidth:for(var I=0;I<T;I++){var pe=H[I],_e=U[I],ee=s.getCoordinate(pe-_e/2),ie=s.getCoordinate(pe+_e/2);K?W(ie,ee,I):W(ee,ie,I)}break;case r.EColumnMode.StartWidth:for(var I=0;I<T;I++){var Te=H[I],_e=U[I],ee=s.getCoordinate(Te),ie=s.getCoordinate(Te+_e);K?W(ie,ee,I):W(ee,ie,I)}break;case r.EColumnMode.StartEnd:for(var I=0;I<T;I++){var De=H[I],Pe=U[I],ee=s.getCoordinate(De),ie=s.getCoordinate(Pe);K?W(ie,ee,I):W(ee,ie,I)}break}if(A===-1)return{isHit:!1,nearestPointIndex:-1,isWithinDataBounds:!1};var Ee=s.isCategoryCoordinateCalculator,Re=Ee?A:u.get(A),je=d.get(A),Ke=Ee?A:(_=c==null?void 0:c.get)===null||_===void 0?void 0:_.call(c,A),ot=(C=f==null?void 0:f.get)===null||C===void 0?void 0:C.call(f,A);return{isHit:w===0&&i(d,f,l,p,g,A,m),nearestPointIndex:A,isWithinDataBounds:D<=k&&k<=j,xValue:Re,x1Value:Ke,yValue:je,y1Value:ot}}function o(a,s,l,u,c,d,f,h,p,g,v,y,m,b,S,_){return b?t(a,s,l,u,c,d,f,h,p,g,v,y,m,!0,_):S&&(y===r.EColumnMode.Mid||y===r.EColumnMode.Start)?n(a,s,l,u,d,f,h,p,g,v,y,m,_):t(a,s,l,u,c,d,f,h,p,g,v,y,m,!1,_)}return c2.hitTestHelpersRectangleSeries={hitTestForBoxSorted:n,hitTestForBoxUnsorted:t,hitTestForBox:o},c2}var tse;function _U(){if(tse)return YE;tse=1;var r=YE&&YE.__extends||(function(){var u=function(c,d){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,h){f.__proto__=h}||function(f,h){for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(f[p]=h[p])},u(c,d)};return function(c,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");u(c,d);function f(){this.constructor=c}c.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}})();Object.defineProperty(YE,"__esModule",{value:!0}),YE.RectangleSeriesHitTestProvider=void 0;var e=Ii(),i=xo(),n=pn(),t=Js(),o=Rs(),a=tCe(),s=vs(),l=(function(u){r(c,u);function c(){return u!==null&&u.apply(this,arguments)||this}return c.prototype.getTranslatedHitTestPoint=function(d,f){if(!(!this.currentRenderPassData||d===void 0||f===void 0)){var h=(0,n.translateFromCanvasToSeriesViewRect)(new e.Point(d,f),this.parentSeries.parentSurface.seriesViewRect);if(h)return this.isPolar()?this.parentSeries.xAxis.reverseTransform(h.x,h.y,!1):h}},c.prototype.hitTest=function(d,f){var h=this.getTranslatedHitTestPoint(d,f);if(!h)return s.HitTestInfo.empty();var p=this.currentRenderPassData,g=p.xCoordinateCalculator,v=p.yCoordinateCalculator,y=p.isVerticalChart,m=y?h.y:h.x,b=y?h.x:h.y,S=this.parentSeries.dataSeries;if(!S)return s.HitTestInfo.empty();var _=S.getNativeXValues(),C=S.getYValuesByName(i.EValueName.X1),T=S.getYValuesByName(i.EValueName.Y),x=S.getYValuesByName(i.EValueName.Y1),A=this.parentSeries,w=A.getDataPointWidth,L=A.dataPointWidth,k=A.defaultY1,D=A.columnXMode,j=A.columnYMode,N=A.dataPointWidthMode,V=w(g,L,N),W=this.hitTestForBox(this.webAssemblyContext,g,v,_,C,T,x,m,b,k,V,D,j,y,this.isPolar()),K=W.nearestPointIndex,H=W.isHit,U=W.isWithinDataBounds,I=W.xValue,Q=W.yValue,Z=W.x1Value,ee=W.y1Value,ie=o.hitTestHelpers.createHitTestInfo(this.parentSeries,g,v,y,S,_,T,m,b,K,0);return ie.isHit=H,ie.isWithinDataBounds=U,ie.xValue=I,ie.yValue=Q,ie.x1Value=Z,ie.y1Value=ee,ie},c.prototype.hitTestForDataPointSelectionModifier=function(d,f,h){return h===void 0&&(h=t.BaseHitTestProvider.DEFAULT_HIT_TEST_RADIUS),this.hitTest(d,f)},c.prototype.hitTestXSlice=function(d,f){return this.hitTest(d,f)},c.prototype.hitTestDataPoint=function(d,f,h){return this.hitTest(d,f)},c.prototype.hitTestForBox=function(d,f,h,p,g,v,y,m,b,S,_,C,T,x,A){return a.hitTestHelpersRectangleSeries.hitTestForBoxUnsorted(d,f,h,p,g,v,y,m,b,S,_,C,T,x,A)},c.prototype.isPolar=function(){return this.parentSeries.parentSurface.isPolar},c})(t.BaseHitTestProvider);return YE.RectangleSeriesHitTestProvider=l,YE}var $E={},d2={},rse;function rCe(){if(rse)return d2;rse=1,Object.defineProperty(d2,"__esModule",{value:!0}),d2.dataLabelHelpers=void 0;var r=zc();function e(t,o,a,s){var l=Math.min(a,s),u=Math.max(a,s);return t===r.EColumnMode.Mid||t===r.EColumnMode.MidWidth?(l=a-s/2,u=a+s/2):t===r.EColumnMode.Start?(l=a,u=a+s):t===r.EColumnMode.StartWidth&&(o?(l=a-s,u=a):(l=a,u=a+s)),{min:l,max:u}}function i(t,o,a,s){var l=Math.min(a,s),u=Math.max(a,s);return t===r.EColumnYMode.CenterHeight?(l=a-s/2,u=a+s/2):t===r.EColumnYMode.TopHeight&&(o?(l=a-s,u=a):(l=a,u=a+s)),{min:l,max:u}}function n(t,o,a,s,l,u,c,d,f){if(f){var h=e(t,!a,u,d),p=h.min,g=h.max,v=i(o,!s,l,c),y=v.min,m=v.max;return{xMin:y,xMax:m,yMin:p,yMax:g}}else{var b=e(t,a,l,c),y=b.min,m=b.max,S=i(o,s,u,d),p=S.min,g=S.max;return{xMin:y,xMax:m,yMin:p,yMax:g}}}return d2.dataLabelHelpers={calcRectangleBorders:n},d2}var qE={},ise;function iCe(){if(ise)return qE;ise=1;var r=qE&&qE.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(qE,"__esModule",{value:!0}),qE.RectangleDataLabelState=void 0;var e=zc(),i=xo(),n=VM(),t=(function(o){r(a,o);function a(s,l,u,c,d,f){var h=o.call(this,s,l,u,c,d,f)||this;h.x1CoordCache=void 0,h.y1CoordCache=void 0;var p=l.pointSeries;return h.x1Values=p.getYValuesByName(i.EValueName.X1),h.defaultY1=f.defaultY1,h.y1Values=p.getYValuesByName(i.EValueName.Y1),h.columnXMode=f.columnXMode,h.columnYMode=f.columnYMode,h.columnWidth=h.parentSeries.getDataPointWidth(l.xCoordinateCalculator,f.dataPointWidth,f.dataPointWidthMode),h}return a.prototype.x1Val=function(s){return this.parentSeries.dataSeries.getNativeValue(this.x1Values,this.getIndexInternal(s))},a.prototype.y1Val=function(s){return this.y1Values?this.parentSeries.dataSeries.getNativeValue(this.y1Values,this.getIndexInternal(s)):this.defaultY1},a.prototype.x1Coord=function(s){if(this.renderPassData.isVerticalChart)return this.y1CoordInternal(s);var l=this.x1CoordInternal(s);return l},Object.defineProperty(a.prototype,"index",{get:function(){return this.indexProperty},set:function(s){this.xCoordCache=void 0,this.yCoordCache=void 0,this.x1CoordCache=void 0,this.y1CoordCache=void 0,this.indexProperty=s},enumerable:!1,configurable:!0}),a.prototype.y1Coord=function(s){return this.renderPassData.isVerticalChart?this.x1CoordInternal(s):this.y1CoordInternal(s)},a.prototype.x1CoordForXColumnModes=function(s){return this.columnXMode===e.EColumnMode.MidWidth||this.columnXMode===e.EColumnMode.StartWidth?this.renderPassData.xCoordinateCalculator.getCoordWidth(this.x1Val(s)):this.columnXMode===e.EColumnMode.Start||this.columnXMode===e.EColumnMode.Mid?this.columnWidth:this.renderPassData.xCoordinateCalculator.getCoordinate(this.x1Val(s))},a.prototype.x1CoordInternal=function(s){return s!==void 0?this.x1CoordForXColumnModes(s):this.x1CoordCache!==void 0?this.x1CoordCache:(this.x1CoordCache=this.x1CoordForXColumnModes(),this.x1CoordCache)},a.prototype.y1CoordForYColumnModes=function(s){return this.columnYMode===e.EColumnYMode.CenterHeight||this.columnYMode===e.EColumnYMode.TopHeight?this.renderPassData.yCoordinateCalculator.getCoordWidth(this.y1Val(s)):this.renderPassData.yCoordinateCalculator.getCoordinate(this.y1Val(s))},a.prototype.y1CoordInternal=function(s){return s!==void 0?this.y1CoordForYColumnModes(s):this.y1CoordCache!==void 0?this.y1CoordCache:(this.y1CoordCache=this.y1CoordForYColumnModes(),this.y1CoordCache)},a})(n.DataLabelState);return qE.RectangleDataLabelState=t,qE}var nse;function SX(){if(nse)return $E;nse=1;var r=$E&&$E.__extends||(function(){var l=function(u,c){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(d[h]=f[h])},l(u,c)};return function(u,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");l(u,c);function d(){this.constructor=u}u.prototype=c===null?Object.create(c):(d.prototype=c.prototype,new d)}})();Object.defineProperty($E,"__esModule",{value:!0}),$E.RectangleSeriesDataLabelProvider=void 0;var e=Ii(),i=ku(),n=rCe(),t=Mg(),o=iCe(),a=lc(),s=(function(l){r(u,l);function u(c){var d=l.call(this,c)||this;return d.type=i.EDataLabelProviderType.Rectangle,d}return u.prototype.getDataLabelState=function(c,d,f,h,p,g){return new o.RectangleDataLabelState(c,d,f,h,p,g)},u.prototype.getPosition=function(c,d){var f=this.parentSeries,h=f.columnXMode,p=f.columnYMode,g=n.dataLabelHelpers.calcRectangleBorders(h,p,!c.isXFlipped,c.isYFlipped,c.xCoord(),c.yCoord(),c.x1Coord(),c.y1Coord(),c.isVerticalChart),v=g.xMin,y=g.xMax,m=g.yMin,b=g.yMax,S=(v+y)/2,_=(m+b)/2,C=new e.Point(S,_),T=d.GetLineBounds(0),x=d.m_fHeight-T.m_fHeight;T.delete();var A=S,w=_-x;return A-=d.m_fWidth/2,w+=(0,a.getTextHeightToBaseline)(d)/2,{position:new e.Point(A,w),rotationAngle:0,rotationCenter:C}},u.prototype.toJSON=function(){var c=l.prototype.toJSON.call(this),d={};return Object.assign(c.options,d),c},u})(t.DataLabelProvider);return $E.RectangleSeriesDataLabelProvider=s,$E}var ose;function _X(){if(ose)return WE;ose=1;var r=WE&&WE.__extends||(function(){var y=function(m,b){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,_){S.__proto__=_}||function(S,_){for(var C in _)Object.prototype.hasOwnProperty.call(_,C)&&(S[C]=_[C])},y(m,b)};return function(m,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");y(m,b);function S(){this.constructor=m}m.prototype=b===null?Object.create(b):(S.prototype=b.prototype,new S)}})();Object.defineProperty(WE,"__esModule",{value:!0}),WE.FastRectangleRenderableSeries=void 0;var e=Mr(),i=oi(),n=zc(),t=ry(),o=tn(),a=xo(),s=ki(),l=gs(),u=ln(),c=Gl(),d=Ji(),f=eCe(),h=_U(),p=SX(),g=oy(),v=(function(y){r(m,y);function m(b,S){var _=this,C,T,x,A,w,L,k,D,j,N,V,W;return S&&(S.resamplingMode=(C=S.resamplingMode)!==null&&C!==void 0?C:g.EResamplingMode.None),_=y.call(this,b,S)||this,_.type=o.ESeriesType.RectangleSeries,_.defaultY1Property=0,_.fillProperty=u.SciChartSurfaceBase.DEFAULT_THEME.columnFillBrush,_.dataPointWidthProperty=1,_.dataPointWidthModeProperty=t.EDataPointWidthMode.Range,_.columnXModeProperty=n.EColumnMode.Mid,_.columnYModeProperty=n.EColumnYMode.TopBottom,_.topCornerRadiusProperty=0,_.bottomCornerRadiusProperty=0,_.fillProperty=(T=S==null?void 0:S.fill)!==null&&T!==void 0?T:_.fillProperty,_.defaultY1Property=(x=S==null?void 0:S.defaultY1)!==null&&x!==void 0?x:_.defaultY1Property,_.dataPointWidthProperty=(A=S==null?void 0:S.dataPointWidth)!==null&&A!==void 0?A:_.dataPointWidthProperty,_.dataPointWidthModeProperty=(w=S==null?void 0:S.dataPointWidthMode)!==null&&w!==void 0?w:_.dataPointWidthModeProperty,_.fillLinearGradientProperty=(L=S==null?void 0:S.fillLinearGradient)!==null&&L!==void 0?L:_.fillLinearGradientProperty,_.topCornerRadiusProperty=(k=S==null?void 0:S.topCornerRadius)!==null&&k!==void 0?k:_.topCornerRadiusProperty,_.bottomCornerRadiusProperty=(D=S==null?void 0:S.bottomCornerRadius)!==null&&D!==void 0?D:_.bottomCornerRadiusProperty,_.columnXModeProperty=(j=S==null?void 0:S.columnXMode)!==null&&j!==void 0?j:_.columnXModeProperty,_.columnYModeProperty=(N=S==null?void 0:S.columnYMode)!==null&&N!==void 0?N:_.columnYModeProperty,_.customTextureOptionsProperty=S==null?void 0:S.customTextureOptions,!((V=_.paletteProvider)===null||V===void 0)&&V.onAttached&&((W=_.paletteProvider)===null||W===void 0||W.onAttached(_)),_.dataLabelProviderProperty||(_.dataLabelProviderProperty=new p.RectangleSeriesDataLabelProvider(S==null?void 0:S.dataLabels),_.dataLabelProviderProperty.onAttach(_.webAssemblyContext,_)),S!=null&&S.animation&&_.animationQueue.push(S.animation),_}return m.prototype.addDrawingProviders=function(b,S){this.drawingProviders.push(new f.RectangleSeriesDrawingProvider(b,this))},m.prototype.applyTheme=function(b){y.prototype.applyTheme.call(this,b);var S=this.parentSurface.previousThemeProvider;this.fill===S.columnFillBrush&&(this.fill=b.columnFillBrush),this.stroke===S.columnLineColor&&(this.stroke=b.columnLineColor)},Object.defineProperty(m.prototype,"defaultY1",{get:function(){return this.defaultY1Property},set:function(b){this.defaultY1Property=b,this.notifyPropertyChanged(d.PROPERTY.DEFAULT_Y1)},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"fill",{get:function(){return(0,l.stripAutoColor)(this.fillProperty)},set:function(b){this.fillProperty!==b&&(this.fillProperty=b,this.notifyPropertyChanged(d.PROPERTY.FILL))},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"fillLinearGradient",{get:function(){return this.fillLinearGradientProperty},set:function(b){b!==this.fillLinearGradientProperty&&(this.fillLinearGradientProperty=b,this.notifyPropertyChanged(d.PROPERTY.FILL_LINEAR_GRADIENT))},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"columnXMode",{get:function(){return this.columnXModeProperty},set:function(b){this.columnXModeProperty!==b&&(this.columnXModeProperty=b,this.notifyPropertyChanged("COLUMN_MODE"))},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"columnYMode",{get:function(){return this.columnYModeProperty},set:function(b){this.columnYModeProperty!==b&&(this.columnYModeProperty=b,this.notifyPropertyChanged("COLUMN_MODE"))},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"dataPointWidth",{get:function(){return this.dataPointWidthProperty},set:function(b){this.dataPointWidthProperty=b,this.notifyPropertyChanged(d.PROPERTY.DATA_POINT_WIDTH)},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"dataPointWidthMode",{get:function(){return this.dataPointWidthModeProperty},set:function(b){this.dataPointWidthModeProperty=b,this.notifyPropertyChanged(d.PROPERTY.DATA_POINT_WIDTH_MODE)},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"topCornerRadius",{get:function(){return this.topCornerRadiusProperty},set:function(b){this.topCornerRadiusProperty=b,this.notifyPropertyChanged(d.PROPERTY.TOP_CORNER_RADIUS)},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"bottomCornerRadius",{get:function(){return this.bottomCornerRadiusProperty},set:function(b){this.bottomCornerRadiusProperty=b,this.notifyPropertyChanged(d.PROPERTY.BOTTOM_CORNER_RADIUS)},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"customTextureOptions",{get:function(){return this.customTextureOptionsProperty},set:function(b){b!==this.customTextureOptionsProperty&&(this.customTextureOptionsProperty=b,this.notifyPropertyChanged(d.PROPERTY.CUSTOM_TEXTURE_OPTIONS))},enumerable:!1,configurable:!0}),m.prototype.getXRange=function(){var b=this.dataSeries.count(),S=this.dataSeries;if([n.EColumnMode.MidWidth,n.EColumnMode.StartWidth].includes(this.columnXMode)){var _=S.getNativeXValues(),C=S.getYValuesByName(a.EValueName.X1);if(!C)throw new Error("columnXMode ".concat(this.columnXMode," requires x1 values.  Please use an Xyx or Xyxy dataseries"));var T=void 0,x=this.columnXMode===n.EColumnMode.MidWidth,A=_.get(0),w=_.get(S.count()-1),L=void 0;try{T=this.webAssemblyContext.NumberUtil.MinMaxPair(S.getNativeXValues(),C,x?.5:1,x?-.5:0,!1),A=T.minD,w=T.maxD}finally{(0,e.deleteSafe)(T)}return A===w?new i.NumberRange(A-1,w+1):(A>w&&(L=A,A=w,w=L),new i.NumberRange(A,w))}else if(this.columnXMode===n.EColumnMode.StartEnd){var k=S.getXRange(s.EDataSeriesValueType.Default),D=S.getXRangeByName(s.EDataSeriesValueType.Default,a.EValueName.X1);return new i.NumberRange(Math.min(k.min,D.min),Math.max(k.max,D.max))}else{var j=y.prototype.getXRange.call(this),N=this.dataPointWidth;if(this.dataPointWidthMode===t.EDataPointWidthMode.Relative&&(b>1?N=j.diff/(b-1)*this.dataPointWidth:N=0),this.dataPointWidthMode===t.EDataPointWidthMode.Absolute){var V=this.xAxis.getCurrentCoordinateCalculator();N=V.getDataWidth(this.dataPointWidth)/2}if(this.columnXMode===n.EColumnMode.Mid)return new i.NumberRange(j.min-N/2,j.max+N/2);if(this.columnXMode===n.EColumnMode.Start)return new i.NumberRange(j.min,j.max+N)}return new i.NumberRange(0,0)},m.prototype.getYRange=function(b,S){var _=this.dataSeries.getYValuesByName(a.EValueName.Y1);if([n.EColumnYMode.CenterHeight,n.EColumnYMode.TopHeight].includes(this.columnYMode)){var C=n.EColumnYMode.CenterHeight===this.columnYMode,T=S?b:this.getIndicesRange(b,!1),x=Math.max(Math.floor(T.min),0),A=Math.min(Math.ceil(T.max),this.dataSeries.count()-1);if(A<x)return;var w=void 0,L=this.dataSeries.getYValuesByName(a.EValueName.Y);if(_){var k=void 0,D=void 0,j=C?-.5:-1,N=C?.5:0;try{w=this.webAssemblyContext.NumberUtil.MinMaxPairWithIndex(L,_,j,N,x,A-x+1,this.dataSeries.dataDistributionCalculator.containsNaN),k=w.minD,D=w.maxD}finally{(0,e.deleteSafe)(w)}return new i.NumberRange(k,D)}else{var V=y.prototype.getYRange.call(this,b,S);return V?C?new i.NumberRange(V.min-this.defaultY1/2,V.max+this.defaultY1/2):new i.NumberRange(V.min-this.defaultY1,V.max):void 0}}else{var V=y.prototype.getYRange.call(this,b,S);return V?_?V:new i.NumberRange(Math.min(V.min,this.defaultY1),Math.max(V.max,this.defaultY1)):void 0}},m.prototype.getIndicesRange=function(b,S){return new i.NumberRange(0,this.dataSeries.count()-1)},m.prototype.resolveAutoColors=function(b,S,_){if(y.prototype.resolveAutoColors.call(this,b,S,_),this.fillProperty.startsWith(l.AUTO_COLOR)){var C=_.getFillColor(b,S,this.webAssemblyContext);this.fill=l.AUTO_COLOR+this.adjustAutoColor("fill",C)}},m.prototype.toJSON=function(b){b===void 0&&(b=!1);var S=y.prototype.toJSON.call(this,b),_={columnXMode:this.columnXMode,dataPointWidth:this.dataPointWidth,dataPointWidthMode:this.dataPointWidthMode,defaultY1:this.defaultY1,fill:this.fill,fillLinearGradient:this.fillLinearGradient,topCornerRadius:this.topCornerRadius,bottomCornerRadius:this.bottomCornerRadius,columnYMode:this.columnYMode};return Object.assign(S.options,_),S},m.prototype.newHitTestProvider=function(){return new h.RectangleSeriesHitTestProvider(this,this.webAssemblyContext)},m})(c.BaseRenderableSeries);return WE.FastRectangleRenderableSeries=v,WE}var XE={},KE={},ZE={},ase;function PU(){if(ase)return ZE;ase=1;var r=ZE&&ZE.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(u[d]=c[d])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})();Object.defineProperty(ZE,"__esModule",{value:!0}),ZE.PolarDataLabelState=void 0;var e=ta(),i=Ds(),n=Hi(),t=VM(),o=(function(a){r(s,a);function s(){return a!==null&&a.apply(this,arguments)||this}return s.prototype.toCartesian=function(l,u){var c=this.parentSeries.xAxis;return i.annotationHelpers.convertPolarToCartesian(c,!1,this.parentSeries.parentSurface.webAssemblyContext2D,e.ECoordinateMode.Pixel,l*n.DpiHelper.PIXEL_RATIO,u)},s.prototype.xCoord=function(l){return this.updateCache(l),this.cartesianCache.x},s.prototype.yCoord=function(l){return this.updateCache(l),this.cartesianCache.y},s.prototype.angleCoord=function(l){return a.prototype.xCoord.call(this,l)},s.prototype.radiusCoord=function(l){return a.prototype.yCoord.call(this,l)},s.prototype.updateCache=function(l){var u=l??this.index;if(!this.cartesianCache||this.cartesianCache.index!==u){var c=a.prototype.xCoord.call(this),d=a.prototype.yCoord.call(this),f=this.toCartesian(c,d),h=f.x,p=f.y;this.cartesianCache={index:u,x:h,y:p}}},s})(t.DataLabelState);return ZE.PolarDataLabelState=o,ZE}var sse;function Z1(){if(sse)return KE;sse=1;var r=KE&&KE.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(KE,"__esModule",{value:!0}),KE.PolarDataLabelProvider=void 0;var e=ku(),i=Mg(),n=PU(),t=(function(o){r(a,o);function a(){var s=o!==null&&o.apply(this,arguments)||this;return s.type=e.EDataLabelProviderType.PolarDefault,s}return a.prototype.getDataLabelState=function(s,l,u,c,d,f){return new n.PolarDataLabelState(s,l,u,c,d,f)},a})(i.DataLabelProvider);return KE.PolarDataLabelProvider=t,KE}var JE={},lse;function CU(){if(lse)return JE;lse=1;var r=JE&&JE.__extends||(function(){var s=function(l,u){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(c[f]=d[f])},s(l,u)};return function(l,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");s(l,u);function c(){this.constructor=l}l.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}})();Object.defineProperty(JE,"__esModule",{value:!0}),JE.PolarInterpolateLineRenderDataTransform=void 0;var e=Mr(),i=oi(),n=Ul(),t=G1(),o=dg(),a=(function(s){r(l,s);function l(){var u=s!==null&&s.apply(this,arguments)||this;return u.pointsForWholeCircle=360,u}return l.prototype.runTransform=function(u){var c,d=(c=this.parentSeries.interpolateLine)!==null&&c!==void 0?c:!1,f=this.parentSeries.drawNaNAs===n.ELineDrawMode.PolyLine,h=this.parentSeries.xAxis.visibleRange.diff;return(d!==this.previnterpolateLine||this.prevDiff!==h||f!==this.prevCloseNanGaps)&&(this.requiresTransform=!0,this.previnterpolateLine=d,this.prevDiff=h,this.prevCloseNanGaps=f),s.prototype.runTransform.call(this,u)},l.prototype.createPointSeries=function(){var u=new t.XyPointSeriesResampled(this.wasmContext,new i.NumberRange(0,0));return this.inParams=new this.wasmContext.SCRTPolarInterpolationParams,this.outParams=new this.wasmContext.SCRTPolarInterpolationParams,this.outParams.SetIndexes(u.indexes),this.outParams.SetX(u.xValues),this.outParams.SetY(u.yValues),u},l.prototype.runTransformInternal=function(u){var c,d=(c=this.parentSeries.interpolateLine)!==null&&c!==void 0?c:!1;if(!d)return u.pointSeries;this.inParams.Reset();var f=u.isVerticalChart?u.pointSeries.xValues:u.pointSeries.yValues,h=u.isVerticalChart?u.pointSeries.yValues:u.pointSeries.xValues;this.inParams.SetIndexes(u.pointSeries.indexes),this.inParams.SetX(h),this.inParams.SetY(f);var p=u.isVerticalChart?this.parentSeries.xAxis:this.parentSeries.yAxis,g=u.isVerticalChart?this.parentSeries.yAxis:this.parentSeries.xAxis;return this.wasmContext.SCRTInterpolatePolarLine(this.inParams,this.outParams,p.getCurrentCoordinateCalculator().nativeCalculator,g.visibleRange.diff,this.pointsForWholeCircle,this.parentSeries.drawNaNAs===n.ELineDrawMode.PolyLine),this.pointSeries},l.prototype.delete=function(){this.inParams=(0,e.deleteSafe)(this.inParams),this.outParams=(0,e.deleteSafe)(this.outParams),s.prototype.delete.call(this)},l})(o.BaseRenderDataTransform);return JE.PolarInterpolateLineRenderDataTransform=a,JE}var QE={},use;function ij(){if(use)return QE;use=1;var r=QE&&QE.__extends||(function(){var n=function(t,o){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(a[l]=s[l])},n(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");n(t,o);function a(){this.constructor=t}t.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}})();Object.defineProperty(QE,"__esModule",{value:!0}),QE.PolarLineSeriesDrawingProvider=void 0;var e=hX(),i=(function(n){r(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.updateArgs=function(o){var a=this.parentSeries.xAxis;this.args.SetCoordinateTransform(a.getTransform())},t})(e.LineSeriesDrawingProvider);return QE.PolarLineSeriesDrawingProvider=i,QE}var eA={},cse;function i_(){if(cse)return eA;cse=1;var r=eA&&eA.__extends||(function(){var n=function(t,o){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(a[l]=s[l])},n(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");n(t,o);function a(){this.constructor=t}t.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}})();Object.defineProperty(eA,"__esModule",{value:!0}),eA.PolarPointMarkerDrawingProvider=void 0;var e=$d(),i=(function(n){r(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.updateArgs=function(o){var a=this.parentSeries.xAxis;this.args.SetCoordinateTransform(a.getTransform())},t})(e.PointMarkerDrawingProvider);return eA.PolarPointMarkerDrawingProvider=i,eA}var tA={},f2={},dse;function PX(){if(dse)return f2;dse=1,Object.defineProperty(f2,"__esModule",{value:!0}),f2.polarHitTestHelpers=void 0;var r=Mr();function e(n,t,o,a,s,l){var u=t.isCategoryCoordinateCalculator,c=u?a.getNativeIndexes():a.getNativeXValues(),d=a.getNativeYValues(),f;try{return f=n.SCRTHitTestHelper.GetNearestPolarXyPoint(t.nativeCalculator,o.nativeCalculator,c,d,s,l,!1,!1),{nearestPointIndex:f.minD,distance:f.maxD}}finally{(0,r.deleteSafe)(f)}}function i(n,t,o,a,s,l){var u=t.isCategoryCoordinateCalculator,c=u?a.getNativeIndexes():a.getNativeXValues(),d=a.getNativeYValues(),f;try{f=n.SCRTHitTestHelper.GetNearestPolarXyPoint(t.nativeCalculator,o.nativeCalculator,c,d,s,l,!0,!0);var h=f.minD,p=f.maxD;if(h===-1||a.count()===0)return{nearestPointIndex:-1,distance:void 0,secondNearestPointIndex:-1};if(a.count()===1)return{nearestPointIndex:h,distance:p,secondNearestPointIndex:-1};var g=c.get(1)-c.get(0)>0,v=t.getDataValue(s),y=v>=c.get(h)&&g||v<=c.get(h)&&!g?h+1:h-1;return y<0||y>=a.count()?{nearestPointIndex:h,distance:p,secondNearestPointIndex:-1}:!(c.get(h)<=v&&v<=c.get(y))&&!(c.get(h)>=v&&v>=c.get(y))?{nearestPointIndex:h,distance:p,secondNearestPointIndex:-1}:{nearestPointIndex:h,distance:p,secondNearestPointIndex:y}}finally{(0,r.deleteSafe)(f)}}return f2.polarHitTestHelpers={getNearestPolarPoint:e,getNearestPolarPointXDirSorted:i},f2}var fse;function J1(){if(fse)return tA;fse=1;var r=tA&&tA.__extends||(function(){var s=function(l,u){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(c[f]=d[f])},s(l,u)};return function(l,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");s(l,u);function c(){this.constructor=l}l.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}})();Object.defineProperty(tA,"__esModule",{value:!0}),tA.PolarDataPointHitTestProvider=void 0;var e=Js(),i=vs(),n=Rs(),t=PX(),o=10,a=(function(s){r(l,s);function l(){return s!==null&&s.apply(this,arguments)||this}return l.prototype.hitTest=function(u,c,d){return d===void 0&&(d=o),this.hitTestDataPointInternal(u,c,d)},l.prototype.hitTestDataPoint=function(u,c,d){var f=d>0?d:o;return this.hitTestDataPointInternal(u,c,f)},l.prototype.hitTestXSlice=function(u,c){return this.hitTest(u,c,o)},l.prototype.hitTestDataPointInternal=function(u,c,d){var f=this.getTranslatedHitTestPoint(u,c);if(!f)return i.HitTestInfo.empty();var h=this.parentSeries.xAxis.reverseTransform(f.x,f.y),p=this.currentRenderPassData,g=p.xCoordinateCalculator,v=p.yCoordinateCalculator,y=p.isVerticalChart,m=y?h.y:h.x,b=y?h.x:h.y,S=this.parentSeries.dataSeries;if(!S)return i.HitTestInfo.empty();var _=t.polarHitTestHelpers.getNearestPolarPoint(this.webAssemblyContext,g,v,S,m,b),C=S.getNativeXValues(),T=S.getNativeYValues(),x=n.hitTestHelpers.createHitTestInfo(this.parentSeries,g,v,y,S,C,T,m,b,_.nearestPointIndex,d);return x.isHit=_.distance<d,x},l})(e.BaseHitTestProvider);return tA.PolarDataPointHitTestProvider=a,tA}var hse;function nCe(){if(hse)return XE;hse=1;var r=XE&&XE.__extends||(function(){var c=function(d,f){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(h[g]=p[g])},c(d,f)};return function(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");c(d,f);function h(){this.constructor=d}d.prototype=f===null?Object.create(f):(h.prototype=f.prototype,new h)}})();Object.defineProperty(XE,"__esModule",{value:!0}),XE.PolarLineRenderableSeries=void 0;var e=oi(),i=tn(),n=Xv(),t=Z1(),o=CU(),a=ij(),s=i_(),l=J1(),u=(function(c){r(d,c);function d(f,h){var p=this,g,v,y,m;return p=c.call(this,f,h)||this,p.isPolar=!0,p.type=i.ESeriesType.PolarLineSeries,p.clipToTotalAngleProperty=!1,p.interpolateLineProperty=!1,p.dataLabelProviderProperty||(p.dataLabelProviderProperty=new t.PolarDataLabelProvider(h==null?void 0:h.dataLabels),p.dataLabelProviderProperty.onAttach(p.webAssemblyContext,p)),!((g=p.paletteProvider)===null||g===void 0)&&g.onAttached&&((v=p.paletteProvider)===null||v===void 0||v.onAttached(p)),p.renderDataTransformProperty=new o.PolarInterpolateLineRenderDataTransform(p,p.webAssemblyContext,[]),p.clipToTotalAngleProperty=(y=h==null?void 0:h.clipToTotalAngle)!==null&&y!==void 0?y:p.clipToTotalAngleProperty,p.interpolateLine=(m=h==null?void 0:h.interpolateLine)!==null&&m!==void 0?m:p.interpolateLineProperty,p}return Object.defineProperty(d.prototype,"interpolateLine",{get:function(){return this.interpolateLineProperty},set:function(f){this.interpolateLineProperty!==f&&(this.interpolateLineProperty=f,this.interpolateLineProperty?this.renderDataTransform.drawingProviders=[this.drawingProviders[0]]:this.renderDataTransform.drawingProviders=[],this.notifyPropertyChanged("interpolateLine"))},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"clipToTotalAngle",{get:function(){return this.clipToTotalAngleProperty},set:function(f){this.clipToTotalAngleProperty!==f&&(this.clipToTotalAngleProperty=f,this.notifyPropertyChanged("clipToTotalAngle"))},enumerable:!1,configurable:!0}),d.prototype.getIndicesRange=function(f,h){return this.clipToTotalAngle?c.prototype.getIndicesRange.call(this,f,h):new e.NumberRange(0,this.dataSeries.count()-1)},d.prototype.toJSON=function(f){f===void 0&&(f=!1);var h=c.prototype.toJSON.call(this,f),p={clipToTotalAngle:this.clipToTotalAngle,interpolateLine:this.interpolateLine};return Object.assign(h.options,p),h},d.prototype.addDrawingProviders=function(f,h){this.drawingProviders.push(new a.PolarLineSeriesDrawingProvider(f,this)),this.drawingProviders.push(new s.PolarPointMarkerDrawingProvider(f,this))},d.prototype.newHitTestProvider=function(){return new l.PolarDataPointHitTestProvider(this,this.webAssemblyContext)},d})(n.BaseLineRenderableSeries);return XE.PolarLineRenderableSeries=u,XE}var rA={},iA={},pse;function oCe(){if(pse)return iA;pse=1;var r=iA&&iA.__extends||(function(){var s=function(l,u){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(c[f]=d[f])},s(l,u)};return function(l,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");s(l,u);function c(){this.constructor=l}l.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}})();Object.defineProperty(iA,"__esModule",{value:!0}),iA.PolarInterpolateBandRenderDataTransform=void 0;var e=Mr(),i=oi(),n=Ul(),t=K1(),o=dg(),a=(function(s){r(l,s);function l(){var u=s!==null&&s.apply(this,arguments)||this;return u.pointsForWholeCircle=360,u}return l.prototype.runTransform=function(u){var c,d=(c=this.parentSeries.interpolateLine)!==null&&c!==void 0?c:!1,f=this.parentSeries.drawNaNAs===n.ELineDrawMode.PolyLine,h=this.parentSeries.xAxis.visibleRange.diff;return(d!==this.prevInterpolateLine||this.prevDiff!==h||f!==this.prevCloseNanGaps)&&(this.requiresTransform=!0,this.prevInterpolateLine=d,this.prevDiff=h,this.prevCloseNanGaps=f),s.prototype.runTransform.call(this,u)},l.prototype.createPointSeries=function(){var u=new t.XyyPointSeriesResampled(this.wasmContext,new i.NumberRange(0,0));return this.inParams=new this.wasmContext.SCRTPolarInterpolationParams,this.outParams=new this.wasmContext.SCRTPolarInterpolationParams,this.outParams.SetIndexes(u.indexes),this.outParams.SetX(u.xValues),this.outParams.SetY(u.yValues),this.outParams.SetY1(u.y1Values),u},l.prototype.runTransformInternal=function(u){var c,d=(c=this.parentSeries.interpolateLine)!==null&&c!==void 0?c:!1;return d?(this.inParams.Reset(),this.inParams.SetIndexes(u.pointSeries.indexes),this.inParams.SetX(u.pointSeries.xValues),this.inParams.SetY(u.pointSeries.yValues),this.inParams.SetY1(u.pointSeries.y1Values),this.wasmContext.SCRTInterpolatePolarBand(this.inParams,this.outParams,this.parentSeries.yAxis.getCurrentCoordinateCalculator().nativeCalculator,this.parentSeries.xAxis.visibleRange.diff,this.pointsForWholeCircle,this.parentSeries.drawNaNAs===n.ELineDrawMode.PolyLine),this.pointSeries):u.pointSeries},l.prototype.delete=function(){this.inParams=(0,e.deleteSafe)(this.inParams),this.outParams=(0,e.deleteSafe)(this.outParams),s.prototype.delete.call(this)},l})(o.BaseRenderDataTransform);return iA.PolarInterpolateBandRenderDataTransform=a,iA}var nA={},gse;function TU(){if(gse)return nA;gse=1;var r=nA&&nA.__extends||(function(){var h=function(p,g){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var m in y)Object.prototype.hasOwnProperty.call(y,m)&&(v[m]=y[m])},h(p,g)};return function(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");h(p,g);function v(){this.constructor=p}p.prototype=g===null?Object.create(g):(v.prototype=g.prototype,new v)}})();Object.defineProperty(nA,"__esModule",{value:!0}),nA.PolarBandSeriesDrawingProvider=void 0;var e=Mr(),i=iu(),n=Il(),t=mi(),o=Qn(),a=xo(),s=hl(),l=ln(),u=Ji(),c=vl(),d=So(),f=(function(h){r(p,h);function p(g,v,y,m){var b=h.call(this,g,v,y)||this;return b.args=new b.webAssemblyContext.SCRTPolarBandDrawingParams,b.y1Selector=m??(function(S){return S.y1Values}),b.fillBrushCache=new s.BrushCache(g),b.fillBrushY1Cache=new s.BrushCache(g),b}return p.prototype.onAttachSeries=function(){h.prototype.onAttachSeries.call(this),this.nativeDrawingProvider=new this.webAssemblyContext.SCRTPolarBandSeriesDrawingProvider,this.onSeriesPropertyChange(u.PROPERTY.FILL),(this.parentSeries.fillY1||this.parentSeries.fillLinearGradientY1)&&this.onSeriesPropertyChange(u.PROPERTY.FILL_Y1)},p.prototype.onDetachSeries=function(){h.prototype.onDetachSeries.call(this),this.delete()},p.prototype.delete=function(){this.nativeDrawingProvider=(0,e.deleteSafe)(this.nativeDrawingProvider),this.args=(0,e.deleteSafe)(this.args),this.fillBrushCache=(0,e.deleteSafe)(this.fillBrushCache),this.fillBrushY1Cache=(0,e.deleteSafe)(this.fillBrushY1Cache),h.prototype.delete.call(this)},p.prototype.draw=function(g,v){var y,m,b=v.pointSeries;this.parentSeries.dataSeries.dataDistributionCalculator.containsNaN,this.args.Reset();var S=(0,s.getScrtBrushFromCache)(this.fillBrushCache);S&&this.args.SetFillBrush(S);var _=(0,s.getScrtBrushFromCache)(this.fillBrushY1Cache);_&&this.args.SetFillBrush1(_);var C=v.xCoordinateCalculator.isCategoryCoordinateCalculator,T=b.xValues,x=this.parentSeries.dataSeries,A=x.fifoCapacity,w=x.fifoSweeping,L=x.fifoSweepingGap,k=b.fifoStartIndex,D=C?b.indexes:T,j=this.ySelector(b),N=this.y1Selector(b),V=this.getStartAndCount(v,D),W=V.startIndex,K=V.count;this.args.count=K,this.args.startIndex=W,A>0&&w&&A===this.parentSeries.dataSeries.count()&&(this.args.count=k);var H=this.parentSeries.xAxis;this.args.SetCoordinateTransform(H.getTransform()),this.args.SetXValues(D),this.args.SetYValues(j),N?this.args.SetZValues(N):this.args.zeroLineY=(y=this.parentSeries.zeroLineY)!==null&&y!==void 0?y:0,this.applyFillFillPaletting(this.parentSeries.fill,S,this.parentSeries.fillY1,_,this.parentSeries.opacity,W,K,b,D,j),this.args.SetPalettedColors(this.palettingState.palettedColors),this.args.scaleGradientToYRange=(m=this.parentSeries.scaleGradientToYRange)!==null&&m!==void 0?m:!1,this.args.isSmoothColors=this.palettingState.gradientPaletting;var U=g.getNativeContext();this.args.SetNativeContext(U),this.args.SetXCoordinateCalculator(v.xCoordinateCalculator.nativeCalculator),this.args.SetYCoordinateCalculator(v.yCoordinateCalculator.nativeCalculator),this.nativeDrawingProvider.DrawPoints(this.args),A>0&&w&&A===this.parentSeries.dataSeries.count()&&(this.args.startIndex=Math.min(j.size(),k+L),this.args.count=Math.max(0,j.size()-k-L),this.args.count>0&&this.nativeDrawingProvider.DrawPoints(this.args))},p.prototype.applyFillFillPaletting=function(g,v,y,m,b,S,_,C,T,x){var A,w=this.parentSeries.hasFillPaletteProvider(),L=this.parentSeries.paletteProvider;if(w){var k=void 0,D=void 0,j=b!==void 0;if(k=g&&j?(0,i.uintArgbColorMultiplyOpacity)((0,t.parseColorToUIntArgb)(g),1):d.NEUTRAL_COLOR,D=y&&j?(0,i.uintArgbColorMultiplyOpacity)((0,t.parseColorToUIntArgb)(y),1):d.NEUTRAL_COLOR,isNaN(k))throw Error("updatePalette(): fillColor "+k+" cannot be converted to a valid color");if(isNaN(D))throw Error("updatePalette(): fillColor for y1 "+D+" cannot be converted to a valid color");this.palettingState.palettedColors||(this.palettingState.palettedColors=new this.webAssemblyContext.UIntVector),this.palettingState.paletteTextureCache.reset(),this.palettingState.palettedColors.resize(_*2,0),v&&(this.palettingState.originalBrushColor=v.GetColor(),v.SetColor(d.NEUTRAL_COLOR)),m&&(this.palettingState.originalBrushColory1=m.GetColor(),m.SetColor(d.NEUTRAL_COLOR));for(var N=0,V=this.parentSeries.dataSeries,W=V.count(),K=C&&C.indexes.size()>0,H=(0,o.vectorToArrayViewF64)(C==null?void 0:C.indexes,this.webAssemblyContext),U=(0,o.vectorToArrayViewF64)(T,this.webAssemblyContext),I=(0,o.vectorToArrayViewF64)(x,this.webAssemblyContext),Q=(0,o.vectorToArrayViewUi32)(this.palettingState.palettedColors,this.webAssemblyContext),Z=new Map,ee=0,ie=V.valueNames;ee<ie.length;ee++){var de=ie[ee];de!==a.EValueName.Y&&Z.set(de,(0,o.vectorToArrayViewF64)(V.getYValuesByName(de),this.webAssemblyContext))}for(var pe=0,_e=S;_e<S+_;_e++){var Te=K?H[_e]:_e;Te<0?Te=0:Te>=W&&(Te=W-1);var De=U[_e],Pe=I[_e],Ee=V.getMetadataAt(Te),Re=L.overrideFillArgb(De,Pe,Te,b,Ee,Z);Q[pe]=Re??k,pe++,Q[pe]=Re??D,pe++,N=(0,n.numericHashCode)(N,Re)}}else this.palettingState.paletteTextureCache.reset(),(A=this.palettingState.palettedColors)===null||A===void 0||A.clear(),v&&this.palettingState.originalBrushColor&&(v.SetColor(this.palettingState.originalBrushColor),this.palettingState.originalBrushColor=void 0),m&&this.palettingState.originalBrushColory1&&(m.SetColor(this.palettingState.originalBrushColory1),this.palettingState.originalBrushColory1=void 0);this.palettingState.palettedColors||(this.palettingState.palettedColors=new this.webAssemblyContext.UIntVector),this.palettingState.gradientPaletting=this.isGradientFillPaletting(this.parentSeries)},p.prototype.onSeriesPropertyChange=function(g){h.prototype.onSeriesPropertyChange.call(this,g);var v=this.parentSeries,y=v.fill,m=v.fillY1,b=v.opacity,S=v.fillLinearGradient,_=v.fillLinearGradientY1,C=v.parentSurface,T=C!=null&&C.isCopyCanvasSurface?C.domCanvas2D.height/l.SciChartSurfaceBase.domMasterCanvas.height:1,x=C!=null&&C.isCopyCanvasSurface?C.domCanvas2D.width/l.SciChartSurfaceBase.domMasterCanvas.width:1;(g===u.PROPERTY.FILL||g===u.PROPERTY.OPACITY||g===u.PROPERTY.FILL_LINEAR_GRADIENT)&&(0,s.createBrushInCache)(this.fillBrushCache,y,b,T,x,S),(g===u.PROPERTY.FILL_Y1||g===u.PROPERTY.OPACITY||g===u.PROPERTY.FILL_LINEAR_GRADIENT)&&(0,s.createBrushInCache)(this.fillBrushY1Cache,m,b,T,x,_)},p})(c.BaseSeriesDrawingProvider);return nA.PolarBandSeriesDrawingProvider=f,nA}var vse;function aCe(){if(vse)return rA;vse=1;var r=rA&&rA.__extends||(function(){var c=function(d,f){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(h[g]=p[g])},c(d,f)};return function(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");c(d,f);function h(){this.constructor=d}d.prototype=f===null?Object.create(f):(h.prototype=f.prototype,new h)}})();Object.defineProperty(rA,"__esModule",{value:!0}),rA.PolarBandRenderableSeries=void 0;var e=ub(),i=tn(),n=hU(),t=Xv(),o=oCe(),a=TU(),s=ij(),l=i_(),u=(function(c){r(d,c);function d(f,h){var p=this,g,v,y,m;return p=c.call(this,f,h)||this,p.isPolar=!0,p.type=i.ESeriesType.PolarBandSeries,p.lineType=t.ELineType.Normal,p.clipToTotalAngle=!1,p.interpolateLineProperty=!1,p.renderDataTransformProperty=new o.PolarInterpolateBandRenderDataTransform(p,p.webAssemblyContext,[]),p.interpolateLine=(g=h==null?void 0:h.interpolateLine)!==null&&g!==void 0?g:p.interpolateLineProperty,p.scaleGradientToYRangeProperty=(v=h==null?void 0:h.scaleGradientToYRange)!==null&&v!==void 0?v:p.scaleGradientToYRangeProperty,!((y=p.paletteProvider)===null||y===void 0)&&y.onAttached&&((m=p.paletteProvider)===null||m===void 0||m.onAttached(p)),p}return Object.defineProperty(d.prototype,"isDigitalLine",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"scaleGradientToYRange",{get:function(){return this.scaleGradientToYRangeProperty},set:function(f){this.scaleGradientToYRangeProperty!==f&&(this.scaleGradientToYRangeProperty=f,this.notifyPropertyChanged("SCALE_GRADIENT_TO_Y_RANGE"))},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"interpolateLine",{get:function(){return this.interpolateLineProperty},set:function(f){this.interpolateLineProperty!==f&&(this.interpolateLineProperty=f,this.interpolateLineProperty?this.renderDataTransform.drawingProviders=this.drawingProviders:this.renderDataTransform.drawingProviders=[],this.notifyPropertyChanged("interpolateLine"))},enumerable:!1,configurable:!0}),d.prototype.getIndicesRange=function(f,h){return this.clipToTotalAngle?c.prototype.getIndicesRange.call(this,f,h):new e.NumberRange(0,this.dataSeries.count()-1)},d.prototype.toJSON=function(f){f===void 0&&(f=!1);var h=c.prototype.toJSON.call(this,f),p={scaleGradientToYRange:this.scaleGradientToYRange,interpolateLine:this.interpolateLine};return Object.assign(h.options,p),h},d.prototype.addDrawingProviders=function(f,h){this.drawingProviders.push(new a.PolarBandSeriesDrawingProvider(f,this)),this.drawingProviders.push(new s.PolarLineSeriesDrawingProvider(f,this));var p=new s.PolarLineSeriesDrawingProvider(f,this,function(g){return g.y1Values});p.getProperties=function(g){var v=g,y=v.strokeY1,m=v.strokeThickness,b=v.opacity,S=v.strokeY1DashArray,_=v.isDigitalLine,C=v.drawNaNAs,T=v.lineType;return{stroke:y,strokeThickness:m,opacity:b,strokeDashArray:S,isDigitalLine:_,drawNaNAs:C,lineType:T,containsNaN:void 0}},this.drawingProviders.push(p),this.drawingProviders.push(new l.PolarPointMarkerDrawingProvider(f,this)),this.drawingProviders.push(new l.PolarPointMarkerDrawingProvider(f,this,function(g){return g.y1Values},void 0))},d})(n.BaseBandRenderableSeries);return rA.PolarBandRenderableSeries=u,rA}var n0={},oA={},yse;function CX(){if(yse)return oA;yse=1;var r=oA&&oA.__extends||(function(){var u=function(c,d){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,h){f.__proto__=h}||function(f,h){for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(f[p]=h[p])},u(c,d)};return function(c,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");u(c,d);function f(){this.constructor=c}c.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}})();Object.defineProperty(oA,"__esModule",{value:!0}),oA.PolarColumnSeriesDrawingProvider=void 0;var e=Mr(),i=hl(),n=ts(),t=Ji(),o=vl(),a=zc(),s=xo(),l=(function(u){r(c,u);function c(d,f){var h=u.call(this,d,f)||this;return h.nativeDrawingProvider=new d.SCRTPolarColumnSeriesDrawingProvider,h.args=new h.webAssemblyContext.SCRTPolarColumnDrawingParams,h.strokePenCache=new n.Pen2DCache(d),h.strokePenFillColoredCache=new n.Pen2DCache(d),h.fillBrushCache=new i.BrushCache(d),h}return c.prototype.onAttachSeries=function(){u.prototype.onAttachSeries.call(this);var d=this.parentSeries,f=d.stroke,h=d.strokeThickness,p=d.fill,g=d.opacity;(0,n.createPenInCache)(this.strokePenCache,f,h,g),h===0&&(0,n.createPenInCache)(this.strokePenFillColoredCache,p,1,g),this.createBrush()},c.prototype.delete=function(){this.nativeDrawingProvider=(0,e.deleteSafe)(this.nativeDrawingProvider),this.args=(0,e.deleteSafe)(this.args),this.strokePenCache=(0,e.deleteSafe)(this.strokePenCache),this.strokePenFillColoredCache=(0,e.deleteSafe)(this.strokePenFillColoredCache),this.fillBrushCache=(0,e.deleteSafe)(this.fillBrushCache),u.prototype.delete.call(this)},c.prototype.draw=function(d,f){var h=f.pointSeries,p=this.parentSeries.strokeThickness;this.args.Reset(),this.args.verticalChart=f.isVerticalChart,this.args.xMode=(0,a.convertColumnMode)(this.parentSeries.columnXMode,this.webAssemblyContext),this.args.defaultY2=this.parentSeries.defaultY1,this.args.columnWidth=this.parentSeries.getDataPointWidth(f.xCoordinateCalculator,this.parentSeries.dataPointWidth,this.parentSeries.dataPointWidthMode);var g=this.strokePenCache;this.args.columnWidth===1&&p===0&&(this.args.columnWidth=0,g=this.strokePenFillColoredCache);var v=(0,n.getScrtPenFromCache)(g);v&&this.args.SetLinesPen(v);var y=(0,i.getScrtBrushFromCache)(this.fillBrushCache);y&&this.args.SetFillBrush(y);var m=this.parentSeries.xAxis;this.args.SetCoordinateTransform(m.getTransform()),u.prototype.applyStrokeFillPaletting.call(this,this.parentSeries.stroke,v,this.parentSeries.fill,y,this.parentSeries.opacity,!1,this.parentSeries.fillLinearGradient!==void 0),this.args.SetPalettedColors(this.palettingState.palettedColors);var b=f.xCoordinateCalculator.isCategoryCoordinateCalculator,S=this.xSelector(h),_=this.ySelector(h),C=b?h.indexes:S,T=this.getStartAndCount(f,C),x=T.startIndex,A=T.count;this.args.count=A,this.args.startIndex=x;var w=this.parentSeries.dataSeries,L=w.fifoCapacity,k=w.fifoSweeping,D=w.fifoSweepingGap,j=h.fifoStartIndex;if(k&&L===this.parentSeries.dataSeries.count()&&(this.args.count=j),this.args.SetXValues(C),_&&this.args.SetYValues(_),this.parentSeries.columnXMode===a.EColumnMode.MidWidth||this.parentSeries.columnXMode===a.EColumnMode.StartEnd||this.parentSeries.columnXMode===a.EColumnMode.StartWidth){var N=h.getYValuesByName(s.EValueName.X1);if(N)this.args.SetZValues(N);else throw new Error("polarColumnMode ".concat(this.parentSeries.columnXMode," requires an DataSeries with a yValue called ").concat(s.EValueName.X1))}var V=h.getYValuesByName(s.EValueName.Y1);V&&this.args.SetWValues(V),this.args.segmentCount=180;var W=d.getNativeContext();this.args.SetNativeContext(W),this.args.SetXCoordinateCalculator(f.xCoordinateCalculator.nativeCalculator),this.args.SetYCoordinateCalculator(f.yCoordinateCalculator.nativeCalculator),this.nativeDrawingProvider.DrawPoints(this.args),k&&L===this.parentSeries.dataSeries.count()&&(this.args.startIndex=Math.min(_.size(),j+D),this.args.count=Math.max(0,_.size()-j-D),this.args.count>0&&this.nativeDrawingProvider.DrawPoints(this.args))},c.prototype.onDpiChanged=function(d){u.prototype.onDpiChanged.call(this,d),this.onSeriesPropertyChange(t.PROPERTY.STROKE)},c.prototype.onSeriesPropertyChange=function(d){u.prototype.onSeriesPropertyChange.call(this,d);var f=this.parentSeries,h=f.stroke,p=f.strokeThickness,g=f.opacity,v=f.fill;(d===t.PROPERTY.STROKE||d===t.PROPERTY.STROKE_THICKNESS||d===t.PROPERTY.OPACITY)&&(0,n.createPenInCache)(this.strokePenCache,h,p,g),(d===t.PROPERTY.FILL||d===t.PROPERTY.OPACITY||d===t.PROPERTY.CUSTOM_TEXTURE_OPTIONS)&&this.createBrush(),p===0&&(d===t.PROPERTY.STROKE_THICKNESS||d===t.PROPERTY.STROKE||d===t.PROPERTY.OPACITY||d===t.PROPERTY.FILL)&&(0,n.createPenInCache)(this.strokePenFillColoredCache,v,1,g)},c.prototype.createBrush=function(){var d=this.parentSeries,f=d.fill,h=d.opacity,p=d.fillLinearGradient;d.parentSurface;var g=d.customTextureOptions,v=this.fillBrushCache.create(f,h,1,1,p,g);return v.scrtBrush},c})(o.BaseSeriesDrawingProvider);return oA.PolarColumnSeriesDrawingProvider=l,oA}var o0={},aA={},mse;function sCe(){if(mse)return aA;mse=1;var r=aA&&aA.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(aA,"__esModule",{value:!0}),aA.PolarColumnDataLabelState=void 0;var e=xo(),i=Qn(),n=PU(),t=(function(o){r(a,o);function a(s,l,u,c,d,f){var h=o.call(this,s,l,u,c,d,f)||this;h.x1CoordCache=void 0,h.zeroXCoordCache=void 0,h.zeroYCoordCache=void 0,h.accumulatedWidthCoordCache=void 0,h.accumulatedWidthValues=[];var p=l.pointSeries;return h.x1Values=p.getYValuesByName(e.EValueName.X1)?(0,i.vectorToArrayViewF64)(p.getYValuesByName(e.EValueName.X1),s.webAssemblyContext):h.xValues,h.columnWidthProperty=f.getDataPointWidth(l.xCoordinateCalculator,f.dataPointWidth,f.dataPointWidthMode),h.isFlippedProperty=l.xCoordinateCalculator.isFlipped,h}return a.prototype.fillAccumulatedWidthValues=function(){this.accumulatedWidthValues=[];var s=0;this.accumulatedWidthValues.push(s);for(var l=0;l<this.xValues.length-1;l++)s+=this.xValues[l],this.accumulatedWidthValues.push(s)},Object.defineProperty(a.prototype,"columnWidth",{get:function(){return this.columnWidthProperty},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"isFlipped",{get:function(){return this.isFlippedProperty},enumerable:!1,configurable:!0}),a.prototype.x1Val=function(s){return this.x1Values[this.getIndexInternal(s)]},a.prototype.accumulatedWidth=function(s){return this.accumulatedWidthValues?this.accumulatedWidthValues[this.getIndexInternal(s)]:this.xVal(s)},a.prototype.accumulatedWidthCoord=function(s){return s!==void 0?this.renderPassData.xCoordinateCalculator.getCoordinate(this.accumulatedWidth(s)):this.accumulatedWidthCoordCache!==void 0?this.accumulatedWidthCoordCache:(this.accumulatedWidthCoordCache=this.renderPassData.xCoordinateCalculator.getCoordinate(this.accumulatedWidth()),this.accumulatedWidthCoordCache)},Object.defineProperty(a.prototype,"index",{get:function(){return this.indexProperty},set:function(s){this.xCoordCache=void 0,this.yCoordCache=void 0,this.x1CoordCache=void 0,this.accumulatedWidthCoordCache=void 0,this.indexProperty=s},enumerable:!1,configurable:!0}),a.prototype.x1Coord=function(s){return s!==void 0?this.renderPassData.xCoordinateCalculator.getCoordinate(this.x1Val(s)):this.x1CoordCache!==void 0?this.x1CoordCache:(this.x1CoordCache=this.renderPassData.xCoordinateCalculator.getCoordinate(this.x1Val()),this.x1CoordCache)},Object.defineProperty(a.prototype,"zeroXCoord",{get:function(){return this.zeroXCoordCache||(this.zeroXCoordCache=this.renderPassData.xCoordinateCalculator.getCoordinate(0)),this.zeroXCoordCache},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"zeroYCoord",{get:function(){return this.zeroYCoordCache||(this.zeroYCoordCache=this.renderPassData.yCoordinateCalculator.getCoordinate(0)),this.zeroYCoordCache},enumerable:!1,configurable:!0}),a})(n.PolarDataLabelState);return aA.PolarColumnDataLabelState=t,aA}var bse;function TX(){if(bse)return o0;bse=1;var r=o0&&o0.__extends||(function(){var h=function(p,g){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var m in y)Object.prototype.hasOwnProperty.call(y,m)&&(v[m]=y[m])},h(p,g)};return function(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");h(p,g);function v(){this.constructor=p}p.prototype=g===null?Object.create(g):(v.prototype=g.prototype,new v)}})(),e=o0&&o0.__assign||function(){return e=Object.assign||function(h){for(var p,g=1,v=arguments.length;g<v;g++){p=arguments[g];for(var y in p)Object.prototype.hasOwnProperty.call(p,y)&&(h[y]=p[y])}return h},e.apply(this,arguments)};Object.defineProperty(o0,"__esModule",{value:!0}),o0.PolarColumnSeriesDataLabelProvider=void 0;var i=Ii(),n=zc(),t=ku(),o=oX(),a=Du(),s=kM(),l=H1(),u=QR(),c=sCe(),d=Z1(),f=(function(h){r(p,h);function p(g){var v=this,y,m;return v=h.call(this,e({horizontalTextPosition:a.EHorizontalTextPosition.Center,verticalTextPosition:a.EVerticalTextPosition.Center,skipMode:o.EDataLabelSkipMode.ShowAll},g))||this,v.type=t.EDataLabelProviderType.PolarColumn,v.polarLabelModeProperty=s.EPolarLabelMode.Horizontal,v.yPositionMultiplierProperty=.5,v.labelYPositionModeProperty=u.EColumnDataLabelPosition.Outside,v.polarLabelModeProperty=(y=g==null?void 0:g.polarLabelMode)!==null&&y!==void 0?y:v.polarLabelModeProperty,v.yPositionMultiplierProperty=g==null?void 0:g.labelYPositionMultiplier,v.labelYPositionModeProperty=(m=g==null?void 0:g.labelYPositionMode)!==null&&m!==void 0?m:v.labelYPositionModeProperty,v}return p.prototype.shouldSkipLabel=function(g,v){return!1},Object.defineProperty(p.prototype,"polarLabelMode",{get:function(){return this.polarLabelModeProperty},set:function(g){this.polarLabelModeProperty=g,this.invalidateParent()},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"yPositionMultiplier",{get:function(){return this.yPositionMultiplierProperty},set:function(g){this.yPositionMultiplierProperty=g,this.invalidateParent()},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"labelYPositionMode",{get:function(){return this.labelYPositionModeProperty},set:function(g){this.labelYPositionModeProperty=g,this.invalidateParent()},enumerable:!1,configurable:!0}),p.prototype.getDataLabelState=function(g,v,y,m,b,S){return new c.PolarColumnDataLabelState(g,v,y,m,b,S)},p.prototype.getPosition=function(g,v){var y,m=this.parentSeries,b=m.columnXMode,S=m.defaultY1,_=g.getYCoord(S);if(g.isVerticalChart){var Q=this.parentSeries.yAxis,C=Q.startAngle,Z=Q.flippedCoordinates,x=g.angleCoord(),k=x+C,ee=g.getYCoord(S),j=void 0;if(b===n.EColumnMode.Start){var A=g.isFlipped?-1:1;j=g.radiusCoord()+A*g.columnWidth/2}else if(b===n.EColumnMode.StartEnd){var ie=g.x1Coord();j=(g.radiusCoord()+ie)/2}else if(b===n.EColumnMode.StartWidth){var de=g.x1Coord()-g.zeroXCoord;j=g.radiusCoord()+de/2}else if(b===n.EColumnMode.Mid||b===n.EColumnMode.MidWidth)j=g.radiusCoord();else throw new Error("PolarColumnSeriesDataLabelProvider EColumnMode ".concat(b," is not supported for vertical chart"));var pe=0;if(this.polarLabelMode===s.EPolarLabelMode.Parallel)pe=Math.atan2(v.m_fWidth,j);else if(this.polarLabelMode===s.EPolarLabelMode.Perpendicular)pe=Math.atan2(v.m_fHeight,j);else if(this.polarLabelMode===s.EPolarLabelMode.Horizontal){var _e=Math.abs(Math.sin(k))*v.m_fWidth+Math.abs(Math.cos(k))*v.m_fHeight;pe=Math.atan2(_e,j)}else throw new Error("PolarColumnSeriesDataLabelProvider EPolarLabelMode ".concat(this.polarLabelMode," is not supported for vertical chart"));this.labelYPositionMode===u.EColumnDataLabelPosition.Outside?x=Z?x-pe:x+pe:this.labelYPositionMode===u.EColumnDataLabelPosition.Inside?x=Z?x+pe:x-pe:this.labelYPositionMode===u.EColumnDataLabelPosition.Position&&(x=ee+(x-ee)*this.yPositionMultiplier);var Te=g.toCartesian(x,j),V=Te.x,W=Te.y,K=new i.Point(V,W),H=l.labelHelper.getPolarLabelRotation(this.polarLabelMode,x+C);V-=v.m_fWidth/2;var U=v.GetLineBounds(0),I=v.m_fHeight-v.GetLineBounds(0).m_fHeight;return U.delete(),W-=I,W+=v.m_fHeight/2,{position:new i.Point(V,W),rotationCenter:K,rotationAngle:H}}else{var C=this.parentSeries.xAxis.startAngle,T=(y=this.yPositionMultiplier)!==null&&y!==void 0?y:.5,x=void 0;if(b===n.EColumnMode.Start){var A=g.isFlipped?-1:1;x=g.angleCoord()+A*g.columnWidth/2}else if(b===n.EColumnMode.StartEnd){var w=g.x1Coord();x=(g.angleCoord()+w)/2}else if(b===n.EColumnMode.StartWidth){var L=g.x1Coord()-g.zeroXCoord;x=g.angleCoord()+L/2}else x=g.angleCoord();var k=x+C,D=0;if(this.polarLabelMode===s.EPolarLabelMode.Parallel)D=v.m_fHeight;else if(this.polarLabelMode===s.EPolarLabelMode.Perpendicular)D=v.m_fWidth;else if(this.polarLabelMode===s.EPolarLabelMode.Horizontal)D=Math.abs(Math.sin(k))*v.m_fHeight+Math.abs(Math.cos(k))*v.m_fWidth;else throw new Error("PolarColumnSeriesDataLabelProvider EPolarLabelMode ".concat(this.polarLabelMode," is not supported for vertical chart"));var j=void 0;this.labelYPositionMode===u.EColumnDataLabelPosition.Outside?j=g.radiusCoord()+D:this.labelYPositionMode===u.EColumnDataLabelPosition.Inside?j=g.radiusCoord()-D:this.labelYPositionMode===u.EColumnDataLabelPosition.Position&&(j=_+(g.radiusCoord()-_)*T);var N=g.toCartesian(x,j),V=N.x,W=N.y,K=new i.Point(V,W),H=l.labelHelper.getPolarLabelRotation(this.polarLabelMode,k);V-=v.m_fWidth/2;var U=v.GetLineBounds(0),I=v.m_fHeight-U.m_fHeight;return U.delete(),W-=I,W+=v.m_fHeight/2,{position:new i.Point(V,W),rotationCenter:K,rotationAngle:H}}},p.prototype.toJSON=function(){var g=h.prototype.toJSON.call(this),v={polarLabelMode:this.polarLabelMode,labelYPositionMultiplier:this.yPositionMultiplier,labelYPositionMode:this.labelYPositionMode};return Object.assign(g.options,v),g},Object.defineProperty(p.prototype,"useRotation",{get:function(){return this.polarLabelMode!==s.EPolarLabelMode.Horizontal},enumerable:!1,configurable:!0}),p})(d.PolarDataLabelProvider);return o0.PolarColumnSeriesDataLabelProvider=f,o0}var Sse;function lCe(){if(Sse)return n0;Sse=1;var r=n0&&n0.__extends||(function(){var h=function(p,g){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var m in y)Object.prototype.hasOwnProperty.call(y,m)&&(v[m]=y[m])},h(p,g)};return function(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");h(p,g);function v(){this.constructor=p}p.prototype=g===null?Object.create(g):(v.prototype=g.prototype,new v)}})(),e=n0&&n0.__assign||function(){return e=Object.assign||function(h){for(var p,g=1,v=arguments.length;g<v;g++){p=arguments[g];for(var y in p)Object.prototype.hasOwnProperty.call(p,y)&&(h[y]=p[y])}return h},e.apply(this,arguments)};Object.defineProperty(n0,"__esModule",{value:!0}),n0.PolarColumnRenderableSeries=void 0;var i=tn(),n=Gl(),t=$d(),o=CX(),a=zc(),s=ry(),l=TX(),u=_X(),c=_U(),d=Ji(),f=(function(h){r(p,h);function p(g,v){var y=this,m,b,S;return y=h.call(this,g,e(e({},v),{dataLabelProvider:(m=v==null?void 0:v.dataLabelProvider)!==null&&m!==void 0?m:new l.PolarColumnSeriesDataLabelProvider(v==null?void 0:v.dataLabels)}))||this,y.type=i.ESeriesType.PolarColumnSeries,y.isPolar=!0,!((b=y.paletteProvider)===null||b===void 0)&&b.onAttached&&((S=y.paletteProvider)===null||S===void 0||S.onAttached(y)),y}return Object.defineProperty(p.prototype,"defaultY1",{get:function(){return this.defaultY1Property},set:function(g){this.defaultY1Property=g,this.notifyPropertyChanged(d.PROPERTY.DEFAULT_Y1)},enumerable:!1,configurable:!0}),p.prototype.addDrawingProviders=function(g,v){this.drawingProviders.push(new o.PolarColumnSeriesDrawingProvider(g,this)),this.drawingProviders.push(new t.PointMarkerDrawingProvider(g,this))},p.prototype.toJSON=function(g){g===void 0&&(g=!1);var v=h.prototype.toJSON.call(this,g),y={};return Object.assign(v.options,y),v},p.prototype.getDataPointWidth=function(g,v,y){var m=this.dataSeries.getNativeXValues(),b=g.viewportDimension,S=g.isCategoryCoordinateCalculator;if(y===s.EDataPointWidthMode.Range){var _=g.visibleMax-g.visibleMin;return g.viewportDimension/_*v}else return y===s.EDataPointWidthMode.Absolute?v:(0,n.getDataPointWidth)(m,g,b,v,S,this.dataSeries.dataDistributionCalculator.isSortedAscending,this.webAssemblyContext)},Object.defineProperty(p.prototype,"columnYMode",{get:function(){return a.EColumnYMode.TopBottom},set:function(g){throw Error("columnYMode is not supported for PolarColumnRenderableSeries")},enumerable:!1,configurable:!0}),p.prototype.newHitTestProvider=function(){return new c.RectangleSeriesHitTestProvider(this,this.webAssemblyContext)},p})(u.FastRectangleRenderableSeries);return n0.PolarColumnRenderableSeries=f,n0}var sA={},lA={},_se;function uCe(){if(_se)return lA;_se=1;var r=lA&&lA.__extends||(function(){var f=function(h,p){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,v){g.__proto__=v}||function(g,v){for(var y in v)Object.prototype.hasOwnProperty.call(v,y)&&(g[y]=v[y])},f(h,p)};return function(h,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");f(h,p);function g(){this.constructor=h}h.prototype=p===null?Object.create(p):(g.prototype=p.prototype,new g)}})();Object.defineProperty(lA,"__esModule",{value:!0}),lA.PolarMountainSeriesHitTestProvider=void 0;var e=Ii(),i=vs(),n=Rs(),t=Ds(),o=ta(),a=oo(),s=J1(),l=Hi(),u=PX(),c=10,d=(function(f){r(h,f);function h(){return f!==null&&f.apply(this,arguments)||this}return h.prototype.hitTest=function(p,g){return this.hitTestMountainBody(p,g)},h.prototype.hitTestDataPoint=function(p,g,v){var y=v>0?v:c;return f.prototype.hitTestDataPoint.call(this,p,g,y)},h.prototype.hitTestXSlice=function(p,g){return this.hitTestMountainBody(p,g)},h.prototype.hitTestMountainBody=function(p,g){var v=this,y=this.getTranslatedHitTestPoint(p,g);if(!y)return i.HitTestInfo.empty();var m=this.parentSeries.xAxis,b=m.reverseTransform(y.x,y.y),S=this.currentRenderPassData,_=S.xCoordinateCalculator,C=S.yCoordinateCalculator,T=b.x,x=b.y,A=this.parentSeries.dataSeries;if(!A)return i.HitTestInfo.empty();var w=u.polarHitTestHelpers.getNearestPolarPointXDirSorted(this.webAssemblyContext,_,C,A,T,x),L=w.nearestPointIndex,k=w.distance,D=w.secondNearestPointIndex,j=_.isCategoryCoordinateCalculator,N=j?A.getNativeIndexes():A.getNativeXValues(),V=A.getNativeYValues(),W=!1,K=!1;if(D!=-1){K=!0;var H=function(ee,ie){var de=_.getCoordinate(ee),pe=C.getCoordinate(ie),_e=t.annotationHelpers.convertPolarToCartesian(m,!1,v.webAssemblyContext,o.ECoordinateMode.Pixel,de*l.DpiHelper.PIXEL_RATIO,pe);return new e.Point(_e.x,_e.y)},U=H(0,0),I=H(N.get(L),V.get(L)),Q=H(N.get(D),V.get(D));W=(0,a.testPointInTriangle)(y.x,y.y,U.x,U.y,I.x,I.y,Q.x,Q.y)}var Z=n.hitTestHelpers.createHitTestInfo(this.parentSeries,_,C,!1,A,N,V,T,x,L,k);return Z.isHit=W,Z.isWithinDataBounds=K,Z},h})(s.PolarDataPointHitTestProvider);return lA.PolarMountainSeriesHitTestProvider=d,lA}var Pse;function cCe(){if(Pse)return sA;Pse=1;var r=sA&&sA.__extends||(function(){var h=function(p,g){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var m in y)Object.prototype.hasOwnProperty.call(y,m)&&(v[m]=y[m])},h(p,g)};return function(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");h(p,g);function v(){this.constructor=p}p.prototype=g===null?Object.create(g):(v.prototype=g.prototype,new v)}})();Object.defineProperty(sA,"__esModule",{value:!0}),sA.PolarMountainRenderableSeries=void 0;var e=tn(),i=gs(),n=Xv(),t=gU(),o=Ji(),a=CU(),s=Z1(),l=TU(),u=ij(),c=i_(),d=uCe(),f=(function(h){r(p,h);function p(g,v){var y=this,m,b,S;return y=h.call(this,g,v)||this,y.isPolar=!0,y.type=e.ESeriesType.PolarMountainSeries,y.lineType=n.ELineType.Normal,y.interpolateLineProperty=!1,y.dataLabelProviderProperty||(y.dataLabelProviderProperty=new s.PolarDataLabelProvider(v==null?void 0:v.dataLabels),y.dataLabelProviderProperty.onAttach(y.webAssemblyContext,y)),y.interpolateLineProperty=(m=v==null?void 0:v.interpolateLine)!==null&&m!==void 0?m:y.interpolateLineProperty,!((b=y.paletteProvider)===null||b===void 0)&&b.onAttached&&((S=y.paletteProvider)===null||S===void 0||S.onAttached(y)),y}return Object.defineProperty(p.prototype,"isDigitalLine",{get:function(){return!1},enumerable:!1,configurable:!0}),p.prototype.onAttach=function(g){h.prototype.onAttach.call(this,g),this.renderDataTransformProperty=new a.PolarInterpolateLineRenderDataTransform(this,this.webAssemblyContext,[this.drawingProviders[0],this.drawingProviders[1]])},Object.defineProperty(p.prototype,"interpolateLine",{get:function(){return this.interpolateLineProperty},set:function(g){this.interpolateLineProperty!==g&&(this.interpolateLineProperty=g,this.notifyPropertyChanged("interpolateLine"))},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"fillY1",{get:function(){return(0,i.stripAutoColor)(this.fillY1Property)},set:function(g){this.fillY1Property=g,this.notifyPropertyChanged(o.PROPERTY.FILL_Y1)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"fillLinearGradient1",{get:function(){return this.fillLinearGradient1Property},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"fillLinear1Gradient",{set:function(g){g!==this.fillLinearGradient1Property&&(this.fillLinearGradient1Property=g,this.notifyPropertyChanged(o.PROPERTY.FILL_LINEAR_GRADIENT))},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"zeroLineY",{get:function(){return Math.max(this.zeroLineYProperty,this.xAxis.visibleRange.min)},enumerable:!1,configurable:!0}),p.prototype.toJSON=function(g){g===void 0&&(g=!1);var v=h.prototype.toJSON.call(this,g),y={interpolateLine:this.interpolateLine};return Object.assign(v.options,y),v},p.prototype.addDrawingProviders=function(g,v){this.drawingProviders.push(new l.PolarBandSeriesDrawingProvider(g,this)),this.drawingProviders.push(new u.PolarLineSeriesDrawingProvider(g,this)),this.drawingProviders.push(new c.PolarPointMarkerDrawingProvider(g,this))},p.prototype.newHitTestProvider=function(){return new d.PolarMountainSeriesHitTestProvider(this,this.webAssemblyContext)},p})(t.BaseMountainRenderableSeries);return sA.PolarMountainRenderableSeries=f,sA}var uA={},Cse;function dCe(){if(Cse)return uA;Cse=1;var r=uA&&uA.__extends||(function(){var c=function(d,f){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(h[g]=p[g])},c(d,f)};return function(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");c(d,f);function h(){this.constructor=d}d.prototype=f===null?Object.create(f):(h.prototype=f.prototype,new h)}})();Object.defineProperty(uA,"__esModule",{value:!0}),uA.PolarStackedMountainRenderableSeries=void 0;var e=tn(),i=gs(),n=Xv(),t=Ji(),o=bU(),a=TU(),s=ij(),l=i_(),u=(function(c){r(d,c);function d(f,h){var p=this,g,v;return p=c.call(this,f,h)||this,p.isPolar=!0,p.type=e.ESeriesType.PolarStackedMountainSeries,p.lineType=n.ELineType.Normal,!((g=p.paletteProvider)===null||g===void 0)&&g.onAttached&&((v=p.paletteProvider)===null||v===void 0||v.onAttached(p)),p}return Object.defineProperty(d.prototype,"isDigitalLine",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"fillY1",{get:function(){return(0,i.stripAutoColor)(this.fillY1Property)},set:function(f){this.fillY1Property=f,this.notifyPropertyChanged(t.PROPERTY.FILL_Y1)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"fillLinearGradient1",{get:function(){return this.fillLinearGradient1Property},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"fillLinear1Gradient",{set:function(f){f!==this.fillLinearGradient1Property&&(this.fillLinearGradient1Property=f,this.notifyPropertyChanged(t.PROPERTY.FILL_LINEAR_GRADIENT))},enumerable:!1,configurable:!0}),d.prototype.addDrawingProviders=function(f,h){this.drawingProviders.push(new a.PolarBandSeriesDrawingProvider(f,this,function(p){return p.y1Values},function(p){return p.yValues})),this.drawingProviders.push(new s.PolarLineSeriesDrawingProvider(f,this,function(p){return p.y1Values})),this.drawingProviders.push(new l.PolarPointMarkerDrawingProvider(f,this,function(p){return p.y1Values}))},d})(o.StackedMountainRenderableSeries);return uA.PolarStackedMountainRenderableSeries=u,uA}var a0={},cA={},Tse;function fCe(){if(Tse)return cA;Tse=1;var r=cA&&cA.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(cA,"__esModule",{value:!0}),cA.BoxPlotPointSeriesWrapped=void 0;var e=xo(),i=ki(),n=iy(),t=(function(o){r(a,o);function a(s){var l=o.call(this,s,void 0,i.EDataSeriesValueType.Default,[e.EValueName.BoxPlotMedian,e.EValueName.BoxPlotMax,e.EValueName.BoxPlotUpper,e.EValueName.BoxPlotLower,e.EValueName.BoxPlotMinimum])||this;return l.type=i.EDataSeriesType.BoxPlot,l}return Object.defineProperty(a.prototype,"medianValues",{get:function(){return this.yValuesArray[0]},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"maximumValues",{get:function(){return this.yValuesArray[1]},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"upperQuartileValues",{get:function(){return this.yValuesArray[2]},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"lowerQuartileValues",{get:function(){return this.yValuesArray[3]},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"minimumValues",{get:function(){return this.yValuesArray[4]},enumerable:!1,configurable:!0}),a})(n.BasePointSeriesWrapped);return cA.BoxPlotPointSeriesWrapped=t,cA}var dA={},xse;function hCe(){if(xse)return dA;xse=1;var r=dA&&dA.__extends||(function(){var c=function(d,f){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(h[g]=p[g])},c(d,f)};return function(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");c(d,f);function h(){this.constructor=d}d.prototype=f===null?Object.create(f):(h.prototype=f.prototype,new h)}})();Object.defineProperty(dA,"__esModule",{value:!0}),dA.BoxPlotSeriesDrawingProvider=void 0;var e=Mr(),i=zc(),n=Qn(),t=hl(),o=ts(),a=ln(),s=Ji(),l=vl(),u=(function(c){r(d,c);function d(f,h,p,g){return c.call(this,f,h,p,g)||this}return d.prototype.onAttachSeries=function(){c.prototype.onAttachSeries.call(this),this.capPenCache=new o.Pen2DCache(this.webAssemblyContext),this.whiskersPenCache=new o.Pen2DCache(this.webAssemblyContext),this.medianLinePenCache=new o.Pen2DCache(this.webAssemblyContext),this.boxPenCache=new o.Pen2DCache(this.webAssemblyContext),this.boxFillBrushCache=new t.BrushCache(this.webAssemblyContext),this.nativeBoxDrawingProvider=new this.webAssemblyContext.SCRTRectangleSeriesDrawingProvider,this.boxArgs=new this.webAssemblyContext.SCRTRectangleDrawingParams,this.nativeLineDrawingProvider=new this.webAssemblyContext.SCRTLineSegmentDrawingProvider,this.lineArgs=new this.webAssemblyContext.SCRTLineDrawingParams,this.tempXVec=new this.webAssemblyContext.SCRTDoubleVector,this.tempYVec=new this.webAssemblyContext.SCRTDoubleVector;var f=this.getProperties(),h=f.capStroke,p=f.capStrokeDashArray,g=f.capStrokeThickness,v=f.whiskersStroke,y=f.whiskersStrokeDashArray,m=f.whiskersStrokeThickness,b=f.medianStroke,S=f.medianStrokeDashArray,_=f.medianStrokeThickness,C=f.boxStroke,T=f.boxStrokeThickness,x=f.boxStrokeDashArray,A=f.opacity;(0,o.createPenInCache)(this.capPenCache,h,g,A,p,!1),(0,o.createPenInCache)(this.whiskersPenCache,v,m,A,y,!1),(0,o.createPenInCache)(this.medianLinePenCache,b,_,A,S,!1),(0,o.createPenInCache)(this.boxPenCache,C,T,A,x,!1),this.createBoxBrush()},d.prototype.onDetachSeries=function(){c.prototype.onDetachSeries.call(this),this.delete()},d.prototype.getProperties=function(){var f=this.parentSeries,h=f.dataPointWidthMode,p=f.cap,g=p.dataPointWidth,v=p.stroke,y=p.strokeDashArray,m=p.strokeThickness,b=f.whiskers,S=b.stroke,_=b.strokeDashArray,C=b.strokeThickness,T=f.medianLine,x=T.stroke,A=T.strokeDashArray,w=T.strokeThickness,L=f.dataPointWidth,k=f.stroke,D=f.strokeThickness,j=f.strokeDashArray,N=f.fill,V=f.fillLinearGradient,W=f.opacity;return{dataPointWidthMode:h,capDataPointWidth:g,capStroke:v,capStrokeDashArray:y,capStrokeThickness:m,whiskersStroke:S,whiskersStrokeDashArray:_,whiskersStrokeThickness:C,medianStroke:x,medianStrokeDashArray:A,medianStrokeThickness:w,boxDataPointWidth:L,boxStroke:k,boxStrokeThickness:D,boxStrokeDashArray:j,boxFill:N,boxFillLinearGradient:V,opacity:W??1}},d.prototype.delete=function(){this.capPenCache=(0,e.deleteSafe)(this.capPenCache),this.whiskersPenCache=(0,e.deleteSafe)(this.whiskersPenCache),this.medianLinePenCache=(0,e.deleteSafe)(this.medianLinePenCache),this.boxPenCache=(0,e.deleteSafe)(this.boxPenCache),this.boxFillBrushCache=(0,e.deleteSafe)(this.boxFillBrushCache),this.nativeBoxDrawingProvider=(0,e.deleteSafe)(this.nativeBoxDrawingProvider),this.boxArgs=(0,e.deleteSafe)(this.boxArgs),this.nativeLineDrawingProvider=(0,e.deleteSafe)(this.nativeLineDrawingProvider),this.lineArgs=(0,e.deleteSafe)(this.lineArgs),this.tempXVec=(0,e.deleteSafe)(this.tempXVec),this.tempYVec=(0,e.deleteSafe)(this.tempYVec),c.prototype.delete.call(this)},d.prototype.drawBoxes=function(f,h){var p=h.pointSeries,g=this.parentSeries.parentSurface.seriesViewRect,v=this.getProperties(),y=v.boxStroke,m=v.boxFill,b=v.opacity,S=v.boxFillLinearGradient;this.boxArgs.Reset(),this.boxArgs.verticalChart=h.isVerticalChart,this.boxArgs.columnWidth=this.parentSeries.getDataPointWidth(h.xCoordinateCalculator,this.parentSeries.dataPointWidth,this.parentSeries.dataPointWidthMode),this.boxArgs.xMode=(0,i.convertColumnMode)(i.EColumnMode.Mid,this.webAssemblyContext),this.boxArgs.yMode=(0,i.convertYColumnMode)(i.EColumnYMode.TopBottom,this.webAssemblyContext);var _=(0,o.getScrtPenFromCache)(this.boxPenCache);_&&this.boxArgs.SetLinesPen(_);var C=(0,t.getScrtBrushFromCache)(this.boxFillBrushCache);C&&this.boxArgs.SetFillBrush(C),this.boxArgs.viewportWidth=g.width,this.boxArgs.viewportHeight=g.height,c.prototype.applyStrokeFillPaletting.call(this,y,_,m,C,b,!1,S!==void 0),this.boxArgs.SetPalettedColors(this.palettingState.palettedColors),this.boxArgs.paletteStart=this.palettingState.paletteStartIndex;var T=h.xCoordinateCalculator.isCategoryCoordinateCalculator,x=p.xValues,A=p.upperQuartileValues,w=p.lowerQuartileValues,L=T?p.indexes:x,k=this.getStartAndCount(h,L),D=k.startIndex,j=k.count;this.boxArgs.count=j,this.boxArgs.startIndex=D,this.boxArgs.SetXValues(L),this.boxArgs.SetYValues(A),this.boxArgs.SetWValues(w);var N=this.parentSeries.dataSeries,V=N.fifoCapacity,W=N.fifoSweeping,K=N.fifoSweepingGap,H=p.fifoStartIndex;W&&V===this.parentSeries.dataSeries.count()&&(this.boxArgs.count=H);var U=f.getNativeContext();this.boxArgs.SetNativeContext(U),this.boxArgs.SetXCoordinateCalculator(h.xCoordinateCalculator.nativeCalculator),this.boxArgs.SetYCoordinateCalculator(h.yCoordinateCalculator.nativeCalculator),this.nativeBoxDrawingProvider.DrawPoints(this.boxArgs),W&&V===this.parentSeries.dataSeries.count()&&(this.boxArgs.startIndex=Math.min(A.size(),H+K),this.boxArgs.count=Math.max(0,A.size()-H-K),this.boxArgs.count>0&&this.nativeBoxDrawingProvider.DrawPoints(this.boxArgs))},d.prototype.drawWhiskers=function(f,h,p,g){var v=h.pointSeries,y=h.xCoordinateCalculator.isCategoryCoordinateCalculator,m=this.getStartAndCount(h,v.xValues),b=m.startIndex,S=m.count,_=y?v.indexes:v.xValues,C=(0,o.getScrtPenFromCache)(this.whiskersPenCache);C&&(this.lineArgs.Reset(),this.lineArgs.fourVectorsMode=!0,this.lineArgs.SetWValues(g),this.lineArgs.SetLinesPen(C),this.lineArgs.forceShaderMethod=!0,this.lineArgs.verticalChart=h.isVerticalChart,this.lineArgs.count=S,this.lineArgs.startIndex=b,this.lineArgs.SetNativeContext(f.getNativeContext()),this.lineArgs.SetXValues(_),this.lineArgs.SetYValues(p),this.lineArgs.SetXCoordinateCalculator(h.xCoordinateCalculator.nativeCalculator),this.lineArgs.SetYCoordinateCalculator(h.yCoordinateCalculator.nativeCalculator),this.nativeLineDrawingProvider.DrawLinesVec(this.lineArgs))},d.prototype.drawLines=function(f,h,p,g){p&&(this.lineArgs.Reset(),this.lineArgs.SetLinesPen(p),this.lineArgs.forceShaderMethod=!0,this.lineArgs.forceClamp=!0,this.lineArgs.verticalChart=h.isVerticalChart,this.lineArgs.count=g,this.lineArgs.startIndex=0,this.lineArgs.SetNativeContext(f.getNativeContext()),this.lineArgs.SetXValues(this.tempXVec),this.lineArgs.SetYValues(this.tempYVec),this.lineArgs.SetXCoordinateCalculator(h.xCoordinateCalculator.nativeCalculator),this.lineArgs.SetYCoordinateCalculator(h.yCoordinateCalculator.nativeCalculator),this.nativeLineDrawingProvider.DrawLinesVec(this.lineArgs))},d.prototype.prepareTempCapVectors=function(f,h,p,g,v){this.tempXVec.resizeFast(h*4),this.tempYVec.resizeFast(h*4);for(var y=this.getProperties(),m=y.capDataPointWidth,b=y.dataPointWidthMode,S=this.parentSeries.getDataPointWidth(g,m,b),_=g.getDataWidth(S),C=_*.5,T=p.minimumValues,x=p.maximumValues,A=v?p.indexes:p.xValues,w=(0,n.vectorToArrayViewF64)(A,this.webAssemblyContext),L=(0,n.vectorToArrayViewF64)(T,this.webAssemblyContext),k=(0,n.vectorToArrayViewF64)(x,this.webAssemblyContext),D=(0,n.vectorToArrayViewF64)(this.tempXVec,this.webAssemblyContext),j=(0,n.vectorToArrayViewF64)(this.tempYVec,this.webAssemblyContext),N=f;N<f+h;N++){var V=w[N],W=L[N],K=k[N],H=N*4;D[H]=V-C,j[H]=K,D[H+1]=V+C,j[H+1]=K,D[H+2]=V-C,j[H+2]=W,D[H+3]=V+C,j[H+3]=W}return h*4},d.prototype.prepareTempMedianVectors=function(f,h,p,g,v){this.tempXVec.resizeFast(h*2),this.tempYVec.resizeFast(h*2);for(var y=this.getProperties(),m=y.boxDataPointWidth,b=y.dataPointWidthMode,S=this.parentSeries.getDataPointWidth(g,m,b),_=g.getDataWidth(S),C=_*.5,T=p.medianValues,x=v?p.indexes:p.xValues,A=(0,n.vectorToArrayViewF64)(x,this.webAssemblyContext),w=(0,n.vectorToArrayViewF64)(T,this.webAssemblyContext),L=(0,n.vectorToArrayViewF64)(this.tempXVec,this.webAssemblyContext),k=(0,n.vectorToArrayViewF64)(this.tempYVec,this.webAssemblyContext),D=f;D<f+h;D++){var j=A[D],N=w[D],V=D*2;L[V]=j-C,k[V]=N,L[V+1]=j+C,k[V+1]=N}return h*2},d.prototype.draw=function(f,h){var p,g,v,y,m=this.parentSeries.parentSurface,b=m.clipRect,S=m.seriesViewRect,_=h.pointSeries,C=h.xCoordinateCalculator.isCategoryCoordinateCalculator,T=this.getStartAndCount(h,_.xValues),x=T.startIndex,A=T.count;this.drawWhiskers(f,h,_.lowerQuartileValues,_.minimumValues),!((p=this.parentSeries.xAxis)===null||p===void 0)&&p.isVerticalChart&&f.setTranslationRotationAndClip(b,S.x,S.y),this.drawWhiskers(f,h,_.upperQuartileValues,_.maximumValues),!((g=this.parentSeries.xAxis)===null||g===void 0)&&g.isVerticalChart&&f.setTranslationRotationAndClip(b,S.x,S.y),this.drawLines(f,h,(0,o.getScrtPenFromCache)(this.capPenCache),this.prepareTempCapVectors(x,A,_,h.xCoordinateCalculator,C)),!((v=this.parentSeries.xAxis)===null||v===void 0)&&v.isVerticalChart&&f.setTranslationRotationAndClip(b,S.x,S.y),this.drawBoxes(f,h),!((y=this.parentSeries.xAxis)===null||y===void 0)&&y.isVerticalChart&&f.setTranslationRotationAndClip(b,S.x,S.y),this.drawLines(f,h,(0,o.getScrtPenFromCache)(this.medianLinePenCache),this.prepareTempMedianVectors(x,A,_,h.xCoordinateCalculator,C))},d.prototype.onDpiChanged=function(f){c.prototype.onDpiChanged.call(this,f),this.onSeriesPropertyChange(s.PROPERTY.OPACITY)},d.prototype.onSeriesPropertyChange=function(f){c.prototype.onSeriesPropertyChange.call(this,f);var h=this.getProperties(),p=h.boxStroke,g=h.boxStrokeThickness,v=h.opacity,y=h.boxStrokeDashArray,m=h.capStroke,b=h.capStrokeThickness,S=h.capStrokeDashArray,_=h.whiskersStroke,C=h.whiskersStrokeDashArray,T=h.whiskersStrokeThickness,x=h.medianStroke,A=h.medianStrokeDashArray,w=h.medianStrokeThickness;(f===s.PROPERTY.STROKE||f===s.PROPERTY.STROKE_THICKNESS||f===s.PROPERTY.OPACITY||f===s.PROPERTY.STROKE_DASH_ARRAY)&&(0,o.createPenInCache)(this.boxPenCache,p,g,v,y,!1),(f===s.PROPERTY.OPACITY||f===s.PROPERTY.FILL||f===s.PROPERTY.FILL_LINEAR_GRADIENT)&&this.createBoxBrush(),(f===s.PROPERTY.OPACITY||f===s.PROPERTY.BOX_SERIES_CAP)&&(0,o.createPenInCache)(this.capPenCache,m,b,v,S,!1),(f===s.PROPERTY.OPACITY||f===s.PROPERTY.BOX_SERIES_WHISKERS)&&(0,o.createPenInCache)(this.whiskersPenCache,_,T,v,C,!1),(f===s.PROPERTY.OPACITY||f===s.PROPERTY.BOX_SERIES_MEDIAN)&&(0,o.createPenInCache)(this.medianLinePenCache,x,w,v,A,!1)},d.prototype.createBoxBrush=function(){var f=this.parentSeries.parentSurface,h=this.getProperties(),p=h.opacity,g=h.boxFill,v=h.boxFillLinearGradient,y=f!=null&&f.isCopyCanvasSurface?f.domCanvas2D.height/a.SciChartSurfaceBase.domMasterCanvas.height:1,m=f!=null&&f.isCopyCanvasSurface?f.domCanvas2D.width/a.SciChartSurfaceBase.domMasterCanvas.width:1;return(0,t.createBrushInCache)(this.boxFillBrushCache,g,p,y,m,v)},d})(l.BaseSeriesDrawingProvider);return dA.BoxPlotSeriesDrawingProvider=u,dA}var fA={},Ese;function pCe(){if(Ese)return fA;Ese=1;var r=fA&&fA.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(fA,"__esModule",{value:!0}),fA.BoxPlotSeriesHitTestProvider=void 0;var e=Js(),i=Rs(),n=vs(),t=(function(o){r(a,o);function a(){return o!==null&&o.apply(this,arguments)||this}return a.prototype.hitTest=function(s,l){var u=this.getTranslatedHitTestPoint(s,l);if(!u)return n.HitTestInfo.empty();var c=this.currentRenderPassData,d=c.xCoordinateCalculator,f=c.yCoordinateCalculator,h=c.isVerticalChart,p=h?u.y:u.x,g=h?u.x:u.y,v=this.parentSeries.dataSeries;if(!v)return n.HitTestInfo.empty();var y=i.hitTestHelpers.getNearestXPoint(this.webAssemblyContext,d,v,p,v.dataDistributionCalculator.isSortedAscending),m=v.getNativeXValues(),b=v.getNativeMedianValues(),S=this.parentSeries,_=S.getDataPointWidth,C=S.dataPointWidth,T=S.dataPointWidthMode,x=S.cap.dataPointWidth,A=_(d,Math.max(C,x),T),w=i.hitTestHelpers.createHitTestInfo(this.parentSeries,d,f,h,v,m,b,p,g,y,0,void 0,A),L=v.getNativeMinimumValues(),k=v.getNativeMaximumValues();if(y>=0){w.isHit=i.hitTestHelpers.testIsHitForBoxPlot(d,f,A,v,m,L,k,y,p,g);var D=k.get(y),j=v.getNativeUpperQuartileValues().get(y),N=b.get(y),V=v.getNativeLowerQuartileValues().get(y),W=L.get(y);w.yValues=[D,j,N,V,W]}else w.isHit=!1;return w},a.prototype.hitTestForDataPointSelectionModifier=function(s,l,u){return u===void 0&&(u=e.BaseHitTestProvider.DEFAULT_HIT_TEST_RADIUS),this.hitTest(s,l)},a.prototype.hitTestXSlice=function(s,l){var u=this.hitTest(s,l);return u.isHit=u.isWithinDataBounds,u},a})(e.BaseHitTestProvider);return fA.BoxPlotSeriesHitTestProvider=t,fA}var Ase;function gCe(){if(Ase)return a0;Ase=1;var r=a0&&a0.__extends||(function(){var y=function(m,b){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,_){S.__proto__=_}||function(S,_){for(var C in _)Object.prototype.hasOwnProperty.call(_,C)&&(S[C]=_[C])},y(m,b)};return function(m,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");y(m,b);function S(){this.constructor=m}m.prototype=b===null?Object.create(b):(S.prototype=b.prototype,new S)}})(),e=a0&&a0.__assign||function(){return e=Object.assign||function(y){for(var m,b=1,S=arguments.length;b<S;b++){m=arguments[b];for(var _ in m)Object.prototype.hasOwnProperty.call(m,_)&&(y[_]=m[_])}return y},e.apply(this,arguments)};Object.defineProperty(a0,"__esModule",{value:!0}),a0.FastBoxPlotRenderableSeries=void 0;var i=Mr(),n=oi(),t=gc(),o=ry(),a=tn(),s=ki(),l=fCe(),u=gs(),c=ln(),d=Gl(),f=Ji(),h=hCe(),p=$d(),g=pCe(),v=(function(y){r(m,y);function m(b,S){var _=this,C,T,x,A,w,L,k,D,j,N,V,W,K,H,U,I,Q,Z;return _=y.call(this,b,S)||this,_.type=a.ESeriesType.BoxPlotSeries,_.dataPointWidthModeProperty=o.EDataPointWidthMode.Relative,_.capProperty={dataPointWidth:.25,stroke:c.SciChartSurfaceBase.DEFAULT_THEME.lineSeriesColor,strokeDashArray:[],strokeThickness:2},_.whiskersProperty={stroke:c.SciChartSurfaceBase.DEFAULT_THEME.lineSeriesColor,strokeDashArray:[],strokeThickness:2},_.medianLineProperty={stroke:c.SciChartSurfaceBase.DEFAULT_THEME.lineSeriesColor,strokeDashArray:[],strokeThickness:4},_.dataPointWidthProperty=.5,_.strokeDashArrayProperty=[],_.fillProperty=c.SciChartSurfaceBase.DEFAULT_THEME.columnFillBrush,_.dataPointWidthMode=(C=S==null?void 0:S.dataPointWidthMode)!==null&&C!==void 0?C:_.dataPointWidthModeProperty,S!=null&&S.cap&&(_.capProperty.dataPointWidth=(T=S.cap.dataPointWidth)!==null&&T!==void 0?T:_.capProperty.dataPointWidth,_.capProperty.stroke=(x=S.cap.stroke)!==null&&x!==void 0?x:_.capProperty.stroke,_.capProperty.strokeDashArray=(A=S.cap.strokeDashArray)!==null&&A!==void 0?A:_.capProperty.strokeDashArray,_.capProperty.strokeThickness=(w=S.cap.strokeThickness)!==null&&w!==void 0?w:_.capProperty.strokeThickness),S!=null&&S.whiskers&&(_.whiskersProperty.stroke=(L=S.whiskers.stroke)!==null&&L!==void 0?L:_.whiskersProperty.stroke,_.whiskersProperty.strokeDashArray=(k=S.whiskers.strokeDashArray)!==null&&k!==void 0?k:_.whiskersProperty.strokeDashArray,_.whiskersProperty.strokeThickness=(D=S.whiskers.strokeThickness)!==null&&D!==void 0?D:_.whiskersProperty.strokeThickness),S!=null&&S.medianLine&&(_.medianLineProperty.stroke=(j=S.medianLine.stroke)!==null&&j!==void 0?j:_.medianLineProperty.stroke,_.medianLineProperty.strokeDashArray=(N=S.medianLine.strokeDashArray)!==null&&N!==void 0?N:_.medianLineProperty.strokeDashArray,_.medianLineProperty.strokeThickness=(V=S.medianLine.strokeThickness)!==null&&V!==void 0?V:_.medianLineProperty.strokeThickness),_.strokeThickness=(W=S==null?void 0:S.strokeThickness)!==null&&W!==void 0?W:0,_.dataPointWidthProperty=(K=S==null?void 0:S.dataPointWidth)!==null&&K!==void 0?K:_.dataPointWidthProperty,_.strokeDashArrayProperty=(H=S==null?void 0:S.strokeDashArray)!==null&&H!==void 0?H:_.strokeDashArrayProperty,_.fillProperty=(U=S==null?void 0:S.fill)!==null&&U!==void 0?U:_.fillProperty,_.fillLinearGradientProperty=(I=S==null?void 0:S.fillLinearGradient)!==null&&I!==void 0?I:_.fillLinearGradientProperty,_.drawingProviders=[new h.BoxPlotSeriesDrawingProvider(b,_),new p.PointMarkerDrawingProvider(b,_)],!((Q=_.paletteProvider)===null||Q===void 0)&&Q.onAttached&&((Z=_.paletteProvider)===null||Z===void 0||Z.onAttached(_)),S!=null&&S.animation&&_.animationQueue.push(S.animation),_}return m.prototype.applyTheme=function(b){y.prototype.applyTheme.call(this,b);var S=this.parentSurface.previousThemeProvider;this.stroke===S.lineSeriesColor&&(this.stroke=b.lineSeriesColor)},Object.defineProperty(m.prototype,"dataPointWidthMode",{get:function(){return this.dataPointWidthModeProperty},set:function(b){this.dataPointWidthModeProperty=b,this.notifyPropertyChanged(f.PROPERTY.DATA_POINT_WIDTH_MODE)},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"cap",{get:function(){return this.capProperty},set:function(b){this.capProperty=e(e({},this.capProperty),b),this.notifyPropertyChanged(f.PROPERTY.BOX_SERIES_CAP)},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"whiskers",{get:function(){return this.whiskersProperty},set:function(b){this.whiskersProperty=e(e({},this.whiskersProperty),b),this.notifyPropertyChanged(f.PROPERTY.BOX_SERIES_WHISKERS)},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"medianLine",{get:function(){return this.medianLineProperty},set:function(b){this.medianLineProperty=e(e({},this.medianLineProperty),b),this.notifyPropertyChanged(f.PROPERTY.BOX_SERIES_MEDIAN)},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"dataPointWidth",{get:function(){return this.dataPointWidthProperty},set:function(b){this.dataPointWidthProperty=b,this.notifyPropertyChanged(f.PROPERTY.DATA_POINT_WIDTH)},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"strokeDashArray",{get:function(){return this.strokeDashArrayProperty},set:function(b){this.strokeDashArrayProperty=b,this.notifyPropertyChanged(f.PROPERTY.STROKE_DASH_ARRAY)},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"fill",{get:function(){return(0,u.stripAutoColor)(this.fillProperty)},set:function(b){this.fillProperty=b,this.notifyPropertyChanged(f.PROPERTY.FILL)},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"fillLinearGradient",{get:function(){return this.fillLinearGradientProperty},set:function(b){b!==this.fillLinearGradientProperty&&(this.fillLinearGradientProperty=b,this.notifyPropertyChanged(f.PROPERTY.FILL_LINEAR_GRADIENT))},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"paletteProvider",{get:function(){},set:function(b){throw new Error("paletteProvider is not supported by FastBoxPlotRenderableSeries!")},enumerable:!1,configurable:!0}),m.prototype.delete=function(){y.prototype.delete.call(this),this.pointSeries=(0,i.deleteSafe)(this.pointSeries)},m.prototype.getXRange=function(){var b,S=y.prototype.getXRange.call(this),_=(0,d.getDataPointWidthAdjustment)(this.dataPointWidthMode,this.dataPointWidth,this.dataSeries.count(),S,this.xAxis.getCurrentCoordinateCalculator()),C=new n.NumberRange(S.min-_,S.max+_);return this.strokeThickness?(0,d.adjustRangeByStrokeThickness)(C,this.strokeThickness,(b=this.parentSurface.seriesViewRect)===null||b===void 0?void 0:b.height):C},m.prototype.getYRange=function(b,S){var _;S===void 0&&(S=!1);var C=this.isRunningDataAnimation?s.EDataSeriesValueType.FinalAnimationValues:s.EDataSeriesValueType.Default,T=this.dataSeries.getWindowedYRange(b,!0,S,C,this.yRangeMode);return this.yAxis.type===t.EAxisType.LogarithmicAxis?T:(0,d.adjustRangeByStrokeThickness)(T,this.cap.strokeThickness,(_=this.parentSurface.seriesViewRect)===null||_===void 0?void 0:_.height)},m.prototype.toJSON=function(b){b===void 0&&(b=!1);var S=y.prototype.toJSON.call(this,b),_={dataPointWidthMode:this.dataPointWidthMode,cap:this.capProperty,whiskers:this.whiskersProperty,medianLine:this.medianLineProperty,dataPointWidth:this.dataPointWidth,strokeDashArray:this.strokeDashArray,fill:this.fill,fillLinearGradient:this.fillLinearGradient};return Object.assign(S.options,_),S},m.prototype.toPointSeries=function(b){if(b)throw new Error("Box Plot Series does not support resampling!");return new l.BoxPlotPointSeriesWrapped(this.dataSeries)},m.prototype.newHitTestProvider=function(){return new g.BoxPlotSeriesHitTestProvider(this,this.webAssemblyContext)},m})(d.BaseRenderableSeries);return a0.FastBoxPlotRenderableSeries=v,a0}var hA={},pA={},wse;function xX(){if(wse)return pA;wse=1;var r=pA&&pA.__extends||(function(){var l=function(u,c){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(d[h]=f[h])},l(u,c)};return function(u,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");l(u,c);function d(){this.constructor=u}u.prototype=c===null?Object.create(c):(d.prototype=c.prototype,new d)}})();Object.defineProperty(pA,"__esModule",{value:!0}),pA.TriangleSeriesDrawingProvider=void 0;var e=Mr(),i=hl(),n=Ji(),t=vl(),o=jM(),a=xo(),s=(function(l){r(u,l);function u(c,d,f,h){var p=l.call(this,c,d,f,h)||this;return p.brushCache=new i.BrushCache(c),p.args=new c.SCRTTriangleDrawingParams,p}return u.prototype.onDpiChanged=function(c){l.prototype.onDpiChanged.call(this,c),this.onSeriesPropertyChange(n.PROPERTY.STROKE)},u.prototype.onSeriesPropertyChange=function(c){if(l.prototype.onSeriesPropertyChange.call(this,c),c===n.PROPERTY.PALETTE_PROVIDER&&this.brushCache.invalidateCache(),c===n.PROPERTY.FILL||c===n.PROPERTY.OPACITY||c===n.PROPERTY.FILL_LINEAR_GRADIENT){this.palettingState.requiresUpdate=!0;var d=this.getProperties(this.parentSeries),f=d.fill,h=d.opacity,p=d.fillLinearGradient,g=d.customTextureOptions;this.brushCache.create(f,h??1,1,1,p,g)}},u.prototype.getProperties=function(c){var d=c.fill,f=c.opacity,h=c.drawMode,p=c.polygonVertices,g=c.fillLinearGradient,v=c.customTextureOptions;return{fill:d,opacity:f,drawMode:h,polygonVertices:p,fillLinearGradient:g,customTextureOptions:v}},u.prototype.onAttachSeries=function(){l.prototype.onAttachSeries.call(this),this.nativeDrawingProvider=new this.webAssemblyContext.SCRTTriangleSeriesDrawingProvider;var c=this.getProperties(this.parentSeries),d=c.fill,f=c.opacity,h=c.fillLinearGradient,p=c.customTextureOptions;this.brushCache.create(d,f??1,1,1,h,p)},u.prototype.onDetachSeries=function(){l.prototype.onDetachSeries.call(this),this.nativeDrawingProvider=(0,e.deleteSafe)(this.nativeDrawingProvider)},u.prototype.getBrushForDrawing=function(){return this.brushCache},u.prototype.draw=function(c,d){var f=this.getProperties(this.parentSeries),h=f.fill,p=f.drawMode,g=f.polygonVertices,v=(0,i.getScrtBrushFromCache)(this.getBrushForDrawing());if(!(!v||!h)){var y=d.pointSeries;this.args.Reset(),p===o.ETriangleSeriesDrawMode.Polygon?this.args.drawMode=this.webAssemblyContext.SCRTTriangleDrawMode.Polygon:p===o.ETriangleSeriesDrawMode.Strip?this.args.drawMode=this.webAssemblyContext.SCRTTriangleDrawMode.Strip:this.args.drawMode=this.webAssemblyContext.SCRTTriangleDrawMode.List,this.args.iPolygonVertices=g,this.args.SetFillBrush(v),this.args.verticalChart=d.isVerticalChart;var m=d.xCoordinateCalculator.isCategoryCoordinateCalculator,b=this.xSelector(y);this.parentSeries.hasFillPaletteProvider()&&(l.prototype.applyStrokeFillPaletting.call(this,this.parentSeries.stroke,void 0,this.parentSeries.fill,v,this.parentSeries.opacity,!1,!0),this.args.SetPalettedColors(this.palettingState.palettedColors));var S=m?y.indexes:b,_=this.ySelector(y),C=this.getStartAndCount(d,S),T=C.startIndex,x=C.count;this.args.count=x,this.args.startIndex=T;var A=y.getYValuesByName(a.EValueName.X1),w=y.getYValuesByName(a.EValueName.Y1);if(A&&w)this.args.SetZValues(A),this.args.SetYValues(w);else if(A||w)throw new Error("You must either supply both x1 values and y1 values for texture coordinates, or neither to use screen coordinates for the texture");this.updateArgs(d);var L=c.getNativeContext();this.drawTriangles(c,L,S,_,d.xCoordinateCalculator.nativeCalculator,d.yCoordinateCalculator.nativeCalculator,this.args,this.parentSeries.parentSurface.seriesViewRect)}},u.prototype.delete=function(){this.nativeDrawingProvider=(0,e.deleteSafe)(this.nativeDrawingProvider),this.args=(0,e.deleteSafe)(this.args),this.brushCache=(0,e.deleteSafe)(this.brushCache),l.prototype.delete.call(this)},u.prototype.drawTriangles=function(c,d,f,h,p,g,v,y){v.SetNativeContext(d),v.SetXValues(f),v.SetYValues(h),v.SetXCoordinateCalculator(p),v.SetYCoordinateCalculator(g),this.nativeDrawingProvider.DrawTrianglesVec(v)},u})(t.BaseSeriesDrawingProvider);return pA.TriangleSeriesDrawingProvider=s,pA}var gA={},Ose;function vCe(){if(Ose)return gA;Ose=1;var r=gA&&gA.__extends||(function(){var s=function(l,u){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(c[f]=d[f])},s(l,u)};return function(l,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");s(l,u);function c(){this.constructor=l}l.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}})();Object.defineProperty(gA,"__esModule",{value:!0}),gA.TriangleSeriesHitTestProvider=void 0;var e=Ii(),i=jM(),n=Js(),t=Rs(),o=vs(),a=(function(s){r(l,s);function l(){return s!==null&&s.apply(this,arguments)||this}return l.prototype.hitTest=function(u,c){var d=this.getTranslatedHitTestPoint(u,c);if(!d)return o.HitTestInfo.empty();var f=this.currentRenderPassData,h=f.xCoordinateCalculator,p=f.yCoordinateCalculator,g=f.isVerticalChart,v=g?d.y:d.x,y=g?d.x:d.y,m=this.parentSeries.dataSeries;if(!m)return o.HitTestInfo.empty();var b=m.getNativeXValues(),S=m.getNativeYValues(),_=this.parentSeries,C=_.drawMode,T=_.polygonVertices,x=t.hitTestHelpers.getNearestTriangle(this.webAssemblyContext,h,p,b,S,v,y,C,T),A=x.nearestPointIndex,w=x.nearestPointIndex2,L=x.isHit,k=new o.HitTestInfo(this.parentSeries);k.seriesName=this.parentSeries.seriesName,k.dataSeriesType=m.type,k.hitTestPoint=new e.Point(v,y);var D=h.getDataValue(v),j=p.getDataValue(y);if(k.hitTestPointValues=new e.Point(D,j),k.dataSeriesIndex=A,k.point2dataSeriesIndex=w,k.distance=L?0:1,A>=0){var N=m.getNativeValue(b,A),V=m.getNativeValue(S,A);k.xCoord=h.getCoordinate(N),k.yCoord=p.getCoordinate(V),k.xValue=N,k.yValue=V,k.metadata=m.getMetadataAt(A)}if(w>=0){var W=m.getNativeValue(b,w),K=m.getNativeValue(S,w);k.point2xCoord=h.getCoordinate(W),k.point2yCoord=p.getCoordinate(K),k.point2xValue=W,k.point2yValue=K,k.metadata=m.getMetadataAt(A);var H=m.valueNames.reduce(function(de,pe){return de[pe]=m.getNativeValue(m.getYValuesByName(pe),k.point2dataSeriesIndex),de},{});k.point2yValueByName=H}if(A>=0){for(var U=C===i.ETriangleSeriesDrawMode.Polygon?T:3,I=[],Q=[],Z=A;Z<A+U;Z++){var ee=m.getNativeValue(b,Z),ie=m.getNativeValue(S,Z);I.push(ee),Q.push(ie)}k.xValues=I,k.yValues=Q}return k.isHit=L,k},l.prototype.hitTestForDataPointSelectionModifier=function(u,c){return this.hitTest(u,c)},l.prototype.hitTestXSlice=function(u,c){return this.hitTest(u,c)},l.prototype.hitTestDataPoint=function(u,c,d){return this.hitTest(u,c)},l})(n.BaseHitTestProvider);return gA.TriangleSeriesHitTestProvider=a,gA}var s0={},Dse;function yCe(){if(Dse)return s0;Dse=1;var r=s0&&s0.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})(),e=s0&&s0.__spreadArray||function(o,a,s){if(s||arguments.length===2)for(var l=0,u=a.length,c;l<u;l++)(c||!(l in a))&&(c||(c=Array.prototype.slice.call(a,0,l)),c[l]=a[l]);return o.concat(c||Array.prototype.slice.call(a))};Object.defineProperty(s0,"__esModule",{value:!0}),s0.TriangleSeriesInfo=void 0;var i=jM(),n=ny(),t=(function(o){r(a,o);function a(s,l,u,c){var d=this,f,h;return d=o.call(this,s,l)||this,d.drawMode=u,d.vertices=u===i.ETriangleSeriesDrawMode.Polygon?c:3,((f=l.xValues)===null||f===void 0?void 0:f.length)===d.vertices&&((h=l.yValues)===null||h===void 0?void 0:h.length)===d.vertices&&(d.xValues=e([],l.xValues,!0),d.yValues=e([],l.yValues,!0)),d}return Object.defineProperty(a.prototype,"formattedXValues",{get:function(){var s=this;return this.xValues?this.xValues.map(function(l){return s.getXCursorFormattedValue(l)}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"formattedYValues",{get:function(){var s=this;return this.yValues?this.yValues.map(function(l){return s.getYCursorFormattedValue(l)}):[]},enumerable:!1,configurable:!0}),a.prototype.getValuesWithLabels=function(s,l,u,c){var d=o.prototype.getValuesWithLabels.call(this,s,l,u,c);d.push(this.concatValueWithLabel(this.dataSeriesIndex.toFixed(0),"Index"));for(var f=this.formattedXValues,h=this.formattedYValues,p=0;p<f.length;p++){var g=p+1,v=f[p],y=h[p];d.push(this.concatTwoValuesWithLabels(v,y,"".concat(l).concat(g),"".concat(u).concat(g)))}return d},a})(n.SeriesInfo);return s0.TriangleSeriesInfo=t,s0}var Rse;function EX(){if(Rse)return hA;Rse=1;var r=hA&&hA.__extends||(function(){var h=function(p,g){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var m in y)Object.prototype.hasOwnProperty.call(y,m)&&(v[m]=y[m])},h(p,g)};return function(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");h(p,g);function v(){this.constructor=p}p.prototype=g===null?Object.create(g):(v.prototype=g.prototype,new v)}})();Object.defineProperty(hA,"__esModule",{value:!0}),hA.FastTriangleRenderableSeries=void 0;var e=tn(),i=jM(),n=gs(),t=ln(),o=Gl(),a=Ji(),s=X1(),l=$d(),u=xX(),c=vCe(),d=yCe(),f=(function(h){r(p,h);function p(g,v){var y=this,m,b,S;return y=h.call(this,g,v)||this,y.type=e.ESeriesType.TriangleSeries,y.drawModeProperty=i.ETriangleSeriesDrawMode.List,y.polygonVerticesProperty=0,y.fillProperty=t.SciChartSurfaceBase.DEFAULT_THEME.columnFillBrush,y.dataLabelProviderProperty||(y.dataLabelProviderProperty=new s.LineSeriesDataLabelProvider(v==null?void 0:v.dataLabels),y.dataLabelProviderProperty.onAttach(y.webAssemblyContext,y)),y.drawModeProperty=(m=v==null?void 0:v.drawMode)!==null&&m!==void 0?m:y.drawModeProperty,y.polygonVerticesProperty=(b=v==null?void 0:v.polygonVertices)!==null&&b!==void 0?b:y.polygonVerticesProperty,y.fillProperty=(S=v==null?void 0:v.fill)!==null&&S!==void 0?S:y.fillProperty,y.fillLinearGradientProperty=v==null?void 0:v.fillLinearGradient,y.customTextureOptionsProperty=v==null?void 0:v.customTextureOptions,y}return p.prototype.addDrawingProviders=function(g,v){this.drawingProviders.push(new u.TriangleSeriesDrawingProvider(g,this)),this.drawingProviders.push(new l.PointMarkerDrawingProvider(g,this))},Object.defineProperty(p.prototype,"drawMode",{get:function(){return this.drawModeProperty},set:function(g){this.drawModeProperty=g,this.notifyPropertyChanged(a.PROPERTY.TRIANGLE_DRAW_MODE)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"polygonVertices",{get:function(){return this.polygonVerticesProperty},set:function(g){this.polygonVerticesProperty=g,this.notifyPropertyChanged(a.PROPERTY.POLYGON_VERTICES)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"fill",{get:function(){return(0,n.stripAutoColor)(this.fillProperty)},set:function(g){this.fillProperty=g,this.notifyPropertyChanged(a.PROPERTY.FILL)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"fillLinearGradient",{get:function(){return this.fillLinearGradientProperty},set:function(g){g!==this.fillLinearGradientProperty&&(this.fillLinearGradientProperty=g,this.notifyPropertyChanged(a.PROPERTY.FILL_LINEAR_GRADIENT))},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"customTextureOptions",{get:function(){return this.customTextureOptionsProperty},set:function(g){g!==this.customTextureOptionsProperty&&(this.customTextureOptionsProperty=g,this.notifyPropertyChanged(a.PROPERTY.CUSTOM_TEXTURE_OPTIONS))},enumerable:!1,configurable:!0}),p.prototype.resolveAutoColors=function(g,v,y){if(h.prototype.resolveAutoColors.call(this,g,v,y),this.fillProperty.startsWith(n.AUTO_COLOR)){var m=y.getFillColor(g,v,this.webAssemblyContext);this.fill=n.AUTO_COLOR+this.adjustAutoColor("fill",m)}},p.prototype.getSeriesInfo=function(g){return new d.TriangleSeriesInfo(this,g,this.drawMode,this.polygonVertices)},p.prototype.toJSON=function(g){g===void 0&&(g=!1);var v=h.prototype.toJSON.call(this,g),y={fill:this.fill,drawMode:this.drawMode,polygonVertices:this.polygonVertices,customTextureOptions:this.customTextureOptions,fillLinearGradient:this.fillLinearGradient};return Object.assign(v.options,y),v},p.prototype.newHitTestProvider=function(){return new c.TriangleSeriesHitTestProvider(this,this.webAssemblyContext)},p})(o.BaseRenderableSeries);return hA.FastTriangleRenderableSeries=f,hA}var l0={},Mse;function mCe(){if(Mse)return l0;Mse=1;var r=l0&&l0.__extends||(function(){var c=function(d,f){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(h[g]=p[g])},c(d,f)};return function(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");c(d,f);function h(){this.constructor=d}d.prototype=f===null?Object.create(f):(h.prototype=f.prototype,new h)}})(),e=l0&&l0.__assign||function(){return e=Object.assign||function(c){for(var d,f=1,h=arguments.length;f<h;f++){d=arguments[f];for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(c[p]=d[p])}return c},e.apply(this,arguments)};Object.defineProperty(l0,"__esModule",{value:!0}),l0.PolarXyScatterRenderableSeries=void 0;var i=oi(),n=tn(),t=CU(),o=bX(),a=Z1(),s=i_(),l=J1(),u=(function(c){r(d,c);function d(f,h){var p=this,g,v,y;return p=c.call(this,f,e(e({},h),{dataLabelProvider:(g=h==null?void 0:h.dataLabelProvider)!==null&&g!==void 0?g:new a.PolarDataLabelProvider(h==null?void 0:h.dataLabels)}))||this,p.isPolar=!0,p.type=n.ESeriesType.PolarScatterSeries,p.clipToTotalAngle=!1,!((v=p.paletteProvider)===null||v===void 0)&&v.onAttached&&((y=p.paletteProvider)===null||y===void 0||y.onAttached(p)),p.renderDataTransformProperty=new t.PolarInterpolateLineRenderDataTransform(p,p.webAssemblyContext,[]),p}return d.prototype.getIndicesRange=function(f,h){return this.clipToTotalAngle?c.prototype.getIndicesRange.call(this,f,h):new i.NumberRange(0,this.dataSeries.count()-1)},d.prototype.addDrawingProviders=function(f,h){this.drawingProviders.push(new s.PolarPointMarkerDrawingProvider(f,this))},d.prototype.newHitTestProvider=function(){return new l.PolarDataPointHitTestProvider(this,this.webAssemblyContext)},d})(o.XyScatterRenderableSeries);return l0.PolarXyScatterRenderableSeries=u,l0}var vA={},Lse;function bCe(){if(Lse)return vA;Lse=1;var r=vA&&vA.__extends||(function(){var t=function(o,a){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");t(o,a);function s(){this.constructor=o}o.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}})();Object.defineProperty(vA,"__esModule",{value:!0}),vA.PolarStackedMountainCollection=void 0;var e=tn(),i=KH(),n=(function(t){r(o,t);function o(){var a=t!==null&&t.apply(this,arguments)||this;return a.type=e.ESeriesType.PolarStackedMountainCollection,a.isPolar=!0,a}return o})(i.StackedMountainCollection);return vA.PolarStackedMountainCollection=n,vA}var yA={},kse;function SCe(){if(kse)return yA;kse=1;var r=yA&&yA.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(yA,"__esModule",{value:!0}),yA.PolarStackedColumnCollection=void 0;var e=oi(),i=tn(),n=g8(),t=(function(o){r(a,o);function a(s,l){var u=o.call(this,s,l)||this;return u.isPolar=!0,u.type=i.ESeriesType.PolarStackedColumnCollection,u}return a.prototype.getXRange=function(){return this.isEnoughDataToDraw()?this.getFirstSeries().getXRange():new e.NumberRange},a.prototype.getYRange=function(s,l){var u,c,d=o.prototype.getYRange.call(this,s,l),f=(c=(u=this.getFirstSeries())===null||u===void 0?void 0:u.defaultY1)!==null&&c!==void 0?c:0;return d.union(new e.NumberRange(f,f))},a})(n.StackedXyCollection);return yA.PolarStackedColumnCollection=t,yA}var mA={},Ise;function _Ce(){if(Ise)return mA;Ise=1;var r=mA&&mA.__extends||(function(){var g=function(v,y){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,b){m.__proto__=b}||function(m,b){for(var S in b)Object.prototype.hasOwnProperty.call(b,S)&&(m[S]=b[S])},g(v,y)};return function(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");g(v,y);function m(){this.constructor=v}v.prototype=y===null?Object.create(y):(m.prototype=y.prototype,new m)}})();Object.defineProperty(mA,"__esModule",{value:!0}),mA.PolarStackedColumnRenderableSeries=void 0;var e=Mr(),i=zc(),n=ry(),t=tn(),o=wM(),a=gs(),s=ln(),l=mU(),u=Ji(),c=$d(),d=ZN(),f=_U(),h=CX(),p=(function(g){r(v,g);function v(y,m){var b=this,S,_,C,T,x;return b=g.call(this,y,m)||this,b.type=t.ESeriesType.PolarStackedColumnSeries,b.isPolar=!0,b.fillProperty=s.SciChartSurfaceBase.DEFAULT_THEME.columnFillBrush,b.polarColumnXModeProperty=i.EColumnMode.Mid,b.polarColumnYModeProperty=i.EColumnYMode.TopBottom,b.dataPointWidthProperty=.8,b.dataPointWidthModeProperty=n.EDataPointWidthMode.Range,b.fill=(S=m==null?void 0:m.fill)!==null&&S!==void 0?S:b.fillProperty,b.fillLinearGradientProperty=(_=m==null?void 0:m.fillLinearGradient)!==null&&_!==void 0?_:b.fillLinearGradientProperty,b.polarColumnXModeProperty=(C=m==null?void 0:m.columnXMode)!==null&&C!==void 0?C:b.polarColumnXModeProperty,b.polarColumnYModeProperty=(T=m==null?void 0:m.columnYMode)!==null&&T!==void 0?T:b.polarColumnYModeProperty,b.dataPointWidthModeProperty=(x=m==null?void 0:m.dataPointWidthMode)!==null&&x!==void 0?x:b.dataPointWidthModeProperty,b.customTextureOptionsProperty=m==null?void 0:m.customTextureOptions,b}return v.prototype.addDrawingProviders=function(y,m){this.drawingProviders.push(new h.PolarColumnSeriesDrawingProvider(y,this)),this.drawingProviders.push(new c.PointMarkerDrawingProvider(y,this))},Object.defineProperty(v.prototype,"columnXMode",{get:function(){return this.polarColumnXModeProperty},set:function(y){this.polarColumnXModeProperty!==y&&(this.polarColumnXModeProperty=y,this.notifyPropertyChanged("POLAR_COLUMN_MODE"))},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"dataPointWidthMode",{get:function(){return this.dataPointWidthModeProperty},set:function(y){this.dataPointWidthModeProperty=y,this.notifyPropertyChanged(u.PROPERTY.DATA_POINT_WIDTH_MODE)},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"columnYMode",{get:function(){return i.EColumnYMode.TopBottom},set:function(y){throw Error("columnYMode is not supported for PolarColumnRenderableSeries")},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"defaultY1",{get:function(){return 0},set:function(y){},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"dataPointWidth",{get:function(){return this.dataPointWidthProperty},set:function(y){this.dataPointWidthProperty=y,this.notifyPropertyChanged(u.PROPERTY.DATA_POINT_WIDTH)},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"fillLinearGradient",{get:function(){return this.fillLinearGradientProperty},set:function(y){y!==this.fillLinearGradientProperty&&(this.fillLinearGradientProperty=y,this.notifyPropertyChanged(u.PROPERTY.FILL_LINEAR_GRADIENT))},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"customTextureOptions",{get:function(){return this.customTextureOptionsProperty},set:function(y){y!==this.customTextureOptionsProperty&&(this.customTextureOptionsProperty=y,this.notifyPropertyChanged(u.PROPERTY.CUSTOM_TEXTURE_OPTIONS))},enumerable:!1,configurable:!0}),v.prototype.onAttachToParentCollection=function(y,m,b){if(this.parentCollection)throw new Error("Invalid operation in StackedMountainRenderableSeries.onAttachToParentCollection, this series has been already attached to collection. Please detach it from the collection before attaching to another");this.parentCollection=y,this.getParentSurfaceFn=m,this.notifyParentPropertyChangedFn=b},v.prototype.onAttach=function(y){if(this.invalidateParentCallback)throw new Error("Invalid operation in sciChartSurface.attachSeries, this series has already been attached to a SciChartSurface. Please detach it from a SciChartSurface before attaching to another");this.invalidateParentCallback=y.invalidateElement,this.drawingProviders.forEach(function(m){return m.onAttachSeries()}),this.rolloverModifierProps.setInvalidateParentCallback(y.invalidateElement)},v.prototype.onDetach=function(){this.invalidateParentCallback=void 0,this.drawingProviders.forEach(function(y){return y.onDetachSeries()}),this.rolloverModifierProps.setInvalidateParentCallback(void 0)},v.prototype.draw=function(y,m){var b;this.currentRenderPassData=m,(b=this.hitTestProvider)===null||b===void 0||b.update(m);try{y.pushShaderEffect(this.effect),this.drawingProviders.forEach(function(S){return S.draw(y,m)})}finally{y.popShaderEffect()}},v.prototype.onDpiChanged=function(y){g.prototype.onDpiChanged.call(this,y),this.notifyPropertyChanged(u.PROPERTY.STROKE)},Object.defineProperty(v.prototype,"fill",{get:function(){return(0,a.stripAutoColor)(this.fillProperty)},set:function(y){this.fillProperty!==y&&(this.fillProperty=y,this.drawingProviders.forEach(function(m){return m.onSeriesPropertyChange(u.PROPERTY.FILL)}),this.drawingProviders.forEach(function(m){return m.onSeriesPropertyChange(u.PROPERTY.FILL_Y1)}),this.notifyPropertyChanged(u.PROPERTY.FILL))},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"fillY1",{set:function(y){throw new Error("Setting fillY1 property is not supported on StackedMountainRenderableSeries")},enumerable:!1,configurable:!0}),v.prototype.getCurrentRenderPassData=function(){return this.currentRenderPassData},v.prototype.toJSON=function(y){y===void 0&&(y=!1);var m=g.prototype.toJSON.call(this,y),b={columnXMode:this.columnXMode,columnYMode:this.columnYMode,dataPointWidthMode:this.dataPointWidthMode,stroke:this.stroke,strokeThickness:this.strokeThickness,fill:this.fill,fillLinearGradient:this.fillLinearGradient};return Object.assign(m.options,b),m},v.prototype.delete=function(){this.drawingProviders.forEach(function(y){return y.delete()}),this.drawingProviders=[],this.effect=(0,e.deleteSafe)(this.effect),g.prototype.delete.call(this)},v.prototype.toPointSeries=function(y){return new o.XyPointSeriesWrapped(this.dataSeries)},v.prototype.hasStrokePaletteProvider=function(){var y=this.paletteProvider;return(y==null?void 0:y.overrideStrokeArgb)!==void 0},v.prototype.hasFillPaletteProvider=function(){var y=this.paletteProvider;return(y==null?void 0:y.overrideFillArgb)!==void 0},v.prototype.hasPointMarkerPaletteProvider=function(){var y=this.paletteProvider;return(y==null?void 0:y.overridePointMarkerArgb)!==void 0},v.prototype.resolveAutoColors=function(y,m,b){if(g.prototype.resolveAutoColors.call(this,y,m,b),this.fillProperty.startsWith(a.AUTO_COLOR)){var S=b.getFillColor(y,m,this.webAssemblyContext);this.fill=a.AUTO_COLOR+this.adjustAutoColor("fill",S)}},v.prototype.getXRange=function(){var y=this.dataSeries.xRange,m=this.dataSeries.count();return(0,d.getXRange)(y,m,this.dataPointWidth)},v.prototype.getDataPointWidth=function(y,m){var b=this.dataSeries.getNativeXValues(),S=y.viewportDimension,_=y.isCategoryCoordinateCalculator;if(m<0||m>1)throw new Error("WidthFraction should be between 0.0 and 1.0 inclusive");var C=b.size(),T=S,x=C;if(x>1){var A=Number.NEGATIVE_INFINITY,w=Number.MAX_VALUE;if(_)A=y.getCoordinate(C-1),w=y.getCoordinate(0);else{var L=void 0;try{L=this.webAssemblyContext.NumberUtil.MinMax(b,!1),w=L.minD,A=L.maxD}finally{(0,e.deleteSafe)(L)}A=y.getCoordinate(A),w=y.getCoordinate(w)}T=Math.abs(A-w)/(x-1)}else x===1&&(T=Math.min(T,y.getCoordinate(b.get(0))*2));return T*m},v.prototype.newHitTestProvider=function(){return new f.RectangleSeriesHitTestProvider(this,this.webAssemblyContext)},v})(l.BaseStackedRenderableSeries);return mA.PolarStackedColumnRenderableSeries=p,mA}var u0={},bA={},Nse;function PCe(){if(Nse)return bA;Nse=1;var r=bA&&bA.__extends||(function(){var u=function(c,d){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,h){f.__proto__=h}||function(f,h){for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(f[p]=h[p])},u(c,d)};return function(c,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");u(c,d);function f(){this.constructor=c}c.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}})();Object.defineProperty(bA,"__esModule",{value:!0}),bA.PolarHeatMapDataLabelProvider=void 0;var e=Ii(),i=ta(),n=Ds(),t=kM(),o=H1(),a=Hi(),s=rj(),l=(function(u){r(c,u);function c(d){var f=this,h;return f=u.call(this,d)||this,f.polarLabelModeProperty=t.EPolarLabelMode.Horizontal,f.polarLabelModeProperty=(h=d==null?void 0:d.polarLabelMode)!==null&&h!==void 0?h:f.polarLabelModeProperty,f}return Object.defineProperty(c.prototype,"polarLabelMode",{get:function(){return this.polarLabelModeProperty},set:function(d){this.polarLabelModeProperty=d,this.invalidateParent()},enumerable:!1,configurable:!0}),c.prototype.shouldGenerate=function(d,f,h){return!0},c.prototype.shouldSkipLabel=function(d,f,h,p,g){return!1},c.prototype.toCartesian=function(d,f){var h=this.parentSeries.xAxis;return n.annotationHelpers.convertPolarToCartesian(h,!1,this.parentSeries.parentSurface.webAssemblyContext2D,i.ECoordinateMode.Pixel,d*a.DpiHelper.PIXEL_RATIO,f)},c.prototype.getPosition=function(d,f,h,p,g,v,y,m){var b=this.parentSeries,S=m.isVerticalChart?b.yAxis:b.xAxis,_=m.xCoordinateCalculator.getCoordinate(h),C=m.xCoordinateCalculator.hasFlippedCoordinates?-1:1;_-=C*v/2;var T=m.yCoordinateCalculator.getCoordinate(p),x=m.yCoordinateCalculator.hasFlippedCoordinates?-1:1;T-=x*y/2;var A=m.isVerticalChart?T:_,w=m.isVerticalChart?_:T,L=this.toCartesian(A,w),k=L.x,D=L.y,j=new e.Point(k,D);k-=g.width/2,D+=g.height/2;var N=o.labelHelper.getPolarLabelRotation(this.polarLabelMode,S.startAngle+A);return{position:new e.Point(k,D),rotationCenter:j,rotationAngle:N}},Object.defineProperty(c.prototype,"useRotation",{get:function(){return this.polarLabelMode!==t.EPolarLabelMode.Horizontal},enumerable:!1,configurable:!0}),c})(s.HeatMapDataLabelProvider);return bA.PolarHeatMapDataLabelProvider=l,bA}var SA={},Fse;function CCe(){if(Fse)return SA;Fse=1;var r=SA&&SA.__extends||(function(){var n=function(t,o){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(a[l]=s[l])},n(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");n(t,o);function a(){this.constructor=t}t.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}})();Object.defineProperty(SA,"__esModule",{value:!0}),SA.PolarHeatmapDrawingProvider=void 0;var e=mX(),i=(function(n){r(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.draw=function(o,a){var s,l,u,c=(s=this.heatTextureCache)===null||s===void 0?void 0:s.value;if(c){var d=this.parentSeries.dataSeries,f=d.xStart,h=a.xCoordinateCalculator.getCoordinate(f),p=(u=(l=d.getZValues()[0])===null||l===void 0?void 0:l.length)!==null&&u!==void 0?u:0,g=f+d.xStep*p,v=a.xCoordinateCalculator.getCoordinate(g),y=d.getNormalizedVector(this.parentSeries.colorMap,this.parentSeries.fillValuesOutOfRange);this.packedFloatParams=this.webAssemblyContext.SCRTFillTextureFloat32(c,d.arrayWidth,d.arrayHeight,y),this.packedFloatParams.x=0,this.packedFloatParams.y=1;var m=d.yRange,b=a.yCoordinateCalculator.getCoordinate(m.min),S=a.yCoordinateCalculator.getCoordinate(m.max);o.getNativeContext();var _=this.packedFloatParams,C=new this.webAssemblyContext.SCRTContourParams,T=new this.webAssemblyContext.SCRTHeatmapSeriesDrawingProvider;this.recreatePalette();var x=this.parentSeries.xAxis,A=x.getTransform();T.DrawPolarHeatmap(A,b,S,h,this.paletteTexture.getTexture(),c,_,C,v),C.delete(),_.delete()}},t})(e.UniformHeatmapDrawingProvider);return SA.PolarHeatmapDrawingProvider=i,SA}var jse;function TCe(){if(jse)return u0;jse=1;var r=u0&&u0.__extends||(function(){var l=function(u,c){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(d[h]=f[h])},l(u,c)};return function(u,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");l(u,c);function d(){this.constructor=u}u.prototype=c===null?Object.create(c):(d.prototype=c.prototype,new d)}})(),e=u0&&u0.__assign||function(){return e=Object.assign||function(l){for(var u,c=1,d=arguments.length;c<d;c++){u=arguments[c];for(var f in u)Object.prototype.hasOwnProperty.call(u,f)&&(l[f]=u[f])}return l},e.apply(this,arguments)};Object.defineProperty(u0,"__esModule",{value:!0}),u0.PolarUniformHeatmapRenderableSeries=void 0;var i=So(),n=tn(),t=SU(),o=PCe(),a=CCe(),s=(function(l){r(u,l);function u(c,d){var f=this,h,p=(h=d.dataLabelProvider)!==null&&h!==void 0?h:new o.PolarHeatMapDataLabelProvider(d==null?void 0:d.dataLabels);return f=l.call(this,c,e(e({},d),{dataLabelProvider:p}))||this,f.isPolar=!0,f.type=n.ESeriesType.PolarUniformHeatmapSeries,f}return u.prototype.addDrawingProviders=function(c,d){i.IS_TEST_ENV||this.drawingProviders.push(new a.PolarHeatmapDrawingProvider(c,this))},u})(t.UniformHeatmapRenderableSeries);return u0.PolarUniformHeatmapRenderableSeries=s,u0}var pW={},Bse;function Q1(){return Bse||(Bse=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.ESeriesType3D=void 0,(function(e){e.ScatterRenderableSeries3D="ScatterRenderableSeries3D",e.SurfaceMeshRenderableSeries3D="SurfaceMeshRenderableSeries3D",e.PointLineRenderableSeries3D="PointLineRenderableSeries3D",e.ColumnRenderableSeries3D="ColumnRenderableSeries3D"})(r.ESeriesType3D||(r.ESeriesType3D={}))})(pW)),pW}var _A={},ul={},gW={},Vse;function AX(){return Vse||(Vse=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EPointMarker3DType=void 0,(function(e){e.Sphere="Sphere",e.Cube="Cube",e.Pyramid="Pyramid",e.Cylinder="Cylinder",e.Quad="Quad",e.Pixel="Pixel",e.Ellipse="Ellipse",e.Triangle="Triangle",e.Custom="Custom"})(r.EPointMarker3DType||(r.EPointMarker3DType={}))})(gW)),gW}var PA={},vW={},yW={},Hse;function lze(){return Hse||(Hse=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.PROPERTY=void 0,(function(e){e.FILL="Fill",e.SIZE="Size"})(r.PROPERTY||(r.PROPERTY={}))})(yW)),yW}var Use;function w1(){return Use||(Use=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.BasePointMarker3D=r.EMarkerType=void 0;var e=Ba(),i=ni(),n=XS(),t=lze();(function(a){a.Pixel="Pixel",a.TexturedQuad="TexturedQuad",a.InstancedMesh="InstancedMesh"})(r.EMarkerType||(r.EMarkerType={}));var o=(function(){function a(s,l){var u,c;this.fillProperty="#FF3333",this.sizeProperty=3,i.Guard.notNull(s,"webAssemblyContext"),this.webAssemblyContext=s,this.propertyChanged=new e.EventHandler,this.fillProperty=(u=l==null?void 0:l.fill)!==null&&u!==void 0?u:this.fillProperty,this.sizeProperty=(c=l==null?void 0:l.size)!==null&&c!==void 0?c:this.sizeProperty}return Object.defineProperty(a.prototype,"fill",{get:function(){return this.fillProperty},set:function(s){this.fillProperty=s,this.notifyPropertyChanged(t.PROPERTY.FILL)},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"size",{get:function(){return this.sizeProperty},set:function(s){this.sizeProperty=s,this.notifyPropertyChanged(t.PROPERTY.SIZE)},enumerable:!1,configurable:!0}),a.prototype.notifyPropertyChanged=function(s){var l;(l=this.propertyChanged)===null||l===void 0||l.raiseEvent(new n.PropertyChangedEventArgs(s))},a.prototype.toJSON=function(){var s={fill:this.fill,size:this.size};return{type:this.type,options:s}},a})();r.BasePointMarker3D=o})(vW)),vW}var zse;function xCe(){if(zse)return PA;zse=1;var r=PA&&PA.__extends||(function(){var n=function(t,o){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(a[l]=s[l])},n(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");n(t,o);function a(){this.constructor=t}t.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}})();Object.defineProperty(PA,"__esModule",{value:!0}),PA.BaseMeshPointMarker3D=void 0;var e=w1(),i=(function(n){r(t,n);function t(o,a){return n.call(this,o,a)||this}return Object.defineProperty(t.prototype,"markerType",{get:function(){return e.EMarkerType.InstancedMesh},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){var o={fill:this.fill,size:this.size};return{type:this.type,options:o}},t})(e.BasePointMarker3D);return PA.BaseMeshPointMarker3D=i,PA}var CA={},Wse;function ECe(){if(Wse)return CA;Wse=1;var r=CA&&CA.__extends||(function(){var n=function(t,o){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(a[l]=s[l])},n(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");n(t,o);function a(){this.constructor=t}t.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}})();Object.defineProperty(CA,"__esModule",{value:!0}),CA.BaseTexturePointMarker3D=void 0;var e=w1(),i=(function(n){r(t,n);function t(o,a){return n.call(this,o,a)||this}return Object.defineProperty(t.prototype,"markerType",{get:function(){return e.EMarkerType.TexturedQuad},enumerable:!1,configurable:!0}),t})(e.BasePointMarker3D);return CA.BaseTexturePointMarker3D=i,CA}var Gse;function pv(){if(Gse)return ul;Gse=1;var r=ul&&ul.__extends||(function(){var h=function(p,g){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var m in y)Object.prototype.hasOwnProperty.call(y,m)&&(v[m]=y[m])},h(p,g)};return function(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");h(p,g);function v(){this.constructor=p}p.prototype=g===null?Object.create(g):(v.prototype=g.prototype,new v)}})();Object.defineProperty(ul,"__esModule",{value:!0}),ul.TrianglePointMarker3D=ul.EllipsePointMarker3D=ul.QuadPointMarker=ul.PixelPointMarker3D=ul.CylinderPointMarker3D=ul.PyramidPointMarker3D=ul.CubePointMarker3D=ul.SpherePointMarker3D=void 0;var e=AX(),i=xCe(),n=w1(),t=ECe(),o=(function(h){r(p,h);function p(g,v){var y=h.call(this,g,v)||this;return y.type=e.EPointMarker3DType.Sphere,y}return Object.defineProperty(p.prototype,"pointsMesh",{get:function(){return this.webAssemblyContext.SCRTGetTemplateMesh(this.webAssemblyContext.eSCRTMesh.SCRT_MESH_SPHERE)},enumerable:!1,configurable:!0}),p})(i.BaseMeshPointMarker3D);ul.SpherePointMarker3D=o;var a=(function(h){r(p,h);function p(g,v){var y=h.call(this,g,v)||this;return y.type=e.EPointMarker3DType.Cube,y}return Object.defineProperty(p.prototype,"pointsMesh",{get:function(){return this.webAssemblyContext.SCRTGetTemplateMesh(this.webAssemblyContext.eSCRTMesh.SCRT_MESH_CUBE)},enumerable:!1,configurable:!0}),p})(i.BaseMeshPointMarker3D);ul.CubePointMarker3D=a;var s=(function(h){r(p,h);function p(g,v){var y=h.call(this,g,v)||this;return y.type=e.EPointMarker3DType.Pyramid,y}return Object.defineProperty(p.prototype,"pointsMesh",{get:function(){return this.webAssemblyContext.SCRTGetTemplateMesh(this.webAssemblyContext.eSCRTMesh.SCRT_MESH_PYRAMID)},enumerable:!1,configurable:!0}),p})(i.BaseMeshPointMarker3D);ul.PyramidPointMarker3D=s;var l=(function(h){r(p,h);function p(g,v){var y=h.call(this,g,v)||this;return y.type=e.EPointMarker3DType.Cylinder,y}return Object.defineProperty(p.prototype,"pointsMesh",{get:function(){return this.webAssemblyContext.SCRTGetTemplateMesh(this.webAssemblyContext.eSCRTMesh.SCRT_MESH_CYLINDER)},enumerable:!1,configurable:!0}),p})(i.BaseMeshPointMarker3D);ul.CylinderPointMarker3D=l;var u=(function(h){r(p,h);function p(g,v){var y=h.call(this,g,v)||this;return y.type=e.EPointMarker3DType.Pixel,y.size=0,y}return Object.defineProperty(p.prototype,"markerType",{get:function(){return n.EMarkerType.Pixel},enumerable:!1,configurable:!0}),p})(n.BasePointMarker3D);ul.PixelPointMarker3D=u;var c=(function(h){r(p,h);function p(g,v){var y=h.call(this,g,v)||this;return y.type=e.EPointMarker3DType.Quad,y}return Object.defineProperty(p.prototype,"pointsTexture",{get:function(){return this.webAssemblyContext.SCRTGetTemplateTexture(this.webAssemblyContext.eSCRTTexture.SCRT_TEXTURE_SOLIDWHITE)},enumerable:!1,configurable:!0}),p})(t.BaseTexturePointMarker3D);ul.QuadPointMarker=c;var d=(function(h){r(p,h);function p(g,v){var y=h.call(this,g,v)||this;return y.type=e.EPointMarker3DType.Ellipse,y}return Object.defineProperty(p.prototype,"pointsTexture",{get:function(){return this.webAssemblyContext.SCRTGetTemplateTexture(this.webAssemblyContext.eSCRTTexture.SCRT_TEXTURE_CIRCLE)},enumerable:!1,configurable:!0}),p})(t.BaseTexturePointMarker3D);ul.EllipsePointMarker3D=d;var f=(function(h){r(p,h);function p(g,v){var y=h.call(this,g,v)||this;return y.type=e.EPointMarker3DType.Triangle,y}return Object.defineProperty(p.prototype,"pointsTexture",{get:function(){return this.webAssemblyContext.SCRTGetTemplateTexture(this.webAssemblyContext.eSCRTTexture.SCRT_TEXTURE_TRIANGLE)},enumerable:!1,configurable:!0}),p})(t.BaseTexturePointMarker3D);return ul.TrianglePointMarker3D=f,ul}var TA={},mW={},Yse;function fy(){return Yse||(Yse=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.PROPERTY=void 0,(function(e){e.CELL_HARDNESS_FACTOR="CELL_HARDNESS_FACTOR",e.COLOR_MAP_TEXTURE_SIZE="COLOR_MAP_TEXTURE_SIZE",e.CONTOUR_STROKE="CONTOUR_STROKE",e.CONTOUR_OFFSET="CONTOUR_OFFSET",e.CONTOUR_INTERVAL="CONTOUR_INTERVAL",e.CONTOUR_STROKE_THICKNESS="CONTOUR_STROKE_THICKNESS",e.DATA_POINT_WIDTH_X="DATA_POINT_WIDTH_X",e.DATA_POINT_WIDTH_Z="DATA_POINT_WIDTH_Z",e.DATA_SERIES="DATA_SERIES",e.DRAW_MESH_AS="DRAW_MESH_AS",e.DRAW_SKIRT="DRAW_SKIRT",e.FILL="FILL",e.GRADIENT_STOPS="GRADIENT_STOPS",e.HEIGHT_SCALE_FACTOR="HEIGHT_SCALE_FACTOR",e.HIGHLIGHT="HIGHLIGHT",e.IS_ANTIALIASED="IS_ANTIALIASED",e.IS_LINE_STRIP="IS_LINE_STRIP",e.IS_VISIBLE="IS_VISIBLE",e.LIGHTING_FACTOR="LIGHTING_FACTOR",e.MAXIMUM="MAXIMUM",e.MESH_COLOR_PALETTE="MESH_COLOR_PALETTE",e.MESH_PALETTE_MODE="MESH_PALETTE_MODE",e.MESH_RESOLUTION="MESH_RESOLUTION",e.MINIMUM="MINIMUM",e.OPACITY="OPACITY",e.SERIES_NAME="SERIES_NAME",e.PALETTE_PROVIDER="PALETTE_PROVIDER",e.PARENT_SURFACE="PARENT_SURFACE",e.POINT_MARKER3D="POINT_MARKER3D",e.SCENE_ENTITY="SCENE_ENTITY",e.SHININESS="SHININESS",e.STROKE="STROKE",e.STROKE_THICKNESS="STROKE_THICKNESS",e.USE_METADATA_COLORS="USE_METADATA_COLORS",e.Y_OFFSET="Y_OFFSET"})(r.PROPERTY||(r.PROPERTY={}))})(mW)),mW}var xA={},$se;function nj(){if($se)return xA;$se=1;var r=xA&&xA.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(u[d]=c[d])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})();Object.defineProperty(xA,"__esModule",{value:!0}),xA.RenderableSeriesSceneEntity=void 0;var e=ni(),i=Qn(),n=dU(),t=BM(),o=(function(a){r(s,a);function s(l,u,c){var d=a.call(this,l)||this;return d.parentSeries=u,d.state=c,d.state.setInitialState(),d.hitTest=d.hitTest.bind(d),d.rebuildPointMetadata=d.rebuildPointMetadata.bind(d),d}return s.prototype.Update=function(l){this.currentRenderPassData&&(this.state.validate(this.parentSeries,this.currentRenderPassData)||(this.updateSeries(),this.state.reset(this.parentSeries,this.currentRenderPassData)),a.prototype.Update.call(this,l))},s.prototype.onEngineRestart=function(){a.prototype.onEngineRestart.call(this),this.state.setInitialState()},s.prototype.notifySeriesPropertyChanged=function(l){this.state.setRenderableSeriesPropertyChanged()},s.prototype.hitTestXyz=function(l){var u,c=Math.round(l.x),d=Math.round(l.y),f=this.webAssemblyContext.SCRTGetSelectionInfo(c,d),h=new n.HitTestInfo3D(this.parentSeries,!1);return h.isHit=f.m_uiSelectionIndex>0&&((u=f.GetEntity())===null||u===void 0?void 0:u.GetEntityId())===this.entityId,h.selectionIndex=h.isHit?f.m_uiSelectionIndex:-1,h.hitTestPoint=l,h},s.prototype.rebuildPointMetadata=function(l,u,c,d,f){var h,p,g;e.Guard.notNull(l,"pointColors"),e.Guard.notNull(u,"pointScales"),e.Guard.isTrue(l.size()===d,"pointColors must have correct size"),e.Guard.isTrue(u.size()===d,"pointScales must have correct size");for(var v=!0,y=!0,m=(0,i.vectorToArrayViewUi32)(l,this.webAssemblyContext),b=(0,i.vectorToArrayViewF32)(u,this.webAssemblyContext),S=0;S<d;S++){var _=c[S],C=(p=(h=_==null?void 0:_.vertexColor)!==null&&h!==void 0?h:_==null?void 0:_.vertexColorAbgr)!==null&&p!==void 0?p:f,T=(g=_==null?void 0:_.pointScale)!==null&&g!==void 0?g:1;m[S]=C,b[S]=T,C!==f&&(y=!1),T!==1&&(v=!1)}return{hasDefaultColors:y,hasDefaultScales:v}},s})(t.BaseSceneEntity3D);return xA.RenderableSeriesSceneEntity=o,xA}var h2={},qse;function oj(){if(qse)return h2;qse=1,Object.defineProperty(h2,"__esModule",{value:!0}),h2.RenderableSeriesSceneEntityState=void 0;var r=(function(){function e(i,n,t,o,a){i===void 0&&(i=!0),n===void 0&&(n=!0),t===void 0&&(t=!0),o===void 0&&(o=!0),a===void 0&&(a={xVisibleMin:0,xVisibleMax:0,yVisibleMin:0,yVisibleMax:0,zVisibleMin:0,zVisibleMax:0,xWorldDimension:0,yWorldDimension:0,zWorldDimension:0}),this.isInitialStateProperty=i,this.isDataSeriesModifiedProperty=n,this.isRenderableSeriesPropertyChangedProperty=t,this.isAxisCubeStateChangedProperty=o,this.axisCubeState=a}return Object.defineProperty(e.prototype,"isInitialState",{get:function(){return this.isInitialStateProperty},enumerable:!1,configurable:!0}),e.prototype.setInitialState=function(){this.isInitialStateProperty=!0},Object.defineProperty(e.prototype,"isDataSeriesModified",{get:function(){return this.isDataSeriesModifiedProperty},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isRenderableSeriesPropertyChanged",{get:function(){return this.isRenderableSeriesPropertyChangedProperty},enumerable:!1,configurable:!0}),e.prototype.setRenderableSeriesPropertyChanged=function(){this.isRenderableSeriesPropertyChangedProperty=!0},Object.defineProperty(e.prototype,"isAxisCubeStateChanged",{get:function(){return this.isAxisCubeStateChangedProperty},enumerable:!1,configurable:!0}),e.prototype.validate=function(i,n){var t;this.isDataSeriesModifiedProperty=(t=i.dataSeries)===null||t===void 0?void 0:t.isModified;var o=.001;return this.isAxisCubeStateChangedProperty=Math.abs(this.axisCubeState.xVisibleMin-n.xCalc.visibleMin)>o||Math.abs(this.axisCubeState.xVisibleMax-n.xCalc.visibleMax)>o||Math.abs(this.axisCubeState.yVisibleMin-n.yCalc.visibleMin)>o||Math.abs(this.axisCubeState.yVisibleMax-n.yCalc.visibleMax)>o||Math.abs(this.axisCubeState.zVisibleMin-n.zCalc.visibleMin)>o||Math.abs(this.axisCubeState.zVisibleMax-n.zCalc.visibleMax)>o||Math.abs(this.axisCubeState.xWorldDimension-n.worldDimensions.x)>o||Math.abs(this.axisCubeState.yWorldDimension-n.worldDimensions.y)>o||Math.abs(this.axisCubeState.zWorldDimension-n.worldDimensions.z)>o,!this.isInitialState&&!this.isDataSeriesModified&&!this.isAxisCubeStateChanged},e.prototype.reset=function(i,n){var t;this.isInitialStateProperty=!1,this.isDataSeriesModifiedProperty=!1,this.isRenderableSeriesPropertyChangedProperty=!1,this.isAxisCubeStateChangedProperty=!1,this.axisCubeState={xVisibleMin:n.xCalc.visibleMin,xVisibleMax:n.xCalc.visibleMax,yVisibleMin:n.yCalc.visibleMin,yVisibleMax:n.yCalc.visibleMax,zVisibleMin:n.zCalc.visibleMin,zVisibleMax:n.zCalc.visibleMax,xWorldDimension:n.worldDimensions.x,yWorldDimension:n.worldDimensions.y,zWorldDimension:n.worldDimensions.z},(t=i.dataSeries)===null||t===void 0||t.resetModified()},e})();return h2.RenderableSeriesSceneEntityState=r,h2}var Xse;function ACe(){if(Xse)return TA;Xse=1;var r=TA&&TA.__extends||(function(){var u=function(c,d){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,h){f.__proto__=h}||function(f,h){for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(f[p]=h[p])},u(c,d)};return function(c,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");u(c,d);function f(){this.constructor=c}c.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}})();Object.defineProperty(TA,"__esModule",{value:!0}),TA.ColumnSceneEntity=void 0;var e=Mr(),i=dy(),n=mi(),t=zd(),o=fy(),a=nj(),s=oj(),l=(function(u){r(c,u);function c(d,f){var h=u.call(this,d,f,new s.RenderableSeriesSceneEntityState)||this;return h.type=i.ESceneEntityType.ColumnSceneEntity,h.setNativeEntity(d.SCRTColumnsSceneEntity.implement(h)),h.sceneEntityParams=new d.SCRTColumnsSceneEntityParams,h}return c.prototype.delete=function(){this.instanceColors=(0,e.deleteSafe)(this.instanceColors),this.instanceScales=(0,e.deleteSafe)(this.instanceScales),this.sceneEntityParams=(0,e.deleteSafe)(this.sceneEntityParams),u.prototype.delete.call(this)},c.prototype.Render=function(){u.prototype.Render.call(this)},c.prototype.notifySeriesPropertyChanged=function(d){d===o.PROPERTY.POINT_MARKER3D||d===o.PROPERTY.USE_METADATA_COLORS||d===o.PROPERTY.FILL?this.updateSeries():d===o.PROPERTY.OPACITY?this.nativeEntity.SetOpacity(this.parentSeries.opacity):(d===o.PROPERTY.DATA_POINT_WIDTH_X||d===o.PROPERTY.DATA_POINT_WIDTH_Z)&&this.updateSeries(),u.prototype.notifySeriesPropertyChanged.call(this,d)},c.prototype.hitTest=function(d){return u.prototype.hitTestXyz.call(this,d)},c.prototype.updateSeries=function(){var d=this.parentSeries.dataSeries;if(!(!d||!this.currentRenderPassData)){if(d.type!==t.EDataSeriesType3D.Xyz3D)throw new Error("DataSeries type for a ColumnRenderableSeries3D must be XyzDataSeries3D");var f=this.parentSeries.pointMarker;if(!f)throw new Error("To render 3D Columns you must provider a PointMarker on BaseRenderableSeries3D");this.parentSeries.fill&&(f.fill=this.parentSeries.fill),this.nativeEntity.SetInstanceSize(this.parentSeries.getDataPointWidth(this.currentRenderPassData,this.parentSeries.dataPointWidthX,this.parentSeries.dataPointWidthZ)),this.nativeEntity.SetInstanceMesh(f.pointsMesh);var h=(0,n.parseColorToUIntArgb)(f.fill);this.nativeEntity.SetColor(h);var p=d.getNativeXValues(),g=d.getNativeYValues(),v=d.getNativeZValues(),y=d.getMetadataValues(),m=d.count();this.instanceColors=this.getOrCreateVector(this.instanceColors,m,this.webAssemblyContext.SCRTUintVector,h),this.instanceScales=this.getOrCreateVector(this.instanceScales,m,this.webAssemblyContext.SCRTFloatVector,1);var b=this.rebuildPointMetadata(this.instanceColors,this.instanceScales,y,m,h),S=b.hasDefaultColors,_=b.hasDefaultScales;this.sceneEntityParams.m_bUseDefaultColors=S||!this.parentSeries.useMetadataColors,this.sceneEntityParams.m_bUseDefaultScale=_,this.sceneEntityParams.SetCoordinateCalculators(this.currentRenderPassData.xCalc.nativeCalculator,this.currentRenderPassData.yCalc.nativeCalculator,this.currentRenderPassData.zCalc.nativeCalculator),this.nativeEntity.UpdateMeshesVec(p,g,v,this.instanceScales,this.instanceColors,this.sceneEntityParams),this.nativeEntity.SetOpacity(this.parentSeries.opacity)}},c})(a.RenderableSeriesSceneEntity);return TA.ColumnSceneEntity=l,TA}var EA={},p2={},Kse;function wCe(){if(Kse)return p2;Kse=1,Object.defineProperty(p2,"__esModule",{value:!0}),p2.Series3DVisibleChangedArgs=void 0;var r=(function(){function e(i,n){this.sourceSeries=i,this.isVisible=n}return e})();return p2.Series3DVisibleChangedArgs=r,p2}var AA={},Zse;function OCe(){if(Zse)return AA;Zse=1;var r=AA&&AA.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(u[d]=c[d])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})();Object.defineProperty(AA,"__esModule",{value:!0}),AA.SurfaceMeshSeriesInfo3D=void 0;var e=oo(),i=zd(),n=$1(),t=tj(),o=(function(a){r(s,a);function s(l,u){var c=a.call(this,l,u)||this;return c.dataSeriesType=i.EDataSeriesType3D.UniformGrid3D,c.enrichSeriesInfo(),c}return s.prototype.enrichSeriesInfo=function(){if(!(!this.isHit||!this.renderableSeries)){var l=this.renderableSeries.dataSeries;if(l){var u={x:this.hitTestInfo.selectionIjIndices.x,z:this.hitTestInfo.selectionIjIndices.y},c={x:l.getX(u.x),y:l.getYValue(u.z,u.x),z:l.getZ(u.z)},d={x:l.getX(u.x+1),y:l.getYValue(u.z,u.x+1),z:l.getZ(u.z)},f={x:l.getX(u.x),y:l.getYValue(u.z+1,u.x),z:l.getZ(u.z+1)},h={x:l.getX(u.x+1),y:l.getYValue(u.z+1,u.x+1),z:l.getZ(u.z+1)},p=this.renderableSeries.parentSurface;if(!(!p||!p.xAxis||!p.yAxis||!p.zAxis)){var g=p.xAxis.getCurrentCoordinateCalculator(),v=p.yAxis.getCurrentCoordinateCalculator(),y=p.zAxis.getCurrentCoordinateCalculator(),m=new n.Vector3(g.getCoordinate(c.x),v.getCoordinate(c.y),y.getCoordinate(c.z)),b=new n.Vector3(g.getCoordinate(d.x),v.getCoordinate(d.y),y.getCoordinate(d.z)),S=new n.Vector3(g.getCoordinate(f.x),v.getCoordinate(f.y),y.getCoordinate(f.z)),_=new n.Vector3(g.getCoordinate(h.x),v.getCoordinate(h.y),y.getCoordinate(h.z)),C=p.worldToScreenCoord(m),T=p.worldToScreenCoord(b),x=p.worldToScreenCoord(S),A=p.worldToScreenCoord(_),w=(0,e.calcDistance)(C.x,C.y,this.hitTestInfo.hitTestPoint.x,this.hitTestInfo.hitTestPoint.y),L=(0,e.calcDistance)(T.x,T.y,this.hitTestInfo.hitTestPoint.x,this.hitTestInfo.hitTestPoint.y),k=(0,e.calcDistance)(x.x,x.y,this.hitTestInfo.hitTestPoint.x,this.hitTestInfo.hitTestPoint.y),D=(0,e.calcDistance)(A.x,A.y,this.hitTestInfo.hitTestPoint.x,this.hitTestInfo.hitTestPoint.y),j=p.worldDimensions.x*.5,N=p.worldDimensions.z*.5,V=Math.min(w,L,k,D);V===w&&(this.xIndex=u.x,this.zIndex=u.z,this.xValue=c.x,this.yValue=c.y,this.zValue=c.z,this.hitWorldCoords=new n.Vector3(m.x-j,m.y,m.z-N)),V===k&&(this.xIndex=u.x,this.zIndex=u.z+1,this.xValue=f.x,this.yValue=f.y,this.zValue=f.z,this.hitWorldCoords=new n.Vector3(S.x-j,S.y,S.z-N)),V===L&&(this.xIndex=u.x+1,this.zIndex=u.z,this.xValue=d.x,this.yValue=d.y,this.zValue=d.z,this.hitWorldCoords=new n.Vector3(b.x-j,b.y,b.z-N)),V===D&&(this.xIndex=u.x+1,this.zIndex=u.z+1,this.xValue=h.x,this.yValue=h.y,this.zValue=h.z,this.hitWorldCoords=new n.Vector3(_.x-j,_.y,_.z-N)),this.pointMetadata=l.getMetadataAt(this.zIndex,this.xIndex)}}}},s})(t.SeriesInfo3D);return AA.SurfaceMeshSeriesInfo3D=o,AA}var wA={},Jse;function DCe(){if(Jse)return wA;Jse=1;var r=wA&&wA.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(wA,"__esModule",{value:!0}),wA.XyzSeriesInfo3D=void 0;var e=zd(),i=$1(),n=tj(),t=(function(o){r(a,o);function a(s,l){var u=o.call(this,s,l)||this;return u.dataSeriesType=e.EDataSeriesType3D.Xyz3D,u.enrichSeriesInfo(),u}return a.prototype.enrichSeriesInfo=function(){if(!(!this.isHit||!this.renderableSeries)){this.dataSeriesIndex=this.hitTestInfo.selectionIndex-1;var s=this.renderableSeries.dataSeries;if(s){this.xValue=s.getNativeXValues().get(this.dataSeriesIndex),this.yValue=s.getNativeYValues().get(this.dataSeriesIndex),this.zValue=s.getNativeZValues().get(this.dataSeriesIndex);var l=s.getMetadataValues();l&&l.length>this.dataSeriesIndex&&(this.pointMetadata=l[this.dataSeriesIndex]);var u=this.renderableSeries.parentSurface;if(u){var c=u.worldDimensions.x*.5,d=u.worldDimensions.z*.5,f=u.xAxis.getCurrentCoordinateCalculator().getCoordinate(this.xValue)-c,h=u.yAxis.getCurrentCoordinateCalculator().getCoordinate(this.yValue),p=u.zAxis.getCurrentCoordinateCalculator().getCoordinate(this.zValue)-d;this.hitWorldCoords=new i.Vector3(f,h,p)}}}},a})(n.SeriesInfo3D);return wA.XyzSeriesInfo3D=t,wA}var Qse;function aj(){if(Qse)return EA;Qse=1;var r=EA&&EA.__extends||(function(){var g=function(v,y){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,b){m.__proto__=b}||function(m,b){for(var S in b)Object.prototype.hasOwnProperty.call(b,S)&&(m[S]=b[S])},g(v,y)};return function(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");g(v,y);function m(){this.constructor=v}v.prototype=y===null?Object.create(y):(m.prototype=y.prototype,new m)}})();Object.defineProperty(EA,"__esModule",{value:!0}),EA.BaseRenderableSeries3D=void 0;var e=Jn(),i=wCe(),n=$n(),t=Mr(),o=Ba(),a=$o(),s=ws(),l=zd(),u=fy(),c=Q1(),d=tj(),f=OCe(),h=DCe(),p=(function(g){r(v,g);function v(y,m){var b=this,S,_,C,T;return b=g.call(this)||this,b.isVisibleChanged=new o.EventHandler,b.id=(S=m==null?void 0:m.id)!==null&&S!==void 0?S:(0,s.generateGuid)(),b.webAssemblyContext=y,b.dataSeriesDataChanged=b.dataSeriesDataChanged.bind(b),b.pointMarkerPropertyChanged=b.pointMarkerPropertyChanged.bind(b),b.onDpiChanged=b.onDpiChanged.bind(b),b.hitTest=b.hitTest.bind(b),b.enrichHitTest=b.enrichHitTest.bind(b),b.dataSeries=(m==null?void 0:m.dataSeries)||void 0,b.isVisibleProperty=(m==null?void 0:m.isVisible)!==void 0?m==null?void 0:m.isVisible:!0,m!=null&&m.pointMarker&&"options"in m.pointMarker&&(m.pointMarker=(0,e.createType)(a.EBaseType.PointMarker3D,m.pointMarker.type,y,m.pointMarker.options)),b.pointMarkerProperty=(_=m==null?void 0:m.pointMarker)!==null&&_!==void 0?_:b.pointMarkerProperty,b.seriesNameProperty=(C=m==null?void 0:m.seriesName)!==null&&C!==void 0?C:b.seriesNameProperty,b.strokeProperty=(m==null?void 0:m.stroke)||"#FFFFFF",b.shininessProperty=(m==null?void 0:m.shininess)===void 0?64:m.shininess,b.opacityProperty=(T=m==null?void 0:m.opacity)!==null&&T!==void 0?T:1,b}return v.prototype.applyTheme=function(y){},Object.defineProperty(v.prototype,"opacity",{get:function(){return this.opacityProperty},set:function(y){this.opacityProperty=y,this.notifyPropertyChanged(u.PROPERTY.OPACITY)},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"sceneEntity",{get:function(){return this.sceneEntityProperty},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"shininess",{get:function(){return this.shininessProperty},set:function(y){this.shininessProperty=y,this.notifyPropertyChanged(u.PROPERTY.SHININESS)},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"paletteProvider",{get:function(){return this.paletteProviderProperty},set:function(y){this.paletteProviderProperty=y,this.notifyPropertyChanged(u.PROPERTY.PALETTE_PROVIDER)},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"stroke",{get:function(){return this.strokeProperty},set:function(y){this.strokeProperty=y,this.notifyPropertyChanged(u.PROPERTY.STROKE)},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"dataSeries",{get:function(){return this.dataSeriesProperty},set:function(y){var m,b;this.dataSeriesProperty=y,(m=this.dataSeriesProperty)===null||m===void 0||m.dataChanged.unsubscribe(this.dataSeriesDataChanged),this.dataSeriesProperty=y,(b=this.dataSeriesProperty)===null||b===void 0||b.dataChanged.subscribe(this.dataSeriesDataChanged),this.notifyPropertyChanged(u.PROPERTY.DATA_SERIES)},enumerable:!1,configurable:!0}),v.prototype.getDataSeriesName=function(){var y;return(y=this.dataSeries)===null||y===void 0?void 0:y.dataSeriesName},Object.defineProperty(v.prototype,"seriesName",{get:function(){var y;return(y=this.seriesNameProperty)!==null&&y!==void 0?y:this.getDataSeriesName()},set:function(y){this.seriesNameProperty!==y&&(this.seriesNameProperty=y,this.notifyPropertyChanged(u.PROPERTY.SERIES_NAME))},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"pointMarker",{get:function(){return this.pointMarkerProperty},set:function(y){this.detachPointMarker(this.pointMarkerProperty),this.pointMarkerProperty=y,this.attachPointMarker(this.pointMarkerProperty),this.notifyPropertyChanged(u.PROPERTY.POINT_MARKER3D)},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"parentSurface",{get:function(){return this.parentSurfaceProperty},set:function(y){this.parentSurfaceProperty=y,this.notifyPropertyChanged(u.PROPERTY.PARENT_SURFACE)},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"isVisible",{get:function(){return this.isVisibleProperty},set:function(y){var m,b=this.isVisibleProperty;this.isVisibleProperty=y,this.sceneEntityProperty&&(this.sceneEntityProperty.isVisible=y),b!==y&&((m=this.isVisibleChanged)===null||m===void 0||m.raiseEvent(new i.Series3DVisibleChangedArgs(this,y))),this.notifyPropertyChanged(u.PROPERTY.IS_VISIBLE)},enumerable:!1,configurable:!0}),v.prototype.onAttach=function(y){if(this.parentSurface=y,this.invalidateParentCallback)throw new Error("Invalid operation in sciChart3DSurface.attachSeries, this series has already been attached to a SciChart3DSurface. Please detach it from a SciChart3DSurface before attaching to another");this.invalidateParentCallback=y.invalidateElement},v.prototype.onDetach=function(){this.invalidateParentCallback=void 0,this.parentSurface=void 0},v.prototype.delete=function(){this.sceneEntityProperty=(0,t.deleteSafe)(this.sceneEntityProperty),this.dataSeries=(0,t.deleteSafe)(this.dataSeries)},v.prototype.onDpiChanged=function(y){var m;(m=this.sceneEntityProperty)===null||m===void 0||m.onDpiChanged(y)},v.prototype.hitTest=function(y){if(this.parentSurface&&!this.parentSurface.isHitTestEnabled)throw new Error("Enable hit-test functions by setting SciChart3DSurface.isHitTestEnabled = true");var m=this.sceneEntity.hitTest;return m?this.enrichHitTest(m(y)):d.SeriesInfo3D.empty()},v.prototype.dataSeriesDataChanged=function(){this.invalidateParentCallback&&this.invalidateParentCallback()},v.prototype.enrichHitTest=function(y){var m,b=(m=y.associatedSeries)===null||m===void 0?void 0:m.dataSeries;if(!b)return d.SeriesInfo3D.empty();switch(b.type){case l.EDataSeriesType3D.Xyz3D:return new h.XyzSeriesInfo3D(this,y);case l.EDataSeriesType3D.UniformGrid3D:return new f.SurfaceMeshSeriesInfo3D(this,y);default:throw new Error("Unknown data series type "+b.type)}},v.prototype.setSceneEntity=function(y){this.sceneEntityProperty=y,this.sceneEntityProperty&&(this.sceneEntityProperty.isVisible=this.isVisible),this.notifyPropertyChanged(u.PROPERTY.SCENE_ENTITY)},v.prototype.notifyPropertyChanged=function(y){var m;(m=this.sceneEntityProperty)===null||m===void 0||m.notifySeriesPropertyChanged(y),this.invalidateParentCallback&&this.invalidateParentCallback()},v.prototype.attachPointMarker=function(y){y&&y.propertyChanged.subscribe(this.pointMarkerPropertyChanged)},v.prototype.detachPointMarker=function(y){y&&y.propertyChanged.unsubscribe(this.pointMarkerPropertyChanged)},v.prototype.pointMarkerPropertyChanged=function(y){this.notifyPropertyChanged("pointMarker."+y.propertyName)},v.prototype.toJSON=function(y){var m;y===void 0&&(y=!1);var b=this.getOptions(),S=(m=this.dataSeries)===null||m===void 0?void 0:m.toJSON(y),_=S==null?void 0:S.options;return this.type===c.ESeriesType3D.PointLineRenderableSeries3D?{type:this.type,options:b,xyzData:_}:this.type===c.ESeriesType3D.ScatterRenderableSeries3D?{type:this.type,options:b,xyzData:_}:this.type===c.ESeriesType3D.ColumnRenderableSeries3D?{type:this.type,options:b,xyzData:_}:this.type===c.ESeriesType3D.SurfaceMeshRenderableSeries3D?{type:this.type,options:b,uniformGridData:_}:{type:this.type,options:b}},v.prototype.getOptions=function(){var y,m={id:this.id,isVisible:this.isVisible,opacity:this.opacity,pointMarker:(y=this.pointMarker)===null||y===void 0?void 0:y.toJSON(),stroke:this.stroke,shininess:this.shininess,seriesName:this.seriesNameProperty};return m},v})(n.DeletableEntity);return EA.BaseRenderableSeries3D=p,EA}var ele;function RCe(){if(ele)return _A;ele=1;var r=_A&&_A.__extends||(function(){var s=function(l,u){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(c[f]=d[f])},s(l,u)};return function(l,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");s(l,u);function c(){this.constructor=l}l.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}})();Object.defineProperty(_A,"__esModule",{value:!0}),_A.ColumnRenderableSeries3D=void 0;var e=pv(),i=ACe(),n=aj(),t=fy(),o=Q1(),a=(function(s){r(l,s);function l(u,c){var d=this,f,h,p,g;return d=s.call(this,u,c)||this,d.type=o.ESeriesType3D.ColumnRenderableSeries3D,d.dataPointWidthXProperty=1,d.dataPointWidthZProperty=1,d.useMetadataColorsProperty=!1,d.fillProperty="#FF3333",d.dataPointWidthXProperty=(f=c==null?void 0:c.dataPointWidthX)!==null&&f!==void 0?f:d.dataPointWidthXProperty,d.dataPointWidthZProperty=(h=c==null?void 0:c.dataPointWidthZ)!==null&&h!==void 0?h:d.dataPointWidthZProperty,d.useMetadataColors=(p=c==null?void 0:c.useMetadataColors)!==null&&p!==void 0?p:d.useMetadataColors,d.fillProperty=(g=c==null?void 0:c.fill)!==null&&g!==void 0?g:d.fill,c!=null&&c.pointMarker||(d.pointMarkerProperty=new e.CubePointMarker3D(u,{fill:d.fill})),d.setSceneEntity(new i.ColumnSceneEntity(u,d)),d}return Object.defineProperty(l.prototype,"pointMarker",{get:function(){return this.pointMarkerProperty},set:function(u){this.detachPointMarker(this.pointMarkerProperty),this.pointMarkerProperty=u,this.attachPointMarker(this.pointMarkerProperty),this.notifyPropertyChanged(t.PROPERTY.POINT_MARKER3D)},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"fill",{get:function(){return this.fillProperty},set:function(u){this.fillProperty=u,this.notifyPropertyChanged(t.PROPERTY.FILL)},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"dataPointWidthX",{get:function(){return this.dataPointWidthXProperty},set:function(u){this.dataPointWidthXProperty=u,this.notifyPropertyChanged(t.PROPERTY.DATA_POINT_WIDTH_X)},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"dataPointWidthZ",{get:function(){return this.dataPointWidthZProperty},set:function(u){this.dataPointWidthZProperty=u,this.notifyPropertyChanged(t.PROPERTY.DATA_POINT_WIDTH_Z)},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"useMetadataColors",{get:function(){return this.useMetadataColorsProperty},set:function(u){this.useMetadataColorsProperty=u,this.notifyPropertyChanged(t.PROPERTY.USE_METADATA_COLORS)},enumerable:!1,configurable:!0}),l.prototype.getDataPointWidth=function(u,c,d){if(!u)return 0;var f=Math.abs(u.xCalc.getCoordinate(0)-u.xCalc.getCoordinate(c)),h=Math.abs(u.zCalc.getCoordinate(0)-u.zCalc.getCoordinate(d));return Math.min(f,h)},l.prototype.getOptions=function(){var u=s.prototype.getOptions.call(this),c={pointMarker:this.pointMarker,dataPointWidthX:this.dataPointWidthX,dataPointWidthZ:this.dataPointWidthZ,useMetadataColors:this.useMetadataColors,fill:this.fill};return Object.assign(u,c)},l})(n.BaseRenderableSeries3D);return _A.ColumnRenderableSeries3D=a,_A}var OA={},DA={},tle;function MCe(){if(tle)return DA;tle=1;var r=DA&&DA.__extends||(function(){var c=function(d,f){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(h[g]=p[g])},c(d,f)};return function(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");c(d,f);function h(){this.constructor=d}d.prototype=f===null?Object.create(f):(h.prototype=f.prototype,new h)}})();Object.defineProperty(DA,"__esModule",{value:!0}),DA.PointLine3DSceneEntity=void 0;var e=Mr(),i=dy(),n=mi(),t=zd(),o=fy(),a=w1(),s=nj(),l=oj(),u=(function(c){r(d,c);function d(f,h){var p=c.call(this,f,h,new l.RenderableSeriesSceneEntityState)||this;return p.type=i.ESceneEntityType.PointLine3DSceneEntity,p.setNativeEntity(f.SCRTPointLine3DSceneEntity.implement(p)),p.sceneEntityParams=new f.SCRTPointLines3DSceneEntityParams,p}return d.prototype.delete=function(){this.pointColors=(0,e.deleteSafe)(this.pointColors),this.pointScales=(0,e.deleteSafe)(this.pointScales),this.sceneEntityParams=(0,e.deleteSafe)(this.sceneEntityParams),c.prototype.delete.call(this)},d.prototype.Render=function(){this.nativeEntity.SetOpacity(this.parentSeries.opacity),c.prototype.Render.call(this)},d.prototype.notifySeriesPropertyChanged=function(f){f===o.PROPERTY.STROKE_THICKNESS&&this.nativeEntity.SetLineStrokeThickness(this.parentSeries.strokeThickness),f===o.PROPERTY.STROKE&&this.nativeEntity.SetStrokeColor((0,n.parseColorToUIntArgb)(this.parentSeries.stroke)),f===o.PROPERTY.POINT_MARKER3D&&this.updateSeries(),c.prototype.notifySeriesPropertyChanged.call(this,f)},d.prototype.hitTest=function(f){return c.prototype.hitTestXyz.call(this,f)},d.prototype.updateSeries=function(){var f=this.parentSeries.dataSeries;if(!(!f||!this.currentRenderPassData)){if(f.type!==t.EDataSeriesType3D.Xyz3D)throw new Error("DataSeries type for a PointLineRenderableSeries3D must be XyzDataSeries3D");var h=(0,n.parseColorToUIntArgb)(this.parentSeries.stroke);this.nativeEntity.SetLineStrokeThickness(this.parentSeries.strokeThickness),this.nativeEntity.SetIsLineStrips(this.parentSeries.isLineStrip),this.nativeEntity.SetIsLineAntialiased(this.parentSeries.isAntiAliased),this.nativeEntity.SetStrokeColor(h),this.updatePointMarker(this.parentSeries.pointMarker);var p=f.getNativeXValues(),g=f.getNativeYValues(),v=f.getNativeZValues(),y=f.getMetadataValues(),m=f.count();this.pointColors=this.getOrCreateVector(this.pointColors,m,this.webAssemblyContext.SCRTUintVector,h),this.pointScales=this.getOrCreateVector(this.pointScales,m,this.webAssemblyContext.SCRTFloatVector,1);var b=this.rebuildPointMetadata(this.pointColors,this.pointScales,y,m,h),S=b.hasDefaultColors,_=b.hasDefaultScales;this.sceneEntityParams.useDefaultColors=S,this.sceneEntityParams.useDefaultScale=_,this.sceneEntityParams.SetCoordinateCalculators(this.currentRenderPassData.xCalc.nativeCalculator,this.currentRenderPassData.yCalc.nativeCalculator,this.currentRenderPassData.zCalc.nativeCalculator),this.nativeEntity.UpdateMeshesVec(p,g,v,this.pointColors,this.pointColors,this.pointScales,this.sceneEntityParams)}},d.prototype.updatePointMarker=function(f){var h=this.webAssemblyContext.eSCRT_POINT_MARKER_TYPE;if(f===void 0||f.markerType===a.EMarkerType.Pixel)this.nativeEntity.SetPointMarkerType(h.SCRT_POINT_MARKER_TYPE_PIXEL),this.nativeEntity.SetPointSize(0);else if(f.markerType===a.EMarkerType.InstancedMesh){var p=f;if(!p.pointsMesh)throw new Error("Expected a BaseMeshPointMarker3D.pointsMesh on 3D pointmarker of type InstancedMesh");this.nativeEntity.SetPointMarkerType(h.SCRT_POINT_MARKER_TYPE_INSTANCED_MESH),this.nativeEntity.SetPointSize(f.size),this.nativeEntity.SetPointMarkerMesh(p.pointsMesh)}else if(f.markerType===a.EMarkerType.TexturedQuad){var g=f;if(!g.pointsTexture)throw new Error("Expected a BaseTexturePointMarker3D.pointsTexture on 3D pointmarker of type TexturedQuad");this.nativeEntity.SetPointMarkerType(h.SCRT_POINT_MARKER_TYPE_TEXTURED_QUAD),this.nativeEntity.SetPointSize(f.size),this.nativeEntity.SetPointMarkerTexture(g.pointsTexture)}else throw new Error("PointLine3DSceneEntity: Unknown pointMarker.markerType "+f.markerType)},d})(s.RenderableSeriesSceneEntity);return DA.PointLine3DSceneEntity=u,DA}var rle;function LCe(){if(rle)return OA;rle=1;var r=OA&&OA.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(u[d]=c[d])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})();Object.defineProperty(OA,"__esModule",{value:!0}),OA.PointLineRenderableSeries3D=void 0;var e=MCe(),i=aj(),n=fy(),t=Q1(),o=(function(a){r(s,a);function s(l,u){var c=this,d,f,h;return c=a.call(this,l,u)||this,c.type=t.ESeriesType3D.PointLineRenderableSeries3D,c.strokeThicknessProperty=(d=u==null?void 0:u.strokeThickness)!==null&&d!==void 0?d:2,c.isLineStripProperty=(f=u==null?void 0:u.isLineStrip)!==null&&f!==void 0?f:!0,c.isAntiAliasedProperty=(h=u==null?void 0:u.isAntiAliased)!==null&&h!==void 0?h:!0,c.setSceneEntity(new e.PointLine3DSceneEntity(l,c)),c}return Object.defineProperty(s.prototype,"strokeThickness",{get:function(){return this.strokeThicknessProperty},set:function(l){this.strokeThicknessProperty=l,this.notifyPropertyChanged(n.PROPERTY.STROKE_THICKNESS)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isLineStrip",{get:function(){return this.isLineStripProperty},set:function(l){this.isLineStripProperty=l,this.notifyPropertyChanged(n.PROPERTY.IS_LINE_STRIP)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isAntiAliased",{get:function(){return this.isAntiAliasedProperty},set:function(l){this.isAntiAliasedProperty=l,this.notifyPropertyChanged(n.PROPERTY.IS_ANTIALIASED)},enumerable:!1,configurable:!0}),s.prototype.getOptions=function(){var l=a.prototype.getOptions.call(this),u={strokeThickness:this.strokeThickness,isLineStrip:this.isLineStrip,isAntiAliased:this.isAntiAliased};return Object.assign(l,u)},s})(i.BaseRenderableSeries3D);return OA.PointLineRenderableSeries3D=o,OA}var RA={},MA={},ile;function kCe(){if(ile)return MA;ile=1;var r=MA&&MA.__extends||(function(){var c=function(d,f){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(h[g]=p[g])},c(d,f)};return function(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");c(d,f);function h(){this.constructor=d}d.prototype=f===null?Object.create(f):(h.prototype=f.prototype,new h)}})();Object.defineProperty(MA,"__esModule",{value:!0}),MA.ScatterPointsSceneEntity=void 0;var e=Mr(),i=dy(),n=mi(),t=zd(),o=w1(),a=fy(),s=nj(),l=oj(),u=(function(c){r(d,c);function d(f,h){var p=c.call(this,f,h,new l.RenderableSeriesSceneEntityState)||this;return p.type=i.ESceneEntityType.ScatterPointsSceneEntity,p.setNativeEntity(f.SCRTPoint3DSceneEntity.implement(p)),p.sceneEntityParams=new f.SCRTPoint3DSceneEntityParams,p.sceneEntityParams.useDefaultColors=!1,p.sceneEntityParams.useDefaultScale=!1,p}return d.prototype.delete=function(){this.pointColors=(0,e.deleteSafe)(this.pointColors),this.pointScales=(0,e.deleteSafe)(this.pointScales),this.sceneEntityParams=(0,e.deleteSafe)(this.sceneEntityParams),c.prototype.delete.call(this)},d.prototype.Render=function(){this.nativeEntity.SetOpacity(this.parentSeries.opacity),c.prototype.Render.call(this)},d.prototype.notifySeriesPropertyChanged=function(f){f===a.PROPERTY.POINT_MARKER3D&&this.updateSeries(),c.prototype.notifySeriesPropertyChanged.call(this,f)},d.prototype.hitTest=function(f){return c.prototype.hitTestXyz.call(this,f)},d.prototype.updateSeries=function(){var f=this.parentSeries.dataSeries;if(!(!f||!this.currentRenderPassData)){if(f.type!==t.EDataSeriesType3D.Xyz3D)throw new Error("DataSeries type for a ScatterRenderableSeries3D must be XyzDataSeries3D");var h=this.parentSeries.pointMarker;if(!h)throw new Error("To render 3D Scatter, bubble or point-clouds, you must provider a PointMarker on BaseRenderableSeries3D");var p=this.webAssemblyContext.eSCRT_POINT_MARKER_TYPE,g=(0,n.parseColorToUIntArgb)(h.fill);switch(h.markerType){case o.EMarkerType.Pixel:this.nativeEntity.SetPointMarkerType(p.SCRT_POINT_MARKER_TYPE_PIXEL),this.nativeEntity.SetPointSize(0),this.nativeEntity.SetPointColor(g);break;case o.EMarkerType.TexturedQuad:var v=h;if(!v.pointsTexture)throw new Error("Expected a BaseTexturePointMarker3D.pointsTexture on 3D pointmarker of type TexturedQuad");this.nativeEntity.SetPointMarkerType(p.SCRT_POINT_MARKER_TYPE_TEXTURED_QUAD),this.nativeEntity.SetPointSize(h.size),this.nativeEntity.SetPointColor(g),this.nativeEntity.SetPointMarkerTexture(v.pointsTexture);break;case o.EMarkerType.InstancedMesh:var y=h;if(!y.pointsMesh)throw new Error("Expected a BaseMeshPointMarker3D.pointsMesh on 3D pointmarker of type InstancedMesh");this.nativeEntity.SetPointMarkerType(p.SCRT_POINT_MARKER_TYPE_INSTANCED_MESH),this.nativeEntity.SetPointSize(h.size),this.nativeEntity.SetPointColor(g),this.nativeEntity.SetPointMarkerMesh(y.pointsMesh);break;default:throw new Error("Unknown pointMarker.markerType "+h.markerType)}var m=f.getNativeXValues(),b=f.getNativeYValues(),S=f.getNativeZValues(),_=f.getMetadataValues(),C=f.count();this.pointColors=this.getOrCreateVector(this.pointColors,C,this.webAssemblyContext.SCRTUintVector,g),this.pointScales=this.getOrCreateVector(this.pointScales,C,this.webAssemblyContext.SCRTFloatVector,1);var T=this.rebuildPointMetadata(this.pointColors,this.pointScales,_,C,g),x=T.hasDefaultColors,A=T.hasDefaultScales;this.sceneEntityParams.useDefaultColors=x,this.sceneEntityParams.useDefaultScale=A,this.sceneEntityParams.SetCoordinateCalculators(this.currentRenderPassData.xCalc.nativeCalculator,this.currentRenderPassData.yCalc.nativeCalculator,this.currentRenderPassData.zCalc.nativeCalculator),this.nativeEntity.UpdateMeshesVec(m,b,S,this.pointColors,this.pointScales,this.sceneEntityParams)}},d})(s.RenderableSeriesSceneEntity);return MA.ScatterPointsSceneEntity=u,MA}var nle;function ICe(){if(nle)return RA;nle=1;var r=RA&&RA.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(RA,"__esModule",{value:!0}),RA.ScatterRenderableSeries3D=void 0;var e=kCe(),i=aj(),n=Q1(),t=(function(o){r(a,o);function a(s,l){var u=o.call(this,s,l)||this;return u.type=n.ESeriesType3D.ScatterRenderableSeries3D,u.setSceneEntity(new e.ScatterPointsSceneEntity(s,u)),u}return a})(i.BaseRenderableSeries3D);return RA.ScatterRenderableSeries3D=t,RA}var g2={},c0={},ole;function CY(){if(ole)return c0;ole=1;var r=c0&&c0.__extends||(function(){var b=function(S,_){return b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,T){C.__proto__=T}||function(C,T){for(var x in T)Object.prototype.hasOwnProperty.call(T,x)&&(C[x]=T[x])},b(S,_)};return function(S,_){if(typeof _!="function"&&_!==null)throw new TypeError("Class extends value "+String(_)+" is not a constructor or null");b(S,_);function C(){this.constructor=S}S.prototype=_===null?Object.create(_):(C.prototype=_.prototype,new C)}})();Object.defineProperty(c0,"__esModule",{value:!0}),c0.SurfaceMeshSceneEntity=c0.SurfaceMeshSceneEntityState=void 0;var e=Mr(),i=ni(),n=oi(),t=Ii(),o=dy(),a=Ld(),s=mi(),l=JN(),u=zd(),c=fy(),d=dU(),f=nR(),h=nj(),p=oj(),g;(function(b){b[b.SCRT_GRID_DRAWING_FEATURES_SOLID=1]="SCRT_GRID_DRAWING_FEATURES_SOLID",b[b.SCRT_GRID_DRAWING_FEATURES_WIREFRAME=2]="SCRT_GRID_DRAWING_FEATURES_WIREFRAME",b[b.SCRT_GRID_DRAWING_FEATURES_CONTOURS=4]="SCRT_GRID_DRAWING_FEATURES_CONTOURS",b[b.SCRT_GRID_DRAWING_FEATURES_SKIRT=8]="SCRT_GRID_DRAWING_FEATURES_SKIRT"})(g||(g={}));function v(b){}var y=(function(b){r(S,b);function S(){return b!==null&&b.apply(this,arguments)||this}return Object.defineProperty(S.prototype,"isColorMapTextureInvalid",{get:function(){return this.isColorMapTextureInvalidProperty},enumerable:!1,configurable:!0}),S.prototype.setColorMapTextureInvalid=function(){this.isColorMapTextureInvalidProperty=!0},S.prototype.validate=function(_,C){return b.prototype.validate.call(this,_,C)&&this.isColorMapTextureInvalid},S.prototype.reset=function(_,C){b.prototype.reset.call(this,_,C),this.isColorMapTextureInvalidProperty=!1},S})(p.RenderableSeriesSceneEntityState);c0.SurfaceMeshSceneEntityState=y;var m=(function(b){r(S,b);function S(_,C){var T=this,x;return T=b.call(this,_,C,new y)||this,T.type=o.ESceneEntityType.SurfaceMeshSceneEntity,T.setNativeEntity(_.SCRTGridMeshEntity.implement(T)),T.colorMapTexture=(0,e.deleteSafe)(T.colorMapTexture),T.colorMapTexture=(x=T.parentSeries.meshColorPalette)===null||x===void 0?void 0:x.getTexture(T.parentSeries.colorMapTextureSize),T}return S.prototype.notifySeriesPropertyChanged=function(_){(_===c.PROPERTY.MESH_COLOR_PALETTE||_===c.PROPERTY.MESH_PALETTE_MODE||_===c.PROPERTY.MESH_RESOLUTION||_===c.PROPERTY.COLOR_MAP_TEXTURE_SIZE)&&this.state.setColorMapTextureInvalid(),b.prototype.notifySeriesPropertyChanged.call(this,_)},S.prototype.delete=function(){b.prototype.delete.call(this),this.colorMapTexture=(0,e.deleteSafe)(this.colorMapTexture),this.cellColors=(0,e.deleteSafe)(this.cellColors),this.heightCoords=(0,e.deleteSafe)(this.heightCoords),this.zOffsets=(0,e.deleteSafe)(this.zOffsets),this.sourceRowVec=(0,e.deleteSafe)(this.sourceRowVec)},S.prototype.hitTest=function(_){var C,T=Math.round(_.x),x=Math.round(_.y),A=this.webAssemblyContext.SCRTGetSelectionInfo(T,x),w=new d.HitTestInfo3D(this.parentSeries,!1);return w.isHit=((C=A.GetEntity())===null||C===void 0?void 0:C.GetEntityId())===this.entityId,w.selectionIjIndices=w.isHit?new t.Point(A.m_uiHeightMapIndexI,A.m_uiHeightMapIndexJ):void 0,w.hitTestPoint=_,w},S.prototype.Render=function(){if(this.currentRenderPassData){if(!this.colorMapTexture||!this.parentSeries.dataSeries){console.log("Cannot draw a SurfaceMeshRenderableSeries3D without a meshColorPalette or dataSeries!");return}this.nativeEntity.SetOpacity(this.parentSeries.opacity);var _;try{_=new this.webAssemblyContext.SCRTGridDrawingProperties;var C=0;this.hasFlag(this.parentSeries.drawMeshAs,[f.EDrawMeshAs.SOLID_WIREFRAME,f.EDrawMeshAs.SOLID_WIREFRAME,f.EDrawMeshAs.SOLID_WIREFRAME_WITH_CONTOURS])&&(C|=g.SCRT_GRID_DRAWING_FEATURES_WIREFRAME),this.hasFlag(this.parentSeries.drawMeshAs,[f.EDrawMeshAs.SOLID_WIREFRAME,f.EDrawMeshAs.SOLID_MESH,f.EDrawMeshAs.SOLID_WITH_CONTOURS,f.EDrawMeshAs.SOLID_WIREFRAME_WITH_CONTOURS])&&(C|=g.SCRT_GRID_DRAWING_FEATURES_SOLID),this.hasFlag(this.parentSeries.drawMeshAs,[f.EDrawMeshAs.CONTOURS,f.EDrawMeshAs.SOLID_WITH_CONTOURS,f.EDrawMeshAs.SOLID_WIREFRAME_WITH_CONTOURS])&&(C|=g.SCRT_GRID_DRAWING_FEATURES_CONTOURS),this.parentSeries.drawSkirt&&(C|=g.SCRT_GRID_DRAWING_FEATURES_SKIRT);var T=this.hasFlag(this.parentSeries.meshPaletteMode,[f.EMeshPaletteMode.HEIGHT_MAP_INTERPOLATED,f.EMeshPaletteMode.HEIGHT_MAP_SOLID_CELLS]),x=this.hasFlag(this.parentSeries.meshPaletteMode,[f.EMeshPaletteMode.HEIGHT_MAP_SOLID_CELLS,f.EMeshPaletteMode.TEXTURED_SOLID_CELLS]);if(_.SetDrawMeshAsInteger(C),_.m_bUseGradient=T,_.m_bUseSolidCells=x,_.m_fStrokeThickness=this.parentSeries.strokeThickness,_.m_fContourThickness=this.parentSeries.contourStrokeThickness,_.m_fContourInterval=this.parentSeries.contourInterval,_.m_fContourOffset=this.parentSeries.contourOffset,_.m_bNormalsPS=!1,this.parentSeries.stroke){var A=(0,s.parseColorToTArgb)(this.parentSeries.stroke);(0,l.updateTsrVector4)(A,_.GetWireframeStrokePtr())}this.parentSeries.contourStroke&&(0,l.updateTsrVector4)((0,s.parseColorToTArgb)(this.parentSeries.contourStroke),_.GetContourColorPtr()),_.m_fHardNormals=this.parentSeries.cellHardnessFactor,_.m_fHighlight=this.parentSeries.highlight,_.m_fShininess=this.parentSeries.shininess,_.m_fLightingAmount=this.parentSeries.lightingFactor,this.nativeEntity.SetGridDrawingProperties(_)}finally{(0,e.deleteSafe)(_)}var w=this.currentRenderPassData.xCalc,L=this.currentRenderPassData.yCalc,k=this.currentRenderPassData.zCalc,D,j,N,V,W,K;try{var H=new n.NumberRange(this.parentSeries.minimum,this.parentSeries.maximum);D=this.rangeToSCRTAxisRange(this.webAssemblyContext,w,this.parentSeries.dataSeries.xRange),j=this.rangeToSCRTAxisRange(this.webAssemblyContext,L,H),N=this.rangeToSCRTAxisRange(this.webAssemblyContext,k,this.parentSeries.dataSeries.zRange),this.nativeEntity.SetMeshRange(D,j,N),V=this.toSCRTAxisRange(this.webAssemblyContext,w,w.visibleMin,w.visibleMax),W=this.toSCRTAxisRange(this.webAssemblyContext,L,L.visibleMin,L.visibleMax),K=this.toSCRTAxisRange(this.webAssemblyContext,k,k.visibleMin,k.visibleMax),this.nativeEntity.SetVisibleRange(V,W,K)}finally{(0,e.deleteSafe)(D),(0,e.deleteSafe)(j),(0,e.deleteSafe)(N),(0,e.deleteSafe)(V),(0,e.deleteSafe)(W),(0,e.deleteSafe)(K)}var U=this.parentSeries.yOffset?L.getCoordinate(this.parentSeries.yOffset):0;this.nativeEntity.SetHeightmapScaleOffset(this.parentSeries.heightScaleFactor,U),this.nativeEntity.SetTexture(this.colorMapTexture.getTexture()),b.prototype.Render.call(this)}},S.prototype.updateSeries=function(){var _,C=this.parentSeries.dataSeries;if(C){i.Guard.isTrue(C.type===u.EDataSeriesType3D.UniformGrid3D||C.type===u.EDataSeriesType3D.NonUniformGrid3D,"SurfaceMeshSceneEntity dataSeries must be type UniformGrid3D or NonUniformGrid3D");var T=C.xSize,x=C.zSize;i.Guard.notNull(this.currentRenderPassData,"SurfaceMeshSceneEntity.currentRenderPassData"),this.state.isColorMapTextureInvalid&&(this.colorMapTexture=(0,e.deleteSafe)(this.colorMapTexture),this.colorMapTexture=(_=this.parentSeries.meshColorPalette)===null||_===void 0?void 0:_.getTexture(this.parentSeries.colorMapTextureSize));var A=this.state.isInitialState,w=this.state.isDataSeriesModified;if(A){var L=void 0;switch(this.parentSeries.meshResolution){case f.EMeshResolution.MESH_RESOLUTION_X1:L=this.webAssemblyContext.eSCRTGridMeshResolution.SCRT_GRID_MESH_RES_X1;break;case f.EMeshResolution.MESH_RESOLUTION_X2:L=this.webAssemblyContext.eSCRTGridMeshResolution.SCRT_GRID_MESH_RES_X2;break;case f.EMeshResolution.MESH_RESOLUTION_X4:L=this.webAssemblyContext.eSCRTGridMeshResolution.SCRT_GRID_MESH_RES_X4;break;default:throw Error("Unknown SurfaceMeshSceneEntity.meshResolution "+this.parentSeries.meshResolution)}var k=T*x;this.heightCoords=this.getOrCreateVector(this.heightCoords,k,this.webAssemblyContext.SCRTFloatVector),this.zOffsets=this.getOrCreateVector(this.zOffsets,k,this.webAssemblyContext.SCRTFloatVector),this.cellColors=this.getOrCreateVector(this.cellColors,k,this.webAssemblyContext.SCRTUintVector),this.nativeEntity.UpdateMeshesVec(this.heightCoords,this.zOffsets,this.cellColors,T,x,L)}if(w){this.heightCoords=this.getOrCreateVector(this.heightCoords,T*x,this.webAssemblyContext.SCRTFloatVector);var D=this.currentRenderPassData.yCalc;this.updateHeightMap(C.getYValues(),D,C.xSize,C.zSize,this.heightCoords),this.nativeEntity.UpdateHeightCoordinatesVec(this.heightCoords,T,x)}}},S.prototype.updateHeightMap=function(_,C,T,x,A){this.sourceRowVec=this.getOrCreateVector(this.sourceRowVec,T,this.webAssemblyContext.SCRTDoubleVector);for(var w=0,L=0;w<x;w++)this.webAssemblyContext.HEAPF64.set(_[w],this.sourceRowVec.dataPtr(0)/a.SIZEOF_NUMBER),C.nativeCalculator.GetCoordinatesVec(this.sourceRowVec,A,0,L,T,0),L+=T},S.prototype.hasFlag=function(_,C){return C.some(function(T){return T===_})},S.prototype.toSCRTAxisRange=function(_,C,T,x){var A=new _.SCRTAxisRange;return A.m_fMin=C?C.getCoordinate(T):T,A.m_fMax=C?C.getCoordinate(x):x,A.m_fDiff=C?C.getCoordinate(x-T):x-T,A},S.prototype.rangeToSCRTAxisRange=function(_,C,T){return this.toSCRTAxisRange(_,C,T.min,T.max)},S})(h.RenderableSeriesSceneEntity);return c0.SurfaceMeshSceneEntity=m,c0}var ale;function nR(){return ale||(ale=1,(function(r){var e=g2&&g2.__extends||(function(){var h=function(p,g){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var m in y)Object.prototype.hasOwnProperty.call(y,m)&&(v[m]=y[m])},h(p,g)};return function(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");h(p,g);function v(){this.constructor=p}p.prototype=g===null?Object.create(g):(v.prototype=g.prototype,new v)}})();Object.defineProperty(r,"__esModule",{value:!0}),r.SurfaceMeshRenderableSeries3D=r.EMeshResolution=r.EMeshPaletteMode=r.EDrawMeshAs=void 0;var i=Jn(),n=$o(),t=Ep(),o=CY(),a=aj(),s=fy(),l=Q1(),u;(function(h){h.WIREFRAME="WIREFRAME",h.SOLID_WIREFRAME="SOLID_WIREFRAME",h.SOLID_WIREFRAME_WITH_CONTOURS="SOLID_WIREFRAME_WITH_CONTOURS",h.SOLID_MESH="SOLID_MESH",h.SOLID_WITH_CONTOURS="SOLID_WITH_CONTOURS",h.CONTOURS="CONTOURS"})(u=r.EDrawMeshAs||(r.EDrawMeshAs={}));var c;(function(h){h.HEIGHT_MAP_INTERPOLATED="HEIGHT_MAP_INTERPOLATED",h.HEIGHT_MAP_SOLID_CELLS="HEIGHT_MAP_SOLID_CELLS",h.TEXTURED_SOLID_CELLS="TEXTURED_SOLID_CELLS"})(c=r.EMeshPaletteMode||(r.EMeshPaletteMode={}));var d;(function(h){h[h.MESH_RESOLUTION_X1=1]="MESH_RESOLUTION_X1",h[h.MESH_RESOLUTION_X2=2]="MESH_RESOLUTION_X2",h[h.MESH_RESOLUTION_X4=4]="MESH_RESOLUTION_X4"})(d=r.EMeshResolution||(r.EMeshResolution={}));var f=(function(h){e(p,h);function p(g,v){var y=h.call(this,g,v)||this;return y.drawMeshAsProperty=(v==null?void 0:v.drawMeshAs)||u.SOLID_WIREFRAME,y.strokeThicknessProperty=(v==null?void 0:v.strokeThickness)!==void 0?v==null?void 0:v.strokeThickness:1,y.drawSkirtProperty=(v==null?void 0:v.drawSkirt)!==void 0?v==null?void 0:v.drawSkirt:!0,y.minimumProperty=(v==null?void 0:v.minimum)!==void 0?v==null?void 0:v.minimum:0,y.maximumProperty=(v==null?void 0:v.maximum)!==void 0?v==null?void 0:v.maximum:1,y.meshPaletteModeProperty=(v==null?void 0:v.meshPaletteMode)||c.HEIGHT_MAP_INTERPOLATED,y.colorMapTextureSizeProperty=(v==null?void 0:v.colorMapTextureSize)||new t.Size(1024,1),y.heightScaleFactorProperty=(v==null?void 0:v.heightScaleFactor)!==void 0?v==null?void 0:v.heightScaleFactor:1,y.meshResolutionProperty=(v==null?void 0:v.meshResolution)||d.MESH_RESOLUTION_X1,y.yOffsetProperty=(v==null?void 0:v.yOffset)!==void 0?v==null?void 0:v.yOffset:0,y.cellHardnessFactorProperty=(v==null?void 0:v.cellHardnessFactor)!==void 0?v==null?void 0:v.cellHardnessFactor:1,y.lightingFactorProperty=(v==null?void 0:v.lightingFactor)!==void 0?v==null?void 0:v.lightingFactor:.8,y.contourStrokeThicknessProperty=(v==null?void 0:v.contourStrokeThickness)!==void 0?v==null?void 0:v.contourStrokeThickness:2,y.contourIntervalProperty=(v==null?void 0:v.contourInterval)!==void 0?v==null?void 0:v.contourInterval:20,y.contourOffsetProperty=(v==null?void 0:v.contourOffset)!==void 0?v.contourOffset:.1,y.contourStrokeProperty=(v==null?void 0:v.contourStroke)||"#FFFFFF",y.highlightProperty=(v==null?void 0:v.highlight)!==void 0?v==null?void 0:v.highlight:.05,v!=null&&v.meshColorPalette&&("getTexture"in v.meshColorPalette||(v.meshColorPalette=(0,i.createType)(n.EBaseType.PaletteProvider,v.meshColorPalette.type,g,v.meshColorPalette.options))),y.meshColorPaletteProperty=v==null?void 0:v.meshColorPalette,y.setSceneEntity(new o.SurfaceMeshSceneEntity(g,y)),y}return Object.defineProperty(p.prototype,"type",{get:function(){return l.ESeriesType3D.SurfaceMeshRenderableSeries3D},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"colorMapTextureSize",{get:function(){return this.colorMapTextureSizeProperty},set:function(g){this.colorMapTextureSizeProperty=g,this.notifyPropertyChanged(s.PROPERTY.COLOR_MAP_TEXTURE_SIZE)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"drawMeshAs",{get:function(){return this.drawMeshAsProperty},set:function(g){this.drawMeshAsProperty=g,this.notifyPropertyChanged(s.PROPERTY.DRAW_MESH_AS)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"strokeThickness",{get:function(){return this.strokeThicknessProperty},set:function(g){this.strokeThicknessProperty=g,this.notifyPropertyChanged(s.PROPERTY.STROKE_THICKNESS)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"drawSkirt",{get:function(){return this.drawSkirtProperty},set:function(g){this.drawSkirtProperty=g,this.notifyPropertyChanged(s.PROPERTY.DRAW_SKIRT)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"meshColorPalette",{get:function(){return this.meshColorPaletteProperty},set:function(g){this.meshColorPaletteProperty=g,this.notifyPropertyChanged(s.PROPERTY.MESH_COLOR_PALETTE)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"minimum",{get:function(){return this.minimumProperty},set:function(g){this.minimumProperty=g,this.notifyPropertyChanged(s.PROPERTY.MINIMUM)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"maximum",{get:function(){return this.maximumProperty},set:function(g){this.maximumProperty=g,this.notifyPropertyChanged(s.PROPERTY.MAXIMUM)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"meshPaletteMode",{get:function(){return this.meshPaletteModeProperty},set:function(g){this.meshPaletteModeProperty=g,this.notifyPropertyChanged(s.PROPERTY.MESH_PALETTE_MODE)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"heightScaleFactor",{get:function(){return this.heightScaleFactorProperty},set:function(g){this.heightScaleFactorProperty=g,this.notifyPropertyChanged(s.PROPERTY.HEIGHT_SCALE_FACTOR)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"meshResolution",{get:function(){return this.meshResolutionProperty},set:function(g){this.meshResolutionProperty=g,this.notifyPropertyChanged(s.PROPERTY.MESH_RESOLUTION)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"yOffset",{get:function(){return this.yOffsetProperty},set:function(g){this.yOffsetProperty=g,this.notifyPropertyChanged(s.PROPERTY.Y_OFFSET)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"cellHardnessFactor",{get:function(){return this.cellHardnessFactorProperty},set:function(g){this.cellHardnessFactorProperty=g,this.notifyPropertyChanged(s.PROPERTY.CELL_HARDNESS_FACTOR)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"lightingFactor",{get:function(){return this.lightingFactorProperty},set:function(g){this.lightingFactorProperty=g,this.notifyPropertyChanged(s.PROPERTY.LIGHTING_FACTOR)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"contourStrokeThickness",{get:function(){return this.contourStrokeThicknessProperty},set:function(g){this.contourStrokeThicknessProperty=g,this.notifyPropertyChanged(s.PROPERTY.CONTOUR_STROKE_THICKNESS)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"contourInterval",{get:function(){return this.contourIntervalProperty},set:function(g){this.contourIntervalProperty=g,this.notifyPropertyChanged(s.PROPERTY.CONTOUR_INTERVAL)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"contourOffset",{get:function(){return this.contourOffsetProperty},set:function(g){this.contourOffsetProperty=g,this.notifyPropertyChanged(s.PROPERTY.CONTOUR_OFFSET)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"contourStroke",{get:function(){return this.contourStrokeProperty},set:function(g){this.contourStrokeProperty=g,this.notifyPropertyChanged(s.PROPERTY.CONTOUR_STROKE)},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"highlight",{get:function(){return this.highlightProperty},set:function(g){this.highlightProperty=g,this.notifyPropertyChanged(s.PROPERTY.HIGHLIGHT)},enumerable:!1,configurable:!0}),p.prototype.getOptions=function(){var g=h.prototype.getOptions.call(this),v={colorMapTextureSize:this.colorMapTextureSize,meshResolution:this.meshResolution,strokeThickness:this.strokeThickness,contourStrokeThickness:this.contourStrokeThickness,meshPaletteMode:this.meshPaletteMode,heightScaleFactor:this.heightScaleFactor,contourStroke:this.contourStroke,drawMeshAs:this.drawMeshAs,drawSkirt:this.drawSkirt,meshColorPalette:this.meshColorPalette,minimum:this.minimum,maximum:this.maximum,yOffset:this.yOffset,cellHardnessFactor:this.cellHardnessFactor,lightingFactor:this.lightingFactor,contourInterval:this.contourInterval,contourOffset:this.contourOffset,highlight:this.highlight};return Object.assign(g,v)},p})(a.BaseRenderableSeries3D);r.SurfaceMeshRenderableSeries3D=f})(g2)),g2}var LA={},v2={},sle;function wX(){if(sle)return v2;sle=1,Object.defineProperty(v2,"__esModule",{value:!0}),v2.MeshColorPalette=void 0;var r=Ba(),e=XS(),i=(function(){function n(t){this.webAssemblyContext=t,this.propertyChanged=new r.EventHandler}return n.prototype.notifyPropertyChanged=function(t){var o;(o=this.propertyChanged)===null||o===void 0||o.raiseEvent(new e.PropertyChangedEventArgs(t))},n.prototype.toJSON=function(){return{type:this.type,options:this.getOptions()}},n})();return v2.MeshColorPalette=i,v2}var lle;function NCe(){if(lle)return LA;lle=1;var r=LA&&LA.__extends||(function(){var l=function(u,c){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(d[h]=f[h])},l(u,c)};return function(u,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");l(u,c);function d(){this.constructor=u}u.prototype=c===null?Object.create(c):(d.prototype=c.prototype,new d)}})();Object.defineProperty(LA,"__esModule",{value:!0}),LA.GradientColorPalette=void 0;var e=B1(),i=So(),n=ni(),t=I1(),o=fy(),a=wX(),s=(function(l){r(u,l);function u(c,d){var f=l.call(this,c)||this;return f.type=t.EPaletteProviderType.Gradient3D,f.gradientStops=(d==null?void 0:d.gradientStops)||[{offset:0,color:"Red"},{offset:1,color:"Green"}],f}return Object.defineProperty(u.prototype,"gradientStops",{get:function(){return this.gradientStopsProperty},set:function(c){this.gradientStopsProperty=c,this.notifyPropertyChanged(o.PROPERTY.GRADIENT_STOPS)},enumerable:!1,configurable:!0}),u.prototype.getTexture=function(c){if(!i.IS_TEST_ENV){n.Guard.notNull(c,"size"),n.Guard.isTrue(c.width>0,"size.width must be greater than 0"),n.Guard.isTrue(c.height>0,"size.height must be greater than 0"),n.Guard.notNull(this.gradientStopsProperty,"GradientColorPalette.gradientStops");var d=new e.CanvasTexture(this.webAssemblyContext,c.width,c.height);d.clear();var f=d.getContext(),h=0,p=0,g=c.width,v=0,y=f.createLinearGradient(h,p,g,v);return this.gradientStops.forEach(function(m){y.addColorStop(m.offset,m.color)}),f.fillStyle=y,f.fillRect(0,0,c.width,c.height),d.copyTexture(),d}},u.prototype.getOptions=function(){return{gradientStops:this.gradientStops}},u})(a.MeshColorPalette);return LA.GradientColorPalette=s,LA}var kA={},ule;function FCe(){if(ule)return kA;ule=1;var r=kA&&kA.__extends||(function(){var u=function(c,d){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,h){f.__proto__=h}||function(f,h){for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(f[p]=h[p])},u(c,d)};return function(c,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");u(c,d);function f(){this.constructor=c}c.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}})();Object.defineProperty(kA,"__esModule",{value:!0}),kA.SolidColorBrushPalette=void 0;var e=B1(),i=So(),n=ni(),t=I1(),o=mi(),a=fy(),s=wX(),l=(function(u){r(c,u);function c(d,f){var h=u.call(this,d)||this;return h.type=t.EPaletteProviderType.Solid3D,h.fillProperty=(f==null?void 0:f.fill)||"#777777",h}return Object.defineProperty(c.prototype,"fill",{get:function(){return this.fillProperty},set:function(d){this.fillProperty=d,this.notifyPropertyChanged(a.PROPERTY.FILL)},enumerable:!1,configurable:!0}),c.prototype.getTexture=function(d){if(n.Guard.notNull(d,"size"),n.Guard.isTrue(d.width>0,"size.width must be greater than 0"),n.Guard.isTrue(d.height>0,"size.height must be greater than 0"),!i.IS_TEST_ENV){var f=(0,o.parseColorToUIntArgb)(this.fill);if(isNaN(f))throw Error("SolidColorBrushPalette.fill ".concat(this.fill," cannot be converted to an ABGR color"));var h=new e.CanvasTexture(this.webAssemblyContext,d.width,d.height);h.clear();var p=h.getContext();return p.fillStyle=this.fill,p.fillRect(0,0,d.width,d.height),h.copyTexture(),h}},c.prototype.getOptions=function(){return{fill:this.fill}},c})(s.MeshColorPalette);return kA.SolidColorBrushPalette=l,kA}var IA={},cle;function OX(){if(cle)return IA;cle=1;var r=IA&&IA.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(IA,"__esModule",{value:!0}),IA.PolarTextDataLabelProvider=void 0;var e=ku(),i=PU(),n=fU(),t=(function(o){r(a,o);function a(){var s=o!==null&&o.apply(this,arguments)||this;return s.type=e.EDataLabelProviderType.PolarText,s}return a.prototype.getDataLabelState=function(s,l,u,c,d,f){return new i.PolarDataLabelState(s,l,u,c,d,f)},a})(n.TextDataLabelProvider);return IA.PolarTextDataLabelProvider=t,IA}var d0={},NA={},dle;function jCe(){if(dle)return NA;dle=1;var r=NA&&NA.__extends||(function(){var n=function(t,o){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(a[l]=s[l])},n(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");n(t,o);function a(){this.constructor=t}t.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}})();Object.defineProperty(NA,"__esModule",{value:!0}),NA.PolarTriangleSeriesDrawingProvider=void 0;var e=xX(),i=(function(n){r(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.updateArgs=function(o){var a=this.parentSeries.xAxis;if(a.isAngular)return this.args.SetCoordinateTransform(a.getTransform());var s=this.parentSeries.yAxis;return this.args.SetCoordinateTransform(s.getTransform())},t})(e.TriangleSeriesDrawingProvider);return NA.PolarTriangleSeriesDrawingProvider=i,NA}var fle;function BCe(){if(fle)return d0;fle=1;var r=d0&&d0.__extends||(function(){var u=function(c,d){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,h){f.__proto__=h}||function(f,h){for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(f[p]=h[p])},u(c,d)};return function(c,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");u(c,d);function f(){this.constructor=c}c.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}})(),e=d0&&d0.__assign||function(){return e=Object.assign||function(u){for(var c,d=1,f=arguments.length;d<f;d++){c=arguments[d];for(var h in c)Object.prototype.hasOwnProperty.call(c,h)&&(u[h]=c[h])}return u},e.apply(this,arguments)};Object.defineProperty(d0,"__esModule",{value:!0}),d0.PolarTriangleRenderableSeries=void 0;var i=tn(),n=EX(),t=Z1(),o=i_(),a=jCe(),s=J1(),l=(function(u){r(c,u);function c(d,f){var h=this,p;return h=u.call(this,d,e({dataLabelProvider:(p=f.dataLabelProvider)!==null&&p!==void 0?p:new t.PolarDataLabelProvider(f==null?void 0:f.dataLabels)},f))||this,h.isPolar=!0,h.type=i.ESeriesType.PolarTriangleSeries,h}return c.prototype.addDrawingProviders=function(d,f){this.drawingProviders.push(new a.PolarTriangleSeriesDrawingProvider(d,this)),this.drawingProviders.push(new o.PolarPointMarkerDrawingProvider(d,this))},c.prototype.newHitTestProvider=function(){return new s.PolarDataPointHitTestProvider(this,this.webAssemblyContext)},c})(n.FastTriangleRenderableSeries);return d0.PolarTriangleRenderableSeries=l,d0}var f0={},hle;function VCe(){if(hle)return f0;hle=1;var r=f0&&f0.__extends||(function(){var u=function(c,d){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,h){f.__proto__=h}||function(f,h){for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(f[p]=h[p])},u(c,d)};return function(c,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");u(c,d);function f(){this.constructor=c}c.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}})(),e=f0&&f0.__assign||function(){return e=Object.assign||function(u){for(var c,d=1,f=arguments.length;d<f;d++){c=arguments[d];for(var h in c)Object.prototype.hasOwnProperty.call(c,h)&&(u[h]=c[h])}return u},e.apply(this,arguments)};Object.defineProperty(f0,"__esModule",{value:!0}),f0.PolarTextRenderableSeries=void 0;var i=tn(),n=oy(),t=pX(),o=OX(),a=i_(),s=J1(),l=(function(u){r(c,u);function c(d,f){var h=this,p;return h=u.call(this,d,e(e({},f),{dataLabelProvider:(p=f.dataLabelProvider)!==null&&p!==void 0?p:new o.PolarTextDataLabelProvider(f==null?void 0:f.dataLabels)}))||this,h.isPolar=!0,h.type=i.ESeriesType.PolarTextSeries,h}return c.prototype.addDrawingProviders=function(d,f){this.drawingProviders.push(new a.PolarPointMarkerDrawingProvider(d,this))},c.prototype.needsResampling=function(d){return this.dataSeries.fifoCapacity?(d.resamplingMode=n.EResamplingMode.None,this.resamplerHelper.resetAndFillBasicNativeArgs(d,this.getNativeXValues()),!0):!1},c.prototype.newHitTestProvider=function(){return new s.PolarDataPointHitTestProvider(this,this.webAssemblyContext)},c})(t.FastTextRenderableSeries);return f0.PolarTextRenderableSeries=l,f0}var ple;function QN(){return ple||(ple=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.buildSeries3D=r.buildSeries=void 0;var e=iPe(),i=ki(),n=KF(),t=Xq(),o=n8(),a=DM(),s=a8(),l=s8(),u=l8(),c=u8(),d=nPe(),f=oPe(),h=aPe(),p=sPe(),g=aX(),v=sX(),y=QR(),m=lX(),b=Mg(),S=rj(),_=X1(),C=uX(),T=fU(),x=uPe(),A=hPe(),w=vPe(),L=ZN(),k=PPe(),D=TPe(),j=EPe(),N=OPe(),V=DPe(),W=pX(),K=MPe(),H=IPe(),U=NPe(),I=BPe(),Q=VPe(),Z=HPe(),ee=GPe(),ie=p8(),de=qPe(),pe=KH(),_e=bU(),Te=PY(),De=SU(),Pe=bX(),Ee=Yd(),Re=$o(),je=ku(),Ke=I1(),ot=Ap(),We=tn(),xe=vU(),ve=XN(),he=fg(),Se=Jn(),be=QPe(),ke=_X(),qe=nCe(),rt=aCe(),St=lCe(),xt=cCe(),It=dCe(),Zt=gCe(),ct=EX(),Qe=mCe(),Et=Z1(),Gt=TX(),Xe=bCe(),Vt=SCe(),lr=_Ce(),Jt=TCe(),kr=Q1(),qt=RCe(),zt=LCe(),jr=ICe(),Be=nR(),Ge=zd(),ut=AX(),Pt=pv(),Qt=SX(),wr=NCe(),Xr=FCe(),pi=OX(),Qr=BCe(),Ur=VCe();(0,Se.registerWasmType)(Re.EBaseType.PointMarker,ot.EPointMarkerType.Cross,function(vt,dr){return new o.CrossPointMarker(vt,dr)},!0),(0,Se.registerWasmType)(Re.EBaseType.PointMarker,ot.EPointMarkerType.Ellipse,function(vt,dr){return new a.EllipsePointMarker(vt,dr)},!0),(0,Se.registerWasmType)(Re.EBaseType.PointMarker,ot.EPointMarkerType.Sprite,function(vt,dr){return new s.SpritePointMarker(vt,dr)},!0),(0,Se.registerWasmType)(Re.EBaseType.PointMarker,ot.EPointMarkerType.Square,function(vt,dr){return new l.SquarePointMarker(vt,dr)},!0),(0,Se.registerWasmType)(Re.EBaseType.PointMarker,ot.EPointMarkerType.Triangle,function(vt,dr){return new u.TrianglePointMarker(vt,dr)},!0),(0,Se.registerWasmType)(Re.EBaseType.PointMarker,ot.EPointMarkerType.X,function(vt,dr){return new c.XPointMarker(vt,dr)},!0),(0,Se.registerWasmType)(Re.EBaseType.ShaderEffect,xe.EShaderEffectType.Glow,function(vt,dr){return new K.GlowEffect(vt,dr)},!0),(0,Se.registerWasmType)(Re.EBaseType.ShaderEffect,xe.EShaderEffectType.Shadow,function(vt,dr){return new U.ShadowEffect(vt,dr)},!0),(0,Se.registerType)(Re.EBaseType.Animation,Ee.EAnimationType.Fade,function(vt){return new d.FadeAnimation(vt)},!0),(0,Se.registerType)(Re.EBaseType.Animation,Ee.EAnimationType.Scale,function(vt){return new f.ScaleAnimation(vt)},!0),(0,Se.registerType)(Re.EBaseType.Animation,Ee.EAnimationType.Sweep,function(vt){return new h.SweepAnimation(vt)},!0),(0,Se.registerType)(Re.EBaseType.Animation,Ee.EAnimationType.Wave,function(vt){return new p.WaveAnimation(vt)},!0),(0,Se.registerType)(Re.EBaseType.DataLabelProvider,je.EDataLabelProviderType.Default,function(vt){return new b.DataLabelProvider(vt)},!0),(0,Se.registerType)(Re.EBaseType.DataLabelProvider,je.EDataLabelProviderType.Line,function(vt){return new _.LineSeriesDataLabelProvider(vt)},!0),(0,Se.registerType)(Re.EBaseType.DataLabelProvider,je.EDataLabelProviderType.Column,function(vt){return new y.ColumnSeriesDataLabelProvider(vt)},!0),(0,Se.registerType)(Re.EBaseType.DataLabelProvider,je.EDataLabelProviderType.Rectangle,function(vt){return new Qt.RectangleSeriesDataLabelProvider(vt)},!0),(0,Se.registerType)(Re.EBaseType.DataLabelProvider,je.EDataLabelProviderType.Text,function(vt){return new T.TextDataLabelProvider(vt)},!0),(0,Se.registerType)(Re.EBaseType.DataLabelProvider,je.EDataLabelProviderType.Heatmap,function(vt){return new S.HeatMapDataLabelProvider(vt)},!0),(0,Se.registerType)(Re.EBaseType.DataLabelProvider,je.EDataLabelProviderType.NonUniformHeatmap,function(vt){return new C.NonUniformHeatMapDataLabelProvider(vt)},!0),(0,Se.registerType)(Re.EBaseType.DataLabelProvider,je.EDataLabelProviderType.Bubble,function(vt){return new v.BubbleSeriesDataLabelProvider(vt)},!0),(0,Se.registerType)(Re.EBaseType.DataLabelProvider,je.EDataLabelProviderType.Band,function(vt){return new g.BandSeriesDataLabelProvider(vt)},!0),(0,Se.registerType)(Re.EBaseType.DataLabelProvider,je.EDataLabelProviderType.Contours,function(vt){return new m.ContoursDataLabelProvider(vt)},!0),(0,Se.registerType)(Re.EBaseType.DataLabelProvider,je.EDataLabelProviderType.PolarDefault,function(vt){return new Et.PolarDataLabelProvider(vt)}),(0,Se.registerType)(Re.EBaseType.DataLabelProvider,je.EDataLabelProviderType.PolarColumn,function(vt){return new Gt.PolarColumnSeriesDataLabelProvider(vt)}),(0,Se.registerType)(Re.EBaseType.DataLabelProvider,je.EDataLabelProviderType.PolarText,function(vt){return new pi.PolarTextDataLabelProvider(vt)}),(0,Se.registerType)(Re.EBaseType.MetadataGenerator,"Template",function(vt){return new n.TemplateMetadataGenerator(vt)},!0),(0,Se.registerWasmType)(Re.EBaseType.PaletteProvider,Ke.EPaletteProviderType.Gradient,function(vt,dr){return t.PaletteFactory.createGradient(vt,dr)},!0),(0,Se.registerType)(Re.EBaseType.PaletteProvider,Ke.EPaletteProviderType.DataPointSelection,function(vt){return new e.DataPointSelectionPaletteProvider(vt)},!0);function ci(vt,dr){return vt.hasOwnProperty(dr)}var Xt=function(vt){return ci(vt,"xyData")?{type:i.EDataSeriesType.Xy,options:vt.xyData}:ci(vt,"xyyData")?{type:i.EDataSeriesType.Xyy,options:vt.xyyData}:ci(vt,"xyzData")?{type:i.EDataSeriesType.Xyz,options:vt.xyzData}:ci(vt,"xyxyData")?{type:i.EDataSeriesType.Xyxy,options:vt.xyxyData}:ci(vt,"xyxData")?{type:i.EDataSeriesType.Xyx,options:vt.xyxData}:ci(vt,"xynData")?{type:i.EDataSeriesType.XyN,options:vt.xynData}:ci(vt,"xyTextData")?{type:i.EDataSeriesType.XyText,options:vt.xyTextData}:ci(vt,"hlcData")?{type:i.EDataSeriesType.Hlc,options:vt.hlcData}:ci(vt,"ohlcData")?{type:i.EDataSeriesType.Ohlc,options:vt.ohlcData}:ci(vt,"boxPlotData")?{type:i.EDataSeriesType.BoxPlot,options:vt.boxPlotData}:ci(vt,"heatmapData")&&(vt.type===We.ESeriesType.UniformHeatmapSeries||vt.type===We.ESeriesType.UniformContoursSeries||vt.type===We.ESeriesType.PolarUniformHeatmapSeries)?{type:i.EDataSeriesType.HeatmapUniform,options:vt.heatmapData}:ci(vt,"heatmapData")&&vt.type===We.ESeriesType.NonUniformHeatmapSeries?{type:i.EDataSeriesType.HeatmapNonUniform,options:vt.heatmapData}:void 0},Ui=function(vt,dr,ue){typeof dr=="string"&&(dr=JSON.parse(dr,he.chartReviver)),typeof ue=="string"&&(ue=JSON.parse(ue,he.chartReviver));var ar=[];Array.isArray(dr)||(dr=[dr]);for(var Bt=0,Ar=dr;Bt<Ar.length;Bt++){var br=Ar[Bt],Br=void 0;if(br.type===We.ESeriesType.BandSeries)Br=new x.FastBandRenderableSeries(vt,br.options);else if(br.type===We.ESeriesType.BubbleSeries)Br=new A.FastBubbleRenderableSeries(vt,br.options);else if(br.type===We.ESeriesType.CandlestickSeries)Br=new w.FastCandlestickRenderableSeries(vt,br.options);else if(br.type===We.ESeriesType.ColumnSeries)Br=new L.FastColumnRenderableSeries(vt,br.options);else if(br.type===We.ESeriesType.ImpulseSeries)Br=new D.FastImpulseRenderableSeries(vt,br.options);else if(br.type===We.ESeriesType.LineSeries)Br=new j.FastLineRenderableSeries(vt,br.options);else if(br.type===We.ESeriesType.LineSegmentSeries)Br=new be.FastLineSegmentRenderableSeries(vt,br.options);else if(br.type===We.ESeriesType.MountainSeries)Br=new N.FastMountainRenderableSeries(vt,br.options);else if(br.type===We.ESeriesType.ErrorBarsSeries)Br=new k.FastErrorBarsRenderableSeries(vt,br.options);else if(br.type===We.ESeriesType.BoxPlotSeries)Br=new Zt.FastBoxPlotRenderableSeries(vt,br.options);else if(br.type===We.ESeriesType.TriangleSeries)Br=new ct.FastTriangleRenderableSeries(vt,br.options);else if(br.type===We.ESeriesType.RectangleSeries)Br=new ke.FastRectangleRenderableSeries(vt,br.options);else if(br.type===We.ESeriesType.OhlcSeries)Br=new V.FastOhlcRenderableSeries(vt,br.options);else if(br.type===We.ESeriesType.ScatterSeries)Br=new Pe.XyScatterRenderableSeries(vt,br.options);else if(br.type===We.ESeriesType.SplineBandSeries)Br=new I.SplineBandRenderableSeries(vt,br.options);else if(br.type===We.ESeriesType.SplineLineSeries)Br=new Q.SplineLineRenderableSeries(vt,br.options);else if(br.type===We.ESeriesType.SplineMountainSeries)Br=new Z.SplineMountainRenderableSeries(vt,br.options);else if(br.type===We.ESeriesType.UniformHeatmapSeries)Br=new De.UniformHeatmapRenderableSeries(vt,br.options);else if(br.type===We.ESeriesType.NonUniformHeatmapSeries)Br=new H.NonUniformHeatmapRenderableSeries(vt,br.options);else if(br.type===We.ESeriesType.UniformContoursSeries)Br=new Te.UniformContoursRenderableSeries(vt,br.options);else if(br.type===We.ESeriesType.TextSeries)Br=new W.FastTextRenderableSeries(vt,br.options);else if(br.type===We.ESeriesType.StackedColumnSeries)Br=new de.StackedColumnRenderableSeries(vt,br.options);else if(br.type===We.ESeriesType.StackedMountainSeries)Br=new _e.StackedMountainRenderableSeries(vt,br.options);else if(br.type===We.ESeriesType.SmoothStackedMountainSeries)Br=new ee.SmoothStackedMountainRenderableSeries(vt,br.options);else if(br.type===We.ESeriesType.StackedColumnCollection){var ai=new ie.StackedColumnCollection(vt,br.options);ai.add.apply(ai,(0,r.buildSeries)(vt,br.series,ue)),Br=ai}else if(br.type===We.ESeriesType.StackedMountainCollection){var ai=new pe.StackedMountainCollection(vt,br.options);ai.add.apply(ai,(0,r.buildSeries)(vt,br.series,ue)),Br=ai}else if(br.type===We.ESeriesType.PolarLineSeries)Br=new qe.PolarLineRenderableSeries(vt,br.options);else if(br.type===We.ESeriesType.PolarScatterSeries)Br=new Qe.PolarXyScatterRenderableSeries(vt,br.options);else if(br.type===We.ESeriesType.PolarBandSeries)Br=new rt.PolarBandRenderableSeries(vt,br.options);else if(br.type===We.ESeriesType.PolarColumnSeries)Br=new St.PolarColumnRenderableSeries(vt,br.options);else if(br.type===We.ESeriesType.PolarMountainSeries)Br=new xt.PolarMountainRenderableSeries(vt,br.options);else if(br.type===We.ESeriesType.PolarTriangleSeries)Br=new Qr.PolarTriangleRenderableSeries(vt,br.options);else if(br.type===We.ESeriesType.PolarTextSeries)Br=new Ur.PolarTextRenderableSeries(vt,br.options);else if(br.type===We.ESeriesType.PolarUniformHeatmapSeries)Br=new Jt.PolarUniformHeatmapRenderableSeries(vt,br.options);else if(br.type===We.ESeriesType.PolarStackedMountainSeries)Br=new It.PolarStackedMountainRenderableSeries(vt,br.options);else if(br.type===We.ESeriesType.PolarStackedColumnSeries)Br=new lr.PolarStackedColumnRenderableSeries(vt,br.options);else if(br.type===We.ESeriesType.PolarStackedMountainCollection){var ai=new Xe.PolarStackedMountainCollection(vt,br.options);ai.add.apply(ai,(0,r.buildSeries)(vt,br.series,ue)),Br=ai}else if(br.type===We.ESeriesType.PolarStackedColumnCollection){var ai=new Vt.PolarStackedColumnCollection(vt,br.options);ai.add.apply(ai,(0,r.buildSeries)(vt,br.series,ue)),Br=ai}if(Br){var Nn=Dn(vt,br,ue);Nn&&(Br.dataSeries=Nn)}Br&&ar.push(Br)}return ar};r.buildSeries=Ui;var Dn=function(vt,dr,ue){var ar=Xt(dr);if(ar)return dr.options&&"dataSeries"in dr.options&&dr.options.dataSeries&&ar.options&&"filter"in ar.options&&ar.options.filter?(0,ve.buildDataSeries)(vt,ar,ue,dr.options.dataSeries):(0,ve.buildDataSeries)(vt,ar,ue)};(0,Se.registerWasmType)(Re.EBaseType.PointMarker3D,ut.EPointMarker3DType.Sphere,function(vt,dr){return new Pt.SpherePointMarker3D(vt,dr)},!0),(0,Se.registerWasmType)(Re.EBaseType.PointMarker3D,ut.EPointMarker3DType.Cube,function(vt,dr){return new Pt.CubePointMarker3D(vt,dr)},!0),(0,Se.registerWasmType)(Re.EBaseType.PointMarker3D,ut.EPointMarker3DType.Pyramid,function(vt,dr){return new Pt.PyramidPointMarker3D(vt,dr)},!0),(0,Se.registerWasmType)(Re.EBaseType.PointMarker3D,ut.EPointMarker3DType.Cylinder,function(vt,dr){return new Pt.CylinderPointMarker3D(vt,dr)},!0),(0,Se.registerWasmType)(Re.EBaseType.PointMarker3D,ut.EPointMarker3DType.Ellipse,function(vt,dr){return new Pt.EllipsePointMarker3D(vt,dr)},!0),(0,Se.registerWasmType)(Re.EBaseType.PointMarker3D,ut.EPointMarker3DType.Pixel,function(vt,dr){return new Pt.PixelPointMarker3D(vt,dr)},!0),(0,Se.registerWasmType)(Re.EBaseType.PointMarker3D,ut.EPointMarker3DType.Quad,function(vt,dr){return new Pt.QuadPointMarker(vt,dr)},!0),(0,Se.registerWasmType)(Re.EBaseType.PointMarker3D,ut.EPointMarker3DType.Triangle,function(vt,dr){return new Pt.TrianglePointMarker3D(vt,dr)},!0),(0,Se.registerWasmType)(Re.EBaseType.PaletteProvider,Ke.EPaletteProviderType.Gradient3D,function(vt,dr){return new wr.GradientColorPalette(vt,dr)},!0),(0,Se.registerWasmType)(Re.EBaseType.PaletteProvider,Ke.EPaletteProviderType.Solid3D,function(vt,dr){return new Xr.SolidColorBrushPalette(vt,dr)},!0);var Kr=function(vt,dr,ue){typeof dr=="string"&&(dr=JSON.parse(dr,he.chartReviver)),typeof ue=="string"&&(ue=JSON.parse(ue,he.chartReviver));var ar=[];Array.isArray(dr)||(dr=[dr]);for(var Bt=0,Ar=dr;Bt<Ar.length;Bt++){var br=Ar[Bt],Br=void 0;switch(br.type){case kr.ESeriesType3D.ColumnRenderableSeries3D:Br=new qt.ColumnRenderableSeries3D(vt,br.options);break;case kr.ESeriesType3D.PointLineRenderableSeries3D:Br=new zt.PointLineRenderableSeries3D(vt,br.options);break;case kr.ESeriesType3D.ScatterRenderableSeries3D:Br=new jr.ScatterRenderableSeries3D(vt,br.options);break;case kr.ESeriesType3D.SurfaceMeshRenderableSeries3D:Br=new Be.SurfaceMeshRenderableSeries3D(vt,br.options);break}if(Br){var ai=In(vt,br,ue);ai&&(Br.dataSeries=ai)}Br&&ar.push(Br)}return ar};r.buildSeries3D=Kr;var In=function(vt,dr,ue){var ar=fn(dr);if(ar)return(0,ve.buildDataSeries3D)(vt,ar,ue)},fn=function(vt){return ci(vt,"xyzData")?{type:Ge.EDataSeriesType3D.Xyz3D,options:vt.xyzData}:ci(vt,"uniformGridData")?{type:Ge.EDataSeriesType3D.UniformGrid3D,options:vt.uniformGridData}:void 0}})(cW)),cW}var xs={},FA={},gle;function HCe(){if(gle)return FA;gle=1;var r=FA&&FA.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(u[d]=c[d])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})();Object.defineProperty(FA,"__esModule",{value:!0}),FA.BottomAlignedOuterHorizontallyStackedAxisLayoutStrategy=void 0;var e=vn(),i=Xc(),n=ja(),t=VH(),o=(function(a){r(s,a);function s(){var l=a!==null&&a.apply(this,arguments)||this;return l.type=i.ELayoutStrategyType.BottomStacked,l.isStacked=!0,l}return s.prototype.measureAxes=function(l,u,c){var d=this,f,h=0;c.forEach(function(b){b.measure(),d.updateAxisLayoutState(b);var S=(0,n.getHorizontalAxisRequiredSize)(b.axisLayoutState);h=S>h?S:h});var p=c[0],g=c[c.length-1];this.updateLeftAndRightChartLayoutState(u,p==null?void 0:p.axisLayoutState.additionalLeftSize,g==null?void 0:g.axisLayoutState.additionalRightSize);var v=l.bottomViewportBorder,y=l.bottomCanvasBorder,m=l.adjustedPadding;return h+=v+y+((f=m==null?void 0:m.bottom)!==null&&f!==void 0?f:0),h},s.prototype.layoutAxes=function(l,u,c,d,f){var h=this,p=c-l,g=f[0],v=f[f.length-1],y=f.filter(function(T){return T.stackedAxisLength}),m=f.reduce(function(T,x){return T-x.axisLayoutState.additionalBottomSize-x.axisLayoutState.additionalTopSize},p+(g==null?void 0:g.axisLayoutState.additionalLeftSize)+(v==null?void 0:v.axisLayoutState.additionalRightSize)),b=y.reduce(function(T,x){return T+h.calculateTotalAxisWidth(x,m)},0),S=p+(g==null?void 0:g.axisLayoutState.additionalLeftSize)+(v==null?void 0:v.axisLayoutState.additionalRightSize)-b;if(S<0)throw new Error("Bottom stacked axes with defined size total ".concat(b," pixels which is ").concat(-S," more than the space available"));var _=S/(f.length-y.length),C=l-(g==null?void 0:g.axisLayoutState.additionalLeftSize);f.forEach(function(T){var x=T.axisLayoutState,A=x.axisSize,w=x.additionalLeftSize,L=x.additionalRightSize,k=x.additionalTopSize,D=u+k,j=D+A,N=T.stackedAxisLength?h.calculateTotalAxisWidth(T,m):_,V=C+N-L;C+=w,T.offset=C-l,T.axisLength=V-C,T.isPrimaryAxis=!0,T.viewRect=e.Rect.createWithCoords(C,D,V,j),C=V+L,(0,n.layoutAxisParts)(T,h.layoutAxisPartsStrategy)})},s})(t.BottomAlignedOuterAxisLayoutStrategy);return FA.BottomAlignedOuterHorizontallyStackedAxisLayoutStrategy=o,FA}var jA={},vle;function UCe(){if(vle)return jA;vle=1;var r=jA&&jA.__extends||(function(){var d=function(f,h){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,g){p.__proto__=g}||function(p,g){for(var v in g)Object.prototype.hasOwnProperty.call(g,v)&&(p[v]=g[v])},d(f,h)};return function(f,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");d(f,h);function p(){this.constructor=f}f.prototype=h===null?Object.create(h):(p.prototype=h.prototype,new p)}})();Object.defineProperty(jA,"__esModule",{value:!0}),jA.CentralAxesLayoutManager=void 0;var e=cc(),i=nb(),n=BH(),t=Ybe(),o=jH(),a=ZS(),s=HH(),l=zH(),u=GH(),c=(function(d){r(f,d);function f(h){var p=this,g,v,y,m;return p=d.call(this,h)||this,p.type=i.ELayoutManagerType.CentralAxes,p.horizontalAxisPositionCoordinateModeProperty=o.EInnerAxisPlacementCoordinateMode.Relative,p.verticalAxisPositionCoordinateModeProperty=o.EInnerAxisPlacementCoordinateMode.Relative,p.horizontalAxisPositionProperty=.5,p.verticalAxisPositionProperty=.5,p.verticalAxisPositionProperty=(g=h==null?void 0:h.verticalAxisPosition)!==null&&g!==void 0?g:p.verticalAxisPositionProperty,p.verticalAxisPositionCoordinateModeProperty=(v=h==null?void 0:h.verticalAxisPositionCoordinateMode)!==null&&v!==void 0?v:p.verticalAxisPositionCoordinateModeProperty,p.horizontalAxisPositionProperty=(y=h==null?void 0:h.horizontalAxisPosition)!==null&&y!==void 0?y:p.horizontalAxisPositionProperty,p.horizontalAxisPositionCoordinateModeProperty=(m=h==null?void 0:h.horizontalAxisPositionCoordinateMode)!==null&&m!==void 0?m:p.horizontalAxisPositionCoordinateModeProperty,p.leftInnerAxesLayoutStrategy=new s.LeftAlignedInnerAxisLayoutStrategy({axisPosition:p.verticalAxisPositionProperty,coordinateMode:p.verticalAxisPositionCoordinateModeProperty}),p.rightInnerAxesLayoutStrategy=new l.RightAlignedInnerAxisLayoutStrategy({axisPosition:p.verticalAxisPositionProperty,coordinateMode:p.verticalAxisPositionCoordinateModeProperty}),p.topInnerAxesLayoutStrategy=new u.TopAlignedInnerAxisLayoutStrategy({axisPosition:p.horizontalAxisPositionProperty,coordinateMode:p.horizontalAxisPositionCoordinateModeProperty}),p.bottomInnerAxesLayoutStrategy=new n.BottomAlignedInnerAxisLayoutStrategy({axisPosition:p.horizontalAxisPositionProperty,coordinateMode:p.horizontalAxisPositionCoordinateModeProperty}),p}return Object.defineProperty(f.prototype,"horizontalAxisPositionCoordinateMode",{get:function(){return this.horizontalAxisPositionCoordinateModeProperty},set:function(h){this.horizontalAxisPositionCoordinateModeProperty=h,this.topInnerAxesLayoutStrategy.coordinateMode=h,this.bottomInnerAxesLayoutStrategy.coordinateMode=h,this.notifyPropertyChanged(t.PROPERTY.COORDINATE_MODE)},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"verticalAxisPositionCoordinateMode",{get:function(){return this.verticalAxisPositionCoordinateModeProperty},set:function(h){this.verticalAxisPositionCoordinateModeProperty=h,this.rightInnerAxesLayoutStrategy.coordinateMode=h,this.leftInnerAxesLayoutStrategy.coordinateMode=h,this.notifyPropertyChanged(t.PROPERTY.COORDINATE_MODE)},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"horizontalAxisPosition",{get:function(){return this.horizontalAxisPositionProperty},set:function(h){this.horizontalAxisPositionProperty=h,this.topInnerAxesLayoutStrategy.axisPosition=h,this.bottomInnerAxesLayoutStrategy.axisPosition=h,this.notifyPropertyChanged(t.PROPERTY.AXIS_POSITION_COORDINATE)},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"verticalAxisPosition",{get:function(){return this.verticalAxisPositionProperty},set:function(h){this.verticalAxisPositionProperty=h,this.rightInnerAxesLayoutStrategy.axisPosition=h,this.leftInnerAxesLayoutStrategy.axisPosition=h,this.notifyPropertyChanged(t.PROPERTY.AXIS_POSITION_COORDINATE)},enumerable:!1,configurable:!0}),f.prototype.toJSON=function(){var h=d.prototype.toJSON.call(this),p={horizontalAxisPosition:this.horizontalAxisPosition,horizontalAxisPositionCoordinateMode:this.horizontalAxisPositionCoordinateMode,verticalAxisPosition:this.verticalAxisPosition,verticalAxisPositionCoordinateMode:this.verticalAxisPositionCoordinateMode};return Object.assign(h,p),h},f.prototype.notifyPropertyChanged=function(h){var p;!((p=this.sciChartSurface)===null||p===void 0)&&p.invalidateElement&&this.sciChartSurface.invalidateElement()},f.prototype.groupAxesByLayoutStrategy=function(){this.axesGroupedByLayoutStrategy.clear();var h=this.axesGroupedByLayoutStrategy,p=h.topInnerAxes,g=h.bottomInnerAxes,v=h.leftInnerAxes,y=h.rightInnerAxes,m=function(b){b.forEach(function(S){var _=S.axisAlignment;switch(S.isInnerAxis=!0,_){case e.EAxisAlignment.Top:p.push(S);break;case e.EAxisAlignment.Bottom:g.push(S);break;case e.EAxisAlignment.Left:v.push(S);break;case e.EAxisAlignment.Right:y.push(S);break}})};m(this.sciChartSurface.xAxes.asArray()),m(this.sciChartSurface.yAxes.asArray())},f})(a.LayoutManager);return jA.CentralAxesLayoutManager=c,jA}var BA={},yle;function zCe(){if(yle)return BA;yle=1;var r=BA&&BA.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(u[d]=c[d])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})();Object.defineProperty(BA,"__esModule",{value:!0}),BA.LeftAlignedOuterVerticallyStackedAxisLayoutStrategy=void 0;var e=vn(),i=Xc(),n=ja(),t=UH(),o=(function(a){r(s,a);function s(){var l=a!==null&&a.apply(this,arguments)||this;return l.type=i.ELayoutStrategyType.LeftStacked,l.isStacked=!0,l}return s.prototype.measureAxes=function(l,u,c){var d=this,f,h=0;c.forEach(function(b){b.measure(),d.updateAxisLayoutState(b);var S=(0,n.getVerticalAxisRequiredSize)(b.axisLayoutState);h=S>h?S:h});var p=c[0],g=c[c.length-1];this.updateTopAndBottomChartLayoutState(u,p==null?void 0:p.axisLayoutState.additionalTopSize,g==null?void 0:g.axisLayoutState.additionalBottomSize);var v=l.leftViewportBorder,y=l.leftCanvasBorder,m=l.adjustedPadding;return h+=v+y+((f=m==null?void 0:m.left)!==null&&f!==void 0?f:0),h},s.prototype.layoutAxes=function(l,u,c,d,f){var h=this,p=d-u,g=f[0],v=f[f.length-1],y=f.filter(function(T){return T.stackedAxisLength!==void 0}),m=f.reduce(function(T,x){return T-x.axisLayoutState.additionalBottomSize-x.axisLayoutState.additionalTopSize},p+(g==null?void 0:g.axisLayoutState.additionalTopSize)+(v==null?void 0:v.axisLayoutState.additionalBottomSize)),b=y.reduce(function(T,x){return T+h.calculateTotalAxisHeight(x,m)},0),S=p+(g==null?void 0:g.axisLayoutState.additionalTopSize)+(v==null?void 0:v.axisLayoutState.additionalBottomSize)-b;if(S<0)throw new Error("Left stacked axes with defined size total ".concat(b," pixels which is ").concat(-S," more than the space available"));var _=S/(f.length-y.length),C=u-(g==null?void 0:g.axisLayoutState.additionalTopSize);f.forEach(function(T){var x=T.axisLayoutState,A=x.axisSize,w=x.additionalRightSize,L=x.additionalBottomSize,k=x.additionalTopSize,D=c-w,j=D-A,N=T.stackedAxisLength!==void 0?h.calculateTotalAxisHeight(T,m):_,V=C+N-L;C+=k,T.offset=C-u,T.axisLength=V-C,T.isPrimaryAxis=!0,T.viewRect=e.Rect.createWithCoords(j,C,D,V),C=V+L,(0,n.layoutAxisParts)(T,h.layoutAxisPartsStrategy)})},s})(t.LeftAlignedOuterAxisLayoutStrategy);return BA.LeftAlignedOuterVerticallyStackedAxisLayoutStrategy=o,BA}var VA={},mle;function WCe(){if(mle)return VA;mle=1;var r=VA&&VA.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(u[d]=c[d])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})();Object.defineProperty(VA,"__esModule",{value:!0}),VA.RightAlignedOuterVerticallyStackedAxisLayoutStrategy=void 0;var e=vn(),i=Xc(),n=ja(),t=WH(),o=(function(a){r(s,a);function s(){var l=a!==null&&a.apply(this,arguments)||this;return l.type=i.ELayoutStrategyType.RightStacked,l.isStacked=!0,l}return s.prototype.measureAxes=function(l,u,c){var d=this,f,h=0;c.forEach(function(b){b.measure(),d.updateAxisLayoutState(b);var S=(0,n.getVerticalAxisRequiredSize)(b.axisLayoutState);h=S>h?S:h});var p=c[0],g=c[c.length-1];this.updateTopAndBottomChartLayoutState(u,p==null?void 0:p.axisLayoutState.additionalTopSize,g==null?void 0:g.axisLayoutState.additionalBottomSize);var v=l.rightViewportBorder,y=l.rightCanvasBorder,m=l.adjustedPadding;return h+=v+y+((f=m==null?void 0:m.right)!==null&&f!==void 0?f:0),h},s.prototype.layoutAxes=function(l,u,c,d,f){var h=this,p=d-u,g=f[0],v=f[f.length-1],y=f.filter(function(T){return T.stackedAxisLength}),m=f.reduce(function(T,x){return T-x.axisLayoutState.additionalBottomSize-x.axisLayoutState.additionalTopSize},p+(g==null?void 0:g.axisLayoutState.additionalTopSize)+(v==null?void 0:v.axisLayoutState.additionalBottomSize)),b=y.reduce(function(T,x){return T+h.calculateTotalAxisHeight(x,m)},0),S=p+(g==null?void 0:g.axisLayoutState.additionalTopSize)+(v==null?void 0:v.axisLayoutState.additionalBottomSize)-b;if(S<0)throw new Error("Right stacked axes with defined size total ".concat(b," pixels which is ").concat(-S," more than the space available"));var _=S/(f.length-y.length),C=u-(g==null?void 0:g.axisLayoutState.additionalTopSize);f.forEach(function(T){var x=T.axisLayoutState,A=x.axisSize,w=x.additionalLeftSize,L=x.additionalBottomSize,k=x.additionalTopSize,D=l+w,j=D+A,N=T.stackedAxisLength?h.calculateTotalAxisHeight(T,m):_,V=C+N-L;C+=k,T.offset=C-u,T.axisLength=V-C,T.isPrimaryAxis=!0,T.viewRect=e.Rect.createWithCoords(D,C,j,V),C=V+L,(0,n.layoutAxisParts)(T,h.layoutAxisPartsStrategy)})},s})(t.RightAlignedOuterAxisLayoutStrategy);return VA.RightAlignedOuterVerticallyStackedAxisLayoutStrategy=o,VA}var HA={},ble;function GCe(){if(ble)return HA;ble=1;var r=HA&&HA.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(u[d]=c[d])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})();Object.defineProperty(HA,"__esModule",{value:!0}),HA.TopAlignedOuterHorizontallyStackedAxisLayoutStrategy=void 0;var e=vn(),i=Xc(),n=ja(),t=YH(),o=(function(a){r(s,a);function s(){var l=a!==null&&a.apply(this,arguments)||this;return l.type=i.ELayoutStrategyType.TopStacked,l.isStacked=!0,l}return s.prototype.measureAxes=function(l,u,c){var d=this,f,h=0;c.forEach(function(b){b.measure(),d.updateAxisLayoutState(b);var S=(0,n.getHorizontalAxisRequiredSize)(b.axisLayoutState);h=S>h?S:h});var p=c[0],g=c[c.length-1];this.updateLeftAndRightChartLayoutState(u,p==null?void 0:p.axisLayoutState.additionalLeftSize,g==null?void 0:g.axisLayoutState.additionalRightSize);var v=l.topViewportBorder,y=l.topCanvasBorder,m=l.adjustedPadding;return h+=v+y+((f=m==null?void 0:m.top)!==null&&f!==void 0?f:0),h},s.prototype.layoutAxes=function(l,u,c,d,f){var h=this,p=c-l,g=f[0],v=f[f.length-1],y=f.filter(function(T){return T.stackedAxisLength}),m=f.reduce(function(T,x){return T-x.axisLayoutState.additionalBottomSize-x.axisLayoutState.additionalTopSize},p+(g==null?void 0:g.axisLayoutState.additionalLeftSize)+(v==null?void 0:v.axisLayoutState.additionalRightSize)),b=y.reduce(function(T,x){return T+h.calculateTotalAxisWidth(x,m)},0),S=p+(g==null?void 0:g.axisLayoutState.additionalLeftSize)+(v==null?void 0:v.axisLayoutState.additionalRightSize)-b;if(S<0)throw new Error("Top stacked axes with defined size total ".concat(b," pixels which is ").concat(-S," more than the space available"));var _=S/(f.length-y.length),C=l-(g==null?void 0:g.axisLayoutState.additionalLeftSize);f.forEach(function(T){var x=T.axisLayoutState,A=x.axisSize,w=x.additionalLeftSize,L=x.additionalRightSize,k=x.additionalBottomSize,D=d-k,j=D-A,N=T.stackedAxisLength?h.calculateTotalAxisWidth(T,m):_,V=C+N-L;C+=w,T.offset=C-l,T.axisLength=V-C,T.isPrimaryAxis=!0,T.viewRect=e.Rect.createWithCoords(C,j,V,D),C=V+L,(0,n.layoutAxisParts)(T,h.layoutAxisPartsStrategy)})},s})(t.TopAlignedOuterAxisLayoutStrategy);return HA.TopAlignedOuterHorizontallyStackedAxisLayoutStrategy=o,HA}var UA={},Sle;function YCe(){if(Sle)return UA;Sle=1;var r=UA&&UA.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(UA,"__esModule",{value:!0}),UA.SciChartJsNavyTheme=void 0;var e=AM(),i=gs(),n=IH(),t=(function(o){r(a,o);function a(){var s=o.call(this)||this;return s.type=e.EThemeProviderType.Navy,s.background1="#22365B",s.background2="#17243d",s.loadingBackground1="#21253D",s.loadingBackground2="#09090F",s.sciChartBackground="radial-gradient(circle, ".concat(s.background1," 0%, ").concat(s.background2," 100%)"),s.loadingAnimationBackground="radial-gradient(circle, ".concat(s.loadingBackground1," 0%, ").concat(s.loadingBackground2," 100%)"),s.loadingAnimationForeground="#2A2F4C",s.axisBandsFill="#52469503",s.tickTextBrush="#8398ba",s.strokePalette=["#274b92","#47bde6","#ae418d","#e97064","#68bcae","#634e96"],s.fillPalette=["#274b9288","#47bde688","#ae418d88","#e9706488","#68bcae88","#634e9688"],s.lineSeriesColor=i.AUTO_COLOR,s.planeBorderColor="#191C6D77",s.axisPlaneBackgroundFill="TRANSPARENT",s.axis3DBandsFill="#52469503",s.isLightBackground=!1,s.majorGridLineBrush="#191C6D77",s.minorGridLineBrush="#2B2D7077",s.polarMajorGridLineBrush="#191C6177",s.polarMinorGridLineBrush="#2E2F7077",s}return a})(n.SciChartJSDarkv2Theme);return UA.SciChartJsNavyTheme=t,UA}var zA={},_le;function $Ce(){if(_le)return zA;_le=1;var r=zA&&zA.__extends||(function(){var t=function(o,a){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");t(o,a);function s(){this.constructor=o}o.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}})();Object.defineProperty(zA,"__esModule",{value:!0}),zA.SciChartJSLightTheme=void 0;var e=AM(),i=gs(),n=(function(t){r(o,t);function o(){var a=t!==null&&t.apply(this,arguments)||this;return a.strokePalette=["#F48420","#AE408E","#30BC9A","#209FD9","#264B93"],a.fillPalette=["#F4842077","#AE408E77","#30BC9A77","#209FD977","#264B9377"],a.type=e.EThemeProviderType.Light,a.sciChartBackground="#F9F9F9FF",a.loadingAnimationBackground="#F9F9F9FF",a.loadingAnimationForeground="#777777FF",a.gridBorderBrush="#33333399",a.axisBandsFill="#AAAAAA09",a.axisBorder="#00000000",a.tickTextBrush="#333333FF",a.majorGridLineBrush="#CFCFCFFF",a.minorGridLineBrush="#CFCFCF77",a.polarMajorGridLineBrush="#CFCFCFFF",a.polarMinorGridLineBrush="#E5E5E5FF",a.gridBackgroundBrush="#05333377",a.rolloverLineBrush="#33333333",a.cursorLineBrush="#33333355",a.rubberBandFillBrush="#33333333",a.rubberBandStrokeBrush="#33333377",a.legendBackgroundBrush="#33333333",a.labelBackgroundBrush="#D0D0D0BB",a.labelBorderBrush="#33333377",a.labelForegroundBrush="#555555FF",a.textAnnotationForeground="#000000FF",a.textAnnotationBackground="#FFFFFFFF",a.annotationsGripsBorderBrush="#232323FF",a.annotationsGripsBackgroundBrush="#FFFFFF33",a.annotationSelectionStroke="#f00e0e66",a.overviewFillBrush="#33333322",a.scrollbarBackgroundBrush="#33333322",a.scrollbarBorderBrush="#12121255",a.scrollbarGripsBackgroundBrush="#FFFFFF66",a.scrollbarViewportBackgroundBrush="#FFFFFF44",a.scrollbarViewportBorderBrush="#12121255",a.upWickColor="#52CC54FF",a.downWickColor="#E26565FF",a.upBodyBrush="#52CC54A0",a.downBodyBrush="#E26565D0",a.upBandSeriesLineColor="#52CC54FF",a.downBandSeriesLineColor="#E26565FF",a.upBandSeriesFillColor="#52CC5490",a.downBandSeriesFillColor="#E26565A0",a.mountainAreaBrush="#76B7E2B4",a.mountainLineColor="#777777FF",a.lineSeriesColor="#777777FF",a.columnLineColor="#777777FF",a.columnFillBrush="#777777FF",a.impulseFillBrush="#777777FF",a.defaultColorMapBrush=[{offset:0,color:"DARKBLUE"},{offset:.5,color:"CORNFLOWERBLUE"},{offset:1,color:"#FF22AAFF"}],a.axisTitleColor="#777777FF",a.chartTitleColor="#777777FF",a.shadowEffectColor="#A0AABAFA",a.planeBorderColor="#EEEEEEFF",a.axisPlaneBackgroundFill="TRANSPARENT",a.axis3DBandsFill="#33333333",a.isLightBackground=!0,a}return o})(i.ThemeProvider);return zA.SciChartJSLightTheme=n,zA}var WA={},Ple;function qCe(){if(Ple)return WA;Ple=1;var r=WA&&WA.__assign||function(){return r=Object.assign||function(l){for(var u,c=1,d=arguments.length;c<d;c++){u=arguments[c];for(var f in u)Object.prototype.hasOwnProperty.call(u,f)&&(l[f]=u[f])}return l},r.apply(this,arguments)};Object.defineProperty(WA,"__esModule",{value:!0}),WA.PieSegment=void 0;var e=Jn(),i=Ii(),n=$o(),t=ws(),o=aU(),a=VSe(),s=(function(){function l(u){var c,d,f,h,p,g,v,y,m,b;this.colorProperty="grey",this.isSelectedProperty=!1,this.textProperty="",this.deltaProperty=15,this.shiftProperty=0,this.labelOffsetProperty=new i.Point(0,0),this.radiusAdjustmentProperty=1,this.id=(c=u==null?void 0:u.id)!==null&&c!==void 0?c:(0,t.generateGuid)(),this.colorProperty=(d=u==null?void 0:u.color)!==null&&d!==void 0?d:this.colorProperty,this.colorLinearGradientProperty=(f=u==null?void 0:u.colorLinearGradient)!==null&&f!==void 0?f:this.colorLinearGradientProperty,this.isSelectedProperty=(h=u==null?void 0:u.isSelected)!==null&&h!==void 0?h:this.isSelectedProperty,this.textProperty=(p=u==null?void 0:u.text)!==null&&p!==void 0?p:this.textProperty,this.valueProperty=(g=u==null?void 0:u.value)!==null&&g!==void 0?g:this.valueProperty,this.deltaProperty=(v=u==null?void 0:u.delta)!==null&&v!==void 0?v:this.deltaProperty,this.showLabelProperty=(y=u==null?void 0:u.showLabel)!==null&&y!==void 0?y:!0,u!=null&&u.labelProvider&&("getSegmentText"in(u==null?void 0:u.labelProvider)||(u.labelProvider=(0,e.createType)(n.EBaseType.LabelProvider,u.labelProvider.type,void 0,u.labelProvider.options))),this.labelProviderProperty=u==null?void 0:u.labelProvider,this.labelOffsetProperty=(m=u==null?void 0:u.labelOffset)!==null&&m!==void 0?m:this.labelOffsetProperty,this.labelStyleProperty=u==null?void 0:u.labelStyle,this.radiusAdjustmentProperty=(b=u==null?void 0:u.radiusAdjustment)!==null&&b!==void 0?b:this.radiusAdjustmentProperty}return l.prototype.onAttach=function(u){this.parentSurface=u,this.labelProviderProperty&&this.labelProviderProperty.attachedToSurface(u),this.invalidateParentCallback=u.invalidateElement},l.prototype.onDetach=function(){this.invalidateParentCallback=void 0},Object.defineProperty(l.prototype,"showLabel",{get:function(){return this.showLabelProperty},set:function(u){this.showLabelProperty=u,this.notifyPropertyChanged(a.PROPERTY.SHOW_LABEL)},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"colorLinearGradient",{get:function(){return this.colorLinearGradientProperty},set:function(u){this.colorLinearGradientProperty=u,this.notifyPropertyChanged(a.PROPERTY.COLOR_LINEAR_GRADIENT)},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"color",{get:function(){return this.colorProperty},set:function(u){this.colorProperty=u,this.notifyPropertyChanged(a.PROPERTY.COLOR)},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"isSelected",{get:function(){return this.isSelectedProperty},set:function(u){this.isSelectedProperty!==u&&(this.isSelectedProperty=u,this.notifyPropertyChanged(a.PROPERTY.IS_SELECTED))},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"text",{get:function(){return this.textProperty},set:function(u){this.textProperty=u,this.notifyPropertyChanged(a.PROPERTY.TEXT)},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"labelProvider",{get:function(){return this.labelProviderProperty===void 0&&(this.labelProvider=new o.PieLabelProvider),this.labelProviderProperty},set:function(u){this.labelProviderProperty=u,this.notifyPropertyChanged(a.PROPERTY.LABEL_PROVIDER)},enumerable:!1,configurable:!0}),l.prototype.getPercentage=function(u){return 100*this.value/u},Object.defineProperty(l.prototype,"value",{get:function(){return this.valueProperty},set:function(u){this.oldValueProperty=this.valueProperty,this.valueProperty=u,this.notifyPropertyChanged(a.PROPERTY.VALUE)},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"oldValue",{get:function(){return this.oldValueProperty},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"delta",{get:function(){return this.deltaProperty},set:function(u){this.deltaProperty!==u&&(this.deltaProperty=u,this.notifyPropertyChanged(a.PROPERTY.DELTA))},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"shift",{get:function(){return this.shiftProperty},set:function(u){this.shiftProperty!==u&&(this.shiftProperty=u,this.notifyPropertyChanged(a.PROPERTY.SHIFT))},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"labelStyle",{get:function(){var u;return r(r({},(u=this.parentSurface)===null||u===void 0?void 0:u.labelStyle),this.labelStyleProperty)},set:function(u){this.labelStyleProperty=r(r({},this.labelStyleProperty),u),this.notifyPropertyChanged(a.PROPERTY.LABEL_STYLE)},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"labelOffset",{get:function(){return this.labelOffsetProperty},set:function(u){var c,d;((c=this.labelOffsetProperty)===null||c===void 0?void 0:c.x)!==u.x&&((d=this.labelOffsetProperty)===null||d===void 0?void 0:d.y)!==u.y&&(this.labelOffsetProperty=u,this.notifyPropertyChanged(a.PROPERTY.LABEL_OFFSET))},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"radiusAdjustment",{get:function(){return this.radiusAdjustmentProperty},set:function(u){this.radiusAdjustmentProperty=u,this.notifyPropertyChanged(a.PROPERTY.RADIUS_ADJUSTMENT)},enumerable:!1,configurable:!0}),l.prototype.toJSON=function(){var u;return{id:this.id,color:this.color,colorLinearGradient:this.colorLinearGradient,isSelected:this.isSelected,delta:this.delta,text:this.text,value:this.value,labelProvider:(u=this.labelProviderProperty)===null||u===void 0?void 0:u.toJSON(),labelOffset:this.labelOffset,labelStyle:this.labelStyle,radiusAdjustment:this.radiusAdjustment}},l.prototype.getLabelText=function(u){return this.labelProviderProperty?this.labelProvider.getSegmentText(this,u):this.parentSurface.labelProvider.getSegmentText(this,u)},l.prototype.notifyPropertyChanged=function(u){u===a.PROPERTY.LABEL_PROVIDER&&this.labelProviderProperty&&this.labelProviderProperty.attachedToSurface(this.parentSurface),this.invalidateParentCallback&&this.invalidateParentCallback(u)},l})();return WA.PieSegment=s,WA}var h0={},y2={},bW={},Cle;function SN(){return Cle||(Cle=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.convert3DPlaneModeForTitles=r.convert3DPlaneModeForLabels=r.EAxisPlaneDrawLabelsMode=void 0;var e;(function(t){t.Both="Both",t.Hidden="Hidden",t.LocalX="LocalX",t.LocalY="LocalY"})(e=r.EAxisPlaneDrawLabelsMode||(r.EAxisPlaneDrawLabelsMode={}));var i=function(t,o){switch(t){case e.Both:return o.eAxisPlaneDrawLabelsMode.AxisPlaneDrawLabelsBoth;case e.Hidden:return o.eAxisPlaneDrawLabelsMode.AxisPlaneDrawLabelsHidden;case e.LocalX:return o.eAxisPlaneDrawLabelsMode.AxisPlaneDrawLabelsLocalX;case e.LocalY:return o.eAxisPlaneDrawLabelsMode.AxisPlaneDrawLabelsLocalY}};r.convert3DPlaneModeForLabels=i;var n=function(t,o){switch(t){case e.Both:return o.eAxisPlaneDrawTitlesMode.AxisPlaneDrawTitlesBoth;case e.Hidden:return o.eAxisPlaneDrawTitlesMode.AxisPlaneDrawTitlesHidden;case e.LocalX:return o.eAxisPlaneDrawTitlesMode.AxisPlaneDrawTitlesLocalX;case e.LocalY:return o.eAxisPlaneDrawTitlesMode.AxisPlaneDrawTitlesLocalY}};r.convert3DPlaneModeForTitles=n})(bW)),bW}var SW={},Tle;function a3(){return Tle||(Tle=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertAxisPlaneVisibilityMode=r.EAxisPlaneVisibilityMode=void 0;var e;(function(n){n.Auto="Auto",n.PositiveSide="PositiveSide",n.NegativeSide="NegativeSide"})(e=r.EAxisPlaneVisibilityMode||(r.EAxisPlaneVisibilityMode={}));var i=function(n,t){switch(n){case e.Auto:return t.AxisPlaneVisibilityMode.Auto;case e.PositiveSide:return t.AxisPlaneVisibilityMode.PositiveSide;case e.NegativeSide:return t.AxisPlaneVisibilityMode.NegativeSide}};r.convertAxisPlaneVisibilityMode=i})(SW)),SW}var lh={},xle;function tR(){if(xle)return lh;xle=1,Object.defineProperty(lh,"__esModule",{value:!0}),lh.getArraysEqual=lh.getTextStylesEqual=lh.getTArgbEqual=lh.getLineStylesEqual=lh.getDescriptorsEqual=void 0;function r(o,a){return o===void 0?a===void 0:a===void 0?o===void 0:o.axisTitle===a.axisTitle&&o.axisSize===a.axisSize&&i(o.backgroundColor,a.backgroundColor)&&i(o.bandColor,a.bandColor)&&i(o.borderColor,a.borderColor)&&t(o.majorCoordinates,a.majorCoordinates)&&t(o.minorCoordinates,a.minorCoordinates)&&t(o.tickLabels,a.tickLabels)&&e(o.majorLineStyle,a.majorLineStyle)&&e(o.minorLineStyle,a.minorLineStyle)&&e(o.majorTickStyle,a.majorTickStyle)&&e(o.minorTickStyle,a.minorTickStyle)&&n(o.titleStyle,a.titleStyle)&&n(o.labelStyle,a.labelStyle)&&o.drawMajorGridlines===a.drawMajorGridlines&&o.drawMinorGridlines===a.drawMinorGridlines&&o.drawMajorTicks===a.drawMajorTicks&&o.drawMinorTicks===a.drawMinorTicks&&o.drawBands===a.drawBands&&o.drawLabels===a.drawLabels&&o.isVisible===a.isVisible&&o.borderThickness===a.borderThickness&&o.labelDepthTestEnabled===a.labelDepthTestEnabled&&o.titleOffset===a.titleOffset&&o.tickLabelsOffset===a.tickLabelsOffset&&o.smoothLabelOverlapAvoidance===a.smoothLabelOverlapAvoidance&&o.labelOrientationMode===a.labelOrientationMode&&o.titleOrientationMode===a.titleOrientationMode}lh.getDescriptorsEqual=r;function e(o,a){return o===void 0&&a!==void 0||a===void 0&&o!==void 0?!1:o===void 0&&a===void 0?!0:o.start===a.start&&o.end===a.end&&i(o.stroke,a.stroke)&&o.strokeThickness===a.strokeThickness}lh.getLineStylesEqual=e;function i(o,a){return o===void 0&&a!==void 0||a===void 0&&o!==void 0?!1:o===void 0&&a===void 0?!0:o.red===a.red&&o.green===a.green&&o.blue===a.blue&&o.opacity===a.opacity}lh.getTArgbEqual=i;function n(o,a){return o===void 0&&a!==void 0||a===void 0&&o!==void 0?!1:o===void 0&&a===void 0?!0:o.dpiScaling===a.dpiScaling&&o.fontFamily===a.fontFamily&&o.fontSize===a.fontSize&&o.foreground===a.foreground&&o.multilineAlignment===a.multilineAlignment&&o.multilineSpacing===o.multilineSpacing}lh.getTextStylesEqual=n;function t(o,a){if(o===void 0&&a!==void 0||a===void 0&&o!==void 0)return!1;if(a===void 0&&o===void 0)return!0;if(o.length!==a.length)return!1;for(var s=0;s<o.length;s++)if(o[s]!==a[s])return!1;return!0}return lh.getArraysEqual=t,lh}var Ele;function XCe(){return Ele||(Ele=1,(function(r){var e=y2&&y2.__extends||(function(){var f=function(h,p){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,v){g.__proto__=v}||function(g,v){for(var y in v)Object.prototype.hasOwnProperty.call(v,y)&&(g[y]=v[y])},f(h,p)};return function(h,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");f(h,p);function g(){this.constructor=h}h.prototype=p===null?Object.create(p):(g.prototype=p.prototype,new g)}})();Object.defineProperty(r,"__esModule",{value:!0}),r.updateScrtTextStyle=r.updateScrtLineStyle=r.updateScrtAxisDescriptor=r.AxisCubeEntity=void 0;var i=SN(),n=a3(),t=dy(),o=JN(),a=BM(),s=tR(),l=(function(f){e(h,f);function h(p,g){var v=f.call(this,p)||this;return v.type=t.ESceneEntityType.AxisCubeEntity,v.sciChart3DSurface=g,v.setNativeEntity(p.SCRTAxisCubeEntity.implement(v)),v}return h.prototype.Update=function(p){var g=this,v,y;if(this.currentRenderPassData){var m=this.nativeEntity,b=m.GetDescriptorPtr();b.m_bIsZxPlaneVisible=this.sciChart3DSurface.isZXPlaneVisible,b.m_bIsXyPlaneVisible=this.sciChart3DSurface.isXYPlaneVisible,b.m_bIsZyPlaneVisible=this.sciChart3DSurface.isZYPlaneVisible,b.m_eXyPlaneDrawLabelsMode=(0,i.convert3DPlaneModeForLabels)(this.sciChart3DSurface.xyAxisPlane.drawLabelsMode,this.webAssemblyContext),b.m_eZxPlaneDrawLabelsMode=(0,i.convert3DPlaneModeForLabels)(this.sciChart3DSurface.zxAxisPlane.drawLabelsMode,this.webAssemblyContext),b.m_eZyPlaneDrawLabelsMode=(0,i.convert3DPlaneModeForLabels)(this.sciChart3DSurface.zyAxisPlane.drawLabelsMode,this.webAssemblyContext),b.m_eXyPlaneDrawTitlesMode=(0,i.convert3DPlaneModeForTitles)(this.sciChart3DSurface.xyAxisPlane.drawTitlesMode,this.webAssemblyContext),b.m_eZxPlaneDrawTitlesMode=(0,i.convert3DPlaneModeForTitles)(this.sciChart3DSurface.zxAxisPlane.drawTitlesMode,this.webAssemblyContext),b.m_eZyPlaneDrawTitlesMode=(0,i.convert3DPlaneModeForTitles)(this.sciChart3DSurface.zyAxisPlane.drawTitlesMode,this.webAssemblyContext),b.m_eXyPlaneVisibilityMode=(0,n.convertAxisPlaneVisibilityMode)(this.sciChart3DSurface.xyAxisPlane.visibilityMode,this.webAssemblyContext),b.m_eZxPlaneVisibilityMode=(0,n.convertAxisPlaneVisibilityMode)(this.sciChart3DSurface.zxAxisPlane.visibilityMode,this.webAssemblyContext),b.m_eZyPlaneVisibilityMode=(0,n.convertAxisPlaneVisibilityMode)(this.sciChart3DSurface.zyAxisPlane.visibilityMode,this.webAssemblyContext);var S=this.currentRenderPassData.sceneDescriptor.axisCubeDescriptor,_=S.xAxisDescriptor,C=S.yAxisDescriptor,T=S.zAxisDescriptor;(!(0,s.getDescriptorsEqual)(_,this.lastXDescriptor)||!(0,s.getDescriptorsEqual)(C,this.lastYDescriptor)||!(0,s.getDescriptorsEqual)(T,this.lastZDescriptor))&&m.DestroyMeshes(),this.lastXDescriptor=_,this.lastYDescriptor=C,this.lastZDescriptor=T;var x=b.GetXAxisDescPtr(),A=b.GetYAxisDescPtr(),w=b.GetZAxisDescPtr(),L=[[x,_],[A,C],[w,T]],k=!1;L.forEach(function(D){(0,r.updateScrtAxisDescriptor)(g.webAssemblyContext,D[0],D[1]),D[1].labelOrientationMode===g.webAssemblyContext.eSCRTTickLabelOrientationMode.TickLabelOrientationAuto&&(k=!0)}),k&&(b.m_bIsCameraChange=!1),f.prototype.Update.call(this,p),!((v=this.sciChart3DSurface)===null||v===void 0)&&v.isAxisCubeRendered||((y=this.sciChart3DSurface)===null||y===void 0||y.setIsAxisCubeRendered(),setTimeout(function(){var D;return(D=g.sciChart3DSurface)===null||D===void 0?void 0:D.invalidateElement()},0))}},h.prototype.delete=function(){f.prototype.delete.call(this),this.sciChart3DSurface=void 0,this.lastXDescriptor=void 0,this.lastYDescriptor=void 0,this.lastZDescriptor=void 0},h})(a.BaseSceneEntity3D);r.AxisCubeEntity=l;var u=function(f,h,p){var g;h.m_strTitle=(g=p.axisTitle)!==null&&g!==void 0?g:"",h.m_fRangeSize=p.axisSize,h.m_fTitleOffset=p.titleOffset,h.m_fLabelsOffset=p.tickLabelsOffset,h.m_bBandsEnabled=p.drawBands,h.m_bLabelsEnabled=p.drawLabels,h.m_bMajorLinesEnabled=p.drawMajorGridlines,h.m_bMajorTicksEnabled=p.drawMajorTicks,h.m_bMinorLinesEnabled=p.drawMinorGridlines,h.m_bMinorTicksEnabled=p.drawMinorTicks,h.m_fBorderThickness=p.borderThickness,h.m_eLabelsRotationMode=p.labelOrientationMode,h.m_eTitleRotationMode=p.titleOrientationMode,h.m_bBackgroundEnabled=!0,(0,o.updateTsrVector4)(p.borderColor,h.GetBorderColorPtr()),(0,o.updateTsrVector4)(p.backgroundColor,h.GetBackgroundColorPtr()),(0,o.updateTsrVector4)(p.bandColor,h.GetBandColorPtr()),(0,r.updateScrtLineStyle)(p.majorLineStyle,h.GetMajorLineStylePtr()),(0,r.updateScrtLineStyle)(p.minorLineStyle,h.GetMinorLineStylePtr());var v=new f.SCRTTextStyle;(0,r.updateScrtTextStyle)(p.labelStyle,v),h.SetLabelTextStyle(v),(0,r.updateScrtTextStyle)(p.titleStyle,v),h.SetTitleTextStyle(v),v.delete(),(0,r.updateScrtLineStyle)(p.majorTickStyle,h.GetMajorTickStylePtr()),(0,r.updateScrtLineStyle)(p.minorTickStyle,h.GetMinorTickStylePtr());var y=new f.FloatVector;p.majorCoordinates.forEach(function(S){return y.push_back(S)}),h.SetMajors(y),y.delete();var m=new f.FloatVector;p.minorCoordinates.forEach(function(S){return m.push_back(S)}),h.SetMinors(m),m.delete();var b=new f.WStringVector;p.tickLabels.forEach(function(S){return b.push_back(S)}),h.SetMajorLabels(b),b.delete()};r.updateScrtAxisDescriptor=u;var c=function(f,h){h.m_fStrokeThickness=f.strokeThickness,h.m_fStart=f.start,h.m_fEnd=f.end,(0,o.updateTsrVector4)(f.stroke,h.GetStrokeColorPtr())};r.updateScrtLineStyle=c;var d=function(f,h){return h.m_fSize=f.fontSize,h.m_strFont=f.fontFamily,h.m_uiARGBColor=f.foreground,h.m_fDpiScaling=f.dpiScaling,h.m_MultilineAlignment=f.multilineAlignment,h.m_fMultilineSpacing=f.multilineSpacing,h};r.updateScrtTextStyle=d})(y2)),y2}var GA={},_W={exports:{}},Ale;function KCe(){return Ale||(Ale=1,(function(r,e){var i=(()=>{var t;var n=typeof document<"u"?(t=document.currentScript)==null?void 0:t.src:void 0;return(function(o={}){var a,s=o,l,u,c=new Promise((O,B)=>{l=O,u=B}),d=Object.assign({},s),f=[],h="./this.program",p=(O,B)=>{throw B},g="";function v(O){return s.locateFile?s.locateFile(O,g):g+O}var y,m;typeof document<"u"&&document.currentScript&&(g=document.currentScript.src),n&&(g=n),g.startsWith("blob:")?g="":g=g.substr(0,g.replace(/[?#].*/,"").lastIndexOf("/")+1),y=async O=>{var B=await fetch(O,{credentials:"same-origin"});if(B.ok)return B.arrayBuffer();throw new Error(B.status+" : "+B.url)};var b=s.print||console.log.bind(console),S=s.printErr||console.error.bind(console);Object.assign(s,d),d=null,s.arguments&&(f=s.arguments),s.thisProgram&&(h=s.thisProgram);var _=s.wasmBinary,C,T=!1,x,A,w,L,k,D,j,N,V;function W(){var O=C.buffer;s.HEAP8=A=new Int8Array(O),s.HEAP16=L=new Int16Array(O),s.HEAPU8=w=new Uint8Array(O),s.HEAPU16=k=new Uint16Array(O),s.HEAP32=D=new Int32Array(O),s.HEAPU32=j=new Uint32Array(O),s.HEAPF32=N=new Float32Array(O),s.HEAPF64=V=new Float64Array(O)}var K=[],H=[],U=[],I=[];function Q(){if(s.preRun)for(typeof s.preRun=="function"&&(s.preRun=[s.preRun]);s.preRun.length;)de(s.preRun.shift());Zt(K)}function Z(){!s.noFSInit&&!ue.initialized&&ue.init(),ue.ignorePermissions=!1,Zt(H)}function ee(){Zt(U)}function ie(){if(s.postRun)for(typeof s.postRun=="function"&&(s.postRun=[s.postRun]);s.postRun.length;)_e(s.postRun.shift());Zt(I)}function de(O){K.unshift(O)}function pe(O){H.unshift(O)}function _e(O){I.unshift(O)}var Te=0,De=null;function Pe(O){var B;Te++,(B=s.monitorRunDependencies)==null||B.call(s,Te)}function Ee(O){var X;if(Te--,(X=s.monitorRunDependencies)==null||X.call(s,Te),Te==0&&De){var B=De;De=null,B()}}function Re(O){var X;(X=s.onAbort)==null||X.call(s,O),O="Aborted("+O+")",S(O),T=!0,O+=". Build with -sASSERTIONS for more info.";var B=new WebAssembly.RuntimeError(O);throw u(B),B}var je="data:application/octet-stream;base64,",Ke=O=>O.startsWith(je);function ot(){var O="scichart3d.wasm";return Ke(O)?O:v(O)}var We;function xe(O){if(O==We&&_)return new Uint8Array(_);throw"both async and sync fetching of the wasm failed"}async function ve(O){if(!_)try{var B=await y(O);return new Uint8Array(B)}catch{}return xe(O)}async function he(O,B){try{var X=await ve(O),re=await WebAssembly.instantiate(X,B);return re}catch(ce){S(`failed to asynchronously prepare wasm: ${ce}`),Re(ce)}}async function Se(O,B,X){if(!O&&typeof WebAssembly.instantiateStreaming=="function"&&!Ke(B)&&typeof fetch=="function")try{var re=fetch(B,{credentials:"same-origin"}),ce=await WebAssembly.instantiateStreaming(re,X);return ce}catch(Ae){S(`wasm streaming compile failed: ${Ae}`),S("falling back to ArrayBuffer instantiation")}return he(B,X)}function be(){return{a:bi}}async function ke(){function O(ce,Ae){return di=ce.exports,di=Wh(di),C=di.nb,W(),Ot=di.sb,pe(di.ob),Ee(),di}Pe();function B(ce){O(ce.instance)}var X=be();if(s.instantiateWasm)try{return s.instantiateWasm(X,O)}catch(ce){S(`Module.instantiateWasm callback failed with error: ${ce}`),u(ce)}We??(We=ot());try{var re=await Se(_,We,X);return B(re),re}catch(ce){u(ce);return}}var qe,rt,St={514030:()=>s.getRandomValue(),514066:()=>{if(s.getRandomValue===void 0)try{var O=typeof window=="object"?window:self,B=typeof O.crypto<"u"?O.crypto:O.msCrypto,X=function(){var Ae=new Uint32Array(1);return B.getRandomValues(Ae),Ae[0]>>>0};X(),s.getRandomValue=X}catch{try{var re=Math.pow(2,32),ce=function(){var Ie=Math.floor(Math.random()*Math.floor(re));return Ie>>>0};ce(),s.getRandomValue=ce}catch{throw"No secure random number generator found"}}},514110:()=>s.getRandomValue(),514146:()=>{if(s.getRandomValue===void 0)try{var O=typeof window=="object"?window:self,B=typeof O.crypto<"u"?O.crypto:O.msCrypto,X=function(){var Ae=new Uint32Array(1);return B.getRandomValues(Ae),Ae[0]>>>0};X(),s.getRandomValue=X}catch{try{var re=Math.pow(2,32),ce=function(){var Ie=Math.floor(Math.random()*Math.floor(re));return Ie>>>0};ce(),s.getRandomValue=ce}catch{throw"No secure random number generator found"}}}};function xt(){var O="";typeof window<"u"?O=window.location.hostname:typeof process<"u"&&(O="node");var B=Qt(O)+1,X=Ws(B);return Ti(O,X,B),X}class It{constructor(B){To(this,"name","ExitStatus");this.message=`Program terminated with exit(${B})`,this.status=B}}var Zt=O=>{for(;O.length>0;)O.shift()(s)},ct=s.noExitRuntime||!0,Qe=O=>pd(O),Et=()=>Wg();class Gt{constructor(B){this.excPtr=B,this.ptr=B-24}set_type(B){j[this.ptr+4>>>2>>>0]=B}get_type(){return j[this.ptr+4>>>2>>>0]}set_destructor(B){j[this.ptr+8>>>2>>>0]=B}get_destructor(){return j[this.ptr+8>>>2>>>0]}set_caught(B){B=B?1:0,A[this.ptr+12>>>0]=B}get_caught(){return A[this.ptr+12>>>0]!=0}set_rethrown(B){B=B?1:0,A[this.ptr+13>>>0]=B}get_rethrown(){return A[this.ptr+13>>>0]!=0}init(B,X){this.set_adjusted_ptr(0),this.set_type(B),this.set_destructor(X)}set_adjusted_ptr(B){j[this.ptr+16>>>2>>>0]=B}get_adjusted_ptr(){return j[this.ptr+16>>>2>>>0]}}var Xe=0,Vt=(O,B)=>B+2097152>>>0<4194305-!!O?(O>>>0)+B*4294967296:NaN;function lr(O,B,X){O>>>=0,B>>>=0,X>>>=0;var re=new Gt(O);throw re.init(B,X),Xe=O,Xe}var Jt=()=>{var O=D[+Bt.varargs>>>2>>>0];return Bt.varargs+=4,O},kr=Jt,qt={isAbs:O=>O.charAt(0)==="/",splitPath:O=>{var B=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return B.exec(O).slice(1)},normalizeArray:(O,B)=>{for(var X=0,re=O.length-1;re>=0;re--){var ce=O[re];ce==="."?O.splice(re,1):ce===".."?(O.splice(re,1),X++):X&&(O.splice(re,1),X--)}if(B)for(;X;X--)O.unshift("..");return O},normalize:O=>{var B=qt.isAbs(O),X=O.substr(-1)==="/";return O=qt.normalizeArray(O.split("/").filter(re=>!!re),!B).join("/"),!O&&!B&&(O="."),O&&X&&(O+="/"),(B?"/":"")+O},dirname:O=>{var B=qt.splitPath(O),X=B[0],re=B[1];return!X&&!re?".":(re&&(re=re.substr(0,re.length-1)),X+re)},basename:O=>{if(O==="/")return"/";O=qt.normalize(O),O=O.replace(/\/$/,"");var B=O.lastIndexOf("/");return B===-1?O:O.substr(B+1)},join:(...O)=>qt.normalize(O.join("/")),join2:(O,B)=>qt.normalize(O+"/"+B)},zt=()=>{if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function")return O=>crypto.getRandomValues(O);Re("initRandomDevice")},jr=O=>(jr=zt())(O),Be={resolve:(...O)=>{for(var B="",X=!1,re=O.length-1;re>=-1&&!X;re--){var ce=re>=0?O[re]:ue.cwd();if(typeof ce!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!ce)return"";B=ce+"/"+B,X=qt.isAbs(ce)}return B=qt.normalizeArray(B.split("/").filter(Ae=>!!Ae),!X).join("/"),(X?"/":"")+B||"."},relative:(O,B)=>{O=Be.resolve(O).substr(1),B=Be.resolve(B).substr(1);function X(Tt){for(var mt=0;mt<Tt.length&&Tt[mt]==="";mt++);for(var Lt=Tt.length-1;Lt>=0&&Tt[Lt]==="";Lt--);return mt>Lt?[]:Tt.slice(mt,Lt-mt+1)}for(var re=X(O.split("/")),ce=X(B.split("/")),Ae=Math.min(re.length,ce.length),Ie=Ae,He=0;He<Ae;He++)if(re[He]!==ce[He]){Ie=He;break}for(var at=[],He=Ie;He<re.length;He++)at.push("..");return at=at.concat(ce.slice(Ie)),at.join("/")}},Ge=typeof TextDecoder<"u"?new TextDecoder:void 0,ut=(O,B=0,X=NaN)=>{B>>>=0;for(var re=B+X,ce=B;O[ce]&&!(ce>=re);)++ce;if(ce-B>16&&O.buffer&&Ge)return Ge.decode(O.subarray(B,ce));for(var Ae="";B<ce;){var Ie=O[B++];if(!(Ie&128)){Ae+=String.fromCharCode(Ie);continue}var He=O[B++]&63;if((Ie&224)==192){Ae+=String.fromCharCode((Ie&31)<<6|He);continue}var at=O[B++]&63;if((Ie&240)==224?Ie=(Ie&15)<<12|He<<6|at:Ie=(Ie&7)<<18|He<<12|at<<6|O[B++]&63,Ie<65536)Ae+=String.fromCharCode(Ie);else{var Tt=Ie-65536;Ae+=String.fromCharCode(55296|Tt>>10,56320|Tt&1023)}}return Ae},Pt=[],Qt=O=>{for(var B=0,X=0;X<O.length;++X){var re=O.charCodeAt(X);re<=127?B++:re<=2047?B+=2:re>=55296&&re<=57343?(B+=4,++X):B+=3}return B},wr=(O,B,X,re)=>{if(X>>>=0,!(re>0))return 0;for(var ce=X,Ae=X+re-1,Ie=0;Ie<O.length;++Ie){var He=O.charCodeAt(Ie);if(He>=55296&&He<=57343){var at=O.charCodeAt(++Ie);He=65536+((He&1023)<<10)|at&1023}if(He<=127){if(X>=Ae)break;B[X++>>>0]=He}else if(He<=2047){if(X+1>=Ae)break;B[X++>>>0]=192|He>>6,B[X++>>>0]=128|He&63}else if(He<=65535){if(X+2>=Ae)break;B[X++>>>0]=224|He>>12,B[X++>>>0]=128|He>>6&63,B[X++>>>0]=128|He&63}else{if(X+3>=Ae)break;B[X++>>>0]=240|He>>18,B[X++>>>0]=128|He>>12&63,B[X++>>>0]=128|He>>6&63,B[X++>>>0]=128|He&63}}return B[X>>>0]=0,X-ce};function Xr(O,B,X){var re=Qt(O)+1,ce=new Array(re),Ae=wr(O,ce,0,ce.length);return ce.length=Ae,ce}var pi=()=>{if(!Pt.length){var O=null;if(typeof window<"u"&&typeof window.prompt=="function"&&(O=window.prompt("Input: "),O!==null&&(O+=`
`)),!O)return null;Pt=Xr(O)}return Pt.shift()},Qr={ttys:[],init(){},shutdown(){},register(O,B){Qr.ttys[O]={input:[],output:[],ops:B},ue.registerDevice(O,Qr.stream_ops)},stream_ops:{open(O){var B=Qr.ttys[O.node.rdev];if(!B)throw new ue.ErrnoError(43);O.tty=B,O.seekable=!1},close(O){O.tty.ops.fsync(O.tty)},fsync(O){O.tty.ops.fsync(O.tty)},read(O,B,X,re,ce){if(!O.tty||!O.tty.ops.get_char)throw new ue.ErrnoError(60);for(var Ae=0,Ie=0;Ie<re;Ie++){var He;try{He=O.tty.ops.get_char(O.tty)}catch{throw new ue.ErrnoError(29)}if(He===void 0&&Ae===0)throw new ue.ErrnoError(6);if(He==null)break;Ae++,B[X+Ie]=He}return Ae&&(O.node.atime=Date.now()),Ae},write(O,B,X,re,ce){if(!O.tty||!O.tty.ops.put_char)throw new ue.ErrnoError(60);try{for(var Ae=0;Ae<re;Ae++)O.tty.ops.put_char(O.tty,B[X+Ae])}catch{throw new ue.ErrnoError(29)}return re&&(O.node.mtime=O.node.ctime=Date.now()),Ae}},default_tty_ops:{get_char(O){return pi()},put_char(O,B){B===null||B===10?(b(ut(O.output)),O.output=[]):B!=0&&O.output.push(B)},fsync(O){O.output&&O.output.length>0&&(b(ut(O.output)),O.output=[])},ioctl_tcgets(O){return{c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},ioctl_tcsets(O,B,X){return 0},ioctl_tiocgwinsz(O){return[24,80]}},default_tty1_ops:{put_char(O,B){B===null||B===10?(S(ut(O.output)),O.output=[]):B!=0&&O.output.push(B)},fsync(O){O.output&&O.output.length>0&&(S(ut(O.output)),O.output=[])}}},Ur=(O,B)=>Math.ceil(O/B)*B,ci=O=>{Re()},Xt={ops_table:null,mount(O){return Xt.createNode(null,"/",16895,0)},createNode(O,B,X,re){if(ue.isBlkdev(X)||ue.isFIFO(X))throw new ue.ErrnoError(63);Xt.ops_table||(Xt.ops_table={dir:{node:{getattr:Xt.node_ops.getattr,setattr:Xt.node_ops.setattr,lookup:Xt.node_ops.lookup,mknod:Xt.node_ops.mknod,rename:Xt.node_ops.rename,unlink:Xt.node_ops.unlink,rmdir:Xt.node_ops.rmdir,readdir:Xt.node_ops.readdir,symlink:Xt.node_ops.symlink},stream:{llseek:Xt.stream_ops.llseek}},file:{node:{getattr:Xt.node_ops.getattr,setattr:Xt.node_ops.setattr},stream:{llseek:Xt.stream_ops.llseek,read:Xt.stream_ops.read,write:Xt.stream_ops.write,allocate:Xt.stream_ops.allocate,mmap:Xt.stream_ops.mmap,msync:Xt.stream_ops.msync}},link:{node:{getattr:Xt.node_ops.getattr,setattr:Xt.node_ops.setattr,readlink:Xt.node_ops.readlink},stream:{}},chrdev:{node:{getattr:Xt.node_ops.getattr,setattr:Xt.node_ops.setattr},stream:ue.chrdev_stream_ops}});var ce=ue.createNode(O,B,X,re);return ue.isDir(ce.mode)?(ce.node_ops=Xt.ops_table.dir.node,ce.stream_ops=Xt.ops_table.dir.stream,ce.contents={}):ue.isFile(ce.mode)?(ce.node_ops=Xt.ops_table.file.node,ce.stream_ops=Xt.ops_table.file.stream,ce.usedBytes=0,ce.contents=null):ue.isLink(ce.mode)?(ce.node_ops=Xt.ops_table.link.node,ce.stream_ops=Xt.ops_table.link.stream):ue.isChrdev(ce.mode)&&(ce.node_ops=Xt.ops_table.chrdev.node,ce.stream_ops=Xt.ops_table.chrdev.stream),ce.atime=ce.mtime=ce.ctime=Date.now(),O&&(O.contents[B]=ce,O.atime=O.mtime=O.ctime=ce.atime),ce},getFileDataAsTypedArray(O){return O.contents?O.contents.subarray?O.contents.subarray(0,O.usedBytes):new Uint8Array(O.contents):new Uint8Array(0)},expandFileStorage(O,B){var X=O.contents?O.contents.length:0;if(!(X>=B)){var re=1024*1024;B=Math.max(B,X*(X<re?2:1.125)>>>0),X!=0&&(B=Math.max(B,256));var ce=O.contents;O.contents=new Uint8Array(B),O.usedBytes>0&&O.contents.set(ce.subarray(0,O.usedBytes),0)}},resizeFileStorage(O,B){if(O.usedBytes!=B)if(B==0)O.contents=null,O.usedBytes=0;else{var X=O.contents;O.contents=new Uint8Array(B),X&&O.contents.set(X.subarray(0,Math.min(B,O.usedBytes))),O.usedBytes=B}},node_ops:{getattr(O){var B={};return B.dev=ue.isChrdev(O.mode)?O.id:1,B.ino=O.id,B.mode=O.mode,B.nlink=1,B.uid=0,B.gid=0,B.rdev=O.rdev,ue.isDir(O.mode)?B.size=4096:ue.isFile(O.mode)?B.size=O.usedBytes:ue.isLink(O.mode)?B.size=O.link.length:B.size=0,B.atime=new Date(O.atime),B.mtime=new Date(O.mtime),B.ctime=new Date(O.ctime),B.blksize=4096,B.blocks=Math.ceil(B.size/B.blksize),B},setattr(O,B){for(const X of["mode","atime","mtime","ctime"])B[X]&&(O[X]=B[X]);B.size!==void 0&&Xt.resizeFileStorage(O,B.size)},lookup(O,B){throw Xt.doesNotExistError},mknod(O,B,X,re){return Xt.createNode(O,B,X,re)},rename(O,B,X){var re;try{re=ue.lookupNode(B,X)}catch{}if(re){if(ue.isDir(O.mode))for(var ce in re.contents)throw new ue.ErrnoError(55);ue.hashRemoveNode(re)}delete O.parent.contents[O.name],B.contents[X]=O,O.name=X,B.ctime=B.mtime=O.parent.ctime=O.parent.mtime=Date.now()},unlink(O,B){delete O.contents[B],O.ctime=O.mtime=Date.now()},rmdir(O,B){var X=ue.lookupNode(O,B);for(var re in X.contents)throw new ue.ErrnoError(55);delete O.contents[B],O.ctime=O.mtime=Date.now()},readdir(O){return[".","..",...Object.keys(O.contents)]},symlink(O,B,X){var re=Xt.createNode(O,B,41471,0);return re.link=X,re},readlink(O){if(!ue.isLink(O.mode))throw new ue.ErrnoError(28);return O.link}},stream_ops:{read(O,B,X,re,ce){var Ae=O.node.contents;if(ce>=O.node.usedBytes)return 0;var Ie=Math.min(O.node.usedBytes-ce,re);if(Ie>8&&Ae.subarray)B.set(Ae.subarray(ce,ce+Ie),X);else for(var He=0;He<Ie;He++)B[X+He]=Ae[ce+He];return Ie},write(O,B,X,re,ce,Ae){if(B.buffer===A.buffer&&(Ae=!1),!re)return 0;var Ie=O.node;if(Ie.mtime=Ie.ctime=Date.now(),B.subarray&&(!Ie.contents||Ie.contents.subarray)){if(Ae)return Ie.contents=B.subarray(X,X+re),Ie.usedBytes=re,re;if(Ie.usedBytes===0&&ce===0)return Ie.contents=B.slice(X,X+re),Ie.usedBytes=re,re;if(ce+re<=Ie.usedBytes)return Ie.contents.set(B.subarray(X,X+re),ce),re}if(Xt.expandFileStorage(Ie,ce+re),Ie.contents.subarray&&B.subarray)Ie.contents.set(B.subarray(X,X+re),ce);else for(var He=0;He<re;He++)Ie.contents[ce+He]=B[X+He];return Ie.usedBytes=Math.max(Ie.usedBytes,ce+re),re},llseek(O,B,X){var re=B;if(X===1?re+=O.position:X===2&&ue.isFile(O.node.mode)&&(re+=O.node.usedBytes),re<0)throw new ue.ErrnoError(28);return re},allocate(O,B,X){Xt.expandFileStorage(O.node,B+X),O.node.usedBytes=Math.max(O.node.usedBytes,B+X)},mmap(O,B,X,re,ce){if(!ue.isFile(O.node.mode))throw new ue.ErrnoError(43);var Ae,Ie,He=O.node.contents;if(!(ce&2)&&He&&He.buffer===A.buffer)Ie=!1,Ae=He.byteOffset;else{if(Ie=!0,Ae=ci(),!Ae)throw new ue.ErrnoError(48);He&&((X>0||X+B<He.length)&&(He.subarray?He=He.subarray(X,X+B):He=Array.prototype.slice.call(He,X,X+B)),A.set(He,Ae>>>0))}return{ptr:Ae,allocated:Ie}},msync(O,B,X,re,ce){return Xt.stream_ops.write(O,B,0,re,X,!1),0}}},Ui=async O=>{var B=await y(O);return new Uint8Array(B)},Dn=(O,B,X,re,ce,Ae)=>{ue.createDataFile(O,B,X,re,ce,Ae)},Kr=s.preloadPlugins||[],In=(O,B,X,re)=>{typeof Browser<"u"&&Browser.init();var ce=!1;return Kr.forEach(Ae=>{ce||Ae.canHandle(B)&&(Ae.handle(O,B,X,re),ce=!0)}),ce},fn=(O,B,X,re,ce,Ae,Ie,He,at,Tt)=>{var mt=B?Be.resolve(qt.join2(O,B)):O;function Lt(or){function er(pr){Tt==null||Tt(),He||Dn(O,B,pr,re,ce,at),Ae==null||Ae(),Ee()}In(or,mt,er,()=>{Ie==null||Ie(),Ee()})||er(or)}Pe(),typeof X=="string"?Ui(X).then(Lt,Ie):Lt(X)},vt=O=>{var B={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},X=B[O];if(typeof X>"u")throw new Error(`Unknown file open mode: ${O}`);return X},dr=(O,B)=>{var X=0;return O&&(X|=365),B&&(X|=146),X},ue={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:class{constructor(O){To(this,"name","ErrnoError");this.errno=O}},filesystems:null,syncFSRequests:0,readFiles:{},FSStream:class{constructor(){To(this,"shared",{})}get object(){return this.node}set object(O){this.node=O}get isRead(){return(this.flags&2097155)!==1}get isWrite(){return(this.flags&2097155)!==0}get isAppend(){return this.flags&1024}get flags(){return this.shared.flags}set flags(O){this.shared.flags=O}get position(){return this.shared.position}set position(O){this.shared.position=O}},FSNode:class{constructor(O,B,X,re){To(this,"node_ops",{});To(this,"stream_ops",{});To(this,"readMode",365);To(this,"writeMode",146);To(this,"mounted",null);O||(O=this),this.parent=O,this.mount=O.mount,this.id=ue.nextInode++,this.name=B,this.mode=X,this.rdev=re,this.atime=this.mtime=this.ctime=Date.now()}get read(){return(this.mode&this.readMode)===this.readMode}set read(O){O?this.mode|=this.readMode:this.mode&=~this.readMode}get write(){return(this.mode&this.writeMode)===this.writeMode}set write(O){O?this.mode|=this.writeMode:this.mode&=~this.writeMode}get isFolder(){return ue.isDir(this.mode)}get isDevice(){return ue.isChrdev(this.mode)}},lookupPath(O,B={}){if(!O)return{path:"",node:null};B.follow_mount??(B.follow_mount=!0),qt.isAbs(O)||(O=ue.cwd()+"/"+O);e:for(var X=0;X<40;X++){for(var re=O.split("/").filter(Tt=>!!Tt&&Tt!=="."),ce=ue.root,Ae="/",Ie=0;Ie<re.length;Ie++){var He=Ie===re.length-1;if(He&&B.parent)break;if(re[Ie]===".."){Ae=qt.dirname(Ae),ce=ce.parent;continue}Ae=qt.join2(Ae,re[Ie]);try{ce=ue.lookupNode(ce,re[Ie])}catch(Tt){if((Tt==null?void 0:Tt.errno)===44&&He&&B.noent_okay)return{path:Ae};throw Tt}if(ue.isMountpoint(ce)&&(!He||B.follow_mount)&&(ce=ce.mounted.root),ue.isLink(ce.mode)&&(!He||B.follow)){if(!ce.node_ops.readlink)throw new ue.ErrnoError(52);var at=ce.node_ops.readlink(ce);qt.isAbs(at)||(at=qt.dirname(Ae)+"/"+at),O=at+"/"+re.slice(Ie+1).join("/");continue e}}return{path:Ae,node:ce}}throw new ue.ErrnoError(32)},getPath(O){for(var B;;){if(ue.isRoot(O)){var X=O.mount.mountpoint;return B?X[X.length-1]!=="/"?`${X}/${B}`:X+B:X}B=B?`${O.name}/${B}`:O.name,O=O.parent}},hashName(O,B){for(var X=0,re=0;re<B.length;re++)X=(X<<5)-X+B.charCodeAt(re)|0;return(O+X>>>0)%ue.nameTable.length},hashAddNode(O){var B=ue.hashName(O.parent.id,O.name);O.name_next=ue.nameTable[B],ue.nameTable[B]=O},hashRemoveNode(O){var B=ue.hashName(O.parent.id,O.name);if(ue.nameTable[B]===O)ue.nameTable[B]=O.name_next;else for(var X=ue.nameTable[B];X;){if(X.name_next===O){X.name_next=O.name_next;break}X=X.name_next}},lookupNode(O,B){var X=ue.mayLookup(O);if(X)throw new ue.ErrnoError(X);for(var re=ue.hashName(O.id,B),ce=ue.nameTable[re];ce;ce=ce.name_next){var Ae=ce.name;if(ce.parent.id===O.id&&Ae===B)return ce}return ue.lookup(O,B)},createNode(O,B,X,re){var ce=new ue.FSNode(O,B,X,re);return ue.hashAddNode(ce),ce},destroyNode(O){ue.hashRemoveNode(O)},isRoot(O){return O===O.parent},isMountpoint(O){return!!O.mounted},isFile(O){return(O&61440)===32768},isDir(O){return(O&61440)===16384},isLink(O){return(O&61440)===40960},isChrdev(O){return(O&61440)===8192},isBlkdev(O){return(O&61440)===24576},isFIFO(O){return(O&61440)===4096},isSocket(O){return(O&49152)===49152},flagsToPermissionString(O){var B=["r","w","rw"][O&3];return O&512&&(B+="w"),B},nodePermissions(O,B){return ue.ignorePermissions?0:B.includes("r")&&!(O.mode&292)||B.includes("w")&&!(O.mode&146)||B.includes("x")&&!(O.mode&73)?2:0},mayLookup(O){if(!ue.isDir(O.mode))return 54;var B=ue.nodePermissions(O,"x");return B||(O.node_ops.lookup?0:2)},mayCreate(O,B){if(!ue.isDir(O.mode))return 54;try{var X=ue.lookupNode(O,B);return 20}catch{}return ue.nodePermissions(O,"wx")},mayDelete(O,B,X){var re;try{re=ue.lookupNode(O,B)}catch(Ae){return Ae.errno}var ce=ue.nodePermissions(O,"wx");if(ce)return ce;if(X){if(!ue.isDir(re.mode))return 54;if(ue.isRoot(re)||ue.getPath(re)===ue.cwd())return 10}else if(ue.isDir(re.mode))return 31;return 0},mayOpen(O,B){return O?ue.isLink(O.mode)?32:ue.isDir(O.mode)&&(ue.flagsToPermissionString(B)!=="r"||B&512)?31:ue.nodePermissions(O,ue.flagsToPermissionString(B)):44},MAX_OPEN_FDS:4096,nextfd(){for(var O=0;O<=ue.MAX_OPEN_FDS;O++)if(!ue.streams[O])return O;throw new ue.ErrnoError(33)},getStreamChecked(O){var B=ue.getStream(O);if(!B)throw new ue.ErrnoError(8);return B},getStream:O=>ue.streams[O],createStream(O,B=-1){return O=Object.assign(new ue.FSStream,O),B==-1&&(B=ue.nextfd()),O.fd=B,ue.streams[B]=O,O},closeStream(O){ue.streams[O]=null},dupStream(O,B=-1){var re,ce;var X=ue.createStream(O,B);return(ce=(re=X.stream_ops)==null?void 0:re.dup)==null||ce.call(re,X),X},chrdev_stream_ops:{open(O){var X,re;var B=ue.getDevice(O.node.rdev);O.stream_ops=B.stream_ops,(re=(X=O.stream_ops).open)==null||re.call(X,O)},llseek(){throw new ue.ErrnoError(70)}},major:O=>O>>8,minor:O=>O&255,makedev:(O,B)=>O<<8|B,registerDevice(O,B){ue.devices[O]={stream_ops:B}},getDevice:O=>ue.devices[O],getMounts(O){for(var B=[],X=[O];X.length;){var re=X.pop();B.push(re),X.push(...re.mounts)}return B},syncfs(O,B){typeof O=="function"&&(B=O,O=!1),ue.syncFSRequests++,ue.syncFSRequests>1&&S(`warning: ${ue.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var X=ue.getMounts(ue.root.mount),re=0;function ce(Ie){return ue.syncFSRequests--,B(Ie)}function Ae(Ie){if(Ie)return Ae.errored?void 0:(Ae.errored=!0,ce(Ie));++re>=X.length&&ce(null)}X.forEach(Ie=>{if(!Ie.type.syncfs)return Ae(null);Ie.type.syncfs(Ie,O,Ae)})},mount(O,B,X){var re=X==="/",ce=!X,Ae;if(re&&ue.root)throw new ue.ErrnoError(10);if(!re&&!ce){var Ie=ue.lookupPath(X,{follow_mount:!1});if(X=Ie.path,Ae=Ie.node,ue.isMountpoint(Ae))throw new ue.ErrnoError(10);if(!ue.isDir(Ae.mode))throw new ue.ErrnoError(54)}var He={type:O,opts:B,mountpoint:X,mounts:[]},at=O.mount(He);return at.mount=He,He.root=at,re?ue.root=at:Ae&&(Ae.mounted=He,Ae.mount&&Ae.mount.mounts.push(He)),at},unmount(O){var B=ue.lookupPath(O,{follow_mount:!1});if(!ue.isMountpoint(B.node))throw new ue.ErrnoError(28);var X=B.node,re=X.mounted,ce=ue.getMounts(re);Object.keys(ue.nameTable).forEach(Ie=>{for(var He=ue.nameTable[Ie];He;){var at=He.name_next;ce.includes(He.mount)&&ue.destroyNode(He),He=at}}),X.mounted=null;var Ae=X.mount.mounts.indexOf(re);X.mount.mounts.splice(Ae,1)},lookup(O,B){return O.node_ops.lookup(O,B)},mknod(O,B,X){var re=ue.lookupPath(O,{parent:!0}),ce=re.node,Ae=qt.basename(O);if(!Ae||Ae==="."||Ae==="..")throw new ue.ErrnoError(28);var Ie=ue.mayCreate(ce,Ae);if(Ie)throw new ue.ErrnoError(Ie);if(!ce.node_ops.mknod)throw new ue.ErrnoError(63);return ce.node_ops.mknod(ce,Ae,B,X)},statfs(O){var B={bsize:4096,frsize:4096,blocks:1e6,bfree:5e5,bavail:5e5,files:ue.nextInode,ffree:ue.nextInode-1,fsid:42,flags:2,namelen:255},X=ue.lookupPath(O,{follow:!0}).node;return X!=null&&X.node_ops.statfs&&Object.assign(B,X.node_ops.statfs(X.mount.opts.root)),B},create(O,B=438){return B&=4095,B|=32768,ue.mknod(O,B,0)},mkdir(O,B=511){return B&=1023,B|=16384,ue.mknod(O,B,0)},mkdirTree(O,B){for(var X=O.split("/"),re="",ce=0;ce<X.length;++ce)if(X[ce]){re+="/"+X[ce];try{ue.mkdir(re,B)}catch(Ae){if(Ae.errno!=20)throw Ae}}},mkdev(O,B,X){return typeof X>"u"&&(X=B,B=438),B|=8192,ue.mknod(O,B,X)},symlink(O,B){if(!Be.resolve(O))throw new ue.ErrnoError(44);var X=ue.lookupPath(B,{parent:!0}),re=X.node;if(!re)throw new ue.ErrnoError(44);var ce=qt.basename(B),Ae=ue.mayCreate(re,ce);if(Ae)throw new ue.ErrnoError(Ae);if(!re.node_ops.symlink)throw new ue.ErrnoError(63);return re.node_ops.symlink(re,ce,O)},rename(O,B){var X=qt.dirname(O),re=qt.dirname(B),ce=qt.basename(O),Ae=qt.basename(B),Ie,He,at;if(Ie=ue.lookupPath(O,{parent:!0}),He=Ie.node,Ie=ue.lookupPath(B,{parent:!0}),at=Ie.node,!He||!at)throw new ue.ErrnoError(44);if(He.mount!==at.mount)throw new ue.ErrnoError(75);var Tt=ue.lookupNode(He,ce),mt=Be.relative(O,re);if(mt.charAt(0)!==".")throw new ue.ErrnoError(28);if(mt=Be.relative(B,X),mt.charAt(0)!==".")throw new ue.ErrnoError(55);var Lt;try{Lt=ue.lookupNode(at,Ae)}catch{}if(Tt!==Lt){var or=ue.isDir(Tt.mode),er=ue.mayDelete(He,ce,or);if(er)throw new ue.ErrnoError(er);if(er=Lt?ue.mayDelete(at,Ae,or):ue.mayCreate(at,Ae),er)throw new ue.ErrnoError(er);if(!He.node_ops.rename)throw new ue.ErrnoError(63);if(ue.isMountpoint(Tt)||Lt&&ue.isMountpoint(Lt))throw new ue.ErrnoError(10);if(at!==He&&(er=ue.nodePermissions(He,"w"),er))throw new ue.ErrnoError(er);ue.hashRemoveNode(Tt);try{He.node_ops.rename(Tt,at,Ae),Tt.parent=at}catch(pr){throw pr}finally{ue.hashAddNode(Tt)}}},rmdir(O){var B=ue.lookupPath(O,{parent:!0}),X=B.node,re=qt.basename(O),ce=ue.lookupNode(X,re),Ae=ue.mayDelete(X,re,!0);if(Ae)throw new ue.ErrnoError(Ae);if(!X.node_ops.rmdir)throw new ue.ErrnoError(63);if(ue.isMountpoint(ce))throw new ue.ErrnoError(10);X.node_ops.rmdir(X,re),ue.destroyNode(ce)},readdir(O){var B=ue.lookupPath(O,{follow:!0}),X=B.node;if(!X.node_ops.readdir)throw new ue.ErrnoError(54);return X.node_ops.readdir(X)},unlink(O){var B=ue.lookupPath(O,{parent:!0}),X=B.node;if(!X)throw new ue.ErrnoError(44);var re=qt.basename(O),ce=ue.lookupNode(X,re),Ae=ue.mayDelete(X,re,!1);if(Ae)throw new ue.ErrnoError(Ae);if(!X.node_ops.unlink)throw new ue.ErrnoError(63);if(ue.isMountpoint(ce))throw new ue.ErrnoError(10);X.node_ops.unlink(X,re),ue.destroyNode(ce)},readlink(O){var B=ue.lookupPath(O),X=B.node;if(!X)throw new ue.ErrnoError(44);if(!X.node_ops.readlink)throw new ue.ErrnoError(28);return X.node_ops.readlink(X)},stat(O,B){var X=ue.lookupPath(O,{follow:!B}),re=X.node;if(!re)throw new ue.ErrnoError(44);if(!re.node_ops.getattr)throw new ue.ErrnoError(63);return re.node_ops.getattr(re)},lstat(O){return ue.stat(O,!0)},chmod(O,B,X){var re;if(typeof O=="string"){var ce=ue.lookupPath(O,{follow:!X});re=ce.node}else re=O;if(!re.node_ops.setattr)throw new ue.ErrnoError(63);re.node_ops.setattr(re,{mode:B&4095|re.mode&-4096,ctime:Date.now()})},lchmod(O,B){ue.chmod(O,B,!0)},fchmod(O,B){var X=ue.getStreamChecked(O);ue.chmod(X.node,B)},chown(O,B,X,re){var ce;if(typeof O=="string"){var Ae=ue.lookupPath(O,{follow:!re});ce=Ae.node}else ce=O;if(!ce.node_ops.setattr)throw new ue.ErrnoError(63);ce.node_ops.setattr(ce,{timestamp:Date.now()})},lchown(O,B,X){ue.chown(O,B,X,!0)},fchown(O,B,X){var re=ue.getStreamChecked(O);ue.chown(re.node,B,X)},truncate(O,B){if(B<0)throw new ue.ErrnoError(28);var X;if(typeof O=="string"){var re=ue.lookupPath(O,{follow:!0});X=re.node}else X=O;if(!X.node_ops.setattr)throw new ue.ErrnoError(63);if(ue.isDir(X.mode))throw new ue.ErrnoError(31);if(!ue.isFile(X.mode))throw new ue.ErrnoError(28);var ce=ue.nodePermissions(X,"w");if(ce)throw new ue.ErrnoError(ce);X.node_ops.setattr(X,{size:B,timestamp:Date.now()})},ftruncate(O,B){var X=ue.getStreamChecked(O);if((X.flags&2097155)===0)throw new ue.ErrnoError(28);ue.truncate(X.node,B)},utime(O,B,X){var re=ue.lookupPath(O,{follow:!0}),ce=re.node;ce.node_ops.setattr(ce,{atime:B,mtime:X})},open(O,B,X=438){if(O==="")throw new ue.ErrnoError(44);B=typeof B=="string"?vt(B):B,B&64?X=X&4095|32768:X=0;var re;if(typeof O=="object")re=O;else{var ce=ue.lookupPath(O,{follow:!(B&131072),noent_okay:!0});re=ce.node,O=ce.path}var Ae=!1;if(B&64)if(re){if(B&128)throw new ue.ErrnoError(20)}else re=ue.mknod(O,X,0),Ae=!0;if(!re)throw new ue.ErrnoError(44);if(ue.isChrdev(re.mode)&&(B&=-513),B&65536&&!ue.isDir(re.mode))throw new ue.ErrnoError(54);if(!Ae){var Ie=ue.mayOpen(re,B);if(Ie)throw new ue.ErrnoError(Ie)}B&512&&!Ae&&ue.truncate(re,0),B&=-131713;var He=ue.createStream({node:re,path:ue.getPath(re),flags:B,seekable:!0,position:0,stream_ops:re.stream_ops,ungotten:[],error:!1});return He.stream_ops.open&&He.stream_ops.open(He),s.logReadFiles&&!(B&1)&&(O in ue.readFiles||(ue.readFiles[O]=1)),He},close(O){if(ue.isClosed(O))throw new ue.ErrnoError(8);O.getdents&&(O.getdents=null);try{O.stream_ops.close&&O.stream_ops.close(O)}catch(B){throw B}finally{ue.closeStream(O.fd)}O.fd=null},isClosed(O){return O.fd===null},llseek(O,B,X){if(ue.isClosed(O))throw new ue.ErrnoError(8);if(!O.seekable||!O.stream_ops.llseek)throw new ue.ErrnoError(70);if(X!=0&&X!=1&&X!=2)throw new ue.ErrnoError(28);return O.position=O.stream_ops.llseek(O,B,X),O.ungotten=[],O.position},read(O,B,X,re,ce){if(re<0||ce<0)throw new ue.ErrnoError(28);if(ue.isClosed(O))throw new ue.ErrnoError(8);if((O.flags&2097155)===1)throw new ue.ErrnoError(8);if(ue.isDir(O.node.mode))throw new ue.ErrnoError(31);if(!O.stream_ops.read)throw new ue.ErrnoError(28);var Ae=typeof ce<"u";if(!Ae)ce=O.position;else if(!O.seekable)throw new ue.ErrnoError(70);var Ie=O.stream_ops.read(O,B,X,re,ce);return Ae||(O.position+=Ie),Ie},write(O,B,X,re,ce,Ae){if(re<0||ce<0)throw new ue.ErrnoError(28);if(ue.isClosed(O))throw new ue.ErrnoError(8);if((O.flags&2097155)===0)throw new ue.ErrnoError(8);if(ue.isDir(O.node.mode))throw new ue.ErrnoError(31);if(!O.stream_ops.write)throw new ue.ErrnoError(28);O.seekable&&O.flags&1024&&ue.llseek(O,0,2);var Ie=typeof ce<"u";if(!Ie)ce=O.position;else if(!O.seekable)throw new ue.ErrnoError(70);var He=O.stream_ops.write(O,B,X,re,ce,Ae);return Ie||(O.position+=He),He},allocate(O,B,X){if(ue.isClosed(O))throw new ue.ErrnoError(8);if(B<0||X<=0)throw new ue.ErrnoError(28);if((O.flags&2097155)===0)throw new ue.ErrnoError(8);if(!ue.isFile(O.node.mode)&&!ue.isDir(O.node.mode))throw new ue.ErrnoError(43);if(!O.stream_ops.allocate)throw new ue.ErrnoError(138);O.stream_ops.allocate(O,B,X)},mmap(O,B,X,re,ce){if((re&2)!==0&&(ce&2)===0&&(O.flags&2097155)!==2)throw new ue.ErrnoError(2);if((O.flags&2097155)===1)throw new ue.ErrnoError(2);if(!O.stream_ops.mmap)throw new ue.ErrnoError(43);if(!B)throw new ue.ErrnoError(28);return O.stream_ops.mmap(O,B,X,re,ce)},msync(O,B,X,re,ce){return O.stream_ops.msync?O.stream_ops.msync(O,B,X,re,ce):0},ioctl(O,B,X){if(!O.stream_ops.ioctl)throw new ue.ErrnoError(59);return O.stream_ops.ioctl(O,B,X)},readFile(O,B={}){if(B.flags=B.flags||0,B.encoding=B.encoding||"binary",B.encoding!=="utf8"&&B.encoding!=="binary")throw new Error(`Invalid encoding type "${B.encoding}"`);var X,re=ue.open(O,B.flags),ce=ue.stat(O),Ae=ce.size,Ie=new Uint8Array(Ae);return ue.read(re,Ie,0,Ae,0),B.encoding==="utf8"?X=ut(Ie):B.encoding==="binary"&&(X=Ie),ue.close(re),X},writeFile(O,B,X={}){X.flags=X.flags||577;var re=ue.open(O,X.flags,X.mode);if(typeof B=="string"){var ce=new Uint8Array(Qt(B)+1),Ae=wr(B,ce,0,ce.length);ue.write(re,ce,0,Ae,void 0,X.canOwn)}else if(ArrayBuffer.isView(B))ue.write(re,B,0,B.byteLength,void 0,X.canOwn);else throw new Error("Unsupported data type");ue.close(re)},cwd:()=>ue.currentPath,chdir(O){var B=ue.lookupPath(O,{follow:!0});if(B.node===null)throw new ue.ErrnoError(44);if(!ue.isDir(B.node.mode))throw new ue.ErrnoError(54);var X=ue.nodePermissions(B.node,"x");if(X)throw new ue.ErrnoError(X);ue.currentPath=B.path},createDefaultDirectories(){ue.mkdir("/tmp"),ue.mkdir("/home"),ue.mkdir("/home/web_user")},createDefaultDevices(){ue.mkdir("/dev"),ue.registerDevice(ue.makedev(1,3),{read:()=>0,write:(re,ce,Ae,Ie,He)=>Ie,llseek:()=>0}),ue.mkdev("/dev/null",ue.makedev(1,3)),Qr.register(ue.makedev(5,0),Qr.default_tty_ops),Qr.register(ue.makedev(6,0),Qr.default_tty1_ops),ue.mkdev("/dev/tty",ue.makedev(5,0)),ue.mkdev("/dev/tty1",ue.makedev(6,0));var O=new Uint8Array(1024),B=0,X=()=>(B===0&&(B=jr(O).byteLength),O[--B]);ue.createDevice("/dev","random",X),ue.createDevice("/dev","urandom",X),ue.mkdir("/dev/shm"),ue.mkdir("/dev/shm/tmp")},createSpecialDirectories(){ue.mkdir("/proc");var O=ue.mkdir("/proc/self");ue.mkdir("/proc/self/fd"),ue.mount({mount(){var B=ue.createNode(O,"fd",16895,73);return B.stream_ops={llseek:Xt.stream_ops.llseek},B.node_ops={lookup(X,re){var ce=+re,Ae=ue.getStreamChecked(ce),Ie={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>Ae.path},id:ce+1};return Ie.parent=Ie,Ie},readdir(){return Array.from(ue.streams.entries()).filter(([X,re])=>re).map(([X,re])=>X.toString())}},B}},{},"/proc/self/fd")},createStandardStreams(O,B,X){O?ue.createDevice("/dev","stdin",O):ue.symlink("/dev/tty","/dev/stdin"),B?ue.createDevice("/dev","stdout",null,B):ue.symlink("/dev/tty","/dev/stdout"),X?ue.createDevice("/dev","stderr",null,X):ue.symlink("/dev/tty1","/dev/stderr"),ue.open("/dev/stdin",0),ue.open("/dev/stdout",1),ue.open("/dev/stderr",1)},staticInit(){ue.nameTable=new Array(4096),ue.mount(Xt,{},"/"),ue.createDefaultDirectories(),ue.createDefaultDevices(),ue.createSpecialDirectories(),ue.filesystems={MEMFS:Xt}},init(O,B,X){ue.initialized=!0,O??(O=s.stdin),B??(B=s.stdout),X??(X=s.stderr),ue.createStandardStreams(O,B,X)},quit(){ue.initialized=!1;for(var O=0;O<ue.streams.length;O++){var B=ue.streams[O];B&&ue.close(B)}},findObject(O,B){var X=ue.analyzePath(O,B);return X.exists?X.object:null},analyzePath(O,B){try{var X=ue.lookupPath(O,{follow:!B});O=X.path}catch{}var re={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var X=ue.lookupPath(O,{parent:!0});re.parentExists=!0,re.parentPath=X.path,re.parentObject=X.node,re.name=qt.basename(O),X=ue.lookupPath(O,{follow:!B}),re.exists=!0,re.path=X.path,re.object=X.node,re.name=X.node.name,re.isRoot=X.path==="/"}catch(ce){re.error=ce.errno}return re},createPath(O,B,X,re){O=typeof O=="string"?O:ue.getPath(O);for(var ce=B.split("/").reverse();ce.length;){var Ae=ce.pop();if(Ae){var Ie=qt.join2(O,Ae);try{ue.mkdir(Ie)}catch{}O=Ie}}return Ie},createFile(O,B,X,re,ce){var Ae=qt.join2(typeof O=="string"?O:ue.getPath(O),B),Ie=dr(re,ce);return ue.create(Ae,Ie)},createDataFile(O,B,X,re,ce,Ae){var Ie=B;O&&(O=typeof O=="string"?O:ue.getPath(O),Ie=B?qt.join2(O,B):O);var He=dr(re,ce),at=ue.create(Ie,He);if(X){if(typeof X=="string"){for(var Tt=new Array(X.length),mt=0,Lt=X.length;mt<Lt;++mt)Tt[mt]=X.charCodeAt(mt);X=Tt}ue.chmod(at,He|146);var or=ue.open(at,577);ue.write(or,X,0,X.length,0,Ae),ue.close(or),ue.chmod(at,He)}},createDevice(O,B,X,re){var He;var ce=qt.join2(typeof O=="string"?O:ue.getPath(O),B),Ae=dr(!!X,!!re);(He=ue.createDevice).major??(He.major=64);var Ie=ue.makedev(ue.createDevice.major++,0);return ue.registerDevice(Ie,{open(at){at.seekable=!1},close(at){var Tt;(Tt=re==null?void 0:re.buffer)!=null&&Tt.length&&re(10)},read(at,Tt,mt,Lt,or){for(var er=0,pr=0;pr<Lt;pr++){var Ir;try{Ir=X()}catch{throw new ue.ErrnoError(29)}if(Ir===void 0&&er===0)throw new ue.ErrnoError(6);if(Ir==null)break;er++,Tt[mt+pr]=Ir}return er&&(at.node.atime=Date.now()),er},write(at,Tt,mt,Lt,or){for(var er=0;er<Lt;er++)try{re(Tt[mt+er])}catch{throw new ue.ErrnoError(29)}return Lt&&(at.node.mtime=at.node.ctime=Date.now()),er}}),ue.mkdev(ce,Ae,Ie)},forceLoadFile(O){if(O.isDevice||O.isFolder||O.link||O.contents)return!0;if(typeof XMLHttpRequest<"u")throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");try{O.contents=m(O.url),O.usedBytes=O.contents.length}catch{throw new ue.ErrnoError(29)}},createLazyFile(O,B,X,re,ce){class Ae{constructor(){To(this,"lengthKnown",!1);To(this,"chunks",[])}get(er){if(!(er>this.length-1||er<0)){var pr=er%this.chunkSize,Ir=er/this.chunkSize|0;return this.getter(Ir)[pr]}}setDataGetter(er){this.getter=er}cacheLength(){var er=new XMLHttpRequest;if(er.open("HEAD",X,!1),er.send(null),!(er.status>=200&&er.status<300||er.status===304))throw new Error("Couldn't load "+X+". Status: "+er.status);var pr=Number(er.getResponseHeader("Content-length")),Ir,$r=(Ir=er.getResponseHeader("Accept-Ranges"))&&Ir==="bytes",ii=(Ir=er.getResponseHeader("Content-Encoding"))&&Ir==="gzip",Si=1024*1024;$r||(Si=pr);var Lr=(Ri,Gr)=>{if(Ri>Gr)throw new Error("invalid range ("+Ri+", "+Gr+") or no bytes requested!");if(Gr>pr-1)throw new Error("only "+pr+" bytes available! programmer error!");var Pi=new XMLHttpRequest;if(Pi.open("GET",X,!1),pr!==Si&&Pi.setRequestHeader("Range","bytes="+Ri+"-"+Gr),Pi.responseType="arraybuffer",Pi.overrideMimeType&&Pi.overrideMimeType("text/plain; charset=x-user-defined"),Pi.send(null),!(Pi.status>=200&&Pi.status<300||Pi.status===304))throw new Error("Couldn't load "+X+". Status: "+Pi.status);return Pi.response!==void 0?new Uint8Array(Pi.response||[]):Xr(Pi.responseText||"")},Qi=this;Qi.setDataGetter(Ri=>{var Gr=Ri*Si,Pi=(Ri+1)*Si-1;if(Pi=Math.min(Pi,pr-1),typeof Qi.chunks[Ri]>"u"&&(Qi.chunks[Ri]=Lr(Gr,Pi)),typeof Qi.chunks[Ri]>"u")throw new Error("doXHR failed!");return Qi.chunks[Ri]}),(ii||!pr)&&(Si=pr=1,pr=this.getter(0).length,Si=pr,b("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=pr,this._chunkSize=Si,this.lengthKnown=!0}get length(){return this.lengthKnown||this.cacheLength(),this._length}get chunkSize(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}if(typeof XMLHttpRequest<"u"){throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var Ie,He}else var He={isDevice:!1,url:X};var at=ue.createFile(O,B,He,re,ce);He.contents?at.contents=He.contents:He.url&&(at.contents=null,at.url=He.url),Object.defineProperties(at,{usedBytes:{get:function(){return this.contents.length}}});var Tt={},mt=Object.keys(at.stream_ops);mt.forEach(or=>{var er=at.stream_ops[or];Tt[or]=(...pr)=>(ue.forceLoadFile(at),er(...pr))});function Lt(or,er,pr,Ir,$r){var ii=or.node.contents;if($r>=ii.length)return 0;var Si=Math.min(ii.length-$r,Ir);if(ii.slice)for(var Lr=0;Lr<Si;Lr++)er[pr+Lr]=ii[$r+Lr];else for(var Lr=0;Lr<Si;Lr++)er[pr+Lr]=ii.get($r+Lr);return Si}return Tt.read=(or,er,pr,Ir,$r)=>(ue.forceLoadFile(at),Lt(or,er,pr,Ir,$r)),Tt.mmap=(or,er,pr,Ir,$r)=>{ue.forceLoadFile(at);var ii=ci();if(!ii)throw new ue.ErrnoError(48);return Lt(or,A,ii,er,pr),{ptr:ii,allocated:!0}},at.stream_ops=Tt,at}},ar=(O,B)=>(O>>>=0,O?ut(w,O,B):""),Bt={DEFAULT_POLLMASK:5,calculateAt(O,B,X){if(qt.isAbs(B))return B;var re;if(O===-100)re=ue.cwd();else{var ce=Bt.getStreamFromFD(O);re=ce.path}if(B.length==0){if(!X)throw new ue.ErrnoError(44);return re}return re+"/"+B},doStat(O,B,X){var re=O(B);D[X>>>2>>>0]=re.dev,D[X+4>>>2>>>0]=re.mode,j[X+8>>>2>>>0]=re.nlink,D[X+12>>>2>>>0]=re.uid,D[X+16>>>2>>>0]=re.gid,D[X+20>>>2>>>0]=re.rdev,rt=[re.size>>>0,(qe=re.size,+Math.abs(qe)>=1?qe>0?+Math.floor(qe/4294967296)>>>0:~~+Math.ceil((qe-+(~~qe>>>0))/4294967296)>>>0:0)],D[X+24>>>2>>>0]=rt[0],D[X+28>>>2>>>0]=rt[1],D[X+32>>>2>>>0]=4096,D[X+36>>>2>>>0]=re.blocks;var ce=re.atime.getTime(),Ae=re.mtime.getTime(),Ie=re.ctime.getTime();return rt=[Math.floor(ce/1e3)>>>0,(qe=Math.floor(ce/1e3),+Math.abs(qe)>=1?qe>0?+Math.floor(qe/4294967296)>>>0:~~+Math.ceil((qe-+(~~qe>>>0))/4294967296)>>>0:0)],D[X+40>>>2>>>0]=rt[0],D[X+44>>>2>>>0]=rt[1],j[X+48>>>2>>>0]=ce%1e3*1e3*1e3,rt=[Math.floor(Ae/1e3)>>>0,(qe=Math.floor(Ae/1e3),+Math.abs(qe)>=1?qe>0?+Math.floor(qe/4294967296)>>>0:~~+Math.ceil((qe-+(~~qe>>>0))/4294967296)>>>0:0)],D[X+56>>>2>>>0]=rt[0],D[X+60>>>2>>>0]=rt[1],j[X+64>>>2>>>0]=Ae%1e3*1e3*1e3,rt=[Math.floor(Ie/1e3)>>>0,(qe=Math.floor(Ie/1e3),+Math.abs(qe)>=1?qe>0?+Math.floor(qe/4294967296)>>>0:~~+Math.ceil((qe-+(~~qe>>>0))/4294967296)>>>0:0)],D[X+72>>>2>>>0]=rt[0],D[X+76>>>2>>>0]=rt[1],j[X+80>>>2>>>0]=Ie%1e3*1e3*1e3,rt=[re.ino>>>0,(qe=re.ino,+Math.abs(qe)>=1?qe>0?+Math.floor(qe/4294967296)>>>0:~~+Math.ceil((qe-+(~~qe>>>0))/4294967296)>>>0:0)],D[X+88>>>2>>>0]=rt[0],D[X+92>>>2>>>0]=rt[1],0},doMsync(O,B,X,re,ce){if(!ue.isFile(B.node.mode))throw new ue.ErrnoError(43);if(re&2)return 0;var Ae=w.slice(O,O+X);ue.msync(B,Ae,ce,X,re)},getStreamFromFD(O){var B=ue.getStreamChecked(O);return B},varargs:void 0,getStr(O){var B=ar(O);return B}};function Ar(O,B,X){X>>>=0,Bt.varargs=X;try{var re=Bt.getStreamFromFD(O);switch(B){case 0:{var ce=Jt();if(ce<0)return-28;for(;ue.streams[ce];)ce++;var Ae;return Ae=ue.dupStream(re,ce),Ae.fd}case 1:case 2:return 0;case 3:return re.flags;case 4:{var ce=Jt();return re.flags|=ce,0}case 12:{var ce=kr(),Ie=0;return L[ce+Ie>>>1>>>0]=2,0}case 13:case 14:return 0}return-28}catch(He){if(typeof ue>"u"||He.name!=="ErrnoError")throw He;return-He.errno}}function br(O,B,X){X>>>=0,Bt.varargs=X;try{var re=Bt.getStreamFromFD(O);switch(B){case 21509:return re.tty?0:-59;case 21505:{if(!re.tty)return-59;if(re.tty.ops.ioctl_tcgets){var ce=re.tty.ops.ioctl_tcgets(re),Ae=kr();D[Ae>>>2>>>0]=ce.c_iflag||0,D[Ae+4>>>2>>>0]=ce.c_oflag||0,D[Ae+8>>>2>>>0]=ce.c_cflag||0,D[Ae+12>>>2>>>0]=ce.c_lflag||0;for(var Ie=0;Ie<32;Ie++)A[Ae+Ie+17>>>0]=ce.c_cc[Ie]||0;return 0}return 0}case 21510:case 21511:case 21512:return re.tty?0:-59;case 21506:case 21507:case 21508:{if(!re.tty)return-59;if(re.tty.ops.ioctl_tcsets){for(var Ae=kr(),He=D[Ae>>>2>>>0],at=D[Ae+4>>>2>>>0],Tt=D[Ae+8>>>2>>>0],mt=D[Ae+12>>>2>>>0],Lt=[],Ie=0;Ie<32;Ie++)Lt.push(A[Ae+Ie+17>>>0]);return re.tty.ops.ioctl_tcsets(re.tty,B,{c_iflag:He,c_oflag:at,c_cflag:Tt,c_lflag:mt,c_cc:Lt})}return 0}case 21519:{if(!re.tty)return-59;var Ae=kr();return D[Ae>>>2>>>0]=0,0}case 21520:return re.tty?-28:-59;case 21531:{var Ae=kr();return ue.ioctl(re,B,Ae)}case 21523:{if(!re.tty)return-59;if(re.tty.ops.ioctl_tiocgwinsz){var or=re.tty.ops.ioctl_tiocgwinsz(re.tty),Ae=kr();L[Ae>>>1>>>0]=or[0],L[Ae+2>>>1>>>0]=or[1]}return 0}case 21524:return re.tty?0:-59;case 21515:return re.tty?0:-59;default:return-28}}catch(er){if(typeof ue>"u"||er.name!=="ErrnoError")throw er;return-er.errno}}function Br(O,B,X,re){B>>>=0,re>>>=0,Bt.varargs=re;try{B=Bt.getStr(B),B=Bt.calculateAt(O,B);var ce=re?Jt():0;return ue.open(B,X,ce).fd}catch(Ae){if(typeof ue>"u"||Ae.name!=="ErrnoError")throw Ae;return-Ae.errno}}function ai(O,B){O>>>=0,B>>>=0;try{return O=Bt.getStr(O),Bt.doStat(ue.stat,O,B)}catch(X){if(typeof ue>"u"||X.name!=="ErrnoError")throw X;return-X.errno}}var Nn=()=>Re(""),nt=(O,B)=>Object.defineProperty(B,"name",{value:O}),_o=[],si=[],ti,rr=O=>{throw new ti(O)},is=()=>si.length/2-5-_o.length,wa=()=>{si.push(0,1,void 0,1,null,1,!0,1,!1,1),s.count_emval_handles=is},q={toValue:O=>(O||rr("Cannot use deleted val. handle = "+O),si[O]),toHandle:O=>{switch(O){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const B=_o.pop()||si.length;return si[B]=O,si[B+1]=1,B}}}},te=(O,B)=>{var X=nt(B,function(re){this.name=B,this.message=re;var ce=new Error(re).stack;ce!==void 0&&(this.stack=this.toString()+`
`+ce.replace(/^Error(:[^\n]*)?\n/,""))});return X.prototype=Object.create(O.prototype),X.prototype.constructor=X,X.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},X},fe,Ue=()=>{for(var O=new Array(256),B=0;B<256;++B)O[B]=String.fromCharCode(B);pt=O},pt,At=O=>{for(var B="",X=O;w[X>>>0];)B+=pt[w[X++>>>0]];return B},cr={},Hr=(O,B)=>{for(B===void 0&&rr("ptr should not be undefined");O.baseClass;)B=O.upcast(B),O=O.baseClass;return B},Yi=(O,B,X)=>{B=Hr(O,B),cr.hasOwnProperty(B)?rr(`Tried to register registered instance: ${B}`):cr[B]=X},Fn={},No=O=>{var B=Eo(O),X=At(B);return qa(B),X},Ms=(O,B)=>{var X=Fn[O];return X===void 0&&rr(`${B} has unknown type ${No(O)}`),X},_a=(O,B)=>{B=Hr(O,B),cr.hasOwnProperty(B)?delete cr[B]:rr(`Tried to unregister unregistered instance: ${B}`)},Ua=O=>{},su=!1,Oa=O=>{O.smartPtr?O.smartPtrType.rawDestructor(O.smartPtr):O.ptrType.registeredClass.rawDestructor(O.ptr)},lu=O=>{O.count.value-=1;var B=O.count.value===0;B&&Oa(O)},Qs=(O,B,X)=>{if(B===X)return O;if(X.baseClass===void 0)return null;var re=Qs(O,B,X.baseClass);return re===null?null:X.downcast(re)},bl={},Sl=(O,B)=>(B=Hr(O,B),cr[B]),uu,ys=O=>{throw new uu(O)},Fo=(O,B)=>{(!B.ptrType||!B.ptr)&&ys("makeClassHandle requires ptr and ptrType");var X=!!B.smartPtrType,re=!!B.smartPtr;return X!==re&&ys("Both smartPtrType and smartPtr must be specified"),B.count={value:1},Pa(Object.create(O,{$$:{value:B,writable:!0}}))};function Kc(O){var B=this.getPointee(O);if(!B)return this.destructor(O),null;var X=Sl(this.registeredClass,B);if(X!==void 0){if(X.$$.count.value===0)return X.$$.ptr=B,X.$$.smartPtr=O,X.clone();var re=X.clone();return this.destructor(O),re}function ce(){return this.isSmartPointer?Fo(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:B,smartPtrType:this,smartPtr:O}):Fo(this.registeredClass.instancePrototype,{ptrType:this,ptr:O})}var Ae=this.registeredClass.getActualType(B),Ie=bl[Ae];if(!Ie)return ce.call(this);var He;this.isConst?He=Ie.constPointerType:He=Ie.pointerType;var at=Qs(B,this.registeredClass,He.registeredClass);return at===null?ce.call(this):this.isSmartPointer?Fo(He.registeredClass.instancePrototype,{ptrType:He,ptr:at,smartPtrType:this,smartPtr:O}):Fo(He.registeredClass.instancePrototype,{ptrType:He,ptr:at})}var Pa=O=>typeof FinalizationRegistry>"u"?(Pa=B=>B,O):(su=new FinalizationRegistry(B=>{lu(B.$$)}),Pa=B=>{var X=B.$$,re=!!X.smartPtr;if(re){var ce={$$:X};su.register(B,ce,B)}return B},Ua=B=>su.unregister(B),Pa(O));function vc(O,B,X){O>>>=0,B>>>=0,X>>>=0,O=At(O),B=Ms(B,"wrapper"),X=q.toValue(X);var re=B.registeredClass,ce=re.instancePrototype,Ae=re.baseClass,Ie=Ae.instancePrototype,He=re.baseClass.constructor,at=nt(O,function(...Tt){re.baseClass.pureVirtualFunctions.forEach((function(mt){if(this[mt]===Ie[mt])throw new fe(`Pure virtual function ${mt} must be implemented in JavaScript`)}).bind(this)),Object.defineProperty(this,"__parent",{value:ce}),this.__construct(...Tt)});return ce.__construct=function(...mt){this===ce&&rr("Pass correct 'this' to __construct");var Lt=He.implement(this,...mt);Ua(Lt);var or=Lt.$$;Lt.notifyOnDestruction(),or.preservePointerOnDelete=!0,Object.defineProperties(this,{$$:{value:or}}),Pa(this),Yi(re,or.ptr,this)},ce.__destruct=function(){this===ce&&rr("Pass correct 'this' to __destruct"),Ua(this),_a(re,this.$$.ptr)},at.prototype=Object.create(ce),Object.assign(at.prototype,X),q.toHandle(at)}function Ls(O,B,X,re,ce){}var ns={},el={},ao=(O,B,X)=>{O.forEach(He=>el[He]=B);function re(He){var at=X(He);at.length!==O.length&&ys("Mismatched type converter count");for(var Tt=0;Tt<O.length;++Tt)fo(O[Tt],at[Tt])}var ce=new Array(B.length),Ae=[],Ie=0;B.forEach((He,at)=>{Fn.hasOwnProperty(He)?ce[at]=Fn[He]:(Ae.push(He),ns.hasOwnProperty(He)||(ns[He]=[]),ns[He].push(()=>{ce[at]=Fn[He],++Ie,Ie===Ae.length&&re(ce)}))}),Ae.length===0&&re(ce)};function ra(O,B,X={}){var re=B.name;if(O||rr(`type "${re}" must have a positive integer typeid pointer`),Fn.hasOwnProperty(O)){if(X.ignoreDuplicateRegistrations)return;rr(`Cannot register type '${re}' twice`)}if(Fn[O]=B,delete el[O],ns.hasOwnProperty(O)){var ce=ns[O];delete ns[O],ce.forEach(Ae=>Ae())}}function fo(O,B,X={}){return ra(O,B,X)}var Hn=8;function ks(O,B,X,re){O>>>=0,B>>>=0,B=At(B),fo(O,{name:B,fromWireType:function(ce){return!!ce},toWireType:function(ce,Ae){return Ae?X:re},argPackAdvance:Hn,readValueFromPointer:function(ce){return this.fromWireType(w[ce>>>0])},destructorFunction:null})}var cu=O=>({count:O.count,deleteScheduled:O.deleteScheduled,preservePointerOnDelete:O.preservePointerOnDelete,ptr:O.ptr,ptrType:O.ptrType,smartPtr:O.smartPtr,smartPtrType:O.smartPtrType}),Yl=O=>{function B(X){return X.$$.ptrType.registeredClass.name}rr(B(O)+" instance already deleted")},yc=()=>{Object.assign(ia.prototype,{isAliasOf(O){if(!(this instanceof ia)||!(O instanceof ia))return!1;var B=this.$$.ptrType.registeredClass,X=this.$$.ptr;O.$$=O.$$;for(var re=O.$$.ptrType.registeredClass,ce=O.$$.ptr;B.baseClass;)X=B.upcast(X),B=B.baseClass;for(;re.baseClass;)ce=re.upcast(ce),re=re.baseClass;return B===re&&X===ce},clone(){if(this.$$.ptr||Yl(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var O=Pa(Object.create(Object.getPrototypeOf(this),{$$:{value:cu(this.$$)}}));return O.$$.count.value+=1,O.$$.deleteScheduled=!1,O},delete(){this.$$.ptr||Yl(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&rr("Object already scheduled for deletion"),Ua(this),lu(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Yl(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&rr("Object already scheduled for deletion"),this.$$.deleteScheduled=!0,this}})};function ia(){}var fa=(O,B,X)=>{if(O[B].overloadTable===void 0){var re=O[B];O[B]=function(...ce){return O[B].overloadTable.hasOwnProperty(ce.length)||rr(`Function '${X}' called with an invalid number of arguments (${ce.length}) - expects one of (${O[B].overloadTable})!`),O[B].overloadTable[ce.length].apply(this,ce)},O[B].overloadTable=[],O[B].overloadTable[re.argCount]=re}},qo=(O,B,X)=>{s.hasOwnProperty(O)?((X===void 0||s[O].overloadTable!==void 0&&s[O].overloadTable[X]!==void 0)&&rr(`Cannot register public name '${O}' twice`),fa(s,O,O),s[O].overloadTable.hasOwnProperty(X)&&rr(`Cannot register multiple overloads of a function with the same number of arguments (${X})!`),s[O].overloadTable[X]=B):(s[O]=B,s[O].argCount=X)},Zc=48,Iu=57,ms=O=>{O=O.replace(/[^a-zA-Z0-9_]/g,"$");var B=O.charCodeAt(0);return B>=Zc&&B<=Iu?`_${O}`:O};function jo(O,B,X,re,ce,Ae,Ie,He){this.name=O,this.constructor=B,this.instancePrototype=X,this.rawDestructor=re,this.baseClass=ce,this.getActualType=Ae,this.upcast=Ie,this.downcast=He,this.pureVirtualFunctions=[]}var zi=(O,B,X)=>{for(;B!==X;)B.upcast||rr(`Expected null or instance of ${X.name}, got an instance of ${B.name}`),O=B.upcast(O),B=B.baseClass;return O};function on(O,B){if(B===null)return this.isReference&&rr(`null is not a valid ${this.name}`),0;B.$$||rr(`Cannot pass "${Sc(B)}" as a ${this.name}`),B.$$.ptr||rr(`Cannot pass deleted object as a pointer of type ${this.name}`);var X=B.$$.ptrType.registeredClass,re=zi(B.$$.ptr,X,this.registeredClass);return re}function du(O,B){var X;if(B===null)return this.isReference&&rr(`null is not a valid ${this.name}`),this.isSmartPointer?(X=this.rawConstructor(),O!==null&&O.push(this.rawDestructor,X),X):0;(!B||!B.$$)&&rr(`Cannot pass "${Sc(B)}" as a ${this.name}`),B.$$.ptr||rr(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&B.$$.ptrType.isConst&&rr(`Cannot convert argument of type ${B.$$.smartPtrType?B.$$.smartPtrType.name:B.$$.ptrType.name} to parameter type ${this.name}`);var re=B.$$.ptrType.registeredClass;if(X=zi(B.$$.ptr,re,this.registeredClass),this.isSmartPointer)switch(B.$$.smartPtr===void 0&&rr("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:B.$$.smartPtrType===this?X=B.$$.smartPtr:rr(`Cannot convert argument of type ${B.$$.smartPtrType?B.$$.smartPtrType.name:B.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:X=B.$$.smartPtr;break;case 2:if(B.$$.smartPtrType===this)X=B.$$.smartPtr;else{var ce=B.clone();X=this.rawShare(X,q.toHandle(()=>ce.delete())),O!==null&&O.push(this.rawDestructor,X)}break;default:rr("Unsupporting sharing policy")}return X}function me(O,B){if(B===null)return this.isReference&&rr(`null is not a valid ${this.name}`),0;B.$$||rr(`Cannot pass "${Sc(B)}" as a ${this.name}`),B.$$.ptr||rr(`Cannot pass deleted object as a pointer of type ${this.name}`),B.$$.ptrType.isConst&&rr(`Cannot convert argument of type ${B.$$.ptrType.name} to parameter type ${this.name}`);var X=B.$$.ptrType.registeredClass,re=zi(B.$$.ptr,X,this.registeredClass);return re}function Fe(O){return this.fromWireType(j[O>>>2>>>0])}var Ze=()=>{Object.assign(ft.prototype,{getPointee(O){return this.rawGetPointee&&(O=this.rawGetPointee(O)),O},destructor(O){var B;(B=this.rawDestructor)==null||B.call(this,O)},argPackAdvance:Hn,readValueFromPointer:Fe,fromWireType:Kc})};function ft(O,B,X,re,ce,Ae,Ie,He,at,Tt,mt){this.name=O,this.registeredClass=B,this.isReference=X,this.isConst=re,this.isSmartPointer=ce,this.pointeeType=Ae,this.sharingPolicy=Ie,this.rawGetPointee=He,this.rawConstructor=at,this.rawShare=Tt,this.rawDestructor=mt,!ce&&B.baseClass===void 0?re?(this.toWireType=on,this.destructorFunction=null):(this.toWireType=me,this.destructorFunction=null):this.toWireType=du}var Mt=(O,B,X)=>{s.hasOwnProperty(O)||ys("Replacing nonexistent public symbol"),s[O].overloadTable!==void 0&&X!==void 0?s[O].overloadTable[X]=B:(s[O]=B,s[O].argCount=X)},nr=(O,B,X)=>{O=O.replace(/p/g,"i");var re=s["dynCall_"+O];return re(B,...X)},Ot,Ut=O=>Ot.get(O),Yr=(O,B,X=[])=>{if(O.includes("j"))return nr(O,B,X);var re=Ut(B)(...X);return O[0]=="p"?re>>>0:re},Jr=(O,B)=>(...X)=>Yr(O,B,X),li=(O,B)=>{O=At(O);function X(){return O.includes("j")||O.includes("p")?Jr(O,B):Ut(B)}var re=X();return typeof re!="function"&&rr(`unknown function pointer with signature ${O}: ${B}`),re},Ci,Di=(O,B)=>{var X=[],re={};function ce(Ae){if(!re[Ae]&&!Fn[Ae]){if(el[Ae]){el[Ae].forEach(ce);return}X.push(Ae),re[Ae]=!0}}throw B.forEach(ce),new Ci(`${O}: `+X.map(No).join([", "]))};function za(O,B,X,re,ce,Ae,Ie,He,at,Tt,mt,Lt,or){O>>>=0,B>>>=0,X>>>=0,re>>>=0,ce>>>=0,Ae>>>=0,Ie>>>=0,He>>>=0,at>>>=0,Tt>>>=0,mt>>>=0,Lt>>>=0,or>>>=0,mt=At(mt),Ae=li(ce,Ae),He&&(He=li(Ie,He)),Tt&&(Tt=li(at,Tt)),or=li(Lt,or);var er=ms(mt);qo(er,function(){Di(`Cannot construct ${mt} due to unbound types`,[re])}),ao([O,B,X],re?[re]:[],pr=>{var Pi;pr=pr[0];var Ir,$r;re?(Ir=pr.registeredClass,$r=Ir.instancePrototype):$r=ia.prototype;var ii=nt(mt,function(...Ca){if(Object.getPrototypeOf(this)!==Si)throw new ti("Use 'new' to construct "+mt);if(Lr.constructor_body===void 0)throw new ti(mt+" has no accessible constructor");var Bo=Lr.constructor_body[Ca.length];if(Bo===void 0)throw new ti(`Tried to invoke ctor of ${mt} with invalid number of parameters (${Ca.length}) - expected (${Object.keys(Lr.constructor_body).toString()}) parameters instead!`);return Bo.apply(this,Ca)}),Si=Object.create($r,{constructor:{value:ii}});ii.prototype=Si;var Lr=new jo(mt,ii,Si,or,Ir,Ae,He,Tt);Lr.baseClass&&((Pi=Lr.baseClass).__derivedClasses??(Pi.__derivedClasses=[]),Lr.baseClass.__derivedClasses.push(Lr));var Qi=new ft(mt,Lr,!0,!1,!1),Ri=new ft(mt+"*",Lr,!1,!1,!1),Gr=new ft(mt+" const*",Lr,!1,!0,!1);return bl[O]={pointerType:Ri,constPointerType:Gr},Mt(er,ii),[Qi,Ri,Gr]})}var ha=O=>{for(;O.length;){var B=O.pop(),X=O.pop();X(B)}};function Is(O){for(var B=1;B<O.length;++B)if(O[B]!==null&&O[B].destructorFunction===void 0)return!0;return!1}function tl(O,B,X,re,ce,Ae){var Ie=B.length;Ie<2&&rr("argTypes array size mismatch! Must at least get return value and 'this' types!");var He=B[1]!==null&&X!==null,at=Is(B),Tt=B[0].name!=="void",mt=Ie-2,Lt=new Array(mt),or=[],er=[],pr=function(...Ir){er.length=0;var $r;or.length=He?2:1,or[0]=ce,He&&($r=B[1].toWireType(er,this),or[1]=$r);for(var ii=0;ii<mt;++ii)Lt[ii]=B[ii+2].toWireType(er,Ir[ii]),or.push(Lt[ii]);var Si=re(...or);function Lr(Qi){if(at)ha(er);else for(var Ri=He?1:2;Ri<B.length;Ri++){var Gr=Ri===1?$r:Lt[Ri-2];B[Ri].destructorFunction!==null&&B[Ri].destructorFunction(Gr)}if(Tt)return B[0].fromWireType(Qi)}return Lr(Si)};return nt(O,pr)}var $l=(O,B)=>{for(var X=[],re=0;re<O;re++)X.push(j[B+re*4>>>2>>>0]);return X},mc=O=>{O=O.trim();const B=O.indexOf("(");return B!==-1?O.substr(0,B):O},os=function(O,B,X,re,ce,Ae,Ie,He,at){O>>>=0,B>>>=0,re>>>=0,ce>>>=0,Ae>>>=0,Ie>>>=0;var Tt=$l(X,re);B=At(B),B=mc(B),Ae=li(ce,Ae),ao([],[O],mt=>{mt=mt[0];var Lt=`${mt.name}.${B}`;function or(){Di(`Cannot call ${Lt} due to unbound types`,Tt)}B.startsWith("@@")&&(B=Symbol[B.substring(2)]);var er=mt.registeredClass.constructor;return er[B]===void 0?(or.argCount=X-1,er[B]=or):(fa(er,B,Lt),er[B].overloadTable[X-1]=or),ao([],Tt,pr=>{var Ir=[pr[0],null].concat(pr.slice(1)),$r=tl(Lt,Ir,null,Ae,Ie);if(er[B].overloadTable===void 0?($r.argCount=X-1,er[B]=$r):er[B].overloadTable[X-1]=$r,mt.registeredClass.__derivedClasses)for(const ii of mt.registeredClass.__derivedClasses)ii.constructor.hasOwnProperty(B)||(ii.constructor[B]=$r);return[]}),[]})},Rp=function(O,B,X,re,ce,Ae){O>>>=0,X>>>=0,re>>>=0,ce>>>=0,Ae>>>=0;var Ie=$l(B,X);ce=li(re,ce),ao([],[O],He=>{He=He[0];var at=`constructor ${He.name}`;if(He.registeredClass.constructor_body===void 0&&(He.registeredClass.constructor_body=[]),He.registeredClass.constructor_body[B-1]!==void 0)throw new ti(`Cannot register multiple constructors with identical number of parameters (${B-1}) for class '${He.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return He.registeredClass.constructor_body[B-1]=()=>{Di(`Cannot construct ${He.name} due to unbound types`,Ie)},ao([],Ie,Tt=>(Tt.splice(1,0,null),He.registeredClass.constructor_body[B-1]=tl(at,Tt,null,ce,Ae),[])),[]})},as=function(O,B,X,re,ce,Ae,Ie,He,at,Tt){O>>>=0,B>>>=0,re>>>=0,ce>>>=0,Ae>>>=0,Ie>>>=0;var mt=$l(X,re);B=At(B),B=mc(B),Ae=li(ce,Ae),ao([],[O],Lt=>{Lt=Lt[0];var or=`${Lt.name}.${B}`;B.startsWith("@@")&&(B=Symbol[B.substring(2)]),He&&Lt.registeredClass.pureVirtualFunctions.push(B);function er(){Di(`Cannot call ${or} due to unbound types`,mt)}var pr=Lt.registeredClass.instancePrototype,Ir=pr[B];return Ir===void 0||Ir.overloadTable===void 0&&Ir.className!==Lt.name&&Ir.argCount===X-2?(er.argCount=X-2,er.className=Lt.name,pr[B]=er):(fa(pr,B,or),pr[B].overloadTable[X-2]=er),ao([],mt,$r=>{var ii=tl(or,$r,Lt,Ae,Ie);return pr[B].overloadTable===void 0?(ii.argCount=X-2,pr[B]=ii):pr[B].overloadTable[X-2]=ii,[]}),[]})},qd=(O,B,X)=>(O instanceof Object||rr(`${X} with invalid "this": ${O}`),O instanceof B.registeredClass.constructor||rr(`${X} incompatible with "this" of type ${O.constructor.name}`),O.$$.ptr||rr(`cannot call emscripten binding method ${X} on deleted object`),zi(O.$$.ptr,O.$$.ptrType.registeredClass,B.registeredClass)),bc=function(O,B,X,re,ce,Ae,Ie,He,at,Tt){O>>>=0,B>>>=0,X>>>=0,re>>>=0,ce>>>=0,Ae>>>=0,Ie>>>=0,He>>>=0,at>>>=0,Tt>>>=0,B=At(B),ce=li(re,ce),ao([],[O],mt=>{mt=mt[0];var Lt=`${mt.name}.${B}`,or={get(){Di(`Cannot access ${Lt} due to unbound types`,[X,Ie])},enumerable:!0,configurable:!0};return at?or.set=()=>Di(`Cannot access ${Lt} due to unbound types`,[X,Ie]):or.set=er=>rr(Lt+" is a read-only property"),Object.defineProperty(mt.registeredClass.instancePrototype,B,or),ao([],at?[X,Ie]:[X],er=>{var pr=er[0],Ir={get(){var ii=qd(this,mt,Lt+" getter");return pr.fromWireType(ce(Ae,ii))},enumerable:!0};if(at){at=li(He,at);var $r=er[1];Ir.set=function(ii){var Si=qd(this,mt,Lt+" setter"),Lr=[];at(Tt,Si,$r.toWireType(Lr,ii)),ha(Lr)}}return Object.defineProperty(mt.registeredClass.instancePrototype,B,Ir),[]}),[]})};function Da(O){O>>>=0,O>9&&--si[O+1]===0&&(si[O]=void 0,_o.push(O))}var Xd={name:"emscripten::val",fromWireType:O=>{var B=q.toValue(O);return Da(O),B},toWireType:(O,B)=>q.toHandle(B),argPackAdvance:Hn,readValueFromPointer:Fe,destructorFunction:null};function Jc(O){return O>>>=0,fo(O,Xd)}var ho=(O,B,X)=>{switch(B){case 1:return X?function(re){return this.fromWireType(A[re>>>0])}:function(re){return this.fromWireType(w[re>>>0])};case 2:return X?function(re){return this.fromWireType(L[re>>>1>>>0])}:function(re){return this.fromWireType(k[re>>>1>>>0])};case 4:return X?function(re){return this.fromWireType(D[re>>>2>>>0])}:function(re){return this.fromWireType(j[re>>>2>>>0])};default:throw new TypeError(`invalid integer width (${B}): ${O}`)}};function fu(O,B,X,re){O>>>=0,B>>>=0,X>>>=0,B=At(B);function ce(){}ce.values={},fo(O,{name:B,constructor:ce,fromWireType:function(Ae){return this.constructor.values[Ae]},toWireType:(Ae,Ie)=>Ie.value,argPackAdvance:Hn,readValueFromPointer:ho(B,X,re),destructorFunction:null}),qo(B,ce)}function kf(O,B,X){O>>>=0,B>>>=0;var re=Ms(O,"enum");B=At(B);var ce=re.constructor,Ae=Object.create(re.constructor.prototype,{value:{value:X},constructor:{value:nt(`${re.name}_${B}`,function(){})}});ce.values[X]=Ae,ce[B]=Ae}var Sc=O=>{if(O===null)return"null";var B=typeof O;return B==="object"||B==="array"||B==="function"?O.toString():""+O},If=(O,B)=>{switch(B){case 4:return function(X){return this.fromWireType(N[X>>>2>>>0])};case 8:return function(X){return this.fromWireType(V[X>>>3>>>0])};default:throw new TypeError(`invalid float width (${B}): ${O}`)}},Mp=function(O,B,X){O>>>=0,B>>>=0,X>>>=0,B=At(B),fo(O,{name:B,fromWireType:re=>re,toWireType:(re,ce)=>ce,argPackAdvance:Hn,readValueFromPointer:If(B,X),destructorFunction:null})};function Lp(O,B,X,re,ce,Ae,Ie,He){O>>>=0,X>>>=0,re>>>=0,ce>>>=0,Ae>>>=0;var at=$l(B,X);O=At(O),O=mc(O),ce=li(re,ce),qo(O,function(){Di(`Cannot call ${O} due to unbound types`,at)},B-1),ao([],at,Tt=>{var mt=[Tt[0],null].concat(Tt.slice(1));return Mt(O,tl(O,mt,null,ce,Ae),B-1),[]})}var Kd=(O,B,X)=>{switch(B){case 1:return X?re=>A[re>>>0]:re=>w[re>>>0];case 2:return X?re=>L[re>>>1>>>0]:re=>k[re>>>1>>>0];case 4:return X?re=>D[re>>>2>>>0]:re=>j[re>>>2>>>0];default:throw new TypeError(`invalid integer width (${B}): ${O}`)}};function _c(O,B,X,re,ce){O>>>=0,B>>>=0,X>>>=0,B=At(B);var Ae=mt=>mt;if(re===0){var Ie=32-8*X;Ae=mt=>mt<<Ie>>>Ie}var He=B.includes("unsigned"),at=(mt,Lt)=>{},Tt;He?Tt=function(mt,Lt){return at(Lt,this.name),Lt>>>0}:Tt=function(mt,Lt){return at(Lt,this.name),Lt},fo(O,{name:B,fromWireType:Ae,toWireType:Tt,argPackAdvance:Hn,readValueFromPointer:Kd(B,X,re!==0),destructorFunction:null})}function Zd(O,B,X){O>>>=0,X>>>=0;var re=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],ce=re[B];function Ae(Ie){var He=j[Ie>>>2>>>0],at=j[Ie+4>>>2>>>0];return new ce(A.buffer,at,He)}X=At(X),fo(O,{name:X,fromWireType:Ae,argPackAdvance:Hn,readValueFromPointer:Ae},{ignoreDuplicateRegistrations:!0})}var Ti=(O,B,X)=>wr(O,w,B,X);function Dh(O,B){O>>>=0,B>>>=0,B=At(B),fo(O,{name:B,fromWireType(X){for(var re=j[X>>>2>>>0],ce=X+4,Ae,Ie,He=ce,Ie=0;Ie<=re;++Ie){var at=ce+Ie;if(Ie==re||w[at>>>0]==0){var Tt=at-He,mt=ar(He,Tt);Ae===void 0?Ae=mt:(Ae+="\0",Ae+=mt),He=at+1}}return qa(X),Ae},toWireType(X,re){re instanceof ArrayBuffer&&(re=new Uint8Array(re));var ce,Ae=typeof re=="string";Ae||re instanceof Uint8Array||re instanceof Uint8ClampedArray||re instanceof Int8Array||rr("Cannot pass non-string to std::string"),Ae?ce=Qt(re):ce=re.length;var Ie=Ws(4+ce+1),He=Ie+4;if(j[Ie>>>2>>>0]=ce,Ae)Ti(re,He,ce+1);else if(Ae)for(var at=0;at<ce;++at){var Tt=re.charCodeAt(at);Tt>255&&(qa(He),rr("String has UTF-16 code units that do not fit in 8 bits")),w[He+at>>>0]=Tt}else for(var at=0;at<ce;++at)w[He+at>>>0]=re[at];return X!==null&&X.push(qa,Ie),Ie},argPackAdvance:Hn,readValueFromPointer:Fe,destructorFunction(X){qa(X)}})}var Qc=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,ed=(O,B)=>{for(var X=O,re=X>>1,ce=re+B/2;!(re>=ce)&&k[re>>>0];)++re;if(X=re<<1,X-O>32&&Qc)return Qc.decode(w.subarray(O>>>0,X>>>0));for(var Ae="",Ie=0;!(Ie>=B/2);++Ie){var He=L[O+Ie*2>>>1>>>0];if(He==0)break;Ae+=String.fromCharCode(He)}return Ae},hu=(O,B,X)=>{if(X??(X=2147483647),X<2)return 0;X-=2;for(var re=B,ce=X<O.length*2?X/2:O.length,Ae=0;Ae<ce;++Ae){var Ie=O.charCodeAt(Ae);L[B>>>1>>>0]=Ie,B+=2}return L[B>>>1>>>0]=0,B-re},td=O=>O.length*2,Jd=(O,B)=>{for(var X=0,re="";!(X>=B/4);){var ce=D[O+X*4>>>2>>>0];if(ce==0)break;if(++X,ce>=65536){var Ae=ce-65536;re+=String.fromCharCode(55296|Ae>>10,56320|Ae&1023)}else re+=String.fromCharCode(ce)}return re},Nf=(O,B,X)=>{if(B>>>=0,X??(X=2147483647),X<4)return 0;for(var re=B,ce=re+X-4,Ae=0;Ae<O.length;++Ae){var Ie=O.charCodeAt(Ae);if(Ie>=55296&&Ie<=57343){var He=O.charCodeAt(++Ae);Ie=65536+((Ie&1023)<<10)|He&1023}if(D[B>>>2>>>0]=Ie,B+=4,B+4>ce)break}return D[B>>>2>>>0]=0,B-re},Nu=O=>{for(var B=0,X=0;X<O.length;++X){var re=O.charCodeAt(X);re>=55296&&re<=57343&&++X,B+=4}return B},Fu=function(O,B,X){O>>>=0,B>>>=0,X>>>=0,X=At(X);var re,ce,Ae,Ie;B===2?(re=ed,ce=hu,Ie=td,Ae=He=>k[He>>>1>>>0]):B===4&&(re=Jd,ce=Nf,Ie=Nu,Ae=He=>j[He>>>2>>>0]),fo(O,{name:X,fromWireType:He=>{for(var at=j[He>>>2>>>0],Tt,mt=He+4,Lt=0;Lt<=at;++Lt){var or=He+4+Lt*B;if(Lt==at||Ae(or)==0){var er=or-mt,pr=re(mt,er);Tt===void 0?Tt=pr:(Tt+="\0",Tt+=pr),mt=or+B}}return qa(He),Tt},toWireType:(He,at)=>{typeof at!="string"&&rr(`Cannot pass non-string to C++ string type ${X}`);var Tt=Ie(at),mt=Ws(4+Tt+B);return j[mt>>>2>>>0]=Tt/B,ce(at,mt+4,Tt+B),He!==null&&He.push(qa,mt),mt},argPackAdvance:Hn,readValueFromPointer:Fe,destructorFunction(He){qa(He)}})},Rh=function(O,B){O>>>=0,B>>>=0,B=At(B),fo(O,{isVoid:!0,name:B,argPackAdvance:0,fromWireType:()=>{},toWireType:(X,re)=>{}})};function ju(O){if(Un.xhrs.has(O)){var B=Un.xhrs.get(O);Un.xhrs.free(O),B.readyState>0&&B.readyState<4&&B.abort()}}var bs=()=>{throw 1/0},Ff={},rd=O=>{var B=Ff[O];return B===void 0?At(O):B},ql=[];function jf(O,B,X,re,ce){return O>>>=0,B>>>=0,X>>>=0,re>>>=0,ce>>>=0,O=ql[O],B=q.toValue(B),X=rd(X),O(B,B[X],re,ce)}var id=O=>{var B=ql.length;return ql.push(O),B},_l=(O,B)=>{for(var X=new Array(O),re=0;re<O;++re)X[re]=Ms(j[B+re*4>>>2>>>0],"parameter "+re);return X},jn=Reflect.construct,Pl=(O,B,X)=>{var re=[],ce=O.toWireType(re,X);return re.length&&(j[B>>>2>>>0]=q.toHandle(re)),ce},Ra=function(O,B,X){B>>>=0;var re=_l(O,B),ce=re.shift();O--;var Ae=new Array(O),Ie=(at,Tt,mt,Lt)=>{for(var or=0,er=0;er<O;++er)Ae[er]=re[er].readValueFromPointer(Lt+or),or+=re[er].argPackAdvance;var pr=X===1?jn(Tt,Ae):Tt.apply(at,Ae);return Pl(ce,mt,pr)},He=`methodCaller<(${re.map(at=>at.name).join(", ")}) => ${ce.name}>`;return id(nt(He,Ie))};function Ma(O){O>>>=0;var B=q.toValue(O);ha(B),Da(O)}function Bf(O,B){O>>>=0,B>>>=0,O=Ms(O,"_emval_take_value");var X=O.readValueFromPointer(B);return q.toHandle(X)}var Qd=O=>O%4===0&&(O%100!==0||O%400===0),ef=[0,31,60,91,121,152,182,213,244,274,305,335],Vf=[0,31,59,90,120,151,181,212,243,273,304,334],Xl=O=>{var B=Qd(O.getFullYear()),X=B?ef:Vf,re=X[O.getMonth()]+O.getDate()-1;return re};function tf(O,B,X){var re=Vt(O,B);X>>>=0;var ce=new Date(re*1e3);D[X>>>2>>>0]=ce.getSeconds(),D[X+4>>>2>>>0]=ce.getMinutes(),D[X+8>>>2>>>0]=ce.getHours(),D[X+12>>>2>>>0]=ce.getDate(),D[X+16>>>2>>>0]=ce.getMonth(),D[X+20>>>2>>>0]=ce.getFullYear()-1900,D[X+24>>>2>>>0]=ce.getDay();var Ae=Xl(ce)|0;D[X+28>>>2>>>0]=Ae,D[X+36>>>2>>>0]=-(ce.getTimezoneOffset()*60);var Ie=new Date(ce.getFullYear(),0,1),He=new Date(ce.getFullYear(),6,1).getTimezoneOffset(),at=Ie.getTimezoneOffset(),Tt=(He!=at&&ce.getTimezoneOffset()==Math.min(at,He))|0;D[X+32>>>2>>>0]=Tt}var kp=function(O,B,X,re){O>>>=0,B>>>=0,X>>>=0,re>>>=0;var ce=new Date().getFullYear(),Ae=new Date(ce,0,1),Ie=new Date(ce,6,1),He=Ae.getTimezoneOffset(),at=Ie.getTimezoneOffset(),Tt=Math.max(He,at);j[O>>>2>>>0]=Tt*60,D[B>>>2>>>0]=+(He!=at);var mt=er=>{var pr=er>=0?"-":"+",Ir=Math.abs(er),$r=String(Math.floor(Ir/60)).padStart(2,"0"),ii=String(Ir%60).padStart(2,"0");return`UTC${pr}${$r}${ii}`},Lt=mt(He),or=mt(at);at<He?(Ti(Lt,X,17),Ti(or,re,17)):(Ti(Lt,re,17),Ti(or,X,17))},nd=()=>performance.now(),Mh=()=>Date.now(),Bu=O=>O>=0&&O<=3;function ze(O,B,X,re){if(re>>>=0,!Bu(O))return 28;var ce;O===0?ce=Mh():ce=nd();var Ae=Math.round(ce*1e3*1e3);return rt=[Ae>>>0,(qe=Ae,+Math.abs(qe)>=1?qe>0?+Math.floor(qe/4294967296)>>>0:~~+Math.ceil((qe-+(~~qe>>>0))/4294967296)>>>0:0)],D[re>>>2>>>0]=rt[0],D[re+4>>>2>>>0]=rt[1],0}var se=[],ye=(O,B)=>{se.length=0;for(var X;X=w[O++>>>0];){var re=X!=105;re&=X!=112,B+=re&&B%8?4:0,se.push(X==112?j[B>>>2>>>0]:X==105?D[B>>>2>>>0]:V[B>>>3>>>0]),B+=re?8:4}return se},ge=(O,B,X)=>{var re=ye(B,X);return St[O](...re)};function Ce(O,B,X){return O>>>=0,B>>>=0,X>>>=0,ge(O,B,X)}var Me=O=>{if(O instanceof It||O=="unwind")return x;p(1,O)},Ne=0,lt=()=>ct||Ne>0,Ve=O=>{var B;x=O,lt()||((B=s.onExit)==null||B.call(s,O),T=!0),p(O,new It(O))},it=(O,B)=>{x=O,Ve(O)},Je=it,ht=()=>{if(!lt())try{Je(x)}catch(O){Me(O)}},Nt=O=>{if(!T)try{O(),ht()}catch(B){Me(B)}},fr=(O,B)=>setTimeout(()=>{Nt(O)},B),Or=(O,B)=>{if(ur.timingMode=O,ur.timingValue=B,!ur.func)return 1;if(ur.running||(ur.running=!0),O==0)ur.scheduler=function(){var Ie=Math.max(0,ur.tickStartTime+B-nd())|0;setTimeout(ur.runner,Ie)},ur.method="timeout";else if(O==1)ur.scheduler=function(){ur.requestAnimationFrame(ur.runner)},ur.method="rAF";else if(O==2){if(typeof ur.setImmediate>"u")if(typeof setImmediate>"u"){var X=[],re="setimmediate",ce=Ae=>{(Ae.data===re||Ae.data.target===re)&&(Ae.stopPropagation(),X.shift()())};addEventListener("message",ce,!0),ur.setImmediate=Ae=>{X.push(Ae),postMessage(re,"*")}}else ur.setImmediate=setImmediate;ur.scheduler=function(){ur.setImmediate(ur.runner)},ur.method="immediate"}return 0},Rt=(O,B,X,re,ce)=>{ur.func=O,ur.arg=re;var Ae=ur.currentlyRunningMainloop;function Ie(){return Ae<ur.currentlyRunningMainloop?(ht(),!1):!0}if(ur.running=!1,ur.runner=function(){if(!T){if(ur.queue.length>0){var at=ur.queue.shift();if(at.func(at.arg),ur.remainingBlockers){var Tt=ur.remainingBlockers,mt=Tt%1==0?Tt-1:Math.floor(Tt);at.counted?ur.remainingBlockers=mt:(mt=mt+.5,ur.remainingBlockers=(8*Tt+mt)/9)}if(ur.updateStatus(),!Ie())return;setTimeout(ur.runner,0);return}if(Ie()){if(ur.currentFrameNumber=ur.currentFrameNumber+1|0,ur.timingMode==1&&ur.timingValue>1&&ur.currentFrameNumber%ur.timingValue!=0){ur.scheduler();return}else ur.timingMode==0&&(ur.tickStartTime=nd());ur.runIter(O),Ie()&&ur.scheduler()}}},ce||(B&&B>0?Or(0,1e3/B):Or(1,1),ur.scheduler()),X)throw"unwind"},ur={running:!1,scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],preMainLoop:[],postMainLoop:[],pause(){ur.scheduler=null,ur.currentlyRunningMainloop++},resume(){ur.currentlyRunningMainloop++;var O=ur.timingMode,B=ur.timingValue,X=ur.func;ur.func=null,Rt(X,0,!1,ur.arg,!0),Or(O,B),ur.scheduler()},updateStatus(){if(s.setStatus){var O=s.statusMessage||"Please wait...",B=ur.remainingBlockers??0,X=ur.expectedBlockers??0;B?B<X?s.setStatus("{message} ({expected - remaining}/{expected})"):s.setStatus(O):s.setStatus("")}},init(){s.preMainLoop&&ur.preMainLoop.push(s.preMainLoop),s.postMainLoop&&ur.postMainLoop.push(s.postMainLoop)},runIter(O){if(!T){for(var B of ur.preMainLoop)if(B()===!1)return;Nt(O);for(var X of ur.postMainLoop)X()}},nextRAF:0,fakeRequestAnimationFrame(O){var B=Date.now();if(ur.nextRAF===0)ur.nextRAF=B+1e3/60;else for(;B+2>=ur.nextRAF;)ur.nextRAF+=1e3/60;var X=Math.max(ur.nextRAF-B,0);setTimeout(O,X)},requestAnimationFrame(O){if(typeof requestAnimationFrame=="function"){requestAnimationFrame(O);return}var B=ur.fakeRequestAnimationFrame;B(O)}},so=O=>ur.requestAnimationFrame(()=>{Nt(O)}),qn=function(O,B,X){O>>>=0,B>>>=0;var re=()=>Ut(O)(B);X>=0?fr(re,X):so(re)},rl=()=>{ur.pause(),ur.func=null},rf=()=>{ct=!1,Ne=0},Vu=O=>{rf(),Je(O)},od=()=>!0,ad=()=>4294901760,yn=O=>{var B=C.buffer,X=(O-B.byteLength+65535)/65536|0;try{return C.grow(X),W(),1}catch{}};function Xo(O){O>>>=0;var B=w.length,X=ad();if(O>X)return!1;for(var re=1;re<=4;re*=2){var ce=B*(1+.2/re);ce=Math.min(ce,O+100663296);var Ae=Math.min(X,Ur(Math.max(O,ce),65536)),Ie=yn(Ae);if(Ie)return!0}return!1}function ro(O,B,X){O>>>=0;var re=Ut(O);Rt(re,B,X)}class Xn{constructor(){To(this,"allocated",[void 0]);To(this,"freelist",[])}get(B){return this.allocated[B]}has(B){return this.allocated[B]!==void 0}allocate(B){var X=this.freelist.pop()||this.allocated.length;return this.allocated[X]=B,X}free(B){this.allocated[B]=void 0,this.freelist.push(B)}}var Un={openDatabase(O,B,X,re){try{var ce=indexedDB.open(O,B)}catch(Ae){return re(Ae)}ce.onupgradeneeded=Ae=>{var Ie=Ae.target.result;Ie.objectStoreNames.contains("FILES")&&Ie.deleteObjectStore("FILES"),Ie.createObjectStore("FILES")},ce.onsuccess=Ae=>X(Ae.target.result),ce.onerror=re},init(){Un.xhrs=new Xn;var O=X=>{Un.dbInstance=X,Ee()},B=()=>{Un.dbInstance=!1,Ee()};Pe(),Un.openDatabase("emscripten_filesystem",1,O,B)}};function Ns(O,B,X,re,ce){var Ae=j[O+8>>>2>>>0];if(!Ae){X(O,0,"no url specified!");return}var Ie=ar(Ae),He=O+108,at=ar(He+0);at||(at="GET");var Tt=j[He+56>>>2>>>0],mt=j[He+68>>>2>>>0],Lt=j[He+72>>>2>>>0],or=j[He+76>>>2>>>0],er=j[He+80>>>2>>>0],pr=j[He+84>>>2>>>0],Ir=j[He+88>>>2>>>0],$r=j[He+52>>>2>>>0],ii=!!($r&1),Si=!!($r&2),Lr=!!($r&64),Qi=mt?ar(mt):void 0,Ri=Lt?ar(Lt):void 0,Gr=new XMLHttpRequest;if(Gr.withCredentials=!!w[He+60>>>0],Gr.open(at,Ie,!Lr,Qi,Ri),Lr||(Gr.timeout=Tt),Gr.url_=Ie,Gr.responseType="arraybuffer",er){var Pi=ar(er);Gr.overrideMimeType(Pi)}if(or)for(;;){var Ca=j[or>>>2>>>0];if(!Ca)break;var Bo=j[or+4>>>2>>>0];if(!Bo)break;or+=8;var go=ar(Ca),_s=ar(Bo);Gr.setRequestHeader(go,_s)}var rn=Un.xhrs.allocate(Gr);j[O>>>2>>>0]=rn;var Ps=pr&&Ir?w.slice(pr,pr+Ir):null;function ls(){var Sn=0,yu=0;Gr.response&&ii&&j[O+12>>>2>>>0]===0&&(yu=Gr.response.byteLength),yu>0&&(Sn=Ws(yu),w.set(new Uint8Array(Gr.response),Sn>>>0)),j[O+12>>>2>>>0]=Sn,La(O+16,yu),La(O+24,0);var ka=Gr.response?Gr.response.byteLength:0;ka&&La(O+32,ka),L[O+40>>>1>>>0]=Gr.readyState,L[O+42>>>1>>>0]=Gr.status,Gr.statusText&&Ti(Gr.statusText,O+44,64)}Gr.onload=Sn=>{Un.xhrs.has(rn)&&(ls(),Gr.status>=200&&Gr.status<300?B==null||B(O,Gr,Sn):X==null||X(O,Gr,Sn))},Gr.onerror=Sn=>{Un.xhrs.has(rn)&&(ls(),X==null||X(O,Gr,Sn))},Gr.ontimeout=Sn=>{Un.xhrs.has(rn)&&(X==null||X(O,Gr,Sn))},Gr.onprogress=Sn=>{if(Un.xhrs.has(rn)){var yu=ii&&Si&&Gr.response?Gr.response.byteLength:0,ka=0;yu>0&&ii&&Si&&(ka=Ws(yu),w.set(new Uint8Array(Gr.response),ka>>>0)),j[O+12>>>2>>>0]=ka,La(O+16,yu),La(O+24,Sn.loaded-yu),La(O+32,Sn.total),L[O+40>>>1>>>0]=Gr.readyState,Gr.readyState>=3&&Gr.status===0&&Sn.loaded>0&&(Gr.status=200),L[O+42>>>1>>>0]=Gr.status,Gr.statusText&&Ti(Gr.statusText,O+44,64),re==null||re(O,Gr,Sn),ka&&qa(ka)}},Gr.onreadystatechange=Sn=>{Un.xhrs.has(rn)&&(L[O+40>>>1>>>0]=Gr.readyState,Gr.readyState>=2&&(L[O+42>>>1>>>0]=Gr.status),ce==null||ce(O,Gr,Sn))};try{Gr.send(Ps)}catch(Sn){X==null||X(O,Gr,Sn)}}var La=(O,B)=>{j[O>>>2>>>0]=B;var X=j[O>>>2>>>0];j[O+4>>>2>>>0]=(B-X)/4294967296};function sd(O,B,X,re,ce){if(!O){ce(B,0,"IndexedDB not available!");return}var Ae=B+108,Ie=j[Ae+64>>>2>>>0];Ie||(Ie=j[B+8>>>2>>>0]);var He=ar(Ie);try{var at=O.transaction(["FILES"],"readwrite"),Tt=at.objectStore("FILES"),mt=Tt.put(X,He);mt.onsuccess=Lt=>{L[B+40>>>1>>>0]=4,L[B+42>>>1>>>0]=200,Ti("OK",B+44,64),re(B,0,He)},mt.onerror=Lt=>{L[B+40>>>1>>>0]=4,L[B+42>>>1>>>0]=413,Ti("Payload Too Large",B+44,64),ce(B,0,Lt)}}catch(Lt){ce(B,0,Lt)}}function Tr(O,B,X,re){if(!O){re(B,0,"IndexedDB not available!");return}var ce=B+108,Ae=j[ce+64>>>2>>>0];Ae||(Ae=j[B+8>>>2>>>0]);var Ie=ar(Ae);try{var He=O.transaction(["FILES"],"readonly"),at=He.objectStore("FILES"),Tt=at.get(Ie);Tt.onsuccess=mt=>{if(mt.target.result){var Lt=mt.target.result,or=Lt.byteLength||Lt.length,er=Ws(or);w.set(new Uint8Array(Lt),er>>>0),j[B+12>>>2>>>0]=er,La(B+16,or),La(B+24,0),La(B+32,or),L[B+40>>>1>>>0]=4,L[B+42>>>1>>>0]=200,Ti("OK",B+44,64),X(B,0,Lt)}else L[B+40>>>1>>>0]=4,L[B+42>>>1>>>0]=404,Ti("Not Found",B+44,64),re(B,0,"no data")},Tt.onerror=mt=>{L[B+40>>>1>>>0]=4,L[B+42>>>1>>>0]=404,Ti("Not Found",B+44,64),re(B,0,mt)}}catch(mt){re(B,0,mt)}}function ld(O,B,X,re){if(!O){re(B,0,"IndexedDB not available!");return}var ce=B+108,Ae=j[ce+64>>>2>>>0];Ae||(Ae=j[B+8>>>2>>>0]);var Ie=ar(Ae);try{var He=O.transaction(["FILES"],"readwrite"),at=He.objectStore("FILES"),Tt=at.delete(Ie);Tt.onsuccess=mt=>{var Lt=mt.target.result;j[B+12>>>2>>>0]=0,La(B+16,0),La(B+24,0),La(B+32,0),L[B+40>>>1>>>0]=4,L[B+42>>>1>>>0]=200,Ti("OK",B+44,64),X(B,0,Lt)},Tt.onerror=mt=>{L[B+40>>>1>>>0]=4,L[B+42>>>1>>>0]=404,Ti("Not Found",B+44,64),re(B,0,mt)}}catch(mt){re(B,0,mt)}}function Lh(O,B,X,re,ce){O>>>=0;var Ae=O+108,Ie=j[Ae+36>>>2>>>0],He=j[Ae+40>>>2>>>0],at=j[Ae+44>>>2>>>0],Tt=j[Ae+48>>>2>>>0],mt=j[Ae+52>>>2>>>0],Lt=!!(mt&64);function or(go){Lt?go():Nt(go)}var er=(go,_s,rn)=>{or(()=>{Ie?Ut(Ie)(go):B==null||B(go)})},pr=(go,_s,rn)=>{or(()=>{at?Ut(at)(go):re==null||re(go)})},Ir=(go,_s,rn)=>{or(()=>{He?Ut(He)(go):X==null||X(go)})},$r=(go,_s,rn)=>{or(()=>{Tt?Ut(Tt)(go):ce==null||ce(go)})},ii=(go,_s,rn)=>{Ns(go,er,Ir,pr,$r)},Si=(go,_s,rn)=>{var Ps=(Sn,yu,ka)=>{or(()=>{Ie?Ut(Ie)(Sn):B==null||B(Sn)})},ls=(Sn,yu,ka)=>{or(()=>{Ie?Ut(Ie)(Sn):B==null||B(Sn)})};sd(Un.dbInstance,go,_s.response,Ps,ls)},Lr=(go,_s,rn)=>{Ns(go,Si,Ir,pr,$r)},Qi=ar(Ae+0),Ri=!!(mt&16),Gr=!!(mt&4),Pi=!!(mt&32);if(Qi==="EM_IDB_STORE"){var Ca=j[Ae+84>>>2>>>0],Bo=j[Ae+88>>>2>>>0];sd(Un.dbInstance,O,w.slice(Ca,Ca+Bo),er,Ir)}else if(Qi==="EM_IDB_DELETE")ld(Un.dbInstance,O,er,Ir);else if(!Ri)Tr(Un.dbInstance,O,er,Pi?Ir:Gr?Lr:ii);else if(!Pi)Ns(O,Gr?Si:er,Ir,pr,$r);else return 0;return O}var Er,Ip=O=>{var B=O.getExtension("ANGLE_instanced_arrays");if(B)return O.vertexAttribDivisor=(X,re)=>B.vertexAttribDivisorANGLE(X,re),O.drawArraysInstanced=(X,re,ce,Ae)=>B.drawArraysInstancedANGLE(X,re,ce,Ae),O.drawElementsInstanced=(X,re,ce,Ae,Ie)=>B.drawElementsInstancedANGLE(X,re,ce,Ae,Ie),1},Hf=O=>{var B=O.getExtension("OES_vertex_array_object");if(B)return O.createVertexArray=()=>B.createVertexArrayOES(),O.deleteVertexArray=X=>B.deleteVertexArrayOES(X),O.bindVertexArray=X=>B.bindVertexArrayOES(X),O.isVertexArray=X=>B.isVertexArrayOES(X),1},Hu=O=>{var B=O.getExtension("WEBGL_draw_buffers");if(B)return O.drawBuffers=(X,re)=>B.drawBuffersWEBGL(X,re),1},Ng=O=>!!(O.dibvbi=O.getExtension("WEBGL_draw_instanced_base_vertex_base_instance")),Wa=O=>!!(O.mdibvbi=O.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance")),Uu=O=>!!(O.extPolygonOffsetClamp=O.getExtension("EXT_polygon_offset_clamp")),il=O=>!!(O.extClipControl=O.getExtension("EXT_clip_control")),Sr=O=>!!(O.webglPolygonMode=O.getExtension("WEBGL_polygon_mode")),mn=O=>!!(O.multiDrawWebgl=O.getExtension("WEBGL_multi_draw")),Pc=O=>{var B=["ANGLE_instanced_arrays","EXT_blend_minmax","EXT_disjoint_timer_query","EXT_frag_depth","EXT_shader_texture_lod","EXT_sRGB","OES_element_index_uint","OES_fbo_render_mipmap","OES_standard_derivatives","OES_texture_float","OES_texture_half_float","OES_texture_half_float_linear","OES_vertex_array_object","WEBGL_color_buffer_float","WEBGL_depth_texture","WEBGL_draw_buffers","EXT_color_buffer_float","EXT_conservative_depth","EXT_disjoint_timer_query_webgl2","EXT_texture_norm16","NV_shader_noperspective_interpolation","WEBGL_clip_cull_distance","EXT_clip_control","EXT_color_buffer_half_float","EXT_depth_clamp","EXT_float_blend","EXT_polygon_offset_clamp","EXT_texture_compression_bptc","EXT_texture_compression_rgtc","EXT_texture_filter_anisotropic","KHR_parallel_shader_compile","OES_texture_float_linear","WEBGL_blend_func_extended","WEBGL_compressed_texture_astc","WEBGL_compressed_texture_etc","WEBGL_compressed_texture_etc1","WEBGL_compressed_texture_s3tc","WEBGL_compressed_texture_s3tc_srgb","WEBGL_debug_renderer_info","WEBGL_debug_shaders","WEBGL_lose_context","WEBGL_multi_draw","WEBGL_polygon_mode"];return(O.getSupportedExtensions()||[]).filter(X=>B.includes(X))},yr={counter:1,buffers:[],programs:[],framebuffers:[],renderbuffers:[],textures:[],shaders:[],vaos:[],contexts:[],offscreenCanvases:{},queries:[],samplers:[],transformFeedbacks:[],syncs:[],stringCache:{},stringiCache:{},unpackAlignment:4,unpackRowLength:0,recordError:O=>{yr.lastError||(yr.lastError=O)},getNewId:O=>{for(var B=yr.counter++,X=O.length;X<B;X++)O[X]=null;return B},genObject:(O,B,X,re)=>{for(var ce=0;ce<O;ce++){var Ae=Er[X](),Ie=Ae&&yr.getNewId(re);Ae?(Ae.name=Ie,re[Ie]=Ae):yr.recordError(1282),D[B+ce*4>>>2>>>0]=Ie}},getSource:(O,B,X,re)=>{for(var ce="",Ae=0;Ae<B;++Ae){var Ie=re?j[re+Ae*4>>>2>>>0]:void 0;ce+=ar(j[X+Ae*4>>>2>>>0],Ie)}return ce},createContext:(O,B)=>{var X=B.majorVersion>1?O.getContext("webgl2",B):O.getContext("webgl",B);if(!X)return 0;var re=yr.registerContext(X,B);return re},registerContext:(O,B)=>{var X=yr.getNewId(yr.contexts),re={handle:X,attributes:B,version:B.majorVersion,GLctx:O};return O.canvas&&(O.canvas.GLctxObject=re),yr.contexts[X]=re,(typeof B.enableExtensionsByDefault>"u"||B.enableExtensionsByDefault)&&yr.initExtensions(re),X},makeContextCurrent:O=>{var B;return yr.currentContext=yr.contexts[O],s.ctx=Er=(B=yr.currentContext)==null?void 0:B.GLctx,!(O&&!Er)},getContext:O=>yr.contexts[O],deleteContext:O=>{yr.currentContext===yr.contexts[O]&&(yr.currentContext=null),typeof un=="object"&&un.removeAllHandlersOnTarget(yr.contexts[O].GLctx.canvas),yr.contexts[O]&&yr.contexts[O].GLctx.canvas&&(yr.contexts[O].GLctx.canvas.GLctxObject=void 0),yr.contexts[O]=null},initExtensions:O=>{if(O||(O=yr.currentContext),!O.initExtensionsDone){O.initExtensionsDone=!0;var B=O.GLctx;mn(B),Uu(B),il(B),Sr(B),Ip(B),Hf(B),Hu(B),Ng(B),Wa(B),O.version>=2&&(B.disjointTimerQueryExt=B.getExtension("EXT_disjoint_timer_query_webgl2")),(O.version<2||!B.disjointTimerQueryExt)&&(B.disjointTimerQueryExt=B.getExtension("EXT_disjoint_timer_query")),Pc(B).forEach(X=>{!X.includes("lose_context")&&!X.includes("debug")&&B.getExtension(X)})}}},un={memcpy(O,B,X){A.set(A.subarray(B>>>0,B+X>>>0),O>>>0)},removeAllEventListeners(){for(;un.eventHandlers.length;)un._removeHandler(un.eventHandlers.length-1);un.deferredCalls=[]},inEventHandler:0,deferredCalls:[],deferCall(O,B,X){function re(Ae,Ie){if(Ae.length!=Ie.length)return!1;for(var He in Ae)if(Ae[He]!=Ie[He])return!1;return!0}for(var ce of un.deferredCalls)if(ce.targetFunction==O&&re(ce.argsList,X))return;un.deferredCalls.push({targetFunction:O,precedence:B,argsList:X}),un.deferredCalls.sort((Ae,Ie)=>Ae.precedence<Ie.precedence)},removeDeferredCalls(O){un.deferredCalls=un.deferredCalls.filter(B=>B.targetFunction!=O)},canPerformEventHandlerRequests(){return navigator.userActivation?navigator.userActivation.isActive:un.inEventHandler&&un.currentEventHandler.allowsDeferredCalls},runDeferredCalls(){if(un.canPerformEventHandlerRequests()){var O=un.deferredCalls;un.deferredCalls=[];for(var B of O)B.targetFunction(...B.argsList)}},eventHandlers:[],removeAllHandlersOnTarget:(O,B)=>{for(var X=0;X<un.eventHandlers.length;++X)un.eventHandlers[X].target==O&&(!B||B==un.eventHandlers[X].eventTypeString)&&un._removeHandler(X--)},_removeHandler(O){var B=un.eventHandlers[O];B.target.removeEventListener(B.eventTypeString,B.eventListenerFunc,B.useCapture),un.eventHandlers.splice(O,1)},registerOrRemoveHandler(O){if(!O.target)return-4;if(O.callbackfunc)O.eventListenerFunc=function(X){++un.inEventHandler,un.currentEventHandler=O,un.runDeferredCalls(),O.handlerFunc(X),un.runDeferredCalls(),--un.inEventHandler},O.target.addEventListener(O.eventTypeString,O.eventListenerFunc,O.useCapture),un.eventHandlers.push(O);else for(var B=0;B<un.eventHandlers.length;++B)un.eventHandlers[B].target==O.target&&un.eventHandlers[B].eventTypeString==O.eventTypeString&&un._removeHandler(B--);return 0},getNodeNameForTarget(O){return O?O==window?"#window":O==screen?"#screen":(O==null?void 0:O.nodeName)||"":""},fullscreenEnabled(){return document.fullscreenEnabled||document.webkitFullscreenEnabled}},Uf=["default","low-power","high-performance"],Fg=O=>O>2?ar(O):O,Fs=[0,document,window],nf=O=>{O=Fg(O);var B=Fs[O]||document.querySelector(O);return B},of=nf;function Ko(O,B){O>>>=0,B>>>=0;var X=B>>>2,re=D[X+2>>>0],ce={alpha:!!A[B+0>>>0],depth:!!A[B+1>>>0],stencil:!!A[B+2>>>0],antialias:!!A[B+3>>>0],premultipliedAlpha:!!A[B+4>>>0],preserveDrawingBuffer:!!A[B+5>>>0],powerPreference:Uf[re],failIfMajorPerformanceCaveat:!!A[B+12>>>0],majorVersion:D[X+4>>>0],minorVersion:D[X+5>>>0],enableExtensionsByDefault:A[B+24>>>0],explicitSwapControl:A[B+25>>>0],proxyContextToMainThread:D[X+7>>>0],renderViaOffscreenBackBuffer:A[B+32>>>0]},Ae=of(O);if(!Ae||ce.explicitSwapControl)return 0;var Ie=yr.createContext(Ae,ce);return Ie}var pa=Ko;function js(){return yr.currentContext?yr.currentContext.handle:0}var Cl=js;function nl(O){O>>>=0;var B=yr.makeContextCurrent(O);return B?0:-5}var Tl={},xl=()=>h||"./this.program",Ga=()=>{if(!Ga.strings){var O=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",B={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:O,_:xl()};for(var X in Tl)Tl[X]===void 0?delete B[X]:B[X]=Tl[X];var re=[];for(var X in B)re.push(`${X}=${B[X]}`);Ga.strings=re}return Ga.strings},kh=(O,B)=>{for(var X=0;X<O.length;++X)A[B++>>>0]=O.charCodeAt(X);A[B>>>0]=0},Cc=function(O,B){O>>>=0,B>>>=0;var X=0;return Ga().forEach((re,ce)=>{var Ae=B+X;j[O+ce*4>>>2>>>0]=Ae,kh(re,Ae),X+=re.length+1}),0},ud=function(O,B){O>>>=0,B>>>=0;var X=Ga();j[O>>>2>>>0]=X.length;var re=0;return X.forEach(ce=>re+=ce.length+1),j[B>>>2>>>0]=re,0};function af(O){try{var B=Bt.getStreamFromFD(O);return ue.close(B),0}catch(X){if(typeof ue>"u"||X.name!=="ErrnoError")throw X;return X.errno}}var ga=(O,B,X,re)=>{for(var ce=0,Ae=0;Ae<X;Ae++){var Ie=j[B>>>2>>>0],He=j[B+4>>>2>>>0];B+=8;var at=ue.read(O,A,Ie,He,re);if(at<0)return-1;if(ce+=at,at<He)break}return ce};function zn(O,B,X,re){B>>>=0,X>>>=0,re>>>=0;try{var ce=Bt.getStreamFromFD(O),Ae=ga(ce,B,X);return j[re>>>2>>>0]=Ae,0}catch(Ie){if(typeof ue>"u"||Ie.name!=="ErrnoError")throw Ie;return Ie.errno}}function bn(O,B,X,re,ce){var Ae=Vt(B,X);ce>>>=0;try{if(isNaN(Ae))return 61;var Ie=Bt.getStreamFromFD(O);return ue.llseek(Ie,Ae,re),rt=[Ie.position>>>0,(qe=Ie.position,+Math.abs(qe)>=1?qe>0?+Math.floor(qe/4294967296)>>>0:~~+Math.ceil((qe-+(~~qe>>>0))/4294967296)>>>0:0)],D[ce>>>2>>>0]=rt[0],D[ce+4>>>2>>>0]=rt[1],Ie.getdents&&Ae===0&&re===0&&(Ie.getdents=null),0}catch(He){if(typeof ue>"u"||He.name!=="ErrnoError")throw He;return He.errno}}var Tc=(O,B,X,re)=>{for(var ce=0,Ae=0;Ae<X;Ae++){var Ie=j[B>>>2>>>0],He=j[B+4>>>2>>>0];B+=8;var at=ue.write(O,A,Ie,He,re);if(at<0)return-1;if(ce+=at,at<He)break}return ce};function El(O,B,X,re){B>>>=0,X>>>=0,re>>>=0;try{var ce=Bt.getStreamFromFD(O),Ae=Tc(ce,B,X);return j[re>>>2>>>0]=Ae,0}catch(Ie){if(typeof ue>"u"||Ie.name!=="ErrnoError")throw Ie;return Ie.errno}}var Np=O=>Er.activeTexture(O),xc=(O,B)=>{Er.attachShader(yr.programs[O],yr.shaders[B])};function zf(O,B,X){X>>>=0,Er.bindAttribLocation(yr.programs[O],B,ar(X))}var sf=(O,B)=>{O==35051?Er.currentPixelPackBufferBinding=B:O==35052&&(Er.currentPixelUnpackBufferBinding=B),Er.bindBuffer(O,yr.buffers[B])},cd=(O,B,X)=>{Er.bindBufferBase(O,B,yr.buffers[X])},et=(O,B)=>{Er.bindFramebuffer(O,yr.framebuffers[B])},Ec=(O,B)=>{Er.bindTexture(O,yr.textures[B])},Ac=(O,B,X,re)=>Er.blendColor(O,B,X,re),Bs=O=>Er.blendEquation(O),$i=(O,B,X,re)=>Er.blendFuncSeparate(O,B,X,re);function zu(O,B,X,re){B>>>=0,X>>>=0,Er.bufferData(O,X?w.subarray(X>>>0,X+B>>>0):B,re)}function wc(O,B,X,re){B>>>=0,X>>>=0,re>>>=0,Er.bufferSubData(O,B,w.subarray(re>>>0,re+X>>>0))}var Wu=O=>Er.checkFramebufferStatus(O),Gu=O=>Er.clear(O),Fp=(O,B,X,re)=>Er.clearColor(O,B,X,re),lf=(O,B,X,re)=>{Er.colorMask(!!O,!!B,!!X,!!re)},Ih=O=>{Er.compileShader(yr.shaders[O])};function dd(O,B,X,re,ce,Ae,Ie,He){if(He>>>=0,yr.currentContext.version>=2&&(Er.currentPixelUnpackBufferBinding||!Ie)){Er.compressedTexImage2D(O,B,X,re,ce,Ae,Ie,He);return}Er.compressedTexImage2D(O,B,X,re,ce,Ae,w.subarray(He>>>0,He+Ie>>>0))}var Ya=()=>{var O=yr.getNewId(yr.programs),B=Er.createProgram();return B.name=O,B.maxUniformLength=B.maxAttributeLength=B.maxUniformBlockNameLength=0,B.uniformIdCounter=1,yr.programs[O]=B,O},Al=O=>{var B=yr.getNewId(yr.shaders);return yr.shaders[B]=Er.createShader(O),B},jg=O=>Er.cullFace(O);function py(O,B){B>>>=0;for(var X=0;X<O;X++){var re=D[B+X*4>>>2>>>0],ce=yr.buffers[re];ce&&(Er.deleteBuffer(ce),ce.name=0,yr.buffers[re]=null,re==Er.currentPixelPackBufferBinding&&(Er.currentPixelPackBufferBinding=0),re==Er.currentPixelUnpackBufferBinding&&(Er.currentPixelUnpackBufferBinding=0))}}function gy(O,B){B>>>=0;for(var X=0;X<O;++X){var re=D[B+X*4>>>2>>>0],ce=yr.framebuffers[re];ce&&(Er.deleteFramebuffer(ce),ce.name=0,yr.framebuffers[re]=null)}}var vy=O=>{if(O){var B=yr.programs[O];if(!B){yr.recordError(1281);return}Er.deleteProgram(B),B.name=0,yr.programs[O]=null}};function va(O,B){B>>>=0;for(var X=0;X<O;X++){var re=D[B+X*4>>>2>>>0],ce=yr.renderbuffers[re];ce&&(Er.deleteRenderbuffer(ce),ce.name=0,yr.renderbuffers[re]=null)}}var Kl=O=>{if(O){var B=yr.shaders[O];if(!B){yr.recordError(1281);return}Er.deleteShader(B),yr.shaders[O]=null}};function Wf(O,B){B>>>=0;for(var X=0;X<O;X++){var re=D[B+X*4>>>2>>>0],ce=yr.textures[re];ce&&(Er.deleteTexture(ce),ce.name=0,yr.textures[re]=null)}}var Gf=O=>Er.depthFunc(O),jp=O=>{Er.depthMask(!!O)},uf=(O,B)=>{Er.detachShader(yr.programs[O],yr.shaders[B])},cf=O=>Er.disable(O),fd=O=>{Er.disableVertexAttribArray(O)},Bg=(O,B,X)=>{Er.drawArrays(O,B,X)};function yy(O,B,X,re){re>>>=0,Er.drawElements(O,B,X,re)}function wl(O,B,X,re,ce){re>>>=0,Er.drawElementsInstanced(O,B,X,re,ce)}var hd=O=>Er.enable(O),Bp=O=>{Er.enableVertexAttribArray(O)},Nh=(O,B,X,re,ce)=>{Er.framebufferTexture2D(O,B,X,yr.textures[re],ce)},Vg=O=>Er.frontFace(O);function df(O,B){B>>>=0,yr.genObject(O,B,"createBuffer",yr.buffers)}function Fh(O,B){B>>>=0,yr.genObject(O,B,"createFramebuffer",yr.framebuffers)}function Yf(O,B){B>>>=0,yr.genObject(O,B,"createTexture",yr.textures)}var $f=O=>Er.generateMipmap(O),Hg=(O,B,X,re,ce,Ae,Ie,He)=>{B=yr.programs[B];var at=Er[O](B,X);if(at){var Tt=He&&Ti(at.name,He,re);ce&&(D[ce>>>2>>>0]=Tt),Ae&&(D[Ae>>>2>>>0]=at.size),Ie&&(D[Ie>>>2>>>0]=at.type)}};function jh(O,B,X,re,ce,Ae,Ie){return re>>>=0,ce>>>=0,Ae>>>=0,Ie>>>=0,Hg("getActiveUniform",O,B,X,re,ce,Ae,Ie)}var Ol=()=>{var O=Pc(Er);return O=O.concat(O.map(B=>"GL_"+B)),O},pu=(O,B,X)=>{if(!B){yr.recordError(1281);return}var re=void 0;switch(O){case 36346:re=1;break;case 36344:return;case 34814:case 36345:re=0;break;case 34466:var ce=Er.getParameter(34467);re=ce?ce.length:0;break;case 33309:if(yr.currentContext.version<2){yr.recordError(1282);return}re=Ol().length;break;case 33307:case 33308:if(yr.currentContext.version<2){yr.recordError(1280);return}re=O==33307?3:0;break}if(re===void 0){var Ae=Er.getParameter(O);switch(typeof Ae){case"number":re=Ae;break;case"boolean":re=Ae?1:0;break;case"string":yr.recordError(1280);return;case"object":if(Ae===null)switch(O){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 36662:case 36663:case 35053:case 35055:case 36010:case 35097:case 35869:case 32874:case 36389:case 35983:case 35368:case 34068:{re=0;break}default:{yr.recordError(1280);return}}else if(Ae instanceof Float32Array||Ae instanceof Uint32Array||Ae instanceof Int32Array||Ae instanceof Array){for(var Ie=0;Ie<Ae.length;++Ie)switch(X){case 0:D[B+Ie*4>>>2>>>0]=Ae[Ie];break;case 2:N[B+Ie*4>>>2>>>0]=Ae[Ie];break;case 4:A[B+Ie>>>0]=Ae[Ie]?1:0;break}return}else try{re=Ae.name|0}catch(He){yr.recordError(1280),S(`GL_INVALID_ENUM in glGet${X}v: Unknown object returned from WebGL getParameter(${O})! (error: ${He})`);return}break;default:yr.recordError(1280),S(`GL_INVALID_ENUM in glGet${X}v: Native code calling glGet${X}v(${O}) and it returns ${Ae} of type ${typeof Ae}!`);return}}switch(X){case 1:La(B,re);break;case 0:D[B>>>2>>>0]=re;break;case 2:N[B>>>2>>>0]=re;break;case 4:A[B>>>0]=re?1:0;break}};function Ug(O,B){return B>>>=0,pu(O,B,0)}function Vp(O,B,X,re){X>>>=0,re>>>=0;var ce=Er.getProgramInfoLog(yr.programs[O]);ce===null&&(ce="(unknown error)");var Ae=B>0&&re?Ti(ce,re,B):0;X&&(D[X>>>2>>>0]=Ae)}function Yu(O,B,X){if(X>>>=0,!X){yr.recordError(1281);return}if(O>=yr.counter){yr.recordError(1281);return}if(O=yr.programs[O],B==35716){var re=Er.getProgramInfoLog(O);re===null&&(re="(unknown error)"),D[X>>>2>>>0]=re.length+1}else if(B==35719){if(!O.maxUniformLength)for(var ce=Er.getProgramParameter(O,35718),Ae=0;Ae<ce;++Ae)O.maxUniformLength=Math.max(O.maxUniformLength,Er.getActiveUniform(O,Ae).name.length+1);D[X>>>2>>>0]=O.maxUniformLength}else if(B==35722){if(!O.maxAttributeLength)for(var Ie=Er.getProgramParameter(O,35721),Ae=0;Ae<Ie;++Ae)O.maxAttributeLength=Math.max(O.maxAttributeLength,Er.getActiveAttrib(O,Ae).name.length+1);D[X>>>2>>>0]=O.maxAttributeLength}else if(B==35381){if(!O.maxUniformBlockNameLength)for(var He=Er.getProgramParameter(O,35382),Ae=0;Ae<He;++Ae)O.maxUniformBlockNameLength=Math.max(O.maxUniformBlockNameLength,Er.getActiveUniformBlockName(O,Ae).length+1);D[X>>>2>>>0]=O.maxUniformBlockNameLength}else D[X>>>2>>>0]=Er.getProgramParameter(O,B)}function ol(O,B,X,re){X>>>=0,re>>>=0;var ce=Er.getShaderInfoLog(yr.shaders[O]);ce===null&&(ce="(unknown error)");var Ae=B>0&&re?Ti(ce,re,B):0;X&&(D[X>>>2>>>0]=Ae)}function ff(O,B,X){if(X>>>=0,!X){yr.recordError(1281);return}if(B==35716){var re=Er.getShaderInfoLog(yr.shaders[O]);re===null&&(re="(unknown error)");var ce=re?re.length+1:0;D[X>>>2>>>0]=ce}else if(B==35720){var Ae=Er.getShaderSource(yr.shaders[O]),Ie=Ae?Ae.length+1:0;D[X>>>2>>>0]=Ie}else D[X>>>2>>>0]=Er.getShaderParameter(yr.shaders[O],B)}var Vs=O=>{var B=Qt(O)+1,X=Ws(B);return X&&Ti(O,X,B),X};function ss(O){var B=yr.stringCache[O];if(!B){switch(O){case 7939:B=Vs(Ol().join(" "));break;case 7936:case 7937:case 37445:case 37446:var X=Er.getParameter(O);X||yr.recordError(1280),B=X?Vs(X):0;break;case 7938:var re=Er.getParameter(7938),ce=`OpenGL ES 2.0 (${re})`;yr.currentContext.version>=2&&(ce=`OpenGL ES 3.0 (${re})`),B=Vs(ce);break;case 35724:var Ae=Er.getParameter(35724),Ie=/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/,He=Ae.match(Ie);He!==null&&(He[1].length==3&&(He[1]=He[1]+"0"),Ae=`OpenGL ES GLSL ES ${He[1]} (${Ae})`),B=Vs(Ae);break;default:yr.recordError(1280)}yr.stringCache[O]=B}return B}function zg(O,B){return B>>>=0,Er.getUniformBlockIndex(yr.programs[O],ar(B))}var Oc=O=>parseInt(O),Bh=O=>O.slice(-1)=="]"&&O.lastIndexOf("["),Dl=O=>{var B=O.uniformLocsById,X=O.uniformSizeAndIdsByName,re,ce;if(!B){O.uniformLocsById=B={},O.uniformArrayNamesById={};var Ae=Er.getProgramParameter(O,35718);for(re=0;re<Ae;++re){var Ie=Er.getActiveUniform(O,re),He=Ie.name,at=Ie.size,Tt=Bh(He),mt=Tt>0?He.slice(0,Tt):He,Lt=O.uniformIdCounter;for(O.uniformIdCounter+=at,X[mt]=[at,Lt],ce=0;ce<at;++ce)B[Lt]=ce,O.uniformArrayNamesById[Lt++]=mt}}};function gu(O,B){if(B>>>=0,B=ar(B),O=yr.programs[O]){Dl(O);var X=O.uniformLocsById,re=0,ce=B,Ae=Bh(B);Ae>0&&(re=Oc(B.slice(Ae+1))>>>0,ce=B.slice(0,Ae));var Ie=O.uniformSizeAndIdsByName[ce];if(Ie&&re<Ie[0]&&(re+=Ie[1],X[re]=X[re]||Er.getUniformLocation(O,B)))return re}else yr.recordError(1281);return-1}var Vh=O=>{O=yr.programs[O],Er.linkProgram(O),O.uniformLocsById=0,O.uniformSizeAndIdsByName={}},Dc=(O,B)=>{O==3317?yr.unpackAlignment=B:O==3314&&(yr.unpackRowLength=B),Er.pixelStorei(O,B)},Rl=(O,B,X)=>{function re(Ie,He){return Ie+He-1&-He}var ce=(yr.unpackRowLength||O)*X,Ae=re(ce,yr.unpackAlignment);return B*Ae},hf=O=>{var B={5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4};return B[O-6402]||1},Hh=O=>(O-=5120,O==0?A:O==1?w:O==2?L:O==4?D:O==6?N:O==5||O==28922||O==28520||O==30779||O==30782?j:k),ya=(O,B)=>O>>>31-Math.clz32(B.BYTES_PER_ELEMENT),Rc=(O,B,X,re,ce,Ae)=>{var Ie=Hh(O),He=hf(B)*Ie.BYTES_PER_ELEMENT,at=Rl(X,re,He);return Ie.subarray(ya(ce,Ie)>>>0,ya(ce+at,Ie)>>>0)};function pf(O,B,X,re,ce,Ae,Ie){if(Ie>>>=0,yr.currentContext.version>=2&&Er.currentPixelPackBufferBinding){Er.readPixels(O,B,X,re,ce,Ae,Ie);return}var He=Rc(Ae,ce,X,re,Ie);if(!He){yr.recordError(1280);return}Er.readPixels(O,B,X,re,ce,Ae,He)}var Zl=(O,B,X,re)=>Er.scissor(O,B,X,re);function Uh(O,B,X,re){X>>>=0,re>>>=0;var ce=yr.getSource(O,B,X,re);Er.shaderSource(yr.shaders[O],ce)}function $u(O,B,X,re,ce,Ae,Ie,He,at){if(at>>>=0,yr.currentContext.version>=2&&Er.currentPixelUnpackBufferBinding){Er.texImage2D(O,B,X,re,ce,Ae,Ie,He,at);return}var Tt=at?Rc(He,Ie,re,ce,at):null;Er.texImage2D(O,B,X,re,ce,Ae,Ie,He,Tt)}var vu=(O,B,X)=>Er.texParameteri(O,B,X),Hp=O=>{var B=Er.currentProgram;if(B){var X=B.uniformLocsById[O];return typeof X=="number"&&(B.uniformLocsById[O]=X=Er.getUniformLocation(B,B.uniformArrayNamesById[O]+(X>0?`[${X}]`:""))),X}else yr.recordError(1282)},$a=(O,B)=>{Er.uniform1i(Hp(O),B)},qf=(O,B,X)=>{O=yr.programs[O],Er.uniformBlockBinding(O,B,X)},al=O=>{O=yr.programs[O],Er.useProgram(O),Er.currentProgram=O},Hs=(O,B)=>{Er.vertexAttribDivisor(O,B)};function qu(O,B,X,re,ce,Ae){Ae>>>=0,Er.vertexAttribPointer(O,B,X,!!re,ce,Ae)}var gf=(O,B,X,re)=>Er.viewport(O,B,X,re),zh=O=>Ku(O),Us=O=>{var B=Qt(O)+1,X=zh(B);return Ti(O,X,B),X},Ss=O=>{var B=s["_"+O];return B},na=(O,B)=>{A.set(O,B>>>0)},po=(O,B,X,re,ce)=>{var Ae={string:pr=>{var Ir=0;return pr!=null&&pr!==0&&(Ir=Us(pr)),Ir},array:pr=>{var Ir=zh(pr.length);return na(pr,Ir),Ir}};function Ie(pr){return B==="string"?ar(pr):B==="boolean"?!!pr:pr}var He=Ss(O),at=[],Tt=0;if(re)for(var mt=0;mt<re.length;mt++){var Lt=Ae[X[mt]];Lt?(Tt===0&&(Tt=Et()),at[mt]=Lt(re[mt])):at[mt]=re[mt]}var or=He(...at);function er(pr){return Tt!==0&&Qe(Tt),Ie(pr)}return or=er(or),or},zs=(O,B,X,re)=>{var ce=!X||X.every(Ie=>Ie==="number"||Ie==="boolean"),Ae=B!=="string";return Ae&&ce&&!re?Ss(O):(...Ie)=>po(O,B,X,Ie)};ue.createPreloadedFile=fn,ue.staticInit(),Xt.doesNotExistError=new ue.ErrnoError(44),Xt.doesNotExistError.stack="<generic error, no stack>",ti=s.BindingError=class extends Error{constructor(B){super(B),this.name="BindingError"}},wa(),fe=s.PureVirtualError=te(Error,"PureVirtualError"),Ue(),uu=s.InternalError=class extends Error{constructor(B){super(B),this.name="InternalError"}},yc(),Ze(),Ci=s.UnboundTypeError=te(Error,"UnboundTypeError"),s.requestAnimationFrame=ur.requestAnimationFrame,s.pauseMainLoop=ur.pause,s.resumeMainLoop=ur.resume,ur.init(),Un.init();var bi={f:lr,U:Ar,ib:br,jb:Br,gb:ai,lb:Nn,_:vc,Za:Ls,Y:ks,d:za,e:os,g:Rp,a:as,c:bc,W:Jc,h:fu,b:kf,H:Mp,j:Lp,o:_c,k:Zd,X:Dh,D:Fu,Z:Rh,Ca:ju,bb:bs,t:jf,aa:Da,s:Ra,$:Ma,v:Bf,Wa:tf,db:kp,Ya:ze,K:Ce,ba:qn,wa:rl,kb:Mh,mb:Vu,Sa:od,cb:Xo,na:ro,La:Lh,J:pa,ha:Cl,I:nl,eb:Cc,fb:ud,V:af,hb:zn,Xa:bn,T:El,ca:xt,ra:Np,P:xc,l:zf,m:sf,ua:cd,r:et,q:Ec,Ka:Ac,Ja:Bs,Ma:$i,w:zu,da:wc,L:Wu,Ta:Gu,Ua:Fp,Ga:lf,oa:Ih,B:dd,Ba:Ya,qa:Al,Qa:jg,S:py,Ea:gy,Q:vy,Da:va,O:Kl,Fa:Wf,Na:Gf,Oa:jp,R:uf,z:cf,Ra:fd,fa:Bg,ga:yy,ea:wl,y:hd,ka:Bp,E:Nh,Pa:Vg,x:df,M:Fh,C:Yf,Va:$f,xa:jh,p:Ug,za:Vp,F:Yu,ma:ol,N:ff,u:ss,ya:zg,va:gu,Aa:Vh,la:Dc,Ia:pf,Ha:Zl,pa:Uh,n:$u,i:vu,sa:$a,ta:qf,G:al,ia:Hs,ja:qu,A:gf,$a:gd,ab:Ao,_a:Xf},di;ke();var Eo=O=>(Eo=di.pb)(O),qa=s._free=O=>(qa=s._free=di.qb)(O),Ws=s._malloc=O=>(Ws=s._malloc=di.rb)(O);s._SCRTFillActiveTextureCharArray=(O,B,X)=>(s._SCRTFillActiveTextureCharArray=di.tb)(O,B,X);var Xu=s._main=(O,B)=>(Xu=s._main=di.ub)(O,B),Mc=s._setThrew=(O,B)=>(Mc=s._setThrew=di.vb)(O,B),pd=O=>(pd=di.wb)(O),Ku=O=>(Ku=di.xb)(O),Wg=()=>(Wg=di.yb)();s.dynCall_jiji=(O,B,X,re,ce)=>(s.dynCall_jiji=di.zb)(O,B,X,re,ce),s.dynCall_viijii=(O,B,X,re,ce,Ae,Ie)=>(s.dynCall_viijii=di.Ab)(O,B,X,re,ce,Ae,Ie),s.dynCall_iiiiij=(O,B,X,re,ce,Ae,Ie)=>(s.dynCall_iiiiij=di.Bb)(O,B,X,re,ce,Ae,Ie),s.dynCall_iiiiijj=(O,B,X,re,ce,Ae,Ie,He,at)=>(s.dynCall_iiiiijj=di.Cb)(O,B,X,re,ce,Ae,Ie,He,at),s.dynCall_iiiiiijj=(O,B,X,re,ce,Ae,Ie,He,at,Tt)=>(s.dynCall_iiiiiijj=di.Db)(O,B,X,re,ce,Ae,Ie,He,at,Tt);function Ao(O,B,X,re){var ce=Et();try{return Ut(O)(B,X,re)}catch(Ae){if(Qe(ce),Ae!==Ae+0)throw Ae;Mc(1,0)}}function gd(O,B,X){var re=Et();try{return Ut(O)(B,X)}catch(ce){if(Qe(re),ce!==ce+0)throw ce;Mc(1,0)}}function Xf(O,B,X,re,ce){var Ae=Et();try{return Ut(O)(B,X,re,ce)}catch(Ie){if(Qe(Ae),Ie!==Ie+0)throw Ie;Mc(1,0)}}function Wh(O){O=Object.assign({},O);var B=re=>ce=>re(ce)>>>0,X=re=>()=>re()>>>0;return O.pb=B(O.pb),O.rb=B(O.rb),O.xb=B(O.xb),O.yb=X(O.yb),O}s.callMain=z,s.ccall=po,s.cwrap=zs,s.UTF8ToString=ar,s.stringToUTF8=Ti,s.lengthBytesUTF8=Qt,s.specialHTMLTargets=Fs;var Zu;De=function O(){Zu||J(),Zu||(De=O)};function z(O=[]){var B=Xu;O.unshift(h);var X=O.length,re=zh((X+1)*4),ce=re;O.forEach(Ie=>{j[ce>>>2>>>0]=Us(Ie),ce+=4}),j[ce>>>2>>>0]=0;try{var Ae=B(X,re);return it(Ae,!0),Ae}catch(Ie){return Me(Ie)}}function J(O=f){if(Te>0||(Q(),Te>0))return;function B(){var X;Zu||(Zu=!0,s.calledRun=!0,!T&&(Z(),ee(),l(s),(X=s.onRuntimeInitialized)==null||X.call(s),oe&&z(O),ie()))}s.setStatus?(s.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>s.setStatus(""),1),B()},1)):B()}if(s.preInit)for(typeof s.preInit=="function"&&(s.preInit=[s.preInit]);s.preInit.length>0;)s.preInit.pop()();var oe=!0;return s.noInitialRun&&(oe=!1),J(),yr&&(yr.getNewId=function(O){yr.counter++;var B=O.length;if(B===0)return 1;for(var X=1;X<B;++X)if(O[X]===null)return X;return B}),a=c,a})})();r.exports=i,r.exports.default=i})(_W)),_W.exports}var wle;function TY(){return wle||(wle=1,(function(r){var e=GA&&GA.__awaiter||function(k,D,j,N){function V(W){return W instanceof j?W:new j(function(K){K(W)})}return new(j||(j=Promise))(function(W,K){function H(Q){try{I(N.next(Q))}catch(Z){K(Z)}}function U(Q){try{I(N.throw(Q))}catch(Z){K(Z)}}function I(Q){Q.done?W(Q.value):V(Q.value).then(H,U)}I((N=N.apply(k,D||[])).next())})},i=GA&&GA.__generator||function(k,D){var j={label:0,sent:function(){if(W[0]&1)throw W[1];return W[1]},trys:[],ops:[]},N,V,W,K;return K={next:H(0),throw:H(1),return:H(2)},typeof Symbol=="function"&&(K[Symbol.iterator]=function(){return this}),K;function H(I){return function(Q){return U([I,Q])}}function U(I){if(N)throw new TypeError("Generator is already executing.");for(;j;)try{if(N=1,V&&(W=I[0]&2?V.return:I[0]?V.throw||((W=V.return)&&W.call(V),0):V.next)&&!(W=W.call(V,I[1])).done)return W;switch(V=0,W&&(I=[I[0]&2,W.value]),I[0]){case 0:case 1:W=I;break;case 4:return j.label++,{value:I[1],done:!1};case 5:j.label++,V=I[1],I=[0];continue;case 7:I=j.ops.pop(),j.trys.pop();continue;default:if(W=j.trys,!(W=W.length>0&&W[W.length-1])&&(I[0]===6||I[0]===2)){j=0;continue}if(I[0]===3&&(!W||I[1]>W[0]&&I[1]<W[3])){j.label=I[1];break}if(I[0]===6&&j.label<W[1]){j.label=W[1],W=I;break}if(W&&j.label<W[2]){j.label=W[2],j.ops.push(I);break}W[2]&&j.ops.pop(),j.trys.pop();continue}I=D.call(k,j)}catch(Q){I=[6,Q],V=0}finally{N=W=0}if(I[0]&5)throw I[1];return{value:I[0]?I[1]:void 0,done:!0}}};Object.defineProperty(r,"__esModule",{value:!0}),r.disposeMultiChart3d=r.initializeChartEngine3D=r.getSharedWasmContext3D=r.createMultichart3d=void 0;var n=KCe(),t=fSe(),o=EM(),a=Gd(),s=e_(),l=ln(),u=$v(),c=$n(),d=Rg(),f=ws(),h=Lf(),p=Yv(),g=ca(),v=eF(),y=XH(),m=A1(),b={id:void 0,wasmContext:void 0,getChildSurfaces:void 0,createChildSurface:void 0},S,_=function(k,D){return e(void 0,void 0,void 0,function(){var j,N,V,W,K,H,U,I,Q,Z,ee,ie,de,pe,_e,Te,De;return i(this,function(Pe){switch(Pe.label){case 0:s.default.checkChartDivExists(k),j=s.default.initCanvas(k,(Q=D==null?void 0:D.widthAspect)!==null&&Q!==void 0?Q:0,(Z=D==null?void 0:D.heightAspect)!==null&&Z!==void 0?Z:0,s.default.ECanvasType.canvas2D,(ee=D==null?void 0:D.disableAspect)!==null&&ee!==void 0?ee:a.SciChartDefaults.disableAspect,D==null?void 0:D.touchAction),N=(ie=D==null?void 0:D.loader)!==null&&ie!==void 0?ie:a.SciChartDefaults.defaultLoader,V=(de=N.addChartLoader)===null||de===void 0?void 0:de.call(N,j.domDivContainer,(pe=D==null?void 0:D.theme)!==null&&pe!==void 0?pe:l.SciChartSurfaceBase.DEFAULT_THEME),Pe.label=1;case 1:return Pe.trys.push([1,3,,4]),[4,(0,r.initializeChartEngine3D)({destinationCanvas:j.domCanvas2D})];case 2:return Pe.sent(),W=b.createChildSurface,K=b.wasmContext,K.TSRSetDrawRequestsEnabled((_e=!(D!=null&&D.disableEngineLoop))!==null&&_e!==void 0?_e:!0),H=j.domChartRoot.id,U=W(H,j,(Te=D==null?void 0:D.theme)!==null&&Te!==void 0?Te:l.SciChartSurfaceBase.DEFAULT_THEME),[2,new Promise(function(Ee){setTimeout(function(){var Re;(Re=N.removeChartLoader)===null||Re===void 0||Re.call(N,j.domDivContainer,V),U.setIsInitialized(),Ee({wasmContext:K,sciChart3DSurface:U})},0)})];case 3:return I=Pe.sent(),console.error(I),(De=N.removeChartLoader)===null||De===void 0||De.call(N,j.domDivContainer,V),[2,Promise.reject(I)];case 4:return[2]}})})};r.createMultichart3d=_;var C=function(){return e(void 0,void 0,void 0,function(){var k;return i(this,function(D){switch(D.label){case 0:return[4,(0,r.initializeChartEngine3D)()];case 1:return k=D.sent().wasmContext,[2,k]}})})};r.getSharedWasmContext3D=C;var T=function(k){return e(void 0,void 0,void 0,function(){var D,j,N,V,W;return i(this,function(K){switch(K.label){case 0:return D=(V=k==null?void 0:k.destinationCanvas)===null||V===void 0?void 0:V.id,j=g.PerformanceDebugHelper.mark(g.EPerformanceMarkType.EngineInitStart,{parentContextId:D}),m.WebGlHelper.initialize(),!b.wasmContext||!b.createChildSurface||!b.getChildSurfaces?(S||(S=w()),[4,S]):[3,2];case 1:N=K.sent(),(0,u.checkBuildStamp)(N.wasmContext),b.id=N.id,b.wasmContext=N.wasmContext,b.createChildSurface=N.createChildSurface,b.getChildSurfaces=N.getChildSurfaces,K.label=2;case 2:return g.PerformanceDebugHelper.mark(g.EPerformanceMarkType.EngineInitEnd,{relatedId:(W=j==null?void 0:j.detail)===null||W===void 0?void 0:W.relatedId,contextId:b.id,parentContextId:D}),[2,S]}})})};r.initializeChartEngine3D=T;var x,A=function(){x&&x(),b.createChildSurface=void 0,b.getChildSurfaces=void 0,b.wasmContext=void 0,S=void 0,o.licenseManager.clear()};r.disposeMultiChart3d=A;var w=function(){var k=function(j,N,V,W){var K=new v.SciChart3DSurface(j,{canvases:V});K.applyTheme(W),K.setDestinations(d.sciChart3DDestinations);var H=s.default.subscribeToResize(V.domChartRoot,V.aspect,K);return K.addDeletable(H),K},D=function(j,N,V,W,K,H){var U=(0,l.createChartDestination)(V.domCanvas2D);if(!U){V.delete();return}var I=j.SCRTSurfaceDestination.implement(U);H.AddDestination(I),d.sciChart3DDestinations.push({canvasElementId:N,sciChartSurface:V,width:W,height:K})};return new Promise(function(j,N){var V=(0,l.getMasterCanvas)(),W=(0,l.getLocateFile)(v.sciChartConfig3D);new n({locateFile:W,noInitialRun:!0,canvas:V,preRun:y.preRun}).then(function(K){var H=(0,f.generateGuid)(),U=(0,c.createWasmContextRevocableProxy)(K,H),I=U.proxy;o.licenseManager.applyLicense(I,"3D master"),x=function(){I.TSRRequestExit(),de.delete(),I.SCRTGetGlobalSampleChartInterface().SetFrameRenderer(null),I.SCRTGetGlobalSampleChartInterface().delete(),I.SCRTSetGlobalSampleChartInterface(null),pe.delete(),I.SCRTSetGlobalCopyToDestinationInterface(null),U.revoke(),U=void 0,x=void 0};var Q=function(){return d.sciChart3DDestinations.map(function(_e){return _e.sciChartSurface})},Z=function(_e,Te,De){var Pe=s.default.getCanvas2dId(_e),Ee=d.sciChart3DDestinations.filter(function(Ke){return Ke.canvasElementId!==Pe});ie.ClearDestinations();var Re=d.sciChart3DDestinations.filter(function(Ke){return Ke.canvasElementId===Pe});for(Re.forEach(function(Ke){return Ke.sciChartSurface.delete()});d.sciChart3DDestinations.length>0;)d.sciChart3DDestinations.pop();Ee.forEach(function(Ke){return D(I,Ke.canvasElementId,Ke.sciChartSurface,Ke.width,Ke.height,ie)});var je=k(I,_e,Te,De);return je.addDeletable({delete:function(){v.SciChart3DSurface.autoDisposeWasmContext&&(0,d.getOther3DMultiChartDestinations)(je).length===0&&(v.SciChart3DSurface.wasmContextDisposeTimeout?setTimeout(function(){d.sciChart3DDestinations.length===0&&v.SciChart3DSurface.disposeSharedWasmContext()},v.SciChart3DSurface.wasmContextDisposeTimeout):v.SciChart3DSurface.disposeSharedWasmContext())}}),D(I,Pe,je,Te.domCanvas2D.width,Te.domCanvas2D.height,ie),o.licenseManager.updateLicenseDisplay(je),je},ee={InitializeChart:function(){j({id:H,getChildSurfaces:Q,createChildSurface:Z,wasmContext:I})},Draw:function(_e){h.Logger.debug("Draw",_e);var Te=d.sciChart3DDestinations.find(function(De){return De.canvasElementId===_e});Te&&Te.sciChartSurface.doDrawingLoop()},Update:function(_e){},ShutDownChart:function(){}},ie=I.SCRTSampleChartInterface.implement(ee),de=new I.SCRTFrameRenderer3D;ie.SetFrameRenderer(de),ie.SetFPSCounterEnabled(!1),ie.SetWasmBufferSizesKb(a.SciChartDefaults.wasmBufferSizesKb),I.SCRTSetGlobalSampleChartInterface(ie);var pe=I.SCRTCopyToDestinationInterface.implement({CopyToDestination:(0,t.copyToCanvas)(l.SciChartSurfaceBase.domMasterCanvas,L)});I.SCRTSetGlobalCopyToDestinationInterface(pe),I.TSRSetDrawRequestsEnabled(!0),l.SciChartSurfaceBase.domMasterCanvas&&I.SCRTSetMainWindowSize(l.SciChartSurfaceBase.domMasterCanvas.width,l.SciChartSurfaceBase.domMasterCanvas.height),I.callMain()}).catch(function(K){console.error(K),N(`Could not load SciChart WebAssembly module.
            Check your build process and ensure that your "scichart3d.wasm" and "scichart3d.js" files are from the same version`)})})},L=function(k){return d.sciChart3DDestinations.find(function(D){return D.canvasElementId===k})}})(GA)),GA}var m2={},Ole;function ZCe(){if(Ole)return m2;Ole=1,Object.defineProperty(m2,"__esModule",{value:!0}),m2.createSingle3dInternal=void 0;var r=KCe(),e=EM(),i=Gd(),n=e_(),t=ln(),o=$v(),a=$n(),s=Lf(),l=ca(),u=eF(),c=XH(),d=Rg(),f=function(p,g){return new Promise(function(v,y){var m,b,S,_,C,T,x=n.default.initCanvas(p,(m=g==null?void 0:g.widthAspect)!==null&&m!==void 0?m:0,(b=g==null?void 0:g.heightAspect)!==null&&b!==void 0?b:0,void 0,(S=g==null?void 0:g.disableAspect)!==null&&S!==void 0?S:i.SciChartDefaults.disableAspect,g==null?void 0:g.touchAction),A=(_=g==null?void 0:g.loader)!==null&&_!==void 0?_:i.SciChartDefaults.defaultLoader,w=(C=A.addChartLoader)===null||C===void 0?void 0:C.call(A,x.domDivContainer,(T=g==null?void 0:g.theme)!==null&&T!==void 0?T:t.SciChartSurfaceBase.DEFAULT_THEME),L=l.PerformanceDebugHelper.mark(l.EPerformanceMarkType.EngineInitStart,{parentContextId:x.domCanvas2D.id}),k=(0,t.getLocateFile)(u.sciChartConfig3D);new r({locateFile:k,noInitialRun:!0,canvas:x.domCanvasWebGL,preRun:c.preRun}).then(function(D){var j,N,V;(j=A.removeChartLoader)===null||j===void 0||j.call(A,x.domDivContainer,w),D.doNotCaptureKeyboard=!0,e.licenseManager.applyLicense(D,"3D single");var W=(0,a.createWasmContextRevocableProxy)(D,x.domCanvas2D.id),K=function(H){H.sciChart3DSurface.addDeletable({delete:function(){W.revoke(),W=void 0}}),l.PerformanceDebugHelper.mark(l.EPerformanceMarkType.EngineInitEnd,{relatedId:L==null?void 0:L.detail.relatedId,contextId:H.sciChart3DSurface.id,parentContextId:x.domCanvas2D.id}),v(H)};h(W.proxy,x,K,(N=g==null?void 0:g.theme)!==null&&N!==void 0?N:t.SciChartSurfaceBase.DEFAULT_THEME),D.TSRSetDrawRequestsEnabled((V=!(g!=null&&g.disableEngineLoop))!==null&&V!==void 0?V:!0),(0,o.checkBuildStamp)(D)}).catch(function(D){var j;throw(j=A.removeChartLoader)===null||j===void 0||j.call(A,x.domDivContainer,w),y(`Could not load SciChart WebAssembly module.
                    Check your build process and ensure that your "scichart3d.wasm" and "scichart3d.js" files are from the same version`),D})})};m2.createSingle3dInternal=f;var h=function(p,g,v,y){var m=g.domCanvas2D.width,b=g.domCanvas2D.height,S;p.canvas=g.domCanvasWebGL;var _={InitializeChart:function(){S=new u.SciChart3DSurface(p,{canvases:g}),S.applyTheme(y),d.sciChart3DSingleDestinations.push({canvasElementId:g.domCanvasWebGL.id,sciChartSurface:S,width:m,height:b}),S.setDestinations(d.sciChart3DSingleDestinations),S.addDeletable({delete:function(){p.TSRRequestExit(),T.delete(),p.SCRTGetGlobalSampleChartInterface().SetFrameRenderer(null),p.SCRTGetGlobalSampleChartInterface().delete(),p.SCRTSetGlobalSampleChartInterface(null),e.licenseManager.clear()}}),setTimeout(function(){S.invalidateElement(),e.licenseManager.updateLicenseDisplay(S);var x=n.default.subscribeToResize(g.domChartRoot,g.aspect,S);S.addDeletable(x),S.setIsInitialized(),v({wasmContext:p,sciChart3DSurface:S})},0)},Draw:function(x){s.Logger.debug("Draw",x),S.isInitialized&&S.doDrawingLoop()},Update:function(x){},ShutDownChart:function(){}},C=p.SCRTSampleChartInterface.implement(_),T=new p.SCRTFrameRenderer3D;C.SetFrameRenderer(T),C.SetFPSCounterEnabled(!1),C.SetWasmBufferSizesKb(i.SciChartDefaults.wasmBufferSizesKb),p.SCRTSetGlobalSampleChartInterface(C),p.callMain()};return m2}var YA={},b2={},Dle;function JCe(){if(Dle)return b2;Dle=1,Object.defineProperty(b2,"__esModule",{value:!0}),b2.ViewportManager3DBase=void 0;var r=j1(),e=(function(){function i(n,t){this.width=n,this.height=t}return i.prototype.setSize=function(n,t){this.width=n,this.height=t},i.prototype.attachSciChartSurface=function(n){if(this.isAttached)throw Error("This ViewportManager instance is already attached to a SciChart3DSurface. Detach it before attaching to another");this.parentSurface=n,this.isAttached=!0},i.prototype.detachSciChartSurface=function(){this.isAttached=!1,this.parentSurface=void 0},i.prototype.calculateAutoRange=function(n){if(n.autoRange===r.EAutoRange.Always||n.autoRange===r.EAutoRange.Once){var t=n.getMaximumRange();if(t&&t.isDefined)return t}return n.visibleRange},i})();return b2.ViewportManager3DBase=e,b2}var Rle;function QCe(){if(Rle)return YA;Rle=1;var r=YA&&YA.__extends||(function(){var n=function(t,o){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(a[l]=s[l])},n(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");n(t,o);function a(){this.constructor=t}t.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}})();Object.defineProperty(YA,"__esModule",{value:!0}),YA.DefaultViewportManager3D=void 0;var e=JCe(),i=(function(n){r(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t})(e.ViewportManager3DBase);return YA.DefaultViewportManager3D=i,YA}var $A={},Mle;function eTe(){if(Mle)return $A;Mle=1;var r=$A&&$A.__extends||(function(){var t=function(o,a){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");t(o,a);function s(){this.constructor=o}o.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}})();Object.defineProperty($A,"__esModule",{value:!0}),$A.GizmoEntity=void 0;var e=dy(),i=BM(),n=(function(t){r(o,t);function o(a){var s=t.call(this,a)||this;return s.type=e.ESceneEntityType.GizmoEntity,s.setNativeEntity(a.SCRTXyzGizmoEntity.implement(s)),s.nativeEntity.SetOverrideEnableGizmo(!1),s}return Object.defineProperty(o.prototype,"enableGizmo",{get:function(){return this.nativeEntity.GetOverrideEnableGizmo()},set:function(a){this.nativeEntity.SetOverrideEnableGizmo(a)},enumerable:!1,configurable:!0}),o})(i.BaseSceneEntity3D);return $A.GizmoEntity=n,$A}var qA={},S2={},Lle;function tTe(){if(Lle)return S2;Lle=1,Object.defineProperty(S2,"__esModule",{value:!0}),S2.DefaultEntityIdProvider=void 0;var r=(function(){function e(){this.currentId=-1,this.maxId=4294967295}return e.prototype.getNextEntityId=function(){var i=++this.currentId;if(i>=this.maxId)throw new Error("The max Mesh ID has been exceeded.  Please see https://www.scichart.com/questions/wpf/maximum-mesh-id");return i},e.prototype.releaseEntityId=function(i){},e})();return S2.DefaultEntityIdProvider=r,S2}var kle;function rTe(){if(kle)return qA;kle=1;var r=qA&&qA.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(u[d]=c[d])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})();Object.defineProperty(qA,"__esModule",{value:!0}),qA.RootSceneEntity=void 0;var e=dy(),i=BM(),n=tTe(),t=ni(),o=(function(a){r(s,a);function s(l,u){var c=a.call(this,l)||this;return c.type=e.ESceneEntityType.RootSceneEntity,t.Guard.notNull(u,"parentSurface"),c.parentSurface=u,c.entityIdProvider=new n.DefaultEntityIdProvider,c}return s.prototype.attachChild=function(l){var u=this;l!=null&&l.nativeEntity&&this.world.AddEntity(l.nativeEntity),l.entityIdProvider=this.entityIdProvider,l.parent=u,l.onAttached()},s.prototype.detachChild=function(l){l!=null&&l.nativeEntity&&this.world.RemoveEntity(l.nativeEntity),l.onDetached(),l.parent=void 0},s})(i.BaseSceneEntity3D);return qA.RootSceneEntity=o,qA}var XA={},_2={},Ile;function iTe(){if(Ile)return _2;Ile=1,Object.defineProperty(_2,"__esModule",{value:!0}),_2.AxisCubeDescriptor=void 0;var r=(function(){function e(){}return e})();return _2.AxisCubeDescriptor=r,_2}var P2={},Nle;function nTe(){if(Nle)return P2;Nle=1,Object.defineProperty(P2,"__esModule",{value:!0}),P2.RenderPassInfo3D=void 0;var r=(function(){function e(){}return e})();return P2.RenderPassInfo3D=r,P2}var C2={},Fle;function oTe(){if(Fle)return C2;Fle=1,Object.defineProperty(C2,"__esModule",{value:!0}),C2.SceneDescriptor=void 0;var r=(function(){function e(){}return e})();return C2.SceneDescriptor=r,C2}var jle;function aTe(){if(jle)return XA;jle=1;var r=XA&&XA.__spreadArray||function(d,f,h){if(h||arguments.length===2)for(var p=0,g=f.length,v;p<g;p++)(v||!(p in f))&&(v||(v=Array.prototype.slice.call(f,0,p)),v[p]=f[p]);return d.concat(v||Array.prototype.slice.call(f))};Object.defineProperty(XA,"__esModule",{value:!0}),XA.SciChart3DRenderer=void 0;var e=Mr(),i=ni(),n=vn(),t=j1(),o=c8(),a=ca(),s=iTe(),l=nTe(),u=oTe(),c=(function(){function d(f,h){this.isInvalidated=!1,i.Guard.notNull(f,"scs"),this.scs=f,this.wasmContext=h}return d.getSceneDescriptor=function(f){var h,p,g,v=new u.SceneDescriptor;return v.axisCubeDescriptor=new s.AxisCubeDescriptor,v.axisCubeDescriptor.dimensions=f.worldDimensions,v.axisCubeDescriptor.isVisible=!0,v.axisCubeDescriptor.xAxisDescriptor=(h=f.xAxis)===null||h===void 0?void 0:h.toAxisDescriptor(),v.axisCubeDescriptor.yAxisDescriptor=(p=f.yAxis)===null||p===void 0?void 0:p.toAxisDescriptor(),v.axisCubeDescriptor.zAxisDescriptor=(g=f.zAxis)===null||g===void 0?void 0:g.toAxisDescriptor(),v},d.prepareRenderData=function(f){var h=new l.RenderPassInfo3D;return h.xCalc=f.xAxis.getCurrentCoordinateCalculator(),h.yCalc=f.yAxis.getCurrentCoordinateCalculator(),h.zCalc=f.zAxis.getCurrentCoordinateCalculator(),h.worldDimensions=f.worldDimensions,h.sceneDescriptor=d.getSceneDescriptor(f),h},d.tryPerformAutoRangeOn=function(f,h){var p=(!f.hasValidVisibleRange()||f.hasDefaultVisibleRange())&&f.autoRange===t.EAutoRange.Once||f.autoRange===t.EAutoRange.Always;if(p){var g=h.viewportManager.calculateAutoRange(f);g&&g!==f.visibleRange&&f.isValidRange(g)&&(f.visibleRange=g)}},d.prototype.render=function(){var f=this,h,p;if(!(this.scs.isDeleted||!this.scs.isInitialized)){this.isInvalidated=!1;var g=a.PerformanceDebugHelper.mark(a.EPerformanceMarkType.RenderStart,{contextId:this.scs.id,level:a.EPerformanceDebugLevel.Verbose});this.isSurfaceValid(this.scs),this.scs.webAssemblyContext3D.SCRTSetIsSelectionBufferEnabled(this.scs.isHitTestEnabled);var v=this.scs.getSceneWorld();if(!v){console.warn("SciChart3DRenderer: Undefined scene world!");return}this.wasmContext.SCRTSetActiveWorld(v),this.updateWorldDimensions(v,this.scs.worldDimensions);var y=v.GetMainCamera(),m=this.scs.camera;m.updateEngineCamera(y);var b=this.scs.viewportManager,S=b.width,_=b.height,C=new n.Rect(0,0,S,_);this.scs.setSeriesViewRect(C);var T=this.previousTime?Date.now()-this.previousTime:void 0;this.previousTime=Date.now();var x=a.PerformanceDebugHelper.mark(a.EPerformanceMarkType.GenericAnimationStart,{contextId:this.scs.id,level:a.EPerformanceDebugLevel.Verbose});this.scs.genericAnimationsRun.raiseEvent(),this.scs.onAnimate(T),a.PerformanceDebugHelper.mark(a.EPerformanceMarkType.GenericAnimationEnd,{contextId:this.scs.id,relatedId:(h=x==null?void 0:x.detail)===null||h===void 0?void 0:h.relatedId,level:a.EPerformanceDebugLevel.Verbose}),this.scs.updateBackground(),this.prepareAxes(this.scs.xAxis,this.scs.yAxis,this.scs.zAxis);var A=d.prepareRenderData(this.scs);this.scs.rootEntity.visitEntities(function(j){return j.setRenderPassData(A)});var w=this.scs.annotations.asArray(),L=this.scs.modifierAnnotations.asArray(),k=r(r([],w,!0),L,!0),D=k.filter(function(j){return j.isDomAnnotation});D.forEach(function(j){var N,V=a.PerformanceDebugHelper.mark(a.EPerformanceMarkType.DrawAnnotationStart,{contextId:j.id,parentContextId:f.scs.id,level:a.EPerformanceDebugLevel.Verbose});j.update(void 0,void 0,0,0),a.PerformanceDebugHelper.mark(a.EPerformanceMarkType.DrawAnnotationEnd,{contextId:j.id,parentContextId:f.scs.id,relatedId:(N=V==null?void 0:V.detail)===null||N===void 0?void 0:N.relatedId,level:a.EPerformanceDebugLevel.Verbose})}),this.updateWatermark(),this.scs.onSciChartRendered(),this.scs.isRunningAnimation&&setTimeout(this.scs.invalidateElement,0),a.PerformanceDebugHelper.mark(a.EPerformanceMarkType.RenderEnd,{contextId:this.scs.id,relatedId:(p=g==null?void 0:g.detail)===null||p===void 0?void 0:p.relatedId,level:a.EPerformanceDebugLevel.Verbose})}},d.prototype.updateWatermark=function(){var f=this.scs.getMainCanvas().clientHeight,h=this.scs.getMainCanvas().clientWidth,p=o.watermarkHelpers.calcPosition(h,f,this.scs.watermarkPosition,!0),g=p.left,v=p.bottom;this.scs.updateWatermark(g,v)},d.prototype.isSurfaceValid=function(f,h){if(!f.xAxis)throw new Error("Unable to draw SciChart3DSurface as the xAxis is undefined");if(!f.yAxis)throw new Error("Unable to draw SciChart3DSurface as the yAxis is undefined");if(!f.zAxis)throw new Error("Unable to draw SciChart3DSurface as the zAxis is undefined");return!0},d.prototype.prepareAxes=function(){for(var f=this,h=[],p=0;p<arguments.length;p++)h[p]=arguments[p];h.forEach(function(g){g.validateAxis(),d.tryPerformAutoRangeOn(g,f.scs),g.isMeasured=!0})},d.prototype.updateWorldDimensions=function(f,h){i.Guard.notNull(h,"worldDimensions");var p;try{p=this.scs.worldDimensions.toTsrVector3(this.wasmContext),f.SetWorldDimensions(p)}finally{(0,e.deleteSafe)(p)}},d})();return XA.SciChart3DRenderer=c,XA}var PW={},Ble;function xY(){return Ble||(Ble=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.AxisPlane=r.EAxisPlaneType=void 0;var e=XS(),i=SN(),n=a3();(function(o){o.XY="xyAxisPlane",o.ZX="zxAxisPlane",o.ZY="zyAxisPlane"})(r.EAxisPlaneType||(r.EAxisPlaneType={}));var t=(function(){function o(a,s,l){var u,c,d,f;this.drawLabelsModeProperty=i.EAxisPlaneDrawLabelsMode.Both,this.drawTitlesModeProperty=i.EAxisPlaneDrawLabelsMode.Both,this.visibilityModeProperty=n.EAxisPlaneVisibilityMode.Auto,this.isVisibleProperty=!0,this.parentSurface=a,this.planeType=s,this.drawLabelsModeProperty=(u=l==null?void 0:l.drawLabelsMode)!==null&&u!==void 0?u:this.drawLabelsModeProperty,this.drawTitlesModeProperty=(c=l==null?void 0:l.drawTitlesMode)!==null&&c!==void 0?c:this.drawTitlesModeProperty,this.visibilityModeProperty=(d=l==null?void 0:l.visibilityMode)!==null&&d!==void 0?d:this.visibilityModeProperty,this.isVisibleProperty=(f=l==null?void 0:l.isVisible)!==null&&f!==void 0?f:this.isVisibleProperty}return o.prototype.notifyPropertyChanged=function(a){var s;(s=this.parentSurface.propertyChanged)===null||s===void 0||s.raiseEvent(new e.PropertyChangedEventArgs("".concat(this.planeType,".").concat(a))),this.parentSurface.invalidateElement()},Object.defineProperty(o.prototype,"drawLabelsMode",{get:function(){return this.drawLabelsModeProperty},set:function(a){this.drawLabelsModeProperty!==a&&(this.drawLabelsModeProperty=a,this.notifyPropertyChanged("drawLabelsMode"))},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"drawTitlesMode",{get:function(){return this.drawTitlesModeProperty},set:function(a){this.drawTitlesModeProperty!==a&&(this.drawTitlesModeProperty=a,this.notifyPropertyChanged("drawTitlesMode"))},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"visibilityMode",{get:function(){return this.visibilityModeProperty},set:function(a){this.visibilityModeProperty!==a&&(this.visibilityModeProperty=a,this.notifyPropertyChanged("visibilityMode"))},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"isVisible",{get:function(){return this.isVisibleProperty},set:function(a){this.isVisibleProperty!==a&&(this.isVisibleProperty=a,this.notifyPropertyChanged("isVisible"))},enumerable:!1,configurable:!0}),o.prototype.toJSON=function(){return{drawLabelsMode:this.drawLabelsMode,drawTitlesMode:this.drawTitlesMode,visibilityMode:this.visibilityMode,isVisible:this.isVisible}},o})();r.AxisPlane=t})(PW)),PW}var Vle;function eF(){return Vle||(Vle=1,(function(r){var e=h0&&h0.__extends||(function(){var H=function(U,I){return H=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Q,Z){Q.__proto__=Z}||function(Q,Z){for(var ee in Z)Object.prototype.hasOwnProperty.call(Z,ee)&&(Q[ee]=Z[ee])},H(U,I)};return function(U,I){if(typeof I!="function"&&I!==null)throw new TypeError("Class extends value "+String(I)+" is not a constructor or null");H(U,I);function Q(){this.constructor=U}U.prototype=I===null?Object.create(I):(Q.prototype=I.prototype,new Q)}})(),i=h0&&h0.__awaiter||function(H,U,I,Q){function Z(ee){return ee instanceof I?ee:new I(function(ie){ie(ee)})}return new(I||(I=Promise))(function(ee,ie){function de(Te){try{_e(Q.next(Te))}catch(De){ie(De)}}function pe(Te){try{_e(Q.throw(Te))}catch(De){ie(De)}}function _e(Te){Te.done?ee(Te.value):Z(Te.value).then(de,pe)}_e((Q=Q.apply(H,U||[])).next())})},n=h0&&h0.__generator||function(H,U){var I={label:0,sent:function(){if(ee[0]&1)throw ee[1];return ee[1]},trys:[],ops:[]},Q,Z,ee,ie;return ie={next:de(0),throw:de(1),return:de(2)},typeof Symbol=="function"&&(ie[Symbol.iterator]=function(){return this}),ie;function de(_e){return function(Te){return pe([_e,Te])}}function pe(_e){if(Q)throw new TypeError("Generator is already executing.");for(;I;)try{if(Q=1,Z&&(ee=_e[0]&2?Z.return:_e[0]?Z.throw||((ee=Z.return)&&ee.call(Z),0):Z.next)&&!(ee=ee.call(Z,_e[1])).done)return ee;switch(Z=0,ee&&(_e=[_e[0]&2,ee.value]),_e[0]){case 0:case 1:ee=_e;break;case 4:return I.label++,{value:_e[1],done:!1};case 5:I.label++,Z=_e[1],_e=[0];continue;case 7:_e=I.ops.pop(),I.trys.pop();continue;default:if(ee=I.trys,!(ee=ee.length>0&&ee[ee.length-1])&&(_e[0]===6||_e[0]===2)){I=0;continue}if(_e[0]===3&&(!ee||_e[1]>ee[0]&&_e[1]<ee[3])){I.label=_e[1];break}if(_e[0]===6&&I.label<ee[1]){I.label=ee[1],ee=_e;break}if(ee&&I.label<ee[2]){I.label=ee[2],I.ops.push(_e);break}ee[2]&&I.ops.pop(),I.trys.pop();continue}_e=U.call(H,I)}catch(Te){_e=[6,Te],Z=0}finally{Q=ee=0}if(_e[0]&5)throw _e[1];return{value:_e[0]?_e[1]:void 0,done:!0}}};Object.defineProperty(r,"__esModule",{value:!0}),r.SciChart3DSurface=r.sciChartConfig3D=void 0;var t=ln(),o=Hi(),a=So(),s=Mr(),l=FS(),u=Ii(),c=JR(),d=$1(),f=XCe(),h=X_e(),p=TY(),g=ZCe(),v=QCe(),y=eTe(),m=rTe(),b=aTe(),S=$v(),_=Gd(),C=A1(),T=Rg(),x=Ba(),A=Yo(),w=ca(),L=vn(),k=Lf(),D=Ha(),j=ab(),N=e_(),V=xY(),W={wasmUrl:"scichart3d.wasm",wasmNoSimdUrl:void 0};r.sciChartConfig3D=W;var K=(function(H){e(U,H);function U(I,Q){var Z=this,ee,ie,de,pe,_e,Te;Z=H.call(this,I,Q==null?void 0:Q.canvases)||this,Z.watermarkPosition=_.SciChartDefaults.watermarkPosition,Z.preRender=new x.EventHandler,Z.showErrors=!0,Z.animationList=[],Z.isAxisCubeRenderedProperty=!1,Z.isHitTestEnabledProperty=!1;var De=(ie=(ee=Z.domCanvas2D)===null||ee===void 0?void 0:ee.width)!==null&&ie!==void 0?ie:a.DEFAULT_WIDTH,Pe=(pe=(de=Z.domCanvas2D)===null||de===void 0?void 0:de.height)!==null&&pe!==void 0?pe:a.DEFAULT_HEIGHT;if(Z.webAssemblyContext3D=I,Z.visibleRangeClipMin=new I.TSRVector3(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY),Z.visibleRangeClipMax=new I.TSRVector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),!a.IS_TEST_ENV){var Ee=De/o.DpiHelper.PIXEL_RATIO,Re=Pe/o.DpiHelper.PIXEL_RATIO;Z.isCopyCanvasSurface?Z.changeMasterCanvasViewportSize(I,Ee,Re):Z.changeWebGLCanvasViewportSize(I,Ee,Re)}return Z.invalidateElement=Z.invalidateElement.bind(Z),Z.sciChart3DRenderer=new b.SciChart3DRenderer(Z,I),Z.viewportManager=new v.DefaultViewportManager3D(De,Pe),Z.worldDimensionsProperty=(Q==null?void 0:Q.worldDimensions)||new d.Vector3(300,200,300),Z.detachSeries=Z.detachSeries.bind(Z),Z.attachSeries=Z.attachSeries.bind(Z),Z.renderableSeries=new l.ObservableArray,Z.renderableSeries.collectionChanged.subscribe(function(je){var Ke,ot;(Ke=je.getOldItems())===null||Ke===void 0||Ke.forEach(function(We){return Z.detachSeries(We)}),(ot=je.getNewItems())===null||ot===void 0||ot.forEach(function(We){return Z.attachSeries(We)})}),Z.childPropertyChanged=Z.childPropertyChanged.bind(Z),Z.sceneWorldProperty=new Z.webAssemblyContext3D.SCRTSceneWorld,Z.sceneWorldProperty.SetCanvasId((Te=(_e=Z.domCanvas2D)===null||_e===void 0?void 0:_e.id)!==null&&Te!==void 0?Te:"DefaultCanvasIdNeededForUnitTests"),Z.sceneWorldProperty.Init(),Z.rootEntity=new m.RootSceneEntity(I,Z),Z.axisCubeEntity=new f.AxisCubeEntity(I,Z),Z.rootEntity.children.add(Z.axisCubeEntity),Z.gizmoEntity=new y.GizmoEntity(I),Z.rootEntity.children.add(Z.gizmoEntity),a.IS_TEST_ENV||(Z.watermarkProperties=new I.SCRTWaterMarkProperties,Z.watermarkProperties.m_fCanvasWidth=De,Z.watermarkPropertyPosition=new I.TSRVector2(0,0),Z.watermarkProperties.SetPosition(Z.watermarkPropertyPosition),Z.watermarkProperties.SetOpacity(.5),I.SCRT3DSetWaterMarkProperties(Z.watermarkProperties)),Z}return U.createSingle=function(I,Q){var Z=w.PerformanceDebugHelper.mark(w.EPerformanceMarkType.InitializationStart,{contextId:Q==null?void 0:Q.id});return(0,g.createSingle3dInternal)(I,Q).then(function(ee){var ie;return ee.sciChart3DSurface.applyOptions(Q),w.PerformanceDebugHelper.mark(w.EPerformanceMarkType.InitializationEnd,{parentContextId:ee.sciChart3DSurface.domCanvas2D.id,contextId:ee.sciChart3DSurface.id,relatedId:(ie=Z==null?void 0:Z.detail)===null||ie===void 0?void 0:ie.relatedId}),ee})},U.configure=function(I){var Q,Z;r.sciChartConfig3D.wasmUrl=(Q=I==null?void 0:I.wasmUrl)!==null&&Q!==void 0?Q:W.wasmUrl,r.sciChartConfig3D.wasmNoSimdUrl=(Z=I==null?void 0:I.wasmNoSimdUrl)!==null&&Z!==void 0?Z:W.wasmNoSimdUrl},U.useWasmFromCDN=function(){r.sciChartConfig3D.wasmUrl="https://cdn.jsdelivr.net/npm/scichart@".concat(S.libraryVersion,"/_wasm/scichart3d.wasm"),r.sciChartConfig3D.wasmNoSimdUrl="https://cdn.jsdelivr.net/npm/scichart@".concat(S.libraryVersion,"/_wasm/scichart3d-nosimd.wasm")},U.loadWasmFromCDN=function(){return U.useWasmFromCDN()},U.loadWasmLocal=function(){return U.configure(W)},U.create=function(I,Q){var Z=w.PerformanceDebugHelper.mark(w.EPerformanceMarkType.InitializationStart,{contextId:Q==null?void 0:Q.id});return a.IS_TEST_ENV?this.createTest(I,Q):(0,p.createMultichart3d)(I,Q).then(function(ee){var ie,de;return ee.sciChart3DSurface.applyOptions(Q),w.PerformanceDebugHelper.mark(w.EPerformanceMarkType.InitializationEnd,{parentContextId:ee.sciChart3DSurface.domCanvas2D.id,contextId:(ie=ee.sciChart3DSurface)===null||ie===void 0?void 0:ie.id,relatedId:(de=Z==null?void 0:Z.detail)===null||de===void 0?void 0:de.relatedId}),ee})},U.disposeSharedWasmContext=function(){T.sciChart3DDestinations.length===0&&(0,p.disposeMultiChart3d)(),H.disposeSharedWasmContext.call(this)},U.createTest=function(I,Q){var Z,ee,ie=N.default.initCanvas(I,(Z=Q==null?void 0:Q.widthAspect)!==null&&Z!==void 0?Z:0,(ee=Q==null?void 0:Q.heightAspect)!==null&&ee!==void 0?ee:0,N.default.ECanvasType.canvas2D),de=new U(r.sciChartConfig3D.testWasm,{canvases:ie});return de.applyTheme(Q==null?void 0:Q.theme),de.applyOptions(Q),new Promise(function(pe){return pe({wasmContext:de.webAssemblyContext3D,sciChart3DSurface:de})})},U.prototype.getSceneWorld=function(){return this.sceneWorldProperty},U.prototype.worldToScreenCoord=function(I){var Q=this.getSceneWorld();if(Q){var Z=I.toTsrVector3(this.webAssemblyContext3D),ee=Q.TransformWorldToScreenCoords(Z),ie=new u.Point(ee.x,ee.y);return ee.delete(),Z.delete(),ie}},U.prototype.delete=function(I){I===void 0&&(I=!0),this.renderableSeries.asArray().forEach(function(Q){return Q.delete()}),this.renderableSeries.clear(!1),this.xAxis=(0,s.deleteSafe)(this.xAxis),this.yAxis=(0,s.deleteSafe)(this.yAxis),this.zAxis=(0,s.deleteSafe)(this.zAxis),this.rootEntity=(0,s.deleteSafe)(this.rootEntity),this.watermarkProperties=(0,s.deleteSafe)(this.watermarkProperties),this.watermarkPropertyPosition=(0,s.deleteSafe)(this.watermarkPropertyPosition),this.sceneWorldProperty=(0,s.deleteSafe)(this.sceneWorldProperty),a.IS_TEST_ENV||this.webAssemblyContext3D.SCRTSetActiveWorld(null),this.clearRootElement(I),this.visibleRangeClipMin=(0,s.deleteSafe)(this.visibleRangeClipMin),this.visibleRangeClipMax=(0,s.deleteSafe)(this.visibleRangeClipMax),H.prototype.delete.call(this)},Object.defineProperty(U.prototype,"enableGizmo",{get:function(){return this.gizmoEntity.enableGizmo},set:function(I){this.gizmoEntity.enableGizmo=I},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"viewportManager",{get:function(){return this.viewportManagerProperty},set:function(I){var Q,Z;(Q=this.viewportManagerProperty)===null||Q===void 0||Q.detachSciChartSurface(),this.viewportManagerProperty=I,(Z=this.viewportManagerProperty)===null||Z===void 0||Z.attachSciChartSurface(this),this.notifyPropertyChanged(h.PROPERTY.SURFACE_VIEWPORT_MANAGER)},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"worldDimensions",{get:function(){return this.worldDimensionsProperty},set:function(I){this.worldDimensionsProperty=I,this.notifyPropertyChanged(h.PROPERTY.SURFACE_WORLD_DIMENSIONS)},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"isZXPlaneVisible",{get:function(){return this.zxAxisPlaneProperty.isVisible},set:function(I){this.zxAxisPlaneProperty.isVisible=I},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"isXYPlaneVisible",{get:function(){return this.xyAxisPlaneProperty.isVisible},set:function(I){this.xyAxisPlaneProperty.isVisible=I},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"isZYPlaneVisible",{get:function(){return this.zyAxisPlaneProperty.isVisible},set:function(I){this.zyAxisPlaneProperty.isVisible=I},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"xyAxisPlane",{get:function(){return this.xyAxisPlaneProperty},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"zyAxisPlane",{get:function(){return this.zyAxisPlaneProperty},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"zxAxisPlane",{get:function(){return this.zxAxisPlaneProperty},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"camera",{get:function(){return this.cameraProperty},set:function(I){var Q,Z;(Q=this.cameraProperty)===null||Q===void 0||Q.propertyChanged.unsubscribe(this.childPropertyChanged),this.cameraProperty=I,(Z=this.cameraProperty)===null||Z===void 0||Z.propertyChanged.subscribe(this.childPropertyChanged),this.notifyPropertyChanged(h.PROPERTY.SURFACE_CAMERA)},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"xAxis",{get:function(){return this.xAxisProperty},set:function(I){this.detachAxis(this.xAxisProperty),this.xAxisProperty=I,this.attachAxis(this.xAxisProperty),this.notifyPropertyChanged(h.PROPERTY.SURFACE_XAXIS)},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"yAxis",{get:function(){return this.yAxisProperty},set:function(I){this.detachAxis(this.yAxisProperty),this.yAxisProperty=I,this.attachAxis(this.yAxisProperty),this.notifyPropertyChanged(h.PROPERTY.SURFACE_YAXIS)},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"zAxis",{get:function(){return this.zAxisProperty},set:function(I){this.detachAxis(this.zAxisProperty),this.zAxisProperty=I,this.attachAxis(this.zAxisProperty),this.notifyPropertyChanged(h.PROPERTY.SURFACE_ZAXIS)},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"isHitTestEnabled",{get:function(){return this.isHitTestEnabledProperty},set:function(I){I!==this.isHitTestEnabledProperty&&(this.isHitTestEnabledProperty=I,this.invalidateElement())},enumerable:!1,configurable:!0}),U.prototype.setIsAxisCubeRendered=function(){this.isAxisCubeRenderedProperty=!0},Object.defineProperty(U.prototype,"isAxisCubeRendered",{get:function(){return this.isAxisCubeRenderedProperty},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"chartViewRect",{get:function(){return new L.Rect(0,0,this.viewportManager.width,this.viewportManager.height)},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"preRenderAll",{get:function(){return this.preRender},enumerable:!1,configurable:!0}),U.prototype.invalidateElement=function(I){var Q,Z,ee;if(k.Logger.debug("Invalidating ".concat((Z=(Q=this.domChartRoot)===null||Q===void 0?void 0:Q.id)!==null&&Z!==void 0?Z:this.id,": force=").concat(I==null?void 0:I.force," isSuspended=").concat(this.isSuspended," isInitialized=").concat(this.isInitialized,".")),!(!(I!=null&&I.force)&&(this.isSuspended||this.isDeleted||!this.isInitialized))&&(w.PerformanceDebugHelper.mark(this.sciChart3DRenderer.isInvalidated?w.EPerformanceMarkType.Invalidate:w.EPerformanceMarkType.LeadingInvalidate,{contextId:this.id}),!this.sciChart3DRenderer.isInvalidated)){if(!(!((ee=C.WebGlHelper.getContext(this.webAssemblyContext3D.canvas))===null||ee===void 0)&&ee.isContextLost())){this.sciChart3DRenderer.isInvalidated=!0;var ie=this.domCanvas2D?this.domCanvas2D.id:"undefinedCanvasId";this.webAssemblyContext3D.TSRRequestCanvasDraw(ie)}this.redrawRequested.raiseEvent(this.sciChart3DRenderer.isInvalidated)}},U.prototype.onDpiChanged=function(I){var Q,Z;this.renderableSeries.asArray().forEach(function(ee){return ee.onDpiChanged(I)}),this.changeViewportSize((Q=this.getMainCanvas())===null||Q===void 0?void 0:Q.clientWidth,(Z=this.getMainCanvas())===null||Z===void 0?void 0:Z.clientHeight),H.prototype.onDpiChanged.call(this,I)},Object.defineProperty(U.prototype,"surfaceType",{get:function(){return D.ESurfaceType.SciChart3DSurfaceType},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"isInvalidated",{get:function(){var I;return(I=this.sciChart3DRenderer)===null||I===void 0?void 0:I.isInvalidated},enumerable:!1,configurable:!0}),U.prototype.onSciChartRendered=function(){this.chartModifiers.asArray().forEach(function(I){I.onParentSurfaceRendered()})},U.prototype.doDrawingLoop=function(){var I=this;try{var Q=this.suspender.lock();try{this.preRender.raiseEvent()}finally{Q()}this.updateClipPlanes(),this.sciChart3DRenderer.render();var Z=this.isInvalidated;w.PerformanceDebugHelper.mark(Z?w.EPerformanceMarkType.Rendered:w.EPerformanceMarkType.FullStateRendered,{contextId:this.id}),this.rendered.raiseEvent(Z),this.renderedToWebGl.raiseEvent(this.isInvalidated),this.isCopyCanvasSurface||this.renderedToDestination.raiseEvent(this.isInvalidated),(this.painted.handlers.length>0||w.PerformanceDebugHelper.enableDebug)&&(0,w.runAfterFramePaint)(function(){w.PerformanceDebugHelper.mark(w.EPerformanceMarkType.Painted,{contextId:I.id}),I.painted.raiseEvent()})}catch(ee){if(ee.name==="BindingError")console.error(ee),console.warn("Binding errors can occur if a previous chart using the same div id was not deleted correctly, or if you try to share data or series between charts that use different webassembly contexts.");else if(this.domChartRoot)this.showErrors&&console.error("Error from chart in div ".concat(this.domChartRoot.id,":"),ee);else throw ee}},U.prototype.applyTheme=function(I){var Q,Z,ee;H.prototype.applyTheme.call(this,I),this.renderableSeries.asArray().forEach(function(ie){return ie.applyTheme(I)}),(Q=this.xAxis)===null||Q===void 0||Q.applyTheme(I),(Z=this.yAxis)===null||Z===void 0||Z.applyTheme(I),(ee=this.zAxis)===null||ee===void 0||ee.applyTheme(I),this.invalidateElement()},U.prototype.changeViewportSize=function(I,Q){if(!(!I||!Q||this.isDeleted)){var Z=I*o.DpiHelper.PIXEL_RATIO,ee=Q*o.DpiHelper.PIXEL_RATIO;this.viewportManager.setSize(Z,ee),this.isCopyCanvasSurface?(this.changeMasterCanvasViewportSize(this.webAssemblyContext3D,I,Q),this.domCanvas2D&&o.DpiHelper.setSize(this.domCanvas2D,I,Q)):this.changeWebGLCanvasViewportSize(this.webAssemblyContext3D,I,Q),this.invalidateElement()}},U.prototype.getAnimations=function(){return this.animationList},U.prototype.addAnimation=function(){for(var I=this,Q=[],Z=0;Z<arguments.length;Z++)Q[Z]=arguments[Z];Q!==void 0&&(Q.forEach(function(ee){return I.animationList.push(ee)}),this.invalidateElement())},Object.defineProperty(U.prototype,"isRunningAnimation",{get:function(){return this.animationList.some(function(I){return!I.isComplete})},enumerable:!1,configurable:!0}),U.prototype.onAnimate=function(I){if(I){for(var Q=[],Z=0;Z<this.animationList.length;Z++){var ee=this.animationList[Z];ee.isComplete||(ee.update(I),ee.isComplete||(this.invalidateElement(),Q.push(ee)))}this.animationList=Q}},U.prototype.getXAxisById=function(I){return this.xAxis},U.prototype.getDefaultXAxis=function(){return this.xAxis},U.prototype.getYAxisById=function(I){return this.yAxis},U.prototype.getDefaultYAxis=function(){return this.yAxis},U.prototype.updateWatermark=function(I,Q){var Z,ee;if(!a.IS_TEST_ENV){this.watermarkPropertyPosition.x=I,this.watermarkPropertyPosition.y=Q,this.watermarkProperties.m_fCanvasWidth=(Z=this.getMainCanvas())===null||Z===void 0?void 0:Z.clientWidth,this.watermarkProperties.SetPosition(this.watermarkPropertyPosition);var ie=(ee=this.themeProvider)===null||ee===void 0?void 0:ee.isLightBackground;this.watermarkProperties.m_bIsDarkBackground=ie!==void 0?!ie:!1,this.webAssemblyContext3D.SCRT3DSetWaterMarkProperties(this.watermarkProperties)}},U.prototype.getSeriesViewRectPadding=function(I){return A.Thickness.fromNumber(0)},U.prototype.updateBackground=function(){var I;this.applySciChartBackground((I=this.backgroundProperty)!==null&&I!==void 0?I:this.themeProvider.sciChartBackground)},U.prototype.registerFont=function(I,Q){return i(this,void 0,void 0,function(){var Z=this;return n(this,function(ee){return I.includes(".")||(I+=".ttf"),this.showErrors=!1,[2,new Promise(function(ie,de){var pe=Z.webAssemblyContext3D.SCRTFileLoadCallbackInterface.implement({OnLoadComplete:function(_e,Te){_e?ie(!0):(console.error("Failed to load ".concat(I," from ").concat(Q,".  Error: ").concat(Te)),ie(!1))}});Z.webAssemblyContext3D.SCRTRegisterFile(I,Q,pe)}).then(function(){return Z.showErrors=!0})]})})},U.prototype.updateClipPlanes=function(){var I=this.getSceneWorld();I.SetVisibleRangeMin(this.visibleRangeClipMin),I.SetVisibleRangeMax(this.visibleRangeClipMax),I.SetUseClipPlanes(!1)},U.prototype.applyOptions=function(I){H.prototype.applyOptions.call(this,I),this.camera=new c.CameraController(this.webAssemblyContext3D,I==null?void 0:I.cameraOptions),I!=null&&I.worldDimensions&&(this.worldDimensions=d.Vector3.hydrate(I.worldDimensions)),I!=null&&I.background&&(this.background=I.background),this.xyAxisPlaneProperty=new V.AxisPlane(this,V.EAxisPlaneType.XY,I==null?void 0:I.xyAxisPlane),this.zyAxisPlaneProperty=new V.AxisPlane(this,V.EAxisPlaneType.ZY,I==null?void 0:I.zyAxisPlane),this.zxAxisPlaneProperty=new V.AxisPlane(this,V.EAxisPlaneType.ZX,I==null?void 0:I.zxAxisPlane)},U.prototype.attachChartModifier=function(I){H.prototype.attachChartModifier.call(this,I),I.setParentSurface(this),I.invalidateParentCallback=this.invalidateElement,I.onAttach(),this.invalidateElement()},U.prototype.applySciChartBackground=function(I){this.domChartRoot&&(this.domChartRoot.style.background=I),this.webAssemblyContext3D.SCRT3DSetClearColor(0,0,0,0)},U.prototype.detachSeries=function(I){this.rootEntity&&this.rootEntity.children.remove(I.sceneEntity),I.onDetach(),this.invalidateElement()},U.prototype.attachSeries=function(I){if(I.onAttach(this),!I.sceneEntity)throw new Error("IRenderableSeries3D.sceneEntity must be set before attaching to SciChart3DSurface");this.rootEntity&&this.rootEntity.children.add(I.sceneEntity),this.invalidateElement()},U.prototype.detachAxis=function(I){I&&(I.invalidateParentCallback=void 0,I.parentSurface=void 0)},U.prototype.attachAxis=function(I){if(I){if(I.invalidateParentCallback)throw new Error("Invalid operation in sciChart3DSurface.attachAxis, this axis has already been attached to a SciChart3DSurface. Please detach it from a SciChart3DSurface before attaching to another");I.onAttach(this,I===this.xAxis,I===this.yAxis,I===this.zAxis),this.themeProviderProperty&&I.applyTheme(this.themeProviderProperty),I.invalidateParentCallback=this.invalidateElement}},U.prototype.childPropertyChanged=function(I){this.invalidateElement()},U.prototype.getNextState=function(I){return I===void 0&&(I=!1),i(this,void 0,void 0,function(){return n(this,function(Q){switch(Q.label){case 0:return[4,this.nextStateRender({resumeBefore:!0,invalidateOnResume:!0,suspendAfter:!0})];case 1:return Q.sent(),[2,this.toJSON(I)]}})})},U.prototype.getOptions=function(){var I;"toJSON"in this.themeProvider?I=this.themeProvider.toJSON():I=this.themeProvider;var Q={id:this.id,cameraOptions:this.camera.toJSON(),worldDimensions:this.worldDimensions,heightAspect:this.heightAspect,widthAspect:this.widthAspect,theme:I,background:this.background,loader:this.loaderJson,disableAspect:this.disableAspect,touchAction:this.touchActionProperty,freezeWhenOutOfView:this.freezeWhenOutOfView,xyAxisPlane:this.xyAxisPlaneProperty.toJSON(),zyAxisPlane:this.zyAxisPlaneProperty.toJSON(),zxAxisPlane:this.zxAxisPlaneProperty.toJSON()};return Q},U.prototype.toJSON=function(I){I===void 0&&(I=!1);var Q=this.getOptions(),Z={type:j.ESciChartSurfaceType.Default3D,surface:Q,xAxis:this.xAxis.toJSON(),yAxis:this.yAxis.toJSON(),zAxis:this.zAxis.toJSON(),series:this.renderableSeries.asArray().map(function(ee){return ee.toJSON(I)}),modifiers:this.chartModifiers.asArray().map(function(ee){return ee.toJSON()}),onCreated:this.onCreatedName,createSingle:!this.isCopyCanvasSurface};return Z},U})(t.SciChartSurfaceBase);r.SciChart3DSurface=K})(h0)),h0}var Hle;function uS(){if(Hle)return xs;Hle=1;var r=xs&&xs.__assign||function(){return r=Object.assign||function(xe){for(var ve,he=1,Se=arguments.length;he<Se;he++){ve=arguments[he];for(var be in ve)Object.prototype.hasOwnProperty.call(ve,be)&&(xe[be]=ve[be])}return xe},r.apply(this,arguments)},e=xs&&xs.__awaiter||function(xe,ve,he,Se){function be(ke){return ke instanceof he?ke:new he(function(qe){qe(ke)})}return new(he||(he=Promise))(function(ke,qe){function rt(It){try{xt(Se.next(It))}catch(Zt){qe(Zt)}}function St(It){try{xt(Se.throw(It))}catch(Zt){qe(Zt)}}function xt(It){It.done?ke(It.value):be(It.value).then(rt,St)}xt((Se=Se.apply(xe,ve||[])).next())})},i=xs&&xs.__generator||function(xe,ve){var he={label:0,sent:function(){if(ke[0]&1)throw ke[1];return ke[1]},trys:[],ops:[]},Se,be,ke,qe;return qe={next:rt(0),throw:rt(1),return:rt(2)},typeof Symbol=="function"&&(qe[Symbol.iterator]=function(){return this}),qe;function rt(xt){return function(It){return St([xt,It])}}function St(xt){if(Se)throw new TypeError("Generator is already executing.");for(;he;)try{if(Se=1,be&&(ke=xt[0]&2?be.return:xt[0]?be.throw||((ke=be.return)&&ke.call(be),0):be.next)&&!(ke=ke.call(be,xt[1])).done)return ke;switch(be=0,ke&&(xt=[xt[0]&2,ke.value]),xt[0]){case 0:case 1:ke=xt;break;case 4:return he.label++,{value:xt[1],done:!1};case 5:he.label++,be=xt[1],xt=[0];continue;case 7:xt=he.ops.pop(),he.trys.pop();continue;default:if(ke=he.trys,!(ke=ke.length>0&&ke[ke.length-1])&&(xt[0]===6||xt[0]===2)){he=0;continue}if(xt[0]===3&&(!ke||xt[1]>ke[0]&&xt[1]<ke[3])){he.label=xt[1];break}if(xt[0]===6&&he.label<ke[1]){he.label=ke[1],ke=xt;break}if(ke&&he.label<ke[2]){he.label=ke[2],he.ops.push(xt);break}ke[2]&&he.ops.pop(),he.trys.pop();continue}xt=ve.call(xe,he)}catch(It){xt=[6,It],be=0}finally{Se=ke=0}if(xt[0]&5)throw xt[1];return{value:xt[0]?xt[1]:void 0,done:!0}}};Object.defineProperty(xs,"__esModule",{value:!0}),xs.configure3DSurface=xs.configure2DSurface=xs.buildSubCharts=xs.build3DChart=xs.buildPieChart=xs.build2DPolarChart=xs.build2DChart=void 0;var n=BH(),t=VH(),o=HCe(),a=UCe(),s=ZS(),l=HH(),u=UH(),c=zCe(),d=zH(),f=WH(),h=WCe(),p=GH(),g=YH(),v=GCe(),y=YCe(),m=kH(),b=IH(),S=$Ce(),_=NM(),C=Zq(),T=qCe(),x=$w(),A=Tp(),w=$o(),L=nb(),k=Xc(),D=DX(),j=e3(),N=n3(),V=QN(),W=fg(),K=Jn(),H=AM(),U=ca(),I=I8(),Q=ab(),Z=k8(),ee=M8(),ie=R8(),de=B8(),pe=F8(),_e=cc(),Te=eF(),De=V8();(0,K.registerType)(w.EBaseType.ThemeProvider,H.EThemeProviderType.Light,function(){return new S.SciChartJSLightTheme},!0),(0,K.registerType)(w.EBaseType.ThemeProvider,H.EThemeProviderType.DarkV2,function(){return new b.SciChartJSDarkv2Theme},!0),(0,K.registerType)(w.EBaseType.ThemeProvider,H.EThemeProviderType.Dark,function(){return new m.SciChartJSDarkTheme},!0),(0,K.registerType)(w.EBaseType.ThemeProvider,H.EThemeProviderType.Navy,function(){return new y.SciChartJsNavyTheme},!0),(0,K.registerType)(w.EBaseType.LayoutManager,L.ELayoutManagerType.Default,function(xe){return new s.LayoutManager(xe)},!0),(0,K.registerType)(w.EBaseType.LayoutManager,L.ELayoutManagerType.Polar,function(xe){return new ie.PolarLayoutManager(xe)},!0),(0,K.registerType)(w.EBaseType.LayoutManager,L.ELayoutManagerType.CentralAxes,function(xe){return new a.CentralAxesLayoutManager(xe)},!0),(0,K.registerType)(w.EBaseType.LayoutStrategy,k.ELayoutStrategyType.BottomInner,function(xe){return new n.BottomAlignedInnerAxisLayoutStrategy(xe)},!0),(0,K.registerType)(w.EBaseType.LayoutStrategy,k.ELayoutStrategyType.BottomOuter,function(xe){return new t.BottomAlignedOuterAxisLayoutStrategy},!0),(0,K.registerType)(w.EBaseType.LayoutStrategy,k.ELayoutStrategyType.BottomStacked,function(xe){return new o.BottomAlignedOuterHorizontallyStackedAxisLayoutStrategy},!0),(0,K.registerType)(w.EBaseType.LayoutStrategy,k.ELayoutStrategyType.LeftInner,function(xe){return new l.LeftAlignedInnerAxisLayoutStrategy(xe)},!0),(0,K.registerType)(w.EBaseType.LayoutStrategy,k.ELayoutStrategyType.LeftOuter,function(xe){return new u.LeftAlignedOuterAxisLayoutStrategy},!0),(0,K.registerType)(w.EBaseType.LayoutStrategy,k.ELayoutStrategyType.LeftStacked,function(xe){return new c.LeftAlignedOuterVerticallyStackedAxisLayoutStrategy},!0),(0,K.registerType)(w.EBaseType.LayoutStrategy,k.ELayoutStrategyType.RightInner,function(xe){return new d.RightAlignedInnerAxisLayoutStrategy(xe)},!0),(0,K.registerType)(w.EBaseType.LayoutStrategy,k.ELayoutStrategyType.RightOuter,function(xe){return new f.RightAlignedOuterAxisLayoutStrategy},!0),(0,K.registerType)(w.EBaseType.LayoutStrategy,k.ELayoutStrategyType.RightStacked,function(xe){return new h.RightAlignedOuterVerticallyStackedAxisLayoutStrategy},!0),(0,K.registerType)(w.EBaseType.LayoutStrategy,k.ELayoutStrategyType.TopInner,function(xe){return new p.TopAlignedInnerAxisLayoutStrategy(xe)},!0),(0,K.registerType)(w.EBaseType.LayoutStrategy,k.ELayoutStrategyType.TopOuter,function(xe){return new g.TopAlignedOuterAxisLayoutStrategy},!0),(0,K.registerType)(w.EBaseType.LayoutStrategy,k.ELayoutStrategyType.TopStacked,function(xe){return new v.TopAlignedOuterHorizontallyStackedAxisLayoutStrategy},!0),(0,K.registerType)(w.EBaseType.Loader,"Default",function(){return new C.DefaultSciChartLoader},!0);var Pe=function(xe,ve){return e(void 0,void 0,void 0,function(){var he,Se,be,ke,qe;return i(this,function(rt){switch(rt.label){case 0:return typeof ve=="string"&&(ve=JSON.parse(ve,W.chartReviver)),ve!=null&&ve.createSingle?[4,A.SciChartSurface.createSingle(xe,ve==null?void 0:ve.surface)]:[3,2];case 1:return he=rt.sent(),[3,4];case 2:return[4,A.SciChartSurface.create(xe,ve==null?void 0:ve.surface)];case 3:he=rt.sent(),rt.label=4;case 4:return Se=he.wasmContext,be=he.sciChartSurface,ke=U.PerformanceDebugHelper.mark(U.EPerformanceMarkType.SetupStart,{contextId:be.id}),ot(ve,be,Se),ve.onCreated?(typeof ve.onCreated=="string"&&(be.onCreatedName=ve.onCreated,ve.onCreated=(0,K.getFunction)(w.EBaseType.OnCreateFunction,ve.onCreated)),[4,ve.onCreated(be)]):[3,6];case 5:rt.sent(),rt.label=6;case 6:return U.PerformanceDebugHelper.mark(U.EPerformanceMarkType.SetupEnd,{contextId:be.id,relatedId:(qe=ke==null?void 0:ke.detail)===null||qe===void 0?void 0:qe.relatedId}),[2,{wasmContext:Se,sciChartSurface:be}]}})})};xs.build2DChart=Pe;var Ee=function(xe,ve){return e(void 0,void 0,void 0,function(){var he,Se,be,ke,qe;return i(this,function(rt){switch(rt.label){case 0:return typeof ve=="string"&&(ve=JSON.parse(ve,W.chartReviver)),ve!=null&&ve.createSingle?[4,ee.SciChartPolarSurface.createSingle(xe,ve==null?void 0:ve.surface)]:[3,2];case 1:return he=rt.sent(),[3,4];case 2:return[4,ee.SciChartPolarSurface.create(xe,ve==null?void 0:ve.surface)];case 3:he=rt.sent(),rt.label=4;case 4:return Se=he.wasmContext,be=he.sciChartSurface,ke=U.PerformanceDebugHelper.mark(U.EPerformanceMarkType.SetupStart,{contextId:be.id}),ot(ve,be,Se),ve.onCreated?(typeof ve.onCreated=="string"&&(be.onCreatedName=ve.onCreated,ve.onCreated=(0,K.getFunction)(w.EBaseType.OnCreateFunction,ve.onCreated)),[4,ve.onCreated(be)]):[3,6];case 5:rt.sent(),rt.label=6;case 6:return U.PerformanceDebugHelper.mark(U.EPerformanceMarkType.SetupEnd,{contextId:be.id,relatedId:(qe=ke==null?void 0:ke.detail)===null||qe===void 0?void 0:qe.relatedId}),[2,{wasmContext:Se,sciChartSurface:be}]}})})};xs.build2DPolarChart=Ee;var Re=function(xe,ve){return e(void 0,void 0,void 0,function(){var he,Se,be,ke,qe;return i(this,function(rt){switch(rt.label){case 0:return typeof ve=="string"&&(ve=JSON.parse(ve,W.chartReviver)),[4,x.SciChartPieSurface.create(xe,ve==null?void 0:ve.surface)];case 1:if(he=rt.sent(),ve!=null&&ve.segments)for(Se=0,be=ve==null?void 0:ve.segments;Se<be.length;Se++)ke=be[Se],qe=new T.PieSegment(ke),he.pieSegments.add(qe);return ve.onCreated&&(typeof ve.onCreated=="string"&&(he.onCreatedName=ve.onCreated,ve.onCreated=(0,K.getFunction)(w.EBaseType.OnCreateFunction,ve.onCreated)),ve.onCreated(he)),[2,he]}})})};xs.buildPieChart=Re;var je=function(xe,ve){return e(void 0,void 0,void 0,function(){var he,Se,be,ke,qe,rt,St;return i(this,function(xt){switch(xt.label){case 0:return typeof ve=="string"&&(ve=JSON.parse(ve,W.chartReviver)),ve!=null&&ve.createSingle?[4,Te.SciChart3DSurface.createSingle(xe,r({},ve==null?void 0:ve.surface))]:[3,2];case 1:return he=xt.sent(),[3,4];case 2:return[4,Te.SciChart3DSurface.create(xe,r({},ve==null?void 0:ve.surface))];case 3:he=xt.sent(),xt.label=4;case 4:return!((rt=ve==null?void 0:ve.surface)===null||rt===void 0)&&rt.theme&&("type"in ve.surface.theme?(Se=(0,K.getFunction)(w.EBaseType.ThemeProvider,ve.surface.theme.type).call(null),Se&&he.sciChart3DSurface.applyTheme(Se)):he.sciChart3DSurface.applyTheme(ve.surface.theme)),be=he.wasmContext,ke=he.sciChart3DSurface,qe=U.PerformanceDebugHelper.mark(U.EPerformanceMarkType.SetupStart,{contextId:ke.id}),We(ve,ke,be),ve.onCreated?(typeof ve.onCreated=="string"&&(ke.onCreatedName=ve.onCreated,ve.onCreated=(0,K.getFunction)(w.EBaseType.OnCreateFunction,ve.onCreated)),[4,ve.onCreated(ke)]):[3,6];case 5:xt.sent(),xt.label=6;case 6:return U.PerformanceDebugHelper.mark(U.EPerformanceMarkType.SetupEnd,{contextId:ke.id,relatedId:(St=qe==null?void 0:qe.detail)===null||St===void 0?void 0:St.relatedId}),[2,{wasmContext:be,sciChart3DSurface:ke}]}})})};xs.build3DChart=je;function Ke(xe,ve){for(var he,Se=ve.webAssemblyContext2D,be=Array.isArray(xe)?xe:[xe],ke=[],qe=0,rt=be;qe<rt.length;qe++){var St=rt[qe],xt=((he=St==null?void 0:St.surface)===null||he===void 0?void 0:he.surfaceType)===Q.ESciChartSurfaceType.Polar2D;if(xt){var It=Z.SciChartPolarSubSurface.createSubSurface(ve,St.surface);ot(St,It,Se),ke.push(It)}else{var It=I.SciChartSubSurface.createSubSurface(ve,St.surface);ot(St,It,Se),ke.push(It)}}return ke}xs.buildSubCharts=Ke;function ot(xe,ve,he){var Se,be,ke,qe,rt;xe.xAxes&&(Se=ve.xAxes).add.apply(Se,(0,j.buildAxes)(he,xe.xAxes)),xe.yAxes&&(be=ve.yAxes).add.apply(be,(0,j.buildAxes)(he,xe.yAxes)),ve.isPolar?(ve.xAxes.size()===0&&!xe.subCharts&&ve.xAxes.add(new de.PolarNumericAxis(he,{polarAxisMode:pe.EPolarAxisMode.Angular,axisAlignment:_e.EAxisAlignment.Top})),ve.yAxes.size()===0&&!xe.subCharts&&ve.yAxes.add(new de.PolarNumericAxis(he,{polarAxisMode:pe.EPolarAxisMode.Radial,axisAlignment:_e.EAxisAlignment.Right}))):(ve.xAxes.size()===0&&!xe.subCharts&&ve.xAxes.add(new _.NumericAxis(he)),ve.yAxes.size()===0&&!xe.subCharts&&ve.yAxes.add(new _.NumericAxis(he))),xe.series&&(ke=ve.renderableSeries).add.apply(ke,(0,V.buildSeries)(he,xe.series,xe.sharedData)),xe.modifiers&&(qe=ve.chartModifiers).add.apply(qe,(0,N.buildModifiers)(xe.modifiers)),xe.annotations&&(rt=ve.annotations).add.apply(rt,(0,D.buildAnnotations)(xe.annotations)),xe.subCharts&&!ve.isSubSurface&&Ke(xe.subCharts,ve)}xs.configure2DSurface=ot;function We(xe,ve,he){var Se,be;xe.xAxis?ve.xAxis=(0,j.buildAxis3D)(he,xe.xAxis):ve.xAxis=new De.NumericAxis3D(he),xe.yAxis?ve.yAxis=(0,j.buildAxis3D)(he,xe.yAxis):ve.yAxis=new De.NumericAxis3D(he),xe.zAxis?ve.zAxis=(0,j.buildAxis3D)(he,xe.zAxis):ve.zAxis=new De.NumericAxis3D(he),xe.series&&(Se=ve.renderableSeries).add.apply(Se,(0,V.buildSeries3D)(he,xe.series,xe.sharedData)),xe.modifiers&&(be=ve.chartModifiers).add.apply(be,(0,N.buildModifiers3D)(xe.modifiers))}return xs.configure3DSurface=We,xs}var Ule;function fg(){return Ule||(Ule=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.chartBuilder=r.ensureRegistrations=r.configureChart=r.buildChart=r.chartReviver=void 0;var e=oi(),i=Yo(),n=ab(),t=DX(),o=e3(),a=XN(),s=n3(),l=QN(),u=uS(),c=Jn();function d(v,y){switch(v){case"visibleRange":case"visibleRangeLimit":case"visibleRangeSizeLimit":case"growBy":return new e.NumberRange(y.min,y.max);case"padding":var m=y;return new i.Thickness(m.top,m.right,m.bottom,m.left);default:return y===null?NaN:y}}r.chartReviver=d;var f=function(v){return"options"in v?v.options:v};function h(v,y){var m;typeof y=="string"&&(y=JSON.parse(y,d)),y||(y={});var b=(m=y==null?void 0:y.type)!==null&&m!==void 0?m:n.ESciChartSurfaceType.Default2D,S=f(y);if(b===n.ESciChartSurfaceType.Default2D)return(0,u.build2DChart)(v,S);if(b===n.ESciChartSurfaceType.Polar2D)return(0,u.build2DPolarChart)(v,S);if(b===n.ESciChartSurfaceType.Pie2D)return(0,u.buildPieChart)(v,S);if(b===n.ESciChartSurfaceType.Default3D)return(0,u.build3DChart)(v,S);throw new Error("Surface type: ".concat(b," does not exist. See ESciChartSurfaceType for all available types."))}r.buildChart=h;var p=function(v,y,m){var b;typeof m=="string"&&(m=JSON.parse(m,d)),m||(m={});var S=(b=m==null?void 0:m.type)!==null&&b!==void 0?b:n.ESciChartSurfaceType.Default2D,_=f(m);if(S===n.ESciChartSurfaceType.Default2D)(0,u.configure2DSurface)(_,v,y);else if(S!==n.ESciChartSurfaceType.Pie2D)throw new Error("Surface type: ".concat(S," is not yet supported by the builder api"))};r.configureChart=p;var g=function(){};r.ensureRegistrations=g,r.chartBuilder={buildChart:h,chartReviver:d,build2DChart:u.build2DChart,build2DPolarChart:u.build2DPolarChart,buildPieChart:u.buildPieChart,configureChart:r.configureChart,buildSeries:l.buildSeries,buildDataSeries:a.buildDataSeries,buildModifiers:s.buildModifiers,buildAxes:o.buildAxes,buildAnnotations:t.buildAnnotations,registerType:c.registerType,registerWasmType:c.registerWasmType,registerFunction:c.registerFunction,build3DChart:u.build3DChart,buildAxis3D:o.buildAxis3D,buildModifiers3D:s.buildModifiers3D,buildSeries3D:l.buildSeries3D,buildDataSeries3D:a.buildDataSeries3D}})(I5)),I5}var zle;function DX(){if(zle)return ek;zle=1,Object.defineProperty(ek,"__esModule",{value:!0}),ek.buildAnnotations=void 0;var r=SSe(),e=ZH(),i=_Se(),n=PSe(),t=m8(),o=b8(),a=CSe(),s=TSe(),l=Aa(),u=t_(),c=yY(),d=JV(),f=ASe(),h=wSe(),p=OSe(),g=$o(),v=fg(),y=Jn(),m=lU();(0,y.registerType)(g.EBaseType.Annotation,l.EAnnotationType.RenderContextAxisMarkerAnnotation,function(S){return new i.AxisMarkerAnnotation(S)},!0),(0,y.registerType)(g.EBaseType.Annotation,l.EAnnotationType.RenderContextBoxAnnotation,function(S){return new n.BoxAnnotation(S)},!0),(0,y.registerType)(g.EBaseType.Annotation,l.EAnnotationType.RenderContextHorizontalLineAnnotation,function(S){return new a.HorizontalLineAnnotation(S)},!0),(0,y.registerType)(g.EBaseType.Annotation,l.EAnnotationType.RenderContextLineAnnotation,function(S){return new u.LineAnnotation(S)},!0),(0,y.registerType)(g.EBaseType.Annotation,l.EAnnotationType.RenderContextVerticalLineAnnotation,function(S){return new p.VerticalLineAnnotation(S)},!0),(0,y.registerType)(g.EBaseType.Annotation,l.EAnnotationType.SVGTextAnnotation,function(S){return new h.TextAnnotation(S)},!0),(0,y.registerType)(g.EBaseType.Annotation,l.EAnnotationType.SVGCustomAnnotation,function(S){return new t.CustomAnnotation(S)},!0),(0,y.registerType)(g.EBaseType.Annotation,l.EAnnotationType.SVGPolarPointerAnnotation,function(S){return new f.PolarPointerAnnotation(S)}),(0,y.registerType)(g.EBaseType.Annotation,l.EAnnotationType.HtmlTextAnnotation,function(S){return new s.HtmlTextAnnotation(S)},!0),(0,y.registerType)(g.EBaseType.Annotation,l.EAnnotationType.RenderContextNativeTextAnnotation,function(S){return new d.NativeTextAnnotation(S)},!0),(0,y.registerType)(g.EBaseType.Annotation,l.EAnnotationType.RenderContextArcAnnotation,function(S){return new r.ArcAnnotation(S)},!0),(0,y.registerType)(g.EBaseType.Annotation,l.EAnnotationType.HtmlCustomAnnotation,function(S){return new o.HtmlCustomAnnotation(S)},!0),(0,y.registerType)(g.EBaseType.Annotation,l.EAnnotationType.RenderContextLineArrowAnnotation,function(S){return new c.LineArrowAnnotation(S)},!0),(0,y.registerType)(g.EBaseType.Annotation,l.EAnnotationType.RenderContextPolarArcAnnotation,function(S){return new e.PolarArcAnnotation(S)},!0),(0,y.registerType)(g.EBaseType.Annotation,l.EAnnotationType.SvgLineAnnotation,function(S){return new m.SvgLineAnnotation(S)},!0);var b=function(S){typeof S=="string"&&(S=JSON.parse(S,v.chartReviver));var _=[];if(Array.isArray(S))for(var C=0,T=S;C<T.length;C++){var x=T[C];_.push((0,y.createType)(g.EBaseType.Annotation,x.type,null,x.options))}else _.push((0,y.createType)(g.EBaseType.Annotation,S.type,null,S.options));return _};return ek.buildAnnotations=b,ek}var KA={},Wle;function uze(){if(Wle)return KA;Wle=1;var r=KA&&KA.__extends||(function(){var t=function(o,a){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");t(o,a);function s(){this.constructor=o}o.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}})();Object.defineProperty(KA,"__esModule",{value:!0}),KA.CustomChartModifier2D=void 0;var e=bo(),i=nu(),n=(function(t){r(o,t);function o(a){var s=t.call(this,a)||this;return s.type=e.EChart2DModifierType.Custom,s}return o})(i.ChartModifierBase2D);return KA.CustomChartModifier2D=n,KA}var T2={},Gle;function cze(){if(Gle)return T2;Gle=1,Object.defineProperty(T2,"__esModule",{value:!0}),T2.RenderContext2D=void 0;var r=(function(){function e(i){this.canvas2D=i,this.ctx2D=i.getContext("2d")}return e.prototype.drawRect=function(i,n,t,o,a){a===void 0&&(a="rgba(211,211,211,0.5)"),this.clear(),this.ctx2D.fillStyle=a,this.ctx2D.fillRect(i,n,t,o)},e.prototype.drawCircle=function(i,n,t,o){var a=0,s=o;this.clear(),this.ctx2D.beginPath(),this.ctx2D.arc(i,n,t,0,2*Math.PI,!1),this.ctx2D.fillStyle=o,this.ctx2D.fill(),this.ctx2D.lineWidth=a,this.ctx2D.strokeStyle=s,this.ctx2D.stroke()},e.prototype.clear=function(){this.ctx2D.clearRect(0,0,this.canvas2D.width,this.canvas2D.height)},e})();return T2.RenderContext2D=r,T2}var x2={},ZA={},Yle;function RX(){if(Yle)return ZA;Yle=1;var r=ZA&&ZA.__extends||(function(){var a=function(s,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(u[d]=c[d])},a(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})();Object.defineProperty(ZA,"__esModule",{value:!0}),ZA.SynchronizedLayoutManager=void 0;var e=nb(),i=ws(),n=ZS(),t=Yo(),o=(function(a){r(s,a);function s(l,u,c){var d=a.call(this,c)||this;return d.type=e.ELayoutManagerType.Synchronised,d.id=(0,i.generateGuid)(),d.lastLeftOuterAreaSize=0,d.lastRightOuterAreaSize=0,d.lastTopOuterAreaSize=0,d.lastBottomOuterAreaSize=0,d.verticalGroup=l??void 0,d.horizontalGroup=u??void 0,d}return s.prototype.layoutChart=function(l,u){var c=this.sciChartSurface.chartTitleRenderer.titleOffset;if(this.verticalGroup&&this.horizontalGroup){var d=t.Thickness.mergeMax(this.verticalGroup.calculateMaxTitleSize(),this.horizontalGroup.calculateMaxTitleSize()),f=t.Thickness.mergeSubtract(d,c),h=t.Thickness.mergeAdd(u,f),p=a.prototype.layoutChart.call(this,l,h);return this.verticalGroup.synchronizeAxisSizes(),this.horizontalGroup.synchronizeAxisSizes(),p}else if(this.verticalGroup){var f=t.Thickness.mergeSubtract(this.verticalGroup.calculateMaxTitleSize(),c),p=a.prototype.layoutChart.call(this,l,t.Thickness.mergeAdd(u,f));return this.verticalGroup.synchronizeAxisSizes(),p}else if(this.horizontalGroup){var f=t.Thickness.mergeSubtract(this.horizontalGroup.calculateMaxTitleSize(),c),p=a.prototype.layoutChart.call(this,l,t.Thickness.mergeAdd(u,f));return this.horizontalGroup.synchronizeAxisSizes(),p}return a.prototype.layoutChart.call(this,l,u)},s.prototype.trySynchronizeLayouts=function(){this.verticalGroup&&(this.lastLeftOuterAreaSize!==this.verticalGroup.groupLeftSize||this.lastRightOuterAreaSize!==this.verticalGroup.groupRightSize)&&this.sciChartSurface.invalidateElement(),this.horizontalGroup&&(this.lastTopOuterAreaSize!==this.horizontalGroup.groupTopSize||this.lastBottomOuterAreaSize!==this.horizontalGroup.groupBottomSize)&&this.sciChartSurface.invalidateElement()},s.prototype.measureLeftOuterAxes=function(){if(a.prototype.measureLeftOuterAxes.call(this),!this.verticalGroup){a.prototype.measureLeftOuterAxes.call(this);return}this.verticalGroup.onLeftSizeChanged(this.id,this.chartLayoutState.leftOuterAreaSize);var l=this.chartLayoutState.leftOuterAreaSize,u=this.verticalGroup.groupLeftSize,c=Math.abs(l)>Math.abs(u)?l:u;if(this.axesGroupedByLayoutStrategy.leftOuterAxes.length>0){var d=this.axesGroupedByLayoutStrategy.leftOuterAxes[this.axesGroupedByLayoutStrategy.leftOuterAxes.length-1],f=this.chartLayoutState.leftOuterAreaSize-d.axisLayoutState.axisSize;d.axisLayoutState.axisSize=c-f}this.chartLayoutState.leftOuterAreaSize=c,this.lastLeftOuterAreaSize=c},s.prototype.measureRightOuterAxes=function(){if(a.prototype.measureRightOuterAxes.call(this),!this.verticalGroup){a.prototype.measureRightOuterAxes.call(this);return}this.verticalGroup.onRightSizeChanged(this.id,this.chartLayoutState.rightOuterAreaSize);var l=this.chartLayoutState.rightOuterAreaSize,u=this.verticalGroup.groupRightSize,c=Math.abs(l)>Math.abs(u)?l:u;if(this.axesGroupedByLayoutStrategy.rightOuterAxes.length>0){var d=this.axesGroupedByLayoutStrategy.rightOuterAxes[this.axesGroupedByLayoutStrategy.rightOuterAxes.length-1],f=this.chartLayoutState.rightOuterAreaSize-d.axisLayoutState.axisSize;d.axisLayoutState.axisSize=c-f}this.chartLayoutState.rightOuterAreaSize=c,this.lastRightOuterAreaSize=c},s.prototype.measureTopOuterAxes=function(){if(a.prototype.measureTopOuterAxes.call(this),!!this.horizontalGroup){this.horizontalGroup.onTopSizeChanged(this.id,this.chartLayoutState.topOuterAreaSize);var l=this.chartLayoutState.topOuterAreaSize,u=this.horizontalGroup.groupTopSize,c=Math.abs(l)>Math.abs(u)?l:u;if(this.axesGroupedByLayoutStrategy.topOuterAxes.length>0){var d=this.axesGroupedByLayoutStrategy.topOuterAxes[this.axesGroupedByLayoutStrategy.topOuterAxes.length-1],f=this.chartLayoutState.topOuterAreaSize-d.axisLayoutState.axisSize;d.axisLayoutState.axisSize=c-f}this.chartLayoutState.topOuterAreaSize=c,this.lastTopOuterAreaSize=c}},s.prototype.measureBottomOuterAxes=function(){if(a.prototype.measureBottomOuterAxes.call(this),!!this.horizontalGroup){this.horizontalGroup.onBottomSizeChanged(this.id,this.chartLayoutState.bottomOuterAreaSize);var l=this.chartLayoutState.bottomOuterAreaSize,u=this.horizontalGroup.groupBottomSize,c=Math.abs(l)>Math.abs(u)?l:u;if(this.axesGroupedByLayoutStrategy.bottomOuterAxes.length>0){var d=this.axesGroupedByLayoutStrategy.bottomOuterAxes[this.axesGroupedByLayoutStrategy.bottomOuterAxes.length-1],f=this.chartLayoutState.bottomOuterAreaSize-d.axisLayoutState.axisSize;d.axisLayoutState.axisSize=c-f}this.chartLayoutState.bottomOuterAreaSize=c,this.lastBottomOuterAreaSize=c}},s})(n.LayoutManager);return ZA.SynchronizedLayoutManager=o,ZA}var $le;function dze(){if($le)return x2;$le=1,Object.defineProperty(x2,"__esModule",{value:!0}),x2.SciChartHorizontalGroup=void 0;var r=Yo(),e=nb(),i=ZS(),n=RX(),t=(function(){function a(){this.groupTopSize=0,this.groupBottomSize=0,this.layoutManagers=[],this.topOuterLayoutSizes={},this.bottomOuterLayoutSizes={}}return a.prototype.addSurfaceToGroup=function(s){var l=s.layoutManager;l.type!==e.ELayoutManagerType.Synchronised?(l=new n.SynchronizedLayoutManager(void 0,this),l.bottomInnerAxesLayoutStrategy=s.layoutManager.bottomInnerAxesLayoutStrategy,l.bottomOuterAxesLayoutStrategy=s.layoutManager.bottomOuterAxesLayoutStrategy,l.leftInnerAxesLayoutStrategy=s.layoutManager.leftInnerAxesLayoutStrategy,l.leftOuterAxesLayoutStrategy=s.layoutManager.leftOuterAxesLayoutStrategy,l.rightInnerAxesLayoutStrategy=s.layoutManager.rightInnerAxesLayoutStrategy,l.rightOuterAxesLayoutStrategy=s.layoutManager.rightOuterAxesLayoutStrategy,l.topInnerAxesLayoutStrategy=s.layoutManager.topInnerAxesLayoutStrategy,l.topOuterAxesLayoutStrategy=s.layoutManager.topOuterAxesLayoutStrategy,s.layoutManager=l):l.horizontalGroup=this,this.layoutManagers.push(l)},a.prototype.removeSurface=function(s){var l=s.layoutManager,u=this.layoutManagers.findIndex(function(d){return d===l});if(u<0)throw new Error("Surface ".concat(s.id," not found in Horizontal Group!"));if(this.layoutManagers.splice(u,1),l.verticalGroup)l.horizontalGroup=void 0;else{var c=new i.LayoutManager;c.leftInnerAxesLayoutStrategy=l.leftInnerAxesLayoutStrategy,c.leftOuterAxesLayoutStrategy=l.leftOuterAxesLayoutStrategy,c.rightInnerAxesLayoutStrategy=l.rightInnerAxesLayoutStrategy,c.rightOuterAxesLayoutStrategy=l.rightOuterAxesLayoutStrategy,c.bottomInnerAxesLayoutStrategy=l.bottomInnerAxesLayoutStrategy,c.bottomOuterAxesLayoutStrategy=l.bottomOuterAxesLayoutStrategy,c.topInnerAxesLayoutStrategy=l.topInnerAxesLayoutStrategy,c.topOuterAxesLayoutStrategy=l.topOuterAxesLayoutStrategy,s.layoutManager=c}s.layoutManager.layoutChart(s.renderSurface.viewportSize,s.chartTitleRenderer.titleOffset),this.onTopSizeChanged(l.id,0),this.onBottomSizeChanged(l.id,0),delete this.topOuterLayoutSizes[l.id],delete this.bottomOuterLayoutSizes[l.id],this.synchronizeAxisSizes(),s.invalidateElement()},a.prototype.calculateMaxTitleSize=function(){var s=new r.Thickness(0,0,0,0);return this.layoutManagers.forEach(function(l){var u=l.sciChartSurface.chartTitleRenderer.titleOffset;s=r.Thickness.mergeMax(s,new r.Thickness(u.top,0,u.bottom,0))}),s},a.prototype.synchronizeAxisSizes=function(){this.layoutManagers.forEach(function(s){s.trySynchronizeLayouts()})},a.prototype.onTopSizeChanged=function(s,l){this.topOuterLayoutSizes[s]=l,this.groupTopSize=o(this.topOuterLayoutSizes)},a.prototype.onBottomSizeChanged=function(s,l){this.bottomOuterLayoutSizes[s]=l,this.groupBottomSize=o(this.bottomOuterLayoutSizes)},a})();x2.SciChartHorizontalGroup=t;var o=function(a){var s=0;return Object.keys(a).forEach(function(l){s=Math.max(s,a[l])}),s};return x2}var E2={},qle;function fze(){if(qle)return E2;qle=1,Object.defineProperty(E2,"__esModule",{value:!0}),E2.SciChartVerticalGroup=void 0;var r=Yo(),e=nb(),i=ZS(),n=RX(),t=(function(){function a(){this.groupRightSize=0,this.groupLeftSize=0,this.layoutManagers=[],this.leftOuterLayoutSizes={},this.rightOuterLayoutSizes={}}return a.prototype.addSurfaceToGroup=function(s){var l=s.layoutManager;l.type!==e.ELayoutManagerType.Synchronised?(l=new n.SynchronizedLayoutManager(this),l.bottomInnerAxesLayoutStrategy=s.layoutManager.bottomInnerAxesLayoutStrategy,l.bottomOuterAxesLayoutStrategy=s.layoutManager.bottomOuterAxesLayoutStrategy,l.leftInnerAxesLayoutStrategy=s.layoutManager.leftInnerAxesLayoutStrategy,l.leftOuterAxesLayoutStrategy=s.layoutManager.leftOuterAxesLayoutStrategy,l.rightInnerAxesLayoutStrategy=s.layoutManager.rightInnerAxesLayoutStrategy,l.rightOuterAxesLayoutStrategy=s.layoutManager.rightOuterAxesLayoutStrategy,l.topInnerAxesLayoutStrategy=s.layoutManager.topInnerAxesLayoutStrategy,l.topOuterAxesLayoutStrategy=s.layoutManager.topOuterAxesLayoutStrategy,s.layoutManager=l):l.verticalGroup=this,this.layoutManagers.push(l)},a.prototype.removeSurface=function(s){var l=s.layoutManager,u=this.layoutManagers.findIndex(function(d){return d===l});if(u<0)throw new Error("Surface ".concat(s.id," not found in Vertical Group!"));if(this.layoutManagers.splice(u,1),l.horizontalGroup)l.verticalGroup=void 0;else{var c=new i.LayoutManager;c.bottomInnerAxesLayoutStrategy=l.bottomInnerAxesLayoutStrategy,c.bottomOuterAxesLayoutStrategy=l.bottomOuterAxesLayoutStrategy,c.topInnerAxesLayoutStrategy=l.topInnerAxesLayoutStrategy,c.topOuterAxesLayoutStrategy=l.topOuterAxesLayoutStrategy,c.leftInnerAxesLayoutStrategy=l.leftInnerAxesLayoutStrategy,c.leftOuterAxesLayoutStrategy=l.leftOuterAxesLayoutStrategy,c.rightInnerAxesLayoutStrategy=l.rightInnerAxesLayoutStrategy,c.rightOuterAxesLayoutStrategy=l.rightOuterAxesLayoutStrategy,s.layoutManager=c}s.layoutManager.layoutChart(s.renderSurface.viewportSize,s.chartTitleRenderer.titleOffset),this.onLeftSizeChanged(l.id,0),this.onRightSizeChanged(l.id,0),delete this.leftOuterLayoutSizes[l.id],delete this.rightOuterLayoutSizes[l.id],this.synchronizeAxisSizes()},a.prototype.calculateMaxTitleSize=function(){var s=new r.Thickness(0,0,0,0);return this.layoutManagers.forEach(function(l){var u=l.sciChartSurface.chartTitleRenderer.titleOffset;s=r.Thickness.mergeMax(s,new r.Thickness(0,u.right,0,u.left))}),s},a.prototype.synchronizeAxisSizes=function(){this.layoutManagers.forEach(function(s){s.trySynchronizeLayouts()})},a.prototype.onLeftSizeChanged=function(s,l){this.leftOuterLayoutSizes[s]=l,this.groupLeftSize=o(this.leftOuterLayoutSizes)},a.prototype.onRightSizeChanged=function(s,l){this.rightOuterLayoutSizes[s]=l,this.groupRightSize=o(this.rightOuterLayoutSizes)},a})();E2.SciChartVerticalGroup=t;var o=function(a){var s=0;return Object.keys(a).forEach(function(l){s=Math.max(s,a[l])}),s};return E2}var A2={},Xle;function hze(){if(Xle)return A2;Xle=1,Object.defineProperty(A2,"__esModule",{value:!0}),A2.BasePaletteProvider=void 0;var r=(function(){function e(){}return e.prototype.onAttached=function(i){},e.prototype.onDetached=function(){},e})();return A2.BasePaletteProvider=r,A2}var w2={},Kle;function pze(){if(Kle)return w2;Kle=1,Object.defineProperty(w2,"__esModule",{value:!0}),w2.MetadataPaletteProvider=void 0;var r=mi(),e=H0(),i=(function(){function n(){this.strokePaletteMode=e.EStrokePaletteMode.SOLID,this.fillPaletteMode=e.EFillPaletteMode.SOLID}return n.prototype.onAttached=function(t){},n.prototype.onDetached=function(){},n.prototype.overrideFillArgb=function(t,o,a,s,l){if(!(!l||!l.fill))return typeof l.fill=="string"?(0,r.parseColorToUIntArgb)(l.fill):l.fill},n.prototype.overrideStrokeArgb=function(t,o,a,s,l){if(!(!l||!l.stroke))return typeof l.stroke=="string"?(0,r.parseColorToUIntArgb)(l.stroke):l.stroke},n.prototype.overridePointMarkerArgb=function(t,o,a,s,l){if(l){var u=void 0,c=void 0;return typeof l.stroke=="string"?u=(0,r.parseColorToUIntArgb)(l.stroke):u=l.stroke,typeof l.fill=="string"?c=(0,r.parseColorToUIntArgb)(l.fill):c=l.fill,{stroke:u,fill:c}}},n})();return w2.MetadataPaletteProvider=i,w2}var O2={},Zle;function gze(){if(Zle)return O2;Zle=1,Object.defineProperty(O2,"__esModule",{value:!0}),O2.RenderPassDataCollection=void 0;var r=(function(){function e(){}return e})();return O2.RenderPassDataCollection=r,O2}var JA={},Jle;function Qle(){if(Jle)return JA;Jle=1,Object.defineProperty(JA,"__esModule",{value:!0}),JA.getAxis3dById=JA.getAxisById=void 0;var r=ni();function e(t,o){return n(t,o)}JA.getAxisById=e;function i(t,o){return n(t,o)}JA.getAxis3dById=i;function n(t,o){r.Guard.notNull(t,"axes");for(var a=0;a<t.size();a++){var s=t.get(a);if(s.id===o)return s}console.warn("scichart getAxisGeneric(): Axis with Id '".concat(o,"' was not found"))}return JA}var QA={},eue;function vze(){if(eue)return QA;eue=1;var r=QA&&QA.__extends||(function(){var n=function(t,o){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(a[l]=s[l])},n(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");n(t,o);function a(){this.constructor=t}t.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}})();Object.defineProperty(QA,"__esModule",{value:!0}),QA.RadianLabelProvider=void 0;var e=sy(),i=(function(n){r(t,n);function t(o){o===void 0&&(o={});var a=this,s,l;return a=n.call(this,o)||this,a.maxDenominatorProperty=12,a.errorToleranceProperty=1e-4,a.maxDenominatorProperty=(s=o.maxDenominator)!==null&&s!==void 0?s:a.maxDenominatorProperty,a.errorToleranceProperty=(l=o.errorTolerance)!==null&&l!==void 0?l:a.errorToleranceProperty,a}return Object.defineProperty(t.prototype,"maxDenominator",{get:function(){return this.maxDenominatorProperty},set:function(o){this.maxDenominatorProperty=o},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"errorTolerance",{get:function(){return this.errorToleranceProperty},set:function(o){this.errorToleranceProperty=o},enumerable:!1,configurable:!0}),t.prototype.getGCD=function(o,a){for(;a!==0;)a=o%(o=a);return Math.abs(o)},t.prototype.findFraction=function(o){for(var a=0,s=1,l=1/0,u=1;u<=this.maxDenominatorProperty;u++){var c=Math.round(o*u),d=Math.abs(o-c/u);d<l&&(l=d,a=c,s=u)}if(l<this.errorToleranceProperty){var f=this.getGCD(a,s);return{numerator:a/f,denominator:s/f}}return null},Object.defineProperty(t.prototype,"formatLabel",{get:function(){var o=this;return function(a){var s;if(a===0)return"0";var l=a/Math.PI,u=o.findFraction(l);if(u){if(!u)return a.toString();var c=u.numerator,d=u.denominator;return d===1?c===1?"π":"".concat(c,"π"):c===1?"π/".concat(d):"".concat(c,"π/").concat(d)}return a.toFixed((s=o==null?void 0:o.precision)!==null&&s!==void 0?s:1)}},enumerable:!1,configurable:!0}),t})(e.NumericLabelProvider);return QA.RadianLabelProvider=i,QA}var uh={},CW={},tue;function sTe(){return tue||(tue=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.zeroArray2D=void 0;var e=function(i){if(i){for(var n=[],t=0;t<i[0];++t)n.push(i.length===1?0:(0,r.zeroArray2D)(i.slice(1)));return n}};r.zeroArray2D=e})(CW)),CW}var rue;function yze(){if(rue)return uh;rue=1;var r=uh&&uh.__extends||(function(){var g=function(v,y){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,b){m.__proto__=b}||function(m,b){for(var S in b)Object.prototype.hasOwnProperty.call(b,S)&&(m[S]=b[S])},g(v,y)};return function(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");g(v,y);function m(){this.constructor=v}v.prototype=y===null?Object.create(y):(m.prototype=y.prototype,new m)}})(),e=uh&&uh.__assign||function(){return e=Object.assign||function(g){for(var v,y=1,m=arguments.length;y<m;y++){v=arguments[y];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(g[b]=v[b])}return g},e.apply(this,arguments)},i=uh&&uh.__awaiter||function(g,v,y,m){function b(S){return S instanceof y?S:new y(function(_){_(S)})}return new(y||(y=Promise))(function(S,_){function C(A){try{x(m.next(A))}catch(w){_(w)}}function T(A){try{x(m.throw(A))}catch(w){_(w)}}function x(A){A.done?S(A.value):b(A.value).then(C,T)}x((m=m.apply(g,v||[])).next())})},n=uh&&uh.__generator||function(g,v){var y={label:0,sent:function(){if(S[0]&1)throw S[1];return S[1]},trys:[],ops:[]},m,b,S,_;return _={next:C(0),throw:C(1),return:C(2)},typeof Symbol=="function"&&(_[Symbol.iterator]=function(){return this}),_;function C(x){return function(A){return T([x,A])}}function T(x){if(m)throw new TypeError("Generator is already executing.");for(;y;)try{if(m=1,b&&(S=x[0]&2?b.return:x[0]?b.throw||((S=b.return)&&S.call(b),0):b.next)&&!(S=S.call(b,x[1])).done)return S;switch(b=0,S&&(x=[x[0]&2,S.value]),x[0]){case 0:case 1:S=x;break;case 4:return y.label++,{value:x[1],done:!1};case 5:y.label++,b=x[1],x=[0];continue;case 7:x=y.ops.pop(),y.trys.pop();continue;default:if(S=y.trys,!(S=S.length>0&&S[S.length-1])&&(x[0]===6||x[0]===2)){y=0;continue}if(x[0]===3&&(!S||x[1]>S[0]&&x[1]<S[3])){y.label=x[1];break}if(x[0]===6&&y.label<S[1]){y.label=S[1],S=x;break}if(S&&y.label<S[2]){y.label=S[2],y.ops.push(x);break}S[2]&&y.ops.pop(),y.trys.pop();continue}x=v.call(g,y)}catch(A){x=[6,A],b=0}finally{m=S=0}if(x[0]&5)throw x[1];return{value:x[0]?x[1]:void 0,done:!0}}};Object.defineProperty(uh,"__esModule",{value:!0}),uh.HeatmapLegend=void 0;var t=ni(),o=oi(),a=sTe(),s=G8(),l=NM(),u=yU(),c=SU(),d=Tp(),f=Mr(),h=$n(),p=(function(g){r(v,g);function v(y,m){var b=this,S,_,C,T,x,A,w;b=g.call(this)||this,b.SIZE=100,t.Guard.notNull(y,"sciChartSurface"),b.sciChartSurface=y,b.wasmContext=y.webAssemblyContext2D;var L=(_=(S=m==null?void 0:m.colorMap)===null||S===void 0?void 0:S.minimum)!==null&&_!==void 0?_:0,k=(T=(C=m==null?void 0:m.colorMap)===null||C===void 0?void 0:C.maximum)!==null&&T!==void 0?T:100,D=(A=(x=m==null?void 0:m.colorMap)===null||x===void 0?void 0:x.gradientStops)!==null&&A!==void 0?A:b.getDefaultGradientStops();y.xAxes.add(new l.NumericAxis(b.wasmContext,e({},b.getDefaultXAxisOptions()))),y.yAxes.add(new l.NumericAxis(b.wasmContext,e(e(e({},b.getDefaultYAxisOptions()),m==null?void 0:m.yAxisOptions),{visibleRange:new o.NumberRange(L,k)})));var j=b.getZValues(L,k);return y.renderableSeries.add(new c.UniformHeatmapRenderableSeries(b.wasmContext,{dataSeries:new s.UniformHeatmapDataSeries(b.wasmContext,{xStart:0,xStep:1,yStart:L,yStep:(k-L)/b.SIZE,zValues:j}),useLinearTextureFiltering:!0,colorMap:(w=m==null?void 0:m.colorMap)!==null&&w!==void 0?w:new u.HeatmapColorMap({minimum:L,maximum:k,gradientStops:D})})),b}return v.create=function(y,m){return i(this,void 0,void 0,function(){var b,S,_,C;return n(this,function(T){switch(T.label){case 0:return[4,d.SciChartSurface.create(y,{theme:m==null?void 0:m.theme})];case 1:return b=T.sent(),S=b.sciChartSurface,_=b.wasmContext,C=new v(S,m),[2,{wasmContext:_,heatmapLegend:C}]}})})},v.prototype.delete=function(){this.sciChartSurface=(0,f.deleteSafe)(this.sciChartSurface),this.wasmContext=void 0},Object.defineProperty(v.prototype,"innerSciChartSurface",{get:function(){return{sciChartSurface:this.sciChartSurface,wasmContext:this.wasmContext}},enumerable:!1,configurable:!0}),v.prototype.getDefaultGradientStops=function(){return[{offset:1,color:"Red"},{offset:0,color:"Blue"}]},v.prototype.getDefaultXAxisOptions=function(){return{drawMajorGridLines:!1,drawMinorGridLines:!1,drawMajorTickLines:!1,drawMinorTickLines:!1,drawLabels:!1}},v.prototype.getDefaultYAxisOptions=function(){return{maxAutoTicks:5,drawMajorGridLines:!1,drawMinorGridLines:!1,drawLabels:!0,drawMajorTickLines:!0,drawMinorTickLines:!0}},v.prototype.getZValues=function(y,m){for(var b=(0,a.zeroArray2D)([this.SIZE,1]),S=(m-y)/(this.SIZE-1),_=0,C=y;_<this.SIZE;_++,C+=S)b[_][0]=C;return b},v})(h.DeletableEntity);return uh.HeatmapLegend=p,uh}var ew={},iue;function mze(){if(iue)return ew;iue=1;var r=ew&&ew.__extends||(function(){var t=function(o,a){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");t(o,a);function s(){this.constructor=o}o.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}})();Object.defineProperty(ew,"__esModule",{value:!0}),ew.ManualLegend=void 0;var e=Yo(),i=Pv(),n=(function(t){r(o,t);function o(a,s){var l=this,u,c,d;return l=t.call(this,a)||this,l.type=i.ELegendType.ManualLegend,l.itemsProperty=[],l.showCheckboxesProperty=!1,l.showSeriesMarkersProperty=!0,l.showCheckboxesProperty=(u=a==null?void 0:a.showCheckboxes)!==null&&u!==void 0?u:l.showCheckboxes,l.showSeriesMarkersProperty=(c=a==null?void 0:a.showSeriesMarkers)!==null&&c!==void 0?c:l.showSeriesMarkers,l.itemsProperty=(d=a==null?void 0:a.items)!==null&&d!==void 0?d:l.items,l.legendItemCheckedChangedCallback=a==null?void 0:a.isCheckedChangedCallback,s&&l.attachTo(s),l}return Object.defineProperty(o.prototype,"showCheckboxes",{get:function(){return this.showCheckboxesProperty},set:function(a){this.showCheckboxesProperty=a,this.notifyPropertyChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"showSeriesMarkers",{get:function(){return this.showSeriesMarkersProperty},set:function(a){this.showSeriesMarkersProperty=a,this.notifyPropertyChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"items",{get:function(){return this.itemsProperty},set:function(a){this.itemsProperty=a,this.notifyPropertyChanged()},enumerable:!1,configurable:!0}),o.prototype.attachTo=function(a){var s=this;t.prototype.attachTo.call(this,a),a.addDeletable({delete:function(){s.delete(),s.setRootDiv(void 0),s.setInvalidateParentSurface(void 0),s.setParentSurface(void 0)}})},o.prototype.applyTheme=function(){},o.prototype.getInnerHTML=function(){var a,s,l=(a=this.backgroundColor)!==null&&a!==void 0?a:this.parentSurfaceProperty.themeProvider.legendBackgroundBrush,u=(s=this.textColor)!==null&&s!==void 0?s:this.parentSurfaceProperty.themeProvider.labelForegroundBrush,c=this.parentSurfaceProperty.getSeriesViewRectPadding(!1),d=c.left,f=c.top,h=c.right,p=c.bottom,g=this.isExternal()?new e.Thickness(this.margin,this.margin,this.margin,this.margin):new e.Thickness(f+this.margin,h+this.margin,p+this.margin,d+this.margin);return this.getLegendHTML(this.placement,u,l,g,this.orientation,this.showCheckboxes,this.showSeriesMarkers,this.items)},o.prototype.addEventListeners=function(){var a=this;this.items.forEach(function(s){return a.addEventListenerToItem(s)})},o.prototype.addEventListenerToItem=function(a){var s=this,l=this.parentDiv.querySelector("[id='".concat(a.id,"']"));if(l){var u=function(f){a.checked=l.checked,s.legendItemCheckedChangedCallback&&s.legendItemCheckedChangedCallback(a,a.checked,s)};l.addEventListener("change",u);var c={element:l,eventType:"change",eventListener:u,delete:function(){return l.removeEventListener("change",u)}},d=this.eventListenersCollection.get(a.id);d?d.push(c):this.eventListenersCollection.set(a.id,[c])}},o.prototype.removeEventListeners=function(){var a=this;this.items.forEach(function(s){return a.removeEventListenerFromSeries(s.id)})},o})(i.SciChartLegendBase);return ew.ManualLegend=n,ew}var tw={},rw={},nue;function lTe(){if(nue)return rw;nue=1;var r=rw&&rw.__extends||(function(){var t=function(o,a){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");t(o,a);function s(){this.constructor=o}o.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}})();Object.defineProperty(rw,"__esModule",{value:!0}),rw.BandAnimationStyle=void 0;var e=mi(),i=lb(),n=(function(t){r(o,t);function o(a){var s=this,l,u,c;return s=t.call(this,a)||this,s.strokeY1=(l=a==null?void 0:a.strokeY1)!==null&&l!==void 0?l:s.strokeY1Property,s.fill=(u=a==null?void 0:a.fill)!==null&&u!==void 0?u:s.fillProperty,s.fillY1=(c=a==null?void 0:a.fillY1)!==null&&c!==void 0?c:s.fillY1Property,s}return Object.defineProperty(o.prototype,"strokeY1",{get:function(){return this.strokeY1Property},set:function(a){this.strokeY1Property=a,a&&(this.strokeY1ARGBProperty=(0,e.parseColorToUIntArgb)(a))},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"strokeY1ARGB",{get:function(){return this.strokeY1ARGBProperty},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"fill",{get:function(){return this.fillProperty},set:function(a){this.fillProperty=a,a&&(this.fillARGBProperty=(0,e.parseColorToUIntArgb)(a))},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"fillARGB",{get:function(){return this.fillARGBProperty},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"fillY1",{get:function(){return this.fillY1Property},set:function(a){this.fillY1Property=a,a&&(this.fillY1ARGBProperty=(0,e.parseColorToUIntArgb)(a))},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"fillY1ARGB",{get:function(){return this.fillY1ARGBProperty},enumerable:!1,configurable:!0}),o})(i.BaseAnimationStyle);return rw.BandAnimationStyle=n,rw}var oue;function bze(){if(oue)return tw;oue=1;var r=tw&&tw.__extends||(function(){var s=function(l,u){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(c[f]=d[f])},s(l,u)};return function(l,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");s(l,u);function c(){this.constructor=l}l.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}})();Object.defineProperty(tw,"__esModule",{value:!0}),tw.BandAnimation=void 0;var e=Yd(),i=mi(),n=ob(),t=lTe(),o=Op(),a=(function(s){r(l,s);function l(u){var c=this,d,f;return c=s.call(this,u)||this,c.type=e.EAnimationType.Style,c.duration=(d=u==null?void 0:u.duration)!==null&&d!==void 0?d:1e3,c.styles=u!=null&&u.styles?new t.BandAnimationStyle(u.styles):c.styles,c.dataSeries=(f=u==null?void 0:u.dataSeries)!==null&&f!==void 0?f:c.dataSeries,c}return l.prototype.getSeriesStyle=function(u){var c;if(!u.isStacked)return new t.BandAnimationStyle({stroke:u.stroke,strokeY1:u.strokeY1,fill:u.fill,fillY1:u.fillY1,strokeThickness:u.strokeThickness,opacity:u.opacity,pointMarker:(c=u.pointMarker)===null||c===void 0?void 0:c.getPointMarkerStyle()})},l.prototype.updateSeriesProperties=function(u,c,d){if(s.prototype.updateSeriesProperties.call(this,u,c,d),this.isStyleAnimation){var f=this.styles;if(f.strokeY1!==void 0){var h=n.animationHelpers.interpolateColor(c.strokeY1ARGB,f.strokeY1ARGB,d);u.strokeY1=(0,i.parseArgbToHtmlColor)(h)}if(f.fill!==void 0){var h=n.animationHelpers.interpolateColor(c.fillARGB,f.fillARGB,d);u.fill=(0,i.parseArgbToHtmlColor)(h)}if(f.fillY1!==void 0){var h=n.animationHelpers.interpolateColor(c.fillY1ARGB,f.fillY1ARGB,d);u.fillY1=(0,i.parseArgbToHtmlColor)(h)}}},l})(o.SeriesAnimation);return tw.BandAnimation=a,tw}var iw={},aue;function Sze(){if(aue)return iw;aue=1;var r=iw&&iw.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(iw,"__esModule",{value:!0}),iw.BubbleAnimation=void 0;var e=Yd(),i=Op(),n=lb(),t=(function(o){r(a,o);function a(s){var l=this,u,c;return l=o.call(this,s)||this,l.type=e.EAnimationType.Style,l.duration=(u=s==null?void 0:s.duration)!==null&&u!==void 0?u:1e3,l.styles=s!=null&&s.styles?new n.BaseAnimationStyle(s.styles):l.styles,l.dataSeries=(c=s==null?void 0:s.dataSeries)!==null&&c!==void 0?c:l.dataSeries,l}return a})(i.SeriesAnimation);return iw.BubbleAnimation=t,iw}var nw={},ow={},aw={},sue;function MX(){if(sue)return aw;sue=1;var r=aw&&aw.__extends||(function(){var t=function(o,a){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");t(o,a);function s(){this.constructor=o}o.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}})();Object.defineProperty(aw,"__esModule",{value:!0}),aw.OhlcAnimationStyle=void 0;var e=mi(),i=lb(),n=(function(t){r(o,t);function o(a){var s=this,l,u,c;return s=t.call(this,a)||this,s.strokeUp=(l=a==null?void 0:a.strokeUp)!==null&&l!==void 0?l:s.strokeUpProperty,s.strokeDown=(u=a==null?void 0:a.strokeDown)!==null&&u!==void 0?u:s.strokeDownProperty,s.dataPointWidth=(c=a==null?void 0:a.dataPointWidth)!==null&&c!==void 0?c:s.dataPointWidth,s}return Object.defineProperty(o.prototype,"strokeUp",{get:function(){return this.strokeUpProperty},set:function(a){this.strokeUpProperty=a,a&&(this.strokeUpARGBProperty=(0,e.parseColorToUIntArgb)(a))},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"strokeUpARGB",{get:function(){return this.strokeUpARGBProperty},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"strokeDown",{get:function(){return this.strokeDownProperty},set:function(a){this.strokeDownProperty=a,a&&(this.strokeDownARGBProperty=(0,e.parseColorToUIntArgb)(a))},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"strokeDownARGB",{get:function(){return this.strokeDownARGBProperty},enumerable:!1,configurable:!0}),o})(i.BaseAnimationStyle);return aw.OhlcAnimationStyle=n,aw}var lue;function uTe(){if(lue)return ow;lue=1;var r=ow&&ow.__extends||(function(){var t=function(o,a){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");t(o,a);function s(){this.constructor=o}o.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}})();Object.defineProperty(ow,"__esModule",{value:!0}),ow.CandlestickAnimationStyle=void 0;var e=mi(),i=MX(),n=(function(t){r(o,t);function o(a){var s=this,l,u;return s=t.call(this,a)||this,s.brushUp=(l=a==null?void 0:a.brushUp)!==null&&l!==void 0?l:s.brushUpProperty,s.brushDown=(u=a==null?void 0:a.brushDown)!==null&&u!==void 0?u:s.brushDownProperty,s}return Object.defineProperty(o.prototype,"brushUp",{get:function(){return this.brushUpProperty},set:function(a){this.brushUpProperty=a,a&&(this.brushUpARGBProperty=(0,e.parseColorToUIntArgb)(a))},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"brushUpARGB",{get:function(){return this.brushUpARGBProperty},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"brushDown",{get:function(){return this.brushDownProperty},set:function(a){this.brushDownProperty=a,a&&(this.brushDownARGBProperty=(0,e.parseColorToUIntArgb)(a))},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"brushDownARGB",{get:function(){return this.brushDownARGBProperty},enumerable:!1,configurable:!0}),o})(i.OhlcAnimationStyle);return ow.CandlestickAnimationStyle=n,ow}var sw={},uue;function cTe(){if(uue)return sw;uue=1;var r=sw&&sw.__extends||(function(){var s=function(l,u){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(c[f]=d[f])},s(l,u)};return function(l,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");s(l,u);function c(){this.constructor=l}l.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}})();Object.defineProperty(sw,"__esModule",{value:!0}),sw.OhlcAnimation=void 0;var e=Yd(),i=mi(),n=ob(),t=Op(),o=MX(),a=(function(s){r(l,s);function l(u){var c=this,d,f;return c=s.call(this,u)||this,c.type=e.EAnimationType.Style,c.duration=(d=u==null?void 0:u.duration)!==null&&d!==void 0?d:1e3,c.styles=u!=null&&u.styles?new o.OhlcAnimationStyle(u.styles):c.styles,c.dataSeries=(f=u==null?void 0:u.dataSeries)!==null&&f!==void 0?f:c.dataSeries,c}return l.prototype.getSeriesStyle=function(u){var c;if(!u.isStacked)return new o.OhlcAnimationStyle({stroke:u.stroke,strokeThickness:u.strokeThickness,opacity:u.opacity,strokeUp:u.strokeUp,strokeDown:u.strokeDown,dataPointWidth:u.dataPointWidth,pointMarker:(c=u.pointMarker)===null||c===void 0?void 0:c.getPointMarkerStyle()})},l.prototype.updateSeriesProperties=function(u,c,d){if(s.prototype.updateSeriesProperties.call(this,u,c,d),this.isStyleAnimation){var f=this.styles;if(f.strokeUp!==void 0){var h=n.animationHelpers.interpolateColor(c.strokeUpARGB,f.strokeUpARGB,d);u.strokeUp=(0,i.parseArgbToHtmlColor)(h)}if(f.strokeDown!==void 0){var h=n.animationHelpers.interpolateColor(c.strokeDownARGB,f.strokeDownARGB,d);u.strokeDown=(0,i.parseArgbToHtmlColor)(h)}f.dataPointWidth!==void 0&&(u.dataPointWidth=n.animationHelpers.interpolateNumber(c.dataPointWidth,f.dataPointWidth,d))}},l})(t.SeriesAnimation);return sw.OhlcAnimation=a,sw}var cue;function _ze(){if(cue)return nw;cue=1;var r=nw&&nw.__extends||(function(){var s=function(l,u){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(c[f]=d[f])},s(l,u)};return function(l,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");s(l,u);function c(){this.constructor=l}l.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}})();Object.defineProperty(nw,"__esModule",{value:!0}),nw.CandlestickAnimation=void 0;var e=Yd(),i=mi(),n=ob(),t=uTe(),o=cTe(),a=(function(s){r(l,s);function l(u){var c=this,d,f;return c=s.call(this,u)||this,c.type=e.EAnimationType.Style,c.duration=(d=u==null?void 0:u.duration)!==null&&d!==void 0?d:1e3,c.styles=u!=null&&u.styles?new t.CandlestickAnimationStyle(u.styles):c.styles,c.dataSeries=(f=u==null?void 0:u.dataSeries)!==null&&f!==void 0?f:c.dataSeries,c}return l.prototype.getSeriesStyle=function(u){var c;if(!u.isStacked)return new t.CandlestickAnimationStyle({stroke:u.stroke,strokeThickness:u.strokeThickness,opacity:u.opacity,strokeUp:u.strokeUp,strokeDown:u.strokeDown,brushUp:u.brushUp,brushDown:u.brushDown,pointMarker:(c=u.pointMarker)===null||c===void 0?void 0:c.getPointMarkerStyle()})},l.prototype.updateSeriesProperties=function(u,c,d){if(s.prototype.updateSeriesProperties.call(this,u,c,d),this.isStyleAnimation){var f=this.styles;if(f.brushUp!==void 0){var h=n.animationHelpers.interpolateColor(c.brushUpARGB,f.brushUpARGB,d);u.brushUp=(0,i.parseArgbToHtmlColor)(h)}if(f.brushDown!==void 0){var h=n.animationHelpers.interpolateColor(c.brushDownARGB,f.brushDownARGB,d);u.brushDown=(0,i.parseArgbToHtmlColor)(h)}}},l})(o.OhlcAnimation);return nw.CandlestickAnimation=a,nw}var lw={},uw={},due;function dTe(){if(due)return uw;due=1;var r=uw&&uw.__extends||(function(){var t=function(o,a){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");t(o,a);function s(){this.constructor=o}o.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}})();Object.defineProperty(uw,"__esModule",{value:!0}),uw.ColumnAnimationStyle=void 0;var e=mi(),i=lb(),n=(function(t){r(o,t);function o(a){var s=this,l,u,c;return s=t.call(this,a)||this,s.fill=(l=a==null?void 0:a.fill)!==null&&l!==void 0?l:s.fillProperty,s.zeroLineY=(u=a==null?void 0:a.zeroLineY)!==null&&u!==void 0?u:s.zeroLineY,s.dataPointWidth=(c=a==null?void 0:a.dataPointWidth)!==null&&c!==void 0?c:s.dataPointWidth,s}return Object.defineProperty(o.prototype,"fill",{get:function(){return this.fillProperty},set:function(a){this.fillProperty=a,a&&(this.fillARGBProperty=(0,e.parseColorToUIntArgb)(a))},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"fillARGB",{get:function(){return this.fillARGBProperty},enumerable:!1,configurable:!0}),o})(i.BaseAnimationStyle);return uw.ColumnAnimationStyle=n,uw}var fue;function Pze(){if(fue)return lw;fue=1;var r=lw&&lw.__extends||(function(){var l=function(u,c){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(d[h]=f[h])},l(u,c)};return function(u,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");l(u,c);function d(){this.constructor=u}u.prototype=c===null?Object.create(c):(d.prototype=c.prototype,new d)}})();Object.defineProperty(lw,"__esModule",{value:!0}),lw.ColumnAnimation=void 0;var e=Yd(),i=mi(),n=ob(),t=Op(),o=dTe(),a=OM(),s=(function(l){r(u,l);function u(c){var d=this,f,h;return d=l.call(this,c)||this,d.type=e.EAnimationType.Style,d.duration=(f=c==null?void 0:c.duration)!==null&&f!==void 0?f:1e3,d.styles=c!=null&&c.styles?new o.ColumnAnimationStyle(c.styles):d.styles,d.dataSeries=(h=c==null?void 0:c.dataSeries)!==null&&h!==void 0?h:d.dataSeries,d}return u.prototype.getSeriesStyle=function(c){var d,f;if(!c.isStacked)return new o.ColumnAnimationStyle({stroke:c.stroke,strokeThickness:c.strokeThickness,opacity:c.opacity,pointMarker:(f=(d=c.pointMarker)===null||d===void 0?void 0:d.getPointMarkerStyle())!==null&&f!==void 0?f:new a.PointMarkerStyle,fill:c.fill,zeroLineY:c.zeroLineY,dataPointWidth:c.dataPointWidth})},u.prototype.updateSeriesProperties=function(c,d,f){if(l.prototype.updateSeriesProperties.call(this,c,d,f),this.isStyleAnimation){var h=this.styles;if(h.fill!==void 0){var p=n.animationHelpers.interpolateColor(d.fillARGB,h.fillARGB,f);c.fill=(0,i.parseArgbToHtmlColor)(p)}h.zeroLineY!==void 0&&(c.zeroLineY=n.animationHelpers.interpolateNumber(d.zeroLineY,h.zeroLineY,f)),h.dataPointWidth!==void 0&&(c.dataPointWidth=n.animationHelpers.interpolateNumber(d.dataPointWidth,h.dataPointWidth,f))}},u})(t.SeriesAnimation);return lw.ColumnAnimation=s,lw}var cw={},hue;function Cze(){if(hue)return cw;hue=1;var r=cw&&cw.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(cw,"__esModule",{value:!0}),cw.LineAnimation=void 0;var e=Yd(),i=Op(),n=lb(),t=(function(o){r(a,o);function a(s){var l=this,u,c;return l=o.call(this,s)||this,l.type=e.EAnimationType.Style,l.duration=(u=s==null?void 0:s.duration)!==null&&u!==void 0?u:1e3,l.styles=s!=null&&s.styles?new n.BaseAnimationStyle(s.styles):l.styles,l.dataSeries=(c=s==null?void 0:s.dataSeries)!==null&&c!==void 0?c:l.dataSeries,l}return a})(i.SeriesAnimation);return cw.LineAnimation=t,cw}var dw={},fw={},pue;function fTe(){if(pue)return fw;pue=1;var r=fw&&fw.__extends||(function(){var t=function(o,a){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");t(o,a);function s(){this.constructor=o}o.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}})();Object.defineProperty(fw,"__esModule",{value:!0}),fw.MountainAnimationStyle=void 0;var e=mi(),i=lb(),n=(function(t){r(o,t);function o(a){var s=this,l,u;return s=t.call(this,a)||this,s.fill=(l=a==null?void 0:a.fill)!==null&&l!==void 0?l:s.fillProperty,s.zeroLineY=(u=a==null?void 0:a.zeroLineY)!==null&&u!==void 0?u:s.zeroLineY,s}return Object.defineProperty(o.prototype,"fill",{get:function(){return this.fillProperty},set:function(a){this.fillProperty=a,a&&(this.fillARGBProperty=(0,e.parseColorToUIntArgb)(a))},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"fillARGB",{get:function(){return this.fillARGBProperty},enumerable:!1,configurable:!0}),o})(i.BaseAnimationStyle);return fw.MountainAnimationStyle=n,fw}var gue;function Tze(){if(gue)return dw;gue=1;var r=dw&&dw.__extends||(function(){var l=function(u,c){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(d[h]=f[h])},l(u,c)};return function(u,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");l(u,c);function d(){this.constructor=u}u.prototype=c===null?Object.create(c):(d.prototype=c.prototype,new d)}})();Object.defineProperty(dw,"__esModule",{value:!0}),dw.MountainAnimation=void 0;var e=Yd(),i=mi(),n=ob(),t=Op(),o=fTe(),a=OM(),s=(function(l){r(u,l);function u(c){var d=this,f,h;return d=l.call(this,c)||this,d.type=e.EAnimationType.Style,d.duration=(f=c==null?void 0:c.duration)!==null&&f!==void 0?f:1e3,d.styles=c!=null&&c.styles?new o.MountainAnimationStyle(c.styles):d.styles,d.dataSeries=(h=c==null?void 0:c.dataSeries)!==null&&h!==void 0?h:d.dataSeries,d}return u.prototype.getSeriesStyle=function(c){var d,f;if(!c.isStacked)return new o.MountainAnimationStyle({stroke:c.stroke,strokeThickness:c.strokeThickness,opacity:c.opacity,pointMarker:(f=(d=c.pointMarker)===null||d===void 0?void 0:d.getPointMarkerStyle())!==null&&f!==void 0?f:new a.PointMarkerStyle,fill:c.fill,zeroLineY:c.zeroLineY})},u.prototype.updateSeriesProperties=function(c,d,f){if(l.prototype.updateSeriesProperties.call(this,c,d,f),this.isStyleAnimation){var h=this.styles;if(h.fill!==void 0){var p=n.animationHelpers.interpolateColor(d.fillARGB,h.fillARGB,f);c.fill=(0,i.parseArgbToHtmlColor)(p)}h.zeroLineY!==void 0&&(c.zeroLineY=n.animationHelpers.interpolateNumber(d.zeroLineY,h.zeroLineY,f))}},u})(t.SeriesAnimation);return dw.MountainAnimation=s,dw}var hw={},vue;function xze(){if(vue)return hw;vue=1;var r=hw&&hw.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(hw,"__esModule",{value:!0}),hw.ScatterAnimation=void 0;var e=Yd(),i=Op(),n=lb(),t=(function(o){r(a,o);function a(s){var l=this,u,c;return l=o.call(this,s)||this,l.type=e.EAnimationType.Style,l.duration=(u=s==null?void 0:s.duration)!==null&&u!==void 0?u:1e3,l.styles=s!=null&&s.styles?new n.BaseAnimationStyle(s.styles):l.styles,l.dataSeries=(c=s==null?void 0:s.dataSeries)!==null&&c!==void 0?c:l.dataSeries,l}return a})(i.SeriesAnimation);return hw.ScatterAnimation=t,hw}var pw={},TW={},yue;function LX(){return yue||(yue=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EColorPickMode=void 0,(function(e){e.Discrete="Discrete",e.Interpolated="Interpolated"})(r.EColorPickMode||(r.EColorPickMode={}))})(TW)),TW}var xW={},mue;function s3(){return mue||(mue=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.validateColorStops=r.HEIGHT_SERIES_MAX_TEXTURE_SIZE=void 0,r.HEIGHT_SERIES_MAX_TEXTURE_SIZE=1024;function e(i){if(!i)return!0;if(i.colorStops.length<2)throw new Error("Must define at least 2 colorStops");for(var n=Number.MAX_VALUE,t=i.colorStops,o=t[0].dataValue,a=t[t.length-1].dataValue,s=0;s<t.length-1;s++){if(t[s].dataValue>=t[s+1].dataValue)throw new Error("colorStops must be unique and in ascending order");n=Math.min(n,t[s+1].dataValue-t[s].dataValue)}if((a-o)/n>r.HEIGHT_SERIES_MAX_TEXTURE_SIZE)throw new Error("Unsupported stop configuration. The range can be at most ".concat(r.HEIGHT_SERIES_MAX_TEXTURE_SIZE,` times the smallest difference between stops.
        If you need more resolution than this, use a Fill PaletteProvider`));return!0}r.validateColorStops=e})(xW)),xW}var EW={},bue;function hTe(){return bue||(bue=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EHeightSeriesMode=void 0,(function(e){e.Perpendicular="Perpendicular",e.Vertical="Vertical",e.Horizontal="Horizontal"})(r.EHeightSeriesMode||(r.EHeightSeriesMode={}))})(EW)),EW}var Sue;function Eze(){if(Sue)return pw;Sue=1;var r=pw&&pw.__extends||(function(){var h=function(p,g){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var m in y)Object.prototype.hasOwnProperty.call(y,m)&&(v[m]=y[m])},h(p,g)};return function(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");h(p,g);function v(){this.constructor=p}p.prototype=g===null?Object.create(g):(v.prototype=g.prototype,new v)}})();Object.defineProperty(pw,"__esModule",{value:!0}),pw.HeightSeriesDrawingProvider=void 0;var e=Mr(),i=LX(),n=s3(),t=mi(),o=hl(),a=ts(),s=H0(),l=Xi(),u=Ji(),c=vl(),d=hTe(),f=(function(h){r(p,h);function p(g,v,y,m){var b=h.call(this,g,v,y)||this;return b.args=new b.webAssemblyContext.SCRTHeightSeriesParams,b.colorSettings=new b.webAssemblyContext.SCRTHeightColorSettings,b.zSelector=m??(function(S){return S.zValues}),b.linesPenCache=new a.Pen2DCache(g),b.fillBrushCache=new o.BrushCache(g),b}return p.prototype.onAttachSeries=function(){h.prototype.onAttachSeries.call(this),this.nativeDrawingProvider=new this.webAssemblyContext.SCRTHeightSeriesDrawingProvider;var g=this.parentSeries,v=g.stroke,y=g.strokeThickness,m=g.fill,b=g.opacity,S=g.strokeDashArray,_=g.customTextureOptions;(0,a.createPenInCache)(this.linesPenCache,v,y,b,S),this.fillBrushCache.create(m,b,1,1,void 0,_)},p.prototype.onDetachSeries=function(){h.prototype.onDetachSeries.call(this),this.delete()},p.prototype.delete=function(){this.nativeDrawingProvider=(0,e.deleteSafe)(this.nativeDrawingProvider),this.args=(0,e.deleteSafe)(this.args),this.linesPenCache=(0,e.deleteSafe)(this.linesPenCache),this.fillBrushCache=(0,e.deleteSafe)(this.fillBrushCache),h.prototype.delete.call(this)},p.prototype.draw=function(g,v){var y,m=v.pointSeries;this.args.Reset(),this.colorSettings.Reset();var b=(0,o.getScrtBrushFromCache)(this.fillBrushCache);b&&this.args.SetFillBrush(b);var S=this.parentSeries,_=S.zMultiplier,C=S.zLimits,T=S.paletteProvider,x=S.normalise,A=S.isInverseHeight,w=S.strokeThickness,L=S.heightMode,k=S.dataSeries;this.args.zMultiplier=_,this.args.isInverseHeight=A,this.args.normaliseHeights=x;var D=(0,a.getScrtPenFromCache)(this.linesPenCache);D&&w>0&&this.args.SetEdgePen(D);var j=v.xCoordinateCalculator.isCategoryCoordinateCalculator,N=m.xValues,V=j?m.indexes:N,W=this.ySelector(m),K=this.zSelector(m);if(x&&(!C||C.max===Number.MAX_VALUE)){var H=void 0;try{H=this.webAssemblyContext.NumberUtil.MinMax(K,k==null?void 0:k.dataDistributionCalculator.containsNaN),this.args.minHeight=H.minD,this.args.maxHeight=H.maxD}finally{(0,e.deleteSafe)(H)}}else this.args.minHeight=C.min,this.args.maxHeight=C.max;var U=this.getStartAndCount(v,V),I=U.startIndex,Q=U.count;this.args.startIndex=Math.max(0,I-1),this.args.count=Math.min(V.size(),Q+1),this.args.verticalChart=v.isVerticalChart,L===d.EHeightSeriesMode.Horizontal?this.args.SetNormalDirection(v.isVerticalChart?(0,l.getVector3)(this.webAssemblyContext,0,1,0):(0,l.getVector3)(this.webAssemblyContext,1,0,0)):L===d.EHeightSeriesMode.Vertical&&this.args.SetNormalDirection(v.isVerticalChart?(0,l.getVector3)(this.webAssemblyContext,1,0,0):(0,l.getVector3)(this.webAssemblyContext,0,1,0));var Z=T.overrideFillArgb!==void 0;if(Z&&(h.prototype.applyStrokeFillPaletting.call(this,this.parentSeries.stroke,D,this.parentSeries.fill,b,this.parentSeries.opacity,!1,!0,v),this.args.SetPalettedColors(this.palettingState.palettedColors),this.args.paletteStart=this.palettingState.paletteStartIndex,this.args.interpolate=this.palettingState.gradientPaletting),this.parentSeries.colorSettings){var ee=this.parentSeries.colorSettings.colorStops;(0,n.validateColorStops)(this.parentSeries.colorSettings);for(var ie=0,de=ee;ie<de.length;ie++){var pe=de[ie];this.colorSettings.AddColorStop(pe.dataValue,(0,t.parseColorToUIntArgb)(pe.color))}this.parentSeries.colorSettings.infraColor&&(this.colorSettings.m_uiInfra=(0,t.parseColorToUIntArgb)(this.parentSeries.colorSettings.infraColor)),this.parentSeries.colorSettings.ultraColor&&(this.colorSettings.m_uiUltra=(0,t.parseColorToUIntArgb)(this.parentSeries.colorSettings.ultraColor)),this.colorSettings.m_fMinHeight=ee[0].dataValue,this.colorSettings.m_fMaxHeight=ee[ee.length-1].dataValue,this.colorSettings.m_bIsGradient=this.parentSeries.colorSettings.colorPickMode===i.EColorPickMode.Interpolated,this.args.interpolate=this.parentSeries.colorSettings.fillMode===s.EFillPaletteMode.GRADIENT,this.colorSettings.m_fMaxTextureSize=(y=this.parentSeries.colorSettings.maxTextureSize)!==null&&y!==void 0?y:0,this.args.SetHeightColors(this.colorSettings)}this.parentSeries.heightsForColoringDataSeries&&this.args.SetHeightsForColoring(this.parentSeries.getHeightsForColoring(m.resampled)),this.args.SetXValues(V),this.args.SetYValues(W),this.args.SetZValues(K),this.args.SetXCoordinateCalculator(v.xCoordinateCalculator.nativeCalculator),this.args.SetYCoordinateCalculator(v.yCoordinateCalculator.nativeCalculator),this.args.SetNativeContext(g.getNativeContext()),this.nativeDrawingProvider.DrawPointsVec(this.args)},p.prototype.onDpiChanged=function(g){h.prototype.onDpiChanged.call(this,g),this.onSeriesPropertyChange(u.PROPERTY.STROKE)},p.prototype.onSeriesPropertyChange=function(g){h.prototype.onSeriesPropertyChange.call(this,g);var v=this.parentSeries,y=v.stroke,m=v.strokeThickness,b=v.fill,S=v.opacity,_=v.strokeDashArray,C=v.customTextureOptions;(g===u.PROPERTY.STROKE||g===u.PROPERTY.STROKE_THICKNESS||g===u.PROPERTY.OPACITY||g===u.PROPERTY.STROKE_DASH_ARRAY)&&(this.palettingState.requiresUpdate=!0,(0,a.createPenInCache)(this.linesPenCache,y,m,S,_)),(g===u.PROPERTY.FILL||g===u.PROPERTY.OPACITY||g===u.PROPERTY.CUSTOM_TEXTURE_OPTIONS)&&(this.palettingState.requiresUpdate=!0,this.fillBrushCache.create(b,S,1,1,void 0,C))},p})(c.BaseSeriesDrawingProvider);return pw.HeightSeriesDrawingProvider=f,pw}var gw={},_ue;function Aze(){if(_ue)return gw;_ue=1;var r=gw&&gw.__extends||(function(){var c=function(d,f){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(h[g]=p[g])},c(d,f)};return function(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");c(d,f);function h(){this.constructor=d}d.prototype=f===null?Object.create(f):(h.prototype=f.prototype,new h)}})();Object.defineProperty(gw,"__esModule",{value:!0}),gw.SmearSeriesDrawingProvider=void 0;var e=Mr(),i=LX(),n=iu(),t=s3(),o=mi(),a=vl(),s=Wl(),l=oi(),u=(function(c){r(d,c);function d(f,h,p,g,v){var y=c.call(this,f,h,p)||this;return y.valuesUpdateRequired=!0,y.args=new y.webAssemblyContext.SCRTSmearSeriesParams,y.colorSettings=new y.webAssemblyContext.SCRTHeightColorSettings,y.yColorSelector=v??(function(m){return m.getNativeXValues()}),y.zColorSelector=g??(function(m){return m.getNativeYValues()}),y}return d.prototype.onAttachSeries=function(){c.prototype.onAttachSeries.call(this),this.nativeDrawingProvider=new this.webAssemblyContext.SCRTSmearSeriesDrawingProvider;var f=this.parentSeries;f.stroke,f.strokeThickness,f.opacity},d.prototype.onDetachSeries=function(){c.prototype.onDetachSeries.call(this),this.delete()},d.prototype.delete=function(){this.nativeDrawingProvider=(0,e.deleteSafe)(this.nativeDrawingProvider),this.args=(0,e.deleteSafe)(this.args),c.prototype.delete.call(this)},d.prototype.draw=function(f,h){var p,g=h.pointSeries;this.colorSettings.Reset();var v=h.xCoordinateCalculator.isCategoryCoordinateCalculator,y=g.xValues,m=this.parentSeries.colorDataSeries,b=v?g.indexes:y,S=this.ySelector(g),_=this.yColorSelector(m),C=this.zColorSelector(m);this.args.SetX(b),this.args.SetY(S);var T=this.getStartAndCount(h,b),x=T.startIndex,A=T.count;if(this.args.m_iStartIndex=x,this.args.m_iCount=A,this.args.m_dYOffset=this.parentSeries.yOffset,this.args.smoothColors=this.parentSeries.smoothColors,!(A<2)){performance.now();var w=(0,s.getWindowedYRange)(this.webAssemblyContext,g.xValues,g.yValues,v?new l.NumberRange(0,g.count-1):new l.NumberRange(h.xCoordinateCalculator.visibleMin,h.xCoordinateCalculator.visibleMax),!0,v,this.parentSeries.dataSeries.dataDistributionCalculator.isSortedAscending,this.parentSeries.dataSeries.dataDistributionCalculator.containsNaN),L=_.size(),k=new l.NumberRange(h.yCoordinateCalculator.visibleMin-w.max,h.yCoordinateCalculator.visibleMax-w.min),D=(0,s.getIndicesRange)(this.webAssemblyContext,_,k,m.dataDistributionCalculator.isSortedAscending);if(this.args.m_iColorStartIndex=Math.min(L-2,D.min),this.args.m_iColorCount=Math.max(2,D.diff+1),this.parentSeries.colorSettings){var j=this.parentSeries.colorSettings.colorStops;(0,t.validateColorStops)(this.parentSeries.colorSettings);for(var N=0,V=j;N<V.length;N++){var W=V[N],K=(0,o.parseColorToUIntArgb)(W.color);this.colorSettings.AddColorStop(W.dataValue,K)}this.parentSeries.colorSettings.infraColor&&(this.colorSettings.m_uiInfra=(0,o.parseColorToUIntArgb)(this.parentSeries.colorSettings.infraColor)),this.parentSeries.colorSettings.ultraColor&&(this.colorSettings.m_uiUltra=(0,o.parseColorToUIntArgb)(this.parentSeries.colorSettings.ultraColor)),this.colorSettings.m_fMinHeight=j[0].dataValue,this.colorSettings.m_fMaxHeight=j[j.length-1].dataValue,this.colorSettings.m_bIsGradient=this.parentSeries.colorSettings.colorPickMode===i.EColorPickMode.Interpolated,this.colorSettings.m_fMaxTextureSize=(p=this.parentSeries.colorSettings.maxTextureSize)!==null&&p!==void 0?p:0,this.args.SetHeightColors(this.colorSettings),this.args.SetColorZvalues(C)}else if(this.parentSeries.paletteProvider){var H=this.parentSeries.paletteProvider,U=this.parentSeries.paletteProvider,I=(0,n.uintArgbColorMultiplyOpacity)((0,o.parseColorToUIntArgb)(this.parentSeries.stroke),this.parentSeries.opacity);this.palettingState.palettedColors||(this.palettingState.palettedColors=new this.webAssemblyContext.UIntVector);var Q=_.size();if(H.applyPaletting){H.applyPaletting(this.palettingState,_,C,m.getNativeIndexes(),0,Q);return}if(this.palettingState.palettedColors.clear(),this.palettingState.palettedColors.reserve(Q),U.overrideStrokeArgb)for(var Z=0;Z<Q;Z++){var ee=_.get(Z),ie=C.get(Z),de=U.overrideStrokeArgb(ee,ie,Z,this.parentSeries.opacity,m.getMetadataAt(Z));this.palettingState.palettedColors.push_back(de||I)}else for(var Z=0;Z<Q;Z++)this.palettingState.palettedColors.push_back(C.get(Z));this.palettingState.requiresUpdate=!1,this.args.SetColors(this.palettingState.palettedColors)}var pe=f.getNativeContext();performance.now(),this.nativeDrawingProvider.CreateSmearSeriesColorsTexture(_,h.yCoordinateCalculator.nativeCalculator,this.args),performance.now(),this.nativeDrawingProvider.CreateSmearSeriesValuesTexture(h.xCoordinateCalculator.nativeCalculator,h.yCoordinateCalculator.nativeCalculator,this.args),this.valuesUpdateRequired=!1,performance.now(),this.nativeDrawingProvider.DrawSmearSeries(pe,this.args)}},d.prototype.onDpiChanged=function(f){c.prototype.onDpiChanged.call(this,f)},d.prototype.onSeriesPropertyChange=function(f){c.prototype.onSeriesPropertyChange.call(this,f)},d.prototype.seriesHasDataChanges=function(){this.valuesUpdateRequired=!0},d.prototype.seriesHasColorChanges=function(){this.palettingState.requiresUpdate=!0},d})(a.BaseSeriesDrawingProvider);return gw.SmearSeriesDrawingProvider=u,gw}var vw={},Pue;function wze(){if(Pue)return vw;Pue=1;var r=vw&&vw.__extends||(function(){var d=function(f,h){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,g){p.__proto__=g}||function(p,g){for(var v in g)Object.prototype.hasOwnProperty.call(g,v)&&(p[v]=g[v])},d(f,h)};return function(f,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");d(f,h);function p(){this.constructor=f}f.prototype=h===null?Object.create(h):(p.prototype=h.prototype,new p)}})();Object.defineProperty(vw,"__esModule",{value:!0}),vw.PolarLineSeriesHitTestProvider=void 0;var e=Ii(),i=vs(),n=Rs(),t=Ds(),o=ta(),a=oo(),s=J1(),l=Hi(),u=10,c=(function(d){r(f,d);function f(){return d!==null&&d.apply(this,arguments)||this}return f.prototype.hitTest=function(h,p,g){var v=this;g===void 0&&(g=u);var y=this.getTranslatedHitTestPoint(h,p);if(!y)return i.HitTestInfo.empty();var m=this.currentRenderPassData,b=m.xCoordinateCalculator,S=m.yCoordinateCalculator,_=m.isVerticalChart,C=y.x,T=y.y,x=this.parentSeries.dataSeries;if(!x)return i.HitTestInfo.empty();var A=x.getNativeXValues(),w=x.getNativeYValues(),L=this.parentSeries.xAxis,k=function(de){var pe=A.get(de),_e=w.get(de),Te=b.getCoordinate(pe),De=S.getCoordinate(_e),Pe=_?De:Te,Ee=_?Te:De,Re=t.annotationHelpers.convertPolarToCartesian(L,!1,v.webAssemblyContext,o.ECoordinateMode.Pixel,Pe*l.DpiHelper.PIXEL_RATIO,Ee);return new e.Point(Re.x,Re.y)},D=Number.MAX_VALUE,j=-1,N=function(de,pe,_e){de<D&&(D=de,j=pe)};if(x.count()>0){var V=k(0),W=(0,a.calcDistance)(C,T,V.x,V.y);N(W,0);for(var K=1;K<x.count();K++){var H=k(K),U=(0,a.calcDistance)(V.x,V.y,H.x,H.y),I=(0,a.calcDistance)(C,T,H.x,H.y);N(I,K);var Q=W<U&&I<U;if(Q){var Z=(0,a.calcDistanceFromLine)(C,T,V.x,V.y,H.x,H.y);Z<D&&(W<I?N(Z,K-1):N(Z,K))}V=H,W=I}}var ee=L.reverseTransform(y.x,y.y),ie=n.hitTestHelpers.createHitTestInfo(this.parentSeries,b,S,_,x,A,w,ee.x,ee.y,j,g);return ie.isHit=D<g,ie},f})(s.PolarDataPointHitTestProvider);return vw.PolarLineSeriesHitTestProvider=c,vw}var yw={},Cue;function Oze(){if(Cue)return yw;Cue=1;var r=yw&&yw.__extends||(function(){var o=function(a,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(l[c]=u[c])},o(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");o(a,s);function l(){this.constructor=a}a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})();Object.defineProperty(yw,"__esModule",{value:!0}),yw.BaseRenderDataTransformJS=void 0;var e=oi(),i=FM(),n=dg(),t=(function(o){r(a,o);function a(){return o!==null&&o.apply(this,arguments)||this}return a.prototype.createPointSeries=function(){return new i.BasePointSeriesResampled(this.wasmContext,new e.NumberRange(0,0))},a.prototype.runTransformInternal=function(s){throw new Error("runTransformInternal not implemented.")},a})(n.BaseRenderDataTransform);return yw.BaseRenderDataTransformJS=t,yw}var ch={},Tue;function Dze(){if(Tue)return ch;Tue=1;var r=ch&&ch.__extends||(function(){var m=function(b,S){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,C){_.__proto__=C}||function(_,C){for(var T in C)Object.prototype.hasOwnProperty.call(C,T)&&(_[T]=C[T])},m(b,S)};return function(b,S){if(typeof S!="function"&&S!==null)throw new TypeError("Class extends value "+String(S)+" is not a constructor or null");m(b,S);function _(){this.constructor=b}b.prototype=S===null?Object.create(S):(_.prototype=S.prototype,new _)}})(),e=ch&&ch.__assign||function(){return e=Object.assign||function(m){for(var b,S=1,_=arguments.length;S<_;S++){b=arguments[S];for(var C in b)Object.prototype.hasOwnProperty.call(b,C)&&(m[C]=b[C])}return m},e.apply(this,arguments)},i=ch&&ch.__awaiter||function(m,b,S,_){function C(T){return T instanceof S?T:new S(function(x){x(T)})}return new(S||(S=Promise))(function(T,x){function A(k){try{L(_.next(k))}catch(D){x(D)}}function w(k){try{L(_.throw(k))}catch(D){x(D)}}function L(k){k.done?T(k.value):C(k.value).then(A,w)}L((_=_.apply(m,b||[])).next())})},n=ch&&ch.__generator||function(m,b){var S={label:0,sent:function(){if(T[0]&1)throw T[1];return T[1]},trys:[],ops:[]},_,C,T,x;return x={next:A(0),throw:A(1),return:A(2)},typeof Symbol=="function"&&(x[Symbol.iterator]=function(){return this}),x;function A(L){return function(k){return w([L,k])}}function w(L){if(_)throw new TypeError("Generator is already executing.");for(;S;)try{if(_=1,C&&(T=L[0]&2?C.return:L[0]?C.throw||((T=C.return)&&T.call(C),0):C.next)&&!(T=T.call(C,L[1])).done)return T;switch(C=0,T&&(L=[L[0]&2,T.value]),L[0]){case 0:case 1:T=L;break;case 4:return S.label++,{value:L[1],done:!1};case 5:S.label++,C=L[1],L=[0];continue;case 7:L=S.ops.pop(),S.trys.pop();continue;default:if(T=S.trys,!(T=T.length>0&&T[T.length-1])&&(L[0]===6||L[0]===2)){S=0;continue}if(L[0]===3&&(!T||L[1]>T[0]&&L[1]<T[3])){S.label=L[1];break}if(L[0]===6&&S.label<T[1]){S.label=T[1],T=L;break}if(T&&S.label<T[2]){S.label=T[2],S.ops.push(L);break}T[2]&&S.ops.pop(),S.trys.pop();continue}L=b.call(m,S)}catch(k){L=[6,k],C=0}finally{_=T=0}if(L[0]&5)throw L[1];return{value:L[0]?L[1]:void 0,done:!0}}};Object.defineProperty(ch,"__esModule",{value:!0}),ch.SciChartOverview=void 0;var t=QN(),o=$n(),a=oi(),s=j1(),l=gc(),u=Q8(),c=sU(),d=rU(),f=$8(),h=YN(),p=NM(),g=Tp(),v=(function(m){r(b,m);function b(S,_,C,T,x,A){var w=m.call(this)||this;return w.overviewXAxisProperty=x,w.overviewYAxisProperty=A,w.rangeSelectionModifierProperty=T,w.parentSciChartSurfaceProperty=S,w.overviewSciChartSurfaceProperty=_,w.overviewWasmContext=C,w}return b.create=function(S,_,C){return i(this,void 0,void 0,function(){var T,x,A,w,L,k;return n(this,function(D){switch(D.label){case 0:return[4,y(S,_,C)];case 1:return T=D.sent(),x=T.sciChartSurface,A=T.wasmContext,w=T.rangeSelectionModifier,L=T.xAxis,k=T.yAxis,[2,new b(S,x,A,w,L,k)]}})})},Object.defineProperty(b.prototype,"overviewSciChartSurface",{get:function(){return this.overviewSciChartSurfaceProperty},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"parentSciChartSurface",{get:function(){return this.parentSciChartSurfaceProperty},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"rangeSelectionModifier",{get:function(){return this.rangeSelectionModifierProperty},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"overviewXAxis",{get:function(){return this.overviewXAxisProperty},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"overviewYAxis",{get:function(){return this.overviewYAxisProperty},enumerable:!1,configurable:!0}),b.prototype.applyTheme=function(S){this.overviewSciChartSurface.applyTheme(S)},b.prototype.delete=function(){this.overviewSciChartSurface&&!this.overviewSciChartSurface.isDeleted&&this.overviewSciChartSurface.delete(),this.overviewWasmContext=void 0},b})(o.DeletableEntity);ch.SciChartOverview=v;var y=function(m,b,S){return i(void 0,void 0,void 0,function(){var _,C,T,x,A,w,L,k,D,j,N,V,W,K,H,U,I,Q,Z,ee,ie;return n(this,function(de){switch(de.label){case 0:return[4,g.SciChartSurface.create(b,S)];case 1:if(_=de.sent(),C=_.wasmContext,T=_.sciChartSurface,x=S==null?void 0:S.mainAxisId,A=S==null?void 0:S.secondaryAxisId,w=(Z=m.getXAxisById(x))!==null&&Z!==void 0?Z:m.getDefaultXAxis(),L=(ee=m.getYAxisById(A))!==null&&ee!==void 0?ee:m.getDefaultYAxis(),!w)throw new Error("Could not find a main axis with id ".concat(x,".")+(S!=null&&S.mainAxisId?"":"Please specify mainAxisId in the options"));if(!w)throw new Error("Could not find a secondary axis with id ".concat(A,".")+(S!=null&&S.secondaryAxisId?"":"Please specify secondaryAxisId in the options"));return k=w.isXAxis?w:L,D=w.isXAxis?L:w,j=e({axisAlignment:k.axisAlignment,isVisible:!1,autoRange:s.EAutoRange.Always,visibleRange:k.visibleRange},S==null?void 0:S.overviewXAxisOptions),N=e({axisAlignment:D.axisAlignment,isVisible:!1,autoRange:s.EAutoRange.Always,visibleRange:D.visibleRange},S==null?void 0:S.overviewYAxisOptions),V=k.isCategoryAxis?new d.CategoryAxis(C,j):k.type===l.EAxisType.BaseValueAxis?new c.BaseValueAxis(C,j):k.type===l.EAxisType.DiscontinuousDateAxis?new f.DiscontinuousDateAxis(C,j):k.type===l.EAxisType.LogarithmicAxis?new h.LogarithmicAxis(C,j):new p.NumericAxis(C,j),W=D.isCategoryAxis?new d.CategoryAxis(C,N):D.type===l.EAxisType.BaseValueAxis?new c.BaseValueAxis(C,N):D.type===l.EAxisType.DiscontinuousDateAxis?new f.DiscontinuousDateAxis(C,N):D.type===l.EAxisType.LogarithmicAxis?new h.LogarithmicAxis(C,N):new p.NumericAxis(C,N),K=w.isXAxis?V:W,H=function(pe){var _e,Te;if(!(((_e=pe.xAxis)===null||_e===void 0?void 0:_e.id)!==k.id||((Te=pe.yAxis)===null||Te===void 0?void 0:Te.id)!==D.id)){var De=(0,t.buildSeries)(C,pe.toJSON(!0))[0];return De.dataSeries.delete(),De.dataSeries=pe.dataSeries,De.xAxisId=V.id,De.yAxisId=W.id,De}},S!=null&&S.transformRenderableSeries&&(H=function(pe){return S==null?void 0:S.transformRenderableSeries(pe,T)}),T.xAxes.add(V),T.yAxes.add(W),U=m.renderableSeries.asArray().map(H).filter(function(pe){return pe}),(Q=T.renderableSeries).add.apply(Q,U),T.zoomExtents(),I=(ie=S==null?void 0:S.customRangeSelectionModifier)!==null&&ie!==void 0?ie:new u.OverviewRangeSelectionModifier,I.xAxisId=V.id,I.yAxisId=W.id,I.onSelectedAreaChanged=function(pe){pe.equals(w.visibleRange)||w.setVisibleRangeWithLimits(pe)},I.selectedArea=new a.NumberRange(Math.max(V.visibleRange.min,w.visibleRange.min),Math.min(V.visibleRange.max,w.visibleRange.max)),T.chartModifiers.add(I),(S==null?void 0:S.rangeSelectionAnnotationSvgString)!==void 0&&(I.rangeSelectionAnnotation.svgString=S.rangeSelectionAnnotationSvgString),V.visibleRangeChanged.subscribe(function(pe){var _e=pe.visibleRange,Te=w.visibleRange.clip(_e);I.selectedArea=Te}),w.visibleRangeChanged.subscribe(function(pe){var _e=pe.visibleRange,Te=_e.clip(K.visibleRange),De=!Te.equals(I.selectedArea);De&&(I.selectedArea=Te)}),T.layoutMeasured.subscribe(function(){I.selectedArea=new a.NumberRange(Math.max(V.visibleRange.min,w.visibleRange.min),Math.min(V.visibleRange.max,w.visibleRange.max))}),[2,{sciChartSurface:T,xAxis:V,yAxis:W,rangeSelectionModifier:I,wasmContext:C}]}})})};return ch}var mw={},xue;function Rze(){if(xue)return mw;xue=1;var r=mw&&mw.__extends||(function(){var t=function(o,a){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");t(o,a);function s(){this.constructor=o}o.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}})();Object.defineProperty(mw,"__esModule",{value:!0}),mw.CustomChartModifier3D=void 0;var e=bo(),i=q1(),n=(function(t){r(o,t);function o(a){var s=t.call(this,a)||this;return s.type=e.EChart3DModifierType.Custom,s}return o})(i.ChartModifierBase3D);return mw.CustomChartModifier3D=n,mw}var AW={},Eue;function Mze(){return Eue||(Eue=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.EAxisSideClipping=void 0,(function(e){e.Default="Default",e.None="None",e.VisibleRange="VisibleRange"})(r.EAxisSideClipping||(r.EAxisSideClipping={}))})(AW)),AW}var wW={},Aue;function Lze(){return Aue||(Aue=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.ETextAlignment3D=void 0,(function(e){e.Default="Default",e.Camera="Camera",e.ScreenHorizontal="ScreenHorizontal",e.ScreenAutoRotated="ScreenAutoRotated"})(r.ETextAlignment3D||(r.ETextAlignment3D={}))})(wW)),wW}var D2={},wue;function kze(){if(wue)return D2;wue=1,Object.defineProperty(D2,"__esModule",{value:!0}),D2.GradientParams=void 0;var r=(function(){function e(i,n,t){if(this.gradientStops=[],t.length<2)throw Error("At least two gradient point should be provided");if(i.x<0||i.y<0||i.x>1||i.y>1)throw Error("startPoint values should be within [0,1]");if(n.x<0||n.y<0||n.x>1||n.y>1)throw Error("endPoint values should be within [0,1]");t.forEach(function(o){if(o.offset<0||o.offset>1)throw Error("gradientStops offset should be within [0,1]")}),this.startPoint=i,this.endPoint=n,this.gradientStops=t}return e})();return D2.GradientParams=r,D2}var R2={},Oue;function Ize(){if(Oue)return R2;Oue=1,Object.defineProperty(R2,"__esModule",{value:!0}),R2.List=void 0;var r=(function(){function e(){this.items=[]}return e.prototype.size=function(){return this.items.length},e.prototype.add=function(i){this.items.push(i)},e.prototype.get=function(i){return this.items[i]},e})();return R2.List=r,R2}var OW={},Due;function Nze(){return Due||(Due=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.ERenderLayer=void 0,(function(e){e[e.First=0]="First",e[e.Second=1]="Second",e[e.Third=2]="Third"})(r.ERenderLayer||(r.ERenderLayer={}))})(OW)),OW}var bw={},Rue;function Mue(){if(Rue)return bw;Rue=1,Object.defineProperty(bw,"__esModule",{value:!0}),bw.calcAverageForArray=bw.calcAverageForDoubleVector=void 0;var r=function(i,n,t){var o=i.size(),a=t??o-1;if(a>=o||a<0)throw Error("index should be in range [0, length-1]");if(a+1<n)return NaN;for(var s=0,l=a+1-n;l<a+1;l++)s+=i.get(l);return s/=n,s};bw.calcAverageForDoubleVector=r;var e=function(i,n,t){var o=i.length,a=t??o-1;if(a>=o||a<0)throw Error("index should be in range [0, length-1]");if(a+1<n)return NaN;for(var s=0,l=a+1-n;l<a+1;l++)s+=i[l];return s/=n,s};return bw.calcAverageForArray=e,bw}var Sw={},Lue;function kue(){if(Lue)return Sw;Lue=1,Object.defineProperty(Sw,"__esModule",{value:!0}),Sw.convertRgbToHexColor=Sw.convertColor=void 0;var r=function(n,t){t===void 0&&(t=1);var o=i(t),a=n.toLowerCase();return a.length===0?"":a[0]==="#"?"0x".concat(o).concat(a.substr(1)):"0x".concat(o).concat(a)};Sw.convertColor=r;var e=function(n,t,o){return"#"+i(n)+i(t)+i(o)};Sw.convertRgbToHexColor=e;var i=function(n){if(n>=1)return"ff";if(n<=0)return"00";var t=Math.floor(n*256),o=t.toString(16);return o.length===1?"0"+o:o};return Sw}var M2={},Iue;function Fze(){if(Iue)return M2;Iue=1,Object.defineProperty(M2,"__esModule",{value:!0}),M2.convertToPixel=void 0;var r=function(i,n,t,o){var a="0x"+e(o)+e(i)+e(n)+e(t);return parseInt(a,16)};M2.convertToPixel=r;var e=function(i){return i>=255?"ff":i<=0?"00":i.toString(16)};return M2}var L2={},Nue;function jze(){if(Nue)return L2;Nue=1,Object.defineProperty(L2,"__esModule",{value:!0}),L2.logDoubleVector=void 0;var r=function(e,i,n,t){n===void 0&&(n=2);for(var o="",a=0;a<(t??e.size());a++)o+=e.get(a).toFixed(n)+",";i?console.log(i,o):console.log(o)};return L2.logDoubleVector=r,L2}var k2={},Fue;function Bze(){if(Fue)return k2;Fue=1,Object.defineProperty(k2,"__esModule",{value:!0}),k2.hasAllProperties=void 0;var r=function(e,i){for(var n=0;n<i.length;n++)if(!e.hasOwnProperty(i[n]))return!1;return!0};return k2.hasAllProperties=r,k2}var _w={},jue;function Bue(){if(jue)return _w;jue=1,Object.defineProperty(_w,"__esModule",{value:!0}),_w.createImagesArrayAsync=_w.createImageAsync=void 0;function r(i){return new Promise(function(n,t){var o=new Image;o.crossOrigin="Anonymous",o.onload=function(){return n(o)},o.onerror=t,o.src=i})}_w.createImageAsync=r;function e(i){var n=i.map(function(t){return r(t)});return Promise.all(n)}return _w.createImagesArrayAsync=e,_w}var I2={},Vue;function pTe(){if(Vue)return I2;Vue=1,Object.defineProperty(I2,"__esModule",{value:!0}),I2.getRandomInRange=void 0;var r=function(e,i,n){var t=Math.random(),o=e+t*(i-e);return parseInt((o*Math.pow(10,n)).toFixed(n),10)/Math.pow(10,n)};return I2.getRandomInRange=r,I2}var Pw={},Hue;function Uue(){if(Hue)return Pw;Hue=1,Object.defineProperty(Pw,"__esModule",{value:!0}),Pw.getNextRandomPriceBarFactory=Pw.getStocksDataFactory=void 0;var r=pTe(),e=function(o,a,s){return function(l,u){var c=.7,d=l+o,f=u,h=(0,r.getRandomInRange)(a,s,3),p=Math.abs(f-h),g=Math.max(f,h),v=(0,r.getRandomInRange)(g,Math.min(s,g+p*c),3),y=Math.min(f,h),m=(0,r.getRandomInRange)(Math.max(a,y-p*c),y,3);return{xValue:d,openValue:f,highValue:v,lowValue:m,closeValue:h}}};Pw.getStocksDataFactory=e;var i=(function(){function o(a,s,l,u,c,d){this.xValue=a,this.openValue=s,this.highValue=l,this.lowValue=u,this.closeValue=c,this.volume=d}return o})(),n=function(o,a,s,l){var u=o,c=new i(o,l,l,l,l,0);return function(d){d===void 0&&(d=!1);var f=function(){var p=c.closeValue,g=(Math.random()-.9)*l/30,v=Math.random(),y=.5*l+l/2*Math.sin(727220521664304e-20*u)+l/16*Math.cos(727220521664304e-19*u)+l/32*Math.sin(727220521664304e-19*(10+v)*u)+l/64*Math.cos(727220521664304e-19*(20+v)*u)+g,m=Math.max(p,y),b=Math.random()*l/100,S=m+b,_=Math.min(p,y),C=Math.random()*l/100,T=_-C,x=Math.random()*3e4+2e4,A=s?t(c.xValue):c.xValue,w=A+a*60;return c=new i(w,p,S,T,y,x),u+=a*60,c},h=function(){var p=c.closeValue+(Math.random()-.48)*(c.closeValue/100),g=p>c.highValue?p:c.highValue,v=p<c.lowValue?p:c.lowValue,y=(Math.random()*3e4+2e4)*.05;return c=new i(c.xValue,c.openValue,g,v,p,c.volume+y),c};return d?h():f()}};Pw.getNextRandomPriceBarFactory=n;var t=function(o){return o};return Pw}var N2={},zue;function Vze(){if(zue)return N2;zue=1,Object.defineProperty(N2,"__esModule",{value:!0}),N2.getAttributeFromString=void 0;var r=function(e,i){var n=e.indexOf(i);if(n>=0){var t=e.indexOf('"',n),o=t>=0?e.indexOf('"',t+1):-1;if(o>=0){var a=e.substr(t+1,o-t-1),s=parseInt(a,10);if(!isNaN(s))return s}}};return N2.getAttributeFromString=r,N2}var Wue;function ub(){return Wue||(Wue=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.PolarArcZoomModifier=r.PointerEventsMediatorModifier=r.PinchZoomModifier=r.OverviewRangeSelectionModifier=r.MouseWheelZoomModifier=r.EActionType=r.ModifierMouseArgs=r.ModifierArgsBase=r.LegendModifier=r.DataPointSelectionModifier=r.ESelectionMode=r.DataPointSelectionChangedArgs=r.DataPointInfo=r.CustomChartModifier2D=r.adjustTooltipPosition=r.calcTooltipSize=r.defaultCursorTooltipSvgTemplate=r.CursorModifier=r.getActiveAxes=r.testIsOverAxes=r.ChartModifierBase2D=r.ChartModifierBase=r.AnnotationHoverModifier=r.getSubTypes=r.createType=r.getFunction=r.registerFunction=r.registerWasmType=r.registerType=r.chartBuilder=r.ensureRegistrations=r.configureChart=r.buildChart=r.chartReviver=r.configure3DSurface=r.configure2DSurface=r.buildSubCharts=r.build3DChart=r.buildPieChart=r.build2DPolarChart=r.build2DChart=r.buildSeries3D=r.buildSeries=r.buildModifiers3D=r.buildModifiers=r.buildDataSeries3D=r.buildDataSeries=r.buildAxis3D=r.buildAxes=r.buildAnnotations=void 0,r.CentralAxesLayoutManager=r.BottomAlignedOuterHorizontallyStackedAxisLayoutStrategy=r.BottomAlignedOuterAxisLayoutStrategy=r.BottomAlignedInnerAxisLayoutStrategy=r.BaseCenteredAxisLayoutStrategy=r.BaseAxisLayoutStrategy=r.testLayoutManager=r.getCoordinateWithCoordinateMode=r.getValueWithCoordinateMode=r.updateTopAndBottomChartLayoutState=r.updateLeftAndRightChartLayoutState=r.getVerticalAxisRequiredSize=r.getHorizontalAxisRequiredSize=r.layoutAxisPartsBottomStrategy=r.layoutAxisPartsTopStrategy=r.layoutAxisPartsRightStrategy=r.layoutAxisPartsLeftStrategy=r.layoutAxisParts=r.updateAxisLayoutState=r.WebGlRenderContext2D=r.ELineDrawMode=r.calculateAbsoluteRenderLayer=r.WebGlPen=r.WebGlBrush=r.RenderContext2D=r.createPenInCache=r.getScrtPenFromCache=r.getWebGlPenFromCache=r.createBrushInCache=r.getScrtBrushFromCache=r.getWebGlBrushFromCache=r.BatchRenderContext=r.ZoomPanModifier=r.ZoomExtentsModifier=r.YAxisDragModifier=r.XAxisDragModifier=r.VerticalSliceModifier=r.SeriesSelectionModifier=r.getRubberBandRect=r.RubberBandXyZoomModifier=r.splitIntoClusters=r.RolloverModifier=r.PolarZoomExtentsModifier=r.PolarSeriesSelectionModifier=r.PolarPanModifier=r.EPolarPanModifierPanMode=r.PolarMouseWheelZoomModifier=r.PolarLegendModifier=r.PolarDataPointSelectionModifier=r.PolarCursorModifier=void 0,r.XyMovingAverageFilter=r.XyLinearTrendFilter=r.switchData=r.XyFilterBase=r.EDataSeriesField=r.XyCustomFilter=r.OhlcScaleOffsetFilter=r.OhlcFilterBase=r.OhlcCustomFilter=r.HlcScaleOffsetFilter=r.HlcFilterBase=r.HlcCustomFilter=r.FIFOVectorProvider=r.DoubleVectorProvider=r.DataPointSelectionPaletteProvider=r.DataDistributionCalculator=r.XyzSeriesInfo=r.XyySeriesInfo=r.XySeriesInfo=r.TriangleSeriesInfo=r.StackedXySeriesInfo=r.SeriesInfo=r.OhlcSeriesInfo=r.HlcSeriesInfo=r.HeatmapSeriesInfo=r.BoxPlotSeriesInfo=r.BoxPlotDataSeries=r.BasePaletteProvider=r.BaseHeatmapDataSeries=r.getWindowedYRange=r.BaseDataSeries=r.TopAlignedOuterHorizontallyStackedAxisLayoutStrategy=r.TopAlignedOuterAxisLayoutStrategy=r.TopAlignedInnerAxisLayoutStrategy=r.SynchronizedLayoutManager=r.SciChartVerticalGroup=r.SciChartHorizontalGroup=r.RightAlignedOuterVerticallyStackedAxisLayoutStrategy=r.RightAlignedOuterAxisLayoutStrategy=r.RightAlignedInnerAxisLayoutStrategy=r.RadialAxisLayoutStrategy=r.PolarLayoutManager=r.BasePolarAxisLayoutStrategy=r.AngularAxisLayoutStrategy=r.LeftAlignedOuterVerticallyStackedAxisLayoutStrategy=r.LeftAlignedOuterAxisLayoutStrategy=r.LeftAlignedInnerAxisLayoutStrategy=r.LayoutManager=r.EInnerAxisPlacementCoordinateMode=r.ChartLayoutState=void 0,r.IndexCoordinateCalculator=r.FlippedNumericCoordinateCalculator=r.FlippedIndexCoordinateCalculator=r.FlippedCategoryCoordinateCalculator=r.CoordinateCalculatorBase=r.CategoryCoordinateCalculator=r.XyzDataSeries=r.getYyYRange=r.XyyDataSeries=r.XyxyDataSeries=r.XyxDataSeries=r.XyTextDataSeries=r.XyNDataSeries=r.XyDataSeries=r.XDataSeries=r.UniformHeatmapDataSeries=r.XyzPointSeriesWrapped=r.XyzPointSeriesResampled=r.XyyPointSeriesWrapped=r.XyyPointSeriesResampled=r.XyPointSeriesWrapped=r.XyPointSeriesResampled=r.XyNPointSeriesResampled=r.OhlcPointSeriesWrapped=r.OhlcPointSeriesResampled=r.HlcPointSeriesWrapped=r.BoxPlotPointSeriesWrapped=r.BasePointSeriesWrapped=r.BasePointSeriesResampled=r.PaletteFactory=r.getOHLCYRange=r.OhlcDataSeries=r.NonUniformHeatmapDataSeries=r.MetadataPaletteProvider=r.TemplateMetadataGenerator=r.DefaultPaletteProvider=r.EFillPaletteMode=r.EStrokePaletteMode=r.EDataSeriesValueType=r.EDataChangeType=r.EDataSeriesType=r.HlcDataSeries=r.XyzScaleOffsetFilter=r.XyzFilterBase=r.XyzCustomFilter=r.XyyScaleOffsetFilter=r.XyyFilterBase=r.XyyCustomFilter=r.XyScaleOffsetFilter=r.XyRatioFilter=void 0,r.LineAnnotation=r.EAnnotationType=r.EAnnotationLayer=r.HtmlTextAnnotation=r.HtmlCustomAnnotation=r.HorizontalLineAnnotation=r.DomAnnotationBase=r.CustomAnnotation=r.CursorTooltipSvgAnnotation=r.BoxAnnotation=r.AxisMarkerAnnotation=r.ArcAnnotationBase=r.ArcAnnotation=r.AnnotationHoverEventArgs=r.annotationHelpers=r.AnnotationDragDeltaEventArgs=r.AnnotationClickEventArgs=r.AnnotationBase=r.ECoordinateMode=r.EDraggingGripPoint=r.AdornerLayer=r.SciChartJsNavyTheme=r.SciChartJSLightTheme=r.SciChartJSDarkv2Theme=r.SciChartJSDarkTheme=r.stripAutoColor=r.ThemeProvider=r.AUTO_COLOR=r.getAdjustedRotation=r.TitleRendererBase=r.SciChartRenderer=r.RenderPassInfo=r.RenderPassDataCollection=r.RenderPassData=r.ChartTitleRenderer=r.TickProvider=r.NumericTickProvider=r.LogarithmicTickProvider=r.ELogarithmicMajorTickMode=r.ELogarithmicMinorTickMode=r.IndexTickProvider=r.TickCoordinatesProvider=r.StaticTickCoordinatesProvider=r.PolarTickCoordinatesProvider=r.DefaultTickCoordinatesProvider=r.ResamplingParams=r.EResamplingMode=r.ExtremeResamplerHelper=r.NumericCoordinateCalculator=r.LogarithmicCoordinateCalculator=void 0,r.TextLabelProvider=r.SmartDateLabelProvider=r.DEFAULT_LABEL_THRESHOLDS=r.EHighPrecisionLabelMode=r.EDatePrecision=r.ETradeChartLabelFormat=r.RadianLabelProvider=r.PieLabelProvider=r.NumericLabelProvider=r.LogarithmicLabelProvider=r.LabelProviderBase2D=r.LabelInfo=r.LabelProvider=r.labelCache=r.DateLabelProvider=r.getAxis3dById=r.getAxisById=r.DiscontinuousDateAxis=r.NumericDeltaCalculator=r.LogarithmicDeltaCalculator=r.IndexDeltaCalculator=r.DeltaCalculator=r.DateTimeDeltaCalculator=r.CategoryDeltaCalculator=r.DateTimeNumericAxis=r.CategoryAxisBase=r.CategoryAxis=r.BaseValueAxis=r.AxisTitleRenderer=r.AxisRenderer=r.PolarAxisLayoutState=r.AxisLayoutState=r.AxisCore=r.AxisBase2D=r.EClipMode=r.VerticalLineAnnotation=r.TextAnnotation=r.SvgLineAnnotation=r.SvgAnnotationBase=r.RolloverTooltipSvgAnnotation=r.RolloverMarkerSvgAnnotation=r.RolloverLegendSvgAnnotation=r.RenderContextAnnotationBase=r.PolarPointerAnnotation=r.PolarArcAnnotation=r.OverviewCustomResizableAnnotation=r.NativeTextAnnotation=r.EWrapTo=r.LineArrowAnnotation=r.EArrowHeadPosition=void 0,r.ELegendPlacement=r.ELegendOrientation=r.SciChartLegend=r.SciChart3DLegend=r.ManualLegend=r.polarChartHelper=r.getAllFontKeys=r.getFontKey=r.getVector3=r.getVector2=r.getVector4=r.getNativeRect=r.getTextBounds=r.getTextureVertex=r.getArcParams=r.getArcVertex=r.getVertex=r.getVectorArcVertex=r.getVectorColorTextureVertex=r.getVectorColorVertex=r.getVectorRectVertex=r.freeCache=r.deleteCache=r.FontKey=r.labelHelper=r.getLabelValue=r.getLineCoordinates=r.getLabelCoordinates=r.drawAxisMarkerAnnotation=r.drawLineAnnotation=r.drawModifiersAxisLabel=r.drawBorder=r.createSolidBrush=r.createSCRTPen=r.createNativeRect=r.HeatmapLegend=r.initializeChartEngine2D=r.getSharedWasmContext=r.VisibleRangeChangedArgs=r.EPolarLabelMode=r.EPolarGridlineMode=r.EPolarAxisMode=r.PolarNumericAxis=r.PolarCategoryAxis=r.PolarAxisRenderer=r.PolarAxisBase=r.NumericAxis=r.LogarithmicAxis=r.MIN_LOG_AXIS_VALUE=r.wrapText=void 0,r.BubbleSeriesDataLabelProvider=r.BaseDataLabelProvider=r.BandSeriesDataLabelProvider=r.BaseStackedRenderableSeries=r.BaseStackedMountainRenderableSeries=r.BaseStackedCollection=r.BaseRenderableSeries=r.BaseOhlcRenderableSeries=r.BaseMountainRenderableSeries=r.BaseLineRenderableSeries=r.ELineType=r.BaseHeatmapRenderableSeries=r.BaseBandRenderableSeries=r.WaveAnimation=r.SweepAnimation=r.SeriesAnimation=r.ScatterAnimation=r.ScaleAnimation=r.PointMarkerStyle=r.OhlcAnimationStyle=r.OhlcAnimation=r.MountainAnimationStyle=r.MountainAnimation=r.LineAnimation=r.FadeAnimation=r.CustomPointMarkerStyle=r.ColumnAnimationStyle=r.ColumnAnimation=r.CandlestickAnimationStyle=r.CandlestickAnimation=r.BubbleAnimation=r.BasePointMarkerStyle=r.BaseAnimationStyle=r.BandAnimationStyle=r.BandAnimation=r.animationHelpers=r.XPointMarker=r.TrianglePointMarker=r.SquarePointMarker=r.SpritePointMarker=r.EllipsePointMarker=r.CrossPointMarker=r.BasePointMarker=r.DefaultSciChartLoader=r.licenseManager2dState=r.SciChartPieLegend=r.getLegendContainerHtml=r.getLegendItemHtml=r.SciChartLegendBase=r.ELegendType=void 0,r.FastLineRenderableSeries=r.FastImpulseRenderableSeries=r.FastErrorBarsRenderableSeries=r.getXRange=r.FastColumnRenderableSeries=r.FastCandlestickRenderableSeries=r.FastBubbleRenderableSeries=r.FastBoxPlotRenderableSeries=r.FastBandRenderableSeries=r.UniformHeatmapDrawingProvider=r.UniformContoursDrawingProvider=r.TriangleSeriesDrawingProvider=r.StackedColumnSeriesDrawingProvider=r.StackedColumnRenderPassData=r.SmearSeriesDrawingProvider=r.RectangleSeriesDrawingProvider=r.PointMarkerDrawingProvider=r.OhlcSeriesDrawingProvider=r.EOhlcDrawingMode=r.NonUniformHeatmapDrawingProvider=r.MountainSeriesDrawingProvider=r.LineSeriesDrawingProvider=r.LineSegmentSeriesDrawingProvider=r.HeightSeriesDrawingProvider=r.calculateHeatmapTexture=r.calculateCellCoordinates=r.calculateOffsets=r.createColorMap=r.getColor=r.getColorDataForTexture=r.ErrorSeriesDrawingProvider=r.ColumnSeriesDrawingProvider=r.BubbleSeriesDrawingProvider=r.BoxPlotSeriesDrawingProvider=r.BaseSeriesDrawingProvider=r.BandSeriesDrawingProvider=r.TextDataLabelProvider=r.StackedColumnSeriesDataLabelProvider=r.StackedCollectionDataLabelProvider=r.RectangleSeriesDataLabelProvider=r.RectangleDataLabelState=r.NonUniformHeatMapDataLabelProvider=r.LineSeriesDataLabelProvider=r.HeatMapDataLabelProvider=r.DataLabelState=r.DataLabelProvider=r.dataLabelHelpers=r.ContoursDataLabelProvider=r.ColumnSeriesDataLabelProvider=r.EColumnDataLabelPosition=void 0,r.PolarColumnRenderableSeries=r.PolarBandRenderableSeries=r.PolarMountainSeriesHitTestProvider=r.PolarLineSeriesHitTestProvider=r.polarHitTestHelpers=r.PolarDataPointHitTestProvider=r.PolarTriangleSeriesDrawingProvider=r.PolarPointMarkerDrawingProvider=r.PolarLineSeriesDrawingProvider=r.PolarHeatmapDrawingProvider=r.PolarColumnSeriesDrawingProvider=r.PolarBandSeriesDrawingProvider=r.PolarTextDataLabelProvider=r.PolarHeatMapDataLabelProvider=r.PolarDataLabelState=r.PolarDataLabelProvider=r.PolarColumnSeriesDataLabelProvider=r.PolarColumnDataLabelState=r.NonUniformHeatmapRenderableSeries=r.HoveredChangedArgs=r.UniformHeatmapHitTestProvider=r.TriangleSeriesHitTestProvider=r.TextSeriesHitTestProvider=r.StackedMountainSeriesHitTestProvider=r.StackedColumnSeriesHitTestProvider=r.ScatterSeriesHitTestProvider=r.RectangleSeriesHitTestProvider=r.OhlcSeriesHitTestProvider=r.NonUniformHeatmapHitTestProvider=r.MountainSeriesHitTestProvider=r.LineSeriesHitTestProvider=r.LineSegmentSeriesHitTestProvider=r.ImpulseSeriesHitTestProvider=r.HitTestInfo=r.hitTestHelpersRectangleSeries=r.hitTestHelpers=r.ErrorSeriesHitTestProvider=r.ColumnSeriesHitTestProvider=r.BubbleSeriesHitTestProvider=r.BoxPlotSeriesHitTestProvider=r.BaseHitTestProvider=r.BandSeriesHitTestProvider=r.HeatmapColorMap=r.GlowEffect=r.FastTriangleRenderableSeries=r.FastTextRenderableSeries=r.FastRectangleRenderableSeries=r.FastOhlcRenderableSeries=r.FastMountainRenderableSeries=r.FastLineSegmentRenderableSeries=void 0,r.EPieType=r.ESizingMode=r.PieSegment=r.SciChartOverview=r.SciChartDefaults=r.RubberBandSvgRect=r.XyScatterRenderableSeries=r.UniformHeatmapRenderableSeries=r.UniformContoursRenderableSeries=r.EContourColorMapMode=r.StackedXyCollection=r.StackedMountainRenderableSeries=r.StackedMountainCollection=r.StackedColumnRenderableSeries=r.StackedColumnCollection=r.SplineMountainRenderableSeries=r.SplineLineRenderableSeries=r.SplineBandRenderableSeries=r.SmoothStackedMountainRenderableSeries=r.ShadowEffect=r.ShaderEffect=r.SeriesVisibleChangedArgs=r.SeriesSelectedArgs=r.SeriesHoveredArgs=r.SelectionChangedArgs=r.RolloverModifierRenderableSeriesProps=r.XyySplineRenderDataTransform=r.SplineRenderDataTransform=r.PolarInterpolateLineRenderDataTransform=r.PolarInterpolateBandRenderDataTransform=r.SmoothStackedRenderDataTransform=r.XyyBezierRenderDataTransform=r.BezierRenderDataTransform=r.bezierTransform=r.BaseRenderDataTransformJS=r.XyzBaseRenderDataTransform=r.OhlcBaseRenderDataTransform=r.XyyBaseRenderDataTransform=r.XyBaseRenderDataTransform=r.BaseRenderDataTransform=r.PolarXyScatterRenderableSeries=r.PolarUniformHeatmapRenderableSeries=r.PolarTriangleRenderableSeries=r.PolarTextRenderableSeries=r.PolarStackedMountainRenderableSeries=r.PolarStackedMountainCollection=r.PolarStackedColumnRenderableSeries=r.PolarStackedColumnCollection=r.PolarMountainRenderableSeries=r.PolarLineRenderableSeries=void 0,r.getSharedWasmContext3D=r.AxisPlane=r.EAxisPlaneType=r.NumericAxis3D=r.getArraysEqual=r.getTextStylesEqual=r.getTArgbEqual=r.getLineStylesEqual=r.getDescriptorsEqual=r.ETextAlignment3D=r.EAxisSideClipping=r.AxisCubeEntity=r.AxisBase3D=r.EWhichAxis=r.TooltipSvgAnnotation3D=r.Vector3=r.XyzDataSeries3D=r.UniformGridDataSeries3D=r.BaseGridDataSeries3D=r.BaseDataSeries3D=r.EDataSeriesType3D=r.adjustTooltipPosition3D=r.TooltipModifier3D=r.ResetCamera3DModifier=r.PinchZoomModifier3D=r.OrbitModifier3D=r.MouseWheelZoomModifier3D=r.LegendModifier3D=r.CustomChartModifier3D=r.ChartModifierBase3D=r.CameraController=r.ECameraProjectionMode=r.UpdateSuspender=r.measureTextWidth=r.measureTextHeight=r.TextureManager=r.DpiHelper=r.CanvasTexture=r.SciChartSurfaceCore=r.createChartDestination=r.SciChartSurfaceBase=r.DebugForDpi=r.SciChartSurface=r.sciChartConfig=r.sciChartSubSurfaceCommon=r.SciChartSubSurface=r.SciChartPolarSurface=r.SciChartPolarSubSurface=r.SciChartPieSurface=r.EPieValueMode=void 0,r.SciChart3DSurface=r.sciChartConfig3D=r.SciChart3DRenderer=r.RootSceneEntity=r.XyzSeriesInfo3D=r.SurfaceMeshSeriesInfo3D=r.SurfaceMeshRenderableSeries3D=r.EMeshResolution=r.EMeshPaletteMode=r.EDrawMeshAs=r.SolidColorBrushPalette=r.MeshColorPalette=r.GradientColorPalette=r.SeriesInfo3D=r.Series3DVisibleChangedArgs=r.ScatterRenderableSeries3D=r.PointLineRenderableSeries3D=r.HitTestInfo3D=r.ESeriesType3D=r.ColumnRenderableSeries3D=r.BaseRenderableSeries3D=r.SurfaceMeshSceneEntity=r.SurfaceMeshSceneEntityState=r.SceneDescriptor=r.ScatterPointsSceneEntity=r.RenderPassInfo3D=r.RenderableSeriesSceneEntityState=r.RenderableSeriesSceneEntity=r.PointLine3DSceneEntity=r.DefaultEntityIdProvider=r.CrosshairLinesSceneEntity=r.ColumnSceneEntity=r.BaseSceneEntity3D=r.AxisCubeDescriptor=r.TrianglePointMarker3D=r.EllipsePointMarker3D=r.QuadPointMarker=r.PixelPointMarker3D=r.CylinderPointMarker3D=r.PyramidPointMarker3D=r.CubePointMarker3D=r.SpherePointMarker3D=r.BaseTexturePointMarker3D=r.BasePointMarker3D=r.EMarkerType=r.BaseMeshPointMarker3D=r.GizmoEntity=r.DefaultViewportManager3D=r.createSingle3dInternal=r.initializeChartEngine3D=void 0,r.getIsHorizontal=r.EAxisAlignment=r.EAutoRange=r.EAutoColorMode=r.EAnnotationClippingMode=r.EAnimationType=r.EVerticalAnchorPoint=r.EHorizontalAnchorPoint=r.WebGlHelper=r.EWebGLSupport=r.Thickness=r.sendTelemetry=r.shouldSendTelemetry=r.getUserCookie=r.localStorageApi=r.SimdHelper=r.Rect=r.PropertyChangedEventArgs=r.Point=r.OneTimePerformanceWarning=r.ObservableArrayChangedArgs=r.EObservableArrayChangedAction=r.ObservableArray=r.ObservableArrayBase=r.NumberUtil=r.NumberRange=r.MouseManager=r.List=r.IncludedItems=r.Guard=r.GradientParams=r.receiveNextEvent=r.EventHandler=r.Dictionary=r.deleteSafe=r.DeletableEntity=r.checkBuildStamp=r.libraryVersion=r.AnimationToken=r.NumberRangeAnimator=r.GenericAnimation=r.autoReverseEasing=r.easing=r.DoubleAnimator=r.animateAny=r.SeriesAnimationFiniteStateMachine=r.AnimationFiniteStateMachine=r.EAnimationStateTransition=r.EAnimationState=r.ViewportManager3DBase=void 0,r.ELabelPlacement=r.ELabelAlignment=r.EHoverMode=r.EHeightSeriesMode=r.EColorPickMode=r.EUseWasmSimd=r.EErrorMode=r.EErrorDirection=r.EDragMode=r.EDefaultRenderLayer=r.EDataPointWidthMode=r.EDataLabelSkipMode=r.EDataLabelProviderType=r.EDataFilterType=r.ECursorStyle=r.convertCoordinateFromRelativeValue=r.convertCoordinateFromPixelValue=r.convertCoordinateFromDataValue=r.convertToRelativeCoordinate=r.convertToPixelCoordinate=r.convertToDataValue=r.convertCoordinateMode=r.convertFromAbsoluteCoordinate=r.convertAbsoluteCoordinateToRelativeValue=r.convertAbsoluteCoordinateToPixelValue=r.convertAbsoluteCoordinateToDataValue=r.convertToAbsoluteCoordinate=r.convertRelativeValueToAbsoluteCoordinate=r.convertPixelValueToAbsoluteCoordinate=r.convertDataValueToAbsoluteCoordinate=r.subtractCoord=r.addCoord=r.convertYColumnMode=r.EColumnYMode=r.convertColumnMode=r.EColumnMode=r.EColor=r.EChart3DModifierType=r.EChart2DModifierType=r.EModifierMouseArgKey=r.EExecuteOn=r.EBaseType=r.EAxisType=r.convertAxisPlaneVisibilityMode=r.EAxisPlaneVisibilityMode=r.convert3DPlaneModeForTitles=r.convert3DPlaneModeForLabels=r.EAxisPlaneDrawLabelsMode=r.handleInvalidAxisAlignment=r.getIsVertical=void 0,r.countUnique=r.getUniqueValues=r.EZoomState=r.EYRangeMode=r.EXyDirection=r.EWatermarkPosition=r.generateValueNamesForDataSeries=r.EValueName=r.ETriangleSeriesDrawMode=r.EColorMapMode=r.EThemeProviderType=r.convert3DTitleRotationMode=r.convert3DLabelOrientationMode=r.E3DTitleRotationMode=r.E3DLabelOrientationMode=r.ETitlePosition=r.ETextAlignment=r.convertMultiLineAlignment=r.EMultiLineAlignment=r.EVerticalTextPosition=r.EHorizontalTextPosition=r.ESurfaceType=r.ESubSurfacePositionCoordinateMode=r.ESubChartClippingMode=r.Size=r.EShaderEffectType=r.ESeriesType=r.convertSearchMode=r.ESearchMode=r.ESciChartSurfaceType=r.ESceneEntityType=r.ERenderLayer=r.EStrokeLineJoin=r.EPointMarkerType=r.EPointMarker3DType=r.EPaletteProviderType=r.OrderedRenderable=r.ENumericFormat=r.subArray=r.isNumberArray=r.isTypedArray=r.EMousePosition=r.EModifierType=r.ELayoutStrategyType=r.ELayoutManagerType=r.ELabelProviderType=r.ERadialAxisLabelPlacement=r.EAngularAxisLabelPlacement=r.EVerticalAlignment=r.EHorizontalAlignment=void 0,r.htmlToElement=r.validateColorStops=r.HEIGHT_SERIES_MAX_TEXTURE_SIZE=r.hashUtils=r.hasAllProperties=r.base64Id=r.generateGuid=r.geometryHelpers=r.getFontFamily=r.getDefaultFontName=r.getFontString=r.logDoubleVector=r.formatUnixDateToHumanStringSSns=r.formatUnixDateToHumanStringSSus=r.formatUnixDateToHumanStringYYYY=r.formatUnixDateToHumanStringDD=r.formatUnixDateToHumanStringMMM=r.formatUnixDateToHumanStringMMMDD=r.formatUnixDateToHumanStringHHMM=r.formatUnixDateToHumanStringSSms=r.formatUnixDateToHumanStringHHMMSS=r.formatUnixDateToHumanStringDDMM=r.formatUnixDateToHumanStringDDMMHHMM=r.formatUnixDateToHumanStringDDMMYY=r.formatUnixDateToHumanString=r.copyDoubleVector=r.convertToPixel=r.convertRgbToHexColor=r.convertColor=r.applyOpacityToHtmlColor=r.uintArgbColorIsTransparent=r.uintArgbColorOverrideOpacity=r.uintArgbColorMultiplyOpacity=r.uintArgbColorToAbgr=r.linearColorMapLerp=r.uintArgbColorLerp=r.uintArgbColorLerp24bit=r.appendDoubleVectorFromBuffer=r.appendDoubleVectorFromJsArray=r.memCopyFloat32=r.insertDoubleVectorFromJsArray=r.SIZEOF_FLOAT32=r.SIZEOF_NUMBER=r.calcAverageForArray=r.calcAverageForDoubleVector=r.appendRangeFifo=r.makeIncArray=r.isArraySorted=r.arrayRemove=r.areArraysEqual=void 0,r.getMultilineTextHeight=r.getTextHeightToBaseline=r.getFirstLineHeightToBaseline=r.getNativeTextSize=r.convertToNativeLineSpacing=r.wrapNativeText=r.getAttributeFromString=r.getNextRandomPriceBarFactory=r.getStocksDataFactory=r.getRandomInRange=r.testPointInTriangle=r.calcDistanceFromLineSegment=r.calcDotProduct=r.testIsInInterval=r.testIsInXBounds=r.calcAnnotationBordersForAxisMarker=r.testIsInBounds=r.calcDistance=r.calcCrossProduct=r.calcDistanceFromLine=r.runAfterFramePaint=r.PerformanceDebugHelper=r.EPerformanceDebugLevel=r.EPerformanceMarkType=r.parseTArgbToHtmlColor=r.parseArgbToHtmlColor=r.parseColorToTArgb=r.toHex=r.parseColorToUIntAbgr=r.parseColorToUIntArgb=r.parseColorToHexStringAbgr=r.parseColorToHexStringArgb=r.checkIsNaN=r.toEngineering=r.toScientific=r.toSuperScript=r.formatNumber=r.numericHashCode=r.formatNumber2Digits=r.MemoryUsageHelper=r.ObjectRegistry=r.memoize=r.logToBase=r.fillNoisySinewave=r.getNoisySinewave=r.Logger=r.isRealNumber=r.createImagesArrayAsync=r.createImageAsync=r.stringOccurrences=void 0,r.zeroArray2D=r.watermarkHelpers=r.vectorToArrayViewI32=r.vectorToArrayViewUi32=r.vectorToArrayViewF32=r.vectorToArrayViewF64=r.vectorToArray=r.fromTsrVector4=r.updateTsrVector4=r.translateDataValueRectToAbsolute=r.translateToNotScaledRect=r.translateToScaledRect=r.translateToNotScaled=r.translateToScaled=r.translateFromSeriesViewRectToCanvasY=r.translateFromSeriesViewRectToCanvasX=r.translateFromCanvasToSeriesViewRectY=r.translateFromCanvasToSeriesViewRectX=r.translateFromSeriesViewRectToCanvas=r.translateFromCanvasToSeriesViewRect=r.EShift=r.ECoord=r.ESize=r.getNativeTextPosition=void 0;var e=DX();Object.defineProperty(r,"buildAnnotations",{enumerable:!0,get:function(){return e.buildAnnotations}});var i=e3();Object.defineProperty(r,"buildAxes",{enumerable:!0,get:function(){return i.buildAxes}});var n=e3();Object.defineProperty(r,"buildAxis3D",{enumerable:!0,get:function(){return n.buildAxis3D}});var t=XN();Object.defineProperty(r,"buildDataSeries",{enumerable:!0,get:function(){return t.buildDataSeries}});var o=XN();Object.defineProperty(r,"buildDataSeries3D",{enumerable:!0,get:function(){return o.buildDataSeries3D}});var a=n3();Object.defineProperty(r,"buildModifiers",{enumerable:!0,get:function(){return a.buildModifiers}});var s=n3();Object.defineProperty(r,"buildModifiers3D",{enumerable:!0,get:function(){return s.buildModifiers3D}});var l=QN();Object.defineProperty(r,"buildSeries",{enumerable:!0,get:function(){return l.buildSeries}});var u=QN();Object.defineProperty(r,"buildSeries3D",{enumerable:!0,get:function(){return u.buildSeries3D}});var c=uS();Object.defineProperty(r,"build2DChart",{enumerable:!0,get:function(){return c.build2DChart}});var d=uS();Object.defineProperty(r,"build2DPolarChart",{enumerable:!0,get:function(){return d.build2DPolarChart}});var f=uS();Object.defineProperty(r,"buildPieChart",{enumerable:!0,get:function(){return f.buildPieChart}});var h=uS();Object.defineProperty(r,"build3DChart",{enumerable:!0,get:function(){return h.build3DChart}});var p=uS();Object.defineProperty(r,"buildSubCharts",{enumerable:!0,get:function(){return p.buildSubCharts}});var g=uS();Object.defineProperty(r,"configure2DSurface",{enumerable:!0,get:function(){return g.configure2DSurface}});var v=uS();Object.defineProperty(r,"configure3DSurface",{enumerable:!0,get:function(){return v.configure3DSurface}});var y=fg();Object.defineProperty(r,"chartReviver",{enumerable:!0,get:function(){return y.chartReviver}});var m=fg();Object.defineProperty(r,"buildChart",{enumerable:!0,get:function(){return m.buildChart}});var b=fg();Object.defineProperty(r,"configureChart",{enumerable:!0,get:function(){return b.configureChart}});var S=fg();Object.defineProperty(r,"ensureRegistrations",{enumerable:!0,get:function(){return S.ensureRegistrations}});var _=fg();Object.defineProperty(r,"chartBuilder",{enumerable:!0,get:function(){return _.chartBuilder}});var C=Jn();Object.defineProperty(r,"registerType",{enumerable:!0,get:function(){return C.registerType}});var T=Jn();Object.defineProperty(r,"registerWasmType",{enumerable:!0,get:function(){return T.registerWasmType}});var x=Jn();Object.defineProperty(r,"registerFunction",{enumerable:!0,get:function(){return x.registerFunction}});var A=Jn();Object.defineProperty(r,"getFunction",{enumerable:!0,get:function(){return A.getFunction}});var w=Jn();Object.defineProperty(r,"createType",{enumerable:!0,get:function(){return w.createType}});var L=Jn();Object.defineProperty(r,"getSubTypes",{enumerable:!0,get:function(){return L.getSubTypes}});var k=B_e();Object.defineProperty(r,"AnnotationHoverModifier",{enumerable:!0,get:function(){return k.AnnotationHoverModifier}});var D=X8();Object.defineProperty(r,"ChartModifierBase",{enumerable:!0,get:function(){return D.ChartModifierBase}});var j=nu();Object.defineProperty(r,"ChartModifierBase2D",{enumerable:!0,get:function(){return j.ChartModifierBase2D}});var N=nu();Object.defineProperty(r,"testIsOverAxes",{enumerable:!0,get:function(){return N.testIsOverAxes}});var V=nu();Object.defineProperty(r,"getActiveAxes",{enumerable:!0,get:function(){return V.getActiveAxes}});var W=qw();Object.defineProperty(r,"CursorModifier",{enumerable:!0,get:function(){return W.CursorModifier}});var K=qw();Object.defineProperty(r,"defaultCursorTooltipSvgTemplate",{enumerable:!0,get:function(){return K.defaultCursorTooltipSvgTemplate}});var H=qw();Object.defineProperty(r,"calcTooltipSize",{enumerable:!0,get:function(){return H.calcTooltipSize}});var U=qw();Object.defineProperty(r,"adjustTooltipPosition",{enumerable:!0,get:function(){return U.adjustTooltipPosition}});var I=uze();Object.defineProperty(r,"CustomChartModifier2D",{enumerable:!0,get:function(){return I.CustomChartModifier2D}});var Q=T_e();Object.defineProperty(r,"DataPointInfo",{enumerable:!0,get:function(){return Q.DataPointInfo}});var Z=x_e();Object.defineProperty(r,"DataPointSelectionChangedArgs",{enumerable:!0,get:function(){return Z.DataPointSelectionChangedArgs}});var ee=t3();Object.defineProperty(r,"ESelectionMode",{enumerable:!0,get:function(){return ee.ESelectionMode}});var ie=t3();Object.defineProperty(r,"DataPointSelectionModifier",{enumerable:!0,get:function(){return ie.DataPointSelectionModifier}});var de=J8();Object.defineProperty(r,"LegendModifier",{enumerable:!0,get:function(){return de.LegendModifier}});var pe=Ibe();Object.defineProperty(r,"ModifierArgsBase",{enumerable:!0,get:function(){return pe.ModifierArgsBase}});var _e=Nbe();Object.defineProperty(r,"ModifierMouseArgs",{enumerable:!0,get:function(){return _e.ModifierMouseArgs}});var Te=r3();Object.defineProperty(r,"EActionType",{enumerable:!0,get:function(){return Te.EActionType}});var De=r3();Object.defineProperty(r,"MouseWheelZoomModifier",{enumerable:!0,get:function(){return De.MouseWheelZoomModifier}});var Pe=Q8();Object.defineProperty(r,"OverviewRangeSelectionModifier",{enumerable:!0,get:function(){return Pe.OverviewRangeSelectionModifier}});var Ee=uU();Object.defineProperty(r,"PinchZoomModifier",{enumerable:!0,get:function(){return Ee.PinchZoomModifier}});var Re=j_e();Object.defineProperty(r,"PointerEventsMediatorModifier",{enumerable:!0,get:function(){return Re.PointerEventsMediatorModifier}});var je=U_e();Object.defineProperty(r,"PolarArcZoomModifier",{enumerable:!0,get:function(){return je.PolarArcZoomModifier}});var Ke=z_e();Object.defineProperty(r,"PolarCursorModifier",{enumerable:!0,get:function(){return Ke.PolarCursorModifier}});var ot=W_e();Object.defineProperty(r,"PolarDataPointSelectionModifier",{enumerable:!0,get:function(){return ot.PolarDataPointSelectionModifier}});var We=Y_e();Object.defineProperty(r,"PolarLegendModifier",{enumerable:!0,get:function(){return We.PolarLegendModifier}});var xe=$_e();Object.defineProperty(r,"PolarMouseWheelZoomModifier",{enumerable:!0,get:function(){return xe.PolarMouseWheelZoomModifier}});var ve=SY();Object.defineProperty(r,"EPolarPanModifierPanMode",{enumerable:!0,get:function(){return ve.EPolarPanModifierPanMode}});var he=SY();Object.defineProperty(r,"PolarPanModifier",{enumerable:!0,get:function(){return he.PolarPanModifier}});var Se=G_e();Object.defineProperty(r,"PolarSeriesSelectionModifier",{enumerable:!0,get:function(){return Se.PolarSeriesSelectionModifier}});var be=q_e();Object.defineProperty(r,"PolarZoomExtentsModifier",{enumerable:!0,get:function(){return be.PolarZoomExtentsModifier}});var ke=i3();Object.defineProperty(r,"RolloverModifier",{enumerable:!0,get:function(){return ke.RolloverModifier}});var qe=i3();Object.defineProperty(r,"splitIntoClusters",{enumerable:!0,get:function(){return qe.splitIntoClusters}});var rt=KN();Object.defineProperty(r,"RubberBandXyZoomModifier",{enumerable:!0,get:function(){return rt.RubberBandXyZoomModifier}});var St=KN();Object.defineProperty(r,"getRubberBandRect",{enumerable:!0,get:function(){return St.getRubberBandRect}});var xt=eX();Object.defineProperty(r,"SeriesSelectionModifier",{enumerable:!0,get:function(){return xt.SeriesSelectionModifier}});var It=R_e();Object.defineProperty(r,"VerticalSliceModifier",{enumerable:!0,get:function(){return It.VerticalSliceModifier}});var Zt=k_e();Object.defineProperty(r,"XAxisDragModifier",{enumerable:!0,get:function(){return Zt.XAxisDragModifier}});var ct=I_e();Object.defineProperty(r,"YAxisDragModifier",{enumerable:!0,get:function(){return ct.YAxisDragModifier}});var Qe=iX();Object.defineProperty(r,"ZoomExtentsModifier",{enumerable:!0,get:function(){return Qe.ZoomExtentsModifier}});var Et=N_e();Object.defineProperty(r,"ZoomPanModifier",{enumerable:!0,get:function(){return Et.ZoomPanModifier}});var Gt=Wbe();Object.defineProperty(r,"BatchRenderContext",{enumerable:!0,get:function(){return Gt.BatchRenderContext}});var Xe=hl();Object.defineProperty(r,"getWebGlBrushFromCache",{enumerable:!0,get:function(){return Xe.getWebGlBrushFromCache}});var Vt=hl();Object.defineProperty(r,"getScrtBrushFromCache",{enumerable:!0,get:function(){return Vt.getScrtBrushFromCache}});var lr=hl();Object.defineProperty(r,"createBrushInCache",{enumerable:!0,get:function(){return lr.createBrushInCache}});var Jt=ts();Object.defineProperty(r,"getWebGlPenFromCache",{enumerable:!0,get:function(){return Jt.getWebGlPenFromCache}});var kr=ts();Object.defineProperty(r,"getScrtPenFromCache",{enumerable:!0,get:function(){return kr.getScrtPenFromCache}});var qt=ts();Object.defineProperty(r,"createPenInCache",{enumerable:!0,get:function(){return qt.createPenInCache}});var zt=cze();Object.defineProperty(r,"RenderContext2D",{enumerable:!0,get:function(){return zt.RenderContext2D}});var jr=gSe();Object.defineProperty(r,"WebGlBrush",{enumerable:!0,get:function(){return jr.WebGlBrush}});var Be=Ube();Object.defineProperty(r,"WebGlPen",{enumerable:!0,get:function(){return Be.WebGlPen}});var Ge=Ul();Object.defineProperty(r,"calculateAbsoluteRenderLayer",{enumerable:!0,get:function(){return Ge.calculateAbsoluteRenderLayer}});var ut=Ul();Object.defineProperty(r,"ELineDrawMode",{enumerable:!0,get:function(){return ut.ELineDrawMode}});var Pt=Ul();Object.defineProperty(r,"WebGlRenderContext2D",{enumerable:!0,get:function(){return Pt.WebGlRenderContext2D}});var Qt=ja();Object.defineProperty(r,"updateAxisLayoutState",{enumerable:!0,get:function(){return Qt.updateAxisLayoutState}});var wr=ja();Object.defineProperty(r,"layoutAxisParts",{enumerable:!0,get:function(){return wr.layoutAxisParts}});var Xr=ja();Object.defineProperty(r,"layoutAxisPartsLeftStrategy",{enumerable:!0,get:function(){return Xr.layoutAxisPartsLeftStrategy}});var pi=ja();Object.defineProperty(r,"layoutAxisPartsRightStrategy",{enumerable:!0,get:function(){return pi.layoutAxisPartsRightStrategy}});var Qr=ja();Object.defineProperty(r,"layoutAxisPartsTopStrategy",{enumerable:!0,get:function(){return Qr.layoutAxisPartsTopStrategy}});var Ur=ja();Object.defineProperty(r,"layoutAxisPartsBottomStrategy",{enumerable:!0,get:function(){return Ur.layoutAxisPartsBottomStrategy}});var ci=ja();Object.defineProperty(r,"getHorizontalAxisRequiredSize",{enumerable:!0,get:function(){return ci.getHorizontalAxisRequiredSize}});var Xt=ja();Object.defineProperty(r,"getVerticalAxisRequiredSize",{enumerable:!0,get:function(){return Xt.getVerticalAxisRequiredSize}});var Ui=ja();Object.defineProperty(r,"updateLeftAndRightChartLayoutState",{enumerable:!0,get:function(){return Ui.updateLeftAndRightChartLayoutState}});var Dn=ja();Object.defineProperty(r,"updateTopAndBottomChartLayoutState",{enumerable:!0,get:function(){return Dn.updateTopAndBottomChartLayoutState}});var Kr=ja();Object.defineProperty(r,"getValueWithCoordinateMode",{enumerable:!0,get:function(){return Kr.getValueWithCoordinateMode}});var In=ja();Object.defineProperty(r,"getCoordinateWithCoordinateMode",{enumerable:!0,get:function(){return In.getCoordinateWithCoordinateMode}});var fn=ja();Object.defineProperty(r,"testLayoutManager",{enumerable:!0,get:function(){return fn.testLayoutManager}});var vt=F1();Object.defineProperty(r,"BaseAxisLayoutStrategy",{enumerable:!0,get:function(){return vt.BaseAxisLayoutStrategy}});var dr=qF();Object.defineProperty(r,"BaseCenteredAxisLayoutStrategy",{enumerable:!0,get:function(){return dr.BaseCenteredAxisLayoutStrategy}});var ue=BH();Object.defineProperty(r,"BottomAlignedInnerAxisLayoutStrategy",{enumerable:!0,get:function(){return ue.BottomAlignedInnerAxisLayoutStrategy}});var ar=VH();Object.defineProperty(r,"BottomAlignedOuterAxisLayoutStrategy",{enumerable:!0,get:function(){return ar.BottomAlignedOuterAxisLayoutStrategy}});var Bt=HCe();Object.defineProperty(r,"BottomAlignedOuterHorizontallyStackedAxisLayoutStrategy",{enumerable:!0,get:function(){return Bt.BottomAlignedOuterHorizontallyStackedAxisLayoutStrategy}});var Ar=UCe();Object.defineProperty(r,"CentralAxesLayoutManager",{enumerable:!0,get:function(){return Ar.CentralAxesLayoutManager}});var br=$be();Object.defineProperty(r,"ChartLayoutState",{enumerable:!0,get:function(){return br.ChartLayoutState}});var Br=jH();Object.defineProperty(r,"EInnerAxisPlacementCoordinateMode",{enumerable:!0,get:function(){return Br.EInnerAxisPlacementCoordinateMode}});var ai=ZS();Object.defineProperty(r,"LayoutManager",{enumerable:!0,get:function(){return ai.LayoutManager}});var Nn=HH();Object.defineProperty(r,"LeftAlignedInnerAxisLayoutStrategy",{enumerable:!0,get:function(){return Nn.LeftAlignedInnerAxisLayoutStrategy}});var nt=UH();Object.defineProperty(r,"LeftAlignedOuterAxisLayoutStrategy",{enumerable:!0,get:function(){return nt.LeftAlignedOuterAxisLayoutStrategy}});var _o=zCe();Object.defineProperty(r,"LeftAlignedOuterVerticallyStackedAxisLayoutStrategy",{enumerable:!0,get:function(){return _o.LeftAlignedOuterVerticallyStackedAxisLayoutStrategy}});var si=FSe();Object.defineProperty(r,"AngularAxisLayoutStrategy",{enumerable:!0,get:function(){return si.AngularAxisLayoutStrategy}});var ti=D8();Object.defineProperty(r,"BasePolarAxisLayoutStrategy",{enumerable:!0,get:function(){return ti.BasePolarAxisLayoutStrategy}});var rr=R8();Object.defineProperty(r,"PolarLayoutManager",{enumerable:!0,get:function(){return rr.PolarLayoutManager}});var is=jSe();Object.defineProperty(r,"RadialAxisLayoutStrategy",{enumerable:!0,get:function(){return is.RadialAxisLayoutStrategy}});var wa=zH();Object.defineProperty(r,"RightAlignedInnerAxisLayoutStrategy",{enumerable:!0,get:function(){return wa.RightAlignedInnerAxisLayoutStrategy}});var q=WH();Object.defineProperty(r,"RightAlignedOuterAxisLayoutStrategy",{enumerable:!0,get:function(){return q.RightAlignedOuterAxisLayoutStrategy}});var te=WCe();Object.defineProperty(r,"RightAlignedOuterVerticallyStackedAxisLayoutStrategy",{enumerable:!0,get:function(){return te.RightAlignedOuterVerticallyStackedAxisLayoutStrategy}});var fe=dze();Object.defineProperty(r,"SciChartHorizontalGroup",{enumerable:!0,get:function(){return fe.SciChartHorizontalGroup}});var Ue=fze();Object.defineProperty(r,"SciChartVerticalGroup",{enumerable:!0,get:function(){return Ue.SciChartVerticalGroup}});var pt=RX();Object.defineProperty(r,"SynchronizedLayoutManager",{enumerable:!0,get:function(){return pt.SynchronizedLayoutManager}});var At=GH();Object.defineProperty(r,"TopAlignedInnerAxisLayoutStrategy",{enumerable:!0,get:function(){return At.TopAlignedInnerAxisLayoutStrategy}});var cr=YH();Object.defineProperty(r,"TopAlignedOuterAxisLayoutStrategy",{enumerable:!0,get:function(){return cr.TopAlignedOuterAxisLayoutStrategy}});var Hr=GCe();Object.defineProperty(r,"TopAlignedOuterHorizontallyStackedAxisLayoutStrategy",{enumerable:!0,get:function(){return Hr.TopAlignedOuterHorizontallyStackedAxisLayoutStrategy}});var Yi=Wl();Object.defineProperty(r,"BaseDataSeries",{enumerable:!0,get:function(){return Yi.BaseDataSeries}});var Fn=Wl();Object.defineProperty(r,"getWindowedYRange",{enumerable:!0,get:function(){return Fn.getWindowedYRange}});var No=W8();Object.defineProperty(r,"BaseHeatmapDataSeries",{enumerable:!0,get:function(){return No.BaseHeatmapDataSeries}});var Ms=hze();Object.defineProperty(r,"BasePaletteProvider",{enumerable:!0,get:function(){return Ms.BasePaletteProvider}});var _a=$Se();Object.defineProperty(r,"BoxPlotDataSeries",{enumerable:!0,get:function(){return _a.BoxPlotDataSeries}});var Ua=Xbe();Object.defineProperty(r,"BoxPlotSeriesInfo",{enumerable:!0,get:function(){return Ua.BoxPlotSeriesInfo}});var su=Kbe();Object.defineProperty(r,"HeatmapSeriesInfo",{enumerable:!0,get:function(){return su.HeatmapSeriesInfo}});var Oa=Zbe();Object.defineProperty(r,"HlcSeriesInfo",{enumerable:!0,get:function(){return Oa.HlcSeriesInfo}});var lu=Jbe();Object.defineProperty(r,"OhlcSeriesInfo",{enumerable:!0,get:function(){return lu.OhlcSeriesInfo}});var Qs=ny();Object.defineProperty(r,"SeriesInfo",{enumerable:!0,get:function(){return Qs.SeriesInfo}});var bl=UPe();Object.defineProperty(r,"StackedXySeriesInfo",{enumerable:!0,get:function(){return bl.StackedXySeriesInfo}});var Sl=yCe();Object.defineProperty(r,"TriangleSeriesInfo",{enumerable:!0,get:function(){return Sl.TriangleSeriesInfo}});var uu=Qbe();Object.defineProperty(r,"XySeriesInfo",{enumerable:!0,get:function(){return uu.XySeriesInfo}});var ys=eSe();Object.defineProperty(r,"XyySeriesInfo",{enumerable:!0,get:function(){return ys.XyySeriesInfo}});var Fo=tSe();Object.defineProperty(r,"XyzSeriesInfo",{enumerable:!0,get:function(){return Fo.XyzSeriesInfo}});var Kc=qbe();Object.defineProperty(r,"DataDistributionCalculator",{enumerable:!0,get:function(){return Kc.DataDistributionCalculator}});var Pa=iPe();Object.defineProperty(r,"DataPointSelectionPaletteProvider",{enumerable:!0,get:function(){return Pa.DataPointSelectionPaletteProvider}});var vc=vY();Object.defineProperty(r,"DoubleVectorProvider",{enumerable:!0,get:function(){return vc.DoubleVectorProvider}});var Ls=vY();Object.defineProperty(r,"FIFOVectorProvider",{enumerable:!0,get:function(){return Ls.FIFOVectorProvider}});var ns=XSe();Object.defineProperty(r,"HlcCustomFilter",{enumerable:!0,get:function(){return ns.HlcCustomFilter}});var el=qSe();Object.defineProperty(r,"HlcFilterBase",{enumerable:!0,get:function(){return el.HlcFilterBase}});var ao=KSe();Object.defineProperty(r,"HlcScaleOffsetFilter",{enumerable:!0,get:function(){return ao.HlcScaleOffsetFilter}});var ra=JSe();Object.defineProperty(r,"OhlcCustomFilter",{enumerable:!0,get:function(){return ra.OhlcCustomFilter}});var fo=ZSe();Object.defineProperty(r,"OhlcFilterBase",{enumerable:!0,get:function(){return fo.OhlcFilterBase}});var Hn=QSe();Object.defineProperty(r,"OhlcScaleOffsetFilter",{enumerable:!0,get:function(){return Hn.OhlcScaleOffsetFilter}});var ks=i_e();Object.defineProperty(r,"XyCustomFilter",{enumerable:!0,get:function(){return ks.XyCustomFilter}});var cu=Bv();Object.defineProperty(r,"EDataSeriesField",{enumerable:!0,get:function(){return cu.EDataSeriesField}});var Yl=Bv();Object.defineProperty(r,"XyFilterBase",{enumerable:!0,get:function(){return Yl.XyFilterBase}});var yc=Bv();Object.defineProperty(r,"switchData",{enumerable:!0,get:function(){return yc.switchData}});var ia=e_e();Object.defineProperty(r,"XyLinearTrendFilter",{enumerable:!0,get:function(){return ia.XyLinearTrendFilter}});var fa=t_e();Object.defineProperty(r,"XyMovingAverageFilter",{enumerable:!0,get:function(){return fa.XyMovingAverageFilter}});var qo=r_e();Object.defineProperty(r,"XyRatioFilter",{enumerable:!0,get:function(){return qo.XyRatioFilter}});var Zc=n_e();Object.defineProperty(r,"XyScaleOffsetFilter",{enumerable:!0,get:function(){return Zc.XyScaleOffsetFilter}});var Iu=a_e();Object.defineProperty(r,"XyyCustomFilter",{enumerable:!0,get:function(){return Iu.XyyCustomFilter}});var ms=o_e();Object.defineProperty(r,"XyyFilterBase",{enumerable:!0,get:function(){return ms.XyyFilterBase}});var jo=s_e();Object.defineProperty(r,"XyyScaleOffsetFilter",{enumerable:!0,get:function(){return jo.XyyScaleOffsetFilter}});var zi=u_e();Object.defineProperty(r,"XyzCustomFilter",{enumerable:!0,get:function(){return zi.XyzCustomFilter}});var on=l_e();Object.defineProperty(r,"XyzFilterBase",{enumerable:!0,get:function(){return on.XyzFilterBase}});var du=c_e();Object.defineProperty(r,"XyzScaleOffsetFilter",{enumerable:!0,get:function(){return du.XyzScaleOffsetFilter}});var me=H8();Object.defineProperty(r,"HlcDataSeries",{enumerable:!0,get:function(){return me.HlcDataSeries}});var Fe=ki();Object.defineProperty(r,"EDataSeriesType",{enumerable:!0,get:function(){return Fe.EDataSeriesType}});var Ze=ki();Object.defineProperty(r,"EDataChangeType",{enumerable:!0,get:function(){return Ze.EDataChangeType}});var ft=ki();Object.defineProperty(r,"EDataSeriesValueType",{enumerable:!0,get:function(){return ft.EDataSeriesValueType}});var Mt=H0();Object.defineProperty(r,"EStrokePaletteMode",{enumerable:!0,get:function(){return Mt.EStrokePaletteMode}});var nr=H0();Object.defineProperty(r,"EFillPaletteMode",{enumerable:!0,get:function(){return nr.EFillPaletteMode}});var Ot=H0();Object.defineProperty(r,"DefaultPaletteProvider",{enumerable:!0,get:function(){return Ot.DefaultPaletteProvider}});var Ut=KF();Object.defineProperty(r,"TemplateMetadataGenerator",{enumerable:!0,get:function(){return Ut.TemplateMetadataGenerator}});var Yr=pze();Object.defineProperty(r,"MetadataPaletteProvider",{enumerable:!0,get:function(){return Yr.MetadataPaletteProvider}});var Jr=d_e();Object.defineProperty(r,"NonUniformHeatmapDataSeries",{enumerable:!0,get:function(){return Jr.NonUniformHeatmapDataSeries}});var li=$N();Object.defineProperty(r,"OhlcDataSeries",{enumerable:!0,get:function(){return li.OhlcDataSeries}});var Ci=$N();Object.defineProperty(r,"getOHLCYRange",{enumerable:!0,get:function(){return Ci.getOHLCYRange}});var Di=Xq();Object.defineProperty(r,"PaletteFactory",{enumerable:!0,get:function(){return Di.PaletteFactory}});var za=FM();Object.defineProperty(r,"BasePointSeriesResampled",{enumerable:!0,get:function(){return za.BasePointSeriesResampled}});var ha=iy();Object.defineProperty(r,"BasePointSeriesWrapped",{enumerable:!0,get:function(){return ha.BasePointSeriesWrapped}});var Is=fCe();Object.defineProperty(r,"BoxPlotPointSeriesWrapped",{enumerable:!0,get:function(){return Is.BoxPlotPointSeriesWrapped}});var tl=bPe();Object.defineProperty(r,"HlcPointSeriesWrapped",{enumerable:!0,get:function(){return tl.HlcPointSeriesWrapped}});var $l=dX();Object.defineProperty(r,"OhlcPointSeriesResampled",{enumerable:!0,get:function(){return $l.OhlcPointSeriesResampled}});var mc=pPe();Object.defineProperty(r,"OhlcPointSeriesWrapped",{enumerable:!0,get:function(){return mc.OhlcPointSeriesWrapped}});var os=f_e();Object.defineProperty(r,"XyNPointSeriesResampled",{enumerable:!0,get:function(){return os.XyNPointSeriesResampled}});var Rp=G1();Object.defineProperty(r,"XyPointSeriesResampled",{enumerable:!0,get:function(){return Rp.XyPointSeriesResampled}});var as=wM();Object.defineProperty(r,"XyPointSeriesWrapped",{enumerable:!0,get:function(){return as.XyPointSeriesWrapped}});var qd=K1();Object.defineProperty(r,"XyyPointSeriesResampled",{enumerable:!0,get:function(){return qd.XyyPointSeriesResampled}});var bc=ZF();Object.defineProperty(r,"XyyPointSeriesWrapped",{enumerable:!0,get:function(){return bc.XyyPointSeriesWrapped}});var Da=FPe();Object.defineProperty(r,"XyzPointSeriesResampled",{enumerable:!0,get:function(){return Da.XyzPointSeriesResampled}});var Xd=cPe();Object.defineProperty(r,"XyzPointSeriesWrapped",{enumerable:!0,get:function(){return Xd.XyzPointSeriesWrapped}});var Jc=G8();Object.defineProperty(r,"UniformHeatmapDataSeries",{enumerable:!0,get:function(){return Jc.UniformHeatmapDataSeries}});var ho=Y8();Object.defineProperty(r,"XDataSeries",{enumerable:!0,get:function(){return ho.XDataSeries}});var fu=U8();Object.defineProperty(r,"XyDataSeries",{enumerable:!0,get:function(){return fu.XyDataSeries}});var kf=h_e();Object.defineProperty(r,"XyNDataSeries",{enumerable:!0,get:function(){return kf.XyNDataSeries}});var Sc=p_e();Object.defineProperty(r,"XyTextDataSeries",{enumerable:!0,get:function(){return Sc.XyTextDataSeries}});var If=g_e();Object.defineProperty(r,"XyxDataSeries",{enumerable:!0,get:function(){return If.XyxDataSeries}});var Mp=v_e();Object.defineProperty(r,"XyxyDataSeries",{enumerable:!0,get:function(){return Mp.XyxyDataSeries}});var Lp=qN();Object.defineProperty(r,"XyyDataSeries",{enumerable:!0,get:function(){return Lp.XyyDataSeries}});var Kd=qN();Object.defineProperty(r,"getYyYRange",{enumerable:!0,get:function(){return Kd.getYyYRange}});var _c=z8();Object.defineProperty(r,"XyzDataSeries",{enumerable:!0,get:function(){return _c.XyzDataSeries}});var Zd=DSe();Object.defineProperty(r,"CategoryCoordinateCalculator",{enumerable:!0,get:function(){return Zd.CategoryCoordinateCalculator}});var Ti=r_();Object.defineProperty(r,"CoordinateCalculatorBase",{enumerable:!0,get:function(){return Ti.CoordinateCalculatorBase}});var Dh=RSe();Object.defineProperty(r,"FlippedCategoryCoordinateCalculator",{enumerable:!0,get:function(){return Dh.FlippedCategoryCoordinateCalculator}});var Qc=S_e();Object.defineProperty(r,"FlippedIndexCoordinateCalculator",{enumerable:!0,get:function(){return Qc.FlippedIndexCoordinateCalculator}});var ed=iU();Object.defineProperty(r,"FlippedNumericCoordinateCalculator",{enumerable:!0,get:function(){return ed.FlippedNumericCoordinateCalculator}});var hu=__e();Object.defineProperty(r,"IndexCoordinateCalculator",{enumerable:!0,get:function(){return hu.IndexCoordinateCalculator}});var td=HSe();Object.defineProperty(r,"LogarithmicCoordinateCalculator",{enumerable:!0,get:function(){return td.LogarithmicCoordinateCalculator}});var Jd=nU();Object.defineProperty(r,"NumericCoordinateCalculator",{enumerable:!0,get:function(){return Jd.NumericCoordinateCalculator}});var Nf=r8();Object.defineProperty(r,"ExtremeResamplerHelper",{enumerable:!0,get:function(){return Nf.ExtremeResamplerHelper}});var Nu=oy();Object.defineProperty(r,"EResamplingMode",{enumerable:!0,get:function(){return Nu.EResamplingMode}});var Fu=t8();Object.defineProperty(r,"ResamplingParams",{enumerable:!0,get:function(){return Fu.ResamplingParams}});var Rh=_8();Object.defineProperty(r,"DefaultTickCoordinatesProvider",{enumerable:!0,get:function(){return Rh.DefaultTickCoordinatesProvider}});var ju=N8();Object.defineProperty(r,"PolarTickCoordinatesProvider",{enumerable:!0,get:function(){return ju.PolarTickCoordinatesProvider}});var bs=MSe();Object.defineProperty(r,"StaticTickCoordinatesProvider",{enumerable:!0,get:function(){return bs.StaticTickCoordinatesProvider}});var Ff=S8();Object.defineProperty(r,"TickCoordinatesProvider",{enumerable:!0,get:function(){return Ff.TickCoordinatesProvider}});var rd=P_e();Object.defineProperty(r,"IndexTickProvider",{enumerable:!0,get:function(){return rd.IndexTickProvider}});var ql=cV();Object.defineProperty(r,"ELogarithmicMinorTickMode",{enumerable:!0,get:function(){return ql.ELogarithmicMinorTickMode}});var jf=cV();Object.defineProperty(r,"ELogarithmicMajorTickMode",{enumerable:!0,get:function(){return jf.ELogarithmicMajorTickMode}});var id=cV();Object.defineProperty(r,"LogarithmicTickProvider",{enumerable:!0,get:function(){return id.LogarithmicTickProvider}});var _l=U1();Object.defineProperty(r,"NumericTickProvider",{enumerable:!0,get:function(){return _l.NumericTickProvider}});var jn=JH();Object.defineProperty(r,"TickProvider",{enumerable:!0,get:function(){return jn.TickProvider}});var Pl=vSe();Object.defineProperty(r,"ChartTitleRenderer",{enumerable:!0,get:function(){return Pl.ChartTitleRenderer}});var Ra=JS();Object.defineProperty(r,"RenderPassData",{enumerable:!0,get:function(){return Ra.RenderPassData}});var Ma=gze();Object.defineProperty(r,"RenderPassDataCollection",{enumerable:!0,get:function(){return Ma.RenderPassDataCollection}});var Bf=sSe();Object.defineProperty(r,"RenderPassInfo",{enumerable:!0,get:function(){return Bf.RenderPassInfo}});var Qd=uSe();Object.defineProperty(r,"SciChartRenderer",{enumerable:!0,get:function(){return Qd.SciChartRenderer}});var ef=ZV();Object.defineProperty(r,"TitleRendererBase",{enumerable:!0,get:function(){return ef.TitleRendererBase}});var Vf=ZV();Object.defineProperty(r,"getAdjustedRotation",{enumerable:!0,get:function(){return Vf.getAdjustedRotation}});var Xl=gs();Object.defineProperty(r,"AUTO_COLOR",{enumerable:!0,get:function(){return Xl.AUTO_COLOR}});var tf=gs();Object.defineProperty(r,"ThemeProvider",{enumerable:!0,get:function(){return tf.ThemeProvider}});var kp=gs();Object.defineProperty(r,"stripAutoColor",{enumerable:!0,get:function(){return kp.stripAutoColor}});var nd=kH();Object.defineProperty(r,"SciChartJSDarkTheme",{enumerable:!0,get:function(){return nd.SciChartJSDarkTheme}});var Mh=IH();Object.defineProperty(r,"SciChartJSDarkv2Theme",{enumerable:!0,get:function(){return Mh.SciChartJSDarkv2Theme}});var Bu=$Ce();Object.defineProperty(r,"SciChartJSLightTheme",{enumerable:!0,get:function(){return Bu.SciChartJSLightTheme}});var ze=YCe();Object.defineProperty(r,"SciChartJsNavyTheme",{enumerable:!0,get:function(){return ze.SciChartJsNavyTheme}});var se=cSe();Object.defineProperty(r,"AdornerLayer",{enumerable:!0,get:function(){return se.AdornerLayer}});var ye=ta();Object.defineProperty(r,"EDraggingGripPoint",{enumerable:!0,get:function(){return ye.EDraggingGripPoint}});var ge=ta();Object.defineProperty(r,"ECoordinateMode",{enumerable:!0,get:function(){return ge.ECoordinateMode}});var Ce=ta();Object.defineProperty(r,"AnnotationBase",{enumerable:!0,get:function(){return Ce.AnnotationBase}});var Me=ySe();Object.defineProperty(r,"AnnotationClickEventArgs",{enumerable:!0,get:function(){return Me.AnnotationClickEventArgs}});var Ne=mSe();Object.defineProperty(r,"AnnotationDragDeltaEventArgs",{enumerable:!0,get:function(){return Ne.AnnotationDragDeltaEventArgs}});var lt=Ds();Object.defineProperty(r,"annotationHelpers",{enumerable:!0,get:function(){return lt.annotationHelpers}});var Ve=bSe();Object.defineProperty(r,"AnnotationHoverEventArgs",{enumerable:!0,get:function(){return Ve.AnnotationHoverEventArgs}});var it=SSe();Object.defineProperty(r,"ArcAnnotation",{enumerable:!0,get:function(){return it.ArcAnnotation}});var Je=v8();Object.defineProperty(r,"ArcAnnotationBase",{enumerable:!0,get:function(){return Je.ArcAnnotationBase}});var ht=_Se();Object.defineProperty(r,"AxisMarkerAnnotation",{enumerable:!0,get:function(){return ht.AxisMarkerAnnotation}});var Nt=PSe();Object.defineProperty(r,"BoxAnnotation",{enumerable:!0,get:function(){return Nt.BoxAnnotation}});var fr=q8();Object.defineProperty(r,"CursorTooltipSvgAnnotation",{enumerable:!0,get:function(){return fr.CursorTooltipSvgAnnotation}});var Or=m8();Object.defineProperty(r,"CustomAnnotation",{enumerable:!0,get:function(){return Or.CustomAnnotation}});var Rt=y8();Object.defineProperty(r,"DomAnnotationBase",{enumerable:!0,get:function(){return Rt.DomAnnotationBase}});var ur=CSe();Object.defineProperty(r,"HorizontalLineAnnotation",{enumerable:!0,get:function(){return ur.HorizontalLineAnnotation}});var so=b8();Object.defineProperty(r,"HtmlCustomAnnotation",{enumerable:!0,get:function(){return so.HtmlCustomAnnotation}});var qn=TSe();Object.defineProperty(r,"HtmlTextAnnotation",{enumerable:!0,get:function(){return qn.HtmlTextAnnotation}});var rl=Aa();Object.defineProperty(r,"EAnnotationLayer",{enumerable:!0,get:function(){return rl.EAnnotationLayer}});var rf=Aa();Object.defineProperty(r,"EAnnotationType",{enumerable:!0,get:function(){return rf.EAnnotationType}});var Vu=t_();Object.defineProperty(r,"LineAnnotation",{enumerable:!0,get:function(){return Vu.LineAnnotation}});var od=yY();Object.defineProperty(r,"EArrowHeadPosition",{enumerable:!0,get:function(){return od.EArrowHeadPosition}});var ad=yY();Object.defineProperty(r,"LineArrowAnnotation",{enumerable:!0,get:function(){return ad.LineArrowAnnotation}});var yn=JV();Object.defineProperty(r,"EWrapTo",{enumerable:!0,get:function(){return yn.EWrapTo}});var Xo=JV();Object.defineProperty(r,"NativeTextAnnotation",{enumerable:!0,get:function(){return Xo.NativeTextAnnotation}});var ro=A_e();Object.defineProperty(r,"OverviewCustomResizableAnnotation",{enumerable:!0,get:function(){return ro.OverviewCustomResizableAnnotation}});var Xn=ZH();Object.defineProperty(r,"PolarArcAnnotation",{enumerable:!0,get:function(){return Xn.PolarArcAnnotation}});var Un=ASe();Object.defineProperty(r,"PolarPointerAnnotation",{enumerable:!0,get:function(){return Un.PolarPointerAnnotation}});var Ns=IM();Object.defineProperty(r,"RenderContextAnnotationBase",{enumerable:!0,get:function(){return Ns.RenderContextAnnotationBase}});var La=w_e();Object.defineProperty(r,"RolloverLegendSvgAnnotation",{enumerable:!0,get:function(){return La.RolloverLegendSvgAnnotation}});var sd=O_e();Object.defineProperty(r,"RolloverMarkerSvgAnnotation",{enumerable:!0,get:function(){return sd.RolloverMarkerSvgAnnotation}});var Tr=D_e();Object.defineProperty(r,"RolloverTooltipSvgAnnotation",{enumerable:!0,get:function(){return Tr.RolloverTooltipSvgAnnotation}});var ld=ay();Object.defineProperty(r,"SvgAnnotationBase",{enumerable:!0,get:function(){return ld.SvgAnnotationBase}});var Lh=lU();Object.defineProperty(r,"SvgLineAnnotation",{enumerable:!0,get:function(){return Lh.SvgLineAnnotation}});var Er=wSe();Object.defineProperty(r,"TextAnnotation",{enumerable:!0,get:function(){return Er.TextAnnotation}});var Ip=OSe();Object.defineProperty(r,"VerticalLineAnnotation",{enumerable:!0,get:function(){return Ip.VerticalLineAnnotation}});var Hf=Eg();Object.defineProperty(r,"EClipMode",{enumerable:!0,get:function(){return Hf.EClipMode}});var Hu=Eg();Object.defineProperty(r,"AxisBase2D",{enumerable:!0,get:function(){return Hu.AxisBase2D}});var Ng=P8();Object.defineProperty(r,"AxisCore",{enumerable:!0,get:function(){return Ng.AxisCore}});var Wa=QV();Object.defineProperty(r,"AxisLayoutState",{enumerable:!0,get:function(){return Wa.AxisLayoutState}});var Uu=QV();Object.defineProperty(r,"PolarAxisLayoutState",{enumerable:!0,get:function(){return Uu.PolarAxisLayoutState}});var il=C8();Object.defineProperty(r,"AxisRenderer",{enumerable:!0,get:function(){return il.AxisRenderer}});var Sr=kSe();Object.defineProperty(r,"AxisTitleRenderer",{enumerable:!0,get:function(){return Sr.AxisTitleRenderer}});var mn=sU();Object.defineProperty(r,"BaseValueAxis",{enumerable:!0,get:function(){return mn.BaseValueAxis}});var Pc=rU();Object.defineProperty(r,"CategoryAxis",{enumerable:!0,get:function(){return Pc.CategoryAxis}});var yr=ISe();Object.defineProperty(r,"CategoryAxisBase",{enumerable:!0,get:function(){return yr.CategoryAxisBase}});var un=NSe();Object.defineProperty(r,"DateTimeNumericAxis",{enumerable:!0,get:function(){return un.DateTimeNumericAxis}});var Uf=T8();Object.defineProperty(r,"CategoryDeltaCalculator",{enumerable:!0,get:function(){return Uf.CategoryDeltaCalculator}});var Fg=E8();Object.defineProperty(r,"DateTimeDeltaCalculator",{enumerable:!0,get:function(){return Fg.DateTimeDeltaCalculator}});var Fs=eU();Object.defineProperty(r,"DeltaCalculator",{enumerable:!0,get:function(){return Fs.DeltaCalculator}});var nf=C_e();Object.defineProperty(r,"IndexDeltaCalculator",{enumerable:!0,get:function(){return nf.IndexDeltaCalculator}});var of=USe();Object.defineProperty(r,"LogarithmicDeltaCalculator",{enumerable:!0,get:function(){return of.LogarithmicDeltaCalculator}});var Ko=z1();Object.defineProperty(r,"NumericDeltaCalculator",{enumerable:!0,get:function(){return Ko.NumericDeltaCalculator}});var pa=$8();Object.defineProperty(r,"DiscontinuousDateAxis",{enumerable:!0,get:function(){return pa.DiscontinuousDateAxis}});var js=Qle();Object.defineProperty(r,"getAxisById",{enumerable:!0,get:function(){return js.getAxisById}});var Cl=Qle();Object.defineProperty(r,"getAxis3dById",{enumerable:!0,get:function(){return Cl.getAxis3dById}});var nl=tU();Object.defineProperty(r,"DateLabelProvider",{enumerable:!0,get:function(){return nl.DateLabelProvider}});var Tl=k1();Object.defineProperty(r,"labelCache",{enumerable:!0,get:function(){return Tl.labelCache}});var xl=x8();Object.defineProperty(r,"LabelProvider",{enumerable:!0,get:function(){return xl.LabelProvider}});var Ga=ZR();Object.defineProperty(r,"LabelInfo",{enumerable:!0,get:function(){return Ga.LabelInfo}});var kh=ZR();Object.defineProperty(r,"LabelProviderBase2D",{enumerable:!0,get:function(){return kh.LabelProviderBase2D}});var Cc=A8();Object.defineProperty(r,"LogarithmicLabelProvider",{enumerable:!0,get:function(){return Cc.LogarithmicLabelProvider}});var ud=sy();Object.defineProperty(r,"NumericLabelProvider",{enumerable:!0,get:function(){return ud.NumericLabelProvider}});var af=aU();Object.defineProperty(r,"PieLabelProvider",{enumerable:!0,get:function(){return af.PieLabelProvider}});var ga=vze();Object.defineProperty(r,"RadianLabelProvider",{enumerable:!0,get:function(){return ga.RadianLabelProvider}});var zn=L0();Object.defineProperty(r,"ETradeChartLabelFormat",{enumerable:!0,get:function(){return zn.ETradeChartLabelFormat}});var bn=L0();Object.defineProperty(r,"EDatePrecision",{enumerable:!0,get:function(){return bn.EDatePrecision}});var Tc=L0();Object.defineProperty(r,"EHighPrecisionLabelMode",{enumerable:!0,get:function(){return Tc.EHighPrecisionLabelMode}});var El=L0();Object.defineProperty(r,"DEFAULT_LABEL_THRESHOLDS",{enumerable:!0,get:function(){return El.DEFAULT_LABEL_THRESHOLDS}});var Np=L0();Object.defineProperty(r,"SmartDateLabelProvider",{enumerable:!0,get:function(){return Np.SmartDateLabelProvider}});var xc=GN();Object.defineProperty(r,"TextLabelProvider",{enumerable:!0,get:function(){return xc.TextLabelProvider}});var zf=GN();Object.defineProperty(r,"wrapText",{enumerable:!0,get:function(){return zf.wrapText}});var sf=YN();Object.defineProperty(r,"MIN_LOG_AXIS_VALUE",{enumerable:!0,get:function(){return sf.MIN_LOG_AXIS_VALUE}});var cd=YN();Object.defineProperty(r,"LogarithmicAxis",{enumerable:!0,get:function(){return cd.LogarithmicAxis}});var et=NM();Object.defineProperty(r,"NumericAxis",{enumerable:!0,get:function(){return et.NumericAxis}});var Ec=j8();Object.defineProperty(r,"PolarAxisBase",{enumerable:!0,get:function(){return Ec.PolarAxisBase}});var Ac=WSe();Object.defineProperty(r,"PolarAxisRenderer",{enumerable:!0,get:function(){return Ac.PolarAxisRenderer}});var Bs=YSe();Object.defineProperty(r,"PolarCategoryAxis",{enumerable:!0,get:function(){return Bs.PolarCategoryAxis}});var $i=B8();Object.defineProperty(r,"PolarNumericAxis",{enumerable:!0,get:function(){return $i.PolarNumericAxis}});var zu=F8();Object.defineProperty(r,"EPolarAxisMode",{enumerable:!0,get:function(){return zu.EPolarAxisMode}});var wc=GSe();Object.defineProperty(r,"EPolarGridlineMode",{enumerable:!0,get:function(){return wc.EPolarGridlineMode}});var Wu=kM();Object.defineProperty(r,"EPolarLabelMode",{enumerable:!0,get:function(){return Wu.EPolarLabelMode}});var Gu=LSe();Object.defineProperty(r,"VisibleRangeChangedArgs",{enumerable:!0,get:function(){return Gu.VisibleRangeChangedArgs}});var Fp=WN();Object.defineProperty(r,"getSharedWasmContext",{enumerable:!0,get:function(){return Fp.getSharedWasmContext}});var lf=WN();Object.defineProperty(r,"initializeChartEngine2D",{enumerable:!0,get:function(){return lf.initializeChartEngine2D}});var Ih=yze();Object.defineProperty(r,"HeatmapLegend",{enumerable:!0,get:function(){return Ih.HeatmapLegend}});var dd=KS();Object.defineProperty(r,"createNativeRect",{enumerable:!0,get:function(){return dd.createNativeRect}});var Ya=Rbe();Object.defineProperty(r,"createSCRTPen",{enumerable:!0,get:function(){return Ya.createSCRTPen}});var Al=h8();Object.defineProperty(r,"createSolidBrush",{enumerable:!0,get:function(){return Al.createSolidBrush}});var jg=d8();Object.defineProperty(r,"drawBorder",{enumerable:!0,get:function(){return jg.drawBorder}});var py=ug();Object.defineProperty(r,"drawModifiersAxisLabel",{enumerable:!0,get:function(){return py.drawModifiersAxisLabel}});var gy=ug();Object.defineProperty(r,"drawLineAnnotation",{enumerable:!0,get:function(){return gy.drawLineAnnotation}});var vy=ug();Object.defineProperty(r,"drawAxisMarkerAnnotation",{enumerable:!0,get:function(){return vy.drawAxisMarkerAnnotation}});var va=ug();Object.defineProperty(r,"getLabelCoordinates",{enumerable:!0,get:function(){return va.getLabelCoordinates}});var Kl=ug();Object.defineProperty(r,"getLineCoordinates",{enumerable:!0,get:function(){return Kl.getLineCoordinates}});var Wf=ug();Object.defineProperty(r,"getLabelValue",{enumerable:!0,get:function(){return Wf.getLabelValue}});var Gf=H1();Object.defineProperty(r,"labelHelper",{enumerable:!0,get:function(){return Gf.labelHelper}});var jp=Xi();Object.defineProperty(r,"FontKey",{enumerable:!0,get:function(){return jp.FontKey}});var uf=Xi();Object.defineProperty(r,"deleteCache",{enumerable:!0,get:function(){return uf.deleteCache}});var cf=Xi();Object.defineProperty(r,"freeCache",{enumerable:!0,get:function(){return cf.freeCache}});var fd=Xi();Object.defineProperty(r,"getVectorRectVertex",{enumerable:!0,get:function(){return fd.getVectorRectVertex}});var Bg=Xi();Object.defineProperty(r,"getVectorColorVertex",{enumerable:!0,get:function(){return Bg.getVectorColorVertex}});var yy=Xi();Object.defineProperty(r,"getVectorColorTextureVertex",{enumerable:!0,get:function(){return yy.getVectorColorTextureVertex}});var wl=Xi();Object.defineProperty(r,"getVectorArcVertex",{enumerable:!0,get:function(){return wl.getVectorArcVertex}});var hd=Xi();Object.defineProperty(r,"getVertex",{enumerable:!0,get:function(){return hd.getVertex}});var Bp=Xi();Object.defineProperty(r,"getArcVertex",{enumerable:!0,get:function(){return Bp.getArcVertex}});var Nh=Xi();Object.defineProperty(r,"getArcParams",{enumerable:!0,get:function(){return Nh.getArcParams}});var Vg=Xi();Object.defineProperty(r,"getTextureVertex",{enumerable:!0,get:function(){return Vg.getTextureVertex}});var df=Xi();Object.defineProperty(r,"getTextBounds",{enumerable:!0,get:function(){return df.getTextBounds}});var Fh=Xi();Object.defineProperty(r,"getNativeRect",{enumerable:!0,get:function(){return Fh.getNativeRect}});var Yf=Xi();Object.defineProperty(r,"getVector4",{enumerable:!0,get:function(){return Yf.getVector4}});var $f=Xi();Object.defineProperty(r,"getVector2",{enumerable:!0,get:function(){return $f.getVector2}});var Hg=Xi();Object.defineProperty(r,"getVector3",{enumerable:!0,get:function(){return Hg.getVector3}});var jh=Xi();Object.defineProperty(r,"getFontKey",{enumerable:!0,get:function(){return jh.getFontKey}});var Ol=Xi();Object.defineProperty(r,"getAllFontKeys",{enumerable:!0,get:function(){return Ol.getAllFontKeys}});var pu=zSe();Object.defineProperty(r,"polarChartHelper",{enumerable:!0,get:function(){return pu.polarChartHelper}});var Ug=mze();Object.defineProperty(r,"ManualLegend",{enumerable:!0,get:function(){return Ug.ManualLegend}});var Vp=tPe();Object.defineProperty(r,"SciChart3DLegend",{enumerable:!0,get:function(){return Vp.SciChart3DLegend}});var Yu=E_e();Object.defineProperty(r,"SciChartLegend",{enumerable:!0,get:function(){return Yu.SciChartLegend}});var ol=Pv();Object.defineProperty(r,"ELegendOrientation",{enumerable:!0,get:function(){return ol.ELegendOrientation}});var ff=Pv();Object.defineProperty(r,"ELegendPlacement",{enumerable:!0,get:function(){return ff.ELegendPlacement}});var Vs=Pv();Object.defineProperty(r,"ELegendType",{enumerable:!0,get:function(){return Vs.ELegendType}});var ss=Pv();Object.defineProperty(r,"SciChartLegendBase",{enumerable:!0,get:function(){return ss.SciChartLegendBase}});var zg=Pv();Object.defineProperty(r,"getLegendItemHtml",{enumerable:!0,get:function(){return zg.getLegendItemHtml}});var Oc=Pv();Object.defineProperty(r,"getLegendContainerHtml",{enumerable:!0,get:function(){return Oc.getLegendContainerHtml}});var Bh=BSe();Object.defineProperty(r,"SciChartPieLegend",{enumerable:!0,get:function(){return Bh.SciChartPieLegend}});var Dl=LH();Object.defineProperty(r,"licenseManager2dState",{enumerable:!0,get:function(){return Dl.licenseManager2dState}});var gu=Zq();Object.defineProperty(r,"DefaultSciChartLoader",{enumerable:!0,get:function(){return gu.DefaultSciChartLoader}});var Vh=V1();Object.defineProperty(r,"BasePointMarker",{enumerable:!0,get:function(){return Vh.BasePointMarker}});var Dc=n8();Object.defineProperty(r,"CrossPointMarker",{enumerable:!0,get:function(){return Dc.CrossPointMarker}});var Rl=DM();Object.defineProperty(r,"EllipsePointMarker",{enumerable:!0,get:function(){return Rl.EllipsePointMarker}});var hf=a8();Object.defineProperty(r,"SpritePointMarker",{enumerable:!0,get:function(){return hf.SpritePointMarker}});var Hh=s8();Object.defineProperty(r,"SquarePointMarker",{enumerable:!0,get:function(){return Hh.SquarePointMarker}});var ya=l8();Object.defineProperty(r,"TrianglePointMarker",{enumerable:!0,get:function(){return ya.TrianglePointMarker}});var Rc=u8();Object.defineProperty(r,"XPointMarker",{enumerable:!0,get:function(){return Rc.XPointMarker}});var pf=ob();Object.defineProperty(r,"animationHelpers",{enumerable:!0,get:function(){return pf.animationHelpers}});var Zl=bze();Object.defineProperty(r,"BandAnimation",{enumerable:!0,get:function(){return Zl.BandAnimation}});var Uh=lTe();Object.defineProperty(r,"BandAnimationStyle",{enumerable:!0,get:function(){return Uh.BandAnimationStyle}});var $u=lb();Object.defineProperty(r,"BaseAnimationStyle",{enumerable:!0,get:function(){return $u.BaseAnimationStyle}});var vu=i8();Object.defineProperty(r,"BasePointMarkerStyle",{enumerable:!0,get:function(){return vu.BasePointMarkerStyle}});var Hp=Sze();Object.defineProperty(r,"BubbleAnimation",{enumerable:!0,get:function(){return Hp.BubbleAnimation}});var $a=_ze();Object.defineProperty(r,"CandlestickAnimation",{enumerable:!0,get:function(){return $a.CandlestickAnimation}});var qf=uTe();Object.defineProperty(r,"CandlestickAnimationStyle",{enumerable:!0,get:function(){return qf.CandlestickAnimationStyle}});var al=Pze();Object.defineProperty(r,"ColumnAnimation",{enumerable:!0,get:function(){return al.ColumnAnimation}});var Hs=dTe();Object.defineProperty(r,"ColumnAnimationStyle",{enumerable:!0,get:function(){return Hs.ColumnAnimationStyle}});var qu=o8();Object.defineProperty(r,"CustomPointMarkerStyle",{enumerable:!0,get:function(){return qu.CustomPointMarkerStyle}});var gf=nPe();Object.defineProperty(r,"FadeAnimation",{enumerable:!0,get:function(){return gf.FadeAnimation}});var zh=Cze();Object.defineProperty(r,"LineAnimation",{enumerable:!0,get:function(){return zh.LineAnimation}});var Us=Tze();Object.defineProperty(r,"MountainAnimation",{enumerable:!0,get:function(){return Us.MountainAnimation}});var Ss=fTe();Object.defineProperty(r,"MountainAnimationStyle",{enumerable:!0,get:function(){return Ss.MountainAnimationStyle}});var na=cTe();Object.defineProperty(r,"OhlcAnimation",{enumerable:!0,get:function(){return na.OhlcAnimation}});var po=MX();Object.defineProperty(r,"OhlcAnimationStyle",{enumerable:!0,get:function(){return po.OhlcAnimationStyle}});var zs=OM();Object.defineProperty(r,"PointMarkerStyle",{enumerable:!0,get:function(){return zs.PointMarkerStyle}});var bi=oPe();Object.defineProperty(r,"ScaleAnimation",{enumerable:!0,get:function(){return bi.ScaleAnimation}});var di=xze();Object.defineProperty(r,"ScatterAnimation",{enumerable:!0,get:function(){return di.ScatterAnimation}});var Eo=Op();Object.defineProperty(r,"SeriesAnimation",{enumerable:!0,get:function(){return Eo.SeriesAnimation}});var qa=aPe();Object.defineProperty(r,"SweepAnimation",{enumerable:!0,get:function(){return qa.SweepAnimation}});var Ws=sPe();Object.defineProperty(r,"WaveAnimation",{enumerable:!0,get:function(){return Ws.WaveAnimation}});var Xu=hU();Object.defineProperty(r,"BaseBandRenderableSeries",{enumerable:!0,get:function(){return Xu.BaseBandRenderableSeries}});var Mc=HM();Object.defineProperty(r,"BaseHeatmapRenderableSeries",{enumerable:!0,get:function(){return Mc.BaseHeatmapRenderableSeries}});var pd=Xv();Object.defineProperty(r,"ELineType",{enumerable:!0,get:function(){return pd.ELineType}});var Ku=Xv();Object.defineProperty(r,"BaseLineRenderableSeries",{enumerable:!0,get:function(){return Ku.BaseLineRenderableSeries}});var Wg=gU();Object.defineProperty(r,"BaseMountainRenderableSeries",{enumerable:!0,get:function(){return Wg.BaseMountainRenderableSeries}});var Ao=fX();Object.defineProperty(r,"BaseOhlcRenderableSeries",{enumerable:!0,get:function(){return Ao.BaseOhlcRenderableSeries}});var gd=Gl();Object.defineProperty(r,"BaseRenderableSeries",{enumerable:!0,get:function(){return gd.BaseRenderableSeries}});var Xf=f8();Object.defineProperty(r,"BaseStackedCollection",{enumerable:!0,get:function(){return Xf.BaseStackedCollection}});var Wh=WPe();Object.defineProperty(r,"BaseStackedMountainRenderableSeries",{enumerable:!0,get:function(){return Wh.BaseStackedMountainRenderableSeries}});var Zu=mU();Object.defineProperty(r,"BaseStackedRenderableSeries",{enumerable:!0,get:function(){return Zu.BaseStackedRenderableSeries}});var z=aX();Object.defineProperty(r,"BandSeriesDataLabelProvider",{enumerable:!0,get:function(){return z.BandSeriesDataLabelProvider}});var J=RM();Object.defineProperty(r,"BaseDataLabelProvider",{enumerable:!0,get:function(){return J.BaseDataLabelProvider}});var oe=sX();Object.defineProperty(r,"BubbleSeriesDataLabelProvider",{enumerable:!0,get:function(){return oe.BubbleSeriesDataLabelProvider}});var O=QR();Object.defineProperty(r,"EColumnDataLabelPosition",{enumerable:!0,get:function(){return O.EColumnDataLabelPosition}});var B=QR();Object.defineProperty(r,"ColumnSeriesDataLabelProvider",{enumerable:!0,get:function(){return B.ColumnSeriesDataLabelProvider}});var X=lX();Object.defineProperty(r,"ContoursDataLabelProvider",{enumerable:!0,get:function(){return X.ContoursDataLabelProvider}});var re=rCe();Object.defineProperty(r,"dataLabelHelpers",{enumerable:!0,get:function(){return re.dataLabelHelpers}});var ce=Mg();Object.defineProperty(r,"DataLabelProvider",{enumerable:!0,get:function(){return ce.DataLabelProvider}});var Ae=VM();Object.defineProperty(r,"DataLabelState",{enumerable:!0,get:function(){return Ae.DataLabelState}});var Ie=rj();Object.defineProperty(r,"HeatMapDataLabelProvider",{enumerable:!0,get:function(){return Ie.HeatMapDataLabelProvider}});var He=X1();Object.defineProperty(r,"LineSeriesDataLabelProvider",{enumerable:!0,get:function(){return He.LineSeriesDataLabelProvider}});var at=uX();Object.defineProperty(r,"NonUniformHeatMapDataLabelProvider",{enumerable:!0,get:function(){return at.NonUniformHeatMapDataLabelProvider}});var Tt=iCe();Object.defineProperty(r,"RectangleDataLabelState",{enumerable:!0,get:function(){return Tt.RectangleDataLabelState}});var mt=SX();Object.defineProperty(r,"RectangleSeriesDataLabelProvider",{enumerable:!0,get:function(){return mt.RectangleSeriesDataLabelProvider}});var Lt=pSe();Object.defineProperty(r,"StackedCollectionDataLabelProvider",{enumerable:!0,get:function(){return Lt.StackedCollectionDataLabelProvider}});var or=$Pe();Object.defineProperty(r,"StackedColumnSeriesDataLabelProvider",{enumerable:!0,get:function(){return or.StackedColumnSeriesDataLabelProvider}});var er=fU();Object.defineProperty(r,"TextDataLabelProvider",{enumerable:!0,get:function(){return er.TextDataLabelProvider}});var pr=cX();Object.defineProperty(r,"BandSeriesDrawingProvider",{enumerable:!0,get:function(){return pr.BandSeriesDrawingProvider}});var Ir=vl();Object.defineProperty(r,"BaseSeriesDrawingProvider",{enumerable:!0,get:function(){return Ir.BaseSeriesDrawingProvider}});var $r=hCe();Object.defineProperty(r,"BoxPlotSeriesDrawingProvider",{enumerable:!0,get:function(){return $r.BoxPlotSeriesDrawingProvider}});var ii=dPe();Object.defineProperty(r,"BubbleSeriesDrawingProvider",{enumerable:!0,get:function(){return ii.BubbleSeriesDrawingProvider}});var Si=yPe();Object.defineProperty(r,"ColumnSeriesDrawingProvider",{enumerable:!0,get:function(){return Si.ColumnSeriesDrawingProvider}});var Lr=SPe();Object.defineProperty(r,"ErrorSeriesDrawingProvider",{enumerable:!0,get:function(){return Lr.ErrorSeriesDrawingProvider}});var Qi=Fw();Object.defineProperty(r,"getColorDataForTexture",{enumerable:!0,get:function(){return Qi.getColorDataForTexture}});var Ri=Fw();Object.defineProperty(r,"getColor",{enumerable:!0,get:function(){return Ri.getColor}});var Gr=Fw();Object.defineProperty(r,"createColorMap",{enumerable:!0,get:function(){return Gr.createColorMap}});var Pi=Fw();Object.defineProperty(r,"calculateOffsets",{enumerable:!0,get:function(){return Pi.calculateOffsets}});var Ca=Fw();Object.defineProperty(r,"calculateCellCoordinates",{enumerable:!0,get:function(){return Ca.calculateCellCoordinates}});var Bo=Fw();Object.defineProperty(r,"calculateHeatmapTexture",{enumerable:!0,get:function(){return Bo.calculateHeatmapTexture}});var go=Eze();Object.defineProperty(r,"HeightSeriesDrawingProvider",{enumerable:!0,get:function(){return go.HeightSeriesDrawingProvider}});var _s=ZPe();Object.defineProperty(r,"LineSegmentSeriesDrawingProvider",{enumerable:!0,get:function(){return _s.LineSegmentSeriesDrawingProvider}});var rn=hX();Object.defineProperty(r,"LineSeriesDrawingProvider",{enumerable:!0,get:function(){return rn.LineSeriesDrawingProvider}});var Ps=APe();Object.defineProperty(r,"MountainSeriesDrawingProvider",{enumerable:!0,get:function(){return Ps.MountainSeriesDrawingProvider}});var ls=LPe();Object.defineProperty(r,"NonUniformHeatmapDrawingProvider",{enumerable:!0,get:function(){return ls.NonUniformHeatmapDrawingProvider}});var Sn=o3();Object.defineProperty(r,"EOhlcDrawingMode",{enumerable:!0,get:function(){return Sn.EOhlcDrawingMode}});var yu=o3();Object.defineProperty(r,"OhlcSeriesDrawingProvider",{enumerable:!0,get:function(){return yu.OhlcSeriesDrawingProvider}});var ka=$d();Object.defineProperty(r,"PointMarkerDrawingProvider",{enumerable:!0,get:function(){return ka.PointMarkerDrawingProvider}});var my=eCe();Object.defineProperty(r,"RectangleSeriesDrawingProvider",{enumerable:!0,get:function(){return my.RectangleSeriesDrawingProvider}});var c_=Aze();Object.defineProperty(r,"SmearSeriesDrawingProvider",{enumerable:!0,get:function(){return c_.SmearSeriesDrawingProvider}});var by=KV();Object.defineProperty(r,"StackedColumnRenderPassData",{enumerable:!0,get:function(){return by.StackedColumnRenderPassData}});var cL=KV();Object.defineProperty(r,"StackedColumnSeriesDrawingProvider",{enumerable:!0,get:function(){return cL.StackedColumnSeriesDrawingProvider}});var uO=xX();Object.defineProperty(r,"TriangleSeriesDrawingProvider",{enumerable:!0,get:function(){return uO.TriangleSeriesDrawingProvider}});var cO=XPe();Object.defineProperty(r,"UniformContoursDrawingProvider",{enumerable:!0,get:function(){return cO.UniformContoursDrawingProvider}});var d_=mX();Object.defineProperty(r,"UniformHeatmapDrawingProvider",{enumerable:!0,get:function(){return d_.UniformHeatmapDrawingProvider}});var f_=uPe();Object.defineProperty(r,"FastBandRenderableSeries",{enumerable:!0,get:function(){return f_.FastBandRenderableSeries}});var dO=gCe();Object.defineProperty(r,"FastBoxPlotRenderableSeries",{enumerable:!0,get:function(){return dO.FastBoxPlotRenderableSeries}});var vb=hPe();Object.defineProperty(r,"FastBubbleRenderableSeries",{enumerable:!0,get:function(){return vb.FastBubbleRenderableSeries}});var h_=vPe();Object.defineProperty(r,"FastCandlestickRenderableSeries",{enumerable:!0,get:function(){return h_.FastCandlestickRenderableSeries}});var Jl=ZN();Object.defineProperty(r,"FastColumnRenderableSeries",{enumerable:!0,get:function(){return Jl.FastColumnRenderableSeries}});var Lc=ZN();Object.defineProperty(r,"getXRange",{enumerable:!0,get:function(){return Lc.getXRange}});var fO=PPe();Object.defineProperty(r,"FastErrorBarsRenderableSeries",{enumerable:!0,get:function(){return fO.FastErrorBarsRenderableSeries}});var hO=TPe();Object.defineProperty(r,"FastImpulseRenderableSeries",{enumerable:!0,get:function(){return hO.FastImpulseRenderableSeries}});var yb=EPe();Object.defineProperty(r,"FastLineRenderableSeries",{enumerable:!0,get:function(){return yb.FastLineRenderableSeries}});var Gh=QPe();Object.defineProperty(r,"FastLineSegmentRenderableSeries",{enumerable:!0,get:function(){return Gh.FastLineSegmentRenderableSeries}});var p_=OPe();Object.defineProperty(r,"FastMountainRenderableSeries",{enumerable:!0,get:function(){return p_.FastMountainRenderableSeries}});var g_=DPe();Object.defineProperty(r,"FastOhlcRenderableSeries",{enumerable:!0,get:function(){return g_.FastOhlcRenderableSeries}});var v_=_X();Object.defineProperty(r,"FastRectangleRenderableSeries",{enumerable:!0,get:function(){return v_.FastRectangleRenderableSeries}});var y_=pX();Object.defineProperty(r,"FastTextRenderableSeries",{enumerable:!0,get:function(){return y_.FastTextRenderableSeries}});var Up=EX();Object.defineProperty(r,"FastTriangleRenderableSeries",{enumerable:!0,get:function(){return Up.FastTriangleRenderableSeries}});var Sy=MPe();Object.defineProperty(r,"GlowEffect",{enumerable:!0,get:function(){return Sy.GlowEffect}});var dL=yU();Object.defineProperty(r,"HeatmapColorMap",{enumerable:!0,get:function(){return dL.HeatmapColorMap}});var m_=lPe();Object.defineProperty(r,"BandSeriesHitTestProvider",{enumerable:!0,get:function(){return m_.BandSeriesHitTestProvider}});var Gg=Js();Object.defineProperty(r,"BaseHitTestProvider",{enumerable:!0,get:function(){return Gg.BaseHitTestProvider}});var Yg=pCe();Object.defineProperty(r,"BoxPlotSeriesHitTestProvider",{enumerable:!0,get:function(){return Yg.BoxPlotSeriesHitTestProvider}});var _y=fPe();Object.defineProperty(r,"BubbleSeriesHitTestProvider",{enumerable:!0,get:function(){return _y.BubbleSeriesHitTestProvider}});var Py=mPe();Object.defineProperty(r,"ColumnSeriesHitTestProvider",{enumerable:!0,get:function(){return Py.ColumnSeriesHitTestProvider}});var mb=_Pe();Object.defineProperty(r,"ErrorSeriesHitTestProvider",{enumerable:!0,get:function(){return mb.ErrorSeriesHitTestProvider}});var Yh=Rs();Object.defineProperty(r,"hitTestHelpers",{enumerable:!0,get:function(){return Yh.hitTestHelpers}});var pO=tCe();Object.defineProperty(r,"hitTestHelpersRectangleSeries",{enumerable:!0,get:function(){return pO.hitTestHelpersRectangleSeries}});var bb=vs();Object.defineProperty(r,"HitTestInfo",{enumerable:!0,get:function(){return bb.HitTestInfo}});var Cy=CPe();Object.defineProperty(r,"ImpulseSeriesHitTestProvider",{enumerable:!0,get:function(){return Cy.ImpulseSeriesHitTestProvider}});var Sb=JPe();Object.defineProperty(r,"LineSegmentSeriesHitTestProvider",{enumerable:!0,get:function(){return Sb.LineSegmentSeriesHitTestProvider}});var Ty=xPe();Object.defineProperty(r,"LineSeriesHitTestProvider",{enumerable:!0,get:function(){return Ty.LineSeriesHitTestProvider}});var gO=wPe();Object.defineProperty(r,"MountainSeriesHitTestProvider",{enumerable:!0,get:function(){return gO.MountainSeriesHitTestProvider}});var b_=kPe();Object.defineProperty(r,"NonUniformHeatmapHitTestProvider",{enumerable:!0,get:function(){return b_.NonUniformHeatmapHitTestProvider}});var Ql=gPe();Object.defineProperty(r,"OhlcSeriesHitTestProvider",{enumerable:!0,get:function(){return Ql.OhlcSeriesHitTestProvider}});var S_=_U();Object.defineProperty(r,"RectangleSeriesHitTestProvider",{enumerable:!0,get:function(){return S_.RectangleSeriesHitTestProvider}});var __=KPe();Object.defineProperty(r,"ScatterSeriesHitTestProvider",{enumerable:!0,get:function(){return __.ScatterSeriesHitTestProvider}});var vO=YPe();Object.defineProperty(r,"StackedColumnSeriesHitTestProvider",{enumerable:!0,get:function(){return vO.StackedColumnSeriesHitTestProvider}});var xy=zPe();Object.defineProperty(r,"StackedMountainSeriesHitTestProvider",{enumerable:!0,get:function(){return xy.StackedMountainSeriesHitTestProvider}});var yO=RPe();Object.defineProperty(r,"TextSeriesHitTestProvider",{enumerable:!0,get:function(){return yO.TextSeriesHitTestProvider}});var P_=vCe();Object.defineProperty(r,"TriangleSeriesHitTestProvider",{enumerable:!0,get:function(){return P_.TriangleSeriesHitTestProvider}});var vf=yX();Object.defineProperty(r,"UniformHeatmapHitTestProvider",{enumerable:!0,get:function(){return vf.UniformHeatmapHitTestProvider}});var _b=M_e();Object.defineProperty(r,"HoveredChangedArgs",{enumerable:!0,get:function(){return _b.HoveredChangedArgs}});var C_=IPe();Object.defineProperty(r,"NonUniformHeatmapRenderableSeries",{enumerable:!0,get:function(){return C_.NonUniformHeatmapRenderableSeries}});var Ey=sCe();Object.defineProperty(r,"PolarColumnDataLabelState",{enumerable:!0,get:function(){return Ey.PolarColumnDataLabelState}});var Ta=TX();Object.defineProperty(r,"PolarColumnSeriesDataLabelProvider",{enumerable:!0,get:function(){return Ta.PolarColumnSeriesDataLabelProvider}});var Ia=Z1();Object.defineProperty(r,"PolarDataLabelProvider",{enumerable:!0,get:function(){return Ia.PolarDataLabelProvider}});var Ei=PU();Object.defineProperty(r,"PolarDataLabelState",{enumerable:!0,get:function(){return Ei.PolarDataLabelState}});var Ay=PCe();Object.defineProperty(r,"PolarHeatMapDataLabelProvider",{enumerable:!0,get:function(){return Ay.PolarHeatMapDataLabelProvider}});var Pb=OX();Object.defineProperty(r,"PolarTextDataLabelProvider",{enumerable:!0,get:function(){return Pb.PolarTextDataLabelProvider}});var $h=TU();Object.defineProperty(r,"PolarBandSeriesDrawingProvider",{enumerable:!0,get:function(){return $h.PolarBandSeriesDrawingProvider}});var wy=CX();Object.defineProperty(r,"PolarColumnSeriesDrawingProvider",{enumerable:!0,get:function(){return wy.PolarColumnSeriesDrawingProvider}});var Cb=CCe();Object.defineProperty(r,"PolarHeatmapDrawingProvider",{enumerable:!0,get:function(){return Cb.PolarHeatmapDrawingProvider}});var Oy=ij();Object.defineProperty(r,"PolarLineSeriesDrawingProvider",{enumerable:!0,get:function(){return Oy.PolarLineSeriesDrawingProvider}});var sl=i_();Object.defineProperty(r,"PolarPointMarkerDrawingProvider",{enumerable:!0,get:function(){return sl.PolarPointMarkerDrawingProvider}});var fL=jCe();Object.defineProperty(r,"PolarTriangleSeriesDrawingProvider",{enumerable:!0,get:function(){return fL.PolarTriangleSeriesDrawingProvider}});var Tb=J1();Object.defineProperty(r,"PolarDataPointHitTestProvider",{enumerable:!0,get:function(){return Tb.PolarDataPointHitTestProvider}});var xb=PX();Object.defineProperty(r,"polarHitTestHelpers",{enumerable:!0,get:function(){return xb.polarHitTestHelpers}});var mO=wze();Object.defineProperty(r,"PolarLineSeriesHitTestProvider",{enumerable:!0,get:function(){return mO.PolarLineSeriesHitTestProvider}});var T_=uCe();Object.defineProperty(r,"PolarMountainSeriesHitTestProvider",{enumerable:!0,get:function(){return T_.PolarMountainSeriesHitTestProvider}});var bO=aCe();Object.defineProperty(r,"PolarBandRenderableSeries",{enumerable:!0,get:function(){return bO.PolarBandRenderableSeries}});var x_=lCe();Object.defineProperty(r,"PolarColumnRenderableSeries",{enumerable:!0,get:function(){return x_.PolarColumnRenderableSeries}});var E_=nCe();Object.defineProperty(r,"PolarLineRenderableSeries",{enumerable:!0,get:function(){return E_.PolarLineRenderableSeries}});var vd=cCe();Object.defineProperty(r,"PolarMountainRenderableSeries",{enumerable:!0,get:function(){return vd.PolarMountainRenderableSeries}});var Ml=SCe();Object.defineProperty(r,"PolarStackedColumnCollection",{enumerable:!0,get:function(){return Ml.PolarStackedColumnCollection}});var Dy=_Ce();Object.defineProperty(r,"PolarStackedColumnRenderableSeries",{enumerable:!0,get:function(){return Dy.PolarStackedColumnRenderableSeries}});var Eb=bCe();Object.defineProperty(r,"PolarStackedMountainCollection",{enumerable:!0,get:function(){return Eb.PolarStackedMountainCollection}});var Ry=dCe();Object.defineProperty(r,"PolarStackedMountainRenderableSeries",{enumerable:!0,get:function(){return Ry.PolarStackedMountainRenderableSeries}});var SO=VCe();Object.defineProperty(r,"PolarTextRenderableSeries",{enumerable:!0,get:function(){return SO.PolarTextRenderableSeries}});var A_=BCe();Object.defineProperty(r,"PolarTriangleRenderableSeries",{enumerable:!0,get:function(){return A_.PolarTriangleRenderableSeries}});var $g=TCe();Object.defineProperty(r,"PolarUniformHeatmapRenderableSeries",{enumerable:!0,get:function(){return $g.PolarUniformHeatmapRenderableSeries}});var yf=mCe();Object.defineProperty(r,"PolarXyScatterRenderableSeries",{enumerable:!0,get:function(){return yf.PolarXyScatterRenderableSeries}});var Ab=dg();Object.defineProperty(r,"BaseRenderDataTransform",{enumerable:!0,get:function(){return Ab.BaseRenderDataTransform}});var hL=dg();Object.defineProperty(r,"XyBaseRenderDataTransform",{enumerable:!0,get:function(){return hL.XyBaseRenderDataTransform}});var _O=dg();Object.defineProperty(r,"XyyBaseRenderDataTransform",{enumerable:!0,get:function(){return _O.XyyBaseRenderDataTransform}});var Kf=dg();Object.defineProperty(r,"OhlcBaseRenderDataTransform",{enumerable:!0,get:function(){return Kf.OhlcBaseRenderDataTransform}});var w_=dg();Object.defineProperty(r,"XyzBaseRenderDataTransform",{enumerable:!0,get:function(){return w_.XyzBaseRenderDataTransform}});var O_=Oze();Object.defineProperty(r,"BaseRenderDataTransformJS",{enumerable:!0,get:function(){return O_.BaseRenderDataTransformJS}});var My=lN();Object.defineProperty(r,"bezierTransform",{enumerable:!0,get:function(){return My.bezierTransform}});var Ly=lN();Object.defineProperty(r,"BezierRenderDataTransform",{enumerable:!0,get:function(){return Ly.BezierRenderDataTransform}});var Vo=lN();Object.defineProperty(r,"XyyBezierRenderDataTransform",{enumerable:!0,get:function(){return Vo.XyyBezierRenderDataTransform}});var PO=lN();Object.defineProperty(r,"SmoothStackedRenderDataTransform",{enumerable:!0,get:function(){return PO.SmoothStackedRenderDataTransform}});var ky=oCe();Object.defineProperty(r,"PolarInterpolateBandRenderDataTransform",{enumerable:!0,get:function(){return ky.PolarInterpolateBandRenderDataTransform}});var wb=CU();Object.defineProperty(r,"PolarInterpolateLineRenderDataTransform",{enumerable:!0,get:function(){return wb.PolarInterpolateLineRenderDataTransform}});var qg=vX();Object.defineProperty(r,"SplineRenderDataTransform",{enumerable:!0,get:function(){return qg.SplineRenderDataTransform}});var Zf=jPe();Object.defineProperty(r,"XyySplineRenderDataTransform",{enumerable:!0,get:function(){return Zf.XyySplineRenderDataTransform}});var Iy=qH();Object.defineProperty(r,"RolloverModifierRenderableSeriesProps",{enumerable:!0,get:function(){return Iy.RolloverModifierRenderableSeriesProps}});var D_=L_e();Object.defineProperty(r,"SelectionChangedArgs",{enumerable:!0,get:function(){return D_.SelectionChangedArgs}});var mu=nSe();Object.defineProperty(r,"SeriesHoveredArgs",{enumerable:!0,get:function(){return mu.SeriesHoveredArgs}});var Ll=oSe();Object.defineProperty(r,"SeriesSelectedArgs",{enumerable:!0,get:function(){return Ll.SeriesSelectedArgs}});var CO=aSe();Object.defineProperty(r,"SeriesVisibleChangedArgs",{enumerable:!0,get:function(){return CO.SeriesVisibleChangedArgs}});var Ob=gX();Object.defineProperty(r,"ShaderEffect",{enumerable:!0,get:function(){return Ob.ShaderEffect}});var TO=NPe();Object.defineProperty(r,"ShadowEffect",{enumerable:!0,get:function(){return TO.ShadowEffect}});var R_=GPe();Object.defineProperty(r,"SmoothStackedMountainRenderableSeries",{enumerable:!0,get:function(){return R_.SmoothStackedMountainRenderableSeries}});var M_=BPe();Object.defineProperty(r,"SplineBandRenderableSeries",{enumerable:!0,get:function(){return M_.SplineBandRenderableSeries}});var Db=VPe();Object.defineProperty(r,"SplineLineRenderableSeries",{enumerable:!0,get:function(){return Db.SplineLineRenderableSeries}});var xO=HPe();Object.defineProperty(r,"SplineMountainRenderableSeries",{enumerable:!0,get:function(){return xO.SplineMountainRenderableSeries}});var Jf=p8();Object.defineProperty(r,"StackedColumnCollection",{enumerable:!0,get:function(){return Jf.StackedColumnCollection}});var us=qPe();Object.defineProperty(r,"StackedColumnRenderableSeries",{enumerable:!0,get:function(){return us.StackedColumnRenderableSeries}});var L_=KH();Object.defineProperty(r,"StackedMountainCollection",{enumerable:!0,get:function(){return L_.StackedMountainCollection}});var EO=bU();Object.defineProperty(r,"StackedMountainRenderableSeries",{enumerable:!0,get:function(){return EO.StackedMountainRenderableSeries}});var Gs=g8();Object.defineProperty(r,"StackedXyCollection",{enumerable:!0,get:function(){return Gs.StackedXyCollection}});var pL=PY();Object.defineProperty(r,"EContourColorMapMode",{enumerable:!0,get:function(){return pL.EContourColorMapMode}});var k_=PY();Object.defineProperty(r,"UniformContoursRenderableSeries",{enumerable:!0,get:function(){return k_.UniformContoursRenderableSeries}});var I_=SU();Object.defineProperty(r,"UniformHeatmapRenderableSeries",{enumerable:!0,get:function(){return I_.UniformHeatmapRenderableSeries}});var oa=bX();Object.defineProperty(r,"XyScatterRenderableSeries",{enumerable:!0,get:function(){return oa.XyScatterRenderableSeries}});var bu=Z8();Object.defineProperty(r,"RubberBandSvgRect",{enumerable:!0,get:function(){return bu.RubberBandSvgRect}});var Qf=Gd();Object.defineProperty(r,"SciChartDefaults",{enumerable:!0,get:function(){return Qf.SciChartDefaults}});var AO=Dze();Object.defineProperty(r,"SciChartOverview",{enumerable:!0,get:function(){return AO.SciChartOverview}});var N_=qCe();Object.defineProperty(r,"PieSegment",{enumerable:!0,get:function(){return N_.PieSegment}});var wO=$w();Object.defineProperty(r,"ESizingMode",{enumerable:!0,get:function(){return wO.ESizingMode}});var gL=$w();Object.defineProperty(r,"EPieType",{enumerable:!0,get:function(){return gL.EPieType}});var Rb=$w();Object.defineProperty(r,"EPieValueMode",{enumerable:!0,get:function(){return Rb.EPieValueMode}});var Su=$w();Object.defineProperty(r,"SciChartPieSurface",{enumerable:!0,get:function(){return Su.SciChartPieSurface}});var yd=k8();Object.defineProperty(r,"SciChartPolarSubSurface",{enumerable:!0,get:function(){return yd.SciChartPolarSubSurface}});var OO=M8();Object.defineProperty(r,"SciChartPolarSurface",{enumerable:!0,get:function(){return OO.SciChartPolarSurface}});var aa=I8();Object.defineProperty(r,"SciChartSubSurface",{enumerable:!0,get:function(){return aa.SciChartSubSurface}});var DO=L8();Object.defineProperty(r,"sciChartSubSurfaceCommon",{enumerable:!0,get:function(){return DO.sciChartSubSurfaceCommon}});var eh=Tp();Object.defineProperty(r,"sciChartConfig",{enumerable:!0,get:function(){return eh.sciChartConfig}});var zp=Tp();Object.defineProperty(r,"SciChartSurface",{enumerable:!0,get:function(){return zp.SciChartSurface}});var mf=ln();Object.defineProperty(r,"DebugForDpi",{enumerable:!0,get:function(){return mf.DebugForDpi}});var F_=ln();Object.defineProperty(r,"SciChartSurfaceBase",{enumerable:!0,get:function(){return F_.SciChartSurfaceBase}});var j_=ln();Object.defineProperty(r,"createChartDestination",{enumerable:!0,get:function(){return j_.createChartDestination}});var md=Jq();Object.defineProperty(r,"SciChartSurfaceCore",{enumerable:!0,get:function(){return md.SciChartSurfaceCore}});var RO=B1();Object.defineProperty(r,"CanvasTexture",{enumerable:!0,get:function(){return RO.CanvasTexture}});var qh=Hi();Object.defineProperty(r,"DpiHelper",{enumerable:!0,get:function(){return qh.DpiHelper}});var Ny=d1();Object.defineProperty(r,"TextureManager",{enumerable:!0,get:function(){return Ny.TextureManager}});var Fy=d1();Object.defineProperty(r,"measureTextHeight",{enumerable:!0,get:function(){return Fy.measureTextHeight}});var Xg=d1();Object.defineProperty(r,"measureTextWidth",{enumerable:!0,get:function(){return Xg.measureTextWidth}});var MO=Bbe();Object.defineProperty(r,"UpdateSuspender",{enumerable:!0,get:function(){return MO.UpdateSuspender}});var LO=JR();Object.defineProperty(r,"ECameraProjectionMode",{enumerable:!0,get:function(){return LO.ECameraProjectionMode}});var jy=JR();Object.defineProperty(r,"CameraController",{enumerable:!0,get:function(){return jy.CameraController}});var kO=q1();Object.defineProperty(r,"ChartModifierBase3D",{enumerable:!0,get:function(){return kO.ChartModifierBase3D}});var Mb=Rze();Object.defineProperty(r,"CustomChartModifier3D",{enumerable:!0,get:function(){return Mb.CustomChartModifier3D}});var IO=rPe();Object.defineProperty(r,"LegendModifier3D",{enumerable:!0,get:function(){return IO.LegendModifier3D}});var vL=K_e();Object.defineProperty(r,"MouseWheelZoomModifier3D",{enumerable:!0,get:function(){return vL.MouseWheelZoomModifier3D}});var yL=Z_e();Object.defineProperty(r,"OrbitModifier3D",{enumerable:!0,get:function(){return yL.OrbitModifier3D}});var lo=nX();Object.defineProperty(r,"PinchZoomModifier3D",{enumerable:!0,get:function(){return lo.PinchZoomModifier3D}});var Ho=ePe();Object.defineProperty(r,"ResetCamera3DModifier",{enumerable:!0,get:function(){return Ho.ResetCamera3DModifier}});var Tn=_Y();Object.defineProperty(r,"TooltipModifier3D",{enumerable:!0,get:function(){return Tn.TooltipModifier3D}});var Rn=_Y();Object.defineProperty(r,"adjustTooltipPosition3D",{enumerable:!0,get:function(){return Rn.adjustTooltipPosition3D}});var Po=zd();Object.defineProperty(r,"EDataSeriesType3D",{enumerable:!0,get:function(){return Po.EDataSeriesType3D}});var Ju=zd();Object.defineProperty(r,"BaseDataSeries3D",{enumerable:!0,get:function(){return Ju.BaseDataSeries3D}});var Xh=y_e();Object.defineProperty(r,"BaseGridDataSeries3D",{enumerable:!0,get:function(){return Xh.BaseGridDataSeries3D}});var Kg=m_e();Object.defineProperty(r,"UniformGridDataSeries3D",{enumerable:!0,get:function(){return Kg.UniformGridDataSeries3D}});var B_=b_e();Object.defineProperty(r,"XyzDataSeries3D",{enumerable:!0,get:function(){return B_.XyzDataSeries3D}});var bd=$1();Object.defineProperty(r,"Vector3",{enumerable:!0,get:function(){return bd.Vector3}});var xa=J_e();Object.defineProperty(r,"TooltipSvgAnnotation3D",{enumerable:!0,get:function(){return xa.TooltipSvgAnnotation3D}});var Kh=bY();Object.defineProperty(r,"EWhichAxis",{enumerable:!0,get:function(){return Kh.EWhichAxis}});var Wp=bY();Object.defineProperty(r,"AxisBase3D",{enumerable:!0,get:function(){return Wp.AxisBase3D}});var V_=XCe();Object.defineProperty(r,"AxisCubeEntity",{enumerable:!0,get:function(){return V_.AxisCubeEntity}});var Qu=Mze();Object.defineProperty(r,"EAxisSideClipping",{enumerable:!0,get:function(){return Qu.EAxisSideClipping}});var Zg=Lze();Object.defineProperty(r,"ETextAlignment3D",{enumerable:!0,get:function(){return Zg.ETextAlignment3D}});var By=tR();Object.defineProperty(r,"getDescriptorsEqual",{enumerable:!0,get:function(){return By.getDescriptorsEqual}});var _u=tR();Object.defineProperty(r,"getLineStylesEqual",{enumerable:!0,get:function(){return _u.getLineStylesEqual}});var H_=tR();Object.defineProperty(r,"getTArgbEqual",{enumerable:!0,get:function(){return H_.getTArgbEqual}});var Vy=tR();Object.defineProperty(r,"getTextStylesEqual",{enumerable:!0,get:function(){return Vy.getTextStylesEqual}});var NO=tR();Object.defineProperty(r,"getArraysEqual",{enumerable:!0,get:function(){return NO.getArraysEqual}});var Gp=V8();Object.defineProperty(r,"NumericAxis3D",{enumerable:!0,get:function(){return Gp.NumericAxis3D}});var Lb=xY();Object.defineProperty(r,"EAxisPlaneType",{enumerable:!0,get:function(){return Lb.EAxisPlaneType}});var Zh=xY();Object.defineProperty(r,"AxisPlane",{enumerable:!0,get:function(){return Zh.AxisPlane}});var Cs=TY();Object.defineProperty(r,"getSharedWasmContext3D",{enumerable:!0,get:function(){return Cs.getSharedWasmContext3D}});var Jh=TY();Object.defineProperty(r,"initializeChartEngine3D",{enumerable:!0,get:function(){return Jh.initializeChartEngine3D}});var Jg=ZCe();Object.defineProperty(r,"createSingle3dInternal",{enumerable:!0,get:function(){return Jg.createSingle3dInternal}});var th=QCe();Object.defineProperty(r,"DefaultViewportManager3D",{enumerable:!0,get:function(){return th.DefaultViewportManager3D}});var U_=eTe();Object.defineProperty(r,"GizmoEntity",{enumerable:!0,get:function(){return U_.GizmoEntity}});var z_=xCe();Object.defineProperty(r,"BaseMeshPointMarker3D",{enumerable:!0,get:function(){return z_.BaseMeshPointMarker3D}});var FO=w1();Object.defineProperty(r,"EMarkerType",{enumerable:!0,get:function(){return FO.EMarkerType}});var Hy=w1();Object.defineProperty(r,"BasePointMarker3D",{enumerable:!0,get:function(){return Hy.BasePointMarker3D}});var W_=ECe();Object.defineProperty(r,"BaseTexturePointMarker3D",{enumerable:!0,get:function(){return W_.BaseTexturePointMarker3D}});var ec=pv();Object.defineProperty(r,"SpherePointMarker3D",{enumerable:!0,get:function(){return ec.SpherePointMarker3D}});var jO=pv();Object.defineProperty(r,"CubePointMarker3D",{enumerable:!0,get:function(){return jO.CubePointMarker3D}});var Pu=pv();Object.defineProperty(r,"PyramidPointMarker3D",{enumerable:!0,get:function(){return Pu.PyramidPointMarker3D}});var BO=pv();Object.defineProperty(r,"CylinderPointMarker3D",{enumerable:!0,get:function(){return BO.CylinderPointMarker3D}});var VO=pv();Object.defineProperty(r,"PixelPointMarker3D",{enumerable:!0,get:function(){return VO.PixelPointMarker3D}});var HO=pv();Object.defineProperty(r,"QuadPointMarker",{enumerable:!0,get:function(){return HO.QuadPointMarker}});var rh=pv();Object.defineProperty(r,"EllipsePointMarker3D",{enumerable:!0,get:function(){return rh.EllipsePointMarker3D}});var kb=pv();Object.defineProperty(r,"TrianglePointMarker3D",{enumerable:!0,get:function(){return kb.TrianglePointMarker3D}});var G_=iTe();Object.defineProperty(r,"AxisCubeDescriptor",{enumerable:!0,get:function(){return G_.AxisCubeDescriptor}});var Qg=BM();Object.defineProperty(r,"BaseSceneEntity3D",{enumerable:!0,get:function(){return Qg.BaseSceneEntity3D}});var UO=ACe();Object.defineProperty(r,"ColumnSceneEntity",{enumerable:!0,get:function(){return UO.ColumnSceneEntity}});var Uy=Q_e();Object.defineProperty(r,"CrosshairLinesSceneEntity",{enumerable:!0,get:function(){return Uy.CrosshairLinesSceneEntity}});var zO=tTe();Object.defineProperty(r,"DefaultEntityIdProvider",{enumerable:!0,get:function(){return zO.DefaultEntityIdProvider}});var WO=MCe();Object.defineProperty(r,"PointLine3DSceneEntity",{enumerable:!0,get:function(){return WO.PointLine3DSceneEntity}});var Ib=nj();Object.defineProperty(r,"RenderableSeriesSceneEntity",{enumerable:!0,get:function(){return Ib.RenderableSeriesSceneEntity}});var Y_=oj();Object.defineProperty(r,"RenderableSeriesSceneEntityState",{enumerable:!0,get:function(){return Y_.RenderableSeriesSceneEntityState}});var mL=nTe();Object.defineProperty(r,"RenderPassInfo3D",{enumerable:!0,get:function(){return mL.RenderPassInfo3D}});var bL=kCe();Object.defineProperty(r,"ScatterPointsSceneEntity",{enumerable:!0,get:function(){return bL.ScatterPointsSceneEntity}});var SL=oTe();Object.defineProperty(r,"SceneDescriptor",{enumerable:!0,get:function(){return SL.SceneDescriptor}});var GO=CY();Object.defineProperty(r,"SurfaceMeshSceneEntityState",{enumerable:!0,get:function(){return GO.SurfaceMeshSceneEntityState}});var YO=CY();Object.defineProperty(r,"SurfaceMeshSceneEntity",{enumerable:!0,get:function(){return YO.SurfaceMeshSceneEntity}});var ev=aj();Object.defineProperty(r,"BaseRenderableSeries3D",{enumerable:!0,get:function(){return ev.BaseRenderableSeries3D}});var Nb=RCe();Object.defineProperty(r,"ColumnRenderableSeries3D",{enumerable:!0,get:function(){return Nb.ColumnRenderableSeries3D}});var zy=Q1();Object.defineProperty(r,"ESeriesType3D",{enumerable:!0,get:function(){return zy.ESeriesType3D}});var $O=dU();Object.defineProperty(r,"HitTestInfo3D",{enumerable:!0,get:function(){return $O.HitTestInfo3D}});var $_=LCe();Object.defineProperty(r,"PointLineRenderableSeries3D",{enumerable:!0,get:function(){return $_.PointLineRenderableSeries3D}});var q_=ICe();Object.defineProperty(r,"ScatterRenderableSeries3D",{enumerable:!0,get:function(){return q_.ScatterRenderableSeries3D}});var Fb=wCe();Object.defineProperty(r,"Series3DVisibleChangedArgs",{enumerable:!0,get:function(){return Fb.Series3DVisibleChangedArgs}});var X_=tj();Object.defineProperty(r,"SeriesInfo3D",{enumerable:!0,get:function(){return X_.SeriesInfo3D}});var Wy=NCe();Object.defineProperty(r,"GradientColorPalette",{enumerable:!0,get:function(){return Wy.GradientColorPalette}});var K_=wX();Object.defineProperty(r,"MeshColorPalette",{enumerable:!0,get:function(){return K_.MeshColorPalette}});var Z_=FCe();Object.defineProperty(r,"SolidColorBrushPalette",{enumerable:!0,get:function(){return Z_.SolidColorBrushPalette}});var Co=nR();Object.defineProperty(r,"EDrawMeshAs",{enumerable:!0,get:function(){return Co.EDrawMeshAs}});var J_=nR();Object.defineProperty(r,"EMeshPaletteMode",{enumerable:!0,get:function(){return J_.EMeshPaletteMode}});var _L=nR();Object.defineProperty(r,"EMeshResolution",{enumerable:!0,get:function(){return _L.EMeshResolution}});var Gy=nR();Object.defineProperty(r,"SurfaceMeshRenderableSeries3D",{enumerable:!0,get:function(){return Gy.SurfaceMeshRenderableSeries3D}});var jb=OCe();Object.defineProperty(r,"SurfaceMeshSeriesInfo3D",{enumerable:!0,get:function(){return jb.SurfaceMeshSeriesInfo3D}});var PL=DCe();Object.defineProperty(r,"XyzSeriesInfo3D",{enumerable:!0,get:function(){return PL.XyzSeriesInfo3D}});var CL=rTe();Object.defineProperty(r,"RootSceneEntity",{enumerable:!0,get:function(){return CL.RootSceneEntity}});var tv=aTe();Object.defineProperty(r,"SciChart3DRenderer",{enumerable:!0,get:function(){return tv.SciChart3DRenderer}});var Yp=eF();Object.defineProperty(r,"sciChartConfig3D",{enumerable:!0,get:function(){return Yp.sciChartConfig3D}});var Q_=eF();Object.defineProperty(r,"SciChart3DSurface",{enumerable:!0,get:function(){return Q_.SciChart3DSurface}});var Bb=JCe();Object.defineProperty(r,"ViewportManager3DBase",{enumerable:!0,get:function(){return Bb.ViewportManager3DBase}});var eP=ES();Object.defineProperty(r,"EAnimationState",{enumerable:!0,get:function(){return eP.EAnimationState}});var Qh=ES();Object.defineProperty(r,"EAnimationStateTransition",{enumerable:!0,get:function(){return Qh.EAnimationStateTransition}});var bf=ES();Object.defineProperty(r,"AnimationFiniteStateMachine",{enumerable:!0,get:function(){return bf.AnimationFiniteStateMachine}});var Yy=ES();Object.defineProperty(r,"SeriesAnimationFiniteStateMachine",{enumerable:!0,get:function(){return Yy.SeriesAnimationFiniteStateMachine}});var TL=H_e();Object.defineProperty(r,"animateAny",{enumerable:!0,get:function(){return TL.animateAny}});var qO=cU();Object.defineProperty(r,"DoubleAnimator",{enumerable:!0,get:function(){return qO.DoubleAnimator}});var XO=hc();Object.defineProperty(r,"easing",{enumerable:!0,get:function(){return XO.easing}});var KO=hc();Object.defineProperty(r,"autoReverseEasing",{enumerable:!0,get:function(){return KO.autoReverseEasing}});var ZO=JF();Object.defineProperty(r,"GenericAnimation",{enumerable:!0,get:function(){return ZO.GenericAnimation}});var xL=QF();Object.defineProperty(r,"NumberRangeAnimator",{enumerable:!0,get:function(){return xL.NumberRangeAnimator}});var tc=V_e();Object.defineProperty(r,"AnimationToken",{enumerable:!0,get:function(){return tc.AnimationToken}});var JO=$v();Object.defineProperty(r,"libraryVersion",{enumerable:!0,get:function(){return JO.libraryVersion}});var QO=$v();Object.defineProperty(r,"checkBuildStamp",{enumerable:!0,get:function(){return QO.checkBuildStamp}});var $p=$n();Object.defineProperty(r,"DeletableEntity",{enumerable:!0,get:function(){return $p.DeletableEntity}});var qi=Mr();Object.defineProperty(r,"deleteSafe",{enumerable:!0,get:function(){return qi.deleteSafe}});var tP=Yq();Object.defineProperty(r,"Dictionary",{enumerable:!0,get:function(){return tP.Dictionary}});var Cu=Ba();Object.defineProperty(r,"EventHandler",{enumerable:!0,get:function(){return Cu.EventHandler}});var Xa=Ba();Object.defineProperty(r,"receiveNextEvent",{enumerable:!0,get:function(){return Xa.receiveNextEvent}});var $y=kze();Object.defineProperty(r,"GradientParams",{enumerable:!0,get:function(){return $y.GradientParams}});var ep=ni();Object.defineProperty(r,"Guard",{enumerable:!0,get:function(){return ep.Guard}});var eD=K8();Object.defineProperty(r,"IncludedItems",{enumerable:!0,get:function(){return eD.IncludedItems}});var xn=Ize();Object.defineProperty(r,"List",{enumerable:!0,get:function(){return xn.List}});var rP=Fbe();Object.defineProperty(r,"MouseManager",{enumerable:!0,get:function(){return rP.MouseManager}});var Vb=oi();Object.defineProperty(r,"NumberRange",{enumerable:!0,get:function(){return Vb.NumberRange}});var iP=Qq();Object.defineProperty(r,"NumberUtil",{enumerable:!0,get:function(){return iP.NumberUtil}});var Hb=FS();Object.defineProperty(r,"ObservableArrayBase",{enumerable:!0,get:function(){return Hb.ObservableArrayBase}});var nP=FS();Object.defineProperty(r,"ObservableArray",{enumerable:!0,get:function(){return nP.ObservableArray}});var rc=gY();Object.defineProperty(r,"EObservableArrayChangedAction",{enumerable:!0,get:function(){return rc.EObservableArrayChangedAction}});var qy=gY();Object.defineProperty(r,"ObservableArrayChangedArgs",{enumerable:!0,get:function(){return qy.ObservableArrayChangedArgs}});var Ub=Vbe();Object.defineProperty(r,"OneTimePerformanceWarning",{enumerable:!0,get:function(){return Ub.OneTimePerformanceWarning}});var ma=Ii();Object.defineProperty(r,"Point",{enumerable:!0,get:function(){return ma.Point}});var Na=XS();Object.defineProperty(r,"PropertyChangedEventArgs",{enumerable:!0,get:function(){return Na.PropertyChangedEventArgs}});var tD=vn();Object.defineProperty(r,"Rect",{enumerable:!0,get:function(){return tD.Rect}});var rD=jbe();Object.defineProperty(r,"SimdHelper",{enumerable:!0,get:function(){return rD.SimdHelper}});var iD=Mbe();Object.defineProperty(r,"localStorageApi",{enumerable:!0,get:function(){return iD.localStorageApi}});var wo=uV();Object.defineProperty(r,"getUserCookie",{enumerable:!0,get:function(){return wo.getUserCookie}});var oP=uV();Object.defineProperty(r,"shouldSendTelemetry",{enumerable:!0,get:function(){return oP.shouldSendTelemetry}});var ll=uV();Object.defineProperty(r,"sendTelemetry",{enumerable:!0,get:function(){return ll.sendTelemetry}});var EL=Yo();Object.defineProperty(r,"Thickness",{enumerable:!0,get:function(){return EL.Thickness}});var aP=A1();Object.defineProperty(r,"EWebGLSupport",{enumerable:!0,get:function(){return aP.EWebGLSupport}});var Xy=A1();Object.defineProperty(r,"WebGlHelper",{enumerable:!0,get:function(){return Xy.WebGlHelper}});var Ky=xg();Object.defineProperty(r,"EHorizontalAnchorPoint",{enumerable:!0,get:function(){return Ky.EHorizontalAnchorPoint}});var sP=xg();Object.defineProperty(r,"EVerticalAnchorPoint",{enumerable:!0,get:function(){return sP.EVerticalAnchorPoint}});var Zy=Yd();Object.defineProperty(r,"EAnimationType",{enumerable:!0,get:function(){return Zy.EAnimationType}});var Jy=LM();Object.defineProperty(r,"EAnnotationClippingMode",{enumerable:!0,get:function(){return Jy.EAnnotationClippingMode}});var Tu=zbe();Object.defineProperty(r,"EAutoColorMode",{enumerable:!0,get:function(){return Tu.EAutoColorMode}});var tp=j1();Object.defineProperty(r,"EAutoRange",{enumerable:!0,get:function(){return tp.EAutoRange}});var lP=cc();Object.defineProperty(r,"EAxisAlignment",{enumerable:!0,get:function(){return lP.EAxisAlignment}});var AL=cc();Object.defineProperty(r,"getIsHorizontal",{enumerable:!0,get:function(){return AL.getIsHorizontal}});var nD=cc();Object.defineProperty(r,"getIsVertical",{enumerable:!0,get:function(){return nD.getIsVertical}});var wL=cc();Object.defineProperty(r,"handleInvalidAxisAlignment",{enumerable:!0,get:function(){return wL.handleInvalidAxisAlignment}});var oD=SN();Object.defineProperty(r,"EAxisPlaneDrawLabelsMode",{enumerable:!0,get:function(){return oD.EAxisPlaneDrawLabelsMode}});var aD=SN();Object.defineProperty(r,"convert3DPlaneModeForLabels",{enumerable:!0,get:function(){return aD.convert3DPlaneModeForLabels}});var ih=SN();Object.defineProperty(r,"convert3DPlaneModeForTitles",{enumerable:!0,get:function(){return ih.convert3DPlaneModeForTitles}});var Ni=a3();Object.defineProperty(r,"EAxisPlaneVisibilityMode",{enumerable:!0,get:function(){return Ni.EAxisPlaneVisibilityMode}});var uP=a3();Object.defineProperty(r,"convertAxisPlaneVisibilityMode",{enumerable:!0,get:function(){return uP.convertAxisPlaneVisibilityMode}});var ic=gc();Object.defineProperty(r,"EAxisType",{enumerable:!0,get:function(){return ic.EAxisType}});var zb=$o();Object.defineProperty(r,"EBaseType",{enumerable:!0,get:function(){return zb.EBaseType}});var OL=uy();Object.defineProperty(r,"EExecuteOn",{enumerable:!0,get:function(){return OL.EExecuteOn}});var vo=Y1();Object.defineProperty(r,"EModifierMouseArgKey",{enumerable:!0,get:function(){return vo.EModifierMouseArgKey}});var sD=bo();Object.defineProperty(r,"EChart2DModifierType",{enumerable:!0,get:function(){return sD.EChart2DModifierType}});var Wb=bo();Object.defineProperty(r,"EChart3DModifierType",{enumerable:!0,get:function(){return Wb.EChart3DModifierType}});var rv=kbe();Object.defineProperty(r,"EColor",{enumerable:!0,get:function(){return rv.EColor}});var DL=zc();Object.defineProperty(r,"EColumnMode",{enumerable:!0,get:function(){return DL.EColumnMode}});var kc=zc();Object.defineProperty(r,"convertColumnMode",{enumerable:!0,get:function(){return kc.convertColumnMode}});var cP=zc();Object.defineProperty(r,"EColumnYMode",{enumerable:!0,get:function(){return cP.EColumnYMode}});var lD=zc();Object.defineProperty(r,"convertYColumnMode",{enumerable:!0,get:function(){return lD.convertYColumnMode}});var uD=ru();Object.defineProperty(r,"addCoord",{enumerable:!0,get:function(){return uD.addCoord}});var cD=ru();Object.defineProperty(r,"subtractCoord",{enumerable:!0,get:function(){return cD.subtractCoord}});var Qy=ru();Object.defineProperty(r,"convertDataValueToAbsoluteCoordinate",{enumerable:!0,get:function(){return Qy.convertDataValueToAbsoluteCoordinate}});var Ic=ru();Object.defineProperty(r,"convertPixelValueToAbsoluteCoordinate",{enumerable:!0,get:function(){return Ic.convertPixelValueToAbsoluteCoordinate}});var dD=ru();Object.defineProperty(r,"convertRelativeValueToAbsoluteCoordinate",{enumerable:!0,get:function(){return dD.convertRelativeValueToAbsoluteCoordinate}});var Gb=ru();Object.defineProperty(r,"convertToAbsoluteCoordinate",{enumerable:!0,get:function(){return Gb.convertToAbsoluteCoordinate}});var nh=ru();Object.defineProperty(r,"convertAbsoluteCoordinateToDataValue",{enumerable:!0,get:function(){return nh.convertAbsoluteCoordinateToDataValue}});var RL=ru();Object.defineProperty(r,"convertAbsoluteCoordinateToPixelValue",{enumerable:!0,get:function(){return RL.convertAbsoluteCoordinateToPixelValue}});var ML=ru();Object.defineProperty(r,"convertAbsoluteCoordinateToRelativeValue",{enumerable:!0,get:function(){return ML.convertAbsoluteCoordinateToRelativeValue}});var rp=ru();Object.defineProperty(r,"convertFromAbsoluteCoordinate",{enumerable:!0,get:function(){return rp.convertFromAbsoluteCoordinate}});var fD=ru();Object.defineProperty(r,"convertCoordinateMode",{enumerable:!0,get:function(){return fD.convertCoordinateMode}});var dP=ru();Object.defineProperty(r,"convertToDataValue",{enumerable:!0,get:function(){return dP.convertToDataValue}});var LL=ru();Object.defineProperty(r,"convertToPixelCoordinate",{enumerable:!0,get:function(){return LL.convertToPixelCoordinate}});var kL=ru();Object.defineProperty(r,"convertToRelativeCoordinate",{enumerable:!0,get:function(){return kL.convertToRelativeCoordinate}});var IL=ru();Object.defineProperty(r,"convertCoordinateFromDataValue",{enumerable:!0,get:function(){return IL.convertCoordinateFromDataValue}});var Ys=ru();Object.defineProperty(r,"convertCoordinateFromPixelValue",{enumerable:!0,get:function(){return Ys.convertCoordinateFromPixelValue}});var xu=ru();Object.defineProperty(r,"convertCoordinateFromRelativeValue",{enumerable:!0,get:function(){return xu.convertCoordinateFromRelativeValue}});var NL=tX();Object.defineProperty(r,"ECursorStyle",{enumerable:!0,get:function(){return NL.ECursorStyle}});var hD=ly();Object.defineProperty(r,"EDataFilterType",{enumerable:!0,get:function(){return hD.EDataFilterType}});var iv=ku();Object.defineProperty(r,"EDataLabelProviderType",{enumerable:!0,get:function(){return iv.EDataLabelProviderType}});var nv=oX();Object.defineProperty(r,"EDataLabelSkipMode",{enumerable:!0,get:function(){return nv.EDataLabelSkipMode}});var pD=ry();Object.defineProperty(r,"EDataPointWidthMode",{enumerable:!0,get:function(){return pD.EDataPointWidthMode}});var FL=N1();Object.defineProperty(r,"EDefaultRenderLayer",{enumerable:!0,get:function(){return FL.EDefaultRenderLayer}});var ov=rX();Object.defineProperty(r,"EDragMode",{enumerable:!0,get:function(){return ov.EDragMode}});var av=ej();Object.defineProperty(r,"EErrorDirection",{enumerable:!0,get:function(){return av.EErrorDirection}});var gD=pU();Object.defineProperty(r,"EErrorMode",{enumerable:!0,get:function(){return gD.EErrorMode}});var Yb=qq();Object.defineProperty(r,"EUseWasmSimd",{enumerable:!0,get:function(){return Yb.EUseWasmSimd}});var fP=LX();Object.defineProperty(r,"EColorPickMode",{enumerable:!0,get:function(){return fP.EColorPickMode}});var $b=hTe();Object.defineProperty(r,"EHeightSeriesMode",{enumerable:!0,get:function(){return $b.EHeightSeriesMode}});var em=F_e();Object.defineProperty(r,"EHoverMode",{enumerable:!0,get:function(){return em.EHoverMode}});var vD=MM();Object.defineProperty(r,"ELabelAlignment",{enumerable:!0,get:function(){return vD.ELabelAlignment}});var yD=wv();Object.defineProperty(r,"ELabelPlacement",{enumerable:!0,get:function(){return yD.ELabelPlacement}});var jL=wv();Object.defineProperty(r,"EHorizontalAlignment",{enumerable:!0,get:function(){return jL.EHorizontalAlignment}});var mD=wv();Object.defineProperty(r,"EVerticalAlignment",{enumerable:!0,get:function(){return mD.EVerticalAlignment}});var sv=wv();Object.defineProperty(r,"EAngularAxisLabelPlacement",{enumerable:!0,get:function(){return sv.EAngularAxisLabelPlacement}});var hP=wv();Object.defineProperty(r,"ERadialAxisLabelPlacement",{enumerable:!0,get:function(){return hP.ERadialAxisLabelPlacement}});var BL=W1();Object.defineProperty(r,"ELabelProviderType",{enumerable:!0,get:function(){return BL.ELabelProviderType}});var qb=nb();Object.defineProperty(r,"ELayoutManagerType",{enumerable:!0,get:function(){return qb.ELayoutManagerType}});var Xb=Xc();Object.defineProperty(r,"ELayoutStrategyType",{enumerable:!0,get:function(){return Xb.ELayoutStrategyType}});var Kb=Wd();Object.defineProperty(r,"EModifierType",{enumerable:!0,get:function(){return Kb.EModifierType}});var bD=sb();Object.defineProperty(r,"EMousePosition",{enumerable:!0,get:function(){return bD.EMousePosition}});var lv=PR();Object.defineProperty(r,"isTypedArray",{enumerable:!0,get:function(){return lv.isTypedArray}});var VL=PR();Object.defineProperty(r,"isNumberArray",{enumerable:!0,get:function(){return VL.isNumberArray}});var SD=PR();Object.defineProperty(r,"subArray",{enumerable:!0,get:function(){return SD.subArray}});var _D=wp();Object.defineProperty(r,"ENumericFormat",{enumerable:!0,get:function(){return _D.ENumericFormat}});var PD=lSe();Object.defineProperty(r,"OrderedRenderable",{enumerable:!0,get:function(){return PD.OrderedRenderable}});var CD=I1();Object.defineProperty(r,"EPaletteProviderType",{enumerable:!0,get:function(){return CD.EPaletteProviderType}});var pP=AX();Object.defineProperty(r,"EPointMarker3DType",{enumerable:!0,get:function(){return pP.EPointMarker3DType}});var TD=Ap();Object.defineProperty(r,"EPointMarkerType",{enumerable:!0,get:function(){return TD.EPointMarkerType}});var xD=ESe();Object.defineProperty(r,"EStrokeLineJoin",{enumerable:!0,get:function(){return xD.EStrokeLineJoin}});var Zb=Nze();Object.defineProperty(r,"ERenderLayer",{enumerable:!0,get:function(){return Zb.ERenderLayer}});var HL=dy();Object.defineProperty(r,"ESceneEntityType",{enumerable:!0,get:function(){return HL.ESceneEntityType}});var UL=ab();Object.defineProperty(r,"ESciChartSurfaceType",{enumerable:!0,get:function(){return UL.ESciChartSurfaceType}});var gP=qv();Object.defineProperty(r,"ESearchMode",{enumerable:!0,get:function(){return gP.ESearchMode}});var vP=qv();Object.defineProperty(r,"convertSearchMode",{enumerable:!0,get:function(){return vP.convertSearchMode}});var Jb=tn();Object.defineProperty(r,"ESeriesType",{enumerable:!0,get:function(){return Jb.ESeriesType}});var yP=vU();Object.defineProperty(r,"EShaderEffectType",{enumerable:!0,get:function(){return yP.EShaderEffectType}});var ED=Ep();Object.defineProperty(r,"Size",{enumerable:!0,get:function(){return ED.Size}});var mP=w8();Object.defineProperty(r,"ESubChartClippingMode",{enumerable:!0,get:function(){return mP.ESubChartClippingMode}});var ip=oU();Object.defineProperty(r,"ESubSurfacePositionCoordinateMode",{enumerable:!0,get:function(){return ip.ESubSurfacePositionCoordinateMode}});var np=Ha();Object.defineProperty(r,"ESurfaceType",{enumerable:!0,get:function(){return np.ESurfaceType}});var op=Du();Object.defineProperty(r,"EHorizontalTextPosition",{enumerable:!0,get:function(){return op.EHorizontalTextPosition}});var tm=Du();Object.defineProperty(r,"EVerticalTextPosition",{enumerable:!0,get:function(){return tm.EVerticalTextPosition}});var rm=Du();Object.defineProperty(r,"EMultiLineAlignment",{enumerable:!0,get:function(){return rm.EMultiLineAlignment}});var ap=Du();Object.defineProperty(r,"convertMultiLineAlignment",{enumerable:!0,get:function(){return ap.convertMultiLineAlignment}});var zL=KR();Object.defineProperty(r,"ETextAlignment",{enumerable:!0,get:function(){return zL.ETextAlignment}});var AD=KR();Object.defineProperty(r,"ETitlePosition",{enumerable:!0,get:function(){return AD.ETitlePosition}});var qp=sN();Object.defineProperty(r,"E3DLabelOrientationMode",{enumerable:!0,get:function(){return qp.E3DLabelOrientationMode}});var wD=sN();Object.defineProperty(r,"E3DTitleRotationMode",{enumerable:!0,get:function(){return wD.E3DTitleRotationMode}});var bP=sN();Object.defineProperty(r,"convert3DLabelOrientationMode",{enumerable:!0,get:function(){return bP.convert3DLabelOrientationMode}});var Qb=sN();Object.defineProperty(r,"convert3DTitleRotationMode",{enumerable:!0,get:function(){return Qb.convert3DTitleRotationMode}});var OD=AM();Object.defineProperty(r,"EThemeProviderType",{enumerable:!0,get:function(){return OD.EThemeProviderType}});var WL=Dbe();Object.defineProperty(r,"EColorMapMode",{enumerable:!0,get:function(){return WL.EColorMapMode}});var uv=jM();Object.defineProperty(r,"ETriangleSeriesDrawMode",{enumerable:!0,get:function(){return uv.ETriangleSeriesDrawMode}});var eS=xo();Object.defineProperty(r,"EValueName",{enumerable:!0,get:function(){return eS.EValueName}});var DD=xo();Object.defineProperty(r,"generateValueNamesForDataSeries",{enumerable:!0,get:function(){return DD.generateValueNamesForDataSeries}});var cv=Kq();Object.defineProperty(r,"EWatermarkPosition",{enumerable:!0,get:function(){return cv.EWatermarkPosition}});var eu=Os();Object.defineProperty(r,"EXyDirection",{enumerable:!0,get:function(){return eu.EXyDirection}});var im=QS();Object.defineProperty(r,"EYRangeMode",{enumerable:!0,get:function(){return im.EYRangeMode}});var tS=ty();Object.defineProperty(r,"EZoomState",{enumerable:!0,get:function(){return tS.EZoomState}});var RD=xf();Object.defineProperty(r,"getUniqueValues",{enumerable:!0,get:function(){return RD.getUniqueValues}});var GL=xf();Object.defineProperty(r,"countUnique",{enumerable:!0,get:function(){return GL.countUnique}});var rS=xf();Object.defineProperty(r,"areArraysEqual",{enumerable:!0,get:function(){return rS.areArraysEqual}});var P=xf();Object.defineProperty(r,"arrayRemove",{enumerable:!0,get:function(){return P.arrayRemove}});var E=xf();Object.defineProperty(r,"isArraySorted",{enumerable:!0,get:function(){return E.isArraySorted}});var M=xf();Object.defineProperty(r,"makeIncArray",{enumerable:!0,get:function(){return M.makeIncArray}});var Y=xf();Object.defineProperty(r,"appendRangeFifo",{enumerable:!0,get:function(){return Y.appendRangeFifo}});var ne=Mue();Object.defineProperty(r,"calcAverageForDoubleVector",{enumerable:!0,get:function(){return ne.calcAverageForDoubleVector}});var le=Mue();Object.defineProperty(r,"calcAverageForArray",{enumerable:!0,get:function(){return le.calcAverageForArray}});var Le=Ld();Object.defineProperty(r,"SIZEOF_NUMBER",{enumerable:!0,get:function(){return Le.SIZEOF_NUMBER}});var tt=Ld();Object.defineProperty(r,"SIZEOF_FLOAT32",{enumerable:!0,get:function(){return tt.SIZEOF_FLOAT32}});var _t=Ld();Object.defineProperty(r,"insertDoubleVectorFromJsArray",{enumerable:!0,get:function(){return _t.insertDoubleVectorFromJsArray}});var $t=Ld();Object.defineProperty(r,"memCopyFloat32",{enumerable:!0,get:function(){return $t.memCopyFloat32}});var hr=Ld();Object.defineProperty(r,"appendDoubleVectorFromJsArray",{enumerable:!0,get:function(){return hr.appendDoubleVectorFromJsArray}});var mr=Ld();Object.defineProperty(r,"appendDoubleVectorFromBuffer",{enumerable:!0,get:function(){return mr.appendDoubleVectorFromBuffer}});var Kt=iu();Object.defineProperty(r,"uintArgbColorLerp24bit",{enumerable:!0,get:function(){return Kt.uintArgbColorLerp24bit}});var tr=iu();Object.defineProperty(r,"uintArgbColorLerp",{enumerable:!0,get:function(){return tr.uintArgbColorLerp}});var ri=iu();Object.defineProperty(r,"linearColorMapLerp",{enumerable:!0,get:function(){return ri.linearColorMapLerp}});var Oi=iu();Object.defineProperty(r,"uintArgbColorToAbgr",{enumerable:!0,get:function(){return Oi.uintArgbColorToAbgr}});var Oo=iu();Object.defineProperty(r,"uintArgbColorMultiplyOpacity",{enumerable:!0,get:function(){return Oo.uintArgbColorMultiplyOpacity}});var Ft=iu();Object.defineProperty(r,"uintArgbColorOverrideOpacity",{enumerable:!0,get:function(){return Ft.uintArgbColorOverrideOpacity}});var Dt=iu();Object.defineProperty(r,"uintArgbColorIsTransparent",{enumerable:!0,get:function(){return Dt.uintArgbColorIsTransparent}});var Yt=iu();Object.defineProperty(r,"applyOpacityToHtmlColor",{enumerable:!0,get:function(){return Yt.applyOpacityToHtmlColor}});var vr=kue();Object.defineProperty(r,"convertColor",{enumerable:!0,get:function(){return vr.convertColor}});var _i=kue();Object.defineProperty(r,"convertRgbToHexColor",{enumerable:!0,get:function(){return _i.convertRgbToHexColor}});var io=Fze();Object.defineProperty(r,"convertToPixel",{enumerable:!0,get:function(){return io.convertToPixel}});var ui=XF();Object.defineProperty(r,"copyDoubleVector",{enumerable:!0,get:function(){return ui.copyDoubleVector}});var cn=wd();Object.defineProperty(r,"formatUnixDateToHumanString",{enumerable:!0,get:function(){return cn.formatUnixDateToHumanString}});var Mn=wd();Object.defineProperty(r,"formatUnixDateToHumanStringDDMMYY",{enumerable:!0,get:function(){return Mn.formatUnixDateToHumanStringDDMMYY}});var no=wd();Object.defineProperty(r,"formatUnixDateToHumanStringDDMMHHMM",{enumerable:!0,get:function(){return no.formatUnixDateToHumanStringDDMMHHMM}});var sp=wd();Object.defineProperty(r,"formatUnixDateToHumanStringDDMM",{enumerable:!0,get:function(){return sp.formatUnixDateToHumanStringDDMM}});var YL=wd();Object.defineProperty(r,"formatUnixDateToHumanStringHHMMSS",{enumerable:!0,get:function(){return YL.formatUnixDateToHumanStringHHMMSS}});var Fz=wd();Object.defineProperty(r,"formatUnixDateToHumanStringSSms",{enumerable:!0,get:function(){return Fz.formatUnixDateToHumanStringSSms}});var jz=wd();Object.defineProperty(r,"formatUnixDateToHumanStringHHMM",{enumerable:!0,get:function(){return jz.formatUnixDateToHumanStringHHMM}});var Bz=wd();Object.defineProperty(r,"formatUnixDateToHumanStringMMMDD",{enumerable:!0,get:function(){return Bz.formatUnixDateToHumanStringMMMDD}});var Vz=wd();Object.defineProperty(r,"formatUnixDateToHumanStringMMM",{enumerable:!0,get:function(){return Vz.formatUnixDateToHumanStringMMM}});var Hz=wd();Object.defineProperty(r,"formatUnixDateToHumanStringDD",{enumerable:!0,get:function(){return Hz.formatUnixDateToHumanStringDD}});var F=wd();Object.defineProperty(r,"formatUnixDateToHumanStringYYYY",{enumerable:!0,get:function(){return F.formatUnixDateToHumanStringYYYY}});var $=wd();Object.defineProperty(r,"formatUnixDateToHumanStringSSus",{enumerable:!0,get:function(){return $.formatUnixDateToHumanStringSSus}});var ae=wd();Object.defineProperty(r,"formatUnixDateToHumanStringSSns",{enumerable:!0,get:function(){return ae.formatUnixDateToHumanStringSSns}});var we=jze();Object.defineProperty(r,"logDoubleVector",{enumerable:!0,get:function(){return we.logDoubleVector}});var $e=Vd();Object.defineProperty(r,"getFontString",{enumerable:!0,get:function(){return $e.getFontString}});var st=Vd();Object.defineProperty(r,"getDefaultFontName",{enumerable:!0,get:function(){return st.getDefaultFontName}});var yt=Vd();Object.defineProperty(r,"getFontFamily",{enumerable:!0,get:function(){return yt.getFontFamily}});var wt=xSe();Object.defineProperty(r,"geometryHelpers",{enumerable:!0,get:function(){return wt.geometryHelpers}});var Ht=ws();Object.defineProperty(r,"generateGuid",{enumerable:!0,get:function(){return Ht.generateGuid}});var _r=ws();Object.defineProperty(r,"base64Id",{enumerable:!0,get:function(){return _r.base64Id}});var Pr=Bze();Object.defineProperty(r,"hasAllProperties",{enumerable:!0,get:function(){return Pr.hasAllProperties}});var Dr=rSe();Object.defineProperty(r,"hashUtils",{enumerable:!0,get:function(){return Dr.hashUtils}});var qr=s3();Object.defineProperty(r,"HEIGHT_SERIES_MAX_TEXTURE_SIZE",{enumerable:!0,get:function(){return qr.HEIGHT_SERIES_MAX_TEXTURE_SIZE}});var fi=s3();Object.defineProperty(r,"validateColorStops",{enumerable:!0,get:function(){return fi.validateColorStops}});var Fi=mY();Object.defineProperty(r,"htmlToElement",{enumerable:!0,get:function(){return Fi.htmlToElement}});var Cn=mY();Object.defineProperty(r,"stringOccurrences",{enumerable:!0,get:function(){return Cn.stringOccurrences}});var ji=Bue();Object.defineProperty(r,"createImageAsync",{enumerable:!0,get:function(){return ji.createImageAsync}});var Bn=Bue();Object.defineProperty(r,"createImagesArrayAsync",{enumerable:!0,get:function(){return Bn.createImagesArrayAsync}});var Kn=Oh();Object.defineProperty(r,"isRealNumber",{enumerable:!0,get:function(){return Kn.isRealNumber}});var Sd=Lf();Object.defineProperty(r,"Logger",{enumerable:!0,get:function(){return Sd.Logger}});var nc=bN();Object.defineProperty(r,"getNoisySinewave",{enumerable:!0,get:function(){return nc.getNoisySinewave}});var _d=bN();Object.defineProperty(r,"fillNoisySinewave",{enumerable:!0,get:function(){return _d.fillNoisySinewave}});var Ts=bN();Object.defineProperty(r,"logToBase",{enumerable:!0,get:function(){return Ts.logToBase}});var oh=e8();Object.defineProperty(r,"memoize",{enumerable:!0,get:function(){return oh.memoize}});var Xp=Yv();Object.defineProperty(r,"ObjectRegistry",{enumerable:!0,get:function(){return Xp.ObjectRegistry}});var wj=Yv();Object.defineProperty(r,"MemoryUsageHelper",{enumerable:!0,get:function(){return wj.MemoryUsageHelper}});var zOe=Il();Object.defineProperty(r,"formatNumber2Digits",{enumerable:!0,get:function(){return zOe.formatNumber2Digits}});var WOe=Il();Object.defineProperty(r,"numericHashCode",{enumerable:!0,get:function(){return WOe.numericHashCode}});var GOe=Il();Object.defineProperty(r,"formatNumber",{enumerable:!0,get:function(){return GOe.formatNumber}});var YOe=Il();Object.defineProperty(r,"toSuperScript",{enumerable:!0,get:function(){return YOe.toSuperScript}});var $Oe=Il();Object.defineProperty(r,"toScientific",{enumerable:!0,get:function(){return $Oe.toScientific}});var qOe=Il();Object.defineProperty(r,"toEngineering",{enumerable:!0,get:function(){return qOe.toEngineering}});var XOe=Il();Object.defineProperty(r,"checkIsNaN",{enumerable:!0,get:function(){return XOe.checkIsNaN}});var KOe=mi();Object.defineProperty(r,"parseColorToHexStringArgb",{enumerable:!0,get:function(){return KOe.parseColorToHexStringArgb}});var ZOe=mi();Object.defineProperty(r,"parseColorToHexStringAbgr",{enumerable:!0,get:function(){return ZOe.parseColorToHexStringAbgr}});var JOe=mi();Object.defineProperty(r,"parseColorToUIntArgb",{enumerable:!0,get:function(){return JOe.parseColorToUIntArgb}});var QOe=mi();Object.defineProperty(r,"parseColorToUIntAbgr",{enumerable:!0,get:function(){return QOe.parseColorToUIntAbgr}});var eDe=mi();Object.defineProperty(r,"toHex",{enumerable:!0,get:function(){return eDe.toHex}});var tDe=mi();Object.defineProperty(r,"parseColorToTArgb",{enumerable:!0,get:function(){return tDe.parseColorToTArgb}});var rDe=mi();Object.defineProperty(r,"parseArgbToHtmlColor",{enumerable:!0,get:function(){return rDe.parseArgbToHtmlColor}});var iDe=mi();Object.defineProperty(r,"parseTArgbToHtmlColor",{enumerable:!0,get:function(){return iDe.parseTArgbToHtmlColor}});var nDe=ca();Object.defineProperty(r,"EPerformanceMarkType",{enumerable:!0,get:function(){return nDe.EPerformanceMarkType}});var oDe=ca();Object.defineProperty(r,"EPerformanceDebugLevel",{enumerable:!0,get:function(){return oDe.EPerformanceDebugLevel}});var aDe=ca();Object.defineProperty(r,"PerformanceDebugHelper",{enumerable:!0,get:function(){return aDe.PerformanceDebugHelper}});var sDe=ca();Object.defineProperty(r,"runAfterFramePaint",{enumerable:!0,get:function(){return sDe.runAfterFramePaint}});var lDe=oo();Object.defineProperty(r,"calcDistanceFromLine",{enumerable:!0,get:function(){return lDe.calcDistanceFromLine}});var uDe=oo();Object.defineProperty(r,"calcCrossProduct",{enumerable:!0,get:function(){return uDe.calcCrossProduct}});var cDe=oo();Object.defineProperty(r,"calcDistance",{enumerable:!0,get:function(){return cDe.calcDistance}});var dDe=oo();Object.defineProperty(r,"testIsInBounds",{enumerable:!0,get:function(){return dDe.testIsInBounds}});var fDe=oo();Object.defineProperty(r,"calcAnnotationBordersForAxisMarker",{enumerable:!0,get:function(){return fDe.calcAnnotationBordersForAxisMarker}});var hDe=oo();Object.defineProperty(r,"testIsInXBounds",{enumerable:!0,get:function(){return hDe.testIsInXBounds}});var pDe=oo();Object.defineProperty(r,"testIsInInterval",{enumerable:!0,get:function(){return pDe.testIsInInterval}});var gDe=oo();Object.defineProperty(r,"calcDotProduct",{enumerable:!0,get:function(){return gDe.calcDotProduct}});var vDe=oo();Object.defineProperty(r,"calcDistanceFromLineSegment",{enumerable:!0,get:function(){return vDe.calcDistanceFromLineSegment}});var yDe=oo();Object.defineProperty(r,"testPointInTriangle",{enumerable:!0,get:function(){return yDe.testPointInTriangle}});var mDe=pTe();Object.defineProperty(r,"getRandomInRange",{enumerable:!0,get:function(){return mDe.getRandomInRange}});var bDe=Uue();Object.defineProperty(r,"getStocksDataFactory",{enumerable:!0,get:function(){return bDe.getStocksDataFactory}});var SDe=Uue();Object.defineProperty(r,"getNextRandomPriceBarFactory",{enumerable:!0,get:function(){return SDe.getNextRandomPriceBarFactory}});var _De=Vze();Object.defineProperty(r,"getAttributeFromString",{enumerable:!0,get:function(){return _De.getAttributeFromString}});var PDe=lc();Object.defineProperty(r,"wrapNativeText",{enumerable:!0,get:function(){return PDe.wrapNativeText}});var CDe=lc();Object.defineProperty(r,"convertToNativeLineSpacing",{enumerable:!0,get:function(){return CDe.convertToNativeLineSpacing}});var TDe=lc();Object.defineProperty(r,"getNativeTextSize",{enumerable:!0,get:function(){return TDe.getNativeTextSize}});var xDe=lc();Object.defineProperty(r,"getFirstLineHeightToBaseline",{enumerable:!0,get:function(){return xDe.getFirstLineHeightToBaseline}});var EDe=lc();Object.defineProperty(r,"getTextHeightToBaseline",{enumerable:!0,get:function(){return EDe.getTextHeightToBaseline}});var ADe=lc();Object.defineProperty(r,"getMultilineTextHeight",{enumerable:!0,get:function(){return ADe.getMultilineTextHeight}});var wDe=lc();Object.defineProperty(r,"getNativeTextPosition",{enumerable:!0,get:function(){return wDe.getNativeTextPosition}});var ODe=dV();Object.defineProperty(r,"ESize",{enumerable:!0,get:function(){return ODe.ESize}});var DDe=dV();Object.defineProperty(r,"ECoord",{enumerable:!0,get:function(){return DDe.ECoord}});var RDe=dV();Object.defineProperty(r,"EShift",{enumerable:!0,get:function(){return RDe.EShift}});var MDe=pn();Object.defineProperty(r,"translateFromCanvasToSeriesViewRect",{enumerable:!0,get:function(){return MDe.translateFromCanvasToSeriesViewRect}});var LDe=pn();Object.defineProperty(r,"translateFromSeriesViewRectToCanvas",{enumerable:!0,get:function(){return LDe.translateFromSeriesViewRectToCanvas}});var kDe=pn();Object.defineProperty(r,"translateFromCanvasToSeriesViewRectX",{enumerable:!0,get:function(){return kDe.translateFromCanvasToSeriesViewRectX}});var IDe=pn();Object.defineProperty(r,"translateFromCanvasToSeriesViewRectY",{enumerable:!0,get:function(){return IDe.translateFromCanvasToSeriesViewRectY}});var NDe=pn();Object.defineProperty(r,"translateFromSeriesViewRectToCanvasX",{enumerable:!0,get:function(){return NDe.translateFromSeriesViewRectToCanvasX}});var FDe=pn();Object.defineProperty(r,"translateFromSeriesViewRectToCanvasY",{enumerable:!0,get:function(){return FDe.translateFromSeriesViewRectToCanvasY}});var jDe=pn();Object.defineProperty(r,"translateToScaled",{enumerable:!0,get:function(){return jDe.translateToScaled}});var BDe=pn();Object.defineProperty(r,"translateToNotScaled",{enumerable:!0,get:function(){return BDe.translateToNotScaled}});var VDe=pn();Object.defineProperty(r,"translateToScaledRect",{enumerable:!0,get:function(){return VDe.translateToScaledRect}});var HDe=pn();Object.defineProperty(r,"translateToNotScaledRect",{enumerable:!0,get:function(){return HDe.translateToNotScaledRect}});var UDe=pn();Object.defineProperty(r,"translateDataValueRectToAbsolute",{enumerable:!0,get:function(){return UDe.translateDataValueRectToAbsolute}});var zDe=JN();Object.defineProperty(r,"updateTsrVector4",{enumerable:!0,get:function(){return zDe.updateTsrVector4}});var WDe=JN();Object.defineProperty(r,"fromTsrVector4",{enumerable:!0,get:function(){return WDe.fromTsrVector4}});var GDe=Qn();Object.defineProperty(r,"vectorToArray",{enumerable:!0,get:function(){return GDe.vectorToArray}});var YDe=Qn();Object.defineProperty(r,"vectorToArrayViewF64",{enumerable:!0,get:function(){return YDe.vectorToArrayViewF64}});var $De=Qn();Object.defineProperty(r,"vectorToArrayViewF32",{enumerable:!0,get:function(){return $De.vectorToArrayViewF32}});var qDe=Qn();Object.defineProperty(r,"vectorToArrayViewUi32",{enumerable:!0,get:function(){return qDe.vectorToArrayViewUi32}});var XDe=Qn();Object.defineProperty(r,"vectorToArrayViewI32",{enumerable:!0,get:function(){return XDe.vectorToArrayViewI32}});var KDe=c8();Object.defineProperty(r,"watermarkHelpers",{enumerable:!0,get:function(){return KDe.watermarkHelpers}});var ZDe=sTe();Object.defineProperty(r,"zeroArray2D",{enumerable:!0,get:function(){return ZDe.zeroArray2D}})})(T4)),T4}var jt=ub();class Hze{constructor(e){this.brokerUrl=e}setupFrontendLicense(e,i){console.log("Setup license"),jt.SciChartSurface.setRuntimeLicenseKey(e),jt.SciChartSurface.setLicenseCallback(n=>{const t=new URLSearchParams(n).get("challenge");return this.getFrontendLicense(t,i).then(o=>o.json()).then(o=>{const a=o.v1.data;return new Response(a,{status:200,headers:{"content-type":"text/plain"}})})})}async getFrontendLicense(e,i){return await fetch(`${this.brokerUrl}/v1/GetFrontendSettings`,{method:"POST",headers:{"content-type":"application/json","x-authorization":`Bearer ${i}`},body:JSON.stringify({v1:{data:e}})})}}const gTe=G.createContext(null);function xU(){const r=G.useContext(gTe);if(!r)throw new Error("useBrokerContext must be used within a BrokerProvider");return r}function kX(){const r=xU();if(!r.connectedBroker)throw new Error("No broker config found. Specify which broker to connect to first.");return r.connectedBroker}async function Uze(r,e){const i=r.replace(/\/+$/,""),n=new URL(i),t=await vTe(n,e?[e]:[50051,8081]);return{grpcUrl:i,httpUrl:t}}async function vTe(r,e){if(e.length===0)throw new Error("No working port found");const i=e[0],n=`${r.protocol}//${r.hostname}:${i}`;return await zze(`${n}/api/broker/health`)?n:vTe(r,e.slice(1))}async function zze(r){try{return(await fetch(r,{method:"GET",headers:{"Content-Type":"application/json"}})).status===200}catch{return!1}}var DW={},RW={},Cw={},Gue;function n_(){return Gue||(Gue=1,(function(r){var e=typeof Object.defineProperties=="function"?Object.defineProperty:function(q,te,fe){q!=Array.prototype&&q!=Object.prototype&&(q[te]=fe.value)},i=typeof window<"u"&&window===Cw?Cw:typeof Ch<"u"&&Ch!=null?Ch:Cw;function n(q,te){if(te){var fe=i;q=q.split(".");for(var Ue=0;Ue<q.length-1;Ue++){var pt=q[Ue];pt in fe||(fe[pt]={}),fe=fe[pt]}q=q[q.length-1],Ue=fe[q],te=te(Ue),te!=Ue&&te!=null&&e(fe,q,{configurable:!0,writable:!0,value:te})}}function t(q){var te=0;return function(){return te<q.length?{done:!1,value:q[te++]}:{done:!0}}}function o(){o=function(){},i.Symbol||(i.Symbol=s)}function a(q,te){this.a=q,e(this,"description",{configurable:!0,writable:!0,value:te})}a.prototype.toString=function(){return this.a};var s=(function(){function q(fe){if(this instanceof q)throw new TypeError("Symbol is not a constructor");return new a("jscomp_symbol_"+(fe||"")+"_"+te++,fe)}var te=0;return q})();function l(){o();var q=i.Symbol.iterator;q||(q=i.Symbol.iterator=i.Symbol("Symbol.iterator")),typeof Array.prototype[q]!="function"&&e(Array.prototype,q,{configurable:!0,writable:!0,value:function(){return u(t(this))}}),l=function(){}}function u(q){return l(),q={next:q},q[i.Symbol.iterator]=function(){return this},q}function c(q,te){l(),q instanceof String&&(q+="");var fe=0,Ue={next:function(){if(fe<q.length){var pt=fe++;return{value:te(pt,q[pt]),done:!1}}return Ue.next=function(){return{done:!0,value:void 0}},Ue.next()}};return Ue[Symbol.iterator]=function(){return Ue},Ue}n("Array.prototype.entries",function(q){return q||function(){return c(this,function(te,fe){return[te,fe]})}});var d=Cw||self;function f(q,te,fe){q=q.split("."),fe=fe||d,q[0]in fe||typeof fe.execScript>"u"||fe.execScript("var "+q[0]);for(var Ue;q.length&&(Ue=q.shift());)q.length||te===void 0?fe[Ue]&&fe[Ue]!==Object.prototype[Ue]?fe=fe[Ue]:fe=fe[Ue]={}:fe[Ue]=te}function h(q){var te=typeof q;if(te=="object")if(q){if(q instanceof Array)return"array";if(q instanceof Object)return te;var fe=Object.prototype.toString.call(q);if(fe=="[object Window]")return"object";if(fe=="[object Array]"||typeof q.length=="number"&&typeof q.splice<"u"&&typeof q.propertyIsEnumerable<"u"&&!q.propertyIsEnumerable("splice"))return"array";if(fe=="[object Function]"||typeof q.call<"u"&&typeof q.propertyIsEnumerable<"u"&&!q.propertyIsEnumerable("call"))return"function"}else return"null";else if(te=="function"&&typeof q.call>"u")return"object";return te}function p(q){var te=typeof q;return te=="object"&&q!=null||te=="function"}function g(q,te,fe){f(q,te,fe)}function v(q,te){function fe(){}fe.prototype=te.prototype,q.prototype=new fe,q.prototype.constructor=q}var y="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function m(q,te){for(var fe,Ue,pt=1;pt<arguments.length;pt++){Ue=arguments[pt];for(fe in Ue)q[fe]=Ue[fe];for(var At=0;At<y.length;At++)fe=y[At],Object.prototype.hasOwnProperty.call(Ue,fe)&&(q[fe]=Ue[fe])}}var b=Array.prototype.forEach?function(q,te){Array.prototype.forEach.call(q,te,void 0)}:function(q,te){for(var fe=q.length,Ue=typeof q=="string"?q.split(""):q,pt=0;pt<fe;pt++)pt in Ue&&te.call(void 0,Ue[pt],pt,q)},S=Array.prototype.map?function(q,te){return Array.prototype.map.call(q,te,void 0)}:function(q,te){for(var fe=q.length,Ue=Array(fe),pt=typeof q=="string"?q.split(""):q,At=0;At<fe;At++)At in pt&&(Ue[At]=te.call(void 0,pt[At],At,q));return Ue};function _(q,te,fe){return 2>=arguments.length?Array.prototype.slice.call(q,te):Array.prototype.slice.call(q,te,fe)}function C(q,te,fe,Ue){var pt="Assertion failed";if(fe){pt+=": "+fe;var At=Ue}else q&&(pt+=": "+q,At=te);throw Error(pt,At||[])}function T(q,te,fe){for(var Ue=[],pt=2;pt<arguments.length;++pt)Ue[pt-2]=arguments[pt];return q||C("",null,te,Ue),q}function x(q,te,fe){for(var Ue=[],pt=2;pt<arguments.length;++pt)Ue[pt-2]=arguments[pt];typeof q!="string"&&C("Expected string but got %s: %s.",[h(q),q],te,Ue)}function A(q,te,fe){for(var Ue=[],pt=2;pt<arguments.length;++pt)Ue[pt-2]=arguments[pt];Array.isArray(q)||C("Expected array but got %s: %s.",[h(q),q],te,Ue)}function w(q,te){for(var fe=[],Ue=1;Ue<arguments.length;++Ue)fe[Ue-1]=arguments[Ue];throw Error("Failure"+(q?": "+q:""),fe)}function L(q,te,fe,Ue){for(var pt=[],At=3;At<arguments.length;++At)pt[At-3]=arguments[At];q instanceof te||C("Expected instanceof %s but got %s.",[k(te),k(q)],fe,pt)}function k(q){return q instanceof Function?q.displayName||q.name||"unknown type name":q instanceof Object?q.constructor.displayName||q.constructor.name||Object.prototype.toString.call(q):q===null?"null":typeof q}function D(q,te){if(this.c=q,this.b=te,this.a={},this.arrClean=!0,0<this.c.length){for(q=0;q<this.c.length;q++){te=this.c[q];var fe=te[0];this.a[fe.toString()]=new W(fe,te[1])}this.arrClean=!0}}f("jspb.Map",D,void 0),D.prototype.g=function(){if(this.arrClean){if(this.b){var q=this.a,te;for(te in q)if(Object.prototype.hasOwnProperty.call(q,te)){var fe=q[te].a;fe&&fe.g()}}}else{for(this.c.length=0,q=V(this),q.sort(),te=0;te<q.length;te++){var Ue=this.a[q[te]];(fe=Ue.a)&&fe.g(),this.c.push([Ue.key,Ue.value])}this.arrClean=!0}return this.c},D.prototype.toArray=D.prototype.g,D.prototype.Mc=function(q,te){for(var fe=this.g(),Ue=[],pt=0;pt<fe.length;pt++){var At=this.a[fe[pt][0].toString()];N(this,At);var cr=At.a;cr?(T(te),Ue.push([At.key,te(q,cr)])):Ue.push([At.key,At.value])}return Ue},D.prototype.toObject=D.prototype.Mc,D.fromObject=function(q,te,fe){te=new D([],te);for(var Ue=0;Ue<q.length;Ue++){var pt=q[Ue][0],At=fe(q[Ue][1]);te.set(pt,At)}return te};function j(q){this.a=0,this.b=q}j.prototype.next=function(){return this.a<this.b.length?{done:!1,value:this.b[this.a++]}:{done:!0,value:void 0}},typeof Symbol<"u"&&(j.prototype[Symbol.iterator]=function(){return this}),D.prototype.Jb=function(){return V(this).length},D.prototype.getLength=D.prototype.Jb,D.prototype.clear=function(){this.a={},this.arrClean=!1},D.prototype.clear=D.prototype.clear,D.prototype.Cb=function(q){q=q.toString();var te=this.a.hasOwnProperty(q);return delete this.a[q],this.arrClean=!1,te},D.prototype.del=D.prototype.Cb,D.prototype.Eb=function(){var q=[],te=V(this);te.sort();for(var fe=0;fe<te.length;fe++){var Ue=this.a[te[fe]];q.push([Ue.key,Ue.value])}return q},D.prototype.getEntryList=D.prototype.Eb,D.prototype.entries=function(){var q=[],te=V(this);te.sort();for(var fe=0;fe<te.length;fe++){var Ue=this.a[te[fe]];q.push([Ue.key,N(this,Ue)])}return new j(q)},D.prototype.entries=D.prototype.entries,D.prototype.keys=function(){var q=[],te=V(this);te.sort();for(var fe=0;fe<te.length;fe++)q.push(this.a[te[fe]].key);return new j(q)},D.prototype.keys=D.prototype.keys,D.prototype.values=function(){var q=[],te=V(this);te.sort();for(var fe=0;fe<te.length;fe++)q.push(N(this,this.a[te[fe]]));return new j(q)},D.prototype.values=D.prototype.values,D.prototype.forEach=function(q,te){var fe=V(this);fe.sort();for(var Ue=0;Ue<fe.length;Ue++){var pt=this.a[fe[Ue]];q.call(te,N(this,pt),pt.key,this)}},D.prototype.forEach=D.prototype.forEach,D.prototype.set=function(q,te){var fe=new W(q);return this.b?(fe.a=te,fe.value=te.g()):fe.value=te,this.a[q.toString()]=fe,this.arrClean=!1,this},D.prototype.set=D.prototype.set;function N(q,te){return q.b?(te.a||(te.a=new q.b(te.value)),te.a):te.value}D.prototype.get=function(q){if(q=this.a[q.toString()])return N(this,q)},D.prototype.get=D.prototype.get,D.prototype.has=function(q){return q.toString()in this.a},D.prototype.has=D.prototype.has,D.prototype.Jc=function(q,te,fe,Ue,pt){var At=V(this);At.sort();for(var cr=0;cr<At.length;cr++){var Hr=this.a[At[cr]];te.Va(q),fe.call(te,1,Hr.key),this.b?Ue.call(te,2,N(this,Hr),pt):Ue.call(te,2,Hr.value),te.Ya()}},D.prototype.serializeBinary=D.prototype.Jc,D.deserializeBinary=function(q,te,fe,Ue,pt,At,cr){for(;te.oa()&&!te.bb();){var Hr=te.c;Hr==1?At=fe.call(te):Hr==2&&(q.b?(T(pt),cr||(cr=new q.b),Ue.call(te,cr,pt)):cr=Ue.call(te))}T(At!=null),T(cr!=null),q.set(At,cr)};function V(q){q=q.a;var te=[],fe;for(fe in q)Object.prototype.hasOwnProperty.call(q,fe)&&te.push(fe);return te}function W(q,te){this.key=q,this.value=te,this.a=void 0}function K(q){if(8192>=q.length)return String.fromCharCode.apply(null,q);for(var te="",fe=0;fe<q.length;fe+=8192)te+=String.fromCharCode.apply(null,_(q,fe,fe+8192));return te}var H={"\0":"\\0","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","	":"\\t","\v":"\\x0B",'"':'\\"',"\\":"\\\\","<":"\\u003C"},U={"'":"\\'"},I={},Q=null;function Z(q,te){te===void 0&&(te=0),de(),te=I[te];for(var fe=[],Ue=0;Ue<q.length;Ue+=3){var pt=q[Ue],At=Ue+1<q.length,cr=At?q[Ue+1]:0,Hr=Ue+2<q.length,Yi=Hr?q[Ue+2]:0,Fn=pt>>2;pt=(pt&3)<<4|cr>>4,cr=(cr&15)<<2|Yi>>6,Yi&=63,Hr||(Yi=64,At||(cr=64)),fe.push(te[Fn],te[pt],te[cr]||"",te[Yi]||"")}return fe.join("")}function ee(q){var te=q.length,fe=3*te/4;fe%3?fe=Math.floor(fe):"=.".indexOf(q[te-1])!=-1&&(fe="=.".indexOf(q[te-2])!=-1?fe-2:fe-1);var Ue=new Uint8Array(fe),pt=0;return ie(q,function(At){Ue[pt++]=At}),Ue.subarray(0,pt)}function ie(q,te){function fe(Yi){for(;Ue<q.length;){var Fn=q.charAt(Ue++),No=Q[Fn];if(No!=null)return No;if(!/^[\s\xa0]*$/.test(Fn))throw Error("Unknown base64 encoding at char: "+Fn)}return Yi}de();for(var Ue=0;;){var pt=fe(-1),At=fe(0),cr=fe(64),Hr=fe(64);if(Hr===64&&pt===-1)break;te(pt<<2|At>>4),cr!=64&&(te(At<<4&240|cr>>2),Hr!=64&&te(cr<<6&192|Hr))}}function de(){if(!Q){Q={};for(var q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),te=["+/=","+/","-_=","-_.","-_"],fe=0;5>fe;fe++){var Ue=q.concat(te[fe].split(""));I[fe]=Ue;for(var pt=0;pt<Ue.length;pt++){var At=Ue[pt];Q[At]===void 0&&(Q[At]=pt)}}}}f("jspb.ConstBinaryMessage",function(){},void 0),f("jspb.BinaryMessage",function(){},void 0),f("jspb.BinaryConstants.FieldType",{yb:-1,ee:1,FLOAT:2,ke:3,te:4,je:5,xb:6,wb:7,BOOL:8,re:9,ie:10,le:11,ce:12,se:13,ge:14,me:15,ne:16,oe:17,pe:18,he:30,ve:31},void 0),f("jspb.BinaryConstants.WireType",{yb:-1,ue:0,xb:1,de:2,qe:3,fe:4,wb:5},void 0),f("jspb.BinaryConstants.FieldTypeToWireType",function(q){switch(q){case 5:case 3:case 13:case 4:case 17:case 18:case 8:case 14:case 31:return 0;case 1:case 6:case 16:case 30:return 1;case 9:case 11:case 12:return 2;case 2:case 7:case 15:return 5;default:return-1}},void 0),f("jspb.BinaryConstants.INVALID_FIELD_NUMBER",-1,void 0),f("jspb.BinaryConstants.FLOAT32_EPS",1401298464324817e-60,void 0),f("jspb.BinaryConstants.FLOAT32_MIN",11754943508222875e-54,void 0),f("jspb.BinaryConstants.FLOAT32_MAX",34028234663852886e22,void 0),f("jspb.BinaryConstants.FLOAT64_EPS",5e-324,void 0),f("jspb.BinaryConstants.FLOAT64_MIN",22250738585072014e-324,void 0),f("jspb.BinaryConstants.FLOAT64_MAX",17976931348623157e292,void 0),f("jspb.BinaryConstants.TWO_TO_20",1048576,void 0),f("jspb.BinaryConstants.TWO_TO_23",8388608,void 0),f("jspb.BinaryConstants.TWO_TO_31",2147483648,void 0),f("jspb.BinaryConstants.TWO_TO_32",4294967296,void 0),f("jspb.BinaryConstants.TWO_TO_52",4503599627370496,void 0),f("jspb.BinaryConstants.TWO_TO_63",9223372036854776e3,void 0),f("jspb.BinaryConstants.TWO_TO_64",18446744073709552e3,void 0),f("jspb.BinaryConstants.ZERO_HASH","\0\0\0\0\0\0\0\0",void 0);var pe=0,_e=0;f("jspb.utils.getSplit64Low",function(){return pe},void 0),f("jspb.utils.getSplit64High",function(){return _e},void 0);function Te(q){var te=q>>>0;q=Math.floor((q-te)/4294967296)>>>0,pe=te,_e=q}f("jspb.utils.splitUint64",Te,void 0);function De(q){var te=0>q;q=Math.abs(q);var fe=q>>>0;q=Math.floor((q-fe)/4294967296),q>>>=0,te&&(q=~q>>>0,fe=(~fe>>>0)+1,4294967295<fe&&(fe=0,q++,4294967295<q&&(q=0))),pe=fe,_e=q}f("jspb.utils.splitInt64",De,void 0);function Pe(q){var te=0>q;q=2*Math.abs(q),Te(q),q=pe;var fe=_e;te&&(q==0?fe==0?fe=q=4294967295:(fe--,q=4294967295):q--),pe=q,_e=fe}f("jspb.utils.splitZigzag64",Pe,void 0);function Ee(q){var te=0>q?1:0;if(q=te?-q:q,q===0)0<1/q?pe=_e=0:(_e=0,pe=2147483648);else if(isNaN(q))_e=0,pe=2147483647;else if(34028234663852886e22<q)_e=0,pe=(te<<31|2139095040)>>>0;else if(11754943508222875e-54>q)q=Math.round(q/Math.pow(2,-149)),_e=0,pe=(te<<31|q)>>>0;else{var fe=Math.floor(Math.log(q)/Math.LN2);q*=Math.pow(2,-fe),q=Math.round(8388608*q),16777216<=q&&++fe,_e=0,pe=(te<<31|fe+127<<23|q&8388607)>>>0}}f("jspb.utils.splitFloat32",Ee,void 0);function Re(q){var te=0>q?1:0;if(q=te?-q:q,q===0)_e=0<1/q?0:2147483648,pe=0;else if(isNaN(q))_e=2147483647,pe=4294967295;else if(17976931348623157e292<q)_e=(te<<31|2146435072)>>>0,pe=0;else if(22250738585072014e-324>q)q/=Math.pow(2,-1074),_e=(te<<31|q/4294967296)>>>0,pe=q>>>0;else{var fe=q,Ue=0;if(2<=fe)for(;2<=fe&&1023>Ue;)Ue++,fe/=2;else for(;1>fe&&-1022<Ue;)fe*=2,Ue--;q*=Math.pow(2,-Ue),_e=(te<<31|Ue+1023<<20|1048576*q&1048575)>>>0,pe=4503599627370496*q>>>0}}f("jspb.utils.splitFloat64",Re,void 0);function je(q){var te=q.charCodeAt(4),fe=q.charCodeAt(5),Ue=q.charCodeAt(6),pt=q.charCodeAt(7);pe=q.charCodeAt(0)+(q.charCodeAt(1)<<8)+(q.charCodeAt(2)<<16)+(q.charCodeAt(3)<<24)>>>0,_e=te+(fe<<8)+(Ue<<16)+(pt<<24)>>>0}f("jspb.utils.splitHash64",je,void 0);function Ke(q,te){return 4294967296*te+(q>>>0)}f("jspb.utils.joinUint64",Ke,void 0);function ot(q,te){var fe=te&2147483648;return fe&&(q=~q+1>>>0,te=~te>>>0,q==0&&(te=te+1>>>0)),q=Ke(q,te),fe?-q:q}f("jspb.utils.joinInt64",ot,void 0);function We(q,te,fe){var Ue=te>>31;return fe(q<<1^Ue,(te<<1|q>>>31)^Ue)}f("jspb.utils.toZigzag64",We,void 0);function xe(q,te){return ve(q,te,ot)}f("jspb.utils.joinZigzag64",xe,void 0);function ve(q,te,fe){var Ue=-(q&1);return fe((q>>>1|te<<31)^Ue,te>>>1^Ue)}f("jspb.utils.fromZigzag64",ve,void 0);function he(q){var te=2*(q>>31)+1,fe=q>>>23&255;return q&=8388607,fe==255?q?NaN:1/0*te:fe==0?te*Math.pow(2,-149)*q:te*Math.pow(2,fe-150)*(q+Math.pow(2,23))}f("jspb.utils.joinFloat32",he,void 0);function Se(q,te){var fe=2*(te>>31)+1,Ue=te>>>20&2047;return q=4294967296*(te&1048575)+q,Ue==2047?q?NaN:1/0*fe:Ue==0?fe*Math.pow(2,-1074)*q:fe*Math.pow(2,Ue-1075)*(q+4503599627370496)}f("jspb.utils.joinFloat64",Se,void 0);function be(q,te){return String.fromCharCode(q>>>0&255,q>>>8&255,q>>>16&255,q>>>24&255,te>>>0&255,te>>>8&255,te>>>16&255,te>>>24&255)}f("jspb.utils.joinHash64",be,void 0),f("jspb.utils.DIGITS","0123456789abcdef".split(""),void 0);function ke(q,te){function fe(pt,At){return pt=pt?String(pt):"",At?"0000000".slice(pt.length)+pt:pt}if(2097151>=te)return""+Ke(q,te);var Ue=(q>>>24|te<<8)>>>0&16777215;return te=te>>16&65535,q=(q&16777215)+6777216*Ue+6710656*te,Ue+=8147497*te,te*=2,1e7<=q&&(Ue+=Math.floor(q/1e7),q%=1e7),1e7<=Ue&&(te+=Math.floor(Ue/1e7),Ue%=1e7),fe(te,0)+fe(Ue,te)+fe(q,1)}f("jspb.utils.joinUnsignedDecimalString",ke,void 0);function qe(q,te){var fe=te&2147483648;return fe&&(q=~q+1>>>0,te=~te+(q==0?1:0)>>>0),q=ke(q,te),fe?"-"+q:q}f("jspb.utils.joinSignedDecimalString",qe,void 0);function rt(q,te){je(q),q=pe;var fe=_e;return te?qe(q,fe):ke(q,fe)}f("jspb.utils.hash64ToDecimalString",rt,void 0),f("jspb.utils.hash64ArrayToDecimalStrings",function(q,te){for(var fe=Array(q.length),Ue=0;Ue<q.length;Ue++)fe[Ue]=rt(q[Ue],te);return fe},void 0);function St(q){function te(cr,Hr){for(var Yi=0;8>Yi&&(cr!==1||0<Hr);Yi++)Hr=cr*pt[Yi]+Hr,pt[Yi]=Hr&255,Hr>>>=8}function fe(){for(var cr=0;8>cr;cr++)pt[cr]=~pt[cr]&255}T(0<q.length);var Ue=!1;q[0]==="-"&&(Ue=!0,q=q.slice(1));for(var pt=[0,0,0,0,0,0,0,0],At=0;At<q.length;At++)te(10,q.charCodeAt(At)-48);return Ue&&(fe(),te(1,1)),K(pt)}f("jspb.utils.decimalStringToHash64",St,void 0),f("jspb.utils.splitDecimalString",function(q){je(St(q))},void 0);function xt(q){return String.fromCharCode(10>q?48+q:87+q)}function It(q){return 97<=q?q-97+10:q-48}f("jspb.utils.hash64ToHexString",function(q){var te=Array(18);te[0]="0",te[1]="x";for(var fe=0;8>fe;fe++){var Ue=q.charCodeAt(7-fe);te[2*fe+2]=xt(Ue>>4),te[2*fe+3]=xt(Ue&15)}return te.join("")},void 0),f("jspb.utils.hexStringToHash64",function(q){q=q.toLowerCase(),T(q.length==18),T(q[0]=="0"),T(q[1]=="x");for(var te="",fe=0;8>fe;fe++)te=String.fromCharCode(16*It(q.charCodeAt(2*fe+2))+It(q.charCodeAt(2*fe+3)))+te;return te},void 0),f("jspb.utils.hash64ToNumber",function(q,te){je(q),q=pe;var fe=_e;return te?ot(q,fe):Ke(q,fe)},void 0),f("jspb.utils.numberToHash64",function(q){return De(q),be(pe,_e)},void 0),f("jspb.utils.countVarints",function(q,te,fe){for(var Ue=0,pt=te;pt<fe;pt++)Ue+=q[pt]>>7;return fe-te-Ue},void 0),f("jspb.utils.countVarintFields",function(q,te,fe,Ue){var pt=0;if(Ue*=8,128>Ue)for(;te<fe&&q[te++]==Ue;)for(pt++;;){var At=q[te++];if((At&128)==0)break}else for(;te<fe;){for(At=Ue;128<At;){if(q[te]!=(At&127|128))return pt;te++,At>>=7}if(q[te++]!=At)break;for(pt++;At=q[te++],(At&128)!=0;);}return pt},void 0);function Zt(q,te,fe,Ue,pt){var At=0;if(128>Ue)for(;te<fe&&q[te++]==Ue;)At++,te+=pt;else for(;te<fe;){for(var cr=Ue;128<cr;){if(q[te++]!=(cr&127|128))return At;cr>>=7}if(q[te++]!=cr)break;At++,te+=pt}return At}f("jspb.utils.countFixed32Fields",function(q,te,fe,Ue){return Zt(q,te,fe,8*Ue+5,4)},void 0),f("jspb.utils.countFixed64Fields",function(q,te,fe,Ue){return Zt(q,te,fe,8*Ue+1,8)},void 0),f("jspb.utils.countDelimitedFields",function(q,te,fe,Ue){var pt=0;for(Ue=8*Ue+2;te<fe;){for(var At=Ue;128<At;){if(q[te++]!=(At&127|128))return pt;At>>=7}if(q[te++]!=At)break;pt++;for(var cr=0,Hr=1;At=q[te++],cr+=(At&127)*Hr,Hr*=128,(At&128)!=0;);te+=cr}return pt},void 0),f("jspb.utils.debugBytesToTextFormat",function(q){var te='"';if(q){q=ct(q);for(var fe=0;fe<q.length;fe++)te+="\\x",16>q[fe]&&(te+="0"),te+=q[fe].toString(16)}return te+'"'},void 0),f("jspb.utils.debugScalarToTextFormat",function(q){if(typeof q=="string"){q=String(q);for(var te=['"'],fe=0;fe<q.length;fe++){var Ue=q.charAt(fe),pt=Ue.charCodeAt(0),At=fe+1,cr;(cr=H[Ue])||(31<pt&&127>pt||(pt=Ue,pt in U?Ue=U[pt]:pt in H?Ue=U[pt]=H[pt]:(cr=pt.charCodeAt(0),31<cr&&127>cr?Ue=pt:(256>cr?(Ue="\\x",(16>cr||256<cr)&&(Ue+="0")):(Ue="\\u",4096>cr&&(Ue+="0")),Ue+=cr.toString(16).toUpperCase()),Ue=U[pt]=Ue)),cr=Ue),te[At]=cr}te.push('"'),q=te.join("")}else q=q.toString();return q},void 0),f("jspb.utils.stringToByteArray",function(q){for(var te=new Uint8Array(q.length),fe=0;fe<q.length;fe++){var Ue=q.charCodeAt(fe);if(255<Ue)throw Error("Conversion error: string contains codepoint outside of byte range");te[fe]=Ue}return te},void 0);function ct(q){return q.constructor===Uint8Array?q:q.constructor===ArrayBuffer?new Uint8Array(q):q.constructor===Array?new Uint8Array(q):q.constructor===String?ee(q):q instanceof Uint8Array?new Uint8Array(q.buffer,q.byteOffset,q.byteLength):(w("Type not convertible to Uint8Array."),new Uint8Array(0))}f("jspb.utils.byteSourceToUint8Array",ct,void 0);function Qe(q,te,fe){this.b=null,this.a=this.c=this.h=0,this.v=!1,q&&this.H(q,te,fe)}f("jspb.BinaryDecoder",Qe,void 0);var Et=[];Qe.getInstanceCacheLength=function(){return Et.length};function Gt(q,te,fe){if(Et.length){var Ue=Et.pop();return q&&Ue.H(q,te,fe),Ue}return new Qe(q,te,fe)}Qe.alloc=Gt,Qe.prototype.Ca=function(){this.clear(),100>Et.length&&Et.push(this)},Qe.prototype.free=Qe.prototype.Ca,Qe.prototype.clone=function(){return Gt(this.b,this.h,this.c-this.h)},Qe.prototype.clone=Qe.prototype.clone,Qe.prototype.clear=function(){this.b=null,this.a=this.c=this.h=0,this.v=!1},Qe.prototype.clear=Qe.prototype.clear,Qe.prototype.Y=function(){return this.b},Qe.prototype.getBuffer=Qe.prototype.Y,Qe.prototype.H=function(q,te,fe){this.b=ct(q),this.h=te!==void 0?te:0,this.c=fe!==void 0?this.h+fe:this.b.length,this.a=this.h},Qe.prototype.setBlock=Qe.prototype.H,Qe.prototype.Db=function(){return this.c},Qe.prototype.getEnd=Qe.prototype.Db,Qe.prototype.setEnd=function(q){this.c=q},Qe.prototype.setEnd=Qe.prototype.setEnd,Qe.prototype.reset=function(){this.a=this.h},Qe.prototype.reset=Qe.prototype.reset,Qe.prototype.B=function(){return this.a},Qe.prototype.getCursor=Qe.prototype.B,Qe.prototype.Ma=function(q){this.a=q},Qe.prototype.setCursor=Qe.prototype.Ma,Qe.prototype.advance=function(q){this.a+=q,T(this.a<=this.c)},Qe.prototype.advance=Qe.prototype.advance,Qe.prototype.ya=function(){return this.a==this.c},Qe.prototype.atEnd=Qe.prototype.ya,Qe.prototype.Qb=function(){return this.a>this.c},Qe.prototype.pastEnd=Qe.prototype.Qb,Qe.prototype.getError=function(){return this.v||0>this.a||this.a>this.c},Qe.prototype.getError=Qe.prototype.getError,Qe.prototype.w=function(q){for(var te=128,fe=0,Ue=0,pt=0;4>pt&&128<=te;pt++)te=this.b[this.a++],fe|=(te&127)<<7*pt;if(128<=te&&(te=this.b[this.a++],fe|=(te&127)<<28,Ue|=(te&127)>>4),128<=te)for(pt=0;5>pt&&128<=te;pt++)te=this.b[this.a++],Ue|=(te&127)<<7*pt+3;if(128>te)return q(fe>>>0,Ue>>>0);w("Failed to read varint, encoding is invalid."),this.v=!0},Qe.prototype.readSplitVarint64=Qe.prototype.w,Qe.prototype.ea=function(q){return this.w(function(te,fe){return ve(te,fe,q)})},Qe.prototype.readSplitZigzagVarint64=Qe.prototype.ea,Qe.prototype.ta=function(q){var te=this.b,fe=this.a;this.a+=8;for(var Ue=0,pt=0,At=fe+7;At>=fe;At--)Ue=Ue<<8|te[At],pt=pt<<8|te[At+4];return q(Ue,pt)},Qe.prototype.readSplitFixed64=Qe.prototype.ta,Qe.prototype.kb=function(){for(;this.b[this.a]&128;)this.a++;this.a++},Qe.prototype.skipVarint=Qe.prototype.kb,Qe.prototype.mb=function(q){for(;128<q;)this.a--,q>>>=7;this.a--},Qe.prototype.unskipVarint=Qe.prototype.mb,Qe.prototype.o=function(){var q=this.b,te=q[this.a],fe=te&127;return 128>te?(this.a+=1,T(this.a<=this.c),fe):(te=q[this.a+1],fe|=(te&127)<<7,128>te?(this.a+=2,T(this.a<=this.c),fe):(te=q[this.a+2],fe|=(te&127)<<14,128>te?(this.a+=3,T(this.a<=this.c),fe):(te=q[this.a+3],fe|=(te&127)<<21,128>te?(this.a+=4,T(this.a<=this.c),fe):(te=q[this.a+4],fe|=(te&15)<<28,128>te?(this.a+=5,T(this.a<=this.c),fe>>>0):(this.a+=5,128<=q[this.a++]&&128<=q[this.a++]&&128<=q[this.a++]&&128<=q[this.a++]&&128<=q[this.a++]&&T(!1),T(this.a<=this.c),fe)))))},Qe.prototype.readUnsignedVarint32=Qe.prototype.o,Qe.prototype.da=function(){return~~this.o()},Qe.prototype.readSignedVarint32=Qe.prototype.da,Qe.prototype.O=function(){return this.o().toString()},Qe.prototype.Ea=function(){return this.da().toString()},Qe.prototype.readSignedVarint32String=Qe.prototype.Ea,Qe.prototype.Ia=function(){var q=this.o();return q>>>1^-(q&1)},Qe.prototype.readZigzagVarint32=Qe.prototype.Ia,Qe.prototype.Ga=function(){return this.w(Ke)},Qe.prototype.readUnsignedVarint64=Qe.prototype.Ga,Qe.prototype.Ha=function(){return this.w(ke)},Qe.prototype.readUnsignedVarint64String=Qe.prototype.Ha,Qe.prototype.sa=function(){return this.w(ot)},Qe.prototype.readSignedVarint64=Qe.prototype.sa,Qe.prototype.Fa=function(){return this.w(qe)},Qe.prototype.readSignedVarint64String=Qe.prototype.Fa,Qe.prototype.Ja=function(){return this.w(xe)},Qe.prototype.readZigzagVarint64=Qe.prototype.Ja,Qe.prototype.fb=function(){return this.ea(be)},Qe.prototype.readZigzagVarintHash64=Qe.prototype.fb,Qe.prototype.Ka=function(){return this.ea(qe)},Qe.prototype.readZigzagVarint64String=Qe.prototype.Ka,Qe.prototype.Gc=function(){var q=this.b[this.a];return this.a+=1,T(this.a<=this.c),q},Qe.prototype.readUint8=Qe.prototype.Gc,Qe.prototype.Ec=function(){var q=this.b[this.a],te=this.b[this.a+1];return this.a+=2,T(this.a<=this.c),q<<0|te<<8},Qe.prototype.readUint16=Qe.prototype.Ec,Qe.prototype.m=function(){var q=this.b[this.a],te=this.b[this.a+1],fe=this.b[this.a+2],Ue=this.b[this.a+3];return this.a+=4,T(this.a<=this.c),(q<<0|te<<8|fe<<16|Ue<<24)>>>0},Qe.prototype.readUint32=Qe.prototype.m,Qe.prototype.ga=function(){var q=this.m(),te=this.m();return Ke(q,te)},Qe.prototype.readUint64=Qe.prototype.ga,Qe.prototype.ha=function(){var q=this.m(),te=this.m();return ke(q,te)},Qe.prototype.readUint64String=Qe.prototype.ha,Qe.prototype.Xb=function(){var q=this.b[this.a];return this.a+=1,T(this.a<=this.c),q<<24>>24},Qe.prototype.readInt8=Qe.prototype.Xb,Qe.prototype.Vb=function(){var q=this.b[this.a],te=this.b[this.a+1];return this.a+=2,T(this.a<=this.c),(q<<0|te<<8)<<16>>16},Qe.prototype.readInt16=Qe.prototype.Vb,Qe.prototype.P=function(){var q=this.b[this.a],te=this.b[this.a+1],fe=this.b[this.a+2],Ue=this.b[this.a+3];return this.a+=4,T(this.a<=this.c),q<<0|te<<8|fe<<16|Ue<<24},Qe.prototype.readInt32=Qe.prototype.P,Qe.prototype.ba=function(){var q=this.m(),te=this.m();return ot(q,te)},Qe.prototype.readInt64=Qe.prototype.ba,Qe.prototype.ca=function(){var q=this.m(),te=this.m();return qe(q,te)},Qe.prototype.readInt64String=Qe.prototype.ca,Qe.prototype.aa=function(){var q=this.m();return he(q)},Qe.prototype.readFloat=Qe.prototype.aa,Qe.prototype.Z=function(){var q=this.m(),te=this.m();return Se(q,te)},Qe.prototype.readDouble=Qe.prototype.Z,Qe.prototype.pa=function(){return!!this.b[this.a++]},Qe.prototype.readBool=Qe.prototype.pa,Qe.prototype.ra=function(){return this.da()},Qe.prototype.readEnum=Qe.prototype.ra,Qe.prototype.fa=function(q){var te=this.b,fe=this.a;q=fe+q;for(var Ue=[],pt="";fe<q;){var At=te[fe++];if(128>At)Ue.push(At);else{if(192>At)continue;if(224>At){var cr=te[fe++];Ue.push((At&31)<<6|cr&63)}else if(240>At){cr=te[fe++];var Hr=te[fe++];Ue.push((At&15)<<12|(cr&63)<<6|Hr&63)}else if(248>At){cr=te[fe++],Hr=te[fe++];var Yi=te[fe++];At=(At&7)<<18|(cr&63)<<12|(Hr&63)<<6|Yi&63,At-=65536,Ue.push((At>>10&1023)+55296,(At&1023)+56320)}}8192<=Ue.length&&(pt+=String.fromCharCode.apply(null,Ue),Ue.length=0)}return pt+=K(Ue),this.a=fe,pt},Qe.prototype.readString=Qe.prototype.fa,Qe.prototype.Dc=function(){var q=this.o();return this.fa(q)},Qe.prototype.readStringWithLength=Qe.prototype.Dc,Qe.prototype.qa=function(q){if(0>q||this.a+q>this.b.length)return this.v=!0,w("Invalid byte length!"),new Uint8Array(0);var te=this.b.subarray(this.a,this.a+q);return this.a+=q,T(this.a<=this.c),te},Qe.prototype.readBytes=Qe.prototype.qa,Qe.prototype.ia=function(){return this.w(be)},Qe.prototype.readVarintHash64=Qe.prototype.ia,Qe.prototype.$=function(){var q=this.b,te=this.a,fe=q[te],Ue=q[te+1],pt=q[te+2],At=q[te+3],cr=q[te+4],Hr=q[te+5],Yi=q[te+6];return q=q[te+7],this.a+=8,String.fromCharCode(fe,Ue,pt,At,cr,Hr,Yi,q)},Qe.prototype.readFixedHash64=Qe.prototype.$;function Xe(q,te,fe){this.a=Gt(q,te,fe),this.O=this.a.B(),this.b=this.c=-1,this.h=!1,this.v=null}f("jspb.BinaryReader",Xe,void 0);var Vt=[];Xe.clearInstanceCache=function(){Vt=[]},Xe.getInstanceCacheLength=function(){return Vt.length};function lr(q,te,fe){if(Vt.length){var Ue=Vt.pop();return q&&Ue.a.H(q,te,fe),Ue}return new Xe(q,te,fe)}Xe.alloc=lr,Xe.prototype.zb=lr,Xe.prototype.alloc=Xe.prototype.zb,Xe.prototype.Ca=function(){this.a.clear(),this.b=this.c=-1,this.h=!1,this.v=null,100>Vt.length&&Vt.push(this)},Xe.prototype.free=Xe.prototype.Ca,Xe.prototype.Fb=function(){return this.O},Xe.prototype.getFieldCursor=Xe.prototype.Fb,Xe.prototype.B=function(){return this.a.B()},Xe.prototype.getCursor=Xe.prototype.B,Xe.prototype.Y=function(){return this.a.Y()},Xe.prototype.getBuffer=Xe.prototype.Y,Xe.prototype.Hb=function(){return this.c},Xe.prototype.getFieldNumber=Xe.prototype.Hb,Xe.prototype.Lb=function(){return this.b},Xe.prototype.getWireType=Xe.prototype.Lb,Xe.prototype.Mb=function(){return this.b==2},Xe.prototype.isDelimited=Xe.prototype.Mb,Xe.prototype.bb=function(){return this.b==4},Xe.prototype.isEndGroup=Xe.prototype.bb,Xe.prototype.getError=function(){return this.h||this.a.getError()},Xe.prototype.getError=Xe.prototype.getError,Xe.prototype.H=function(q,te,fe){this.a.H(q,te,fe),this.b=this.c=-1},Xe.prototype.setBlock=Xe.prototype.H,Xe.prototype.reset=function(){this.a.reset(),this.b=this.c=-1},Xe.prototype.reset=Xe.prototype.reset,Xe.prototype.advance=function(q){this.a.advance(q)},Xe.prototype.advance=Xe.prototype.advance,Xe.prototype.oa=function(){if(this.a.ya())return!1;if(this.getError())return w("Decoder hit an error"),!1;this.O=this.a.B();var q=this.a.o(),te=q>>>3;return q&=7,q!=0&&q!=5&&q!=1&&q!=2&&q!=3&&q!=4?(w("Invalid wire type: %s (at position %s)",q,this.O),this.h=!0,!1):(this.c=te,this.b=q,!0)},Xe.prototype.nextField=Xe.prototype.oa,Xe.prototype.Oa=function(){this.a.mb(this.c<<3|this.b)},Xe.prototype.unskipHeader=Xe.prototype.Oa,Xe.prototype.Lc=function(){var q=this.c;for(this.Oa();this.oa()&&this.c==q;)this.C();this.a.ya()||this.Oa()},Xe.prototype.skipMatchingFields=Xe.prototype.Lc,Xe.prototype.lb=function(){this.b!=0?(w("Invalid wire type for skipVarintField"),this.C()):this.a.kb()},Xe.prototype.skipVarintField=Xe.prototype.lb,Xe.prototype.gb=function(){if(this.b!=2)w("Invalid wire type for skipDelimitedField"),this.C();else{var q=this.a.o();this.a.advance(q)}},Xe.prototype.skipDelimitedField=Xe.prototype.gb,Xe.prototype.hb=function(){this.b!=5?(w("Invalid wire type for skipFixed32Field"),this.C()):this.a.advance(4)},Xe.prototype.skipFixed32Field=Xe.prototype.hb,Xe.prototype.ib=function(){this.b!=1?(w("Invalid wire type for skipFixed64Field"),this.C()):this.a.advance(8)},Xe.prototype.skipFixed64Field=Xe.prototype.ib,Xe.prototype.jb=function(){var q=this.c;do{if(!this.oa()){w("Unmatched start-group tag: stream EOF"),this.h=!0;break}if(this.b==4){this.c!=q&&(w("Unmatched end-group tag"),this.h=!0);break}this.C()}while(!0)},Xe.prototype.skipGroup=Xe.prototype.jb,Xe.prototype.C=function(){switch(this.b){case 0:this.lb();break;case 1:this.ib();break;case 2:this.gb();break;case 5:this.hb();break;case 3:this.jb();break;default:w("Invalid wire encoding for field.")}},Xe.prototype.skipField=Xe.prototype.C,Xe.prototype.Hc=function(q,te){this.v===null&&(this.v={}),T(!this.v[q]),this.v[q]=te},Xe.prototype.registerReadCallback=Xe.prototype.Hc,Xe.prototype.Ic=function(q){return T(this.v!==null),q=this.v[q],T(q),q(this)},Xe.prototype.runReadCallback=Xe.prototype.Ic,Xe.prototype.Yb=function(q,te){T(this.b==2);var fe=this.a.c,Ue=this.a.o();Ue=this.a.B()+Ue,this.a.setEnd(Ue),te(q,this),this.a.Ma(Ue),this.a.setEnd(fe)},Xe.prototype.readMessage=Xe.prototype.Yb,Xe.prototype.Ub=function(q,te,fe){T(this.b==3),T(this.c==q),fe(te,this),this.h||this.b==4||(w("Group submessage did not end with an END_GROUP tag"),this.h=!0)},Xe.prototype.readGroup=Xe.prototype.Ub,Xe.prototype.Gb=function(){T(this.b==2);var q=this.a.o(),te=this.a.B(),fe=te+q;return q=Gt(this.a.Y(),te,q),this.a.Ma(fe),q},Xe.prototype.getFieldDecoder=Xe.prototype.Gb,Xe.prototype.P=function(){return T(this.b==0),this.a.da()},Xe.prototype.readInt32=Xe.prototype.P,Xe.prototype.Wb=function(){return T(this.b==0),this.a.Ea()},Xe.prototype.readInt32String=Xe.prototype.Wb,Xe.prototype.ba=function(){return T(this.b==0),this.a.sa()},Xe.prototype.readInt64=Xe.prototype.ba,Xe.prototype.ca=function(){return T(this.b==0),this.a.Fa()},Xe.prototype.readInt64String=Xe.prototype.ca,Xe.prototype.m=function(){return T(this.b==0),this.a.o()},Xe.prototype.readUint32=Xe.prototype.m,Xe.prototype.Fc=function(){return T(this.b==0),this.a.O()},Xe.prototype.readUint32String=Xe.prototype.Fc,Xe.prototype.ga=function(){return T(this.b==0),this.a.Ga()},Xe.prototype.readUint64=Xe.prototype.ga,Xe.prototype.ha=function(){return T(this.b==0),this.a.Ha()},Xe.prototype.readUint64String=Xe.prototype.ha,Xe.prototype.zc=function(){return T(this.b==0),this.a.Ia()},Xe.prototype.readSint32=Xe.prototype.zc,Xe.prototype.Ac=function(){return T(this.b==0),this.a.Ja()},Xe.prototype.readSint64=Xe.prototype.Ac,Xe.prototype.Bc=function(){return T(this.b==0),this.a.Ka()},Xe.prototype.readSint64String=Xe.prototype.Bc,Xe.prototype.Rb=function(){return T(this.b==5),this.a.m()},Xe.prototype.readFixed32=Xe.prototype.Rb,Xe.prototype.Sb=function(){return T(this.b==1),this.a.ga()},Xe.prototype.readFixed64=Xe.prototype.Sb,Xe.prototype.Tb=function(){return T(this.b==1),this.a.ha()},Xe.prototype.readFixed64String=Xe.prototype.Tb,Xe.prototype.vc=function(){return T(this.b==5),this.a.P()},Xe.prototype.readSfixed32=Xe.prototype.vc,Xe.prototype.wc=function(){return T(this.b==5),this.a.P().toString()},Xe.prototype.readSfixed32String=Xe.prototype.wc,Xe.prototype.xc=function(){return T(this.b==1),this.a.ba()},Xe.prototype.readSfixed64=Xe.prototype.xc,Xe.prototype.yc=function(){return T(this.b==1),this.a.ca()},Xe.prototype.readSfixed64String=Xe.prototype.yc,Xe.prototype.aa=function(){return T(this.b==5),this.a.aa()},Xe.prototype.readFloat=Xe.prototype.aa,Xe.prototype.Z=function(){return T(this.b==1),this.a.Z()},Xe.prototype.readDouble=Xe.prototype.Z,Xe.prototype.pa=function(){return T(this.b==0),!!this.a.o()},Xe.prototype.readBool=Xe.prototype.pa,Xe.prototype.ra=function(){return T(this.b==0),this.a.sa()},Xe.prototype.readEnum=Xe.prototype.ra,Xe.prototype.fa=function(){T(this.b==2);var q=this.a.o();return this.a.fa(q)},Xe.prototype.readString=Xe.prototype.fa,Xe.prototype.qa=function(){T(this.b==2);var q=this.a.o();return this.a.qa(q)},Xe.prototype.readBytes=Xe.prototype.qa,Xe.prototype.ia=function(){return T(this.b==0),this.a.ia()},Xe.prototype.readVarintHash64=Xe.prototype.ia,Xe.prototype.Cc=function(){return T(this.b==0),this.a.fb()},Xe.prototype.readSintHash64=Xe.prototype.Cc,Xe.prototype.w=function(q){return T(this.b==0),this.a.w(q)},Xe.prototype.readSplitVarint64=Xe.prototype.w,Xe.prototype.ea=function(q){return T(this.b==0),this.a.w(function(te,fe){return ve(te,fe,q)})},Xe.prototype.readSplitZigzagVarint64=Xe.prototype.ea,Xe.prototype.$=function(){return T(this.b==1),this.a.$()},Xe.prototype.readFixedHash64=Xe.prototype.$,Xe.prototype.ta=function(q){return T(this.b==1),this.a.ta(q)},Xe.prototype.readSplitFixed64=Xe.prototype.ta;function Jt(q,te){T(q.b==2);var fe=q.a.o();fe=q.a.B()+fe;for(var Ue=[];q.a.B()<fe;)Ue.push(te.call(q.a));return Ue}Xe.prototype.gc=function(){return Jt(this,this.a.da)},Xe.prototype.readPackedInt32=Xe.prototype.gc,Xe.prototype.hc=function(){return Jt(this,this.a.Ea)},Xe.prototype.readPackedInt32String=Xe.prototype.hc,Xe.prototype.ic=function(){return Jt(this,this.a.sa)},Xe.prototype.readPackedInt64=Xe.prototype.ic,Xe.prototype.jc=function(){return Jt(this,this.a.Fa)},Xe.prototype.readPackedInt64String=Xe.prototype.jc,Xe.prototype.qc=function(){return Jt(this,this.a.o)},Xe.prototype.readPackedUint32=Xe.prototype.qc,Xe.prototype.rc=function(){return Jt(this,this.a.O)},Xe.prototype.readPackedUint32String=Xe.prototype.rc,Xe.prototype.sc=function(){return Jt(this,this.a.Ga)},Xe.prototype.readPackedUint64=Xe.prototype.sc,Xe.prototype.tc=function(){return Jt(this,this.a.Ha)},Xe.prototype.readPackedUint64String=Xe.prototype.tc,Xe.prototype.nc=function(){return Jt(this,this.a.Ia)},Xe.prototype.readPackedSint32=Xe.prototype.nc,Xe.prototype.oc=function(){return Jt(this,this.a.Ja)},Xe.prototype.readPackedSint64=Xe.prototype.oc,Xe.prototype.pc=function(){return Jt(this,this.a.Ka)},Xe.prototype.readPackedSint64String=Xe.prototype.pc,Xe.prototype.bc=function(){return Jt(this,this.a.m)},Xe.prototype.readPackedFixed32=Xe.prototype.bc,Xe.prototype.cc=function(){return Jt(this,this.a.ga)},Xe.prototype.readPackedFixed64=Xe.prototype.cc,Xe.prototype.dc=function(){return Jt(this,this.a.ha)},Xe.prototype.readPackedFixed64String=Xe.prototype.dc,Xe.prototype.kc=function(){return Jt(this,this.a.P)},Xe.prototype.readPackedSfixed32=Xe.prototype.kc,Xe.prototype.lc=function(){return Jt(this,this.a.ba)},Xe.prototype.readPackedSfixed64=Xe.prototype.lc,Xe.prototype.mc=function(){return Jt(this,this.a.ca)},Xe.prototype.readPackedSfixed64String=Xe.prototype.mc,Xe.prototype.fc=function(){return Jt(this,this.a.aa)},Xe.prototype.readPackedFloat=Xe.prototype.fc,Xe.prototype.$b=function(){return Jt(this,this.a.Z)},Xe.prototype.readPackedDouble=Xe.prototype.$b,Xe.prototype.Zb=function(){return Jt(this,this.a.pa)},Xe.prototype.readPackedBool=Xe.prototype.Zb,Xe.prototype.ac=function(){return Jt(this,this.a.ra)},Xe.prototype.readPackedEnum=Xe.prototype.ac,Xe.prototype.uc=function(){return Jt(this,this.a.ia)},Xe.prototype.readPackedVarintHash64=Xe.prototype.uc,Xe.prototype.ec=function(){return Jt(this,this.a.$)},Xe.prototype.readPackedFixedHash64=Xe.prototype.ec;function kr(q,te,fe,Ue,pt){this.ma=q,this.Ba=te,this.la=fe,this.Na=Ue,this.na=pt}f("jspb.ExtensionFieldInfo",kr,void 0);function qt(q,te,fe,Ue,pt,At){this.Za=q,this.za=te,this.Aa=fe,this.Wa=Ue,this.Ab=pt,this.Nb=At}f("jspb.ExtensionFieldBinaryInfo",qt,void 0),kr.prototype.F=function(){return!!this.la},kr.prototype.isMessageType=kr.prototype.F;function zt(){}f("jspb.Message",zt,void 0),zt.GENERATE_TO_OBJECT=!0,zt.GENERATE_FROM_OBJECT=!0;var jr=typeof Uint8Array=="function";zt.prototype.Ib=function(){return this.b},zt.prototype.getJsPbMessageId=zt.prototype.Ib,zt.initialize=function(q,te,fe,Ue,pt,At){q.f=null,te||(te=fe?[fe]:[]),q.b=fe?String(fe):void 0,q.D=fe===0?-1:0,q.u=te;e:{if(fe=q.u.length,te=-1,fe&&(te=fe-1,fe=q.u[te],!(fe===null||typeof fe!="object"||Array.isArray(fe)||jr&&fe instanceof Uint8Array))){q.G=te-q.D,q.i=fe;break e}-1<Ue?(q.G=Math.max(Ue,te+1-q.D),q.i=null):q.G=Number.MAX_VALUE}if(q.a={},pt)for(Ue=0;Ue<pt.length;Ue++)te=pt[Ue],te<q.G?(te+=q.D,q.u[te]=q.u[te]||Be):(Ge(q),q.i[te]=q.i[te]||Be);if(At&&At.length)for(Ue=0;Ue<At.length;Ue++)Dn(q,At[Ue])};var Be=Object.freeze?Object.freeze([]):[];function Ge(q){var te=q.G+q.D;q.u[te]||(q.i=q.u[te]={})}function ut(q,te,fe){for(var Ue=[],pt=0;pt<q.length;pt++)Ue[pt]=te.call(q[pt],fe,q[pt]);return Ue}zt.toObjectList=ut,zt.toObjectExtension=function(q,te,fe,Ue,pt){for(var At in fe){var cr=fe[At],Hr=Ue.call(q,cr);if(Hr!=null){for(var Yi in cr.Ba)if(cr.Ba.hasOwnProperty(Yi))break;te[Yi]=cr.Na?cr.na?ut(Hr,cr.Na,pt):cr.Na(pt,Hr):Hr}}},zt.serializeBinaryExtensions=function(q,te,fe,Ue){for(var pt in fe){var At=fe[pt],cr=At.Za;if(!At.Aa)throw Error("Message extension present that was generated without binary serialization support");var Hr=Ue.call(q,cr);if(Hr!=null)if(cr.F())if(At.Wa)At.Aa.call(te,cr.ma,Hr,At.Wa);else throw Error("Message extension present holding submessage without binary support enabled, and message is being serialized to binary format");else At.Aa.call(te,cr.ma,Hr)}},zt.readBinaryExtension=function(q,te,fe,Ue,pt){var At=fe[te.c];if(At){if(fe=At.Za,!At.za)throw Error("Deserializing extension whose generated code does not support binary format");if(fe.F()){var cr=new fe.la;At.za.call(te,cr,At.Ab)}else cr=At.za.call(te);fe.na&&!At.Nb?(te=Ue.call(q,fe))?te.push(cr):pt.call(q,fe,[cr]):pt.call(q,fe,cr)}else te.C()};function Pt(q,te){if(te<q.G){te+=q.D;var fe=q.u[te];return fe===Be?q.u[te]=[]:fe}if(q.i)return fe=q.i[te],fe===Be?q.i[te]=[]:fe}zt.getField=Pt,zt.getRepeatedField=function(q,te){return Pt(q,te)};function Qt(q,te){return q=Pt(q,te),q==null?q:+q}zt.getOptionalFloatingPointField=Qt;function wr(q,te){return q=Pt(q,te),q==null?q:!!q}zt.getBooleanField=wr,zt.getRepeatedFloatingPointField=function(q,te){var fe=Pt(q,te);if(q.a||(q.a={}),!q.a[te]){for(var Ue=0;Ue<fe.length;Ue++)fe[Ue]=+fe[Ue];q.a[te]=!0}return fe},zt.getRepeatedBooleanField=function(q,te){var fe=Pt(q,te);if(q.a||(q.a={}),!q.a[te]){for(var Ue=0;Ue<fe.length;Ue++)fe[Ue]=!!fe[Ue];q.a[te]=!0}return fe};function Xr(q){return q==null||typeof q=="string"?q:jr&&q instanceof Uint8Array?Z(q):(w("Cannot coerce to b64 string: "+h(q)),null)}zt.bytesAsB64=Xr;function pi(q){return q==null||q instanceof Uint8Array?q:typeof q=="string"?ee(q):(w("Cannot coerce to Uint8Array: "+h(q)),null)}zt.bytesAsU8=pi,zt.bytesListAsB64=function(q){return Qr(q),q.length&&typeof q[0]!="string"?S(q,Xr):q},zt.bytesListAsU8=function(q){return Qr(q),!q.length||q[0]instanceof Uint8Array?q:S(q,pi)};function Qr(q){if(q&&1<q.length){var te=h(q[0]);b(q,function(fe){h(fe)!=te&&w("Inconsistent type in JSPB repeated field array. Got "+h(fe)+" expected "+te)})}}function Ur(q,te,fe){return q=Pt(q,te),q??fe}zt.getFieldWithDefault=Ur,zt.getBooleanFieldWithDefault=function(q,te,fe){return q=wr(q,te),q??fe},zt.getFloatingPointFieldWithDefault=function(q,te,fe){return q=Qt(q,te),q??fe},zt.getFieldProto3=Ur,zt.getMapField=function(q,te,fe,Ue){if(q.f||(q.f={}),te in q.f)return q.f[te];var pt=Pt(q,te);if(!pt){if(fe)return;pt=[],ci(q,te,pt)}return q.f[te]=new D(pt,Ue)};function ci(q,te,fe){return L(q,zt),te<q.G?q.u[te+q.D]=fe:(Ge(q),q.i[te]=fe),q}zt.setField=ci,zt.setProto3IntField=function(q,te,fe){return Xt(q,te,fe,0)},zt.setProto3FloatField=function(q,te,fe){return Xt(q,te,fe,0)},zt.setProto3BooleanField=function(q,te,fe){return Xt(q,te,fe,!1)},zt.setProto3StringField=function(q,te,fe){return Xt(q,te,fe,"")},zt.setProto3BytesField=function(q,te,fe){return Xt(q,te,fe,"")},zt.setProto3EnumField=function(q,te,fe){return Xt(q,te,fe,0)},zt.setProto3StringIntField=function(q,te,fe){return Xt(q,te,fe,"0")};function Xt(q,te,fe,Ue){return L(q,zt),fe!==Ue?ci(q,te,fe):te<q.G?q.u[te+q.D]=null:(Ge(q),delete q.i[te]),q}zt.addToRepeatedField=function(q,te,fe,Ue){return L(q,zt),te=Pt(q,te),Ue!=null?te.splice(Ue,0,fe):te.push(fe),q};function Ui(q,te,fe,Ue){return L(q,zt),(fe=Dn(q,fe))&&fe!==te&&Ue!==void 0&&(q.f&&fe in q.f&&(q.f[fe]=void 0),ci(q,fe,void 0)),ci(q,te,Ue)}zt.setOneofField=Ui;function Dn(q,te){for(var fe,Ue,pt=0;pt<te.length;pt++){var At=te[pt],cr=Pt(q,At);cr!=null&&(fe=At,Ue=cr,ci(q,At,void 0))}return fe?(ci(q,fe,Ue),fe):0}zt.computeOneofCase=Dn,zt.getWrapperField=function(q,te,fe,Ue){if(q.f||(q.f={}),!q.f[fe]){var pt=Pt(q,fe);(Ue||pt)&&(q.f[fe]=new te(pt))}return q.f[fe]},zt.getRepeatedWrapperField=function(q,te,fe){return Kr(q,te,fe),te=q.f[fe],te==Be&&(te=q.f[fe]=[]),te};function Kr(q,te,fe){if(q.f||(q.f={}),!q.f[fe]){for(var Ue=Pt(q,fe),pt=[],At=0;At<Ue.length;At++)pt[At]=new te(Ue[At]);q.f[fe]=pt}}zt.setWrapperField=function(q,te,fe){L(q,zt),q.f||(q.f={});var Ue=fe&&fe.g();return q.f[te]=fe,ci(q,te,Ue)},zt.setOneofWrapperField=function(q,te,fe,Ue){L(q,zt),q.f||(q.f={});var pt=Ue&&Ue.g();return q.f[te]=Ue,Ui(q,te,fe,pt)},zt.setRepeatedWrapperField=function(q,te,fe){L(q,zt),q.f||(q.f={}),fe=fe||[];for(var Ue=[],pt=0;pt<fe.length;pt++)Ue[pt]=fe[pt].g();return q.f[te]=fe,ci(q,te,Ue)},zt.addToRepeatedWrapperField=function(q,te,fe,Ue,pt){Kr(q,Ue,te);var At=q.f[te];return At||(At=q.f[te]=[]),fe=fe||new Ue,q=Pt(q,te),pt!=null?(At.splice(pt,0,fe),q.splice(pt,0,fe.g())):(At.push(fe),q.push(fe.g())),fe},zt.toMap=function(q,te,fe,Ue){for(var pt={},At=0;At<q.length;At++)pt[te.call(q[At])]=fe?fe.call(q[At],Ue,q[At]):q[At];return pt};function In(q){if(q.f)for(var te in q.f){var fe=q.f[te];if(Array.isArray(fe))for(var Ue=0;Ue<fe.length;Ue++)fe[Ue]&&fe[Ue].g();else fe&&fe.g()}}zt.prototype.g=function(){return In(this),this.u},zt.prototype.toArray=zt.prototype.g,zt.prototype.toString=function(){return In(this),this.u.toString()},zt.prototype.getExtension=function(q){if(this.i){this.f||(this.f={});var te=q.ma;if(q.na){if(q.F())return this.f[te]||(this.f[te]=S(this.i[te]||[],function(fe){return new q.la(fe)})),this.f[te]}else if(q.F())return!this.f[te]&&this.i[te]&&(this.f[te]=new q.la(this.i[te])),this.f[te];return this.i[te]}},zt.prototype.getExtension=zt.prototype.getExtension,zt.prototype.Kc=function(q,te){this.f||(this.f={}),Ge(this);var fe=q.ma;return q.na?(te=te||[],q.F()?(this.f[fe]=te,this.i[fe]=S(te,function(Ue){return Ue.g()})):this.i[fe]=te):q.F()?(this.f[fe]=te,this.i[fe]=te&&te.g()):this.i[fe]=te,this},zt.prototype.setExtension=zt.prototype.Kc,zt.difference=function(q,te){if(!(q instanceof te.constructor))throw Error("Messages have different types.");var fe=q.g();te=te.g();var Ue=[],pt=0,At=fe.length>te.length?fe.length:te.length;for(q.b&&(Ue[0]=q.b,pt=1);pt<At;pt++)vt(fe[pt],te[pt])||(Ue[pt]=te[pt]);return new q.constructor(Ue)},zt.equals=function(q,te){return q==te||!(!q||!te)&&q instanceof te.constructor&&vt(q.g(),te.g())};function fn(q,te){q=q||{},te=te||{};var fe={},Ue;for(Ue in q)fe[Ue]=0;for(Ue in te)fe[Ue]=0;for(Ue in fe)if(!vt(q[Ue],te[Ue]))return!1;return!0}zt.compareExtensions=fn;function vt(q,te){if(q==te)return!0;if(!p(q)||!p(te))return typeof q=="number"&&isNaN(q)||typeof te=="number"&&isNaN(te)?String(q)==String(te):!1;if(q.constructor!=te.constructor)return!1;if(jr&&q.constructor===Uint8Array){if(q.length!=te.length)return!1;for(var fe=0;fe<q.length;fe++)if(q[fe]!=te[fe])return!1;return!0}if(q.constructor===Array){var Ue=void 0,pt=void 0,At=Math.max(q.length,te.length);for(fe=0;fe<At;fe++){var cr=q[fe],Hr=te[fe];if(cr&&cr.constructor==Object&&(T(Ue===void 0),T(fe===q.length-1),Ue=cr,cr=void 0),Hr&&Hr.constructor==Object&&(T(pt===void 0),T(fe===te.length-1),pt=Hr,Hr=void 0),!vt(cr,Hr))return!1}return Ue||pt?(Ue=Ue||{},pt=pt||{},fn(Ue,pt)):!0}if(q.constructor===Object)return fn(q,te);throw Error("Invalid type in JSPB array")}zt.compareFields=vt,zt.prototype.Bb=function(){return dr(this)},zt.prototype.cloneMessage=zt.prototype.Bb,zt.prototype.clone=function(){return dr(this)},zt.prototype.clone=zt.prototype.clone,zt.clone=function(q){return dr(q)};function dr(q){return new q.constructor(ue(q.g()))}zt.copyInto=function(q,te){L(q,zt),L(te,zt),T(q.constructor==te.constructor,"Copy source and target message should have the same type."),q=dr(q);for(var fe=te.g(),Ue=q.g(),pt=fe.length=0;pt<Ue.length;pt++)fe[pt]=Ue[pt];te.f=q.f,te.i=q.i};function ue(q){if(Array.isArray(q)){for(var te=Array(q.length),fe=0;fe<q.length;fe++){var Ue=q[fe];Ue!=null&&(te[fe]=typeof Ue=="object"?ue(T(Ue)):Ue)}return te}if(jr&&q instanceof Uint8Array)return new Uint8Array(q);te={};for(fe in q)Ue=q[fe],Ue!=null&&(te[fe]=typeof Ue=="object"?ue(T(Ue)):Ue);return te}zt.registerMessageType=function(q,te){te.we=q};var ar={dump:function(q){return L(q,zt,"jspb.Message instance expected"),T(q.getExtension,"Only unobfuscated and unoptimized compilation modes supported."),ar.X(q)}};f("jspb.debug.dump",ar.dump,void 0),ar.X=function(q){var te=h(q);if(te=="number"||te=="string"||te=="boolean"||te=="null"||te=="undefined"||typeof Uint8Array<"u"&&q instanceof Uint8Array)return q;if(te=="array")return A(q),S(q,ar.X);if(q instanceof D){var fe={};q=q.entries();for(var Ue=q.next();!Ue.done;Ue=q.next())fe[Ue.value[0]]=ar.X(Ue.value[1]);return fe}L(q,zt,"Only messages expected: "+q),te=q.constructor;var pt={$name:te.name||te.displayName};for(Hr in te.prototype){var At=/^get([A-Z]\w*)/.exec(Hr);if(At&&Hr!="getExtension"&&Hr!="getJsPbMessageId"){var cr="has"+At[1];(!q[cr]||q[cr]())&&(cr=q[Hr](),pt[ar.$a(At[1])]=ar.X(cr))}}if(q.extensionObject_)return pt.$extensions="Recursive dumping of extensions not supported in compiled code. Switch to uncompiled or dump extension object directly",pt;for(Ue in te.extensions)if(/^\d+$/.test(Ue)){cr=te.extensions[Ue];var Hr=q.getExtension(cr);At=void 0,cr=cr.Ba;var Yi=[],Fn=0;for(At in cr)Yi[Fn++]=At;At=Yi[0],Hr!=null&&(fe||(fe=pt.$extensions={}),fe[ar.$a(At)]=ar.X(Hr))}return pt},ar.$a=function(q){return q.replace(/^[A-Z]/,function(te){return te.toLowerCase()})};function Bt(){this.a=[]}f("jspb.BinaryEncoder",Bt,void 0),Bt.prototype.length=function(){return this.a.length},Bt.prototype.length=Bt.prototype.length,Bt.prototype.end=function(){var q=this.a;return this.a=[],q},Bt.prototype.end=Bt.prototype.end,Bt.prototype.l=function(q,te){for(T(q==Math.floor(q)),T(te==Math.floor(te)),T(0<=q&&4294967296>q),T(0<=te&&4294967296>te);0<te||127<q;)this.a.push(q&127|128),q=(q>>>7|te<<25)>>>0,te>>>=7;this.a.push(q)},Bt.prototype.writeSplitVarint64=Bt.prototype.l,Bt.prototype.A=function(q,te){T(q==Math.floor(q)),T(te==Math.floor(te)),T(0<=q&&4294967296>q),T(0<=te&&4294967296>te),this.s(q),this.s(te)},Bt.prototype.writeSplitFixed64=Bt.prototype.A,Bt.prototype.j=function(q){for(T(q==Math.floor(q)),T(0<=q&&4294967296>q);127<q;)this.a.push(q&127|128),q>>>=7;this.a.push(q)},Bt.prototype.writeUnsignedVarint32=Bt.prototype.j,Bt.prototype.M=function(q){if(T(q==Math.floor(q)),T(-2147483648<=q&&2147483648>q),0<=q)this.j(q);else{for(var te=0;9>te;te++)this.a.push(q&127|128),q>>=7;this.a.push(1)}},Bt.prototype.writeSignedVarint32=Bt.prototype.M,Bt.prototype.va=function(q){T(q==Math.floor(q)),T(0<=q&&18446744073709552e3>q),De(q),this.l(pe,_e)},Bt.prototype.writeUnsignedVarint64=Bt.prototype.va,Bt.prototype.ua=function(q){T(q==Math.floor(q)),T(-9223372036854776e3<=q&&9223372036854776e3>q),De(q),this.l(pe,_e)},Bt.prototype.writeSignedVarint64=Bt.prototype.ua,Bt.prototype.wa=function(q){T(q==Math.floor(q)),T(-2147483648<=q&&2147483648>q),this.j((q<<1^q>>31)>>>0)},Bt.prototype.writeZigzagVarint32=Bt.prototype.wa,Bt.prototype.xa=function(q){T(q==Math.floor(q)),T(-9223372036854776e3<=q&&9223372036854776e3>q),Pe(q),this.l(pe,_e)},Bt.prototype.writeZigzagVarint64=Bt.prototype.xa,Bt.prototype.Ta=function(q){this.W(St(q))},Bt.prototype.writeZigzagVarint64String=Bt.prototype.Ta,Bt.prototype.W=function(q){var te=this;je(q),We(pe,_e,function(fe,Ue){te.l(fe>>>0,Ue>>>0)})},Bt.prototype.writeZigzagVarintHash64=Bt.prototype.W,Bt.prototype.be=function(q){T(q==Math.floor(q)),T(0<=q&&256>q),this.a.push(q>>>0&255)},Bt.prototype.writeUint8=Bt.prototype.be,Bt.prototype.ae=function(q){T(q==Math.floor(q)),T(0<=q&&65536>q),this.a.push(q>>>0&255),this.a.push(q>>>8&255)},Bt.prototype.writeUint16=Bt.prototype.ae,Bt.prototype.s=function(q){T(q==Math.floor(q)),T(0<=q&&4294967296>q),this.a.push(q>>>0&255),this.a.push(q>>>8&255),this.a.push(q>>>16&255),this.a.push(q>>>24&255)},Bt.prototype.writeUint32=Bt.prototype.s,Bt.prototype.V=function(q){T(q==Math.floor(q)),T(0<=q&&18446744073709552e3>q),Te(q),this.s(pe),this.s(_e)},Bt.prototype.writeUint64=Bt.prototype.V,Bt.prototype.Qc=function(q){T(q==Math.floor(q)),T(-128<=q&&128>q),this.a.push(q>>>0&255)},Bt.prototype.writeInt8=Bt.prototype.Qc,Bt.prototype.Pc=function(q){T(q==Math.floor(q)),T(-32768<=q&&32768>q),this.a.push(q>>>0&255),this.a.push(q>>>8&255)},Bt.prototype.writeInt16=Bt.prototype.Pc,Bt.prototype.S=function(q){T(q==Math.floor(q)),T(-2147483648<=q&&2147483648>q),this.a.push(q>>>0&255),this.a.push(q>>>8&255),this.a.push(q>>>16&255),this.a.push(q>>>24&255)},Bt.prototype.writeInt32=Bt.prototype.S,Bt.prototype.T=function(q){T(q==Math.floor(q)),T(-9223372036854776e3<=q&&9223372036854776e3>q),De(q),this.A(pe,_e)},Bt.prototype.writeInt64=Bt.prototype.T,Bt.prototype.ka=function(q){T(q==Math.floor(q)),T(-9223372036854776e3<=+q&&9223372036854776e3>+q),je(St(q)),this.A(pe,_e)},Bt.prototype.writeInt64String=Bt.prototype.ka,Bt.prototype.L=function(q){T(q===1/0||q===-1/0||isNaN(q)||-34028234663852886e22<=q&&34028234663852886e22>=q),Ee(q),this.s(pe)},Bt.prototype.writeFloat=Bt.prototype.L,Bt.prototype.J=function(q){T(q===1/0||q===-1/0||isNaN(q)||-17976931348623157e292<=q&&17976931348623157e292>=q),Re(q),this.s(pe),this.s(_e)},Bt.prototype.writeDouble=Bt.prototype.J,Bt.prototype.I=function(q){T(typeof q=="boolean"||typeof q=="number"),this.a.push(q?1:0)},Bt.prototype.writeBool=Bt.prototype.I,Bt.prototype.R=function(q){T(q==Math.floor(q)),T(-2147483648<=q&&2147483648>q),this.M(q)},Bt.prototype.writeEnum=Bt.prototype.R,Bt.prototype.ja=function(q){this.a.push.apply(this.a,q)},Bt.prototype.writeBytes=Bt.prototype.ja,Bt.prototype.N=function(q){je(q),this.l(pe,_e)},Bt.prototype.writeVarintHash64=Bt.prototype.N,Bt.prototype.K=function(q){je(q),this.s(pe),this.s(_e)},Bt.prototype.writeFixedHash64=Bt.prototype.K,Bt.prototype.U=function(q){var te=this.a.length;x(q);for(var fe=0;fe<q.length;fe++){var Ue=q.charCodeAt(fe);if(128>Ue)this.a.push(Ue);else if(2048>Ue)this.a.push(Ue>>6|192),this.a.push(Ue&63|128);else if(65536>Ue)if(55296<=Ue&&56319>=Ue&&fe+1<q.length){var pt=q.charCodeAt(fe+1);56320<=pt&&57343>=pt&&(Ue=1024*(Ue-55296)+pt-56320+65536,this.a.push(Ue>>18|240),this.a.push(Ue>>12&63|128),this.a.push(Ue>>6&63|128),this.a.push(Ue&63|128),fe++)}else this.a.push(Ue>>12|224),this.a.push(Ue>>6&63|128),this.a.push(Ue&63|128)}return this.a.length-te},Bt.prototype.writeString=Bt.prototype.U;function Ar(q,te){this.lo=q,this.hi=te}f("jspb.arith.UInt64",Ar,void 0),Ar.prototype.cmp=function(q){return this.hi<q.hi||this.hi==q.hi&&this.lo<q.lo?-1:this.hi==q.hi&&this.lo==q.lo?0:1},Ar.prototype.cmp=Ar.prototype.cmp,Ar.prototype.La=function(){return new Ar((this.lo>>>1|(this.hi&1)<<31)>>>0,this.hi>>>1>>>0)},Ar.prototype.rightShift=Ar.prototype.La,Ar.prototype.Da=function(){return new Ar(this.lo<<1>>>0,(this.hi<<1|this.lo>>>31)>>>0)},Ar.prototype.leftShift=Ar.prototype.Da,Ar.prototype.cb=function(){return!!(this.hi&2147483648)},Ar.prototype.msb=Ar.prototype.cb,Ar.prototype.Ob=function(){return!!(this.lo&1)},Ar.prototype.lsb=Ar.prototype.Ob,Ar.prototype.Ua=function(){return this.lo==0&&this.hi==0},Ar.prototype.zero=Ar.prototype.Ua,Ar.prototype.add=function(q){return new Ar((this.lo+q.lo&4294967295)>>>0>>>0,((this.hi+q.hi&4294967295)>>>0)+(4294967296<=this.lo+q.lo?1:0)>>>0)},Ar.prototype.add=Ar.prototype.add,Ar.prototype.sub=function(q){return new Ar((this.lo-q.lo&4294967295)>>>0>>>0,((this.hi-q.hi&4294967295)>>>0)-(0>this.lo-q.lo?1:0)>>>0)},Ar.prototype.sub=Ar.prototype.sub;function br(q,te){var fe=q&65535;q>>>=16;var Ue=te&65535,pt=te>>>16;for(te=fe*Ue+65536*(fe*pt&65535)+65536*(q*Ue&65535),fe=q*pt+(fe*pt>>>16)+(q*Ue>>>16);4294967296<=te;)te-=4294967296,fe+=1;return new Ar(te>>>0,fe>>>0)}Ar.mul32x32=br,Ar.prototype.eb=function(q){var te=br(this.lo,q);return q=br(this.hi,q),q.hi=q.lo,q.lo=0,te.add(q)},Ar.prototype.mul=Ar.prototype.eb,Ar.prototype.Xa=function(q){if(q==0)return[];var te=new Ar(0,0),fe=new Ar(this.lo,this.hi);q=new Ar(q,0);for(var Ue=new Ar(1,0);!q.cb();)q=q.Da(),Ue=Ue.Da();for(;!Ue.Ua();)0>=q.cmp(fe)&&(te=te.add(Ue),fe=fe.sub(q)),q=q.La(),Ue=Ue.La();return[te,fe]},Ar.prototype.div=Ar.prototype.Xa,Ar.prototype.toString=function(){for(var q="",te=this;!te.Ua();){te=te.Xa(10);var fe=te[0];q=te[1].lo+q,te=fe}return q==""&&(q="0"),q},Ar.prototype.toString=Ar.prototype.toString;function Br(q){for(var te=new Ar(0,0),fe=new Ar(0,0),Ue=0;Ue<q.length;Ue++){if("0">q[Ue]||"9"<q[Ue])return null;fe.lo=parseInt(q[Ue],10),te=te.eb(10).add(fe)}return te}Ar.fromString=Br,Ar.prototype.clone=function(){return new Ar(this.lo,this.hi)},Ar.prototype.clone=Ar.prototype.clone;function ai(q,te){this.lo=q,this.hi=te}f("jspb.arith.Int64",ai,void 0),ai.prototype.add=function(q){return new ai((this.lo+q.lo&4294967295)>>>0>>>0,((this.hi+q.hi&4294967295)>>>0)+(4294967296<=this.lo+q.lo?1:0)>>>0)},ai.prototype.add=ai.prototype.add,ai.prototype.sub=function(q){return new ai((this.lo-q.lo&4294967295)>>>0>>>0,((this.hi-q.hi&4294967295)>>>0)-(0>this.lo-q.lo?1:0)>>>0)},ai.prototype.sub=ai.prototype.sub,ai.prototype.clone=function(){return new ai(this.lo,this.hi)},ai.prototype.clone=ai.prototype.clone,ai.prototype.toString=function(){var q=(this.hi&2147483648)!=0,te=new Ar(this.lo,this.hi);return q&&(te=new Ar(0,0).sub(te)),(q?"-":"")+te.toString()},ai.prototype.toString=ai.prototype.toString;function Nn(q){var te=0<q.length&&q[0]=="-";return te&&(q=q.substring(1)),q=Br(q),q===null?null:(te&&(q=new Ar(0,0).sub(q)),new ai(q.lo,q.hi))}ai.fromString=Nn;function nt(){this.c=[],this.b=0,this.a=new Bt,this.h=[]}f("jspb.BinaryWriter",nt,void 0);function _o(q,te){var fe=q.a.end();q.c.push(fe),q.c.push(te),q.b+=fe.length+te.length}function si(q,te){return rr(q,te,2),te=q.a.end(),q.c.push(te),q.b+=te.length,te.push(q.b),te}function ti(q,te){var fe=te.pop();for(fe=q.b+q.a.length()-fe,T(0<=fe);127<fe;)te.push(fe&127|128),fe>>>=7,q.b++;te.push(fe),q.b++}nt.prototype.pb=function(q,te,fe){_o(this,q.subarray(te,fe))},nt.prototype.writeSerializedMessage=nt.prototype.pb,nt.prototype.Pb=function(q,te,fe){q!=null&&te!=null&&fe!=null&&this.pb(q,te,fe)},nt.prototype.maybeWriteSerializedMessage=nt.prototype.Pb,nt.prototype.reset=function(){this.c=[],this.a.end(),this.b=0,this.h=[]},nt.prototype.reset=nt.prototype.reset,nt.prototype.ab=function(){T(this.h.length==0);for(var q=new Uint8Array(this.b+this.a.length()),te=this.c,fe=te.length,Ue=0,pt=0;pt<fe;pt++){var At=te[pt];q.set(At,Ue),Ue+=At.length}return te=this.a.end(),q.set(te,Ue),Ue+=te.length,T(Ue==q.length),this.c=[q],q},nt.prototype.getResultBuffer=nt.prototype.ab,nt.prototype.Kb=function(q){return Z(this.ab(),q)},nt.prototype.getResultBase64String=nt.prototype.Kb,nt.prototype.Va=function(q){this.h.push(si(this,q))},nt.prototype.beginSubMessage=nt.prototype.Va,nt.prototype.Ya=function(){T(0<=this.h.length),ti(this,this.h.pop())},nt.prototype.endSubMessage=nt.prototype.Ya;function rr(q,te,fe){T(1<=te&&te==Math.floor(te)),q.a.j(8*te+fe)}nt.prototype.Nc=function(q,te,fe){switch(q){case 1:this.J(te,fe);break;case 2:this.L(te,fe);break;case 3:this.T(te,fe);break;case 4:this.V(te,fe);break;case 5:this.S(te,fe);break;case 6:this.Qa(te,fe);break;case 7:this.Pa(te,fe);break;case 8:this.I(te,fe);break;case 9:this.U(te,fe);break;case 10:w("Group field type not supported in writeAny()");break;case 11:w("Message field type not supported in writeAny()");break;case 12:this.ja(te,fe);break;case 13:this.s(te,fe);break;case 14:this.R(te,fe);break;case 15:this.Ra(te,fe);break;case 16:this.Sa(te,fe);break;case 17:this.rb(te,fe);break;case 18:this.sb(te,fe);break;case 30:this.K(te,fe);break;case 31:this.N(te,fe);break;default:w("Invalid field type in writeAny()")}},nt.prototype.writeAny=nt.prototype.Nc;function is(q,te,fe){fe!=null&&(rr(q,te,0),q.a.j(fe))}function wa(q,te,fe){fe!=null&&(rr(q,te,0),q.a.M(fe))}nt.prototype.S=function(q,te){te!=null&&(T(-2147483648<=te&&2147483648>te),wa(this,q,te))},nt.prototype.writeInt32=nt.prototype.S,nt.prototype.ob=function(q,te){te!=null&&(te=parseInt(te,10),T(-2147483648<=te&&2147483648>te),wa(this,q,te))},nt.prototype.writeInt32String=nt.prototype.ob,nt.prototype.T=function(q,te){te!=null&&(T(-9223372036854776e3<=te&&9223372036854776e3>te),te!=null&&(rr(this,q,0),this.a.ua(te)))},nt.prototype.writeInt64=nt.prototype.T,nt.prototype.ka=function(q,te){te!=null&&(te=Nn(te),rr(this,q,0),this.a.l(te.lo,te.hi))},nt.prototype.writeInt64String=nt.prototype.ka,nt.prototype.s=function(q,te){te!=null&&(T(0<=te&&4294967296>te),is(this,q,te))},nt.prototype.writeUint32=nt.prototype.s,nt.prototype.ub=function(q,te){te!=null&&(te=parseInt(te,10),T(0<=te&&4294967296>te),is(this,q,te))},nt.prototype.writeUint32String=nt.prototype.ub,nt.prototype.V=function(q,te){te!=null&&(T(0<=te&&18446744073709552e3>te),te!=null&&(rr(this,q,0),this.a.va(te)))},nt.prototype.writeUint64=nt.prototype.V,nt.prototype.vb=function(q,te){te!=null&&(te=Br(te),rr(this,q,0),this.a.l(te.lo,te.hi))},nt.prototype.writeUint64String=nt.prototype.vb,nt.prototype.rb=function(q,te){te!=null&&(T(-2147483648<=te&&2147483648>te),te!=null&&(rr(this,q,0),this.a.wa(te)))},nt.prototype.writeSint32=nt.prototype.rb,nt.prototype.sb=function(q,te){te!=null&&(T(-9223372036854776e3<=te&&9223372036854776e3>te),te!=null&&(rr(this,q,0),this.a.xa(te)))},nt.prototype.writeSint64=nt.prototype.sb,nt.prototype.$d=function(q,te){te!=null&&te!=null&&(rr(this,q,0),this.a.W(te))},nt.prototype.writeSintHash64=nt.prototype.$d,nt.prototype.Zd=function(q,te){te!=null&&te!=null&&(rr(this,q,0),this.a.Ta(te))},nt.prototype.writeSint64String=nt.prototype.Zd,nt.prototype.Pa=function(q,te){te!=null&&(T(0<=te&&4294967296>te),rr(this,q,5),this.a.s(te))},nt.prototype.writeFixed32=nt.prototype.Pa,nt.prototype.Qa=function(q,te){te!=null&&(T(0<=te&&18446744073709552e3>te),rr(this,q,1),this.a.V(te))},nt.prototype.writeFixed64=nt.prototype.Qa,nt.prototype.nb=function(q,te){te!=null&&(te=Br(te),rr(this,q,1),this.a.A(te.lo,te.hi))},nt.prototype.writeFixed64String=nt.prototype.nb,nt.prototype.Ra=function(q,te){te!=null&&(T(-2147483648<=te&&2147483648>te),rr(this,q,5),this.a.S(te))},nt.prototype.writeSfixed32=nt.prototype.Ra,nt.prototype.Sa=function(q,te){te!=null&&(T(-9223372036854776e3<=te&&9223372036854776e3>te),rr(this,q,1),this.a.T(te))},nt.prototype.writeSfixed64=nt.prototype.Sa,nt.prototype.qb=function(q,te){te!=null&&(te=Nn(te),rr(this,q,1),this.a.A(te.lo,te.hi))},nt.prototype.writeSfixed64String=nt.prototype.qb,nt.prototype.L=function(q,te){te!=null&&(rr(this,q,5),this.a.L(te))},nt.prototype.writeFloat=nt.prototype.L,nt.prototype.J=function(q,te){te!=null&&(rr(this,q,1),this.a.J(te))},nt.prototype.writeDouble=nt.prototype.J,nt.prototype.I=function(q,te){te!=null&&(T(typeof te=="boolean"||typeof te=="number"),rr(this,q,0),this.a.I(te))},nt.prototype.writeBool=nt.prototype.I,nt.prototype.R=function(q,te){te!=null&&(T(-2147483648<=te&&2147483648>te),rr(this,q,0),this.a.M(te))},nt.prototype.writeEnum=nt.prototype.R,nt.prototype.U=function(q,te){te!=null&&(q=si(this,q),this.a.U(te),ti(this,q))},nt.prototype.writeString=nt.prototype.U,nt.prototype.ja=function(q,te){te!=null&&(te=ct(te),rr(this,q,2),this.a.j(te.length),_o(this,te))},nt.prototype.writeBytes=nt.prototype.ja,nt.prototype.Rc=function(q,te,fe){te!=null&&(q=si(this,q),fe(te,this),ti(this,q))},nt.prototype.writeMessage=nt.prototype.Rc,nt.prototype.Sc=function(q,te,fe){te!=null&&(rr(this,1,3),rr(this,2,0),this.a.M(q),q=si(this,3),fe(te,this),ti(this,q),rr(this,1,4))},nt.prototype.writeMessageSet=nt.prototype.Sc,nt.prototype.Oc=function(q,te,fe){te!=null&&(rr(this,q,3),fe(te,this),rr(this,q,4))},nt.prototype.writeGroup=nt.prototype.Oc,nt.prototype.K=function(q,te){te!=null&&(T(te.length==8),rr(this,q,1),this.a.K(te))},nt.prototype.writeFixedHash64=nt.prototype.K,nt.prototype.N=function(q,te){te!=null&&(T(te.length==8),rr(this,q,0),this.a.N(te))},nt.prototype.writeVarintHash64=nt.prototype.N,nt.prototype.A=function(q,te,fe){rr(this,q,1),this.a.A(te,fe)},nt.prototype.writeSplitFixed64=nt.prototype.A,nt.prototype.l=function(q,te,fe){rr(this,q,0),this.a.l(te,fe)},nt.prototype.writeSplitVarint64=nt.prototype.l,nt.prototype.tb=function(q,te,fe){rr(this,q,0);var Ue=this.a;We(te,fe,function(pt,At){Ue.l(pt>>>0,At>>>0)})},nt.prototype.writeSplitZigzagVarint64=nt.prototype.tb,nt.prototype.Ed=function(q,te){if(te!=null)for(var fe=0;fe<te.length;fe++)wa(this,q,te[fe])},nt.prototype.writeRepeatedInt32=nt.prototype.Ed,nt.prototype.Fd=function(q,te){if(te!=null)for(var fe=0;fe<te.length;fe++)this.ob(q,te[fe])},nt.prototype.writeRepeatedInt32String=nt.prototype.Fd,nt.prototype.Gd=function(q,te){if(te!=null)for(var fe=0;fe<te.length;fe++){var Ue=te[fe];Ue!=null&&(rr(this,q,0),this.a.ua(Ue))}},nt.prototype.writeRepeatedInt64=nt.prototype.Gd,nt.prototype.Qd=function(q,te,fe,Ue){if(te!=null)for(var pt=0;pt<te.length;pt++)this.A(q,fe(te[pt]),Ue(te[pt]))},nt.prototype.writeRepeatedSplitFixed64=nt.prototype.Qd,nt.prototype.Rd=function(q,te,fe,Ue){if(te!=null)for(var pt=0;pt<te.length;pt++)this.l(q,fe(te[pt]),Ue(te[pt]))},nt.prototype.writeRepeatedSplitVarint64=nt.prototype.Rd,nt.prototype.Sd=function(q,te,fe,Ue){if(te!=null)for(var pt=0;pt<te.length;pt++)this.tb(q,fe(te[pt]),Ue(te[pt]))},nt.prototype.writeRepeatedSplitZigzagVarint64=nt.prototype.Sd,nt.prototype.Hd=function(q,te){if(te!=null)for(var fe=0;fe<te.length;fe++)this.ka(q,te[fe])},nt.prototype.writeRepeatedInt64String=nt.prototype.Hd,nt.prototype.Ud=function(q,te){if(te!=null)for(var fe=0;fe<te.length;fe++)is(this,q,te[fe])},nt.prototype.writeRepeatedUint32=nt.prototype.Ud,nt.prototype.Vd=function(q,te){if(te!=null)for(var fe=0;fe<te.length;fe++)this.ub(q,te[fe])},nt.prototype.writeRepeatedUint32String=nt.prototype.Vd,nt.prototype.Wd=function(q,te){if(te!=null)for(var fe=0;fe<te.length;fe++){var Ue=te[fe];Ue!=null&&(rr(this,q,0),this.a.va(Ue))}},nt.prototype.writeRepeatedUint64=nt.prototype.Wd,nt.prototype.Xd=function(q,te){if(te!=null)for(var fe=0;fe<te.length;fe++)this.vb(q,te[fe])},nt.prototype.writeRepeatedUint64String=nt.prototype.Xd,nt.prototype.Md=function(q,te){if(te!=null)for(var fe=0;fe<te.length;fe++){var Ue=te[fe];Ue!=null&&(rr(this,q,0),this.a.wa(Ue))}},nt.prototype.writeRepeatedSint32=nt.prototype.Md,nt.prototype.Nd=function(q,te){if(te!=null)for(var fe=0;fe<te.length;fe++){var Ue=te[fe];Ue!=null&&(rr(this,q,0),this.a.xa(Ue))}},nt.prototype.writeRepeatedSint64=nt.prototype.Nd,nt.prototype.Od=function(q,te){if(te!=null)for(var fe=0;fe<te.length;fe++){var Ue=te[fe];Ue!=null&&(rr(this,q,0),this.a.Ta(Ue))}},nt.prototype.writeRepeatedSint64String=nt.prototype.Od,nt.prototype.Pd=function(q,te){if(te!=null)for(var fe=0;fe<te.length;fe++){var Ue=te[fe];Ue!=null&&(rr(this,q,0),this.a.W(Ue))}},nt.prototype.writeRepeatedSintHash64=nt.prototype.Pd,nt.prototype.yd=function(q,te){if(te!=null)for(var fe=0;fe<te.length;fe++)this.Pa(q,te[fe])},nt.prototype.writeRepeatedFixed32=nt.prototype.yd,nt.prototype.zd=function(q,te){if(te!=null)for(var fe=0;fe<te.length;fe++)this.Qa(q,te[fe])},nt.prototype.writeRepeatedFixed64=nt.prototype.zd,nt.prototype.Ad=function(q,te){if(te!=null)for(var fe=0;fe<te.length;fe++)this.nb(q,te[fe])},nt.prototype.writeRepeatedFixed64String=nt.prototype.Ad,nt.prototype.Jd=function(q,te){if(te!=null)for(var fe=0;fe<te.length;fe++)this.Ra(q,te[fe])},nt.prototype.writeRepeatedSfixed32=nt.prototype.Jd,nt.prototype.Kd=function(q,te){if(te!=null)for(var fe=0;fe<te.length;fe++)this.Sa(q,te[fe])},nt.prototype.writeRepeatedSfixed64=nt.prototype.Kd,nt.prototype.Ld=function(q,te){if(te!=null)for(var fe=0;fe<te.length;fe++)this.qb(q,te[fe])},nt.prototype.writeRepeatedSfixed64String=nt.prototype.Ld,nt.prototype.Cd=function(q,te){if(te!=null)for(var fe=0;fe<te.length;fe++)this.L(q,te[fe])},nt.prototype.writeRepeatedFloat=nt.prototype.Cd,nt.prototype.wd=function(q,te){if(te!=null)for(var fe=0;fe<te.length;fe++)this.J(q,te[fe])},nt.prototype.writeRepeatedDouble=nt.prototype.wd,nt.prototype.ud=function(q,te){if(te!=null)for(var fe=0;fe<te.length;fe++)this.I(q,te[fe])},nt.prototype.writeRepeatedBool=nt.prototype.ud,nt.prototype.xd=function(q,te){if(te!=null)for(var fe=0;fe<te.length;fe++)this.R(q,te[fe])},nt.prototype.writeRepeatedEnum=nt.prototype.xd,nt.prototype.Td=function(q,te){if(te!=null)for(var fe=0;fe<te.length;fe++)this.U(q,te[fe])},nt.prototype.writeRepeatedString=nt.prototype.Td,nt.prototype.vd=function(q,te){if(te!=null)for(var fe=0;fe<te.length;fe++)this.ja(q,te[fe])},nt.prototype.writeRepeatedBytes=nt.prototype.vd,nt.prototype.Id=function(q,te,fe){if(te!=null)for(var Ue=0;Ue<te.length;Ue++){var pt=si(this,q);fe(te[Ue],this),ti(this,pt)}},nt.prototype.writeRepeatedMessage=nt.prototype.Id,nt.prototype.Dd=function(q,te,fe){if(te!=null)for(var Ue=0;Ue<te.length;Ue++)rr(this,q,3),fe(te[Ue],this),rr(this,q,4)},nt.prototype.writeRepeatedGroup=nt.prototype.Dd,nt.prototype.Bd=function(q,te){if(te!=null)for(var fe=0;fe<te.length;fe++)this.K(q,te[fe])},nt.prototype.writeRepeatedFixedHash64=nt.prototype.Bd,nt.prototype.Yd=function(q,te){if(te!=null)for(var fe=0;fe<te.length;fe++)this.N(q,te[fe])},nt.prototype.writeRepeatedVarintHash64=nt.prototype.Yd,nt.prototype.ad=function(q,te){if(te!=null&&te.length){q=si(this,q);for(var fe=0;fe<te.length;fe++)this.a.M(te[fe]);ti(this,q)}},nt.prototype.writePackedInt32=nt.prototype.ad,nt.prototype.bd=function(q,te){if(te!=null&&te.length){q=si(this,q);for(var fe=0;fe<te.length;fe++)this.a.M(parseInt(te[fe],10));ti(this,q)}},nt.prototype.writePackedInt32String=nt.prototype.bd,nt.prototype.cd=function(q,te){if(te!=null&&te.length){q=si(this,q);for(var fe=0;fe<te.length;fe++)this.a.ua(te[fe]);ti(this,q)}},nt.prototype.writePackedInt64=nt.prototype.cd,nt.prototype.md=function(q,te,fe,Ue){if(te!=null){q=si(this,q);for(var pt=0;pt<te.length;pt++)this.a.A(fe(te[pt]),Ue(te[pt]));ti(this,q)}},nt.prototype.writePackedSplitFixed64=nt.prototype.md,nt.prototype.nd=function(q,te,fe,Ue){if(te!=null){q=si(this,q);for(var pt=0;pt<te.length;pt++)this.a.l(fe(te[pt]),Ue(te[pt]));ti(this,q)}},nt.prototype.writePackedSplitVarint64=nt.prototype.nd,nt.prototype.od=function(q,te,fe,Ue){if(te!=null){q=si(this,q);for(var pt=this.a,At=0;At<te.length;At++)We(fe(te[At]),Ue(te[At]),function(cr,Hr){pt.l(cr>>>0,Hr>>>0)});ti(this,q)}},nt.prototype.writePackedSplitZigzagVarint64=nt.prototype.od,nt.prototype.dd=function(q,te){if(te!=null&&te.length){q=si(this,q);for(var fe=0;fe<te.length;fe++){var Ue=Nn(te[fe]);this.a.l(Ue.lo,Ue.hi)}ti(this,q)}},nt.prototype.writePackedInt64String=nt.prototype.dd,nt.prototype.pd=function(q,te){if(te!=null&&te.length){q=si(this,q);for(var fe=0;fe<te.length;fe++)this.a.j(te[fe]);ti(this,q)}},nt.prototype.writePackedUint32=nt.prototype.pd,nt.prototype.qd=function(q,te){if(te!=null&&te.length){q=si(this,q);for(var fe=0;fe<te.length;fe++)this.a.j(parseInt(te[fe],10));ti(this,q)}},nt.prototype.writePackedUint32String=nt.prototype.qd,nt.prototype.rd=function(q,te){if(te!=null&&te.length){q=si(this,q);for(var fe=0;fe<te.length;fe++)this.a.va(te[fe]);ti(this,q)}},nt.prototype.writePackedUint64=nt.prototype.rd,nt.prototype.sd=function(q,te){if(te!=null&&te.length){q=si(this,q);for(var fe=0;fe<te.length;fe++){var Ue=Br(te[fe]);this.a.l(Ue.lo,Ue.hi)}ti(this,q)}},nt.prototype.writePackedUint64String=nt.prototype.sd,nt.prototype.hd=function(q,te){if(te!=null&&te.length){q=si(this,q);for(var fe=0;fe<te.length;fe++)this.a.wa(te[fe]);ti(this,q)}},nt.prototype.writePackedSint32=nt.prototype.hd,nt.prototype.jd=function(q,te){if(te!=null&&te.length){q=si(this,q);for(var fe=0;fe<te.length;fe++)this.a.xa(te[fe]);ti(this,q)}},nt.prototype.writePackedSint64=nt.prototype.jd,nt.prototype.kd=function(q,te){if(te!=null&&te.length){q=si(this,q);for(var fe=0;fe<te.length;fe++)this.a.W(St(te[fe]));ti(this,q)}},nt.prototype.writePackedSint64String=nt.prototype.kd,nt.prototype.ld=function(q,te){if(te!=null&&te.length){q=si(this,q);for(var fe=0;fe<te.length;fe++)this.a.W(te[fe]);ti(this,q)}},nt.prototype.writePackedSintHash64=nt.prototype.ld,nt.prototype.Wc=function(q,te){if(te!=null&&te.length)for(rr(this,q,2),this.a.j(4*te.length),q=0;q<te.length;q++)this.a.s(te[q])},nt.prototype.writePackedFixed32=nt.prototype.Wc,nt.prototype.Xc=function(q,te){if(te!=null&&te.length)for(rr(this,q,2),this.a.j(8*te.length),q=0;q<te.length;q++)this.a.V(te[q])},nt.prototype.writePackedFixed64=nt.prototype.Xc,nt.prototype.Yc=function(q,te){if(te!=null&&te.length)for(rr(this,q,2),this.a.j(8*te.length),q=0;q<te.length;q++){var fe=Br(te[q]);this.a.A(fe.lo,fe.hi)}},nt.prototype.writePackedFixed64String=nt.prototype.Yc,nt.prototype.ed=function(q,te){if(te!=null&&te.length)for(rr(this,q,2),this.a.j(4*te.length),q=0;q<te.length;q++)this.a.S(te[q])},nt.prototype.writePackedSfixed32=nt.prototype.ed,nt.prototype.fd=function(q,te){if(te!=null&&te.length)for(rr(this,q,2),this.a.j(8*te.length),q=0;q<te.length;q++)this.a.T(te[q])},nt.prototype.writePackedSfixed64=nt.prototype.fd,nt.prototype.gd=function(q,te){if(te!=null&&te.length)for(rr(this,q,2),this.a.j(8*te.length),q=0;q<te.length;q++)this.a.ka(te[q])},nt.prototype.writePackedSfixed64String=nt.prototype.gd,nt.prototype.$c=function(q,te){if(te!=null&&te.length)for(rr(this,q,2),this.a.j(4*te.length),q=0;q<te.length;q++)this.a.L(te[q])},nt.prototype.writePackedFloat=nt.prototype.$c,nt.prototype.Uc=function(q,te){if(te!=null&&te.length)for(rr(this,q,2),this.a.j(8*te.length),q=0;q<te.length;q++)this.a.J(te[q])},nt.prototype.writePackedDouble=nt.prototype.Uc,nt.prototype.Tc=function(q,te){if(te!=null&&te.length)for(rr(this,q,2),this.a.j(te.length),q=0;q<te.length;q++)this.a.I(te[q])},nt.prototype.writePackedBool=nt.prototype.Tc,nt.prototype.Vc=function(q,te){if(te!=null&&te.length){q=si(this,q);for(var fe=0;fe<te.length;fe++)this.a.R(te[fe]);ti(this,q)}},nt.prototype.writePackedEnum=nt.prototype.Vc,nt.prototype.Zc=function(q,te){if(te!=null&&te.length)for(rr(this,q,2),this.a.j(8*te.length),q=0;q<te.length;q++)this.a.K(te[q])},nt.prototype.writePackedFixedHash64=nt.prototype.Zc,nt.prototype.td=function(q,te){if(te!=null&&te.length){q=si(this,q);for(var fe=0;fe<te.length;fe++)this.a.N(te[fe]);ti(this,q)}},nt.prototype.writePackedVarintHash64=nt.prototype.td,r.debug=ar,r.Map=D,r.Message=zt,r.BinaryReader=Xe,r.BinaryWriter=nt,r.ExtensionFieldInfo=kr,r.ExtensionFieldBinaryInfo=qt,r.exportSymbol=g,r.inherits=v,r.object={extend:m},r.typeOf=h})(Cw)),Cw}var Yue;function cb(){return Yue||(Yue=1,(function(r){var e=n_(),i=e,n=Function("return this")();i.exportSymbol("proto.base.ClientId",null,n),i.exportSymbol("proto.base.E2e",null,n),i.exportSymbol("proto.base.E2eProfile",null,n),i.exportSymbol("proto.base.Empty",null,n),i.exportSymbol("proto.base.FrameInfo",null,n),i.exportSymbol("proto.base.Frames",null,n),i.exportSymbol("proto.base.Group",null,n),i.exportSymbol("proto.base.MetaData",null,n),i.exportSymbol("proto.base.Multiplex",null,n),i.exportSymbol("proto.base.Multiplex.ModeCase",null,n),i.exportSymbol("proto.base.NameSpace",null,n),i.exportSymbol("proto.base.NetworkInfo",null,n),i.exportSymbol("proto.base.SignalId",null,n),i.exportSymbol("proto.base.SignalInfo",null,n),proto.base.Empty=function(t){e.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.base.Empty,e.Message),i.DEBUG&&!COMPILED&&(proto.base.Empty.displayName="proto.base.Empty"),proto.base.ClientId=function(t){e.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.base.ClientId,e.Message),i.DEBUG&&!COMPILED&&(proto.base.ClientId.displayName="proto.base.ClientId"),proto.base.SignalId=function(t){e.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.base.SignalId,e.Message),i.DEBUG&&!COMPILED&&(proto.base.SignalId.displayName="proto.base.SignalId"),proto.base.SignalInfo=function(t){e.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.base.SignalInfo,e.Message),i.DEBUG&&!COMPILED&&(proto.base.SignalInfo.displayName="proto.base.SignalInfo"),proto.base.Multiplex=function(t){e.Message.initialize(this,t,0,-1,null,proto.base.Multiplex.oneofGroups_)},i.inherits(proto.base.Multiplex,e.Message),i.DEBUG&&!COMPILED&&(proto.base.Multiplex.displayName="proto.base.Multiplex"),proto.base.E2e=function(t){e.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.base.E2e,e.Message),i.DEBUG&&!COMPILED&&(proto.base.E2e.displayName="proto.base.E2e"),proto.base.Group=function(t){e.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.base.Group,e.Message),i.DEBUG&&!COMPILED&&(proto.base.Group.displayName="proto.base.Group"),proto.base.MetaData=function(t){e.Message.initialize(this,t,0,-1,proto.base.MetaData.repeatedFields_,null)},i.inherits(proto.base.MetaData,e.Message),i.DEBUG&&!COMPILED&&(proto.base.MetaData.displayName="proto.base.MetaData"),proto.base.NameSpace=function(t){e.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.base.NameSpace,e.Message),i.DEBUG&&!COMPILED&&(proto.base.NameSpace.displayName="proto.base.NameSpace"),proto.base.NetworkInfo=function(t){e.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.base.NetworkInfo,e.Message),i.DEBUG&&!COMPILED&&(proto.base.NetworkInfo.displayName="proto.base.NetworkInfo"),proto.base.FrameInfo=function(t){e.Message.initialize(this,t,0,-1,proto.base.FrameInfo.repeatedFields_,null)},i.inherits(proto.base.FrameInfo,e.Message),i.DEBUG&&!COMPILED&&(proto.base.FrameInfo.displayName="proto.base.FrameInfo"),proto.base.Frames=function(t){e.Message.initialize(this,t,0,-1,proto.base.Frames.repeatedFields_,null)},i.inherits(proto.base.Frames,e.Message),i.DEBUG&&!COMPILED&&(proto.base.Frames.displayName="proto.base.Frames"),e.Message.GENERATE_TO_OBJECT&&(proto.base.Empty.prototype.toObject=function(t){return proto.base.Empty.toObject(t,this)},proto.base.Empty.toObject=function(t,o){var a={};return t&&(a.$jspbMessageInstance=o),a}),proto.base.Empty.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.base.Empty;return proto.base.Empty.deserializeBinaryFromReader(a,o)},proto.base.Empty.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();o.skipField()}return t},proto.base.Empty.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.base.Empty.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.base.Empty.serializeBinaryToWriter=function(t,o){},e.Message.GENERATE_TO_OBJECT&&(proto.base.ClientId.prototype.toObject=function(t){return proto.base.ClientId.toObject(t,this)},proto.base.ClientId.toObject=function(t,o){var a={id:e.Message.getFieldWithDefault(o,1,"")};return t&&(a.$jspbMessageInstance=o),a}),proto.base.ClientId.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.base.ClientId;return proto.base.ClientId.deserializeBinaryFromReader(a,o)},proto.base.ClientId.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 1:var s=o.readString();t.setId(s);break;default:o.skipField();break}}return t},proto.base.ClientId.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.base.ClientId.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.base.ClientId.serializeBinaryToWriter=function(t,o){var a=void 0;a=t.getId(),a.length>0&&o.writeString(1,a)},proto.base.ClientId.prototype.getId=function(){return e.Message.getFieldWithDefault(this,1,"")},proto.base.ClientId.prototype.setId=function(t){return e.Message.setProto3StringField(this,1,t)},e.Message.GENERATE_TO_OBJECT&&(proto.base.SignalId.prototype.toObject=function(t){return proto.base.SignalId.toObject(t,this)},proto.base.SignalId.toObject=function(t,o){var a,s={name:e.Message.getFieldWithDefault(o,1,""),namespace:(a=o.getNamespace())&&proto.base.NameSpace.toObject(t,a)};return t&&(s.$jspbMessageInstance=o),s}),proto.base.SignalId.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.base.SignalId;return proto.base.SignalId.deserializeBinaryFromReader(a,o)},proto.base.SignalId.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 1:var s=o.readString();t.setName(s);break;case 2:var s=new proto.base.NameSpace;o.readMessage(s,proto.base.NameSpace.deserializeBinaryFromReader),t.setNamespace(s);break;default:o.skipField();break}}return t},proto.base.SignalId.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.base.SignalId.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.base.SignalId.serializeBinaryToWriter=function(t,o){var a=void 0;a=t.getName(),a.length>0&&o.writeString(1,a),a=t.getNamespace(),a!=null&&o.writeMessage(2,a,proto.base.NameSpace.serializeBinaryToWriter)},proto.base.SignalId.prototype.getName=function(){return e.Message.getFieldWithDefault(this,1,"")},proto.base.SignalId.prototype.setName=function(t){return e.Message.setProto3StringField(this,1,t)},proto.base.SignalId.prototype.getNamespace=function(){return e.Message.getWrapperField(this,proto.base.NameSpace,2)},proto.base.SignalId.prototype.setNamespace=function(t){return e.Message.setWrapperField(this,2,t)},proto.base.SignalId.prototype.clearNamespace=function(){return this.setNamespace(void 0)},proto.base.SignalId.prototype.hasNamespace=function(){return e.Message.getField(this,2)!=null},e.Message.GENERATE_TO_OBJECT&&(proto.base.SignalInfo.prototype.toObject=function(t){return proto.base.SignalInfo.toObject(t,this)},proto.base.SignalInfo.toObject=function(t,o){var a,s={id:(a=o.getId())&&proto.base.SignalId.toObject(t,a),metadata:(a=o.getMetadata())&&proto.base.MetaData.toObject(t,a)};return t&&(s.$jspbMessageInstance=o),s}),proto.base.SignalInfo.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.base.SignalInfo;return proto.base.SignalInfo.deserializeBinaryFromReader(a,o)},proto.base.SignalInfo.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 1:var s=new proto.base.SignalId;o.readMessage(s,proto.base.SignalId.deserializeBinaryFromReader),t.setId(s);break;case 2:var s=new proto.base.MetaData;o.readMessage(s,proto.base.MetaData.deserializeBinaryFromReader),t.setMetadata(s);break;default:o.skipField();break}}return t},proto.base.SignalInfo.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.base.SignalInfo.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.base.SignalInfo.serializeBinaryToWriter=function(t,o){var a=void 0;a=t.getId(),a!=null&&o.writeMessage(1,a,proto.base.SignalId.serializeBinaryToWriter),a=t.getMetadata(),a!=null&&o.writeMessage(2,a,proto.base.MetaData.serializeBinaryToWriter)},proto.base.SignalInfo.prototype.getId=function(){return e.Message.getWrapperField(this,proto.base.SignalId,1)},proto.base.SignalInfo.prototype.setId=function(t){return e.Message.setWrapperField(this,1,t)},proto.base.SignalInfo.prototype.clearId=function(){return this.setId(void 0)},proto.base.SignalInfo.prototype.hasId=function(){return e.Message.getField(this,1)!=null},proto.base.SignalInfo.prototype.getMetadata=function(){return e.Message.getWrapperField(this,proto.base.MetaData,2)},proto.base.SignalInfo.prototype.setMetadata=function(t){return e.Message.setWrapperField(this,2,t)},proto.base.SignalInfo.prototype.clearMetadata=function(){return this.setMetadata(void 0)},proto.base.SignalInfo.prototype.hasMetadata=function(){return e.Message.getField(this,2)!=null},proto.base.Multiplex.oneofGroups_=[[1,2,3]],proto.base.Multiplex.ModeCase={MODE_NOT_SET:0,NONE:1,SELECT:2,FILTER:3},proto.base.Multiplex.prototype.getModeCase=function(){return e.Message.computeOneofCase(this,proto.base.Multiplex.oneofGroups_[0])},e.Message.GENERATE_TO_OBJECT&&(proto.base.Multiplex.prototype.toObject=function(t){return proto.base.Multiplex.toObject(t,this)},proto.base.Multiplex.toObject=function(t,o){var a,s={none:(a=o.getNone())&&proto.base.Empty.toObject(t,a),select:(a=o.getSelect())&&proto.base.Empty.toObject(t,a),filter:e.Message.getFieldWithDefault(o,3,0)};return t&&(s.$jspbMessageInstance=o),s}),proto.base.Multiplex.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.base.Multiplex;return proto.base.Multiplex.deserializeBinaryFromReader(a,o)},proto.base.Multiplex.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 1:var s=new proto.base.Empty;o.readMessage(s,proto.base.Empty.deserializeBinaryFromReader),t.setNone(s);break;case 2:var s=new proto.base.Empty;o.readMessage(s,proto.base.Empty.deserializeBinaryFromReader),t.setSelect(s);break;case 3:var s=o.readInt32();t.setFilter(s);break;default:o.skipField();break}}return t},proto.base.Multiplex.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.base.Multiplex.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.base.Multiplex.serializeBinaryToWriter=function(t,o){var a=void 0;a=t.getNone(),a!=null&&o.writeMessage(1,a,proto.base.Empty.serializeBinaryToWriter),a=t.getSelect(),a!=null&&o.writeMessage(2,a,proto.base.Empty.serializeBinaryToWriter),a=e.Message.getField(t,3),a!=null&&o.writeInt32(3,a)},proto.base.Multiplex.prototype.getNone=function(){return e.Message.getWrapperField(this,proto.base.Empty,1)},proto.base.Multiplex.prototype.setNone=function(t){return e.Message.setOneofWrapperField(this,1,proto.base.Multiplex.oneofGroups_[0],t)},proto.base.Multiplex.prototype.clearNone=function(){return this.setNone(void 0)},proto.base.Multiplex.prototype.hasNone=function(){return e.Message.getField(this,1)!=null},proto.base.Multiplex.prototype.getSelect=function(){return e.Message.getWrapperField(this,proto.base.Empty,2)},proto.base.Multiplex.prototype.setSelect=function(t){return e.Message.setOneofWrapperField(this,2,proto.base.Multiplex.oneofGroups_[0],t)},proto.base.Multiplex.prototype.clearSelect=function(){return this.setSelect(void 0)},proto.base.Multiplex.prototype.hasSelect=function(){return e.Message.getField(this,2)!=null},proto.base.Multiplex.prototype.getFilter=function(){return e.Message.getFieldWithDefault(this,3,0)},proto.base.Multiplex.prototype.setFilter=function(t){return e.Message.setOneofField(this,3,proto.base.Multiplex.oneofGroups_[0],t)},proto.base.Multiplex.prototype.clearFilter=function(){return e.Message.setOneofField(this,3,proto.base.Multiplex.oneofGroups_[0],void 0)},proto.base.Multiplex.prototype.hasFilter=function(){return e.Message.getField(this,3)!=null},e.Message.GENERATE_TO_OBJECT&&(proto.base.E2e.prototype.toObject=function(t){return proto.base.E2e.toObject(t,this)},proto.base.E2e.toObject=function(t,o){var a={profile:e.Message.getFieldWithDefault(o,1,0),dataid:e.Message.getFieldWithDefault(o,2,0),signalcrc:e.Message.getFieldWithDefault(o,3,""),signalcounter:e.Message.getFieldWithDefault(o,4,"")};return t&&(a.$jspbMessageInstance=o),a}),proto.base.E2e.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.base.E2e;return proto.base.E2e.deserializeBinaryFromReader(a,o)},proto.base.E2e.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 1:var s=o.readEnum();t.setProfile(s);break;case 2:var s=o.readUint32();t.setDataid(s);break;case 3:var s=o.readString();t.setSignalcrc(s);break;case 4:var s=o.readString();t.setSignalcounter(s);break;default:o.skipField();break}}return t},proto.base.E2e.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.base.E2e.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.base.E2e.serializeBinaryToWriter=function(t,o){var a=void 0;a=t.getProfile(),a!==0&&o.writeEnum(1,a),a=t.getDataid(),a!==0&&o.writeUint32(2,a),a=t.getSignalcrc(),a.length>0&&o.writeString(3,a),a=t.getSignalcounter(),a.length>0&&o.writeString(4,a)},proto.base.E2e.prototype.getProfile=function(){return e.Message.getFieldWithDefault(this,1,0)},proto.base.E2e.prototype.setProfile=function(t){return e.Message.setProto3EnumField(this,1,t)},proto.base.E2e.prototype.getDataid=function(){return e.Message.getFieldWithDefault(this,2,0)},proto.base.E2e.prototype.setDataid=function(t){return e.Message.setProto3IntField(this,2,t)},proto.base.E2e.prototype.getSignalcrc=function(){return e.Message.getFieldWithDefault(this,3,"")},proto.base.E2e.prototype.setSignalcrc=function(t){return e.Message.setProto3StringField(this,3,t)},proto.base.E2e.prototype.getSignalcounter=function(){return e.Message.getFieldWithDefault(this,4,"")},proto.base.E2e.prototype.setSignalcounter=function(t){return e.Message.setProto3StringField(this,4,t)},e.Message.GENERATE_TO_OBJECT&&(proto.base.Group.prototype.toObject=function(t){return proto.base.Group.toObject(t,this)},proto.base.Group.toObject=function(t,o){var a,s={start:e.Message.getFieldWithDefault(o,1,0),length:e.Message.getFieldWithDefault(o,2,0),e2e:(a=o.getE2e())&&proto.base.E2e.toObject(t,a)};return t&&(s.$jspbMessageInstance=o),s}),proto.base.Group.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.base.Group;return proto.base.Group.deserializeBinaryFromReader(a,o)},proto.base.Group.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 1:var s=o.readUint32();t.setStart(s);break;case 2:var s=o.readUint32();t.setLength(s);break;case 3:var s=new proto.base.E2e;o.readMessage(s,proto.base.E2e.deserializeBinaryFromReader),t.setE2e(s);break;default:o.skipField();break}}return t},proto.base.Group.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.base.Group.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.base.Group.serializeBinaryToWriter=function(t,o){var a=void 0;a=t.getStart(),a!==0&&o.writeUint32(1,a),a=t.getLength(),a!==0&&o.writeUint32(2,a),a=t.getE2e(),a!=null&&o.writeMessage(3,a,proto.base.E2e.serializeBinaryToWriter)},proto.base.Group.prototype.getStart=function(){return e.Message.getFieldWithDefault(this,1,0)},proto.base.Group.prototype.setStart=function(t){return e.Message.setProto3IntField(this,1,t)},proto.base.Group.prototype.getLength=function(){return e.Message.getFieldWithDefault(this,2,0)},proto.base.Group.prototype.setLength=function(t){return e.Message.setProto3IntField(this,2,t)},proto.base.Group.prototype.getE2e=function(){return e.Message.getWrapperField(this,proto.base.E2e,3)},proto.base.Group.prototype.setE2e=function(t){return e.Message.setWrapperField(this,3,t)},proto.base.Group.prototype.clearE2e=function(){return this.setE2e(void 0)},proto.base.Group.prototype.hasE2e=function(){return e.Message.getField(this,3)!=null},proto.base.MetaData.repeatedFields_=[14,15,20],e.Message.GENERATE_TO_OBJECT&&(proto.base.MetaData.prototype.toObject=function(t){return proto.base.MetaData.toObject(t,this)},proto.base.MetaData.toObject=function(t,o){var a,s={description:e.Message.getFieldWithDefault(o,4,""),max:e.Message.getFloatingPointFieldWithDefault(o,12,0),min:e.Message.getFloatingPointFieldWithDefault(o,13,0),unit:e.Message.getFieldWithDefault(o,7,""),size:e.Message.getFieldWithDefault(o,8,0),israw:e.Message.getBooleanFieldWithDefault(o,9,!1),factor:e.Message.getFloatingPointFieldWithDefault(o,10,0),offset:e.Message.getFloatingPointFieldWithDefault(o,11,0),senderList:(a=e.Message.getRepeatedField(o,14))==null?void 0:a,receiverList:(a=e.Message.getRepeatedField(o,15))==null?void 0:a,cycletime:e.Message.getFloatingPointFieldWithDefault(o,16,0),startvalue:e.Message.getFloatingPointFieldWithDefault(o,17,0),multiplex:(a=o.getMultiplex())&&proto.base.Multiplex.toObject(t,a),e2e:(a=o.getE2e())&&proto.base.E2e.toObject(t,a),groupsList:e.Message.toObjectList(o.getGroupsList(),proto.base.Group.toObject,t),frameid:e.Message.getFieldWithDefault(o,21,0),namedvaluesMap:(a=o.getNamedvaluesMap())?a.toObject(t,void 0):[]};return t&&(s.$jspbMessageInstance=o),s}),proto.base.MetaData.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.base.MetaData;return proto.base.MetaData.deserializeBinaryFromReader(a,o)},proto.base.MetaData.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 4:var s=o.readString();t.setDescription(s);break;case 12:var s=o.readFloat();t.setMax(s);break;case 13:var s=o.readFloat();t.setMin(s);break;case 7:var s=o.readString();t.setUnit(s);break;case 8:var s=o.readInt32();t.setSize(s);break;case 9:var s=o.readBool();t.setIsraw(s);break;case 10:var s=o.readDouble();t.setFactor(s);break;case 11:var s=o.readDouble();t.setOffset(s);break;case 14:var s=o.readString();t.addSender(s);break;case 15:var s=o.readString();t.addReceiver(s);break;case 16:var s=o.readFloat();t.setCycletime(s);break;case 17:var s=o.readFloat();t.setStartvalue(s);break;case 18:var s=new proto.base.Multiplex;o.readMessage(s,proto.base.Multiplex.deserializeBinaryFromReader),t.setMultiplex(s);break;case 19:var s=new proto.base.E2e;o.readMessage(s,proto.base.E2e.deserializeBinaryFromReader),t.setE2e(s);break;case 20:var s=new proto.base.Group;o.readMessage(s,proto.base.Group.deserializeBinaryFromReader),t.addGroups(s);break;case 21:var s=o.readUint32();t.setFrameid(s);break;case 22:var s=t.getNamedvaluesMap();o.readMessage(s,function(l,u){e.Map.deserializeBinary(l,u,e.BinaryReader.prototype.readInt64,e.BinaryReader.prototype.readString,null,0,"")});break;default:o.skipField();break}}return t},proto.base.MetaData.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.base.MetaData.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.base.MetaData.serializeBinaryToWriter=function(t,o){var a=void 0;a=t.getDescription(),a.length>0&&o.writeString(4,a),a=t.getMax(),a!==0&&o.writeFloat(12,a),a=t.getMin(),a!==0&&o.writeFloat(13,a),a=t.getUnit(),a.length>0&&o.writeString(7,a),a=t.getSize(),a!==0&&o.writeInt32(8,a),a=t.getIsraw(),a&&o.writeBool(9,a),a=t.getFactor(),a!==0&&o.writeDouble(10,a),a=t.getOffset(),a!==0&&o.writeDouble(11,a),a=t.getSenderList(),a.length>0&&o.writeRepeatedString(14,a),a=t.getReceiverList(),a.length>0&&o.writeRepeatedString(15,a),a=t.getCycletime(),a!==0&&o.writeFloat(16,a),a=t.getStartvalue(),a!==0&&o.writeFloat(17,a),a=t.getMultiplex(),a!=null&&o.writeMessage(18,a,proto.base.Multiplex.serializeBinaryToWriter),a=t.getE2e(),a!=null&&o.writeMessage(19,a,proto.base.E2e.serializeBinaryToWriter),a=t.getGroupsList(),a.length>0&&o.writeRepeatedMessage(20,a,proto.base.Group.serializeBinaryToWriter),a=t.getFrameid(),a!==0&&o.writeUint32(21,a),a=t.getNamedvaluesMap(!0),a&&a.getLength()>0&&a.serializeBinary(22,o,e.BinaryWriter.prototype.writeInt64,e.BinaryWriter.prototype.writeString)},proto.base.MetaData.prototype.getDescription=function(){return e.Message.getFieldWithDefault(this,4,"")},proto.base.MetaData.prototype.setDescription=function(t){return e.Message.setProto3StringField(this,4,t)},proto.base.MetaData.prototype.getMax=function(){return e.Message.getFloatingPointFieldWithDefault(this,12,0)},proto.base.MetaData.prototype.setMax=function(t){return e.Message.setProto3FloatField(this,12,t)},proto.base.MetaData.prototype.getMin=function(){return e.Message.getFloatingPointFieldWithDefault(this,13,0)},proto.base.MetaData.prototype.setMin=function(t){return e.Message.setProto3FloatField(this,13,t)},proto.base.MetaData.prototype.getUnit=function(){return e.Message.getFieldWithDefault(this,7,"")},proto.base.MetaData.prototype.setUnit=function(t){return e.Message.setProto3StringField(this,7,t)},proto.base.MetaData.prototype.getSize=function(){return e.Message.getFieldWithDefault(this,8,0)},proto.base.MetaData.prototype.setSize=function(t){return e.Message.setProto3IntField(this,8,t)},proto.base.MetaData.prototype.getIsraw=function(){return e.Message.getBooleanFieldWithDefault(this,9,!1)},proto.base.MetaData.prototype.setIsraw=function(t){return e.Message.setProto3BooleanField(this,9,t)},proto.base.MetaData.prototype.getFactor=function(){return e.Message.getFloatingPointFieldWithDefault(this,10,0)},proto.base.MetaData.prototype.setFactor=function(t){return e.Message.setProto3FloatField(this,10,t)},proto.base.MetaData.prototype.getOffset=function(){return e.Message.getFloatingPointFieldWithDefault(this,11,0)},proto.base.MetaData.prototype.setOffset=function(t){return e.Message.setProto3FloatField(this,11,t)},proto.base.MetaData.prototype.getSenderList=function(){return e.Message.getRepeatedField(this,14)},proto.base.MetaData.prototype.setSenderList=function(t){return e.Message.setField(this,14,t||[])},proto.base.MetaData.prototype.addSender=function(t,o){return e.Message.addToRepeatedField(this,14,t,o)},proto.base.MetaData.prototype.clearSenderList=function(){return this.setSenderList([])},proto.base.MetaData.prototype.getReceiverList=function(){return e.Message.getRepeatedField(this,15)},proto.base.MetaData.prototype.setReceiverList=function(t){return e.Message.setField(this,15,t||[])},proto.base.MetaData.prototype.addReceiver=function(t,o){return e.Message.addToRepeatedField(this,15,t,o)},proto.base.MetaData.prototype.clearReceiverList=function(){return this.setReceiverList([])},proto.base.MetaData.prototype.getCycletime=function(){return e.Message.getFloatingPointFieldWithDefault(this,16,0)},proto.base.MetaData.prototype.setCycletime=function(t){return e.Message.setProto3FloatField(this,16,t)},proto.base.MetaData.prototype.getStartvalue=function(){return e.Message.getFloatingPointFieldWithDefault(this,17,0)},proto.base.MetaData.prototype.setStartvalue=function(t){return e.Message.setProto3FloatField(this,17,t)},proto.base.MetaData.prototype.getMultiplex=function(){return e.Message.getWrapperField(this,proto.base.Multiplex,18)},proto.base.MetaData.prototype.setMultiplex=function(t){return e.Message.setWrapperField(this,18,t)},proto.base.MetaData.prototype.clearMultiplex=function(){return this.setMultiplex(void 0)},proto.base.MetaData.prototype.hasMultiplex=function(){return e.Message.getField(this,18)!=null},proto.base.MetaData.prototype.getE2e=function(){return e.Message.getWrapperField(this,proto.base.E2e,19)},proto.base.MetaData.prototype.setE2e=function(t){return e.Message.setWrapperField(this,19,t)},proto.base.MetaData.prototype.clearE2e=function(){return this.setE2e(void 0)},proto.base.MetaData.prototype.hasE2e=function(){return e.Message.getField(this,19)!=null},proto.base.MetaData.prototype.getGroupsList=function(){return e.Message.getRepeatedWrapperField(this,proto.base.Group,20)},proto.base.MetaData.prototype.setGroupsList=function(t){return e.Message.setRepeatedWrapperField(this,20,t)},proto.base.MetaData.prototype.addGroups=function(t,o){return e.Message.addToRepeatedWrapperField(this,20,t,proto.base.Group,o)},proto.base.MetaData.prototype.clearGroupsList=function(){return this.setGroupsList([])},proto.base.MetaData.prototype.getFrameid=function(){return e.Message.getFieldWithDefault(this,21,0)},proto.base.MetaData.prototype.setFrameid=function(t){return e.Message.setProto3IntField(this,21,t)},proto.base.MetaData.prototype.getNamedvaluesMap=function(t){return e.Message.getMapField(this,22,t,null)},proto.base.MetaData.prototype.clearNamedvaluesMap=function(){return this.getNamedvaluesMap().clear(),this},e.Message.GENERATE_TO_OBJECT&&(proto.base.NameSpace.prototype.toObject=function(t){return proto.base.NameSpace.toObject(t,this)},proto.base.NameSpace.toObject=function(t,o){var a={name:e.Message.getFieldWithDefault(o,1,"")};return t&&(a.$jspbMessageInstance=o),a}),proto.base.NameSpace.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.base.NameSpace;return proto.base.NameSpace.deserializeBinaryFromReader(a,o)},proto.base.NameSpace.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 1:var s=o.readString();t.setName(s);break;default:o.skipField();break}}return t},proto.base.NameSpace.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.base.NameSpace.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.base.NameSpace.serializeBinaryToWriter=function(t,o){var a=void 0;a=t.getName(),a.length>0&&o.writeString(1,a)},proto.base.NameSpace.prototype.getName=function(){return e.Message.getFieldWithDefault(this,1,"")},proto.base.NameSpace.prototype.setName=function(t){return e.Message.setProto3StringField(this,1,t)},e.Message.GENERATE_TO_OBJECT&&(proto.base.NetworkInfo.prototype.toObject=function(t){return proto.base.NetworkInfo.toObject(t,this)},proto.base.NetworkInfo.toObject=function(t,o){var a,s={namespace:(a=o.getNamespace())&&proto.base.NameSpace.toObject(t,a),type:e.Message.getFieldWithDefault(o,2,""),description:e.Message.getFieldWithDefault(o,3,"")};return t&&(s.$jspbMessageInstance=o),s}),proto.base.NetworkInfo.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.base.NetworkInfo;return proto.base.NetworkInfo.deserializeBinaryFromReader(a,o)},proto.base.NetworkInfo.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 1:var s=new proto.base.NameSpace;o.readMessage(s,proto.base.NameSpace.deserializeBinaryFromReader),t.setNamespace(s);break;case 2:var s=o.readString();t.setType(s);break;case 3:var s=o.readString();t.setDescription(s);break;default:o.skipField();break}}return t},proto.base.NetworkInfo.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.base.NetworkInfo.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.base.NetworkInfo.serializeBinaryToWriter=function(t,o){var a=void 0;a=t.getNamespace(),a!=null&&o.writeMessage(1,a,proto.base.NameSpace.serializeBinaryToWriter),a=t.getType(),a.length>0&&o.writeString(2,a),a=t.getDescription(),a.length>0&&o.writeString(3,a)},proto.base.NetworkInfo.prototype.getNamespace=function(){return e.Message.getWrapperField(this,proto.base.NameSpace,1)},proto.base.NetworkInfo.prototype.setNamespace=function(t){return e.Message.setWrapperField(this,1,t)},proto.base.NetworkInfo.prototype.clearNamespace=function(){return this.setNamespace(void 0)},proto.base.NetworkInfo.prototype.hasNamespace=function(){return e.Message.getField(this,1)!=null},proto.base.NetworkInfo.prototype.getType=function(){return e.Message.getFieldWithDefault(this,2,"")},proto.base.NetworkInfo.prototype.setType=function(t){return e.Message.setProto3StringField(this,2,t)},proto.base.NetworkInfo.prototype.getDescription=function(){return e.Message.getFieldWithDefault(this,3,"")},proto.base.NetworkInfo.prototype.setDescription=function(t){return e.Message.setProto3StringField(this,3,t)},proto.base.FrameInfo.repeatedFields_=[2],e.Message.GENERATE_TO_OBJECT&&(proto.base.FrameInfo.prototype.toObject=function(t){return proto.base.FrameInfo.toObject(t,this)},proto.base.FrameInfo.toObject=function(t,o){var a,s={signalinfo:(a=o.getSignalinfo())&&proto.base.SignalInfo.toObject(t,a),childinfoList:e.Message.toObjectList(o.getChildinfoList(),proto.base.SignalInfo.toObject,t)};return t&&(s.$jspbMessageInstance=o),s}),proto.base.FrameInfo.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.base.FrameInfo;return proto.base.FrameInfo.deserializeBinaryFromReader(a,o)},proto.base.FrameInfo.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 1:var s=new proto.base.SignalInfo;o.readMessage(s,proto.base.SignalInfo.deserializeBinaryFromReader),t.setSignalinfo(s);break;case 2:var s=new proto.base.SignalInfo;o.readMessage(s,proto.base.SignalInfo.deserializeBinaryFromReader),t.addChildinfo(s);break;default:o.skipField();break}}return t},proto.base.FrameInfo.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.base.FrameInfo.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.base.FrameInfo.serializeBinaryToWriter=function(t,o){var a=void 0;a=t.getSignalinfo(),a!=null&&o.writeMessage(1,a,proto.base.SignalInfo.serializeBinaryToWriter),a=t.getChildinfoList(),a.length>0&&o.writeRepeatedMessage(2,a,proto.base.SignalInfo.serializeBinaryToWriter)},proto.base.FrameInfo.prototype.getSignalinfo=function(){return e.Message.getWrapperField(this,proto.base.SignalInfo,1)},proto.base.FrameInfo.prototype.setSignalinfo=function(t){return e.Message.setWrapperField(this,1,t)},proto.base.FrameInfo.prototype.clearSignalinfo=function(){return this.setSignalinfo(void 0)},proto.base.FrameInfo.prototype.hasSignalinfo=function(){return e.Message.getField(this,1)!=null},proto.base.FrameInfo.prototype.getChildinfoList=function(){return e.Message.getRepeatedWrapperField(this,proto.base.SignalInfo,2)},proto.base.FrameInfo.prototype.setChildinfoList=function(t){return e.Message.setRepeatedWrapperField(this,2,t)},proto.base.FrameInfo.prototype.addChildinfo=function(t,o){return e.Message.addToRepeatedWrapperField(this,2,t,proto.base.SignalInfo,o)},proto.base.FrameInfo.prototype.clearChildinfoList=function(){return this.setChildinfoList([])},proto.base.Frames.repeatedFields_=[1],e.Message.GENERATE_TO_OBJECT&&(proto.base.Frames.prototype.toObject=function(t){return proto.base.Frames.toObject(t,this)},proto.base.Frames.toObject=function(t,o){var a={frameList:e.Message.toObjectList(o.getFrameList(),proto.base.FrameInfo.toObject,t)};return t&&(a.$jspbMessageInstance=o),a}),proto.base.Frames.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.base.Frames;return proto.base.Frames.deserializeBinaryFromReader(a,o)},proto.base.Frames.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 1:var s=new proto.base.FrameInfo;o.readMessage(s,proto.base.FrameInfo.deserializeBinaryFromReader),t.addFrame(s);break;default:o.skipField();break}}return t},proto.base.Frames.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.base.Frames.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.base.Frames.serializeBinaryToWriter=function(t,o){var a=void 0;a=t.getFrameList(),a.length>0&&o.writeRepeatedMessage(1,a,proto.base.FrameInfo.serializeBinaryToWriter)},proto.base.Frames.prototype.getFrameList=function(){return e.Message.getRepeatedWrapperField(this,proto.base.FrameInfo,1)},proto.base.Frames.prototype.setFrameList=function(t){return e.Message.setRepeatedWrapperField(this,1,t)},proto.base.Frames.prototype.addFrame=function(t,o){return e.Message.addToRepeatedWrapperField(this,1,t,proto.base.FrameInfo,o)},proto.base.Frames.prototype.clearFrameList=function(){return this.setFrameList([])},proto.base.E2eProfile={PROFILE_AR_01A:0},i.object.extend(r,proto.base)})(RW)),RW}var p0={},$ue;function EU(){if($ue)return p0;$ue=1;function r(me){var Fe=0;return function(){return Fe<me.length?{done:!1,value:me[Fe++]}:{done:!0}}}var e=typeof Object.defineProperties=="function"?Object.defineProperty:function(me,Fe,Ze){me!=Array.prototype&&me!=Object.prototype&&(me[Fe]=Ze.value)};function i(me){me=[typeof window=="object"&&window,typeof self=="object"&&self,typeof Ch=="object"&&Ch,me];for(var Fe=0;Fe<me.length;++Fe){var Ze=me[Fe];if(Ze&&Ze.Math==Math)return Ze}throw Error("Cannot find global object")}var n=i(p0);function t(me,Fe){if(Fe){var Ze=n;me=me.split(".");for(var ft=0;ft<me.length-1;ft++){var Mt=me[ft];Mt in Ze||(Ze[Mt]={}),Ze=Ze[Mt]}me=me[me.length-1],ft=Ze[me],Fe=Fe(ft),Fe!=ft&&Fe!=null&&e(Ze,me,{configurable:!0,writable:!0,value:Fe})}}t("Object.is",function(me){return me||function(Fe,Ze){return Fe===Ze?Fe!==0||1/Fe===1/Ze:Fe!==Fe&&Ze!==Ze}}),t("Array.prototype.includes",function(me){return me||function(Fe,Ze){var ft=this;ft instanceof String&&(ft=String(ft));var Mt=ft.length;for(Ze=Ze||0,0>Ze&&(Ze=Math.max(Ze+Mt,0));Ze<Mt;Ze++){var nr=ft[Ze];if(nr===Fe||Object.is(nr,Fe))return!0}return!1}});function o(me){var Fe=typeof Symbol<"u"&&Symbol.iterator&&me[Symbol.iterator];return Fe?Fe.call(me):{next:r(me)}}t("Promise",function(me){function Fe(Ot){this.b=0,this.c=void 0,this.a=[];var Ut=this.f();try{Ot(Ut.resolve,Ut.reject)}catch(Yr){Ut.reject(Yr)}}function Ze(){this.a=null}function ft(Ot){return Ot instanceof Fe?Ot:new Fe(function(Ut){Ut(Ot)})}if(me)return me;Ze.prototype.b=function(Ot){if(this.a==null){this.a=[];var Ut=this;this.c(function(){Ut.g()})}this.a.push(Ot)};var Mt=n.setTimeout;Ze.prototype.c=function(Ot){Mt(Ot,0)},Ze.prototype.g=function(){for(;this.a&&this.a.length;){var Ot=this.a;this.a=[];for(var Ut=0;Ut<Ot.length;++Ut){var Yr=Ot[Ut];Ot[Ut]=null;try{Yr()}catch(Jr){this.f(Jr)}}}this.a=null},Ze.prototype.f=function(Ot){this.c(function(){throw Ot})},Fe.prototype.f=function(){function Ot(Jr){return function(li){Yr||(Yr=!0,Jr.call(Ut,li))}}var Ut=this,Yr=!1;return{resolve:Ot(this.m),reject:Ot(this.g)}},Fe.prototype.m=function(Ot){if(Ot===this)this.g(new TypeError("A Promise cannot resolve to itself"));else if(Ot instanceof Fe)this.o(Ot);else{e:switch(typeof Ot){case"object":var Ut=Ot!=null;break e;case"function":Ut=!0;break e;default:Ut=!1}Ut?this.l(Ot):this.h(Ot)}},Fe.prototype.l=function(Ot){var Ut=void 0;try{Ut=Ot.then}catch(Yr){this.g(Yr);return}typeof Ut=="function"?this.u(Ut,Ot):this.h(Ot)},Fe.prototype.g=function(Ot){this.i(2,Ot)},Fe.prototype.h=function(Ot){this.i(1,Ot)},Fe.prototype.i=function(Ot,Ut){if(this.b!=0)throw Error("Cannot settle("+Ot+", "+Ut+"): Promise already settled in state"+this.b);this.b=Ot,this.c=Ut,this.j()},Fe.prototype.j=function(){if(this.a!=null){for(var Ot=0;Ot<this.a.length;++Ot)nr.b(this.a[Ot]);this.a=null}};var nr=new Ze;return Fe.prototype.o=function(Ot){var Ut=this.f();Ot.w(Ut.resolve,Ut.reject)},Fe.prototype.u=function(Ot,Ut){var Yr=this.f();try{Ot.call(Ut,Yr.resolve,Yr.reject)}catch(Jr){Yr.reject(Jr)}},Fe.prototype.then=function(Ot,Ut){function Yr(Di,za){return typeof Di=="function"?function(ha){try{Jr(Di(ha))}catch(Is){li(Is)}}:za}var Jr,li,Ci=new Fe(function(Di,za){Jr=Di,li=za});return this.w(Yr(Ot,Jr),Yr(Ut,li)),Ci},Fe.prototype.catch=function(Ot){return this.then(void 0,Ot)},Fe.prototype.w=function(Ot,Ut){function Yr(){switch(Jr.b){case 1:Ot(Jr.c);break;case 2:Ut(Jr.c);break;default:throw Error("Unexpected state: "+Jr.b)}}var Jr=this;this.a==null?nr.b(Yr):this.a.push(Yr)},Fe.resolve=ft,Fe.reject=function(Ot){return new Fe(function(Ut,Yr){Yr(Ot)})},Fe.race=function(Ot){return new Fe(function(Ut,Yr){for(var Jr=o(Ot),li=Jr.next();!li.done;li=Jr.next())ft(li.value).w(Ut,Yr)})},Fe.all=function(Ot){var Ut=o(Ot),Yr=Ut.next();return Yr.done?ft([]):new Fe(function(Jr,li){function Ci(ha){return function(Is){Di[ha]=Is,za--,za==0&&Jr(Di)}}var Di=[],za=0;do Di.push(void 0),za++,ft(Yr.value).w(Ci(Di.length-1),li),Yr=Ut.next();while(!Yr.done)})},Fe});var a=a||{},s=p0||self;function l(me,Fe){me=me.split("."),Fe=Fe||s;for(var Ze=0;Ze<me.length;Ze++)if(Fe=Fe[me[Ze]],Fe==null)return null;return Fe}function u(){}function c(me){var Fe=typeof me;if(Fe=="object")if(me){if(me instanceof Array)return"array";if(me instanceof Object)return Fe;var Ze=Object.prototype.toString.call(me);if(Ze=="[object Window]")return"object";if(Ze=="[object Array]"||typeof me.length=="number"&&typeof me.splice<"u"&&typeof me.propertyIsEnumerable<"u"&&!me.propertyIsEnumerable("splice"))return"array";if(Ze=="[object Function]"||typeof me.call<"u"&&typeof me.propertyIsEnumerable<"u"&&!me.propertyIsEnumerable("call"))return"function"}else return"null";else if(Fe=="function"&&typeof me.call>"u")return"object";return Fe}function d(me){var Fe=typeof me;return Fe=="object"&&me!=null||Fe=="function"}function f(me,Fe,Ze){return me.call.apply(me.bind,arguments)}function h(me,Fe,Ze){if(!me)throw Error();if(2<arguments.length){var ft=Array.prototype.slice.call(arguments,2);return function(){var Mt=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(Mt,ft),me.apply(Fe,Mt)}}return function(){return me.apply(Fe,arguments)}}function p(me,Fe,Ze){return Function.prototype.bind&&Function.prototype.bind.toString().indexOf("native code")!=-1?p=f:p=h,p.apply(null,arguments)}function g(me,Fe){function Ze(){}Ze.prototype=Fe.prototype,me.S=Fe.prototype,me.prototype=new Ze,me.prototype.constructor=me}function v(){this.a={}}v.prototype.get=function(me){return this.a[me]},v.prototype.f=function(){return Object.keys(this.a)};function y(me,Fe,Ze,ft){this.f=me,this.c=Fe,this.b=Ze,this.a=ft}y.prototype.getRequestMessage=function(){return this.f},y.prototype.getMethodDescriptor=function(){return this.c},y.prototype.getMetadata=function(){return this.b},y.prototype.getCallOptions=function(){return this.a};function m(me,Fe,Ze,ft){Ze=Ze===void 0?{}:Ze,this.c=me,this.a=Ze,this.b=Fe,this.f=ft===void 0?null:ft}m.prototype.getResponseMessage=function(){return this.c},m.prototype.getMetadata=function(){return this.a},m.prototype.getMethodDescriptor=function(){return this.b},m.prototype.getStatus=function(){return this.f};function b(me,Fe,Ze,ft,Mt,nr){this.name=me,this.a=Mt,this.b=nr}function S(me,Fe,Ze){Ze=Ze===void 0?{}:Ze;var ft=ft===void 0?new v:ft;return new y(Fe,me,Ze,ft)}function _(me,Fe,Ze,ft){return ft instanceof b?ft:new b(me,Ze,ft.b||Fe.constructor,ft.f,ft.a,ft.c)}function C(me){this.a=me}C.prototype.on=function(me,Fe){return me=="data"||me=="error"?this:this.a.on(me,Fe)},C.prototype.removeListener=function(me,Fe){return this.a.removeListener(me,Fe)},C.prototype.cancel=function(){this.a.cancel()};function T(me){switch(me){case 0:return"No Error";case 1:return"Access denied to content document";case 2:return"File not found";case 3:return"Firefox silently errored";case 4:return"Application custom error";case 5:return"An exception occurred";case 6:return"Http response at 400 or 500 level";case 7:return"Request was aborted";case 8:return"Request timed out";case 9:return"The resource is not available offline";default:return"Unrecognized error code"}}function x(me){if(Error.captureStackTrace)Error.captureStackTrace(this,x);else{var Fe=Error().stack;Fe&&(this.stack=Fe)}me&&(this.message=String(me))}g(x,Error),x.prototype.name="CustomError";function A(me,Fe){me=me.split("%s");for(var Ze="",ft=me.length-1,Mt=0;Mt<ft;Mt++)Ze+=me[Mt]+(Mt<Fe.length?Fe[Mt]:"%s");x.call(this,Ze+me[ft])}g(A,x),A.prototype.name="AssertionError";function w(me,Fe){throw new A("Failure"+(": "+me),Array.prototype.slice.call(arguments,1))}function L(){this.j=null,this.i=[],this.l=0,this.b=D,this.f=this.a=this.h=0,this.c=null,this.g=0}function k(me,Fe){function Ze(Jr){Jr==W||Jr==K?Ot.h=Jr:H(Ot,Ut,Yr,"invalid frame byte"),Ot.b=j,Ot.a=0,Ot.f=0}function ft(Jr){Ot.f++,Ot.a=(Ot.a<<8)+Jr,Ot.f==4&&(Ot.b=N,Ot.g=0,typeof Uint8Array<"u"?Ot.c=new Uint8Array(Ot.a):Ot.c=Array(Ot.a),Ot.a==0&&nr())}function Mt(Jr){Ot.c[Ot.g++]=Jr,Ot.g==Ot.a&&nr()}function nr(){var Jr={};Jr[Ot.h]=Ot.c,Ot.i.push(Jr),Ot.b=D}var Ot=me,Ut,Yr=0;for(Fe instanceof Uint8Array||Fe instanceof Array?Ut=Fe:Ut=new Uint8Array(Fe);Yr<Ut.length;){switch(Ot.b){case V:H(Ot,Ut,Yr,"stream already broken");break;case D:Ze(Ut[Yr]);break;case j:ft(Ut[Yr]);break;case N:Mt(Ut[Yr]);break;default:throw Error("unexpected parser state: "+Ot.b)}Ot.l++,Yr++}return me=Ot.i,Ot.i=[],0<me.length?me:null}var D=0,j=1,N=2,V=3,W=0,K=128;function H(me,Fe,Ze,ft){throw me.b=V,me.j="The stream is broken @"+me.l+"/"+Ze+". Error: "+ft+`. With input:
`+Fe,Error(me.j)}function U(me){switch(me){case 200:return 0;case 400:return 3;case 401:return 16;case 403:return 7;case 404:return 5;case 409:return 10;case 412:return 9;case 429:return 8;case 499:return 1;case 500:return 2;case 501:return 12;case 503:return 14;case 504:return 4;default:return 2}}var I=Array.prototype.indexOf?function(me,Fe){return Array.prototype.indexOf.call(me,Fe,void 0)}:function(me,Fe){if(typeof me=="string")return typeof Fe!="string"||Fe.length!=1?-1:me.indexOf(Fe,0);for(var Ze=0;Ze<me.length;Ze++)if(Ze in me&&me[Ze]===Fe)return Ze;return-1};function Q(me){e:{for(var Fe=uu,Ze=me.length,ft=typeof me=="string"?me.split(""):me,Mt=0;Mt<Ze;Mt++)if(Mt in ft&&Fe.call(void 0,ft[Mt],Mt,me)){Fe=Mt;break e}Fe=-1}return 0>Fe?null:typeof me=="string"?me.charAt(Fe):me[Fe]}var Z=String.prototype.trim?function(me){return me.trim()}:function(me){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(me)[1]};function ee(me,Fe){return me.indexOf(Fe)!=-1}function ie(me,Fe){return me<Fe?-1:me>Fe?1:0}var de;e:{var pe=s.navigator;if(pe){var _e=pe.userAgent;if(_e){de=_e;break e}}de=""}function Te(me,Fe){for(var Ze in me)Fe.call(void 0,me[Ze],Ze,me)}function De(me,Fe){var Ze={},ft;for(ft in me)Ze[ft]=Fe.call(void 0,me[ft],ft,me);return Ze}var Pe="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function Ee(me,Fe){for(var Ze,ft,Mt=1;Mt<arguments.length;Mt++){ft=arguments[Mt];for(Ze in ft)me[Ze]=ft[Ze];for(var nr=0;nr<Pe.length;nr++)Ze=Pe[nr],Object.prototype.hasOwnProperty.call(ft,Ze)&&(me[Ze]=ft[Ze])}}function Re(me){var Fe=1;me=me.split(":");for(var Ze=[];0<Fe&&me.length;)Ze.push(me.shift()),Fe--;return me.length&&Ze.push(me.join(":")),Ze}function je(me){return je[" "](me),me}je[" "]=u;function Ke(me,Fe){var Ze=St;return Object.prototype.hasOwnProperty.call(Ze,me)?Ze[me]:Ze[me]=Fe(me)}var ot=ee(de,"Opera"),We=ee(de,"Trident")||ee(de,"MSIE"),xe=ee(de,"Edge"),ve=ee(de,"Gecko")&&!(ee(de.toLowerCase(),"webkit")&&!ee(de,"Edge"))&&!(ee(de,"Trident")||ee(de,"MSIE"))&&!ee(de,"Edge"),he=ee(de.toLowerCase(),"webkit")&&!ee(de,"Edge");function Se(){var me=s.document;return me?me.documentMode:void 0}var be;e:{var ke="",qe=(function(){var me=de;if(ve)return/rv:([^\);]+)(\)|;)/.exec(me);if(xe)return/Edge\/([\d\.]+)/.exec(me);if(We)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(me);if(he)return/WebKit\/(\S+)/.exec(me);if(ot)return/(?:Version)[ \/]?(\S+)/.exec(me)})();if(qe&&(ke=qe?qe[1]:""),We){var rt=Se();if(rt!=null&&rt>parseFloat(ke)){be=String(rt);break e}}be=ke}var St={};function xt(me){return Ke(me,function(){for(var Fe=0,Ze=Z(String(be)).split("."),ft=Z(String(me)).split("."),Mt=Math.max(Ze.length,ft.length),nr=0;Fe==0&&nr<Mt;nr++){var Ot=Ze[nr]||"",Ut=ft[nr]||"";do{if(Ot=/(\d*)(\D*)(.*)/.exec(Ot)||["","","",""],Ut=/(\d*)(\D*)(.*)/.exec(Ut)||["","","",""],Ot[0].length==0&&Ut[0].length==0)break;Fe=ie(Ot[1].length==0?0:parseInt(Ot[1],10),Ut[1].length==0?0:parseInt(Ut[1],10))||ie(Ot[2].length==0,Ut[2].length==0)||ie(Ot[2],Ut[2]),Ot=Ot[3],Ut=Ut[3]}while(Fe==0)}return 0<=Fe})}var It;if(s.document&&We){var Zt=Se();It=Zt||parseInt(be,10)||void 0}else It=void 0;var ct=It;function Qe(){this.F=this.F}Qe.prototype.F=!1;var Et=Object.freeze||function(me){return me},Gt;(Gt=!We)||(Gt=9<=Number(ct));var Xe=Gt,Vt=We&&!xt("9"),lr=(function(){if(!s.addEventListener||!Object.defineProperty)return!1;var me=!1,Fe=Object.defineProperty({},"passive",{get:function(){me=!0}});try{s.addEventListener("test",u,Fe),s.removeEventListener("test",u,Fe)}catch{}return me})();function Jt(me,Fe){this.type=me,this.a=this.target=Fe,this.defaultPrevented=!1}Jt.prototype.b=function(){this.defaultPrevented=!0};function kr(me,Fe){if(Jt.call(this,me?me.type:""),this.relatedTarget=this.a=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.pointerId=0,this.pointerType="",this.c=null,me){var Ze=this.type=me.type,ft=me.changedTouches&&me.changedTouches.length?me.changedTouches[0]:null;if(this.target=me.target||me.srcElement,this.a=Fe,Fe=me.relatedTarget){if(ve){e:{try{je(Fe.nodeName);var Mt=!0;break e}catch{}Mt=!1}Mt||(Fe=null)}}else Ze=="mouseover"?Fe=me.fromElement:Ze=="mouseout"&&(Fe=me.toElement);this.relatedTarget=Fe,ft?(this.clientX=ft.clientX!==void 0?ft.clientX:ft.pageX,this.clientY=ft.clientY!==void 0?ft.clientY:ft.pageY,this.screenX=ft.screenX||0,this.screenY=ft.screenY||0):(this.clientX=me.clientX!==void 0?me.clientX:me.pageX,this.clientY=me.clientY!==void 0?me.clientY:me.pageY,this.screenX=me.screenX||0,this.screenY=me.screenY||0),this.button=me.button,this.key=me.key||"",this.ctrlKey=me.ctrlKey,this.altKey=me.altKey,this.shiftKey=me.shiftKey,this.metaKey=me.metaKey,this.pointerId=me.pointerId||0,this.pointerType=typeof me.pointerType=="string"?me.pointerType:qt[me.pointerType]||"",this.c=me,me.defaultPrevented&&this.b()}}g(kr,Jt);var qt=Et({2:"touch",3:"pen",4:"mouse"});kr.prototype.b=function(){kr.S.b.call(this);var me=this.c;if(me.preventDefault)me.preventDefault();else if(me.returnValue=!1,Vt)try{(me.ctrlKey||112<=me.keyCode&&123>=me.keyCode)&&(me.keyCode=-1)}catch{}};var zt="closure_listenable_"+(1e6*Math.random()|0),jr=0;function Be(me,Fe,Ze,ft,Mt){this.listener=me,this.proxy=null,this.src=Fe,this.type=Ze,this.capture=!!ft,this.A=Mt,this.key=++jr,this.s=this.v=!1}function Ge(me){me.s=!0,me.listener=null,me.proxy=null,me.src=null,me.A=null}function ut(me){this.src=me,this.a={},this.b=0}ut.prototype.add=function(me,Fe,Ze,ft,Mt){var nr=me.toString();me=this.a[nr],me||(me=this.a[nr]=[],this.b++);var Ot=Qt(me,Fe,ft,Mt);return-1<Ot?(Fe=me[Ot],Ze||(Fe.v=!1)):(Fe=new Be(Fe,this.src,nr,!!ft,Mt),Fe.v=Ze,me.push(Fe)),Fe};function Pt(me,Fe){var Ze=Fe.type;if(Ze in me.a){var ft=me.a[Ze],Mt=I(ft,Fe),nr;(nr=0<=Mt)&&Array.prototype.splice.call(ft,Mt,1),nr&&(Ge(Fe),me.a[Ze].length==0&&(delete me.a[Ze],me.b--))}}function Qt(me,Fe,Ze,ft){for(var Mt=0;Mt<me.length;++Mt){var nr=me[Mt];if(!nr.s&&nr.listener==Fe&&nr.capture==!!Ze&&nr.A==ft)return Mt}return-1}var wr="closure_lm_"+(1e6*Math.random()|0),Xr={};function pi(me,Fe,Ze,ft,Mt){if(ft&&ft.once)ci(me,Fe,Ze,ft,Mt);else if(Array.isArray(Fe))for(var nr=0;nr<Fe.length;nr++)pi(me,Fe[nr],Ze,ft,Mt);else Ze=ue(Ze),me&&me[zt]?me.f.add(String(Fe),Ze,!1,d(ft)?!!ft.capture:!!ft,Mt):Qr(me,Fe,Ze,!1,ft,Mt)}function Qr(me,Fe,Ze,ft,Mt,nr){if(!Fe)throw Error("Invalid event type");var Ot=d(Mt)?!!Mt.capture:!!Mt,Ut=vt(me);if(Ut||(me[wr]=Ut=new ut(me)),Ze=Ut.add(Fe,Ze,ft,Ot,nr),!Ze.proxy)if(ft=Ur(),Ze.proxy=ft,ft.src=me,ft.listener=Ze,me.addEventListener)lr||(Mt=Ot),Mt===void 0&&(Mt=!1),me.addEventListener(Fe.toString(),ft,Mt);else if(me.attachEvent)me.attachEvent(Dn(Fe.toString()),ft);else if(me.addListener&&me.removeListener)me.addListener(ft);else throw Error("addEventListener and attachEvent are unavailable.")}function Ur(){var me=fn,Fe=Xe?function(Ze){return me.call(Fe.src,Fe.listener,Ze)}:function(Ze){if(Ze=me.call(Fe.src,Fe.listener,Ze),!Ze)return Ze};return Fe}function ci(me,Fe,Ze,ft,Mt){if(Array.isArray(Fe))for(var nr=0;nr<Fe.length;nr++)ci(me,Fe[nr],Ze,ft,Mt);else Ze=ue(Ze),me&&me[zt]?me.f.add(String(Fe),Ze,!0,d(ft)?!!ft.capture:!!ft,Mt):Qr(me,Fe,Ze,!0,ft,Mt)}function Xt(me,Fe,Ze,ft,Mt){if(Array.isArray(Fe))for(var nr=0;nr<Fe.length;nr++)Xt(me,Fe[nr],Ze,ft,Mt);else ft=d(ft)?!!ft.capture:!!ft,Ze=ue(Ze),me&&me[zt]?(me=me.f,Fe=String(Fe).toString(),Fe in me.a&&(nr=me.a[Fe],Ze=Qt(nr,Ze,ft,Mt),-1<Ze&&(Ge(nr[Ze]),Array.prototype.splice.call(nr,Ze,1),nr.length==0&&(delete me.a[Fe],me.b--)))):me&&(me=vt(me))&&(Fe=me.a[Fe.toString()],me=-1,Fe&&(me=Qt(Fe,Ze,ft,Mt)),(Ze=-1<me?Fe[me]:null)&&Ui(Ze))}function Ui(me){if(typeof me!="number"&&me&&!me.s){var Fe=me.src;if(Fe&&Fe[zt])Pt(Fe.f,me);else{var Ze=me.type,ft=me.proxy;Fe.removeEventListener?Fe.removeEventListener(Ze,ft,me.capture):Fe.detachEvent?Fe.detachEvent(Dn(Ze),ft):Fe.addListener&&Fe.removeListener&&Fe.removeListener(ft),(Ze=vt(Fe))?(Pt(Ze,me),Ze.b==0&&(Ze.src=null,Fe[wr]=null)):Ge(me)}}}function Dn(me){return me in Xr?Xr[me]:Xr[me]="on"+me}function Kr(me,Fe,Ze,ft){var Mt=!0;if((me=vt(me))&&(Fe=me.a[Fe.toString()]))for(Fe=Fe.concat(),me=0;me<Fe.length;me++){var nr=Fe[me];nr&&nr.capture==Ze&&!nr.s&&(nr=In(nr,ft),Mt=Mt&&nr!==!1)}return Mt}function In(me,Fe){var Ze=me.listener,ft=me.A||me.src;return me.v&&Ui(me),Ze.call(ft,Fe)}function fn(me,Fe){if(me.s)return!0;if(!Xe){var Ze=Fe||l("window.event");Fe=new kr(Ze,this);var ft=!0;if(!(0>Ze.keyCode||Ze.returnValue!=null)){e:{var Mt=!1;if(Ze.keyCode==0)try{Ze.keyCode=-1;break e}catch{Mt=!0}(Mt||Ze.returnValue==null)&&(Ze.returnValue=!0)}for(Ze=[],Mt=Fe.a;Mt;Mt=Mt.parentNode)Ze.push(Mt);for(me=me.type,Mt=Ze.length-1;0<=Mt;Mt--){Fe.a=Ze[Mt];var nr=Kr(Ze[Mt],me,!0,Fe);ft=ft&&nr}for(Mt=0;Mt<Ze.length;Mt++)Fe.a=Ze[Mt],nr=Kr(Ze[Mt],me,!1,Fe),ft=ft&&nr}return ft}return In(me,new kr(Fe,this))}function vt(me){return me=me[wr],me instanceof ut?me:null}var dr="__closure_events_fn_"+(1e9*Math.random()>>>0);function ue(me){return c(me)=="function"?me:(me[dr]||(me[dr]=function(Fe){return me.handleEvent(Fe)}),me[dr])}function ar(){Qe.call(this),this.f=new ut(this),this.N=this}g(ar,Qe),ar.prototype[zt]=!0,ar.prototype.addEventListener=function(me,Fe,Ze,ft){pi(this,me,Fe,Ze,ft)},ar.prototype.removeEventListener=function(me,Fe,Ze,ft){Xt(this,me,Fe,Ze,ft)};function Bt(me,Fe){me=me.N;var Ze=Fe.type||Fe;if(typeof Fe=="string")Fe=new Jt(Fe,me);else if(Fe instanceof Jt)Fe.target=Fe.target||me;else{var ft=Fe;Fe=new Jt(Ze,me),Ee(Fe,ft)}me=Fe.a=me,Ar(me,Ze,!0,Fe),Ar(me,Ze,!1,Fe)}function Ar(me,Fe,Ze,ft){if(Fe=me.f.a[String(Fe)]){Fe=Fe.concat();for(var Mt=!0,nr=0;nr<Fe.length;++nr){var Ot=Fe[nr];if(Ot&&!Ot.s&&Ot.capture==Ze){var Ut=Ot.listener,Yr=Ot.A||Ot.src;Ot.v&&Pt(me.f,Ot),Mt=Ut.call(Yr,ft)!==!1&&Mt}}}}function br(me,Fe,Ze){if(c(me)=="function")Ze&&(me=p(me,Ze));else if(me&&typeof me.handleEvent=="function")me=p(me.handleEvent,me);else throw Error("Invalid listener argument");return 2147483647<Number(Fe)?-1:s.setTimeout(me,Fe||0)}function Br(me,Fe,Ze){this.reset(me,Fe,Ze,void 0,void 0)}Br.prototype.a=null,Br.prototype.reset=function(me,Fe,Ze,ft,Mt){delete this.a};function ai(me){this.f=me,this.b=this.c=this.a=null}function Nn(me,Fe){this.name=me,this.value=Fe}Nn.prototype.toString=function(){return this.name};var nt=new Nn("SEVERE",1e3),_o=new Nn("CONFIG",700),si=new Nn("FINE",500);function ti(me){return me.c?me.c:me.a?ti(me.a):(w("Root logger has no level set."),null)}ai.prototype.log=function(me,Fe,Ze){if(me.value>=ti(this).value)for(c(Fe)=="function"&&(Fe=Fe()),me=new Br(me,String(Fe),this.f),Ze&&(me.a=Ze),Ze=this;Ze;)Ze=Ze.a};var rr={},is=null;function wa(me){is||(is=new ai(""),rr[""]=is,is.c=_o);var Fe;if(!(Fe=rr[me])){Fe=new ai(me);var Ze=me.lastIndexOf("."),ft=me.substr(Ze+1);Ze=wa(me.substr(0,Ze)),Ze.b||(Ze.b={}),Ze.b[ft]=Fe,Fe.a=Ze,rr[me]=Fe}return Fe}function q(me,Fe){me&&me.log(si,Fe,void 0)}function te(){}te.prototype.a=null;function fe(me){var Fe;return(Fe=me.a)||(Fe={},cr(me)&&(Fe[0]=!0,Fe[1]=!0),Fe=me.a=Fe),Fe}var Ue;function pt(){}g(pt,te);function At(me){return(me=cr(me))?new ActiveXObject(me):new XMLHttpRequest}function cr(me){if(!me.b&&typeof XMLHttpRequest>"u"&&typeof ActiveXObject<"u"){for(var Fe=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],Ze=0;Ze<Fe.length;Ze++){var ft=Fe[Ze];try{return new ActiveXObject(ft),me.b=ft}catch{}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed")}return me.b}Ue=new pt;function Hr(me,Fe){this.b={},this.a=[],this.c=0;var Ze=arguments.length;if(1<Ze){if(Ze%2)throw Error("Uneven number of arguments");for(var ft=0;ft<Ze;ft+=2)this.set(arguments[ft],arguments[ft+1])}else me&&Fn(this,me)}Hr.prototype.f=function(){return Yi(this),this.a.concat()};function Yi(me){if(me.c!=me.a.length){for(var Fe=0,Ze=0;Fe<me.a.length;){var ft=me.a[Fe];No(me.b,ft)&&(me.a[Ze++]=ft),Fe++}me.a.length=Ze}if(me.c!=me.a.length){var Mt={};for(Ze=Fe=0;Fe<me.a.length;)ft=me.a[Fe],No(Mt,ft)||(me.a[Ze++]=ft,Mt[ft]=1),Fe++;me.a.length=Ze}}Hr.prototype.get=function(me,Fe){return No(this.b,me)?this.b[me]:Fe},Hr.prototype.set=function(me,Fe){No(this.b,me)||(this.c++,this.a.push(me)),this.b[me]=Fe};function Fn(me,Fe){if(Fe instanceof Hr)for(var Ze=Fe.f(),ft=0;ft<Ze.length;ft++)me.set(Ze[ft],Fe.get(Ze[ft]));else for(Ze in Fe)me.set(Ze,Fe[Ze])}Hr.prototype.forEach=function(me,Fe){for(var Ze=this.f(),ft=0;ft<Ze.length;ft++){var Mt=Ze[ft],nr=this.get(Mt);me.call(Fe,nr,Mt,this)}};function No(me,Fe){return Object.prototype.hasOwnProperty.call(me,Fe)}var Ms=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^\\/?#]*)@)?([^\\/?#]*?)(?::([0-9]+))?(?=[\\/?#]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function _a(me){ar.call(this),this.headers=new Hr,this.D=me||null,this.c=!1,this.C=this.a=null,this.J=this.o="",this.g=0,this.i="",this.h=this.I=this.m=this.G=!1,this.l=0,this.u=null,this.j=Ua,this.B=this.H=!1}g(_a,ar);var Ua="",su=_a.prototype,Oa=wa("goog.net.XhrIo");su.b=Oa;var lu=/^https?$/i,Qs=["POST","PUT"];function bl(me,Fe,Ze){if(me.a)throw Error("[goog.net.XhrIo] Object is active with another request="+me.o+"; newUri="+Fe);me.o=Fe,me.i="",me.g=0,me.J="POST",me.G=!1,me.c=!0,me.a=me.D?At(me.D):At(Ue),me.C=me.D?fe(me.D):fe(Ue),me.a.onreadystatechange=p(me.K,me);try{q(me.b,ra(me,"Opening Xhr")),me.I=!0,me.a.open("POST",String(Fe),!0),me.I=!1}catch(nr){q(me.b,ra(me,"Error opening Xhr: "+nr.message)),ys(me,nr);return}Fe=Ze||"",Ze=new Hr(me.headers);var ft=Q(Ze.f()),Mt=s.FormData&&Fe instanceof s.FormData;!(0<=I(Qs,"POST"))||ft||Mt||Ze.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),Ze.forEach(function(nr,Ot){this.a.setRequestHeader(Ot,nr)},me),me.j&&(me.a.responseType=me.j),"withCredentials"in me.a&&me.a.withCredentials!==me.H&&(me.a.withCredentials=me.H);try{vc(me),0<me.l&&(me.B=Sl(me.a),q(me.b,ra(me,"Will abort after "+me.l+"ms if incomplete, xhr2 "+me.B)),me.B?(me.a.timeout=me.l,me.a.ontimeout=p(me.L,me)):me.u=br(me.L,me.l,me)),q(me.b,ra(me,"Sending request")),me.m=!0,me.a.send(Fe),me.m=!1}catch(nr){q(me.b,ra(me,"Send error: "+nr.message)),ys(me,nr)}}function Sl(me){return We&&xt(9)&&typeof me.timeout=="number"&&me.ontimeout!==void 0}function uu(me){return me.toLowerCase()=="content-type"}_a.prototype.L=function(){typeof a<"u"&&this.a&&(this.i="Timed out after "+this.l+"ms, aborting",this.g=8,q(this.b,ra(this,this.i)),Bt(this,"timeout"),this.abort(8))};function ys(me,Fe){me.c=!1,me.a&&(me.h=!0,me.a.abort(),me.h=!1),me.i=Fe,me.g=5,Fo(me),Pa(me)}function Fo(me){me.G||(me.G=!0,Bt(me,"complete"),Bt(me,"error"))}_a.prototype.abort=function(me){this.a&&this.c&&(q(this.b,ra(this,"Aborting")),this.c=!1,this.h=!0,this.a.abort(),this.h=!1,this.g=me||7,Bt(this,"complete"),Bt(this,"abort"),Pa(this))},_a.prototype.K=function(){this.F||(this.I||this.m||this.h?Kc(this):this.O())},_a.prototype.O=function(){Kc(this)};function Kc(me){if(me.c&&typeof a<"u"){if(me.C[1]&&Ls(me)==4&&me.getStatus()==2)q(me.b,ra(me,"Local request error detected and ignored"));else if(me.m&&Ls(me)==4)br(me.K,0,me);else if(Bt(me,"readystatechange"),Ls(me)==4){q(me.b,ra(me,"Request complete")),me.c=!1;try{var Fe=me.getStatus();e:switch(Fe){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var Ze=!0;break e;default:Ze=!1}var ft;if(!(ft=Ze)){var Mt;if(Mt=Fe===0){var nr=String(me.o).match(Ms)[1]||null;if(!nr&&s.self&&s.self.location){var Ot=s.self.location.protocol;nr=Ot.substr(0,Ot.length-1)}Mt=!lu.test(nr?nr.toLowerCase():"")}ft=Mt}if(ft)Bt(me,"complete"),Bt(me,"success");else{me.g=6;try{var Ut=2<Ls(me)?me.a.statusText:""}catch(Yr){q(me.b,"Can not get status: "+Yr.message),Ut=""}me.i=Ut+" ["+me.getStatus()+"]",Fo(me)}}finally{Pa(me)}}}}function Pa(me){if(me.a){vc(me);var Fe=me.a,Ze=me.C[0]?u:null;me.a=null,me.C=null,Bt(me,"ready");try{Fe.onreadystatechange=Ze}catch(ft){(me=me.b)&&me.log(nt,"Problem encountered resetting onreadystatechange: "+ft.message,void 0)}}}function vc(me){me.a&&me.B&&(me.a.ontimeout=null),me.u&&(s.clearTimeout(me.u),me.u=null)}function Ls(me){return me.a?me.a.readyState:0}_a.prototype.getStatus=function(){try{return 2<Ls(this)?this.a.status:-1}catch{return-1}};function ns(me){try{if(!me.a)return null;if("response"in me.a)return me.a.response;switch(me.j){case Ua:case"text":return me.a.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in me.a)return me.a.mozResponseArrayBuffer}var Fe=me.b;return Fe&&Fe.log(nt,"Response type "+me.j+" is not supported on this browser",void 0),null}catch(Ze){return q(me.b,"Can not get response: "+Ze.message),null}}function el(me,Fe){if(me.a&&Ls(me)==4)return me=me.a.getResponseHeader(Fe),me===null?void 0:me}function ao(me){var Fe={};me=(me.a&&Ls(me)==4&&me.a.getAllResponseHeaders()||"").split(`\r
`);for(var Ze=0;Ze<me.length;Ze++)if(!/^[\s\xa0]*$/.test(me[Ze])){var ft=Re(me[Ze]),Mt=ft[0];if(ft=ft[1],typeof ft=="string"){ft=ft.trim();var nr=Fe[Mt]||[];Fe[Mt]=nr,nr.push(ft)}}return De(Fe,function(Ot){return Ot.join(", ")})}function ra(me,Fe){return Fe+" ["+me.J+" "+me.o+" "+me.getStatus()+"]"}var fo={},Hn=null;function ks(me){var Fe=me.length,Ze=3*Fe/4;Ze%3?Ze=Math.floor(Ze):ee("=.",me[Fe-1])&&(Ze=ee("=.",me[Fe-2])?Ze-2:Ze-1);var ft=new Uint8Array(Ze),Mt=0;return cu(me,function(nr){ft[Mt++]=nr}),ft.subarray(0,Mt)}function cu(me,Fe){function Ze(Yr){for(;ft<me.length;){var Jr=me.charAt(ft++),li=Hn[Jr];if(li!=null)return li;if(!/^[\s\xa0]*$/.test(Jr))throw Error("Unknown base64 encoding at char: "+Jr)}return Yr}Yl();for(var ft=0;;){var Mt=Ze(-1),nr=Ze(0),Ot=Ze(64),Ut=Ze(64);if(Ut===64&&Mt===-1)break;Fe(Mt<<2|nr>>4),Ot!=64&&(Fe(nr<<4&240|Ot>>2),Ut!=64&&Fe(Ot<<6&192|Ut))}}function Yl(){if(!Hn){Hn={};for(var me="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),Fe=["+/=","+/","-_=","-_.","-_"],Ze=0;5>Ze;Ze++){var ft=me.concat(Fe[Ze].split(""));fo[Ze]=ft;for(var Mt=0;Mt<ft.length;Mt++){var nr=ft[Mt];Hn[nr]===void 0&&(Hn[nr]=Mt)}}}}var yc=["content-type","grpc-status","grpc-message"];function ia(me){this.a=me.T,this.l=null,this.b=[],this.h=[],this.g=[],this.f=[],this.c=[],this.j=!1,this.i=0,this.m=new L;var Fe=this;pi(this.a,"readystatechange",function(){var Ze=Fe.a;if(Ze=Ze.a?Ze.a.getResponseHeader("Content-Type"):null){if(Ze=Ze.toLowerCase(),Ze.lastIndexOf("application/grpc-web-text",0)==0){Ze=Fe.a;try{var ft=Ze.a?Ze.a.responseText:""}catch(Jr){q(Ze.b,"Can not get responseText: "+Jr.message),ft=""}if(Ze=ft||"",ft=Ze.length-Ze.length%4,Ze=Ze.substr(Fe.i,ft-Fe.i),Ze.length==0)return;Fe.i=ft,Ze=ks(Ze)}else if(Ze.lastIndexOf("application/grpc",0)==0)Ze=new Uint8Array(ns(Fe.a));else{qo(Fe,{code:2,message:"Unknown Content-type received.",metadata:{}});return}ft=null;try{ft=k(Fe.m,Ze)}catch{qo(Fe,{code:2,message:"Error in parsing response body",metadata:{}})}if(ft)for(Ze=0;Ze<ft.length;Ze++){if(W in ft[Ze]){var Mt=ft[Ze][W];if(Mt)try{var nr=Fe.l(Mt);if(nr){Mt=Fe;for(var Ot=nr,Ut=0;Ut<Mt.b.length;Ut++)Mt.b[Ut](Ot)}}catch{qo(Fe,{code:2,message:"Error in response deserializer function.",metadata:{}})}}if(K in ft[Ze]&&0<ft[Ze][K].length){for(Mt="",Ot=0;Ot<ft[Ze][K].length;Ot++)Mt+=String.fromCharCode(ft[Ze][K][Ot]);for(Mt=Mt.trim().split(`\r
`),Ot={},Ut=0;Ut<Mt.length;Ut++){var Yr=Mt[Ut].indexOf(":");Ot[Mt[Ut].substring(0,Yr).trim()]=Mt[Ut].substring(Yr+1).trim()}Mt=Ot,Ot=0,Ut="","grpc-status"in Mt&&(Ot=Mt["grpc-status"],delete Mt["grpc-status"]),"grpc-message"in Mt&&(Ut=Mt["grpc-message"],delete Mt["grpc-message"]),qo(Fe,{code:Number(Ot),message:Ut,metadata:Mt})}}}}),pi(this.a,"complete",function(){var Ze=Fe.a.g,ft="",Mt={},nr=ao(Fe.a);if(Object.keys(nr).forEach(function(Ut){yc.includes(Ut)||(Mt[Ut]=nr[Ut])}),Zc(Fe,Mt),Ze!=0){switch(Ze){case 7:var Ot=10;break;case 8:Ot=4;break;case 6:Ot=U(Fe.a.getStatus());break;default:Ot=14}Ot==10&&Fe.j||qo(Fe,{code:Ot,message:T(Ze),metadata:{}})}else Ze=!1,"grpc-status"in nr&&(Ot=el(Fe.a,"grpc-status"),"grpc-message"in nr&&(ft=el(Fe.a,"grpc-message")),Number(Ot)!=0&&(qo(Fe,{code:Number(Ot),message:ft,metadata:nr}),Ze=!0)),Ze||Iu(Fe)})}ia.prototype.on=function(me,Fe){return me=="data"?this.b.push(Fe):me=="status"?this.h.push(Fe):me=="metadata"?this.g.push(Fe):me=="end"?this.c.push(Fe):me=="error"&&this.f.push(Fe),this};function fa(me,Fe){Fe=me.indexOf(Fe),-1<Fe&&me.splice(Fe,1)}ia.prototype.removeListener=function(me,Fe){return me=="data"?fa(this.b,Fe):me=="status"?fa(this.h,Fe):me=="metadata"?fa(this.g,Fe):me=="end"?fa(this.c,Fe):me=="error"&&fa(this.f,Fe),this},ia.prototype.cancel=function(){this.j=!0,this.a.abort()};function qo(me,Fe){if(Fe.code!=0)for(var Ze={code:Fe.code,message:decodeURIComponent(Fe.message||""),metadata:Fe.metadata},ft=0;ft<me.f.length;ft++)me.f[ft](Ze);for(Fe={code:Fe.code,details:decodeURIComponent(Fe.message||""),metadata:Fe.metadata},Ze=0;Ze<me.h.length;Ze++)me.h[Ze](Fe)}function Zc(me,Fe){for(var Ze=0;Ze<me.g.length;Ze++)me.g[Ze](Fe)}function Iu(me){for(var Fe=0;Fe<me.c.length;Fe++)me.c[Fe]()}ia.prototype.cancel=ia.prototype.cancel,ia.prototype.removeListener=ia.prototype.removeListener,ia.prototype.on=ia.prototype.on;function ms(me){var Fe="";return Te(me,function(Ze,ft){Fe+=ft,Fe+=":",Fe+=Ze,Fe+=`\r
`}),Fe}function jo(me){this.a=l("format",me)||"text",this.f=l("suppressCorsPreflight",me)||!1,this.c=l("withCredentials",me)||!1,this.b=l("streamInterceptors",me)||[],this.g=l("unaryInterceptors",me)||[]}jo.prototype.P=function(me,Fe,Ze,ft,Mt){var nr=this;ft=_(me,Fe,"unary",ft);var Ot=me.substr(0,me.length-ft.name.length);return me=du(function(Ut){return zi(nr,Ut,Ot)},this.b).call(this,S(ft,Fe,Ze)),on(me,Mt,!1),new C(me)},jo.prototype.M=function(me,Fe,Ze,ft){var Mt=this;ft=_(me,Fe,"unary",ft);var nr=me.substr(0,me.length-ft.name.length);return du(function(Ot){return new Promise(function(Ut,Yr){var Jr=zi(Mt,Ot,nr),li,Ci,Di;on(Jr,function(za,ha,Is,tl){za?Yr(za):ha?Di=ha:Is?Ci=Is:tl?li=tl:(za=Ot.getMethodDescriptor(),ha=li,ha=ha===void 0?{}:ha,Ut(new m(Di,za,ha,Ci===void 0?null:Ci)))},!0)})},this.g).call(this,S(ft,Fe,Ze)).then(function(Ot){return Ot.getResponseMessage()})},jo.prototype.unaryCall=function(me,Fe,Ze,ft){return this.M(me,Fe,Ze,ft)},jo.prototype.R=function(me,Fe,Ze,ft){var Mt=this;ft=_(me,Fe,"server_streaming",ft);var nr=me.substr(0,me.length-ft.name.length);return du(function(Ot){return zi(Mt,Ot,nr)},this.b).call(this,S(ft,Fe,Ze))};function zi(me,Fe,Ze){var ft=Fe.getMethodDescriptor(),Mt=Ze+ft.name;Ze=new _a,Ze.H=me.c;var nr=new ia({T:Ze});if(nr.l=ft.b,Fn(Ze.headers,Fe.getMetadata()),me.a=="text"?(Ze.headers.set("Content-Type","application/grpc-web-text"),Ze.headers.set("Accept","application/grpc-web-text")):Ze.headers.set("Content-Type","application/grpc-web+proto"),Ze.headers.set("X-User-Agent","grpc-web-javascript/0.1"),Ze.headers.set("X-Grpc-Web","1"),No(Ze.headers.b,"deadline")){var Ot=Ze.headers.get("deadline");Ot=Math.round(Ot-new Date().getTime());var Ut=Ze.headers;No(Ut.b,"deadline")&&(delete Ut.b.deadline,Ut.c--,Ut.a.length>2*Ut.c&&Yi(Ut)),Ot===1/0&&(Ot=0),0<Ot&&Ze.headers.set("grpc-timeout",Ot+"m")}if(me.f){Ut=Ze.headers,Yi(Ut),Ot={};for(var Yr=0;Yr<Ut.a.length;Yr++){var Jr=Ut.a[Yr];Ot[Jr]=Ut.b[Jr]}Ut=Ze.headers,Ut.b={},Ut.a.length=0,Ut.c=0;e:{for(li in Ot){var li=!1;break e}li=!0}li||(Ot=ms(Ot),typeof Mt=="string"?(li=encodeURIComponent("$httpHeaders"),Ot=Ot!=null?"="+encodeURIComponent(String(Ot)):"",(li+=Ot)&&(Ot=Mt.indexOf("#"),0>Ot&&(Ot=Mt.length),Ut=Mt.indexOf("?"),0>Ut||Ut>Ot?(Ut=Ot,Yr=""):Yr=Mt.substring(Ut+1,Ot),Mt=[Mt.substr(0,Ut),Yr,Mt.substr(Ot)],Ot=Mt[1],Mt[1]=li?Ot?Ot+"&"+li:li:Ot,Mt=Mt[0]+(Mt[1]?"?"+Mt[1]:"")+Mt[2])):Mt.a("$httpHeaders",Ot))}for(Fe=(0,ft.a)(Fe.getRequestMessage()),ft=Fe.length,li=[0,0,0,0],Ot=new Uint8Array(5+ft),Ut=3;0<=Ut;Ut--)li[Ut]=ft%256,ft>>>=8;if(Ot.set(new Uint8Array(li),1),Ot.set(Fe,5),Fe=Ot,me.a=="text"){me=Fe;var Ci;for(Ci===void 0&&(Ci=0),Yl(),Ci=fo[Ci],Fe=[],ft=0;ft<me.length;ft+=3){Jr=me[ft];var Di=(li=ft+1<me.length)?me[ft+1]:0;Yr=(Ot=ft+2<me.length)?me[ft+2]:0,Ut=Jr>>2,Jr=(Jr&3)<<4|Di>>4,Di=(Di&15)<<2|Yr>>6,Yr&=63,Ot||(Yr=64,li||(Di=64)),Fe.push(Ci[Ut],Ci[Jr],Ci[Di]||"",Ci[Yr]||"")}Fe=Fe.join("")}else me.a=="binary"&&(Ze.j="arraybuffer");return bl(Ze,Mt,Fe),nr}function on(me,Fe,Ze){var ft=null,Mt=!1;me.on("data",function(nr){ft=nr}),me.on("error",function(nr){nr.code==0||Mt||(Mt=!0,Fe(nr,null))}),me.on("status",function(nr){nr.code==0||Mt?Ze&&Fe(null,null,nr):(Mt=!0,Fe({code:nr.code,message:nr.details,metadata:nr.metadata},null))}),Ze&&me.on("metadata",function(nr){Fe(null,null,null,nr)}),me.on("end",function(){Mt||(ft==null?Fe({code:2,message:"Incomplete response"}):Fe(null,ft)),Ze&&Fe(null,null)})}function du(me,Fe){var Ze=me;return Fe.forEach(function(ft){var Mt=Ze;Ze=function(nr){return ft.intercept(nr,Mt)}}),Ze}return jo.prototype.serverStreaming=jo.prototype.R,jo.prototype.unaryCall=jo.prototype.unaryCall,jo.prototype.thenableCall=jo.prototype.M,jo.prototype.rpcCall=jo.prototype.P,p0.AbstractClientBase={MethodInfo:function(me,Fe,Ze,ft,Mt){this.name=ft,this.b=Mt,this.f=me,this.a=Fe,this.c=Ze}},p0.GrpcWebClientBase=jo,p0.StatusCode={OK:0,CANCELLED:1,UNKNOWN:2,INVALID_ARGUMENT:3,DEADLINE_EXCEEDED:4,NOT_FOUND:5,ALREADY_EXISTS:6,PERMISSION_DENIED:7,UNAUTHENTICATED:16,RESOURCE_EXHAUSTED:8,FAILED_PRECONDITION:9,ABORTED:10,OUT_OF_RANGE:11,UNIMPLEMENTED:12,INTERNAL:13,UNAVAILABLE:14,DATA_LOSS:15},p0.MethodDescriptor=b,p0.MethodType={UNARY:"unary",SERVER_STREAMING:"server_streaming"},p0}var MW={},LW={},que;function Wze(){return que||(que=1,(function(r){var e=n_(),i=e,n=Function("return this")();i.exportSymbol("proto.google.api.CustomHttpPattern",null,n),i.exportSymbol("proto.google.api.Http",null,n),i.exportSymbol("proto.google.api.HttpRule",null,n),i.exportSymbol("proto.google.api.HttpRule.PatternCase",null,n),proto.google.api.Http=function(t){e.Message.initialize(this,t,0,-1,proto.google.api.Http.repeatedFields_,null)},i.inherits(proto.google.api.Http,e.Message),i.DEBUG&&!COMPILED&&(proto.google.api.Http.displayName="proto.google.api.Http"),proto.google.api.HttpRule=function(t){e.Message.initialize(this,t,0,-1,proto.google.api.HttpRule.repeatedFields_,proto.google.api.HttpRule.oneofGroups_)},i.inherits(proto.google.api.HttpRule,e.Message),i.DEBUG&&!COMPILED&&(proto.google.api.HttpRule.displayName="proto.google.api.HttpRule"),proto.google.api.CustomHttpPattern=function(t){e.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.google.api.CustomHttpPattern,e.Message),i.DEBUG&&!COMPILED&&(proto.google.api.CustomHttpPattern.displayName="proto.google.api.CustomHttpPattern"),proto.google.api.Http.repeatedFields_=[1],e.Message.GENERATE_TO_OBJECT&&(proto.google.api.Http.prototype.toObject=function(t){return proto.google.api.Http.toObject(t,this)},proto.google.api.Http.toObject=function(t,o){var a={rulesList:e.Message.toObjectList(o.getRulesList(),proto.google.api.HttpRule.toObject,t),fullyDecodeReservedExpansion:e.Message.getBooleanFieldWithDefault(o,2,!1)};return t&&(a.$jspbMessageInstance=o),a}),proto.google.api.Http.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.google.api.Http;return proto.google.api.Http.deserializeBinaryFromReader(a,o)},proto.google.api.Http.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 1:var s=new proto.google.api.HttpRule;o.readMessage(s,proto.google.api.HttpRule.deserializeBinaryFromReader),t.addRules(s);break;case 2:var s=o.readBool();t.setFullyDecodeReservedExpansion(s);break;default:o.skipField();break}}return t},proto.google.api.Http.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.google.api.Http.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.google.api.Http.serializeBinaryToWriter=function(t,o){var a=void 0;a=t.getRulesList(),a.length>0&&o.writeRepeatedMessage(1,a,proto.google.api.HttpRule.serializeBinaryToWriter),a=t.getFullyDecodeReservedExpansion(),a&&o.writeBool(2,a)},proto.google.api.Http.prototype.getRulesList=function(){return e.Message.getRepeatedWrapperField(this,proto.google.api.HttpRule,1)},proto.google.api.Http.prototype.setRulesList=function(t){return e.Message.setRepeatedWrapperField(this,1,t)},proto.google.api.Http.prototype.addRules=function(t,o){return e.Message.addToRepeatedWrapperField(this,1,t,proto.google.api.HttpRule,o)},proto.google.api.Http.prototype.clearRulesList=function(){return this.setRulesList([])},proto.google.api.Http.prototype.getFullyDecodeReservedExpansion=function(){return e.Message.getBooleanFieldWithDefault(this,2,!1)},proto.google.api.Http.prototype.setFullyDecodeReservedExpansion=function(t){return e.Message.setProto3BooleanField(this,2,t)},proto.google.api.HttpRule.repeatedFields_=[11],proto.google.api.HttpRule.oneofGroups_=[[2,3,4,5,6,8]],proto.google.api.HttpRule.PatternCase={PATTERN_NOT_SET:0,GET:2,PUT:3,POST:4,DELETE:5,PATCH:6,CUSTOM:8},proto.google.api.HttpRule.prototype.getPatternCase=function(){return e.Message.computeOneofCase(this,proto.google.api.HttpRule.oneofGroups_[0])},e.Message.GENERATE_TO_OBJECT&&(proto.google.api.HttpRule.prototype.toObject=function(t){return proto.google.api.HttpRule.toObject(t,this)},proto.google.api.HttpRule.toObject=function(t,o){var a,s={selector:e.Message.getFieldWithDefault(o,1,""),get:e.Message.getFieldWithDefault(o,2,""),put:e.Message.getFieldWithDefault(o,3,""),post:e.Message.getFieldWithDefault(o,4,""),pb_delete:e.Message.getFieldWithDefault(o,5,""),patch:e.Message.getFieldWithDefault(o,6,""),custom:(a=o.getCustom())&&proto.google.api.CustomHttpPattern.toObject(t,a),body:e.Message.getFieldWithDefault(o,7,""),responseBody:e.Message.getFieldWithDefault(o,12,""),additionalBindingsList:e.Message.toObjectList(o.getAdditionalBindingsList(),proto.google.api.HttpRule.toObject,t)};return t&&(s.$jspbMessageInstance=o),s}),proto.google.api.HttpRule.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.google.api.HttpRule;return proto.google.api.HttpRule.deserializeBinaryFromReader(a,o)},proto.google.api.HttpRule.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 1:var s=o.readString();t.setSelector(s);break;case 2:var s=o.readString();t.setGet(s);break;case 3:var s=o.readString();t.setPut(s);break;case 4:var s=o.readString();t.setPost(s);break;case 5:var s=o.readString();t.setDelete(s);break;case 6:var s=o.readString();t.setPatch(s);break;case 8:var s=new proto.google.api.CustomHttpPattern;o.readMessage(s,proto.google.api.CustomHttpPattern.deserializeBinaryFromReader),t.setCustom(s);break;case 7:var s=o.readString();t.setBody(s);break;case 12:var s=o.readString();t.setResponseBody(s);break;case 11:var s=new proto.google.api.HttpRule;o.readMessage(s,proto.google.api.HttpRule.deserializeBinaryFromReader),t.addAdditionalBindings(s);break;default:o.skipField();break}}return t},proto.google.api.HttpRule.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.google.api.HttpRule.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.google.api.HttpRule.serializeBinaryToWriter=function(t,o){var a=void 0;a=t.getSelector(),a.length>0&&o.writeString(1,a),a=e.Message.getField(t,2),a!=null&&o.writeString(2,a),a=e.Message.getField(t,3),a!=null&&o.writeString(3,a),a=e.Message.getField(t,4),a!=null&&o.writeString(4,a),a=e.Message.getField(t,5),a!=null&&o.writeString(5,a),a=e.Message.getField(t,6),a!=null&&o.writeString(6,a),a=t.getCustom(),a!=null&&o.writeMessage(8,a,proto.google.api.CustomHttpPattern.serializeBinaryToWriter),a=t.getBody(),a.length>0&&o.writeString(7,a),a=t.getResponseBody(),a.length>0&&o.writeString(12,a),a=t.getAdditionalBindingsList(),a.length>0&&o.writeRepeatedMessage(11,a,proto.google.api.HttpRule.serializeBinaryToWriter)},proto.google.api.HttpRule.prototype.getSelector=function(){return e.Message.getFieldWithDefault(this,1,"")},proto.google.api.HttpRule.prototype.setSelector=function(t){return e.Message.setProto3StringField(this,1,t)},proto.google.api.HttpRule.prototype.getGet=function(){return e.Message.getFieldWithDefault(this,2,"")},proto.google.api.HttpRule.prototype.setGet=function(t){return e.Message.setOneofField(this,2,proto.google.api.HttpRule.oneofGroups_[0],t)},proto.google.api.HttpRule.prototype.clearGet=function(){return e.Message.setOneofField(this,2,proto.google.api.HttpRule.oneofGroups_[0],void 0)},proto.google.api.HttpRule.prototype.hasGet=function(){return e.Message.getField(this,2)!=null},proto.google.api.HttpRule.prototype.getPut=function(){return e.Message.getFieldWithDefault(this,3,"")},proto.google.api.HttpRule.prototype.setPut=function(t){return e.Message.setOneofField(this,3,proto.google.api.HttpRule.oneofGroups_[0],t)},proto.google.api.HttpRule.prototype.clearPut=function(){return e.Message.setOneofField(this,3,proto.google.api.HttpRule.oneofGroups_[0],void 0)},proto.google.api.HttpRule.prototype.hasPut=function(){return e.Message.getField(this,3)!=null},proto.google.api.HttpRule.prototype.getPost=function(){return e.Message.getFieldWithDefault(this,4,"")},proto.google.api.HttpRule.prototype.setPost=function(t){return e.Message.setOneofField(this,4,proto.google.api.HttpRule.oneofGroups_[0],t)},proto.google.api.HttpRule.prototype.clearPost=function(){return e.Message.setOneofField(this,4,proto.google.api.HttpRule.oneofGroups_[0],void 0)},proto.google.api.HttpRule.prototype.hasPost=function(){return e.Message.getField(this,4)!=null},proto.google.api.HttpRule.prototype.getDelete=function(){return e.Message.getFieldWithDefault(this,5,"")},proto.google.api.HttpRule.prototype.setDelete=function(t){return e.Message.setOneofField(this,5,proto.google.api.HttpRule.oneofGroups_[0],t)},proto.google.api.HttpRule.prototype.clearDelete=function(){return e.Message.setOneofField(this,5,proto.google.api.HttpRule.oneofGroups_[0],void 0)},proto.google.api.HttpRule.prototype.hasDelete=function(){return e.Message.getField(this,5)!=null},proto.google.api.HttpRule.prototype.getPatch=function(){return e.Message.getFieldWithDefault(this,6,"")},proto.google.api.HttpRule.prototype.setPatch=function(t){return e.Message.setOneofField(this,6,proto.google.api.HttpRule.oneofGroups_[0],t)},proto.google.api.HttpRule.prototype.clearPatch=function(){return e.Message.setOneofField(this,6,proto.google.api.HttpRule.oneofGroups_[0],void 0)},proto.google.api.HttpRule.prototype.hasPatch=function(){return e.Message.getField(this,6)!=null},proto.google.api.HttpRule.prototype.getCustom=function(){return e.Message.getWrapperField(this,proto.google.api.CustomHttpPattern,8)},proto.google.api.HttpRule.prototype.setCustom=function(t){return e.Message.setOneofWrapperField(this,8,proto.google.api.HttpRule.oneofGroups_[0],t)},proto.google.api.HttpRule.prototype.clearCustom=function(){return this.setCustom(void 0)},proto.google.api.HttpRule.prototype.hasCustom=function(){return e.Message.getField(this,8)!=null},proto.google.api.HttpRule.prototype.getBody=function(){return e.Message.getFieldWithDefault(this,7,"")},proto.google.api.HttpRule.prototype.setBody=function(t){return e.Message.setProto3StringField(this,7,t)},proto.google.api.HttpRule.prototype.getResponseBody=function(){return e.Message.getFieldWithDefault(this,12,"")},proto.google.api.HttpRule.prototype.setResponseBody=function(t){return e.Message.setProto3StringField(this,12,t)},proto.google.api.HttpRule.prototype.getAdditionalBindingsList=function(){return e.Message.getRepeatedWrapperField(this,proto.google.api.HttpRule,11)},proto.google.api.HttpRule.prototype.setAdditionalBindingsList=function(t){return e.Message.setRepeatedWrapperField(this,11,t)},proto.google.api.HttpRule.prototype.addAdditionalBindings=function(t,o){return e.Message.addToRepeatedWrapperField(this,11,t,proto.google.api.HttpRule,o)},proto.google.api.HttpRule.prototype.clearAdditionalBindingsList=function(){return this.setAdditionalBindingsList([])},e.Message.GENERATE_TO_OBJECT&&(proto.google.api.CustomHttpPattern.prototype.toObject=function(t){return proto.google.api.CustomHttpPattern.toObject(t,this)},proto.google.api.CustomHttpPattern.toObject=function(t,o){var a={kind:e.Message.getFieldWithDefault(o,1,""),path:e.Message.getFieldWithDefault(o,2,"")};return t&&(a.$jspbMessageInstance=o),a}),proto.google.api.CustomHttpPattern.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.google.api.CustomHttpPattern;return proto.google.api.CustomHttpPattern.deserializeBinaryFromReader(a,o)},proto.google.api.CustomHttpPattern.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 1:var s=o.readString();t.setKind(s);break;case 2:var s=o.readString();t.setPath(s);break;default:o.skipField();break}}return t},proto.google.api.CustomHttpPattern.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.google.api.CustomHttpPattern.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.google.api.CustomHttpPattern.serializeBinaryToWriter=function(t,o){var a=void 0;a=t.getKind(),a.length>0&&o.writeString(1,a),a=t.getPath(),a.length>0&&o.writeString(2,a)},proto.google.api.CustomHttpPattern.prototype.getKind=function(){return e.Message.getFieldWithDefault(this,1,"")},proto.google.api.CustomHttpPattern.prototype.setKind=function(t){return e.Message.setProto3StringField(this,1,t)},proto.google.api.CustomHttpPattern.prototype.getPath=function(){return e.Message.getFieldWithDefault(this,2,"")},proto.google.api.CustomHttpPattern.prototype.setPath=function(t){return e.Message.setProto3StringField(this,2,t)},i.object.extend(r,proto.google.api)})(LW)),LW}var kW={},Xue;function Gze(){return Xue||(Xue=1,(function(r){var e=n_(),i=e,n=typeof globalThis<"u"&&globalThis||typeof window<"u"&&window||typeof n<"u"&&n||typeof self<"u"&&self||(function(){return this}).call(null)||Function("return this")();i.exportSymbol("proto.google.protobuf.DescriptorProto",null,n),i.exportSymbol("proto.google.protobuf.DescriptorProto.ExtensionRange",null,n),i.exportSymbol("proto.google.protobuf.DescriptorProto.ReservedRange",null,n),i.exportSymbol("proto.google.protobuf.Edition",null,n),i.exportSymbol("proto.google.protobuf.EnumDescriptorProto",null,n),i.exportSymbol("proto.google.protobuf.EnumDescriptorProto.EnumReservedRange",null,n),i.exportSymbol("proto.google.protobuf.EnumOptions",null,n),i.exportSymbol("proto.google.protobuf.EnumValueDescriptorProto",null,n),i.exportSymbol("proto.google.protobuf.EnumValueOptions",null,n),i.exportSymbol("proto.google.protobuf.ExtensionRangeOptions",null,n),i.exportSymbol("proto.google.protobuf.ExtensionRangeOptions.Declaration",null,n),i.exportSymbol("proto.google.protobuf.ExtensionRangeOptions.VerificationState",null,n),i.exportSymbol("proto.google.protobuf.FeatureSet",null,n),i.exportSymbol("proto.google.protobuf.FeatureSet.EnumType",null,n),i.exportSymbol("proto.google.protobuf.FeatureSet.FieldPresence",null,n),i.exportSymbol("proto.google.protobuf.FeatureSet.JsonFormat",null,n),i.exportSymbol("proto.google.protobuf.FeatureSet.MessageEncoding",null,n),i.exportSymbol("proto.google.protobuf.FeatureSet.RepeatedFieldEncoding",null,n),i.exportSymbol("proto.google.protobuf.FeatureSet.Utf8Validation",null,n),i.exportSymbol("proto.google.protobuf.FeatureSetDefaults",null,n),i.exportSymbol("proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault",null,n),i.exportSymbol("proto.google.protobuf.FieldDescriptorProto",null,n),i.exportSymbol("proto.google.protobuf.FieldDescriptorProto.Label",null,n),i.exportSymbol("proto.google.protobuf.FieldDescriptorProto.Type",null,n),i.exportSymbol("proto.google.protobuf.FieldOptions",null,n),i.exportSymbol("proto.google.protobuf.FieldOptions.CType",null,n),i.exportSymbol("proto.google.protobuf.FieldOptions.EditionDefault",null,n),i.exportSymbol("proto.google.protobuf.FieldOptions.FeatureSupport",null,n),i.exportSymbol("proto.google.protobuf.FieldOptions.JSType",null,n),i.exportSymbol("proto.google.protobuf.FieldOptions.OptionRetention",null,n),i.exportSymbol("proto.google.protobuf.FieldOptions.OptionTargetType",null,n),i.exportSymbol("proto.google.protobuf.FileDescriptorProto",null,n),i.exportSymbol("proto.google.protobuf.FileDescriptorSet",null,n),i.exportSymbol("proto.google.protobuf.FileOptions",null,n),i.exportSymbol("proto.google.protobuf.FileOptions.OptimizeMode",null,n),i.exportSymbol("proto.google.protobuf.GeneratedCodeInfo",null,n),i.exportSymbol("proto.google.protobuf.GeneratedCodeInfo.Annotation",null,n),i.exportSymbol("proto.google.protobuf.GeneratedCodeInfo.Annotation.Semantic",null,n),i.exportSymbol("proto.google.protobuf.MessageOptions",null,n),i.exportSymbol("proto.google.protobuf.MethodDescriptorProto",null,n),i.exportSymbol("proto.google.protobuf.MethodOptions",null,n),i.exportSymbol("proto.google.protobuf.MethodOptions.IdempotencyLevel",null,n),i.exportSymbol("proto.google.protobuf.OneofDescriptorProto",null,n),i.exportSymbol("proto.google.protobuf.OneofOptions",null,n),i.exportSymbol("proto.google.protobuf.ServiceDescriptorProto",null,n),i.exportSymbol("proto.google.protobuf.ServiceOptions",null,n),i.exportSymbol("proto.google.protobuf.SourceCodeInfo",null,n),i.exportSymbol("proto.google.protobuf.SourceCodeInfo.Location",null,n),i.exportSymbol("proto.google.protobuf.UninterpretedOption",null,n),i.exportSymbol("proto.google.protobuf.UninterpretedOption.NamePart",null,n),proto.google.protobuf.FileDescriptorSet=function(t){e.Message.initialize(this,t,0,-1,proto.google.protobuf.FileDescriptorSet.repeatedFields_,null)},i.inherits(proto.google.protobuf.FileDescriptorSet,e.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.FileDescriptorSet.displayName="proto.google.protobuf.FileDescriptorSet"),proto.google.protobuf.FileDescriptorProto=function(t){e.Message.initialize(this,t,0,-1,proto.google.protobuf.FileDescriptorProto.repeatedFields_,null)},i.inherits(proto.google.protobuf.FileDescriptorProto,e.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.FileDescriptorProto.displayName="proto.google.protobuf.FileDescriptorProto"),proto.google.protobuf.DescriptorProto=function(t){e.Message.initialize(this,t,0,-1,proto.google.protobuf.DescriptorProto.repeatedFields_,null)},i.inherits(proto.google.protobuf.DescriptorProto,e.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.DescriptorProto.displayName="proto.google.protobuf.DescriptorProto"),proto.google.protobuf.DescriptorProto.ExtensionRange=function(t){e.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.google.protobuf.DescriptorProto.ExtensionRange,e.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.DescriptorProto.ExtensionRange.displayName="proto.google.protobuf.DescriptorProto.ExtensionRange"),proto.google.protobuf.DescriptorProto.ReservedRange=function(t){e.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.google.protobuf.DescriptorProto.ReservedRange,e.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.DescriptorProto.ReservedRange.displayName="proto.google.protobuf.DescriptorProto.ReservedRange"),proto.google.protobuf.ExtensionRangeOptions=function(t){e.Message.initialize(this,t,0,500,proto.google.protobuf.ExtensionRangeOptions.repeatedFields_,null)},i.inherits(proto.google.protobuf.ExtensionRangeOptions,e.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.ExtensionRangeOptions.displayName="proto.google.protobuf.ExtensionRangeOptions"),proto.google.protobuf.ExtensionRangeOptions.extensions={},proto.google.protobuf.ExtensionRangeOptions.extensionsBinary={},proto.google.protobuf.ExtensionRangeOptions.Declaration=function(t){e.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.google.protobuf.ExtensionRangeOptions.Declaration,e.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.ExtensionRangeOptions.Declaration.displayName="proto.google.protobuf.ExtensionRangeOptions.Declaration"),proto.google.protobuf.FieldDescriptorProto=function(t){e.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.google.protobuf.FieldDescriptorProto,e.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.FieldDescriptorProto.displayName="proto.google.protobuf.FieldDescriptorProto"),proto.google.protobuf.OneofDescriptorProto=function(t){e.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.google.protobuf.OneofDescriptorProto,e.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.OneofDescriptorProto.displayName="proto.google.protobuf.OneofDescriptorProto"),proto.google.protobuf.EnumDescriptorProto=function(t){e.Message.initialize(this,t,0,-1,proto.google.protobuf.EnumDescriptorProto.repeatedFields_,null)},i.inherits(proto.google.protobuf.EnumDescriptorProto,e.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.EnumDescriptorProto.displayName="proto.google.protobuf.EnumDescriptorProto"),proto.google.protobuf.EnumDescriptorProto.EnumReservedRange=function(t){e.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.google.protobuf.EnumDescriptorProto.EnumReservedRange,e.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.displayName="proto.google.protobuf.EnumDescriptorProto.EnumReservedRange"),proto.google.protobuf.EnumValueDescriptorProto=function(t){e.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.google.protobuf.EnumValueDescriptorProto,e.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.EnumValueDescriptorProto.displayName="proto.google.protobuf.EnumValueDescriptorProto"),proto.google.protobuf.ServiceDescriptorProto=function(t){e.Message.initialize(this,t,0,-1,proto.google.protobuf.ServiceDescriptorProto.repeatedFields_,null)},i.inherits(proto.google.protobuf.ServiceDescriptorProto,e.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.ServiceDescriptorProto.displayName="proto.google.protobuf.ServiceDescriptorProto"),proto.google.protobuf.MethodDescriptorProto=function(t){e.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.google.protobuf.MethodDescriptorProto,e.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.MethodDescriptorProto.displayName="proto.google.protobuf.MethodDescriptorProto"),proto.google.protobuf.FileOptions=function(t){e.Message.initialize(this,t,0,500,proto.google.protobuf.FileOptions.repeatedFields_,null)},i.inherits(proto.google.protobuf.FileOptions,e.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.FileOptions.displayName="proto.google.protobuf.FileOptions"),proto.google.protobuf.FileOptions.extensions={},proto.google.protobuf.FileOptions.extensionsBinary={},proto.google.protobuf.MessageOptions=function(t){e.Message.initialize(this,t,0,500,proto.google.protobuf.MessageOptions.repeatedFields_,null)},i.inherits(proto.google.protobuf.MessageOptions,e.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.MessageOptions.displayName="proto.google.protobuf.MessageOptions"),proto.google.protobuf.MessageOptions.extensions={},proto.google.protobuf.MessageOptions.extensionsBinary={},proto.google.protobuf.FieldOptions=function(t){e.Message.initialize(this,t,0,500,proto.google.protobuf.FieldOptions.repeatedFields_,null)},i.inherits(proto.google.protobuf.FieldOptions,e.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.FieldOptions.displayName="proto.google.protobuf.FieldOptions"),proto.google.protobuf.FieldOptions.extensions={},proto.google.protobuf.FieldOptions.extensionsBinary={},proto.google.protobuf.FieldOptions.EditionDefault=function(t){e.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.google.protobuf.FieldOptions.EditionDefault,e.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.FieldOptions.EditionDefault.displayName="proto.google.protobuf.FieldOptions.EditionDefault"),proto.google.protobuf.FieldOptions.FeatureSupport=function(t){e.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.google.protobuf.FieldOptions.FeatureSupport,e.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.FieldOptions.FeatureSupport.displayName="proto.google.protobuf.FieldOptions.FeatureSupport"),proto.google.protobuf.OneofOptions=function(t){e.Message.initialize(this,t,0,500,proto.google.protobuf.OneofOptions.repeatedFields_,null)},i.inherits(proto.google.protobuf.OneofOptions,e.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.OneofOptions.displayName="proto.google.protobuf.OneofOptions"),proto.google.protobuf.OneofOptions.extensions={},proto.google.protobuf.OneofOptions.extensionsBinary={},proto.google.protobuf.EnumOptions=function(t){e.Message.initialize(this,t,0,500,proto.google.protobuf.EnumOptions.repeatedFields_,null)},i.inherits(proto.google.protobuf.EnumOptions,e.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.EnumOptions.displayName="proto.google.protobuf.EnumOptions"),proto.google.protobuf.EnumOptions.extensions={},proto.google.protobuf.EnumOptions.extensionsBinary={},proto.google.protobuf.EnumValueOptions=function(t){e.Message.initialize(this,t,0,500,proto.google.protobuf.EnumValueOptions.repeatedFields_,null)},i.inherits(proto.google.protobuf.EnumValueOptions,e.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.EnumValueOptions.displayName="proto.google.protobuf.EnumValueOptions"),proto.google.protobuf.EnumValueOptions.extensions={},proto.google.protobuf.EnumValueOptions.extensionsBinary={},proto.google.protobuf.ServiceOptions=function(t){e.Message.initialize(this,t,0,500,proto.google.protobuf.ServiceOptions.repeatedFields_,null)},i.inherits(proto.google.protobuf.ServiceOptions,e.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.ServiceOptions.displayName="proto.google.protobuf.ServiceOptions"),proto.google.protobuf.ServiceOptions.extensions={},proto.google.protobuf.ServiceOptions.extensionsBinary={},proto.google.protobuf.MethodOptions=function(t){e.Message.initialize(this,t,0,500,proto.google.protobuf.MethodOptions.repeatedFields_,null)},i.inherits(proto.google.protobuf.MethodOptions,e.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.MethodOptions.displayName="proto.google.protobuf.MethodOptions"),proto.google.protobuf.MethodOptions.extensions={},proto.google.protobuf.MethodOptions.extensionsBinary={},proto.google.protobuf.UninterpretedOption=function(t){e.Message.initialize(this,t,0,-1,proto.google.protobuf.UninterpretedOption.repeatedFields_,null)},i.inherits(proto.google.protobuf.UninterpretedOption,e.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.UninterpretedOption.displayName="proto.google.protobuf.UninterpretedOption"),proto.google.protobuf.UninterpretedOption.NamePart=function(t){e.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.google.protobuf.UninterpretedOption.NamePart,e.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.UninterpretedOption.NamePart.displayName="proto.google.protobuf.UninterpretedOption.NamePart"),proto.google.protobuf.FeatureSet=function(t){e.Message.initialize(this,t,0,7,null,null)},i.inherits(proto.google.protobuf.FeatureSet,e.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.FeatureSet.displayName="proto.google.protobuf.FeatureSet"),proto.google.protobuf.FeatureSet.extensions={},proto.google.protobuf.FeatureSet.extensionsBinary={},proto.google.protobuf.FeatureSetDefaults=function(t){e.Message.initialize(this,t,0,-1,proto.google.protobuf.FeatureSetDefaults.repeatedFields_,null)},i.inherits(proto.google.protobuf.FeatureSetDefaults,e.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.FeatureSetDefaults.displayName="proto.google.protobuf.FeatureSetDefaults"),proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault=function(t){e.Message.initialize(this,t,0,-1,null,null)},i.inherits(proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault,e.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.displayName="proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"),proto.google.protobuf.SourceCodeInfo=function(t){e.Message.initialize(this,t,0,-1,proto.google.protobuf.SourceCodeInfo.repeatedFields_,null)},i.inherits(proto.google.protobuf.SourceCodeInfo,e.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.SourceCodeInfo.displayName="proto.google.protobuf.SourceCodeInfo"),proto.google.protobuf.SourceCodeInfo.Location=function(t){e.Message.initialize(this,t,0,-1,proto.google.protobuf.SourceCodeInfo.Location.repeatedFields_,null)},i.inherits(proto.google.protobuf.SourceCodeInfo.Location,e.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.SourceCodeInfo.Location.displayName="proto.google.protobuf.SourceCodeInfo.Location"),proto.google.protobuf.GeneratedCodeInfo=function(t){e.Message.initialize(this,t,0,-1,proto.google.protobuf.GeneratedCodeInfo.repeatedFields_,null)},i.inherits(proto.google.protobuf.GeneratedCodeInfo,e.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.GeneratedCodeInfo.displayName="proto.google.protobuf.GeneratedCodeInfo"),proto.google.protobuf.GeneratedCodeInfo.Annotation=function(t){e.Message.initialize(this,t,0,-1,proto.google.protobuf.GeneratedCodeInfo.Annotation.repeatedFields_,null)},i.inherits(proto.google.protobuf.GeneratedCodeInfo.Annotation,e.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.GeneratedCodeInfo.Annotation.displayName="proto.google.protobuf.GeneratedCodeInfo.Annotation"),proto.google.protobuf.FileDescriptorSet.repeatedFields_=[1],e.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.FileDescriptorSet.prototype.toObject=function(t){return proto.google.protobuf.FileDescriptorSet.toObject(t,this)},proto.google.protobuf.FileDescriptorSet.toObject=function(t,o){var a={fileList:e.Message.toObjectList(o.getFileList(),proto.google.protobuf.FileDescriptorProto.toObject,t)};return t&&(a.$jspbMessageInstance=o),a}),proto.google.protobuf.FileDescriptorSet.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.google.protobuf.FileDescriptorSet;return proto.google.protobuf.FileDescriptorSet.deserializeBinaryFromReader(a,o)},proto.google.protobuf.FileDescriptorSet.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 1:var s=new proto.google.protobuf.FileDescriptorProto;o.readMessage(s,proto.google.protobuf.FileDescriptorProto.deserializeBinaryFromReader),t.addFile(s);break;default:o.skipField();break}}return t},proto.google.protobuf.FileDescriptorSet.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.google.protobuf.FileDescriptorSet.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.google.protobuf.FileDescriptorSet.serializeBinaryToWriter=function(t,o){var a=void 0;a=t.getFileList(),a.length>0&&o.writeRepeatedMessage(1,a,proto.google.protobuf.FileDescriptorProto.serializeBinaryToWriter)},proto.google.protobuf.FileDescriptorSet.prototype.getFileList=function(){return e.Message.getRepeatedWrapperField(this,proto.google.protobuf.FileDescriptorProto,1)},proto.google.protobuf.FileDescriptorSet.prototype.setFileList=function(t){return e.Message.setRepeatedWrapperField(this,1,t)},proto.google.protobuf.FileDescriptorSet.prototype.addFile=function(t,o){return e.Message.addToRepeatedWrapperField(this,1,t,proto.google.protobuf.FileDescriptorProto,o)},proto.google.protobuf.FileDescriptorSet.prototype.clearFileList=function(){return this.setFileList([])},proto.google.protobuf.FileDescriptorProto.repeatedFields_=[3,10,11,4,5,6,7],e.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.FileDescriptorProto.prototype.toObject=function(t){return proto.google.protobuf.FileDescriptorProto.toObject(t,this)},proto.google.protobuf.FileDescriptorProto.toObject=function(t,o){var a,s={name:(a=e.Message.getField(o,1))==null?void 0:a,pb_package:(a=e.Message.getField(o,2))==null?void 0:a,dependencyList:(a=e.Message.getRepeatedField(o,3))==null?void 0:a,publicDependencyList:(a=e.Message.getRepeatedField(o,10))==null?void 0:a,weakDependencyList:(a=e.Message.getRepeatedField(o,11))==null?void 0:a,messageTypeList:e.Message.toObjectList(o.getMessageTypeList(),proto.google.protobuf.DescriptorProto.toObject,t),enumTypeList:e.Message.toObjectList(o.getEnumTypeList(),proto.google.protobuf.EnumDescriptorProto.toObject,t),serviceList:e.Message.toObjectList(o.getServiceList(),proto.google.protobuf.ServiceDescriptorProto.toObject,t),extensionList:e.Message.toObjectList(o.getExtensionList(),proto.google.protobuf.FieldDescriptorProto.toObject,t),options:(a=o.getOptions())&&proto.google.protobuf.FileOptions.toObject(t,a),sourceCodeInfo:(a=o.getSourceCodeInfo())&&proto.google.protobuf.SourceCodeInfo.toObject(t,a),syntax:(a=e.Message.getField(o,12))==null?void 0:a,edition:(a=e.Message.getField(o,14))==null?void 0:a};return t&&(s.$jspbMessageInstance=o),s}),proto.google.protobuf.FileDescriptorProto.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.google.protobuf.FileDescriptorProto;return proto.google.protobuf.FileDescriptorProto.deserializeBinaryFromReader(a,o)},proto.google.protobuf.FileDescriptorProto.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 1:var u=o.readString();t.setName(u);break;case 2:var u=o.readString();t.setPackage(u);break;case 3:var u=o.readString();t.addDependency(u);break;case 10:for(var l=o.isDelimited()?o.readPackedInt32():[o.readInt32()],s=0;s<l.length;s++)t.addPublicDependency(l[s]);break;case 11:for(var l=o.isDelimited()?o.readPackedInt32():[o.readInt32()],s=0;s<l.length;s++)t.addWeakDependency(l[s]);break;case 4:var u=new proto.google.protobuf.DescriptorProto;o.readMessage(u,proto.google.protobuf.DescriptorProto.deserializeBinaryFromReader),t.addMessageType(u);break;case 5:var u=new proto.google.protobuf.EnumDescriptorProto;o.readMessage(u,proto.google.protobuf.EnumDescriptorProto.deserializeBinaryFromReader),t.addEnumType(u);break;case 6:var u=new proto.google.protobuf.ServiceDescriptorProto;o.readMessage(u,proto.google.protobuf.ServiceDescriptorProto.deserializeBinaryFromReader),t.addService(u);break;case 7:var u=new proto.google.protobuf.FieldDescriptorProto;o.readMessage(u,proto.google.protobuf.FieldDescriptorProto.deserializeBinaryFromReader),t.addExtension$(u);break;case 8:var u=new proto.google.protobuf.FileOptions;o.readMessage(u,proto.google.protobuf.FileOptions.deserializeBinaryFromReader),t.setOptions(u);break;case 9:var u=new proto.google.protobuf.SourceCodeInfo;o.readMessage(u,proto.google.protobuf.SourceCodeInfo.deserializeBinaryFromReader),t.setSourceCodeInfo(u);break;case 12:var u=o.readString();t.setSyntax(u);break;case 14:var u=o.readEnum();t.setEdition(u);break;default:o.skipField();break}}return t},proto.google.protobuf.FileDescriptorProto.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.google.protobuf.FileDescriptorProto.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.google.protobuf.FileDescriptorProto.serializeBinaryToWriter=function(t,o){var a=void 0;a=e.Message.getField(t,1),a!=null&&o.writeString(1,a),a=e.Message.getField(t,2),a!=null&&o.writeString(2,a),a=t.getDependencyList(),a.length>0&&o.writeRepeatedString(3,a),a=t.getPublicDependencyList(),a.length>0&&o.writeRepeatedInt32(10,a),a=t.getWeakDependencyList(),a.length>0&&o.writeRepeatedInt32(11,a),a=t.getMessageTypeList(),a.length>0&&o.writeRepeatedMessage(4,a,proto.google.protobuf.DescriptorProto.serializeBinaryToWriter),a=t.getEnumTypeList(),a.length>0&&o.writeRepeatedMessage(5,a,proto.google.protobuf.EnumDescriptorProto.serializeBinaryToWriter),a=t.getServiceList(),a.length>0&&o.writeRepeatedMessage(6,a,proto.google.protobuf.ServiceDescriptorProto.serializeBinaryToWriter),a=t.getExtensionList(),a.length>0&&o.writeRepeatedMessage(7,a,proto.google.protobuf.FieldDescriptorProto.serializeBinaryToWriter),a=t.getOptions(),a!=null&&o.writeMessage(8,a,proto.google.protobuf.FileOptions.serializeBinaryToWriter),a=t.getSourceCodeInfo(),a!=null&&o.writeMessage(9,a,proto.google.protobuf.SourceCodeInfo.serializeBinaryToWriter),a=e.Message.getField(t,12),a!=null&&o.writeString(12,a),a=e.Message.getField(t,14),a!=null&&o.writeEnum(14,a)},proto.google.protobuf.FileDescriptorProto.prototype.getName=function(){return e.Message.getFieldWithDefault(this,1,"")},proto.google.protobuf.FileDescriptorProto.prototype.setName=function(t){return e.Message.setField(this,1,t)},proto.google.protobuf.FileDescriptorProto.prototype.clearName=function(){return e.Message.setField(this,1,void 0)},proto.google.protobuf.FileDescriptorProto.prototype.hasName=function(){return e.Message.getField(this,1)!=null},proto.google.protobuf.FileDescriptorProto.prototype.getPackage=function(){return e.Message.getFieldWithDefault(this,2,"")},proto.google.protobuf.FileDescriptorProto.prototype.setPackage=function(t){return e.Message.setField(this,2,t)},proto.google.protobuf.FileDescriptorProto.prototype.clearPackage=function(){return e.Message.setField(this,2,void 0)},proto.google.protobuf.FileDescriptorProto.prototype.hasPackage=function(){return e.Message.getField(this,2)!=null},proto.google.protobuf.FileDescriptorProto.prototype.getDependencyList=function(){return e.Message.getRepeatedField(this,3)},proto.google.protobuf.FileDescriptorProto.prototype.setDependencyList=function(t){return e.Message.setField(this,3,t||[])},proto.google.protobuf.FileDescriptorProto.prototype.addDependency=function(t,o){return e.Message.addToRepeatedField(this,3,t,o)},proto.google.protobuf.FileDescriptorProto.prototype.clearDependencyList=function(){return this.setDependencyList([])},proto.google.protobuf.FileDescriptorProto.prototype.getPublicDependencyList=function(){return e.Message.getRepeatedField(this,10)},proto.google.protobuf.FileDescriptorProto.prototype.setPublicDependencyList=function(t){return e.Message.setField(this,10,t||[])},proto.google.protobuf.FileDescriptorProto.prototype.addPublicDependency=function(t,o){return e.Message.addToRepeatedField(this,10,t,o)},proto.google.protobuf.FileDescriptorProto.prototype.clearPublicDependencyList=function(){return this.setPublicDependencyList([])},proto.google.protobuf.FileDescriptorProto.prototype.getWeakDependencyList=function(){return e.Message.getRepeatedField(this,11)},proto.google.protobuf.FileDescriptorProto.prototype.setWeakDependencyList=function(t){return e.Message.setField(this,11,t||[])},proto.google.protobuf.FileDescriptorProto.prototype.addWeakDependency=function(t,o){return e.Message.addToRepeatedField(this,11,t,o)},proto.google.protobuf.FileDescriptorProto.prototype.clearWeakDependencyList=function(){return this.setWeakDependencyList([])},proto.google.protobuf.FileDescriptorProto.prototype.getMessageTypeList=function(){return e.Message.getRepeatedWrapperField(this,proto.google.protobuf.DescriptorProto,4)},proto.google.protobuf.FileDescriptorProto.prototype.setMessageTypeList=function(t){return e.Message.setRepeatedWrapperField(this,4,t)},proto.google.protobuf.FileDescriptorProto.prototype.addMessageType=function(t,o){return e.Message.addToRepeatedWrapperField(this,4,t,proto.google.protobuf.DescriptorProto,o)},proto.google.protobuf.FileDescriptorProto.prototype.clearMessageTypeList=function(){return this.setMessageTypeList([])},proto.google.protobuf.FileDescriptorProto.prototype.getEnumTypeList=function(){return e.Message.getRepeatedWrapperField(this,proto.google.protobuf.EnumDescriptorProto,5)},proto.google.protobuf.FileDescriptorProto.prototype.setEnumTypeList=function(t){return e.Message.setRepeatedWrapperField(this,5,t)},proto.google.protobuf.FileDescriptorProto.prototype.addEnumType=function(t,o){return e.Message.addToRepeatedWrapperField(this,5,t,proto.google.protobuf.EnumDescriptorProto,o)},proto.google.protobuf.FileDescriptorProto.prototype.clearEnumTypeList=function(){return this.setEnumTypeList([])},proto.google.protobuf.FileDescriptorProto.prototype.getServiceList=function(){return e.Message.getRepeatedWrapperField(this,proto.google.protobuf.ServiceDescriptorProto,6)},proto.google.protobuf.FileDescriptorProto.prototype.setServiceList=function(t){return e.Message.setRepeatedWrapperField(this,6,t)},proto.google.protobuf.FileDescriptorProto.prototype.addService=function(t,o){return e.Message.addToRepeatedWrapperField(this,6,t,proto.google.protobuf.ServiceDescriptorProto,o)},proto.google.protobuf.FileDescriptorProto.prototype.clearServiceList=function(){return this.setServiceList([])},proto.google.protobuf.FileDescriptorProto.prototype.getExtensionList=function(){return e.Message.getRepeatedWrapperField(this,proto.google.protobuf.FieldDescriptorProto,7)},proto.google.protobuf.FileDescriptorProto.prototype.setExtensionList=function(t){return e.Message.setRepeatedWrapperField(this,7,t)},proto.google.protobuf.FileDescriptorProto.prototype.addExtension$=function(t,o){return e.Message.addToRepeatedWrapperField(this,7,t,proto.google.protobuf.FieldDescriptorProto,o)},proto.google.protobuf.FileDescriptorProto.prototype.clearExtensionList=function(){return this.setExtensionList([])},proto.google.protobuf.FileDescriptorProto.prototype.getOptions=function(){return e.Message.getWrapperField(this,proto.google.protobuf.FileOptions,8)},proto.google.protobuf.FileDescriptorProto.prototype.setOptions=function(t){return e.Message.setWrapperField(this,8,t)},proto.google.protobuf.FileDescriptorProto.prototype.clearOptions=function(){return this.setOptions(void 0)},proto.google.protobuf.FileDescriptorProto.prototype.hasOptions=function(){return e.Message.getField(this,8)!=null},proto.google.protobuf.FileDescriptorProto.prototype.getSourceCodeInfo=function(){return e.Message.getWrapperField(this,proto.google.protobuf.SourceCodeInfo,9)},proto.google.protobuf.FileDescriptorProto.prototype.setSourceCodeInfo=function(t){return e.Message.setWrapperField(this,9,t)},proto.google.protobuf.FileDescriptorProto.prototype.clearSourceCodeInfo=function(){return this.setSourceCodeInfo(void 0)},proto.google.protobuf.FileDescriptorProto.prototype.hasSourceCodeInfo=function(){return e.Message.getField(this,9)!=null},proto.google.protobuf.FileDescriptorProto.prototype.getSyntax=function(){return e.Message.getFieldWithDefault(this,12,"")},proto.google.protobuf.FileDescriptorProto.prototype.setSyntax=function(t){return e.Message.setField(this,12,t)},proto.google.protobuf.FileDescriptorProto.prototype.clearSyntax=function(){return e.Message.setField(this,12,void 0)},proto.google.protobuf.FileDescriptorProto.prototype.hasSyntax=function(){return e.Message.getField(this,12)!=null},proto.google.protobuf.FileDescriptorProto.prototype.getEdition=function(){return e.Message.getFieldWithDefault(this,14,0)},proto.google.protobuf.FileDescriptorProto.prototype.setEdition=function(t){return e.Message.setField(this,14,t)},proto.google.protobuf.FileDescriptorProto.prototype.clearEdition=function(){return e.Message.setField(this,14,void 0)},proto.google.protobuf.FileDescriptorProto.prototype.hasEdition=function(){return e.Message.getField(this,14)!=null},proto.google.protobuf.DescriptorProto.repeatedFields_=[2,6,3,4,5,8,9,10],e.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.DescriptorProto.prototype.toObject=function(t){return proto.google.protobuf.DescriptorProto.toObject(t,this)},proto.google.protobuf.DescriptorProto.toObject=function(t,o){var a,s={name:(a=e.Message.getField(o,1))==null?void 0:a,fieldList:e.Message.toObjectList(o.getFieldList(),proto.google.protobuf.FieldDescriptorProto.toObject,t),extensionList:e.Message.toObjectList(o.getExtensionList(),proto.google.protobuf.FieldDescriptorProto.toObject,t),nestedTypeList:e.Message.toObjectList(o.getNestedTypeList(),proto.google.protobuf.DescriptorProto.toObject,t),enumTypeList:e.Message.toObjectList(o.getEnumTypeList(),proto.google.protobuf.EnumDescriptorProto.toObject,t),extensionRangeList:e.Message.toObjectList(o.getExtensionRangeList(),proto.google.protobuf.DescriptorProto.ExtensionRange.toObject,t),oneofDeclList:e.Message.toObjectList(o.getOneofDeclList(),proto.google.protobuf.OneofDescriptorProto.toObject,t),options:(a=o.getOptions())&&proto.google.protobuf.MessageOptions.toObject(t,a),reservedRangeList:e.Message.toObjectList(o.getReservedRangeList(),proto.google.protobuf.DescriptorProto.ReservedRange.toObject,t),reservedNameList:(a=e.Message.getRepeatedField(o,10))==null?void 0:a};return t&&(s.$jspbMessageInstance=o),s}),proto.google.protobuf.DescriptorProto.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.google.protobuf.DescriptorProto;return proto.google.protobuf.DescriptorProto.deserializeBinaryFromReader(a,o)},proto.google.protobuf.DescriptorProto.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 1:var s=o.readString();t.setName(s);break;case 2:var s=new proto.google.protobuf.FieldDescriptorProto;o.readMessage(s,proto.google.protobuf.FieldDescriptorProto.deserializeBinaryFromReader),t.addField(s);break;case 6:var s=new proto.google.protobuf.FieldDescriptorProto;o.readMessage(s,proto.google.protobuf.FieldDescriptorProto.deserializeBinaryFromReader),t.addExtension$(s);break;case 3:var s=new proto.google.protobuf.DescriptorProto;o.readMessage(s,proto.google.protobuf.DescriptorProto.deserializeBinaryFromReader),t.addNestedType(s);break;case 4:var s=new proto.google.protobuf.EnumDescriptorProto;o.readMessage(s,proto.google.protobuf.EnumDescriptorProto.deserializeBinaryFromReader),t.addEnumType(s);break;case 5:var s=new proto.google.protobuf.DescriptorProto.ExtensionRange;o.readMessage(s,proto.google.protobuf.DescriptorProto.ExtensionRange.deserializeBinaryFromReader),t.addExtensionRange(s);break;case 8:var s=new proto.google.protobuf.OneofDescriptorProto;o.readMessage(s,proto.google.protobuf.OneofDescriptorProto.deserializeBinaryFromReader),t.addOneofDecl(s);break;case 7:var s=new proto.google.protobuf.MessageOptions;o.readMessage(s,proto.google.protobuf.MessageOptions.deserializeBinaryFromReader),t.setOptions(s);break;case 9:var s=new proto.google.protobuf.DescriptorProto.ReservedRange;o.readMessage(s,proto.google.protobuf.DescriptorProto.ReservedRange.deserializeBinaryFromReader),t.addReservedRange(s);break;case 10:var s=o.readString();t.addReservedName(s);break;default:o.skipField();break}}return t},proto.google.protobuf.DescriptorProto.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.google.protobuf.DescriptorProto.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.google.protobuf.DescriptorProto.serializeBinaryToWriter=function(t,o){var a=void 0;a=e.Message.getField(t,1),a!=null&&o.writeString(1,a),a=t.getFieldList(),a.length>0&&o.writeRepeatedMessage(2,a,proto.google.protobuf.FieldDescriptorProto.serializeBinaryToWriter),a=t.getExtensionList(),a.length>0&&o.writeRepeatedMessage(6,a,proto.google.protobuf.FieldDescriptorProto.serializeBinaryToWriter),a=t.getNestedTypeList(),a.length>0&&o.writeRepeatedMessage(3,a,proto.google.protobuf.DescriptorProto.serializeBinaryToWriter),a=t.getEnumTypeList(),a.length>0&&o.writeRepeatedMessage(4,a,proto.google.protobuf.EnumDescriptorProto.serializeBinaryToWriter),a=t.getExtensionRangeList(),a.length>0&&o.writeRepeatedMessage(5,a,proto.google.protobuf.DescriptorProto.ExtensionRange.serializeBinaryToWriter),a=t.getOneofDeclList(),a.length>0&&o.writeRepeatedMessage(8,a,proto.google.protobuf.OneofDescriptorProto.serializeBinaryToWriter),a=t.getOptions(),a!=null&&o.writeMessage(7,a,proto.google.protobuf.MessageOptions.serializeBinaryToWriter),a=t.getReservedRangeList(),a.length>0&&o.writeRepeatedMessage(9,a,proto.google.protobuf.DescriptorProto.ReservedRange.serializeBinaryToWriter),a=t.getReservedNameList(),a.length>0&&o.writeRepeatedString(10,a)},e.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.toObject=function(t){return proto.google.protobuf.DescriptorProto.ExtensionRange.toObject(t,this)},proto.google.protobuf.DescriptorProto.ExtensionRange.toObject=function(t,o){var a,s={start:(a=e.Message.getField(o,1))==null?void 0:a,end:(a=e.Message.getField(o,2))==null?void 0:a,options:(a=o.getOptions())&&proto.google.protobuf.ExtensionRangeOptions.toObject(t,a)};return t&&(s.$jspbMessageInstance=o),s}),proto.google.protobuf.DescriptorProto.ExtensionRange.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.google.protobuf.DescriptorProto.ExtensionRange;return proto.google.protobuf.DescriptorProto.ExtensionRange.deserializeBinaryFromReader(a,o)},proto.google.protobuf.DescriptorProto.ExtensionRange.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 1:var s=o.readInt32();t.setStart(s);break;case 2:var s=o.readInt32();t.setEnd(s);break;case 3:var s=new proto.google.protobuf.ExtensionRangeOptions;o.readMessage(s,proto.google.protobuf.ExtensionRangeOptions.deserializeBinaryFromReader),t.setOptions(s);break;default:o.skipField();break}}return t},proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.google.protobuf.DescriptorProto.ExtensionRange.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.google.protobuf.DescriptorProto.ExtensionRange.serializeBinaryToWriter=function(t,o){var a=void 0;a=e.Message.getField(t,1),a!=null&&o.writeInt32(1,a),a=e.Message.getField(t,2),a!=null&&o.writeInt32(2,a),a=t.getOptions(),a!=null&&o.writeMessage(3,a,proto.google.protobuf.ExtensionRangeOptions.serializeBinaryToWriter)},proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.getStart=function(){return e.Message.getFieldWithDefault(this,1,0)},proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.setStart=function(t){return e.Message.setField(this,1,t)},proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.clearStart=function(){return e.Message.setField(this,1,void 0)},proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.hasStart=function(){return e.Message.getField(this,1)!=null},proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.getEnd=function(){return e.Message.getFieldWithDefault(this,2,0)},proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.setEnd=function(t){return e.Message.setField(this,2,t)},proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.clearEnd=function(){return e.Message.setField(this,2,void 0)},proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.hasEnd=function(){return e.Message.getField(this,2)!=null},proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.getOptions=function(){return e.Message.getWrapperField(this,proto.google.protobuf.ExtensionRangeOptions,3)},proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.setOptions=function(t){return e.Message.setWrapperField(this,3,t)},proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.clearOptions=function(){return this.setOptions(void 0)},proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.hasOptions=function(){return e.Message.getField(this,3)!=null},e.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.DescriptorProto.ReservedRange.prototype.toObject=function(t){return proto.google.protobuf.DescriptorProto.ReservedRange.toObject(t,this)},proto.google.protobuf.DescriptorProto.ReservedRange.toObject=function(t,o){var a,s={start:(a=e.Message.getField(o,1))==null?void 0:a,end:(a=e.Message.getField(o,2))==null?void 0:a};return t&&(s.$jspbMessageInstance=o),s}),proto.google.protobuf.DescriptorProto.ReservedRange.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.google.protobuf.DescriptorProto.ReservedRange;return proto.google.protobuf.DescriptorProto.ReservedRange.deserializeBinaryFromReader(a,o)},proto.google.protobuf.DescriptorProto.ReservedRange.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 1:var s=o.readInt32();t.setStart(s);break;case 2:var s=o.readInt32();t.setEnd(s);break;default:o.skipField();break}}return t},proto.google.protobuf.DescriptorProto.ReservedRange.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.google.protobuf.DescriptorProto.ReservedRange.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.google.protobuf.DescriptorProto.ReservedRange.serializeBinaryToWriter=function(t,o){var a=void 0;a=e.Message.getField(t,1),a!=null&&o.writeInt32(1,a),a=e.Message.getField(t,2),a!=null&&o.writeInt32(2,a)},proto.google.protobuf.DescriptorProto.ReservedRange.prototype.getStart=function(){return e.Message.getFieldWithDefault(this,1,0)},proto.google.protobuf.DescriptorProto.ReservedRange.prototype.setStart=function(t){return e.Message.setField(this,1,t)},proto.google.protobuf.DescriptorProto.ReservedRange.prototype.clearStart=function(){return e.Message.setField(this,1,void 0)},proto.google.protobuf.DescriptorProto.ReservedRange.prototype.hasStart=function(){return e.Message.getField(this,1)!=null},proto.google.protobuf.DescriptorProto.ReservedRange.prototype.getEnd=function(){return e.Message.getFieldWithDefault(this,2,0)},proto.google.protobuf.DescriptorProto.ReservedRange.prototype.setEnd=function(t){return e.Message.setField(this,2,t)},proto.google.protobuf.DescriptorProto.ReservedRange.prototype.clearEnd=function(){return e.Message.setField(this,2,void 0)},proto.google.protobuf.DescriptorProto.ReservedRange.prototype.hasEnd=function(){return e.Message.getField(this,2)!=null},proto.google.protobuf.DescriptorProto.prototype.getName=function(){return e.Message.getFieldWithDefault(this,1,"")},proto.google.protobuf.DescriptorProto.prototype.setName=function(t){return e.Message.setField(this,1,t)},proto.google.protobuf.DescriptorProto.prototype.clearName=function(){return e.Message.setField(this,1,void 0)},proto.google.protobuf.DescriptorProto.prototype.hasName=function(){return e.Message.getField(this,1)!=null},proto.google.protobuf.DescriptorProto.prototype.getFieldList=function(){return e.Message.getRepeatedWrapperField(this,proto.google.protobuf.FieldDescriptorProto,2)},proto.google.protobuf.DescriptorProto.prototype.setFieldList=function(t){return e.Message.setRepeatedWrapperField(this,2,t)},proto.google.protobuf.DescriptorProto.prototype.addField=function(t,o){return e.Message.addToRepeatedWrapperField(this,2,t,proto.google.protobuf.FieldDescriptorProto,o)},proto.google.protobuf.DescriptorProto.prototype.clearFieldList=function(){return this.setFieldList([])},proto.google.protobuf.DescriptorProto.prototype.getExtensionList=function(){return e.Message.getRepeatedWrapperField(this,proto.google.protobuf.FieldDescriptorProto,6)},proto.google.protobuf.DescriptorProto.prototype.setExtensionList=function(t){return e.Message.setRepeatedWrapperField(this,6,t)},proto.google.protobuf.DescriptorProto.prototype.addExtension$=function(t,o){return e.Message.addToRepeatedWrapperField(this,6,t,proto.google.protobuf.FieldDescriptorProto,o)},proto.google.protobuf.DescriptorProto.prototype.clearExtensionList=function(){return this.setExtensionList([])},proto.google.protobuf.DescriptorProto.prototype.getNestedTypeList=function(){return e.Message.getRepeatedWrapperField(this,proto.google.protobuf.DescriptorProto,3)},proto.google.protobuf.DescriptorProto.prototype.setNestedTypeList=function(t){return e.Message.setRepeatedWrapperField(this,3,t)},proto.google.protobuf.DescriptorProto.prototype.addNestedType=function(t,o){return e.Message.addToRepeatedWrapperField(this,3,t,proto.google.protobuf.DescriptorProto,o)},proto.google.protobuf.DescriptorProto.prototype.clearNestedTypeList=function(){return this.setNestedTypeList([])},proto.google.protobuf.DescriptorProto.prototype.getEnumTypeList=function(){return e.Message.getRepeatedWrapperField(this,proto.google.protobuf.EnumDescriptorProto,4)},proto.google.protobuf.DescriptorProto.prototype.setEnumTypeList=function(t){return e.Message.setRepeatedWrapperField(this,4,t)},proto.google.protobuf.DescriptorProto.prototype.addEnumType=function(t,o){return e.Message.addToRepeatedWrapperField(this,4,t,proto.google.protobuf.EnumDescriptorProto,o)},proto.google.protobuf.DescriptorProto.prototype.clearEnumTypeList=function(){return this.setEnumTypeList([])},proto.google.protobuf.DescriptorProto.prototype.getExtensionRangeList=function(){return e.Message.getRepeatedWrapperField(this,proto.google.protobuf.DescriptorProto.ExtensionRange,5)},proto.google.protobuf.DescriptorProto.prototype.setExtensionRangeList=function(t){return e.Message.setRepeatedWrapperField(this,5,t)},proto.google.protobuf.DescriptorProto.prototype.addExtensionRange=function(t,o){return e.Message.addToRepeatedWrapperField(this,5,t,proto.google.protobuf.DescriptorProto.ExtensionRange,o)},proto.google.protobuf.DescriptorProto.prototype.clearExtensionRangeList=function(){return this.setExtensionRangeList([])},proto.google.protobuf.DescriptorProto.prototype.getOneofDeclList=function(){return e.Message.getRepeatedWrapperField(this,proto.google.protobuf.OneofDescriptorProto,8)},proto.google.protobuf.DescriptorProto.prototype.setOneofDeclList=function(t){return e.Message.setRepeatedWrapperField(this,8,t)},proto.google.protobuf.DescriptorProto.prototype.addOneofDecl=function(t,o){return e.Message.addToRepeatedWrapperField(this,8,t,proto.google.protobuf.OneofDescriptorProto,o)},proto.google.protobuf.DescriptorProto.prototype.clearOneofDeclList=function(){return this.setOneofDeclList([])},proto.google.protobuf.DescriptorProto.prototype.getOptions=function(){return e.Message.getWrapperField(this,proto.google.protobuf.MessageOptions,7)},proto.google.protobuf.DescriptorProto.prototype.setOptions=function(t){return e.Message.setWrapperField(this,7,t)},proto.google.protobuf.DescriptorProto.prototype.clearOptions=function(){return this.setOptions(void 0)},proto.google.protobuf.DescriptorProto.prototype.hasOptions=function(){return e.Message.getField(this,7)!=null},proto.google.protobuf.DescriptorProto.prototype.getReservedRangeList=function(){return e.Message.getRepeatedWrapperField(this,proto.google.protobuf.DescriptorProto.ReservedRange,9)},proto.google.protobuf.DescriptorProto.prototype.setReservedRangeList=function(t){return e.Message.setRepeatedWrapperField(this,9,t)},proto.google.protobuf.DescriptorProto.prototype.addReservedRange=function(t,o){return e.Message.addToRepeatedWrapperField(this,9,t,proto.google.protobuf.DescriptorProto.ReservedRange,o)},proto.google.protobuf.DescriptorProto.prototype.clearReservedRangeList=function(){return this.setReservedRangeList([])},proto.google.protobuf.DescriptorProto.prototype.getReservedNameList=function(){return e.Message.getRepeatedField(this,10)},proto.google.protobuf.DescriptorProto.prototype.setReservedNameList=function(t){return e.Message.setField(this,10,t||[])},proto.google.protobuf.DescriptorProto.prototype.addReservedName=function(t,o){return e.Message.addToRepeatedField(this,10,t,o)},proto.google.protobuf.DescriptorProto.prototype.clearReservedNameList=function(){return this.setReservedNameList([])},proto.google.protobuf.ExtensionRangeOptions.repeatedFields_=[999,2],e.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.ExtensionRangeOptions.prototype.toObject=function(t){return proto.google.protobuf.ExtensionRangeOptions.toObject(t,this)},proto.google.protobuf.ExtensionRangeOptions.toObject=function(t,o){var a,s={uninterpretedOptionList:e.Message.toObjectList(o.getUninterpretedOptionList(),proto.google.protobuf.UninterpretedOption.toObject,t),declarationList:e.Message.toObjectList(o.getDeclarationList(),proto.google.protobuf.ExtensionRangeOptions.Declaration.toObject,t),features:(a=o.getFeatures())&&proto.google.protobuf.FeatureSet.toObject(t,a),verification:e.Message.getFieldWithDefault(o,3,1)};return e.Message.toObjectExtension(o,s,proto.google.protobuf.ExtensionRangeOptions.extensions,proto.google.protobuf.ExtensionRangeOptions.prototype.getExtension,t),t&&(s.$jspbMessageInstance=o),s}),proto.google.protobuf.ExtensionRangeOptions.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.google.protobuf.ExtensionRangeOptions;return proto.google.protobuf.ExtensionRangeOptions.deserializeBinaryFromReader(a,o)},proto.google.protobuf.ExtensionRangeOptions.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 999:var s=new proto.google.protobuf.UninterpretedOption;o.readMessage(s,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader),t.addUninterpretedOption(s);break;case 2:var s=new proto.google.protobuf.ExtensionRangeOptions.Declaration;o.readMessage(s,proto.google.protobuf.ExtensionRangeOptions.Declaration.deserializeBinaryFromReader),t.addDeclaration(s);break;case 50:var s=new proto.google.protobuf.FeatureSet;o.readMessage(s,proto.google.protobuf.FeatureSet.deserializeBinaryFromReader),t.setFeatures(s);break;case 3:var s=o.readEnum();t.setVerification(s);break;default:e.Message.readBinaryExtension(t,o,proto.google.protobuf.ExtensionRangeOptions.extensionsBinary,proto.google.protobuf.ExtensionRangeOptions.prototype.getExtension,proto.google.protobuf.ExtensionRangeOptions.prototype.setExtension);break}}return t},proto.google.protobuf.ExtensionRangeOptions.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.google.protobuf.ExtensionRangeOptions.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.google.protobuf.ExtensionRangeOptions.serializeBinaryToWriter=function(t,o){var a=void 0;a=t.getUninterpretedOptionList(),a.length>0&&o.writeRepeatedMessage(999,a,proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter),a=t.getDeclarationList(),a.length>0&&o.writeRepeatedMessage(2,a,proto.google.protobuf.ExtensionRangeOptions.Declaration.serializeBinaryToWriter),a=t.getFeatures(),a!=null&&o.writeMessage(50,a,proto.google.protobuf.FeatureSet.serializeBinaryToWriter),a=e.Message.getField(t,3),a!=null&&o.writeEnum(3,a),e.Message.serializeBinaryExtensions(t,o,proto.google.protobuf.ExtensionRangeOptions.extensionsBinary,proto.google.protobuf.ExtensionRangeOptions.prototype.getExtension)},proto.google.protobuf.ExtensionRangeOptions.VerificationState={DECLARATION:0,UNVERIFIED:1},e.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.toObject=function(t){return proto.google.protobuf.ExtensionRangeOptions.Declaration.toObject(t,this)},proto.google.protobuf.ExtensionRangeOptions.Declaration.toObject=function(t,o){var a,s={number:(a=e.Message.getField(o,1))==null?void 0:a,fullName:(a=e.Message.getField(o,2))==null?void 0:a,type:(a=e.Message.getField(o,3))==null?void 0:a,reserved:(a=e.Message.getBooleanField(o,5))==null?void 0:a,repeated:(a=e.Message.getBooleanField(o,6))==null?void 0:a};return t&&(s.$jspbMessageInstance=o),s}),proto.google.protobuf.ExtensionRangeOptions.Declaration.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.google.protobuf.ExtensionRangeOptions.Declaration;return proto.google.protobuf.ExtensionRangeOptions.Declaration.deserializeBinaryFromReader(a,o)},proto.google.protobuf.ExtensionRangeOptions.Declaration.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 1:var s=o.readInt32();t.setNumber(s);break;case 2:var s=o.readString();t.setFullName(s);break;case 3:var s=o.readString();t.setType(s);break;case 5:var s=o.readBool();t.setReserved(s);break;case 6:var s=o.readBool();t.setRepeated(s);break;default:o.skipField();break}}return t},proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.google.protobuf.ExtensionRangeOptions.Declaration.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.google.protobuf.ExtensionRangeOptions.Declaration.serializeBinaryToWriter=function(t,o){var a=void 0;a=e.Message.getField(t,1),a!=null&&o.writeInt32(1,a),a=e.Message.getField(t,2),a!=null&&o.writeString(2,a),a=e.Message.getField(t,3),a!=null&&o.writeString(3,a),a=e.Message.getField(t,5),a!=null&&o.writeBool(5,a),a=e.Message.getField(t,6),a!=null&&o.writeBool(6,a)},proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.getNumber=function(){return e.Message.getFieldWithDefault(this,1,0)},proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.setNumber=function(t){return e.Message.setField(this,1,t)},proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.clearNumber=function(){return e.Message.setField(this,1,void 0)},proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.hasNumber=function(){return e.Message.getField(this,1)!=null},proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.getFullName=function(){return e.Message.getFieldWithDefault(this,2,"")},proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.setFullName=function(t){return e.Message.setField(this,2,t)},proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.clearFullName=function(){return e.Message.setField(this,2,void 0)},proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.hasFullName=function(){return e.Message.getField(this,2)!=null},proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.getType=function(){return e.Message.getFieldWithDefault(this,3,"")},proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.setType=function(t){return e.Message.setField(this,3,t)},proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.clearType=function(){return e.Message.setField(this,3,void 0)},proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.hasType=function(){return e.Message.getField(this,3)!=null},proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.getReserved=function(){return e.Message.getBooleanFieldWithDefault(this,5,!1)},proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.setReserved=function(t){return e.Message.setField(this,5,t)},proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.clearReserved=function(){return e.Message.setField(this,5,void 0)},proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.hasReserved=function(){return e.Message.getField(this,5)!=null},proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.getRepeated=function(){return e.Message.getBooleanFieldWithDefault(this,6,!1)},proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.setRepeated=function(t){return e.Message.setField(this,6,t)},proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.clearRepeated=function(){return e.Message.setField(this,6,void 0)},proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.hasRepeated=function(){return e.Message.getField(this,6)!=null},proto.google.protobuf.ExtensionRangeOptions.prototype.getUninterpretedOptionList=function(){return e.Message.getRepeatedWrapperField(this,proto.google.protobuf.UninterpretedOption,999)},proto.google.protobuf.ExtensionRangeOptions.prototype.setUninterpretedOptionList=function(t){return e.Message.setRepeatedWrapperField(this,999,t)},proto.google.protobuf.ExtensionRangeOptions.prototype.addUninterpretedOption=function(t,o){return e.Message.addToRepeatedWrapperField(this,999,t,proto.google.protobuf.UninterpretedOption,o)},proto.google.protobuf.ExtensionRangeOptions.prototype.clearUninterpretedOptionList=function(){return this.setUninterpretedOptionList([])},proto.google.protobuf.ExtensionRangeOptions.prototype.getDeclarationList=function(){return e.Message.getRepeatedWrapperField(this,proto.google.protobuf.ExtensionRangeOptions.Declaration,2)},proto.google.protobuf.ExtensionRangeOptions.prototype.setDeclarationList=function(t){return e.Message.setRepeatedWrapperField(this,2,t)},proto.google.protobuf.ExtensionRangeOptions.prototype.addDeclaration=function(t,o){return e.Message.addToRepeatedWrapperField(this,2,t,proto.google.protobuf.ExtensionRangeOptions.Declaration,o)},proto.google.protobuf.ExtensionRangeOptions.prototype.clearDeclarationList=function(){return this.setDeclarationList([])},proto.google.protobuf.ExtensionRangeOptions.prototype.getFeatures=function(){return e.Message.getWrapperField(this,proto.google.protobuf.FeatureSet,50)},proto.google.protobuf.ExtensionRangeOptions.prototype.setFeatures=function(t){return e.Message.setWrapperField(this,50,t)},proto.google.protobuf.ExtensionRangeOptions.prototype.clearFeatures=function(){return this.setFeatures(void 0)},proto.google.protobuf.ExtensionRangeOptions.prototype.hasFeatures=function(){return e.Message.getField(this,50)!=null},proto.google.protobuf.ExtensionRangeOptions.prototype.getVerification=function(){return e.Message.getFieldWithDefault(this,3,1)},proto.google.protobuf.ExtensionRangeOptions.prototype.setVerification=function(t){return e.Message.setField(this,3,t)},proto.google.protobuf.ExtensionRangeOptions.prototype.clearVerification=function(){return e.Message.setField(this,3,void 0)},proto.google.protobuf.ExtensionRangeOptions.prototype.hasVerification=function(){return e.Message.getField(this,3)!=null},e.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.FieldDescriptorProto.prototype.toObject=function(t){return proto.google.protobuf.FieldDescriptorProto.toObject(t,this)},proto.google.protobuf.FieldDescriptorProto.toObject=function(t,o){var a,s={name:(a=e.Message.getField(o,1))==null?void 0:a,number:(a=e.Message.getField(o,3))==null?void 0:a,label:(a=e.Message.getField(o,4))==null?void 0:a,type:(a=e.Message.getField(o,5))==null?void 0:a,typeName:(a=e.Message.getField(o,6))==null?void 0:a,extendee:(a=e.Message.getField(o,2))==null?void 0:a,defaultValue:(a=e.Message.getField(o,7))==null?void 0:a,oneofIndex:(a=e.Message.getField(o,9))==null?void 0:a,jsonName:(a=e.Message.getField(o,10))==null?void 0:a,options:(a=o.getOptions())&&proto.google.protobuf.FieldOptions.toObject(t,a),proto3Optional:(a=e.Message.getBooleanField(o,17))==null?void 0:a};return t&&(s.$jspbMessageInstance=o),s}),proto.google.protobuf.FieldDescriptorProto.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.google.protobuf.FieldDescriptorProto;return proto.google.protobuf.FieldDescriptorProto.deserializeBinaryFromReader(a,o)},proto.google.protobuf.FieldDescriptorProto.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 1:var s=o.readString();t.setName(s);break;case 3:var s=o.readInt32();t.setNumber(s);break;case 4:var s=o.readEnum();t.setLabel(s);break;case 5:var s=o.readEnum();t.setType(s);break;case 6:var s=o.readString();t.setTypeName(s);break;case 2:var s=o.readString();t.setExtendee(s);break;case 7:var s=o.readString();t.setDefaultValue(s);break;case 9:var s=o.readInt32();t.setOneofIndex(s);break;case 10:var s=o.readString();t.setJsonName(s);break;case 8:var s=new proto.google.protobuf.FieldOptions;o.readMessage(s,proto.google.protobuf.FieldOptions.deserializeBinaryFromReader),t.setOptions(s);break;case 17:var s=o.readBool();t.setProto3Optional(s);break;default:o.skipField();break}}return t},proto.google.protobuf.FieldDescriptorProto.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.google.protobuf.FieldDescriptorProto.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.google.protobuf.FieldDescriptorProto.serializeBinaryToWriter=function(t,o){var a=void 0;a=e.Message.getField(t,1),a!=null&&o.writeString(1,a),a=e.Message.getField(t,3),a!=null&&o.writeInt32(3,a),a=e.Message.getField(t,4),a!=null&&o.writeEnum(4,a),a=e.Message.getField(t,5),a!=null&&o.writeEnum(5,a),a=e.Message.getField(t,6),a!=null&&o.writeString(6,a),a=e.Message.getField(t,2),a!=null&&o.writeString(2,a),a=e.Message.getField(t,7),a!=null&&o.writeString(7,a),a=e.Message.getField(t,9),a!=null&&o.writeInt32(9,a),a=e.Message.getField(t,10),a!=null&&o.writeString(10,a),a=t.getOptions(),a!=null&&o.writeMessage(8,a,proto.google.protobuf.FieldOptions.serializeBinaryToWriter),a=e.Message.getField(t,17),a!=null&&o.writeBool(17,a)},proto.google.protobuf.FieldDescriptorProto.Type={TYPE_DOUBLE:1,TYPE_FLOAT:2,TYPE_INT64:3,TYPE_UINT64:4,TYPE_INT32:5,TYPE_FIXED64:6,TYPE_FIXED32:7,TYPE_BOOL:8,TYPE_STRING:9,TYPE_GROUP:10,TYPE_MESSAGE:11,TYPE_BYTES:12,TYPE_UINT32:13,TYPE_ENUM:14,TYPE_SFIXED32:15,TYPE_SFIXED64:16,TYPE_SINT32:17,TYPE_SINT64:18},proto.google.protobuf.FieldDescriptorProto.Label={LABEL_OPTIONAL:1,LABEL_REPEATED:3,LABEL_REQUIRED:2},proto.google.protobuf.FieldDescriptorProto.prototype.getName=function(){return e.Message.getFieldWithDefault(this,1,"")},proto.google.protobuf.FieldDescriptorProto.prototype.setName=function(t){return e.Message.setField(this,1,t)},proto.google.protobuf.FieldDescriptorProto.prototype.clearName=function(){return e.Message.setField(this,1,void 0)},proto.google.protobuf.FieldDescriptorProto.prototype.hasName=function(){return e.Message.getField(this,1)!=null},proto.google.protobuf.FieldDescriptorProto.prototype.getNumber=function(){return e.Message.getFieldWithDefault(this,3,0)},proto.google.protobuf.FieldDescriptorProto.prototype.setNumber=function(t){return e.Message.setField(this,3,t)},proto.google.protobuf.FieldDescriptorProto.prototype.clearNumber=function(){return e.Message.setField(this,3,void 0)},proto.google.protobuf.FieldDescriptorProto.prototype.hasNumber=function(){return e.Message.getField(this,3)!=null},proto.google.protobuf.FieldDescriptorProto.prototype.getLabel=function(){return e.Message.getFieldWithDefault(this,4,1)},proto.google.protobuf.FieldDescriptorProto.prototype.setLabel=function(t){return e.Message.setField(this,4,t)},proto.google.protobuf.FieldDescriptorProto.prototype.clearLabel=function(){return e.Message.setField(this,4,void 0)},proto.google.protobuf.FieldDescriptorProto.prototype.hasLabel=function(){return e.Message.getField(this,4)!=null},proto.google.protobuf.FieldDescriptorProto.prototype.getType=function(){return e.Message.getFieldWithDefault(this,5,1)},proto.google.protobuf.FieldDescriptorProto.prototype.setType=function(t){return e.Message.setField(this,5,t)},proto.google.protobuf.FieldDescriptorProto.prototype.clearType=function(){return e.Message.setField(this,5,void 0)},proto.google.protobuf.FieldDescriptorProto.prototype.hasType=function(){return e.Message.getField(this,5)!=null},proto.google.protobuf.FieldDescriptorProto.prototype.getTypeName=function(){return e.Message.getFieldWithDefault(this,6,"")},proto.google.protobuf.FieldDescriptorProto.prototype.setTypeName=function(t){return e.Message.setField(this,6,t)},proto.google.protobuf.FieldDescriptorProto.prototype.clearTypeName=function(){return e.Message.setField(this,6,void 0)},proto.google.protobuf.FieldDescriptorProto.prototype.hasTypeName=function(){return e.Message.getField(this,6)!=null},proto.google.protobuf.FieldDescriptorProto.prototype.getExtendee=function(){return e.Message.getFieldWithDefault(this,2,"")},proto.google.protobuf.FieldDescriptorProto.prototype.setExtendee=function(t){return e.Message.setField(this,2,t)},proto.google.protobuf.FieldDescriptorProto.prototype.clearExtendee=function(){return e.Message.setField(this,2,void 0)},proto.google.protobuf.FieldDescriptorProto.prototype.hasExtendee=function(){return e.Message.getField(this,2)!=null},proto.google.protobuf.FieldDescriptorProto.prototype.getDefaultValue=function(){return e.Message.getFieldWithDefault(this,7,"")},proto.google.protobuf.FieldDescriptorProto.prototype.setDefaultValue=function(t){return e.Message.setField(this,7,t)},proto.google.protobuf.FieldDescriptorProto.prototype.clearDefaultValue=function(){return e.Message.setField(this,7,void 0)},proto.google.protobuf.FieldDescriptorProto.prototype.hasDefaultValue=function(){return e.Message.getField(this,7)!=null},proto.google.protobuf.FieldDescriptorProto.prototype.getOneofIndex=function(){return e.Message.getFieldWithDefault(this,9,0)},proto.google.protobuf.FieldDescriptorProto.prototype.setOneofIndex=function(t){return e.Message.setField(this,9,t)},proto.google.protobuf.FieldDescriptorProto.prototype.clearOneofIndex=function(){return e.Message.setField(this,9,void 0)},proto.google.protobuf.FieldDescriptorProto.prototype.hasOneofIndex=function(){return e.Message.getField(this,9)!=null},proto.google.protobuf.FieldDescriptorProto.prototype.getJsonName=function(){return e.Message.getFieldWithDefault(this,10,"")},proto.google.protobuf.FieldDescriptorProto.prototype.setJsonName=function(t){return e.Message.setField(this,10,t)},proto.google.protobuf.FieldDescriptorProto.prototype.clearJsonName=function(){return e.Message.setField(this,10,void 0)},proto.google.protobuf.FieldDescriptorProto.prototype.hasJsonName=function(){return e.Message.getField(this,10)!=null},proto.google.protobuf.FieldDescriptorProto.prototype.getOptions=function(){return e.Message.getWrapperField(this,proto.google.protobuf.FieldOptions,8)},proto.google.protobuf.FieldDescriptorProto.prototype.setOptions=function(t){return e.Message.setWrapperField(this,8,t)},proto.google.protobuf.FieldDescriptorProto.prototype.clearOptions=function(){return this.setOptions(void 0)},proto.google.protobuf.FieldDescriptorProto.prototype.hasOptions=function(){return e.Message.getField(this,8)!=null},proto.google.protobuf.FieldDescriptorProto.prototype.getProto3Optional=function(){return e.Message.getBooleanFieldWithDefault(this,17,!1)},proto.google.protobuf.FieldDescriptorProto.prototype.setProto3Optional=function(t){return e.Message.setField(this,17,t)},proto.google.protobuf.FieldDescriptorProto.prototype.clearProto3Optional=function(){return e.Message.setField(this,17,void 0)},proto.google.protobuf.FieldDescriptorProto.prototype.hasProto3Optional=function(){return e.Message.getField(this,17)!=null},e.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.OneofDescriptorProto.prototype.toObject=function(t){return proto.google.protobuf.OneofDescriptorProto.toObject(t,this)},proto.google.protobuf.OneofDescriptorProto.toObject=function(t,o){var a,s={name:(a=e.Message.getField(o,1))==null?void 0:a,options:(a=o.getOptions())&&proto.google.protobuf.OneofOptions.toObject(t,a)};return t&&(s.$jspbMessageInstance=o),s}),proto.google.protobuf.OneofDescriptorProto.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.google.protobuf.OneofDescriptorProto;return proto.google.protobuf.OneofDescriptorProto.deserializeBinaryFromReader(a,o)},proto.google.protobuf.OneofDescriptorProto.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 1:var s=o.readString();t.setName(s);break;case 2:var s=new proto.google.protobuf.OneofOptions;o.readMessage(s,proto.google.protobuf.OneofOptions.deserializeBinaryFromReader),t.setOptions(s);break;default:o.skipField();break}}return t},proto.google.protobuf.OneofDescriptorProto.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.google.protobuf.OneofDescriptorProto.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.google.protobuf.OneofDescriptorProto.serializeBinaryToWriter=function(t,o){var a=void 0;a=e.Message.getField(t,1),a!=null&&o.writeString(1,a),a=t.getOptions(),a!=null&&o.writeMessage(2,a,proto.google.protobuf.OneofOptions.serializeBinaryToWriter)},proto.google.protobuf.OneofDescriptorProto.prototype.getName=function(){return e.Message.getFieldWithDefault(this,1,"")},proto.google.protobuf.OneofDescriptorProto.prototype.setName=function(t){return e.Message.setField(this,1,t)},proto.google.protobuf.OneofDescriptorProto.prototype.clearName=function(){return e.Message.setField(this,1,void 0)},proto.google.protobuf.OneofDescriptorProto.prototype.hasName=function(){return e.Message.getField(this,1)!=null},proto.google.protobuf.OneofDescriptorProto.prototype.getOptions=function(){return e.Message.getWrapperField(this,proto.google.protobuf.OneofOptions,2)},proto.google.protobuf.OneofDescriptorProto.prototype.setOptions=function(t){return e.Message.setWrapperField(this,2,t)},proto.google.protobuf.OneofDescriptorProto.prototype.clearOptions=function(){return this.setOptions(void 0)},proto.google.protobuf.OneofDescriptorProto.prototype.hasOptions=function(){return e.Message.getField(this,2)!=null},proto.google.protobuf.EnumDescriptorProto.repeatedFields_=[2,4,5],e.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.EnumDescriptorProto.prototype.toObject=function(t){return proto.google.protobuf.EnumDescriptorProto.toObject(t,this)},proto.google.protobuf.EnumDescriptorProto.toObject=function(t,o){var a,s={name:(a=e.Message.getField(o,1))==null?void 0:a,valueList:e.Message.toObjectList(o.getValueList(),proto.google.protobuf.EnumValueDescriptorProto.toObject,t),options:(a=o.getOptions())&&proto.google.protobuf.EnumOptions.toObject(t,a),reservedRangeList:e.Message.toObjectList(o.getReservedRangeList(),proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject,t),reservedNameList:(a=e.Message.getRepeatedField(o,5))==null?void 0:a};return t&&(s.$jspbMessageInstance=o),s}),proto.google.protobuf.EnumDescriptorProto.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.google.protobuf.EnumDescriptorProto;return proto.google.protobuf.EnumDescriptorProto.deserializeBinaryFromReader(a,o)},proto.google.protobuf.EnumDescriptorProto.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 1:var s=o.readString();t.setName(s);break;case 2:var s=new proto.google.protobuf.EnumValueDescriptorProto;o.readMessage(s,proto.google.protobuf.EnumValueDescriptorProto.deserializeBinaryFromReader),t.addValue(s);break;case 3:var s=new proto.google.protobuf.EnumOptions;o.readMessage(s,proto.google.protobuf.EnumOptions.deserializeBinaryFromReader),t.setOptions(s);break;case 4:var s=new proto.google.protobuf.EnumDescriptorProto.EnumReservedRange;o.readMessage(s,proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.deserializeBinaryFromReader),t.addReservedRange(s);break;case 5:var s=o.readString();t.addReservedName(s);break;default:o.skipField();break}}return t},proto.google.protobuf.EnumDescriptorProto.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.google.protobuf.EnumDescriptorProto.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.google.protobuf.EnumDescriptorProto.serializeBinaryToWriter=function(t,o){var a=void 0;a=e.Message.getField(t,1),a!=null&&o.writeString(1,a),a=t.getValueList(),a.length>0&&o.writeRepeatedMessage(2,a,proto.google.protobuf.EnumValueDescriptorProto.serializeBinaryToWriter),a=t.getOptions(),a!=null&&o.writeMessage(3,a,proto.google.protobuf.EnumOptions.serializeBinaryToWriter),a=t.getReservedRangeList(),a.length>0&&o.writeRepeatedMessage(4,a,proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.serializeBinaryToWriter),a=t.getReservedNameList(),a.length>0&&o.writeRepeatedString(5,a)},e.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.toObject=function(t){return proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(t,this)},proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject=function(t,o){var a,s={start:(a=e.Message.getField(o,1))==null?void 0:a,end:(a=e.Message.getField(o,2))==null?void 0:a};return t&&(s.$jspbMessageInstance=o),s}),proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.google.protobuf.EnumDescriptorProto.EnumReservedRange;return proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.deserializeBinaryFromReader(a,o)},proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 1:var s=o.readInt32();t.setStart(s);break;case 2:var s=o.readInt32();t.setEnd(s);break;default:o.skipField();break}}return t},proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.serializeBinaryToWriter=function(t,o){var a=void 0;a=e.Message.getField(t,1),a!=null&&o.writeInt32(1,a),a=e.Message.getField(t,2),a!=null&&o.writeInt32(2,a)},proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.getStart=function(){return e.Message.getFieldWithDefault(this,1,0)},proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.setStart=function(t){return e.Message.setField(this,1,t)},proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.clearStart=function(){return e.Message.setField(this,1,void 0)},proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.hasStart=function(){return e.Message.getField(this,1)!=null},proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.getEnd=function(){return e.Message.getFieldWithDefault(this,2,0)},proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.setEnd=function(t){return e.Message.setField(this,2,t)},proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.clearEnd=function(){return e.Message.setField(this,2,void 0)},proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.hasEnd=function(){return e.Message.getField(this,2)!=null},proto.google.protobuf.EnumDescriptorProto.prototype.getName=function(){return e.Message.getFieldWithDefault(this,1,"")},proto.google.protobuf.EnumDescriptorProto.prototype.setName=function(t){return e.Message.setField(this,1,t)},proto.google.protobuf.EnumDescriptorProto.prototype.clearName=function(){return e.Message.setField(this,1,void 0)},proto.google.protobuf.EnumDescriptorProto.prototype.hasName=function(){return e.Message.getField(this,1)!=null},proto.google.protobuf.EnumDescriptorProto.prototype.getValueList=function(){return e.Message.getRepeatedWrapperField(this,proto.google.protobuf.EnumValueDescriptorProto,2)},proto.google.protobuf.EnumDescriptorProto.prototype.setValueList=function(t){return e.Message.setRepeatedWrapperField(this,2,t)},proto.google.protobuf.EnumDescriptorProto.prototype.addValue=function(t,o){return e.Message.addToRepeatedWrapperField(this,2,t,proto.google.protobuf.EnumValueDescriptorProto,o)},proto.google.protobuf.EnumDescriptorProto.prototype.clearValueList=function(){return this.setValueList([])},proto.google.protobuf.EnumDescriptorProto.prototype.getOptions=function(){return e.Message.getWrapperField(this,proto.google.protobuf.EnumOptions,3)},proto.google.protobuf.EnumDescriptorProto.prototype.setOptions=function(t){return e.Message.setWrapperField(this,3,t)},proto.google.protobuf.EnumDescriptorProto.prototype.clearOptions=function(){return this.setOptions(void 0)},proto.google.protobuf.EnumDescriptorProto.prototype.hasOptions=function(){return e.Message.getField(this,3)!=null},proto.google.protobuf.EnumDescriptorProto.prototype.getReservedRangeList=function(){return e.Message.getRepeatedWrapperField(this,proto.google.protobuf.EnumDescriptorProto.EnumReservedRange,4)},proto.google.protobuf.EnumDescriptorProto.prototype.setReservedRangeList=function(t){return e.Message.setRepeatedWrapperField(this,4,t)},proto.google.protobuf.EnumDescriptorProto.prototype.addReservedRange=function(t,o){return e.Message.addToRepeatedWrapperField(this,4,t,proto.google.protobuf.EnumDescriptorProto.EnumReservedRange,o)},proto.google.protobuf.EnumDescriptorProto.prototype.clearReservedRangeList=function(){return this.setReservedRangeList([])},proto.google.protobuf.EnumDescriptorProto.prototype.getReservedNameList=function(){return e.Message.getRepeatedField(this,5)},proto.google.protobuf.EnumDescriptorProto.prototype.setReservedNameList=function(t){return e.Message.setField(this,5,t||[])},proto.google.protobuf.EnumDescriptorProto.prototype.addReservedName=function(t,o){return e.Message.addToRepeatedField(this,5,t,o)},proto.google.protobuf.EnumDescriptorProto.prototype.clearReservedNameList=function(){return this.setReservedNameList([])},e.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.EnumValueDescriptorProto.prototype.toObject=function(t){return proto.google.protobuf.EnumValueDescriptorProto.toObject(t,this)},proto.google.protobuf.EnumValueDescriptorProto.toObject=function(t,o){var a,s={name:(a=e.Message.getField(o,1))==null?void 0:a,number:(a=e.Message.getField(o,2))==null?void 0:a,options:(a=o.getOptions())&&proto.google.protobuf.EnumValueOptions.toObject(t,a)};return t&&(s.$jspbMessageInstance=o),s}),proto.google.protobuf.EnumValueDescriptorProto.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.google.protobuf.EnumValueDescriptorProto;return proto.google.protobuf.EnumValueDescriptorProto.deserializeBinaryFromReader(a,o)},proto.google.protobuf.EnumValueDescriptorProto.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 1:var s=o.readString();t.setName(s);break;case 2:var s=o.readInt32();t.setNumber(s);break;case 3:var s=new proto.google.protobuf.EnumValueOptions;o.readMessage(s,proto.google.protobuf.EnumValueOptions.deserializeBinaryFromReader),t.setOptions(s);break;default:o.skipField();break}}return t},proto.google.protobuf.EnumValueDescriptorProto.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.google.protobuf.EnumValueDescriptorProto.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.google.protobuf.EnumValueDescriptorProto.serializeBinaryToWriter=function(t,o){var a=void 0;a=e.Message.getField(t,1),a!=null&&o.writeString(1,a),a=e.Message.getField(t,2),a!=null&&o.writeInt32(2,a),a=t.getOptions(),a!=null&&o.writeMessage(3,a,proto.google.protobuf.EnumValueOptions.serializeBinaryToWriter)},proto.google.protobuf.EnumValueDescriptorProto.prototype.getName=function(){return e.Message.getFieldWithDefault(this,1,"")},proto.google.protobuf.EnumValueDescriptorProto.prototype.setName=function(t){return e.Message.setField(this,1,t)},proto.google.protobuf.EnumValueDescriptorProto.prototype.clearName=function(){return e.Message.setField(this,1,void 0)},proto.google.protobuf.EnumValueDescriptorProto.prototype.hasName=function(){return e.Message.getField(this,1)!=null},proto.google.protobuf.EnumValueDescriptorProto.prototype.getNumber=function(){return e.Message.getFieldWithDefault(this,2,0)},proto.google.protobuf.EnumValueDescriptorProto.prototype.setNumber=function(t){return e.Message.setField(this,2,t)},proto.google.protobuf.EnumValueDescriptorProto.prototype.clearNumber=function(){return e.Message.setField(this,2,void 0)},proto.google.protobuf.EnumValueDescriptorProto.prototype.hasNumber=function(){return e.Message.getField(this,2)!=null},proto.google.protobuf.EnumValueDescriptorProto.prototype.getOptions=function(){return e.Message.getWrapperField(this,proto.google.protobuf.EnumValueOptions,3)},proto.google.protobuf.EnumValueDescriptorProto.prototype.setOptions=function(t){return e.Message.setWrapperField(this,3,t)},proto.google.protobuf.EnumValueDescriptorProto.prototype.clearOptions=function(){return this.setOptions(void 0)},proto.google.protobuf.EnumValueDescriptorProto.prototype.hasOptions=function(){return e.Message.getField(this,3)!=null},proto.google.protobuf.ServiceDescriptorProto.repeatedFields_=[2],e.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.ServiceDescriptorProto.prototype.toObject=function(t){return proto.google.protobuf.ServiceDescriptorProto.toObject(t,this)},proto.google.protobuf.ServiceDescriptorProto.toObject=function(t,o){var a,s={name:(a=e.Message.getField(o,1))==null?void 0:a,methodList:e.Message.toObjectList(o.getMethodList(),proto.google.protobuf.MethodDescriptorProto.toObject,t),options:(a=o.getOptions())&&proto.google.protobuf.ServiceOptions.toObject(t,a)};return t&&(s.$jspbMessageInstance=o),s}),proto.google.protobuf.ServiceDescriptorProto.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.google.protobuf.ServiceDescriptorProto;return proto.google.protobuf.ServiceDescriptorProto.deserializeBinaryFromReader(a,o)},proto.google.protobuf.ServiceDescriptorProto.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 1:var s=o.readString();t.setName(s);break;case 2:var s=new proto.google.protobuf.MethodDescriptorProto;o.readMessage(s,proto.google.protobuf.MethodDescriptorProto.deserializeBinaryFromReader),t.addMethod(s);break;case 3:var s=new proto.google.protobuf.ServiceOptions;o.readMessage(s,proto.google.protobuf.ServiceOptions.deserializeBinaryFromReader),t.setOptions(s);break;default:o.skipField();break}}return t},proto.google.protobuf.ServiceDescriptorProto.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.google.protobuf.ServiceDescriptorProto.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.google.protobuf.ServiceDescriptorProto.serializeBinaryToWriter=function(t,o){var a=void 0;a=e.Message.getField(t,1),a!=null&&o.writeString(1,a),a=t.getMethodList(),a.length>0&&o.writeRepeatedMessage(2,a,proto.google.protobuf.MethodDescriptorProto.serializeBinaryToWriter),a=t.getOptions(),a!=null&&o.writeMessage(3,a,proto.google.protobuf.ServiceOptions.serializeBinaryToWriter)},proto.google.protobuf.ServiceDescriptorProto.prototype.getName=function(){return e.Message.getFieldWithDefault(this,1,"")},proto.google.protobuf.ServiceDescriptorProto.prototype.setName=function(t){return e.Message.setField(this,1,t)},proto.google.protobuf.ServiceDescriptorProto.prototype.clearName=function(){return e.Message.setField(this,1,void 0)},proto.google.protobuf.ServiceDescriptorProto.prototype.hasName=function(){return e.Message.getField(this,1)!=null},proto.google.protobuf.ServiceDescriptorProto.prototype.getMethodList=function(){return e.Message.getRepeatedWrapperField(this,proto.google.protobuf.MethodDescriptorProto,2)},proto.google.protobuf.ServiceDescriptorProto.prototype.setMethodList=function(t){return e.Message.setRepeatedWrapperField(this,2,t)},proto.google.protobuf.ServiceDescriptorProto.prototype.addMethod=function(t,o){return e.Message.addToRepeatedWrapperField(this,2,t,proto.google.protobuf.MethodDescriptorProto,o)},proto.google.protobuf.ServiceDescriptorProto.prototype.clearMethodList=function(){return this.setMethodList([])},proto.google.protobuf.ServiceDescriptorProto.prototype.getOptions=function(){return e.Message.getWrapperField(this,proto.google.protobuf.ServiceOptions,3)},proto.google.protobuf.ServiceDescriptorProto.prototype.setOptions=function(t){return e.Message.setWrapperField(this,3,t)},proto.google.protobuf.ServiceDescriptorProto.prototype.clearOptions=function(){return this.setOptions(void 0)},proto.google.protobuf.ServiceDescriptorProto.prototype.hasOptions=function(){return e.Message.getField(this,3)!=null},e.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.MethodDescriptorProto.prototype.toObject=function(t){return proto.google.protobuf.MethodDescriptorProto.toObject(t,this)},proto.google.protobuf.MethodDescriptorProto.toObject=function(t,o){var a,s={name:(a=e.Message.getField(o,1))==null?void 0:a,inputType:(a=e.Message.getField(o,2))==null?void 0:a,outputType:(a=e.Message.getField(o,3))==null?void 0:a,options:(a=o.getOptions())&&proto.google.protobuf.MethodOptions.toObject(t,a),clientStreaming:e.Message.getBooleanFieldWithDefault(o,5,!1),serverStreaming:e.Message.getBooleanFieldWithDefault(o,6,!1)};return t&&(s.$jspbMessageInstance=o),s}),proto.google.protobuf.MethodDescriptorProto.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.google.protobuf.MethodDescriptorProto;return proto.google.protobuf.MethodDescriptorProto.deserializeBinaryFromReader(a,o)},proto.google.protobuf.MethodDescriptorProto.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 1:var s=o.readString();t.setName(s);break;case 2:var s=o.readString();t.setInputType(s);break;case 3:var s=o.readString();t.setOutputType(s);break;case 4:var s=new proto.google.protobuf.MethodOptions;o.readMessage(s,proto.google.protobuf.MethodOptions.deserializeBinaryFromReader),t.setOptions(s);break;case 5:var s=o.readBool();t.setClientStreaming(s);break;case 6:var s=o.readBool();t.setServerStreaming(s);break;default:o.skipField();break}}return t},proto.google.protobuf.MethodDescriptorProto.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.google.protobuf.MethodDescriptorProto.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.google.protobuf.MethodDescriptorProto.serializeBinaryToWriter=function(t,o){var a=void 0;a=e.Message.getField(t,1),a!=null&&o.writeString(1,a),a=e.Message.getField(t,2),a!=null&&o.writeString(2,a),a=e.Message.getField(t,3),a!=null&&o.writeString(3,a),a=t.getOptions(),a!=null&&o.writeMessage(4,a,proto.google.protobuf.MethodOptions.serializeBinaryToWriter),a=e.Message.getField(t,5),a!=null&&o.writeBool(5,a),a=e.Message.getField(t,6),a!=null&&o.writeBool(6,a)},proto.google.protobuf.MethodDescriptorProto.prototype.getName=function(){return e.Message.getFieldWithDefault(this,1,"")},proto.google.protobuf.MethodDescriptorProto.prototype.setName=function(t){return e.Message.setField(this,1,t)},proto.google.protobuf.MethodDescriptorProto.prototype.clearName=function(){return e.Message.setField(this,1,void 0)},proto.google.protobuf.MethodDescriptorProto.prototype.hasName=function(){return e.Message.getField(this,1)!=null},proto.google.protobuf.MethodDescriptorProto.prototype.getInputType=function(){return e.Message.getFieldWithDefault(this,2,"")},proto.google.protobuf.MethodDescriptorProto.prototype.setInputType=function(t){return e.Message.setField(this,2,t)},proto.google.protobuf.MethodDescriptorProto.prototype.clearInputType=function(){return e.Message.setField(this,2,void 0)},proto.google.protobuf.MethodDescriptorProto.prototype.hasInputType=function(){return e.Message.getField(this,2)!=null},proto.google.protobuf.MethodDescriptorProto.prototype.getOutputType=function(){return e.Message.getFieldWithDefault(this,3,"")},proto.google.protobuf.MethodDescriptorProto.prototype.setOutputType=function(t){return e.Message.setField(this,3,t)},proto.google.protobuf.MethodDescriptorProto.prototype.clearOutputType=function(){return e.Message.setField(this,3,void 0)},proto.google.protobuf.MethodDescriptorProto.prototype.hasOutputType=function(){return e.Message.getField(this,3)!=null},proto.google.protobuf.MethodDescriptorProto.prototype.getOptions=function(){return e.Message.getWrapperField(this,proto.google.protobuf.MethodOptions,4)},proto.google.protobuf.MethodDescriptorProto.prototype.setOptions=function(t){return e.Message.setWrapperField(this,4,t)},proto.google.protobuf.MethodDescriptorProto.prototype.clearOptions=function(){return this.setOptions(void 0)},proto.google.protobuf.MethodDescriptorProto.prototype.hasOptions=function(){return e.Message.getField(this,4)!=null},proto.google.protobuf.MethodDescriptorProto.prototype.getClientStreaming=function(){return e.Message.getBooleanFieldWithDefault(this,5,!1)},proto.google.protobuf.MethodDescriptorProto.prototype.setClientStreaming=function(t){return e.Message.setField(this,5,t)},proto.google.protobuf.MethodDescriptorProto.prototype.clearClientStreaming=function(){return e.Message.setField(this,5,void 0)},proto.google.protobuf.MethodDescriptorProto.prototype.hasClientStreaming=function(){return e.Message.getField(this,5)!=null},proto.google.protobuf.MethodDescriptorProto.prototype.getServerStreaming=function(){return e.Message.getBooleanFieldWithDefault(this,6,!1)},proto.google.protobuf.MethodDescriptorProto.prototype.setServerStreaming=function(t){return e.Message.setField(this,6,t)},proto.google.protobuf.MethodDescriptorProto.prototype.clearServerStreaming=function(){return e.Message.setField(this,6,void 0)},proto.google.protobuf.MethodDescriptorProto.prototype.hasServerStreaming=function(){return e.Message.getField(this,6)!=null},proto.google.protobuf.FileOptions.repeatedFields_=[999],e.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.FileOptions.prototype.toObject=function(t){return proto.google.protobuf.FileOptions.toObject(t,this)},proto.google.protobuf.FileOptions.toObject=function(t,o){var a,s={javaPackage:(a=e.Message.getField(o,1))==null?void 0:a,javaOuterClassname:(a=e.Message.getField(o,8))==null?void 0:a,javaMultipleFiles:e.Message.getBooleanFieldWithDefault(o,10,!1),javaGenerateEqualsAndHash:(a=e.Message.getBooleanField(o,20))==null?void 0:a,javaStringCheckUtf8:e.Message.getBooleanFieldWithDefault(o,27,!1),optimizeFor:e.Message.getFieldWithDefault(o,9,1),goPackage:(a=e.Message.getField(o,11))==null?void 0:a,ccGenericServices:e.Message.getBooleanFieldWithDefault(o,16,!1),javaGenericServices:e.Message.getBooleanFieldWithDefault(o,17,!1),pyGenericServices:e.Message.getBooleanFieldWithDefault(o,18,!1),deprecated:e.Message.getBooleanFieldWithDefault(o,23,!1),ccEnableArenas:e.Message.getBooleanFieldWithDefault(o,31,!0),objcClassPrefix:(a=e.Message.getField(o,36))==null?void 0:a,csharpNamespace:(a=e.Message.getField(o,37))==null?void 0:a,swiftPrefix:(a=e.Message.getField(o,39))==null?void 0:a,phpClassPrefix:(a=e.Message.getField(o,40))==null?void 0:a,phpNamespace:(a=e.Message.getField(o,41))==null?void 0:a,phpMetadataNamespace:(a=e.Message.getField(o,44))==null?void 0:a,rubyPackage:(a=e.Message.getField(o,45))==null?void 0:a,features:(a=o.getFeatures())&&proto.google.protobuf.FeatureSet.toObject(t,a),uninterpretedOptionList:e.Message.toObjectList(o.getUninterpretedOptionList(),proto.google.protobuf.UninterpretedOption.toObject,t)};return e.Message.toObjectExtension(o,s,proto.google.protobuf.FileOptions.extensions,proto.google.protobuf.FileOptions.prototype.getExtension,t),t&&(s.$jspbMessageInstance=o),s}),proto.google.protobuf.FileOptions.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.google.protobuf.FileOptions;return proto.google.protobuf.FileOptions.deserializeBinaryFromReader(a,o)},proto.google.protobuf.FileOptions.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 1:var s=o.readString();t.setJavaPackage(s);break;case 8:var s=o.readString();t.setJavaOuterClassname(s);break;case 10:var s=o.readBool();t.setJavaMultipleFiles(s);break;case 20:var s=o.readBool();t.setJavaGenerateEqualsAndHash(s);break;case 27:var s=o.readBool();t.setJavaStringCheckUtf8(s);break;case 9:var s=o.readEnum();t.setOptimizeFor(s);break;case 11:var s=o.readString();t.setGoPackage(s);break;case 16:var s=o.readBool();t.setCcGenericServices(s);break;case 17:var s=o.readBool();t.setJavaGenericServices(s);break;case 18:var s=o.readBool();t.setPyGenericServices(s);break;case 23:var s=o.readBool();t.setDeprecated(s);break;case 31:var s=o.readBool();t.setCcEnableArenas(s);break;case 36:var s=o.readString();t.setObjcClassPrefix(s);break;case 37:var s=o.readString();t.setCsharpNamespace(s);break;case 39:var s=o.readString();t.setSwiftPrefix(s);break;case 40:var s=o.readString();t.setPhpClassPrefix(s);break;case 41:var s=o.readString();t.setPhpNamespace(s);break;case 44:var s=o.readString();t.setPhpMetadataNamespace(s);break;case 45:var s=o.readString();t.setRubyPackage(s);break;case 50:var s=new proto.google.protobuf.FeatureSet;o.readMessage(s,proto.google.protobuf.FeatureSet.deserializeBinaryFromReader),t.setFeatures(s);break;case 999:var s=new proto.google.protobuf.UninterpretedOption;o.readMessage(s,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader),t.addUninterpretedOption(s);break;default:e.Message.readBinaryExtension(t,o,proto.google.protobuf.FileOptions.extensionsBinary,proto.google.protobuf.FileOptions.prototype.getExtension,proto.google.protobuf.FileOptions.prototype.setExtension);break}}return t},proto.google.protobuf.FileOptions.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.google.protobuf.FileOptions.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.google.protobuf.FileOptions.serializeBinaryToWriter=function(t,o){var a=void 0;a=e.Message.getField(t,1),a!=null&&o.writeString(1,a),a=e.Message.getField(t,8),a!=null&&o.writeString(8,a),a=e.Message.getField(t,10),a!=null&&o.writeBool(10,a),a=e.Message.getField(t,20),a!=null&&o.writeBool(20,a),a=e.Message.getField(t,27),a!=null&&o.writeBool(27,a),a=e.Message.getField(t,9),a!=null&&o.writeEnum(9,a),a=e.Message.getField(t,11),a!=null&&o.writeString(11,a),a=e.Message.getField(t,16),a!=null&&o.writeBool(16,a),a=e.Message.getField(t,17),a!=null&&o.writeBool(17,a),a=e.Message.getField(t,18),a!=null&&o.writeBool(18,a),a=e.Message.getField(t,23),a!=null&&o.writeBool(23,a),a=e.Message.getField(t,31),a!=null&&o.writeBool(31,a),a=e.Message.getField(t,36),a!=null&&o.writeString(36,a),a=e.Message.getField(t,37),a!=null&&o.writeString(37,a),a=e.Message.getField(t,39),a!=null&&o.writeString(39,a),a=e.Message.getField(t,40),a!=null&&o.writeString(40,a),a=e.Message.getField(t,41),a!=null&&o.writeString(41,a),a=e.Message.getField(t,44),a!=null&&o.writeString(44,a),a=e.Message.getField(t,45),a!=null&&o.writeString(45,a),a=t.getFeatures(),a!=null&&o.writeMessage(50,a,proto.google.protobuf.FeatureSet.serializeBinaryToWriter),a=t.getUninterpretedOptionList(),a.length>0&&o.writeRepeatedMessage(999,a,proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter),e.Message.serializeBinaryExtensions(t,o,proto.google.protobuf.FileOptions.extensionsBinary,proto.google.protobuf.FileOptions.prototype.getExtension)},proto.google.protobuf.FileOptions.OptimizeMode={SPEED:1,CODE_SIZE:2,LITE_RUNTIME:3},proto.google.protobuf.FileOptions.prototype.getJavaPackage=function(){return e.Message.getFieldWithDefault(this,1,"")},proto.google.protobuf.FileOptions.prototype.setJavaPackage=function(t){return e.Message.setField(this,1,t)},proto.google.protobuf.FileOptions.prototype.clearJavaPackage=function(){return e.Message.setField(this,1,void 0)},proto.google.protobuf.FileOptions.prototype.hasJavaPackage=function(){return e.Message.getField(this,1)!=null},proto.google.protobuf.FileOptions.prototype.getJavaOuterClassname=function(){return e.Message.getFieldWithDefault(this,8,"")},proto.google.protobuf.FileOptions.prototype.setJavaOuterClassname=function(t){return e.Message.setField(this,8,t)},proto.google.protobuf.FileOptions.prototype.clearJavaOuterClassname=function(){return e.Message.setField(this,8,void 0)},proto.google.protobuf.FileOptions.prototype.hasJavaOuterClassname=function(){return e.Message.getField(this,8)!=null},proto.google.protobuf.FileOptions.prototype.getJavaMultipleFiles=function(){return e.Message.getBooleanFieldWithDefault(this,10,!1)},proto.google.protobuf.FileOptions.prototype.setJavaMultipleFiles=function(t){return e.Message.setField(this,10,t)},proto.google.protobuf.FileOptions.prototype.clearJavaMultipleFiles=function(){return e.Message.setField(this,10,void 0)},proto.google.protobuf.FileOptions.prototype.hasJavaMultipleFiles=function(){return e.Message.getField(this,10)!=null},proto.google.protobuf.FileOptions.prototype.getJavaGenerateEqualsAndHash=function(){return e.Message.getBooleanFieldWithDefault(this,20,!1)},proto.google.protobuf.FileOptions.prototype.setJavaGenerateEqualsAndHash=function(t){return e.Message.setField(this,20,t)},proto.google.protobuf.FileOptions.prototype.clearJavaGenerateEqualsAndHash=function(){return e.Message.setField(this,20,void 0)},proto.google.protobuf.FileOptions.prototype.hasJavaGenerateEqualsAndHash=function(){return e.Message.getField(this,20)!=null},proto.google.protobuf.FileOptions.prototype.getJavaStringCheckUtf8=function(){return e.Message.getBooleanFieldWithDefault(this,27,!1)},proto.google.protobuf.FileOptions.prototype.setJavaStringCheckUtf8=function(t){return e.Message.setField(this,27,t)},proto.google.protobuf.FileOptions.prototype.clearJavaStringCheckUtf8=function(){return e.Message.setField(this,27,void 0)},proto.google.protobuf.FileOptions.prototype.hasJavaStringCheckUtf8=function(){return e.Message.getField(this,27)!=null},proto.google.protobuf.FileOptions.prototype.getOptimizeFor=function(){return e.Message.getFieldWithDefault(this,9,1)},proto.google.protobuf.FileOptions.prototype.setOptimizeFor=function(t){return e.Message.setField(this,9,t)},proto.google.protobuf.FileOptions.prototype.clearOptimizeFor=function(){return e.Message.setField(this,9,void 0)},proto.google.protobuf.FileOptions.prototype.hasOptimizeFor=function(){return e.Message.getField(this,9)!=null},proto.google.protobuf.FileOptions.prototype.getGoPackage=function(){return e.Message.getFieldWithDefault(this,11,"")},proto.google.protobuf.FileOptions.prototype.setGoPackage=function(t){return e.Message.setField(this,11,t)},proto.google.protobuf.FileOptions.prototype.clearGoPackage=function(){return e.Message.setField(this,11,void 0)},proto.google.protobuf.FileOptions.prototype.hasGoPackage=function(){return e.Message.getField(this,11)!=null},proto.google.protobuf.FileOptions.prototype.getCcGenericServices=function(){return e.Message.getBooleanFieldWithDefault(this,16,!1)},proto.google.protobuf.FileOptions.prototype.setCcGenericServices=function(t){return e.Message.setField(this,16,t)},proto.google.protobuf.FileOptions.prototype.clearCcGenericServices=function(){return e.Message.setField(this,16,void 0)},proto.google.protobuf.FileOptions.prototype.hasCcGenericServices=function(){return e.Message.getField(this,16)!=null},proto.google.protobuf.FileOptions.prototype.getJavaGenericServices=function(){return e.Message.getBooleanFieldWithDefault(this,17,!1)},proto.google.protobuf.FileOptions.prototype.setJavaGenericServices=function(t){return e.Message.setField(this,17,t)},proto.google.protobuf.FileOptions.prototype.clearJavaGenericServices=function(){return e.Message.setField(this,17,void 0)},proto.google.protobuf.FileOptions.prototype.hasJavaGenericServices=function(){return e.Message.getField(this,17)!=null},proto.google.protobuf.FileOptions.prototype.getPyGenericServices=function(){return e.Message.getBooleanFieldWithDefault(this,18,!1)},proto.google.protobuf.FileOptions.prototype.setPyGenericServices=function(t){return e.Message.setField(this,18,t)},proto.google.protobuf.FileOptions.prototype.clearPyGenericServices=function(){return e.Message.setField(this,18,void 0)},proto.google.protobuf.FileOptions.prototype.hasPyGenericServices=function(){return e.Message.getField(this,18)!=null},proto.google.protobuf.FileOptions.prototype.getDeprecated=function(){return e.Message.getBooleanFieldWithDefault(this,23,!1)},proto.google.protobuf.FileOptions.prototype.setDeprecated=function(t){return e.Message.setField(this,23,t)},proto.google.protobuf.FileOptions.prototype.clearDeprecated=function(){return e.Message.setField(this,23,void 0)},proto.google.protobuf.FileOptions.prototype.hasDeprecated=function(){return e.Message.getField(this,23)!=null},proto.google.protobuf.FileOptions.prototype.getCcEnableArenas=function(){return e.Message.getBooleanFieldWithDefault(this,31,!0)},proto.google.protobuf.FileOptions.prototype.setCcEnableArenas=function(t){return e.Message.setField(this,31,t)},proto.google.protobuf.FileOptions.prototype.clearCcEnableArenas=function(){return e.Message.setField(this,31,void 0)},proto.google.protobuf.FileOptions.prototype.hasCcEnableArenas=function(){return e.Message.getField(this,31)!=null},proto.google.protobuf.FileOptions.prototype.getObjcClassPrefix=function(){return e.Message.getFieldWithDefault(this,36,"")},proto.google.protobuf.FileOptions.prototype.setObjcClassPrefix=function(t){return e.Message.setField(this,36,t)},proto.google.protobuf.FileOptions.prototype.clearObjcClassPrefix=function(){return e.Message.setField(this,36,void 0)},proto.google.protobuf.FileOptions.prototype.hasObjcClassPrefix=function(){return e.Message.getField(this,36)!=null},proto.google.protobuf.FileOptions.prototype.getCsharpNamespace=function(){return e.Message.getFieldWithDefault(this,37,"")},proto.google.protobuf.FileOptions.prototype.setCsharpNamespace=function(t){return e.Message.setField(this,37,t)},proto.google.protobuf.FileOptions.prototype.clearCsharpNamespace=function(){return e.Message.setField(this,37,void 0)},proto.google.protobuf.FileOptions.prototype.hasCsharpNamespace=function(){return e.Message.getField(this,37)!=null},proto.google.protobuf.FileOptions.prototype.getSwiftPrefix=function(){return e.Message.getFieldWithDefault(this,39,"")},proto.google.protobuf.FileOptions.prototype.setSwiftPrefix=function(t){return e.Message.setField(this,39,t)},proto.google.protobuf.FileOptions.prototype.clearSwiftPrefix=function(){return e.Message.setField(this,39,void 0)},proto.google.protobuf.FileOptions.prototype.hasSwiftPrefix=function(){return e.Message.getField(this,39)!=null},proto.google.protobuf.FileOptions.prototype.getPhpClassPrefix=function(){return e.Message.getFieldWithDefault(this,40,"")},proto.google.protobuf.FileOptions.prototype.setPhpClassPrefix=function(t){return e.Message.setField(this,40,t)},proto.google.protobuf.FileOptions.prototype.clearPhpClassPrefix=function(){return e.Message.setField(this,40,void 0)},proto.google.protobuf.FileOptions.prototype.hasPhpClassPrefix=function(){return e.Message.getField(this,40)!=null},proto.google.protobuf.FileOptions.prototype.getPhpNamespace=function(){return e.Message.getFieldWithDefault(this,41,"")},proto.google.protobuf.FileOptions.prototype.setPhpNamespace=function(t){return e.Message.setField(this,41,t)},proto.google.protobuf.FileOptions.prototype.clearPhpNamespace=function(){return e.Message.setField(this,41,void 0)},proto.google.protobuf.FileOptions.prototype.hasPhpNamespace=function(){return e.Message.getField(this,41)!=null},proto.google.protobuf.FileOptions.prototype.getPhpMetadataNamespace=function(){return e.Message.getFieldWithDefault(this,44,"")},proto.google.protobuf.FileOptions.prototype.setPhpMetadataNamespace=function(t){return e.Message.setField(this,44,t)},proto.google.protobuf.FileOptions.prototype.clearPhpMetadataNamespace=function(){return e.Message.setField(this,44,void 0)},proto.google.protobuf.FileOptions.prototype.hasPhpMetadataNamespace=function(){return e.Message.getField(this,44)!=null},proto.google.protobuf.FileOptions.prototype.getRubyPackage=function(){return e.Message.getFieldWithDefault(this,45,"")},proto.google.protobuf.FileOptions.prototype.setRubyPackage=function(t){return e.Message.setField(this,45,t)},proto.google.protobuf.FileOptions.prototype.clearRubyPackage=function(){return e.Message.setField(this,45,void 0)},proto.google.protobuf.FileOptions.prototype.hasRubyPackage=function(){return e.Message.getField(this,45)!=null},proto.google.protobuf.FileOptions.prototype.getFeatures=function(){return e.Message.getWrapperField(this,proto.google.protobuf.FeatureSet,50)},proto.google.protobuf.FileOptions.prototype.setFeatures=function(t){return e.Message.setWrapperField(this,50,t)},proto.google.protobuf.FileOptions.prototype.clearFeatures=function(){return this.setFeatures(void 0)},proto.google.protobuf.FileOptions.prototype.hasFeatures=function(){return e.Message.getField(this,50)!=null},proto.google.protobuf.FileOptions.prototype.getUninterpretedOptionList=function(){return e.Message.getRepeatedWrapperField(this,proto.google.protobuf.UninterpretedOption,999)},proto.google.protobuf.FileOptions.prototype.setUninterpretedOptionList=function(t){return e.Message.setRepeatedWrapperField(this,999,t)},proto.google.protobuf.FileOptions.prototype.addUninterpretedOption=function(t,o){return e.Message.addToRepeatedWrapperField(this,999,t,proto.google.protobuf.UninterpretedOption,o)},proto.google.protobuf.FileOptions.prototype.clearUninterpretedOptionList=function(){return this.setUninterpretedOptionList([])},proto.google.protobuf.MessageOptions.repeatedFields_=[999],e.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.MessageOptions.prototype.toObject=function(t){return proto.google.protobuf.MessageOptions.toObject(t,this)},proto.google.protobuf.MessageOptions.toObject=function(t,o){var a,s={messageSetWireFormat:e.Message.getBooleanFieldWithDefault(o,1,!1),noStandardDescriptorAccessor:e.Message.getBooleanFieldWithDefault(o,2,!1),deprecated:e.Message.getBooleanFieldWithDefault(o,3,!1),mapEntry:(a=e.Message.getBooleanField(o,7))==null?void 0:a,deprecatedLegacyJsonFieldConflicts:(a=e.Message.getBooleanField(o,11))==null?void 0:a,features:(a=o.getFeatures())&&proto.google.protobuf.FeatureSet.toObject(t,a),uninterpretedOptionList:e.Message.toObjectList(o.getUninterpretedOptionList(),proto.google.protobuf.UninterpretedOption.toObject,t)};return e.Message.toObjectExtension(o,s,proto.google.protobuf.MessageOptions.extensions,proto.google.protobuf.MessageOptions.prototype.getExtension,t),t&&(s.$jspbMessageInstance=o),s}),proto.google.protobuf.MessageOptions.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.google.protobuf.MessageOptions;return proto.google.protobuf.MessageOptions.deserializeBinaryFromReader(a,o)},proto.google.protobuf.MessageOptions.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 1:var s=o.readBool();t.setMessageSetWireFormat(s);break;case 2:var s=o.readBool();t.setNoStandardDescriptorAccessor(s);break;case 3:var s=o.readBool();t.setDeprecated(s);break;case 7:var s=o.readBool();t.setMapEntry(s);break;case 11:var s=o.readBool();t.setDeprecatedLegacyJsonFieldConflicts(s);break;case 12:var s=new proto.google.protobuf.FeatureSet;o.readMessage(s,proto.google.protobuf.FeatureSet.deserializeBinaryFromReader),t.setFeatures(s);break;case 999:var s=new proto.google.protobuf.UninterpretedOption;o.readMessage(s,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader),t.addUninterpretedOption(s);break;default:e.Message.readBinaryExtension(t,o,proto.google.protobuf.MessageOptions.extensionsBinary,proto.google.protobuf.MessageOptions.prototype.getExtension,proto.google.protobuf.MessageOptions.prototype.setExtension);break}}return t},proto.google.protobuf.MessageOptions.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.google.protobuf.MessageOptions.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.google.protobuf.MessageOptions.serializeBinaryToWriter=function(t,o){var a=void 0;a=e.Message.getField(t,1),a!=null&&o.writeBool(1,a),a=e.Message.getField(t,2),a!=null&&o.writeBool(2,a),a=e.Message.getField(t,3),a!=null&&o.writeBool(3,a),a=e.Message.getField(t,7),a!=null&&o.writeBool(7,a),a=e.Message.getField(t,11),a!=null&&o.writeBool(11,a),a=t.getFeatures(),a!=null&&o.writeMessage(12,a,proto.google.protobuf.FeatureSet.serializeBinaryToWriter),a=t.getUninterpretedOptionList(),a.length>0&&o.writeRepeatedMessage(999,a,proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter),e.Message.serializeBinaryExtensions(t,o,proto.google.protobuf.MessageOptions.extensionsBinary,proto.google.protobuf.MessageOptions.prototype.getExtension)},proto.google.protobuf.MessageOptions.prototype.getMessageSetWireFormat=function(){return e.Message.getBooleanFieldWithDefault(this,1,!1)},proto.google.protobuf.MessageOptions.prototype.setMessageSetWireFormat=function(t){return e.Message.setField(this,1,t)},proto.google.protobuf.MessageOptions.prototype.clearMessageSetWireFormat=function(){return e.Message.setField(this,1,void 0)},proto.google.protobuf.MessageOptions.prototype.hasMessageSetWireFormat=function(){return e.Message.getField(this,1)!=null},proto.google.protobuf.MessageOptions.prototype.getNoStandardDescriptorAccessor=function(){return e.Message.getBooleanFieldWithDefault(this,2,!1)},proto.google.protobuf.MessageOptions.prototype.setNoStandardDescriptorAccessor=function(t){return e.Message.setField(this,2,t)},proto.google.protobuf.MessageOptions.prototype.clearNoStandardDescriptorAccessor=function(){return e.Message.setField(this,2,void 0)},proto.google.protobuf.MessageOptions.prototype.hasNoStandardDescriptorAccessor=function(){return e.Message.getField(this,2)!=null},proto.google.protobuf.MessageOptions.prototype.getDeprecated=function(){return e.Message.getBooleanFieldWithDefault(this,3,!1)},proto.google.protobuf.MessageOptions.prototype.setDeprecated=function(t){return e.Message.setField(this,3,t)},proto.google.protobuf.MessageOptions.prototype.clearDeprecated=function(){return e.Message.setField(this,3,void 0)},proto.google.protobuf.MessageOptions.prototype.hasDeprecated=function(){return e.Message.getField(this,3)!=null},proto.google.protobuf.MessageOptions.prototype.getMapEntry=function(){return e.Message.getBooleanFieldWithDefault(this,7,!1)},proto.google.protobuf.MessageOptions.prototype.setMapEntry=function(t){return e.Message.setField(this,7,t)},proto.google.protobuf.MessageOptions.prototype.clearMapEntry=function(){return e.Message.setField(this,7,void 0)},proto.google.protobuf.MessageOptions.prototype.hasMapEntry=function(){return e.Message.getField(this,7)!=null},proto.google.protobuf.MessageOptions.prototype.getDeprecatedLegacyJsonFieldConflicts=function(){return e.Message.getBooleanFieldWithDefault(this,11,!1)},proto.google.protobuf.MessageOptions.prototype.setDeprecatedLegacyJsonFieldConflicts=function(t){return e.Message.setField(this,11,t)},proto.google.protobuf.MessageOptions.prototype.clearDeprecatedLegacyJsonFieldConflicts=function(){return e.Message.setField(this,11,void 0)},proto.google.protobuf.MessageOptions.prototype.hasDeprecatedLegacyJsonFieldConflicts=function(){return e.Message.getField(this,11)!=null},proto.google.protobuf.MessageOptions.prototype.getFeatures=function(){return e.Message.getWrapperField(this,proto.google.protobuf.FeatureSet,12)},proto.google.protobuf.MessageOptions.prototype.setFeatures=function(t){return e.Message.setWrapperField(this,12,t)},proto.google.protobuf.MessageOptions.prototype.clearFeatures=function(){return this.setFeatures(void 0)},proto.google.protobuf.MessageOptions.prototype.hasFeatures=function(){return e.Message.getField(this,12)!=null},proto.google.protobuf.MessageOptions.prototype.getUninterpretedOptionList=function(){return e.Message.getRepeatedWrapperField(this,proto.google.protobuf.UninterpretedOption,999)},proto.google.protobuf.MessageOptions.prototype.setUninterpretedOptionList=function(t){return e.Message.setRepeatedWrapperField(this,999,t)},proto.google.protobuf.MessageOptions.prototype.addUninterpretedOption=function(t,o){return e.Message.addToRepeatedWrapperField(this,999,t,proto.google.protobuf.UninterpretedOption,o)},proto.google.protobuf.MessageOptions.prototype.clearUninterpretedOptionList=function(){return this.setUninterpretedOptionList([])},proto.google.protobuf.FieldOptions.repeatedFields_=[19,20,999],e.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.FieldOptions.prototype.toObject=function(t){return proto.google.protobuf.FieldOptions.toObject(t,this)},proto.google.protobuf.FieldOptions.toObject=function(t,o){var a,s={ctype:e.Message.getFieldWithDefault(o,1,0),packed:(a=e.Message.getBooleanField(o,2))==null?void 0:a,jstype:e.Message.getFieldWithDefault(o,6,0),lazy:e.Message.getBooleanFieldWithDefault(o,5,!1),unverifiedLazy:e.Message.getBooleanFieldWithDefault(o,15,!1),deprecated:e.Message.getBooleanFieldWithDefault(o,3,!1),weak:e.Message.getBooleanFieldWithDefault(o,10,!1),debugRedact:e.Message.getBooleanFieldWithDefault(o,16,!1),retention:(a=e.Message.getField(o,17))==null?void 0:a,targetsList:(a=e.Message.getRepeatedField(o,19))==null?void 0:a,editionDefaultsList:e.Message.toObjectList(o.getEditionDefaultsList(),proto.google.protobuf.FieldOptions.EditionDefault.toObject,t),features:(a=o.getFeatures())&&proto.google.protobuf.FeatureSet.toObject(t,a),featureSupport:(a=o.getFeatureSupport())&&proto.google.protobuf.FieldOptions.FeatureSupport.toObject(t,a),uninterpretedOptionList:e.Message.toObjectList(o.getUninterpretedOptionList(),proto.google.protobuf.UninterpretedOption.toObject,t)};return e.Message.toObjectExtension(o,s,proto.google.protobuf.FieldOptions.extensions,proto.google.protobuf.FieldOptions.prototype.getExtension,t),t&&(s.$jspbMessageInstance=o),s}),proto.google.protobuf.FieldOptions.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.google.protobuf.FieldOptions;return proto.google.protobuf.FieldOptions.deserializeBinaryFromReader(a,o)},proto.google.protobuf.FieldOptions.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 1:var u=o.readEnum();t.setCtype(u);break;case 2:var u=o.readBool();t.setPacked(u);break;case 6:var u=o.readEnum();t.setJstype(u);break;case 5:var u=o.readBool();t.setLazy(u);break;case 15:var u=o.readBool();t.setUnverifiedLazy(u);break;case 3:var u=o.readBool();t.setDeprecated(u);break;case 10:var u=o.readBool();t.setWeak(u);break;case 16:var u=o.readBool();t.setDebugRedact(u);break;case 17:var u=o.readEnum();t.setRetention(u);break;case 19:for(var s=o.isDelimited()?o.readPackedEnum():[o.readEnum()],l=0;l<s.length;l++)t.addTargets(s[l]);break;case 20:var u=new proto.google.protobuf.FieldOptions.EditionDefault;o.readMessage(u,proto.google.protobuf.FieldOptions.EditionDefault.deserializeBinaryFromReader),t.addEditionDefaults(u);break;case 21:var u=new proto.google.protobuf.FeatureSet;o.readMessage(u,proto.google.protobuf.FeatureSet.deserializeBinaryFromReader),t.setFeatures(u);break;case 22:var u=new proto.google.protobuf.FieldOptions.FeatureSupport;o.readMessage(u,proto.google.protobuf.FieldOptions.FeatureSupport.deserializeBinaryFromReader),t.setFeatureSupport(u);break;case 999:var u=new proto.google.protobuf.UninterpretedOption;o.readMessage(u,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader),t.addUninterpretedOption(u);break;default:e.Message.readBinaryExtension(t,o,proto.google.protobuf.FieldOptions.extensionsBinary,proto.google.protobuf.FieldOptions.prototype.getExtension,proto.google.protobuf.FieldOptions.prototype.setExtension);break}}return t},proto.google.protobuf.FieldOptions.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.google.protobuf.FieldOptions.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.google.protobuf.FieldOptions.serializeBinaryToWriter=function(t,o){var a=void 0;a=e.Message.getField(t,1),a!=null&&o.writeEnum(1,a),a=e.Message.getField(t,2),a!=null&&o.writeBool(2,a),a=e.Message.getField(t,6),a!=null&&o.writeEnum(6,a),a=e.Message.getField(t,5),a!=null&&o.writeBool(5,a),a=e.Message.getField(t,15),a!=null&&o.writeBool(15,a),a=e.Message.getField(t,3),a!=null&&o.writeBool(3,a),a=e.Message.getField(t,10),a!=null&&o.writeBool(10,a),a=e.Message.getField(t,16),a!=null&&o.writeBool(16,a),a=e.Message.getField(t,17),a!=null&&o.writeEnum(17,a),a=t.getTargetsList(),a.length>0&&o.writeRepeatedEnum(19,a),a=t.getEditionDefaultsList(),a.length>0&&o.writeRepeatedMessage(20,a,proto.google.protobuf.FieldOptions.EditionDefault.serializeBinaryToWriter),a=t.getFeatures(),a!=null&&o.writeMessage(21,a,proto.google.protobuf.FeatureSet.serializeBinaryToWriter),a=t.getFeatureSupport(),a!=null&&o.writeMessage(22,a,proto.google.protobuf.FieldOptions.FeatureSupport.serializeBinaryToWriter),a=t.getUninterpretedOptionList(),a.length>0&&o.writeRepeatedMessage(999,a,proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter),e.Message.serializeBinaryExtensions(t,o,proto.google.protobuf.FieldOptions.extensionsBinary,proto.google.protobuf.FieldOptions.prototype.getExtension)},proto.google.protobuf.FieldOptions.CType={STRING:0,CORD:1,STRING_PIECE:2},proto.google.protobuf.FieldOptions.JSType={JS_NORMAL:0,JS_STRING:1,JS_NUMBER:2},proto.google.protobuf.FieldOptions.OptionRetention={RETENTION_UNKNOWN:0,RETENTION_RUNTIME:1,RETENTION_SOURCE:2},proto.google.protobuf.FieldOptions.OptionTargetType={TARGET_TYPE_UNKNOWN:0,TARGET_TYPE_FILE:1,TARGET_TYPE_EXTENSION_RANGE:2,TARGET_TYPE_MESSAGE:3,TARGET_TYPE_FIELD:4,TARGET_TYPE_ONEOF:5,TARGET_TYPE_ENUM:6,TARGET_TYPE_ENUM_ENTRY:7,TARGET_TYPE_SERVICE:8,TARGET_TYPE_METHOD:9},e.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.FieldOptions.EditionDefault.prototype.toObject=function(t){return proto.google.protobuf.FieldOptions.EditionDefault.toObject(t,this)},proto.google.protobuf.FieldOptions.EditionDefault.toObject=function(t,o){var a,s={edition:(a=e.Message.getField(o,3))==null?void 0:a,value:(a=e.Message.getField(o,2))==null?void 0:a};return t&&(s.$jspbMessageInstance=o),s}),proto.google.protobuf.FieldOptions.EditionDefault.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.google.protobuf.FieldOptions.EditionDefault;return proto.google.protobuf.FieldOptions.EditionDefault.deserializeBinaryFromReader(a,o)},proto.google.protobuf.FieldOptions.EditionDefault.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 3:var s=o.readEnum();t.setEdition(s);break;case 2:var s=o.readString();t.setValue(s);break;default:o.skipField();break}}return t},proto.google.protobuf.FieldOptions.EditionDefault.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.google.protobuf.FieldOptions.EditionDefault.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.google.protobuf.FieldOptions.EditionDefault.serializeBinaryToWriter=function(t,o){var a=void 0;a=e.Message.getField(t,3),a!=null&&o.writeEnum(3,a),a=e.Message.getField(t,2),a!=null&&o.writeString(2,a)},proto.google.protobuf.FieldOptions.EditionDefault.prototype.getEdition=function(){return e.Message.getFieldWithDefault(this,3,0)},proto.google.protobuf.FieldOptions.EditionDefault.prototype.setEdition=function(t){return e.Message.setField(this,3,t)},proto.google.protobuf.FieldOptions.EditionDefault.prototype.clearEdition=function(){return e.Message.setField(this,3,void 0)},proto.google.protobuf.FieldOptions.EditionDefault.prototype.hasEdition=function(){return e.Message.getField(this,3)!=null},proto.google.protobuf.FieldOptions.EditionDefault.prototype.getValue=function(){return e.Message.getFieldWithDefault(this,2,"")},proto.google.protobuf.FieldOptions.EditionDefault.prototype.setValue=function(t){return e.Message.setField(this,2,t)},proto.google.protobuf.FieldOptions.EditionDefault.prototype.clearValue=function(){return e.Message.setField(this,2,void 0)},proto.google.protobuf.FieldOptions.EditionDefault.prototype.hasValue=function(){return e.Message.getField(this,2)!=null},e.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.FieldOptions.FeatureSupport.prototype.toObject=function(t){return proto.google.protobuf.FieldOptions.FeatureSupport.toObject(t,this)},proto.google.protobuf.FieldOptions.FeatureSupport.toObject=function(t,o){var a,s={editionIntroduced:(a=e.Message.getField(o,1))==null?void 0:a,editionDeprecated:(a=e.Message.getField(o,2))==null?void 0:a,deprecationWarning:(a=e.Message.getField(o,3))==null?void 0:a,editionRemoved:(a=e.Message.getField(o,4))==null?void 0:a};return t&&(s.$jspbMessageInstance=o),s}),proto.google.protobuf.FieldOptions.FeatureSupport.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.google.protobuf.FieldOptions.FeatureSupport;return proto.google.protobuf.FieldOptions.FeatureSupport.deserializeBinaryFromReader(a,o)},proto.google.protobuf.FieldOptions.FeatureSupport.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 1:var s=o.readEnum();t.setEditionIntroduced(s);break;case 2:var s=o.readEnum();t.setEditionDeprecated(s);break;case 3:var s=o.readString();t.setDeprecationWarning(s);break;case 4:var s=o.readEnum();t.setEditionRemoved(s);break;default:o.skipField();break}}return t},proto.google.protobuf.FieldOptions.FeatureSupport.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.google.protobuf.FieldOptions.FeatureSupport.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.google.protobuf.FieldOptions.FeatureSupport.serializeBinaryToWriter=function(t,o){var a=void 0;a=e.Message.getField(t,1),a!=null&&o.writeEnum(1,a),a=e.Message.getField(t,2),a!=null&&o.writeEnum(2,a),a=e.Message.getField(t,3),a!=null&&o.writeString(3,a),a=e.Message.getField(t,4),a!=null&&o.writeEnum(4,a)},proto.google.protobuf.FieldOptions.FeatureSupport.prototype.getEditionIntroduced=function(){return e.Message.getFieldWithDefault(this,1,0)},proto.google.protobuf.FieldOptions.FeatureSupport.prototype.setEditionIntroduced=function(t){return e.Message.setField(this,1,t)},proto.google.protobuf.FieldOptions.FeatureSupport.prototype.clearEditionIntroduced=function(){return e.Message.setField(this,1,void 0)},proto.google.protobuf.FieldOptions.FeatureSupport.prototype.hasEditionIntroduced=function(){return e.Message.getField(this,1)!=null},proto.google.protobuf.FieldOptions.FeatureSupport.prototype.getEditionDeprecated=function(){return e.Message.getFieldWithDefault(this,2,0)},proto.google.protobuf.FieldOptions.FeatureSupport.prototype.setEditionDeprecated=function(t){return e.Message.setField(this,2,t)},proto.google.protobuf.FieldOptions.FeatureSupport.prototype.clearEditionDeprecated=function(){return e.Message.setField(this,2,void 0)},proto.google.protobuf.FieldOptions.FeatureSupport.prototype.hasEditionDeprecated=function(){return e.Message.getField(this,2)!=null},proto.google.protobuf.FieldOptions.FeatureSupport.prototype.getDeprecationWarning=function(){return e.Message.getFieldWithDefault(this,3,"")},proto.google.protobuf.FieldOptions.FeatureSupport.prototype.setDeprecationWarning=function(t){return e.Message.setField(this,3,t)},proto.google.protobuf.FieldOptions.FeatureSupport.prototype.clearDeprecationWarning=function(){return e.Message.setField(this,3,void 0)},proto.google.protobuf.FieldOptions.FeatureSupport.prototype.hasDeprecationWarning=function(){return e.Message.getField(this,3)!=null},proto.google.protobuf.FieldOptions.FeatureSupport.prototype.getEditionRemoved=function(){return e.Message.getFieldWithDefault(this,4,0)},proto.google.protobuf.FieldOptions.FeatureSupport.prototype.setEditionRemoved=function(t){return e.Message.setField(this,4,t)},proto.google.protobuf.FieldOptions.FeatureSupport.prototype.clearEditionRemoved=function(){return e.Message.setField(this,4,void 0)},proto.google.protobuf.FieldOptions.FeatureSupport.prototype.hasEditionRemoved=function(){return e.Message.getField(this,4)!=null},proto.google.protobuf.FieldOptions.prototype.getCtype=function(){return e.Message.getFieldWithDefault(this,1,0)},proto.google.protobuf.FieldOptions.prototype.setCtype=function(t){return e.Message.setField(this,1,t)},proto.google.protobuf.FieldOptions.prototype.clearCtype=function(){return e.Message.setField(this,1,void 0)},proto.google.protobuf.FieldOptions.prototype.hasCtype=function(){return e.Message.getField(this,1)!=null},proto.google.protobuf.FieldOptions.prototype.getPacked=function(){return e.Message.getBooleanFieldWithDefault(this,2,!1)},proto.google.protobuf.FieldOptions.prototype.setPacked=function(t){return e.Message.setField(this,2,t)},proto.google.protobuf.FieldOptions.prototype.clearPacked=function(){return e.Message.setField(this,2,void 0)},proto.google.protobuf.FieldOptions.prototype.hasPacked=function(){return e.Message.getField(this,2)!=null},proto.google.protobuf.FieldOptions.prototype.getJstype=function(){return e.Message.getFieldWithDefault(this,6,0)},proto.google.protobuf.FieldOptions.prototype.setJstype=function(t){return e.Message.setField(this,6,t)},proto.google.protobuf.FieldOptions.prototype.clearJstype=function(){return e.Message.setField(this,6,void 0)},proto.google.protobuf.FieldOptions.prototype.hasJstype=function(){return e.Message.getField(this,6)!=null},proto.google.protobuf.FieldOptions.prototype.getLazy=function(){return e.Message.getBooleanFieldWithDefault(this,5,!1)},proto.google.protobuf.FieldOptions.prototype.setLazy=function(t){return e.Message.setField(this,5,t)},proto.google.protobuf.FieldOptions.prototype.clearLazy=function(){return e.Message.setField(this,5,void 0)},proto.google.protobuf.FieldOptions.prototype.hasLazy=function(){return e.Message.getField(this,5)!=null},proto.google.protobuf.FieldOptions.prototype.getUnverifiedLazy=function(){return e.Message.getBooleanFieldWithDefault(this,15,!1)},proto.google.protobuf.FieldOptions.prototype.setUnverifiedLazy=function(t){return e.Message.setField(this,15,t)},proto.google.protobuf.FieldOptions.prototype.clearUnverifiedLazy=function(){return e.Message.setField(this,15,void 0)},proto.google.protobuf.FieldOptions.prototype.hasUnverifiedLazy=function(){return e.Message.getField(this,15)!=null},proto.google.protobuf.FieldOptions.prototype.getDeprecated=function(){return e.Message.getBooleanFieldWithDefault(this,3,!1)},proto.google.protobuf.FieldOptions.prototype.setDeprecated=function(t){return e.Message.setField(this,3,t)},proto.google.protobuf.FieldOptions.prototype.clearDeprecated=function(){return e.Message.setField(this,3,void 0)},proto.google.protobuf.FieldOptions.prototype.hasDeprecated=function(){return e.Message.getField(this,3)!=null},proto.google.protobuf.FieldOptions.prototype.getWeak=function(){return e.Message.getBooleanFieldWithDefault(this,10,!1)},proto.google.protobuf.FieldOptions.prototype.setWeak=function(t){return e.Message.setField(this,10,t)},proto.google.protobuf.FieldOptions.prototype.clearWeak=function(){return e.Message.setField(this,10,void 0)},proto.google.protobuf.FieldOptions.prototype.hasWeak=function(){return e.Message.getField(this,10)!=null},proto.google.protobuf.FieldOptions.prototype.getDebugRedact=function(){return e.Message.getBooleanFieldWithDefault(this,16,!1)},proto.google.protobuf.FieldOptions.prototype.setDebugRedact=function(t){return e.Message.setField(this,16,t)},proto.google.protobuf.FieldOptions.prototype.clearDebugRedact=function(){return e.Message.setField(this,16,void 0)},proto.google.protobuf.FieldOptions.prototype.hasDebugRedact=function(){return e.Message.getField(this,16)!=null},proto.google.protobuf.FieldOptions.prototype.getRetention=function(){return e.Message.getFieldWithDefault(this,17,0)},proto.google.protobuf.FieldOptions.prototype.setRetention=function(t){return e.Message.setField(this,17,t)},proto.google.protobuf.FieldOptions.prototype.clearRetention=function(){return e.Message.setField(this,17,void 0)},proto.google.protobuf.FieldOptions.prototype.hasRetention=function(){return e.Message.getField(this,17)!=null},proto.google.protobuf.FieldOptions.prototype.getTargetsList=function(){return e.Message.getRepeatedField(this,19)},proto.google.protobuf.FieldOptions.prototype.setTargetsList=function(t){return e.Message.setField(this,19,t||[])},proto.google.protobuf.FieldOptions.prototype.addTargets=function(t,o){return e.Message.addToRepeatedField(this,19,t,o)},proto.google.protobuf.FieldOptions.prototype.clearTargetsList=function(){return this.setTargetsList([])},proto.google.protobuf.FieldOptions.prototype.getEditionDefaultsList=function(){return e.Message.getRepeatedWrapperField(this,proto.google.protobuf.FieldOptions.EditionDefault,20)},proto.google.protobuf.FieldOptions.prototype.setEditionDefaultsList=function(t){return e.Message.setRepeatedWrapperField(this,20,t)},proto.google.protobuf.FieldOptions.prototype.addEditionDefaults=function(t,o){return e.Message.addToRepeatedWrapperField(this,20,t,proto.google.protobuf.FieldOptions.EditionDefault,o)},proto.google.protobuf.FieldOptions.prototype.clearEditionDefaultsList=function(){return this.setEditionDefaultsList([])},proto.google.protobuf.FieldOptions.prototype.getFeatures=function(){return e.Message.getWrapperField(this,proto.google.protobuf.FeatureSet,21)},proto.google.protobuf.FieldOptions.prototype.setFeatures=function(t){return e.Message.setWrapperField(this,21,t)},proto.google.protobuf.FieldOptions.prototype.clearFeatures=function(){return this.setFeatures(void 0)},proto.google.protobuf.FieldOptions.prototype.hasFeatures=function(){return e.Message.getField(this,21)!=null},proto.google.protobuf.FieldOptions.prototype.getFeatureSupport=function(){return e.Message.getWrapperField(this,proto.google.protobuf.FieldOptions.FeatureSupport,22)},proto.google.protobuf.FieldOptions.prototype.setFeatureSupport=function(t){return e.Message.setWrapperField(this,22,t)},proto.google.protobuf.FieldOptions.prototype.clearFeatureSupport=function(){return this.setFeatureSupport(void 0)},proto.google.protobuf.FieldOptions.prototype.hasFeatureSupport=function(){return e.Message.getField(this,22)!=null},proto.google.protobuf.FieldOptions.prototype.getUninterpretedOptionList=function(){return e.Message.getRepeatedWrapperField(this,proto.google.protobuf.UninterpretedOption,999)},proto.google.protobuf.FieldOptions.prototype.setUninterpretedOptionList=function(t){return e.Message.setRepeatedWrapperField(this,999,t)},proto.google.protobuf.FieldOptions.prototype.addUninterpretedOption=function(t,o){return e.Message.addToRepeatedWrapperField(this,999,t,proto.google.protobuf.UninterpretedOption,o)},proto.google.protobuf.FieldOptions.prototype.clearUninterpretedOptionList=function(){return this.setUninterpretedOptionList([])},proto.google.protobuf.OneofOptions.repeatedFields_=[999],e.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.OneofOptions.prototype.toObject=function(t){return proto.google.protobuf.OneofOptions.toObject(t,this)},proto.google.protobuf.OneofOptions.toObject=function(t,o){var a,s={features:(a=o.getFeatures())&&proto.google.protobuf.FeatureSet.toObject(t,a),uninterpretedOptionList:e.Message.toObjectList(o.getUninterpretedOptionList(),proto.google.protobuf.UninterpretedOption.toObject,t)};return e.Message.toObjectExtension(o,s,proto.google.protobuf.OneofOptions.extensions,proto.google.protobuf.OneofOptions.prototype.getExtension,t),t&&(s.$jspbMessageInstance=o),s}),proto.google.protobuf.OneofOptions.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.google.protobuf.OneofOptions;return proto.google.protobuf.OneofOptions.deserializeBinaryFromReader(a,o)},proto.google.protobuf.OneofOptions.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 1:var s=new proto.google.protobuf.FeatureSet;o.readMessage(s,proto.google.protobuf.FeatureSet.deserializeBinaryFromReader),t.setFeatures(s);break;case 999:var s=new proto.google.protobuf.UninterpretedOption;o.readMessage(s,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader),t.addUninterpretedOption(s);break;default:e.Message.readBinaryExtension(t,o,proto.google.protobuf.OneofOptions.extensionsBinary,proto.google.protobuf.OneofOptions.prototype.getExtension,proto.google.protobuf.OneofOptions.prototype.setExtension);break}}return t},proto.google.protobuf.OneofOptions.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.google.protobuf.OneofOptions.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.google.protobuf.OneofOptions.serializeBinaryToWriter=function(t,o){var a=void 0;a=t.getFeatures(),a!=null&&o.writeMessage(1,a,proto.google.protobuf.FeatureSet.serializeBinaryToWriter),a=t.getUninterpretedOptionList(),a.length>0&&o.writeRepeatedMessage(999,a,proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter),e.Message.serializeBinaryExtensions(t,o,proto.google.protobuf.OneofOptions.extensionsBinary,proto.google.protobuf.OneofOptions.prototype.getExtension)},proto.google.protobuf.OneofOptions.prototype.getFeatures=function(){return e.Message.getWrapperField(this,proto.google.protobuf.FeatureSet,1)},proto.google.protobuf.OneofOptions.prototype.setFeatures=function(t){return e.Message.setWrapperField(this,1,t)},proto.google.protobuf.OneofOptions.prototype.clearFeatures=function(){return this.setFeatures(void 0)},proto.google.protobuf.OneofOptions.prototype.hasFeatures=function(){return e.Message.getField(this,1)!=null},proto.google.protobuf.OneofOptions.prototype.getUninterpretedOptionList=function(){return e.Message.getRepeatedWrapperField(this,proto.google.protobuf.UninterpretedOption,999)},proto.google.protobuf.OneofOptions.prototype.setUninterpretedOptionList=function(t){return e.Message.setRepeatedWrapperField(this,999,t)},proto.google.protobuf.OneofOptions.prototype.addUninterpretedOption=function(t,o){return e.Message.addToRepeatedWrapperField(this,999,t,proto.google.protobuf.UninterpretedOption,o)},proto.google.protobuf.OneofOptions.prototype.clearUninterpretedOptionList=function(){return this.setUninterpretedOptionList([])},proto.google.protobuf.EnumOptions.repeatedFields_=[999],e.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.EnumOptions.prototype.toObject=function(t){return proto.google.protobuf.EnumOptions.toObject(t,this)},proto.google.protobuf.EnumOptions.toObject=function(t,o){var a,s={allowAlias:(a=e.Message.getBooleanField(o,2))==null?void 0:a,deprecated:e.Message.getBooleanFieldWithDefault(o,3,!1),deprecatedLegacyJsonFieldConflicts:(a=e.Message.getBooleanField(o,6))==null?void 0:a,features:(a=o.getFeatures())&&proto.google.protobuf.FeatureSet.toObject(t,a),uninterpretedOptionList:e.Message.toObjectList(o.getUninterpretedOptionList(),proto.google.protobuf.UninterpretedOption.toObject,t)};return e.Message.toObjectExtension(o,s,proto.google.protobuf.EnumOptions.extensions,proto.google.protobuf.EnumOptions.prototype.getExtension,t),t&&(s.$jspbMessageInstance=o),s}),proto.google.protobuf.EnumOptions.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.google.protobuf.EnumOptions;return proto.google.protobuf.EnumOptions.deserializeBinaryFromReader(a,o)},proto.google.protobuf.EnumOptions.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 2:var s=o.readBool();t.setAllowAlias(s);break;case 3:var s=o.readBool();t.setDeprecated(s);break;case 6:var s=o.readBool();t.setDeprecatedLegacyJsonFieldConflicts(s);break;case 7:var s=new proto.google.protobuf.FeatureSet;o.readMessage(s,proto.google.protobuf.FeatureSet.deserializeBinaryFromReader),t.setFeatures(s);break;case 999:var s=new proto.google.protobuf.UninterpretedOption;o.readMessage(s,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader),t.addUninterpretedOption(s);break;default:e.Message.readBinaryExtension(t,o,proto.google.protobuf.EnumOptions.extensionsBinary,proto.google.protobuf.EnumOptions.prototype.getExtension,proto.google.protobuf.EnumOptions.prototype.setExtension);break}}return t},proto.google.protobuf.EnumOptions.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.google.protobuf.EnumOptions.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.google.protobuf.EnumOptions.serializeBinaryToWriter=function(t,o){var a=void 0;a=e.Message.getField(t,2),a!=null&&o.writeBool(2,a),a=e.Message.getField(t,3),a!=null&&o.writeBool(3,a),a=e.Message.getField(t,6),a!=null&&o.writeBool(6,a),a=t.getFeatures(),a!=null&&o.writeMessage(7,a,proto.google.protobuf.FeatureSet.serializeBinaryToWriter),a=t.getUninterpretedOptionList(),a.length>0&&o.writeRepeatedMessage(999,a,proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter),e.Message.serializeBinaryExtensions(t,o,proto.google.protobuf.EnumOptions.extensionsBinary,proto.google.protobuf.EnumOptions.prototype.getExtension)},proto.google.protobuf.EnumOptions.prototype.getAllowAlias=function(){return e.Message.getBooleanFieldWithDefault(this,2,!1)},proto.google.protobuf.EnumOptions.prototype.setAllowAlias=function(t){return e.Message.setField(this,2,t)},proto.google.protobuf.EnumOptions.prototype.clearAllowAlias=function(){return e.Message.setField(this,2,void 0)},proto.google.protobuf.EnumOptions.prototype.hasAllowAlias=function(){return e.Message.getField(this,2)!=null},proto.google.protobuf.EnumOptions.prototype.getDeprecated=function(){return e.Message.getBooleanFieldWithDefault(this,3,!1)},proto.google.protobuf.EnumOptions.prototype.setDeprecated=function(t){return e.Message.setField(this,3,t)},proto.google.protobuf.EnumOptions.prototype.clearDeprecated=function(){return e.Message.setField(this,3,void 0)},proto.google.protobuf.EnumOptions.prototype.hasDeprecated=function(){return e.Message.getField(this,3)!=null},proto.google.protobuf.EnumOptions.prototype.getDeprecatedLegacyJsonFieldConflicts=function(){return e.Message.getBooleanFieldWithDefault(this,6,!1)},proto.google.protobuf.EnumOptions.prototype.setDeprecatedLegacyJsonFieldConflicts=function(t){return e.Message.setField(this,6,t)},proto.google.protobuf.EnumOptions.prototype.clearDeprecatedLegacyJsonFieldConflicts=function(){return e.Message.setField(this,6,void 0)},proto.google.protobuf.EnumOptions.prototype.hasDeprecatedLegacyJsonFieldConflicts=function(){return e.Message.getField(this,6)!=null},proto.google.protobuf.EnumOptions.prototype.getFeatures=function(){return e.Message.getWrapperField(this,proto.google.protobuf.FeatureSet,7)},proto.google.protobuf.EnumOptions.prototype.setFeatures=function(t){return e.Message.setWrapperField(this,7,t)},proto.google.protobuf.EnumOptions.prototype.clearFeatures=function(){return this.setFeatures(void 0)},proto.google.protobuf.EnumOptions.prototype.hasFeatures=function(){return e.Message.getField(this,7)!=null},proto.google.protobuf.EnumOptions.prototype.getUninterpretedOptionList=function(){return e.Message.getRepeatedWrapperField(this,proto.google.protobuf.UninterpretedOption,999)},proto.google.protobuf.EnumOptions.prototype.setUninterpretedOptionList=function(t){return e.Message.setRepeatedWrapperField(this,999,t)},proto.google.protobuf.EnumOptions.prototype.addUninterpretedOption=function(t,o){return e.Message.addToRepeatedWrapperField(this,999,t,proto.google.protobuf.UninterpretedOption,o)},proto.google.protobuf.EnumOptions.prototype.clearUninterpretedOptionList=function(){return this.setUninterpretedOptionList([])},proto.google.protobuf.EnumValueOptions.repeatedFields_=[999],e.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.EnumValueOptions.prototype.toObject=function(t){return proto.google.protobuf.EnumValueOptions.toObject(t,this)},proto.google.protobuf.EnumValueOptions.toObject=function(t,o){var a,s={deprecated:e.Message.getBooleanFieldWithDefault(o,1,!1),features:(a=o.getFeatures())&&proto.google.protobuf.FeatureSet.toObject(t,a),debugRedact:e.Message.getBooleanFieldWithDefault(o,3,!1),featureSupport:(a=o.getFeatureSupport())&&proto.google.protobuf.FieldOptions.FeatureSupport.toObject(t,a),uninterpretedOptionList:e.Message.toObjectList(o.getUninterpretedOptionList(),proto.google.protobuf.UninterpretedOption.toObject,t)};return e.Message.toObjectExtension(o,s,proto.google.protobuf.EnumValueOptions.extensions,proto.google.protobuf.EnumValueOptions.prototype.getExtension,t),t&&(s.$jspbMessageInstance=o),s}),proto.google.protobuf.EnumValueOptions.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.google.protobuf.EnumValueOptions;return proto.google.protobuf.EnumValueOptions.deserializeBinaryFromReader(a,o)},proto.google.protobuf.EnumValueOptions.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 1:var s=o.readBool();t.setDeprecated(s);break;case 2:var s=new proto.google.protobuf.FeatureSet;o.readMessage(s,proto.google.protobuf.FeatureSet.deserializeBinaryFromReader),t.setFeatures(s);break;case 3:var s=o.readBool();t.setDebugRedact(s);break;case 4:var s=new proto.google.protobuf.FieldOptions.FeatureSupport;o.readMessage(s,proto.google.protobuf.FieldOptions.FeatureSupport.deserializeBinaryFromReader),t.setFeatureSupport(s);break;case 999:var s=new proto.google.protobuf.UninterpretedOption;o.readMessage(s,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader),t.addUninterpretedOption(s);break;default:e.Message.readBinaryExtension(t,o,proto.google.protobuf.EnumValueOptions.extensionsBinary,proto.google.protobuf.EnumValueOptions.prototype.getExtension,proto.google.protobuf.EnumValueOptions.prototype.setExtension);break}}return t},proto.google.protobuf.EnumValueOptions.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.google.protobuf.EnumValueOptions.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.google.protobuf.EnumValueOptions.serializeBinaryToWriter=function(t,o){var a=void 0;a=e.Message.getField(t,1),a!=null&&o.writeBool(1,a),a=t.getFeatures(),a!=null&&o.writeMessage(2,a,proto.google.protobuf.FeatureSet.serializeBinaryToWriter),a=e.Message.getField(t,3),a!=null&&o.writeBool(3,a),a=t.getFeatureSupport(),a!=null&&o.writeMessage(4,a,proto.google.protobuf.FieldOptions.FeatureSupport.serializeBinaryToWriter),a=t.getUninterpretedOptionList(),a.length>0&&o.writeRepeatedMessage(999,a,proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter),e.Message.serializeBinaryExtensions(t,o,proto.google.protobuf.EnumValueOptions.extensionsBinary,proto.google.protobuf.EnumValueOptions.prototype.getExtension)},proto.google.protobuf.EnumValueOptions.prototype.getDeprecated=function(){return e.Message.getBooleanFieldWithDefault(this,1,!1)},proto.google.protobuf.EnumValueOptions.prototype.setDeprecated=function(t){return e.Message.setField(this,1,t)},proto.google.protobuf.EnumValueOptions.prototype.clearDeprecated=function(){return e.Message.setField(this,1,void 0)},proto.google.protobuf.EnumValueOptions.prototype.hasDeprecated=function(){return e.Message.getField(this,1)!=null},proto.google.protobuf.EnumValueOptions.prototype.getFeatures=function(){return e.Message.getWrapperField(this,proto.google.protobuf.FeatureSet,2)},proto.google.protobuf.EnumValueOptions.prototype.setFeatures=function(t){return e.Message.setWrapperField(this,2,t)},proto.google.protobuf.EnumValueOptions.prototype.clearFeatures=function(){return this.setFeatures(void 0)},proto.google.protobuf.EnumValueOptions.prototype.hasFeatures=function(){return e.Message.getField(this,2)!=null},proto.google.protobuf.EnumValueOptions.prototype.getDebugRedact=function(){return e.Message.getBooleanFieldWithDefault(this,3,!1)},proto.google.protobuf.EnumValueOptions.prototype.setDebugRedact=function(t){return e.Message.setField(this,3,t)},proto.google.protobuf.EnumValueOptions.prototype.clearDebugRedact=function(){return e.Message.setField(this,3,void 0)},proto.google.protobuf.EnumValueOptions.prototype.hasDebugRedact=function(){return e.Message.getField(this,3)!=null},proto.google.protobuf.EnumValueOptions.prototype.getFeatureSupport=function(){return e.Message.getWrapperField(this,proto.google.protobuf.FieldOptions.FeatureSupport,4)},proto.google.protobuf.EnumValueOptions.prototype.setFeatureSupport=function(t){return e.Message.setWrapperField(this,4,t)},proto.google.protobuf.EnumValueOptions.prototype.clearFeatureSupport=function(){return this.setFeatureSupport(void 0)},proto.google.protobuf.EnumValueOptions.prototype.hasFeatureSupport=function(){return e.Message.getField(this,4)!=null},proto.google.protobuf.EnumValueOptions.prototype.getUninterpretedOptionList=function(){return e.Message.getRepeatedWrapperField(this,proto.google.protobuf.UninterpretedOption,999)},proto.google.protobuf.EnumValueOptions.prototype.setUninterpretedOptionList=function(t){return e.Message.setRepeatedWrapperField(this,999,t)},proto.google.protobuf.EnumValueOptions.prototype.addUninterpretedOption=function(t,o){return e.Message.addToRepeatedWrapperField(this,999,t,proto.google.protobuf.UninterpretedOption,o)},proto.google.protobuf.EnumValueOptions.prototype.clearUninterpretedOptionList=function(){return this.setUninterpretedOptionList([])},proto.google.protobuf.ServiceOptions.repeatedFields_=[999],e.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.ServiceOptions.prototype.toObject=function(t){return proto.google.protobuf.ServiceOptions.toObject(t,this)},proto.google.protobuf.ServiceOptions.toObject=function(t,o){var a,s={features:(a=o.getFeatures())&&proto.google.protobuf.FeatureSet.toObject(t,a),deprecated:e.Message.getBooleanFieldWithDefault(o,33,!1),uninterpretedOptionList:e.Message.toObjectList(o.getUninterpretedOptionList(),proto.google.protobuf.UninterpretedOption.toObject,t)};return e.Message.toObjectExtension(o,s,proto.google.protobuf.ServiceOptions.extensions,proto.google.protobuf.ServiceOptions.prototype.getExtension,t),t&&(s.$jspbMessageInstance=o),s}),proto.google.protobuf.ServiceOptions.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.google.protobuf.ServiceOptions;return proto.google.protobuf.ServiceOptions.deserializeBinaryFromReader(a,o)},proto.google.protobuf.ServiceOptions.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 34:var s=new proto.google.protobuf.FeatureSet;o.readMessage(s,proto.google.protobuf.FeatureSet.deserializeBinaryFromReader),t.setFeatures(s);break;case 33:var s=o.readBool();t.setDeprecated(s);break;case 999:var s=new proto.google.protobuf.UninterpretedOption;o.readMessage(s,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader),t.addUninterpretedOption(s);break;default:e.Message.readBinaryExtension(t,o,proto.google.protobuf.ServiceOptions.extensionsBinary,proto.google.protobuf.ServiceOptions.prototype.getExtension,proto.google.protobuf.ServiceOptions.prototype.setExtension);break}}return t},proto.google.protobuf.ServiceOptions.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.google.protobuf.ServiceOptions.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.google.protobuf.ServiceOptions.serializeBinaryToWriter=function(t,o){var a=void 0;a=t.getFeatures(),a!=null&&o.writeMessage(34,a,proto.google.protobuf.FeatureSet.serializeBinaryToWriter),a=e.Message.getField(t,33),a!=null&&o.writeBool(33,a),a=t.getUninterpretedOptionList(),a.length>0&&o.writeRepeatedMessage(999,a,proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter),e.Message.serializeBinaryExtensions(t,o,proto.google.protobuf.ServiceOptions.extensionsBinary,proto.google.protobuf.ServiceOptions.prototype.getExtension)},proto.google.protobuf.ServiceOptions.prototype.getFeatures=function(){return e.Message.getWrapperField(this,proto.google.protobuf.FeatureSet,34)},proto.google.protobuf.ServiceOptions.prototype.setFeatures=function(t){return e.Message.setWrapperField(this,34,t)},proto.google.protobuf.ServiceOptions.prototype.clearFeatures=function(){return this.setFeatures(void 0)},proto.google.protobuf.ServiceOptions.prototype.hasFeatures=function(){return e.Message.getField(this,34)!=null},proto.google.protobuf.ServiceOptions.prototype.getDeprecated=function(){return e.Message.getBooleanFieldWithDefault(this,33,!1)},proto.google.protobuf.ServiceOptions.prototype.setDeprecated=function(t){return e.Message.setField(this,33,t)},proto.google.protobuf.ServiceOptions.prototype.clearDeprecated=function(){return e.Message.setField(this,33,void 0)},proto.google.protobuf.ServiceOptions.prototype.hasDeprecated=function(){return e.Message.getField(this,33)!=null},proto.google.protobuf.ServiceOptions.prototype.getUninterpretedOptionList=function(){return e.Message.getRepeatedWrapperField(this,proto.google.protobuf.UninterpretedOption,999)},proto.google.protobuf.ServiceOptions.prototype.setUninterpretedOptionList=function(t){return e.Message.setRepeatedWrapperField(this,999,t)},proto.google.protobuf.ServiceOptions.prototype.addUninterpretedOption=function(t,o){return e.Message.addToRepeatedWrapperField(this,999,t,proto.google.protobuf.UninterpretedOption,o)},proto.google.protobuf.ServiceOptions.prototype.clearUninterpretedOptionList=function(){return this.setUninterpretedOptionList([])},proto.google.protobuf.MethodOptions.repeatedFields_=[999],e.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.MethodOptions.prototype.toObject=function(t){return proto.google.protobuf.MethodOptions.toObject(t,this)},proto.google.protobuf.MethodOptions.toObject=function(t,o){var a,s={deprecated:e.Message.getBooleanFieldWithDefault(o,33,!1),idempotencyLevel:e.Message.getFieldWithDefault(o,34,0),features:(a=o.getFeatures())&&proto.google.protobuf.FeatureSet.toObject(t,a),uninterpretedOptionList:e.Message.toObjectList(o.getUninterpretedOptionList(),proto.google.protobuf.UninterpretedOption.toObject,t)};return e.Message.toObjectExtension(o,s,proto.google.protobuf.MethodOptions.extensions,proto.google.protobuf.MethodOptions.prototype.getExtension,t),t&&(s.$jspbMessageInstance=o),s}),proto.google.protobuf.MethodOptions.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.google.protobuf.MethodOptions;return proto.google.protobuf.MethodOptions.deserializeBinaryFromReader(a,o)},proto.google.protobuf.MethodOptions.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 33:var s=o.readBool();t.setDeprecated(s);break;case 34:var s=o.readEnum();t.setIdempotencyLevel(s);break;case 35:var s=new proto.google.protobuf.FeatureSet;o.readMessage(s,proto.google.protobuf.FeatureSet.deserializeBinaryFromReader),t.setFeatures(s);break;case 999:var s=new proto.google.protobuf.UninterpretedOption;o.readMessage(s,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader),t.addUninterpretedOption(s);break;default:e.Message.readBinaryExtension(t,o,proto.google.protobuf.MethodOptions.extensionsBinary,proto.google.protobuf.MethodOptions.prototype.getExtension,proto.google.protobuf.MethodOptions.prototype.setExtension);break}}return t},proto.google.protobuf.MethodOptions.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.google.protobuf.MethodOptions.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.google.protobuf.MethodOptions.serializeBinaryToWriter=function(t,o){var a=void 0;a=e.Message.getField(t,33),a!=null&&o.writeBool(33,a),a=e.Message.getField(t,34),a!=null&&o.writeEnum(34,a),a=t.getFeatures(),a!=null&&o.writeMessage(35,a,proto.google.protobuf.FeatureSet.serializeBinaryToWriter),a=t.getUninterpretedOptionList(),a.length>0&&o.writeRepeatedMessage(999,a,proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter),e.Message.serializeBinaryExtensions(t,o,proto.google.protobuf.MethodOptions.extensionsBinary,proto.google.protobuf.MethodOptions.prototype.getExtension)},proto.google.protobuf.MethodOptions.IdempotencyLevel={IDEMPOTENCY_UNKNOWN:0,NO_SIDE_EFFECTS:1,IDEMPOTENT:2},proto.google.protobuf.MethodOptions.prototype.getDeprecated=function(){return e.Message.getBooleanFieldWithDefault(this,33,!1)},proto.google.protobuf.MethodOptions.prototype.setDeprecated=function(t){return e.Message.setField(this,33,t)},proto.google.protobuf.MethodOptions.prototype.clearDeprecated=function(){return e.Message.setField(this,33,void 0)},proto.google.protobuf.MethodOptions.prototype.hasDeprecated=function(){return e.Message.getField(this,33)!=null},proto.google.protobuf.MethodOptions.prototype.getIdempotencyLevel=function(){return e.Message.getFieldWithDefault(this,34,0)},proto.google.protobuf.MethodOptions.prototype.setIdempotencyLevel=function(t){return e.Message.setField(this,34,t)},proto.google.protobuf.MethodOptions.prototype.clearIdempotencyLevel=function(){return e.Message.setField(this,34,void 0)},proto.google.protobuf.MethodOptions.prototype.hasIdempotencyLevel=function(){return e.Message.getField(this,34)!=null},proto.google.protobuf.MethodOptions.prototype.getFeatures=function(){return e.Message.getWrapperField(this,proto.google.protobuf.FeatureSet,35)},proto.google.protobuf.MethodOptions.prototype.setFeatures=function(t){return e.Message.setWrapperField(this,35,t)},proto.google.protobuf.MethodOptions.prototype.clearFeatures=function(){return this.setFeatures(void 0)},proto.google.protobuf.MethodOptions.prototype.hasFeatures=function(){return e.Message.getField(this,35)!=null},proto.google.protobuf.MethodOptions.prototype.getUninterpretedOptionList=function(){return e.Message.getRepeatedWrapperField(this,proto.google.protobuf.UninterpretedOption,999)},proto.google.protobuf.MethodOptions.prototype.setUninterpretedOptionList=function(t){return e.Message.setRepeatedWrapperField(this,999,t)},proto.google.protobuf.MethodOptions.prototype.addUninterpretedOption=function(t,o){return e.Message.addToRepeatedWrapperField(this,999,t,proto.google.protobuf.UninterpretedOption,o)},proto.google.protobuf.MethodOptions.prototype.clearUninterpretedOptionList=function(){return this.setUninterpretedOptionList([])},proto.google.protobuf.UninterpretedOption.repeatedFields_=[2],e.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.UninterpretedOption.prototype.toObject=function(t){return proto.google.protobuf.UninterpretedOption.toObject(t,this)},proto.google.protobuf.UninterpretedOption.toObject=function(t,o){var a,s={nameList:e.Message.toObjectList(o.getNameList(),proto.google.protobuf.UninterpretedOption.NamePart.toObject,t),identifierValue:(a=e.Message.getField(o,3))==null?void 0:a,positiveIntValue:(a=e.Message.getField(o,4))==null?void 0:a,negativeIntValue:(a=e.Message.getField(o,5))==null?void 0:a,doubleValue:(a=e.Message.getOptionalFloatingPointField(o,6))==null?void 0:a,stringValue:o.getStringValue_asB64(),aggregateValue:(a=e.Message.getField(o,8))==null?void 0:a};return t&&(s.$jspbMessageInstance=o),s}),proto.google.protobuf.UninterpretedOption.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.google.protobuf.UninterpretedOption;return proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader(a,o)},proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 2:var s=new proto.google.protobuf.UninterpretedOption.NamePart;o.readMessage(s,proto.google.protobuf.UninterpretedOption.NamePart.deserializeBinaryFromReader),t.addName(s);break;case 3:var s=o.readString();t.setIdentifierValue(s);break;case 4:var s=o.readUint64();t.setPositiveIntValue(s);break;case 5:var s=o.readInt64();t.setNegativeIntValue(s);break;case 6:var s=o.readDouble();t.setDoubleValue(s);break;case 7:var s=o.readBytes();t.setStringValue(s);break;case 8:var s=o.readString();t.setAggregateValue(s);break;default:o.skipField();break}}return t},proto.google.protobuf.UninterpretedOption.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter=function(t,o){var a=void 0;a=t.getNameList(),a.length>0&&o.writeRepeatedMessage(2,a,proto.google.protobuf.UninterpretedOption.NamePart.serializeBinaryToWriter),a=e.Message.getField(t,3),a!=null&&o.writeString(3,a),a=e.Message.getField(t,4),a!=null&&o.writeUint64(4,a),a=e.Message.getField(t,5),a!=null&&o.writeInt64(5,a),a=e.Message.getField(t,6),a!=null&&o.writeDouble(6,a),a=e.Message.getField(t,7),a!=null&&o.writeBytes(7,a),a=e.Message.getField(t,8),a!=null&&o.writeString(8,a)},e.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.UninterpretedOption.NamePart.prototype.toObject=function(t){return proto.google.protobuf.UninterpretedOption.NamePart.toObject(t,this)},proto.google.protobuf.UninterpretedOption.NamePart.toObject=function(t,o){var a,s={namePart:(a=e.Message.getField(o,1))==null?void 0:a,isExtension:(a=e.Message.getBooleanField(o,2))==null?void 0:a};return t&&(s.$jspbMessageInstance=o),s}),proto.google.protobuf.UninterpretedOption.NamePart.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.google.protobuf.UninterpretedOption.NamePart;return proto.google.protobuf.UninterpretedOption.NamePart.deserializeBinaryFromReader(a,o)},proto.google.protobuf.UninterpretedOption.NamePart.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 1:var s=o.readString();t.setNamePart(s);break;case 2:var s=o.readBool();t.setIsExtension(s);break;default:o.skipField();break}}return t},proto.google.protobuf.UninterpretedOption.NamePart.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.google.protobuf.UninterpretedOption.NamePart.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.google.protobuf.UninterpretedOption.NamePart.serializeBinaryToWriter=function(t,o){var a=void 0;a=e.Message.getField(t,1),a!=null&&o.writeString(1,a),a=e.Message.getField(t,2),a!=null&&o.writeBool(2,a)},proto.google.protobuf.UninterpretedOption.NamePart.prototype.getNamePart=function(){return e.Message.getFieldWithDefault(this,1,"")},proto.google.protobuf.UninterpretedOption.NamePart.prototype.setNamePart=function(t){return e.Message.setField(this,1,t)},proto.google.protobuf.UninterpretedOption.NamePart.prototype.clearNamePart=function(){return e.Message.setField(this,1,void 0)},proto.google.protobuf.UninterpretedOption.NamePart.prototype.hasNamePart=function(){return e.Message.getField(this,1)!=null},proto.google.protobuf.UninterpretedOption.NamePart.prototype.getIsExtension=function(){return e.Message.getBooleanFieldWithDefault(this,2,!1)},proto.google.protobuf.UninterpretedOption.NamePart.prototype.setIsExtension=function(t){return e.Message.setField(this,2,t)},proto.google.protobuf.UninterpretedOption.NamePart.prototype.clearIsExtension=function(){return e.Message.setField(this,2,void 0)},proto.google.protobuf.UninterpretedOption.NamePart.prototype.hasIsExtension=function(){return e.Message.getField(this,2)!=null},proto.google.protobuf.UninterpretedOption.prototype.getNameList=function(){return e.Message.getRepeatedWrapperField(this,proto.google.protobuf.UninterpretedOption.NamePart,2)},proto.google.protobuf.UninterpretedOption.prototype.setNameList=function(t){return e.Message.setRepeatedWrapperField(this,2,t)},proto.google.protobuf.UninterpretedOption.prototype.addName=function(t,o){return e.Message.addToRepeatedWrapperField(this,2,t,proto.google.protobuf.UninterpretedOption.NamePart,o)},proto.google.protobuf.UninterpretedOption.prototype.clearNameList=function(){return this.setNameList([])},proto.google.protobuf.UninterpretedOption.prototype.getIdentifierValue=function(){return e.Message.getFieldWithDefault(this,3,"")},proto.google.protobuf.UninterpretedOption.prototype.setIdentifierValue=function(t){return e.Message.setField(this,3,t)},proto.google.protobuf.UninterpretedOption.prototype.clearIdentifierValue=function(){return e.Message.setField(this,3,void 0)},proto.google.protobuf.UninterpretedOption.prototype.hasIdentifierValue=function(){return e.Message.getField(this,3)!=null},proto.google.protobuf.UninterpretedOption.prototype.getPositiveIntValue=function(){return e.Message.getFieldWithDefault(this,4,0)},proto.google.protobuf.UninterpretedOption.prototype.setPositiveIntValue=function(t){return e.Message.setField(this,4,t)},proto.google.protobuf.UninterpretedOption.prototype.clearPositiveIntValue=function(){return e.Message.setField(this,4,void 0)},proto.google.protobuf.UninterpretedOption.prototype.hasPositiveIntValue=function(){return e.Message.getField(this,4)!=null},proto.google.protobuf.UninterpretedOption.prototype.getNegativeIntValue=function(){return e.Message.getFieldWithDefault(this,5,0)},proto.google.protobuf.UninterpretedOption.prototype.setNegativeIntValue=function(t){return e.Message.setField(this,5,t)},proto.google.protobuf.UninterpretedOption.prototype.clearNegativeIntValue=function(){return e.Message.setField(this,5,void 0)},proto.google.protobuf.UninterpretedOption.prototype.hasNegativeIntValue=function(){return e.Message.getField(this,5)!=null},proto.google.protobuf.UninterpretedOption.prototype.getDoubleValue=function(){return e.Message.getFloatingPointFieldWithDefault(this,6,0)},proto.google.protobuf.UninterpretedOption.prototype.setDoubleValue=function(t){return e.Message.setField(this,6,t)},proto.google.protobuf.UninterpretedOption.prototype.clearDoubleValue=function(){return e.Message.setField(this,6,void 0)},proto.google.protobuf.UninterpretedOption.prototype.hasDoubleValue=function(){return e.Message.getField(this,6)!=null},proto.google.protobuf.UninterpretedOption.prototype.getStringValue=function(){return e.Message.getFieldWithDefault(this,7,"")},proto.google.protobuf.UninterpretedOption.prototype.getStringValue_asB64=function(){return e.Message.bytesAsB64(this.getStringValue())},proto.google.protobuf.UninterpretedOption.prototype.getStringValue_asU8=function(){return e.Message.bytesAsU8(this.getStringValue())},proto.google.protobuf.UninterpretedOption.prototype.setStringValue=function(t){return e.Message.setField(this,7,t)},proto.google.protobuf.UninterpretedOption.prototype.clearStringValue=function(){return e.Message.setField(this,7,void 0)},proto.google.protobuf.UninterpretedOption.prototype.hasStringValue=function(){return e.Message.getField(this,7)!=null},proto.google.protobuf.UninterpretedOption.prototype.getAggregateValue=function(){return e.Message.getFieldWithDefault(this,8,"")},proto.google.protobuf.UninterpretedOption.prototype.setAggregateValue=function(t){return e.Message.setField(this,8,t)},proto.google.protobuf.UninterpretedOption.prototype.clearAggregateValue=function(){return e.Message.setField(this,8,void 0)},proto.google.protobuf.UninterpretedOption.prototype.hasAggregateValue=function(){return e.Message.getField(this,8)!=null},e.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.FeatureSet.prototype.toObject=function(t){return proto.google.protobuf.FeatureSet.toObject(t,this)},proto.google.protobuf.FeatureSet.toObject=function(t,o){var a,s={fieldPresence:(a=e.Message.getField(o,1))==null?void 0:a,enumType:(a=e.Message.getField(o,2))==null?void 0:a,repeatedFieldEncoding:(a=e.Message.getField(o,3))==null?void 0:a,utf8Validation:(a=e.Message.getField(o,4))==null?void 0:a,messageEncoding:(a=e.Message.getField(o,5))==null?void 0:a,jsonFormat:(a=e.Message.getField(o,6))==null?void 0:a};return e.Message.toObjectExtension(o,s,proto.google.protobuf.FeatureSet.extensions,proto.google.protobuf.FeatureSet.prototype.getExtension,t),t&&(s.$jspbMessageInstance=o),s}),proto.google.protobuf.FeatureSet.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.google.protobuf.FeatureSet;return proto.google.protobuf.FeatureSet.deserializeBinaryFromReader(a,o)},proto.google.protobuf.FeatureSet.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 1:var s=o.readEnum();t.setFieldPresence(s);break;case 2:var s=o.readEnum();t.setEnumType(s);break;case 3:var s=o.readEnum();t.setRepeatedFieldEncoding(s);break;case 4:var s=o.readEnum();t.setUtf8Validation(s);break;case 5:var s=o.readEnum();t.setMessageEncoding(s);break;case 6:var s=o.readEnum();t.setJsonFormat(s);break;default:e.Message.readBinaryExtension(t,o,proto.google.protobuf.FeatureSet.extensionsBinary,proto.google.protobuf.FeatureSet.prototype.getExtension,proto.google.protobuf.FeatureSet.prototype.setExtension);break}}return t},proto.google.protobuf.FeatureSet.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.google.protobuf.FeatureSet.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.google.protobuf.FeatureSet.serializeBinaryToWriter=function(t,o){var a=void 0;a=e.Message.getField(t,1),a!=null&&o.writeEnum(1,a),a=e.Message.getField(t,2),a!=null&&o.writeEnum(2,a),a=e.Message.getField(t,3),a!=null&&o.writeEnum(3,a),a=e.Message.getField(t,4),a!=null&&o.writeEnum(4,a),a=e.Message.getField(t,5),a!=null&&o.writeEnum(5,a),a=e.Message.getField(t,6),a!=null&&o.writeEnum(6,a),e.Message.serializeBinaryExtensions(t,o,proto.google.protobuf.FeatureSet.extensionsBinary,proto.google.protobuf.FeatureSet.prototype.getExtension)},proto.google.protobuf.FeatureSet.FieldPresence={FIELD_PRESENCE_UNKNOWN:0,EXPLICIT:1,IMPLICIT:2,LEGACY_REQUIRED:3},proto.google.protobuf.FeatureSet.EnumType={ENUM_TYPE_UNKNOWN:0,OPEN:1,CLOSED:2},proto.google.protobuf.FeatureSet.RepeatedFieldEncoding={REPEATED_FIELD_ENCODING_UNKNOWN:0,PACKED:1,EXPANDED:2},proto.google.protobuf.FeatureSet.Utf8Validation={UTF8_VALIDATION_UNKNOWN:0,VERIFY:2,NONE:3},proto.google.protobuf.FeatureSet.MessageEncoding={MESSAGE_ENCODING_UNKNOWN:0,LENGTH_PREFIXED:1,DELIMITED:2},proto.google.protobuf.FeatureSet.JsonFormat={JSON_FORMAT_UNKNOWN:0,ALLOW:1,LEGACY_BEST_EFFORT:2},proto.google.protobuf.FeatureSet.prototype.getFieldPresence=function(){return e.Message.getFieldWithDefault(this,1,0)},proto.google.protobuf.FeatureSet.prototype.setFieldPresence=function(t){return e.Message.setField(this,1,t)},proto.google.protobuf.FeatureSet.prototype.clearFieldPresence=function(){return e.Message.setField(this,1,void 0)},proto.google.protobuf.FeatureSet.prototype.hasFieldPresence=function(){return e.Message.getField(this,1)!=null},proto.google.protobuf.FeatureSet.prototype.getEnumType=function(){return e.Message.getFieldWithDefault(this,2,0)},proto.google.protobuf.FeatureSet.prototype.setEnumType=function(t){return e.Message.setField(this,2,t)},proto.google.protobuf.FeatureSet.prototype.clearEnumType=function(){return e.Message.setField(this,2,void 0)},proto.google.protobuf.FeatureSet.prototype.hasEnumType=function(){return e.Message.getField(this,2)!=null},proto.google.protobuf.FeatureSet.prototype.getRepeatedFieldEncoding=function(){return e.Message.getFieldWithDefault(this,3,0)},proto.google.protobuf.FeatureSet.prototype.setRepeatedFieldEncoding=function(t){return e.Message.setField(this,3,t)},proto.google.protobuf.FeatureSet.prototype.clearRepeatedFieldEncoding=function(){return e.Message.setField(this,3,void 0)},proto.google.protobuf.FeatureSet.prototype.hasRepeatedFieldEncoding=function(){return e.Message.getField(this,3)!=null},proto.google.protobuf.FeatureSet.prototype.getUtf8Validation=function(){return e.Message.getFieldWithDefault(this,4,0)},proto.google.protobuf.FeatureSet.prototype.setUtf8Validation=function(t){return e.Message.setField(this,4,t)},proto.google.protobuf.FeatureSet.prototype.clearUtf8Validation=function(){return e.Message.setField(this,4,void 0)},proto.google.protobuf.FeatureSet.prototype.hasUtf8Validation=function(){return e.Message.getField(this,4)!=null},proto.google.protobuf.FeatureSet.prototype.getMessageEncoding=function(){return e.Message.getFieldWithDefault(this,5,0)},proto.google.protobuf.FeatureSet.prototype.setMessageEncoding=function(t){return e.Message.setField(this,5,t)},proto.google.protobuf.FeatureSet.prototype.clearMessageEncoding=function(){return e.Message.setField(this,5,void 0)},proto.google.protobuf.FeatureSet.prototype.hasMessageEncoding=function(){return e.Message.getField(this,5)!=null},proto.google.protobuf.FeatureSet.prototype.getJsonFormat=function(){return e.Message.getFieldWithDefault(this,6,0)},proto.google.protobuf.FeatureSet.prototype.setJsonFormat=function(t){return e.Message.setField(this,6,t)},proto.google.protobuf.FeatureSet.prototype.clearJsonFormat=function(){return e.Message.setField(this,6,void 0)},proto.google.protobuf.FeatureSet.prototype.hasJsonFormat=function(){return e.Message.getField(this,6)!=null},proto.google.protobuf.FeatureSetDefaults.repeatedFields_=[1],e.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.FeatureSetDefaults.prototype.toObject=function(t){return proto.google.protobuf.FeatureSetDefaults.toObject(t,this)},proto.google.protobuf.FeatureSetDefaults.toObject=function(t,o){var a,s={defaultsList:e.Message.toObjectList(o.getDefaultsList(),proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject,t),minimumEdition:(a=e.Message.getField(o,4))==null?void 0:a,maximumEdition:(a=e.Message.getField(o,5))==null?void 0:a};return t&&(s.$jspbMessageInstance=o),s}),proto.google.protobuf.FeatureSetDefaults.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.google.protobuf.FeatureSetDefaults;return proto.google.protobuf.FeatureSetDefaults.deserializeBinaryFromReader(a,o)},proto.google.protobuf.FeatureSetDefaults.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 1:var s=new proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault;o.readMessage(s,proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.deserializeBinaryFromReader),t.addDefaults(s);break;case 4:var s=o.readEnum();t.setMinimumEdition(s);break;case 5:var s=o.readEnum();t.setMaximumEdition(s);break;default:o.skipField();break}}return t},proto.google.protobuf.FeatureSetDefaults.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.google.protobuf.FeatureSetDefaults.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.google.protobuf.FeatureSetDefaults.serializeBinaryToWriter=function(t,o){var a=void 0;a=t.getDefaultsList(),a.length>0&&o.writeRepeatedMessage(1,a,proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.serializeBinaryToWriter),a=e.Message.getField(t,4),a!=null&&o.writeEnum(4,a),a=e.Message.getField(t,5),a!=null&&o.writeEnum(5,a)},e.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.prototype.toObject=function(t){return proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(t,this)},proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject=function(t,o){var a,s={edition:(a=e.Message.getField(o,3))==null?void 0:a,overridableFeatures:(a=o.getOverridableFeatures())&&proto.google.protobuf.FeatureSet.toObject(t,a),fixedFeatures:(a=o.getFixedFeatures())&&proto.google.protobuf.FeatureSet.toObject(t,a)};return t&&(s.$jspbMessageInstance=o),s}),proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault;return proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.deserializeBinaryFromReader(a,o)},proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 3:var s=o.readEnum();t.setEdition(s);break;case 4:var s=new proto.google.protobuf.FeatureSet;o.readMessage(s,proto.google.protobuf.FeatureSet.deserializeBinaryFromReader),t.setOverridableFeatures(s);break;case 5:var s=new proto.google.protobuf.FeatureSet;o.readMessage(s,proto.google.protobuf.FeatureSet.deserializeBinaryFromReader),t.setFixedFeatures(s);break;default:o.skipField();break}}return t},proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.serializeBinaryToWriter=function(t,o){var a=void 0;a=e.Message.getField(t,3),a!=null&&o.writeEnum(3,a),a=t.getOverridableFeatures(),a!=null&&o.writeMessage(4,a,proto.google.protobuf.FeatureSet.serializeBinaryToWriter),a=t.getFixedFeatures(),a!=null&&o.writeMessage(5,a,proto.google.protobuf.FeatureSet.serializeBinaryToWriter)},proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.prototype.getEdition=function(){return e.Message.getFieldWithDefault(this,3,0)},proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.prototype.setEdition=function(t){return e.Message.setField(this,3,t)},proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.prototype.clearEdition=function(){return e.Message.setField(this,3,void 0)},proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.prototype.hasEdition=function(){return e.Message.getField(this,3)!=null},proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.prototype.getOverridableFeatures=function(){return e.Message.getWrapperField(this,proto.google.protobuf.FeatureSet,4)},proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.prototype.setOverridableFeatures=function(t){return e.Message.setWrapperField(this,4,t)},proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.prototype.clearOverridableFeatures=function(){return this.setOverridableFeatures(void 0)},proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.prototype.hasOverridableFeatures=function(){return e.Message.getField(this,4)!=null},proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.prototype.getFixedFeatures=function(){return e.Message.getWrapperField(this,proto.google.protobuf.FeatureSet,5)},proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.prototype.setFixedFeatures=function(t){return e.Message.setWrapperField(this,5,t)},proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.prototype.clearFixedFeatures=function(){return this.setFixedFeatures(void 0)},proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.prototype.hasFixedFeatures=function(){return e.Message.getField(this,5)!=null},proto.google.protobuf.FeatureSetDefaults.prototype.getDefaultsList=function(){return e.Message.getRepeatedWrapperField(this,proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault,1)},proto.google.protobuf.FeatureSetDefaults.prototype.setDefaultsList=function(t){return e.Message.setRepeatedWrapperField(this,1,t)},proto.google.protobuf.FeatureSetDefaults.prototype.addDefaults=function(t,o){return e.Message.addToRepeatedWrapperField(this,1,t,proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault,o)},proto.google.protobuf.FeatureSetDefaults.prototype.clearDefaultsList=function(){return this.setDefaultsList([])},proto.google.protobuf.FeatureSetDefaults.prototype.getMinimumEdition=function(){return e.Message.getFieldWithDefault(this,4,0)},proto.google.protobuf.FeatureSetDefaults.prototype.setMinimumEdition=function(t){return e.Message.setField(this,4,t)},proto.google.protobuf.FeatureSetDefaults.prototype.clearMinimumEdition=function(){return e.Message.setField(this,4,void 0)},proto.google.protobuf.FeatureSetDefaults.prototype.hasMinimumEdition=function(){return e.Message.getField(this,4)!=null},proto.google.protobuf.FeatureSetDefaults.prototype.getMaximumEdition=function(){return e.Message.getFieldWithDefault(this,5,0)},proto.google.protobuf.FeatureSetDefaults.prototype.setMaximumEdition=function(t){return e.Message.setField(this,5,t)},proto.google.protobuf.FeatureSetDefaults.prototype.clearMaximumEdition=function(){return e.Message.setField(this,5,void 0)},proto.google.protobuf.FeatureSetDefaults.prototype.hasMaximumEdition=function(){return e.Message.getField(this,5)!=null},proto.google.protobuf.SourceCodeInfo.repeatedFields_=[1],e.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.SourceCodeInfo.prototype.toObject=function(t){return proto.google.protobuf.SourceCodeInfo.toObject(t,this)},proto.google.protobuf.SourceCodeInfo.toObject=function(t,o){var a={locationList:e.Message.toObjectList(o.getLocationList(),proto.google.protobuf.SourceCodeInfo.Location.toObject,t)};return t&&(a.$jspbMessageInstance=o),a}),proto.google.protobuf.SourceCodeInfo.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.google.protobuf.SourceCodeInfo;return proto.google.protobuf.SourceCodeInfo.deserializeBinaryFromReader(a,o)},proto.google.protobuf.SourceCodeInfo.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 1:var s=new proto.google.protobuf.SourceCodeInfo.Location;o.readMessage(s,proto.google.protobuf.SourceCodeInfo.Location.deserializeBinaryFromReader),t.addLocation(s);break;default:o.skipField();break}}return t},proto.google.protobuf.SourceCodeInfo.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.google.protobuf.SourceCodeInfo.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.google.protobuf.SourceCodeInfo.serializeBinaryToWriter=function(t,o){var a=void 0;a=t.getLocationList(),a.length>0&&o.writeRepeatedMessage(1,a,proto.google.protobuf.SourceCodeInfo.Location.serializeBinaryToWriter)},proto.google.protobuf.SourceCodeInfo.Location.repeatedFields_=[1,2,6],e.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.SourceCodeInfo.Location.prototype.toObject=function(t){return proto.google.protobuf.SourceCodeInfo.Location.toObject(t,this)},proto.google.protobuf.SourceCodeInfo.Location.toObject=function(t,o){var a,s={pathList:(a=e.Message.getRepeatedField(o,1))==null?void 0:a,spanList:(a=e.Message.getRepeatedField(o,2))==null?void 0:a,leadingComments:(a=e.Message.getField(o,3))==null?void 0:a,trailingComments:(a=e.Message.getField(o,4))==null?void 0:a,leadingDetachedCommentsList:(a=e.Message.getRepeatedField(o,6))==null?void 0:a};return t&&(s.$jspbMessageInstance=o),s}),proto.google.protobuf.SourceCodeInfo.Location.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.google.protobuf.SourceCodeInfo.Location;return proto.google.protobuf.SourceCodeInfo.Location.deserializeBinaryFromReader(a,o)},proto.google.protobuf.SourceCodeInfo.Location.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 1:for(var l=o.isDelimited()?o.readPackedInt32():[o.readInt32()],s=0;s<l.length;s++)t.addPath(l[s]);break;case 2:for(var l=o.isDelimited()?o.readPackedInt32():[o.readInt32()],s=0;s<l.length;s++)t.addSpan(l[s]);break;case 3:var u=o.readString();t.setLeadingComments(u);break;case 4:var u=o.readString();t.setTrailingComments(u);break;case 6:var u=o.readString();t.addLeadingDetachedComments(u);break;default:o.skipField();break}}return t},proto.google.protobuf.SourceCodeInfo.Location.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.google.protobuf.SourceCodeInfo.Location.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.google.protobuf.SourceCodeInfo.Location.serializeBinaryToWriter=function(t,o){var a=void 0;a=t.getPathList(),a.length>0&&o.writePackedInt32(1,a),a=t.getSpanList(),a.length>0&&o.writePackedInt32(2,a),a=e.Message.getField(t,3),a!=null&&o.writeString(3,a),a=e.Message.getField(t,4),a!=null&&o.writeString(4,a),a=t.getLeadingDetachedCommentsList(),a.length>0&&o.writeRepeatedString(6,a)},proto.google.protobuf.SourceCodeInfo.Location.prototype.getPathList=function(){return e.Message.getRepeatedField(this,1)},proto.google.protobuf.SourceCodeInfo.Location.prototype.setPathList=function(t){return e.Message.setField(this,1,t||[])},proto.google.protobuf.SourceCodeInfo.Location.prototype.addPath=function(t,o){return e.Message.addToRepeatedField(this,1,t,o)},proto.google.protobuf.SourceCodeInfo.Location.prototype.clearPathList=function(){return this.setPathList([])},proto.google.protobuf.SourceCodeInfo.Location.prototype.getSpanList=function(){return e.Message.getRepeatedField(this,2)},proto.google.protobuf.SourceCodeInfo.Location.prototype.setSpanList=function(t){return e.Message.setField(this,2,t||[])},proto.google.protobuf.SourceCodeInfo.Location.prototype.addSpan=function(t,o){return e.Message.addToRepeatedField(this,2,t,o)},proto.google.protobuf.SourceCodeInfo.Location.prototype.clearSpanList=function(){return this.setSpanList([])},proto.google.protobuf.SourceCodeInfo.Location.prototype.getLeadingComments=function(){return e.Message.getFieldWithDefault(this,3,"")},proto.google.protobuf.SourceCodeInfo.Location.prototype.setLeadingComments=function(t){return e.Message.setField(this,3,t)},proto.google.protobuf.SourceCodeInfo.Location.prototype.clearLeadingComments=function(){return e.Message.setField(this,3,void 0)},proto.google.protobuf.SourceCodeInfo.Location.prototype.hasLeadingComments=function(){return e.Message.getField(this,3)!=null},proto.google.protobuf.SourceCodeInfo.Location.prototype.getTrailingComments=function(){return e.Message.getFieldWithDefault(this,4,"")},proto.google.protobuf.SourceCodeInfo.Location.prototype.setTrailingComments=function(t){return e.Message.setField(this,4,t)},proto.google.protobuf.SourceCodeInfo.Location.prototype.clearTrailingComments=function(){return e.Message.setField(this,4,void 0)},proto.google.protobuf.SourceCodeInfo.Location.prototype.hasTrailingComments=function(){return e.Message.getField(this,4)!=null},proto.google.protobuf.SourceCodeInfo.Location.prototype.getLeadingDetachedCommentsList=function(){return e.Message.getRepeatedField(this,6)},proto.google.protobuf.SourceCodeInfo.Location.prototype.setLeadingDetachedCommentsList=function(t){return e.Message.setField(this,6,t||[])},proto.google.protobuf.SourceCodeInfo.Location.prototype.addLeadingDetachedComments=function(t,o){return e.Message.addToRepeatedField(this,6,t,o)},proto.google.protobuf.SourceCodeInfo.Location.prototype.clearLeadingDetachedCommentsList=function(){return this.setLeadingDetachedCommentsList([])},proto.google.protobuf.SourceCodeInfo.prototype.getLocationList=function(){return e.Message.getRepeatedWrapperField(this,proto.google.protobuf.SourceCodeInfo.Location,1)},proto.google.protobuf.SourceCodeInfo.prototype.setLocationList=function(t){return e.Message.setRepeatedWrapperField(this,1,t)},proto.google.protobuf.SourceCodeInfo.prototype.addLocation=function(t,o){return e.Message.addToRepeatedWrapperField(this,1,t,proto.google.protobuf.SourceCodeInfo.Location,o)},proto.google.protobuf.SourceCodeInfo.prototype.clearLocationList=function(){return this.setLocationList([])},proto.google.protobuf.GeneratedCodeInfo.repeatedFields_=[1],e.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.GeneratedCodeInfo.prototype.toObject=function(t){return proto.google.protobuf.GeneratedCodeInfo.toObject(t,this)},proto.google.protobuf.GeneratedCodeInfo.toObject=function(t,o){var a={annotationList:e.Message.toObjectList(o.getAnnotationList(),proto.google.protobuf.GeneratedCodeInfo.Annotation.toObject,t)};return t&&(a.$jspbMessageInstance=o),a}),proto.google.protobuf.GeneratedCodeInfo.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.google.protobuf.GeneratedCodeInfo;return proto.google.protobuf.GeneratedCodeInfo.deserializeBinaryFromReader(a,o)},proto.google.protobuf.GeneratedCodeInfo.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 1:var s=new proto.google.protobuf.GeneratedCodeInfo.Annotation;o.readMessage(s,proto.google.protobuf.GeneratedCodeInfo.Annotation.deserializeBinaryFromReader),t.addAnnotation(s);break;default:o.skipField();break}}return t},proto.google.protobuf.GeneratedCodeInfo.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.google.protobuf.GeneratedCodeInfo.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.google.protobuf.GeneratedCodeInfo.serializeBinaryToWriter=function(t,o){var a=void 0;a=t.getAnnotationList(),a.length>0&&o.writeRepeatedMessage(1,a,proto.google.protobuf.GeneratedCodeInfo.Annotation.serializeBinaryToWriter)},proto.google.protobuf.GeneratedCodeInfo.Annotation.repeatedFields_=[1],e.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.toObject=function(t){return proto.google.protobuf.GeneratedCodeInfo.Annotation.toObject(t,this)},proto.google.protobuf.GeneratedCodeInfo.Annotation.toObject=function(t,o){var a,s={pathList:(a=e.Message.getRepeatedField(o,1))==null?void 0:a,sourceFile:(a=e.Message.getField(o,2))==null?void 0:a,begin:(a=e.Message.getField(o,3))==null?void 0:a,end:(a=e.Message.getField(o,4))==null?void 0:a,semantic:(a=e.Message.getField(o,5))==null?void 0:a};return t&&(s.$jspbMessageInstance=o),s}),proto.google.protobuf.GeneratedCodeInfo.Annotation.deserializeBinary=function(t){var o=new e.BinaryReader(t),a=new proto.google.protobuf.GeneratedCodeInfo.Annotation;return proto.google.protobuf.GeneratedCodeInfo.Annotation.deserializeBinaryFromReader(a,o)},proto.google.protobuf.GeneratedCodeInfo.Annotation.deserializeBinaryFromReader=function(t,o){for(;o.nextField()&&!o.isEndGroup();){var a=o.getFieldNumber();switch(a){case 1:for(var s=o.isDelimited()?o.readPackedInt32():[o.readInt32()],l=0;l<s.length;l++)t.addPath(s[l]);break;case 2:var u=o.readString();t.setSourceFile(u);break;case 3:var u=o.readInt32();t.setBegin(u);break;case 4:var u=o.readInt32();t.setEnd(u);break;case 5:var u=o.readEnum();t.setSemantic(u);break;default:o.skipField();break}}return t},proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.serializeBinary=function(){var t=new e.BinaryWriter;return proto.google.protobuf.GeneratedCodeInfo.Annotation.serializeBinaryToWriter(this,t),t.getResultBuffer()},proto.google.protobuf.GeneratedCodeInfo.Annotation.serializeBinaryToWriter=function(t,o){var a=void 0;a=t.getPathList(),a.length>0&&o.writePackedInt32(1,a),a=e.Message.getField(t,2),a!=null&&o.writeString(2,a),a=e.Message.getField(t,3),a!=null&&o.writeInt32(3,a),a=e.Message.getField(t,4),a!=null&&o.writeInt32(4,a),a=e.Message.getField(t,5),a!=null&&o.writeEnum(5,a)},proto.google.protobuf.GeneratedCodeInfo.Annotation.Semantic={NONE:0,SET:1,ALIAS:2},proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.getPathList=function(){return e.Message.getRepeatedField(this,1)},proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.setPathList=function(t){return e.Message.setField(this,1,t||[])},proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.addPath=function(t,o){return e.Message.addToRepeatedField(this,1,t,o)},proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.clearPathList=function(){return this.setPathList([])},proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.getSourceFile=function(){return e.Message.getFieldWithDefault(this,2,"")},proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.setSourceFile=function(t){return e.Message.setField(this,2,t)},proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.clearSourceFile=function(){return e.Message.setField(this,2,void 0)},proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.hasSourceFile=function(){return e.Message.getField(this,2)!=null},proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.getBegin=function(){return e.Message.getFieldWithDefault(this,3,0)},proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.setBegin=function(t){return e.Message.setField(this,3,t)},proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.clearBegin=function(){return e.Message.setField(this,3,void 0)},proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.hasBegin=function(){return e.Message.getField(this,3)!=null},proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.getEnd=function(){return e.Message.getFieldWithDefault(this,4,0)},proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.setEnd=function(t){return e.Message.setField(this,4,t)},proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.clearEnd=function(){return e.Message.setField(this,4,void 0)},proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.hasEnd=function(){return e.Message.getField(this,4)!=null},proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.getSemantic=function(){return e.Message.getFieldWithDefault(this,5,0)},proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.setSemantic=function(t){return e.Message.setField(this,5,t)},proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.clearSemantic=function(){return e.Message.setField(this,5,void 0)},proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.hasSemantic=function(){return e.Message.getField(this,5)!=null},proto.google.protobuf.GeneratedCodeInfo.prototype.getAnnotationList=function(){return e.Message.getRepeatedWrapperField(this,proto.google.protobuf.GeneratedCodeInfo.Annotation,1)},proto.google.protobuf.GeneratedCodeInfo.prototype.setAnnotationList=function(t){return e.Message.setRepeatedWrapperField(this,1,t)},proto.google.protobuf.GeneratedCodeInfo.prototype.addAnnotation=function(t,o){return e.Message.addToRepeatedWrapperField(this,1,t,proto.google.protobuf.GeneratedCodeInfo.Annotation,o)},proto.google.protobuf.GeneratedCodeInfo.prototype.clearAnnotationList=function(){return this.setAnnotationList([])},proto.google.protobuf.Edition={EDITION_UNKNOWN:0,EDITION_LEGACY:900,EDITION_PROTO2:998,EDITION_PROTO3:999,EDITION_2023:1e3,EDITION_2024:1001,EDITION_1_TEST_ONLY:1,EDITION_2_TEST_ONLY:2,EDITION_99997_TEST_ONLY:99997,EDITION_99998_TEST_ONLY:99998,EDITION_99999_TEST_ONLY:99999,EDITION_MAX:2147483647},i.object.extend(r,proto.google.protobuf)})(kW)),kW}var Kue;function o_(){return Kue||(Kue=1,(function(r){var e=n_(),i=e,n=Function("return this")(),t=Wze();i.object.extend(proto,t);var o=Gze();i.object.extend(proto,o),i.exportSymbol("proto.google.api.http",null,n),proto.google.api.http=new e.ExtensionFieldInfo(72295728,{http:0},t.HttpRule,t.HttpRule.toObject,0),o.MethodOptions.extensionsBinary[72295728]=new e.ExtensionFieldBinaryInfo(proto.google.api.http,e.BinaryReader.prototype.readMessage,e.BinaryWriter.prototype.writeMessage,t.HttpRule.serializeBinaryToWriter,t.HttpRule.deserializeBinaryFromReader,!1),o.MethodOptions.extensions[72295728]=proto.google.api.http,i.object.extend(r,proto.google.api)})(MW)),MW}var IW={},Zue;function Yze(){return Zue||(Zue=1,(function(r){var e=n_(),i=e,n=Function("return this")(),t=cb();i.object.extend(proto,t);var o=o_();i.object.extend(proto,o),i.exportSymbol("proto.diagnostics.Link",null,n),i.exportSymbol("proto.diagnostics.LinkTimers",null,n),i.exportSymbol("proto.diagnostics.Payload",null,n),i.exportSymbol("proto.diagnostics.PublisherConfig",null,n),i.exportSymbol("proto.diagnostics.SubscriberConfig",null,n),proto.diagnostics.LinkTimers=function(a){e.Message.initialize(this,a,0,-1,null,null)},i.inherits(proto.diagnostics.LinkTimers,e.Message),i.DEBUG&&!COMPILED&&(proto.diagnostics.LinkTimers.displayName="proto.diagnostics.LinkTimers"),proto.diagnostics.PublisherConfig=function(a){e.Message.initialize(this,a,0,-1,null,null)},i.inherits(proto.diagnostics.PublisherConfig,e.Message),i.DEBUG&&!COMPILED&&(proto.diagnostics.PublisherConfig.displayName="proto.diagnostics.PublisherConfig"),proto.diagnostics.SubscriberConfig=function(a){e.Message.initialize(this,a,0,-1,null,null)},i.inherits(proto.diagnostics.SubscriberConfig,e.Message),i.DEBUG&&!COMPILED&&(proto.diagnostics.SubscriberConfig.displayName="proto.diagnostics.SubscriberConfig"),proto.diagnostics.Payload=function(a){e.Message.initialize(this,a,0,-1,null,null)},i.inherits(proto.diagnostics.Payload,e.Message),i.DEBUG&&!COMPILED&&(proto.diagnostics.Payload.displayName="proto.diagnostics.Payload"),proto.diagnostics.Link=function(a){e.Message.initialize(this,a,0,-1,null,null)},i.inherits(proto.diagnostics.Link,e.Message),i.DEBUG&&!COMPILED&&(proto.diagnostics.Link.displayName="proto.diagnostics.Link"),e.Message.GENERATE_TO_OBJECT&&(proto.diagnostics.LinkTimers.prototype.toObject=function(a){return proto.diagnostics.LinkTimers.toObject(a,this)},proto.diagnostics.LinkTimers.toObject=function(a,s){var l={maxresponsetimeout:e.Message.getFieldWithDefault(s,3,0),delayresponse:e.Message.getFieldWithDefault(s,4,0)};return a&&(l.$jspbMessageInstance=s),l}),proto.diagnostics.LinkTimers.deserializeBinary=function(a){var s=new e.BinaryReader(a),l=new proto.diagnostics.LinkTimers;return proto.diagnostics.LinkTimers.deserializeBinaryFromReader(l,s)},proto.diagnostics.LinkTimers.deserializeBinaryFromReader=function(a,s){for(;s.nextField()&&!s.isEndGroup();){var l=s.getFieldNumber();switch(l){case 3:var u=s.readInt64();a.setMaxresponsetimeout(u);break;case 4:var u=s.readInt64();a.setDelayresponse(u);break;default:s.skipField();break}}return a},proto.diagnostics.LinkTimers.prototype.serializeBinary=function(){var a=new e.BinaryWriter;return proto.diagnostics.LinkTimers.serializeBinaryToWriter(this,a),a.getResultBuffer()},proto.diagnostics.LinkTimers.serializeBinaryToWriter=function(a,s){var l=void 0;l=a.getMaxresponsetimeout(),l!==0&&s.writeInt64(3,l),l=a.getDelayresponse(),l!==0&&s.writeInt64(4,l)},proto.diagnostics.LinkTimers.prototype.getMaxresponsetimeout=function(){return e.Message.getFieldWithDefault(this,3,0)},proto.diagnostics.LinkTimers.prototype.setMaxresponsetimeout=function(a){return e.Message.setProto3IntField(this,3,a)},proto.diagnostics.LinkTimers.prototype.getDelayresponse=function(){return e.Message.getFieldWithDefault(this,4,0)},proto.diagnostics.LinkTimers.prototype.setDelayresponse=function(a){return e.Message.setProto3IntField(this,4,a)},e.Message.GENERATE_TO_OBJECT&&(proto.diagnostics.PublisherConfig.prototype.toObject=function(a){return proto.diagnostics.PublisherConfig.toObject(a,this)},proto.diagnostics.PublisherConfig.toObject=function(a,s){var l,u={link:(l=s.getLink())&&proto.diagnostics.Link.toObject(a,l),payload:(l=s.getPayload())&&proto.diagnostics.Payload.toObject(a,l),linktimers:(l=s.getLinktimers())&&proto.diagnostics.LinkTimers.toObject(a,l),nopadding:e.Message.getBooleanFieldWithDefault(s,4,!1)};return a&&(u.$jspbMessageInstance=s),u}),proto.diagnostics.PublisherConfig.deserializeBinary=function(a){var s=new e.BinaryReader(a),l=new proto.diagnostics.PublisherConfig;return proto.diagnostics.PublisherConfig.deserializeBinaryFromReader(l,s)},proto.diagnostics.PublisherConfig.deserializeBinaryFromReader=function(a,s){for(;s.nextField()&&!s.isEndGroup();){var l=s.getFieldNumber();switch(l){case 1:var u=new proto.diagnostics.Link;s.readMessage(u,proto.diagnostics.Link.deserializeBinaryFromReader),a.setLink(u);break;case 2:var u=new proto.diagnostics.Payload;s.readMessage(u,proto.diagnostics.Payload.deserializeBinaryFromReader),a.setPayload(u);break;case 3:var u=new proto.diagnostics.LinkTimers;s.readMessage(u,proto.diagnostics.LinkTimers.deserializeBinaryFromReader),a.setLinktimers(u);break;case 4:var u=s.readBool();a.setNopadding(u);break;default:s.skipField();break}}return a},proto.diagnostics.PublisherConfig.prototype.serializeBinary=function(){var a=new e.BinaryWriter;return proto.diagnostics.PublisherConfig.serializeBinaryToWriter(this,a),a.getResultBuffer()},proto.diagnostics.PublisherConfig.serializeBinaryToWriter=function(a,s){var l=void 0;l=a.getLink(),l!=null&&s.writeMessage(1,l,proto.diagnostics.Link.serializeBinaryToWriter),l=a.getPayload(),l!=null&&s.writeMessage(2,l,proto.diagnostics.Payload.serializeBinaryToWriter),l=a.getLinktimers(),l!=null&&s.writeMessage(3,l,proto.diagnostics.LinkTimers.serializeBinaryToWriter),l=a.getNopadding(),l&&s.writeBool(4,l)},proto.diagnostics.PublisherConfig.prototype.getLink=function(){return e.Message.getWrapperField(this,proto.diagnostics.Link,1)},proto.diagnostics.PublisherConfig.prototype.setLink=function(a){return e.Message.setWrapperField(this,1,a)},proto.diagnostics.PublisherConfig.prototype.clearLink=function(){return this.setLink(void 0)},proto.diagnostics.PublisherConfig.prototype.hasLink=function(){return e.Message.getField(this,1)!=null},proto.diagnostics.PublisherConfig.prototype.getPayload=function(){return e.Message.getWrapperField(this,proto.diagnostics.Payload,2)},proto.diagnostics.PublisherConfig.prototype.setPayload=function(a){return e.Message.setWrapperField(this,2,a)},proto.diagnostics.PublisherConfig.prototype.clearPayload=function(){return this.setPayload(void 0)},proto.diagnostics.PublisherConfig.prototype.hasPayload=function(){return e.Message.getField(this,2)!=null},proto.diagnostics.PublisherConfig.prototype.getLinktimers=function(){return e.Message.getWrapperField(this,proto.diagnostics.LinkTimers,3)},proto.diagnostics.PublisherConfig.prototype.setLinktimers=function(a){return e.Message.setWrapperField(this,3,a)},proto.diagnostics.PublisherConfig.prototype.clearLinktimers=function(){return this.setLinktimers(void 0)},proto.diagnostics.PublisherConfig.prototype.hasLinktimers=function(){return e.Message.getField(this,3)!=null},proto.diagnostics.PublisherConfig.prototype.getNopadding=function(){return e.Message.getBooleanFieldWithDefault(this,4,!1)},proto.diagnostics.PublisherConfig.prototype.setNopadding=function(a){return e.Message.setProto3BooleanField(this,4,a)},e.Message.GENERATE_TO_OBJECT&&(proto.diagnostics.SubscriberConfig.prototype.toObject=function(a){return proto.diagnostics.SubscriberConfig.toObject(a,this)},proto.diagnostics.SubscriberConfig.toObject=function(a,s){var l,u={link:(l=s.getLink())&&proto.diagnostics.Link.toObject(a,l),linktimers:(l=s.getLinktimers())&&proto.diagnostics.LinkTimers.toObject(a,l),rawpayload:e.Message.getBooleanFieldWithDefault(s,3,!1),nopadding:e.Message.getBooleanFieldWithDefault(s,4,!1)};return a&&(u.$jspbMessageInstance=s),u}),proto.diagnostics.SubscriberConfig.deserializeBinary=function(a){var s=new e.BinaryReader(a),l=new proto.diagnostics.SubscriberConfig;return proto.diagnostics.SubscriberConfig.deserializeBinaryFromReader(l,s)},proto.diagnostics.SubscriberConfig.deserializeBinaryFromReader=function(a,s){for(;s.nextField()&&!s.isEndGroup();){var l=s.getFieldNumber();switch(l){case 1:var u=new proto.diagnostics.Link;s.readMessage(u,proto.diagnostics.Link.deserializeBinaryFromReader),a.setLink(u);break;case 2:var u=new proto.diagnostics.LinkTimers;s.readMessage(u,proto.diagnostics.LinkTimers.deserializeBinaryFromReader),a.setLinktimers(u);break;case 3:var u=s.readBool();a.setRawpayload(u);break;case 4:var u=s.readBool();a.setNopadding(u);break;default:s.skipField();break}}return a},proto.diagnostics.SubscriberConfig.prototype.serializeBinary=function(){var a=new e.BinaryWriter;return proto.diagnostics.SubscriberConfig.serializeBinaryToWriter(this,a),a.getResultBuffer()},proto.diagnostics.SubscriberConfig.serializeBinaryToWriter=function(a,s){var l=void 0;l=a.getLink(),l!=null&&s.writeMessage(1,l,proto.diagnostics.Link.serializeBinaryToWriter),l=a.getLinktimers(),l!=null&&s.writeMessage(2,l,proto.diagnostics.LinkTimers.serializeBinaryToWriter),l=a.getRawpayload(),l&&s.writeBool(3,l),l=a.getNopadding(),l&&s.writeBool(4,l)},proto.diagnostics.SubscriberConfig.prototype.getLink=function(){return e.Message.getWrapperField(this,proto.diagnostics.Link,1)},proto.diagnostics.SubscriberConfig.prototype.setLink=function(a){return e.Message.setWrapperField(this,1,a)},proto.diagnostics.SubscriberConfig.prototype.clearLink=function(){return this.setLink(void 0)},proto.diagnostics.SubscriberConfig.prototype.hasLink=function(){return e.Message.getField(this,1)!=null},proto.diagnostics.SubscriberConfig.prototype.getLinktimers=function(){return e.Message.getWrapperField(this,proto.diagnostics.LinkTimers,2)},proto.diagnostics.SubscriberConfig.prototype.setLinktimers=function(a){return e.Message.setWrapperField(this,2,a)},proto.diagnostics.SubscriberConfig.prototype.clearLinktimers=function(){return this.setLinktimers(void 0)},proto.diagnostics.SubscriberConfig.prototype.hasLinktimers=function(){return e.Message.getField(this,2)!=null},proto.diagnostics.SubscriberConfig.prototype.getRawpayload=function(){return e.Message.getBooleanFieldWithDefault(this,3,!1)},proto.diagnostics.SubscriberConfig.prototype.setRawpayload=function(a){return e.Message.setProto3BooleanField(this,3,a)},proto.diagnostics.SubscriberConfig.prototype.getNopadding=function(){return e.Message.getBooleanFieldWithDefault(this,4,!1)},proto.diagnostics.SubscriberConfig.prototype.setNopadding=function(a){return e.Message.setProto3BooleanField(this,4,a)},e.Message.GENERATE_TO_OBJECT&&(proto.diagnostics.Payload.prototype.toObject=function(a){return proto.diagnostics.Payload.toObject(a,this)},proto.diagnostics.Payload.toObject=function(a,s){var l={bytes:s.getBytes_asB64()};return a&&(l.$jspbMessageInstance=s),l}),proto.diagnostics.Payload.deserializeBinary=function(a){var s=new e.BinaryReader(a),l=new proto.diagnostics.Payload;return proto.diagnostics.Payload.deserializeBinaryFromReader(l,s)},proto.diagnostics.Payload.deserializeBinaryFromReader=function(a,s){for(;s.nextField()&&!s.isEndGroup();){var l=s.getFieldNumber();switch(l){case 1:var u=s.readBytes();a.setBytes(u);break;default:s.skipField();break}}return a},proto.diagnostics.Payload.prototype.serializeBinary=function(){var a=new e.BinaryWriter;return proto.diagnostics.Payload.serializeBinaryToWriter(this,a),a.getResultBuffer()},proto.diagnostics.Payload.serializeBinaryToWriter=function(a,s){var l=void 0;l=a.getBytes_asU8(),l.length>0&&s.writeBytes(1,l)},proto.diagnostics.Payload.prototype.getBytes=function(){return e.Message.getFieldWithDefault(this,1,"")},proto.diagnostics.Payload.prototype.getBytes_asB64=function(){return e.Message.bytesAsB64(this.getBytes())},proto.diagnostics.Payload.prototype.getBytes_asU8=function(){return e.Message.bytesAsU8(this.getBytes())},proto.diagnostics.Payload.prototype.setBytes=function(a){return e.Message.setProto3BytesField(this,1,a)},e.Message.GENERATE_TO_OBJECT&&(proto.diagnostics.Link.prototype.toObject=function(a){return proto.diagnostics.Link.toObject(a,this)},proto.diagnostics.Link.toObject=function(a,s){var l,u={clientid:(l=s.getClientid())&&t.ClientId.toObject(a,l),publishsignal:(l=s.getPublishsignal())&&t.SignalId.toObject(a,l),subscribesignal:(l=s.getSubscribesignal())&&t.SignalId.toObject(a,l)};return a&&(u.$jspbMessageInstance=s),u}),proto.diagnostics.Link.deserializeBinary=function(a){var s=new e.BinaryReader(a),l=new proto.diagnostics.Link;return proto.diagnostics.Link.deserializeBinaryFromReader(l,s)},proto.diagnostics.Link.deserializeBinaryFromReader=function(a,s){for(;s.nextField()&&!s.isEndGroup();){var l=s.getFieldNumber();switch(l){case 1:var u=new t.ClientId;s.readMessage(u,t.ClientId.deserializeBinaryFromReader),a.setClientid(u);break;case 2:var u=new t.SignalId;s.readMessage(u,t.SignalId.deserializeBinaryFromReader),a.setPublishsignal(u);break;case 3:var u=new t.SignalId;s.readMessage(u,t.SignalId.deserializeBinaryFromReader),a.setSubscribesignal(u);break;default:s.skipField();break}}return a},proto.diagnostics.Link.prototype.serializeBinary=function(){var a=new e.BinaryWriter;return proto.diagnostics.Link.serializeBinaryToWriter(this,a),a.getResultBuffer()},proto.diagnostics.Link.serializeBinaryToWriter=function(a,s){var l=void 0;l=a.getClientid(),l!=null&&s.writeMessage(1,l,t.ClientId.serializeBinaryToWriter),l=a.getPublishsignal(),l!=null&&s.writeMessage(2,l,t.SignalId.serializeBinaryToWriter),l=a.getSubscribesignal(),l!=null&&s.writeMessage(3,l,t.SignalId.serializeBinaryToWriter)},proto.diagnostics.Link.prototype.getClientid=function(){return e.Message.getWrapperField(this,t.ClientId,1)},proto.diagnostics.Link.prototype.setClientid=function(a){return e.Message.setWrapperField(this,1,a)},proto.diagnostics.Link.prototype.clearClientid=function(){return this.setClientid(void 0)},proto.diagnostics.Link.prototype.hasClientid=function(){return e.Message.getField(this,1)!=null},proto.diagnostics.Link.prototype.getPublishsignal=function(){return e.Message.getWrapperField(this,t.SignalId,2)},proto.diagnostics.Link.prototype.setPublishsignal=function(a){return e.Message.setWrapperField(this,2,a)},proto.diagnostics.Link.prototype.clearPublishsignal=function(){return this.setPublishsignal(void 0)},proto.diagnostics.Link.prototype.hasPublishsignal=function(){return e.Message.getField(this,2)!=null},proto.diagnostics.Link.prototype.getSubscribesignal=function(){return e.Message.getWrapperField(this,t.SignalId,3)},proto.diagnostics.Link.prototype.setSubscribesignal=function(a){return e.Message.setWrapperField(this,3,a)},proto.diagnostics.Link.prototype.clearSubscribesignal=function(){return this.setSubscribesignal(void 0)},proto.diagnostics.Link.prototype.hasSubscribesignal=function(){return e.Message.getField(this,3)!=null},i.object.extend(r,proto.diagnostics)})(IW)),IW}var NW,Jue;function $ze(){if(Jue)return NW;Jue=1;const r={};r.web=EU();var e=cb();o_();const i={};i.diagnostics=Yze(),i.diagnostics.DiagnosticsServiceClient=function(o,a,s){s||(s={}),s.format="text",this.client_=new r.web.GrpcWebClientBase(s),this.hostname_=o},i.diagnostics.DiagnosticsServicePromiseClient=function(o,a,s){s||(s={}),s.format="text",this.client_=new r.web.GrpcWebClientBase(s),this.hostname_=o};const n=new r.web.MethodDescriptor("/diagnostics.DiagnosticsService/PublishMultiFrame",r.web.MethodType.UNARY,i.diagnostics.PublisherConfig,e.Empty,function(o){return o.serializeBinary()},e.Empty.deserializeBinary);new r.web.AbstractClientBase.MethodInfo(e.Empty,function(o){return o.serializeBinary()},e.Empty.deserializeBinary),i.diagnostics.DiagnosticsServiceClient.prototype.publishMultiFrame=function(o,a,s){return this.client_.rpcCall(this.hostname_+"/diagnostics.DiagnosticsService/PublishMultiFrame",o,a||{},n,s)},i.diagnostics.DiagnosticsServicePromiseClient.prototype.publishMultiFrame=function(o,a){return this.client_.unaryCall(this.hostname_+"/diagnostics.DiagnosticsService/PublishMultiFrame",o,a||{},n)};const t=new r.web.MethodDescriptor("/diagnostics.DiagnosticsService/SubscribeMultiFrame",r.web.MethodType.SERVER_STREAMING,i.diagnostics.SubscriberConfig,i.diagnostics.Payload,function(o){return o.serializeBinary()},i.diagnostics.Payload.deserializeBinary);return new r.web.AbstractClientBase.MethodInfo(i.diagnostics.Payload,function(o){return o.serializeBinary()},i.diagnostics.Payload.deserializeBinary),i.diagnostics.DiagnosticsServiceClient.prototype.subscribeMultiFrame=function(o,a){return this.client_.serverStreaming(this.hostname_+"/diagnostics.DiagnosticsService/SubscribeMultiFrame",o,a||{},t)},i.diagnostics.DiagnosticsServicePromiseClient.prototype.subscribeMultiFrame=function(o,a){return this.client_.serverStreaming(this.hostname_+"/diagnostics.DiagnosticsService/SubscribeMultiFrame",o,a||{},t)},NW=i.diagnostics,NW}var FW={},Que;function yTe(){return Que||(Que=1,(function(r){var e=n_(),i=e,n=Function("return this")(),t=cb();i.object.extend(proto,t);var o=o_();i.object.extend(proto,o),i.exportSymbol("proto.base.CountByFrameId",null,n),i.exportSymbol("proto.base.FramesDistribution",null,n),i.exportSymbol("proto.base.FramesDistributionConfig",null,n),i.exportSymbol("proto.base.PublisherConfig",null,n),i.exportSymbol("proto.base.Signal",null,n),i.exportSymbol("proto.base.Signal.PayloadCase",null,n),i.exportSymbol("proto.base.SignalIds",null,n),i.exportSymbol("proto.base.Signals",null,n),i.exportSymbol("proto.base.SubscriberConfig",null,n),i.exportSymbol("proto.base.SubscriberWithScriptConfig",null,n),proto.base.SubscriberConfig=function(a){e.Message.initialize(this,a,0,-1,null,null)},i.inherits(proto.base.SubscriberConfig,e.Message),i.DEBUG&&!COMPILED&&(proto.base.SubscriberConfig.displayName="proto.base.SubscriberConfig"),proto.base.SubscriberWithScriptConfig=function(a){e.Message.initialize(this,a,0,-1,null,null)},i.inherits(proto.base.SubscriberWithScriptConfig,e.Message),i.DEBUG&&!COMPILED&&(proto.base.SubscriberWithScriptConfig.displayName="proto.base.SubscriberWithScriptConfig"),proto.base.FramesDistributionConfig=function(a){e.Message.initialize(this,a,0,-1,null,null)},i.inherits(proto.base.FramesDistributionConfig,e.Message),i.DEBUG&&!COMPILED&&(proto.base.FramesDistributionConfig.displayName="proto.base.FramesDistributionConfig"),proto.base.CountByFrameId=function(a){e.Message.initialize(this,a,0,-1,null,null)},i.inherits(proto.base.CountByFrameId,e.Message),i.DEBUG&&!COMPILED&&(proto.base.CountByFrameId.displayName="proto.base.CountByFrameId"),proto.base.FramesDistribution=function(a){e.Message.initialize(this,a,0,-1,proto.base.FramesDistribution.repeatedFields_,null)},i.inherits(proto.base.FramesDistribution,e.Message),i.DEBUG&&!COMPILED&&(proto.base.FramesDistribution.displayName="proto.base.FramesDistribution"),proto.base.SignalIds=function(a){e.Message.initialize(this,a,0,-1,proto.base.SignalIds.repeatedFields_,null)},i.inherits(proto.base.SignalIds,e.Message),i.DEBUG&&!COMPILED&&(proto.base.SignalIds.displayName="proto.base.SignalIds"),proto.base.Signals=function(a){e.Message.initialize(this,a,0,-1,proto.base.Signals.repeatedFields_,null)},i.inherits(proto.base.Signals,e.Message),i.DEBUG&&!COMPILED&&(proto.base.Signals.displayName="proto.base.Signals"),proto.base.PublisherConfig=function(a){e.Message.initialize(this,a,0,-1,null,null)},i.inherits(proto.base.PublisherConfig,e.Message),i.DEBUG&&!COMPILED&&(proto.base.PublisherConfig.displayName="proto.base.PublisherConfig"),proto.base.Signal=function(a){e.Message.initialize(this,a,0,-1,null,proto.base.Signal.oneofGroups_)},i.inherits(proto.base.Signal,e.Message),i.DEBUG&&!COMPILED&&(proto.base.Signal.displayName="proto.base.Signal"),e.Message.GENERATE_TO_OBJECT&&(proto.base.SubscriberConfig.prototype.toObject=function(a){return proto.base.SubscriberConfig.toObject(a,this)},proto.base.SubscriberConfig.toObject=function(a,s){var l,u={clientid:(l=s.getClientid())&&t.ClientId.toObject(a,l),signals:(l=s.getSignals())&&proto.base.SignalIds.toObject(a,l),onchange:e.Message.getBooleanFieldWithDefault(s,3,!1),initialempty:e.Message.getBooleanFieldWithDefault(s,4,!1)};return a&&(u.$jspbMessageInstance=s),u}),proto.base.SubscriberConfig.deserializeBinary=function(a){var s=new e.BinaryReader(a),l=new proto.base.SubscriberConfig;return proto.base.SubscriberConfig.deserializeBinaryFromReader(l,s)},proto.base.SubscriberConfig.deserializeBinaryFromReader=function(a,s){for(;s.nextField()&&!s.isEndGroup();){var l=s.getFieldNumber();switch(l){case 1:var u=new t.ClientId;s.readMessage(u,t.ClientId.deserializeBinaryFromReader),a.setClientid(u);break;case 2:var u=new proto.base.SignalIds;s.readMessage(u,proto.base.SignalIds.deserializeBinaryFromReader),a.setSignals(u);break;case 3:var u=s.readBool();a.setOnchange(u);break;case 4:var u=s.readBool();a.setInitialempty(u);break;default:s.skipField();break}}return a},proto.base.SubscriberConfig.prototype.serializeBinary=function(){var a=new e.BinaryWriter;return proto.base.SubscriberConfig.serializeBinaryToWriter(this,a),a.getResultBuffer()},proto.base.SubscriberConfig.serializeBinaryToWriter=function(a,s){var l=void 0;l=a.getClientid(),l!=null&&s.writeMessage(1,l,t.ClientId.serializeBinaryToWriter),l=a.getSignals(),l!=null&&s.writeMessage(2,l,proto.base.SignalIds.serializeBinaryToWriter),l=a.getOnchange(),l&&s.writeBool(3,l),l=a.getInitialempty(),l&&s.writeBool(4,l)},proto.base.SubscriberConfig.prototype.getClientid=function(){return e.Message.getWrapperField(this,t.ClientId,1)},proto.base.SubscriberConfig.prototype.setClientid=function(a){return e.Message.setWrapperField(this,1,a)},proto.base.SubscriberConfig.prototype.clearClientid=function(){return this.setClientid(void 0)},proto.base.SubscriberConfig.prototype.hasClientid=function(){return e.Message.getField(this,1)!=null},proto.base.SubscriberConfig.prototype.getSignals=function(){return e.Message.getWrapperField(this,proto.base.SignalIds,2)},proto.base.SubscriberConfig.prototype.setSignals=function(a){return e.Message.setWrapperField(this,2,a)},proto.base.SubscriberConfig.prototype.clearSignals=function(){return this.setSignals(void 0)},proto.base.SubscriberConfig.prototype.hasSignals=function(){return e.Message.getField(this,2)!=null},proto.base.SubscriberConfig.prototype.getOnchange=function(){return e.Message.getBooleanFieldWithDefault(this,3,!1)},proto.base.SubscriberConfig.prototype.setOnchange=function(a){return e.Message.setProto3BooleanField(this,3,a)},proto.base.SubscriberConfig.prototype.getInitialempty=function(){return e.Message.getBooleanFieldWithDefault(this,4,!1)},proto.base.SubscriberConfig.prototype.setInitialempty=function(a){return e.Message.setProto3BooleanField(this,4,a)},e.Message.GENERATE_TO_OBJECT&&(proto.base.SubscriberWithScriptConfig.prototype.toObject=function(a){return proto.base.SubscriberWithScriptConfig.toObject(a,this)},proto.base.SubscriberWithScriptConfig.toObject=function(a,s){var l,u={clientid:(l=s.getClientid())&&t.ClientId.toObject(a,l),script:s.getScript_asB64(),onchange:e.Message.getBooleanFieldWithDefault(s,3,!1)};return a&&(u.$jspbMessageInstance=s),u}),proto.base.SubscriberWithScriptConfig.deserializeBinary=function(a){var s=new e.BinaryReader(a),l=new proto.base.SubscriberWithScriptConfig;return proto.base.SubscriberWithScriptConfig.deserializeBinaryFromReader(l,s)},proto.base.SubscriberWithScriptConfig.deserializeBinaryFromReader=function(a,s){for(;s.nextField()&&!s.isEndGroup();){var l=s.getFieldNumber();switch(l){case 1:var u=new t.ClientId;s.readMessage(u,t.ClientId.deserializeBinaryFromReader),a.setClientid(u);break;case 2:var u=s.readBytes();a.setScript(u);break;case 3:var u=s.readBool();a.setOnchange(u);break;default:s.skipField();break}}return a},proto.base.SubscriberWithScriptConfig.prototype.serializeBinary=function(){var a=new e.BinaryWriter;return proto.base.SubscriberWithScriptConfig.serializeBinaryToWriter(this,a),a.getResultBuffer()},proto.base.SubscriberWithScriptConfig.serializeBinaryToWriter=function(a,s){var l=void 0;l=a.getClientid(),l!=null&&s.writeMessage(1,l,t.ClientId.serializeBinaryToWriter),l=a.getScript_asU8(),l.length>0&&s.writeBytes(2,l),l=a.getOnchange(),l&&s.writeBool(3,l)},proto.base.SubscriberWithScriptConfig.prototype.getClientid=function(){return e.Message.getWrapperField(this,t.ClientId,1)},proto.base.SubscriberWithScriptConfig.prototype.setClientid=function(a){return e.Message.setWrapperField(this,1,a)},proto.base.SubscriberWithScriptConfig.prototype.clearClientid=function(){return this.setClientid(void 0)},proto.base.SubscriberWithScriptConfig.prototype.hasClientid=function(){return e.Message.getField(this,1)!=null},proto.base.SubscriberWithScriptConfig.prototype.getScript=function(){return e.Message.getFieldWithDefault(this,2,"")},proto.base.SubscriberWithScriptConfig.prototype.getScript_asB64=function(){return e.Message.bytesAsB64(this.getScript())},proto.base.SubscriberWithScriptConfig.prototype.getScript_asU8=function(){return e.Message.bytesAsU8(this.getScript())},proto.base.SubscriberWithScriptConfig.prototype.setScript=function(a){return e.Message.setProto3BytesField(this,2,a)},proto.base.SubscriberWithScriptConfig.prototype.getOnchange=function(){return e.Message.getBooleanFieldWithDefault(this,3,!1)},proto.base.SubscriberWithScriptConfig.prototype.setOnchange=function(a){return e.Message.setProto3BooleanField(this,3,a)},e.Message.GENERATE_TO_OBJECT&&(proto.base.FramesDistributionConfig.prototype.toObject=function(a){return proto.base.FramesDistributionConfig.toObject(a,this)},proto.base.FramesDistributionConfig.toObject=function(a,s){var l,u={namespace:(l=s.getNamespace())&&t.NameSpace.toObject(a,l)};return a&&(u.$jspbMessageInstance=s),u}),proto.base.FramesDistributionConfig.deserializeBinary=function(a){var s=new e.BinaryReader(a),l=new proto.base.FramesDistributionConfig;return proto.base.FramesDistributionConfig.deserializeBinaryFromReader(l,s)},proto.base.FramesDistributionConfig.deserializeBinaryFromReader=function(a,s){for(;s.nextField()&&!s.isEndGroup();){var l=s.getFieldNumber();switch(l){case 1:var u=new t.NameSpace;s.readMessage(u,t.NameSpace.deserializeBinaryFromReader),a.setNamespace(u);break;default:s.skipField();break}}return a},proto.base.FramesDistributionConfig.prototype.serializeBinary=function(){var a=new e.BinaryWriter;return proto.base.FramesDistributionConfig.serializeBinaryToWriter(this,a),a.getResultBuffer()},proto.base.FramesDistributionConfig.serializeBinaryToWriter=function(a,s){var l=void 0;l=a.getNamespace(),l!=null&&s.writeMessage(1,l,t.NameSpace.serializeBinaryToWriter)},proto.base.FramesDistributionConfig.prototype.getNamespace=function(){return e.Message.getWrapperField(this,t.NameSpace,1)},proto.base.FramesDistributionConfig.prototype.setNamespace=function(a){return e.Message.setWrapperField(this,1,a)},proto.base.FramesDistributionConfig.prototype.clearNamespace=function(){return this.setNamespace(void 0)},proto.base.FramesDistributionConfig.prototype.hasNamespace=function(){return e.Message.getField(this,1)!=null},e.Message.GENERATE_TO_OBJECT&&(proto.base.CountByFrameId.prototype.toObject=function(a){return proto.base.CountByFrameId.toObject(a,this)},proto.base.CountByFrameId.toObject=function(a,s){var l={frameid:e.Message.getFieldWithDefault(s,1,0),count:e.Message.getFieldWithDefault(s,2,0)};return a&&(l.$jspbMessageInstance=s),l}),proto.base.CountByFrameId.deserializeBinary=function(a){var s=new e.BinaryReader(a),l=new proto.base.CountByFrameId;return proto.base.CountByFrameId.deserializeBinaryFromReader(l,s)},proto.base.CountByFrameId.deserializeBinaryFromReader=function(a,s){for(;s.nextField()&&!s.isEndGroup();){var l=s.getFieldNumber();switch(l){case 1:var u=s.readUint32();a.setFrameid(u);break;case 2:var u=s.readUint64();a.setCount(u);break;default:s.skipField();break}}return a},proto.base.CountByFrameId.prototype.serializeBinary=function(){var a=new e.BinaryWriter;return proto.base.CountByFrameId.serializeBinaryToWriter(this,a),a.getResultBuffer()},proto.base.CountByFrameId.serializeBinaryToWriter=function(a,s){var l=void 0;l=a.getFrameid(),l!==0&&s.writeUint32(1,l),l=a.getCount(),l!==0&&s.writeUint64(2,l)},proto.base.CountByFrameId.prototype.getFrameid=function(){return e.Message.getFieldWithDefault(this,1,0)},proto.base.CountByFrameId.prototype.setFrameid=function(a){return e.Message.setProto3IntField(this,1,a)},proto.base.CountByFrameId.prototype.getCount=function(){return e.Message.getFieldWithDefault(this,2,0)},proto.base.CountByFrameId.prototype.setCount=function(a){return e.Message.setProto3IntField(this,2,a)},proto.base.FramesDistribution.repeatedFields_=[1],e.Message.GENERATE_TO_OBJECT&&(proto.base.FramesDistribution.prototype.toObject=function(a){return proto.base.FramesDistribution.toObject(a,this)},proto.base.FramesDistribution.toObject=function(a,s){var l={countsbyframeidList:e.Message.toObjectList(s.getCountsbyframeidList(),proto.base.CountByFrameId.toObject,a)};return a&&(l.$jspbMessageInstance=s),l}),proto.base.FramesDistribution.deserializeBinary=function(a){var s=new e.BinaryReader(a),l=new proto.base.FramesDistribution;return proto.base.FramesDistribution.deserializeBinaryFromReader(l,s)},proto.base.FramesDistribution.deserializeBinaryFromReader=function(a,s){for(;s.nextField()&&!s.isEndGroup();){var l=s.getFieldNumber();switch(l){case 1:var u=new proto.base.CountByFrameId;s.readMessage(u,proto.base.CountByFrameId.deserializeBinaryFromReader),a.addCountsbyframeid(u);break;default:s.skipField();break}}return a},proto.base.FramesDistribution.prototype.serializeBinary=function(){var a=new e.BinaryWriter;return proto.base.FramesDistribution.serializeBinaryToWriter(this,a),a.getResultBuffer()},proto.base.FramesDistribution.serializeBinaryToWriter=function(a,s){var l=void 0;l=a.getCountsbyframeidList(),l.length>0&&s.writeRepeatedMessage(1,l,proto.base.CountByFrameId.serializeBinaryToWriter)},proto.base.FramesDistribution.prototype.getCountsbyframeidList=function(){return e.Message.getRepeatedWrapperField(this,proto.base.CountByFrameId,1)},proto.base.FramesDistribution.prototype.setCountsbyframeidList=function(a){return e.Message.setRepeatedWrapperField(this,1,a)},proto.base.FramesDistribution.prototype.addCountsbyframeid=function(a,s){return e.Message.addToRepeatedWrapperField(this,1,a,proto.base.CountByFrameId,s)},proto.base.FramesDistribution.prototype.clearCountsbyframeidList=function(){return this.setCountsbyframeidList([])},proto.base.SignalIds.repeatedFields_=[1],e.Message.GENERATE_TO_OBJECT&&(proto.base.SignalIds.prototype.toObject=function(a){return proto.base.SignalIds.toObject(a,this)},proto.base.SignalIds.toObject=function(a,s){var l={signalidList:e.Message.toObjectList(s.getSignalidList(),t.SignalId.toObject,a)};return a&&(l.$jspbMessageInstance=s),l}),proto.base.SignalIds.deserializeBinary=function(a){var s=new e.BinaryReader(a),l=new proto.base.SignalIds;return proto.base.SignalIds.deserializeBinaryFromReader(l,s)},proto.base.SignalIds.deserializeBinaryFromReader=function(a,s){for(;s.nextField()&&!s.isEndGroup();){var l=s.getFieldNumber();switch(l){case 1:var u=new t.SignalId;s.readMessage(u,t.SignalId.deserializeBinaryFromReader),a.addSignalid(u);break;default:s.skipField();break}}return a},proto.base.SignalIds.prototype.serializeBinary=function(){var a=new e.BinaryWriter;return proto.base.SignalIds.serializeBinaryToWriter(this,a),a.getResultBuffer()},proto.base.SignalIds.serializeBinaryToWriter=function(a,s){var l=void 0;l=a.getSignalidList(),l.length>0&&s.writeRepeatedMessage(1,l,t.SignalId.serializeBinaryToWriter)},proto.base.SignalIds.prototype.getSignalidList=function(){return e.Message.getRepeatedWrapperField(this,t.SignalId,1)},proto.base.SignalIds.prototype.setSignalidList=function(a){return e.Message.setRepeatedWrapperField(this,1,a)},proto.base.SignalIds.prototype.addSignalid=function(a,s){return e.Message.addToRepeatedWrapperField(this,1,a,proto.base.SignalId,s)},proto.base.SignalIds.prototype.clearSignalidList=function(){return this.setSignalidList([])},proto.base.Signals.repeatedFields_=[1],e.Message.GENERATE_TO_OBJECT&&(proto.base.Signals.prototype.toObject=function(a){return proto.base.Signals.toObject(a,this)},proto.base.Signals.toObject=function(a,s){var l={signalList:e.Message.toObjectList(s.getSignalList(),proto.base.Signal.toObject,a)};return a&&(l.$jspbMessageInstance=s),l}),proto.base.Signals.deserializeBinary=function(a){var s=new e.BinaryReader(a),l=new proto.base.Signals;return proto.base.Signals.deserializeBinaryFromReader(l,s)},proto.base.Signals.deserializeBinaryFromReader=function(a,s){for(;s.nextField()&&!s.isEndGroup();){var l=s.getFieldNumber();switch(l){case 1:var u=new proto.base.Signal;s.readMessage(u,proto.base.Signal.deserializeBinaryFromReader),a.addSignal(u);break;default:s.skipField();break}}return a},proto.base.Signals.prototype.serializeBinary=function(){var a=new e.BinaryWriter;return proto.base.Signals.serializeBinaryToWriter(this,a),a.getResultBuffer()},proto.base.Signals.serializeBinaryToWriter=function(a,s){var l=void 0;l=a.getSignalList(),l.length>0&&s.writeRepeatedMessage(1,l,proto.base.Signal.serializeBinaryToWriter)},proto.base.Signals.prototype.getSignalList=function(){return e.Message.getRepeatedWrapperField(this,proto.base.Signal,1)},proto.base.Signals.prototype.setSignalList=function(a){return e.Message.setRepeatedWrapperField(this,1,a)},proto.base.Signals.prototype.addSignal=function(a,s){return e.Message.addToRepeatedWrapperField(this,1,a,proto.base.Signal,s)},proto.base.Signals.prototype.clearSignalList=function(){return this.setSignalList([])},e.Message.GENERATE_TO_OBJECT&&(proto.base.PublisherConfig.prototype.toObject=function(a){return proto.base.PublisherConfig.toObject(a,this)},proto.base.PublisherConfig.toObject=function(a,s){var l,u={signals:(l=s.getSignals())&&proto.base.Signals.toObject(a,l),clientid:(l=s.getClientid())&&t.ClientId.toObject(a,l),frequency:e.Message.getFieldWithDefault(s,3,0)};return a&&(u.$jspbMessageInstance=s),u}),proto.base.PublisherConfig.deserializeBinary=function(a){var s=new e.BinaryReader(a),l=new proto.base.PublisherConfig;return proto.base.PublisherConfig.deserializeBinaryFromReader(l,s)},proto.base.PublisherConfig.deserializeBinaryFromReader=function(a,s){for(;s.nextField()&&!s.isEndGroup();){var l=s.getFieldNumber();switch(l){case 1:var u=new proto.base.Signals;s.readMessage(u,proto.base.Signals.deserializeBinaryFromReader),a.setSignals(u);break;case 2:var u=new t.ClientId;s.readMessage(u,t.ClientId.deserializeBinaryFromReader),a.setClientid(u);break;case 3:var u=s.readInt32();a.setFrequency(u);break;default:s.skipField();break}}return a},proto.base.PublisherConfig.prototype.serializeBinary=function(){var a=new e.BinaryWriter;return proto.base.PublisherConfig.serializeBinaryToWriter(this,a),a.getResultBuffer()},proto.base.PublisherConfig.serializeBinaryToWriter=function(a,s){var l=void 0;l=a.getSignals(),l!=null&&s.writeMessage(1,l,proto.base.Signals.serializeBinaryToWriter),l=a.getClientid(),l!=null&&s.writeMessage(2,l,t.ClientId.serializeBinaryToWriter),l=a.getFrequency(),l!==0&&s.writeInt32(3,l)},proto.base.PublisherConfig.prototype.getSignals=function(){return e.Message.getWrapperField(this,proto.base.Signals,1)},proto.base.PublisherConfig.prototype.setSignals=function(a){return e.Message.setWrapperField(this,1,a)},proto.base.PublisherConfig.prototype.clearSignals=function(){return this.setSignals(void 0)},proto.base.PublisherConfig.prototype.hasSignals=function(){return e.Message.getField(this,1)!=null},proto.base.PublisherConfig.prototype.getClientid=function(){return e.Message.getWrapperField(this,t.ClientId,2)},proto.base.PublisherConfig.prototype.setClientid=function(a){return e.Message.setWrapperField(this,2,a)},proto.base.PublisherConfig.prototype.clearClientid=function(){return this.setClientid(void 0)},proto.base.PublisherConfig.prototype.hasClientid=function(){return e.Message.getField(this,2)!=null},proto.base.PublisherConfig.prototype.getFrequency=function(){return e.Message.getFieldWithDefault(this,3,0)},proto.base.PublisherConfig.prototype.setFrequency=function(a){return e.Message.setProto3IntField(this,3,a)},proto.base.Signal.oneofGroups_=[[2,3,4,6,8]],proto.base.Signal.PayloadCase={PAYLOAD_NOT_SET:0,INTEGER:2,DOUBLE:3,ARBITRATION:4,EMPTY:6,STRVALUE:8},proto.base.Signal.prototype.getPayloadCase=function(){return e.Message.computeOneofCase(this,proto.base.Signal.oneofGroups_[0])},e.Message.GENERATE_TO_OBJECT&&(proto.base.Signal.prototype.toObject=function(a){return proto.base.Signal.toObject(a,this)},proto.base.Signal.toObject=function(a,s){var l,u={id:(l=s.getId())&&t.SignalId.toObject(a,l),integer:e.Message.getFieldWithDefault(s,2,0),pb_double:e.Message.getFloatingPointFieldWithDefault(s,3,0),arbitration:e.Message.getBooleanFieldWithDefault(s,4,!1),empty:e.Message.getBooleanFieldWithDefault(s,6,!1),strvalue:e.Message.getFieldWithDefault(s,8,""),raw:s.getRaw_asB64(),timestamp:e.Message.getFieldWithDefault(s,7,0)};return a&&(u.$jspbMessageInstance=s),u}),proto.base.Signal.deserializeBinary=function(a){var s=new e.BinaryReader(a),l=new proto.base.Signal;return proto.base.Signal.deserializeBinaryFromReader(l,s)},proto.base.Signal.deserializeBinaryFromReader=function(a,s){for(;s.nextField()&&!s.isEndGroup();){var l=s.getFieldNumber();switch(l){case 1:var u=new t.SignalId;s.readMessage(u,t.SignalId.deserializeBinaryFromReader),a.setId(u);break;case 2:var u=s.readInt64();a.setInteger(u);break;case 3:var u=s.readDouble();a.setDouble(u);break;case 4:var u=s.readBool();a.setArbitration(u);break;case 6:var u=s.readBool();a.setEmpty(u);break;case 8:var u=s.readString();a.setStrvalue(u);break;case 5:var u=s.readBytes();a.setRaw(u);break;case 7:var u=s.readInt64();a.setTimestamp(u);break;default:s.skipField();break}}return a},proto.base.Signal.prototype.serializeBinary=function(){var a=new e.BinaryWriter;return proto.base.Signal.serializeBinaryToWriter(this,a),a.getResultBuffer()},proto.base.Signal.serializeBinaryToWriter=function(a,s){var l=void 0;l=a.getId(),l!=null&&s.writeMessage(1,l,t.SignalId.serializeBinaryToWriter),l=e.Message.getField(a,2),l!=null&&s.writeInt64(2,l),l=e.Message.getField(a,3),l!=null&&s.writeDouble(3,l),l=e.Message.getField(a,4),l!=null&&s.writeBool(4,l),l=e.Message.getField(a,6),l!=null&&s.writeBool(6,l),l=e.Message.getField(a,8),l!=null&&s.writeString(8,l),l=a.getRaw_asU8(),l.length>0&&s.writeBytes(5,l),l=a.getTimestamp(),l!==0&&s.writeInt64(7,l)},proto.base.Signal.prototype.getId=function(){return e.Message.getWrapperField(this,t.SignalId,1)},proto.base.Signal.prototype.setId=function(a){return e.Message.setWrapperField(this,1,a)},proto.base.Signal.prototype.clearId=function(){return this.setId(void 0)},proto.base.Signal.prototype.hasId=function(){return e.Message.getField(this,1)!=null},proto.base.Signal.prototype.getInteger=function(){return e.Message.getFieldWithDefault(this,2,0)},proto.base.Signal.prototype.setInteger=function(a){return e.Message.setOneofField(this,2,proto.base.Signal.oneofGroups_[0],a)},proto.base.Signal.prototype.clearInteger=function(){return e.Message.setOneofField(this,2,proto.base.Signal.oneofGroups_[0],void 0)},proto.base.Signal.prototype.hasInteger=function(){return e.Message.getField(this,2)!=null},proto.base.Signal.prototype.getDouble=function(){return e.Message.getFloatingPointFieldWithDefault(this,3,0)},proto.base.Signal.prototype.setDouble=function(a){return e.Message.setOneofField(this,3,proto.base.Signal.oneofGroups_[0],a)},proto.base.Signal.prototype.clearDouble=function(){return e.Message.setOneofField(this,3,proto.base.Signal.oneofGroups_[0],void 0)},proto.base.Signal.prototype.hasDouble=function(){return e.Message.getField(this,3)!=null},proto.base.Signal.prototype.getArbitration=function(){return e.Message.getBooleanFieldWithDefault(this,4,!1)},proto.base.Signal.prototype.setArbitration=function(a){return e.Message.setOneofField(this,4,proto.base.Signal.oneofGroups_[0],a)},proto.base.Signal.prototype.clearArbitration=function(){return e.Message.setOneofField(this,4,proto.base.Signal.oneofGroups_[0],void 0)},proto.base.Signal.prototype.hasArbitration=function(){return e.Message.getField(this,4)!=null},proto.base.Signal.prototype.getEmpty=function(){return e.Message.getBooleanFieldWithDefault(this,6,!1)},proto.base.Signal.prototype.setEmpty=function(a){return e.Message.setOneofField(this,6,proto.base.Signal.oneofGroups_[0],a)},proto.base.Signal.prototype.clearEmpty=function(){return e.Message.setOneofField(this,6,proto.base.Signal.oneofGroups_[0],void 0)},proto.base.Signal.prototype.hasEmpty=function(){return e.Message.getField(this,6)!=null},proto.base.Signal.prototype.getStrvalue=function(){return e.Message.getFieldWithDefault(this,8,"")},proto.base.Signal.prototype.setStrvalue=function(a){return e.Message.setOneofField(this,8,proto.base.Signal.oneofGroups_[0],a)},proto.base.Signal.prototype.clearStrvalue=function(){return e.Message.setOneofField(this,8,proto.base.Signal.oneofGroups_[0],void 0)},proto.base.Signal.prototype.hasStrvalue=function(){return e.Message.getField(this,8)!=null},proto.base.Signal.prototype.getRaw=function(){return e.Message.getFieldWithDefault(this,5,"")},proto.base.Signal.prototype.getRaw_asB64=function(){return e.Message.bytesAsB64(this.getRaw())},proto.base.Signal.prototype.getRaw_asU8=function(){return e.Message.bytesAsU8(this.getRaw())},proto.base.Signal.prototype.setRaw=function(a){return e.Message.setProto3BytesField(this,5,a)},proto.base.Signal.prototype.getTimestamp=function(){return e.Message.getFieldWithDefault(this,7,0)},proto.base.Signal.prototype.setTimestamp=function(a){return e.Message.setProto3IntField(this,7,a)},i.object.extend(r,proto.base)})(FW)),FW}var jW,ece;function qze(){if(ece)return jW;ece=1;const r={};r.web=EU();var e=cb();o_();const i={};i.base=yTe(),i.base.NetworkServiceClient=function(l,u,c){c||(c={}),c.format="text",this.client_=new r.web.GrpcWebClientBase(c),this.hostname_=l},i.base.NetworkServicePromiseClient=function(l,u,c){c||(c={}),c.format="text",this.client_=new r.web.GrpcWebClientBase(c),this.hostname_=l};const n=new r.web.MethodDescriptor("/base.NetworkService/SubscribeToSignals",r.web.MethodType.SERVER_STREAMING,i.base.SubscriberConfig,i.base.Signals,function(l){return l.serializeBinary()},i.base.Signals.deserializeBinary);new r.web.AbstractClientBase.MethodInfo(i.base.Signals,function(l){return l.serializeBinary()},i.base.Signals.deserializeBinary),i.base.NetworkServiceClient.prototype.subscribeToSignals=function(l,u){return this.client_.serverStreaming(this.hostname_+"/base.NetworkService/SubscribeToSignals",l,u||{},n)},i.base.NetworkServicePromiseClient.prototype.subscribeToSignals=function(l,u){return this.client_.serverStreaming(this.hostname_+"/base.NetworkService/SubscribeToSignals",l,u||{},n)};const t=new r.web.MethodDescriptor("/base.NetworkService/SubscribeToSignalWithScript",r.web.MethodType.SERVER_STREAMING,i.base.SubscriberWithScriptConfig,i.base.Signals,function(l){return l.serializeBinary()},i.base.Signals.deserializeBinary);new r.web.AbstractClientBase.MethodInfo(i.base.Signals,function(l){return l.serializeBinary()},i.base.Signals.deserializeBinary),i.base.NetworkServiceClient.prototype.subscribeToSignalWithScript=function(l,u){return this.client_.serverStreaming(this.hostname_+"/base.NetworkService/SubscribeToSignalWithScript",l,u||{},t)},i.base.NetworkServicePromiseClient.prototype.subscribeToSignalWithScript=function(l,u){return this.client_.serverStreaming(this.hostname_+"/base.NetworkService/SubscribeToSignalWithScript",l,u||{},t)};const o=new r.web.MethodDescriptor("/base.NetworkService/SubscribeToFramesDistribution",r.web.MethodType.SERVER_STREAMING,i.base.FramesDistributionConfig,i.base.FramesDistribution,function(l){return l.serializeBinary()},i.base.FramesDistribution.deserializeBinary);new r.web.AbstractClientBase.MethodInfo(i.base.FramesDistribution,function(l){return l.serializeBinary()},i.base.FramesDistribution.deserializeBinary),i.base.NetworkServiceClient.prototype.subscribeToFramesDistribution=function(l,u){return this.client_.serverStreaming(this.hostname_+"/base.NetworkService/SubscribeToFramesDistribution",l,u||{},o)},i.base.NetworkServicePromiseClient.prototype.subscribeToFramesDistribution=function(l,u){return this.client_.serverStreaming(this.hostname_+"/base.NetworkService/SubscribeToFramesDistribution",l,u||{},o)};const a=new r.web.MethodDescriptor("/base.NetworkService/PublishSignals",r.web.MethodType.UNARY,i.base.PublisherConfig,e.Empty,function(l){return l.serializeBinary()},e.Empty.deserializeBinary);new r.web.AbstractClientBase.MethodInfo(e.Empty,function(l){return l.serializeBinary()},e.Empty.deserializeBinary),i.base.NetworkServiceClient.prototype.publishSignals=function(l,u,c){return this.client_.rpcCall(this.hostname_+"/base.NetworkService/PublishSignals",l,u||{},a,c)},i.base.NetworkServicePromiseClient.prototype.publishSignals=function(l,u){return this.client_.unaryCall(this.hostname_+"/base.NetworkService/PublishSignals",l,u||{},a)};const s=new r.web.MethodDescriptor("/base.NetworkService/ReadSignals",r.web.MethodType.UNARY,i.base.SignalIds,i.base.Signals,function(l){return l.serializeBinary()},i.base.Signals.deserializeBinary);return new r.web.AbstractClientBase.MethodInfo(i.base.Signals,function(l){return l.serializeBinary()},i.base.Signals.deserializeBinary),i.base.NetworkServiceClient.prototype.readSignals=function(l,u,c){return this.client_.rpcCall(this.hostname_+"/base.NetworkService/ReadSignals",l,u||{},s,c)},i.base.NetworkServicePromiseClient.prototype.readSignals=function(l,u){return this.client_.unaryCall(this.hostname_+"/base.NetworkService/ReadSignals",l,u||{},s)},jW=i.base,jW}var BW={},tce;function AU(){return tce||(tce=1,(function(r){var e=n_(),i=e,n=Function("return this")(),t=cb();i.object.extend(proto,t);var o=o_();i.object.extend(proto,o),i.exportSymbol("proto.base.BatchDownloadFileChunksRequest",null,n),i.exportSymbol("proto.base.BatchDownloadFileChunksResponse",null,n),i.exportSymbol("proto.base.Configuration",null,n),i.exportSymbol("proto.base.FileDescription",null,n),i.exportSymbol("proto.base.FileDescriptions",null,n),i.exportSymbol("proto.base.FileDownloadResponse",null,n),i.exportSymbol("proto.base.FileDownloadResponse.DataCase",null,n),i.exportSymbol("proto.base.FileUploadChunkRequest",null,n),i.exportSymbol("proto.base.FileUploadRequest",null,n),i.exportSymbol("proto.base.FileUploadRequest.DataCase",null,n),i.exportSymbol("proto.base.FileUploadResponse",null,n),i.exportSymbol("proto.base.FileUploadResponse.DataCase",null,n),i.exportSymbol("proto.base.License",null,n),i.exportSymbol("proto.base.LicenseInfo",null,n),i.exportSymbol("proto.base.LicenseStatus",null,n),i.exportSymbol("proto.base.PropertyValue",null,n),i.exportSymbol("proto.base.PropertyValue.ValueCase",null,n),i.exportSymbol("proto.base.ReloadMessage",null,n),i.exportSymbol("proto.base.ReloadMessage.StatusCase",null,n),proto.base.Configuration=function(a){e.Message.initialize(this,a,0,-1,proto.base.Configuration.repeatedFields_,null)},i.inherits(proto.base.Configuration,e.Message),i.DEBUG&&!COMPILED&&(proto.base.Configuration.displayName="proto.base.Configuration"),proto.base.ReloadMessage=function(a){e.Message.initialize(this,a,0,-1,null,proto.base.ReloadMessage.oneofGroups_)},i.inherits(proto.base.ReloadMessage,e.Message),i.DEBUG&&!COMPILED&&(proto.base.ReloadMessage.displayName="proto.base.ReloadMessage"),proto.base.FileDescription=function(a){e.Message.initialize(this,a,0,-1,null,null)},i.inherits(proto.base.FileDescription,e.Message),i.DEBUG&&!COMPILED&&(proto.base.FileDescription.displayName="proto.base.FileDescription"),proto.base.FileDescriptions=function(a){e.Message.initialize(this,a,0,-1,proto.base.FileDescriptions.repeatedFields_,null)},i.inherits(proto.base.FileDescriptions,e.Message),i.DEBUG&&!COMPILED&&(proto.base.FileDescriptions.displayName="proto.base.FileDescriptions"),proto.base.FileUploadRequest=function(a){e.Message.initialize(this,a,0,-1,null,proto.base.FileUploadRequest.oneofGroups_)},i.inherits(proto.base.FileUploadRequest,e.Message),i.DEBUG&&!COMPILED&&(proto.base.FileUploadRequest.displayName="proto.base.FileUploadRequest"),proto.base.FileUploadChunkRequest=function(a){e.Message.initialize(this,a,0,-1,null,null)},i.inherits(proto.base.FileUploadChunkRequest,e.Message),i.DEBUG&&!COMPILED&&(proto.base.FileUploadChunkRequest.displayName="proto.base.FileUploadChunkRequest"),proto.base.FileUploadResponse=function(a){e.Message.initialize(this,a,0,-1,null,proto.base.FileUploadResponse.oneofGroups_)},i.inherits(proto.base.FileUploadResponse,e.Message),i.DEBUG&&!COMPILED&&(proto.base.FileUploadResponse.displayName="proto.base.FileUploadResponse"),proto.base.FileDownloadResponse=function(a){e.Message.initialize(this,a,0,-1,null,proto.base.FileDownloadResponse.oneofGroups_)},i.inherits(proto.base.FileDownloadResponse,e.Message),i.DEBUG&&!COMPILED&&(proto.base.FileDownloadResponse.displayName="proto.base.FileDownloadResponse"),proto.base.BatchDownloadFileChunksRequest=function(a){e.Message.initialize(this,a,0,-1,proto.base.BatchDownloadFileChunksRequest.repeatedFields_,null)},i.inherits(proto.base.BatchDownloadFileChunksRequest,e.Message),i.DEBUG&&!COMPILED&&(proto.base.BatchDownloadFileChunksRequest.displayName="proto.base.BatchDownloadFileChunksRequest"),proto.base.BatchDownloadFileChunksResponse=function(a){e.Message.initialize(this,a,0,-1,null,null)},i.inherits(proto.base.BatchDownloadFileChunksResponse,e.Message),i.DEBUG&&!COMPILED&&(proto.base.BatchDownloadFileChunksResponse.displayName="proto.base.BatchDownloadFileChunksResponse"),proto.base.LicenseInfo=function(a){e.Message.initialize(this,a,0,-1,null,null)},i.inherits(proto.base.LicenseInfo,e.Message),i.DEBUG&&!COMPILED&&(proto.base.LicenseInfo.displayName="proto.base.LicenseInfo"),proto.base.License=function(a){e.Message.initialize(this,a,0,-1,null,null)},i.inherits(proto.base.License,e.Message),i.DEBUG&&!COMPILED&&(proto.base.License.displayName="proto.base.License"),proto.base.PropertyValue=function(a){e.Message.initialize(this,a,0,-1,proto.base.PropertyValue.repeatedFields_,proto.base.PropertyValue.oneofGroups_)},i.inherits(proto.base.PropertyValue,e.Message),i.DEBUG&&!COMPILED&&(proto.base.PropertyValue.displayName="proto.base.PropertyValue"),proto.base.Configuration.repeatedFields_=[1],e.Message.GENERATE_TO_OBJECT&&(proto.base.Configuration.prototype.toObject=function(a){return proto.base.Configuration.toObject(a,this)},proto.base.Configuration.toObject=function(a,s){var l={networkinfoList:e.Message.toObjectList(s.getNetworkinfoList(),t.NetworkInfo.toObject,a),interfacesjson:s.getInterfacesjson_asB64(),publicaddress:e.Message.getFieldWithDefault(s,4,""),serverversion:e.Message.getFieldWithDefault(s,5,""),interfacesinfo:e.Message.getFieldWithDefault(s,6,"")};return a&&(l.$jspbMessageInstance=s),l}),proto.base.Configuration.deserializeBinary=function(a){var s=new e.BinaryReader(a),l=new proto.base.Configuration;return proto.base.Configuration.deserializeBinaryFromReader(l,s)},proto.base.Configuration.deserializeBinaryFromReader=function(a,s){for(;s.nextField()&&!s.isEndGroup();){var l=s.getFieldNumber();switch(l){case 1:var u=new t.NetworkInfo;s.readMessage(u,t.NetworkInfo.deserializeBinaryFromReader),a.addNetworkinfo(u);break;case 2:var u=s.readBytes();a.setInterfacesjson(u);break;case 4:var u=s.readString();a.setPublicaddress(u);break;case 5:var u=s.readString();a.setServerversion(u);break;case 6:var u=s.readString();a.setInterfacesinfo(u);break;default:s.skipField();break}}return a},proto.base.Configuration.prototype.serializeBinary=function(){var a=new e.BinaryWriter;return proto.base.Configuration.serializeBinaryToWriter(this,a),a.getResultBuffer()},proto.base.Configuration.serializeBinaryToWriter=function(a,s){var l=void 0;l=a.getNetworkinfoList(),l.length>0&&s.writeRepeatedMessage(1,l,t.NetworkInfo.serializeBinaryToWriter),l=a.getInterfacesjson_asU8(),l.length>0&&s.writeBytes(2,l),l=a.getPublicaddress(),l.length>0&&s.writeString(4,l),l=a.getServerversion(),l.length>0&&s.writeString(5,l),l=a.getInterfacesinfo(),l.length>0&&s.writeString(6,l)},proto.base.Configuration.prototype.getNetworkinfoList=function(){return e.Message.getRepeatedWrapperField(this,t.NetworkInfo,1)},proto.base.Configuration.prototype.setNetworkinfoList=function(a){return e.Message.setRepeatedWrapperField(this,1,a)},proto.base.Configuration.prototype.addNetworkinfo=function(a,s){return e.Message.addToRepeatedWrapperField(this,1,a,proto.base.NetworkInfo,s)},proto.base.Configuration.prototype.clearNetworkinfoList=function(){return this.setNetworkinfoList([])},proto.base.Configuration.prototype.getInterfacesjson=function(){return e.Message.getFieldWithDefault(this,2,"")},proto.base.Configuration.prototype.getInterfacesjson_asB64=function(){return e.Message.bytesAsB64(this.getInterfacesjson())},proto.base.Configuration.prototype.getInterfacesjson_asU8=function(){return e.Message.bytesAsU8(this.getInterfacesjson())},proto.base.Configuration.prototype.setInterfacesjson=function(a){return e.Message.setProto3BytesField(this,2,a)},proto.base.Configuration.prototype.getPublicaddress=function(){return e.Message.getFieldWithDefault(this,4,"")},proto.base.Configuration.prototype.setPublicaddress=function(a){return e.Message.setProto3StringField(this,4,a)},proto.base.Configuration.prototype.getServerversion=function(){return e.Message.getFieldWithDefault(this,5,"")},proto.base.Configuration.prototype.setServerversion=function(a){return e.Message.setProto3StringField(this,5,a)},proto.base.Configuration.prototype.getInterfacesinfo=function(){return e.Message.getFieldWithDefault(this,6,"")},proto.base.Configuration.prototype.setInterfacesinfo=function(a){return e.Message.setProto3StringField(this,6,a)},proto.base.ReloadMessage.oneofGroups_=[[1,2]],proto.base.ReloadMessage.StatusCase={STATUS_NOT_SET:0,CONFIGURATION:1,ERRORMESSAGE:2},proto.base.ReloadMessage.prototype.getStatusCase=function(){return e.Message.computeOneofCase(this,proto.base.ReloadMessage.oneofGroups_[0])},e.Message.GENERATE_TO_OBJECT&&(proto.base.ReloadMessage.prototype.toObject=function(a){return proto.base.ReloadMessage.toObject(a,this)},proto.base.ReloadMessage.toObject=function(a,s){var l,u={configuration:(l=s.getConfiguration())&&proto.base.Configuration.toObject(a,l),errormessage:e.Message.getFieldWithDefault(s,2,"")};return a&&(u.$jspbMessageInstance=s),u}),proto.base.ReloadMessage.deserializeBinary=function(a){var s=new e.BinaryReader(a),l=new proto.base.ReloadMessage;return proto.base.ReloadMessage.deserializeBinaryFromReader(l,s)},proto.base.ReloadMessage.deserializeBinaryFromReader=function(a,s){for(;s.nextField()&&!s.isEndGroup();){var l=s.getFieldNumber();switch(l){case 1:var u=new proto.base.Configuration;s.readMessage(u,proto.base.Configuration.deserializeBinaryFromReader),a.setConfiguration(u);break;case 2:var u=s.readString();a.setErrormessage(u);break;default:s.skipField();break}}return a},proto.base.ReloadMessage.prototype.serializeBinary=function(){var a=new e.BinaryWriter;return proto.base.ReloadMessage.serializeBinaryToWriter(this,a),a.getResultBuffer()},proto.base.ReloadMessage.serializeBinaryToWriter=function(a,s){var l=void 0;l=a.getConfiguration(),l!=null&&s.writeMessage(1,l,proto.base.Configuration.serializeBinaryToWriter),l=e.Message.getField(a,2),l!=null&&s.writeString(2,l)},proto.base.ReloadMessage.prototype.getConfiguration=function(){return e.Message.getWrapperField(this,proto.base.Configuration,1)},proto.base.ReloadMessage.prototype.setConfiguration=function(a){return e.Message.setOneofWrapperField(this,1,proto.base.ReloadMessage.oneofGroups_[0],a)},proto.base.ReloadMessage.prototype.clearConfiguration=function(){return this.setConfiguration(void 0)},proto.base.ReloadMessage.prototype.hasConfiguration=function(){return e.Message.getField(this,1)!=null},proto.base.ReloadMessage.prototype.getErrormessage=function(){return e.Message.getFieldWithDefault(this,2,"")},proto.base.ReloadMessage.prototype.setErrormessage=function(a){return e.Message.setOneofField(this,2,proto.base.ReloadMessage.oneofGroups_[0],a)},proto.base.ReloadMessage.prototype.clearErrormessage=function(){return e.Message.setOneofField(this,2,proto.base.ReloadMessage.oneofGroups_[0],void 0)},proto.base.ReloadMessage.prototype.hasErrormessage=function(){return e.Message.getField(this,2)!=null},e.Message.GENERATE_TO_OBJECT&&(proto.base.FileDescription.prototype.toObject=function(a){return proto.base.FileDescription.toObject(a,this)},proto.base.FileDescription.toObject=function(a,s){var l={sha256:e.Message.getFieldWithDefault(s,1,""),path:e.Message.getFieldWithDefault(s,2,"")};return a&&(l.$jspbMessageInstance=s),l}),proto.base.FileDescription.deserializeBinary=function(a){var s=new e.BinaryReader(a),l=new proto.base.FileDescription;return proto.base.FileDescription.deserializeBinaryFromReader(l,s)},proto.base.FileDescription.deserializeBinaryFromReader=function(a,s){for(;s.nextField()&&!s.isEndGroup();){var l=s.getFieldNumber();switch(l){case 1:var u=s.readString();a.setSha256(u);break;case 2:var u=s.readString();a.setPath(u);break;default:s.skipField();break}}return a},proto.base.FileDescription.prototype.serializeBinary=function(){var a=new e.BinaryWriter;return proto.base.FileDescription.serializeBinaryToWriter(this,a),a.getResultBuffer()},proto.base.FileDescription.serializeBinaryToWriter=function(a,s){var l=void 0;l=a.getSha256(),l.length>0&&s.writeString(1,l),l=a.getPath(),l.length>0&&s.writeString(2,l)},proto.base.FileDescription.prototype.getSha256=function(){return e.Message.getFieldWithDefault(this,1,"")},proto.base.FileDescription.prototype.setSha256=function(a){return e.Message.setProto3StringField(this,1,a)},proto.base.FileDescription.prototype.getPath=function(){return e.Message.getFieldWithDefault(this,2,"")},proto.base.FileDescription.prototype.setPath=function(a){return e.Message.setProto3StringField(this,2,a)},proto.base.FileDescriptions.repeatedFields_=[1],e.Message.GENERATE_TO_OBJECT&&(proto.base.FileDescriptions.prototype.toObject=function(a){return proto.base.FileDescriptions.toObject(a,this)},proto.base.FileDescriptions.toObject=function(a,s){var l={filedescriptionsList:e.Message.toObjectList(s.getFiledescriptionsList(),proto.base.FileDescription.toObject,a)};return a&&(l.$jspbMessageInstance=s),l}),proto.base.FileDescriptions.deserializeBinary=function(a){var s=new e.BinaryReader(a),l=new proto.base.FileDescriptions;return proto.base.FileDescriptions.deserializeBinaryFromReader(l,s)},proto.base.FileDescriptions.deserializeBinaryFromReader=function(a,s){for(;s.nextField()&&!s.isEndGroup();){var l=s.getFieldNumber();switch(l){case 1:var u=new proto.base.FileDescription;s.readMessage(u,proto.base.FileDescription.deserializeBinaryFromReader),a.addFiledescriptions(u);break;default:s.skipField();break}}return a},proto.base.FileDescriptions.prototype.serializeBinary=function(){var a=new e.BinaryWriter;return proto.base.FileDescriptions.serializeBinaryToWriter(this,a),a.getResultBuffer()},proto.base.FileDescriptions.serializeBinaryToWriter=function(a,s){var l=void 0;l=a.getFiledescriptionsList(),l.length>0&&s.writeRepeatedMessage(1,l,proto.base.FileDescription.serializeBinaryToWriter)},proto.base.FileDescriptions.prototype.getFiledescriptionsList=function(){return e.Message.getRepeatedWrapperField(this,proto.base.FileDescription,1)},proto.base.FileDescriptions.prototype.setFiledescriptionsList=function(a){return e.Message.setRepeatedWrapperField(this,1,a)},proto.base.FileDescriptions.prototype.addFiledescriptions=function(a,s){return e.Message.addToRepeatedWrapperField(this,1,a,proto.base.FileDescription,s)},proto.base.FileDescriptions.prototype.clearFiledescriptionsList=function(){return this.setFiledescriptionsList([])},proto.base.FileUploadRequest.oneofGroups_=[[1,2]],proto.base.FileUploadRequest.DataCase={DATA_NOT_SET:0,FILEDESCRIPTION:1,CHUNK:2},proto.base.FileUploadRequest.prototype.getDataCase=function(){return e.Message.computeOneofCase(this,proto.base.FileUploadRequest.oneofGroups_[0])},e.Message.GENERATE_TO_OBJECT&&(proto.base.FileUploadRequest.prototype.toObject=function(a){return proto.base.FileUploadRequest.toObject(a,this)},proto.base.FileUploadRequest.toObject=function(a,s){var l,u={filedescription:(l=s.getFiledescription())&&proto.base.FileDescription.toObject(a,l),chunk:s.getChunk_asB64()};return a&&(u.$jspbMessageInstance=s),u}),proto.base.FileUploadRequest.deserializeBinary=function(a){var s=new e.BinaryReader(a),l=new proto.base.FileUploadRequest;return proto.base.FileUploadRequest.deserializeBinaryFromReader(l,s)},proto.base.FileUploadRequest.deserializeBinaryFromReader=function(a,s){for(;s.nextField()&&!s.isEndGroup();){var l=s.getFieldNumber();switch(l){case 1:var u=new proto.base.FileDescription;s.readMessage(u,proto.base.FileDescription.deserializeBinaryFromReader),a.setFiledescription(u);break;case 2:var u=s.readBytes();a.setChunk(u);break;default:s.skipField();break}}return a},proto.base.FileUploadRequest.prototype.serializeBinary=function(){var a=new e.BinaryWriter;return proto.base.FileUploadRequest.serializeBinaryToWriter(this,a),a.getResultBuffer()},proto.base.FileUploadRequest.serializeBinaryToWriter=function(a,s){var l=void 0;l=a.getFiledescription(),l!=null&&s.writeMessage(1,l,proto.base.FileDescription.serializeBinaryToWriter),l=e.Message.getField(a,2),l!=null&&s.writeBytes(2,l)},proto.base.FileUploadRequest.prototype.getFiledescription=function(){return e.Message.getWrapperField(this,proto.base.FileDescription,1)},proto.base.FileUploadRequest.prototype.setFiledescription=function(a){return e.Message.setOneofWrapperField(this,1,proto.base.FileUploadRequest.oneofGroups_[0],a)},proto.base.FileUploadRequest.prototype.clearFiledescription=function(){return this.setFiledescription(void 0)},proto.base.FileUploadRequest.prototype.hasFiledescription=function(){return e.Message.getField(this,1)!=null},proto.base.FileUploadRequest.prototype.getChunk=function(){return e.Message.getFieldWithDefault(this,2,"")},proto.base.FileUploadRequest.prototype.getChunk_asB64=function(){return e.Message.bytesAsB64(this.getChunk())},proto.base.FileUploadRequest.prototype.getChunk_asU8=function(){return e.Message.bytesAsU8(this.getChunk())},proto.base.FileUploadRequest.prototype.setChunk=function(a){return e.Message.setOneofField(this,2,proto.base.FileUploadRequest.oneofGroups_[0],a)},proto.base.FileUploadRequest.prototype.clearChunk=function(){return e.Message.setOneofField(this,2,proto.base.FileUploadRequest.oneofGroups_[0],void 0)},proto.base.FileUploadRequest.prototype.hasChunk=function(){return e.Message.getField(this,2)!=null},e.Message.GENERATE_TO_OBJECT&&(proto.base.FileUploadChunkRequest.prototype.toObject=function(a){return proto.base.FileUploadChunkRequest.toObject(a,this)},proto.base.FileUploadChunkRequest.toObject=function(a,s){var l,u={filedescription:(l=s.getFiledescription())&&proto.base.FileDescription.toObject(a,l),chunks:e.Message.getFieldWithDefault(s,2,0),chunkid:e.Message.getFieldWithDefault(s,3,0),chunk:s.getChunk_asB64(),cancelupload:e.Message.getBooleanFieldWithDefault(s,5,!1),uploadtimeout:e.Message.getFieldWithDefault(s,6,0)};return a&&(u.$jspbMessageInstance=s),u}),proto.base.FileUploadChunkRequest.deserializeBinary=function(a){var s=new e.BinaryReader(a),l=new proto.base.FileUploadChunkRequest;return proto.base.FileUploadChunkRequest.deserializeBinaryFromReader(l,s)},proto.base.FileUploadChunkRequest.deserializeBinaryFromReader=function(a,s){for(;s.nextField()&&!s.isEndGroup();){var l=s.getFieldNumber();switch(l){case 1:var u=new proto.base.FileDescription;s.readMessage(u,proto.base.FileDescription.deserializeBinaryFromReader),a.setFiledescription(u);break;case 2:var u=s.readUint32();a.setChunks(u);break;case 3:var u=s.readUint32();a.setChunkid(u);break;case 4:var u=s.readBytes();a.setChunk(u);break;case 5:var u=s.readBool();a.setCancelupload(u);break;case 6:var u=s.readUint32();a.setUploadtimeout(u);break;default:s.skipField();break}}return a},proto.base.FileUploadChunkRequest.prototype.serializeBinary=function(){var a=new e.BinaryWriter;return proto.base.FileUploadChunkRequest.serializeBinaryToWriter(this,a),a.getResultBuffer()},proto.base.FileUploadChunkRequest.serializeBinaryToWriter=function(a,s){var l=void 0;l=a.getFiledescription(),l!=null&&s.writeMessage(1,l,proto.base.FileDescription.serializeBinaryToWriter),l=a.getChunks(),l!==0&&s.writeUint32(2,l),l=a.getChunkid(),l!==0&&s.writeUint32(3,l),l=a.getChunk_asU8(),l.length>0&&s.writeBytes(4,l),l=a.getCancelupload(),l&&s.writeBool(5,l),l=a.getUploadtimeout(),l!==0&&s.writeUint32(6,l)},proto.base.FileUploadChunkRequest.prototype.getFiledescription=function(){return e.Message.getWrapperField(this,proto.base.FileDescription,1)},proto.base.FileUploadChunkRequest.prototype.setFiledescription=function(a){return e.Message.setWrapperField(this,1,a)},proto.base.FileUploadChunkRequest.prototype.clearFiledescription=function(){return this.setFiledescription(void 0)},proto.base.FileUploadChunkRequest.prototype.hasFiledescription=function(){return e.Message.getField(this,1)!=null},proto.base.FileUploadChunkRequest.prototype.getChunks=function(){return e.Message.getFieldWithDefault(this,2,0)},proto.base.FileUploadChunkRequest.prototype.setChunks=function(a){return e.Message.setProto3IntField(this,2,a)},proto.base.FileUploadChunkRequest.prototype.getChunkid=function(){return e.Message.getFieldWithDefault(this,3,0)},proto.base.FileUploadChunkRequest.prototype.setChunkid=function(a){return e.Message.setProto3IntField(this,3,a)},proto.base.FileUploadChunkRequest.prototype.getChunk=function(){return e.Message.getFieldWithDefault(this,4,"")},proto.base.FileUploadChunkRequest.prototype.getChunk_asB64=function(){return e.Message.bytesAsB64(this.getChunk())},proto.base.FileUploadChunkRequest.prototype.getChunk_asU8=function(){return e.Message.bytesAsU8(this.getChunk())},proto.base.FileUploadChunkRequest.prototype.setChunk=function(a){return e.Message.setProto3BytesField(this,4,a)},proto.base.FileUploadChunkRequest.prototype.getCancelupload=function(){return e.Message.getBooleanFieldWithDefault(this,5,!1)},proto.base.FileUploadChunkRequest.prototype.setCancelupload=function(a){return e.Message.setProto3BooleanField(this,5,a)},proto.base.FileUploadChunkRequest.prototype.getUploadtimeout=function(){return e.Message.getFieldWithDefault(this,6,0)},proto.base.FileUploadChunkRequest.prototype.setUploadtimeout=function(a){return e.Message.setProto3IntField(this,6,a)},proto.base.FileUploadResponse.oneofGroups_=[[1,2,3]],proto.base.FileUploadResponse.DataCase={DATA_NOT_SET:0,FINISHED:1,CANCELLED:2,ERRORMESSAGE:3},proto.base.FileUploadResponse.prototype.getDataCase=function(){return e.Message.computeOneofCase(this,proto.base.FileUploadResponse.oneofGroups_[0])},e.Message.GENERATE_TO_OBJECT&&(proto.base.FileUploadResponse.prototype.toObject=function(a){return proto.base.FileUploadResponse.toObject(a,this)},proto.base.FileUploadResponse.toObject=function(a,s){var l={finished:e.Message.getBooleanFieldWithDefault(s,1,!1),cancelled:e.Message.getBooleanFieldWithDefault(s,2,!1),errormessage:e.Message.getFieldWithDefault(s,3,"")};return a&&(l.$jspbMessageInstance=s),l}),proto.base.FileUploadResponse.deserializeBinary=function(a){var s=new e.BinaryReader(a),l=new proto.base.FileUploadResponse;return proto.base.FileUploadResponse.deserializeBinaryFromReader(l,s)},proto.base.FileUploadResponse.deserializeBinaryFromReader=function(a,s){for(;s.nextField()&&!s.isEndGroup();){var l=s.getFieldNumber();switch(l){case 1:var u=s.readBool();a.setFinished(u);break;case 2:var u=s.readBool();a.setCancelled(u);break;case 3:var u=s.readString();a.setErrormessage(u);break;default:s.skipField();break}}return a},proto.base.FileUploadResponse.prototype.serializeBinary=function(){var a=new e.BinaryWriter;return proto.base.FileUploadResponse.serializeBinaryToWriter(this,a),a.getResultBuffer()},proto.base.FileUploadResponse.serializeBinaryToWriter=function(a,s){var l=void 0;l=e.Message.getField(a,1),l!=null&&s.writeBool(1,l),l=e.Message.getField(a,2),l!=null&&s.writeBool(2,l),l=e.Message.getField(a,3),l!=null&&s.writeString(3,l)},proto.base.FileUploadResponse.prototype.getFinished=function(){return e.Message.getBooleanFieldWithDefault(this,1,!1)},proto.base.FileUploadResponse.prototype.setFinished=function(a){return e.Message.setOneofField(this,1,proto.base.FileUploadResponse.oneofGroups_[0],a)},proto.base.FileUploadResponse.prototype.clearFinished=function(){return e.Message.setOneofField(this,1,proto.base.FileUploadResponse.oneofGroups_[0],void 0)},proto.base.FileUploadResponse.prototype.hasFinished=function(){return e.Message.getField(this,1)!=null},proto.base.FileUploadResponse.prototype.getCancelled=function(){return e.Message.getBooleanFieldWithDefault(this,2,!1)},proto.base.FileUploadResponse.prototype.setCancelled=function(a){return e.Message.setOneofField(this,2,proto.base.FileUploadResponse.oneofGroups_[0],a)},proto.base.FileUploadResponse.prototype.clearCancelled=function(){return e.Message.setOneofField(this,2,proto.base.FileUploadResponse.oneofGroups_[0],void 0)},proto.base.FileUploadResponse.prototype.hasCancelled=function(){return e.Message.getField(this,2)!=null},proto.base.FileUploadResponse.prototype.getErrormessage=function(){return e.Message.getFieldWithDefault(this,3,"")},proto.base.FileUploadResponse.prototype.setErrormessage=function(a){return e.Message.setOneofField(this,3,proto.base.FileUploadResponse.oneofGroups_[0],a)},proto.base.FileUploadResponse.prototype.clearErrormessage=function(){return e.Message.setOneofField(this,3,proto.base.FileUploadResponse.oneofGroups_[0],void 0)},proto.base.FileUploadResponse.prototype.hasErrormessage=function(){return e.Message.getField(this,3)!=null},proto.base.FileDownloadResponse.oneofGroups_=[[1,2]],proto.base.FileDownloadResponse.DataCase={DATA_NOT_SET:0,CHUNK:1,ERRORMESSAGE:2},proto.base.FileDownloadResponse.prototype.getDataCase=function(){return e.Message.computeOneofCase(this,proto.base.FileDownloadResponse.oneofGroups_[0])},e.Message.GENERATE_TO_OBJECT&&(proto.base.FileDownloadResponse.prototype.toObject=function(a){return proto.base.FileDownloadResponse.toObject(a,this)},proto.base.FileDownloadResponse.toObject=function(a,s){var l={chunk:s.getChunk_asB64(),errormessage:e.Message.getFieldWithDefault(s,2,"")};return a&&(l.$jspbMessageInstance=s),l}),proto.base.FileDownloadResponse.deserializeBinary=function(a){var s=new e.BinaryReader(a),l=new proto.base.FileDownloadResponse;return proto.base.FileDownloadResponse.deserializeBinaryFromReader(l,s)},proto.base.FileDownloadResponse.deserializeBinaryFromReader=function(a,s){for(;s.nextField()&&!s.isEndGroup();){var l=s.getFieldNumber();switch(l){case 1:var u=s.readBytes();a.setChunk(u);break;case 2:var u=s.readString();a.setErrormessage(u);break;default:s.skipField();break}}return a},proto.base.FileDownloadResponse.prototype.serializeBinary=function(){var a=new e.BinaryWriter;return proto.base.FileDownloadResponse.serializeBinaryToWriter(this,a),a.getResultBuffer()},proto.base.FileDownloadResponse.serializeBinaryToWriter=function(a,s){var l=void 0;l=e.Message.getField(a,1),l!=null&&s.writeBytes(1,l),l=e.Message.getField(a,2),l!=null&&s.writeString(2,l)},proto.base.FileDownloadResponse.prototype.getChunk=function(){return e.Message.getFieldWithDefault(this,1,"")},proto.base.FileDownloadResponse.prototype.getChunk_asB64=function(){return e.Message.bytesAsB64(this.getChunk())},proto.base.FileDownloadResponse.prototype.getChunk_asU8=function(){return e.Message.bytesAsU8(this.getChunk())},proto.base.FileDownloadResponse.prototype.setChunk=function(a){return e.Message.setOneofField(this,1,proto.base.FileDownloadResponse.oneofGroups_[0],a)},proto.base.FileDownloadResponse.prototype.clearChunk=function(){return e.Message.setOneofField(this,1,proto.base.FileDownloadResponse.oneofGroups_[0],void 0)},proto.base.FileDownloadResponse.prototype.hasChunk=function(){return e.Message.getField(this,1)!=null},proto.base.FileDownloadResponse.prototype.getErrormessage=function(){return e.Message.getFieldWithDefault(this,2,"")},proto.base.FileDownloadResponse.prototype.setErrormessage=function(a){return e.Message.setOneofField(this,2,proto.base.FileDownloadResponse.oneofGroups_[0],a)},proto.base.FileDownloadResponse.prototype.clearErrormessage=function(){return e.Message.setOneofField(this,2,proto.base.FileDownloadResponse.oneofGroups_[0],void 0)},proto.base.FileDownloadResponse.prototype.hasErrormessage=function(){return e.Message.getField(this,2)!=null},proto.base.BatchDownloadFileChunksRequest.repeatedFields_=[1],e.Message.GENERATE_TO_OBJECT&&(proto.base.BatchDownloadFileChunksRequest.prototype.toObject=function(a){return proto.base.BatchDownloadFileChunksRequest.toObject(a,this)},proto.base.BatchDownloadFileChunksRequest.toObject=function(a,s){var l={filedescriptionsList:e.Message.toObjectList(s.getFiledescriptionsList(),proto.base.FileDescription.toObject,a),timeout:e.Message.getFieldWithDefault(s,6,0)};return a&&(l.$jspbMessageInstance=s),l}),proto.base.BatchDownloadFileChunksRequest.deserializeBinary=function(a){var s=new e.BinaryReader(a),l=new proto.base.BatchDownloadFileChunksRequest;return proto.base.BatchDownloadFileChunksRequest.deserializeBinaryFromReader(l,s)},proto.base.BatchDownloadFileChunksRequest.deserializeBinaryFromReader=function(a,s){for(;s.nextField()&&!s.isEndGroup();){var l=s.getFieldNumber();switch(l){case 1:var u=new proto.base.FileDescription;s.readMessage(u,proto.base.FileDescription.deserializeBinaryFromReader),a.addFiledescriptions(u);break;case 6:var u=s.readUint32();a.setTimeout(u);break;default:s.skipField();break}}return a},proto.base.BatchDownloadFileChunksRequest.prototype.serializeBinary=function(){var a=new e.BinaryWriter;return proto.base.BatchDownloadFileChunksRequest.serializeBinaryToWriter(this,a),a.getResultBuffer()},proto.base.BatchDownloadFileChunksRequest.serializeBinaryToWriter=function(a,s){var l=void 0;l=a.getFiledescriptionsList(),l.length>0&&s.writeRepeatedMessage(1,l,proto.base.FileDescription.serializeBinaryToWriter),l=a.getTimeout(),l!==0&&s.writeUint32(6,l)},proto.base.BatchDownloadFileChunksRequest.prototype.getFiledescriptionsList=function(){return e.Message.getRepeatedWrapperField(this,proto.base.FileDescription,1)},proto.base.BatchDownloadFileChunksRequest.prototype.setFiledescriptionsList=function(a){return e.Message.setRepeatedWrapperField(this,1,a)},proto.base.BatchDownloadFileChunksRequest.prototype.addFiledescriptions=function(a,s){return e.Message.addToRepeatedWrapperField(this,1,a,proto.base.FileDescription,s)},proto.base.BatchDownloadFileChunksRequest.prototype.clearFiledescriptionsList=function(){return this.setFiledescriptionsList([])},proto.base.BatchDownloadFileChunksRequest.prototype.getTimeout=function(){return e.Message.getFieldWithDefault(this,6,0)},proto.base.BatchDownloadFileChunksRequest.prototype.setTimeout=function(a){return e.Message.setProto3IntField(this,6,a)},e.Message.GENERATE_TO_OBJECT&&(proto.base.BatchDownloadFileChunksResponse.prototype.toObject=function(a){return proto.base.BatchDownloadFileChunksResponse.toObject(a,this)},proto.base.BatchDownloadFileChunksResponse.toObject=function(a,s){var l={lastchunk:e.Message.getBooleanFieldWithDefault(s,2,!1),chunkid:e.Message.getFieldWithDefault(s,3,0),chunk:s.getChunk_asB64(),estimatedtotalsize:e.Message.getFieldWithDefault(s,5,0)};return a&&(l.$jspbMessageInstance=s),l}),proto.base.BatchDownloadFileChunksResponse.deserializeBinary=function(a){var s=new e.BinaryReader(a),l=new proto.base.BatchDownloadFileChunksResponse;return proto.base.BatchDownloadFileChunksResponse.deserializeBinaryFromReader(l,s)},proto.base.BatchDownloadFileChunksResponse.deserializeBinaryFromReader=function(a,s){for(;s.nextField()&&!s.isEndGroup();){var l=s.getFieldNumber();switch(l){case 2:var u=s.readBool();a.setLastchunk(u);break;case 3:var u=s.readUint32();a.setChunkid(u);break;case 4:var u=s.readBytes();a.setChunk(u);break;case 5:var u=s.readUint32();a.setEstimatedtotalsize(u);break;default:s.skipField();break}}return a},proto.base.BatchDownloadFileChunksResponse.prototype.serializeBinary=function(){var a=new e.BinaryWriter;return proto.base.BatchDownloadFileChunksResponse.serializeBinaryToWriter(this,a),a.getResultBuffer()},proto.base.BatchDownloadFileChunksResponse.serializeBinaryToWriter=function(a,s){var l=void 0;l=a.getLastchunk(),l&&s.writeBool(2,l),l=a.getChunkid(),l!==0&&s.writeUint32(3,l),l=a.getChunk_asU8(),l.length>0&&s.writeBytes(4,l),l=a.getEstimatedtotalsize(),l!==0&&s.writeUint32(5,l)},proto.base.BatchDownloadFileChunksResponse.prototype.getLastchunk=function(){return e.Message.getBooleanFieldWithDefault(this,2,!1)},proto.base.BatchDownloadFileChunksResponse.prototype.setLastchunk=function(a){return e.Message.setProto3BooleanField(this,2,a)},proto.base.BatchDownloadFileChunksResponse.prototype.getChunkid=function(){return e.Message.getFieldWithDefault(this,3,0)},proto.base.BatchDownloadFileChunksResponse.prototype.setChunkid=function(a){return e.Message.setProto3IntField(this,3,a)},proto.base.BatchDownloadFileChunksResponse.prototype.getChunk=function(){return e.Message.getFieldWithDefault(this,4,"")},proto.base.BatchDownloadFileChunksResponse.prototype.getChunk_asB64=function(){return e.Message.bytesAsB64(this.getChunk())},proto.base.BatchDownloadFileChunksResponse.prototype.getChunk_asU8=function(){return e.Message.bytesAsU8(this.getChunk())},proto.base.BatchDownloadFileChunksResponse.prototype.setChunk=function(a){return e.Message.setProto3BytesField(this,4,a)},proto.base.BatchDownloadFileChunksResponse.prototype.getEstimatedtotalsize=function(){return e.Message.getFieldWithDefault(this,5,0)},proto.base.BatchDownloadFileChunksResponse.prototype.setEstimatedtotalsize=function(a){return e.Message.setProto3IntField(this,5,a)},e.Message.GENERATE_TO_OBJECT&&(proto.base.LicenseInfo.prototype.toObject=function(a){return proto.base.LicenseInfo.toObject(a,this)},proto.base.LicenseInfo.toObject=function(a,s){var l={status:e.Message.getFieldWithDefault(s,1,0),json:s.getJson_asB64(),expires:e.Message.getFieldWithDefault(s,3,""),requestid:e.Message.getFieldWithDefault(s,4,""),requestmachineid:s.getRequestmachineid_asB64()};return a&&(l.$jspbMessageInstance=s),l}),proto.base.LicenseInfo.deserializeBinary=function(a){var s=new e.BinaryReader(a),l=new proto.base.LicenseInfo;return proto.base.LicenseInfo.deserializeBinaryFromReader(l,s)},proto.base.LicenseInfo.deserializeBinaryFromReader=function(a,s){for(;s.nextField()&&!s.isEndGroup();){var l=s.getFieldNumber();switch(l){case 1:var u=s.readEnum();a.setStatus(u);break;case 2:var u=s.readBytes();a.setJson(u);break;case 3:var u=s.readString();a.setExpires(u);break;case 4:var u=s.readString();a.setRequestid(u);break;case 5:var u=s.readBytes();a.setRequestmachineid(u);break;default:s.skipField();break}}return a},proto.base.LicenseInfo.prototype.serializeBinary=function(){var a=new e.BinaryWriter;return proto.base.LicenseInfo.serializeBinaryToWriter(this,a),a.getResultBuffer()},proto.base.LicenseInfo.serializeBinaryToWriter=function(a,s){var l=void 0;l=a.getStatus(),l!==0&&s.writeEnum(1,l),l=a.getJson_asU8(),l.length>0&&s.writeBytes(2,l),l=a.getExpires(),l.length>0&&s.writeString(3,l),l=a.getRequestid(),l.length>0&&s.writeString(4,l),l=a.getRequestmachineid_asU8(),l.length>0&&s.writeBytes(5,l)},proto.base.LicenseInfo.prototype.getStatus=function(){return e.Message.getFieldWithDefault(this,1,0)},proto.base.LicenseInfo.prototype.setStatus=function(a){return e.Message.setProto3EnumField(this,1,a)},proto.base.LicenseInfo.prototype.getJson=function(){return e.Message.getFieldWithDefault(this,2,"")},proto.base.LicenseInfo.prototype.getJson_asB64=function(){return e.Message.bytesAsB64(this.getJson())},proto.base.LicenseInfo.prototype.getJson_asU8=function(){return e.Message.bytesAsU8(this.getJson())},proto.base.LicenseInfo.prototype.setJson=function(a){return e.Message.setProto3BytesField(this,2,a)},proto.base.LicenseInfo.prototype.getExpires=function(){return e.Message.getFieldWithDefault(this,3,"")},proto.base.LicenseInfo.prototype.setExpires=function(a){return e.Message.setProto3StringField(this,3,a)},proto.base.LicenseInfo.prototype.getRequestid=function(){return e.Message.getFieldWithDefault(this,4,"")},proto.base.LicenseInfo.prototype.setRequestid=function(a){return e.Message.setProto3StringField(this,4,a)},proto.base.LicenseInfo.prototype.getRequestmachineid=function(){return e.Message.getFieldWithDefault(this,5,"")},proto.base.LicenseInfo.prototype.getRequestmachineid_asB64=function(){return e.Message.bytesAsB64(this.getRequestmachineid())},proto.base.LicenseInfo.prototype.getRequestmachineid_asU8=function(){return e.Message.bytesAsU8(this.getRequestmachineid())},proto.base.LicenseInfo.prototype.setRequestmachineid=function(a){return e.Message.setProto3BytesField(this,5,a)},e.Message.GENERATE_TO_OBJECT&&(proto.base.License.prototype.toObject=function(a){return proto.base.License.toObject(a,this)},proto.base.License.toObject=function(a,s){var l={data:s.getData_asB64(),termsagreement:e.Message.getBooleanFieldWithDefault(s,2,!1)};return a&&(l.$jspbMessageInstance=s),l}),proto.base.License.deserializeBinary=function(a){var s=new e.BinaryReader(a),l=new proto.base.License;return proto.base.License.deserializeBinaryFromReader(l,s)},proto.base.License.deserializeBinaryFromReader=function(a,s){for(;s.nextField()&&!s.isEndGroup();){var l=s.getFieldNumber();switch(l){case 1:var u=s.readBytes();a.setData(u);break;case 2:var u=s.readBool();a.setTermsagreement(u);break;default:s.skipField();break}}return a},proto.base.License.prototype.serializeBinary=function(){var a=new e.BinaryWriter;return proto.base.License.serializeBinaryToWriter(this,a),a.getResultBuffer()},proto.base.License.serializeBinaryToWriter=function(a,s){var l=void 0;l=a.getData_asU8(),l.length>0&&s.writeBytes(1,l),l=a.getTermsagreement(),l&&s.writeBool(2,l)},proto.base.License.prototype.getData=function(){return e.Message.getFieldWithDefault(this,1,"")},proto.base.License.prototype.getData_asB64=function(){return e.Message.bytesAsB64(this.getData())},proto.base.License.prototype.getData_asU8=function(){return e.Message.bytesAsU8(this.getData())},proto.base.License.prototype.setData=function(a){return e.Message.setProto3BytesField(this,1,a)},proto.base.License.prototype.getTermsagreement=function(){return e.Message.getBooleanFieldWithDefault(this,2,!1)},proto.base.License.prototype.setTermsagreement=function(a){return e.Message.setProto3BooleanField(this,2,a)},proto.base.PropertyValue.repeatedFields_=[2],proto.base.PropertyValue.oneofGroups_=[[3,4,5]],proto.base.PropertyValue.ValueCase={VALUE_NOT_SET:0,RAW:3,INTEGER:4,DOUBLE:5},proto.base.PropertyValue.prototype.getValueCase=function(){return e.Message.computeOneofCase(this,proto.base.PropertyValue.oneofGroups_[0])},e.Message.GENERATE_TO_OBJECT&&(proto.base.PropertyValue.prototype.toObject=function(a){return proto.base.PropertyValue.toObject(a,this)},proto.base.PropertyValue.toObject=function(a,s){var l,u={name:e.Message.getFieldWithDefault(s,1,""),scopeList:(l=e.Message.getRepeatedField(s,2))==null?void 0:l,raw:s.getRaw_asB64(),integer:e.Message.getFieldWithDefault(s,4,0),pb_double:e.Message.getFloatingPointFieldWithDefault(s,5,0)};return a&&(u.$jspbMessageInstance=s),u}),proto.base.PropertyValue.deserializeBinary=function(a){var s=new e.BinaryReader(a),l=new proto.base.PropertyValue;return proto.base.PropertyValue.deserializeBinaryFromReader(l,s)},proto.base.PropertyValue.deserializeBinaryFromReader=function(a,s){for(;s.nextField()&&!s.isEndGroup();){var l=s.getFieldNumber();switch(l){case 1:var u=s.readString();a.setName(u);break;case 2:var u=s.readString();a.addScope(u);break;case 3:var u=s.readBytes();a.setRaw(u);break;case 4:var u=s.readInt64();a.setInteger(u);break;case 5:var u=s.readDouble();a.setDouble(u);break;default:s.skipField();break}}return a},proto.base.PropertyValue.prototype.serializeBinary=function(){var a=new e.BinaryWriter;return proto.base.PropertyValue.serializeBinaryToWriter(this,a),a.getResultBuffer()},proto.base.PropertyValue.serializeBinaryToWriter=function(a,s){var l=void 0;l=a.getName(),l.length>0&&s.writeString(1,l),l=a.getScopeList(),l.length>0&&s.writeRepeatedString(2,l),l=e.Message.getField(a,3),l!=null&&s.writeBytes(3,l),l=e.Message.getField(a,4),l!=null&&s.writeInt64(4,l),l=e.Message.getField(a,5),l!=null&&s.writeDouble(5,l)},proto.base.PropertyValue.prototype.getName=function(){return e.Message.getFieldWithDefault(this,1,"")},proto.base.PropertyValue.prototype.setName=function(a){return e.Message.setProto3StringField(this,1,a)},proto.base.PropertyValue.prototype.getScopeList=function(){return e.Message.getRepeatedField(this,2)},proto.base.PropertyValue.prototype.setScopeList=function(a){return e.Message.setField(this,2,a||[])},proto.base.PropertyValue.prototype.addScope=function(a,s){return e.Message.addToRepeatedField(this,2,a,s)},proto.base.PropertyValue.prototype.clearScopeList=function(){return this.setScopeList([])},proto.base.PropertyValue.prototype.getRaw=function(){return e.Message.getFieldWithDefault(this,3,"")},proto.base.PropertyValue.prototype.getRaw_asB64=function(){return e.Message.bytesAsB64(this.getRaw())},proto.base.PropertyValue.prototype.getRaw_asU8=function(){return e.Message.bytesAsU8(this.getRaw())},proto.base.PropertyValue.prototype.setRaw=function(a){return e.Message.setOneofField(this,3,proto.base.PropertyValue.oneofGroups_[0],a)},proto.base.PropertyValue.prototype.clearRaw=function(){return e.Message.setOneofField(this,3,proto.base.PropertyValue.oneofGroups_[0],void 0)},proto.base.PropertyValue.prototype.hasRaw=function(){return e.Message.getField(this,3)!=null},proto.base.PropertyValue.prototype.getInteger=function(){return e.Message.getFieldWithDefault(this,4,0)},proto.base.PropertyValue.prototype.setInteger=function(a){return e.Message.setOneofField(this,4,proto.base.PropertyValue.oneofGroups_[0],a)},proto.base.PropertyValue.prototype.clearInteger=function(){return e.Message.setOneofField(this,4,proto.base.PropertyValue.oneofGroups_[0],void 0)},proto.base.PropertyValue.prototype.hasInteger=function(){return e.Message.getField(this,4)!=null},proto.base.PropertyValue.prototype.getDouble=function(){return e.Message.getFloatingPointFieldWithDefault(this,5,0)},proto.base.PropertyValue.prototype.setDouble=function(a){return e.Message.setOneofField(this,5,proto.base.PropertyValue.oneofGroups_[0],a)},proto.base.PropertyValue.prototype.clearDouble=function(){return e.Message.setOneofField(this,5,proto.base.PropertyValue.oneofGroups_[0],void 0)},proto.base.PropertyValue.prototype.hasDouble=function(){return e.Message.getField(this,5)!=null},proto.base.LicenseStatus={UNSET:0,VALID:1,EXPIRED:2,BADDATE:3,WRONGMACHINE:4,INCOMPLETEJSON:5,INVALIDJSON:6,BADSIGNATURE:7,MALFORMED:8,SERVERERROR:9,NOTERMSAGREEMENT:10},i.object.extend(r,proto.base)})(BW)),BW}var VW,rce;function Xze(){if(rce)return VW;rce=1;const r={};r.web=EU();var e=cb();o_();const i={};i.base=AU(),i.base.SystemServiceClient=function(p,g,v){v||(v={}),v.format="text",this.client_=new r.web.GrpcWebClientBase(v),this.hostname_=p},i.base.SystemServicePromiseClient=function(p,g,v){v||(v={}),v.format="text",this.client_=new r.web.GrpcWebClientBase(v),this.hostname_=p};const n=new r.web.MethodDescriptor("/base.SystemService/GetConfiguration",r.web.MethodType.UNARY,e.Empty,i.base.Configuration,function(p){return p.serializeBinary()},i.base.Configuration.deserializeBinary);new r.web.AbstractClientBase.MethodInfo(i.base.Configuration,function(p){return p.serializeBinary()},i.base.Configuration.deserializeBinary),i.base.SystemServiceClient.prototype.getConfiguration=function(p,g,v){return this.client_.rpcCall(this.hostname_+"/base.SystemService/GetConfiguration",p,g||{},n,v)},i.base.SystemServicePromiseClient.prototype.getConfiguration=function(p,g){return this.client_.unaryCall(this.hostname_+"/base.SystemService/GetConfiguration",p,g||{},n)};const t=new r.web.MethodDescriptor("/base.SystemService/ListSignals",r.web.MethodType.UNARY,e.NameSpace,e.Frames,function(p){return p.serializeBinary()},e.Frames.deserializeBinary);new r.web.AbstractClientBase.MethodInfo(e.Frames,function(p){return p.serializeBinary()},e.Frames.deserializeBinary),i.base.SystemServiceClient.prototype.listSignals=function(p,g,v){return this.client_.rpcCall(this.hostname_+"/base.SystemService/ListSignals",p,g||{},t,v)},i.base.SystemServicePromiseClient.prototype.listSignals=function(p,g){return this.client_.unaryCall(this.hostname_+"/base.SystemService/ListSignals",p,g||{},t)};const o=new r.web.MethodDescriptor("/base.SystemService/HealthCheck",r.web.MethodType.UNARY,e.Empty,e.Empty,function(p){return p.serializeBinary()},e.Empty.deserializeBinary);new r.web.AbstractClientBase.MethodInfo(e.Empty,function(p){return p.serializeBinary()},e.Empty.deserializeBinary),i.base.SystemServiceClient.prototype.healthCheck=function(p,g,v){return this.client_.rpcCall(this.hostname_+"/base.SystemService/HealthCheck",p,g||{},o,v)},i.base.SystemServicePromiseClient.prototype.healthCheck=function(p,g){return this.client_.unaryCall(this.hostname_+"/base.SystemService/HealthCheck",p,g||{},o)};const a=new r.web.MethodDescriptor("/base.SystemService/UploadFileChunk",r.web.MethodType.UNARY,i.base.FileUploadChunkRequest,i.base.FileUploadResponse,function(p){return p.serializeBinary()},i.base.FileUploadResponse.deserializeBinary);new r.web.AbstractClientBase.MethodInfo(i.base.FileUploadResponse,function(p){return p.serializeBinary()},i.base.FileUploadResponse.deserializeBinary),i.base.SystemServiceClient.prototype.uploadFileChunk=function(p,g,v){return this.client_.rpcCall(this.hostname_+"/base.SystemService/UploadFileChunk",p,g||{},a,v)},i.base.SystemServicePromiseClient.prototype.uploadFileChunk=function(p,g){return this.client_.unaryCall(this.hostname_+"/base.SystemService/UploadFileChunk",p,g||{},a)};const s=new r.web.MethodDescriptor("/base.SystemService/BatchDeleteFiles",r.web.MethodType.UNARY,i.base.FileDescriptions,e.Empty,function(p){return p.serializeBinary()},e.Empty.deserializeBinary);new r.web.AbstractClientBase.MethodInfo(e.Empty,function(p){return p.serializeBinary()},e.Empty.deserializeBinary),i.base.SystemServiceClient.prototype.batchDeleteFiles=function(p,g,v){return this.client_.rpcCall(this.hostname_+"/base.SystemService/BatchDeleteFiles",p,g||{},s,v)},i.base.SystemServicePromiseClient.prototype.batchDeleteFiles=function(p,g){return this.client_.unaryCall(this.hostname_+"/base.SystemService/BatchDeleteFiles",p,g||{},s)};const l=new r.web.MethodDescriptor("/base.SystemService/BatchDownloadFiles",r.web.MethodType.SERVER_STREAMING,i.base.FileDescriptions,i.base.FileDownloadResponse,function(p){return p.serializeBinary()},i.base.FileDownloadResponse.deserializeBinary);new r.web.AbstractClientBase.MethodInfo(i.base.FileDownloadResponse,function(p){return p.serializeBinary()},i.base.FileDownloadResponse.deserializeBinary),i.base.SystemServiceClient.prototype.batchDownloadFiles=function(p,g){return this.client_.serverStreaming(this.hostname_+"/base.SystemService/BatchDownloadFiles",p,g||{},l)},i.base.SystemServicePromiseClient.prototype.batchDownloadFiles=function(p,g){return this.client_.serverStreaming(this.hostname_+"/base.SystemService/BatchDownloadFiles",p,g||{},l)};const u=new r.web.MethodDescriptor("/base.SystemService/BatchDownloadFileChunks",r.web.MethodType.UNARY,i.base.BatchDownloadFileChunksRequest,i.base.BatchDownloadFileChunksResponse,function(p){return p.serializeBinary()},i.base.BatchDownloadFileChunksResponse.deserializeBinary);new r.web.AbstractClientBase.MethodInfo(i.base.BatchDownloadFileChunksResponse,function(p){return p.serializeBinary()},i.base.BatchDownloadFileChunksResponse.deserializeBinary),i.base.SystemServiceClient.prototype.batchDownloadFileChunks=function(p,g,v){return this.client_.rpcCall(this.hostname_+"/base.SystemService/BatchDownloadFileChunks",p,g||{},u,v)},i.base.SystemServicePromiseClient.prototype.batchDownloadFileChunks=function(p,g){return this.client_.unaryCall(this.hostname_+"/base.SystemService/BatchDownloadFileChunks",p,g||{},u)};const c=new r.web.MethodDescriptor("/base.SystemService/ReloadConfiguration",r.web.MethodType.UNARY,e.Empty,i.base.ReloadMessage,function(p){return p.serializeBinary()},i.base.ReloadMessage.deserializeBinary);new r.web.AbstractClientBase.MethodInfo(i.base.ReloadMessage,function(p){return p.serializeBinary()},i.base.ReloadMessage.deserializeBinary),i.base.SystemServiceClient.prototype.reloadConfiguration=function(p,g,v){return this.client_.rpcCall(this.hostname_+"/base.SystemService/ReloadConfiguration",p,g||{},c,v)},i.base.SystemServicePromiseClient.prototype.reloadConfiguration=function(p,g){return this.client_.unaryCall(this.hostname_+"/base.SystemService/ReloadConfiguration",p,g||{},c)};const d=new r.web.MethodDescriptor("/base.SystemService/GetLicenseInfo",r.web.MethodType.UNARY,e.Empty,i.base.LicenseInfo,function(p){return p.serializeBinary()},i.base.LicenseInfo.deserializeBinary);new r.web.AbstractClientBase.MethodInfo(i.base.LicenseInfo,function(p){return p.serializeBinary()},i.base.LicenseInfo.deserializeBinary),i.base.SystemServiceClient.prototype.getLicenseInfo=function(p,g,v){return this.client_.rpcCall(this.hostname_+"/base.SystemService/GetLicenseInfo",p,g||{},d,v)},i.base.SystemServicePromiseClient.prototype.getLicenseInfo=function(p,g){return this.client_.unaryCall(this.hostname_+"/base.SystemService/GetLicenseInfo",p,g||{},d)};const f=new r.web.MethodDescriptor("/base.SystemService/SetLicense",r.web.MethodType.UNARY,i.base.License,i.base.LicenseInfo,function(p){return p.serializeBinary()},i.base.LicenseInfo.deserializeBinary);new r.web.AbstractClientBase.MethodInfo(i.base.LicenseInfo,function(p){return p.serializeBinary()},i.base.LicenseInfo.deserializeBinary),i.base.SystemServiceClient.prototype.setLicense=function(p,g,v){return this.client_.rpcCall(this.hostname_+"/base.SystemService/SetLicense",p,g||{},f,v)},i.base.SystemServicePromiseClient.prototype.setLicense=function(p,g){return this.client_.unaryCall(this.hostname_+"/base.SystemService/SetLicense",p,g||{},f)};const h=new r.web.MethodDescriptor("/base.SystemService/SetProperty",r.web.MethodType.UNARY,i.base.PropertyValue,e.Empty,function(p){return p.serializeBinary()},e.Empty.deserializeBinary);return new r.web.AbstractClientBase.MethodInfo(e.Empty,function(p){return p.serializeBinary()},e.Empty.deserializeBinary),i.base.SystemServiceClient.prototype.setProperty=function(p,g,v){return this.client_.rpcCall(this.hostname_+"/base.SystemService/SetProperty",p,g||{},h,v)},i.base.SystemServicePromiseClient.prototype.setProperty=function(p,g){return this.client_.unaryCall(this.hostname_+"/base.SystemService/SetProperty",p,g||{},h)},VW=i.base,VW}var HW={},ice;function mTe(){return ice||(ice=1,(function(r){var e=n_(),i=e,n=Function("return this")(),t=cb();i.object.extend(proto,t);var o=AU();i.object.extend(proto,o);var a=o_();i.object.extend(proto,a),i.exportSymbol("proto.base.Mode",null,n),i.exportSymbol("proto.base.PlaybackConfig",null,n),i.exportSymbol("proto.base.PlaybackInfo",null,n),i.exportSymbol("proto.base.PlaybackInfos",null,n),i.exportSymbol("proto.base.PlaybackMode",null,n),i.exportSymbol("proto.base.PlaybackMode.StatusCase",null,n),proto.base.PlaybackMode=function(s){e.Message.initialize(this,s,0,-1,null,proto.base.PlaybackMode.oneofGroups_)},i.inherits(proto.base.PlaybackMode,e.Message),i.DEBUG&&!COMPILED&&(proto.base.PlaybackMode.displayName="proto.base.PlaybackMode"),proto.base.PlaybackInfos=function(s){e.Message.initialize(this,s,0,-1,proto.base.PlaybackInfos.repeatedFields_,null)},i.inherits(proto.base.PlaybackInfos,e.Message),i.DEBUG&&!COMPILED&&(proto.base.PlaybackInfos.displayName="proto.base.PlaybackInfos"),proto.base.PlaybackConfig=function(s){e.Message.initialize(this,s,0,-1,null,null)},i.inherits(proto.base.PlaybackConfig,e.Message),i.DEBUG&&!COMPILED&&(proto.base.PlaybackConfig.displayName="proto.base.PlaybackConfig"),proto.base.PlaybackInfo=function(s){e.Message.initialize(this,s,0,-1,null,null)},i.inherits(proto.base.PlaybackInfo,e.Message),i.DEBUG&&!COMPILED&&(proto.base.PlaybackInfo.displayName="proto.base.PlaybackInfo"),proto.base.PlaybackMode.oneofGroups_=[[2,3,4]],proto.base.PlaybackMode.StatusCase={STATUS_NOT_SET:0,ERRORMESSAGE:2,EOF:3,MODE:4},proto.base.PlaybackMode.prototype.getStatusCase=function(){return e.Message.computeOneofCase(this,proto.base.PlaybackMode.oneofGroups_[0])},e.Message.GENERATE_TO_OBJECT&&(proto.base.PlaybackMode.prototype.toObject=function(s){return proto.base.PlaybackMode.toObject(s,this)},proto.base.PlaybackMode.toObject=function(s,l){var u={errormessage:e.Message.getFieldWithDefault(l,2,""),eof:e.Message.getFieldWithDefault(l,3,""),mode:e.Message.getFieldWithDefault(l,4,0),offsettime:e.Message.getFieldWithDefault(l,5,0),starttime:e.Message.getFieldWithDefault(l,6,0),endtime:e.Message.getFieldWithDefault(l,7,0),timedeviation:e.Message.getFieldWithDefault(l,8,0),offsetwallclockvssample:e.Message.getFieldWithDefault(l,9,0),noplaybacktoapplication:e.Message.getBooleanFieldWithDefault(l,10,!1),playbacktobus:e.Message.getBooleanFieldWithDefault(l,11,!1)};return s&&(u.$jspbMessageInstance=l),u}),proto.base.PlaybackMode.deserializeBinary=function(s){var l=new e.BinaryReader(s),u=new proto.base.PlaybackMode;return proto.base.PlaybackMode.deserializeBinaryFromReader(u,l)},proto.base.PlaybackMode.deserializeBinaryFromReader=function(s,l){for(;l.nextField()&&!l.isEndGroup();){var u=l.getFieldNumber();switch(u){case 2:var c=l.readString();s.setErrormessage(c);break;case 3:var c=l.readString();s.setEof(c);break;case 4:var c=l.readEnum();s.setMode(c);break;case 5:var c=l.readUint64();s.setOffsettime(c);break;case 6:var c=l.readUint64();s.setStarttime(c);break;case 7:var c=l.readUint64();s.setEndtime(c);break;case 8:var c=l.readInt64();s.setTimedeviation(c);break;case 9:var c=l.readInt64();s.setOffsetwallclockvssample(c);break;case 10:var c=l.readBool();s.setNoplaybacktoapplication(c);break;case 11:var c=l.readBool();s.setPlaybacktobus(c);break;default:l.skipField();break}}return s},proto.base.PlaybackMode.prototype.serializeBinary=function(){var s=new e.BinaryWriter;return proto.base.PlaybackMode.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.base.PlaybackMode.serializeBinaryToWriter=function(s,l){var u=void 0;u=e.Message.getField(s,2),u!=null&&l.writeString(2,u),u=e.Message.getField(s,3),u!=null&&l.writeString(3,u),u=e.Message.getField(s,4),u!=null&&l.writeEnum(4,u),u=s.getOffsettime(),u!==0&&l.writeUint64(5,u),u=s.getStarttime(),u!==0&&l.writeUint64(6,u),u=s.getEndtime(),u!==0&&l.writeUint64(7,u),u=s.getTimedeviation(),u!==0&&l.writeInt64(8,u),u=s.getOffsetwallclockvssample(),u!==0&&l.writeInt64(9,u),u=s.getNoplaybacktoapplication(),u&&l.writeBool(10,u),u=s.getPlaybacktobus(),u&&l.writeBool(11,u)},proto.base.PlaybackMode.prototype.getErrormessage=function(){return e.Message.getFieldWithDefault(this,2,"")},proto.base.PlaybackMode.prototype.setErrormessage=function(s){return e.Message.setOneofField(this,2,proto.base.PlaybackMode.oneofGroups_[0],s)},proto.base.PlaybackMode.prototype.clearErrormessage=function(){return e.Message.setOneofField(this,2,proto.base.PlaybackMode.oneofGroups_[0],void 0)},proto.base.PlaybackMode.prototype.hasErrormessage=function(){return e.Message.getField(this,2)!=null},proto.base.PlaybackMode.prototype.getEof=function(){return e.Message.getFieldWithDefault(this,3,"")},proto.base.PlaybackMode.prototype.setEof=function(s){return e.Message.setOneofField(this,3,proto.base.PlaybackMode.oneofGroups_[0],s)},proto.base.PlaybackMode.prototype.clearEof=function(){return e.Message.setOneofField(this,3,proto.base.PlaybackMode.oneofGroups_[0],void 0)},proto.base.PlaybackMode.prototype.hasEof=function(){return e.Message.getField(this,3)!=null},proto.base.PlaybackMode.prototype.getMode=function(){return e.Message.getFieldWithDefault(this,4,0)},proto.base.PlaybackMode.prototype.setMode=function(s){return e.Message.setOneofField(this,4,proto.base.PlaybackMode.oneofGroups_[0],s)},proto.base.PlaybackMode.prototype.clearMode=function(){return e.Message.setOneofField(this,4,proto.base.PlaybackMode.oneofGroups_[0],void 0)},proto.base.PlaybackMode.prototype.hasMode=function(){return e.Message.getField(this,4)!=null},proto.base.PlaybackMode.prototype.getOffsettime=function(){return e.Message.getFieldWithDefault(this,5,0)},proto.base.PlaybackMode.prototype.setOffsettime=function(s){return e.Message.setProto3IntField(this,5,s)},proto.base.PlaybackMode.prototype.getStarttime=function(){return e.Message.getFieldWithDefault(this,6,0)},proto.base.PlaybackMode.prototype.setStarttime=function(s){return e.Message.setProto3IntField(this,6,s)},proto.base.PlaybackMode.prototype.getEndtime=function(){return e.Message.getFieldWithDefault(this,7,0)},proto.base.PlaybackMode.prototype.setEndtime=function(s){return e.Message.setProto3IntField(this,7,s)},proto.base.PlaybackMode.prototype.getTimedeviation=function(){return e.Message.getFieldWithDefault(this,8,0)},proto.base.PlaybackMode.prototype.setTimedeviation=function(s){return e.Message.setProto3IntField(this,8,s)},proto.base.PlaybackMode.prototype.getOffsetwallclockvssample=function(){return e.Message.getFieldWithDefault(this,9,0)},proto.base.PlaybackMode.prototype.setOffsetwallclockvssample=function(s){return e.Message.setProto3IntField(this,9,s)},proto.base.PlaybackMode.prototype.getNoplaybacktoapplication=function(){return e.Message.getBooleanFieldWithDefault(this,10,!1)},proto.base.PlaybackMode.prototype.setNoplaybacktoapplication=function(s){return e.Message.setProto3BooleanField(this,10,s)},proto.base.PlaybackMode.prototype.getPlaybacktobus=function(){return e.Message.getBooleanFieldWithDefault(this,11,!1)},proto.base.PlaybackMode.prototype.setPlaybacktobus=function(s){return e.Message.setProto3BooleanField(this,11,s)},proto.base.PlaybackInfos.repeatedFields_=[1],e.Message.GENERATE_TO_OBJECT&&(proto.base.PlaybackInfos.prototype.toObject=function(s){return proto.base.PlaybackInfos.toObject(s,this)},proto.base.PlaybackInfos.toObject=function(s,l){var u={playbackinfoList:e.Message.toObjectList(l.getPlaybackinfoList(),proto.base.PlaybackInfo.toObject,s)};return s&&(u.$jspbMessageInstance=l),u}),proto.base.PlaybackInfos.deserializeBinary=function(s){var l=new e.BinaryReader(s),u=new proto.base.PlaybackInfos;return proto.base.PlaybackInfos.deserializeBinaryFromReader(u,l)},proto.base.PlaybackInfos.deserializeBinaryFromReader=function(s,l){for(;l.nextField()&&!l.isEndGroup();){var u=l.getFieldNumber();switch(u){case 1:var c=new proto.base.PlaybackInfo;l.readMessage(c,proto.base.PlaybackInfo.deserializeBinaryFromReader),s.addPlaybackinfo(c);break;default:l.skipField();break}}return s},proto.base.PlaybackInfos.prototype.serializeBinary=function(){var s=new e.BinaryWriter;return proto.base.PlaybackInfos.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.base.PlaybackInfos.serializeBinaryToWriter=function(s,l){var u=void 0;u=s.getPlaybackinfoList(),u.length>0&&l.writeRepeatedMessage(1,u,proto.base.PlaybackInfo.serializeBinaryToWriter)},proto.base.PlaybackInfos.prototype.getPlaybackinfoList=function(){return e.Message.getRepeatedWrapperField(this,proto.base.PlaybackInfo,1)},proto.base.PlaybackInfos.prototype.setPlaybackinfoList=function(s){return e.Message.setRepeatedWrapperField(this,1,s)},proto.base.PlaybackInfos.prototype.addPlaybackinfo=function(s,l){return e.Message.addToRepeatedWrapperField(this,1,s,proto.base.PlaybackInfo,l)},proto.base.PlaybackInfos.prototype.clearPlaybackinfoList=function(){return this.setPlaybackinfoList([])},e.Message.GENERATE_TO_OBJECT&&(proto.base.PlaybackConfig.prototype.toObject=function(s){return proto.base.PlaybackConfig.toObject(s,this)},proto.base.PlaybackConfig.toObject=function(s,l){var u,c={filedescription:(u=l.getFiledescription())&&o.FileDescription.toObject(s,u),namespace:(u=l.getNamespace())&&t.NameSpace.toObject(s,u)};return s&&(c.$jspbMessageInstance=l),c}),proto.base.PlaybackConfig.deserializeBinary=function(s){var l=new e.BinaryReader(s),u=new proto.base.PlaybackConfig;return proto.base.PlaybackConfig.deserializeBinaryFromReader(u,l)},proto.base.PlaybackConfig.deserializeBinaryFromReader=function(s,l){for(;l.nextField()&&!l.isEndGroup();){var u=l.getFieldNumber();switch(u){case 1:var c=new o.FileDescription;l.readMessage(c,o.FileDescription.deserializeBinaryFromReader),s.setFiledescription(c);break;case 2:var c=new t.NameSpace;l.readMessage(c,t.NameSpace.deserializeBinaryFromReader),s.setNamespace(c);break;default:l.skipField();break}}return s},proto.base.PlaybackConfig.prototype.serializeBinary=function(){var s=new e.BinaryWriter;return proto.base.PlaybackConfig.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.base.PlaybackConfig.serializeBinaryToWriter=function(s,l){var u=void 0;u=s.getFiledescription(),u!=null&&l.writeMessage(1,u,o.FileDescription.serializeBinaryToWriter),u=s.getNamespace(),u!=null&&l.writeMessage(2,u,t.NameSpace.serializeBinaryToWriter)},proto.base.PlaybackConfig.prototype.getFiledescription=function(){return e.Message.getWrapperField(this,o.FileDescription,1)},proto.base.PlaybackConfig.prototype.setFiledescription=function(s){return e.Message.setWrapperField(this,1,s)},proto.base.PlaybackConfig.prototype.clearFiledescription=function(){return this.setFiledescription(void 0)},proto.base.PlaybackConfig.prototype.hasFiledescription=function(){return e.Message.getField(this,1)!=null},proto.base.PlaybackConfig.prototype.getNamespace=function(){return e.Message.getWrapperField(this,t.NameSpace,2)},proto.base.PlaybackConfig.prototype.setNamespace=function(s){return e.Message.setWrapperField(this,2,s)},proto.base.PlaybackConfig.prototype.clearNamespace=function(){return this.setNamespace(void 0)},proto.base.PlaybackConfig.prototype.hasNamespace=function(){return e.Message.getField(this,2)!=null},e.Message.GENERATE_TO_OBJECT&&(proto.base.PlaybackInfo.prototype.toObject=function(s){return proto.base.PlaybackInfo.toObject(s,this)},proto.base.PlaybackInfo.toObject=function(s,l){var u,c={playbackconfig:(u=l.getPlaybackconfig())&&proto.base.PlaybackConfig.toObject(s,u),playbackmode:(u=l.getPlaybackmode())&&proto.base.PlaybackMode.toObject(s,u)};return s&&(c.$jspbMessageInstance=l),c}),proto.base.PlaybackInfo.deserializeBinary=function(s){var l=new e.BinaryReader(s),u=new proto.base.PlaybackInfo;return proto.base.PlaybackInfo.deserializeBinaryFromReader(u,l)},proto.base.PlaybackInfo.deserializeBinaryFromReader=function(s,l){for(;l.nextField()&&!l.isEndGroup();){var u=l.getFieldNumber();switch(u){case 1:var c=new proto.base.PlaybackConfig;l.readMessage(c,proto.base.PlaybackConfig.deserializeBinaryFromReader),s.setPlaybackconfig(c);break;case 2:var c=new proto.base.PlaybackMode;l.readMessage(c,proto.base.PlaybackMode.deserializeBinaryFromReader),s.setPlaybackmode(c);break;default:l.skipField();break}}return s},proto.base.PlaybackInfo.prototype.serializeBinary=function(){var s=new e.BinaryWriter;return proto.base.PlaybackInfo.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.base.PlaybackInfo.serializeBinaryToWriter=function(s,l){var u=void 0;u=s.getPlaybackconfig(),u!=null&&l.writeMessage(1,u,proto.base.PlaybackConfig.serializeBinaryToWriter),u=s.getPlaybackmode(),u!=null&&l.writeMessage(2,u,proto.base.PlaybackMode.serializeBinaryToWriter)},proto.base.PlaybackInfo.prototype.getPlaybackconfig=function(){return e.Message.getWrapperField(this,proto.base.PlaybackConfig,1)},proto.base.PlaybackInfo.prototype.setPlaybackconfig=function(s){return e.Message.setWrapperField(this,1,s)},proto.base.PlaybackInfo.prototype.clearPlaybackconfig=function(){return this.setPlaybackconfig(void 0)},proto.base.PlaybackInfo.prototype.hasPlaybackconfig=function(){return e.Message.getField(this,1)!=null},proto.base.PlaybackInfo.prototype.getPlaybackmode=function(){return e.Message.getWrapperField(this,proto.base.PlaybackMode,2)},proto.base.PlaybackInfo.prototype.setPlaybackmode=function(s){return e.Message.setWrapperField(this,2,s)},proto.base.PlaybackInfo.prototype.clearPlaybackmode=function(){return this.setPlaybackmode(void 0)},proto.base.PlaybackInfo.prototype.hasPlaybackmode=function(){return e.Message.getField(this,2)!=null},proto.base.Mode={PLAY:0,PAUSE:1,STOP:2,RECORD:3,SEEK:4},i.object.extend(r,proto.base)})(HW)),HW}var UW,nce;function Kze(){if(nce)return UW;nce=1;const r={};r.web=EU();var e=cb();AU(),o_();const i={};i.base=mTe(),i.base.TrafficServiceClient=function(o,a,s){s||(s={}),s.format="text",this.client_=new r.web.GrpcWebClientBase(s),this.hostname_=o},i.base.TrafficServicePromiseClient=function(o,a,s){s||(s={}),s.format="text",this.client_=new r.web.GrpcWebClientBase(s),this.hostname_=o};const n=new r.web.MethodDescriptor("/base.TrafficService/PlayTraffic",r.web.MethodType.UNARY,i.base.PlaybackInfos,i.base.PlaybackInfos,function(o){return o.serializeBinary()},i.base.PlaybackInfos.deserializeBinary);new r.web.AbstractClientBase.MethodInfo(i.base.PlaybackInfos,function(o){return o.serializeBinary()},i.base.PlaybackInfos.deserializeBinary),i.base.TrafficServiceClient.prototype.playTraffic=function(o,a,s){return this.client_.rpcCall(this.hostname_+"/base.TrafficService/PlayTraffic",o,a||{},n,s)},i.base.TrafficServicePromiseClient.prototype.playTraffic=function(o,a){return this.client_.unaryCall(this.hostname_+"/base.TrafficService/PlayTraffic",o,a||{},n)};const t=new r.web.MethodDescriptor("/base.TrafficService/PlayTrafficStatus",r.web.MethodType.SERVER_STREAMING,e.Empty,i.base.PlaybackInfos,function(o){return o.serializeBinary()},i.base.PlaybackInfos.deserializeBinary);return new r.web.AbstractClientBase.MethodInfo(i.base.PlaybackInfos,function(o){return o.serializeBinary()},i.base.PlaybackInfos.deserializeBinary),i.base.TrafficServiceClient.prototype.playTrafficStatus=function(o,a){return this.client_.serverStreaming(this.hostname_+"/base.TrafficService/PlayTrafficStatus",o,a||{},t)},i.base.TrafficServicePromiseClient.prototype.playTrafficStatus=function(o,a){return this.client_.serverStreaming(this.hostname_+"/base.TrafficService/PlayTrafficStatus",o,a||{},t)},UW=i.base,UW}var oce;function Zze(){return oce||(oce=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.PlaybackMode=r.PlaybackInfos=r.PlaybackInfo=r.PlaybackConfig=r.Mode=r.TrafficServicePromiseClient=r.TrafficServiceClient=r.FileUploadResponse=r.FileDownloadResponse=r.FileDescriptions=r.FileDescription=r.FileUploadChunkRequest=r.ReloadMessage=r.License=r.LicenseStatus=r.LicenseInfo=r.Configuration=r.SystemServicePromiseClient=r.SystemServiceClient=r.CountByFrameId=r.FramesDistribution=r.FramesDistributionConfig=r.Signal=r.PublisherConfig=r.Signals=r.SignalIds=r.SubscriberConfig=r.NetworkServicePromiseClient=r.NetworkServiceClient=r.DiagnosticsServicePromiseClient=r.DiagnosticsServiceClient=r.NetworkInfo=r.FrameInfo=r.MetaData=r.Frames=r.NameSpace=r.SignalInfo=r.SignalId=r.ClientId=r.Empty=void 0;var e=cb();Object.defineProperty(r,"Empty",{enumerable:!0,get:function(){return e.Empty}}),Object.defineProperty(r,"ClientId",{enumerable:!0,get:function(){return e.ClientId}}),Object.defineProperty(r,"SignalId",{enumerable:!0,get:function(){return e.SignalId}}),Object.defineProperty(r,"SignalInfo",{enumerable:!0,get:function(){return e.SignalInfo}}),Object.defineProperty(r,"NameSpace",{enumerable:!0,get:function(){return e.NameSpace}}),Object.defineProperty(r,"Frames",{enumerable:!0,get:function(){return e.Frames}}),Object.defineProperty(r,"MetaData",{enumerable:!0,get:function(){return e.MetaData}}),Object.defineProperty(r,"FrameInfo",{enumerable:!0,get:function(){return e.FrameInfo}}),Object.defineProperty(r,"NetworkInfo",{enumerable:!0,get:function(){return e.NetworkInfo}});var i=$ze();Object.defineProperty(r,"DiagnosticsServiceClient",{enumerable:!0,get:function(){return i.DiagnosticsServiceClient}}),Object.defineProperty(r,"DiagnosticsServicePromiseClient",{enumerable:!0,get:function(){return i.DiagnosticsServicePromiseClient}});var n=qze();Object.defineProperty(r,"NetworkServiceClient",{enumerable:!0,get:function(){return n.NetworkServiceClient}}),Object.defineProperty(r,"NetworkServicePromiseClient",{enumerable:!0,get:function(){return n.NetworkServicePromiseClient}});var t=yTe();Object.defineProperty(r,"SubscriberConfig",{enumerable:!0,get:function(){return t.SubscriberConfig}}),Object.defineProperty(r,"SignalIds",{enumerable:!0,get:function(){return t.SignalIds}}),Object.defineProperty(r,"Signals",{enumerable:!0,get:function(){return t.Signals}}),Object.defineProperty(r,"PublisherConfig",{enumerable:!0,get:function(){return t.PublisherConfig}}),Object.defineProperty(r,"Signal",{enumerable:!0,get:function(){return t.Signal}}),Object.defineProperty(r,"FramesDistributionConfig",{enumerable:!0,get:function(){return t.FramesDistributionConfig}}),Object.defineProperty(r,"FramesDistribution",{enumerable:!0,get:function(){return t.FramesDistribution}}),Object.defineProperty(r,"CountByFrameId",{enumerable:!0,get:function(){return t.CountByFrameId}});var o=Xze();Object.defineProperty(r,"SystemServiceClient",{enumerable:!0,get:function(){return o.SystemServiceClient}}),Object.defineProperty(r,"SystemServicePromiseClient",{enumerable:!0,get:function(){return o.SystemServicePromiseClient}});var a=AU();Object.defineProperty(r,"Configuration",{enumerable:!0,get:function(){return a.Configuration}}),Object.defineProperty(r,"LicenseInfo",{enumerable:!0,get:function(){return a.LicenseInfo}}),Object.defineProperty(r,"LicenseStatus",{enumerable:!0,get:function(){return a.LicenseStatus}}),Object.defineProperty(r,"License",{enumerable:!0,get:function(){return a.License}}),Object.defineProperty(r,"ReloadMessage",{enumerable:!0,get:function(){return a.ReloadMessage}}),Object.defineProperty(r,"FileUploadChunkRequest",{enumerable:!0,get:function(){return a.FileUploadChunkRequest}}),Object.defineProperty(r,"FileDescription",{enumerable:!0,get:function(){return a.FileDescription}}),Object.defineProperty(r,"FileDescriptions",{enumerable:!0,get:function(){return a.FileDescriptions}}),Object.defineProperty(r,"FileDownloadResponse",{enumerable:!0,get:function(){return a.FileDownloadResponse}}),Object.defineProperty(r,"FileUploadResponse",{enumerable:!0,get:function(){return a.FileUploadResponse}});var s=Kze();Object.defineProperty(r,"TrafficServiceClient",{enumerable:!0,get:function(){return s.TrafficServiceClient}}),Object.defineProperty(r,"TrafficServicePromiseClient",{enumerable:!0,get:function(){return s.TrafficServicePromiseClient}});var l=mTe();Object.defineProperty(r,"Mode",{enumerable:!0,get:function(){return l.Mode}}),Object.defineProperty(r,"PlaybackConfig",{enumerable:!0,get:function(){return l.PlaybackConfig}}),Object.defineProperty(r,"PlaybackInfo",{enumerable:!0,get:function(){return l.PlaybackInfo}}),Object.defineProperty(r,"PlaybackInfos",{enumerable:!0,get:function(){return l.PlaybackInfos}}),Object.defineProperty(r,"PlaybackMode",{enumerable:!0,get:function(){return l.PlaybackMode}})})(DW)),DW}var Vc=Zze();async function bTe(r){await new Vc.SystemServicePromiseClient(r).healthCheck(new Vc.Empty,{})}const Jze=3e3,Qze=1e4;function e4e(r,e,i,n){const t=G.useRef(!1),o=G.useRef(!1);G.useEffect(()=>{if(!r||e||o.current)return;let l;const u=()=>{t.current||(t.current=!0,i(r).catch(()=>{l=setTimeout(u,Jze)}).finally(()=>{t.current=!1}))};return u(),()=>{clearTimeout(l)}},[e,i,r]),G.useEffect(()=>{if(!r||!e)return;const l=setInterval(()=>{bTe(r).catch(()=>{n()})},Qze);return()=>{clearInterval(l)}},[e,r,n]);const a=G.useCallback(async()=>{r&&(o.current=!1,await i(r))},[i,r]),s=G.useCallback(()=>{o.current=!0,n()},[n]);return{connect:a,disconnect:s}}function t4e(r){const[e,i]=G.useState(void 0),n=G.useCallback(async(l,u)=>{await bTe(l);const c=await Uze(l,u);i(c)},[]),t=G.useCallback(()=>{i(void 0)},[]),{connect:o,disconnect:a}=e4e(r.brokerUrl,e,n,t),s={connectedBroker:e,connectBroker:o,disconnectBroker:a};return R.jsx(gTe.Provider,{value:s,children:r.children})}class r4e extends Error{constructor(e,i){super(e),this.originalError=i,this.name="FailedToPlayError"}}class i4e{constructor(){this.createSession=(e,i,n=.5,t=!0)=>{let a,s=t,l=i||0,u=n,c=!1;function d(p){l=p,c=!0}function f(p){s=p}async function h(p){const g=p.playbackControls.elapsedTimeMs/1e3;if(!s){console.log("Video sync currently disabled");return}p.playbackControls.isClosed?(e.setCurrentTime(0),e.pause()):p.playbackControls.isPaused&&(e!=null&&e.paused()||e.pause());const v=g-l;if(g>l){if(v>e.duration()){e.paused()||(e.setCurrentTime(e.duration()),e.pause());return}const y=e.currentTime();if(e.paused()&&p.playbackControls.isPlaying)try{e.play()}catch(m){throw console.log(m),new r4e("Could not play video")}Math.abs(y-v)>u&&(p.playbackControls.isPlaying&&!c?(console.log(`Aligning video with stream: ${y} =>  ${v}. Allowed drift is ${u}`),e.setCurrentTime(v),e.play(),u=Math.min(.5,Math.abs(u)+.05)):p.playbackControls.isPaused&&!c&&e.setCurrentTime(v))}else l>g&&(e.paused()||e.pause(),console.log(`Video not be started until ${g-l}   secs`));return c=!1,{expectedSecsIntoVideo:v,streamAndVideoOffsetSecs:v-e.currentTime(),videoPlayerCurrentTimeSecs:e.currentTime()?e.currentTime():0,isVideoPlaying:!e.paused(),hasVideoEnded:v>e.duration(),isVideoSynced:l!==void 0,currentOffset:l,videoLengthSeconds:e.duration(),problemDescription:a,currentMaxDriftSeconds:u,recordingElapsedTime:g}}return{syncVideoWithRecording:h,enable:f,setVideoOffsetSeconds:d}}}}var k0=(r=>(r.PLAYBACK_PLAYING="PLAYBACK_PLAYING",r.PLAYBACK_PAUSED="PLAYBACK_PAUSED",r.PLAYBACK_CLOSED="PLAYBACK_CLOSED",r))(k0||{}),Ro=(r=>(r.FILE_TYPE_UNKNOWN="FILE_TYPE_UNKNOWN",r.FILE_TYPE_FOLDER="FILE_TYPE_FOLDER",r.FILE_TYPE_VIDEO="FILE_TYPE_VIDEO",r.FILE_TYPE_AUDIO="FILE_TYPE_AUDIO",r.FILE_TYPE_IMAGE="FILE_TYPE_IMAGE",r.FILE_TYPE_RECORDING="FILE_TYPE_RECORDING",r.FILE_TYPE_RECORDING_SESSION="FILE_TYPE_RECORDING_SESSION",r.FILE_TYPE_RECORDING_MAPPING="FILE_TYPE_RECORDING_MAPPING",r.FILE_TYPE_PLATFORM="FILE_TYPE_PLATFORM",r.FILE_TYPE_INSTANCE="FILE_TYPE_INSTANCE",r.FILE_TYPE_SIGNAL_DATABASE="FILE_TYPE_SIGNAL_DATABASE",r))(Ro||{});class STe{constructor(e,i){this.recordingSessionInfoCache=new Map,this.accumulatedPlaybackStatuses=new Map,this.open=async n=>{await this.filesClient.fetchSessionInfo(n),await this.playbackClient.open(n)},this.subscribeToRecordingSessionPlaybacks=async(n,t,o,a,s)=>{const l=async c=>{const d=c.items??[],f=this.processStatusUpdates(d,t);await this.fetchSessionInfoForNewPaths(f,a),this.notifyPlaybackUpdates(d,n)},u=c=>{console.log("Playback stream error, clearing accumulated state",c),o(),this.accumulatedPlaybackStatuses.clear(),this.recordingSessionInfoCache.clear()};try{await this.playbackClient.subscribeToPlaybackStatuses(l,u,s)}catch(c){a("Playback stream failed",c)}},this.stopPlaybackStatusStream=async()=>{await this.playbackClient.stopPlaybackStatusStream(),this.accumulatedPlaybackStatuses.clear(),this.recordingSessionInfoCache.clear()},this.playbackClient=e,this.filesClient=i}processStatusUpdates(e,i){const n=[];return e.forEach(t=>{t.mode===k0.PLAYBACK_CLOSED?this.handleClosedPlayback(t.path,i):this.updateAccumulatedStatus(t)&&n.push(t.path)}),n}handleClosedPlayback(e,i){console.log("Recording session closed via PLAYBACK_CLOSED event:",e),this.accumulatedPlaybackStatuses.delete(e),this.recordingSessionInfoCache.delete(e),i(e)}updateAccumulatedStatus(e){const i=!this.accumulatedPlaybackStatuses.has(e.path);return this.accumulatedPlaybackStatuses.set(e.path,e),i}async fetchSessionInfoForNewPaths(e,i){if(e.length===0)return;console.log("Fetching info for new paths:",e),(await Promise.allSettled(e.map(t=>this.filesClient.fetchSessionInfo(t)))).forEach((t,o)=>{const a=e[o];t.status==="fulfilled"?this.recordingSessionInfoCache.set(a,t.value):i(a,t.reason)})}notifyPlaybackUpdates(e,i){e.forEach(n=>{if(n.mode===k0.PLAYBACK_CLOSED)return;const t=this.createPlaybackObjectFromCache(n.path);t&&i(n.path,t)})}createPlaybackObjectFromCache(e){const i=this.accumulatedPlaybackStatuses.get(e),n=this.recordingSessionInfoCache.get(e);if(!(!i||!n))return this.createPlaybackObject(i,n)}createPlaybackObject(e,i){var a,s;if(e===void 0||i===void 0)return;const o={play:async()=>{e.elapsedTimeMs>=i.durationMs?(await this.playbackClient.seek(e.path,0),await this.playbackClient.play(e.path)):await this.playbackClient.play(e.path)},setRepeat:async(l,u,c)=>{l?u===void 0&&c===void 0?await this.playbackClient.repeatEntireRecording(e.path):await this.playbackClient.repeatWithOffset(e.path,u?u*1e3:void 0,c?c*1e3:void 0):await this.playbackClient.stopRepeat(e.path)},pause:async()=>{await this.playbackClient.pause(e.path)},restart:async()=>{await this.playbackClient.seek(e.path,0)},close:async()=>{await this.playbackClient.close(e.path)},seek:async l=>{await this.playbackClient.seek(e.path,l*1e3)},isPlaying:e.mode===k0.PLAYBACK_PLAYING,isPaused:e.mode===k0.PLAYBACK_PAUSED,isClosed:e.mode===k0.PLAYBACK_CLOSED,elapsedTimeMs:e.elapsedTimeMs,durationMs:i.durationMs,repeat:{isRepeating:!!e.repeat,startMs:(a=e.repeat)!=null&&a.startOffset?e.repeat.startOffset/1e3:void 0,endMs:(s=e.repeat)!=null&&s.endOffset?e.repeat.endOffset/1e3:void 0}};return{recordingSessionInfo:i,playbackControls:o}}}class n4e{constructor(e){this.listFiles=async(i="/",n=!1,t)=>this.filesClient.listFiles(i,n,t),this.filesClient=e}}const o4e=new i4e,IX=r=>typeof r=="number"&&!isNaN(r),_N=r=>typeof r=="string",_Te=r=>typeof r=="function",a4e=r=>G.isValidElement(r)||_N(r)||_Te(r)||IX(r);function s4e(r,e,i){i===void 0&&(i=300);const{scrollHeight:n,style:t}=r;requestAnimationFrame(()=>{t.minHeight="initial",t.height=n+"px",t.transition=`all ${i}ms`,requestAnimationFrame(()=>{t.height="0",t.padding="0",t.margin="0",setTimeout(e,i)})})}function wU(r){let{enter:e,exit:i,appendPosition:n=!1,collapse:t=!0,collapseDuration:o=300}=r;return function(a){let{children:s,position:l,preventExitTransition:u,done:c,nodeRef:d,isIn:f,playToast:h}=a;const p=n?`${e}--${l}`:e,g=n?`${i}--${l}`:i,v=G.useRef(0);return G.useLayoutEffect(()=>{const y=d.current,m=p.split(" "),b=S=>{S.target===d.current&&(h(),y.removeEventListener("animationend",b),y.removeEventListener("animationcancel",b),v.current===0&&S.type!=="animationcancel"&&y.classList.remove(...m))};y.classList.add(...m),y.addEventListener("animationend",b),y.addEventListener("animationcancel",b)},[]),G.useEffect(()=>{const y=d.current,m=()=>{y.removeEventListener("animationend",m),t?s4e(y,c,o):c()};f||(u?m():(v.current=1,y.className+=` ${g}`,y.addEventListener("animationend",m)))},[f]),An.createElement(An.Fragment,null,s)}}const Ov=new Map;let EY=[];const ace=new Set,PTe=()=>Ov.size>0;function l4e(r,e){var i;if(e)return!((i=Ov.get(e))==null||!i.isToastActive(r));let n=!1;return Ov.forEach(t=>{t.isToastActive(r)&&(n=!0)}),n}function u4e(r,e){a4e(r)&&(PTe()||EY.push({content:r,options:e}),Ov.forEach(i=>{i.buildToast(r,e)}))}function sce(r,e){Ov.forEach(i=>{e!=null&&e!=null&&e.containerId?(e==null?void 0:e.containerId)===i.id&&i.toggle(r,e==null?void 0:e.id):i.toggle(r,e==null?void 0:e.id)})}let c4e=1;const CTe=()=>""+c4e++;function d4e(r){return r&&(_N(r.toastId)||IX(r.toastId))?r.toastId:CTe()}function PN(r,e){return u4e(r,e),e.toastId}function l3(r,e){return{...e,type:e&&e.type||r,toastId:d4e(e)}}function zj(r){return(e,i)=>PN(e,l3(r,i))}function Wn(r,e){return PN(r,l3("default",e))}Wn.loading=(r,e)=>PN(r,l3("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...e})),Wn.promise=function(r,e,i){let n,{pending:t,error:o,success:a}=e;t&&(n=_N(t)?Wn.loading(t,i):Wn.loading(t.render,{...i,...t}));const s={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},l=(c,d,f)=>{if(d==null)return void Wn.dismiss(n);const h={type:c,...s,...i,data:f},p=_N(d)?{render:d}:d;return n?Wn.update(n,{...h,...p}):Wn(p.render,{...h,...p}),f},u=_Te(r)?r():r;return u.then(c=>l("success",a,c)).catch(c=>l("error",o,c)),u},Wn.success=zj("success"),Wn.info=zj("info"),Wn.error=zj("error"),Wn.warning=zj("warning"),Wn.warn=Wn.warning,Wn.dark=(r,e)=>PN(r,l3("default",{theme:"dark",...e})),Wn.dismiss=function(r){(function(e){var i;if(PTe()){if(e==null||_N(i=e)||IX(i))Ov.forEach(n=>{n.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){const n=Ov.get(e.containerId);n?n.removeToast(e.id):Ov.forEach(t=>{t.removeToast(e.id)})}}else EY=EY.filter(n=>e!=null&&n.options.toastId!==e)})(r)},Wn.clearWaitingQueue=function(r){r===void 0&&(r={}),Ov.forEach(e=>{!e.props.limit||r.containerId&&e.id!==r.containerId||e.clearQueue()})},Wn.isActive=l4e,Wn.update=function(r,e){e===void 0&&(e={});const i=((n,t)=>{var o;let{containerId:a}=t;return(o=Ov.get(a||1))==null?void 0:o.toasts.get(n)})(r,e);if(i){const{props:n,content:t}=i,o={delay:100,...n,...e,toastId:e.toastId||r,updateId:CTe()};o.toastId!==r&&(o.staleId=r);const a=o.render||t;delete o.render,PN(a,o)}},Wn.done=r=>{Wn.update(r,{progress:1})},Wn.onChange=function(r){return ace.add(r),()=>{ace.delete(r)}},Wn.play=r=>sce(!0,r),Wn.pause=r=>sce(!1,r);const OU=function(r,e){return e===void 0&&(e=!1),{enter:`Toastify--animate Toastify__${r}-enter`,exit:`Toastify--animate Toastify__${r}-exit`,appendPosition:e}};wU(OU("bounce",!0));wU(OU("slide",!0));wU(OU("zoom"));wU(OU("flip"));function wn(){return wn=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)({}).hasOwnProperty.call(i,n)&&(r[n]=i[n])}return r},wn.apply(null,arguments)}function pS(r){if(typeof r!="object"||r===null)return!1;const e=Object.getPrototypeOf(r);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in r)&&!(Symbol.iterator in r)}function TTe(r){if(G.isValidElement(r)||!pS(r))return r;const e={};return Object.keys(r).forEach(i=>{e[i]=TTe(r[i])}),e}function Vv(r,e,i={clone:!0}){const n=i.clone?wn({},r):r;return pS(r)&&pS(e)&&Object.keys(e).forEach(t=>{G.isValidElement(e[t])?n[t]=e[t]:pS(e[t])&&Object.prototype.hasOwnProperty.call(r,t)&&pS(r[t])?n[t]=Vv(r[t],e[t],i):i.clone?n[t]=pS(e[t])?TTe(e[t]):e[t]:n[t]=e[t]}),n}const f4e=Object.freeze(Object.defineProperty({__proto__:null,default:Vv,isPlainObject:pS},Symbol.toStringTag,{value:"Module"}));function tF(r){let e="https://mui.com/production-error/?code="+r;for(let i=1;i<arguments.length;i+=1)e+="&args[]="+encodeURIComponent(arguments[i]);return"Minified MUI error #"+r+"; visit "+e+" for the full message."}const h4e=Object.freeze(Object.defineProperty({__proto__:null,default:tF},Symbol.toStringTag,{value:"Module"}));var zW={exports:{}},ba={};/**
 * @license React
 * react-is.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var lce;function p4e(){if(lce)return ba;lce=1;var r=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),t=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),c=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.for("react.view_transition"),h=Symbol.for("react.client.reference");function p(g){if(typeof g=="object"&&g!==null){var v=g.$$typeof;switch(v){case r:switch(g=g.type,g){case i:case t:case n:case l:case u:case f:return g;default:switch(g=g&&g.$$typeof,g){case a:case s:case d:case c:return g;case o:return g;default:return v}}case e:return v}}}return ba.ContextConsumer=o,ba.ContextProvider=a,ba.Element=r,ba.ForwardRef=s,ba.Fragment=i,ba.Lazy=d,ba.Memo=c,ba.Portal=e,ba.Profiler=t,ba.StrictMode=n,ba.Suspense=l,ba.SuspenseList=u,ba.isContextConsumer=function(g){return p(g)===o},ba.isContextProvider=function(g){return p(g)===a},ba.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===r},ba.isForwardRef=function(g){return p(g)===s},ba.isFragment=function(g){return p(g)===i},ba.isLazy=function(g){return p(g)===d},ba.isMemo=function(g){return p(g)===c},ba.isPortal=function(g){return p(g)===e},ba.isProfiler=function(g){return p(g)===t},ba.isStrictMode=function(g){return p(g)===n},ba.isSuspense=function(g){return p(g)===l},ba.isSuspenseList=function(g){return p(g)===u},ba.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===i||g===t||g===n||g===l||g===u||typeof g=="object"&&g!==null&&(g.$$typeof===d||g.$$typeof===c||g.$$typeof===a||g.$$typeof===o||g.$$typeof===s||g.$$typeof===h||g.getModuleId!==void 0)},ba.typeOf=p,ba}var uce;function g4e(){return uce||(uce=1,zW.exports=p4e()),zW.exports}var cce=g4e();const v4e=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function xTe(r){const e=`${r}`.match(v4e);return e&&e[1]||""}function ETe(r,e=""){return r.displayName||r.name||xTe(r)||e}function dce(r,e,i){const n=ETe(e);return r.displayName||(n!==""?`${i}(${n})`:i)}function y4e(r){if(r!=null){if(typeof r=="string")return r;if(typeof r=="function")return ETe(r,"Component");if(typeof r=="object")switch(r.$$typeof){case cce.ForwardRef:return dce(r,r.render,"ForwardRef");case cce.Memo:return dce(r,r.type,"memo");default:return}}}const m4e=Object.freeze(Object.defineProperty({__proto__:null,default:y4e,getFunctionName:xTe},Symbol.toStringTag,{value:"Module"}));function O1(r){if(typeof r!="string")throw new Error(tF(7));return r.charAt(0).toUpperCase()+r.slice(1)}const b4e=Object.freeze(Object.defineProperty({__proto__:null,default:O1},Symbol.toStringTag,{value:"Module"}));function AY(r,e){const i=wn({},e);return Object.keys(r).forEach(n=>{if(n.toString().match(/^(components|slots)$/))i[n]=wn({},r[n],i[n]);else if(n.toString().match(/^(componentsProps|slotProps)$/)){const t=r[n]||{},o=e[n];i[n]={},!o||!Object.keys(o)?i[n]=t:!t||!Object.keys(t)?i[n]=o:(i[n]=wn({},o),Object.keys(t).forEach(a=>{i[n][a]=AY(t[a],o[a])}))}else i[n]===void 0&&(i[n]=r[n])}),i}function S4e(r,e,i=void 0){const n={};return Object.keys(r).forEach(t=>{n[t]=r[t].reduce((o,a)=>{if(a){const s=e(a);s!==""&&o.push(s),i&&i[a]&&o.push(i[a])}return o},[]).join(" ")}),n}const fce=r=>r,_4e=()=>{let r=fce;return{configure(e){r=e},generate(e){return r(e)},reset(){r=fce}}},P4e=_4e(),C4e={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function ATe(r,e,i="Mui"){const n=C4e[e];return n?`${i}-${n}`:`${P4e.generate(r)}-${e}`}function T4e(r,e,i="Mui"){const n={};return e.forEach(t=>{n[t]=ATe(r,t,i)}),n}function x4e(r,e=Number.MIN_SAFE_INTEGER,i=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(r,i))}const E4e=Object.freeze(Object.defineProperty({__proto__:null,default:x4e},Symbol.toStringTag,{value:"Module"}));function db(r,e){if(r==null)return{};var i={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(e.indexOf(n)!==-1)continue;i[n]=r[n]}return i}const A4e=G.createContext(void 0);function w4e(r){const{theme:e,name:i,props:n}=r;if(!e||!e.components||!e.components[i])return n;const t=e.components[i];return t.defaultProps?AY(t.defaultProps,n):!t.styleOverrides&&!t.variants?AY(t,n):n}function O4e({props:r,name:e}){const i=G.useContext(A4e);return w4e({props:r,name:e,theme:{components:i}})}function D4e(r){return O4e(r)}var Tw={},WW={exports:{}},hce;function wTe(){return hce||(hce=1,(function(r){function e(i){return i&&i.__esModule?i:{default:i}}r.exports=e,r.exports.__esModule=!0,r.exports.default=r.exports})(WW)),WW.exports}var GW={exports:{}},pce;function OTe(){return pce||(pce=1,(function(r){function e(){return r.exports=e=Object.assign?Object.assign.bind():function(i){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)({}).hasOwnProperty.call(t,o)&&(i[o]=t[o])}return i},r.exports.__esModule=!0,r.exports.default=r.exports,e.apply(null,arguments)}r.exports=e,r.exports.__esModule=!0,r.exports.default=r.exports})(GW)),GW.exports}var YW={exports:{}},gce;function R4e(){return gce||(gce=1,(function(r){function e(i,n){if(i==null)return{};var t={};for(var o in i)if({}.hasOwnProperty.call(i,o)){if(n.indexOf(o)!==-1)continue;t[o]=i[o]}return t}r.exports=e,r.exports.__esModule=!0,r.exports.default=r.exports})(YW)),YW.exports}function M4e(r){if(r.sheet)return r.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===r)return document.styleSheets[e]}function L4e(r){var e=document.createElement("style");return e.setAttribute("data-emotion",r.key),r.nonce!==void 0&&e.setAttribute("nonce",r.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var k4e=(function(){function r(i){var n=this;this._insertTag=function(t){var o;n.tags.length===0?n.insertionPoint?o=n.insertionPoint.nextSibling:n.prepend?o=n.container.firstChild:o=n.before:o=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(t,o),n.tags.push(t)},this.isSpeedy=i.speedy===void 0?!0:i.speedy,this.tags=[],this.ctr=0,this.nonce=i.nonce,this.key=i.key,this.container=i.container,this.prepend=i.prepend,this.insertionPoint=i.insertionPoint,this.before=null}var e=r.prototype;return e.hydrate=function(n){n.forEach(this._insertTag)},e.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(L4e(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var o=M4e(t);try{o.insertRule(n,o.cssRules.length)}catch{}}else t.appendChild(document.createTextNode(n));this.ctr++},e.flush=function(){this.tags.forEach(function(n){var t;return(t=n.parentNode)==null?void 0:t.removeChild(n)}),this.tags=[],this.ctr=0},r})(),jc="-ms-",u3="-moz-",Uo="-webkit-",DTe="comm",NX="rule",FX="decl",I4e="@import",RTe="@keyframes",N4e="@layer",F4e=Math.abs,DU=String.fromCharCode,j4e=Object.assign;function B4e(r,e){return uc(r,0)^45?(((e<<2^uc(r,0))<<2^uc(r,1))<<2^uc(r,2))<<2^uc(r,3):0}function MTe(r){return r.trim()}function V4e(r,e){return(r=e.exec(r))?r[0]:r}function zo(r,e,i){return r.replace(e,i)}function wY(r,e){return r.indexOf(e)}function uc(r,e){return r.charCodeAt(e)|0}function rF(r,e,i){return r.slice(e,i)}function Cv(r){return r.length}function jX(r){return r.length}function Wj(r,e){return e.push(r),r}function H4e(r,e){return r.map(e).join("")}var RU=1,eM=1,LTe=0,Mf=0,jl=0,UM="";function MU(r,e,i,n,t,o,a){return{value:r,root:e,parent:i,type:n,props:t,children:o,line:RU,column:eM,length:a,return:""}}function F2(r,e){return j4e(MU("",null,null,"",null,null,0),r,{length:-r.length},e)}function U4e(){return jl}function z4e(){return jl=Mf>0?uc(UM,--Mf):0,eM--,jl===10&&(eM=1,RU--),jl}function Eh(){return jl=Mf<LTe?uc(UM,Mf++):0,eM++,jl===10&&(eM=1,RU++),jl}function Hv(){return uc(UM,Mf)}function fV(){return Mf}function sj(r,e){return rF(UM,r,e)}function iF(r){switch(r){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function kTe(r){return RU=eM=1,LTe=Cv(UM=r),Mf=0,[]}function ITe(r){return UM="",r}function hV(r){return MTe(sj(Mf-1,OY(r===91?r+2:r===40?r+1:r)))}function W4e(r){for(;(jl=Hv())&&jl<33;)Eh();return iF(r)>2||iF(jl)>3?"":" "}function G4e(r,e){for(;--e&&Eh()&&!(jl<48||jl>102||jl>57&&jl<65||jl>70&&jl<97););return sj(r,fV()+(e<6&&Hv()==32&&Eh()==32))}function OY(r){for(;Eh();)switch(jl){case r:return Mf;case 34:case 39:r!==34&&r!==39&&OY(jl);break;case 40:r===41&&OY(r);break;case 92:Eh();break}return Mf}function Y4e(r,e){for(;Eh()&&r+jl!==57;)if(r+jl===84&&Hv()===47)break;return"/*"+sj(e,Mf-1)+"*"+DU(r===47?r:Eh())}function $4e(r){for(;!iF(Hv());)Eh();return sj(r,Mf)}function q4e(r){return ITe(pV("",null,null,null,[""],r=kTe(r),0,[0],r))}function pV(r,e,i,n,t,o,a,s,l){for(var u=0,c=0,d=a,f=0,h=0,p=0,g=1,v=1,y=1,m=0,b="",S=t,_=o,C=n,T=b;v;)switch(p=m,m=Eh()){case 40:if(p!=108&&uc(T,d-1)==58){wY(T+=zo(hV(m),"&","&\f"),"&\f")!=-1&&(y=-1);break}case 34:case 39:case 91:T+=hV(m);break;case 9:case 10:case 13:case 32:T+=W4e(p);break;case 92:T+=G4e(fV()-1,7);continue;case 47:switch(Hv()){case 42:case 47:Wj(X4e(Y4e(Eh(),fV()),e,i),l);break;default:T+="/"}break;case 123*g:s[u++]=Cv(T)*y;case 125*g:case 59:case 0:switch(m){case 0:case 125:v=0;case 59+c:y==-1&&(T=zo(T,/\f/g,"")),h>0&&Cv(T)-d&&Wj(h>32?yce(T+";",n,i,d-1):yce(zo(T," ","")+";",n,i,d-2),l);break;case 59:T+=";";default:if(Wj(C=vce(T,e,i,u,c,t,s,b,S=[],_=[],d),o),m===123)if(c===0)pV(T,e,C,C,S,o,d,s,_);else switch(f===99&&uc(T,3)===110?100:f){case 100:case 108:case 109:case 115:pV(r,C,C,n&&Wj(vce(r,C,C,0,0,t,s,b,t,S=[],d),_),t,_,d,s,n?S:_);break;default:pV(T,C,C,C,[""],_,0,s,_)}}u=c=h=0,g=y=1,b=T="",d=a;break;case 58:d=1+Cv(T),h=p;default:if(g<1){if(m==123)--g;else if(m==125&&g++==0&&z4e()==125)continue}switch(T+=DU(m),m*g){case 38:y=c>0?1:(T+="\f",-1);break;case 44:s[u++]=(Cv(T)-1)*y,y=1;break;case 64:Hv()===45&&(T+=hV(Eh())),f=Hv(),c=d=Cv(b=T+=$4e(fV())),m++;break;case 45:p===45&&Cv(T)==2&&(g=0)}}return o}function vce(r,e,i,n,t,o,a,s,l,u,c){for(var d=t-1,f=t===0?o:[""],h=jX(f),p=0,g=0,v=0;p<n;++p)for(var y=0,m=rF(r,d+1,d=F4e(g=a[p])),b=r;y<h;++y)(b=MTe(g>0?f[y]+" "+m:zo(m,/&\f/g,f[y])))&&(l[v++]=b);return MU(r,e,i,t===0?NX:s,l,u,c)}function X4e(r,e,i){return MU(r,e,i,DTe,DU(U4e()),rF(r,2,-2),0)}function yce(r,e,i,n){return MU(r,e,i,FX,rF(r,0,n),rF(r,n+1,-1),n)}function CR(r,e){for(var i="",n=jX(r),t=0;t<n;t++)i+=e(r[t],t,r,e)||"";return i}function K4e(r,e,i,n){switch(r.type){case N4e:if(r.children.length)break;case I4e:case FX:return r.return=r.return||r.value;case DTe:return"";case RTe:return r.return=r.value+"{"+CR(r.children,n)+"}";case NX:r.value=r.props.join(",")}return Cv(i=CR(r.children,n))?r.return=r.value+"{"+i+"}":""}function Z4e(r){var e=jX(r);return function(i,n,t,o){for(var a="",s=0;s<e;s++)a+=r[s](i,n,t,o)||"";return a}}function J4e(r){return function(e){e.root||(e=e.return)&&r(e)}}function NTe(r){var e=Object.create(null);return function(i){return e[i]===void 0&&(e[i]=r(i)),e[i]}}var Q4e=function(e,i,n){for(var t=0,o=0;t=o,o=Hv(),t===38&&o===12&&(i[n]=1),!iF(o);)Eh();return sj(e,Mf)},e5e=function(e,i){var n=-1,t=44;do switch(iF(t)){case 0:t===38&&Hv()===12&&(i[n]=1),e[n]+=Q4e(Mf-1,i,n);break;case 2:e[n]+=hV(t);break;case 4:if(t===44){e[++n]=Hv()===58?"&\f":"",i[n]=e[n].length;break}default:e[n]+=DU(t)}while(t=Eh());return e},t5e=function(e,i){return ITe(e5e(kTe(e),i))},mce=new WeakMap,r5e=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var i=e.value,n=e.parent,t=e.column===n.column&&e.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(e.props.length===1&&i.charCodeAt(0)!==58&&!mce.get(n))&&!t){mce.set(e,!0);for(var o=[],a=t5e(i,o),s=n.props,l=0,u=0;l<a.length;l++)for(var c=0;c<s.length;c++,u++)e.props[u]=o[l]?a[l].replace(/&\f/g,s[c]):s[c]+" "+a[l]}}},i5e=function(e){if(e.type==="decl"){var i=e.value;i.charCodeAt(0)===108&&i.charCodeAt(2)===98&&(e.return="",e.value="")}};function FTe(r,e){switch(B4e(r,e)){case 5103:return Uo+"print-"+r+r;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Uo+r+r;case 5349:case 4246:case 4810:case 6968:case 2756:return Uo+r+u3+r+jc+r+r;case 6828:case 4268:return Uo+r+jc+r+r;case 6165:return Uo+r+jc+"flex-"+r+r;case 5187:return Uo+r+zo(r,/(\w+).+(:[^]+)/,Uo+"box-$1$2"+jc+"flex-$1$2")+r;case 5443:return Uo+r+jc+"flex-item-"+zo(r,/flex-|-self/,"")+r;case 4675:return Uo+r+jc+"flex-line-pack"+zo(r,/align-content|flex-|-self/,"")+r;case 5548:return Uo+r+jc+zo(r,"shrink","negative")+r;case 5292:return Uo+r+jc+zo(r,"basis","preferred-size")+r;case 6060:return Uo+"box-"+zo(r,"-grow","")+Uo+r+jc+zo(r,"grow","positive")+r;case 4554:return Uo+zo(r,/([^-])(transform)/g,"$1"+Uo+"$2")+r;case 6187:return zo(zo(zo(r,/(zoom-|grab)/,Uo+"$1"),/(image-set)/,Uo+"$1"),r,"")+r;case 5495:case 3959:return zo(r,/(image-set\([^]*)/,Uo+"$1$`$1");case 4968:return zo(zo(r,/(.+:)(flex-)?(.*)/,Uo+"box-pack:$3"+jc+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Uo+r+r;case 4095:case 3583:case 4068:case 2532:return zo(r,/(.+)-inline(.+)/,Uo+"$1$2")+r;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Cv(r)-1-e>6)switch(uc(r,e+1)){case 109:if(uc(r,e+4)!==45)break;case 102:return zo(r,/(.+:)(.+)-([^]+)/,"$1"+Uo+"$2-$3$1"+u3+(uc(r,e+3)==108?"$3":"$2-$3"))+r;case 115:return~wY(r,"stretch")?FTe(zo(r,"stretch","fill-available"),e)+r:r}break;case 4949:if(uc(r,e+1)!==115)break;case 6444:switch(uc(r,Cv(r)-3-(~wY(r,"!important")&&10))){case 107:return zo(r,":",":"+Uo)+r;case 101:return zo(r,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Uo+(uc(r,14)===45?"inline-":"")+"box$3$1"+Uo+"$2$3$1"+jc+"$2box$3")+r}break;case 5936:switch(uc(r,e+11)){case 114:return Uo+r+jc+zo(r,/[svh]\w+-[tblr]{2}/,"tb")+r;case 108:return Uo+r+jc+zo(r,/[svh]\w+-[tblr]{2}/,"tb-rl")+r;case 45:return Uo+r+jc+zo(r,/[svh]\w+-[tblr]{2}/,"lr")+r}return Uo+r+jc+r+r}return r}var n5e=function(e,i,n,t){if(e.length>-1&&!e.return)switch(e.type){case FX:e.return=FTe(e.value,e.length);break;case RTe:return CR([F2(e,{value:zo(e.value,"@","@"+Uo)})],t);case NX:if(e.length)return H4e(e.props,function(o){switch(V4e(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return CR([F2(e,{props:[zo(o,/:(read-\w+)/,":"+u3+"$1")]})],t);case"::placeholder":return CR([F2(e,{props:[zo(o,/:(plac\w+)/,":"+Uo+"input-$1")]}),F2(e,{props:[zo(o,/:(plac\w+)/,":"+u3+"$1")]}),F2(e,{props:[zo(o,/:(plac\w+)/,jc+"input-$1")]})],t)}return""})}},o5e=[n5e],jTe=function(e){var i=e.key;if(i==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(g){var v=g.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var t=e.stylisPlugins||o5e,o={},a,s=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+i+' "]'),function(g){for(var v=g.getAttribute("data-emotion").split(" "),y=1;y<v.length;y++)o[v[y]]=!0;s.push(g)});var l,u=[r5e,i5e];{var c,d=[K4e,J4e(function(g){c.insert(g)})],f=Z4e(u.concat(t,d)),h=function(v){return CR(q4e(v),f)};l=function(v,y,m,b){c=m,h(v?v+"{"+y.styles+"}":y.styles),b&&(p.inserted[y.name]=!0)}}var p={key:i,sheet:new k4e({key:i,container:a,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:l};return p.sheet.hydrate(s),p},$W={exports:{}},Zo={};/** @license React v16.13.1
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var bce;function a5e(){if(bce)return Zo;bce=1;var r=typeof Symbol=="function"&&Symbol.for,e=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,n=r?Symbol.for("react.fragment"):60107,t=r?Symbol.for("react.strict_mode"):60108,o=r?Symbol.for("react.profiler"):60114,a=r?Symbol.for("react.provider"):60109,s=r?Symbol.for("react.context"):60110,l=r?Symbol.for("react.async_mode"):60111,u=r?Symbol.for("react.concurrent_mode"):60111,c=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.suspense"):60113,f=r?Symbol.for("react.suspense_list"):60120,h=r?Symbol.for("react.memo"):60115,p=r?Symbol.for("react.lazy"):60116,g=r?Symbol.for("react.block"):60121,v=r?Symbol.for("react.fundamental"):60117,y=r?Symbol.for("react.responder"):60118,m=r?Symbol.for("react.scope"):60119;function b(_){if(typeof _=="object"&&_!==null){var C=_.$$typeof;switch(C){case e:switch(_=_.type,_){case l:case u:case n:case o:case t:case d:return _;default:switch(_=_&&_.$$typeof,_){case s:case c:case p:case h:case a:return _;default:return C}}case i:return C}}}function S(_){return b(_)===u}return Zo.AsyncMode=l,Zo.ConcurrentMode=u,Zo.ContextConsumer=s,Zo.ContextProvider=a,Zo.Element=e,Zo.ForwardRef=c,Zo.Fragment=n,Zo.Lazy=p,Zo.Memo=h,Zo.Portal=i,Zo.Profiler=o,Zo.StrictMode=t,Zo.Suspense=d,Zo.isAsyncMode=function(_){return S(_)||b(_)===l},Zo.isConcurrentMode=S,Zo.isContextConsumer=function(_){return b(_)===s},Zo.isContextProvider=function(_){return b(_)===a},Zo.isElement=function(_){return typeof _=="object"&&_!==null&&_.$$typeof===e},Zo.isForwardRef=function(_){return b(_)===c},Zo.isFragment=function(_){return b(_)===n},Zo.isLazy=function(_){return b(_)===p},Zo.isMemo=function(_){return b(_)===h},Zo.isPortal=function(_){return b(_)===i},Zo.isProfiler=function(_){return b(_)===o},Zo.isStrictMode=function(_){return b(_)===t},Zo.isSuspense=function(_){return b(_)===d},Zo.isValidElementType=function(_){return typeof _=="string"||typeof _=="function"||_===n||_===u||_===o||_===t||_===d||_===f||typeof _=="object"&&_!==null&&(_.$$typeof===p||_.$$typeof===h||_.$$typeof===a||_.$$typeof===s||_.$$typeof===c||_.$$typeof===v||_.$$typeof===y||_.$$typeof===m||_.$$typeof===g)},Zo.typeOf=b,Zo}var Sce;function s5e(){return Sce||(Sce=1,$W.exports=a5e()),$W.exports}var qW,_ce;function l5e(){if(_ce)return qW;_ce=1;var r=s5e(),e={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},n={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},t={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};o[r.ForwardRef]=n,o[r.Memo]=t;function a(p){return r.isMemo(p)?t:o[p.$$typeof]||e}var s=Object.defineProperty,l=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols,c=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,f=Object.prototype;function h(p,g,v){if(typeof g!="string"){if(f){var y=d(g);y&&y!==f&&h(p,y,v)}var m=l(g);u&&(m=m.concat(u(g)));for(var b=a(p),S=a(g),_=0;_<m.length;++_){var C=m[_];if(!i[C]&&!(v&&v[C])&&!(S&&S[C])&&!(b&&b[C])){var T=c(g,C);try{s(p,C,T)}catch{}}}}return p}return qW=h,qW}l5e();var u5e=!0;function BTe(r,e,i){var n="";return i.split(" ").forEach(function(t){r[t]!==void 0?e.push(r[t]+";"):t&&(n+=t+" ")}),n}var BX=function(e,i,n){var t=e.key+"-"+i.name;(n===!1||u5e===!1)&&e.registered[t]===void 0&&(e.registered[t]=i.styles)},VX=function(e,i,n){BX(e,i,n);var t=e.key+"-"+i.name;if(e.inserted[i.name]===void 0){var o=i;do e.insert(i===o?"."+t:"",o,e.sheet,!0),o=o.next;while(o!==void 0)}};function c5e(r){for(var e=0,i,n=0,t=r.length;t>=4;++n,t-=4)i=r.charCodeAt(n)&255|(r.charCodeAt(++n)&255)<<8|(r.charCodeAt(++n)&255)<<16|(r.charCodeAt(++n)&255)<<24,i=(i&65535)*1540483477+((i>>>16)*59797<<16),i^=i>>>24,e=(i&65535)*1540483477+((i>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(t){case 3:e^=(r.charCodeAt(n+2)&255)<<16;case 2:e^=(r.charCodeAt(n+1)&255)<<8;case 1:e^=r.charCodeAt(n)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var d5e={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},f5e=/[A-Z]|^ms/g,h5e=/_EMO_([^_]+?)_([^]*?)_EMO_/g,VTe=function(e){return e.charCodeAt(1)===45},Pce=function(e){return e!=null&&typeof e!="boolean"},XW=NTe(function(r){return VTe(r)?r:r.replace(f5e,"-$&").toLowerCase()}),Cce=function(e,i){switch(e){case"animation":case"animationName":if(typeof i=="string")return i.replace(h5e,function(n,t,o){return Tv={name:t,styles:o,next:Tv},t})}return d5e[e]!==1&&!VTe(e)&&typeof i=="number"&&i!==0?i+"px":i};function nF(r,e,i){if(i==null)return"";var n=i;if(n.__emotion_styles!==void 0)return n;switch(typeof i){case"boolean":return"";case"object":{var t=i;if(t.anim===1)return Tv={name:t.name,styles:t.styles,next:Tv},t.name;var o=i;if(o.styles!==void 0){var a=o.next;if(a!==void 0)for(;a!==void 0;)Tv={name:a.name,styles:a.styles,next:Tv},a=a.next;var s=o.styles+";";return s}return p5e(r,e,i)}case"function":{if(r!==void 0){var l=Tv,u=i(r);return Tv=l,nF(r,e,u)}break}}var c=i;if(e==null)return c;var d=e[c];return d!==void 0?d:c}function p5e(r,e,i){var n="";if(Array.isArray(i))for(var t=0;t<i.length;t++)n+=nF(r,e,i[t])+";";else for(var o in i){var a=i[o];if(typeof a!="object"){var s=a;e!=null&&e[s]!==void 0?n+=o+"{"+e[s]+"}":Pce(s)&&(n+=XW(o)+":"+Cce(o,s)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&(e==null||e[a[0]]===void 0))for(var l=0;l<a.length;l++)Pce(a[l])&&(n+=XW(o)+":"+Cce(o,a[l])+";");else{var u=nF(r,e,a);switch(o){case"animation":case"animationName":{n+=XW(o)+":"+u+";";break}default:n+=o+"{"+u+"}"}}}return n}var Tce=/label:\s*([^\s;{]+)\s*(;|$)/g,Tv;function lj(r,e,i){if(r.length===1&&typeof r[0]=="object"&&r[0]!==null&&r[0].styles!==void 0)return r[0];var n=!0,t="";Tv=void 0;var o=r[0];if(o==null||o.raw===void 0)n=!1,t+=nF(i,e,o);else{var a=o;t+=a[0]}for(var s=1;s<r.length;s++)if(t+=nF(i,e,r[s]),n){var l=o;t+=l[s]}Tce.lastIndex=0;for(var u="",c;(c=Tce.exec(t))!==null;)u+="-"+c[1];var d=c5e(t)+u;return{name:d,styles:t,next:Tv}}var g5e=function(e){return e()},HTe=OV.useInsertionEffect?OV.useInsertionEffect:!1,UTe=HTe||g5e,xce=HTe||G.useLayoutEffect,zTe=G.createContext(typeof HTMLElement<"u"?jTe({key:"css"}):null),v5e=zTe.Provider,HX=function(e){return G.forwardRef(function(i,n){var t=G.useContext(zTe);return e(i,t,n)})},LU=G.createContext({}),UX={}.hasOwnProperty,DY="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",y5e=function(e,i){var n={};for(var t in i)UX.call(i,t)&&(n[t]=i[t]);return n[DY]=e,n},m5e=function(e){var i=e.cache,n=e.serialized,t=e.isStringTag;return BX(i,n,t),UTe(function(){return VX(i,n,t)}),null},b5e=HX(function(r,e,i){var n=r.css;typeof n=="string"&&e.registered[n]!==void 0&&(n=e.registered[n]);var t=r[DY],o=[n],a="";typeof r.className=="string"?a=BTe(e.registered,o,r.className):r.className!=null&&(a=r.className+" ");var s=lj(o,void 0,G.useContext(LU));a+=e.key+"-"+s.name;var l={};for(var u in r)UX.call(r,u)&&u!=="css"&&u!==DY&&(l[u]=r[u]);return l.className=a,i&&(l.ref=i),G.createElement(G.Fragment,null,G.createElement(m5e,{cache:e,serialized:s,isStringTag:typeof t=="string"}),G.createElement(t,l))}),S5e=b5e,Ece=function(e,i){var n=arguments;if(i==null||!UX.call(i,"css"))return G.createElement.apply(void 0,n);var t=n.length,o=new Array(t);o[0]=S5e,o[1]=y5e(e,i);for(var a=2;a<t;a++)o[a]=n[a];return G.createElement.apply(null,o)};(function(r){var e;e||(e=r.JSX||(r.JSX={}))})(Ece||(Ece={}));var _5e=HX(function(r,e){var i=r.styles,n=lj([i],void 0,G.useContext(LU)),t=G.useRef();return xce(function(){var o=e.key+"-global",a=new e.sheet.constructor({key:o,nonce:e.sheet.nonce,container:e.sheet.container,speedy:e.sheet.isSpeedy}),s=!1,l=document.querySelector('style[data-emotion="'+o+" "+n.name+'"]');return e.sheet.tags.length&&(a.before=e.sheet.tags[0]),l!==null&&(s=!0,l.setAttribute("data-emotion",o),a.hydrate([l])),t.current=[a,s],function(){a.flush()}},[e]),xce(function(){var o=t.current,a=o[0],s=o[1];if(s){o[1]=!1;return}if(n.next!==void 0&&VX(e,n.next,!0),a.tags.length){var l=a.tags[a.tags.length-1].nextElementSibling;a.before=l,a.flush()}e.insert("",n,a,!1)},[e,n.name]),null});function WTe(){for(var r=arguments.length,e=new Array(r),i=0;i<r;i++)e[i]=arguments[i];return lj(e)}function P5e(){var r=WTe.apply(void 0,arguments),e="animation-"+r.name;return{name:e,styles:"@keyframes "+e+"{"+r.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var C5e=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,T5e=NTe(function(r){return C5e.test(r)||r.charCodeAt(0)===111&&r.charCodeAt(1)===110&&r.charCodeAt(2)<91}),x5e=T5e,E5e=function(e){return e!=="theme"},Ace=function(e){return typeof e=="string"&&e.charCodeAt(0)>96?x5e:E5e},wce=function(e,i,n){var t;if(i){var o=i.shouldForwardProp;t=e.__emotion_forwardProp&&o?function(a){return e.__emotion_forwardProp(a)&&o(a)}:o}return typeof t!="function"&&n&&(t=e.__emotion_forwardProp),t},A5e=function(e){var i=e.cache,n=e.serialized,t=e.isStringTag;return BX(i,n,t),UTe(function(){return VX(i,n,t)}),null},w5e=function r(e,i){var n=e.__emotion_real===e,t=n&&e.__emotion_base||e,o,a;i!==void 0&&(o=i.label,a=i.target);var s=wce(e,i,n),l=s||Ace(t),u=!l("as");return function(){var c=arguments,d=n&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(o!==void 0&&d.push("label:"+o+";"),c[0]==null||c[0].raw===void 0)d.push.apply(d,c);else{var f=c[0];d.push(f[0]);for(var h=c.length,p=1;p<h;p++)d.push(c[p],f[p])}var g=HX(function(v,y,m){var b=u&&v.as||t,S="",_=[],C=v;if(v.theme==null){C={};for(var T in v)C[T]=v[T];C.theme=G.useContext(LU)}typeof v.className=="string"?S=BTe(y.registered,_,v.className):v.className!=null&&(S=v.className+" ");var x=lj(d.concat(_),y.registered,C);S+=y.key+"-"+x.name,a!==void 0&&(S+=" "+a);var A=u&&s===void 0?Ace(b):l,w={};for(var L in v)u&&L==="as"||A(L)&&(w[L]=v[L]);return w.className=S,m&&(w.ref=m),G.createElement(G.Fragment,null,G.createElement(A5e,{cache:y,serialized:x,isStringTag:typeof b=="string"}),G.createElement(b,w))});return g.displayName=o!==void 0?o:"Styled("+(typeof t=="string"?t:t.displayName||t.name||"Component")+")",g.defaultProps=e.defaultProps,g.__emotion_real=g,g.__emotion_base=t,g.__emotion_styles=d,g.__emotion_forwardProp=s,Object.defineProperty(g,"toString",{value:function(){return"."+a}}),g.withComponent=function(v,y){var m=r(v,wn({},i,y,{shouldForwardProp:wce(g,y,!0)}));return m.apply(void 0,d)},g}},O5e=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],RY=w5e.bind(null);O5e.forEach(function(r){RY[r]=RY(r)});function D5e(r,e){const i=jTe({key:"css",prepend:r});if(e){const n=i.insert;i.insert=(...t)=>(t[1].styles.match(/^@layer\s+[^{]*$/)||(t[1].styles=`@layer mui {${t[1].styles}}`),n(...t))}return i}const KW=new Map;function R5e(r){const{injectFirst:e,enableCssLayer:i,children:n}=r,t=G.useMemo(()=>{const o=`${e}-${i}`;if(typeof document=="object"&&KW.has(o))return KW.get(o);const a=D5e(e,i);return KW.set(o,a),a},[e,i]);return e||i?R.jsx(v5e,{value:t,children:n}):n}function M5e(r){return r==null||Object.keys(r).length===0}function L5e(r){const{styles:e,defaultTheme:i={}}=r,n=typeof e=="function"?t=>e(M5e(t)?i:t):e;return R.jsx(_5e,{styles:n})}function k5e(r,e){return RY(r,e)}const I5e=(r,e)=>{Array.isArray(r.__emotion_styles)&&(r.__emotion_styles=e(r.__emotion_styles))},Oce=[];function N5e(r){return Oce[0]=r,lj(Oce)}const F5e=Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:L5e,StyledEngineProvider:R5e,ThemeContext:LU,css:WTe,default:k5e,internal_processStyles:I5e,internal_serializeStyles:N5e,keyframes:P5e},Symbol.toStringTag,{value:"Module"})),j5e=tb(F5e),B5e=tb(f4e),V5e=tb(b4e),H5e=tb(m4e),U5e=["values","unit","step"],z5e=r=>{const e=Object.keys(r).map(i=>({key:i,val:r[i]}))||[];return e.sort((i,n)=>i.val-n.val),e.reduce((i,n)=>wn({},i,{[n.key]:n.val}),{})};function GTe(r){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:i="px",step:n=5}=r,t=db(r,U5e),o=z5e(e),a=Object.keys(o);function s(f){return`@media (min-width:${typeof e[f]=="number"?e[f]:f}${i})`}function l(f){return`@media (max-width:${(typeof e[f]=="number"?e[f]:f)-n/100}${i})`}function u(f,h){const p=a.indexOf(h);return`@media (min-width:${typeof e[f]=="number"?e[f]:f}${i}) and (max-width:${(p!==-1&&typeof e[a[p]]=="number"?e[a[p]]:h)-n/100}${i})`}function c(f){return a.indexOf(f)+1<a.length?u(f,a[a.indexOf(f)+1]):s(f)}function d(f){const h=a.indexOf(f);return h===0?s(a[1]):h===a.length-1?l(a[h]):u(f,a[a.indexOf(f)+1]).replace("@media","@media not all and")}return wn({keys:a,values:o,up:s,down:l,between:u,only:c,not:d,unit:i},t)}const W5e={borderRadius:4};function CN(r,e){return e?Vv(r,e,{clone:!1}):r}const zX={xs:0,sm:600,md:900,lg:1200,xl:1536},Dce={keys:["xs","sm","md","lg","xl"],up:r=>`@media (min-width:${zX[r]}px)`};function Z0(r,e,i){const n=r.theme||{};if(Array.isArray(e)){const o=n.breakpoints||Dce;return e.reduce((a,s,l)=>(a[o.up(o.keys[l])]=i(e[l]),a),{})}if(typeof e=="object"){const o=n.breakpoints||Dce;return Object.keys(e).reduce((a,s)=>{if(Object.keys(o.values||zX).indexOf(s)!==-1){const l=o.up(s);a[l]=i(e[s],s)}else{const l=s;a[l]=e[l]}return a},{})}return i(e)}function G5e(r={}){var e;return((e=r.keys)==null?void 0:e.reduce((n,t)=>{const o=r.up(t);return n[o]={},n},{}))||{}}function Rce(r,e){return r.reduce((i,n)=>{const t=i[n];return(!t||Object.keys(t).length===0)&&delete i[n],i},e)}function kU(r,e,i=!0){if(!e||typeof e!="string")return null;if(r&&r.vars&&i){const n=`vars.${e}`.split(".").reduce((t,o)=>t&&t[o]?t[o]:null,r);if(n!=null)return n}return e.split(".").reduce((n,t)=>n&&n[t]!=null?n[t]:null,r)}function c3(r,e,i,n=i){let t;return typeof r=="function"?t=r(i):Array.isArray(r)?t=r[i]||n:t=kU(r,i)||n,e&&(t=e(t,n,r)),t}function yl(r){const{prop:e,cssProperty:i=r.prop,themeKey:n,transform:t}=r,o=a=>{if(a[e]==null)return null;const s=a[e],l=a.theme,u=kU(l,n)||{};return Z0(a,s,d=>{let f=c3(u,t,d);return d===f&&typeof d=="string"&&(f=c3(u,t,`${e}${d==="default"?"":O1(d)}`,d)),i===!1?f:{[i]:f}})};return o.propTypes={},o.filterProps=[e],o}function Y5e(r){const e={};return i=>(e[i]===void 0&&(e[i]=r(i)),e[i])}const $5e={m:"margin",p:"padding"},q5e={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Mce={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},X5e=Y5e(r=>{if(r.length>2)if(Mce[r])r=Mce[r];else return[r];const[e,i]=r.split(""),n=$5e[e],t=q5e[i]||"";return Array.isArray(t)?t.map(o=>n+o):[n+t]}),WX=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],GX=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...WX,...GX];function uj(r,e,i,n){var t;const o=(t=kU(r,e,!1))!=null?t:i;return typeof o=="number"?a=>typeof a=="string"?a:o*a:Array.isArray(o)?a=>typeof a=="string"?a:o[a]:typeof o=="function"?o:()=>{}}function YTe(r){return uj(r,"spacing",8)}function cj(r,e){if(typeof e=="string"||e==null)return e;const i=Math.abs(e),n=r(i);return e>=0?n:typeof n=="number"?-n:`-${n}`}function K5e(r,e){return i=>r.reduce((n,t)=>(n[t]=cj(e,i),n),{})}function Z5e(r,e,i,n){if(e.indexOf(i)===-1)return null;const t=X5e(i),o=K5e(t,n),a=r[i];return Z0(r,a,o)}function $Te(r,e){const i=YTe(r.theme);return Object.keys(r).map(n=>Z5e(r,e,n,i)).reduce(CN,{})}function $s(r){return $Te(r,WX)}$s.propTypes={};$s.filterProps=WX;function qs(r){return $Te(r,GX)}qs.propTypes={};qs.filterProps=GX;function J5e(r=8){if(r.mui)return r;const e=YTe({spacing:r}),i=(...n)=>(n.length===0?[1]:n).map(o=>{const a=e(o);return typeof a=="number"?`${a}px`:a}).join(" ");return i.mui=!0,i}function IU(...r){const e=r.reduce((n,t)=>(t.filterProps.forEach(o=>{n[o]=t}),n),{}),i=n=>Object.keys(n).reduce((t,o)=>e[o]?CN(t,e[o](n)):t,{});return i.propTypes={},i.filterProps=r.reduce((n,t)=>n.concat(t.filterProps),[]),i}function gp(r){return typeof r!="number"?r:`${r}px solid`}function Dp(r,e){return yl({prop:r,themeKey:"borders",transform:e})}const Q5e=Dp("border",gp),eWe=Dp("borderTop",gp),tWe=Dp("borderRight",gp),rWe=Dp("borderBottom",gp),iWe=Dp("borderLeft",gp),nWe=Dp("borderColor"),oWe=Dp("borderTopColor"),aWe=Dp("borderRightColor"),sWe=Dp("borderBottomColor"),lWe=Dp("borderLeftColor"),uWe=Dp("outline",gp),cWe=Dp("outlineColor"),NU=r=>{if(r.borderRadius!==void 0&&r.borderRadius!==null){const e=uj(r.theme,"shape.borderRadius",4),i=n=>({borderRadius:cj(e,n)});return Z0(r,r.borderRadius,i)}return null};NU.propTypes={};NU.filterProps=["borderRadius"];IU(Q5e,eWe,tWe,rWe,iWe,nWe,oWe,aWe,sWe,lWe,NU,uWe,cWe);const FU=r=>{if(r.gap!==void 0&&r.gap!==null){const e=uj(r.theme,"spacing",8),i=n=>({gap:cj(e,n)});return Z0(r,r.gap,i)}return null};FU.propTypes={};FU.filterProps=["gap"];const jU=r=>{if(r.columnGap!==void 0&&r.columnGap!==null){const e=uj(r.theme,"spacing",8),i=n=>({columnGap:cj(e,n)});return Z0(r,r.columnGap,i)}return null};jU.propTypes={};jU.filterProps=["columnGap"];const BU=r=>{if(r.rowGap!==void 0&&r.rowGap!==null){const e=uj(r.theme,"spacing",8),i=n=>({rowGap:cj(e,n)});return Z0(r,r.rowGap,i)}return null};BU.propTypes={};BU.filterProps=["rowGap"];const dWe=yl({prop:"gridColumn"}),fWe=yl({prop:"gridRow"}),hWe=yl({prop:"gridAutoFlow"}),pWe=yl({prop:"gridAutoColumns"}),gWe=yl({prop:"gridAutoRows"}),vWe=yl({prop:"gridTemplateColumns"}),yWe=yl({prop:"gridTemplateRows"}),mWe=yl({prop:"gridTemplateAreas"}),bWe=yl({prop:"gridArea"});IU(FU,jU,BU,dWe,fWe,hWe,pWe,gWe,vWe,yWe,mWe,bWe);function TR(r,e){return e==="grey"?e:r}const SWe=yl({prop:"color",themeKey:"palette",transform:TR}),_We=yl({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:TR}),PWe=yl({prop:"backgroundColor",themeKey:"palette",transform:TR});IU(SWe,_We,PWe);function _h(r){return r<=1&&r!==0?`${r*100}%`:r}const CWe=yl({prop:"width",transform:_h}),YX=r=>{if(r.maxWidth!==void 0&&r.maxWidth!==null){const e=i=>{var n,t;const o=((n=r.theme)==null||(n=n.breakpoints)==null||(n=n.values)==null?void 0:n[i])||zX[i];return o?((t=r.theme)==null||(t=t.breakpoints)==null?void 0:t.unit)!=="px"?{maxWidth:`${o}${r.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:_h(i)}};return Z0(r,r.maxWidth,e)}return null};YX.filterProps=["maxWidth"];const TWe=yl({prop:"minWidth",transform:_h}),xWe=yl({prop:"height",transform:_h}),EWe=yl({prop:"maxHeight",transform:_h}),AWe=yl({prop:"minHeight",transform:_h});yl({prop:"size",cssProperty:"width",transform:_h});yl({prop:"size",cssProperty:"height",transform:_h});const wWe=yl({prop:"boxSizing"});IU(CWe,YX,TWe,xWe,EWe,AWe,wWe);const dj={border:{themeKey:"borders",transform:gp},borderTop:{themeKey:"borders",transform:gp},borderRight:{themeKey:"borders",transform:gp},borderBottom:{themeKey:"borders",transform:gp},borderLeft:{themeKey:"borders",transform:gp},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:gp},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:NU},color:{themeKey:"palette",transform:TR},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:TR},backgroundColor:{themeKey:"palette",transform:TR},p:{style:qs},pt:{style:qs},pr:{style:qs},pb:{style:qs},pl:{style:qs},px:{style:qs},py:{style:qs},padding:{style:qs},paddingTop:{style:qs},paddingRight:{style:qs},paddingBottom:{style:qs},paddingLeft:{style:qs},paddingX:{style:qs},paddingY:{style:qs},paddingInline:{style:qs},paddingInlineStart:{style:qs},paddingInlineEnd:{style:qs},paddingBlock:{style:qs},paddingBlockStart:{style:qs},paddingBlockEnd:{style:qs},m:{style:$s},mt:{style:$s},mr:{style:$s},mb:{style:$s},ml:{style:$s},mx:{style:$s},my:{style:$s},margin:{style:$s},marginTop:{style:$s},marginRight:{style:$s},marginBottom:{style:$s},marginLeft:{style:$s},marginX:{style:$s},marginY:{style:$s},marginInline:{style:$s},marginInlineStart:{style:$s},marginInlineEnd:{style:$s},marginBlock:{style:$s},marginBlockStart:{style:$s},marginBlockEnd:{style:$s},displayPrint:{cssProperty:!1,transform:r=>({"@media print":{display:r}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:FU},rowGap:{style:BU},columnGap:{style:jU},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:_h},maxWidth:{style:YX},minWidth:{transform:_h},height:{transform:_h},maxHeight:{transform:_h},minHeight:{transform:_h},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function OWe(...r){const e=r.reduce((n,t)=>n.concat(Object.keys(t)),[]),i=new Set(e);return r.every(n=>i.size===Object.keys(n).length)}function DWe(r,e){return typeof r=="function"?r(e):r}function qTe(){function r(i,n,t,o){const a={[i]:n,theme:t},s=o[i];if(!s)return{[i]:n};const{cssProperty:l=i,themeKey:u,transform:c,style:d}=s;if(n==null)return null;if(u==="typography"&&n==="inherit")return{[i]:n};const f=kU(t,u)||{};return d?d(a):Z0(a,n,p=>{let g=c3(f,c,p);return p===g&&typeof p=="string"&&(g=c3(f,c,`${i}${p==="default"?"":O1(p)}`,p)),l===!1?g:{[l]:g}})}function e(i){var n;const{sx:t,theme:o={},nested:a}=i||{};if(!t)return null;const s=(n=o.unstable_sxConfig)!=null?n:dj;function l(u){let c=u;if(typeof u=="function")c=u(o);else if(typeof u!="object")return u;if(!c)return null;const d=G5e(o.breakpoints),f=Object.keys(d);let h=d;return Object.keys(c).forEach(p=>{const g=DWe(c[p],o);if(g!=null)if(typeof g=="object")if(s[p])h=CN(h,r(p,g,o,s));else{const v=Z0({theme:o},g,y=>({[p]:y}));OWe(v,g)?h[p]=e({sx:g,theme:o,nested:!0}):h=CN(h,v)}else h=CN(h,r(p,g,o,s))}),!a&&o.modularCssLayers?{"@layer sx":Rce(f,h)}:Rce(f,h)}return Array.isArray(t)?t.map(l):l(t)}return e}const VU=qTe();VU.filterProps=["sx"];function XTe(r,e){const i=this;return i.vars&&typeof i.getColorSchemeSelector=="function"?{[i.getColorSchemeSelector(r).replace(/(\[[^\]]+\])/,"*:where($1)")]:e}:i.palette.mode===r?e:{}}const RWe=["breakpoints","palette","spacing","shape"];function KTe(r={},...e){const{breakpoints:i={},palette:n={},spacing:t,shape:o={}}=r,a=db(r,RWe),s=GTe(i),l=J5e(t);let u=Vv({breakpoints:s,direction:"ltr",components:{},palette:wn({mode:"light"},n),spacing:l,shape:wn({},W5e,o)},a);return u.applyStyles=XTe,u=e.reduce((c,d)=>Vv(c,d),u),u.unstable_sxConfig=wn({},dj,a==null?void 0:a.unstable_sxConfig),u.unstable_sx=function(d){return VU({sx:d,theme:this})},u}const MWe=Object.freeze(Object.defineProperty({__proto__:null,default:KTe,private_createBreakpoints:GTe,unstable_applyStyles:XTe},Symbol.toStringTag,{value:"Module"})),LWe=tb(MWe),kWe=["sx"],IWe=r=>{var e,i;const n={systemProps:{},otherProps:{}},t=(e=r==null||(i=r.theme)==null?void 0:i.unstable_sxConfig)!=null?e:dj;return Object.keys(r).forEach(o=>{t[o]?n.systemProps[o]=r[o]:n.otherProps[o]=r[o]}),n};function NWe(r){const{sx:e}=r,i=db(r,kWe),{systemProps:n,otherProps:t}=IWe(i);let o;return Array.isArray(e)?o=[n,...e]:typeof e=="function"?o=(...a)=>{const s=e(...a);return pS(s)?wn({},n,s):n}:o=wn({},n,e),wn({},t,{sx:o})}const FWe=Object.freeze(Object.defineProperty({__proto__:null,default:VU,extendSxProp:NWe,unstable_createStyleFunctionSx:qTe,unstable_defaultSxConfig:dj},Symbol.toStringTag,{value:"Module"})),jWe=tb(FWe);var Lce;function BWe(){if(Lce)return Tw;Lce=1;var r=wTe();Object.defineProperty(Tw,"__esModule",{value:!0}),Tw.default=_,Tw.shouldForwardProp=p,Tw.systemDefaultTheme=void 0;var e=r(OTe()),i=r(R4e()),n=d(j5e),t=B5e;r(V5e),r(H5e);var o=r(LWe),a=r(jWe);const s=["ownerState"],l=["variants"],u=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function c(C){if(typeof WeakMap!="function")return null;var T=new WeakMap,x=new WeakMap;return(c=function(A){return A?x:T})(C)}function d(C,T){if(C&&C.__esModule)return C;if(C===null||typeof C!="object"&&typeof C!="function")return{default:C};var x=c(T);if(x&&x.has(C))return x.get(C);var A={__proto__:null},w=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var L in C)if(L!=="default"&&Object.prototype.hasOwnProperty.call(C,L)){var k=w?Object.getOwnPropertyDescriptor(C,L):null;k&&(k.get||k.set)?Object.defineProperty(A,L,k):A[L]=C[L]}return A.default=C,x&&x.set(C,A),A}function f(C){return Object.keys(C).length===0}function h(C){return typeof C=="string"&&C.charCodeAt(0)>96}function p(C){return C!=="ownerState"&&C!=="theme"&&C!=="sx"&&C!=="as"}function g(C,T){return T&&C&&typeof C=="object"&&C.styles&&!C.styles.startsWith("@layer")&&(C.styles=`@layer ${T}{${String(C.styles)}}`),C}const v=Tw.systemDefaultTheme=(0,o.default)(),y=C=>C&&C.charAt(0).toLowerCase()+C.slice(1);function m({defaultTheme:C,theme:T,themeId:x}){return f(T)?C:T[x]||T}function b(C){return C?(T,x)=>x[C]:null}function S(C,T,x){let{ownerState:A}=T,w=(0,i.default)(T,s);const L=typeof C=="function"?C((0,e.default)({ownerState:A},w)):C;if(Array.isArray(L))return L.flatMap(k=>S(k,(0,e.default)({ownerState:A},w),x));if(L&&typeof L=="object"&&Array.isArray(L.variants)){const{variants:k=[]}=L;let j=(0,i.default)(L,l);return k.forEach(N=>{let V=!0;if(typeof N.props=="function"?V=N.props((0,e.default)({ownerState:A},w,A)):Object.keys(N.props).forEach(W=>{(A==null?void 0:A[W])!==N.props[W]&&w[W]!==N.props[W]&&(V=!1)}),V){Array.isArray(j)||(j=[j]);const W=typeof N.style=="function"?N.style((0,e.default)({ownerState:A},w,A)):N.style;j.push(x?g((0,n.internal_serializeStyles)(W),x):W)}}),j}return x?g((0,n.internal_serializeStyles)(L),x):L}function _(C={}){const{themeId:T,defaultTheme:x=v,rootShouldForwardProp:A=p,slotShouldForwardProp:w=p}=C,L=k=>(0,a.default)((0,e.default)({},k,{theme:m((0,e.default)({},k,{defaultTheme:x,themeId:T}))}));return L.__mui_systemSx=!0,(k,D={})=>{(0,n.internal_processStyles)(k,_e=>_e.filter(Te=>!(Te!=null&&Te.__mui_systemSx)));const{name:j,slot:N,skipVariantsResolver:V,skipSx:W,overridesResolver:K=b(y(N))}=D,H=(0,i.default)(D,u),U=j&&j.startsWith("Mui")||N?"components":"custom",I=V!==void 0?V:N&&N!=="Root"&&N!=="root"||!1,Q=W||!1;let Z,ee=p;N==="Root"||N==="root"?ee=A:N?ee=w:h(k)&&(ee=void 0);const ie=(0,n.default)(k,(0,e.default)({shouldForwardProp:ee,label:Z},H)),de=_e=>typeof _e=="function"&&_e.__emotion_real!==_e||(0,t.isPlainObject)(_e)?Te=>{const De=m({theme:Te.theme,defaultTheme:x,themeId:T});return S(_e,(0,e.default)({},Te,{theme:De}),De.modularCssLayers?U:void 0)}:_e,pe=(_e,...Te)=>{let De=de(_e);const Pe=Te?Te.map(de):[];j&&K&&Pe.push(je=>{const Ke=m((0,e.default)({},je,{defaultTheme:x,themeId:T}));if(!Ke.components||!Ke.components[j]||!Ke.components[j].styleOverrides)return null;const ot=Ke.components[j].styleOverrides,We={};return Object.entries(ot).forEach(([xe,ve])=>{We[xe]=S(ve,(0,e.default)({},je,{theme:Ke}),Ke.modularCssLayers?"theme":void 0)}),K(je,We)}),j&&!I&&Pe.push(je=>{var Ke;const ot=m((0,e.default)({},je,{defaultTheme:x,themeId:T})),We=ot==null||(Ke=ot.components)==null||(Ke=Ke[j])==null?void 0:Ke.variants;return S({variants:We},(0,e.default)({},je,{theme:ot}),ot.modularCssLayers?"theme":void 0)}),Q||Pe.push(L);const Ee=Pe.length-Te.length;if(Array.isArray(_e)&&Ee>0){const je=new Array(Ee).fill("");De=[..._e,...je],De.raw=[..._e.raw,...je]}const Re=ie(De,...Pe);return k.muiName&&(Re.muiName=k.muiName),Re};return ie.withConfig&&(pe.withConfig=ie.withConfig),pe}}return Tw}var VWe=BWe();const HWe=Lu(VWe);function UWe(r,e){return wn({toolbar:{minHeight:56,[r.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[r.up("sm")]:{minHeight:64}}},e)}var Es={};const zWe=tb(h4e),WWe=tb(E4e);var kce;function GWe(){if(kce)return Es;kce=1;var r=wTe();Object.defineProperty(Es,"__esModule",{value:!0}),Es.alpha=p,Es.blend=C,Es.colorChannel=void 0,Es.darken=v,Es.decomposeColor=a,Es.emphasize=S,Es.getContrastRatio=h,Es.getLuminance=f,Es.hexToRgb=t,Es.hslToRgb=d,Es.lighten=m,Es.private_safeAlpha=g,Es.private_safeColorChannel=void 0,Es.private_safeDarken=y,Es.private_safeEmphasize=_,Es.private_safeLighten=b,Es.recomposeColor=u,Es.rgbToHex=c;var e=r(zWe),i=r(WWe);function n(T,x=0,A=1){return(0,i.default)(T,x,A)}function t(T){T=T.slice(1);const x=new RegExp(`.{1,${T.length>=6?2:1}}`,"g");let A=T.match(x);return A&&A[0].length===1&&(A=A.map(w=>w+w)),A?`rgb${A.length===4?"a":""}(${A.map((w,L)=>L<3?parseInt(w,16):Math.round(parseInt(w,16)/255*1e3)/1e3).join(", ")})`:""}function o(T){const x=T.toString(16);return x.length===1?`0${x}`:x}function a(T){if(T.type)return T;if(T.charAt(0)==="#")return a(t(T));const x=T.indexOf("("),A=T.substring(0,x);if(["rgb","rgba","hsl","hsla","color"].indexOf(A)===-1)throw new Error((0,e.default)(9,T));let w=T.substring(x+1,T.length-1),L;if(A==="color"){if(w=w.split(" "),L=w.shift(),w.length===4&&w[3].charAt(0)==="/"&&(w[3]=w[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(L)===-1)throw new Error((0,e.default)(10,L))}else w=w.split(",");return w=w.map(k=>parseFloat(k)),{type:A,values:w,colorSpace:L}}const s=T=>{const x=a(T);return x.values.slice(0,3).map((A,w)=>x.type.indexOf("hsl")!==-1&&w!==0?`${A}%`:A).join(" ")};Es.colorChannel=s;const l=(T,x)=>{try{return s(T)}catch{return T}};Es.private_safeColorChannel=l;function u(T){const{type:x,colorSpace:A}=T;let{values:w}=T;return x.indexOf("rgb")!==-1?w=w.map((L,k)=>k<3?parseInt(L,10):L):x.indexOf("hsl")!==-1&&(w[1]=`${w[1]}%`,w[2]=`${w[2]}%`),x.indexOf("color")!==-1?w=`${A} ${w.join(" ")}`:w=`${w.join(", ")}`,`${x}(${w})`}function c(T){if(T.indexOf("#")===0)return T;const{values:x}=a(T);return`#${x.map((A,w)=>o(w===3?Math.round(255*A):A)).join("")}`}function d(T){T=a(T);const{values:x}=T,A=x[0],w=x[1]/100,L=x[2]/100,k=w*Math.min(L,1-L),D=(V,W=(V+A/30)%12)=>L-k*Math.max(Math.min(W-3,9-W,1),-1);let j="rgb";const N=[Math.round(D(0)*255),Math.round(D(8)*255),Math.round(D(4)*255)];return T.type==="hsla"&&(j+="a",N.push(x[3])),u({type:j,values:N})}function f(T){T=a(T);let x=T.type==="hsl"||T.type==="hsla"?a(d(T)).values:T.values;return x=x.map(A=>(T.type!=="color"&&(A/=255),A<=.03928?A/12.92:((A+.055)/1.055)**2.4)),Number((.2126*x[0]+.7152*x[1]+.0722*x[2]).toFixed(3))}function h(T,x){const A=f(T),w=f(x);return(Math.max(A,w)+.05)/(Math.min(A,w)+.05)}function p(T,x){return T=a(T),x=n(x),(T.type==="rgb"||T.type==="hsl")&&(T.type+="a"),T.type==="color"?T.values[3]=`/${x}`:T.values[3]=x,u(T)}function g(T,x,A){try{return p(T,x)}catch{return T}}function v(T,x){if(T=a(T),x=n(x),T.type.indexOf("hsl")!==-1)T.values[2]*=1-x;else if(T.type.indexOf("rgb")!==-1||T.type.indexOf("color")!==-1)for(let A=0;A<3;A+=1)T.values[A]*=1-x;return u(T)}function y(T,x,A){try{return v(T,x)}catch{return T}}function m(T,x){if(T=a(T),x=n(x),T.type.indexOf("hsl")!==-1)T.values[2]+=(100-T.values[2])*x;else if(T.type.indexOf("rgb")!==-1)for(let A=0;A<3;A+=1)T.values[A]+=(255-T.values[A])*x;else if(T.type.indexOf("color")!==-1)for(let A=0;A<3;A+=1)T.values[A]+=(1-T.values[A])*x;return u(T)}function b(T,x,A){try{return m(T,x)}catch{return T}}function S(T,x=.15){return f(T)>.5?v(T,x):m(T,x)}function _(T,x,A){try{return S(T,x)}catch{return T}}function C(T,x,A,w=1){const L=(N,V)=>Math.round((N**(1/w)*(1-A)+V**(1/w)*A)**w),k=a(T),D=a(x),j=[L(k.values[0],D.values[0]),L(k.values[1],D.values[1]),L(k.values[2],D.values[2])];return u({type:"rgb",values:j})}return Es}var MY=GWe();const oF={black:"#000",white:"#fff"},YWe={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},ID={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},ND={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},j2={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},FD={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},jD={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},BD={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"},$We=["mode","contrastThreshold","tonalOffset"],Ice={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:oF.white,default:oF.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},ZW={text:{primary:oF.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:oF.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function Nce(r,e,i,n){const t=n.light||n,o=n.dark||n*1.5;r[e]||(r.hasOwnProperty(i)?r[e]=r[i]:e==="light"?r.light=MY.lighten(r.main,t):e==="dark"&&(r.dark=MY.darken(r.main,o)))}function qWe(r="light"){return r==="dark"?{main:FD[200],light:FD[50],dark:FD[400]}:{main:FD[700],light:FD[400],dark:FD[800]}}function XWe(r="light"){return r==="dark"?{main:ID[200],light:ID[50],dark:ID[400]}:{main:ID[500],light:ID[300],dark:ID[700]}}function KWe(r="light"){return r==="dark"?{main:ND[500],light:ND[300],dark:ND[700]}:{main:ND[700],light:ND[400],dark:ND[800]}}function ZWe(r="light"){return r==="dark"?{main:jD[400],light:jD[300],dark:jD[700]}:{main:jD[700],light:jD[500],dark:jD[900]}}function JWe(r="light"){return r==="dark"?{main:BD[400],light:BD[300],dark:BD[700]}:{main:BD[800],light:BD[500],dark:BD[900]}}function QWe(r="light"){return r==="dark"?{main:j2[400],light:j2[300],dark:j2[700]}:{main:"#ed6c02",light:j2[500],dark:j2[900]}}function eGe(r){const{mode:e="light",contrastThreshold:i=3,tonalOffset:n=.2}=r,t=db(r,$We),o=r.primary||qWe(e),a=r.secondary||XWe(e),s=r.error||KWe(e),l=r.info||ZWe(e),u=r.success||JWe(e),c=r.warning||QWe(e);function d(g){return MY.getContrastRatio(g,ZW.text.primary)>=i?ZW.text.primary:Ice.text.primary}const f=({color:g,name:v,mainShade:y=500,lightShade:m=300,darkShade:b=700})=>{if(g=wn({},g),!g.main&&g[y]&&(g.main=g[y]),!g.hasOwnProperty("main"))throw new Error(tF(11,v?` (${v})`:"",y));if(typeof g.main!="string")throw new Error(tF(12,v?` (${v})`:"",JSON.stringify(g.main)));return Nce(g,"light",m,n),Nce(g,"dark",b,n),g.contrastText||(g.contrastText=d(g.main)),g},h={dark:ZW,light:Ice};return Vv(wn({common:wn({},oF),mode:e,primary:f({color:o,name:"primary"}),secondary:f({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:f({color:s,name:"error"}),warning:f({color:c,name:"warning"}),info:f({color:l,name:"info"}),success:f({color:u,name:"success"}),grey:YWe,contrastThreshold:i,getContrastText:d,augmentColor:f,tonalOffset:n},h[e]),t)}const tGe=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function rGe(r){return Math.round(r*1e5)/1e5}const Fce={textTransform:"uppercase"},jce='"Roboto", "Helvetica", "Arial", sans-serif';function iGe(r,e){const i=typeof e=="function"?e(r):e,{fontFamily:n=jce,fontSize:t=14,fontWeightLight:o=300,fontWeightRegular:a=400,fontWeightMedium:s=500,fontWeightBold:l=700,htmlFontSize:u=16,allVariants:c,pxToRem:d}=i,f=db(i,tGe),h=t/14,p=d||(y=>`${y/u*h}rem`),g=(y,m,b,S,_)=>wn({fontFamily:n,fontWeight:y,fontSize:p(m),lineHeight:b},n===jce?{letterSpacing:`${rGe(S/m)}em`}:{},_,c),v={h1:g(o,96,1.167,-1.5),h2:g(o,60,1.2,-.5),h3:g(a,48,1.167,0),h4:g(a,34,1.235,.25),h5:g(a,24,1.334,0),h6:g(s,20,1.6,.15),subtitle1:g(a,16,1.75,.15),subtitle2:g(s,14,1.57,.1),body1:g(a,16,1.5,.15),body2:g(a,14,1.43,.15),button:g(s,14,1.75,.4,Fce),caption:g(a,12,1.66,.4),overline:g(a,12,2.66,1,Fce),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Vv(wn({htmlFontSize:u,pxToRem:p,fontFamily:n,fontSize:t,fontWeightLight:o,fontWeightRegular:a,fontWeightMedium:s,fontWeightBold:l},v),f,{clone:!1})}const nGe=.2,oGe=.14,aGe=.12;function cs(...r){return[`${r[0]}px ${r[1]}px ${r[2]}px ${r[3]}px rgba(0,0,0,${nGe})`,`${r[4]}px ${r[5]}px ${r[6]}px ${r[7]}px rgba(0,0,0,${oGe})`,`${r[8]}px ${r[9]}px ${r[10]}px ${r[11]}px rgba(0,0,0,${aGe})`].join(",")}const sGe=["none",cs(0,2,1,-1,0,1,1,0,0,1,3,0),cs(0,3,1,-2,0,2,2,0,0,1,5,0),cs(0,3,3,-2,0,3,4,0,0,1,8,0),cs(0,2,4,-1,0,4,5,0,0,1,10,0),cs(0,3,5,-1,0,5,8,0,0,1,14,0),cs(0,3,5,-1,0,6,10,0,0,1,18,0),cs(0,4,5,-2,0,7,10,1,0,2,16,1),cs(0,5,5,-3,0,8,10,1,0,3,14,2),cs(0,5,6,-3,0,9,12,1,0,3,16,2),cs(0,6,6,-3,0,10,14,1,0,4,18,3),cs(0,6,7,-4,0,11,15,1,0,4,20,3),cs(0,7,8,-4,0,12,17,2,0,5,22,4),cs(0,7,8,-4,0,13,19,2,0,5,24,4),cs(0,7,9,-4,0,14,21,2,0,5,26,4),cs(0,8,9,-5,0,15,22,2,0,6,28,5),cs(0,8,10,-5,0,16,24,2,0,6,30,5),cs(0,8,11,-5,0,17,26,2,0,6,32,5),cs(0,9,11,-5,0,18,28,2,0,7,34,6),cs(0,9,12,-6,0,19,29,2,0,7,36,6),cs(0,10,13,-6,0,20,31,3,0,8,38,7),cs(0,10,13,-6,0,21,33,3,0,8,40,7),cs(0,10,14,-6,0,22,35,3,0,8,42,7),cs(0,11,14,-7,0,23,36,3,0,9,44,8),cs(0,11,15,-7,0,24,38,3,0,9,46,8)],lGe=["duration","easing","delay"],uGe={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},cGe={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Bce(r){return`${Math.round(r)}ms`}function dGe(r){if(!r)return 0;const e=r/36;return Math.round((4+15*e**.25+e/5)*10)}function fGe(r){const e=wn({},uGe,r.easing),i=wn({},cGe,r.duration);return wn({getAutoHeightDuration:dGe,create:(t=["all"],o={})=>{const{duration:a=i.standard,easing:s=e.easeInOut,delay:l=0}=o;return db(o,lGe),(Array.isArray(t)?t:[t]).map(u=>`${u} ${typeof a=="string"?a:Bce(a)} ${s} ${typeof l=="string"?l:Bce(l)}`).join(",")}},r,{easing:e,duration:i})}const hGe={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},pGe=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function gGe(r={},...e){const{mixins:i={},palette:n={},transitions:t={},typography:o={}}=r,a=db(r,pGe);if(r.vars&&r.generateCssVars===void 0)throw new Error(tF(18));const s=eGe(n),l=KTe(r);let u=Vv(l,{mixins:UWe(l.breakpoints,i),palette:s,shadows:sGe.slice(),typography:iGe(s,o),transitions:fGe(t),zIndex:wn({},hGe)});return u=Vv(u,a),u=e.reduce((c,d)=>Vv(c,d),u),u.unstable_sxConfig=wn({},dj,a==null?void 0:a.unstable_sxConfig),u.unstable_sx=function(d){return VU({sx:d,theme:this})},u}const vGe=gGe(),yGe="$$material";function mGe(r){return r!=="ownerState"&&r!=="theme"&&r!=="sx"&&r!=="as"}const bGe=r=>mGe(r)&&r!=="classes",SGe=HWe({themeId:yGe,defaultTheme:vGe,rootShouldForwardProp:bGe});function _Ge(r){return ATe("MuiSvgIcon",r)}T4e("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const PGe=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],CGe=r=>{const{color:e,fontSize:i,classes:n}=r,t={root:["root",e!=="inherit"&&`color${O1(e)}`,`fontSize${O1(i)}`]};return S4e(t,_Ge,n)},TGe=SGe("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(r,e)=>{const{ownerState:i}=r;return[e.root,i.color!=="inherit"&&e[`color${O1(i.color)}`],e[`fontSize${O1(i.fontSize)}`]]}})(({theme:r,ownerState:e})=>{var i,n,t,o,a,s,l,u,c,d,f,h,p;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:e.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(i=r.transitions)==null||(n=i.create)==null?void 0:n.call(i,"fill",{duration:(t=r.transitions)==null||(t=t.duration)==null?void 0:t.shorter}),fontSize:{inherit:"inherit",small:((o=r.typography)==null||(a=o.pxToRem)==null?void 0:a.call(o,20))||"1.25rem",medium:((s=r.typography)==null||(l=s.pxToRem)==null?void 0:l.call(s,24))||"1.5rem",large:((u=r.typography)==null||(c=u.pxToRem)==null?void 0:c.call(u,35))||"2.1875rem"}[e.fontSize],color:(d=(f=(r.vars||r).palette)==null||(f=f[e.color])==null?void 0:f.main)!=null?d:{action:(h=(r.vars||r).palette)==null||(h=h.action)==null?void 0:h.active,disabled:(p=(r.vars||r).palette)==null||(p=p.action)==null?void 0:p.disabled,inherit:void 0}[e.color]}}),LY=G.forwardRef(function(e,i){const n=D4e({props:e,name:"MuiSvgIcon"}),{children:t,className:o,color:a="inherit",component:s="svg",fontSize:l="medium",htmlColor:u,inheritViewBox:c=!1,titleAccess:d,viewBox:f="0 0 24 24"}=n,h=db(n,PGe),p=G.isValidElement(t)&&t.type==="svg",g=wn({},n,{color:a,component:s,fontSize:l,instanceFontSize:e.fontSize,inheritViewBox:c,viewBox:f,hasSvgAsChild:p}),v={};c||(v.viewBox=f);const y=CGe(g);return R.jsxs(TGe,wn({as:s,className:Sg(y.root,o),focusable:"false",color:u,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:i},v,h,p&&t.props,{ownerState:g,children:[p?t.props.children:t,d?R.jsx("title",{children:d}):null]}))});LY.muiName="SvgIcon";function ml(r,e){function i(n,t){return R.jsx(LY,wn({"data-testid":`${e}Icon`,ref:t},n,{children:r}))}return i.muiName=LY.muiName,G.memo(G.forwardRef(i))}const xGe=ml(R.jsx("path",{d:"M18 13h-5v5c0 .55-.45 1-1 1s-1-.45-1-1v-5H6c-.55 0-1-.45-1-1s.45-1 1-1h5V6c0-.55.45-1 1-1s1 .45 1 1v5h5c.55 0 1 .45 1 1s-.45 1-1 1"}),"AddRounded"),EGe=ml(R.jsx("path",{d:"M9 16.17 5.53 12.7a.996.996 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41l4.18 4.18c.39.39 1.02.39 1.41 0L20.29 7.71c.39-.39.39-1.02 0-1.41a.996.996 0 0 0-1.41 0z"}),"CheckRounded"),AGe=ml(R.jsx("path",{d:"M9.29 6.71c-.39.39-.39 1.02 0 1.41L13.17 12l-3.88 3.88c-.39.39-.39 1.02 0 1.41s1.02.39 1.41 0l4.59-4.59c.39-.39.39-1.02 0-1.41L10.7 6.7c-.38-.38-1.02-.38-1.41.01"}),"ChevronRightRounded"),ZTe=ml(R.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2"}),"CircleRounded"),wGe=ml(R.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"ClearOutlined"),tM=ml(R.jsx("path",{d:"M18.3 5.71a.996.996 0 0 0-1.41 0L12 10.59 7.11 5.7a.996.996 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41s1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0s.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4"}),"CloseRounded"),OGe=ml(R.jsx("path",{d:"M14.59 2.59c-.38-.38-.89-.59-1.42-.59H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8.83c0-.53-.21-1.04-.59-1.41zM15 18H9c-.55 0-1-.45-1-1s.45-1 1-1h6c.55 0 1 .45 1 1s-.45 1-1 1m0-4H9c-.55 0-1-.45-1-1s.45-1 1-1h6c.55 0 1 .45 1 1s-.45 1-1 1m-2-6V3.5L18.5 9H14c-.55 0-1-.45-1-1"}),"DescriptionRounded"),d3=ml(R.jsx("path",{d:"M15.88 9.29 12 13.17 8.12 9.29a.996.996 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41l4.59 4.59c.39.39 1.02.39 1.41 0l4.59-4.59c.39-.39.39-1.02 0-1.41-.39-.38-1.03-.39-1.42 0"}),"ExpandMoreRounded"),DGe=ml(R.jsx("path",{d:"M20 6h-8l-1.41-1.41C10.21 4.21 9.7 4 9.17 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2m-1 12H5c-.55 0-1-.45-1-1V9c0-.55.45-1 1-1h14c.55 0 1 .45 1 1v8c0 .55-.45 1-1 1"}),"FolderOpenRounded"),RGe=ml(R.jsx("path",{d:"M10.59 4.59C10.21 4.21 9.7 4 9.17 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"}),"FolderRounded"),MGe=ml(R.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m-1-4h2v2h-2zm1.61-9.96c-2.06-.3-3.88.97-4.43 2.79-.18.58.26 1.17.87 1.17h.2c.41 0 .74-.29.88-.67.32-.89 1.27-1.5 2.3-1.28.95.2 1.65 1.13 1.57 2.1-.1 1.34-1.62 1.63-2.45 2.88 0 .01-.01.01-.01.02-.01.02-.02.03-.03.05-.09.15-.18.32-.25.5-.01.03-.03.05-.04.08-.01.02-.01.04-.02.07-.12.34-.2.75-.2 1.25h2c0-.42.11-.77.28-1.07.02-.03.03-.06.05-.09.08-.14.18-.27.28-.39.01-.01.02-.03.03-.04.1-.12.21-.23.33-.34.96-.91 2.26-1.65 1.99-3.56-.24-1.74-1.61-3.21-3.35-3.47"}),"HelpOutlineRounded"),LGe=ml(R.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 15c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1s1 .45 1 1v4c0 .55-.45 1-1 1m1-8h-2V7h2z"}),"InfoRounded"),JTe=ml(R.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 14c-.55 0-1-.45-1-1V9c0-.55.45-1 1-1s1 .45 1 1v6c0 .55-.45 1-1 1m4 0c-.55 0-1-.45-1-1V9c0-.55.45-1 1-1s1 .45 1 1v6c0 .55-.45 1-1 1"}),"PauseCircleFilledRounded"),$X=ml(R.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 13.5v-7c0-.41.47-.65.8-.4l4.67 3.5c.27.2.27.6 0 .8l-4.67 3.5c-.33.25-.8.01-.8-.4"}),"PlayCircleFilledRounded"),kGe=ml(R.jsx("path",{d:"M18 13H6c-.55 0-1-.45-1-1s.45-1 1-1h12c.55 0 1 .45 1 1s-.45 1-1 1"}),"RemoveRounded"),Vce=ml(R.jsx("path",{d:"M7 7h10v1.79c0 .45.54.67.85.35l2.79-2.79c.2-.2.2-.51 0-.71l-2.79-2.79c-.31-.31-.85-.09-.85.36V5H6c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1s1-.45 1-1zm10 10H7v-1.79c0-.45-.54-.67-.85-.35l-2.79 2.79c-.2.2-.2.51 0 .71l2.79 2.79c.31.31.85.09.85-.36V19h11c.55 0 1-.45 1-1v-4c0-.55-.45-1-1-1s-1 .45-1 1z"}),"RepeatRounded"),IGe=ml(R.jsx("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings"),QTe=ml(R.jsx("path",{d:"M7 6c.55 0 1 .45 1 1v10c0 .55-.45 1-1 1s-1-.45-1-1V7c0-.55.45-1 1-1m3.66 6.82 5.77 4.07c.66.47 1.58-.01 1.58-.82V7.93c0-.81-.91-1.28-1.58-.82l-5.77 4.07c-.57.4-.57 1.24 0 1.64"}),"SkipPreviousRounded"),NGe=ml(R.jsx("path",{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2M8 14H6v-2h2zm0-3H6V9h2zm0-3H6V6h2zm6 6h-3c-.55 0-1-.45-1-1s.45-1 1-1h3c.55 0 1 .45 1 1s-.45 1-1 1m3-3h-6c-.55 0-1-.45-1-1s.45-1 1-1h6c.55 0 1 .45 1 1s-.45 1-1 1m0-3h-6c-.55 0-1-.45-1-1s.45-1 1-1h6c.55 0 1 .45 1 1s-.45 1-1 1"}),"SpeakerNotesRounded"),FGe=ml(R.jsx("path",{d:"M3.63 3.63c-.39.39-.39 1.02 0 1.41L7.29 8.7 7 9H4c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1h3l3.29 3.29c.63.63 1.71.18 1.71-.71v-4.17l4.18 4.18c-.49.37-1.02.68-1.6.91-.36.15-.58.53-.58.92 0 .72.73 1.18 1.39.91.8-.33 1.55-.77 2.22-1.31l1.34 1.34c.39.39 1.02.39 1.41 0s.39-1.02 0-1.41L5.05 3.63c-.39-.39-1.02-.39-1.42 0M19 12c0 .82-.15 1.61-.41 2.34l1.53 1.53c.56-1.17.88-2.48.88-3.87 0-3.83-2.4-7.11-5.78-8.4-.59-.23-1.22.23-1.22.86v.19c0 .38.25.71.61.85C17.18 6.54 19 9.06 19 12m-8.71-6.29-.17.17L12 7.76V6.41c0-.89-1.08-1.33-1.71-.7M16.5 12c0-1.77-1.02-3.29-2.5-4.03v1.79l2.48 2.48c.01-.08.02-.16.02-.24"}),"VolumeOffRounded"),jGe=ml(R.jsx("path",{d:"M3 10v4c0 .55.45 1 1 1h3l3.29 3.29c.63.63 1.71.18 1.71-.71V6.41c0-.89-1.08-1.34-1.71-.71L7 9H4c-.55 0-1 .45-1 1m13.5 2c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02M14 4.45v.2c0 .38.25.71.6.85C17.18 6.53 19 9.06 19 12s-1.82 5.47-4.4 6.5c-.36.14-.6.47-.6.85v.2c0 .63.63 1.07 1.21.85C18.6 19.11 21 15.84 21 12s-2.4-7.11-5.79-8.4c-.58-.23-1.21.22-1.21.85"}),"VolumeUpRounded");var BGe=function(e){return VGe(e)&&!HGe(e)};function VGe(r){return!!r&&typeof r=="object"}function HGe(r){var e=Object.prototype.toString.call(r);return e==="[object RegExp]"||e==="[object Date]"||WGe(r)}var UGe=typeof Symbol=="function"&&Symbol.for,zGe=UGe?Symbol.for("react.element"):60103;function WGe(r){return r.$$typeof===zGe}function GGe(r){return Array.isArray(r)?[]:{}}function f3(r,e){return e.clone!==!1&&e.isMergeableObject(r)?aF(GGe(r),r,e):r}function YGe(r,e,i){return r.concat(e).map(function(n){return f3(n,i)})}function $Ge(r,e,i){var n={};return i.isMergeableObject(r)&&Object.keys(r).forEach(function(t){n[t]=f3(r[t],i)}),Object.keys(e).forEach(function(t){!i.isMergeableObject(e[t])||!r[t]?n[t]=f3(e[t],i):n[t]=aF(r[t],e[t],i)}),n}function aF(r,e,i){i=i||{},i.arrayMerge=i.arrayMerge||YGe,i.isMergeableObject=i.isMergeableObject||BGe;var n=Array.isArray(e),t=Array.isArray(r),o=n===t;return o?n?i.arrayMerge(r,e,i):$Ge(r,e,i):f3(e,i)}aF.all=function(e,i){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(n,t){return aF(n,t,i)},{})};var kY=aF,exe=typeof global=="object"&&global&&global.Object===Object&&global,qGe=typeof self=="object"&&self&&self.Object===Object&&self,hy=exe||qGe||Function("return this")(),jS=hy.Symbol,txe=Object.prototype,XGe=txe.hasOwnProperty,KGe=txe.toString,B2=jS?jS.toStringTag:void 0;function ZGe(r){var e=XGe.call(r,B2),i=r[B2];try{r[B2]=void 0;var n=!0}catch{}var t=KGe.call(r);return n&&(e?r[B2]=i:delete r[B2]),t}var JGe=Object.prototype,QGe=JGe.toString;function e6e(r){return QGe.call(r)}var t6e="[object Null]",r6e="[object Undefined]",Hce=jS?jS.toStringTag:void 0;function eO(r){return r==null?r===void 0?r6e:t6e:Hce&&Hce in Object(r)?ZGe(r):e6e(r)}function rxe(r,e){return function(i){return r(e(i))}}var qX=rxe(Object.getPrototypeOf,Object);function tO(r){return r!=null&&typeof r=="object"}var i6e="[object Object]",n6e=Function.prototype,o6e=Object.prototype,ixe=n6e.toString,a6e=o6e.hasOwnProperty,s6e=ixe.call(Object);function Uce(r){if(!tO(r)||eO(r)!=i6e)return!1;var e=qX(r);if(e===null)return!0;var i=a6e.call(e,"constructor")&&e.constructor;return typeof i=="function"&&i instanceof i&&ixe.call(i)==s6e}function l6e(){this.__data__=[],this.size=0}function nxe(r,e){return r===e||r!==r&&e!==e}function HU(r,e){for(var i=r.length;i--;)if(nxe(r[i][0],e))return i;return-1}var u6e=Array.prototype,c6e=u6e.splice;function d6e(r){var e=this.__data__,i=HU(e,r);if(i<0)return!1;var n=e.length-1;return i==n?e.pop():c6e.call(e,i,1),--this.size,!0}function f6e(r){var e=this.__data__,i=HU(e,r);return i<0?void 0:e[i][1]}function h6e(r){return HU(this.__data__,r)>-1}function p6e(r,e){var i=this.__data__,n=HU(i,r);return n<0?(++this.size,i.push([r,e])):i[n][1]=e,this}function fb(r){var e=-1,i=r==null?0:r.length;for(this.clear();++e<i;){var n=r[e];this.set(n[0],n[1])}}fb.prototype.clear=l6e;fb.prototype.delete=d6e;fb.prototype.get=f6e;fb.prototype.has=h6e;fb.prototype.set=p6e;function g6e(){this.__data__=new fb,this.size=0}function v6e(r){var e=this.__data__,i=e.delete(r);return this.size=e.size,i}function y6e(r){return this.__data__.get(r)}function m6e(r){return this.__data__.has(r)}function fj(r){var e=typeof r;return r!=null&&(e=="object"||e=="function")}var b6e="[object AsyncFunction]",S6e="[object Function]",_6e="[object GeneratorFunction]",P6e="[object Proxy]";function oxe(r){if(!fj(r))return!1;var e=eO(r);return e==S6e||e==_6e||e==b6e||e==P6e}var JW=hy["__core-js_shared__"],zce=(function(){var r=/[^.]+$/.exec(JW&&JW.keys&&JW.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function C6e(r){return!!zce&&zce in r}var T6e=Function.prototype,x6e=T6e.toString;function rO(r){if(r!=null){try{return x6e.call(r)}catch{}try{return r+""}catch{}}return""}var E6e=/[\\^$.*+?()[\]{}|]/g,A6e=/^\[object .+?Constructor\]$/,w6e=Function.prototype,O6e=Object.prototype,D6e=w6e.toString,R6e=O6e.hasOwnProperty,M6e=RegExp("^"+D6e.call(R6e).replace(E6e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function L6e(r){if(!fj(r)||C6e(r))return!1;var e=oxe(r)?M6e:A6e;return e.test(rO(r))}function k6e(r,e){return r==null?void 0:r[e]}function iO(r,e){var i=k6e(r,e);return L6e(i)?i:void 0}var sF=iO(hy,"Map"),lF=iO(Object,"create");function I6e(){this.__data__=lF?lF(null):{},this.size=0}function N6e(r){var e=this.has(r)&&delete this.__data__[r];return this.size-=e?1:0,e}var F6e="__lodash_hash_undefined__",j6e=Object.prototype,B6e=j6e.hasOwnProperty;function V6e(r){var e=this.__data__;if(lF){var i=e[r];return i===F6e?void 0:i}return B6e.call(e,r)?e[r]:void 0}var H6e=Object.prototype,U6e=H6e.hasOwnProperty;function z6e(r){var e=this.__data__;return lF?e[r]!==void 0:U6e.call(e,r)}var W6e="__lodash_hash_undefined__";function G6e(r,e){var i=this.__data__;return this.size+=this.has(r)?0:1,i[r]=lF&&e===void 0?W6e:e,this}function D1(r){var e=-1,i=r==null?0:r.length;for(this.clear();++e<i;){var n=r[e];this.set(n[0],n[1])}}D1.prototype.clear=I6e;D1.prototype.delete=N6e;D1.prototype.get=V6e;D1.prototype.has=z6e;D1.prototype.set=G6e;function Y6e(){this.size=0,this.__data__={hash:new D1,map:new(sF||fb),string:new D1}}function $6e(r){var e=typeof r;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?r!=="__proto__":r===null}function UU(r,e){var i=r.__data__;return $6e(e)?i[typeof e=="string"?"string":"hash"]:i.map}function q6e(r){var e=UU(this,r).delete(r);return this.size-=e?1:0,e}function X6e(r){return UU(this,r).get(r)}function K6e(r){return UU(this,r).has(r)}function Z6e(r,e){var i=UU(this,r),n=i.size;return i.set(r,e),this.size+=i.size==n?0:1,this}function a_(r){var e=-1,i=r==null?0:r.length;for(this.clear();++e<i;){var n=r[e];this.set(n[0],n[1])}}a_.prototype.clear=Y6e;a_.prototype.delete=q6e;a_.prototype.get=X6e;a_.prototype.has=K6e;a_.prototype.set=Z6e;var J6e=200;function Q6e(r,e){var i=this.__data__;if(i instanceof fb){var n=i.__data__;if(!sF||n.length<J6e-1)return n.push([r,e]),this.size=++i.size,this;i=this.__data__=new a_(n)}return i.set(r,e),this.size=i.size,this}function zM(r){var e=this.__data__=new fb(r);this.size=e.size}zM.prototype.clear=g6e;zM.prototype.delete=v6e;zM.prototype.get=y6e;zM.prototype.has=m6e;zM.prototype.set=Q6e;function eYe(r,e){for(var i=-1,n=r==null?0:r.length;++i<n&&e(r[i],i,r)!==!1;);return r}var Wce=(function(){try{var r=iO(Object,"defineProperty");return r({},"",{}),r}catch{}})();function axe(r,e,i){e=="__proto__"&&Wce?Wce(r,e,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[e]=i}var tYe=Object.prototype,rYe=tYe.hasOwnProperty;function sxe(r,e,i){var n=r[e];(!(rYe.call(r,e)&&nxe(n,i))||i===void 0&&!(e in r))&&axe(r,e,i)}function zU(r,e,i,n){var t=!i;i||(i={});for(var o=-1,a=e.length;++o<a;){var s=e[o],l=void 0;l===void 0&&(l=r[s]),t?axe(i,s,l):sxe(i,s,l)}return i}function iYe(r,e){for(var i=-1,n=Array(r);++i<r;)n[i]=e(i);return n}var nYe="[object Arguments]";function Gce(r){return tO(r)&&eO(r)==nYe}var lxe=Object.prototype,oYe=lxe.hasOwnProperty,aYe=lxe.propertyIsEnumerable,sYe=Gce((function(){return arguments})())?Gce:function(r){return tO(r)&&oYe.call(r,"callee")&&!aYe.call(r,"callee")},hj=Array.isArray;function lYe(){return!1}var uxe=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Yce=uxe&&typeof module=="object"&&module&&!module.nodeType&&module,uYe=Yce&&Yce.exports===uxe,$ce=uYe?hy.Buffer:void 0,cYe=$ce?$ce.isBuffer:void 0,cxe=cYe||lYe,dYe=9007199254740991,fYe=/^(?:0|[1-9]\d*)$/;function hYe(r,e){var i=typeof r;return e=e??dYe,!!e&&(i=="number"||i!="symbol"&&fYe.test(r))&&r>-1&&r%1==0&&r<e}var pYe=9007199254740991;function dxe(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=pYe}var gYe="[object Arguments]",vYe="[object Array]",yYe="[object Boolean]",mYe="[object Date]",bYe="[object Error]",SYe="[object Function]",_Ye="[object Map]",PYe="[object Number]",CYe="[object Object]",TYe="[object RegExp]",xYe="[object Set]",EYe="[object String]",AYe="[object WeakMap]",wYe="[object ArrayBuffer]",OYe="[object DataView]",DYe="[object Float32Array]",RYe="[object Float64Array]",MYe="[object Int8Array]",LYe="[object Int16Array]",kYe="[object Int32Array]",IYe="[object Uint8Array]",NYe="[object Uint8ClampedArray]",FYe="[object Uint16Array]",jYe="[object Uint32Array]",Ja={};Ja[DYe]=Ja[RYe]=Ja[MYe]=Ja[LYe]=Ja[kYe]=Ja[IYe]=Ja[NYe]=Ja[FYe]=Ja[jYe]=!0;Ja[gYe]=Ja[vYe]=Ja[wYe]=Ja[yYe]=Ja[OYe]=Ja[mYe]=Ja[bYe]=Ja[SYe]=Ja[_Ye]=Ja[PYe]=Ja[CYe]=Ja[TYe]=Ja[xYe]=Ja[EYe]=Ja[AYe]=!1;function BYe(r){return tO(r)&&dxe(r.length)&&!!Ja[eO(r)]}function XX(r){return function(e){return r(e)}}var fxe=typeof exports=="object"&&exports&&!exports.nodeType&&exports,TN=fxe&&typeof module=="object"&&module&&!module.nodeType&&module,VYe=TN&&TN.exports===fxe,QW=VYe&&exe.process,rM=(function(){try{var r=TN&&TN.require&&TN.require("util").types;return r||QW&&QW.binding&&QW.binding("util")}catch{}})(),qce=rM&&rM.isTypedArray,HYe=qce?XX(qce):BYe,UYe=Object.prototype,zYe=UYe.hasOwnProperty;function hxe(r,e){var i=hj(r),n=!i&&sYe(r),t=!i&&!n&&cxe(r),o=!i&&!n&&!t&&HYe(r),a=i||n||t||o,s=a?iYe(r.length,String):[],l=s.length;for(var u in r)(e||zYe.call(r,u))&&!(a&&(u=="length"||t&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||hYe(u,l)))&&s.push(u);return s}var WYe=Object.prototype;function KX(r){var e=r&&r.constructor,i=typeof e=="function"&&e.prototype||WYe;return r===i}var GYe=rxe(Object.keys,Object),YYe=Object.prototype,$Ye=YYe.hasOwnProperty;function qYe(r){if(!KX(r))return GYe(r);var e=[];for(var i in Object(r))$Ye.call(r,i)&&i!="constructor"&&e.push(i);return e}function pxe(r){return r!=null&&dxe(r.length)&&!oxe(r)}function ZX(r){return pxe(r)?hxe(r):qYe(r)}function XYe(r,e){return r&&zU(e,ZX(e),r)}function KYe(r){var e=[];if(r!=null)for(var i in Object(r))e.push(i);return e}var ZYe=Object.prototype,JYe=ZYe.hasOwnProperty;function QYe(r){if(!fj(r))return KYe(r);var e=KX(r),i=[];for(var n in r)n=="constructor"&&(e||!JYe.call(r,n))||i.push(n);return i}function JX(r){return pxe(r)?hxe(r,!0):QYe(r)}function e$e(r,e){return r&&zU(e,JX(e),r)}var gxe=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Xce=gxe&&typeof module=="object"&&module&&!module.nodeType&&module,t$e=Xce&&Xce.exports===gxe,Kce=t$e?hy.Buffer:void 0,Zce=Kce?Kce.allocUnsafe:void 0;function r$e(r,e){if(e)return r.slice();var i=r.length,n=Zce?Zce(i):new r.constructor(i);return r.copy(n),n}function vxe(r,e){var i=-1,n=r.length;for(e||(e=Array(n));++i<n;)e[i]=r[i];return e}function i$e(r,e){for(var i=-1,n=r==null?0:r.length,t=0,o=[];++i<n;){var a=r[i];e(a,i,r)&&(o[t++]=a)}return o}function yxe(){return[]}var n$e=Object.prototype,o$e=n$e.propertyIsEnumerable,Jce=Object.getOwnPropertySymbols,QX=Jce?function(r){return r==null?[]:(r=Object(r),i$e(Jce(r),function(e){return o$e.call(r,e)}))}:yxe;function a$e(r,e){return zU(r,QX(r),e)}function mxe(r,e){for(var i=-1,n=e.length,t=r.length;++i<n;)r[t+i]=e[i];return r}var s$e=Object.getOwnPropertySymbols,bxe=s$e?function(r){for(var e=[];r;)mxe(e,QX(r)),r=qX(r);return e}:yxe;function l$e(r,e){return zU(r,bxe(r),e)}function Sxe(r,e,i){var n=e(r);return hj(r)?n:mxe(n,i(r))}function u$e(r){return Sxe(r,ZX,QX)}function c$e(r){return Sxe(r,JX,bxe)}var IY=iO(hy,"DataView"),NY=iO(hy,"Promise"),FY=iO(hy,"Set"),jY=iO(hy,"WeakMap"),Qce="[object Map]",d$e="[object Object]",ede="[object Promise]",tde="[object Set]",rde="[object WeakMap]",ide="[object DataView]",f$e=rO(IY),h$e=rO(sF),p$e=rO(NY),g$e=rO(FY),v$e=rO(jY),O0=eO;(IY&&O0(new IY(new ArrayBuffer(1)))!=ide||sF&&O0(new sF)!=Qce||NY&&O0(NY.resolve())!=ede||FY&&O0(new FY)!=tde||jY&&O0(new jY)!=rde)&&(O0=function(r){var e=eO(r),i=e==d$e?r.constructor:void 0,n=i?rO(i):"";if(n)switch(n){case f$e:return ide;case h$e:return Qce;case p$e:return ede;case g$e:return tde;case v$e:return rde}return e});var y$e=Object.prototype,m$e=y$e.hasOwnProperty;function b$e(r){var e=r.length,i=new r.constructor(e);return e&&typeof r[0]=="string"&&m$e.call(r,"index")&&(i.index=r.index,i.input=r.input),i}var nde=hy.Uint8Array;function e9(r){var e=new r.constructor(r.byteLength);return new nde(e).set(new nde(r)),e}function S$e(r,e){var i=e?e9(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.byteLength)}var _$e=/\w*$/;function P$e(r){var e=new r.constructor(r.source,_$e.exec(r));return e.lastIndex=r.lastIndex,e}var ode=jS?jS.prototype:void 0,ade=ode?ode.valueOf:void 0;function C$e(r){return ade?Object(ade.call(r)):{}}function T$e(r,e){var i=e?e9(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.length)}var x$e="[object Boolean]",E$e="[object Date]",A$e="[object Map]",w$e="[object Number]",O$e="[object RegExp]",D$e="[object Set]",R$e="[object String]",M$e="[object Symbol]",L$e="[object ArrayBuffer]",k$e="[object DataView]",I$e="[object Float32Array]",N$e="[object Float64Array]",F$e="[object Int8Array]",j$e="[object Int16Array]",B$e="[object Int32Array]",V$e="[object Uint8Array]",H$e="[object Uint8ClampedArray]",U$e="[object Uint16Array]",z$e="[object Uint32Array]";function W$e(r,e,i){var n=r.constructor;switch(e){case L$e:return e9(r);case x$e:case E$e:return new n(+r);case k$e:return S$e(r,i);case I$e:case N$e:case F$e:case j$e:case B$e:case V$e:case H$e:case U$e:case z$e:return T$e(r,i);case A$e:return new n;case w$e:case R$e:return new n(r);case O$e:return P$e(r);case D$e:return new n;case M$e:return C$e(r)}}var sde=Object.create,G$e=(function(){function r(){}return function(e){if(!fj(e))return{};if(sde)return sde(e);r.prototype=e;var i=new r;return r.prototype=void 0,i}})();function Y$e(r){return typeof r.constructor=="function"&&!KX(r)?G$e(qX(r)):{}}var $$e="[object Map]";function q$e(r){return tO(r)&&O0(r)==$$e}var lde=rM&&rM.isMap,X$e=lde?XX(lde):q$e,K$e="[object Set]";function Z$e(r){return tO(r)&&O0(r)==K$e}var ude=rM&&rM.isSet,J$e=ude?XX(ude):Z$e,Q$e=1,eqe=2,tqe=4,_xe="[object Arguments]",rqe="[object Array]",iqe="[object Boolean]",nqe="[object Date]",oqe="[object Error]",Pxe="[object Function]",aqe="[object GeneratorFunction]",sqe="[object Map]",lqe="[object Number]",Cxe="[object Object]",uqe="[object RegExp]",cqe="[object Set]",dqe="[object String]",fqe="[object Symbol]",hqe="[object WeakMap]",pqe="[object ArrayBuffer]",gqe="[object DataView]",vqe="[object Float32Array]",yqe="[object Float64Array]",mqe="[object Int8Array]",bqe="[object Int16Array]",Sqe="[object Int32Array]",_qe="[object Uint8Array]",Pqe="[object Uint8ClampedArray]",Cqe="[object Uint16Array]",Tqe="[object Uint32Array]",Fa={};Fa[_xe]=Fa[rqe]=Fa[pqe]=Fa[gqe]=Fa[iqe]=Fa[nqe]=Fa[vqe]=Fa[yqe]=Fa[mqe]=Fa[bqe]=Fa[Sqe]=Fa[sqe]=Fa[lqe]=Fa[Cxe]=Fa[uqe]=Fa[cqe]=Fa[dqe]=Fa[fqe]=Fa[_qe]=Fa[Pqe]=Fa[Cqe]=Fa[Tqe]=!0;Fa[oqe]=Fa[Pxe]=Fa[hqe]=!1;function xN(r,e,i,n,t,o){var a,s=e&Q$e,l=e&eqe,u=e&tqe;if(a!==void 0)return a;if(!fj(r))return r;var c=hj(r);if(c){if(a=b$e(r),!s)return vxe(r,a)}else{var d=O0(r),f=d==Pxe||d==aqe;if(cxe(r))return r$e(r,s);if(d==Cxe||d==_xe||f&&!t){if(a=l||f?{}:Y$e(r),!s)return l?l$e(r,e$e(a,r)):a$e(r,XYe(a,r))}else{if(!Fa[d])return t?r:{};a=W$e(r,d,s)}}o||(o=new zM);var h=o.get(r);if(h)return h;o.set(r,a),J$e(r)?r.forEach(function(v){a.add(xN(v,e,i,v,r,o))}):X$e(r)&&r.forEach(function(v,y){a.set(y,xN(v,e,i,y,r,o))});var p=u?l?c$e:u$e:l?JX:ZX,g=c?void 0:p(r);return eYe(g||r,function(v,y){g&&(y=v,v=r[y]),sxe(a,y,xN(v,e,i,y,r,o))}),a}var xqe=1,Eqe=4;function Gj(r){return xN(r,xqe|Eqe)}var eG,cde;function Aqe(){if(cde)return eG;cde=1;var r=Array.isArray,e=Object.keys,i=Object.prototype.hasOwnProperty,n=typeof Element<"u";function t(o,a){if(o===a)return!0;if(o&&a&&typeof o=="object"&&typeof a=="object"){var s=r(o),l=r(a),u,c,d;if(s&&l){if(c=o.length,c!=a.length)return!1;for(u=c;u--!==0;)if(!t(o[u],a[u]))return!1;return!0}if(s!=l)return!1;var f=o instanceof Date,h=a instanceof Date;if(f!=h)return!1;if(f&&h)return o.getTime()==a.getTime();var p=o instanceof RegExp,g=a instanceof RegExp;if(p!=g)return!1;if(p&&g)return o.toString()==a.toString();var v=e(o);if(c=v.length,c!==e(a).length)return!1;for(u=c;u--!==0;)if(!i.call(a,v[u]))return!1;if(n&&o instanceof Element&&a instanceof Element)return o===a;for(u=c;u--!==0;)if(d=v[u],!(d==="_owner"&&o.$$typeof)&&!t(o[d],a[d]))return!1;return!0}return o!==o&&a!==a}return eG=function(a,s){try{return t(a,s)}catch(l){if(l.message&&l.message.match(/stack|recursion/i)||l.number===-2146828260)return console.warn("Warning: react-fast-compare does not handle circular references.",l.name,l.message),!1;throw l}},eG}var wqe=Aqe();const jw=Lu(wqe);var Oqe=4;function dde(r){return xN(r,Oqe)}function Txe(r,e){for(var i=-1,n=r==null?0:r.length,t=Array(n);++i<n;)t[i]=e(r[i],i,r);return t}var Dqe="[object Symbol]";function t9(r){return typeof r=="symbol"||tO(r)&&eO(r)==Dqe}var Rqe="Expected a function";function r9(r,e){if(typeof r!="function"||e!=null&&typeof e!="function")throw new TypeError(Rqe);var i=function(){var n=arguments,t=e?e.apply(this,n):n[0],o=i.cache;if(o.has(t))return o.get(t);var a=r.apply(this,n);return i.cache=o.set(t,a)||o,a};return i.cache=new(r9.Cache||a_),i}r9.Cache=a_;var Mqe=500;function Lqe(r){var e=r9(r,function(n){return i.size===Mqe&&i.clear(),n}),i=e.cache;return e}var kqe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Iqe=/\\(\\)?/g,Nqe=Lqe(function(r){var e=[];return r.charCodeAt(0)===46&&e.push(""),r.replace(kqe,function(i,n,t,o){e.push(t?o.replace(Iqe,"$1"):n||i)}),e});function Fqe(r){if(typeof r=="string"||t9(r))return r;var e=r+"";return e=="0"&&1/r==-1/0?"-0":e}var fde=jS?jS.prototype:void 0,hde=fde?fde.toString:void 0;function xxe(r){if(typeof r=="string")return r;if(hj(r))return Txe(r,xxe)+"";if(t9(r))return hde?hde.call(r):"";var e=r+"";return e=="0"&&1/r==-1/0?"-0":e}function jqe(r){return r==null?"":xxe(r)}function Exe(r){return hj(r)?Txe(r,Fqe):t9(r)?[r]:vxe(Nqe(jqe(r)))}function Au(){return Au=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(r[n]=i[n])}return r},Au.apply(this,arguments)}function Axe(r,e){if(r==null)return{};var i={},n=Object.keys(r),t,o;for(o=0;o<n.length;o++)t=n[o],!(e.indexOf(t)>=0)&&(i[t]=r[t]);return i}var WU=G.createContext(void 0);WU.displayName="FormikContext";WU.Provider;WU.Consumer;function Bqe(){var r=G.useContext(WU);return r}var ig=function(e){return typeof e=="function"},GU=function(e){return e!==null&&typeof e=="object"},Vqe=function(e){return String(Math.floor(Number(e)))===e},tG=function(e){return Object.prototype.toString.call(e)==="[object String]"},rG=function(e){return GU(e)&&ig(e.then)};function gh(r,e,i,n){n===void 0&&(n=0);for(var t=Exe(e);r&&n<t.length;)r=r[t[n++]];return n!==t.length&&!r||r===void 0?i:r}function f1(r,e,i){for(var n=dde(r),t=n,o=0,a=Exe(e);o<a.length-1;o++){var s=a[o],l=gh(r,a.slice(0,o+1));if(l&&(GU(l)||Array.isArray(l)))t=t[s]=dde(l);else{var u=a[o+1];t=t[s]=Vqe(u)&&Number(u)>=0?[]:{}}}return(o===0?r:t)[a[o]]===i?r:(i===void 0?delete t[a[o]]:t[a[o]]=i,o===0&&i===void 0&&delete n[a[o]],n)}function wxe(r,e,i,n){i===void 0&&(i=new WeakMap),n===void 0&&(n={});for(var t=0,o=Object.keys(r);t<o.length;t++){var a=o[t],s=r[a];GU(s)?i.get(s)||(i.set(s,!0),n[a]=Array.isArray(s)?[]:{},wxe(s,e,i,n[a])):n[a]=e}return n}function Hqe(r,e){switch(e.type){case"SET_VALUES":return Au({},r,{values:e.payload});case"SET_TOUCHED":return Au({},r,{touched:e.payload});case"SET_ERRORS":return jw(r.errors,e.payload)?r:Au({},r,{errors:e.payload});case"SET_STATUS":return Au({},r,{status:e.payload});case"SET_ISSUBMITTING":return Au({},r,{isSubmitting:e.payload});case"SET_ISVALIDATING":return Au({},r,{isValidating:e.payload});case"SET_FIELD_VALUE":return Au({},r,{values:f1(r.values,e.payload.field,e.payload.value)});case"SET_FIELD_TOUCHED":return Au({},r,{touched:f1(r.touched,e.payload.field,e.payload.value)});case"SET_FIELD_ERROR":return Au({},r,{errors:f1(r.errors,e.payload.field,e.payload.value)});case"RESET_FORM":return Au({},r,e.payload);case"SET_FORMIK_STATE":return e.payload(r);case"SUBMIT_ATTEMPT":return Au({},r,{touched:wxe(r.values,!0),isSubmitting:!0,submitCount:r.submitCount+1});case"SUBMIT_FAILURE":return Au({},r,{isSubmitting:!1});case"SUBMIT_SUCCESS":return Au({},r,{isSubmitting:!1});default:return r}}var xw={},Yj={};function Uqe(r){var e=r.validateOnChange,i=e===void 0?!0:e,n=r.validateOnBlur,t=n===void 0?!0:n,o=r.validateOnMount,a=o===void 0?!1:o,s=r.isInitialValid,l=r.enableReinitialize,u=l===void 0?!1:l,c=r.onSubmit,d=Axe(r,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),f=Au({validateOnChange:i,validateOnBlur:t,validateOnMount:a,onSubmit:c},d),h=G.useRef(f.initialValues),p=G.useRef(f.initialErrors||xw),g=G.useRef(f.initialTouched||Yj),v=G.useRef(f.initialStatus),y=G.useRef(!1),m=G.useRef({});G.useEffect(function(){return y.current=!0,function(){y.current=!1}},[]);var b=G.useState(0),S=b[1],_=G.useRef({values:Gj(f.initialValues),errors:Gj(f.initialErrors)||xw,touched:Gj(f.initialTouched)||Yj,status:Gj(f.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),C=_.current,T=G.useCallback(function(be){var ke=_.current;_.current=Hqe(ke,be),ke!==_.current&&S(function(qe){return qe+1})},[]),x=G.useCallback(function(be,ke){return new Promise(function(qe,rt){var St=f.validate(be,ke);St==null?qe(xw):rG(St)?St.then(function(xt){qe(xt||xw)},function(xt){rt(xt)}):qe(St)})},[f.validate]),A=G.useCallback(function(be,ke){var qe=f.validationSchema,rt=ig(qe)?qe(ke):qe,St=ke&&rt.validateAt?rt.validateAt(ke,be):Wqe(be,rt);return new Promise(function(xt,It){St.then(function(){xt(xw)},function(Zt){Zt.name==="ValidationError"?xt(zqe(Zt)):It(Zt)})})},[f.validationSchema]),w=G.useCallback(function(be,ke){return new Promise(function(qe){return qe(m.current[be].validate(ke))})},[]),L=G.useCallback(function(be){var ke=Object.keys(m.current).filter(function(rt){return ig(m.current[rt].validate)}),qe=ke.length>0?ke.map(function(rt){return w(rt,gh(be,rt))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(qe).then(function(rt){return rt.reduce(function(St,xt,It){return xt==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||xt&&(St=f1(St,ke[It],xt)),St},{})})},[w]),k=G.useCallback(function(be){return Promise.all([L(be),f.validationSchema?A(be):{},f.validate?x(be):{}]).then(function(ke){var qe=ke[0],rt=ke[1],St=ke[2],xt=kY.all([qe,rt,St],{arrayMerge:Gqe});return xt})},[f.validate,f.validationSchema,L,x,A]),D=lp(function(be){return be===void 0&&(be=C.values),T({type:"SET_ISVALIDATING",payload:!0}),k(be).then(function(ke){return y.current&&(T({type:"SET_ISVALIDATING",payload:!1}),T({type:"SET_ERRORS",payload:ke})),ke})});G.useEffect(function(){a&&y.current===!0&&jw(h.current,f.initialValues)&&D(h.current)},[a,D]);var j=G.useCallback(function(be){var ke=be&&be.values?be.values:h.current,qe=be&&be.errors?be.errors:p.current?p.current:f.initialErrors||{},rt=be&&be.touched?be.touched:g.current?g.current:f.initialTouched||{},St=be&&be.status?be.status:v.current?v.current:f.initialStatus;h.current=ke,p.current=qe,g.current=rt,v.current=St;var xt=function(){T({type:"RESET_FORM",payload:{isSubmitting:!!be&&!!be.isSubmitting,errors:qe,touched:rt,status:St,values:ke,isValidating:!!be&&!!be.isValidating,submitCount:be&&be.submitCount&&typeof be.submitCount=="number"?be.submitCount:0}})};if(f.onReset){var It=f.onReset(C.values,Re);rG(It)?It.then(xt):xt()}else xt()},[f.initialErrors,f.initialStatus,f.initialTouched,f.onReset]);G.useEffect(function(){y.current===!0&&!jw(h.current,f.initialValues)&&u&&(h.current=f.initialValues,j(),a&&D(h.current))},[u,f.initialValues,j,a,D]),G.useEffect(function(){u&&y.current===!0&&!jw(p.current,f.initialErrors)&&(p.current=f.initialErrors||xw,T({type:"SET_ERRORS",payload:f.initialErrors||xw}))},[u,f.initialErrors]),G.useEffect(function(){u&&y.current===!0&&!jw(g.current,f.initialTouched)&&(g.current=f.initialTouched||Yj,T({type:"SET_TOUCHED",payload:f.initialTouched||Yj}))},[u,f.initialTouched]),G.useEffect(function(){u&&y.current===!0&&!jw(v.current,f.initialStatus)&&(v.current=f.initialStatus,T({type:"SET_STATUS",payload:f.initialStatus}))},[u,f.initialStatus,f.initialTouched]);var N=lp(function(be){if(m.current[be]&&ig(m.current[be].validate)){var ke=gh(C.values,be),qe=m.current[be].validate(ke);return rG(qe)?(T({type:"SET_ISVALIDATING",payload:!0}),qe.then(function(rt){return rt}).then(function(rt){T({type:"SET_FIELD_ERROR",payload:{field:be,value:rt}}),T({type:"SET_ISVALIDATING",payload:!1})})):(T({type:"SET_FIELD_ERROR",payload:{field:be,value:qe}}),Promise.resolve(qe))}else if(f.validationSchema)return T({type:"SET_ISVALIDATING",payload:!0}),A(C.values,be).then(function(rt){return rt}).then(function(rt){T({type:"SET_FIELD_ERROR",payload:{field:be,value:gh(rt,be)}}),T({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),V=G.useCallback(function(be,ke){var qe=ke.validate;m.current[be]={validate:qe}},[]),W=G.useCallback(function(be){delete m.current[be]},[]),K=lp(function(be,ke){T({type:"SET_TOUCHED",payload:be});var qe=ke===void 0?t:ke;return qe?D(C.values):Promise.resolve()}),H=G.useCallback(function(be){T({type:"SET_ERRORS",payload:be})},[]),U=lp(function(be,ke){var qe=ig(be)?be(C.values):be;T({type:"SET_VALUES",payload:qe});var rt=ke===void 0?i:ke;return rt?D(qe):Promise.resolve()}),I=G.useCallback(function(be,ke){T({type:"SET_FIELD_ERROR",payload:{field:be,value:ke}})},[]),Q=lp(function(be,ke,qe){T({type:"SET_FIELD_VALUE",payload:{field:be,value:ke}});var rt=qe===void 0?i:qe;return rt?D(f1(C.values,be,ke)):Promise.resolve()}),Z=G.useCallback(function(be,ke){var qe=ke,rt=be,St;if(!tG(be)){be.persist&&be.persist();var xt=be.target?be.target:be.currentTarget,It=xt.type,Zt=xt.name,ct=xt.id,Qe=xt.value,Et=xt.checked;xt.outerHTML;var Gt=xt.options,Xe=xt.multiple;qe=ke||Zt||ct,rt=/number|range/.test(It)?(St=parseFloat(Qe),isNaN(St)?"":St):/checkbox/.test(It)?$qe(gh(C.values,qe),Et,Qe):Gt&&Xe?Yqe(Gt):Qe}qe&&Q(qe,rt)},[Q,C.values]),ee=lp(function(be){if(tG(be))return function(ke){return Z(ke,be)};Z(be)}),ie=lp(function(be,ke,qe){ke===void 0&&(ke=!0),T({type:"SET_FIELD_TOUCHED",payload:{field:be,value:ke}});var rt=qe===void 0?t:qe;return rt?D(C.values):Promise.resolve()}),de=G.useCallback(function(be,ke){be.persist&&be.persist();var qe=be.target,rt=qe.name,St=qe.id;qe.outerHTML;var xt=ke||rt||St;ie(xt,!0)},[ie]),pe=lp(function(be){if(tG(be))return function(ke){return de(ke,be)};de(be)}),_e=G.useCallback(function(be){ig(be)?T({type:"SET_FORMIK_STATE",payload:be}):T({type:"SET_FORMIK_STATE",payload:function(){return be}})},[]),Te=G.useCallback(function(be){T({type:"SET_STATUS",payload:be})},[]),De=G.useCallback(function(be){T({type:"SET_ISSUBMITTING",payload:be})},[]),Pe=lp(function(){return T({type:"SUBMIT_ATTEMPT"}),D().then(function(be){var ke=be instanceof Error,qe=!ke&&Object.keys(be).length===0;if(qe){var rt;try{if(rt=je(),rt===void 0)return}catch(St){throw St}return Promise.resolve(rt).then(function(St){return y.current&&T({type:"SUBMIT_SUCCESS"}),St}).catch(function(St){if(y.current)throw T({type:"SUBMIT_FAILURE"}),St})}else if(y.current&&(T({type:"SUBMIT_FAILURE"}),ke))throw be})}),Ee=lp(function(be){be&&be.preventDefault&&ig(be.preventDefault)&&be.preventDefault(),be&&be.stopPropagation&&ig(be.stopPropagation)&&be.stopPropagation(),Pe().catch(function(ke){console.warn("Warning: An unhandled error was caught from submitForm()",ke)})}),Re={resetForm:j,validateForm:D,validateField:N,setErrors:H,setFieldError:I,setFieldTouched:ie,setFieldValue:Q,setStatus:Te,setSubmitting:De,setTouched:K,setValues:U,setFormikState:_e,submitForm:Pe},je=lp(function(){return c(C.values,Re)}),Ke=lp(function(be){be&&be.preventDefault&&ig(be.preventDefault)&&be.preventDefault(),be&&be.stopPropagation&&ig(be.stopPropagation)&&be.stopPropagation(),j()}),ot=G.useCallback(function(be){return{value:gh(C.values,be),error:gh(C.errors,be),touched:!!gh(C.touched,be),initialValue:gh(h.current,be),initialTouched:!!gh(g.current,be),initialError:gh(p.current,be)}},[C.errors,C.touched,C.values]),We=G.useCallback(function(be){return{setValue:function(qe,rt){return Q(be,qe,rt)},setTouched:function(qe,rt){return ie(be,qe,rt)},setError:function(qe){return I(be,qe)}}},[Q,ie,I]),xe=G.useCallback(function(be){var ke=GU(be),qe=ke?be.name:be,rt=gh(C.values,qe),St={name:qe,value:rt,onChange:ee,onBlur:pe};if(ke){var xt=be.type,It=be.value,Zt=be.as,ct=be.multiple;xt==="checkbox"?It===void 0?St.checked=!!rt:(St.checked=!!(Array.isArray(rt)&&~rt.indexOf(It)),St.value=It):xt==="radio"?(St.checked=rt===It,St.value=It):Zt==="select"&&ct&&(St.value=St.value||[],St.multiple=!0)}return St},[pe,ee,C.values]),ve=G.useMemo(function(){return!jw(h.current,C.values)},[h.current,C.values]),he=G.useMemo(function(){return typeof s<"u"?ve?C.errors&&Object.keys(C.errors).length===0:s!==!1&&ig(s)?s(f):s:C.errors&&Object.keys(C.errors).length===0},[s,ve,C.errors,f]),Se=Au({},C,{initialValues:h.current,initialErrors:p.current,initialTouched:g.current,initialStatus:v.current,handleBlur:pe,handleChange:ee,handleReset:Ke,handleSubmit:Ee,resetForm:j,setErrors:H,setFormikState:_e,setFieldTouched:ie,setFieldValue:Q,setFieldError:I,setStatus:Te,setSubmitting:De,setTouched:K,setValues:U,submitForm:Pe,validateForm:D,validateField:N,isValid:he,dirty:ve,unregisterField:W,registerField:V,getFieldProps:xe,getFieldMeta:ot,getFieldHelpers:We,validateOnBlur:t,validateOnChange:i,validateOnMount:a});return Se}function zqe(r){var e={};if(r.inner){if(r.inner.length===0)return f1(e,r.path,r.message);for(var t=r.inner,i=Array.isArray(t),n=0,t=i?t:t[Symbol.iterator]();;){var o;if(i){if(n>=t.length)break;o=t[n++]}else{if(n=t.next(),n.done)break;o=n.value}var a=o;gh(e,a.path)||(e=f1(e,a.path,a.message))}}return e}function Wqe(r,e,i,n){i===void 0&&(i=!1);var t=BY(r);return e[i?"validateSync":"validate"](t,{abortEarly:!1,context:t})}function BY(r){var e=Array.isArray(r)?[]:{};for(var i in r)if(Object.prototype.hasOwnProperty.call(r,i)){var n=String(i);Array.isArray(r[n])===!0?e[n]=r[n].map(function(t){return Array.isArray(t)===!0||Uce(t)?BY(t):t!==""?t:void 0}):Uce(r[n])?e[n]=BY(r[n]):e[n]=r[n]!==""?r[n]:void 0}return e}function Gqe(r,e,i){var n=r.slice();return e.forEach(function(o,a){if(typeof n[a]>"u"){var s=i.clone!==!1,l=s&&i.isMergeableObject(o);n[a]=l?kY(Array.isArray(o)?[]:{},o,i):o}else i.isMergeableObject(o)?n[a]=kY(r[a],o,i):r.indexOf(o)===-1&&n.push(o)}),n}function Yqe(r){return Array.from(r).filter(function(e){return e.selected}).map(function(e){return e.value})}function $qe(r,e,i){if(typeof r=="boolean")return!!e;var n=[],t=!1,o=-1;if(Array.isArray(r))n=r,o=r.indexOf(i),t=o>=0;else if(!i||i=="true"||i=="false")return!!e;return e&&i&&!t?n.concat(i):t?n.slice(0,o).concat(n.slice(o+1)):n}var qqe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?G.useLayoutEffect:G.useEffect;function lp(r){var e=G.useRef(r);return qqe(function(){e.current=r}),G.useCallback(function(){for(var i=arguments.length,n=new Array(i),t=0;t<i;t++)n[t]=arguments[t];return e.current.apply(void 0,n)},[])}var Xqe=G.forwardRef(function(r,e){var i=r.action,n=Axe(r,["action"]),t=i??"#",o=Bqe(),a=o.handleReset,s=o.handleSubmit;return G.createElement("form",Au({onSubmit:s,ref:e,onReset:a,action:t},n))});Xqe.displayName="Form";var iG,pde;function Kqe(){if(pde)return iG;pde=1;function r(y){this._maxSize=y,this.clear()}r.prototype.clear=function(){this._size=0,this._values=Object.create(null)},r.prototype.get=function(y){return this._values[y]},r.prototype.set=function(y,m){return this._size>=this._maxSize&&this.clear(),y in this._values||this._size++,this._values[y]=m};var e=/[^.^\]^[]+|(?=\[\]|\.\.)/g,i=/^\d+$/,n=/^\d/,t=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,o=/^\s*(['"]?)(.*?)(\1)\s*$/,a=512,s=new r(a),l=new r(a),u=new r(a);iG={Cache:r,split:d,normalizePath:c,setter:function(y){var m=c(y);return l.get(y)||l.set(y,function(S,_){for(var C=0,T=m.length,x=S;C<T-1;){var A=m[C];if(A==="__proto__"||A==="constructor"||A==="prototype")return S;x=x[m[C++]]}x[m[C]]=_})},getter:function(y,m){var b=c(y);return u.get(y)||u.set(y,function(_){for(var C=0,T=b.length;C<T;)if(_!=null||!m)_=_[b[C++]];else return;return _})},join:function(y){return y.reduce(function(m,b){return m+(h(b)||i.test(b)?"["+b+"]":(m?".":"")+b)},"")},forEach:function(y,m,b){f(Array.isArray(y)?y:d(y),m,b)}};function c(y){return s.get(y)||s.set(y,d(y).map(function(m){return m.replace(o,"$2")}))}function d(y){return y.match(e)||[""]}function f(y,m,b){var S=y.length,_,C,T,x;for(C=0;C<S;C++)_=y[C],_&&(v(_)&&(_='"'+_+'"'),x=h(_),T=!x&&/^\d+$/.test(_),m.call(b,_,x,T,C,y))}function h(y){return typeof y=="string"&&y&&["'",'"'].indexOf(y.charAt(0))!==-1}function p(y){return y.match(n)&&!y.match(i)}function g(y){return t.test(y)}function v(y){return!h(y)&&(p(y)||g(y))}return iG}var h1=Kqe(),nG,gde;function Zqe(){if(gde)return nG;gde=1;const r=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,e=c=>c.match(r)||[],i=c=>c[0].toUpperCase()+c.slice(1),n=(c,d)=>e(c).join(d).toLowerCase(),t=c=>e(c).reduce((d,f)=>`${d}${d?f[0].toUpperCase()+f.slice(1).toLowerCase():f.toLowerCase()}`,"");return nG={words:e,upperFirst:i,camelCase:t,pascalCase:c=>i(t(c)),snakeCase:c=>n(c,"_"),kebabCase:c=>n(c,"-"),sentenceCase:c=>i(n(c," ")),titleCase:c=>e(c).map(i).join(" ")},nG}var oG=Zqe(),$j={exports:{}},vde;function Jqe(){if(vde)return $j.exports;vde=1,$j.exports=function(t){return r(e(t),t)},$j.exports.array=r;function r(t,o){var a=t.length,s=new Array(a),l={},u=a,c=i(o),d=n(t);for(o.forEach(function(h){if(!d.has(h[0])||!d.has(h[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});u--;)l[u]||f(t[u],u,new Set);return s;function f(h,p,g){if(g.has(h)){var v;try{v=", node was:"+JSON.stringify(h)}catch{v=""}throw new Error("Cyclic dependency"+v)}if(!d.has(h))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(h));if(!l[p]){l[p]=!0;var y=c.get(h)||new Set;if(y=Array.from(y),p=y.length){g.add(h);do{var m=y[--p];f(m,d.get(m),g)}while(p);g.delete(h)}s[--a]=h}}}function e(t){for(var o=new Set,a=0,s=t.length;a<s;a++){var l=t[a];o.add(l[0]),o.add(l[1])}return Array.from(o)}function i(t){for(var o=new Map,a=0,s=t.length;a<s;a++){var l=t[a];o.has(l[0])||o.set(l[0],new Set),o.has(l[1])||o.set(l[1],new Set),o.get(l[0]).add(l[1])}return o}function n(t){for(var o=new Map,a=0,s=t.length;a<s;a++)o.set(t[a],a);return o}return $j.exports}var Qqe=Jqe();const e8e=Lu(Qqe),t8e=Object.prototype.toString,r8e=Error.prototype.toString,i8e=RegExp.prototype.toString,n8e=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",o8e=/^Symbol\((.*)\)(.*)$/;function a8e(r){return r!=+r?"NaN":r===0&&1/r<0?"-0":""+r}function yde(r,e=!1){if(r==null||r===!0||r===!1)return""+r;const i=typeof r;if(i==="number")return a8e(r);if(i==="string")return e?`"${r}"`:r;if(i==="function")return"[Function "+(r.name||"anonymous")+"]";if(i==="symbol")return n8e.call(r).replace(o8e,"Symbol($1)");const n=t8e.call(r).slice(8,-1);return n==="Date"?isNaN(r.getTime())?""+r:r.toISOString(r):n==="Error"||r instanceof Error?"["+r8e.call(r)+"]":n==="RegExp"?i8e.call(r):null}function MS(r,e){let i=yde(r,e);return i!==null?i:JSON.stringify(r,function(n,t){let o=yde(this[n],e);return o!==null?o:t},2)}function Oxe(r){return r==null?[]:[].concat(r)}let Dxe,Rxe,Mxe,s8e=/\$\{\s*(\w+)\s*\}/g;Dxe=Symbol.toStringTag;class mde{constructor(e,i,n,t){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[Dxe]="Error",this.name="ValidationError",this.value=i,this.path=n,this.type=t,this.errors=[],this.inner=[],Oxe(e).forEach(o=>{if(Md.isError(o)){this.errors.push(...o.errors);const a=o.inner.length?o.inner:[o];this.inner.push(...a)}else this.errors.push(o)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}Rxe=Symbol.hasInstance;Mxe=Symbol.toStringTag;class Md extends Error{static formatError(e,i){const n=i.label||i.path||"this";return i=Object.assign({},i,{path:n,originalPath:i.path}),typeof e=="string"?e.replace(s8e,(t,o)=>MS(i[o])):typeof e=="function"?e(i):e}static isError(e){return e&&e.name==="ValidationError"}constructor(e,i,n,t,o){const a=new mde(e,i,n,t);if(o)return a;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[Mxe]="Error",this.name=a.name,this.message=a.message,this.type=a.type,this.value=a.value,this.path=a.path,this.errors=a.errors,this.inner=a.inner,Error.captureStackTrace&&Error.captureStackTrace(this,Md)}static[Rxe](e){return mde[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let yv={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:r,type:e,value:i,originalValue:n})=>{const t=n!=null&&n!==i?` (cast from the value \`${MS(n,!0)}\`).`:".";return e!=="mixed"?`${r} must be a \`${e}\` type, but the final value was: \`${MS(i,!0)}\``+t:`${r} must match the configured type. The validated value was: \`${MS(i,!0)}\``+t}},_f={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},l8e={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},VY={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},u8e={isValue:"${path} field must be ${value}"},gV={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},c8e={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},d8e={notType:r=>{const{path:e,value:i,spec:n}=r,t=n.types.length;if(Array.isArray(i)){if(i.length<t)return`${e} tuple value has too few items, expected a length of ${t} but got ${i.length} for value: \`${MS(i,!0)}\``;if(i.length>t)return`${e} tuple value has too many items, expected a length of ${t} but got ${i.length} for value: \`${MS(i,!0)}\``}return Md.formatError(yv.notType,r)}};Object.assign(Object.create(null),{mixed:yv,string:_f,number:l8e,date:VY,object:gV,array:c8e,boolean:u8e,tuple:d8e});const i9=r=>r&&r.__isYupSchema__;class h3{static fromOptions(e,i){if(!i.then&&!i.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:t,otherwise:o}=i,a=typeof n=="function"?n:(...s)=>s.every(l=>l===n);return new h3(e,(s,l)=>{var u;let c=a(...s)?t:o;return(u=c==null?void 0:c(l))!=null?u:l})}constructor(e,i){this.fn=void 0,this.refs=e,this.refs=e,this.fn=i}resolve(e,i){let n=this.refs.map(o=>o.getValue(i==null?void 0:i.value,i==null?void 0:i.parent,i==null?void 0:i.context)),t=this.fn(n,e,i);if(t===void 0||t===e)return e;if(!i9(t))throw new TypeError("conditions must return a schema object");return t.resolve(i)}}const qj={context:"$",value:"."};class nO{constructor(e,i={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof e!="string")throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),e==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===qj.context,this.isValue=this.key[0]===qj.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?qj.context:this.isValue?qj.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&h1.getter(this.path,!0),this.map=i.map}getValue(e,i,n){let t=this.isContext?n:this.isValue?e:i;return this.getter&&(t=this.getter(t||{})),this.map&&(t=this.map(t)),t}cast(e,i){return this.getValue(e,i==null?void 0:i.parent,i==null?void 0:i.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}nO.prototype.__isYupRef=!0;const Xw=r=>r==null;function VD(r){function e({value:i,path:n="",options:t,originalValue:o,schema:a},s,l){const{name:u,test:c,params:d,message:f,skipAbsent:h}=r;let{parent:p,context:g,abortEarly:v=a.spec.abortEarly,disableStackTrace:y=a.spec.disableStackTrace}=t;const m={value:i,parent:p,context:g};function b(L={}){const k=Lxe(Object.assign({value:i,originalValue:o,label:a.spec.label,path:L.path||n,spec:a.spec,disableStackTrace:L.disableStackTrace||y},d,L.params),m),D=new Md(Md.formatError(L.message||f,k),i,k.path,L.type||u,k.disableStackTrace);return D.params=k,D}const S=v?s:l;let _={path:n,parent:p,type:u,from:t.from,createError:b,resolve(L){return kxe(L,m)},options:t,originalValue:o,schema:a};const C=L=>{Md.isError(L)?S(L):L?l(null):S(b())},T=L=>{Md.isError(L)?S(L):s(L)};if(h&&Xw(i))return C(!0);let A;try{var w;if(A=c.call(_,i,_),typeof((w=A)==null?void 0:w.then)=="function"){if(t.sync)throw new Error(`Validation test of type: "${_.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(A).then(C,T)}}catch(L){T(L);return}C(A)}return e.OPTIONS=r,e}function Lxe(r,e){if(!r)return r;for(const i of Object.keys(r))r[i]=kxe(r[i],e);return r}function kxe(r,e){return nO.isRef(r)?r.getValue(e.value,e.parent,e.context):r}function f8e(r,e,i,n=i){let t,o,a;return e?(h1.forEach(e,(s,l,u)=>{let c=l?s.slice(1,s.length-1):s;r=r.resolve({context:n,parent:t,value:i});let d=r.type==="tuple",f=u?parseInt(c,10):0;if(r.innerType||d){if(d&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${a}" must contain an index to the tuple element, e.g. "${a}[0]"`);if(i&&f>=i.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${s}, in the path: ${e}. because there is no value at that index. `);t=i,i=i&&i[f],r=d?r.spec.types[f]:r.innerType}if(!u){if(!r.fields||!r.fields[c])throw new Error(`The schema does not contain the path: ${e}. (failed at: ${a} which is a type: "${r.type}")`);t=i,i=i&&i[c],r=r.fields[c]}o=c,a=l?"["+s+"]":"."+s}),{schema:r,parent:t,parentPath:o}):{parent:t,parentPath:e,schema:r}}class p3 extends Set{describe(){const e=[];for(const i of this.values())e.push(nO.isRef(i)?i.describe():i);return e}resolveAll(e){let i=[];for(const n of this.values())i.push(e(n));return i}clone(){return new p3(this.values())}merge(e,i){const n=this.clone();return e.forEach(t=>n.add(t)),i.forEach(t=>n.delete(t)),n}}function oR(r,e=new Map){if(i9(r)||!r||typeof r!="object")return r;if(e.has(r))return e.get(r);let i;if(r instanceof Date)i=new Date(r.getTime()),e.set(r,i);else if(r instanceof RegExp)i=new RegExp(r),e.set(r,i);else if(Array.isArray(r)){i=new Array(r.length),e.set(r,i);for(let n=0;n<r.length;n++)i[n]=oR(r[n],e)}else if(r instanceof Map){i=new Map,e.set(r,i);for(const[n,t]of r.entries())i.set(n,oR(t,e))}else if(r instanceof Set){i=new Set,e.set(r,i);for(const n of r)i.add(oR(n,e))}else if(r instanceof Object){i={},e.set(r,i);for(const[n,t]of Object.entries(r))i[n]=oR(t,e)}else throw Error(`Unable to clone ${r}`);return i}function h8e(r){if(!(r!=null&&r.length))return;const e=[];let i="",n=!1,t=!1;for(let o=0;o<r.length;o++){const a=r[o];if(a==="["&&!t){i&&(e.push(...i.split(".").filter(Boolean)),i=""),n=!0;continue}if(a==="]"&&!t){i&&(/^\d+$/.test(i)?e.push(i):e.push(i.replace(/^"|"$/g,"")),i=""),n=!1;continue}if(a==='"'){t=!t;continue}if(a==="."&&!n&&!t){i&&(e.push(i),i="");continue}i+=a}return i&&e.push(...i.split(".").filter(Boolean)),e}function p8e(r,e){const i=e?`${e}.${r.path}`:r.path;return r.errors.map(n=>({message:n,path:h8e(i)}))}function Ixe(r,e){var i;if(!((i=r.inner)!=null&&i.length)&&r.errors.length)return p8e(r,e);const n=e?`${e}.${r.path}`:r.path;return r.inner.flatMap(t=>Ixe(t,n))}let Kv=class{constructor(e){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new p3,this._blacklist=new p3,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(yv.notType)}),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},e==null?void 0:e.spec),this.withMutation(i=>{i.nonNullable()})}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const i=Object.create(Object.getPrototypeOf(this));return i.type=this.type,i._typeCheck=this._typeCheck,i._whitelist=this._whitelist.clone(),i._blacklist=this._blacklist.clone(),i.internalTests=Object.assign({},this.internalTests),i.exclusiveTests=Object.assign({},this.exclusiveTests),i.deps=[...this.deps],i.conditions=[...this.conditions],i.tests=[...this.tests],i.transforms=[...this.transforms],i.spec=oR(Object.assign({},this.spec,e)),i}label(e){let i=this.clone();return i.spec.label=e,i}meta(...e){if(e.length===0)return this.spec.meta;let i=this.clone();return i.spec.meta=Object.assign(i.spec.meta||{},e[0]),i}withMutation(e){let i=this._mutate;this._mutate=!0;let n=e(this);return this._mutate=i,n}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let i=this,n=e.clone();const t=Object.assign({},i.spec,n.spec);return n.spec=t,n.internalTests=Object.assign({},i.internalTests,n.internalTests),n._whitelist=i._whitelist.merge(e._whitelist,e._blacklist),n._blacklist=i._blacklist.merge(e._blacklist,e._whitelist),n.tests=i.tests,n.exclusiveTests=i.exclusiveTests,n.withMutation(o=>{e.tests.forEach(a=>{o.test(a.OPTIONS)})}),n.transforms=[...i.transforms,...n.transforms],n}isType(e){return e==null?!!(this.spec.nullable&&e===null||this.spec.optional&&e===void 0):this._typeCheck(e)}resolve(e){let i=this;if(i.conditions.length){let n=i.conditions;i=i.clone(),i.conditions=[],i=n.reduce((t,o)=>o.resolve(t,e),i),i=i.resolve(e)}return i}resolveOptions(e){var i,n,t,o;return Object.assign({},e,{from:e.from||[],strict:(i=e.strict)!=null?i:this.spec.strict,abortEarly:(n=e.abortEarly)!=null?n:this.spec.abortEarly,recursive:(t=e.recursive)!=null?t:this.spec.recursive,disableStackTrace:(o=e.disableStackTrace)!=null?o:this.spec.disableStackTrace})}cast(e,i={}){let n=this.resolve(Object.assign({},i,{value:e})),t=i.assert==="ignore-optionality",o=n._cast(e,i);if(i.assert!==!1&&!n.isType(o)){if(t&&Xw(o))return o;let a=MS(e),s=MS(o);throw new TypeError(`The value of ${i.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}". 

attempted value: ${a} 
`+(s!==a?`result of cast: ${s}`:""))}return o}_cast(e,i){let n=e===void 0?e:this.transforms.reduce((t,o)=>o.call(this,t,e,this,i),e);return n===void 0&&(n=this.getDefault(i)),n}_validate(e,i={},n,t){let{path:o,originalValue:a=e,strict:s=this.spec.strict}=i,l=e;s||(l=this._cast(l,Object.assign({assert:!1},i)));let u=[];for(let c of Object.values(this.internalTests))c&&u.push(c);this.runTests({path:o,value:l,originalValue:a,options:i,tests:u},n,c=>{if(c.length)return t(c,l);this.runTests({path:o,value:l,originalValue:a,options:i,tests:this.tests},n,t)})}runTests(e,i,n){let t=!1,{tests:o,value:a,originalValue:s,path:l,options:u}=e,c=g=>{t||(t=!0,i(g,a))},d=g=>{t||(t=!0,n(g,a))},f=o.length,h=[];if(!f)return d([]);let p={value:a,originalValue:s,path:l,options:u,schema:this};for(let g=0;g<o.length;g++){const v=o[g];v(p,c,function(m){m&&(Array.isArray(m)?h.push(...m):h.push(m)),--f<=0&&d(h)})}}asNestedTest({key:e,index:i,parent:n,parentPath:t,originalParent:o,options:a}){const s=e??i;if(s==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof s=="number";let u=n[s];const c=Object.assign({},a,{strict:!0,parent:n,value:u,originalValue:o[s],key:void 0,[l?"index":"key"]:s,path:l||s.includes(".")?`${t||""}[${l?s:`"${s}"`}]`:(t?`${t}.`:"")+e});return(d,f,h)=>this.resolve(c)._validate(u,c,f,h)}validate(e,i){var n;let t=this.resolve(Object.assign({},i,{value:e})),o=(n=i==null?void 0:i.disableStackTrace)!=null?n:t.spec.disableStackTrace;return new Promise((a,s)=>t._validate(e,i,(l,u)=>{Md.isError(l)&&(l.value=u),s(l)},(l,u)=>{l.length?s(new Md(l,u,void 0,void 0,o)):a(u)}))}validateSync(e,i){var n;let t=this.resolve(Object.assign({},i,{value:e})),o,a=(n=i==null?void 0:i.disableStackTrace)!=null?n:t.spec.disableStackTrace;return t._validate(e,Object.assign({},i,{sync:!0}),(s,l)=>{throw Md.isError(s)&&(s.value=l),s},(s,l)=>{if(s.length)throw new Md(s,e,void 0,void 0,a);o=l}),o}isValid(e,i){return this.validate(e,i).then(()=>!0,n=>{if(Md.isError(n))return!1;throw n})}isValidSync(e,i){try{return this.validateSync(e,i),!0}catch(n){if(Md.isError(n))return!1;throw n}}_getDefault(e){let i=this.spec.default;return i==null?i:typeof i=="function"?i.call(this,e):oR(i)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){return arguments.length===0?this._getDefault():this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,i){const n=this.clone({nullable:e});return n.internalTests.nullable=VD({message:i,name:"nullable",test(t){return t===null?this.schema.spec.nullable:!0}}),n}optionality(e,i){const n=this.clone({optional:e});return n.internalTests.optionality=VD({message:i,name:"optionality",test(t){return t===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(e=yv.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=yv.notNull){return this.nullability(!1,e)}required(e=yv.required){return this.clone().withMutation(i=>i.nonNullable(e).defined(e))}notRequired(){return this.clone().withMutation(e=>e.nullable().optional())}transform(e){let i=this.clone();return i.transforms.push(e),i}test(...e){let i;if(e.length===1?typeof e[0]=="function"?i={test:e[0]}:i=e[0]:e.length===2?i={name:e[0],test:e[1]}:i={name:e[0],message:e[1],test:e[2]},i.message===void 0&&(i.message=yv.default),typeof i.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),t=VD(i),o=i.exclusive||i.name&&n.exclusiveTests[i.name]===!0;if(i.exclusive&&!i.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return i.name&&(n.exclusiveTests[i.name]=!!i.exclusive),n.tests=n.tests.filter(a=>!(a.OPTIONS.name===i.name&&(o||a.OPTIONS.test===t.OPTIONS.test))),n.tests.push(t),n}when(e,i){!Array.isArray(e)&&typeof e!="string"&&(i=e,e=".");let n=this.clone(),t=Oxe(e).map(o=>new nO(o));return t.forEach(o=>{o.isSibling&&n.deps.push(o.key)}),n.conditions.push(typeof i=="function"?new h3(t,i):h3.fromOptions(t,i)),n}typeError(e){let i=this.clone();return i.internalTests.typeError=VD({message:e,name:"typeError",skipAbsent:!0,test(n){return this.schema._typeCheck(n)?!0:this.createError({params:{type:this.schema.type}})}}),i}oneOf(e,i=yv.oneOf){let n=this.clone();return e.forEach(t=>{n._whitelist.add(t),n._blacklist.delete(t)}),n.internalTests.whiteList=VD({message:i,name:"oneOf",skipAbsent:!0,test(t){let o=this.schema._whitelist,a=o.resolveAll(this.resolve);return a.includes(t)?!0:this.createError({params:{values:Array.from(o).join(", "),resolved:a}})}}),n}notOneOf(e,i=yv.notOneOf){let n=this.clone();return e.forEach(t=>{n._blacklist.add(t),n._whitelist.delete(t)}),n.internalTests.blacklist=VD({message:i,name:"notOneOf",test(t){let o=this.schema._blacklist,a=o.resolveAll(this.resolve);return a.includes(t)?this.createError({params:{values:Array.from(o).join(", "),resolved:a}}):!0}}),n}strip(e=!0){let i=this.clone();return i.spec.strip=e,i}describe(e){const i=(e?this.resolve(e):this).clone(),{label:n,meta:t,optional:o,nullable:a}=i.spec;return{meta:t,label:n,optional:o,nullable:a,default:i.getDefault(e),type:i.type,oneOf:i._whitelist.describe(),notOneOf:i._blacklist.describe(),tests:i.tests.filter((l,u,c)=>c.findIndex(d=>d.OPTIONS.name===l.OPTIONS.name)===u).map(l=>{const u=l.OPTIONS.params&&e?Lxe(Object.assign({},l.OPTIONS.params),e):l.OPTIONS.params;return{name:l.OPTIONS.name,params:u}})}}get"~standard"(){const e=this;return{version:1,vendor:"yup",async validate(n){try{return{value:await e.validate(n,{abortEarly:!1})}}catch(t){if(t instanceof Md)return{issues:Ixe(t)};throw t}}}}};Kv.prototype.__isYupSchema__=!0;for(const r of["validate","validateSync"])Kv.prototype[`${r}At`]=function(e,i,n={}){const{parent:t,parentPath:o,schema:a}=f8e(this,e,i,n.context);return a[r](t&&t[o],Object.assign({},n,{parent:t,path:e}))};for(const r of["equals","is"])Kv.prototype[r]=Kv.prototype.oneOf;for(const r of["not","nope"])Kv.prototype[r]=Kv.prototype.notOneOf;const g8e=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function v8e(r){const e=HY(r);if(!e)return Date.parse?Date.parse(r):Number.NaN;if(e.z===void 0&&e.plusMinus===void 0)return new Date(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond).valueOf();let i=0;return e.z!=="Z"&&e.plusMinus!==void 0&&(i=e.hourOffset*60+e.minuteOffset,e.plusMinus==="+"&&(i=0-i)),Date.UTC(e.year,e.month,e.day,e.hour,e.minute+i,e.second,e.millisecond)}function HY(r){var e,i;const n=g8e.exec(r);return n?{year:g0(n[1]),month:g0(n[2],1)-1,day:g0(n[3],1),hour:g0(n[4]),minute:g0(n[5]),second:g0(n[6]),millisecond:n[7]?g0(n[7].substring(0,3)):0,precision:(e=(i=n[7])==null?void 0:i.length)!=null?e:void 0,z:n[8]||void 0,plusMinus:n[9]||void 0,hourOffset:g0(n[10]),minuteOffset:g0(n[11])}:null}function g0(r,e=0){return Number(r)||e}let y8e=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,m8e=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,b8e=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,S8e="^\\d{4}-\\d{2}-\\d{2}",_8e="\\d{2}:\\d{2}:\\d{2}",P8e="(([+-]\\d{2}(:?\\d{2})?)|Z)",C8e=new RegExp(`${S8e}T${_8e}(\\.\\d+)?${P8e}$`),T8e=r=>Xw(r)||r===r.trim(),x8e={}.toString();function UY(){return new Nxe}class Nxe extends Kv{constructor(){super({type:"string",check(e){return e instanceof String&&(e=e.valueOf()),typeof e=="string"}}),this.withMutation(()=>{this.transform((e,i)=>{if(!this.spec.coerce||this.isType(e)||Array.isArray(e))return e;const n=e!=null&&e.toString?e.toString():e;return n===x8e?e:n})})}required(e){return super.required(e).withMutation(i=>i.test({message:e||yv.required,name:"required",skipAbsent:!0,test:n=>!!n.length}))}notRequired(){return super.notRequired().withMutation(e=>(e.tests=e.tests.filter(i=>i.OPTIONS.name!=="required"),e))}length(e,i=_f.length){return this.test({message:i,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(n){return n.length===this.resolve(e)}})}min(e,i=_f.min){return this.test({message:i,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(n){return n.length>=this.resolve(e)}})}max(e,i=_f.max){return this.test({name:"max",exclusive:!0,message:i,params:{max:e},skipAbsent:!0,test(n){return n.length<=this.resolve(e)}})}matches(e,i){let n=!1,t,o;return i&&(typeof i=="object"?{excludeEmptyString:n=!1,message:t,name:o}=i:t=i),this.test({name:o||"matches",message:t||_f.matches,params:{regex:e},skipAbsent:!0,test:a=>a===""&&n||a.search(e)!==-1})}email(e=_f.email){return this.matches(y8e,{name:"email",message:e,excludeEmptyString:!0})}url(e=_f.url){return this.matches(m8e,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=_f.uuid){return this.matches(b8e,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let i="",n,t;return e&&(typeof e=="object"?{message:i="",allowOffset:n=!1,precision:t=void 0}=e:i=e),this.matches(C8e,{name:"datetime",message:i||_f.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:i||_f.datetime_offset,params:{allowOffset:n},skipAbsent:!0,test:o=>{if(!o||n)return!0;const a=HY(o);return a?!!a.z:!1}}).test({name:"datetime_precision",message:i||_f.datetime_precision,params:{precision:t},skipAbsent:!0,test:o=>{if(!o||t==null)return!0;const a=HY(o);return a?a.precision===t:!1}})}ensure(){return this.default("").transform(e=>e===null?"":e)}trim(e=_f.trim){return this.transform(i=>i!=null?i.trim():i).test({message:e,name:"trim",test:T8e})}lowercase(e=_f.lowercase){return this.transform(i=>Xw(i)?i:i.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:i=>Xw(i)||i===i.toLowerCase()})}uppercase(e=_f.uppercase){return this.transform(i=>Xw(i)?i:i.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:i=>Xw(i)||i===i.toUpperCase()})}}UY.prototype=Nxe.prototype;let E8e=new Date(""),A8e=r=>Object.prototype.toString.call(r)==="[object Date]";class n9 extends Kv{constructor(){super({type:"date",check(e){return A8e(e)&&!isNaN(e.getTime())}}),this.withMutation(()=>{this.transform((e,i)=>!this.spec.coerce||this.isType(e)||e===null?e:(e=v8e(e),isNaN(e)?n9.INVALID_DATE:new Date(e)))})}prepareParam(e,i){let n;if(nO.isRef(e))n=e;else{let t=this.cast(e);if(!this._typeCheck(t))throw new TypeError(`\`${i}\` must be a Date or a value that can be \`cast()\` to a Date`);n=t}return n}min(e,i=VY.min){let n=this.prepareParam(e,"min");return this.test({message:i,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t>=this.resolve(n)}})}max(e,i=VY.max){let n=this.prepareParam(e,"max");return this.test({message:i,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(t){return t<=this.resolve(n)}})}}n9.INVALID_DATE=E8e;function w8e(r,e=[]){let i=[],n=new Set,t=new Set(e.map(([a,s])=>`${a}-${s}`));function o(a,s){let l=h1.split(a)[0];n.add(l),t.has(`${s}-${l}`)||i.push([s,l])}for(const a of Object.keys(r)){let s=r[a];n.add(a),nO.isRef(s)&&s.isSibling?o(s.path,a):i9(s)&&"deps"in s&&s.deps.forEach(l=>o(l,a))}return e8e.array(Array.from(n),i).reverse()}function bde(r,e){let i=1/0;return r.some((n,t)=>{var o;if((o=e.path)!=null&&o.includes(n))return i=t,!0}),i}function Fxe(r){return(e,i)=>bde(r,e)-bde(r,i)}const O8e=(r,e,i)=>{if(typeof r!="string")return r;let n=r;try{n=JSON.parse(r)}catch{}return i.isType(n)?n:r};function vV(r){if("fields"in r){const e={};for(const[i,n]of Object.entries(r.fields))e[i]=vV(n);return r.setFields(e)}if(r.type==="array"){const e=r.optional();return e.innerType&&(e.innerType=vV(e.innerType)),e}return r.type==="tuple"?r.optional().clone({types:r.spec.types.map(vV)}):"optional"in r?r.optional():r}const D8e=(r,e)=>{const i=[...h1.normalizePath(e)];if(i.length===1)return i[0]in r;let n=i.pop(),t=h1.getter(h1.join(i),!0)(r);return!!(t&&n in t)};let Sde=r=>Object.prototype.toString.call(r)==="[object Object]";function _de(r,e){let i=Object.keys(r.fields);return Object.keys(e).filter(n=>i.indexOf(n)===-1)}const R8e=Fxe([]);function jxe(r){return new Bxe(r)}class Bxe extends Kv{constructor(e){super({type:"object",check(i){return Sde(i)||typeof i=="function"}}),this.fields=Object.create(null),this._sortErrors=R8e,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,i={}){var n;let t=super._cast(e,i);if(t===void 0)return this.getDefault(i);if(!this._typeCheck(t))return t;let o=this.fields,a=(n=i.stripUnknown)!=null?n:this.spec.noUnknown,s=[].concat(this._nodes,Object.keys(t).filter(d=>!this._nodes.includes(d))),l={},u=Object.assign({},i,{parent:l,__validating:i.__validating||!1}),c=!1;for(const d of s){let f=o[d],h=d in t,p=t[d];if(f){let g;u.path=(i.path?`${i.path}.`:"")+d,f=f.resolve({value:p,context:i.context,parent:l});let v=f instanceof Kv?f.spec:void 0,y=v==null?void 0:v.strict;if(v!=null&&v.strip){c=c||d in t;continue}g=!i.__validating||!y?f.cast(p,u):p,g!==void 0&&(l[d]=g)}else h&&!a&&(l[d]=p);(h!==d in l||l[d]!==p)&&(c=!0)}return c?l:t}_validate(e,i={},n,t){let{from:o=[],originalValue:a=e,recursive:s=this.spec.recursive}=i;i.from=[{schema:this,value:a},...o],i.__validating=!0,i.originalValue=a,super._validate(e,i,n,(l,u)=>{if(!s||!Sde(u)){t(l,u);return}a=a||u;let c=[];for(let d of this._nodes){let f=this.fields[d];!f||nO.isRef(f)||c.push(f.asNestedTest({options:i,key:d,parent:u,parentPath:i.path,originalParent:a}))}this.runTests({tests:c,value:u,originalValue:a,options:i},n,d=>{t(d.sort(this._sortErrors).concat(l),u)})})}clone(e){const i=super.clone(e);return i.fields=Object.assign({},this.fields),i._nodes=this._nodes,i._excludedEdges=this._excludedEdges,i._sortErrors=this._sortErrors,i}concat(e){let i=super.concat(e),n=i.fields;for(let[t,o]of Object.entries(this.fields)){const a=n[t];n[t]=a===void 0?o:a}return i.withMutation(t=>t.setFields(n,[...this._excludedEdges,...e._excludedEdges]))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let i={};return this._nodes.forEach(n=>{var t;const o=this.fields[n];let a=e;(t=a)!=null&&t.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[n]})),i[n]=o&&"getDefault"in o?o.getDefault(a):void 0}),i}setFields(e,i){let n=this.clone();return n.fields=e,n._nodes=w8e(e,i),n._sortErrors=Fxe(Object.keys(e)),i&&(n._excludedEdges=i),n}shape(e,i=[]){return this.clone().withMutation(n=>{let t=n._excludedEdges;return i.length&&(Array.isArray(i[0])||(i=[i]),t=[...n._excludedEdges,...i]),n.setFields(Object.assign(n.fields,e),t)})}partial(){const e={};for(const[i,n]of Object.entries(this.fields))e[i]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(e)}deepPartial(){return vV(this)}pick(e){const i={};for(const n of e)this.fields[n]&&(i[n]=this.fields[n]);return this.setFields(i,this._excludedEdges.filter(([n,t])=>e.includes(n)&&e.includes(t)))}omit(e){const i=[];for(const n of Object.keys(this.fields))e.includes(n)||i.push(n);return this.pick(i)}from(e,i,n){let t=h1.getter(e,!0);return this.transform(o=>{if(!o)return o;let a=o;return D8e(o,e)&&(a=Object.assign({},o),n||delete a[e],a[i]=t(o)),a})}json(){return this.transform(O8e)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||gV.exact,test(i){if(i==null)return!0;const n=_de(this.schema,i);return n.length===0||this.createError({params:{properties:n.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,i=gV.noUnknown){typeof e!="boolean"&&(i=e,e=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:i,test(t){if(t==null)return!0;const o=_de(this.schema,t);return!e||o.length===0||this.createError({params:{unknown:o.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(e=!0,i=gV.noUnknown){return this.noUnknown(!e,i)}transformKeys(e){return this.transform(i=>{if(!i)return i;const n={};for(const t of Object.keys(i))n[e(t)]=i[t];return n})}camelCase(){return this.transformKeys(oG.camelCase)}snakeCase(){return this.transformKeys(oG.snakeCase)}constantCase(){return this.transformKeys(e=>oG.snakeCase(e).toUpperCase())}describe(e){const i=(e?this.resolve(e):this).clone(),n=super.describe(e);n.fields={};for(const[o,a]of Object.entries(i.fields)){var t;let s=e;(t=s)!=null&&t.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[o]})),n.fields[o]=a.describe(s)}return n}}jxe.prototype=Bxe.prototype;function Wi(...r){return J$(Sg(r))}const HD=r=>{const e=Math.floor(r/1e3),i=Math.floor(e/60),n=e%60;return`${i}:${n.toString().padStart(2,"0")}`},dv=r=>{const e=r.trim();if(e.endsWith("us")){const i=parseFloat(e.slice(0,-2));return isNaN(i)?null:i/1e3}if(e.endsWith("ms")){const i=parseFloat(e.slice(0,-2));return isNaN(i)?null:i}if(e.endsWith("s")){const i=parseFloat(e.slice(0,-1));return isNaN(i)?null:i*1e3}if(e.includes(":")){const i=e.split(":").map(t=>parseInt(t,10));if(i.some(isNaN))return null;let n=0;if(i.length===2)n=i[0]*60+i[1];else if(i.length===3)n=i[0]*3600+i[1]*60+i[2];else return null;return n*1e3}return null};function M8e({children:r,content:e}){const[i,n]=G.useState(!1),[t,o]=G.useState({top:0,left:0}),a=G.useRef(null),s=()=>{if(a.current){const l=a.current.getBoundingClientRect();o({top:l.bottom+8,left:l.left+l.width/2})}};return R.jsxs("div",{ref:a,onMouseEnter:()=>{s(),n(!0)},onMouseLeave:()=>n(!1),onFocus:()=>{s(),n(!0)},onBlur:()=>n(!1),className:"inline-flex",children:[r,i&&au.createPortal(R.jsx("div",{className:Wi("fixed z-[9999] px-3 py-2 rounded-lg shadow-lg","bg-neutral-800 text-white","text-sm max-w-xs","-translate-x-1/2"),style:{top:t.top,left:t.left},children:e}),document.body)]})}function L8e(r){const[e,i]=G.useState(!1),[n,t]=G.useState({top:0,left:0}),o=G.useRef(null),a=G.useRef(null),s=jxe({startTime:UY().required("Start time is required").test("valid-format","Invalid format. Use MM:SS or append s/ms/us",function(v){return v?dv(v)!==null:!1}).test("min-value","Start time must be 0 or greater",function(v){if(!v)return!0;const y=dv(v);return y!==null&&y>=0}).test("max-value",`Must be less than recording duration (${HD(r.recordingSessionInfo.durationMs)})`,function(v){if(!v)return!0;const y=dv(v);return y!==null&&y<=r.recordingSessionInfo.durationMs}),endTime:UY().required("End time is required").test("valid-format","Invalid format. Use MM:SS or append s/ms/us",function(v){return v?dv(v)!==null:!1}).test("min-value","End time must be greater than 0",function(v){if(!v)return!0;const y=dv(v);return y!==null&&y>0}).test("max-value",`Must be less than recording duration (${HD(r.recordingSessionInfo.durationMs)})`,function(v){if(!v)return!0;const y=dv(v);return y!==null&&y<=r.recordingSessionInfo.durationMs}).test("greater-than-start","End time must be greater than start time",function(v){const{startTime:y}=this.parent;if(!v||!y)return!0;const m=dv(y),b=dv(v);return m===null||b===null?!0:b>m})}),l=Uqe({initialValues:{startTime:"",endTime:""},validationSchema:s,validateOnMount:!1,validateOnChange:!0,validateOnBlur:!0,onSubmit:()=>{p()}});G.useEffect(()=>{function v(y){const m=y.target;a.current&&!a.current.contains(m)&&o.current&&!o.current.contains(m)&&i(!1)}if(e)return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[e]);const u=()=>{if(o.current){const v=o.current.getBoundingClientRect();t({top:v.bottom+8,left:v.left+v.width/2})}},c=()=>R.jsx(R.Fragment,{children:r.playbackControls.repeat.isRepeating?R.jsxs("div",{className:"flex flex-col items-center justify-center",children:[R.jsx(Vce,{style:{marginTop:"7px"},sx:{fontSize:17}}),R.jsx(ZTe,{sx:{fontSize:4}})]}):R.jsx(Vce,{sx:{fontSize:17}})}),d=()=>{const v=R.jsxs("div",{className:"text-left",children:[R.jsx("p",{className:"mb-2 font-bold text-white",children:"Input formats"}),R.jsxs("p",{className:"text-sm text-white",children:[R.jsx("span",{className:"font-bold",children:"Seconds"}),": 90s",R.jsx("br",{}),R.jsx("span",{className:"font-bold",children:"Milliseconds"}),": 90000ms",R.jsx("br",{}),R.jsx("span",{className:"font-bold",children:"Microseconds"}),": 90000000us",R.jsx("br",{}),R.jsx("span",{className:"font-bold",children:"MM:SS"}),": 1:30 (1 minute 30 seconds)",R.jsx("br",{}),R.jsx("span",{className:"font-bold",children:"HH:MM:SS"}),": 1:30:45 (1 hour 30 minutes 45 seconds)"]})]});return R.jsx(M8e,{content:v,children:R.jsx("span",{className:"cursor-help",children:R.jsx(MGe,{className:"mx-1",sx:{fontSize:20}})})})},f=async()=>{if(!r.isPlaybackControlsDisabled)try{if(r.playbackControls.repeat.isRepeating){const v=r.playbackControls.repeat.startMs??0,y=r.playbackControls.repeat.endMs??r.recordingSessionInfo.durationMs;await l.setFieldValue("startTime",HD(v)),await l.setFieldValue("endTime",HD(y))}else{const y=r.recordingSessionInfo.durationMs;await l.setFieldValue("startTime",HD(0)),await l.setFieldValue("endTime",HD(y))}l.setErrors({}),l.setTouched({}),u(),i(!e)}catch{Wn.error(r.playbackErrorMessage(),{autoClose:1e4})}},h=async()=>{r.onDisableControlsAndChangePlaybackState(async()=>{await r.playbackControls.setRepeat(!1),l.resetForm(),i(!1)},()=>{Wn.error(r.playbackErrorMessage(),{autoClose:1e4})})},p=async()=>{if(!l.isValid){l.setTouched({startTime:!0,endTime:!0});return}const v=dv(l.values.startTime)??0,y=dv(l.values.endTime);r.onDisableControlsAndChangePlaybackState(async()=>{await r.playbackControls.setRepeat(!0,v,y??void 0),i(!1)},()=>{Wn.error(r.playbackErrorMessage(),{autoClose:1e4})})},g=()=>{const v=!l.isValid||!!l.errors.startTime||!!l.errors.endTime,y=!r.playbackControls.repeat.isRepeating;return R.jsxs("div",{ref:a,className:Wi("fixed z-[9999] p-3 rounded-lg shadow-lg min-w-[260px]","bg-white dark:bg-neutral-800","border border-neutral-200 dark:border-neutral-700","-translate-x-1/2"),style:{top:n.top,left:n.left},children:[R.jsxs("div",{className:"flex items-center mb-2",children:[d(),R.jsx("span",{className:"font-bold text-foreground dark:text-white",children:"Repeat"})]}),R.jsxs("div",{className:Wi("flex justify-between items-center rounded px-2 py-1 mb-1","bg-remotive-primary-10 dark:bg-neutral-700"),children:[R.jsx("p",{className:"m-0 text-sm font-bold text-foreground dark:text-white",title:"Start time of the repeated section",children:"Start"}),R.jsx("input",{title:"MM:SS or number with unit (e.g., 2s, 2000ms, 2000000us)",autoComplete:"off",type:"text",name:"startTime",placeholder:"MM:SS",className:Wi("text-sm text-right px-1 py-0.5 rounded border","max-w-[80px] h-5","bg-white dark:bg-neutral-600","border-neutral-300 dark:border-neutral-500","text-foreground dark:text-white","focus:outline-none focus:ring-1 focus:ring-remotive-primary-60"),value:l.values.startTime,onChange:l.handleChange,onBlur:l.handleBlur})]}),l.errors.startTime&&R.jsx("p",{className:"text-[10px] text-destructive text-right mr-2 m-0 -mt-1 mb-1",children:l.errors.startTime}),R.jsxs("div",{className:Wi("flex justify-between items-center rounded px-2 py-1 mb-1","bg-remotive-primary-10 dark:bg-neutral-700"),children:[R.jsx("p",{className:"m-0 text-sm font-bold text-foreground dark:text-white",title:"End time of the repeated section",children:"End"}),R.jsx("input",{title:"MM:SS or number with unit (e.g., 2s, 2000ms, 2000000us)",type:"text",autoComplete:"off",name:"endTime",placeholder:"MM:SS",className:Wi("text-sm text-right px-1 py-0.5 rounded border","max-w-[80px] h-5","bg-white dark:bg-neutral-600","border-neutral-300 dark:border-neutral-500","text-foreground dark:text-white","focus:outline-none focus:ring-1 focus:ring-remotive-primary-60"),value:l.values.endTime,onChange:l.handleChange,onBlur:l.handleBlur})]}),l.errors.endTime&&R.jsx("p",{className:"text-[10px] text-destructive text-right mr-2 m-0 -mt-1 mb-1",children:l.errors.endTime}),R.jsxs("div",{className:"flex justify-between gap-2 mt-3",children:[R.jsx("button",{title:"Stops and clears the current repeat interval.",className:Wi("flex-1 px-3 py-1.5 rounded text-sm font-medium","bg-primary text-primary-foreground","hover:bg-primary/90","disabled:opacity-50 disabled:cursor-not-allowed","transition-colors"),onClick:h,disabled:y,children:"Stop"}),R.jsx("button",{title:"Applies the current start and end times as the repeat interval.",className:Wi("flex-1 px-3 py-1.5 rounded text-sm font-medium","bg-remotive-success-60 text-white","hover:bg-remotive-success-70","disabled:opacity-50 disabled:cursor-not-allowed","transition-colors"),onClick:p,disabled:v,children:"Apply"})]})]})};return R.jsxs(R.Fragment,{children:[R.jsx("span",{ref:o,title:"Open settings to start and stop repeating the recording",role:"button",tabIndex:0,style:{opacity:r.isPlaybackControlsDisabled?.6:1,cursor:r.isPlaybackControlsDisabled?"not-allowed":"pointer"},onClick:async()=>{f()},onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&f()},className:Wi("inline-flex items-center justify-center","p-0 ml-1 mr-2","border-0 bg-transparent",r.playbackControls.repeat.isRepeating?"text-remotive-success-60":"text-remotive-primary-60","focus:outline-none focus-visible:ring-2 focus-visible:ring-remotive-primary-60 focus-visible:ring-offset-1 rounded"),children:c()}),e&&au.createPortal(g(),document.body)]})}const Pde=async(r,e,i,n)=>{r||n(async()=>{await i.restart()},()=>{Wn.error(e(),{autoClose:1e4})})};function k8e(r){return R.jsx("span",{title:"Restart recording from the beginning",role:"button",tabIndex:0,style:{opacity:r.isPlaybackControlsDisabled?.6:1,cursor:r.isPlaybackControlsDisabled?"not-allowed":"pointer"},onClick:async()=>{Pde(r.isPlaybackControlsDisabled,r.playbackErrorMessage,r.playbackControls,r.onDisableControlsAndChangePlaybackState)},onKeyDown:e=>{(e.key==="Enter"||e.key===" ")&&Pde(r.isPlaybackControlsDisabled,r.playbackErrorMessage,r.playbackControls,r.onDisableControlsAndChangePlaybackState)},className:Wi("inline-flex items-center justify-center","p-0 mr-1","border-0 bg-transparent","text-remotive-primary-60","focus:outline-none focus-visible:ring-2 focus-visible:ring-remotive-primary-60 focus-visible:ring-offset-1 rounded"),children:R.jsx(QTe,{sx:{fontSize:24}})})}const Cde=async(r,e,i,n,t,o)=>{r||(i.isPlaying?o(async()=>{await i.pause()},()=>{Wn.error(e("pause"),{autoClose:1e4})}):(n.track("Play",{path:t}),o(async()=>{await i.play()},()=>{Wn.error(e("play"),{autoClose:1e4})})))};function I8e(r){const e=r.playbackControls.isPlaying,i=e?JTe:$X;return R.jsx("span",{title:`${e?"Pause":"Play"} the recording`,role:"button",tabIndex:0,style:{opacity:r.isPlaybackControlsDisabled?.6:1,cursor:r.isPlaybackControlsDisabled?"not-allowed":"pointer"},onClick:async()=>{Cde(r.isPlaybackControlsDisabled,r.playbackErrorMessage,r.playbackControls,r.productAnalyticsTracker,r.recordingSessionInfo.path,r.onDisableControlsAndChangePlaybackState)},onKeyDown:n=>{(n.key==="Enter"||n.key===" ")&&Cde(r.isPlaybackControlsDisabled,r.playbackErrorMessage,r.playbackControls,r.productAnalyticsTracker,r.recordingSessionInfo.path,r.onDisableControlsAndChangePlaybackState)},className:Wi("inline-flex items-center justify-center","p-0 mr-1","border-0 bg-transparent","text-remotive-primary-60","focus:outline-none focus-visible:ring-2 focus-visible:ring-remotive-primary-60 focus-visible:ring-offset-1 rounded"),children:R.jsx(i,{sx:{fontSize:32}})})}const Tde=async(r,e,i)=>{try{await r.close(),e()}catch{Wn.error(i(),{autoClose:1e4})}};function N8e(r){return R.jsx("div",{role:"button",tabIndex:0,className:Wi("inline-flex items-center justify-center","p-0","border-0 bg-transparent","cursor-pointer","text-foreground dark:text-neutral-300","hover:bg-neutral-100 dark:hover:bg-muted","focus:outline-none focus-visible:ring-2 focus-visible:ring-remotive-primary-60 focus-visible:ring-offset-1 rounded"),onClick:()=>Tde(r.playbackControls,r.onAfterClose,r.playbackErrorMessage),onKeyDown:e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),Tde(r.playbackControls,r.onAfterClose,r.playbackErrorMessage))},children:R.jsx(tM,{sx:{fontSize:12}})})}var aG,xde;function F8e(){if(xde)return aG;xde=1;function r(t){if(typeof t!="number")throw new TypeError("Expected a number");return{days:Math.trunc(t/864e5),hours:Math.trunc(t/36e5)%24,minutes:Math.trunc(t/6e4)%60,seconds:Math.trunc(t/1e3)%60,ms:Math.trunc(t)%1e3}}function e(t,o){o=o||2;let a=t.toString(),s=0;return s=o-a.length+1,a=new Array(s).join("0").concat(a),a}function i(t,o){return o?t<0?"-":"":t<=-1e3?"-":""}function n(t,o){const a=o&&o.leading,s=o&&o.ms,l=t<0?-t:t,u=i(t,s),c=r(l),d=e(c.seconds);let f="";return c.days&&!f&&(f=u+c.days+":"+e(c.hours)+":"+e(c.minutes)+":"+d),c.hours&&!f&&(f=u+(a?e(c.hours):c.hours)+":"+e(c.minutes)+":"+d),f||(f=u+(a?e(c.minutes):c.minutes)+":"+d),s&&(f+="."+e(c.ms,3)),f}return aG=n,aG}var j8e=F8e();const iM=Lu(j8e);function BS(r){"@babel/helpers - typeof";return BS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},BS(r)}function B8e(r,e){if(BS(r)!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var n=i.call(r,e);if(BS(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function V8e(r){var e=B8e(r,"string");return BS(e)=="symbol"?e:e+""}function gg(r,e,i){return(e=V8e(e))in r?Object.defineProperty(r,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[e]=i,r}function Ede(r,e){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),i.push.apply(i,n)}return i}function Wc(r){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?Ede(Object(i),!0).forEach(function(n){gg(r,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):Ede(Object(i)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(i,n))})}return r}function zY(r,e){(e==null||e>r.length)&&(e=r.length);for(var i=0,n=Array(e);i<e;i++)n[i]=r[i];return n}function H8e(r){if(Array.isArray(r))return zY(r)}function U8e(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function Vxe(r,e){if(r){if(typeof r=="string")return zY(r,e);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?zY(r,e):void 0}}function z8e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AS(r){return H8e(r)||U8e(r)||Vxe(r)||z8e()}function W8e(r){if(Array.isArray(r))return r}function G8e(r,e){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var n,t,o,a,s=[],l=!0,u=!1;try{if(o=(i=i.call(r)).next,e===0){if(Object(i)!==i)return;l=!1}else for(;!(l=(n=o.call(i)).done)&&(s.push(n.value),s.length!==e);l=!0);}catch(c){u=!0,t=c}finally{try{if(!l&&i.return!=null&&(a=i.return(),Object(a)!==a))return}finally{if(u)throw t}}return s}}function Y8e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ef(r,e){return W8e(r)||G8e(r,e)||Vxe(r,e)||Y8e()}var sG={exports:{}};/*!
	Copyright (c) 2018 Jed Watson.
	Licensed under the MIT License (MIT), see
	http://jedwatson.github.io/classnames
*/var Ade;function $8e(){return Ade||(Ade=1,(function(r){(function(){var e={}.hasOwnProperty;function i(){for(var o="",a=0;a<arguments.length;a++){var s=arguments[a];s&&(o=t(o,n(s)))}return o}function n(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return i.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var a="";for(var s in o)e.call(o,s)&&o[s]&&(a=t(a,s));return a}function t(o,a){return a?o?o+" "+a:o+a:o}r.exports?(i.default=i,r.exports=i):window.classNames=i})()})(sG)),sG.exports}var q8e=$8e();const Zv=Lu(q8e);function WY(r){var e=G.useRef();e.current=r;var i=G.useCallback(function(){for(var n,t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];return(n=e.current)===null||n===void 0?void 0:n.call.apply(n,[e].concat(o))},[]);return i}function X8e(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var wde=X8e()?G.useLayoutEffect:G.useEffect,K8e=function(e,i){var n=G.useRef(!0);wde(function(){return e(n.current)},i),wde(function(){return n.current=!1,function(){n.current=!0}},[])},Ode=function(e,i){K8e(function(n){if(!n)return e()},i)};function Dde(r){var e=G.useRef(!1),i=G.useState(r),n=Ef(i,2),t=n[0],o=n[1];G.useEffect(function(){return e.current=!1,function(){e.current=!0}},[]);function a(s,l){l&&e.current||o(s)}return[t,a]}function lG(r){return r!==void 0}function Z8e(r,e){var i=e||{},n=i.defaultValue,t=i.value,o=i.onChange,a=i.postState,s=Dde(function(){return lG(t)?t:lG(n)?typeof n=="function"?n():n:typeof r=="function"?r():r}),l=Ef(s,2),u=l[0],c=l[1],d=t!==void 0?t:u,f=a?a(d):d,h=WY(o),p=Dde([d]),g=Ef(p,2),v=g[0],y=g[1];Ode(function(){var b=v[0];u!==b&&h(u,b)},[v]),Ode(function(){lG(t)||c(t)},[t]);var m=WY(function(b,S){c(b,S),y([d],S)});return[f,m]}var GY={},J8e=function(e){};function Q8e(r,e){}function eXe(r,e){}function tXe(){GY={}}function Hxe(r,e,i){!e&&!GY[i]&&(r(!1,i),GY[i]=!0)}function pj(r,e){Hxe(Q8e,r,e)}function rXe(r,e){Hxe(eXe,r,e)}pj.preMessage=J8e;pj.resetWarned=tXe;pj.noteOnce=rXe;function iXe(r,e){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=new Set;function t(o,a){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,l=n.has(o);if(pj(!l,"Warning: There may be circular references"),l)return!1;if(o===a)return!0;if(i&&s>1)return!1;n.add(o);var u=s+1;if(Array.isArray(o)){if(!Array.isArray(a)||o.length!==a.length)return!1;for(var c=0;c<o.length;c++)if(!t(o[c],a[c],u))return!1;return!0}if(o&&a&&BS(o)==="object"&&BS(a)==="object"){var d=Object.keys(o);return d.length!==Object.keys(a).length?!1:d.every(function(f){return t(o[f],a[f],u)})}return!1}return t(r,e)}function Uxe(r,e){if(r==null)return{};var i,n,t=db(r,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);for(n=0;n<o.length;n++)i=o[n],e.indexOf(i)===-1&&{}.propertyIsEnumerable.call(r,i)&&(t[i]=r[i])}return t}function YY(r,e,i){return(r-e)/(i-e)}function o9(r,e,i,n){var t=YY(e,i,n),o={};switch(r){case"rtl":o.right="".concat(t*100,"%"),o.transform="translateX(50%)";break;case"btt":o.bottom="".concat(t*100,"%"),o.transform="translateY(50%)";break;case"ttb":o.top="".concat(t*100,"%"),o.transform="translateY(-50%)";break;default:o.left="".concat(t*100,"%"),o.transform="translateX(-50%)";break}return o}function aR(r,e){return Array.isArray(r)?r[e]:r}var Fc={PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40},oO=G.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:!0,styles:{},classNames:{}}),nXe=["prefixCls","value","valueIndex","onStartMove","style","render","dragging","onOffsetChange","onChangeComplete","onFocus","onMouseEnter"],Rde=G.forwardRef(function(r,e){var i=r.prefixCls,n=r.value,t=r.valueIndex,o=r.onStartMove,a=r.style,s=r.render,l=r.dragging,u=r.onOffsetChange,c=r.onChangeComplete,d=r.onFocus,f=r.onMouseEnter,h=Uxe(r,nXe),p=G.useContext(oO),g=p.min,v=p.max,y=p.direction,m=p.disabled,b=p.keyboard,S=p.range,_=p.tabIndex,C=p.ariaLabelForHandle,T=p.ariaLabelledByForHandle,x=p.ariaValueTextFormatterForHandle,A=p.styles,w=p.classNames,L="".concat(i,"-handle"),k=function(Q){m||o(Q,t)},D=function(Q){d==null||d(Q,t)},j=function(Q){f(Q,t)},N=function(Q){if(!m&&b){var Z=null;switch(Q.which||Q.keyCode){case Fc.LEFT:Z=y==="ltr"||y==="btt"?-1:1;break;case Fc.RIGHT:Z=y==="ltr"||y==="btt"?1:-1;break;case Fc.UP:Z=y!=="ttb"?1:-1;break;case Fc.DOWN:Z=y!=="ttb"?-1:1;break;case Fc.HOME:Z="min";break;case Fc.END:Z="max";break;case Fc.PAGE_UP:Z=2;break;case Fc.PAGE_DOWN:Z=-2;break}Z!==null&&(Q.preventDefault(),u(Z,t))}},V=function(Q){switch(Q.which||Q.keyCode){case Fc.LEFT:case Fc.RIGHT:case Fc.UP:case Fc.DOWN:case Fc.HOME:case Fc.END:case Fc.PAGE_UP:case Fc.PAGE_DOWN:c==null||c();break}},W=o9(y,n,g,v),K={};if(t!==null){var H;K={tabIndex:m?null:aR(_,t),role:"slider","aria-valuemin":g,"aria-valuemax":v,"aria-valuenow":n,"aria-disabled":m,"aria-label":aR(C,t),"aria-labelledby":aR(T,t),"aria-valuetext":(H=aR(x,t))===null||H===void 0?void 0:H(n),"aria-orientation":y==="ltr"||y==="rtl"?"horizontal":"vertical",onMouseDown:k,onTouchStart:k,onFocus:D,onMouseEnter:j,onKeyDown:N,onKeyUp:V}}var U=G.createElement("div",wn({ref:e,className:Zv(L,gg(gg({},"".concat(L,"-").concat(t+1),t!==null&&S),"".concat(L,"-dragging"),l),w.handle),style:Wc(Wc(Wc({},W),a),A.handle)},K,h));return s&&(U=s(U,{index:t,prefixCls:i,value:n,dragging:l})),U}),oXe=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","activeHandleRender","draggingIndex","onFocus"],aXe=G.forwardRef(function(r,e){var i=r.prefixCls,n=r.style,t=r.onStartMove,o=r.onOffsetChange,a=r.values,s=r.handleRender,l=r.activeHandleRender,u=r.draggingIndex,c=r.onFocus,d=Uxe(r,oXe),f=G.useRef({});G.useImperativeHandle(e,function(){return{focus:function(_){var C;(C=f.current[_])===null||C===void 0||C.focus()}}});var h=G.useState(-1),p=Ef(h,2),g=p[0],v=p[1],y=function(_,C){v(C),c==null||c(_)},m=function(_,C){v(C)},b=Wc({prefixCls:i,onStartMove:t,onOffsetChange:o,render:s,onFocus:y,onMouseEnter:m},d);return G.createElement(G.Fragment,null,a.map(function(S,_){return G.createElement(Rde,wn({ref:function(T){T?f.current[_]=T:delete f.current[_]},dragging:u===_,style:aR(n,_),key:_,value:S,valueIndex:_},b))}),l&&G.createElement(Rde,wn({key:"a11y"},b,{value:a[g],valueIndex:null,dragging:u!==-1,render:l,style:{pointerEvents:"none"},tabIndex:null,"aria-hidden":!0})))}),sXe=function(e){var i=e.prefixCls,n=e.style,t=e.children,o=e.value,a=e.onClick,s=G.useContext(oO),l=s.min,u=s.max,c=s.direction,d=s.includedStart,f=s.includedEnd,h=s.included,p="".concat(i,"-text"),g=o9(c,o,l,u);return G.createElement("span",{className:Zv(p,gg({},"".concat(p,"-active"),h&&d<=o&&o<=f)),style:Wc(Wc({},g),n),onMouseDown:function(y){y.stopPropagation()},onClick:function(){a(o)}},t)},lXe=function(e){var i=e.prefixCls,n=e.marks,t=e.onClick,o="".concat(i,"-mark");return n.length?G.createElement("div",{className:o},n.map(function(a){var s=a.value,l=a.style,u=a.label;return G.createElement(sXe,{key:s,prefixCls:o,style:l,value:s,onClick:t},u)})):null},uXe=function(e){var i=e.prefixCls,n=e.value,t=e.style,o=e.activeStyle,a=G.useContext(oO),s=a.min,l=a.max,u=a.direction,c=a.included,d=a.includedStart,f=a.includedEnd,h="".concat(i,"-dot"),p=c&&d<=n&&n<=f,g=Wc(Wc({},o9(u,n,s,l)),typeof t=="function"?t(n):t);return p&&(g=Wc(Wc({},g),typeof o=="function"?o(n):o)),G.createElement("span",{className:Zv(h,gg({},"".concat(h,"-active"),p)),style:g})},cXe=function(e){var i=e.prefixCls,n=e.marks,t=e.dots,o=e.style,a=e.activeStyle,s=G.useContext(oO),l=s.min,u=s.max,c=s.step,d=G.useMemo(function(){var f=new Set;if(n.forEach(function(p){f.add(p.value)}),t&&c!==null)for(var h=l;h<=u;)f.add(h),h+=c;return Array.from(f)},[l,u,c,t,n]);return G.createElement("div",{className:"".concat(i,"-step")},d.map(function(f){return G.createElement(uXe,{prefixCls:i,key:f,value:f,style:o,activeStyle:a})}))},Mde=function(e){var i=e.prefixCls,n=e.style,t=e.start,o=e.end,a=e.index,s=e.onStartMove,l=e.replaceCls,u=G.useContext(oO),c=u.direction,d=u.min,f=u.max,h=u.disabled,p=u.range,g=u.classNames,v="".concat(i,"-track"),y=YY(t,d,f),m=YY(o,d,f),b=function(T){!h&&s&&s(T,-1)},S={};switch(c){case"rtl":S.right="".concat(y*100,"%"),S.width="".concat(m*100-y*100,"%");break;case"btt":S.bottom="".concat(y*100,"%"),S.height="".concat(m*100-y*100,"%");break;case"ttb":S.top="".concat(y*100,"%"),S.height="".concat(m*100-y*100,"%");break;default:S.left="".concat(y*100,"%"),S.width="".concat(m*100-y*100,"%")}var _=l||Zv(v,gg(gg({},"".concat(v,"-").concat(a+1),a!==null&&p),"".concat(i,"-track-draggable"),s),g.track);return G.createElement("div",{className:_,style:Wc(Wc({},S),n),onMouseDown:b,onTouchStart:b})},dXe=function(e){var i=e.prefixCls,n=e.style,t=e.values,o=e.startPoint,a=e.onStartMove,s=G.useContext(oO),l=s.included,u=s.range,c=s.min,d=s.styles,f=s.classNames,h=G.useMemo(function(){if(!u){if(t.length===0)return[];var g=o??c,v=t[0];return[{start:Math.min(g,v),end:Math.max(g,v)}]}for(var y=[],m=0;m<t.length-1;m+=1)y.push({start:t[m],end:t[m+1]});return y},[t,u,o,c]);if(!l)return null;var p=f.tracks||d.tracks?G.createElement(Mde,{index:null,prefixCls:i,start:h[0].start,end:h[h.length-1].end,replaceCls:Zv(f.tracks,"".concat(i,"-tracks")),style:d.tracks}):null;return G.createElement(G.Fragment,null,p,h.map(function(g,v){var y=g.start,m=g.end;return G.createElement(Mde,{index:v,prefixCls:i,style:Wc(Wc({},aR(n,v)),d.track),start:y,end:m,key:v,onStartMove:a})}))},uG={exports:{}},Jo={};/**
 * @license React
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Lde;function fXe(){if(Lde)return Jo;Lde=1;var r=Symbol.for("react.element"),e=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),t=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),a=Symbol.for("react.context"),s=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),p;p=Symbol.for("react.module.reference");function g(v){if(typeof v=="object"&&v!==null){var y=v.$$typeof;switch(y){case r:switch(v=v.type,v){case i:case t:case n:case u:case c:return v;default:switch(v=v&&v.$$typeof,v){case s:case a:case l:case f:case d:case o:return v;default:return y}}case e:return y}}}return Jo.ContextConsumer=a,Jo.ContextProvider=o,Jo.Element=r,Jo.ForwardRef=l,Jo.Fragment=i,Jo.Lazy=f,Jo.Memo=d,Jo.Portal=e,Jo.Profiler=t,Jo.StrictMode=n,Jo.Suspense=u,Jo.SuspenseList=c,Jo.isAsyncMode=function(){return!1},Jo.isConcurrentMode=function(){return!1},Jo.isContextConsumer=function(v){return g(v)===a},Jo.isContextProvider=function(v){return g(v)===o},Jo.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===r},Jo.isForwardRef=function(v){return g(v)===l},Jo.isFragment=function(v){return g(v)===i},Jo.isLazy=function(v){return g(v)===f},Jo.isMemo=function(v){return g(v)===d},Jo.isPortal=function(v){return g(v)===e},Jo.isProfiler=function(v){return g(v)===t},Jo.isStrictMode=function(v){return g(v)===n},Jo.isSuspense=function(v){return g(v)===u},Jo.isSuspenseList=function(v){return g(v)===c},Jo.isValidElementType=function(v){return typeof v=="string"||typeof v=="function"||v===i||v===t||v===n||v===u||v===c||v===h||typeof v=="object"&&v!==null&&(v.$$typeof===f||v.$$typeof===d||v.$$typeof===o||v.$$typeof===a||v.$$typeof===l||v.$$typeof===p||v.getModuleId!==void 0)},Jo.typeOf=g,Jo}var kde;function hXe(){return kde||(kde=1,uG.exports=fXe()),uG.exports}hXe();Number(G.version.split(".")[0]);function Ide(r){var e="touches"in r?r.touches[0]:r;return{pageX:e.pageX,pageY:e.pageY}}function pXe(r,e,i,n,t,o,a,s,l){var u=G.useState(null),c=Ef(u,2),d=c[0],f=c[1],h=G.useState(-1),p=Ef(h,2),g=p[0],v=p[1],y=G.useState(i),m=Ef(y,2),b=m[0],S=m[1],_=G.useState(i),C=Ef(_,2),T=C[0],x=C[1],A=G.useRef(null),w=G.useRef(null);G.useLayoutEffect(function(){g===-1&&S(i)},[i,g]),G.useEffect(function(){return function(){document.removeEventListener("mousemove",A.current),document.removeEventListener("mouseup",w.current),document.removeEventListener("touchmove",A.current),document.removeEventListener("touchend",w.current)}},[]);var L=function(V,W){b.some(function(K,H){return K!==V[H]})&&(W!==void 0&&f(W),S(V),a(V))},k=WY(function(N,V){if(N===-1){var W=T[0],K=T[T.length-1],H=n-W,U=t-K,I=V*(t-n);I=Math.max(I,H),I=Math.min(I,U);var Q=o(W+I);I=Q-W;var Z=T.map(function(pe){return pe+I});L(Z)}else{var ee=(t-n)*V,ie=AS(b);ie[N]=T[N];var de=l(ie,ee,N,"dist");L(de.values,de.value)}}),D=function(V,W,K){V.stopPropagation();var H=K||i,U=H[W];v(W),f(U),x(H);var I=Ide(V),Q=I.pageX,Z=I.pageY,ee=function(pe){pe.preventDefault();var _e=Ide(pe),Te=_e.pageX,De=_e.pageY,Pe=Te-Q,Ee=De-Z,Re=r.current.getBoundingClientRect(),je=Re.width,Ke=Re.height,ot;switch(e){case"btt":ot=-Ee/Ke;break;case"ttb":ot=Ee/Ke;break;case"rtl":ot=-Pe/je;break;default:ot=Pe/je}k(W,ot)},ie=function de(pe){pe.preventDefault(),document.removeEventListener("mouseup",de),document.removeEventListener("mousemove",ee),document.removeEventListener("touchend",de),document.removeEventListener("touchmove",ee),A.current=null,w.current=null,v(-1),s()};document.addEventListener("mouseup",ie),document.addEventListener("mousemove",ee),document.addEventListener("touchend",ie),document.addEventListener("touchmove",ee),A.current=ee,w.current=ie},j=G.useMemo(function(){var N=AS(i).sort(function(W,K){return W-K}),V=AS(b).sort(function(W,K){return W-K});return N.every(function(W,K){return W===V[K]})?b:i},[i,b]);return[g,d,j,D]}function gXe(r,e,i,n,t,o){var a=G.useCallback(function(h){return Math.max(r,Math.min(e,h))},[r,e]),s=G.useCallback(function(h){if(i!==null){var p=r+Math.round((a(h)-r)/i)*i,g=function(b){return(String(b).split(".")[1]||"").length},v=Math.max(g(i),g(e),g(r)),y=Number(p.toFixed(v));return r<=y&&y<=e?y:null}return null},[i,r,e,a]),l=G.useCallback(function(h){var p=a(h),g=n.map(function(m){return m.value});i!==null&&g.push(s(h)),g.push(r,e);var v=g[0],y=e-r;return g.forEach(function(m){var b=Math.abs(p-m);b<=y&&(v=m,y=b)}),v},[r,e,n,i,a,s]),u=function h(p,g,v){var y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit";if(typeof g=="number"){var m,b=p[v],S=b+g,_=[];n.forEach(function(w){_.push(w.value)}),_.push(r,e),_.push(s(b));var C=g>0?1:-1;y==="unit"?_.push(s(b+C*i)):_.push(s(S)),_=_.filter(function(w){return w!==null}).filter(function(w){return g<0?w<=b:w>=b}),y==="unit"&&(_=_.filter(function(w){return w!==b}));var T=y==="unit"?b:S;m=_[0];var x=Math.abs(m-T);if(_.forEach(function(w){var L=Math.abs(w-T);L<x&&(m=w,x=L)}),m===void 0)return g<0?r:e;if(y==="dist")return m;if(Math.abs(g)>1){var A=AS(p);return A[v]=m,h(A,g-C,v,y)}return m}else{if(g==="min")return r;if(g==="max")return e}},c=function(p,g,v){var y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",m=p[v],b=u(p,g,v,y);return{value:b,changed:b!==m}},d=function(p){return o===null&&p===0||typeof o=="number"&&p<o},f=function(p,g,v){var y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",m=p.map(l),b=m[v],S=u(m,g,v,y);if(m[v]=S,t===!1){var _=o||0;v>0&&m[v-1]!==b&&(m[v]=Math.max(m[v],m[v-1]+_)),v<m.length-1&&m[v+1]!==b&&(m[v]=Math.min(m[v],m[v+1]-_))}else if(typeof o=="number"||o===null){for(var C=v+1;C<m.length;C+=1)for(var T=!0;d(m[C]-m[C-1])&&T;){var x=c(m,1,C);m[C]=x.value,T=x.changed}for(var A=v;A>0;A-=1)for(var w=!0;d(m[A]-m[A-1])&&w;){var L=c(m,-1,A-1);m[A-1]=L.value,w=L.changed}for(var k=m.length-1;k>0;k-=1)for(var D=!0;d(m[k]-m[k-1])&&D;){var j=c(m,-1,k-1);m[k-1]=j.value,D=j.changed}for(var N=0;N<m.length-1;N+=1)for(var V=!0;d(m[N+1]-m[N])&&V;){var W=c(m,1,N+1);m[N+1]=W.value,V=W.changed}}return{value:m[v],values:m}};return[l,f]}var vXe=G.forwardRef(function(r,e){var i=r.prefixCls,n=i===void 0?"rc-slider":i,t=r.className,o=r.style,a=r.classNames,s=r.styles,l=r.disabled,u=l===void 0?!1:l,c=r.keyboard,d=c===void 0?!0:c,f=r.autoFocus,h=r.onFocus,p=r.onBlur,g=r.min,v=g===void 0?0:g,y=r.max,m=y===void 0?100:y,b=r.step,S=b===void 0?1:b,_=r.value,C=r.defaultValue,T=r.range,x=r.count,A=r.onChange,w=r.onBeforeChange,L=r.onAfterChange,k=r.onChangeComplete,D=r.allowCross,j=D===void 0?!0:D,N=r.pushable,V=N===void 0?!1:N,W=r.draggableTrack,K=r.reverse,H=r.vertical,U=r.included,I=U===void 0?!0:U,Q=r.startPoint,Z=r.trackStyle,ee=r.handleStyle,ie=r.railStyle,de=r.dotStyle,pe=r.activeDotStyle,_e=r.marks,Te=r.dots,De=r.handleRender,Pe=r.activeHandleRender,Ee=r.tabIndex,Re=Ee===void 0?0:Ee,je=r.ariaLabelForHandle,Ke=r.ariaLabelledByForHandle,ot=r.ariaValueTextFormatterForHandle,We=G.useRef(null),xe=G.useRef(null),ve=G.useMemo(function(){return H?K?"ttb":"btt":K?"rtl":"ltr"},[K,H]),he=G.useMemo(function(){return isFinite(v)?v:0},[v]),Se=G.useMemo(function(){return isFinite(m)?m:100},[m]),be=G.useMemo(function(){return S!==null&&S<=0?1:S},[S]),ke=G.useMemo(function(){return typeof V=="boolean"?V?be:!1:V>=0?V:!1},[V,be]),qe=G.useMemo(function(){return Object.keys(_e||{}).map(function(dr){var ue=_e[dr],ar={value:Number(dr)};return ue&&BS(ue)==="object"&&!G.isValidElement(ue)&&("label"in ue||"style"in ue)?(ar.style=ue.style,ar.label=ue.label):ar.label=ue,ar}).filter(function(dr){var ue=dr.label;return ue||typeof ue=="number"}).sort(function(dr,ue){return dr.value-ue.value})},[_e]),rt=gXe(he,Se,be,qe,j,ke),St=Ef(rt,2),xt=St[0],It=St[1],Zt=Z8e(C,{value:_}),ct=Ef(Zt,2),Qe=ct[0],Et=ct[1],Gt=G.useMemo(function(){var dr=Qe==null?[]:Array.isArray(Qe)?Qe:[Qe],ue=Ef(dr,1),ar=ue[0],Bt=ar===void 0?he:ar,Ar=Qe===null?[]:[Bt];if(T){if(Ar=AS(dr),x||Qe===void 0){var br=x>=0?x+1:2;for(Ar=Ar.slice(0,br);Ar.length<br;){var Br;Ar.push((Br=Ar[Ar.length-1])!==null&&Br!==void 0?Br:he)}}Ar.sort(function(ai,Nn){return ai-Nn})}return Ar.forEach(function(ai,Nn){Ar[Nn]=xt(ai)}),Ar},[Qe,T,he,x,xt]),Xe=G.useRef(Gt);Xe.current=Gt;var Vt=function(ue){return T?ue:ue[0]},lr=function(ue){var ar=AS(ue).sort(function(Bt,Ar){return Bt-Ar});A&&!iXe(ar,Xe.current,!0)&&A(Vt(ar)),Et(ar)},Jt=function(){var ue=Vt(Xe.current);L==null||L(ue),pj(!L,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),k==null||k(ue)},kr=pXe(xe,ve,Gt,he,Se,xt,lr,Jt,It),qt=Ef(kr,4),zt=qt[0],jr=qt[1],Be=qt[2],Ge=qt[3],ut=function(ue,ar){if(!u){var Bt=0,Ar=Se-he;Gt.forEach(function(Nn,nt){var _o=Math.abs(ue-Nn);_o<=Ar&&(Ar=_o,Bt=nt)});var br=AS(Gt);if(br[Bt]=ue,T&&!Gt.length&&x===void 0&&br.push(ue),w==null||w(Vt(br)),lr(br),ar){var Br,ai;(Br=document.activeElement)===null||Br===void 0||(ai=Br.blur)===null||ai===void 0||ai.call(Br),We.current.focus(Bt),Ge(ar,Bt,br)}}},Pt=function(ue){ue.preventDefault();var ar=xe.current.getBoundingClientRect(),Bt=ar.width,Ar=ar.height,br=ar.left,Br=ar.top,ai=ar.bottom,Nn=ar.right,nt=ue.clientX,_o=ue.clientY,si;switch(ve){case"btt":si=(ai-_o)/Ar;break;case"ttb":si=(_o-Br)/Ar;break;case"rtl":si=(Nn-nt)/Bt;break;default:si=(nt-br)/Bt}var ti=he+si*(Se-he);ut(xt(ti),ue)},Qt=G.useState(null),wr=Ef(Qt,2),Xr=wr[0],pi=wr[1],Qr=function(ue,ar){if(!u){var Bt=It(Gt,ue,ar);w==null||w(Vt(Gt)),lr(Bt.values),pi(Bt.value)}};G.useEffect(function(){if(Xr!==null){var dr=Gt.indexOf(Xr);dr>=0&&We.current.focus(dr)}pi(null)},[Xr]);var Ur=G.useMemo(function(){return W&&be===null?!1:W},[W,be]),ci=function(ue,ar){Ge(ue,ar),w==null||w(Vt(Xe.current))},Xt=zt!==-1;G.useEffect(function(){if(!Xt){var dr=Gt.lastIndexOf(jr);We.current.focus(dr)}},[Xt]);var Ui=G.useMemo(function(){return AS(Be).sort(function(dr,ue){return dr-ue})},[Be]),Dn=G.useMemo(function(){return T?[Ui[0],Ui[Ui.length-1]]:[he,Ui[0]]},[Ui,T,he]),Kr=Ef(Dn,2),In=Kr[0],fn=Kr[1];G.useImperativeHandle(e,function(){return{focus:function(){We.current.focus(0)},blur:function(){var ue,ar=document,Bt=ar.activeElement;(ue=xe.current)!==null&&ue!==void 0&&ue.contains(Bt)&&(Bt==null||Bt.blur())}}}),G.useEffect(function(){f&&We.current.focus(0)},[]);var vt=G.useMemo(function(){return{min:he,max:Se,direction:ve,disabled:u,keyboard:d,step:be,included:I,includedStart:In,includedEnd:fn,range:T,tabIndex:Re,ariaLabelForHandle:je,ariaLabelledByForHandle:Ke,ariaValueTextFormatterForHandle:ot,styles:s||{},classNames:a||{}}},[he,Se,ve,u,d,be,I,In,fn,T,Re,je,Ke,ot,s,a]);return G.createElement(oO.Provider,{value:vt},G.createElement("div",{ref:xe,className:Zv(n,t,gg(gg(gg(gg({},"".concat(n,"-disabled"),u),"".concat(n,"-vertical"),H),"".concat(n,"-horizontal"),!H),"".concat(n,"-with-marks"),qe.length)),style:o,onMouseDown:Pt},G.createElement("div",{className:Zv("".concat(n,"-rail"),a==null?void 0:a.rail),style:Wc(Wc({},ie),s==null?void 0:s.rail)}),G.createElement(dXe,{prefixCls:n,style:Z,values:Ui,startPoint:Q,onStartMove:Ur?ci:void 0}),G.createElement(cXe,{prefixCls:n,marks:qe,dots:Te,style:de,activeStyle:pe}),G.createElement(aXe,{ref:We,prefixCls:n,style:ee,values:Be,draggingIndex:zt,onStartMove:ci,onOffsetChange:Qr,onFocus:h,onBlur:p,handleRender:De,activeHandleRender:Pe,onChangeComplete:Jt}),G.createElement(lXe,{prefixCls:n,marks:qe,onClick:ut})))});//! @version @js-joda/core - 5.6.5
//! @copyright (c) 2015-present, Philipp Thürwächter, Pattrick Hüper & js-joda contributors
//! @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
//! @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
/**
 * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
 * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
 */function aO(r,e,i){i===void 0&&(i=Error);function n(t){Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,e&&e.apply(this,arguments),this.toString=function(){return this.name+": "+this.message}}return n.prototype=Object.create(i.prototype),n.prototype.name=r,n.prototype.constructor=n,n}var ei=aO("DateTimeException",yXe),hg=aO("DateTimeParseException",mXe),kn=aO("UnsupportedTemporalTypeException",null,ei),lg=aO("ArithmeticException"),vi=aO("IllegalArgumentException"),uF=aO("IllegalStateException"),U0=aO("NullPointerException");function yXe(r,e){e===void 0&&(e=null);var i=r||this.name;e!==null&&e instanceof Error&&(i+=`
-------
Caused by: `+e.stack+`
-------
`),this.message=i}function mXe(r,e,i,n){e===void 0&&(e=""),i===void 0&&(i=0),n===void 0&&(n=null);var t=r||this.name;t+=": "+e+", at index: "+i,n!==null&&n instanceof Error&&(t+=`
-------
Caused by: `+n.stack+`
-------
`),this.message=t,this.parsedString=function(){return e},this.errorIndex=function(){return i}}function nn(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,$Y(r,e)}function $Y(r,e){return $Y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,t){return n.__proto__=t,n},$Y(r,e)}function cF(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}/**
 * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
 * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
 */function Go(r,e,i){if(!r)throw i?new i(e):new Error(e)}function gt(r,e){if(r==null)throw new U0(e+" must not be null");return r}function gi(r,e,i){if(!(r instanceof e))throw new vi(i+" must be an instance of "+(e.name?e.name:e)+(r&&r.constructor&&r.constructor.name?", but is "+r.constructor.name:""));return r}function Li(r){throw new TypeError('abstract method "'+r+'" is not implemented')}var bXe=Object.freeze({__proto__:null,abstractMethodFail:Li,assert:Go,requireInstance:gi,requireNonNull:gt});/**
 * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
 * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
 * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
 */var ng=9007199254740991,yh=-9007199254740991,Ye=(function(){function r(){}return r.intDiv=function(i,n){var t=i/n;return t=r.roundDown(t),r.safeZero(t)},r.intMod=function(i,n){var t=i-r.intDiv(i,n)*n;return t=r.roundDown(t),r.safeZero(t)},r.roundDown=function(i){return i<0?Math.ceil(i):Math.floor(i)},r.floorDiv=function(i,n){var t=Math.floor(i/n);return r.safeZero(t)},r.floorMod=function(i,n){var t=i-r.floorDiv(i,n)*n;return r.safeZero(t)},r.safeAdd=function(i,n){if(r.verifyInt(i),r.verifyInt(n),i===0)return r.safeZero(n);if(n===0)return r.safeZero(i);var t=r.safeToInt(i+n);if(t===i||t===n)throw new lg("Invalid addition beyond MAX_SAFE_INTEGER!");return t},r.safeSubtract=function(i,n){return r.verifyInt(i),r.verifyInt(n),i===0&&n===0?0:i===0?r.safeZero(-1*n):n===0?r.safeZero(i):r.safeToInt(i-n)},r.safeMultiply=function(i,n){if(r.verifyInt(i),r.verifyInt(n),i===1)return r.safeZero(n);if(n===1)return r.safeZero(i);if(i===0||n===0)return 0;var t=r.safeToInt(i*n);if(t/n!==i||i===yh&&n===-1||n===yh&&i===-1)throw new lg("Multiplication overflows: "+i+" * "+n);return t},r.parseInt=(function(e){function i(n){return e.apply(this,arguments)}return i.toString=function(){return e.toString()},i})(function(e){var i=parseInt(e);return r.safeToInt(i)}),r.safeToInt=function(i){return r.verifyInt(i),r.safeZero(i)},r.verifyInt=function(i){if(i==null)throw new lg("Invalid value: '"+i+"', using null or undefined as argument");if(isNaN(i))throw new lg("Invalid int value, using NaN as argument");if(Number.isInteger){if(!Number.isInteger(Number(i)))throw new lg("Invalid value: '"+i+"' is a float")}else if(i%1!==0)throw new lg("Invalid value: '"+i+"' is a float");if(i>ng||i<yh)throw new lg("Calculation overflows an int: "+i)},r.safeZero=function(i){return i===0?0:+i},r.compareNumbers=function(i,n){return i<n?-1:i>n?1:0},r.smi=function(i){return i>>>1&1073741824|i&3221225471},r.hash=function(i){if(i!==i||i===1/0)return 0;for(var n=i;i>4294967295;)i/=4294967295,n^=i;return r.smi(n)},r.hashCode=function(){for(var i=17,n=arguments.length,t=new Array(n),o=0;o<n;o++)t[o]=arguments[o];for(var a=0,s=t;a<s.length;a++){var l=s[a];i=(i<<5)-i+r.hash(l)}return r.hash(i)},r})();Ye.MAX_SAFE_INTEGER=ng;Ye.MIN_SAFE_INTEGER=yh;/**
 * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
 * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
 */var WM=(function(){function r(i){this._name=i}var e=r.prototype;return e.equals=function(n){return this===n},e.toString=function(){return this._name},e.toJSON=function(){return this.toString()},r})();/*
 * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
 * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
 * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
 */var R1=(function(){function r(){}var e=r.prototype;return e.get=function(n){Li("get")},e.units=function(){Li("units")},e.addTo=function(n){Li("addTo")},e.subtractFrom=function(n){Li("subtractFrom")},r})();typeof Symbol<"u"&&Symbol.toPrimitive&&(R1.prototype[Symbol.toPrimitive]=function(r){if(r!=="number")return this.toString();throw new TypeError("A conversion from TemporalAmount to a number is not allowed. To compare use the methods .equals(), .compareTo(), .isBefore() or one that is more suitable to your use case.")});/*
 * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
 * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
 * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
 */var J0=(function(){function r(){}var e=r.prototype;return e.duration=function(){Li("duration")},e.isDurationEstimated=function(){Li("isDurationEstimated")},e.isDateBased=function(){Li("isDateBased")},e.isTimeBased=function(){Li("isTimeBased")},e.isSupportedBy=function(n){Li("isSupportedBy")},e.addTo=function(n,t){Li("addTo")},e.between=function(n,t){Li("between")},r})(),As=(function(r){nn(e,r);function e(n,t){var o;return o=r.call(this)||this,o._seconds=Ye.safeToInt(n),o._nanos=Ye.safeToInt(t),o}e.ofDays=function(t){return e._create(Ye.safeMultiply(t,Wt.SECONDS_PER_DAY),0)},e.ofHours=function(t){return e._create(Ye.safeMultiply(t,Wt.SECONDS_PER_HOUR),0)},e.ofMinutes=function(t){return e._create(Ye.safeMultiply(t,Wt.SECONDS_PER_MINUTE),0)},e.ofSeconds=function(t,o){o===void 0&&(o=0);var a=Ye.safeAdd(t,Ye.floorDiv(o,Wt.NANOS_PER_SECOND)),s=Ye.floorMod(o,Wt.NANOS_PER_SECOND);return e._create(a,s)},e.ofMillis=function(t){var o=Ye.intDiv(t,1e3),a=Ye.intMod(t,1e3);return a<0&&(a+=1e3,o--),e._create(o,a*1e6)},e.ofNanos=function(t){var o=Ye.intDiv(t,Wt.NANOS_PER_SECOND),a=Ye.intMod(t,Wt.NANOS_PER_SECOND);return a<0&&(a+=Wt.NANOS_PER_SECOND,o--),this._create(o,a)},e.of=function(t,o){return e.ZERO.plus(t,o)},e.from=function(t){gt(t,"amount"),gi(t,R1);var o=e.ZERO;return t.units().forEach(function(a){o=o.plus(t.get(a),a)}),o},e.between=function(t,o){gt(t,"startInclusive"),gt(o,"endExclusive");var a=t.until(o,dt.SECONDS),s=0;if(t.isSupported(Oe.NANO_OF_SECOND)&&o.isSupported(Oe.NANO_OF_SECOND))try{var l=t.getLong(Oe.NANO_OF_SECOND);if(s=o.getLong(Oe.NANO_OF_SECOND)-l,a>0&&s<0)s+=Wt.NANOS_PER_SECOND;else if(a<0&&s>0)s-=Wt.NANOS_PER_SECOND;else if(a===0&&s!==0){var u=o.with(Oe.NANO_OF_SECOND,l);a=t.until(u,dt.SECONDS)}}catch{}return this.ofSeconds(a,s)},e.parse=function(t){gt(t,"text");var o=new RegExp("([-+]?)P(?:([-+]?[0-9]+)D)?(T(?:([-+]?[0-9]+)H)?(?:([-+]?[0-9]+)M)?(?:([-+]?[0-9]+)(?:[.,]([0-9]{0,9}))?S)?)?","i"),a=o.exec(t);if(a!==null&&a[3]!=="T"){var s=a[1]==="-",l=a[2],u=a[4],c=a[5],d=a[6],f=a[7];if(l!=null||u!=null||c!=null||d!=null){var h=e._parseNumber(t,l,Wt.SECONDS_PER_DAY,"days"),p=e._parseNumber(t,u,Wt.SECONDS_PER_HOUR,"hours"),g=e._parseNumber(t,c,Wt.SECONDS_PER_MINUTE,"minutes"),v=e._parseNumber(t,d,1,"seconds"),y=d!=null&&d.charAt(0)==="-",m=e._parseFraction(t,f,y?-1:1);try{return e._create(s,h,p,g,v,m)}catch(b){throw new hg("Text cannot be parsed to a Duration: overflow",t,0,b)}}}throw new hg("Text cannot be parsed to a Duration",t,0)},e._parseNumber=function(t,o,a,s){if(o==null)return 0;try{return o[0]==="+"&&(o=o.substring(1)),Ye.safeMultiply(parseFloat(o),a)}catch(l){throw new hg("Text cannot be parsed to a Duration: "+s,t,0,l)}},e._parseFraction=function(t,o,a){return o==null||o.length===0?0:(o=(o+"000000000").substring(0,9),parseFloat(o)*a)},e._create=function(){return arguments.length<=2?e._createSecondsNanos(arguments[0],arguments[1]):e._createNegateDaysHoursMinutesSecondsNanos(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5])},e._createNegateDaysHoursMinutesSecondsNanos=function(t,o,a,s,l,u){var c=Ye.safeAdd(o,Ye.safeAdd(a,Ye.safeAdd(s,l)));return t?e.ofSeconds(c,u).negated():e.ofSeconds(c,u)},e._createSecondsNanos=function(t,o){return t===void 0&&(t=0),o===void 0&&(o=0),t===0&&o===0?e.ZERO:new e(t,o)};var i=e.prototype;return i.get=function(t){if(t===dt.SECONDS)return this._seconds;if(t===dt.NANOS)return this._nanos;throw new kn("Unsupported unit: "+t)},i.units=function(){return[dt.SECONDS,dt.NANOS]},i.isZero=function(){return this._seconds===0&&this._nanos===0},i.isNegative=function(){return this._seconds<0},i.seconds=function(){return this._seconds},i.nano=function(){return this._nanos},i.withSeconds=function(t){return e._create(t,this._nanos)},i.withNanos=function(t){return Oe.NANO_OF_SECOND.checkValidIntValue(t),e._create(this._seconds,t)},i.plusDuration=function(t){return gt(t,"duration"),this.plus(t.seconds(),t.nano())},i.plus=function(t,o){return arguments.length===1?this.plusDuration(t):arguments.length===2&&o instanceof J0?this.plusAmountUnit(t,o):this.plusSecondsNanos(t,o)},i.plusAmountUnit=function(t,o){if(gt(t,"amountToAdd"),gt(o,"unit"),o===dt.DAYS)return this.plusSecondsNanos(Ye.safeMultiply(t,Wt.SECONDS_PER_DAY),0);if(o.isDurationEstimated())throw new kn("Unit must not have an estimated duration");if(t===0)return this;if(o instanceof dt){switch(o){case dt.NANOS:return this.plusNanos(t);case dt.MICROS:return this.plusSecondsNanos(Ye.intDiv(t,1e6*1e3)*1e3,Ye.intMod(t,1e6*1e3)*1e3);case dt.MILLIS:return this.plusMillis(t);case dt.SECONDS:return this.plusSeconds(t)}return this.plusSecondsNanos(Ye.safeMultiply(o.duration().seconds(),t),0)}var a=o.duration().multipliedBy(t);return this.plusSecondsNanos(a.seconds(),a.nano())},i.plusDays=function(t){return this.plusSecondsNanos(Ye.safeMultiply(t,Wt.SECONDS_PER_DAY),0)},i.plusHours=function(t){return this.plusSecondsNanos(Ye.safeMultiply(t,Wt.SECONDS_PER_HOUR),0)},i.plusMinutes=function(t){return this.plusSecondsNanos(Ye.safeMultiply(t,Wt.SECONDS_PER_MINUTE),0)},i.plusSeconds=function(t){return this.plusSecondsNanos(t,0)},i.plusMillis=function(t){return this.plusSecondsNanos(Ye.intDiv(t,1e3),Ye.intMod(t,1e3)*1e6)},i.plusNanos=function(t){return this.plusSecondsNanos(0,t)},i.plusSecondsNanos=function(t,o){if(gt(t,"secondsToAdd"),gt(o,"nanosToAdd"),t===0&&o===0)return this;var a=Ye.safeAdd(this._seconds,t);a=Ye.safeAdd(a,Ye.intDiv(o,Wt.NANOS_PER_SECOND)),o=Ye.intMod(o,Wt.NANOS_PER_SECOND);var s=Ye.safeAdd(this._nanos,o);return e.ofSeconds(a,s)},i.minus=function(t,o){return arguments.length===1?this.minusDuration(t):this.minusAmountUnit(t,o)},i.minusDuration=function(t){gt(t,"duration");var o=t.seconds(),a=t.nano();return o===yh?this.plus(ng,-a):this.plus(-o,-a)},i.minusAmountUnit=function(t,o){return gt(t,"amountToSubtract"),gt(o,"unit"),t===yh?this.plusAmountUnit(ng,o):this.plusAmountUnit(-t,o)},i.minusDays=function(t){return t===yh?this.plusDays(ng):this.plusDays(-t)},i.minusHours=function(t){return t===yh?this.plusHours(ng):this.plusHours(-t)},i.minusMinutes=function(t){return t===yh?this.plusMinutes(ng):this.plusMinutes(-t)},i.minusSeconds=function(t){return t===yh?this.plusSeconds(ng):this.plusSeconds(-t)},i.minusMillis=function(t){return t===yh?this.plusMillis(ng):this.plusMillis(-t)},i.minusNanos=function(t){return t===yh?this.plusNanos(ng):this.plusNanos(-t)},i.multipliedBy=function(t){if(t===0)return e.ZERO;if(t===1)return this;var o=Ye.safeMultiply(this._seconds,t),a=Ye.safeMultiply(this._nanos,t);return o=o+Ye.intDiv(a,Wt.NANOS_PER_SECOND),a=Ye.intMod(a,Wt.NANOS_PER_SECOND),e.ofSeconds(o,a)},i.dividedBy=function(t){if(t===0)throw new lg("Cannot divide by zero");if(t===1)return this;var o=Ye.intDiv(this._seconds,t),a=Ye.roundDown((this._seconds/t-o)*Wt.NANOS_PER_SECOND),s=Ye.intDiv(this._nanos,t);return s=a+s,e.ofSeconds(o,s)},i.negated=function(){return this.multipliedBy(-1)},i.abs=function(){return this.isNegative()?this.negated():this},i.addTo=function(t){return gt(t,"temporal"),this._seconds!==0&&(t=t.plus(this._seconds,dt.SECONDS)),this._nanos!==0&&(t=t.plus(this._nanos,dt.NANOS)),t},i.subtractFrom=function(t){return gt(t,"temporal"),this._seconds!==0&&(t=t.minus(this._seconds,dt.SECONDS)),this._nanos!==0&&(t=t.minus(this._nanos,dt.NANOS)),t},i.toDays=function(){return Ye.intDiv(this._seconds,Wt.SECONDS_PER_DAY)},i.toHours=function(){return Ye.intDiv(this._seconds,Wt.SECONDS_PER_HOUR)},i.toMinutes=function(){return Ye.intDiv(this._seconds,Wt.SECONDS_PER_MINUTE)},i.toMillis=function(){var t=Math.round(Ye.safeMultiply(this._seconds,1e3));return t=Ye.safeAdd(t,Ye.intDiv(this._nanos,1e6)),t},i.toNanos=function(){var t=Ye.safeMultiply(this._seconds,Wt.NANOS_PER_SECOND);return t=Ye.safeAdd(t,this._nanos),t},i.compareTo=function(t){gt(t,"otherDuration"),gi(t,e,"otherDuration");var o=Ye.compareNumbers(this._seconds,t.seconds());return o!==0?o:this._nanos-t.nano()},i.equals=function(t){return this===t?!0:t instanceof e?this.seconds()===t.seconds()&&this.nano()===t.nano():!1},i.toString=function(){if(this===e.ZERO)return"PT0S";var t=Ye.intDiv(this._seconds,Wt.SECONDS_PER_HOUR),o=Ye.intDiv(Ye.intMod(this._seconds,Wt.SECONDS_PER_HOUR),Wt.SECONDS_PER_MINUTE),a=Ye.intMod(this._seconds,Wt.SECONDS_PER_MINUTE),s="PT";if(t!==0&&(s+=t+"H"),o!==0&&(s+=o+"M"),a===0&&this._nanos===0&&s.length>2)return s;if(a<0&&this._nanos>0?a===-1?s+="-0":s+=a+1:s+=a,this._nanos>0){s+=".";var l;for(a<0?l=""+(2*Wt.NANOS_PER_SECOND-this._nanos):l=""+(Wt.NANOS_PER_SECOND+this._nanos),l=l.slice(1,l.length),s+=l;s.charAt(s.length-1)==="0";)s=s.slice(0,s.length-1)}return s+="S",s},i.toJSON=function(){return this.toString()},e})(R1);function SXe(){As.ZERO=new As(0,0)}/*
 * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
 * @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)
 */var Af=function(){};function _Xe(){Af.MIN_VALUE=-999999,Af.MAX_VALUE=999999}var dt=(function(r){nn(e,r);function e(n,t){var o;return o=r.call(this)||this,o._name=n,o._duration=t,o}var i=e.prototype;return i.duration=function(){return this._duration},i.isDurationEstimated=function(){return this.isDateBased()||this===e.FOREVER},i.isDateBased=function(){return this.compareTo(e.DAYS)>=0&&this!==e.FOREVER},i.isTimeBased=function(){return this.compareTo(e.DAYS)<0},i.isSupportedBy=function(t){if(this===e.FOREVER)return!1;try{return t.plus(1,this),!0}catch{try{return t.plus(-1,this),!0}catch{return!1}}},i.addTo=function(t,o){return t.plus(o,this)},i.between=function(t,o){return t.until(o,this)},i.toString=function(){return this._name},i.compareTo=function(t){return this.duration().compareTo(t.duration())},e})(J0);function PXe(){dt.NANOS=new dt("Nanos",As.ofNanos(1)),dt.MICROS=new dt("Micros",As.ofNanos(1e3)),dt.MILLIS=new dt("Millis",As.ofNanos(1e6)),dt.SECONDS=new dt("Seconds",As.ofSeconds(1)),dt.MINUTES=new dt("Minutes",As.ofSeconds(60)),dt.HOURS=new dt("Hours",As.ofSeconds(3600)),dt.HALF_DAYS=new dt("HalfDays",As.ofSeconds(43200)),dt.DAYS=new dt("Days",As.ofSeconds(86400)),dt.WEEKS=new dt("Weeks",As.ofSeconds(7*86400)),dt.MONTHS=new dt("Months",As.ofSeconds(31556952/12)),dt.YEARS=new dt("Years",As.ofSeconds(31556952)),dt.DECADES=new dt("Decades",As.ofSeconds(31556952*10)),dt.CENTURIES=new dt("Centuries",As.ofSeconds(31556952*100)),dt.MILLENNIA=new dt("Millennia",As.ofSeconds(31556952*1e3)),dt.ERAS=new dt("Eras",As.ofSeconds(31556952*(Af.MAX_VALUE+1))),dt.FOREVER=new dt("Forever",As.ofSeconds(Ye.MAX_SAFE_INTEGER,999999999))}/**
 * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
 * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
 * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
 */var Rv=(function(){function r(){}var e=r.prototype;return e.isDateBased=function(){Li("isDateBased")},e.isTimeBased=function(){Li("isTimeBased")},e.baseUnit=function(){Li("baseUnit")},e.rangeUnit=function(){Li("rangeUnit")},e.range=function(){Li("range")},e.rangeRefinedBy=function(n){Li("rangeRefinedBy")},e.getFrom=function(n){Li("getFrom")},e.adjustInto=function(n,t){Li("adjustInto")},e.isSupportedBy=function(n){Li("isSupportedBy")},e.displayName=function(){Li("displayName")},e.equals=function(n){Li("equals")},e.name=function(){Li("name")},r})();/**
 * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
 * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
 * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
 */var en=(function(){function r(i,n,t,o){Go(!(i>n),"Smallest minimum value '"+i+"' must be less than largest minimum value '"+n+"'",vi),Go(!(t>o),"Smallest maximum value '"+t+"' must be less than largest maximum value '"+o+"'",vi),Go(!(n>o),"Minimum value '"+n+"' must be less than maximum value '"+o+"'",vi),this._minSmallest=i,this._minLargest=n,this._maxLargest=o,this._maxSmallest=t}var e=r.prototype;return e.isFixed=function(){return this._minSmallest===this._minLargest&&this._maxSmallest===this._maxLargest},e.minimum=function(){return this._minSmallest},e.largestMinimum=function(){return this._minLargest},e.maximum=function(){return this._maxLargest},e.smallestMaximum=function(){return this._maxSmallest},e.isValidValue=function(n){return this.minimum()<=n&&n<=this.maximum()},e.checkValidValue=function(n,t){var o;return this.isValidValue(n)?n:(t!=null?o="Invalid value for "+t+" (valid values "+this.toString()+"): "+n:o="Invalid value (valid values "+this.toString()+"): "+n,Go(!1,o,ei))},e.checkValidIntValue=function(n,t){if(this.isValidIntValue(n)===!1)throw new ei("Invalid int value for "+t+": "+n);return n},e.isValidIntValue=function(n){return this.isIntValue()&&this.isValidValue(n)},e.isIntValue=function(){return this.minimum()>=Ye.MIN_SAFE_INTEGER&&this.maximum()<=Ye.MAX_SAFE_INTEGER},e.equals=function(n){return n===this?!0:n instanceof r?this._minSmallest===n._minSmallest&&this._minLargest===n._minLargest&&this._maxSmallest===n._maxSmallest&&this._maxLargest===n._maxLargest:!1},e.hashCode=function(){return Ye.hashCode(this._minSmallest,this._minLargest,this._maxSmallest,this._maxLargest)},e.toString=function(){var n=this.minimum()+(this.minimum()!==this.largestMinimum()?"/"+this.largestMinimum():"");return n+=" - ",n+=this.smallestMaximum()+(this.smallestMaximum()!==this.maximum()?"/"+this.maximum():""),n},r.of=function(){return arguments.length===2?new r(arguments[0],arguments[0],arguments[1],arguments[1]):arguments.length===3?new r(arguments[0],arguments[0],arguments[1],arguments[2]):arguments.length===4?new r(arguments[0],arguments[1],arguments[2],arguments[3]):Go(!1,"Invalid number of arguments "+arguments.length,vi)},r})(),Oe=(function(r){nn(e,r),e.byName=function(t){for(var o in e)if(e[o]&&e[o]instanceof e&&e[o].name()===t)return e[o]};function e(n,t,o,a){var s;return s=r.call(this)||this,s._name=n,s._baseUnit=t,s._rangeUnit=o,s._range=a,s}var i=e.prototype;return i.name=function(){return this._name},i.baseUnit=function(){return this._baseUnit},i.rangeUnit=function(){return this._rangeUnit},i.range=function(){return this._range},i.displayName=function(){return this.toString()},i.checkValidValue=function(t){return this.range().checkValidValue(t,this)},i.checkValidIntValue=function(t){return this.range().checkValidIntValue(t,this)},i.isDateBased=function(){var t=this===e.DAY_OF_WEEK||this===e.ALIGNED_DAY_OF_WEEK_IN_MONTH||this===e.ALIGNED_DAY_OF_WEEK_IN_YEAR||this===e.DAY_OF_MONTH||this===e.DAY_OF_YEAR||this===e.EPOCH_DAY||this===e.ALIGNED_WEEK_OF_MONTH||this===e.ALIGNED_WEEK_OF_YEAR||this===e.MONTH_OF_YEAR||this===e.PROLEPTIC_MONTH||this===e.YEAR_OF_ERA||this===e.YEAR||this===e.ERA;return t},i.isTimeBased=function(){var t=this===e.NANO_OF_SECOND||this===e.NANO_OF_DAY||this===e.MICRO_OF_SECOND||this===e.MICRO_OF_DAY||this===e.MILLI_OF_SECOND||this===e.MILLI_OF_DAY||this===e.SECOND_OF_MINUTE||this===e.SECOND_OF_DAY||this===e.MINUTE_OF_HOUR||this===e.MINUTE_OF_DAY||this===e.HOUR_OF_AMPM||this===e.CLOCK_HOUR_OF_AMPM||this===e.HOUR_OF_DAY||this===e.CLOCK_HOUR_OF_DAY||this===e.AMPM_OF_DAY;return t},i.rangeRefinedBy=function(t){return t.range(this)},i.getFrom=function(t){return t.getLong(this)},i.toString=function(){return this.name()},i.equals=function(t){return this===t},i.adjustInto=function(t,o){return t.with(this,o)},i.isSupportedBy=function(t){return t.isSupported(this)},e})(Rv);function CXe(){Oe.NANO_OF_SECOND=new Oe("NanoOfSecond",dt.NANOS,dt.SECONDS,en.of(0,999999999)),Oe.NANO_OF_DAY=new Oe("NanoOfDay",dt.NANOS,dt.DAYS,en.of(0,86400*1e9-1)),Oe.MICRO_OF_SECOND=new Oe("MicroOfSecond",dt.MICROS,dt.SECONDS,en.of(0,999999)),Oe.MICRO_OF_DAY=new Oe("MicroOfDay",dt.MICROS,dt.DAYS,en.of(0,86400*1e6-1)),Oe.MILLI_OF_SECOND=new Oe("MilliOfSecond",dt.MILLIS,dt.SECONDS,en.of(0,999)),Oe.MILLI_OF_DAY=new Oe("MilliOfDay",dt.MILLIS,dt.DAYS,en.of(0,86400*1e3-1)),Oe.SECOND_OF_MINUTE=new Oe("SecondOfMinute",dt.SECONDS,dt.MINUTES,en.of(0,59)),Oe.SECOND_OF_DAY=new Oe("SecondOfDay",dt.SECONDS,dt.DAYS,en.of(0,86399)),Oe.MINUTE_OF_HOUR=new Oe("MinuteOfHour",dt.MINUTES,dt.HOURS,en.of(0,59)),Oe.MINUTE_OF_DAY=new Oe("MinuteOfDay",dt.MINUTES,dt.DAYS,en.of(0,1439)),Oe.HOUR_OF_AMPM=new Oe("HourOfAmPm",dt.HOURS,dt.HALF_DAYS,en.of(0,11)),Oe.CLOCK_HOUR_OF_AMPM=new Oe("ClockHourOfAmPm",dt.HOURS,dt.HALF_DAYS,en.of(1,12)),Oe.HOUR_OF_DAY=new Oe("HourOfDay",dt.HOURS,dt.DAYS,en.of(0,23)),Oe.CLOCK_HOUR_OF_DAY=new Oe("ClockHourOfDay",dt.HOURS,dt.DAYS,en.of(1,24)),Oe.AMPM_OF_DAY=new Oe("AmPmOfDay",dt.HALF_DAYS,dt.DAYS,en.of(0,1)),Oe.DAY_OF_WEEK=new Oe("DayOfWeek",dt.DAYS,dt.WEEKS,en.of(1,7)),Oe.ALIGNED_DAY_OF_WEEK_IN_MONTH=new Oe("AlignedDayOfWeekInMonth",dt.DAYS,dt.WEEKS,en.of(1,7)),Oe.ALIGNED_DAY_OF_WEEK_IN_YEAR=new Oe("AlignedDayOfWeekInYear",dt.DAYS,dt.WEEKS,en.of(1,7)),Oe.DAY_OF_MONTH=new Oe("DayOfMonth",dt.DAYS,dt.MONTHS,en.of(1,28,31),"day"),Oe.DAY_OF_YEAR=new Oe("DayOfYear",dt.DAYS,dt.YEARS,en.of(1,365,366)),Oe.EPOCH_DAY=new Oe("EpochDay",dt.DAYS,dt.FOREVER,en.of(-365961662,364522971)),Oe.ALIGNED_WEEK_OF_MONTH=new Oe("AlignedWeekOfMonth",dt.WEEKS,dt.MONTHS,en.of(1,4,5)),Oe.ALIGNED_WEEK_OF_YEAR=new Oe("AlignedWeekOfYear",dt.WEEKS,dt.YEARS,en.of(1,53)),Oe.MONTH_OF_YEAR=new Oe("MonthOfYear",dt.MONTHS,dt.YEARS,en.of(1,12),"month"),Oe.PROLEPTIC_MONTH=new Oe("ProlepticMonth",dt.MONTHS,dt.FOREVER,en.of(Af.MIN_VALUE*12,Af.MAX_VALUE*12+11)),Oe.YEAR_OF_ERA=new Oe("YearOfEra",dt.YEARS,dt.FOREVER,en.of(1,Af.MAX_VALUE,Af.MAX_VALUE+1)),Oe.YEAR=new Oe("Year",dt.YEARS,dt.FOREVER,en.of(Af.MIN_VALUE,Af.MAX_VALUE),"year"),Oe.ERA=new Oe("Era",dt.ERAS,dt.FOREVER,en.of(0,1)),Oe.INSTANT_SECONDS=new Oe("InstantSeconds",dt.SECONDS,dt.FOREVER,en.of(yh,ng)),Oe.OFFSET_SECONDS=new Oe("OffsetSeconds",dt.SECONDS,dt.FOREVER,en.of(-18*3600,18*3600))}/**
 * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
 * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
 * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
 */var xr=(function(){function r(){}return r.zoneId=function(){return r.ZONE_ID},r.chronology=function(){return r.CHRONO},r.precision=function(){return r.PRECISION},r.zone=function(){return r.ZONE},r.offset=function(){return r.OFFSET},r.localDate=function(){return r.LOCAL_DATE},r.localTime=function(){return r.LOCAL_TIME},r})();/**
 * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
 * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
 * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
 */var VS=(function(){function r(){}var e=r.prototype;return e.query=function(n){return n===xr.zoneId()||n===xr.chronology()||n===xr.precision()?null:n.queryFrom(this)},e.get=function(n){return this.range(n).checkValidIntValue(this.getLong(n),n)},e.getLong=function(n){Li("getLong")},e.range=function(n){if(n instanceof Oe){if(this.isSupported(n))return n.range();throw new kn("Unsupported field: "+n)}return n.rangeRefinedBy(this)},e.isSupported=function(n){Li("isSupported")},r})(),gj=(function(r){nn(e,r);function e(){return r.apply(this,arguments)||this}var i=e.prototype;return i.queryFrom=function(t){Li("queryFrom")},e})(WM);function Nl(r,e){var i=(function(n){nn(t,n);function t(){return n.apply(this,arguments)||this}return t})(gj);return i.prototype.queryFrom=e,new i(r)}var Sa=(function(r){nn(e,r);function e(n,t){var o;return o=r.call(this)||this,o._ordinal=n,o._name=t,o}var i=e.prototype;return i.ordinal=function(){return this._ordinal},i.name=function(){return this._name},e.values=function(){return rR.slice()},e.valueOf=function(t){var o=0;for(o;o<rR.length&&rR[o].name()!==t;o++);return e.of(o+1)},e.of=function(t){if(t<1||t>7)throw new ei("Invalid value for DayOfWeek: "+t);return rR[t-1]},e.from=function(t){if(Go(t!=null,"temporal",U0),t instanceof e)return t;try{return e.of(t.get(Oe.DAY_OF_WEEK))}catch(o){throw o instanceof ei?new ei("Unable to obtain DayOfWeek from TemporalAccessor: "+t+", type "+(t.constructor!=null?t.constructor.name:""),o):o}},i.value=function(){return this._ordinal+1},i.displayName=function(t,o){throw new vi("Pattern using (localized) text not implemented yet!")},i.isSupported=function(t){return t instanceof Oe?t===Oe.DAY_OF_WEEK:t!=null&&t.isSupportedBy(this)},i.range=function(t){if(t===Oe.DAY_OF_WEEK)return t.range();if(t instanceof Oe)throw new kn("Unsupported field: "+t);return t.rangeRefinedBy(this)},i.get=function(t){return t===Oe.DAY_OF_WEEK?this.value():this.range(t).checkValidIntValue(this.getLong(t),t)},i.getLong=function(t){if(t===Oe.DAY_OF_WEEK)return this.value();if(t instanceof Oe)throw new kn("Unsupported field: "+t);return t.getFrom(this)},i.plus=function(t){var o=Ye.floorMod(t,7);return rR[Ye.floorMod(this._ordinal+(o+7),7)]},i.minus=function(t){return this.plus(-1*Ye.floorMod(t,7))},i.query=function(t){return t===xr.precision()?dt.DAYS:t===xr.localDate()||t===xr.localTime()||t===xr.chronology()||t===xr.zone()||t===xr.zoneId()||t===xr.offset()?null:(Go(t!=null,"query",U0),t.queryFrom(this))},i.adjustInto=function(t){return gt(t,"temporal"),t.with(Oe.DAY_OF_WEEK,this.value())},i.equals=function(t){return this===t},i.toString=function(){return this._name},i.compareTo=function(t){return gt(t,"other"),gi(t,e,"other"),this._ordinal-t._ordinal},i.toJSON=function(){return this.toString()},e})(VS),rR;function TXe(){Sa.MONDAY=new Sa(0,"MONDAY"),Sa.TUESDAY=new Sa(1,"TUESDAY"),Sa.WEDNESDAY=new Sa(2,"WEDNESDAY"),Sa.THURSDAY=new Sa(3,"THURSDAY"),Sa.FRIDAY=new Sa(4,"FRIDAY"),Sa.SATURDAY=new Sa(5,"SATURDAY"),Sa.SUNDAY=new Sa(6,"SUNDAY"),Sa.FROM=Nl("DayOfWeek.FROM",function(r){return Sa.from(r)}),rR=[Sa.MONDAY,Sa.TUESDAY,Sa.WEDNESDAY,Sa.THURSDAY,Sa.FRIDAY,Sa.SATURDAY,Sa.SUNDAY]}var Bi=(function(r){nn(e,r);function e(n,t){var o;return o=r.call(this)||this,o._value=Ye.safeToInt(n),o._name=t,o}var i=e.prototype;return i.value=function(){return this._value},i.ordinal=function(){return this._value-1},i.name=function(){return this._name},i.displayName=function(t,o){throw new vi("Pattern using (localized) text not implemented yet!")},i.isSupported=function(t){return t===null?!1:t instanceof Oe?t===Oe.MONTH_OF_YEAR:t!=null&&t.isSupportedBy(this)},i.get=function(t){return t===Oe.MONTH_OF_YEAR?this.value():this.range(t).checkValidIntValue(this.getLong(t),t)},i.getLong=function(t){if(t===Oe.MONTH_OF_YEAR)return this.value();if(t instanceof Oe)throw new kn("Unsupported field: "+t);return t.getFrom(this)},i.plus=function(t){var o=Ye.intMod(t,12)+12,a=Ye.intMod(this.value()+o,12);return a=a===0?12:a,e.of(a)},i.minus=function(t){return this.plus(-1*Ye.intMod(t,12))},i.length=function(t){switch(this){case e.FEBRUARY:return t?29:28;case e.APRIL:case e.JUNE:case e.SEPTEMBER:case e.NOVEMBER:return 30;default:return 31}},i.minLength=function(){switch(this){case e.FEBRUARY:return 28;case e.APRIL:case e.JUNE:case e.SEPTEMBER:case e.NOVEMBER:return 30;default:return 31}},i.maxLength=function(){switch(this){case e.FEBRUARY:return 29;case e.APRIL:case e.JUNE:case e.SEPTEMBER:case e.NOVEMBER:return 30;default:return 31}},i.firstDayOfYear=function(t){var o=t?1:0;switch(this){case e.JANUARY:return 1;case e.FEBRUARY:return 32;case e.MARCH:return 60+o;case e.APRIL:return 91+o;case e.MAY:return 121+o;case e.JUNE:return 152+o;case e.JULY:return 182+o;case e.AUGUST:return 213+o;case e.SEPTEMBER:return 244+o;case e.OCTOBER:return 274+o;case e.NOVEMBER:return 305+o;case e.DECEMBER:default:return 335+o}},i.firstMonthOfQuarter=function(){switch(this){case e.JANUARY:case e.FEBRUARY:case e.MARCH:return e.JANUARY;case e.APRIL:case e.MAY:case e.JUNE:return e.APRIL;case e.JULY:case e.AUGUST:case e.SEPTEMBER:return e.JULY;case e.OCTOBER:case e.NOVEMBER:case e.DECEMBER:default:return e.OCTOBER}},i.query=function(t){return Go(t!=null,"query() parameter must not be null",ei),t===xr.chronology()?Mo.INSTANCE:t===xr.precision()?dt.MONTHS:r.prototype.query.call(this,t)},i.toString=function(){switch(this){case e.JANUARY:return"JANUARY";case e.FEBRUARY:return"FEBRUARY";case e.MARCH:return"MARCH";case e.APRIL:return"APRIL";case e.MAY:return"MAY";case e.JUNE:return"JUNE";case e.JULY:return"JULY";case e.AUGUST:return"AUGUST";case e.SEPTEMBER:return"SEPTEMBER";case e.OCTOBER:return"OCTOBER";case e.NOVEMBER:return"NOVEMBER";case e.DECEMBER:return"DECEMBER";default:return"unknown Month, value: "+this.value()}},i.toJSON=function(){return this.toString()},i.adjustInto=function(t){return t.with(Oe.MONTH_OF_YEAR,this.value())},i.compareTo=function(t){return gt(t,"other"),gi(t,e,"other"),this._value-t._value},i.equals=function(t){return this===t},e.valueOf=function(t){var o=0;for(o;o<uN.length&&uN[o].name()!==t;o++);return e.of(o+1)},e.values=function(){return uN.slice()},e.of=function(t){return(t<1||t>12)&&Go(!1,"Invalid value for MonthOfYear: "+t,ei),uN[t-1]},e.from=function(t){if(t instanceof e)return t;try{return e.of(t.get(Oe.MONTH_OF_YEAR))}catch(o){throw new ei("Unable to obtain Month from TemporalAccessor: "+t+" of type "+(t&&t.constructor!=null?t.constructor.name:""),o)}},e})(VS),uN;function xXe(){Bi.JANUARY=new Bi(1,"JANUARY"),Bi.FEBRUARY=new Bi(2,"FEBRUARY"),Bi.MARCH=new Bi(3,"MARCH"),Bi.APRIL=new Bi(4,"APRIL"),Bi.MAY=new Bi(5,"MAY"),Bi.JUNE=new Bi(6,"JUNE"),Bi.JULY=new Bi(7,"JULY"),Bi.AUGUST=new Bi(8,"AUGUST"),Bi.SEPTEMBER=new Bi(9,"SEPTEMBER"),Bi.OCTOBER=new Bi(10,"OCTOBER"),Bi.NOVEMBER=new Bi(11,"NOVEMBER"),Bi.DECEMBER=new Bi(12,"DECEMBER"),uN=[Bi.JANUARY,Bi.FEBRUARY,Bi.MARCH,Bi.APRIL,Bi.MAY,Bi.JUNE,Bi.JULY,Bi.AUGUST,Bi.SEPTEMBER,Bi.OCTOBER,Bi.NOVEMBER,Bi.DECEMBER]}var EXe=/([-+]?)P(?:([-+]?[0-9]+)Y)?(?:([-+]?[0-9]+)M)?(?:([-+]?[0-9]+)W)?(?:([-+]?[0-9]+)D)?/,I0=(function(r){nn(e,r);function e(n,t,o){var a;a=r.call(this)||this;var s=Ye.safeToInt(n),l=Ye.safeToInt(t),u=Ye.safeToInt(o);return s===0&&l===0&&u===0?(e.ZERO||(a._years=s,a._months=l,a._days=u,e.ZERO=cF(a)),e.ZERO||cF(a)):(a._years=s,a._months=l,a._days=u,a)}e.ofYears=function(t){return e.create(t,0,0)},e.ofMonths=function(t){return e.create(0,t,0)},e.ofWeeks=function(t){return e.create(0,0,Ye.safeMultiply(t,7))},e.ofDays=function(t){return e.create(0,0,t)},e.of=function(t,o,a){return e.create(t,o,a)},e.from=function(t){if(t instanceof e)return t;gt(t,"amount");for(var o=0,a=0,s=0,l=t.units(),u=0;u<l.length;u++){var c=l[u],d=t.get(c);if(c===dt.YEARS)o=Ye.safeToInt(d);else if(c===dt.MONTHS)a=Ye.safeToInt(d);else if(c===dt.DAYS)s=Ye.safeToInt(d);else throw new ei("Unit must be Years, Months or Days, but was "+c)}return e.create(o,a,s)},e.between=function(t,o){return gt(t,"startDate"),gt(o,"endDate"),gi(t,yi,"startDate"),gi(o,yi,"endDate"),t.until(o)},e.parse=function(t){gt(t,"text");try{return e._parse(t)}catch(o){throw o instanceof lg?new hg("Text cannot be parsed to a Period",t,0,o):o}},e._parse=function(t){var o=EXe.exec(t);if(o!=null){var a=o[1]==="-"?-1:1,s=o[2],l=o[3],u=o[4],c=o[5];if(s!=null||l!=null||u!=null||c!=null){var d=e._parseNumber(t,s,a),f=e._parseNumber(t,l,a),h=e._parseNumber(t,u,a),p=e._parseNumber(t,c,a);return p=Ye.safeAdd(p,Ye.safeMultiply(h,7)),e.create(d,f,p)}}throw new hg("Text cannot be parsed to a Period",t,0)},e._parseNumber=function(t,o,a){if(o==null)return 0;var s=Ye.parseInt(o);return Ye.safeMultiply(s,a)},e.create=function(t,o,a){return new e(t,o,a)};var i=e.prototype;return i.units=function(){return[dt.YEARS,dt.MONTHS,dt.DAYS]},i.chronology=function(){return Mo.INSTANCE},i.get=function(t){if(t===dt.YEARS)return this._years;if(t===dt.MONTHS)return this._months;if(t===dt.DAYS)return this._days;throw new kn("Unsupported unit: "+t)},i.isZero=function(){return this===e.ZERO},i.isNegative=function(){return this._years<0||this._months<0||this._days<0},i.years=function(){return this._years},i.months=function(){return this._months},i.days=function(){return this._days},i.withYears=function(t){return t===this._years?this:e.create(t,this._months,this._days)},i.withMonths=function(t){return t===this._months?this:e.create(this._years,t,this._days)},i.withDays=function(t){return t===this._days?this:e.create(this._years,this._months,t)},i.plus=function(t){var o=e.from(t);return e.create(Ye.safeAdd(this._years,o._years),Ye.safeAdd(this._months,o._months),Ye.safeAdd(this._days,o._days))},i.plusYears=function(t){return t===0?this:e.create(Ye.safeToInt(Ye.safeAdd(this._years,t)),this._months,this._days)},i.plusMonths=function(t){return t===0?this:e.create(this._years,Ye.safeToInt(Ye.safeAdd(this._months,t)),this._days)},i.plusDays=function(t){return t===0?this:e.create(this._years,this._months,Ye.safeToInt(Ye.safeAdd(this._days,t)))},i.minus=function(t){var o=e.from(t);return e.create(Ye.safeSubtract(this._years,o._years),Ye.safeSubtract(this._months,o._months),Ye.safeSubtract(this._days,o._days))},i.minusYears=function(t){return this.plusYears(-1*t)},i.minusMonths=function(t){return this.plusMonths(-1*t)},i.minusDays=function(t){return this.plusDays(-1*t)},i.multipliedBy=function(t){return this===e.ZERO||t===1?this:e.create(Ye.safeMultiply(this._years,t),Ye.safeMultiply(this._months,t),Ye.safeMultiply(this._days,t))},i.negated=function(){return this.multipliedBy(-1)},i.normalized=function(){var t=this.toTotalMonths(),o=Ye.intDiv(t,12),a=Ye.intMod(t,12);return o===this._years&&a===this._months?this:e.create(Ye.safeToInt(o),a,this._days)},i.toTotalMonths=function(){return this._years*12+this._months},i.addTo=function(t){return gt(t,"temporal"),this._years!==0?this._months!==0?t=t.plus(this.toTotalMonths(),dt.MONTHS):t=t.plus(this._years,dt.YEARS):this._months!==0&&(t=t.plus(this._months,dt.MONTHS)),this._days!==0&&(t=t.plus(this._days,dt.DAYS)),t},i.subtractFrom=function(t){return gt(t,"temporal"),this._years!==0?this._months!==0?t=t.minus(this.toTotalMonths(),dt.MONTHS):t=t.minus(this._years,dt.YEARS):this._months!==0&&(t=t.minus(this._months,dt.MONTHS)),this._days!==0&&(t=t.minus(this._days,dt.DAYS)),t},i.equals=function(t){if(this===t)return!0;if(t instanceof e){var o=t;return this._years===o._years&&this._months===o._months&&this._days===o._days}return!1},i.hashCode=function(){return Ye.hashCode(this._years,this._months,this._days)},i.toString=function(){if(this===e.ZERO)return"P0D";var t="P";return this._years!==0&&(t+=this._years+"Y"),this._months!==0&&(t+=this._months+"M"),this._days!==0&&(t+=this._days+"D"),t},i.toJSON=function(){return this.toString()},e})(R1);function AXe(){I0.ofDays(0)}/*
 * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
 * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
 * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
 */var zxe=(function(){function r(i){this._index=i,this._errorIndex=-1}var e=r.prototype;return e.getIndex=function(){return this._index},e.setIndex=function(n){this._index=n},e.getErrorIndex=function(){return this._errorIndex},e.setErrorIndex=function(n){this._errorIndex=n},r})();/*
 * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
 * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
 */var Wxe=(function(){function r(){this._map={}}var e=r.prototype;return e.putAll=function(n){for(var t in n._map)this._map[t]=n._map[t];return this},e.containsKey=function(n){return this._map.hasOwnProperty(n.name())&&this.get(n)!==void 0},e.get=function(n){return this._map[n.name()]},e.put=function(n,t){return this.set(n,t)},e.set=function(n,t){return this._map[n.name()]=t,this},e.retainAll=function(n){for(var t={},o=0;o<n.length;o++){var a=n[o].name();t[a]=this._map[a]}return this._map=t,this},e.remove=function(n){var t=n.name(),o=this._map[t];return this._map[t]=void 0,o},e.keySet=function(){return this._map},e.clear=function(){this._map={}},r})(),Zi=(function(r){nn(e,r);function e(){return r.apply(this,arguments)||this}return e})(WM);Zi.STRICT=new Zi("STRICT");Zi.SMART=new Zi("SMART");Zi.LENIENT=new Zi("LENIENT");var Rf=(function(r){nn(e,r);function e(){return r.apply(this,arguments)||this}var i=e.prototype;return i.isSupported=function(t){Li("isSupported")},i.minus=function(t,o){return arguments.length<2?this._minusAmount(t):this._minusUnit(t,o)},i._minusAmount=function(t){return gt(t,"amount"),gi(t,R1,"amount"),t.subtractFrom(this)},i._minusUnit=function(t,o){return gt(t,"amountToSubtract"),gt(o,"unit"),gi(o,J0,"unit"),this._plusUnit(-t,o)},i.plus=function(t,o){return arguments.length<2?this._plusAmount(t):this._plusUnit(t,o)},i._plusAmount=function(t){return gt(t,"amount"),gi(t,R1,"amount"),t.addTo(this)},i._plusUnit=function(t,o){Li("_plusUnit")},i.until=function(t,o){Li("until")},i.with=function(t,o){return arguments.length<2?this._withAdjuster(t):this._withField(t,o)},i._withAdjuster=function(t){return gt(t,"adjuster"),Go(typeof t.adjustInto=="function","adjuster must be a TemporalAdjuster",vi),t.adjustInto(this)},i._withField=function(t,o){Li("_withField")},e})(VS);typeof Symbol<"u"&&Symbol.toPrimitive&&(Rf.prototype[Symbol.toPrimitive]=function(r){if(r!=="number")return this.toString();throw new TypeError("A conversion from Temporal to a number is not allowed. To compare use the methods .equals(), .compareTo(), .isBefore() or one that is more suitable to your use case.")});var dF=(function(r){nn(e,r);function e(){return r.apply(this,arguments)||this}var i=e.prototype;return i.isSupported=function(t){return t instanceof Oe||t instanceof dt?t.isDateBased():t!=null&&t.isSupportedBy(this)},i.query=function(t){return t===xr.chronology()?this.chronology():t===xr.precision()?dt.DAYS:t===xr.localDate()?yi.ofEpochDay(this.toEpochDay()):t===xr.localTime()||t===xr.zone()||t===xr.zoneId()||t===xr.offset()?null:r.prototype.query.call(this,t)},i.adjustInto=function(t){return t.with(Oe.EPOCH_DAY,this.toEpochDay())},i.format=function(t){return gt(t,"formatter"),gi(t,_n,"formatter"),t.format(this)},e})(Rf);/*
 * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
 * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
 */var gv=(function(){function r(){}return r.startsWith=function(i,n){return i.indexOf(n)===0},r.hashCode=function(i){var n=i.length;if(n===0)return 0;for(var t=0,o=0;o<n;o++){var a=i.charCodeAt(o);t=(t<<5)-t+a,t|=0}return Ye.smi(t)},r})();/*
 * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
 * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
 * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
 */var Lo=(function(){function r(){}r.systemDefault=function(){throw new ei("not supported operation")},r.getAvailableZoneIds=function(){throw new ei("not supported operation")},r.of=function(n){throw new ei("not supported operation"+n)},r.ofOffset=function(n,t){throw new ei("not supported operation"+n+t)},r.from=function(n){throw new ei("not supported operation"+n)};var e=r.prototype;return e.id=function(){Li("ZoneId.id")},e.rules=function(){Li("ZoneId.rules")},e.normalized=function(){var n=this.rules();return n.isFixedOffset()?n.offset(ua.EPOCH):this},e.equals=function(n){return this===n?!0:n instanceof r?this.id()===n.id():!1},e.hashCode=function(){return gv.hashCode(this.id())},e.toString=function(){return this.id()},e.toJSON=function(){return this.toString()},r})(),YU=(function(){function r(){}r.of=function(n){return gt(n,"offset"),new wXe(n)};var e=r.prototype;return e.isFixedOffset=function(){Li("ZoneRules.isFixedOffset")},e.offset=function(n){return n instanceof ua?this.offsetOfInstant(n):this.offsetOfLocalDateTime(n)},e.offsetOfInstant=function(n){Li("ZoneRules.offsetInstant")},e.offsetOfEpochMilli=function(n){Li("ZoneRules.offsetOfEpochMilli")},e.offsetOfLocalDateTime=function(n){Li("ZoneRules.offsetLocalDateTime")},e.validOffsets=function(n){Li("ZoneRules.validOffsets")},e.transition=function(n){Li("ZoneRules.transition")},e.standardOffset=function(n){Li("ZoneRules.standardOffset")},e.daylightSavings=function(n){Li("ZoneRules.daylightSavings")},e.isDaylightSavings=function(n){Li("ZoneRules.isDaylightSavings")},e.isValidOffset=function(n,t){Li("ZoneRules.isValidOffset")},e.nextTransition=function(n){Li("ZoneRules.nextTransition")},e.previousTransition=function(n){Li("ZoneRules.previousTransition")},e.transitions=function(){Li("ZoneRules.transitions")},e.transitionRules=function(){Li("ZoneRules.transitionRules")},e.toString=function(){Li("ZoneRules.toString")},e.toJSON=function(){return this.toString()},r})(),wXe=(function(r){nn(e,r);function e(n){var t;return t=r.call(this)||this,t._offset=n,t}var i=e.prototype;return i.isFixedOffset=function(){return!0},i.offsetOfInstant=function(){return this._offset},i.offsetOfEpochMilli=function(){return this._offset},i.offsetOfLocalDateTime=function(){return this._offset},i.validOffsets=function(){return[this._offset]},i.transition=function(){return null},i.standardOffset=function(){return this._offset},i.daylightSavings=function(){return As.ZERO},i.isDaylightSavings=function(){return!1},i.isValidOffset=function(t,o){return this._offset.equals(o)},i.nextTransition=function(){return null},i.previousTransition=function(){return null},i.transitions=function(){return[]},i.transitionRules=function(){return[]},i.equals=function(t){return this===t?!0:t instanceof e?this._offset.equals(t._offset):!1},i.toString=function(){return"FixedRules:"+this._offset.toString()},e})(YU),Nde={},Fde={},Gi=(function(r){nn(e,r);function e(n){var t;return t=r.call(this)||this,e._validateTotalSeconds(n),t._totalSeconds=Ye.safeToInt(n),t._rules=YU.of(cF(t)),t._id=e._buildId(n),t}var i=e.prototype;return i.totalSeconds=function(){return this._totalSeconds},i.id=function(){return this._id},e._buildId=function(t){if(t===0)return"Z";var o=Math.abs(t),a=Ye.intDiv(o,Wt.SECONDS_PER_HOUR),s=Ye.intMod(Ye.intDiv(o,Wt.SECONDS_PER_MINUTE),Wt.MINUTES_PER_HOUR),l=(t<0?"-":"+")+(a<10?"0":"")+a+(s<10?":0":":")+s,u=Ye.intMod(o,Wt.SECONDS_PER_MINUTE);return u!==0&&(l+=(u<10?":0":":")+u),l},e._validateTotalSeconds=function(t){if(Math.abs(t)>e.MAX_SECONDS)throw new ei("Zone offset not in valid range: -18:00 to +18:00")},e._validate=function(t,o,a){if(t<-18||t>18)throw new ei("Zone offset hours not in valid range: value "+t+" is not in the range -18 to 18");if(t>0){if(o<0||a<0)throw new ei("Zone offset minutes and seconds must be positive because hours is positive")}else if(t<0){if(o>0||a>0)throw new ei("Zone offset minutes and seconds must be negative because hours is negative")}else if(o>0&&a<0||o<0&&a>0)throw new ei("Zone offset minutes and seconds must have the same sign");if(Math.abs(o)>59)throw new ei("Zone offset minutes not in valid range: abs(value) "+Math.abs(o)+" is not in the range 0 to 59");if(Math.abs(a)>59)throw new ei("Zone offset seconds not in valid range: abs(value) "+Math.abs(a)+" is not in the range 0 to 59");if(Math.abs(t)===18&&(Math.abs(o)>0||Math.abs(a)>0))throw new ei("Zone offset not in valid range: -18:00 to +18:00")},e.of=function(t){gt(t,"offsetId");var o=Fde[t];if(o!=null)return o;var a,s,l;switch(t.length){case 2:t=t[0]+"0"+t[1];case 3:a=e._parseNumber(t,1,!1),s=0,l=0;break;case 5:a=e._parseNumber(t,1,!1),s=e._parseNumber(t,3,!1),l=0;break;case 6:a=e._parseNumber(t,1,!1),s=e._parseNumber(t,4,!0),l=0;break;case 7:a=e._parseNumber(t,1,!1),s=e._parseNumber(t,3,!1),l=e._parseNumber(t,5,!1);break;case 9:a=e._parseNumber(t,1,!1),s=e._parseNumber(t,4,!0),l=e._parseNumber(t,7,!0);break;default:throw new ei("Invalid ID for ZoneOffset, invalid format: "+t)}var u=t[0];if(u!=="+"&&u!=="-")throw new ei("Invalid ID for ZoneOffset, plus/minus not found when expected: "+t);return u==="-"?e.ofHoursMinutesSeconds(-a,-s,-l):e.ofHoursMinutesSeconds(a,s,l)},e._parseNumber=function(t,o,a){if(a&&t[o-1]!==":")throw new ei("Invalid ID for ZoneOffset, colon not found when expected: "+t);var s=t[o],l=t[o+1];if(s<"0"||s>"9"||l<"0"||l>"9")throw new ei("Invalid ID for ZoneOffset, non numeric characters found: "+t);return(s.charCodeAt(0)-48)*10+(l.charCodeAt(0)-48)},e.ofHours=function(t){return e.ofHoursMinutesSeconds(t,0,0)},e.ofHoursMinutes=function(t,o){return e.ofHoursMinutesSeconds(t,o,0)},e.ofHoursMinutesSeconds=function(t,o,a){e._validate(t,o,a);var s=t*Wt.SECONDS_PER_HOUR+o*Wt.SECONDS_PER_MINUTE+a;return e.ofTotalSeconds(s)},e.ofTotalMinutes=function(t){var o=t*Wt.SECONDS_PER_MINUTE;return e.ofTotalSeconds(o)},e.ofTotalSeconds=function(t){if(t%(15*Wt.SECONDS_PER_MINUTE)===0){var o=t,a=Nde[o];return a==null&&(a=new e(t),Nde[o]=a,Fde[a.id()]=a),a}else return new e(t)},i.rules=function(){return this._rules},i.get=function(t){return this.getLong(t)},i.getLong=function(t){if(t===Oe.OFFSET_SECONDS)return this._totalSeconds;if(t instanceof Oe)throw new ei("Unsupported field: "+t);return t.getFrom(this)},i.query=function(t){return gt(t,"query"),t===xr.offset()||t===xr.zone()?this:t===xr.localDate()||t===xr.localTime()||t===xr.precision()||t===xr.chronology()||t===xr.zoneId()?null:t.queryFrom(this)},i.adjustInto=function(t){return t.with(Oe.OFFSET_SECONDS,this._totalSeconds)},i.compareTo=function(t){return gt(t,"other"),t._totalSeconds-this._totalSeconds},i.equals=function(t){return this===t?!0:t instanceof e?this._totalSeconds===t._totalSeconds:!1},i.hashCode=function(){return this._totalSeconds},i.toString=function(){return this._id},e})(Lo);function OXe(){Gi.MAX_SECONDS=18*Wt.SECONDS_PER_HOUR,Gi.UTC=Gi.ofTotalSeconds(0),Gi.MIN=Gi.ofTotalSeconds(-Gi.MAX_SECONDS),Gi.MAX=Gi.ofTotalSeconds(Gi.MAX_SECONDS)}var g3=(function(r){nn(e,r),e.create=function(t,o){var a=new e;return a._addFieldValue(t,o),a};function e(){var n;return n=r.call(this)||this,n.fieldValues=new Wxe,n.chrono=null,n.zone=null,n.date=null,n.time=null,n.leapSecond=!1,n.excessDays=null,n}var i=e.prototype;return i.getFieldValue0=function(t){return this.fieldValues.get(t)},i._addFieldValue=function(t,o){gt(t,"field");var a=this.getFieldValue0(t);if(a!=null&&a!==o)throw new ei("Conflict found: "+t+" "+a+" differs from "+t+" "+o+": "+this);return this._putFieldValue0(t,o)},i._putFieldValue0=function(t,o){return this.fieldValues.put(t,o),this},i.resolve=function(t,o){return o!=null&&this.fieldValues.retainAll(o),this._mergeDate(t),this._mergeTime(t),this._resolveTimeInferZeroes(t),this.excessDays!=null&&this.excessDays.isZero()===!1&&this.date!=null&&this.time!=null&&(this.date=this.date.plus(this.excessDays),this.excessDays=I0.ZERO),this._resolveInstant(),this},i._mergeDate=function(t){this._checkDate(Mo.INSTANCE.resolveDate(this.fieldValues,t))},i._checkDate=function(t){if(t!=null){this._addObject(t);for(var o in this.fieldValues.keySet()){var a=Oe.byName(o);if(a&&this.fieldValues.get(a)!==void 0&&a.isDateBased()){var s=void 0;try{s=t.getLong(a)}catch(u){if(u instanceof ei)continue;throw u}var l=this.fieldValues.get(a);if(s!==l)throw new ei("Conflict found: Field "+a+" "+s+" differs from "+a+" "+l+" derived from "+t)}}}},i._mergeTime=function(t){if(this.fieldValues.containsKey(Oe.CLOCK_HOUR_OF_DAY)){var o=this.fieldValues.remove(Oe.CLOCK_HOUR_OF_DAY);t!==Zi.LENIENT&&(t===Zi.SMART&&o===0||Oe.CLOCK_HOUR_OF_DAY.checkValidValue(o)),this._addFieldValue(Oe.HOUR_OF_DAY,o===24?0:o)}if(this.fieldValues.containsKey(Oe.CLOCK_HOUR_OF_AMPM)){var a=this.fieldValues.remove(Oe.CLOCK_HOUR_OF_AMPM);t!==Zi.LENIENT&&(t===Zi.SMART&&a===0||Oe.CLOCK_HOUR_OF_AMPM.checkValidValue(a)),this._addFieldValue(Oe.HOUR_OF_AMPM,a===12?0:a)}if(t!==Zi.LENIENT&&(this.fieldValues.containsKey(Oe.AMPM_OF_DAY)&&Oe.AMPM_OF_DAY.checkValidValue(this.fieldValues.get(Oe.AMPM_OF_DAY)),this.fieldValues.containsKey(Oe.HOUR_OF_AMPM)&&Oe.HOUR_OF_AMPM.checkValidValue(this.fieldValues.get(Oe.HOUR_OF_AMPM))),this.fieldValues.containsKey(Oe.AMPM_OF_DAY)&&this.fieldValues.containsKey(Oe.HOUR_OF_AMPM)){var s=this.fieldValues.remove(Oe.AMPM_OF_DAY),l=this.fieldValues.remove(Oe.HOUR_OF_AMPM);this._addFieldValue(Oe.HOUR_OF_DAY,s*12+l)}if(this.fieldValues.containsKey(Oe.NANO_OF_DAY)){var u=this.fieldValues.remove(Oe.NANO_OF_DAY);t!==Zi.LENIENT&&Oe.NANO_OF_DAY.checkValidValue(u),this._addFieldValue(Oe.SECOND_OF_DAY,Ye.intDiv(u,1e9)),this._addFieldValue(Oe.NANO_OF_SECOND,Ye.intMod(u,1e9))}if(this.fieldValues.containsKey(Oe.MICRO_OF_DAY)){var c=this.fieldValues.remove(Oe.MICRO_OF_DAY);t!==Zi.LENIENT&&Oe.MICRO_OF_DAY.checkValidValue(c),this._addFieldValue(Oe.SECOND_OF_DAY,Ye.intDiv(c,1e6)),this._addFieldValue(Oe.MICRO_OF_SECOND,Ye.intMod(c,1e6))}if(this.fieldValues.containsKey(Oe.MILLI_OF_DAY)){var d=this.fieldValues.remove(Oe.MILLI_OF_DAY);t!==Zi.LENIENT&&Oe.MILLI_OF_DAY.checkValidValue(d),this._addFieldValue(Oe.SECOND_OF_DAY,Ye.intDiv(d,1e3)),this._addFieldValue(Oe.MILLI_OF_SECOND,Ye.intMod(d,1e3))}if(this.fieldValues.containsKey(Oe.SECOND_OF_DAY)){var f=this.fieldValues.remove(Oe.SECOND_OF_DAY);t!==Zi.LENIENT&&Oe.SECOND_OF_DAY.checkValidValue(f),this._addFieldValue(Oe.HOUR_OF_DAY,Ye.intDiv(f,3600)),this._addFieldValue(Oe.MINUTE_OF_HOUR,Ye.intMod(Ye.intDiv(f,60),60)),this._addFieldValue(Oe.SECOND_OF_MINUTE,Ye.intMod(f,60))}if(this.fieldValues.containsKey(Oe.MINUTE_OF_DAY)){var h=this.fieldValues.remove(Oe.MINUTE_OF_DAY);t!==Zi.LENIENT&&Oe.MINUTE_OF_DAY.checkValidValue(h),this._addFieldValue(Oe.HOUR_OF_DAY,Ye.intDiv(h,60)),this._addFieldValue(Oe.MINUTE_OF_HOUR,Ye.intMod(h,60))}if(t!==Zi.LENIENT&&(this.fieldValues.containsKey(Oe.MILLI_OF_SECOND)&&Oe.MILLI_OF_SECOND.checkValidValue(this.fieldValues.get(Oe.MILLI_OF_SECOND)),this.fieldValues.containsKey(Oe.MICRO_OF_SECOND)&&Oe.MICRO_OF_SECOND.checkValidValue(this.fieldValues.get(Oe.MICRO_OF_SECOND))),this.fieldValues.containsKey(Oe.MILLI_OF_SECOND)&&this.fieldValues.containsKey(Oe.MICRO_OF_SECOND)){var p=this.fieldValues.remove(Oe.MILLI_OF_SECOND),g=this.fieldValues.get(Oe.MICRO_OF_SECOND);this._putFieldValue0(Oe.MICRO_OF_SECOND,p*1e3+Ye.intMod(g,1e3))}if(this.fieldValues.containsKey(Oe.MICRO_OF_SECOND)&&this.fieldValues.containsKey(Oe.NANO_OF_SECOND)){var v=this.fieldValues.get(Oe.NANO_OF_SECOND);this._putFieldValue0(Oe.MICRO_OF_SECOND,Ye.intDiv(v,1e3)),this.fieldValues.remove(Oe.MICRO_OF_SECOND)}if(this.fieldValues.containsKey(Oe.MILLI_OF_SECOND)&&this.fieldValues.containsKey(Oe.NANO_OF_SECOND)){var y=this.fieldValues.get(Oe.NANO_OF_SECOND);this._putFieldValue0(Oe.MILLI_OF_SECOND,Ye.intDiv(y,1e6)),this.fieldValues.remove(Oe.MILLI_OF_SECOND)}if(this.fieldValues.containsKey(Oe.MICRO_OF_SECOND)){var m=this.fieldValues.remove(Oe.MICRO_OF_SECOND);this._putFieldValue0(Oe.NANO_OF_SECOND,m*1e3)}else if(this.fieldValues.containsKey(Oe.MILLI_OF_SECOND)){var b=this.fieldValues.remove(Oe.MILLI_OF_SECOND);this._putFieldValue0(Oe.NANO_OF_SECOND,b*1e6)}},i._resolveTimeInferZeroes=function(t){var o=this.fieldValues.get(Oe.HOUR_OF_DAY),a=this.fieldValues.get(Oe.MINUTE_OF_HOUR),s=this.fieldValues.get(Oe.SECOND_OF_MINUTE),l=this.fieldValues.get(Oe.NANO_OF_SECOND);if(o!=null&&!(a==null&&(s!=null||l!=null))&&!(a!=null&&s==null&&l!=null)){if(t!==Zi.LENIENT){if(o!=null){t===Zi.SMART&&o===24&&(a==null||a===0)&&(s==null||s===0)&&(l==null||l===0)&&(o=0,this.excessDays=I0.ofDays(1));var u=Oe.HOUR_OF_DAY.checkValidIntValue(o);if(a!=null){var c=Oe.MINUTE_OF_HOUR.checkValidIntValue(a);if(s!=null){var d=Oe.SECOND_OF_MINUTE.checkValidIntValue(s);if(l!=null){var f=Oe.NANO_OF_SECOND.checkValidIntValue(l);this._addObject(Wt.of(u,c,d,f))}else this._addObject(Wt.of(u,c,d))}else l==null&&this._addObject(Wt.of(u,c))}else s==null&&l==null&&this._addObject(Wt.of(u,0))}}else if(o!=null){var h=o;if(a!=null)if(s!=null){l==null&&(l=0);var p=Ye.safeMultiply(h,36e11);p=Ye.safeAdd(p,Ye.safeMultiply(a,6e10)),p=Ye.safeAdd(p,Ye.safeMultiply(s,1e9)),p=Ye.safeAdd(p,l);var g=Ye.floorDiv(p,864e11),v=Ye.floorMod(p,864e11);this._addObject(Wt.ofNanoOfDay(v)),this.excessDays=I0.ofDays(g)}else{var y=Ye.safeMultiply(h,3600);y=Ye.safeAdd(y,Ye.safeMultiply(a,60));var m=Ye.floorDiv(y,86400),b=Ye.floorMod(y,86400);this._addObject(Wt.ofSecondOfDay(b)),this.excessDays=I0.ofDays(m)}else{var S=Ye.safeToInt(Ye.floorDiv(h,24));h=Ye.floorMod(h,24),this._addObject(Wt.of(h,0)),this.excessDays=I0.ofDays(S)}}this.fieldValues.remove(Oe.HOUR_OF_DAY),this.fieldValues.remove(Oe.MINUTE_OF_HOUR),this.fieldValues.remove(Oe.SECOND_OF_MINUTE),this.fieldValues.remove(Oe.NANO_OF_SECOND)}},i._addObject=function(t){t instanceof dF?this.date=t:t instanceof Wt&&(this.time=t)},i._resolveInstant=function(){if(this.date!=null&&this.time!=null){var t=this.fieldValues.get(Oe.OFFSET_SECONDS);if(t!=null){var o=Gi.ofTotalSeconds(t),a=this.date.atTime(this.time).atZone(o).getLong(Oe.INSTANT_SECONDS);this.fieldValues.put(Oe.INSTANT_SECONDS,a)}else if(this.zone!=null){var s=this.date.atTime(this.time).atZone(this.zone).getLong(Oe.INSTANT_SECONDS);this.fieldValues.put(Oe.INSTANT_SECONDS,s)}}},i.build=function(t){return t.queryFrom(this)},i.isSupported=function(t){return t==null?!1:this.fieldValues.containsKey(t)&&this.fieldValues.get(t)!==void 0||this.date!=null&&this.date.isSupported(t)||this.time!=null&&this.time.isSupported(t)},i.getLong=function(t){gt(t,"field");var o=this.getFieldValue0(t);if(o==null){if(this.date!=null&&this.date.isSupported(t))return this.date.getLong(t);if(this.time!=null&&this.time.isSupported(t))return this.time.getLong(t);throw new ei("Field not found: "+t)}return o},i.query=function(t){return t===xr.zoneId()?this.zone:t===xr.chronology()?this.chrono:t===xr.localDate()?this.date!=null?yi.from(this.date):null:t===xr.localTime()?this.time:t===xr.zone()||t===xr.offset()?t.queryFrom(this):t===xr.precision()?null:t.queryFrom(this)},e})(VS),Gxe=(function(){function r(){if(arguments.length===1)if(arguments[0]instanceof r){this._constructorSelf.apply(this,arguments);return}else this._constructorFormatter.apply(this,arguments);else this._constructorParam.apply(this,arguments);this._caseSensitive=!0,this._strict=!0,this._parsed=[new jde(this)]}var e=r.prototype;return e._constructorParam=function(n,t,o){this._locale=n,this._symbols=t,this._overrideChronology=o},e._constructorFormatter=function(n){this._locale=n.locale(),this._symbols=n.decimalStyle(),this._overrideChronology=n.chronology()},e._constructorSelf=function(n){this._locale=n._locale,this._symbols=n._symbols,this._overrideChronology=n._overrideChronology,this._overrideZone=n._overrideZone,this._caseSensitive=n._caseSensitive,this._strict=n._strict,this._parsed=[new jde(this)]},e.copy=function(){return new r(this)},e.symbols=function(){return this._symbols},e.isStrict=function(){return this._strict},e.setStrict=function(n){this._strict=n},e.locale=function(){return this._locale},e.setLocale=function(n){this._locale=n},e.startOptional=function(){this._parsed.push(this.currentParsed().copy())},e.endOptional=function(n){n?this._parsed.splice(this._parsed.length-2,1):this._parsed.splice(this._parsed.length-1,1)},e.isCaseSensitive=function(){return this._caseSensitive},e.setCaseSensitive=function(n){this._caseSensitive=n},e.subSequenceEquals=function(n,t,o,a,s){if(t+s>n.length||a+s>o.length)return!1;this.isCaseSensitive()||(n=n.toLowerCase(),o=o.toLowerCase());for(var l=0;l<s;l++){var u=n[t+l],c=o[a+l];if(u!==c)return!1}return!0},e.charEquals=function(n,t){return this.isCaseSensitive()?n===t:this.charEqualsIgnoreCase(n,t)},e.charEqualsIgnoreCase=function(n,t){return n===t||n.toLowerCase()===t.toLowerCase()},e.setParsedField=function(n,t,o,a){var s=this.currentParsed().fieldValues,l=s.get(n);return s.set(n,t),l!=null&&l!==t?~o:a},e.setParsedZone=function(n){gt(n,"zone"),this.currentParsed().zone=n},e.getParsed=function(n){return this.currentParsed().fieldValues.get(n)},e.toParsed=function(){return this.currentParsed()},e.currentParsed=function(){return this._parsed[this._parsed.length-1]},e.setParsedLeapSecond=function(){this.currentParsed().leapSecond=!0},e.getEffectiveChronology=function(){var n=this.currentParsed().chrono;return n==null&&(n=this._overrideChronology,n==null&&(n=Mo.INSTANCE)),n},r})(),jde=(function(r){nn(e,r);function e(n){var t;return t=r.call(this)||this,t.chrono=null,t.zone=null,t.fieldValues=new Wxe,t.leapSecond=!1,t.dateTimeParseContext=n,t}var i=e.prototype;return i.copy=function(){var t=new e;return t.chrono=this.chrono,t.zone=this.zone,t.fieldValues.putAll(this.fieldValues),t.leapSecond=this.leapSecond,t.dateTimeParseContext=this.dateTimeParseContext,t},i.toString=function(){return this.fieldValues+", "+this.chrono+", "+this.zone},i.isSupported=function(t){return this.fieldValues.containsKey(t)},i.get=function(t){var o=this.fieldValues.get(t);return Go(o!=null),o},i.query=function(t){return t===xr.chronology()?this.chrono:t===xr.zoneId()||t===xr.zone()?this.zone:r.prototype.query.call(this,t)},i.toBuilder=function(){var t=new g3;return t.fieldValues.putAll(this.fieldValues),t.chrono=this.dateTimeParseContext.getEffectiveChronology(),this.zone!=null?t.zone=this.zone:t.zone=this.overrideZone,t.leapSecond=this.leapSecond,t.excessDays=this.excessDays,t},e})(Rf);/*
 * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
 * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
 * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
 */var Yxe=(function(){function r(i,n,t){arguments.length===2&&arguments[1]instanceof _n?(this._temporal=r.adjust(i,n),this._locale=n.locale(),this._symbols=n.decimalStyle()):(this._temporal=i,this._locale=n,this._symbols=t),this._optional=0}r.adjust=function(n,t){return n};var e=r.prototype;return e.symbols=function(){return this._symbols},e.startOptional=function(){this._optional++},e.endOptional=function(){this._optional--},e.getValueQuery=function(n){var t=this._temporal.query(n);if(t==null&&this._optional===0)throw new ei("Unable to extract value: "+this._temporal);return t},e.getValue=function(n){try{return this._temporal.getLong(n)}catch(t){if(t instanceof ei&&this._optional>0)return null;throw t}},e.temporal=function(){return this._temporal},e.locale=function(){return this._locale},e.setDateTime=function(n){this._temporal=n},e.setLocale=function(n){this._locale=n},r})(),og={},DXe=[0,90,181,273,0,91,182,274],Mv=(function(r){nn(e,r);function e(){return r.apply(this,arguments)||this}var i=e.prototype;return i.isDateBased=function(){return!0},i.isTimeBased=function(){return!1},i._isIso=function(){return!0},e._getWeekRangeByLocalDate=function(t){var o=e._getWeekBasedYear(t);return en.of(1,e._getWeekRangeByYear(o))},e._getWeekRangeByYear=function(t){var o=yi.of(t,1,1);return o.dayOfWeek()===Sa.THURSDAY||o.dayOfWeek()===Sa.WEDNESDAY&&o.isLeapYear()?53:52},e._getWeek=function(t){var o=t.dayOfWeek().ordinal(),a=t.dayOfYear()-1,s=a+(3-o),l=Ye.intDiv(s,7),u=s-l*7,c=u-3;if(c<-3&&(c+=7),a<c)return e._getWeekRangeByLocalDate(t.withDayOfYear(180).minusYears(1)).maximum();var d=Ye.intDiv(a-c,7)+1;return d===53&&(c===-3||c===-2&&t.isLeapYear())===!1&&(d=1),d},e._getWeekBasedYear=function(t){var o=t.year(),a=t.dayOfYear();if(a<=3){var s=t.dayOfWeek().ordinal();a-s<-2&&o--}else if(a>=363){var l=t.dayOfWeek().ordinal();a=a-363-(t.isLeapYear()?1:0),a-l>=0&&o++}return o},i.displayName=function(){return this.toString()},i.resolve=function(){return null},i.name=function(){return this.toString()},e})(Rv),RXe=(function(r){nn(e,r);function e(){return r.apply(this,arguments)||this}var i=e.prototype;return i.toString=function(){return"DayOfQuarter"},i.baseUnit=function(){return dt.DAYS},i.rangeUnit=function(){return oM},i.range=function(){return en.of(1,90,92)},i.isSupportedBy=function(t){return t.isSupported(Oe.DAY_OF_YEAR)&&t.isSupported(Oe.MONTH_OF_YEAR)&&t.isSupported(Oe.YEAR)&&this._isIso(t)},i.rangeRefinedBy=function(t){if(t.isSupported(this)===!1)throw new kn("Unsupported field: DayOfQuarter");var o=t.getLong(Uw);if(o===1){var a=t.getLong(Oe.YEAR);return Mo.isLeapYear(a)?en.of(1,91):en.of(1,90)}else{if(o===2)return en.of(1,91);if(o===3||o===4)return en.of(1,92)}return this.range()},i.getFrom=function(t){if(t.isSupported(this)===!1)throw new kn("Unsupported field: DayOfQuarter");var o=t.get(Oe.DAY_OF_YEAR),a=t.get(Oe.MONTH_OF_YEAR),s=t.getLong(Oe.YEAR);return o-DXe[Ye.intDiv(a-1,3)+(Mo.isLeapYear(s)?4:0)]},i.adjustInto=function(t,o){var a=this.getFrom(t);return this.range().checkValidValue(o,this),t.with(Oe.DAY_OF_YEAR,t.getLong(Oe.DAY_OF_YEAR)+(o-a))},i.resolve=function(t,o,a){var s=t.get(Oe.YEAR),l=t.get(Uw);if(s==null||l==null)return null;var u=Oe.YEAR.checkValidIntValue(s),c=t.get(qY),d;if(a===Zi.LENIENT){var f=l;d=yi.of(u,1,1),d=d.plusMonths(Ye.safeMultiply(Ye.safeSubtract(f,1),3)),d=d.plusDays(Ye.safeSubtract(c,1))}else{var h=Uw.range().checkValidIntValue(l,Uw);if(a===Zi.STRICT){var p=92;h===1?p=Mo.isLeapYear(u)?91:90:h===2&&(p=91),en.of(1,p).checkValidValue(c,this)}else this.range().checkValidValue(c,this);d=yi.of(u,(h-1)*3+1,1).plusDays(c-1)}return t.remove(this),t.remove(Oe.YEAR),t.remove(Uw),d},e})(Mv),MXe=(function(r){nn(e,r);function e(){return r.apply(this,arguments)||this}var i=e.prototype;return i.toString=function(){return"QuarterOfYear"},i.baseUnit=function(){return oM},i.rangeUnit=function(){return dt.YEARS},i.range=function(){return en.of(1,4)},i.isSupportedBy=function(t){return t.isSupported(Oe.MONTH_OF_YEAR)&&this._isIso(t)},i.rangeRefinedBy=function(t){return this.range()},i.getFrom=function(t){if(t.isSupported(this)===!1)throw new kn("Unsupported field: QuarterOfYear");var o=t.getLong(Oe.MONTH_OF_YEAR);return Ye.intDiv(o+2,3)},i.adjustInto=function(t,o){var a=this.getFrom(t);return this.range().checkValidValue(o,this),t.with(Oe.MONTH_OF_YEAR,t.getLong(Oe.MONTH_OF_YEAR)+(o-a)*3)},e})(Mv),LXe=(function(r){nn(e,r);function e(){return r.apply(this,arguments)||this}var i=e.prototype;return i.toString=function(){return"WeekOfWeekBasedYear"},i.baseUnit=function(){return dt.WEEKS},i.rangeUnit=function(){return nM},i.range=function(){return en.of(1,52,53)},i.isSupportedBy=function(t){return t.isSupported(Oe.EPOCH_DAY)&&this._isIso(t)},i.rangeRefinedBy=function(t){if(t.isSupported(this)===!1)throw new kn("Unsupported field: WeekOfWeekBasedYear");return Mv._getWeekRangeByLocalDate(yi.from(t))},i.getFrom=function(t){if(t.isSupported(this)===!1)throw new kn("Unsupported field: WeekOfWeekBasedYear");return Mv._getWeek(yi.from(t))},i.adjustInto=function(t,o){return this.range().checkValidValue(o,this),t.plus(Ye.safeSubtract(o,this.getFrom(t)),dt.WEEKS)},i.resolve=function(t,o,a){var s=t.get(vg),l=t.get(Oe.DAY_OF_WEEK);if(s==null||l==null)return null;var u=vg.range().checkValidIntValue(s,vg),c=t.get(XY),d;if(a===Zi.LENIENT){var f=l,h=0;f>7?(h=Ye.intDiv(f-1,7),f=Ye.intMod(f-1,7)+1):f<1&&(h=Ye.intDiv(f,7)-1,f=Ye.intMod(f,7)+7),d=yi.of(u,1,4).plusWeeks(c-1).plusWeeks(h).with(Oe.DAY_OF_WEEK,f)}else{var p=Oe.DAY_OF_WEEK.checkValidIntValue(l);if(a===Zi.STRICT){var g=yi.of(u,1,4),v=Mv._getWeekRangeByLocalDate(g);v.checkValidValue(c,this)}else this.range().checkValidValue(c,this);d=yi.of(u,1,4).plusWeeks(c-1).with(Oe.DAY_OF_WEEK,p)}return t.remove(this),t.remove(vg),t.remove(Oe.DAY_OF_WEEK),d},i.displayName=function(){return"Week"},e})(Mv),kXe=(function(r){nn(e,r);function e(){return r.apply(this,arguments)||this}var i=e.prototype;return i.toString=function(){return"WeekBasedYear"},i.baseUnit=function(){return nM},i.rangeUnit=function(){return dt.FOREVER},i.range=function(){return Oe.YEAR.range()},i.isSupportedBy=function(t){return t.isSupported(Oe.EPOCH_DAY)&&this._isIso(t)},i.rangeRefinedBy=function(t){return Oe.YEAR.range()},i.getFrom=function(t){if(t.isSupported(this)===!1)throw new kn("Unsupported field: WeekBasedYear");return Mv._getWeekBasedYear(yi.from(t))},i.adjustInto=function(t,o){if(this.isSupportedBy(t)===!1)throw new kn("Unsupported field: WeekBasedYear");var a=this.range().checkValidIntValue(o,vg),s=yi.from(t),l=s.get(Oe.DAY_OF_WEEK),u=Mv._getWeek(s);u===53&&Mv._getWeekRangeByYear(a)===52&&(u=52);var c=yi.of(a,1,4),d=l-c.get(Oe.DAY_OF_WEEK)+(u-1)*7;return c=c.plusDays(d),t.with(c)},e})(Mv),Bde=(function(r){nn(e,r);function e(n,t){var o;return o=r.call(this)||this,o._name=n,o._duration=t,o}var i=e.prototype;return i.duration=function(){return this._duration},i.isDurationEstimated=function(){return!0},i.isDateBased=function(){return!0},i.isTimeBased=function(){return!1},i.isSupportedBy=function(t){return t.isSupported(Oe.EPOCH_DAY)},i.addTo=function(t,o){switch(this){case nM:{var a=Ye.safeAdd(t.get(vg),o);return t.with(vg,a)}case oM:return t.plus(Ye.intDiv(o,256),dt.YEARS).plus(Ye.intMod(o,256)*3,dt.MONTHS);default:throw new uF("Unreachable")}},i.between=function(t,o){switch(this){case nM:return Ye.safeSubtract(o.getLong(vg),t.getLong(vg));case oM:return Ye.intDiv(t.until(o,dt.MONTHS),3);default:throw new uF("Unreachable")}},i.toString=function(){return this._name},e})(J0),qY=null,Uw=null,XY=null,vg=null,nM=null,oM=null;function IXe(){qY=new RXe,Uw=new MXe,XY=new LXe,vg=new kXe,nM=new Bde("WeekBasedYears",As.ofSeconds(31556952)),oM=new Bde("QuarterYears",As.ofSeconds(31556952/4)),og.DAY_OF_QUARTER=qY,og.QUARTER_OF_YEAR=Uw,og.WEEK_OF_WEEK_BASED_YEAR=XY,og.WEEK_BASED_YEAR=vg,og.WEEK_BASED_YEARS=nM,og.QUARTER_YEARS=oM,yi.prototype.isoWeekOfWeekyear=function(){return this.get(og.WEEK_OF_WEEK_BASED_YEAR)},yi.prototype.isoWeekyear=function(){return this.get(og.WEEK_BASED_YEAR)}}/**
 * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
 * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
 * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
 */var v3=(function(){function r(i,n,t,o){this._zeroDigit=i,this._zeroDigitCharCode=i.charCodeAt(0),this._positiveSign=n,this._negativeSign=t,this._decimalSeparator=o}var e=r.prototype;return e.positiveSign=function(){return this._positiveSign},e.withPositiveSign=function(n){return n===this._positiveSign?this:new r(this._zeroDigit,n,this._negativeSign,this._decimalSeparator)},e.negativeSign=function(){return this._negativeSign},e.withNegativeSign=function(n){return n===this._negativeSign?this:new r(this._zeroDigit,this._positiveSign,n,this._decimalSeparator)},e.zeroDigit=function(){return this._zeroDigit},e.withZeroDigit=function(n){return n===this._zeroDigit?this:new r(n,this._positiveSign,this._negativeSign,this._decimalSeparator)},e.decimalSeparator=function(){return this._decimalSeparator},e.withDecimalSeparator=function(n){return n===this._decimalSeparator?this:new r(this._zeroDigit,this._positiveSign,this._negativeSign,n)},e.convertToDigit=function(n){var t=n.charCodeAt(0)-this._zeroDigitCharCode;return t>=0&&t<=9?t:-1},e.convertNumberToI18N=function(n){if(this._zeroDigit==="0")return n;for(var t=this._zeroDigitCharCode-48,o="",a=0;a<n.length;a++)o+=String.fromCharCode(n.charCodeAt(a)+t);return o},e.equals=function(n){return this===n?!0:n instanceof r?this._zeroDigit===n._zeroDigit&&this._positiveSign===n._positiveSign&&this._negativeSign===n._negativeSign&&this._decimalSeparator===n._decimalSeparator:!1},e.hashCode=function(){return this._zeroDigit+this._positiveSign+this._negativeSign+this._decimalSeparator},e.toString=function(){return"DecimalStyle["+this._zeroDigit+this._positiveSign+this._negativeSign+this._decimalSeparator+"]"},r.of=function(){throw new Error("not yet supported")},r.availableLocales=function(){throw new Error("not yet supported")},r})();v3.STANDARD=new v3("0","+","-",".");var co=(function(r){nn(e,r);function e(){return r.apply(this,arguments)||this}var i=e.prototype;return i.parse=function(t,o,a){switch(this){case e.NORMAL:return!t||!o;case e.ALWAYS:case e.EXCEEDS_PAD:return!0;default:return!o&&!a}},e})(WM);co.NORMAL=new co("NORMAL");co.NEVER=new co("NEVER");co.ALWAYS=new co("ALWAYS");co.EXCEEDS_PAD=new co("EXCEEDS_PAD");co.NOT_NEGATIVE=new co("NOT_NEGATIVE");var yo=(function(r){nn(e,r);function e(){return r.apply(this,arguments)||this}var i=e.prototype;return i.isStandalone=function(){switch(this){case e.FULL_STANDALONE:case e.SHORT_STANDALONE:case e.NARROW_STANDALONE:return!0;default:return!1}},i.asStandalone=function(){switch(this){case e.FULL:return e.FULL_STANDALONE;case e.SHORT:return e.SHORT_STANDALONE;case e.NARROW:return e.NARROW_STANDALONE;default:return this}},i.asNormal=function(){switch(this){case e.FULL_STANDALONE:return e.FULL;case e.SHORT_STANDALONE:return e.SHORT;case e.NARROW_STANDALONE:return e.NARROW;default:return this}},e})(WM);yo.FULL=new yo("FULL");yo.FULL_STANDALONE=new yo("FULL_STANDALONE");yo.SHORT=new yo("SHORT");yo.SHORT_STANDALONE=new yo("SHORT_STANDALONE");yo.NARROW=new yo("NARROW");yo.NARROW_STANDALONE=new yo("NARROW_STANDALONE");/**
 * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
 * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
 * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
 */var $xe=(function(){function r(i){if(i.length>1)throw new vi('invalid literal, too long: "'+i+'"');this._literal=i}var e=r.prototype;return e.print=function(n,t){return t.append(this._literal),!0},e.parse=function(n,t,o){var a=t.length;if(o===a)return~o;var s=t.charAt(o);return n.charEquals(this._literal,s)===!1?~o:o+this._literal.length},e.toString=function(){return this._literal==="'"?"''":"'"+this._literal+"'"},r})();/**
 * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
 * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
 * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
 */var KY=(function(){function r(i,n){this._printerParsers=i,this._optional=n}var e=r.prototype;return e.withOptional=function(n){return n===this._optional?this:new r(this._printerParsers,n)},e.print=function(n,t){var o=t.length();this._optional&&n.startOptional();try{for(var a=0;a<this._printerParsers.length;a++){var s=this._printerParsers[a];if(s.print(n,t)===!1)return t.setLength(o),!0}}finally{this._optional&&n.endOptional()}return!0},e.parse=function(n,t,o){if(this._optional){n.startOptional();for(var a=o,s=0;s<this._printerParsers.length;s++){var l=this._printerParsers[s];if(a=l.parse(n,t,a),a<0)return n.endOptional(!1),o}return n.endOptional(!0),a}else{for(var u=0;u<this._printerParsers.length;u++){var c=this._printerParsers[u];if(o=c.parse(n,t,o),o<0)break}return o}},e.toString=function(){var n="";if(this._printerParsers!=null){n+=this._optional?"[":"(";for(var t=0;t<this._printerParsers.length;t++){var o=this._printerParsers[t];n+=o.toString()}n+=this._optional?"]":")"}return n},r})();/**
 * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
 * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
 * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
 */var qxe=(function(){function r(i,n,t,o){if(gt(i,"field"),i.range().isFixed()===!1)throw new vi("Field must have a fixed set of values: "+i);if(n<0||n>9)throw new vi("Minimum width must be from 0 to 9 inclusive but was "+n);if(t<1||t>9)throw new vi("Maximum width must be from 1 to 9 inclusive but was "+t);if(t<n)throw new vi("Maximum width must exceed or equal the minimum width but "+t+" < "+n);this.field=i,this.minWidth=n,this.maxWidth=t,this.decimalPoint=o}var e=r.prototype;return e.print=function(n,t){var o=n.getValue(this.field);if(o===null)return!1;var a=n.symbols();if(o===0){if(this.minWidth>0){this.decimalPoint&&t.append(a.decimalSeparator());for(var s=0;s<this.minWidth;s++)t.append(a.zeroDigit())}}else{var l=this.convertToFraction(o,a.zeroDigit()),u=Math.min(Math.max(l.length,this.minWidth),this.maxWidth);if(l=l.substr(0,u),l*1>0)for(;l.length>this.minWidth&&l[l.length-1]==="0";)l=l.substr(0,l.length-1);var c=l;c=a.convertNumberToI18N(c),this.decimalPoint&&t.append(a.decimalSeparator()),t.append(c)}return!0},e.parse=function(n,t,o){var a=n.isStrict()?this.minWidth:0,s=n.isStrict()?this.maxWidth:9,l=t.length;if(o===l)return a>0?~o:o;if(this.decimalPoint){if(t[o]!==n.symbols().decimalSeparator())return a>0?~o:o;o++}var u=o+a;if(u>l)return~o;for(var c=Math.min(o+s,l),d=0,f=o;f<c;){var h=t.charAt(f++),p=n.symbols().convertToDigit(h);if(p<0){if(f<u)return~o;f--;break}d=d*10+p}var g=f-o,v=Math.pow(10,g),y=this.convertFromFraction(d,v);return n.setParsedField(this.field,y,o,f)},e.convertToFraction=function(n,t){var o=this.field.range();o.checkValidValue(n,this.field);for(var a=o.minimum(),s=o.maximum()-a+1,l=n-a,u=Ye.intDiv(l*1e9,s),c=""+u;c.length<9;)c=t+c;return c},e.convertFromFraction=function(n,t){var o=this.field.range(),a=o.minimum(),s=o.maximum()-a+1,l=Ye.intDiv(n*s,t);return l},e.toString=function(){var n=this.decimalPoint?",DecimalPoint":"";return"Fraction("+this.field+","+this.minWidth+","+this.maxWidth+n+")"},r})(),cG=15,iR=[0,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9],sR=(function(){function r(i,n,t,o,a){a===void 0&&(a=0),this._field=i,this._minWidth=n,this._maxWidth=t,this._signStyle=o,this._subsequentWidth=a}var e=r.prototype;return e.field=function(){return this._field},e.minWidth=function(){return this._minWidth},e.maxWidth=function(){return this._maxWidth},e.signStyle=function(){return this._signStyle},e.withFixedWidth=function(){return this._subsequentWidth===-1?this:new r(this._field,this._minWidth,this._maxWidth,this._signStyle,-1)},e.withSubsequentWidth=function(n){return new r(this._field,this._minWidth,this._maxWidth,this._signStyle,this._subsequentWidth+n)},e._isFixedWidth=function(){return this._subsequentWidth===-1||this._subsequentWidth>0&&this._minWidth===this._maxWidth&&this._signStyle===co.NOT_NEGATIVE},e.print=function(n,t){var o=n.getValue(this._field);if(o==null)return!1;var a=this._getValue(n,o),s=n.symbols(),l=""+Math.abs(a);if(l.length>this._maxWidth)throw new ei("Field "+this._field+" cannot be printed as the value "+a+" exceeds the maximum print width of "+this._maxWidth);if(l=s.convertNumberToI18N(l),a>=0)switch(this._signStyle){case co.EXCEEDS_PAD:this._minWidth<cG&&a>=iR[this._minWidth]&&t.append(s.positiveSign());break;case co.ALWAYS:t.append(s.positiveSign());break}else switch(this._signStyle){case co.NORMAL:case co.EXCEEDS_PAD:case co.ALWAYS:t.append(s.negativeSign());break;case co.NOT_NEGATIVE:throw new ei("Field "+this._field+" cannot be printed as the value "+a+" cannot be negative according to the SignStyle")}for(var u=0;u<this._minWidth-l.length;u++)t.append(s.zeroDigit());return t.append(l),!0},e.parse=function(n,t,o){var a=t.length;if(o===a)return~o;Go(o>=0&&o<a);var s=t.charAt(o),l=!1,u=!1;if(s===n.symbols().positiveSign()){if(this._signStyle.parse(!0,n.isStrict(),this._minWidth===this._maxWidth)===!1)return~o;u=!0,o++}else if(s===n.symbols().negativeSign()){if(this._signStyle.parse(!1,n.isStrict(),this._minWidth===this._maxWidth)===!1)return~o;l=!0,o++}else if(this._signStyle===co.ALWAYS&&n.isStrict())return~o;var c=n.isStrict()||this._isFixedWidth()?this._minWidth:1,d=o+c;if(d>a)return~o;for(var f=(n.isStrict()||this._isFixedWidth()?this._maxWidth:9)+Math.max(this._subsequentWidth,0),h=0,p=o,g=0;g<2;g++){for(var v=Math.min(p+f,a);p<v;){var y=t.charAt(p++),m=n.symbols().convertToDigit(y);if(m<0){if(p--,p<d)return~o;break}if(p-o>cG)throw new lg("number text exceeds length");h=h*10+m}if(this._subsequentWidth>0&&g===0){var b=p-o;f=Math.max(c,b-this._subsequentWidth),p=o,h=0}else break}if(l){if(h===0&&n.isStrict())return~(o-1);h!==0&&(h=-h)}else if(this._signStyle===co.EXCEEDS_PAD&&n.isStrict()){var S=p-o;if(u){if(S<=this._minWidth)return~(o-1)}else if(S>this._minWidth)return~o}return this._setValue(n,h,o,p)},e._getValue=function(n,t){return t},e._setValue=function(n,t,o,a){return n.setParsedField(this._field,t,o,a)},e.toString=function(){return this._minWidth===1&&this._maxWidth===cG&&this._signStyle===co.NORMAL?"Value("+this._field+")":this._minWidth===this._maxWidth&&this._signStyle===co.NOT_NEGATIVE?"Value("+this._field+","+this._minWidth+")":"Value("+this._field+","+this._minWidth+","+this._maxWidth+","+this._signStyle+")"},r})(),EN=(function(r){nn(e,r);function e(n,t,o,a,s){var l;if(l=r.call(this,n,t,o,co.NOT_NEGATIVE)||this,t<1||t>10)throw new vi("The width must be from 1 to 10 inclusive but was "+t);if(o<1||o>10)throw new vi("The maxWidth must be from 1 to 10 inclusive but was "+o);if(o<t)throw new vi("The maxWidth must be greater than the width");if(s===null){if(n.range().isValidValue(a)===!1)throw new vi("The base value must be within the range of the field");if(a+iR[t]>Ye.MAX_SAFE_INTEGER)throw new ei("Unable to add printer-parser as the range exceeds the capacity of an int")}return l._baseValue=a,l._baseDate=s,l}var i=e.prototype;return i._getValue=function(t,o){var a=Math.abs(o),s=this._baseValue;if(this._baseDate!==null){t.temporal();var l=Mo.INSTANCE;s=l.date(this._baseDate).get(this._field)}return o>=s&&o<s+iR[this._minWidth]?a%iR[this._minWidth]:a%iR[this._maxWidth]},i._setValue=function(t,o,a,s){var l=this._baseValue;if(this._baseDate!=null){var u=t.getEffectiveChronology();l=u.date(this._baseDate).get(this._field)}var c=s-a;if(c===this._minWidth&&o>=0){var d=iR[this._minWidth],f=l%d,h=l-f;l>0?o=h+o:o=h-o,o<l&&(o+=d)}return t.setParsedField(this._field,o,a,s)},i.withFixedWidth=function(){return this._subsequentWidth===-1?this:new e(this._field,this._minWidth,this._maxWidth,this._baseValue,this._baseDate)},i.withSubsequentWidth=function(t){return new e(this._field,this._minWidth,this._maxWidth,this._baseValue,this._baseDate,this._subsequentWidth+t)},i.isFixedWidth=function(t){return t.isStrict()===!1?!1:r.prototype.isFixedWidth.call(this,t)},i.toString=function(){return"ReducedValue("+this._field+","+this._minWidth+","+this._maxWidth+","+(this._baseDate!=null?this._baseDate:this._baseValue)+")"},e})(sR);/**
 * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
 * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
 * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
 */var yV=["+HH","+HHmm","+HH:mm","+HHMM","+HH:MM","+HHMMss","+HH:MM:ss","+HHMMSS","+HH:MM:SS"],Lv=(function(){function r(i,n){gt(i,"noOffsetText"),gt(n,"pattern"),this.noOffsetText=i,this.type=this._checkPattern(n)}var e=r.prototype;return e._checkPattern=function(n){for(var t=0;t<yV.length;t++)if(yV[t]===n)return t;throw new vi("Invalid zone offset pattern: "+n)},e.print=function(n,t){var o=n.getValue(Oe.OFFSET_SECONDS);if(o==null)return!1;var a=Ye.safeToInt(o);if(a===0)t.append(this.noOffsetText);else{var s=Math.abs(Ye.intMod(Ye.intDiv(a,3600),100)),l=Math.abs(Ye.intMod(Ye.intDiv(a,60),60)),u=Math.abs(Ye.intMod(a,60)),c=t.length(),d=s;t.append(a<0?"-":"+").appendChar(Ye.intDiv(s,10)+"0").appendChar(Ye.intMod(s,10)+"0"),(this.type>=3||this.type>=1&&l>0)&&(t.append(this.type%2===0?":":"").appendChar(Ye.intDiv(l,10)+"0").appendChar(l%10+"0"),d+=l,(this.type>=7||this.type>=5&&u>0)&&(t.append(this.type%2===0?":":"").appendChar(Ye.intDiv(u,10)+"0").appendChar(u%10+"0"),d+=u)),d===0&&(t.setLength(c),t.append(this.noOffsetText))}return!0},e.parse=function(n,t,o){var a=t.length,s=this.noOffsetText.length;if(s===0){if(o===a)return n.setParsedField(Oe.OFFSET_SECONDS,0,o,o)}else{if(o===a)return~o;if(n.subSequenceEquals(t,o,this.noOffsetText,0,s))return n.setParsedField(Oe.OFFSET_SECONDS,0,o,o+s)}var l=t[o];if(l==="+"||l==="-"){var u=l==="-"?-1:1,c=[0,0,0,0];if(c[0]=o+1,(this._parseNumber(c,1,t,!0)||this._parseNumber(c,2,t,this.type>=3)||this._parseNumber(c,3,t,!1))===!1){var d=Ye.safeZero(u*(c[1]*3600+c[2]*60+c[3]));return n.setParsedField(Oe.OFFSET_SECONDS,d,o,c[0])}}return s===0?n.setParsedField(Oe.OFFSET_SECONDS,0,o,o+s):~o},e._parseNumber=function(n,t,o,a){if((this.type+3)/2<t)return!1;var s=n[0];if(this.type%2===0&&t>1){if(s+1>o.length||o[s]!==":")return a;s++}if(s+2>o.length)return a;var l=o[s++],u=o[s++];if(l<"0"||l>"9"||u<"0"||u>"9")return a;var c=(l.charCodeAt(0)-48)*10+(u.charCodeAt(0)-48);return c<0||c>59?a:(n[t]=c,n[0]=s,!1)},e.toString=function(){var n=this.noOffsetText.replace("'","''");return"Offset("+yV[this.type]+",'"+n+"')"},r})();Lv.INSTANCE_ID=new Lv("Z","+HH:MM:ss");Lv.PATTERNS=yV;/**
 * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
 * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
 * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
 */var ZY=(function(){function r(i,n,t){this._printerParser=i,this._padWidth=n,this._padChar=t}var e=r.prototype;return e.print=function(n,t){var o=t.length();if(this._printerParser.print(n,t)===!1)return!1;var a=t.length()-o;if(a>this._padWidth)throw new ei("Cannot print as output of "+a+" characters exceeds pad width of "+this._padWidth);for(var s=0;s<this._padWidth-a;s++)t.insert(o,this._padChar);return!0},e.parse=function(n,t,o){var a=n.isStrict(),s=n.isCaseSensitive();if(Go(!(o>t.length)),Go(o>=0),o===t.length)return~o;var l=o+this._padWidth;if(l>t.length){if(a)return~o;l=t.length}for(var u=o;u<l&&(s?t[u]===this._padChar:n.charEquals(t[u],this._padChar));)u++;t=t.substring(0,l);var c=this._printerParser.parse(n,t,u);return c!==l&&a?~(o+u):c},e.toString=function(){return"Pad("+this._printerParser+","+this._padWidth+(this._padChar===" "?")":",'"+this._padChar+"')")},r})(),Th=(function(r){nn(e,r);function e(){return r.apply(this,arguments)||this}var i=e.prototype;return i.print=function(){return!0},i.parse=function(t,o,a){switch(this){case e.SENSITIVE:t.setCaseSensitive(!0);break;case e.INSENSITIVE:t.setCaseSensitive(!1);break;case e.STRICT:t.setStrict(!0);break;case e.LENIENT:t.setStrict(!1);break}return a},i.toString=function(){switch(this){case e.SENSITIVE:return"ParseCaseSensitive(true)";case e.INSENSITIVE:return"ParseCaseSensitive(false)";case e.STRICT:return"ParseStrict(true)";case e.LENIENT:return"ParseStrict(false)"}},e})(WM);Th.SENSITIVE=new Th("SENSITIVE");Th.INSENSITIVE=new Th("INSENSITIVE");Th.STRICT=new Th("STRICT");Th.LENIENT=new Th("LENIENT");/**
 * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
 * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
 * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
 */var JY=(function(){function r(i){this._literal=i}var e=r.prototype;return e.print=function(n,t){return t.append(this._literal),!0},e.parse=function(n,t,o){var a=t.length;return Go(!(o>a||o<0)),n.subSequenceEquals(t,o,this._literal,0,this._literal.length)===!1?~o:o+this._literal.length},e.toString=function(){var n=this._literal.replace("'","''");return"'"+n+"'"},r})();/*
 * @copyright (c) 2016, Philipp Thürwächter, Pattrick Hüper
 * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
 * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
 */var $U=(function(){function r(){}return r.getRules=function(i){throw new ei("unsupported ZoneId:"+i)},r.getAvailableZoneIds=function(){return[]},r})(),vv=(function(r){nn(e,r),e.ofId=function(t){var o=$U.getRules(t);return new e(t,o)};function e(n,t){var o;return o=r.call(this)||this,o._id=n,o._rules=t,o}var i=e.prototype;return i.id=function(){return this._id},i.rules=function(){return this._rules},e})(Lo);/**
 * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
 * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
 * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
 */var Xxe=(function(){function r(i,n){this.query=i,this.description=n}var e=r.prototype;return e.print=function(n,t){var o=n.getValueQuery(this.query);return o==null?!1:(t.append(o.id()),!0)},e.parse=function(n,t,o){var a=t.length;if(o>a||o===a)return~o;var s=t.charAt(o);if(s==="+"||s==="-"){var l=n.copy(),u=Lv.INSTANCE_ID.parse(l,t,o);if(u<0)return u;var c=l.getParsed(Oe.OFFSET_SECONDS),d=Gi.ofTotalSeconds(c);return n.setParsedZone(d),u}else if(a>=o+2){var f=t.charAt(o+1);if(n.charEquals(s,"U")&&n.charEquals(f,"T"))return a>=o+3&&n.charEquals(t.charAt(o+2),"C")?this._parsePrefixedOffset(n,t,o,o+3):this._parsePrefixedOffset(n,t,o,o+2);if(n.charEquals(s,"G")&&a>=o+3&&n.charEquals(f,"M")&&n.charEquals(t.charAt(o+2),"T"))return this._parsePrefixedOffset(n,t,o,o+3)}if(t.substr(o,6)==="SYSTEM")return n.setParsedZone(Lo.systemDefault()),o+6;if(n.charEquals(s,"Z"))return n.setParsedZone(Gi.UTC),o+1;var h=$U.getAvailableZoneIds();dG.size!==h.length&&(dG=Kxe.createTreeMap(h));for(var p=a-o,g=dG.treeMap,v=null,y=0;g!=null;){var m=t.substr(o,Math.min(g.length,p));g=g.get(m),g!=null&&g.isLeaf&&(v=m,y=g.length)}return v!=null?(n.setParsedZone(vv.ofId(v)),o+y):~o},e._parsePrefixedOffset=function(n,t,o,a){var s=t.substring(o,a).toUpperCase(),l=n.copy();if(a<t.length&&n.charEquals(t.charAt(a),"Z"))return n.setParsedZone(Lo.ofOffset(s,Gi.UTC)),a;var u=Lv.INSTANCE_ID.parse(l,t,a);if(u<0)return n.setParsedZone(Lo.ofOffset(s,Gi.UTC)),a;var c=l.getParsed(Oe.OFFSET_SECONDS),d=Gi.ofTotalSeconds(c);return n.setParsedZone(Lo.ofOffset(s,d)),u},e.toString=function(){return this.description},r})(),Kxe=(function(){r.createTreeMap=function(i){for(var n=i.sort(function(a,s){return a.length-s.length}),t=new NXe(n[0].length,!1),o=0;o<n.length;o++)t.add(n[o]);return new r(n.length,t)};function r(e,i){this.size=e,this.treeMap=i}return r})(),NXe=(function(){function r(i,n){i===void 0&&(i=0),n===void 0&&(n=!1),this.length=i,this.isLeaf=n,this._treeMap={}}var e=r.prototype;return e.add=function(n){var t=n.length;if(t===this.length)this._treeMap[n]=new r(t,!0);else if(t>this.length){var o=n.substr(0,this.length),a=this._treeMap[o];a==null&&(a=new r(t,!1),this._treeMap[o]=a),a.add(n)}},e.get=function(n){return this._treeMap[n]},r})(),dG=new Kxe([]);/**
 * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
 * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
 * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
 */var v0=15,Wo=(function(){function r(){this._active=this,this._parent=null,this._printerParsers=[],this._optional=!1,this._padNextWidth=0,this._padNextChar=null,this._valueParserIndex=-1}r._of=function(n,t){gt(n,"parent"),gt(t,"optional");var o=new r;return o._parent=n,o._optional=t,o};var e=r.prototype;return e.parseCaseSensitive=function(){return this._appendInternalPrinterParser(Th.SENSITIVE),this},e.parseCaseInsensitive=function(){return this._appendInternalPrinterParser(Th.INSENSITIVE),this},e.parseStrict=function(){return this._appendInternalPrinterParser(Th.STRICT),this},e.parseLenient=function(){return this._appendInternalPrinterParser(Th.LENIENT),this},e.parseDefaulting=function(n,t){return gt(n),this._appendInternal(new jXe(n,t)),this},e.appendValue=function(){return arguments.length===1?this._appendValue1.apply(this,arguments):arguments.length===2?this._appendValue2.apply(this,arguments):this._appendValue4.apply(this,arguments)},e._appendValue1=function(n){return gt(n),this._appendValuePrinterParser(new sR(n,1,v0,co.NORMAL)),this},e._appendValue2=function(n,t){if(gt(n),t<1||t>v0)throw new vi("The width must be from 1 to "+v0+" inclusive but was "+t);var o=new sR(n,t,t,co.NOT_NEGATIVE);return this._appendValuePrinterParser(o),this},e._appendValue4=function(n,t,o,a){if(gt(n),gt(a),t===o&&a===co.NOT_NEGATIVE)return this._appendValue2(n,o);if(t<1||t>v0)throw new vi("The minimum width must be from 1 to "+v0+" inclusive but was "+t);if(o<1||o>v0)throw new vi("The minimum width must be from 1 to "+v0+" inclusive but was "+o);if(o<t)throw new vi("The maximum width must exceed or equal the minimum width but "+o+" < "+t);var s=new sR(n,t,o,a);return this._appendValuePrinterParser(s),this},e.appendValueReduced=function(){return arguments.length===4&&arguments[3]instanceof dF?this._appendValueReducedFieldWidthMaxWidthBaseDate.apply(this,arguments):this._appendValueReducedFieldWidthMaxWidthBaseValue.apply(this,arguments)},e._appendValueReducedFieldWidthMaxWidthBaseValue=function(n,t,o,a){gt(n,"field");var s=new EN(n,t,o,a,null);return this._appendValuePrinterParser(s),this},e._appendValueReducedFieldWidthMaxWidthBaseDate=function(n,t,o,a){gt(n,"field"),gt(a,"baseDate"),gi(a,dF,"baseDate");var s=new EN(n,t,o,0,a);return this._appendValuePrinterParser(s),this},e._appendValuePrinterParser=function(n){if(Go(n!=null),this._active._valueParserIndex>=0&&this._active._printerParsers[this._active._valueParserIndex]instanceof sR){var t=this._active._valueParserIndex,o=this._active._printerParsers[t];n.minWidth()===n.maxWidth()&&n.signStyle()===co.NOT_NEGATIVE?(o=o.withSubsequentWidth(n.maxWidth()),this._appendInternal(n.withFixedWidth()),this._active._valueParserIndex=t):(o=o.withFixedWidth(),this._active._valueParserIndex=this._appendInternal(n)),this._active._printerParsers[t]=o}else this._active._valueParserIndex=this._appendInternal(n);return this},e.appendFraction=function(n,t,o,a){return this._appendInternal(new qxe(n,t,o,a)),this},e.appendInstant=function(n){if(n===void 0&&(n=-2),n<-2||n>9)throw new vi("Invalid fractional digits: "+n);return this._appendInternal(new FXe(n)),this},e.appendOffsetId=function(){return this._appendInternal(Lv.INSTANCE_ID),this},e.appendOffset=function(n,t){return this._appendInternalPrinterParser(new Lv(t,n)),this},e.appendZoneId=function(){return this._appendInternal(new Xxe(xr.zoneId(),"ZoneId()")),this},e.appendPattern=function(n){return gt(n,"pattern"),this._parsePattern(n),this},e.appendZoneText=function(){throw new vi("Pattern using (localized) text not implemented, use @js-joda/locale plugin!")},e.appendText=function(){throw new vi("Pattern using (localized) text not implemented, use @js-joda/locale plugin!")},e.appendLocalizedOffset=function(){throw new vi("Pattern using (localized) text not implemented, use @js-joda/locale plugin!")},e.appendWeekField=function(){throw new vi("Pattern using (localized) text not implemented, use @js-joda/locale plugin!")},e._parsePattern=function(n){for(var t={G:Oe.ERA,y:Oe.YEAR_OF_ERA,u:Oe.YEAR,Q:og.QUARTER_OF_YEAR,q:og.QUARTER_OF_YEAR,M:Oe.MONTH_OF_YEAR,L:Oe.MONTH_OF_YEAR,D:Oe.DAY_OF_YEAR,d:Oe.DAY_OF_MONTH,F:Oe.ALIGNED_DAY_OF_WEEK_IN_MONTH,E:Oe.DAY_OF_WEEK,c:Oe.DAY_OF_WEEK,e:Oe.DAY_OF_WEEK,a:Oe.AMPM_OF_DAY,H:Oe.HOUR_OF_DAY,k:Oe.CLOCK_HOUR_OF_DAY,K:Oe.HOUR_OF_AMPM,h:Oe.CLOCK_HOUR_OF_AMPM,m:Oe.MINUTE_OF_HOUR,s:Oe.SECOND_OF_MINUTE,S:Oe.NANO_OF_SECOND,A:Oe.MILLI_OF_DAY,n:Oe.NANO_OF_SECOND,N:Oe.NANO_OF_DAY},o=0;o<n.length;o++){var a=n.charAt(o);if(a>="A"&&a<="Z"||a>="a"&&a<="z"){for(var s=o++;o<n.length&&n.charAt(o)===a;o++);var l=o-s;if(a==="p"){var u=0;if(o<n.length&&(a=n.charAt(o),a>="A"&&a<="Z"||a>="a"&&a<="z")){for(u=l,s=o++;o<n.length&&n.charAt(o)===a;o++);l=o-s}if(u===0)throw new vi("Pad letter 'p' must be followed by valid pad pattern: "+n);this.padNext(u)}var c=t[a];if(c!=null)this._parseField(a,l,c);else if(a==="z"){if(l>4)throw new vi("Too many pattern letters: "+a);l===4?this.appendZoneText(yo.FULL):this.appendZoneText(yo.SHORT)}else if(a==="V"){if(l!==2)throw new vi("Pattern letter count must be 2: "+a);this.appendZoneId()}else if(a==="Z")if(l<4)this.appendOffset("+HHMM","+0000");else if(l===4)this.appendLocalizedOffset(yo.FULL);else if(l===5)this.appendOffset("+HH:MM:ss","Z");else throw new vi("Too many pattern letters: "+a);else if(a==="O")if(l===1)this.appendLocalizedOffset(yo.SHORT);else if(l===4)this.appendLocalizedOffset(yo.FULL);else throw new vi("Pattern letter count must be 1 or 4: "+a);else if(a==="X"){if(l>5)throw new vi("Too many pattern letters: "+a);this.appendOffset(Lv.PATTERNS[l+(l===1?0:1)],"Z")}else if(a==="x"){if(l>5)throw new vi("Too many pattern letters: "+a);var d=l===1?"+00":l%2===0?"+0000":"+00:00";this.appendOffset(Lv.PATTERNS[l+(l===1?0:1)],d)}else if(a==="W"){if(l>1)throw new vi("Too many pattern letters: "+a);this.appendWeekField("W",l)}else if(a==="w"){if(l>2)throw new vi("Too many pattern letters: "+a);this.appendWeekField("w",l)}else if(a==="Y")this.appendWeekField("Y",l);else throw new vi("Unknown pattern letter: "+a);o--}else if(a==="'"){for(var f=o++;o<n.length;o++)if(n.charAt(o)==="'")if(o+1<n.length&&n.charAt(o+1)==="'")o++;else break;if(o>=n.length)throw new vi("Pattern ends with an incomplete string literal: "+n);var h=n.substring(f+1,o);h.length===0?this.appendLiteral("'"):this.appendLiteral(h.replace("''","'"))}else if(a==="[")this.optionalStart();else if(a==="]"){if(this._active._parent===null)throw new vi("Pattern invalid as it contains ] without previous [");this.optionalEnd()}else{if(a==="{"||a==="}"||a==="#")throw new vi("Pattern includes reserved character: '"+a+"'");this.appendLiteral(a)}}},e._parseField=function(n,t,o){switch(n){case"u":case"y":t===2?this.appendValueReduced(o,2,2,EN.BASE_DATE):t<4?this.appendValue(o,t,v0,co.NORMAL):this.appendValue(o,t,v0,co.EXCEEDS_PAD);break;case"M":case"Q":switch(t){case 1:this.appendValue(o);break;case 2:this.appendValue(o,2);break;case 3:this.appendText(o,yo.SHORT);break;case 4:this.appendText(o,yo.FULL);break;case 5:this.appendText(o,yo.NARROW);break;default:throw new vi("Too many pattern letters: "+n)}break;case"L":case"q":switch(t){case 1:this.appendValue(o);break;case 2:this.appendValue(o,2);break;case 3:this.appendText(o,yo.SHORT_STANDALONE);break;case 4:this.appendText(o,yo.FULL_STANDALONE);break;case 5:this.appendText(o,yo.NARROW_STANDALONE);break;default:throw new vi("Too many pattern letters: "+n)}break;case"e":switch(t){case 1:case 2:this.appendWeekField("e",t);break;case 3:this.appendText(o,yo.SHORT);break;case 4:this.appendText(o,yo.FULL);break;case 5:this.appendText(o,yo.NARROW);break;default:throw new vi("Too many pattern letters: "+n)}break;case"c":switch(t){case 1:this.appendWeekField("c",t);break;case 2:throw new vi("Invalid number of pattern letters: "+n);case 3:this.appendText(o,yo.SHORT_STANDALONE);break;case 4:this.appendText(o,yo.FULL_STANDALONE);break;case 5:this.appendText(o,yo.NARROW_STANDALONE);break;default:throw new vi("Too many pattern letters: "+n)}break;case"a":if(t===1)this.appendText(o,yo.SHORT);else throw new vi("Too many pattern letters: "+n);break;case"E":case"G":switch(t){case 1:case 2:case 3:this.appendText(o,yo.SHORT);break;case 4:this.appendText(o,yo.FULL);break;case 5:this.appendText(o,yo.NARROW);break;default:throw new vi("Too many pattern letters: "+n)}break;case"S":this.appendFraction(Oe.NANO_OF_SECOND,t,t,!1);break;case"F":if(t===1)this.appendValue(o);else throw new vi("Too many pattern letters: "+n);break;case"d":case"h":case"H":case"k":case"K":case"m":case"s":if(t===1)this.appendValue(o);else if(t===2)this.appendValue(o,t);else throw new vi("Too many pattern letters: "+n);break;case"D":if(t===1)this.appendValue(o);else if(t<=3)this.appendValue(o,t);else throw new vi("Too many pattern letters: "+n);break;default:t===1?this.appendValue(o):this.appendValue(o,t);break}},e.padNext=function(){return arguments.length===1?this._padNext1.apply(this,arguments):this._padNext2.apply(this,arguments)},e._padNext1=function(n){return this._padNext2(n," ")},e._padNext2=function(n,t){if(n<1)throw new vi("The pad width must be at least one but was "+n);return this._active._padNextWidth=n,this._active._padNextChar=t,this._active._valueParserIndex=-1,this},e.optionalStart=function(){return this._active._valueParserIndex=-1,this._active=r._of(this._active,!0),this},e.optionalEnd=function(){if(this._active._parent==null)throw new uF("Cannot call optionalEnd() as there was no previous call to optionalStart()");if(this._active._printerParsers.length>0){var n=new KY(this._active._printerParsers,this._active._optional);this._active=this._active._parent,this._appendInternal(n)}else this._active=this._active._parent;return this},e._appendInternal=function(n){return Go(n!=null),this._active._padNextWidth>0&&(n!=null&&(n=new ZY(n,this._active._padNextWidth,this._active._padNextChar)),this._active._padNextWidth=0,this._active._padNextChar=0),this._active._printerParsers.push(n),this._active._valueParserIndex=-1,this._active._printerParsers.length-1},e.appendLiteral=function(n){return Go(n!=null),n.length>0&&(n.length===1?this._appendInternalPrinterParser(new $xe(n.charAt(0))):this._appendInternalPrinterParser(new JY(n))),this},e._appendInternalPrinterParser=function(n){return Go(n!=null),this._active._padNextWidth>0&&(n!=null&&(n=new ZY(n,this._active._padNextWidth,this._active._padNextChar)),this._active._padNextWidth=0,this._active._padNextChar=0),this._active._printerParsers.push(n),this._active._valueParserIndex=-1,this._active._printerParsers.length-1},e.append=function(n){return gt(n,"formatter"),this._appendInternal(n._toPrinterParser(!1)),this},e.toFormatter=function(n){for(n===void 0&&(n=Zi.SMART);this._active._parent!=null;)this.optionalEnd();var t=new KY(this._printerParsers,!1);return new _n(t,null,v3.STANDARD,n,null,null,null)},r})(),UD=146097*25*86400,V2=(146097*5-(30*365+7))*86400,FXe=(function(){function r(i){this.fractionalDigits=i}var e=r.prototype;return e.print=function(n,t){var o=n.getValue(Oe.INSTANT_SECONDS),a=0;if(n.temporal().isSupported(Oe.NANO_OF_SECOND)&&(a=n.temporal().getLong(Oe.NANO_OF_SECOND)),o==null)return!1;var s=o,l=Oe.NANO_OF_SECOND.checkValidIntValue(a);if(s>=-V2){var u=s-UD+V2,c=Ye.floorDiv(u,UD)+1,d=Ye.floorMod(u,UD),f=ko.ofEpochSecond(d-V2,0,Gi.UTC);c>0&&t.append("+").append(c),t.append(f.toString()),f.second()===0&&t.append(":00")}else{var h=s+V2,p=Ye.intDiv(h,UD),g=Ye.intMod(h,UD),v=ko.ofEpochSecond(g-V2,0,Gi.UTC),y=t.length();t.append(v.toString()),v.second()===0&&t.append(":00"),p<0&&(v.year()===-1e4?t.replace(y,y+2,""+(p-1)):g===0?t.insert(y,p):t.insert(y+1,Math.abs(p)))}if(this.fractionalDigits===-2)l!==0&&(t.append("."),Ye.intMod(l,1e6)===0?t.append((""+(Ye.intDiv(l,1e6)+1e3)).substring(1)):Ye.intMod(l,1e3)===0?t.append((""+(Ye.intDiv(l,1e3)+1e6)).substring(1)):t.append((""+(l+1e9)).substring(1)));else if(this.fractionalDigits>0||this.fractionalDigits===-1&&l>0){t.append(".");for(var m=1e8,b=0;this.fractionalDigits===-1&&l>0||b<this.fractionalDigits;b++){var S=Ye.intDiv(l,m);t.append(S),l=l-S*m,m=Ye.intDiv(m,10)}}return t.append("Z"),!0},e.parse=function(n,t,o){var a=n.copy(),s=this.fractionalDigits<0?0:this.fractionalDigits,l=this.fractionalDigits<0?9:this.fractionalDigits,u=new Wo().append(_n.ISO_LOCAL_DATE).appendLiteral("T").appendValue(Oe.HOUR_OF_DAY,2).appendLiteral(":").appendValue(Oe.MINUTE_OF_HOUR,2).appendLiteral(":").appendValue(Oe.SECOND_OF_MINUTE,2).appendFraction(Oe.NANO_OF_SECOND,s,l,!0).appendLiteral("Z").toFormatter()._toPrinterParser(!1),c=u.parse(a,t,o);if(c<0)return c;var d=a.getParsed(Oe.YEAR),f=a.getParsed(Oe.MONTH_OF_YEAR),h=a.getParsed(Oe.DAY_OF_MONTH),p=a.getParsed(Oe.HOUR_OF_DAY),g=a.getParsed(Oe.MINUTE_OF_HOUR),v=a.getParsed(Oe.SECOND_OF_MINUTE),y=a.getParsed(Oe.NANO_OF_SECOND),m=v??0,b=y??0,S=Ye.intMod(d,1e4),_=0;p===24&&g===0&&m===0&&b===0?(p=0,_=1):p===23&&g===59&&m===60&&(n.setParsedLeapSecond(),m=59);var C;try{var T=ko.of(S,f,h,p,g,m,0).plusDays(_);C=T.toEpochSecond(Gi.UTC),C+=Ye.safeMultiply(Ye.intDiv(d,1e4),UD)}catch{return~o}var x=c;return x=n.setParsedField(Oe.INSTANT_SECONDS,C,o,x),n.setParsedField(Oe.NANO_OF_SECOND,b,o,x)},e.toString=function(){return"Instant()"},r})(),jXe=(function(){function r(i,n){this._field=i,this._value=n}var e=r.prototype;return e.print=function(){return!0},e.parse=function(n,t,o){return n.getParsed(this._field)==null&&n.setParsedField(this._field,this._value,o,o),o},r})();function BXe(){EN.BASE_DATE=yi.of(2e3,1,1),Wo.CompositePrinterParser=KY,Wo.PadPrinterParserDecorator=ZY,Wo.SettingsParser=Th,Wo.CharLiteralPrinterParser=JY,Wo.StringLiteralPrinterParser=JY,Wo.CharLiteralPrinterParser=$xe,Wo.NumberPrinterParser=sR,Wo.ReducedPrinterParser=EN,Wo.FractionPrinterParser=qxe,Wo.OffsetIdPrinterParser=Lv,Wo.ZoneIdPrinterParser=Xxe}/*
 * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
 * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
 */var Zxe=(function(){function r(){this._str=""}var e=r.prototype;return e.append=function(n){return this._str+=n,this},e.appendChar=function(n){return this._str+=n[0],this},e.insert=function(n,t){return this._str=this._str.slice(0,n)+t+this._str.slice(n),this},e.replace=function(n,t,o){return this._str=this._str.slice(0,n)+o+this._str.slice(t),this},e.length=function(){return this._str.length},e.setLength=function(n){return this._str=this._str.slice(0,n),this},e.toString=function(){return this._str},r})();/**
 * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
 * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
 * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
 */var _n=(function(){r.parsedExcessDays=function(){return r.PARSED_EXCESS_DAYS},r.parsedLeapSecond=function(){return r.PARSED_LEAP_SECOND},r.ofPattern=function(n){return new Wo().appendPattern(n).toFormatter()};function r(i,n,t,o,a,s,l){s===void 0&&(s=Mo.INSTANCE),Go(i!=null),Go(t!=null),Go(o!=null),this._printerParser=i,this._locale=n,this._decimalStyle=t,this._resolverStyle=o,this._resolverFields=a,this._chrono=s,this._zone=l}var e=r.prototype;return e.locale=function(){return this._locale},e.decimalStyle=function(){return this._decimalStyle},e.chronology=function(){return this._chrono},e.withChronology=function(n){return this._chrono!=null&&this._chrono.equals(n)?this:new r(this._printerParser,this._locale,this._decimalStyle,this._resolverStyle,this._resolverFields,n,this._zone)},e.withLocale=function(){return this},e.withResolverStyle=function(n){return gt(n,"resolverStyle"),n.equals(this._resolverStyle)?this:new r(this._printerParser,this._locale,this._decimalStyle,n,this._resolverFields,this._chrono,this._zone)},e.format=function(n){var t=new Zxe(32);return this._formatTo(n,t),t.toString()},e._formatTo=function(n,t){gt(n,"temporal"),gt(t,"appendable");var o=new Yxe(n,this);this._printerParser.print(o,t)},e.parse=function(n,t){return arguments.length===1?this.parse1(n):this.parse2(n,t)},e.parse1=function(n){gt(n,"text");try{return this._parseToBuilder(n,null).resolve(this._resolverStyle,this._resolverFields)}catch(t){throw t instanceof hg?t:this._createError(n,t)}},e.parse2=function(n,t){gt(n,"text"),gt(t,"type");try{var o=this._parseToBuilder(n,null).resolve(this._resolverStyle,this._resolverFields);return o.build(t)}catch(a){throw a instanceof hg?a:this._createError(n,a)}},e._createError=function(n,t){var o="";return n.length>64?o=n.substring(0,64)+"...":o=n,new hg("Text '"+o+"' could not be parsed: "+t.message,n,0,t)},e._parseToBuilder=function(n,t){var o=t??new zxe(0),a=this._parseUnresolved0(n,o);if(a==null||o.getErrorIndex()>=0||t==null&&o.getIndex()<n.length){var s="";throw n.length>64?s=n.substr(0,64).toString()+"...":s=n,o.getErrorIndex()>=0?new hg("Text '"+s+"' could not be parsed at index "+o.getErrorIndex(),n,o.getErrorIndex()):new hg("Text '"+s+"' could not be parsed, unparsed text found at index "+o.getIndex(),n,o.getIndex())}return a.toBuilder()},e.parseUnresolved=function(n,t){return this._parseUnresolved0(n,t)},e._parseUnresolved0=function(n,t){Go(n!=null,"text",U0),Go(t!=null,"position",U0);var o=new Gxe(this),a=t.getIndex();return a=this._printerParser.parse(o,n,a),a<0?(t.setErrorIndex(~a),null):(t.setIndex(a),o.toParsed())},e._toPrinterParser=function(n){return this._printerParser.withOptional(n)},e.toString=function(){var n=this._printerParser.toString();return n.indexOf("[")===0?n:n.substring(1,n.length-1)},r})();function VXe(){_n.ISO_LOCAL_DATE=new Wo().appendValue(Oe.YEAR,4,10,co.EXCEEDS_PAD).appendLiteral("-").appendValue(Oe.MONTH_OF_YEAR,2).appendLiteral("-").appendValue(Oe.DAY_OF_MONTH,2).toFormatter(Zi.STRICT).withChronology(Mo.INSTANCE),_n.ISO_LOCAL_TIME=new Wo().appendValue(Oe.HOUR_OF_DAY,2).appendLiteral(":").appendValue(Oe.MINUTE_OF_HOUR,2).optionalStart().appendLiteral(":").appendValue(Oe.SECOND_OF_MINUTE,2).optionalStart().appendFraction(Oe.NANO_OF_SECOND,0,9,!0).toFormatter(Zi.STRICT),_n.ISO_LOCAL_DATE_TIME=new Wo().parseCaseInsensitive().append(_n.ISO_LOCAL_DATE).appendLiteral("T").append(_n.ISO_LOCAL_TIME).toFormatter(Zi.STRICT).withChronology(Mo.INSTANCE),_n.ISO_INSTANT=new Wo().parseCaseInsensitive().appendInstant().toFormatter(Zi.STRICT),_n.ISO_OFFSET_DATE_TIME=new Wo().parseCaseInsensitive().append(_n.ISO_LOCAL_DATE_TIME).appendOffsetId().toFormatter(Zi.STRICT).withChronology(Mo.INSTANCE),_n.ISO_ZONED_DATE_TIME=new Wo().append(_n.ISO_OFFSET_DATE_TIME).optionalStart().appendLiteral("[").parseCaseSensitive().appendZoneId().appendLiteral("]").toFormatter(Zi.STRICT).withChronology(Mo.INSTANCE),_n.BASIC_ISO_DATE=new Wo().appendValue(Oe.YEAR,4,10,co.EXCEEDS_PAD).appendValue(Oe.MONTH_OF_YEAR,2).appendValue(Oe.DAY_OF_MONTH,2).toFormatter(Zi.STRICT).withChronology(Mo.INSTANCE),_n.ISO_OFFSET_DATE=new Wo().parseCaseInsensitive().append(_n.ISO_LOCAL_DATE).appendOffsetId().toFormatter(Zi.STRICT).withChronology(Mo.INSTANCE),_n.ISO_OFFSET_TIME=new Wo().parseCaseInsensitive().append(_n.ISO_LOCAL_TIME).appendOffsetId().toFormatter(Zi.STRICT).withChronology(Mo.INSTANCE),_n.ISO_ORDINAL_DATE=new Wo().appendValue(Oe.YEAR,4,10,co.EXCEEDS_PAD).appendLiteral("-").appendValue(Oe.DAY_OF_YEAR).toFormatter(Zi.STRICT),_n.ISO_WEEK_DATE=new Wo().appendValue(Oe.YEAR,4,10,co.EXCEEDS_PAD).appendLiteral("-W").appendValue(Oe.ALIGNED_WEEK_OF_YEAR).appendLiteral("-").appendValue(Oe.DAY_OF_WEEK).toFormatter(Zi.STRICT),_n.ISO_DATE=new Wo().parseCaseInsensitive().append(_n.ISO_LOCAL_DATE).optionalStart().appendOffsetId().optionalEnd().toFormatter(Zi.STRICT).withChronology(Mo.INSTANCE),_n.ISO_TIME=new Wo().parseCaseInsensitive().append(_n.ISO_LOCAL_TIME).optionalStart().appendOffsetId().optionalEnd().toFormatter(Zi.STRICT),_n.ISO_DATE_TIME=new Wo().append(_n.ISO_LOCAL_DATE_TIME).optionalStart().appendOffsetId().optionalEnd().toFormatter(Zi.STRICT).withChronology(Mo.INSTANCE),_n.PARSED_EXCESS_DAYS=Nl("PARSED_EXCESS_DAYS",function(r){return r instanceof g3?r.excessDays:I0.ZERO}),_n.PARSED_LEAP_SECOND=Nl("PARSED_LEAP_SECOND",function(r){return r instanceof g3?r.leapSecond:!1})}var y3=(function(r){nn(e,r),e.now=function(t){return arguments.length===0?e.now0():arguments.length===1&&t instanceof Lo?e.nowZoneId(t):e.nowClock(t)},e.now0=function(){return this.nowClock(da.systemDefaultZone())},e.nowZoneId=function(t){return gt(t,"zone"),this.nowClock(da.system(t))},e.nowClock=function(t){gt(t,"clock");var o=yi.now(t);return e.of(o.month(),o.dayOfMonth())},e.of=function(t,o){return arguments.length===2&&t instanceof Bi?e.ofMonthNumber(t,o):e.ofNumberNumber(t,o)},e.ofMonthNumber=function(t,o){if(gt(t,"month"),Oe.DAY_OF_MONTH.checkValidValue(o),o>t.maxLength())throw new ei("Illegal value for DayOfMonth field, value "+o+" is not valid for month "+t.toString());return new e(t.value(),o)},e.ofNumberNumber=function(t,o){return gt(t,"month"),gt(o,"dayOfMonth"),e.of(Bi.of(t),o)},e.from=function(t){if(gt(t,"temporal"),gi(t,VS,"temporal"),t instanceof e)return t;try{return e.of(t.get(Oe.MONTH_OF_YEAR),t.get(Oe.DAY_OF_MONTH))}catch{throw new ei("Unable to obtain MonthDay from TemporalAccessor: "+t+", type "+(t&&t.constructor!=null?t.constructor.name:""))}},e.parse=function(t,o){return arguments.length===1?e.parseString(t):e.parseStringFormatter(t,o)},e.parseString=function(t){return e.parseStringFormatter(t,Jxe)},e.parseStringFormatter=function(t,o){return gt(t,"text"),gt(o,"formatter"),gi(o,_n,"formatter"),o.parse(t,e.FROM)};function e(n,t){var o;return o=r.call(this)||this,o._month=Ye.safeToInt(n),o._day=Ye.safeToInt(t),o}var i=e.prototype;return i.monthValue=function(){return this._month},i.month=function(){return Bi.of(this._month)},i.dayOfMonth=function(){return this._day},i.isSupported=function(t){return t instanceof Oe?t===Oe.MONTH_OF_YEAR||t===Oe.DAY_OF_MONTH:t!=null&&t.isSupportedBy(this)},i.range=function(t){return t===Oe.MONTH_OF_YEAR?t.range():t===Oe.DAY_OF_MONTH?en.of(1,this.month().minLength(),this.month().maxLength()):r.prototype.range.call(this,t)},i.get=function(t){return this.range(t).checkValidIntValue(this.getLong(t),t)},i.getLong=function(t){if(gt(t,"field"),t instanceof Oe){switch(t){case Oe.DAY_OF_MONTH:return this._day;case Oe.MONTH_OF_YEAR:return this._month}throw new kn("Unsupported field: "+t)}return t.getFrom(this)},i.isValidYear=function(t){return!(this._day===29&&this._month===2&&yg.isLeap(t)===!1)},i.withMonth=function(t){return this.with(Bi.of(t))},i.with=function(t){if(gt(t,"month"),t.value()===this._month)return this;var o=Math.min(this._day,t.maxLength());return new e(t.value(),o)},i.withDayOfMonth=function(t){return t===this._day?this:e.of(this._month,t)},i.query=function(t){return gt(t,"query"),gi(t,gj,"query"),t===xr.chronology()?Mo.INSTANCE:r.prototype.query.call(this,t)},i.adjustInto=function(t){return gt(t,"temporal"),t=t.with(Oe.MONTH_OF_YEAR,this._month),t.with(Oe.DAY_OF_MONTH,Math.min(t.range(Oe.DAY_OF_MONTH).maximum(),this._day))},i.atYear=function(t){return yi.of(t,this._month,this.isValidYear(t)?this._day:28)},i.compareTo=function(t){gt(t,"other"),gi(t,e,"other");var o=this._month-t.monthValue();return o===0&&(o=this._day-t.dayOfMonth()),o},i.isAfter=function(t){return gt(t,"other"),gi(t,e,"other"),this.compareTo(t)>0},i.isBefore=function(t){return gt(t,"other"),gi(t,e,"other"),this.compareTo(t)<0},i.equals=function(t){if(this===t)return!0;if(t instanceof e){var o=t;return this.monthValue()===o.monthValue()&&this.dayOfMonth()===o.dayOfMonth()}return!1},i.toString=function(){return"--"+(this._month<10?"0":"")+this._month+(this._day<10?"-0":"-")+this._day},i.toJSON=function(){return this.toString()},i.format=function(t){return gt(t,"formatter"),gi(t,_n,"formatter"),t.format(this)},e})(VS),Jxe;function HXe(){Jxe=new Wo().appendLiteral("--").appendValue(Oe.MONTH_OF_YEAR,2).appendLiteral("-").appendValue(Oe.DAY_OF_MONTH,2).toFormatter(),y3.FROM=Nl("MonthDay.FROM",function(r){return y3.from(r)})}var fF=(function(r){nn(e,r),e.now=function(t){return arguments.length===0?e.now0():arguments.length===1&&t instanceof Lo?e.nowZoneId(t):e.nowClock(t)},e.now0=function(){return e.nowClock(da.systemDefaultZone())},e.nowZoneId=function(t){return e.nowClock(da.system(t))},e.nowClock=function(t){var o=yi.now(t);return e.of(o.year(),o.month())},e.of=function(t,o){return arguments.length===2&&o instanceof Bi?e.ofNumberMonth(t,o):e.ofNumberNumber(t,o)},e.ofNumberMonth=function(t,o){return gt(o,"month"),gi(o,Bi,"month"),e.ofNumberNumber(t,o.value())},e.ofNumberNumber=function(t,o){return gt(t,"year"),gt(o,"month"),Oe.YEAR.checkValidValue(t),Oe.MONTH_OF_YEAR.checkValidValue(o),new e(t,o)},e.from=function(t){if(gt(t,"temporal"),t instanceof e)return t;try{return e.of(t.get(Oe.YEAR),t.get(Oe.MONTH_OF_YEAR))}catch{throw new ei("Unable to obtain YearMonth from TemporalAccessor: "+t+", type "+(t&&t.constructor!=null?t.constructor.name:""))}},e.parse=function(t,o){return arguments.length===1?e.parseString(t):e.parseStringFormatter(t,o)},e.parseString=function(t){return e.parseStringFormatter(t,QY)},e.parseStringFormatter=function(t,o){return gt(o,"formatter"),o.parse(t,e.FROM)};function e(n,t){var o;return o=r.call(this)||this,o._year=Ye.safeToInt(n),o._month=Ye.safeToInt(t),o}var i=e.prototype;return i.isSupported=function(t){return arguments.length===1&&t instanceof Rv?this.isSupportedField(t):this.isSupportedUnit(t)},i.isSupportedField=function(t){return t instanceof Oe?t===Oe.YEAR||t===Oe.MONTH_OF_YEAR||t===Oe.PROLEPTIC_MONTH||t===Oe.YEAR_OF_ERA||t===Oe.ERA:t!=null&&t.isSupportedBy(this)},i.isSupportedUnit=function(t){return t instanceof dt?t===dt.MONTHS||t===dt.YEARS||t===dt.DECADES||t===dt.CENTURIES||t===dt.MILLENNIA||t===dt.ERAS:t!=null&&t.isSupportedBy(this)},i.range=function(t){return t===Oe.YEAR_OF_ERA?this.year()<=0?en.of(1,yg.MAX_VALUE+1):en.of(1,yg.MAX_VALUE):r.prototype.range.call(this,t)},i.get=function(t){return gt(t,"field"),gi(t,Rv,"field"),this.range(t).checkValidIntValue(this.getLong(t),t)},i.getLong=function(t){if(gt(t,"field"),gi(t,Rv,"field"),t instanceof Oe){switch(t){case Oe.MONTH_OF_YEAR:return this._month;case Oe.PROLEPTIC_MONTH:return this._getProlepticMonth();case Oe.YEAR_OF_ERA:return this._year<1?1-this._year:this._year;case Oe.YEAR:return this._year;case Oe.ERA:return this._year<1?0:1}throw new kn("Unsupported field: "+t)}return t.getFrom(this)},i._getProlepticMonth=function(){return Ye.safeAdd(Ye.safeMultiply(this._year,12),this._month-1)},i.year=function(){return this._year},i.monthValue=function(){return this._month},i.month=function(){return Bi.of(this._month)},i.isLeapYear=function(){return Mo.isLeapYear(this._year)},i.isValidDay=function(t){return t>=1&&t<=this.lengthOfMonth()},i.lengthOfMonth=function(){return this.month().length(this.isLeapYear())},i.lengthOfYear=function(){return this.isLeapYear()?366:365},i.with=function(t,o){return arguments.length===1?this._withAdjuster(t):this._withField(t,o)},i._withField=function(t,o){if(gt(t,"field"),gi(t,Rv,"field"),t instanceof Oe){var a=t;switch(a.checkValidValue(o),a){case Oe.MONTH_OF_YEAR:return this.withMonth(o);case Oe.PROLEPTIC_MONTH:return this.plusMonths(o-this.getLong(Oe.PROLEPTIC_MONTH));case Oe.YEAR_OF_ERA:return this.withYear(this._year<1?1-o:o);case Oe.YEAR:return this.withYear(o);case Oe.ERA:return this.getLong(Oe.ERA)===o?this:this.withYear(1-this._year)}throw new kn("Unsupported field: "+t)}return t.adjustInto(this,o)},i.withYear=function(t){return Oe.YEAR.checkValidValue(t),new e(t,this._month)},i.withMonth=function(t){return Oe.MONTH_OF_YEAR.checkValidValue(t),new e(this._year,t)},i._plusUnit=function(t,o){if(gt(o,"unit"),gi(o,J0,"unit"),o instanceof dt){switch(o){case dt.MONTHS:return this.plusMonths(t);case dt.YEARS:return this.plusYears(t);case dt.DECADES:return this.plusYears(Ye.safeMultiply(t,10));case dt.CENTURIES:return this.plusYears(Ye.safeMultiply(t,100));case dt.MILLENNIA:return this.plusYears(Ye.safeMultiply(t,1e3));case dt.ERAS:return this.with(Oe.ERA,Ye.safeAdd(this.getLong(Oe.ERA),t))}throw new kn("Unsupported unit: "+o)}return o.addTo(this,t)},i.plusYears=function(t){if(t===0)return this;var o=Oe.YEAR.checkValidIntValue(this._year+t);return this.withYear(o)},i.plusMonths=function(t){if(t===0)return this;var o=this._year*12+(this._month-1),a=o+t,s=Oe.YEAR.checkValidIntValue(Ye.floorDiv(a,12)),l=Ye.floorMod(a,12)+1;return new e(s,l)},i.minusYears=function(t){return t===Ye.MIN_SAFE_INTEGER?this.plusYears(Ye.MIN_SAFE_INTEGER).plusYears(1):this.plusYears(-t)},i.minusMonths=function(t){return t===Ye.MIN_SAFE_INTEGER?this.plusMonths(Math.MAX_SAFE_INTEGER).plusMonths(1):this.plusMonths(-t)},i.query=function(t){return gt(t,"query"),gi(t,gj,"query"),t===xr.chronology()?Mo.INSTANCE:t===xr.precision()?dt.MONTHS:t===xr.localDate()||t===xr.localTime()||t===xr.zone()||t===xr.zoneId()||t===xr.offset()?null:r.prototype.query.call(this,t)},i.adjustInto=function(t){return gt(t,"temporal"),gi(t,Rf,"temporal"),t.with(Oe.PROLEPTIC_MONTH,this._getProlepticMonth())},i.until=function(t,o){gt(t,"endExclusive"),gt(o,"unit"),gi(t,Rf,"endExclusive"),gi(o,J0,"unit");var a=e.from(t);if(o instanceof dt){var s=a._getProlepticMonth()-this._getProlepticMonth();switch(o){case dt.MONTHS:return s;case dt.YEARS:return Ye.intDiv(s,12);case dt.DECADES:return Ye.intDiv(s,120);case dt.CENTURIES:return Ye.intDiv(s,1200);case dt.MILLENNIA:return Ye.intDiv(s,12e3);case dt.ERAS:return a.getLong(Oe.ERA)-this.getLong(Oe.ERA)}throw new kn("Unsupported unit: "+o)}return o.between(this,a)},i.atDay=function(t){return gt(t,"dayOfMonth"),yi.of(this._year,this._month,t)},i.atEndOfMonth=function(){return yi.of(this._year,this._month,this.lengthOfMonth())},i.compareTo=function(t){gt(t,"other"),gi(t,e,"other");var o=this._year-t.year();return o===0&&(o=this._month-t.monthValue()),o},i.isAfter=function(t){return this.compareTo(t)>0},i.isBefore=function(t){return this.compareTo(t)<0},i.equals=function(t){if(this===t)return!0;if(t instanceof e){var o=t;return this.year()===o.year()&&this.monthValue()===o.monthValue()}return!1},i.toString=function(){return QY.format(this)},i.toJSON=function(){return this.toString()},i.format=function(t){return gt(t,"formatter"),t.format(this)},e})(Rf),QY;function UXe(){QY=new Wo().appendValue(Oe.YEAR,4,10,co.EXCEEDS_PAD).appendLiteral("-").appendValue(Oe.MONTH_OF_YEAR,2).toFormatter(),fF.FROM=Nl("YearMonth.FROM",function(r){return fF.from(r)})}var yg=(function(r){nn(e,r);function e(n){var t;return t=r.call(this)||this,t._year=Ye.safeToInt(n),t}var i=e.prototype;return i.value=function(){return this._year},e.now=function(t){return t===void 0&&(t=void 0),t===void 0?e.now0():t instanceof Lo?e.nowZoneId(t):e.nowClock(t)},e.now0=function(){return e.nowClock(da.systemDefaultZone())},e.nowZoneId=function(t){return gt(t,"zone"),gi(t,Lo,"zone"),e.nowClock(da.system(t))},e.nowClock=function(t){gt(t,"clock"),gi(t,da,"clock");var o=yi.now(t);return e.of(o.year())},e.of=function(t){return gt(t,"isoYear"),Oe.YEAR.checkValidValue(t),new e(t)},e.from=function(t){if(gt(t,"temporal"),gi(t,VS,"temporal"),t instanceof e)return t;try{return e.of(t.get(Oe.YEAR))}catch{throw new ei("Unable to obtain Year from TemporalAccessor: "+t+", type "+(t&&t.constructor!=null?t.constructor.name:""))}},e.parse=function(t,o){return arguments.length<=1?e.parseText(t):e.parseTextFormatter(t,o)},e.parseText=function(t){return gt(t,"text"),e.parse(t,e$)},e.parseTextFormatter=function(t,o){return o===void 0&&(o=e$),gt(t,"text"),gt(o,"formatter"),gi(o,_n,"formatter"),o.parse(t,e.FROM)},e.isLeap=function(t){return Ye.intMod(t,4)===0&&(Ye.intMod(t,100)!==0||Ye.intMod(t,400)===0)},i.isSupported=function(t){return arguments.length===1&&t instanceof Rv?this.isSupportedField(t):this.isSupportedUnit(t)},i.isSupportedField=function(t){return t instanceof Oe?t===Oe.YEAR||t===Oe.YEAR_OF_ERA||t===Oe.ERA:t!=null&&t.isSupportedBy(this)},i.isSupportedUnit=function(t){return t instanceof dt?t===dt.YEARS||t===dt.DECADES||t===dt.CENTURIES||t===dt.MILLENNIA||t===dt.ERAS:t!=null&&t.isSupportedBy(this)},i.range=function(t){if(this.isSupported(t))return t.range();if(t instanceof Oe)throw new kn("Unsupported field: "+t);return r.prototype.range.call(this,t)},i.get=function(t){return this.range(t).checkValidIntValue(this.getLong(t),t)},i.getLong=function(t){if(gt(t,"field"),t instanceof Oe){switch(t){case Oe.YEAR_OF_ERA:return this._year<1?1-this._year:this._year;case Oe.YEAR:return this._year;case Oe.ERA:return this._year<1?0:1}throw new kn("Unsupported field: "+t)}return t.getFrom(this)},i.isLeap=function(){return e.isLeap(this._year)},i._withField=function(t,o){if(gt(t,"field"),gi(t,Rv,"field"),t instanceof Oe){switch(t.checkValidValue(o),t){case Oe.YEAR_OF_ERA:return e.of(this._year<1?1-o:o);case Oe.YEAR:return e.of(o);case Oe.ERA:return this.getLong(Oe.ERA)===o?this:e.of(1-this._year)}throw new kn("Unsupported field: "+t)}return t.adjustInto(this,o)},i._plusUnit=function(t,o){if(gt(t,"amountToAdd"),gt(o,"unit"),gi(o,J0,"unit"),o instanceof dt){switch(o){case dt.YEARS:return this.plusYears(t);case dt.DECADES:return this.plusYears(Ye.safeMultiply(t,10));case dt.CENTURIES:return this.plusYears(Ye.safeMultiply(t,100));case dt.MILLENNIA:return this.plusYears(Ye.safeMultiply(t,1e3));case dt.ERAS:return this.with(Oe.ERA,Ye.safeAdd(this.getLong(Oe.ERA),t))}throw new kn("Unsupported unit: "+o)}return o.addTo(this,t)},i.plusYears=function(t){return t===0?this:e.of(Oe.YEAR.checkValidIntValue(Ye.safeAdd(this._year,t)))},i.minusYears=function(t){return t===Ye.MIN_SAFE_INTEGER?this.plusYears(Ye.MAX_SAFE_INTEGER).plusYears(1):this.plusYears(-t)},i.adjustInto=function(t){return gt(t,"temporal"),t.with(Oe.YEAR,this._year)},i.isValidMonthDay=function(t){return t!=null&&t.isValidYear(this._year)},i.length=function(){return this.isLeap()?366:365},i.atDay=function(t){return yi.ofYearDay(this._year,t)},i.atMonth=function(t){return arguments.length===1&&t instanceof Bi?this.atMonthMonth(t):this.atMonthNumber(t)},i.atMonthMonth=function(t){return gt(t,"month"),gi(t,Bi,"month"),fF.of(this._year,t)},i.atMonthNumber=function(t){return gt(t,"month"),fF.of(this._year,t)},i.atMonthDay=function(t){return gt(t,"monthDay"),gi(t,y3,"monthDay"),t.atYear(this._year)},i.query=function(t){return gt(t,"query()"),gi(t,gj,"query()"),t===xr.chronology()?Mo.INSTANCE:t===xr.precision()?dt.YEARS:t===xr.localDate()||t===xr.localTime()||t===xr.zone()||t===xr.zoneId()||t===xr.offset()?null:r.prototype.query.call(this,t)},i.compareTo=function(t){return gt(t,"other"),gi(t,e,"other"),this._year-t._year},i.isAfter=function(t){return gt(t,"other"),gi(t,e,"other"),this._year>t._year},i.isBefore=function(t){return gt(t,"other"),gi(t,e,"other"),this._year<t._year},i.format=function(t){return gt(t,"formatter"),gi(t,_n,"formatter"),t.format(this)},i.equals=function(t){return this===t?!0:t instanceof e?this.value()===t.value():!1},i.toString=function(){return""+this._year},i.toJSON=function(){return this.toString()},i.until=function(t,o){var a=e.from(t);if(o instanceof dt){var s=a.value()-this.value();switch(o){case dt.YEARS:return s;case dt.DECADES:return Ye.intDiv(s,10);case dt.CENTURIES:return Ye.intDiv(s,100);case dt.MILLENNIA:return Ye.intDiv(s,1e3);case dt.ERAS:return a.getLong(Oe.ERA)-this.getLong(Oe.ERA)}throw new kn("Unsupported unit: "+o)}return o.between(this,a)},e})(Rf),e$;function zXe(){yg.MIN_VALUE=Af.MIN_VALUE,yg.MAX_VALUE=Af.MAX_VALUE,e$=new Wo().appendValue(Oe.YEAR,4,10,co.EXCEEDS_PAD).toFormatter(),yg.FROM=Nl("Year.FROM",function(r){return yg.from(r)})}/*
 * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
 * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
 * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
 */var qU=(function(){function r(){}var e=r.prototype;return e.adjustInto=function(n){Li("adjustInto")},r})(),Qxe=(function(){function r(){}return r.firstDayOfMonth=function(){return Ou.FIRST_DAY_OF_MONTH},r.lastDayOfMonth=function(){return Ou.LAST_DAY_OF_MONTH},r.firstDayOfNextMonth=function(){return Ou.FIRST_DAY_OF_NEXT_MONTH},r.firstDayOfYear=function(){return Ou.FIRST_DAY_OF_YEAR},r.lastDayOfYear=function(){return Ou.LAST_DAY_OF_YEAR},r.firstDayOfNextYear=function(){return Ou.FIRST_DAY_OF_NEXT_YEAR},r.firstInMonth=function(i){return gt(i,"dayOfWeek"),new fG(1,i)},r.lastInMonth=function(i){return gt(i,"dayOfWeek"),new fG(-1,i)},r.dayOfWeekInMonth=function(i,n){return gt(n,"dayOfWeek"),new fG(i,n)},r.next=function(i){return new Xj(2,i)},r.nextOrSame=function(i){return new Xj(0,i)},r.previous=function(i){return new Xj(3,i)},r.previousOrSame=function(i){return new Xj(1,i)},r})(),Ou=(function(r){nn(e,r);function e(n){var t;return t=r.call(this)||this,t._ordinal=n,t}var i=e.prototype;return i.adjustInto=function(t){switch(this._ordinal){case 0:return t.with(Oe.DAY_OF_MONTH,1);case 1:return t.with(Oe.DAY_OF_MONTH,t.range(Oe.DAY_OF_MONTH).maximum());case 2:return t.with(Oe.DAY_OF_MONTH,1).plus(1,dt.MONTHS);case 3:return t.with(Oe.DAY_OF_YEAR,1);case 4:return t.with(Oe.DAY_OF_YEAR,t.range(Oe.DAY_OF_YEAR).maximum());case 5:return t.with(Oe.DAY_OF_YEAR,1).plus(1,dt.YEARS)}throw new uF("Unreachable")},e})(qU);Ou.FIRST_DAY_OF_MONTH=new Ou(0);Ou.LAST_DAY_OF_MONTH=new Ou(1);Ou.FIRST_DAY_OF_NEXT_MONTH=new Ou(2);Ou.FIRST_DAY_OF_YEAR=new Ou(3);Ou.LAST_DAY_OF_YEAR=new Ou(4);Ou.FIRST_DAY_OF_NEXT_YEAR=new Ou(5);var fG=(function(r){nn(e,r);function e(n,t){var o;return o=r.call(this)||this,o._ordinal=n,o._dowValue=t.value(),o}var i=e.prototype;return i.adjustInto=function(t){if(this._ordinal>=0){var o=t.with(Oe.DAY_OF_MONTH,1),a=o.get(Oe.DAY_OF_WEEK),s=Ye.intMod(this._dowValue-a+7,7);return s+=(this._ordinal-1)*7,o.plus(s,dt.DAYS)}else{var l=t.with(Oe.DAY_OF_MONTH,t.range(Oe.DAY_OF_MONTH).maximum()),u=l.get(Oe.DAY_OF_WEEK),c=this._dowValue-u;return c=c===0?0:c>0?c-7:c,c-=(-this._ordinal-1)*7,l.plus(c,dt.DAYS)}},e})(qU),Xj=(function(r){nn(e,r);function e(n,t){var o;return o=r.call(this)||this,gt(t,"dayOfWeek"),o._relative=n,o._dowValue=t.value(),o}var i=e.prototype;return i.adjustInto=function(t){var o=t.get(Oe.DAY_OF_WEEK);if(this._relative<2&&o===this._dowValue)return t;if((this._relative&1)===0){var a=o-this._dowValue;return t.plus(a>=0?7-a:-a,dt.DAYS)}else{var s=this._dowValue-o;return t.minus(s>=0?7-s:-s,dt.DAYS)}},e})(qU),Mo=(function(r){nn(e,r);function e(){return r.apply(this,arguments)||this}e.isLeapYear=function(t){return(t&3)===0&&(t%100!==0||t%400===0)};var i=e.prototype;return i._updateResolveMap=function(t,o,a){gt(t,"fieldValues"),gt(o,"field");var s=t.get(o);if(s!=null&&s!==a)throw new ei("Invalid state, field: "+o+" "+s+" conflicts with "+o+" "+a);t.put(o,a)},i.resolveDate=function(t,o){if(t.containsKey(Oe.EPOCH_DAY))return yi.ofEpochDay(t.remove(Oe.EPOCH_DAY));var a=t.remove(Oe.PROLEPTIC_MONTH);a!=null&&(o!==Zi.LENIENT&&Oe.PROLEPTIC_MONTH.checkValidValue(a),this._updateResolveMap(t,Oe.MONTH_OF_YEAR,Ye.floorMod(a,12)+1),this._updateResolveMap(t,Oe.YEAR,Ye.floorDiv(a,12)));var s=t.remove(Oe.YEAR_OF_ERA);if(s!=null){o!==Zi.LENIENT&&Oe.YEAR_OF_ERA.checkValidValue(s);var l=t.remove(Oe.ERA);if(l==null){var u=t.get(Oe.YEAR);o===Zi.STRICT?u!=null?this._updateResolveMap(t,Oe.YEAR,u>0?s:Ye.safeSubtract(1,s)):t.put(Oe.YEAR_OF_ERA,s):this._updateResolveMap(t,Oe.YEAR,u==null||u>0?s:Ye.safeSubtract(1,s))}else if(l===1)this._updateResolveMap(t,Oe.YEAR,s);else if(l===0)this._updateResolveMap(t,Oe.YEAR,Ye.safeSubtract(1,s));else throw new ei("Invalid value for era: "+l)}else t.containsKey(Oe.ERA)&&Oe.ERA.checkValidValue(t.get(Oe.ERA));if(t.containsKey(Oe.YEAR)){if(t.containsKey(Oe.MONTH_OF_YEAR)&&t.containsKey(Oe.DAY_OF_MONTH)){var c=Oe.YEAR.checkValidIntValue(t.remove(Oe.YEAR)),d=t.remove(Oe.MONTH_OF_YEAR),f=t.remove(Oe.DAY_OF_MONTH);if(o===Zi.LENIENT){var h=d-1,p=f-1;return yi.of(c,1,1).plusMonths(h).plusDays(p)}else return o===Zi.SMART&&(Oe.DAY_OF_MONTH.checkValidValue(f),d===4||d===6||d===9||d===11?f=Math.min(f,30):d===2&&(f=Math.min(f,Bi.FEBRUARY.length(yg.isLeap(c))))),yi.of(c,d,f)}if(t.containsKey(Oe.DAY_OF_YEAR)){var g=Oe.YEAR.checkValidIntValue(t.remove(Oe.YEAR));if(o===Zi.LENIENT){var v=Ye.safeSubtract(t.remove(Oe.DAY_OF_YEAR),1);return yi.ofYearDay(g,1).plusDays(v)}var y=Oe.DAY_OF_YEAR.checkValidIntValue(t.remove(Oe.DAY_OF_YEAR));return yi.ofYearDay(g,y)}if(t.containsKey(Oe.ALIGNED_WEEK_OF_YEAR)){if(t.containsKey(Oe.ALIGNED_DAY_OF_WEEK_IN_YEAR)){var m=Oe.YEAR.checkValidIntValue(t.remove(Oe.YEAR));if(o===Zi.LENIENT){var b=Ye.safeSubtract(t.remove(Oe.ALIGNED_WEEK_OF_YEAR),1),S=Ye.safeSubtract(t.remove(Oe.ALIGNED_DAY_OF_WEEK_IN_YEAR),1);return yi.of(m,1,1).plusWeeks(b).plusDays(S)}var _=Oe.ALIGNED_WEEK_OF_YEAR.checkValidIntValue(t.remove(Oe.ALIGNED_WEEK_OF_YEAR)),C=Oe.ALIGNED_DAY_OF_WEEK_IN_YEAR.checkValidIntValue(t.remove(Oe.ALIGNED_DAY_OF_WEEK_IN_YEAR)),T=yi.of(m,1,1).plusDays((_-1)*7+(C-1));if(o===Zi.STRICT&&T.get(Oe.YEAR)!==m)throw new ei("Strict mode rejected date parsed to a different year");return T}if(t.containsKey(Oe.DAY_OF_WEEK)){var x=Oe.YEAR.checkValidIntValue(t.remove(Oe.YEAR));if(o===Zi.LENIENT){var A=Ye.safeSubtract(t.remove(Oe.ALIGNED_WEEK_OF_YEAR),1),w=Ye.safeSubtract(t.remove(Oe.DAY_OF_WEEK),1);return yi.of(x,1,1).plusWeeks(A).plusDays(w)}var L=Oe.ALIGNED_WEEK_OF_YEAR.checkValidIntValue(t.remove(Oe.ALIGNED_WEEK_OF_YEAR)),k=Oe.DAY_OF_WEEK.checkValidIntValue(t.remove(Oe.DAY_OF_WEEK)),D=yi.of(x,1,1).plusWeeks(L-1).with(Qxe.nextOrSame(Sa.of(k)));if(o===Zi.STRICT&&D.get(Oe.YEAR)!==x)throw new ei("Strict mode rejected date parsed to a different month");return D}}}return null},i.date=function(t){return yi.from(t)},e})(WM);function WXe(){Mo.INSTANCE=new Mo("IsoChronology")}var xv=(function(r){nn(e,r),e.from=function(t){if(gt(t,"temporal"),t instanceof e)return t;if(t instanceof mp)return t.toOffsetTime();try{var o=Wt.from(t),a=Gi.from(t);return new e(o,a)}catch{throw new ei("Unable to obtain OffsetTime TemporalAccessor: "+t+", type "+(t.constructor!=null?t.constructor.name:""))}},e.now=function(t){return arguments.length===0?e._now(da.systemDefaultZone()):t instanceof da?e._now(t):e._now(da.system(t))},e._now=function(t){gt(t,"clock");var o=t.instant();return e.ofInstant(o,t.zone().rules().offset(o))},e.of=function(){return arguments.length<=2?e.ofTimeAndOffset.apply(this,arguments):e.ofNumbers.apply(this,arguments)},e.ofNumbers=function(t,o,a,s,l){var u=Wt.of(t,o,a,s);return new e(u,l)},e.ofTimeAndOffset=function(t,o){return new e(t,o)},e.ofInstant=function(t,o){gt(t,"instant"),gi(t,ua,"instant"),gt(o,"zone"),gi(o,Lo,"zone");var a=o.rules(),s=a.offset(t),l=t.epochSecond()%Wt.SECONDS_PER_DAY;l=(l+s.totalSeconds())%Wt.SECONDS_PER_DAY,l<0&&(l+=Wt.SECONDS_PER_DAY);var u=Wt.ofSecondOfDay(l,t.nano());return new e(u,s)},e.parse=function(t,o){return o===void 0&&(o=_n.ISO_OFFSET_TIME),gt(o,"formatter"),o.parse(t,e.FROM)};function e(n,t){var o;return o=r.call(this)||this,gt(n,"time"),gi(n,Wt,"time"),gt(t,"offset"),gi(t,Gi,"offset"),o._time=n,o._offset=t,o}var i=e.prototype;return i.adjustInto=function(t){return t.with(Oe.NANO_OF_DAY,this._time.toNanoOfDay()).with(Oe.OFFSET_SECONDS,this.offset().totalSeconds())},i.atDate=function(t){return mp.of(t,this._time,this._offset)},i.format=function(t){return gt(t,"formatter"),t.format(this,e.FROM)},i.get=function(t){return r.prototype.get.call(this,t)},i.getLong=function(t){return t instanceof Oe?t===Oe.OFFSET_SECONDS?this._offset.totalSeconds():this._time.getLong(t):t.getFrom(this)},i.hour=function(){return this._time.hour()},i.minute=function(){return this._time.minute()},i.second=function(){return this._time.second()},i.nano=function(){return this._time.nano()},i.offset=function(){return this._offset},i.isAfter=function(t){return gt(t,"other"),this._toEpochNano()>t._toEpochNano()},i.isBefore=function(t){return gt(t,"other"),this._toEpochNano()<t._toEpochNano()},i.isEqual=function(t){return gt(t,"other"),this._toEpochNano()===t._toEpochNano()},i.isSupported=function(t){return t instanceof Oe?t.isTimeBased()||t===Oe.OFFSET_SECONDS:t instanceof dt?t.isTimeBased():t!=null&&t.isSupportedBy(this)},i.minusHours=function(t){return this._withLocalTimeOffset(this._time.minusHours(t),this._offset)},i.minusMinutes=function(t){return this._withLocalTimeOffset(this._time.minusMinutes(t),this._offset)},i.minusSeconds=function(t){return this._withLocalTimeOffset(this._time.minusSeconds(t),this._offset)},i.minusNanos=function(t){return this._withLocalTimeOffset(this._time.minusNanos(t),this._offset)},i._minusAmount=function(t){return gt(t),t.subtractFrom(this)},i._minusUnit=function(t,o){return this.plus(-1*t,o)},i._plusAmount=function(t){return gt(t),t.addTo(this)},i._plusUnit=function(t,o){return o instanceof dt?this._withLocalTimeOffset(this._time.plus(t,o),this._offset):o.addTo(this,t)},i.plusHours=function(t){return this._withLocalTimeOffset(this._time.plusHours(t),this._offset)},i.plusMinutes=function(t){return this._withLocalTimeOffset(this._time.plusMinutes(t),this._offset)},i.plusSeconds=function(t){return this._withLocalTimeOffset(this._time.plusSeconds(t),this._offset)},i.plusNanos=function(t){return this._withLocalTimeOffset(this._time.plusNanos(t),this._offset)},i.query=function(t){return gt(t,"query"),t===xr.precision()?dt.NANOS:t===xr.offset()||t===xr.zone()?this.offset():t===xr.localTime()?this._time:t===xr.chronology()||t===xr.localDate()||t===xr.zoneId()?null:r.prototype.query.call(this,t)},i.range=function(t){return t instanceof Oe?t===Oe.OFFSET_SECONDS?t.range():this._time.range(t):t.rangeRefinedBy(this)},i.toLocalTime=function(){return this._time},i.truncatedTo=function(t){return this._withLocalTimeOffset(this._time.truncatedTo(t),this._offset)},i.until=function(t,o){gt(t,"endExclusive"),gt(o,"unit");var a=e.from(t);if(o instanceof dt){var s=a._toEpochNano()-this._toEpochNano();switch(o){case dt.NANOS:return s;case dt.MICROS:return Ye.intDiv(s,1e3);case dt.MILLIS:return Ye.intDiv(s,1e6);case dt.SECONDS:return Ye.intDiv(s,Wt.NANOS_PER_SECOND);case dt.MINUTES:return Ye.intDiv(s,Wt.NANOS_PER_MINUTE);case dt.HOURS:return Ye.intDiv(s,Wt.NANOS_PER_HOUR);case dt.HALF_DAYS:return Ye.intDiv(s,12*Wt.NANOS_PER_HOUR)}throw new kn("Unsupported unit: "+o)}return o.between(this,a)},i.withHour=function(t){return this._withLocalTimeOffset(this._time.withHour(t),this._offset)},i.withMinute=function(t){return this._withLocalTimeOffset(this._time.withMinute(t),this._offset)},i.withSecond=function(t){return this._withLocalTimeOffset(this._time.withSecond(t),this._offset)},i.withNano=function(t){return this._withLocalTimeOffset(this._time.withNano(t),this._offset)},i.withOffsetSameInstant=function(t){if(gt(t,"offset"),t.equals(this._offset))return this;var o=t.totalSeconds()-this._offset.totalSeconds(),a=this._time.plusSeconds(o);return new e(a,t)},i.withOffsetSameLocal=function(t){return t!=null&&t.equals(this._offset)?this:new e(this._time,t)},i._toEpochNano=function(){var t=this._time.toNanoOfDay(),o=this._offset.totalSeconds()*Wt.NANOS_PER_SECOND;return t-o},i._withAdjuster=function(t){return gt(t,"adjuster"),t instanceof Wt?this._withLocalTimeOffset(t,this._offset):t instanceof Gi?this._withLocalTimeOffset(this._time,t):t instanceof e?t:t.adjustInto(this)},i._withField=function(t,o){return gt(t,"field"),t instanceof Oe?t===Oe.OFFSET_SECONDS?this._withLocalTimeOffset(this._time,Gi.ofTotalSeconds(t.checkValidIntValue(o))):this._withLocalTimeOffset(this._time.with(t,o),this._offset):t.adjustInto(this,o)},i._withLocalTimeOffset=function(t,o){return this._time===t&&this._offset.equals(o)?this:new e(t,o)},i.compareTo=function(t){if(gt(t,"other"),gi(t,e,"other"),this._offset.equals(t._offset))return this._time.compareTo(t._time);var o=Ye.compareNumbers(this._toEpochNano(),t._toEpochNano());return o===0?this._time.compareTo(t._time):o},i.equals=function(t){return this===t?!0:t instanceof e?this._time.equals(t._time)&&this._offset.equals(t._offset):!1},i.hashCode=function(){return this._time.hashCode()^this._offset.hashCode()},i.toString=function(){return this._time.toString()+this._offset.toString()},i.toJSON=function(){return this.toString()},e})(Rf);function GXe(){xv.MIN=xv.ofNumbers(0,0,0,0,Gi.MAX),xv.MAX=xv.ofNumbers(23,59,59,999999999,Gi.MIN),xv.FROM=Nl("OffsetTime.FROM",function(r){return xv.from(r)})}var eEe=(function(r){nn(e,r);function e(){return r.apply(this,arguments)||this}var i=e.prototype;return i.query=function(t){return t===xr.zoneId()||t===xr.zone()?this.zone():t===xr.chronology()?this.toLocalDate().chronology():t===xr.precision()?dt.NANOS:t===xr.offset()?this.offset():t===xr.localDate()?yi.ofEpochDay(this.toLocalDate().toEpochDay()):t===xr.localTime()?this.toLocalTime():r.prototype.query.call(this,t)},i.format=function(t){return gt(t,"formatter"),t.format(this)},i.toInstant=function(){return ua.ofEpochSecond(this.toEpochSecond(),this.toLocalTime().nano())},i.toEpochSecond=function(){var t=this.toLocalDate().toEpochDay(),o=t*86400+this.toLocalTime().toSecondOfDay();return o-=this.offset().totalSeconds(),o},i.compareTo=function(t){gt(t,"other");var o=Ye.compareNumbers(this.toEpochSecond(),t.toEpochSecond());return o===0&&(o=this.toLocalTime().nano()-t.toLocalTime().nano(),o===0&&(o=this.toLocalDateTime().compareTo(t.toLocalDateTime()),o===0&&(o=YXe(this.zone().id(),t.zone().id())))),o},i.isAfter=function(t){gt(t,"other");var o=this.toEpochSecond(),a=t.toEpochSecond();return o>a||o===a&&this.toLocalTime().nano()>t.toLocalTime().nano()},i.isBefore=function(t){gt(t,"other");var o=this.toEpochSecond(),a=t.toEpochSecond();return o<a||o===a&&this.toLocalTime().nano()<t.toLocalTime().nano()},i.isEqual=function(t){return gt(t,"other"),this.toEpochSecond()===t.toEpochSecond()&&this.toLocalTime().nano()===t.toLocalTime().nano()},i.equals=function(t){return this===t?!0:t instanceof e?this.compareTo(t)===0:!1},e})(Rf);function YXe(r,e){return r<e?-1:r>e?1:0}var _g=(function(r){nn(e,r),e.now=function(t){var o;return t instanceof Lo?o=da.system(t):o=t??da.systemDefaultZone(),e.ofInstant(o.instant(),o.zone())},e.of=function(){return arguments.length<=2?e.of2.apply(this,arguments):arguments.length===3&&arguments[0]instanceof yi?e.of3.apply(this,arguments):e.of8.apply(this,arguments)},e.of3=function(t,o,a){return e.of2(ko.of(t,o),a)},e.of2=function(t,o){return e.ofLocal(t,o,null)},e.of8=function(t,o,a,s,l,u,c,d){var f=ko.of(t,o,a,s,l,u,c);return e.ofLocal(f,d,null)},e.ofLocal=function(t,o,a){if(gt(t,"localDateTime"),gt(o,"zone"),o instanceof Gi)return new e(t,o,o);var s=null,l=o.rules(),u=l.validOffsets(t);if(u.length===1)s=u[0];else if(u.length===0){var c=l.transition(t);t=t.plusSeconds(c.duration().seconds()),s=c.offsetAfter()}else a!=null&&u.some(function(d){return d.equals(a)})?s=a:s=gt(u[0],"offset");return new e(t,s,o)},e.ofInstant=function(){return arguments.length===2?e.ofInstant2.apply(this,arguments):e.ofInstant3.apply(this,arguments)},e.ofInstant2=function(t,o){return gt(t,"instant"),gt(o,"zone"),e._create(t.epochSecond(),t.nano(),o)},e.ofInstant3=function(t,o,a){return gt(t,"localDateTime"),gt(o,"offset"),gt(a,"zone"),e._create(t.toEpochSecond(o),t.nano(),a)},e._create=function(t,o,a){var s=a.rules(),l=ua.ofEpochSecond(t,o),u=s.offset(l),c=ko.ofEpochSecond(t,o,u);return new e(c,u,a)},e.ofStrict=function(t,o,a){gt(t,"localDateTime"),gt(o,"offset"),gt(a,"zone");var s=a.rules();if(s.isValidOffset(t,o)===!1){var l=s.transition(t);throw l!=null&&l.isGap()?new ei("LocalDateTime "+t+" does not exist in zone "+a+" due to a gap in the local time-line, typically caused by daylight savings"):new ei('ZoneOffset "'+o+'" is not valid for LocalDateTime "'+t+'" in zone "'+a+'"')}return new e(t,o,a)},e.ofLenient=function(t,o,a){if(gt(t,"localDateTime"),gt(o,"offset"),gt(a,"zone"),a instanceof Gi&&o.equals(a)===!1)throw new vi("ZoneId must match ZoneOffset");return new e(t,o,a)},e.from=function(t){if(gt(t,"temporal"),t instanceof e)return t;var o=Lo.from(t);if(t.isSupported(Oe.INSTANT_SECONDS)){var a=e._from(t,o);if(a!=null)return a}var s=ko.from(t);return e.of2(s,o)},e._from=function(t,o){try{return e.__from(t,o)}catch(a){if(!(a instanceof ei))throw a}},e.__from=function(t,o){var a=t.getLong(Oe.INSTANT_SECONDS),s=t.get(Oe.NANO_OF_SECOND);return e._create(a,s,o)},e.parse=function(t,o){return o===void 0&&(o=_n.ISO_ZONED_DATE_TIME),gt(o,"formatter"),o.parse(t,e.FROM)};function e(n,t,o){var a;return gt(n,"dateTime"),gt(t,"offset"),gt(o,"zone"),a=r.call(this)||this,a._dateTime=n,a._offset=t,a._zone=o,a}var i=e.prototype;return i._resolveLocal=function(t){return gt(t,"newDateTime"),e.ofLocal(t,this._zone,this._offset)},i._resolveInstant=function(t){return e.ofInstant3(t,this._offset,this._zone)},i._resolveOffset=function(t){return t.equals(this._offset)===!1&&this._zone.rules().isValidOffset(this._dateTime,t)?new e(this._dateTime,t,this._zone):this},i.isSupported=function(t){return t instanceof Oe?!0:t instanceof dt?t.isDateBased()||t.isTimeBased():t!=null&&t.isSupportedBy(this)},i.range=function(t){return t instanceof Oe?t===Oe.INSTANT_SECONDS||t===Oe.OFFSET_SECONDS?t.range():this._dateTime.range(t):t.rangeRefinedBy(this)},i.get=function(t){return this.getLong(t)},i.getLong=function(t){if(t instanceof Oe){switch(t){case Oe.INSTANT_SECONDS:return this.toEpochSecond();case Oe.OFFSET_SECONDS:return this._offset.totalSeconds()}return this._dateTime.getLong(t)}return gt(t,"field"),t.getFrom(this)},i.offset=function(){return this._offset},i.withEarlierOffsetAtOverlap=function(){var t=this._zone.rules().transition(this._dateTime);if(t!=null&&t.isOverlap()){var o=t.offsetBefore();if(o.equals(this._offset)===!1)return new e(this._dateTime,o,this._zone)}return this},i.withLaterOffsetAtOverlap=function(){var t=this._zone.rules().transition(this.toLocalDateTime());if(t!=null){var o=t.offsetAfter();if(o.equals(this._offset)===!1)return new e(this._dateTime,o,this._zone)}return this},i.zone=function(){return this._zone},i.withZoneSameLocal=function(t){return gt(t,"zone"),this._zone.equals(t)?this:e.ofLocal(this._dateTime,t,this._offset)},i.withZoneSameInstant=function(t){return gt(t,"zone"),this._zone.equals(t)?this:e._create(this._dateTime.toEpochSecond(this._offset),this._dateTime.nano(),t)},i.withFixedOffsetZone=function(){return this._zone.equals(this._offset)?this:new e(this._dateTime,this._offset,this._offset)},i.year=function(){return this._dateTime.year()},i.monthValue=function(){return this._dateTime.monthValue()},i.month=function(){return this._dateTime.month()},i.dayOfMonth=function(){return this._dateTime.dayOfMonth()},i.dayOfYear=function(){return this._dateTime.dayOfYear()},i.dayOfWeek=function(){return this._dateTime.dayOfWeek()},i.hour=function(){return this._dateTime.hour()},i.minute=function(){return this._dateTime.minute()},i.second=function(){return this._dateTime.second()},i.nano=function(){return this._dateTime.nano()},i._withAdjuster=function(t){if(t instanceof yi)return this._resolveLocal(ko.of(t,this._dateTime.toLocalTime()));if(t instanceof Wt)return this._resolveLocal(ko.of(this._dateTime.toLocalDate(),t));if(t instanceof ko)return this._resolveLocal(t);if(t instanceof ua){var o=t;return e._create(o.epochSecond(),o.nano(),this._zone)}else if(t instanceof Gi)return this._resolveOffset(t);return r.prototype._withAdjuster.call(this,t)},i._withField=function(t,o){if(t instanceof Oe){switch(t){case Oe.INSTANT_SECONDS:return e._create(o,this.nano(),this._zone);case Oe.OFFSET_SECONDS:{var a=Gi.ofTotalSeconds(t.checkValidIntValue(o));return this._resolveOffset(a)}}return this._resolveLocal(this._dateTime.with(t,o))}return t.adjustInto(this,o)},i.withYear=function(t){return this._resolveLocal(this._dateTime.withYear(t))},i.withMonth=function(t){return this._resolveLocal(this._dateTime.withMonth(t))},i.withDayOfMonth=function(t){return this._resolveLocal(this._dateTime.withDayOfMonth(t))},i.withDayOfYear=function(t){return this._resolveLocal(this._dateTime.withDayOfYear(t))},i.withHour=function(t){return this._resolveLocal(this._dateTime.withHour(t))},i.withMinute=function(t){return this._resolveLocal(this._dateTime.withMinute(t))},i.withSecond=function(t){return this._resolveLocal(this._dateTime.withSecond(t))},i.withNano=function(t){return this._resolveLocal(this._dateTime.withNano(t))},i.truncatedTo=function(t){return this._resolveLocal(this._dateTime.truncatedTo(t))},i._plusUnit=function(t,o){return o instanceof dt?o.isDateBased()?this._resolveLocal(this._dateTime.plus(t,o)):this._resolveInstant(this._dateTime.plus(t,o)):(gt(o,"unit"),o.addTo(this,t))},i.plusYears=function(t){return this._resolveLocal(this._dateTime.plusYears(t))},i.plusMonths=function(t){return this._resolveLocal(this._dateTime.plusMonths(t))},i.plusWeeks=function(t){return this._resolveLocal(this._dateTime.plusWeeks(t))},i.plusDays=function(t){return this._resolveLocal(this._dateTime.plusDays(t))},i.plusHours=function(t){return this._resolveInstant(this._dateTime.plusHours(t))},i.plusMinutes=function(t){return this._resolveInstant(this._dateTime.plusMinutes(t))},i.plusSeconds=function(t){return this._resolveInstant(this._dateTime.plusSeconds(t))},i.plusNanos=function(t){return this._resolveInstant(this._dateTime.plusNanos(t))},i._minusUnit=function(t,o){return this._plusUnit(-1*t,o)},i.minusYears=function(t){return this.plusYears(-1*t)},i.minusMonths=function(t){return this.plusMonths(-1*t)},i.minusWeeks=function(t){return this.plusWeeks(-1*t)},i.minusDays=function(t){return this.plusDays(-1*t)},i.minusHours=function(t){return this.plusHours(-1*t)},i.minusMinutes=function(t){return this.plusMinutes(-1*t)},i.minusSeconds=function(t){return this.plusSeconds(-1*t)},i.minusNanos=function(t){return this.plusNanos(-1*t)},i.query=function(t){return t===xr.localDate()?this.toLocalDate():(gt(t,"query"),r.prototype.query.call(this,t))},i.until=function(t,o){var a=e.from(t);if(o instanceof dt){if(a=a.withZoneSameInstant(this._zone),o.isDateBased())return this._dateTime.until(a._dateTime,o);var s=this._offset.totalSeconds()-a._offset.totalSeconds(),l=a._dateTime.plusSeconds(s);return this._dateTime.until(l,o)}return o.between(this,a)},i.toLocalDateTime=function(){return this._dateTime},i.toLocalDate=function(){return this._dateTime.toLocalDate()},i.toLocalTime=function(){return this._dateTime.toLocalTime()},i.toOffsetDateTime=function(){return mp.of(this._dateTime,this._offset)},i.equals=function(t){return this===t?!0:t instanceof e?this._dateTime.equals(t._dateTime)&&this._offset.equals(t._offset)&&this._zone.equals(t._zone):!1},i.hashCode=function(){return Ye.hashCode(this._dateTime.hashCode(),this._offset.hashCode(),this._zone.hashCode())},i.toString=function(){var t=this._dateTime.toString()+this._offset.toString();return this._offset!==this._zone&&(t+="["+this._zone.toString()+"]"),t},i.toJSON=function(){return this.toString()},i.format=function(t){return r.prototype.format.call(this,t)},e})(eEe);function $Xe(){_g.FROM=Nl("ZonedDateTime.FROM",function(r){return _g.from(r)})}var mp=(function(r){nn(e,r),e.from=function(t){if(gt(t,"temporal"),t instanceof e)return t;try{var o=Gi.from(t);try{var a=ko.from(t);return e.of(a,o)}catch{var s=ua.from(t);return e.ofInstant(s,o)}}catch{throw new ei("Unable to obtain OffsetDateTime TemporalAccessor: "+t+", type "+(t.constructor!=null?t.constructor.name:""))}},e.now=function(t){if(arguments.length===0)return e.now(da.systemDefaultZone());if(gt(t,"clockOrZone"),t instanceof Lo)return e.now(da.system(t));if(t instanceof da){var o=t.instant();return e.ofInstant(o,t.zone().rules().offset(o))}else throw new vi("clockOrZone must be an instance of ZoneId or Clock")},e.of=function(){return arguments.length<=2?e.ofDateTime.apply(this,arguments):arguments.length===3?e.ofDateAndTime.apply(this,arguments):e.ofNumbers.apply(this,arguments)},e.ofDateTime=function(t,o){return new e(t,o)},e.ofDateAndTime=function(t,o,a){var s=ko.of(t,o);return new e(s,a)},e.ofNumbers=function(t,o,a,s,l,u,c,d){s===void 0&&(s=0),l===void 0&&(l=0),u===void 0&&(u=0),c===void 0&&(c=0);var f=ko.of(t,o,a,s,l,u,c);return new e(f,d)},e.ofInstant=function(t,o){gt(t,"instant"),gt(o,"zone");var a=o.rules(),s=a.offset(t),l=ko.ofEpochSecond(t.epochSecond(),t.nano(),s);return new e(l,s)},e.parse=function(t,o){return o===void 0&&(o=_n.ISO_OFFSET_DATE_TIME),gt(o,"formatter"),o.parse(t,e.FROM)};function e(n,t){var o;return o=r.call(this)||this,gt(n,"dateTime"),gi(n,ko,"dateTime"),gt(t,"offset"),gi(t,Gi,"offset"),o._dateTime=n,o._offset=t,o}var i=e.prototype;return i.adjustInto=function(t){return t.with(Oe.EPOCH_DAY,this.toLocalDate().toEpochDay()).with(Oe.NANO_OF_DAY,this.toLocalTime().toNanoOfDay()).with(Oe.OFFSET_SECONDS,this.offset().totalSeconds())},i.until=function(t,o){var a=e.from(t);return o instanceof dt?(a=a.withOffsetSameInstant(this._offset),this._dateTime.until(a._dateTime,o)):o.between(this,a)},i.atZoneSameInstant=function(t){return _g.ofInstant(this._dateTime,this._offset,t)},i.atZoneSimilarLocal=function(t){return _g.ofLocal(this._dateTime,t,this._offset)},i.query=function(t){return gt(t,"query"),t===xr.chronology()?Mo.INSTANCE:t===xr.precision()?dt.NANOS:t===xr.offset()||t===xr.zone()?this.offset():t===xr.localDate()?this.toLocalDate():t===xr.localTime()?this.toLocalTime():t===xr.zoneId()?null:r.prototype.query.call(this,t)},i.get=function(t){if(t instanceof Oe){switch(t){case Oe.INSTANT_SECONDS:throw new ei("Field too large for an int: "+t);case Oe.OFFSET_SECONDS:return this.offset().totalSeconds()}return this._dateTime.get(t)}return r.prototype.get.call(this,t)},i.getLong=function(t){if(t instanceof Oe){switch(t){case Oe.INSTANT_SECONDS:return this.toEpochSecond();case Oe.OFFSET_SECONDS:return this.offset().totalSeconds()}return this._dateTime.getLong(t)}return t.getFrom(this)},i.offset=function(){return this._offset},i.year=function(){return this._dateTime.year()},i.monthValue=function(){return this._dateTime.monthValue()},i.month=function(){return this._dateTime.month()},i.dayOfMonth=function(){return this._dateTime.dayOfMonth()},i.dayOfYear=function(){return this._dateTime.dayOfYear()},i.dayOfWeek=function(){return this._dateTime.dayOfWeek()},i.hour=function(){return this._dateTime.hour()},i.minute=function(){return this._dateTime.minute()},i.second=function(){return this._dateTime.second()},i.nano=function(){return this._dateTime.nano()},i.toLocalDateTime=function(){return this._dateTime},i.toLocalDate=function(){return this._dateTime.toLocalDate()},i.toLocalTime=function(){return this._dateTime.toLocalTime()},i.toOffsetTime=function(){return xv.of(this._dateTime.toLocalTime(),this._offset)},i.toZonedDateTime=function(){return _g.of(this._dateTime,this._offset)},i.toInstant=function(){return this._dateTime.toInstant(this._offset)},i.toEpochSecond=function(){return this._dateTime.toEpochSecond(this._offset)},i.isSupported=function(t){return t instanceof Oe||t instanceof dt?t.isDateBased()||t.isTimeBased():t!=null&&t.isSupportedBy(this)},i.range=function(t){return t instanceof Oe?t===Oe.INSTANT_SECONDS||t===Oe.OFFSET_SECONDS?t.range():this._dateTime.range(t):t.rangeRefinedBy(this)},i._withAdjuster=function(t){return gt(t),t instanceof yi||t instanceof Wt||t instanceof ko?this._withDateTimeOffset(this._dateTime.with(t),this._offset):t instanceof ua?e.ofInstant(t,this._offset):t instanceof Gi?this._withDateTimeOffset(this._dateTime,t):t instanceof e?t:t.adjustInto(this)},i._withField=function(t,o){if(gt(t),t instanceof Oe){var a=t;switch(a){case Oe.INSTANT_SECONDS:return e.ofInstant(ua.ofEpochSecond(o,this.nano()),this._offset);case Oe.OFFSET_SECONDS:return this._withDateTimeOffset(this._dateTime,Gi.ofTotalSeconds(a.checkValidIntValue(o)))}return this._withDateTimeOffset(this._dateTime.with(t,o),this._offset)}return t.adjustInto(this,o)},i._withDateTimeOffset=function(t,o){return this._dateTime===t&&this._offset.equals(o)?this:new e(t,o)},i.withYear=function(t){return this._withDateTimeOffset(this._dateTime.withYear(t),this._offset)},i.withMonth=function(t){return this._withDateTimeOffset(this._dateTime.withMonth(t),this._offset)},i.withDayOfMonth=function(t){return this._withDateTimeOffset(this._dateTime.withDayOfMonth(t),this._offset)},i.withDayOfYear=function(t){return this._withDateTimeOffset(this._dateTime.withDayOfYear(t),this._offset)},i.withHour=function(t){return this._withDateTimeOffset(this._dateTime.withHour(t),this._offset)},i.withMinute=function(t){return this._withDateTimeOffset(this._dateTime.withMinute(t),this._offset)},i.withSecond=function(t){return this._withDateTimeOffset(this._dateTime.withSecond(t),this._offset)},i.withNano=function(t){return this._withDateTimeOffset(this._dateTime.withNano(t),this._offset)},i.withOffsetSameLocal=function(t){return gt(t,"offset"),this._withDateTimeOffset(this._dateTime,t)},i.withOffsetSameInstant=function(t){if(gt(t,"offset"),t.equals(this._offset))return this;var o=t.totalSeconds()-this._offset.totalSeconds(),a=this._dateTime.plusSeconds(o);return new e(a,t)},i.truncatedTo=function(t){return this._withDateTimeOffset(this._dateTime.truncatedTo(t),this._offset)},i._plusAmount=function(t){return gt(t,"amount"),t.addTo(this)},i._plusUnit=function(t,o){return o instanceof dt?this._withDateTimeOffset(this._dateTime.plus(t,o),this._offset):o.addTo(this,t)},i.plusYears=function(t){return this._withDateTimeOffset(this._dateTime.plusYears(t),this._offset)},i.plusMonths=function(t){return this._withDateTimeOffset(this._dateTime.plusMonths(t),this._offset)},i.plusWeeks=function(t){return this._withDateTimeOffset(this._dateTime.plusWeeks(t),this._offset)},i.plusDays=function(t){return this._withDateTimeOffset(this._dateTime.plusDays(t),this._offset)},i.plusHours=function(t){return this._withDateTimeOffset(this._dateTime.plusHours(t),this._offset)},i.plusMinutes=function(t){return this._withDateTimeOffset(this._dateTime.plusMinutes(t),this._offset)},i.plusSeconds=function(t){return this._withDateTimeOffset(this._dateTime.plusSeconds(t),this._offset)},i.plusNanos=function(t){return this._withDateTimeOffset(this._dateTime.plusNanos(t),this._offset)},i._minusAmount=function(t){return gt(t),t.subtractFrom(this)},i._minusUnit=function(t,o){return this.plus(-1*t,o)},i.minusYears=function(t){return this._withDateTimeOffset(this._dateTime.minusYears(t),this._offset)},i.minusMonths=function(t){return this._withDateTimeOffset(this._dateTime.minusMonths(t),this._offset)},i.minusWeeks=function(t){return this._withDateTimeOffset(this._dateTime.minusWeeks(t),this._offset)},i.minusDays=function(t){return this._withDateTimeOffset(this._dateTime.minusDays(t),this._offset)},i.minusHours=function(t){return this._withDateTimeOffset(this._dateTime.minusHours(t),this._offset)},i.minusMinutes=function(t){return this._withDateTimeOffset(this._dateTime.minusMinutes(t),this._offset)},i.minusSeconds=function(t){return this._withDateTimeOffset(this._dateTime.minusSeconds(t),this._offset)},i.minusNanos=function(t){return this._withDateTimeOffset(this._dateTime.minusNanos(t),this._offset)},i.compareTo=function(t){if(gt(t,"other"),gi(t,e,"other"),this.offset().equals(t.offset()))return this.toLocalDateTime().compareTo(t.toLocalDateTime());var o=Ye.compareNumbers(this.toEpochSecond(),t.toEpochSecond());return o===0&&(o=this.toLocalTime().nano()-t.toLocalTime().nano(),o===0&&(o=this.toLocalDateTime().compareTo(t.toLocalDateTime()))),o},i.isAfter=function(t){gt(t,"other");var o=this.toEpochSecond(),a=t.toEpochSecond();return o>a||o===a&&this.toLocalTime().nano()>t.toLocalTime().nano()},i.isBefore=function(t){gt(t,"other");var o=this.toEpochSecond(),a=t.toEpochSecond();return o<a||o===a&&this.toLocalTime().nano()<t.toLocalTime().nano()},i.isEqual=function(t){return gt(t,"other"),this.toEpochSecond()===t.toEpochSecond()&&this.toLocalTime().nano()===t.toLocalTime().nano()},i.equals=function(t){return this===t?!0:t instanceof e?this._dateTime.equals(t._dateTime)&&this._offset.equals(t._offset):!1},i.hashCode=function(){return this._dateTime.hashCode()^this._offset.hashCode()},i.toString=function(){return this._dateTime.toString()+this._offset.toString()},i.toJSON=function(){return this.toString()},i.format=function(t){return gt(t,"formatter"),t.format(this)},e})(Rf);function qXe(){mp.MIN=ko.MIN.atOffset(Gi.MAX),mp.MAX=ko.MAX.atOffset(Gi.MIN),mp.FROM=Nl("OffsetDateTime.FROM",function(r){return mp.from(r)})}var mV=146097,Vde=mV*5-(30*365+7),yi=(function(r){nn(e,r),e.now=function(t){var o;return t==null?o=da.systemDefaultZone():t instanceof Lo?o=da.system(t):o=t,e.ofInstant(o.instant(),o.zone())},e.ofInstant=function(t,o){o===void 0&&(o=Lo.systemDefault()),gt(t,"instant");var a=o.rules().offset(t),s=t.epochSecond()+a.totalSeconds(),l=Ye.floorDiv(s,Wt.SECONDS_PER_DAY);return e.ofEpochDay(l)},e.of=function(t,o,a){return new e(t,o,a)},e.ofYearDay=function(t,o){Oe.YEAR.checkValidValue(t);var a=Mo.isLeapYear(t);o===366&&a===!1&&Go(!1,"Invalid date 'DayOfYear 366' as '"+t+"' is not a leap year",ei);var s=Bi.of(Math.floor((o-1)/31+1)),l=s.firstDayOfYear(a)+s.length(a)-1;o>l&&(s=s.plus(1));var u=o-s.firstDayOfYear(a)+1;return new e(t,s.value(),u)},e.ofEpochDay=function(t){t===void 0&&(t=0);var o,a,s,l,u;u=t+Vde,u-=60,o=0,u<0&&(a=Ye.intDiv(u+1,mV)-1,o=a*400,u+=-a*mV),l=Ye.intDiv(400*u+591,mV),s=u-(365*l+Ye.intDiv(l,4)-Ye.intDiv(l,100)+Ye.intDiv(l,400)),s<0&&(l--,s=u-(365*l+Ye.intDiv(l,4)-Ye.intDiv(l,100)+Ye.intDiv(l,400))),l+=o;var c=s,d=Ye.intDiv(c*5+2,153),f=(d+2)%12+1,h=c-Ye.intDiv(d*306+5,10)+1;l+=Ye.intDiv(d,10);var p=l;return new e(p,f,h)},e.from=function(t){gt(t,"temporal");var o=t.query(xr.localDate());if(o==null)throw new ei("Unable to obtain LocalDate from TemporalAccessor: "+t+", type "+(t.constructor!=null?t.constructor.name:""));return o},e.parse=function(t,o){return o===void 0&&(o=_n.ISO_LOCAL_DATE),Go(o!=null,"formatter",U0),o.parse(t,e.FROM)},e._resolvePreviousValid=function(t,o,a){switch(o){case 2:a=Math.min(a,Mo.isLeapYear(t)?29:28);break;case 4:case 6:case 9:case 11:a=Math.min(a,30);break}return e.of(t,o,a)};function e(n,t,o){var a;return a=r.call(this)||this,gt(n,"year"),gt(t,"month"),gt(o,"dayOfMonth"),t instanceof Bi&&(t=t.value()),a._year=Ye.safeToInt(n),a._month=Ye.safeToInt(t),a._day=Ye.safeToInt(o),e._validate(a._year,a._month,a._day),a}e._validate=function(t,o,a){var s;if(Oe.YEAR.checkValidValue(t),Oe.MONTH_OF_YEAR.checkValidValue(o),Oe.DAY_OF_MONTH.checkValidValue(a),a>28){switch(s=31,o){case 2:s=Mo.isLeapYear(t)?29:28;break;case 4:case 6:case 9:case 11:s=30}a>s&&(a===29?Go(!1,"Invalid date 'February 29' as '"+t+"' is not a leap year",ei):Go(!1,"Invalid date '"+t+"' '"+o+"' '"+a+"'",ei))}};var i=e.prototype;return i.isSupported=function(t){return r.prototype.isSupported.call(this,t)},i.range=function(t){if(t instanceof Oe){if(t.isDateBased()){switch(t){case Oe.DAY_OF_MONTH:return en.of(1,this.lengthOfMonth());case Oe.DAY_OF_YEAR:return en.of(1,this.lengthOfYear());case Oe.ALIGNED_WEEK_OF_MONTH:return en.of(1,this.month()===Bi.FEBRUARY&&this.isLeapYear()===!1?4:5);case Oe.YEAR_OF_ERA:return this._year<=0?en.of(1,yg.MAX_VALUE+1):en.of(1,yg.MAX_VALUE)}return t.range()}throw new kn("Unsupported field: "+t)}return t.rangeRefinedBy(this)},i.get=function(t){return this.getLong(t)},i.getLong=function(t){return Go(t!=null,"",U0),t instanceof Oe?this._get0(t):t.getFrom(this)},i._get0=function(t){switch(t){case Oe.DAY_OF_WEEK:return this.dayOfWeek().value();case Oe.ALIGNED_DAY_OF_WEEK_IN_MONTH:return Ye.intMod(this._day-1,7)+1;case Oe.ALIGNED_DAY_OF_WEEK_IN_YEAR:return Ye.intMod(this.dayOfYear()-1,7)+1;case Oe.DAY_OF_MONTH:return this._day;case Oe.DAY_OF_YEAR:return this.dayOfYear();case Oe.EPOCH_DAY:return this.toEpochDay();case Oe.ALIGNED_WEEK_OF_MONTH:return Ye.intDiv(this._day-1,7)+1;case Oe.ALIGNED_WEEK_OF_YEAR:return Ye.intDiv(this.dayOfYear()-1,7)+1;case Oe.MONTH_OF_YEAR:return this._month;case Oe.PROLEPTIC_MONTH:return this._prolepticMonth();case Oe.YEAR_OF_ERA:return this._year>=1?this._year:1-this._year;case Oe.YEAR:return this._year;case Oe.ERA:return this._year>=1?1:0}throw new kn("Unsupported field: "+t)},i._prolepticMonth=function(){return this._year*12+(this._month-1)},i.chronology=function(){return Mo.INSTANCE},i.year=function(){return this._year},i.monthValue=function(){return this._month},i.month=function(){return Bi.of(this._month)},i.dayOfMonth=function(){return this._day},i.dayOfYear=function(){return this.month().firstDayOfYear(this.isLeapYear())+this._day-1},i.dayOfWeek=function(){var t=Ye.floorMod(this.toEpochDay()+3,7);return Sa.of(t+1)},i.isLeapYear=function(){return Mo.isLeapYear(this._year)},i.lengthOfMonth=function(){switch(this._month){case 2:return this.isLeapYear()?29:28;case 4:case 6:case 9:case 11:return 30;default:return 31}},i.lengthOfYear=function(){return this.isLeapYear()?366:365},i._withAdjuster=function(t){return gt(t,"adjuster"),t instanceof e?t:r.prototype._withAdjuster.call(this,t)},i._withField=function(t,o){if(Go(t!=null,"field",U0),t instanceof Oe){var a=t;switch(a.checkValidValue(o),a){case Oe.DAY_OF_WEEK:return this.plusDays(o-this.dayOfWeek().value());case Oe.ALIGNED_DAY_OF_WEEK_IN_MONTH:return this.plusDays(o-this.getLong(Oe.ALIGNED_DAY_OF_WEEK_IN_MONTH));case Oe.ALIGNED_DAY_OF_WEEK_IN_YEAR:return this.plusDays(o-this.getLong(Oe.ALIGNED_DAY_OF_WEEK_IN_YEAR));case Oe.DAY_OF_MONTH:return this.withDayOfMonth(o);case Oe.DAY_OF_YEAR:return this.withDayOfYear(o);case Oe.EPOCH_DAY:return e.ofEpochDay(o);case Oe.ALIGNED_WEEK_OF_MONTH:return this.plusWeeks(o-this.getLong(Oe.ALIGNED_WEEK_OF_MONTH));case Oe.ALIGNED_WEEK_OF_YEAR:return this.plusWeeks(o-this.getLong(Oe.ALIGNED_WEEK_OF_YEAR));case Oe.MONTH_OF_YEAR:return this.withMonth(o);case Oe.PROLEPTIC_MONTH:return this.plusMonths(o-this.getLong(Oe.PROLEPTIC_MONTH));case Oe.YEAR_OF_ERA:return this.withYear(this._year>=1?o:1-o);case Oe.YEAR:return this.withYear(o);case Oe.ERA:return this.getLong(Oe.ERA)===o?this:this.withYear(1-this._year)}throw new kn("Unsupported field: "+t)}return t.adjustInto(this,o)},i.withYear=function(t){return this._year===t?this:(Oe.YEAR.checkValidValue(t),e._resolvePreviousValid(t,this._month,this._day))},i.withMonth=function(t){var o=t instanceof Bi?t.value():t;return this._month===o?this:(Oe.MONTH_OF_YEAR.checkValidValue(o),e._resolvePreviousValid(this._year,o,this._day))},i.withDayOfMonth=function(t){return this._day===t?this:e.of(this._year,this._month,t)},i.withDayOfYear=function(t){return this.dayOfYear()===t?this:e.ofYearDay(this._year,t)},i._plusUnit=function(t,o){if(gt(t,"amountToAdd"),gt(o,"unit"),o instanceof dt){switch(o){case dt.DAYS:return this.plusDays(t);case dt.WEEKS:return this.plusWeeks(t);case dt.MONTHS:return this.plusMonths(t);case dt.YEARS:return this.plusYears(t);case dt.DECADES:return this.plusYears(Ye.safeMultiply(t,10));case dt.CENTURIES:return this.plusYears(Ye.safeMultiply(t,100));case dt.MILLENNIA:return this.plusYears(Ye.safeMultiply(t,1e3));case dt.ERAS:return this.with(Oe.ERA,Ye.safeAdd(this.getLong(Oe.ERA),t))}throw new kn("Unsupported unit: "+o)}return o.addTo(this,t)},i.plusYears=function(t){if(t===0)return this;var o=Oe.YEAR.checkValidIntValue(this._year+t);return e._resolvePreviousValid(o,this._month,this._day)},i.plusMonths=function(t){if(t===0)return this;var o=this._year*12+(this._month-1),a=o+t,s=Oe.YEAR.checkValidIntValue(Ye.floorDiv(a,12)),l=Ye.floorMod(a,12)+1;return e._resolvePreviousValid(s,l,this._day)},i.plusWeeks=function(t){return this.plusDays(Ye.safeMultiply(t,7))},i.plusDays=function(t){if(t===0)return this;var o=Ye.safeAdd(this.toEpochDay(),t);return e.ofEpochDay(o)},i._minusUnit=function(t,o){return gt(t,"amountToSubtract"),gt(o,"unit"),this._plusUnit(-1*t,o)},i.minusYears=function(t){return this.plusYears(t*-1)},i.minusMonths=function(t){return this.plusMonths(t*-1)},i.minusWeeks=function(t){return this.plusWeeks(t*-1)},i.minusDays=function(t){return this.plusDays(t*-1)},i.query=function(t){return gt(t,"query"),t===xr.localDate()?this:r.prototype.query.call(this,t)},i.adjustInto=function(t){return r.prototype.adjustInto.call(this,t)},i.until=function(t,o){return arguments.length<2?this.until1(t):this.until2(t,o)},i.until2=function(t,o){var a=e.from(t);if(o instanceof dt){switch(o){case dt.DAYS:return this.daysUntil(a);case dt.WEEKS:return Ye.intDiv(this.daysUntil(a),7);case dt.MONTHS:return this._monthsUntil(a);case dt.YEARS:return Ye.intDiv(this._monthsUntil(a),12);case dt.DECADES:return Ye.intDiv(this._monthsUntil(a),120);case dt.CENTURIES:return Ye.intDiv(this._monthsUntil(a),1200);case dt.MILLENNIA:return Ye.intDiv(this._monthsUntil(a),12e3);case dt.ERAS:return a.getLong(Oe.ERA)-this.getLong(Oe.ERA)}throw new kn("Unsupported unit: "+o)}return o.between(this,a)},i.daysUntil=function(t){return t.toEpochDay()-this.toEpochDay()},i._monthsUntil=function(t){var o=this._prolepticMonth()*32+this.dayOfMonth(),a=t._prolepticMonth()*32+t.dayOfMonth();return Ye.intDiv(a-o,32)},i.until1=function(t){var o=e.from(t),a=o._prolepticMonth()-this._prolepticMonth(),s=o._day-this._day;if(a>0&&s<0){a--;var l=this.plusMonths(a);s=o.toEpochDay()-l.toEpochDay()}else a<0&&s>0&&(a++,s-=o.lengthOfMonth());var u=Ye.intDiv(a,12),c=Ye.intMod(a,12);return I0.of(u,c,s)},i.atTime=function(){return arguments.length===1?this.atTime1.apply(this,arguments):this.atTime4.apply(this,arguments)},i.atTime1=function(t){if(gt(t,"time"),t instanceof Wt)return ko.of(this,t);if(t instanceof xv)return this._atTimeOffsetTime(t);throw new vi("time must be an instance of LocalTime or OffsetTime"+(t&&t.constructor&&t.constructor.name?", but is "+t.constructor.name:""))},i.atTime4=function(t,o,a,s){return a===void 0&&(a=0),s===void 0&&(s=0),this.atTime1(Wt.of(t,o,a,s))},i._atTimeOffsetTime=function(t){return mp.of(ko.of(this,t.toLocalTime()),t.offset())},i.atStartOfDay=function(t){return t!=null?this._atStartOfDayWithZone(t):ko.of(this,Wt.MIDNIGHT)},i._atStartOfDayWithZone=function(t){gt(t,"zone");var o=this.atTime(Wt.MIDNIGHT);if(!(t instanceof Gi)){var a=t.rules().transition(o);a!=null&&a.isGap()&&(o=a.dateTimeAfter())}return _g.of(o,t)},i.toEpochDay=function(){var t=this._year,o=this._month,a=0;return a+=365*t,t>=0?a+=Ye.intDiv(t+3,4)-Ye.intDiv(t+99,100)+Ye.intDiv(t+399,400):a-=Ye.intDiv(t,-4)-Ye.intDiv(t,-100)+Ye.intDiv(t,-400),a+=Ye.intDiv(367*o-362,12),a+=this.dayOfMonth()-1,o>2&&(a--,Mo.isLeapYear(t)||a--),a-Vde},i.compareTo=function(t){return gt(t,"other"),gi(t,e,"other"),this._compareTo0(t)},i._compareTo0=function(t){var o=this._year-t._year;return o===0&&(o=this._month-t._month,o===0&&(o=this._day-t._day)),o},i.isAfter=function(t){return this.compareTo(t)>0},i.isBefore=function(t){return this.compareTo(t)<0},i.isEqual=function(t){return this.compareTo(t)===0},i.equals=function(t){return this===t?!0:t instanceof e?this._compareTo0(t)===0:!1},i.hashCode=function(){var t=this._year,o=this._month,a=this._day;return Ye.hash(t&4294965248^(t<<11)+(o<<6)+a)},i.toString=function(){var t,o,a,s=this._year,l=this._month,u=this._day,c=Math.abs(s);return c<1e3?s<0?a="-"+(""+(s-1e4)).slice(-4):a=(""+(s+1e4)).slice(-4):s>9999?a="+"+s:a=""+s,l<10?o="-0"+l:o="-"+l,u<10?t="-0"+u:t="-"+u,a+o+t},i.toJSON=function(){return this.toString()},i.format=function(t){return gt(t,"formatter"),gi(t,_n,"formatter"),r.prototype.format.call(this,t)},e})(dF);function XXe(){yi.MIN=yi.of(Af.MIN_VALUE,1,1),yi.MAX=yi.of(Af.MAX_VALUE,12,31),yi.EPOCH_0=yi.ofEpochDay(0),yi.FROM=Nl("LocalDate.FROM",function(r){return yi.from(r)})}var tEe=(function(r){nn(e,r);function e(){return r.apply(this,arguments)||this}var i=e.prototype;return i.chronology=function(){return this.toLocalDate().chronology()},i.query=function(t){return t===xr.chronology()?this.chronology():t===xr.precision()?dt.NANOS:t===xr.localDate()?yi.ofEpochDay(this.toLocalDate().toEpochDay()):t===xr.localTime()?this.toLocalTime():t===xr.zone()||t===xr.zoneId()||t===xr.offset()?null:r.prototype.query.call(this,t)},i.adjustInto=function(t){return t.with(Oe.EPOCH_DAY,this.toLocalDate().toEpochDay()).with(Oe.NANO_OF_DAY,this.toLocalTime().toNanoOfDay())},i.toInstant=function(t){return gi(t,Gi,"zoneId"),ua.ofEpochSecond(this.toEpochSecond(t),this.toLocalTime().nano())},i.toEpochSecond=function(t){gt(t,"offset");var o=this.toLocalDate().toEpochDay(),a=o*86400+this.toLocalTime().toSecondOfDay();return a-=t.totalSeconds(),Ye.safeToInt(a)},e})(Rf),ko=(function(r){nn(e,r),e.now=function(t){return t==null?e._now(da.systemDefaultZone()):t instanceof da?e._now(t):e._now(da.system(t))},e._now=function(t){return gt(t,"clock"),e.ofInstant(t.instant(),t.zone())},e._ofEpochMillis=function(t,o){var a=Ye.floorDiv(t,1e3)+o.totalSeconds(),s=Ye.floorDiv(a,Wt.SECONDS_PER_DAY),l=Ye.floorMod(a,Wt.SECONDS_PER_DAY),u=Ye.floorMod(t,1e3)*1e6,c=yi.ofEpochDay(s),d=Wt.ofSecondOfDay(l,u);return new e(c,d)},e.of=function(){return arguments.length<=2?e.ofDateAndTime.apply(this,arguments):e.ofNumbers.apply(this,arguments)},e.ofNumbers=function(t,o,a,s,l,u,c){s===void 0&&(s=0),l===void 0&&(l=0),u===void 0&&(u=0),c===void 0&&(c=0);var d=yi.of(t,o,a),f=Wt.of(s,l,u,c);return new e(d,f)},e.ofDateAndTime=function(t,o){return gt(t,"date"),gt(o,"time"),new e(t,o)},e.ofInstant=function(t,o){o===void 0&&(o=Lo.systemDefault()),gt(t,"instant"),gi(t,ua,"instant"),gt(o,"zone");var a=o.rules().offset(t);return e.ofEpochSecond(t.epochSecond(),t.nano(),a)},e.ofEpochSecond=function(t,o,a){t===void 0&&(t=0),o===void 0&&(o=0),arguments.length===2&&o instanceof Gi&&(a=o,o=0),gt(a,"offset");var s=t+a.totalSeconds(),l=Ye.floorDiv(s,Wt.SECONDS_PER_DAY),u=Ye.floorMod(s,Wt.SECONDS_PER_DAY),c=yi.ofEpochDay(l),d=Wt.ofSecondOfDay(u,o);return new e(c,d)},e.from=function(t){if(gt(t,"temporal"),t instanceof e)return t;if(t instanceof _g)return t.toLocalDateTime();try{var o=yi.from(t),a=Wt.from(t);return new e(o,a)}catch{throw new ei("Unable to obtain LocalDateTime TemporalAccessor: "+t+", type "+(t.constructor!=null?t.constructor.name:""))}},e.parse=function(t,o){return o===void 0&&(o=_n.ISO_LOCAL_DATE_TIME),gt(o,"formatter"),o.parse(t,e.FROM)};function e(n,t){var o;return o=r.call(this)||this,gi(n,yi,"date"),gi(t,Wt,"time"),o._date=n,o._time=t,o}var i=e.prototype;return i._withDateTime=function(t,o){return this._date.equals(t)&&this._time.equals(o)?this:new e(t,o)},i.isSupported=function(t){return t instanceof Oe||t instanceof dt?t.isDateBased()||t.isTimeBased():t!=null&&t.isSupportedBy(this)},i.range=function(t){return t instanceof Oe?t.isTimeBased()?this._time.range(t):this._date.range(t):t.rangeRefinedBy(this)},i.get=function(t){return t instanceof Oe?t.isTimeBased()?this._time.get(t):this._date.get(t):r.prototype.get.call(this,t)},i.getLong=function(t){return gt(t,"field"),t instanceof Oe?t.isTimeBased()?this._time.getLong(t):this._date.getLong(t):t.getFrom(this)},i.year=function(){return this._date.year()},i.monthValue=function(){return this._date.monthValue()},i.month=function(){return this._date.month()},i.dayOfMonth=function(){return this._date.dayOfMonth()},i.dayOfYear=function(){return this._date.dayOfYear()},i.dayOfWeek=function(){return this._date.dayOfWeek()},i.hour=function(){return this._time.hour()},i.minute=function(){return this._time.minute()},i.second=function(){return this._time.second()},i.nano=function(){return this._time.nano()},i._withAdjuster=function(t){return gt(t,"adjuster"),t instanceof yi?this._withDateTime(t,this._time):t instanceof Wt?this._withDateTime(this._date,t):t instanceof e?t:r.prototype._withAdjuster.call(this,t)},i._withField=function(t,o){return gt(t,"field"),t instanceof Oe?t.isTimeBased()?this._withDateTime(this._date,this._time.with(t,o)):this._withDateTime(this._date.with(t,o),this._time):t.adjustInto(this,o)},i.withYear=function(t){return this._withDateTime(this._date.withYear(t),this._time)},i.withMonth=function(t){return this._withDateTime(this._date.withMonth(t),this._time)},i.withDayOfMonth=function(t){return this._withDateTime(this._date.withDayOfMonth(t),this._time)},i.withDayOfYear=function(t){return this._withDateTime(this._date.withDayOfYear(t),this._time)},i.withHour=function(t){var o=this._time.withHour(t);return this._withDateTime(this._date,o)},i.withMinute=function(t){var o=this._time.withMinute(t);return this._withDateTime(this._date,o)},i.withSecond=function(t){var o=this._time.withSecond(t);return this._withDateTime(this._date,o)},i.withNano=function(t){var o=this._time.withNano(t);return this._withDateTime(this._date,o)},i.truncatedTo=function(t){return this._withDateTime(this._date,this._time.truncatedTo(t))},i._plusUnit=function(t,o){if(gt(o,"unit"),o instanceof dt){switch(o){case dt.NANOS:return this.plusNanos(t);case dt.MICROS:return this.plusDays(Ye.intDiv(t,Wt.MICROS_PER_DAY)).plusNanos(Ye.intMod(t,Wt.MICROS_PER_DAY)*1e3);case dt.MILLIS:return this.plusDays(Ye.intDiv(t,Wt.MILLIS_PER_DAY)).plusNanos(Ye.intMod(t,Wt.MILLIS_PER_DAY)*1e6);case dt.SECONDS:return this.plusSeconds(t);case dt.MINUTES:return this.plusMinutes(t);case dt.HOURS:return this.plusHours(t);case dt.HALF_DAYS:return this.plusDays(Ye.intDiv(t,256)).plusHours(Ye.intMod(t,256)*12)}return this._withDateTime(this._date.plus(t,o),this._time)}return o.addTo(this,t)},i.plusYears=function(t){var o=this._date.plusYears(t);return this._withDateTime(o,this._time)},i.plusMonths=function(t){var o=this._date.plusMonths(t);return this._withDateTime(o,this._time)},i.plusWeeks=function(t){var o=this._date.plusWeeks(t);return this._withDateTime(o,this._time)},i.plusDays=function(t){var o=this._date.plusDays(t);return this._withDateTime(o,this._time)},i.plusHours=function(t){return this._plusWithOverflow(this._date,t,0,0,0,1)},i.plusMinutes=function(t){return this._plusWithOverflow(this._date,0,t,0,0,1)},i.plusSeconds=function(t){return this._plusWithOverflow(this._date,0,0,t,0,1)},i.plusNanos=function(t){return this._plusWithOverflow(this._date,0,0,0,t,1)},i._minusUnit=function(t,o){return gt(o,"unit"),this._plusUnit(-1*t,o)},i.minusYears=function(t){return this.plusYears(-1*t)},i.minusMonths=function(t){return this.plusMonths(-1*t)},i.minusWeeks=function(t){return this.plusWeeks(-1*t)},i.minusDays=function(t){return this.plusDays(-1*t)},i.minusHours=function(t){return this._plusWithOverflow(this._date,t,0,0,0,-1)},i.minusMinutes=function(t){return this._plusWithOverflow(this._date,0,t,0,0,-1)},i.minusSeconds=function(t){return this._plusWithOverflow(this._date,0,0,t,0,-1)},i.minusNanos=function(t){return this._plusWithOverflow(this._date,0,0,0,t,-1)},i._plusWithOverflow=function(t,o,a,s,l,u){if(o===0&&a===0&&s===0&&l===0)return this._withDateTime(t,this._time);var c=Ye.intDiv(l,Wt.NANOS_PER_DAY)+Ye.intDiv(s,Wt.SECONDS_PER_DAY)+Ye.intDiv(a,Wt.MINUTES_PER_DAY)+Ye.intDiv(o,Wt.HOURS_PER_DAY);c*=u;var d=Ye.intMod(l,Wt.NANOS_PER_DAY)+Ye.intMod(s,Wt.SECONDS_PER_DAY)*Wt.NANOS_PER_SECOND+Ye.intMod(a,Wt.MINUTES_PER_DAY)*Wt.NANOS_PER_MINUTE+Ye.intMod(o,Wt.HOURS_PER_DAY)*Wt.NANOS_PER_HOUR,f=this._time.toNanoOfDay();d=d*u+f,c+=Ye.floorDiv(d,Wt.NANOS_PER_DAY);var h=Ye.floorMod(d,Wt.NANOS_PER_DAY),p=h===f?this._time:Wt.ofNanoOfDay(h);return this._withDateTime(t.plusDays(c),p)},i.query=function(t){return gt(t,"query"),t===xr.localDate()?this.toLocalDate():r.prototype.query.call(this,t)},i.adjustInto=function(t){return r.prototype.adjustInto.call(this,t)},i.until=function(t,o){gt(t,"endExclusive"),gt(o,"unit");var a=e.from(t);if(o instanceof dt){if(o.isTimeBased()){var s=this._date.daysUntil(a._date),l=a._time.toNanoOfDay()-this._time.toNanoOfDay();s>0&&l<0?(s--,l+=Wt.NANOS_PER_DAY):s<0&&l>0&&(s++,l-=Wt.NANOS_PER_DAY);var u=s;switch(o){case dt.NANOS:return u=Ye.safeMultiply(u,Wt.NANOS_PER_DAY),Ye.safeAdd(u,l);case dt.MICROS:return u=Ye.safeMultiply(u,Wt.MICROS_PER_DAY),Ye.safeAdd(u,Ye.intDiv(l,1e3));case dt.MILLIS:return u=Ye.safeMultiply(u,Wt.MILLIS_PER_DAY),Ye.safeAdd(u,Ye.intDiv(l,1e6));case dt.SECONDS:return u=Ye.safeMultiply(u,Wt.SECONDS_PER_DAY),Ye.safeAdd(u,Ye.intDiv(l,Wt.NANOS_PER_SECOND));case dt.MINUTES:return u=Ye.safeMultiply(u,Wt.MINUTES_PER_DAY),Ye.safeAdd(u,Ye.intDiv(l,Wt.NANOS_PER_MINUTE));case dt.HOURS:return u=Ye.safeMultiply(u,Wt.HOURS_PER_DAY),Ye.safeAdd(u,Ye.intDiv(l,Wt.NANOS_PER_HOUR));case dt.HALF_DAYS:return u=Ye.safeMultiply(u,2),Ye.safeAdd(u,Ye.intDiv(l,Wt.NANOS_PER_HOUR*12))}throw new kn("Unsupported unit: "+o)}var c=a._date,d=a._time;return c.isAfter(this._date)&&d.isBefore(this._time)?c=c.minusDays(1):c.isBefore(this._date)&&d.isAfter(this._time)&&(c=c.plusDays(1)),this._date.until(c,o)}return o.between(this,a)},i.atOffset=function(t){return mp.of(this,t)},i.atZone=function(t){return _g.of(this,t)},i.toLocalDate=function(){return this._date},i.toLocalTime=function(){return this._time},i.compareTo=function(t){return gt(t,"other"),gi(t,e,"other"),this._compareTo0(t)},i._compareTo0=function(t){var o=this._date.compareTo(t.toLocalDate());return o===0&&(o=this._time.compareTo(t.toLocalTime())),o},i.isAfter=function(t){return this.compareTo(t)>0},i.isBefore=function(t){return this.compareTo(t)<0},i.isEqual=function(t){return this.compareTo(t)===0},i.equals=function(t){return this===t?!0:t instanceof e?this._date.equals(t._date)&&this._time.equals(t._time):!1},i.hashCode=function(){return this._date.hashCode()^this._time.hashCode()},i.toString=function(){return this._date.toString()+"T"+this._time.toString()},i.toJSON=function(){return this.toString()},i.format=function(t){return gt(t,"formatter"),t.format(this)},e})(tEe);function KXe(){ko.MIN=ko.of(yi.MIN,Wt.MIN),ko.MAX=ko.of(yi.MAX,Wt.MAX),ko.FROM=Nl("LocalDateTime.FROM",function(r){return ko.from(r)})}var Wt=(function(r){nn(e,r),e.now=function(t){return t==null?e._now(da.systemDefaultZone()):t instanceof da?e._now(t):e._now(da.system(t))},e._now=function(t){return t===void 0&&(t=da.systemDefaultZone()),gt(t,"clock"),e.ofInstant(t.instant(),t.zone())},e.ofInstant=function(t,o){o===void 0&&(o=Lo.systemDefault());var a=o.rules().offset(t),s=Ye.intMod(t.epochSecond(),e.SECONDS_PER_DAY);return s=Ye.intMod(s+a.totalSeconds(),e.SECONDS_PER_DAY),s<0&&(s+=e.SECONDS_PER_DAY),e.ofSecondOfDay(s,t.nano())},e.of=function(t,o,a,s){return new e(t,o,a,s)},e.ofSecondOfDay=function(t,o){t===void 0&&(t=0),o===void 0&&(o=0),Oe.SECOND_OF_DAY.checkValidValue(t),Oe.NANO_OF_SECOND.checkValidValue(o);var a=Ye.intDiv(t,e.SECONDS_PER_HOUR);t-=a*e.SECONDS_PER_HOUR;var s=Ye.intDiv(t,e.SECONDS_PER_MINUTE);return t-=s*e.SECONDS_PER_MINUTE,new e(a,s,t,o)},e.ofNanoOfDay=function(t){t===void 0&&(t=0),Oe.NANO_OF_DAY.checkValidValue(t);var o=Ye.intDiv(t,e.NANOS_PER_HOUR);t-=o*e.NANOS_PER_HOUR;var a=Ye.intDiv(t,e.NANOS_PER_MINUTE);t-=a*e.NANOS_PER_MINUTE;var s=Ye.intDiv(t,e.NANOS_PER_SECOND);return t-=s*e.NANOS_PER_SECOND,new e(o,a,s,t)},e.from=function(t){gt(t,"temporal");var o=t.query(xr.localTime());if(o==null)throw new ei("Unable to obtain LocalTime TemporalAccessor: "+t+", type "+(t.constructor!=null?t.constructor.name:""));return o},e.parse=function(t,o){return o===void 0&&(o=_n.ISO_LOCAL_TIME),gt(o,"formatter"),o.parse(t,e.FROM)};function e(n,t,o,a){var s;n===void 0&&(n=0),t===void 0&&(t=0),o===void 0&&(o=0),a===void 0&&(a=0),s=r.call(this)||this;var l=Ye.safeToInt(n),u=Ye.safeToInt(t),c=Ye.safeToInt(o),d=Ye.safeToInt(a);return e._validate(l,u,c,d),u===0&&c===0&&d===0?(e.HOURS[l]||(s._hour=l,s._minute=u,s._second=c,s._nano=d,e.HOURS[l]=cF(s)),e.HOURS[l]||cF(s)):(s._hour=l,s._minute=u,s._second=c,s._nano=d,s)}e._validate=function(t,o,a,s){Oe.HOUR_OF_DAY.checkValidValue(t),Oe.MINUTE_OF_HOUR.checkValidValue(o),Oe.SECOND_OF_MINUTE.checkValidValue(a),Oe.NANO_OF_SECOND.checkValidValue(s)};var i=e.prototype;return i.isSupported=function(t){return t instanceof Oe||t instanceof dt?t.isTimeBased():t!=null&&t.isSupportedBy(this)},i.range=function(t){return gt(t),r.prototype.range.call(this,t)},i.get=function(t){return this.getLong(t)},i.getLong=function(t){return gt(t,"field"),t instanceof Oe?this._get0(t):t.getFrom(this)},i._get0=function(t){switch(t){case Oe.NANO_OF_SECOND:return this._nano;case Oe.NANO_OF_DAY:return this.toNanoOfDay();case Oe.MICRO_OF_SECOND:return Ye.intDiv(this._nano,1e3);case Oe.MICRO_OF_DAY:return Ye.intDiv(this.toNanoOfDay(),1e3);case Oe.MILLI_OF_SECOND:return Ye.intDiv(this._nano,1e6);case Oe.MILLI_OF_DAY:return Ye.intDiv(this.toNanoOfDay(),1e6);case Oe.SECOND_OF_MINUTE:return this._second;case Oe.SECOND_OF_DAY:return this.toSecondOfDay();case Oe.MINUTE_OF_HOUR:return this._minute;case Oe.MINUTE_OF_DAY:return this._hour*60+this._minute;case Oe.HOUR_OF_AMPM:return Ye.intMod(this._hour,12);case Oe.CLOCK_HOUR_OF_AMPM:{var o=Ye.intMod(this._hour,12);return o%12===0?12:o}case Oe.HOUR_OF_DAY:return this._hour;case Oe.CLOCK_HOUR_OF_DAY:return this._hour===0?24:this._hour;case Oe.AMPM_OF_DAY:return Ye.intDiv(this._hour,12)}throw new kn("Unsupported field: "+t)},i.hour=function(){return this._hour},i.minute=function(){return this._minute},i.second=function(){return this._second},i.nano=function(){return this._nano},i._withAdjuster=function(t){return gt(t,"adjuster"),t instanceof e?t:r.prototype._withAdjuster.call(this,t)},i._withField=function(t,o){if(gt(t,"field"),gi(t,Rv,"field"),t instanceof Oe){switch(t.checkValidValue(o),t){case Oe.NANO_OF_SECOND:return this.withNano(o);case Oe.NANO_OF_DAY:return e.ofNanoOfDay(o);case Oe.MICRO_OF_SECOND:return this.withNano(o*1e3);case Oe.MICRO_OF_DAY:return e.ofNanoOfDay(o*1e3);case Oe.MILLI_OF_SECOND:return this.withNano(o*1e6);case Oe.MILLI_OF_DAY:return e.ofNanoOfDay(o*1e6);case Oe.SECOND_OF_MINUTE:return this.withSecond(o);case Oe.SECOND_OF_DAY:return this.plusSeconds(o-this.toSecondOfDay());case Oe.MINUTE_OF_HOUR:return this.withMinute(o);case Oe.MINUTE_OF_DAY:return this.plusMinutes(o-(this._hour*60+this._minute));case Oe.HOUR_OF_AMPM:return this.plusHours(o-Ye.intMod(this._hour,12));case Oe.CLOCK_HOUR_OF_AMPM:return this.plusHours((o===12?0:o)-Ye.intMod(this._hour,12));case Oe.HOUR_OF_DAY:return this.withHour(o);case Oe.CLOCK_HOUR_OF_DAY:return this.withHour(o===24?0:o);case Oe.AMPM_OF_DAY:return this.plusHours((o-Ye.intDiv(this._hour,12))*12)}throw new kn("Unsupported field: "+t)}return t.adjustInto(this,o)},i.withHour=function(t){return t===void 0&&(t=0),this._hour===t?this:new e(t,this._minute,this._second,this._nano)},i.withMinute=function(t){return t===void 0&&(t=0),this._minute===t?this:new e(this._hour,t,this._second,this._nano)},i.withSecond=function(t){return t===void 0&&(t=0),this._second===t?this:new e(this._hour,this._minute,t,this._nano)},i.withNano=function(t){return t===void 0&&(t=0),this._nano===t?this:new e(this._hour,this._minute,this._second,t)},i.truncatedTo=function(t){if(gt(t,"unit"),t===dt.NANOS)return this;var o=t.duration();if(o.seconds()>e.SECONDS_PER_DAY)throw new ei("Unit is too large to be used for truncation");var a=o.toNanos();if(Ye.intMod(e.NANOS_PER_DAY,a)!==0)throw new ei("Unit must divide into a standard day without remainder");var s=this.toNanoOfDay();return e.ofNanoOfDay(Ye.intDiv(s,a)*a)},i._plusUnit=function(t,o){if(gt(o,"unit"),o instanceof dt){switch(o){case dt.NANOS:return this.plusNanos(t);case dt.MICROS:return this.plusNanos(Ye.intMod(t,e.MICROS_PER_DAY)*1e3);case dt.MILLIS:return this.plusNanos(Ye.intMod(t,e.MILLIS_PER_DAY)*1e6);case dt.SECONDS:return this.plusSeconds(t);case dt.MINUTES:return this.plusMinutes(t);case dt.HOURS:return this.plusHours(t);case dt.HALF_DAYS:return this.plusHours(Ye.intMod(t,2)*12)}throw new kn("Unsupported unit: "+o)}return o.addTo(this,t)},i.plusHours=function(t){if(t===0)return this;var o=Ye.intMod(Ye.intMod(t,e.HOURS_PER_DAY)+this._hour+e.HOURS_PER_DAY,e.HOURS_PER_DAY);return new e(o,this._minute,this._second,this._nano)},i.plusMinutes=function(t){if(t===0)return this;var o=this._hour*e.MINUTES_PER_HOUR+this._minute,a=Ye.intMod(Ye.intMod(t,e.MINUTES_PER_DAY)+o+e.MINUTES_PER_DAY,e.MINUTES_PER_DAY);if(o===a)return this;var s=Ye.intDiv(a,e.MINUTES_PER_HOUR),l=Ye.intMod(a,e.MINUTES_PER_HOUR);return new e(s,l,this._second,this._nano)},i.plusSeconds=function(t){if(t===0)return this;var o=this._hour*e.SECONDS_PER_HOUR+this._minute*e.SECONDS_PER_MINUTE+this._second,a=Ye.intMod(Ye.intMod(t,e.SECONDS_PER_DAY)+o+e.SECONDS_PER_DAY,e.SECONDS_PER_DAY);if(o===a)return this;var s=Ye.intDiv(a,e.SECONDS_PER_HOUR),l=Ye.intMod(Ye.intDiv(a,e.SECONDS_PER_MINUTE),e.MINUTES_PER_HOUR),u=Ye.intMod(a,e.SECONDS_PER_MINUTE);return new e(s,l,u,this._nano)},i.plusNanos=function(t){if(t===0)return this;var o=this.toNanoOfDay(),a=Ye.intMod(Ye.intMod(t,e.NANOS_PER_DAY)+o+e.NANOS_PER_DAY,e.NANOS_PER_DAY);if(o===a)return this;var s=Ye.intDiv(a,e.NANOS_PER_HOUR),l=Ye.intMod(Ye.intDiv(a,e.NANOS_PER_MINUTE),e.MINUTES_PER_HOUR),u=Ye.intMod(Ye.intDiv(a,e.NANOS_PER_SECOND),e.SECONDS_PER_MINUTE),c=Ye.intMod(a,e.NANOS_PER_SECOND);return new e(s,l,u,c)},i._minusUnit=function(t,o){return gt(o,"unit"),this._plusUnit(-1*t,o)},i.minusHours=function(t){return this.plusHours(-1*Ye.intMod(t,e.HOURS_PER_DAY))},i.minusMinutes=function(t){return this.plusMinutes(-1*Ye.intMod(t,e.MINUTES_PER_DAY))},i.minusSeconds=function(t){return this.plusSeconds(-1*Ye.intMod(t,e.SECONDS_PER_DAY))},i.minusNanos=function(t){return this.plusNanos(-1*Ye.intMod(t,e.NANOS_PER_DAY))},i.query=function(t){return gt(t,"query"),t===xr.precision()?dt.NANOS:t===xr.localTime()?this:t===xr.chronology()||t===xr.zoneId()||t===xr.zone()||t===xr.offset()||t===xr.localDate()?null:t.queryFrom(this)},i.adjustInto=function(t){return t.with(e.NANO_OF_DAY,this.toNanoOfDay())},i.until=function(t,o){gt(t,"endExclusive"),gt(o,"unit");var a=e.from(t);if(o instanceof dt){var s=a.toNanoOfDay()-this.toNanoOfDay();switch(o){case dt.NANOS:return s;case dt.MICROS:return Ye.intDiv(s,1e3);case dt.MILLIS:return Ye.intDiv(s,1e6);case dt.SECONDS:return Ye.intDiv(s,e.NANOS_PER_SECOND);case dt.MINUTES:return Ye.intDiv(s,e.NANOS_PER_MINUTE);case dt.HOURS:return Ye.intDiv(s,e.NANOS_PER_HOUR);case dt.HALF_DAYS:return Ye.intDiv(s,12*e.NANOS_PER_HOUR)}throw new kn("Unsupported unit: "+o)}return o.between(this,a)},i.atDate=function(t){return ko.of(t,this)},i.atOffset=function(t){return xv.of(this,t)},i.toSecondOfDay=function(){var t=this._hour*e.SECONDS_PER_HOUR;return t+=this._minute*e.SECONDS_PER_MINUTE,t+=this._second,t},i.toNanoOfDay=function(){var t=this._hour*e.NANOS_PER_HOUR;return t+=this._minute*e.NANOS_PER_MINUTE,t+=this._second*e.NANOS_PER_SECOND,t+=this._nano,t},i.compareTo=function(t){gt(t,"other"),gi(t,e,"other");var o=Ye.compareNumbers(this._hour,t._hour);return o===0&&(o=Ye.compareNumbers(this._minute,t._minute),o===0&&(o=Ye.compareNumbers(this._second,t._second),o===0&&(o=Ye.compareNumbers(this._nano,t._nano)))),o},i.isAfter=function(t){return this.compareTo(t)>0},i.isBefore=function(t){return this.compareTo(t)<0},i.equals=function(t){return this===t?!0:t instanceof e?this._hour===t._hour&&this._minute===t._minute&&this._second===t._second&&this._nano===t._nano:!1},i.hashCode=function(){var t=this.toNanoOfDay();return Ye.hash(t)},i.toString=function(){var t="",o=this._hour,a=this._minute,s=this._second,l=this._nano;return t+=o<10?"0":"",t+=o,t+=a<10?":0":":",t+=a,(s>0||l>0)&&(t+=s<10?":0":":",t+=s,l>0&&(t+=".",Ye.intMod(l,1e6)===0?t+=(""+(Ye.intDiv(l,1e6)+1e3)).substring(1):Ye.intMod(l,1e3)===0?t+=(""+(Ye.intDiv(l,1e3)+1e6)).substring(1):t+=(""+(l+1e9)).substring(1))),t},i.toJSON=function(){return this.toString()},i.format=function(t){return gt(t,"formatter"),t.format(this)},e})(Rf);function ZXe(){Wt.HOURS=[];for(var r=0;r<24;r++)Wt.of(r,0,0,0);Wt.MIN=Wt.HOURS[0],Wt.MAX=new Wt(23,59,59,999999999),Wt.MIDNIGHT=Wt.HOURS[0],Wt.NOON=Wt.HOURS[12],Wt.FROM=Nl("LocalTime.FROM",function(e){return Wt.from(e)})}Wt.HOURS_PER_DAY=24;Wt.MINUTES_PER_HOUR=60;Wt.MINUTES_PER_DAY=Wt.MINUTES_PER_HOUR*Wt.HOURS_PER_DAY;Wt.SECONDS_PER_MINUTE=60;Wt.SECONDS_PER_HOUR=Wt.SECONDS_PER_MINUTE*Wt.MINUTES_PER_HOUR;Wt.SECONDS_PER_DAY=Wt.SECONDS_PER_HOUR*Wt.HOURS_PER_DAY;Wt.MILLIS_PER_DAY=Wt.SECONDS_PER_DAY*1e3;Wt.MICROS_PER_DAY=Wt.SECONDS_PER_DAY*1e6;Wt.NANOS_PER_SECOND=1e9;Wt.NANOS_PER_MINUTE=Wt.NANOS_PER_SECOND*Wt.SECONDS_PER_MINUTE;Wt.NANOS_PER_HOUR=Wt.NANOS_PER_MINUTE*Wt.MINUTES_PER_HOUR;Wt.NANOS_PER_DAY=Wt.NANOS_PER_HOUR*Wt.HOURS_PER_DAY;var Kj=1e6,ua=(function(r){nn(e,r),e.now=function(t){return t===void 0&&(t=da.systemUTC()),t.instant()},e.ofEpochSecond=function(t,o){o===void 0&&(o=0);var a=t+Ye.floorDiv(o,Wt.NANOS_PER_SECOND),s=Ye.floorMod(o,Wt.NANOS_PER_SECOND);return e._create(a,s)},e.ofEpochMilli=function(t){var o=Ye.floorDiv(t,1e3),a=Ye.floorMod(t,1e3);return e._create(o,a*1e6)},e.ofEpochMicro=function(t){var o=Ye.floorDiv(t,1e6),a=Ye.floorMod(t,1e6);return e._create(o,a*1e3)},e.from=function(t){try{var o=t.getLong(Oe.INSTANT_SECONDS),a=t.get(Oe.NANO_OF_SECOND);return e.ofEpochSecond(o,a)}catch(s){throw new ei("Unable to obtain Instant from TemporalAccessor: "+t+", type "+typeof t,s)}},e.parse=function(t){return _n.ISO_INSTANT.parse(t,e.FROM)},e._create=function(t,o){return t===0&&o===0?e.EPOCH:new e(t,o)},e._validate=function(t,o){if(t<e.MIN_SECONDS||t>e.MAX_SECONDS)throw new ei("Instant exceeds minimum or maximum instant");if(o<0||o>Wt.NANOS_PER_SECOND)throw new ei("Instant exceeds minimum or maximum instant")};function e(n,t){var o;return o=r.call(this)||this,e._validate(n,t),o._seconds=Ye.safeToInt(n),o._nanos=Ye.safeToInt(t),o}var i=e.prototype;return i.isSupported=function(t){return t instanceof Oe?t===Oe.INSTANT_SECONDS||t===Oe.NANO_OF_SECOND||t===Oe.MICRO_OF_SECOND||t===Oe.MILLI_OF_SECOND:t instanceof dt?t.isTimeBased()||t===dt.DAYS:t!=null&&t.isSupportedBy(this)},i.range=function(t){return r.prototype.range.call(this,t)},i.get=function(t){return this.getLong(t)},i.getLong=function(t){if(t instanceof Oe){switch(t){case Oe.NANO_OF_SECOND:return this._nanos;case Oe.MICRO_OF_SECOND:return Ye.intDiv(this._nanos,1e3);case Oe.MILLI_OF_SECOND:return Ye.intDiv(this._nanos,Kj);case Oe.INSTANT_SECONDS:return this._seconds}throw new kn("Unsupported field: "+t)}return t.getFrom(this)},i.epochSecond=function(){return this._seconds},i.nano=function(){return this._nanos},i._withField=function(t,o){if(gt(t,"field"),t instanceof Oe){switch(t.checkValidValue(o),t){case Oe.MILLI_OF_SECOND:{var a=o*Kj;return a!==this._nanos?e._create(this._seconds,a):this}case Oe.MICRO_OF_SECOND:{var s=o*1e3;return s!==this._nanos?e._create(this._seconds,s):this}case Oe.NANO_OF_SECOND:return o!==this._nanos?e._create(this._seconds,o):this;case Oe.INSTANT_SECONDS:return o!==this._seconds?e._create(o,this._nanos):this}throw new kn("Unsupported field: "+t)}return t.adjustInto(this,o)},i.truncatedTo=function(t){if(gt(t,"unit"),t===dt.NANOS)return this;var o=t.duration();if(o.seconds()>Wt.SECONDS_PER_DAY)throw new ei("Unit is too large to be used for truncation");var a=o.toNanos();if(Ye.intMod(Wt.NANOS_PER_DAY,a)!==0)throw new ei("Unit must divide into a standard day without remainder");var s=Ye.intMod(this._seconds,Wt.SECONDS_PER_DAY)*Wt.NANOS_PER_SECOND+this._nanos,l=Ye.intDiv(s,a)*a;return this.plusNanos(l-s)},i._plusUnit=function(t,o){if(gt(t,"amountToAdd"),gt(o,"unit"),gi(o,J0),o instanceof dt){switch(o){case dt.NANOS:return this.plusNanos(t);case dt.MICROS:return this.plusMicros(t);case dt.MILLIS:return this.plusMillis(t);case dt.SECONDS:return this.plusSeconds(t);case dt.MINUTES:return this.plusSeconds(Ye.safeMultiply(t,Wt.SECONDS_PER_MINUTE));case dt.HOURS:return this.plusSeconds(Ye.safeMultiply(t,Wt.SECONDS_PER_HOUR));case dt.HALF_DAYS:return this.plusSeconds(Ye.safeMultiply(t,Wt.SECONDS_PER_DAY/2));case dt.DAYS:return this.plusSeconds(Ye.safeMultiply(t,Wt.SECONDS_PER_DAY))}throw new kn("Unsupported unit: "+o)}return o.addTo(this,t)},i.plusSeconds=function(t){return this._plus(t,0)},i.plusMillis=function(t){return this._plus(Ye.intDiv(t,1e3),Ye.intMod(t,1e3)*Kj)},i.plusNanos=function(t){return this._plus(0,t)},i.plusMicros=function(t){return this._plus(Ye.intDiv(t,1e6),Ye.intMod(t,1e6)*1e3)},i._plus=function(t,o){if(t===0&&o===0)return this;var a=this._seconds+t;a=a+Ye.intDiv(o,Wt.NANOS_PER_SECOND);var s=this._nanos+o%Wt.NANOS_PER_SECOND;return e.ofEpochSecond(a,s)},i._minusUnit=function(t,o){return this._plusUnit(-1*t,o)},i.minusSeconds=function(t){return this.plusSeconds(t*-1)},i.minusMillis=function(t){return this.plusMillis(-1*t)},i.minusNanos=function(t){return this.plusNanos(-1*t)},i.minusMicros=function(t){return this.plusMicros(-1*t)},i.query=function(t){return gt(t,"query"),t===xr.precision()?dt.NANOS:t===xr.localDate()||t===xr.localTime()||t===xr.chronology()||t===xr.zoneId()||t===xr.zone()||t===xr.offset()?null:t.queryFrom(this)},i.adjustInto=function(t){return gt(t,"temporal"),t.with(Oe.INSTANT_SECONDS,this._seconds).with(Oe.NANO_OF_SECOND,this._nanos)},i.until=function(t,o){gt(t,"endExclusive"),gt(o,"unit");var a=e.from(t);if(o instanceof dt){switch(o){case dt.NANOS:return this._nanosUntil(a);case dt.MICROS:return this._microsUntil(a);case dt.MILLIS:return Ye.safeSubtract(a.toEpochMilli(),this.toEpochMilli());case dt.SECONDS:return this._secondsUntil(a);case dt.MINUTES:return Ye.intDiv(this._secondsUntil(a),Wt.SECONDS_PER_MINUTE);case dt.HOURS:return Ye.intDiv(this._secondsUntil(a),Wt.SECONDS_PER_HOUR);case dt.HALF_DAYS:return Ye.intDiv(this._secondsUntil(a),12*Wt.SECONDS_PER_HOUR);case dt.DAYS:return Ye.intDiv(this._secondsUntil(a),Wt.SECONDS_PER_DAY)}throw new kn("Unsupported unit: "+o)}return o.between(this,a)},i._microsUntil=function(t){var o=Ye.safeSubtract(t.epochSecond(),this.epochSecond()),a=Ye.safeMultiply(o,1e6);return Ye.safeAdd(a,Ye.intDiv(t.nano()-this.nano(),1e3))},i._nanosUntil=function(t){var o=Ye.safeSubtract(t.epochSecond(),this.epochSecond()),a=Ye.safeMultiply(o,Wt.NANOS_PER_SECOND);return Ye.safeAdd(a,t.nano()-this.nano())},i._secondsUntil=function(t){var o=Ye.safeSubtract(t.epochSecond(),this.epochSecond()),a=t.nano()-this.nano();return o>0&&a<0?o--:o<0&&a>0&&o++,o},i.atOffset=function(t){return mp.ofInstant(this,t)},i.atZone=function(t){return _g.ofInstant(this,t)},i.toEpochMilli=function(){var t=Ye.safeMultiply(this._seconds,1e3);return t+Ye.intDiv(this._nanos,Kj)},i.compareTo=function(t){gt(t,"otherInstant"),gi(t,e,"otherInstant");var o=Ye.compareNumbers(this._seconds,t._seconds);return o!==0?o:this._nanos-t._nanos},i.isAfter=function(t){return this.compareTo(t)>0},i.isBefore=function(t){return this.compareTo(t)<0},i.equals=function(t){return this===t?!0:t instanceof e?this.epochSecond()===t.epochSecond()&&this.nano()===t.nano():!1},i.hashCode=function(){return Ye.hashCode(this._seconds,this._nanos)},i.toString=function(){return _n.ISO_INSTANT.format(this)},i.toJSON=function(){return this.toString()},e})(Rf);function JXe(){ua.MIN_SECONDS=-31619119219200,ua.MAX_SECONDS=31494816403199,ua.EPOCH=new ua(0,0),ua.MIN=ua.ofEpochSecond(ua.MIN_SECONDS,0),ua.MAX=ua.ofEpochSecond(ua.MAX_SECONDS,999999999),ua.FROM=Nl("Instant.FROM",function(r){return ua.from(r)})}var da=(function(){function r(){}r.systemUTC=function(){return new hG(Gi.UTC)},r.systemDefaultZone=function(){return new hG(Lo.systemDefault())},r.system=function(n){return new hG(n)},r.fixed=function(n,t){return new QXe(n,t)},r.offset=function(n,t){return new e9e(n,t)};var e=r.prototype;return e.millis=function(){Li("Clock.millis")},e.instant=function(){Li("Clock.instant")},e.zone=function(){Li("Clock.zone")},e.withZone=function(){Li("Clock.withZone")},r})(),hG=(function(r){nn(e,r);function e(n){var t;return gt(n,"zone"),t=r.call(this)||this,t._zone=n,t}var i=e.prototype;return i.zone=function(){return this._zone},i.millis=function(){return new Date().getTime()},i.instant=function(){return ua.ofEpochMilli(this.millis())},i.equals=function(t){return t instanceof e?this._zone.equals(t._zone):!1},i.withZone=function(t){return t.equals(this._zone)?this:new e(t)},i.toString=function(){return"SystemClock["+this._zone.toString()+"]"},e})(da),QXe=(function(r){nn(e,r);function e(n,t){var o;return o=r.call(this)||this,o._instant=n,o._zoneId=t,o}var i=e.prototype;return i.instant=function(){return this._instant},i.millis=function(){return this._instant.toEpochMilli()},i.zone=function(){return this._zoneId},i.toString=function(){return"FixedClock[]"},i.equals=function(t){return t instanceof e?this._instant.equals(t._instant)&&this._zoneId.equals(t._zoneId):!1},i.withZone=function(t){return t.equals(this._zoneId)?this:new e(this._instant,t)},e})(da),e9e=(function(r){nn(e,r);function e(n,t){var o;return o=r.call(this)||this,o._baseClock=n,o._offset=t,o}var i=e.prototype;return i.zone=function(){return this._baseClock.zone()},i.withZone=function(t){return t.equals(this._baseClock.zone())?this:new e(this._baseClock.withZone(t),this._offset)},i.millis=function(){return this._baseClock.millis()+this._offset.toMillis()},i.instant=function(){return this._baseClock.instant().plus(this._offset)},i.equals=function(t){return t instanceof e?this._baseClock.equals(t._baseClock)&&this._offset.equals(t._offset):!1},i.toString=function(){return"OffsetClock["+this._baseClock+","+this._offset+"]"},e})(da);/*
 * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
 * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
 * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
 */var t9e=(function(){r.of=function(n,t,o){return new r(n,t,o)};function r(i,n,t){if(gt(i,"transition"),gt(n,"offsetBefore"),gt(t,"offsetAfter"),n.equals(t))throw new vi("Offsets must not be equal");if(i.nano()!==0)throw new vi("Nano-of-second must be zero");i instanceof ko?this._transition=i:this._transition=ko.ofEpochSecond(i,0,n),this._offsetBefore=n,this._offsetAfter=t}var e=r.prototype;return e.instant=function(){return this._transition.toInstant(this._offsetBefore)},e.toEpochSecond=function(){return this._transition.toEpochSecond(this._offsetBefore)},e.dateTimeBefore=function(){return this._transition},e.dateTimeAfter=function(){return this._transition.plusSeconds(this.durationSeconds())},e.offsetBefore=function(){return this._offsetBefore},e.offsetAfter=function(){return this._offsetAfter},e.duration=function(){return As.ofSeconds(this.durationSeconds())},e.durationSeconds=function(){return this._offsetAfter.totalSeconds()-this._offsetBefore.totalSeconds()},e.isGap=function(){return this._offsetAfter.totalSeconds()>this._offsetBefore.totalSeconds()},e.isOverlap=function(){return this._offsetAfter.totalSeconds()<this._offsetBefore.totalSeconds()},e.isValidOffset=function(n){return this.isGap()?!1:this._offsetBefore.equals(n)||this._offsetAfter.equals(n)},e.validOffsets=function(){return this.isGap()?[]:[this._offsetBefore,this._offsetAfter]},e.compareTo=function(n){return this.instant().compareTo(n.instant())},e.equals=function(n){if(n===this)return!0;if(n instanceof r){var t=n;return this._transition.equals(t._transition)&&this._offsetBefore.equals(t.offsetBefore())&&this._offsetAfter.equals(t.offsetAfter())}return!1},e.hashCode=function(){return this._transition.hashCode()^this._offsetBefore.hashCode()^this._offsetAfter.hashCode()>>>16},e.toString=function(){return"Transition["+(this.isGap()?"Gap":"Overlap")+" at "+this._transition.toString()+this._offsetBefore.toString()+" to "+this._offsetAfter+"]"},r})();/*
 * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
 * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
 * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
 */function r9e(){xr.ZONE_ID=Nl("ZONE_ID",function(r){return r.query(xr.ZONE_ID)}),xr.CHRONO=Nl("CHRONO",function(r){return r.query(xr.CHRONO)}),xr.PRECISION=Nl("PRECISION",function(r){return r.query(xr.PRECISION)}),xr.OFFSET=Nl("OFFSET",function(r){return r.isSupported(Oe.OFFSET_SECONDS)?Gi.ofTotalSeconds(r.get(Oe.OFFSET_SECONDS)):null}),xr.ZONE=Nl("ZONE",function(r){var e=r.query(xr.ZONE_ID);return e??r.query(xr.OFFSET)}),xr.LOCAL_DATE=Nl("LOCAL_DATE",function(r){return r.isSupported(Oe.EPOCH_DAY)?yi.ofEpochDay(r.getLong(Oe.EPOCH_DAY)):null}),xr.LOCAL_TIME=Nl("LOCAL_TIME",function(r){return r.isSupported(Oe.NANO_OF_DAY)?Wt.ofNanoOfDay(r.getLong(Oe.NANO_OF_DAY)):null})}var i9e=(function(r){nn(e,r);function e(){return r.apply(this,arguments)||this}var i=e.prototype;return i.isFixedOffset=function(){return!1},i.offsetOfInstant=function(t){var o=new Date(t.toEpochMilli()).getTimezoneOffset();return Gi.ofTotalMinutes(o*-1)},i.offsetOfEpochMilli=function(t){var o=new Date(t).getTimezoneOffset();return Gi.ofTotalMinutes(o*-1)},i.offsetOfLocalDateTime=function(t){var o=t.toEpochSecond(Gi.UTC)*1e3,a=new Date(o).getTimezoneOffset(),s=o+a*6e4,l=new Date(s).getTimezoneOffset();return Gi.ofTotalMinutes(l*-1)},i.validOffsets=function(t){return[this.offsetOfLocalDateTime(t)]},i.transition=function(){return null},i.standardOffset=function(t){return this.offsetOfInstant(t)},i.daylightSavings=function(){this._throwNotSupported()},i.isDaylightSavings=function(){this._throwNotSupported()},i.isValidOffset=function(t,o){return this.offsetOfLocalDateTime(t).equals(o)},i.nextTransition=function(){this._throwNotSupported()},i.previousTransition=function(){this._throwNotSupported()},i.transitions=function(){this._throwNotSupported()},i.transitionRules=function(){this._throwNotSupported()},i._throwNotSupported=function(){throw new ei("not supported operation")},i.equals=function(t){return this===t||t instanceof e},i.toString=function(){return"SYSTEM"},e})(YU),n9e=(function(r){nn(e,r);function e(){var n;return n=r.call(this)||this,n._rules=new i9e,n}var i=e.prototype;return i.rules=function(){return this._rules},i.equals=function(t){return this===t},i.id=function(){return"SYSTEM"},e})(Lo);/*
 * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
 * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
 * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
 */var zD=(function(){function r(){}return r.systemDefault=function(){return t$},r.getAvailableZoneIds=function(){return $U.getAvailableZoneIds()},r.of=function(i){if(gt(i,"zoneId"),i==="Z")return Gi.UTC;if(i.length===1)throw new ei("Invalid zone: "+i);if(gv.startsWith(i,"+")||gv.startsWith(i,"-"))return Gi.of(i);if(i==="UTC"||i==="GMT"||i==="GMT0"||i==="UT")return new vv(i,Gi.UTC.rules());if(gv.startsWith(i,"UTC+")||gv.startsWith(i,"GMT+")||gv.startsWith(i,"UTC-")||gv.startsWith(i,"GMT-")){var n=Gi.of(i.substring(3));return n.totalSeconds()===0?new vv(i.substring(0,3),n.rules()):new vv(i.substring(0,3)+n.id(),n.rules())}if(gv.startsWith(i,"UT+")||gv.startsWith(i,"UT-")){var t=Gi.of(i.substring(2));return t.totalSeconds()===0?new vv("UT",t.rules()):new vv("UT"+t.id(),t.rules())}return i==="SYSTEM"?Lo.systemDefault():vv.ofId(i)},r.ofOffset=function(i,n){if(gt(i,"prefix"),gt(n,"offset"),i.length===0)return n;if(i==="GMT"||i==="UTC"||i==="UT")return n.totalSeconds()===0?new vv(i,n.rules()):new vv(i+n.id(),n.rules());throw new vi("Invalid prefix, must be GMT, UTC or UT: "+i)},r.from=function(i){gt(i,"temporal");var n=i.query(xr.zone());if(n==null)throw new ei("Unable to obtain ZoneId from TemporalAccessor: "+i+", type "+(i.constructor!=null?i.constructor.name:""));return n},r})(),t$=null;function o9e(){t$=new n9e,Lo.systemDefault=zD.systemDefault,Lo.getAvailableZoneIds=zD.getAvailableZoneIds,Lo.of=zD.of,Lo.ofOffset=zD.ofOffset,Lo.from=zD.from,Gi.from=zD.from,Lo.SYSTEM=t$,Lo.UTC=Gi.ofTotalSeconds(0)}/*
 * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
 * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
 */var Hde=!1;function a9e(){Hde||(Hde=!0,_Xe(),SXe(),PXe(),CXe(),ZXe(),IXe(),r9e(),TXe(),JXe(),XXe(),KXe(),zXe(),xXe(),UXe(),HXe(),AXe(),OXe(),$Xe(),o9e(),WXe(),VXe(),BXe(),qXe(),GXe())}a9e();/*
 * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
 * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
 */var s9e=(function(){function r(i,n){var t;if(i instanceof ua){this.instant=i;return}else if(i instanceof yi)n=n??Lo.systemDefault(),t=i.atStartOfDay(n);else if(i instanceof ko)n=n??Lo.systemDefault(),t=i.atZone(n);else if(i instanceof _g)n==null?t=i:t=i.withZoneSameInstant(n);else throw new vi("unsupported instance for convert operation:"+i);this.instant=t.toInstant()}var e=r.prototype;return e.toDate=function(){return new Date(this.instant.toEpochMilli())},e.toEpochMilli=function(){return this.instant.toEpochMilli()},r})();function l9e(r,e){return new s9e(r,e)}/*
 * @copyright (c) 2015-present, Philipp Thürwächter, Pattrick Hüper & js-joda contributors
 * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
 */function u9e(r,e){if(e===void 0&&(e=Lo.systemDefault()),gt(r,"date"),gt(e,"zone"),r instanceof Date)return ua.ofEpochMilli(r.getTime()).atZone(e);if(typeof r.toDate=="function"&&r.toDate()instanceof Date)return ua.ofEpochMilli(r.toDate().getTime()).atZone(e);throw new vi("date must be a javascript Date or a moment instance")}function c9e(r){var e=[];return function(n){return~e.indexOf(n)||(n(r),e.push(n)),r}}/**
 * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
 * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
 */var d9e={assert:bXe,DateTimeBuilder:g3,DateTimeParseContext:Gxe,DateTimePrintContext:Yxe,MathUtil:Ye,StringUtil:gv,StringBuilder:Zxe},rEe={_:d9e,convert:l9e,nativeJs:u9e,ArithmeticException:lg,DateTimeException:ei,DateTimeParseException:hg,IllegalArgumentException:vi,IllegalStateException:uF,UnsupportedTemporalTypeException:kn,NullPointerException:U0,Clock:da,DayOfWeek:Sa,Duration:As,Instant:ua,LocalDate:yi,LocalTime:Wt,LocalDateTime:ko,OffsetTime:xv,OffsetDateTime:mp,Month:Bi,MonthDay:y3,ParsePosition:zxe,Period:I0,Year:yg,YearConstants:Af,YearMonth:fF,ZonedDateTime:_g,ZoneOffset:Gi,ZoneId:Lo,ZoneRegion:vv,ZoneOffsetTransition:t9e,ZoneRules:YU,ZoneRulesProvider:$U,ChronoLocalDate:dF,ChronoLocalDateTime:tEe,ChronoZonedDateTime:eEe,IsoChronology:Mo,ChronoField:Oe,ChronoUnit:dt,IsoFields:og,Temporal:Rf,TemporalAccessor:VS,TemporalAdjuster:qU,TemporalAdjusters:Qxe,TemporalAmount:R1,TemporalField:Rv,TemporalQueries:xr,TemporalQuery:gj,TemporalUnit:J0,ValueRange:en,DateTimeFormatter:_n,DateTimeFormatterBuilder:Wo,DecimalStyle:v3,ResolverStyle:Zi,SignStyle:co,TextStyle:yo},f9e=c9e(rEe);rEe.use=f9e;const h9e=/^(?<date>\d{4}-\d{2}-\d{2})T(?<time>\d{2}:\d{2}:\d{2})(?:\.(?<frac>\d+))?(?<zone>Z|[+\-]\d{2}:\d{2})$/,p9e=/^\d+us$/i,g9e=/^\d+ms$/i,v9e=/^\d+(?:\.\d+)?s$/i,y9e="9007199254740991";function m9e(r,e){return r=r.replace(/^0+/,"")||"0",e=e.replace(/^0+/,"")||"0",r.length!==e.length?r.length<e.length?-1:1:r===e?0:r<e?-1:1}function Ude(r){return m9e(r,y9e)<=0}function b9e(r){return r.length<=3?"0":r.slice(0,r.length-3)}function pG(r){if(r==null)throw new Error("input is null");const e=r.trim();if(p9e.test(e)){const n=e.slice(0,-2),t=b9e(n);if(!Ude(t))throw new Error(`Microseconds timestamp out of safe range: ${r}`);return Number(t)}if(g9e.test(e)){const n=e.slice(0,-2);if(!Ude(n))throw new Error(`Millisecond timestamp out of safe range: ${r}`);return Number(n)}if(v9e.test(e)){const n=Number(e.slice(0,-1));if(!Number.isFinite(n))throw new Error(`Invalid seconds timestamp: ${r}`);const t=Math.floor(n*1e3);if(!Number.isSafeInteger(t))throw new Error(`Seconds timestamp out of safe range: ${r}`);return t}const i=e.match(h9e);if(i)try{const n=i.groups.zone;return n==="Z"||n==="z"?ua.parse(e).toEpochMilli():mp.parse(e).toInstant().toEpochMilli()}catch{throw new Error(`Invalid RFC3339/ISO-8601 timestamp: ${r}`)}throw new Error(`Unsupported timestamp format: ${r}`)}const S9e=r=>`${r.toUTCString().replace(" GMT","")}.${r.getMilliseconds().toString().padStart(3,"0")}`;function _9e(r){if(r===void 0)return 0;const e=r.trim().toLowerCase().match(/^(-?\d+(?:\.\d+)?)(us|ms|s)$/);if(!e)throw new Error(`Unknown or malformed duration: ${r}`);const[,i,n]=e,t=Number(i);if(!Number.isFinite(t))throw new Error(`Invalid number: ${r}`);switch(n){case"us":return t/1e3;case"ms":return t;case"s":return t*1e3}}function zde({position:r}){return R.jsxs("div",{style:{position:"absolute",left:`${r}%`,top:"0"},children:[R.jsx(ZTe,{sx:{fontSize:7,color:"var(--success-60)",position:"absolute",top:"-6px",left:"-3px"}}),R.jsx("div",{className:"absolute top-[0px] left-0 w-0 h-[16px] border-l border-dotted pointer-events-none",style:{borderColor:"var(--success-60)"}})]})}const Wde=(r,e)=>R.jsxs(R.Fragment,{children:[R.jsx("p",{className:"text-left font-bold m-0 mb-1",children:r}),R.jsx("p",{className:"text-left text-sm m-0",children:e})]});function P9e(r){const[e,i]=G.useState(!1),[n,t]=G.useState(""),o=G.useRef(null);G.useEffect(()=>{e&&o.current&&(o.current.focus(),o.current.select())},[e]);const a=h=>{const p=h.trim().split(":").map(y=>parseInt(y,10));if(p.some(isNaN))return null;let g=0;if(p.length===1)g=p[0];else if(p.length===2)g=p[0]*60+p[1];else if(p.length===3)g=p[0]*3600+p[1]*60+p[2];else return null;return g*1e3},s=()=>{r.isDisabled||(t(r.currentTime),i(!0))},l=async()=>{const h=a(n);if(h===null){Wn.error(Wde("Invalid input","Your input must be numbers in the format HH:MM:SS, MM:SS, or SS"),{autoClose:1e4});return}if(h<0||h>r.durationMs){Wn.error(Wde("Invalid input","Time must be within the recording duration."),{autoClose:1e4});return}await r.onSeek(h),i(!1)},u=h=>{h.key==="Enter"?(h.preventDefault(),l()):h.key==="Escape"&&(h.preventDefault(),i(!1))},c=()=>{i(!1)};return e?R.jsxs("div",{className:"flex items-center -ml-0.5 -my-1.5 z-[2]",children:[R.jsx("input",{ref:o,type:"text",value:n,onChange:h=>t(h.target.value),onKeyDown:u,className:Wi("text-xs w-[45px] px-1 py-0.5 mr-1","rounded border","bg-background dark:bg-neutral-800","border-remotive-primary-30 dark:border-neutral-600","text-foreground dark:text-neutral-200","focus:outline-none focus:ring-1 focus:ring-remotive-primary-60"),placeholder:"MM:SS",title:"Enter time (HH:MM:SS, MM:SS, or SS)"}),R.jsx("button",{onClick:l,onMouseDown:h=>h.preventDefault(),className:Wi("flex items-center justify-center","border-0 rounded p-0","bg-transparent","text-remotive-success-70","transition-colors duration-200"),title:"Confirm and seek to time in input",children:R.jsx(EGe,{style:{fontSize:"16px"}})}),R.jsx("button",{onClick:c,onMouseDown:h=>h.preventDefault(),className:Wi("flex items-center justify-center","border-0 rounded p-0","bg-transparent","text-destructive","transition-colors duration-200"),title:"Cancel",children:R.jsx(tM,{style:{fontSize:"16px"}})})]}):R.jsx("span",{className:Wi("px-0.5 py-0 rounded z-[2]","bg-transparent","text-foreground dark:text-neutral-300",r.isDisabled?"cursor-default":"cursor-pointer hover:bg-remotive-primary-10"),onClick:s,title:"Click to enter a specific time",style:{fontSize:"10px"},children:r.currentTime})}function C9e(r){const[e,i]=G.useState(!1),[n,t]=G.useState(void 0),{isDarkMode:o}=TM(),a=()=>{const h=e?n:Number(r.playbackControls.elapsedTimeMs);return iM(h||0)},s=()=>iM(r.playbackControls.durationMs),l=()=>{const h=new Date(r.recordingSessionInfo.startTimeMs+Number(n));return S9e(h)},u=()=>e?n??0:Number(r.playbackControls.elapsedTimeMs),c=async h=>{await r.onDisableControlsAndChangePlaybackState(async()=>{await r.playbackControls.seek(h)},()=>{Wn.error(r.playbackErrorMessage(),{autoClose:1e4})})},d=()=>R.jsx(vXe,{disabled:r.isPlaybackControlsDisabled,onBeforeChange:()=>{i(!0)},onChange:h=>{t(h)},onAfterChange:async h=>{await r.onDisableControlsAndChangePlaybackState(async()=>{await r.playbackControls.seek(h)},()=>{Wn.error(r.playbackErrorMessage(),{autoClose:1e4})}),i(!1)},handleStyle:{backgroundColor:o?"#1e3a5f":"#B6F0C3",borderColor:o?"#89CFF0":"#0b3f70",opacity:"1"},trackStyle:{backgroundColor:o?"#89CFF0":"#0b3f70"},railStyle:{backgroundColor:o?"#374151":"#d2e1ee"},min:0,max:r.recordingSessionInfo.durationMs,value:u()}),f=h=>{if(!h)return null;const p=r.playbackControls.repeat.startMs!==void 0?r.playbackControls.repeat.startMs/r.recordingSessionInfo.durationMs*100:null,g=r.playbackControls.repeat.endMs!==void 0?r.playbackControls.repeat.endMs/r.recordingSessionInfo.durationMs*100:null;return R.jsxs(R.Fragment,{children:[p!==null&&R.jsx(zde,{position:p}),g!==null&&R.jsx(zde,{position:g})]})};return R.jsxs("div",{style:{lineHeight:"normal"},children:[R.jsx("div",{className:"flex items-start justify-between",children:R.jsx("div",{className:"flex-1 min-w-0 overflow-hidden mx-2"})}),R.jsxs("div",{className:"relative",children:[d(),f(r.playbackControls.repeat.isRepeating),R.jsxs("div",{className:"flex items-center justify-between",children:[R.jsx(P9e,{currentTime:a(),durationMs:r.recordingSessionInfo.durationMs,isDisabled:r.isPlaybackControlsDisabled,onSeek:c,isDarkMode:o}),R.jsx("p",{className:Wi("m-0 truncate text-center","text-muted-foreground dark:text-neutral-200"),style:{fontSize:"10px"},title:r.recordingSessionInfo.path,children:r.recordingSessionInfo.path}),R.jsx("span",{className:Wi("z-[2] shrink-0","text-foreground dark:text-neutral-300"),style:{fontSize:"10px"},children:s()})]})]}),e&&R.jsx("div",{className:"flex justify-center absolute overflow-visible z-[2] pointer-events-none",style:{top:"15px",left:"50%",transform:"translateX(-50%)"},children:R.jsx("div",{className:Wi("p-2 rounded-xs mt-4","bg-neutral-800 dark:bg-neutral-900"),children:R.jsx("p",{className:"m-0 text-sm text-white whitespace-nowrap",children:l()})})})]})}function T9e(r){const[e,i]=G.useState(!1),n=async(a,s)=>{i(!0);try{await a()}catch(l){s(l)}finally{i(!1)}},t=(a,s)=>R.jsxs("div",{className:"text-left",children:[R.jsx("p",{className:"font-bold m-0",children:a}),R.jsxs("p",{className:"text-sm m-0",children:["There was an error trying to ",s," the recording"," ",R.jsx("span",{className:"font-bold",children:r.recordingSessionInfo.path}),". If this keeps happening, you might have to reload the application."]})]}),o=()=>R.jsxs("div",{className:"flex items-center",children:[R.jsx(k8e,{playbackControls:r.playbackControls,isPlaybackControlsDisabled:e,onDisableControlsAndChangePlaybackState:n,playbackErrorMessage:()=>t("Failed to stop recording","stop")}),R.jsx(I8e,{playbackControls:r.playbackControls,recordingSessionInfo:r.recordingSessionInfo,productAnalyticsTracker:r.productAnalyticsTracker,isPlaybackControlsDisabled:e,onDisableControlsAndChangePlaybackState:n,playbackErrorMessage:a=>t(`Failed to ${a} recording`,a)}),R.jsx(L8e,{playbackControls:r.playbackControls,recordingSessionInfo:r.recordingSessionInfo,isPlaybackControlsDisabled:e,onDisableControlsAndChangePlaybackState:n,playbackErrorMessage:()=>t("Failed to set repeat","set repeat for")})]});return R.jsx("div",{style:{cursor:"default"},children:R.jsxs("div",{className:Wi("flex p-1 rounded-xs w-full","bg-blue-100 dark:bg-neutral-900 rounded-sm",r.className),children:[R.jsxs("div",{className:"flex items-center grow min-w-0",children:[R.jsx("div",{className:"shrink-0",children:o()}),R.jsx("div",{className:"grow pl-3 pr-3 min-w-0",children:R.jsx(C9e,{playbackControls:r.playbackControls,recordingSessionInfo:r.recordingSessionInfo,isPlaybackControlsDisabled:e,onDisableControlsAndChangePlaybackState:n,playbackErrorMessage:()=>t("Failed to seek recording","seek in")})})]}),R.jsx("div",{className:"shrink-0 flex items-start",children:R.jsx(N8e,{playbackControls:r.playbackControls,onAfterClose:r.onAfterClose,playbackErrorMessage:()=>t("Failed to close recording","close")})})]})})}function x9e(r){const[e,i]=G.useState(!1),n=async(l,u)=>{if(!e){i(!0);try{await Promise.all(r.recordingSessionPlaybacks.map(async c=>{try{await u(c)}catch(d){console.error(`Failed to ${l} recording ${c.recordingSessionInfo.path}:`,d)}}))}catch{Wn.error(R.jsxs("div",{className:"text-left",children:[R.jsxs("p",{className:"font-bold m-0",children:["Failed to ",l," recordings"]}),R.jsxs("p",{className:"text-sm m-0",children:["There was an error trying to ",l," multiple recordings. If this keeps happening, you might have to reload the application."]})]}),{autoClose:1e4})}finally{i(!1)}}},t=async()=>{await n("restart",async l=>{await l.playbackControls.restart()})},o=async()=>{r.recordingSessionPlaybacks.some(u=>u.playbackControls.isPlaying)?await n("pause",async u=>{u.playbackControls.isPlaying&&await u.playbackControls.pause()}):await n("play",async u=>{u.playbackControls.isPlaying||await u.playbackControls.play()})},a=r.recordingSessionPlaybacks.some(l=>l.playbackControls.isPlaying),s=a?JTe:$X;return R.jsxs("div",{className:"flex items-center ml-2",children:[R.jsx("span",{title:"Restart all recordings from the beginning",role:"button",tabIndex:0,style:{opacity:e?.6:1,cursor:e?"not-allowed":"pointer"},onClick:l=>{l.stopPropagation(),t()},onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),l.stopPropagation(),t())},className:Wi("inline-flex items-center justify-center","p-0 mr-1","border-0 bg-transparent","text-remotive-primary-60","focus:outline-none focus-visible:ring-2 focus-visible:ring-remotive-primary-60 focus-visible:ring-offset-1 rounded"),children:R.jsx(QTe,{sx:{fontSize:24}})}),R.jsx("span",{title:`${a?"Pause":"Play"} all recordings`,role:"button",tabIndex:0,style:{opacity:e?.6:1,cursor:e?"not-allowed":"pointer"},onClick:l=>{l.stopPropagation(),o()},onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),l.stopPropagation(),o())},className:Wi("inline-flex items-center justify-center","p-0 mr-1","border-0 bg-transparent","text-remotive-primary-60","focus:outline-none focus-visible:ring-2 focus-visible:ring-remotive-primary-60 focus-visible:ring-offset-1 rounded"),children:R.jsx(s,{sx:{fontSize:32}})}),R.jsxs("div",{className:"flex flex-col text-left pl-2",children:[R.jsxs("span",{className:"text-xs text-foreground dark:text-neutral-200",children:["You are using ",r.recordingSessionPlaybacks.length," recordings simultaneously"]}),R.jsx("span",{className:"text-muted-foreground",style:{fontSize:"10px"},children:"Click to expand to see individual playback controls"})]})]})}const E9e=(r="",e="")=>R.jsxs("p",{className:"text-left m-0",children:[R.jsx("span",{className:"font-bold",children:r})," ",R.jsx("br",{})," ",R.jsx("span",{className:"text-sm",children:e})]});function iEe({node:r,depth:e,selectedFiles:i,onFileSelect:n,expandAll:t}){const[o,a]=G.useState(t),s=i.some(h=>h.path===r.path),l=r.type===Ro.FILE_TYPE_RECORDING_SESSION&&!r.isDirectory,u=(e+1)*12,c=()=>{r.isDirectory?a(!o):l&&(s?Wn.warning(E9e("Already in playback",`Recording session ${r.name} is already in playback`),{autoClose:1e4}):n(r))},d=()=>{const h="text-remotive-primary-50";return r.isDirectory?o?R.jsx(DGe,{className:h,sx:{fontSize:18}}):R.jsx(RGe,{className:h,sx:{fontSize:18}}):r.type===Ro.FILE_TYPE_RECORDING_SESSION?R.jsx($X,{className:h,sx:{fontSize:18}}):R.jsx(OGe,{className:h,sx:{fontSize:18}})},f=()=>r.isDirectory?o?R.jsx(d3,{sx:{fontSize:16},className:"text-gray-500"}):R.jsx(AGe,{sx:{fontSize:16},className:"text-gray-500"}):null;return R.jsxs(R.Fragment,{children:[R.jsxs("div",{className:Wi("flex items-center py-1 rounded pr-2 mb-0.5","transition-colors duration-100",l||r.isDirectory?"cursor-pointer hover:bg-black/10 dark:hover:bg-white/20":"cursor-default"),style:{marginLeft:u},onClick:c,children:[R.jsx("div",{className:"flex items-center shrink-0 mr-1 w-4",children:f()}),R.jsx("div",{className:"mr-2",children:d()}),R.jsx("div",{className:"grow min-w-0",children:R.jsx("p",{className:"m-0 text-sm truncate text-foreground dark:text-neutral-200",title:r.name,children:r.name})}),s&&R.jsx("div",{className:"ml-2",children:R.jsx("span",{className:"text-xs text-muted-foreground",children:"Already open"})})]}),r.isDirectory&&o&&"files"in r&&R.jsx("div",{children:r.files.map(h=>R.jsx(iEe,{expandAll:t,node:h,depth:e+1,selectedFiles:i,onFileSelect:n},h.path))})]})}const A9e=(r="",e)=>R.jsxs(R.Fragment,{children:[R.jsx("p",{className:"text-left m-0 mb-1 font-bold",children:r}),R.jsx(R.Fragment,{children:e})]});function w9e(r){const[e,i]=G.useState(!1),n=()=>{r.handleCloseFunction()},t=async s=>{if(e)return;const l=(u,c)=>{Wn.error(A9e("Failed to open",R.jsxs("div",{className:"text-left flex flex-col gap-1",children:[R.jsxs("p",{className:"mb-2 text-sm",children:["Could not open recording session ",R.jsx("span",{className:"font-bold",children:u}),"."]}),R.jsx("p",{className:"m-0 text-left text-sm",children:c.message})]})))};i(!0);try{await r.open(s.path),n(),r.onAfterSelect()}catch(u){l(s.path,u)}finally{i(!1)}},a=((s,l)=>{const u=[],c=d=>{l.includes(d.path)&&u.push(d),d.isDirectory&&"files"in d&&d.files&&d.files.forEach(c)};return s.forEach(c),u})(r.fileTree,r.playingFilePaths);return r.show?au.createPortal(R.jsxs(R.Fragment,{children:[R.jsx("div",{className:"fixed inset-0 bg-black/50 z-[9998]",onClick:n}),R.jsxs("div",{className:Wi("fixed z-[9999]","top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2","w-full max-w-2xl max-h-[90vh]","flex flex-col","bg-white dark:bg-neutral-900","rounded-xl shadow-xl","overflow-hidden"),children:[R.jsxs("div",{className:Wi("flex items-center justify-between px-4 py-3","bg-remotive-primary-60 dark:bg-remotive-primary-70"),children:[R.jsx("h2",{className:"text-lg font-medium text-white m-0",children:"Open recording"}),R.jsx("button",{onClick:n,className:Wi("p-1 rounded","text-white/80 hover:text-white hover:bg-white/10","transition-colors"),children:R.jsx(tM,{sx:{fontSize:24}})})]}),R.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:R.jsxs("div",{className:"col-12",children:[R.jsx("p",{className:"mb-1 font-bold text-foreground dark:text-neutral-200",children:"Available recording sessions:"}),R.jsx("div",{className:Wi("rounded-lg p-2","bg-remotive-primary-10 dark:bg-neutral-800","max-h-[400px] overflow-y-auto"),children:r.fileTree.length===0?R.jsx("div",{className:"text-center py-4",children:R.jsx("p",{className:"text-muted-foreground m-0",children:"No files available"})}):r.fileTree.map(s=>R.jsx(iEe,{expandAll:r.expandAll,node:s,depth:0,selectedFiles:a,onFileSelect:t},s.path))})]})}),R.jsx("div",{className:"flex justify-end px-4 py-3 border-t border-neutral-200 dark:border-neutral-700",children:R.jsx("button",{className:Wi("px-4 py-2 rounded-md","bg-primary text-primary-foreground","hover:bg-primary/90","transition-colors"),onClick:n,children:"Cancel"})})]})]}),document.body):null}var Za=(r=>(r.FILE_TYPE_UNKNOWN="FILE_TYPE_UNKNOWN",r.FILE_TYPE_FOLDER="FILE_TYPE_FOLDER",r.FILE_TYPE_VIDEO="FILE_TYPE_VIDEO",r.FILE_TYPE_AUDIO="FILE_TYPE_AUDIO",r.FILE_TYPE_IMAGE="FILE_TYPE_IMAGE",r.FILE_TYPE_RECORDING="FILE_TYPE_RECORDING",r.FILE_TYPE_RECORDING_SESSION="FILE_TYPE_RECORDING_SESSION",r.FILE_TYPE_RECORDING_MAPPING="FILE_TYPE_RECORDING_MAPPING",r.FILE_TYPE_PLATFORM="FILE_TYPE_PLATFORM",r.FILE_TYPE_INSTANCE="FILE_TYPE_INSTANCE",r.FILE_TYPE_SIGNAL_DATABASE="FILE_TYPE_SIGNAL_DATABASE",r))(Za||{}),bV=(r=>(r.PLAYBACK_PLAYING="PLAYBACK_PLAYING",r.PLAYBACK_PAUSED="PLAYBACK_PAUSED",r.PLAYBACK_CLOSED="PLAYBACK_CLOSED",r))(bV||{});/*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT */function nEe(r){return typeof r>"u"||r===null}function O9e(r){return typeof r=="object"&&r!==null}function D9e(r){return Array.isArray(r)?r:nEe(r)?[]:[r]}function R9e(r,e){var i,n,t,o;if(e)for(o=Object.keys(e),i=0,n=o.length;i<n;i+=1)t=o[i],r[t]=e[t];return r}function M9e(r,e){var i="",n;for(n=0;n<e;n+=1)i+=r;return i}function L9e(r){return r===0&&Number.NEGATIVE_INFINITY===1/r}var k9e=nEe,I9e=O9e,N9e=D9e,F9e=M9e,j9e=L9e,B9e=R9e,Id={isNothing:k9e,isObject:I9e,toArray:N9e,repeat:F9e,isNegativeZero:j9e,extend:B9e};function oEe(r,e){var i="",n=r.reason||"(unknown reason)";return r.mark?(r.mark.name&&(i+='in "'+r.mark.name+'" '),i+="("+(r.mark.line+1)+":"+(r.mark.column+1)+")",!e&&r.mark.snippet&&(i+=`

`+r.mark.snippet),n+" "+i):n}function hF(r,e){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=e,this.message=oEe(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}hF.prototype=Object.create(Error.prototype);hF.prototype.constructor=hF;hF.prototype.toString=function(e){return this.name+": "+oEe(this,e)};var N0=hF;function gG(r,e,i,n,t){var o="",a="",s=Math.floor(t/2)-1;return n-e>s&&(o=" ... ",e=n-s+o.length),i-n>s&&(a=" ...",i=n+s-a.length),{str:o+r.slice(e,i).replace(/\t/g,"→")+a,pos:n-e+o.length}}function vG(r,e){return Id.repeat(" ",e-r.length)+r}function V9e(r,e){if(e=Object.create(e||null),!r.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var i=/\r?\n|\r|\0/g,n=[0],t=[],o,a=-1;o=i.exec(r.buffer);)t.push(o.index),n.push(o.index+o[0].length),r.position<=o.index&&a<0&&(a=n.length-2);a<0&&(a=n.length-1);var s="",l,u,c=Math.min(r.line+e.linesAfter,t.length).toString().length,d=e.maxLength-(e.indent+c+3);for(l=1;l<=e.linesBefore&&!(a-l<0);l++)u=gG(r.buffer,n[a-l],t[a-l],r.position-(n[a]-n[a-l]),d),s=Id.repeat(" ",e.indent)+vG((r.line-l+1).toString(),c)+" | "+u.str+`
`+s;for(u=gG(r.buffer,n[a],t[a],r.position,d),s+=Id.repeat(" ",e.indent)+vG((r.line+1).toString(),c)+" | "+u.str+`
`,s+=Id.repeat("-",e.indent+c+3+u.pos)+`^
`,l=1;l<=e.linesAfter&&!(a+l>=t.length);l++)u=gG(r.buffer,n[a+l],t[a+l],r.position-(n[a]-n[a+l]),d),s+=Id.repeat(" ",e.indent)+vG((r.line+l+1).toString(),c)+" | "+u.str+`
`;return s.replace(/\n$/,"")}var H9e=V9e,U9e=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],z9e=["scalar","sequence","mapping"];function W9e(r){var e={};return r!==null&&Object.keys(r).forEach(function(i){r[i].forEach(function(n){e[String(n)]=i})}),e}function G9e(r,e){if(e=e||{},Object.keys(e).forEach(function(i){if(U9e.indexOf(i)===-1)throw new N0('Unknown option "'+i+'" is met in definition of "'+r+'" YAML type.')}),this.options=e,this.tag=r,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(i){return i},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=W9e(e.styleAliases||null),z9e.indexOf(this.kind)===-1)throw new N0('Unknown kind "'+this.kind+'" is specified for "'+r+'" YAML type.')}var Gc=G9e;function Gde(r,e){var i=[];return r[e].forEach(function(n){var t=i.length;i.forEach(function(o,a){o.tag===n.tag&&o.kind===n.kind&&o.multi===n.multi&&(t=a)}),i[t]=n}),i}function Y9e(){var r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,i;function n(t){t.multi?(r.multi[t.kind].push(t),r.multi.fallback.push(t)):r[t.kind][t.tag]=r.fallback[t.tag]=t}for(e=0,i=arguments.length;e<i;e+=1)arguments[e].forEach(n);return r}function r$(r){return this.extend(r)}r$.prototype.extend=function(e){var i=[],n=[];if(e instanceof Gc)n.push(e);else if(Array.isArray(e))n=n.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(i=i.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit));else throw new N0("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");i.forEach(function(o){if(!(o instanceof Gc))throw new N0("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&o.loadKind!=="scalar")throw new N0("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(o.multi)throw new N0("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(o){if(!(o instanceof Gc))throw new N0("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var t=Object.create(r$.prototype);return t.implicit=(this.implicit||[]).concat(i),t.explicit=(this.explicit||[]).concat(n),t.compiledImplicit=Gde(t,"implicit"),t.compiledExplicit=Gde(t,"explicit"),t.compiledTypeMap=Y9e(t.compiledImplicit,t.compiledExplicit),t};var $9e=r$,q9e=new Gc("tag:yaml.org,2002:str",{kind:"scalar",construct:function(r){return r!==null?r:""}}),X9e=new Gc("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(r){return r!==null?r:[]}}),K9e=new Gc("tag:yaml.org,2002:map",{kind:"mapping",construct:function(r){return r!==null?r:{}}}),Z9e=new $9e({explicit:[q9e,X9e,K9e]});function J9e(r){if(r===null)return!0;var e=r.length;return e===1&&r==="~"||e===4&&(r==="null"||r==="Null"||r==="NULL")}function Q9e(){return null}function e7e(r){return r===null}var t7e=new Gc("tag:yaml.org,2002:null",{kind:"scalar",resolve:J9e,construct:Q9e,predicate:e7e,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function r7e(r){if(r===null)return!1;var e=r.length;return e===4&&(r==="true"||r==="True"||r==="TRUE")||e===5&&(r==="false"||r==="False"||r==="FALSE")}function i7e(r){return r==="true"||r==="True"||r==="TRUE"}function n7e(r){return Object.prototype.toString.call(r)==="[object Boolean]"}var o7e=new Gc("tag:yaml.org,2002:bool",{kind:"scalar",resolve:r7e,construct:i7e,predicate:n7e,represent:{lowercase:function(r){return r?"true":"false"},uppercase:function(r){return r?"TRUE":"FALSE"},camelcase:function(r){return r?"True":"False"}},defaultStyle:"lowercase"});function a7e(r){return 48<=r&&r<=57||65<=r&&r<=70||97<=r&&r<=102}function s7e(r){return 48<=r&&r<=55}function l7e(r){return 48<=r&&r<=57}function u7e(r){if(r===null)return!1;var e=r.length,i=0,n=!1,t;if(!e)return!1;if(t=r[i],(t==="-"||t==="+")&&(t=r[++i]),t==="0"){if(i+1===e)return!0;if(t=r[++i],t==="b"){for(i++;i<e;i++)if(t=r[i],t!=="_"){if(t!=="0"&&t!=="1")return!1;n=!0}return n&&t!=="_"}if(t==="x"){for(i++;i<e;i++)if(t=r[i],t!=="_"){if(!a7e(r.charCodeAt(i)))return!1;n=!0}return n&&t!=="_"}if(t==="o"){for(i++;i<e;i++)if(t=r[i],t!=="_"){if(!s7e(r.charCodeAt(i)))return!1;n=!0}return n&&t!=="_"}}if(t==="_")return!1;for(;i<e;i++)if(t=r[i],t!=="_"){if(!l7e(r.charCodeAt(i)))return!1;n=!0}return!(!n||t==="_")}function c7e(r){var e=r,i=1,n;if(e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),n=e[0],(n==="-"||n==="+")&&(n==="-"&&(i=-1),e=e.slice(1),n=e[0]),e==="0")return 0;if(n==="0"){if(e[1]==="b")return i*parseInt(e.slice(2),2);if(e[1]==="x")return i*parseInt(e.slice(2),16);if(e[1]==="o")return i*parseInt(e.slice(2),8)}return i*parseInt(e,10)}function d7e(r){return Object.prototype.toString.call(r)==="[object Number]"&&r%1===0&&!Id.isNegativeZero(r)}var f7e=new Gc("tag:yaml.org,2002:int",{kind:"scalar",resolve:u7e,construct:c7e,predicate:d7e,represent:{binary:function(r){return r>=0?"0b"+r.toString(2):"-0b"+r.toString(2).slice(1)},octal:function(r){return r>=0?"0o"+r.toString(8):"-0o"+r.toString(8).slice(1)},decimal:function(r){return r.toString(10)},hexadecimal:function(r){return r>=0?"0x"+r.toString(16).toUpperCase():"-0x"+r.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),h7e=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function p7e(r){return!(r===null||!h7e.test(r)||r[r.length-1]==="_")}function g7e(r){var e,i;return e=r.replace(/_/g,"").toLowerCase(),i=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:i*parseFloat(e,10)}var v7e=/^[-+]?[0-9]+e/;function y7e(r,e){var i;if(isNaN(r))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===r)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===r)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Id.isNegativeZero(r))return"-0.0";return i=r.toString(10),v7e.test(i)?i.replace("e",".e"):i}function m7e(r){return Object.prototype.toString.call(r)==="[object Number]"&&(r%1!==0||Id.isNegativeZero(r))}var b7e=new Gc("tag:yaml.org,2002:float",{kind:"scalar",resolve:p7e,construct:g7e,predicate:m7e,represent:y7e,defaultStyle:"lowercase"}),S7e=Z9e.extend({implicit:[t7e,o7e,f7e,b7e]}),_7e=S7e,aEe=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),sEe=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function P7e(r){return r===null?!1:aEe.exec(r)!==null||sEe.exec(r)!==null}function C7e(r){var e,i,n,t,o,a,s,l=0,u=null,c,d,f;if(e=aEe.exec(r),e===null&&(e=sEe.exec(r)),e===null)throw new Error("Date resolve error");if(i=+e[1],n=+e[2]-1,t=+e[3],!e[4])return new Date(Date.UTC(i,n,t));if(o=+e[4],a=+e[5],s=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(c=+e[10],d=+(e[11]||0),u=(c*60+d)*6e4,e[9]==="-"&&(u=-u)),f=new Date(Date.UTC(i,n,t,o,a,s,l)),u&&f.setTime(f.getTime()-u),f}function T7e(r){return r.toISOString()}var x7e=new Gc("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:P7e,construct:C7e,instanceOf:Date,represent:T7e});function E7e(r){return r==="<<"||r===null}var A7e=new Gc("tag:yaml.org,2002:merge",{kind:"scalar",resolve:E7e}),a9=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
\r`;function w7e(r){if(r===null)return!1;var e,i,n=0,t=r.length,o=a9;for(i=0;i<t;i++)if(e=o.indexOf(r.charAt(i)),!(e>64)){if(e<0)return!1;n+=6}return n%8===0}function O7e(r){var e,i,n=r.replace(/[\r\n=]/g,""),t=n.length,o=a9,a=0,s=[];for(e=0;e<t;e++)e%4===0&&e&&(s.push(a>>16&255),s.push(a>>8&255),s.push(a&255)),a=a<<6|o.indexOf(n.charAt(e));return i=t%4*6,i===0?(s.push(a>>16&255),s.push(a>>8&255),s.push(a&255)):i===18?(s.push(a>>10&255),s.push(a>>2&255)):i===12&&s.push(a>>4&255),new Uint8Array(s)}function D7e(r){var e="",i=0,n,t,o=r.length,a=a9;for(n=0;n<o;n++)n%3===0&&n&&(e+=a[i>>18&63],e+=a[i>>12&63],e+=a[i>>6&63],e+=a[i&63]),i=(i<<8)+r[n];return t=o%3,t===0?(e+=a[i>>18&63],e+=a[i>>12&63],e+=a[i>>6&63],e+=a[i&63]):t===2?(e+=a[i>>10&63],e+=a[i>>4&63],e+=a[i<<2&63],e+=a[64]):t===1&&(e+=a[i>>2&63],e+=a[i<<4&63],e+=a[64],e+=a[64]),e}function R7e(r){return Object.prototype.toString.call(r)==="[object Uint8Array]"}var M7e=new Gc("tag:yaml.org,2002:binary",{kind:"scalar",resolve:w7e,construct:O7e,predicate:R7e,represent:D7e}),L7e=Object.prototype.hasOwnProperty,k7e=Object.prototype.toString;function I7e(r){if(r===null)return!0;var e=[],i,n,t,o,a,s=r;for(i=0,n=s.length;i<n;i+=1){if(t=s[i],a=!1,k7e.call(t)!=="[object Object]")return!1;for(o in t)if(L7e.call(t,o))if(!a)a=!0;else return!1;if(!a)return!1;if(e.indexOf(o)===-1)e.push(o);else return!1}return!0}function N7e(r){return r!==null?r:[]}var F7e=new Gc("tag:yaml.org,2002:omap",{kind:"sequence",resolve:I7e,construct:N7e}),j7e=Object.prototype.toString;function B7e(r){if(r===null)return!0;var e,i,n,t,o,a=r;for(o=new Array(a.length),e=0,i=a.length;e<i;e+=1){if(n=a[e],j7e.call(n)!=="[object Object]"||(t=Object.keys(n),t.length!==1))return!1;o[e]=[t[0],n[t[0]]]}return!0}function V7e(r){if(r===null)return[];var e,i,n,t,o,a=r;for(o=new Array(a.length),e=0,i=a.length;e<i;e+=1)n=a[e],t=Object.keys(n),o[e]=[t[0],n[t[0]]];return o}var H7e=new Gc("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:B7e,construct:V7e}),U7e=Object.prototype.hasOwnProperty;function z7e(r){if(r===null)return!0;var e,i=r;for(e in i)if(U7e.call(i,e)&&i[e]!==null)return!1;return!0}function W7e(r){return r!==null?r:{}}var G7e=new Gc("tag:yaml.org,2002:set",{kind:"mapping",resolve:z7e,construct:W7e}),Y7e=_7e.extend({implicit:[x7e,A7e],explicit:[M7e,F7e,H7e,G7e]}),HS=Object.prototype.hasOwnProperty,m3=1,lEe=2,uEe=3,b3=4,yG=1,$7e=2,Yde=3,q7e=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,X7e=/[\x85\u2028\u2029]/,K7e=/[,\[\]\{\}]/,cEe=/^(?:!|!!|![a-z\-]+!)$/i,dEe=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function $de(r){return Object.prototype.toString.call(r)}function Uv(r){return r===10||r===13}function p1(r){return r===9||r===32}function Of(r){return r===9||r===32||r===10||r===13}function lR(r){return r===44||r===91||r===93||r===123||r===125}function Z7e(r){var e;return 48<=r&&r<=57?r-48:(e=r|32,97<=e&&e<=102?e-97+10:-1)}function J7e(r){return r===120?2:r===117?4:r===85?8:0}function Q7e(r){return 48<=r&&r<=57?r-48:-1}function qde(r){return r===48?"\0":r===97?"\x07":r===98?"\b":r===116||r===9?"	":r===110?`
`:r===118?"\v":r===102?"\f":r===114?"\r":r===101?"\x1B":r===32?" ":r===34?'"':r===47?"/":r===92?"\\":r===78?"":r===95?" ":r===76?"\u2028":r===80?"\u2029":""}function eKe(r){return r<=65535?String.fromCharCode(r):String.fromCharCode((r-65536>>10)+55296,(r-65536&1023)+56320)}function fEe(r,e,i){e==="__proto__"?Object.defineProperty(r,e,{configurable:!0,enumerable:!0,writable:!0,value:i}):r[e]=i}var hEe=new Array(256),pEe=new Array(256);for(var WD=0;WD<256;WD++)hEe[WD]=qde(WD)?1:0,pEe[WD]=qde(WD);function tKe(r,e){this.input=r,this.filename=e.filename||null,this.schema=e.schema||Y7e,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=r.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function gEe(r,e){var i={name:r.filename,buffer:r.input.slice(0,-1),position:r.position,line:r.line,column:r.position-r.lineStart};return i.snippet=H9e(i),new N0(e,i)}function wi(r,e){throw gEe(r,e)}function S3(r,e){r.onWarning&&r.onWarning.call(null,gEe(r,e))}var Xde={YAML:function(e,i,n){var t,o,a;e.version!==null&&wi(e,"duplication of %YAML directive"),n.length!==1&&wi(e,"YAML directive accepts exactly one argument"),t=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),t===null&&wi(e,"ill-formed argument of the YAML directive"),o=parseInt(t[1],10),a=parseInt(t[2],10),o!==1&&wi(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=a<2,a!==1&&a!==2&&S3(e,"unsupported YAML version of the document")},TAG:function(e,i,n){var t,o;n.length!==2&&wi(e,"TAG directive accepts exactly two arguments"),t=n[0],o=n[1],cEe.test(t)||wi(e,"ill-formed tag handle (first argument) of the TAG directive"),HS.call(e.tagMap,t)&&wi(e,'there is a previously declared suffix for "'+t+'" tag handle'),dEe.test(o)||wi(e,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch{wi(e,"tag prefix is malformed: "+o)}e.tagMap[t]=o}};function LS(r,e,i,n){var t,o,a,s;if(e<i){if(s=r.input.slice(e,i),n)for(t=0,o=s.length;t<o;t+=1)a=s.charCodeAt(t),a===9||32<=a&&a<=1114111||wi(r,"expected valid JSON character");else q7e.test(s)&&wi(r,"the stream contains non-printable characters");r.result+=s}}function Kde(r,e,i,n){var t,o,a,s;for(Id.isObject(i)||wi(r,"cannot merge mappings; the provided source object is unacceptable"),t=Object.keys(i),a=0,s=t.length;a<s;a+=1)o=t[a],HS.call(e,o)||(fEe(e,o,i[o]),n[o]=!0)}function uR(r,e,i,n,t,o,a,s,l){var u,c;if(Array.isArray(t))for(t=Array.prototype.slice.call(t),u=0,c=t.length;u<c;u+=1)Array.isArray(t[u])&&wi(r,"nested arrays are not supported inside keys"),typeof t=="object"&&$de(t[u])==="[object Object]"&&(t[u]="[object Object]");if(typeof t=="object"&&$de(t)==="[object Object]"&&(t="[object Object]"),t=String(t),e===null&&(e={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(u=0,c=o.length;u<c;u+=1)Kde(r,e,o[u],i);else Kde(r,e,o,i);else!r.json&&!HS.call(i,t)&&HS.call(e,t)&&(r.line=a||r.line,r.lineStart=s||r.lineStart,r.position=l||r.position,wi(r,"duplicated mapping key")),fEe(e,t,o),delete i[t];return e}function s9(r){var e;e=r.input.charCodeAt(r.position),e===10?r.position++:e===13?(r.position++,r.input.charCodeAt(r.position)===10&&r.position++):wi(r,"a line break is expected"),r.line+=1,r.lineStart=r.position,r.firstTabInLine=-1}function Bl(r,e,i){for(var n=0,t=r.input.charCodeAt(r.position);t!==0;){for(;p1(t);)t===9&&r.firstTabInLine===-1&&(r.firstTabInLine=r.position),t=r.input.charCodeAt(++r.position);if(e&&t===35)do t=r.input.charCodeAt(++r.position);while(t!==10&&t!==13&&t!==0);if(Uv(t))for(s9(r),t=r.input.charCodeAt(r.position),n++,r.lineIndent=0;t===32;)r.lineIndent++,t=r.input.charCodeAt(++r.position);else break}return i!==-1&&n!==0&&r.lineIndent<i&&S3(r,"deficient indentation"),n}function XU(r){var e=r.position,i;return i=r.input.charCodeAt(e),!!((i===45||i===46)&&i===r.input.charCodeAt(e+1)&&i===r.input.charCodeAt(e+2)&&(e+=3,i=r.input.charCodeAt(e),i===0||Of(i)))}function l9(r,e){e===1?r.result+=" ":e>1&&(r.result+=Id.repeat(`
`,e-1))}function rKe(r,e,i){var n,t,o,a,s,l,u,c,d=r.kind,f=r.result,h;if(h=r.input.charCodeAt(r.position),Of(h)||lR(h)||h===35||h===38||h===42||h===33||h===124||h===62||h===39||h===34||h===37||h===64||h===96||(h===63||h===45)&&(t=r.input.charCodeAt(r.position+1),Of(t)||i&&lR(t)))return!1;for(r.kind="scalar",r.result="",o=a=r.position,s=!1;h!==0;){if(h===58){if(t=r.input.charCodeAt(r.position+1),Of(t)||i&&lR(t))break}else if(h===35){if(n=r.input.charCodeAt(r.position-1),Of(n))break}else{if(r.position===r.lineStart&&XU(r)||i&&lR(h))break;if(Uv(h))if(l=r.line,u=r.lineStart,c=r.lineIndent,Bl(r,!1,-1),r.lineIndent>=e){s=!0,h=r.input.charCodeAt(r.position);continue}else{r.position=a,r.line=l,r.lineStart=u,r.lineIndent=c;break}}s&&(LS(r,o,a,!1),l9(r,r.line-l),o=a=r.position,s=!1),p1(h)||(a=r.position+1),h=r.input.charCodeAt(++r.position)}return LS(r,o,a,!1),r.result?!0:(r.kind=d,r.result=f,!1)}function iKe(r,e){var i,n,t;if(i=r.input.charCodeAt(r.position),i!==39)return!1;for(r.kind="scalar",r.result="",r.position++,n=t=r.position;(i=r.input.charCodeAt(r.position))!==0;)if(i===39)if(LS(r,n,r.position,!0),i=r.input.charCodeAt(++r.position),i===39)n=r.position,r.position++,t=r.position;else return!0;else Uv(i)?(LS(r,n,t,!0),l9(r,Bl(r,!1,e)),n=t=r.position):r.position===r.lineStart&&XU(r)?wi(r,"unexpected end of the document within a single quoted scalar"):(r.position++,t=r.position);wi(r,"unexpected end of the stream within a single quoted scalar")}function nKe(r,e){var i,n,t,o,a,s;if(s=r.input.charCodeAt(r.position),s!==34)return!1;for(r.kind="scalar",r.result="",r.position++,i=n=r.position;(s=r.input.charCodeAt(r.position))!==0;){if(s===34)return LS(r,i,r.position,!0),r.position++,!0;if(s===92){if(LS(r,i,r.position,!0),s=r.input.charCodeAt(++r.position),Uv(s))Bl(r,!1,e);else if(s<256&&hEe[s])r.result+=pEe[s],r.position++;else if((a=J7e(s))>0){for(t=a,o=0;t>0;t--)s=r.input.charCodeAt(++r.position),(a=Z7e(s))>=0?o=(o<<4)+a:wi(r,"expected hexadecimal character");r.result+=eKe(o),r.position++}else wi(r,"unknown escape sequence");i=n=r.position}else Uv(s)?(LS(r,i,n,!0),l9(r,Bl(r,!1,e)),i=n=r.position):r.position===r.lineStart&&XU(r)?wi(r,"unexpected end of the document within a double quoted scalar"):(r.position++,n=r.position)}wi(r,"unexpected end of the stream within a double quoted scalar")}function oKe(r,e){var i=!0,n,t,o,a=r.tag,s,l=r.anchor,u,c,d,f,h,p=Object.create(null),g,v,y,m;if(m=r.input.charCodeAt(r.position),m===91)c=93,h=!1,s=[];else if(m===123)c=125,h=!0,s={};else return!1;for(r.anchor!==null&&(r.anchorMap[r.anchor]=s),m=r.input.charCodeAt(++r.position);m!==0;){if(Bl(r,!0,e),m=r.input.charCodeAt(r.position),m===c)return r.position++,r.tag=a,r.anchor=l,r.kind=h?"mapping":"sequence",r.result=s,!0;i?m===44&&wi(r,"expected the node content, but found ','"):wi(r,"missed comma between flow collection entries"),v=g=y=null,d=f=!1,m===63&&(u=r.input.charCodeAt(r.position+1),Of(u)&&(d=f=!0,r.position++,Bl(r,!0,e))),n=r.line,t=r.lineStart,o=r.position,aM(r,e,m3,!1,!0),v=r.tag,g=r.result,Bl(r,!0,e),m=r.input.charCodeAt(r.position),(f||r.line===n)&&m===58&&(d=!0,m=r.input.charCodeAt(++r.position),Bl(r,!0,e),aM(r,e,m3,!1,!0),y=r.result),h?uR(r,s,p,v,g,y,n,t,o):d?s.push(uR(r,null,p,v,g,y,n,t,o)):s.push(g),Bl(r,!0,e),m=r.input.charCodeAt(r.position),m===44?(i=!0,m=r.input.charCodeAt(++r.position)):i=!1}wi(r,"unexpected end of the stream within a flow collection")}function aKe(r,e){var i,n,t=yG,o=!1,a=!1,s=e,l=0,u=!1,c,d;if(d=r.input.charCodeAt(r.position),d===124)n=!1;else if(d===62)n=!0;else return!1;for(r.kind="scalar",r.result="";d!==0;)if(d=r.input.charCodeAt(++r.position),d===43||d===45)yG===t?t=d===43?Yde:$7e:wi(r,"repeat of a chomping mode identifier");else if((c=Q7e(d))>=0)c===0?wi(r,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?wi(r,"repeat of an indentation width identifier"):(s=e+c-1,a=!0);else break;if(p1(d)){do d=r.input.charCodeAt(++r.position);while(p1(d));if(d===35)do d=r.input.charCodeAt(++r.position);while(!Uv(d)&&d!==0)}for(;d!==0;){for(s9(r),r.lineIndent=0,d=r.input.charCodeAt(r.position);(!a||r.lineIndent<s)&&d===32;)r.lineIndent++,d=r.input.charCodeAt(++r.position);if(!a&&r.lineIndent>s&&(s=r.lineIndent),Uv(d)){l++;continue}if(r.lineIndent<s){t===Yde?r.result+=Id.repeat(`
`,o?1+l:l):t===yG&&o&&(r.result+=`
`);break}for(n?p1(d)?(u=!0,r.result+=Id.repeat(`
`,o?1+l:l)):u?(u=!1,r.result+=Id.repeat(`
`,l+1)):l===0?o&&(r.result+=" "):r.result+=Id.repeat(`
`,l):r.result+=Id.repeat(`
`,o?1+l:l),o=!0,a=!0,l=0,i=r.position;!Uv(d)&&d!==0;)d=r.input.charCodeAt(++r.position);LS(r,i,r.position,!1)}return!0}function Zde(r,e){var i,n=r.tag,t=r.anchor,o=[],a,s=!1,l;if(r.firstTabInLine!==-1)return!1;for(r.anchor!==null&&(r.anchorMap[r.anchor]=o),l=r.input.charCodeAt(r.position);l!==0&&(r.firstTabInLine!==-1&&(r.position=r.firstTabInLine,wi(r,"tab characters must not be used in indentation")),!(l!==45||(a=r.input.charCodeAt(r.position+1),!Of(a))));){if(s=!0,r.position++,Bl(r,!0,-1)&&r.lineIndent<=e){o.push(null),l=r.input.charCodeAt(r.position);continue}if(i=r.line,aM(r,e,uEe,!1,!0),o.push(r.result),Bl(r,!0,-1),l=r.input.charCodeAt(r.position),(r.line===i||r.lineIndent>e)&&l!==0)wi(r,"bad indentation of a sequence entry");else if(r.lineIndent<e)break}return s?(r.tag=n,r.anchor=t,r.kind="sequence",r.result=o,!0):!1}function sKe(r,e,i){var n,t,o,a,s,l,u=r.tag,c=r.anchor,d={},f=Object.create(null),h=null,p=null,g=null,v=!1,y=!1,m;if(r.firstTabInLine!==-1)return!1;for(r.anchor!==null&&(r.anchorMap[r.anchor]=d),m=r.input.charCodeAt(r.position);m!==0;){if(!v&&r.firstTabInLine!==-1&&(r.position=r.firstTabInLine,wi(r,"tab characters must not be used in indentation")),n=r.input.charCodeAt(r.position+1),o=r.line,(m===63||m===58)&&Of(n))m===63?(v&&(uR(r,d,f,h,p,null,a,s,l),h=p=g=null),y=!0,v=!0,t=!0):v?(v=!1,t=!0):wi(r,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),r.position+=1,m=n;else{if(a=r.line,s=r.lineStart,l=r.position,!aM(r,i,lEe,!1,!0))break;if(r.line===o){for(m=r.input.charCodeAt(r.position);p1(m);)m=r.input.charCodeAt(++r.position);if(m===58)m=r.input.charCodeAt(++r.position),Of(m)||wi(r,"a whitespace character is expected after the key-value separator within a block mapping"),v&&(uR(r,d,f,h,p,null,a,s,l),h=p=g=null),y=!0,v=!1,t=!1,h=r.tag,p=r.result;else if(y)wi(r,"can not read an implicit mapping pair; a colon is missed");else return r.tag=u,r.anchor=c,!0}else if(y)wi(r,"can not read a block mapping entry; a multiline key may not be an implicit key");else return r.tag=u,r.anchor=c,!0}if((r.line===o||r.lineIndent>e)&&(v&&(a=r.line,s=r.lineStart,l=r.position),aM(r,e,b3,!0,t)&&(v?p=r.result:g=r.result),v||(uR(r,d,f,h,p,g,a,s,l),h=p=g=null),Bl(r,!0,-1),m=r.input.charCodeAt(r.position)),(r.line===o||r.lineIndent>e)&&m!==0)wi(r,"bad indentation of a mapping entry");else if(r.lineIndent<e)break}return v&&uR(r,d,f,h,p,null,a,s,l),y&&(r.tag=u,r.anchor=c,r.kind="mapping",r.result=d),y}function lKe(r){var e,i=!1,n=!1,t,o,a;if(a=r.input.charCodeAt(r.position),a!==33)return!1;if(r.tag!==null&&wi(r,"duplication of a tag property"),a=r.input.charCodeAt(++r.position),a===60?(i=!0,a=r.input.charCodeAt(++r.position)):a===33?(n=!0,t="!!",a=r.input.charCodeAt(++r.position)):t="!",e=r.position,i){do a=r.input.charCodeAt(++r.position);while(a!==0&&a!==62);r.position<r.length?(o=r.input.slice(e,r.position),a=r.input.charCodeAt(++r.position)):wi(r,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!Of(a);)a===33&&(n?wi(r,"tag suffix cannot contain exclamation marks"):(t=r.input.slice(e-1,r.position+1),cEe.test(t)||wi(r,"named tag handle cannot contain such characters"),n=!0,e=r.position+1)),a=r.input.charCodeAt(++r.position);o=r.input.slice(e,r.position),K7e.test(o)&&wi(r,"tag suffix cannot contain flow indicator characters")}o&&!dEe.test(o)&&wi(r,"tag name cannot contain such characters: "+o);try{o=decodeURIComponent(o)}catch{wi(r,"tag name is malformed: "+o)}return i?r.tag=o:HS.call(r.tagMap,t)?r.tag=r.tagMap[t]+o:t==="!"?r.tag="!"+o:t==="!!"?r.tag="tag:yaml.org,2002:"+o:wi(r,'undeclared tag handle "'+t+'"'),!0}function uKe(r){var e,i;if(i=r.input.charCodeAt(r.position),i!==38)return!1;for(r.anchor!==null&&wi(r,"duplication of an anchor property"),i=r.input.charCodeAt(++r.position),e=r.position;i!==0&&!Of(i)&&!lR(i);)i=r.input.charCodeAt(++r.position);return r.position===e&&wi(r,"name of an anchor node must contain at least one character"),r.anchor=r.input.slice(e,r.position),!0}function cKe(r){var e,i,n;if(n=r.input.charCodeAt(r.position),n!==42)return!1;for(n=r.input.charCodeAt(++r.position),e=r.position;n!==0&&!Of(n)&&!lR(n);)n=r.input.charCodeAt(++r.position);return r.position===e&&wi(r,"name of an alias node must contain at least one character"),i=r.input.slice(e,r.position),HS.call(r.anchorMap,i)||wi(r,'unidentified alias "'+i+'"'),r.result=r.anchorMap[i],Bl(r,!0,-1),!0}function aM(r,e,i,n,t){var o,a,s,l=1,u=!1,c=!1,d,f,h,p,g,v;if(r.listener!==null&&r.listener("open",r),r.tag=null,r.anchor=null,r.kind=null,r.result=null,o=a=s=b3===i||uEe===i,n&&Bl(r,!0,-1)&&(u=!0,r.lineIndent>e?l=1:r.lineIndent===e?l=0:r.lineIndent<e&&(l=-1)),l===1)for(;lKe(r)||uKe(r);)Bl(r,!0,-1)?(u=!0,s=o,r.lineIndent>e?l=1:r.lineIndent===e?l=0:r.lineIndent<e&&(l=-1)):s=!1;if(s&&(s=u||t),(l===1||b3===i)&&(m3===i||lEe===i?g=e:g=e+1,v=r.position-r.lineStart,l===1?s&&(Zde(r,v)||sKe(r,v,g))||oKe(r,g)?c=!0:(a&&aKe(r,g)||iKe(r,g)||nKe(r,g)?c=!0:cKe(r)?(c=!0,(r.tag!==null||r.anchor!==null)&&wi(r,"alias node should not have any properties")):rKe(r,g,m3===i)&&(c=!0,r.tag===null&&(r.tag="?")),r.anchor!==null&&(r.anchorMap[r.anchor]=r.result)):l===0&&(c=s&&Zde(r,v))),r.tag===null)r.anchor!==null&&(r.anchorMap[r.anchor]=r.result);else if(r.tag==="?"){for(r.result!==null&&r.kind!=="scalar"&&wi(r,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+r.kind+'"'),d=0,f=r.implicitTypes.length;d<f;d+=1)if(p=r.implicitTypes[d],p.resolve(r.result)){r.result=p.construct(r.result),r.tag=p.tag,r.anchor!==null&&(r.anchorMap[r.anchor]=r.result);break}}else if(r.tag!=="!"){if(HS.call(r.typeMap[r.kind||"fallback"],r.tag))p=r.typeMap[r.kind||"fallback"][r.tag];else for(p=null,h=r.typeMap.multi[r.kind||"fallback"],d=0,f=h.length;d<f;d+=1)if(r.tag.slice(0,h[d].tag.length)===h[d].tag){p=h[d];break}p||wi(r,"unknown tag !<"+r.tag+">"),r.result!==null&&p.kind!==r.kind&&wi(r,"unacceptable node kind for !<"+r.tag+'> tag; it should be "'+p.kind+'", not "'+r.kind+'"'),p.resolve(r.result,r.tag)?(r.result=p.construct(r.result,r.tag),r.anchor!==null&&(r.anchorMap[r.anchor]=r.result)):wi(r,"cannot resolve a node with !<"+r.tag+"> explicit tag")}return r.listener!==null&&r.listener("close",r),r.tag!==null||r.anchor!==null||c}function dKe(r){var e=r.position,i,n,t,o=!1,a;for(r.version=null,r.checkLineBreaks=r.legacy,r.tagMap=Object.create(null),r.anchorMap=Object.create(null);(a=r.input.charCodeAt(r.position))!==0&&(Bl(r,!0,-1),a=r.input.charCodeAt(r.position),!(r.lineIndent>0||a!==37));){for(o=!0,a=r.input.charCodeAt(++r.position),i=r.position;a!==0&&!Of(a);)a=r.input.charCodeAt(++r.position);for(n=r.input.slice(i,r.position),t=[],n.length<1&&wi(r,"directive name must not be less than one character in length");a!==0;){for(;p1(a);)a=r.input.charCodeAt(++r.position);if(a===35){do a=r.input.charCodeAt(++r.position);while(a!==0&&!Uv(a));break}if(Uv(a))break;for(i=r.position;a!==0&&!Of(a);)a=r.input.charCodeAt(++r.position);t.push(r.input.slice(i,r.position))}a!==0&&s9(r),HS.call(Xde,n)?Xde[n](r,n,t):S3(r,'unknown document directive "'+n+'"')}if(Bl(r,!0,-1),r.lineIndent===0&&r.input.charCodeAt(r.position)===45&&r.input.charCodeAt(r.position+1)===45&&r.input.charCodeAt(r.position+2)===45?(r.position+=3,Bl(r,!0,-1)):o&&wi(r,"directives end mark is expected"),aM(r,r.lineIndent-1,b3,!1,!0),Bl(r,!0,-1),r.checkLineBreaks&&X7e.test(r.input.slice(e,r.position))&&S3(r,"non-ASCII line breaks are interpreted as content"),r.documents.push(r.result),r.position===r.lineStart&&XU(r)){r.input.charCodeAt(r.position)===46&&(r.position+=3,Bl(r,!0,-1));return}if(r.position<r.length-1)wi(r,"end of the stream or a document separator is expected");else return}function fKe(r,e){r=String(r),e=e||{},r.length!==0&&(r.charCodeAt(r.length-1)!==10&&r.charCodeAt(r.length-1)!==13&&(r+=`
`),r.charCodeAt(0)===65279&&(r=r.slice(1)));var i=new tKe(r,e),n=r.indexOf("\0");for(n!==-1&&(i.position=n,wi(i,"null byte is not allowed in input")),i.input+="\0";i.input.charCodeAt(i.position)===32;)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)dKe(i);return i.documents}function hKe(r,e){var i=fKe(r,e);if(i.length!==0){if(i.length===1)return i[0];throw new N0("expected a single document in the stream, but found more")}}var pKe=hKe,gKe={load:pKe},vKe=gKe.load;class vEe{constructor(e){this.config=e}get fileDownloadBaseUrl(){return this.config.httpUrl}async postJSON(e,i){const n=i?JSON.stringify(i):"{}",t=await fetch(this.config.grpcUrl+e,{method:"POST",headers:{"Content-Type":"application/json"},body:n});if(!t.ok)throw new Error(`HTTP ${t.status} ${t.statusText}`);return t.json()}async fetchYaml(e,i){const n=new AbortController,t=i!=null&&i.timeoutMs?setTimeout(()=>n.abort(),i.timeoutMs):void 0;try{const o=await fetch(`${this.config.httpUrl}/api/broker/files?path=${e}`,{signal:(i==null?void 0:i.signal)??n.signal,redirect:"follow",cache:"no-store"});if(!o.ok)throw new Error(`HTTP ${o.status} ${o.statusText}`);const a=await o.text();return console.log("as YAML",a),vKe(a)}finally{t&&clearTimeout(t)}}async*postJSONStream(e,i,n){var u,c;const t=await fetch(this.config.grpcUrl+e,{method:"POST",headers:{"content-type":"application/json"},body:i?JSON.stringify(i):"{}",signal:n});if(!t.body){yield await t.json();return}const o=t.body.getReader(),a=new TextDecoder;let s="";const l=()=>{try{o.cancel("aborted")}catch{}};n==null||n.addEventListener("abort",l,{once:!0});try{for(;;){const{done:d,value:f}=await o.read();if(d)break;s+=a.decode(f,{stream:!0});const h=s.split(/\r?\n/);s=h.pop()??"";for(const p of h){const g=p.trim();if(g)try{yield JSON.parse(g)}catch{}}}if(s.trim())try{yield JSON.parse(s.trim())}catch{}}catch(d){if((d==null?void 0:d.name)!=="AbortError")throw d}finally{n==null||n.removeEventListener("abort",l);try{await o.cancel("done")}catch{}try{o.releaseLock()}catch{}try{await((c=(u=t.body)==null?void 0:u.cancel)==null?void 0:c.call(u,"done"))}catch{}}}}function yKe(r,e){const i=a=>a.replace(/\\/g,"/").split(/[?#]/)[0];let n=i(r);const t=i(e);return n.startsWith("/")||(n="/"+n),new URL(t,"http://x"+n).pathname}class mKe{constructor(e,i,n,t){this.name=e,this.path=i,this.type=n,this.downloadBaseUrl=t,this.isDirectory=!1}url(){return`${this.downloadBaseUrl}/api/broker/files?path=${this.path}`}}class mG{constructor(e,i,n=Ro.FILE_TYPE_FOLDER,t=[]){this.name=e,this.path=i,this.type=n,this.files=t,this.isDirectory=!0}findAll(e){return this.doFindAll(e)}doFindAll(e){const i=[],n=t=>{for(const o of t)o.isDirectory?n(o.files):(!e||o.type===e)&&i.push(o)};return n(this.files),i}flatten(){return this.doFindAll(void 0)}}class yEe{constructor(e){this.listFiles=async(i="/",n=!1,t)=>{const o=i,a=(()=>{if(!t)return;const f=Array.isArray(t)?t:[t];return n&&!f.includes(Ro.FILE_TYPE_FOLDER)?[...f,Ro.FILE_TYPE_FOLDER]:f})(),s=f=>{const h=f.replace(/\/+$/,"");if(h===""||h==="/")return"/";const p=h.split("/").filter(Boolean);return p.length?p[p.length-1]:"/"},l=async f=>{const h={path:f,types:a==null?void 0:a.map(y=>this.convertFileTypeDomainToDTO(y))},g=(await this.http.postJSON("/v1/ListRecordingFiles/",h)).files??[],v=new mG(f==="/"?"/":s(f),f,Ro.FILE_TYPE_FOLDER,[]);for(const y of g)if(y.type===Za.FILE_TYPE_FOLDER&&n){const m=await l(y.path);v.files.push(m)}else{const m=y.type===Za.FILE_TYPE_FOLDER?new mG(s(y.path),y.path,this.convertFileTypeDTOToDomain(y.type),[]):new mKe(s(y.path),y.path,this.convertFileTypeDTOToDomain(y.type),this.http.fileDownloadBaseUrl);v.files.push(m)}return v},u=f=>{const h=t?Array.isArray(t)?t:[t]:void 0;if(!f.isDirectory)return f;const p=f.files.map(g=>u(g)).filter(g=>!g.isDirectory||h&&h.includes(Ro.FILE_TYPE_FOLDER)?!0:g.isDirectory&&g.files.length>0);return{...f,files:p}},c=await l(o),d=u(c);return new mG("/","/",Ro.FILE_TYPE_FOLDER,d.files)},this.http=new vEe(e)}convertFileTypeDomainToDTO(e){switch(e){case null:case void 0:case Ro.FILE_TYPE_UNKNOWN:return Za.FILE_TYPE_UNKNOWN;case Ro.FILE_TYPE_FOLDER:return Za.FILE_TYPE_FOLDER;case Ro.FILE_TYPE_VIDEO:return Za.FILE_TYPE_VIDEO;case Ro.FILE_TYPE_AUDIO:return Za.FILE_TYPE_AUDIO;case Ro.FILE_TYPE_IMAGE:return Za.FILE_TYPE_IMAGE;case Ro.FILE_TYPE_RECORDING:return Za.FILE_TYPE_RECORDING;case Ro.FILE_TYPE_RECORDING_SESSION:return Za.FILE_TYPE_RECORDING_SESSION;case Ro.FILE_TYPE_RECORDING_MAPPING:return Za.FILE_TYPE_RECORDING_MAPPING;case Ro.FILE_TYPE_PLATFORM:return Za.FILE_TYPE_PLATFORM;case Ro.FILE_TYPE_INSTANCE:return Za.FILE_TYPE_INSTANCE;case Ro.FILE_TYPE_SIGNAL_DATABASE:return Za.FILE_TYPE_SIGNAL_DATABASE;default:throw new Error(`Unknown FileType: ${e}`)}}convertFileTypeDTOToDomain(e){switch(e){case Za.FILE_TYPE_UNKNOWN:return Ro.FILE_TYPE_UNKNOWN;case Za.FILE_TYPE_FOLDER:return Ro.FILE_TYPE_FOLDER;case Za.FILE_TYPE_VIDEO:return Ro.FILE_TYPE_VIDEO;case Za.FILE_TYPE_AUDIO:return Ro.FILE_TYPE_AUDIO;case Za.FILE_TYPE_IMAGE:return Ro.FILE_TYPE_IMAGE;case Za.FILE_TYPE_RECORDING:return Ro.FILE_TYPE_RECORDING;case Za.FILE_TYPE_RECORDING_SESSION:return Ro.FILE_TYPE_RECORDING_SESSION;case Za.FILE_TYPE_RECORDING_MAPPING:return Ro.FILE_TYPE_RECORDING_MAPPING;case Za.FILE_TYPE_PLATFORM:return Ro.FILE_TYPE_PLATFORM;case Za.FILE_TYPE_INSTANCE:return Ro.FILE_TYPE_INSTANCE;case Za.FILE_TYPE_SIGNAL_DATABASE:return Ro.FILE_TYPE_SIGNAL_DATABASE;default:throw new Error(`Unknown FileTypeDTO: ${e}`)}}async fetchSessionInfo(e){try{const i=await this.http.fetchYaml(e),n=pG(i.start_time),t=pG(i.end_time),o=i.files.map(s=>{if(s.type==="recording")return{location:s.location,devices:s.devices};{const l=s.start_time?pG(s.start_time):void 0,u=_9e(s.offset)||0,c=l!==void 0?l-n+u:u;return{location:s.location,name:s.name??s.location,offsetMs:c,startTimeMs:l,url:`${this.http.fileDownloadBaseUrl}/api/broker/files?path=${yKe(e,s.location)}`}}}),a=o.filter(s=>"url"in s);return{path:e,name:i.name,startTimeMs:n,endTimeMs:t,durationMs:t-n,files:o,videos:a}}catch(i){throw i}}}const Jde=5e3;class mEe{constructor(e){this.play=async i=>{const n={path:i};await this.http.postJSON("/v1/RecordingSession/PlaybackPlay",n)},this.pause=async i=>{const n={path:i};await this.http.postJSON("/v1/RecordingSession/PlaybackPause",n)},this.seek=async(i,n)=>{const t={path:i,offset:n};await this.http.postJSON("/v1/RecordingSession/PlaybackSeek",t)},this.stopRepeat=async i=>{const n={path:i,startOffset:void 0,endOffset:void 0};await this.http.postJSON("/v1/RecordingSession/PlaybackRepeat",n)},this.repeatEntireRecording=async i=>{const n={path:i,startOffset:0,endOffset:void 0};await this.http.postJSON("/v1/RecordingSession/PlaybackRepeat",n)},this.repeatWithOffset=async(i,n,t)=>{console.log(`> repeat (${i})`);const o={path:i,startOffset:n,endOffset:t};await this.http.postJSON("/v1/RecordingSession/PlaybackRepeat",o)},this.open=async i=>{const n={path:i};await this.http.postJSON("/v1/RecordingSession/PlaybackOpen",n)},this.close=async i=>{const n={path:i};await this.http.postJSON("/v1/RecordingSession/PlaybackClose",n)},this.subscribeToPlaybackStatuses=async(i,n,t)=>{this._abortController&&(this._abortController.abort(),this._abortController=void 0),this._abortController=new AbortController,await this.tryConnectPlaybackStream(i,n,t)},this.stopPlaybackStatusStream=()=>{this._abortController&&(this._abortController.abort(),this._abortController=void 0),this._currentPlaybackStream&&(this._currentPlaybackStream(),this._currentPlaybackStream=void 0)},this.http=new vEe(e),this._currentPlaybackStream=void 0,this._abortController=void 0}convertPlaybackModeDTOToDomain(e){switch(e){case null:case void 0:case bV.PLAYBACK_PLAYING:return k0.PLAYBACK_PLAYING;case bV.PLAYBACK_PAUSED:return k0.PLAYBACK_PAUSED;case bV.PLAYBACK_CLOSED:return k0.PLAYBACK_CLOSED;default:throw new Error(`Unknown PlaybackModeDTO: ${e}`)}}convertPlaybackStatusDTOToDomain(e){return{path:e.path,mode:this.convertPlaybackModeDTOToDomain(e.mode),elapsedTimeMs:e.offset/1e3,repeat:e.repeat?{startOffset:e.repeat.startOffset,endOffset:e.repeat.endOffset}:void 0}}async waitForRetry(e){return new Promise(i=>{var o;const n=setTimeout(i,e),t=()=>{clearTimeout(n),i()};(o=this._abortController)==null||o.signal.addEventListener("abort",t,{once:!0})})}async consumePlaybackStatusStream(e,i){var n;for await(const t of e){const o=((n=t.items)==null?void 0:n.map(a=>this.convertPlaybackStatusDTOToDomain(a)))??[];i({items:o})}}async tryConnectPlaybackStream(e,i,n){if(!(!this._abortController||this._abortController.signal.aborted))try{const t=this.http.postJSONStream("/v1/RecordingSession/PlaybackStatus",{},this._abortController.signal);console.log("Playback status stream connected"),n(),e({items:[]}),await this.consumePlaybackStatusStream(t,e),console.log("Playback status stream ended");return}catch(t){if((t==null?void 0:t.name)==="AbortError"||!this._abortController)return;console.log(`Playback status stream error, retrying in ${Jde}ms...`,t),i(t),await this.waitForRetry(Jde),await this.tryConnectPlaybackStream(e,i,n)}}}function bEe(){const r=kX(),[e,i]=G.useState(void 0),[n,t]=G.useState([]),[o,a]=G.useState([]),[s,l]=G.useState(!0),u=G.useRef(null),c=G.useRef(0);G.useEffect(()=>{if(u.current===r.httpUrl&&e!==void 0)return;u.current=r.httpUrl;let h=!1;const p=async()=>{l(!0);try{const g=new mEe(r),v=new yEe(r);if(!h){const y=new STe(g,v),m=new n4e(v);i({playbackService:y,recordingSessionService:m})}}catch(g){console.error("Failed to initialize playback services:",g),h||(i(void 0),l(!1))}};return i(void 0),t([]),a([]),p(),()=>{h=!0}},[r]),G.useEffect(()=>{if(!e)return;let h=!1;return(async()=>{try{const g=await e.recordingSessionService.listFiles("/",!0,[Ro.FILE_TYPE_RECORDING_SESSION]);console.log("fetchFiles",g),h||(t(g.flatten()),a(g.files),l(!1))}catch(g){console.error("Failed to fetch recording files:",g),h||(t([]),a([]),l(!1))}})(),()=>{h=!0}},[e,c.current]);const d=G.useCallback(async h=>{if(!e)throw new Error("Playback services not initialized");await e.playbackService.open(h)},[e]),f=G.useCallback(()=>{c.current+=1,l(!0)},[]);return{files:n,fileTree:o,isLoading:s,open:d,refresh:f}}const u9=G.createContext(void 0);function c9(){const r=G.useContext(u9);if(r===void 0)throw new Error("useAccumulatedPlaybacks must be used within a PlaybackProvider");return G.useSyncExternalStore(i=>r.subscribeAll(i),()=>r.getAll())}function SEe(r){const e=G.useContext(u9);if(e===void 0)throw new Error("usePlayback must be used within a PlaybackProvider");return G.useSyncExternalStore(n=>e.subscribe(r,n),()=>e.get(r))}class bKe{constructor(){this.openPlaybacks=new Map,this.perPathPlaybackListeners=new Map,this.accumulatedPlaybackListeners=new Set,this.latestAccumulatedPlaybacks=[]}get(e){return this.openPlaybacks.get(e)}getAll(){return this.latestAccumulatedPlaybacks}update(e,i){var n;this.openPlaybacks.set(e,i),this.latestAccumulatedPlaybacks=Array.from(this.openPlaybacks.values()),(n=this.perPathPlaybackListeners.get(e))==null||n.forEach(t=>t()),this.accumulatedPlaybackListeners.forEach(t=>t())}delete(e){var i;this.openPlaybacks.delete(e),this.latestAccumulatedPlaybacks=Array.from(this.openPlaybacks.values()),(i=this.perPathPlaybackListeners.get(e))==null||i.forEach(n=>n()),this.accumulatedPlaybackListeners.forEach(n=>n())}subscribe(e,i){return this.perPathPlaybackListeners.has(e)||this.perPathPlaybackListeners.set(e,new Set),this.perPathPlaybackListeners.get(e).add(i),()=>{var n;(n=this.perPathPlaybackListeners.get(e))==null||n.delete(i)}}subscribeAll(e){return this.accumulatedPlaybackListeners.add(e),()=>{this.accumulatedPlaybackListeners.delete(e)}}clear(){this.openPlaybacks.clear(),this.latestAccumulatedPlaybacks=[],this.perPathPlaybackListeners.clear(),this.accumulatedPlaybackListeners.clear()}}function SKe(r){const e=kX(),{onRecordingSessionClosed:i,onFetchError:n,children:t}=r,[o,a]=G.useState(void 0),s=G.useRef(new bKe),l=G.useRef(null),[u,c]=G.useState(!1);return G.useEffect(()=>{if(l.current===e.grpcUrl&&o!==void 0)return;l.current=e.grpcUrl;let d=!1;const f=async()=>{try{const h=new mEe(e),p=new yEe(e);if(!d){const g=new STe(h,p);a(g)}}catch(h){console.error("Failed to create PlaybackService:",h),d||a(void 0)}};return a(void 0),s.current.clear(),f(),()=>{d=!0}},[e]),G.useEffect(()=>{if(!o)return;const d=(v,y)=>{s.current.update(v,y),c(!1)},f=v=>{s.current.delete(v),i==null||i(v),c(!1)},h=()=>{c(!0),s.current.clear()},p=(v,y)=>{n==null||n(v,y)},g=()=>{c(!1)};return o.subscribeToRecordingSessionPlaybacks(d,f,h,p,g),()=>{o.stopPlaybackStatusStream(),s.current.clear()}},[o,i,n]),R.jsxs(u9.Provider,{value:s.current,children:[u&&R.jsx("p",{className:"text-red-500 text-sm",children:"Unable to connect to playback stream"}),t]})}function _Ke(r){const{fileTree:e,open:i}=bEe(),n=c9(),[t,o]=G.useState(n.length>0),a=(h,p)=>R.jsx("div",{className:"grow min-w-0",children:h.map((g,v)=>R.jsx("div",{className:h.length>1&&v!==h.length-1?"mb-1 mx-1":" mx-1",children:R.jsx(T9e,{className:p,recordingSessionInfo:g.recordingSessionInfo,playbackControls:g.playbackControls,productAnalyticsTracker:r.productAnalyticsTracker,onAfterClose:()=>{h.length<=2&&l(150)}})},g.recordingSessionInfo.path))}),s=h=>R.jsx(x9e,{recordingSessionPlaybacks:h}),l=async(h=0)=>{await new Promise(p=>setTimeout(p,h)),o(!1)},u=async(h=0)=>{await new Promise(p=>setTimeout(p,h)),o(!0)},c=()=>{o(!t)},d=R.jsx(w9e,{expandAll:!0,fileTree:e,show:r.showFileTreeModal,playingFilePaths:n.map(h=>h.recordingSessionInfo.path).filter(h=>h!==void 0),open:i,onAfterSelect:()=>{n.length>=1&&u(350)},handleCloseFunction:()=>{r.setShowFileTreeModal(!1)}});if(n.length===0)return d;const f=h=>R.jsxs(R.Fragment,{children:[R.jsx("div",{className:"my-1",id:"maincard-container-id-tw",children:R.jsx("div",{className:"col-12 p-0",children:R.jsx("div",{className:"p-0",id:"maincard-container-card-id-tw",children:R.jsx("div",{className:"row m-0 p-0 mb-0 flex ",children:R.jsx("div",{className:"flex flex-col p-0 m-0 w-full mx-1",id:"playback-controls-card-container-tw",children:R.jsx("div",{className:"border-0",id:"playback-controls-card-tw",children:R.jsx("div",{className:"p-0 m-0",children:R.jsx("div",{className:"w-full",children:R.jsx("div",{className:"bg-[var(--primary-10)] rounded-sm",children:h})})})})})})})})}),d]});return n.length===1?f(R.jsx("div",{className:"py-1",children:a(n,"bg-transparent dark:bg-transparent")})):f(R.jsxs(R.Fragment,{children:[R.jsxs("button",{onClick:c,className:Wi("flex items-center w-full py-1","bg-transparent border-0","cursor-pointer"),children:[R.jsx("div",{className:"flex grow flex-wrap-reverse text-foreground dark:text-neutral-200 mr-2 gap-x-1 gap-y-2 min-w-0",children:R.jsx("div",{className:"grow self-center min-w-0",style:{flexBasis:"350px"},children:s(n)})}),R.jsx(d3,{className:Wi("text-muted-foreground transition-transform duration-200 me-1 hover:bg-accent rounded-sm",t&&"rotate-180"),sx:{fontSize:24}})]}),R.jsx("div",{className:Wi("overflow-hidden transition-all duration-300 ease-in-out",t?"max-h-[1000px] opacity-100":"max-h-0 opacity-0"),children:R.jsx("div",{className:"px-0 pt-0 pb-1 flex content-start",children:a(n)})})]}))}function PKe(r){const[e,i]=G.useState(),[n,t]=G.useState(),o=c9(),a=G.useMemo(()=>[...new Set(o.flatMap(m=>m.recordingSessionInfo.videos).map(m=>m.name))],[o]),s=G.useMemo(()=>e?o.filter(m=>m.recordingSessionInfo.videos.some(b=>b.name===e)):[],[e,o]),l=n==null?void 0:n.recordingSessionInfo.videos.find(m=>m.name===e),[u,c]=G.useState(!1),[d,f]=G.useState(!1),h=G.useRef(null),p=G.useRef(null);G.useEffect(()=>{function m(b){h.current&&!h.current.contains(b.target)&&c(!1),p.current&&!p.current.contains(b.target)&&f(!1)}return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[]),G.useEffect(()=>{s.length===1&&t(s[0])},[s]);const g=m=>{i(m),t(void 0),f(!1)},v=()=>{i(void 0),t(void 0),r.handleCloseFunction()},y=()=>{if(!l||!n)return;const m={videoFilePath:l.location,videoName:l.name,recordingSessionPath:n.recordingSessionInfo.path};r.savePanelFunction(l.location,m),v()};return r.show?au.createPortal(R.jsxs(R.Fragment,{children:[R.jsx("div",{className:"fixed inset-0 bg-black/50 z-[9998]",onClick:v}),R.jsxs("div",{className:Wi("fixed z-[9999]","top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2","w-full max-w-2xl max-h-[90vh]","flex flex-col","bg-white dark:bg-neutral-900","rounded-lg shadow-xl"),children:[R.jsxs("div",{className:Wi("flex items-center justify-between px-4 py-3","bg-remotive-primary-60 dark:bg-remotive-primary-70","rounded-t-lg"),children:[R.jsx("h2",{className:"text-lg font-medium text-white m-0",children:o.length>0?"Select video to play":"No open recording sessions"}),R.jsx("button",{onClick:v,className:Wi("p-1 rounded","text-white/80 hover:text-white hover:bg-white/10","transition-colors"),children:R.jsx(tM,{sx:{fontSize:24}})})]}),R.jsx("div",{className:"flex-1 p-4",children:o.length>0?R.jsxs("div",{className:"space-y-4",children:[R.jsxs("div",{className:"flex items-center gap-2",children:[R.jsx("span",{className:"text-sm font-medium w-24 text-foreground dark:text-neutral-200",children:"Video"}),R.jsxs("div",{className:"relative flex-1",ref:p,children:[R.jsxs("button",{onClick:()=>f(!d),className:Wi("w-full flex items-center justify-between px-3 py-2","bg-transparent text-foreground dark:text-neutral-200","border border-neutral-300 dark:border-neutral-600","rounded text-sm text-left","hover:border-neutral-400 dark:hover:border-neutral-500","truncate"),children:[R.jsx("span",{className:"truncate",children:e??"Select video..."}),R.jsx(d3,{className:Wi("ml-2 transition-transform",d&&"rotate-180"),sx:{fontSize:20}})]}),d&&R.jsx("div",{className:Wi("absolute top-full left-0 right-0 mt-1 z-10","bg-white dark:bg-neutral-800","border border-neutral-200 dark:border-neutral-700","rounded shadow-lg","max-h-60 overflow-y-auto"),children:a.map(m=>R.jsx("button",{className:Wi("w-full px-3 py-2 text-left text-sm","text-foreground dark:text-neutral-200","hover:bg-neutral-100 dark:hover:bg-neutral-700","truncate"),onClick:()=>g(m),children:m},m))})]})]}),e&&s.length>1&&R.jsxs("div",{className:"flex items-center gap-2",children:[R.jsx("span",{className:"text-sm font-medium w-24 text-foreground dark:text-neutral-200",children:"Recording"}),R.jsxs("div",{className:"relative flex-1",ref:h,children:[R.jsxs("button",{onClick:()=>c(!u),className:Wi("w-full flex items-center justify-between px-3 py-2","bg-transparent text-foreground dark:text-neutral-200","border border-neutral-300 dark:border-neutral-600","rounded text-sm text-left","hover:border-neutral-400 dark:hover:border-neutral-500","truncate"),children:[R.jsx("span",{className:"truncate",children:(n==null?void 0:n.recordingSessionInfo.path)??"Select recording..."}),R.jsx(d3,{className:Wi("ml-2 transition-transform",u&&"rotate-180"),sx:{fontSize:20}})]}),u&&R.jsx("div",{className:Wi("absolute top-full left-0 right-0 mt-1 z-10","bg-white dark:bg-neutral-800","border border-neutral-200 dark:border-neutral-700","rounded shadow-lg","max-h-60 overflow-y-auto"),children:s.map(m=>R.jsx("button",{className:Wi("w-full px-3 py-2 text-left text-sm","text-foreground dark:text-neutral-200","hover:bg-neutral-100 dark:hover:bg-neutral-700","truncate"),onClick:()=>{t(m),c(!1)},children:m.recordingSessionInfo.path},m.recordingSessionInfo.path))})]})]}),e&&s.length===1&&R.jsxs("div",{className:"flex items-center gap-2",children:[R.jsx("span",{className:"text-sm font-medium w-24 text-foreground dark:text-neutral-200",children:"Recording"}),R.jsx("span",{className:"text-sm text-foreground dark:text-neutral-200 truncate",children:s[0].recordingSessionInfo.path})]})]}):R.jsx("p",{className:"text-sm text-foreground dark:text-neutral-200",children:"To view available videos, open a recording session that contains videos first."})}),R.jsxs("div",{className:"flex justify-end gap-2 px-4 py-3 border-t border-neutral-200 dark:border-neutral-700 rounded-b-lg",children:[R.jsx("button",{className:Wi("px-4 py-2 rounded","bg-primary text-primary-foreground","hover:bg-primary/90","transition-colors"),onClick:v,children:"Cancel"}),R.jsx("button",{disabled:!l||!n,className:Wi("px-4 py-2 rounded","bg-green-600 text-white","hover:bg-green-700","disabled:opacity-50 disabled:cursor-not-allowed","transition-colors"),onClick:y,children:"Apply"})]})]})]}),document.body):null}var bG,Qde;function KU(){if(Qde)return bG;Qde=1;var r;return typeof window<"u"?r=window:typeof Ch<"u"?r=Ch:typeof self<"u"?r=self:r={},bG=r,bG}var CKe=KU();const bt=Lu(CKe),TKe={},xKe=Object.freeze(Object.defineProperty({__proto__:null,default:TKe},Symbol.toStringTag,{value:"Module"})),EKe=tb(xKe);var SG,efe;function _Ee(){if(efe)return SG;efe=1;var r=typeof Ch<"u"?Ch:typeof window<"u"?window:{},e=EKe,i;return typeof document<"u"?i=document:(i=r["__GLOBAL_DOCUMENT_CACHE@4"],i||(i=r["__GLOBAL_DOCUMENT_CACHE@4"]=e)),SG=i,SG}var AKe=_Ee();const Vr=Lu(AKe);var Zj={exports:{}},tfe;function wKe(){return tfe||(tfe=1,(function(r,e){function i(l){if(l&&typeof l=="object"){var u=l.which||l.keyCode||l.charCode;u&&(l=u)}if(typeof l=="number")return a[l];var c=String(l),d=n[c.toLowerCase()];if(d)return d;var d=t[c.toLowerCase()];if(d)return d;if(c.length===1)return c.charCodeAt(0)}i.isEventKey=function(u,c){if(u&&typeof u=="object"){var d=u.which||u.keyCode||u.charCode;if(d==null)return!1;if(typeof c=="string"){var f=n[c.toLowerCase()];if(f)return f===d;var f=t[c.toLowerCase()];if(f)return f===d}else if(typeof c=="number")return c===d;return!1}},e=r.exports=i;var n=e.code=e.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},t=e.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};/*!
 * Programatically add the following
 */for(o=97;o<123;o++)n[String.fromCharCode(o)]=o-32;for(var o=48;o<58;o++)n[o-48]=o;for(o=1;o<13;o++)n["f"+o]=o+111;for(o=0;o<10;o++)n["numpad "+o]=o+96;var a=e.names=e.title={};for(o in n)a[n[o]]=o;for(var s in t)n[s]=t[s]})(Zj,Zj.exports)),Zj.exports}var OKe=wKe();const gn=Lu(OKe);function sn(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function sM(r,e){return sM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},sM(r,e)}function zr(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,sM(r,e)}var _G,rfe;function DKe(){if(rfe)return _G;rfe=1,_G=r;function r(e,i){var n,t=null;try{n=JSON.parse(e,i)}catch(o){t=o}return[t,n]}return _G}var RKe=DKe();const MKe=Lu(RKe);var Jj={exports:{}},PG,ife;function LKe(){if(ife)return PG;ife=1,PG=e;var r=Object.prototype.toString;function e(i){if(!i)return!1;var n=r.call(i);return n==="[object Function]"||typeof i=="function"&&n!=="[object RegExp]"||typeof window<"u"&&(i===window.setTimeout||i===window.alert||i===window.confirm||i===window.prompt)}return PG}var CG,nfe;function kKe(){if(nfe)return CG;nfe=1;var r=KU(),e=function(t,o){return o===void 0&&(o=!1),function(a,s,l){if(a){t(a);return}if(s.statusCode>=400&&s.statusCode<=599){var u=l;if(o)if(r.TextDecoder){var c=i(s.headers&&s.headers["content-type"]);try{u=new TextDecoder(c).decode(l)}catch{}}else u=String.fromCharCode.apply(null,new Uint8Array(l));t({cause:u});return}t(null,l)}};function i(n){return n===void 0&&(n=""),n.toLowerCase().split(";").reduce(function(t,o){var a=o.split("="),s=a[0],l=a[1];return s.trim()==="charset"?l.trim():t},"utf-8")}return CG=e,CG}var ofe;function IKe(){if(ofe)return Jj.exports;ofe=1;var r=KU(),e=OTe(),i=LKe();s.httpHandler=kKe();/**
 * @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 n=function(f){var h={};return f&&f.trim().split(`
`).forEach(function(p){var g=p.indexOf(":"),v=p.slice(0,g).trim().toLowerCase(),y=p.slice(g+1).trim();typeof h[v]>"u"?h[v]=y:Array.isArray(h[v])?h[v].push(y):h[v]=[h[v],y]}),h};Jj.exports=s,Jj.exports.default=s,s.XMLHttpRequest=r.XMLHttpRequest||c,s.XDomainRequest="withCredentials"in new s.XMLHttpRequest?s.XMLHttpRequest:r.XDomainRequest,t(["get","put","post","patch","head","delete"],function(d){s[d==="delete"?"del":d]=function(f,h,p){return h=a(f,h,p),h.method=d.toUpperCase(),l(h)}});function t(d,f){for(var h=0;h<d.length;h++)f(d[h])}function o(d){for(var f in d)if(d.hasOwnProperty(f))return!1;return!0}function a(d,f,h){var p=d;return i(f)?(h=f,typeof d=="string"&&(p={uri:d})):p=e({},f,{uri:d}),p.callback=h,p}function s(d,f,h){return f=a(d,f,h),l(f)}function l(d){if(typeof d.callback>"u")throw new Error("callback argument missing");var f=!1,h=function(j,N,V){f||(f=!0,d.callback(j,N,V))};function p(){m.readyState===4&&setTimeout(y,0)}function g(){var D=void 0;if(m.response?D=m.response:D=m.responseText||u(m),w)try{D=JSON.parse(D)}catch{}return D}function v(D){return clearTimeout(L),D instanceof Error||(D=new Error(""+(D||"Unknown XMLHttpRequest Error"))),D.statusCode=0,h(D,k)}function y(){if(!S){var D;clearTimeout(L),d.useXDR&&m.status===void 0?D=200:D=m.status===1223?204:m.status;var j=k,N=null;return D!==0?(j={body:g(),statusCode:D,method:C,headers:{},url:_,rawRequest:m},m.getAllResponseHeaders&&(j.headers=n(m.getAllResponseHeaders()))):N=new Error("Internal XMLHttpRequest Error"),h(N,j,j.body)}}var m=d.xhr||null;m||(d.cors||d.useXDR?m=new s.XDomainRequest:m=new s.XMLHttpRequest);var b,S,_=m.url=d.uri||d.url,C=m.method=d.method||"GET",T=d.body||d.data,x=m.headers=d.headers||{},A=!!d.sync,w=!1,L,k={body:void 0,headers:{},statusCode:0,method:C,url:_,rawRequest:m};if("json"in d&&d.json!==!1&&(w=!0,x.accept||x.Accept||(x.Accept="application/json"),C!=="GET"&&C!=="HEAD"&&(x["content-type"]||x["Content-Type"]||(x["Content-Type"]="application/json"),T=JSON.stringify(d.json===!0?T:d.json))),m.onreadystatechange=p,m.onload=y,m.onerror=v,m.onprogress=function(){},m.onabort=function(){S=!0},m.ontimeout=v,m.open(C,_,!A,d.username,d.password),A||(m.withCredentials=!!d.withCredentials),!A&&d.timeout>0&&(L=setTimeout(function(){if(!S){S=!0,m.abort("timeout");var D=new Error("XMLHttpRequest timeout");D.code="ETIMEDOUT",v(D)}},d.timeout)),m.setRequestHeader)for(b in x)x.hasOwnProperty(b)&&m.setRequestHeader(b,x[b]);else if(d.headers&&!o(d.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in d&&(m.responseType=d.responseType),"beforeSend"in d&&typeof d.beforeSend=="function"&&d.beforeSend(m),m.send(T||null),m}function u(d){try{if(d.responseType==="document")return d.responseXML;var f=d.responseXML&&d.responseXML.documentElement.nodeName==="parsererror";if(d.responseType===""&&!f)return d.responseXML}catch{}return null}function c(){}return Jj.exports}var NKe=IKe();const PEe=Lu(NKe);var TG={exports:{}},xG,afe;function FKe(){if(afe)return xG;afe=1;var r=_Ee(),e=Object.create||(function(){function A(){}return function(w){if(arguments.length!==1)throw new Error("Object.create shim only accepts one parameter.");return A.prototype=w,new A}})();function i(A,w){this.name="ParsingError",this.code=A.code,this.message=w||A.message}i.prototype=e(Error.prototype),i.prototype.constructor=i,i.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}};function n(A){function w(k,D,j,N){return(k|0)*3600+(D|0)*60+(j|0)+(N|0)/1e3}var L=A.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return L?L[3]?w(L[1],L[2],L[3].replace(":",""),L[4]):L[1]>59?w(L[1],L[2],0,L[4]):w(0,L[1],L[2],L[4]):null}function t(){this.values=e(null)}t.prototype={set:function(A,w){!this.get(A)&&w!==""&&(this.values[A]=w)},get:function(A,w,L){return L?this.has(A)?this.values[A]:w[L]:this.has(A)?this.values[A]:w},has:function(A){return A in this.values},alt:function(A,w,L){for(var k=0;k<L.length;++k)if(w===L[k]){this.set(A,w);break}},integer:function(A,w){/^-?\d+$/.test(w)&&this.set(A,parseInt(w,10))},percent:function(A,w){return w.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(w=parseFloat(w),w>=0&&w<=100)?(this.set(A,w),!0):!1}};function o(A,w,L,k){var D=k?A.split(k):[A];for(var j in D)if(typeof D[j]=="string"){var N=D[j].split(L);if(N.length===2){var V=N[0].trim(),W=N[1].trim();w(V,W)}}}function a(A,w,L){var k=A;function D(){var V=n(A);if(V===null)throw new i(i.Errors.BadTimeStamp,"Malformed timestamp: "+k);return A=A.replace(/^[^\sa-zA-Z-]+/,""),V}function j(V,W){var K=new t;o(V,function(H,U){switch(H){case"region":for(var I=L.length-1;I>=0;I--)if(L[I].id===U){K.set(H,L[I].region);break}break;case"vertical":K.alt(H,U,["rl","lr"]);break;case"line":var Q=U.split(","),Z=Q[0];K.integer(H,Z),K.percent(H,Z)&&K.set("snapToLines",!1),K.alt(H,Z,["auto"]),Q.length===2&&K.alt("lineAlign",Q[1],["start","center","end"]);break;case"position":Q=U.split(","),K.percent(H,Q[0]),Q.length===2&&K.alt("positionAlign",Q[1],["start","center","end"]);break;case"size":K.percent(H,U);break;case"align":K.alt(H,U,["start","center","end","left","right"]);break}},/:/,/\s/),W.region=K.get("region",null),W.vertical=K.get("vertical","");try{W.line=K.get("line","auto")}catch{}W.lineAlign=K.get("lineAlign","start"),W.snapToLines=K.get("snapToLines",!0),W.size=K.get("size",100);try{W.align=K.get("align","center")}catch{W.align=K.get("align","middle")}try{W.position=K.get("position","auto")}catch{W.position=K.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},W.align)}W.positionAlign=K.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},W.align)}function N(){A=A.replace(/^\s+/,"")}if(N(),w.startTime=D(),N(),A.substr(0,3)!=="-->")throw new i(i.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+k);A=A.substr(3),N(),w.endTime=D(),N(),j(A,w)}var s=r.createElement&&r.createElement("textarea"),l={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},u={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)"},c={v:"title",lang:"lang"},d={rt:"ruby"};function f(A,w){function L(){if(!w)return null;function Z(ie){return w=w.substr(ie.length),ie}var ee=w.match(/^([^<]*)(<[^>]*>?)?/);return Z(ee[1]?ee[1]:ee[2])}function k(Z){return s.innerHTML=Z,Z=s.textContent,s.textContent="",Z}function D(Z,ee){return!d[ee.localName]||d[ee.localName]===Z.localName}function j(Z,ee){var ie=l[Z];if(!ie)return null;var de=A.document.createElement(ie),pe=c[Z];return pe&&ee&&(de[pe]=ee.trim()),de}for(var N=A.document.createElement("div"),V=N,W,K=[];(W=L())!==null;){if(W[0]==="<"){if(W[1]==="/"){K.length&&K[K.length-1]===W.substr(2).replace(">","")&&(K.pop(),V=V.parentNode);continue}var H=n(W.substr(1,W.length-2)),U;if(H){U=A.document.createProcessingInstruction("timestamp",H),V.appendChild(U);continue}var I=W.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!I||(U=j(I[1],I[3]),!U)||!D(V,U))continue;if(I[2]){var Q=I[2].split(".");Q.forEach(function(Z){var ee=/^bg_/.test(Z),ie=ee?Z.slice(3):Z;if(u.hasOwnProperty(ie)){var de=ee?"background-color":"color",pe=u[ie];U.style[de]=pe}}),U.className=Q.join(" ")}K.push(I[1]),V.appendChild(U),V=U;continue}V.appendChild(A.document.createTextNode(k(W)))}return N}var h=[[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 p(A){for(var w=0;w<h.length;w++){var L=h[w];if(A>=L[0]&&A<=L[1])return!0}return!1}function g(A){var w=[],L="",k;if(!A||!A.childNodes)return"ltr";function D(V,W){for(var K=W.childNodes.length-1;K>=0;K--)V.push(W.childNodes[K])}function j(V){if(!V||!V.length)return null;var W=V.pop(),K=W.textContent||W.innerText;if(K){var H=K.match(/^.*(\n|\r)/);return H?(V.length=0,H[0]):K}if(W.tagName==="ruby")return j(V);if(W.childNodes)return D(V,W),j(V)}for(D(w,A);L=j(w);)for(var N=0;N<L.length;N++)if(k=L.charCodeAt(N),p(k))return"rtl";return"ltr"}function v(A){if(typeof A.line=="number"&&(A.snapToLines||A.line>=0&&A.line<=100))return A.line;if(!A.track||!A.track.textTrackList||!A.track.textTrackList.mediaElement)return-1;for(var w=A.track,L=w.textTrackList,k=0,D=0;D<L.length&&L[D]!==w;D++)L[D].mode==="showing"&&k++;return++k*-1}function y(){}y.prototype.applyStyles=function(A,w){w=w||this.div;for(var L in A)A.hasOwnProperty(L)&&(w.style[L]=A[L])},y.prototype.formatStyle=function(A,w){return A===0?0:A+w};function m(A,w,L){y.call(this),this.cue=w,this.cueDiv=f(A,w.text);var k={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:w.vertical===""?"horizontal-tb":w.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(k,this.cueDiv),this.div=A.document.createElement("div"),k={direction:g(this.cueDiv),writingMode:w.vertical===""?"horizontal-tb":w.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:w.align==="middle"?"center":w.align,font:L.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(k),this.div.appendChild(this.cueDiv);var D=0;switch(w.positionAlign){case"start":case"line-left":D=w.position;break;case"center":D=w.position-w.size/2;break;case"end":case"line-right":D=w.position-w.size;break}w.vertical===""?this.applyStyles({left:this.formatStyle(D,"%"),width:this.formatStyle(w.size,"%")}):this.applyStyles({top:this.formatStyle(D,"%"),height:this.formatStyle(w.size,"%")}),this.move=function(j){this.applyStyles({top:this.formatStyle(j.top,"px"),bottom:this.formatStyle(j.bottom,"px"),left:this.formatStyle(j.left,"px"),right:this.formatStyle(j.right,"px"),height:this.formatStyle(j.height,"px"),width:this.formatStyle(j.width,"px")})}}m.prototype=e(y.prototype),m.prototype.constructor=m;function b(A){var w,L,k,D;if(A.div){L=A.div.offsetHeight,k=A.div.offsetWidth,D=A.div.offsetTop;var j=(j=A.div.childNodes)&&(j=j[0])&&j.getClientRects&&j.getClientRects();A=A.div.getBoundingClientRect(),w=j?Math.max(j[0]&&j[0].height||0,A.height/j.length):0}this.left=A.left,this.right=A.right,this.top=A.top||D,this.height=A.height||L,this.bottom=A.bottom||D+(A.height||L),this.width=A.width||k,this.lineHeight=w!==void 0?w:A.lineHeight}b.prototype.move=function(A,w){switch(w=w!==void 0?w:this.lineHeight,A){case"+x":this.left+=w,this.right+=w;break;case"-x":this.left-=w,this.right-=w;break;case"+y":this.top+=w,this.bottom+=w;break;case"-y":this.top-=w,this.bottom-=w;break}},b.prototype.overlaps=function(A){return this.left<A.right&&this.right>A.left&&this.top<A.bottom&&this.bottom>A.top},b.prototype.overlapsAny=function(A){for(var w=0;w<A.length;w++)if(this.overlaps(A[w]))return!0;return!1},b.prototype.within=function(A){return this.top>=A.top&&this.bottom<=A.bottom&&this.left>=A.left&&this.right<=A.right},b.prototype.overlapsOppositeAxis=function(A,w){switch(w){case"+x":return this.left<A.left;case"-x":return this.right>A.right;case"+y":return this.top<A.top;case"-y":return this.bottom>A.bottom}},b.prototype.intersectPercentage=function(A){var w=Math.max(0,Math.min(this.right,A.right)-Math.max(this.left,A.left)),L=Math.max(0,Math.min(this.bottom,A.bottom)-Math.max(this.top,A.top)),k=w*L;return k/(this.height*this.width)},b.prototype.toCSSCompatValues=function(A){return{top:this.top-A.top,bottom:A.bottom-this.bottom,left:this.left-A.left,right:A.right-this.right,height:this.height,width:this.width}},b.getSimpleBoxPosition=function(A){var w=A.div?A.div.offsetHeight:A.tagName?A.offsetHeight:0,L=A.div?A.div.offsetWidth:A.tagName?A.offsetWidth:0,k=A.div?A.div.offsetTop:A.tagName?A.offsetTop:0;A=A.div?A.div.getBoundingClientRect():A.tagName?A.getBoundingClientRect():A;var D={left:A.left,right:A.right,top:A.top||k,height:A.height||w,bottom:A.bottom||k+(A.height||w),width:A.width||L};return D};function S(A,w,L,k){function D(ie,de){for(var pe,_e=new b(ie),Te=1,De=0;De<de.length;De++){for(;ie.overlapsOppositeAxis(L,de[De])||ie.within(L)&&ie.overlapsAny(k);)ie.move(de[De]);if(ie.within(L))return ie;var Pe=ie.intersectPercentage(L);Te>Pe&&(pe=new b(ie),Te=Pe),ie=new b(_e)}return pe||_e}var j=new b(w),N=w.cue,V=v(N),W=[];if(N.snapToLines){var K;switch(N.vertical){case"":W=["+y","-y"],K="height";break;case"rl":W=["+x","-x"],K="width";break;case"lr":W=["-x","+x"],K="width";break}var H=j.lineHeight,U=H*Math.round(V),I=L[K]+H,Q=W[0];Math.abs(U)>I&&(U=U<0?-1:1,U*=Math.ceil(I/H)*H),V<0&&(U+=N.vertical===""?L.height:L.width,W=W.reverse()),j.move(Q,U)}else{var Z=j.lineHeight/L.height*100;switch(N.lineAlign){case"center":V-=Z/2;break;case"end":V-=Z;break}switch(N.vertical){case"":w.applyStyles({top:w.formatStyle(V,"%")});break;case"rl":w.applyStyles({left:w.formatStyle(V,"%")});break;case"lr":w.applyStyles({right:w.formatStyle(V,"%")});break}W=["+y","-x","+x","-y"],j=new b(w)}var ee=D(j,W);w.move(ee.toCSSCompatValues(L))}function _(){}_.StringDecoder=function(){return{decode:function(A){if(!A)return"";if(typeof A!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(A))}}},_.convertCueToDOMTree=function(A,w){return!A||!w?null:f(A,w)};var C=.05,T="sans-serif",x="1.5%";return _.processCues=function(A,w,L){if(!A||!w||!L)return null;for(;L.firstChild;)L.removeChild(L.firstChild);var k=A.document.createElement("div");k.style.position="absolute",k.style.left="0",k.style.right="0",k.style.top="0",k.style.bottom="0",k.style.margin=x,L.appendChild(k);function D(H){for(var U=0;U<H.length;U++)if(H[U].hasBeenReset||!H[U].displayState)return!0;return!1}if(!D(w)){for(var j=0;j<w.length;j++)k.appendChild(w[j].displayState);return}var N=[],V=b.getSimpleBoxPosition(k),W=Math.round(V.height*C*100)/100,K={font:W+"px "+T};(function(){for(var H,U,I=0;I<w.length;I++)U=w[I],H=new m(A,U,K),k.appendChild(H.div),S(A,H,V,N),U.displayState=H.div,N.push(b.getSimpleBoxPosition(H))})()},_.Parser=function(A,w,L){L||(L=w,w={}),w||(w={}),this.window=A,this.vttjs=w,this.state="INITIAL",this.buffer="",this.decoder=L||new TextDecoder("utf8"),this.regionList=[]},_.Parser.prototype={reportOrThrowError:function(A){if(A instanceof i)this.onparsingerror&&this.onparsingerror(A);else throw A},parse:function(A){var w=this;A&&(w.buffer+=w.decoder.decode(A,{stream:!0}));function L(){for(var H=w.buffer,U=0;U<H.length&&H[U]!=="\r"&&H[U]!==`
`;)++U;var I=H.substr(0,U);return H[U]==="\r"&&++U,H[U]===`
`&&++U,w.buffer=H.substr(U),I}function k(H){var U=new t;if(o(H,function(Q,Z){switch(Q){case"id":U.set(Q,Z);break;case"width":U.percent(Q,Z);break;case"lines":U.integer(Q,Z);break;case"regionanchor":case"viewportanchor":var ee=Z.split(",");if(ee.length!==2)break;var ie=new t;if(ie.percent("x",ee[0]),ie.percent("y",ee[1]),!ie.has("x")||!ie.has("y"))break;U.set(Q+"X",ie.get("x")),U.set(Q+"Y",ie.get("y"));break;case"scroll":U.alt(Q,Z,["up"]);break}},/=/,/\s/),U.has("id")){var I=new(w.vttjs.VTTRegion||w.window.VTTRegion);I.width=U.get("width",100),I.lines=U.get("lines",3),I.regionAnchorX=U.get("regionanchorX",0),I.regionAnchorY=U.get("regionanchorY",100),I.viewportAnchorX=U.get("viewportanchorX",0),I.viewportAnchorY=U.get("viewportanchorY",100),I.scroll=U.get("scroll",""),w.onregion&&w.onregion(I),w.regionList.push({id:U.get("id"),region:I})}}function D(H){var U=new t;o(H,function(I,Q){switch(I){case"MPEGT":U.integer(I+"S",Q);break;case"LOCA":U.set(I+"L",n(Q));break}},/[^\d]:/,/,/),w.ontimestampmap&&w.ontimestampmap({MPEGTS:U.get("MPEGTS"),LOCAL:U.get("LOCAL")})}function j(H){H.match(/X-TIMESTAMP-MAP/)?o(H,function(U,I){switch(U){case"X-TIMESTAMP-MAP":D(I);break}},/=/):o(H,function(U,I){switch(U){case"Region":k(I);break}},/:/)}try{var N;if(w.state==="INITIAL"){if(!/\r\n|\n/.test(w.buffer))return this;N=L();var V=N.match(/^WEBVTT([ \t].*)?$/);if(!V||!V[0])throw new i(i.Errors.BadSignature);w.state="HEADER"}for(var W=!1;w.buffer;){if(!/\r\n|\n/.test(w.buffer))return this;switch(W?W=!1:N=L(),w.state){case"HEADER":/:/.test(N)?j(N):N||(w.state="ID");continue;case"NOTE":N||(w.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(N)){w.state="NOTE";break}if(!N)continue;w.cue=new(w.vttjs.VTTCue||w.window.VTTCue)(0,0,"");try{w.cue.align="center"}catch{w.cue.align="middle"}if(w.state="CUE",N.indexOf("-->")===-1){w.cue.id=N;continue}case"CUE":try{a(N,w.cue,w.regionList)}catch(H){w.reportOrThrowError(H),w.cue=null,w.state="BADCUE";continue}w.state="CUETEXT";continue;case"CUETEXT":var K=N.indexOf("-->")!==-1;if(!N||K&&(W=!0)){w.oncue&&w.oncue(w.cue),w.cue=null,w.state="ID";continue}w.cue.text&&(w.cue.text+=`
`),w.cue.text+=N.replace(/\u2028/g,`
`).replace(/u2029/g,`
`);continue;case"BADCUE":N||(w.state="ID");continue}}}catch(H){w.reportOrThrowError(H),w.state==="CUETEXT"&&w.cue&&w.oncue&&w.oncue(w.cue),w.cue=null,w.state=w.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},flush:function(){var A=this;try{if(A.buffer+=A.decoder.decode(),(A.cue||A.state==="HEADER")&&(A.buffer+=`

`,A.parse()),A.state==="INITIAL")throw new i(i.Errors.BadSignature)}catch(w){A.reportOrThrowError(w)}return A.onflush&&A.onflush(),this}},xG=_,xG}var EG,sfe;function jKe(){if(sfe)return EG;sfe=1;var r="auto",e={"":1,lr:1,rl:1},i={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function n(a){if(typeof a!="string")return!1;var s=e[a.toLowerCase()];return s?a.toLowerCase():!1}function t(a){if(typeof a!="string")return!1;var s=i[a.toLowerCase()];return s?a.toLowerCase():!1}function o(a,s,l){this.hasBeenReset=!1;var u="",c=!1,d=a,f=s,h=l,p=null,g="",v=!0,y="auto",m="start",b="auto",S="auto",_=100,C="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return u},set:function(T){u=""+T}},pauseOnExit:{enumerable:!0,get:function(){return c},set:function(T){c=!!T}},startTime:{enumerable:!0,get:function(){return d},set:function(T){if(typeof T!="number")throw new TypeError("Start time must be set to a number.");d=T,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return f},set:function(T){if(typeof T!="number")throw new TypeError("End time must be set to a number.");f=T,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return h},set:function(T){h=""+T,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return p},set:function(T){p=T,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return g},set:function(T){var x=n(T);if(x===!1)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");g=x,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return v},set:function(T){v=!!T,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return y},set:function(T){if(typeof T!="number"&&T!==r)throw new SyntaxError("Line: an invalid number or illegal string was specified.");y=T,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return m},set:function(T){var x=t(T);x?(m=x,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return b},set:function(T){if(T<0||T>100)throw new Error("Position must be between 0 and 100.");b=T,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return S},set:function(T){var x=t(T);x?(S=x,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return _},set:function(T){if(T<0||T>100)throw new Error("Size must be between 0 and 100.");_=T,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return C},set:function(T){var x=t(T);if(!x)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");C=x,this.hasBeenReset=!0}}}),this.displayState=void 0}return o.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},EG=o,EG}var AG,lfe;function BKe(){if(lfe)return AG;lfe=1;var r={"":!0,up:!0};function e(t){if(typeof t!="string")return!1;var o=r[t.toLowerCase()];return o?t.toLowerCase():!1}function i(t){return typeof t=="number"&&t>=0&&t<=100}function n(){var t=100,o=3,a=0,s=100,l=0,u=100,c="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return t},set:function(d){if(!i(d))throw new Error("Width must be between 0 and 100.");t=d}},lines:{enumerable:!0,get:function(){return o},set:function(d){if(typeof d!="number")throw new TypeError("Lines must be set to a number.");o=d}},regionAnchorY:{enumerable:!0,get:function(){return s},set:function(d){if(!i(d))throw new Error("RegionAnchorX must be between 0 and 100.");s=d}},regionAnchorX:{enumerable:!0,get:function(){return a},set:function(d){if(!i(d))throw new Error("RegionAnchorY must be between 0 and 100.");a=d}},viewportAnchorY:{enumerable:!0,get:function(){return u},set:function(d){if(!i(d))throw new Error("ViewportAnchorY must be between 0 and 100.");u=d}},viewportAnchorX:{enumerable:!0,get:function(){return l},set:function(d){if(!i(d))throw new Error("ViewportAnchorX must be between 0 and 100.");l=d}},scroll:{enumerable:!0,get:function(){return c},set:function(d){var f=e(d);f===!1?console.warn("Scroll: an invalid or illegal string was specified."):c=f}}})}return AG=n,AG}var ufe;function VKe(){if(ufe)return TG.exports;ufe=1;var r=KU(),e=TG.exports={WebVTT:FKe(),VTTCue:jKe(),VTTRegion:BKe()};r.vttjs=e,r.WebVTT=e.WebVTT;var i=e.VTTCue,n=e.VTTRegion,t=r.VTTCue,o=r.VTTRegion;return e.shim=function(){r.VTTCue=i,r.VTTRegion=n},e.restore=function(){r.VTTCue=t,r.VTTRegion=o},r.VTTCue||e.shim(),TG.exports}var HKe=VKe();const cfe=Lu(HKe);function CEe(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(CEe=function(){return!!r})()}function TEe(r,e,i){if(CEe())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,e);var t=new(r.bind.apply(r,n));return i&&sM(t,i.prototype),t}function UKe(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&sM(r,e)}var wG={exports:{}},dfe;function zKe(){return dfe||(dfe=1,(function(r,e){(function(i){var n=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,t=/^(?=([^\/?#]*))\1([^]*)$/,o=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,s={buildAbsoluteURL:function(l,u,c){if(c=c||{},l=l.trim(),u=u.trim(),!u){if(!c.alwaysNormalize)return l;var d=s.parseURL(l);if(!d)throw new Error("Error trying to parse base URL.");return d.path=s.normalizePath(d.path),s.buildURLFromParts(d)}var f=s.parseURL(u);if(!f)throw new Error("Error trying to parse relative URL.");if(f.scheme)return c.alwaysNormalize?(f.path=s.normalizePath(f.path),s.buildURLFromParts(f)):u;var h=s.parseURL(l);if(!h)throw new Error("Error trying to parse base URL.");if(!h.netLoc&&h.path&&h.path[0]!=="/"){var p=t.exec(h.path);h.netLoc=p[1],h.path=p[2]}h.netLoc&&!h.path&&(h.path="/");var g={scheme:h.scheme,netLoc:f.netLoc,path:null,params:f.params,query:f.query,fragment:f.fragment};if(!f.netLoc&&(g.netLoc=h.netLoc,f.path[0]!=="/"))if(!f.path)g.path=h.path,f.params||(g.params=h.params,f.query||(g.query=h.query));else{var v=h.path,y=v.substring(0,v.lastIndexOf("/")+1)+f.path;g.path=s.normalizePath(y)}return g.path===null&&(g.path=c.alwaysNormalize?s.normalizePath(f.path):f.path),s.buildURLFromParts(g)},parseURL:function(l){var u=n.exec(l);return u?{scheme:u[1]||"",netLoc:u[2]||"",path:u[3]||"",params:u[4]||"",query:u[5]||"",fragment:u[6]||""}:null},normalizePath:function(l){for(l=l.split("").reverse().join("").replace(o,"");l.length!==(l=l.replace(a,"")).length;);return l.split("").reverse().join("")},buildURLFromParts:function(l){return l.scheme+l.netLoc+l.path+l.params+l.query+l.fragment}};r.exports=s})()})(wG)),wG.exports}var WKe=zKe();const ffe=Lu(WKe);var hfe="http://example.com",ZU=function(e,i){if(/^[a-z]+:/i.test(i))return i;/^data:/.test(e)&&(e=bt.location&&bt.location.href||"");var n=typeof bt.URL=="function",t=/^\/\//.test(e),o=!bt.location&&!/\/\//i.test(e);if(n?e=new bt.URL(e,bt.location||hfe):/\/\//i.test(e)||(e=ffe.buildAbsoluteURL(bt.location&&bt.location.href||"",e)),n){var a=new URL(i,e);return o?a.href.slice(hfe.length):t?a.href.slice(a.protocol.length):a.href}return ffe.buildAbsoluteURL(e,i)},d9=(function(){function r(){this.listeners={}}var e=r.prototype;return e.on=function(n,t){this.listeners[n]||(this.listeners[n]=[]),this.listeners[n].push(t)},e.off=function(n,t){if(!this.listeners[n])return!1;var o=this.listeners[n].indexOf(t);return this.listeners[n]=this.listeners[n].slice(0),this.listeners[n].splice(o,1),o>-1},e.trigger=function(n){var t=this.listeners[n];if(t)if(arguments.length===2)for(var o=t.length,a=0;a<o;++a)t[a].call(this,arguments[1]);else for(var s=Array.prototype.slice.call(arguments,1),l=t.length,u=0;u<l;++u)t[u].apply(this,s)},e.dispose=function(){this.listeners={}},e.pipe=function(n){this.on("data",function(t){n.push(t)})},r})(),GKe=function(e){return bt.atob?bt.atob(e):Buffer.from(e,"base64").toString("binary")};function xEe(r){for(var e=GKe(r),i=new Uint8Array(e.length),n=0;n<e.length;n++)i[n]=e.charCodeAt(n);return i}/*! @name m3u8-parser @version 4.8.0 @license Apache-2.0 */var YKe=(function(r){zr(e,r);function e(){var n;return n=r.call(this)||this,n.buffer="",n}var i=e.prototype;return i.push=function(t){var o;for(this.buffer+=t,o=this.buffer.indexOf(`
`);o>-1;o=this.buffer.indexOf(`
`))this.trigger("data",this.buffer.substring(0,o)),this.buffer=this.buffer.substring(o+1)},e})(d9),$Ke="	",OG=function(e){var i=/([0-9.]*)?@?([0-9.]*)?/.exec(e||""),n={};return i[1]&&(n.length=parseInt(i[1],10)),i[2]&&(n.offset=parseInt(i[2],10)),n},qKe=function(){var e="[^=]*",i='"[^"]*"|[^,]*',n="(?:"+e+")=(?:"+i+")";return new RegExp("(?:^|,)("+n+")")},Qp=function(e){for(var i=e.split(qKe()),n={},t=i.length,o;t--;)i[t]!==""&&(o=/([^=]*)=(.*)/.exec(i[t]).slice(1),o[0]=o[0].replace(/^\s+|\s+$/g,""),o[1]=o[1].replace(/^\s+|\s+$/g,""),o[1]=o[1].replace(/^['"](.*)['"]$/g,"$1"),n[o[0]]=o[1]);return n},XKe=(function(r){zr(e,r);function e(){var n;return n=r.call(this)||this,n.customParsers=[],n.tagMappers=[],n}var i=e.prototype;return i.push=function(t){var o=this,a,s;if(t=t.trim(),t.length!==0){if(t[0]!=="#"){this.trigger("data",{type:"uri",uri:t});return}var l=this.tagMappers.reduce(function(u,c){var d=c(t);return d===t?u:u.concat([d])},[t]);l.forEach(function(u){for(var c=0;c<o.customParsers.length;c++)if(o.customParsers[c].call(o,u))return;if(u.indexOf("#EXT")!==0){o.trigger("data",{type:"comment",text:u.slice(1)});return}if(u=u.replace("\r",""),a=/^#EXTM3U/.exec(u),a){o.trigger("data",{type:"tag",tagType:"m3u"});return}if(a=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(u),a){s={type:"tag",tagType:"inf"},a[1]&&(s.duration=parseFloat(a[1])),a[2]&&(s.title=a[2]),o.trigger("data",s);return}if(a=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(u),a){s={type:"tag",tagType:"targetduration"},a[1]&&(s.duration=parseInt(a[1],10)),o.trigger("data",s);return}if(a=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(u),a){s={type:"tag",tagType:"version"},a[1]&&(s.version=parseInt(a[1],10)),o.trigger("data",s);return}if(a=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(u),a){s={type:"tag",tagType:"media-sequence"},a[1]&&(s.number=parseInt(a[1],10)),o.trigger("data",s);return}if(a=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(u),a){s={type:"tag",tagType:"discontinuity-sequence"},a[1]&&(s.number=parseInt(a[1],10)),o.trigger("data",s);return}if(a=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(u),a){s={type:"tag",tagType:"playlist-type"},a[1]&&(s.playlistType=a[1]),o.trigger("data",s);return}if(a=/^#EXT-X-BYTERANGE:?(.*)?$/.exec(u),a){s=wn(OG(a[1]),{type:"tag",tagType:"byterange"}),o.trigger("data",s);return}if(a=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(u),a){s={type:"tag",tagType:"allow-cache"},a[1]&&(s.allowed=!/NO/.test(a[1])),o.trigger("data",s);return}if(a=/^#EXT-X-MAP:?(.*)$/.exec(u),a){if(s={type:"tag",tagType:"map"},a[1]){var d=Qp(a[1]);d.URI&&(s.uri=d.URI),d.BYTERANGE&&(s.byterange=OG(d.BYTERANGE))}o.trigger("data",s);return}if(a=/^#EXT-X-STREAM-INF:?(.*)$/.exec(u),a){if(s={type:"tag",tagType:"stream-inf"},a[1]){if(s.attributes=Qp(a[1]),s.attributes.RESOLUTION){var f=s.attributes.RESOLUTION.split("x"),h={};f[0]&&(h.width=parseInt(f[0],10)),f[1]&&(h.height=parseInt(f[1],10)),s.attributes.RESOLUTION=h}s.attributes.BANDWIDTH&&(s.attributes.BANDWIDTH=parseInt(s.attributes.BANDWIDTH,10)),s.attributes["FRAME-RATE"]&&(s.attributes["FRAME-RATE"]=parseFloat(s.attributes["FRAME-RATE"])),s.attributes["PROGRAM-ID"]&&(s.attributes["PROGRAM-ID"]=parseInt(s.attributes["PROGRAM-ID"],10))}o.trigger("data",s);return}if(a=/^#EXT-X-MEDIA:?(.*)$/.exec(u),a){s={type:"tag",tagType:"media"},a[1]&&(s.attributes=Qp(a[1])),o.trigger("data",s);return}if(a=/^#EXT-X-ENDLIST/.exec(u),a){o.trigger("data",{type:"tag",tagType:"endlist"});return}if(a=/^#EXT-X-DISCONTINUITY/.exec(u),a){o.trigger("data",{type:"tag",tagType:"discontinuity"});return}if(a=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(u),a){s={type:"tag",tagType:"program-date-time"},a[1]&&(s.dateTimeString=a[1],s.dateTimeObject=new Date(a[1])),o.trigger("data",s);return}if(a=/^#EXT-X-KEY:?(.*)$/.exec(u),a){s={type:"tag",tagType:"key"},a[1]&&(s.attributes=Qp(a[1]),s.attributes.IV&&(s.attributes.IV.substring(0,2).toLowerCase()==="0x"&&(s.attributes.IV=s.attributes.IV.substring(2)),s.attributes.IV=s.attributes.IV.match(/.{8}/g),s.attributes.IV[0]=parseInt(s.attributes.IV[0],16),s.attributes.IV[1]=parseInt(s.attributes.IV[1],16),s.attributes.IV[2]=parseInt(s.attributes.IV[2],16),s.attributes.IV[3]=parseInt(s.attributes.IV[3],16),s.attributes.IV=new Uint32Array(s.attributes.IV))),o.trigger("data",s);return}if(a=/^#EXT-X-START:?(.*)$/.exec(u),a){s={type:"tag",tagType:"start"},a[1]&&(s.attributes=Qp(a[1]),s.attributes["TIME-OFFSET"]=parseFloat(s.attributes["TIME-OFFSET"]),s.attributes.PRECISE=/YES/.test(s.attributes.PRECISE)),o.trigger("data",s);return}if(a=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(u),a){s={type:"tag",tagType:"cue-out-cont"},a[1]?s.data=a[1]:s.data="",o.trigger("data",s);return}if(a=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(u),a){s={type:"tag",tagType:"cue-out"},a[1]?s.data=a[1]:s.data="",o.trigger("data",s);return}if(a=/^#EXT-X-CUE-IN:?(.*)?$/.exec(u),a){s={type:"tag",tagType:"cue-in"},a[1]?s.data=a[1]:s.data="",o.trigger("data",s);return}if(a=/^#EXT-X-SKIP:(.*)$/.exec(u),a&&a[1]){s={type:"tag",tagType:"skip"},s.attributes=Qp(a[1]),s.attributes.hasOwnProperty("SKIPPED-SEGMENTS")&&(s.attributes["SKIPPED-SEGMENTS"]=parseInt(s.attributes["SKIPPED-SEGMENTS"],10)),s.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")&&(s.attributes["RECENTLY-REMOVED-DATERANGES"]=s.attributes["RECENTLY-REMOVED-DATERANGES"].split($Ke)),o.trigger("data",s);return}if(a=/^#EXT-X-PART:(.*)$/.exec(u),a&&a[1]){s={type:"tag",tagType:"part"},s.attributes=Qp(a[1]),["DURATION"].forEach(function(p){s.attributes.hasOwnProperty(p)&&(s.attributes[p]=parseFloat(s.attributes[p]))}),["INDEPENDENT","GAP"].forEach(function(p){s.attributes.hasOwnProperty(p)&&(s.attributes[p]=/YES/.test(s.attributes[p]))}),s.attributes.hasOwnProperty("BYTERANGE")&&(s.attributes.byterange=OG(s.attributes.BYTERANGE)),o.trigger("data",s);return}if(a=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(u),a&&a[1]){s={type:"tag",tagType:"server-control"},s.attributes=Qp(a[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach(function(p){s.attributes.hasOwnProperty(p)&&(s.attributes[p]=parseFloat(s.attributes[p]))}),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach(function(p){s.attributes.hasOwnProperty(p)&&(s.attributes[p]=/YES/.test(s.attributes[p]))}),o.trigger("data",s);return}if(a=/^#EXT-X-PART-INF:(.*)$/.exec(u),a&&a[1]){s={type:"tag",tagType:"part-inf"},s.attributes=Qp(a[1]),["PART-TARGET"].forEach(function(p){s.attributes.hasOwnProperty(p)&&(s.attributes[p]=parseFloat(s.attributes[p]))}),o.trigger("data",s);return}if(a=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(u),a&&a[1]){s={type:"tag",tagType:"preload-hint"},s.attributes=Qp(a[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach(function(p){if(s.attributes.hasOwnProperty(p)){s.attributes[p]=parseInt(s.attributes[p],10);var g=p==="BYTERANGE-LENGTH"?"length":"offset";s.attributes.byterange=s.attributes.byterange||{},s.attributes.byterange[g]=s.attributes[p],delete s.attributes[p]}}),o.trigger("data",s);return}if(a=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(u),a&&a[1]){s={type:"tag",tagType:"rendition-report"},s.attributes=Qp(a[1]),["LAST-MSN","LAST-PART"].forEach(function(p){s.attributes.hasOwnProperty(p)&&(s.attributes[p]=parseInt(s.attributes[p],10))}),o.trigger("data",s);return}o.trigger("data",{type:"tag",data:u.slice(4)})})}},i.addParser=function(t){var o=this,a=t.expression,s=t.customType,l=t.dataParser,u=t.segment;typeof l!="function"&&(l=function(d){return d}),this.customParsers.push(function(c){var d=a.exec(c);if(d)return o.trigger("data",{type:"custom",data:l(c),customType:s,segment:u}),!0})},i.addTagMapper=function(t){var o=t.expression,a=t.map,s=function(u){return o.test(u)?a(u):u};this.tagMappers.push(s)},e})(d9),KKe=function(e){return e.toLowerCase().replace(/-(\w)/g,function(i){return i[1].toUpperCase()})},GD=function(e){var i={};return Object.keys(e).forEach(function(n){i[KKe(n)]=e[n]}),i},DG=function(e){var i=e.serverControl,n=e.targetDuration,t=e.partTargetDuration;if(i){var o="#EXT-X-SERVER-CONTROL",a="holdBack",s="partHoldBack",l=n&&n*3,u=t&&t*2;n&&!i.hasOwnProperty(a)&&(i[a]=l,this.trigger("info",{message:o+" defaulting HOLD-BACK to targetDuration * 3 ("+l+")."})),l&&i[a]<l&&(this.trigger("warn",{message:o+" clamping HOLD-BACK ("+i[a]+") to targetDuration * 3 ("+l+")"}),i[a]=l),t&&!i.hasOwnProperty(s)&&(i[s]=t*3,this.trigger("info",{message:o+" defaulting PART-HOLD-BACK to partTargetDuration * 3 ("+i[s]+")."})),t&&i[s]<u&&(this.trigger("warn",{message:o+" clamping PART-HOLD-BACK ("+i[s]+") to partTargetDuration * 2 ("+u+")."}),i[s]=u)}},ZKe=(function(r){zr(e,r);function e(){var n;n=r.call(this)||this,n.lineStream=new YKe,n.parseStream=new XKe,n.lineStream.pipe(n.parseStream);var t=sn(n),o=[],a={},s,l,u=!1,c=function(){},d={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},f="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",h=0;n.manifest={allowCache:!0,discontinuityStarts:[],segments:[]};var p=0,g=0;return n.on("end",function(){a.uri||!a.parts&&!a.preloadHints||(!a.map&&s&&(a.map=s),!a.key&&l&&(a.key=l),!a.timeline&&typeof h=="number"&&(a.timeline=h),n.manifest.preloadSegment=a)}),n.parseStream.on("data",function(v){var y,m;({tag:function(){({version:function(){v.version&&(this.manifest.version=v.version)},"allow-cache":function(){this.manifest.allowCache=v.allowed,"allowed"in v||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange:function(){var _={};"length"in v&&(a.byterange=_,_.length=v.length,"offset"in v||(v.offset=p)),"offset"in v&&(a.byterange=_,_.offset=v.offset),p=_.offset+_.length},endlist:function(){this.manifest.endList=!0},inf:function(){"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.duration>0&&(a.duration=v.duration),v.duration===0&&(a.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=o},key:function(){if(!v.attributes){this.trigger("warn",{message:"ignoring key declaration without attribute list"});return}if(v.attributes.METHOD==="NONE"){l=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===f){var _=["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"];if(_.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:xEe(v.attributes.URI.split(",")[1])};return}v.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),l={method:v.attributes.METHOD||"AES-128",uri:v.attributes.URI},typeof v.attributes.IV<"u"&&(l.iv=v.attributes.IV)},"media-sequence":function(){if(!isFinite(v.number)){this.trigger("warn",{message:"ignoring invalid media sequence: "+v.number});return}this.manifest.mediaSequence=v.number},"discontinuity-sequence":function(){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":function(){if(!/VOD|EVENT/.test(v.playlistType)){this.trigger("warn",{message:"ignoring unknown playlist type: "+v.playlist});return}this.manifest.playlistType=v.playlistType},map:function(){s={},v.uri&&(s.uri=v.uri),v.byterange&&(s.byterange=v.byterange),l&&(s.key=l)},"stream-inf":function(){if(this.manifest.playlists=o,this.manifest.mediaGroups=this.manifest.mediaGroups||d,!v.attributes){this.trigger("warn",{message:"ignoring empty stream-inf attributes"});return}a.attributes||(a.attributes={}),wn(a.attributes,v.attributes)},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||d,!(v.attributes&&v.attributes.TYPE&&v.attributes["GROUP-ID"]&&v.attributes.NAME)){this.trigger("warn",{message:"ignoring incomplete or missing media group"});return}var _=this.manifest.mediaGroups[v.attributes.TYPE];_[v.attributes["GROUP-ID"]]=_[v.attributes["GROUP-ID"]]||{},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)),y[v.attributes.NAME]=m},discontinuity:function(){h+=1,a.discontinuity=!0,this.manifest.discontinuityStarts.push(o.length)},"program-date-time":function(){typeof this.manifest.dateTimeString>"u"&&(this.manifest.dateTimeString=v.dateTimeString,this.manifest.dateTimeObject=v.dateTimeObject),a.dateTimeString=v.dateTimeString,a.dateTimeObject=v.dateTimeObject},targetduration:function(){if(!isFinite(v.duration)||v.duration<0){this.trigger("warn",{message:"ignoring invalid target duration: "+v.duration});return}this.manifest.targetDuration=v.duration,DG.call(this,this.manifest)},start:function(){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":function(){a.cueOut=v.data},"cue-out-cont":function(){a.cueOutCont=v.data},"cue-in":function(){a.cueIn=v.data},skip:function(){this.manifest.skip=GD(v.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",v.attributes,["SKIPPED-SEGMENTS"])},part:function(){var _=this;u=!0;var C=this.manifest.segments.length,T=GD(v.attributes);a.parts=a.parts||[],a.parts.push(T),T.byterange&&(T.byterange.hasOwnProperty("offset")||(T.byterange.offset=g),g=T.byterange.offset+T.byterange.length);var x=a.parts.length-1;this.warnOnMissingAttributes_("#EXT-X-PART #"+x+" for segment #"+C,v.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach(function(A,w){A.hasOwnProperty("lastPart")||_.trigger("warn",{message:"#EXT-X-RENDITION-REPORT #"+w+" lacks required attribute(s): LAST-PART"})})},"server-control":function(){var _=this.manifest.serverControl=GD(v.attributes);_.hasOwnProperty("canBlockReload")||(_.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),DG.call(this,this.manifest),_.canSkipDateranges&&!_.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":function(){var _=this.manifest.segments.length,C=GD(v.attributes),T=C.type&&C.type==="PART";a.preloadHints=a.preloadHints||[],a.preloadHints.push(C),C.byterange&&(C.byterange.hasOwnProperty("offset")||(C.byterange.offset=T?g:0,T&&(g=C.byterange.offset+C.byterange.length)));var x=a.preloadHints.length-1;if(this.warnOnMissingAttributes_("#EXT-X-PRELOAD-HINT #"+x+" for segment #"+_,v.attributes,["TYPE","URI"]),!!C.type)for(var A=0;A<a.preloadHints.length-1;A++){var w=a.preloadHints[A];w.type&&w.type===C.type&&this.trigger("warn",{message:"#EXT-X-PRELOAD-HINT #"+x+" for segment #"+_+" has the same TYPE "+C.type+" as preload hint #"+A})}},"rendition-report":function(){var _=GD(v.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(_);var C=this.manifest.renditionReports.length-1,T=["LAST-MSN","URI"];u&&T.push("LAST-PART"),this.warnOnMissingAttributes_("#EXT-X-RENDITION-REPORT #"+C,v.attributes,T)},"part-inf":function(){this.manifest.partInf=GD(v.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",v.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),DG.call(this,this.manifest)}}[v.tagType]||c).call(t)},uri:function(){a.uri=v.uri,o.push(a),this.manifest.targetDuration&&!("duration"in a)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),a.duration=this.manifest.targetDuration),l&&(a.key=l),a.timeline=h,s&&(a.map=s),g=0,a={}},comment:function(){},custom:function(){v.segment?(a.custom=a.custom||{},a.custom[v.customType]=v.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[v.customType]=v.data)}})[v.type].call(t)}),n}var i=e.prototype;return i.warnOnMissingAttributes_=function(t,o,a){var s=[];a.forEach(function(l){o.hasOwnProperty(l)||s.push(l)}),s.length&&this.trigger("warn",{message:t+" lacks required attribute(s): "+s.join(", ")})},i.push=function(t){this.lineStream.push(t)},i.end=function(){this.lineStream.push(`
`),this.trigger("end")},i.addParser=function(t){this.parseStream.addParser(t)},i.addTagMapper=function(t){this.parseStream.addTagMapper(t)},e})(d9),g1={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^/},JKe=["video","audio","text"],pfe=["Video","Audio","Text"],EEe=function(e){return e&&e.replace(/avc1\.(\d+)\.(\d+)/i,function(i,n,t){var o=("00"+Number(n).toString(16)).slice(-2),a=("00"+Number(t).toString(16)).slice(-2);return"avc1."+o+"00"+a})},mv=function(e){e===void 0&&(e="");var i=e.split(","),n=[];return i.forEach(function(t){t=t.trim();var o;JKe.forEach(function(a){var s=g1[a].exec(t.toLowerCase());if(!(!s||s.length<=1)){o=a;var l=t.substring(0,s[1].length),u=t.replace(l,"");n.push({type:l,details:u,mediaType:a})}}),o||n.push({type:t,details:"",mediaType:"unknown"})}),n},QKe=function(e,i){if(!e.mediaGroups.AUDIO||!i)return null;var n=e.mediaGroups.AUDIO[i];if(!n)return null;for(var t in n){var o=n[t];if(o.default&&o.playlists)return mv(o.playlists[0].attributes.CODECS)}return null},AEe=function(e){return e===void 0&&(e=""),g1.audio.test(e.trim().toLowerCase())},eZe=function(e){return e===void 0&&(e=""),g1.text.test(e.trim().toLowerCase())},pF=function(e){if(!(!e||typeof e!="string")){var i=e.toLowerCase().split(",").map(function(o){return EEe(o.trim())}),n="video";i.length===1&&AEe(i[0])?n="audio":i.length===1&&eZe(i[0])&&(n="application");var t="mp4";return i.every(function(o){return g1.mp4.test(o)})?t="mp4":i.every(function(o){return g1.webm.test(o)})?t="webm":i.every(function(o){return g1.ogg.test(o)})&&(t="ogg"),n+"/"+t+';codecs="'+e+'"'}},SV=function(e){return e===void 0&&(e=""),bt.MediaSource&&bt.MediaSource.isTypeSupported&&bt.MediaSource.isTypeSupported(pF(e))||!1},RG=function(e){return e===void 0&&(e=""),e.toLowerCase().split(",").every(function(i){i=i.trim();for(var n=0;n<pfe.length;n++){var t=pfe[n];if(g1["muxer"+t].test(i))return!0}return!1})},gfe="mp4a.40.2",tZe="avc1.4d400d",rZe=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,iZe=/^application\/dash\+xml/i,wEe=function(e){return rZe.test(e)?"hls":iZe.test(e)?"dash":e==="application/vnd.videojs.vhs+json"?"vhs-json":null},nZe=function(e){return e.toString(2).length},oZe=function(e){return Math.ceil(nZe(e)/8)},OEe=function(e){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},aZe=function(e){return OEe(e)},Mi=function(e){return e instanceof Uint8Array?e:(!Array.isArray(e)&&!aZe(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))},sc=bt.BigInt||Number,i$=[sc("0x1"),sc("0x100"),sc("0x10000"),sc("0x1000000"),sc("0x100000000"),sc("0x10000000000"),sc("0x1000000000000"),sc("0x100000000000000"),sc("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 sZe=function(e,i){var n=i===void 0?{}:i,t=n.signed,o=t===void 0?!1:t,a=n.le,s=a===void 0?!1:a;e=Mi(e);var l=s?"reduce":"reduceRight",u=e[l]?e[l]:Array.prototype[l],c=u.call(e,function(f,h,p){var g=s?p:Math.abs(p+1-e.length);return f+sc(h)*i$[g]},sc(0));if(o){var d=i$[e.length]/sc(2)-sc(1);c=sc(c),c>d&&(c-=d,c-=d,c-=sc(2))}return Number(c)},lZe=function(e,i){var n={},t=n.le,o=t===void 0?!1:t;(typeof e!="bigint"&&typeof e!="number"||typeof e=="number"&&e!==e)&&(e=0),e=sc(e);for(var a=oZe(e),s=new Uint8Array(new ArrayBuffer(a)),l=0;l<a;l++){var u=o?l:Math.abs(l+1-s.length);s[u]=Number(e/i$[l]&sc(255)),e<0&&(s[u]=Math.abs(~s[u]),s[u]-=l===0?1:2)}return s},DEe=function(e,i){if(typeof e!="string"&&e&&typeof e.toString=="function"&&(e=e.toString()),typeof e!="string")return new Uint8Array;i||(e=unescape(encodeURIComponent(e)));for(var n=new Uint8Array(e.length),t=0;t<e.length;t++)n[t]=e.charCodeAt(t);return n},uZe=function(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];if(i=i.filter(function(s){return s&&(s.byteLength||s.length)&&typeof s!="string"}),i.length<=1)return Mi(i[0]);var t=i.reduce(function(s,l,u){return s+(l.byteLength||l.length)},0),o=new Uint8Array(t),a=0;return i.forEach(function(s){s=Mi(s),o.set(s,a),a+=s.byteLength}),o},fs=function(e,i,n){var t=n===void 0?{}:n,o=t.offset,a=o===void 0?0:o,s=t.mask,l=s===void 0?[]:s;e=Mi(e),i=Mi(i);var u=i.every?i.every:Array.prototype.every;return i.length&&e.length-a>=i.length&&u.call(i,function(c,d){var f=l[d]?l[d]&e[a+d]:e[a+d];return c===f})},cZe=function(e,i,n){i.forEach(function(t){for(var o in e.mediaGroups[t])for(var a in e.mediaGroups[t][o]){var s=e.mediaGroups[t][o][a];n(s,t,o,a)}})},H2={},y0={},Ew={},vfe;function JU(){if(vfe)return Ew;vfe=1;function r(o,a,s){if(s===void 0&&(s=Array.prototype),o&&typeof s.find=="function")return s.find.call(o,a);for(var l=0;l<o.length;l++)if(Object.prototype.hasOwnProperty.call(o,l)){var u=o[l];if(a.call(void 0,u,l,o))return u}}function e(o,a){return a===void 0&&(a=Object),a&&typeof a.freeze=="function"?a.freeze(o):o}function i(o,a){if(o===null||typeof o!="object")throw new TypeError("target is not an object");for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(o[s]=a[s]);return o}var n=e({HTML:"text/html",isHTML:function(o){return o===n.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),t=e({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(o){return o===t.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});return Ew.assign=i,Ew.find=r,Ew.freeze=e,Ew.MIME_TYPE=n,Ew.NAMESPACE=t,Ew}var yfe;function REe(){if(yfe)return y0;yfe=1;var r=JU(),e=r.find,i=r.NAMESPACE;function n(Be){return Be!==""}function t(Be){return Be?Be.split(/[\t\n\f\r ]+/).filter(n):[]}function o(Be,Ge){return Be.hasOwnProperty(Ge)||(Be[Ge]=!0),Be}function a(Be){if(!Be)return[];var Ge=t(Be);return Object.keys(Ge.reduce(o,{}))}function s(Be){return function(Ge){return Be&&Be.indexOf(Ge)!==-1}}function l(Be,Ge){for(var ut in Be)Object.prototype.hasOwnProperty.call(Be,ut)&&(Ge[ut]=Be[ut])}function u(Be,Ge){var ut=Be.prototype;if(!(ut instanceof Ge)){let Pt=function(){};Pt.prototype=Ge.prototype,Pt=new Pt,l(ut,Pt),Be.prototype=ut=Pt}ut.constructor!=Be&&(typeof Be!="function"&&console.error("unknown Class:"+Be),ut.constructor=Be)}var c={},d=c.ELEMENT_NODE=1,f=c.ATTRIBUTE_NODE=2,h=c.TEXT_NODE=3,p=c.CDATA_SECTION_NODE=4,g=c.ENTITY_REFERENCE_NODE=5,v=c.ENTITY_NODE=6,y=c.PROCESSING_INSTRUCTION_NODE=7,m=c.COMMENT_NODE=8,b=c.DOCUMENT_NODE=9,S=c.DOCUMENT_TYPE_NODE=10,_=c.DOCUMENT_FRAGMENT_NODE=11,C=c.NOTATION_NODE=12,T={},x={};T.INDEX_SIZE_ERR=(x[1]="Index size error",1),T.DOMSTRING_SIZE_ERR=(x[2]="DOMString size error",2);var A=T.HIERARCHY_REQUEST_ERR=(x[3]="Hierarchy request error",3);T.WRONG_DOCUMENT_ERR=(x[4]="Wrong document",4),T.INVALID_CHARACTER_ERR=(x[5]="Invalid character",5),T.NO_DATA_ALLOWED_ERR=(x[6]="No data allowed",6),T.NO_MODIFICATION_ALLOWED_ERR=(x[7]="No modification allowed",7);var w=T.NOT_FOUND_ERR=(x[8]="Not found",8);T.NOT_SUPPORTED_ERR=(x[9]="Not supported",9);var L=T.INUSE_ATTRIBUTE_ERR=(x[10]="Attribute in use",10);T.INVALID_STATE_ERR=(x[11]="Invalid state",11),T.SYNTAX_ERR=(x[12]="Syntax error",12),T.INVALID_MODIFICATION_ERR=(x[13]="Invalid modification",13),T.NAMESPACE_ERR=(x[14]="Invalid namespace",14),T.INVALID_ACCESS_ERR=(x[15]="Invalid access",15);function k(Be,Ge){if(Ge instanceof Error)var ut=Ge;else ut=this,Error.call(this,x[Be]),this.message=x[Be],Error.captureStackTrace&&Error.captureStackTrace(this,k);return ut.code=Be,Ge&&(this.message=this.message+": "+Ge),ut}k.prototype=Error.prototype,l(T,k);function D(){}D.prototype={length:0,item:function(Be){return Be>=0&&Be<this.length?this[Be]:null},toString:function(Be,Ge){for(var ut=[],Pt=0;Pt<this.length;Pt++)kr(this[Pt],ut,Be,Ge);return ut.join("")},filter:function(Be){return Array.prototype.filter.call(this,Be)},indexOf:function(Be){return Array.prototype.indexOf.call(this,Be)}};function j(Be,Ge){this._node=Be,this._refresh=Ge,N(this)}function N(Be){var Ge=Be._node._inc||Be._node.ownerDocument._inc;if(Be._inc!==Ge){var ut=Be._refresh(Be._node);if(jr(Be,"length",ut.length),!Be.$$length||ut.length<Be.$$length)for(var Pt=ut.length;Pt in Be;Pt++)Object.prototype.hasOwnProperty.call(Be,Pt)&&delete Be[Pt];l(ut,Be),Be._inc=Ge}}j.prototype.item=function(Be){return N(this),this[Be]||null},u(j,D);function V(){}function W(Be,Ge){for(var ut=Be.length;ut--;)if(Be[ut]===Ge)return ut}function K(Be,Ge,ut,Pt){if(Pt?Ge[W(Ge,Pt)]=ut:Ge[Ge.length++]=ut,Be){ut.ownerElement=Be;var Qt=Be.ownerDocument;Qt&&(Pt&&de(Qt,Be,Pt),ie(Qt,Be,ut))}}function H(Be,Ge,ut){var Pt=W(Ge,ut);if(Pt>=0){for(var Qt=Ge.length-1;Pt<Qt;)Ge[Pt]=Ge[++Pt];if(Ge.length=Qt,Be){var wr=Be.ownerDocument;wr&&(de(wr,Be,ut),ut.ownerElement=null)}}else throw new k(w,new Error(Be.tagName+"@"+ut))}V.prototype={length:0,item:D.prototype.item,getNamedItem:function(Be){for(var Ge=this.length;Ge--;){var ut=this[Ge];if(ut.nodeName==Be)return ut}},setNamedItem:function(Be){var Ge=Be.ownerElement;if(Ge&&Ge!=this._ownerElement)throw new k(L);var ut=this.getNamedItem(Be.nodeName);return K(this._ownerElement,this,Be,ut),ut},setNamedItemNS:function(Be){var Ge=Be.ownerElement,ut;if(Ge&&Ge!=this._ownerElement)throw new k(L);return ut=this.getNamedItemNS(Be.namespaceURI,Be.localName),K(this._ownerElement,this,Be,ut),ut},removeNamedItem:function(Be){var Ge=this.getNamedItem(Be);return H(this._ownerElement,this,Ge),Ge},removeNamedItemNS:function(Be,Ge){var ut=this.getNamedItemNS(Be,Ge);return H(this._ownerElement,this,ut),ut},getNamedItemNS:function(Be,Ge){for(var ut=this.length;ut--;){var Pt=this[ut];if(Pt.localName==Ge&&Pt.namespaceURI==Be)return Pt}return null}};function U(){}U.prototype={hasFeature:function(Be,Ge){return!0},createDocument:function(Be,Ge,ut){var Pt=new ee;if(Pt.implementation=this,Pt.childNodes=new D,Pt.doctype=ut||null,ut&&Pt.appendChild(ut),Ge){var Qt=Pt.createElementNS(Be,Ge);Pt.appendChild(Qt)}return Pt},createDocumentType:function(Be,Ge,ut){var Pt=new It;return Pt.name=Be,Pt.nodeName=Be,Pt.publicId=Ge||"",Pt.systemId=ut||"",Pt}};function I(){}I.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(Be,Ge){return ve(this,Be,Ge)},replaceChild:function(Be,Ge){ve(this,Be,Ge,xe),Ge&&this.removeChild(Ge)},removeChild:function(Be){return _e(this,Be)},appendChild:function(Be){return this.insertBefore(Be,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(Be){return zt(this.ownerDocument||this,this,Be)},normalize:function(){for(var Be=this.firstChild;Be;){var Ge=Be.nextSibling;Ge&&Ge.nodeType==h&&Be.nodeType==h?(this.removeChild(Ge),Be.appendData(Ge.data)):(Be.normalize(),Be=Ge)}},isSupported:function(Be,Ge){return this.ownerDocument.implementation.hasFeature(Be,Ge)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(Be){for(var Ge=this;Ge;){var ut=Ge._nsMap;if(ut){for(var Pt in ut)if(Object.prototype.hasOwnProperty.call(ut,Pt)&&ut[Pt]===Be)return Pt}Ge=Ge.nodeType==f?Ge.ownerDocument:Ge.parentNode}return null},lookupNamespaceURI:function(Be){for(var Ge=this;Ge;){var ut=Ge._nsMap;if(ut&&Object.prototype.hasOwnProperty.call(ut,Be))return ut[Be];Ge=Ge.nodeType==f?Ge.ownerDocument:Ge.parentNode}return null},isDefaultNamespace:function(Be){var Ge=this.lookupPrefix(Be);return Ge==null}};function Q(Be){return Be=="<"&&"&lt;"||Be==">"&&"&gt;"||Be=="&"&&"&amp;"||Be=='"'&&"&quot;"||"&#"+Be.charCodeAt()+";"}l(c,I),l(c,I.prototype);function Z(Be,Ge){if(Ge(Be))return!0;if(Be=Be.firstChild)do if(Z(Be,Ge))return!0;while(Be=Be.nextSibling)}function ee(){this.ownerDocument=this}function ie(Be,Ge,ut){Be&&Be._inc++;var Pt=ut.namespaceURI;Pt===i.XMLNS&&(Ge._nsMap[ut.prefix?ut.localName:""]=ut.value)}function de(Be,Ge,ut,Pt){Be&&Be._inc++;var Qt=ut.namespaceURI;Qt===i.XMLNS&&delete Ge._nsMap[ut.prefix?ut.localName:""]}function pe(Be,Ge,ut){if(Be&&Be._inc){Be._inc++;var Pt=Ge.childNodes;if(ut)Pt[Pt.length++]=ut;else{for(var Qt=Ge.firstChild,wr=0;Qt;)Pt[wr++]=Qt,Qt=Qt.nextSibling;Pt.length=wr,delete Pt[Pt.length]}}}function _e(Be,Ge){var ut=Ge.previousSibling,Pt=Ge.nextSibling;return ut?ut.nextSibling=Pt:Be.firstChild=Pt,Pt?Pt.previousSibling=ut:Be.lastChild=ut,Ge.parentNode=null,Ge.previousSibling=null,Ge.nextSibling=null,pe(Be.ownerDocument,Be),Ge}function Te(Be){return Be&&(Be.nodeType===I.DOCUMENT_NODE||Be.nodeType===I.DOCUMENT_FRAGMENT_NODE||Be.nodeType===I.ELEMENT_NODE)}function De(Be){return Be&&(Ee(Be)||Re(Be)||Pe(Be)||Be.nodeType===I.DOCUMENT_FRAGMENT_NODE||Be.nodeType===I.COMMENT_NODE||Be.nodeType===I.PROCESSING_INSTRUCTION_NODE)}function Pe(Be){return Be&&Be.nodeType===I.DOCUMENT_TYPE_NODE}function Ee(Be){return Be&&Be.nodeType===I.ELEMENT_NODE}function Re(Be){return Be&&Be.nodeType===I.TEXT_NODE}function je(Be,Ge){var ut=Be.childNodes||[];if(e(ut,Ee)||Pe(Ge))return!1;var Pt=e(ut,Pe);return!(Ge&&Pt&&ut.indexOf(Pt)>ut.indexOf(Ge))}function Ke(Be,Ge){var ut=Be.childNodes||[];function Pt(wr){return Ee(wr)&&wr!==Ge}if(e(ut,Pt))return!1;var Qt=e(ut,Pe);return!(Ge&&Qt&&ut.indexOf(Qt)>ut.indexOf(Ge))}function ot(Be,Ge,ut){if(!Te(Be))throw new k(A,"Unexpected parent node type "+Be.nodeType);if(ut&&ut.parentNode!==Be)throw new k(w,"child not in parent");if(!De(Ge)||Pe(Ge)&&Be.nodeType!==I.DOCUMENT_NODE)throw new k(A,"Unexpected node type "+Ge.nodeType+" for parent node type "+Be.nodeType)}function We(Be,Ge,ut){var Pt=Be.childNodes||[],Qt=Ge.childNodes||[];if(Ge.nodeType===I.DOCUMENT_FRAGMENT_NODE){var wr=Qt.filter(Ee);if(wr.length>1||e(Qt,Re))throw new k(A,"More than one element or text in fragment");if(wr.length===1&&!je(Be,ut))throw new k(A,"Element in fragment can not be inserted before doctype")}if(Ee(Ge)&&!je(Be,ut))throw new k(A,"Only one element can be added and only after doctype");if(Pe(Ge)){if(e(Pt,Pe))throw new k(A,"Only one doctype is allowed");var Xr=e(Pt,Ee);if(ut&&Pt.indexOf(Xr)<Pt.indexOf(ut))throw new k(A,"Doctype can only be inserted before an element");if(!ut&&Xr)throw new k(A,"Doctype can not be appended since element is present")}}function xe(Be,Ge,ut){var Pt=Be.childNodes||[],Qt=Ge.childNodes||[];if(Ge.nodeType===I.DOCUMENT_FRAGMENT_NODE){var wr=Qt.filter(Ee);if(wr.length>1||e(Qt,Re))throw new k(A,"More than one element or text in fragment");if(wr.length===1&&!Ke(Be,ut))throw new k(A,"Element in fragment can not be inserted before doctype")}if(Ee(Ge)&&!Ke(Be,ut))throw new k(A,"Only one element can be added and only after doctype");if(Pe(Ge)){if(e(Pt,function(Qr){return Pe(Qr)&&Qr!==ut}))throw new k(A,"Only one doctype is allowed");var Xr=e(Pt,Ee);if(ut&&Pt.indexOf(Xr)<Pt.indexOf(ut))throw new k(A,"Doctype can only be inserted before an element")}}function ve(Be,Ge,ut,Pt){ot(Be,Ge,ut),Be.nodeType===I.DOCUMENT_NODE&&(Pt||We)(Be,Ge,ut);var Qt=Ge.parentNode;if(Qt&&Qt.removeChild(Ge),Ge.nodeType===_){var wr=Ge.firstChild;if(wr==null)return Ge;var Xr=Ge.lastChild}else wr=Xr=Ge;var pi=ut?ut.previousSibling:Be.lastChild;wr.previousSibling=pi,Xr.nextSibling=ut,pi?pi.nextSibling=wr:Be.firstChild=wr,ut==null?Be.lastChild=Xr:ut.previousSibling=Xr;do{wr.parentNode=Be;var Qr=Be.ownerDocument||Be;he(wr,Qr)}while(wr!==Xr&&(wr=wr.nextSibling));return pe(Be.ownerDocument||Be,Be),Ge.nodeType==_&&(Ge.firstChild=Ge.lastChild=null),Ge}function he(Be,Ge){if(Be.ownerDocument!==Ge){if(Be.ownerDocument=Ge,Be.nodeType===d&&Be.attributes)for(var ut=0;ut<Be.attributes.length;ut++){var Pt=Be.attributes.item(ut);Pt&&(Pt.ownerDocument=Ge)}for(var Qt=Be.firstChild;Qt;)he(Qt,Ge),Qt=Qt.nextSibling}}function Se(Be,Ge){Ge.parentNode&&Ge.parentNode.removeChild(Ge),Ge.parentNode=Be,Ge.previousSibling=Be.lastChild,Ge.nextSibling=null,Ge.previousSibling?Ge.previousSibling.nextSibling=Ge:Be.firstChild=Ge,Be.lastChild=Ge,pe(Be.ownerDocument,Be,Ge);var ut=Be.ownerDocument||Be;return he(Ge,ut),Ge}ee.prototype={nodeName:"#document",nodeType:b,doctype:null,documentElement:null,_inc:1,insertBefore:function(Be,Ge){if(Be.nodeType==_){for(var ut=Be.firstChild;ut;){var Pt=ut.nextSibling;this.insertBefore(ut,Ge),ut=Pt}return Be}return ve(this,Be,Ge),he(Be,this),this.documentElement===null&&Be.nodeType===d&&(this.documentElement=Be),Be},removeChild:function(Be){return this.documentElement==Be&&(this.documentElement=null),_e(this,Be)},replaceChild:function(Be,Ge){ve(this,Be,Ge,xe),he(Be,this),Ge&&this.removeChild(Ge),Ee(Be)&&(this.documentElement=Be)},importNode:function(Be,Ge){return qt(this,Be,Ge)},getElementById:function(Be){var Ge=null;return Z(this.documentElement,function(ut){if(ut.nodeType==d&&ut.getAttribute("id")==Be)return Ge=ut,!0}),Ge},getElementsByClassName:function(Be){var Ge=a(Be);return new j(this,function(ut){var Pt=[];return Ge.length>0&&Z(ut.documentElement,function(Qt){if(Qt!==ut&&Qt.nodeType===d){var wr=Qt.getAttribute("class");if(wr){var Xr=Be===wr;if(!Xr){var pi=a(wr);Xr=Ge.every(s(pi))}Xr&&Pt.push(Qt)}}}),Pt})},createElement:function(Be){var Ge=new be;Ge.ownerDocument=this,Ge.nodeName=Be,Ge.tagName=Be,Ge.localName=Be,Ge.childNodes=new D;var ut=Ge.attributes=new V;return ut._ownerElement=Ge,Ge},createDocumentFragment:function(){var Be=new Et;return Be.ownerDocument=this,Be.childNodes=new D,Be},createTextNode:function(Be){var Ge=new rt;return Ge.ownerDocument=this,Ge.appendData(Be),Ge},createComment:function(Be){var Ge=new St;return Ge.ownerDocument=this,Ge.appendData(Be),Ge},createCDATASection:function(Be){var Ge=new xt;return Ge.ownerDocument=this,Ge.appendData(Be),Ge},createProcessingInstruction:function(Be,Ge){var ut=new Gt;return ut.ownerDocument=this,ut.tagName=ut.nodeName=ut.target=Be,ut.nodeValue=ut.data=Ge,ut},createAttribute:function(Be){var Ge=new ke;return Ge.ownerDocument=this,Ge.name=Be,Ge.nodeName=Be,Ge.localName=Be,Ge.specified=!0,Ge},createEntityReference:function(Be){var Ge=new Qe;return Ge.ownerDocument=this,Ge.nodeName=Be,Ge},createElementNS:function(Be,Ge){var ut=new be,Pt=Ge.split(":"),Qt=ut.attributes=new V;return ut.childNodes=new D,ut.ownerDocument=this,ut.nodeName=Ge,ut.tagName=Ge,ut.namespaceURI=Be,Pt.length==2?(ut.prefix=Pt[0],ut.localName=Pt[1]):ut.localName=Ge,Qt._ownerElement=ut,ut},createAttributeNS:function(Be,Ge){var ut=new ke,Pt=Ge.split(":");return ut.ownerDocument=this,ut.nodeName=Ge,ut.name=Ge,ut.namespaceURI=Be,ut.specified=!0,Pt.length==2?(ut.prefix=Pt[0],ut.localName=Pt[1]):ut.localName=Ge,ut}},u(ee,I);function be(){this._nsMap={}}be.prototype={nodeType:d,hasAttribute:function(Be){return this.getAttributeNode(Be)!=null},getAttribute:function(Be){var Ge=this.getAttributeNode(Be);return Ge&&Ge.value||""},getAttributeNode:function(Be){return this.attributes.getNamedItem(Be)},setAttribute:function(Be,Ge){var ut=this.ownerDocument.createAttribute(Be);ut.value=ut.nodeValue=""+Ge,this.setAttributeNode(ut)},removeAttribute:function(Be){var Ge=this.getAttributeNode(Be);Ge&&this.removeAttributeNode(Ge)},appendChild:function(Be){return Be.nodeType===_?this.insertBefore(Be,null):Se(this,Be)},setAttributeNode:function(Be){return this.attributes.setNamedItem(Be)},setAttributeNodeNS:function(Be){return this.attributes.setNamedItemNS(Be)},removeAttributeNode:function(Be){return this.attributes.removeNamedItem(Be.nodeName)},removeAttributeNS:function(Be,Ge){var ut=this.getAttributeNodeNS(Be,Ge);ut&&this.removeAttributeNode(ut)},hasAttributeNS:function(Be,Ge){return this.getAttributeNodeNS(Be,Ge)!=null},getAttributeNS:function(Be,Ge){var ut=this.getAttributeNodeNS(Be,Ge);return ut&&ut.value||""},setAttributeNS:function(Be,Ge,ut){var Pt=this.ownerDocument.createAttributeNS(Be,Ge);Pt.value=Pt.nodeValue=""+ut,this.setAttributeNode(Pt)},getAttributeNodeNS:function(Be,Ge){return this.attributes.getNamedItemNS(Be,Ge)},getElementsByTagName:function(Be){return new j(this,function(Ge){var ut=[];return Z(Ge,function(Pt){Pt!==Ge&&Pt.nodeType==d&&(Be==="*"||Pt.tagName==Be)&&ut.push(Pt)}),ut})},getElementsByTagNameNS:function(Be,Ge){return new j(this,function(ut){var Pt=[];return Z(ut,function(Qt){Qt!==ut&&Qt.nodeType===d&&(Be==="*"||Qt.namespaceURI===Be)&&(Ge==="*"||Qt.localName==Ge)&&Pt.push(Qt)}),Pt})}},ee.prototype.getElementsByTagName=be.prototype.getElementsByTagName,ee.prototype.getElementsByTagNameNS=be.prototype.getElementsByTagNameNS,u(be,I);function ke(){}ke.prototype.nodeType=f,u(ke,I);function qe(){}qe.prototype={data:"",substringData:function(Be,Ge){return this.data.substring(Be,Be+Ge)},appendData:function(Be){Be=this.data+Be,this.nodeValue=this.data=Be,this.length=Be.length},insertData:function(Be,Ge){this.replaceData(Be,0,Ge)},appendChild:function(Be){throw new Error(x[A])},deleteData:function(Be,Ge){this.replaceData(Be,Ge,"")},replaceData:function(Be,Ge,ut){var Pt=this.data.substring(0,Be),Qt=this.data.substring(Be+Ge);ut=Pt+ut+Qt,this.nodeValue=this.data=ut,this.length=ut.length}},u(qe,I);function rt(){}rt.prototype={nodeName:"#text",nodeType:h,splitText:function(Be){var Ge=this.data,ut=Ge.substring(Be);Ge=Ge.substring(0,Be),this.data=this.nodeValue=Ge,this.length=Ge.length;var Pt=this.ownerDocument.createTextNode(ut);return this.parentNode&&this.parentNode.insertBefore(Pt,this.nextSibling),Pt}},u(rt,qe);function St(){}St.prototype={nodeName:"#comment",nodeType:m},u(St,qe);function xt(){}xt.prototype={nodeName:"#cdata-section",nodeType:p},u(xt,qe);function It(){}It.prototype.nodeType=S,u(It,I);function Zt(){}Zt.prototype.nodeType=C,u(Zt,I);function ct(){}ct.prototype.nodeType=v,u(ct,I);function Qe(){}Qe.prototype.nodeType=g,u(Qe,I);function Et(){}Et.prototype.nodeName="#document-fragment",Et.prototype.nodeType=_,u(Et,I);function Gt(){}Gt.prototype.nodeType=y,u(Gt,I);function Xe(){}Xe.prototype.serializeToString=function(Be,Ge,ut){return Vt.call(Be,Ge,ut)},I.prototype.toString=Vt;function Vt(Be,Ge){var ut=[],Pt=this.nodeType==9&&this.documentElement||this,Qt=Pt.prefix,wr=Pt.namespaceURI;if(wr&&Qt==null){var Qt=Pt.lookupPrefix(wr);if(Qt==null)var Xr=[{namespace:wr,prefix:null}]}return kr(this,ut,Be,Ge,Xr),ut.join("")}function lr(Be,Ge,ut){var Pt=Be.prefix||"",Qt=Be.namespaceURI;if(!Qt||Pt==="xml"&&Qt===i.XML||Qt===i.XMLNS)return!1;for(var wr=ut.length;wr--;){var Xr=ut[wr];if(Xr.prefix===Pt)return Xr.namespace!==Qt}return!0}function Jt(Be,Ge,ut){Be.push(" ",Ge,'="',ut.replace(/[<>&"\t\n\r]/g,Q),'"')}function kr(Be,Ge,ut,Pt,Qt){if(Qt||(Qt=[]),Pt)if(Be=Pt(Be),Be){if(typeof Be=="string"){Ge.push(Be);return}}else return;switch(Be.nodeType){case d:var wr=Be.attributes,Xr=wr.length,vt=Be.firstChild,pi=Be.tagName;ut=i.isHTML(Be.namespaceURI)||ut;var Qr=pi;if(!ut&&!Be.prefix&&Be.namespaceURI){for(var Ur,ci=0;ci<wr.length;ci++)if(wr.item(ci).name==="xmlns"){Ur=wr.item(ci).value;break}if(!Ur)for(var Xt=Qt.length-1;Xt>=0;Xt--){var Ui=Qt[Xt];if(Ui.prefix===""&&Ui.namespace===Be.namespaceURI){Ur=Ui.namespace;break}}if(Ur!==Be.namespaceURI)for(var Xt=Qt.length-1;Xt>=0;Xt--){var Ui=Qt[Xt];if(Ui.namespace===Be.namespaceURI){Ui.prefix&&(Qr=Ui.prefix+":"+pi);break}}}Ge.push("<",Qr);for(var Dn=0;Dn<Xr;Dn++){var Kr=wr.item(Dn);Kr.prefix=="xmlns"?Qt.push({prefix:Kr.localName,namespace:Kr.value}):Kr.nodeName=="xmlns"&&Qt.push({prefix:"",namespace:Kr.value})}for(var Dn=0;Dn<Xr;Dn++){var Kr=wr.item(Dn);if(lr(Kr,ut,Qt)){var In=Kr.prefix||"",fn=Kr.namespaceURI;Jt(Ge,In?"xmlns:"+In:"xmlns",fn),Qt.push({prefix:In,namespace:fn})}kr(Kr,Ge,ut,Pt,Qt)}if(pi===Qr&&lr(Be,ut,Qt)){var In=Be.prefix||"",fn=Be.namespaceURI;Jt(Ge,In?"xmlns:"+In:"xmlns",fn),Qt.push({prefix:In,namespace:fn})}if(vt||ut&&!/^(?:meta|link|img|br|hr|input)$/i.test(pi)){if(Ge.push(">"),ut&&/^script$/i.test(pi))for(;vt;)vt.data?Ge.push(vt.data):kr(vt,Ge,ut,Pt,Qt.slice()),vt=vt.nextSibling;else for(;vt;)kr(vt,Ge,ut,Pt,Qt.slice()),vt=vt.nextSibling;Ge.push("</",Qr,">")}else Ge.push("/>");return;case b:case _:for(var vt=Be.firstChild;vt;)kr(vt,Ge,ut,Pt,Qt.slice()),vt=vt.nextSibling;return;case f:return Jt(Ge,Be.name,Be.value);case h:return Ge.push(Be.data.replace(/[<&>]/g,Q));case p:return Ge.push("<![CDATA[",Be.data,"]]>");case m:return Ge.push("<!--",Be.data,"-->");case S:var dr=Be.publicId,ue=Be.systemId;if(Ge.push("<!DOCTYPE ",Be.name),dr)Ge.push(" PUBLIC ",dr),ue&&ue!="."&&Ge.push(" ",ue),Ge.push(">");else if(ue&&ue!=".")Ge.push(" SYSTEM ",ue,">");else{var ar=Be.internalSubset;ar&&Ge.push(" [",ar,"]"),Ge.push(">")}return;case y:return Ge.push("<?",Be.target," ",Be.data,"?>");case g:return Ge.push("&",Be.nodeName,";");default:Ge.push("??",Be.nodeName)}}function qt(Be,Ge,ut){var Pt;switch(Ge.nodeType){case d:Pt=Ge.cloneNode(!1),Pt.ownerDocument=Be;case _:break;case f:ut=!0;break}if(Pt||(Pt=Ge.cloneNode(!1)),Pt.ownerDocument=Be,Pt.parentNode=null,ut)for(var Qt=Ge.firstChild;Qt;)Pt.appendChild(qt(Be,Qt,ut)),Qt=Qt.nextSibling;return Pt}function zt(Be,Ge,ut){var Pt=new Ge.constructor;for(var Qt in Ge)if(Object.prototype.hasOwnProperty.call(Ge,Qt)){var wr=Ge[Qt];typeof wr!="object"&&wr!=Pt[Qt]&&(Pt[Qt]=wr)}switch(Ge.childNodes&&(Pt.childNodes=new D),Pt.ownerDocument=Be,Pt.nodeType){case d:var Xr=Ge.attributes,pi=Pt.attributes=new V,Qr=Xr.length;pi._ownerElement=Pt;for(var Ur=0;Ur<Qr;Ur++)Pt.setAttributeNode(zt(Be,Xr.item(Ur),!0));break;case f:ut=!0}if(ut)for(var ci=Ge.firstChild;ci;)Pt.appendChild(zt(Be,ci,ut)),ci=ci.nextSibling;return Pt}function jr(Be,Ge,ut){Be[Ge]=ut}try{if(Object.defineProperty){let Be=function(Ge){switch(Ge.nodeType){case d:case _:var ut=[];for(Ge=Ge.firstChild;Ge;)Ge.nodeType!==7&&Ge.nodeType!==8&&ut.push(Be(Ge)),Ge=Ge.nextSibling;return ut.join("");default:return Ge.nodeValue}};Object.defineProperty(j.prototype,"length",{get:function(){return N(this),this.$$length}}),Object.defineProperty(I.prototype,"textContent",{get:function(){return Be(this)},set:function(Ge){switch(this.nodeType){case d:case _:for(;this.firstChild;)this.removeChild(this.firstChild);(Ge||String(Ge))&&this.appendChild(this.ownerDocument.createTextNode(Ge));break;default:this.data=Ge,this.value=Ge,this.nodeValue=Ge}}}),jr=function(Ge,ut,Pt){Ge["$$"+ut]=Pt}}}catch{}return y0.DocumentType=It,y0.DOMException=k,y0.DOMImplementation=U,y0.Element=be,y0.Node=I,y0.NodeList=D,y0.XMLSerializer=Xe,y0}var U2={},MG={},mfe;function dZe(){return mfe||(mfe=1,(function(r){var e=JU().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:"ﬃ",fflig:"ﬀ",ffllig:"ﬄ",Ffr:"𝔉",ffr:"𝔣",filig:"ﬁ",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"ﬂ",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:"Ĳ",ijlig:"ĳ",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:"ŉ",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})(MG)),MG}var Qj={},bfe;function fZe(){if(bfe)return Qj;bfe=1;var r=JU().NAMESPACE,e=/[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]/,i=new RegExp("[\\-\\.0-9"+e.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),n=new RegExp("^"+e.source+i.source+"*(?::"+e.source+i.source+"*)?$"),t=0,o=1,a=2,s=3,l=4,u=5,c=6,d=7;function f(A,w){this.message=A,this.locator=w,Error.captureStackTrace&&Error.captureStackTrace(this,f)}f.prototype=new Error,f.prototype.name=f.name;function h(){}h.prototype={parse:function(A,w,L){var k=this.domBuilder;k.startDocument(),S(w,w={}),p(A,w,L,k,this.errorHandler),k.endDocument()}};function p(A,w,L,k,D){function j(Se){if(Se>65535){Se-=65536;var be=55296+(Se>>10),ke=56320+(Se&1023);return String.fromCharCode(be,ke)}else return String.fromCharCode(Se)}function N(Se){var be=Se.slice(1,-1);return Object.hasOwnProperty.call(L,be)?L[be]:be.charAt(0)==="#"?j(parseInt(be.substr(1).replace("x","0x"))):(D.error("entity not found:"+Se),Se)}function V(Se){if(Se>ee){var be=A.substring(ee,Se).replace(/&#?\w+;/g,N);I&&W(ee),k.characters(be,0,Se-ee),ee=Se}}function W(Se,be){for(;Se>=H&&(be=U.exec(A));)K=be.index,H=K+be[0].length,I.lineNumber++;I.columnNumber=Se-K+1}for(var K=0,H=0,U=/.*(?:\r\n?|\n)|.*$/g,I=k.locator,Q=[{currentNSMap:w}],Z={},ee=0;;){try{var ie=A.indexOf("<",ee);if(ie<0){if(!A.substr(ee).match(/^\s*$/)){var de=k.doc,pe=de.createTextNode(A.substr(ee));de.appendChild(pe),k.currentElement=pe}return}switch(ie>ee&&V(ie),A.charAt(ie+1)){case"/":var ot=A.indexOf(">",ie+3),_e=A.substring(ie+2,ot).replace(/[ \t\n\r]+$/g,""),Te=Q.pop();ot<0?(_e=A.substring(ie+2).replace(/[\s<].*/,""),D.error("end tag name: "+_e+" is not complete:"+Te.tagName),ot=ie+1+_e.length):_e.match(/\s</)&&(_e=_e.replace(/[\s<].*/,""),D.error("end tag name: "+_e+" maybe not complete"),ot=ie+1+_e.length);var De=Te.localNSMap,Pe=Te.tagName==_e,Ee=Pe||Te.tagName&&Te.tagName.toLowerCase()==_e.toLowerCase();if(Ee){if(k.endElement(Te.uri,Te.localName,_e),De)for(var Re in De)Object.prototype.hasOwnProperty.call(De,Re)&&k.endPrefixMapping(Re);Pe||D.fatalError("end tag name: "+_e+" is not match the current start tagName:"+Te.tagName)}else Q.push(Te);ot++;break;case"?":I&&W(ie),ot=C(A,ie,k);break;case"!":I&&W(ie),ot=_(A,ie,k,D);break;default:I&&W(ie);var je=new T,Ke=Q[Q.length-1].currentNSMap,ot=v(A,ie,je,Ke,N,D),We=je.length;if(!je.closed&&b(A,ot,je.tagName,Z)&&(je.closed=!0,L.nbsp||D.warning("unclosed xml attribute")),I&&We){for(var xe=g(I,{}),ve=0;ve<We;ve++){var he=je[ve];W(he.offset),he.locator=g(I,{})}k.locator=xe,y(je,k,Ke)&&Q.push(je),k.locator=I}else y(je,k,Ke)&&Q.push(je);r.isHTML(je.uri)&&!je.closed?ot=m(A,ot,je.tagName,N,k):ot++}}catch(Se){if(Se instanceof f)throw Se;D.error("element parse error: "+Se),ot=-1}ot>ee?ee=ot:V(Math.max(ie,ee)+1)}}function g(A,w){return w.lineNumber=A.lineNumber,w.columnNumber=A.columnNumber,w}function v(A,w,L,k,D,j){function N(I,Q,Z){L.attributeNames.hasOwnProperty(I)&&j.fatalError("Attribute "+I+" redefined"),L.addValue(I,Q.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,D),Z)}for(var V,W,K=++w,H=t;;){var U=A.charAt(K);switch(U){case"=":if(H===o)V=A.slice(w,K),H=s;else if(H===a)H=s;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(H===s||H===o)if(H===o&&(j.warning('attribute value must after "="'),V=A.slice(w,K)),w=K+1,K=A.indexOf(U,w),K>0)W=A.slice(w,K),N(V,W,w-1),H=u;else throw new Error("attribute value no end '"+U+"' match");else if(H==l)W=A.slice(w,K),N(V,W,w),j.warning('attribute "'+V+'" missed start quot('+U+")!!"),w=K+1,H=u;else throw new Error('attribute value must after "="');break;case"/":switch(H){case t:L.setTagName(A.slice(w,K));case u:case c:case d:H=d,L.closed=!0;case l:case o:break;case a:L.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return j.error("unexpected end of input"),H==t&&L.setTagName(A.slice(w,K)),K;case">":switch(H){case t:L.setTagName(A.slice(w,K));case u:case c:case d:break;case l:case o:W=A.slice(w,K),W.slice(-1)==="/"&&(L.closed=!0,W=W.slice(0,-1));case a:H===a&&(W=V),H==l?(j.warning('attribute "'+W+'" missed quot(")!'),N(V,W,w)):((!r.isHTML(k[""])||!W.match(/^(?:disabled|checked|selected)$/i))&&j.warning('attribute "'+W+'" missed value!! "'+W+'" instead!!'),N(W,W,w));break;case s:throw new Error("attribute value missed!!")}return K;case"":U=" ";default:if(U<=" ")switch(H){case t:L.setTagName(A.slice(w,K)),H=c;break;case o:V=A.slice(w,K),H=a;break;case l:var W=A.slice(w,K);j.warning('attribute "'+W+'" missed quot(")!!'),N(V,W,w);case u:H=c;break}else switch(H){case a:L.tagName,(!r.isHTML(k[""])||!V.match(/^(?:disabled|checked|selected)$/i))&&j.warning('attribute "'+V+'" missed value!! "'+V+'" instead2!!'),N(V,V,w),w=K,H=o;break;case u:j.warning('attribute space is required"'+V+'"!!');case c:H=o,w=K;break;case s:H=l,w=K;break;case d:throw new Error("elements closed character '/' and '>' must be connected to")}}K++}}function y(A,w,L){for(var k=A.tagName,D=null,U=A.length;U--;){var j=A[U],N=j.qName,V=j.value,I=N.indexOf(":");if(I>0)var W=j.prefix=N.slice(0,I),K=N.slice(I+1),H=W==="xmlns"&&K;else K=N,W=null,H=N==="xmlns"&&"";j.localName=K,H!==!1&&(D==null&&(D={},S(L,L={})),L[H]=D[H]=V,j.uri=r.XMLNS,w.startPrefixMapping(H,V))}for(var U=A.length;U--;){j=A[U];var W=j.prefix;W&&(W==="xml"&&(j.uri=r.XML),W!=="xmlns"&&(j.uri=L[W||""]))}var I=k.indexOf(":");I>0?(W=A.prefix=k.slice(0,I),K=A.localName=k.slice(I+1)):(W=null,K=A.localName=k);var Q=A.uri=L[W||""];if(w.startElement(Q,K,k,A),A.closed){if(w.endElement(Q,K,k),D)for(W in D)Object.prototype.hasOwnProperty.call(D,W)&&w.endPrefixMapping(W)}else return A.currentNSMap=L,A.localNSMap=D,!0}function m(A,w,L,k,D){if(/^(?:script|textarea)$/i.test(L)){var j=A.indexOf("</"+L+">",w),N=A.substring(w+1,j);if(/[&<]/.test(N))return/^script$/i.test(L)?(D.characters(N,0,N.length),j):(N=N.replace(/&#?\w+;/g,k),D.characters(N,0,N.length),j)}return w+1}function b(A,w,L,k){var D=k[L];return D==null&&(D=A.lastIndexOf("</"+L+">"),D<w&&(D=A.lastIndexOf("</"+L)),k[L]=D),D<w}function S(A,w){for(var L in A)Object.prototype.hasOwnProperty.call(A,L)&&(w[L]=A[L])}function _(A,w,L,k){var D=A.charAt(w+2);switch(D){case"-":if(A.charAt(w+3)==="-"){var j=A.indexOf("-->",w+4);return j>w?(L.comment(A,w+4,j-w-4),j+3):(k.error("Unclosed comment"),-1)}else return-1;default:if(A.substr(w+3,6)=="CDATA["){var j=A.indexOf("]]>",w+9);return L.startCDATA(),L.characters(A,w+9,j-w-9),L.endCDATA(),j+3}var N=x(A,w),V=N.length;if(V>1&&/!doctype/i.test(N[0][0])){var W=N[1][0],K=!1,H=!1;V>3&&(/^public$/i.test(N[2][0])?(K=N[3][0],H=V>4&&N[4][0]):/^system$/i.test(N[2][0])&&(H=N[3][0]));var U=N[V-1];return L.startDTD(W,K,H),L.endDTD(),U.index+U[0].length}}return-1}function C(A,w,L){var k=A.indexOf("?>",w);if(k){var D=A.substring(w,k).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return D?(D[0].length,L.processingInstruction(D[1],D[2]),k+2):-1}return-1}function T(){this.attributeNames={}}T.prototype={setTagName:function(A){if(!n.test(A))throw new Error("invalid tagName:"+A);this.tagName=A},addValue:function(A,w,L){if(!n.test(A))throw new Error("invalid attribute:"+A);this.attributeNames[A]=this.length,this[this.length++]={qName:A,value:w,offset:L}},length:0,getLocalName:function(A){return this[A].localName},getLocator:function(A){return this[A].locator},getQName:function(A){return this[A].qName},getURI:function(A){return this[A].uri},getValue:function(A){return this[A].value}};function x(A,w){var L,k=[],D=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(D.lastIndex=w,D.exec(A);L=D.exec(A);)if(k.push(L),L[1])return k}return Qj.XMLReader=h,Qj.ParseError=f,Qj}var Sfe;function hZe(){if(Sfe)return U2;Sfe=1;var r=JU(),e=REe(),i=dZe(),n=fZe(),t=e.DOMImplementation,o=r.NAMESPACE,a=n.ParseError,s=n.XMLReader;function l(v){return v.replace(/\r[\n\u0085]/g,`
`).replace(/[\r\u0085\u2028]/g,`
`)}function u(v){this.options=v||{locator:{}}}u.prototype.parseFromString=function(v,y){var m=this.options,b=new s,S=m.domBuilder||new d,_=m.errorHandler,C=m.locator,T=m.xmlns||{},x=/\/x?html?$/.test(y),A=x?i.HTML_ENTITIES:i.XML_ENTITIES;C&&S.setDocumentLocator(C),b.errorHandler=c(_,S,C),b.domBuilder=m.domBuilder||S,x&&(T[""]=o.HTML),T.xml=T.xml||o.XML;var w=m.normalizeLineEndings||l;return v&&typeof v=="string"?b.parse(w(v),T,A):b.errorHandler.error("invalid doc source"),S.doc};function c(v,y,m){if(!v){if(y instanceof d)return y;v=y}var b={},S=v instanceof Function;m=m||{};function _(C){var T=v[C];!T&&S&&(T=v.length==2?function(x){v(C,x)}:v),b[C]=T&&function(x){T("[xmldom "+C+"]	"+x+h(m))}||function(){}}return _("warning"),_("error"),_("fatalError"),b}function d(){this.cdata=!1}function f(v,y){y.lineNumber=v.lineNumber,y.columnNumber=v.columnNumber}d.prototype={startDocument:function(){this.doc=new t().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(v,y,m,b){var S=this.doc,_=S.createElementNS(v,m||y),C=b.length;g(this,_),this.currentElement=_,this.locator&&f(this.locator,_);for(var T=0;T<C;T++){var v=b.getURI(T),x=b.getValue(T),m=b.getQName(T),A=S.createAttributeNS(v,m);this.locator&&f(b.getLocator(T),A),A.value=A.nodeValue=x,_.setAttributeNode(A)}},endElement:function(v,y,m){var b=this.currentElement;b.tagName,this.currentElement=b.parentNode},startPrefixMapping:function(v,y){},endPrefixMapping:function(v){},processingInstruction:function(v,y){var m=this.doc.createProcessingInstruction(v,y);this.locator&&f(this.locator,m),g(this,m)},ignorableWhitespace:function(v,y,m){},characters:function(v,y,m){if(v=p.apply(this,arguments),v){if(this.cdata)var b=this.doc.createCDATASection(v);else var b=this.doc.createTextNode(v);this.currentElement?this.currentElement.appendChild(b):/^\s*$/.test(v)&&this.doc.appendChild(b),this.locator&&f(this.locator,b)}},skippedEntity:function(v){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(v){(this.locator=v)&&(v.lineNumber=0)},comment:function(v,y,m){v=p.apply(this,arguments);var b=this.doc.createComment(v);this.locator&&f(this.locator,b),g(this,b)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(v,y,m){var b=this.doc.implementation;if(b&&b.createDocumentType){var S=b.createDocumentType(v,y,m);this.locator&&f(this.locator,S),g(this,S),this.doc.doctype=S}},warning:function(v){console.warn("[xmldom warning]	"+v,h(this.locator))},error:function(v){console.error("[xmldom error]	"+v,h(this.locator))},fatalError:function(v){throw new a(v,this.locator)}};function h(v){if(v)return`
@`+(v.systemId||"")+"#[line:"+v.lineNumber+",col:"+v.columnNumber+"]"}function p(v,y,m){return typeof v=="string"?v.substr(y,m):v.length>=y+m||y?new java.lang.String(v,y,m)+"":v}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(v){d.prototype[v]=function(){return null}});function g(v,y){v.currentElement?v.currentElement.appendChild(y):v.doc.appendChild(y)}return U2.__DOMHandler=d,U2.normalizeLineEndings=l,U2.DOMParser=u,U2}var _fe;function pZe(){if(_fe)return H2;_fe=1;var r=REe();return H2.DOMImplementation=r.DOMImplementation,H2.XMLSerializer=r.XMLSerializer,H2.DOMParser=hZe().DOMParser,H2}var gZe=pZe();/*! @name mpd-parser @version 0.22.1 @license Apache-2.0 */var Pfe=function(e){return!!e&&typeof e=="object"},Nd=function r(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return i.reduce(function(t,o){return typeof o!="object"||Object.keys(o).forEach(function(a){Array.isArray(t[a])&&Array.isArray(o[a])?t[a]=t[a].concat(o[a]):Pfe(t[a])&&Pfe(o[a])?t[a]=r(t[a],o[a]):t[a]=o[a]}),t},{})},MEe=function(e){return Object.keys(e).map(function(i){return e[i]})},vZe=function(e,i){for(var n=[],t=e;t<i;t++)n.push(t);return n},QU=function(e){return e.reduce(function(i,n){return i.concat(n)},[])},LEe=function(e){if(!e.length)return[];for(var i=[],n=0;n<e.length;n++)i.push(e[n]);return i},yZe=function(e,i){return e.reduce(function(n,t,o){return t[i]&&n.push(o),n},[])},n$=function(e,i){for(var n=0;n<e.length;n++)if(i(e[n]))return n;return-1},mZe=function(e,i){return MEe(e.reduce(function(n,t){return t.forEach(function(o){n[i(o)]=o}),n},{}))},lM={INVALID_NUMBER_OF_PERIOD:"INVALID_NUMBER_OF_PERIOD",DASH_EMPTY_MANIFEST:"DASH_EMPTY_MANIFEST",DASH_INVALID_XML:"DASH_INVALID_XML",NO_BASE_URL:"NO_BASE_URL",SEGMENT_TIME_UNSPECIFIED:"SEGMENT_TIME_UNSPECIFIED",UNSUPPORTED_UTC_TIMING_SCHEME:"UNSUPPORTED_UTC_TIMING_SCHEME"},gF=function(e){var i=e.baseUrl,n=i===void 0?"":i,t=e.source,o=t===void 0?"":t,a=e.range,s=a===void 0?"":a,l=e.indexRange,u=l===void 0?"":l,c={uri:o,resolvedUri:ZU(n||"",o)};if(s||u){var d=s||u,f=d.split("-"),h=bt.BigInt?bt.BigInt(f[0]):parseInt(f[0],10),p=bt.BigInt?bt.BigInt(f[1]):parseInt(f[1],10);h<Number.MAX_SAFE_INTEGER&&typeof h=="bigint"&&(h=Number(h)),p<Number.MAX_SAFE_INTEGER&&typeof p=="bigint"&&(p=Number(p));var g;typeof p=="bigint"||typeof h=="bigint"?g=bt.BigInt(p)-bt.BigInt(h)+bt.BigInt(1):g=p-h+1,typeof g=="bigint"&&g<Number.MAX_SAFE_INTEGER&&(g=Number(g)),c.byterange={length:g,offset:h}}return c},bZe=function(e){var i;return typeof e.offset=="bigint"||typeof e.length=="bigint"?i=bt.BigInt(e.offset)+bt.BigInt(e.length)-bt.BigInt(1):i=e.offset+e.length-1,e.offset+"-"+i},Cfe=function(e){return e&&typeof e!="number"&&(e=parseInt(e,10)),isNaN(e)?null:e},SZe={static:function(e){var i=e.duration,n=e.timescale,t=n===void 0?1:n,o=e.sourceDuration,a=e.periodDuration,s=Cfe(e.endNumber),l=i/t;return typeof s=="number"?{start:0,end:s}:typeof a=="number"?{start:0,end:a/l}:{start:0,end:o/l}},dynamic:function(e){var i=e.NOW,n=e.clientOffset,t=e.availabilityStartTime,o=e.timescale,a=o===void 0?1:o,s=e.duration,l=e.periodStart,u=l===void 0?0:l,c=e.minimumUpdatePeriod,d=c===void 0?0:c,f=e.timeShiftBufferDepth,h=f===void 0?1/0:f,p=Cfe(e.endNumber),g=(i+n)/1e3,v=t+u,y=g+d,m=y-v,b=Math.ceil(m*a/s),S=Math.floor((g-v-h)*a/s),_=Math.floor((g-v)*a/s);return{start:Math.max(0,S),end:typeof p=="number"?p:Math.min(b,_)}}},_Ze=function(e){return function(i){var n=e.duration,t=e.timescale,o=t===void 0?1:t,a=e.periodStart,s=e.startNumber,l=s===void 0?1:s;return{number:l+i,duration:n/o,timeline:a,time:i*n}}},f9=function(e){var i=e.type,n=e.duration,t=e.timescale,o=t===void 0?1:t,a=e.periodDuration,s=e.sourceDuration,l=SZe[i](e),u=l.start,c=l.end,d=vZe(u,c).map(_Ze(e));if(i==="static"){var f=d.length-1,h=typeof a=="number"?a:s;d[f].duration=h-n/o*f}return d},kEe=function(e){var i=e.baseUrl,n=e.initialization,t=n===void 0?{}:n,o=e.sourceDuration,a=e.indexRange,s=a===void 0?"":a,l=e.periodStart,u=e.presentationTime,c=e.number,d=c===void 0?0:c,f=e.duration;if(!i)throw new Error(lM.NO_BASE_URL);var h=gF({baseUrl:i,source:t.sourceURL,range:t.range}),p=gF({baseUrl:i,source:i,indexRange:s});if(p.map=h,f){var g=f9(e);g.length&&(p.duration=g[0].duration,p.timeline=g[0].timeline)}else o&&(p.duration=o,p.timeline=l);return p.presentationTime=u||l,p.number=d,[p]},h9=function(e,i,n){var t=e.sidx.map?e.sidx.map:null,o=e.sidx.duration,a=e.timeline||0,s=e.sidx.byterange,l=s.offset+s.length,u=i.timescale,c=i.references.filter(function(A){return A.referenceType!==1}),d=[],f=e.endList?"static":"dynamic",h=e.sidx.timeline,p=h,g=e.mediaSequence||0,v;typeof i.firstOffset=="bigint"?v=bt.BigInt(l)+i.firstOffset:v=l+i.firstOffset;for(var y=0;y<c.length;y++){var m=i.references[y],b=m.referencedSize,S=m.subsegmentDuration,_=void 0;typeof v=="bigint"?_=v+bt.BigInt(b)-bt.BigInt(1):_=v+b-1;var C=v+"-"+_,T={baseUrl:n,timescale:u,timeline:a,periodStart:h,presentationTime:p,number:g,duration:S,sourceDuration:o,indexRange:C,type:f},x=kEe(T)[0];t&&(x.map=t),d.push(x),typeof v=="bigint"?v+=bt.BigInt(b):v+=b,p+=S/u,g++}return e.segments=d,e},PZe=["AUDIO","SUBTITLES"],CZe=1/60,IEe=function(e){return mZe(e,function(i){var n=i.timeline;return n}).sort(function(i,n){return i.timeline>n.timeline?1:-1})},TZe=function(e,i){for(var n=0;n<e.length;n++)if(e[n].attributes.NAME===i)return e[n];return null},Tfe=function(e){var i=[];return cZe(e,PZe,function(n,t,o,a){i=i.concat(n.playlists||[])}),i},xfe=function(e){var i=e.playlist,n=e.mediaSequence;i.mediaSequence=n,i.segments.forEach(function(t,o){t.number=i.mediaSequence+o})},xZe=function(e){var i=e.oldPlaylists,n=e.newPlaylists,t=e.timelineStarts;n.forEach(function(o){o.discontinuitySequence=n$(t,function(c){var d=c.timeline;return d===o.timeline});var a=TZe(i,o.attributes.NAME);if(a&&!o.sidx){var s=o.segments[0],l=n$(a.segments,function(c){return Math.abs(c.presentationTime-s.presentationTime)<CZe});if(l===-1){xfe({playlist:o,mediaSequence:a.mediaSequence+a.segments.length}),o.segments[0].discontinuity=!0,o.discontinuityStarts.unshift(0),(!a.segments.length&&o.timeline>a.timeline||a.segments.length&&o.timeline>a.segments[a.segments.length-1].timeline)&&o.discontinuitySequence--;return}var u=a.segments[l];u.discontinuity&&!s.discontinuity&&(s.discontinuity=!0,o.discontinuityStarts.unshift(0),o.discontinuitySequence--),xfe({playlist:o,mediaSequence:a.segments[l].number})}})},EZe=function(e){var i=e.oldManifest,n=e.newManifest,t=i.playlists.concat(Tfe(i)),o=n.playlists.concat(Tfe(n));return n.timelineStarts=IEe([i.timelineStarts,n.timelineStarts]),xZe({oldPlaylists:t,newPlaylists:o,timelineStarts:n.timelineStarts}),n},ez=function(e){return e&&e.uri+"-"+bZe(e.byterange)},LG=function(e){var i=MEe(e.reduce(function(n,t){var o=t.attributes.id+(t.attributes.lang||"");if(!n[o])n[o]=t,n[o].attributes.timelineStarts=[];else{if(t.segments){var a;t.segments[0]&&(t.segments[0].discontinuity=!0),(a=n[o].segments).push.apply(a,t.segments)}t.attributes.contentProtection&&(n[o].attributes.contentProtection=t.attributes.contentProtection)}return n[o].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),n},{}));return i.map(function(n){return n.discontinuityStarts=yZe(n.segments||[],"discontinuity"),n})},p9=function(e,i){var n=ez(e.sidx),t=n&&i[n]&&i[n].sidx;return t&&h9(e,t,e.sidx.resolvedUri),e},AZe=function(e,i){if(i===void 0&&(i={}),!Object.keys(i).length)return e;for(var n in e)e[n]=p9(e[n],i);return e},wZe=function(e,i){var n,t=e.attributes,o=e.segments,a=e.sidx,s=e.mediaSequence,l=e.discontinuitySequence,u=e.discontinuityStarts,c={attributes:(n={NAME:t.id,BANDWIDTH:t.bandwidth,CODECS:t.codecs},n["PROGRAM-ID"]=1,n),uri:"",endList:t.type==="static",timeline:t.periodStart,resolvedUri:"",targetDuration:t.duration,discontinuitySequence:l,discontinuityStarts:u,timelineStarts:t.timelineStarts,mediaSequence:s,segments:o};return t.contentProtection&&(c.contentProtection=t.contentProtection),a&&(c.sidx=a),i&&(c.attributes.AUDIO="audio",c.attributes.SUBTITLES="subs"),c},OZe=function(e){var i,n=e.attributes,t=e.segments,o=e.mediaSequence,a=e.discontinuityStarts,s=e.discontinuitySequence;typeof t>"u"&&(t=[{uri:n.baseUrl,timeline:n.periodStart,resolvedUri:n.baseUrl||"",duration:n.sourceDuration,number:0}],n.duration=n.sourceDuration);var l=(i={NAME:n.id,BANDWIDTH:n.bandwidth},i["PROGRAM-ID"]=1,i);return n.codecs&&(l.CODECS=n.codecs),{attributes:l,uri:"",endList:n.type==="static",timeline:n.periodStart,resolvedUri:n.baseUrl||"",targetDuration:n.duration,timelineStarts:n.timelineStarts,discontinuityStarts:a,discontinuitySequence:s,mediaSequence:o,segments:t}},DZe=function(e,i,n){i===void 0&&(i={}),n===void 0&&(n=!1);var t,o=e.reduce(function(s,l){var u=l.attributes.role&&l.attributes.role.value||"",c=l.attributes.lang||"",d=l.attributes.label||"main";if(c&&!l.attributes.label){var f=u?" ("+u+")":"";d=""+l.attributes.lang+f}s[d]||(s[d]={language:c,autoselect:!0,default:u==="main",playlists:[],uri:""});var h=p9(wZe(l,n),i);return s[d].playlists.push(h),typeof t>"u"&&u==="main"&&(t=l,t.default=!0),s},{});if(!t){var a=Object.keys(o)[0];o[a].default=!0}return o},RZe=function(e,i){return i===void 0&&(i={}),e.reduce(function(n,t){var o=t.attributes.lang||"text";return n[o]||(n[o]={language:o,default:!1,autoselect:!1,playlists:[],uri:""}),n[o].playlists.push(p9(OZe(t),i)),n},{})},MZe=function(e){return e.reduce(function(i,n){return n&&n.forEach(function(t){var o=t.channel,a=t.language;i[a]={autoselect:!1,default:!1,instreamId:o,language:a},t.hasOwnProperty("aspectRatio")&&(i[a].aspectRatio=t.aspectRatio),t.hasOwnProperty("easyReader")&&(i[a].easyReader=t.easyReader),t.hasOwnProperty("3D")&&(i[a]["3D"]=t["3D"])}),i},{})},LZe=function(e){var i,n=e.attributes,t=e.segments,o=e.sidx,a=e.discontinuityStarts,s={attributes:(i={NAME:n.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:n.width,height:n.height},CODECS:n.codecs,BANDWIDTH:n.bandwidth},i["PROGRAM-ID"]=1,i),uri:"",endList:n.type==="static",timeline:n.periodStart,resolvedUri:"",targetDuration:n.duration,discontinuityStarts:a,timelineStarts:n.timelineStarts,segments:t};return n.frameRate&&(s.attributes["FRAME-RATE"]=n.frameRate),n.contentProtection&&(s.contentProtection=n.contentProtection),o&&(s.sidx=o),s},kZe=function(e){var i=e.attributes;return i.mimeType==="video/mp4"||i.mimeType==="video/webm"||i.contentType==="video"},IZe=function(e){var i=e.attributes;return i.mimeType==="audio/mp4"||i.mimeType==="audio/webm"||i.contentType==="audio"},NZe=function(e){var i=e.attributes;return i.mimeType==="text/vtt"||i.contentType==="text"},FZe=function(e,i){e.forEach(function(n){n.mediaSequence=0,n.discontinuitySequence=n$(i,function(t){var o=t.timeline;return o===n.timeline}),n.segments&&n.segments.forEach(function(t,o){t.number=o})})},Efe=function(e){return e?Object.keys(e).reduce(function(i,n){var t=e[n];return i.concat(t.playlists)},[]):[]},jZe=function(e){var i,n=e.dashPlaylists,t=e.locations,o=e.sidxMapping,a=o===void 0?{}:o,s=e.previousManifest;if(!n.length)return{};var l=n[0].attributes,u=l.sourceDuration,c=l.type,d=l.suggestedPresentationDelay,f=l.minimumUpdatePeriod,h=LG(n.filter(kZe)).map(LZe),p=LG(n.filter(IZe)),g=LG(n.filter(NZe)),v=n.map(function(T){return T.attributes.captionServices}).filter(Boolean),y={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(i={AUDIO:{},VIDEO:{}},i["CLOSED-CAPTIONS"]={},i.SUBTITLES={},i),uri:"",duration:u,playlists:AZe(h,a)};f>=0&&(y.minimumUpdatePeriod=f*1e3),t&&(y.locations=t),c==="dynamic"&&(y.suggestedPresentationDelay=d);var m=y.playlists.length===0,b=p.length?DZe(p,a,m):null,S=g.length?RZe(g,a):null,_=h.concat(Efe(b),Efe(S)),C=_.map(function(T){var x=T.timelineStarts;return x});return y.timelineStarts=IEe(C),FZe(_,y.timelineStarts),b&&(y.mediaGroups.AUDIO.audio=b),S&&(y.mediaGroups.SUBTITLES.subs=S),v.length&&(y.mediaGroups["CLOSED-CAPTIONS"].cc=MZe(v)),s?EZe({oldManifest:s,newManifest:y}):y},BZe=function(e,i,n){var t=e.NOW,o=e.clientOffset,a=e.availabilityStartTime,s=e.timescale,l=s===void 0?1:s,u=e.periodStart,c=u===void 0?0:u,d=e.minimumUpdatePeriod,f=d===void 0?0:d,h=(t+o)/1e3,p=a+c,g=h+f,v=g-p;return Math.ceil((v*l-i)/n)},NEe=function(e,i){for(var n=e.type,t=e.minimumUpdatePeriod,o=t===void 0?0:t,a=e.media,s=a===void 0?"":a,l=e.sourceDuration,u=e.timescale,c=u===void 0?1:u,d=e.startNumber,f=d===void 0?1:d,h=e.periodStart,p=[],g=-1,v=0;v<i.length;v++){var y=i[v],m=y.d,b=y.r||0,S=y.t||0;g<0&&(g=S),S&&S>g&&(g=S);var _=void 0;if(b<0){var C=v+1;C===i.length?n==="dynamic"&&o>0&&s.indexOf("$Number$")>0?_=BZe(e,g,m):_=(l*c-g)/m:_=(i[C].t-g)/m}else _=b+1;for(var T=f+p.length+_,x=f+p.length;x<T;)p.push({number:x,duration:m/c,time:g,timeline:h}),g+=m,x++}return p},VZe=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,HZe=function(e){return function(i,n,t,o){if(i==="$$")return"$";if(typeof e[n]>"u")return i;var a=""+e[n];return n==="RepresentationID"||(t?o=parseInt(o,10):o=1,a.length>=o)?a:""+new Array(o-a.length+1).join("0")+a}},Afe=function(e,i){return e.replace(VZe,HZe(i))},UZe=function(e,i){return!e.duration&&!i?[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}]:e.duration?f9(e):NEe(e,i)},zZe=function(e,i){var n={RepresentationID:e.id,Bandwidth:e.bandwidth||0},t=e.initialization,o=t===void 0?{sourceURL:"",range:""}:t,a=gF({baseUrl:e.baseUrl,source:Afe(o.sourceURL,n),range:o.range}),s=UZe(e,i);return s.map(function(l){n.Number=l.number,n.Time=l.time;var u=Afe(e.media||"",n),c=e.timescale||1,d=e.presentationTimeOffset||0,f=e.periodStart+(l.time-d)/c,h={uri:u,timeline:l.timeline,duration:l.duration,resolvedUri:ZU(e.baseUrl||"",u),map:a,number:l.number,presentationTime:f};return h})},WZe=function(e,i){var n=e.baseUrl,t=e.initialization,o=t===void 0?{}:t,a=gF({baseUrl:n,source:o.sourceURL,range:o.range}),s=gF({baseUrl:n,source:i.media,range:i.mediaRange});return s.map=a,s},GZe=function(e,i){var n=e.duration,t=e.segmentUrls,o=t===void 0?[]:t,a=e.periodStart;if(!n&&!i||n&&i)throw new Error(lM.SEGMENT_TIME_UNSPECIFIED);var s=o.map(function(c){return WZe(e,c)}),l;n&&(l=f9(e)),i&&(l=NEe(e,i));var u=l.map(function(c,d){if(s[d]){var f=s[d],h=e.timescale||1,p=e.presentationTimeOffset||0;return f.timeline=c.timeline,f.duration=c.duration,f.number=c.number,f.presentationTime=a+(c.time-p)/h,f}}).filter(function(c){return c});return u},YZe=function(e){var i=e.attributes,n=e.segmentInfo,t,o;n.template?(o=zZe,t=Nd(i,n.template)):n.base?(o=kEe,t=Nd(i,n.base)):n.list&&(o=GZe,t=Nd(i,n.list));var a={attributes:i};if(!o)return a;var s=o(t,n.segmentTimeline);if(t.duration){var l=t,u=l.duration,c=l.timescale,d=c===void 0?1:c;t.duration=u/d}else s.length?t.duration=s.reduce(function(f,h){return Math.max(f,Math.ceil(h.duration))},0):t.duration=0;return a.attributes=t,a.segments=s,n.base&&t.indexRange&&(a.sidx=s[0],a.segments=[]),a},$Ze=function(e){return e.map(YZe)},cl=function(e,i){return LEe(e.childNodes).filter(function(n){var t=n.tagName;return t===i})},g9=function(e){return e.textContent.trim()},qZe=function(e){return parseFloat(e.split("/").reduce(function(i,n){return i/n}))},YD=function(e){var i=31536e3,n=720*60*60,t=1440*60,o=3600,a=60,s=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/,l=s.exec(e);if(!l)return 0;var u=l.slice(1),c=u[0],d=u[1],f=u[2],h=u[3],p=u[4],g=u[5];return parseFloat(c||0)*i+parseFloat(d||0)*n+parseFloat(f||0)*t+parseFloat(h||0)*o+parseFloat(p||0)*a+parseFloat(g||0)},XZe=function(e){var i=/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/;return i.test(e)&&(e+="Z"),Date.parse(e)},wfe={mediaPresentationDuration:function(e){return YD(e)},availabilityStartTime:function(e){return XZe(e)/1e3},minimumUpdatePeriod:function(e){return YD(e)},suggestedPresentationDelay:function(e){return YD(e)},type:function(e){return e},timeShiftBufferDepth:function(e){return YD(e)},start:function(e){return YD(e)},width:function(e){return parseInt(e,10)},height:function(e){return parseInt(e,10)},bandwidth:function(e){return parseInt(e,10)},frameRate:function(e){return qZe(e)},startNumber:function(e){return parseInt(e,10)},timescale:function(e){return parseInt(e,10)},presentationTimeOffset:function(e){return parseInt(e,10)},duration:function(e){var i=parseInt(e,10);return isNaN(i)?YD(e):i},d:function(e){return parseInt(e,10)},t:function(e){return parseInt(e,10)},r:function(e){return parseInt(e,10)},DEFAULT:function(e){return e}},Hc=function(e){return e&&e.attributes?LEe(e.attributes).reduce(function(i,n){var t=wfe[n.name]||wfe.DEFAULT;return i[n.name]=t(n.value),i},{}):{}},KZe={"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"},tz=function(e,i){return i.length?QU(e.map(function(n){return i.map(function(t){return ZU(n,g9(t))})})):e},v9=function(e){var i=cl(e,"SegmentTemplate")[0],n=cl(e,"SegmentList")[0],t=n&&cl(n,"SegmentURL").map(function(f){return Nd({tag:"SegmentURL"},Hc(f))}),o=cl(e,"SegmentBase")[0],a=n||i,s=a&&cl(a,"SegmentTimeline")[0],l=n||o||i,u=l&&cl(l,"Initialization")[0],c=i&&Hc(i);c&&u?c.initialization=u&&Hc(u):c&&c.initialization&&(c.initialization={sourceURL:c.initialization});var d={template:c,segmentTimeline:s&&cl(s,"S").map(function(f){return Hc(f)}),list:n&&Nd(Hc(n),{segmentUrls:t,initialization:Hc(u)}),base:o&&Nd(Hc(o),{initialization:Hc(u)})};return Object.keys(d).forEach(function(f){d[f]||delete d[f]}),d},ZZe=function(e,i,n){return function(t){var o=cl(t,"BaseURL"),a=tz(i,o),s=Nd(e,Hc(t)),l=v9(t);return a.map(function(u){return{segmentInfo:Nd(n,l),attributes:Nd(s,{baseUrl:u})}})}},JZe=function(e){return e.reduce(function(i,n){var t=Hc(n);t.schemeIdUri&&(t.schemeIdUri=t.schemeIdUri.toLowerCase());var o=KZe[t.schemeIdUri];if(o){i[o]={attributes:t};var a=cl(n,"cenc:pssh")[0];if(a){var s=g9(a);i[o].pssh=s&&xEe(s)}}return i},{})},QZe=function(e){if(e.schemeIdUri==="urn:scte:dash:cc:cea-608:2015"){var i=typeof e.value!="string"?[]:e.value.split(";");return i.map(function(t){var o,a;if(a=t,/^CC\d=/.test(t)){var s=t.split("=");o=s[0],a=s[1]}else/^CC\d$/.test(t)&&(o=t);return{channel:o,language:a}})}else if(e.schemeIdUri==="urn:scte:dash:cc:cea-708:2015"){var n=typeof e.value!="string"?[]:e.value.split(";");return n.map(function(t){var o={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(t)){var a=t.split("="),s=a[0],l=a[1],u=l===void 0?"":l;o.channel=s,o.language=t,u.split(",").forEach(function(c){var d=c.split(":"),f=d[0],h=d[1];f==="lang"?o.language=h:f==="er"?o.easyReader=Number(h):f==="war"?o.aspectRatio=Number(h):f==="3D"&&(o["3D"]=Number(h))})}else o.language=t;return o.channel&&(o.channel="SERVICE"+o.channel),o})}},eJe=function(e,i,n){return function(t){var o=Hc(t),a=tz(i,cl(t,"BaseURL")),s=cl(t,"Role")[0],l={role:Hc(s)},u=Nd(e,o,l),c=cl(t,"Accessibility")[0],d=QZe(Hc(c));d&&(u=Nd(u,{captionServices:d}));var f=cl(t,"Label")[0];if(f&&f.childNodes.length){var h=f.childNodes[0].nodeValue.trim();u=Nd(u,{label:h})}var p=JZe(cl(t,"ContentProtection"));Object.keys(p).length&&(u=Nd(u,{contentProtection:p}));var g=v9(t),v=cl(t,"Representation"),y=Nd(n,g);return QU(v.map(ZZe(u,a,y)))}},tJe=function(e,i){return function(n,t){var o=tz(i,cl(n.node,"BaseURL")),a=Nd(e,{periodStart:n.attributes.start});typeof n.attributes.duration=="number"&&(a.periodDuration=n.attributes.duration);var s=cl(n.node,"AdaptationSet"),l=v9(n.node);return QU(s.map(eJe(a,o,l)))}},rJe=function(e){var i=e.attributes,n=e.priorPeriodAttributes,t=e.mpdType;return typeof i.start=="number"?i.start:n&&typeof n.start=="number"&&typeof n.duration=="number"?n.start+n.duration:!n&&t==="static"?0:null},iJe=function(e,i){i===void 0&&(i={});var n=i,t=n.manifestUri,o=t===void 0?"":t,a=n.NOW,s=a===void 0?Date.now():a,l=n.clientOffset,u=l===void 0?0:l,c=cl(e,"Period");if(!c.length)throw new Error(lM.INVALID_NUMBER_OF_PERIOD);var d=cl(e,"Location"),f=Hc(e),h=tz([o],cl(e,"BaseURL"));f.type=f.type||"static",f.sourceDuration=f.mediaPresentationDuration||0,f.NOW=s,f.clientOffset=u,d.length&&(f.locations=d.map(g9));var p=[];return c.forEach(function(g,v){var y=Hc(g),m=p[v-1];y.start=rJe({attributes:y,priorPeriodAttributes:m?m.attributes:null,mpdType:f.type}),p.push({node:g,attributes:y})}),{locations:f.locations,representationInfo:QU(p.map(tJe(f,h)))}},FEe=function(e){if(e==="")throw new Error(lM.DASH_EMPTY_MANIFEST);var i=new gZe.DOMParser,n,t;try{n=i.parseFromString(e,"application/xml"),t=n&&n.documentElement.tagName==="MPD"?n.documentElement:null}catch{}if(!t||t&&t.getElementsByTagName("parsererror").length>0)throw new Error(lM.DASH_INVALID_XML);return t},nJe=function(e){var i=cl(e,"UTCTiming")[0];if(!i)return null;var n=Hc(i);switch(n.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":n.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":n.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":n.method="DIRECT",n.value=Date.parse(n.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(lM.UNSUPPORTED_UTC_TIMING_SCHEME)}return n},oJe=function(e,i){i===void 0&&(i={});var n=iJe(FEe(e),i),t=$Ze(n.representationInfo);return jZe({dashPlaylists:t,locations:n.locations,sidxMapping:i.sidxMapping,previousManifest:i.previousManifest})},aJe=function(e){return nJe(FEe(e))},kG,Ofe;function sJe(){if(Ofe)return kG;Ofe=1;var r=Math.pow(2,32),e=function(i){var n=new DataView(i.buffer,i.byteOffset,i.byteLength),t;return n.getBigUint64?(t=n.getBigUint64(0),t<Number.MAX_SAFE_INTEGER?Number(t):t):n.getUint32(0)*r+n.getUint32(4)};return kG={getUint64:e,MAX_UINT32:r},kG}var IG,Dfe;function lJe(){if(Dfe)return IG;Dfe=1;var r=sJe().getUint64,e=function(i){var n=new DataView(i.buffer,i.byteOffset,i.byteLength),t={version:i[0],flags:new Uint8Array(i.subarray(1,4)),references:[],referenceId:n.getUint32(4),timescale:n.getUint32(8)},o=12;t.version===0?(t.earliestPresentationTime=n.getUint32(o),t.firstOffset=n.getUint32(o+4),o+=8):(t.earliestPresentationTime=r(i.subarray(o)),t.firstOffset=r(i.subarray(o+8)),o+=16),o+=2;var a=n.getUint16(o);for(o+=2;a>0;o+=12,a--)t.references.push({referenceType:(i[o]&128)>>>7,referencedSize:n.getUint32(o)&2147483647,subsegmentDuration:n.getUint32(o+4),startsWithSap:!!(i[o+8]&128),sapType:(i[o+8]&112)>>>4,sapDeltaTime:n.getUint32(o+8)&268435455});return t};return IG=e,IG}var uJe=lJe();const cJe=Lu(uJe);var dJe=Mi([73,68,51]),fJe=function(e,i){i===void 0&&(i=0),e=Mi(e);var n=e[i+5],t=e[i+6]<<21|e[i+7]<<14|e[i+8]<<7|e[i+9],o=(n&16)>>4;return o?t+20:t+10},cN=function r(e,i){return i===void 0&&(i=0),e=Mi(e),e.length-i<10||!fs(e,dJe,{offset:i})?i:(i+=fJe(e,i),r(e,i))},Rfe=function(e){return typeof e=="string"?DEe(e):e},hJe=function(e){return Array.isArray(e)?e.map(function(i){return Rfe(i)}):[Rfe(e)]},pJe=function r(e,i,n){n===void 0&&(n=!1),i=hJe(i),e=Mi(e);var t=[];if(!i.length)return t;for(var o=0;o<e.length;){var a=(e[o]<<24|e[o+1]<<16|e[o+2]<<8|e[o+3])>>>0,s=e.subarray(o+4,o+8);if(a===0)break;var l=o+a;if(l>e.length){if(n)break;l=e.length}var u=e.subarray(o+8,l);fs(s,i[0])&&(i.length===1?t.push(u):t.push.apply(t,r(u,i.slice(1),n))),o=l}return t},eB={EBML:Mi([26,69,223,163]),DocType:Mi([66,130]),Segment:Mi([24,83,128,103]),SegmentInfo:Mi([21,73,169,102]),Tracks:Mi([22,84,174,107]),Track:Mi([174]),TrackNumber:Mi([215]),DefaultDuration:Mi([35,227,131]),TrackEntry:Mi([174]),TrackType:Mi([131]),FlagDefault:Mi([136]),CodecID:Mi([134]),CodecPrivate:Mi([99,162]),VideoTrack:Mi([224]),AudioTrack:Mi([225]),Cluster:Mi([31,67,182,117]),Timestamp:Mi([231]),TimestampScale:Mi([42,215,177]),BlockGroup:Mi([160]),BlockDuration:Mi([155]),Block:Mi([161]),SimpleBlock:Mi([163])},o$=[128,64,32,16,8,4,2,1],gJe=function(e){for(var i=1,n=0;n<o$.length&&!(e&o$[n]);n++)i++;return i},_3=function(e,i,n,t){n===void 0&&(n=!0),t===void 0&&(t=!1);var o=gJe(e[i]),a=e.subarray(i,i+o);return n&&(a=Array.prototype.slice.call(e,i,i+o),a[0]^=o$[o-1]),{length:o,value:sZe(a,{signed:t}),bytes:a}},Mfe=function r(e){return typeof e=="string"?e.match(/.{1,2}/g).map(function(i){return r(i)}):typeof e=="number"?lZe(e):e},vJe=function(e){return Array.isArray(e)?e.map(function(i){return Mfe(i)}):[Mfe(e)]},yJe=function r(e,i,n){if(n>=i.length)return i.length;var t=_3(i,n,!1);if(fs(e.bytes,t.bytes))return n;var o=_3(i,n+t.length);return r(e,i,n+o.length+o.value+t.length)},Lfe=function r(e,i){i=vJe(i),e=Mi(e);var n=[];if(!i.length)return n;for(var t=0;t<e.length;){var o=_3(e,t,!1),a=_3(e,t+o.length),s=t+o.length+a.length;a.value===127&&(a.value=yJe(o,e,s),a.value!==e.length&&(a.value-=s));var l=s+a.value>e.length?e.length:s+a.value,u=e.subarray(s,l);fs(i[0],o.bytes)&&(i.length===1?n.push(u):n=n.concat(r(u,i.slice(1))));var c=o.length+a.length+u.length;t+=c}return n},mJe=Mi([0,0,0,1]),bJe=Mi([0,0,1]),SJe=Mi([0,0,3]),_Je=function(e){for(var i=[],n=1;n<e.length-2;)fs(e.subarray(n,n+3),SJe)&&(i.push(n+2),n++),n++;if(i.length===0)return e;var t=e.length-i.length,o=new Uint8Array(t),a=0;for(n=0;n<t;a++,n++)a===i[0]&&(a++,i.shift()),o[n]=e[a];return o},jEe=function(e,i,n,t){e=Mi(e),n=[].concat(n);for(var o=0,a,s=0;o<e.length&&(s<t||a);){var l=void 0;if(fs(e.subarray(o),mJe)?l=4:fs(e.subarray(o),bJe)&&(l=3),!l){o++;continue}if(s++,a)return _Je(e.subarray(a,o));var u=void 0;i==="h264"?u=e[o+l]&31:i==="h265"&&(u=e[o+l]>>1&63),n.indexOf(u)!==-1&&(a=o+l),o+=l+(i==="h264"?1:2)}return e.subarray(0,0)},PJe=function(e,i,n){return jEe(e,"h264",i,n)},CJe=function(e,i,n){return jEe(e,"h265",i,n)},xd={webm:Mi([119,101,98,109]),matroska:Mi([109,97,116,114,111,115,107,97]),flac:Mi([102,76,97,67]),ogg:Mi([79,103,103,83]),ac3:Mi([11,119]),riff:Mi([82,73,70,70]),avi:Mi([65,86,73]),wav:Mi([87,65,86,69]),"3gp":Mi([102,116,121,112,51,103]),mp4:Mi([102,116,121,112]),fmp4:Mi([115,116,121,112]),mov:Mi([102,116,121,112,113,116]),moov:Mi([109,111,111,118]),moof:Mi([109,111,111,102])},uM={aac:function(e){var i=cN(e);return fs(e,[255,16],{offset:i,mask:[255,22]})},mp3:function(e){var i=cN(e);return fs(e,[255,2],{offset:i,mask:[255,6]})},webm:function(e){var i=Lfe(e,[eB.EBML,eB.DocType])[0];return fs(i,xd.webm)},mkv:function(e){var i=Lfe(e,[eB.EBML,eB.DocType])[0];return fs(i,xd.matroska)},mp4:function(e){if(uM["3gp"](e)||uM.mov(e))return!1;if(fs(e,xd.mp4,{offset:4})||fs(e,xd.fmp4,{offset:4})||fs(e,xd.moof,{offset:4})||fs(e,xd.moov,{offset:4}))return!0},mov:function(e){return fs(e,xd.mov,{offset:4})},"3gp":function(e){return fs(e,xd["3gp"],{offset:4})},ac3:function(e){var i=cN(e);return fs(e,xd.ac3,{offset:i})},ts:function(e){if(e.length<189&&e.length>=1)return e[0]===71;for(var i=0;i+188<e.length&&i<188;){if(e[i]===71&&e[i+188]===71)return!0;i+=1}return!1},flac:function(e){var i=cN(e);return fs(e,xd.flac,{offset:i})},ogg:function(e){return fs(e,xd.ogg)},avi:function(e){return fs(e,xd.riff)&&fs(e,xd.avi,{offset:8})},wav:function(e){return fs(e,xd.riff)&&fs(e,xd.wav,{offset:8})},h264:function(e){return PJe(e,7,3).length},h265:function(e){return CJe(e,[32,33],3).length}},a$=Object.keys(uM).filter(function(r){return r!=="ts"&&r!=="h264"&&r!=="h265"}).concat(["ts","h264","h265"]);a$.forEach(function(r){var e=uM[r];uM[r]=function(i){return e(Mi(i))}});var TJe=uM,y9=function(e){e=Mi(e);for(var i=0;i<a$.length;i++){var n=a$[i];if(TJe[n](e))return n}return""},xJe=function(e){return pJe(e,["moof"]).length>0},NG,kfe;function EJe(){if(kfe)return NG;kfe=1;var r=9e4,e,i,n,t,o,a,s;return e=function(l){return l*r},i=function(l,u){return l*u},n=function(l){return l/r},t=function(l,u){return l/u},o=function(l,u){return e(t(l,u))},a=function(l,u){return i(n(l),u)},s=function(l,u,c){return n(c?l:l-u)},NG={ONE_SECOND_IN_TS:r,secondsToVideoTs:e,secondsToAudioTs:i,videoTsToSeconds:n,audioTsToSeconds:t,audioTsToVideoTs:o,videoTsToAudioTs:a,metadataTsToSeconds:s},NG}var P3=EJe();function s$(r){return s$=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s$(r)}function AJe(r){try{return Function.toString.call(r).indexOf("[native code]")!==-1}catch{return typeof r=="function"}}function l$(r){var e=typeof Map=="function"?new Map:void 0;return l$=function(n){if(n===null||!AJe(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(e!==void 0){if(e.has(n))return e.get(n);e.set(n,t)}function t(){return TEe(n,arguments,s$(this).constructor)}return t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),sM(t,n)},l$(r)}/**
 * @license
 * Video.js 7.21.7 <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 BEe="7.21.7",F0={},US=function(e,i){return F0[e]=F0[e]||[],i&&(F0[e]=F0[e].concat(i)),F0[e]},wJe=function(e,i){US(e,i)},VEe=function(e,i){var n=US(e).indexOf(i);return n<=-1?!1:(F0[e]=F0[e].slice(),F0[e].splice(n,1),!0)},OJe=function(e,i){US(e,[].concat(i).map(function(n){var t=function o(){return VEe(e,o),n.apply(void 0,arguments)};return t}))},C3={prefixed:!0},_V=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"]],Ife=_V[0],dN;for(var tB=0;tB<_V.length;tB++)if(_V[tB][1]in Vr){dN=_V[tB];break}if(dN){for(var rB=0;rB<dN.length;rB++)C3[Ife[rB]]=dN[rB];C3.prefixed=dN[0]!==Ife[0]}var Tf=[],DJe=function(e,i){return function(n,t,o){var a=i.levels[t],s=new RegExp("^("+a+")$");if(n!=="log"&&o.unshift(n.toUpperCase()+":"),o.unshift(e+":"),Tf){Tf.push([].concat(o));var l=Tf.length-1e3;Tf.splice(0,l>0?l:0)}if(bt.console){var u=bt.console[n];!u&&n==="debug"&&(u=bt.console.info||bt.console.log),!(!u||!a||!s.test(n))&&u[Array.isArray(o)?"apply":"call"](bt.console,o)}}};function HEe(r){var e="info",i,n=function(){for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];i("log",e,a)};return i=DJe(r,n),n.createLogger=function(t){return HEe(r+": "+t)},n.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:e},n.level=function(t){if(typeof t=="string"){if(!n.levels.hasOwnProperty(t))throw new Error('"'+t+'" in not a valid log level');e=t}return e},n.history=function(){return Tf?[].concat(Tf):[]},n.history.filter=function(t){return(Tf||[]).filter(function(o){return new RegExp(".*"+t+".*").test(o[0])})},n.history.clear=function(){Tf&&(Tf.length=0)},n.history.disable=function(){Tf!==null&&(Tf.length=0,Tf=null)},n.history.enable=function(){Tf===null&&(Tf=[])},n.error=function(){for(var t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];return i("error",e,o)},n.warn=function(){for(var t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];return i("warn",e,o)},n.debug=function(){for(var t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];return i("debug",e,o)},n}var Ln=HEe("VIDEOJS"),UEe=Ln.createLogger,RJe=Object.prototype.toString,zEe=function(e){return Q0(e)?Object.keys(e):[]};function xR(r,e){zEe(r).forEach(function(i){return e(r[i],i)})}function MJe(r,e,i){return i===void 0&&(i=0),zEe(r).reduce(function(n,t){return e(n,r[t],t)},i)}function Ks(r){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];return Object.assign?wn.apply(void 0,[r].concat(i)):(i.forEach(function(t){t&&xR(t,function(o,a){r[a]=o})}),r)}function Q0(r){return!!r&&typeof r=="object"}function vF(r){return Q0(r)&&RJe.call(r)==="[object Object]"&&r.constructor===Object}function yF(r,e){if(!r||!e)return"";if(typeof bt.getComputedStyle=="function"){var i;try{i=bt.getComputedStyle(r)}catch{return""}return i?i.getPropertyValue(e)||i[e]:""}return""}var Ru=bt.navigator&&bt.navigator.userAgent||"",Nfe=/AppleWebKit\/([\d.]+)/i.exec(Ru),LJe=Nfe?parseFloat(Nfe.pop()):null,WEe=/iPod/i.test(Ru),kJe=(function(){var r=Ru.match(/OS (\d+)_/i);return r&&r[1]?r[1]:null})(),hb=/Android/i.test(Ru),m9=(function(){var r=Ru.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!r)return null;var e=r[1]&&parseFloat(r[1]),i=r[2]&&parseFloat(r[2]);return e&&i?parseFloat(r[1]+"."+r[2]):e||null})(),GEe=hb&&m9<5&&LJe<537,YEe=/Firefox/i.test(Ru),vj=/Edg/i.test(Ru),pb=!vj&&(/Chrome/i.test(Ru)||/CriOS/i.test(Ru)),$Ee=(function(){var r=Ru.match(/(Chrome|CriOS)\/(\d+)/);return r&&r[2]?parseFloat(r[2]):null})(),yj=(function(){var r=/MSIE\s(\d+)\.\d/.exec(Ru),e=r&&parseFloat(r[1]);return!e&&/Trident\/7.0/i.test(Ru)&&/rv:11.0/.test(Ru)&&(e=11),e})(),b9=/Safari/i.test(Ru)&&!pb&&!hb&&!vj,qEe=/Windows/i.test(Ru),cM=!!(GM()&&("ontouchstart"in bt||bt.navigator.maxTouchPoints||bt.DocumentTouch&&bt.document instanceof bt.DocumentTouch)),S9=/iPad/i.test(Ru)||b9&&cM&&!/iPhone/i.test(Ru),_9=/iPhone/i.test(Ru)&&!S9,Hd=_9||S9||WEe,rz=(b9||Hd)&&!pb,IJe=Object.freeze({__proto__:null,IS_IPOD:WEe,IOS_VERSION:kJe,IS_ANDROID:hb,ANDROID_VERSION:m9,IS_NATIVE_ANDROID:GEe,IS_FIREFOX:YEe,IS_EDGE:vj,IS_CHROME:pb,CHROME_VERSION:$Ee,IE_VERSION:yj,IS_SAFARI:b9,IS_WINDOWS:qEe,TOUCH_ENABLED:cM,IS_IPAD:S9,IS_IPHONE:_9,IS_IOS:Hd,IS_ANY_SAFARI:rz});function Ffe(r){return typeof r=="string"&&!!r.trim()}function XEe(r){if(r.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function NJe(r){return new RegExp("(^|\\s)"+r+"($|\\s)")}function GM(){return Vr===bt.document}function YM(r){return Q0(r)&&r.nodeType===1}function KEe(){try{return bt.parent!==bt.self}catch{return!0}}function ZEe(r){return function(e,i){if(!Ffe(e))return Vr[r](null);Ffe(i)&&(i=Vr.querySelector(i));var n=YM(i)?i:Vr;return n[r]&&n[r](e)}}function mo(r,e,i,n){r===void 0&&(r="div"),e===void 0&&(e={}),i===void 0&&(i={});var t=Vr.createElement(r);return Object.getOwnPropertyNames(e).forEach(function(o){var a=e[o];o.indexOf("aria-")!==-1||o==="role"||o==="type"?(Ln.warn(`Setting attributes in the second argument of createEl()
has been deprecated. Use the third argument instead.
`+("createEl(type, properties, attributes). Attempting to set "+o+" to "+a+".")),t.setAttribute(o,a)):o==="textContent"?sO(t,a):(t[o]!==a||o==="tabIndex")&&(t[o]=a)}),Object.getOwnPropertyNames(i).forEach(function(o){t.setAttribute(o,i[o])}),n&&C9(t,n),t}function sO(r,e){return typeof r.textContent>"u"?r.innerText=e:r.textContent=e,r}function u$(r,e){e.firstChild?e.insertBefore(r,e.firstChild):e.appendChild(r)}function v1(r,e){return XEe(e),r.classList?r.classList.contains(e):NJe(e).test(r.className)}function z0(r,e){return r.classList?r.classList.add(e):v1(r,e)||(r.className=(r.className+" "+e).trim()),r}function mj(r,e){return r?(r.classList?r.classList.remove(e):(XEe(e),r.className=r.className.split(/\s+/).filter(function(i){return i!==e}).join(" ")),r):(Ln.warn("removeClass was called with an element that doesn't exist"),null)}function JEe(r,e,i){var n=v1(r,e);if(typeof i=="function"&&(i=i(r,e)),typeof i!="boolean"&&(i=!n),i!==n)return i?z0(r,e):mj(r,e),r}function QEe(r,e){Object.getOwnPropertyNames(e).forEach(function(i){var n=e[i];n===null||typeof n>"u"||n===!1?r.removeAttribute(i):r.setAttribute(i,n===!0?"":n)})}function A0(r){var e={},i=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(r&&r.attributes&&r.attributes.length>0)for(var n=r.attributes,t=n.length-1;t>=0;t--){var o=n[t].name,a=n[t].value;(typeof r[o]=="boolean"||i.indexOf(","+o+",")!==-1)&&(a=a!==null),e[o]=a}return e}function eAe(r,e){return r.getAttribute(e)}function dM(r,e,i){r.setAttribute(e,i)}function iz(r,e){r.removeAttribute(e)}function tAe(){Vr.body.focus(),Vr.onselectstart=function(){return!1}}function rAe(){Vr.onselectstart=function(){return!0}}function fM(r){if(r&&r.getBoundingClientRect&&r.parentNode){var e=r.getBoundingClientRect(),i={};return["bottom","height","left","right","top","width"].forEach(function(n){e[n]!==void 0&&(i[n]=e[n])}),i.height||(i.height=parseFloat(yF(r,"height"))),i.width||(i.width=parseFloat(yF(r,"width"))),i}}function mF(r){if(!r||r&&!r.offsetParent)return{left:0,top:0,width:0,height:0};for(var e=r.offsetWidth,i=r.offsetHeight,n=0,t=0;r.offsetParent&&r!==Vr[C3.fullscreenElement];)n+=r.offsetLeft,t+=r.offsetTop,r=r.offsetParent;return{left:n,top:t,width:e,height:i}}function nz(r,e){var i={x:0,y:0};if(Hd)for(var n=r;n&&n.nodeName.toLowerCase()!=="html";){var t=yF(n,"transform");if(/^matrix/.test(t)){var o=t.slice(7,-1).split(/,\s/).map(Number);i.x+=o[4],i.y+=o[5]}else if(/^matrix3d/.test(t)){var a=t.slice(9,-1).split(/,\s/).map(Number);i.x+=a[12],i.y+=a[13]}n=n.parentNode}var s={},l=mF(e.target),u=mF(r),c=u.width,d=u.height,f=e.offsetY-(u.top-l.top),h=e.offsetX-(u.left-l.left);return e.changedTouches&&(h=e.changedTouches[0].pageX-u.left,f=e.changedTouches[0].pageY+u.top,Hd&&(h-=i.x,f-=i.y)),s.y=1-Math.max(0,Math.min(1,f/d)),s.x=Math.max(0,Math.min(1,h/c)),s}function iAe(r){return Q0(r)&&r.nodeType===3}function P9(r){for(;r.firstChild;)r.removeChild(r.firstChild);return r}function nAe(r){return typeof r=="function"&&(r=r()),(Array.isArray(r)?r:[r]).map(function(e){if(typeof e=="function"&&(e=e()),YM(e)||iAe(e))return e;if(typeof e=="string"&&/\S/.test(e))return Vr.createTextNode(e)}).filter(function(e){return e})}function C9(r,e){return nAe(e).forEach(function(i){return r.appendChild(i)}),r}function oAe(r,e){return C9(P9(r),e)}function bF(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?!0:!(r.button!==0||r.buttons!==1)}var zS=ZEe("querySelector"),aAe=ZEe("querySelectorAll"),sAe=Object.freeze({__proto__:null,isReal:GM,isEl:YM,isInFrame:KEe,createEl:mo,textContent:sO,prependTo:u$,hasClass:v1,addClass:z0,removeClass:mj,toggleClass:JEe,setAttributes:QEe,getAttributes:A0,getAttribute:eAe,setAttribute:dM,removeAttribute:iz,blockTextSelection:tAe,unblockTextSelection:rAe,getBoundingClientRect:fM,findPosition:mF,getPointerPosition:nz,isTextNode:iAe,emptyEl:P9,normalizeContent:nAe,appendContent:C9,insertContent:oAe,isSingleLeftClick:bF,$:zS,$$:aAe}),lAe=!1,c$,FJe=function(){if(c$.options.autoSetup!==!1){var e=Array.prototype.slice.call(Vr.getElementsByTagName("video")),i=Array.prototype.slice.call(Vr.getElementsByTagName("audio")),n=Array.prototype.slice.call(Vr.getElementsByTagName("video-js")),t=e.concat(i,n);if(t&&t.length>0)for(var o=0,a=t.length;o<a;o++){var s=t[o];if(s&&s.getAttribute){if(s.player===void 0){var l=s.getAttribute("data-setup");l!==null&&c$(s)}}else{d$(1);break}}else lAe||d$(1)}};function d$(r,e){GM()&&(e&&(c$=e),bt.setTimeout(FJe,r))}function f$(){lAe=!0,bt.removeEventListener("load",f$)}GM()&&(Vr.readyState==="complete"?f$():bt.addEventListener("load",f$));var uAe=function(e){var i=Vr.createElement("style");return i.className=e,i},cAe=function(e,i){e.styleSheet?e.styleSheet.cssText=i:e.textContent=i},jJe=3,BJe=jJe;function gb(){return BJe++}var dAe;bt.WeakMap||(dAe=(function(){function r(){this.vdata="vdata"+Math.floor(bt.performance&&bt.performance.now()||Date.now()),this.data={}}var e=r.prototype;return e.set=function(n,t){var o=n[this.vdata]||gb();return n[this.vdata]||(n[this.vdata]=o),this.data[o]=t,this},e.get=function(n){var t=n[this.vdata];if(t)return this.data[t];Ln("We have no data for this element",n)},e.has=function(n){var t=n[this.vdata];return t in this.data},e.delete=function(n){var t=n[this.vdata];t&&(delete this.data[t],delete n[this.vdata])},r})());var Fd=bt.WeakMap?new WeakMap:new dAe;function jfe(r,e){if(Fd.has(r)){var i=Fd.get(r);i.handlers[e].length===0&&(delete i.handlers[e],r.removeEventListener?r.removeEventListener(e,i.dispatcher,!1):r.detachEvent&&r.detachEvent("on"+e,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),Object.getOwnPropertyNames(i).length===0&&Fd.delete(r)}}function T9(r,e,i,n){i.forEach(function(t){r(e,t,n)})}function oz(r){if(r.fixed_)return r;function e(){return!0}function i(){return!1}if(!r||!r.isPropagationStopped||!r.isImmediatePropagationStopped){var n=r||bt.event;r={};for(var t in n)t!=="layerX"&&t!=="layerY"&&t!=="keyLocation"&&t!=="webkitMovementX"&&t!=="webkitMovementY"&&t!=="path"&&(t==="returnValue"&&n.preventDefault||(r[t]=n[t]));if(r.target||(r.target=r.srcElement||Vr),r.relatedTarget||(r.relatedTarget=r.fromElement===r.target?r.toElement:r.fromElement),r.preventDefault=function(){n.preventDefault&&n.preventDefault(),r.returnValue=!1,n.returnValue=!1,r.defaultPrevented=!0},r.defaultPrevented=!1,r.stopPropagation=function(){n.stopPropagation&&n.stopPropagation(),r.cancelBubble=!0,n.cancelBubble=!0,r.isPropagationStopped=e},r.isPropagationStopped=i,r.stopImmediatePropagation=function(){n.stopImmediatePropagation&&n.stopImmediatePropagation(),r.isImmediatePropagationStopped=e,r.stopPropagation()},r.isImmediatePropagationStopped=i,r.clientX!==null&&r.clientX!==void 0){var o=Vr.documentElement,a=Vr.body;r.pageX=r.clientX+(o&&o.scrollLeft||a&&a.scrollLeft||0)-(o&&o.clientLeft||a&&a.clientLeft||0),r.pageY=r.clientY+(o&&o.scrollTop||a&&a.scrollTop||0)-(o&&o.clientTop||a&&a.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}var iB,VJe=function(){if(typeof iB!="boolean"){iB=!1;try{var e=Object.defineProperty({},"passive",{get:function(){iB=!0}});bt.addEventListener("test",null,e),bt.removeEventListener("test",null,e)}catch{}}return iB},HJe=["touchstart","touchmove"];function Ah(r,e,i){if(Array.isArray(e))return T9(Ah,r,e,i);Fd.has(r)||Fd.set(r,{});var n=Fd.get(r);if(n.handlers||(n.handlers={}),n.handlers[e]||(n.handlers[e]=[]),i.guid||(i.guid=gb()),n.handlers[e].push(i),n.dispatcher||(n.disabled=!1,n.dispatcher=function(o,a){if(!n.disabled){o=oz(o);var s=n.handlers[o.type];if(s)for(var l=s.slice(0),u=0,c=l.length;u<c&&!o.isImmediatePropagationStopped();u++)try{l[u].call(r,o,a)}catch(d){Ln.error(d)}}}),n.handlers[e].length===1)if(r.addEventListener){var t=!1;VJe()&&HJe.indexOf(e)>-1&&(t={passive:!0}),r.addEventListener(e,n.dispatcher,t)}else r.attachEvent&&r.attachEvent("on"+e,n.dispatcher)}function Yc(r,e,i){if(Fd.has(r)){var n=Fd.get(r);if(n.handlers){if(Array.isArray(e))return T9(Yc,r,e,i);var t=function(u,c){n.handlers[c]=[],jfe(u,c)};if(e===void 0){for(var o in n.handlers)Object.prototype.hasOwnProperty.call(n.handlers||{},o)&&t(r,o);return}var a=n.handlers[e];if(a){if(!i){t(r,e);return}if(i.guid)for(var s=0;s<a.length;s++)a[s].guid===i.guid&&a.splice(s--,1);jfe(r,e)}}}}function $M(r,e,i){var n=Fd.has(r)?Fd.get(r):{},t=r.parentNode||r.ownerDocument;if(typeof e=="string"?e={type:e,target:r}:e.target||(e.target=r),e=oz(e),n.dispatcher&&n.dispatcher.call(r,e,i),t&&!e.isPropagationStopped()&&e.bubbles===!0)$M.call(null,t,e,i);else if(!t&&!e.defaultPrevented&&e.target&&e.target[e.type]){Fd.has(e.target)||Fd.set(e.target,{});var o=Fd.get(e.target);e.target[e.type]&&(o.disabled=!0,typeof e.target[e.type]=="function"&&e.target[e.type](),o.disabled=!1)}return!e.defaultPrevented}function az(r,e,i){if(Array.isArray(e))return T9(az,r,e,i);var n=function t(){Yc(r,e,t),i.apply(this,arguments)};n.guid=i.guid=i.guid||gb(),Ah(r,e,n)}function fAe(r,e,i){var n=function t(){Yc(r,e,t),i.apply(this,arguments)};n.guid=i.guid=i.guid||gb(),Ah(r,e,n)}var UJe=Object.freeze({__proto__:null,fixEvent:oz,on:Ah,off:Yc,trigger:$M,one:az,any:fAe}),Ag=30,es=function(e,i,n){i.guid||(i.guid=gb());var t=i.bind(e);return t.guid=n?n+"_"+i.guid:i.guid,t},eb=function(e,i){var n=bt.performance.now(),t=function(){var a=bt.performance.now();a-n>=i&&(e.apply(void 0,arguments),n=a)};return t},zJe=function(e,i,n,t){t===void 0&&(t=bt);var o,a=function(){t.clearTimeout(o),o=null},s=function(){var u=this,c=arguments,d=function(){o=null,d=null,e.apply(u,c)};t.clearTimeout(o),o=t.setTimeout(d,i)};return s.cancel=a,s},Mu=function(){};Mu.prototype.allowedEvents_={};Mu.prototype.on=function(r,e){var i=this.addEventListener;this.addEventListener=function(){},Ah(this,r,e),this.addEventListener=i};Mu.prototype.addEventListener=Mu.prototype.on;Mu.prototype.off=function(r,e){Yc(this,r,e)};Mu.prototype.removeEventListener=Mu.prototype.off;Mu.prototype.one=function(r,e){var i=this.addEventListener;this.addEventListener=function(){},az(this,r,e),this.addEventListener=i};Mu.prototype.any=function(r,e){var i=this.addEventListener;this.addEventListener=function(){},fAe(this,r,e),this.addEventListener=i};Mu.prototype.trigger=function(r){var e=r.type||r;typeof r=="string"&&(r={type:e}),r=oz(r),this.allowedEvents_[e]&&this["on"+e]&&this["on"+e](r),$M(this,r)};Mu.prototype.dispatchEvent=Mu.prototype.trigger;var z2;Mu.prototype.queueTrigger=function(r){var e=this;z2||(z2=new Map);var i=r.type||r,n=z2.get(this);n||(n=new Map,z2.set(this,n));var t=n.get(i);n.delete(i),bt.clearTimeout(t);var o=bt.setTimeout(function(){n.delete(i),n.size===0&&(n=null,z2.delete(e)),e.trigger(r)},0);n.set(i,o)};var sz=function(e){return typeof e.name=="function"?e.name():typeof e.name=="string"?e.name:e.name_?e.name_:e.constructor&&e.constructor.name?e.constructor.name:typeof e},W0=function(e){return e instanceof Mu||!!e.eventBusEl_&&["on","one","off","trigger"].every(function(i){return typeof e[i]=="function"})},WJe=function(e,i){W0(e)?i():(e.eventedCallbacks||(e.eventedCallbacks=[]),e.eventedCallbacks.push(i))},h$=function(e){return typeof e=="string"&&/\S/.test(e)||Array.isArray(e)&&!!e.length},T3=function(e,i,n){if(!e||!e.nodeName&&!W0(e))throw new Error("Invalid target for "+sz(i)+"#"+n+"; must be a DOM node or evented object.")},hAe=function(e,i,n){if(!h$(e))throw new Error("Invalid event type for "+sz(i)+"#"+n+"; must be a non-empty string or array.")},pAe=function(e,i,n){if(typeof e!="function")throw new Error("Invalid listener for "+sz(i)+"#"+n+"; must be a function.")},FG=function(e,i,n){var t=i.length<3||i[0]===e||i[0]===e.eventBusEl_,o,a,s;return t?(o=e.eventBusEl_,i.length>=3&&i.shift(),a=i[0],s=i[1]):(o=i[0],a=i[1],s=i[2]),T3(o,e,n),hAe(a,e,n),pAe(s,e,n),s=es(e,s),{isTargetingSelf:t,target:o,type:a,listener:s}},Aw=function(e,i,n,t){T3(e,e,i),e.nodeName?UJe[i](e,n,t):e[i](n,t)},GJe={on:function(){for(var e=this,i=arguments.length,n=new Array(i),t=0;t<i;t++)n[t]=arguments[t];var o=FG(this,n,"on"),a=o.isTargetingSelf,s=o.target,l=o.type,u=o.listener;if(Aw(s,"on",l,u),!a){var c=function(){return e.off(s,l,u)};c.guid=u.guid;var d=function(){return e.off("dispose",c)};d.guid=u.guid,Aw(this,"on","dispose",c),Aw(s,"on","dispose",d)}},one:function(){for(var e=this,i=arguments.length,n=new Array(i),t=0;t<i;t++)n[t]=arguments[t];var o=FG(this,n,"one"),a=o.isTargetingSelf,s=o.target,l=o.type,u=o.listener;if(a)Aw(s,"one",l,u);else{var c=function d(){e.off(s,l,d);for(var f=arguments.length,h=new Array(f),p=0;p<f;p++)h[p]=arguments[p];u.apply(null,h)};c.guid=u.guid,Aw(s,"one",l,c)}},any:function(){for(var e=this,i=arguments.length,n=new Array(i),t=0;t<i;t++)n[t]=arguments[t];var o=FG(this,n,"any"),a=o.isTargetingSelf,s=o.target,l=o.type,u=o.listener;if(a)Aw(s,"any",l,u);else{var c=function d(){e.off(s,l,d);for(var f=arguments.length,h=new Array(f),p=0;p<f;p++)h[p]=arguments[p];u.apply(null,h)};c.guid=u.guid,Aw(s,"any",l,c)}},off:function(e,i,n){if(!e||h$(e))Yc(this.eventBusEl_,e,i);else{var t=e,o=i;T3(t,this,"off"),hAe(o,this,"off"),pAe(n,this,"off"),n=es(this,n),this.off("dispose",n),t.nodeName?(Yc(t,o,n),Yc(t,"dispose",n)):W0(t)&&(t.off(o,n),t.off("dispose",n))}},trigger:function(e,i){T3(this.eventBusEl_,this,"trigger");var n=e&&typeof e!="string"?e.type:e;if(!h$(n)){var t="Invalid event type for "+sz(this)+"#trigger; must be a non-empty string or object with a type key that has a non-empty value.";if(e)(this.log||Ln).error(t);else throw new Error(t)}return $M(this.eventBusEl_,e,i)}};function x9(r,e){e===void 0&&(e={});var i=e,n=i.eventBusKey;if(n){if(!r[n].nodeName)throw new Error('The eventBusKey "'+n+'" does not refer to an element.');r.eventBusEl_=r[n]}else r.eventBusEl_=mo("span",{className:"vjs-event-bus"});return Ks(r,GJe),r.eventedCallbacks&&r.eventedCallbacks.forEach(function(t){t()}),r.on("dispose",function(){r.off(),[r,r.el_,r.eventBusEl_].forEach(function(t){t&&Fd.has(t)&&Fd.delete(t)}),bt.setTimeout(function(){r.eventBusEl_=null},0)}),r}var YJe={state:{},setState:function(e){var i=this;typeof e=="function"&&(e=e());var n;return xR(e,function(t,o){i.state[o]!==t&&(n=n||{},n[o]={from:i.state[o],to:t}),i.state[o]=t}),n&&W0(this)&&this.trigger({changes:n,type:"statechanged"}),n}};function gAe(r,e){return Ks(r,YJe),r.state=Ks({},r.state,e),typeof r.handleStateChanged=="function"&&W0(r)&&r.on("statechanged",r.handleStateChanged),r}var PV=function(e){return typeof e!="string"?e:e.replace(/./,function(i){return i.toLowerCase()})},dl=function(e){return typeof e!="string"?e:e.replace(/./,function(i){return i.toUpperCase()})},$Je=function(e,i){return dl(e)===dl(i)};function Qa(){for(var r={},e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return i.forEach(function(t){t&&xR(t,function(o,a){if(!vF(o)){r[a]=o;return}vF(r[a])||(r[a]={}),r[a]=Qa(r[a],o)})}),r}var qJe=(function(){function r(){this.map_={}}var e=r.prototype;return e.has=function(n){return n in this.map_},e.delete=function(n){var t=this.has(n);return delete this.map_[n],t},e.set=function(n,t){return this.map_[n]=t,this},e.forEach=function(n,t){for(var o in this.map_)n.call(t,this.map_[o],o,this)},r})(),XJe=bt.Map?bt.Map:qJe,KJe=(function(){function r(){this.set_={}}var e=r.prototype;return e.has=function(n){return n in this.set_},e.delete=function(n){var t=this.has(n);return delete this.set_[n],t},e.add=function(n){return this.set_[n]=1,this},e.forEach=function(n,t){for(var o in this.set_)n.call(t,o,o,this)},r})(),jG=bt.Set?bt.Set:KJe,Rr=(function(){function r(i,n,t){var o=this;if(!i&&this.play?this.player_=i=this:this.player_=i,this.isDisposed_=!1,this.parentComponent_=null,this.options_=Qa({},this.options_),n=this.options_=Qa(this.options_,n),this.id_=n.id||n.el&&n.el.id,!this.id_){var a=i&&i.id&&i.id()||"no_player";this.id_=a+"_component_"+gb()}this.name_=n.name||null,n.el?this.el_=n.el:n.createEl!==!1&&(this.el_=this.createEl()),n.className&&this.el_&&n.className.split(" ").forEach(function(s){return o.addClass(s)}),n.evented!==!1&&(x9(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),gAe(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new jG,this.setIntervalIds_=new jG,this.rafIds_=new jG,this.namedRafs_=new XJe,this.clearingTimersOnDispose_=!1,n.initChildren!==!1&&this.initChildren(),this.ready(t),n.reportTouchActivity!==!1&&this.enableTouchActivity()}var e=r.prototype;return e.dispose=function(n){if(n===void 0&&(n={}),!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(var 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&&(n.restoreEl?this.el_.parentNode.replaceChild(n.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}},e.isDisposed=function(){return!!this.isDisposed_},e.player=function(){return this.player_},e.options=function(n){return n?(this.options_=Qa(this.options_,n),this.options_):this.options_},e.el=function(){return this.el_},e.createEl=function(n,t,o){return mo(n,t,o)},e.localize=function(n,t,o){o===void 0&&(o=n);var a=this.player_.language&&this.player_.language(),s=this.player_.languages&&this.player_.languages(),l=s&&s[a],u=a&&a.split("-")[0],c=s&&s[u],d=o;return l&&l[n]?d=l[n]:c&&c[n]&&(d=c[n]),t&&(d=d.replace(/\{(\d+)\}/g,function(f,h){var p=t[h-1],g=p;return typeof p>"u"&&(g=f),g})),d},e.handleLanguagechange=function(){},e.contentEl=function(){return this.contentEl_||this.el_},e.id=function(){return this.id_},e.name=function(){return this.name_},e.children=function(){return this.children_},e.getChildById=function(n){return this.childIndex_[n]},e.getChild=function(n){if(n)return this.childNameIndex_[n]},e.getDescendant=function(){for(var n=arguments.length,t=new Array(n),o=0;o<n;o++)t[o]=arguments[o];t=t.reduce(function(l,u){return l.concat(u)},[]);for(var a=this,s=0;s<t.length;s++)if(a=a.getChild(t[s]),!a||!a.getChild)return;return a},e.addChild=function(n,t,o){t===void 0&&(t={}),o===void 0&&(o=this.children_.length);var a,s;if(typeof n=="string"){s=dl(n);var l=t.componentClass||s;t.name=s;var u=r.getComponent(l);if(!u)throw new Error("Component "+l+" does not exist");if(typeof u!="function")return null;a=new u(this.player_||this,t)}else a=n;if(a.parentComponent_&&a.parentComponent_.removeChild(a),this.children_.splice(o,0,a),a.parentComponent_=this,typeof a.id=="function"&&(this.childIndex_[a.id()]=a),s=s||a.name&&dl(a.name()),s&&(this.childNameIndex_[s]=a,this.childNameIndex_[PV(s)]=a),typeof a.el=="function"&&a.el()){var c=null;this.children_[o+1]&&(this.children_[o+1].el_?c=this.children_[o+1].el_:YM(this.children_[o+1])&&(c=this.children_[o+1])),this.contentEl().insertBefore(a.el(),c)}return a},e.removeChild=function(n){if(typeof n=="string"&&(n=this.getChild(n)),!(!n||!this.children_)){for(var t=!1,o=this.children_.length-1;o>=0;o--)if(this.children_[o]===n){t=!0,this.children_.splice(o,1);break}if(t){n.parentComponent_=null,this.childIndex_[n.id()]=null,this.childNameIndex_[dl(n.name())]=null,this.childNameIndex_[PV(n.name())]=null;var a=n.el();a&&a.parentNode===this.contentEl()&&this.contentEl().removeChild(n.el())}}},e.initChildren=function(){var n=this,t=this.options_.children;if(t){var o=this.options_,a=function(c){var d=c.name,f=c.opts;if(o[d]!==void 0&&(f=o[d]),f!==!1){f===!0&&(f={}),f.playerOptions=n.options_.playerOptions;var h=n.addChild(d,f);h&&(n[d]=h)}},s,l=r.getComponent("Tech");Array.isArray(t)?s=t:s=Object.keys(t),s.concat(Object.keys(this.options_).filter(function(u){return!s.some(function(c){return typeof c=="string"?u===c:u===c.name})})).map(function(u){var c,d;return typeof u=="string"?(c=u,d=t[c]||n.options_[c]||{}):(c=u.name,d=u),{name:c,opts:d}}).filter(function(u){var c=r.getComponent(u.opts.componentClass||dl(u.name));return c&&!l.isTech(c)}).forEach(a)}},e.buildCSSClass=function(){return""},e.ready=function(n,t){if(t===void 0&&(t=!1),!!n){if(!this.isReady_){this.readyQueue_=this.readyQueue_||[],this.readyQueue_.push(n);return}t?n.call(this):this.setTimeout(n,1)}},e.triggerReady=function(){this.isReady_=!0,this.setTimeout(function(){var n=this.readyQueue_;this.readyQueue_=[],n&&n.length>0&&n.forEach(function(t){t.call(this)},this),this.trigger("ready")},1)},e.$=function(n,t){return zS(n,t||this.contentEl())},e.$$=function(n,t){return aAe(n,t||this.contentEl())},e.hasClass=function(n){return v1(this.el_,n)},e.addClass=function(n){z0(this.el_,n)},e.removeClass=function(n){mj(this.el_,n)},e.toggleClass=function(n,t){JEe(this.el_,n,t)},e.show=function(){this.removeClass("vjs-hidden")},e.hide=function(){this.addClass("vjs-hidden")},e.lockShowing=function(){this.addClass("vjs-lock-showing")},e.unlockShowing=function(){this.removeClass("vjs-lock-showing")},e.getAttribute=function(n){return eAe(this.el_,n)},e.setAttribute=function(n,t){dM(this.el_,n,t)},e.removeAttribute=function(n){iz(this.el_,n)},e.width=function(n,t){return this.dimension("width",n,t)},e.height=function(n,t){return this.dimension("height",n,t)},e.dimensions=function(n,t){this.width(n,!0),this.height(t)},e.dimension=function(n,t,o){if(t!==void 0){(t===null||t!==t)&&(t=0),(""+t).indexOf("%")!==-1||(""+t).indexOf("px")!==-1?this.el_.style[n]=t:t==="auto"?this.el_.style[n]="":this.el_.style[n]=t+"px",o||this.trigger("componentresize");return}if(!this.el_)return 0;var a=this.el_.style[n],s=a.indexOf("px");return parseInt(s!==-1?a.slice(0,s):this.el_["offset"+dl(n)],10)},e.currentDimension=function(n){var t=0;if(n!=="width"&&n!=="height")throw new Error("currentDimension only accepts width or height value");if(t=yF(this.el_,n),t=parseFloat(t),t===0||isNaN(t)){var o="offset"+dl(n);t=this.el_[o]}return t},e.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},e.currentWidth=function(){return this.currentDimension("width")},e.currentHeight=function(){return this.currentDimension("height")},e.focus=function(){this.el_.focus()},e.blur=function(){this.el_.blur()},e.handleKeyDown=function(n){this.player_&&(gn.isEventKey(n,"Tab")||n.stopPropagation(),this.player_.handleKeyDown(n))},e.handleKeyPress=function(n){this.handleKeyDown(n)},e.emitTapEvents=function(){var n=0,t=null,o=10,a=200,s;this.on("touchstart",function(u){u.touches.length===1&&(t={pageX:u.touches[0].pageX,pageY:u.touches[0].pageY},n=bt.performance.now(),s=!0)}),this.on("touchmove",function(u){if(u.touches.length>1)s=!1;else if(t){var c=u.touches[0].pageX-t.pageX,d=u.touches[0].pageY-t.pageY,f=Math.sqrt(c*c+d*d);f>o&&(s=!1)}});var l=function(){s=!1};this.on("touchleave",l),this.on("touchcancel",l),this.on("touchend",function(u){if(t=null,s===!0){var c=bt.performance.now()-n;c<a&&(u.preventDefault(),this.trigger("tap"))}})},e.enableTouchActivity=function(){if(!(!this.player()||!this.player().reportUserActivity)){var n=es(this.player(),this.player().reportUserActivity),t;this.on("touchstart",function(){n(),this.clearInterval(t),t=this.setInterval(n,250)});var o=function(s){n(),this.clearInterval(t)};this.on("touchmove",n),this.on("touchend",o),this.on("touchcancel",o)}},e.setTimeout=function(n,t){var o=this,a;return n=es(this,n),this.clearTimersOnDispose_(),a=bt.setTimeout(function(){o.setTimeoutIds_.has(a)&&o.setTimeoutIds_.delete(a),n()},t),this.setTimeoutIds_.add(a),a},e.clearTimeout=function(n){return this.setTimeoutIds_.has(n)&&(this.setTimeoutIds_.delete(n),bt.clearTimeout(n)),n},e.setInterval=function(n,t){n=es(this,n),this.clearTimersOnDispose_();var o=bt.setInterval(n,t);return this.setIntervalIds_.add(o),o},e.clearInterval=function(n){return this.setIntervalIds_.has(n)&&(this.setIntervalIds_.delete(n),bt.clearInterval(n)),n},e.requestAnimationFrame=function(n){var t=this;if(!this.supportsRaf_)return this.setTimeout(n,1e3/60);this.clearTimersOnDispose_();var o;return n=es(this,n),o=bt.requestAnimationFrame(function(){t.rafIds_.has(o)&&t.rafIds_.delete(o),n()}),this.rafIds_.add(o),o},e.requestNamedAnimationFrame=function(n,t){var o=this;if(!this.namedRafs_.has(n)){this.clearTimersOnDispose_(),t=es(this,t);var a=this.requestAnimationFrame(function(){t(),o.namedRafs_.has(n)&&o.namedRafs_.delete(n)});return this.namedRafs_.set(n,a),n}},e.cancelNamedAnimationFrame=function(n){this.namedRafs_.has(n)&&(this.cancelAnimationFrame(this.namedRafs_.get(n)),this.namedRafs_.delete(n))},e.cancelAnimationFrame=function(n){return this.supportsRaf_?(this.rafIds_.has(n)&&(this.rafIds_.delete(n),bt.cancelAnimationFrame(n)),n):this.clearTimeout(n)},e.clearTimersOnDispose_=function(){var n=this;this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",function(){[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach(function(t){var o=t[0],a=t[1];n[o].forEach(function(s,l){return n[a](l)})}),n.clearingTimersOnDispose_=!1}))},r.registerComponent=function(n,t){if(typeof n!="string"||!n)throw new Error('Illegal component name, "'+n+'"; must be a non-empty string.');var o=r.getComponent("Tech"),a=o&&o.isTech(t),s=r===t||r.prototype.isPrototypeOf(t.prototype);if(a||!s){var l;throw a?l="techs must be registered using Tech.registerTech()":l="must be a Component subclass",new Error('Illegal component, "'+n+'"; '+l+".")}n=dl(n),r.components_||(r.components_={});var u=r.getComponent("Player");if(n==="Player"&&u&&u.players){var c=u.players,d=Object.keys(c);if(c&&d.length>0&&d.map(function(f){return c[f]}).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return r.components_[n]=t,r.components_[PV(n)]=t,t},r.getComponent=function(n){if(!(!n||!r.components_))return r.components_[n]},r})();Rr.prototype.supportsRaf_=typeof bt.requestAnimationFrame=="function"&&typeof bt.cancelAnimationFrame=="function";Rr.registerComponent("Component",Rr);function ZJe(r,e,i){if(typeof e!="number"||e<0||e>i)throw new Error("Failed to execute '"+r+"' on 'TimeRanges': The index provided ("+e+") is non-numeric or out of bounds (0-"+i+").")}function Bfe(r,e,i,n){return ZJe(r,n,i.length-1),i[n][e]}function BG(r){var e;return r===void 0||r.length===0?e={length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:e={length:r.length,start:Bfe.bind(null,"start",0,r),end:Bfe.bind(null,"end",1,r)},bt.Symbol&&bt.Symbol.iterator&&(e[bt.Symbol.iterator]=function(){return(r||[]).values()}),e}function y1(r,e){return Array.isArray(r)?BG(r):r===void 0||e===void 0?BG():BG([[r,e]])}function vAe(r,e){var i=0,n,t;if(!e)return 0;(!r||!r.length)&&(r=y1(0,0));for(var o=0;o<r.length;o++)n=r.start(o),t=r.end(o),t>e&&(t=e),i+=t-n;return i/e}function jd(r){if(r instanceof jd)return r;typeof r=="number"?this.code=r:typeof r=="string"?this.message=r:Q0(r)&&(typeof r.code=="number"&&(this.code=r.code),Ks(this,r)),this.message||(this.message=jd.defaultMessages[this.code]||"")}jd.prototype.code=0;jd.prototype.message="";jd.prototype.status=null;jd.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"];jd.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."};for(var $D=0;$D<jd.errorTypes.length;$D++)jd[jd.errorTypes[$D]]=$D,jd.prototype[jd.errorTypes[$D]]=$D;function AN(r){return r!=null&&typeof r.then=="function"}function kv(r){AN(r)&&r.then(null,function(e){})}var p$=function(e){var i=["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce(function(n,t,o){return e[t]&&(n[t]=e[t]),n},{cues:e.cues&&Array.prototype.map.call(e.cues,function(n){return{startTime:n.startTime,endTime:n.endTime,text:n.text,id:n.id}})});return i},JJe=function(e){var i=e.$$("track"),n=Array.prototype.map.call(i,function(o){return o.track}),t=Array.prototype.map.call(i,function(o){var a=p$(o.track);return o.src&&(a.src=o.src),a});return t.concat(Array.prototype.filter.call(e.textTracks(),function(o){return n.indexOf(o)===-1}).map(p$))},QJe=function(e,i){return e.forEach(function(n){var t=i.addRemoteTextTrack(n).track;!n.src&&n.cues&&n.cues.forEach(function(o){return t.addCue(o)})}),i.textTracks()},Vfe={textTracksToJson:JJe,jsonToTextTracks:QJe,trackToJson_:p$},VG="vjs-modal-dialog",qM=(function(r){zr(e,r);function e(n,t){var o;return o=r.call(this,n,t)||this,o.handleKeyDown_=function(a){return o.handleKeyDown(a)},o.close_=function(a){return o.close(a)},o.opened_=o.hasBeenOpened_=o.hasBeenFilled_=!1,o.closeable(!o.options_.uncloseable),o.content(o.options_.content),o.contentEl_=mo("div",{className:VG+"-content"},{role:"document"}),o.descEl_=mo("p",{className:VG+"-description vjs-control-text",id:o.el().getAttribute("aria-describedby")}),sO(o.descEl_,o.description()),o.el_.appendChild(o.descEl_),o.el_.appendChild(o.contentEl_),o}var i=e.prototype;return i.createEl=function(){return r.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},i.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,r.prototype.dispose.call(this)},i.buildCSSClass=function(){return VG+" vjs-hidden "+r.prototype.buildCSSClass.call(this)},i.label=function(){return this.localize(this.options_.label||"Modal Window")},i.description=function(){var t=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(t+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),t},i.open=function(){if(!this.opened_){var t=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!t.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&t.pause(),this.on("keydown",this.handleKeyDown_),this.hadControls_=t.controls(),t.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},i.opened=function(t){return typeof t=="boolean"&&this[t?"open":"close"](),this.opened_},i.close=function(){if(this.opened_){var t=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&t.play(),this.off("keydown",this.handleKeyDown_),this.hadControls_&&t.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},i.closeable=function(t){if(typeof t=="boolean"){var o=this.closeable_=!!t,a=this.getChild("closeButton");if(o&&!a){var s=this.contentEl_;this.contentEl_=this.el_,a=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=s,this.on(a,"close",this.close_)}!o&&a&&(this.off(a,"close",this.close_),this.removeChild(a),a.dispose())}return this.closeable_},i.fill=function(){this.fillWith(this.content())},i.fillWith=function(t){var o=this.contentEl(),a=o.parentNode,s=o.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,a.removeChild(o),this.empty(),oAe(o,t),this.trigger("modalfill"),s?a.insertBefore(o,s):a.appendChild(o);var l=this.getChild("closeButton");l&&a.appendChild(l.el_)},i.empty=function(){this.trigger("beforemodalempty"),P9(this.contentEl()),this.trigger("modalempty")},i.content=function(t){return typeof t<"u"&&(this.content_=t),this.content_},i.conditionalFocus_=function(){var t=Vr.activeElement,o=this.player_.el_;this.previouslyActiveEl_=null,(o.contains(t)||o===t)&&(this.previouslyActiveEl_=t,this.focus())},i.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)},i.handleKeyDown=function(t){if(t.stopPropagation(),gn.isEventKey(t,"Escape")&&this.closeable()){t.preventDefault(),this.close();return}if(gn.isEventKey(t,"Tab")){for(var o=this.focusableEls_(),a=this.el_.querySelector(":focus"),s,l=0;l<o.length;l++)if(a===o[l]){s=l;break}Vr.activeElement===this.el_&&(s=0),t.shiftKey&&s===0?(o[o.length-1].focus(),t.preventDefault()):!t.shiftKey&&s===o.length-1&&(o[0].focus(),t.preventDefault())}},i.focusableEls_=function(){var t=this.el_.querySelectorAll("*");return Array.prototype.filter.call(t,function(o){return(o instanceof bt.HTMLAnchorElement||o instanceof bt.HTMLAreaElement)&&o.hasAttribute("href")||(o instanceof bt.HTMLInputElement||o instanceof bt.HTMLSelectElement||o instanceof bt.HTMLTextAreaElement||o instanceof bt.HTMLButtonElement)&&!o.hasAttribute("disabled")||o instanceof bt.HTMLIFrameElement||o instanceof bt.HTMLObjectElement||o instanceof bt.HTMLEmbedElement||o.hasAttribute("tabindex")&&o.getAttribute("tabindex")!==-1||o.hasAttribute("contenteditable")})},e})(Rr);qM.prototype.options_={pauseOnOpen:!0,temporary:!0};Rr.registerComponent("ModalDialog",qM);var hM=(function(r){zr(e,r);function e(n){var t;n===void 0&&(n=[]),t=r.call(this)||this,t.tracks_=[],Object.defineProperty(sn(t),"length",{get:function(){return this.tracks_.length}});for(var o=0;o<n.length;o++)t.addTrack(n[o]);return t}var i=e.prototype;return i.addTrack=function(t){var o=this,a=this.tracks_.length;""+a in this||Object.defineProperty(this,a,{get:function(){return this.tracks_[a]}}),this.tracks_.indexOf(t)===-1&&(this.tracks_.push(t),this.trigger({track:t,type:"addtrack",target:this})),t.labelchange_=function(){o.trigger({track:t,type:"labelchange",target:o})},W0(t)&&t.addEventListener("labelchange",t.labelchange_)},i.removeTrack=function(t){for(var o,a=0,s=this.length;a<s;a++)if(this[a]===t){o=this[a],o.off&&o.off(),this.tracks_.splice(a,1);break}o&&this.trigger({track:o,type:"removetrack",target:this})},i.getTrackById=function(t){for(var o=null,a=0,s=this.length;a<s;a++){var l=this[a];if(l.id===t){o=l;break}}return o},e})(Mu);hM.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"};for(var eQe in hM.prototype.allowedEvents_)hM.prototype["on"+eQe]=null;var HG=function(e,i){for(var n=0;n<e.length;n++)!Object.keys(e[n]).length||i.id===e[n].id||(e[n].enabled=!1)},tQe=(function(r){zr(e,r);function e(n){var t;n===void 0&&(n=[]);for(var o=n.length-1;o>=0;o--)if(n[o].enabled){HG(n,n[o]);break}return t=r.call(this,n)||this,t.changing_=!1,t}var i=e.prototype;return i.addTrack=function(t){var o=this;t.enabled&&HG(this,t),r.prototype.addTrack.call(this,t),t.addEventListener&&(t.enabledChange_=function(){o.changing_||(o.changing_=!0,HG(o,t),o.changing_=!1,o.trigger("change"))},t.addEventListener("enabledchange",t.enabledChange_))},i.removeTrack=function(t){r.prototype.removeTrack.call(this,t),t.removeEventListener&&t.enabledChange_&&(t.removeEventListener("enabledchange",t.enabledChange_),t.enabledChange_=null)},e})(hM),UG=function(e,i){for(var n=0;n<e.length;n++)!Object.keys(e[n]).length||i.id===e[n].id||(e[n].selected=!1)},rQe=(function(r){zr(e,r);function e(n){var t;n===void 0&&(n=[]);for(var o=n.length-1;o>=0;o--)if(n[o].selected){UG(n,n[o]);break}return t=r.call(this,n)||this,t.changing_=!1,Object.defineProperty(sn(t),"selectedIndex",{get:function(){for(var s=0;s<this.length;s++)if(this[s].selected)return s;return-1},set:function(){}}),t}var i=e.prototype;return i.addTrack=function(t){var o=this;t.selected&&UG(this,t),r.prototype.addTrack.call(this,t),t.addEventListener&&(t.selectedChange_=function(){o.changing_||(o.changing_=!0,UG(o,t),o.changing_=!1,o.trigger("change"))},t.addEventListener("selectedchange",t.selectedChange_))},i.removeTrack=function(t){r.prototype.removeTrack.call(this,t),t.removeEventListener&&t.selectedChange_&&(t.removeEventListener("selectedchange",t.selectedChange_),t.selectedChange_=null)},e})(hM),yAe=(function(r){zr(e,r);function e(){return r.apply(this,arguments)||this}var i=e.prototype;return i.addTrack=function(t){var o=this;r.prototype.addTrack.call(this,t),this.queueChange_||(this.queueChange_=function(){return o.queueTrigger("change")}),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=function(){return o.trigger("selectedlanguagechange")}),t.addEventListener("modechange",this.queueChange_);var a=["metadata","chapters"];a.indexOf(t.kind)===-1&&t.addEventListener("modechange",this.triggerSelectedlanguagechange_)},i.removeTrack=function(t){r.prototype.removeTrack.call(this,t),t.removeEventListener&&(this.queueChange_&&t.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&t.removeEventListener("modechange",this.triggerSelectedlanguagechange_))},e})(hM),iQe=(function(){function r(i){i===void 0&&(i=[]),this.trackElements_=[],Object.defineProperty(this,"length",{get:function(){return this.trackElements_.length}});for(var n=0,t=i.length;n<t;n++)this.addTrackElement_(i[n])}var e=r.prototype;return e.addTrackElement_=function(n){var t=this.trackElements_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.trackElements_[t]}}),this.trackElements_.indexOf(n)===-1&&this.trackElements_.push(n)},e.getTrackElementByTrack_=function(n){for(var t,o=0,a=this.trackElements_.length;o<a;o++)if(n===this.trackElements_[o].track){t=this.trackElements_[o];break}return t},e.removeTrackElement_=function(n){for(var t=0,o=this.trackElements_.length;t<o;t++)if(n===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}},r})(),Hfe=(function(){function r(i){r.prototype.setCues_.call(this,i),Object.defineProperty(this,"length",{get:function(){return this.length_}})}var e=r.prototype;return e.setCues_=function(n){var t=this.length||0,o=0,a=n.length;this.cues_=n,this.length_=n.length;var s=function(u){""+u in this||Object.defineProperty(this,""+u,{get:function(){return this.cues_[u]}})};if(t<a)for(o=t;o<a;o++)s.call(this,o)},e.getCueById=function(n){for(var t=null,o=0,a=this.length;o<a;o++){var s=this[o];if(s.id===n){t=s;break}}return t},r})(),nQe={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},oQe={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},aQe={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},Ufe={disabled:"disabled",hidden:"hidden",showing:"showing"},E9=(function(r){zr(e,r);function e(i){var n;i===void 0&&(i={}),n=r.call(this)||this;var t={id:i.id||"vjs_track_"+gb(),kind:i.kind||"",language:i.language||""},o=i.label||"",a=function(u){Object.defineProperty(sn(n),u,{get:function(){return t[u]},set:function(){}})};for(var s in t)a(s);return Object.defineProperty(sn(n),"label",{get:function(){return o},set:function(u){u!==o&&(o=u,this.trigger("labelchange"))}}),n}return e})(Mu),A9=function(e){var i=["protocol","hostname","port","pathname","search","hash","host"],n=Vr.createElement("a");n.href=e;for(var t={},o=0;o<i.length;o++)t[i[o]]=n[i[o]];return t.protocol==="http:"&&(t.host=t.host.replace(/:80$/,"")),t.protocol==="https:"&&(t.host=t.host.replace(/:443$/,"")),t.protocol||(t.protocol=bt.location.protocol),t.host||(t.host=bt.location.host),t},mAe=function(e){if(!e.match(/^https?:\/\//)){var i=Vr.createElement("a");i.href=e,e=i.href}return e},w9=function(e){if(typeof e=="string"){var i=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/,n=i.exec(e);if(n)return n.pop().toLowerCase()}return""},lz=function(e,i){i===void 0&&(i=bt.location);var n=A9(e),t=n.protocol===":"?i.protocol:n.protocol,o=t+n.host!==i.protocol+i.host;return o},sQe=Object.freeze({__proto__:null,parseUrl:A9,getAbsoluteURL:mAe,getFileExtension:w9,isCrossOrigin:lz}),zfe=function(e,i){var n=new bt.WebVTT.Parser(bt,bt.vttjs,bt.WebVTT.StringDecoder()),t=[];n.oncue=function(o){i.addCue(o)},n.onparsingerror=function(o){t.push(o)},n.onflush=function(){i.trigger({type:"loadeddata",target:i})},n.parse(e),t.length>0&&(bt.console&&bt.console.groupCollapsed&&bt.console.groupCollapsed("Text Track parsing errors for "+i.src),t.forEach(function(o){return Ln.error(o)}),bt.console&&bt.console.groupEnd&&bt.console.groupEnd()),n.flush()},Wfe=function(e,i){var n={uri:e},t=lz(e);t&&(n.cors=t);var o=i.tech_.crossOrigin()==="use-credentials";o&&(n.withCredentials=o),PEe(n,es(this,function(a,s,l){if(a)return Ln.error(a,s);i.loaded_=!0,typeof bt.WebVTT!="function"?i.tech_&&i.tech_.any(["vttjsloaded","vttjserror"],function(u){if(u.type==="vttjserror"){Ln.error("vttjs failed to load, stopping trying to process "+i.src);return}return zfe(l,i)}):zfe(l,i)}))},bj=(function(r){zr(e,r);function e(n){var t;if(n===void 0&&(n={}),!n.tech)throw new Error("A tech was not provided.");var o=Qa(n,{kind:aQe[n.kind]||"subtitles",language:n.language||n.srclang||""}),a=Ufe[o.mode]||"disabled",s=o.default;(o.kind==="metadata"||o.kind==="chapters")&&(a="hidden"),t=r.call(this,o)||this,t.tech_=o.tech,t.cues_=[],t.activeCues_=[],t.preload_=t.tech_.preloadTextTracks!==!1;var l=new Hfe(t.cues_),u=new Hfe(t.activeCues_),c=!1;t.timeupdateHandler=es(sn(t),function(f){if(f===void 0&&(f={}),!this.tech_.isDisposed()){if(!this.tech_.isReady_){f.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler));return}this.activeCues=this.activeCues,c&&(this.trigger("cuechange"),c=!1),f.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))}});var d=function(){t.stopTracking()};return t.tech_.one("dispose",d),a!=="disabled"&&t.startTracking(),Object.defineProperties(sn(t),{default:{get:function(){return s},set:function(){}},mode:{get:function(){return a},set:function(h){Ufe[h]&&a!==h&&(a=h,!this.preload_&&a!=="disabled"&&this.cues.length===0&&Wfe(this.src,this),this.stopTracking(),a!=="disabled"&&this.startTracking(),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?l:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(this.cues.length===0)return u;for(var h=this.tech_.currentTime(),p=[],g=0,v=this.cues.length;g<v;g++){var y=this.cues[g];(y.startTime<=h&&y.endTime>=h||y.startTime===y.endTime&&y.startTime<=h&&y.startTime+.5>=h)&&p.push(y)}if(c=!1,p.length!==this.activeCues_.length)c=!0;else for(var m=0;m<p.length;m++)this.activeCues_.indexOf(p[m])===-1&&(c=!0);return this.activeCues_=p,u.setCues_(this.activeCues_),u},set:function(){}}}),o.src?(t.src=o.src,t.preload_||(t.loaded_=!0),(t.preload_||o.kind!=="subtitles"&&o.kind!=="captions")&&Wfe(t.src,sn(t))):t.loaded_=!0,t}var i=e.prototype;return i.startTracking=function(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on("timeupdate",this.timeupdateHandler)},i.stopTracking=function(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off("timeupdate",this.timeupdateHandler)},i.addCue=function(t){var o=t;if(!("getCueAsHTML"in o)){o=new bt.vttjs.VTTCue(t.startTime,t.endTime,t.text);for(var a in t)a in o||(o[a]=t[a]);o.id=t.id,o.originalCue_=t}for(var s=this.tech_.textTracks(),l=0;l<s.length;l++)s[l]!==this&&s[l].removeCue(o);this.cues_.push(o),this.cues.setCues_(this.cues_)},i.removeCue=function(t){for(var o=this.cues_.length;o--;){var a=this.cues_[o];if(a===t||a.originalCue_&&a.originalCue_===t){this.cues_.splice(o,1),this.cues.setCues_(this.cues_);break}}},e})(E9);bj.prototype.allowedEvents_={cuechange:"cuechange"};var bAe=(function(r){zr(e,r);function e(i){var n;i===void 0&&(i={});var t=Qa(i,{kind:oQe[i.kind]||""});n=r.call(this,t)||this;var o=!1;return Object.defineProperty(sn(n),"enabled",{get:function(){return o},set:function(s){typeof s!="boolean"||s===o||(o=s,this.trigger("enabledchange"))}}),t.enabled&&(n.enabled=t.enabled),n.loaded_=!0,n}return e})(E9),SAe=(function(r){zr(e,r);function e(i){var n;i===void 0&&(i={});var t=Qa(i,{kind:nQe[i.kind]||""});n=r.call(this,t)||this;var o=!1;return Object.defineProperty(sn(n),"selected",{get:function(){return o},set:function(s){typeof s!="boolean"||s===o||(o=s,this.trigger("selectedchange"))}}),t.selected&&(n.selected=t.selected),n}return e})(E9),_Ae=0,lQe=1,PAe=2,uQe=3,XM=(function(r){zr(e,r);function e(i){var n;i===void 0&&(i={}),n=r.call(this)||this;var t,o=new bj(i);return n.kind=o.kind,n.src=o.src,n.srclang=o.language,n.label=o.label,n.default=o.default,Object.defineProperties(sn(n),{readyState:{get:function(){return t}},track:{get:function(){return o}}}),t=_Ae,o.addEventListener("loadeddata",function(){t=PAe,n.trigger({type:"load",target:sn(n)})}),n}return e})(Mu);XM.prototype.allowedEvents_={load:"load"};XM.NONE=_Ae;XM.LOADING=lQe;XM.LOADED=PAe;XM.ERROR=uQe;var _p={audio:{ListClass:tQe,TrackClass:bAe,capitalName:"Audio"},video:{ListClass:rQe,TrackClass:SAe,capitalName:"Video"},text:{ListClass:yAe,TrackClass:bj,capitalName:"Text"}};Object.keys(_p).forEach(function(r){_p[r].getterName=r+"Tracks",_p[r].privateName=r+"Tracks_"});var pM={remoteText:{ListClass:yAe,TrackClass:bj,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:iQe,TrackClass:XM,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},kd=wn({},_p,pM);pM.names=Object.keys(pM);_p.names=Object.keys(_p);kd.names=[].concat(pM.names).concat(_p.names);function cQe(r,e,i,n,t){t===void 0&&(t={});var o=r.textTracks();t.kind=e,i&&(t.label=i),n&&(t.language=n),t.tech=r;var a=new kd.text.TrackClass(t);return o.addTrack(a),a}var Ea=(function(r){zr(e,r);function e(n,t){var o;return n===void 0&&(n={}),t===void 0&&(t=function(){}),n.reportTouchActivity=!1,o=r.call(this,null,n,t)||this,o.onDurationChange_=function(a){return o.onDurationChange(a)},o.trackProgress_=function(a){return o.trackProgress(a)},o.trackCurrentTime_=function(a){return o.trackCurrentTime(a)},o.stopTrackingCurrentTime_=function(a){return o.stopTrackingCurrentTime(a)},o.disposeSourceHandler_=function(a){return o.disposeSourceHandler(a)},o.queuedHanders_=new Set,o.hasStarted_=!1,o.on("playing",function(){this.hasStarted_=!0}),o.on("loadstart",function(){this.hasStarted_=!1}),kd.names.forEach(function(a){var s=kd[a];n&&n[s.getterName]&&(o[s.privateName]=n[s.getterName])}),o.featuresProgressEvents||o.manualProgressOn(),o.featuresTimeupdateEvents||o.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(function(a){n["native"+a+"Tracks"]===!1&&(o["featuresNative"+a+"Tracks"]=!1)}),n.nativeCaptions===!1||n.nativeTextTracks===!1?o.featuresNativeTextTracks=!1:(n.nativeCaptions===!0||n.nativeTextTracks===!0)&&(o.featuresNativeTextTracks=!0),o.featuresNativeTextTracks||o.emulateTextTracks(),o.preloadTextTracks=n.preloadTextTracks!==!1,o.autoRemoteTextTracks_=new kd.text.ListClass,o.initTrackListeners(),n.nativeControlsForTouch||o.emitTapEvents(),o.constructor&&(o.name_=o.constructor.name||"Unknown Tech"),o}var i=e.prototype;return i.triggerSourceset=function(t){var o=this;this.isReady_||this.one("ready",function(){return o.setTimeout(function(){return o.triggerSourceset(t)},1)}),this.trigger({src:t,type:"sourceset"})},i.manualProgressOn=function(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)},i.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)},i.trackProgress=function(t){this.stopTrackingProgress(),this.progressInterval=this.setInterval(es(this,function(){var o=this.bufferedPercent();this.bufferedPercent_!==o&&this.trigger("progress"),this.bufferedPercent_=o,o===1&&this.stopTrackingProgress()}),500)},i.onDurationChange=function(t){this.duration_=this.duration()},i.buffered=function(){return y1(0,0)},i.bufferedPercent=function(){return vAe(this.buffered(),this.duration_)},i.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},i.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)},i.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)},i.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)},i.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},i.dispose=function(){this.clearTracks(_p.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),r.prototype.dispose.call(this)},i.clearTracks=function(t){var o=this;t=[].concat(t),t.forEach(function(a){for(var s=o[a+"Tracks"]()||[],l=s.length;l--;){var u=s[l];a==="text"&&o.removeRemoteTextTrack(u),s.removeTrack(u)}})},i.cleanupAutoTextTracks=function(){for(var t=this.autoRemoteTextTracks_||[],o=t.length;o--;){var a=t[o];this.removeRemoteTextTrack(a)}},i.reset=function(){},i.crossOrigin=function(){},i.setCrossOrigin=function(){},i.error=function(t){return t!==void 0&&(this.error_=new jd(t),this.trigger("error")),this.error_},i.played=function(){return this.hasStarted_?y1(0,0):y1()},i.play=function(){},i.setScrubbing=function(){},i.scrubbing=function(){},i.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},i.initTrackListeners=function(){var t=this;_p.names.forEach(function(o){var a=_p[o],s=function(){t.trigger(o+"trackchange")},l=t[a.getterName]();l.addEventListener("removetrack",s),l.addEventListener("addtrack",s),t.on("dispose",function(){l.removeEventListener("removetrack",s),l.removeEventListener("addtrack",s)})})},i.addWebVttScript_=function(){var t=this;if(!bt.WebVTT)if(Vr.body.contains(this.el())){if(!this.options_["vtt.js"]&&vF(cfe)&&Object.keys(cfe).length>0){this.trigger("vttjsloaded");return}var o=Vr.createElement("script");o.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",o.onload=function(){t.trigger("vttjsloaded")},o.onerror=function(){t.trigger("vttjserror")},this.on("dispose",function(){o.onload=null,o.onerror=null}),bt.WebVTT=!0,this.el().parentNode.appendChild(o)}else this.ready(this.addWebVttScript_)},i.emulateTextTracks=function(){var t=this,o=this.textTracks(),a=this.remoteTextTracks(),s=function(f){return o.addTrack(f.track)},l=function(f){return o.removeTrack(f.track)};a.on("addtrack",s),a.on("removetrack",l),this.addWebVttScript_();var u=function(){return t.trigger("texttrackchange")},c=function(){u();for(var f=0;f<o.length;f++){var h=o[f];h.removeEventListener("cuechange",u),h.mode==="showing"&&h.addEventListener("cuechange",u)}};c(),o.addEventListener("change",c),o.addEventListener("addtrack",c),o.addEventListener("removetrack",c),this.on("dispose",function(){a.off("addtrack",s),a.off("removetrack",l),o.removeEventListener("change",c),o.removeEventListener("addtrack",c),o.removeEventListener("removetrack",c);for(var d=0;d<o.length;d++){var f=o[d];f.removeEventListener("cuechange",u)}})},i.addTextTrack=function(t,o,a){if(!t)throw new Error("TextTrack kind is required but was not provided");return cQe(this,t,o,a)},i.createRemoteTextTrack=function(t){var o=Qa(t,{tech:this});return new pM.remoteTextEl.TrackClass(o)},i.addRemoteTextTrack=function(t,o){var a=this;t===void 0&&(t={});var s=this.createRemoteTextTrack(t);return o!==!0&&o!==!1&&(Ln.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),o=!0),this.remoteTextTrackEls().addTrackElement_(s),this.remoteTextTracks().addTrack(s.track),o!==!0&&this.ready(function(){return a.autoRemoteTextTracks_.addTrack(s.track)}),s},i.removeRemoteTextTrack=function(t){var o=this.remoteTextTrackEls().getTrackElementByTrack_(t);this.remoteTextTrackEls().removeTrackElement_(o),this.remoteTextTracks().removeTrack(t),this.autoRemoteTextTracks_.removeTrack(t)},i.getVideoPlaybackQuality=function(){return{}},i.requestPictureInPicture=function(){var t=this.options_.Promise||bt.Promise;if(t)return t.reject()},i.disablePictureInPicture=function(){return!0},i.setDisablePictureInPicture=function(){},i.requestVideoFrameCallback=function(t){var o=this,a=gb();return!this.isReady_||this.paused()?(this.queuedHanders_.add(a),this.one("playing",function(){o.queuedHanders_.has(a)&&(o.queuedHanders_.delete(a),t())})):this.requestNamedAnimationFrame(a,t),a},i.cancelVideoFrameCallback=function(t){this.queuedHanders_.has(t)?this.queuedHanders_.delete(t):this.cancelNamedAnimationFrame(t)},i.setPoster=function(){},i.playsinline=function(){},i.setPlaysinline=function(){},i.overrideNativeAudioTracks=function(){},i.overrideNativeVideoTracks=function(){},i.canPlayType=function(){return""},e.canPlayType=function(){return""},e.canPlaySource=function(t,o){return e.canPlayType(t.type)},e.isTech=function(t){return t.prototype instanceof e||t instanceof e||t===e},e.registerTech=function(t,o){if(e.techs_||(e.techs_={}),!e.isTech(o))throw new Error("Tech "+t+" must be a Tech");if(!e.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!e.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return t=dl(t),e.techs_[t]=o,e.techs_[PV(t)]=o,t!=="Tech"&&e.defaultTechOrder_.push(t),o},e.getTech=function(t){if(t){if(e.techs_&&e.techs_[t])return e.techs_[t];if(t=dl(t),bt&&bt.videojs&&bt.videojs[t])return Ln.warn("The "+t+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),bt.videojs[t]}},e})(Rr);kd.names.forEach(function(r){var e=kd[r];Ea.prototype[e.getterName]=function(){return this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName]}});Ea.prototype.featuresVolumeControl=!0;Ea.prototype.featuresMuteControl=!0;Ea.prototype.featuresFullscreenResize=!1;Ea.prototype.featuresPlaybackRate=!1;Ea.prototype.featuresProgressEvents=!1;Ea.prototype.featuresSourceset=!1;Ea.prototype.featuresTimeupdateEvents=!1;Ea.prototype.featuresNativeTextTracks=!1;Ea.prototype.featuresVideoFrameCallback=!1;Ea.withSourceHandlers=function(r){r.registerSourceHandler=function(i,n){var t=r.sourceHandlers;t||(t=r.sourceHandlers=[]),n===void 0&&(n=t.length),t.splice(n,0,i)},r.canPlayType=function(i){for(var n=r.sourceHandlers||[],t,o=0;o<n.length;o++)if(t=n[o].canPlayType(i),t)return t;return""},r.selectSourceHandler=function(i,n){for(var t=r.sourceHandlers||[],o,a=0;a<t.length;a++)if(o=t[a].canHandleSource(i,n),o)return t[a];return null},r.canPlaySource=function(i,n){var t=r.selectSourceHandler(i,n);return t?t.canHandleSource(i,n):""};var e=["seekable","seeking","duration"];e.forEach(function(i){var n=this[i];typeof n=="function"&&(this[i]=function(){return this.sourceHandler_&&this.sourceHandler_[i]?this.sourceHandler_[i].apply(this.sourceHandler_,arguments):n.apply(this,arguments)})},r.prototype),r.prototype.setSource=function(i){var n=r.selectSourceHandler(i,this.options_);n||(r.nativeSourceHandler?n=r.nativeSourceHandler:Ln.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),n!==r.nativeSourceHandler&&(this.currentSource_=i),this.sourceHandler_=n.handleSource(i,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)}};Rr.registerComponent("Tech",Ea);Ea.registerTech("Tech",Ea);Ea.defaultTechOrder_=[];var m1={},g$={},x3={};function dQe(r,e){m1[r]=m1[r]||[],m1[r].push(e)}function fQe(r,e,i){r.setTimeout(function(){return Bw(e,m1[e.type],i,r)},1)}function hQe(r,e){r.forEach(function(i){return i.setTech&&i.setTech(e)})}function pQe(r,e,i){return r.reduceRight(O9(i),e[i]())}function gQe(r,e,i,n){return e[i](r.reduce(O9(i),n))}function Gfe(r,e,i,n){n===void 0&&(n=null);var t="call"+dl(i),o=r.reduce(O9(t),n),a=o===x3,s=a?null:e[i](o);return mQe(r,i,s,a),s}var vQe={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},yQe={setCurrentTime:1,setMuted:1,setVolume:1},Yfe={play:1,pause:1};function O9(r){return function(e,i){return e===x3?x3:i[r]?i[r](e):e}}function mQe(r,e,i,n){for(var t=r.length-1;t>=0;t--){var o=r[t];o[e]&&o[e](n,i)}}function bQe(r){g$[r.id()]=null}function SQe(r,e){var i=g$[r.id()],n=null;if(i==null)return n=e(r),g$[r.id()]=[[e,n]],n;for(var t=0;t<i.length;t++){var o=i[t],a=o[0],s=o[1];a===e&&(n=s)}return n===null&&(n=e(r),i.push([e,n])),n}function Bw(r,e,i,n,t,o){r===void 0&&(r={}),e===void 0&&(e=[]),t===void 0&&(t=[]),o===void 0&&(o=!1);var a=e,s=a[0],l=a.slice(1);if(typeof s=="string")Bw(r,m1[s],i,n,t,o);else if(s){var u=SQe(n,s);if(!u.setSource)return t.push(u),Bw(r,l,i,n,t,o);u.setSource(Ks({},r),function(c,d){if(c)return Bw(r,l,i,n,t,o);t.push(u),Bw(d,r.type===d.type?l:m1[d.type],i,n,t,o)})}else l.length?Bw(r,l,i,n,t,o):o?i(r,t):Bw(r,m1["*"],i,n,t,!0)}var _Qe={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"},E3=function(e){e===void 0&&(e="");var i=w9(e),n=_Qe[i.toLowerCase()];return n||""},PQe=function(e,i){if(!i)return"";if(e.cache_.source.src===i&&e.cache_.source.type)return e.cache_.source.type;var n=e.cache_.sources.filter(function(s){return s.src===i});if(n.length)return n[0].type;for(var t=e.$$("source"),o=0;o<t.length;o++){var a=t[o];if(a.type&&a.src&&a.src===i)return a.type}return E3(i)},CQe=function r(e){if(Array.isArray(e)){var i=[];e.forEach(function(n){n=r(n),Array.isArray(n)?i=i.concat(n):Q0(n)&&i.push(n)}),e=i}else typeof e=="string"&&e.trim()?e=[$fe({src:e})]:Q0(e)&&typeof e.src=="string"&&e.src&&e.src.trim()?e=[$fe(e)]:e=[];return e};function $fe(r){if(!r.type){var e=E3(r.src);e&&(r.type=e)}return r}var TQe=(function(r){zr(e,r);function e(i,n,t){var o,a=Qa({createEl:!1},n);if(o=r.call(this,i,a,t)||this,!n.playerOptions.sources||n.playerOptions.sources.length===0)for(var s=0,l=n.playerOptions.techOrder;s<l.length;s++){var u=dl(l[s]),c=Ea.getTech(u);if(u||(c=Rr.getComponent(u)),c&&c.isSupported()){i.loadTech_(u);break}}else i.src(n.playerOptions.sources);return o}return e})(Rr);Rr.registerComponent("MediaLoader",TQe);var uz=(function(r){zr(e,r);function e(n,t){var o;return o=r.call(this,n,t)||this,o.options_.controlText&&o.controlText(o.options_.controlText),o.handleMouseOver_=function(a){return o.handleMouseOver(a)},o.handleMouseOut_=function(a){return o.handleMouseOut(a)},o.handleClick_=function(a){return o.handleClick(a)},o.handleKeyDown_=function(a){return o.handleKeyDown(a)},o.emitTapEvents(),o.enable(),o}var i=e.prototype;return i.createEl=function(t,o,a){t===void 0&&(t="div"),o===void 0&&(o={}),a===void 0&&(a={}),o=Ks({className:this.buildCSSClass(),tabIndex:0},o),t==="button"&&Ln.error("Creating a ClickableComponent with an HTML element of "+t+" is not supported; use a Button instead."),a=Ks({role:"button"},a),this.tabIndex_=o.tabIndex;var s=mo(t,o,a);return s.appendChild(mo("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(s),s},i.dispose=function(){this.controlTextEl_=null,r.prototype.dispose.call(this)},i.createControlTextEl=function(t){return this.controlTextEl_=mo("span",{className:"vjs-control-text"},{"aria-live":"polite"}),t&&t.appendChild(this.controlTextEl_),this.controlText(this.controlText_,t),this.controlTextEl_},i.controlText=function(t,o){if(o===void 0&&(o=this.el()),t===void 0)return this.controlText_||"Need Text";var a=this.localize(t);this.controlText_=t,sO(this.controlTextEl_,a),!this.nonIconControl&&!this.player_.options_.noUITitleAttributes&&o.setAttribute("title",a)},i.buildCSSClass=function(){return"vjs-control vjs-button "+r.prototype.buildCSSClass.call(this)},i.enable=function(){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_))},i.disable=function(){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_)},i.handleLanguagechange=function(){this.controlText(this.controlText_)},i.handleClick=function(t){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)},i.handleKeyDown=function(t){gn.isEventKey(t,"Space")||gn.isEventKey(t,"Enter")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):r.prototype.handleKeyDown.call(this,t)},e})(Rr);Rr.registerComponent("ClickableComponent",uz);var xQe=(function(r){zr(e,r);function e(n,t){var o;return o=r.call(this,n,t)||this,o.update(),o.update_=function(a){return o.update(a)},n.on("posterchange",o.update_),o}var i=e.prototype;return i.dispose=function(){this.player().off("posterchange",this.update_),r.prototype.dispose.call(this)},i.createEl=function(){var t=mo("div",{className:"vjs-poster",tabIndex:-1});return t},i.update=function(t){var o=this.player().poster();this.setSrc(o),o?this.show():this.hide()},i.setSrc=function(t){var o="";t&&(o='url("'+t+'")'),this.el_.style.backgroundImage=o},i.handleClick=function(t){if(this.player_.controls()){var o=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;this.player_.tech(!0)&&!((yj||vj)&&o)&&this.player_.tech(!0).focus(),this.player_.paused()?kv(this.player_.play()):this.player_.pause()}},e})(uz);Rr.registerComponent("PosterImage",xQe);var up="#222",qfe="#ccc",EQe={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 zG(r,e){var i;if(r.length===4)i=r[1]+r[1]+r[2]+r[2]+r[3]+r[3];else if(r.length===7)i=r.slice(1);else throw new Error("Invalid color code provided, "+r+"; must be formatted as e.g. #f0e or #f604e2.");return"rgba("+parseInt(i.slice(0,2),16)+","+parseInt(i.slice(2,4),16)+","+parseInt(i.slice(4,6),16)+","+e+")"}function WG(r,e,i){try{r.style[e]=i}catch{return}}var AQe=(function(r){zr(e,r);function e(n,t,o){var a;a=r.call(this,n,t,o)||this;var s=function(u){return a.updateDisplay(u)};return n.on("loadstart",function(l){return a.toggleDisplay(l)}),n.on("texttrackchange",s),n.on("loadedmetadata",function(l){return a.preselectTrack(l)}),n.ready(es(sn(a),function(){if(n.tech_&&n.tech_.featuresNativeTextTracks){this.hide();return}n.on("fullscreenchange",s),n.on("playerresize",s),bt.addEventListener("orientationchange",s),n.on("dispose",function(){return bt.removeEventListener("orientationchange",s)});for(var l=this.options_.playerOptions.tracks||[],u=0;u<l.length;u++)this.player_.addRemoteTextTrack(l[u],!0);this.preselectTrack()})),a}var i=e.prototype;return i.preselectTrack=function(){for(var t={captions:1,subtitles:1},o=this.player_.textTracks(),a=this.player_.cache_.selectedLanguage,s,l,u,c=0;c<o.length;c++){var d=o[c];a&&a.enabled&&a.language&&a.language===d.language&&d.kind in t?d.kind===a.kind?u=d:u||(u=d):a&&!a.enabled?(u=null,s=null,l=null):d.default&&(d.kind==="descriptions"&&!s?s=d:d.kind in t&&!l&&(l=d))}u?u.mode="showing":l?l.mode="showing":s&&(s.mode="showing")},i.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},i.createEl=function(){return r.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{translate:"yes","aria-live":"off","aria-atomic":"true"})},i.clearDisplay=function(){typeof bt.WebVTT=="function"&&bt.WebVTT.processCues(bt,[],this.el_)},i.updateDisplay=function(){var t=this.player_.textTracks(),o=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),o){for(var a=[],s=0;s<t.length;++s){var l=t[s];l.mode==="showing"&&a.push(l)}this.updateForTrack(a);return}for(var u=null,c=null,d=t.length;d--;){var f=t[d];f.mode==="showing"&&(f.kind==="descriptions"?u=f:c=f)}c?(this.getAttribute("aria-live")!=="off"&&this.setAttribute("aria-live","off"),this.updateForTrack(c)):u&&(this.getAttribute("aria-live")!=="assertive"&&this.setAttribute("aria-live","assertive"),this.updateForTrack(u))},i.updateDisplayState=function(t){for(var o=this.player_.textTrackSettings.getValues(),a=t.activeCues,s=a.length;s--;){var l=a[s];if(l){var u=l.displayState;if(o.color&&(u.firstChild.style.color=o.color),o.textOpacity&&WG(u.firstChild,"color",zG(o.color||"#fff",o.textOpacity)),o.backgroundColor&&(u.firstChild.style.backgroundColor=o.backgroundColor),o.backgroundOpacity&&WG(u.firstChild,"backgroundColor",zG(o.backgroundColor||"#000",o.backgroundOpacity)),o.windowColor&&(o.windowOpacity?WG(u,"backgroundColor",zG(o.windowColor,o.windowOpacity)):u.style.backgroundColor=o.windowColor),o.edgeStyle&&(o.edgeStyle==="dropshadow"?u.firstChild.style.textShadow="2px 2px 3px "+up+", 2px 2px 4px "+up+", 2px 2px 5px "+up:o.edgeStyle==="raised"?u.firstChild.style.textShadow="1px 1px "+up+", 2px 2px "+up+", 3px 3px "+up:o.edgeStyle==="depressed"?u.firstChild.style.textShadow="1px 1px "+qfe+", 0 1px "+qfe+", -1px -1px "+up+", 0 -1px "+up:o.edgeStyle==="uniform"&&(u.firstChild.style.textShadow="0 0 4px "+up+", 0 0 4px "+up+", 0 0 4px "+up+", 0 0 4px "+up)),o.fontPercent&&o.fontPercent!==1){var c=bt.parseFloat(u.style.fontSize);u.style.fontSize=c*o.fontPercent+"px",u.style.height="auto",u.style.top="auto"}o.fontFamily&&o.fontFamily!=="default"&&(o.fontFamily==="small-caps"?u.firstChild.style.fontVariant="small-caps":u.firstChild.style.fontFamily=EQe[o.fontFamily])}}},i.updateForTrack=function(t){if(Array.isArray(t)||(t=[t]),!(typeof bt.WebVTT!="function"||t.every(function(h){return!h.activeCues}))){for(var o=[],a=0;a<t.length;++a)for(var s=t[a],l=0;l<s.activeCues.length;++l)o.push(s.activeCues[l]);bt.WebVTT.processCues(bt,o,this.el_);for(var u=0;u<t.length;++u){for(var c=t[u],d=0;d<c.activeCues.length;++d){var f=c.activeCues[d].displayState;z0(f,"vjs-text-track-cue"),z0(f,"vjs-text-track-cue-"+(c.language?c.language:u)),c.language&&dM(f,"lang",c.language)}this.player_.textTrackSettings&&this.updateDisplayState(c)}}},e})(Rr);Rr.registerComponent("TextTrackDisplay",AQe);var wQe=(function(r){zr(e,r);function e(){return r.apply(this,arguments)||this}var i=e.prototype;return i.createEl=function(){var t=this.player_.isAudio(),o=this.localize(t?"Audio Player":"Video Player"),a=mo("span",{className:"vjs-control-text",textContent:this.localize("{1} is loading.",[o])}),s=r.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return s.appendChild(a),s},e})(Rr);Rr.registerComponent("LoadingSpinner",wQe);var Pg=(function(r){zr(e,r);function e(){return r.apply(this,arguments)||this}var i=e.prototype;return i.createEl=function(t,o,a){o===void 0&&(o={}),a===void 0&&(a={}),t="button",o=Ks({className:this.buildCSSClass()},o),a=Ks({type:"button"},a);var s=mo(t,o,a);return s.appendChild(mo("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(s),s},i.addChild=function(t,o){o===void 0&&(o={});var a=this.constructor.name;return Ln.warn("Adding an actionable (user controllable) child to a Button ("+a+") is not supported; use a ClickableComponent instead."),Rr.prototype.addChild.call(this,t,o)},i.enable=function(){r.prototype.enable.call(this),this.el_.removeAttribute("disabled")},i.disable=function(){r.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},i.handleKeyDown=function(t){if(gn.isEventKey(t,"Space")||gn.isEventKey(t,"Enter")){t.stopPropagation();return}r.prototype.handleKeyDown.call(this,t)},e})(uz);Rr.registerComponent("Button",Pg);var CAe=(function(r){zr(e,r);function e(n,t){var o;return o=r.call(this,n,t)||this,o.mouseused_=!1,o.on("mousedown",function(a){return o.handleMouseDown(a)}),o}var i=e.prototype;return i.buildCSSClass=function(){return"vjs-big-play-button"},i.handleClick=function(t){var o=this.player_.play();if(this.mouseused_&&t.clientX&&t.clientY){var a=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;kv(o),this.player_.tech(!0)&&!((yj||vj)&&a)&&this.player_.tech(!0).focus();return}var s=this.player_.getChild("controlBar"),l=s&&s.getChild("playToggle");if(!l){this.player_.tech(!0).focus();return}var u=function(){return l.focus()};AN(o)?o.then(u,function(){}):this.setTimeout(u,1)},i.handleKeyDown=function(t){this.mouseused_=!1,r.prototype.handleKeyDown.call(this,t)},i.handleMouseDown=function(t){this.mouseused_=!0},e})(Pg);CAe.prototype.controlText_="Play Video";Rr.registerComponent("BigPlayButton",CAe);var OQe=(function(r){zr(e,r);function e(n,t){var o;return o=r.call(this,n,t)||this,o.controlText(t&&t.controlText||o.localize("Close")),o}var i=e.prototype;return i.buildCSSClass=function(){return"vjs-close-button "+r.prototype.buildCSSClass.call(this)},i.handleClick=function(t){this.trigger({type:"close",bubbles:!1})},i.handleKeyDown=function(t){gn.isEventKey(t,"Esc")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):r.prototype.handleKeyDown.call(this,t)},e})(Pg);Rr.registerComponent("CloseButton",OQe);var TAe=(function(r){zr(e,r);function e(n,t){var o;return t===void 0&&(t={}),o=r.call(this,n,t)||this,t.replay=t.replay===void 0||t.replay,o.on(n,"play",function(a){return o.handlePlay(a)}),o.on(n,"pause",function(a){return o.handlePause(a)}),t.replay&&o.on(n,"ended",function(a){return o.handleEnded(a)}),o}var i=e.prototype;return i.buildCSSClass=function(){return"vjs-play-control "+r.prototype.buildCSSClass.call(this)},i.handleClick=function(t){this.player_.paused()?kv(this.player_.play()):this.player_.pause()},i.handleSeeked=function(t){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(t):this.handlePlay(t)},i.handlePlay=function(t){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},i.handlePause=function(t){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},i.handleEnded=function(t){var o=this;this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",function(a){return o.handleSeeked(a)})},e})(Pg);TAe.prototype.controlText_="Play";Rr.registerComponent("PlayToggle",TAe);var xAe=function(e,i){e=e<0?0:e;var n=Math.floor(e%60),t=Math.floor(e/60%60),o=Math.floor(e/3600),a=Math.floor(i/60%60),s=Math.floor(i/3600);return(isNaN(e)||e===1/0)&&(o=t=n="-"),o=o>0||s>0?o+":":"",t=((o||a>=10)&&t<10?"0"+t:t)+":",n=n<10?"0"+n:n,o+t+n},D9=xAe;function DQe(r){D9=r}function RQe(){D9=xAe}function gM(r,e){return e===void 0&&(e=r),D9(r,e)}var KM=(function(r){zr(e,r);function e(n,t){var o;return o=r.call(this,n,t)||this,o.on(n,["timeupdate","ended"],function(a){return o.updateContent(a)}),o.updateTextNode_(),o}var i=e.prototype;return i.createEl=function(){var t=this.buildCSSClass(),o=r.prototype.createEl.call(this,"div",{className:t+" vjs-time-control vjs-control"}),a=mo("span",{className:"vjs-control-text",textContent:this.localize(this.labelText_)+" "},{role:"presentation"});return o.appendChild(a),this.contentEl_=mo("span",{className:t+"-display"},{"aria-live":"off",role:"presentation"}),o.appendChild(this.contentEl_),o},i.dispose=function(){this.contentEl_=null,this.textNode_=null,r.prototype.dispose.call(this)},i.updateTextNode_=function(t){var o=this;t===void 0&&(t=0),t=gM(t),this.formattedTime_!==t&&(this.formattedTime_=t,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",function(){if(o.contentEl_){var a=o.textNode_;a&&o.contentEl_.firstChild!==a&&(a=null,Ln.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),o.textNode_=Vr.createTextNode(o.formattedTime_),o.textNode_&&(a?o.contentEl_.replaceChild(o.textNode_,a):o.contentEl_.appendChild(o.textNode_))}}))},i.updateContent=function(t){},e})(Rr);KM.prototype.labelText_="Time";KM.prototype.controlText_="Time";Rr.registerComponent("TimeDisplay",KM);var R9=(function(r){zr(e,r);function e(){return r.apply(this,arguments)||this}var i=e.prototype;return i.buildCSSClass=function(){return"vjs-current-time"},i.updateContent=function(t){var o;this.player_.ended()?o=this.player_.duration():o=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(o)},e})(KM);R9.prototype.labelText_="Current Time";R9.prototype.controlText_="Current Time";Rr.registerComponent("CurrentTimeDisplay",R9);var M9=(function(r){zr(e,r);function e(n,t){var o;o=r.call(this,n,t)||this;var a=function(l){return o.updateContent(l)};return o.on(n,"durationchange",a),o.on(n,"loadstart",a),o.on(n,"loadedmetadata",a),o}var i=e.prototype;return i.buildCSSClass=function(){return"vjs-duration"},i.updateContent=function(t){var o=this.player_.duration();this.updateTextNode_(o)},e})(KM);M9.prototype.labelText_="Duration";M9.prototype.controlText_="Duration";Rr.registerComponent("DurationDisplay",M9);var MQe=(function(r){zr(e,r);function e(){return r.apply(this,arguments)||this}var i=e.prototype;return i.createEl=function(){var t=r.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),o=r.prototype.createEl.call(this,"div"),a=r.prototype.createEl.call(this,"span",{textContent:"/"});return o.appendChild(a),t.appendChild(o),t},e})(Rr);Rr.registerComponent("TimeDivider",MQe);var L9=(function(r){zr(e,r);function e(n,t){var o;return o=r.call(this,n,t)||this,o.on(n,"durationchange",function(a){return o.updateContent(a)}),o}var i=e.prototype;return i.buildCSSClass=function(){return"vjs-remaining-time"},i.createEl=function(){var t=r.prototype.createEl.call(this);return this.options_.displayNegative!==!1&&t.insertBefore(mo("span",{},{"aria-hidden":!0},"-"),this.contentEl_),t},i.updateContent=function(t){if(typeof this.player_.duration()=="number"){var o;this.player_.ended()?o=0:this.player_.remainingTimeDisplay?o=this.player_.remainingTimeDisplay():o=this.player_.remainingTime(),this.updateTextNode_(o)}},e})(KM);L9.prototype.labelText_="Remaining Time";L9.prototype.controlText_="Remaining Time";Rr.registerComponent("RemainingTimeDisplay",L9);var LQe=(function(r){zr(e,r);function e(n,t){var o;return o=r.call(this,n,t)||this,o.updateShowing(),o.on(o.player(),"durationchange",function(a){return o.updateShowing(a)}),o}var i=e.prototype;return i.createEl=function(){var t=r.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=mo("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(mo("span",{className:"vjs-control-text",textContent:this.localize("Stream Type")+" "})),this.contentEl_.appendChild(Vr.createTextNode(this.localize("LIVE"))),t.appendChild(this.contentEl_),t},i.dispose=function(){this.contentEl_=null,r.prototype.dispose.call(this)},i.updateShowing=function(t){this.player().duration()===1/0?this.show():this.hide()},e})(Rr);Rr.registerComponent("LiveDisplay",LQe);var EAe=(function(r){zr(e,r);function e(n,t){var o;return o=r.call(this,n,t)||this,o.updateLiveEdgeStatus(),o.player_.liveTracker&&(o.updateLiveEdgeStatusHandler_=function(a){return o.updateLiveEdgeStatus(a)},o.on(o.player_.liveTracker,"liveedgechange",o.updateLiveEdgeStatusHandler_)),o}var i=e.prototype;return i.createEl=function(){var t=r.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});return this.textEl_=mo("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),t.appendChild(this.textEl_),t},i.updateLiveEdgeStatus=function(){!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"))},i.handleClick=function(){this.player_.liveTracker.seekToLiveEdge()},i.dispose=function(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,r.prototype.dispose.call(this)},e})(Pg);EAe.prototype.controlText_="Seek to live, currently playing live";Rr.registerComponent("SeekToLive",EAe);var cz=function(e,i,n){return e=Number(e),Math.min(n,Math.max(i,isNaN(e)?i:e))},k9=(function(r){zr(e,r);function e(n,t){var o;return o=r.call(this,n,t)||this,o.handleMouseDown_=function(a){return o.handleMouseDown(a)},o.handleMouseUp_=function(a){return o.handleMouseUp(a)},o.handleKeyDown_=function(a){return o.handleKeyDown(a)},o.handleClick_=function(a){return o.handleClick(a)},o.handleMouseMove_=function(a){return o.handleMouseMove(a)},o.update_=function(a){return o.update(a)},o.bar=o.getChild(o.options_.barName),o.vertical(!!o.options_.vertical),o.enable(),o}var i=e.prototype;return i.enabled=function(){return this.enabled_},i.enable=function(){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)},i.disable=function(){if(this.enabled()){var t=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(t,"mousemove",this.handleMouseMove_),this.off(t,"mouseup",this.handleMouseUp_),this.off(t,"touchmove",this.handleMouseMove_),this.off(t,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},i.createEl=function(t,o,a){return o===void 0&&(o={}),a===void 0&&(a={}),o.className=o.className+" vjs-slider",o=Ks({tabIndex:0},o),a=Ks({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},a),r.prototype.createEl.call(this,t,o,a)},i.handleMouseDown=function(t){var o=this.bar.el_.ownerDocument;t.type==="mousedown"&&t.preventDefault(),t.type==="touchstart"&&!pb&&t.preventDefault(),tAe(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(o,"mousemove",this.handleMouseMove_),this.on(o,"mouseup",this.handleMouseUp_),this.on(o,"touchmove",this.handleMouseMove_),this.on(o,"touchend",this.handleMouseUp_),this.handleMouseMove(t,!0)},i.handleMouseMove=function(t){},i.handleMouseUp=function(){var t=this.bar.el_.ownerDocument;rAe(),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()},i.update=function(){var t=this;if(!(!this.el_||!this.bar)){var o=this.getProgress();return o===this.progress_||(this.progress_=o,this.requestNamedAnimationFrame("Slider#update",function(){var a=t.vertical()?"height":"width";t.bar.el().style[a]=(o*100).toFixed(2)+"%"})),o}},i.getProgress=function(){return Number(cz(this.getPercent(),0,1).toFixed(4))},i.calculateDistance=function(t){var o=nz(this.el_,t);return this.vertical()?o.y:o.x},i.handleKeyDown=function(t){gn.isEventKey(t,"Left")||gn.isEventKey(t,"Down")?(t.preventDefault(),t.stopPropagation(),this.stepBack()):gn.isEventKey(t,"Right")||gn.isEventKey(t,"Up")?(t.preventDefault(),t.stopPropagation(),this.stepForward()):r.prototype.handleKeyDown.call(this,t)},i.handleClick=function(t){t.stopPropagation(),t.preventDefault()},i.vertical=function(t){if(t===void 0)return this.vertical_||!1;this.vertical_=!!t,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},e})(Rr);Rr.registerComponent("Slider",k9);var GG=function(e,i){return cz(e/i*100,0,100).toFixed(2)+"%"},kQe=(function(r){zr(e,r);function e(n,t){var o;return o=r.call(this,n,t)||this,o.partEls_=[],o.on(n,"progress",function(a){return o.update(a)}),o}var i=e.prototype;return i.createEl=function(){var t=r.prototype.createEl.call(this,"div",{className:"vjs-load-progress"}),o=mo("span",{className:"vjs-control-text"}),a=mo("span",{textContent:this.localize("Loaded")}),s=Vr.createTextNode(": ");return this.percentageEl_=mo("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),t.appendChild(o),o.appendChild(a),o.appendChild(s),o.appendChild(this.percentageEl_),t},i.dispose=function(){this.partEls_=null,this.percentageEl_=null,r.prototype.dispose.call(this)},i.update=function(t){var o=this;this.requestNamedAnimationFrame("LoadProgressBar#update",function(){var a=o.player_.liveTracker,s=o.player_.buffered(),l=a&&a.isLive()?a.seekableEnd():o.player_.duration(),u=o.player_.bufferedEnd(),c=o.partEls_,d=GG(u,l);o.percent_!==d&&(o.el_.style.width=d,sO(o.percentageEl_,d),o.percent_=d);for(var f=0;f<s.length;f++){var h=s.start(f),p=s.end(f),g=c[f];g||(g=o.el_.appendChild(mo()),c[f]=g),!(g.dataset.start===h&&g.dataset.end===p)&&(g.dataset.start=h,g.dataset.end=p,g.style.left=GG(h,u),g.style.width=GG(p-h,u))}for(var v=c.length;v>s.length;v--)o.el_.removeChild(c[v-1]);c.length=s.length})},e})(Rr);Rr.registerComponent("LoadProgressBar",kQe);var IQe=(function(r){zr(e,r);function e(n,t){var o;return o=r.call(this,n,t)||this,o.update=eb(es(sn(o),o.update),Ag),o}var i=e.prototype;return i.createEl=function(){return r.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})},i.update=function(t,o,a){var s=mF(this.el_),l=fM(this.player_.el()),u=t.width*o;if(!(!l||!s)){var c=t.left-l.left+u,d=t.width-u+(l.right-t.right),f=s.width/2;c<f?f+=f-c:d<f&&(f=d),f<0?f=0:f>s.width&&(f=s.width),f=Math.round(f),this.el_.style.right="-"+f+"px",this.write(a)}},i.write=function(t){sO(this.el_,t)},i.updateTime=function(t,o,a,s){var l=this;this.requestNamedAnimationFrame("TimeTooltip#updateTime",function(){var u,c=l.player_.duration();if(l.player_.liveTracker&&l.player_.liveTracker.isLive()){var d=l.player_.liveTracker.liveWindow(),f=d-o*d;u=(f<1?"":"-")+gM(f,d)}else u=gM(a,c);l.update(t,o,u),s&&s()})},e})(Rr);Rr.registerComponent("TimeTooltip",IQe);var I9=(function(r){zr(e,r);function e(n,t){var o;return o=r.call(this,n,t)||this,o.update=eb(es(sn(o),o.update),Ag),o}var i=e.prototype;return i.createEl=function(){return r.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},i.update=function(t,o){var a=this.getChild("timeTooltip");if(a){var s=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();a.updateTime(t,o,s)}},e})(Rr);I9.prototype.options_={children:[]};!Hd&&!hb&&I9.prototype.options_.children.push("timeTooltip");Rr.registerComponent("PlayProgressBar",I9);var AAe=(function(r){zr(e,r);function e(n,t){var o;return o=r.call(this,n,t)||this,o.update=eb(es(sn(o),o.update),Ag),o}var i=e.prototype;return i.createEl=function(){return r.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},i.update=function(t,o){var a=this,s=o*this.player_.duration();this.getChild("timeTooltip").updateTime(t,o,s,function(){a.el_.style.left=t.width*o+"px"})},e})(Rr);AAe.prototype.options_={children:["timeTooltip"]};Rr.registerComponent("MouseTimeDisplay",AAe);var nB=5,Xfe=12,N9=(function(r){zr(e,r);function e(n,t){var o;return o=r.call(this,n,t)||this,o.setEventHandlers_(),o}var i=e.prototype;return i.setEventHandlers_=function(){var t=this;this.update_=es(this,this.update),this.update=eb(this.update_,Ag),this.on(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=function(o){return t.enableInterval_(o)},this.disableIntervalHandler_=function(o){return t.disableInterval_(o)},this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in Vr&&"visibilityState"in Vr&&this.on(Vr,"visibilitychange",this.toggleVisibility_)},i.toggleVisibility_=function(t){Vr.visibilityState==="hidden"?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(t)):(!this.player_.ended()&&!this.player_.paused()&&this.enableInterval_(),this.update())},i.enableInterval_=function(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,Ag))},i.disableInterval_=function(t){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&t&&t.type!=="ended"||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)},i.createEl=function(){return r.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},i.update=function(t){var o=this;if(Vr.visibilityState!=="hidden"){var a=r.prototype.update.call(this);return this.requestNamedAnimationFrame("SeekBar#update",function(){var s=o.player_.ended()?o.player_.duration():o.getCurrentTime_(),l=o.player_.liveTracker,u=o.player_.duration();l&&l.isLive()&&(u=o.player_.liveTracker.liveCurrentTime()),o.percent_!==a&&(o.el_.setAttribute("aria-valuenow",(a*100).toFixed(2)),o.percent_=a),(o.currentTime_!==s||o.duration_!==u)&&(o.el_.setAttribute("aria-valuetext",o.localize("progress bar timing: currentTime={1} duration={2}",[gM(s,u),gM(u,u)],"{1} of {2}")),o.currentTime_=s,o.duration_=u),o.bar&&o.bar.update(fM(o.el()),o.getProgress())}),a}},i.userSeek_=function(t){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(t)},i.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},i.getPercent=function(){var t=this.getCurrentTime_(),o,a=this.player_.liveTracker;return a&&a.isLive()?(o=(t-a.seekableStart())/a.liveWindow(),a.atLiveEdge()&&(o=1)):o=t/this.player_.duration(),o},i.handleMouseDown=function(t){bF(t)&&(t.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),r.prototype.handleMouseDown.call(this,t))},i.handleMouseMove=function(t,o){if(o===void 0&&(o=!1),!!bF(t)){!o&&!this.player_.scrubbing()&&this.player_.scrubbing(!0);var a,s=this.calculateDistance(t),l=this.player_.liveTracker;if(!l||!l.isLive())a=s*this.player_.duration(),a===this.player_.duration()&&(a=a-.1);else{if(s>=.99){l.seekToLiveEdge();return}var u=l.seekableStart(),c=l.liveCurrentTime();if(a=u+s*l.liveWindow(),a>=c&&(a=c),a<=u&&(a=u+.1),a===1/0)return}this.userSeek_(a)}},i.enable=function(){r.prototype.enable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.show()},i.disable=function(){r.prototype.disable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.hide()},i.handleMouseUp=function(t){r.prototype.handleMouseUp.call(this,t),t&&t.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?kv(this.player_.play()):this.update_()},i.stepForward=function(){this.userSeek_(this.player_.currentTime()+nB)},i.stepBack=function(){this.userSeek_(this.player_.currentTime()-nB)},i.handleAction=function(t){this.player_.paused()?this.player_.play():this.player_.pause()},i.handleKeyDown=function(t){var o=this.player_.liveTracker;if(gn.isEventKey(t,"Space")||gn.isEventKey(t,"Enter"))t.preventDefault(),t.stopPropagation(),this.handleAction(t);else if(gn.isEventKey(t,"Home"))t.preventDefault(),t.stopPropagation(),this.userSeek_(0);else if(gn.isEventKey(t,"End"))t.preventDefault(),t.stopPropagation(),o&&o.isLive()?this.userSeek_(o.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(gn(t))){t.preventDefault(),t.stopPropagation();var a=(gn.codes[gn(t)]-gn.codes[0])*10/100;o&&o.isLive()?this.userSeek_(o.seekableStart()+o.liveWindow()*a):this.userSeek_(this.player_.duration()*a)}else gn.isEventKey(t,"PgDn")?(t.preventDefault(),t.stopPropagation(),this.userSeek_(this.player_.currentTime()-nB*Xfe)):gn.isEventKey(t,"PgUp")?(t.preventDefault(),t.stopPropagation(),this.userSeek_(this.player_.currentTime()+nB*Xfe)):r.prototype.handleKeyDown.call(this,t)},i.dispose=function(){this.disableInterval_(),this.off(this.player_,["ended","durationchange","timeupdate"],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 Vr&&"visibilityState"in Vr&&this.off(Vr,"visibilitychange",this.toggleVisibility_),r.prototype.dispose.call(this)},e})(k9);N9.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"};!Hd&&!hb&&N9.prototype.options_.children.splice(1,0,"mouseTimeDisplay");Rr.registerComponent("SeekBar",N9);var wAe=(function(r){zr(e,r);function e(n,t){var o;return o=r.call(this,n,t)||this,o.handleMouseMove=eb(es(sn(o),o.handleMouseMove),Ag),o.throttledHandleMouseSeek=eb(es(sn(o),o.handleMouseSeek),Ag),o.handleMouseUpHandler_=function(a){return o.handleMouseUp(a)},o.handleMouseDownHandler_=function(a){return o.handleMouseDown(a)},o.enable(),o}var i=e.prototype;return i.createEl=function(){return r.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},i.handleMouseMove=function(t){var o=this.getChild("seekBar");if(o){var a=o.getChild("playProgressBar"),s=o.getChild("mouseTimeDisplay");if(!(!a&&!s)){var l=o.el(),u=mF(l),c=nz(l,t).x;c=cz(c,0,1),s&&s.update(u,c),a&&a.update(u,o.getProgress())}}},i.handleMouseSeek=function(t){var o=this.getChild("seekBar");o&&o.handleMouseMove(t)},i.enabled=function(){return this.enabled_},i.disable=function(){if(this.children().forEach(function(o){return o.disable&&o.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())){var t=this.getChild("seekBar");this.player_.scrubbing(!1),t.videoWasPlaying&&kv(this.player_.play())}},i.enable=function(){this.children().forEach(function(t){return t.enable&&t.enable()}),!this.enabled()&&(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},i.removeListenersAddedOnMousedownAndTouchstart=function(){var t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseSeek),this.off(t,"touchmove",this.throttledHandleMouseSeek),this.off(t,"mouseup",this.handleMouseUpHandler_),this.off(t,"touchend",this.handleMouseUpHandler_)},i.handleMouseDown=function(t){var o=this.el_.ownerDocument,a=this.getChild("seekBar");a&&a.handleMouseDown(t),this.on(o,"mousemove",this.throttledHandleMouseSeek),this.on(o,"touchmove",this.throttledHandleMouseSeek),this.on(o,"mouseup",this.handleMouseUpHandler_),this.on(o,"touchend",this.handleMouseUpHandler_)},i.handleMouseUp=function(t){var o=this.getChild("seekBar");o&&o.handleMouseUp(t),this.removeListenersAddedOnMousedownAndTouchstart()},e})(Rr);wAe.prototype.options_={children:["seekBar"]};Rr.registerComponent("ProgressControl",wAe);var OAe=(function(r){zr(e,r);function e(n,t){var o;return o=r.call(this,n,t)||this,o.on(n,["enterpictureinpicture","leavepictureinpicture"],function(a){return o.handlePictureInPictureChange(a)}),o.on(n,["disablepictureinpicturechanged","loadedmetadata"],function(a){return o.handlePictureInPictureEnabledChange(a)}),o.on(n,["loadedmetadata","audioonlymodechange","audiopostermodechange"],function(){var a=n.currentType().substring(0,5)==="audio";a||n.audioPosterMode()||n.audioOnlyMode()?(n.isInPictureInPicture()&&n.exitPictureInPicture(),o.hide()):o.show()}),o.disable(),o}var i=e.prototype;return i.buildCSSClass=function(){return"vjs-picture-in-picture-control "+r.prototype.buildCSSClass.call(this)},i.handlePictureInPictureEnabledChange=function(){Vr.pictureInPictureEnabled&&this.player_.disablePictureInPicture()===!1?this.enable():this.disable()},i.handlePictureInPictureChange=function(t){this.player_.isInPictureInPicture()?this.controlText("Exit Picture-in-Picture"):this.controlText("Picture-in-Picture"),this.handlePictureInPictureEnabledChange()},i.handleClick=function(t){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()},e})(Pg);OAe.prototype.controlText_="Picture-in-Picture";Rr.registerComponent("PictureInPictureToggle",OAe);var DAe=(function(r){zr(e,r);function e(n,t){var o;return o=r.call(this,n,t)||this,o.on(n,"fullscreenchange",function(a){return o.handleFullscreenChange(a)}),Vr[n.fsApi_.fullscreenEnabled]===!1&&o.disable(),o}var i=e.prototype;return i.buildCSSClass=function(){return"vjs-fullscreen-control "+r.prototype.buildCSSClass.call(this)},i.handleFullscreenChange=function(t){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},i.handleClick=function(t){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},e})(Pg);DAe.prototype.controlText_="Fullscreen";Rr.registerComponent("FullscreenToggle",DAe);var NQe=function(e,i){i.tech_&&!i.tech_.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(i,"loadstart",function(){i.tech_.featuresVolumeControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")})},FQe=(function(r){zr(e,r);function e(){return r.apply(this,arguments)||this}var i=e.prototype;return i.createEl=function(){var t=r.prototype.createEl.call(this,"div",{className:"vjs-volume-level"});return t.appendChild(r.prototype.createEl.call(this,"span",{className:"vjs-control-text"})),t},e})(Rr);Rr.registerComponent("VolumeLevel",FQe);var jQe=(function(r){zr(e,r);function e(n,t){var o;return o=r.call(this,n,t)||this,o.update=eb(es(sn(o),o.update),Ag),o}var i=e.prototype;return i.createEl=function(){return r.prototype.createEl.call(this,"div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})},i.update=function(t,o,a,s){if(!a){var l=fM(this.el_),u=fM(this.player_.el()),c=t.width*o;if(!u||!l)return;var d=t.left-u.left+c,f=t.width-c+(u.right-t.right),h=l.width/2;d<h?h+=h-d:f<h&&(h=f),h<0?h=0:h>l.width&&(h=l.width),this.el_.style.right="-"+h+"px"}this.write(s+"%")},i.write=function(t){sO(this.el_,t)},i.updateVolume=function(t,o,a,s,l){var u=this;this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",function(){u.update(t,o,a,s.toFixed(0)),l&&l()})},e})(Rr);Rr.registerComponent("VolumeLevelTooltip",jQe);var RAe=(function(r){zr(e,r);function e(n,t){var o;return o=r.call(this,n,t)||this,o.update=eb(es(sn(o),o.update),Ag),o}var i=e.prototype;return i.createEl=function(){return r.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},i.update=function(t,o,a){var s=this,l=100*o;this.getChild("volumeLevelTooltip").updateVolume(t,o,a,l,function(){a?s.el_.style.bottom=t.height*o+"px":s.el_.style.left=t.width*o+"px"})},e})(Rr);RAe.prototype.options_={children:["volumeLevelTooltip"]};Rr.registerComponent("MouseVolumeLevelDisplay",RAe);var dz=(function(r){zr(e,r);function e(n,t){var o;return o=r.call(this,n,t)||this,o.on("slideractive",function(a){return o.updateLastVolume_(a)}),o.on(n,"volumechange",function(a){return o.updateARIAAttributes(a)}),n.ready(function(){return o.updateARIAAttributes()}),o}var i=e.prototype;return i.createEl=function(){return r.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},i.handleMouseDown=function(t){bF(t)&&r.prototype.handleMouseDown.call(this,t)},i.handleMouseMove=function(t){var o=this.getChild("mouseVolumeLevelDisplay");if(o){var a=this.el(),s=fM(a),l=this.vertical(),u=nz(a,t);u=l?u.y:u.x,u=cz(u,0,1),o.update(s,u,l)}bF(t)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(t)))},i.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},i.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},i.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},i.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},i.updateARIAAttributes=function(t){var o=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",o),this.el_.setAttribute("aria-valuetext",o+"%")},i.volumeAsPercentage_=function(){return Math.round(this.player_.volume()*100)},i.updateLastVolume_=function(){var t=this,o=this.player_.volume();this.one("sliderinactive",function(){t.player_.volume()===0&&t.player_.lastVolume_(o)})},e})(k9);dz.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"};!Hd&&!hb&&dz.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay");dz.prototype.playerEvent="volumechange";Rr.registerComponent("VolumeBar",dz);var MAe=(function(r){zr(e,r);function e(n,t){var o;return t===void 0&&(t={}),t.vertical=t.vertical||!1,(typeof t.volumeBar>"u"||vF(t.volumeBar))&&(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),o=r.call(this,n,t)||this,NQe(sn(o),n),o.throttledHandleMouseMove=eb(es(sn(o),o.handleMouseMove),Ag),o.handleMouseUpHandler_=function(a){return o.handleMouseUp(a)},o.on("mousedown",function(a){return o.handleMouseDown(a)}),o.on("touchstart",function(a){return o.handleMouseDown(a)}),o.on("mousemove",function(a){return o.handleMouseMove(a)}),o.on(o.volumeBar,["focus","slideractive"],function(){o.volumeBar.addClass("vjs-slider-active"),o.addClass("vjs-slider-active"),o.trigger("slideractive")}),o.on(o.volumeBar,["blur","sliderinactive"],function(){o.volumeBar.removeClass("vjs-slider-active"),o.removeClass("vjs-slider-active"),o.trigger("sliderinactive")}),o}var i=e.prototype;return i.createEl=function(){var t="vjs-volume-horizontal";return this.options_.vertical&&(t="vjs-volume-vertical"),r.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+t})},i.handleMouseDown=function(t){var o=this.el_.ownerDocument;this.on(o,"mousemove",this.throttledHandleMouseMove),this.on(o,"touchmove",this.throttledHandleMouseMove),this.on(o,"mouseup",this.handleMouseUpHandler_),this.on(o,"touchend",this.handleMouseUpHandler_)},i.handleMouseUp=function(t){var o=this.el_.ownerDocument;this.off(o,"mousemove",this.throttledHandleMouseMove),this.off(o,"touchmove",this.throttledHandleMouseMove),this.off(o,"mouseup",this.handleMouseUpHandler_),this.off(o,"touchend",this.handleMouseUpHandler_)},i.handleMouseMove=function(t){this.volumeBar.handleMouseMove(t)},e})(Rr);MAe.prototype.options_={children:["volumeBar"]};Rr.registerComponent("VolumeControl",MAe);var BQe=function(e,i){i.tech_&&!i.tech_.featuresMuteControl&&e.addClass("vjs-hidden"),e.on(i,"loadstart",function(){i.tech_.featuresMuteControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")})},LAe=(function(r){zr(e,r);function e(n,t){var o;return o=r.call(this,n,t)||this,BQe(sn(o),n),o.on(n,["loadstart","volumechange"],function(a){return o.update(a)}),o}var i=e.prototype;return i.buildCSSClass=function(){return"vjs-mute-control "+r.prototype.buildCSSClass.call(this)},i.handleClick=function(t){var o=this.player_.volume(),a=this.player_.lastVolume_();if(o===0){var s=a<.1?.1:a;this.player_.volume(s),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},i.update=function(t){this.updateIcon_(),this.updateControlText_()},i.updateIcon_=function(){var t=this.player_.volume(),o=3;Hd&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),t===0||this.player_.muted()?o=0:t<.33?o=1:t<.67&&(o=2);for(var a=0;a<4;a++)mj(this.el_,"vjs-vol-"+a);z0(this.el_,"vjs-vol-"+o)},i.updateControlText_=function(){var t=this.player_.muted()||this.player_.volume()===0,o=t?"Unmute":"Mute";this.controlText()!==o&&this.controlText(o)},e})(Pg);LAe.prototype.controlText_="Mute";Rr.registerComponent("MuteToggle",LAe);var kAe=(function(r){zr(e,r);function e(n,t){var o;return t===void 0&&(t={}),typeof t.inline<"u"?t.inline=t.inline:t.inline=!0,(typeof t.volumeControl>"u"||vF(t.volumeControl))&&(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),o=r.call(this,n,t)||this,o.handleKeyPressHandler_=function(a){return o.handleKeyPress(a)},o.on(n,["loadstart"],function(a){return o.volumePanelState_(a)}),o.on(o.muteToggle,"keyup",function(a){return o.handleKeyPress(a)}),o.on(o.volumeControl,"keyup",function(a){return o.handleVolumeControlKeyUp(a)}),o.on("keydown",function(a){return o.handleKeyPress(a)}),o.on("mouseover",function(a){return o.handleMouseOver(a)}),o.on("mouseout",function(a){return o.handleMouseOut(a)}),o.on(o.volumeControl,["slideractive"],o.sliderActive_),o.on(o.volumeControl,["sliderinactive"],o.sliderInactive_),o}var i=e.prototype;return i.sliderActive_=function(){this.addClass("vjs-slider-active")},i.sliderInactive_=function(){this.removeClass("vjs-slider-active")},i.volumePanelState_=function(){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")},i.createEl=function(){var t="vjs-volume-panel-horizontal";return this.options_.inline||(t="vjs-volume-panel-vertical"),r.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+t})},i.dispose=function(){this.handleMouseOut(),r.prototype.dispose.call(this)},i.handleVolumeControlKeyUp=function(t){gn.isEventKey(t,"Esc")&&this.muteToggle.focus()},i.handleMouseOver=function(t){this.addClass("vjs-hover"),Ah(Vr,"keyup",this.handleKeyPressHandler_)},i.handleMouseOut=function(t){this.removeClass("vjs-hover"),Yc(Vr,"keyup",this.handleKeyPressHandler_)},i.handleKeyPress=function(t){gn.isEventKey(t,"Esc")&&this.handleMouseOut()},e})(Rr);kAe.prototype.options_={children:["muteToggle","volumeControl"]};Rr.registerComponent("VolumePanel",kAe);var IAe=(function(r){zr(e,r);function e(n,t){var o;return o=r.call(this,n,t)||this,t&&(o.menuButton_=t.menuButton),o.focusedChild_=-1,o.on("keydown",function(a){return o.handleKeyDown(a)}),o.boundHandleBlur_=function(a){return o.handleBlur(a)},o.boundHandleTapClick_=function(a){return o.handleTapClick(a)},o}var i=e.prototype;return i.addEventListenerForItem=function(t){t instanceof Rr&&(this.on(t,"blur",this.boundHandleBlur_),this.on(t,["tap","click"],this.boundHandleTapClick_))},i.removeEventListenerForItem=function(t){t instanceof Rr&&(this.off(t,"blur",this.boundHandleBlur_),this.off(t,["tap","click"],this.boundHandleTapClick_))},i.removeChild=function(t){typeof t=="string"&&(t=this.getChild(t)),this.removeEventListenerForItem(t),r.prototype.removeChild.call(this,t)},i.addItem=function(t){var o=this.addChild(t);o&&this.addEventListenerForItem(o)},i.createEl=function(){var t=this.options_.contentElType||"ul";this.contentEl_=mo(t,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var o=r.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return o.appendChild(this.contentEl_),Ah(o,"click",function(a){a.preventDefault(),a.stopImmediatePropagation()}),o},i.dispose=function(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,r.prototype.dispose.call(this)},i.handleBlur=function(t){var o=t.relatedTarget||Vr.activeElement;if(!this.children().some(function(s){return s.el()===o})){var a=this.menuButton_;a&&a.buttonPressed_&&o!==a.el().firstChild&&a.unpressButton()}},i.handleTapClick=function(t){if(this.menuButton_){this.menuButton_.unpressButton();var o=this.children();if(!Array.isArray(o))return;var a=o.filter(function(s){return s.el()===t.target})[0];if(!a)return;a.name()!=="CaptionSettingsMenuItem"&&this.menuButton_.focus()}},i.handleKeyDown=function(t){gn.isEventKey(t,"Left")||gn.isEventKey(t,"Down")?(t.preventDefault(),t.stopPropagation(),this.stepForward()):(gn.isEventKey(t,"Right")||gn.isEventKey(t,"Up"))&&(t.preventDefault(),t.stopPropagation(),this.stepBack())},i.stepForward=function(){var t=0;this.focusedChild_!==void 0&&(t=this.focusedChild_+1),this.focus(t)},i.stepBack=function(){var t=0;this.focusedChild_!==void 0&&(t=this.focusedChild_-1),this.focus(t)},i.focus=function(t){t===void 0&&(t=0);var o=this.children().slice(),a=o.length&&o[0].hasClass("vjs-menu-title");a&&o.shift(),o.length>0&&(t<0?t=0:t>=o.length&&(t=o.length-1),this.focusedChild_=t,o[t].el_.focus())},e})(Rr);Rr.registerComponent("Menu",IAe);var F9=(function(r){zr(e,r);function e(n,t){var o;t===void 0&&(t={}),o=r.call(this,n,t)||this,o.menuButton_=new Pg(n,t),o.menuButton_.controlText(o.controlText_),o.menuButton_.el_.setAttribute("aria-haspopup","true");var a=Pg.prototype.buildCSSClass();o.menuButton_.el_.className=o.buildCSSClass()+" "+a,o.menuButton_.removeClass("vjs-control"),o.addChild(o.menuButton_),o.update(),o.enabled_=!0;var s=function(u){return o.handleClick(u)};return o.handleMenuKeyUp_=function(l){return o.handleMenuKeyUp(l)},o.on(o.menuButton_,"tap",s),o.on(o.menuButton_,"click",s),o.on(o.menuButton_,"keydown",function(l){return o.handleKeyDown(l)}),o.on(o.menuButton_,"mouseenter",function(){o.addClass("vjs-hover"),o.menu.show(),Ah(Vr,"keyup",o.handleMenuKeyUp_)}),o.on("mouseleave",function(l){return o.handleMouseLeave(l)}),o.on("keydown",function(l){return o.handleSubmenuKeyDown(l)}),o}var i=e.prototype;return i.update=function(){var t=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=t,this.addChild(t),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"))},i.createMenu=function(){var t=new IAe(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var o=mo("li",{className:"vjs-menu-title",textContent:dl(this.options_.title),tabIndex:-1}),a=new Rr(this.player_,{el:o});t.addItem(a)}if(this.items=this.createItems(),this.items)for(var s=0;s<this.items.length;s++)t.addItem(this.items[s]);return t},i.createItems=function(){},i.createEl=function(){return r.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},i.buildWrapperCSSClass=function(){var t="vjs-menu-button";this.options_.inline===!0?t+="-inline":t+="-popup";var o=Pg.prototype.buildCSSClass();return"vjs-menu-button "+t+" "+o+" "+r.prototype.buildCSSClass.call(this)},i.buildCSSClass=function(){var t="vjs-menu-button";return this.options_.inline===!0?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+r.prototype.buildCSSClass.call(this)},i.controlText=function(t,o){return o===void 0&&(o=this.menuButton_.el()),this.menuButton_.controlText(t,o)},i.dispose=function(){this.handleMouseLeave(),r.prototype.dispose.call(this)},i.handleClick=function(t){this.buttonPressed_?this.unpressButton():this.pressButton()},i.handleMouseLeave=function(t){this.removeClass("vjs-hover"),Yc(Vr,"keyup",this.handleMenuKeyUp_)},i.focus=function(){this.menuButton_.focus()},i.blur=function(){this.menuButton_.blur()},i.handleKeyDown=function(t){gn.isEventKey(t,"Esc")||gn.isEventKey(t,"Tab")?(this.buttonPressed_&&this.unpressButton(),gn.isEventKey(t,"Tab")||(t.preventDefault(),this.menuButton_.focus())):(gn.isEventKey(t,"Up")||gn.isEventKey(t,"Down"))&&(this.buttonPressed_||(t.preventDefault(),this.pressButton()))},i.handleMenuKeyUp=function(t){(gn.isEventKey(t,"Esc")||gn.isEventKey(t,"Tab"))&&this.removeClass("vjs-hover")},i.handleSubmenuKeyPress=function(t){this.handleSubmenuKeyDown(t)},i.handleSubmenuKeyDown=function(t){(gn.isEventKey(t,"Esc")||gn.isEventKey(t,"Tab"))&&(this.buttonPressed_&&this.unpressButton(),gn.isEventKey(t,"Tab")||(t.preventDefault(),this.menuButton_.focus()))},i.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),Hd&&KEe())return;this.menu.focus()}},i.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},i.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},i.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},e})(Rr);Rr.registerComponent("MenuButton",F9);var j9=(function(r){zr(e,r);function e(i,n){var t,o=n.tracks;if(t=r.call(this,i,n)||this,t.items.length<=1&&t.hide(),!o)return sn(t);var a=es(sn(t),t.update);return o.addEventListener("removetrack",a),o.addEventListener("addtrack",a),o.addEventListener("labelchange",a),t.player_.on("ready",a),t.player_.on("dispose",function(){o.removeEventListener("removetrack",a),o.removeEventListener("addtrack",a),o.removeEventListener("labelchange",a)}),t}return e})(F9);Rr.registerComponent("TrackButton",j9);var VQe=["Tab","Esc","Up","Down","Right","Left"],Sj=(function(r){zr(e,r);function e(n,t){var o;return o=r.call(this,n,t)||this,o.selectable=t.selectable,o.isSelected_=t.selected||!1,o.multiSelectable=t.multiSelectable,o.selected(o.isSelected_),o.selectable?o.multiSelectable?o.el_.setAttribute("role","menuitemcheckbox"):o.el_.setAttribute("role","menuitemradio"):o.el_.setAttribute("role","menuitem"),o}var i=e.prototype;return i.createEl=function(t,o,a){this.nonIconControl=!0;var s=r.prototype.createEl.call(this,"li",Ks({className:"vjs-menu-item",tabIndex:-1},o),a);return s.replaceChild(mo("span",{className:"vjs-menu-item-text",textContent:this.localize(this.options_.label)}),s.querySelector(".vjs-icon-placeholder")),s},i.handleKeyDown=function(t){VQe.some(function(o){return gn.isEventKey(t,o)})||r.prototype.handleKeyDown.call(this,t)},i.handleClick=function(t){this.selected(!0)},i.selected=function(t){this.selectable&&(t?(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))},e})(uz);Rr.registerComponent("MenuItem",Sj);var _j=(function(r){zr(e,r);function e(n,t){var o,a=t.track,s=n.textTracks();t.label=a.label||a.language||"Unknown",t.selected=a.mode==="showing",o=r.call(this,n,t)||this,o.track=a,o.kinds=(t.kinds||[t.kind||o.track.kind]).filter(Boolean);var l=function(){for(var f=arguments.length,h=new Array(f),p=0;p<f;p++)h[p]=arguments[p];o.handleTracksChange.apply(sn(o),h)},u=function(){for(var f=arguments.length,h=new Array(f),p=0;p<f;p++)h[p]=arguments[p];o.handleSelectedLanguageChange.apply(sn(o),h)};if(n.on(["loadstart","texttrackchange"],l),s.addEventListener("change",l),s.addEventListener("selectedlanguagechange",u),o.on("dispose",function(){n.off(["loadstart","texttrackchange"],l),s.removeEventListener("change",l),s.removeEventListener("selectedlanguagechange",u)}),s.onchange===void 0){var c;o.on(["tap","click"],function(){if(typeof bt.Event!="object")try{c=new bt.Event("change")}catch{}c||(c=Vr.createEvent("Event"),c.initEvent("change",!0,!0)),s.dispatchEvent(c)})}return o.handleTracksChange(),o}var i=e.prototype;return i.handleClick=function(t){var o=this.track,a=this.player_.textTracks();if(r.prototype.handleClick.call(this,t),!!a)for(var s=0;s<a.length;s++){var l=a[s];this.kinds.indexOf(l.kind)!==-1&&(l===o?l.mode!=="showing"&&(l.mode="showing"):l.mode!=="disabled"&&(l.mode="disabled"))}},i.handleTracksChange=function(t){var o=this.track.mode==="showing";o!==this.isSelected_&&this.selected(o)},i.handleSelectedLanguageChange=function(t){if(this.track.mode==="showing"){var o=this.player_.cache_.selectedLanguage;if(o&&o.enabled&&o.language===this.track.language&&o.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},i.dispose=function(){this.track=null,r.prototype.dispose.call(this)},e})(Sj);Rr.registerComponent("TextTrackMenuItem",_j);var NAe=(function(r){zr(e,r);function e(n,t){return t.track={player:n,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,r.call(this,n,t)||this}var i=e.prototype;return i.handleTracksChange=function(t){for(var o=this.player().textTracks(),a=!0,s=0,l=o.length;s<l;s++){var u=o[s];if(this.options_.kinds.indexOf(u.kind)>-1&&u.mode==="showing"){a=!1;break}}a!==this.isSelected_&&this.selected(a)},i.handleSelectedLanguageChange=function(t){for(var o=this.player().textTracks(),a=!0,s=0,l=o.length;s<l;s++){var u=o[s];if(["captions","descriptions","subtitles"].indexOf(u.kind)>-1&&u.mode==="showing"){a=!1;break}}a&&(this.player_.cache_.selectedLanguage={enabled:!1})},e})(_j);Rr.registerComponent("OffTextTrackMenuItem",NAe);var ZM=(function(r){zr(e,r);function e(n,t){return t===void 0&&(t={}),t.tracks=n.textTracks(),r.call(this,n,t)||this}var i=e.prototype;return i.createItems=function(t,o){t===void 0&&(t=[]),o===void 0&&(o=_j);var a;this.label_&&(a=this.label_+" off"),t.push(new NAe(this.player_,{kinds:this.kinds_,kind:this.kind_,label:a})),this.hideThreshold_+=1;var s=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var l=0;l<s.length;l++){var u=s[l];if(this.kinds_.indexOf(u.kind)>-1){var c=new o(this.player_,{track:u,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});c.addClass("vjs-"+u.kind+"-menu-item"),t.push(c)}}return t},e})(j9);Rr.registerComponent("TextTrackButton",ZM);var FAe=(function(r){zr(e,r);function e(n,t){var o,a=t.track,s=t.cue,l=n.currentTime();return t.selectable=!0,t.multiSelectable=!1,t.label=s.text,t.selected=s.startTime<=l&&l<s.endTime,o=r.call(this,n,t)||this,o.track=a,o.cue=s,o}var i=e.prototype;return i.handleClick=function(t){r.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime)},e})(Sj);Rr.registerComponent("ChaptersTrackMenuItem",FAe);var B9=(function(r){zr(e,r);function e(n,t,o){var a;return a=r.call(this,n,t,o)||this,a.selectCurrentItem_=function(){a.items.forEach(function(s){s.selected(a.track_.activeCues[0]===s.cue)})},a}var i=e.prototype;return i.buildCSSClass=function(){return"vjs-chapters-button "+r.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-chapters-button "+r.prototype.buildWrapperCSSClass.call(this)},i.update=function(t){if(!(t&&t.track&&t.track.kind!=="chapters")){var o=this.findChaptersTrack();o!==this.track_?(this.setTrack(o),r.prototype.update.call(this)):(!this.items||o&&o.cues&&o.cues.length!==this.items.length)&&r.prototype.update.call(this)}},i.setTrack=function(t){if(this.track_!==t){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var o=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);o&&o.removeEventListener("load",this.updateHandler_),this.track_.removeEventListener("cuechange",this.selectCurrentItem_),this.track_=null}if(this.track_=t,this.track_){this.track_.mode="hidden";var a=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);a&&a.addEventListener("load",this.updateHandler_),this.track_.addEventListener("cuechange",this.selectCurrentItem_)}}},i.findChaptersTrack=function(){for(var t=this.player_.textTracks()||[],o=t.length-1;o>=0;o--){var a=t[o];if(a.kind===this.kind_)return a}},i.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(dl(this.kind_))},i.createMenu=function(){return this.options_.title=this.getMenuCaption(),r.prototype.createMenu.call(this)},i.createItems=function(){var t=[];if(!this.track_)return t;var o=this.track_.cues;if(!o)return t;for(var a=0,s=o.length;a<s;a++){var l=o[a],u=new FAe(this.player_,{track:this.track_,cue:l});t.push(u)}return t},e})(ZM);B9.prototype.kind_="chapters";B9.prototype.controlText_="Chapters";Rr.registerComponent("ChaptersButton",B9);var V9=(function(r){zr(e,r);function e(n,t,o){var a;a=r.call(this,n,t,o)||this;var s=n.textTracks(),l=es(sn(a),a.handleTracksChange);return s.addEventListener("change",l),a.on("dispose",function(){s.removeEventListener("change",l)}),a}var i=e.prototype;return i.handleTracksChange=function(t){for(var o=this.player().textTracks(),a=!1,s=0,l=o.length;s<l;s++){var u=o[s];if(u.kind!==this.kind_&&u.mode==="showing"){a=!0;break}}a?this.disable():this.enable()},i.buildCSSClass=function(){return"vjs-descriptions-button "+r.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+r.prototype.buildWrapperCSSClass.call(this)},e})(ZM);V9.prototype.kind_="descriptions";V9.prototype.controlText_="Descriptions";Rr.registerComponent("DescriptionsButton",V9);var H9=(function(r){zr(e,r);function e(n,t,o){return r.call(this,n,t,o)||this}var i=e.prototype;return i.buildCSSClass=function(){return"vjs-subtitles-button "+r.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+r.prototype.buildWrapperCSSClass.call(this)},e})(ZM);H9.prototype.kind_="subtitles";H9.prototype.controlText_="Subtitles";Rr.registerComponent("SubtitlesButton",H9);var U9=(function(r){zr(e,r);function e(n,t){var o;return t.track={player:n,kind:t.kind,label:t.kind+" settings",selectable:!1,default:!1,mode:"disabled"},t.selectable=!1,t.name="CaptionSettingsMenuItem",o=r.call(this,n,t)||this,o.addClass("vjs-texttrack-settings"),o.controlText(", opens "+t.kind+" settings dialog"),o}var i=e.prototype;return i.handleClick=function(t){this.player().getChild("textTrackSettings").open()},e})(_j);Rr.registerComponent("CaptionSettingsMenuItem",U9);var z9=(function(r){zr(e,r);function e(n,t,o){return r.call(this,n,t,o)||this}var i=e.prototype;return i.buildCSSClass=function(){return"vjs-captions-button "+r.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-captions-button "+r.prototype.buildWrapperCSSClass.call(this)},i.createItems=function(){var t=[];return!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")&&(t.push(new U9(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),r.prototype.createItems.call(this,t)},e})(ZM);z9.prototype.kind_="captions";z9.prototype.controlText_="Captions";Rr.registerComponent("CaptionsButton",z9);var jAe=(function(r){zr(e,r);function e(){return r.apply(this,arguments)||this}var i=e.prototype;return i.createEl=function(t,o,a){var s=r.prototype.createEl.call(this,t,o,a),l=s.querySelector(".vjs-menu-item-text");return this.options_.track.kind==="captions"&&(l.appendChild(mo("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),l.appendChild(mo("span",{className:"vjs-control-text",textContent:" "+this.localize("Captions")}))),s},e})(_j);Rr.registerComponent("SubsCapsMenuItem",jAe);var W9=(function(r){zr(e,r);function e(n,t){var o;return t===void 0&&(t={}),o=r.call(this,n,t)||this,o.label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(o.player_.language_)>-1&&(o.label_="captions"),o.menuButton_.controlText(dl(o.label_)),o}var i=e.prototype;return i.buildCSSClass=function(){return"vjs-subs-caps-button "+r.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+r.prototype.buildWrapperCSSClass.call(this)},i.createItems=function(){var t=[];return!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")&&(t.push(new U9(this.player_,{kind:this.label_})),this.hideThreshold_+=1),t=r.prototype.createItems.call(this,t,jAe),t},e})(ZM);W9.prototype.kinds_=["captions","subtitles"];W9.prototype.controlText_="Subtitles";Rr.registerComponent("SubsCapsButton",W9);var BAe=(function(r){zr(e,r);function e(n,t){var o,a=t.track,s=n.audioTracks();t.label=a.label||a.language||"Unknown",t.selected=a.enabled,o=r.call(this,n,t)||this,o.track=a,o.addClass("vjs-"+a.kind+"-menu-item");var l=function(){for(var c=arguments.length,d=new Array(c),f=0;f<c;f++)d[f]=arguments[f];o.handleTracksChange.apply(sn(o),d)};return s.addEventListener("change",l),o.on("dispose",function(){s.removeEventListener("change",l)}),o}var i=e.prototype;return i.createEl=function(t,o,a){var s=r.prototype.createEl.call(this,t,o,a),l=s.querySelector(".vjs-menu-item-text");return this.options_.track.kind==="main-desc"&&(l.appendChild(mo("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),l.appendChild(mo("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))),s},i.handleClick=function(t){if(r.prototype.handleClick.call(this,t),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks)for(var o=this.player_.audioTracks(),a=0;a<o.length;a++){var s=o[a];s!==this.track&&(s.enabled=s===this.track)}},i.handleTracksChange=function(t){this.selected(this.track.enabled)},e})(Sj);Rr.registerComponent("AudioTrackMenuItem",BAe);var VAe=(function(r){zr(e,r);function e(n,t){return t===void 0&&(t={}),t.tracks=n.audioTracks(),r.call(this,n,t)||this}var i=e.prototype;return i.buildCSSClass=function(){return"vjs-audio-button "+r.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-audio-button "+r.prototype.buildWrapperCSSClass.call(this)},i.createItems=function(t){t===void 0&&(t=[]),this.hideThreshold_=1;for(var o=this.player_.audioTracks(),a=0;a<o.length;a++){var s=o[a];t.push(new BAe(this.player_,{track:s,selectable:!0,multiSelectable:!1}))}return t},e})(j9);VAe.prototype.controlText_="Audio Track";Rr.registerComponent("AudioTrackButton",VAe);var G9=(function(r){zr(e,r);function e(n,t){var o,a=t.rate,s=parseFloat(a,10);return t.label=a,t.selected=s===n.playbackRate(),t.selectable=!0,t.multiSelectable=!1,o=r.call(this,n,t)||this,o.label=a,o.rate=s,o.on(n,"ratechange",function(l){return o.update(l)}),o}var i=e.prototype;return i.handleClick=function(t){r.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},i.update=function(t){this.selected(this.player().playbackRate()===this.rate)},e})(Sj);G9.prototype.contentElType="button";Rr.registerComponent("PlaybackRateMenuItem",G9);var HAe=(function(r){zr(e,r);function e(n,t){var o;return o=r.call(this,n,t)||this,o.menuButton_.el_.setAttribute("aria-describedby",o.labelElId_),o.updateVisibility(),o.updateLabel(),o.on(n,"loadstart",function(a){return o.updateVisibility(a)}),o.on(n,"ratechange",function(a){return o.updateLabel(a)}),o.on(n,"playbackrateschange",function(a){return o.handlePlaybackRateschange(a)}),o}var i=e.prototype;return i.createEl=function(){var t=r.prototype.createEl.call(this);return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=mo("div",{className:"vjs-playback-rate-value",id:this.labelElId_,textContent:"1x"}),t.appendChild(this.labelEl_),t},i.dispose=function(){this.labelEl_=null,r.prototype.dispose.call(this)},i.buildCSSClass=function(){return"vjs-playback-rate "+r.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-playback-rate "+r.prototype.buildWrapperCSSClass.call(this)},i.createItems=function(){for(var t=this.playbackRates(),o=[],a=t.length-1;a>=0;a--)o.push(new G9(this.player(),{rate:t[a]+"x"}));return o},i.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},i.handleClick=function(t){var o=this.player().playbackRate(),a=this.playbackRates(),s=a.indexOf(o),l=(s+1)%a.length;this.player().playbackRate(a[l])},i.handlePlaybackRateschange=function(t){this.update()},i.playbackRates=function(){var t=this.player();return t.playbackRates&&t.playbackRates()||[]},i.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},i.updateVisibility=function(t){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},i.updateLabel=function(t){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x")},e})(F9);HAe.prototype.controlText_="Playback Rate";Rr.registerComponent("PlaybackRateMenuButton",HAe);var UAe=(function(r){zr(e,r);function e(){return r.apply(this,arguments)||this}var i=e.prototype;return i.buildCSSClass=function(){return"vjs-spacer "+r.prototype.buildCSSClass.call(this)},i.createEl=function(t,o,a){return t===void 0&&(t="div"),o===void 0&&(o={}),a===void 0&&(a={}),o.className||(o.className=this.buildCSSClass()),r.prototype.createEl.call(this,t,o,a)},e})(Rr);Rr.registerComponent("Spacer",UAe);var HQe=(function(r){zr(e,r);function e(){return r.apply(this,arguments)||this}var i=e.prototype;return i.buildCSSClass=function(){return"vjs-custom-control-spacer "+r.prototype.buildCSSClass.call(this)},i.createEl=function(){return r.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),textContent:" "})},e})(UAe);Rr.registerComponent("CustomControlSpacer",HQe);var A3=(function(r){zr(e,r);function e(){return r.apply(this,arguments)||this}var i=e.prototype;return i.createEl=function(){return r.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},e})(Rr);A3.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]};"exitPictureInPicture"in Vr&&A3.prototype.options_.children.splice(A3.prototype.options_.children.length-1,0,"pictureInPictureToggle");Rr.registerComponent("ControlBar",A3);var zAe=(function(r){zr(e,r);function e(n,t){var o;return o=r.call(this,n,t)||this,o.on(n,"error",function(a){return o.open(a)}),o}var i=e.prototype;return i.buildCSSClass=function(){return"vjs-error-display "+r.prototype.buildCSSClass.call(this)},i.content=function(){var t=this.player().error();return t?this.localize(t.message):""},e})(qM);zAe.prototype.options_=wn({},qM.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0});Rr.registerComponent("ErrorDisplay",zAe);var YG="vjs-text-track-settings",Kfe=["#000","Black"],Zfe=["#00F","Blue"],Jfe=["#0FF","Cyan"],Qfe=["#0F0","Green"],ehe=["#F0F","Magenta"],the=["#F00","Red"],rhe=["#FFF","White"],ihe=["#FF0","Yellow"],$G=["1","Opaque"],qG=["0.5","Semi-Transparent"],nhe=["0","Transparent"],zw={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[Kfe,rhe,the,Qfe,Zfe,ihe,ehe,Jfe]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[$G,qG,nhe]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[rhe,Kfe,the,Qfe,Zfe,ihe,ehe,Jfe]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",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:"captions-font-size-%s",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:function(e){return e==="1.00"?null:Number(e)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[$G,qG]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[nhe,qG,$G]}};zw.windowColor.options=zw.backgroundColor.options;function WAe(r,e){if(e&&(r=e(r)),r&&r!=="none")return r}function UQe(r,e){var i=r.options[r.options.selectedIndex].value;return WAe(i,e)}function zQe(r,e,i){if(e){for(var n=0;n<r.options.length;n++)if(WAe(r.options[n].value,i)===e){r.selectedIndex=n;break}}}var WQe=(function(r){zr(e,r);function e(n,t){var o;return t.temporary=!1,o=r.call(this,n,t)||this,o.updateDisplay=o.updateDisplay.bind(sn(o)),o.fill(),o.hasBeenOpened_=o.hasBeenFilled_=!0,o.endDialog=mo("p",{className:"vjs-control-text",textContent:o.localize("End of dialog window.")}),o.el().appendChild(o.endDialog),o.setDefaults(),t.persistTextTrackSettings===void 0&&(o.options_.persistTextTrackSettings=o.options_.playerOptions.persistTextTrackSettings),o.on(o.$(".vjs-done-button"),"click",function(){o.saveSettings(),o.close()}),o.on(o.$(".vjs-default-button"),"click",function(){o.setDefaults(),o.updateDisplay()}),xR(zw,function(a){o.on(o.$(a.selector),"change",o.updateDisplay)}),o.options_.persistTextTrackSettings&&o.restoreSettings(),o}var i=e.prototype;return i.dispose=function(){this.endDialog=null,r.prototype.dispose.call(this)},i.createElSelect_=function(t,o,a){var s=this;o===void 0&&(o=""),a===void 0&&(a="label");var l=zw[t],u=l.id.replace("%s",this.id_),c=[o,u].join(" ").trim();return["<"+a+' id="'+u+'" class="'+(a==="label"?"vjs-label":"")+'">',this.localize(l.label),"</"+a+">",'<select aria-labelledby="'+c+'">'].concat(l.options.map(function(d){var f=u+"-"+d[1].replace(/\W+/g,"");return['<option id="'+f+'" value="'+d[0]+'" ','aria-labelledby="'+c+" "+f+'">',s.localize(d[1]),"</option>"].join("")})).concat("</select>").join("")},i.createElFgColor_=function(){var t="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",t),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",t),"</span>","</fieldset>"].join("")},i.createElBgColor_=function(){var t="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",t),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",t),"</span>","</fieldset>"].join("")},i.createElWinColor_=function(){var t="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",t),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",t),"</span>","</fieldset>"].join("")},i.createElColors_=function(){return mo("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},i.createElFont_=function(){return mo("div",{className:"vjs-track-settings-font",innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),"</fieldset>",'<fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle","","legend"),"</fieldset>",'<fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"</fieldset>"].join("")})},i.createElControls_=function(){var t=this.localize("restore all settings to the default values");return mo("div",{className:"vjs-track-settings-controls",innerHTML:['<button type="button" class="vjs-default-button" title="'+t+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+t+"</span>","</button>",'<button type="button" class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})},i.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},i.label=function(){return this.localize("Caption Settings Dialog")},i.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},i.buildCSSClass=function(){return r.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},i.getValues=function(){var t=this;return MJe(zw,function(o,a,s){var l=UQe(t.$(a.selector),a.parser);return l!==void 0&&(o[s]=l),o},{})},i.setValues=function(t){var o=this;xR(zw,function(a,s){zQe(o.$(a.selector),t[s],a.parser)})},i.setDefaults=function(){var t=this;xR(zw,function(o){var a=o.hasOwnProperty("default")?o.default:0;t.$(o.selector).selectedIndex=a})},i.restoreSettings=function(){var t;try{t=JSON.parse(bt.localStorage.getItem(YG))}catch(o){Ln.warn(o)}t&&this.setValues(t)},i.saveSettings=function(){if(this.options_.persistTextTrackSettings){var t=this.getValues();try{Object.keys(t).length?bt.localStorage.setItem(YG,JSON.stringify(t)):bt.localStorage.removeItem(YG)}catch(o){Ln.warn(o)}}},i.updateDisplay=function(){var t=this.player_.getChild("textTrackDisplay");t&&t.updateDisplay()},i.conditionalBlur_=function(){this.previouslyActiveEl_=null;var t=this.player_.controlBar,o=t&&t.subsCapsButton,a=t&&t.captionsButton;o?o.focus():a&&a.focus()},e})(qM);Rr.registerComponent("TextTrackSettings",WQe);var GQe=(function(r){zr(e,r);function e(n,t){var o,a=t.ResizeObserver||bt.ResizeObserver;t.ResizeObserver===null&&(a=!1);var s=Qa({createEl:!a,reportTouchActivity:!1},t);return o=r.call(this,n,s)||this,o.ResizeObserver=t.ResizeObserver||bt.ResizeObserver,o.loadListener_=null,o.resizeObserver_=null,o.debouncedHandler_=zJe(function(){o.resizeHandler()},100,!1,sn(o)),a?(o.resizeObserver_=new o.ResizeObserver(o.debouncedHandler_),o.resizeObserver_.observe(n.el())):(o.loadListener_=function(){if(!(!o.el_||!o.el_.contentWindow)){var l=o.debouncedHandler_,u=o.unloadListener_=function(){Yc(this,"resize",l),Yc(this,"unload",u),u=null};Ah(o.el_.contentWindow,"unload",u),Ah(o.el_.contentWindow,"resize",l)}},o.one("load",o.loadListener_)),o}var i=e.prototype;return i.createEl=function(){return r.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager",tabIndex:-1,title:this.localize("No content")},{"aria-hidden":"true"})},i.resizeHandler=function(){!this.player_||!this.player_.trigger||this.player_.trigger("playerresize")},i.dispose=function(){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,r.prototype.dispose.call(this)},e})(Rr);Rr.registerComponent("ResizeManager",GQe);var YQe={trackingThreshold:20,liveTolerance:15},$Qe=(function(r){zr(e,r);function e(n,t){var o,a=Qa(YQe,t,{createEl:!1});return o=r.call(this,n,a)||this,o.handleVisibilityChange_=function(s){return o.handleVisibilityChange(s)},o.trackLiveHandler_=function(){return o.trackLive_()},o.handlePlay_=function(s){return o.handlePlay(s)},o.handleFirstTimeupdate_=function(s){return o.handleFirstTimeupdate(s)},o.handleSeeked_=function(s){return o.handleSeeked(s)},o.seekToLiveEdge_=function(s){return o.seekToLiveEdge(s)},o.reset_(),o.on(o.player_,"durationchange",function(s){return o.handleDurationchange(s)}),o.on(o.player_,"canplay",function(){return o.toggleTracking()}),yj&&"hidden"in Vr&&"visibilityState"in Vr&&o.on(Vr,"visibilitychange",o.handleVisibilityChange_),o}var i=e.prototype;return i.handleVisibilityChange=function(){this.player_.duration()===1/0&&(Vr.hidden?this.stopTracking():this.startTracking())},i.trackLive_=function(){var t=this.player_.seekable();if(!(!t||!t.length)){var o=Number(bt.performance.now().toFixed(4)),a=this.lastTime_===-1?0:(o-this.lastTime_)/1e3;this.lastTime_=o,this.pastSeekEnd_=this.pastSeekEnd()+a;var s=this.liveCurrentTime(),l=this.player_.currentTime(),u=this.player_.paused()||this.seekedBehindLive_||Math.abs(s-l)>this.options_.liveTolerance;(!this.timeupdateSeen_||s===1/0)&&(u=!1),u!==this.behindLiveEdge_&&(this.behindLiveEdge_=u,this.trigger("liveedgechange"))}},i.handleDurationchange=function(){this.toggleTracking()},i.toggleTracking=function(){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())},i.startTracking=function(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,Ag),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_)))},i.handleFirstTimeupdate=function(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)},i.handleSeeked=function(){var t=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&t>2,this.nextSeekedFromUser_=!1,this.trackLive_()},i.handlePlay=function(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)},i.reset_=function(){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_)},i.nextSeekedFromUser=function(){this.nextSeekedFromUser_=!0},i.stopTracking=function(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))},i.seekableEnd=function(){for(var t=this.player_.seekable(),o=[],a=t?t.length:0;a--;)o.push(t.end(a));return o.length?o.sort()[o.length-1]:1/0},i.seekableStart=function(){for(var t=this.player_.seekable(),o=[],a=t?t.length:0;a--;)o.push(t.start(a));return o.length?o.sort()[0]:0},i.liveWindow=function(){var t=this.liveCurrentTime();return t===1/0?0:t-this.seekableStart()},i.isLive=function(){return this.isTracking()},i.atLiveEdge=function(){return!this.behindLiveEdge()},i.liveCurrentTime=function(){return this.pastSeekEnd()+this.seekableEnd()},i.pastSeekEnd=function(){var t=this.seekableEnd();return this.lastSeekEnd_!==-1&&t!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=t,this.pastSeekEnd_},i.behindLiveEdge=function(){return this.behindLiveEdge_},i.isTracking=function(){return typeof this.trackingInterval_=="number"},i.seekToLiveEdge=function(){this.seekedBehindLive_=!1,!this.atLiveEdge()&&(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))},i.dispose=function(){this.off(Vr,"visibilitychange",this.handleVisibilityChange_),this.stopTracking(),r.prototype.dispose.call(this)},e})(Rr);Rr.registerComponent("LiveTracker",$Qe);var v$=function(e){var i=e.el();if(i.hasAttribute("src"))return e.triggerSourceset(i.src),!0;var n=e.$$("source"),t=[],o="";if(!n.length)return!1;for(var a=0;a<n.length;a++){var s=n[a].src;s&&t.indexOf(s)===-1&&t.push(s)}return t.length?(t.length===1&&(o=t[0]),e.triggerSourceset(o),!0):!1},qQe=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(e){var i=Vr.createElement(this.nodeName.toLowerCase());i.innerHTML=e;for(var n=Vr.createDocumentFragment();i.childNodes.length;)n.appendChild(i.childNodes[0]);return this.innerText="",bt.Element.prototype.appendChild.call(this,n),this.innerHTML}}),GAe=function(e,i){for(var n={},t=0;t<e.length&&(n=Object.getOwnPropertyDescriptor(e[t],i),!(n&&n.set&&n.get));t++);return n.enumerable=!0,n.configurable=!0,n},XQe=function(e){return GAe([e.el(),bt.HTMLMediaElement.prototype,bt.Element.prototype,qQe],"innerHTML")},ohe=function(e){var i=e.el();if(!i.resetSourceWatch_){var n={},t=XQe(e),o=function(s){return function(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];var d=s.apply(i,u);return v$(e),d}};["append","appendChild","insertAdjacentHTML"].forEach(function(a){i[a]&&(n[a]=i[a],i[a]=o(n[a]))}),Object.defineProperty(i,"innerHTML",Qa(t,{set:o(t.set)})),i.resetSourceWatch_=function(){i.resetSourceWatch_=null,Object.keys(n).forEach(function(a){i[a]=n[a]}),Object.defineProperty(i,"innerHTML",t)},e.one("sourceset",i.resetSourceWatch_)}},KQe=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?mAe(bt.Element.prototype.getAttribute.call(this,"src")):""},set:function(e){return bt.Element.prototype.setAttribute.call(this,"src",e),e}}),ZQe=function(e){return GAe([e.el(),bt.HTMLMediaElement.prototype,KQe],"src")},JQe=function(e){if(e.featuresSourceset){var i=e.el();if(!i.resetSourceset_){var n=ZQe(e),t=i.setAttribute,o=i.load;Object.defineProperty(i,"src",Qa(n,{set:function(s){var l=n.set.call(i,s);return e.triggerSourceset(i.src),l}})),i.setAttribute=function(a,s){var l=t.call(i,a,s);return/src/i.test(a)&&e.triggerSourceset(i.src),l},i.load=function(){var a=o.call(i);return v$(e)||(e.triggerSourceset(""),ohe(e)),a},i.currentSrc?e.triggerSourceset(i.currentSrc):v$(e)||ohe(e),i.resetSourceset_=function(){i.resetSourceset_=null,i.load=o,i.setAttribute=t,Object.defineProperty(i,"src",n),i.resetSourceWatch_&&i.resetSourceWatch_()}}}},Y9=function(e,i,n,t){t===void 0&&(t=!0);var o=function(l){return Object.defineProperty(e,i,{value:l,enumerable:!0,writable:!0})},a={configurable:!0,enumerable:!0,get:function(){var l=n();return o(l),l}};return t&&(a.set=o),Object.defineProperty(e,i,a)},Zr=(function(r){zr(e,r);function e(n,t){var o;o=r.call(this,n,t)||this;var a=n.source,s=!1;if(o.featuresVideoFrameCallback=o.featuresVideoFrameCallback&&o.el_.tagName==="VIDEO",a&&(o.el_.currentSrc!==a.src||n.tag&&n.tag.initNetworkState_===3)?o.setSource(a):o.handleLateInit_(o.el_),n.enableSourceset&&o.setupSourcesetHandling_(),o.isScrubbing_=!1,o.el_.hasChildNodes()){for(var l=o.el_.childNodes,u=l.length,c=[];u--;){var d=l[u],f=d.nodeName.toLowerCase();f==="track"&&(o.featuresNativeTextTracks?(o.remoteTextTrackEls().addTrackElement_(d),o.remoteTextTracks().addTrack(d.track),o.textTracks().addTrack(d.track),!s&&!o.el_.hasAttribute("crossorigin")&&lz(d.src)&&(s=!0)):c.push(d))}for(var h=0;h<c.length;h++)o.el_.removeChild(c[h])}return o.proxyNativeTracks_(),o.featuresNativeTextTracks&&s&&Ln.warn(`Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.
This may prevent text tracks from loading.`),o.restoreMetadataTracksInIOSNativePlayer_(),(cM||_9||GEe)&&n.nativeControlsForTouch===!0&&o.setControls(!0),o.proxyWebkitFullscreen_(),o.triggerReady(),o}var i=e.prototype;return i.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),e.disposeMediaElement(this.el_),this.options_=null,r.prototype.dispose.call(this)},i.setupSourcesetHandling_=function(){JQe(this)},i.restoreMetadataTracksInIOSNativePlayer_=function(){var t=this.textTracks(),o,a=function(){o=[];for(var u=0;u<t.length;u++){var c=t[u];c.kind==="metadata"&&o.push({track:c,storedMode:c.mode})}};a(),t.addEventListener("change",a),this.on("dispose",function(){return t.removeEventListener("change",a)});var s=function l(){for(var u=0;u<o.length;u++){var c=o[u];c.track.mode==="disabled"&&c.track.mode!==c.storedMode&&(c.track.mode=c.storedMode)}t.removeEventListener("change",l)};this.on("webkitbeginfullscreen",function(){t.removeEventListener("change",a),t.removeEventListener("change",s),t.addEventListener("change",s)}),this.on("webkitendfullscreen",function(){t.removeEventListener("change",a),t.addEventListener("change",a),t.removeEventListener("change",s)})},i.overrideNative_=function(t,o){var a=this;if(o===this["featuresNative"+t+"Tracks"]){var s=t.toLowerCase();this[s+"TracksListeners_"]&&Object.keys(this[s+"TracksListeners_"]).forEach(function(l){var u=a.el()[s+"Tracks"];u.removeEventListener(l,a[s+"TracksListeners_"][l])}),this["featuresNative"+t+"Tracks"]=!o,this[s+"TracksListeners_"]=null,this.proxyNativeTracksForType_(s)}},i.overrideNativeAudioTracks=function(t){this.overrideNative_("Audio",t)},i.overrideNativeVideoTracks=function(t){this.overrideNative_("Video",t)},i.proxyNativeTracksForType_=function(t){var o=this,a=_p[t],s=this.el()[a.getterName],l=this[a.getterName]();if(!(!this["featuresNative"+a.capitalName+"Tracks"]||!s||!s.addEventListener)){var u={change:function(f){var h={type:"change",target:l,currentTarget:l,srcElement:l};l.trigger(h),t==="text"&&o[pM.remoteText.getterName]().trigger(h)},addtrack:function(f){l.addTrack(f.track)},removetrack:function(f){l.removeTrack(f.track)}},c=function(){for(var f=[],h=0;h<l.length;h++){for(var p=!1,g=0;g<s.length;g++)if(s[g]===l[h]){p=!0;break}p||f.push(l[h])}for(;f.length;)l.removeTrack(f.shift())};this[a.getterName+"Listeners_"]=u,Object.keys(u).forEach(function(d){var f=u[d];s.addEventListener(d,f),o.on("dispose",function(h){return s.removeEventListener(d,f)})}),this.on("loadstart",c),this.on("dispose",function(d){return o.off("loadstart",c)})}},i.proxyNativeTracks_=function(){var t=this;_p.names.forEach(function(o){t.proxyNativeTracksForType_(o)})},i.createEl=function(){var t=this.options_.tag;if(!t||!(this.options_.playerElIngest||this.movingMediaElementInDOM)){if(t){var o=t.cloneNode(!0);t.parentNode&&t.parentNode.insertBefore(o,t),e.disposeMediaElement(t),t=o}else{t=Vr.createElement("video");var a=this.options_.tag&&A0(this.options_.tag),s=Qa({},a);(!cM||this.options_.nativeControlsForTouch!==!0)&&delete s.controls,QEe(t,Ks(s,{id:this.options_.techId,class:"vjs-tech"}))}t.playerId=this.options_.playerId}typeof this.options_.preload<"u"&&dM(t,"preload",this.options_.preload),this.options_.disablePictureInPicture!==void 0&&(t.disablePictureInPicture=this.options_.disablePictureInPicture);for(var l=["loop","muted","playsinline","autoplay"],u=0;u<l.length;u++){var c=l[u],d=this.options_[c];typeof d<"u"&&(d?dM(t,c,c):iz(t,c),t[c]=d)}return t},i.handleLateInit_=function(t){if(!(t.networkState===0||t.networkState===3)){if(t.readyState===0){var o=!1,a=function(){o=!0};this.on("loadstart",a);var s=function(){o||this.trigger("loadstart")};this.on("loadedmetadata",s),this.ready(function(){this.off("loadstart",a),this.off("loadedmetadata",s),o||this.trigger("loadstart")});return}var l=["loadstart"];l.push("loadedmetadata"),t.readyState>=2&&l.push("loadeddata"),t.readyState>=3&&l.push("canplay"),t.readyState>=4&&l.push("canplaythrough"),this.ready(function(){l.forEach(function(u){this.trigger(u)},this)})}},i.setScrubbing=function(t){this.isScrubbing_=t},i.scrubbing=function(){return this.isScrubbing_},i.setCurrentTime=function(t){try{this.isScrubbing_&&this.el_.fastSeek&&rz?this.el_.fastSeek(t):this.el_.currentTime=t}catch(o){Ln(o,"Video is not ready. (Video.js)")}},i.duration=function(){var t=this;if(this.el_.duration===1/0&&hb&&pb&&this.el_.currentTime===0){var o=function a(){t.el_.currentTime>0&&(t.el_.duration===1/0&&t.trigger("durationchange"),t.off("timeupdate",a))};return this.on("timeupdate",o),NaN}return this.el_.duration||NaN},i.width=function(){return this.el_.offsetWidth},i.height=function(){return this.el_.offsetHeight},i.proxyWebkitFullscreen_=function(){var t=this;if("webkitDisplayingFullscreen"in this.el_){var o=function(){this.trigger("fullscreenchange",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},a=function(){"webkitPresentationMode"in this.el_&&this.el_.webkitPresentationMode!=="picture-in-picture"&&(this.one("webkitendfullscreen",o),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",a),this.on("dispose",function(){t.off("webkitbeginfullscreen",a),t.off("webkitendfullscreen",o)})}},i.supportsFullScreen=function(){if(typeof this.el_.webkitEnterFullScreen=="function"){var t=bt.navigator&&bt.navigator.userAgent||"";if(/Android/.test(t)||!/Chrome|Mac OS X 10.5/.test(t))return!0}return!1},i.enterFullScreen=function(){var t=this.el_;if(t.paused&&t.networkState<=t.HAVE_METADATA)kv(this.el_.play()),this.setTimeout(function(){t.pause();try{t.webkitEnterFullScreen()}catch(o){this.trigger("fullscreenerror",o)}},0);else try{t.webkitEnterFullScreen()}catch(o){this.trigger("fullscreenerror",o)}},i.exitFullScreen=function(){if(!this.el_.webkitDisplayingFullscreen){this.trigger("fullscreenerror",new Error("The video is not fullscreen"));return}this.el_.webkitExitFullScreen()},i.requestPictureInPicture=function(){return this.el_.requestPictureInPicture()},i.requestVideoFrameCallback=function(t){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(t):r.prototype.requestVideoFrameCallback.call(this,t)},i.cancelVideoFrameCallback=function(t){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(t):r.prototype.cancelVideoFrameCallback.call(this,t)},i.src=function(t){if(t===void 0)return this.el_.src;this.setSrc(t)},i.reset=function(){e.resetMediaElement(this.el_)},i.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},i.setControls=function(t){this.el_.controls=!!t},i.addTextTrack=function(t,o,a){return this.featuresNativeTextTracks?this.el_.addTextTrack(t,o,a):r.prototype.addTextTrack.call(this,t,o,a)},i.createRemoteTextTrack=function(t){if(!this.featuresNativeTextTracks)return r.prototype.createRemoteTextTrack.call(this,t);var o=Vr.createElement("track");return t.kind&&(o.kind=t.kind),t.label&&(o.label=t.label),(t.language||t.srclang)&&(o.srclang=t.language||t.srclang),t.default&&(o.default=t.default),t.id&&(o.id=t.id),t.src&&(o.src=t.src),o},i.addRemoteTextTrack=function(t,o){var a=r.prototype.addRemoteTextTrack.call(this,t,o);return this.featuresNativeTextTracks&&this.el().appendChild(a),a},i.removeRemoteTextTrack=function(t){if(r.prototype.removeRemoteTextTrack.call(this,t),this.featuresNativeTextTracks)for(var o=this.$$("track"),a=o.length;a--;)(t===o[a]||t===o[a].track)&&this.el().removeChild(o[a])},i.getVideoPlaybackQuality=function(){if(typeof this.el().getVideoPlaybackQuality=="function")return this.el().getVideoPlaybackQuality();var t={};return typeof this.el().webkitDroppedFrameCount<"u"&&typeof this.el().webkitDecodedFrameCount<"u"&&(t.droppedVideoFrames=this.el().webkitDroppedFrameCount,t.totalVideoFrames=this.el().webkitDecodedFrameCount),bt.performance&&typeof bt.performance.now=="function"?t.creationTime=bt.performance.now():bt.performance&&bt.performance.timing&&typeof bt.performance.timing.navigationStart=="number"&&(t.creationTime=bt.Date.now()-bt.performance.timing.navigationStart),t},e})(Ea);Y9(Zr,"TEST_VID",function(){if(GM()){var r=Vr.createElement("video"),e=Vr.createElement("track");return e.kind="captions",e.srclang="en",e.label="English",r.appendChild(e),r}});Zr.isSupported=function(){try{Zr.TEST_VID.volume=.5}catch{return!1}return!!(Zr.TEST_VID&&Zr.TEST_VID.canPlayType)};Zr.canPlayType=function(r){return Zr.TEST_VID.canPlayType(r)};Zr.canPlaySource=function(r,e){return Zr.canPlayType(r.type)};Zr.canControlVolume=function(){try{var r=Zr.TEST_VID.volume;Zr.TEST_VID.volume=r/2+.1;var e=r!==Zr.TEST_VID.volume;return e&&Hd?(bt.setTimeout(function(){Zr&&Zr.prototype&&(Zr.prototype.featuresVolumeControl=r!==Zr.TEST_VID.volume)}),!1):e}catch{return!1}};Zr.canMuteVolume=function(){try{var r=Zr.TEST_VID.muted;return Zr.TEST_VID.muted=!r,Zr.TEST_VID.muted?dM(Zr.TEST_VID,"muted","muted"):iz(Zr.TEST_VID,"muted","muted"),r!==Zr.TEST_VID.muted}catch{return!1}};Zr.canControlPlaybackRate=function(){if(hb&&pb&&$Ee<58)return!1;try{var r=Zr.TEST_VID.playbackRate;return Zr.TEST_VID.playbackRate=r/2+.1,r!==Zr.TEST_VID.playbackRate}catch{return!1}};Zr.canOverrideAttributes=function(){try{var r=function(){};Object.defineProperty(Vr.createElement("video"),"src",{get:r,set:r}),Object.defineProperty(Vr.createElement("audio"),"src",{get:r,set:r}),Object.defineProperty(Vr.createElement("video"),"innerHTML",{get:r,set:r}),Object.defineProperty(Vr.createElement("audio"),"innerHTML",{get:r,set:r})}catch{return!1}return!0};Zr.supportsNativeTextTracks=function(){return rz||Hd&&pb};Zr.supportsNativeVideoTracks=function(){return!!(Zr.TEST_VID&&Zr.TEST_VID.videoTracks)};Zr.supportsNativeAudioTracks=function(){return!!(Zr.TEST_VID&&Zr.TEST_VID.audioTracks)};Zr.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){var e=r[0],i=r[1];Y9(Zr.prototype,e,function(){return Zr[i]()},!0)});Zr.prototype.featuresVolumeControl=Zr.canControlVolume();Zr.prototype.movingMediaElementInDOM=!Hd;Zr.prototype.featuresFullscreenResize=!0;Zr.prototype.featuresProgressEvents=!0;Zr.prototype.featuresTimeupdateEvents=!0;Zr.prototype.featuresVideoFrameCallback=!!(Zr.TEST_VID&&Zr.TEST_VID.requestVideoFrameCallback);var w3;Zr.patchCanPlayType=function(){m9>=4&&!YEe&&!pb&&(w3=Zr.TEST_VID&&Zr.TEST_VID.constructor.prototype.canPlayType,Zr.TEST_VID.constructor.prototype.canPlayType=function(r){var e=/^application\/(?:x-|vnd\.apple\.)mpegurl/i;return r&&e.test(r)?"maybe":w3.call(this,r)})};Zr.unpatchCanPlayType=function(){var r=Zr.TEST_VID.constructor.prototype.canPlayType;return w3&&(Zr.TEST_VID.constructor.prototype.canPlayType=w3),r};Zr.patchCanPlayType();Zr.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{}})()}};Zr.resetMediaElement=function(r){if(r){for(var e=r.querySelectorAll("source"),i=e.length;i--;)r.removeChild(e[i]);r.removeAttribute("src"),typeof r.load=="function"&&(function(){try{r.load()}catch{}})()}};["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(r){Zr.prototype[r]=function(){return this.el_[r]||this.el_.hasAttribute(r)}});["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(r){Zr.prototype["set"+dl(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){Zr.prototype[r]=function(){return this.el_[r]}});["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach(function(r){Zr.prototype["set"+dl(r)]=function(e){this.el_[r]=e}});["pause","load","play"].forEach(function(r){Zr.prototype[r]=function(){return this.el_[r]()}});Ea.withSourceHandlers(Zr);Zr.nativeSourceHandler={};Zr.nativeSourceHandler.canPlayType=function(r){try{return Zr.TEST_VID.canPlayType(r)}catch{return""}};Zr.nativeSourceHandler.canHandleSource=function(r,e){if(r.type)return Zr.nativeSourceHandler.canPlayType(r.type);if(r.src){var i=w9(r.src);return Zr.nativeSourceHandler.canPlayType("video/"+i)}return""};Zr.nativeSourceHandler.handleSource=function(r,e,i){e.setSrc(r.src)};Zr.nativeSourceHandler.dispose=function(){};Zr.registerSourceHandler(Zr.nativeSourceHandler);Ea.registerTech("Html5",Zr);var YAe=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],XG={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},y$=["tiny","xsmall","small","medium","large","xlarge","huge"],CV={};y$.forEach(function(r){var e=r.charAt(0)==="x"?"x-"+r.substring(1):r;CV[r]="vjs-layout-"+e});var QQe={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},Hl=(function(r){zr(e,r);function e(n,t,o){var a;if(n.id=n.id||t.id||"vjs_video_"+gb(),t=Ks(e.getTagSettings(n),t),t.initChildren=!1,t.createEl=!1,t.evented=!1,t.reportTouchActivity=!1,!t.language)if(typeof n.closest=="function"){var s=n.closest("[lang]");s&&s.getAttribute&&(t.language=s.getAttribute("lang"))}else for(var l=n;l&&l.nodeType===1;){if(A0(l).hasOwnProperty("lang")){t.language=l.getAttribute("lang");break}l=l.parentNode}if(a=r.call(this,null,t,o)||this,a.boundDocumentFullscreenChange_=function(f){return a.documentFullscreenChange_(f)},a.boundFullWindowOnEscKey_=function(f){return a.fullWindowOnEscKey(f)},a.boundUpdateStyleEl_=function(f){return a.updateStyleEl_(f)},a.boundApplyInitTime_=function(f){return a.applyInitTime_(f)},a.boundUpdateCurrentBreakpoint_=function(f){return a.updateCurrentBreakpoint_(f)},a.boundHandleTechClick_=function(f){return a.handleTechClick_(f)},a.boundHandleTechDoubleClick_=function(f){return a.handleTechDoubleClick_(f)},a.boundHandleTechTouchStart_=function(f){return a.handleTechTouchStart_(f)},a.boundHandleTechTouchMove_=function(f){return a.handleTechTouchMove_(f)},a.boundHandleTechTouchEnd_=function(f){return a.handleTechTouchEnd_(f)},a.boundHandleTechTap_=function(f){return a.handleTechTap_(f)},a.isFullscreen_=!1,a.log=UEe(a.id_),a.fsApi_=C3,a.isPosterFromTech_=!1,a.queuedCallbacks_=[],a.isReady_=!1,a.hasStarted_=!1,a.userActive_=!1,a.debugEnabled_=!1,a.audioOnlyMode_=!1,a.audioPosterMode_=!1,a.audioOnlyCache_={playerHeight:null,hiddenChildren:[]},!a.options_||!a.options_.techOrder||!a.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(a.tag=n,a.tagAttributes=n&&A0(n),a.language(a.options_.language),t.languages){var u={};Object.getOwnPropertyNames(t.languages).forEach(function(f){u[f.toLowerCase()]=t.languages[f]}),a.languages_=u}else a.languages_=e.prototype.options_.languages;a.resetCache_(),a.poster_=t.poster||"",a.controls_=!!t.controls,n.controls=!1,n.removeAttribute("controls"),a.changingSrc_=!1,a.playCallbacks_=[],a.playTerminatedQueue_=[],n.hasAttribute("autoplay")?a.autoplay(!0):a.autoplay(a.options_.autoplay),t.plugins&&Object.keys(t.plugins).forEach(function(f){if(typeof a[f]!="function")throw new Error('plugin "'+f+'" does not exist')}),a.scrubbing_=!1,a.el_=a.createEl(),x9(sn(a),{eventBusKey:"el_"}),a.fsApi_.requestFullscreen&&(Ah(Vr,a.fsApi_.fullscreenchange,a.boundDocumentFullscreenChange_),a.on(a.fsApi_.fullscreenchange,a.boundDocumentFullscreenChange_)),a.fluid_&&a.on(["playerreset","resize"],a.boundUpdateStyleEl_);var c=Qa(a.options_);t.plugins&&Object.keys(t.plugins).forEach(function(f){a[f](t.plugins[f])}),t.debug&&a.debug(!0),a.options_.playerOptions=c,a.middleware_=[],a.playbackRates(t.playbackRates),a.initChildren(),a.isAudio(n.nodeName.toLowerCase()==="audio"),a.controls()?a.addClass("vjs-controls-enabled"):a.addClass("vjs-controls-disabled"),a.el_.setAttribute("role","region"),a.isAudio()?a.el_.setAttribute("aria-label",a.localize("Audio Player")):a.el_.setAttribute("aria-label",a.localize("Video Player")),a.isAudio()&&a.addClass("vjs-audio"),a.flexNotSupported_()&&a.addClass("vjs-no-flex"),cM&&a.addClass("vjs-touch-enabled"),Hd||a.addClass("vjs-workinghover"),e.players[a.id_]=sn(a);var d=BEe.split(".")[0];return a.addClass("vjs-v"+d),a.userActive(!0),a.reportUserActivity(),a.one("play",function(f){return a.listenForUserActivity_(f)}),a.on("stageclick",function(f){return a.handleStageClick_(f)}),a.on("keydown",function(f){return a.handleKeyDown(f)}),a.on("languagechange",function(f){return a.handleLanguagechange(f)}),a.breakpoints(a.options_.breakpoints),a.responsive(a.options_.responsive),a.on("ready",function(){a.audioPosterMode(a.options_.audioPosterMode),a.audioOnlyMode(a.options_.audioOnlyMode)}),a}var i=e.prototype;return i.dispose=function(){var t=this;this.trigger("dispose"),this.off("dispose"),Yc(Vr,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),Yc(Vr,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),e.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),bQe(this),kd.names.forEach(function(o){var a=kd[o],s=t[a.getterName]();s&&s.off&&s.off()}),r.prototype.dispose.call(this,{restoreEl:this.options_.restoreEl})},i.createEl=function(){var t=this.tag,o,a=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute("data-vjs-player"),s=this.tag.tagName.toLowerCase()==="video-js";a?o=this.el_=t.parentNode:s||(o=this.el_=r.prototype.createEl.call(this,"div"));var l=A0(t);if(s){for(o=this.el_=t,t=this.tag=Vr.createElement("video");o.children.length;)t.appendChild(o.firstChild);v1(o,"video-js")||z0(o,"video-js"),o.appendChild(t),a=this.playerElIngest_=o,Object.keys(o).forEach(function(p){try{t[p]=o[p]}catch{}})}if(t.setAttribute("tabindex","-1"),l.tabindex="-1",(yj||pb&&qEe)&&(t.setAttribute("role","application"),l.role="application"),t.removeAttribute("width"),t.removeAttribute("height"),"width"in l&&delete l.width,"height"in l&&delete l.height,Object.getOwnPropertyNames(l).forEach(function(p){s&&p==="class"||o.setAttribute(p,l[p]),s&&t.setAttribute(p,l[p])}),t.playerId=t.id,t.id+="_html5_api",t.className="vjs-tech",t.player=o.player=this,this.addClass("vjs-paused"),bt.VIDEOJS_NO_DYNAMIC_STYLE!==!0){this.styleEl_=uAe("vjs-styles-dimensions");var u=zS(".vjs-styles-defaults"),c=zS("head");c.insertBefore(this.styleEl_,u?u.nextSibling:c.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);for(var d=t.getElementsByTagName("a"),f=0;f<d.length;f++){var h=d.item(f);z0(h,"vjs-hidden"),h.setAttribute("hidden","hidden")}return t.initNetworkState_=t.networkState,t.parentNode&&!a&&t.parentNode.insertBefore(o,t),u$(t,o),this.children_.unshift(t),this.el_.setAttribute("lang",this.language_),this.el_.setAttribute("translate","no"),this.el_=o,o},i.crossOrigin=function(t){if(!t)return this.techGet_("crossOrigin");if(t!=="anonymous"&&t!=="use-credentials"){Ln.warn('crossOrigin must be "anonymous" or "use-credentials", given "'+t+'"');return}this.techCall_("setCrossOrigin",t)},i.width=function(t){return this.dimension("width",t)},i.height=function(t){return this.dimension("height",t)},i.dimension=function(t,o){var a=t+"_";if(o===void 0)return this[a]||0;if(o===""||o==="auto"){this[a]=void 0,this.updateStyleEl_();return}var s=parseFloat(o);if(isNaN(s)){Ln.error('Improper value "'+o+'" supplied for for '+t);return}this[a]=s,this.updateStyleEl_()},i.fluid=function(t){var o=this;if(t===void 0)return!!this.fluid_;this.fluid_=!!t,W0(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),t?(this.addClass("vjs-fluid"),this.fill(!1),WJe(this,function(){o.on(["playerreset","resize"],o.boundUpdateStyleEl_)})):this.removeClass("vjs-fluid"),this.updateStyleEl_()},i.fill=function(t){if(t===void 0)return!!this.fill_;this.fill_=!!t,t?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")},i.aspectRatio=function(t){if(t===void 0)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(t))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=t,this.fluid(!0),this.updateStyleEl_()},i.updateStyleEl_=function(){if(bt.VIDEOJS_NO_DYNAMIC_STYLE===!0){var t=typeof this.width_=="number"?this.width_:this.options_.width,o=typeof this.height_=="number"?this.height_:this.options_.height,a=this.tech_&&this.tech_.el();a&&(t>=0&&(a.width=t),o>=0&&(a.height=o));return}var s,l,u,c;this.aspectRatio_!==void 0&&this.aspectRatio_!=="auto"?u=this.aspectRatio_:this.videoWidth()>0?u=this.videoWidth()+":"+this.videoHeight():u="16:9";var d=u.split(":"),f=d[1]/d[0];this.width_!==void 0?s=this.width_:this.height_!==void 0?s=this.height_/f:s=this.videoWidth()||300,this.height_!==void 0?l=this.height_:l=s*f,/^[^a-zA-Z]/.test(this.id())?c="dimensions-"+this.id():c=this.id()+"-dimensions",this.addClass(c),cAe(this.styleEl_,`
      .`+c+` {
        width: `+s+`px;
        height: `+l+`px;
      }

      .`+c+`.vjs-fluid:not(.vjs-audio-only-mode) {
        padding-top: `+f*100+`%;
      }
    `)},i.loadTech_=function(t,o){var a=this;this.tech_&&this.unloadTech_();var s=dl(t),l=t.charAt(0).toLowerCase()+t.slice(1);s!=="Html5"&&this.tag&&(Ea.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=s,this.isReady_=!1;var u=this.autoplay();(typeof this.autoplay()=="string"||this.autoplay()===!0&&this.options_.normalizeAutoplay)&&(u=!1);var c={source:o,autoplay:u,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+l+"_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,Promise:this.options_.Promise};kd.names.forEach(function(f){var h=kd[f];c[h.getterName]=a[h.privateName]}),Ks(c,this.options_[s]),Ks(c,this.options_[l]),Ks(c,this.options_[t.toLowerCase()]),this.tag&&(c.tag=this.tag),o&&o.src===this.cache_.src&&this.cache_.currentTime>0&&(c.startTime=this.cache_.currentTime);var d=Ea.getTech(t);if(!d)throw new Error("No Tech named '"+s+"' exists! '"+s+"' should be registered using videojs.registerTech()'");this.tech_=new d(c),this.tech_.ready(es(this,this.handleTechReady_),!0),Vfe.jsonToTextTracks(this.textTracksJson_||[],this.tech_),YAe.forEach(function(f){a.on(a.tech_,f,function(h){return a["handleTech"+dl(f)+"_"](h)})}),Object.keys(XG).forEach(function(f){a.on(a.tech_,f,function(h){if(a.tech_.playbackRate()===0&&a.tech_.seeking()){a.queuedCallbacks_.push({callback:a["handleTech"+XG[f]+"_"].bind(a),event:h});return}a["handleTech"+XG[f]+"_"](h)})}),this.on(this.tech_,"loadstart",function(f){return a.handleTechLoadStart_(f)}),this.on(this.tech_,"sourceset",function(f){return a.handleTechSourceset_(f)}),this.on(this.tech_,"waiting",function(f){return a.handleTechWaiting_(f)}),this.on(this.tech_,"ended",function(f){return a.handleTechEnded_(f)}),this.on(this.tech_,"seeking",function(f){return a.handleTechSeeking_(f)}),this.on(this.tech_,"play",function(f){return a.handleTechPlay_(f)}),this.on(this.tech_,"firstplay",function(f){return a.handleTechFirstPlay_(f)}),this.on(this.tech_,"pause",function(f){return a.handleTechPause_(f)}),this.on(this.tech_,"durationchange",function(f){return a.handleTechDurationChange_(f)}),this.on(this.tech_,"fullscreenchange",function(f,h){return a.handleTechFullscreenChange_(f,h)}),this.on(this.tech_,"fullscreenerror",function(f,h){return a.handleTechFullscreenError_(f,h)}),this.on(this.tech_,"enterpictureinpicture",function(f){return a.handleTechEnterPictureInPicture_(f)}),this.on(this.tech_,"leavepictureinpicture",function(f){return a.handleTechLeavePictureInPicture_(f)}),this.on(this.tech_,"error",function(f){return a.handleTechError_(f)}),this.on(this.tech_,"posterchange",function(f){return a.handleTechPosterChange_(f)}),this.on(this.tech_,"textdata",function(f){return a.handleTechTextData_(f)}),this.on(this.tech_,"ratechange",function(f){return a.handleTechRateChange_(f)}),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode!==this.el()&&(s!=="Html5"||!this.tag)&&u$(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},i.unloadTech_=function(){var t=this;kd.names.forEach(function(o){var a=kd[o];t[a.privateName]=t[a.getterName]()}),this.textTracksJson_=Vfe.textTracksToJson(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},i.tech=function(t){return t===void 0&&Ln.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_},i.addTechControlsListeners_=function(){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_)},i.removeTechControlsListeners_=function(){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_)},i.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()},i.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay")),this.manualAutoplay_(this.autoplay()===!0&&this.options_.normalizeAutoplay?"play":this.autoplay())},i.manualAutoplay_=function(t){var o=this;if(!(!this.tech_||typeof t!="string")){var a=function(){var u=o.muted();o.muted(!0);var c=function(){o.muted(u)};o.playTerminatedQueue_.push(c);var d=o.play();if(AN(d))return d.catch(function(f){throw c(),new Error("Rejection at manualAutoplay. Restoring muted value. "+(f||""))})},s;if(t==="any"&&!this.muted()?(s=this.play(),AN(s)&&(s=s.catch(a))):t==="muted"&&!this.muted()?s=a():s=this.play(),!!AN(s))return s.then(function(){o.trigger({type:"autoplay-success",autoplay:t})}).catch(function(){o.trigger({type:"autoplay-failure",autoplay:t})})}},i.updateSourceCaches_=function(t){t===void 0&&(t="");var o=t,a="";typeof o!="string"&&(o=t.src,a=t.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],o&&!a&&(a=PQe(this,o)),this.cache_.source=Qa({},t,{src:o,type:a});for(var s=this.cache_.sources.filter(function(h){return h.src&&h.src===o}),l=[],u=this.$$("source"),c=[],d=0;d<u.length;d++){var f=A0(u[d]);l.push(f),f.src&&f.src===o&&c.push(f.src)}c.length&&!s.length?this.cache_.sources=l:s.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=o},i.handleTechSourceset_=function(t){var o=this;if(!this.changingSrc_){var a=function(c){return o.updateSourceCaches_(c)},s=this.currentSource().src,l=t.src;s&&!/^blob:/.test(s)&&/^blob:/.test(l)&&(!this.lastSource_||this.lastSource_.tech!==l&&this.lastSource_.player!==s)&&(a=function(){}),a(l),t.src||this.tech_.any(["sourceset","loadstart"],function(u){if(u.type!=="sourceset"){var c=o.techGet("currentSrc");o.lastSource_.tech=c,o.updateSourceCaches_(c)}})}this.lastSource_={player:this.currentSource().src,tech:t.src},this.trigger({src:t.src,type:"sourceset"})},i.hasStarted=function(t){if(t===void 0)return this.hasStarted_;t!==this.hasStarted_&&(this.hasStarted_=t,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},i.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},i.handleTechRateChange_=function(){this.tech_.playbackRate()>0&&this.cache_.lastPlaybackRate===0&&(this.queuedCallbacks_.forEach(function(t){return t.callback(t.event)}),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},i.handleTechWaiting_=function(){var t=this;this.addClass("vjs-waiting"),this.trigger("waiting");var o=this.currentTime(),a=function s(){o!==t.currentTime()&&(t.removeClass("vjs-waiting"),t.off("timeupdate",s))};this.on("timeupdate",a)},i.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},i.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},i.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},i.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},i.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.removeClass("vjs-ended"),this.trigger("seeked")},i.handleTechFirstPlay_=function(){this.options_.starttime&&(Ln.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},i.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},i.handleTechEnded_=function(){this.addClass("vjs-ended"),this.removeClass("vjs-waiting"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},i.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},i.handleTechClick_=function(t){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,t):this.paused()?kv(this.play()):this.pause())},i.handleTechDoubleClick_=function(t){if(this.controls_){var o=Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),function(a){return a.contains(t.target)});o||(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,t):this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}},i.handleTechTap_=function(){this.userActive(!this.userActive())},i.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},i.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},i.handleTechTouchEnd_=function(t){t.cancelable&&t.preventDefault()},i.handleStageClick_=function(){this.reportUserActivity()},i.toggleFullscreenClass_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},i.documentFullscreenChange_=function(t){var o=t.target.player;if(!(o&&o!==this)){var a=this.el(),s=Vr[this.fsApi_.fullscreenElement]===a;!s&&a.matches?s=a.matches(":"+this.fsApi_.fullscreen):!s&&a.msMatchesSelector&&(s=a.msMatchesSelector(":"+this.fsApi_.fullscreen)),this.isFullscreen(s)}},i.handleTechFullscreenChange_=function(t,o){var a=this;o&&(o.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",function(){a.removeClass("vjs-ios-native-fs")})),this.isFullscreen(o.isFullscreen))},i.handleTechFullscreenError_=function(t,o){this.trigger("fullscreenerror",o)},i.togglePictureInPictureClass_=function(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")},i.handleTechEnterPictureInPicture_=function(t){this.isInPictureInPicture(!0)},i.handleTechLeavePictureInPicture_=function(t){this.isInPictureInPicture(!1)},i.handleTechError_=function(){var t=this.tech_.error();this.error(t)},i.handleTechTextData_=function(){var t=null;arguments.length>1&&(t=arguments[1]),this.trigger("textdata",t)},i.getCache=function(){return this.cache_},i.resetCache_=function(){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}},i.techCall_=function(t,o){this.ready(function(){if(t in yQe)return gQe(this.middleware_,this.tech_,t,o);if(t in Yfe)return Gfe(this.middleware_,this.tech_,t,o);try{this.tech_&&this.tech_[t](o)}catch(a){throw Ln(a),a}},!0)},i.techGet_=function(t){if(!(!this.tech_||!this.tech_.isReady_)){if(t in vQe)return pQe(this.middleware_,this.tech_,t);if(t in Yfe)return Gfe(this.middleware_,this.tech_,t);try{return this.tech_[t]()}catch(o){throw this.tech_[t]===void 0?(Ln("Video.js: "+t+" method not defined for "+this.techName_+" playback technology.",o),o):o.name==="TypeError"?(Ln("Video.js: "+t+" unavailable on "+this.techName_+" playback technology element.",o),this.tech_.isReady_=!1,o):(Ln(o),o)}}},i.play=function(){var t=this,o=this.options_.Promise||bt.Promise;return o?new o(function(a){t.play_(a)}):this.play_()},i.play_=function(t){var o=this;t===void 0&&(t=kv),this.playCallbacks_.push(t);var a=!!(!this.changingSrc_&&(this.src()||this.currentSrc())),s=!!(rz||Hd);if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!a){this.waitToPlay_=function(c){o.play_()},this.one(["ready","loadstart"],this.waitToPlay_),!a&&s&&this.load();return}var l=this.techGet_("play"),u=s&&this.hasClass("vjs-ended");u&&this.resetProgressBar_(),l===null?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(l)},i.runPlayTerminatedQueue_=function(){var t=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],t.forEach(function(o){o()})},i.runPlayCallbacks_=function(t){var o=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],o.forEach(function(a){a(t)})},i.pause=function(){this.techCall_("pause")},i.paused=function(){return this.techGet_("paused")!==!1},i.played=function(){return this.techGet_("played")||y1(0,0)},i.scrubbing=function(t){if(typeof t>"u")return this.scrubbing_;this.scrubbing_=!!t,this.techCall_("setScrubbing",this.scrubbing_),t?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},i.currentTime=function(t){if(typeof t<"u"){if(t<0&&(t=0),!this.isReady_||this.changingSrc_||!this.tech_||!this.tech_.isReady_){this.cache_.initTime=t,this.off("canplay",this.boundApplyInitTime_),this.one("canplay",this.boundApplyInitTime_);return}this.techCall_("setCurrentTime",t),this.cache_.initTime=0;return}return this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime},i.applyInitTime_=function(){this.currentTime(this.cache_.initTime)},i.duration=function(t){if(t===void 0)return this.cache_.duration!==void 0?this.cache_.duration:NaN;t=parseFloat(t),t<0&&(t=1/0),t!==this.cache_.duration&&(this.cache_.duration=t,t===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(t)||this.trigger("durationchange"))},i.remainingTime=function(){return this.duration()-this.currentTime()},i.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},i.buffered=function(){var t=this.techGet_("buffered");return(!t||!t.length)&&(t=y1(0,0)),t},i.bufferedPercent=function(){return vAe(this.buffered(),this.duration())},i.bufferedEnd=function(){var t=this.buffered(),o=this.duration(),a=t.end(t.length-1);return a>o&&(a=o),a},i.volume=function(t){var o;if(t!==void 0){o=Math.max(0,Math.min(1,parseFloat(t))),this.cache_.volume=o,this.techCall_("setVolume",o),o>0&&this.lastVolume_(o);return}return o=parseFloat(this.techGet_("volume")),isNaN(o)?1:o},i.muted=function(t){if(t!==void 0){this.techCall_("setMuted",t);return}return this.techGet_("muted")||!1},i.defaultMuted=function(t){return t!==void 0?this.techCall_("setDefaultMuted",t):this.techGet_("defaultMuted")||!1},i.lastVolume_=function(t){if(t!==void 0&&t!==0){this.cache_.lastVolume=t;return}return this.cache_.lastVolume},i.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},i.isFullscreen=function(t){if(t!==void 0){var o=this.isFullscreen_;this.isFullscreen_=!!t,this.isFullscreen_!==o&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),this.toggleFullscreenClass_();return}return this.isFullscreen_},i.requestFullscreen=function(t){var o=this.options_.Promise||bt.Promise;if(o){var a=this;return new o(function(s,l){function u(){a.off("fullscreenerror",d),a.off("fullscreenchange",c)}function c(){u(),s()}function d(h,p){u(),l(p)}a.one("fullscreenchange",c),a.one("fullscreenerror",d);var f=a.requestFullscreenHelper_(t);f&&(f.then(u,u),f.then(s,l))})}return this.requestFullscreenHelper_()},i.requestFullscreenHelper_=function(t){var o=this,a;if(this.fsApi_.prefixed||(a=this.options_.fullscreen&&this.options_.fullscreen.options||{},t!==void 0&&(a=t)),this.fsApi_.requestFullscreen){var s=this.el_[this.fsApi_.requestFullscreen](a);return s&&s.then(function(){return o.isFullscreen(!0)},function(){return o.isFullscreen(!1)}),s}else this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()},i.exitFullscreen=function(){var t=this.options_.Promise||bt.Promise;if(t){var o=this;return new t(function(a,s){function l(){o.off("fullscreenerror",c),o.off("fullscreenchange",u)}function u(){l(),a()}function c(f,h){l(),s(h)}o.one("fullscreenchange",u),o.one("fullscreenerror",c);var d=o.exitFullscreenHelper_();d&&(d.then(l,l),d.then(a,s))})}return this.exitFullscreenHelper_()},i.exitFullscreenHelper_=function(){var t=this;if(this.fsApi_.requestFullscreen){var o=Vr[this.fsApi_.exitFullscreen]();return o&&kv(o.then(function(){return t.isFullscreen(!1)})),o}else this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()},i.enterFullWindow=function(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=Vr.documentElement.style.overflow,Ah(Vr,"keydown",this.boundFullWindowOnEscKey_),Vr.documentElement.style.overflow="hidden",z0(Vr.body,"vjs-full-window"),this.trigger("enterFullWindow")},i.fullWindowOnEscKey=function(t){gn.isEventKey(t,"Esc")&&this.isFullscreen()===!0&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())},i.exitFullWindow=function(){this.isFullscreen(!1),this.isFullWindow=!1,Yc(Vr,"keydown",this.boundFullWindowOnEscKey_),Vr.documentElement.style.overflow=this.docOrigOverflow,mj(Vr.body,"vjs-full-window"),this.trigger("exitFullWindow")},i.disablePictureInPicture=function(t){if(t===void 0)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",t),this.options_.disablePictureInPicture=t,this.trigger("disablepictureinpicturechanged")},i.isInPictureInPicture=function(t){if(t!==void 0){this.isInPictureInPicture_=!!t,this.togglePictureInPictureClass_();return}return!!this.isInPictureInPicture_},i.requestPictureInPicture=function(){if("pictureInPictureEnabled"in Vr&&this.disablePictureInPicture()===!1)return this.techGet_("requestPictureInPicture")},i.exitPictureInPicture=function(){if("pictureInPictureEnabled"in Vr)return Vr.exitPictureInPicture()},i.handleKeyDown=function(t){var o=this.options_.userActions;if(!(!o||!o.hotkeys)){var a=function(l){var u=l.tagName.toLowerCase();if(l.isContentEditable)return!0;var c=["button","checkbox","hidden","radio","reset","submit"];if(u==="input")return c.indexOf(l.type)===-1;var d=["textarea"];return d.indexOf(u)!==-1};a(this.el_.ownerDocument.activeElement)||(typeof o.hotkeys=="function"?o.hotkeys.call(this,t):this.handleHotkeys(t))}},i.handleHotkeys=function(t){var o=this.options_.userActions?this.options_.userActions.hotkeys:{},a=o.fullscreenKey,s=a===void 0?function(g){return gn.isEventKey(g,"f")}:a,l=o.muteKey,u=l===void 0?function(g){return gn.isEventKey(g,"m")}:l,c=o.playPauseKey,d=c===void 0?function(g){return gn.isEventKey(g,"k")||gn.isEventKey(g,"Space")}:c;if(s.call(this,t)){t.preventDefault(),t.stopPropagation();var f=Rr.getComponent("FullscreenToggle");Vr[this.fsApi_.fullscreenEnabled]!==!1&&f.prototype.handleClick.call(this,t)}else if(u.call(this,t)){t.preventDefault(),t.stopPropagation();var h=Rr.getComponent("MuteToggle");h.prototype.handleClick.call(this,t)}else if(d.call(this,t)){t.preventDefault(),t.stopPropagation();var p=Rr.getComponent("PlayToggle");p.prototype.handleClick.call(this,t)}},i.canPlayType=function(t){for(var o,a=0,s=this.options_.techOrder;a<s.length;a++){var l=s[a],u=Ea.getTech(l);if(u||(u=Rr.getComponent(l)),!u){Ln.error('The "'+l+'" tech is undefined. Skipped browser support check for that tech.');continue}if(u.isSupported()&&(o=u.canPlayType(t),o))return o}return""},i.selectSource=function(t){var o=this,a=this.options_.techOrder.map(function(d){return[d,Ea.getTech(d)]}).filter(function(d){var f=d[0],h=d[1];return h?h.isSupported():(Ln.error('The "'+f+'" tech is undefined. Skipped browser support check for that tech.'),!1)}),s=function(f,h,p){var g;return f.some(function(v){return h.some(function(y){if(g=p(v,y),g)return!0})}),g},l,u=function(f){return function(h,p){return f(p,h)}},c=function(f,h){var p=f[0],g=f[1];if(g.canPlaySource(h,o.options_[p.toLowerCase()]))return{source:h,tech:p}};return this.options_.sourceOrder?l=s(t,a,u(c)):l=s(a,t,c),l||!1},i.handleSrc_=function(t,o){var a=this;if(typeof t>"u")return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();var s=CQe(t);if(!s.length){this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0);return}if(this.changingSrc_=!0,o||(this.cache_.sources=s),this.updateSourceCaches_(s[0]),fQe(this,s[0],function(c,d){a.middleware_=d,o||(a.cache_.sources=s),a.updateSourceCaches_(c);var f=a.src_(c);if(f){if(s.length>1)return a.handleSrc_(s.slice(1));a.changingSrc_=!1,a.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0),a.triggerReady();return}hQe(d,a.tech_)}),this.options_.retryOnError&&s.length>1){var l=function(){a.error(null),a.handleSrc_(s.slice(1),!0)},u=function(){a.off("error",l)};this.one("error",l),this.one("playing",u),this.resetRetryOnError_=function(){a.off("error",l),a.off("playing",u)}}},i.src=function(t){return this.handleSrc_(t,!1)},i.src_=function(t){var o=this,a=this.selectSource([t]);return a?$Je(a.tech,this.techName_)?(this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",t):this.techCall_("src",t.src),this.changingSrc_=!1},!0),!1):(this.changingSrc_=!0,this.loadTech_(a.tech,a.source),this.tech_.ready(function(){o.changingSrc_=!1}),!1):!0},i.load=function(){this.techCall_("load")},i.reset=function(){var t=this,o=this.options_.Promise||bt.Promise;if(this.paused()||!o)this.doReset_();else{var a=this.play();kv(a.then(function(){return t.doReset_()}))}},i.doReset_=function(){this.tech_&&this.tech_.clearTracks("text"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),W0(this)&&this.trigger("playerreset")},i.resetControlBarUI_=function(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()},i.resetProgressBar_=function(){this.currentTime(0);var t=this.controlBar||{},o=t.durationDisplay,a=t.remainingTimeDisplay;o&&o.updateContent(),a&&a.updateContent()},i.resetPlaybackRate_=function(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()},i.resetVolumeBar_=function(){this.volume(1),this.trigger("volumechange")},i.currentSources=function(){var t=this.currentSource(),o=[];return Object.keys(t).length!==0&&o.push(t),this.cache_.sources||o},i.currentSource=function(){return this.cache_.source||{}},i.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},i.currentType=function(){return this.currentSource()&&this.currentSource().type||""},i.preload=function(t){if(t!==void 0){this.techCall_("setPreload",t),this.options_.preload=t;return}return this.techGet_("preload")},i.autoplay=function(t){if(t===void 0)return this.options_.autoplay||!1;var o;typeof t=="string"&&/(any|play|muted)/.test(t)||t===!0&&this.options_.normalizeAutoplay?(this.options_.autoplay=t,this.manualAutoplay_(typeof t=="string"?t:"play"),o=!1):t?this.options_.autoplay=!0:this.options_.autoplay=!1,o=typeof o>"u"?this.options_.autoplay:o,this.tech_&&this.techCall_("setAutoplay",o)},i.playsinline=function(t){return t!==void 0?(this.techCall_("setPlaysinline",t),this.options_.playsinline=t,this):this.techGet_("playsinline")},i.loop=function(t){if(t!==void 0){this.techCall_("setLoop",t),this.options_.loop=t;return}return this.techGet_("loop")},i.poster=function(t){if(t===void 0)return this.poster_;t||(t=""),t!==this.poster_&&(this.poster_=t,this.techCall_("setPoster",t),this.isPosterFromTech_=!1,this.trigger("posterchange"))},i.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var t=this.tech_.poster()||"";t!==this.poster_&&(this.poster_=t,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},i.controls=function(t){if(t===void 0)return!!this.controls_;t=!!t,this.controls_!==t&&(this.controls_=t,this.usingNativeControls()&&this.techCall_("setControls",t),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_()))},i.usingNativeControls=function(t){if(t===void 0)return!!this.usingNativeControls_;t=!!t,this.usingNativeControls_!==t&&(this.usingNativeControls_=t,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},i.error=function(t){var o=this;if(t===void 0)return this.error_||null;if(US("beforeerror").forEach(function(s){var l=s(o,t);if(!(Q0(l)&&!Array.isArray(l)||typeof l=="string"||typeof l=="number"||l===null)){o.log.error("please return a value that MediaError expects in beforeerror hooks");return}t=l}),this.options_.suppressNotSupportedError&&t&&t.code===4){var a=function(){this.error(t)};this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],a),this.one("loadstart",function(){this.off(["click","touchstart"],a)});return}if(t===null){this.error_=t,this.removeClass("vjs-error"),this.errorDisplay&&this.errorDisplay.close();return}this.error_=new jd(t),this.addClass("vjs-error"),Ln.error("(CODE:"+this.error_.code+" "+jd.errorTypes[this.error_.code]+")",this.error_.message,this.error_),this.trigger("error"),US("error").forEach(function(s){return s(o,o.error_)})},i.reportUserActivity=function(t){this.userActivity_=!0},i.userActive=function(t){if(t===void 0)return this.userActive_;if(t=!!t,t!==this.userActive_){if(this.userActive_=t,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(o){o.stopPropagation(),o.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},i.listenForUserActivity_=function(){var t,o,a,s=es(this,this.reportUserActivity),l=function(p){(p.screenX!==o||p.screenY!==a)&&(o=p.screenX,a=p.screenY,s())},u=function(){s(),this.clearInterval(t),t=this.setInterval(s,250)},c=function(p){s(),this.clearInterval(t)};this.on("mousedown",u),this.on("mousemove",l),this.on("mouseup",c),this.on("mouseleave",c);var d=this.getChild("controlBar");d&&!Hd&&!hb&&(d.on("mouseenter",function(h){this.player().options_.inactivityTimeout!==0&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0}),d.on("mouseleave",function(h){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on("keydown",s),this.on("keyup",s);var f;this.setInterval(function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(f);var h=this.options_.inactivityTimeout;h<=0||(f=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},h))}},250)},i.playbackRate=function(t){if(t!==void 0){this.techCall_("setPlaybackRate",t);return}return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1},i.defaultPlaybackRate=function(t){return t!==void 0?this.techCall_("setDefaultPlaybackRate",t):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},i.isAudio=function(t){if(t!==void 0){this.isAudio_=!!t;return}return!!this.isAudio_},i.enableAudioOnlyUI_=function(){var t=this;this.addClass("vjs-audio-only-mode");var o=this.children(),a=this.getChild("ControlBar"),s=a&&a.currentHeight();o.forEach(function(l){l!==a&&l.el_&&!l.hasClass("vjs-hidden")&&(l.hide(),t.audioOnlyCache_.hiddenChildren.push(l))}),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.height(s),this.trigger("audioonlymodechange")},i.disableAudioOnlyUI_=function(){this.removeClass("vjs-audio-only-mode"),this.audioOnlyCache_.hiddenChildren.forEach(function(t){return t.show()}),this.height(this.audioOnlyCache_.playerHeight),this.trigger("audioonlymodechange")},i.audioOnlyMode=function(t){var o=this;if(typeof t!="boolean"||t===this.audioOnlyMode_)return this.audioOnlyMode_;this.audioOnlyMode_=t;var a=this.options_.Promise||bt.Promise;if(a){if(t){var s=[];return this.isInPictureInPicture()&&s.push(this.exitPictureInPicture()),this.isFullscreen()&&s.push(this.exitFullscreen()),this.audioPosterMode()&&s.push(this.audioPosterMode(!1)),a.all(s).then(function(){return o.enableAudioOnlyUI_()})}return a.resolve().then(function(){return o.disableAudioOnlyUI_()})}t?(this.isInPictureInPicture()&&this.exitPictureInPicture(),this.isFullscreen()&&this.exitFullscreen(),this.enableAudioOnlyUI_()):this.disableAudioOnlyUI_()},i.enablePosterModeUI_=function(){var t=this.tech_&&this.tech_;t.hide(),this.addClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")},i.disablePosterModeUI_=function(){var t=this.tech_&&this.tech_;t.show(),this.removeClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")},i.audioPosterMode=function(t){var o=this;if(typeof t!="boolean"||t===this.audioPosterMode_)return this.audioPosterMode_;this.audioPosterMode_=t;var a=this.options_.Promise||bt.Promise;if(a){if(t){if(this.audioOnlyMode()){var s=this.audioOnlyMode(!1);return s.then(function(){o.enablePosterModeUI_()})}return a.resolve().then(function(){o.enablePosterModeUI_()})}return a.resolve().then(function(){o.disablePosterModeUI_()})}if(t){this.audioOnlyMode()&&this.audioOnlyMode(!1),this.enablePosterModeUI_();return}this.disablePosterModeUI_()},i.addTextTrack=function(t,o,a){if(this.tech_)return this.tech_.addTextTrack(t,o,a)},i.addRemoteTextTrack=function(t,o){if(this.tech_)return this.tech_.addRemoteTextTrack(t,o)},i.removeRemoteTextTrack=function(t){t===void 0&&(t={});var o=t,a=o.track;if(a||(a=t),this.tech_)return this.tech_.removeRemoteTextTrack(a)},i.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},i.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},i.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},i.language=function(t){if(t===void 0)return this.language_;this.language_!==String(t).toLowerCase()&&(this.language_=String(t).toLowerCase(),W0(this)&&this.trigger("languagechange"))},i.languages=function(){return Qa(e.prototype.options_.languages,this.languages_)},i.toJSON=function(){var t=Qa(this.options_),o=t.tracks;t.tracks=[];for(var a=0;a<o.length;a++){var s=o[a];s=Qa(s),s.player=void 0,t.tracks[a]=s}return t},i.createModal=function(t,o){var a=this;o=o||{},o.content=t||"";var s=new qM(this,o);return this.addChild(s),s.on("dispose",function(){a.removeChild(s)}),s.open(),s},i.updateCurrentBreakpoint_=function(){if(this.responsive())for(var t=this.currentBreakpoint(),o=this.currentWidth(),a=0;a<y$.length;a++){var s=y$[a],l=this.breakpoints_[s];if(o<=l){if(t===s)return;t&&this.removeClass(CV[t]),this.addClass(CV[s]),this.breakpoint_=s;break}}},i.removeCurrentBreakpoint_=function(){var t=this.currentBreakpointClass();this.breakpoint_="",t&&this.removeClass(t)},i.breakpoints=function(t){return t===void 0?Ks(this.breakpoints_):(this.breakpoint_="",this.breakpoints_=Ks({},QQe,t),this.updateCurrentBreakpoint_(),Ks(this.breakpoints_))},i.responsive=function(t){if(t===void 0)return this.responsive_;t=!!t;var o=this.responsive_;if(t!==o)return this.responsive_=t,t?(this.on("playerresize",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),t},i.currentBreakpoint=function(){return this.breakpoint_},i.currentBreakpointClass=function(){return CV[this.breakpoint_]||""},i.loadMedia=function(t,o){var a=this;if(!(!t||typeof t!="object")){this.reset(),this.cache_.media=Qa(t);var s=this.cache_.media,l=s.artwork,u=s.poster,c=s.src,d=s.textTracks;!l&&u&&(this.cache_.media.artwork=[{src:u,type:E3(u)}]),c&&this.src(c),u&&this.poster(u),Array.isArray(d)&&d.forEach(function(f){return a.addRemoteTextTrack(f,!1)}),this.ready(o)}},i.getMedia=function(){if(!this.cache_.media){var t=this.poster(),o=this.currentSources(),a=Array.prototype.map.call(this.remoteTextTracks(),function(l){return{kind:l.kind,label:l.label,language:l.language,src:l.src}}),s={src:o,textTracks:a};return t&&(s.poster=t,s.artwork=[{src:s.poster,type:E3(s.poster)}]),s}return Qa(this.cache_.media)},e.getTagSettings=function(t){var o={sources:[],tracks:[]},a=A0(t),s=a["data-setup"];if(v1(t,"vjs-fill")&&(a.fill=!0),v1(t,"vjs-fluid")&&(a.fluid=!0),s!==null){var l=MKe(s||"{}"),u=l[0],c=l[1];u&&Ln.error(u),Ks(a,c)}if(Ks(o,a),t.hasChildNodes())for(var d=t.childNodes,f=0,h=d.length;f<h;f++){var p=d[f],g=p.nodeName.toLowerCase();g==="source"?o.sources.push(A0(p)):g==="track"&&o.tracks.push(A0(p))}return o},i.flexNotSupported_=function(){var t=Vr.createElement("i");return!("flexBasis"in t.style||"webkitFlexBasis"in t.style||"mozFlexBasis"in t.style||"msFlexBasis"in t.style||"msFlexOrder"in t.style)},i.debug=function(t){if(t===void 0)return this.debugEnabled_;t?(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)},i.playbackRates=function(t){if(t===void 0)return this.cache_.playbackRates;Array.isArray(t)&&t.every(function(o){return typeof o=="number"})&&(this.cache_.playbackRates=t,this.trigger("playbackrateschange"))},e})(Rr);kd.names.forEach(function(r){var e=kd[r];Hl.prototype[e.getterName]=function(){return this.tech_?this.tech_[e.getterName]():(this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName])}});Hl.prototype.crossorigin=Hl.prototype.crossOrigin;Hl.players={};var W2=bt.navigator;Hl.prototype.options_={techOrder:Ea.defaultTechOrder_,html5:{},inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:W2&&(W2.languages&&W2.languages[0]||W2.userLanguage||W2.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};["ended","seeking","seekable","networkState","readyState"].forEach(function(r){Hl.prototype[r]=function(){return this.techGet_(r)}});YAe.forEach(function(r){Hl.prototype["handleTech"+dl(r)+"_"]=function(){return this.trigger(r)}});Rr.registerComponent("Player",Hl);var O3="plugin",ER="activePlugins_",cR={},D3=function(e){return cR.hasOwnProperty(e)},TV=function(e){return D3(e)?cR[e]:void 0},$Ae=function(e,i){e[ER]=e[ER]||{},e[ER][i]=!0},R3=function(e,i,n){var t=(n?"before":"")+"pluginsetup";e.trigger(t,i),e.trigger(t+":"+i.name,i)},eet=function(e,i){var n=function(){R3(this,{name:e,plugin:i,instance:null},!0);var o=i.apply(this,arguments);return $Ae(this,e),R3(this,{name:e,plugin:i,instance:o}),o};return Object.keys(i).forEach(function(t){n[t]=i[t]}),n},ahe=function(e,i){return i.prototype.name=e,function(){R3(this,{name:e,plugin:i,instance:null},!0);for(var n=arguments.length,t=new Array(n),o=0;o<n;o++)t[o]=arguments[o];var a=TEe(i,[this].concat(t));return this[e]=function(){return a},R3(this,a.getEventHash()),a}},Jv=(function(){function r(i){if(this.constructor===r)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=i,this.log||(this.log=this.player.log.createLogger(this.name)),x9(this),delete this.trigger,gAe(this,this.constructor.defaultState),$Ae(i,this.name),this.dispose=this.dispose.bind(this),i.on("dispose",this.dispose)}var e=r.prototype;return e.version=function(){return this.constructor.VERSION},e.getEventHash=function(n){return n===void 0&&(n={}),n.name=this.name,n.plugin=this.constructor,n.instance=this,n},e.trigger=function(n,t){return t===void 0&&(t={}),$M(this.eventBusEl_,n,this.getEventHash(t))},e.handleStateChanged=function(n){},e.dispose=function(){var n=this.name,t=this.player;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t[ER][n]=!1,this.player=this.state=null,t[n]=ahe(n,cR[n])},r.isBasic=function(n){var t=typeof n=="string"?TV(n):n;return typeof t=="function"&&!r.prototype.isPrototypeOf(t.prototype)},r.registerPlugin=function(n,t){if(typeof n!="string")throw new Error('Illegal plugin name, "'+n+'", must be a string, was '+typeof n+".");if(D3(n))Ln.warn('A plugin named "'+n+'" already exists. You may want to avoid re-registering plugins!');else if(Hl.prototype.hasOwnProperty(n))throw new Error('Illegal plugin name, "'+n+'", cannot share a name with an existing player method!');if(typeof t!="function")throw new Error('Illegal plugin for "'+n+'", must be a function, was '+typeof t+".");return cR[n]=t,n!==O3&&(r.isBasic(t)?Hl.prototype[n]=eet(n,t):Hl.prototype[n]=ahe(n,t)),t},r.deregisterPlugin=function(n){if(n===O3)throw new Error("Cannot de-register base plugin.");D3(n)&&(delete cR[n],delete Hl.prototype[n])},r.getPlugins=function(n){n===void 0&&(n=Object.keys(cR));var t;return n.forEach(function(o){var a=TV(o);a&&(t=t||{},t[o]=a)}),t},r.getPluginVersion=function(n){var t=TV(n);return t&&t.VERSION||""},r})();Jv.getPlugin=TV;Jv.BASE_PLUGIN_NAME=O3;Jv.registerPlugin(O3,Jv);Hl.prototype.usingPlugin=function(r){return!!this[ER]&&this[ER][r]===!0};Hl.prototype.hasPlugin=function(r){return!!D3(r)};var she=!1,tet=function(e,i){i===void 0&&(i={}),she||(Ln.warn("videojs.extend is deprecated as of Video.js 7.22.0 and will be removed in Video.js 8.0.0"),she=!0);var n=function(){e.apply(this,arguments)},t={};typeof i=="object"?(i.constructor!==Object.prototype.constructor&&(n=i.constructor),t=i):typeof i=="function"&&(n=i),UKe(n,e),e&&(n.super_=e);for(var o in t)t.hasOwnProperty(o)&&(n.prototype[o]=t[o]);return n},qAe=function(e){return e.indexOf("#")===0?e.slice(1):e};function kt(r,e,i){var n=kt.getPlayer(r);if(n)return e&&Ln.warn('Player "'+r+'" is already initialised. Options will not be applied.'),i&&n.ready(i),n;var t=typeof r=="string"?zS("#"+qAe(r)):r;if(!YM(t))throw new TypeError("The element or ID supplied is not valid. (videojs)");(!t.ownerDocument.defaultView||!t.ownerDocument.body.contains(t))&&Ln.warn("The element supplied is not included in the DOM"),e=e||{},e.restoreEl===!0&&(e.restoreEl=(t.parentNode&&t.parentNode.hasAttribute("data-vjs-player")?t.parentNode:t).cloneNode(!0)),US("beforesetup").forEach(function(a){var s=a(t,Qa(e));if(!Q0(s)||Array.isArray(s)){Ln.error("please return an object in beforesetup hooks");return}e=Qa(e,s)});var o=Rr.getComponent("Player");return n=new o(t,e,i),US("setup").forEach(function(a){return a(n)}),n}kt.hooks_=F0;kt.hooks=US;kt.hook=wJe;kt.hookOnce=OJe;kt.removeHook=VEe;if(bt.VIDEOJS_NO_DYNAMIC_STYLE!==!0&&GM()){var oB=zS(".vjs-styles-defaults");if(!oB){oB=uAe("vjs-styles-defaults");var KG=zS("head");KG&&KG.insertBefore(oB,KG.firstChild),cAe(oB,`
      .video-js {
        width: 300px;
        height: 150px;
      }

      .vjs-fluid:not(.vjs-audio-only-mode) {
        padding-top: 56.25%
      }
    `)}}d$(1,kt);kt.VERSION=BEe;kt.options=Hl.prototype.options_;kt.getPlayers=function(){return Hl.players};kt.getPlayer=function(r){var e=Hl.players,i;if(typeof r=="string"){var n=qAe(r),t=e[n];if(t)return t;i=zS("#"+n)}else i=r;if(YM(i)){var o=i,a=o.player,s=o.playerId;if(a||e[s])return a||e[s]}};kt.getAllPlayers=function(){return Object.keys(Hl.players).map(function(r){return Hl.players[r]}).filter(Boolean)};kt.players=Hl.players;kt.getComponent=Rr.getComponent;kt.registerComponent=function(r,e){Ea.isTech(e)&&Ln.warn("The "+r+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),Rr.registerComponent.call(Rr,r,e)};kt.getTech=Ea.getTech;kt.registerTech=Ea.registerTech;kt.use=dQe;Object.defineProperty(kt,"middleware",{value:{},writeable:!1,enumerable:!0});Object.defineProperty(kt.middleware,"TERMINATOR",{value:x3,writeable:!1,enumerable:!0});kt.browser=IJe;kt.TOUCH_ENABLED=cM;kt.extend=tet;kt.mergeOptions=Qa;kt.bind=es;kt.registerPlugin=Jv.registerPlugin;kt.deregisterPlugin=Jv.deregisterPlugin;kt.plugin=function(r,e){return Ln.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),Jv.registerPlugin(r,e)};kt.getPlugins=Jv.getPlugins;kt.getPlugin=Jv.getPlugin;kt.getPluginVersion=Jv.getPluginVersion;kt.addLanguage=function(r,e){var i;return r=(""+r).toLowerCase(),kt.options.languages=Qa(kt.options.languages,(i={},i[r]=e,i)),kt.options.languages[r]};kt.log=Ln;kt.createLogger=UEe;kt.createTimeRange=kt.createTimeRanges=y1;kt.formatTime=gM;kt.setFormatTime=DQe;kt.resetFormatTime=RQe;kt.parseUrl=A9;kt.isCrossOrigin=lz;kt.EventTarget=Mu;kt.on=Ah;kt.one=az;kt.off=Yc;kt.trigger=$M;kt.xhr=PEe;kt.TextTrack=bj;kt.AudioTrack=bAe;kt.VideoTrack=SAe;["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(function(r){kt[r]=function(){return Ln.warn("videojs."+r+"() is deprecated; use videojs.dom."+r+"() instead"),sAe[r].apply(null,arguments)}});kt.computedStyle=yF;kt.dom=sAe;kt.url=sQe;kt.defineLazyProperty=Y9;kt.addLanguage("en",{"Non-Fullscreen":"Exit Fullscreen"});/*! @name @videojs/http-streaming @version 2.16.3 @license Apache-2.0 */var cg=ZU,M3=function(e,i,n){return e&&n&&n.responseURL&&i!==n.responseURL?n.responseURL:i},Lg=function(e){return kt.log.debug?kt.log.debug.bind(kt,"VHS:",e+" >"):function(){}},WS=1/30,Iv=WS*3,XAe=function(e,i){var n=[],t;if(e&&e.length)for(t=0;t<e.length;t++)i(e.start(t),e.end(t))&&n.push([e.start(t),e.end(t)]);return kt.createTimeRanges(n)},dR=function(e,i){return XAe(e,function(n,t){return n-Iv<=i&&t+Iv>=i})},aB=function(e,i){return XAe(e,function(n){return n-WS>=i})},ret=function(e){if(e.length<2)return kt.createTimeRanges();for(var i=[],n=1;n<e.length;n++){var t=e.end(n-1),o=e.start(n);i.push([t,o])}return kt.createTimeRanges(i)},iet=function(e,i){var n=null,t=null,o=0,a=[],s=[];if(!e||!e.length||!i||!i.length)return kt.createTimeRange();for(var l=e.length;l--;)a.push({time:e.start(l),type:"start"}),a.push({time:e.end(l),type:"end"});for(l=i.length;l--;)a.push({time:i.start(l),type:"start"}),a.push({time:i.end(l),type:"end"});for(a.sort(function(u,c){return u.time-c.time}),l=0;l<a.length;l++)a[l].type==="start"?(o++,o===2&&(n=a[l].time)):a[l].type==="end"&&(o--,o===1&&(t=a[l].time)),n!==null&&t!==null&&(s.push([n,t]),n=null,t=null);return kt.createTimeRanges(s)},KAe=function(e){var i=[];if(!e||!e.length)return"";for(var n=0;n<e.length;n++)i.push(e.start(n)+" => "+e.end(n));return i.join(", ")},net=function(e,i,n){n===void 0&&(n=1);var t=e.length?e.end(e.length-1):0;return(t-i)/n},Kw=function(e){for(var i=[],n=0;n<e.length;n++)i.push({start:e.start(n),end:e.end(n)});return i},oet=function(e,i){if(e===i)return!1;if(!e&&i||!i&&e||e.length!==i.length)return!0;for(var n=0;n<e.length;n++)if(e.start(n)!==i.start(n)||e.end(n)!==i.end(n))return!0;return!1},lhe=function(e){if(!(!e||!e.length||!e.end))return e.end(e.length-1)},$9=function(e,i){var n=0;if(!e||!e.length)return n;for(var t=0;t<e.length;t++){var o=e.start(t),a=e.end(t);if(!(i>a)){if(i>o&&i<=a){n+=a-i;continue}n+=a-o}}return n},uhe=kt.createTimeRange,q9=function(e,i){if(!i.preload)return i.duration;var n=0;return(i.parts||[]).forEach(function(t){n+=t.duration}),(i.preloadHints||[]).forEach(function(t){t.type==="PART"&&(n+=e.partTargetDuration)}),n},m$=function(e){return(e.segments||[]).reduce(function(i,n,t){return n.parts?n.parts.forEach(function(o,a){i.push({duration:o.duration,segmentIndex:t,partIndex:a,part:o,segment:n})}):i.push({duration:n.duration,segmentIndex:t,partIndex:null,segment:n,part:null}),i},[])},ZAe=function(e){var i=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return i&&i.parts||[]},JAe=function(e){var i=e.preloadSegment;if(i){var n=i.parts,t=i.preloadHints,o=(t||[]).reduce(function(a,s){return a+(s.type==="PART"?1:0)},0);return o+=n&&n.length?n.length:0,o}},QAe=function(e,i){if(i.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;var n=ZAe(i).length>0;return n&&i.serverControl&&i.serverControl.partHoldBack?i.serverControl.partHoldBack:n&&i.partTargetDuration?i.partTargetDuration*3:i.serverControl&&i.serverControl.holdBack?i.serverControl.holdBack:i.targetDuration?i.targetDuration*3:0},aet=function(e,i){var n=0,t=i-e.mediaSequence,o=e.segments[t];if(o){if(typeof o.start<"u")return{result:o.start,precise:!0};if(typeof o.end<"u")return{result:o.end-o.duration,precise:!0}}for(;t--;){if(o=e.segments[t],typeof o.end<"u")return{result:n+o.end,precise:!0};if(n+=q9(e,o),typeof o.start<"u")return{result:n+o.start,precise:!0}}return{result:n,precise:!1}},set=function(e,i){for(var n=0,t,o=i-e.mediaSequence;o<e.segments.length;o++){if(t=e.segments[o],typeof t.start<"u")return{result:t.start-n,precise:!0};if(n+=q9(e,t),typeof t.end<"u")return{result:t.end-n,precise:!0}}return{result:-1,precise:!1}},ewe=function(e,i,n){if(typeof i>"u"&&(i=e.mediaSequence+e.segments.length),i<e.mediaSequence)return 0;var t=aet(e,i);if(t.precise)return t.result;var o=set(e,i);return o.precise?o.result:t.result+n},twe=function(e,i,n){if(!e)return 0;if(typeof n!="number"&&(n=0),typeof i>"u"){if(e.totalDuration)return e.totalDuration;if(!e.endList)return bt.Infinity}return ewe(e,i,n)},wN=function(e){var i=e.defaultDuration,n=e.durationList,t=e.startIndex,o=e.endIndex,a=0;if(t>o){var s=[o,t];t=s[0],o=s[1]}if(t<0){for(var l=t;l<Math.min(0,o);l++)a+=i;t=0}for(var u=t;u<o;u++)a+=n[u].duration;return a},rwe=function(e,i,n,t){if(!e||!e.segments)return null;if(e.endList)return twe(e);if(i===null)return null;i=i||0;var o=ewe(e,e.mediaSequence+e.segments.length,i);return n&&(t=typeof t=="number"?t:QAe(null,e),o-=t),Math.max(0,o)},uet=function(e,i,n){var t=!0,o=i||0,a=rwe(e,i,t,n);return a===null?uhe():uhe(o,a)},cet=function(e){for(var i=e.playlist,n=e.currentTime,t=e.startingSegmentIndex,o=e.startingPartIndex,a=e.startTime,s=e.experimentalExactManifestTimings,l=n-a,u=m$(i),c=0,d=0;d<u.length;d++){var f=u[d];if(t===f.segmentIndex&&!(typeof o=="number"&&typeof f.partIndex=="number"&&o!==f.partIndex)){c=d;break}}if(l<0){if(c>0)for(var h=c-1;h>=0;h--){var p=u[h];if(l+=p.duration,s){if(l<0)continue}else if(l+WS<=0)continue;return{partIndex:p.partIndex,segmentIndex:p.segmentIndex,startTime:a-wN({defaultDuration:i.targetDuration,durationList:u,startIndex:c,endIndex:h})}}return{partIndex:u[0]&&u[0].partIndex||null,segmentIndex:u[0]&&u[0].segmentIndex||0,startTime:n}}if(c<0){for(var g=c;g<0;g++)if(l-=i.targetDuration,l<0)return{partIndex:u[0]&&u[0].partIndex||null,segmentIndex:u[0]&&u[0].segmentIndex||0,startTime:n};c=0}for(var v=c;v<u.length;v++){var y=u[v];if(l-=y.duration,s){if(l>0)continue}else if(l-WS>=0)continue;return{partIndex:y.partIndex,segmentIndex:y.segmentIndex,startTime:a+wN({defaultDuration:i.targetDuration,durationList:u,startIndex:c,endIndex:v})}}return{segmentIndex:u[u.length-1].segmentIndex,partIndex:u[u.length-1].partIndex,startTime:n}},iwe=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},X9=function(e){return e.excludeUntil&&e.excludeUntil===1/0},fz=function(e){var i=iwe(e);return!e.disabled&&!i},det=function(e){return e.disabled},fet=function(e){for(var i=0;i<e.segments.length;i++)if(e.segments[i].key)return!0;return!1},nwe=function(e,i){return i.attributes&&i.attributes[e]},het=function(e,i,n,t){if(t===void 0&&(t=0),!nwe("BANDWIDTH",n))return NaN;var o=e*n.attributes.BANDWIDTH;return(o-t*8)/i},b$=function(e,i){if(e.playlists.length===1)return!0;var n=i.attributes.BANDWIDTH||Number.MAX_VALUE;return e.playlists.filter(function(t){return fz(t)?(t.attributes.BANDWIDTH||0)<n:!1}).length===0},K9=function(e,i){return!e&&!i||!e&&i||e&&!i?!1:!!(e===i||e.id&&i.id&&e.id===i.id||e.resolvedUri&&i.resolvedUri&&e.resolvedUri===i.resolvedUri||e.uri&&i.uri&&e.uri===i.uri)},che=function(e,i){var n=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{},t=!1;for(var o in n){for(var a in n[o])if(t=i(n[o][a]),t)break;if(t)break}return!!t},Pj=function(e){if(!e||!e.playlists||!e.playlists.length){var i=che(e,function(a){return a.playlists&&a.playlists.length||a.uri});return i}for(var n=function(s){var l=e.playlists[s],u=l.attributes&&l.attributes.CODECS;if(u&&u.split(",").every(function(d){return AEe(d)}))return"continue";var c=che(e,function(d){return K9(l,d)});return c?"continue":{v:!1}},t=0;t<e.playlists.length;t++){var o=n(t);if(o!=="continue"&&typeof o=="object")return o.v}return!0},wf={liveEdgeDelay:QAe,duration:twe,seekable:uet,getMediaInfoForTime:cet,isEnabled:fz,isDisabled:det,isBlacklisted:iwe,isIncompatible:X9,playlistEnd:rwe,isAes:fet,hasAttribute:nwe,estimateSegmentRequestTime:het,isLowestEnabledRendition:b$,isAudioOnly:Pj,playlistMatch:K9,segmentDurationWithParts:q9},owe=kt.log,Z9=function(e,i){return e+"-"+i},pet=function(e,i,n){return"placeholder-uri-"+e+"-"+i+"-"+n},get=function(e){var i=e.onwarn,n=e.oninfo,t=e.manifestString,o=e.customTagParsers,a=o===void 0?[]:o,s=e.customTagMappers,l=s===void 0?[]:s,u=e.experimentalLLHLS,c=new ZKe;i&&c.on("warn",i),n&&c.on("info",n),a.forEach(function(g){return c.addParser(g)}),l.forEach(function(g){return c.addTagMapper(g)}),c.push(t),c.end();var d=c.manifest;if(u||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach(function(g){d.hasOwnProperty(g)&&delete d[g]}),d.segments&&d.segments.forEach(function(g){["parts","preloadHints"].forEach(function(v){g.hasOwnProperty(v)&&delete g[v]})})),!d.targetDuration){var f=10;d.segments&&d.segments.length&&(f=d.segments.reduce(function(g,v){return Math.max(g,v.duration)},0)),i&&i("manifest has no targetDuration defaulting to "+f),d.targetDuration=f}var h=ZAe(d);if(h.length&&!d.partTargetDuration){var p=h.reduce(function(g,v){return Math.max(g,v.duration)},0);i&&(i("manifest has no partTargetDuration defaulting to "+p),owe.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.")),d.partTargetDuration=p}return d},JM=function(e,i){e.mediaGroups&&["AUDIO","SUBTITLES"].forEach(function(n){if(e.mediaGroups[n])for(var t in e.mediaGroups[n])for(var o in e.mediaGroups[n][t]){var a=e.mediaGroups[n][t][o];i(a,n,t,o)}})},awe=function(e){var i=e.playlist,n=e.uri,t=e.id;i.id=t,i.playlistErrors_=0,n&&(i.uri=n),i.attributes=i.attributes||{}},vet=function(e){for(var i=e.playlists.length;i--;){var n=e.playlists[i];awe({playlist:n,id:Z9(i,n.uri)}),n.resolvedUri=cg(e.uri,n.uri),e.playlists[n.id]=n,e.playlists[n.uri]=n,n.attributes.BANDWIDTH||owe.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}},yet=function(e){JM(e,function(i){i.uri&&(i.resolvedUri=cg(e.uri,i.uri))})},met=function(e,i){var n=Z9(0,i),t={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:bt.location.href,resolvedUri:bt.location.href,playlists:[{uri:i,id:n,resolvedUri:i,attributes:{}}]};return t.playlists[n]=t.playlists[0],t.playlists[i]=t.playlists[0],t},swe=function(e,i,n){n===void 0&&(n=pet),e.uri=i;for(var t=0;t<e.playlists.length;t++)if(!e.playlists[t].uri){var o="placeholder-uri-"+t;e.playlists[t].uri=o}var a=Pj(e);JM(e,function(s,l,u,c){if(!s.playlists||!s.playlists.length){if(a&&l==="AUDIO"&&!s.uri)for(var d=0;d<e.playlists.length;d++){var f=e.playlists[d];if(f.attributes&&f.attributes.AUDIO&&f.attributes.AUDIO===u)return}s.playlists=[wn({},s)]}s.playlists.forEach(function(h,p){var g=n(l,u,c,h),v=Z9(p,g);h.uri?h.resolvedUri=h.resolvedUri||cg(e.uri,h.uri):(h.uri=p===0?g:v,h.resolvedUri=h.uri),h.id=h.id||v,h.attributes=h.attributes||{},e.playlists[h.id]=h,e.playlists[h.uri]=h})}),vet(e),yet(e)},L3=kt.mergeOptions,bet=kt.EventTarget,_et=function(e,i){if(i.endList||!i.serverControl)return e;var n={};if(i.serverControl.canBlockReload){var t=i.preloadSegment,o=i.mediaSequence+i.segments.length;if(t){var a=t.parts||[],s=JAe(i)-1;s>-1&&s!==a.length-1&&(n._HLS_part=s),(s>-1||a.length)&&o--}n._HLS_msn=o}if(i.serverControl&&i.serverControl.canSkipUntil&&(n._HLS_skip=i.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(n).length){var l=new bt.URL(e);["_HLS_skip","_HLS_msn","_HLS_part"].forEach(function(u){n.hasOwnProperty(u)&&l.searchParams.set(u,n[u])}),e=l.toString()}return e},Pet=function(e,i){if(!e)return i;var n=L3(e,i);if(e.preloadHints&&!i.preloadHints&&delete n.preloadHints,e.parts&&!i.parts)delete n.parts;else if(e.parts&&i.parts)for(var t=0;t<i.parts.length;t++)e.parts&&e.parts[t]&&(n.parts[t]=L3(e.parts[t],i.parts[t]));return!e.skipped&&i.skipped&&(n.skipped=!1),e.preload&&!i.preload&&(n.preload=!1),n},Cet=function(e,i,n){var t=e.slice(),o=i.slice();n=n||0;for(var a=[],s,l=0;l<o.length;l++){var u=t[l+n],c=o[l];u?(s=u.map||s,a.push(Pet(u,c))):(s&&!c.map&&(c.map=s),a.push(c))}return a},lwe=function(e,i){!e.resolvedUri&&e.uri&&(e.resolvedUri=cg(i,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=cg(i,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=cg(i,e.map.uri)),e.map&&e.map.key&&!e.map.key.resolvedUri&&(e.map.key.resolvedUri=cg(i,e.map.key.uri)),e.parts&&e.parts.length&&e.parts.forEach(function(n){n.resolvedUri||(n.resolvedUri=cg(i,n.uri))}),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach(function(n){n.resolvedUri||(n.resolvedUri=cg(i,n.uri))})},uwe=function(e){var i=e.segments||[],n=e.preloadSegment;if(n&&n.parts&&n.parts.length){if(n.preloadHints){for(var t=0;t<n.preloadHints.length;t++)if(n.preloadHints[t].type==="MAP")return i}n.duration=e.targetDuration,n.preload=!0,i.push(n)}return i},cwe=function(e,i){return e===i||e.segments&&i.segments&&e.segments.length===i.segments.length&&e.endList===i.endList&&e.mediaSequence===i.mediaSequence&&e.preloadSegment===i.preloadSegment},S$=function(e,i,n){n===void 0&&(n=cwe);var t=L3(e,{}),o=t.playlists[i.id];if(!o||n(o,i))return null;i.segments=uwe(i);var a=L3(o,i);if(a.preloadSegment&&!i.preloadSegment&&delete a.preloadSegment,o.segments){if(i.skip){i.segments=i.segments||[];for(var s=0;s<i.skip.skippedSegments;s++)i.segments.unshift({skipped:!0})}a.segments=Cet(o.segments,i.segments,i.mediaSequence-o.mediaSequence)}a.segments.forEach(function(u){lwe(u,a.resolvedUri)});for(var l=0;l<t.playlists.length;l++)t.playlists[l].id===i.id&&(t.playlists[l]=a);return t.playlists[i.id]=a,t.playlists[i.uri]=a,JM(e,function(u,c,d,f){if(u.playlists)for(var h=0;h<u.playlists.length;h++)i.id===u.playlists[h].id&&(u.playlists[h]=a)}),t},_$=function(e,i){var n=e.segments||[],t=n[n.length-1],o=t&&t.parts&&t.parts[t.parts.length-1],a=o&&o.duration||t&&t.duration;return i&&a?a*1e3:(e.partTargetDuration||e.targetDuration||10)*500},fR=(function(r){zr(e,r);function e(n,t,o){var a;if(o===void 0&&(o={}),a=r.call(this)||this,!n)throw new Error("A non-empty playlist URL or object is required");a.logger_=Lg("PlaylistLoader");var s=o,l=s.withCredentials,u=l===void 0?!1:l,c=s.handleManifestRedirects,d=c===void 0?!1:c;a.src=n,a.vhs_=t,a.withCredentials=u,a.handleManifestRedirects=d;var f=t.options_;return a.customTagParsers=f&&f.customTagParsers||[],a.customTagMappers=f&&f.customTagMappers||[],a.experimentalLLHLS=f&&f.experimentalLLHLS||!1,kt.browser.IE_VERSION&&(a.experimentalLLHLS=!1),a.state="HAVE_NOTHING",a.handleMediaupdatetimeout_=a.handleMediaupdatetimeout_.bind(sn(a)),a.on("mediaupdatetimeout",a.handleMediaupdatetimeout_),a}var i=e.prototype;return i.handleMediaupdatetimeout_=function(){var t=this;if(this.state==="HAVE_METADATA"){var o=this.media(),a=cg(this.master.uri,o.uri);this.experimentalLLHLS&&(a=_et(a,o)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:a,withCredentials:this.withCredentials},function(s,l){if(t.request){if(s)return t.playlistRequestError(t.request,t.media(),"HAVE_METADATA");t.haveMetadata({playlistString:t.request.responseText,url:t.media().uri,id:t.media().id})}})}},i.playlistRequestError=function(t,o,a){var s=o.uri,l=o.id;this.request=null,a&&(this.state=a),this.error={playlist:this.master.playlists[l],status:t.status,message:"HLS playlist request error at URL: "+s+".",responseText:t.responseText,code:t.status>=500?4:2},this.trigger("error")},i.parseManifest_=function(t){var o=this,a=t.url,s=t.manifestString;return get({onwarn:function(u){var c=u.message;return o.logger_("m3u8-parser warn for "+a+": "+c)},oninfo:function(u){var c=u.message;return o.logger_("m3u8-parser info for "+a+": "+c)},manifestString:s,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,experimentalLLHLS:this.experimentalLLHLS})},i.haveMetadata=function(t){var o=t.playlistString,a=t.playlistObject,s=t.url,l=t.id;this.request=null,this.state="HAVE_METADATA";var u=a||this.parseManifest_({url:s,manifestString:o});u.lastRequest=Date.now(),awe({playlist:u,uri:s,id:l});var c=S$(this.master,u);this.targetDuration=u.partTargetDuration||u.targetDuration,this.pendingMedia_=null,c?(this.master=c,this.media_=this.master.playlists[l]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(_$(this.media(),!!c)),this.trigger("loadedplaylist")},i.dispose=function(){this.trigger("dispose"),this.stopRequest(),bt.clearTimeout(this.mediaUpdateTimeout),bt.clearTimeout(this.finalRenditionTimeout),this.off()},i.stopRequest=function(){if(this.request){var t=this.request;this.request=null,t.onreadystatechange=null,t.abort()}},i.media=function(t,o){var a=this;if(!t)return this.media_;if(this.state==="HAVE_NOTHING")throw new Error("Cannot switch media playlist from "+this.state);if(typeof t=="string"){if(!this.master.playlists[t])throw new Error("Unknown playlist URI: "+t);t=this.master.playlists[t]}if(bt.clearTimeout(this.finalRenditionTimeout),o){var s=(t.partTargetDuration||t.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=bt.setTimeout(this.media.bind(this,t,!1),s);return}var l=this.state,u=!this.media_||t.id!==this.media_.id,c=this.master.playlists[t.id];if(c&&c.endList||t.endList&&t.segments.length){this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=t,u&&(this.trigger("mediachanging"),l==="HAVE_MASTER"?this.trigger("loadedmetadata"):this.trigger("mediachange"));return}if(this.updateMediaUpdateTimeout_(_$(t,!0)),!!u){if(this.state="SWITCHING_MEDIA",this.request){if(t.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.pendingMedia_=t,this.request=this.vhs_.xhr({uri:t.resolvedUri,withCredentials:this.withCredentials},function(d,f){if(a.request){if(t.lastRequest=Date.now(),t.resolvedUri=M3(a.handleManifestRedirects,t.resolvedUri,f),d)return a.playlistRequestError(a.request,t,l);a.haveMetadata({playlistString:f.responseText,url:t.uri,id:t.id}),l==="HAVE_MASTER"?a.trigger("loadedmetadata"):a.trigger("mediachange")}})}},i.pause=function(){this.mediaUpdateTimeout&&(bt.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_MASTER":this.state==="HAVE_CURRENT_METADATA"&&(this.state="HAVE_METADATA")},i.load=function(t){var o=this;this.mediaUpdateTimeout&&(bt.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);var a=this.media();if(t){var s=a?(a.partTargetDuration||a.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=bt.setTimeout(function(){o.mediaUpdateTimeout=null,o.load()},s);return}if(!this.started){this.start();return}a&&!a.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist")},i.updateMediaUpdateTimeout_=function(t){var o=this;this.mediaUpdateTimeout&&(bt.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),!(!this.media()||this.media().endList)&&(this.mediaUpdateTimeout=bt.setTimeout(function(){o.mediaUpdateTimeout=null,o.trigger("mediaupdatetimeout"),o.updateMediaUpdateTimeout_(t)},t))},i.start=function(){var t=this;if(this.started=!0,typeof this.src=="object"){this.src.uri||(this.src.uri=bt.location.href),this.src.resolvedUri=this.src.uri,setTimeout(function(){t.setupInitialPlaylist(t.src)},0);return}this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials},function(o,a){if(t.request){if(t.request=null,o)return t.error={status:a.status,message:"HLS playlist request error at URL: "+t.src+".",responseText:a.responseText,code:2},t.state==="HAVE_NOTHING"&&(t.started=!1),t.trigger("error");t.src=M3(t.handleManifestRedirects,t.src,a);var s=t.parseManifest_({manifestString:a.responseText,url:t.src});t.setupInitialPlaylist(s)}})},i.srcUri=function(){return typeof this.src=="string"?this.src:this.src.uri},i.setupInitialPlaylist=function(t){if(this.state="HAVE_MASTER",t.playlists){this.master=t,swe(this.master,this.srcUri()),t.playlists.forEach(function(a){a.segments=uwe(a),a.segments.forEach(function(s){lwe(s,a.resolvedUri)})}),this.trigger("loadedplaylist"),this.request||this.media(this.master.playlists[0]);return}var o=this.srcUri()||bt.location.href;this.master=met(t,o),this.haveMetadata({playlistObject:t,url:o,id:this.master.playlists[0].id}),this.trigger("loadedmetadata")},e})(bet),Tet=kt.xhr,xet=kt.mergeOptions,P$=function(e,i,n,t){var o=e.responseType==="arraybuffer"?e.response:e.responseText;!i&&o&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=o.byteLength||o.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),n.headers&&(e.responseHeaders=n.headers),i&&i.code==="ETIMEDOUT"&&(e.timedout=!0),!i&&!e.aborted&&n.statusCode!==200&&n.statusCode!==206&&n.statusCode!==0&&(i=new Error("XHR Failed with a response of: "+(e&&(o||e.responseText)))),t(i,e)},dwe=function(){var e=function i(n,t){n=xet({timeout:45e3},n);var o=i.beforeRequest||kt.Vhs.xhr.beforeRequest;if(o&&typeof o=="function"){var a=o(n);a&&(n=a)}var s=kt.Vhs.xhr.original===!0?Tet:kt.Vhs.xhr,l=s(n,function(c,d){return P$(l,c,d,t)}),u=l.abort;return l.abort=function(){return l.aborted=!0,u.apply(l,arguments)},l.uri=n.uri,l.requestTime=Date.now(),l};return e.original=!0,e},Eet=function(e){var i,n=e.offset;return typeof e.offset=="bigint"||typeof e.length=="bigint"?i=bt.BigInt(e.offset)+bt.BigInt(e.length)-bt.BigInt(1):i=e.offset+e.length-1,"bytes="+n+"-"+i},C$=function(e){var i={};return e.byterange&&(i.Range=Eet(e.byterange)),i},Aet=function(e,i){return e.start(i)+"-"+e.end(i)},wet=function(e,i){var n=e.toString(16);return"00".substring(0,2-n.length)+n+(i%2?" ":"")},Oet=function(e){return e>=32&&e<126?String.fromCharCode(e):"."},fwe=function(e){var i={};return Object.keys(e).forEach(function(n){var t=e[n];OEe(t)?i[n]={bytes:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength}:i[n]=t}),i},k3=function(e){var i=e.byterange||{length:1/0,offset:0};return[i.length,i.offset,e.resolvedUri].join(",")},hwe=function(e){return e.resolvedUri},pwe=function(e){for(var i=Array.prototype.slice.call(e),n=16,t="",o,a,s=0;s<i.length/n;s++)o=i.slice(s*n,s*n+n).map(wet).join(""),a=i.slice(s*n,s*n+n).map(Oet).join(""),t+=o+" "+a+`
`;return t},Det=function(e){var i=e.bytes;return pwe(i)},Ret=function(e){var i="",n;for(n=0;n<e.length;n++)i+=Aet(e,n)+" ";return i},Met=Object.freeze({__proto__:null,createTransferableMessage:fwe,initSegmentId:k3,segmentKeyId:hwe,hexDump:pwe,tagDump:Det,textRanges:Ret}),gwe=.25,Let=function(e,i){if(!i.dateTimeObject)return null;var n=i.videoTimingInfo.transmuxerPrependedSeconds,t=i.videoTimingInfo.transmuxedPresentationStart,o=t+n,a=e-o;return new Date(i.dateTimeObject.getTime()+a*1e3)},ket=function(e){return e.transmuxedPresentationEnd-e.transmuxedPresentationStart-e.transmuxerPrependedSeconds},Iet=function(e,i){var n;try{n=new Date(e)}catch{return null}if(!i||!i.segments||i.segments.length===0)return null;var t=i.segments[0];if(n<t.dateTimeObject)return null;for(var o=0;o<i.segments.length-1;o++){t=i.segments[o];var a=i.segments[o+1].dateTimeObject;if(n<a)break}var s=i.segments[i.segments.length-1],l=s.dateTimeObject,u=s.videoTimingInfo?ket(s.videoTimingInfo):s.duration+s.duration*gwe,c=new Date(l.getTime()+u*1e3);return n>c?null:(n>l&&(t=s),{segment:t,estimatedStart:t.videoTimingInfo?t.videoTimingInfo.transmuxedPresentationStart:wf.duration(i,i.mediaSequence+i.segments.indexOf(t)),type:t.videoTimingInfo?"accurate":"estimate"})},Net=function(e,i){if(!i||!i.segments||i.segments.length===0)return null;for(var n=0,t,o=0;o<i.segments.length&&(t=i.segments[o],n=t.videoTimingInfo?t.videoTimingInfo.transmuxedPresentationEnd:n+t.duration,!(e<=n));o++);var a=i.segments[i.segments.length-1];if(a.videoTimingInfo&&a.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>n){if(e>n+a.duration*gwe)return null;t=a}return{segment:t,estimatedStart:t.videoTimingInfo?t.videoTimingInfo.transmuxedPresentationStart:n-t.duration,type:t.videoTimingInfo?"accurate":"estimate"}},Fet=function(e,i){var n,t;try{n=new Date(e),t=new Date(i)}catch{}var o=n.getTime(),a=t.getTime();return(a-o)/1e3},jet=function(e){if(!e.segments||e.segments.length===0)return!1;for(var i=0;i<e.segments.length;i++){var n=e.segments[i];if(!n.dateTimeObject)return!1}return!0},Bet=function(e){var i=e.playlist,n=e.time,t=n===void 0?void 0:n,o=e.callback;if(!o)throw new Error("getProgramTime: callback must be provided");if(!i||t===void 0)return o({message:"getProgramTime: playlist and time must be provided"});var a=Net(t,i);if(!a)return o({message:"valid programTime was not found"});if(a.type==="estimate")return o({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:a.estimatedStart});var s={mediaSeconds:t},l=Let(t,a.segment);return l&&(s.programDateTime=l.toISOString()),o(null,s)},Vet=function r(e){var i=e.programTime,n=e.playlist,t=e.retryCount,o=t===void 0?2:t,a=e.seekTo,s=e.pauseAfterSeek,l=s===void 0?!0:s,u=e.tech,c=e.callback;if(!c)throw new Error("seekToProgramTime: callback must be provided");if(typeof i>"u"||!n||!a)return c({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!n.endList&&!u.hasStarted_)return c({message:"player must be playing a live stream to start buffering"});if(!jet(n))return c({message:"programDateTime tags must be provided in the manifest "+n.resolvedUri});var d=Iet(i,n);if(!d)return c({message:i+" was not found in the stream"});var f=d.segment,h=Fet(f.dateTimeObject,i);if(d.type==="estimate"){if(o===0)return c({message:i+" is not buffered yet. Try again"});a(d.estimatedStart+h),u.one("seeked",function(){r({programTime:i,playlist:n,retryCount:o-1,seekTo:a,pauseAfterSeek:l,tech:u,callback:c})});return}var p=f.start+h,g=function(){return c(null,u.currentTime())};u.one("seeked",g),l&&u.pause(),a(p)},ZG=function(e,i){if(e.readyState===4)return i()},Het=function(e,i,n){var t=[],o,a=!1,s=function(f,h,p,g){return h.abort(),a=!0,n(f,h,p,g)},l=function(f,h){if(!a){if(f)return s(f,h,"",t);var p=h.responseText.substring(t&&t.byteLength||0,h.responseText.length);if(t=uZe(t,DEe(p,!0)),o=o||cN(t),t.length<10||o&&t.length<o+2)return ZG(h,function(){return s(f,h,"",t)});var g=y9(t);return g==="ts"&&t.length<188?ZG(h,function(){return s(f,h,"",t)}):!g&&t.length<376?ZG(h,function(){return s(f,h,"",t)}):s(null,h,g,t)}},u={uri:e,beforeSend:function(f){f.overrideMimeType("text/plain; charset=x-user-defined"),f.addEventListener("progress",function(h){return h.total,h.loaded,P$(f,null,{statusCode:f.status},l)})}},c=i(u,function(d,f){return P$(c,d,f,l)});return c},Uet=kt.EventTarget,vwe=kt.mergeOptions,dhe=function(e,i){if(!cwe(e,i)||e.sidx&&i.sidx&&(e.sidx.offset!==i.sidx.offset||e.sidx.length!==i.sidx.length))return!1;if(!e.sidx&&i.sidx||e.sidx&&!i.sidx||e.segments&&!i.segments||!e.segments&&i.segments)return!1;if(!e.segments&&!i.segments)return!0;for(var n=0;n<e.segments.length;n++){var t=e.segments[n],o=i.segments[n];if(t.uri!==o.uri)return!1;if(!(!t.byterange&&!o.byterange)){var a=t.byterange,s=o.byterange;if(a&&!s||!a&&s||a.offset!==s.offset||a.length!==s.length)return!1}}return!0},zet=function(e,i,n,t){var o=t.attributes.NAME||n;return"placeholder-uri-"+e+"-"+i+"-"+o},Wet=function(e){var i=e.masterXml,n=e.srcUrl,t=e.clientOffset,o=e.sidxMapping,a=e.previousManifest,s=oJe(i,{manifestUri:n,clientOffset:t,sidxMapping:o,previousManifest:a});return swe(s,n,zet),s},Get=function(e,i){JM(e,function(n,t,o,a){a in i.mediaGroups[t][o]||delete e.mediaGroups[t][o][a]})},Yet=function(e,i,n){for(var t=!0,o=vwe(e,{duration:i.duration,minimumUpdatePeriod:i.minimumUpdatePeriod,timelineStarts:i.timelineStarts}),a=0;a<i.playlists.length;a++){var s=i.playlists[a];if(s.sidx){var l=ez(s.sidx);n&&n[l]&&n[l].sidx&&h9(s,n[l].sidx,s.sidx.resolvedUri)}var u=S$(o,s,dhe);u&&(o=u,t=!1)}return JM(i,function(c,d,f,h){if(c.playlists&&c.playlists.length){var p=c.playlists[0].id,g=S$(o,c.playlists[0],dhe);g&&(o=g,h in o.mediaGroups[d][f]||(o.mediaGroups[d][f][h]=c),o.mediaGroups[d][f][h].playlists[0]=o.playlists[p],t=!1)}}),Get(o,i),i.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(t=!1),t?null:o},$et=function(e,i){var n=!e.map&&!i.map,t=n||!!(e.map&&i.map&&e.map.byterange.offset===i.map.byterange.offset&&e.map.byterange.length===i.map.byterange.length);return t&&e.uri===i.uri&&e.byterange.offset===i.byterange.offset&&e.byterange.length===i.byterange.length},fhe=function(e,i){var n={};for(var t in e){var o=e[t],a=o.sidx;if(a){var s=ez(a);if(!i[s])break;var l=i[s].sidxInfo;$et(l,a)&&(n[s]=i[s])}}return n},qet=function(e,i){var n=fhe(e.playlists,i),t=n;return JM(e,function(o,a,s,l){if(o.playlists&&o.playlists.length){var u=o.playlists;t=vwe(t,fhe(u,i))}}),t},T$=(function(r){zr(e,r);function e(n,t,o,a){var s;o===void 0&&(o={}),s=r.call(this)||this,s.masterPlaylistLoader_=a||sn(s),a||(s.isMaster_=!0);var l=o,u=l.withCredentials,c=u===void 0?!1:u,d=l.handleManifestRedirects,f=d===void 0?!1:d;if(s.vhs_=t,s.withCredentials=c,s.handleManifestRedirects=f,!n)throw new Error("A non-empty playlist URL or object is required");return s.on("minimumUpdatePeriod",function(){s.refreshXml_()}),s.on("mediaupdatetimeout",function(){s.refreshMedia_(s.media().id)}),s.state="HAVE_NOTHING",s.loadedPlaylists_={},s.logger_=Lg("DashPlaylistLoader"),s.isMaster_?(s.masterPlaylistLoader_.srcUrl=n,s.masterPlaylistLoader_.sidxMapping_={}):s.childPlaylist_=n,s}var i=e.prototype;return i.requestErrored_=function(t,o,a){if(!this.request)return!0;if(this.request=null,t)return this.error=typeof t=="object"&&!(t instanceof Error)?t:{status:o.status,message:"DASH request error at URL: "+o.uri,response:o.response,code:2},a&&(this.state=a),this.trigger("error"),!0},i.addSidxSegments_=function(t,o,a){var s=this,l=t.sidx&&ez(t.sidx);if(!t.sidx||!l||this.masterPlaylistLoader_.sidxMapping_[l]){this.mediaRequest_=bt.setTimeout(function(){return a(!1)},0);return}var u=M3(this.handleManifestRedirects,t.sidx.resolvedUri),c=function(f,h){if(!s.requestErrored_(f,h,o)){var p=s.masterPlaylistLoader_.sidxMapping_,g;try{g=cJe(Mi(h.response).subarray(8))}catch(v){s.requestErrored_(v,h,o);return}return p[l]={sidxInfo:t.sidx,sidx:g},h9(t,g,t.sidx.resolvedUri),a(!0)}};this.request=Het(u,this.vhs_.xhr,function(d,f,h,p){if(d)return c(d,f);if(!h||h!=="mp4")return c({status:f.status,message:"Unsupported "+(h||"unknown")+" container type for sidx segment at URL: "+u,response:"",playlist:t,internal:!0,blacklistDuration:1/0,code:2},f);var g=t.sidx.byterange,v=g.offset,y=g.length;if(p.length>=y+v)return c(d,{response:p.subarray(v,v+y),status:f.status,uri:f.uri});s.request=s.vhs_.xhr({uri:u,responseType:"arraybuffer",headers:C$({byterange:t.sidx.byterange})},c)})},i.dispose=function(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},bt.clearTimeout(this.minimumUpdatePeriodTimeout_),bt.clearTimeout(this.mediaRequest_),bt.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.off()},i.hasPendingRequest=function(){return this.request||this.mediaRequest_},i.stopRequest=function(){if(this.request){var t=this.request;this.request=null,t.onreadystatechange=null,t.abort()}},i.media=function(t){var o=this;if(!t)return this.media_;if(this.state==="HAVE_NOTHING")throw new Error("Cannot switch media playlist from "+this.state);var a=this.state;if(typeof t=="string"){if(!this.masterPlaylistLoader_.master.playlists[t])throw new Error("Unknown playlist URI: "+t);t=this.masterPlaylistLoader_.master.playlists[t]}var s=!this.media_||t.id!==this.media_.id;if(s&&this.loadedPlaylists_[t.id]&&this.loadedPlaylists_[t.id].endList){this.state="HAVE_METADATA",this.media_=t,s&&(this.trigger("mediachanging"),this.trigger("mediachange"));return}s&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(t,a,function(l){o.haveMetadata({startingState:a,playlist:t})}))},i.haveMetadata=function(t){var o=t.startingState,a=t.playlist;this.state="HAVE_METADATA",this.loadedPlaylists_[a.id]=a,this.mediaRequest_=null,this.refreshMedia_(a.id),o==="HAVE_MASTER"?this.trigger("loadedmetadata"):this.trigger("mediachange")},i.pause=function(){this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),bt.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMaster_&&(bt.clearTimeout(this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_),this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_=null),this.state==="HAVE_NOTHING"&&(this.started=!1)},i.load=function(t){var o=this;bt.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;var a=this.media();if(t){var s=a?a.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=bt.setTimeout(function(){return o.load()},s);return}if(!this.started){this.start();return}a&&!a.endList?(this.isMaster_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist")},i.start=function(){var t=this;if(this.started=!0,!this.isMaster_){this.mediaRequest_=bt.setTimeout(function(){return t.haveMaster_()},0);return}this.requestMaster_(function(o,a){t.haveMaster_(),!t.hasPendingRequest()&&!t.media_&&t.media(t.masterPlaylistLoader_.master.playlists[0])})},i.requestMaster_=function(t){var o=this;this.request=this.vhs_.xhr({uri:this.masterPlaylistLoader_.srcUrl,withCredentials:this.withCredentials},function(a,s){if(o.requestErrored_(a,s)){o.state==="HAVE_NOTHING"&&(o.started=!1);return}var l=s.responseText!==o.masterPlaylistLoader_.masterXml_;if(o.masterPlaylistLoader_.masterXml_=s.responseText,s.responseHeaders&&s.responseHeaders.date?o.masterLoaded_=Date.parse(s.responseHeaders.date):o.masterLoaded_=Date.now(),o.masterPlaylistLoader_.srcUrl=M3(o.handleManifestRedirects,o.masterPlaylistLoader_.srcUrl,s),l){o.handleMaster_(),o.syncClientServerClock_(function(){return t(s,l)});return}return t(s,l)})},i.syncClientServerClock_=function(t){var o=this,a=aJe(this.masterPlaylistLoader_.masterXml_);if(a===null)return this.masterPlaylistLoader_.clientOffset_=this.masterLoaded_-Date.now(),t();if(a.method==="DIRECT")return this.masterPlaylistLoader_.clientOffset_=a.value-Date.now(),t();this.request=this.vhs_.xhr({uri:cg(this.masterPlaylistLoader_.srcUrl,a.value),method:a.method,withCredentials:this.withCredentials},function(s,l){if(o.request){if(s)return o.masterPlaylistLoader_.clientOffset_=o.masterLoaded_-Date.now(),t();var u;a.method==="HEAD"?!l.responseHeaders||!l.responseHeaders.date?u=o.masterLoaded_:u=Date.parse(l.responseHeaders.date):u=Date.parse(l.responseText),o.masterPlaylistLoader_.clientOffset_=u-Date.now(),t()}})},i.haveMaster_=function(){this.state="HAVE_MASTER",this.isMaster_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)},i.handleMaster_=function(){this.mediaRequest_=null;var t=this.masterPlaylistLoader_.master,o=Wet({masterXml:this.masterPlaylistLoader_.masterXml_,srcUrl:this.masterPlaylistLoader_.srcUrl,clientOffset:this.masterPlaylistLoader_.clientOffset_,sidxMapping:this.masterPlaylistLoader_.sidxMapping_,previousManifest:t});t&&(o=Yet(t,o,this.masterPlaylistLoader_.sidxMapping_)),this.masterPlaylistLoader_.master=o||t;var a=this.masterPlaylistLoader_.master.locations&&this.masterPlaylistLoader_.master.locations[0];return a&&a!==this.masterPlaylistLoader_.srcUrl&&(this.masterPlaylistLoader_.srcUrl=a),(!t||o&&o.minimumUpdatePeriod!==t.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),!!o},i.updateMinimumUpdatePeriodTimeout_=function(){var t=this.masterPlaylistLoader_;t.createMupOnMedia_&&(t.off("loadedmetadata",t.createMupOnMedia_),t.createMupOnMedia_=null),t.minimumUpdatePeriodTimeout_&&(bt.clearTimeout(t.minimumUpdatePeriodTimeout_),t.minimumUpdatePeriodTimeout_=null);var o=t.master&&t.master.minimumUpdatePeriod;if(o===0&&(t.media()?o=t.media().targetDuration*1e3:(t.createMupOnMedia_=t.updateMinimumUpdatePeriodTimeout_,t.one("loadedmetadata",t.createMupOnMedia_))),typeof o!="number"||o<=0){o<0&&this.logger_("found invalid minimumUpdatePeriod of "+o+", not setting a timeout");return}this.createMUPTimeout_(o)},i.createMUPTimeout_=function(t){var o=this.masterPlaylistLoader_;o.minimumUpdatePeriodTimeout_=bt.setTimeout(function(){o.minimumUpdatePeriodTimeout_=null,o.trigger("minimumUpdatePeriod"),o.createMUPTimeout_(t)},t)},i.refreshXml_=function(){var t=this;this.requestMaster_(function(o,a){a&&(t.media_&&(t.media_=t.masterPlaylistLoader_.master.playlists[t.media_.id]),t.masterPlaylistLoader_.sidxMapping_=qet(t.masterPlaylistLoader_.master,t.masterPlaylistLoader_.sidxMapping_),t.addSidxSegments_(t.media(),t.state,function(s){t.refreshMedia_(t.media().id)}))})},i.refreshMedia_=function(t){var o=this;if(!t)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMaster_&&this.handleMaster_();var a=this.masterPlaylistLoader_.master.playlists,s=!this.media_||this.media_!==a[t];if(s?this.media_=a[t]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){var l=function u(){o.media().endList||(o.mediaUpdateTimeout=bt.setTimeout(function(){o.trigger("mediaupdatetimeout"),u()},_$(o.media(),!!s)))};l()}this.trigger("loadedplaylist")},e})(Uet),wu={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},Xet=function(e){for(var i=new Uint8Array(new ArrayBuffer(e.length)),n=0;n<e.length;n++)i[n]=e.charCodeAt(n);return i.buffer},ywe=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},Ket=function(e){try{return URL.createObjectURL(new Blob([e],{type:"application/javascript"}))}catch{var i=new BlobBuilder;return i.append(e),URL.createObjectURL(i.getBlob())}},mwe=function(e){return function(){var i=Ket(e),n=ywe(new Worker(i));n.objURL=i;var t=n.terminate;return n.on=n.addEventListener,n.off=n.removeEventListener,n.terminate=function(){return URL.revokeObjectURL(i),t.call(this)},n}},bwe=function(e){return"var browserWorkerPolyFill = "+ywe.toString()+`;
browserWorkerPolyFill(self);
`+e},Swe=function(e){return e.toString().replace(/^function.+?{/,"").slice(0,-1)},Zet=bwe(Swe(function(){var r=function(){this.init=function(){var se={};this.on=function(ye,ge){se[ye]||(se[ye]=[]),se[ye]=se[ye].concat(ge)},this.off=function(ye,ge){var Ce;return se[ye]?(Ce=se[ye].indexOf(ge),se[ye]=se[ye].slice(),se[ye].splice(Ce,1),Ce>-1):!1},this.trigger=function(ye){var ge,Ce,Me,Ne;if(ge=se[ye],!!ge)if(arguments.length===2)for(Me=ge.length,Ce=0;Ce<Me;++Ce)ge[Ce].call(this,arguments[1]);else{for(Ne=[],Ce=arguments.length,Ce=1;Ce<arguments.length;++Ce)Ne.push(arguments[Ce]);for(Me=ge.length,Ce=0;Ce<Me;++Ce)ge[Ce].apply(this,Ne)}},this.dispose=function(){se={}}}};r.prototype.pipe=function(ze){return this.on("data",function(se){ze.push(se)}),this.on("done",function(se){ze.flush(se)}),this.on("partialdone",function(se){ze.partialFlush(se)}),this.on("endedtimeline",function(se){ze.endTimeline(se)}),this.on("reset",function(se){ze.reset(se)}),ze},r.prototype.push=function(ze){this.trigger("data",ze)},r.prototype.flush=function(ze){this.trigger("done",ze)},r.prototype.partialFlush=function(ze){this.trigger("partialdone",ze)},r.prototype.endTimeline=function(ze){this.trigger("endedtimeline",ze)},r.prototype.reset=function(ze){this.trigger("reset",ze)};var e=r,i=Math.pow(2,32),n=function(se){var ye=new DataView(se.buffer,se.byteOffset,se.byteLength),ge;return ye.getBigUint64?(ge=ye.getBigUint64(0),ge<Number.MAX_SAFE_INTEGER?Number(ge):ge):ye.getUint32(0)*i+ye.getUint32(4)},t={getUint64:n,MAX_UINT32:i},o=t.MAX_UINT32,a,s,l,u,c,d,f,h,p,g,v,y,m,b,S,_,C,T,x,A,w,L,k,D,j,N,V,W,K,H,U,I,Q,Z,ee,ie;(function(){var ze;if(k={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(ze in k)k.hasOwnProperty(ze)&&(k[ze]=[ze.charCodeAt(0),ze.charCodeAt(1),ze.charCodeAt(2),ze.charCodeAt(3)]);D=new Uint8Array([105,115,111,109]),N=new Uint8Array([97,118,99,49]),j=new Uint8Array([0,0,0,1]),V=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]),W=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]),K={video:V,audio:W},I=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),U=new Uint8Array([0,0,0,0,0,0,0,0]),Q=new Uint8Array([0,0,0,0,0,0,0,0]),Z=Q,ee=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),ie=Q,H=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}})(),a=function(se){var ye=[],ge=0,Ce,Me,Ne;for(Ce=1;Ce<arguments.length;Ce++)ye.push(arguments[Ce]);for(Ce=ye.length;Ce--;)ge+=ye[Ce].byteLength;for(Me=new Uint8Array(ge+8),Ne=new DataView(Me.buffer,Me.byteOffset,Me.byteLength),Ne.setUint32(0,Me.byteLength),Me.set(se,4),Ce=0,ge=8;Ce<ye.length;Ce++)Me.set(ye[Ce],ge),ge+=ye[Ce].byteLength;return Me},s=function(){return a(k.dinf,a(k.dref,I))},l=function(se){return a(k.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,se.audioobjecttype<<3|se.samplingfrequencyindex>>>1,se.samplingfrequencyindex<<7|se.channelcount<<3,6,1,2]))},u=function(){return a(k.ftyp,D,j,D,N)},_=function(se){return a(k.hdlr,K[se])},c=function(se){return a(k.mdat,se)},S=function(se){var ye=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,se.duration>>>24&255,se.duration>>>16&255,se.duration>>>8&255,se.duration&255,85,196,0,0]);return se.samplerate&&(ye[12]=se.samplerate>>>24&255,ye[13]=se.samplerate>>>16&255,ye[14]=se.samplerate>>>8&255,ye[15]=se.samplerate&255),a(k.mdhd,ye)},b=function(se){return a(k.mdia,S(se),_(se.type),f(se))},d=function(se){return a(k.mfhd,new Uint8Array([0,0,0,0,(se&4278190080)>>24,(se&16711680)>>16,(se&65280)>>8,se&255]))},f=function(se){return a(k.minf,se.type==="video"?a(k.vmhd,H):a(k.smhd,U),s(),T(se))},h=function(se,ye){for(var ge=[],Ce=ye.length;Ce--;)ge[Ce]=A(ye[Ce]);return a.apply(null,[k.moof,d(se)].concat(ge))},p=function(se){for(var ye=se.length,ge=[];ye--;)ge[ye]=y(se[ye]);return a.apply(null,[k.moov,v(4294967295)].concat(ge).concat(g(se)))},g=function(se){for(var ye=se.length,ge=[];ye--;)ge[ye]=w(se[ye]);return a.apply(null,[k.mvex].concat(ge))},v=function(se){var ye=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(se&4278190080)>>24,(se&16711680)>>16,(se&65280)>>8,se&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 a(k.mvhd,ye)},C=function(se){var ye=se.samples||[],ge=new Uint8Array(4+ye.length),Ce,Me;for(Me=0;Me<ye.length;Me++)Ce=ye[Me].flags,ge[Me+4]=Ce.dependsOn<<4|Ce.isDependedOn<<2|Ce.hasRedundancy;return a(k.sdtp,ge)},T=function(se){return a(k.stbl,x(se),a(k.stts,ie),a(k.stsc,Z),a(k.stsz,ee),a(k.stco,Q))},(function(){var ze,se;x=function(ge){return a(k.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),ge.type==="video"?ze(ge):se(ge))},ze=function(ge){var Ce=ge.sps||[],Me=ge.pps||[],Ne=[],lt=[],Ve,it;for(Ve=0;Ve<Ce.length;Ve++)Ne.push((Ce[Ve].byteLength&65280)>>>8),Ne.push(Ce[Ve].byteLength&255),Ne=Ne.concat(Array.prototype.slice.call(Ce[Ve]));for(Ve=0;Ve<Me.length;Ve++)lt.push((Me[Ve].byteLength&65280)>>>8),lt.push(Me[Ve].byteLength&255),lt=lt.concat(Array.prototype.slice.call(Me[Ve]));if(it=[k.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,(ge.width&65280)>>8,ge.width&255,(ge.height&65280)>>8,ge.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]),a(k.avcC,new Uint8Array([1,ge.profileIdc,ge.profileCompatibility,ge.levelIdc,255].concat([Ce.length],Ne,[Me.length],lt))),a(k.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],ge.sarRatio){var Je=ge.sarRatio[0],ht=ge.sarRatio[1];it.push(a(k.pasp,new Uint8Array([(Je&4278190080)>>24,(Je&16711680)>>16,(Je&65280)>>8,Je&255,(ht&4278190080)>>24,(ht&16711680)>>16,(ht&65280)>>8,ht&255])))}return a.apply(null,it)},se=function(ge){return a(k.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(ge.channelcount&65280)>>8,ge.channelcount&255,(ge.samplesize&65280)>>8,ge.samplesize&255,0,0,0,0,(ge.samplerate&65280)>>8,ge.samplerate&255,0,0]),l(ge))}})(),m=function(se){var ye=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(se.id&4278190080)>>24,(se.id&16711680)>>16,(se.id&65280)>>8,se.id&255,0,0,0,0,(se.duration&4278190080)>>24,(se.duration&16711680)>>16,(se.duration&65280)>>8,se.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,(se.width&65280)>>8,se.width&255,0,0,(se.height&65280)>>8,se.height&255,0,0]);return a(k.tkhd,ye)},A=function(se){var ye,ge,Ce,Me,Ne,lt,Ve;return ye=a(k.tfhd,new Uint8Array([0,0,0,58,(se.id&4278190080)>>24,(se.id&16711680)>>16,(se.id&65280)>>8,se.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),lt=Math.floor(se.baseMediaDecodeTime/o),Ve=Math.floor(se.baseMediaDecodeTime%o),ge=a(k.tfdt,new Uint8Array([1,0,0,0,lt>>>24&255,lt>>>16&255,lt>>>8&255,lt&255,Ve>>>24&255,Ve>>>16&255,Ve>>>8&255,Ve&255])),Ne=92,se.type==="audio"?(Ce=L(se,Ne),a(k.traf,ye,ge,Ce)):(Me=C(se),Ce=L(se,Me.length+Ne),a(k.traf,ye,ge,Ce,Me))},y=function(se){return se.duration=se.duration||4294967295,a(k.trak,m(se),b(se))},w=function(se){var ye=new Uint8Array([0,0,0,0,(se.id&4278190080)>>24,(se.id&16711680)>>16,(se.id&65280)>>8,se.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return se.type!=="video"&&(ye[ye.length-1]=0),a(k.trex,ye)},(function(){var ze,se,ye;ye=function(Ce,Me){var Ne=0,lt=0,Ve=0,it=0;return Ce.length&&(Ce[0].duration!==void 0&&(Ne=1),Ce[0].size!==void 0&&(lt=2),Ce[0].flags!==void 0&&(Ve=4),Ce[0].compositionTimeOffset!==void 0&&(it=8)),[0,0,Ne|lt|Ve|it,1,(Ce.length&4278190080)>>>24,(Ce.length&16711680)>>>16,(Ce.length&65280)>>>8,Ce.length&255,(Me&4278190080)>>>24,(Me&16711680)>>>16,(Me&65280)>>>8,Me&255]},se=function(Ce,Me){var Ne,lt,Ve,it,Je,ht;for(it=Ce.samples||[],Me+=20+16*it.length,Ve=ye(it,Me),lt=new Uint8Array(Ve.length+it.length*16),lt.set(Ve),Ne=Ve.length,ht=0;ht<it.length;ht++)Je=it[ht],lt[Ne++]=(Je.duration&4278190080)>>>24,lt[Ne++]=(Je.duration&16711680)>>>16,lt[Ne++]=(Je.duration&65280)>>>8,lt[Ne++]=Je.duration&255,lt[Ne++]=(Je.size&4278190080)>>>24,lt[Ne++]=(Je.size&16711680)>>>16,lt[Ne++]=(Je.size&65280)>>>8,lt[Ne++]=Je.size&255,lt[Ne++]=Je.flags.isLeading<<2|Je.flags.dependsOn,lt[Ne++]=Je.flags.isDependedOn<<6|Je.flags.hasRedundancy<<4|Je.flags.paddingValue<<1|Je.flags.isNonSyncSample,lt[Ne++]=Je.flags.degradationPriority&61440,lt[Ne++]=Je.flags.degradationPriority&15,lt[Ne++]=(Je.compositionTimeOffset&4278190080)>>>24,lt[Ne++]=(Je.compositionTimeOffset&16711680)>>>16,lt[Ne++]=(Je.compositionTimeOffset&65280)>>>8,lt[Ne++]=Je.compositionTimeOffset&255;return a(k.trun,lt)},ze=function(Ce,Me){var Ne,lt,Ve,it,Je,ht;for(it=Ce.samples||[],Me+=20+8*it.length,Ve=ye(it,Me),Ne=new Uint8Array(Ve.length+it.length*8),Ne.set(Ve),lt=Ve.length,ht=0;ht<it.length;ht++)Je=it[ht],Ne[lt++]=(Je.duration&4278190080)>>>24,Ne[lt++]=(Je.duration&16711680)>>>16,Ne[lt++]=(Je.duration&65280)>>>8,Ne[lt++]=Je.duration&255,Ne[lt++]=(Je.size&4278190080)>>>24,Ne[lt++]=(Je.size&16711680)>>>16,Ne[lt++]=(Je.size&65280)>>>8,Ne[lt++]=Je.size&255;return a(k.trun,Ne)},L=function(Ce,Me){return Ce.type==="audio"?ze(Ce,Me):se(Ce,Me)}})();var de={ftyp:u,mdat:c,moof:h,moov:p,initSegment:function(se){var ye=u(),ge=p(se),Ce;return Ce=new Uint8Array(ye.byteLength+ge.byteLength),Ce.set(ye),Ce.set(ge,ye.byteLength),Ce}},pe=function(se){var ye,ge,Ce=[],Me=[];for(Me.byteLength=0,Me.nalCount=0,Me.duration=0,Ce.byteLength=0,ye=0;ye<se.length;ye++)ge=se[ye],ge.nalUnitType==="access_unit_delimiter_rbsp"?(Ce.length&&(Ce.duration=ge.dts-Ce.dts,Me.byteLength+=Ce.byteLength,Me.nalCount+=Ce.length,Me.duration+=Ce.duration,Me.push(Ce)),Ce=[ge],Ce.byteLength=ge.data.byteLength,Ce.pts=ge.pts,Ce.dts=ge.dts):(ge.nalUnitType==="slice_layer_without_partitioning_rbsp_idr"&&(Ce.keyFrame=!0),Ce.duration=ge.dts-Ce.dts,Ce.byteLength+=ge.data.byteLength,Ce.push(ge));return Me.length&&(!Ce.duration||Ce.duration<=0)&&(Ce.duration=Me[Me.length-1].duration),Me.byteLength+=Ce.byteLength,Me.nalCount+=Ce.length,Me.duration+=Ce.duration,Me.push(Ce),Me},_e=function(se){var ye,ge,Ce=[],Me=[];for(Ce.byteLength=0,Ce.nalCount=0,Ce.duration=0,Ce.pts=se[0].pts,Ce.dts=se[0].dts,Me.byteLength=0,Me.nalCount=0,Me.duration=0,Me.pts=se[0].pts,Me.dts=se[0].dts,ye=0;ye<se.length;ye++)ge=se[ye],ge.keyFrame?(Ce.length&&(Me.push(Ce),Me.byteLength+=Ce.byteLength,Me.nalCount+=Ce.nalCount,Me.duration+=Ce.duration),Ce=[ge],Ce.nalCount=ge.length,Ce.byteLength=ge.byteLength,Ce.pts=ge.pts,Ce.dts=ge.dts,Ce.duration=ge.duration):(Ce.duration+=ge.duration,Ce.nalCount+=ge.length,Ce.byteLength+=ge.byteLength,Ce.push(ge));return Me.length&&Ce.duration<=0&&(Ce.duration=Me[Me.length-1].duration),Me.byteLength+=Ce.byteLength,Me.nalCount+=Ce.nalCount,Me.duration+=Ce.duration,Me.push(Ce),Me},Te=function(se){var ye;return!se[0][0].keyFrame&&se.length>1&&(ye=se.shift(),se.byteLength-=ye.byteLength,se.nalCount-=ye.nalCount,se[0][0].dts=ye.dts,se[0][0].pts=ye.pts,se[0][0].duration+=ye.duration),se},De=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}},Pe=function(se,ye){var ge=De();return ge.dataOffset=ye,ge.compositionTimeOffset=se.pts-se.dts,ge.duration=se.duration,ge.size=4*se.length,ge.size+=se.byteLength,se.keyFrame&&(ge.flags.dependsOn=2,ge.flags.isNonSyncSample=0),ge},Ee=function(se,ye){var ge,Ce,Me,Ne,lt,Ve=ye||0,it=[];for(ge=0;ge<se.length;ge++)for(Ne=se[ge],Ce=0;Ce<Ne.length;Ce++)lt=Ne[Ce],Me=Pe(lt,Ve),Ve+=Me.size,it.push(Me);return it},Re=function(se){var ye,ge,Ce,Me,Ne,lt,Ve=0,it=se.byteLength,Je=se.nalCount,ht=it+4*Je,Nt=new Uint8Array(ht),fr=new DataView(Nt.buffer);for(ye=0;ye<se.length;ye++)for(Me=se[ye],ge=0;ge<Me.length;ge++)for(Ne=Me[ge],Ce=0;Ce<Ne.length;Ce++)lt=Ne[Ce],fr.setUint32(Ve,lt.data.byteLength),Ve+=4,Nt.set(lt.data,Ve),Ve+=lt.data.byteLength;return Nt},je=function(se,ye){var ge,Ce=ye||0,Me=[];return ge=Pe(se,Ce),Me.push(ge),Me},Ke=function(se){var ye,ge,Ce=0,Me=se.byteLength,Ne=se.length,lt=Me+4*Ne,Ve=new Uint8Array(lt),it=new DataView(Ve.buffer);for(ye=0;ye<se.length;ye++)ge=se[ye],it.setUint32(Ce,ge.data.byteLength),Ce+=4,Ve.set(ge.data,Ce),Ce+=ge.data.byteLength;return Ve},ot={groupNalsIntoFrames:pe,groupFramesIntoGops:_e,extendFirstKeyFrame:Te,generateSampleTable:Ee,concatenateNalData:Re,generateSampleTableForFrame:je,concatenateNalDataForFrame:Ke},We=[33,16,5,32,164,27],xe=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],ve=function(se){for(var ye=[];se--;)ye.push(0);return ye},he=function(se){return Object.keys(se).reduce(function(ye,ge){return ye[ge]=new Uint8Array(se[ge].reduce(function(Ce,Me){return Ce.concat(Me)},[])),ye},{})},Se,be=function(){if(!Se){var se={96e3:[We,[227,64],ve(154),[56]],88200:[We,[231],ve(170),[56]],64e3:[We,[248,192],ve(240),[56]],48e3:[We,[255,192],ve(268),[55,148,128],ve(54),[112]],44100:[We,[255,192],ve(268),[55,163,128],ve(84),[112]],32e3:[We,[255,192],ve(268),[55,234],ve(226),[112]],24e3:[We,[255,192],ve(268),[55,255,128],ve(268),[111,112],ve(126),[224]],16e3:[We,[255,192],ve(268),[55,255,128],ve(268),[111,255],ve(269),[223,108],ve(195),[1,192]],12e3:[xe,ve(268),[3,127,248],ve(268),[6,255,240],ve(268),[13,255,224],ve(268),[27,253,128],ve(259),[56]],11025:[xe,ve(268),[3,127,248],ve(268),[6,255,240],ve(268),[13,255,224],ve(268),[27,255,192],ve(268),[55,175,128],ve(108),[112]],8e3:[xe,ve(268),[3,121,16],ve(47),[7]]};Se=he(se)}return Se},ke=9e4,qe,rt,St,xt,It,Zt,ct;qe=function(se){return se*ke},rt=function(se,ye){return se*ye},St=function(se){return se/ke},xt=function(se,ye){return se/ye},It=function(se,ye){return qe(xt(se,ye))},Zt=function(se,ye){return rt(St(se),ye)},ct=function(se,ye,ge){return St(ge?se:se-ye)};var Qe={ONE_SECOND_IN_TS:ke,secondsToVideoTs:qe,secondsToAudioTs:rt,videoTsToSeconds:St,audioTsToSeconds:xt,audioTsToVideoTs:It,videoTsToAudioTs:Zt,metadataTsToSeconds:ct},Et=function(se){var ye,ge,Ce=0;for(ye=0;ye<se.length;ye++)ge=se[ye],Ce+=ge.data.byteLength;return Ce},Gt=function(se,ye,ge,Ce){var Me,Ne=0,lt=0,Ve=0,it=0,Je,ht,Nt;if(ye.length&&(Me=Qe.audioTsToVideoTs(se.baseMediaDecodeTime,se.samplerate),Ne=Math.ceil(Qe.ONE_SECOND_IN_TS/(se.samplerate/1024)),ge&&Ce&&(lt=Me-Math.max(ge,Ce),Ve=Math.floor(lt/Ne),it=Ve*Ne),!(Ve<1||it>Qe.ONE_SECOND_IN_TS/2))){for(Je=be()[se.samplerate],Je||(Je=ye[0].data),ht=0;ht<Ve;ht++)Nt=ye[0],ye.splice(0,0,{data:Je,dts:Nt.dts-Ne,pts:Nt.pts-Ne});return se.baseMediaDecodeTime-=Math.floor(Qe.videoTsToAudioTs(it,se.samplerate)),it}},Xe=function(se,ye,ge){return ye.minSegmentDts>=ge?se:(ye.minSegmentDts=1/0,se.filter(function(Ce){return Ce.dts>=ge?(ye.minSegmentDts=Math.min(ye.minSegmentDts,Ce.dts),ye.minSegmentPts=ye.minSegmentDts,!0):!1}))},Vt=function(se){var ye,ge,Ce=[];for(ye=0;ye<se.length;ye++)ge=se[ye],Ce.push({size:ge.data.byteLength,duration:1024});return Ce},lr=function(se){var ye,ge,Ce=0,Me=new Uint8Array(Et(se));for(ye=0;ye<se.length;ye++)ge=se[ye],Me.set(ge.data,Ce),Ce+=ge.data.byteLength;return Me},Jt={prefixWithSilence:Gt,trimAdtsFramesByEarliestDts:Xe,generateSampleTable:Vt,concatenateFrameData:lr},kr=Qe.ONE_SECOND_IN_TS,qt=function(se,ye){typeof ye.pts=="number"&&(se.timelineStartInfo.pts===void 0&&(se.timelineStartInfo.pts=ye.pts),se.minSegmentPts===void 0?se.minSegmentPts=ye.pts:se.minSegmentPts=Math.min(se.minSegmentPts,ye.pts),se.maxSegmentPts===void 0?se.maxSegmentPts=ye.pts:se.maxSegmentPts=Math.max(se.maxSegmentPts,ye.pts)),typeof ye.dts=="number"&&(se.timelineStartInfo.dts===void 0&&(se.timelineStartInfo.dts=ye.dts),se.minSegmentDts===void 0?se.minSegmentDts=ye.dts:se.minSegmentDts=Math.min(se.minSegmentDts,ye.dts),se.maxSegmentDts===void 0?se.maxSegmentDts=ye.dts:se.maxSegmentDts=Math.max(se.maxSegmentDts,ye.dts))},zt=function(se){delete se.minSegmentDts,delete se.maxSegmentDts,delete se.minSegmentPts,delete se.maxSegmentPts},jr=function(se,ye){var ge,Ce,Me=se.minSegmentDts;return ye||(Me-=se.timelineStartInfo.dts),ge=se.timelineStartInfo.baseMediaDecodeTime,ge+=Me,ge=Math.max(0,ge),se.type==="audio"&&(Ce=se.samplerate/kr,ge*=Ce,ge=Math.floor(ge)),ge},Be={clearDtsInfo:zt,calculateTrackBaseMediaDecodeTime:jr,collectDtsInfo:qt},Ge=4,ut=128,Pt=function(se){for(var ye=0,ge={payloadType:-1,payloadSize:0},Ce=0,Me=0;ye<se.byteLength&&se[ye]!==ut;){for(;se[ye]===255;)Ce+=255,ye++;for(Ce+=se[ye++];se[ye]===255;)Me+=255,ye++;if(Me+=se[ye++],!ge.payload&&Ce===Ge){var Ne=String.fromCharCode(se[ye+3],se[ye+4],se[ye+5],se[ye+6]);if(Ne==="GA94"){ge.payloadType=Ce,ge.payloadSize=Me,ge.payload=se.subarray(ye,ye+Me);break}else ge.payload=void 0}ye+=Me,Ce=0,Me=0}return ge},Qt=function(se){return se.payload[0]!==181||(se.payload[1]<<8|se.payload[2])!==49||String.fromCharCode(se.payload[3],se.payload[4],se.payload[5],se.payload[6])!=="GA94"||se.payload[7]!==3?null:se.payload.subarray(8,se.payload.length-1)},wr=function(se,ye){var ge=[],Ce,Me,Ne,lt;if(!(ye[0]&64))return ge;for(Me=ye[0]&31,Ce=0;Ce<Me;Ce++)Ne=Ce*3,lt={type:ye[Ne+2]&3,pts:se},ye[Ne+2]&4&&(lt.ccData=ye[Ne+3]<<8|ye[Ne+4],ge.push(lt));return ge},Xr=function(se){for(var ye=se.byteLength,ge=[],Ce=1,Me,Ne;Ce<ye-2;)se[Ce]===0&&se[Ce+1]===0&&se[Ce+2]===3?(ge.push(Ce+2),Ce+=2):Ce++;if(ge.length===0)return se;Me=ye-ge.length,Ne=new Uint8Array(Me);var lt=0;for(Ce=0;Ce<Me;lt++,Ce++)lt===ge[0]&&(lt++,ge.shift()),Ne[Ce]=se[lt];return Ne},pi={parseSei:Pt,parseUserData:Qt,parseCaptionPackets:wr,discardEmulationPreventionBytes:Xr,USER_DATA_REGISTERED_ITU_T_T35:Ge},Qr=function ze(se){se=se||{},ze.prototype.init.call(this),this.parse708captions_=typeof se.parse708captions=="boolean"?se.parse708captions:!0,this.captionPackets_=[],this.ccStreams_=[new ar(0,0),new ar(0,1),new ar(1,0),new ar(1,1)],this.parse708captions_&&(this.cc708Stream_=new Kr({captionServices:se.captionServices})),this.reset(),this.ccStreams_.forEach(function(ye){ye.on("data",this.trigger.bind(this,"data")),ye.on("partialdone",this.trigger.bind(this,"partialdone")),ye.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")))};Qr.prototype=new e,Qr.prototype.push=function(ze){var se,ye,ge;if(ze.nalUnitType==="sei_rbsp"&&(se=pi.parseSei(ze.escapedRBSP),!!se.payload&&se.payloadType===pi.USER_DATA_REGISTERED_ITU_T_T35&&(ye=pi.parseUserData(se),!!ye))){if(ze.dts<this.latestDts_){this.ignoreNextEqualDts_=!0;return}else if(ze.dts===this.latestDts_&&this.ignoreNextEqualDts_){this.numSameDts_--,this.numSameDts_||(this.ignoreNextEqualDts_=!1);return}ge=pi.parseCaptionPackets(ze.pts,ye),this.captionPackets_=this.captionPackets_.concat(ge),this.latestDts_!==ze.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=ze.dts}},Qr.prototype.flushCCStreams=function(ze){this.ccStreams_.forEach(function(se){return ze==="flush"?se.flush():se.partialFlush()},this)},Qr.prototype.flushStream=function(ze){if(!this.captionPackets_.length){this.flushCCStreams(ze);return}this.captionPackets_.forEach(function(se,ye){se.presortIndex=ye}),this.captionPackets_.sort(function(se,ye){return se.pts===ye.pts?se.presortIndex-ye.presortIndex:se.pts-ye.pts}),this.captionPackets_.forEach(function(se){se.type<2?this.dispatchCea608Packet(se):this.dispatchCea708Packet(se)},this),this.captionPackets_.length=0,this.flushCCStreams(ze)},Qr.prototype.flush=function(){return this.flushStream("flush")},Qr.prototype.partialFlush=function(){return this.flushStream("partialFlush")},Qr.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(ze){ze.reset()})},Qr.prototype.dispatchCea608Packet=function(ze){this.setsTextOrXDSActive(ze)?this.activeCea608Channel_[ze.type]=null:this.setsChannel1Active(ze)?this.activeCea608Channel_[ze.type]=0:this.setsChannel2Active(ze)&&(this.activeCea608Channel_[ze.type]=1),this.activeCea608Channel_[ze.type]!==null&&this.ccStreams_[(ze.type<<1)+this.activeCea608Channel_[ze.type]].push(ze)},Qr.prototype.setsChannel1Active=function(ze){return(ze.ccData&30720)===4096},Qr.prototype.setsChannel2Active=function(ze){return(ze.ccData&30720)===6144},Qr.prototype.setsTextOrXDSActive=function(ze){return(ze.ccData&28928)===256||(ze.ccData&30974)===4138||(ze.ccData&30974)===6186},Qr.prototype.dispatchCea708Packet=function(ze){this.parse708captions_&&this.cc708Stream_.push(ze)};var Ur={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},ci=function(se){var ye=Ur[se]||se;return se&4096&&se===ye?"":String.fromCharCode(ye)},Xt=function(se){return 32<=se&&se<=127||160<=se&&se<=255},Ui=function(se){this.windowNum=se,this.reset()};Ui.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},Ui.prototype.getText=function(){return this.rows.join(`
`)},Ui.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},Ui.prototype.newLine=function(ze){for(this.rows.length>=this.virtualRowCount&&typeof this.beforeRowOverflow=="function"&&this.beforeRowOverflow(ze),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},Ui.prototype.isEmpty=function(){return this.rows.length===0?!0:this.rows.length===1?this.rows[0]==="":!1},Ui.prototype.addText=function(ze){this.rows[this.rowIdx]+=ze},Ui.prototype.backspace=function(){if(!this.isEmpty()){var ze=this.rows[this.rowIdx];this.rows[this.rowIdx]=ze.substr(0,ze.length-1)}};var Dn=function(se,ye,ge){this.serviceNum=se,this.text="",this.currentWindow=new Ui(-1),this.windows=[],this.stream=ge,typeof ye=="string"&&this.createTextDecoder(ye)};Dn.prototype.init=function(ze,se){this.startPts=ze;for(var ye=0;ye<8;ye++)this.windows[ye]=new Ui(ye),typeof se=="function"&&(this.windows[ye].beforeRowOverflow=se)},Dn.prototype.setCurrentWindow=function(ze){this.currentWindow=this.windows[ze]},Dn.prototype.createTextDecoder=function(ze){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(ze)}catch(se){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+ze+" encoding. "+se})}};var Kr=function ze(se){se=se||{},ze.prototype.init.call(this);var ye=this,ge=se.captionServices||{},Ce={},Me;Object.keys(ge).forEach(function(Ne){Me=ge[Ne],/^SERVICE/.test(Ne)&&(Ce[Ne]=Me.encoding)}),this.serviceEncodings=Ce,this.current708Packet=null,this.services={},this.push=function(Ne){Ne.type===3?(ye.new708Packet(),ye.add708Bytes(Ne)):(ye.current708Packet===null&&ye.new708Packet(),ye.add708Bytes(Ne))}};Kr.prototype=new e,Kr.prototype.new708Packet=function(){this.current708Packet!==null&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Kr.prototype.add708Bytes=function(ze){var se=ze.ccData,ye=se>>>8,ge=se&255;this.current708Packet.ptsVals.push(ze.pts),this.current708Packet.data.push(ye),this.current708Packet.data.push(ge)},Kr.prototype.push708Packet=function(){var ze=this.current708Packet,se=ze.data,ye=null,ge=null,Ce=0,Me=se[Ce++];for(ze.seq=Me>>6,ze.sizeCode=Me&63;Ce<se.length;Ce++)Me=se[Ce++],ye=Me>>5,ge=Me&31,ye===7&&ge>0&&(Me=se[Ce++],ye=Me),this.pushServiceBlock(ye,Ce,ge),ge>0&&(Ce+=ge-1)},Kr.prototype.pushServiceBlock=function(ze,se,ye){var ge,Ce=se,Me=this.current708Packet.data,Ne=this.services[ze];for(Ne||(Ne=this.initService(ze,Ce));Ce<se+ye&&Ce<Me.length;Ce++)ge=Me[Ce],Xt(ge)?Ce=this.handleText(Ce,Ne):ge===24?Ce=this.multiByteCharacter(Ce,Ne):ge===16?Ce=this.extendedCommands(Ce,Ne):128<=ge&&ge<=135?Ce=this.setCurrentWindow(Ce,Ne):152<=ge&&ge<=159?Ce=this.defineWindow(Ce,Ne):ge===136?Ce=this.clearWindows(Ce,Ne):ge===140?Ce=this.deleteWindows(Ce,Ne):ge===137?Ce=this.displayWindows(Ce,Ne):ge===138?Ce=this.hideWindows(Ce,Ne):ge===139?Ce=this.toggleWindows(Ce,Ne):ge===151?Ce=this.setWindowAttributes(Ce,Ne):ge===144?Ce=this.setPenAttributes(Ce,Ne):ge===145?Ce=this.setPenColor(Ce,Ne):ge===146?Ce=this.setPenLocation(Ce,Ne):ge===143?Ne=this.reset(Ce,Ne):ge===8?Ne.currentWindow.backspace():ge===12?Ne.currentWindow.clearText():ge===13?Ne.currentWindow.pendingNewLine=!0:ge===14?Ne.currentWindow.clearText():ge===141&&Ce++},Kr.prototype.extendedCommands=function(ze,se){var ye=this.current708Packet.data,ge=ye[++ze];return Xt(ge)&&(ze=this.handleText(ze,se,{isExtended:!0})),ze},Kr.prototype.getPts=function(ze){return this.current708Packet.ptsVals[Math.floor(ze/2)]},Kr.prototype.initService=function(ze,se){var ge="SERVICE"+ze,ye=this,ge,Ce;return ge in this.serviceEncodings&&(Ce=this.serviceEncodings[ge]),this.services[ze]=new Dn(ze,Ce,ye),this.services[ze].init(this.getPts(se),function(Me){ye.flushDisplayed(Me,ye.services[ze])}),this.services[ze]},Kr.prototype.handleText=function(ze,se,ye){var ge=ye&&ye.isExtended,Ce=ye&&ye.isMultiByte,Me=this.current708Packet.data,Ne=ge?4096:0,lt=Me[ze],Ve=Me[ze+1],it=se.currentWindow,Je,ht;return se.textDecoder_&&!ge?(Ce?(ht=[lt,Ve],ze++):ht=[lt],Je=se.textDecoder_.decode(new Uint8Array(ht))):Je=ci(Ne|lt),it.pendingNewLine&&!it.isEmpty()&&it.newLine(this.getPts(ze)),it.pendingNewLine=!1,it.addText(Je),ze},Kr.prototype.multiByteCharacter=function(ze,se){var ye=this.current708Packet.data,ge=ye[ze+1],Ce=ye[ze+2];return Xt(ge)&&Xt(Ce)&&(ze=this.handleText(++ze,se,{isMultiByte:!0})),ze},Kr.prototype.setCurrentWindow=function(ze,se){var ye=this.current708Packet.data,ge=ye[ze],Ce=ge&7;return se.setCurrentWindow(Ce),ze},Kr.prototype.defineWindow=function(ze,se){var ye=this.current708Packet.data,ge=ye[ze],Ce=ge&7;se.setCurrentWindow(Ce);var Me=se.currentWindow;return ge=ye[++ze],Me.visible=(ge&32)>>5,Me.rowLock=(ge&16)>>4,Me.columnLock=(ge&8)>>3,Me.priority=ge&7,ge=ye[++ze],Me.relativePositioning=(ge&128)>>7,Me.anchorVertical=ge&127,ge=ye[++ze],Me.anchorHorizontal=ge,ge=ye[++ze],Me.anchorPoint=(ge&240)>>4,Me.rowCount=ge&15,ge=ye[++ze],Me.columnCount=ge&63,ge=ye[++ze],Me.windowStyle=(ge&56)>>3,Me.penStyle=ge&7,Me.virtualRowCount=Me.rowCount+1,ze},Kr.prototype.setWindowAttributes=function(ze,se){var ye=this.current708Packet.data,ge=ye[ze],Ce=se.currentWindow.winAttr;return ge=ye[++ze],Ce.fillOpacity=(ge&192)>>6,Ce.fillRed=(ge&48)>>4,Ce.fillGreen=(ge&12)>>2,Ce.fillBlue=ge&3,ge=ye[++ze],Ce.borderType=(ge&192)>>6,Ce.borderRed=(ge&48)>>4,Ce.borderGreen=(ge&12)>>2,Ce.borderBlue=ge&3,ge=ye[++ze],Ce.borderType+=(ge&128)>>5,Ce.wordWrap=(ge&64)>>6,Ce.printDirection=(ge&48)>>4,Ce.scrollDirection=(ge&12)>>2,Ce.justify=ge&3,ge=ye[++ze],Ce.effectSpeed=(ge&240)>>4,Ce.effectDirection=(ge&12)>>2,Ce.displayEffect=ge&3,ze},Kr.prototype.flushDisplayed=function(ze,se){for(var ye=[],ge=0;ge<8;ge++)se.windows[ge].visible&&!se.windows[ge].isEmpty()&&ye.push(se.windows[ge].getText());se.endPts=ze,se.text=ye.join(`

`),this.pushCaption(se),se.startPts=ze},Kr.prototype.pushCaption=function(ze){ze.text!==""&&(this.trigger("data",{startPts:ze.startPts,endPts:ze.endPts,text:ze.text,stream:"cc708_"+ze.serviceNum}),ze.text="",ze.startPts=ze.endPts)},Kr.prototype.displayWindows=function(ze,se){var ye=this.current708Packet.data,ge=ye[++ze],Ce=this.getPts(ze);this.flushDisplayed(Ce,se);for(var Me=0;Me<8;Me++)ge&1<<Me&&(se.windows[Me].visible=1);return ze},Kr.prototype.hideWindows=function(ze,se){var ye=this.current708Packet.data,ge=ye[++ze],Ce=this.getPts(ze);this.flushDisplayed(Ce,se);for(var Me=0;Me<8;Me++)ge&1<<Me&&(se.windows[Me].visible=0);return ze},Kr.prototype.toggleWindows=function(ze,se){var ye=this.current708Packet.data,ge=ye[++ze],Ce=this.getPts(ze);this.flushDisplayed(Ce,se);for(var Me=0;Me<8;Me++)ge&1<<Me&&(se.windows[Me].visible^=1);return ze},Kr.prototype.clearWindows=function(ze,se){var ye=this.current708Packet.data,ge=ye[++ze],Ce=this.getPts(ze);this.flushDisplayed(Ce,se);for(var Me=0;Me<8;Me++)ge&1<<Me&&se.windows[Me].clearText();return ze},Kr.prototype.deleteWindows=function(ze,se){var ye=this.current708Packet.data,ge=ye[++ze],Ce=this.getPts(ze);this.flushDisplayed(Ce,se);for(var Me=0;Me<8;Me++)ge&1<<Me&&se.windows[Me].reset();return ze},Kr.prototype.setPenAttributes=function(ze,se){var ye=this.current708Packet.data,ge=ye[ze],Ce=se.currentWindow.penAttr;return ge=ye[++ze],Ce.textTag=(ge&240)>>4,Ce.offset=(ge&12)>>2,Ce.penSize=ge&3,ge=ye[++ze],Ce.italics=(ge&128)>>7,Ce.underline=(ge&64)>>6,Ce.edgeType=(ge&56)>>3,Ce.fontStyle=ge&7,ze},Kr.prototype.setPenColor=function(ze,se){var ye=this.current708Packet.data,ge=ye[ze],Ce=se.currentWindow.penColor;return ge=ye[++ze],Ce.fgOpacity=(ge&192)>>6,Ce.fgRed=(ge&48)>>4,Ce.fgGreen=(ge&12)>>2,Ce.fgBlue=ge&3,ge=ye[++ze],Ce.bgOpacity=(ge&192)>>6,Ce.bgRed=(ge&48)>>4,Ce.bgGreen=(ge&12)>>2,Ce.bgBlue=ge&3,ge=ye[++ze],Ce.edgeRed=(ge&48)>>4,Ce.edgeGreen=(ge&12)>>2,Ce.edgeBlue=ge&3,ze},Kr.prototype.setPenLocation=function(ze,se){var ye=this.current708Packet.data,ge=ye[ze],Ce=se.currentWindow.penLoc;return se.currentWindow.pendingNewLine=!0,ge=ye[++ze],Ce.row=ge&15,ge=ye[++ze],Ce.column=ge&63,ze},Kr.prototype.reset=function(ze,se){var ye=this.getPts(ze);return this.flushDisplayed(ye,se),this.initService(se.serviceNum,ze)};var In={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},fn=function(se){return se===null?"":(se=In[se]||se,String.fromCharCode(se))},vt=14,dr=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],ue=function(){for(var se=[],ye=vt+1;ye--;)se.push("");return se},ar=function ze(se,ye){ze.prototype.init.call(this),this.field_=se||0,this.dataChannel_=ye||0,this.name_="CC"+((this.field_<<1|this.dataChannel_)+1),this.setConstants(),this.reset(),this.push=function(ge){var Ce,Me,Ne,lt,Ve;if(Ce=ge.ccData&32639,Ce===this.lastControlCode_){this.lastControlCode_=null;return}if((Ce&61440)===4096?this.lastControlCode_=Ce:Ce!==this.PADDING_&&(this.lastControlCode_=null),Ne=Ce>>>8,lt=Ce&255,Ce!==this.PADDING_)if(Ce===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(Ce===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(ge.pts),this.flushDisplayed(ge.pts),Me=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=Me,this.startPts_=ge.pts;else if(Ce===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(ge.pts);else if(Ce===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(ge.pts);else if(Ce===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(ge.pts);else if(Ce===this.CARRIAGE_RETURN_)this.clearFormatting(ge.pts),this.flushDisplayed(ge.pts),this.shiftRowsUp_(),this.startPts_=ge.pts;else if(Ce===this.BACKSPACE_)this.mode_==="popOn"?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1);else if(Ce===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(ge.pts),this.displayed_=ue();else if(Ce===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=ue();else if(Ce===this.RESUME_DIRECT_CAPTIONING_)this.mode_!=="paintOn"&&(this.flushDisplayed(ge.pts),this.displayed_=ue()),this.mode_="paintOn",this.startPts_=ge.pts;else if(this.isSpecialCharacter(Ne,lt))Ne=(Ne&3)<<8,Ve=fn(Ne|lt),this[this.mode_](ge.pts,Ve),this.column_++;else if(this.isExtCharacter(Ne,lt))this.mode_==="popOn"?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),Ne=(Ne&3)<<8,Ve=fn(Ne|lt),this[this.mode_](ge.pts,Ve),this.column_++;else if(this.isMidRowCode(Ne,lt))this.clearFormatting(ge.pts),this[this.mode_](ge.pts," "),this.column_++,(lt&14)===14&&this.addFormatting(ge.pts,["i"]),(lt&1)===1&&this.addFormatting(ge.pts,["u"]);else if(this.isOffsetControlCode(Ne,lt))this.column_+=lt&3;else if(this.isPAC(Ne,lt)){var it=dr.indexOf(Ce&7968);this.mode_==="rollUp"&&(it-this.rollUpRows_+1<0&&(it=this.rollUpRows_-1),this.setRollUp(ge.pts,it)),it!==this.row_&&(this.clearFormatting(ge.pts),this.row_=it),lt&1&&this.formatting_.indexOf("u")===-1&&this.addFormatting(ge.pts,["u"]),(Ce&16)===16&&(this.column_=((Ce&14)>>1)*4),this.isColorPAC(lt)&&(lt&14)===14&&this.addFormatting(ge.pts,["i"])}else this.isNormalChar(Ne)&&(lt===0&&(lt=null),Ve=fn(Ne),Ve+=fn(lt),this[this.mode_](ge.pts,Ve),this.column_+=Ve.length)}};ar.prototype=new e,ar.prototype.flushDisplayed=function(ze){var se=this.displayed_.map(function(ye,ge){try{return ye.trim()}catch{return this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+ge+"."}),""}},this).join(`
`).replace(/^\n+|\n+$/g,"");se.length&&this.trigger("data",{startPts:this.startPts_,endPts:ze,text:se,stream:this.name_})},ar.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=ue(),this.nonDisplayed_=ue(),this.lastControlCode_=null,this.column_=0,this.row_=vt,this.rollUpRows_=2,this.formatting_=[]},ar.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},ar.prototype.isSpecialCharacter=function(ze,se){return ze===this.EXT_&&se>=48&&se<=63},ar.prototype.isExtCharacter=function(ze,se){return(ze===this.EXT_+1||ze===this.EXT_+2)&&se>=32&&se<=63},ar.prototype.isMidRowCode=function(ze,se){return ze===this.EXT_&&se>=32&&se<=47},ar.prototype.isOffsetControlCode=function(ze,se){return ze===this.OFFSET_&&se>=33&&se<=35},ar.prototype.isPAC=function(ze,se){return ze>=this.BASE_&&ze<this.BASE_+8&&se>=64&&se<=127},ar.prototype.isColorPAC=function(ze){return ze>=64&&ze<=79||ze>=96&&ze<=127},ar.prototype.isNormalChar=function(ze){return ze>=32&&ze<=127},ar.prototype.setRollUp=function(ze,se){if(this.mode_!=="rollUp"&&(this.row_=vt,this.mode_="rollUp",this.flushDisplayed(ze),this.nonDisplayed_=ue(),this.displayed_=ue()),se!==void 0&&se!==this.row_)for(var ye=0;ye<this.rollUpRows_;ye++)this.displayed_[se-ye]=this.displayed_[this.row_-ye],this.displayed_[this.row_-ye]="";se===void 0&&(se=this.row_),this.topRow_=se-this.rollUpRows_+1},ar.prototype.addFormatting=function(ze,se){this.formatting_=this.formatting_.concat(se);var ye=se.reduce(function(ge,Ce){return ge+"<"+Ce+">"},"");this[this.mode_](ze,ye)},ar.prototype.clearFormatting=function(ze){if(this.formatting_.length){var se=this.formatting_.reverse().reduce(function(ye,ge){return ye+"</"+ge+">"},"");this.formatting_=[],this[this.mode_](ze,se)}},ar.prototype.popOn=function(ze,se){var ye=this.nonDisplayed_[this.row_];ye+=se,this.nonDisplayed_[this.row_]=ye},ar.prototype.rollUp=function(ze,se){var ye=this.displayed_[this.row_];ye+=se,this.displayed_[this.row_]=ye},ar.prototype.shiftRowsUp_=function(){var ze;for(ze=0;ze<this.topRow_;ze++)this.displayed_[ze]="";for(ze=this.row_+1;ze<vt+1;ze++)this.displayed_[ze]="";for(ze=this.topRow_;ze<this.row_;ze++)this.displayed_[ze]=this.displayed_[ze+1];this.displayed_[this.row_]=""},ar.prototype.paintOn=function(ze,se){var ye=this.displayed_[this.row_];ye+=se,this.displayed_[this.row_]=ye};var Bt={CaptionStream:Qr,Cea608Stream:ar,Cea708Stream:Kr},Ar={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},br=8589934592,Br=4294967296,ai="shared",Nn=function(se,ye){var ge=1;for(se>ye&&(ge=-1);Math.abs(ye-se)>Br;)se+=ge*br;return se},nt=function ze(se){var ye,ge;ze.prototype.init.call(this),this.type_=se||ai,this.push=function(Ce){this.type_!==ai&&Ce.type!==this.type_||(ge===void 0&&(ge=Ce.dts),Ce.dts=Nn(Ce.dts,ge),Ce.pts=Nn(Ce.pts,ge),ye=Ce.dts,this.trigger("data",Ce))},this.flush=function(){ge=ye,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){ge=void 0,ye=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};nt.prototype=new e;var _o={TimestampRolloverStream:nt,handleRollover:Nn},si=function(se,ye,ge){var Ce,Me="";for(Ce=ye;Ce<ge;Ce++)Me+="%"+("00"+se[Ce].toString(16)).slice(-2);return Me},ti=function(se,ye,ge){return decodeURIComponent(si(se,ye,ge))},rr=function(se,ye,ge){return unescape(si(se,ye,ge))},is=function(se){return se[0]<<21|se[1]<<14|se[2]<<7|se[3]},wa={TXXX:function(se){var ye;if(se.data[0]===3){for(ye=1;ye<se.data.length;ye++)if(se.data[ye]===0){se.description=ti(se.data,1,ye),se.value=ti(se.data,ye+1,se.data.length).replace(/\0*$/,"");break}se.data=se.value}},WXXX:function(se){var ye;if(se.data[0]===3){for(ye=1;ye<se.data.length;ye++)if(se.data[ye]===0){se.description=ti(se.data,1,ye),se.url=ti(se.data,ye+1,se.data.length);break}}},PRIV:function(se){var ye;for(ye=0;ye<se.data.length;ye++)if(se.data[ye]===0){se.owner=rr(se.data,0,ye);break}se.privateData=se.data.subarray(ye+1),se.data=se.privateData}},q;q=function(se){var ye={descriptor:se&&se.descriptor},ge=0,Ce=[],Me=0,Ne;if(q.prototype.init.call(this),this.dispatchType=Ar.METADATA_STREAM_TYPE.toString(16),ye.descriptor)for(Ne=0;Ne<ye.descriptor.length;Ne++)this.dispatchType+=("00"+ye.descriptor[Ne].toString(16)).slice(-2);this.push=function(lt){var Ve,it,Je,ht,Nt,fr;if(lt.type==="timed-metadata"){if(lt.dataAlignmentIndicator&&(Me=0,Ce.length=0),Ce.length===0&&(lt.data.length<10||lt.data[0]!==73||lt.data[1]!==68||lt.data[2]!==51)){this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});return}if(Ce.push(lt),Me+=lt.data.byteLength,Ce.length===1&&(ge=is(lt.data.subarray(6,10)),ge+=10),!(Me<ge)){for(Ve={data:new Uint8Array(ge),frames:[],pts:Ce[0].pts,dts:Ce[0].dts},Nt=0;Nt<ge;)Ve.data.set(Ce[0].data.subarray(0,ge-Nt),Nt),Nt+=Ce[0].data.byteLength,Me-=Ce[0].data.byteLength,Ce.shift();it=10,Ve.data[5]&64&&(it+=4,it+=is(Ve.data.subarray(10,14)),ge-=is(Ve.data.subarray(16,20)));do{if(Je=is(Ve.data.subarray(it+4,it+8)),Je<1){this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping metadata parsing."});return}if(fr=String.fromCharCode(Ve.data[it],Ve.data[it+1],Ve.data[it+2],Ve.data[it+3]),ht={id:fr,data:Ve.data.subarray(it+10,it+Je+10)},ht.key=ht.id,wa[ht.id]&&(wa[ht.id](ht),ht.owner==="com.apple.streaming.transportStreamTimestamp")){var Or=ht.data,Rt=(Or[3]&1)<<30|Or[4]<<22|Or[5]<<14|Or[6]<<6|Or[7]>>>2;Rt*=4,Rt+=Or[7]&3,ht.timeStamp=Rt,Ve.pts===void 0&&Ve.dts===void 0&&(Ve.pts=ht.timeStamp,Ve.dts=ht.timeStamp),this.trigger("timestamp",ht)}Ve.frames.push(ht),it+=10,it+=Je}while(it<ge);this.trigger("data",Ve)}}}},q.prototype=new e;var te=q,fe=_o.TimestampRolloverStream,Ue,pt,At,cr=188,Hr=71;Ue=function(){var se=new Uint8Array(cr),ye=0;Ue.prototype.init.call(this),this.push=function(ge){var Ce=0,Me=cr,Ne;for(ye?(Ne=new Uint8Array(ge.byteLength+ye),Ne.set(se.subarray(0,ye)),Ne.set(ge,ye),ye=0):Ne=ge;Me<Ne.byteLength;){if(Ne[Ce]===Hr&&Ne[Me]===Hr){this.trigger("data",Ne.subarray(Ce,Me)),Ce+=cr,Me+=cr;continue}Ce++,Me++}Ce<Ne.byteLength&&(se.set(Ne.subarray(Ce),0),ye=Ne.byteLength-Ce)},this.flush=function(){ye===cr&&se[0]===Hr&&(this.trigger("data",se),ye=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){ye=0,this.trigger("reset")}},Ue.prototype=new e,pt=function(){var se,ye,ge,Ce;pt.prototype.init.call(this),Ce=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,se=function(Ne,lt){var Ve=0;lt.payloadUnitStartIndicator&&(Ve+=Ne[Ve]+1),lt.type==="pat"?ye(Ne.subarray(Ve),lt):ge(Ne.subarray(Ve),lt)},ye=function(Ne,lt){lt.section_number=Ne[7],lt.last_section_number=Ne[8],Ce.pmtPid=(Ne[10]&31)<<8|Ne[11],lt.pmtPid=Ce.pmtPid},ge=function(Ne,lt){var Ve,it,Je,ht;if(Ne[5]&1){for(Ce.programMapTable={video:null,audio:null,"timed-metadata":{}},Ve=(Ne[1]&15)<<8|Ne[2],it=3+Ve-4,Je=(Ne[10]&15)<<8|Ne[11],ht=12+Je;ht<it;){var Nt=Ne[ht],fr=(Ne[ht+1]&31)<<8|Ne[ht+2];Nt===Ar.H264_STREAM_TYPE&&Ce.programMapTable.video===null?Ce.programMapTable.video=fr:Nt===Ar.ADTS_STREAM_TYPE&&Ce.programMapTable.audio===null?Ce.programMapTable.audio=fr:Nt===Ar.METADATA_STREAM_TYPE&&(Ce.programMapTable["timed-metadata"][fr]=Nt),ht+=((Ne[ht+3]&15)<<8|Ne[ht+4])+5}lt.programMapTable=Ce.programMapTable}},this.push=function(Me){var Ne={},lt=4;if(Ne.payloadUnitStartIndicator=!!(Me[1]&64),Ne.pid=Me[1]&31,Ne.pid<<=8,Ne.pid|=Me[2],(Me[3]&48)>>>4>1&&(lt+=Me[lt]+1),Ne.pid===0)Ne.type="pat",se(Me.subarray(lt),Ne),this.trigger("data",Ne);else if(Ne.pid===this.pmtPid)for(Ne.type="pmt",se(Me.subarray(lt),Ne),this.trigger("data",Ne);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else this.programMapTable===void 0?this.packetsWaitingForPmt.push([Me,lt,Ne]):this.processPes_(Me,lt,Ne)},this.processPes_=function(Me,Ne,lt){lt.pid===this.programMapTable.video?lt.streamType=Ar.H264_STREAM_TYPE:lt.pid===this.programMapTable.audio?lt.streamType=Ar.ADTS_STREAM_TYPE:lt.streamType=this.programMapTable["timed-metadata"][lt.pid],lt.type="pes",lt.data=Me.subarray(Ne),this.trigger("data",lt)}},pt.prototype=new e,pt.STREAM_TYPES={h264:27,adts:15},At=function(){var se=this,ye=!1,ge={data:[],size:0},Ce={data:[],size:0},Me={data:[],size:0},Ne,lt=function(Je,ht){var Nt,fr=Je[0]<<16|Je[1]<<8|Je[2];ht.data=new Uint8Array,fr===1&&(ht.packetLength=6+(Je[4]<<8|Je[5]),ht.dataAlignmentIndicator=(Je[6]&4)!==0,Nt=Je[7],Nt&192&&(ht.pts=(Je[9]&14)<<27|(Je[10]&255)<<20|(Je[11]&254)<<12|(Je[12]&255)<<5|(Je[13]&254)>>>3,ht.pts*=4,ht.pts+=(Je[13]&6)>>>1,ht.dts=ht.pts,Nt&64&&(ht.dts=(Je[14]&14)<<27|(Je[15]&255)<<20|(Je[16]&254)<<12|(Je[17]&255)<<5|(Je[18]&254)>>>3,ht.dts*=4,ht.dts+=(Je[18]&6)>>>1)),ht.data=Je.subarray(9+Je[8]))},Ve=function(Je,ht,Nt){var fr=new Uint8Array(Je.size),Or={type:ht},Rt=0,ur=0,so=!1,qn;if(!(!Je.data.length||Je.size<9)){for(Or.trackId=Je.data[0].pid,Rt=0;Rt<Je.data.length;Rt++)qn=Je.data[Rt],fr.set(qn.data,ur),ur+=qn.data.byteLength;lt(fr,Or),so=ht==="video"||Or.packetLength<=Je.size,(Nt||so)&&(Je.size=0,Je.data.length=0),so&&se.trigger("data",Or)}};At.prototype.init.call(this),this.push=function(it){({pat:function(){},pes:function(){var ht,Nt;switch(it.streamType){case Ar.H264_STREAM_TYPE:ht=ge,Nt="video";break;case Ar.ADTS_STREAM_TYPE:ht=Ce,Nt="audio";break;case Ar.METADATA_STREAM_TYPE:ht=Me,Nt="timed-metadata";break;default:return}it.payloadUnitStartIndicator&&Ve(ht,Nt,!0),ht.data.push(it),ht.size+=it.data.byteLength},pmt:function(){var ht={type:"metadata",tracks:[]};Ne=it.programMapTable,Ne.video!==null&&ht.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+Ne.video,codec:"avc",type:"video"}),Ne.audio!==null&&ht.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+Ne.audio,codec:"adts",type:"audio"}),ye=!0,se.trigger("data",ht)}})[it.type]()},this.reset=function(){ge.size=0,ge.data.length=0,Ce.size=0,Ce.data.length=0,this.trigger("reset")},this.flushStreams_=function(){Ve(ge,"video"),Ve(Ce,"audio"),Ve(Me,"timed-metadata")},this.flush=function(){if(!ye&&Ne){var it={type:"metadata",tracks:[]};Ne.video!==null&&it.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+Ne.video,codec:"avc",type:"video"}),Ne.audio!==null&&it.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+Ne.audio,codec:"adts",type:"audio"}),se.trigger("data",it)}ye=!1,this.flushStreams_(),this.trigger("done")}},At.prototype=new e;var Yi={PAT_PID:0,MP2T_PACKET_LENGTH:cr,TransportPacketStream:Ue,TransportParseStream:pt,ElementaryStream:At,TimestampRolloverStream:fe,CaptionStream:Bt.CaptionStream,Cea608Stream:Bt.Cea608Stream,Cea708Stream:Bt.Cea708Stream,MetadataStream:te};for(var Fn in Ar)Ar.hasOwnProperty(Fn)&&(Yi[Fn]=Ar[Fn]);var No=Yi,Ms=Qe.ONE_SECOND_IN_TS,_a,Ua=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];_a=function(se){var ye,ge=0;_a.prototype.init.call(this),this.skipWarn_=function(Ce,Me){this.trigger("log",{level:"warn",message:"adts skiping bytes "+Ce+" to "+Me+" in frame "+ge+" outside syncword"})},this.push=function(Ce){var Me=0,Ne,lt,Ve,it,Je;if(se||(ge=0),Ce.type==="audio"){ye&&ye.length?(Ve=ye,ye=new Uint8Array(Ve.byteLength+Ce.data.byteLength),ye.set(Ve),ye.set(Ce.data,Ve.byteLength)):ye=Ce.data;for(var ht;Me+7<ye.length;){if(ye[Me]!==255||(ye[Me+1]&246)!==240){typeof ht!="number"&&(ht=Me),Me++;continue}if(typeof ht=="number"&&(this.skipWarn_(ht,Me),ht=null),lt=(~ye[Me+1]&1)*2,Ne=(ye[Me+3]&3)<<11|ye[Me+4]<<3|(ye[Me+5]&224)>>5,it=((ye[Me+6]&3)+1)*1024,Je=it*Ms/Ua[(ye[Me+2]&60)>>>2],ye.byteLength-Me<Ne)break;this.trigger("data",{pts:Ce.pts+ge*Je,dts:Ce.dts+ge*Je,sampleCount:it,audioobjecttype:(ye[Me+2]>>>6&3)+1,channelcount:(ye[Me+2]&1)<<2|(ye[Me+3]&192)>>>6,samplerate:Ua[(ye[Me+2]&60)>>>2],samplingfrequencyindex:(ye[Me+2]&60)>>>2,samplesize:16,data:ye.subarray(Me+7+lt,Me+Ne)}),ge++,Me+=Ne}typeof ht=="number"&&(this.skipWarn_(ht,Me),ht=null),ye=ye.subarray(Me)}},this.flush=function(){ge=0,this.trigger("done")},this.reset=function(){ye=void 0,this.trigger("reset")},this.endTimeline=function(){ye=void 0,this.trigger("endedtimeline")}},_a.prototype=new e;var su=_a,Oa;Oa=function(se){var ye=se.byteLength,ge=0,Ce=0;this.length=function(){return 8*ye},this.bitsAvailable=function(){return 8*ye+Ce},this.loadWord=function(){var Me=se.byteLength-ye,Ne=new Uint8Array(4),lt=Math.min(4,ye);if(lt===0)throw new Error("no bytes available");Ne.set(se.subarray(Me,Me+lt)),ge=new DataView(Ne.buffer).getUint32(0),Ce=lt*8,ye-=lt},this.skipBits=function(Me){var Ne;Ce>Me?(ge<<=Me,Ce-=Me):(Me-=Ce,Ne=Math.floor(Me/8),Me-=Ne*8,ye-=Ne,this.loadWord(),ge<<=Me,Ce-=Me)},this.readBits=function(Me){var Ne=Math.min(Ce,Me),lt=ge>>>32-Ne;return Ce-=Ne,Ce>0?ge<<=Ne:ye>0&&this.loadWord(),Ne=Me-Ne,Ne>0?lt<<Ne|this.readBits(Ne):lt},this.skipLeadingZeros=function(){var Me;for(Me=0;Me<Ce;++Me)if((ge&2147483648>>>Me)!==0)return ge<<=Me,Ce-=Me,Me;return this.loadWord(),Me+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var Me=this.skipLeadingZeros();return this.readBits(Me+1)-1},this.readExpGolomb=function(){var Me=this.readUnsignedExpGolomb();return 1&Me?1+Me>>>1:-1*(Me>>>1)},this.readBoolean=function(){return this.readBits(1)===1},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var lu=Oa,Qs,bl,Sl;bl=function(){var se=0,ye,ge;bl.prototype.init.call(this),this.push=function(Ce){var Me;ge?(Me=new Uint8Array(ge.byteLength+Ce.data.byteLength),Me.set(ge),Me.set(Ce.data,ge.byteLength),ge=Me):ge=Ce.data;for(var Ne=ge.byteLength;se<Ne-3;se++)if(ge[se+2]===1){ye=se+5;break}for(;ye<Ne;)switch(ge[ye]){case 0:if(ge[ye-1]!==0){ye+=2;break}else if(ge[ye-2]!==0){ye++;break}se+3!==ye-2&&this.trigger("data",ge.subarray(se+3,ye-2));do ye++;while(ge[ye]!==1&&ye<Ne);se=ye-2,ye+=3;break;case 1:if(ge[ye-1]!==0||ge[ye-2]!==0){ye+=3;break}this.trigger("data",ge.subarray(se+3,ye-2)),se=ye-2,ye+=3;break;default:ye+=3;break}ge=ge.subarray(se),ye-=se,se=0},this.reset=function(){ge=null,se=0,this.trigger("reset")},this.flush=function(){ge&&ge.byteLength>3&&this.trigger("data",ge.subarray(se+3)),ge=null,se=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}},bl.prototype=new e,Sl={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},Qs=function(){var se=new bl,ye,ge,Ce,Me,Ne,lt,Ve;Qs.prototype.init.call(this),ye=this,this.push=function(it){it.type==="video"&&(ge=it.trackId,Ce=it.pts,Me=it.dts,se.push(it))},se.on("data",function(it){var Je={trackId:ge,pts:Ce,dts:Me,data:it,nalUnitTypeCode:it[0]&31};switch(Je.nalUnitTypeCode){case 5:Je.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:Je.nalUnitType="sei_rbsp",Je.escapedRBSP=Ne(it.subarray(1));break;case 7:Je.nalUnitType="seq_parameter_set_rbsp",Je.escapedRBSP=Ne(it.subarray(1)),Je.config=lt(Je.escapedRBSP);break;case 8:Je.nalUnitType="pic_parameter_set_rbsp";break;case 9:Je.nalUnitType="access_unit_delimiter_rbsp";break}ye.trigger("data",Je)}),se.on("done",function(){ye.trigger("done")}),se.on("partialdone",function(){ye.trigger("partialdone")}),se.on("reset",function(){ye.trigger("reset")}),se.on("endedtimeline",function(){ye.trigger("endedtimeline")}),this.flush=function(){se.flush()},this.partialFlush=function(){se.partialFlush()},this.reset=function(){se.reset()},this.endTimeline=function(){se.endTimeline()},Ve=function(Je,ht){var Nt=8,fr=8,Or,Rt;for(Or=0;Or<Je;Or++)fr!==0&&(Rt=ht.readExpGolomb(),fr=(Nt+Rt+256)%256),Nt=fr===0?Nt:fr},Ne=function(Je){for(var ht=Je.byteLength,Nt=[],fr=1,Or,Rt;fr<ht-2;)Je[fr]===0&&Je[fr+1]===0&&Je[fr+2]===3?(Nt.push(fr+2),fr+=2):fr++;if(Nt.length===0)return Je;Or=ht-Nt.length,Rt=new Uint8Array(Or);var ur=0;for(fr=0;fr<Or;ur++,fr++)ur===Nt[0]&&(ur++,Nt.shift()),Rt[fr]=Je[ur];return Rt},lt=function(Je){var ht=0,Nt=0,fr=0,Or=0,Rt,ur,so,qn,rl,rf,Vu,od,ad,yn,Xo,ro=[1,1],Xn,Un;if(Rt=new lu(Je),ur=Rt.readUnsignedByte(),qn=Rt.readUnsignedByte(),so=Rt.readUnsignedByte(),Rt.skipUnsignedExpGolomb(),Sl[ur]&&(rl=Rt.readUnsignedExpGolomb(),rl===3&&Rt.skipBits(1),Rt.skipUnsignedExpGolomb(),Rt.skipUnsignedExpGolomb(),Rt.skipBits(1),Rt.readBoolean()))for(Xo=rl!==3?8:12,Un=0;Un<Xo;Un++)Rt.readBoolean()&&(Un<6?Ve(16,Rt):Ve(64,Rt));if(Rt.skipUnsignedExpGolomb(),rf=Rt.readUnsignedExpGolomb(),rf===0)Rt.readUnsignedExpGolomb();else if(rf===1)for(Rt.skipBits(1),Rt.skipExpGolomb(),Rt.skipExpGolomb(),Vu=Rt.readUnsignedExpGolomb(),Un=0;Un<Vu;Un++)Rt.skipExpGolomb();if(Rt.skipUnsignedExpGolomb(),Rt.skipBits(1),od=Rt.readUnsignedExpGolomb(),ad=Rt.readUnsignedExpGolomb(),yn=Rt.readBits(1),yn===0&&Rt.skipBits(1),Rt.skipBits(1),Rt.readBoolean()&&(ht=Rt.readUnsignedExpGolomb(),Nt=Rt.readUnsignedExpGolomb(),fr=Rt.readUnsignedExpGolomb(),Or=Rt.readUnsignedExpGolomb()),Rt.readBoolean()&&Rt.readBoolean()){switch(Xn=Rt.readUnsignedByte(),Xn){case 1:ro=[1,1];break;case 2:ro=[12,11];break;case 3:ro=[10,11];break;case 4:ro=[16,11];break;case 5:ro=[40,33];break;case 6:ro=[24,11];break;case 7:ro=[20,11];break;case 8:ro=[32,11];break;case 9:ro=[80,33];break;case 10:ro=[18,11];break;case 11:ro=[15,11];break;case 12:ro=[64,33];break;case 13:ro=[160,99];break;case 14:ro=[4,3];break;case 15:ro=[3,2];break;case 16:ro=[2,1];break;case 255:{ro=[Rt.readUnsignedByte()<<8|Rt.readUnsignedByte(),Rt.readUnsignedByte()<<8|Rt.readUnsignedByte()];break}}ro&&ro[0]/ro[1]}return{profileIdc:ur,levelIdc:so,profileCompatibility:qn,width:(od+1)*16-ht*2-Nt*2,height:(2-yn)*(ad+1)*16-fr*2-Or*2,sarRatio:ro}}},Qs.prototype=new e;var uu={H264Stream:Qs},ys=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],Fo=function(se,ye){var ge=se[ye+6]<<21|se[ye+7]<<14|se[ye+8]<<7|se[ye+9],Ce=se[ye+5],Me=(Ce&16)>>4;return ge=ge>=0?ge:0,Me?ge+20:ge+10},Kc=function ze(se,ye){return se.length-ye<10||se[ye]!==73||se[ye+1]!==68||se[ye+2]!==51?ye:(ye+=Fo(se,ye),ze(se,ye))},Pa=function(se){var ye=Kc(se,0);return se.length>=ye+2&&(se[ye]&255)===255&&(se[ye+1]&240)===240&&(se[ye+1]&22)===16},vc=function(se){return se[0]<<21|se[1]<<14|se[2]<<7|se[3]},Ls=function(se,ye,ge){var Ce,Me="";for(Ce=ye;Ce<ge;Ce++)Me+="%"+("00"+se[Ce].toString(16)).slice(-2);return Me},ns=function(se,ye,ge){return unescape(Ls(se,ye,ge))},el=function(se,ye){var ge=(se[ye+5]&224)>>5,Ce=se[ye+4]<<3,Me=se[ye+3]&6144;return Me|Ce|ge},ao=function(se,ye){return se[ye]===73&&se[ye+1]===68&&se[ye+2]===51?"timed-metadata":se[ye]&!0&&(se[ye+1]&240)===240?"audio":null},ra=function(se){for(var ye=0;ye+5<se.length;){if(se[ye]!==255||(se[ye+1]&246)!==240){ye++;continue}return ys[(se[ye+2]&60)>>>2]}return null},fo=function(se){var ye,ge,Ce,Me;ye=10,se[5]&64&&(ye+=4,ye+=vc(se.subarray(10,14)));do{if(ge=vc(se.subarray(ye+4,ye+8)),ge<1)return null;if(Me=String.fromCharCode(se[ye],se[ye+1],se[ye+2],se[ye+3]),Me==="PRIV"){Ce=se.subarray(ye+10,ye+ge+10);for(var Ne=0;Ne<Ce.byteLength;Ne++)if(Ce[Ne]===0){var lt=ns(Ce,0,Ne);if(lt==="com.apple.streaming.transportStreamTimestamp"){var Ve=Ce.subarray(Ne+1),it=(Ve[3]&1)<<30|Ve[4]<<22|Ve[5]<<14|Ve[6]<<6|Ve[7]>>>2;return it*=4,it+=Ve[7]&3,it}break}}ye+=10,ye+=ge}while(ye<se.byteLength);return null},Hn={isLikelyAacData:Pa,parseId3TagSize:Fo,parseAdtsSize:el,parseType:ao,parseSampleRate:ra,parseAacTimestamp:fo},ks;ks=function(){var se=new Uint8Array,ye=0;ks.prototype.init.call(this),this.setTimestamp=function(ge){ye=ge},this.push=function(ge){var Ce=0,Me=0,Ne,lt,Ve,it;for(se.length?(it=se.length,se=new Uint8Array(ge.byteLength+it),se.set(se.subarray(0,it)),se.set(ge,it)):se=ge;se.length-Me>=3;){if(se[Me]===73&&se[Me+1]===68&&se[Me+2]===51){if(se.length-Me<10||(Ce=Hn.parseId3TagSize(se,Me),Me+Ce>se.length))break;lt={type:"timed-metadata",data:se.subarray(Me,Me+Ce)},this.trigger("data",lt),Me+=Ce;continue}else if((se[Me]&255)===255&&(se[Me+1]&240)===240){if(se.length-Me<7||(Ce=Hn.parseAdtsSize(se,Me),Me+Ce>se.length))break;Ve={type:"audio",data:se.subarray(Me,Me+Ce),pts:ye,dts:ye},this.trigger("data",Ve),Me+=Ce;continue}Me++}Ne=se.length-Me,Ne>0?se=se.subarray(Me):se=new Uint8Array},this.reset=function(){se=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){se=new Uint8Array,this.trigger("endedtimeline")}},ks.prototype=new e;var cu=ks,Yl=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],yc=Yl,ia=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],fa=ia,qo=uu.H264Stream,Zc=Hn.isLikelyAacData,Iu=Qe.ONE_SECOND_IN_TS,ms,jo,zi,on,du=function(se,ye){ye.stream=se,this.trigger("log",ye)},me=function(se,ye){for(var ge=Object.keys(ye),Ce=0;Ce<ge.length;Ce++){var Me=ge[Ce];Me==="headOfPipeline"||!ye[Me].on||ye[Me].on("log",du.bind(se,Me))}},Fe=function(se,ye){var ge;if(se.length!==ye.length)return!1;for(ge=0;ge<se.length;ge++)if(se[ge]!==ye[ge])return!1;return!0},Ze=function(se,ye,ge,Ce,Me,Ne){var lt=ge-ye,Ve=Ce-ye,it=Me-ge;return{start:{dts:se,pts:se+lt},end:{dts:se+Ve,pts:se+it},prependedContentDuration:Ne,baseMediaDecodeTime:se}};jo=function(se,ye){var ge=[],Ce,Me=0,Ne=0,lt=1/0;ye=ye||{},Ce=ye.firstSequenceNumber||0,jo.prototype.init.call(this),this.push=function(Ve){Be.collectDtsInfo(se,Ve),se&&yc.forEach(function(it){se[it]=Ve[it]}),ge.push(Ve)},this.setEarliestDts=function(Ve){Me=Ve},this.setVideoBaseMediaDecodeTime=function(Ve){lt=Ve},this.setAudioAppendStart=function(Ve){Ne=Ve},this.flush=function(){var Ve,it,Je,ht,Nt,fr,Or;if(ge.length===0){this.trigger("done","AudioSegmentStream");return}Ve=Jt.trimAdtsFramesByEarliestDts(ge,se,Me),se.baseMediaDecodeTime=Be.calculateTrackBaseMediaDecodeTime(se,ye.keepOriginalTimestamps),Or=Jt.prefixWithSilence(se,Ve,Ne,lt),se.samples=Jt.generateSampleTable(Ve),Je=de.mdat(Jt.concatenateFrameData(Ve)),ge=[],it=de.moof(Ce,[se]),ht=new Uint8Array(it.byteLength+Je.byteLength),Ce++,ht.set(it),ht.set(Je,it.byteLength),Be.clearDtsInfo(se),Nt=Math.ceil(Iu*1024/se.samplerate),Ve.length&&(fr=Ve.length*Nt,this.trigger("segmentTimingInfo",Ze(Qe.audioTsToVideoTs(se.baseMediaDecodeTime,se.samplerate),Ve[0].dts,Ve[0].pts,Ve[0].dts+fr,Ve[0].pts+fr,Or||0)),this.trigger("timingInfo",{start:Ve[0].pts,end:Ve[0].pts+fr})),this.trigger("data",{track:se,boxes:ht}),this.trigger("done","AudioSegmentStream")},this.reset=function(){Be.clearDtsInfo(se),ge=[],this.trigger("reset")}},jo.prototype=new e,ms=function(se,ye){var ge,Ce=[],Me=[],Ne,lt;ye=ye||{},ge=ye.firstSequenceNumber||0,ms.prototype.init.call(this),delete se.minPTS,this.gopCache_=[],this.push=function(Ve){Be.collectDtsInfo(se,Ve),Ve.nalUnitType==="seq_parameter_set_rbsp"&&!Ne&&(Ne=Ve.config,se.sps=[Ve.data],fa.forEach(function(it){se[it]=Ne[it]},this)),Ve.nalUnitType==="pic_parameter_set_rbsp"&&!lt&&(lt=Ve.data,se.pps=[Ve.data]),Ce.push(Ve)},this.flush=function(){for(var Ve,it,Je,ht,Nt,fr,Or=0,Rt,ur;Ce.length&&Ce[0].nalUnitType!=="access_unit_delimiter_rbsp";)Ce.shift();if(Ce.length===0){this.resetStream_(),this.trigger("done","VideoSegmentStream");return}if(Ve=ot.groupNalsIntoFrames(Ce),Je=ot.groupFramesIntoGops(Ve),Je[0][0].keyFrame||(it=this.getGopForFusion_(Ce[0],se),it?(Or=it.duration,Je.unshift(it),Je.byteLength+=it.byteLength,Je.nalCount+=it.nalCount,Je.pts=it.pts,Je.dts=it.dts,Je.duration+=it.duration):Je=ot.extendFirstKeyFrame(Je)),Me.length){var so;if(ye.alignGopsAtEnd?so=this.alignGopsAtEnd_(Je):so=this.alignGopsAtStart_(Je),!so){this.gopCache_.unshift({gop:Je.pop(),pps:se.pps,sps:se.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),Ce=[],this.resetStream_(),this.trigger("done","VideoSegmentStream");return}Be.clearDtsInfo(se),Je=so}Be.collectDtsInfo(se,Je),se.samples=ot.generateSampleTable(Je),Nt=de.mdat(ot.concatenateNalData(Je)),se.baseMediaDecodeTime=Be.calculateTrackBaseMediaDecodeTime(se,ye.keepOriginalTimestamps),this.trigger("processedGopsInfo",Je.map(function(qn){return{pts:qn.pts,dts:qn.dts,byteLength:qn.byteLength}})),Rt=Je[0],ur=Je[Je.length-1],this.trigger("segmentTimingInfo",Ze(se.baseMediaDecodeTime,Rt.dts,Rt.pts,ur.dts+ur.duration,ur.pts+ur.duration,Or)),this.trigger("timingInfo",{start:Je[0].pts,end:Je[Je.length-1].pts+Je[Je.length-1].duration}),this.gopCache_.unshift({gop:Je.pop(),pps:se.pps,sps:se.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),Ce=[],this.trigger("baseMediaDecodeTime",se.baseMediaDecodeTime),this.trigger("timelineStartInfo",se.timelineStartInfo),ht=de.moof(ge,[se]),fr=new Uint8Array(ht.byteLength+Nt.byteLength),ge++,fr.set(ht),fr.set(Nt,ht.byteLength),this.trigger("data",{track:se,boxes:fr}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),Ce=[],this.gopCache_.length=0,Me.length=0,this.trigger("reset")},this.resetStream_=function(){Be.clearDtsInfo(se),Ne=void 0,lt=void 0},this.getGopForFusion_=function(Ve){var it=45e3,Je=1/0,ht,Nt,fr,Or,Rt;for(Rt=0;Rt<this.gopCache_.length;Rt++)Or=this.gopCache_[Rt],fr=Or.gop,!(!(se.pps&&Fe(se.pps[0],Or.pps[0]))||!(se.sps&&Fe(se.sps[0],Or.sps[0])))&&(fr.dts<se.timelineStartInfo.dts||(ht=Ve.dts-fr.dts-fr.duration,ht>=-1e4&&ht<=it&&(!Nt||Je>ht)&&(Nt=Or,Je=ht)));return Nt?Nt.gop:null},this.alignGopsAtStart_=function(Ve){var it,Je,ht,Nt,fr,Or,Rt,ur;for(fr=Ve.byteLength,Or=Ve.nalCount,Rt=Ve.duration,it=Je=0;it<Me.length&&Je<Ve.length&&(ht=Me[it],Nt=Ve[Je],ht.pts!==Nt.pts);){if(Nt.pts>ht.pts){it++;continue}Je++,fr-=Nt.byteLength,Or-=Nt.nalCount,Rt-=Nt.duration}return Je===0?Ve:Je===Ve.length?null:(ur=Ve.slice(Je),ur.byteLength=fr,ur.duration=Rt,ur.nalCount=Or,ur.pts=ur[0].pts,ur.dts=ur[0].dts,ur)},this.alignGopsAtEnd_=function(Ve){var it,Je,ht,Nt,fr,Or;for(it=Me.length-1,Je=Ve.length-1,fr=null,Or=!1;it>=0&&Je>=0;){if(ht=Me[it],Nt=Ve[Je],ht.pts===Nt.pts){Or=!0;break}if(ht.pts>Nt.pts){it--;continue}it===Me.length-1&&(fr=Je),Je--}if(!Or&&fr===null)return null;var Rt;if(Or?Rt=Je:Rt=fr,Rt===0)return Ve;var ur=Ve.slice(Rt),so=ur.reduce(function(qn,rl){return qn.byteLength+=rl.byteLength,qn.duration+=rl.duration,qn.nalCount+=rl.nalCount,qn},{byteLength:0,duration:0,nalCount:0});return ur.byteLength=so.byteLength,ur.duration=so.duration,ur.nalCount=so.nalCount,ur.pts=ur[0].pts,ur.dts=ur[0].dts,ur},this.alignGopsWith=function(Ve){Me=Ve}},ms.prototype=new e,on=function(se,ye){this.numberOfTracks=0,this.metadataStream=ye,se=se||{},typeof se.remux<"u"?this.remuxTracks=!!se.remux:this.remuxTracks=!0,typeof se.keepOriginalTimestamps=="boolean"?this.keepOriginalTimestamps=se.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,on.prototype.init.call(this),this.push=function(ge){if(ge.text)return this.pendingCaptions.push(ge);if(ge.frames)return this.pendingMetadata.push(ge);this.pendingTracks.push(ge.track),this.pendingBytes+=ge.boxes.byteLength,ge.track.type==="video"&&(this.videoTrack=ge.track,this.pendingBoxes.push(ge.boxes)),ge.track.type==="audio"&&(this.audioTrack=ge.track,this.pendingBoxes.unshift(ge.boxes))}},on.prototype=new e,on.prototype.flush=function(ze){var se=0,ye={captions:[],captionStreams:{},metadata:[],info:{}},ge,Ce,Me,Ne=0,lt;if(this.pendingTracks.length<this.numberOfTracks){if(ze!=="VideoSegmentStream"&&ze!=="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?(Ne=this.videoTrack.timelineStartInfo.pts,fa.forEach(function(Ve){ye.info[Ve]=this.videoTrack[Ve]},this)):this.audioTrack&&(Ne=this.audioTrack.timelineStartInfo.pts,yc.forEach(function(Ve){ye.info[Ve]=this.audioTrack[Ve]},this)),this.videoTrack||this.audioTrack){for(this.pendingTracks.length===1?ye.type=this.pendingTracks[0].type:ye.type="combined",this.emittedTracks+=this.pendingTracks.length,Me=de.initSegment(this.pendingTracks),ye.initSegment=new Uint8Array(Me.byteLength),ye.initSegment.set(Me),ye.data=new Uint8Array(this.pendingBytes),lt=0;lt<this.pendingBoxes.length;lt++)ye.data.set(this.pendingBoxes[lt],se),se+=this.pendingBoxes[lt].byteLength;for(lt=0;lt<this.pendingCaptions.length;lt++)ge=this.pendingCaptions[lt],ge.startTime=Qe.metadataTsToSeconds(ge.startPts,Ne,this.keepOriginalTimestamps),ge.endTime=Qe.metadataTsToSeconds(ge.endPts,Ne,this.keepOriginalTimestamps),ye.captionStreams[ge.stream]=!0,ye.captions.push(ge);for(lt=0;lt<this.pendingMetadata.length;lt++)Ce=this.pendingMetadata[lt],Ce.cueTime=Qe.metadataTsToSeconds(Ce.pts,Ne,this.keepOriginalTimestamps),ye.metadata.push(Ce);for(ye.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",ye),lt=0;lt<ye.captions.length;lt++)ge=ye.captions[lt],this.trigger("caption",ge);for(lt=0;lt<ye.metadata.length;lt++)Ce=ye.metadata[lt],this.trigger("id3Frame",Ce)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},on.prototype.setRemux=function(ze){this.remuxTracks=ze},zi=function(se){var ye=this,ge=!0,Ce,Me;zi.prototype.init.call(this),se=se||{},this.baseMediaDecodeTime=se.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var Ne={};this.transmuxPipeline_=Ne,Ne.type="aac",Ne.metadataStream=new No.MetadataStream,Ne.aacStream=new cu,Ne.audioTimestampRolloverStream=new No.TimestampRolloverStream("audio"),Ne.timedMetadataTimestampRolloverStream=new No.TimestampRolloverStream("timed-metadata"),Ne.adtsStream=new su,Ne.coalesceStream=new on(se,Ne.metadataStream),Ne.headOfPipeline=Ne.aacStream,Ne.aacStream.pipe(Ne.audioTimestampRolloverStream).pipe(Ne.adtsStream),Ne.aacStream.pipe(Ne.timedMetadataTimestampRolloverStream).pipe(Ne.metadataStream).pipe(Ne.coalesceStream),Ne.metadataStream.on("timestamp",function(lt){Ne.aacStream.setTimestamp(lt.timeStamp)}),Ne.aacStream.on("data",function(lt){lt.type!=="timed-metadata"&&lt.type!=="audio"||Ne.audioSegmentStream||(Me=Me||{timelineStartInfo:{baseMediaDecodeTime:ye.baseMediaDecodeTime},codec:"adts",type:"audio"},Ne.coalesceStream.numberOfTracks++,Ne.audioSegmentStream=new jo(Me,se),Ne.audioSegmentStream.on("log",ye.getLogTrigger_("audioSegmentStream")),Ne.audioSegmentStream.on("timingInfo",ye.trigger.bind(ye,"audioTimingInfo")),Ne.adtsStream.pipe(Ne.audioSegmentStream).pipe(Ne.coalesceStream),ye.trigger("trackinfo",{hasAudio:!!Me,hasVideo:!!Ce}))}),Ne.coalesceStream.on("data",this.trigger.bind(this,"data")),Ne.coalesceStream.on("done",this.trigger.bind(this,"done")),me(this,Ne)},this.setupTsPipeline=function(){var Ne={};this.transmuxPipeline_=Ne,Ne.type="ts",Ne.metadataStream=new No.MetadataStream,Ne.packetStream=new No.TransportPacketStream,Ne.parseStream=new No.TransportParseStream,Ne.elementaryStream=new No.ElementaryStream,Ne.timestampRolloverStream=new No.TimestampRolloverStream,Ne.adtsStream=new su,Ne.h264Stream=new qo,Ne.captionStream=new No.CaptionStream(se),Ne.coalesceStream=new on(se,Ne.metadataStream),Ne.headOfPipeline=Ne.packetStream,Ne.packetStream.pipe(Ne.parseStream).pipe(Ne.elementaryStream).pipe(Ne.timestampRolloverStream),Ne.timestampRolloverStream.pipe(Ne.h264Stream),Ne.timestampRolloverStream.pipe(Ne.adtsStream),Ne.timestampRolloverStream.pipe(Ne.metadataStream).pipe(Ne.coalesceStream),Ne.h264Stream.pipe(Ne.captionStream).pipe(Ne.coalesceStream),Ne.elementaryStream.on("data",function(lt){var Ve;if(lt.type==="metadata"){for(Ve=lt.tracks.length;Ve--;)!Ce&&lt.tracks[Ve].type==="video"?(Ce=lt.tracks[Ve],Ce.timelineStartInfo.baseMediaDecodeTime=ye.baseMediaDecodeTime):!Me&&lt.tracks[Ve].type==="audio"&&(Me=lt.tracks[Ve],Me.timelineStartInfo.baseMediaDecodeTime=ye.baseMediaDecodeTime);Ce&&!Ne.videoSegmentStream&&(Ne.coalesceStream.numberOfTracks++,Ne.videoSegmentStream=new ms(Ce,se),Ne.videoSegmentStream.on("log",ye.getLogTrigger_("videoSegmentStream")),Ne.videoSegmentStream.on("timelineStartInfo",function(it){Me&&!se.keepOriginalTimestamps&&(Me.timelineStartInfo=it,Ne.audioSegmentStream.setEarliestDts(it.dts-ye.baseMediaDecodeTime))}),Ne.videoSegmentStream.on("processedGopsInfo",ye.trigger.bind(ye,"gopInfo")),Ne.videoSegmentStream.on("segmentTimingInfo",ye.trigger.bind(ye,"videoSegmentTimingInfo")),Ne.videoSegmentStream.on("baseMediaDecodeTime",function(it){Me&&Ne.audioSegmentStream.setVideoBaseMediaDecodeTime(it)}),Ne.videoSegmentStream.on("timingInfo",ye.trigger.bind(ye,"videoTimingInfo")),Ne.h264Stream.pipe(Ne.videoSegmentStream).pipe(Ne.coalesceStream)),Me&&!Ne.audioSegmentStream&&(Ne.coalesceStream.numberOfTracks++,Ne.audioSegmentStream=new jo(Me,se),Ne.audioSegmentStream.on("log",ye.getLogTrigger_("audioSegmentStream")),Ne.audioSegmentStream.on("timingInfo",ye.trigger.bind(ye,"audioTimingInfo")),Ne.audioSegmentStream.on("segmentTimingInfo",ye.trigger.bind(ye,"audioSegmentTimingInfo")),Ne.adtsStream.pipe(Ne.audioSegmentStream).pipe(Ne.coalesceStream)),ye.trigger("trackinfo",{hasAudio:!!Me,hasVideo:!!Ce})}}),Ne.coalesceStream.on("data",this.trigger.bind(this,"data")),Ne.coalesceStream.on("id3Frame",function(lt){lt.dispatchType=Ne.metadataStream.dispatchType,ye.trigger("id3Frame",lt)}),Ne.coalesceStream.on("caption",this.trigger.bind(this,"caption")),Ne.coalesceStream.on("done",this.trigger.bind(this,"done")),me(this,Ne)},this.setBaseMediaDecodeTime=function(Ne){var lt=this.transmuxPipeline_;se.keepOriginalTimestamps||(this.baseMediaDecodeTime=Ne),Me&&(Me.timelineStartInfo.dts=void 0,Me.timelineStartInfo.pts=void 0,Be.clearDtsInfo(Me),lt.audioTimestampRolloverStream&&lt.audioTimestampRolloverStream.discontinuity()),Ce&&(lt.videoSegmentStream&&(lt.videoSegmentStream.gopCache_=[]),Ce.timelineStartInfo.dts=void 0,Ce.timelineStartInfo.pts=void 0,Be.clearDtsInfo(Ce),lt.captionStream.reset()),lt.timestampRolloverStream&&lt.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(Ne){Me&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(Ne)},this.setRemux=function(Ne){var lt=this.transmuxPipeline_;se.remux=Ne,lt&&lt.coalesceStream&&lt.coalesceStream.setRemux(Ne)},this.alignGopsWith=function(Ne){Ce&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(Ne)},this.getLogTrigger_=function(Ne){var lt=this;return function(Ve){Ve.stream=Ne,lt.trigger("log",Ve)}},this.push=function(Ne){if(ge){var lt=Zc(Ne);lt&&this.transmuxPipeline_.type!=="aac"?this.setupAacPipeline():!lt&&this.transmuxPipeline_.type!=="ts"&&this.setupTsPipeline(),ge=!1}this.transmuxPipeline_.headOfPipeline.push(Ne)},this.flush=function(){ge=!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()}},zi.prototype=new e;var ft={Transmuxer:zi},Mt=function(se){return se>>>0},nr=function(se){return("00"+se.toString(16)).slice(-2)},Ot={toUnsigned:Mt,toHexString:nr},Ut=function(se){var ye="";return ye+=String.fromCharCode(se[0]),ye+=String.fromCharCode(se[1]),ye+=String.fromCharCode(se[2]),ye+=String.fromCharCode(se[3]),ye},Yr=Ut,Jr=Ot.toUnsigned,li=function ze(se,ye){var ge=[],Ce,Me,Ne,lt,Ve;if(!ye.length)return null;for(Ce=0;Ce<se.byteLength;)Me=Jr(se[Ce]<<24|se[Ce+1]<<16|se[Ce+2]<<8|se[Ce+3]),Ne=Yr(se.subarray(Ce+4,Ce+8)),lt=Me>1?Ce+Me:se.byteLength,Ne===ye[0]&&(ye.length===1?ge.push(se.subarray(Ce+8,lt)):(Ve=ze(se.subarray(Ce+8,lt),ye.slice(1)),Ve.length&&(ge=ge.concat(Ve)))),Ce=lt;return ge},Ci=li,Di=Ot.toUnsigned,za=t.getUint64,ha=function(se){var ye={version:se[0],flags:new Uint8Array(se.subarray(1,4))};return ye.version===1?ye.baseMediaDecodeTime=za(se.subarray(4)):ye.baseMediaDecodeTime=Di(se[4]<<24|se[5]<<16|se[6]<<8|se[7]),ye},Is=ha,tl=function(se){return{isLeading:(se[0]&12)>>>2,dependsOn:se[0]&3,isDependedOn:(se[1]&192)>>>6,hasRedundancy:(se[1]&48)>>>4,paddingValue:(se[1]&14)>>>1,isNonSyncSample:se[1]&1,degradationPriority:se[2]<<8|se[3]}},$l=tl,mc=function(se){var ye={version:se[0],flags:new Uint8Array(se.subarray(1,4)),samples:[]},ge=new DataView(se.buffer,se.byteOffset,se.byteLength),Ce=ye.flags[2]&1,Me=ye.flags[2]&4,Ne=ye.flags[1]&1,lt=ye.flags[1]&2,Ve=ye.flags[1]&4,it=ye.flags[1]&8,Je=ge.getUint32(4),ht=8,Nt;for(Ce&&(ye.dataOffset=ge.getInt32(ht),ht+=4),Me&&Je&&(Nt={flags:$l(se.subarray(ht,ht+4))},ht+=4,Ne&&(Nt.duration=ge.getUint32(ht),ht+=4),lt&&(Nt.size=ge.getUint32(ht),ht+=4),it&&(ye.version===1?Nt.compositionTimeOffset=ge.getInt32(ht):Nt.compositionTimeOffset=ge.getUint32(ht),ht+=4),ye.samples.push(Nt),Je--);Je--;)Nt={},Ne&&(Nt.duration=ge.getUint32(ht),ht+=4),lt&&(Nt.size=ge.getUint32(ht),ht+=4),Ve&&(Nt.flags=$l(se.subarray(ht,ht+4)),ht+=4),it&&(ye.version===1?Nt.compositionTimeOffset=ge.getInt32(ht):Nt.compositionTimeOffset=ge.getUint32(ht),ht+=4),ye.samples.push(Nt);return ye},os=mc,Rp=function(se){var ye=new DataView(se.buffer,se.byteOffset,se.byteLength),ge={version:se[0],flags:new Uint8Array(se.subarray(1,4)),trackId:ye.getUint32(4)},Ce=ge.flags[2]&1,Me=ge.flags[2]&2,Ne=ge.flags[2]&8,lt=ge.flags[2]&16,Ve=ge.flags[2]&32,it=ge.flags[0]&65536,Je=ge.flags[0]&131072,ht;return ht=8,Ce&&(ht+=4,ge.baseDataOffset=ye.getUint32(12),ht+=4),Me&&(ge.sampleDescriptionIndex=ye.getUint32(ht),ht+=4),Ne&&(ge.defaultSampleDuration=ye.getUint32(ht),ht+=4),lt&&(ge.defaultSampleSize=ye.getUint32(ht),ht+=4),Ve&&(ge.defaultSampleFlags=ye.getUint32(ht)),it&&(ge.durationIsEmpty=!0),!Ce&&Je&&(ge.baseDataOffsetIsMoof=!0),ge},as=Rp,qd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},bc;typeof window<"u"?bc=window:typeof qd<"u"?bc=qd:typeof self<"u"?bc=self:bc={};var Da=bc,Xd=pi.discardEmulationPreventionBytes,Jc=Bt.CaptionStream,ho=function(se,ye){for(var ge=se,Ce=0;Ce<ye.length;Ce++){var Me=ye[Ce];if(ge<Me.size)return Me;ge-=Me.size}return null},fu=function(se,ye,ge){var Ce=new DataView(se.buffer,se.byteOffset,se.byteLength),Me={logs:[],seiNals:[]},Ne,lt,Ve,it;for(lt=0;lt+4<se.length;lt+=Ve)if(Ve=Ce.getUint32(lt),lt+=4,!(Ve<=0))switch(se[lt]&31){case 6:var Je=se.subarray(lt+1,lt+1+Ve),ht=ho(lt,ye);if(Ne={nalUnitType:"sei_rbsp",size:Ve,data:Je,escapedRBSP:Xd(Je),trackId:ge},ht)Ne.pts=ht.pts,Ne.dts=ht.dts,it=ht;else if(it)Ne.pts=it.pts,Ne.dts=it.dts;else{Me.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+lt+" for trackId "+ge+". See mux.js#223."});break}Me.seiNals.push(Ne);break}return Me},kf=function(se,ye,ge){var Ce=ye,Me=ge.defaultSampleDuration||0,Ne=ge.defaultSampleSize||0,lt=ge.trackId,Ve=[];return se.forEach(function(it){var Je=os(it),ht=Je.samples;ht.forEach(function(Nt){Nt.duration===void 0&&(Nt.duration=Me),Nt.size===void 0&&(Nt.size=Ne),Nt.trackId=lt,Nt.dts=Ce,Nt.compositionTimeOffset===void 0&&(Nt.compositionTimeOffset=0),typeof Ce=="bigint"?(Nt.pts=Ce+Da.BigInt(Nt.compositionTimeOffset),Ce+=Da.BigInt(Nt.duration)):(Nt.pts=Ce+Nt.compositionTimeOffset,Ce+=Nt.duration)}),Ve=Ve.concat(ht)}),Ve},Sc=function(se,ye){var ge=Ci(se,["moof","traf"]),Ce=Ci(se,["mdat"]),Me={},Ne=[];return Ce.forEach(function(lt,Ve){var it=ge[Ve];Ne.push({mdat:lt,traf:it})}),Ne.forEach(function(lt){var Ve=lt.mdat,it=lt.traf,Je=Ci(it,["tfhd"]),ht=as(Je[0]),Nt=ht.trackId,fr=Ci(it,["tfdt"]),Or=fr.length>0?Is(fr[0]).baseMediaDecodeTime:0,Rt=Ci(it,["trun"]),ur,so;ye===Nt&&Rt.length>0&&(ur=kf(Rt,Or,ht),so=fu(Ve,ur,Nt),Me[Nt]||(Me[Nt]={seiNals:[],logs:[]}),Me[Nt].seiNals=Me[Nt].seiNals.concat(so.seiNals),Me[Nt].logs=Me[Nt].logs.concat(so.logs))}),Me},If=function(se,ye,ge){var Ce;if(ye===null)return null;Ce=Sc(se,ye);var Me=Ce[ye]||{};return{seiNals:Me.seiNals,logs:Me.logs,timescale:ge}},Mp=function(){var se=!1,ye,ge,Ce,Me,Ne,lt;this.isInitialized=function(){return se},this.init=function(Ve){ye=new Jc,se=!0,lt=Ve?Ve.isPartial:!1,ye.on("data",function(it){it.startTime=it.startPts/Me,it.endTime=it.endPts/Me,Ne.captions.push(it),Ne.captionStreams[it.stream]=!0}),ye.on("log",function(it){Ne.logs.push(it)})},this.isNewInit=function(Ve,it){return Ve&&Ve.length===0||it&&typeof it=="object"&&Object.keys(it).length===0?!1:Ce!==Ve[0]||Me!==it[Ce]},this.parse=function(Ve,it,Je){var ht;if(this.isInitialized()){if(!it||!Je)return null;if(this.isNewInit(it,Je))Ce=it[0],Me=Je[Ce];else if(Ce===null||!Me)return ge.push(Ve),null}else return null;for(;ge.length>0;){var Nt=ge.shift();this.parse(Nt,it,Je)}return ht=If(Ve,Ce,Me),ht&&ht.logs&&(Ne.logs=Ne.logs.concat(ht.logs)),ht===null||!ht.seiNals?Ne.logs.length?{logs:Ne.logs,captions:[],captionStreams:[]}:null:(this.pushNals(ht.seiNals),this.flushStream(),Ne)},this.pushNals=function(Ve){if(!this.isInitialized()||!Ve||Ve.length===0)return null;Ve.forEach(function(it){ye.push(it)})},this.flushStream=function(){if(!this.isInitialized())return null;lt?ye.partialFlush():ye.flush()},this.clearParsedCaptions=function(){Ne.captions=[],Ne.captionStreams={},Ne.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;ye.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){ge=[],Ce=null,Me=null,Ne?this.clearParsedCaptions():Ne={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},Lp=Mp,Kd=Ot.toUnsigned,_c=Ot.toHexString,Zd=t.getUint64,Ti,Dh,Qc,ed,hu,td;Ti=function(se){var ye={},ge=Ci(se,["moov","trak"]);return ge.reduce(function(Ce,Me){var Ne,lt,Ve,it,Je;return Ne=Ci(Me,["tkhd"])[0],!Ne||(lt=Ne[0],Ve=lt===0?12:20,it=Kd(Ne[Ve]<<24|Ne[Ve+1]<<16|Ne[Ve+2]<<8|Ne[Ve+3]),Je=Ci(Me,["mdia","mdhd"])[0],!Je)?null:(lt=Je[0],Ve=lt===0?12:20,Ce[it]=Kd(Je[Ve]<<24|Je[Ve+1]<<16|Je[Ve+2]<<8|Je[Ve+3]),Ce)},ye)},Dh=function(se,ye){var ge;ge=Ci(ye,["moof","traf"]);var Ce=ge.reduce(function(Me,Ne){var lt=Ci(Ne,["tfhd"])[0],Ve=Kd(lt[4]<<24|lt[5]<<16|lt[6]<<8|lt[7]),it=se[Ve]||9e4,Je=Ci(Ne,["tfdt"])[0],ht=new DataView(Je.buffer,Je.byteOffset,Je.byteLength),Nt;Je[0]===1?Nt=Zd(Je.subarray(4,12)):Nt=ht.getUint32(4);var fr;return typeof Nt=="bigint"?fr=Nt/Da.BigInt(it):typeof Nt=="number"&&!isNaN(Nt)&&(fr=Nt/it),fr<Number.MAX_SAFE_INTEGER&&(fr=Number(fr)),fr<Me&&(Me=fr),Me},1/0);return typeof Ce=="bigint"||isFinite(Ce)?Ce:0},Qc=function(se,ye){var ge=Ci(ye,["moof","traf"]),Ce=0,Me=0,Ne;if(ge&&ge.length){var lt=Ci(ge[0],["tfhd"])[0],Ve=Ci(ge[0],["trun"])[0],it=Ci(ge[0],["tfdt"])[0];if(lt){var Je=as(lt);Ne=Je.trackId}if(it){var ht=Is(it);Ce=ht.baseMediaDecodeTime}if(Ve){var Nt=os(Ve);Nt.samples&&Nt.samples.length&&(Me=Nt.samples[0].compositionTimeOffset||0)}}var fr=se[Ne]||9e4;typeof Ce=="bigint"&&(Me=Da.BigInt(Me),fr=Da.BigInt(fr));var Or=(Ce+Me)/fr;return typeof Or=="bigint"&&Or<Number.MAX_SAFE_INTEGER&&(Or=Number(Or)),Or},ed=function(se){var ye=Ci(se,["moov","trak"]),ge=[];return ye.forEach(function(Ce){var Me=Ci(Ce,["mdia","hdlr"]),Ne=Ci(Ce,["tkhd"]);Me.forEach(function(lt,Ve){var it=Yr(lt.subarray(8,12)),Je=Ne[Ve],ht,Nt,fr;it==="vide"&&(ht=new DataView(Je.buffer,Je.byteOffset,Je.byteLength),Nt=ht.getUint8(0),fr=Nt===0?ht.getUint32(12):ht.getUint32(20),ge.push(fr))})}),ge},td=function(se){var ye=se[0],ge=ye===0?12:20;return Kd(se[ge]<<24|se[ge+1]<<16|se[ge+2]<<8|se[ge+3])},hu=function(se){var ye=Ci(se,["moov","trak"]),ge=[];return ye.forEach(function(Ce){var Me={},Ne=Ci(Ce,["tkhd"])[0],lt,Ve;Ne&&(lt=new DataView(Ne.buffer,Ne.byteOffset,Ne.byteLength),Ve=lt.getUint8(0),Me.id=Ve===0?lt.getUint32(12):lt.getUint32(20));var it=Ci(Ce,["mdia","hdlr"])[0];if(it){var Je=Yr(it.subarray(8,12));Je==="vide"?Me.type="video":Je==="soun"?Me.type="audio":Me.type=Je}var ht=Ci(Ce,["mdia","minf","stbl","stsd"])[0];if(ht){var Nt=ht.subarray(8);Me.codec=Yr(Nt.subarray(4,8));var fr=Ci(Nt,[Me.codec])[0],Or,Rt;fr&&(/^[asm]vc[1-9]$/i.test(Me.codec)?(Or=fr.subarray(78),Rt=Yr(Or.subarray(4,8)),Rt==="avcC"&&Or.length>11?(Me.codec+=".",Me.codec+=_c(Or[9]),Me.codec+=_c(Or[10]),Me.codec+=_c(Or[11])):Me.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(Me.codec)?(Or=fr.subarray(28),Rt=Yr(Or.subarray(4,8)),Rt==="esds"&&Or.length>20&&Or[19]!==0?(Me.codec+="."+_c(Or[19]),Me.codec+="."+_c(Or[20]>>>2&63).replace(/^0/,"")):Me.codec="mp4a.40.2"):Me.codec=Me.codec.toLowerCase())}var ur=Ci(Ce,["mdia","mdhd"])[0];ur&&(Me.timescale=td(ur)),ge.push(Me)}),ge};var Jd={findBox:Ci,parseType:Yr,timescale:Ti,startTime:Dh,compositionStartTime:Qc,videoTrackIds:ed,tracks:hu,getTimescaleFromMediaHeader:td},Nf=function(se){var ye=se[1]&31;return ye<<=8,ye|=se[2],ye},Nu=function(se){return!!(se[1]&64)},Fu=function(se){var ye=0;return(se[3]&48)>>>4>1&&(ye+=se[4]+1),ye},Rh=function(se,ye){var ge=Nf(se);return ge===0?"pat":ge===ye?"pmt":ye?"pes":null},ju=function(se){var ye=Nu(se),ge=4+Fu(se);return ye&&(ge+=se[ge]+1),(se[ge+10]&31)<<8|se[ge+11]},bs=function(se){var ye={},ge=Nu(se),Ce=4+Fu(se);if(ge&&(Ce+=se[Ce]+1),!!(se[Ce+5]&1)){var Me,Ne,lt;Me=(se[Ce+1]&15)<<8|se[Ce+2],Ne=3+Me-4,lt=(se[Ce+10]&15)<<8|se[Ce+11];for(var Ve=12+lt;Ve<Ne;){var it=Ce+Ve;ye[(se[it+1]&31)<<8|se[it+2]]=se[it],Ve+=((se[it+3]&15)<<8|se[it+4])+5}return ye}},Ff=function(se,ye){var ge=Nf(se),Ce=ye[ge];switch(Ce){case Ar.H264_STREAM_TYPE:return"video";case Ar.ADTS_STREAM_TYPE:return"audio";case Ar.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},rd=function(se){var ye=Nu(se);if(!ye)return null;var ge=4+Fu(se);if(ge>=se.byteLength)return null;var Ce=null,Me;return Me=se[ge+7],Me&192&&(Ce={},Ce.pts=(se[ge+9]&14)<<27|(se[ge+10]&255)<<20|(se[ge+11]&254)<<12|(se[ge+12]&255)<<5|(se[ge+13]&254)>>>3,Ce.pts*=4,Ce.pts+=(se[ge+13]&6)>>>1,Ce.dts=Ce.pts,Me&64&&(Ce.dts=(se[ge+14]&14)<<27|(se[ge+15]&255)<<20|(se[ge+16]&254)<<12|(se[ge+17]&255)<<5|(se[ge+18]&254)>>>3,Ce.dts*=4,Ce.dts+=(se[ge+18]&6)>>>1)),Ce},ql=function(se){switch(se){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}},jf=function(se){for(var ye=4+Fu(se),ge=se.subarray(ye),Ce=0,Me=0,Ne=!1,lt;Me<ge.byteLength-3;Me++)if(ge[Me+2]===1){Ce=Me+5;break}for(;Ce<ge.byteLength;)switch(ge[Ce]){case 0:if(ge[Ce-1]!==0){Ce+=2;break}else if(ge[Ce-2]!==0){Ce++;break}Me+3!==Ce-2&&(lt=ql(ge[Me+3]&31),lt==="slice_layer_without_partitioning_rbsp_idr"&&(Ne=!0));do Ce++;while(ge[Ce]!==1&&Ce<ge.length);Me=Ce-2,Ce+=3;break;case 1:if(ge[Ce-1]!==0||ge[Ce-2]!==0){Ce+=3;break}lt=ql(ge[Me+3]&31),lt==="slice_layer_without_partitioning_rbsp_idr"&&(Ne=!0),Me=Ce-2,Ce+=3;break;default:Ce+=3;break}return ge=ge.subarray(Me),Ce-=Me,Me=0,ge&&ge.byteLength>3&&(lt=ql(ge[Me+3]&31),lt==="slice_layer_without_partitioning_rbsp_idr"&&(Ne=!0)),Ne},id={parseType:Rh,parsePat:ju,parsePmt:bs,parsePayloadUnitStartIndicator:Nu,parsePesType:Ff,parsePesTime:rd,videoPacketContainsKeyFrame:jf},_l=_o.handleRollover,jn={};jn.ts=id,jn.aac=Hn;var Pl=Qe.ONE_SECOND_IN_TS,Ra=188,Ma=71,Bf=function(se,ye){for(var ge=0,Ce=Ra,Me,Ne;Ce<se.byteLength;){if(se[ge]===Ma&&se[Ce]===Ma){switch(Me=se.subarray(ge,Ce),Ne=jn.ts.parseType(Me,ye.pid),Ne){case"pat":ye.pid=jn.ts.parsePat(Me);break;case"pmt":var lt=jn.ts.parsePmt(Me);ye.table=ye.table||{},Object.keys(lt).forEach(function(Ve){ye.table[Ve]=lt[Ve]});break}ge+=Ra,Ce+=Ra;continue}ge++,Ce++}},Qd=function(se,ye,ge){for(var Ce=0,Me=Ra,Ne,lt,Ve,it,Je,ht=!1;Me<=se.byteLength;){if(se[Ce]===Ma&&(se[Me]===Ma||Me===se.byteLength)){switch(Ne=se.subarray(Ce,Me),lt=jn.ts.parseType(Ne,ye.pid),lt){case"pes":Ve=jn.ts.parsePesType(Ne,ye.table),it=jn.ts.parsePayloadUnitStartIndicator(Ne),Ve==="audio"&&it&&(Je=jn.ts.parsePesTime(Ne),Je&&(Je.type="audio",ge.audio.push(Je),ht=!0));break}if(ht)break;Ce+=Ra,Me+=Ra;continue}Ce++,Me++}for(Me=se.byteLength,Ce=Me-Ra,ht=!1;Ce>=0;){if(se[Ce]===Ma&&(se[Me]===Ma||Me===se.byteLength)){switch(Ne=se.subarray(Ce,Me),lt=jn.ts.parseType(Ne,ye.pid),lt){case"pes":Ve=jn.ts.parsePesType(Ne,ye.table),it=jn.ts.parsePayloadUnitStartIndicator(Ne),Ve==="audio"&&it&&(Je=jn.ts.parsePesTime(Ne),Je&&(Je.type="audio",ge.audio.push(Je),ht=!0));break}if(ht)break;Ce-=Ra,Me-=Ra;continue}Ce--,Me--}},ef=function(se,ye,ge){for(var Ce=0,Me=Ra,Ne,lt,Ve,it,Je,ht,Nt,fr,Or=!1,Rt={data:[],size:0};Me<se.byteLength;){if(se[Ce]===Ma&&se[Me]===Ma){switch(Ne=se.subarray(Ce,Me),lt=jn.ts.parseType(Ne,ye.pid),lt){case"pes":if(Ve=jn.ts.parsePesType(Ne,ye.table),it=jn.ts.parsePayloadUnitStartIndicator(Ne),Ve==="video"&&(it&&!Or&&(Je=jn.ts.parsePesTime(Ne),Je&&(Je.type="video",ge.video.push(Je),Or=!0)),!ge.firstKeyFrame)){if(it&&Rt.size!==0){for(ht=new Uint8Array(Rt.size),Nt=0;Rt.data.length;)fr=Rt.data.shift(),ht.set(fr,Nt),Nt+=fr.byteLength;if(jn.ts.videoPacketContainsKeyFrame(ht)){var ur=jn.ts.parsePesTime(ht);ur?(ge.firstKeyFrame=ur,ge.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.")}Rt.size=0}Rt.data.push(Ne),Rt.size+=Ne.byteLength}break}if(Or&&ge.firstKeyFrame)break;Ce+=Ra,Me+=Ra;continue}Ce++,Me++}for(Me=se.byteLength,Ce=Me-Ra,Or=!1;Ce>=0;){if(se[Ce]===Ma&&se[Me]===Ma){switch(Ne=se.subarray(Ce,Me),lt=jn.ts.parseType(Ne,ye.pid),lt){case"pes":Ve=jn.ts.parsePesType(Ne,ye.table),it=jn.ts.parsePayloadUnitStartIndicator(Ne),Ve==="video"&&it&&(Je=jn.ts.parsePesTime(Ne),Je&&(Je.type="video",ge.video.push(Je),Or=!0));break}if(Or)break;Ce-=Ra,Me-=Ra;continue}Ce--,Me--}},Vf=function(se,ye){if(se.audio&&se.audio.length){var ge=ye;(typeof ge>"u"||isNaN(ge))&&(ge=se.audio[0].dts),se.audio.forEach(function(Ne){Ne.dts=_l(Ne.dts,ge),Ne.pts=_l(Ne.pts,ge),Ne.dtsTime=Ne.dts/Pl,Ne.ptsTime=Ne.pts/Pl})}if(se.video&&se.video.length){var Ce=ye;if((typeof Ce>"u"||isNaN(Ce))&&(Ce=se.video[0].dts),se.video.forEach(function(Ne){Ne.dts=_l(Ne.dts,Ce),Ne.pts=_l(Ne.pts,Ce),Ne.dtsTime=Ne.dts/Pl,Ne.ptsTime=Ne.pts/Pl}),se.firstKeyFrame){var Me=se.firstKeyFrame;Me.dts=_l(Me.dts,Ce),Me.pts=_l(Me.pts,Ce),Me.dtsTime=Me.dts/Pl,Me.ptsTime=Me.pts/Pl}}},Xl=function(se){for(var ye=!1,ge=0,Ce=null,Me=null,Ne=0,lt=0,Ve;se.length-lt>=3;){var it=jn.aac.parseType(se,lt);switch(it){case"timed-metadata":if(se.length-lt<10){ye=!0;break}if(Ne=jn.aac.parseId3TagSize(se,lt),Ne>se.length){ye=!0;break}Me===null&&(Ve=se.subarray(lt,lt+Ne),Me=jn.aac.parseAacTimestamp(Ve)),lt+=Ne;break;case"audio":if(se.length-lt<7){ye=!0;break}if(Ne=jn.aac.parseAdtsSize(se,lt),Ne>se.length){ye=!0;break}Ce===null&&(Ve=se.subarray(lt,lt+Ne),Ce=jn.aac.parseSampleRate(Ve)),ge++,lt+=Ne;break;default:lt++;break}if(ye)return null}if(Ce===null||Me===null)return null;var Je=Pl/Ce,ht={audio:[{type:"audio",dts:Me,pts:Me},{type:"audio",dts:Me+ge*1024*Je,pts:Me+ge*1024*Je}]};return ht},tf=function(se){var ye={pid:null,table:null},ge={};Bf(se,ye);for(var Ce in ye.table)if(ye.table.hasOwnProperty(Ce)){var Me=ye.table[Ce];switch(Me){case Ar.H264_STREAM_TYPE:ge.video=[],ef(se,ye,ge),ge.video.length===0&&delete ge.video;break;case Ar.ADTS_STREAM_TYPE:ge.audio=[],Qd(se,ye,ge),ge.audio.length===0&&delete ge.audio;break}}return ge},kp=function(se,ye){var ge=jn.aac.isLikelyAacData(se),Ce;return ge?Ce=Xl(se):Ce=tf(se),!Ce||!Ce.audio&&!Ce.video?null:(Vf(Ce,ye),Ce)},nd={inspect:kp,parseAudioPes_:Qd},Mh=function(se,ye){ye.on("data",function(ge){var Ce=ge.initSegment;ge.initSegment={data:Ce.buffer,byteOffset:Ce.byteOffset,byteLength:Ce.byteLength};var Me=ge.data;ge.data=Me.buffer,se.postMessage({action:"data",segment:ge,byteOffset:Me.byteOffset,byteLength:Me.byteLength},[ge.data])}),ye.on("done",function(ge){se.postMessage({action:"done"})}),ye.on("gopInfo",function(ge){se.postMessage({action:"gopInfo",gopInfo:ge})}),ye.on("videoSegmentTimingInfo",function(ge){var Ce={start:{decode:Qe.videoTsToSeconds(ge.start.dts),presentation:Qe.videoTsToSeconds(ge.start.pts)},end:{decode:Qe.videoTsToSeconds(ge.end.dts),presentation:Qe.videoTsToSeconds(ge.end.pts)},baseMediaDecodeTime:Qe.videoTsToSeconds(ge.baseMediaDecodeTime)};ge.prependedContentDuration&&(Ce.prependedContentDuration=Qe.videoTsToSeconds(ge.prependedContentDuration)),se.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:Ce})}),ye.on("audioSegmentTimingInfo",function(ge){var Ce={start:{decode:Qe.videoTsToSeconds(ge.start.dts),presentation:Qe.videoTsToSeconds(ge.start.pts)},end:{decode:Qe.videoTsToSeconds(ge.end.dts),presentation:Qe.videoTsToSeconds(ge.end.pts)},baseMediaDecodeTime:Qe.videoTsToSeconds(ge.baseMediaDecodeTime)};ge.prependedContentDuration&&(Ce.prependedContentDuration=Qe.videoTsToSeconds(ge.prependedContentDuration)),se.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:Ce})}),ye.on("id3Frame",function(ge){se.postMessage({action:"id3Frame",id3Frame:ge})}),ye.on("caption",function(ge){se.postMessage({action:"caption",caption:ge})}),ye.on("trackinfo",function(ge){se.postMessage({action:"trackinfo",trackInfo:ge})}),ye.on("audioTimingInfo",function(ge){se.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:Qe.videoTsToSeconds(ge.start),end:Qe.videoTsToSeconds(ge.end)}})}),ye.on("videoTimingInfo",function(ge){se.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:Qe.videoTsToSeconds(ge.start),end:Qe.videoTsToSeconds(ge.end)}})}),ye.on("log",function(ge){se.postMessage({action:"log",log:ge})})},Bu=(function(){function ze(ye,ge){this.options=ge||{},this.self=ye,this.init()}var se=ze.prototype;return se.init=function(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new ft.Transmuxer(this.options),Mh(this.self,this.transmuxer)},se.pushMp4Captions=function(ge){this.captionParser||(this.captionParser=new Lp,this.captionParser.init());var Ce=new Uint8Array(ge.data,ge.byteOffset,ge.byteLength),Me=this.captionParser.parse(Ce,ge.trackIds,ge.timescales);this.self.postMessage({action:"mp4Captions",captions:Me&&Me.captions||[],logs:Me&&Me.logs||[],data:Ce.buffer},[Ce.buffer])},se.probeMp4StartTime=function(ge){var Ce=ge.timescales,Me=ge.data,Ne=Jd.startTime(Ce,Me);this.self.postMessage({action:"probeMp4StartTime",startTime:Ne,data:Me},[Me.buffer])},se.probeMp4Tracks=function(ge){var Ce=ge.data,Me=Jd.tracks(Ce);this.self.postMessage({action:"probeMp4Tracks",tracks:Me,data:Ce},[Ce.buffer])},se.probeTs=function(ge){var Ce=ge.data,Me=ge.baseStartTime,Ne=typeof Me=="number"&&!isNaN(Me)?Me*Qe.ONE_SECOND_IN_TS:void 0,lt=nd.inspect(Ce,Ne),Ve=null;lt&&(Ve={hasVideo:lt.video&&lt.video.length===2||!1,hasAudio:lt.audio&&lt.audio.length===2||!1},Ve.hasVideo&&(Ve.videoStart=lt.video[0].ptsTime),Ve.hasAudio&&(Ve.audioStart=lt.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:Ve,data:Ce},[Ce.buffer])},se.clearAllMp4Captions=function(){this.captionParser&&this.captionParser.clearAllCaptions()},se.clearParsedMp4Captions=function(){this.captionParser&&this.captionParser.clearParsedCaptions()},se.push=function(ge){var Ce=new Uint8Array(ge.data,ge.byteOffset,ge.byteLength);this.transmuxer.push(Ce)},se.reset=function(){this.transmuxer.reset()},se.setTimestampOffset=function(ge){var Ce=ge.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(Qe.secondsToVideoTs(Ce)))},se.setAudioAppendStart=function(ge){this.transmuxer.setAudioAppendStart(Math.ceil(Qe.secondsToVideoTs(ge.appendStart)))},se.setRemux=function(ge){this.transmuxer.setRemux(ge.remux)},se.flush=function(ge){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})},se.endTimeline=function(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})},se.alignGopsWith=function(ge){this.transmuxer.alignGopsWith(ge.gopsToAlignWith.slice())},ze})();self.onmessage=function(ze){if(ze.data.action==="init"&&ze.data.options){this.messageHandlers=new Bu(self,ze.data.options);return}this.messageHandlers||(this.messageHandlers=new Bu(self)),ze.data&&ze.data.action&&ze.data.action!=="init"&&this.messageHandlers[ze.data.action]&&this.messageHandlers[ze.data.action](ze.data)}})),Jet=mwe(Zet),Qet=function(e,i,n){var t=e.data.segment,o=t.type,a=t.initSegment,s=t.captions,l=t.captionStreams,u=t.metadata,c=t.videoFrameDtsTime,d=t.videoFramePtsTime;i.buffer.push({captions:s,captionStreams:l,metadata:u});var f=e.data.segment.boxes||{data:e.data.segment.data},h={type:o,data:new Uint8Array(f.data,f.data.byteOffset,f.data.byteLength),initSegment:new Uint8Array(a.data,a.byteOffset,a.byteLength)};typeof c<"u"&&(h.videoFrameDtsTime=c),typeof d<"u"&&(h.videoFramePtsTime=d),n(h)},ett=function(e){var i=e.transmuxedData,n=e.callback;i.buffer=[],n(i)},ttt=function(e,i){i.gopInfo=e.data.gopInfo},_we=function(e){var i=e.transmuxer,n=e.bytes,t=e.audioAppendStart,o=e.gopsToAlignWith,a=e.remux,s=e.onData,l=e.onTrackInfo,u=e.onAudioTimingInfo,c=e.onVideoTimingInfo,d=e.onVideoSegmentTimingInfo,f=e.onAudioSegmentTimingInfo,h=e.onId3,p=e.onCaptions,g=e.onDone,v=e.onEndedTimeline,y=e.onTransmuxerLog,m=e.isEndOfTimeline,b={buffer:[]},S=m,_=function(A){i.currentTransmux===e&&(A.data.action==="data"&&Qet(A,b,s),A.data.action==="trackinfo"&&l(A.data.trackInfo),A.data.action==="gopInfo"&&ttt(A,b),A.data.action==="audioTimingInfo"&&u(A.data.audioTimingInfo),A.data.action==="videoTimingInfo"&&c(A.data.videoTimingInfo),A.data.action==="videoSegmentTimingInfo"&&d(A.data.videoSegmentTimingInfo),A.data.action==="audioSegmentTimingInfo"&&f(A.data.audioSegmentTimingInfo),A.data.action==="id3Frame"&&h([A.data.id3Frame],A.data.id3Frame.dispatchType),A.data.action==="caption"&&p(A.data.caption),A.data.action==="endedtimeline"&&(S=!1,v()),A.data.action==="log"&&y(A.data.log),A.data.type==="transmuxed"&&(S||(i.onmessage=null,ett({transmuxedData:b,callback:g}),Pwe(i))))};if(i.onmessage=_,t&&i.postMessage({action:"setAudioAppendStart",appendStart:t}),Array.isArray(o)&&i.postMessage({action:"alignGopsWith",gopsToAlignWith:o}),typeof a<"u"&&i.postMessage({action:"setRemux",remux:a}),n.byteLength){var C=n instanceof ArrayBuffer?n:n.buffer,T=n instanceof ArrayBuffer?0:n.byteOffset;i.postMessage({action:"push",data:C,byteOffset:T,byteLength:n.byteLength},[C])}m&&i.postMessage({action:"endTimeline"}),i.postMessage({action:"flush"})},Pwe=function(e){e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),typeof e.currentTransmux=="function"?e.currentTransmux():_we(e.currentTransmux))},hhe=function(e,i){e.postMessage({action:i}),Pwe(e)},Cwe=function(e,i){if(!i.currentTransmux){i.currentTransmux=e,hhe(i,e);return}i.transmuxQueue.push(hhe.bind(null,i,e))},rtt=function(e){Cwe("reset",e)},itt=function(e){Cwe("endTimeline",e)},Twe=function(e){if(!e.transmuxer.currentTransmux){e.transmuxer.currentTransmux=e,_we(e);return}e.transmuxer.transmuxQueue.push(e)},ntt=function(e){var i=new Jet;i.currentTransmux=null,i.transmuxQueue=[];var n=i.terminate;return i.terminate=function(){return i.currentTransmux=null,i.transmuxQueue.length=0,n.call(i)},i.postMessage({action:"init",options:e}),i},JG={reset:rtt,endTimeline:itt,transmux:Twe,createTransmuxer:ntt},I3=function(e){var i=e.transmuxer,n=e.endAction||e.action,t=e.callback,o=wn({},e,{endAction:null,transmuxer:null,callback:null}),a=function u(c){c.data.action===n&&(i.removeEventListener("message",u),c.data.data&&(c.data.data=new Uint8Array(c.data.data,e.byteOffset||0,e.byteLength||c.data.data.byteLength),e.data&&(e.data=c.data.data)),t(c.data))};if(i.addEventListener("message",a),e.data){var s=e.data instanceof ArrayBuffer;o.byteOffset=s?0:e.data.byteOffset,o.byteLength=e.data.byteLength;var l=[s?e.data:e.data.buffer];i.postMessage(o,l)}else i.postMessage(o)},Nv={FAILURE:2,TIMEOUT:-101,ABORTED:-102},x$=function(e){e.forEach(function(i){i.abort()})},ott=function(e){return{bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}},att=function(e){var i=e.target,n=Date.now()-i.requestTime,t={bandwidth:1/0,bytesReceived:0,roundTripTime:n||0};return t.bytesReceived=e.loaded,t.bandwidth=Math.floor(t.bytesReceived/t.roundTripTime*8*1e3),t},J9=function(e,i){return i.timedout?{status:i.status,message:"HLS request timed-out at URL: "+i.uri,code:Nv.TIMEOUT,xhr:i}:i.aborted?{status:i.status,message:"HLS request aborted at URL: "+i.uri,code:Nv.ABORTED,xhr:i}:e?{status:i.status,message:"HLS request errored at URL: "+i.uri,code:Nv.FAILURE,xhr:i}:i.responseType==="arraybuffer"&&i.response.byteLength===0?{status:i.status,message:"Empty HLS response at URL: "+i.uri,code:Nv.FAILURE,xhr:i}:null},phe=function(e,i,n){return function(t,o){var a=o.response,s=J9(t,o);if(s)return n(s,e);if(a.byteLength!==16)return n({status:o.status,message:"Invalid HLS key at URL: "+o.uri,code:Nv.FAILURE,xhr:o},e);for(var l=new DataView(a),u=new Uint32Array([l.getUint32(0),l.getUint32(4),l.getUint32(8),l.getUint32(12)]),c=0;c<i.length;c++)i[c].bytes=u;return n(null,e)}},xwe=function(e,i){var n=y9(e.map.bytes);if(n!=="mp4"){var t=e.map.resolvedUri||e.map.uri;return i({internal:!0,message:"Found unsupported "+(n||"unknown")+" container for initialization segment at URL: "+t,code:Nv.FAILURE})}I3({action:"probeMp4Tracks",data:e.map.bytes,transmuxer:e.transmuxer,callback:function(a){var s=a.tracks,l=a.data;return e.map.bytes=l,s.forEach(function(u){e.map.tracks=e.map.tracks||{},!e.map.tracks[u.type]&&(e.map.tracks[u.type]=u,typeof u.id=="number"&&u.timescale&&(e.map.timescales=e.map.timescales||{},e.map.timescales[u.id]=u.timescale))}),i(null)}})},stt=function(e){var i=e.segment,n=e.finishProcessingFn;return function(t,o){var a=J9(t,o);if(a)return n(a,i);var s=new Uint8Array(o.response);if(i.map.key)return i.map.encryptedBytes=s,n(null,i);i.map.bytes=s,xwe(i,function(l){if(l)return l.xhr=o,l.status=o.status,n(l,i);n(null,i)})}},ltt=function(e){var i=e.segment,n=e.finishProcessingFn,t=e.responseType;return function(o,a){var s=J9(o,a);if(s)return n(s,i);var l=t==="arraybuffer"||!a.responseText?a.response:Xet(a.responseText.substring(i.lastReachedChar||0));return i.stats=ott(a),i.key?i.encryptedBytes=new Uint8Array(l):i.bytes=new Uint8Array(l),n(null,i)}},utt=function(e){var i=e.segment,n=e.bytes,t=e.trackInfoFn,o=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,s=e.audioSegmentTimingInfoFn,l=e.id3Fn,u=e.captionsFn,c=e.isEndOfTimeline,d=e.endedTimelineFn,f=e.dataFn,h=e.doneFn,p=e.onTransmuxerLog,g=i.map&&i.map.tracks||{},v=!!(g.audio&&g.video),y=o.bind(null,i,"audio","start"),m=o.bind(null,i,"audio","end"),b=o.bind(null,i,"video","start"),S=o.bind(null,i,"video","end"),_=function(){return Twe({bytes:n,transmuxer:i.transmuxer,audioAppendStart:i.audioAppendStart,gopsToAlignWith:i.gopsToAlignWith,remux:v,onData:function(x){x.type=x.type==="combined"?"video":x.type,f(i,x)},onTrackInfo:function(x){t&&(v&&(x.isMuxed=!0),t(i,x))},onAudioTimingInfo:function(x){y&&typeof x.start<"u"&&(y(x.start),y=null),m&&typeof x.end<"u"&&m(x.end)},onVideoTimingInfo:function(x){b&&typeof x.start<"u"&&(b(x.start),b=null),S&&typeof x.end<"u"&&S(x.end)},onVideoSegmentTimingInfo:function(x){a(x)},onAudioSegmentTimingInfo:function(x){s(x)},onId3:function(x,A){l(i,x,A)},onCaptions:function(x){u(i,[x])},isEndOfTimeline:c,onEndedTimeline:function(){d()},onTransmuxerLog:p,onDone:function(x){h&&(x.type=x.type==="combined"?"video":x.type,h(null,i,x))}})};I3({action:"probeTs",transmuxer:i.transmuxer,data:n,baseStartTime:i.baseStartTime,callback:function(T){i.bytes=n=T.data;var x=T.result;x&&(t(i,{hasAudio:x.hasAudio,hasVideo:x.hasVideo,isMuxed:v}),t=null,x.hasAudio&&!v&&y(x.audioStart),x.hasVideo&&b(x.videoStart),y=null,b=null),_()}})},Ewe=function(e){var i=e.segment,n=e.bytes,t=e.trackInfoFn,o=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,s=e.audioSegmentTimingInfoFn,l=e.id3Fn,u=e.captionsFn,c=e.isEndOfTimeline,d=e.endedTimelineFn,f=e.dataFn,h=e.doneFn,p=e.onTransmuxerLog,g=new Uint8Array(n);if(xJe(g)){i.isFmp4=!0;var v=i.map.tracks,y={isFmp4:!0,hasVideo:!!v.video,hasAudio:!!v.audio};v.audio&&v.audio.codec&&v.audio.codec!=="enca"&&(y.audioCodec=v.audio.codec),v.video&&v.video.codec&&v.video.codec!=="encv"&&(y.videoCodec=v.video.codec),v.video&&v.audio&&(y.isMuxed=!0),t(i,y);var m=function(S){f(i,{data:g,type:y.hasAudio&&!y.isMuxed?"audio":"video"}),S&&S.length&&u(i,S),h(null,i,{})};I3({action:"probeMp4StartTime",timescales:i.map.timescales,data:g,transmuxer:i.transmuxer,callback:function(S){var _=S.data,C=S.startTime;if(n=_.buffer,i.bytes=g=_,y.hasAudio&&!y.isMuxed&&o(i,"audio","start",C),y.hasVideo&&o(i,"video","start",C),!v.video||!_.byteLength||!i.transmuxer){m();return}I3({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:i.transmuxer,data:g,timescales:i.map.timescales,trackIds:[v.video.id],callback:function(x){n=x.data.buffer,i.bytes=g=x.data,x.logs.forEach(function(A){p(kt.mergeOptions(A,{stream:"mp4CaptionParser"}))}),m(x.captions)}})}});return}if(!i.transmuxer){h(null,i,{});return}if(typeof i.container>"u"&&(i.container=y9(g)),i.container!=="ts"&&i.container!=="aac"){t(i,{hasAudio:!1,hasVideo:!1}),h(null,i,{});return}utt({segment:i,bytes:n,trackInfoFn:t,timingInfoFn:o,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:s,id3Fn:l,captionsFn:u,isEndOfTimeline:c,endedTimelineFn:d,dataFn:f,doneFn:h,onTransmuxerLog:p})},Awe=function(e,i){var n=e.id,t=e.key,o=e.encryptedBytes,a=e.decryptionWorker,s=function u(c){if(c.data.source===n){a.removeEventListener("message",u);var d=c.data.decrypted;i(new Uint8Array(d.bytes,d.byteOffset,d.byteLength))}};a.addEventListener("message",s);var l;t.bytes.slice?l=t.bytes.slice():l=new Uint32Array(Array.prototype.slice.call(t.bytes)),a.postMessage(fwe({source:n,encrypted:o,key:l,iv:t.iv}),[o.buffer,l.buffer])},ctt=function(e){var i=e.decryptionWorker,n=e.segment,t=e.trackInfoFn,o=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,s=e.audioSegmentTimingInfoFn,l=e.id3Fn,u=e.captionsFn,c=e.isEndOfTimeline,d=e.endedTimelineFn,f=e.dataFn,h=e.doneFn,p=e.onTransmuxerLog;Awe({id:n.requestId,key:n.key,encryptedBytes:n.encryptedBytes,decryptionWorker:i},function(g){n.bytes=g,Ewe({segment:n,bytes:n.bytes,trackInfoFn:t,timingInfoFn:o,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:s,id3Fn:l,captionsFn:u,isEndOfTimeline:c,endedTimelineFn:d,dataFn:f,doneFn:h,onTransmuxerLog:p})})},dtt=function(e){var i=e.activeXhrs,n=e.decryptionWorker,t=e.trackInfoFn,o=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,s=e.audioSegmentTimingInfoFn,l=e.id3Fn,u=e.captionsFn,c=e.isEndOfTimeline,d=e.endedTimelineFn,f=e.dataFn,h=e.doneFn,p=e.onTransmuxerLog,g=0,v=!1;return function(y,m){if(!v){if(y)return v=!0,x$(i),h(y,m);if(g+=1,g===i.length){var b=function(){if(m.encryptedBytes)return ctt({decryptionWorker:n,segment:m,trackInfoFn:t,timingInfoFn:o,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:s,id3Fn:l,captionsFn:u,isEndOfTimeline:c,endedTimelineFn:d,dataFn:f,doneFn:h,onTransmuxerLog:p});Ewe({segment:m,bytes:m.bytes,trackInfoFn:t,timingInfoFn:o,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:s,id3Fn:l,captionsFn:u,isEndOfTimeline:c,endedTimelineFn:d,dataFn:f,doneFn:h,onTransmuxerLog:p})};if(m.endOfAllRequests=Date.now(),m.map&&m.map.encryptedBytes&&!m.map.bytes)return Awe({decryptionWorker:n,id:m.requestId+"-init",encryptedBytes:m.map.encryptedBytes,key:m.map.key},function(S){m.map.bytes=S,xwe(m,function(_){if(_)return x$(i),h(_,m);b()})});b()}}}},ftt=function(e){var i=e.loadendState,n=e.abortFn;return function(t){var o=t.target;o.aborted&&n&&!i.calledAbortFn&&(n(),i.calledAbortFn=!0)}},htt=function(e){var i=e.segment,n=e.progressFn;return function(t){var o=t.target;if(!o.aborted)return i.stats=kt.mergeOptions(i.stats,att(t)),!i.stats.firstBytesReceivedAt&&i.stats.bytesReceived&&(i.stats.firstBytesReceivedAt=Date.now()),n(t,i)}},ptt=function(e){var i=e.xhr,n=e.xhrOptions,t=e.decryptionWorker,o=e.segment,a=e.abortFn,s=e.progressFn,l=e.trackInfoFn,u=e.timingInfoFn,c=e.videoSegmentTimingInfoFn,d=e.audioSegmentTimingInfoFn,f=e.id3Fn,h=e.captionsFn,p=e.isEndOfTimeline,g=e.endedTimelineFn,v=e.dataFn,y=e.doneFn,m=e.onTransmuxerLog,b=[],S=dtt({activeXhrs:b,decryptionWorker:t,trackInfoFn:l,timingInfoFn:u,videoSegmentTimingInfoFn:c,audioSegmentTimingInfoFn:d,id3Fn:f,captionsFn:h,isEndOfTimeline:p,endedTimelineFn:g,dataFn:v,doneFn:y,onTransmuxerLog:m});if(o.key&&!o.key.bytes){var _=[o.key];o.map&&!o.map.bytes&&o.map.key&&o.map.key.resolvedUri===o.key.resolvedUri&&_.push(o.map.key);var C=kt.mergeOptions(n,{uri:o.key.resolvedUri,responseType:"arraybuffer"}),T=phe(o,_,S),x=i(C,T);b.push(x)}if(o.map&&!o.map.bytes){var A=o.map.key&&(!o.key||o.key.resolvedUri!==o.map.key.resolvedUri);if(A){var w=kt.mergeOptions(n,{uri:o.map.key.resolvedUri,responseType:"arraybuffer"}),L=phe(o,[o.map.key],S),k=i(w,L);b.push(k)}var D=kt.mergeOptions(n,{uri:o.map.resolvedUri,responseType:"arraybuffer",headers:C$(o.map)}),j=stt({segment:o,finishProcessingFn:S}),N=i(D,j);b.push(N)}var V=kt.mergeOptions(n,{uri:o.part&&o.part.resolvedUri||o.resolvedUri,responseType:"arraybuffer",headers:C$(o)}),W=ltt({segment:o,finishProcessingFn:S,responseType:V.responseType}),K=i(V,W);K.addEventListener("progress",htt({segment:o,progressFn:s})),b.push(K);var H={};return b.forEach(function(U){U.addEventListener("loadend",ftt({loadendState:H,abortFn:a}))}),function(){return x$(b)}},gtt=Lg("CodecUtils"),vtt=function(e){var i=e.attributes||{};if(i.CODECS)return mv(i.CODECS)},wwe=function(e,i){var n=i.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&n.AUDIO&&e.mediaGroups.AUDIO[n.AUDIO]},ytt=function(e,i){if(!wwe(e,i))return!0;var n=i.attributes||{},t=e.mediaGroups.AUDIO[n.AUDIO];for(var o in t)if(!t[o].uri&&!t[o].playlists)return!0;return!1},N3=function(e){var i={};return e.forEach(function(n){var t=n.mediaType,o=n.type,a=n.details;i[t]=i[t]||[],i[t].push(EEe(""+o+a))}),Object.keys(i).forEach(function(n){if(i[n].length>1){gtt("multiple "+n+" codecs found as attributes: "+i[n].join(", ")+". Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs."),i[n]=null;return}i[n]=i[n][0]}),i},ghe=function(e){var i=0;return e.audio&&i++,e.video&&i++,i},ON=function(e,i){var n=i.attributes||{},t=N3(vtt(i)||[]);if(wwe(e,i)&&!t.audio&&!ytt(e,i)){var o=N3(QKe(e,n.AUDIO)||[]);o.audio&&(t.audio=o.audio)}return t},sB=Lg("PlaylistSelector"),vhe=function(e){if(!(!e||!e.playlist)){var i=e.playlist;return JSON.stringify({id:i.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:i.attributes&&i.attributes.CODECS||""})}},F3=function(e,i){if(!e)return"";var n=bt.getComputedStyle(e);return n?n[i]:""},AR=function(e,i){var n=e.slice();e.sort(function(t,o){var a=i(t,o);return a===0?n.indexOf(t)-n.indexOf(o):a})},Q9=function(e,i){var n,t;return e.attributes.BANDWIDTH&&(n=e.attributes.BANDWIDTH),n=n||bt.Number.MAX_VALUE,i.attributes.BANDWIDTH&&(t=i.attributes.BANDWIDTH),t=t||bt.Number.MAX_VALUE,n-t},mtt=function(e,i){var n,t;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(n=e.attributes.RESOLUTION.width),n=n||bt.Number.MAX_VALUE,i.attributes.RESOLUTION&&i.attributes.RESOLUTION.width&&(t=i.attributes.RESOLUTION.width),t=t||bt.Number.MAX_VALUE,n===t&&e.attributes.BANDWIDTH&&i.attributes.BANDWIDTH?e.attributes.BANDWIDTH-i.attributes.BANDWIDTH:n-t},Owe=function(e,i,n,t,o,a){if(e){var s={bandwidth:i,width:n,height:t,limitRenditionByPlayerDimensions:o},l=e.playlists;wf.isAudioOnly(e)&&(l=a.getAudioTrackPlaylists_(),s.audioOnly=!0);var u=l.map(function(w){var L,k=w.attributes&&w.attributes.RESOLUTION&&w.attributes.RESOLUTION.width,D=w.attributes&&w.attributes.RESOLUTION&&w.attributes.RESOLUTION.height;return L=w.attributes&&w.attributes.BANDWIDTH,L=L||bt.Number.MAX_VALUE,{bandwidth:L,width:k,height:D,playlist:w}});AR(u,function(w,L){return w.bandwidth-L.bandwidth}),u=u.filter(function(w){return!wf.isIncompatible(w.playlist)});var c=u.filter(function(w){return wf.isEnabled(w.playlist)});c.length||(c=u.filter(function(w){return!wf.isDisabled(w.playlist)}));var d=c.filter(function(w){return w.bandwidth*wu.BANDWIDTH_VARIANCE<i}),f=d[d.length-1],h=d.filter(function(w){return w.bandwidth===f.bandwidth})[0];if(o===!1){var p=h||c[0]||u[0];if(p&&p.playlist){var g="sortedPlaylistReps";return h&&(g="bandwidthBestRep"),c[0]&&(g="enabledPlaylistReps"),sB("choosing "+vhe(p)+" using "+g+" with options",s),p.playlist}return sB("could not choose a playlist with options",s),null}var v=d.filter(function(w){return w.width&&w.height});AR(v,function(w,L){return w.width-L.width});var y=v.filter(function(w){return w.width===n&&w.height===t});f=y[y.length-1];var m=y.filter(function(w){return w.bandwidth===f.bandwidth})[0],b,S,_;m||(b=v.filter(function(w){return w.width>n||w.height>t}),S=b.filter(function(w){return w.width===b[0].width&&w.height===b[0].height}),f=S[S.length-1],_=S.filter(function(w){return w.bandwidth===f.bandwidth})[0]);var C;if(a.experimentalLeastPixelDiffSelector){var T=v.map(function(w){return w.pixelDiff=Math.abs(w.width-n)+Math.abs(w.height-t),w});AR(T,function(w,L){return w.pixelDiff===L.pixelDiff?L.bandwidth-w.bandwidth:w.pixelDiff-L.pixelDiff}),C=T[0]}var x=C||_||m||h||c[0]||u[0];if(x&&x.playlist){var A="sortedPlaylistReps";return C?A="leastPixelDiffRep":_?A="resolutionPlusOneRep":m?A="resolutionBestRep":h?A="bandwidthBestRep":c[0]&&(A="enabledPlaylistReps"),sB("choosing "+vhe(x)+" using "+A+" with options",s),x.playlist}return sB("could not choose a playlist with options",s),null}},yhe=function(){var e=this.useDevicePixelRatio&&bt.devicePixelRatio||1;return Owe(this.playlists.master,this.systemBandwidth,parseInt(F3(this.tech_.el(),"width"),10)*e,parseInt(F3(this.tech_.el(),"height"),10)*e,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)},btt=function(e){var i=-1,n=-1;if(e<0||e>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){var t=this.useDevicePixelRatio&&bt.devicePixelRatio||1;return i<0&&(i=this.systemBandwidth,n=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==n&&(i=e*this.systemBandwidth+(1-e)*i,n=this.systemBandwidth),Owe(this.playlists.master,i,parseInt(F3(this.tech_.el(),"width"),10)*t,parseInt(F3(this.tech_.el(),"height"),10)*t,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)}},Stt=function(e){var i=e.master,n=e.currentTime,t=e.bandwidth,o=e.duration,a=e.segmentDuration,s=e.timeUntilRebuffer,l=e.currentTimeline,u=e.syncController,c=i.playlists.filter(function(g){return!wf.isIncompatible(g)}),d=c.filter(wf.isEnabled);d.length||(d=c.filter(function(g){return!wf.isDisabled(g)}));var f=d.filter(wf.hasAttribute.bind(null,"BANDWIDTH")),h=f.map(function(g){var v=u.getSyncPoint(g,o,l,n),y=v?1:2,m=wf.estimateSegmentRequestTime(a,t,g),b=m*y-s;return{playlist:g,rebufferingImpact:b}}),p=h.filter(function(g){return g.rebufferingImpact<=0});return AR(p,function(g,v){return Q9(v.playlist,g.playlist)}),p.length?p[0]:(AR(h,function(g,v){return g.rebufferingImpact-v.rebufferingImpact}),h[0]||null)},_tt=function(){var e=this,i=this.playlists.master.playlists.filter(wf.isEnabled);AR(i,function(t,o){return Q9(t,o)});var n=i.filter(function(t){return!!ON(e.playlists.master,t).video});return n[0]||null},Ptt=function(e){var i=0,n;return e.bytes&&(n=new Uint8Array(e.bytes),e.segments.forEach(function(t){n.set(t,i),i+=t.byteLength})),n},Ctt=function(e,i,n){if(!e[n]){i.trigger({type:"usage",name:"vhs-608"}),i.trigger({type:"usage",name:"hls-608"});var t=n;/^cc708_/.test(n)&&(t="SERVICE"+n.split("_")[1]);var o=i.textTracks().getTrackById(t);if(o)e[n]=o;else{var a=i.options_.vhs&&i.options_.vhs.captionServices||{},s=n,l=n,u=!1,c=a[t];c&&(s=c.label,l=c.language,u=c.default),e[n]=i.addRemoteTextTrack({kind:"captions",id:t,default:u,label:s,language:l},!1).track}}},Ttt=function(e){var i=e.inbandTextTracks,n=e.captionArray,t=e.timestampOffset;if(n){var o=bt.WebKitDataCue||bt.VTTCue;n.forEach(function(a){var s=a.stream;i[s].addCue(new o(a.startTime+t,a.endTime+t,a.text))})}},xtt=function(e){Object.defineProperties(e.frame,{id:{get:function(){return kt.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),e.value.key}},value:{get:function(){return kt.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),e.value.data}},privateData:{get:function(){return kt.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),e.value.data}}})},Ett=function(e){var i=e.inbandTextTracks,n=e.metadataArray,t=e.timestampOffset,o=e.videoDuration;if(n){var a=bt.WebKitDataCue||bt.VTTCue,s=i.metadataTrack_;if(s&&(n.forEach(function(h){var p=h.cueTime+t;typeof p!="number"||bt.isNaN(p)||p<0||!(p<1/0)||h.frames.forEach(function(g){var v=new a(p,p,g.value||g.url||g.data||"");v.frame=g,v.value=g,xtt(v),s.addCue(v)})}),!(!s.cues||!s.cues.length))){for(var l=s.cues,u=[],c=0;c<l.length;c++)l[c]&&u.push(l[c]);var d=u.reduce(function(h,p){var g=h[p.startTime]||[];return g.push(p),h[p.startTime]=g,h},{}),f=Object.keys(d).sort(function(h,p){return Number(h)-Number(p)});f.forEach(function(h,p){var g=d[h],v=Number(f[p+1])||o;g.forEach(function(y){y.endTime=v})})}}},Att=function(e,i,n){e.metadataTrack_||(e.metadataTrack_=n.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,e.metadataTrack_.inBandMetadataTrackDispatchType=i)},fN=function(e,i,n){var t,o;if(n&&n.cues)for(t=n.cues.length;t--;)o=n.cues[t],o.startTime>=e&&o.endTime<=i&&n.removeCue(o)},wtt=function(e){var i=e.cues;if(i)for(var n=0;n<i.length;n++){for(var t=[],o=0,a=0;a<i.length;a++)i[n].startTime===i[a].startTime&&i[n].endTime===i[a].endTime&&i[n].text===i[a].text&&(o++,o>1&&t.push(i[a]));t.length&&t.forEach(function(s){return e.removeCue(s)})}},Ott=function(e,i,n){if(typeof i>"u"||i===null||!e.length)return[];var t=Math.ceil((i-n+3)*P3.ONE_SECOND_IN_TS),o;for(o=0;o<e.length&&!(e[o].pts>t);o++);return e.slice(o)},Dtt=function(e,i,n){if(!i.length)return e;if(n)return i.slice();var t=i[0].pts,o=0;for(o;o<e.length&&!(e[o].pts>=t);o++);return e.slice(0,o).concat(i)},Rtt=function(e,i,n,t){for(var o=Math.ceil((i-t)*P3.ONE_SECOND_IN_TS),a=Math.ceil((n-t)*P3.ONE_SECOND_IN_TS),s=e.slice(),l=e.length;l--&&!(e[l].pts<=a););if(l===-1)return s;for(var u=l+1;u--&&!(e[u].pts<=o););return u=Math.max(u,0),s.splice(u,l-u+1),s},Mtt=function(e,i){if(!e&&!i||!e&&i||e&&!i)return!1;if(e===i)return!0;var n=Object.keys(e).sort(),t=Object.keys(i).sort();if(n.length!==t.length)return!1;for(var o=0;o<n.length;o++){var a=n[o];if(a!==t[o]||e[a]!==i[a])return!1}return!0},Dwe=22,Ltt=function(e,i,n){i=i||[];for(var t=[],o=0,a=0;a<i.length;a++){var s=i[a];if(e===s.timeline&&(t.push(a),o+=s.duration,o>n))return a}return t.length===0?0:t[t.length-1]},G2=1,ktt=500,mhe=function(e){return typeof e=="number"&&isFinite(e)},lB=1/60,Itt=function(e,i,n){return e!=="main"||!i||!n?null:!n.hasAudio&&!n.hasVideo?"Neither audio nor video found in segment.":i.hasVideo&&!n.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.":!i.hasVideo&&n.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},Ntt=function(e,i,n){var t=i-wu.BACK_BUFFER_LENGTH;e.length&&(t=Math.max(t,e.start(0)));var o=i-n;return Math.min(o,t)},qD=function(e){var i=e.startOfSegment,n=e.duration,t=e.segment,o=e.part,a=e.playlist,s=a.mediaSequence,l=a.id,u=a.segments,c=u===void 0?[]:u,d=e.mediaIndex,f=e.partIndex,h=e.timeline,p=c.length-1,g="mediaIndex/partIndex increment";e.getMediaInfoForTime?g="getMediaInfoForTime ("+e.getMediaInfoForTime+")":e.isSyncRequest&&(g="getSyncSegmentCandidate (isSyncRequest)"),e.independent&&(g+=" with independent "+e.independent);var v=typeof f=="number",y=e.segment.uri?"segment":"pre-segment",m=v?JAe({preloadSegment:t})-1:0;return y+" ["+(s+d)+"/"+(s+p)+"]"+(v?" part ["+f+"/"+m+"]":"")+(" segment start/end ["+t.start+" => "+t.end+"]")+(v?" part start/end ["+o.start+" => "+o.end+"]":"")+(" startOfSegment ["+i+"]")+(" duration ["+n+"]")+(" timeline ["+h+"]")+(" selected by ["+g+"]")+(" playlist ["+l+"]")},bhe=function(e){return e+"TimingInfo"},Ftt=function(e){var i=e.segmentTimeline,n=e.currentTimeline,t=e.startOfSegment,o=e.buffered,a=e.overrideCheck;return!a&&i===n?null:i<n?t:o.length?o.end(o.length-1):t},She=function(e){var i=e.timelineChangeController,n=e.currentTimeline,t=e.segmentTimeline,o=e.loaderType,a=e.audioDisabled;if(n===t)return!1;if(o==="audio"){var s=i.lastTimelineChange({type:"main"});return!s||s.to!==t}if(o==="main"&&a){var l=i.pendingTimelineChange({type:"audio"});return!(l&&l.to===t)}return!1},jtt=function(e){var i=0;return["video","audio"].forEach(function(n){var t=e[n+"TimingInfo"];if(t){var o=t.start,a=t.end,s;typeof o=="bigint"||typeof a=="bigint"?s=bt.BigInt(a)-bt.BigInt(o):typeof o=="number"&&typeof a=="number"&&(s=a-o),typeof s<"u"&&s>i&&(i=s)}}),typeof i=="bigint"&&i<Number.MAX_SAFE_INTEGER&&(i=Number(i)),i},_he=function(e){var i=e.segmentDuration,n=e.maxDuration;return i?Math.round(i)>n+WS:!1},Btt=function(e,i){if(i!=="hls")return null;var n=jtt({audioTimingInfo:e.audioTimingInfo,videoTimingInfo:e.videoTimingInfo});if(!n)return null;var t=e.playlist.targetDuration,o=_he({segmentDuration:n,maxDuration:t*2}),a=_he({segmentDuration:n,maxDuration:t}),s="Segment with index "+e.mediaIndex+" "+("from playlist "+e.playlist.id+" ")+("has a duration of "+n+" ")+("when the reported duration is "+e.duration+" ")+("and the target duration is "+t+". ")+"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 o||a?{severity:o?"warn":"info",message:s}:null},E$=(function(r){zr(e,r);function e(n,t){var o;if(o=r.call(this)||this,!n)throw new TypeError("Initialization settings are required");if(typeof n.currentTime!="function")throw new TypeError("No currentTime getter specified");if(!n.mediaSource)throw new TypeError("No MediaSource specified");return o.bandwidth=n.bandwidth,o.throughput={rate:0,count:0},o.roundTrip=NaN,o.resetStats_(),o.mediaIndex=null,o.partIndex=null,o.hasPlayed_=n.hasPlayed,o.currentTime_=n.currentTime,o.seekable_=n.seekable,o.seeking_=n.seeking,o.duration_=n.duration,o.mediaSource_=n.mediaSource,o.vhs_=n.vhs,o.loaderType_=n.loaderType,o.currentMediaInfo_=void 0,o.startingMediaInfo_=void 0,o.segmentMetadataTrack_=n.segmentMetadataTrack,o.goalBufferLength_=n.goalBufferLength,o.sourceType_=n.sourceType,o.sourceUpdater_=n.sourceUpdater,o.inbandTextTracks_=n.inbandTextTracks,o.state_="INIT",o.timelineChangeController_=n.timelineChangeController,o.shouldSaveSegmentTimingInfo_=!0,o.parse708captions_=n.parse708captions,o.useDtsForTimestampOffset_=n.useDtsForTimestampOffset,o.captionServices_=n.captionServices,o.experimentalExactManifestTimings=n.experimentalExactManifestTimings,o.checkBufferTimeout_=null,o.error_=void 0,o.currentTimeline_=-1,o.pendingSegment_=null,o.xhrOptions_=null,o.pendingSegments_=[],o.audioDisabled_=!1,o.isPendingTimestampOffset_=!1,o.gopBuffer_=[],o.timeMapping_=0,o.safeAppend_=kt.browser.IE_VERSION>=11,o.appendInitSegment_={audio:!0,video:!0},o.playlistOfLastInitSegment_={audio:null,video:null},o.callQueue_=[],o.loadQueue_=[],o.metadataQueue_={id3:[],caption:[]},o.waitingOnRemove_=!1,o.quotaExceededErrorRetryTimeout_=null,o.activeInitSegmentId_=null,o.initSegments_={},o.cacheEncryptionKeys_=n.cacheEncryptionKeys,o.keyCache_={},o.decrypter_=n.decrypter,o.syncController_=n.syncController,o.syncPoint_={segmentIndex:0,time:0},o.transmuxer_=o.createTransmuxer_(),o.triggerSyncInfoUpdate_=function(){return o.trigger("syncinfoupdate")},o.syncController_.on("syncinfoupdate",o.triggerSyncInfoUpdate_),o.mediaSource_.addEventListener("sourceopen",function(){o.isEndOfStream_()||(o.ended_=!1)}),o.fetchAtBuffer_=!1,o.logger_=Lg("SegmentLoader["+o.loaderType_+"]"),Object.defineProperty(sn(o),"state",{get:function(){return this.state_},set:function(s){s!==this.state_&&(this.logger_(this.state_+" -> "+s),this.state_=s,this.trigger("statechange"))}}),o.sourceUpdater_.on("ready",function(){o.hasEnoughInfoToAppend_()&&o.processCallQueue_()}),o.loaderType_==="main"&&o.timelineChangeController_.on("pendingtimelinechange",function(){o.hasEnoughInfoToAppend_()&&o.processCallQueue_()}),o.loaderType_==="audio"&&o.timelineChangeController_.on("timelinechange",function(){o.hasEnoughInfoToLoad_()&&o.processLoadQueue_(),o.hasEnoughInfoToAppend_()&&o.processCallQueue_()}),o}var i=e.prototype;return i.createTransmuxer_=function(){return JG.createTransmuxer({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})},i.resetStats_=function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0},i.dispose=function(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&bt.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()},i.setAudio=function(t){this.audioDisabled_=!t,t?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())},i.abort=function(){if(this.state!=="WAITING"){this.pendingSegment_&&(this.pendingSegment_=null);return}this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()},i.abort_=function(){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,bt.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null},i.checkForAbort_=function(t){return this.state==="APPENDING"&&!this.pendingSegment_?(this.state="READY",!0):!this.pendingSegment_||this.pendingSegment_.requestId!==t},i.error=function(t){return typeof t<"u"&&(this.logger_("error occurred:",t),this.error_=t),this.pendingSegment_=null,this.error_},i.endOfStream=function(){this.ended_=!0,this.transmuxer_&&JG.reset(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")},i.buffered_=function(){var t=this.getMediaInfo_();if(!this.sourceUpdater_||!t)return kt.createTimeRanges();if(this.loaderType_==="main"){var o=t.hasAudio,a=t.hasVideo,s=t.isMuxed;if(a&&o&&!this.audioDisabled_&&!s)return this.sourceUpdater_.buffered();if(a)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()},i.initSegmentForMap=function(t,o){if(o===void 0&&(o=!1),!t)return null;var a=k3(t),s=this.initSegments_[a];return o&&!s&&t.bytes&&(this.initSegments_[a]=s={resolvedUri:t.resolvedUri,byterange:t.byterange,bytes:t.bytes,tracks:t.tracks,timescales:t.timescales}),s||t},i.segmentKey=function(t,o){if(o===void 0&&(o=!1),!t)return null;var a=hwe(t),s=this.keyCache_[a];this.cacheEncryptionKeys_&&o&&!s&&t.bytes&&(this.keyCache_[a]=s={resolvedUri:t.resolvedUri,bytes:t.bytes});var l={resolvedUri:(s||t).resolvedUri};return s&&(l.bytes=s.bytes),l},i.couldBeginLoading_=function(){return this.playlist_&&!this.paused()},i.load=function(){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")}},i.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},i.playlist=function(t,o){if(o===void 0&&(o={}),!!t){var a=this.playlist_,s=this.pendingSegment_;this.playlist_=t,this.xhrOptions_=o,this.state==="INIT"&&(t.syncInfo={mediaSequence:t.mediaSequence,time:0},this.loaderType_==="main"&&this.syncController_.setDateTimeMappingForStart(t));var l=null;if(a&&(a.id?l=a.id:a.uri&&(l=a.uri)),this.logger_("playlist update ["+l+" => "+(t.id||t.uri)+"]"),this.trigger("syncinfoupdate"),this.state==="INIT"&&this.couldBeginLoading_())return this.init_();if(!a||a.uri!==t.uri){this.mediaIndex!==null&&(t.endList?this.resyncLoader():this.resetLoader()),this.currentMediaInfo_=void 0,this.trigger("playlistupdate");return}var u=t.mediaSequence-a.mediaSequence;if(this.logger_("live window shift ["+u+"]"),this.mediaIndex!==null)if(this.mediaIndex-=u,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{var c=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!c.parts||!c.parts.length||!c.parts[this.partIndex])){var d=this.mediaIndex;this.logger_("currently processing part (index "+this.partIndex+") no longer exists."),this.resetLoader(),this.mediaIndex=d}}s&&(s.mediaIndex-=u,s.mediaIndex<0?(s.mediaIndex=null,s.partIndex=null):(s.mediaIndex>=0&&(s.segment=t.segments[s.mediaIndex]),s.partIndex>=0&&s.segment.parts&&(s.part=s.segment.parts[s.partIndex]))),this.syncController_.saveExpiredSegmentInfo(a,t)}},i.pause=function(){this.checkBufferTimeout_&&(bt.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)},i.paused=function(){return this.checkBufferTimeout_===null},i.resetEverything=function(t){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,t),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))},i.resetLoader=function(){this.fetchAtBuffer_=!1,this.resyncLoader()},i.resyncLoader=function(){this.transmuxer_&&JG.reset(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})},i.remove=function(t,o,a,s){if(a===void 0&&(a=function(){}),s===void 0&&(s=!1),o===1/0&&(o=this.duration_()),o<=t){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}var l=1,u=function(){l--,l===0&&a()};(s||!this.audioDisabled_)&&(l++,this.sourceUpdater_.removeAudio(t,o,u)),(s||this.loaderType_==="main")&&(this.gopBuffer_=Rtt(this.gopBuffer_,t,o,this.timeMapping_),l++,this.sourceUpdater_.removeVideo(t,o,u));for(var c in this.inbandTextTracks_)fN(t,o,this.inbandTextTracks_[c]);fN(t,o,this.segmentMetadataTrack_),u()},i.monitorBuffer_=function(){this.checkBufferTimeout_&&bt.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=bt.setTimeout(this.monitorBufferTick_.bind(this),1)},i.monitorBufferTick_=function(){this.state==="READY"&&this.fillBuffer_(),this.checkBufferTimeout_&&bt.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=bt.setTimeout(this.monitorBufferTick_.bind(this),ktt)},i.fillBuffer_=function(){if(!this.sourceUpdater_.updating()){var t=this.chooseNextRequest_();t&&(typeof t.timestampOffset=="number"&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:t.timeline})),this.loadSegment_(t))}},i.isEndOfStream_=function(t,o,a){if(t===void 0&&(t=this.mediaIndex),o===void 0&&(o=this.playlist_),a===void 0&&(a=this.partIndex),!o||!this.mediaSource_)return!1;var s=typeof t=="number"&&o.segments[t],l=t+1===o.segments.length,u=!s||!s.parts||a+1===s.parts.length;return o.endList&&this.mediaSource_.readyState==="open"&&l&&u},i.chooseNextRequest_=function(){var t=this.buffered_(),o=lhe(t)||0,a=$9(t,this.currentTime_()),s=!this.hasPlayed_()&&a>=1,l=a>=this.goalBufferLength_(),u=this.playlist_.segments;if(!u.length||s||l)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_());var c={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:!this.syncPoint_};if(c.isSyncRequest)c.mediaIndex=Ltt(this.currentTimeline_,u,o);else if(this.mediaIndex!==null){var d=u[this.mediaIndex],f=typeof this.partIndex=="number"?this.partIndex:-1;c.startOfSegment=d.end?d.end:o,d.parts&&d.parts[f+1]?(c.mediaIndex=this.mediaIndex,c.partIndex=f+1):c.mediaIndex=this.mediaIndex+1}else{var h=wf.getMediaInfoForTime({experimentalExactManifestTimings:this.experimentalExactManifestTimings,playlist:this.playlist_,currentTime:this.fetchAtBuffer_?o:this.currentTime_(),startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time}),p=h.segmentIndex,g=h.startTime,v=h.partIndex;c.getMediaInfoForTime=this.fetchAtBuffer_?"bufferedEnd "+o:"currentTime "+this.currentTime_(),c.mediaIndex=p,c.startOfSegment=g,c.partIndex=v}var y=u[c.mediaIndex],m=y&&typeof c.partIndex=="number"&&y.parts&&y.parts[c.partIndex];if(!y||typeof c.partIndex=="number"&&!m)return null;if(typeof c.partIndex!="number"&&y.parts&&(c.partIndex=0,m=y.parts[0]),!a&&m&&!m.independent)if(c.partIndex===0){var b=u[c.mediaIndex-1],S=b.parts&&b.parts.length&&b.parts[b.parts.length-1];S&&S.independent&&(c.mediaIndex-=1,c.partIndex=b.parts.length-1,c.independent="previous segment")}else y.parts[c.partIndex-1].independent&&(c.partIndex-=1,c.independent="previous part");var _=this.mediaSource_&&this.mediaSource_.readyState==="ended";return c.mediaIndex>=u.length-1&&_&&!this.seeking_()?null:this.generateSegmentInfo_(c)},i.generateSegmentInfo_=function(t){var o=t.independent,a=t.playlist,s=t.mediaIndex,l=t.startOfSegment,u=t.isSyncRequest,c=t.partIndex,d=t.forceTimestampOffset,f=t.getMediaInfoForTime,h=a.segments[s],p=typeof c=="number"&&h.parts[c],g={requestId:"segment-loader-"+Math.random(),uri:p&&p.resolvedUri||h.resolvedUri,mediaIndex:s,partIndex:p?c:null,isSyncRequest:u,startOfSegment:l,playlist:a,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:h.timeline,duration:p&&p.duration||h.duration,segment:h,part:p,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:f,independent:o},v=typeof d<"u"?d:this.isPendingTimestampOffset_;g.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:h.timeline,currentTimeline:this.currentTimeline_,startOfSegment:l,buffered:this.buffered_(),overrideCheck:v});var y=lhe(this.sourceUpdater_.audioBuffered());return typeof y=="number"&&(g.audioAppendStart=y-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(g.gopsToAlignWith=Ott(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),g},i.timestampOffsetForSegment_=function(t){return Ftt(t)},i.earlyAbortWhenNeeded_=function(t){if(!(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)&&!(Date.now()-(t.firstBytesReceivedAt||Date.now())<1e3)){var o=this.currentTime_(),a=t.bandwidth,s=this.pendingSegment_.duration,l=wf.estimateSegmentRequestTime(s,a,this.playlist_,t.bytesReceived),u=net(this.buffered_(),o,this.vhs_.tech_.playbackRate())-1;if(!(l<=u)){var c=Stt({master:this.vhs_.playlists.master,currentTime:o,bandwidth:a,duration:this.duration_(),segmentDuration:s,timeUntilRebuffer:u,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(c){var d=l-u,f=d-c.rebufferingImpact,h=.5;u<=WS&&(h=1),!(!c.playlist||c.playlist.uri===this.playlist_.uri||f<h)&&(this.bandwidth=c.playlist.attributes.BANDWIDTH*wu.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}}}},i.handleAbort_=function(t){this.logger_("Aborting "+qD(t)),this.mediaRequestsAborted+=1},i.handleProgress_=function(t,o){this.earlyAbortWhenNeeded_(o.stats),!this.checkForAbort_(o.requestId)&&this.trigger("progress")},i.handleTrackInfo_=function(t,o){this.earlyAbortWhenNeeded_(t.stats),!this.checkForAbort_(t.requestId)&&(this.checkForIllegalMediaSwitch(o)||(o=o||{},Mtt(this.currentMediaInfo_,o)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=o,this.currentMediaInfo_=o,this.logger_("trackinfo update",o),this.trigger("trackinfo")),!this.checkForAbort_(t.requestId)&&(this.pendingSegment_.trackInfo=o,this.hasEnoughInfoToAppend_()&&this.processCallQueue_())))},i.handleTimingInfo_=function(t,o,a,s){if(this.earlyAbortWhenNeeded_(t.stats),!this.checkForAbort_(t.requestId)){var l=this.pendingSegment_,u=bhe(o);l[u]=l[u]||{},l[u][a]=s,this.logger_("timinginfo: "+o+" - "+a+" - "+s),this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}},i.handleCaptions_=function(t,o){var a=this;if(this.earlyAbortWhenNeeded_(t.stats),!this.checkForAbort_(t.requestId)){if(o.length===0){this.logger_("SegmentLoader received no captions from a caption event");return}var s=this.pendingSegment_;if(!s.hasAppendedData_){this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,t,o));return}var l=this.sourceUpdater_.videoTimestampOffset()===null?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),u={};o.forEach(function(c){u[c.stream]=u[c.stream]||{startTime:1/0,captions:[],endTime:0};var d=u[c.stream];d.startTime=Math.min(d.startTime,c.startTime+l),d.endTime=Math.max(d.endTime,c.endTime+l),d.captions.push(c)}),Object.keys(u).forEach(function(c){var d=u[c],f=d.startTime,h=d.endTime,p=d.captions,g=a.inbandTextTracks_;a.logger_("adding cues from "+f+" -> "+h+" for "+c),Ctt(g,a.vhs_.tech_,c),fN(f,h,g[c]),Ttt({captionArray:p,inbandTextTracks:g,timestampOffset:l})}),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}},i.handleId3_=function(t,o,a){if(this.earlyAbortWhenNeeded_(t.stats),!this.checkForAbort_(t.requestId)){var s=this.pendingSegment_;if(!s.hasAppendedData_){this.metadataQueue_.id3.push(this.handleId3_.bind(this,t,o,a));return}var l=this.sourceUpdater_.videoTimestampOffset()===null?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();Att(this.inbandTextTracks_,a,this.vhs_.tech_),Ett({inbandTextTracks:this.inbandTextTracks_,metadataArray:o,timestampOffset:l,videoDuration:this.duration_()})}},i.processMetadataQueue_=function(){this.metadataQueue_.id3.forEach(function(t){return t()}),this.metadataQueue_.caption.forEach(function(t){return t()}),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]},i.processCallQueue_=function(){var t=this.callQueue_;this.callQueue_=[],t.forEach(function(o){return o()})},i.processLoadQueue_=function(){var t=this.loadQueue_;this.loadQueue_=[],t.forEach(function(o){return o()})},i.hasEnoughInfoToLoad_=function(){if(this.loaderType_!=="audio")return!0;var t=this.pendingSegment_;return t?this.getCurrentMediaInfo_()?!She({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:t.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}):!0:!1},i.getCurrentMediaInfo_=function(t){return t===void 0&&(t=this.pendingSegment_),t&&t.trackInfo||this.currentMediaInfo_},i.getMediaInfo_=function(t){return t===void 0&&(t=this.pendingSegment_),this.getCurrentMediaInfo_(t)||this.startingMediaInfo_},i.getPendingSegmentPlaylist=function(){return this.pendingSegment_?this.pendingSegment_.playlist:null},i.hasEnoughInfoToAppend_=function(){if(!this.sourceUpdater_.ready()||this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;var t=this.pendingSegment_,o=this.getCurrentMediaInfo_();if(!t||!o)return!1;var a=o.hasAudio,s=o.hasVideo,l=o.isMuxed;return!(s&&!t.videoTimingInfo||a&&!this.audioDisabled_&&!l&&!t.audioTimingInfo||She({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:t.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},i.handleData_=function(t,o){if(this.earlyAbortWhenNeeded_(t.stats),!this.checkForAbort_(t.requestId)){if(this.callQueue_.length||!this.hasEnoughInfoToAppend_()){this.callQueue_.push(this.handleData_.bind(this,t,o));return}var a=this.pendingSegment_;if(this.setTimeMapping_(a.timeline),this.updateMediaSecondsLoaded_(a.part||a.segment),this.mediaSource_.readyState!=="closed"){if(t.map&&(t.map=this.initSegmentForMap(t.map,!0),a.segment.map=t.map),t.key&&this.segmentKey(t.key,!0),a.isFmp4=t.isFmp4,a.timingInfo=a.timingInfo||{},a.isFmp4)this.trigger("fmp4"),a.timingInfo.start=a[bhe(o.type)].start;else{var s=this.getCurrentMediaInfo_(),l=this.loaderType_==="main"&&s&&s.hasVideo,u;l&&(u=a.videoTimingInfo.start),a.timingInfo.start=this.trueSegmentStart_({currentStart:a.timingInfo.start,playlist:a.playlist,mediaIndex:a.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:l,firstVideoFrameTimeForData:u,videoTimingInfo:a.videoTimingInfo,audioTimingInfo:a.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(a,o.type),this.updateSourceBufferTimestampOffset_(a),a.isSyncRequest){this.updateTimingInfoEnd_(a),this.syncController_.saveSegmentTimingInfo({segmentInfo:a,shouldSaveTimelineMapping:this.loaderType_==="main"});var c=this.chooseNextRequest_();if(c.mediaIndex!==a.mediaIndex||c.partIndex!==a.partIndex){this.logger_("sync segment was incorrect, not appending");return}this.logger_("sync segment was correct, appending")}a.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(a,o)}}},i.updateAppendInitSegmentStatus=function(t,o){this.loaderType_==="main"&&typeof t.timestampOffset=="number"&&!t.changedTimestampOffset&&(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[o]!==t.playlist&&(this.appendInitSegment_[o]=!0)},i.getInitSegmentAndUpdateState_=function(t){var o=t.type,a=t.initSegment,s=t.map,l=t.playlist;if(s){var u=k3(s);if(this.activeInitSegmentId_===u)return null;a=this.initSegmentForMap(s,!0).bytes,this.activeInitSegmentId_=u}return a&&this.appendInitSegment_[o]?(this.playlistOfLastInitSegment_[o]=l,this.appendInitSegment_[o]=!1,this.activeInitSegmentId_=null,a):null},i.handleQuotaExceededError_=function(t,o){var a=this,s=t.segmentInfo,l=t.type,u=t.bytes,c=this.sourceUpdater_.audioBuffered(),d=this.sourceUpdater_.videoBuffered();c.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+Kw(c).join(", ")),d.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+Kw(d).join(", "));var f=c.length?c.start(0):0,h=c.length?c.end(c.length-1):0,p=d.length?d.start(0):0,g=d.length?d.end(d.length-1):0;if(h-f<=G2&&g-p<=G2){this.logger_("On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. "+("Appended byte length: "+u.byteLength+", ")+("audio buffer: "+Kw(c).join(", ")+", ")+("video buffer: "+Kw(d).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:s,type:l,bytes:u}));var v=this.currentTime_(),y=v-G2;this.logger_("On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to "+y),this.remove(0,y,function(){a.logger_("On QUOTA_EXCEEDED_ERR, retrying append in "+G2+"s"),a.waitingOnRemove_=!1,a.quotaExceededErrorRetryTimeout_=bt.setTimeout(function(){a.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),a.quotaExceededErrorRetryTimeout_=null,a.processCallQueue_()},G2*1e3)},!0)},i.handleAppendError_=function(t,o){var a=t.segmentInfo,s=t.type,l=t.bytes;if(o){if(o.code===Dwe){this.handleQuotaExceededError_({segmentInfo:a,type:s,bytes:l});return}this.logger_("Received non QUOTA_EXCEEDED_ERR on append",o),this.error(s+" append of "+l.length+"b failed for segment "+("#"+a.mediaIndex+" in playlist "+a.playlist.id)),this.trigger("appenderror")}},i.appendToSourceBuffer_=function(t){var o=t.segmentInfo,a=t.type,s=t.initSegment,l=t.data,u=t.bytes;if(!u){var c=[l],d=l.byteLength;s&&(c.unshift(s),d+=s.byteLength),u=Ptt({bytes:d,segments:c})}this.sourceUpdater_.appendBuffer({segmentInfo:o,type:a,bytes:u},this.handleAppendError_.bind(this,{segmentInfo:o,type:a,bytes:u}))},i.handleSegmentTimingInfo_=function(t,o,a){if(!(!this.pendingSegment_||o!==this.pendingSegment_.requestId)){var s=this.pendingSegment_.segment,l=t+"TimingInfo";s[l]||(s[l]={}),s[l].transmuxerPrependedSeconds=a.prependedContentDuration||0,s[l].transmuxedPresentationStart=a.start.presentation,s[l].transmuxedDecodeStart=a.start.decode,s[l].transmuxedPresentationEnd=a.end.presentation,s[l].transmuxedDecodeEnd=a.end.decode,s[l].baseMediaDecodeTime=a.baseMediaDecodeTime}},i.appendData_=function(t,o){var a=o.type,s=o.data;if(!(!s||!s.byteLength)&&!(a==="audio"&&this.audioDisabled_)){var l=this.getInitSegmentAndUpdateState_({type:a,initSegment:o.initSegment,playlist:t.playlist,map:t.isFmp4?t.segment.map:null});this.appendToSourceBuffer_({segmentInfo:t,type:a,initSegment:l,data:s})}},i.loadSegment_=function(t){var o=this;if(this.state="WAITING",this.pendingSegment_=t,this.trimBackBuffer_(t),typeof t.timestampOffset=="number"&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),!this.hasEnoughInfoToLoad_()){this.loadQueue_.push(function(){var a=wn({},t,{forceTimestampOffset:!0});wn(t,o.generateSegmentInfo_(a)),o.isPendingTimestampOffset_=!1,o.updateTransmuxerAndRequestSegment_(t)});return}this.updateTransmuxerAndRequestSegment_(t)},i.updateTransmuxerAndRequestSegment_=function(t){var o=this;this.shouldUpdateTransmuxerTimestampOffset_(t.timestampOffset)&&(this.gopBuffer_.length=0,t.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:t.timestampOffset}));var a=this.createSimplifiedSegmentObj_(t),s=this.isEndOfStream_(t.mediaIndex,t.playlist,t.partIndex),l=this.mediaIndex!==null,u=t.timeline!==this.currentTimeline_&&t.timeline>0,c=s||l&&u;this.logger_("Requesting "+qD(t)),a.map&&!a.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),t.abortRequests=ptt({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:a,abortFn:this.handleAbort_.bind(this,t),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",t.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",t.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:c,endedTimelineFn:function(){o.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:function(f){var h=f.message,p=f.level,g=f.stream;o.logger_(qD(t)+" logged from transmuxer stream "+g+" as a "+p+": "+h)}})},i.trimBackBuffer_=function(t){var o=Ntt(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);o>0&&this.remove(0,o)},i.createSimplifiedSegmentObj_=function(t){var o=t.segment,a=t.part,s={resolvedUri:a?a.resolvedUri:o.resolvedUri,byterange:a?a.byterange:o.byterange,requestId:t.requestId,transmuxer:t.transmuxer,audioAppendStart:t.audioAppendStart,gopsToAlignWith:t.gopsToAlignWith,part:t.part},l=t.playlist.segments[t.mediaIndex-1];if(l&&l.timeline===o.timeline&&(l.videoTimingInfo?s.baseStartTime=l.videoTimingInfo.transmuxedDecodeEnd:l.audioTimingInfo&&(s.baseStartTime=l.audioTimingInfo.transmuxedDecodeEnd)),o.key){var u=o.key.iv||new Uint32Array([0,0,0,t.mediaIndex+t.playlist.mediaSequence]);s.key=this.segmentKey(o.key),s.key.iv=u}return o.map&&(s.map=this.initSegmentForMap(o.map)),s},i.saveTransferStats_=function(t){this.mediaRequests+=1,t&&(this.mediaBytesTransferred+=t.bytesReceived,this.mediaTransferDuration+=t.roundTripTime)},i.saveBandwidthRelatedStats_=function(t,o){if(this.pendingSegment_.byteLength=o.bytesReceived,t<lB){this.logger_("Ignoring segment's bandwidth because its duration of "+t+(" is less than the min to record "+lB));return}this.bandwidth=o.bandwidth,this.roundTrip=o.roundTripTime},i.handleTimeout_=function(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate"),this.trigger("timeout")},i.segmentRequestFinished_=function(t,o,a){if(this.callQueue_.length){this.callQueue_.push(this.segmentRequestFinished_.bind(this,t,o,a));return}if(this.saveTransferStats_(o.stats),!!this.pendingSegment_&&o.requestId===this.pendingSegment_.requestId){if(t){if(this.pendingSegment_=null,this.state="READY",t.code===Nv.ABORTED)return;if(this.pause(),t.code===Nv.TIMEOUT){this.handleTimeout_();return}this.mediaRequestsErrored+=1,this.error(t),this.trigger("error");return}var s=this.pendingSegment_;this.saveBandwidthRelatedStats_(s.duration,o.stats),s.endOfAllRequests=o.endOfAllRequests,a.gopInfo&&(this.gopBuffer_=Dtt(this.gopBuffer_,a.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(s)}},i.setTimeMapping_=function(t){var o=this.syncController_.mappingForTimeline(t);o!==null&&(this.timeMapping_=o)},i.updateMediaSecondsLoaded_=function(t){typeof t.start=="number"&&typeof t.end=="number"?this.mediaSecondsLoaded+=t.end-t.start:this.mediaSecondsLoaded+=t.duration},i.shouldUpdateTransmuxerTimestampOffset_=function(t){return t===null?!1:this.loaderType_==="main"&&t!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&t!==this.sourceUpdater_.audioTimestampOffset()},i.trueSegmentStart_=function(t){var o=t.currentStart,a=t.playlist,s=t.mediaIndex,l=t.firstVideoFrameTimeForData,u=t.currentVideoTimestampOffset,c=t.useVideoTimingInfo,d=t.videoTimingInfo,f=t.audioTimingInfo;if(typeof o<"u")return o;if(!c)return f.start;var h=a.segments[s-1];return s===0||!h||typeof h.start>"u"||h.end!==l+u?l:d.start},i.waitForAppendsToComplete_=function(t){var o=this.getCurrentMediaInfo_(t);if(!o){this.error({message:"No starting media returned, likely due to an unsupported media format.",blacklistDuration:1/0}),this.trigger("error");return}var a=o.hasAudio,s=o.hasVideo,l=o.isMuxed,u=this.loaderType_==="main"&&s,c=!this.audioDisabled_&&a&&!l;if(t.waitingOnAppends=0,!t.hasAppendedData_){!t.timingInfo&&typeof t.timestampOffset=="number"&&(this.isPendingTimestampOffset_=!0),t.timingInfo={start:0},t.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(t),this.processMetadataQueue_()),this.checkAppendsDone_(t);return}u&&t.waitingOnAppends++,c&&t.waitingOnAppends++,u&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,t)),c&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,t))},i.checkAppendsDone_=function(t){this.checkForAbort_(t.requestId)||(t.waitingOnAppends--,t.waitingOnAppends===0&&this.handleAppendsDone_())},i.checkForIllegalMediaSwitch=function(t){var o=Itt(this.loaderType_,this.getCurrentMediaInfo_(),t);return o?(this.error({message:o,blacklistDuration:1/0}),this.trigger("error"),!0):!1},i.updateSourceBufferTimestampOffset_=function(t){if(!(t.timestampOffset===null||typeof t.timingInfo.start!="number"||t.changedTimestampOffset||this.loaderType_!=="main")){var o=!1;t.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:t.segment.videoTimingInfo,audioTimingInfo:t.segment.audioTimingInfo,timingInfo:t.timingInfo}),t.changedTimestampOffset=!0,t.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(t.timestampOffset),o=!0),t.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(t.timestampOffset),o=!0),o&&this.trigger("timestampoffset")}},i.getSegmentStartTimeForTimestampOffsetCalculation_=function(t){var o=t.videoTimingInfo,a=t.audioTimingInfo,s=t.timingInfo;return this.useDtsForTimestampOffset_?o&&typeof o.transmuxedDecodeStart=="number"?o.transmuxedDecodeStart:a&&typeof a.transmuxedDecodeStart=="number"?a.transmuxedDecodeStart:s.start:s.start},i.updateTimingInfoEnd_=function(t){t.timingInfo=t.timingInfo||{};var o=this.getMediaInfo_(),a=this.loaderType_==="main"&&o&&o.hasVideo,s=a&&t.videoTimingInfo?t.videoTimingInfo:t.audioTimingInfo;s&&(t.timingInfo.end=typeof s.end=="number"?s.end:s.start+t.duration)},i.handleAppendsDone_=function(){if(this.pendingSegment_&&this.trigger("appendsdone"),!this.pendingSegment_){this.state="READY",this.paused()||this.monitorBuffer_();return}var t=this.pendingSegment_;this.updateTimingInfoEnd_(t),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:t,shouldSaveTimelineMapping:this.loaderType_==="main"});var o=Btt(t,this.sourceType_);if(o&&(o.severity==="warn"?kt.log.warn(o.message):this.logger_(o.message)),this.recordThroughput_(t),this.pendingSegment_=null,this.state="READY",t.isSyncRequest&&(this.trigger("syncinfoupdate"),!t.hasAppendedData_)){this.logger_("Throwing away un-appended sync request "+qD(t));return}this.logger_("Appended "+qD(t)),this.addSegmentMetadataCue_(t),this.fetchAtBuffer_=!0,this.currentTimeline_!==t.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:t.timeline}),this.loaderType_==="main"&&!this.audioDisabled_&&this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:t.timeline})),this.currentTimeline_=t.timeline,this.trigger("syncinfoupdate");var a=t.segment,s=t.part,l=a.end&&this.currentTime_()-a.end>t.playlist.targetDuration*3,u=s&&s.end&&this.currentTime_()-s.end>t.playlist.partTargetDuration*3;if(l||u){this.logger_("bad "+(l?"segment":"part")+" "+qD(t)),this.resetEverything();return}var c=this.mediaIndex!==null;c&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=t.mediaIndex,this.partIndex=t.partIndex,this.isEndOfStream_(t.mediaIndex,t.playlist,t.partIndex)&&this.endOfStream(),this.trigger("appended"),t.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()},i.recordThroughput_=function(t){if(t.duration<lB){this.logger_("Ignoring segment's throughput because its duration of "+t.duration+(" is less than the min to record "+lB));return}var o=this.throughput.rate,a=Date.now()-t.endOfAllRequests+1,s=Math.floor(t.byteLength/a*8*1e3);this.throughput.rate+=(s-o)/++this.throughput.count},i.addSegmentMetadataCue_=function(t){if(this.segmentMetadataTrack_){var o=t.segment,a=o.start,s=o.end;if(!(!mhe(a)||!mhe(s))){fN(a,s,this.segmentMetadataTrack_);var l=bt.WebKitDataCue||bt.VTTCue,u={custom:o.custom,dateTimeObject:o.dateTimeObject,dateTimeString:o.dateTimeString,bandwidth:t.playlist.attributes.BANDWIDTH,resolution:t.playlist.attributes.RESOLUTION,codecs:t.playlist.attributes.CODECS,byteLength:t.byteLength,uri:t.uri,timeline:t.timeline,playlist:t.playlist.id,start:a,end:s},c=JSON.stringify(u),d=new l(a,s,c);d.value=u,this.segmentMetadataTrack_.addCue(d)}}},e})(kt.EventTarget);function j0(){}var Rwe=function(e){return typeof e!="string"?e:e.replace(/./,function(i){return i.toUpperCase()})},Vtt=["video","audio"],A$=function(e,i){var n=i[e+"Buffer"];return n&&n.updating||i.queuePending[e]},Htt=function(e,i){for(var n=0;n<i.length;n++){var t=i[n];if(t.type==="mediaSource")return null;if(t.type===e)return n}return null},e7=function r(e,i){if(i.queue.length!==0){var n=0,t=i.queue[n];if(t.type==="mediaSource"){!i.updating()&&i.mediaSource.readyState!=="closed"&&(i.queue.shift(),t.action(i),t.doneFn&&t.doneFn(),r("audio",i),r("video",i));return}if(e!=="mediaSource"&&!(!i.ready()||i.mediaSource.readyState==="closed"||A$(e,i))){if(t.type!==e){if(n=Htt(e,i.queue),n===null)return;t=i.queue[n]}if(i.queue.splice(n,1),i.queuePending[e]=t,t.action(e,i),!t.doneFn){i.queuePending[e]=null,r(e,i);return}}}},Mwe=function(e,i){var n=i[e+"Buffer"],t=Rwe(e);n&&(n.removeEventListener("updateend",i["on"+t+"UpdateEnd_"]),n.removeEventListener("error",i["on"+t+"Error_"]),i.codecs[e]=null,i[e+"Buffer"]=null)},Ev=function(e,i){return e&&i&&Array.prototype.indexOf.call(e.sourceBuffers,i)!==-1},dh={appendBuffer:function(e,i,n){return function(t,o){var a=o[t+"Buffer"];if(Ev(o.mediaSource,a)){o.logger_("Appending segment "+i.mediaIndex+"'s "+e.length+" bytes to "+t+"Buffer");try{a.appendBuffer(e)}catch(s){o.logger_("Error with code "+s.code+" "+(s.code===Dwe?"(QUOTA_EXCEEDED_ERR) ":"")+("when appending segment "+i.mediaIndex+" to "+t+"Buffer")),o.queuePending[t]=null,n(s)}}}},remove:function(e,i){return function(n,t){var o=t[n+"Buffer"];if(Ev(t.mediaSource,o)){t.logger_("Removing "+e+" to "+i+" from "+n+"Buffer");try{o.remove(e,i)}catch{t.logger_("Remove "+e+" to "+i+" from "+n+"Buffer failed")}}}},timestampOffset:function(e){return function(i,n){var t=n[i+"Buffer"];Ev(n.mediaSource,t)&&(n.logger_("Setting "+i+"timestampOffset to "+e),t.timestampOffset=e)}},callback:function(e){return function(i,n){e()}},endOfStream:function(e){return function(i){if(i.mediaSource.readyState==="open"){i.logger_("Calling mediaSource endOfStream("+(e||"")+")");try{i.mediaSource.endOfStream(e)}catch(n){kt.log.warn("Failed to call media source endOfStream",n)}}}},duration:function(e){return function(i){i.logger_("Setting mediaSource duration to "+e);try{i.mediaSource.duration=e}catch(n){kt.log.warn("Failed to set media source duration",n)}}},abort:function(){return function(e,i){if(i.mediaSource.readyState==="open"){var n=i[e+"Buffer"];if(Ev(i.mediaSource,n)){i.logger_("calling abort on "+e+"Buffer");try{n.abort()}catch(t){kt.log.warn("Failed to abort on "+e+"Buffer",t)}}}}},addSourceBuffer:function(e,i){return function(n){var t=Rwe(e),o=pF(i);n.logger_("Adding "+e+"Buffer with codec "+i+" to mediaSource");var a=n.mediaSource.addSourceBuffer(o);a.addEventListener("updateend",n["on"+t+"UpdateEnd_"]),a.addEventListener("error",n["on"+t+"Error_"]),n.codecs[e]=i,n[e+"Buffer"]=a}},removeSourceBuffer:function(e){return function(i){var n=i[e+"Buffer"];if(Mwe(e,i),!!Ev(i.mediaSource,n)){i.logger_("Removing "+e+"Buffer with codec "+i.codecs[e]+" from mediaSource");try{i.mediaSource.removeSourceBuffer(n)}catch(t){kt.log.warn("Failed to removeSourceBuffer "+e+"Buffer",t)}}}},changeType:function(e){return function(i,n){var t=n[i+"Buffer"],o=pF(e);if(Ev(n.mediaSource,t)&&n.codecs[i]!==e){n.logger_("changing "+i+"Buffer codec from "+n.codecs[i]+" to "+e);try{t.changeType(o),n.codecs[i]=e}catch(a){kt.log.warn("Failed to changeType on "+i+"Buffer",a)}}}}},fh=function(e){var i=e.type,n=e.sourceUpdater,t=e.action,o=e.doneFn,a=e.name;n.queue.push({type:i,action:t,doneFn:o,name:a}),e7(i,n)},Phe=function(e,i){return function(n){if(i.queuePending[e]){var t=i.queuePending[e].doneFn;i.queuePending[e]=null,t&&t(i[e+"Error_"])}e7(e,i)}},Lwe=(function(r){zr(e,r);function e(n){var t;return t=r.call(this)||this,t.mediaSource=n,t.sourceopenListener_=function(){return e7("mediaSource",sn(t))},t.mediaSource.addEventListener("sourceopen",t.sourceopenListener_),t.logger_=Lg("SourceUpdater"),t.audioTimestampOffset_=0,t.videoTimestampOffset_=0,t.queue=[],t.queuePending={audio:null,video:null},t.delayedAudioAppendQueue_=[],t.videoAppendQueued_=!1,t.codecs={},t.onVideoUpdateEnd_=Phe("video",sn(t)),t.onAudioUpdateEnd_=Phe("audio",sn(t)),t.onVideoError_=function(o){t.videoError_=o},t.onAudioError_=function(o){t.audioError_=o},t.createdSourceBuffers_=!1,t.initializedEme_=!1,t.triggeredReady_=!1,t}var i=e.prototype;return i.initializedEme=function(){this.initializedEme_=!0,this.triggerReady()},i.hasCreatedSourceBuffers=function(){return this.createdSourceBuffers_},i.hasInitializedAnyEme=function(){return this.initializedEme_},i.ready=function(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()},i.createSourceBuffers=function(t){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(t),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())},i.triggerReady=function(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))},i.addSourceBuffer=function(t,o){fh({type:"mediaSource",sourceUpdater:this,action:dh.addSourceBuffer(t,o),name:"addSourceBuffer"})},i.abort=function(t){fh({type:t,sourceUpdater:this,action:dh.abort(t),name:"abort"})},i.removeSourceBuffer=function(t){if(!this.canRemoveSourceBuffer()){kt.log.error("removeSourceBuffer is not supported!");return}fh({type:"mediaSource",sourceUpdater:this,action:dh.removeSourceBuffer(t),name:"removeSourceBuffer"})},i.canRemoveSourceBuffer=function(){return!kt.browser.IE_VERSION&&!kt.browser.IS_FIREFOX&&bt.MediaSource&&bt.MediaSource.prototype&&typeof bt.MediaSource.prototype.removeSourceBuffer=="function"},e.canChangeType=function(){return bt.SourceBuffer&&bt.SourceBuffer.prototype&&typeof bt.SourceBuffer.prototype.changeType=="function"},i.canChangeType=function(){return this.constructor.canChangeType()},i.changeType=function(t,o){if(!this.canChangeType()){kt.log.error("changeType is not supported!");return}fh({type:t,sourceUpdater:this,action:dh.changeType(o),name:"changeType"})},i.addOrChangeSourceBuffers=function(t){var o=this;if(!t||typeof t!="object"||Object.keys(t).length===0)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(t).forEach(function(a){var s=t[a];if(!o.hasCreatedSourceBuffers())return o.addSourceBuffer(a,s);o.canChangeType()&&o.changeType(a,s)})},i.appendBuffer=function(t,o){var a=this,s=t.segmentInfo,l=t.type,u=t.bytes;if(this.processedAppend_=!0,l==="audio"&&this.videoBuffer&&!this.videoAppendQueued_){this.delayedAudioAppendQueue_.push([t,o]),this.logger_("delayed audio append of "+u.length+" until video append");return}var c=o;if(fh({type:l,sourceUpdater:this,action:dh.appendBuffer(u,s||{mediaIndex:-1},c),doneFn:o,name:"appendBuffer"}),l==="video"){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;var d=this.delayedAudioAppendQueue_.slice();this.logger_("queuing delayed audio "+d.length+" appendBuffers"),this.delayedAudioAppendQueue_.length=0,d.forEach(function(f){a.appendBuffer.apply(a,f)})}},i.audioBuffered=function(){return Ev(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:kt.createTimeRange()},i.videoBuffered=function(){return Ev(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:kt.createTimeRange()},i.buffered=function(){var t=Ev(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,o=Ev(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return o&&!t?this.audioBuffered():t&&!o?this.videoBuffered():iet(this.audioBuffered(),this.videoBuffered())},i.setDuration=function(t,o){o===void 0&&(o=j0),fh({type:"mediaSource",sourceUpdater:this,action:dh.duration(t),name:"duration",doneFn:o})},i.endOfStream=function(t,o){t===void 0&&(t=null),o===void 0&&(o=j0),typeof t!="string"&&(t=void 0),fh({type:"mediaSource",sourceUpdater:this,action:dh.endOfStream(t),name:"endOfStream",doneFn:o})},i.removeAudio=function(t,o,a){if(a===void 0&&(a=j0),!this.audioBuffered().length||this.audioBuffered().end(0)===0){a();return}fh({type:"audio",sourceUpdater:this,action:dh.remove(t,o),doneFn:a,name:"remove"})},i.removeVideo=function(t,o,a){if(a===void 0&&(a=j0),!this.videoBuffered().length||this.videoBuffered().end(0)===0){a();return}fh({type:"video",sourceUpdater:this,action:dh.remove(t,o),doneFn:a,name:"remove"})},i.updating=function(){return!!(A$("audio",this)||A$("video",this))},i.audioTimestampOffset=function(t){return typeof t<"u"&&this.audioBuffer&&this.audioTimestampOffset_!==t&&(fh({type:"audio",sourceUpdater:this,action:dh.timestampOffset(t),name:"timestampOffset"}),this.audioTimestampOffset_=t),this.audioTimestampOffset_},i.videoTimestampOffset=function(t){return typeof t<"u"&&this.videoBuffer&&this.videoTimestampOffset!==t&&(fh({type:"video",sourceUpdater:this,action:dh.timestampOffset(t),name:"timestampOffset"}),this.videoTimestampOffset_=t),this.videoTimestampOffset_},i.audioQueueCallback=function(t){this.audioBuffer&&fh({type:"audio",sourceUpdater:this,action:dh.callback(t),name:"callback"})},i.videoQueueCallback=function(t){this.videoBuffer&&fh({type:"video",sourceUpdater:this,action:dh.callback(t),name:"callback"})},i.dispose=function(){var t=this;this.trigger("dispose"),Vtt.forEach(function(o){t.abort(o),t.canRemoveSourceBuffer()?t.removeSourceBuffer(o):t[o+"QueueCallback"](function(){return Mwe(o,t)})}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()},e})(kt.EventTarget),Che=function(e){return decodeURIComponent(escape(String.fromCharCode.apply(null,e)))},The=new Uint8Array(`

`.split("").map(function(r){return r.charCodeAt(0)})),Utt=(function(r){zr(e,r);function e(){return r.call(this,"Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.")||this}return e})(l$(Error)),ztt=(function(r){zr(e,r);function e(n,t){var o;return t===void 0&&(t={}),o=r.call(this,n,t)||this,o.mediaSource_=null,o.subtitlesTrack_=null,o.loaderType_="subtitle",o.featuresNativeTextTracks_=n.featuresNativeTextTracks,o.loadVttJs=n.loadVttJs,o.shouldSaveSegmentTimingInfo_=!1,o}var i=e.prototype;return i.createTransmuxer_=function(){return null},i.buffered_=function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return kt.createTimeRanges();var t=this.subtitlesTrack_.cues,o=t[0].startTime,a=t[t.length-1].startTime;return kt.createTimeRanges([[o,a]])},i.initSegmentForMap=function(t,o){if(o===void 0&&(o=!1),!t)return null;var a=k3(t),s=this.initSegments_[a];if(o&&!s&&t.bytes){var l=The.byteLength+t.bytes.byteLength,u=new Uint8Array(l);u.set(t.bytes),u.set(The,t.bytes.byteLength),this.initSegments_[a]=s={resolvedUri:t.resolvedUri,byterange:t.byterange,bytes:u}}return s||t},i.couldBeginLoading_=function(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()},i.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},i.track=function(t){return typeof t>"u"?this.subtitlesTrack_:(this.subtitlesTrack_=t,this.state==="INIT"&&this.couldBeginLoading_()&&this.init_(),this.subtitlesTrack_)},i.remove=function(t,o){fN(t,o,this.subtitlesTrack_)},i.fillBuffer_=function(){var t=this,o=this.chooseNextRequest_();if(o){if(this.syncController_.timestampOffsetForTimeline(o.timeline)===null){var a=function(){t.state="READY",t.paused()||t.monitorBuffer_()};this.syncController_.one("timestampoffset",a),this.state="WAITING_ON_TIMELINE";return}this.loadSegment_(o)}},i.timestampOffsetForSegment_=function(){return null},i.chooseNextRequest_=function(){return this.skipEmptySegments_(r.prototype.chooseNextRequest_.call(this))},i.skipEmptySegments_=function(t){for(;t&&t.segment.empty;){if(t.mediaIndex+1>=t.playlist.segments.length){t=null;break}t=this.generateSegmentInfo_({playlist:t.playlist,mediaIndex:t.mediaIndex+1,startOfSegment:t.startOfSegment+t.duration,isSyncRequest:t.isSyncRequest})}return t},i.stopForError=function(t){this.error(t),this.state="READY",this.pause(),this.trigger("error")},i.segmentRequestFinished_=function(t,o,a){var s=this;if(!this.subtitlesTrack_){this.state="READY";return}if(this.saveTransferStats_(o.stats),!this.pendingSegment_){this.state="READY",this.mediaRequestsAborted+=1;return}if(t){t.code===Nv.TIMEOUT&&this.handleTimeout_(),t.code===Nv.ABORTED?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,this.stopForError(t);return}var l=this.pendingSegment_;this.saveBandwidthRelatedStats_(l.duration,o.stats),o.key&&this.segmentKey(o.key,!0),this.state="APPENDING",this.trigger("appending");var u=l.segment;if(u.map&&(u.map.bytes=o.map.bytes),l.bytes=o.bytes,typeof bt.WebVTT!="function"&&typeof this.loadVttJs=="function"){this.state="WAITING_ON_VTTJS",this.loadVttJs().then(function(){return s.segmentRequestFinished_(t,o,a)},function(){return s.stopForError({message:"Error loading vtt.js"})});return}u.requested=!0;try{this.parseVTTCues_(l)}catch(c){this.stopForError({message:c.message});return}if(this.updateTimeMapping_(l,this.syncController_.timelines[l.timeline],this.playlist_),l.cues.length?l.timingInfo={start:l.cues[0].startTime,end:l.cues[l.cues.length-1].endTime}:l.timingInfo={start:l.startOfSegment,end:l.startOfSegment+l.duration},l.isSyncRequest){this.trigger("syncinfoupdate"),this.pendingSegment_=null,this.state="READY";return}l.byteLength=l.bytes.byteLength,this.mediaSecondsLoaded+=u.duration,l.cues.forEach(function(c){s.subtitlesTrack_.addCue(s.featuresNativeTextTracks_?new bt.VTTCue(c.startTime,c.endTime,c.text):c)}),wtt(this.subtitlesTrack_),this.handleAppendsDone_()},i.handleData_=function(){},i.updateTimingInfoEnd_=function(){},i.parseVTTCues_=function(t){var o,a=!1;if(typeof bt.WebVTT!="function")throw new Utt;typeof bt.TextDecoder=="function"?o=new bt.TextDecoder("utf8"):(o=bt.WebVTT.StringDecoder(),a=!0);var s=new bt.WebVTT.Parser(bt,bt.vttjs,o);if(t.cues=[],t.timestampmap={MPEGTS:0,LOCAL:0},s.oncue=t.cues.push.bind(t.cues),s.ontimestampmap=function(c){t.timestampmap=c},s.onparsingerror=function(c){kt.log.warn("Error encountered when parsing cues: "+c.message)},t.segment.map){var l=t.segment.map.bytes;a&&(l=Che(l)),s.parse(l)}var u=t.bytes;a&&(u=Che(u)),s.parse(u),s.flush()},i.updateTimeMapping_=function(t,o,a){var s=t.segment;if(o){if(!t.cues.length){s.empty=!0;return}var l=t.timestampmap,u=l.MPEGTS/P3.ONE_SECOND_IN_TS-l.LOCAL+o.mapping;if(t.cues.forEach(function(f){f.startTime+=u,f.endTime+=u}),!a.syncInfo){var c=t.cues[0].startTime,d=t.cues[t.cues.length-1].startTime;a.syncInfo={mediaSequence:a.mediaSequence+t.mediaIndex,time:Math.min(c,d-s.duration)}}}},e})(E$),Wtt=function(e,i){for(var n=e.cues,t=0;t<n.length;t++){var o=n[t];if(i>=o.adStartTime&&i<=o.adEndTime)return o}return null},Gtt=function(e,i,n){if(n===void 0&&(n=0),!!e.segments)for(var t=n,o,a=0;a<e.segments.length;a++){var s=e.segments[a];if(o||(o=Wtt(i,t+s.duration/2)),o){if("cueIn"in s){o.endTime=t,o.adEndTime=t,t+=s.duration,o=null;continue}if(t<o.endTime){t+=s.duration;continue}o.endTime+=s.duration}else if("cueOut"in s&&(o=new bt.VTTCue(t,t+s.duration,s.cueOut),o.adStartTime=t,o.adEndTime=t+parseFloat(s.cueOut),i.addCue(o)),"cueOutCont"in s){var l=s.cueOutCont.split("/").map(parseFloat),u=l[0],c=l[1];o=new bt.VTTCue(t,t+s.duration,""),o.adStartTime=t-u,o.adEndTime=o.adStartTime+c,i.addCue(o)}t+=s.duration}},Ytt=86400,xhe=[{name:"VOD",run:function(e,i,n,t,o){if(n!==1/0){var a={time:0,segmentIndex:0,partIndex:null};return a}return null}},{name:"ProgramDateTime",run:function(e,i,n,t,o){if(!Object.keys(e.timelineToDatetimeMappings).length)return null;var a=null,s=null,l=m$(i);o=o||0;for(var u=0;u<l.length;u++){var c=i.endList||o===0?u:l.length-(u+1),d=l[c],f=d.segment,h=e.timelineToDatetimeMappings[f.timeline];if(!(!h||!f.dateTimeObject)){var p=f.dateTimeObject.getTime()/1e3,g=p+h;if(f.parts&&typeof d.partIndex=="number")for(var v=0;v<d.partIndex;v++)g+=f.parts[v].duration;var y=Math.abs(o-g);if(s!==null&&(y===0||s<y))break;s=y,a={time:g,segmentIndex:d.segmentIndex,partIndex:d.partIndex}}}return a}},{name:"Segment",run:function(e,i,n,t,o){var a=null,s=null;o=o||0;for(var l=m$(i),u=0;u<l.length;u++){var c=i.endList||o===0?u:l.length-(u+1),d=l[c],f=d.segment,h=d.part&&d.part.start||f&&f.start;if(f.timeline===t&&typeof h<"u"){var p=Math.abs(o-h);if(s!==null&&s<p)break;(!a||s===null||s>=p)&&(s=p,a={time:h,segmentIndex:d.segmentIndex,partIndex:d.partIndex})}}return a}},{name:"Discontinuity",run:function(e,i,n,t,o){var a=null;if(o=o||0,i.discontinuityStarts&&i.discontinuityStarts.length)for(var s=null,l=0;l<i.discontinuityStarts.length;l++){var u=i.discontinuityStarts[l],c=i.discontinuitySequence+l+1,d=e.discontinuities[c];if(d){var f=Math.abs(o-d.time);if(s!==null&&s<f)break;(!a||s===null||s>=f)&&(s=f,a={time:d.time,segmentIndex:u,partIndex:null})}}return a}},{name:"Playlist",run:function(e,i,n,t,o){if(i.syncInfo){var a={time:i.syncInfo.time,segmentIndex:i.syncInfo.mediaSequence-i.mediaSequence,partIndex:null};return a}return null}}],$tt=(function(r){zr(e,r);function e(n){var t;return t=r.call(this)||this,t.timelines=[],t.discontinuities=[],t.timelineToDatetimeMappings={},t.logger_=Lg("SyncController"),t}var i=e.prototype;return i.getSyncPoint=function(t,o,a,s){var l=this.runStrategies_(t,o,a,s);return l.length?this.selectSyncPoint_(l,{key:"time",value:s}):null},i.getExpiredTime=function(t,o){if(!t||!t.segments)return null;var a=this.runStrategies_(t,o,t.discontinuitySequence,0);if(!a.length)return null;var s=this.selectSyncPoint_(a,{key:"segmentIndex",value:0});return s.segmentIndex>0&&(s.time*=-1),Math.abs(s.time+wN({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:s.segmentIndex,endIndex:0}))},i.runStrategies_=function(t,o,a,s){for(var l=[],u=0;u<xhe.length;u++){var c=xhe[u],d=c.run(this,t,o,a,s);d&&(d.strategy=c.name,l.push({strategy:c.name,syncPoint:d}))}return l},i.selectSyncPoint_=function(t,o){for(var a=t[0].syncPoint,s=Math.abs(t[0].syncPoint[o.key]-o.value),l=t[0].strategy,u=1;u<t.length;u++){var c=Math.abs(t[u].syncPoint[o.key]-o.value);c<s&&(s=c,a=t[u].syncPoint,l=t[u].strategy)}return this.logger_("syncPoint for ["+o.key+": "+o.value+"] chosen with strategy"+(" ["+l+"]: [time:"+a.time+",")+(" segmentIndex:"+a.segmentIndex)+(typeof a.partIndex=="number"?",partIndex:"+a.partIndex:"")+"]"),a},i.saveExpiredSegmentInfo=function(t,o){var a=o.mediaSequence-t.mediaSequence;if(a>Ytt){kt.log.warn("Not saving expired segment info. Media sequence gap "+a+" is too large.");return}for(var s=a-1;s>=0;s--){var l=t.segments[s];if(l&&typeof l.start<"u"){o.syncInfo={mediaSequence:t.mediaSequence+s,time:l.start},this.logger_("playlist refresh sync: [time:"+o.syncInfo.time+","+(" mediaSequence: "+o.syncInfo.mediaSequence+"]")),this.trigger("syncinfoupdate");break}}},i.setDateTimeMappingForStart=function(t){if(this.timelineToDatetimeMappings={},t.segments&&t.segments.length&&t.segments[0].dateTimeObject){var o=t.segments[0],a=o.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[o.timeline]=-a}},i.saveSegmentTimingInfo=function(t){var o=t.segmentInfo,a=t.shouldSaveTimelineMapping,s=this.calculateSegmentTimeMapping_(o,o.timingInfo,a),l=o.segment;s&&(this.saveDiscontinuitySyncInfo_(o),o.playlist.syncInfo||(o.playlist.syncInfo={mediaSequence:o.playlist.mediaSequence+o.mediaIndex,time:l.start}));var u=l.dateTimeObject;l.discontinuity&&a&&u&&(this.timelineToDatetimeMappings[l.timeline]=-(u.getTime()/1e3))},i.timestampOffsetForTimeline=function(t){return typeof this.timelines[t]>"u"?null:this.timelines[t].time},i.mappingForTimeline=function(t){return typeof this.timelines[t]>"u"?null:this.timelines[t].mapping},i.calculateSegmentTimeMapping_=function(t,o,a){var s=t.segment,l=t.part,u=this.timelines[t.timeline],c,d;if(typeof t.timestampOffset=="number")u={time:t.startOfSegment,mapping:t.startOfSegment-o.start},a&&(this.timelines[t.timeline]=u,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+t.timeline+": "+("[time: "+u.time+"] [mapping: "+u.mapping+"]"))),c=t.startOfSegment,d=o.end+u.mapping;else if(u)c=o.start+u.mapping,d=o.end+u.mapping;else return!1;return l&&(l.start=c,l.end=d),(!s.start||c<s.start)&&(s.start=c),s.end=d,!0},i.saveDiscontinuitySyncInfo_=function(t){var o=t.playlist,a=t.segment;if(a.discontinuity)this.discontinuities[a.timeline]={time:a.start,accuracy:0};else if(o.discontinuityStarts&&o.discontinuityStarts.length)for(var s=0;s<o.discontinuityStarts.length;s++){var l=o.discontinuityStarts[s],u=o.discontinuitySequence+s+1,c=l-t.mediaIndex,d=Math.abs(c);if(!this.discontinuities[u]||this.discontinuities[u].accuracy>d){var f=void 0;c<0?f=a.start-wN({defaultDuration:o.targetDuration,durationList:o.segments,startIndex:t.mediaIndex,endIndex:l}):f=a.end+wN({defaultDuration:o.targetDuration,durationList:o.segments,startIndex:t.mediaIndex+1,endIndex:l}),this.discontinuities[u]={time:f,accuracy:d}}}},i.dispose=function(){this.trigger("dispose"),this.off()},e})(kt.EventTarget),qtt=(function(r){zr(e,r);function e(){var n;return n=r.call(this)||this,n.pendingTimelineChanges_={},n.lastTimelineChanges_={},n}var i=e.prototype;return i.clearPendingTimelineChange=function(t){this.pendingTimelineChanges_[t]=null,this.trigger("pendingtimelinechange")},i.pendingTimelineChange=function(t){var o=t.type,a=t.from,s=t.to;return typeof a=="number"&&typeof s=="number"&&(this.pendingTimelineChanges_[o]={type:o,from:a,to:s},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[o]},i.lastTimelineChange=function(t){var o=t.type,a=t.from,s=t.to;return typeof a=="number"&&typeof s=="number"&&(this.lastTimelineChanges_[o]={type:o,from:a,to:s},delete this.pendingTimelineChanges_[o],this.trigger("timelinechange")),this.lastTimelineChanges_[o]},i.dispose=function(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()},e})(kt.EventTarget),Xtt=bwe(Swe(function(){var r=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function e(S,_,C){return C={path:_,exports:{},require:function(x,A){return i(x,A??C.path)}},S(C,C.exports),C.exports}function i(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var n=e(function(S){function _(T,x){for(var A=0;A<x.length;A++){var w=x[A];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(T,w.key,w)}}function C(T,x,A){return x&&_(T.prototype,x),A&&_(T,A),T}S.exports=C,S.exports.default=S.exports,S.exports.__esModule=!0}),t=e(function(S){function _(C,T){return S.exports=_=Object.setPrototypeOf||function(A,w){return A.__proto__=w,A},S.exports.default=S.exports,S.exports.__esModule=!0,_(C,T)}S.exports=_,S.exports.default=S.exports,S.exports.__esModule=!0}),o=e(function(S){function _(C,T){C.prototype=Object.create(T.prototype),C.prototype.constructor=C,t(C,T)}S.exports=_,S.exports.default=S.exports,S.exports.__esModule=!0}),a=(function(){function S(){this.listeners={}}var _=S.prototype;return _.on=function(T,x){this.listeners[T]||(this.listeners[T]=[]),this.listeners[T].push(x)},_.off=function(T,x){if(!this.listeners[T])return!1;var A=this.listeners[T].indexOf(x);return this.listeners[T]=this.listeners[T].slice(0),this.listeners[T].splice(A,1),A>-1},_.trigger=function(T){var x=this.listeners[T];if(x)if(arguments.length===2)for(var A=x.length,w=0;w<A;++w)x[w].call(this,arguments[1]);else for(var L=Array.prototype.slice.call(arguments,1),k=x.length,D=0;D<k;++D)x[D].apply(this,L)},_.dispose=function(){this.listeners={}},_.pipe=function(T){this.on("data",function(x){T.push(x)})},S})();/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */function s(S){return S.subarray(0,S.byteLength-S[S.byteLength-1])}/*! @name aes-decrypter @version 3.1.3 @license Apache-2.0 */var l=function(){var _=[[[],[],[],[],[]],[[],[],[],[],[]]],C=_[0],T=_[1],x=C[4],A=T[4],w,L,k,D=[],j=[],N,V,W,K,H,U;for(w=0;w<256;w++)j[(D[w]=w<<1^(w>>7)*283)^w]=w;for(L=k=0;!x[L];L^=N||1,k=j[k]||1)for(K=k^k<<1^k<<2^k<<3^k<<4,K=K>>8^K&255^99,x[L]=K,A[K]=L,W=D[V=D[N=D[L]]],U=W*16843009^V*65537^N*257^L*16843008,H=D[K]*257^K*16843008,w=0;w<4;w++)C[w][L]=H=H<<24^H>>>8,T[w][K]=U=U<<24^U>>>8;for(w=0;w<5;w++)C[w]=C[w].slice(0),T[w]=T[w].slice(0);return _},u=null,c=(function(){function S(C){u||(u=l()),this._tables=[[u[0][0].slice(),u[0][1].slice(),u[0][2].slice(),u[0][3].slice(),u[0][4].slice()],[u[1][0].slice(),u[1][1].slice(),u[1][2].slice(),u[1][3].slice(),u[1][4].slice()]];var T,x,A,w=this._tables[0][4],L=this._tables[1],k=C.length,D=1;if(k!==4&&k!==6&&k!==8)throw new Error("Invalid aes key size");var j=C.slice(0),N=[];for(this._key=[j,N],T=k;T<4*k+28;T++)A=j[T-1],(T%k===0||k===8&&T%k===4)&&(A=w[A>>>24]<<24^w[A>>16&255]<<16^w[A>>8&255]<<8^w[A&255],T%k===0&&(A=A<<8^A>>>24^D<<24,D=D<<1^(D>>7)*283)),j[T]=j[T-k]^A;for(x=0;T;x++,T--)A=j[x&3?T:T-4],T<=4||x<4?N[x]=A:N[x]=L[0][w[A>>>24]]^L[1][w[A>>16&255]]^L[2][w[A>>8&255]]^L[3][w[A&255]]}var _=S.prototype;return _.decrypt=function(T,x,A,w,L,k){var D=this._key[1],j=T^D[0],N=w^D[1],V=A^D[2],W=x^D[3],K,H,U,I=D.length/4-2,Q,Z=4,ee=this._tables[1],ie=ee[0],de=ee[1],pe=ee[2],_e=ee[3],Te=ee[4];for(Q=0;Q<I;Q++)K=ie[j>>>24]^de[N>>16&255]^pe[V>>8&255]^_e[W&255]^D[Z],H=ie[N>>>24]^de[V>>16&255]^pe[W>>8&255]^_e[j&255]^D[Z+1],U=ie[V>>>24]^de[W>>16&255]^pe[j>>8&255]^_e[N&255]^D[Z+2],W=ie[W>>>24]^de[j>>16&255]^pe[N>>8&255]^_e[V&255]^D[Z+3],Z+=4,j=K,N=H,V=U;for(Q=0;Q<4;Q++)L[(3&-Q)+k]=Te[j>>>24]<<24^Te[N>>16&255]<<16^Te[V>>8&255]<<8^Te[W&255]^D[Z++],K=j,j=N,N=V,V=W,W=K},S})(),d=(function(S){o(_,S);function _(){var T;return T=S.call(this,a)||this,T.jobs=[],T.delay=1,T.timeout_=null,T}var C=_.prototype;return C.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},C.push=function(x){this.jobs.push(x),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},_})(a),f=function(_){return _<<24|(_&65280)<<8|(_&16711680)>>8|_>>>24},h=function(_,C,T){var x=new Int32Array(_.buffer,_.byteOffset,_.byteLength>>2),A=new c(Array.prototype.slice.call(C)),w=new Uint8Array(_.byteLength),L=new Int32Array(w.buffer),k,D,j,N,V,W,K,H,U;for(k=T[0],D=T[1],j=T[2],N=T[3],U=0;U<x.length;U+=4)V=f(x[U]),W=f(x[U+1]),K=f(x[U+2]),H=f(x[U+3]),A.decrypt(V,W,K,H,L,U),L[U]=f(L[U]^k),L[U+1]=f(L[U+1]^D),L[U+2]=f(L[U+2]^j),L[U+3]=f(L[U+3]^N),k=V,D=W,j=K,N=H;return w},p=(function(){function S(C,T,x,A){var w=S.STEP,L=new Int32Array(C.buffer),k=new Uint8Array(C.byteLength),D=0;for(this.asyncStream_=new d,this.asyncStream_.push(this.decryptChunk_(L.subarray(D,D+w),T,x,k)),D=w;D<L.length;D+=w)x=new Uint32Array([f(L[D-4]),f(L[D-3]),f(L[D-2]),f(L[D-1])]),this.asyncStream_.push(this.decryptChunk_(L.subarray(D,D+w),T,x,k));this.asyncStream_.push(function(){A(null,s(k))})}var _=S.prototype;return _.decryptChunk_=function(T,x,A,w){return function(){var L=h(T,x,A);w.set(L,T.byteOffset)}},n(S,null,[{key:"STEP",get:function(){return 32e3}}]),S})(),g;typeof window<"u"?g=window:typeof r<"u"?g=r:typeof self<"u"?g=self:g={};var v=g,y=function(_){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(_):_&&_.buffer instanceof ArrayBuffer},m=v.BigInt||Number;m("0x1"),m("0x100"),m("0x10000"),m("0x1000000"),m("0x100000000"),m("0x10000000000"),m("0x1000000000000"),m("0x100000000000000"),m("0x10000000000000000");var b=function(_){var C={};return Object.keys(_).forEach(function(T){var x=_[T];y(x)?C[T]={bytes:x.buffer,byteOffset:x.byteOffset,byteLength:x.byteLength}:C[T]=x}),C};self.onmessage=function(S){var _=S.data,C=new Uint8Array(_.encrypted.bytes,_.encrypted.byteOffset,_.encrypted.byteLength),T=new Uint32Array(_.key.bytes,_.key.byteOffset,_.key.byteLength/4),x=new Uint32Array(_.iv.bytes,_.iv.byteOffset,_.iv.byteLength/4);new p(C,T,x,function(A,w){self.postMessage(b({source:_.source,decrypted:w}),[w.buffer])})}})),Ktt=mwe(Xtt),Ztt=function(e){var i=e.default?"main":"alternative";return e.characteristics&&e.characteristics.indexOf("public.accessibility.describes-video")>=0&&(i="main-desc"),i},j3=function(e,i){e.abort(),e.pause(),i&&i.activePlaylistLoader&&(i.activePlaylistLoader.pause(),i.activePlaylistLoader=null)},w$=function(e,i){i.activePlaylistLoader=e,e.load()},Jtt=function(e,i){return function(){var n=i.segmentLoaders,t=n[e],o=n.main,a=i.mediaTypes[e],s=a.activeTrack(),l=a.getActiveGroup(),u=a.activePlaylistLoader,c=a.lastGroup_;if(!(l&&c&&l.id===c.id)&&(a.lastGroup_=l,a.lastTrack_=s,j3(t,a),!(!l||l.isMasterPlaylist))){if(!l.playlistLoader){u&&o.resetEverything();return}t.resyncLoader(),w$(l.playlistLoader,a)}}},Qtt=function(e,i){return function(){var n=i.segmentLoaders[e],t=i.mediaTypes[e];t.lastGroup_=null,n.abort(),n.pause()}},ert=function(e,i){return function(){var n=i.masterPlaylistLoader,t=i.segmentLoaders,o=t[e],a=t.main,s=i.mediaTypes[e],l=s.activeTrack(),u=s.getActiveGroup(),c=s.activePlaylistLoader,d=s.lastTrack_;if(!(d&&l&&d.id===l.id)&&(s.lastGroup_=u,s.lastTrack_=l,j3(o,s),!!u)){if(u.isMasterPlaylist){if(!l||!d||l.id===d.id)return;var f=i.vhs.masterPlaylistController_,h=f.selectPlaylist();if(f.media()===h)return;s.logger_("track change. Switching master audio from "+d.id+" to "+l.id),n.pause(),a.resetEverything(),f.fastQualityChange_(h);return}if(e==="AUDIO"){if(!u.playlistLoader){a.setAudio(!0),a.resetEverything();return}o.setAudio(!0),a.setAudio(!1)}if(c===u.playlistLoader){w$(u.playlistLoader,s);return}o.track&&o.track(l),o.resetEverything(),w$(u.playlistLoader,s)}}},B3={AUDIO:function(e,i){return function(){var n=i.segmentLoaders[e],t=i.mediaTypes[e],o=i.blacklistCurrentPlaylist;j3(n,t);var a=t.activeTrack(),s=t.activeGroup(),l=(s.filter(function(d){return d.default})[0]||s[0]).id,u=t.tracks[l];if(a===u){o({message:"Problem encountered loading the default audio track."});return}kt.log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(var c in t.tracks)t.tracks[c].enabled=t.tracks[c]===u;t.onTrackChanged()}},SUBTITLES:function(e,i){return function(){var n=i.segmentLoaders[e],t=i.mediaTypes[e];kt.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),j3(n,t);var o=t.activeTrack();o&&(o.mode="disabled"),t.onTrackChanged()}}},Ehe={AUDIO:function(e,i,n){if(i){var t=n.tech,o=n.requestOptions,a=n.segmentLoaders[e];i.on("loadedmetadata",function(){var s=i.media();a.playlist(s,o),(!t.paused()||s.endList&&t.preload()!=="none")&&a.load()}),i.on("loadedplaylist",function(){a.playlist(i.media(),o),t.paused()||a.load()}),i.on("error",B3[e](e,n))}},SUBTITLES:function(e,i,n){var t=n.tech,o=n.requestOptions,a=n.segmentLoaders[e],s=n.mediaTypes[e];i.on("loadedmetadata",function(){var l=i.media();a.playlist(l,o),a.track(s.activeTrack()),(!t.paused()||l.endList&&t.preload()!=="none")&&a.load()}),i.on("loadedplaylist",function(){a.playlist(i.media(),o),t.paused()||a.load()}),i.on("error",B3[e](e,n))}},trt={AUDIO:function(e,i){var n=i.vhs,t=i.sourceType,o=i.segmentLoaders[e],a=i.requestOptions,s=i.master.mediaGroups,l=i.mediaTypes[e],u=l.groups,c=l.tracks,d=l.logger_,f=i.masterPlaylistLoader,h=Pj(f.master);(!s[e]||Object.keys(s[e]).length===0)&&(s[e]={main:{default:{default:!0}}},h&&(s[e].main.default.playlists=f.master.playlists));for(var p in s[e]){u[p]||(u[p]=[]);for(var g in s[e][p]){var v=s[e][p][g],y=void 0;if(h?(d("AUDIO group '"+p+"' label '"+g+"' is a master playlist"),v.isMasterPlaylist=!0,y=null):t==="vhs-json"&&v.playlists?y=new fR(v.playlists[0],n,a):v.resolvedUri?y=new fR(v.resolvedUri,n,a):v.playlists&&t==="dash"?y=new T$(v.playlists[0],n,a,f):y=null,v=kt.mergeOptions({id:g,playlistLoader:y},v),Ehe[e](e,v.playlistLoader,i),u[p].push(v),typeof c[g]>"u"){var m=new kt.AudioTrack({id:g,kind:Ztt(v),enabled:!1,language:v.language,default:v.default,label:g});c[g]=m}}}o.on("error",B3[e](e,i))},SUBTITLES:function(e,i){var n=i.tech,t=i.vhs,o=i.sourceType,a=i.segmentLoaders[e],s=i.requestOptions,l=i.master.mediaGroups,u=i.mediaTypes[e],c=u.groups,d=u.tracks,f=i.masterPlaylistLoader;for(var h in l[e]){c[h]||(c[h]=[]);for(var p in l[e][h])if(!l[e][h][p].forced){var g=l[e][h][p],v=void 0;if(o==="hls")v=new fR(g.resolvedUri,t,s);else if(o==="dash"){var y=g.playlists.filter(function(b){return b.excludeUntil!==1/0});if(!y.length)return;v=new T$(g.playlists[0],t,s,f)}else o==="vhs-json"&&(v=new fR(g.playlists?g.playlists[0]:g.resolvedUri,t,s));if(g=kt.mergeOptions({id:p,playlistLoader:v},g),Ehe[e](e,g.playlistLoader,i),c[h].push(g),typeof d[p]>"u"){var m=n.addRemoteTextTrack({id:p,kind:"subtitles",default:g.default&&g.autoselect,language:g.language,label:p},!1).track;d[p]=m}}}a.on("error",B3[e](e,i))},"CLOSED-CAPTIONS":function(e,i){var n=i.tech,t=i.master.mediaGroups,o=i.mediaTypes[e],a=o.groups,s=o.tracks;for(var l in t[e]){a[l]||(a[l]=[]);for(var u in t[e][l]){var c=t[e][l][u];if(/^(?:CC|SERVICE)/.test(c.instreamId)){var d=n.options_.vhs&&n.options_.vhs.captionServices||{},f={label:u,language:c.language,instreamId:c.instreamId,default:c.default&&c.autoselect};if(d[f.instreamId]&&(f=kt.mergeOptions(f,d[f.instreamId])),f.default===void 0&&delete f.default,a[l].push(kt.mergeOptions({id:u},c)),typeof s[u]>"u"){var h=n.addRemoteTextTrack({id:f.instreamId,kind:"captions",default:f.default,language:f.language,label:f.label},!1).track;s[u]=h}}}}}},rrt=function r(e,i){for(var n=0;n<e.length;n++)if(K9(i,e[n])||e[n].playlists&&r(e[n].playlists,i))return!0;return!1},irt=function(e,i){return function(n){var t=i.masterPlaylistLoader,o=i.mediaTypes[e].groups,a=t.media();if(!a)return null;var s=null;a.attributes[e]&&(s=o[a.attributes[e]]);var l=Object.keys(o);if(!s)if(e==="AUDIO"&&l.length>1&&Pj(i.master))for(var u=0;u<l.length;u++){var c=o[l[u]];if(rrt(c,a)){s=c;break}}else o.main?s=o.main:l.length===1&&(s=o[l[0]]);return typeof n>"u"?s:n===null||!s?null:s.filter(function(d){return d.id===n.id})[0]||null}},nrt={AUDIO:function(e,i){return function(){var n=i.mediaTypes[e].tracks;for(var t in n)if(n[t].enabled)return n[t];return null}},SUBTITLES:function(e,i){return function(){var n=i.mediaTypes[e].tracks;for(var t in n)if(n[t].mode==="showing"||n[t].mode==="hidden")return n[t];return null}}},ort=function(e,i){var n=i.mediaTypes;return function(){var t=n[e].activeTrack();return t?n[e].activeGroup(t):null}},art=function(e){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(p){trt[p](p,e)});var i=e.mediaTypes,n=e.masterPlaylistLoader,t=e.tech,o=e.vhs,a=e.segmentLoaders,s=a.AUDIO,l=a.main;["AUDIO","SUBTITLES"].forEach(function(p){i[p].activeGroup=irt(p,e),i[p].activeTrack=nrt[p](p,e),i[p].onGroupChanged=Jtt(p,e),i[p].onGroupChanging=Qtt(p,e),i[p].onTrackChanged=ert(p,e),i[p].getActiveGroup=ort(p,e)});var u=i.AUDIO.activeGroup();if(u){var c=(u.filter(function(p){return p.default})[0]||u[0]).id;i.AUDIO.tracks[c].enabled=!0,i.AUDIO.onGroupChanged(),i.AUDIO.onTrackChanged();var d=i.AUDIO.getActiveGroup();d.playlistLoader?(l.setAudio(!1),s.setAudio(!0)):l.setAudio(!0)}n.on("mediachange",function(){["AUDIO","SUBTITLES"].forEach(function(p){return i[p].onGroupChanged()})}),n.on("mediachanging",function(){["AUDIO","SUBTITLES"].forEach(function(p){return i[p].onGroupChanging()})});var f=function(){i.AUDIO.onTrackChanged(),t.trigger({type:"usage",name:"vhs-audio-change"}),t.trigger({type:"usage",name:"hls-audio-change"})};t.audioTracks().addEventListener("change",f),t.remoteTextTracks().addEventListener("change",i.SUBTITLES.onTrackChanged),o.on("dispose",function(){t.audioTracks().removeEventListener("change",f),t.remoteTextTracks().removeEventListener("change",i.SUBTITLES.onTrackChanged)}),t.clearTracks("audio");for(var h in i.AUDIO.tracks)t.audioTracks().addTrack(i.AUDIO.tracks[h])},srt=function(){var e={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(i){e[i]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:j0,activeTrack:j0,getActiveGroup:j0,onGroupChanged:j0,onTrackChanged:j0,lastTrack_:null,logger_:Lg("MediaGroups["+i+"]")}}),e},lrt=120,m0,urt=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],crt=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]},drt=function(e){var i=e.currentPlaylist,n=e.buffered,t=e.currentTime,o=e.nextPlaylist,a=e.bufferLowWaterLine,s=e.bufferHighWaterLine,l=e.duration,u=e.experimentalBufferBasedABR,c=e.log;if(!o)return kt.log.warn("We received no playlist to switch to. Please check your stream."),!1;var d="allowing switch "+(i&&i.id||"null")+" -> "+o.id;if(!i)return c(d+" as current playlist is not set"),!0;if(o.id===i.id)return!1;var f=!!dR(n,t).length;if(!i.endList)return!f&&typeof i.partTargetDuration=="number"?(c("not "+d+" as current playlist is live llhls, but currentTime isn't in buffered."),!1):(c(d+" as current playlist is live"),!0);var h=$9(n,t),p=u?wu.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:wu.MAX_BUFFER_LOW_WATER_LINE;if(l<p)return c(d+" as duration < max low water line ("+l+" < "+p+")"),!0;var g=o.attributes.BANDWIDTH,v=i.attributes.BANDWIDTH;if(g<v&&(!u||h<s)){var y=d+" as next bandwidth < current bandwidth ("+g+" < "+v+")";return u&&(y+=" and forwardBuffer < bufferHighWaterLine ("+h+" < "+s+")"),c(y),!0}if((!u||g>v)&&h>=a){var m=d+" as forwardBuffer >= bufferLowWaterLine ("+h+" >= "+a+")";return u&&(m+=" and next bandwidth > current bandwidth ("+g+" > "+v+")"),c(m),!0}return c("not "+d+" as no switching criteria met"),!1},frt=(function(r){zr(e,r);function e(n){var t;t=r.call(this)||this;var o=n.src,a=n.handleManifestRedirects,s=n.withCredentials,l=n.tech,u=n.bandwidth,c=n.externVhs,d=n.useCueTags,f=n.blacklistDuration,h=n.enableLowInitialPlaylist,p=n.sourceType,g=n.cacheEncryptionKeys,v=n.experimentalBufferBasedABR,y=n.experimentalLeastPixelDiffSelector,m=n.captionServices;if(!o)throw new Error("A non-empty playlist URL or JSON manifest string is required");var b=n.maxPlaylistRetries;(b===null||typeof b>"u")&&(b=1/0),m0=c,t.experimentalBufferBasedABR=!!v,t.experimentalLeastPixelDiffSelector=!!y,t.withCredentials=s,t.tech_=l,t.vhs_=l.vhs,t.sourceType_=p,t.useCueTags_=d,t.blacklistDuration=f,t.maxPlaylistRetries=b,t.enableLowInitialPlaylist=h,t.useCueTags_&&(t.cueTagsTrack_=t.tech_.addTextTrack("metadata","ad-cues"),t.cueTagsTrack_.inBandMetadataTrackDispatchType=""),t.requestOptions_={withCredentials:s,handleManifestRedirects:a,maxPlaylistRetries:b,timeout:null},t.on("error",t.pauseLoading),t.mediaTypes_=srt(),t.mediaSource=new bt.MediaSource,t.handleDurationChange_=t.handleDurationChange_.bind(sn(t)),t.handleSourceOpen_=t.handleSourceOpen_.bind(sn(t)),t.handleSourceEnded_=t.handleSourceEnded_.bind(sn(t)),t.mediaSource.addEventListener("durationchange",t.handleDurationChange_),t.mediaSource.addEventListener("sourceopen",t.handleSourceOpen_),t.mediaSource.addEventListener("sourceended",t.handleSourceEnded_),t.seekable_=kt.createTimeRanges(),t.hasPlayed_=!1,t.syncController_=new $tt(n),t.segmentMetadataTrack_=l.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,t.decrypter_=new Ktt,t.sourceUpdater_=new Lwe(t.mediaSource),t.inbandTextTracks_={},t.timelineChangeController_=new qtt;var S={vhs:t.vhs_,parse708captions:n.parse708captions,useDtsForTimestampOffset:n.useDtsForTimestampOffset,captionServices:m,mediaSource:t.mediaSource,currentTime:t.tech_.currentTime.bind(t.tech_),seekable:function(){return t.seekable()},seeking:function(){return t.tech_.seeking()},duration:function(){return t.duration()},hasPlayed:function(){return t.hasPlayed_},goalBufferLength:function(){return t.goalBufferLength()},bandwidth:u,syncController:t.syncController_,decrypter:t.decrypter_,sourceType:t.sourceType_,inbandTextTracks:t.inbandTextTracks_,cacheEncryptionKeys:g,sourceUpdater:t.sourceUpdater_,timelineChangeController:t.timelineChangeController_,experimentalExactManifestTimings:n.experimentalExactManifestTimings};t.masterPlaylistLoader_=t.sourceType_==="dash"?new T$(o,t.vhs_,t.requestOptions_):new fR(o,t.vhs_,t.requestOptions_),t.setupMasterPlaylistLoaderListeners_(),t.mainSegmentLoader_=new E$(kt.mergeOptions(S,{segmentMetadataTrack:t.segmentMetadataTrack_,loaderType:"main"}),n),t.audioSegmentLoader_=new E$(kt.mergeOptions(S,{loaderType:"audio"}),n),t.subtitleSegmentLoader_=new ztt(kt.mergeOptions(S,{loaderType:"vtt",featuresNativeTextTracks:t.tech_.featuresNativeTextTracks,loadVttJs:function(){return new Promise(function(T,x){function A(){l.off("vttjserror",w),T()}function w(){l.off("vttjsloaded",A),x()}l.one("vttjsloaded",A),l.one("vttjserror",w),l.addWebVttScript_()})}}),n),t.setupSegmentLoaderListeners_(),t.experimentalBufferBasedABR&&(t.masterPlaylistLoader_.one("loadedplaylist",function(){return t.startABRTimer_()}),t.tech_.on("pause",function(){return t.stopABRTimer_()}),t.tech_.on("play",function(){return t.startABRTimer_()})),urt.forEach(function(C){t[C+"_"]=crt.bind(sn(t),C)}),t.logger_=Lg("MPC"),t.triggeredFmp4Usage=!1,t.tech_.preload()==="none"?(t.loadOnPlay_=function(){t.loadOnPlay_=null,t.masterPlaylistLoader_.load()},t.tech_.one("play",t.loadOnPlay_)):t.masterPlaylistLoader_.load(),t.timeToLoadedData__=-1,t.mainAppendsToLoadedData__=-1,t.audioAppendsToLoadedData__=-1;var _=t.tech_.preload()==="none"?"play":"loadstart";return t.tech_.one(_,function(){var C=Date.now();t.tech_.one("loadeddata",function(){t.timeToLoadedData__=Date.now()-C,t.mainAppendsToLoadedData__=t.mainSegmentLoader_.mediaAppends,t.audioAppendsToLoadedData__=t.audioSegmentLoader_.mediaAppends})}),t}var i=e.prototype;return i.mainAppendsToLoadedData_=function(){return this.mainAppendsToLoadedData__},i.audioAppendsToLoadedData_=function(){return this.audioAppendsToLoadedData__},i.appendsToLoadedData_=function(){var t=this.mainAppendsToLoadedData_(),o=this.audioAppendsToLoadedData_();return t===-1||o===-1?-1:t+o},i.timeToLoadedData_=function(){return this.timeToLoadedData__},i.checkABR_=function(t){t===void 0&&(t="abr");var o=this.selectPlaylist();o&&this.shouldSwitchToMedia_(o)&&this.switchMedia_(o,t)},i.switchMedia_=function(t,o,a){var s=this.media(),l=s&&(s.id||s.uri),u=t.id||t.uri;l&&l!==u&&(this.logger_("switch media "+l+" -> "+u+" from "+o),this.tech_.trigger({type:"usage",name:"vhs-rendition-change-"+o})),this.masterPlaylistLoader_.media(t,a)},i.startABRTimer_=function(){var t=this;this.stopABRTimer_(),this.abrTimer_=bt.setInterval(function(){return t.checkABR_()},250)},i.stopABRTimer_=function(){this.tech_.scrubbing&&this.tech_.scrubbing()||(bt.clearInterval(this.abrTimer_),this.abrTimer_=null)},i.getAudioTrackPlaylists_=function(){var t=this.master(),o=t&&t.playlists||[];if(!t||!t.mediaGroups||!t.mediaGroups.AUDIO)return o;var a=t.mediaGroups.AUDIO,s=Object.keys(a),l;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)l=this.mediaTypes_.AUDIO.activeTrack();else{var u=a.main||s.length&&a[s[0]];for(var c in u)if(u[c].default){l={label:c};break}}if(!l)return o;var d=[];for(var f in a)if(a[f][l.label]){var h=a[f][l.label];if(h.playlists&&h.playlists.length)d.push.apply(d,h.playlists);else if(h.uri)d.push(h);else if(t.playlists.length)for(var p=0;p<t.playlists.length;p++){var g=t.playlists[p];g.attributes&&g.attributes.AUDIO&&g.attributes.AUDIO===f&&d.push(g)}}return d.length?d:o},i.setupMasterPlaylistLoaderListeners_=function(){var t=this;this.masterPlaylistLoader_.on("loadedmetadata",function(){var o=t.masterPlaylistLoader_.media(),a=o.targetDuration*1.5*1e3;b$(t.masterPlaylistLoader_.master,t.masterPlaylistLoader_.media())?t.requestOptions_.timeout=0:t.requestOptions_.timeout=a,o.endList&&t.tech_.preload()!=="none"&&(t.mainSegmentLoader_.playlist(o,t.requestOptions_),t.mainSegmentLoader_.load()),art({sourceType:t.sourceType_,segmentLoaders:{AUDIO:t.audioSegmentLoader_,SUBTITLES:t.subtitleSegmentLoader_,main:t.mainSegmentLoader_},tech:t.tech_,requestOptions:t.requestOptions_,masterPlaylistLoader:t.masterPlaylistLoader_,vhs:t.vhs_,master:t.master(),mediaTypes:t.mediaTypes_,blacklistCurrentPlaylist:t.blacklistCurrentPlaylist.bind(t)}),t.triggerPresenceUsage_(t.master(),o),t.setupFirstPlay(),!t.mediaTypes_.AUDIO.activePlaylistLoader||t.mediaTypes_.AUDIO.activePlaylistLoader.media()?t.trigger("selectedinitialmedia"):t.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",function(){t.trigger("selectedinitialmedia")})}),this.masterPlaylistLoader_.on("loadedplaylist",function(){t.loadOnPlay_&&t.tech_.off("play",t.loadOnPlay_);var o=t.masterPlaylistLoader_.media();if(!o){t.excludeUnsupportedVariants_();var a;if(t.enableLowInitialPlaylist&&(a=t.selectInitialPlaylist()),a||(a=t.selectPlaylist()),!a||!t.shouldSwitchToMedia_(a))return;t.initialMedia_=a,t.switchMedia_(t.initialMedia_,"initial");var s=t.sourceType_==="vhs-json"&&t.initialMedia_.segments;if(!s)return;o=t.initialMedia_}t.handleUpdatedMediaPlaylist(o)}),this.masterPlaylistLoader_.on("error",function(){t.blacklistCurrentPlaylist(t.masterPlaylistLoader_.error)}),this.masterPlaylistLoader_.on("mediachanging",function(){t.mainSegmentLoader_.abort(),t.mainSegmentLoader_.pause()}),this.masterPlaylistLoader_.on("mediachange",function(){var o=t.masterPlaylistLoader_.media(),a=o.targetDuration*1.5*1e3;b$(t.masterPlaylistLoader_.master,t.masterPlaylistLoader_.media())?t.requestOptions_.timeout=0:t.requestOptions_.timeout=a,t.masterPlaylistLoader_.load(),t.mainSegmentLoader_.playlist(o,t.requestOptions_),t.mainSegmentLoader_.load(),t.tech_.trigger({type:"mediachange",bubbles:!0})}),this.masterPlaylistLoader_.on("playlistunchanged",function(){var o=t.masterPlaylistLoader_.media();if(o.lastExcludeReason_!=="playlist-unchanged"){var a=t.stuckAtPlaylistEnd_(o);a&&(t.blacklistCurrentPlaylist({message:"Playlist no longer updating.",reason:"playlist-unchanged"}),t.tech_.trigger("playliststuck"))}}),this.masterPlaylistLoader_.on("renditiondisabled",function(){t.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"}),t.tech_.trigger({type:"usage",name:"hls-rendition-disabled"})}),this.masterPlaylistLoader_.on("renditionenabled",function(){t.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"}),t.tech_.trigger({type:"usage",name:"hls-rendition-enabled"})})},i.handleUpdatedMediaPlaylist=function(t){this.useCueTags_&&this.updateAdCues_(t),this.mainSegmentLoader_.playlist(t,this.requestOptions_),this.updateDuration(!t.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())},i.triggerPresenceUsage_=function(t,o){var a=t.mediaGroups||{},s=!0,l=Object.keys(a.AUDIO);for(var u in a.AUDIO)for(var c in a.AUDIO[u]){var d=a.AUDIO[u][c];d.uri||(s=!1)}s&&(this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),this.tech_.trigger({type:"usage",name:"hls-demuxed"})),Object.keys(a.SUBTITLES).length&&(this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),this.tech_.trigger({type:"usage",name:"hls-webvtt"})),m0.Playlist.isAes(o)&&(this.tech_.trigger({type:"usage",name:"vhs-aes"}),this.tech_.trigger({type:"usage",name:"hls-aes"})),l.length&&Object.keys(a.AUDIO[l[0]]).length>1&&(this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.tech_.trigger({type:"usage",name:"hls-alternate-audio"})),this.useCueTags_&&(this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"}),this.tech_.trigger({type:"usage",name:"hls-playlist-cue-tags"}))},i.shouldSwitchToMedia_=function(t){var o=this.masterPlaylistLoader_.media()||this.masterPlaylistLoader_.pendingMedia_,a=this.tech_.currentTime(),s=this.bufferLowWaterLine(),l=this.bufferHighWaterLine(),u=this.tech_.buffered();return drt({buffered:u,currentTime:a,currentPlaylist:o,nextPlaylist:t,bufferLowWaterLine:s,bufferHighWaterLine:l,duration:this.duration(),experimentalBufferBasedABR:this.experimentalBufferBasedABR,log:this.logger_})},i.setupSegmentLoaderListeners_=function(){var t=this;this.mainSegmentLoader_.on("bandwidthupdate",function(){t.checkABR_("bandwidthupdate"),t.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("timeout",function(){t.experimentalBufferBasedABR&&t.mainSegmentLoader_.load()}),this.experimentalBufferBasedABR||this.mainSegmentLoader_.on("progress",function(){t.trigger("progress")}),this.mainSegmentLoader_.on("error",function(){t.blacklistCurrentPlaylist(t.mainSegmentLoader_.error())}),this.mainSegmentLoader_.on("appenderror",function(){t.error=t.mainSegmentLoader_.error_,t.trigger("error")}),this.mainSegmentLoader_.on("syncinfoupdate",function(){t.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",function(){t.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"}),t.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",function(){t.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on("appenderror",function(){t.error=t.audioSegmentLoader_.error_,t.trigger("error")}),this.mainSegmentLoader_.on("ended",function(){t.logger_("main segment loader ended"),t.onEndOfStream()}),this.mainSegmentLoader_.on("earlyabort",function(a){t.experimentalBufferBasedABR||(t.delegateLoaders_("all",["abort"]),t.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},lrt))});var o=function(){if(!t.sourceUpdater_.hasCreatedSourceBuffers())return t.tryToCreateSourceBuffers_();var s=t.getCodecsOrExclude_();s&&t.sourceUpdater_.addOrChangeSourceBuffers(s)};this.mainSegmentLoader_.on("trackinfo",o),this.audioSegmentLoader_.on("trackinfo",o),this.mainSegmentLoader_.on("fmp4",function(){t.triggeredFmp4Usage||(t.tech_.trigger({type:"usage",name:"vhs-fmp4"}),t.tech_.trigger({type:"usage",name:"hls-fmp4"}),t.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("fmp4",function(){t.triggeredFmp4Usage||(t.tech_.trigger({type:"usage",name:"vhs-fmp4"}),t.tech_.trigger({type:"usage",name:"hls-fmp4"}),t.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("ended",function(){t.logger_("audioSegmentLoader ended"),t.onEndOfStream()})},i.mediaSecondsLoaded_=function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)},i.load=function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()},i.smoothQualityChange_=function(t){t===void 0&&(t=this.selectPlaylist()),this.fastQualityChange_(t)},i.fastQualityChange_=function(t){var o=this;if(t===void 0&&(t=this.selectPlaylist()),t===this.masterPlaylistLoader_.media()){this.logger_("skipping fastQualityChange because new media is same as old");return}this.switchMedia_(t,"fast-quality"),this.mainSegmentLoader_.resetEverything(function(){kt.browser.IE_VERSION||kt.browser.IS_EDGE?o.tech_.setCurrentTime(o.tech_.currentTime()+.04):o.tech_.setCurrentTime(o.tech_.currentTime())})},i.play=function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();var t=this.tech_.seekable();if(this.tech_.duration()===1/0&&this.tech_.currentTime()<t.start(0))return this.tech_.setCurrentTime(t.end(t.length-1))}},i.setupFirstPlay=function(){var t=this,o=this.masterPlaylistLoader_.media();if(!o||this.tech_.paused()||this.hasPlayed_)return!1;if(!o.endList){var a=this.seekable();if(!a.length)return!1;if(kt.browser.IE_VERSION&&this.tech_.readyState()===0)return this.tech_.one("loadedmetadata",function(){t.trigger("firstplay"),t.tech_.setCurrentTime(a.end(0)),t.hasPlayed_=!0}),!1;this.trigger("firstplay"),this.tech_.setCurrentTime(a.end(0))}return this.hasPlayed_=!0,this.load(),!0},i.handleSourceOpen_=function(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){var t=this.tech_.play();typeof t<"u"&&typeof t.then=="function"&&t.then(null,function(o){})}this.trigger("sourceopen")},i.handleSourceEnded_=function(){if(this.inbandTextTracks_.metadataTrack_){var t=this.inbandTextTracks_.metadataTrack_.cues;if(!(!t||!t.length)){var o=this.duration();t[t.length-1].endTime=isNaN(o)||Math.abs(o)===1/0?Number.MAX_VALUE:o}}},i.handleDurationChange_=function(){this.tech_.trigger("durationchange")},i.onEndOfStream=function(){var t=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){var o=this.mainSegmentLoader_.getCurrentMediaInfo_();!o||o.hasVideo?t=t&&this.audioSegmentLoader_.ended_:t=this.audioSegmentLoader_.ended_}t&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())},i.stuckAtPlaylistEnd_=function(t){var o=this.seekable();if(!o.length)return!1;var a=this.syncController_.getExpiredTime(t,this.duration());if(a===null)return!1;var s=m0.Playlist.playlistEnd(t,a),l=this.tech_.currentTime(),u=this.tech_.buffered();if(!u.length)return s-l<=Iv;var c=u.end(u.length-1);return c-l<=Iv&&s-c<=Iv},i.blacklistCurrentPlaylist=function(t,o){t===void 0&&(t={});var a=t.playlist||this.masterPlaylistLoader_.media();if(o=o||t.blacklistDuration||this.blacklistDuration,!a){this.error=t,this.mediaSource.readyState!=="open"?this.trigger("error"):this.sourceUpdater_.endOfStream("network");return}a.playlistErrors_++;var s=this.masterPlaylistLoader_.master.playlists,l=s.filter(fz),u=l.length===1&&l[0]===a;if(s.length===1&&o!==1/0)return kt.log.warn("Problem encountered with playlist "+a.id+". Trying again since it is the only playlist."),this.tech_.trigger("retryplaylist"),this.masterPlaylistLoader_.load(u);if(u){var c=!1;s.forEach(function(y){if(y!==a){var m=y.excludeUntil;typeof m<"u"&&m!==1/0&&(c=!0,delete y.excludeUntil)}}),c&&(kt.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}var d;a.playlistErrors_>this.maxPlaylistRetries?d=1/0:d=Date.now()+o*1e3,a.excludeUntil=d,t.reason&&(a.lastExcludeReason_=t.reason),this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-blacklisted"}),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"});var f=this.selectPlaylist();if(!f){this.error="Playback cannot continue. No available working or supported playlists.",this.trigger("error");return}var h=t.internal?this.logger_:kt.log.warn,p=t.message?" "+t.message:"";h((t.internal?"Internal problem":"Problem")+" encountered with playlist "+a.id+"."+(p+" Switching to playlist "+f.id+".")),f.attributes.AUDIO!==a.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),f.attributes.SUBTITLES!==a.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);var g=f.targetDuration/2*1e3||5*1e3,v=typeof f.lastRequest=="number"&&Date.now()-f.lastRequest<=g;return this.switchMedia_(f,"exclude",u||v)},i.pauseLoading=function(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()},i.delegateLoaders_=function(t,o){var a=this,s=[],l=t==="all";(l||t==="main")&&s.push(this.masterPlaylistLoader_);var u=[];(l||t==="audio")&&u.push("AUDIO"),(l||t==="subtitle")&&(u.push("CLOSED-CAPTIONS"),u.push("SUBTITLES")),u.forEach(function(c){var d=a.mediaTypes_[c]&&a.mediaTypes_[c].activePlaylistLoader;d&&s.push(d)}),["main","audio","subtitle"].forEach(function(c){var d=a[c+"SegmentLoader_"];d&&(t===c||t==="all")&&s.push(d)}),s.forEach(function(c){return o.forEach(function(d){typeof c[d]=="function"&&c[d]()})})},i.setCurrentTime=function(t){var o=dR(this.tech_.buffered(),t);if(!(this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media())||!this.masterPlaylistLoader_.media().segments)return 0;if(o&&o.length)return t;this.mainSegmentLoader_.resetEverything(),this.mainSegmentLoader_.abort(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.resetEverything(),this.audioSegmentLoader_.abort()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.resetEverything(),this.subtitleSegmentLoader_.abort()),this.load()},i.duration=function(){if(!this.masterPlaylistLoader_)return 0;var t=this.masterPlaylistLoader_.media();return t?t.endList?this.mediaSource?this.mediaSource.duration:m0.Playlist.duration(t):1/0:0},i.seekable=function(){return this.seekable_},i.onSyncInfoUpdate_=function(){var t;if(this.masterPlaylistLoader_){var o=this.masterPlaylistLoader_.media();if(o){var a=this.syncController_.getExpiredTime(o,this.duration());if(a!==null){var s=this.masterPlaylistLoader_.master,l=m0.Playlist.seekable(o,a,m0.Playlist.liveEdgeDelay(s,o));if(l.length!==0&&!(this.mediaTypes_.AUDIO.activePlaylistLoader&&(o=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),a=this.syncController_.getExpiredTime(o,this.duration()),a===null||(t=m0.Playlist.seekable(o,a,m0.Playlist.liveEdgeDelay(s,o)),t.length===0)))){var u,c;this.seekable_&&this.seekable_.length&&(u=this.seekable_.end(0),c=this.seekable_.start(0)),t?t.start(0)>l.end(0)||l.start(0)>t.end(0)?this.seekable_=l:this.seekable_=kt.createTimeRanges([[t.start(0)>l.start(0)?t.start(0):l.start(0),t.end(0)<l.end(0)?t.end(0):l.end(0)]]):this.seekable_=l,!(this.seekable_&&this.seekable_.length&&this.seekable_.end(0)===u&&this.seekable_.start(0)===c)&&(this.logger_("seekable updated ["+KAe(this.seekable_)+"]"),this.tech_.trigger("seekablechanged"))}}}}},i.updateDuration=function(t){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),this.mediaSource.readyState!=="open"){this.updateDuration_=this.updateDuration.bind(this,t),this.mediaSource.addEventListener("sourceopen",this.updateDuration_);return}if(t){var o=this.seekable();if(!o.length)return;(isNaN(this.mediaSource.duration)||this.mediaSource.duration<o.end(o.length-1))&&this.sourceUpdater_.setDuration(o.end(o.length-1));return}var a=this.tech_.buffered(),s=m0.Playlist.duration(this.masterPlaylistLoader_.media());a.length>0&&(s=Math.max(s,a.end(a.length-1))),this.mediaSource.duration!==s&&this.sourceUpdater_.setDuration(s)},i.dispose=function(){var t=this;this.trigger("dispose"),this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach(function(o){var a=t.mediaTypes_[o].groups;for(var s in a)a[s].forEach(function(l){l.playlistLoader&&l.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()},i.master=function(){return this.masterPlaylistLoader_.master},i.media=function(){return this.masterPlaylistLoader_.media()||this.initialMedia_},i.areMediaTypesKnown_=function(){var t=!!this.mediaTypes_.AUDIO.activePlaylistLoader,o=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),a=t?!!this.audioSegmentLoader_.getCurrentMediaInfo_():!0;return!(!o||!a)},i.getCodecsOrExclude_=function(){var t=this,o={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},a=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();o.video=o.main;var s=ON(this.master(),a),l={},u=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(o.main.hasVideo&&(l.video=s.video||o.main.videoCodec||tZe),o.main.isMuxed&&(l.video+=","+(s.audio||o.main.audioCodec||gfe)),(o.main.hasAudio&&!o.main.isMuxed||o.audio.hasAudio||u)&&(l.audio=s.audio||o.main.audioCodec||o.audio.audioCodec||gfe,o.audio.isFmp4=o.main.hasAudio&&!o.main.isMuxed?o.main.isFmp4:o.audio.isFmp4),!l.audio&&!l.video){this.blacklistCurrentPlaylist({playlist:a,message:"Could not determine codecs for playlist.",blacklistDuration:1/0});return}var c=function(y,m){return y?SV(m):RG(m)},d={},f;if(["video","audio"].forEach(function(v){if(l.hasOwnProperty(v)&&!c(o[v].isFmp4,l[v])){var y=o[v].isFmp4?"browser":"muxer";d[y]=d[y]||[],d[y].push(l[v]),v==="audio"&&(f=y)}}),u&&f&&a.attributes.AUDIO){var h=a.attributes.AUDIO;this.master().playlists.forEach(function(v){var y=v.attributes&&v.attributes.AUDIO;y===h&&v!==a&&(v.excludeUntil=1/0)}),this.logger_("excluding audio group "+h+" as "+f+' does not support codec(s): "'+l.audio+'"')}if(Object.keys(d).length){var p=Object.keys(d).reduce(function(v,y){return v&&(v+=", "),v+=y+' does not support codec(s): "'+d[y].join(",")+'"',v},"")+".";this.blacklistCurrentPlaylist({playlist:a,internal:!0,message:p,blacklistDuration:1/0});return}if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){var g=[];if(["video","audio"].forEach(function(v){var y=(mv(t.sourceUpdater_.codecs[v]||"")[0]||{}).type,m=(mv(l[v]||"")[0]||{}).type;y&&m&&y.toLowerCase()!==m.toLowerCase()&&g.push('"'+t.sourceUpdater_.codecs[v]+'" -> "'+l[v]+'"')}),g.length){this.blacklistCurrentPlaylist({playlist:a,message:"Codec switching not supported: "+g.join(", ")+".",blacklistDuration:1/0,internal:!0});return}}return l},i.tryToCreateSourceBuffers_=function(){if(!(this.mediaSource.readyState!=="open"||this.sourceUpdater_.hasCreatedSourceBuffers())&&this.areMediaTypesKnown_()){var t=this.getCodecsOrExclude_();if(t){this.sourceUpdater_.createSourceBuffers(t);var o=[t.video,t.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(o)}}},i.excludeUnsupportedVariants_=function(){var t=this,o=this.master().playlists,a=[];Object.keys(o).forEach(function(s){var l=o[s];if(a.indexOf(l.id)===-1){a.push(l.id);var u=ON(t.master,l),c=[];u.audio&&!RG(u.audio)&&!SV(u.audio)&&c.push("audio codec "+u.audio),u.video&&!RG(u.video)&&!SV(u.video)&&c.push("video codec "+u.video),u.text&&u.text==="stpp.ttml.im1t"&&c.push("text codec "+u.text),c.length&&(l.excludeUntil=1/0,t.logger_("excluding "+l.id+" for unsupported: "+c.join(", ")))}})},i.excludeIncompatibleVariants_=function(t){var o=this,a=[],s=this.master().playlists,l=N3(mv(t)),u=ghe(l),c=l.video&&mv(l.video)[0]||null,d=l.audio&&mv(l.audio)[0]||null;Object.keys(s).forEach(function(f){var h=s[f];if(!(a.indexOf(h.id)!==-1||h.excludeUntil===1/0)){a.push(h.id);var p=[],g=ON(o.masterPlaylistLoader_.master,h),v=ghe(g);if(!(!g.audio&&!g.video)){if(v!==u&&p.push('codec count "'+v+'" !== "'+u+'"'),!o.sourceUpdater_.canChangeType()){var y=g.video&&mv(g.video)[0]||null,m=g.audio&&mv(g.audio)[0]||null;y&&c&&y.type.toLowerCase()!==c.type.toLowerCase()&&p.push('video codec "'+y.type+'" !== "'+c.type+'"'),m&&d&&m.type.toLowerCase()!==d.type.toLowerCase()&&p.push('audio codec "'+m.type+'" !== "'+d.type+'"')}p.length&&(h.excludeUntil=1/0,o.logger_("blacklisting "+h.id+": "+p.join(" && ")))}}})},i.updateAdCues_=function(t){var o=0,a=this.seekable();a.length&&(o=a.start(0)),Gtt(t,this.cueTagsTrack_,o)},i.goalBufferLength=function(){var t=this.tech_.currentTime(),o=wu.GOAL_BUFFER_LENGTH,a=wu.GOAL_BUFFER_LENGTH_RATE,s=Math.max(o,wu.MAX_GOAL_BUFFER_LENGTH);return Math.min(o+t*a,s)},i.bufferLowWaterLine=function(){var t=this.tech_.currentTime(),o=wu.BUFFER_LOW_WATER_LINE,a=wu.BUFFER_LOW_WATER_LINE_RATE,s=Math.max(o,wu.MAX_BUFFER_LOW_WATER_LINE),l=Math.max(o,wu.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(o+t*a,this.experimentalBufferBasedABR?l:s)},i.bufferHighWaterLine=function(){return wu.BUFFER_HIGH_WATER_LINE},e})(kt.EventTarget),hrt=function(e,i,n){return function(t){var o=e.master.playlists[i],a=X9(o),s=fz(o);return typeof t>"u"?s:(t?delete o.disabled:o.disabled=!0,t!==s&&!a&&(n(),t?e.trigger("renditionenabled"):e.trigger("renditiondisabled")),t)}},prt=function(e,i,n){var t=e.masterPlaylistController_,o=e.options_.smoothQualityChange,a=o?"smooth":"fast",s=t[a+"QualityChange_"].bind(t);if(i.attributes){var l=i.attributes.RESOLUTION;this.width=l&&l.width,this.height=l&&l.height,this.bandwidth=i.attributes.BANDWIDTH,this.frameRate=i.attributes["FRAME-RATE"]}this.codecs=ON(t.master(),i),this.playlist=i,this.id=n,this.enabled=hrt(e.playlists,i.id,s)},grt=function(e){e.representations=function(){var i=e.masterPlaylistController_.master(),n=Pj(i)?e.masterPlaylistController_.getAudioTrackPlaylists_():i.playlists;return n?n.filter(function(t){return!X9(t)}).map(function(t,o){return new prt(e,t,t.id)}):[]}},Ahe=["seeking","seeked","pause","playing","error"],vrt=(function(){function r(i){var n=this;this.masterPlaylistController_=i.masterPlaylistController,this.tech_=i.tech,this.seekable=i.seekable,this.allowSeeksWithinUnsafeLiveWindow=i.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=i.liveRangeSafeTimeDelta,this.media=i.media,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.timer_=null,this.checkCurrentTimeTimeout_=null,this.logger_=Lg("PlaybackWatcher"),this.logger_("initialize");var t=function(){return n.monitorCurrentTime_()},o=function(){return n.monitorCurrentTime_()},a=function(){return n.techWaiting_()},s=function(){return n.cancelTimer_()},l=this.masterPlaylistController_,u=["main","subtitle","audio"],c={};u.forEach(function(f){c[f]={reset:function(){return n.resetSegmentDownloads_(f)},updateend:function(){return n.checkSegmentDownloads_(f)}},l[f+"SegmentLoader_"].on("appendsdone",c[f].updateend),l[f+"SegmentLoader_"].on("playlistupdate",c[f].reset),n.tech_.on(["seeked","seeking"],c[f].reset)});var d=function(h){["main","audio"].forEach(function(p){l[p+"SegmentLoader_"][h]("appended",n.seekingAppendCheck_)})};this.seekingAppendCheck_=function(){n.fixesBadSeeks_()&&(n.consecutiveUpdates=0,n.lastRecordedTime=n.tech_.currentTime(),d("off"))},this.clearSeekingAppendCheck_=function(){return d("off")},this.watchForBadSeeking_=function(){n.clearSeekingAppendCheck_(),d("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",a),this.tech_.on(Ahe,s),this.tech_.on("canplay",o),this.tech_.one("play",t),this.dispose=function(){n.clearSeekingAppendCheck_(),n.logger_("dispose"),n.tech_.off("waiting",a),n.tech_.off(Ahe,s),n.tech_.off("canplay",o),n.tech_.off("play",t),n.tech_.off("seeking",n.watchForBadSeeking_),n.tech_.off("seeked",n.clearSeekingAppendCheck_),u.forEach(function(f){l[f+"SegmentLoader_"].off("appendsdone",c[f].updateend),l[f+"SegmentLoader_"].off("playlistupdate",c[f].reset),n.tech_.off(["seeked","seeking"],c[f].reset)}),n.checkCurrentTimeTimeout_&&bt.clearTimeout(n.checkCurrentTimeTimeout_),n.cancelTimer_()}}var e=r.prototype;return e.monitorCurrentTime_=function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&bt.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=bt.setTimeout(this.monitorCurrentTime_.bind(this),250)},e.resetSegmentDownloads_=function(n){var t=this.masterPlaylistController_[n+"SegmentLoader_"];this[n+"StalledDownloads_"]>0&&this.logger_("resetting possible stalled download count for "+n+" loader"),this[n+"StalledDownloads_"]=0,this[n+"Buffered_"]=t.buffered_()},e.checkSegmentDownloads_=function(n){var t=this.masterPlaylistController_,o=t[n+"SegmentLoader_"],a=o.buffered_(),s=oet(this[n+"Buffered_"],a);if(this[n+"Buffered_"]=a,s){this.resetSegmentDownloads_(n);return}this[n+"StalledDownloads_"]++,this.logger_("found #"+this[n+"StalledDownloads_"]+" "+n+" appends that did not increase buffer (possible stalled download)",{playlistId:o.playlist_&&o.playlist_.id,buffered:Kw(a)}),!(this[n+"StalledDownloads_"]<10)&&(this.logger_(n+" loader stalled download exclusion"),this.resetSegmentDownloads_(n),this.tech_.trigger({type:"usage",name:"vhs-"+n+"-download-exclusion"}),n!=="subtitle"&&t.blacklistCurrentPlaylist({message:"Excessive "+n+" segment downloading detected."},1/0))},e.checkCurrentTime_=function(){if(!(this.tech_.paused()||this.tech_.seeking())){var n=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===n&&(!t.length||n+Iv>=t.end(t.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&&n===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):n===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=n)}},e.cancelTimer_=function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null},e.fixesBadSeeks_=function(){var n=this.tech_.seeking();if(!n)return!1;var t=this.seekable(),o=this.tech_.currentTime(),a=this.afterSeekableWindow_(t,o,this.media(),this.allowSeeksWithinUnsafeLiveWindow),s;if(a){var l=t.end(t.length-1);s=l}if(this.beforeSeekableWindow_(t,o)){var u=t.start(0);s=u+(u===t.end(0)?0:Iv)}if(typeof s<"u")return this.logger_("Trying to seek outside of seekable at time "+o+" with "+("seekable range "+KAe(t)+". Seeking to ")+(s+".")),this.tech_.setCurrentTime(s),!0;for(var c=this.masterPlaylistController_.sourceUpdater_,d=this.tech_.buffered(),f=c.audioBuffer?c.audioBuffered():null,h=c.videoBuffer?c.videoBuffered():null,p=this.media(),g=p.partTargetDuration?p.partTargetDuration:(p.targetDuration-WS)*2,v=[f,h],y=0;y<v.length;y++)if(v[y]){var m=$9(v[y],o);if(m<g)return!1}var b=aB(d,o);return b.length===0?!1:(s=b.start(0)+Iv,this.logger_("Buffered region starts ("+b.start(0)+") "+(" just beyond seek point ("+o+"). Seeking to "+s+".")),this.tech_.setCurrentTime(s),!0)},e.waiting_=function(){if(!this.techWaiting_()){var n=this.tech_.currentTime(),t=this.tech_.buffered(),o=dR(t,n);if(o.length&&n+3<=o.end(0)){this.cancelTimer_(),this.tech_.setCurrentTime(n),this.logger_("Stopped at "+n+" while inside a buffered region "+("["+o.start(0)+" -> "+o.end(0)+"]. Attempting to resume ")+"playback by seeking to the current time."),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"}),this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"});return}}},e.techWaiting_=function(){var n=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking()||this.timer_!==null)return!0;if(this.beforeSeekableWindow_(n,t)){var o=n.end(n.length-1);return this.logger_("Fell out of live window at time "+t+". Seeking to "+("live point (seekable end) "+o)),this.cancelTimer_(),this.tech_.setCurrentTime(o),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}var a=this.tech_.vhs.masterPlaylistController_.sourceUpdater_,s=this.tech_.buffered(),l=this.videoUnderflow_({audioBuffered:a.audioBuffered(),videoBuffered:a.videoBuffered(),currentTime:t});if(l)return this.cancelTimer_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;var u=aB(s,t);if(u.length>0){var c=u.start(0)-t;return this.logger_("Stopped at "+t+", setting timer for "+c+", seeking "+("to "+u.start(0))),this.cancelTimer_(),this.timer_=setTimeout(this.skipTheGap_.bind(this),c*1e3,t),!0}return!1},e.afterSeekableWindow_=function(n,t,o,a){if(a===void 0&&(a=!1),!n.length)return!1;var s=n.end(n.length-1)+Iv,l=!o.endList;return l&&a&&(s=n.end(n.length-1)+o.targetDuration*3),t>s},e.beforeSeekableWindow_=function(n,t){return!!(n.length&&n.start(0)>0&&t<n.start(0)-this.liveRangeSafeTimeDelta)},e.videoUnderflow_=function(n){var t=n.videoBuffered,o=n.audioBuffered,a=n.currentTime;if(t){var s;if(t.length&&o.length){var l=dR(t,a-3),u=dR(t,a),c=dR(o,a);c.length&&!u.length&&l.length&&(s={start:l.end(0),end:c.end(0)})}else{var d=aB(t,a);d.length||(s=this.gapFromVideoUnderflow_(t,a))}return s?(this.logger_("Encountered a gap in video from "+s.start+" to "+s.end+". "+("Seeking to current time "+a)),!0):!1}},e.skipTheGap_=function(n){var t=this.tech_.buffered(),o=this.tech_.currentTime(),a=aB(t,o);this.cancelTimer_(),!(a.length===0||o!==n)&&(this.logger_("skipTheGap_:","currentTime:",o,"scheduled currentTime:",n,"nextRange start:",a.start(0)),this.tech_.setCurrentTime(a.start(0)+WS),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"}),this.tech_.trigger({type:"usage",name:"hls-gap-skip"}))},e.gapFromVideoUnderflow_=function(n,t){for(var o=ret(n),a=0;a<o.length;a++){var s=o.start(a),l=o.end(a);if(t-s<4&&t-s>2)return{start:s,end:l}}return null},r})(),yrt={errorInterval:30,getSource:function(e){var i=this.tech({IWillNotUseThisInPlugins:!0}),n=i.currentSource_||this.currentSource();return e(n)}},mrt=function r(e,i){var n=0,t=0,o=kt.mergeOptions(yrt,i);e.ready(function(){e.trigger({type:"usage",name:"vhs-error-reload-initialized"}),e.trigger({type:"usage",name:"hls-error-reload-initialized"})});var a=function(){t&&e.currentTime(t)},s=function(f){f!=null&&(t=e.duration()!==1/0&&e.currentTime()||0,e.one("loadedmetadata",a),e.src(f),e.trigger({type:"usage",name:"vhs-error-reload"}),e.trigger({type:"usage",name:"hls-error-reload"}),e.play())},l=function(){if(Date.now()-n<o.errorInterval*1e3){e.trigger({type:"usage",name:"vhs-error-reload-canceled"}),e.trigger({type:"usage",name:"hls-error-reload-canceled"});return}if(!o.getSource||typeof o.getSource!="function"){kt.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!");return}return n=Date.now(),o.getSource.call(e,s)},u=function d(){e.off("loadedmetadata",a),e.off("error",l),e.off("dispose",d)},c=function(f){u(),r(e,f)};e.on("error",l),e.on("dispose",u),e.reloadSourceOnError=c},brt=function(e){mrt(this,e)},kwe="2.16.3",Srt="6.0.1",_rt="0.22.1",Prt="4.8.0",Crt="3.1.3",dc={PlaylistLoader:fR,Playlist:wf,utils:Met,STANDARD_PLAYLIST_SELECTOR:yhe,INITIAL_PLAYLIST_SELECTOR:_tt,lastBandwidthSelector:yhe,movingAverageBandwidthSelector:btt,comparePlaylistBandwidth:Q9,comparePlaylistResolution:mtt,xhr:dwe()};Object.keys(wu).forEach(function(r){Object.defineProperty(dc,r,{get:function(){return kt.log.warn("using Vhs."+r+" is UNSAFE be sure you know what you are doing"),wu[r]},set:function(i){if(kt.log.warn("using Vhs."+r+" is UNSAFE be sure you know what you are doing"),typeof i!="number"||i<0){kt.log.warn("value of Vhs."+r+" must be greater than or equal to 0");return}wu[r]=i}})});var Iwe="videojs-vhs",Nwe=function(e,i){for(var n=i.media(),t=-1,o=0;o<e.length;o++)if(e[o].id===n.id){t=o;break}e.selectedIndex_=t,e.trigger({selectedIndex:t,type:"change"})},Trt=function(e,i){i.representations().forEach(function(n){e.addQualityLevel(n)}),Nwe(e,i.playlists)};dc.canPlaySource=function(){return kt.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var xrt=function(e,i,n){if(!e)return e;var t={};i&&i.attributes&&i.attributes.CODECS&&(t=N3(mv(i.attributes.CODECS))),n&&n.attributes&&n.attributes.CODECS&&(t.audio=n.attributes.CODECS);var o=pF(t.video),a=pF(t.audio),s={};for(var l in e)s[l]={},a&&(s[l].audioContentType=a),o&&(s[l].videoContentType=o),i.contentProtection&&i.contentProtection[l]&&i.contentProtection[l].pssh&&(s[l].pssh=i.contentProtection[l].pssh),typeof e[l]=="string"&&(s[l].url=e[l]);return kt.mergeOptions(e,s)},Ert=function(e,i){return e.reduce(function(n,t){if(!t.contentProtection)return n;var o=i.reduce(function(a,s){var l=t.contentProtection[s];return l&&l.pssh&&(a[s]={pssh:l.pssh}),a},{});return Object.keys(o).length&&n.push(o),n},[])},Art=function(e){var i=e.player,n=e.sourceKeySystems,t=e.audioMedia,o=e.mainPlaylists;if(!i.eme.initializeMediaKeys)return Promise.resolve();var a=t?o.concat([t]):o,s=Ert(a,Object.keys(n)),l=[],u=[];return s.forEach(function(c){u.push(new Promise(function(d,f){i.tech_.one("keysessioncreated",d)})),l.push(new Promise(function(d,f){i.eme.initializeMediaKeys({keySystems:c},function(h){if(h){f(h);return}d()})}))}),Promise.race([Promise.all(l),Promise.race(u)])},wrt=function(e){var i=e.player,n=e.sourceKeySystems,t=e.media,o=e.audioMedia,a=xrt(n,t,o);return a?(i.currentSource().keySystems=a,a&&!i.eme?(kt.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1):!0):!1},Fwe=function(){if(!bt.localStorage)return null;var e=bt.localStorage.getItem(Iwe);if(!e)return null;try{return JSON.parse(e)}catch{return null}},Ort=function(e){if(!bt.localStorage)return!1;var i=Fwe();i=i?kt.mergeOptions(i,e):e;try{bt.localStorage.setItem(Iwe,JSON.stringify(i))}catch{return!1}return i},Drt=function(e){return e.toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")===0?JSON.parse(e.substring(e.indexOf(",")+1)):e};dc.supportsNativeHls=(function(){if(!Vr||!Vr.createElement)return!1;var r=Vr.createElement("video");if(!kt.getTech("Html5").isSupported())return!1;var e=["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"];return e.some(function(i){return/maybe|probably/i.test(r.canPlayType(i))})})();dc.supportsNativeDash=(function(){return!Vr||!Vr.createElement||!kt.getTech("Html5").isSupported()?!1:/maybe|probably/i.test(Vr.createElement("video").canPlayType("application/dash+xml"))})();dc.supportsTypeNatively=function(r){return r==="hls"?dc.supportsNativeHls:r==="dash"?dc.supportsNativeDash:!1};dc.isSupported=function(){return kt.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var Rrt=kt.getComponent("Component"),t7=(function(r){zr(e,r);function e(n,t,o){var a;if(a=r.call(this,t,kt.mergeOptions(o.hls,o.vhs))||this,o.hls&&Object.keys(o.hls).length&&kt.log.warn("Using hls options is deprecated. Please rename `hls` to `vhs` in your options object."),typeof o.initialBandwidth=="number"&&(a.options_.bandwidth=o.initialBandwidth),a.logger_=Lg("VhsHandler"),t.options_&&t.options_.playerId){var s=kt(t.options_.playerId);s.hasOwnProperty("hls")||Object.defineProperty(s,"hls",{get:function(){return kt.log.warn("player.hls is deprecated. Use player.tech().vhs instead."),t.trigger({type:"usage",name:"hls-player-access"}),sn(a)},configurable:!0}),s.hasOwnProperty("vhs")||Object.defineProperty(s,"vhs",{get:function(){return kt.log.warn("player.vhs is deprecated. Use player.tech().vhs instead."),t.trigger({type:"usage",name:"vhs-player-access"}),sn(a)},configurable:!0}),s.hasOwnProperty("dash")||Object.defineProperty(s,"dash",{get:function(){return kt.log.warn("player.dash is deprecated. Use player.tech().vhs instead."),sn(a)},configurable:!0}),a.player_=s}if(a.tech_=t,a.source_=n,a.stats={},a.ignoreNextSeekingEvent_=!1,a.setOptions_(),a.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(a.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");return a.on(Vr,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],function(l){var u=Vr.fullscreenElement||Vr.webkitFullscreenElement||Vr.mozFullScreenElement||Vr.msFullscreenElement;u&&u.contains(a.tech_.el())?a.masterPlaylistController_.fastQualityChange_():a.masterPlaylistController_.checkABR_()}),a.on(a.tech_,"seeking",function(){if(this.ignoreNextSeekingEvent_){this.ignoreNextSeekingEvent_=!1;return}this.setCurrentTime(this.tech_.currentTime())}),a.on(a.tech_,"error",function(){this.tech_.error()&&this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading()}),a.on(a.tech_,"play",a.play),a}var i=e.prototype;return i.setOptions_=function(){var t=this;if(this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.handleManifestRedirects=this.options_.handleManifestRedirects!==!1,this.options_.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions!==!1,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.smoothQualityChange=this.options_.smoothQualityChange||!1,this.options_.useBandwidthFromLocalStorage=typeof this.source_.useBandwidthFromLocalStorage<"u"?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!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,typeof this.options_.blacklistDuration!="number"&&(this.options_.blacklistDuration=300),typeof this.options_.bandwidth!="number"&&this.options_.useBandwidthFromLocalStorage){var o=Fwe();o&&o.bandwidth&&(this.options_.bandwidth=o.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-bandwidth-from-local-storage"})),o&&o.throughput&&(this.options_.throughput=o.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-throughput-from-local-storage"}))}typeof this.options_.bandwidth!="number"&&(this.options_.bandwidth=wu.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===wu.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","limitRenditionByPlayerDimensions","bandwidth","smoothQualityChange","customTagParsers","customTagMappers","handleManifestRedirects","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","experimentalBufferBasedABR","liveRangeSafeTimeDelta","experimentalLLHLS","useNetworkInformationApi","useDtsForTimestampOffset","experimentalExactManifestTimings","experimentalLeastPixelDiffSelector"].forEach(function(a){typeof t.source_[a]<"u"&&(t.options_[a]=t.source_[a])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio},i.src=function(t,o){var a=this;if(t){this.setOptions_(),this.options_.src=Drt(this.source_.src),this.options_.tech=this.tech_,this.options_.externVhs=dc,this.options_.sourceType=wEe(o),this.options_.seekTo=function(u){a.tech_.setCurrentTime(u)},this.options_.smoothQualityChange&&kt.log.warn("smoothQualityChange is deprecated and will be removed in the next major version"),this.masterPlaylistController_=new frt(this.options_);var s=kt.mergeOptions({liveRangeSafeTimeDelta:Iv},this.options_,{seekable:function(){return a.seekable()},media:function(){return a.masterPlaylistController_.media()},masterPlaylistController:this.masterPlaylistController_});this.playbackWatcher_=new vrt(s),this.masterPlaylistController_.on("error",function(){var u=kt.players[a.tech_.options_.playerId],c=a.masterPlaylistController_.error;typeof c=="object"&&!c.code?c.code=3:typeof c=="string"&&(c={message:c,code:3}),u.error(c)});var l=this.options_.experimentalBufferBasedABR?dc.movingAverageBandwidthSelector(.55):dc.STANDARD_PLAYLIST_SELECTOR;this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):l.bind(this),this.masterPlaylistController_.selectInitialPlaylist=dc.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.masterPlaylistController_.masterPlaylistLoader_,this.mediaSource=this.masterPlaylistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get:function(){return this.masterPlaylistController_.selectPlaylist},set:function(c){this.masterPlaylistController_.selectPlaylist=c.bind(this)}},throughput:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate},set:function(c){this.masterPlaylistController_.mainSegmentLoader_.throughput.rate=c,this.masterPlaylistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get:function(){var c=this.masterPlaylistController_.mainSegmentLoader_.bandwidth,d=bt.navigator.connection||bt.navigator.mozConnection||bt.navigator.webkitConnection,f=1e7;if(this.options_.useNetworkInformationApi&&d){var h=d.downlink*1e3*1e3;h>=f&&c>=f?c=Math.max(c,h):c=h}return c},set:function(c){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=c,this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){var c=1/(this.bandwidth||1),d;this.throughput>0?d=1/this.throughput:d=0;var f=Math.floor(1/(c+d));return f},set:function(){kt.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:function(){return a.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return a.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return a.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return a.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:!0},mediaRequestsErrored:{get:function(){return a.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return a.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return a.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return a.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0},mediaAppends:{get:function(){return a.masterPlaylistController_.mediaAppends_()||0},enumerable:!0},mainAppendsToLoadedData:{get:function(){return a.masterPlaylistController_.mainAppendsToLoadedData_()||0},enumerable:!0},audioAppendsToLoadedData:{get:function(){return a.masterPlaylistController_.audioAppendsToLoadedData_()||0},enumerable:!0},appendsToLoadedData:{get:function(){return a.masterPlaylistController_.appendsToLoadedData_()||0},enumerable:!0},timeToLoadedData:{get:function(){return a.masterPlaylistController_.timeToLoadedData_()||0},enumerable:!0},buffered:{get:function(){return Kw(a.tech_.buffered())},enumerable:!0},currentTime:{get:function(){return a.tech_.currentTime()},enumerable:!0},currentSource:{get:function(){return a.tech_.currentSource_},enumerable:!0},currentTech:{get:function(){return a.tech_.name_},enumerable:!0},duration:{get:function(){return a.tech_.duration()},enumerable:!0},master:{get:function(){return a.playlists.master},enumerable:!0},playerDimensions:{get:function(){return a.tech_.currentDimensions()},enumerable:!0},seekable:{get:function(){return Kw(a.tech_.seekable())},enumerable:!0},timestamp:{get:function(){return Date.now()},enumerable:!0},videoPlaybackQuality:{get:function(){return a.tech_.getVideoPlaybackQuality()},enumerable:!0}}),this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.tech_.on("bandwidthupdate",function(){a.options_.useBandwidthFromLocalStorage&&Ort({bandwidth:a.bandwidth,throughput:Math.round(a.throughput)})}),this.masterPlaylistController_.on("selectedinitialmedia",function(){grt(a)}),this.masterPlaylistController_.sourceUpdater_.on("createdsourcebuffers",function(){a.setupEme_()}),this.on(this.masterPlaylistController_,"progress",function(){this.tech_.trigger("progress")}),this.on(this.masterPlaylistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=bt.URL.createObjectURL(this.masterPlaylistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}},i.createKeySessions_=function(){var t=this,o=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),Art({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:o&&o.media(),mainPlaylists:this.playlists.master.playlists}).then(function(){t.logger_("created EME key session"),t.masterPlaylistController_.sourceUpdater_.initializedEme()}).catch(function(a){t.logger_("error while creating EME key session",a),t.player_.error({message:"Failed to initialize media keys for EME",code:3})})},i.handleWaitingForKey_=function(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()},i.setupEme_=function(){var t=this,o=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader,a=wrt({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:o&&o.media()});if(this.player_.tech_.on("keystatuschange",function(s){if(s.status==="output-restricted"){var l=t.masterPlaylistController_.master();if(!(!l||!l.playlists)){var u=[];if(l.playlists.forEach(function(d){d&&d.attributes&&d.attributes.RESOLUTION&&d.attributes.RESOLUTION.height>=720&&(!d.excludeUntil||d.excludeUntil<1/0)&&(d.excludeUntil=1/0,u.push(d))}),u.length){var c;(c=kt.log).warn.apply(c,['DRM keystatus changed to "output-restricted." Removing the following HD playlists that will most likely fail to play and clearing the buffer. This may be due to HDCP restrictions on the stream and the capabilities of the current device.'].concat(u)),t.masterPlaylistController_.fastQualityChange_()}}}}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),kt.browser.IE_VERSION===11||!a){this.masterPlaylistController_.sourceUpdater_.initializedEme();return}this.createKeySessions_()},i.setupQualityLevels_=function(){var t=this,o=kt.players[this.tech_.options_.playerId];!o||!o.qualityLevels||this.qualityLevels_||(this.qualityLevels_=o.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",function(){Trt(t.qualityLevels_,t)}),this.playlists.on("mediachange",function(){Nwe(t.qualityLevels_,t.playlists)}))},e.version=function(){return{"@videojs/http-streaming":kwe,"mux.js":Srt,"mpd-parser":_rt,"m3u8-parser":Prt,"aes-decrypter":Crt}},i.version=function(){return this.constructor.version()},i.canChangeType=function(){return Lwe.canChangeType()},i.play=function(){this.masterPlaylistController_.play()},i.setCurrentTime=function(t){this.masterPlaylistController_.setCurrentTime(t)},i.duration=function(){return this.masterPlaylistController_.duration()},i.seekable=function(){return this.masterPlaylistController_.seekable()},i.dispose=function(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.masterPlaylistController_&&this.masterPlaylistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.player_&&(delete this.player_.vhs,delete this.player_.dash,delete this.player_.hls),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.tech_&&delete this.tech_.hls,this.mediaSourceUrl_&&bt.URL.revokeObjectURL&&(bt.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),r.prototype.dispose.call(this)},i.convertToProgramTime=function(t,o){return Bet({playlist:this.masterPlaylistController_.media(),time:t,callback:o})},i.seekToProgramTime=function(t,o,a,s){return a===void 0&&(a=!0),s===void 0&&(s=2),Vet({programTime:t,playlist:this.masterPlaylistController_.media(),retryCount:s,pauseAfterSeek:a,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:o})},e})(Rrt),SF={name:"videojs-http-streaming",VERSION:kwe,canHandleSource:function(e,i){i===void 0&&(i={});var n=kt.mergeOptions(kt.options,i);return SF.canPlayType(e.type,n)},handleSource:function(e,i,n){n===void 0&&(n={});var t=kt.mergeOptions(kt.options,n);return i.vhs=new t7(e,i,t),kt.hasOwnProperty("hls")||Object.defineProperty(i,"hls",{get:function(){return kt.log.warn("player.tech().hls is deprecated. Use player.tech().vhs instead."),i.vhs},configurable:!0}),i.vhs.xhr=dwe(),i.vhs.src(e.src,e.type),i.vhs},canPlayType:function(e,i){var n=wEe(e);if(!n)return"";var t=SF.getOverrideNative(i),o=dc.supportsTypeNatively(n),a=!o||t;return a?"maybe":""},getOverrideNative:function(e){e===void 0&&(e={});var i=e,n=i.vhs,t=n===void 0?{}:n,o=i.hls,a=o===void 0?{}:o,s=!(kt.browser.IS_ANY_SAFARI||kt.browser.IS_IOS),l=t.overrideNative,u=l===void 0?s:l,c=a.overrideNative,d=c===void 0?!1:c;return d||u}},Mrt=function(){return SV("avc1.4d400d,mp4a.40.2")};Mrt()&&kt.getTech("Html5").registerSourceHandler(SF,0);kt.VhsHandler=t7;Object.defineProperty(kt,"HlsHandler",{get:function(){return kt.log.warn("videojs.HlsHandler is deprecated. Use videojs.VhsHandler instead."),t7},configurable:!0});kt.VhsSourceHandler=SF;Object.defineProperty(kt,"HlsSourceHandler",{get:function(){return kt.log.warn("videojs.HlsSourceHandler is deprecated. Use videojs.VhsSourceHandler instead."),SF},configurable:!0});kt.Vhs=dc;Object.defineProperty(kt,"Hls",{get:function(){return kt.log.warn("videojs.Hls is deprecated. Use videojs.Vhs instead."),dc},configurable:!0});kt.use||(kt.registerComponent("Hls",dc),kt.registerComponent("Vhs",dc));kt.options.vhs=kt.options.vhs||{};kt.options.hls=kt.options.hls||{};if(!kt.getPlugin||!kt.getPlugin("reloadSourceOnError")){var Lrt=kt.registerPlugin||kt.plugin;Lrt("reloadSourceOnError",brt)}function krt(r){const e=G.useRef(null),i=G.useRef(void 0),n=G.useRef(void 0),[t,o]=G.useState(),[a]=G.useState(),[s,l]=G.useState(!1);G.useEffect(()=>{o(r.videoFile.url),l(!1)},[r.videoFile]),G.useEffect(()=>{var d;i!=null&&i.current&&((d=i.current)==null||d.muted(r.soundMuted))},[r.soundMuted]),G.useEffect(()=>{var d;console.log("testOffset",r.testOffset),n.current&&(r.testOffset!==void 0?n.current.setVideoOffsetSeconds(r.testOffset):n.current.setVideoOffsetSeconds(((d=r.videoFile)==null?void 0:d.offsetMs)/1e3))},[r.testOffset,r.videoFile]);const u={autoplay:!1,controls:!1,responsive:!0,fluid:!0};G.useEffect(()=>{var f;if(!t||!r.videoFile)return;const d={...u,sources:[{src:t}]};if(i.current)i.current.src(d.sources);else{const h=document.createElement("video-js");h.classList.add("vjs-big-play-centered"),(f=e.current)==null||f.appendChild(h),i.current=kt(h,d,()=>{r.onVideoLoadedCallback()}),i.current.fill(!0),i.current.playsinline(!0),i.current.muted(r.soundMuted),i.current.on("loadedmetadata",()=>{l(!0)});const p=localStorage.getItem("maxDriftTimeSeconds"),g=localStorage.getItem("videoSyncEnabled"),v={play(){i.current.play()},pause(){i.current.pause()},paused(){return i.current.paused()},currentTime(){return i.current.currentTime()},setCurrentTime(y){i.current.currentTime(y)},duration(){return i.current.duration()},setMuted(y){i.current.muted(y)},muted(){return i.current.muted()}};n.current=o4e.createSession(v,r.videoFile.offsetMs/1e3,p!=null?parseFloat(p):void 0,!(g!=null&&g==="no"))}},[t,r.videoFile]),G.useEffect(()=>{!r.syncModeEnabled&&n.current&&i.current&&s&&c()},[r.playbackState,s]),G.useEffect(()=>{var d;i.current!==void 0&&(i.current.controls(r.syncModeEnabled),(d=n.current)==null||d.enable(!r.syncModeEnabled))},[r.syncModeEnabled]);const c=async()=>{try{const d=await n.current.syncVideoWithRecording(r.playbackState);r.videoStatusCallback(d)}catch(d){d.name==="FailedToPlayError"&&i.current&&(console.log("Failed to play, this is likely a permission error?"),console.log(`muted ${i.current.muted()}, inline? ${i.current.playsinline()}`),console.log(d),i.current.muted(!0),i.current.playsinline(!0),i.current.play())}};return R.jsx("div",{className:"h-full",children:R.jsxs("div",{"data-vjs-player":!0,className:"h-full",children:[a===!0&&R.jsx("p",{children:"Failed to load video. Please remove this panel and add it again."}),!a&&R.jsx("div",{className:"h-full",ref:e})]})})}G.createContext(void 0);const Irt=["xxl","xl","lg","md","sm","xs"],Nrt="xs",r7=G.createContext({prefixes:{},breakpoints:Irt,minBreakpoint:Nrt}),{Consumer:Dft,Provider:Rft}=r7;function i7(r,e){const{prefixes:i}=G.useContext(r7);return r||i[e]||e}function Frt(){const{dir:r}=G.useContext(r7);return r==="rtl"}const jwe=G.forwardRef(({className:r,bsPrefix:e,as:i="div",...n},t)=>(e=i7(e,"popover-header"),R.jsx(i,{ref:t,className:Zv(r,e),...n})));jwe.displayName="PopoverHeader";const n7=G.forwardRef(({className:r,bsPrefix:e,as:i="div",...n},t)=>(e=i7(e,"popover-body"),R.jsx(i,{ref:t,className:Zv(r,e),...n})));n7.displayName="PopoverBody";function jrt(r,e){let i=r;return r==="left"?i=e?"end":"start":r==="right"&&(i=e?"start":"end"),i}function Brt(r="absolute"){return{position:r,top:"0",left:"0",opacity:"0",pointerEvents:"none"}}const Bwe=G.forwardRef(({bsPrefix:r,placement:e="right",className:i,style:n,children:t,body:o,arrowProps:a,hasDoneInitialMeasure:s,popper:l,show:u,...c},d)=>{const f=i7(r,"popover"),h=Frt(),[p]=(e==null?void 0:e.split("-"))||[],g=jrt(p,h);let v=n;return u&&!s&&(v={...n,...Brt(l==null?void 0:l.strategy)}),R.jsxs("div",{ref:d,role:"tooltip",style:v,"x-placement":p,className:Zv(i,f,p&&`bs-popover-${g}`),...c,children:[R.jsx("div",{className:"popover-arrow",...a}),o?R.jsx(n7,{children:t}):t]})});Bwe.displayName="Popover";const whe=Object.assign(Bwe,{Header:jwe,Body:n7,POPPER_OFFSET:[0,8]});function Vrt(r){return R.jsxs(R.Fragment,{children:[R.jsxs("div",{className:"d-flex justify-content-between align-items-center rounded px-2 py-1 m-1 remotive-primary-20-background flex-truncate",style:{minWidth:230},children:[R.jsx("div",{className:"d-flex align-items-start flex-column flex-truncate",children:r.titleElement}),R.jsx("div",{className:"d-flex justify-content-center align-items-center flex-row align-items-center",children:r.actionElement})]}),r.footer]})}G.forwardRef(function(e,i){const{titleElement:n,items:t,footer:o,...a}=e;return R.jsx(whe,{show:a.show,ref:i,...a,className:`settings-popover ${a.className||""}`,children:R.jsxs(whe.Body,{className:"p-2 shadow-sm",children:[n&&R.jsx("div",{className:"mb-1",children:n}),R.jsxs("div",{className:"text-center",children:[R.jsx("div",{className:"d-flex justify-content-center remotive-font-md flex-column",children:t.map((s,l)=>R.jsx(Vrt,{titleElement:s.titleElement,actionElement:s.actionElement,footer:s.footer},l))}),R.jsx(R.Fragment,{children:o})]})]})})});const QG=(r="",e="")=>R.jsx(R.Fragment,{children:R.jsxs("p",{className:"text-start m-0",children:[R.jsx("span",{className:"font-bold",children:r})," ",R.jsx("br",{})," ",R.jsx("span",{className:"text-xs",children:e})]})}),hz=G.createContext(null);class Hrt{constructor(e,i){this.brokerUrl=e,this.accessToken=i,this._networkServiceClient=new Vc.NetworkServicePromiseClient(this.brokerUrl),this._systemServiceClient=new Vc.SystemServicePromiseClient(this.brokerUrl)}_authHeaders(){const e={};return this.accessToken&&(e["x-api-key"]=this.accessToken),e}async getNamespaceNames(){try{return(await this._systemServiceClient.getConfiguration(new Vc.Empty,this._authHeaders())).getNetworkinfoList().filter(i=>i.getType()!=="virtual").map(i=>{var n;return((n=i.getNamespace())==null?void 0:n.getName())??""})}catch(e){return console.error("[BrokerService] Failed to get namespaces:",e),[]}}_onDataCallback(e){return{frameIdFrequency:e.map(n=>({frameId:n.getFrameid(),frequency:`${n.getCount()}`})),receivedTimestamp:Date.now()}}subscribeToFrameDistribution(e,i,n){this.frameDistributionStream!==void 0&&(this.frameDistributionStream.cancel(),console.debug("[BrokerService] Killing previous frame distribution stream and setting up a new one"));const t=new Vc.FramesDistributionConfig,o=new Vc.NameSpace;return o.setName(e),t.setNamespace(o),this.frameDistributionStream=this._networkServiceClient.subscribeToFramesDistribution(t,this._authHeaders()),this.frameDistributionStream.on("data",a=>{try{const s=this._onDataCallback(a.getCountsbyframeidList());i(s)}catch(s){console.debug("[BrokerService] Error processing frame distribution data:",s)}}),this.frameDistributionStream.on("end",()=>{console.debug("[BrokerService] Frame distribution subscription ended"),n()}),this.frameDistributionStream.on("error",a=>{console.debug("[BrokerService] Frame distribution stream error:",a)}),()=>{this.frameDistributionStream&&(this.frameDistributionStream.cancel(),this.frameDistributionStream=void 0)}}}const Ohe=5e3;async function Urt(r){const e=new zrt(r);return await e.init(),e}class zrt{constructor(e){this._pendingSubscriptions=[],this._subscriptions=[],this._stream=void 0,this._onSignalStreamEndCallback=()=>{},this._onSignalStreamErrorCallback=()=>{},this._shouldAutoReconnect=!1,this._retryTimeoutId=void 0,this.createCombinedSubscribeConfig=()=>{const i=new Vc.SubscriberConfig,n=new Vc.SignalIds;n.setSignalidList(this._subscriptions.map(o=>o.signalId));const t=new Vc.ClientId;return t.setId(this._clientId),i.setSignals(n),i.setClientid(t),i.setOnchange(this._subscriptions.some(o=>o.callbackOnlyOnChange)),i},this.broadcastSignalsToClientSubscribers=i=>{var d,f,h,p,g,v,y,m;const n=i.getSignalList().find(b=>b.getRaw_asU8().length!==0),t=((f=(d=n==null?void 0:n.getId())==null?void 0:d.getNamespace())==null?void 0:f.getName())??"",o=i.getSignalList().filter(b=>b.getRaw_asU8().length===0).map(b=>{const S=b.getId(),_=S==null?void 0:S.getName();return{value:b.getDouble()||b.getInteger(),namespace:t,name:_,timestampeUs:b.getTimestamp()}}),a=(g=(p=(h=i.getSignalList().find(b=>{var S;return((S=b==null?void 0:b.getId())==null?void 0:S.getNamespace())!==void 0}))==null?void 0:h.getId())==null?void 0:p.getNamespace())==null?void 0:g.getName(),l={name:((v=n==null?void 0:n.getId())==null?void 0:v.getName())??(o.length>0?o[0].name.split(".")[0]:(m=(y=i.getSignalList()[0])==null?void 0:y.getId())==null?void 0:m.getName()),namespace:t,timestampUs:(n==null?void 0:n.getTimestamp())??0,signals:o,value:n==null?void 0:n.getRaw_asU8()},u=this._subscriptions.filter(b=>{var S;return b.signalId.getName().split(".")[0]===l.name&&((S=b.signalId.getNamespace())==null?void 0:S.getName())===a}).map(b=>b.onSignalCallback);[...new Set(u)].forEach(b=>b(l))},this.authenticationHeaders=()=>({...this.accessToken!==void 0?{"x-api-key":this.accessToken}:{},deadline:""+(new Date().getMilliseconds()+5e3)}),this.refreshSubscriptions=()=>{if(this._retryTimeoutId!==void 0&&(clearTimeout(this._retryTimeoutId),this._retryTimeoutId=void 0),this._subscriptions.length>0){this._shouldAutoReconnect=!0;const i=this.createCombinedSubscribeConfig();this._stream!==void 0&&(console.debug("Killing old stream"),this._stream.cancel()),console.debug("Creating new stream, reapplying all subscriptions"),this._stream=this._networkServiceClient.subscribeToSignals(i,this.authenticationHeaders()),this._stream.on("data",n=>{try{this.broadcastSignalsToClientSubscribers(n)}catch{console.debug(`Received broker signal data, but an error occurred error=${JSON.stringify(n)}`)}}),this._stream.on("metadata",n=>{console.debug(`Received broker metadata=${JSON.stringify(n)}`)}),this._stream.on("end",()=>{console.debug("Signal subscription ended normally"),this._onSignalStreamEndCallback(),this._subscriptions.forEach(n=>{n.onEndCallback&&n.onEndCallback()}),this.scheduleReconnect()}),this._stream.on("status",n=>{console.debug(`Received broker status=${JSON.stringify(n)}`)}),this._stream.on("error",n=>{console.debug(`Received broker signal stream error=${JSON.stringify(n)}`),this._onSignalStreamErrorCallback(),this.scheduleReconnect()})}else this._shouldAutoReconnect=!1,this._stream!==void 0&&(console.debug("No subscriptions, killing stream"),this._stream.cancel(),this._stream=void 0)},this.applyPendingSubscriptions=()=>{this._subscriptions=[...this._pendingSubscriptions,...this._subscriptions],this._pendingSubscriptions=[],this.refreshSubscriptions()},this.removeSubscriptions=i=>{const n=new Set(i),t=this._subscriptions.filter(o=>n.has(o.subscriptionId)).length;this._subscriptions=this._subscriptions.filter(o=>!n.has(o.subscriptionId)),this._pendingSubscriptions=this._pendingSubscriptions.filter(o=>!n.has(o.subscriptionId)),t>0&&(console.debug(`Removed ${t} subscriptions, refreshing stream`),this.refreshSubscriptions())},this.addPendingSubscription=i=>{console.log("Adding pending subscription",i);for(const n of i.signalId){const t=new Vc.SignalId,o=new Vc.NameSpace;if(n.type==="signal")o.setName(n.frameId.namespace),t.setName(n.signalName),t.setNamespace(o);else if(n.type==="frame"){const s=n;o.setName(s.namespace),t.setName(s.name),t.setNamespace(o)}const a={signalId:t,subscriptionId:i.subscriptionId,onSignalCallback:i.onSignalCallback,callbackOnlyOnChange:!1,onEndCallback:i.onEndCallback};this._pendingSubscriptions.push(a)}return i.subscriptionId},this.brokerUrl=e,this._clientId=crypto.randomUUID(),this.systemClient=new Vc.SystemServicePromiseClient(this.brokerUrl),this._networkServiceClient=new Vc.NetworkServicePromiseClient(this.brokerUrl),this.accessToken=void 0,this._namespaces=[],this._frames=[]}listSignals(){throw new Error("Method not implemented.")}getBrokerUrl(){return this.brokerUrl}scheduleReconnect(){!this._shouldAutoReconnect||this._subscriptions.length===0||(console.debug(`Signal stream disconnected, reconnecting in ${Ohe}ms...`),this._retryTimeoutId=setTimeout(()=>{this._retryTimeoutId=void 0,this._shouldAutoReconnect&&this.refreshSubscriptions()},Ohe))}async init(){const e=await this.systemClient.getConfiguration(new Vc.Empty,this._authHeaders());this._namespaces=e.getNetworkinfoList().map(t=>{var o;return{name:((o=t.getNamespace())==null?void 0:o.getName())??"Unknown",type:t.getType()}});const i=this._namespaces.map(t=>this._getFrames(t.name)),n=await Promise.all(i);this._frames=n.flat()}listNamespaces(){return this._namespaces}listFrames(e){return e?this._frames.filter(i=>!e||i.namespace===e):this._frames}_authHeaders(){const e={};return this.accessToken&&(e["x-api-key"]=this.accessToken),e}_parseNamedValues(e){if(!e)return;const i={};return e.forEach((n,t)=>{i[t]=n}),Object.keys(i).length>0?i:void 0}async _getFrames(e){const i=new Vc.NameSpace;return i.setName(e),(await this.systemClient.listSignals(i,this._authHeaders())).getFrameList().map(o=>{var h;const a=o.getSignalinfo().getId(),s=o.getSignalinfo().getMetadata(),l=o.getChildinfoList(),u=a.getName(),c=((h=a==null?void 0:a.getNamespace())==null?void 0:h.getName())??e,d=s==null?void 0:s.getFrameid(),f={namespace:c,name:u,type:"frame",toString(){return`${c}:${u}`}};return{longName:()=>`${a.getNamespace().getName()}:${(a==null?void 0:a.getName())??"Unknown"}`,isBrokerFrame:()=>!0,frameId:d,id:f,name:u,namespace:c,description:s.getDescription(),max:s.getMax(),min:s.getMin(),unit:s.getUnit(),size:s.getSize(),isRaw:s.getIsraw(),factor:s.getFactor(),offset:s.getOffset(),cycleTime:s.getCycletime(),receivers:s.getReceiverList(),senders:s.getSenderList(),signals:l.map(p=>{const g=p.getMetadata(),v=p.getId().getName();return{id:{frameId:f,type:"signal",signalName:v,toString:()=>`${f.namespace}:${v}`},frameName:u,namespace:c,name:v,description:g==null?void 0:g.getDescription(),unit:g==null?void 0:g.getUnit(),min:g==null?void 0:g.getMin(),max:g==null?void 0:g.getMax(),namedValues:this._parseNamedValues(g==null?void 0:g.getNamedvaluesMap()),longName:()=>`${c}:${v}`}})}})}}function Wrt(r){const{connectedBroker:e,disconnectBroker:i}=xU(),[n,t]=G.useState({broker:void 0});return G.useEffect(()=>{if(!e){t({broker:void 0});return}let o=!1;return Urt(e.grpcUrl).then(a=>{o||t({broker:{frameDistributionService:new Hrt(e.grpcUrl),liveSignalService:a}})}).catch(a=>{i(),console.error("Failed to connect to LiveSignalService:",a),Wn.error("Error when connecting to RemotiveBroker",{autoClose:1e4})}),()=>{o=!0}},[e,i]),R.jsx(hz.Provider,{value:n,children:r.children})}function Grt(){const r=G.useContext(hz);if(!r)throw new Error("useLiveSignalService must be used within a BrokerConnectionContext");return r}function Cj(){const r=G.useContext(hz);if(!r)throw new Error("useLiveSignalService must be used within a BrokerConnectionContext");if(!r.broker)throw new Error("useLiveSignalService must be used with active BrokerConnection");return r.broker.liveSignalService}function pz(){const r=Cj();return G.useMemo(()=>r.listFrames(),[r])}function Yrt(){const r=pz();return G.useMemo(()=>r.flatMap(e=>e.signals),[r])}function $rt(){var e;const r=G.useContext(hz);if(!r)throw new Error("useFrameDistributionService must be used within a BrokerConnectionContext");return(e=r.broker)==null?void 0:e.frameDistributionService}class _F{constructor(e,i,n){this.subscriptionId=crypto.randomUUID(),this.signalId=e,this.onSignalCallback=i,this.onEndCallback=n}}function PF(r){"@babel/helpers - typeof";return PF=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},PF(r)}function qrt(r,e){if(PF(r)!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var n=i.call(r,e);if(PF(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function Xrt(r){var e=qrt(r,"string");return PF(e)=="symbol"?e:e+""}function gr(r,e,i){return(e=Xrt(e))in r?Object.defineProperty(r,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[e]=i,r}function Vwe(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var e6,Dhe;function Krt(){if(Dhe)return e6;Dhe=1;var r=function(i,n,t,o,a,s,l,u){if(!i){var c;if(n===void 0)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var d=[t,o,a,s,l,u],f=0;c=new Error(n.replace(/%s/g,function(){return d[f++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}};return e6=r,e6}var Zrt=Krt(),ou=Vwe(Zrt),On=G.createContext(null);function Jrt(){ou(!!G.useContext,"useGoogleMap is React hook and requires React version 16.8+");var r=G.useContext(On);return ou(!!r,"useGoogleMap needs a GoogleMap available up in the tree"),r}function Qrt(r,e,i){return Object.keys(r).reduce(function(t,o){return e(t,r[o],o)},i)}function eit(r,e){Object.keys(r).forEach(i=>e(r[i],i))}function tit(r,e,i,n){var t={},o=(a,s)=>{var l=i[s];l!==e[s]&&(t[s]=l,a(n,l))};return eit(r,o),t}function rit(r,e,i){var n=Qrt(i,function(o,a,s){return typeof r[s]=="function"&&o.push(google.maps.event.addListener(e,a,r[s])),o},[]);return n}function iit(r){google.maps.event.removeListener(r)}function eo(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];r.forEach(iit)}function Yn(r){var{updaterMap:e,eventMap:i,prevProps:n,nextProps:t,instance:o}=r,a=rit(t,o,i);return tit(e,n,t,o),a}var Rhe={onDblClick:"dblclick",onDragEnd:"dragend",onDragStart:"dragstart",onMapTypeIdChanged:"maptypeid_changed",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseDown:"mousedown",onMouseUp:"mouseup",onRightClick:"rightclick",onTilesLoaded:"tilesloaded",onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onDrag:"drag",onHeadingChanged:"heading_changed",onIdle:"idle",onProjectionChanged:"projection_changed",onResize:"resize",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed"},Mhe={extraMapTypes(r,e){e.forEach(function(n,t){r.mapTypes.set(String(t),n)})},center(r,e){r.setCenter(e)},clickableIcons(r,e){r.setClickableIcons(e)},heading(r,e){r.setHeading(e)},mapTypeId(r,e){r.setMapTypeId(e)},options(r,e){r.setOptions(e)},streetView(r,e){r.setStreetView(e)},tilt(r,e){r.setTilt(e)},zoom(r,e){r.setZoom(e)}};function nit(r){var{children:e,options:i,id:n,mapContainerStyle:t,mapContainerClassName:o,center:a,onClick:s,onDblClick:l,onDrag:u,onDragEnd:c,onDragStart:d,onMouseMove:f,onMouseOut:h,onMouseOver:p,onMouseDown:g,onMouseUp:v,onRightClick:y,onCenterChanged:m,onLoad:b,onUnmount:S}=r,[_,C]=G.useState(null),T=G.useRef(null),[x,A]=G.useState(null),[w,L]=G.useState(null),[k,D]=G.useState(null),[j,N]=G.useState(null),[V,W]=G.useState(null),[K,H]=G.useState(null),[U,I]=G.useState(null),[Q,Z]=G.useState(null),[ee,ie]=G.useState(null),[de,pe]=G.useState(null),[_e,Te]=G.useState(null),[De,Pe]=G.useState(null);return G.useEffect(()=>{i&&_!==null&&_.setOptions(i)},[_,i]),G.useEffect(()=>{_!==null&&typeof a<"u"&&_.setCenter(a)},[_,a]),G.useEffect(()=>{_&&l&&(w!==null&&google.maps.event.removeListener(w),L(google.maps.event.addListener(_,"dblclick",l)))},[l]),G.useEffect(()=>{_&&c&&(k!==null&&google.maps.event.removeListener(k),D(google.maps.event.addListener(_,"dragend",c)))},[c]),G.useEffect(()=>{_&&d&&(j!==null&&google.maps.event.removeListener(j),N(google.maps.event.addListener(_,"dragstart",d)))},[d]),G.useEffect(()=>{_&&g&&(V!==null&&google.maps.event.removeListener(V),W(google.maps.event.addListener(_,"mousedown",g)))},[g]),G.useEffect(()=>{_&&f&&(K!==null&&google.maps.event.removeListener(K),H(google.maps.event.addListener(_,"mousemove",f)))},[f]),G.useEffect(()=>{_&&h&&(U!==null&&google.maps.event.removeListener(U),I(google.maps.event.addListener(_,"mouseout",h)))},[h]),G.useEffect(()=>{_&&p&&(Q!==null&&google.maps.event.removeListener(Q),Z(google.maps.event.addListener(_,"mouseover",p)))},[p]),G.useEffect(()=>{_&&v&&(ee!==null&&google.maps.event.removeListener(ee),ie(google.maps.event.addListener(_,"mouseup",v)))},[v]),G.useEffect(()=>{_&&y&&(de!==null&&google.maps.event.removeListener(de),pe(google.maps.event.addListener(_,"rightclick",y)))},[y]),G.useEffect(()=>{_&&s&&(_e!==null&&google.maps.event.removeListener(_e),Te(google.maps.event.addListener(_,"click",s)))},[s]),G.useEffect(()=>{_&&u&&(De!==null&&google.maps.event.removeListener(De),Pe(google.maps.event.addListener(_,"drag",u)))},[u]),G.useEffect(()=>{_&&m&&(x!==null&&google.maps.event.removeListener(x),A(google.maps.event.addListener(_,"center_changed",m)))},[s]),G.useEffect(()=>{var Ee=T.current===null?null:new google.maps.Map(T.current,i);return C(Ee),Ee!==null&&b&&b(Ee),()=>{Ee!==null&&S&&S(Ee)}},[]),R.jsx("div",{id:n,ref:T,style:t,className:o,children:R.jsx(On.Provider,{value:_,children:_!==null?e:null})})}G.memo(nit);class oit extends G.PureComponent{constructor(){super(...arguments),gr(this,"state",{map:null}),gr(this,"registeredEvents",[]),gr(this,"mapRef",null),gr(this,"getInstance",()=>this.mapRef===null?null:new google.maps.Map(this.mapRef,this.props.options)),gr(this,"panTo",e=>{var i=this.getInstance();i&&i.panTo(e)}),gr(this,"setMapCallback",()=>{this.state.map!==null&&this.props.onLoad&&this.props.onLoad(this.state.map)}),gr(this,"getRef",e=>{this.mapRef=e})}componentDidMount(){var e=this.getInstance();this.registeredEvents=Yn({updaterMap:Mhe,eventMap:Rhe,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{map:e}},this.setMapCallback)}componentDidUpdate(e){this.state.map!==null&&(eo(this.registeredEvents),this.registeredEvents=Yn({updaterMap:Mhe,eventMap:Rhe,prevProps:e,nextProps:this.props,instance:this.state.map}))}componentWillUnmount(){this.state.map!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.map),eo(this.registeredEvents))}render(){return R.jsx("div",{id:this.props.id,ref:this.getRef,style:this.props.mapContainerStyle,className:this.props.mapContainerClassName,children:R.jsx(On.Provider,{value:this.state.map,children:this.state.map!==null?this.props.children:null})})}}function Lhe(r,e,i,n,t,o,a){try{var s=r[o](a),l=s.value}catch(u){return void i(u)}s.done?e(l):Promise.resolve(l).then(n,t)}function Hwe(r){return function(){var e=this,i=arguments;return new Promise(function(n,t){var o=r.apply(e,i);function a(l){Lhe(o,n,t,a,s,"next",l)}function s(l){Lhe(o,n,t,a,s,"throw",l)}a(void 0)})}}function Uwe(r){var{googleMapsApiKey:e,googleMapsClientId:i,version:n="weekly",language:t,region:o,libraries:a,channel:s,mapIds:l,authReferrerPolicy:u,apiUrl:c="https://maps.googleapis.com"}=r,d=[];return ou(e&&i||!(e&&i),"You need to specify either googleMapsApiKey or googleMapsClientId for @react-google-maps/api load script to work. You cannot use both at the same time."),e?d.push("key=".concat(e)):i&&d.push("client=".concat(i)),n&&d.push("v=".concat(n)),t&&d.push("language=".concat(t)),o&&d.push("region=".concat(o)),a&&a.length&&d.push("libraries=".concat(a.sort().join(","))),s&&d.push("channel=".concat(s)),l&&l.length&&d.push("map_ids=".concat(l.join(","))),u&&d.push("auth_referrer_policy=".concat(u)),d.push("loading=async"),d.push("callback=initMap"),"".concat(c,"/maps/api/js?").concat(d.join("&"))}var wS=typeof document<"u";function zwe(r){var{url:e,id:i,nonce:n}=r;return wS?new Promise(function(o,a){var s=document.getElementById(i),l=window;if(s){var u=s.getAttribute("data-state");if(s.src===e&&u!=="error"){if(u==="ready")return o(i);var c=l.initMap,d=s.onerror;l.initMap=function(){c&&c(),o(i)},s.onerror=function(h){d&&d(h),a(h)};return}else s.remove()}var f=document.createElement("script");f.type="text/javascript",f.src=e,f.id=i,f.async=!0,f.nonce=n||"",f.onerror=function(p){f.setAttribute("data-state","error"),a(p)},l.initMap=function(){f.setAttribute("data-state","ready"),o(i)},document.head.appendChild(f)}).catch(t=>{throw console.error("injectScript error: ",t),t}):Promise.reject(new Error("document is undefined"))}function khe(r){var e=r.href;return e&&(e.indexOf("https://fonts.googleapis.com/css?family=Roboto")===0||e.indexOf("https://fonts.googleapis.com/css?family=Google+Sans+Text")===0)?!0:r.tagName.toLowerCase()==="style"&&r.styleSheet&&r.styleSheet.cssText&&r.styleSheet.cssText.replace(`\r
`,"").indexOf(".gm-style")===0?(r.styleSheet.cssText="",!0):r.tagName.toLowerCase()==="style"&&r.innerHTML&&r.innerHTML.replace(`\r
`,"").indexOf(".gm-style")===0?(r.innerHTML="",!0):r.tagName.toLowerCase()==="style"&&!r.styleSheet&&!r.innerHTML}function o7(){var r=document.getElementsByTagName("head")[0];if(r){var e=r.insertBefore.bind(r);r.insertBefore=function(t,o){return khe(t)||Reflect.apply(e,r,[t,o]),t};var i=r.appendChild.bind(r);r.appendChild=function(t){return khe(t)||Reflect.apply(i,r,[t]),t}}}var Y2=!1;function Wwe(){return R.jsx("div",{children:"Loading..."})}var CF={id:"script-loader",version:"weekly"};class ait extends G.PureComponent{constructor(){super(...arguments),gr(this,"check",null),gr(this,"state",{loaded:!1}),gr(this,"cleanupCallback",()=>{delete window.google.maps,this.injectScript()}),gr(this,"isCleaningUp",Hwe(function*(){function e(i){if(!Y2)i();else if(wS)var n=window.setInterval(function(){Y2||(window.clearInterval(n),i())},1)}return new Promise(e)})),gr(this,"cleanup",()=>{Y2=!0;var e=document.getElementById(this.props.id);e&&e.parentNode&&e.parentNode.removeChild(e),Array.prototype.slice.call(document.getElementsByTagName("script")).filter(function(n){return typeof n.src=="string"&&n.src.includes("maps.googleapis")}).forEach(function(n){n.parentNode&&n.parentNode.removeChild(n)}),Array.prototype.slice.call(document.getElementsByTagName("link")).filter(function(n){return n.href==="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Google+Sans"}).forEach(function(n){n.parentNode&&n.parentNode.removeChild(n)}),Array.prototype.slice.call(document.getElementsByTagName("style")).filter(function(n){return n.innerText!==void 0&&n.innerText.length>0&&n.innerText.includes(".gm-")}).forEach(function(n){n.parentNode&&n.parentNode.removeChild(n)})}),gr(this,"injectScript",()=>{this.props.preventGoogleFontsLoading&&o7(),ou(!!this.props.id,'LoadScript requires "id" prop to be a string: %s',this.props.id);var e={id:this.props.id,nonce:this.props.nonce,url:Uwe(this.props)};zwe(e).then(()=>{this.props.onLoad&&this.props.onLoad(),this.setState(function(){return{loaded:!0}})}).catch(i=>{this.props.onError&&this.props.onError(i),console.error(`
          There has been an Error with loading Google Maps API script, please check that you provided correct google API key (`.concat(this.props.googleMapsApiKey||"-",") or Client ID (").concat(this.props.googleMapsClientId||"-",`) to <LoadScript />
          Otherwise it is a Network issue.
        `))})}),gr(this,"getRef",e=>{this.check=e})}componentDidMount(){if(wS){if(window.google&&window.google.maps&&!Y2){console.error("google api is already presented");return}this.isCleaningUp().then(this.injectScript).catch(function(i){console.error("Error at injecting script after cleaning up: ",i)})}}componentDidUpdate(e){this.props.libraries!==e.libraries&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),wS&&e.language!==this.props.language&&(this.cleanup(),this.setState(function(){return{loaded:!1}},this.cleanupCallback))}componentWillUnmount(){if(wS){this.cleanup();var e=()=>{this.check||(delete window.google,Y2=!1)};window.setTimeout(e,1),this.props.onUnmount&&this.props.onUnmount()}}render(){return R.jsxs(R.Fragment,{children:[R.jsx("div",{ref:this.getRef}),this.state.loaded?this.props.children:this.props.loadingElement||R.jsx(Wwe,{})]})}}gr(ait,"defaultProps",CF);function sit(r,e){if(r==null)return{};var i={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(e.includes(n))continue;i[n]=r[n]}return i}function a7(r,e){if(r==null)return{};var i,n,t=sit(r,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);for(n=0;n<o.length;n++)i=o[n],e.includes(i)||{}.propertyIsEnumerable.call(r,i)&&(t[i]=r[i])}return t}var Ihe;function lit(r){var{id:e=CF.id,version:i=CF.version,nonce:n,googleMapsApiKey:t,googleMapsClientId:o,language:a,region:s,libraries:l,preventGoogleFontsLoading:u,channel:c,mapIds:d,authReferrerPolicy:f,apiUrl:h="https://maps.googleapis.com"}=r,p=G.useRef(!1),[g,v]=G.useState(!1),[y,m]=G.useState(void 0);G.useEffect(function(){return p.current=!0,()=>{p.current=!1}},[]),G.useEffect(function(){wS&&u&&o7()},[u]),G.useEffect(function(){g&&ou(!!window.google,"useLoadScript was marked as loaded, but window.google is not present. Something went wrong.")},[g]);var b=Uwe({version:i,googleMapsApiKey:t,googleMapsClientId:o,language:a,region:s,libraries:l,channel:c,mapIds:d,authReferrerPolicy:f,apiUrl:h});G.useEffect(function(){if(!wS)return;function C(){p.current&&(v(!0),Ihe=b)}if(window.google&&window.google.maps&&Ihe===b){C();return}zwe({id:e,url:b,nonce:n}).then(C).catch(function(x){p.current&&m(x),console.warn(`
        There has been an Error with loading Google Maps API script, please check that you provided correct google API key (`.concat(t||"-",") or Client ID (").concat(o||"-",`)
        Otherwise it is a Network issue.
      `)),console.error(x)})},[e,b,n]);var S=G.useRef(void 0);return G.useEffect(function(){S.current&&l!==S.current&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),S.current=l},[l]),{isLoaded:g,loadError:y,url:b}}var uit=["loadingElement","onLoad","onError","onUnmount","children"],cit=R.jsx(Wwe,{});function dit(r){var{loadingElement:e,onLoad:i,onError:n,onUnmount:t,children:o}=r,a=a7(r,uit),{isLoaded:s,loadError:l}=lit(a);return G.useEffect(function(){s&&typeof i=="function"&&i()},[s,i]),G.useEffect(function(){l&&typeof n=="function"&&n(l)},[l,n]),G.useEffect(function(){return()=>{t&&t()}},[t]),s?o:e||cit}G.memo(dit);function fit(r,e,i,n){function t(o){return o instanceof i?o:new i(function(a){a(o)})}return new(i||(i=Promise))(function(o,a){function s(c){try{u(n.next(c))}catch(d){a(d)}}function l(c){try{u(n.throw(c))}catch(d){a(d)}}function u(c){c.done?o(c.value):t(c.value).then(s,l)}u((n=n.apply(r,[])).next())})}function hit(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var pit=function r(e,i){if(e===i)return!0;if(e&&i&&typeof e=="object"&&typeof i=="object"){if(e.constructor!==i.constructor)return!1;var n,t,o;if(Array.isArray(e)){if(n=e.length,n!=i.length)return!1;for(t=n;t--!==0;)if(!r(e[t],i[t]))return!1;return!0}if(e.constructor===RegExp)return e.source===i.source&&e.flags===i.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===i.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===i.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(i).length)return!1;for(t=n;t--!==0;)if(!Object.prototype.hasOwnProperty.call(i,o[t]))return!1;for(t=n;t--!==0;){var a=o[t];if(!r(e[a],i[a]))return!1}return!0}return e!==e&&i!==i},git=hit(pit),Nhe="__googleMapsScriptId",hR;(function(r){r[r.INITIALIZED=0]="INITIALIZED",r[r.LOADING=1]="LOADING",r[r.SUCCESS=2]="SUCCESS",r[r.FAILURE=3]="FAILURE"})(hR||(hR={}));class Ww{constructor(e){var{apiKey:i,authReferrerPolicy:n,channel:t,client:o,id:a=Nhe,language:s,libraries:l=[],mapIds:u,nonce:c,region:d,retries:f=3,url:h="https://maps.googleapis.com/maps/api/js",version:p}=e;if(this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=i,this.authReferrerPolicy=n,this.channel=t,this.client=o,this.id=a||Nhe,this.language=s,this.libraries=l,this.mapIds=u,this.nonce=c,this.region=d,this.retries=f,this.url=h,this.version=p,Ww.instance){if(!git(this.options,Ww.instance.options))throw new Error("Loader must not be called again with different options. ".concat(JSON.stringify(this.options)," !== ").concat(JSON.stringify(Ww.instance.options)));return Ww.instance}Ww.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?hR.FAILURE:this.done?hR.SUCCESS:this.loading?hR.LOADING:hR.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){var e=this.url;return e+="?callback=__googleMapsCallback&loading=async",this.apiKey&&(e+="&key=".concat(this.apiKey)),this.channel&&(e+="&channel=".concat(this.channel)),this.client&&(e+="&client=".concat(this.client)),this.libraries.length>0&&(e+="&libraries=".concat(this.libraries.join(","))),this.language&&(e+="&language=".concat(this.language)),this.region&&(e+="&region=".concat(this.region)),this.version&&(e+="&v=".concat(this.version)),this.mapIds&&(e+="&map_ids=".concat(this.mapIds.join(","))),this.authReferrerPolicy&&(e+="&auth_referrer_policy=".concat(this.authReferrerPolicy)),e}deleteScript(){var e=document.getElementById(this.id);e&&e.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise((e,i)=>{this.loadCallback(n=>{n?i(n.error):e(window.google)})})}importLibrary(e){return this.execute(),google.maps.importLibrary(e)}loadCallback(e){this.callbacks.push(e),this.execute()}setScript(){var e,i;if(document.getElementById(this.id)){this.callback();return}var n={key:this.apiKey,channel:this.channel,client:this.client,libraries:this.libraries.length&&this.libraries,v:this.version,mapIds:this.mapIds,language:this.language,region:this.region,authReferrerPolicy:this.authReferrerPolicy};Object.keys(n).forEach(o=>!n[o]&&delete n[o]),!((i=(e=window==null?void 0:window.google)===null||e===void 0?void 0:e.maps)===null||i===void 0)&&i.importLibrary||(o=>{var a,s,l,u="The Google Maps JavaScript API",c="google",d="importLibrary",f="__ib__",h=document,p=window;p=p[c]||(p[c]={});var g=p.maps||(p.maps={}),v=new Set,y=new URLSearchParams,m=()=>a||(a=new Promise((b,S)=>fit(this,void 0,void 0,function*(){var _;yield s=h.createElement("script"),s.id=this.id,y.set("libraries",[...v]+"");for(l in o)y.set(l.replace(/[A-Z]/g,C=>"_"+C[0].toLowerCase()),o[l]);y.set("callback",c+".maps."+f),s.src=this.url+"?"+y,g[f]=b,s.onerror=()=>a=S(Error(u+" could not load.")),s.nonce=this.nonce||((_=h.querySelector("script[nonce]"))===null||_===void 0?void 0:_.nonce)||"",h.head.append(s)})));g[d]?console.warn(u+" only loads once. Ignoring:",o):g[d]=function(b){for(var S=arguments.length,_=new Array(S>1?S-1:0),C=1;C<S;C++)_[C-1]=arguments[C];return v.add(b)&&m().then(()=>g[d](b,..._))}})(n);var t=this.libraries.map(o=>this.importLibrary(o));t.length||t.push(this.importLibrary("core")),Promise.all(t).then(()=>this.callback(),o=>{var a=new ErrorEvent("error",{error:o});this.loadErrorCallback(a)})}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(e){if(this.errors.push(e),this.errors.length<=this.retries){var i=this.errors.length*Math.pow(2,this.errors.length);console.error("Failed to load Google Maps script, retrying in ".concat(i," ms.")),setTimeout(()=>{this.deleteScript(),this.setScript()},i)}else this.onerrorEvent=e,this.callback()}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach(e=>{e(this.onerrorEvent)}),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),!this.loading)if(this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version){console.warn("Google Maps already loaded outside @googlemaps/js-api-loader. This may result in undesirable behavior as options and script parameters may not match."),this.callback();return}this.loading=!0,this.setScript()}}}var vit=["maps"];function yit(r){var{id:e=CF.id,version:i=CF.version,nonce:n,googleMapsApiKey:t,language:o,region:a,libraries:s=vit,preventGoogleFontsLoading:l,mapIds:u,authReferrerPolicy:c}=r,d=G.useRef(!1),[f,h]=G.useState(!1),[p,g]=G.useState(void 0);G.useEffect(function(){return d.current=!0,()=>{d.current=!1}},[]);var v=G.useMemo(()=>new Ww({id:e,apiKey:t,version:i,libraries:s,language:o||"en",region:a||"US",mapIds:u||[],nonce:n||"",authReferrerPolicy:c||"origin"}),[e,t,i,s,o,a,u,n,c]);G.useEffect(function(){f||v.load().then(()=>{d.current&&h(!0)}).catch(b=>{g(b)})},[]),G.useEffect(()=>{wS&&l&&o7()},[l]);var y=G.useRef();return G.useEffect(()=>{y.current&&s!==y.current&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),y.current=s},[s]),{isLoaded:f,loadError:p}}function Fhe(r,e){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),i.push.apply(i,n)}return i}function V3(r){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?Fhe(Object(i),!0).forEach(function(n){gr(r,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):Fhe(Object(i)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(i,n))})}return r}var jhe={},Bhe={options(r,e){r.setOptions(e)}};function mit(r){var{options:e,onLoad:i,onUnmount:n}=r,t=G.useContext(On),[o,a]=G.useState(null);return G.useEffect(()=>{o!==null&&o.setMap(t)},[t]),G.useEffect(()=>{e&&o!==null&&o.setOptions(e)},[o,e]),G.useEffect(()=>{var s=new google.maps.TrafficLayer(V3(V3({},e),{},{map:t}));return a(s),i&&i(s),()=>{o!==null&&(n&&n(o),o.setMap(null))}},[]),null}G.memo(mit);class bit extends G.PureComponent{constructor(){super(...arguments),gr(this,"state",{trafficLayer:null}),gr(this,"setTrafficLayerCallback",()=>{this.state.trafficLayer!==null&&this.props.onLoad&&this.props.onLoad(this.state.trafficLayer)}),gr(this,"registeredEvents",[])}componentDidMount(){var e=new google.maps.TrafficLayer(V3(V3({},this.props.options),{},{map:this.context}));this.registeredEvents=Yn({updaterMap:Bhe,eventMap:jhe,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{trafficLayer:e}},this.setTrafficLayerCallback)}componentDidUpdate(e){this.state.trafficLayer!==null&&(eo(this.registeredEvents),this.registeredEvents=Yn({updaterMap:Bhe,eventMap:jhe,prevProps:e,nextProps:this.props,instance:this.state.trafficLayer}))}componentWillUnmount(){this.state.trafficLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.trafficLayer),eo(this.registeredEvents),this.state.trafficLayer.setMap(null))}render(){return null}}gr(bit,"contextType",On);function Sit(r){var{onLoad:e,onUnmount:i}=r,n=G.useContext(On),[t,o]=G.useState(null);return G.useEffect(()=>{t!==null&&t.setMap(n)},[n]),G.useEffect(()=>{var a=new google.maps.BicyclingLayer;return o(a),a.setMap(n),e&&e(a),()=>{a!==null&&(i&&i(a),a.setMap(null))}},[]),null}G.memo(Sit);class _it extends G.PureComponent{constructor(){super(...arguments),gr(this,"state",{bicyclingLayer:null}),gr(this,"setBicyclingLayerCallback",()=>{this.state.bicyclingLayer!==null&&(this.state.bicyclingLayer.setMap(this.context),this.props.onLoad&&this.props.onLoad(this.state.bicyclingLayer))})}componentDidMount(){var e=new google.maps.BicyclingLayer;this.setState(()=>({bicyclingLayer:e}),this.setBicyclingLayerCallback)}componentWillUnmount(){this.state.bicyclingLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.bicyclingLayer),this.state.bicyclingLayer.setMap(null))}render(){return null}}gr(_it,"contextType",On);function Pit(r){var{onLoad:e,onUnmount:i}=r,n=G.useContext(On),[t,o]=G.useState(null);return G.useEffect(()=>{t!==null&&t.setMap(n)},[n]),G.useEffect(()=>{var a=new google.maps.TransitLayer;return o(a),a.setMap(n),e&&e(a),()=>{t!==null&&(i&&i(t),t.setMap(null))}},[]),null}G.memo(Pit);class Cit extends G.PureComponent{constructor(){super(...arguments),gr(this,"state",{transitLayer:null}),gr(this,"setTransitLayerCallback",()=>{this.state.transitLayer!==null&&(this.state.transitLayer.setMap(this.context),this.props.onLoad&&this.props.onLoad(this.state.transitLayer))})}componentDidMount(){var e=new google.maps.TransitLayer;this.setState(function(){return{transitLayer:e}},this.setTransitLayerCallback)}componentWillUnmount(){this.state.transitLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.transitLayer),this.state.transitLayer.setMap(null))}render(){return null}}gr(Cit,"contextType",On);function Vhe(r,e){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),i.push.apply(i,n)}return i}function H3(r){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?Vhe(Object(i),!0).forEach(function(n){gr(r,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):Vhe(Object(i)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(i,n))})}return r}var Hhe={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},Uhe={drawingMode(r,e){r.setDrawingMode(e)},options(r,e){r.setOptions(e)}};function Tit(r){var{options:e,drawingMode:i,onCircleComplete:n,onMarkerComplete:t,onOverlayComplete:o,onPolygonComplete:a,onPolylineComplete:s,onRectangleComplete:l,onLoad:u,onUnmount:c}=r,d=G.useContext(On),[f,h]=G.useState(null),[p,g]=G.useState(null),[v,y]=G.useState(null),[m,b]=G.useState(null),[S,_]=G.useState(null),[C,T]=G.useState(null),[x,A]=G.useState(null);return G.useEffect(()=>{f!==null&&f.setMap(d)},[d]),G.useEffect(()=>{e&&f!==null&&f.setOptions(e)},[f,e]),G.useEffect(()=>{f!==null&&f.setDrawingMode(i??null)},[f,i]),G.useEffect(()=>{f&&n&&(p!==null&&google.maps.event.removeListener(p),g(google.maps.event.addListener(f,"circlecomplete",n)))},[f,n]),G.useEffect(()=>{f&&t&&(v!==null&&google.maps.event.removeListener(v),y(google.maps.event.addListener(f,"markercomplete",t)))},[f,t]),G.useEffect(()=>{f&&o&&(m!==null&&google.maps.event.removeListener(m),b(google.maps.event.addListener(f,"overlaycomplete",o)))},[f,o]),G.useEffect(()=>{f&&a&&(S!==null&&google.maps.event.removeListener(S),_(google.maps.event.addListener(f,"polygoncomplete",a)))},[f,a]),G.useEffect(()=>{f&&s&&(C!==null&&google.maps.event.removeListener(C),T(google.maps.event.addListener(f,"polylinecomplete",s)))},[f,s]),G.useEffect(()=>{f&&l&&(x!==null&&google.maps.event.removeListener(x),A(google.maps.event.addListener(f,"rectanglecomplete",l)))},[f,l]),G.useEffect(()=>{ou(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing);var w=new google.maps.drawing.DrawingManager(H3(H3({},e),{},{map:d}));return i&&w.setDrawingMode(i),n&&g(google.maps.event.addListener(w,"circlecomplete",n)),t&&y(google.maps.event.addListener(w,"markercomplete",t)),o&&b(google.maps.event.addListener(w,"overlaycomplete",o)),a&&_(google.maps.event.addListener(w,"polygoncomplete",a)),s&&T(google.maps.event.addListener(w,"polylinecomplete",s)),l&&A(google.maps.event.addListener(w,"rectanglecomplete",l)),h(w),u&&u(w),()=>{f!==null&&(p&&google.maps.event.removeListener(p),v&&google.maps.event.removeListener(v),m&&google.maps.event.removeListener(m),S&&google.maps.event.removeListener(S),C&&google.maps.event.removeListener(C),x&&google.maps.event.removeListener(x),c&&c(f),f.setMap(null))}},[]),null}G.memo(Tit);class xit extends G.PureComponent{constructor(e){super(e),gr(this,"registeredEvents",[]),gr(this,"state",{drawingManager:null}),gr(this,"setDrawingManagerCallback",()=>{this.state.drawingManager!==null&&this.props.onLoad&&this.props.onLoad(this.state.drawingManager)}),ou(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing)}componentDidMount(){var e=new google.maps.drawing.DrawingManager(H3(H3({},this.props.options),{},{map:this.context}));this.registeredEvents=Yn({updaterMap:Uhe,eventMap:Hhe,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{drawingManager:e}},this.setDrawingManagerCallback)}componentDidUpdate(e){this.state.drawingManager!==null&&(eo(this.registeredEvents),this.registeredEvents=Yn({updaterMap:Uhe,eventMap:Hhe,prevProps:e,nextProps:this.props,instance:this.state.drawingManager}))}componentWillUnmount(){this.state.drawingManager!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.drawingManager),eo(this.registeredEvents),this.state.drawingManager.setMap(null))}render(){return null}}gr(xit,"contextType",On);function zhe(r,e){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),i.push.apply(i,n)}return i}function wR(r){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?zhe(Object(i),!0).forEach(function(n){gr(r,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):zhe(Object(i)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(i,n))})}return r}var Whe={onAnimationChanged:"animation_changed",onClick:"click",onClickableChanged:"clickable_changed",onCursorChanged:"cursor_changed",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDraggableChanged:"draggable_changed",onDragStart:"dragstart",onFlatChanged:"flat_changed",onIconChanged:"icon_changed",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onPositionChanged:"position_changed",onRightClick:"rightclick",onShapeChanged:"shape_changed",onTitleChanged:"title_changed",onVisibleChanged:"visible_changed",onZindexChanged:"zindex_changed"},Ghe={animation(r,e){r.setAnimation(e)},clickable(r,e){r.setClickable(e)},cursor(r,e){r.setCursor(e)},draggable(r,e){r.setDraggable(e)},icon(r,e){r.setIcon(e)},label(r,e){r.setLabel(e)},map(r,e){r.setMap(e)},opacity(r,e){r.setOpacity(e)},options(r,e){r.setOptions(e)},position(r,e){r.setPosition(e)},shape(r,e){r.setShape(e)},title(r,e){r.setTitle(e)},visible(r,e){r.setVisible(e)},zIndex(r,e){r.setZIndex(e)}},U3={};function Eit(r){var{position:e,options:i,clusterer:n,noClustererRedraw:t,children:o,draggable:a,visible:s,animation:l,clickable:u,cursor:c,icon:d,label:f,opacity:h,shape:p,title:g,zIndex:v,onClick:y,onDblClick:m,onDrag:b,onDragEnd:S,onDragStart:_,onMouseOut:C,onMouseOver:T,onMouseUp:x,onMouseDown:A,onRightClick:w,onClickableChanged:L,onCursorChanged:k,onAnimationChanged:D,onDraggableChanged:j,onFlatChanged:N,onIconChanged:V,onPositionChanged:W,onShapeChanged:K,onTitleChanged:H,onVisibleChanged:U,onZindexChanged:I,onLoad:Q,onUnmount:Z}=r,ee=G.useContext(On),[ie,de]=G.useState(null),[pe,_e]=G.useState(null),[Te,De]=G.useState(null),[Pe,Ee]=G.useState(null),[Re,je]=G.useState(null),[Ke,ot]=G.useState(null),[We,xe]=G.useState(null),[ve,he]=G.useState(null),[Se,be]=G.useState(null),[ke,qe]=G.useState(null),[rt,St]=G.useState(null),[xt,It]=G.useState(null),[Zt,ct]=G.useState(null),[Qe,Et]=G.useState(null),[Gt,Xe]=G.useState(null),[Vt,lr]=G.useState(null),[Jt,kr]=G.useState(null),[qt,zt]=G.useState(null),[jr,Be]=G.useState(null),[Ge,ut]=G.useState(null),[Pt,Qt]=G.useState(null),[wr,Xr]=G.useState(null);G.useEffect(()=>{ie!==null&&ie.setMap(ee)},[ee]),G.useEffect(()=>{typeof i<"u"&&ie!==null&&ie.setOptions(i)},[ie,i]),G.useEffect(()=>{typeof a<"u"&&ie!==null&&ie.setDraggable(a)},[ie,a]),G.useEffect(()=>{e&&ie!==null&&ie.setPosition(e)},[ie,e]),G.useEffect(()=>{typeof s<"u"&&ie!==null&&ie.setVisible(s)},[ie,s]),G.useEffect(()=>{ie==null||ie.setAnimation(l)},[ie,l]),G.useEffect(()=>{ie&&u!==void 0&&ie.setClickable(u)},[ie,u]),G.useEffect(()=>{ie&&c!==void 0&&ie.setCursor(c)},[ie,c]),G.useEffect(()=>{ie&&d!==void 0&&ie.setIcon(d)},[ie,d]),G.useEffect(()=>{ie&&f!==void 0&&ie.setLabel(f)},[ie,f]),G.useEffect(()=>{ie&&h!==void 0&&ie.setOpacity(h)},[ie,h]),G.useEffect(()=>{ie&&p!==void 0&&ie.setShape(p)},[ie,p]),G.useEffect(()=>{ie&&g!==void 0&&ie.setTitle(g)},[ie,g]),G.useEffect(()=>{ie&&v!==void 0&&ie.setZIndex(v)},[ie,v]),G.useEffect(()=>{ie&&m&&(pe!==null&&google.maps.event.removeListener(pe),_e(google.maps.event.addListener(ie,"dblclick",m)))},[m]),G.useEffect(()=>{ie&&S&&(Te!==null&&google.maps.event.removeListener(Te),De(google.maps.event.addListener(ie,"dragend",S)))},[S]),G.useEffect(()=>{ie&&_&&(Pe!==null&&google.maps.event.removeListener(Pe),Ee(google.maps.event.addListener(ie,"dragstart",_)))},[_]),G.useEffect(()=>{ie&&A&&(Re!==null&&google.maps.event.removeListener(Re),je(google.maps.event.addListener(ie,"mousedown",A)))},[A]),G.useEffect(()=>{ie&&C&&(Ke!==null&&google.maps.event.removeListener(Ke),ot(google.maps.event.addListener(ie,"mouseout",C)))},[C]),G.useEffect(()=>{ie&&T&&(We!==null&&google.maps.event.removeListener(We),xe(google.maps.event.addListener(ie,"mouseover",T)))},[T]),G.useEffect(()=>{ie&&x&&(ve!==null&&google.maps.event.removeListener(ve),he(google.maps.event.addListener(ie,"mouseup",x)))},[x]),G.useEffect(()=>{ie&&w&&(Se!==null&&google.maps.event.removeListener(Se),be(google.maps.event.addListener(ie,"rightclick",w)))},[w]),G.useEffect(()=>{ie&&y&&(ke!==null&&google.maps.event.removeListener(ke),qe(google.maps.event.addListener(ie,"click",y)))},[y]),G.useEffect(()=>{ie&&b&&(rt!==null&&google.maps.event.removeListener(rt),St(google.maps.event.addListener(ie,"drag",b)))},[b]),G.useEffect(()=>{ie&&L&&(xt!==null&&google.maps.event.removeListener(xt),It(google.maps.event.addListener(ie,"clickable_changed",L)))},[L]),G.useEffect(()=>{ie&&k&&(Zt!==null&&google.maps.event.removeListener(Zt),ct(google.maps.event.addListener(ie,"cursor_changed",k)))},[k]),G.useEffect(()=>{ie&&D&&(Qe!==null&&google.maps.event.removeListener(Qe),Et(google.maps.event.addListener(ie,"animation_changed",D)))},[D]),G.useEffect(()=>{ie&&j&&(Gt!==null&&google.maps.event.removeListener(Gt),Xe(google.maps.event.addListener(ie,"draggable_changed",j)))},[j]),G.useEffect(()=>{ie&&N&&(Vt!==null&&google.maps.event.removeListener(Vt),lr(google.maps.event.addListener(ie,"flat_changed",N)))},[N]),G.useEffect(()=>{ie&&V&&(Jt!==null&&google.maps.event.removeListener(Jt),kr(google.maps.event.addListener(ie,"icon_changed",V)))},[V]),G.useEffect(()=>{ie&&W&&(qt!==null&&google.maps.event.removeListener(qt),zt(google.maps.event.addListener(ie,"position_changed",W)))},[W]),G.useEffect(()=>{ie&&K&&(jr!==null&&google.maps.event.removeListener(jr),Be(google.maps.event.addListener(ie,"shape_changed",K)))},[K]),G.useEffect(()=>{ie&&H&&(Ge!==null&&google.maps.event.removeListener(Ge),ut(google.maps.event.addListener(ie,"title_changed",H)))},[H]),G.useEffect(()=>{ie&&U&&(Pt!==null&&google.maps.event.removeListener(Pt),Qt(google.maps.event.addListener(ie,"visible_changed",U)))},[U]),G.useEffect(()=>{ie&&I&&(wr!==null&&google.maps.event.removeListener(wr),Xr(google.maps.event.addListener(ie,"zindex_changed",I)))},[I]),G.useEffect(()=>{var Qr=wR(wR(wR({},i||U3),n?U3:{map:ee}),{},{position:e}),Ur=new google.maps.Marker(Qr);return n?n.addMarker(Ur,!!t):Ur.setMap(ee),e&&Ur.setPosition(e),typeof s<"u"&&Ur.setVisible(s),typeof a<"u"&&Ur.setDraggable(a),typeof u<"u"&&Ur.setClickable(u),typeof c=="string"&&Ur.setCursor(c),d&&Ur.setIcon(d),typeof f<"u"&&Ur.setLabel(f),typeof h<"u"&&Ur.setOpacity(h),p&&Ur.setShape(p),typeof g=="string"&&Ur.setTitle(g),typeof v=="number"&&Ur.setZIndex(v),m&&_e(google.maps.event.addListener(Ur,"dblclick",m)),S&&De(google.maps.event.addListener(Ur,"dragend",S)),_&&Ee(google.maps.event.addListener(Ur,"dragstart",_)),A&&je(google.maps.event.addListener(Ur,"mousedown",A)),C&&ot(google.maps.event.addListener(Ur,"mouseout",C)),T&&xe(google.maps.event.addListener(Ur,"mouseover",T)),x&&he(google.maps.event.addListener(Ur,"mouseup",x)),w&&be(google.maps.event.addListener(Ur,"rightclick",w)),y&&qe(google.maps.event.addListener(Ur,"click",y)),b&&St(google.maps.event.addListener(Ur,"drag",b)),L&&It(google.maps.event.addListener(Ur,"clickable_changed",L)),k&&ct(google.maps.event.addListener(Ur,"cursor_changed",k)),D&&Et(google.maps.event.addListener(Ur,"animation_changed",D)),j&&Xe(google.maps.event.addListener(Ur,"draggable_changed",j)),N&&lr(google.maps.event.addListener(Ur,"flat_changed",N)),V&&kr(google.maps.event.addListener(Ur,"icon_changed",V)),W&&zt(google.maps.event.addListener(Ur,"position_changed",W)),K&&Be(google.maps.event.addListener(Ur,"shape_changed",K)),H&&ut(google.maps.event.addListener(Ur,"title_changed",H)),U&&Qt(google.maps.event.addListener(Ur,"visible_changed",U)),I&&Xr(google.maps.event.addListener(Ur,"zindex_changed",I)),de(Ur),Q&&Q(Ur),()=>{pe!==null&&google.maps.event.removeListener(pe),Te!==null&&google.maps.event.removeListener(Te),Pe!==null&&google.maps.event.removeListener(Pe),Re!==null&&google.maps.event.removeListener(Re),Ke!==null&&google.maps.event.removeListener(Ke),We!==null&&google.maps.event.removeListener(We),ve!==null&&google.maps.event.removeListener(ve),Se!==null&&google.maps.event.removeListener(Se),ke!==null&&google.maps.event.removeListener(ke),xt!==null&&google.maps.event.removeListener(xt),Zt!==null&&google.maps.event.removeListener(Zt),Qe!==null&&google.maps.event.removeListener(Qe),Gt!==null&&google.maps.event.removeListener(Gt),Vt!==null&&google.maps.event.removeListener(Vt),Jt!==null&&google.maps.event.removeListener(Jt),qt!==null&&google.maps.event.removeListener(qt),Ge!==null&&google.maps.event.removeListener(Ge),Pt!==null&&google.maps.event.removeListener(Pt),wr!==null&&google.maps.event.removeListener(wr),Z&&Z(Ur),n?n.removeMarker(Ur,!!t):Ur&&Ur.setMap(null)}},[]);var pi=G.useMemo(()=>o?G.Children.map(o,Qr=>{if(!G.isValidElement(Qr))return Qr;var Ur=Qr;return G.cloneElement(Ur,{anchor:ie})}):null,[o,ie]);return R.jsx(R.Fragment,{children:pi})||null}G.memo(Eit);class Gwe extends G.PureComponent{constructor(){super(...arguments),gr(this,"registeredEvents",[])}componentDidMount(){var e=this;return Hwe(function*(){var i=wR(wR(wR({},e.props.options||U3),e.props.clusterer?U3:{map:e.context}),{},{position:e.props.position});e.marker=new google.maps.Marker(i),e.props.clusterer?e.props.clusterer.addMarker(e.marker,!!e.props.noClustererRedraw):e.marker.setMap(e.context),e.registeredEvents=Yn({updaterMap:Ghe,eventMap:Whe,prevProps:{},nextProps:e.props,instance:e.marker}),e.props.onLoad&&e.props.onLoad(e.marker)})()}componentDidUpdate(e){this.marker&&(eo(this.registeredEvents),this.registeredEvents=Yn({updaterMap:Ghe,eventMap:Whe,prevProps:e,nextProps:this.props,instance:this.marker}))}componentWillUnmount(){this.marker&&(this.props.onUnmount&&this.props.onUnmount(this.marker),eo(this.registeredEvents),this.props.clusterer?this.props.clusterer.removeMarker(this.marker,!!this.props.noClustererRedraw):this.marker&&this.marker.setMap(null))}render(){var e=this.props.children?G.Children.map(this.props.children,i=>{if(!G.isValidElement(i))return i;var n=i;return G.cloneElement(n,{anchor:this.marker})}):null;return e||null}}gr(Gwe,"contextType",On);var Ait=(function(){function r(e,i){e.getClusterer().extend(r,google.maps.OverlayView),this.cluster=e,this.clusterClassName=this.cluster.getClusterer().getClusterClass(),this.className=this.clusterClassName,this.styles=i,this.center=void 0,this.div=null,this.sums=null,this.visible=!1,this.boundsChangedListener=null,this.url="",this.height=0,this.width=0,this.anchorText=[0,0],this.anchorIcon=[0,0],this.textColor="black",this.textSize=11,this.textDecoration="none",this.fontWeight="bold",this.fontStyle="normal",this.fontFamily="Arial,sans-serif",this.backgroundPosition="0 0",this.cMouseDownInCluster=null,this.cDraggingMapByCluster=null,this.timeOut=null,this.setMap(e.getMap()),this.onBoundsChanged=this.onBoundsChanged.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.onClick=this.onClick.bind(this),this.onMouseOver=this.onMouseOver.bind(this),this.onMouseOut=this.onMouseOut.bind(this),this.onAdd=this.onAdd.bind(this),this.onRemove=this.onRemove.bind(this),this.draw=this.draw.bind(this),this.hide=this.hide.bind(this),this.show=this.show.bind(this),this.useStyle=this.useStyle.bind(this),this.setCenter=this.setCenter.bind(this),this.getPosFromLatLng=this.getPosFromLatLng.bind(this)}return r.prototype.onBoundsChanged=function(){this.cDraggingMapByCluster=this.cMouseDownInCluster},r.prototype.onMouseDown=function(){this.cMouseDownInCluster=!0,this.cDraggingMapByCluster=!1},r.prototype.onClick=function(e){if(this.cMouseDownInCluster=!1,!this.cDraggingMapByCluster){var i=this.cluster.getClusterer();if(google.maps.event.trigger(i,"click",this.cluster),google.maps.event.trigger(i,"clusterclick",this.cluster),i.getZoomOnClick()){var n=i.getMaxZoom(),t=this.cluster.getBounds(),o=i.getMap();o!==null&&"fitBounds"in o&&o.fitBounds(t),this.timeOut=window.setTimeout(function(){var a=i.getMap();if(a!==null){"fitBounds"in a&&a.fitBounds(t);var s=a.getZoom()||0;n!==null&&s>n&&a.setZoom(n+1)}},100)}e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()}},r.prototype.onMouseOver=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseover",this.cluster)},r.prototype.onMouseOut=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseout",this.cluster)},r.prototype.onAdd=function(){var e;this.div=document.createElement("div"),this.div.className=this.className,this.visible&&this.show(),(e=this.getPanes())===null||e===void 0||e.overlayMouseTarget.appendChild(this.div);var i=this.getMap();i!==null&&(this.boundsChangedListener=google.maps.event.addListener(i,"bounds_changed",this.onBoundsChanged),this.div.addEventListener("mousedown",this.onMouseDown),this.div.addEventListener("click",this.onClick),this.div.addEventListener("mouseover",this.onMouseOver),this.div.addEventListener("mouseout",this.onMouseOut))},r.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.hide(),this.boundsChangedListener!==null&&google.maps.event.removeListener(this.boundsChangedListener),this.div.removeEventListener("mousedown",this.onMouseDown),this.div.removeEventListener("click",this.onClick),this.div.removeEventListener("mouseover",this.onMouseOver),this.div.removeEventListener("mouseout",this.onMouseOut),this.div.parentNode.removeChild(this.div),this.timeOut!==null&&(window.clearTimeout(this.timeOut),this.timeOut=null),this.div=null)},r.prototype.draw=function(){if(this.visible&&this.div!==null&&this.center){var e=this.getPosFromLatLng(this.center);this.div.style.top=e!==null?"".concat(e.y,"px"):"0",this.div.style.left=e!==null?"".concat(e.x,"px"):"0"}},r.prototype.hide=function(){this.div&&(this.div.style.display="none"),this.visible=!1},r.prototype.show=function(){var e,i,n,t,o,a;if(this.div&&this.center){var s=this.sums===null||typeof this.sums.title>"u"||this.sums.title===""?this.cluster.getClusterer().getTitle():this.sums.title,l=this.backgroundPosition.split(" "),u=parseInt(((e=l[0])===null||e===void 0?void 0:e.replace(/^\s+|\s+$/g,""))||"0",10),c=parseInt(((i=l[1])===null||i===void 0?void 0:i.replace(/^\s+|\s+$/g,""))||"0",10),d=this.getPosFromLatLng(this.center);this.div.className=this.className,this.div.setAttribute("style","cursor: pointer; position: absolute; top: ".concat(d!==null?"".concat(d.y,"px"):"0","; left: ").concat(d!==null?"".concat(d.x,"px"):"0","; width: ").concat(this.width,"px; height: ").concat(this.height,"px; "));var f=document.createElement("img");f.alt=s,f.src=this.url,f.width=this.width,f.height=this.height,f.setAttribute("style","position: absolute; top: ".concat(c,"px; left: ").concat(u,"px")),this.cluster.getClusterer().enableRetinaIcons||(f.style.clip="rect(-".concat(c,"px, -").concat(u+this.width,"px, -").concat(c+this.height,", -").concat(u,")"));var h=document.createElement("div");h.setAttribute("style","position: absolute; top: ".concat(this.anchorText[0],"px; left: ").concat(this.anchorText[1],"px; color: ").concat(this.textColor,"; font-size: ").concat(this.textSize,"px; font-family: ").concat(this.fontFamily,"; font-weight: ").concat(this.fontWeight,"; fontStyle: ").concat(this.fontStyle,"; text-decoration: ").concat(this.textDecoration,"; text-align: center; width: ").concat(this.width,"px; line-height: ").concat(this.height,"px")),!((n=this.sums)===null||n===void 0)&&n.text&&(h.innerText="".concat((t=this.sums)===null||t===void 0?void 0:t.text)),!((o=this.sums)===null||o===void 0)&&o.html&&(h.innerHTML="".concat((a=this.sums)===null||a===void 0?void 0:a.html)),this.div.innerHTML="",this.div.appendChild(f),this.div.appendChild(h),this.div.title=s,this.div.style.display=""}this.visible=!0},r.prototype.useStyle=function(e){this.sums=e;var i=this.cluster.getClusterer().getStyles(),n=i[Math.min(i.length-1,Math.max(0,e.index-1))];n&&(this.url=n.url,this.height=n.height,this.width=n.width,n.className&&(this.className="".concat(this.clusterClassName," ").concat(n.className)),this.anchorText=n.anchorText||[0,0],this.anchorIcon=n.anchorIcon||[this.height/2,this.width/2],this.textColor=n.textColor||"black",this.textSize=n.textSize||11,this.textDecoration=n.textDecoration||"none",this.fontWeight=n.fontWeight||"bold",this.fontStyle=n.fontStyle||"normal",this.fontFamily=n.fontFamily||"Arial,sans-serif",this.backgroundPosition=n.backgroundPosition||"0 0")},r.prototype.setCenter=function(e){this.center=e},r.prototype.getPosFromLatLng=function(e){var i=this.getProjection().fromLatLngToDivPixel(e);return i!==null&&(i.x-=this.anchorIcon[1],i.y-=this.anchorIcon[0]),i},r})(),wit=(function(){function r(e){this.markerClusterer=e,this.map=this.markerClusterer.getMap(),this.gridSize=this.markerClusterer.getGridSize(),this.minClusterSize=this.markerClusterer.getMinimumClusterSize(),this.averageCenter=this.markerClusterer.getAverageCenter(),this.markers=[],this.center=void 0,this.bounds=null,this.clusterIcon=new Ait(this,this.markerClusterer.getStyles()),this.getSize=this.getSize.bind(this),this.getMarkers=this.getMarkers.bind(this),this.getCenter=this.getCenter.bind(this),this.getMap=this.getMap.bind(this),this.getClusterer=this.getClusterer.bind(this),this.getBounds=this.getBounds.bind(this),this.remove=this.remove.bind(this),this.addMarker=this.addMarker.bind(this),this.isMarkerInClusterBounds=this.isMarkerInClusterBounds.bind(this),this.calculateBounds=this.calculateBounds.bind(this),this.updateIcon=this.updateIcon.bind(this),this.isMarkerAlreadyAdded=this.isMarkerAlreadyAdded.bind(this)}return r.prototype.getSize=function(){return this.markers.length},r.prototype.getMarkers=function(){return this.markers},r.prototype.getCenter=function(){return this.center},r.prototype.getMap=function(){return this.map},r.prototype.getClusterer=function(){return this.markerClusterer},r.prototype.getBounds=function(){for(var e=new google.maps.LatLngBounds(this.center,this.center),i=this.getMarkers(),n=0,t=i;n<t.length;n++){var o=t[n],a=o.getPosition();a&&e.extend(a)}return e},r.prototype.remove=function(){this.clusterIcon.setMap(null),this.markers=[],delete this.markers},r.prototype.addMarker=function(e){var i;if(this.isMarkerAlreadyAdded(e))return!1;if(this.center){if(this.averageCenter){var n=e.getPosition();if(n){var t=this.markers.length+1;this.center=new google.maps.LatLng((this.center.lat()*(t-1)+n.lat())/t,(this.center.lng()*(t-1)+n.lng())/t),this.calculateBounds()}}}else{var n=e.getPosition();n&&(this.center=n,this.calculateBounds())}e.isAdded=!0,this.markers.push(e);var o=this.markers.length,a=this.markerClusterer.getMaxZoom(),s=(i=this.map)===null||i===void 0?void 0:i.getZoom();if(a!==null&&typeof s<"u"&&s>a)e.getMap()!==this.map&&e.setMap(this.map);else if(o<this.minClusterSize)e.getMap()!==this.map&&e.setMap(this.map);else if(o===this.minClusterSize)for(var l=0,u=this.markers;l<u.length;l++){var c=u[l];c.setMap(null)}else e.setMap(null);return!0},r.prototype.isMarkerInClusterBounds=function(e){if(this.bounds!==null){var i=e.getPosition();if(i)return this.bounds.contains(i)}return!1},r.prototype.calculateBounds=function(){this.bounds=this.markerClusterer.getExtendedBounds(new google.maps.LatLngBounds(this.center,this.center))},r.prototype.updateIcon=function(){var e,i=this.markers.length,n=this.markerClusterer.getMaxZoom(),t=(e=this.map)===null||e===void 0?void 0:e.getZoom();if(n!==null&&typeof t<"u"&&t>n){this.clusterIcon.hide();return}if(i<this.minClusterSize){this.clusterIcon.hide();return}this.center&&this.clusterIcon.setCenter(this.center),this.clusterIcon.useStyle(this.markerClusterer.getCalculator()(this.markers,this.markerClusterer.getStyles().length)),this.clusterIcon.show()},r.prototype.isMarkerAlreadyAdded=function(e){if(this.markers.includes)return this.markers.includes(e);for(var i=0;i<this.markers.length;i++)if(e===this.markers[i])return!0;return!1},r})();function Oit(r,e){var i=r.length,n=i.toString().length,t=Math.min(n,e);return{text:i.toString(),index:t,title:""}}var Dit=2e3,Rit=500,Mit="https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",Lit="png",kit=[53,56,66,78,90],Iit="cluster",Ywe=(function(){function r(e,i,n){i===void 0&&(i=[]),n===void 0&&(n={}),this.getMinimumClusterSize=this.getMinimumClusterSize.bind(this),this.setMinimumClusterSize=this.setMinimumClusterSize.bind(this),this.getEnableRetinaIcons=this.getEnableRetinaIcons.bind(this),this.setEnableRetinaIcons=this.setEnableRetinaIcons.bind(this),this.addToClosestCluster=this.addToClosestCluster.bind(this),this.getImageExtension=this.getImageExtension.bind(this),this.setImageExtension=this.setImageExtension.bind(this),this.getExtendedBounds=this.getExtendedBounds.bind(this),this.getAverageCenter=this.getAverageCenter.bind(this),this.setAverageCenter=this.setAverageCenter.bind(this),this.getTotalClusters=this.getTotalClusters.bind(this),this.fitMapToMarkers=this.fitMapToMarkers.bind(this),this.getIgnoreHidden=this.getIgnoreHidden.bind(this),this.setIgnoreHidden=this.setIgnoreHidden.bind(this),this.getClusterClass=this.getClusterClass.bind(this),this.setClusterClass=this.setClusterClass.bind(this),this.getTotalMarkers=this.getTotalMarkers.bind(this),this.getZoomOnClick=this.getZoomOnClick.bind(this),this.setZoomOnClick=this.setZoomOnClick.bind(this),this.getBatchSizeIE=this.getBatchSizeIE.bind(this),this.setBatchSizeIE=this.setBatchSizeIE.bind(this),this.createClusters=this.createClusters.bind(this),this.onZoomChanged=this.onZoomChanged.bind(this),this.getImageSizes=this.getImageSizes.bind(this),this.setImageSizes=this.setImageSizes.bind(this),this.getCalculator=this.getCalculator.bind(this),this.setCalculator=this.setCalculator.bind(this),this.removeMarkers=this.removeMarkers.bind(this),this.resetViewport=this.resetViewport.bind(this),this.getImagePath=this.getImagePath.bind(this),this.setImagePath=this.setImagePath.bind(this),this.pushMarkerTo=this.pushMarkerTo.bind(this),this.removeMarker=this.removeMarker.bind(this),this.clearMarkers=this.clearMarkers.bind(this),this.setupStyles=this.setupStyles.bind(this),this.getGridSize=this.getGridSize.bind(this),this.setGridSize=this.setGridSize.bind(this),this.getClusters=this.getClusters.bind(this),this.getMaxZoom=this.getMaxZoom.bind(this),this.setMaxZoom=this.setMaxZoom.bind(this),this.getMarkers=this.getMarkers.bind(this),this.addMarkers=this.addMarkers.bind(this),this.getStyles=this.getStyles.bind(this),this.setStyles=this.setStyles.bind(this),this.addMarker=this.addMarker.bind(this),this.onRemove=this.onRemove.bind(this),this.getTitle=this.getTitle.bind(this),this.setTitle=this.setTitle.bind(this),this.repaint=this.repaint.bind(this),this.onIdle=this.onIdle.bind(this),this.redraw=this.redraw.bind(this),this.onAdd=this.onAdd.bind(this),this.draw=this.draw.bind(this),this.extend=this.extend.bind(this),this.extend(r,google.maps.OverlayView),this.markers=[],this.clusters=[],this.listeners=[],this.activeMap=null,this.ready=!1,this.gridSize=n.gridSize||60,this.minClusterSize=n.minimumClusterSize||2,this.maxZoom=n.maxZoom||null,this.styles=n.styles||[],this.title=n.title||"",this.zoomOnClick=!0,n.zoomOnClick!==void 0&&(this.zoomOnClick=n.zoomOnClick),this.averageCenter=!1,n.averageCenter!==void 0&&(this.averageCenter=n.averageCenter),this.ignoreHidden=!1,n.ignoreHidden!==void 0&&(this.ignoreHidden=n.ignoreHidden),this.enableRetinaIcons=!1,n.enableRetinaIcons!==void 0&&(this.enableRetinaIcons=n.enableRetinaIcons),this.imagePath=n.imagePath||Mit,this.imageExtension=n.imageExtension||Lit,this.imageSizes=n.imageSizes||kit,this.calculator=n.calculator||Oit,this.batchSize=n.batchSize||Dit,this.batchSizeIE=n.batchSizeIE||Rit,this.clusterClass=n.clusterClass||Iit,navigator.userAgent.toLowerCase().indexOf("msie")!==-1&&(this.batchSize=this.batchSizeIE),this.timerRefStatic=null,this.setupStyles(),this.addMarkers(i,!0),this.setMap(e)}return r.prototype.onZoomChanged=function(){var e,i;this.resetViewport(!1),(((e=this.getMap())===null||e===void 0?void 0:e.getZoom())===(this.get("minZoom")||0)||((i=this.getMap())===null||i===void 0?void 0:i.getZoom())===this.get("maxZoom"))&&google.maps.event.trigger(this,"idle")},r.prototype.onIdle=function(){this.redraw()},r.prototype.onAdd=function(){var e=this.getMap();this.activeMap=e,this.ready=!0,this.repaint(),e!==null&&(this.listeners=[google.maps.event.addListener(e,"zoom_changed",this.onZoomChanged),google.maps.event.addListener(e,"idle",this.onIdle)])},r.prototype.onRemove=function(){for(var e=0,i=this.markers;e<i.length;e++){var n=i[e];n.getMap()!==this.activeMap&&n.setMap(this.activeMap)}for(var t=0,o=this.clusters;t<o.length;t++){var a=o[t];a.remove()}this.clusters=[];for(var s=0,l=this.listeners;s<l.length;s++){var u=l[s];google.maps.event.removeListener(u)}this.listeners=[],this.activeMap=null,this.ready=!1},r.prototype.draw=function(){},r.prototype.getMap=function(){return null},r.prototype.getPanes=function(){return null},r.prototype.getProjection=function(){return{fromContainerPixelToLatLng:function(){return null},fromDivPixelToLatLng:function(){return null},fromLatLngToContainerPixel:function(){return null},fromLatLngToDivPixel:function(){return null},getVisibleRegion:function(){return null},getWorldWidth:function(){return 0}}},r.prototype.setMap=function(){},r.prototype.addListener=function(){return{remove:function(){}}},r.prototype.bindTo=function(){},r.prototype.get=function(){},r.prototype.notify=function(){},r.prototype.set=function(){},r.prototype.setValues=function(){},r.prototype.unbind=function(){},r.prototype.unbindAll=function(){},r.prototype.setupStyles=function(){if(!(this.styles.length>0))for(var e=0;e<this.imageSizes.length;e++)this.styles.push({url:"".concat(this.imagePath+(e+1),".").concat(this.imageExtension),height:this.imageSizes[e]||0,width:this.imageSizes[e]||0})},r.prototype.fitMapToMarkers=function(){for(var e=this.getMarkers(),i=new google.maps.LatLngBounds,n=0,t=e;n<t.length;n++){var o=t[n],a=o.getPosition();a&&i.extend(a)}var s=this.getMap();s!==null&&"fitBounds"in s&&s.fitBounds(i)},r.prototype.getGridSize=function(){return this.gridSize},r.prototype.setGridSize=function(e){this.gridSize=e},r.prototype.getMinimumClusterSize=function(){return this.minClusterSize},r.prototype.setMinimumClusterSize=function(e){this.minClusterSize=e},r.prototype.getMaxZoom=function(){return this.maxZoom},r.prototype.setMaxZoom=function(e){this.maxZoom=e},r.prototype.getStyles=function(){return this.styles},r.prototype.setStyles=function(e){this.styles=e},r.prototype.getTitle=function(){return this.title},r.prototype.setTitle=function(e){this.title=e},r.prototype.getZoomOnClick=function(){return this.zoomOnClick},r.prototype.setZoomOnClick=function(e){this.zoomOnClick=e},r.prototype.getAverageCenter=function(){return this.averageCenter},r.prototype.setAverageCenter=function(e){this.averageCenter=e},r.prototype.getIgnoreHidden=function(){return this.ignoreHidden},r.prototype.setIgnoreHidden=function(e){this.ignoreHidden=e},r.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons},r.prototype.setEnableRetinaIcons=function(e){this.enableRetinaIcons=e},r.prototype.getImageExtension=function(){return this.imageExtension},r.prototype.setImageExtension=function(e){this.imageExtension=e},r.prototype.getImagePath=function(){return this.imagePath},r.prototype.setImagePath=function(e){this.imagePath=e},r.prototype.getImageSizes=function(){return this.imageSizes},r.prototype.setImageSizes=function(e){this.imageSizes=e},r.prototype.getCalculator=function(){return this.calculator},r.prototype.setCalculator=function(e){this.calculator=e},r.prototype.getBatchSizeIE=function(){return this.batchSizeIE},r.prototype.setBatchSizeIE=function(e){this.batchSizeIE=e},r.prototype.getClusterClass=function(){return this.clusterClass},r.prototype.setClusterClass=function(e){this.clusterClass=e},r.prototype.getMarkers=function(){return this.markers},r.prototype.getTotalMarkers=function(){return this.markers.length},r.prototype.getClusters=function(){return this.clusters},r.prototype.getTotalClusters=function(){return this.clusters.length},r.prototype.addMarker=function(e,i){this.pushMarkerTo(e),i||this.redraw()},r.prototype.addMarkers=function(e,i){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var t=e[n];t&&this.pushMarkerTo(t)}i||this.redraw()},r.prototype.pushMarkerTo=function(e){var i=this;e.getDraggable()&&google.maps.event.addListener(e,"dragend",function(){i.ready&&(e.isAdded=!1,i.repaint())}),e.isAdded=!1,this.markers.push(e)},r.prototype.removeMarker_=function(e){var i=-1;if(this.markers.indexOf)i=this.markers.indexOf(e);else for(var n=0;n<this.markers.length;n++)if(e===this.markers[n]){i=n;break}return i===-1?!1:(e.setMap(null),this.markers.splice(i,1),!0)},r.prototype.removeMarker=function(e,i){var n=this.removeMarker_(e);return!i&&n&&this.repaint(),n},r.prototype.removeMarkers=function(e,i){for(var n=!1,t=0,o=e;t<o.length;t++){var a=o[t];n=n||this.removeMarker_(a)}return!i&&n&&this.repaint(),n},r.prototype.clearMarkers=function(){this.resetViewport(!0),this.markers=[]},r.prototype.repaint=function(){var e=this.clusters.slice();this.clusters=[],this.resetViewport(!1),this.redraw(),setTimeout(function(){for(var n=0,t=e;n<t.length;n++){var o=t[n];o.remove()}},0)},r.prototype.getExtendedBounds=function(e){var i=this.getProjection(),n=i.fromLatLngToDivPixel(new google.maps.LatLng(e.getNorthEast().lat(),e.getNorthEast().lng()));n!==null&&(n.x+=this.gridSize,n.y-=this.gridSize);var t=i.fromLatLngToDivPixel(new google.maps.LatLng(e.getSouthWest().lat(),e.getSouthWest().lng()));if(t!==null&&(t.x-=this.gridSize,t.y+=this.gridSize),n!==null){var o=i.fromDivPixelToLatLng(n);o!==null&&e.extend(o)}if(t!==null){var a=i.fromDivPixelToLatLng(t);a!==null&&e.extend(a)}return e},r.prototype.redraw=function(){this.createClusters(0)},r.prototype.resetViewport=function(e){for(var i=0,n=this.clusters;i<n.length;i++){var t=n[i];t.remove()}this.clusters=[];for(var o=0,a=this.markers;o<a.length;o++){var s=a[o];s.isAdded=!1,e&&s.setMap(null)}},r.prototype.distanceBetweenPoints=function(e,i){var n=6371,t=(i.lat()-e.lat())*Math.PI/180,o=(i.lng()-e.lng())*Math.PI/180,a=Math.sin(t/2)*Math.sin(t/2)+Math.cos(e.lat()*Math.PI/180)*Math.cos(i.lat()*Math.PI/180)*Math.sin(o/2)*Math.sin(o/2);return n*(2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a)))},r.prototype.isMarkerInBounds=function(e,i){var n=e.getPosition();return n?i.contains(n):!1},r.prototype.addToClosestCluster=function(e){for(var i,n=4e4,t=null,o=0,a=this.clusters;o<a.length;o++){var s=a[o];i=s;var l=i.getCenter(),u=e.getPosition();if(l&&u){var c=this.distanceBetweenPoints(l,u);c<n&&(n=c,t=i)}}t&&t.isMarkerInClusterBounds(e)?t.addMarker(e):(i=new wit(this),i.addMarker(e),this.clusters.push(i))},r.prototype.createClusters=function(e){var i=this;if(this.ready){e===0&&(google.maps.event.trigger(this,"clusteringbegin",this),this.timerRefStatic!==null&&(window.clearTimeout(this.timerRefStatic),delete this.timerRefStatic));for(var n=this.getMap(),t=n!==null&&("getBounds"in n)?n.getBounds():null,o=(n==null?void 0:n.getZoom())||0,a=o>3?new google.maps.LatLngBounds(t==null?void 0:t.getSouthWest(),t==null?void 0:t.getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625)),s=this.getExtendedBounds(a),l=Math.min(e+this.batchSize,this.markers.length),u=e;u<l;u++){var c=this.markers[u];c&&!c.isAdded&&this.isMarkerInBounds(c,s)&&(!this.ignoreHidden||this.ignoreHidden&&c.getVisible())&&this.addToClosestCluster(c)}if(l<this.markers.length)this.timerRefStatic=window.setTimeout(function(){i.createClusters(l)},0);else{this.timerRefStatic=null,google.maps.event.trigger(this,"clusteringend",this);for(var d=0,f=this.clusters;d<f.length;d++){var h=f[d];h.updateIcon()}}}},r.prototype.extend=function(e,i){return(function(t){for(var o in t.prototype){var a=o;this.prototype[a]=t.prototype[a]}return this}).apply(e,[i])},r})();function Yhe(r,e){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),i.push.apply(i,n)}return i}function Nit(r){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?Yhe(Object(i),!0).forEach(function(n){gr(r,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):Yhe(Object(i)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(i,n))})}return r}var dp={onClick:"click",onClusteringBegin:"clusteringbegin",onClusteringEnd:"clusteringend",onMouseOut:"mouseout",onMouseOver:"mouseover"},Do={averageCenter(r,e){r.setAverageCenter(e)},batchSizeIE(r,e){r.setBatchSizeIE(e)},calculator(r,e){r.setCalculator(e)},clusterClass(r,e){r.setClusterClass(e)},enableRetinaIcons(r,e){r.setEnableRetinaIcons(e)},gridSize(r,e){r.setGridSize(e)},ignoreHidden(r,e){r.setIgnoreHidden(e)},imageExtension(r,e){r.setImageExtension(e)},imagePath(r,e){r.setImagePath(e)},imageSizes(r,e){r.setImageSizes(e)},maxZoom(r,e){r.setMaxZoom(e)},minimumClusterSize(r,e){r.setMinimumClusterSize(e)},styles(r,e){r.setStyles(e)},title(r,e){r.setTitle(e)},zoomOnClick(r,e){r.setZoomOnClick(e)}},Fit={};function jit(r){var{children:e,options:i,averageCenter:n,batchSizeIE:t,calculator:o,clusterClass:a,enableRetinaIcons:s,gridSize:l,ignoreHidden:u,imageExtension:c,imagePath:d,imageSizes:f,maxZoom:h,minimumClusterSize:p,styles:g,title:v,zoomOnClick:y,onClick:m,onClusteringBegin:b,onClusteringEnd:S,onMouseOver:_,onMouseOut:C,onLoad:T,onUnmount:x}=r,[A,w]=G.useState(null),L=G.useContext(On),[k,D]=G.useState(null),[j,N]=G.useState(null),[V,W]=G.useState(null),[K,H]=G.useState(null),[U,I]=G.useState(null);return G.useEffect(()=>{A&&C&&(K!==null&&google.maps.event.removeListener(K),H(google.maps.event.addListener(A,dp.onMouseOut,C)))},[C]),G.useEffect(()=>{A&&_&&(U!==null&&google.maps.event.removeListener(U),I(google.maps.event.addListener(A,dp.onMouseOver,_)))},[_]),G.useEffect(()=>{A&&m&&(k!==null&&google.maps.event.removeListener(k),D(google.maps.event.addListener(A,dp.onClick,m)))},[m]),G.useEffect(()=>{A&&b&&(j!==null&&google.maps.event.removeListener(j),N(google.maps.event.addListener(A,dp.onClusteringBegin,b)))},[b]),G.useEffect(()=>{A&&S&&(V!==null&&google.maps.event.removeListener(V),N(google.maps.event.addListener(A,dp.onClusteringEnd,S)))},[S]),G.useEffect(()=>{typeof n<"u"&&A!==null&&Do.averageCenter(A,n)},[A,n]),G.useEffect(()=>{typeof t<"u"&&A!==null&&Do.batchSizeIE(A,t)},[A,t]),G.useEffect(()=>{typeof o<"u"&&A!==null&&Do.calculator(A,o)},[A,o]),G.useEffect(()=>{typeof a<"u"&&A!==null&&Do.clusterClass(A,a)},[A,a]),G.useEffect(()=>{typeof s<"u"&&A!==null&&Do.enableRetinaIcons(A,s)},[A,s]),G.useEffect(()=>{typeof l<"u"&&A!==null&&Do.gridSize(A,l)},[A,l]),G.useEffect(()=>{typeof u<"u"&&A!==null&&Do.ignoreHidden(A,u)},[A,u]),G.useEffect(()=>{typeof c<"u"&&A!==null&&Do.imageExtension(A,c)},[A,c]),G.useEffect(()=>{typeof d<"u"&&A!==null&&Do.imagePath(A,d)},[A,d]),G.useEffect(()=>{typeof f<"u"&&A!==null&&Do.imageSizes(A,f)},[A,f]),G.useEffect(()=>{typeof h<"u"&&A!==null&&Do.maxZoom(A,h)},[A,h]),G.useEffect(()=>{typeof p<"u"&&A!==null&&Do.minimumClusterSize(A,p)},[A,p]),G.useEffect(()=>{typeof g<"u"&&A!==null&&Do.styles(A,g)},[A,g]),G.useEffect(()=>{typeof v<"u"&&A!==null&&Do.title(A,v)},[A,v]),G.useEffect(()=>{typeof y<"u"&&A!==null&&Do.zoomOnClick(A,y)},[A,y]),G.useEffect(()=>{if(L){var Q=Nit({},i||Fit),Z=new Ywe(L,[],Q);return n&&Do.averageCenter(Z,n),t&&Do.batchSizeIE(Z,t),o&&Do.calculator(Z,o),a&&Do.clusterClass(Z,a),s&&Do.enableRetinaIcons(Z,s),l&&Do.gridSize(Z,l),u&&Do.ignoreHidden(Z,u),c&&Do.imageExtension(Z,c),d&&Do.imagePath(Z,d),f&&Do.imageSizes(Z,f),h&&Do.maxZoom(Z,h),p&&Do.minimumClusterSize(Z,p),g&&Do.styles(Z,g),v&&Do.title(Z,v),y&&Do.zoomOnClick(Z,y),C&&H(google.maps.event.addListener(Z,dp.onMouseOut,C)),_&&I(google.maps.event.addListener(Z,dp.onMouseOver,_)),m&&D(google.maps.event.addListener(Z,dp.onClick,m)),b&&N(google.maps.event.addListener(Z,dp.onClusteringBegin,b)),S&&W(google.maps.event.addListener(Z,dp.onClusteringEnd,S)),w(Z),T&&T(Z),()=>{K!==null&&google.maps.event.removeListener(K),U!==null&&google.maps.event.removeListener(U),k!==null&&google.maps.event.removeListener(k),j!==null&&google.maps.event.removeListener(j),V!==null&&google.maps.event.removeListener(V),x&&x(Z)}}},[]),A!==null&&e(A)||null}G.memo(jit);class Bit extends G.PureComponent{constructor(){super(...arguments),gr(this,"registeredEvents",[]),gr(this,"state",{markerClusterer:null}),gr(this,"setClustererCallback",()=>{this.state.markerClusterer!==null&&this.props.onLoad&&this.props.onLoad(this.state.markerClusterer)})}componentDidMount(){if(this.context){var e=new Ywe(this.context,[],this.props.options);this.registeredEvents=Yn({updaterMap:Do,eventMap:dp,prevProps:{},nextProps:this.props,instance:e}),this.setState(()=>({markerClusterer:e}),this.setClustererCallback)}}componentDidUpdate(e){this.state.markerClusterer&&(eo(this.registeredEvents),this.registeredEvents=Yn({updaterMap:Do,eventMap:dp,prevProps:e,nextProps:this.props,instance:this.state.markerClusterer}))}componentWillUnmount(){this.state.markerClusterer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.markerClusterer),eo(this.registeredEvents),this.state.markerClusterer.setMap(null))}render(){return this.state.markerClusterer!==null?this.props.children(this.state.markerClusterer):null}}gr(Bit,"contextType",On);function $he(r){r.cancelBubble=!0,r.stopPropagation&&r.stopPropagation()}var $we=(function(){function r(e){e===void 0&&(e={}),this.getCloseClickHandler=this.getCloseClickHandler.bind(this),this.closeClickHandler=this.closeClickHandler.bind(this),this.createInfoBoxDiv=this.createInfoBoxDiv.bind(this),this.addClickHandler=this.addClickHandler.bind(this),this.getCloseBoxImg=this.getCloseBoxImg.bind(this),this.getBoxWidths=this.getBoxWidths.bind(this),this.setBoxStyle=this.setBoxStyle.bind(this),this.setPosition=this.setPosition.bind(this),this.getPosition=this.getPosition.bind(this),this.setOptions=this.setOptions.bind(this),this.setContent=this.setContent.bind(this),this.setVisible=this.setVisible.bind(this),this.getContent=this.getContent.bind(this),this.getVisible=this.getVisible.bind(this),this.setZIndex=this.setZIndex.bind(this),this.getZIndex=this.getZIndex.bind(this),this.onRemove=this.onRemove.bind(this),this.panBox=this.panBox.bind(this),this.extend=this.extend.bind(this),this.close=this.close.bind(this),this.draw=this.draw.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.open=this.open.bind(this),this.extend(r,google.maps.OverlayView),this.content=e.content||"",this.disableAutoPan=e.disableAutoPan||!1,this.maxWidth=e.maxWidth||0,this.pixelOffset=e.pixelOffset||new google.maps.Size(0,0),this.position=e.position||new google.maps.LatLng(0,0),this.zIndex=e.zIndex||null,this.boxClass=e.boxClass||"infoBox",this.boxStyle=e.boxStyle||{},this.closeBoxMargin=e.closeBoxMargin||"2px",this.closeBoxURL=e.closeBoxURL||"http://www.google.com/intl/en_us/mapfiles/close.gif",e.closeBoxURL===""&&(this.closeBoxURL=""),this.infoBoxClearance=e.infoBoxClearance||new google.maps.Size(1,1),typeof e.visible>"u"&&(typeof e.isHidden>"u"?e.visible=!0:e.visible=!e.isHidden),this.isHidden=!e.visible,this.alignBottom=e.alignBottom||!1,this.pane=e.pane||"floatPane",this.enableEventPropagation=e.enableEventPropagation||!1,this.div=null,this.closeListener=null,this.moveListener=null,this.mapListener=null,this.contextListener=null,this.eventListeners=null,this.fixedWidthSet=null}return r.prototype.createInfoBoxDiv=function(){var e=this,i=function(c){c.returnValue=!1,c.preventDefault&&c.preventDefault(),e.enableEventPropagation||$he(c)};if(!this.div){this.div=document.createElement("div"),this.setBoxStyle(),typeof this.content=="string"?this.div.innerHTML=this.getCloseBoxImg()+this.content:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(this.content));var n=this.getPanes();if(n!==null&&n[this.pane].appendChild(this.div),this.addClickHandler(),this.div.style.width)this.fixedWidthSet=!0;else if(this.maxWidth!==0&&this.div.offsetWidth>this.maxWidth)this.div.style.width=this.maxWidth+"px",this.fixedWidthSet=!0;else{var t=this.getBoxWidths();this.div.style.width=this.div.offsetWidth-t.left-t.right+"px",this.fixedWidthSet=!1}if(this.panBox(this.disableAutoPan),!this.enableEventPropagation){this.eventListeners=[];for(var o=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"],a=0,s=o;a<s.length;a++){var l=s[a];this.eventListeners.push(google.maps.event.addListener(this.div,l,$he))}this.eventListeners.push(google.maps.event.addListener(this.div,"mouseover",function(){e.div&&(e.div.style.cursor="default")}))}this.contextListener=google.maps.event.addListener(this.div,"contextmenu",i),google.maps.event.trigger(this,"domready")}},r.prototype.getCloseBoxImg=function(){var e="";return this.closeBoxURL!==""&&(e='<img alt=""',e+=' aria-hidden="true"',e+=" src='"+this.closeBoxURL+"'",e+=" align=right",e+=" style='",e+=" position: relative;",e+=" cursor: pointer;",e+=" margin: "+this.closeBoxMargin+";",e+="'>"),e},r.prototype.addClickHandler=function(){this.closeListener=this.div&&this.div.firstChild&&this.closeBoxURL!==""?google.maps.event.addListener(this.div.firstChild,"click",this.getCloseClickHandler()):null},r.prototype.closeClickHandler=function(e){e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation(),google.maps.event.trigger(this,"closeclick"),this.close()},r.prototype.getCloseClickHandler=function(){return this.closeClickHandler},r.prototype.panBox=function(e){if(this.div&&!e){var i=this.getMap();if(i instanceof google.maps.Map){var n=0,t=0,o=i.getBounds();o&&!o.contains(this.position)&&i.setCenter(this.position);var a=i.getDiv(),s=a.offsetWidth,l=a.offsetHeight,u=this.pixelOffset.width,c=this.pixelOffset.height,d=this.div.offsetWidth,f=this.div.offsetHeight,h=this.infoBoxClearance.width,p=this.infoBoxClearance.height,g=this.getProjection(),v=g.fromLatLngToContainerPixel(this.position);v!==null&&(v.x<-u+h?n=v.x+u-h:v.x+d+u+h>s&&(n=v.x+d+u+h-s),this.alignBottom?v.y<-c+p+f?t=v.y+c-p-f:v.y+c+p>l&&(t=v.y+c+p-l):v.y<-c+p?t=v.y+c-p:v.y+f+c+p>l&&(t=v.y+f+c+p-l)),n===0&&t===0||i.panBy(n,t)}}},r.prototype.setBoxStyle=function(){if(this.div){this.div.className=this.boxClass,this.div.style.cssText="";var e=this.boxStyle;for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(this.div.style[i]=e[i]);if(this.div.style.webkitTransform="translateZ(0)",typeof this.div.style.opacity<"u"&&this.div.style.opacity!==""){var n=parseFloat(this.div.style.opacity||"");this.div.style.msFilter='"progid:DXImageTransform.Microsoft.Alpha(Opacity='+n*100+')"',this.div.style.filter="alpha(opacity="+n*100+")"}this.div.style.position="absolute",this.div.style.visibility="hidden",this.zIndex!==null&&(this.div.style.zIndex=this.zIndex+""),this.div.style.overflow||(this.div.style.overflow="auto")}},r.prototype.getBoxWidths=function(){var e={top:0,bottom:0,left:0,right:0};if(!this.div)return e;if(document.defaultView){var i=this.div.ownerDocument,n=i&&i.defaultView?i.defaultView.getComputedStyle(this.div,""):null;n&&(e.top=parseInt(n.borderTopWidth||"",10)||0,e.bottom=parseInt(n.borderBottomWidth||"",10)||0,e.left=parseInt(n.borderLeftWidth||"",10)||0,e.right=parseInt(n.borderRightWidth||"",10)||0)}else if(document.documentElement.currentStyle){var t=this.div.currentStyle;t&&(e.top=parseInt(t.borderTopWidth||"",10)||0,e.bottom=parseInt(t.borderBottomWidth||"",10)||0,e.left=parseInt(t.borderLeftWidth||"",10)||0,e.right=parseInt(t.borderRightWidth||"",10)||0)}return e},r.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.div.parentNode.removeChild(this.div),this.div=null)},r.prototype.draw=function(){if(this.createInfoBoxDiv(),this.div){var e=this.getProjection(),i=e.fromLatLngToDivPixel(this.position);i!==null&&(this.div.style.left=i.x+this.pixelOffset.width+"px",this.alignBottom?this.div.style.bottom=-(i.y+this.pixelOffset.height)+"px":this.div.style.top=i.y+this.pixelOffset.height+"px"),this.isHidden?this.div.style.visibility="hidden":this.div.style.visibility="visible"}},r.prototype.setOptions=function(e){e===void 0&&(e={}),typeof e.boxClass<"u"&&(this.boxClass=e.boxClass,this.setBoxStyle()),typeof e.boxStyle<"u"&&(this.boxStyle=e.boxStyle,this.setBoxStyle()),typeof e.content<"u"&&this.setContent(e.content),typeof e.disableAutoPan<"u"&&(this.disableAutoPan=e.disableAutoPan),typeof e.maxWidth<"u"&&(this.maxWidth=e.maxWidth),typeof e.pixelOffset<"u"&&(this.pixelOffset=e.pixelOffset),typeof e.alignBottom<"u"&&(this.alignBottom=e.alignBottom),typeof e.position<"u"&&this.setPosition(e.position),typeof e.zIndex<"u"&&this.setZIndex(e.zIndex),typeof e.closeBoxMargin<"u"&&(this.closeBoxMargin=e.closeBoxMargin),typeof e.closeBoxURL<"u"&&(this.closeBoxURL=e.closeBoxURL),typeof e.infoBoxClearance<"u"&&(this.infoBoxClearance=e.infoBoxClearance),typeof e.isHidden<"u"&&(this.isHidden=e.isHidden),typeof e.visible<"u"&&(this.isHidden=!e.visible),typeof e.enableEventPropagation<"u"&&(this.enableEventPropagation=e.enableEventPropagation),this.div&&this.draw()},r.prototype.setContent=function(e){this.content=e,this.div&&(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.fixedWidthSet||(this.div.style.width=""),typeof e=="string"?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e)),this.fixedWidthSet||(this.div.style.width=this.div.offsetWidth+"px",typeof e=="string"?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e))),this.addClickHandler()),google.maps.event.trigger(this,"content_changed")},r.prototype.setPosition=function(e){this.position=e,this.div&&this.draw(),google.maps.event.trigger(this,"position_changed")},r.prototype.setVisible=function(e){this.isHidden=!e,this.div&&(this.div.style.visibility=this.isHidden?"hidden":"visible")},r.prototype.setZIndex=function(e){this.zIndex=e,this.div&&(this.div.style.zIndex=e+""),google.maps.event.trigger(this,"zindex_changed")},r.prototype.getContent=function(){return this.content},r.prototype.getPosition=function(){return this.position},r.prototype.getZIndex=function(){return this.zIndex},r.prototype.getVisible=function(){var e=this.getMap();return typeof e>"u"||e===null?!1:!this.isHidden},r.prototype.show=function(){this.isHidden=!1,this.div&&(this.div.style.visibility="visible")},r.prototype.hide=function(){this.isHidden=!0,this.div&&(this.div.style.visibility="hidden")},r.prototype.open=function(e,i){var n=this;i&&(this.position=i.getPosition(),this.moveListener=google.maps.event.addListener(i,"position_changed",function(){var t=i.getPosition();n.setPosition(t)}),this.mapListener=google.maps.event.addListener(i,"map_changed",function(){n.setMap(i.map)})),this.setMap(e),this.div&&this.panBox()},r.prototype.close=function(){if(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.eventListeners){for(var e=0,i=this.eventListeners;e<i.length;e++){var n=i[e];google.maps.event.removeListener(n)}this.eventListeners=null}this.moveListener&&(google.maps.event.removeListener(this.moveListener),this.moveListener=null),this.mapListener&&(google.maps.event.removeListener(this.mapListener),this.mapListener=null),this.contextListener&&(google.maps.event.removeListener(this.contextListener),this.contextListener=null),this.setMap(null)},r.prototype.extend=function(e,i){return(function(t){for(var o in t.prototype)Object.prototype.hasOwnProperty.call(this,o)||(this.prototype[o]=t.prototype[o]);return this}).apply(e,[i])},r})(),Vit=["position"],Hit=["position"];function qhe(r,e){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),i.push.apply(i,n)}return i}function z3(r){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?qhe(Object(i),!0).forEach(function(n){gr(r,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):qhe(Object(i)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(i,n))})}return r}var Xhe={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},Khe={options(r,e){r.setOptions(e)},position(r,e){e instanceof google.maps.LatLng?r.setPosition(e):r.setPosition(new google.maps.LatLng(e.lat,e.lng))},visible(r,e){r.setVisible(e)},zIndex(r,e){r.setZIndex(e)}},Uit={};function zit(r){var{children:e,anchor:i,options:n,position:t,zIndex:o,onCloseClick:a,onDomReady:s,onContentChanged:l,onPositionChanged:u,onZindexChanged:c,onLoad:d,onUnmount:f}=r,h=G.useContext(On),[p,g]=G.useState(null),[v,y]=G.useState(null),[m,b]=G.useState(null),[S,_]=G.useState(null),[C,T]=G.useState(null),[x,A]=G.useState(null),w=G.useRef(null);return G.useEffect(()=>{h&&p!==null&&(p.close(),i?p.open(h,i):p.getPosition()&&p.open(h))},[h,p,i]),G.useEffect(()=>{n&&p!==null&&p.setOptions(n)},[p,n]),G.useEffect(()=>{if(t&&p!==null){var L=t instanceof google.maps.LatLng?t:new google.maps.LatLng(t.lat,t.lng);p.setPosition(L)}},[t]),G.useEffect(()=>{typeof o=="number"&&p!==null&&p.setZIndex(o)},[o]),G.useEffect(()=>{p&&a&&(v!==null&&google.maps.event.removeListener(v),y(google.maps.event.addListener(p,"closeclick",a)))},[a]),G.useEffect(()=>{p&&s&&(m!==null&&google.maps.event.removeListener(m),b(google.maps.event.addListener(p,"domready",s)))},[s]),G.useEffect(()=>{p&&l&&(S!==null&&google.maps.event.removeListener(S),_(google.maps.event.addListener(p,"content_changed",l)))},[l]),G.useEffect(()=>{p&&u&&(C!==null&&google.maps.event.removeListener(C),T(google.maps.event.addListener(p,"position_changed",u)))},[u]),G.useEffect(()=>{p&&c&&(x!==null&&google.maps.event.removeListener(x),A(google.maps.event.addListener(p,"zindex_changed",c)))},[c]),G.useEffect(()=>{if(h){var L=n||Uit,{position:k}=L,D=a7(L,Vit),j;k&&!(k instanceof google.maps.LatLng)&&(j=new google.maps.LatLng(k.lat,k.lng));var N=new $we(z3(z3({},D),j?{position:j}:{}));w.current=document.createElement("div"),g(N),a&&y(google.maps.event.addListener(N,"closeclick",a)),s&&b(google.maps.event.addListener(N,"domready",s)),l&&_(google.maps.event.addListener(N,"content_changed",l)),u&&T(google.maps.event.addListener(N,"position_changed",u)),c&&A(google.maps.event.addListener(N,"zindex_changed",c)),N.setContent(w.current),i?N.open(h,i):N.getPosition()?N.open(h):ou(!1,"You must provide either an anchor or a position prop for <InfoBox>."),d&&d(N)}return()=>{p!==null&&(v&&google.maps.event.removeListener(v),S&&google.maps.event.removeListener(S),m&&google.maps.event.removeListener(m),C&&google.maps.event.removeListener(C),x&&google.maps.event.removeListener(x),f&&f(p),p.close())}},[]),w.current?au.createPortal(G.Children.only(e),w.current):null}G.memo(zit);class Wit extends G.PureComponent{constructor(){super(...arguments),gr(this,"registeredEvents",[]),gr(this,"containerElement",null),gr(this,"state",{infoBox:null}),gr(this,"open",(e,i)=>{i?this.context!==null&&e.open(this.context,i):e.getPosition()?this.context!==null&&e.open(this.context):ou(!1,"You must provide either an anchor or a position prop for <InfoBox>.")}),gr(this,"setInfoBoxCallback",()=>{this.state.infoBox!==null&&this.containerElement!==null&&(this.state.infoBox.setContent(this.containerElement),this.open(this.state.infoBox,this.props.anchor),this.props.onLoad&&this.props.onLoad(this.state.infoBox))})}componentDidMount(){var e=this.props.options||{},{position:i}=e,n=a7(e,Hit),t;i&&!(i instanceof google.maps.LatLng)&&(t=new google.maps.LatLng(i.lat,i.lng));var o=new $we(z3(z3({},n),t?{position:t}:{}));this.containerElement=document.createElement("div"),this.registeredEvents=Yn({updaterMap:Khe,eventMap:Xhe,prevProps:{},nextProps:this.props,instance:o}),this.setState({infoBox:o},this.setInfoBoxCallback)}componentDidUpdate(e){var{infoBox:i}=this.state;i!==null&&(eo(this.registeredEvents),this.registeredEvents=Yn({updaterMap:Khe,eventMap:Xhe,prevProps:e,nextProps:this.props,instance:i}))}componentWillUnmount(){var{onUnmount:e}=this.props,{infoBox:i}=this.state;i!==null&&(e&&e(i),eo(this.registeredEvents),i.close())}render(){return this.containerElement?au.createPortal(G.Children.only(this.props.children),this.containerElement):null}}gr(Wit,"contextType",On);var t6,Zhe;function Git(){return Zhe||(Zhe=1,t6=function r(e,i){if(e===i)return!0;if(e&&i&&typeof e=="object"&&typeof i=="object"){if(e.constructor!==i.constructor)return!1;var n,t,o;if(Array.isArray(e)){if(n=e.length,n!=i.length)return!1;for(t=n;t--!==0;)if(!r(e[t],i[t]))return!1;return!0}if(e.constructor===RegExp)return e.source===i.source&&e.flags===i.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===i.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===i.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(i).length)return!1;for(t=n;t--!==0;)if(!Object.prototype.hasOwnProperty.call(i,o[t]))return!1;for(t=n;t--!==0;){var a=o[t];if(!r(e[a],i[a]))return!1}return!0}return e!==e&&i!==i}),t6}var Yit=Git(),Jhe=Vwe(Yit),Qhe=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],r6=1,$2=8;class s7{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");var[i,n]=new Uint8Array(e,0,2);if(i!==219)throw new Error("Data does not appear to be in a KDBush format.");var t=n>>4;if(t!==r6)throw new Error("Got v".concat(t," data when expected v").concat(r6,"."));var o=Qhe[n&15];if(!o)throw new Error("Unrecognized array type.");var[a]=new Uint16Array(e,2,1),[s]=new Uint32Array(e,4,1);return new s7(s,a,o,e)}constructor(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:64,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Float64Array,t=arguments.length>3?arguments[3]:void 0;if(isNaN(e)||e<0)throw new Error("Unpexpected numItems value: ".concat(e,"."));this.numItems=+e,this.nodeSize=Math.min(Math.max(+i,2),65535),this.ArrayType=n,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;var o=Qhe.indexOf(this.ArrayType),a=e*2*this.ArrayType.BYTES_PER_ELEMENT,s=e*this.IndexArrayType.BYTES_PER_ELEMENT,l=(8-s%8)%8;if(o<0)throw new Error("Unexpected typed array class: ".concat(n,"."));t&&t instanceof ArrayBuffer?(this.data=t,this.ids=new this.IndexArrayType(this.data,$2,e),this.coords=new this.ArrayType(this.data,$2+s+l,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer($2+a+s+l),this.ids=new this.IndexArrayType(this.data,$2,e),this.coords=new this.ArrayType(this.data,$2+s+l,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(r6<<4)+o]),new Uint16Array(this.data,2,1)[0]=i,new Uint32Array(this.data,4,1)[0]=e)}add(e,i){var n=this._pos>>1;return this.ids[n]=n,this.coords[this._pos++]=e,this.coords[this._pos++]=i,n}finish(){var e=this._pos>>1;if(e!==this.numItems)throw new Error("Added ".concat(e," items when expected ").concat(this.numItems,"."));return O$(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,i,n,t){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");for(var{ids:o,coords:a,nodeSize:s}=this,l=[0,o.length-1,0],u=[];l.length;){var c=l.pop()||0,d=l.pop()||0,f=l.pop()||0;if(d-f<=s){for(var h=f;h<=d;h++){var p=a[2*h],g=a[2*h+1];p>=e&&p<=n&&g>=i&&g<=t&&u.push(o[h])}continue}var v=f+d>>1,y=a[2*v],m=a[2*v+1];y>=e&&y<=n&&m>=i&&m<=t&&u.push(o[v]),(c===0?e<=y:i<=m)&&(l.push(f),l.push(v-1),l.push(1-c)),(c===0?n>=y:t>=m)&&(l.push(v+1),l.push(d),l.push(1-c))}return u}within(e,i,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");for(var{ids:t,coords:o,nodeSize:a}=this,s=[0,t.length-1,0],l=[],u=n*n;s.length;){var c=s.pop()||0,d=s.pop()||0,f=s.pop()||0;if(d-f<=a){for(var h=f;h<=d;h++)epe(o[2*h],o[2*h+1],e,i)<=u&&l.push(t[h]);continue}var p=f+d>>1,g=o[2*p],v=o[2*p+1];epe(g,v,e,i)<=u&&l.push(t[p]),(c===0?e-n<=g:i-n<=v)&&(s.push(f),s.push(p-1),s.push(1-c)),(c===0?e+n>=g:i+n>=v)&&(s.push(p+1),s.push(d),s.push(1-c))}return l}}function O$(r,e,i,n,t,o){if(!(t-n<=i)){var a=n+t>>1;qwe(r,e,a,n,t,o),O$(r,e,i,n,a-1,1-o),O$(r,e,i,a+1,t,1-o)}}function qwe(r,e,i,n,t,o){for(;t>n;){if(t-n>600){var a=t-n+1,s=i-n+1,l=Math.log(a),u=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*u*(a-u)/a)*(s-a/2<0?-1:1),d=Math.max(n,Math.floor(i-s*u/a+c)),f=Math.min(t,Math.floor(i+(a-s)*u/a+c));qwe(r,e,i,d,f,o)}var h=e[2*i+o],p=n,g=t;for(q2(r,e,n,i),e[2*t+o]>h&&q2(r,e,n,t);p<g;){for(q2(r,e,p,g),p++,g--;e[2*p+o]<h;)p++;for(;e[2*g+o]>h;)g--}e[2*n+o]===h?q2(r,e,n,g):(g++,q2(r,e,g,t)),g<=i&&(n=g+1),i<=g&&(t=g-1)}}function q2(r,e,i,n){i6(r,i,n),i6(e,2*i,2*n),i6(e,2*i+1,2*n+1)}function i6(r,e,i){var n=r[e];r[e]=r[i],r[i]=n}function epe(r,e,i,n){var t=r-i,o=e-n;return t*t+o*o}var $it={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:r=>r},tpe=Math.fround||(r=>e=>(r[0]=+e,r[0]))(new Float32Array(1)),ww=2,fS=3,n6=4,cS=5,Xwe=6;class qit{constructor(e){this.options=Object.assign(Object.create($it),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){var{log:i,minZoom:n,maxZoom:t}=this.options;i&&console.time("total time");var o="prepare ".concat(e.length," points");i&&console.time(o),this.points=e;for(var a=[],s=0;s<e.length;s++){var l=e[s];if(l.geometry){var[u,c]=l.geometry.coordinates,d=tpe(uB(u)),f=tpe(cB(c));a.push(d,f,1/0,s,-1,1),this.options.reduce&&a.push(0)}}var h=this.trees[t+1]=this._createTree(a);i&&console.timeEnd(o);for(var p=t;p>=n;p--){var g=+Date.now();h=this.trees[p]=this._createTree(this._cluster(h,p)),i&&console.log("z%d: %d clusters in %dms",p,h.numItems,+Date.now()-g)}return i&&console.timeEnd("total time"),this}getClusters(e,i){var n=((e[0]+180)%360+360)%360-180,t=Math.max(-90,Math.min(90,e[1])),o=e[2]===180?180:((e[2]+180)%360+360)%360-180,a=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)n=-180,o=180;else if(n>o){var s=this.getClusters([n,t,180,a],i),l=this.getClusters([-180,t,o,a],i);return s.concat(l)}var u=this.trees[this._limitZoom(i)],c=u.range(uB(n),cB(a),uB(o),cB(t)),d=u.data,f=[];for(var h of c){var p=this.stride*h;f.push(d[p+cS]>1?rpe(d,p,this.clusterProps):this.points[d[p+fS]])}return f}getChildren(e){var i=this._getOriginId(e),n=this._getOriginZoom(e),t="No cluster with the specified id.",o=this.trees[n];if(!o)throw new Error(t);var a=o.data;if(i*this.stride>=a.length)throw new Error(t);var s=this.options.radius/(this.options.extent*Math.pow(2,n-1)),l=a[i*this.stride],u=a[i*this.stride+1],c=o.within(l,u,s),d=[];for(var f of c){var h=f*this.stride;a[h+n6]===e&&d.push(a[h+cS]>1?rpe(a,h,this.clusterProps):this.points[a[h+fS]])}if(d.length===0)throw new Error(t);return d}getLeaves(e,i,n){i=i||10,n=n||0;var t=[];return this._appendLeaves(t,e,i,n,0),t}getTile(e,i,n){var t=this.trees[this._limitZoom(e)],o=Math.pow(2,e),{extent:a,radius:s}=this.options,l=s/a,u=(n-l)/o,c=(n+1+l)/o,d={features:[]};return this._addTileFeatures(t.range((i-l)/o,u,(i+1+l)/o,c),t.data,i,n,o,d),i===0&&this._addTileFeatures(t.range(1-l/o,u,1,c),t.data,o,n,o,d),i===o-1&&this._addTileFeatures(t.range(0,u,l/o,c),t.data,-1,n,o,d),d.features.length?d:null}getClusterExpansionZoom(e){for(var i=this._getOriginZoom(e)-1;i<=this.options.maxZoom;){var n=this.getChildren(e);if(i++,n.length!==1)break;e=n[0].properties.cluster_id}return i}_appendLeaves(e,i,n,t,o){var a=this.getChildren(i);for(var s of a){var l=s.properties;if(l&&l.cluster?o+l.point_count<=t?o+=l.point_count:o=this._appendLeaves(e,l.cluster_id,n,t,o):o<t?o++:e.push(s),e.length===n)break}return o}_createTree(e){for(var i=new s7(e.length/this.stride|0,this.options.nodeSize,Float32Array),n=0;n<e.length;n+=this.stride)i.add(e[n],e[n+1]);return i.finish(),i.data=e,i}_addTileFeatures(e,i,n,t,o,a){for(var s of e){var l=s*this.stride,u=i[l+cS]>1,c=void 0,d=void 0,f=void 0;if(u)c=Kwe(i,l,this.clusterProps),d=i[l],f=i[l+1];else{var h=this.points[i[l+fS]];c=h.properties;var[p,g]=h.geometry.coordinates;d=uB(p),f=cB(g)}var v={type:1,geometry:[[Math.round(this.options.extent*(d*o-n)),Math.round(this.options.extent*(f*o-t))]],tags:c},y=void 0;u||this.options.generateId?y=i[l+fS]:y=this.points[i[l+fS]].id,y!==void 0&&(v.id=y),a.features.push(v)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,i){for(var{radius:n,extent:t,reduce:o,minPoints:a}=this.options,s=n/(t*Math.pow(2,i)),l=e.data,u=[],c=this.stride,d=0;d<l.length;d+=c)if(!(l[d+ww]<=i)){l[d+ww]=i;var f=l[d],h=l[d+1],p=e.within(l[d],l[d+1],s),g=l[d+cS],v=g;for(var y of p){var m=y*c;l[m+ww]>i&&(v+=l[m+cS])}if(v>g&&v>=a){var b=f*g,S=h*g,_=void 0,C=-1,T=((d/c|0)<<5)+(i+1)+this.points.length;for(var x of p){var A=x*c;if(!(l[A+ww]<=i)){l[A+ww]=i;var w=l[A+cS];b+=l[A]*w,S+=l[A+1]*w,l[A+n6]=T,o&&(_||(_=this._map(l,d,!0),C=this.clusterProps.length,this.clusterProps.push(_)),o(_,this._map(l,A)))}}l[d+n6]=T,u.push(b/v,S/v,1/0,T,-1,v),o&&u.push(C)}else{for(var L=0;L<c;L++)u.push(l[d+L]);if(v>1)for(var k of p){var D=k*c;if(!(l[D+ww]<=i)){l[D+ww]=i;for(var j=0;j<c;j++)u.push(l[D+j])}}}}return u}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,i,n){if(e[i+cS]>1){var t=this.clusterProps[e[i+Xwe]];return n?Object.assign({},t):t}var o=this.points[e[i+fS]].properties,a=this.options.map(o);return n&&a===o?Object.assign({},a):a}}function rpe(r,e,i){return{type:"Feature",id:r[e+fS],properties:Kwe(r,e,i),geometry:{type:"Point",coordinates:[Xit(r[e]),Kit(r[e+1])]}}}function Kwe(r,e,i){var n=r[e+cS],t=n>=1e4?"".concat(Math.round(n/1e3),"k"):n>=1e3?"".concat(Math.round(n/100)/10,"k"):n,o=r[e+Xwe],a=o===-1?{}:Object.assign({},i[o]);return Object.assign(a,{cluster:!0,cluster_id:r[e+fS],point_count:n,point_count_abbreviated:t})}function uB(r){return r/360+.5}function cB(r){var e=Math.sin(r*Math.PI/180),i=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return i<0?0:i>1?1:i}function Xit(r){return(r-.5)*360}function Kit(r){var e=(180-r*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}/*! *****************************************************************************
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.
***************************************************************************** */function Zit(r,e){var i={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(i[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var t=0,n=Object.getOwnPropertySymbols(r);t<n.length;t++)e.indexOf(n[t])<0&&Object.prototype.propertyIsEnumerable.call(r,n[t])&&(i[n[t]]=r[n[t]]);return i}class Sh{static isAdvancedMarkerAvailable(e){return google.maps.marker&&e.getMapCapabilities().isAdvancedMarkersAvailable===!0}static isAdvancedMarker(e){return google.maps.marker&&e instanceof google.maps.marker.AdvancedMarkerElement}static setMap(e,i){this.isAdvancedMarker(e)?e.map=i:e.setMap(i)}static getPosition(e){if(this.isAdvancedMarker(e)){if(e.position){if(e.position instanceof google.maps.LatLng)return e.position;if(e.position.lat&&e.position.lng)return new google.maps.LatLng(e.position.lat,e.position.lng)}return new google.maps.LatLng(null)}return e.getPosition()}static getVisible(e){return this.isAdvancedMarker(e)?!0:e.getVisible()}}class D${constructor(e){var{markers:i,position:n}=e;this.markers=i,n&&(n instanceof google.maps.LatLng?this._position=n:this._position=new google.maps.LatLng(n))}get bounds(){if(!(this.markers.length===0&&!this._position)){var e=new google.maps.LatLngBounds(this._position,this._position);for(var i of this.markers)e.extend(Sh.getPosition(i));return e}}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(e=>Sh.getVisible(e)).length}push(e){this.markers.push(e)}delete(){this.marker&&(Sh.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}class Jit{constructor(e){var{maxZoom:i=16}=e;this.maxZoom=i}noop(e){var{markers:i}=e;return Qit(i)}}var Qit=r=>{var e=r.map(i=>new D$({position:Sh.getPosition(i),markers:[i]}));return e};class ent extends Jit{constructor(e){var{maxZoom:i,radius:n=60}=e,t=Zit(e,["maxZoom","radius"]);super({maxZoom:i}),this.state={zoom:-1},this.superCluster=new qit(Object.assign({maxZoom:this.maxZoom,radius:n},t))}calculate(e){var i=!1,n={zoom:e.map.getZoom()};if(!Jhe(e.markers,this.markers)){i=!0,this.markers=[...e.markers];var t=this.markers.map(o=>{var a=Sh.getPosition(o),s=[a.lng(),a.lat()];return{type:"Feature",geometry:{type:"Point",coordinates:s},properties:{marker:o}}});this.superCluster.load(t)}return i||(this.state.zoom<=this.maxZoom||n.zoom<=this.maxZoom)&&(i=!Jhe(this.state,n)),this.state=n,i&&(this.clusters=this.cluster(e)),{clusters:this.clusters,changed:i}}cluster(e){var{map:i}=e;return this.superCluster.getClusters([-180,-90,180,90],Math.round(i.getZoom())).map(n=>this.transformCluster(n))}transformCluster(e){var{geometry:{coordinates:[i,n]},properties:t}=e;if(t.cluster)return new D$({markers:this.superCluster.getLeaves(t.cluster_id,1/0).map(a=>a.properties.marker),position:{lat:n,lng:i}});var o=t.marker;return new D$({markers:[o],position:Sh.getPosition(o)})}}class tnt{constructor(e,i){this.markers={sum:e.length};var n=i.map(o=>o.count),t=n.reduce((o,a)=>o+a,0);this.clusters={count:i.length,markers:{mean:t/i.length,sum:t,min:Math.min(...n),max:Math.max(...n)}}}}class rnt{render(e,i,n){var{count:t,position:o}=e,a=t>Math.max(10,i.clusters.markers.mean)?"#ff0000":"#0000ff",s='<svg fill="'.concat(a,`" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">
<circle cx="120" cy="120" opacity=".6" r="70" />
<circle cx="120" cy="120" opacity=".3" r="90" />
<circle cx="120" cy="120" opacity=".2" r="110" />
<text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">`).concat(t,`</text>
</svg>`),l="Cluster of ".concat(t," markers"),u=Number(google.maps.Marker.MAX_ZINDEX)+t;if(Sh.isAdvancedMarkerAvailable(n)){var c=new DOMParser,d=c.parseFromString(s,"image/svg+xml").documentElement;d.setAttribute("transform","translate(0 25)");var f={map:n,position:o,zIndex:u,title:l,content:d};return new google.maps.marker.AdvancedMarkerElement(f)}var h={position:o,zIndex:u,title:l,icon:{url:"data:image/svg+xml;base64,".concat(btoa(s)),anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(h)}}function int(r,e){for(var i in e.prototype)r.prototype[i]=e.prototype[i]}class l7{constructor(){int(l7,google.maps.OverlayView)}}var DN;(function(r){r.CLUSTERING_BEGIN="clusteringbegin",r.CLUSTERING_END="clusteringend",r.CLUSTER_CLICK="click"})(DN||(DN={}));var nnt=(r,e,i)=>{i.fitBounds(e.bounds)};class ont extends l7{constructor(e){var{map:i,markers:n=[],algorithmOptions:t={},algorithm:o=new ent(t),renderer:a=new rnt,onClusterClick:s=nnt}=e;super(),this.markers=[...n],this.clusters=[],this.algorithm=o,this.renderer=a,this.onClusterClick=s,i&&this.setMap(i)}addMarker(e,i){this.markers.includes(e)||(this.markers.push(e),i||this.render())}addMarkers(e,i){e.forEach(n=>{this.addMarker(n,!0)}),i||this.render()}removeMarker(e,i){var n=this.markers.indexOf(e);return n===-1?!1:(Sh.setMap(e,null),this.markers.splice(n,1),i||this.render(),!0)}removeMarkers(e,i){var n=!1;return e.forEach(t=>{n=this.removeMarker(t,!0)||n}),n&&!i&&this.render(),n}clearMarkers(e){this.markers.length=0,e||this.render()}render(){var e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,DN.CLUSTERING_BEGIN,this);var{clusters:i,changed:n}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(n||n==null){var t=new Set;for(var o of i)o.markers.length==1&&t.add(o.markers[0]);var a=[];for(var s of this.clusters)s.marker!=null&&(s.markers.length==1?t.has(s.marker)||Sh.setMap(s.marker,null):a.push(s.marker));this.clusters=i,this.renderClusters(),requestAnimationFrame(()=>a.forEach(l=>Sh.setMap(l,null)))}google.maps.event.trigger(this,DN.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(e=>Sh.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){var e=new tnt(this.markers,this.clusters),i=this.getMap();this.clusters.forEach(n=>{n.markers.length===1?n.marker=n.markers[0]:(n.marker=this.renderer.render(n,e,i),n.markers.forEach(t=>Sh.setMap(t,null)),this.onClusterClick&&n.marker.addListener("click",t=>{google.maps.event.trigger(this,DN.CLUSTER_CLICK,n),this.onClusterClick(t,n,i)})),Sh.setMap(n.marker,i)})}}function ipe(r,e){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),i.push.apply(i,n)}return i}function npe(r){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?ipe(Object(i),!0).forEach(function(n){gr(r,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):ipe(Object(i)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(i,n))})}return r}function ant(r){var e=Jrt(),[i,n]=G.useState(null);return G.useEffect(()=>{if(e&&i===null){var t=new ont(npe(npe({},r),{},{map:e}));n(t)}},[e]),i}function snt(r){var{children:e,options:i}=r,n=ant(i);return n!==null?e(n):null}G.memo(snt);var ope={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},ape={options(r,e){r.setOptions(e)},position(r,e){r.setPosition(e)},zIndex(r,e){r.setZIndex(e)}};function lnt(r){var{children:e,anchor:i,options:n,position:t,zIndex:o,onCloseClick:a,onDomReady:s,onContentChanged:l,onPositionChanged:u,onZindexChanged:c,onLoad:d,onUnmount:f}=r,h=G.useContext(On),[p,g]=G.useState(null),[v,y]=G.useState(null),[m,b]=G.useState(null),[S,_]=G.useState(null),[C,T]=G.useState(null),[x,A]=G.useState(null),w=G.useRef(null);return G.useEffect(()=>{p!==null&&(p.close(),i?p.open(h,i):p.getPosition()&&p.open(h))},[h,p,i]),G.useEffect(()=>{n&&p!==null&&p.setOptions(n)},[p,n]),G.useEffect(()=>{t&&p!==null&&p.setPosition(t)},[t]),G.useEffect(()=>{typeof o=="number"&&p!==null&&p.setZIndex(o)},[o]),G.useEffect(()=>{p&&a&&(v!==null&&google.maps.event.removeListener(v),y(google.maps.event.addListener(p,"closeclick",a)))},[a]),G.useEffect(()=>{p&&s&&(m!==null&&google.maps.event.removeListener(m),b(google.maps.event.addListener(p,"domready",s)))},[s]),G.useEffect(()=>{p&&l&&(S!==null&&google.maps.event.removeListener(S),_(google.maps.event.addListener(p,"content_changed",l)))},[l]),G.useEffect(()=>{p&&u&&(C!==null&&google.maps.event.removeListener(C),T(google.maps.event.addListener(p,"position_changed",u)))},[u]),G.useEffect(()=>{p&&c&&(x!==null&&google.maps.event.removeListener(x),A(google.maps.event.addListener(p,"zindex_changed",c)))},[c]),G.useEffect(()=>{var L=new google.maps.InfoWindow(n);return g(L),w.current=document.createElement("div"),a&&y(google.maps.event.addListener(L,"closeclick",a)),s&&b(google.maps.event.addListener(L,"domready",s)),l&&_(google.maps.event.addListener(L,"content_changed",l)),u&&T(google.maps.event.addListener(L,"position_changed",u)),c&&A(google.maps.event.addListener(L,"zindex_changed",c)),L.setContent(w.current),t&&L.setPosition(t),o&&L.setZIndex(o),i?L.open(h,i):L.getPosition()?L.open(h):ou(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>."),d&&d(L),()=>{v&&google.maps.event.removeListener(v),S&&google.maps.event.removeListener(S),m&&google.maps.event.removeListener(m),C&&google.maps.event.removeListener(C),x&&google.maps.event.removeListener(x),f&&f(L),L.close()}},[]),w.current?au.createPortal(G.Children.only(e),w.current):null}G.memo(lnt);class unt extends G.PureComponent{constructor(){super(...arguments),gr(this,"registeredEvents",[]),gr(this,"containerElement",null),gr(this,"state",{infoWindow:null}),gr(this,"open",(e,i)=>{i?e.open(this.context,i):e.getPosition()?e.open(this.context):ou(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>.")}),gr(this,"setInfoWindowCallback",()=>{this.state.infoWindow!==null&&this.containerElement!==null&&(this.state.infoWindow.setContent(this.containerElement),this.open(this.state.infoWindow,this.props.anchor),this.props.onLoad&&this.props.onLoad(this.state.infoWindow))})}componentDidMount(){var e=new google.maps.InfoWindow(this.props.options);this.containerElement=document.createElement("div"),this.registeredEvents=Yn({updaterMap:ape,eventMap:ope,prevProps:{},nextProps:this.props,instance:e}),this.setState(()=>({infoWindow:e}),this.setInfoWindowCallback)}componentDidUpdate(e){this.state.infoWindow!==null&&(eo(this.registeredEvents),this.registeredEvents=Yn({updaterMap:ape,eventMap:ope,prevProps:e,nextProps:this.props,instance:this.state.infoWindow}))}componentWillUnmount(){this.state.infoWindow!==null&&(eo(this.registeredEvents),this.props.onUnmount&&this.props.onUnmount(this.state.infoWindow),this.state.infoWindow.close())}render(){return this.containerElement?au.createPortal(G.Children.only(this.props.children),this.containerElement):null}}gr(unt,"contextType",On);function spe(r,e){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),i.push.apply(i,n)}return i}function W3(r){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?spe(Object(i),!0).forEach(function(n){gr(r,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):spe(Object(i)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(i,n))})}return r}var lpe={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},upe={draggable(r,e){r.setDraggable(e)},editable(r,e){r.setEditable(e)},map(r,e){r.setMap(e)},options(r,e){r.setOptions(e)},path(r,e){r.setPath(e)},visible(r,e){r.setVisible(e)}},cnt={};function dnt(r){var{options:e,draggable:i,editable:n,visible:t,path:o,onDblClick:a,onDragEnd:s,onDragStart:l,onMouseDown:u,onMouseMove:c,onMouseOut:d,onMouseOver:f,onMouseUp:h,onRightClick:p,onClick:g,onDrag:v,onLoad:y,onUnmount:m}=r,b=G.useContext(On),[S,_]=G.useState(null),[C,T]=G.useState(null),[x,A]=G.useState(null),[w,L]=G.useState(null),[k,D]=G.useState(null),[j,N]=G.useState(null),[V,W]=G.useState(null),[K,H]=G.useState(null),[U,I]=G.useState(null),[Q,Z]=G.useState(null),[ee,ie]=G.useState(null),[de,pe]=G.useState(null);return G.useEffect(()=>{S!==null&&S.setMap(b)},[b]),G.useEffect(()=>{typeof e<"u"&&S!==null&&S.setOptions(e)},[S,e]),G.useEffect(()=>{typeof i<"u"&&S!==null&&S.setDraggable(i)},[S,i]),G.useEffect(()=>{typeof n<"u"&&S!==null&&S.setEditable(n)},[S,n]),G.useEffect(()=>{typeof t<"u"&&S!==null&&S.setVisible(t)},[S,t]),G.useEffect(()=>{typeof o<"u"&&S!==null&&S.setPath(o)},[S,o]),G.useEffect(()=>{S&&a&&(C!==null&&google.maps.event.removeListener(C),T(google.maps.event.addListener(S,"dblclick",a)))},[a]),G.useEffect(()=>{S&&s&&(x!==null&&google.maps.event.removeListener(x),A(google.maps.event.addListener(S,"dragend",s)))},[s]),G.useEffect(()=>{S&&l&&(w!==null&&google.maps.event.removeListener(w),L(google.maps.event.addListener(S,"dragstart",l)))},[l]),G.useEffect(()=>{S&&u&&(k!==null&&google.maps.event.removeListener(k),D(google.maps.event.addListener(S,"mousedown",u)))},[u]),G.useEffect(()=>{S&&c&&(j!==null&&google.maps.event.removeListener(j),N(google.maps.event.addListener(S,"mousemove",c)))},[c]),G.useEffect(()=>{S&&d&&(V!==null&&google.maps.event.removeListener(V),W(google.maps.event.addListener(S,"mouseout",d)))},[d]),G.useEffect(()=>{S&&f&&(K!==null&&google.maps.event.removeListener(K),H(google.maps.event.addListener(S,"mouseover",f)))},[f]),G.useEffect(()=>{S&&h&&(U!==null&&google.maps.event.removeListener(U),I(google.maps.event.addListener(S,"mouseup",h)))},[h]),G.useEffect(()=>{S&&p&&(Q!==null&&google.maps.event.removeListener(Q),Z(google.maps.event.addListener(S,"rightclick",p)))},[p]),G.useEffect(()=>{S&&g&&(ee!==null&&google.maps.event.removeListener(ee),ie(google.maps.event.addListener(S,"click",g)))},[g]),G.useEffect(()=>{S&&v&&(de!==null&&google.maps.event.removeListener(de),pe(google.maps.event.addListener(S,"drag",v)))},[v]),G.useEffect(()=>{var _e=new google.maps.Polyline(W3(W3({},e||cnt),{},{map:b}));return o&&_e.setPath(o),typeof t<"u"&&_e.setVisible(t),typeof n<"u"&&_e.setEditable(n),typeof i<"u"&&_e.setDraggable(i),a&&T(google.maps.event.addListener(_e,"dblclick",a)),s&&A(google.maps.event.addListener(_e,"dragend",s)),l&&L(google.maps.event.addListener(_e,"dragstart",l)),u&&D(google.maps.event.addListener(_e,"mousedown",u)),c&&N(google.maps.event.addListener(_e,"mousemove",c)),d&&W(google.maps.event.addListener(_e,"mouseout",d)),f&&H(google.maps.event.addListener(_e,"mouseover",f)),h&&I(google.maps.event.addListener(_e,"mouseup",h)),p&&Z(google.maps.event.addListener(_e,"rightclick",p)),g&&ie(google.maps.event.addListener(_e,"click",g)),v&&pe(google.maps.event.addListener(_e,"drag",v)),_(_e),y&&y(_e),()=>{C!==null&&google.maps.event.removeListener(C),x!==null&&google.maps.event.removeListener(x),w!==null&&google.maps.event.removeListener(w),k!==null&&google.maps.event.removeListener(k),j!==null&&google.maps.event.removeListener(j),V!==null&&google.maps.event.removeListener(V),K!==null&&google.maps.event.removeListener(K),U!==null&&google.maps.event.removeListener(U),Q!==null&&google.maps.event.removeListener(Q),ee!==null&&google.maps.event.removeListener(ee),m&&m(_e),_e.setMap(null)}},[]),null}G.memo(dnt);class fnt extends G.PureComponent{constructor(){super(...arguments),gr(this,"registeredEvents",[]),gr(this,"state",{polyline:null}),gr(this,"setPolylineCallback",()=>{this.state.polyline!==null&&this.props.onLoad&&this.props.onLoad(this.state.polyline)})}componentDidMount(){var e=new google.maps.Polyline(W3(W3({},this.props.options),{},{map:this.context}));this.registeredEvents=Yn({updaterMap:upe,eventMap:lpe,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{polyline:e}},this.setPolylineCallback)}componentDidUpdate(e){this.state.polyline!==null&&(eo(this.registeredEvents),this.registeredEvents=Yn({updaterMap:upe,eventMap:lpe,prevProps:e,nextProps:this.props,instance:this.state.polyline}))}componentWillUnmount(){this.state.polyline!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),eo(this.registeredEvents),this.state.polyline.setMap(null))}render(){return null}}gr(fnt,"contextType",On);function cpe(r,e){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),i.push.apply(i,n)}return i}function dpe(r){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?cpe(Object(i),!0).forEach(function(n){gr(r,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):cpe(Object(i)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(i,n))})}return r}var fpe={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},hpe={draggable(r,e){r.setDraggable(e)},editable(r,e){r.setEditable(e)},map(r,e){r.setMap(e)},options(r,e){r.setOptions(e)},path(r,e){r.setPath(e)},paths(r,e){r.setPaths(e)},visible(r,e){r.setVisible(e)}};function hnt(r){var{options:e,draggable:i,editable:n,visible:t,path:o,paths:a,onDblClick:s,onDragEnd:l,onDragStart:u,onMouseDown:c,onMouseMove:d,onMouseOut:f,onMouseOver:h,onMouseUp:p,onRightClick:g,onClick:v,onDrag:y,onLoad:m,onUnmount:b,onEdit:S}=r,_=G.useContext(On),[C,T]=G.useState(null),[x,A]=G.useState(null),[w,L]=G.useState(null),[k,D]=G.useState(null),[j,N]=G.useState(null),[V,W]=G.useState(null),[K,H]=G.useState(null),[U,I]=G.useState(null),[Q,Z]=G.useState(null),[ee,ie]=G.useState(null),[de,pe]=G.useState(null),[_e,Te]=G.useState(null);return G.useEffect(()=>{C!==null&&C.setMap(_)},[_]),G.useEffect(()=>{typeof e<"u"&&C!==null&&C.setOptions(e)},[C,e]),G.useEffect(()=>{typeof i<"u"&&C!==null&&C.setDraggable(i)},[C,i]),G.useEffect(()=>{typeof n<"u"&&C!==null&&C.setEditable(n)},[C,n]),G.useEffect(()=>{typeof t<"u"&&C!==null&&C.setVisible(t)},[C,t]),G.useEffect(()=>{typeof o<"u"&&C!==null&&C.setPath(o)},[C,o]),G.useEffect(()=>{typeof a<"u"&&C!==null&&C.setPaths(a)},[C,a]),G.useEffect(()=>{C&&typeof s=="function"&&(x!==null&&google.maps.event.removeListener(x),A(google.maps.event.addListener(C,"dblclick",s)))},[s]),G.useEffect(()=>{C&&(google.maps.event.addListener(C.getPath(),"insert_at",()=>{S==null||S(C)}),google.maps.event.addListener(C.getPath(),"set_at",()=>{S==null||S(C)}),google.maps.event.addListener(C.getPath(),"remove_at",()=>{S==null||S(C)}))},[C,S]),G.useEffect(()=>{C&&typeof l=="function"&&(w!==null&&google.maps.event.removeListener(w),L(google.maps.event.addListener(C,"dragend",l)))},[l]),G.useEffect(()=>{C&&typeof u=="function"&&(k!==null&&google.maps.event.removeListener(k),D(google.maps.event.addListener(C,"dragstart",u)))},[u]),G.useEffect(()=>{C&&typeof c=="function"&&(j!==null&&google.maps.event.removeListener(j),N(google.maps.event.addListener(C,"mousedown",c)))},[c]),G.useEffect(()=>{C&&typeof d=="function"&&(V!==null&&google.maps.event.removeListener(V),W(google.maps.event.addListener(C,"mousemove",d)))},[d]),G.useEffect(()=>{C&&typeof f=="function"&&(K!==null&&google.maps.event.removeListener(K),H(google.maps.event.addListener(C,"mouseout",f)))},[f]),G.useEffect(()=>{C&&typeof h=="function"&&(U!==null&&google.maps.event.removeListener(U),I(google.maps.event.addListener(C,"mouseover",h)))},[h]),G.useEffect(()=>{C&&typeof p=="function"&&(Q!==null&&google.maps.event.removeListener(Q),Z(google.maps.event.addListener(C,"mouseup",p)))},[p]),G.useEffect(()=>{C&&typeof g=="function"&&(ee!==null&&google.maps.event.removeListener(ee),ie(google.maps.event.addListener(C,"rightclick",g)))},[g]),G.useEffect(()=>{C&&typeof v=="function"&&(de!==null&&google.maps.event.removeListener(de),pe(google.maps.event.addListener(C,"click",v)))},[v]),G.useEffect(()=>{C&&typeof y=="function"&&(_e!==null&&google.maps.event.removeListener(_e),Te(google.maps.event.addListener(C,"drag",y)))},[y]),G.useEffect(()=>{var De=new google.maps.Polygon(dpe(dpe({},e),{},{map:_}));return o&&De.setPath(o),a&&De.setPaths(a),typeof t<"u"&&De.setVisible(t),typeof n<"u"&&De.setEditable(n),typeof i<"u"&&De.setDraggable(i),s&&A(google.maps.event.addListener(De,"dblclick",s)),l&&L(google.maps.event.addListener(De,"dragend",l)),u&&D(google.maps.event.addListener(De,"dragstart",u)),c&&N(google.maps.event.addListener(De,"mousedown",c)),d&&W(google.maps.event.addListener(De,"mousemove",d)),f&&H(google.maps.event.addListener(De,"mouseout",f)),h&&I(google.maps.event.addListener(De,"mouseover",h)),p&&Z(google.maps.event.addListener(De,"mouseup",p)),g&&ie(google.maps.event.addListener(De,"rightclick",g)),v&&pe(google.maps.event.addListener(De,"click",v)),y&&Te(google.maps.event.addListener(De,"drag",y)),T(De),m&&m(De),()=>{x!==null&&google.maps.event.removeListener(x),w!==null&&google.maps.event.removeListener(w),k!==null&&google.maps.event.removeListener(k),j!==null&&google.maps.event.removeListener(j),V!==null&&google.maps.event.removeListener(V),K!==null&&google.maps.event.removeListener(K),U!==null&&google.maps.event.removeListener(U),Q!==null&&google.maps.event.removeListener(Q),ee!==null&&google.maps.event.removeListener(ee),de!==null&&google.maps.event.removeListener(de),b&&b(De),De.setMap(null)}},[]),null}G.memo(hnt);class pnt extends G.PureComponent{constructor(){super(...arguments),gr(this,"registeredEvents",[])}componentDidMount(){var e=this.props.options||{};this.polygon=new google.maps.Polygon(e),this.polygon.setMap(this.context),this.registeredEvents=Yn({updaterMap:hpe,eventMap:fpe,prevProps:{},nextProps:this.props,instance:this.polygon}),this.props.onLoad&&this.props.onLoad(this.polygon)}componentDidUpdate(e){this.polygon&&(eo(this.registeredEvents),this.registeredEvents=Yn({updaterMap:hpe,eventMap:fpe,prevProps:e,nextProps:this.props,instance:this.polygon}))}componentWillUnmount(){this.polygon&&(this.props.onUnmount&&this.props.onUnmount(this.polygon),eo(this.registeredEvents),this.polygon&&this.polygon.setMap(null))}render(){return null}}gr(pnt,"contextType",On);function ppe(r,e){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),i.push.apply(i,n)}return i}function G3(r){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?ppe(Object(i),!0).forEach(function(n){gr(r,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):ppe(Object(i)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(i,n))})}return r}var gpe={onBoundsChanged:"bounds_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},vpe={bounds(r,e){r.setBounds(e)},draggable(r,e){r.setDraggable(e)},editable(r,e){r.setEditable(e)},map(r,e){r.setMap(e)},options(r,e){r.setOptions(e)},visible(r,e){r.setVisible(e)}};function gnt(r){var{options:e,bounds:i,draggable:n,editable:t,visible:o,onDblClick:a,onDragEnd:s,onDragStart:l,onMouseDown:u,onMouseMove:c,onMouseOut:d,onMouseOver:f,onMouseUp:h,onRightClick:p,onClick:g,onDrag:v,onBoundsChanged:y,onLoad:m,onUnmount:b}=r,S=G.useContext(On),[_,C]=G.useState(null),[T,x]=G.useState(null),[A,w]=G.useState(null),[L,k]=G.useState(null),[D,j]=G.useState(null),[N,V]=G.useState(null),[W,K]=G.useState(null),[H,U]=G.useState(null),[I,Q]=G.useState(null),[Z,ee]=G.useState(null),[ie,de]=G.useState(null),[pe,_e]=G.useState(null),[Te,De]=G.useState(null);return G.useEffect(()=>{_!==null&&_.setMap(S)},[S]),G.useEffect(()=>{typeof e<"u"&&_!==null&&_.setOptions(e)},[_,e]),G.useEffect(()=>{typeof n<"u"&&_!==null&&_.setDraggable(n)},[_,n]),G.useEffect(()=>{typeof t<"u"&&_!==null&&_.setEditable(t)},[_,t]),G.useEffect(()=>{typeof o<"u"&&_!==null&&_.setVisible(o)},[_,o]),G.useEffect(()=>{typeof i<"u"&&_!==null&&_.setBounds(i)},[_,i]),G.useEffect(()=>{_&&a&&(T!==null&&google.maps.event.removeListener(T),x(google.maps.event.addListener(_,"dblclick",a)))},[a]),G.useEffect(()=>{_&&s&&(A!==null&&google.maps.event.removeListener(A),w(google.maps.event.addListener(_,"dragend",s)))},[s]),G.useEffect(()=>{_&&l&&(L!==null&&google.maps.event.removeListener(L),k(google.maps.event.addListener(_,"dragstart",l)))},[l]),G.useEffect(()=>{_&&u&&(D!==null&&google.maps.event.removeListener(D),j(google.maps.event.addListener(_,"mousedown",u)))},[u]),G.useEffect(()=>{_&&c&&(N!==null&&google.maps.event.removeListener(N),V(google.maps.event.addListener(_,"mousemove",c)))},[c]),G.useEffect(()=>{_&&d&&(W!==null&&google.maps.event.removeListener(W),K(google.maps.event.addListener(_,"mouseout",d)))},[d]),G.useEffect(()=>{_&&f&&(H!==null&&google.maps.event.removeListener(H),U(google.maps.event.addListener(_,"mouseover",f)))},[f]),G.useEffect(()=>{_&&h&&(I!==null&&google.maps.event.removeListener(I),Q(google.maps.event.addListener(_,"mouseup",h)))},[h]),G.useEffect(()=>{_&&p&&(Z!==null&&google.maps.event.removeListener(Z),ee(google.maps.event.addListener(_,"rightclick",p)))},[p]),G.useEffect(()=>{_&&g&&(ie!==null&&google.maps.event.removeListener(ie),de(google.maps.event.addListener(_,"click",g)))},[g]),G.useEffect(()=>{_&&v&&(pe!==null&&google.maps.event.removeListener(pe),_e(google.maps.event.addListener(_,"drag",v)))},[v]),G.useEffect(()=>{_&&y&&(Te!==null&&google.maps.event.removeListener(Te),De(google.maps.event.addListener(_,"bounds_changed",y)))},[y]),G.useEffect(()=>{var Pe=new google.maps.Rectangle(G3(G3({},e),{},{map:S}));return typeof o<"u"&&Pe.setVisible(o),typeof t<"u"&&Pe.setEditable(t),typeof n<"u"&&Pe.setDraggable(n),typeof i<"u"&&Pe.setBounds(i),a&&x(google.maps.event.addListener(Pe,"dblclick",a)),s&&w(google.maps.event.addListener(Pe,"dragend",s)),l&&k(google.maps.event.addListener(Pe,"dragstart",l)),u&&j(google.maps.event.addListener(Pe,"mousedown",u)),c&&V(google.maps.event.addListener(Pe,"mousemove",c)),d&&K(google.maps.event.addListener(Pe,"mouseout",d)),f&&U(google.maps.event.addListener(Pe,"mouseover",f)),h&&Q(google.maps.event.addListener(Pe,"mouseup",h)),p&&ee(google.maps.event.addListener(Pe,"rightclick",p)),g&&de(google.maps.event.addListener(Pe,"click",g)),v&&_e(google.maps.event.addListener(Pe,"drag",v)),y&&De(google.maps.event.addListener(Pe,"bounds_changed",y)),C(Pe),m&&m(Pe),()=>{T!==null&&google.maps.event.removeListener(T),A!==null&&google.maps.event.removeListener(A),L!==null&&google.maps.event.removeListener(L),D!==null&&google.maps.event.removeListener(D),N!==null&&google.maps.event.removeListener(N),W!==null&&google.maps.event.removeListener(W),H!==null&&google.maps.event.removeListener(H),I!==null&&google.maps.event.removeListener(I),Z!==null&&google.maps.event.removeListener(Z),ie!==null&&google.maps.event.removeListener(ie),pe!==null&&google.maps.event.removeListener(pe),Te!==null&&google.maps.event.removeListener(Te),b&&b(Pe),Pe.setMap(null)}},[]),null}G.memo(gnt);class vnt extends G.PureComponent{constructor(){super(...arguments),gr(this,"registeredEvents",[]),gr(this,"state",{rectangle:null}),gr(this,"setRectangleCallback",()=>{this.state.rectangle!==null&&this.props.onLoad&&this.props.onLoad(this.state.rectangle)})}componentDidMount(){var e=new google.maps.Rectangle(G3(G3({},this.props.options),{},{map:this.context}));this.registeredEvents=Yn({updaterMap:vpe,eventMap:gpe,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{rectangle:e}},this.setRectangleCallback)}componentDidUpdate(e){this.state.rectangle!==null&&(eo(this.registeredEvents),this.registeredEvents=Yn({updaterMap:vpe,eventMap:gpe,prevProps:e,nextProps:this.props,instance:this.state.rectangle}))}componentWillUnmount(){this.state.rectangle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),eo(this.registeredEvents),this.state.rectangle.setMap(null))}render(){return null}}gr(vnt,"contextType",On);function ype(r,e){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),i.push.apply(i,n)}return i}function Y3(r){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?ype(Object(i),!0).forEach(function(n){gr(r,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):ype(Object(i)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(i,n))})}return r}var mpe={onCenterChanged:"center_changed",onRadiusChanged:"radius_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},bpe={center(r,e){r.setCenter(e)},draggable(r,e){r.setDraggable(e)},editable(r,e){r.setEditable(e)},map(r,e){r.setMap(e)},options(r,e){r.setOptions(e)},radius(r,e){r.setRadius(e)},visible(r,e){r.setVisible(e)}},ynt={};function mnt(r){var{options:e,center:i,radius:n,draggable:t,editable:o,visible:a,onDblClick:s,onDragEnd:l,onDragStart:u,onMouseDown:c,onMouseMove:d,onMouseOut:f,onMouseOver:h,onMouseUp:p,onRightClick:g,onClick:v,onDrag:y,onCenterChanged:m,onRadiusChanged:b,onLoad:S,onUnmount:_}=r,C=G.useContext(On),[T,x]=G.useState(null),[A,w]=G.useState(null),[L,k]=G.useState(null),[D,j]=G.useState(null),[N,V]=G.useState(null),[W,K]=G.useState(null),[H,U]=G.useState(null),[I,Q]=G.useState(null),[Z,ee]=G.useState(null),[ie,de]=G.useState(null),[pe,_e]=G.useState(null),[Te,De]=G.useState(null),[Pe,Ee]=G.useState(null),[Re,je]=G.useState(null);return G.useEffect(()=>{T!==null&&T.setMap(C)},[C]),G.useEffect(()=>{typeof e<"u"&&T!==null&&T.setOptions(e)},[T,e]),G.useEffect(()=>{typeof t<"u"&&T!==null&&T.setDraggable(t)},[T,t]),G.useEffect(()=>{typeof o<"u"&&T!==null&&T.setEditable(o)},[T,o]),G.useEffect(()=>{typeof a<"u"&&T!==null&&T.setVisible(a)},[T,a]),G.useEffect(()=>{typeof n=="number"&&T!==null&&T.setRadius(n)},[T,n]),G.useEffect(()=>{typeof i<"u"&&T!==null&&T.setCenter(i)},[T,i]),G.useEffect(()=>{T&&s&&(A!==null&&google.maps.event.removeListener(A),w(google.maps.event.addListener(T,"dblclick",s)))},[s]),G.useEffect(()=>{T&&l&&(L!==null&&google.maps.event.removeListener(L),k(google.maps.event.addListener(T,"dragend",l)))},[l]),G.useEffect(()=>{T&&u&&(D!==null&&google.maps.event.removeListener(D),j(google.maps.event.addListener(T,"dragstart",u)))},[u]),G.useEffect(()=>{T&&c&&(N!==null&&google.maps.event.removeListener(N),V(google.maps.event.addListener(T,"mousedown",c)))},[c]),G.useEffect(()=>{T&&d&&(W!==null&&google.maps.event.removeListener(W),K(google.maps.event.addListener(T,"mousemove",d)))},[d]),G.useEffect(()=>{T&&f&&(H!==null&&google.maps.event.removeListener(H),U(google.maps.event.addListener(T,"mouseout",f)))},[f]),G.useEffect(()=>{T&&h&&(I!==null&&google.maps.event.removeListener(I),Q(google.maps.event.addListener(T,"mouseover",h)))},[h]),G.useEffect(()=>{T&&p&&(Z!==null&&google.maps.event.removeListener(Z),ee(google.maps.event.addListener(T,"mouseup",p)))},[p]),G.useEffect(()=>{T&&g&&(ie!==null&&google.maps.event.removeListener(ie),de(google.maps.event.addListener(T,"rightclick",g)))},[g]),G.useEffect(()=>{T&&v&&(pe!==null&&google.maps.event.removeListener(pe),_e(google.maps.event.addListener(T,"click",v)))},[v]),G.useEffect(()=>{T&&y&&(Te!==null&&google.maps.event.removeListener(Te),De(google.maps.event.addListener(T,"drag",y)))},[y]),G.useEffect(()=>{T&&m&&(Pe!==null&&google.maps.event.removeListener(Pe),Ee(google.maps.event.addListener(T,"center_changed",m)))},[v]),G.useEffect(()=>{T&&b&&(Re!==null&&google.maps.event.removeListener(Re),je(google.maps.event.addListener(T,"radius_changed",b)))},[b]),G.useEffect(()=>{var Ke=new google.maps.Circle(Y3(Y3({},e||ynt),{},{map:C}));return typeof n=="number"&&Ke.setRadius(n),typeof i<"u"&&Ke.setCenter(i),typeof n=="number"&&Ke.setRadius(n),typeof a<"u"&&Ke.setVisible(a),typeof o<"u"&&Ke.setEditable(o),typeof t<"u"&&Ke.setDraggable(t),s&&w(google.maps.event.addListener(Ke,"dblclick",s)),l&&k(google.maps.event.addListener(Ke,"dragend",l)),u&&j(google.maps.event.addListener(Ke,"dragstart",u)),c&&V(google.maps.event.addListener(Ke,"mousedown",c)),d&&K(google.maps.event.addListener(Ke,"mousemove",d)),f&&U(google.maps.event.addListener(Ke,"mouseout",f)),h&&Q(google.maps.event.addListener(Ke,"mouseover",h)),p&&ee(google.maps.event.addListener(Ke,"mouseup",p)),g&&de(google.maps.event.addListener(Ke,"rightclick",g)),v&&_e(google.maps.event.addListener(Ke,"click",v)),y&&De(google.maps.event.addListener(Ke,"drag",y)),m&&Ee(google.maps.event.addListener(Ke,"center_changed",m)),b&&je(google.maps.event.addListener(Ke,"radius_changed",b)),x(Ke),S&&S(Ke),()=>{A!==null&&google.maps.event.removeListener(A),L!==null&&google.maps.event.removeListener(L),D!==null&&google.maps.event.removeListener(D),N!==null&&google.maps.event.removeListener(N),W!==null&&google.maps.event.removeListener(W),H!==null&&google.maps.event.removeListener(H),I!==null&&google.maps.event.removeListener(I),Z!==null&&google.maps.event.removeListener(Z),ie!==null&&google.maps.event.removeListener(ie),pe!==null&&google.maps.event.removeListener(pe),Pe!==null&&google.maps.event.removeListener(Pe),Re!==null&&google.maps.event.removeListener(Re),_&&_(Ke),Ke.setMap(null)}},[]),null}G.memo(mnt);class bnt extends G.PureComponent{constructor(){super(...arguments),gr(this,"registeredEvents",[]),gr(this,"state",{circle:null}),gr(this,"setCircleCallback",()=>{this.state.circle!==null&&this.props.onLoad&&this.props.onLoad(this.state.circle)})}componentDidMount(){var e=new google.maps.Circle(Y3(Y3({},this.props.options),{},{map:this.context}));this.registeredEvents=Yn({updaterMap:bpe,eventMap:mpe,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{circle:e}},this.setCircleCallback)}componentDidUpdate(e){this.state.circle!==null&&(eo(this.registeredEvents),this.registeredEvents=Yn({updaterMap:bpe,eventMap:mpe,prevProps:e,nextProps:this.props,instance:this.state.circle}))}componentWillUnmount(){if(this.state.circle!==null){var e;this.props.onUnmount&&this.props.onUnmount(this.state.circle),eo(this.registeredEvents),(e=this.state.circle)===null||e===void 0||e.setMap(null)}}render(){return null}}gr(bnt,"contextType",On);function Spe(r,e){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),i.push.apply(i,n)}return i}function $3(r){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?Spe(Object(i),!0).forEach(function(n){gr(r,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):Spe(Object(i)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(i,n))})}return r}var _pe={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},Ppe={add(r,e){r.add(e)},addgeojson(r,e,i){r.addGeoJson(e,i)},contains(r,e){r.contains(e)},foreach(r,e){r.forEach(e)},loadgeojson(r,e,i,n){r.loadGeoJson(e,i,n)},overridestyle(r,e,i){r.overrideStyle(e,i)},remove(r,e){r.remove(e)},revertstyle(r,e){r.revertStyle(e)},controlposition(r,e){r.setControlPosition(e)},controls(r,e){r.setControls(e)},drawingmode(r,e){r.setDrawingMode(e)},map(r,e){r.setMap(e)},style(r,e){r.setStyle(e)},togeojson(r,e){r.toGeoJson(e)}};function Snt(r){var{options:e,onClick:i,onDblClick:n,onMouseDown:t,onMouseMove:o,onMouseOut:a,onMouseOver:s,onMouseUp:l,onRightClick:u,onAddFeature:c,onRemoveFeature:d,onRemoveProperty:f,onSetGeometry:h,onSetProperty:p,onLoad:g,onUnmount:v}=r,y=G.useContext(On),[m,b]=G.useState(null),[S,_]=G.useState(null),[C,T]=G.useState(null),[x,A]=G.useState(null),[w,L]=G.useState(null),[k,D]=G.useState(null),[j,N]=G.useState(null),[V,W]=G.useState(null),[K,H]=G.useState(null),[U,I]=G.useState(null),[Q,Z]=G.useState(null),[ee,ie]=G.useState(null),[de,pe]=G.useState(null),[_e,Te]=G.useState(null);return G.useEffect(()=>{m!==null&&m.setMap(y)},[y]),G.useEffect(()=>{m&&n&&(S!==null&&google.maps.event.removeListener(S),_(google.maps.event.addListener(m,"dblclick",n)))},[n]),G.useEffect(()=>{m&&t&&(C!==null&&google.maps.event.removeListener(C),T(google.maps.event.addListener(m,"mousedown",t)))},[t]),G.useEffect(()=>{m&&o&&(x!==null&&google.maps.event.removeListener(x),A(google.maps.event.addListener(m,"mousemove",o)))},[o]),G.useEffect(()=>{m&&a&&(w!==null&&google.maps.event.removeListener(w),L(google.maps.event.addListener(m,"mouseout",a)))},[a]),G.useEffect(()=>{m&&s&&(k!==null&&google.maps.event.removeListener(k),D(google.maps.event.addListener(m,"mouseover",s)))},[s]),G.useEffect(()=>{m&&l&&(j!==null&&google.maps.event.removeListener(j),N(google.maps.event.addListener(m,"mouseup",l)))},[l]),G.useEffect(()=>{m&&u&&(V!==null&&google.maps.event.removeListener(V),W(google.maps.event.addListener(m,"rightclick",u)))},[u]),G.useEffect(()=>{m&&i&&(K!==null&&google.maps.event.removeListener(K),H(google.maps.event.addListener(m,"click",i)))},[i]),G.useEffect(()=>{m&&c&&(U!==null&&google.maps.event.removeListener(U),I(google.maps.event.addListener(m,"addfeature",c)))},[c]),G.useEffect(()=>{m&&d&&(Q!==null&&google.maps.event.removeListener(Q),Z(google.maps.event.addListener(m,"removefeature",d)))},[d]),G.useEffect(()=>{m&&f&&(ee!==null&&google.maps.event.removeListener(ee),ie(google.maps.event.addListener(m,"removeproperty",f)))},[f]),G.useEffect(()=>{m&&h&&(de!==null&&google.maps.event.removeListener(de),pe(google.maps.event.addListener(m,"setgeometry",h)))},[h]),G.useEffect(()=>{m&&p&&(_e!==null&&google.maps.event.removeListener(_e),Te(google.maps.event.addListener(m,"setproperty",p)))},[p]),G.useEffect(()=>{if(y!==null){var De=new google.maps.Data($3($3({},e),{},{map:y}));n&&_(google.maps.event.addListener(De,"dblclick",n)),t&&T(google.maps.event.addListener(De,"mousedown",t)),o&&A(google.maps.event.addListener(De,"mousemove",o)),a&&L(google.maps.event.addListener(De,"mouseout",a)),s&&D(google.maps.event.addListener(De,"mouseover",s)),l&&N(google.maps.event.addListener(De,"mouseup",l)),u&&W(google.maps.event.addListener(De,"rightclick",u)),i&&H(google.maps.event.addListener(De,"click",i)),c&&I(google.maps.event.addListener(De,"addfeature",c)),d&&Z(google.maps.event.addListener(De,"removefeature",d)),f&&ie(google.maps.event.addListener(De,"removeproperty",f)),h&&pe(google.maps.event.addListener(De,"setgeometry",h)),p&&Te(google.maps.event.addListener(De,"setproperty",p)),b(De),g&&g(De)}return()=>{m&&(S!==null&&google.maps.event.removeListener(S),C!==null&&google.maps.event.removeListener(C),x!==null&&google.maps.event.removeListener(x),w!==null&&google.maps.event.removeListener(w),k!==null&&google.maps.event.removeListener(k),j!==null&&google.maps.event.removeListener(j),V!==null&&google.maps.event.removeListener(V),K!==null&&google.maps.event.removeListener(K),U!==null&&google.maps.event.removeListener(U),Q!==null&&google.maps.event.removeListener(Q),ee!==null&&google.maps.event.removeListener(ee),de!==null&&google.maps.event.removeListener(de),_e!==null&&google.maps.event.removeListener(_e),v&&v(m),m.setMap(null))}},[]),null}G.memo(Snt);class _nt extends G.PureComponent{constructor(){super(...arguments),gr(this,"registeredEvents",[]),gr(this,"state",{data:null}),gr(this,"setDataCallback",()=>{this.state.data!==null&&this.props.onLoad&&this.props.onLoad(this.state.data)})}componentDidMount(){if(this.context!==null){var e=new google.maps.Data($3($3({},this.props.options),{},{map:this.context}));this.registeredEvents=Yn({updaterMap:Ppe,eventMap:_pe,prevProps:{},nextProps:this.props,instance:e}),this.setState(()=>({data:e}),this.setDataCallback)}}componentDidUpdate(e){this.state.data!==null&&(eo(this.registeredEvents),this.registeredEvents=Yn({updaterMap:Ppe,eventMap:_pe,prevProps:e,nextProps:this.props,instance:this.state.data}))}componentWillUnmount(){this.state.data!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),eo(this.registeredEvents),this.state.data&&this.state.data.setMap(null))}render(){return null}}gr(_nt,"contextType",On);function Cpe(r,e){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),i.push.apply(i,n)}return i}function Tpe(r){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?Cpe(Object(i),!0).forEach(function(n){gr(r,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):Cpe(Object(i)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(i,n))})}return r}var xpe={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},Epe={options(r,e){r.setOptions(e)},url(r,e){r.setUrl(e)},zIndex(r,e){r.setZIndex(e)}};class Pnt extends G.PureComponent{constructor(){super(...arguments),gr(this,"registeredEvents",[]),gr(this,"state",{kmlLayer:null}),gr(this,"setKmlLayerCallback",()=>{this.state.kmlLayer!==null&&this.props.onLoad&&this.props.onLoad(this.state.kmlLayer)})}componentDidMount(){var e=new google.maps.KmlLayer(Tpe(Tpe({},this.props.options),{},{map:this.context}));this.registeredEvents=Yn({updaterMap:Epe,eventMap:xpe,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{kmlLayer:e}},this.setKmlLayerCallback)}componentDidUpdate(e){this.state.kmlLayer!==null&&(eo(this.registeredEvents),this.registeredEvents=Yn({updaterMap:Epe,eventMap:xpe,prevProps:e,nextProps:this.props,instance:this.state.kmlLayer}))}componentWillUnmount(){this.state.kmlLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),eo(this.registeredEvents),this.state.kmlLayer.setMap(null))}render(){return null}}gr(Pnt,"contextType",On);function Zwe(r,e){return typeof e=="function"?e(r.offsetWidth,r.offsetHeight):{x:0,y:0}}function Cnt(r,e){return new e(r.lat,r.lng)}function Tnt(r,e){return new e(new google.maps.LatLng(r.ne.lat,r.ne.lng),new google.maps.LatLng(r.sw.lat,r.sw.lng))}function xnt(r,e,i){return r instanceof e?r:i(r,e)}function Ent(r,e,i){return r instanceof e?r:i(r,e)}function Ant(r,e,i){var n=r&&r.fromLatLngToDivPixel(i.getNorthEast()),t=r&&r.fromLatLngToDivPixel(i.getSouthWest());return n&&t?{left:"".concat(t.x+e.x,"px"),top:"".concat(n.y+e.y,"px"),width:"".concat(n.x-t.x-e.x,"px"),height:"".concat(t.y-n.y-e.y,"px")}:{left:"-9999px",top:"-9999px"}}function wnt(r,e,i){var n=r&&r.fromLatLngToDivPixel(i);if(n){var{x:t,y:o}=n;return{left:"".concat(t+e.x,"px"),top:"".concat(o+e.y,"px")}}return{left:"-9999px",top:"-9999px"}}function Jwe(r,e,i,n){return i!==void 0?Ant(r,e,Ent(i,google.maps.LatLngBounds,Tnt)):wnt(r,e,xnt(n,google.maps.LatLng,Cnt))}function Ont(r,e){return r.left===e.left&&r.top===e.top&&r.width===e.height&&r.height===e.height}function Ape(r,e){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),i.push.apply(i,n)}return i}function Dnt(r){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?Ape(Object(i),!0).forEach(function(n){gr(r,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):Ape(Object(i)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(i,n))})}return r}function Rnt(r,e,i,n,t){class o extends google.maps.OverlayView{constructor(s,l,u,c){super(),this.container=s,this.pane=l,this.position=u,this.bounds=c}onAdd(){var s,l=(s=this.getPanes())===null||s===void 0?void 0:s[this.pane];l==null||l.appendChild(this.container)}draw(){var s=this.getProjection(),l=Dnt({},this.container?Zwe(this.container,t):{x:0,y:0}),u=Jwe(s,l,this.bounds,this.position);for(var[c,d]of Object.entries(u))this.container.style[c]=d}onRemove(){this.container.parentNode!==null&&this.container.parentNode.removeChild(this.container)}}return new o(r,e,i,n)}function wpe(r,e){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),i.push.apply(i,n)}return i}function Mnt(r){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?wpe(Object(i),!0).forEach(function(n){gr(r,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):wpe(Object(i)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(i,n))})}return r}function Ope(r){if(!r)return"";var e=r instanceof google.maps.LatLng?r:new google.maps.LatLng(r.lat,r.lng);return e+""}function Dpe(r){if(!r)return"";var e=r instanceof google.maps.LatLngBounds?r:new google.maps.LatLngBounds(new google.maps.LatLng(r.south,r.east),new google.maps.LatLng(r.north,r.west));return e+""}function Lnt(r){var{position:e,bounds:i,mapPaneName:n,zIndex:t,onLoad:o,onUnmount:a,getPixelPositionOffset:s,children:l}=r,u=G.useContext(On),c=G.useMemo(()=>{var f=document.createElement("div");return f.style.position="absolute",f},[]),d=G.useMemo(()=>Rnt(c,n,e,i,s),[c,n,e,i]);return G.useEffect(()=>(o==null||o(d),d==null||d.setMap(u),()=>{a==null||a(d),d==null||d.setMap(null)}),[u,d]),G.useEffect(()=>{c.style.zIndex="".concat(t)},[t,c]),au.createPortal(l,c)}G.memo(Lnt);class QM extends G.PureComponent{constructor(e){super(e),gr(this,"state",{paneEl:null,containerStyle:{position:"absolute"}}),gr(this,"updatePane",()=>{var n=this.props.mapPaneName,t=this.overlayView.getPanes();ou(!!n,"OverlayView requires props.mapPaneName but got %s",n),t?this.setState({paneEl:t[n]}):this.setState({paneEl:null})}),gr(this,"onAdd",()=>{var n,t;this.updatePane(),(n=(t=this.props).onLoad)===null||n===void 0||n.call(t,this.overlayView)}),gr(this,"onPositionElement",()=>{var n=this.overlayView.getProjection(),t=Mnt({x:0,y:0},this.containerRef.current?Zwe(this.containerRef.current,this.props.getPixelPositionOffset):{}),o=Jwe(n,t,this.props.bounds,this.props.position);if(!Ont(o,{left:this.state.containerStyle.left,top:this.state.containerStyle.top,width:this.state.containerStyle.width,height:this.state.containerStyle.height})){var a,s,l,u;this.setState({containerStyle:{top:(a=o.top)!==null&&a!==void 0?a:0,left:(s=o.left)!==null&&s!==void 0?s:0,width:(l=o.width)!==null&&l!==void 0?l:0,height:(u=o.height)!==null&&u!==void 0?u:0,position:"absolute"}})}}),gr(this,"draw",()=>{this.onPositionElement()}),gr(this,"onRemove",()=>{var n,t;this.setState(()=>({paneEl:null})),(n=(t=this.props).onUnmount)===null||n===void 0||n.call(t,this.overlayView)}),this.containerRef=G.createRef();var i=new google.maps.OverlayView;i.onAdd=this.onAdd,i.draw=this.draw,i.onRemove=this.onRemove,this.overlayView=i}componentDidMount(){this.overlayView.setMap(this.context)}componentDidUpdate(e){var i=Ope(e.position),n=Ope(this.props.position),t=Dpe(e.bounds),o=Dpe(this.props.bounds);(i!==n||t!==o)&&this.overlayView.draw(),e.mapPaneName!==this.props.mapPaneName&&this.updatePane()}componentWillUnmount(){this.overlayView.setMap(null)}render(){var e=this.state.paneEl;return e?au.createPortal(R.jsx("div",{ref:this.containerRef,style:this.state.containerStyle,children:G.Children.only(this.props.children)}),e):null}}gr(QM,"FLOAT_PANE","floatPane");gr(QM,"MAP_PANE","mapPane");gr(QM,"MARKER_LAYER","markerLayer");gr(QM,"OVERLAY_LAYER","overlayLayer");gr(QM,"OVERLAY_MOUSE_TARGET","overlayMouseTarget");gr(QM,"contextType",On);function knt(){}function Rpe(r,e){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),i.push.apply(i,n)}return i}function Mpe(r){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?Rpe(Object(i),!0).forEach(function(n){gr(r,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):Rpe(Object(i)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(i,n))})}return r}var Lpe={onDblClick:"dblclick",onClick:"click"},kpe={opacity(r,e){r.setOpacity(e)}};function Int(r){var{url:e,bounds:i,options:n,visible:t}=r,o=G.useContext(On),a=new google.maps.LatLngBounds(new google.maps.LatLng(i.south,i.west),new google.maps.LatLng(i.north,i.east)),s=G.useMemo(()=>new google.maps.GroundOverlay(e,a,n),[]);return G.useEffect(()=>{s!==null&&s.setMap(o)},[o]),G.useEffect(()=>{typeof e<"u"&&s!==null&&(s.set("url",e),s.setMap(o))},[s,e]),G.useEffect(()=>{typeof t<"u"&&s!==null&&s.setOpacity(t?1:0)},[s,t]),G.useEffect(()=>{var l=new google.maps.LatLngBounds(new google.maps.LatLng(i.south,i.west),new google.maps.LatLng(i.north,i.east));typeof i<"u"&&s!==null&&(s.set("bounds",l),s.setMap(o))},[s,i]),null}G.memo(Int);class Qwe extends G.PureComponent{constructor(){super(...arguments),gr(this,"registeredEvents",[]),gr(this,"state",{groundOverlay:null}),gr(this,"setGroundOverlayCallback",()=>{this.state.groundOverlay!==null&&this.props.onLoad&&this.props.onLoad(this.state.groundOverlay)})}componentDidMount(){ou(!!this.props.url||!!this.props.bounds,"For GroundOverlay, url and bounds are passed in to constructor and are immutable after instantiated. This is the behavior of Google Maps JavaScript API v3 ( See https://developers.google.com/maps/documentation/javascript/reference#GroundOverlay) Hence, use the corresponding two props provided by `react-google-maps-api`, url and bounds. In some cases, you'll need the GroundOverlay component to reflect the changes of url and bounds. You can leverage the React's key property to remount the component. Typically, just `key={url}` would serve your need. See https://github.com/tomchentw/react-google-maps/issues/655");var e=new google.maps.GroundOverlay(this.props.url,this.props.bounds,Mpe(Mpe({},this.props.options),{},{map:this.context}));this.registeredEvents=Yn({updaterMap:kpe,eventMap:Lpe,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{groundOverlay:e}},this.setGroundOverlayCallback)}componentDidUpdate(e){this.state.groundOverlay!==null&&(eo(this.registeredEvents),this.registeredEvents=Yn({updaterMap:kpe,eventMap:Lpe,prevProps:e,nextProps:this.props,instance:this.state.groundOverlay}))}componentWillUnmount(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))}render(){return null}}gr(Qwe,"defaultProps",{onLoad:knt});gr(Qwe,"contextType",On);function Ipe(r,e){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),i.push.apply(i,n)}return i}function q3(r){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?Ipe(Object(i),!0).forEach(function(n){gr(r,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):Ipe(Object(i)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(i,n))})}return r}var Npe={},Fpe={data(r,e){r.setData(e)},map(r,e){r.setMap(e)},options(r,e){r.setOptions(e)}};function Nnt(r){var{data:e,onLoad:i,onUnmount:n,options:t}=r,o=G.useContext(On),[a,s]=G.useState(null);return G.useEffect(()=>{google.maps.visualization||ou(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)},[]),G.useEffect(()=>{ou(!!e,"data property is required in HeatmapLayer %s",e)},[e]),G.useEffect(()=>{a!==null&&a.setMap(o)},[o]),G.useEffect(()=>{t&&a!==null&&a.setOptions(t)},[a,t]),G.useEffect(()=>{var l=new google.maps.visualization.HeatmapLayer(q3(q3({},t),{},{data:e,map:o}));return s(l),i&&i(l),()=>{a!==null&&(n&&n(a),a.setMap(null))}},[]),null}G.memo(Nnt);class Fnt extends G.PureComponent{constructor(){super(...arguments),gr(this,"registeredEvents",[]),gr(this,"state",{heatmapLayer:null}),gr(this,"setHeatmapLayerCallback",()=>{this.state.heatmapLayer!==null&&this.props.onLoad&&this.props.onLoad(this.state.heatmapLayer)})}componentDidMount(){ou(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to <LoadScript />? %s',google.maps.visualization),ou(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);var e=new google.maps.visualization.HeatmapLayer(q3(q3({},this.props.options),{},{data:this.props.data,map:this.context}));this.registeredEvents=Yn({updaterMap:Fpe,eventMap:Npe,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{heatmapLayer:e}},this.setHeatmapLayerCallback)}componentDidUpdate(e){eo(this.registeredEvents),this.registeredEvents=Yn({updaterMap:Fpe,eventMap:Npe,prevProps:e,nextProps:this.props,instance:this.state.heatmapLayer})}componentWillUnmount(){this.state.heatmapLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),eo(this.registeredEvents),this.state.heatmapLayer.setMap(null))}render(){return null}}gr(Fnt,"contextType",On);var jpe={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},Bpe={register(r,e,i){r.registerPanoProvider(e,i)},links(r,e){r.setLinks(e)},motionTracking(r,e){r.setMotionTracking(e)},options(r,e){r.setOptions(e)},pano(r,e){r.setPano(e)},position(r,e){r.setPosition(e)},pov(r,e){r.setPov(e)},visible(r,e){r.setVisible(e)},zoom(r,e){r.setZoom(e)}};class jnt extends G.PureComponent{constructor(){super(...arguments),gr(this,"registeredEvents",[]),gr(this,"state",{streetViewPanorama:null}),gr(this,"setStreetViewPanoramaCallback",()=>{this.state.streetViewPanorama!==null&&this.props.onLoad&&this.props.onLoad(this.state.streetViewPanorama)})}componentDidMount(){var e,i,n=(e=(i=this.context)===null||i===void 0?void 0:i.getStreetView())!==null&&e!==void 0?e:null;this.registeredEvents=Yn({updaterMap:Bpe,eventMap:jpe,prevProps:{},nextProps:this.props,instance:n}),this.setState(()=>({streetViewPanorama:n}),this.setStreetViewPanoramaCallback)}componentDidUpdate(e){this.state.streetViewPanorama!==null&&(eo(this.registeredEvents),this.registeredEvents=Yn({updaterMap:Bpe,eventMap:jpe,prevProps:e,nextProps:this.props,instance:this.state.streetViewPanorama}))}componentWillUnmount(){this.state.streetViewPanorama!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),eo(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))}render(){return null}}gr(jnt,"contextType",On);class Bnt extends G.PureComponent{constructor(){super(...arguments),gr(this,"state",{streetViewService:null}),gr(this,"setStreetViewServiceCallback",()=>{this.state.streetViewService!==null&&this.props.onLoad&&this.props.onLoad(this.state.streetViewService)})}componentDidMount(){var e=new google.maps.StreetViewService;this.setState(function(){return{streetViewService:e}},this.setStreetViewServiceCallback)}componentWillUnmount(){this.state.streetViewService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)}render(){return null}}gr(Bnt,"contextType",On);var Vpe={onDirectionsChanged:"directions_changed"},Hpe={directions(r,e){r.setDirections(e)},map(r,e){r.setMap(e)},options(r,e){r.setOptions(e)},panel(r,e){r.setPanel(e)},routeIndex(r,e){r.setRouteIndex(e)}};class Vnt extends G.PureComponent{constructor(){super(...arguments),gr(this,"registeredEvents",[]),gr(this,"state",{directionsRenderer:null}),gr(this,"setDirectionsRendererCallback",()=>{this.state.directionsRenderer!==null&&(this.state.directionsRenderer.setMap(this.context),this.props.onLoad&&this.props.onLoad(this.state.directionsRenderer))})}componentDidMount(){var e=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=Yn({updaterMap:Hpe,eventMap:Vpe,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{directionsRenderer:e}},this.setDirectionsRendererCallback)}componentDidUpdate(e){this.state.directionsRenderer!==null&&(eo(this.registeredEvents),this.registeredEvents=Yn({updaterMap:Hpe,eventMap:Vpe,prevProps:e,nextProps:this.props,instance:this.state.directionsRenderer}))}componentWillUnmount(){this.state.directionsRenderer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),eo(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))}render(){return null}}gr(Vnt,"contextType",On);var Upe={onPlacesChanged:"places_changed"},zpe={bounds(r,e){r.setBounds(e)}};class Hnt extends G.PureComponent{constructor(){super(...arguments),gr(this,"registeredEvents",[]),gr(this,"containerElement",G.createRef()),gr(this,"state",{searchBox:null}),gr(this,"setSearchBoxCallback",()=>{this.state.searchBox!==null&&this.props.onLoad&&this.props.onLoad(this.state.searchBox)})}componentDidMount(){if(ou(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places),this.containerElement!==null&&this.containerElement.current!==null){var e=this.containerElement.current.querySelector("input");if(e!==null){var i=new google.maps.places.SearchBox(e,this.props.options);this.registeredEvents=Yn({updaterMap:zpe,eventMap:Upe,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{searchBox:i}},this.setSearchBoxCallback)}}}componentDidUpdate(e){this.state.searchBox!==null&&(eo(this.registeredEvents),this.registeredEvents=Yn({updaterMap:zpe,eventMap:Upe,prevProps:e,nextProps:this.props,instance:this.state.searchBox}))}componentWillUnmount(){this.state.searchBox!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),eo(this.registeredEvents))}render(){return R.jsx("div",{ref:this.containerElement,children:G.Children.only(this.props.children)})}}gr(Hnt,"contextType",On);var Wpe={onPlaceChanged:"place_changed"},Gpe={bounds(r,e){r.setBounds(e)},restrictions(r,e){r.setComponentRestrictions(e)},fields(r,e){r.setFields(e)},options(r,e){r.setOptions(e)},types(r,e){r.setTypes(e)}};class e1e extends G.PureComponent{constructor(){super(...arguments),gr(this,"registeredEvents",[]),gr(this,"containerElement",G.createRef()),gr(this,"state",{autocomplete:null}),gr(this,"setAutocompleteCallback",()=>{this.state.autocomplete!==null&&this.props.onLoad&&this.props.onLoad(this.state.autocomplete)})}componentDidMount(){var e;ou(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places);var i=(e=this.containerElement.current)===null||e===void 0?void 0:e.querySelector("input");if(i){var n=new google.maps.places.Autocomplete(i,this.props.options);this.registeredEvents=Yn({updaterMap:Gpe,eventMap:Wpe,prevProps:{},nextProps:this.props,instance:n}),this.setState(()=>({autocomplete:n}),this.setAutocompleteCallback)}}componentDidUpdate(e){eo(this.registeredEvents),this.registeredEvents=Yn({updaterMap:Gpe,eventMap:Wpe,prevProps:e,nextProps:this.props,instance:this.state.autocomplete})}componentWillUnmount(){this.state.autocomplete!==null&&eo(this.registeredEvents)}render(){return R.jsx("div",{ref:this.containerElement,className:this.props.className,children:G.Children.only(this.props.children)})}}gr(e1e,"defaultProps",{className:""});gr(e1e,"contextType",On);const Unt=17,znt=25,Wnt=15,Gnt="M 37 12.5 c 0 6.63 -5.37 12 -12 12 s -12 -5.37 -12 -12 S 18.37 0.5 25 0.5 s 12 5.37 12 12 Z";function Ynt(r){const e=G.useRef(null),[i,n]=G.useState(!1),[t,o]=G.useState(),{isLoaded:a}=yit({id:"google-map-script",googleMapsApiKey:r.googleMapsApiKey});G.useEffect(()=>{console.log(`Mounting Google Maps map, ${e.current}`)},[]),G.useEffect(()=>{t!==void 0&&console.error(t,"Double check the settings in the map panel and make sure that the selected latitude and longitude signals correspond to the actual latitude and longitude values.")},[t]);const s=G.useCallback(u=>{const c=new google.maps.LatLngBounds;e.current=u,u.fitBounds(c)},[]);G.useEffect(()=>{if(a){const u=e.current;u&&(r.latitude<=90&&r.longitude<=180?(o(void 0),u.panTo(new google.maps.LatLng(r.latitude,r.longitude))):o("Invalid latitude or longitude signal value"))}},[r.latitude,r.longitude,a]),G.useEffect(()=>{a&&!i&&r.longitude!==181&&r.latitude!==91&&(l(),n(!0))},[a,i,r.latitude,r.longitude]);const l=()=>{if(a){const u=e.current;u&&(u.setCenter(new google.maps.LatLng(r.latitude,r.longitude)),u.setZoom(Unt))}};return R.jsxs(R.Fragment,{children:[a&&R.jsx(oit,{options:{streetViewControl:!1,mapTypeControl:!1,fullscreenControl:!1},mapContainerClassName:"w-full h-full",onLoad:s,children:R.jsx(Gwe,{onClick:()=>{l()},icon:{path:Gnt,strokeColor:"white",fillColor:"#4086f5",fillOpacity:1,strokeWeight:3,anchor:new window.google.maps.Point(znt,Wnt),scale:1},position:{lat:r.latitude,lng:r.longitude}})}),!a&&R.jsxs("div",{className:"h-full w-full flex flex-col items-center justify-center",children:[R.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-2 border-primary border-t-transparent"}),R.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Loading map..."})]})]})}function $nt(r){const e=G.useRef(void 0),i=G.useRef(void 0),[n,t]=G.useState(181),[o,a]=G.useState(91),s=Cj();return G.useEffect(()=>(console.debug("Mounted map panel"),()=>{const u=[e.current,i.current].filter(Boolean);u.length>0&&s.removeSubscriptions(u)}),[]),G.useEffect(()=>{if(r.latitudeSignal&&r.longitudeSignal){const u=[e.current,i.current].filter(Boolean);u.length>0&&s.removeSubscriptions(u);const c=new _F([r.longitudeSignal.id],f=>{const h=f.signals.find(p=>{var g;return p.name===((g=r.longitudeSignal)==null?void 0:g.name)});h&&t(h.value)},()=>{});e.current=c.subscriptionId,s.addPendingSubscription(c);const d=new _F([r.latitudeSignal.id],f=>{const h=f.signals.find(p=>{var g;return p.name===((g=r.latitudeSignal)==null?void 0:g.name)});h&&a(h.value)},()=>{});i.current=d.subscriptionId,s.addPendingSubscription(d),s.applyPendingSubscriptions()}},[r.longitudeSignal,r.latitudeSignal,s]),r.latitudeSignal!==void 0&&r.longitudeSignal!==void 0?R.jsx("div",{className:"shadow-sm w-full h-full",children:R.jsx(Ynt,{latitude:o,longitude:n,googleMapsApiKey:r.googleMapsApiKey})}):null}const qnt=r=>{try{return typeof window<"u"&&window.location&&new URLSearchParams(window.location.search).has(r)?!0:localStorage.getItem(r)!==null}catch{return!1}},t1e=()=>qnt("DEV_MODE");function Xnt(r){const e=SEe(r.videoPanelSettings.recordingSessionPath??""),[i,n]=G.useState(0),[t,o]=G.useState(),[a,s]=G.useState(0),[l,u]=G.useState("0"),[c,d]=G.useState(0),[f,h]=G.useState(!1),[p,g]=G.useState(!1),[v,y]=G.useState(!0),[m,b]=G.useState(),[S,_]=G.useState(),[C,T]=G.useState(),[x,A]=G.useState(!1),w=r.soundMuted!==void 0?r.soundMuted:v,L=r.onSoundMutedChange||y,k=r.testOffset!==void 0?r.testOffset:C,D=r.onTestOffsetChange||T,j=r.showDebugPanel!==void 0?r.showDebugPanel:x,N=r.onShowDebugPanelChange||A,V=G.useRef(null),W=G.useRef(null);G.useEffect(()=>{if(t&&e){const Pe=isNaN(t.videoPlayerCurrentTimeSecs)?0:t.videoPlayerCurrentTimeSecs,Ee=isNaN(t.videoLengthSeconds)?0:t.videoLengthSeconds;s(Pe),n(Ee)}},[t,e]),G.useEffect(()=>{if(r.onVideoInfoChange){const Pe=K(),Ee=I();r.onVideoInfoChange({videoFilePath:r.videoPanelSettings.videoFilePath,offsetSeconds:Pe,lengthSeconds:i,currentTimeSeconds:a,hasEnded:Ee-Pe>=i})}},[a,i,r.videoPanelSettings.videoFilePath,S,m]),G.useEffect(()=>{if(m){const Pe=m.recordingSessionInfo.videos.filter(Ee=>Ee.location===r.videoPanelSettings.videoFilePath);Pe.length>0?_(Pe[0]):_(void 0)}},[m]),G.useEffect(()=>{S&&(d(S.offsetMs),u(S.offsetMs.toFixed(2)))},[S]),G.useEffect(()=>{const Pe=Math.round(c*100)/100;u(`${Pe}`)},[c]),G.useEffect(()=>{b(e)},[e,b]),G.useEffect(()=>{function Pe(Ee){V.current&&!V.current.contains(Ee.target)&&W.current&&!W.current.contains(Ee.target)&&h(!1)}if(f)return document.addEventListener("mousedown",Pe),()=>document.removeEventListener("mousedown",Pe)},[f]);const K=()=>k!==void 0?k:S?Math.round(S.offsetMs/1e3):0,H=()=>I()-K()>=i,U=()=>I()>0,I=()=>m?m.playbackControls.elapsedTimeMs/1e3:0,Q=()=>R.jsxs("div",{ref:V,className:Wi("absolute right-0 top-full mt-1 z-50","min-w-[200px] py-2 px-3","bg-white dark:bg-neutral-800","border border-neutral-200 dark:border-neutral-700","rounded-md shadow-lg"),children:[t1e()&&R.jsxs("div",{className:"flex items-center justify-between py-1",children:[R.jsx("p",{className:"m-0 text-sm font-semibold text-foreground dark:text-neutral-200",children:"Debug mode"}),R.jsx("input",{type:"checkbox",checked:j,onChange:Pe=>N==null?void 0:N(Pe.target.checked),className:"w-4 h-4 rounded border-neutral-400 dark:border-neutral-500 text-primary"})]}),j&&R.jsxs(R.Fragment,{children:[R.jsxs("div",{className:"flex items-center justify-between py-1",children:[R.jsx("p",{className:"m-0 text-sm font-semibold text-foreground dark:text-neutral-200",children:"Offset (test only)"}),R.jsxs("div",{className:"flex items-center",children:[R.jsx("button",{className:"p-0.5 bg-transparent border-0 text-primary hover:text-primary/80",title:"Decrease offset",onClick:()=>{const Pe=k!==void 0?k-.5:K()-.5;D==null||D(Pe)},children:R.jsx(kGe,{sx:{fontSize:14}})}),R.jsx("p",{className:"mb-0 px-1 text-sm text-foreground dark:text-neutral-200",children:K().toFixed(1)}),R.jsx("button",{className:"p-0.5 bg-transparent border-0 text-primary hover:text-primary/80",title:"Increase offset",onClick:()=>{const Pe=k!==void 0?k+.5:K()+.5;D==null||D(Pe)},children:R.jsx(xGe,{sx:{fontSize:14}})})]})]}),R.jsxs("div",{className:"flex items-center justify-between py-1",children:[R.jsx("p",{className:"m-0 text-sm font-semibold text-foreground dark:text-neutral-200",children:"Restore offset"}),R.jsx("button",{onClick:()=>D==null?void 0:D(void 0),className:Wi("px-2 py-1 rounded","bg-primary text-primary-foreground text-xs","hover:bg-primary/90"),children:R.jsx(wGe,{sx:{fontSize:14}})})]})]}),R.jsxs("div",{className:"flex items-center justify-between py-1",children:[R.jsx("p",{className:"m-0 text-sm font-semibold text-foreground dark:text-neutral-200",children:"Sound"}),R.jsxs("button",{onClick:()=>L==null?void 0:L(!w),className:Wi("px-2 py-1 rounded","bg-primary text-primary-foreground text-xs","hover:bg-primary/90"),children:[!w&&R.jsx(jGe,{sx:{fontSize:16}}),w&&R.jsx(FGe,{sx:{fontSize:16}})]})]})]}),Z=()=>R.jsx("div",{className:"flex justify-center",style:{marginTop:2,marginBottom:1,height:35},children:R.jsx("div",{className:"rounded-lg bg-green-100 dark:bg-green-900/30 ps-1 mx-1",style:{marginTop:4,marginBottom:3},children:R.jsxs("div",{className:"flex items-center flex-grow-0 ps-2 pe-0",children:[R.jsx(NGe,{sx:{fontSize:17},className:"text-green-600 dark:text-green-400 me-3"}),R.jsx("p",{className:"hidden md:block mb-0 text-sm text-green-800 dark:text-green-300 me-2",children:"To sync, drag video slider or enter seconds"}),R.jsx("p",{className:"block md:hidden mb-0 text-sm text-green-800 dark:text-green-300 me-2",children:"Set delay"}),R.jsx("input",{type:"text",className:Wi("w-[50px] px-1 py-1 m-0 ms-1 me-2","bg-white dark:bg-neutral-800","border border-neutral-300 dark:border-neutral-600","rounded text-xs","text-foreground dark:text-neutral-200"),value:l===void 0?"":l,onChange:Pe=>{console.log("desiredVideoOffsetSecondsInput changed",l);const Ee=Pe.target.value;/^-?\d*[.,]?\d{0,2}$/.test(Ee)&&u(Ee)}}),R.jsx("button",{disabled:e&&e.playbackControls.isPaused,className:"p-0 bg-transparent border-0 text-neutral-600 dark:text-neutral-400 hover:text-neutral-800 dark:hover:text-neutral-200",style:{paddingRight:0},onClick:()=>{g(!1)},children:R.jsx(tM,{sx:{fontSize:15}})})]})})}),ee=()=>{if(U()&&K()-I()>1&&K()>0)return R.jsxs("span",{className:"text-xs m-0 text-foreground dark:text-neutral-200",children:["Starts in ",(K()-I()).toFixed(0),"s"]});const Pe=`${iM(a*1e3)} / ${iM(Math.round(i*1e3))}`;return R.jsx("span",{className:"text-xs m-0 truncate text-foreground dark:text-neutral-200",title:Pe,children:Pe})},ie=()=>{if(p)return R.jsx(R.Fragment,{children:Z()});const Pe=H()?"Video has ended":`Offset: ${K()}s`;return R.jsx("div",{className:"flex ps-2 h-full flex-col justify-center items-start",style:{minWidth:0},children:R.jsxs("p",{className:"m-0 text-sm text-left text-foreground dark:text-neutral-200 truncate",title:r.videoPanelSettings.videoFilePath,children:[r.videoPanelSettings.videoFilePath,R.jsxs("span",{className:"flex justify-between",style:{minWidth:0,maxWidth:"300px"},children:[R.jsx("span",{className:"m-0 text-xs text-muted-foreground truncate",title:Pe,children:Pe}),ee()]})]})})},de=()=>R.jsx("div",{className:"flex items-start truncate",children:R.jsxs("p",{className:"text-xs m-1 p-1 text-left text-foreground dark:text-neutral-200 truncate w-full",children:["Player time: ",(t==null?void 0:t.videoPlayerCurrentTimeSecs)??"N/A",R.jsx("br",{}),"Expected player time: ",(t==null?void 0:t.expectedSecsIntoVideo)??"N/A",R.jsx("br",{}),"Recording time: ",(t==null?void 0:t.recordingElapsedTime)??"N/A",R.jsx("br",{}),"Max allowed drift: ",(t==null?void 0:t.currentMaxDriftSeconds)??"N/A",R.jsx("br",{}),"Current drift:"," ",(t==null?void 0:t.videoPlayerCurrentTimeSecs)!==void 0&&(t==null?void 0:t.expectedSecsIntoVideo)!==void 0?t.videoPlayerCurrentTimeSecs-t.expectedSecsIntoVideo:"N/A",R.jsx("br",{}),"Offset: ",t!=null&&t.currentOffset?t.currentOffset:"N/A"]})}),pe=()=>R.jsx("div",{className:"h-full flex justify-center items-center p-4",children:R.jsx("div",{className:"w-full max-w-md rounded-xl border-2 border-dashed border-neutral-300 dark:border-neutral-600 bg-neutral-100/30 dark:bg-neutral-800/30 flex items-center justify-center p-8",children:R.jsxs("div",{className:"flex flex-col items-center gap-2 text-neutral-600 dark:text-neutral-400",children:[R.jsx("div",{className:"w-12 h-12 rounded-full bg-neutral-200 dark:bg-neutral-700 flex items-center justify-center",children:R.jsx(LGe,{className:"text-neutral-500 dark:text-neutral-400",sx:{fontSize:24}})}),R.jsx("span",{className:"text-sm font-medium text-center",children:"No video available"}),R.jsx("span",{className:"text-xs text-center text-neutral-500 dark:text-neutral-500",children:"Recording session is not open or video has been removed"})]})})}),_e=()=>R.jsx(R.Fragment,{children:!p&&R.jsx("button",{onClick:()=>r.removePanelFunction(r.panelKey),className:"p-1 bg-transparent border-0 text-neutral-600 dark:text-neutral-400 hover:text-neutral-800 dark:hover:text-neutral-200 rounded",children:R.jsx(tM,{sx:{fontSize:24}})})}),Te=()=>R.jsx(R.Fragment,{children:!p&&R.jsxs("div",{className:"relative",children:[R.jsx("button",{ref:W,onClick:()=>h(!f),className:Wi("p-1 rounded border-0","bg-neutral-100 dark:bg-neutral-700","text-neutral-600 dark:text-neutral-300","hover:bg-neutral-200 dark:hover:bg-neutral-600"),children:R.jsxs("div",{className:"flex items-center",children:[R.jsx(IGe,{sx:{fontSize:20}}),R.jsx("p",{className:"m-0 ms-1 hidden md:inline lg:hidden text-sm",children:"Settings"}),R.jsx("p",{className:"m-0 ms-1 hidden xl:inline text-sm",children:"Settings"})]})}),f&&Q()]})}),De=r.height??400;return R.jsxs("div",{className:Wi("shadow-sm rounded-lg border-0 m-1 mx-0 pb-2","bg-white dark:bg-neutral-900",r.hideHeader&&"pb-0 m-0"),style:{height:De},children:[!r.hideHeader&&R.jsxs("div",{style:{height:"38px"},className:`flex ${p?"justify-center":"justify-between"} p-0 m-0 flex-nowrap`,children:[R.jsx("div",{className:"flex flex-col overflow-hidden flex-grow",style:{minWidth:"0"},children:ie()}),R.jsxs("div",{className:"flex items-center flex-nowrap gap-1",children:[Te(),_e()]})]}),R.jsxs("div",{className:Wi("flex flex-col",r.hideHeader?"h-full":"h-[calc(100%-38px)]"),children:[j&&de(),R.jsxs("div",{className:"flex-grow overflow-hidden",children:[!r.videoPanelSettings.videoFilePath&&R.jsx("p",{children:"Loading video..."}),m&&S?R.jsx(krt,{onVideoLoadedCallback:()=>console.log("Video loaded"),playbackState:m,videoFile:S,testOffset:k,videoStatusCallback:o,syncModeEnabled:p,desiredVideoOffsetSecondsSlider:c,setDesiredVideoOffsetSecondsSlider:d,soundMuted:w}):pe()]})]}),(t==null?void 0:t.problemDescription)&&R.jsx("div",{children:R.jsx("p",{className:"m-0 text-xs text-muted-foreground",children:t.problemDescription})})]})}var o6={},Ow={},Dw={},Ype;function u7(){if(Ype)return Dw;Ype=1,Object.defineProperty(Dw,"__esModule",{value:!0}),Dw.fallbackWrapperStyle=Dw.DefaultFallback=void 0;const r=GS(),e=$c(),i=ub(),n=()=>{const t=(0,e.useRef)(null);return(0,e.useEffect)(()=>{const o=t.current,a=new i.DefaultSciChartLoader,s=a.addChartLoader(o,i.SciChartSurfaceBase.DEFAULT_THEME);return()=>{o&&a.removeChartLoader(o,s)}},[]),(0,r.jsx)("div",{ref:t,style:{position:"absolute",height:"100%",width:"100%",top:0,left:0,textAlign:"center",background:i.SciChartSurfaceBase.DEFAULT_THEME.sciChartBackground}})};return Dw.DefaultFallback=n,Dw.fallbackWrapperStyle={position:"absolute",height:"100%",width:"100%",top:0,left:0,zIndex:12},Dw}var X2={},K2={},$pe;function c7(){if($pe)return K2;$pe=1,Object.defineProperty(K2,"__esModule",{value:!0}),K2.SciChartGroupContext=void 0;const r=$c();return K2.SciChartGroupContext=(0,r.createContext)(void 0),K2}var qpe;function r1e(){if(qpe)return X2;qpe=1,Object.defineProperty(X2,"__esModule",{value:!0}),X2.SciChartGroup=void 0;const r=GS(),e=$c(),i=c7(),n=t=>{const{onInit:o,onDelete:a}=t,[s,l]=(0,e.useState)({groupInitialized:!1,charts:new Map}),u=(h,p,g)=>{s.charts.set(h,{isInitialized:p,initResult:g});const v=s.charts.size>0&&Array.from(s.charts.values()).every(({isInitialized:y})=>y);l({groupInitialized:v,charts:s.charts})},c=h=>{s.charts.delete(h);const p=s.charts.size>0&&Array.from(s.charts.values()).every(({isInitialized:g})=>g);l({groupInitialized:p,charts:s.charts})},d=h=>{var p;return(p=t==null?void 0:t.onInitError)===null||p===void 0?void 0:p.call(t,h)},f=Object.assign(Object.assign({},s),{addChartToGroup:u,removeChartFromGroup:c,notifyError:d});return(0,e.useEffect)(()=>{if(o&&s.groupInitialized){const h=Array.from(s.charts.values()).map(({initResult:p})=>p);o(h)}},[s.groupInitialized]),(0,e.useEffect)(()=>{if(a&&s.groupInitialized){const h=Array.from(s.charts.values()).map(({initResult:p})=>p);return()=>{a(h)}}},[s.groupInitialized]),(0,r.jsx)(i.SciChartGroupContext.Provider,{value:f,children:t.children})};return X2.SciChartGroup=n,X2}var Xpe;function Knt(){if(Xpe)return Ow;Xpe=1;var r=Ow&&Ow.__rest||function(a,s){var l={};for(var u in a)Object.prototype.hasOwnProperty.call(a,u)&&s.indexOf(u)<0&&(l[u]=a[u]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,u=Object.getOwnPropertySymbols(a);c<u.length;c++)s.indexOf(u[c])<0&&Object.prototype.propertyIsEnumerable.call(a,u[c])&&(l[u[c]]=a[u[c]]);return l};Object.defineProperty(Ow,"__esModule",{value:!0}),Ow.ChartGroupLoader=void 0;const e=GS(),i=$c(),n=u7(),t=r1e(),o=a=>{const{fallback:s,onInit:l,onInitError:u}=a,c=r(a,["fallback","onInit","onInitError"]),[d,f]=(0,i.useState)(!1);return(0,e.jsx)(t.SciChartGroup,{onInit:h=>{var p;(p=a.onInit)===null||p===void 0||p.call(a,h),f(!0)},onInitError:u,children:(0,e.jsxs)("div",Object.assign({},c,{children:[a.children,d?null:s?(0,e.jsx)("div",{style:n.fallbackWrapperStyle,children:s}):(0,e.jsx)(n.DefaultFallback,{})]}))})};return Ow.ChartGroupLoader=o,Ow}var b0={},Z2={},Kpe;function gz(){if(Kpe)return Z2;Kpe=1,Object.defineProperty(Z2,"__esModule",{value:!0}),Z2.SciChartSurfaceContext=void 0;const r=$c();return Z2.SciChartSurfaceContext=(0,r.createContext)(null),Z2}var eg={},Zpe;function Znt(){if(Zpe)return eg;Zpe=1;var r=eg&&eg.__awaiter||function(a,s,l,u){function c(d){return d instanceof l?d:new l(function(f){f(d)})}return new(l||(l=Promise))(function(d,f){function h(v){try{g(u.next(v))}catch(y){f(y)}}function p(v){try{g(u.throw(v))}catch(y){f(y)}}function g(v){v.done?d(v.value):c(v.value).then(h,p)}g((u=u.apply(a,s||[])).next())})};Object.defineProperty(eg,"__esModule",{value:!0}),eg.createChartFromConfig=eg.createChartRoot=eg.useIsMountedRef=void 0;const e=$c(),i=ub(),n=()=>{const a=(0,e.useRef)(!1);return(0,e.useEffect)(()=>(a.current=!0,()=>{a.current=!1}),[]),a};eg.useIsMountedRef=n;const t=()=>{const a=document.createElement("div");return a.id=`chart-root-${(0,i.generateGuid)()}`,a.style.width="100%",a.style.height="100%",a};eg.createChartRoot=t;function o(a){return s=>r(this,void 0,void 0,function*(){const l=yield i.chartBuilder.buildChart(s,a);return"sciChartSurface"in l?{sciChartSurface:l.sciChartSurface}:"sciChart3DSurface"in l?{sciChartSurface:l.sciChart3DSurface}:{sciChartSurface:l}})}return eg.createChartFromConfig=o,eg}var Rw={},Jpe;function Jnt(){return Jpe||(Jpe=1,Object.defineProperty(Rw,"__esModule",{value:!0}),Rw.conflictingConfigsMessage=Rw.wrongInitResultMessage=void 0,Rw.wrongInitResultMessage='"initChart" function should resolve to an object with "sciChartSurface" property ({ sciChartSurface })',Rw.conflictingConfigsMessage='Only one of "initChart" or "config" props is required!'),Rw}var Qpe;function i1e(){if(Qpe)return b0;Qpe=1;var r=b0&&b0.__awaiter||function(p,g,v,y){function m(b){return b instanceof v?b:new v(function(S){S(b)})}return new(v||(v=Promise))(function(b,S){function _(x){try{T(y.next(x))}catch(A){S(A)}}function C(x){try{T(y.throw(x))}catch(A){S(A)}}function T(x){x.done?b(x.value):m(x.value).then(_,C)}T((y=y.apply(p,g||[])).next())})},e=b0&&b0.__rest||function(p,g){var v={};for(var y in p)Object.prototype.hasOwnProperty.call(p,y)&&g.indexOf(y)<0&&(v[y]=p[y]);if(p!=null&&typeof Object.getOwnPropertySymbols=="function")for(var m=0,y=Object.getOwnPropertySymbols(p);m<y.length;m++)g.indexOf(y[m])<0&&Object.prototype.propertyIsEnumerable.call(p,y[m])&&(v[y[m]]=p[y[m]]);return v};Object.defineProperty(b0,"__esModule",{value:!0}),b0.SciChartReact=void 0;const i=GS(),n=$c(),t=ub(),o=gz(),a=Znt(),s=c7(),l=u7(),u=Jnt();t.SciChartSurface.configure({wasmUrl:"/scichart2d.wasm",dataUrl:"/scichart2d.data"}),t.SciChart3DSurface.configure({wasmUrl:"/scichart3d.wasm",dataUrl:"/scichart3d.data"}),t.SciChartDefaults.defaultLoader=!1,t.SciChartDefaults.disableAspect=!0;function c(p){const{initChart:g,config:v}=p;if(!g&&!v||g&&v)throw new Error(u.conflictingConfigsMessage)}function d(p){if(!p.sciChartSurface)throw new Error(u.wrongInitResultMessage);return p}function f(p){const{initChart:g,config:v}=p,y=g||(0,a.createChartFromConfig)(v);return m=>y(m).then(d)}function h(p){const{initChart:g,config:v,fallback:y,onInit:m,onDelete:b,onInitError:S,innerContainerProps:_}=p,C=e(p,["initChart","config","fallback","onInit","onDelete","onInitError","innerContainerProps"]);c(p);const T=(0,a.useIsMountedRef)(),x=(0,n.useRef)(null),A=(0,n.useRef)(),w=(0,n.useRef)(null),[L,k]=(0,n.useState)(!1);(0,n.useEffect)(()=>{const N=(0,t.generateGuid)();D==null||D.addChartToGroup(N,!1,null);const V=x.current,W=(0,a.createChartRoot)();V.appendChild(W);const K=f(p);let H=!1,U;const I=()=>r(this,void 0,void 0,function*(){try{const ee=yield K(W);return T.current?(D==null||D.addChartToGroup(N,!0,ee),w.current=ee,k(!0),m&&(U=m(ee))):H=!0,ee}catch(ee){throw S&&S(ee),D==null||D.notifyError(ee),ee}}),Q=A.current?A.current.then(I):I();A.current=Q;const Z=ee=>{!H&&U&&(U(),U=void 0),H||b==null||b(ee),T.current&&(w.current=null,k(!1)),D==null||D.removeChartFromGroup(N),ee.sciChartSurface.delete()};return()=>{V.removeChild(W),Q.then(Z)}},[]);const D=(0,n.useContext)(s.SciChartGroupContext),j=Object.assign(Object.assign({},_),{style:Object.assign({height:"100%",width:"100%"},_==null?void 0:_.style)});return(0,i.jsx)(o.SciChartSurfaceContext.Provider,{value:w.current,children:(0,i.jsxs)("div",Object.assign({},C,{style:Object.assign({position:"relative"},C.style),children:[(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",Object.assign({},j,{ref:x})),L?p.children:null]}),L?null:y?(0,i.jsx)("div",{style:l.fallbackWrapperStyle,children:y}):(0,i.jsx)(l.DefaultFallback,{})]}))})}return b0.SciChartReact=h,b0}var Mw={},ege;function Qnt(){if(ege)return Mw;ege=1;var r=Mw&&Mw.__rest||function(a,s){var l={};for(var u in a)Object.prototype.hasOwnProperty.call(a,u)&&s.indexOf(u)<0&&(l[u]=a[u]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,u=Object.getOwnPropertySymbols(a);c<u.length;c++)s.indexOf(u[c])<0&&Object.prototype.propertyIsEnumerable.call(a,u[c])&&(l[u[c]]=a[u[c]]);return l};Object.defineProperty(Mw,"__esModule",{value:!0}),Mw.SciChartNestedLegend=void 0;const e=GS(),i=$c(),n=ub(),t=gz(),o=a=>{const{options:s}=a,l=r(a,["options"]),u=(0,i.useRef)(null),c=(0,i.useContext)(t.SciChartSurfaceContext),d=c==null?void 0:c.sciChartSurface;return(0,i.useEffect)(()=>{const f=new n.LegendModifier(Object.assign(Object.assign({},a==null?void 0:a.options),{placementDivId:u.current}));return d.chartModifiers.add(f),()=>{d.chartModifiers.remove(f,!0)}},[d]),(0,e.jsx)("div",Object.assign({},l,{ref:u}))};return Mw.SciChartNestedLegend=o,Mw}var J2={},tge;function eot(){if(tge)return J2;tge=1,Object.defineProperty(J2,"__esModule",{value:!0}),J2.SciChartMemoryDebugWrapper=void 0;const r=GS(),e=$c(),i=ub();function n(t){(0,e.useState)(()=>{i.MemoryUsageHelper.isMemoryUsageDebugEnabled=!0,i.SciChartSurface.autoDisposeWasmContext=!0,i.SciChartSurface.wasmContextDisposeTimeout=0});const[o,a]=(0,e.useState)(!1),s=u=>{a(u.target.checked)},l=()=>{window.gc&&window.gc();const u=i.MemoryUsageHelper.objectRegistry.getState();console.log("state",u)};return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",{style:{position:"fixed",top:0,left:0},children:[(0,r.jsx)("input",{type:"checkbox",checked:o,onChange:s})," Render Child Components Tree",(0,r.jsx)("br",{}),(0,r.jsx)("input",{type:"button",onClick:l,value:"Log Object Registry State"}),(0,r.jsx)("br",{}),o?t.children:null]})})}return J2.SciChartMemoryDebugWrapper=n,J2}var S0={},rge;function tot(){if(rge)return S0;rge=1;var r=S0&&S0.__awaiter||function(l,u,c,d){function f(h){return h instanceof c?h:new c(function(p){p(h)})}return new(c||(c=Promise))(function(h,p){function g(m){try{y(d.next(m))}catch(b){p(b)}}function v(m){try{y(d.throw(m))}catch(b){p(b)}}function y(m){m.done?h(m.value):f(m.value).then(g,v)}y((d=d.apply(l,u||[])).next())})},e=S0&&S0.__rest||function(l,u){var c={};for(var d in l)Object.prototype.hasOwnProperty.call(l,d)&&u.indexOf(d)<0&&(c[d]=l[d]);if(l!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,d=Object.getOwnPropertySymbols(l);f<d.length;f++)u.indexOf(d[f])<0&&Object.prototype.propertyIsEnumerable.call(l,d[f])&&(c[d[f]]=l[d[f]]);return c};Object.defineProperty(S0,"__esModule",{value:!0}),S0.SciChartNestedOverview=void 0;const i=GS(),n=$c(),t=ub(),o=gz(),a=i1e(),s=l=>{const{options:u}=l,c=e(l,["options"]),d=(0,n.useContext)(o.SciChartSurfaceContext),f=d==null?void 0:d.sciChartSurface,h=(0,n.useRef)(null),p=(0,n.useRef)(null),g=v=>r(void 0,void 0,void 0,function*(){p.current=t.SciChartOverview.create(f,v,u);const y=yield p.current;return h.current=y,{sciChartSurface:y.overviewSciChartSurface}});return f?(0,i.jsx)(a.SciChartReact,Object.assign({},c,{initChart:g,onDelete:()=>{h.current.delete()}})):null};return S0.SciChartNestedOverview=s,S0}var ige;function rot(){return ige||(ige=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.SciChartSurfaceContext=r.SciChartNestedOverview=r.SciChartMemoryDebugWrapper=r.SciChartNestedLegend=r.SciChartGroupContext=r.SciChartGroup=r.SciChartReact=r.DefaultFallback=r.ChartGroupLoader=void 0;var e=Knt();Object.defineProperty(r,"ChartGroupLoader",{enumerable:!0,get:function(){return e.ChartGroupLoader}});var i=u7();Object.defineProperty(r,"DefaultFallback",{enumerable:!0,get:function(){return i.DefaultFallback}});var n=i1e();Object.defineProperty(r,"SciChartReact",{enumerable:!0,get:function(){return n.SciChartReact}});var t=r1e();Object.defineProperty(r,"SciChartGroup",{enumerable:!0,get:function(){return t.SciChartGroup}});var o=c7();Object.defineProperty(r,"SciChartGroupContext",{enumerable:!0,get:function(){return o.SciChartGroupContext}});var a=Qnt();Object.defineProperty(r,"SciChartNestedLegend",{enumerable:!0,get:function(){return a.SciChartNestedLegend}});var s=eot();Object.defineProperty(r,"SciChartMemoryDebugWrapper",{enumerable:!0,get:function(){return s.SciChartMemoryDebugWrapper}});var l=tot();Object.defineProperty(r,"SciChartNestedOverview",{enumerable:!0,get:function(){return l.SciChartNestedOverview}});var u=gz();Object.defineProperty(r,"SciChartSurfaceContext",{enumerable:!0,get:function(){return u.SciChartSurfaceContext}})})(o6)),o6}var eL=rot(),iot=EM();const X3=function(r,e){if(r&&!r.isDeleted){const i=e?d7:f7;r.applyTheme(i.scichartTheme()),r.renderableSeries.asArray().forEach(a=>oot(a,e)),r.chartModifiers.asArray().forEach((a,s)=>{switch(a.constructor.name){case"CursorModifier2":r.chartModifiers.removeAt(s);break;case"RolloverModifier2":not(a,e);break;case"DataPointSelectionModifier2":a.selectionFill=e?"#FFFFFF":"#000000",a.selectionStroke=e?"#ff0000":"#333333"}});const n=new jt.CursorModifier({modifierGroup:"asd",showTooltip:!1,showAxisLabels:!0,showXLine:!0,showYLine:!0,axisLabelFill:i.tooltipBackground,axisLabelStroke:i.tooltipTextColor,crosshairStroke:i.tooltipTextColor,crosshairStrokeThickness:1,crosshairStrokeDashArray:[4,4]});r.chartModifiers.add(n);const t=r.annotations.asArray().filter(a=>a.id==="playahead");t.length>0&&(t[0].stroke=e?"#aaaaaa":"#111111");const o=r.annotations.asArray().filter(a=>a.id==="selectedPoint");o.length>0&&(o[0].stroke=e?"#ffdd00":"#101010"),r.invalidateElement()}},not=function(r,e){r.rolloverLineStroke=e?"#FFFFFF":"#555555",r.rolloverLineStrokeThickness=1},oot=function(r,e){const i=e?d7:f7;r.rolloverModifierProps.tooltipTextColor=i.tooltipTextColor,r.rolloverModifierProps.tooltipColor=i.tooltipBackground,r.rolloverModifierProps.shadowColor=i.tooltipBackground},d7={scichartTheme:()=>({...new jt.SciChartJSDarkv2Theme,sciChartBackground:"#212121",cursorLineBrush:"aaaaaa"}),tooltipBackground:"#212121",tooltipTextColor:"#999",buttonBackground:"#434343",buttonText:"#FFFFFF",buttonBorder:"#787878"},f7={scichartTheme:()=>({...new jt.SciChartJSLightTheme,sciChartBackground:"#EDF4FA"}),tooltipBackground:"#EDF4FA",tooltipTextColor:"#000",buttonBackground:"#efefef",buttonText:"#343434",buttonBorder:"#000000"};function a6(r){return r?d7:f7}iot.setIsDebugLicensing(!1);jt.SciChartSurface.useWasmFromCDN();class aot extends jt.SmartDateLabelProvider{get formatLabel(){return e=>{const i=new Date(e),n=i.getHours().toString().padStart(2,"0"),t=i.getMinutes().toString().padStart(2,"0"),o=i.getSeconds().toString().padStart(2,"0");return`${n}:${t}:${o}`}}get formatCursorLabel(){return e=>{const i=new Date(e),n=i.getHours().toString().padStart(2,"0"),t=i.getMinutes().toString().padStart(2,"0"),o=i.getSeconds().toString().padStart(2,"0"),a=i.getMilliseconds().toString().padStart(3,"0");return`${n}:${t}:${o}.${a}`}}}const nge=r=>({fill:r?"#4a90c2B3":"#05315aB3",stroke:r?"#6ab0e2":"#05315a"}),sot=r=>{const e=r.frameIdFrequency.map(i=>Number(i.frequency));return{x:r.receivedTimestamp,y:e.length>0?e.reduce((i,n)=>i+n):0}},lot=500,uot=8,s6=12;function cot(r){const{graphWidthMs:e,data:i,shouldPauseStreaming:n,chartKey:t,height:o,isDarkMode:a,clock:s,showBinDistribution:l=!1,maxBinDistributionItems:u=uot,frameIdToNameMapping:c,filter:d,onFilterChange:f,isBinDistributionEnabled:h=!0}=r,[p,g]=G.useState(void 0),v=d!==void 0?d:p,y=G.useRef(null),m=G.useRef(null),b=G.useRef(null),S=G.useRef(null),_=G.useRef(null),C=G.useRef(null),T=G.useRef(n),x=G.useRef(e);G.useEffect(()=>{T.current=n},[n]),G.useEffect(()=>{x.current=e},[e]);const A=G.useMemo(()=>({width:"100%",height:o??"100%",position:"relative",overflow:"hidden"}),[o]),w=G.useMemo(()=>({width:"100%",height:"100%"}),[]);G.useEffect(()=>{const K=y.current;if(!(!K||K.isDeleted)&&(X3(K,a),_.current)){const H=nge(a);_.current.fill=H.fill,_.current.stroke=H.stroke}},[a]),G.useEffect(()=>{const K=b.current,H=y.current;if(!K||i.length===0||H!=null&&H.isDeleted)return;K.clear();const U=i.map(sot);if(U.length>0){const I=new Float64Array(U.map(Z=>Z.x)),Q=new Float64Array(U.map(Z=>Z.y));K.appendRange(I,Q)}},[i]);const L=G.useCallback(async K=>{const H=typeof K=="string"?document.getElementById(K):K;if(!H)throw new Error("SciChart root element not found");const{wasmContext:U,sciChartSurface:I}=await jt.SciChartSurface.create(H,{freezeWhenOutOfView:!0});y.current=I,m.current=U;const Q=new jt.NumericAxis(U,{labelProvider:new aot,useNativeText:!0,drawMinorGridLines:!1,drawMajorGridLines:!0});Q.autoRange=jt.EAutoRange.Never,Q.visibleRange=new jt.NumberRange(Date.now()-e,Date.now()),Q.majorDelta=1e3,S.current=Q,I.xAxes.add(Q);const Z=new jt.NumericAxis(U,{drawMinorGridLines:!1,drawMajorGridLines:!0});Z.axisAlignment=jt.EAxisAlignment.Left,Z.autoRange=jt.EAutoRange.Always,Z.growBy=new jt.NumberRange(0,.1),Z.isInnerAxis=!0,Z.drawLabels=!0,I.yAxes.add(Z);const ee=new jt.XyDataSeries(U,{fifoCapacity:100,dataSeriesName:`frame-distribution-${t}`,dataIsSortedInX:!0,dataEvenlySpacedInX:!1,containsNaN:!1});b.current=ee;const ie=nge(a),de=new jt.FastColumnRenderableSeries(U,{dataSeries:ee,fill:ie.fill,stroke:ie.stroke,strokeThickness:1,dataPointWidth:.8});_.current=de,I.renderableSeries.add(de),I.chartModifiers.add(new jt.RolloverModifier({showTooltip:!0,showRolloverLine:!0,rolloverLineStrokeThickness:1}),new jt.CursorModifier({showTooltip:!1,showAxisLabels:!0,showXLine:!0,showYLine:!1,crosshairStrokeThickness:1,crosshairStrokeDashArray:[4,4]}),new jt.ZoomExtentsModifier),X3(I,a);const pe=()=>{if(!I.isDeleted){if(!T.current&&S.current){const _e=s.time(),Te=_e+lot,De=_e-x.current;S.current.visibleRange=new jt.NumberRange(De,Te)}C.current=requestAnimationFrame(pe)}};return C.current=requestAnimationFrame(pe),{sciChartSurface:I}},[t,e,a,s]);G.useEffect(()=>()=>{C.current&&cancelAnimationFrame(C.current)},[]);const k=G.useCallback(K=>{const H=c==null?void 0:c.get(K.frameId);return H!==void 0?`${H} - ${K.frameId}`:`${K.frameId}`},[c]),D=G.useCallback(K=>{const H=K.target.value.toLowerCase(),U=H.length>=1?H:void 0;f?f(U):g(U)},[f]),j=G.useMemo(()=>{if(!l||!h)return null;const K=i[i.length-1];if(!K)return null;const U=K.frameIdFrequency.filter(Z=>k(Z)!==`${Z.frameId}`).length/K.frameIdFrequency.length*100,I=Math.round(U*100)/100||0,Q=()=>I<10?a?"#ef4444":"#dc2626":I<33?a?"#f59e0b":"#d97706":I<75?a?"#4a90c2":"#05315a":a?"#22c55e":"#16a34a";return R.jsxs("div",{style:{display:"flex",flexDirection:"column",padding:"4px",paddingBottom:0},children:[R.jsxs("p",{style:{fontSize:"12px",padding:0,margin:0,color:a?"#9ca3af":"#6b7280",textAlign:"left"},children:["Signal database hit rate:"," ",R.jsx("span",{style:{color:Q()},children:`${I}%`})]}),R.jsx("p",{style:{fontSize:"11px",padding:0,margin:0,color:a?"#6b7280":"#9ca3af"},children:"The amount of received frames present in the signal database file"})]})},[l,h,i,k,a]),N=G.useMemo(()=>{var U;if(!l)return null;if(!h)return R.jsx("div",{style:{height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},children:R.jsx("p",{style:{fontSize:"12px",color:a?"#9ca3af":"#6b7280"},children:"This visualization is disabled for the current namespace type."})});const K=i[i.length-1];if(!K)return R.jsx("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:R.jsx("p",{style:{margin:0,fontSize:"12px",color:a?"#9ca3af":"#6b7280"},children:"No frames received"})});let H=K;if(v!==void 0&&(H={receivedTimestamp:K.receivedTimestamp,frameIdFrequency:K.frameIdFrequency.filter(I=>k(I).toLowerCase().includes(v.toLowerCase()))}),((U=H==null?void 0:H.frameIdFrequency)==null?void 0:U.length)>0){const I=K.frameIdFrequency.map(de=>Number(de.frequency)).reduce((de,pe)=>de+pe),Q=a?"rgba(74, 144, 194, 0.1)":"rgba(5, 49, 90, 0.1)",Z=a?"rgba(74, 144, 194, 0.4)":"rgba(5, 49, 90, 0.3)",ee=a?"rgba(74, 144, 194, 0.7)":"rgba(5, 49, 90, 0.6)",ie=a?"#e5e7eb":"#1f2937";return R.jsx("div",{style:{display:"flex",flexWrap:"wrap"},children:H.frameIdFrequency.sort((de,pe)=>Number(pe.frequency)-Number(de.frequency)||de.frameId-pe.frameId).slice(0,u).map(de=>R.jsx("div",{style:{width:"50%"},children:R.jsxs("div",{style:{marginLeft:2,marginRight:2,marginBottom:4,borderRadius:4,backgroundColor:Q,padding:4,display:"flex",flexDirection:"column"},children:[R.jsxs("div",{style:{display:"flex",flexDirection:"row",margin:0,alignItems:"center",justifyContent:"space-between"},children:[R.jsx("p",{style:{color:ie,fontSize:"12px",paddingLeft:4,margin:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:k(de)}),R.jsx("p",{style:{color:ie,fontSize:"12px",paddingLeft:4,paddingRight:4,margin:0},children:de.frequency})]}),R.jsxs("div",{style:{width:"100%",position:"relative"},children:[R.jsx("div",{style:{height:s6,borderRadius:4,backgroundColor:Z,marginLeft:4,marginTop:0,position:"absolute",width:"calc(100% - 8px)"}}),R.jsx("div",{style:{width:`${Number(de.frequency)/I*100}%`,height:s6,borderRadius:4,backgroundColor:ee,marginLeft:4,marginTop:0,position:"relative"}}),R.jsx("p",{style:{fontSize:"10px",color:"#ffffff",paddingLeft:4,paddingRight:4,margin:0,position:"absolute",top:0,left:0,lineHeight:`${s6}px`},children:`${de.frequency}/${I}`})]})]})},de.frameId))})}return R.jsx("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:R.jsx("p",{style:{margin:0,fontSize:"12px",color:a?"#9ca3af":"#6b7280"},children:v!==void 0&&v.trim()!==""?"No frames match the current filter":"No frames received"})})},[l,h,i,v,k,u,a]),V=G.useMemo(()=>{if(!l||!h)return null;const K=i[i.length-1];if(!K)return null;const H=K.frameIdFrequency.length,U=v!==void 0?K.frameIdFrequency.filter(Z=>k(Z).toLowerCase().includes(v.toLowerCase())).length:H,I=Math.min(H,u);return{displayed:Math.min(U,I),cap:I}},[l,h,i,v,k,u]),W=G.useMemo(()=>!l||!h?null:R.jsxs("div",{style:{display:"flex",flexDirection:"column",width:"100%"},children:[R.jsx("input",{type:"text",placeholder:"Filter frames...",onChange:D,className:"rounded-sm py-0.5 px-2",style:{width:"100%",fontSize:"11px",border:`1px solid ${a?"#374151":"#d1d5db"}`,backgroundColor:a?"#1f2937":"#ffffff",color:a?"#e5e7eb":"#1f2937",outline:"none"}}),V!==null&&R.jsxs("p",{className:"m-0 ms-0.5 mt-0.5 text-xxs",style:{color:a?"#6b7280":"#9ca3af"},children:["Showing ",V.displayed," of ",V.cap," results"]})]}),[l,h,D,a,V]);return R.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[R.jsx("div",{style:{...A,flexShrink:0},children:R.jsx(eL.SciChartReact,{style:w,initChart:L})}),l&&R.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:1,minHeight:0,marginTop:8,padding:"0 4px"},children:[R.jsxs("div",{style:{display:"flex",flexDirection:"row",marginBottom:8,width:"100%",alignItems:"center",gap:12,flexShrink:0},children:[R.jsxs("div",{style:{flex:1,textAlign:"left",minWidth:0},children:[R.jsx("p",{style:{margin:0,fontSize:"14px",fontWeight:500,color:a?"#e5e7eb":"#1f2937"},children:"Latest bin distribution"}),R.jsx("p",{style:{margin:0,fontSize:"11px",color:a?"#6b7280":"#9ca3af"},children:"Most frequent frames, ordered by count"})]}),R.jsx("div",{style:{flex:1,minWidth:0},children:W})]}),R.jsx("div",{style:{flex:1,minHeight:0,overflowY:"auto",overflowX:"hidden"},children:N},u),j]})]})}const tL=G.forwardRef(function({children:e,fullHeight:i=!1},n){return R.jsx("div",{ref:n,className:Nr("w-full relative group/area rounded-sm overflow-hidden bg-[var(--primary-10)]",i&&"h-full flex flex-col"),children:e})});function rL({icon:r,dropdown:e,children:i,helpTooltip:n}){const t=R.jsx("div",{className:"w-5 h-5 bg-accent rounded flex items-center justify-center",children:R.jsx(Fr,{type:r,className:"w-3 h-3 text-foreground"})});return R.jsxs("div",{className:"flex flex-row justify-between px-1 py-1 grid-stack-item-drag-handle",children:[R.jsxs("div",{className:"flex items-center gap-2",children:[n!=null?R.jsx(PM,{delay:200,content:n,className:"flex items-center",children:t}):t,i]}),R.jsx("div",{className:"flex justify-end z-20 mb-0",children:e})]})}function iL({children:r,fullHeight:e=!1,padding:i}){const n=i??e;return R.jsx("div",{className:Nr(e&&"flex-1 min-h-0 flex flex-col",n&&"p-2",!e&&"bg-card"),children:r})}const dot=R.jsxs("div",{className:"max-w-md space-y-1",children:[R.jsx("p",{className:"text-sm font-semibold",children:"Frame distribution"}),R.jsx("p",{className:"text-xs ms-2",children:"Each bucket represents all frames for one namespace during one second. The bin distribution shows the distribution of frames in the last received bucket."}),R.jsxs("p",{className:"text-xs",children:[R.jsx("span",{className:"font-bold",children:"Settings"}),":"]}),R.jsxs("p",{className:"text-xs ms-2",children:[R.jsx("span",{className:"font-semibold",children:"Namespace"}),": The namespace for which to receive frame buckets"]}),R.jsxs("p",{className:"text-xs ms-2",children:[R.jsx("span",{className:"font-semibold",children:"Distribution items"}),": Maximum number of items to show in the latest bin distribution list"]})]}),fot={sm:{track:"w-8 h-4",knob:"h-3 w-3 left-0.5 top-0.5",translate:"1rem"},md:{track:"w-11 h-6",knob:"h-5 w-5 left-0.5 top-0.5",translate:"1.25rem"},lg:{track:"w-14 h-7",knob:"h-6 w-6 left-0.5 top-0.5",translate:"1.75rem"}};function n1e(r){const[e,i]=G.useState(r.defaultChecked??!1),n=r.size??"md",t=fot[n],o=a=>{var l;const s=a.target.checked;i(s),(l=r.onChange)==null||l.call(r,s)};return R.jsxs("label",{className:"relative inline-flex items-center cursor-pointer",children:[R.jsx("input",{type:"checkbox",checked:e,onChange:o,className:"sr-only"}),R.jsx("div",{className:`rounded-full transition-colors ${t.track} ${e?"bg-emerald-500":"bg-muted border"}`}),R.jsx("div",{className:`absolute rounded-full bg-white shadow transition-[transform] duration-200 ease-out ${t.knob}`,style:{transform:e?`translateX(${t.translate})`:"translateX(0)"},"aria-hidden":!0})]})}const o1e=G.createContext(null);function vz(){const r=G.useContext(o1e);if(!r)throw new Error("PanelDropdownMenu sub-components must be used within a PanelDropdownMenu");return r}const hot=Nr("z-[9999] w-[220px]","bg-popover border border-border","rounded-md shadow-xl p-1","animate-in fade-in-0 zoom-in-95"),pot=Nr("flex items-center justify-between w-full px-2 py-1.5","text-xs text-popover-foreground outline-none","transition-colors rounded-sm");function xi(r){const i={menuItemStyles:Nr(pot)};return R.jsx(o1e.Provider,{value:i,children:R.jsxs(zq,{children:[R.jsx(Wq,{asChild:!0,children:R.jsx("button",{className:Nr("p-0.5 rounded transition-all","text-muted-foreground hover:bg-accent hover:text-accent-foreground","data-[state=open]:opacity-100 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground","focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/40 focus-visible:ring-offset-2 focus-visible:ring-offset-background"),title:"Panel options",children:R.jsx(Fr,{type:sr.NAV_MORE_VERTICAL,className:"w-4 h-4"})})}),R.jsx(XV,{children:R.jsx(Gq,{align:"end",sideOffset:4,className:hot,children:r.children})})]})})}function got(r){return R.jsxs(wbe,{children:[R.jsx(Obe,{className:"px-2 py-1 text-[10px] font-semibold text-muted-foreground uppercase tracking-wider bg-muted/50 rounded-sm",children:r.title}),r.children]})}function vot(){return R.jsx(jUe,{className:"my-1 bg-border"})}function yot(r){const{menuItemStyles:e}=vz();return R.jsxs(E1,{className:Nr(e),onSelect:i=>i.preventDefault(),children:[R.jsx("span",{children:r.label}),R.jsx(n1e,{size:"sm",defaultChecked:r.checked,onChange:r.onChange})]})}function mot(r){const{menuItemStyles:e}=vz(),{value:i,onChange:n,min:t=-1/0,max:o=1/0,step:a=1,formatValue:s}=r,l=d=>{d.preventDefault(),n(Math.max(t,i-a))},u=d=>{d.preventDefault(),n(Math.min(o,i+a))},c=s?s(i):i.toString();return R.jsxs(E1,{className:e,onSelect:d=>d.preventDefault(),children:[R.jsx("span",{children:r.label}),R.jsxs("div",{className:"flex items-center gap-1",onClick:d=>d.stopPropagation(),children:[R.jsx("button",{type:"button",onClick:l,className:"w-5 h-5 flex items-center justify-center rounded hover:bg-accent text-muted-foreground hover:text-accent-foreground text-xs",children:"−"}),R.jsx("span",{className:"w-8 text-center text-foreground",children:c}),R.jsx("button",{type:"button",onClick:u,className:"w-5 h-5 flex items-center justify-center rounded hover:bg-accent text-muted-foreground hover:text-accent-foreground text-xs",children:"+"})]})]})}function bot(r){const{menuItemStyles:e}=vz(),i={default:"cursor-pointer data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground",danger:"cursor-pointer text-red-400 data-[highlighted]:bg-red-900/30",primary:"cursor-pointer text-primary data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground"},n=r.variant??"default";return R.jsxs(E1,{onSelect:r.onClick,className:Nr(e,i[n]),children:[R.jsxs("div",{className:"flex flex-col items-start",children:[R.jsxs("div",{className:"flex items-center gap-1.5",children:[r.icon&&R.jsx(Fr,{type:r.icon,className:"w-3.5 h-3.5"}),R.jsx("span",{children:r.label})]}),r.subtitle&&R.jsx("span",{className:"text-[10px] text-muted-foreground truncate max-w-[120px]",children:r.subtitle})]}),r.subtitle&&R.jsx("span",{className:"text-[10px] text-primary",children:"Edit"})]})}function Sot(r){const{menuItemStyles:e}=vz(),i=r.label??"Remove panel";return R.jsx(E1,{onSelect:r.onClick,className:Nr(e,"cursor-pointer text-red-400 data-[highlighted]:bg-red-900/30"),children:R.jsxs("div",{className:"flex items-center gap-1.5",children:[R.jsx(Fr,{type:sr.ACTION_DELETE,className:"w-3.5 h-3.5"}),R.jsx("span",{children:i})]})})}xi.Section=got;xi.Divider=vot;xi.Toggle=yot;xi.NumberStepper=mot;xi.Button=bot;xi.RemoveButton=Sot;function b1(r){return R.jsx("div",{className:Nr("mx-2 mb-2",r.className),children:R.jsxs("div",{className:"bg-amber-50 dark:bg-amber-950/30 border border-amber-200 dark:border-amber-800/50 rounded-md px-3 py-2",children:[R.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[R.jsx(Fr,{type:sr.STATUS_WARNING,className:"text-amber-500 dark:text-amber-400 w-4 h-4 flex-shrink-0"}),R.jsx("p",{className:"text-xs font-medium text-amber-800 dark:text-amber-200 m-0",children:r.title})]}),R.jsx("div",{className:"ml-6 text-xs text-amber-700 dark:text-amber-300",children:r.message}),r.suggestion&&R.jsx("p",{className:"ml-6 mt-1 text-xs text-amber-600 dark:text-amber-400 m-0",children:r.suggestion})]})})}function _ot(r){return r.length===0?null:R.jsx("div",{className:"space-y-2 mt-1",children:r.map((e,i)=>R.jsxs("div",{className:"text-xs text-muted-foreground space-y-0.5",children:[R.jsxs("div",{children:[R.jsx("span",{className:"text-neutral-400",children:"Namespace: "}),R.jsx("span",{className:"font-medium",children:e.namespace})]}),R.jsxs("div",{children:[R.jsx("span",{className:"text-neutral-400",children:"Frame: "}),R.jsx("span",{className:"font-medium",children:e.frame})]}),R.jsxs("div",{children:[R.jsx("span",{className:"text-neutral-400",children:"Signal: "}),R.jsx("span",{className:"font-medium",children:e.signal})]})]},i))})}function Pot(r,e){switch(e.type){case"add":return{panels:[...r.panels,e.panel],isDirty:!0};case"remove":return{panels:r.panels.filter(i=>i.id!==e.id),isDirty:!0};case"update":return{panels:r.panels.map(i=>i.id===e.id?e.updater(i):i),isDirty:!0};case"replace-all":return{panels:e.panels,isDirty:!1};case"mark-clean":return{...r,isDirty:!1};default:return r}}function a1e(r){return{...r,type:"trace",frames:[],bufferSize:1e4,expandSignals:!1,sortOrder:"newest-first",groupByFrame:!1,unresolvedFrames:void 0}}function s1e(r){return{...r,type:"timeseries",signals:[],useSuggestedMinMax:!1,syncCharts:!0,chartWidthSeconds:30,maxFps:60,unresolvedSignals:void 0}}function l1e(r){return{...r,type:"map",signals:{},unresolvedSignals:void 0}}function u1e(r){return{...r,type:"video",videoFilePath:void 0,recordingSessionPath:void 0,soundMuted:!0}}function c1e(r){return{...r,type:"gauge",signals:[],heightConfig:150,unresolvedSignals:void 0}}const R$=8;function d1e(r){return{...r,type:"frame-distribution",selectedNamespace:void 0,maxBinDistributionItems:R$}}const Cot={timeseries:{w:6,h:4},gauge:{w:6,h:4},"frame-distribution":{w:6,h:4},map:{w:6,h:4},video:{w:6,h:4},trace:{w:6,h:4}};function Tot(r,e){const{w:i,h:n}=Cot[r],t={id:crypto.randomUUID(),type:r,grid:{x:0,y:e,w:i,h:n}};switch(r){case"trace":return a1e(t);case"timeseries":return s1e(t);case"map":return l1e(t);case"video":return u1e(t);case"gauge":return c1e(t);case"frame-distribution":return d1e(t)}}function xot(){const[r,e]=G.useReducer(Pot,{panels:[],isDirty:!1}),i=G.useCallback(()=>r.panels.length===0?0:Math.max(...r.panels.map(l=>l.grid.y+l.grid.h)),[r.panels]),n=G.useCallback(l=>{const u=Tot(l,i());e({type:"add",panel:u})},[i]),t=G.useCallback((l,u,c)=>{e({type:"update",id:l,updater:d=>d.type!==u?d:c(d)})},[]),o=G.useCallback(l=>{e({type:"remove",id:l})},[]),a=G.useCallback(l=>{e({type:"replace-all",panels:l})},[]),s=G.useCallback(()=>{e({type:"mark-clean"})},[]);return{panels:r.panels,isDirty:r.isDirty,addPanel:n,updatePanel:t,removePanel:o,replaceAll:a,markClean:s}}const f1e=G.createContext(null);function Eot(r){const e=xot();return R.jsx(f1e.Provider,{value:e,children:r.children})}function s_(){const r=G.useContext(f1e);if(!r)throw new Error("useDashboardPanelsContext must be used inside DashboardPanelsProvider");return r}const oge=1e4;function Aot(r){return R.jsxs(xi,{children:[R.jsx(xi.Section,{title:"Settings",children:R.jsx(xi.NumberStepper,{label:"Distribution items",value:r.maxBinDistributionItems,onChange:r.onMaxBinDistributionItemsChange,min:4,max:100,step:1})}),R.jsx(xi.Divider,{}),R.jsx(xi.Section,{title:"Actions",children:R.jsx(xi.RemoveButton,{onClick:r.onRemove})})]})}const wot=36;function Oot(r){const{updatePanel:e,removePanel:i}=s_(),n=r.panelConfig,{isDarkMode:t}=TM(),[o,a]=G.useState([]),[s,l]=G.useState(n==null?void 0:n.selectedNamespace),[u,c]=G.useState([]),[d,f]=G.useState(!1),[h,p]=G.useState(400),[g,v]=G.useState(!1),y=G.useRef(null),m=G.useRef([]),b=G.useRef(null),S=G.useRef(0),_=$rt();if(G.useEffect(()=>{if(!y.current)return;const V=new ResizeObserver(W=>{for(const K of W){const H=K.contentRect.height;H>0&&p(H)}});return V.observe(y.current),()=>V.disconnect()},[]),G.useEffect(()=>{(async()=>{if(!_){v(!0);return}const W=await _.getNamespaceNames();a(W),v(!0),n!=null&&n.selectedNamespace?(W.includes(n.selectedNamespace),l(n.selectedNamespace)):W.length>0&&!s&&l(W[0])})()},[_,n==null?void 0:n.selectedNamespace,s]),G.useEffect(()=>{if(!_||!s||!o.includes(s))return;const V=H=>{m.current.push(H)},W=()=>{console.log("[FrameDistributionPanel] Subscription ended")};return _.subscribeToFrameDistribution(s,V,W)},[_,s,o]),G.useEffect(()=>{const W=K=>{if(K-S.current>=1e3){S.current=K;const H=m.current;if(H.length>0){const I=H[H.length-1].receivedTimestamp-oge;c(Q=>Q.concat(H).filter(Z=>Z.receivedTimestamp>I)),m.current=[]}}b.current=requestAnimationFrame(W)};return b.current=requestAnimationFrame(W),()=>{b.current!==null&&cancelAnimationFrame(b.current)}},[]),!n)return null;const C=()=>i(n.id),T=V=>{l(V),f(!1),c([]),m.current=[],e(n.id,"frame-distribution",W=>({...W,selectedNamespace:V}))},x=g&&!_,A=g&&_&&o.length===0,w=g&&_&&s&&o.length>0&&!o.includes(s),L=()=>x?R.jsx(b1,{title:"Frame distribution unavailable",message:"The frame distribution service is not available.",suggestion:"Ensure the broker is connected and streaming data."}):A?R.jsx(b1,{title:"No namespaces available",message:"No signal namespaces are currently available for frame distribution.",suggestion:"Open a recording session or start streaming data from the broker."}):w?R.jsx(b1,{title:"Namespace not found",message:R.jsxs(R.Fragment,{children:["The configured namespace"," ",R.jsx("code",{className:"px-1 py-0.5 bg-neutral-800 rounded text-xs",children:s})," ","is not available."]}),suggestion:"Select a different namespace from the dropdown or remove this panel."}):null,k=R.jsxs("div",{className:"relative",children:[R.jsxs("button",{onClick:()=>f(!d),className:Nr("flex items-center gap-1 px-2 py-0.5 text-xs rounded","bg-muted hover:bg-muted/80 transition-colors","border border-border"),children:[R.jsx("span",{className:"truncate max-w-[120px] text-xxs",children:s||"Select namespace"}),R.jsx(Fr,{type:sr.NAV_CHEVRON_DOWN,className:Nr("w-3 h-3 transition-transform",d&&"rotate-180")})]}),d&&R.jsx("div",{className:"absolute z-50 top-full left-0 mt-1 min-w-[150px] bg-popover border border-border rounded-md shadow-lg",children:o.map(V=>R.jsx("button",{onClick:()=>T(V),className:Nr("w-full text-left px-3 py-2 text-sm hover:bg-accent transition-colors",s===V&&"bg-accent"),children:V},V))})]}),D=h-wot,j=Math.max(60,Math.floor(D*.3)),N=L();return R.jsxs(tL,{ref:y,fullHeight:!0,children:[R.jsx(rL,{icon:sr.CONTEXT_DASHBOARD,helpTooltip:dot,dropdown:R.jsx(Aot,{maxBinDistributionItems:n.maxBinDistributionItems??R$,onMaxBinDistributionItemsChange:V=>e(n.id,"frame-distribution",W=>({...W,maxBinDistributionItems:V})),onRemove:C}),children:(!N||w)&&k}),R.jsx(iL,{fullHeight:!0,children:N||R.jsx(cot,{graphWidthMs:oge,data:u,shouldPauseStreaming:!1,showBinDistribution:!0,chartKey:r.panelId,height:j,maxBinDistributionItems:n.maxBinDistributionItems??R$,isDarkMode:t,clock:{time:()=>Date.now()}})})]})}const Dot=R.jsxs("div",{className:"max-w-md space-y-1",children:[R.jsx("p",{className:"text-sm font-semibold",children:"Gauge"}),R.jsxs("p",{className:"text-xs",children:[R.jsx("span",{className:"font-bold",children:"Settings"}),":"]}),R.jsxs("p",{className:"text-xs ms-2",children:[R.jsx("span",{className:"font-semibold",children:"Signals"}),": Add or remove signals via the panel menu",R.jsx("br",{}),R.jsx("span",{className:"font-semibold",children:"Panel height"}),": Adjust in Settings (panel menu)"]})]}),Rot={cyber:{background:"conic-gradient(from 225deg, #0f0f23 0deg, #1a1a2e 180deg, #16213e 270deg)",trackBorder:"rgba(100, 100, 140, 0.3)",needleColor:"#e0e0f0",needleShadow:"0 0 12px rgba(0, 217, 255, 0.6)",textColor:"#e8e8f4",textShadow:"0 0 10px rgba(0, 217, 255, 0.5)",tickColor:"rgba(200, 200, 240, 0.6)",centerGlow:"radial-gradient(circle, rgba(0, 217, 255, 0.15) 0%, transparent 70%)",gradientStops:["#00d9ff","#00ffaa","#ff3366"],arcGlow:"rgba(0, 217, 255, 0.4)",capGradient:"radial-gradient(circle at 30% 30%, #4a4a6a 0%, #1a1a2e 100%)"},warm:{background:"conic-gradient(from 225deg, #1a0a0a 0deg, #2a1515 180deg, #1f0f0f 270deg)",trackBorder:"rgba(180, 100, 60, 0.3)",needleColor:"#fff0e0",needleShadow:"0 0 12px rgba(255, 149, 0, 0.6)",textColor:"#fff5e8",textShadow:"0 0 10px rgba(255, 149, 0, 0.5)",tickColor:"rgba(255, 200, 150, 0.6)",centerGlow:"radial-gradient(circle, rgba(255, 149, 0, 0.15) 0%, transparent 70%)",gradientStops:["#ff9500","#ffcc00","#ff2d55"],arcGlow:"rgba(255, 149, 0, 0.4)",capGradient:"radial-gradient(circle at 30% 30%, #5a3a2a 0%, #1a0a0a 100%)"},cool:{background:"conic-gradient(from 225deg, #0a1520 0deg, #0f2538 180deg, #0d1f30 270deg)",trackBorder:"rgba(80, 140, 200, 0.3)",needleColor:"#e8f4ff",needleShadow:"0 0 12px rgba(90, 200, 250, 0.6)",textColor:"#e8f4ff",textShadow:"0 0 10px rgba(90, 200, 250, 0.5)",tickColor:"rgba(150, 200, 255, 0.6)",centerGlow:"radial-gradient(circle, rgba(90, 200, 250, 0.15) 0%, transparent 70%)",gradientStops:["#5ac8fa","#64d2ff","#007aff"],arcGlow:"rgba(90, 200, 250, 0.4)",capGradient:"radial-gradient(circle at 30% 30%, #2a4a6a 0%, #0a1520 100%)"},mono:{background:"conic-gradient(from 225deg, #111111 0deg, #1a1a1a 180deg, #141414 270deg)",trackBorder:"rgba(120, 120, 120, 0.3)",needleColor:"#ffffff",needleShadow:"0 0 12px rgba(255, 255, 255, 0.4)",textColor:"#f0f0f0",textShadow:"0 0 10px rgba(255, 255, 255, 0.3)",tickColor:"rgba(180, 180, 180, 0.6)",centerGlow:"radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%)",gradientStops:["#888888","#bbbbbb","#dddddd"],arcGlow:"rgba(255, 255, 255, 0.3)",capGradient:"radial-gradient(circle at 30% 30%, #444 0%, #111 100%)"},neon:{background:"conic-gradient(from 225deg, #0a0015 0deg, #150028 180deg, #0d001a 270deg)",trackBorder:"rgba(255, 0, 255, 0.2)",needleColor:"#ff00ff",needleShadow:"0 0 20px rgba(255, 0, 255, 0.8), 0 0 40px rgba(255, 0, 255, 0.4)",textColor:"#ff66ff",textShadow:"0 0 15px rgba(255, 0, 255, 0.8)",tickColor:"rgba(255, 100, 255, 0.5)",centerGlow:"radial-gradient(circle, rgba(255, 0, 255, 0.2) 0%, transparent 70%)",gradientStops:["#ff00ff","#00ffff","#ffff00"],arcGlow:"rgba(255, 0, 255, 0.6)",capGradient:"radial-gradient(circle at 30% 30%, #3a0050 0%, #0a0015 100%)"},racing:{background:"conic-gradient(from 225deg, #1a0000 0deg, #2d0000 180deg, #200000 270deg)",trackBorder:"rgba(255, 50, 50, 0.3)",needleColor:"#ff3333",needleShadow:"0 0 15px rgba(255, 50, 50, 0.7)",textColor:"#ffffff",textShadow:"0 0 8px rgba(255, 50, 50, 0.5)",tickColor:"rgba(255, 255, 255, 0.7)",centerGlow:"radial-gradient(circle, rgba(255, 50, 50, 0.15) 0%, transparent 70%)",gradientStops:["#00ff00","#ffff00","#ff0000"],arcGlow:"rgba(255, 200, 0, 0.5)",capGradient:"radial-gradient(circle at 30% 30%, #4a2020 0%, #1a0000 100%)"},retro:{background:"conic-gradient(from 225deg, #2a2318 0deg, #3d3425 180deg, #32291c 270deg)",trackBorder:"rgba(200, 170, 120, 0.4)",needleColor:"#f5e6c8",needleShadow:"0 0 8px rgba(245, 200, 120, 0.4)",textColor:"#f5e6c8",textShadow:"none",tickColor:"rgba(200, 170, 120, 0.7)",centerGlow:"radial-gradient(circle, rgba(245, 200, 120, 0.1) 0%, transparent 70%)",gradientStops:["#c89b3c","#f0c060","#8b6914"],arcGlow:"rgba(200, 155, 60, 0.4)",capGradient:"radial-gradient(circle at 30% 30%, #5a4a30 0%, #2a2318 100%)"},ocean:{background:"conic-gradient(from 225deg, #001a2c 0deg, #002d4a 180deg, #00233a 270deg)",trackBorder:"rgba(0, 200, 200, 0.3)",needleColor:"#00ffff",needleShadow:"0 0 15px rgba(0, 255, 255, 0.6)",textColor:"#b0ffff",textShadow:"0 0 10px rgba(0, 255, 255, 0.5)",tickColor:"rgba(100, 220, 220, 0.6)",centerGlow:"radial-gradient(circle, rgba(0, 200, 200, 0.15) 0%, transparent 70%)",gradientStops:["#006080","#00b0b0","#00ffff"],arcGlow:"rgba(0, 200, 200, 0.5)",capGradient:"radial-gradient(circle at 30% 30%, #004060 0%, #001a2c 100%)"},forest:{background:"conic-gradient(from 225deg, #0a1a0a 0deg, #152815 180deg, #0f1f0f 270deg)",trackBorder:"rgba(100, 180, 100, 0.3)",needleColor:"#90ee90",needleShadow:"0 0 12px rgba(100, 200, 100, 0.5)",textColor:"#c0ffc0",textShadow:"0 0 8px rgba(100, 200, 100, 0.4)",tickColor:"rgba(150, 200, 150, 0.6)",centerGlow:"radial-gradient(circle, rgba(100, 180, 100, 0.12) 0%, transparent 70%)",gradientStops:["#228b22","#32cd32","#90ee90"],arcGlow:"rgba(100, 180, 100, 0.4)",capGradient:"radial-gradient(circle at 30% 30%, #2a4a2a 0%, #0a1a0a 100%)"},sunset:{background:"conic-gradient(from 225deg, #1a0a1a 0deg, #2d1528 180deg, #20101f 270deg)",trackBorder:"rgba(255, 100, 100, 0.3)",needleColor:"#ffa07a",needleShadow:"0 0 15px rgba(255, 160, 122, 0.6)",textColor:"#ffd0b0",textShadow:"0 0 10px rgba(255, 140, 100, 0.5)",tickColor:"rgba(255, 180, 150, 0.6)",centerGlow:"radial-gradient(circle, rgba(255, 140, 100, 0.15) 0%, transparent 70%)",gradientStops:["#ff6b6b","#ffa500","#ffdd00"],arcGlow:"rgba(255, 140, 100, 0.5)",capGradient:"radial-gradient(circle at 30% 30%, #5a3040 0%, #1a0a1a 100%)"}},Mot=42,dS=2*Math.PI*Mot,Lw=dS*.75,Lot=(r,e)=>{const i=[],a=e==="analog"?r*2:r;for(let s=0;s<=a;s++){const l=-135+s/a*270,u=s%2===0,c=e==="analog"&&s%2!==0;i.push({angle:l,isMajor:u,isMinor:c})}return i},h1e=G.forwardRef(({label:r,initialValue:e=50,minValue:i=0,maxValue:n=100,size:t=200,theme:o="cyber",variant:a="modern"},s)=>{const l=G.useRef(null),u=G.useRef(null),c=G.useRef(null),d=G.useRef(null),f=G.useRef({min:i,max:n}),h=G.useRef(void 0),p=Rot[o],g=Lot(10,a),v=G.useCallback((x,A,w)=>{const L=w-A;return-135+(L>0?(x-A)/L:0)*270},[]);G.useImperativeHandle(s,()=>({updateValue:x=>{if(x===h.current)return;h.current=x;const{min:A,max:w}=f.current,L=w-A;if(x===void 0)l.current&&(l.current.style.transform=`translate(-50%, -100%) rotate(${v(e,A,w)}deg)`,l.current.style.opacity="0.4"),u.current&&(u.current.textContent="--"),c.current&&(c.current.style.opacity="0.3"),d.current&&(d.current.style.opacity="0.3");else{const k=Math.max(A,Math.min(w,x)),D=v(k,A,w),j=L>0?(k-A)/L:0;if(l.current&&(l.current.style.transform=`translate(-50%, -100%) rotate(${D}deg)`,l.current.style.opacity="1"),u.current&&(u.current.textContent=x.toFixed(1)),c.current){c.current.style.opacity="1";const N=j*Lw;c.current.style.strokeDasharray=`${N} ${dS}`}if(d.current){d.current.style.opacity="1";const N=j*270;d.current.style.background=`conic-gradient(from 135deg, ${p.gradientStops[0]} 0deg, ${p.gradientStops[1]} ${N*.5}deg, ${p.gradientStops[2]} ${N}deg, transparent ${N}deg)`}}},updateBounds:(x,A)=>{f.current={min:x,max:A}}}));const y=v(e,i,n),m=(e-i)/(n-i),b=()=>{switch(a){case"classic":return _();case"minimal":return C();case"analog":return T();case"modern":default:return S()}},S=()=>R.jsxs("div",{style:{width:t,height:t,position:"relative",borderRadius:"50%",background:p.background,boxShadow:`
            inset 0 0 ${t*.15}px rgba(0, 0, 0, 0.5),
            0 ${t*.02}px ${t*.08}px rgba(0, 0, 0, 0.4)
          `,overflow:"hidden"},children:[R.jsx("div",{style:{position:"absolute",inset:0,background:p.centerGlow,pointerEvents:"none"}}),R.jsx("svg",{viewBox:"0 0 100 100",style:{position:"absolute",inset:"10%",width:"80%",height:"80%",transform:"rotate(135deg)"},children:R.jsx("circle",{cx:"50",cy:"50",r:"42",fill:"none",stroke:p.trackBorder,strokeWidth:"6",strokeLinecap:"round",strokeDasharray:`${Lw} ${dS}`,strokeDashoffset:"0",style:{filter:`drop-shadow(0 0 4px ${p.trackBorder})`}})}),R.jsxs("svg",{viewBox:"0 0 100 100",style:{position:"absolute",inset:"10%",width:"80%",height:"80%",transform:"rotate(135deg)"},children:[R.jsx("defs",{children:R.jsxs("linearGradient",{id:`gauge-gradient-${r}-modern`,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[R.jsx("stop",{offset:"0%",stopColor:p.gradientStops[0]}),R.jsx("stop",{offset:"50%",stopColor:p.gradientStops[1]}),R.jsx("stop",{offset:"100%",stopColor:p.gradientStops[2]})]})}),R.jsx("circle",{ref:c,cx:"50",cy:"50",r:"42",fill:"none",stroke:`url(#gauge-gradient-${r}-modern)`,strokeWidth:"6",strokeLinecap:"round",strokeDasharray:`${m*Lw} ${dS}`,strokeDashoffset:"0",style:{transition:"stroke-dasharray 0.1s ease-out",filter:`drop-shadow(0 0 6px ${p.arcGlow})`}})]}),g.map((x,A)=>R.jsx("div",{style:{position:"absolute",left:"50%",top:"50%",width:x.isMajor?"2px":"1px",height:x.isMajor?`${t*.08}px`:`${t*.05}px`,background:p.tickColor,transformOrigin:"center top",transform:`translate(-50%, 0) rotate(${x.angle}deg) translateY(${-t*.38}px)`,borderRadius:"1px"}},A)),R.jsx("div",{ref:l,style:{position:"absolute",left:"50%",top:"50%",width:"4px",height:`${t*.35}px`,background:`linear-gradient(to top, ${p.needleColor} 0%, rgba(255,255,255,0.6) 100%)`,transformOrigin:"center bottom",transform:`translate(-50%, -100%) rotate(${y}deg)`,borderRadius:"2px 2px 0 0",boxShadow:p.needleShadow,transition:"transform 0.1s ease-out"}}),R.jsx("div",{style:{position:"absolute",left:"50%",top:"50%",width:`${t*.12}px`,height:`${t*.12}px`,background:p.capGradient,borderRadius:"50%",transform:"translate(-50%, -50%)",boxShadow:"inset 0 -2px 4px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.4)"}}),R.jsx("div",{style:{position:"absolute",bottom:`${t*.18}px`,left:"50%",transform:"translateX(-50%)",textAlign:"center"},children:R.jsx("span",{ref:u,style:{fontFamily:"'JetBrains Mono', 'Fira Code', 'SF Mono', monospace",fontSize:`${t*.14}px`,fontWeight:600,color:p.textColor,textShadow:p.textShadow,letterSpacing:"-0.02em"},children:e.toFixed(1)})}),R.jsx("span",{style:{position:"absolute",bottom:`${t*.08}px`,left:`${t*.15}px`,fontFamily:"'JetBrains Mono', 'Fira Code', 'SF Mono', monospace",fontSize:`${t*.055}px`,color:"rgba(200, 200, 220, 0.5)"},children:i}),R.jsx("span",{style:{position:"absolute",bottom:`${t*.08}px`,right:`${t*.15}px`,fontFamily:"'JetBrains Mono', 'Fira Code', 'SF Mono', monospace",fontSize:`${t*.055}px`,color:"rgba(200, 200, 220, 0.5)"},children:n})]}),_=()=>R.jsxs("div",{style:{width:t,height:t,position:"relative",borderRadius:"50%",background:p.background,boxShadow:`
            inset 0 0 ${t*.2}px rgba(0, 0, 0, 0.6),
            0 ${t*.03}px ${t*.1}px rgba(0, 0, 0, 0.5),
            inset 0 ${t*.02}px ${t*.05}px rgba(255, 255, 255, 0.05)
          `,overflow:"hidden"},children:[R.jsx("div",{style:{position:"absolute",inset:0,background:p.centerGlow,pointerEvents:"none"}}),R.jsx("svg",{viewBox:"0 0 100 100",style:{position:"absolute",inset:"8%",width:"84%",height:"84%",transform:"rotate(135deg)"},children:R.jsx("circle",{cx:"50",cy:"50",r:"40",fill:"none",stroke:p.trackBorder,strokeWidth:"12",strokeLinecap:"butt",strokeDasharray:`${Lw*.95} ${dS}`,strokeDashoffset:"0"})}),R.jsxs("svg",{viewBox:"0 0 100 100",style:{position:"absolute",inset:"8%",width:"84%",height:"84%",transform:"rotate(135deg)"},children:[R.jsx("defs",{children:R.jsxs("linearGradient",{id:`gauge-gradient-${r}-classic`,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[R.jsx("stop",{offset:"0%",stopColor:p.gradientStops[0]}),R.jsx("stop",{offset:"50%",stopColor:p.gradientStops[1]}),R.jsx("stop",{offset:"100%",stopColor:p.gradientStops[2]})]})}),R.jsx("circle",{ref:c,cx:"50",cy:"50",r:"40",fill:"none",stroke:`url(#gauge-gradient-${r}-classic)`,strokeWidth:"12",strokeLinecap:"butt",strokeDasharray:`${m*Lw*.95} ${dS}`,strokeDashoffset:"0",style:{transition:"stroke-dasharray 0.1s ease-out",filter:`drop-shadow(0 0 8px ${p.arcGlow})`}})]}),g.filter((x,A)=>A%2===0).map((x,A)=>R.jsx("div",{style:{position:"absolute",left:"50%",top:"50%",width:"3px",height:`${t*.1}px`,background:p.tickColor,transformOrigin:"center top",transform:`translate(-50%, 0) rotate(${x.angle}deg) translateY(${-t*.42}px)`,borderRadius:"1px"}},A)),R.jsx("div",{ref:l,style:{position:"absolute",left:"50%",top:"50%",width:"0",height:"0",borderLeft:`${t*.02}px solid transparent`,borderRight:`${t*.02}px solid transparent`,borderBottom:`${t*.35}px solid ${p.needleColor}`,transformOrigin:"center bottom",transform:`translate(-50%, -100%) rotate(${y}deg)`,filter:`drop-shadow(${p.needleShadow})`,transition:"transform 0.1s ease-out"}}),R.jsx("div",{style:{position:"absolute",left:"50%",top:"50%",width:`${t*.18}px`,height:`${t*.18}px`,background:p.capGradient,borderRadius:"50%",transform:"translate(-50%, -50%)",boxShadow:"inset 0 -3px 6px rgba(0, 0, 0, 0.5), 0 3px 10px rgba(0, 0, 0, 0.5)"}}),R.jsx("div",{style:{position:"absolute",bottom:`${t*.22}px`,left:"50%",transform:"translateX(-50%)",textAlign:"center"},children:R.jsx("span",{ref:u,style:{fontFamily:"'Georgia', serif",fontSize:`${t*.12}px`,fontWeight:700,color:p.textColor,textShadow:p.textShadow},children:e.toFixed(1)})})]}),C=()=>R.jsxs("div",{style:{width:t,height:t,position:"relative",borderRadius:"50%",background:"transparent"},children:[R.jsx("svg",{viewBox:"0 0 100 100",style:{position:"absolute",inset:"5%",width:"90%",height:"90%",transform:"rotate(135deg)"},children:R.jsx("circle",{cx:"50",cy:"50",r:"45",fill:"none",stroke:p.trackBorder,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:`${Lw*1.07} ${dS}`,strokeDashoffset:"0"})}),R.jsx("svg",{viewBox:"0 0 100 100",style:{position:"absolute",inset:"5%",width:"90%",height:"90%",transform:"rotate(135deg)"},children:R.jsx("circle",{ref:c,cx:"50",cy:"50",r:"45",fill:"none",stroke:p.gradientStops[1],strokeWidth:"3",strokeLinecap:"round",strokeDasharray:`${m*Lw*1.07} ${dS}`,strokeDashoffset:"0",style:{transition:"stroke-dasharray 0.1s ease-out",filter:`drop-shadow(0 0 4px ${p.arcGlow})`}})}),R.jsx("div",{ref:l,style:{position:"absolute",left:"50%",top:"50%",width:"2px",height:`${t*.4}px`,background:p.needleColor,transformOrigin:"center bottom",transform:`translate(-50%, -100%) rotate(${y}deg)`,borderRadius:"1px",boxShadow:p.needleShadow,transition:"transform 0.1s ease-out"}}),R.jsx("div",{style:{position:"absolute",left:"50%",top:"50%",width:`${t*.05}px`,height:`${t*.05}px`,background:p.needleColor,borderRadius:"50%",transform:"translate(-50%, -50%)",boxShadow:p.needleShadow}}),R.jsx("div",{style:{position:"absolute",bottom:`${t*.28}px`,left:"50%",transform:"translateX(-50%)",textAlign:"center"},children:R.jsx("span",{ref:u,style:{fontFamily:"'Helvetica Neue', sans-serif",fontSize:`${t*.16}px`,fontWeight:300,color:p.textColor,letterSpacing:"-0.03em"},children:e.toFixed(1)})})]}),T=()=>{const x=m*270;return R.jsxs("div",{style:{width:t,height:t,position:"relative",borderRadius:"50%",background:p.background,boxShadow:`
              inset 0 0 ${t*.15}px rgba(0, 0, 0, 0.6),
              0 ${t*.02}px ${t*.1}px rgba(0, 0, 0, 0.5),
              inset 0 0 ${t*.02}px rgba(255, 255, 255, 0.1)
            `,overflow:"hidden"},children:[R.jsx("div",{style:{position:"absolute",inset:0,background:p.centerGlow,pointerEvents:"none"}}),R.jsx("div",{ref:d,style:{position:"absolute",inset:"12%",width:"76%",height:"76%",borderRadius:"50%",background:`conic-gradient(from 135deg, ${p.gradientStops[0]} 0deg, ${p.gradientStops[1]} ${x*.5}deg, ${p.gradientStops[2]} ${x}deg, transparent ${x}deg)`,mask:"radial-gradient(circle at 50% 50%, transparent 70%, black 70%)",WebkitMask:"radial-gradient(circle at 50% 50%, transparent 70%, black 70%)",transition:"background 0.1s ease-out",filter:`drop-shadow(0 0 6px ${p.arcGlow})`}}),R.jsx("div",{style:{position:"absolute",inset:"12%",width:"76%",height:"76%",borderRadius:"50%",background:`conic-gradient(from 135deg, ${p.trackBorder} 0deg, ${p.trackBorder} 270deg, transparent 270deg)`,mask:"radial-gradient(circle at 50% 50%, transparent 70%, black 70%)",WebkitMask:"radial-gradient(circle at 50% 50%, transparent 70%, black 70%)",opacity:.5,zIndex:-1}}),g.map((A,w)=>R.jsx("div",{style:{position:"absolute",left:"50%",top:"50%",width:A.isMajor?"2.5px":"1px",height:A.isMajor?`${t*.1}px`:`${t*.05}px`,background:A.isMajor?p.tickColor:`${p.tickColor}80`,transformOrigin:"center top",transform:`translate(-50%, 0) rotate(${A.angle}deg) translateY(${-t*.4}px)`,borderRadius:"0.5px"}},w)),R.jsx("div",{ref:l,style:{position:"absolute",left:"50%",top:"50%",width:`${t*.06}px`,height:`${t*.38}px`,background:`linear-gradient(90deg, ${p.needleColor}dd 0%, ${p.needleColor} 50%, ${p.needleColor}aa 100%)`,clipPath:"polygon(40% 100%, 60% 100%, 55% 8%, 50% 0%, 45% 8%)",transformOrigin:"50% 100%",transform:`translate(-50%, -100%) rotate(${y}deg)`,boxShadow:p.needleShadow,transition:"transform 0.1s ease-out"}}),R.jsx("div",{style:{position:"absolute",left:"50%",top:"50%",width:`${t*.14}px`,height:`${t*.14}px`,background:p.capGradient,borderRadius:"50%",transform:"translate(-50%, -50%)",boxShadow:"inset 0 -2px 6px rgba(0, 0, 0, 0.5), 0 2px 10px rgba(0, 0, 0, 0.4)"}}),R.jsx("div",{style:{position:"absolute",left:"50%",top:"50%",width:`${t*.06}px`,height:`${t*.06}px`,background:"radial-gradient(circle at 30% 30%, #aaa 0%, #444 100%)",borderRadius:"50%",transform:"translate(-50%, -50%)"}}),R.jsx("div",{style:{position:"absolute",bottom:`${t*.2}px`,left:"50%",transform:"translateX(-50%)",textAlign:"center",background:"rgba(0,0,0,0.3)",padding:`${t*.02}px ${t*.05}px`,borderRadius:`${t*.02}px`},children:R.jsx("span",{ref:u,style:{fontFamily:"'Courier New', monospace",fontSize:`${t*.11}px`,fontWeight:700,color:p.textColor,textShadow:p.textShadow,letterSpacing:"0.05em"},children:e.toFixed(1)})}),R.jsx("span",{style:{position:"absolute",bottom:`${t*.1}px`,left:`${t*.12}px`,fontFamily:"'Courier New', monospace",fontSize:`${t*.05}px`,color:p.tickColor},children:i}),R.jsx("span",{style:{position:"absolute",bottom:`${t*.1}px`,right:`${t*.12}px`,fontFamily:"'Courier New', monospace",fontSize:`${t*.05}px`,color:p.tickColor},children:n})]})};return b()});h1e.displayName="CSSGauge";const kot=r=>r>66?"#FF1133":r>33?"#FFBB00":"#44DD66",Iot=async(r,e,i,n,t)=>{const{wasmContext:o,sciChartSurface:a}=await jt.SciChartPolarSurface.create(r,{padding:new jt.Thickness(10,10,10,10)}),s=Math.PI*1.5,l=new jt.NumberRange(i,n),u=["#44DD66","#FFBB00","#FF1133"],c=n-i,d=[i+c*.33,i+c*.66,n],f=new jt.PolarNumericAxis(o,{polarAxisMode:jt.EPolarAxisMode.Angular,visibleRange:l,flippedCoordinates:!0,totalAngle:s,startAngle:(Math.PI-s)/2,isVisible:!1});t.angularXAxis=f,a.xAxes.add(f);const h=new jt.PolarNumericAxis(o,{polarAxisMode:jt.EPolarAxisMode.Radial,isVisible:!1});a.yAxes.add(h);const p=new jt.PolarArcAnnotation({y1:9.4,y2:7,x1:i,x2:n,fill:"#88888822",strokeThickness:0});t.backgroundArc=p,a.annotations.add(p);const g=new jt.PolarArcAnnotation({y1:9.4,y2:7,x1:i,x2:e,fill:"#44DD66",strokeThickness:0});t.valueArc=g,a.annotations.add(g),d.forEach((b,S)=>{const _=new jt.PolarArcAnnotation({y1:10,y2:9.7,x1:d[S-1]??i,x2:b,fill:u[S],strokeThickness:0});a.annotations.add(_)});const v=new jt.PolarPointerAnnotation({x1:e,y1:7,pointerCenterStyle:{size:.15,stroke:"#666",strokeWidth:5,fill:"#333"},pointerStyle:{fill:"#666",stroke:"#666",strokeWidth:0,backExtensionSize:.2,baseSize:.1}});t.pointer=v,a.annotations.add(v);const y=(i+n)/2,m=new jt.NativeTextAnnotation({text:`${e.toFixed(1)}`,fontSize:14,textColor:"#fff",x1:y,y1:-2,xCoordinateMode:jt.ECoordinateMode.DataValue,yCoordinateMode:jt.ECoordinateMode.DataValue,horizontalAnchorPoint:jt.EHorizontalAnchorPoint.Center,verticalAnchorPoint:jt.EVerticalAnchorPoint.Top});return t.text=m,a.annotations.add(m),{sciChartSurface:a,wasmContext:o}},p1e=G.forwardRef(({initialValue:r=50,minValue:e=0,maxValue:i=100,size:n=200},t)=>{const o=G.useRef({valueArc:null,pointer:null,text:null,backgroundArc:null,angularXAxis:null}),a=G.useRef(void 0),s=G.useRef({initialValue:r,minValue:e,maxValue:i}),l=G.useRef({min:e,max:i}),u=(d,f,h)=>{const p=h-f,g=p>0?(d-f)/p*100:50;return kot(g)};G.useImperativeHandle(t,()=>({updateValue:d=>{const f=o.current;if(!f.valueArc||!f.pointer||!f.text||d===a.current)return;a.current=d;const{min:h,max:p}=l.current;if(d===void 0)f.valueArc.x2=r,f.valueArc.fill=u(r,h,p),f.pointer.x1=r,f.text.text="--";else{const g=Math.max(h,Math.min(p,d));f.valueArc.x2=g,f.valueArc.fill=u(g,h,p),f.pointer.x1=g,f.text.text=`${d.toFixed(1)}`}},updateBounds:(d,f)=>{const h=o.current;!h.angularXAxis||!h.backgroundArc||(l.current={min:d,max:f},h.angularXAxis.visibleRange=new jt.NumberRange(d,f),h.backgroundArc.x1=d,h.backgroundArc.x2=f,h.text&&(h.text.x1=(d+f)/2),h.valueArc&&(h.valueArc.x1=d))}}));const c=G.useMemo(()=>d=>{const{initialValue:f,minValue:h,maxValue:p}=s.current;return Iot(d,f,h,p,o.current)},[]);return R.jsx("div",{style:{height:n,width:n},children:R.jsx(eL.SciChartReact,{initChart:c,style:{width:"100%",height:"100%"}})})});p1e.displayName="Gauge";const Pp={background:"#1a1a2e",inactive:"#333344",active:"#44DD66",activeHighlight:"#66FF88",reverse:"#FF6644",neutral:"#FFBB00",textInactive:"#888899",border:"#444455"},Not=["P","R","N","D"],h7=(r,e)=>r==="R"?Pp.reverse:r==="N"?Pp.neutral:Pp.active;class g1e{constructor(){this.fillPaletteMode=jt.EFillPaletteMode.SOLID,this.inactiveColor=jt.parseColorToUIntArgb(Pp.inactive)}onAttached(e){}onDetached(){}overrideFillArgb(){return this.inactiveColor}}const Fot=async(r,e,i,n)=>{const{sciChartSurface:t,wasmContext:o}=await jt.SciChartSurface.create(r,{padding:new jt.Thickness(5,10,15,10)}),a=e.length,s=1,l=.2,u=a*(s+l)-l,c=new jt.NumericAxis(o,{isVisible:!1,visibleRange:new jt.NumberRange(-.5,u+.5)});t.xAxes.add(c);const d=new jt.NumericAxis(o,{isVisible:!1,visibleRange:new jt.NumberRange(-.5,2)});t.yAxes.add(d);const f=[],h=[],p=[],g=[];e.forEach((T,x)=>{const A=x*(s+l);f.push(A),h.push(0),p.push(A+s),g.push(1)});const v=new jt.XyxyDataSeries(o,{xValues:f,yValues:h,x1Values:p,y1Values:g}),y=new jt.FastRectangleRenderableSeries(o,{dataSeries:v,columnXMode:jt.EColumnMode.StartEnd,columnYMode:jt.EColumnYMode.TopBottom,stroke:Pp.border,strokeThickness:2,paletteProvider:new g1e});t.renderableSeries.add(y);const m=i*(s+l),b=new jt.XyxyDataSeries(o,{xValues:[m],yValues:[0],x1Values:[m+s],y1Values:[1]}),S=h7(e[i]),_=new jt.FastRectangleRenderableSeries(o,{dataSeries:b,columnXMode:jt.EColumnMode.StartEnd,columnYMode:jt.EColumnYMode.TopBottom,stroke:Pp.activeHighlight,strokeThickness:3,fill:S});t.renderableSeries.add(_),n.activeRectSeries=_,n.activeDataSeries=b;const C=[];return e.forEach((T,x)=>{const A=x*(s+l)+s/2,w=x===i,L=new jt.TextAnnotation({x1:A,y1:.5,text:T,fontSize:18,fontWeight:"bold",textColor:w?"#000000":Pp.textInactive,horizontalAnchorPoint:jt.EHorizontalAnchorPoint.Center,verticalAnchorPoint:jt.EVerticalAnchorPoint.Center});t.annotations.add(L),C.push(L)}),n.gearLabels=C,{sciChartSurface:t,wasmContext:o}},jot=async(r,e,i,n)=>{const{sciChartSurface:t,wasmContext:o}=await jt.SciChartSurface.create(r,{theme:{type:"Dark",sciChartBackground:"transparent",loadingAnimationBackground:"transparent"},padding:new jt.Thickness(10,5,10,5)}),a=e.length,s=1,l=.15,u=a*(s+l)-l,c=new jt.NumericAxis(o,{isVisible:!1,visibleRange:new jt.NumberRange(-.3,1.3)});t.xAxes.add(c);const d=new jt.NumericAxis(o,{isVisible:!1,visibleRange:new jt.NumberRange(-.5,u+.5),flippedCoordinates:!0});t.yAxes.add(d);const f=[],h=[],p=[],g=[];e.forEach((T,x)=>{const A=x*(s+l);f.push(0),h.push(A),p.push(1),g.push(A+s)});const v=new jt.XyxyDataSeries(o,{xValues:f,yValues:h,x1Values:p,y1Values:g}),y=new jt.FastRectangleRenderableSeries(o,{dataSeries:v,columnXMode:jt.EColumnMode.StartEnd,columnYMode:jt.EColumnYMode.TopBottom,stroke:Pp.border,strokeThickness:2,paletteProvider:new g1e});t.renderableSeries.add(y);const m=i*(s+l),b=new jt.XyxyDataSeries(o,{xValues:[0],yValues:[m],x1Values:[1],y1Values:[m+s]}),S=h7(e[i]),_=new jt.FastRectangleRenderableSeries(o,{dataSeries:b,columnXMode:jt.EColumnMode.StartEnd,columnYMode:jt.EColumnYMode.TopBottom,stroke:Pp.activeHighlight,strokeThickness:3,fill:S});t.renderableSeries.add(_),n.activeRectSeries=_,n.activeDataSeries=b;const C=[];return e.forEach((T,x)=>{const A=x*(s+l)+s/2,w=x===i,L=new jt.TextAnnotation({x1:.5,y1:A,text:T,fontSize:16,fontWeight:"bold",textColor:w?"#000000":Pp.textInactive,horizontalAnchorPoint:jt.EHorizontalAnchorPoint.Center,verticalAnchorPoint:jt.EVerticalAnchorPoint.Center});t.annotations.add(L),C.push(L)}),n.gearLabels=C,{sciChartSurface:t,wasmContext:o}},v1e=G.forwardRef(({initialGear:r=0,gears:e=Not,orientation:i="horizontal",size:n=200},t)=>{const o=G.useRef({activeRectSeries:null,activeDataSeries:null,gearLabels:[]}),a=G.useRef(void 0),s=G.useRef(null),l=G.useRef({gears:e,initialGear:r,orientation:i});G.useImperativeHandle(t,()=>({updateValue:d=>{const f=o.current;if(!f.activeDataSeries||!f.activeRectSeries)return;const h=d!==void 0?Math.max(0,Math.min(e.length-1,Math.round(d))):r;if(h===a.current)return;a.current=h;const p=1,g=i==="horizontal"?.2:.15;if(i==="horizontal"){const y=h*(p+g);f.activeDataSeries.clear(),f.activeDataSeries.append(y,0,y+p,1)}else{const y=h*(p+g);f.activeDataSeries.clear(),f.activeDataSeries.append(0,y,1,y+p)}const v=h7(e[h]);f.activeRectSeries.fill=v,f.gearLabels.forEach((y,m)=>{y.textColor=m===h?"#000000":Pp.textInactive}),s.current&&(s.current.textContent=`Current: ${d!==void 0?e[h]:"--"}`)},updateBounds:(d,f)=>{}}));const u=G.useMemo(()=>d=>{const{gears:f,initialGear:h,orientation:p}=l.current;return(p==="horizontal"?Fot:jot)(d,f,h,o.current)},[]),c=i==="horizontal"?{width:n,height:n*.4}:{width:n*.3,height:n};return R.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"},children:R.jsx(eL.SciChartReact,{initChart:u,style:{...c,border:"1px solid #333",borderRadius:"8px",backgroundColor:Pp.background}})})});v1e.displayName="GearGauge";const Bot={default:{plateColor:"linear-gradient(180deg, #333 0%, #222 50%, #111 100%)",borderColor:"#444",borderWidth:4,needleColor:"#f00",needleShadow:"0 0 10px rgba(255, 0, 0, 0.5)",valueColor:"#fff",unitColor:"#aaa",majorTickColor:"#fff",minorTickColor:"#888",numberColor:"#fff",highlightStart:.8,highlightEnd:1,highlightColor:"rgba(255, 0, 0, 0.3)",innerShadow:!0,colorBarGradient:["#0f0","#ff0","#f00"]},"car-speedometer":{plateColor:"radial-gradient(circle at 30% 30%, #2a2a2a 0%, #0a0a0a 100%)",borderColor:"#555",borderWidth:6,needleColor:"#ff3300",needleShadow:"0 0 15px rgba(255, 51, 0, 0.7)",valueColor:"#fff",unitColor:"#888",majorTickColor:"#fff",minorTickColor:"#666",numberColor:"#fff",highlightStart:.75,highlightEnd:1,highlightColor:"rgba(255, 0, 0, 0.25)",innerShadow:!0,colorBarGradient:["#00ff00","#ffff00","#ff0000"]},industrial:{plateColor:"linear-gradient(180deg, #e8e8e8 0%, #c8c8c8 100%)",borderColor:"#333",borderWidth:5,needleColor:"#333",needleShadow:"2px 2px 4px rgba(0, 0, 0, 0.3)",valueColor:"#222",unitColor:"#555",majorTickColor:"#333",minorTickColor:"#999",numberColor:"#222",highlightStart:.7,highlightEnd:1,highlightColor:"rgba(255, 100, 0, 0.3)",innerShadow:!1,colorBarGradient:["#00aa00","#aaaa00","#ff5500"]},compass:{plateColor:"radial-gradient(circle, #1a1a2e 0%, #16213e 50%, #0f0f23 100%)",borderColor:"#4a4a6a",borderWidth:4,needleColor:"#e74c3c",needleShadow:"0 0 12px rgba(231, 76, 60, 0.6)",valueColor:"#ecf0f1",unitColor:"#95a5a6",majorTickColor:"#ecf0f1",minorTickColor:"#7f8c8d",numberColor:"#ecf0f1",highlightStart:0,highlightEnd:0,highlightColor:"transparent",innerShadow:!0,colorBarGradient:["#3498db","#3498db","#3498db"]},temperature:{plateColor:"radial-gradient(circle at 40% 40%, #1a0a0a 0%, #2d0000 100%)",borderColor:"#8b0000",borderWidth:4,needleColor:"#ff6347",needleShadow:"0 0 12px rgba(255, 99, 71, 0.6)",valueColor:"#ffd700",unitColor:"#ff8c00",majorTickColor:"#ff8c00",minorTickColor:"#8b4513",numberColor:"#ffa500",highlightStart:.65,highlightEnd:1,highlightColor:"rgba(255, 0, 0, 0.35)",innerShadow:!0,colorBarGradient:["#00bfff","#ffd700","#ff4500"]},fuel:{plateColor:"radial-gradient(circle at 30% 30%, #2a2a2a 0%, #1a1a1a 100%)",borderColor:"#4a4a4a",borderWidth:3,needleColor:"#f39c12",needleShadow:"0 0 8px rgba(243, 156, 18, 0.5)",valueColor:"#fff",unitColor:"#888",majorTickColor:"#fff",minorTickColor:"#555",numberColor:"#ddd",highlightStart:0,highlightEnd:.15,highlightColor:"rgba(255, 0, 0, 0.35)",innerShadow:!0,colorBarGradient:["#ff0000","#ffff00","#00ff00"]},rpm:{plateColor:"radial-gradient(circle at 30% 30%, #0a0a0a 0%, #000 100%)",borderColor:"#333",borderWidth:5,needleColor:"#ff0000",needleShadow:"0 0 20px rgba(255, 0, 0, 0.8)",valueColor:"#fff",unitColor:"#ff0000",majorTickColor:"#fff",minorTickColor:"#444",numberColor:"#fff",highlightStart:.75,highlightEnd:1,highlightColor:"rgba(255, 0, 0, 0.4)",innerShadow:!0,colorBarGradient:["#00ff00","#ffff00","#ff0000"]},voltage:{plateColor:"radial-gradient(circle at 30% 30%, #001a33 0%, #000d1a 100%)",borderColor:"#0066cc",borderWidth:4,needleColor:"#00ff88",needleShadow:"0 0 15px rgba(0, 255, 136, 0.7)",valueColor:"#00ff88",unitColor:"#0099ff",majorTickColor:"#0099ff",minorTickColor:"#004466",numberColor:"#00ccff",highlightStart:.85,highlightEnd:1,highlightColor:"rgba(255, 0, 0, 0.3)",innerShadow:!0,colorBarGradient:["#00ff00","#00ff88","#ff0000"]}},Vot=r=>{const e=[];for(let o=0;o<=r;o++){const a=-135+o/r*270,s=o/r;e.push({angle:a,percent:s})}return e},Hot=(r,e)=>{const i=[],a=r*e;for(let s=0;s<=a;s++){if(s%e===0)continue;const l=-135+s/a*270;i.push({angle:l})}return i},y1e=G.forwardRef(({label:r,initialValue:e=50,minValue:i=0,maxValue:n=100,size:t=200,preset:o="default",unit:a=""},s)=>{const l=G.useRef(null),u=G.useRef(null),c=G.useRef(null),d=G.useRef({min:i,max:n}),f=G.useRef(void 0),h=Bot[o],p=Vot(10),g=Hot(10,5),v=G.useCallback((T,x,A)=>{const w=A-x;return-135+(w>0?(T-x)/w:0)*270},[]),y=T=>Math.abs(T)>=1e3?T.toFixed(0):(Math.abs(T)>=100,T.toFixed(1)),m=()=>{const T=[],{min:x,max:A}=d.current,w=A-x,L=10;for(let k=0;k<=L;k++){const D=x+k/L*w,j=-135+k/L*270,N=j*Math.PI/180,V=.68,W=50+V*50*Math.sin(N),K=50-V*50*Math.cos(N);T.push({value:Math.round(D*10)/10,x:W,y:K,angle:j})}return T};G.useImperativeHandle(s,()=>({updateValue:T=>{if(T===f.current)return;f.current=T;const{min:x,max:A}=d.current;if(T===void 0)l.current&&(l.current.style.transform=`translate(-50%, -100%) rotate(${v(e,x,A)}deg)`,l.current.style.opacity="0.4"),u.current&&(u.current.textContent="--");else{const w=Math.max(x,Math.min(A,T)),L=v(w,x,A);l.current&&(l.current.style.transform=`translate(-50%, -100%) rotate(${L}deg)`,l.current.style.opacity="1"),u.current&&(u.current.textContent=y(T))}},updateBounds:(T,x)=>{d.current={min:T,max:x}}}));const b=v(e,i,n),S=m(),_=-135+h.highlightStart*270,C=-135+h.highlightEnd*270;return R.jsxs("div",{style:{width:t,height:t,position:"relative",borderRadius:"50%",background:h.plateColor,border:`${h.borderWidth}px solid ${h.borderColor}`,boxShadow:h.innerShadow?`
              inset 0 0 ${t*.15}px rgba(0, 0, 0, 0.7),
              0 ${t*.02}px ${t*.08}px rgba(0, 0, 0, 0.5),
              inset 0 ${t*.01}px ${t*.02}px rgba(255, 255, 255, 0.05)
            `:`0 ${t*.02}px ${t*.08}px rgba(0, 0, 0, 0.3)`,overflow:"hidden"},children:[h.highlightStart!==h.highlightEnd&&R.jsxs("svg",{viewBox:"0 0 100 100",style:{position:"absolute",inset:"8%",width:"84%",height:"84%"},children:[R.jsx("defs",{children:R.jsx("linearGradient",{id:`highlight-gradient-${r}-${o}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:h.colorBarGradient.map((T,x)=>R.jsx("stop",{offset:`${x/(h.colorBarGradient.length-1)*100}%`,stopColor:T},x))})}),R.jsx("path",{d:age(50,50,44,_,C),fill:"none",stroke:h.highlightColor,strokeWidth:"8",strokeLinecap:"butt"})]}),R.jsxs("svg",{viewBox:"0 0 100 100",style:{position:"absolute",inset:"5%",width:"90%",height:"90%"},children:[R.jsx("defs",{children:R.jsx("linearGradient",{id:`color-bar-${r}-${o}`,x1:"0%",y1:"100%",x2:"100%",y2:"0%",children:h.colorBarGradient.map((T,x)=>R.jsx("stop",{offset:`${x/(h.colorBarGradient.length-1)*100}%`,stopColor:T},x))})}),R.jsx("path",{d:age(50,50,46,-135,135),fill:"none",stroke:`url(#color-bar-${r}-${o})`,strokeWidth:"3",strokeLinecap:"round",style:{opacity:.6}})]}),p.map((T,x)=>R.jsx("div",{style:{position:"absolute",left:"50%",top:"50%",width:`${t*.015}px`,height:`${t*.1}px`,background:h.majorTickColor,transformOrigin:"center top",transform:`translate(-50%, 0) rotate(${T.angle}deg) translateY(${-t*.42}px)`,borderRadius:"1px"}},`major-${x}`)),g.map((T,x)=>R.jsx("div",{style:{position:"absolute",left:"50%",top:"50%",width:`${t*.008}px`,height:`${t*.05}px`,background:h.minorTickColor,transformOrigin:"center top",transform:`translate(-50%, 0) rotate(${T.angle}deg) translateY(${-t*.42}px)`,borderRadius:"1px"}},`minor-${x}`)),S.map((T,x)=>R.jsx("div",{style:{position:"absolute",left:`${T.x}%`,top:`${T.y}%`,transform:"translate(-50%, -50%)",fontFamily:"'JetBrains Mono', 'SF Mono', 'Consolas', monospace",fontSize:`${t*.065}px`,fontWeight:600,color:h.numberColor,textShadow:"0 1px 2px rgba(0, 0, 0, 0.5)"},children:T.value},`num-${x}`)),R.jsx("div",{ref:l,style:{position:"absolute",left:"50%",top:"50%",width:`${t*.04}px`,height:`${t*.38}px`,background:`linear-gradient(90deg, 
              ${h.needleColor}aa 0%, 
              ${h.needleColor} 40%, 
              ${h.needleColor} 60%, 
              ${h.needleColor}aa 100%)`,clipPath:"polygon(35% 100%, 65% 100%, 55% 5%, 50% 0%, 45% 5%)",transformOrigin:"50% 100%",transform:`translate(-50%, -100%) rotate(${b}deg)`,boxShadow:h.needleShadow,transition:"transform 0.1s ease-out",zIndex:10}}),R.jsx("div",{style:{position:"absolute",left:"50%",top:"50%",width:`${t*.06}px`,height:`${t*.08}px`,background:h.needleColor,clipPath:"polygon(25% 0%, 75% 0%, 90% 100%, 10% 100%)",transformOrigin:"50% 0%",transform:`translate(-50%, 0) rotate(${b}deg)`,opacity:.8,zIndex:9}}),R.jsx("div",{style:{position:"absolute",left:"50%",top:"50%",width:`${t*.15}px`,height:`${t*.15}px`,background:`radial-gradient(circle at 35% 35%, 
              #666 0%, 
              #333 40%, 
              #111 80%, 
              #000 100%)`,borderRadius:"50%",transform:"translate(-50%, -50%)",boxShadow:`
              inset 0 -2px 4px rgba(255, 255, 255, 0.1),
              0 2px 8px rgba(0, 0, 0, 0.5)
            `,zIndex:11}}),R.jsx("div",{style:{position:"absolute",left:"50%",top:"50%",width:`${t*.05}px`,height:`${t*.05}px`,background:"radial-gradient(circle at 40% 40%, #aaa 0%, #444 100%)",borderRadius:"50%",transform:"translate(-50%, -50%)",zIndex:12}}),R.jsxs("div",{style:{position:"absolute",bottom:`${t*.22}px`,left:"50%",transform:"translateX(-50%)",textAlign:"center",background:"rgba(0, 0, 0, 0.4)",padding:`${t*.02}px ${t*.06}px`,borderRadius:`${t*.02}px`,border:"1px solid rgba(255, 255, 255, 0.1)"},children:[R.jsx("span",{ref:u,style:{fontFamily:"'JetBrains Mono', 'SF Mono', 'Consolas', monospace",fontSize:`${t*.12}px`,fontWeight:700,color:h.valueColor,letterSpacing:"-0.02em"},children:y(e)}),a&&R.jsx("span",{ref:c,style:{display:"block",fontFamily:"'JetBrains Mono', 'SF Mono', 'Consolas', monospace",fontSize:`${t*.055}px`,color:h.unitColor,marginTop:`-${t*.01}px`},children:a})]}),R.jsx("div",{style:{position:"absolute",top:`${t*.15}px`,left:"50%",transform:"translateX(-50%)",fontFamily:"'JetBrains Mono', 'SF Mono', 'Consolas', monospace",fontSize:`${t*.05}px`,color:h.unitColor,textTransform:"uppercase",letterSpacing:"0.1em",opacity:.7},children:r})]})});function age(r,e,i,n,t){const o=sge(r,e,i,t),a=sge(r,e,i,n),s=t-n<=180?"0":"1";return["M",o.x,o.y,"A",i,i,0,s,0,a.x,a.y].join(" ")}function sge(r,e,i,n){const t=(n-90)*Math.PI/180;return{x:r+i*Math.cos(t),y:e+i*Math.sin(t)}}y1e.displayName="RadialGauge";const lge="#1a1a2e",l6={VividPink:"#FF1133",VividRed:"#FF1133"},m1e=(r,e=7)=>{const i=r/e,n=Math.pow(10,Math.floor(Math.log10(i))),t=i/n;let o;return t<=1?o=1:t<=2?o=2:t<=2.5?o=2.5:t<=5?o=5:o=10,o*n},Uot=async(r,e,i,n,t)=>{const{sciChartSurface:o,wasmContext:a}=await jt.SciChartPolarSurface.create(r,{padding:new jt.Thickness(10,10,10,10)}),s=new jt.PolarNumericAxis(a,{visibleRange:new jt.NumberRange(0,10),labelStyle:{padding:new jt.Thickness(0,0,0,0)},axisAlignment:jt.EAxisAlignment.Right,polarAxisMode:jt.EPolarAxisMode.Radial,useNativeText:!0,drawLabels:!1,autoTicks:!1,majorDelta:10,drawMajorGridLines:!1,drawMinorGridLines:!1,drawMajorTickLines:!1,drawMinorTickLines:!1,totalAngle:Math.PI*3/2});o.xAxes.add(s);const l=n-i,u=m1e(l),c=new jt.PolarNumericAxis(a,{polarAxisMode:jt.EPolarAxisMode.Angular,axisAlignment:jt.EAxisAlignment.Top,polarLabelMode:jt.EPolarLabelMode.Parallel,visibleRange:new jt.NumberRange(i,n),flippedCoordinates:!0,useNativeText:!0,totalAngle:Math.PI*3/2,startAngle:Math.PI*2-Math.PI/4,autoTicks:!1,majorDelta:u,minorsPerMajor:4,drawMajorGridLines:!1,drawMinorGridLines:!1,drawMajorTickLines:!0,majorTickLineStyle:{color:"#FFFFFF",strokeThickness:2.5,tickSize:14},drawMinorTickLines:!0,minorTickLineStyle:{color:"#FFFFFF",strokeThickness:.5,tickSize:8},isInnerAxis:!0,labelPrecision:0,labelStyle:{color:"white",fontSize:14,padding:jt.Thickness.fromNumber(2)}});t.angularYAxis=c,o.yAxes.add(c);const d=new jt.PolarPointerAnnotation({x1:e,y1:10,xCoordinateMode:jt.ECoordinateMode.DataValue,yCoordinateMode:jt.ECoordinateMode.DataValue,pointerStyle:{baseSize:.02,fill:l6.VividPink,stroke:l6.VividPink,backExtensionSize:.2},pointerCenterStyle:{size:.25,fill:lge,stroke:lge},isStrokeAboveCenter:!0,strokeLineJoin:jt.EStrokeLineJoin.Round});t.pointer=d;const f=new jt.PolarArcAnnotation({y1:i+l*.71,y2:n,x1:10,x2:9.4,fill:l6.VividRed,strokeThickness:0,annotationLayer:jt.EAnnotationLayer.Background});t.dangerArcSector=f;const h=new jt.PolarArcAnnotation({y1:i,y2:n,x1:10,x2:9.7,stroke:"#FFFFFF",isLineMode:!0,strokeThickness:3,annotationLayer:jt.EAnnotationLayer.Background});t.outlineArcLine=h;const p=new jt.NativeTextAnnotation({text:`${e.toFixed(0)}`,fontSize:16,textColor:"#fff",x1:0,y1:(i+n)/2,xCoordinateMode:jt.ECoordinateMode.DataValue,yCoordinateMode:jt.ECoordinateMode.DataValue,horizontalAnchorPoint:jt.EHorizontalAnchorPoint.Center,verticalAnchorPoint:jt.EVerticalAnchorPoint.Center});return t.text=p,o.annotations.add(d,f,h,p),{sciChartSurface:o,wasmContext:a}},b1e=G.forwardRef(({initialValue:r=50,minValue:e=0,maxValue:i=140,size:n=200},t)=>{const o=G.useRef({pointer:null,text:null,angularYAxis:null,dangerArcSector:null,outlineArcLine:null}),a=G.useRef(void 0),s=G.useRef({initialValue:r,minValue:e,maxValue:i}),l=G.useRef({min:e,max:i});G.useImperativeHandle(t,()=>({updateValue:c=>{const d=o.current;if(!d.pointer||!d.text||c===a.current)return;a.current=c;const{min:f,max:h}=l.current;if(c===void 0)d.pointer.x1=r,d.text.text="--";else{const p=Math.max(f,Math.min(h,c));d.pointer.x1=p,d.text.text=`${c.toFixed(0)}`}},updateBounds:(c,d)=>{const f=o.current;if(!f.angularYAxis)return;l.current={min:c,max:d};const h=d-c,p=m1e(h);f.angularYAxis.visibleRange=new jt.NumberRange(c,d),f.angularYAxis.majorDelta=p,f.dangerArcSector&&(f.dangerArcSector.y1=c+h*.71,f.dangerArcSector.y2=d),f.outlineArcLine&&(f.outlineArcLine.y1=c,f.outlineArcLine.y2=d),f.text&&(f.text.y1=(c+d)/2)}}));const u=G.useMemo(()=>c=>{const{initialValue:d,minValue:f,maxValue:h}=s.current;return Uot(c,d,f,h,o.current)},[]);return R.jsx("div",{style:{height:n,width:n},children:R.jsx(eL.SciChartReact,{initChart:u,style:{width:"100%",height:"100%",border:"1px solid #333",borderRadius:"8px"}})})});b1e.displayName="SpeedometerGauge";const kl={background:"#1a1a2e",wheelRim:"#5a5a6a",wheelRimHighlight:"#7a7a8a",spoke:"#4a4a5a",hub:"#3a3a4a",hubHighlight:"#5a5a6a",leftIndicator:"#FF6644",rightIndicator:"#44DD66",neutral:"#666677",text:"#FFFFFF"},vp=8,zot=async(r,e,i,n)=>{const{sciChartSurface:t,wasmContext:o}=await jt.SciChartPolarSurface.create(r,{padding:new jt.Thickness(15,15,25,15)}),a=Math.PI*2,s=new jt.PolarNumericAxis(o,{polarAxisMode:jt.EPolarAxisMode.Angular,visibleRange:new jt.NumberRange(0,360),totalAngle:a,startAngle:-Math.PI/2,isVisible:!1});t.xAxes.add(s);const l=new jt.PolarNumericAxis(o,{polarAxisMode:jt.EPolarAxisMode.Radial,visibleRange:new jt.NumberRange(0,10),isVisible:!1});t.yAxes.add(l);const u=-(e/i)*90,c=new jt.PolarArcAnnotation({x1:0,x2:359.9,y1:10,y2:8,fill:kl.wheelRim,stroke:kl.wheelRimHighlight,strokeThickness:2});n.rimArc=c,t.annotations.add(c);const d=new jt.PolarArcAnnotation({x1:0,x2:359.9,y1:8,y2:7.7,fill:kl.wheelRimHighlight,strokeThickness:0});t.annotations.add(d);const f=0+u,h=new jt.PolarArcAnnotation({x1:f-vp/2,x2:f+vp/2,y1:8,y2:2.5,fill:kl.spoke,strokeThickness:0,annotationLayer:jt.EAnnotationLayer.BelowChart});n.spoke1=h,t.annotations.add(h);const p=120+u,g=new jt.PolarArcAnnotation({x1:p-vp/2,x2:p+vp/2,y1:8,y2:2.5,fill:kl.spoke,strokeThickness:0,annotationLayer:jt.EAnnotationLayer.BelowChart});n.spoke2=g,t.annotations.add(g);const v=240+u,y=new jt.PolarArcAnnotation({x1:v-vp/2,x2:v+vp/2,y1:8,y2:2.5,fill:kl.spoke,strokeThickness:0,annotationLayer:jt.EAnnotationLayer.BelowChart});n.spoke3=y,t.annotations.add(y);const m=new jt.PolarArcAnnotation({x1:0,x2:359.9,y1:2.5,y2:0,fill:kl.hub,stroke:kl.hubHighlight,strokeThickness:1});t.annotations.add(m);const b=new jt.PolarArcAnnotation({x1:0,x2:359.9,y1:1.5,y2:0,fill:kl.background,strokeThickness:0});t.annotations.add(b);const S=new jt.NativeTextAnnotation({text:`${e.toFixed(1)}°`,fontSize:16,textColor:kl.text,x1:180,y1:-4,xCoordinateMode:jt.ECoordinateMode.DataValue,yCoordinateMode:jt.ECoordinateMode.DataValue,horizontalAnchorPoint:jt.EHorizontalAnchorPoint.Center,verticalAnchorPoint:jt.EVerticalAnchorPoint.Center});n.valueText=S,t.annotations.add(S);const _=T=>T<-5?"← LEFT":T>5?"RIGHT →":"CENTER",C=new jt.NativeTextAnnotation({text:_(e),fontSize:11,textColor:e<-5?kl.leftIndicator:e>5?kl.rightIndicator:kl.neutral,x1:180,y1:-6.5,xCoordinateMode:jt.ECoordinateMode.DataValue,yCoordinateMode:jt.ECoordinateMode.DataValue,horizontalAnchorPoint:jt.EHorizontalAnchorPoint.Center,verticalAnchorPoint:jt.EVerticalAnchorPoint.Center});return n.directionText=C,t.annotations.add(C),{sciChartSurface:t,wasmContext:o}},S1e=G.forwardRef(({initialValue:r=0,minValue:e=-800,maxValue:i=800,size:n=200},t)=>{const o=G.useRef({spoke1:null,spoke2:null,spoke3:null,valueText:null,directionText:null,rimArc:null}),a=G.useRef(void 0),s=G.useRef({initialValue:r,minValue:e,maxValue:i}),l=G.useRef({min:e,max:i});G.useImperativeHandle(t,()=>({updateValue:c=>{const d=o.current;if(!d.spoke1||!d.spoke2||!d.spoke3||!d.valueText||!d.directionText||!d.rimArc||c===a.current)return;a.current=c;const{min:f,max:h}=l.current,g=Math.max(f,Math.min(h,c??r)),v=-(g/h)*90,y=0+v;d.spoke1.x1=y-vp/2,d.spoke1.x2=y+vp/2;const m=120+v;d.spoke2.x1=m-vp/2,d.spoke2.x2=m+vp/2;const b=240+v;if(d.spoke3.x1=b-vp/2,d.spoke3.x2=b+vp/2,g<-5?d.rimArc.fill=kl.leftIndicator:g>5?d.rimArc.fill=kl.rightIndicator:d.rimArc.fill=kl.wheelRim,c===void 0)d.valueText.text="--",d.directionText.text="WAITING",d.directionText.textColor=kl.neutral;else{d.valueText.text=`${c.toFixed(1)}°`;const S=_=>_<-5?"← LEFT":_>5?"RIGHT →":"CENTER";d.directionText.text=S(c),d.directionText.textColor=c<-5?kl.leftIndicator:c>5?kl.rightIndicator:kl.neutral}},updateBounds:(c,d)=>{l.current={min:c,max:d}}}));const u=G.useMemo(()=>c=>{const{initialValue:d,maxValue:f}=s.current;return zot(c,d,f,o.current)},[]);return R.jsx("div",{style:{height:n,width:n},children:R.jsx(eL.SciChartReact,{initChart:u,style:{width:"100%",height:"100%",border:"1px solid #333",borderRadius:"8px"}})})});S1e.displayName="SteeringWheelGauge";const Wot=[{value:"gauge",label:"Gauge"},{value:"cssGauge",label:"CSS Gauge"},{value:"radialGauge",label:"Radial Gauge"},{value:"speedometer",label:"Speedometer"},{value:"steeringWheel",label:"Steering Wheel"},{value:"gear",label:"Gear"}],Got=[{value:"cyber",label:"Cyber"},{value:"neon",label:"Neon"},{value:"racing",label:"Racing"},{value:"warm",label:"Warm"},{value:"cool",label:"Cool"},{value:"ocean",label:"Ocean"},{value:"forest",label:"Forest"},{value:"sunset",label:"Sunset"},{value:"retro",label:"Retro"},{value:"mono",label:"Mono"}],Yot=[{value:"modern",label:"Modern"},{value:"classic",label:"Classic"},{value:"minimal",label:"Minimal"},{value:"analog",label:"Analog"}],$ot=[{value:"default",label:"Default"},{value:"car-speedometer",label:"Car Speedometer"},{value:"industrial",label:"Industrial"},{value:"rpm",label:"RPM"},{value:"temperature",label:"Temperature"},{value:"fuel",label:"Fuel"},{value:"voltage",label:"Voltage"},{value:"compass",label:"Compass"}];function qot({type:r,signalMetadata:e,initialValue:i,onRemove:n,onSettings:t,height:o}){const[a,s]=G.useState(r),[l,u]=G.useState("cyber"),[c,d]=G.useState("modern"),[f,h]=G.useState("default"),[p,g]=G.useState(!1),v=G.useRef(null),y=G.useRef(null),m=Cj(),b=e.name.split(".").pop()??e.name,S=e.min,_=e.max,C=S!=null,T=_!=null,x=C?S:0,A=T?_:0,w=i??(x+A)/2,L=G.useRef(null),k=G.useRef(void 0),D=G.useRef({min:x,max:A,hasMetadataMin:C,hasMetadataMax:T}),j=W=>{k.current=W.signals[0]};G.useEffect(()=>{m.addPendingSubscription(new _F([e.id],j,()=>{console.log("Subscription closed for",e.longName())})),m.applyPendingSubscriptions()},[m,e]),G.useEffect(()=>{let W,K;const H=()=>{var Q,Z;const U=k.current,I=U==null?void 0:U.value;if(I!==K){if(K=I,I!==void 0){const ee=D.current;let ie=!1;!ee.hasMetadataMin&&I<ee.min&&(ee.min=I,ie=!0),!ee.hasMetadataMax&&I>ee.max&&(ee.max=I,ie=!0),ie&&((Q=L.current)==null||Q.updateBounds(ee.min,ee.max))}(Z=L.current)==null||Z.updateValue(I)}W=requestAnimationFrame(H)};return W=requestAnimationFrame(H),()=>cancelAnimationFrame(W)},[]);const N=()=>{g(!p),t==null||t()};G.useEffect(()=>{const W=K=>{p&&y.current&&!y.current.contains(K.target)&&v.current&&!v.current.contains(K.target)&&g(!1)};return document.addEventListener("mousedown",W),()=>document.removeEventListener("mousedown",W)},[p]);const V=()=>{switch(a){case"speedometer":return R.jsx(b1e,{ref:L,label:b,initialValue:w,minValue:x,maxValue:A,size:o});case"steeringWheel":return R.jsx(S1e,{ref:L,label:b,initialValue:w,minValue:x,maxValue:A,size:o});case"gear":{const W=e.namedValues?Object.entries(e.namedValues).sort(([K],[H])=>Number(K)-Number(H)).map(([,K])=>K):void 0;return R.jsx(v1e,{ref:L,label:b,initialGear:typeof i=="number"?i:0,gears:W,size:o})}case"cssGauge":return R.jsx(h1e,{ref:L,label:b,initialValue:w,minValue:x,maxValue:A,size:o,theme:l,variant:c});case"radialGauge":return R.jsx(y1e,{ref:L,label:b,initialValue:w,minValue:x,maxValue:A,size:o,preset:f,unit:e.unit??""});case"gauge":default:return R.jsx(p1e,{ref:L,label:b,initialValue:w,minValue:x,maxValue:A,size:o})}};return R.jsxs("div",{className:"relative group/gauge",children:[R.jsxs("div",{className:"absolute top-1 right-1 z-10 flex gap-1 opacity-0 group-hover/gauge:opacity-100 transition-opacity",children:[R.jsx("button",{ref:v,onClick:N,className:"p-1 rounded-md bg-neutral-200/80 dark:bg-neutral-800/80 hover:bg-neutral-300 dark:hover:bg-neutral-700 text-neutral-600 dark:text-neutral-400 transition-colors",title:"Settings",children:R.jsx(Fr,{type:sr.NAV_MORE_HORIZONTAL,className:"w-4 h-4"})}),n&&R.jsx("button",{onClick:n,className:"p-1 rounded-md bg-neutral-200/80 dark:bg-neutral-800/80 hover:bg-red-600 text-neutral-600 dark:text-neutral-400 hover:text-white transition-colors",title:"Remove gauge",children:R.jsx(Fr,{type:sr.ACTION_CLOSE,className:"w-4 h-4"})})]}),p&&R.jsxs("div",{ref:y,className:"absolute top-8 right-1 z-20 bg-white dark:bg-neutral-800 border border-neutral-200 dark:border-neutral-700 rounded-lg shadow-lg p-3 min-w-[160px]",children:[R.jsx("div",{className:"text-xs text-neutral-500 dark:text-neutral-400 mb-2",children:"Gauge Settings"}),R.jsx("div",{className:"text-sm text-neutral-700 dark:text-neutral-300 mb-3 truncate",title:e.name,children:e.name.split(".").pop()}),R.jsx("div",{className:"text-xs text-neutral-500 dark:text-neutral-400 mb-1",children:"Type"}),R.jsx("div",{className:"flex flex-col gap-1",children:Wot.map(W=>R.jsx("button",{onClick:()=>s(W.value),className:`
                  text-left px-2 py-1.5 rounded text-sm transition-colors
                  ${a===W.value?"bg-primary text-primary-foreground":"text-neutral-700 dark:text-neutral-300 hover:bg-neutral-100 dark:hover:bg-neutral-700"}
                `,children:W.label},W.value))}),a==="cssGauge"&&R.jsxs(R.Fragment,{children:[R.jsx("div",{className:"text-xs text-neutral-500 dark:text-neutral-400 mb-1 mt-3",children:"Style"}),R.jsx("div",{className:"flex flex-wrap gap-1",children:Yot.map(W=>R.jsx("button",{onClick:()=>d(W.value),className:`
                      px-2 py-1 rounded text-xs transition-colors
                      ${c===W.value?"bg-primary text-primary-foreground":"text-neutral-700 dark:text-neutral-300 hover:bg-neutral-100 dark:hover:bg-neutral-700 bg-neutral-50 dark:bg-neutral-700/50"}
                    `,children:W.label},W.value))}),R.jsx("div",{className:"text-xs text-neutral-500 dark:text-neutral-400 mb-1 mt-3",children:"Theme"}),R.jsx("div",{className:"flex flex-wrap gap-1 max-w-[200px]",children:Got.map(W=>R.jsx("button",{onClick:()=>u(W.value),className:`
                      px-2 py-1 rounded text-xs transition-colors
                      ${l===W.value?"bg-primary text-primary-foreground":"text-neutral-700 dark:text-neutral-300 hover:bg-neutral-100 dark:hover:bg-neutral-700 bg-neutral-50 dark:bg-neutral-700/50"}
                    `,children:W.label},W.value))})]}),a==="radialGauge"&&R.jsxs(R.Fragment,{children:[R.jsx("div",{className:"text-xs text-neutral-500 dark:text-neutral-400 mb-1 mt-3",children:"Preset"}),R.jsx("div",{className:"flex flex-wrap gap-1 max-w-[200px]",children:$ot.map(W=>R.jsx("button",{onClick:()=>h(W.value),className:`
                      px-2 py-1 rounded text-xs transition-colors
                      ${f===W.value?"bg-primary text-primary-foreground":"text-neutral-700 dark:text-neutral-300 hover:bg-neutral-100 dark:hover:bg-neutral-700 bg-neutral-50 dark:bg-neutral-700/50"}
                    `,children:W.label},W.value))})]})]}),R.jsx("p",{className:"absolute bottom-1 left-1 text-xs z-10 text-neutral-600 dark:text-neutral-300 pointer-events-none",children:b}),V()]})}function XD(r,e,i){let n=i.initialDeps??[],t;function o(){var a,s,l,u;let c;i.key&&((a=i.debug)!=null&&a.call(i))&&(c=Date.now());const d=r();if(!(d.length!==n.length||d.some((p,g)=>n[g]!==p)))return t;n=d;let h;if(i.key&&((s=i.debug)!=null&&s.call(i))&&(h=Date.now()),t=e(...d),i.key&&((l=i.debug)!=null&&l.call(i))){const p=Math.round((Date.now()-c)*100)/100,g=Math.round((Date.now()-h)*100)/100,v=g/16,y=(m,b)=>{for(m=String(m);m.length<b;)m=" "+m;return m};console.info(`%c⏱ ${y(g,5)} /${y(p,5)} ms`,`
            font-size: .6rem;
            font-weight: bold;
            color: hsl(${Math.max(0,Math.min(120-120*v,120))}deg 100% 31%);`,i==null?void 0:i.key)}return(u=i==null?void 0:i.onChange)==null||u.call(i,t),t}return o.updateDeps=a=>{n=a},o}function uge(r,e){if(r===void 0)throw new Error("Unexpected undefined");return r}const Xot=(r,e)=>Math.abs(r-e)<1.01,Kot=(r,e,i)=>{let n;return function(...t){r.clearTimeout(n),n=r.setTimeout(()=>e.apply(this,t),i)}},cge=r=>{const{offsetWidth:e,offsetHeight:i}=r;return{width:e,height:i}},Zot=r=>r,Jot=r=>{const e=Math.max(r.startIndex-r.overscan,0),i=Math.min(r.endIndex+r.overscan,r.count-1),n=[];for(let t=e;t<=i;t++)n.push(t);return n},Qot=(r,e)=>{const i=r.scrollElement;if(!i)return;const n=r.targetWindow;if(!n)return;const t=a=>{const{width:s,height:l}=a;e({width:Math.round(s),height:Math.round(l)})};if(t(cge(i)),!n.ResizeObserver)return()=>{};const o=new n.ResizeObserver(a=>{const s=()=>{const l=a[0];if(l!=null&&l.borderBoxSize){const u=l.borderBoxSize[0];if(u){t({width:u.inlineSize,height:u.blockSize});return}}t(cge(i))};r.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()});return o.observe(i,{box:"border-box"}),()=>{o.unobserve(i)}},dge={passive:!0},fge=typeof window>"u"?!0:"onscrollend"in window,eat=(r,e)=>{const i=r.scrollElement;if(!i)return;const n=r.targetWindow;if(!n)return;let t=0;const o=r.options.useScrollendEvent&&fge?()=>{}:Kot(n,()=>{e(t,!1)},r.options.isScrollingResetDelay),a=c=>()=>{const{horizontal:d,isRtl:f}=r.options;t=d?i.scrollLeft*(f&&-1||1):i.scrollTop,o(),e(t,c)},s=a(!0),l=a(!1);l(),i.addEventListener("scroll",s,dge);const u=r.options.useScrollendEvent&&fge;return u&&i.addEventListener("scrollend",l,dge),()=>{i.removeEventListener("scroll",s),u&&i.removeEventListener("scrollend",l)}},tat=(r,e,i)=>{if(e!=null&&e.borderBoxSize){const n=e.borderBoxSize[0];if(n)return Math.round(n[i.options.horizontal?"inlineSize":"blockSize"])}return r[i.options.horizontal?"offsetWidth":"offsetHeight"]},rat=(r,{adjustments:e=0,behavior:i},n)=>{var t,o;const a=r+e;(o=(t=n.scrollElement)==null?void 0:t.scrollTo)==null||o.call(t,{[n.options.horizontal?"left":"top"]:a,behavior:i})};class iat{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let i=null;const n=()=>i||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:i=new this.targetWindow.ResizeObserver(t=>{t.forEach(o=>{const a=()=>{this._measureElement(o.target,o)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()})}));return{disconnect:()=>{var t;(t=n())==null||t.disconnect(),i=null},observe:t=>{var o;return(o=n())==null?void 0:o.observe(t,{box:"border-box"})},unobserve:t=>{var o;return(o=n())==null?void 0:o.unobserve(t)}}})(),this.range=null,this.setOptions=i=>{Object.entries(i).forEach(([n,t])=>{typeof t>"u"&&delete i[n]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Zot,rangeExtractor:Jot,onChange:()=>{},measureElement:tat,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...i}},this.notify=i=>{var n,t;(t=(n=this.options).onChange)==null||t.call(n,this,i)},this.maybeNotify=XD(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),i=>{this.notify(i)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(i=>i()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var i;const n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.maybeNotify();return}this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((i=this.scrollElement)==null?void 0:i.window)??null,this.elementsCache.forEach(t=>{this.observer.observe(t)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,t=>{this.scrollRect=t,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(t,o)=>{this.scrollAdjustments=0,this.scrollDirection=o?this.getScrollOffset()<t?"forward":"backward":null,this.scrollOffset=t,this.isScrolling=o,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(i,n)=>{const t=new Map,o=new Map;for(let a=n-1;a>=0;a--){const s=i[a];if(t.has(s.lane))continue;const l=o.get(s.lane);if(l==null||s.end>l.end?o.set(s.lane,s):s.end<l.end&&t.set(s.lane,!0),t.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((a,s)=>a.end===s.end?a.index-s.index:a.end-s.end)[0]:void 0},this.getMeasurementOptions=XD(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(i,n,t,o,a)=>(this.pendingMeasuredCacheIndexes=[],{count:i,paddingStart:n,scrollMargin:t,getItemKey:o,enabled:a}),{key:!1}),this.getMeasurements=XD(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:i,paddingStart:n,scrollMargin:t,getItemKey:o,enabled:a},s)=>{if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(c=>{this.itemSizeCache.set(c.key,c.size)}));const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const u=this.measurementsCache.slice(0,l);for(let c=l;c<i;c++){const d=o(c),f=this.options.lanes===1?u[c-1]:this.getFurthestMeasurement(u,c),h=f?f.end+this.options.gap:n+t,p=s.get(d),g=typeof p=="number"?p:this.options.estimateSize(c),v=h+g,y=f?f.lane:c%this.options.lanes;u[c]={index:c,start:h,size:g,end:v,key:d,lane:y}}return this.measurementsCache=u,u},{key:!1,debug:()=>this.options.debug}),this.calculateRange=XD(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(i,n,t,o)=>this.range=i.length>0&&n>0?nat({measurements:i,outerSize:n,scrollOffset:t,lanes:o}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=XD(()=>{let i=null,n=null;const t=this.calculateRange();return t&&(i=t.startIndex,n=t.endIndex),this.maybeNotify.updateDeps([this.isScrolling,i,n]),[this.options.rangeExtractor,this.options.overscan,this.options.count,i,n]},(i,n,t,o,a)=>o===null||a===null?[]:i({startIndex:o,endIndex:a,overscan:n,count:t}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=i=>{const n=this.options.indexAttribute,t=i.getAttribute(n);return t?parseInt(t,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this._measureElement=(i,n)=>{const t=this.indexFromElement(i),o=this.measurementsCache[t];if(!o)return;const a=o.key,s=this.elementsCache.get(a);s!==i&&(s&&this.observer.unobserve(s),this.observer.observe(i),this.elementsCache.set(a,i)),i.isConnected&&this.resizeItem(t,this.options.measureElement(i,n,this))},this.resizeItem=(i,n)=>{const t=this.measurementsCache[i];if(!t)return;const o=this.itemSizeCache.get(t.key)??t.size,a=n-o;a!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(t,a,this):t.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=a,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(t.index),this.itemSizeCache=new Map(this.itemSizeCache.set(t.key,n)),this.notify(!1))},this.measureElement=i=>{if(!i){this.elementsCache.forEach((n,t)=>{n.isConnected||(this.observer.unobserve(n),this.elementsCache.delete(t))});return}this._measureElement(i,void 0)},this.getVirtualItems=XD(()=>[this.getVirtualIndexes(),this.getMeasurements()],(i,n)=>{const t=[];for(let o=0,a=i.length;o<a;o++){const s=i[o],l=n[s];t.push(l)}return t},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=i=>{const n=this.getMeasurements();if(n.length!==0)return uge(n[_1e(0,n.length-1,t=>uge(n[t]).start,i)])},this.getOffsetForAlignment=(i,n,t=0)=>{const o=this.getSize(),a=this.getScrollOffset();n==="auto"&&(n=i>=a+o?"end":"start"),n==="center"?i+=(t-o)/2:n==="end"&&(i-=o);const s=this.getTotalSize()+this.options.scrollMargin-o;return Math.max(Math.min(s,i),0)},this.getOffsetForIndex=(i,n="auto")=>{i=Math.max(0,Math.min(i,this.options.count-1));const t=this.measurementsCache[i];if(!t)return;const o=this.getSize(),a=this.getScrollOffset();if(n==="auto")if(t.end>=a+o-this.options.scrollPaddingEnd)n="end";else if(t.start<=a+this.options.scrollPaddingStart)n="start";else return[a,n];const s=n==="end"?t.end+this.options.scrollPaddingEnd:t.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,n,t.size),n]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(i,{align:n="start",behavior:t}={})=>{t==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(i,n),{adjustments:void 0,behavior:t})},this.scrollToIndex=(i,{align:n="auto",behavior:t}={})=>{t==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),i=Math.max(0,Math.min(i,this.options.count-1));let o=0;const a=10,s=u=>{if(!this.targetWindow)return;const c=this.getOffsetForIndex(i,u);if(!c){console.warn("Failed to get offset for index:",i);return}const[d,f]=c;this._scrollToOffset(d,{adjustments:void 0,behavior:t}),this.targetWindow.requestAnimationFrame(()=>{const h=this.getScrollOffset(),p=this.getOffsetForIndex(i,f);if(!p){console.warn("Failed to get offset for index:",i);return}Xot(p[0],h)||l(f)})},l=u=>{this.targetWindow&&(o++,o<a?this.targetWindow.requestAnimationFrame(()=>s(u)):console.warn(`Failed to scroll to index ${i} after ${a} attempts.`))};s(n)},this.scrollBy=(i,{behavior:n}={})=>{n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+i,{adjustments:void 0,behavior:n})},this.getTotalSize=()=>{var i;const n=this.getMeasurements();let t;if(n.length===0)t=this.options.paddingStart;else if(this.options.lanes===1)t=((i=n[n.length-1])==null?void 0:i.end)??0;else{const o=Array(this.options.lanes).fill(null);let a=n.length-1;for(;a>=0&&o.some(s=>s===null);){const s=n[a];o[s.lane]===null&&(o[s.lane]=s.end),a--}t=Math.max(...o.filter(s=>s!==null))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(i,{adjustments:n,behavior:t})=>{this.options.scrollToFn(i,{behavior:t,adjustments:n},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(e)}}const _1e=(r,e,i,n)=>{for(;r<=e;){const t=(r+e)/2|0,o=i(t);if(o<n)r=t+1;else if(o>n)e=t-1;else return t}return r>0?r-1:0};function nat({measurements:r,outerSize:e,scrollOffset:i,lanes:n}){const t=r.length-1,o=l=>r[l].start;if(r.length<=n)return{startIndex:0,endIndex:t};let a=_1e(0,t,o,i),s=a;if(n===1)for(;s<t&&r[s].end<i+e;)s++;else if(n>1){const l=Array(n).fill(0);for(;s<t&&l.some(c=>c<i+e);){const c=r[s];l[c.lane]=c.end,s++}const u=Array(n).fill(i+e);for(;a>=0&&u.some(c=>c>=i);){const c=r[a];u[c.lane]=c.start,a--}a=Math.max(0,a-a%n),s=Math.min(t,s+(n-1-s%n))}return{startIndex:a,endIndex:s}}const hge=typeof document<"u"?G.useLayoutEffect:G.useEffect;function oat(r){const e=G.useReducer(()=>({}),{})[1],i={...r,onChange:(t,o)=>{var a;o?au.flushSync(e):e(),(a=r.onChange)==null||a.call(r,t,o)}},[n]=G.useState(()=>new iat(i));return n.setOptions(i),hge(()=>n._didMount(),[]),hge(()=>n._willUpdate()),n}function P1e(r){return oat({observeElementRect:Qot,observeElementOffset:eat,scrollToFn:rat,...r})}const C1e=(r,e,i)=>({enabled:r,term:pR(e,i)}),pR=(r,e)=>({term:r.trim().toLowerCase(),fields:e});var hN={exports:{}};/**
 * @license
 * Lodash <https://lodash.com/>
 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
 * Released under MIT license <https://lodash.com/license>
 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
 */var aat=hN.exports,pge;function sat(){return pge||(pge=1,(function(r,e){(function(){var i,n="4.17.23",t=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,c="__lodash_placeholder__",d=1,f=2,h=4,p=1,g=2,v=1,y=2,m=4,b=8,S=16,_=32,C=64,T=128,x=256,A=512,w=30,L="...",k=800,D=16,j=1,N=2,V=3,W=1/0,K=9007199254740991,H=17976931348623157e292,U=NaN,I=4294967295,Q=I-1,Z=I>>>1,ee=[["ary",T],["bind",v],["bindKey",y],["curry",b],["curryRight",S],["flip",A],["partial",_],["partialRight",C],["rearg",x]],ie="[object Arguments]",de="[object Array]",pe="[object AsyncFunction]",_e="[object Boolean]",Te="[object Date]",De="[object DOMException]",Pe="[object Error]",Ee="[object Function]",Re="[object GeneratorFunction]",je="[object Map]",Ke="[object Number]",ot="[object Null]",We="[object Object]",xe="[object Promise]",ve="[object Proxy]",he="[object RegExp]",Se="[object Set]",be="[object String]",ke="[object Symbol]",qe="[object Undefined]",rt="[object WeakMap]",St="[object WeakSet]",xt="[object ArrayBuffer]",It="[object DataView]",Zt="[object Float32Array]",ct="[object Float64Array]",Qe="[object Int8Array]",Et="[object Int16Array]",Gt="[object Int32Array]",Xe="[object Uint8Array]",Vt="[object Uint8ClampedArray]",lr="[object Uint16Array]",Jt="[object Uint32Array]",kr=/\b__p \+= '';/g,qt=/\b(__p \+=) '' \+/g,zt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,jr=/&(?:amp|lt|gt|quot|#39);/g,Be=/[&<>"']/g,Ge=RegExp(jr.source),ut=RegExp(Be.source),Pt=/<%-([\s\S]+?)%>/g,Qt=/<%([\s\S]+?)%>/g,wr=/<%=([\s\S]+?)%>/g,Xr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,pi=/^\w*$/,Qr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ur=/[\\^$.*+?()[\]{}|]/g,ci=RegExp(Ur.source),Xt=/^\s+/,Ui=/\s/,Dn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Kr=/\{\n\/\* \[wrapped with (.+)\] \*/,In=/,? & /,fn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,vt=/[()=,{}\[\]\/\s]/,dr=/\\(\\)?/g,ue=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ar=/\w*$/,Bt=/^[-+]0x[0-9a-f]+$/i,Ar=/^0b[01]+$/i,br=/^\[object .+?Constructor\]$/,Br=/^0o[0-7]+$/i,ai=/^(?:0|[1-9]\d*)$/,Nn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,nt=/($^)/,_o=/['\n\r\u2028\u2029\\]/g,si="\\ud800-\\udfff",ti="\\u0300-\\u036f",rr="\\ufe20-\\ufe2f",is="\\u20d0-\\u20ff",wa=ti+rr+is,q="\\u2700-\\u27bf",te="a-z\\xdf-\\xf6\\xf8-\\xff",fe="\\xac\\xb1\\xd7\\xf7",Ue="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",pt="\\u2000-\\u206f",At=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",cr="A-Z\\xc0-\\xd6\\xd8-\\xde",Hr="\\ufe0e\\ufe0f",Yi=fe+Ue+pt+At,Fn="['’]",No="["+si+"]",Ms="["+Yi+"]",_a="["+wa+"]",Ua="\\d+",su="["+q+"]",Oa="["+te+"]",lu="[^"+si+Yi+Ua+q+te+cr+"]",Qs="\\ud83c[\\udffb-\\udfff]",bl="(?:"+_a+"|"+Qs+")",Sl="[^"+si+"]",uu="(?:\\ud83c[\\udde6-\\uddff]){2}",ys="[\\ud800-\\udbff][\\udc00-\\udfff]",Fo="["+cr+"]",Kc="\\u200d",Pa="(?:"+Oa+"|"+lu+")",vc="(?:"+Fo+"|"+lu+")",Ls="(?:"+Fn+"(?:d|ll|m|re|s|t|ve))?",ns="(?:"+Fn+"(?:D|LL|M|RE|S|T|VE))?",el=bl+"?",ao="["+Hr+"]?",ra="(?:"+Kc+"(?:"+[Sl,uu,ys].join("|")+")"+ao+el+")*",fo="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Hn="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ks=ao+el+ra,cu="(?:"+[su,uu,ys].join("|")+")"+ks,Yl="(?:"+[Sl+_a+"?",_a,uu,ys,No].join("|")+")",yc=RegExp(Fn,"g"),ia=RegExp(_a,"g"),fa=RegExp(Qs+"(?="+Qs+")|"+Yl+ks,"g"),qo=RegExp([Fo+"?"+Oa+"+"+Ls+"(?="+[Ms,Fo,"$"].join("|")+")",vc+"+"+ns+"(?="+[Ms,Fo+Pa,"$"].join("|")+")",Fo+"?"+Pa+"+"+Ls,Fo+"+"+ns,Hn,fo,Ua,cu].join("|"),"g"),Zc=RegExp("["+Kc+si+wa+Hr+"]"),Iu=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ms=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],jo=-1,zi={};zi[Zt]=zi[ct]=zi[Qe]=zi[Et]=zi[Gt]=zi[Xe]=zi[Vt]=zi[lr]=zi[Jt]=!0,zi[ie]=zi[de]=zi[xt]=zi[_e]=zi[It]=zi[Te]=zi[Pe]=zi[Ee]=zi[je]=zi[Ke]=zi[We]=zi[he]=zi[Se]=zi[be]=zi[rt]=!1;var on={};on[ie]=on[de]=on[xt]=on[It]=on[_e]=on[Te]=on[Zt]=on[ct]=on[Qe]=on[Et]=on[Gt]=on[je]=on[Ke]=on[We]=on[he]=on[Se]=on[be]=on[ke]=on[Xe]=on[Vt]=on[lr]=on[Jt]=!0,on[Pe]=on[Ee]=on[rt]=!1;var du={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",Ĳ:"IJ",ĳ:"ij",Œ:"Oe",œ:"oe",ŉ:"'n",ſ:"s"},me={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Fe={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Ze={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ft=parseFloat,Mt=parseInt,nr=typeof Ch=="object"&&Ch&&Ch.Object===Object&&Ch,Ot=typeof self=="object"&&self&&self.Object===Object&&self,Ut=nr||Ot||Function("return this")(),Yr=e&&!e.nodeType&&e,Jr=Yr&&!0&&r&&!r.nodeType&&r,li=Jr&&Jr.exports===Yr,Ci=li&&nr.process,Di=(function(){try{var Ve=Jr&&Jr.require&&Jr.require("util").types;return Ve||Ci&&Ci.binding&&Ci.binding("util")}catch{}})(),za=Di&&Di.isArrayBuffer,ha=Di&&Di.isDate,Is=Di&&Di.isMap,tl=Di&&Di.isRegExp,$l=Di&&Di.isSet,mc=Di&&Di.isTypedArray;function os(Ve,it,Je){switch(Je.length){case 0:return Ve.call(it);case 1:return Ve.call(it,Je[0]);case 2:return Ve.call(it,Je[0],Je[1]);case 3:return Ve.call(it,Je[0],Je[1],Je[2])}return Ve.apply(it,Je)}function Rp(Ve,it,Je,ht){for(var Nt=-1,fr=Ve==null?0:Ve.length;++Nt<fr;){var Or=Ve[Nt];it(ht,Or,Je(Or),Ve)}return ht}function as(Ve,it){for(var Je=-1,ht=Ve==null?0:Ve.length;++Je<ht&&it(Ve[Je],Je,Ve)!==!1;);return Ve}function qd(Ve,it){for(var Je=Ve==null?0:Ve.length;Je--&&it(Ve[Je],Je,Ve)!==!1;);return Ve}function bc(Ve,it){for(var Je=-1,ht=Ve==null?0:Ve.length;++Je<ht;)if(!it(Ve[Je],Je,Ve))return!1;return!0}function Da(Ve,it){for(var Je=-1,ht=Ve==null?0:Ve.length,Nt=0,fr=[];++Je<ht;){var Or=Ve[Je];it(Or,Je,Ve)&&(fr[Nt++]=Or)}return fr}function Xd(Ve,it){var Je=Ve==null?0:Ve.length;return!!Je&&Ti(Ve,it,0)>-1}function Jc(Ve,it,Je){for(var ht=-1,Nt=Ve==null?0:Ve.length;++ht<Nt;)if(Je(it,Ve[ht]))return!0;return!1}function ho(Ve,it){for(var Je=-1,ht=Ve==null?0:Ve.length,Nt=Array(ht);++Je<ht;)Nt[Je]=it(Ve[Je],Je,Ve);return Nt}function fu(Ve,it){for(var Je=-1,ht=it.length,Nt=Ve.length;++Je<ht;)Ve[Nt+Je]=it[Je];return Ve}function kf(Ve,it,Je,ht){var Nt=-1,fr=Ve==null?0:Ve.length;for(ht&&fr&&(Je=Ve[++Nt]);++Nt<fr;)Je=it(Je,Ve[Nt],Nt,Ve);return Je}function Sc(Ve,it,Je,ht){var Nt=Ve==null?0:Ve.length;for(ht&&Nt&&(Je=Ve[--Nt]);Nt--;)Je=it(Je,Ve[Nt],Nt,Ve);return Je}function If(Ve,it){for(var Je=-1,ht=Ve==null?0:Ve.length;++Je<ht;)if(it(Ve[Je],Je,Ve))return!0;return!1}var Mp=hu("length");function Lp(Ve){return Ve.split("")}function Kd(Ve){return Ve.match(fn)||[]}function _c(Ve,it,Je){var ht;return Je(Ve,function(Nt,fr,Or){if(it(Nt,fr,Or))return ht=fr,!1}),ht}function Zd(Ve,it,Je,ht){for(var Nt=Ve.length,fr=Je+(ht?1:-1);ht?fr--:++fr<Nt;)if(it(Ve[fr],fr,Ve))return fr;return-1}function Ti(Ve,it,Je){return it===it?nd(Ve,it,Je):Zd(Ve,Qc,Je)}function Dh(Ve,it,Je,ht){for(var Nt=Je-1,fr=Ve.length;++Nt<fr;)if(ht(Ve[Nt],it))return Nt;return-1}function Qc(Ve){return Ve!==Ve}function ed(Ve,it){var Je=Ve==null?0:Ve.length;return Je?Nu(Ve,it)/Je:U}function hu(Ve){return function(it){return it==null?i:it[Ve]}}function td(Ve){return function(it){return Ve==null?i:Ve[it]}}function Jd(Ve,it,Je,ht,Nt){return Nt(Ve,function(fr,Or,Rt){Je=ht?(ht=!1,fr):it(Je,fr,Or,Rt)}),Je}function Nf(Ve,it){var Je=Ve.length;for(Ve.sort(it);Je--;)Ve[Je]=Ve[Je].value;return Ve}function Nu(Ve,it){for(var Je,ht=-1,Nt=Ve.length;++ht<Nt;){var fr=it(Ve[ht]);fr!==i&&(Je=Je===i?fr:Je+fr)}return Je}function Fu(Ve,it){for(var Je=-1,ht=Array(Ve);++Je<Ve;)ht[Je]=it(Je);return ht}function Rh(Ve,it){return ho(it,function(Je){return[Je,Ve[Je]]})}function ju(Ve){return Ve&&Ve.slice(0,se(Ve)+1).replace(Xt,"")}function bs(Ve){return function(it){return Ve(it)}}function Ff(Ve,it){return ho(it,function(Je){return Ve[Je]})}function rd(Ve,it){return Ve.has(it)}function ql(Ve,it){for(var Je=-1,ht=Ve.length;++Je<ht&&Ti(it,Ve[Je],0)>-1;);return Je}function jf(Ve,it){for(var Je=Ve.length;Je--&&Ti(it,Ve[Je],0)>-1;);return Je}function id(Ve,it){for(var Je=Ve.length,ht=0;Je--;)Ve[Je]===it&&++ht;return ht}var _l=td(du),jn=td(me);function Pl(Ve){return"\\"+Ze[Ve]}function Ra(Ve,it){return Ve==null?i:Ve[it]}function Ma(Ve){return Zc.test(Ve)}function Bf(Ve){return Iu.test(Ve)}function Qd(Ve){for(var it,Je=[];!(it=Ve.next()).done;)Je.push(it.value);return Je}function ef(Ve){var it=-1,Je=Array(Ve.size);return Ve.forEach(function(ht,Nt){Je[++it]=[Nt,ht]}),Je}function Vf(Ve,it){return function(Je){return Ve(it(Je))}}function Xl(Ve,it){for(var Je=-1,ht=Ve.length,Nt=0,fr=[];++Je<ht;){var Or=Ve[Je];(Or===it||Or===c)&&(Ve[Je]=c,fr[Nt++]=Je)}return fr}function tf(Ve){var it=-1,Je=Array(Ve.size);return Ve.forEach(function(ht){Je[++it]=ht}),Je}function kp(Ve){var it=-1,Je=Array(Ve.size);return Ve.forEach(function(ht){Je[++it]=[ht,ht]}),Je}function nd(Ve,it,Je){for(var ht=Je-1,Nt=Ve.length;++ht<Nt;)if(Ve[ht]===it)return ht;return-1}function Mh(Ve,it,Je){for(var ht=Je+1;ht--;)if(Ve[ht]===it)return ht;return ht}function Bu(Ve){return Ma(Ve)?ge(Ve):Mp(Ve)}function ze(Ve){return Ma(Ve)?Ce(Ve):Lp(Ve)}function se(Ve){for(var it=Ve.length;it--&&Ui.test(Ve.charAt(it)););return it}var ye=td(Fe);function ge(Ve){for(var it=fa.lastIndex=0;fa.test(Ve);)++it;return it}function Ce(Ve){return Ve.match(fa)||[]}function Me(Ve){return Ve.match(qo)||[]}var Ne=(function Ve(it){it=it==null?Ut:lt.defaults(Ut.Object(),it,lt.pick(Ut,ms));var Je=it.Array,ht=it.Date,Nt=it.Error,fr=it.Function,Or=it.Math,Rt=it.Object,ur=it.RegExp,so=it.String,qn=it.TypeError,rl=Je.prototype,rf=fr.prototype,Vu=Rt.prototype,od=it["__core-js_shared__"],ad=rf.toString,yn=Vu.hasOwnProperty,Xo=0,ro=(function(){var F=/[^.]+$/.exec(od&&od.keys&&od.keys.IE_PROTO||"");return F?"Symbol(src)_1."+F:""})(),Xn=Vu.toString,Un=ad.call(Rt),Ns=Ut._,La=ur("^"+ad.call(yn).replace(Ur,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),sd=li?it.Buffer:i,Tr=it.Symbol,ld=it.Uint8Array,Lh=sd?sd.allocUnsafe:i,Er=Vf(Rt.getPrototypeOf,Rt),Ip=Rt.create,Hf=Vu.propertyIsEnumerable,Hu=rl.splice,Ng=Tr?Tr.isConcatSpreadable:i,Wa=Tr?Tr.iterator:i,Uu=Tr?Tr.toStringTag:i,il=(function(){try{var F=$h(Rt,"defineProperty");return F({},"",{}),F}catch{}})(),Sr=it.clearTimeout!==Ut.clearTimeout&&it.clearTimeout,mn=ht&&ht.now!==Ut.Date.now&&ht.now,Pc=it.setTimeout!==Ut.setTimeout&&it.setTimeout,yr=Or.ceil,un=Or.floor,Uf=Rt.getOwnPropertySymbols,Fg=sd?sd.isBuffer:i,Fs=it.isFinite,nf=rl.join,of=Vf(Rt.keys,Rt),Ko=Or.max,pa=Or.min,js=ht.now,Cl=it.parseInt,nl=Or.random,Tl=rl.reverse,xl=$h(it,"DataView"),Ga=$h(it,"Map"),kh=$h(it,"Promise"),Cc=$h(it,"Set"),ud=$h(it,"WeakMap"),af=$h(Rt,"create"),ga=ud&&new ud,zn={},bn=Ll(xl),Tc=Ll(Ga),El=Ll(kh),Np=Ll(Cc),xc=Ll(ud),zf=Tr?Tr.prototype:i,sf=zf?zf.valueOf:i,cd=zf?zf.toString:i;function et(F){if(Na(F)&&!qi(F)&&!(F instanceof $i)){if(F instanceof Bs)return F;if(yn.call(F,"__wrapped__"))return Ob(F)}return new Bs(F)}var Ec=(function(){function F(){}return function($){if(!ma($))return{};if(Ip)return Ip($);F.prototype=$;var ae=new F;return F.prototype=i,ae}})();function Ac(){}function Bs(F,$){this.__wrapped__=F,this.__actions__=[],this.__chain__=!!$,this.__index__=0,this.__values__=i}et.templateSettings={escape:Pt,evaluate:Qt,interpolate:wr,variable:"",imports:{_:et}},et.prototype=Ac.prototype,et.prototype.constructor=et,Bs.prototype=Ec(Ac.prototype),Bs.prototype.constructor=Bs;function $i(F){this.__wrapped__=F,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=I,this.__views__=[]}function zu(){var F=new $i(this.__wrapped__);return F.__actions__=Jl(this.__actions__),F.__dir__=this.__dir__,F.__filtered__=this.__filtered__,F.__iteratees__=Jl(this.__iteratees__),F.__takeCount__=this.__takeCount__,F.__views__=Jl(this.__views__),F}function wc(){if(this.__filtered__){var F=new $i(this);F.__dir__=-1,F.__filtered__=!0}else F=this.clone(),F.__dir__*=-1;return F}function Wu(){var F=this.__wrapped__.value(),$=this.__dir__,ae=qi(F),we=$<0,$e=ae?F.length:0,st=fL(0,$e,this.__views__),yt=st.start,wt=st.end,Ht=wt-yt,_r=we?wt:yt-1,Pr=this.__iteratees__,Dr=Pr.length,qr=0,fi=pa(Ht,this.__takeCount__);if(!ae||!we&&$e==Ht&&fi==Ht)return go(F,this.__actions__);var Fi=[];e:for(;Ht--&&qr<fi;){_r+=$;for(var Cn=-1,ji=F[_r];++Cn<Dr;){var Bn=Pr[Cn],Kn=Bn.iteratee,Sd=Bn.type,nc=Kn(ji);if(Sd==N)ji=nc;else if(!nc){if(Sd==j)continue e;break e}}Fi[qr++]=ji}return Fi}$i.prototype=Ec(Ac.prototype),$i.prototype.constructor=$i;function Gu(F){var $=-1,ae=F==null?0:F.length;for(this.clear();++$<ae;){var we=F[$];this.set(we[0],we[1])}}function Fp(){this.__data__=af?af(null):{},this.size=0}function lf(F){var $=this.has(F)&&delete this.__data__[F];return this.size-=$?1:0,$}function Ih(F){var $=this.__data__;if(af){var ae=$[F];return ae===l?i:ae}return yn.call($,F)?$[F]:i}function dd(F){var $=this.__data__;return af?$[F]!==i:yn.call($,F)}function Ya(F,$){var ae=this.__data__;return this.size+=this.has(F)?0:1,ae[F]=af&&$===i?l:$,this}Gu.prototype.clear=Fp,Gu.prototype.delete=lf,Gu.prototype.get=Ih,Gu.prototype.has=dd,Gu.prototype.set=Ya;function Al(F){var $=-1,ae=F==null?0:F.length;for(this.clear();++$<ae;){var we=F[$];this.set(we[0],we[1])}}function jg(){this.__data__=[],this.size=0}function py(F){var $=this.__data__,ae=pu($,F);if(ae<0)return!1;var we=$.length-1;return ae==we?$.pop():Hu.call($,ae,1),--this.size,!0}function gy(F){var $=this.__data__,ae=pu($,F);return ae<0?i:$[ae][1]}function vy(F){return pu(this.__data__,F)>-1}function va(F,$){var ae=this.__data__,we=pu(ae,F);return we<0?(++this.size,ae.push([F,$])):ae[we][1]=$,this}Al.prototype.clear=jg,Al.prototype.delete=py,Al.prototype.get=gy,Al.prototype.has=vy,Al.prototype.set=va;function Kl(F){var $=-1,ae=F==null?0:F.length;for(this.clear();++$<ae;){var we=F[$];this.set(we[0],we[1])}}function Wf(){this.size=0,this.__data__={hash:new Gu,map:new(Ga||Al),string:new Gu}}function Gf(F){var $=Ay(this,F).delete(F);return this.size-=$?1:0,$}function jp(F){return Ay(this,F).get(F)}function uf(F){return Ay(this,F).has(F)}function cf(F,$){var ae=Ay(this,F),we=ae.size;return ae.set(F,$),this.size+=ae.size==we?0:1,this}Kl.prototype.clear=Wf,Kl.prototype.delete=Gf,Kl.prototype.get=jp,Kl.prototype.has=uf,Kl.prototype.set=cf;function fd(F){var $=-1,ae=F==null?0:F.length;for(this.__data__=new Kl;++$<ae;)this.add(F[$])}function Bg(F){return this.__data__.set(F,l),this}function yy(F){return this.__data__.has(F)}fd.prototype.add=fd.prototype.push=Bg,fd.prototype.has=yy;function wl(F){var $=this.__data__=new Al(F);this.size=$.size}function hd(){this.__data__=new Al,this.size=0}function Bp(F){var $=this.__data__,ae=$.delete(F);return this.size=$.size,ae}function Nh(F){return this.__data__.get(F)}function Vg(F){return this.__data__.has(F)}function df(F,$){var ae=this.__data__;if(ae instanceof Al){var we=ae.__data__;if(!Ga||we.length<t-1)return we.push([F,$]),this.size=++ae.size,this;ae=this.__data__=new Kl(we)}return ae.set(F,$),this.size=ae.size,this}wl.prototype.clear=hd,wl.prototype.delete=Bp,wl.prototype.get=Nh,wl.prototype.has=Vg,wl.prototype.set=df;function Fh(F,$){var ae=qi(F),we=!ae&&$p(F),$e=!ae&&!we&&ep(F),st=!ae&&!we&&!$e&&tp(F),yt=ae||we||$e||st,wt=yt?Fu(F.length,so):[],Ht=wt.length;for(var _r in F)($||yn.call(F,_r))&&!(yt&&(_r=="length"||$e&&(_r=="offset"||_r=="parent")||st&&(_r=="buffer"||_r=="byteLength"||_r=="byteOffset")||vd(_r,Ht)))&&wt.push(_r);return wt}function Yf(F){var $=F.length;return $?F[Ae(0,$-1)]:i}function $f(F,$){return Iy(Jl(F),Vs($,0,F.length))}function Hg(F){return Iy(Jl(F))}function jh(F,$,ae){(ae!==i&&!tc(F[$],ae)||ae===i&&!($ in F))&&ol(F,$,ae)}function Ol(F,$,ae){var we=F[$];(!(yn.call(F,$)&&tc(we,ae))||ae===i&&!($ in F))&&ol(F,$,ae)}function pu(F,$){for(var ae=F.length;ae--;)if(tc(F[ae][0],$))return ae;return-1}function Ug(F,$,ae,we){return gu(F,function($e,st,yt){$(we,$e,ae($e),yt)}),we}function Vp(F,$){return F&&Lc($,Ys($),F)}function Yu(F,$){return F&&Lc($,xu($),F)}function ol(F,$,ae){$=="__proto__"&&il?il(F,$,{configurable:!0,enumerable:!0,value:ae,writable:!0}):F[$]=ae}function ff(F,$){for(var ae=-1,we=$.length,$e=Je(we),st=F==null;++ae<we;)$e[ae]=st?i:rp(F,$[ae]);return $e}function Vs(F,$,ae){return F===F&&(ae!==i&&(F=F<=ae?F:ae),$!==i&&(F=F>=$?F:$)),F}function ss(F,$,ae,we,$e,st){var yt,wt=$&d,Ht=$&f,_r=$&h;if(ae&&(yt=$e?ae(F,we,$e,st):ae(F)),yt!==i)return yt;if(!ma(F))return F;var Pr=qi(F);if(Pr){if(yt=mO(F),!wt)return Jl(F,yt)}else{var Dr=sl(F),qr=Dr==Ee||Dr==Re;if(ep(F))return c_(F,wt);if(Dr==We||Dr==ie||qr&&!$e){if(yt=Ht||qr?{}:T_(F),!wt)return Ht?hO(F,Yu(yt,F)):fO(F,Vp(yt,F))}else{if(!on[Dr])return $e?F:{};yt=bO(F,Dr,wt)}}st||(st=new wl);var fi=st.get(F);if(fi)return fi;st.set(F,yt),Zy(F)?F.forEach(function(ji){yt.add(ss(ji,$,ae,ji,F,st))}):tD(F)&&F.forEach(function(ji,Bn){yt.set(Bn,ss(ji,$,ae,Bn,F,st))});var Fi=_r?Ht?C_:_b:Ht?xu:Ys,Cn=Pr?i:Fi(F);return as(Cn||F,function(ji,Bn){Cn&&(Bn=ji,ji=F[Bn]),Ol(yt,Bn,ss(ji,$,ae,Bn,F,st))}),yt}function zg(F){var $=Ys(F);return function(ae){return Oc(ae,F,$)}}function Oc(F,$,ae){var we=ae.length;if(F==null)return!we;for(F=Rt(F);we--;){var $e=ae[we],st=$[$e],yt=F[$e];if(yt===i&&!($e in F)||!st(yt))return!1}return!0}function Bh(F,$,ae){if(typeof F!="function")throw new qn(a);return ky(function(){F.apply(i,ae)},$)}function Dl(F,$,ae,we){var $e=-1,st=Xd,yt=!0,wt=F.length,Ht=[],_r=$.length;if(!wt)return Ht;ae&&($=ho($,bs(ae))),we?(st=Jc,yt=!1):$.length>=t&&(st=rd,yt=!1,$=new fd($));e:for(;++$e<wt;){var Pr=F[$e],Dr=ae==null?Pr:ae(Pr);if(Pr=we||Pr!==0?Pr:0,yt&&Dr===Dr){for(var qr=_r;qr--;)if($[qr]===Dr)continue e;Ht.push(Pr)}else st($,Dr,we)||Ht.push(Pr)}return Ht}var gu=p_(Zl),Vh=p_(Uh,!0);function Dc(F,$){var ae=!0;return gu(F,function(we,$e,st){return ae=!!$(we,$e,st),ae}),ae}function Rl(F,$,ae){for(var we=-1,$e=F.length;++we<$e;){var st=F[we],yt=$(st);if(yt!=null&&(wt===i?yt===yt&&!Tu(yt):ae(yt,wt)))var wt=yt,Ht=st}return Ht}function hf(F,$,ae,we){var $e=F.length;for(ae=Ni(ae),ae<0&&(ae=-ae>$e?0:$e+ae),we=we===i||we>$e?$e:Ni(we),we<0&&(we+=$e),we=ae>we?0:uP(we);ae<we;)F[ae++]=$;return F}function Hh(F,$){var ae=[];return gu(F,function(we,$e,st){$(we,$e,st)&&ae.push(we)}),ae}function ya(F,$,ae,we,$e){var st=-1,yt=F.length;for(ae||(ae=E_),$e||($e=[]);++st<yt;){var wt=F[st];$>0&&ae(wt)?$>1?ya(wt,$-1,ae,we,$e):fu($e,wt):we||($e[$e.length]=wt)}return $e}var Rc=g_(),pf=g_(!0);function Zl(F,$){return F&&Rc(F,$,Ys)}function Uh(F,$){return F&&pf(F,$,Ys)}function $u(F,$){return Da($,function(ae){return rc(F[ae])})}function vu(F,$){$=Sn($,F);for(var ae=0,we=$.length;F!=null&&ae<we;)F=F[mu($[ae++])];return ae&&ae==we?F:i}function Hp(F,$,ae){var we=$(F);return qi(F)?we:fu(we,ae(F))}function $a(F){return F==null?F===i?qe:ot:Uu&&Uu in Rt(F)?wy(F):w_(F)}function qf(F,$){return F>$}function al(F,$){return F!=null&&yn.call(F,$)}function Hs(F,$){return F!=null&&$ in Rt(F)}function qu(F,$,ae){return F>=pa($,ae)&&F<Ko($,ae)}function gf(F,$,ae){for(var we=ae?Jc:Xd,$e=F[0].length,st=F.length,yt=st,wt=Je(st),Ht=1/0,_r=[];yt--;){var Pr=F[yt];yt&&$&&(Pr=ho(Pr,bs($))),Ht=pa(Pr.length,Ht),wt[yt]=!ae&&($||$e>=120&&Pr.length>=120)?new fd(yt&&Pr):i}Pr=F[0];var Dr=-1,qr=wt[0];e:for(;++Dr<$e&&_r.length<Ht;){var fi=Pr[Dr],Fi=$?$(fi):fi;if(fi=ae||fi!==0?fi:0,!(qr?rd(qr,Fi):we(_r,Fi,ae))){for(yt=st;--yt;){var Cn=wt[yt];if(!(Cn?rd(Cn,Fi):we(F[yt],Fi,ae)))continue e}qr&&qr.push(Fi),_r.push(fi)}}return _r}function zh(F,$,ae,we){return Zl(F,function($e,st,yt){$(we,ae($e),st,yt)}),we}function Us(F,$,ae){$=Sn($,F),F=My(F,$);var we=F==null?F:F[mu(aa($))];return we==null?i:os(we,F,ae)}function Ss(F){return Na(F)&&$a(F)==ie}function na(F){return Na(F)&&$a(F)==xt}function po(F){return Na(F)&&$a(F)==Te}function zs(F,$,ae,we,$e){return F===$?!0:F==null||$==null||!Na(F)&&!Na($)?F!==F&&$!==$:bi(F,$,ae,we,zs,$e)}function bi(F,$,ae,we,$e,st){var yt=qi(F),wt=qi($),Ht=yt?de:sl(F),_r=wt?de:sl($);Ht=Ht==ie?We:Ht,_r=_r==ie?We:_r;var Pr=Ht==We,Dr=_r==We,qr=Ht==_r;if(qr&&ep(F)){if(!ep($))return!1;yt=!0,Pr=!1}if(qr&&!Pr)return st||(st=new wl),yt||tp(F)?xy(F,$,ae,we,$e,st):yO(F,$,Ht,ae,we,$e,st);if(!(ae&p)){var fi=Pr&&yn.call(F,"__wrapped__"),Fi=Dr&&yn.call($,"__wrapped__");if(fi||Fi){var Cn=fi?F.value():F,ji=Fi?$.value():$;return st||(st=new wl),$e(Cn,ji,ae,we,st)}}return qr?(st||(st=new wl),P_(F,$,ae,we,$e,st)):!1}function di(F){return Na(F)&&sl(F)==je}function Eo(F,$,ae,we){var $e=ae.length,st=$e,yt=!we;if(F==null)return!st;for(F=Rt(F);$e--;){var wt=ae[$e];if(yt&&wt[2]?wt[1]!==F[wt[0]]:!(wt[0]in F))return!1}for(;++$e<st;){wt=ae[$e];var Ht=wt[0],_r=F[Ht],Pr=wt[1];if(yt&&wt[2]){if(_r===i&&!(Ht in F))return!1}else{var Dr=new wl;if(we)var qr=we(_r,Pr,Ht,F,$,Dr);if(!(qr===i?zs(Pr,_r,p|g,we,Dr):qr))return!1}}return!0}function qa(F){if(!ma(F)||SO(F))return!1;var $=rc(F)?La:br;return $.test(Ll(F))}function Ws(F){return Na(F)&&$a(F)==he}function Xu(F){return Na(F)&&sl(F)==Se}function Mc(F){return Na(F)&&Ub(F.length)&&!!zi[$a(F)]}function pd(F){return typeof F=="function"?F:F==null?eu:typeof F=="object"?qi(F)?Wh(F[0],F[1]):Xf(F):tt(F)}function Ku(F){if(!$g(F))return of(F);var $=[];for(var ae in Rt(F))yn.call(F,ae)&&ae!="constructor"&&$.push(ae);return $}function Wg(F){if(!ma(F))return Kf(F);var $=$g(F),ae=[];for(var we in F)we=="constructor"&&($||!yn.call(F,we))||ae.push(we);return ae}function Ao(F,$){return F<$}function gd(F,$){var ae=-1,we=Cu(F)?Je(F.length):[];return gu(F,function($e,st,yt){we[++ae]=$($e,st,yt)}),we}function Xf(F){var $=Pb(F);return $.length==1&&$[0][2]?Ab($[0][0],$[0][1]):function(ae){return ae===F||Eo(ae,F,$)}}function Wh(F,$){return Dy(F)&&yf($)?Ab(mu(F),$):function(ae){var we=rp(ae,F);return we===i&&we===$?dP(ae,F):zs($,we,p|g)}}function Zu(F,$,ae,we,$e){F!==$&&Rc($,function(st,yt){if($e||($e=new wl),ma(st))z(F,$,yt,ae,Zu,we,$e);else{var wt=we?we(Vo(F,yt),st,yt+"",F,$,$e):i;wt===i&&(wt=st),jh(F,yt,wt)}},xu)}function z(F,$,ae,we,$e,st,yt){var wt=Vo(F,ae),Ht=Vo($,ae),_r=yt.get(Ht);if(_r){jh(F,ae,_r);return}var Pr=st?st(wt,Ht,ae+"",F,$,yt):i,Dr=Pr===i;if(Dr){var qr=qi(Ht),fi=!qr&&ep(Ht),Fi=!qr&&!fi&&tp(Ht);Pr=Ht,qr||fi||Fi?qi(wt)?Pr=wt:Xa(wt)?Pr=Jl(wt):fi?(Dr=!1,Pr=c_(Ht,!0)):Fi?(Dr=!1,Pr=d_(Ht,!0)):Pr=[]:Xy(Ht)||$p(Ht)?(Pr=wt,$p(wt)?Pr=zb(wt):(!ma(wt)||rc(wt))&&(Pr=T_(Ht))):Dr=!1}Dr&&(yt.set(Ht,Pr),$e(Pr,Ht,we,st,yt),yt.delete(Ht)),jh(F,ae,Pr)}function J(F,$){var ae=F.length;if(ae)return $+=$<0?ae:0,vd($,ae)?F[$]:i}function oe(F,$,ae){$.length?$=ho($,function(st){return qi(st)?function(yt){return vu(yt,st.length===1?st[0]:st)}:st}):$=[eu];var we=-1;$=ho($,bs(Ei()));var $e=gd(F,function(st,yt,wt){var Ht=ho($,function(_r){return _r(st)});return{criteria:Ht,index:++we,value:st}});return Nf($e,function(st,yt){return dO(st,yt,ae)})}function O(F,$){return B(F,$,function(ae,we){return dP(F,we)})}function B(F,$,ae){for(var we=-1,$e=$.length,st={};++we<$e;){var yt=$[we],wt=vu(F,yt);ae(wt,yt)&&Lt(st,Sn(yt,F),wt)}return st}function X(F){return function($){return vu($,F)}}function re(F,$,ae,we){var $e=we?Dh:Ti,st=-1,yt=$.length,wt=F;for(F===$&&($=Jl($)),ae&&(wt=ho(F,bs(ae)));++st<yt;)for(var Ht=0,_r=$[st],Pr=ae?ae(_r):_r;(Ht=$e(wt,Pr,Ht,we))>-1;)wt!==F&&Hu.call(wt,Ht,1),Hu.call(F,Ht,1);return F}function ce(F,$){for(var ae=F?$.length:0,we=ae-1;ae--;){var $e=$[ae];if(ae==we||$e!==st){var st=$e;vd($e)?Hu.call(F,$e,1):Pi(F,$e)}}return F}function Ae(F,$){return F+un(nl()*($-F+1))}function Ie(F,$,ae,we){for(var $e=-1,st=Ko(yr(($-F)/(ae||1)),0),yt=Je(st);st--;)yt[we?st:++$e]=F,F+=ae;return yt}function He(F,$){var ae="";if(!F||$<1||$>K)return ae;do $%2&&(ae+=F),$=un($/2),$&&(F+=F);while($);return ae}function at(F,$){return wb(O_(F,$,eu),F+"")}function Tt(F){return Yf(sv(F))}function mt(F,$){var ae=sv(F);return Iy(ae,Vs($,0,ae.length))}function Lt(F,$,ae,we){if(!ma(F))return F;$=Sn($,F);for(var $e=-1,st=$.length,yt=st-1,wt=F;wt!=null&&++$e<st;){var Ht=mu($[$e]),_r=ae;if(Ht==="__proto__"||Ht==="constructor"||Ht==="prototype")return F;if($e!=yt){var Pr=wt[Ht];_r=we?we(Pr,Ht,wt):i,_r===i&&(_r=ma(Pr)?Pr:vd($[$e+1])?[]:{})}Ol(wt,Ht,_r),wt=wt[Ht]}return F}var or=ga?function(F,$){return ga.set(F,$),F}:eu,er=il?function(F,$){return il(F,"toString",{configurable:!0,enumerable:!1,value:uv($),writable:!0})}:eu;function pr(F){return Iy(sv(F))}function Ir(F,$,ae){var we=-1,$e=F.length;$<0&&($=-$>$e?0:$e+$),ae=ae>$e?$e:ae,ae<0&&(ae+=$e),$e=$>ae?0:ae-$>>>0,$>>>=0;for(var st=Je($e);++we<$e;)st[we]=F[we+$];return st}function $r(F,$){var ae;return gu(F,function(we,$e,st){return ae=$(we,$e,st),!ae}),!!ae}function ii(F,$,ae){var we=0,$e=F==null?we:F.length;if(typeof $=="number"&&$===$&&$e<=Z){for(;we<$e;){var st=we+$e>>>1,yt=F[st];yt!==null&&!Tu(yt)&&(ae?yt<=$:yt<$)?we=st+1:$e=st}return $e}return Si(F,$,eu,ae)}function Si(F,$,ae,we){var $e=0,st=F==null?0:F.length;if(st===0)return 0;$=ae($);for(var yt=$!==$,wt=$===null,Ht=Tu($),_r=$===i;$e<st;){var Pr=un(($e+st)/2),Dr=ae(F[Pr]),qr=Dr!==i,fi=Dr===null,Fi=Dr===Dr,Cn=Tu(Dr);if(yt)var ji=we||Fi;else _r?ji=Fi&&(we||qr):wt?ji=Fi&&qr&&(we||!fi):Ht?ji=Fi&&qr&&!fi&&(we||!Cn):fi||Cn?ji=!1:ji=we?Dr<=$:Dr<$;ji?$e=Pr+1:st=Pr}return pa(st,Q)}function Lr(F,$){for(var ae=-1,we=F.length,$e=0,st=[];++ae<we;){var yt=F[ae],wt=$?$(yt):yt;if(!ae||!tc(wt,Ht)){var Ht=wt;st[$e++]=yt===0?0:yt}}return st}function Qi(F){return typeof F=="number"?F:Tu(F)?U:+F}function Ri(F){if(typeof F=="string")return F;if(qi(F))return ho(F,Ri)+"";if(Tu(F))return cd?cd.call(F):"";var $=F+"";return $=="0"&&1/F==-W?"-0":$}function Gr(F,$,ae){var we=-1,$e=Xd,st=F.length,yt=!0,wt=[],Ht=wt;if(ae)yt=!1,$e=Jc;else if(st>=t){var _r=$?null:gO(F);if(_r)return tf(_r);yt=!1,$e=rd,Ht=new fd}else Ht=$?[]:wt;e:for(;++we<st;){var Pr=F[we],Dr=$?$(Pr):Pr;if(Pr=ae||Pr!==0?Pr:0,yt&&Dr===Dr){for(var qr=Ht.length;qr--;)if(Ht[qr]===Dr)continue e;$&&Ht.push(Dr),wt.push(Pr)}else $e(Ht,Dr,ae)||(Ht!==wt&&Ht.push(Dr),wt.push(Pr))}return wt}function Pi(F,$){$=Sn($,F);var ae=-1,we=$.length;if(!we)return!0;for(var $e=F==null||typeof F!="object"&&typeof F!="function";++ae<we;){var st=$[ae];if(typeof st=="string"){if(st==="__proto__"&&!yn.call(F,"__proto__"))return!1;if(st==="constructor"&&ae+1<we&&typeof $[ae+1]=="string"&&$[ae+1]==="prototype"){if($e&&ae===0)continue;return!1}}}var yt=My(F,$);return yt==null||delete yt[mu(aa($))]}function Ca(F,$,ae,we){return Lt(F,$,ae(vu(F,$)),we)}function Bo(F,$,ae,we){for(var $e=F.length,st=we?$e:-1;(we?st--:++st<$e)&&$(F[st],st,F););return ae?Ir(F,we?0:st,we?st+1:$e):Ir(F,we?st+1:0,we?$e:st)}function go(F,$){var ae=F;return ae instanceof $i&&(ae=ae.value()),kf($,function(we,$e){return $e.func.apply($e.thisArg,fu([we],$e.args))},ae)}function _s(F,$,ae){var we=F.length;if(we<2)return we?Gr(F[0]):[];for(var $e=-1,st=Je(we);++$e<we;)for(var yt=F[$e],wt=-1;++wt<we;)wt!=$e&&(st[$e]=Dl(st[$e]||yt,F[wt],$,ae));return Gr(ya(st,1),$,ae)}function rn(F,$,ae){for(var we=-1,$e=F.length,st=$.length,yt={};++we<$e;){var wt=we<st?$[we]:i;ae(yt,F[we],wt)}return yt}function Ps(F){return Xa(F)?F:[]}function ls(F){return typeof F=="function"?F:eu}function Sn(F,$){return qi(F)?F:Dy(F,$)?[F]:D_(vo(F))}var yu=at;function ka(F,$,ae){var we=F.length;return ae=ae===i?we:ae,!$&&ae>=we?F:Ir(F,$,ae)}var my=Sr||function(F){return Ut.clearTimeout(F)};function c_(F,$){if($)return F.slice();var ae=F.length,we=Lh?Lh(ae):new F.constructor(ae);return F.copy(we),we}function by(F){var $=new F.constructor(F.byteLength);return new ld($).set(new ld(F)),$}function cL(F,$){var ae=$?by(F.buffer):F.buffer;return new F.constructor(ae,F.byteOffset,F.byteLength)}function uO(F){var $=new F.constructor(F.source,ar.exec(F));return $.lastIndex=F.lastIndex,$}function cO(F){return sf?Rt(sf.call(F)):{}}function d_(F,$){var ae=$?by(F.buffer):F.buffer;return new F.constructor(ae,F.byteOffset,F.length)}function f_(F,$){if(F!==$){var ae=F!==i,we=F===null,$e=F===F,st=Tu(F),yt=$!==i,wt=$===null,Ht=$===$,_r=Tu($);if(!wt&&!_r&&!st&&F>$||st&&yt&&Ht&&!wt&&!_r||we&&yt&&Ht||!ae&&Ht||!$e)return 1;if(!we&&!st&&!_r&&F<$||_r&&ae&&$e&&!we&&!st||wt&&ae&&$e||!yt&&$e||!Ht)return-1}return 0}function dO(F,$,ae){for(var we=-1,$e=F.criteria,st=$.criteria,yt=$e.length,wt=ae.length;++we<yt;){var Ht=f_($e[we],st[we]);if(Ht){if(we>=wt)return Ht;var _r=ae[we];return Ht*(_r=="desc"?-1:1)}}return F.index-$.index}function vb(F,$,ae,we){for(var $e=-1,st=F.length,yt=ae.length,wt=-1,Ht=$.length,_r=Ko(st-yt,0),Pr=Je(Ht+_r),Dr=!we;++wt<Ht;)Pr[wt]=$[wt];for(;++$e<yt;)(Dr||$e<st)&&(Pr[ae[$e]]=F[$e]);for(;_r--;)Pr[wt++]=F[$e++];return Pr}function h_(F,$,ae,we){for(var $e=-1,st=F.length,yt=-1,wt=ae.length,Ht=-1,_r=$.length,Pr=Ko(st-wt,0),Dr=Je(Pr+_r),qr=!we;++$e<Pr;)Dr[$e]=F[$e];for(var fi=$e;++Ht<_r;)Dr[fi+Ht]=$[Ht];for(;++yt<wt;)(qr||$e<st)&&(Dr[fi+ae[yt]]=F[$e++]);return Dr}function Jl(F,$){var ae=-1,we=F.length;for($||($=Je(we));++ae<we;)$[ae]=F[ae];return $}function Lc(F,$,ae,we){var $e=!ae;ae||(ae={});for(var st=-1,yt=$.length;++st<yt;){var wt=$[st],Ht=we?we(ae[wt],F[wt],wt,ae,F):i;Ht===i&&(Ht=F[wt]),$e?ol(ae,wt,Ht):Ol(ae,wt,Ht)}return ae}function fO(F,$){return Lc(F,Cb(F),$)}function hO(F,$){return Lc(F,Oy(F),$)}function yb(F,$){return function(ae,we){var $e=qi(ae)?Rp:Ug,st=$?$():{};return $e(ae,F,Ei(we,2),st)}}function Gh(F){return at(function($,ae){var we=-1,$e=ae.length,st=$e>1?ae[$e-1]:i,yt=$e>2?ae[2]:i;for(st=F.length>3&&typeof st=="function"?($e--,st):i,yt&&Ml(ae[0],ae[1],yt)&&(st=$e<3?i:st,$e=1),$=Rt($);++we<$e;){var wt=ae[we];wt&&F($,wt,we,st)}return $})}function p_(F,$){return function(ae,we){if(ae==null)return ae;if(!Cu(ae))return F(ae,we);for(var $e=ae.length,st=$?$e:-1,yt=Rt(ae);($?st--:++st<$e)&&we(yt[st],st,yt)!==!1;);return ae}}function g_(F){return function($,ae,we){for(var $e=-1,st=Rt($),yt=we($),wt=yt.length;wt--;){var Ht=yt[F?wt:++$e];if(ae(st[Ht],Ht,st)===!1)break}return $}}function v_(F,$,ae){var we=$&v,$e=Sy(F);function st(){var yt=this&&this!==Ut&&this instanceof st?$e:F;return yt.apply(we?ae:this,arguments)}return st}function y_(F){return function($){$=vo($);var ae=Ma($)?ze($):i,we=ae?ae[0]:$.charAt(0),$e=ae?ka(ae,1).join(""):$.slice(1);return we[F]()+$e}}function Up(F){return function($){return kf(wD(lv($).replace(yc,"")),F,"")}}function Sy(F){return function(){var $=arguments;switch($.length){case 0:return new F;case 1:return new F($[0]);case 2:return new F($[0],$[1]);case 3:return new F($[0],$[1],$[2]);case 4:return new F($[0],$[1],$[2],$[3]);case 5:return new F($[0],$[1],$[2],$[3],$[4]);case 6:return new F($[0],$[1],$[2],$[3],$[4],$[5]);case 7:return new F($[0],$[1],$[2],$[3],$[4],$[5],$[6])}var ae=Ec(F.prototype),we=F.apply(ae,$);return ma(we)?we:ae}}function dL(F,$,ae){var we=Sy(F);function $e(){for(var st=arguments.length,yt=Je(st),wt=st,Ht=Ia($e);wt--;)yt[wt]=arguments[wt];var _r=st<3&&yt[0]!==Ht&&yt[st-1]!==Ht?[]:Xl(yt,Ht);if(st-=_r.length,st<ae)return Sb(F,$,Yg,$e.placeholder,i,yt,_r,i,i,ae-st);var Pr=this&&this!==Ut&&this instanceof $e?we:F;return os(Pr,this,yt)}return $e}function m_(F){return function($,ae,we){var $e=Rt($);if(!Cu($)){var st=Ei(ae,3);$=Ys($),ae=function(wt){return st($e[wt],wt,$e)}}var yt=F($,ae,we);return yt>-1?$e[st?$[yt]:yt]:i}}function Gg(F){return vf(function($){var ae=$.length,we=ae,$e=Bs.prototype.thru;for(F&&$.reverse();we--;){var st=$[we];if(typeof st!="function")throw new qn(a);if($e&&!yt&&Ta(st)=="wrapper")var yt=new Bs([],!0)}for(we=yt?we:ae;++we<ae;){st=$[we];var wt=Ta(st),Ht=wt=="wrapper"?Ey(st):i;Ht&&Ry(Ht[0])&&Ht[1]==(T|b|_|x)&&!Ht[4].length&&Ht[9]==1?yt=yt[Ta(Ht[0])].apply(yt,Ht[3]):yt=st.length==1&&Ry(st)?yt[wt]():yt.thru(st)}return function(){var _r=arguments,Pr=_r[0];if(yt&&_r.length==1&&qi(Pr))return yt.plant(Pr).value();for(var Dr=0,qr=ae?$[Dr].apply(this,_r):Pr;++Dr<ae;)qr=$[Dr].call(this,qr);return qr}})}function Yg(F,$,ae,we,$e,st,yt,wt,Ht,_r){var Pr=$&T,Dr=$&v,qr=$&y,fi=$&(b|S),Fi=$&A,Cn=qr?i:Sy(F);function ji(){for(var Bn=arguments.length,Kn=Je(Bn),Sd=Bn;Sd--;)Kn[Sd]=arguments[Sd];if(fi)var nc=Ia(ji),_d=id(Kn,nc);if(we&&(Kn=vb(Kn,we,$e,fi)),st&&(Kn=h_(Kn,st,yt,fi)),Bn-=_d,fi&&Bn<_r){var Ts=Xl(Kn,nc);return Sb(F,$,Yg,ji.placeholder,ae,Kn,Ts,wt,Ht,_r-Bn)}var oh=Dr?ae:this,Xp=qr?oh[F]:F;return Bn=Kn.length,wt?Kn=Ly(Kn,wt):Fi&&Bn>1&&Kn.reverse(),Pr&&Ht<Bn&&(Kn.length=Ht),this&&this!==Ut&&this instanceof ji&&(Xp=Cn||Sy(Xp)),Xp.apply(oh,Kn)}return ji}function _y(F,$){return function(ae,we){return zh(ae,F,$(we),{})}}function Py(F,$){return function(ae,we){var $e;if(ae===i&&we===i)return $;if(ae!==i&&($e=ae),we!==i){if($e===i)return we;typeof ae=="string"||typeof we=="string"?(ae=Ri(ae),we=Ri(we)):(ae=Qi(ae),we=Qi(we)),$e=F(ae,we)}return $e}}function mb(F){return vf(function($){return $=ho($,bs(Ei())),at(function(ae){var we=this;return F($,function($e){return os($e,we,ae)})})})}function Yh(F,$){$=$===i?" ":Ri($);var ae=$.length;if(ae<2)return ae?He($,F):$;var we=He($,yr(F/Bu($)));return Ma($)?ka(ze(we),0,F).join(""):we.slice(0,F)}function pO(F,$,ae,we){var $e=$&v,st=Sy(F);function yt(){for(var wt=-1,Ht=arguments.length,_r=-1,Pr=we.length,Dr=Je(Pr+Ht),qr=this&&this!==Ut&&this instanceof yt?st:F;++_r<Pr;)Dr[_r]=we[_r];for(;Ht--;)Dr[_r++]=arguments[++wt];return os(qr,$e?ae:this,Dr)}return yt}function bb(F){return function($,ae,we){return we&&typeof we!="number"&&Ml($,ae,we)&&(ae=we=i),$=ih($),ae===i?(ae=$,$=0):ae=ih(ae),we=we===i?$<ae?1:-1:ih(we),Ie($,ae,we,F)}}function Cy(F){return function($,ae){return typeof $=="string"&&typeof ae=="string"||($=ic($),ae=ic(ae)),F($,ae)}}function Sb(F,$,ae,we,$e,st,yt,wt,Ht,_r){var Pr=$&b,Dr=Pr?yt:i,qr=Pr?i:yt,fi=Pr?st:i,Fi=Pr?i:st;$|=Pr?_:C,$&=~(Pr?C:_),$&m||($&=-4);var Cn=[F,$,$e,fi,Dr,Fi,qr,wt,Ht,_r],ji=ae.apply(i,Cn);return Ry(F)&&PO(ji,Cn),ji.placeholder=we,qg(ji,F,$)}function Ty(F){var $=Or[F];return function(ae,we){if(ae=ic(ae),we=we==null?0:pa(Ni(we),292),we&&Fs(ae)){var $e=(vo(ae)+"e").split("e"),st=$($e[0]+"e"+(+$e[1]+we));return $e=(vo(st)+"e").split("e"),+($e[0]+"e"+(+$e[1]-we))}return $(ae)}}var gO=Cc&&1/tf(new Cc([,-0]))[1]==W?function(F){return new Cc(F)}:M;function b_(F){return function($){var ae=sl($);return ae==je?ef($):ae==Se?kp($):Rh($,F($))}}function Ql(F,$,ae,we,$e,st,yt,wt){var Ht=$&y;if(!Ht&&typeof F!="function")throw new qn(a);var _r=we?we.length:0;if(_r||($&=-97,we=$e=i),yt=yt===i?yt:Ko(Ni(yt),0),wt=wt===i?wt:Ni(wt),_r-=$e?$e.length:0,$&C){var Pr=we,Dr=$e;we=$e=i}var qr=Ht?i:Ey(F),fi=[F,$,ae,we,$e,Pr,Dr,st,yt,wt];if(qr&&_O(fi,qr),F=fi[0],$=fi[1],ae=fi[2],we=fi[3],$e=fi[4],wt=fi[9]=fi[9]===i?Ht?0:F.length:Ko(fi[9]-_r,0),!wt&&$&(b|S)&&($&=-25),!$||$==v)var Fi=v_(F,$,ae);else $==b||$==S?Fi=dL(F,$,wt):($==_||$==(v|_))&&!$e.length?Fi=pO(F,$,ae,we):Fi=Yg.apply(i,fi);var Cn=qr?or:PO;return qg(Cn(Fi,fi),F,$)}function S_(F,$,ae,we){return F===i||tc(F,Vu[ae])&&!yn.call(we,ae)?$:F}function __(F,$,ae,we,$e,st){return ma(F)&&ma($)&&(st.set($,F),Zu(F,$,i,__,st),st.delete($)),F}function vO(F){return Xy(F)?i:F}function xy(F,$,ae,we,$e,st){var yt=ae&p,wt=F.length,Ht=$.length;if(wt!=Ht&&!(yt&&Ht>wt))return!1;var _r=st.get(F),Pr=st.get($);if(_r&&Pr)return _r==$&&Pr==F;var Dr=-1,qr=!0,fi=ae&g?new fd:i;for(st.set(F,$),st.set($,F);++Dr<wt;){var Fi=F[Dr],Cn=$[Dr];if(we)var ji=yt?we(Cn,Fi,Dr,$,F,st):we(Fi,Cn,Dr,F,$,st);if(ji!==i){if(ji)continue;qr=!1;break}if(fi){if(!If($,function(Bn,Kn){if(!rd(fi,Kn)&&(Fi===Bn||$e(Fi,Bn,ae,we,st)))return fi.push(Kn)})){qr=!1;break}}else if(!(Fi===Cn||$e(Fi,Cn,ae,we,st))){qr=!1;break}}return st.delete(F),st.delete($),qr}function yO(F,$,ae,we,$e,st,yt){switch(ae){case It:if(F.byteLength!=$.byteLength||F.byteOffset!=$.byteOffset)return!1;F=F.buffer,$=$.buffer;case xt:return!(F.byteLength!=$.byteLength||!st(new ld(F),new ld($)));case _e:case Te:case Ke:return tc(+F,+$);case Pe:return F.name==$.name&&F.message==$.message;case he:case be:return F==$+"";case je:var wt=ef;case Se:var Ht=we&p;if(wt||(wt=tf),F.size!=$.size&&!Ht)return!1;var _r=yt.get(F);if(_r)return _r==$;we|=g,yt.set(F,$);var Pr=xy(wt(F),wt($),we,$e,st,yt);return yt.delete(F),Pr;case ke:if(sf)return sf.call(F)==sf.call($)}return!1}function P_(F,$,ae,we,$e,st){var yt=ae&p,wt=_b(F),Ht=wt.length,_r=_b($),Pr=_r.length;if(Ht!=Pr&&!yt)return!1;for(var Dr=Ht;Dr--;){var qr=wt[Dr];if(!(yt?qr in $:yn.call($,qr)))return!1}var fi=st.get(F),Fi=st.get($);if(fi&&Fi)return fi==$&&Fi==F;var Cn=!0;st.set(F,$),st.set($,F);for(var ji=yt;++Dr<Ht;){qr=wt[Dr];var Bn=F[qr],Kn=$[qr];if(we)var Sd=yt?we(Kn,Bn,qr,$,F,st):we(Bn,Kn,qr,F,$,st);if(!(Sd===i?Bn===Kn||$e(Bn,Kn,ae,we,st):Sd)){Cn=!1;break}ji||(ji=qr=="constructor")}if(Cn&&!ji){var nc=F.constructor,_d=$.constructor;nc!=_d&&"constructor"in F&&"constructor"in $&&!(typeof nc=="function"&&nc instanceof nc&&typeof _d=="function"&&_d instanceof _d)&&(Cn=!1)}return st.delete(F),st.delete($),Cn}function vf(F){return wb(O_(F,i,oa),F+"")}function _b(F){return Hp(F,Ys,Cb)}function C_(F){return Hp(F,xu,Oy)}var Ey=ga?function(F){return ga.get(F)}:M;function Ta(F){for(var $=F.name+"",ae=zn[$],we=yn.call(zn,$)?ae.length:0;we--;){var $e=ae[we],st=$e.func;if(st==null||st==F)return $e.name}return $}function Ia(F){var $=yn.call(et,"placeholder")?et:F;return $.placeholder}function Ei(){var F=et.iteratee||im;return F=F===im?pd:F,arguments.length?F(arguments[0],arguments[1]):F}function Ay(F,$){var ae=F.__data__;return Eb($)?ae[typeof $=="string"?"string":"hash"]:ae.map}function Pb(F){for(var $=Ys(F),ae=$.length;ae--;){var we=$[ae],$e=F[we];$[ae]=[we,$e,yf($e)]}return $}function $h(F,$){var ae=Ra(F,$);return qa(ae)?ae:i}function wy(F){var $=yn.call(F,Uu),ae=F[Uu];try{F[Uu]=i;var we=!0}catch{}var $e=Xn.call(F);return we&&($?F[Uu]=ae:delete F[Uu]),$e}var Cb=Uf?function(F){return F==null?[]:(F=Rt(F),Da(Uf(F),function($){return Hf.call(F,$)}))}:mr,Oy=Uf?function(F){for(var $=[];F;)fu($,Cb(F)),F=Er(F);return $}:mr,sl=$a;(xl&&sl(new xl(new ArrayBuffer(1)))!=It||Ga&&sl(new Ga)!=je||kh&&sl(kh.resolve())!=xe||Cc&&sl(new Cc)!=Se||ud&&sl(new ud)!=rt)&&(sl=function(F){var $=$a(F),ae=$==We?F.constructor:i,we=ae?Ll(ae):"";if(we)switch(we){case bn:return It;case Tc:return je;case El:return xe;case Np:return Se;case xc:return rt}return $});function fL(F,$,ae){for(var we=-1,$e=ae.length;++we<$e;){var st=ae[we],yt=st.size;switch(st.type){case"drop":F+=yt;break;case"dropRight":$-=yt;break;case"take":$=pa($,F+yt);break;case"takeRight":F=Ko(F,$-yt);break}}return{start:F,end:$}}function Tb(F){var $=F.match(Kr);return $?$[1].split(In):[]}function xb(F,$,ae){$=Sn($,F);for(var we=-1,$e=$.length,st=!1;++we<$e;){var yt=mu($[we]);if(!(st=F!=null&&ae(F,yt)))break;F=F[yt]}return st||++we!=$e?st:($e=F==null?0:F.length,!!$e&&Ub($e)&&vd(yt,$e)&&(qi(F)||$p(F)))}function mO(F){var $=F.length,ae=new F.constructor($);return $&&typeof F[0]=="string"&&yn.call(F,"index")&&(ae.index=F.index,ae.input=F.input),ae}function T_(F){return typeof F.constructor=="function"&&!$g(F)?Ec(Er(F)):{}}function bO(F,$,ae){var we=F.constructor;switch($){case xt:return by(F);case _e:case Te:return new we(+F);case It:return cL(F,ae);case Zt:case ct:case Qe:case Et:case Gt:case Xe:case Vt:case lr:case Jt:return d_(F,ae);case je:return new we;case Ke:case be:return new we(F);case he:return uO(F);case Se:return new we;case ke:return cO(F)}}function x_(F,$){var ae=$.length;if(!ae)return F;var we=ae-1;return $[we]=(ae>1?"& ":"")+$[we],$=$.join(ae>2?", ":" "),F.replace(Dn,`{
/* [wrapped with `+$+`] */
`)}function E_(F){return qi(F)||$p(F)||!!(Ng&&F&&F[Ng])}function vd(F,$){var ae=typeof F;return $=$??K,!!$&&(ae=="number"||ae!="symbol"&&ai.test(F))&&F>-1&&F%1==0&&F<$}function Ml(F,$,ae){if(!ma(ae))return!1;var we=typeof $;return(we=="number"?Cu(ae)&&vd($,ae.length):we=="string"&&$ in ae)?tc(ae[$],F):!1}function Dy(F,$){if(qi(F))return!1;var ae=typeof F;return ae=="number"||ae=="symbol"||ae=="boolean"||F==null||Tu(F)?!0:pi.test(F)||!Xr.test(F)||$!=null&&F in Rt($)}function Eb(F){var $=typeof F;return $=="string"||$=="number"||$=="symbol"||$=="boolean"?F!=="__proto__":F===null}function Ry(F){var $=Ta(F),ae=et[$];if(typeof ae!="function"||!($ in $i.prototype))return!1;if(F===ae)return!0;var we=Ey(ae);return!!we&&F===we[0]}function SO(F){return!!ro&&ro in F}var A_=od?rc:Kt;function $g(F){var $=F&&F.constructor,ae=typeof $=="function"&&$.prototype||Vu;return F===ae}function yf(F){return F===F&&!ma(F)}function Ab(F,$){return function(ae){return ae==null?!1:ae[F]===$&&($!==i||F in Rt(ae))}}function hL(F){var $=Gy(F,function(we){return ae.size===u&&ae.clear(),we}),ae=$.cache;return $}function _O(F,$){var ae=F[1],we=$[1],$e=ae|we,st=$e<(v|y|T),yt=we==T&&ae==b||we==T&&ae==x&&F[7].length<=$[8]||we==(T|x)&&$[7].length<=$[8]&&ae==b;if(!(st||yt))return F;we&v&&(F[2]=$[2],$e|=ae&v?0:m);var wt=$[3];if(wt){var Ht=F[3];F[3]=Ht?vb(Ht,wt,$[4]):wt,F[4]=Ht?Xl(F[3],c):$[4]}return wt=$[5],wt&&(Ht=F[5],F[5]=Ht?h_(Ht,wt,$[6]):wt,F[6]=Ht?Xl(F[5],c):$[6]),wt=$[7],wt&&(F[7]=wt),we&T&&(F[8]=F[8]==null?$[8]:pa(F[8],$[8])),F[9]==null&&(F[9]=$[9]),F[0]=$[0],F[1]=$e,F}function Kf(F){var $=[];if(F!=null)for(var ae in Rt(F))$.push(ae);return $}function w_(F){return Xn.call(F)}function O_(F,$,ae){return $=Ko($===i?F.length-1:$,0),function(){for(var we=arguments,$e=-1,st=Ko(we.length-$,0),yt=Je(st);++$e<st;)yt[$e]=we[$+$e];$e=-1;for(var wt=Je($+1);++$e<$;)wt[$e]=we[$e];return wt[$]=ae(yt),os(F,this,wt)}}function My(F,$){return $.length<2?F:vu(F,Ir($,0,-1))}function Ly(F,$){for(var ae=F.length,we=pa($.length,ae),$e=Jl(F);we--;){var st=$[we];F[we]=vd(st,ae)?$e[st]:i}return F}function Vo(F,$){if(!($==="constructor"&&typeof F[$]=="function")&&$!="__proto__")return F[$]}var PO=Zf(or),ky=Pc||function(F,$){return Ut.setTimeout(F,$)},wb=Zf(er);function qg(F,$,ae){var we=$+"";return wb(F,x_(we,CO(Tb(we),ae)))}function Zf(F){var $=0,ae=0;return function(){var we=js(),$e=D-(we-ae);if(ae=we,$e>0){if(++$>=k)return arguments[0]}else $=0;return F.apply(i,arguments)}}function Iy(F,$){var ae=-1,we=F.length,$e=we-1;for($=$===i?we:$;++ae<$;){var st=Ae(ae,$e),yt=F[st];F[st]=F[ae],F[ae]=yt}return F.length=$,F}var D_=hL(function(F){var $=[];return F.charCodeAt(0)===46&&$.push(""),F.replace(Qr,function(ae,we,$e,st){$.push($e?st.replace(dr,"$1"):we||ae)}),$});function mu(F){if(typeof F=="string"||Tu(F))return F;var $=F+"";return $=="0"&&1/F==-W?"-0":$}function Ll(F){if(F!=null){try{return ad.call(F)}catch{}try{return F+""}catch{}}return""}function CO(F,$){return as(ee,function(ae){var we="_."+ae[0];$&ae[1]&&!Xd(F,we)&&F.push(we)}),F.sort()}function Ob(F){if(F instanceof $i)return F.clone();var $=new Bs(F.__wrapped__,F.__chain__);return $.__actions__=Jl(F.__actions__),$.__index__=F.__index__,$.__values__=F.__values__,$}function TO(F,$,ae){(ae?Ml(F,$,ae):$===i)?$=1:$=Ko(Ni($),0);var we=F==null?0:F.length;if(!we||$<1)return[];for(var $e=0,st=0,yt=Je(yr(we/$));$e<we;)yt[st++]=Ir(F,$e,$e+=$);return yt}function R_(F){for(var $=-1,ae=F==null?0:F.length,we=0,$e=[];++$<ae;){var st=F[$];st&&($e[we++]=st)}return $e}function M_(){var F=arguments.length;if(!F)return[];for(var $=Je(F-1),ae=arguments[0],we=F;we--;)$[we-1]=arguments[we];return fu(qi(ae)?Jl(ae):[ae],ya($,1))}var Db=at(function(F,$){return Xa(F)?Dl(F,ya($,1,Xa,!0)):[]}),xO=at(function(F,$){var ae=aa($);return Xa(ae)&&(ae=i),Xa(F)?Dl(F,ya($,1,Xa,!0),Ei(ae,2)):[]}),Jf=at(function(F,$){var ae=aa($);return Xa(ae)&&(ae=i),Xa(F)?Dl(F,ya($,1,Xa,!0),i,ae):[]});function us(F,$,ae){var we=F==null?0:F.length;return we?($=ae||$===i?1:Ni($),Ir(F,$<0?0:$,we)):[]}function L_(F,$,ae){var we=F==null?0:F.length;return we?($=ae||$===i?1:Ni($),$=we-$,Ir(F,0,$<0?0:$)):[]}function EO(F,$){return F&&F.length?Bo(F,Ei($,3),!0,!0):[]}function Gs(F,$){return F&&F.length?Bo(F,Ei($,3),!0):[]}function pL(F,$,ae,we){var $e=F==null?0:F.length;return $e?(ae&&typeof ae!="number"&&Ml(F,$,ae)&&(ae=0,we=$e),hf(F,$,ae,we)):[]}function k_(F,$,ae){var we=F==null?0:F.length;if(!we)return-1;var $e=ae==null?0:Ni(ae);return $e<0&&($e=Ko(we+$e,0)),Zd(F,Ei($,3),$e)}function I_(F,$,ae){var we=F==null?0:F.length;if(!we)return-1;var $e=we-1;return ae!==i&&($e=Ni(ae),$e=ae<0?Ko(we+$e,0):pa($e,we-1)),Zd(F,Ei($,3),$e,!0)}function oa(F){var $=F==null?0:F.length;return $?ya(F,1):[]}function bu(F){var $=F==null?0:F.length;return $?ya(F,W):[]}function Qf(F,$){var ae=F==null?0:F.length;return ae?($=$===i?1:Ni($),ya(F,$)):[]}function AO(F){for(var $=-1,ae=F==null?0:F.length,we={};++$<ae;){var $e=F[$];we[$e[0]]=$e[1]}return we}function N_(F){return F&&F.length?F[0]:i}function wO(F,$,ae){var we=F==null?0:F.length;if(!we)return-1;var $e=ae==null?0:Ni(ae);return $e<0&&($e=Ko(we+$e,0)),Ti(F,$,$e)}function gL(F){var $=F==null?0:F.length;return $?Ir(F,0,-1):[]}var Rb=at(function(F){var $=ho(F,Ps);return $.length&&$[0]===F[0]?gf($):[]}),Su=at(function(F){var $=aa(F),ae=ho(F,Ps);return $===aa(ae)?$=i:ae.pop(),ae.length&&ae[0]===F[0]?gf(ae,Ei($,2)):[]}),yd=at(function(F){var $=aa(F),ae=ho(F,Ps);return $=typeof $=="function"?$:i,$&&ae.pop(),ae.length&&ae[0]===F[0]?gf(ae,i,$):[]});function OO(F,$){return F==null?"":nf.call(F,$)}function aa(F){var $=F==null?0:F.length;return $?F[$-1]:i}function DO(F,$,ae){var we=F==null?0:F.length;if(!we)return-1;var $e=we;return ae!==i&&($e=Ni(ae),$e=$e<0?Ko(we+$e,0):pa($e,we-1)),$===$?Mh(F,$,$e):Zd(F,Qc,$e,!0)}function eh(F,$){return F&&F.length?J(F,Ni($)):i}var zp=at(mf);function mf(F,$){return F&&F.length&&$&&$.length?re(F,$):F}function F_(F,$,ae){return F&&F.length&&$&&$.length?re(F,$,Ei(ae,2)):F}function j_(F,$,ae){return F&&F.length&&$&&$.length?re(F,$,i,ae):F}var md=vf(function(F,$){var ae=F==null?0:F.length,we=ff(F,$);return ce(F,ho($,function($e){return vd($e,ae)?+$e:$e}).sort(f_)),we});function RO(F,$){var ae=[];if(!(F&&F.length))return ae;var we=-1,$e=[],st=F.length;for($=Ei($,3);++we<st;){var yt=F[we];$(yt,we,F)&&(ae.push(yt),$e.push(we))}return ce(F,$e),ae}function qh(F){return F==null?F:Tl.call(F)}function Ny(F,$,ae){var we=F==null?0:F.length;return we?(ae&&typeof ae!="number"&&Ml(F,$,ae)?($=0,ae=we):($=$==null?0:Ni($),ae=ae===i?we:Ni(ae)),Ir(F,$,ae)):[]}function Fy(F,$){return ii(F,$)}function Xg(F,$,ae){return Si(F,$,Ei(ae,2))}function MO(F,$){var ae=F==null?0:F.length;if(ae){var we=ii(F,$);if(we<ae&&tc(F[we],$))return we}return-1}function LO(F,$){return ii(F,$,!0)}function jy(F,$,ae){return Si(F,$,Ei(ae,2),!0)}function kO(F,$){var ae=F==null?0:F.length;if(ae){var we=ii(F,$,!0)-1;if(tc(F[we],$))return we}return-1}function Mb(F){return F&&F.length?Lr(F):[]}function IO(F,$){return F&&F.length?Lr(F,Ei($,2)):[]}function vL(F){var $=F==null?0:F.length;return $?Ir(F,1,$):[]}function yL(F,$,ae){return F&&F.length?($=ae||$===i?1:Ni($),Ir(F,0,$<0?0:$)):[]}function lo(F,$,ae){var we=F==null?0:F.length;return we?($=ae||$===i?1:Ni($),$=we-$,Ir(F,$<0?0:$,we)):[]}function Ho(F,$){return F&&F.length?Bo(F,Ei($,3),!1,!0):[]}function Tn(F,$){return F&&F.length?Bo(F,Ei($,3)):[]}var Rn=at(function(F){return Gr(ya(F,1,Xa,!0))}),Po=at(function(F){var $=aa(F);return Xa($)&&($=i),Gr(ya(F,1,Xa,!0),Ei($,2))}),Ju=at(function(F){var $=aa(F);return $=typeof $=="function"?$:i,Gr(ya(F,1,Xa,!0),i,$)});function Xh(F){return F&&F.length?Gr(F):[]}function Kg(F,$){return F&&F.length?Gr(F,Ei($,2)):[]}function B_(F,$){return $=typeof $=="function"?$:i,F&&F.length?Gr(F,i,$):[]}function bd(F){if(!(F&&F.length))return[];var $=0;return F=Da(F,function(ae){if(Xa(ae))return $=Ko(ae.length,$),!0}),Fu($,function(ae){return ho(F,hu(ae))})}function xa(F,$){if(!(F&&F.length))return[];var ae=bd(F);return $==null?ae:ho(ae,function(we){return os($,i,we)})}var Kh=at(function(F,$){return Xa(F)?Dl(F,$):[]}),Wp=at(function(F){return _s(Da(F,Xa))}),V_=at(function(F){var $=aa(F);return Xa($)&&($=i),_s(Da(F,Xa),Ei($,2))}),Qu=at(function(F){var $=aa(F);return $=typeof $=="function"?$:i,_s(Da(F,Xa),i,$)}),Zg=at(bd);function By(F,$){return rn(F||[],$||[],Ol)}function _u(F,$){return rn(F||[],$||[],Lt)}var H_=at(function(F){var $=F.length,ae=$>1?F[$-1]:i;return ae=typeof ae=="function"?(F.pop(),ae):i,xa(F,ae)});function Vy(F){var $=et(F);return $.__chain__=!0,$}function NO(F,$){return $(F),F}function Gp(F,$){return $(F)}var Lb=vf(function(F){var $=F.length,ae=$?F[0]:0,we=this.__wrapped__,$e=function(st){return ff(st,F)};return $>1||this.__actions__.length||!(we instanceof $i)||!vd(ae)?this.thru($e):(we=we.slice(ae,+ae+($?1:0)),we.__actions__.push({func:Gp,args:[$e],thisArg:i}),new Bs(we,this.__chain__).thru(function(st){return $&&!st.length&&st.push(i),st}))});function Zh(){return Vy(this)}function Cs(){return new Bs(this.value(),this.__chain__)}function Jh(){this.__values__===i&&(this.__values__=aD(this.value()));var F=this.__index__>=this.__values__.length,$=F?i:this.__values__[this.__index__++];return{done:F,value:$}}function Jg(){return this}function th(F){for(var $,ae=this;ae instanceof Ac;){var we=Ob(ae);we.__index__=0,we.__values__=i,$?$e.__wrapped__=we:$=we;var $e=we;ae=ae.__wrapped__}return $e.__wrapped__=F,$}function U_(){var F=this.__wrapped__;if(F instanceof $i){var $=F;return this.__actions__.length&&($=new $i(this)),$=$.reverse(),$.__actions__.push({func:Gp,args:[qh],thisArg:i}),new Bs($,this.__chain__)}return this.thru(qh)}function z_(){return go(this.__wrapped__,this.__actions__)}var FO=yb(function(F,$,ae){yn.call(F,ae)?++F[ae]:ol(F,ae,1)});function Hy(F,$,ae){var we=qi(F)?bc:Dc;return ae&&Ml(F,$,ae)&&($=i),we(F,Ei($,3))}function W_(F,$){var ae=qi(F)?Da:Hh;return ae(F,Ei($,3))}var ec=m_(k_),jO=m_(I_);function Pu(F,$){return ya(Uy(F,$),1)}function BO(F,$){return ya(Uy(F,$),W)}function VO(F,$,ae){return ae=ae===i?1:Ni(ae),ya(Uy(F,$),ae)}function HO(F,$){var ae=qi(F)?as:gu;return ae(F,Ei($,3))}function rh(F,$){var ae=qi(F)?qd:Vh;return ae(F,Ei($,3))}var kb=yb(function(F,$,ae){yn.call(F,ae)?F[ae].push($):ol(F,ae,[$])});function G_(F,$,ae,we){F=Cu(F)?F:sv(F),ae=ae&&!we?Ni(ae):0;var $e=F.length;return ae<0&&(ae=Ko($e+ae,0)),Jy(F)?ae<=$e&&F.indexOf($,ae)>-1:!!$e&&Ti(F,$,ae)>-1}var Qg=at(function(F,$,ae){var we=-1,$e=typeof $=="function",st=Cu(F)?Je(F.length):[];return gu(F,function(yt){st[++we]=$e?os($,yt,ae):Us(yt,$,ae)}),st}),UO=yb(function(F,$,ae){ol(F,ae,$)});function Uy(F,$){var ae=qi(F)?ho:gd;return ae(F,Ei($,3))}function zO(F,$,ae,we){return F==null?[]:(qi($)||($=$==null?[]:[$]),ae=we?i:ae,qi(ae)||(ae=ae==null?[]:[ae]),oe(F,$,ae))}var WO=yb(function(F,$,ae){F[ae?0:1].push($)},function(){return[[],[]]});function Ib(F,$,ae){var we=qi(F)?kf:Jd,$e=arguments.length<3;return we(F,Ei($,4),ae,$e,gu)}function Y_(F,$,ae){var we=qi(F)?Sc:Jd,$e=arguments.length<3;return we(F,Ei($,4),ae,$e,Vh)}function mL(F,$){var ae=qi(F)?Da:Hh;return ae(F,jb(Ei($,3)))}function bL(F){var $=qi(F)?Yf:Tt;return $(F)}function SL(F,$,ae){(ae?Ml(F,$,ae):$===i)?$=1:$=Ni($);var we=qi(F)?$f:mt;return we(F,$)}function GO(F){var $=qi(F)?Hg:pr;return $(F)}function YO(F){if(F==null)return 0;if(Cu(F))return Jy(F)?Bu(F):F.length;var $=sl(F);return $==je||$==Se?F.size:Ku(F).length}function ev(F,$,ae){var we=qi(F)?If:$r;return ae&&Ml(F,$,ae)&&($=i),we(F,Ei($,3))}var Nb=at(function(F,$){if(F==null)return[];var ae=$.length;return ae>1&&Ml(F,$[0],$[1])?$=[]:ae>2&&Ml($[0],$[1],$[2])&&($=[$[0]]),oe(F,ya($,1),[])}),zy=mn||function(){return Ut.Date.now()};function $O(F,$){if(typeof $!="function")throw new qn(a);return F=Ni(F),function(){if(--F<1)return $.apply(this,arguments)}}function $_(F,$,ae){return $=ae?i:$,$=F&&$==null?F.length:$,Ql(F,T,i,i,i,i,$)}function q_(F,$){var ae;if(typeof $!="function")throw new qn(a);return F=Ni(F),function(){return--F>0&&(ae=$.apply(this,arguments)),F<=1&&($=i),ae}}var Fb=at(function(F,$,ae){var we=v;if(ae.length){var $e=Xl(ae,Ia(Fb));we|=_}return Ql(F,we,$,ae,$e)}),X_=at(function(F,$,ae){var we=v|y;if(ae.length){var $e=Xl(ae,Ia(X_));we|=_}return Ql($,we,F,ae,$e)});function Wy(F,$,ae){$=ae?i:$;var we=Ql(F,b,i,i,i,i,i,$);return we.placeholder=Wy.placeholder,we}function K_(F,$,ae){$=ae?i:$;var we=Ql(F,S,i,i,i,i,i,$);return we.placeholder=K_.placeholder,we}function Z_(F,$,ae){var we,$e,st,yt,wt,Ht,_r=0,Pr=!1,Dr=!1,qr=!0;if(typeof F!="function")throw new qn(a);$=ic($)||0,ma(ae)&&(Pr=!!ae.leading,Dr="maxWait"in ae,st=Dr?Ko(ic(ae.maxWait)||0,$):st,qr="trailing"in ae?!!ae.trailing:qr);function fi(Ts){var oh=we,Xp=$e;return we=$e=i,_r=Ts,yt=F.apply(Xp,oh),yt}function Fi(Ts){return _r=Ts,wt=ky(Bn,$),Pr?fi(Ts):yt}function Cn(Ts){var oh=Ts-Ht,Xp=Ts-_r,wj=$-oh;return Dr?pa(wj,st-Xp):wj}function ji(Ts){var oh=Ts-Ht,Xp=Ts-_r;return Ht===i||oh>=$||oh<0||Dr&&Xp>=st}function Bn(){var Ts=zy();if(ji(Ts))return Kn(Ts);wt=ky(Bn,Cn(Ts))}function Kn(Ts){return wt=i,qr&&we?fi(Ts):(we=$e=i,yt)}function Sd(){wt!==i&&my(wt),_r=0,we=Ht=$e=wt=i}function nc(){return wt===i?yt:Kn(zy())}function _d(){var Ts=zy(),oh=ji(Ts);if(we=arguments,$e=this,Ht=Ts,oh){if(wt===i)return Fi(Ht);if(Dr)return my(wt),wt=ky(Bn,$),fi(Ht)}return wt===i&&(wt=ky(Bn,$)),yt}return _d.cancel=Sd,_d.flush=nc,_d}var Co=at(function(F,$){return Bh(F,1,$)}),J_=at(function(F,$,ae){return Bh(F,ic($)||0,ae)});function _L(F){return Ql(F,A)}function Gy(F,$){if(typeof F!="function"||$!=null&&typeof $!="function")throw new qn(a);var ae=function(){var we=arguments,$e=$?$.apply(this,we):we[0],st=ae.cache;if(st.has($e))return st.get($e);var yt=F.apply(this,we);return ae.cache=st.set($e,yt)||st,yt};return ae.cache=new(Gy.Cache||Kl),ae}Gy.Cache=Kl;function jb(F){if(typeof F!="function")throw new qn(a);return function(){var $=arguments;switch($.length){case 0:return!F.call(this);case 1:return!F.call(this,$[0]);case 2:return!F.call(this,$[0],$[1]);case 3:return!F.call(this,$[0],$[1],$[2])}return!F.apply(this,$)}}function PL(F){return q_(2,F)}var CL=yu(function(F,$){$=$.length==1&&qi($[0])?ho($[0],bs(Ei())):ho(ya($,1),bs(Ei()));var ae=$.length;return at(function(we){for(var $e=-1,st=pa(we.length,ae);++$e<st;)we[$e]=$[$e].call(this,we[$e]);return os(F,this,we)})}),tv=at(function(F,$){var ae=Xl($,Ia(tv));return Ql(F,_,i,$,ae)}),Yp=at(function(F,$){var ae=Xl($,Ia(Yp));return Ql(F,C,i,$,ae)}),Q_=vf(function(F,$){return Ql(F,x,i,i,i,$)});function Bb(F,$){if(typeof F!="function")throw new qn(a);return $=$===i?$:Ni($),at(F,$)}function eP(F,$){if(typeof F!="function")throw new qn(a);return $=$==null?0:Ko(Ni($),0),at(function(ae){var we=ae[$],$e=ka(ae,0,$);return we&&fu($e,we),os(F,this,$e)})}function Qh(F,$,ae){var we=!0,$e=!0;if(typeof F!="function")throw new qn(a);return ma(ae)&&(we="leading"in ae?!!ae.leading:we,$e="trailing"in ae?!!ae.trailing:$e),Z_(F,$,{leading:we,maxWait:$,trailing:$e})}function bf(F){return $_(F,1)}function Yy(F,$){return tv(ls($),F)}function TL(){if(!arguments.length)return[];var F=arguments[0];return qi(F)?F:[F]}function qO(F){return ss(F,h)}function XO(F,$){return $=typeof $=="function"?$:i,ss(F,h,$)}function KO(F){return ss(F,d|h)}function ZO(F,$){return $=typeof $=="function"?$:i,ss(F,d|h,$)}function xL(F,$){return $==null||Oc(F,$,Ys($))}function tc(F,$){return F===$||F!==F&&$!==$}var JO=Cy(qf),QO=Cy(function(F,$){return F>=$}),$p=Ss((function(){return arguments})())?Ss:function(F){return Na(F)&&yn.call(F,"callee")&&!Hf.call(F,"callee")},qi=Je.isArray,tP=za?bs(za):na;function Cu(F){return F!=null&&Ub(F.length)&&!rc(F)}function Xa(F){return Na(F)&&Cu(F)}function $y(F){return F===!0||F===!1||Na(F)&&$a(F)==_e}var ep=Fg||Kt,eD=ha?bs(ha):po;function xn(F){return Na(F)&&F.nodeType===1&&!Xy(F)}function rP(F){if(F==null)return!0;if(Cu(F)&&(qi(F)||typeof F=="string"||typeof F.splice=="function"||ep(F)||tp(F)||$p(F)))return!F.length;var $=sl(F);if($==je||$==Se)return!F.size;if($g(F))return!Ku(F).length;for(var ae in F)if(yn.call(F,ae))return!1;return!0}function Vb(F,$){return zs(F,$)}function iP(F,$,ae){ae=typeof ae=="function"?ae:i;var we=ae?ae(F,$):i;return we===i?zs(F,$,i,ae):!!we}function Hb(F){if(!Na(F))return!1;var $=$a(F);return $==Pe||$==De||typeof F.message=="string"&&typeof F.name=="string"&&!Xy(F)}function nP(F){return typeof F=="number"&&Fs(F)}function rc(F){if(!ma(F))return!1;var $=$a(F);return $==Ee||$==Re||$==pe||$==ve}function qy(F){return typeof F=="number"&&F==Ni(F)}function Ub(F){return typeof F=="number"&&F>-1&&F%1==0&&F<=K}function ma(F){var $=typeof F;return F!=null&&($=="object"||$=="function")}function Na(F){return F!=null&&typeof F=="object"}var tD=Is?bs(Is):di;function rD(F,$){return F===$||Eo(F,$,Pb($))}function iD(F,$,ae){return ae=typeof ae=="function"?ae:i,Eo(F,$,Pb($),ae)}function wo(F){return aP(F)&&F!=+F}function oP(F){if(A_(F))throw new Nt(o);return qa(F)}function ll(F){return F===null}function EL(F){return F==null}function aP(F){return typeof F=="number"||Na(F)&&$a(F)==Ke}function Xy(F){if(!Na(F)||$a(F)!=We)return!1;var $=Er(F);if($===null)return!0;var ae=yn.call($,"constructor")&&$.constructor;return typeof ae=="function"&&ae instanceof ae&&ad.call(ae)==Un}var Ky=tl?bs(tl):Ws;function sP(F){return qy(F)&&F>=-K&&F<=K}var Zy=$l?bs($l):Xu;function Jy(F){return typeof F=="string"||!qi(F)&&Na(F)&&$a(F)==be}function Tu(F){return typeof F=="symbol"||Na(F)&&$a(F)==ke}var tp=mc?bs(mc):Mc;function lP(F){return F===i}function AL(F){return Na(F)&&sl(F)==rt}function nD(F){return Na(F)&&$a(F)==St}var wL=Cy(Ao),oD=Cy(function(F,$){return F<=$});function aD(F){if(!F)return[];if(Cu(F))return Jy(F)?ze(F):Jl(F);if(Wa&&F[Wa])return Qd(F[Wa]());var $=sl(F),ae=$==je?ef:$==Se?tf:sv;return ae(F)}function ih(F){if(!F)return F===0?F:0;if(F=ic(F),F===W||F===-W){var $=F<0?-1:1;return $*H}return F===F?F:0}function Ni(F){var $=ih(F),ae=$%1;return $===$?ae?$-ae:$:0}function uP(F){return F?Vs(Ni(F),0,I):0}function ic(F){if(typeof F=="number")return F;if(Tu(F))return U;if(ma(F)){var $=typeof F.valueOf=="function"?F.valueOf():F;F=ma($)?$+"":$}if(typeof F!="string")return F===0?F:+F;F=ju(F);var ae=Ar.test(F);return ae||Br.test(F)?Mt(F.slice(2),ae?2:8):Bt.test(F)?U:+F}function zb(F){return Lc(F,xu(F))}function OL(F){return F?Vs(Ni(F),-K,K):F===0?F:0}function vo(F){return F==null?"":Ri(F)}var sD=Gh(function(F,$){if($g($)||Cu($)){Lc($,Ys($),F);return}for(var ae in $)yn.call($,ae)&&Ol(F,ae,$[ae])}),Wb=Gh(function(F,$){Lc($,xu($),F)}),rv=Gh(function(F,$,ae,we){Lc($,xu($),F,we)}),DL=Gh(function(F,$,ae,we){Lc($,Ys($),F,we)}),kc=vf(ff);function cP(F,$){var ae=Ec(F);return $==null?ae:Vp(ae,$)}var lD=at(function(F,$){F=Rt(F);var ae=-1,we=$.length,$e=we>2?$[2]:i;for($e&&Ml($[0],$[1],$e)&&(we=1);++ae<we;)for(var st=$[ae],yt=xu(st),wt=-1,Ht=yt.length;++wt<Ht;){var _r=yt[wt],Pr=F[_r];(Pr===i||tc(Pr,Vu[_r])&&!yn.call(F,_r))&&(F[_r]=st[_r])}return F}),uD=at(function(F){return F.push(i,__),os(nv,i,F)});function cD(F,$){return _c(F,Ei($,3),Zl)}function Qy(F,$){return _c(F,Ei($,3),Uh)}function Ic(F,$){return F==null?F:Rc(F,Ei($,3),xu)}function dD(F,$){return F==null?F:pf(F,Ei($,3),xu)}function Gb(F,$){return F&&Zl(F,Ei($,3))}function nh(F,$){return F&&Uh(F,Ei($,3))}function RL(F){return F==null?[]:$u(F,Ys(F))}function ML(F){return F==null?[]:$u(F,xu(F))}function rp(F,$,ae){var we=F==null?i:vu(F,$);return we===i?ae:we}function fD(F,$){return F!=null&&xb(F,$,al)}function dP(F,$){return F!=null&&xb(F,$,Hs)}var LL=_y(function(F,$,ae){$!=null&&typeof $.toString!="function"&&($=Xn.call($)),F[$]=ae},uv(eu)),kL=_y(function(F,$,ae){$!=null&&typeof $.toString!="function"&&($=Xn.call($)),yn.call(F,$)?F[$].push(ae):F[$]=[ae]},Ei),IL=at(Us);function Ys(F){return Cu(F)?Fh(F):Ku(F)}function xu(F){return Cu(F)?Fh(F,!0):Wg(F)}function NL(F,$){var ae={};return $=Ei($,3),Zl(F,function(we,$e,st){ol(ae,$(we,$e,st),we)}),ae}function hD(F,$){var ae={};return $=Ei($,3),Zl(F,function(we,$e,st){ol(ae,$e,$(we,$e,st))}),ae}var iv=Gh(function(F,$,ae){Zu(F,$,ae)}),nv=Gh(function(F,$,ae,we){Zu(F,$,ae,we)}),pD=vf(function(F,$){var ae={};if(F==null)return ae;var we=!1;$=ho($,function(st){return st=Sn(st,F),we||(we=st.length>1),st}),Lc(F,C_(F),ae),we&&(ae=ss(ae,d|f|h,vO));for(var $e=$.length;$e--;)Pi(ae,$[$e]);return ae});function FL(F,$){return av(F,jb(Ei($)))}var ov=vf(function(F,$){return F==null?{}:O(F,$)});function av(F,$){if(F==null)return{};var ae=ho(C_(F),function(we){return[we]});return $=Ei($),B(F,ae,function(we,$e){return $(we,$e[0])})}function gD(F,$,ae){$=Sn($,F);var we=-1,$e=$.length;for($e||($e=1,F=i);++we<$e;){var st=F==null?i:F[mu($[we])];st===i&&(we=$e,st=ae),F=rc(st)?st.call(F):st}return F}function Yb(F,$,ae){return F==null?F:Lt(F,$,ae)}function fP(F,$,ae,we){return we=typeof we=="function"?we:i,F==null?F:Lt(F,$,ae,we)}var $b=b_(Ys),em=b_(xu);function vD(F,$,ae){var we=qi(F),$e=we||ep(F)||tp(F);if($=Ei($,4),ae==null){var st=F&&F.constructor;$e?ae=we?new st:[]:ma(F)?ae=rc(st)?Ec(Er(F)):{}:ae={}}return($e?as:Zl)(F,function(yt,wt,Ht){return $(ae,yt,wt,Ht)}),ae}function yD(F,$){return F==null?!0:Pi(F,$)}function jL(F,$,ae){return F==null?F:Ca(F,$,ls(ae))}function mD(F,$,ae,we){return we=typeof we=="function"?we:i,F==null?F:Ca(F,$,ls(ae),we)}function sv(F){return F==null?[]:Ff(F,Ys(F))}function hP(F){return F==null?[]:Ff(F,xu(F))}function BL(F,$,ae){return ae===i&&(ae=$,$=i),ae!==i&&(ae=ic(ae),ae=ae===ae?ae:0),$!==i&&($=ic($),$=$===$?$:0),Vs(ic(F),$,ae)}function qb(F,$,ae){return $=ih($),ae===i?(ae=$,$=0):ae=ih(ae),F=ic(F),qu(F,$,ae)}function Xb(F,$,ae){if(ae&&typeof ae!="boolean"&&Ml(F,$,ae)&&($=ae=i),ae===i&&(typeof $=="boolean"?(ae=$,$=i):typeof F=="boolean"&&(ae=F,F=i)),F===i&&$===i?(F=0,$=1):(F=ih(F),$===i?($=F,F=0):$=ih($)),F>$){var we=F;F=$,$=we}if(ae||F%1||$%1){var $e=nl();return pa(F+$e*($-F+ft("1e-"+(($e+"").length-1))),$)}return Ae(F,$)}var Kb=Up(function(F,$,ae){return $=$.toLowerCase(),F+(ae?bD($):$)});function bD(F){return qp(vo(F).toLowerCase())}function lv(F){return F=vo(F),F&&F.replace(Nn,_l).replace(ia,"")}function VL(F,$,ae){F=vo(F),$=Ri($);var we=F.length;ae=ae===i?we:Vs(Ni(ae),0,we);var $e=ae;return ae-=$.length,ae>=0&&F.slice(ae,$e)==$}function SD(F){return F=vo(F),F&&ut.test(F)?F.replace(Be,jn):F}function _D(F){return F=vo(F),F&&ci.test(F)?F.replace(Ur,"\\$&"):F}var PD=Up(function(F,$,ae){return F+(ae?"-":"")+$.toLowerCase()}),CD=Up(function(F,$,ae){return F+(ae?" ":"")+$.toLowerCase()}),pP=y_("toLowerCase");function TD(F,$,ae){F=vo(F),$=Ni($);var we=$?Bu(F):0;if(!$||we>=$)return F;var $e=($-we)/2;return Yh(un($e),ae)+F+Yh(yr($e),ae)}function xD(F,$,ae){F=vo(F),$=Ni($);var we=$?Bu(F):0;return $&&we<$?F+Yh($-we,ae):F}function Zb(F,$,ae){F=vo(F),$=Ni($);var we=$?Bu(F):0;return $&&we<$?Yh($-we,ae)+F:F}function HL(F,$,ae){return ae||$==null?$=0:$&&($=+$),Cl(vo(F).replace(Xt,""),$||0)}function UL(F,$,ae){return(ae?Ml(F,$,ae):$===i)?$=1:$=Ni($),He(vo(F),$)}function gP(){var F=arguments,$=vo(F[0]);return F.length<3?$:$.replace(F[1],F[2])}var vP=Up(function(F,$,ae){return F+(ae?"_":"")+$.toLowerCase()});function Jb(F,$,ae){return ae&&typeof ae!="number"&&Ml(F,$,ae)&&($=ae=i),ae=ae===i?I:ae>>>0,ae?(F=vo(F),F&&(typeof $=="string"||$!=null&&!Ky($))&&($=Ri($),!$&&Ma(F))?ka(ze(F),0,ae):F.split($,ae)):[]}var yP=Up(function(F,$,ae){return F+(ae?" ":"")+qp($)});function ED(F,$,ae){return F=vo(F),ae=ae==null?0:Vs(Ni(ae),0,F.length),$=Ri($),F.slice(ae,ae+$.length)==$}function mP(F,$,ae){var we=et.templateSettings;ae&&Ml(F,$,ae)&&($=i),F=vo(F),$=rv({},$,we,S_);var $e=rv({},$.imports,we.imports,S_),st=Ys($e),yt=Ff($e,st),wt,Ht,_r=0,Pr=$.interpolate||nt,Dr="__p += '",qr=ur(($.escape||nt).source+"|"+Pr.source+"|"+(Pr===wr?ue:nt).source+"|"+($.evaluate||nt).source+"|$","g"),fi="//# sourceURL="+(yn.call($,"sourceURL")?($.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++jo+"]")+`
`;F.replace(qr,function(ji,Bn,Kn,Sd,nc,_d){return Kn||(Kn=Sd),Dr+=F.slice(_r,_d).replace(_o,Pl),Bn&&(wt=!0,Dr+=`' +
__e(`+Bn+`) +
'`),nc&&(Ht=!0,Dr+=`';
`+nc+`;
__p += '`),Kn&&(Dr+=`' +
((__t = (`+Kn+`)) == null ? '' : __t) +
'`),_r=_d+ji.length,ji}),Dr+=`';
`;var Fi=yn.call($,"variable")&&$.variable;if(!Fi)Dr=`with (obj) {
`+Dr+`
}
`;else if(vt.test(Fi))throw new Nt(s);Dr=(Ht?Dr.replace(kr,""):Dr).replace(qt,"$1").replace(zt,"$1;"),Dr="function("+(Fi||"obj")+`) {
`+(Fi?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(wt?", __e = _.escape":"")+(Ht?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+Dr+`return __p
}`;var Cn=bP(function(){return fr(st,fi+"return "+Dr).apply(i,yt)});if(Cn.source=Dr,Hb(Cn))throw Cn;return Cn}function ip(F){return vo(F).toLowerCase()}function np(F){return vo(F).toUpperCase()}function op(F,$,ae){if(F=vo(F),F&&(ae||$===i))return ju(F);if(!F||!($=Ri($)))return F;var we=ze(F),$e=ze($),st=ql(we,$e),yt=jf(we,$e)+1;return ka(we,st,yt).join("")}function tm(F,$,ae){if(F=vo(F),F&&(ae||$===i))return F.slice(0,se(F)+1);if(!F||!($=Ri($)))return F;var we=ze(F),$e=jf(we,ze($))+1;return ka(we,0,$e).join("")}function rm(F,$,ae){if(F=vo(F),F&&(ae||$===i))return F.replace(Xt,"");if(!F||!($=Ri($)))return F;var we=ze(F),$e=ql(we,ze($));return ka(we,$e).join("")}function ap(F,$){var ae=w,we=L;if(ma($)){var $e="separator"in $?$.separator:$e;ae="length"in $?Ni($.length):ae,we="omission"in $?Ri($.omission):we}F=vo(F);var st=F.length;if(Ma(F)){var yt=ze(F);st=yt.length}if(ae>=st)return F;var wt=ae-Bu(we);if(wt<1)return we;var Ht=yt?ka(yt,0,wt).join(""):F.slice(0,wt);if($e===i)return Ht+we;if(yt&&(wt+=Ht.length-wt),Ky($e)){if(F.slice(wt).search($e)){var _r,Pr=Ht;for($e.global||($e=ur($e.source,vo(ar.exec($e))+"g")),$e.lastIndex=0;_r=$e.exec(Pr);)var Dr=_r.index;Ht=Ht.slice(0,Dr===i?wt:Dr)}}else if(F.indexOf(Ri($e),wt)!=wt){var qr=Ht.lastIndexOf($e);qr>-1&&(Ht=Ht.slice(0,qr))}return Ht+we}function zL(F){return F=vo(F),F&&Ge.test(F)?F.replace(jr,ye):F}var AD=Up(function(F,$,ae){return F+(ae?" ":"")+$.toUpperCase()}),qp=y_("toUpperCase");function wD(F,$,ae){return F=vo(F),$=ae?i:$,$===i?Bf(F)?Me(F):Kd(F):F.match($)||[]}var bP=at(function(F,$){try{return os(F,i,$)}catch(ae){return Hb(ae)?ae:new Nt(ae)}}),Qb=vf(function(F,$){return as($,function(ae){ae=mu(ae),ol(F,ae,Fb(F[ae],F))}),F});function OD(F){var $=F==null?0:F.length,ae=Ei();return F=$?ho(F,function(we){if(typeof we[1]!="function")throw new qn(a);return[ae(we[0]),we[1]]}):[],at(function(we){for(var $e=-1;++$e<$;){var st=F[$e];if(os(st[0],this,we))return os(st[1],this,we)}})}function WL(F){return zg(ss(F,d))}function uv(F){return function(){return F}}function eS(F,$){return F==null||F!==F?$:F}var DD=Gg(),cv=Gg(!0);function eu(F){return F}function im(F){return pd(typeof F=="function"?F:ss(F,d))}function tS(F){return Xf(ss(F,d))}function RD(F,$){return Wh(F,ss($,d))}var GL=at(function(F,$){return function(ae){return Us(ae,F,$)}}),rS=at(function(F,$){return function(ae){return Us(F,ae,$)}});function P(F,$,ae){var we=Ys($),$e=$u($,we);ae==null&&!(ma($)&&($e.length||!we.length))&&(ae=$,$=F,F=this,$e=$u($,Ys($)));var st=!(ma(ae)&&"chain"in ae)||!!ae.chain,yt=rc(F);return as($e,function(wt){var Ht=$[wt];F[wt]=Ht,yt&&(F.prototype[wt]=function(){var _r=this.__chain__;if(st||_r){var Pr=F(this.__wrapped__),Dr=Pr.__actions__=Jl(this.__actions__);return Dr.push({func:Ht,args:arguments,thisArg:F}),Pr.__chain__=_r,Pr}return Ht.apply(F,fu([this.value()],arguments))})}),F}function E(){return Ut._===this&&(Ut._=Ns),this}function M(){}function Y(F){return F=Ni(F),at(function($){return J($,F)})}var ne=mb(ho),le=mb(bc),Le=mb(If);function tt(F){return Dy(F)?hu(mu(F)):X(F)}function _t(F){return function($){return F==null?i:vu(F,$)}}var $t=bb(),hr=bb(!0);function mr(){return[]}function Kt(){return!1}function tr(){return{}}function ri(){return""}function Oi(){return!0}function Oo(F,$){if(F=Ni(F),F<1||F>K)return[];var ae=I,we=pa(F,I);$=Ei($),F-=I;for(var $e=Fu(we,$);++ae<F;)$(ae);return $e}function Ft(F){return qi(F)?ho(F,mu):Tu(F)?[F]:Jl(D_(vo(F)))}function Dt(F){var $=++Xo;return vo(F)+$}var Yt=Py(function(F,$){return F+$},0),vr=Ty("ceil"),_i=Py(function(F,$){return F/$},1),io=Ty("floor");function ui(F){return F&&F.length?Rl(F,eu,qf):i}function cn(F,$){return F&&F.length?Rl(F,Ei($,2),qf):i}function Mn(F){return ed(F,eu)}function no(F,$){return ed(F,Ei($,2))}function sp(F){return F&&F.length?Rl(F,eu,Ao):i}function YL(F,$){return F&&F.length?Rl(F,Ei($,2),Ao):i}var Fz=Py(function(F,$){return F*$},1),jz=Ty("round"),Bz=Py(function(F,$){return F-$},0);function Vz(F){return F&&F.length?Nu(F,eu):0}function Hz(F,$){return F&&F.length?Nu(F,Ei($,2)):0}return et.after=$O,et.ary=$_,et.assign=sD,et.assignIn=Wb,et.assignInWith=rv,et.assignWith=DL,et.at=kc,et.before=q_,et.bind=Fb,et.bindAll=Qb,et.bindKey=X_,et.castArray=TL,et.chain=Vy,et.chunk=TO,et.compact=R_,et.concat=M_,et.cond=OD,et.conforms=WL,et.constant=uv,et.countBy=FO,et.create=cP,et.curry=Wy,et.curryRight=K_,et.debounce=Z_,et.defaults=lD,et.defaultsDeep=uD,et.defer=Co,et.delay=J_,et.difference=Db,et.differenceBy=xO,et.differenceWith=Jf,et.drop=us,et.dropRight=L_,et.dropRightWhile=EO,et.dropWhile=Gs,et.fill=pL,et.filter=W_,et.flatMap=Pu,et.flatMapDeep=BO,et.flatMapDepth=VO,et.flatten=oa,et.flattenDeep=bu,et.flattenDepth=Qf,et.flip=_L,et.flow=DD,et.flowRight=cv,et.fromPairs=AO,et.functions=RL,et.functionsIn=ML,et.groupBy=kb,et.initial=gL,et.intersection=Rb,et.intersectionBy=Su,et.intersectionWith=yd,et.invert=LL,et.invertBy=kL,et.invokeMap=Qg,et.iteratee=im,et.keyBy=UO,et.keys=Ys,et.keysIn=xu,et.map=Uy,et.mapKeys=NL,et.mapValues=hD,et.matches=tS,et.matchesProperty=RD,et.memoize=Gy,et.merge=iv,et.mergeWith=nv,et.method=GL,et.methodOf=rS,et.mixin=P,et.negate=jb,et.nthArg=Y,et.omit=pD,et.omitBy=FL,et.once=PL,et.orderBy=zO,et.over=ne,et.overArgs=CL,et.overEvery=le,et.overSome=Le,et.partial=tv,et.partialRight=Yp,et.partition=WO,et.pick=ov,et.pickBy=av,et.property=tt,et.propertyOf=_t,et.pull=zp,et.pullAll=mf,et.pullAllBy=F_,et.pullAllWith=j_,et.pullAt=md,et.range=$t,et.rangeRight=hr,et.rearg=Q_,et.reject=mL,et.remove=RO,et.rest=Bb,et.reverse=qh,et.sampleSize=SL,et.set=Yb,et.setWith=fP,et.shuffle=GO,et.slice=Ny,et.sortBy=Nb,et.sortedUniq=Mb,et.sortedUniqBy=IO,et.split=Jb,et.spread=eP,et.tail=vL,et.take=yL,et.takeRight=lo,et.takeRightWhile=Ho,et.takeWhile=Tn,et.tap=NO,et.throttle=Qh,et.thru=Gp,et.toArray=aD,et.toPairs=$b,et.toPairsIn=em,et.toPath=Ft,et.toPlainObject=zb,et.transform=vD,et.unary=bf,et.union=Rn,et.unionBy=Po,et.unionWith=Ju,et.uniq=Xh,et.uniqBy=Kg,et.uniqWith=B_,et.unset=yD,et.unzip=bd,et.unzipWith=xa,et.update=jL,et.updateWith=mD,et.values=sv,et.valuesIn=hP,et.without=Kh,et.words=wD,et.wrap=Yy,et.xor=Wp,et.xorBy=V_,et.xorWith=Qu,et.zip=Zg,et.zipObject=By,et.zipObjectDeep=_u,et.zipWith=H_,et.entries=$b,et.entriesIn=em,et.extend=Wb,et.extendWith=rv,P(et,et),et.add=Yt,et.attempt=bP,et.camelCase=Kb,et.capitalize=bD,et.ceil=vr,et.clamp=BL,et.clone=qO,et.cloneDeep=KO,et.cloneDeepWith=ZO,et.cloneWith=XO,et.conformsTo=xL,et.deburr=lv,et.defaultTo=eS,et.divide=_i,et.endsWith=VL,et.eq=tc,et.escape=SD,et.escapeRegExp=_D,et.every=Hy,et.find=ec,et.findIndex=k_,et.findKey=cD,et.findLast=jO,et.findLastIndex=I_,et.findLastKey=Qy,et.floor=io,et.forEach=HO,et.forEachRight=rh,et.forIn=Ic,et.forInRight=dD,et.forOwn=Gb,et.forOwnRight=nh,et.get=rp,et.gt=JO,et.gte=QO,et.has=fD,et.hasIn=dP,et.head=N_,et.identity=eu,et.includes=G_,et.indexOf=wO,et.inRange=qb,et.invoke=IL,et.isArguments=$p,et.isArray=qi,et.isArrayBuffer=tP,et.isArrayLike=Cu,et.isArrayLikeObject=Xa,et.isBoolean=$y,et.isBuffer=ep,et.isDate=eD,et.isElement=xn,et.isEmpty=rP,et.isEqual=Vb,et.isEqualWith=iP,et.isError=Hb,et.isFinite=nP,et.isFunction=rc,et.isInteger=qy,et.isLength=Ub,et.isMap=tD,et.isMatch=rD,et.isMatchWith=iD,et.isNaN=wo,et.isNative=oP,et.isNil=EL,et.isNull=ll,et.isNumber=aP,et.isObject=ma,et.isObjectLike=Na,et.isPlainObject=Xy,et.isRegExp=Ky,et.isSafeInteger=sP,et.isSet=Zy,et.isString=Jy,et.isSymbol=Tu,et.isTypedArray=tp,et.isUndefined=lP,et.isWeakMap=AL,et.isWeakSet=nD,et.join=OO,et.kebabCase=PD,et.last=aa,et.lastIndexOf=DO,et.lowerCase=CD,et.lowerFirst=pP,et.lt=wL,et.lte=oD,et.max=ui,et.maxBy=cn,et.mean=Mn,et.meanBy=no,et.min=sp,et.minBy=YL,et.stubArray=mr,et.stubFalse=Kt,et.stubObject=tr,et.stubString=ri,et.stubTrue=Oi,et.multiply=Fz,et.nth=eh,et.noConflict=E,et.noop=M,et.now=zy,et.pad=TD,et.padEnd=xD,et.padStart=Zb,et.parseInt=HL,et.random=Xb,et.reduce=Ib,et.reduceRight=Y_,et.repeat=UL,et.replace=gP,et.result=gD,et.round=jz,et.runInContext=Ve,et.sample=bL,et.size=YO,et.snakeCase=vP,et.some=ev,et.sortedIndex=Fy,et.sortedIndexBy=Xg,et.sortedIndexOf=MO,et.sortedLastIndex=LO,et.sortedLastIndexBy=jy,et.sortedLastIndexOf=kO,et.startCase=yP,et.startsWith=ED,et.subtract=Bz,et.sum=Vz,et.sumBy=Hz,et.template=mP,et.times=Oo,et.toFinite=ih,et.toInteger=Ni,et.toLength=uP,et.toLower=ip,et.toNumber=ic,et.toSafeInteger=OL,et.toString=vo,et.toUpper=np,et.trim=op,et.trimEnd=tm,et.trimStart=rm,et.truncate=ap,et.unescape=zL,et.uniqueId=Dt,et.upperCase=AD,et.upperFirst=qp,et.each=HO,et.eachRight=rh,et.first=N_,P(et,(function(){var F={};return Zl(et,function($,ae){yn.call(et.prototype,ae)||(F[ae]=$)}),F})(),{chain:!1}),et.VERSION=n,as(["bind","bindKey","curry","curryRight","partial","partialRight"],function(F){et[F].placeholder=et}),as(["drop","take"],function(F,$){$i.prototype[F]=function(ae){ae=ae===i?1:Ko(Ni(ae),0);var we=this.__filtered__&&!$?new $i(this):this.clone();return we.__filtered__?we.__takeCount__=pa(ae,we.__takeCount__):we.__views__.push({size:pa(ae,I),type:F+(we.__dir__<0?"Right":"")}),we},$i.prototype[F+"Right"]=function(ae){return this.reverse()[F](ae).reverse()}}),as(["filter","map","takeWhile"],function(F,$){var ae=$+1,we=ae==j||ae==V;$i.prototype[F]=function($e){var st=this.clone();return st.__iteratees__.push({iteratee:Ei($e,3),type:ae}),st.__filtered__=st.__filtered__||we,st}}),as(["head","last"],function(F,$){var ae="take"+($?"Right":"");$i.prototype[F]=function(){return this[ae](1).value()[0]}}),as(["initial","tail"],function(F,$){var ae="drop"+($?"":"Right");$i.prototype[F]=function(){return this.__filtered__?new $i(this):this[ae](1)}}),$i.prototype.compact=function(){return this.filter(eu)},$i.prototype.find=function(F){return this.filter(F).head()},$i.prototype.findLast=function(F){return this.reverse().find(F)},$i.prototype.invokeMap=at(function(F,$){return typeof F=="function"?new $i(this):this.map(function(ae){return Us(ae,F,$)})}),$i.prototype.reject=function(F){return this.filter(jb(Ei(F)))},$i.prototype.slice=function(F,$){F=Ni(F);var ae=this;return ae.__filtered__&&(F>0||$<0)?new $i(ae):(F<0?ae=ae.takeRight(-F):F&&(ae=ae.drop(F)),$!==i&&($=Ni($),ae=$<0?ae.dropRight(-$):ae.take($-F)),ae)},$i.prototype.takeRightWhile=function(F){return this.reverse().takeWhile(F).reverse()},$i.prototype.toArray=function(){return this.take(I)},Zl($i.prototype,function(F,$){var ae=/^(?:filter|find|map|reject)|While$/.test($),we=/^(?:head|last)$/.test($),$e=et[we?"take"+($=="last"?"Right":""):$],st=we||/^find/.test($);$e&&(et.prototype[$]=function(){var yt=this.__wrapped__,wt=we?[1]:arguments,Ht=yt instanceof $i,_r=wt[0],Pr=Ht||qi(yt),Dr=function(Bn){var Kn=$e.apply(et,fu([Bn],wt));return we&&qr?Kn[0]:Kn};Pr&&ae&&typeof _r=="function"&&_r.length!=1&&(Ht=Pr=!1);var qr=this.__chain__,fi=!!this.__actions__.length,Fi=st&&!qr,Cn=Ht&&!fi;if(!st&&Pr){yt=Cn?yt:new $i(this);var ji=F.apply(yt,wt);return ji.__actions__.push({func:Gp,args:[Dr],thisArg:i}),new Bs(ji,qr)}return Fi&&Cn?F.apply(this,wt):(ji=this.thru(Dr),Fi?we?ji.value()[0]:ji.value():ji)})}),as(["pop","push","shift","sort","splice","unshift"],function(F){var $=rl[F],ae=/^(?:push|sort|unshift)$/.test(F)?"tap":"thru",we=/^(?:pop|shift)$/.test(F);et.prototype[F]=function(){var $e=arguments;if(we&&!this.__chain__){var st=this.value();return $.apply(qi(st)?st:[],$e)}return this[ae](function(yt){return $.apply(qi(yt)?yt:[],$e)})}}),Zl($i.prototype,function(F,$){var ae=et[$];if(ae){var we=ae.name+"";yn.call(zn,we)||(zn[we]=[]),zn[we].push({name:$,func:ae})}}),zn[Yg(i,y).name]=[{name:"wrapper",func:i}],$i.prototype.clone=zu,$i.prototype.reverse=wc,$i.prototype.value=Wu,et.prototype.at=Lb,et.prototype.chain=Zh,et.prototype.commit=Cs,et.prototype.next=Jh,et.prototype.plant=th,et.prototype.reverse=U_,et.prototype.toJSON=et.prototype.valueOf=et.prototype.value=z_,et.prototype.first=et.prototype.head,Wa&&(et.prototype[Wa]=Jg),et}),lt=Ne();Jr?((Jr.exports=lt)._=lt,Yr._=lt):Ut._=lt}).call(aat)})(hN,hN.exports)),hN.exports}var lat=sat();function uat(...r){return J$(Sg(r))}const cat=G.forwardRef((r,e)=>{const[i,n]=G.useState(!1),t=G.useRef(null),[o,a]=G.useState(""),s=G.useCallback(lat.debounce(async p=>{t.current&&t.current.abort();const g=new AbortController;t.current=g;try{r.setSearchValue(p)}catch(v){v.name!=="AbortError"&&console.error("Search error:",v)}finally{n(!1)}},300),[r.setSearchValue]);G.useEffect(()=>{r.forceSearchValueChange!==void 0&&a("")},[r.forceSearchValueChange]),G.useEffect(()=>(o!==void 0&&(n(!0),s(o)),()=>{s.cancel(),t.current&&t.current.abort()}),[o]);const l=p=>{const g=p.target.value;a(g)},u=p=>{p.key==="Backspace"&&o===""&&r.termFilters.length>0&&c(r.termFilters.length-1),r.onKeyDown&&r.onKeyDown(p)},c=p=>{r.deleteTerm(p)},d=()=>R.jsxs(Vje,{delayDuration:0,children:[R.jsx(Hje,{asChild:!0,children:R.jsx("button",{type:"button",className:"p-0 m-0 border-0 bg-transparent cursor-pointer hover:opacity-70 focus:outline-none flex items-center mx-1","aria-label":"Search help",children:R.jsx(Uye,{size:20,className:"text-gray-500 dark:text-gray-400"})})}),R.jsx(Uje,{children:R.jsxs(zje,{side:"bottom",sideOffset:8,align:"end",className:"z-[10002] w-80 rounded-lg bg-white dark:bg-neutral-800 text-gray-900 dark:text-gray-100 shadow-lg ring-1 ring-black/5 dark:ring-white/10 p-4 text-sm",children:[R.jsx("div",{className:"font-semibold text-gray-900 dark:text-gray-100 mb-2",children:"Search Help"}),R.jsxs("ul",{className:"list-disc pl-4 space-y-1 text-gray-700 dark:text-gray-300",children:[R.jsx("li",{children:"Start writing to get suggestions and filter signals"}),R.jsx("li",{children:"Pick a suggestion to create a filter"}),R.jsx("li",{children:"'Escape' to clear suggestions"}),R.jsx("li",{children:"You can create any number of filters"}),R.jsx("li",{children:"Exact match will force terms to match exact"}),R.jsxs("li",{children:["Combine with ",R.jsx("b",{children:"and"})," to force all terms to match - ",R.jsx("b",{children:"or"})," to match any term."]}),R.jsx("li",{children:"Choose which fields to search in"})]}),R.jsx("hr",{className:"my-2 border-gray-200 dark:border-neutral-700"}),R.jsx("ul",{className:"list-disc pl-4 text-gray-600 dark:text-gray-400",children:R.jsx("li",{children:"Using suggestions is more performant than free text search"})})]})})]}),f=()=>R.jsx(R.Fragment,{children:i?R.jsx(zye,{size:18,className:"animate-spin text-gray-500 dark:text-gray-400"}):R.jsx(Wye,{size:18,className:"text-gray-500 dark:text-gray-400"})}),h=()=>R.jsxs(R.Fragment,{children:[r.termFilters.map((p,g)=>R.jsxs("div",{className:"bg-blue-100 dark:bg-slate-700/90 text-gray-800 dark:text-gray-200 border border-blue-300 dark:border-slate-600 pl-3 pr-2 py-1 flex items-center gap-1 flex-grow-0 my-0.5 rounded-lg",children:[R.jsx("input",{onChange:()=>r.toggleTerm(g),type:"checkbox",checked:p.enabled,className:"w-3.5 h-3.5 shrink-0 rounded border-gray-300 dark:border-neutral-600 text-blue-600 focus:ring-blue-500 cursor-pointer bg-white dark:bg-neutral-700","aria-hidden":!0}),R.jsxs("span",{className:"flex items-center gap-1.5 py-0.5 px-1 text-sm whitespace-nowrap leading-none",children:[r.getFieldLabel(p.term.fields[0]),": ",p.term.term,R.jsx("button",{type:"button",onClick:()=>c(g),className:"flex items-center justify-center p-0 border-0 bg-transparent cursor-pointer hover:text-red-500 dark:hover:text-red-400 rounded","aria-label":"Remove filter",children:R.jsx(IN,{size:16,className:"shrink-0"})})]})]},g)),R.jsx("div",{className:"inline-flex min-w-[140px] flex-1",children:R.jsx("input",{ref:e,type:"text",className:"w-full px-0 border-0 bg-transparent focus:outline-none focus:ring-0 text-gray-900 dark:text-gray-100 placeholder-gray-400 dark:placeholder-gray-500",autoFocus:r.autoFocus,placeholder:r.termFilters.length>0?"Search...":r.placeHolder??"Search...",value:o,onChange:l,onKeyDown:u})})]});return R.jsxs("div",{className:uat("flex flex-row justify-start content-center w-full text-gray-900 dark:text-gray-100 border border-gray-300 dark:border-neutral-600",r.className),children:[R.jsx("div",{className:"flex items-center justify-center ps-3 pe-1",children:f()}),R.jsx("div",{className:"flex-1 py-1 px-2 flex flex-row flex-wrap items-center gap-1 min-h-[38px]",children:h()}),R.jsx("div",{className:"flex items-center justify-center px-2",children:d()})]})});var yz="Collapsible",[dat]=$S(yz),[fat,p7]=dat(yz),T1e=G.forwardRef((r,e)=>{const{__scopeCollapsible:i,open:n,defaultOpen:t,disabled:o,onOpenChange:a,...s}=r,[l,u]=_M({prop:n,defaultProp:t??!1,onChange:a,caller:yz});return R.jsx(fat,{scope:i,disabled:o,contentId:Fv(),open:l,onOpenToggle:G.useCallback(()=>u(c=>!c),[u]),children:R.jsx(rs.div,{"data-state":v7(l),"data-disabled":o?"":void 0,...s,ref:e})})});T1e.displayName=yz;var x1e="CollapsibleTrigger",E1e=G.forwardRef((r,e)=>{const{__scopeCollapsible:i,...n}=r,t=p7(x1e,i);return R.jsx(rs.button,{type:"button","aria-controls":t.contentId,"aria-expanded":t.open||!1,"data-state":v7(t.open),"data-disabled":t.disabled?"":void 0,disabled:t.disabled,...n,ref:e,onClick:an(r.onClick,t.onOpenToggle)})});E1e.displayName=x1e;var g7="CollapsibleContent",hat=G.forwardRef((r,e)=>{const{forceMount:i,...n}=r,t=p7(g7,r.__scopeCollapsible);return R.jsx(wg,{present:i||t.open,children:({present:o})=>R.jsx(pat,{...n,ref:e,present:o})})});hat.displayName=g7;var pat=G.forwardRef((r,e)=>{const{__scopeCollapsible:i,present:n,children:t,...o}=r,a=p7(g7,i),[s,l]=G.useState(n),u=G.useRef(null),c=zl(e,u),d=G.useRef(0),f=d.current,h=G.useRef(0),p=h.current,g=a.open||s,v=G.useRef(g),y=G.useRef(void 0);return G.useEffect(()=>{const m=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(m)},[]),$0(()=>{const m=u.current;if(m){y.current=y.current||{transitionDuration:m.style.transitionDuration,animationName:m.style.animationName},m.style.transitionDuration="0s",m.style.animationName="none";const b=m.getBoundingClientRect();d.current=b.height,h.current=b.width,v.current||(m.style.transitionDuration=y.current.transitionDuration,m.style.animationName=y.current.animationName),l(n)}},[a.open,n]),R.jsx(rs.div,{"data-state":v7(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!g,...o,ref:c,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":p?`${p}px`:void 0,...r.style},children:g&&t})});function v7(r){return r?"open":"closed"}var gat=T1e,vat=E1e,u6={exports:{}};/**
 * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.9
 * Copyright (C) 2020 Oliver Nightingale
 * @license MIT
 */var gge;function yat(){return gge||(gge=1,(function(r,e){(function(){var i=function(n){var t=new i.Builder;return t.pipeline.add(i.trimmer,i.stopWordFilter,i.stemmer),t.searchPipeline.add(i.stemmer),n.call(t,t),t.build()};i.version="2.3.9";/*!
 * lunr.utils
 * Copyright (C) 2020 Oliver Nightingale
 */i.utils={},i.utils.warn=(function(n){return function(t){n.console&&console.warn&&console.warn(t)}})(this),i.utils.asString=function(n){return n==null?"":n.toString()},i.utils.clone=function(n){if(n==null)return n;for(var t=Object.create(null),o=Object.keys(n),a=0;a<o.length;a++){var s=o[a],l=n[s];if(Array.isArray(l)){t[s]=l.slice();continue}if(typeof l=="string"||typeof l=="number"||typeof l=="boolean"){t[s]=l;continue}throw new TypeError("clone is not deep and does not support nested objects")}return t},i.FieldRef=function(n,t,o){this.docRef=n,this.fieldName=t,this._stringValue=o},i.FieldRef.joiner="/",i.FieldRef.fromString=function(n){var t=n.indexOf(i.FieldRef.joiner);if(t===-1)throw"malformed field ref string";var o=n.slice(0,t),a=n.slice(t+1);return new i.FieldRef(a,o,n)},i.FieldRef.prototype.toString=function(){return this._stringValue==null&&(this._stringValue=this.fieldName+i.FieldRef.joiner+this.docRef),this._stringValue};/*!
 * lunr.Set
 * Copyright (C) 2020 Oliver Nightingale
 */i.Set=function(n){if(this.elements=Object.create(null),n){this.length=n.length;for(var t=0;t<this.length;t++)this.elements[n[t]]=!0}else this.length=0},i.Set.complete={intersect:function(n){return n},union:function(){return this},contains:function(){return!0}},i.Set.empty={intersect:function(){return this},union:function(n){return n},contains:function(){return!1}},i.Set.prototype.contains=function(n){return!!this.elements[n]},i.Set.prototype.intersect=function(n){var t,o,a,s=[];if(n===i.Set.complete)return this;if(n===i.Set.empty)return n;this.length<n.length?(t=this,o=n):(t=n,o=this),a=Object.keys(t.elements);for(var l=0;l<a.length;l++){var u=a[l];u in o.elements&&s.push(u)}return new i.Set(s)},i.Set.prototype.union=function(n){return n===i.Set.complete?i.Set.complete:n===i.Set.empty?this:new i.Set(Object.keys(this.elements).concat(Object.keys(n.elements)))},i.idf=function(n,t){var o=0;for(var a in n)a!="_index"&&(o+=Object.keys(n[a]).length);var s=(t-o+.5)/(o+.5);return Math.log(1+Math.abs(s))},i.Token=function(n,t){this.str=n||"",this.metadata=t||{}},i.Token.prototype.toString=function(){return this.str},i.Token.prototype.update=function(n){return this.str=n(this.str,this.metadata),this},i.Token.prototype.clone=function(n){return n=n||function(t){return t},new i.Token(n(this.str,this.metadata),this.metadata)};/*!
 * lunr.tokenizer
 * Copyright (C) 2020 Oliver Nightingale
 */i.tokenizer=function(n,t){if(n==null||n==null)return[];if(Array.isArray(n))return n.map(function(h){return new i.Token(i.utils.asString(h).toLowerCase(),i.utils.clone(t))});for(var o=n.toString().toLowerCase(),a=o.length,s=[],l=0,u=0;l<=a;l++){var c=o.charAt(l),d=l-u;if(c.match(i.tokenizer.separator)||l==a){if(d>0){var f=i.utils.clone(t)||{};f.position=[u,d],f.index=s.length,s.push(new i.Token(o.slice(u,l),f))}u=l+1}}return s},i.tokenizer.separator=/[\s\-]+/;/*!
 * lunr.Pipeline
 * Copyright (C) 2020 Oliver Nightingale
 */i.Pipeline=function(){this._stack=[]},i.Pipeline.registeredFunctions=Object.create(null),i.Pipeline.registerFunction=function(n,t){t in this.registeredFunctions&&i.utils.warn("Overwriting existing registered function: "+t),n.label=t,i.Pipeline.registeredFunctions[n.label]=n},i.Pipeline.warnIfFunctionNotRegistered=function(n){var t=n.label&&n.label in this.registeredFunctions;t||i.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index.
`,n)},i.Pipeline.load=function(n){var t=new i.Pipeline;return n.forEach(function(o){var a=i.Pipeline.registeredFunctions[o];if(a)t.add(a);else throw new Error("Cannot load unregistered function: "+o)}),t},i.Pipeline.prototype.add=function(){var n=Array.prototype.slice.call(arguments);n.forEach(function(t){i.Pipeline.warnIfFunctionNotRegistered(t),this._stack.push(t)},this)},i.Pipeline.prototype.after=function(n,t){i.Pipeline.warnIfFunctionNotRegistered(t);var o=this._stack.indexOf(n);if(o==-1)throw new Error("Cannot find existingFn");o=o+1,this._stack.splice(o,0,t)},i.Pipeline.prototype.before=function(n,t){i.Pipeline.warnIfFunctionNotRegistered(t);var o=this._stack.indexOf(n);if(o==-1)throw new Error("Cannot find existingFn");this._stack.splice(o,0,t)},i.Pipeline.prototype.remove=function(n){var t=this._stack.indexOf(n);t!=-1&&this._stack.splice(t,1)},i.Pipeline.prototype.run=function(n){for(var t=this._stack.length,o=0;o<t;o++){for(var a=this._stack[o],s=[],l=0;l<n.length;l++){var u=a(n[l],l,n);if(!(u==null||u===""))if(Array.isArray(u))for(var c=0;c<u.length;c++)s.push(u[c]);else s.push(u)}n=s}return n},i.Pipeline.prototype.runString=function(n,t){var o=new i.Token(n,t);return this.run([o]).map(function(a){return a.toString()})},i.Pipeline.prototype.reset=function(){this._stack=[]},i.Pipeline.prototype.toJSON=function(){return this._stack.map(function(n){return i.Pipeline.warnIfFunctionNotRegistered(n),n.label})};/*!
 * lunr.Vector
 * Copyright (C) 2020 Oliver Nightingale
 */i.Vector=function(n){this._magnitude=0,this.elements=n||[]},i.Vector.prototype.positionForIndex=function(n){if(this.elements.length==0)return 0;for(var t=0,o=this.elements.length/2,a=o-t,s=Math.floor(a/2),l=this.elements[s*2];a>1&&(l<n&&(t=s),l>n&&(o=s),l!=n);)a=o-t,s=t+Math.floor(a/2),l=this.elements[s*2];if(l==n||l>n)return s*2;if(l<n)return(s+1)*2},i.Vector.prototype.insert=function(n,t){this.upsert(n,t,function(){throw"duplicate index"})},i.Vector.prototype.upsert=function(n,t,o){this._magnitude=0;var a=this.positionForIndex(n);this.elements[a]==n?this.elements[a+1]=o(this.elements[a+1],t):this.elements.splice(a,0,n,t)},i.Vector.prototype.magnitude=function(){if(this._magnitude)return this._magnitude;for(var n=0,t=this.elements.length,o=1;o<t;o+=2){var a=this.elements[o];n+=a*a}return this._magnitude=Math.sqrt(n)},i.Vector.prototype.dot=function(n){for(var t=0,o=this.elements,a=n.elements,s=o.length,l=a.length,u=0,c=0,d=0,f=0;d<s&&f<l;)u=o[d],c=a[f],u<c?d+=2:u>c?f+=2:u==c&&(t+=o[d+1]*a[f+1],d+=2,f+=2);return t},i.Vector.prototype.similarity=function(n){return this.dot(n)/this.magnitude()||0},i.Vector.prototype.toArray=function(){for(var n=new Array(this.elements.length/2),t=1,o=0;t<this.elements.length;t+=2,o++)n[o]=this.elements[t];return n},i.Vector.prototype.toJSON=function(){return this.elements};/*!
 * lunr.stemmer
 * Copyright (C) 2020 Oliver Nightingale
 * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt
 */i.stemmer=(function(){var n={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},t={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},o="[^aeiou]",a="[aeiouy]",s=o+"[^aeiouy]*",l=a+"[aeiou]*",u="^("+s+")?"+l+s,c="^("+s+")?"+l+s+"("+l+")?$",d="^("+s+")?"+l+s+l+s,f="^("+s+")?"+a,h=new RegExp(u),p=new RegExp(d),g=new RegExp(c),v=new RegExp(f),y=/^(.+?)(ss|i)es$/,m=/^(.+?)([^s])s$/,b=/^(.+?)eed$/,S=/^(.+?)(ed|ing)$/,_=/.$/,C=/(at|bl|iz)$/,T=new RegExp("([^aeiouylsz])\\1$"),x=new RegExp("^"+s+a+"[^aeiouwxy]$"),A=/^(.+?[^aeiou])y$/,w=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,L=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,k=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,D=/^(.+?)(s|t)(ion)$/,j=/^(.+?)e$/,N=/ll$/,V=new RegExp("^"+s+a+"[^aeiouwxy]$"),W=function(H){var U,I,Q,Z,ee,ie,de;if(H.length<3)return H;if(Q=H.substr(0,1),Q=="y"&&(H=Q.toUpperCase()+H.substr(1)),Z=y,ee=m,Z.test(H)?H=H.replace(Z,"$1$2"):ee.test(H)&&(H=H.replace(ee,"$1$2")),Z=b,ee=S,Z.test(H)){var pe=Z.exec(H);Z=h,Z.test(pe[1])&&(Z=_,H=H.replace(Z,""))}else if(ee.test(H)){var pe=ee.exec(H);U=pe[1],ee=v,ee.test(U)&&(H=U,ee=C,ie=T,de=x,ee.test(H)?H=H+"e":ie.test(H)?(Z=_,H=H.replace(Z,"")):de.test(H)&&(H=H+"e"))}if(Z=A,Z.test(H)){var pe=Z.exec(H);U=pe[1],H=U+"i"}if(Z=w,Z.test(H)){var pe=Z.exec(H);U=pe[1],I=pe[2],Z=h,Z.test(U)&&(H=U+n[I])}if(Z=L,Z.test(H)){var pe=Z.exec(H);U=pe[1],I=pe[2],Z=h,Z.test(U)&&(H=U+t[I])}if(Z=k,ee=D,Z.test(H)){var pe=Z.exec(H);U=pe[1],Z=p,Z.test(U)&&(H=U)}else if(ee.test(H)){var pe=ee.exec(H);U=pe[1]+pe[2],ee=p,ee.test(U)&&(H=U)}if(Z=j,Z.test(H)){var pe=Z.exec(H);U=pe[1],Z=p,ee=g,ie=V,(Z.test(U)||ee.test(U)&&!ie.test(U))&&(H=U)}return Z=N,ee=p,Z.test(H)&&ee.test(H)&&(Z=_,H=H.replace(Z,"")),Q=="y"&&(H=Q.toLowerCase()+H.substr(1)),H};return function(K){return K.update(W)}})(),i.Pipeline.registerFunction(i.stemmer,"stemmer");/*!
 * lunr.stopWordFilter
 * Copyright (C) 2020 Oliver Nightingale
 */i.generateStopWordFilter=function(n){var t=n.reduce(function(o,a){return o[a]=a,o},{});return function(o){if(o&&t[o.toString()]!==o.toString())return o}},i.stopWordFilter=i.generateStopWordFilter(["a","able","about","across","after","all","almost","also","am","among","an","and","any","are","as","at","be","because","been","but","by","can","cannot","could","dear","did","do","does","either","else","ever","every","for","from","get","got","had","has","have","he","her","hers","him","his","how","however","i","if","in","into","is","it","its","just","least","let","like","likely","may","me","might","most","must","my","neither","no","nor","not","of","off","often","on","only","or","other","our","own","rather","said","say","says","she","should","since","so","some","than","that","the","their","them","then","there","these","they","this","tis","to","too","twas","us","wants","was","we","were","what","when","where","which","while","who","whom","why","will","with","would","yet","you","your"]),i.Pipeline.registerFunction(i.stopWordFilter,"stopWordFilter");/*!
 * lunr.trimmer
 * Copyright (C) 2020 Oliver Nightingale
 */i.trimmer=function(n){return n.update(function(t){return t.replace(/^\W+/,"").replace(/\W+$/,"")})},i.Pipeline.registerFunction(i.trimmer,"trimmer");/*!
 * lunr.TokenSet
 * Copyright (C) 2020 Oliver Nightingale
 */i.TokenSet=function(){this.final=!1,this.edges={},this.id=i.TokenSet._nextId,i.TokenSet._nextId+=1},i.TokenSet._nextId=1,i.TokenSet.fromArray=function(n){for(var t=new i.TokenSet.Builder,o=0,a=n.length;o<a;o++)t.insert(n[o]);return t.finish(),t.root},i.TokenSet.fromClause=function(n){return"editDistance"in n?i.TokenSet.fromFuzzyString(n.term,n.editDistance):i.TokenSet.fromString(n.term)},i.TokenSet.fromFuzzyString=function(n,t){for(var o=new i.TokenSet,a=[{node:o,editsRemaining:t,str:n}];a.length;){var s=a.pop();if(s.str.length>0){var l=s.str.charAt(0),u;l in s.node.edges?u=s.node.edges[l]:(u=new i.TokenSet,s.node.edges[l]=u),s.str.length==1&&(u.final=!0),a.push({node:u,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var c=s.node.edges["*"];else{var c=new i.TokenSet;s.node.edges["*"]=c}if(s.str.length==0&&(c.final=!0),a.push({node:c,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&a.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var d=s.node.edges["*"];else{var d=new i.TokenSet;s.node.edges["*"]=d}s.str.length==1&&(d.final=!0),a.push({node:d,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var f=s.str.charAt(0),h=s.str.charAt(1),p;h in s.node.edges?p=s.node.edges[h]:(p=new i.TokenSet,s.node.edges[h]=p),s.str.length==1&&(p.final=!0),a.push({node:p,editsRemaining:s.editsRemaining-1,str:f+s.str.slice(2)})}}}return o},i.TokenSet.fromString=function(n){for(var t=new i.TokenSet,o=t,a=0,s=n.length;a<s;a++){var l=n[a],u=a==s-1;if(l=="*")t.edges[l]=t,t.final=u;else{var c=new i.TokenSet;c.final=u,t.edges[l]=c,t=c}}return o},i.TokenSet.prototype.toArray=function(){for(var n=[],t=[{prefix:"",node:this}];t.length;){var o=t.pop(),a=Object.keys(o.node.edges),s=a.length;o.node.final&&(o.prefix.charAt(0),n.push(o.prefix));for(var l=0;l<s;l++){var u=a[l];t.push({prefix:o.prefix.concat(u),node:o.node.edges[u]})}}return n},i.TokenSet.prototype.toString=function(){if(this._str)return this._str;for(var n=this.final?"1":"0",t=Object.keys(this.edges).sort(),o=t.length,a=0;a<o;a++){var s=t[a],l=this.edges[s];n=n+s+l.id}return n},i.TokenSet.prototype.intersect=function(n){for(var t=new i.TokenSet,o=void 0,a=[{qNode:n,output:t,node:this}];a.length;){o=a.pop();for(var s=Object.keys(o.qNode.edges),l=s.length,u=Object.keys(o.node.edges),c=u.length,d=0;d<l;d++)for(var f=s[d],h=0;h<c;h++){var p=u[h];if(p==f||f=="*"){var g=o.node.edges[p],v=o.qNode.edges[f],y=g.final&&v.final,m=void 0;p in o.output.edges?(m=o.output.edges[p],m.final=m.final||y):(m=new i.TokenSet,m.final=y,o.output.edges[p]=m),a.push({qNode:v,output:m,node:g})}}}return t},i.TokenSet.Builder=function(){this.previousWord="",this.root=new i.TokenSet,this.uncheckedNodes=[],this.minimizedNodes={}},i.TokenSet.Builder.prototype.insert=function(n){var t,o=0;if(n<this.previousWord)throw new Error("Out of order word insertion");for(var a=0;a<n.length&&a<this.previousWord.length&&n[a]==this.previousWord[a];a++)o++;this.minimize(o),this.uncheckedNodes.length==0?t=this.root:t=this.uncheckedNodes[this.uncheckedNodes.length-1].child;for(var a=o;a<n.length;a++){var s=new i.TokenSet,l=n[a];t.edges[l]=s,this.uncheckedNodes.push({parent:t,char:l,child:s}),t=s}t.final=!0,this.previousWord=n},i.TokenSet.Builder.prototype.finish=function(){this.minimize(0)},i.TokenSet.Builder.prototype.minimize=function(n){for(var t=this.uncheckedNodes.length-1;t>=n;t--){var o=this.uncheckedNodes[t],a=o.child.toString();a in this.minimizedNodes?o.parent.edges[o.char]=this.minimizedNodes[a]:(o.child._str=a,this.minimizedNodes[a]=o.child),this.uncheckedNodes.pop()}};/*!
 * lunr.Index
 * Copyright (C) 2020 Oliver Nightingale
 */i.Index=function(n){this.invertedIndex=n.invertedIndex,this.fieldVectors=n.fieldVectors,this.tokenSet=n.tokenSet,this.fields=n.fields,this.pipeline=n.pipeline},i.Index.prototype.search=function(n){return this.query(function(t){var o=new i.QueryParser(n,t);o.parse()})},i.Index.prototype.query=function(n){for(var t=new i.Query(this.fields),o=Object.create(null),a=Object.create(null),s=Object.create(null),l=Object.create(null),u=Object.create(null),c=0;c<this.fields.length;c++)a[this.fields[c]]=new i.Vector;n.call(t,t);for(var c=0;c<t.clauses.length;c++){var d=t.clauses[c],f=null,h=i.Set.empty;d.usePipeline?f=this.pipeline.runString(d.term,{fields:d.fields}):f=[d.term];for(var p=0;p<f.length;p++){var g=f[p];d.term=g;var v=i.TokenSet.fromClause(d),y=this.tokenSet.intersect(v).toArray();if(y.length===0&&d.presence===i.Query.presence.REQUIRED){for(var m=0;m<d.fields.length;m++){var b=d.fields[m];l[b]=i.Set.empty}break}for(var S=0;S<y.length;S++)for(var _=y[S],C=this.invertedIndex[_],T=C._index,m=0;m<d.fields.length;m++){var b=d.fields[m],x=C[b],A=Object.keys(x),w=_+"/"+b,L=new i.Set(A);if(d.presence==i.Query.presence.REQUIRED&&(h=h.union(L),l[b]===void 0&&(l[b]=i.Set.complete)),d.presence==i.Query.presence.PROHIBITED){u[b]===void 0&&(u[b]=i.Set.empty),u[b]=u[b].union(L);continue}if(a[b].upsert(T,d.boost,function(Pe,Ee){return Pe+Ee}),!s[w]){for(var k=0;k<A.length;k++){var D=A[k],j=new i.FieldRef(D,b),N=x[D],V;(V=o[j])===void 0?o[j]=new i.MatchData(_,b,N):V.add(_,b,N)}s[w]=!0}}}if(d.presence===i.Query.presence.REQUIRED)for(var m=0;m<d.fields.length;m++){var b=d.fields[m];l[b]=l[b].intersect(h)}}for(var W=i.Set.complete,K=i.Set.empty,c=0;c<this.fields.length;c++){var b=this.fields[c];l[b]&&(W=W.intersect(l[b])),u[b]&&(K=K.union(u[b]))}var H=Object.keys(o),U=[],I=Object.create(null);if(t.isNegated()){H=Object.keys(this.fieldVectors);for(var c=0;c<H.length;c++){var j=H[c],Q=i.FieldRef.fromString(j);o[j]=new i.MatchData}}for(var c=0;c<H.length;c++){var Q=i.FieldRef.fromString(H[c]),Z=Q.docRef;if(W.contains(Z)&&!K.contains(Z)){var ee=this.fieldVectors[Q],ie=a[Q.fieldName].similarity(ee),de;if((de=I[Z])!==void 0)de.score+=ie,de.matchData.combine(o[Q]);else{var pe={ref:Z,score:ie,matchData:o[Q]};I[Z]=pe,U.push(pe)}}}return U.sort(function(_e,Te){return Te.score-_e.score})},i.Index.prototype.toJSON=function(){var n=Object.keys(this.invertedIndex).sort().map(function(o){return[o,this.invertedIndex[o]]},this),t=Object.keys(this.fieldVectors).map(function(o){return[o,this.fieldVectors[o].toJSON()]},this);return{version:i.version,fields:this.fields,fieldVectors:t,invertedIndex:n,pipeline:this.pipeline.toJSON()}},i.Index.load=function(n){var t={},o={},a=n.fieldVectors,s=Object.create(null),l=n.invertedIndex,u=new i.TokenSet.Builder,c=i.Pipeline.load(n.pipeline);n.version!=i.version&&i.utils.warn("Version mismatch when loading serialised index. Current version of lunr '"+i.version+"' does not match serialized index '"+n.version+"'");for(var d=0;d<a.length;d++){var f=a[d],h=f[0],p=f[1];o[h]=new i.Vector(p)}for(var d=0;d<l.length;d++){var f=l[d],g=f[0],v=f[1];u.insert(g),s[g]=v}return u.finish(),t.fields=n.fields,t.fieldVectors=o,t.invertedIndex=s,t.tokenSet=u.root,t.pipeline=c,new i.Index(t)};/*!
 * lunr.Builder
 * Copyright (C) 2020 Oliver Nightingale
 */i.Builder=function(){this._ref="id",this._fields=Object.create(null),this._documents=Object.create(null),this.invertedIndex=Object.create(null),this.fieldTermFrequencies={},this.fieldLengths={},this.tokenizer=i.tokenizer,this.pipeline=new i.Pipeline,this.searchPipeline=new i.Pipeline,this.documentCount=0,this._b=.75,this._k1=1.2,this.termIndex=0,this.metadataWhitelist=[]},i.Builder.prototype.ref=function(n){this._ref=n},i.Builder.prototype.field=function(n,t){if(/\//.test(n))throw new RangeError("Field '"+n+"' contains illegal character '/'");this._fields[n]=t||{}},i.Builder.prototype.b=function(n){n<0?this._b=0:n>1?this._b=1:this._b=n},i.Builder.prototype.k1=function(n){this._k1=n},i.Builder.prototype.add=function(n,t){var o=n[this._ref],a=Object.keys(this._fields);this._documents[o]=t||{},this.documentCount+=1;for(var s=0;s<a.length;s++){var l=a[s],u=this._fields[l].extractor,c=u?u(n):n[l],d=this.tokenizer(c,{fields:[l]}),f=this.pipeline.run(d),h=new i.FieldRef(o,l),p=Object.create(null);this.fieldTermFrequencies[h]=p,this.fieldLengths[h]=0,this.fieldLengths[h]+=f.length;for(var g=0;g<f.length;g++){var v=f[g];if(p[v]==null&&(p[v]=0),p[v]+=1,this.invertedIndex[v]==null){var y=Object.create(null);y._index=this.termIndex,this.termIndex+=1;for(var m=0;m<a.length;m++)y[a[m]]=Object.create(null);this.invertedIndex[v]=y}this.invertedIndex[v][l][o]==null&&(this.invertedIndex[v][l][o]=Object.create(null));for(var b=0;b<this.metadataWhitelist.length;b++){var S=this.metadataWhitelist[b],_=v.metadata[S];this.invertedIndex[v][l][o][S]==null&&(this.invertedIndex[v][l][o][S]=[]),this.invertedIndex[v][l][o][S].push(_)}}}},i.Builder.prototype.calculateAverageFieldLengths=function(){for(var n=Object.keys(this.fieldLengths),t=n.length,o={},a={},s=0;s<t;s++){var l=i.FieldRef.fromString(n[s]),u=l.fieldName;a[u]||(a[u]=0),a[u]+=1,o[u]||(o[u]=0),o[u]+=this.fieldLengths[l]}for(var c=Object.keys(this._fields),s=0;s<c.length;s++){var d=c[s];o[d]=o[d]/a[d]}this.averageFieldLength=o},i.Builder.prototype.createFieldVectors=function(){for(var n={},t=Object.keys(this.fieldTermFrequencies),o=t.length,a=Object.create(null),s=0;s<o;s++){for(var l=i.FieldRef.fromString(t[s]),u=l.fieldName,c=this.fieldLengths[l],d=new i.Vector,f=this.fieldTermFrequencies[l],h=Object.keys(f),p=h.length,g=this._fields[u].boost||1,v=this._documents[l.docRef].boost||1,y=0;y<p;y++){var m=h[y],b=f[m],S=this.invertedIndex[m]._index,_,C,T;a[m]===void 0?(_=i.idf(this.invertedIndex[m],this.documentCount),a[m]=_):_=a[m],C=_*((this._k1+1)*b)/(this._k1*(1-this._b+this._b*(c/this.averageFieldLength[u]))+b),C*=g,C*=v,T=Math.round(C*1e3)/1e3,d.insert(S,T)}n[l]=d}this.fieldVectors=n},i.Builder.prototype.createTokenSet=function(){this.tokenSet=i.TokenSet.fromArray(Object.keys(this.invertedIndex).sort())},i.Builder.prototype.build=function(){return this.calculateAverageFieldLengths(),this.createFieldVectors(),this.createTokenSet(),new i.Index({invertedIndex:this.invertedIndex,fieldVectors:this.fieldVectors,tokenSet:this.tokenSet,fields:Object.keys(this._fields),pipeline:this.searchPipeline})},i.Builder.prototype.use=function(n){var t=Array.prototype.slice.call(arguments,1);t.unshift(this),n.apply(this,t)},i.MatchData=function(n,t,o){for(var a=Object.create(null),s=Object.keys(o||{}),l=0;l<s.length;l++){var u=s[l];a[u]=o[u].slice()}this.metadata=Object.create(null),n!==void 0&&(this.metadata[n]=Object.create(null),this.metadata[n][t]=a)},i.MatchData.prototype.combine=function(n){for(var t=Object.keys(n.metadata),o=0;o<t.length;o++){var a=t[o],s=Object.keys(n.metadata[a]);this.metadata[a]==null&&(this.metadata[a]=Object.create(null));for(var l=0;l<s.length;l++){var u=s[l],c=Object.keys(n.metadata[a][u]);this.metadata[a][u]==null&&(this.metadata[a][u]=Object.create(null));for(var d=0;d<c.length;d++){var f=c[d];this.metadata[a][u][f]==null?this.metadata[a][u][f]=n.metadata[a][u][f]:this.metadata[a][u][f]=this.metadata[a][u][f].concat(n.metadata[a][u][f])}}}},i.MatchData.prototype.add=function(n,t,o){if(!(n in this.metadata)){this.metadata[n]=Object.create(null),this.metadata[n][t]=o;return}if(!(t in this.metadata[n])){this.metadata[n][t]=o;return}for(var a=Object.keys(o),s=0;s<a.length;s++){var l=a[s];l in this.metadata[n][t]?this.metadata[n][t][l]=this.metadata[n][t][l].concat(o[l]):this.metadata[n][t][l]=o[l]}},i.Query=function(n){this.clauses=[],this.allFields=n},i.Query.wildcard=new String("*"),i.Query.wildcard.NONE=0,i.Query.wildcard.LEADING=1,i.Query.wildcard.TRAILING=2,i.Query.presence={OPTIONAL:1,REQUIRED:2,PROHIBITED:3},i.Query.prototype.clause=function(n){return"fields"in n||(n.fields=this.allFields),"boost"in n||(n.boost=1),"usePipeline"in n||(n.usePipeline=!0),"wildcard"in n||(n.wildcard=i.Query.wildcard.NONE),n.wildcard&i.Query.wildcard.LEADING&&n.term.charAt(0)!=i.Query.wildcard&&(n.term="*"+n.term),n.wildcard&i.Query.wildcard.TRAILING&&n.term.slice(-1)!=i.Query.wildcard&&(n.term=""+n.term+"*"),"presence"in n||(n.presence=i.Query.presence.OPTIONAL),this.clauses.push(n),this},i.Query.prototype.isNegated=function(){for(var n=0;n<this.clauses.length;n++)if(this.clauses[n].presence!=i.Query.presence.PROHIBITED)return!1;return!0},i.Query.prototype.term=function(n,t){if(Array.isArray(n))return n.forEach(function(a){this.term(a,i.utils.clone(t))},this),this;var o=t||{};return o.term=n.toString(),this.clause(o),this},i.QueryParseError=function(n,t,o){this.name="QueryParseError",this.message=n,this.start=t,this.end=o},i.QueryParseError.prototype=new Error,i.QueryLexer=function(n){this.lexemes=[],this.str=n,this.length=n.length,this.pos=0,this.start=0,this.escapeCharPositions=[]},i.QueryLexer.prototype.run=function(){for(var n=i.QueryLexer.lexText;n;)n=n(this)},i.QueryLexer.prototype.sliceString=function(){for(var n=[],t=this.start,o=this.pos,a=0;a<this.escapeCharPositions.length;a++)o=this.escapeCharPositions[a],n.push(this.str.slice(t,o)),t=o+1;return n.push(this.str.slice(t,this.pos)),this.escapeCharPositions.length=0,n.join("")},i.QueryLexer.prototype.emit=function(n){this.lexemes.push({type:n,str:this.sliceString(),start:this.start,end:this.pos}),this.start=this.pos},i.QueryLexer.prototype.escapeCharacter=function(){this.escapeCharPositions.push(this.pos-1),this.pos+=1},i.QueryLexer.prototype.next=function(){if(this.pos>=this.length)return i.QueryLexer.EOS;var n=this.str.charAt(this.pos);return this.pos+=1,n},i.QueryLexer.prototype.width=function(){return this.pos-this.start},i.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},i.QueryLexer.prototype.backup=function(){this.pos-=1},i.QueryLexer.prototype.acceptDigitRun=function(){var n,t;do n=this.next(),t=n.charCodeAt(0);while(t>47&&t<58);n!=i.QueryLexer.EOS&&this.backup()},i.QueryLexer.prototype.more=function(){return this.pos<this.length},i.QueryLexer.EOS="EOS",i.QueryLexer.FIELD="FIELD",i.QueryLexer.TERM="TERM",i.QueryLexer.EDIT_DISTANCE="EDIT_DISTANCE",i.QueryLexer.BOOST="BOOST",i.QueryLexer.PRESENCE="PRESENCE",i.QueryLexer.lexField=function(n){return n.backup(),n.emit(i.QueryLexer.FIELD),n.ignore(),i.QueryLexer.lexText},i.QueryLexer.lexTerm=function(n){if(n.width()>1&&(n.backup(),n.emit(i.QueryLexer.TERM)),n.ignore(),n.more())return i.QueryLexer.lexText},i.QueryLexer.lexEditDistance=function(n){return n.ignore(),n.acceptDigitRun(),n.emit(i.QueryLexer.EDIT_DISTANCE),i.QueryLexer.lexText},i.QueryLexer.lexBoost=function(n){return n.ignore(),n.acceptDigitRun(),n.emit(i.QueryLexer.BOOST),i.QueryLexer.lexText},i.QueryLexer.lexEOS=function(n){n.width()>0&&n.emit(i.QueryLexer.TERM)},i.QueryLexer.termSeparator=i.tokenizer.separator,i.QueryLexer.lexText=function(n){for(;;){var t=n.next();if(t==i.QueryLexer.EOS)return i.QueryLexer.lexEOS;if(t.charCodeAt(0)==92){n.escapeCharacter();continue}if(t==":")return i.QueryLexer.lexField;if(t=="~")return n.backup(),n.width()>0&&n.emit(i.QueryLexer.TERM),i.QueryLexer.lexEditDistance;if(t=="^")return n.backup(),n.width()>0&&n.emit(i.QueryLexer.TERM),i.QueryLexer.lexBoost;if(t=="+"&&n.width()===1||t=="-"&&n.width()===1)return n.emit(i.QueryLexer.PRESENCE),i.QueryLexer.lexText;if(t.match(i.QueryLexer.termSeparator))return i.QueryLexer.lexTerm}},i.QueryParser=function(n,t){this.lexer=new i.QueryLexer(n),this.query=t,this.currentClause={},this.lexemeIdx=0},i.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var n=i.QueryParser.parseClause;n;)n=n(this);return this.query},i.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},i.QueryParser.prototype.consumeLexeme=function(){var n=this.peekLexeme();return this.lexemeIdx+=1,n},i.QueryParser.prototype.nextClause=function(){var n=this.currentClause;this.query.clause(n),this.currentClause={}},i.QueryParser.parseClause=function(n){var t=n.peekLexeme();if(t!=null)switch(t.type){case i.QueryLexer.PRESENCE:return i.QueryParser.parsePresence;case i.QueryLexer.FIELD:return i.QueryParser.parseField;case i.QueryLexer.TERM:return i.QueryParser.parseTerm;default:var o="expected either a field or a term, found "+t.type;throw t.str.length>=1&&(o+=" with value '"+t.str+"'"),new i.QueryParseError(o,t.start,t.end)}},i.QueryParser.parsePresence=function(n){var t=n.consumeLexeme();if(t!=null){switch(t.str){case"-":n.currentClause.presence=i.Query.presence.PROHIBITED;break;case"+":n.currentClause.presence=i.Query.presence.REQUIRED;break;default:var o="unrecognised presence operator'"+t.str+"'";throw new i.QueryParseError(o,t.start,t.end)}var a=n.peekLexeme();if(a==null){var o="expecting term or field, found nothing";throw new i.QueryParseError(o,t.start,t.end)}switch(a.type){case i.QueryLexer.FIELD:return i.QueryParser.parseField;case i.QueryLexer.TERM:return i.QueryParser.parseTerm;default:var o="expecting term or field, found '"+a.type+"'";throw new i.QueryParseError(o,a.start,a.end)}}},i.QueryParser.parseField=function(n){var t=n.consumeLexeme();if(t!=null){if(n.query.allFields.indexOf(t.str)==-1){var o=n.query.allFields.map(function(l){return"'"+l+"'"}).join(", "),a="unrecognised field '"+t.str+"', possible fields: "+o;throw new i.QueryParseError(a,t.start,t.end)}n.currentClause.fields=[t.str];var s=n.peekLexeme();if(s==null){var a="expecting term, found nothing";throw new i.QueryParseError(a,t.start,t.end)}switch(s.type){case i.QueryLexer.TERM:return i.QueryParser.parseTerm;default:var a="expecting term, found '"+s.type+"'";throw new i.QueryParseError(a,s.start,s.end)}}},i.QueryParser.parseTerm=function(n){var t=n.consumeLexeme();if(t!=null){n.currentClause.term=t.str.toLowerCase(),t.str.indexOf("*")!=-1&&(n.currentClause.usePipeline=!1);var o=n.peekLexeme();if(o==null){n.nextClause();return}switch(o.type){case i.QueryLexer.TERM:return n.nextClause(),i.QueryParser.parseTerm;case i.QueryLexer.FIELD:return n.nextClause(),i.QueryParser.parseField;case i.QueryLexer.EDIT_DISTANCE:return i.QueryParser.parseEditDistance;case i.QueryLexer.BOOST:return i.QueryParser.parseBoost;case i.QueryLexer.PRESENCE:return n.nextClause(),i.QueryParser.parsePresence;default:var a="Unexpected lexeme type '"+o.type+"'";throw new i.QueryParseError(a,o.start,o.end)}}},i.QueryParser.parseEditDistance=function(n){var t=n.consumeLexeme();if(t!=null){var o=parseInt(t.str,10);if(isNaN(o)){var a="edit distance must be numeric";throw new i.QueryParseError(a,t.start,t.end)}n.currentClause.editDistance=o;var s=n.peekLexeme();if(s==null){n.nextClause();return}switch(s.type){case i.QueryLexer.TERM:return n.nextClause(),i.QueryParser.parseTerm;case i.QueryLexer.FIELD:return n.nextClause(),i.QueryParser.parseField;case i.QueryLexer.EDIT_DISTANCE:return i.QueryParser.parseEditDistance;case i.QueryLexer.BOOST:return i.QueryParser.parseBoost;case i.QueryLexer.PRESENCE:return n.nextClause(),i.QueryParser.parsePresence;default:var a="Unexpected lexeme type '"+s.type+"'";throw new i.QueryParseError(a,s.start,s.end)}}},i.QueryParser.parseBoost=function(n){var t=n.consumeLexeme();if(t!=null){var o=parseInt(t.str,10);if(isNaN(o)){var a="boost must be numeric";throw new i.QueryParseError(a,t.start,t.end)}n.currentClause.boost=o;var s=n.peekLexeme();if(s==null){n.nextClause();return}switch(s.type){case i.QueryLexer.TERM:return n.nextClause(),i.QueryParser.parseTerm;case i.QueryLexer.FIELD:return n.nextClause(),i.QueryParser.parseField;case i.QueryLexer.EDIT_DISTANCE:return i.QueryParser.parseEditDistance;case i.QueryLexer.BOOST:return i.QueryParser.parseBoost;case i.QueryLexer.PRESENCE:return n.nextClause(),i.QueryParser.parsePresence;default:var a="Unexpected lexeme type '"+s.type+"'";throw new i.QueryParseError(a,s.start,s.end)}}},(function(n,t){r.exports=t()})(this,function(){return i})})()})(u6)),u6.exports}var A1e=yat();const ds=Lu(A1e),mat=function(r){r.pipeline.remove(ds.stemmer),r.searchPipeline.remove(ds.stemmer);const e=ds.tokenizer,i=function(n){return!arguments.length||n==null?[]:Array.isArray(n)?n.map(o=>new A1e.Token(o.toLowerCase(),{})):n.toString().split(".").reduce((o,a)=>o.concat(e(a)),[])};i.separator=e.separator,ds.tokenizer=i},Gw=class Gw{constructor(e,i,n){this.combineWith="AND",this.exactMatch=!1,this.index=ds(function(){this.use(mat),this.ref("_id"),e.forEach(t=>{n.includes(t)?this.field(t,{extractor:function(o){return[o[t]]}}):this.field(t)}),i.forEach(t=>this.add(t))}),this.docCount=i.length}documentCount(){return this.docCount}search(e,i){const n=this.combineWith,t=!this.exactMatch;console.time("lunr-search");const o=this.index.query(function(a){e.term.length>1&&ds.tokenizer(e.term).map(s=>s.toString()).forEach(s=>{a.term(s,{presence:n==="AND"?ds.Query.presence.REQUIRED:ds.Query.presence.OPTIONAL,fields:e.fields,boost:10,usePipeline:!1,wildcard:t?ds.Query.wildcard.LEADING|ds.Query.wildcard.TRAILING:ds.Query.wildcard.NONE})}),i.filter(s=>s.enabled).map(s=>s.term).forEach(s=>{a.term(s.term,{presence:n==="AND"?ds.Query.presence.REQUIRED:ds.Query.presence.OPTIONAL,fields:s.fields,boost:10,usePipeline:!1,wildcard:t?ds.Query.wildcard.TRAILING:ds.Query.wildcard.NONE})})}).map(a=>({id:a.ref,score:a.score,key:[],terms:[]}));return console.timeEnd("lunr-search"),o}async suggest(e,i){const n=ds.tokenizer(e.term).map(c=>c.toString()).filter(c=>c.length>1);if(n.length===0)return{suggestions:[],total:0};const t=n[n.length-1],o=this.combineWith;console.time("lunr-suggest-total"),console.time("lunr-suggest-query");const a=this.index.query(function(c){c.term(t,{presence:o==="AND"?ds.Query.presence.REQUIRED:ds.Query.presence.OPTIONAL,fields:e.fields,boost:50,usePipeline:!1,wildcard:ds.Query.wildcard.LEADING|ds.Query.wildcard.TRAILING}),i.filter(d=>d.enabled).map(d=>d.term).forEach(d=>{c.term(d.term.toLowerCase(),{presence:o==="AND"?ds.Query.presence.REQUIRED:ds.Query.presence.OPTIONAL,fields:d.fields,boost:10,usePipeline:!1,wildcard:ds.Query.wildcard.LEADING|ds.Query.wildcard.TRAILING})})});console.timeEnd("lunr-suggest-query");const s=a.length>Gw.MAX_SUGGEST_RESULTS?a.slice(0,Gw.MAX_SUGGEST_RESULTS):a;console.time("lunr-extract-suggestions");const l=await this.extractSuggestionsFromResults(s,e.fields,i);console.timeEnd("lunr-extract-suggestions"),console.timeEnd("lunr-suggest-total");const u=l.length;return{suggestions:l.slice(0,Gw.MAX_DISPLAY_SUGGESTIONS),total:u}}async extractSuggestionsFromResults(e,i,n){const t=n.filter(o=>o.enabled).map(o=>o.term.term);return e.map(o=>{const a=[];return Object.keys(o.matchData.metadata).forEach(s=>{Object.keys(o.matchData.metadata[s]).forEach(l=>{i.includes(l)&&a.push({field:l,suggestion:s,terms:[],score:o.score})})}),a}).flat().filter(o=>o.suggestion.trim().length>0).filter(o=>!t.includes(o.suggestion)).filter((o,a,s)=>s.findIndex(l=>l.suggestion===o.suggestion&&l.field===o.field)===a)}setExactMatch(e){this.exactMatch=e}setCombineWith(e){this.combineWith=e}};Gw.MAX_SUGGEST_RESULTS=500,Gw.MAX_DISPLAY_SUGGESTIONS=100;let K3=Gw;const bat=["frameId","frameName","signalName","namespace","unit","comments","frameComments","cycleTime","senders","receivers","namedValues"],Sat=["namespace"];function _at(r){const e=r.map(n=>({...n,frameId:n.frameId,frameName:n.name,_id:n.longName()})),i=r.flatMap(n=>n.signals.map(t=>({...t,_id:t.longName(),frameId:n.frameId,frameName:n.name,signalName:t.name,frameComments:n.description,namespace:n.namespace??"",cycleTime:n.cycleTime,senders:n.senders,receivers:n.receivers,namedValues:Object.entries(t.namedValues??{}).map(([o,a])=>`${o} ${a}`).join(" ")})));return new K3(bat,e.concat(i),Sat)}var xV={exports:{}},Pat=xV.exports,vge;function Cat(){return vge||(vge=1,(function(r,e){(function(i,n){r.exports=n($c())})(typeof self<"u"?self:Pat,function(i){return(function(n){function t(a){if(o[a])return o[a].exports;var s=o[a]={i:a,l:!1,exports:{}};return n[a].call(s.exports,s,s.exports,t),s.l=!0,s.exports}var o={};return t.m=n,t.c=o,t.d=function(a,s,l){t.o(a,s)||Object.defineProperty(a,s,{configurable:!1,enumerable:!0,get:l})},t.n=function(a){var s=a&&a.__esModule?function(){return a.default}:function(){return a};return t.d(s,"a",s),s},t.o=function(a,s){return Object.prototype.hasOwnProperty.call(a,s)},t.p="",t(t.s=0)})([function(n,t,o){function a(){return a=Object.assign?Object.assign.bind():function(m){for(var b=1;b<arguments.length;b++){var S=arguments[b];for(var _ in S)Object.prototype.hasOwnProperty.call(S,_)&&(m[_]=S[_])}return m},a.apply(this,arguments)}function s(m){return d(m)||c(m)||u(m)||l()}function l(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function u(m,b){if(m){if(typeof m=="string")return f(m,b);var S=Object.prototype.toString.call(m).slice(8,-1);return S==="Object"&&m.constructor&&(S=m.constructor.name),S==="Map"||S==="Set"?Array.from(m):S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S)?f(m,b):void 0}}function c(m){if(typeof Symbol<"u"&&m[Symbol.iterator]!=null||m["@@iterator"]!=null)return Array.from(m)}function d(m){if(Array.isArray(m))return f(m)}function f(m,b){(b==null||b>m.length)&&(b=m.length);for(var S=0,_=new Array(b);S<b;S++)_[S]=m[S];return _}function h(m){"@babel/helpers - typeof";return(h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(b){return typeof b}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b})(m)}Object.defineProperty(t,"__esModule",{value:!0}),o.d(t,"HighchartsReact",function(){return y});var p=o(1),g=o.n(p),v=typeof window<"u"?p.useLayoutEffect:p.useEffect,y=Object(p.memo)(Object(p.forwardRef)(function(m,b){var S=Object(p.useRef)(),_=Object(p.useRef)(),C=Object(p.useRef)(m.constructorType),T=Object(p.useRef)(m.highcharts);return v(function(){function x(){var w=m.highcharts||(typeof window>"u"?"undefined":h(window))==="object"&&window.Highcharts,L=m.constructorType||"chart";w?w[L]?m.options?_.current=w[L](S.current,m.options,m.callback):console.warn('The "options" property was not passed.'):console.warn('The "constructorType" property is incorrect or some required module is not imported.'):console.warn('The "highcharts" property was not passed.')}if(_.current){if(m.allowChartUpdate!==!1)if(m.constructorType!==C.current||m.highcharts!==T.current)C.current=m.constructorType,T.current=m.highcharts,x();else if(!m.immutable&&_.current){var A;(A=_.current).update.apply(A,[m.options].concat(s(m.updateArgs||[!0,!0])))}else x()}else x()},[m.options,m.allowChartUpdate,m.updateArgs,m.containerProps,m.highcharts,m.constructorType]),v(function(){return function(){_.current&&(_.current.destroy(),_.current=null)}},[]),Object(p.useImperativeHandle)(b,function(){return{get chart(){return _.current},container:S}},[]),g.a.createElement("div",a({},m.containerProps,{ref:S}))}));t.default=y},function(n,t){n.exports=i}])})})(xV)),xV.exports}Cat();const Tat=()=>(Math.random()+1).toString(36).substring(2),yge=500;function xat(r){var _e,Te,De;const e=G.useRef(void 0),i=G.useRef(null),n=G.useRef(null),t=G.useRef(null),o=G.useRef(null),[a,s]=G.useState([]),[l,u]=G.useState(!1),[c,d]=G.useState([]),[f,h]=G.useState(0),[p,g]=G.useState(""),[v,y]=G.useState(),[m,b]=G.useState("AND"),[S,_]=G.useState(!0),[C,T]=G.useState(!1),[x,A]=G.useState([]),[w,L]=G.useState(-1),[k,D]=G.useState({frameId:{selected:!1,fields:["frameId"],label:"Frame id"},frameName:{selected:!1,fields:["frameName"],label:"Frame name"},signalName:{selected:!1,fields:["signalName"],label:"Signal name"},namespace:{selected:!1,fields:["namespace"],label:"Interface",tokenize:!1},unit:{selected:!1,fields:["unit"],label:"Unit",tokenize:!1},comments:{selected:!1,fields:["comments","frameComments"],label:"Comments"},cycleTime:{selected:!1,fields:["cycleTime"],label:"Cycletime"},senders:{selected:!1,fields:["senders"],label:"Senders"},receivers:{selected:!1,fields:["receivers"],label:"Receivers"},namedValues:{selected:!1,fields:["namedValues"],label:"Named values"}});function j(Pe){const Ee=k[Pe];if(!Ee){const Re=Object.keys(k).filter(je=>k[je].fields.includes(Pe))[0];return k[Re].label}return Ee.label}G.useEffect(()=>{r.frameEntries&&r.frameEntries.length>0&&(r.frameEntries[0].isBrokerFrame()||D(Pe=>{const Ee={...Pe};return delete Ee.namespace,Ee}))},[r.frameEntries]);const N=Pe=>{var Ee;(Ee=e.current)==null||Ee.setExactMatch(Pe),T(Pe)},V=Pe=>{var Ee;(Ee=e.current)==null||Ee.setCombineWith(Pe),b(Pe)};function W(Pe){A(Ee=>Ee.map((Re,je)=>je===Pe?{...Re,enabled:!Re.enabled}:Re))}const K=Pe=>{D(Ee=>({...Ee,[Pe]:{...Ee[Pe],selected:!Ee[Pe].selected}}))},H=()=>{let Pe=Object.keys(k).filter(Ee=>k[Ee].selected).flatMap(Ee=>k[Ee].fields);return Pe.length===0&&(Pe=Object.keys(k).flatMap(Ee=>k[Ee].fields)),Pe};G.useEffect(()=>{r.frameEntries&&r.frameEntries.length>0&&!e.current?(console.log("Indexing data"),e.current=_at(r.frameEntries)):console.log("Data already indexed")},[r.frameEntries]),G.useEffect(()=>{ie(a)},[a]),G.useEffect(()=>(o.current&&clearTimeout(o.current),p===""?(I(pR(p,H()),x),y(Tat())):o.current=setTimeout(()=>{I(pR(p,H()),x)},150),()=>{o.current&&clearTimeout(o.current)}),[x,m,p]),G.useEffect(()=>(t.current&&clearTimeout(t.current),t.current=setTimeout(()=>U(),300),()=>{t.current&&clearTimeout(t.current)}),[p,k]),G.useEffect(()=>{},[k,m,C]),G.useEffect(()=>{e.current&&I(pR(p,H()),x)},[C,m]),G.useEffect(()=>{S?U():Q()},[S]);const U=async()=>{if(!e.current||!S)return;const Pe=await e.current.suggest(pR(p,H()),x);d(Pe.suggestions),h(Pe.total)},I=(Pe,Ee)=>{e.current&&s(e.current.search(Pe,Ee))},Q=()=>{d([]),h(0),L(-1)},Z=Pe=>{if(c.length)switch(Pe.key){case"Escape":Pe.preventDefault(),Q();break}};G.useEffect(()=>{if(w===-1)setTimeout(()=>{i.current&&i.current.focus()},0);else if(n.current){const Pe=n.current.querySelector(`[data-index="${w}"]`);Pe==null||Pe.scrollIntoView({block:"nearest"})}},[w]);const ee=Pe=>{if(c.length)switch(Pe.key){case"ArrowDown":Pe.preventDefault(),L(Ee=>Ee===c.length-1?Ee:Ee+1);break;case"ArrowUp":Pe.preventDefault(),L(Ee=>Math.max(-1,Ee-1));break;case"Enter":Pe.preventDefault(),w>=0&&w<c.length?de(c[w]):Q();break;case"Escape":Pe.preventDefault(),Q();break;default:Q();break}},ie=async Pe=>{const Ee=new Set(Pe.map(je=>je.id)),Re=[];for(let je=0;je<r.frameEntries.length;je+=yge){const Ke=r.frameEntries.slice(je,je+yge);for(const ot of Ke)if(Ee.has(ot.longName()))Re.push(ot);else{const We=ot.signals.filter(xe=>Ee.has(xe.longName()));We.length>0&&Re.push({...ot,signals:We})}await new Promise(ot=>setTimeout(ot,0))}r.setFoundSignals(Re)},de=Pe=>{A([...x,C1e(!0,Pe.suggestion,[Pe.field])]),setTimeout(()=>{i.current&&(i.current.focus(),Q(),g(""))},0)},pe=()=>R.jsx(R.Fragment,{children:R.jsxs("div",{onKeyDown:Z,className:"absolute left-0 right-0 mt-0 z-50 bg-white dark:bg-neutral-800 text-gray-900 dark:text-gray-100 border border-gray-300 dark:border-neutral-600 border-t-0 rounded-b-xl shadow-lg text-xs overflow-hidden",style:{minWidth:"300px"},children:[R.jsx("div",{ref:n,className:"max-h-[150px] overflow-y-auto",children:c.sort((Pe,Ee)=>Ee.score-Pe.score).map((Pe,Ee)=>R.jsxs("div",{"data-index":Ee,onClick:()=>de(Pe),onMouseMove:()=>L(Ee),onFocus:()=>L(Ee),className:`px-3 py-2 cursor-pointer flex justify-between ${w===Ee?"bg-gray-100 dark:bg-neutral-700":""}`,children:[R.jsx("span",{children:Pe.suggestion}),R.jsx("span",{className:"ml-2 text-gray-500 dark:text-gray-400",children:j(Pe.field)})]},`${Pe.suggestion}-${Pe.field}`))}),f>c.length&&R.jsx("div",{className:"px-3 py-2 text-gray-400 dark:text-gray-500 italic border-t border-gray-100 dark:border-neutral-700",children:`There are ${f} suggestions, showing ${c.length}`})]})});return R.jsxs("div",{className:"text-gray-900 dark:text-gray-100",children:[R.jsxs("div",{className:"relative",children:[R.jsx(cat,{ref:i,onKeyDown:ee,autoFocus:!0,placeHolder:`Search, e.g ${((De=(Te=(_e=r.frameEntries)==null?void 0:_e[0])==null?void 0:Te.signals[0])==null?void 0:De.name)??"Speed"}`,forceSearchValueChange:v,setSearchValue:g,termFilters:x,className:c.length>0?"rounded-t-xl rounded-b-0 bg-white dark:bg-neutral-800":"rounded-xl bg-white dark:bg-neutral-800",getFieldLabel:j,toggleTerm:W,deleteTerm:Pe=>A(x.filter((Ee,Re)=>Re!==Pe))}),c.length>0&&pe()]}),R.jsxs(gat,{open:l,onOpenChange:u,children:[R.jsxs("div",{className:"flex justify-between items-center mt-1 mx-4 text-xs text-gray-500 dark:text-gray-400",children:[R.jsx("span",{children:r.status??null}),R.jsxs(vat,{className:"group flex items-center py-0.5 px-1 text-sm text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-gray-100 focus:outline-none",children:[R.jsx("span",{className:"mr-1 text-xs",children:"Search options"}),R.jsx(pH,{size:16,className:"transform transition-transform duration-200 group-data-[state=open]:rotate-180"})]})]}),R.jsx("div",{className:"mt-1 grid w-full origin-top",style:{gridTemplateRows:l?"1fr":"0fr",transition:"grid-template-rows 200ms ease-out, opacity 200ms ease-out, transform 200ms ease-out",opacity:l?1:0},children:R.jsx("div",{className:"min-h-0 overflow-hidden",children:R.jsxs("div",{className:"p-3 text-sm border border-gray-200 dark:border-neutral-700 rounded-md bg-gray-50 dark:bg-neutral-800",children:[R.jsxs("div",{className:"flex items-center mb-2",children:[R.jsx("input",{id:"exact-match",type:"checkbox",checked:C,onChange:()=>N(!C),className:"w-4 h-4 rounded border-gray-300 dark:border-neutral-600 text-blue-600 focus:ring-blue-500 bg-white dark:bg-neutral-700"}),R.jsx("label",{htmlFor:"exact-match",className:"ml-2 text-gray-700 dark:text-gray-300 cursor-pointer",children:"Exact match"})]}),R.jsxs("div",{className:"flex items-center mb-2",children:[R.jsx("input",{id:"suggestions",type:"checkbox",checked:S,onChange:()=>_(!S),className:"w-4 h-4 rounded border-gray-300 dark:border-neutral-600 text-blue-600 focus:ring-blue-500 bg-white dark:bg-neutral-700"}),R.jsx("label",{htmlFor:"suggestions",className:"ml-2 text-gray-700 dark:text-gray-300 cursor-pointer",children:"Search suggestions"})]}),R.jsxs("div",{className:"flex items-center mb-4",children:[R.jsx("span",{className:"text-gray-700 dark:text-gray-300 mr-3",children:"Combine With:"}),R.jsxs("label",{className:"flex items-center mr-4 cursor-pointer",children:[R.jsx("input",{type:"radio",name:"combineWith",value:"AND",checked:m==="AND",onChange:Pe=>V(Pe.target.value),className:"w-4 h-4 text-blue-600 border-gray-300 dark:border-neutral-600 focus:ring-blue-500"}),R.jsx("span",{className:"ml-1",children:"AND"})]}),R.jsxs("label",{className:"flex items-center cursor-pointer",children:[R.jsx("input",{type:"radio",name:"combineWith",value:"OR",checked:m==="OR",onChange:Pe=>V(Pe.target.value),className:"w-4 h-4 text-blue-600 border-gray-300 dark:border-neutral-600 focus:ring-blue-500"}),R.jsx("span",{className:"ml-1",children:"OR"})]})]}),R.jsx("p",{className:"mb-2 text-gray-700 dark:text-gray-300",children:"Fields to search in:"}),R.jsx("div",{className:"flex flex-wrap items-center gap-1",children:Object.keys(k).map(Pe=>R.jsx("button",{type:"button",onClick:()=>K(Pe),className:`px-3 py-1 text-xs rounded-md border transition-colors ${k[Pe].selected?"bg-blue-600 text-white border-blue-600 dark:bg-blue-900 dark:border-blue-700":"bg-white dark:bg-neutral-700 text-gray-700 dark:text-gray-300 border-gray-300 dark:border-neutral-600 hover:bg-gray-100 dark:hover:bg-neutral-600"}`,children:j(Pe)},Pe))})]})})})]})]})}function w1e(){const r=Eat(),e=y7();return r||e}function y7(){return O1e("(max-width: 767px)")}function Eat(){return O1e("(min-width: 768px) and (max-width: 1023px)")}function O1e(r){const e=n=>{const t=window.matchMedia(r);return t.addEventListener("change",n),()=>t.removeEventListener("change",n)},i=()=>window.matchMedia(r).matches;return G.useSyncExternalStore(e,i)}const m7="bg-blue-100/60 dark:bg-neutral-700/60",D1e="bg-blue-200/60 dark:bg-zinc-900/80",Aat="mb-1";function wat(r){const e=n=>{n.target.checked?r.addSelectedSignalFunction(r.thisSignalEntry):r.removeSelectedSignalFunction(r.thisSignalEntry)};return(n=>{const t=r.selectedSignals.some(s=>s.frameName===n.frameName&&s.name===n.name&&s.namespace===n.namespace),o=r.isLastInFrame?"rounded-b-sm rounded-t-none":"rounded-none",a=R.jsx("fieldset",{children:R.jsxs("div",{className:"grid grid-cols-12 break-words items-center p-1 m-0",children:[R.jsx("div",{className:"col-span-6 min-w-0",children:R.jsxs("div",{className:"flex items-center min-w-0",children:[R.jsx("input",{id:`${n.namespace}-${n.frameName}-${n.name}-signal-item`,type:r.singleSignalSelectionOnly?"radio":"checkbox",checked:t,onChange:s=>e(s),className:"w-4 h-4 shrink-0 border-gray-300 dark:border-neutral-600 text-blue-600 focus:ring-blue-500 cursor-pointer disabled:cursor-not-allowed disabled:opacity-50 bg-white dark:bg-neutral-800"}),R.jsxs("label",{htmlFor:`${n.namespace}-${n.frameName}-${n.name}-signal-item`,title:n.name,className:"min-w-0 truncate text-sm ml-2 cursor-pointer block",children:[n.name," "]})]})}),R.jsx("div",{className:"col-span-1 text-xs flex items-center",children:R.jsx("p",{className:"text-gray-500 dark:text-gray-400 pl-1 m-0 truncate",children:`${n.unit??""}`})}),R.jsx("div",{className:"col-span-3 text-xs flex items-center",children:R.jsx("p",{className:"text-gray-500 dark:text-gray-400 pl-1 m-0 truncate",children:`${n.min??"N/A"} / ${n.max??"N/A"}`})}),R.jsx("div",{className:"col-span-2","aria-hidden":"true"}),R.jsx("div",{className:"col-span-12",children:n.description!=null&&n.description!==""&&R.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1 pb-0 mb-0 py-0 ml-0 text-wrap",children:n.description})})]})});return R.jsx("div",{className:`${o} p-0.5 ${r.isLastInFrame?`pb-1.5 ${Aat}`:""} ${m7} w-full ${r.className??""}`,children:R.jsx("div",{className:`${D1e} px-1 py-0.5 mx-1 rounded-sm text-gray-900 dark:text-gray-100`,children:a})},`${n.namespace}-${n.frameName}-${n.name}-signal-item`)})(r.thisSignalEntry)}function Oat(r){const e=r.isFrameSelectable!==!1,i=u=>{var c,d;u.target.checked?(c=r.addSelectedSignalFunction)==null||c.call(r,r.thisSignalEntry):(d=r.removeSelectedFrameFunction)==null||d.call(r,r.thisSignalEntry)},n=r.thisSignalEntry,o=(r.selectedFrames??[]).some(u=>u.name===n.name&&u.namespace===n.namespace),a=o&&r.isFrameRemovalDisabled,s=r.hasSignalsBelow?"rounded-t-sm rounded-b-none":"rounded-sm",l=(u,c)=>R.jsx(R.Fragment,{children:R.jsxs("div",{className:"flex flex-row items-end text-xs text-gray-500 dark:text-gray-400",title:u,children:[R.jsx("span",{"aria-hidden":"true",className:"-translate-y-[0.08em]",children:"["}),R.jsx("p",{className:"m-0 ",children:c?`${c.map((d,f)=>f===c.length-1?d:`${d}, `)}`:"-"}),R.jsx("span",{"aria-hidden":"true",className:"-translate-y-[0.08em]",children:"]"})]})});return R.jsx("div",{className:`${s} p-1 ps-2 pe-1 ${r.isExpanded?"":"pb-1.5"} ${m7} w-full text-gray-900 dark:text-gray-100 ${r.className??""}`,children:R.jsx("fieldset",{children:R.jsxs("div",{className:"grid grid-cols-12 break-words items-center p-0 m-0",children:[R.jsx("div",{className:"col-span-6 min-w-0",children:R.jsxs("div",{className:"flex items-center min-w-0",children:[e&&R.jsx("input",{id:`${n.namespace}-${n.name}-signal-item`,type:"checkbox",checked:o,onChange:u=>i(u),disabled:a,className:"w-4 h-4 shrink-0 rounded border-gray-300 dark:border-neutral-600 text-blue-600 focus:ring-blue-500 cursor-pointer disabled:cursor-not-allowed disabled:opacity-50 bg-white dark:bg-neutral-800"}),R.jsxs("label",{htmlFor:e?`${n.namespace}-${n.name}-signal-item`:void 0,title:`${n.frameId} ${n.name} (${n.namespace})`,className:`min-w-0 truncate text-sm ${e?"ml-2":""} font-semibold block ${e&&a?"cursor-not-allowed opacity-70":e?"cursor-pointer":""}`,children:[n.frameId," ",n.name," ",R.jsx("span",{className:"ml-2 font-normal text-xs text-gray-500 dark:text-gray-400",children:n.namespace})]})]})}),R.jsx("div",{className:"col-span-1 text-xs flex items-center",children:R.jsx("p",{className:"text-gray-500 dark:text-gray-400 m-0 truncate",children:`${n.unit??""}`})}),R.jsx("div",{className:"col-span-3 text-xs flex items-center",children:R.jsx("p",{className:"text-gray-500 dark:text-gray-400 m-0 truncate",children:`${n.min??"N/A"} / ${n.max??"N/A"}`})}),R.jsx("div",{className:"col-span-2 text-sm flex items-center justify-end",children:r.thisSignalEntry.signals.length>0?R.jsx("button",{onClick:r.onToggle,className:"px-1 border-0 bg-transparent cursor-pointer text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 flex-shrink-0 rounded hover:bg-black/5 dark:hover:bg-white/5 transition-colors","aria-expanded":r.isExpanded,"aria-label":r.isExpanded?"Collapse frame":"Expand frame",children:r.isExpanded?R.jsx(Hye,{size:22}):R.jsx(pH,{size:22})}):R.jsx("div",{className:"min-w-[4.5rem] text-right pe-1",children:R.jsx("p",{className:"text-xxs text-gray-500 dark:text-orange-400 m-0 whitespace-nowrap",children:"Frame only"})})}),R.jsx("div",{className:`col-span-12 mb-0 ${r.isFrameSelectable?"ms-6":"ms-0"}`,children:R.jsxs("div",{className:"flex flex-row text-xs gap-3",children:[l("Senders",n.senders),l("Receivers",n.receivers),R.jsx("p",{title:"Cycle Time",className:"m-0 text-xs text-blue-600 dark:text-blue-400",children:n.cycleTime?`${n.cycleTime}ms`:"Not set"})]})}),R.jsx("div",{className:"col-span-12 ms-6 me-2",children:n.description!=null&&n.description!==""&&R.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0 pb-0 mb-1 py-0 ml-0 text-wrap",children:n.description})})]})})},`${n.namespace}--${n.name}-signal-item`)}const Dat=20,Rat=48,Mat=32;function mz(r){"use no memo";const e=pz(),i=y7(),n=G.useRef(null),[t,o]=G.useState([]),[a,s]=G.useState([]),[l,u]=G.useState([]),[c,d]=G.useState(new Set),[f,h]=G.useState(!1),p=Te=>`${Te.namespace}-${Te.name}`,g=Te=>{d(De=>{const Pe=new Set(De),Ee=p(Te);return Pe.has(Ee)?Pe.delete(Ee):Pe.add(Ee),Pe})},v=()=>{t&&d(new Set(t.map(p)))},y=()=>{d(new Set)},m=G.useMemo(()=>!t||t.length===0?!1:t.every(Te=>c.has(p(Te))),[t,c]);G.useEffect(()=>{r.show&&(r.selectedFramesAsOnlySourceOfSignals?s(r.selectedFrames.flatMap(Te=>Te.signals)):s(r.selectedSignals),u(r.selectedFrames),o(e),d(new Set(e.map(p))))},[r.show,r.selectedSignals,r.selectedFrames,r.selectedFramesAsOnlySourceOfSignals,e]);const b=G.useMemo(()=>{if(!t)return[];const Te=[];for(const De of t)if(Te.push({type:"frame",frame:De}),c.has(p(De))){const Pe=[...De.signals].sort((Ee,Re)=>Ee.name.localeCompare(Re.name));for(const Ee of Pe)Te.push({type:"signal",signal:Ee,parentFrame:De})}return Te},[t,c]),S=P1e({count:b.length,getScrollElement:()=>n.current,estimateSize:Te=>{var De;return((De=b[Te])==null?void 0:De.type)==="frame"?Rat:Mat},getItemKey:Te=>{const De=b[Te];return De?De.type==="frame"?`frame-${p(De.frame)}`:`signal-${De.parentFrame.namespace}-${De.parentFrame.name}-${De.signal.name}`:Te},overscan:5});G.useEffect(()=>{var Te;(Te=n.current)==null||Te.scrollTo({top:0})},[t]);const _=()=>l.map(De=>{const Pe=a.filter(Ee=>Ee.frameName===De.name&&Ee.namespace===De.namespace);return{...De,signals:Pe}}),C=(Te,De)=>{const Pe=Te.frame,Ee=r.enforceFrameSelection&&k(Pe),Re=c.has(p(Pe));return R.jsx("div",{className:"text-base flex items-center w-full flex-wrap",children:R.jsx(Oat,{className:"",thisSignalEntry:Pe,isFrameSelectable:r.isFramesSelectable,selectedFrames:l,removeSelectedFrameFunction:V,addSelectedSignalFunction:j,isFrameRemovalDisabled:Ee,isExpanded:Re,hasSignalsBelow:De,onToggle:()=>g(Pe)},`${Pe.namespace}-${Pe.name}`)})},T=(Te,De,Pe)=>R.jsx(R.Fragment,{children:R.jsx(wat,{parentFrameEntry:Te.parentFrame,thisSignalEntry:Te.signal,selectedSignals:a,removeSelectedSignalFunction:N,addSelectedSignalFunction:j,singleSignalSelectionOnly:r.singleSignalSelectionOnly,isFirstInFrame:De,isLastInFrame:Pe})}),x=()=>b.length>0?R.jsx("div",{style:{height:S.getTotalSize(),width:"100%",position:"relative"},children:S.getVirtualItems().map(Te=>{var Ke,ot,We;const De=b[Te.index];if(!De)return null;const Pe=De.type==="frame",Ee=Pe&&((Ke=b[Te.index+1])==null?void 0:Ke.type)==="signal",Re=!Pe&&((ot=b[Te.index-1])==null?void 0:ot.type)==="frame",je=!Pe&&(((We=b[Te.index+1])==null?void 0:We.type)==="frame"||Te.index===b.length-1);return R.jsx("div",{"data-index":Te.index,ref:S.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${Te.start}px)`},className:Pe?`pt-0.5 ${Ee?"pb-0":"pb-2"}`:`pt-0 ${je?"pb-1":"pb-0"}`,children:Pe?C(De,Ee):T(De,Re,je)},Te.key)})}):t!==void 0?R.jsxs("div",{className:"flex-1 min-h-0 flex items-center justify-center",children:[R.jsx(Gye,{size:20,className:"text-yellow-500 mr-2"}),R.jsx("p",{className:"my-5 text-sm text-gray-700 dark:text-gray-300",children:"No signals match the current query"})]}):R.jsx(R.Fragment,{children:R.jsx("p",{className:"text-gray-700 dark:text-gray-300",children:"Loading..."})}),A=()=>{r.handleCloseFunction(r.selectedSignals.length)},w=()=>{r.handleCloseFunction(a.length),o(e)},L=()=>{if(r.enforceFrameSelection){const Te=_();r.selectEnforcedFramesFunction(Te)}else r.selectSignalsFunction(a,l);w()},k=Te=>a.some(De=>De.frameName===Te.name&&De.namespace===Te.namespace),D=Te=>"signals"in Te,j=Te=>{const De=r.signalLimit??Dat,Pe=a.length+l.length;if(D(Te))Pe<De?u([...l,Te]):Gn.warning(QG("Signal limit reached",`You can not have more than ${De} signal(s) selected. Add another panel to visualize more signal(s).`),{autoClose:1e4,toastId:"signal.picker.limit"});else{if(r.singleSignalSelectionOnly){s([Te]);return}if(Pe<De){if(s([...a,Te]),r.autoSelectParentFrame&&r.isFramesSelectable){const Ee=Te.frameName!==Te.name,Re=l.some(je=>je.name===Te.frameName&&je.namespace===Te.namespace);if(Ee&&!Re){const je=e.find(Ke=>Ke.name===Te.frameName&&Ke.namespace===Te.namespace);je&&u([...l,je])}}}else Gn.warning(QG("Signal limit reached",`You can not have more than ${De} signal(s) selected. Add another panel to visualize more signal(s).`),{autoClose:1e4,toastId:"signal.picker.limit"})}},N=Te=>{s(a.filter(De=>W(De)!==W(Te)))},V=Te=>{if(r.enforceFrameSelection&&k(Te)){Gn.warning(QG("Cannot deselect frame","Please deselect all signals in this frame before deselecting the frame itself."),{autoClose:5e3,toastId:"frame.deselect.blocked"});return}u(l.filter(De=>!(De.name===Te.name&&De.namespace===Te.namespace)))},W=Te=>K(Te.name,Te.frameName),K=(Te,De)=>`${De}::${Te}`.toLowerCase(),H=Te=>R.jsx(R.Fragment,{children:R.jsx("div",{className:"min-w-0 max-w-full",children:R.jsx("div",{className:`rounded-sm ${D(Te)?m7:D1e} border p-1 px-2 leading-tight min-w-0`,children:R.jsx("div",{children:R.jsxs("div",{className:"flex items-center justify-between min-w-0",children:[R.jsxs("div",{className:"flex items-end min-w-0 flex-1 overflow-hidden",children:[R.jsx("p",{className:"m-0 text-sm text-gray-900 dark:text-gray-100 truncate min-w-0",children:Te.name}),R.jsx("p",{className:"m-0 text-xs ml-1 text-gray-500 dark:text-gray-400 truncate min-w-0",children:Te.namespace})]}),R.jsx("button",{className:"ml-2 p-0 border-0 bg-transparent cursor-pointer text-gray-500 hover:text-red-500 dark:text-gray-400 dark:hover:text-red-400",onClick:()=>D(Te)?V(Te):N(Te),children:R.jsx(IN,{size:20})})]})})})},`${Te.namespace}-${D(Te)?"":Te.frameName}-${Te.name}`)}),U=()=>{const Te=a.map(Pe=>H(Pe)),De=l.map(Pe=>H(Pe));return R.jsxs(R.Fragment,{children:[Te,De]})},I=()=>R.jsx("div",{className:"my-2",children:R.jsx(xat,{frameEntries:e,setFoundSignals:Te=>o(Te),clear:()=>o(e),status:`Showing ${(t==null?void 0:t.map(Te=>Te.signals.length).reduce((Te,De)=>Te+De,0))??0} of ${e.map(Te=>Te.signals.length).reduce((Te,De)=>Te+De,0)} results`})}),Q=()=>R.jsxs("div",{className:"flex-1 min-h-0 flex flex-col",children:[R.jsxs("div",{className:"grid grid-cols-12 gap-0 mb-0 px-0 text-sm items-baseline",title:"Information about Senders, Receivers and Cycle time is displayed below each frame name.",children:[R.jsxs("div",{className:"col-span-6 flex items-baseline",children:[R.jsx("p",{className:"m-0 font-bold text-gray-900 dark:text-gray-100",children:"Name"}),R.jsx("p",{className:"m-0 ml-2 text-xs text-gray-500 dark:text-gray-400",children:"Namespace"})]}),R.jsx("div",{className:"col-span-1 flex flex-col items-start truncate",children:R.jsx("p",{className:"m-0 font-bold truncate text-gray-900 dark:text-gray-100",children:"Unit"})}),R.jsx("div",{className:"col-span-3 flex flex-col items-start truncate",children:R.jsx("p",{className:"m-0 font-bold truncate text-gray-900 dark:text-gray-100",children:"Min/max"})}),R.jsx("div",{className:"col-span-2 flex items-center justify-end",children:R.jsx(Uc,{type:Qo.NO_BACKGROUND,size:Vl.SM,icon:m?sr.NAV_CHEVRON_UP:sr.NAV_CHEVRON_DOWN,label:i?m?"Collapse":"Expand":m?"Collapse all":"Expand all",title:m?"Collapse all frames":"Expand all frames",onClick:()=>m?y():v()})})]}),R.jsx("div",{ref:n,className:"w-full border-b border-t border-gray-200 dark:border-neutral-700 py-1 px-0 flex-1 min-h-0 overflow-y-auto flex flex-col",children:x()})]}),Z=()=>{const Te=a.length+l.length;return R.jsxs("div",{className:"flex-grow min-w-0",children:[R.jsxs("button",{type:"button",title:f?"Collapse selected signals":"Expand selected signals",onClick:()=>h(De=>!De),className:"p-0 mr-1 border-0 bg-transparent cursor-pointer text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 flex items-center",children:[f?R.jsx(Fr,{type:sr.NAV_CHEVRON_UP,size:16}):R.jsx(Fr,{type:sr.NAV_CHEVRON_DOWN,size:16}),R.jsxs("span",{className:"text-sm font-bold ml-1 text-gray-900 dark:text-gray-100",children:["Selected signals (",Te,")"]})]}),R.jsx("div",{className:"overflow-hidden transition-all duration-200 ease-out",style:{maxHeight:f?240:0,opacity:f?1:0},children:R.jsx("div",{className:"border-b border-t border-gray-200 dark:border-neutral-700 p-1 mt-1 mb-3 overflow-y-auto min-w-0",children:R.jsx("div",{className:"flex max-h-[150px] min-w-0 flex-wrap content-start gap-1",children:U()})})})]})},ee=()=>R.jsxs("div",{className:"hidden w-full justify-end lg:flex gap-2",children:[R.jsx(Uc,{type:Qo.PRIMARY,label:"Cancel",onClick:A}),R.jsx(Uc,{type:Qo.SUCCESS,label:"Apply",onClick:L})]}),ie=()=>R.jsx(R.Fragment,{children:R.jsx("div",{className:"lg:hidden",children:R.jsxs("div",{className:"flex justify-center ml-3 mt-2 gap-2",children:[R.jsx(Uc,{type:Qo.PRIMARY,label:"Cancel",onClick:A}),R.jsx(Uc,{type:Qo.SUCCESS,label:"Apply",onClick:L})]})})}),de=()=>R.jsx("div",{className:"pt-2 px-1 pb-0 flex-shrink-0",children:I()}),pe=()=>R.jsx("div",{className:"flex-1 min-h-0 flex flex-col",children:Q()}),_e=()=>R.jsxs("div",{className:"border-0 px-1 my-3 text-left flex-shrink-0",children:[R.jsx("div",{className:"flex justify-between",children:Z()}),ee(),ie()]});return R.jsxs(AH,{show:r.show,onClose:A,size:"7xl",className:"w-full px-2 flex flex-col min-h-[min(65rem,calc(100vh-1rem))] max-h-[min(65rem,calc(100vh-1rem))] text-gray-900 dark:text-gray-100 m-2",children:[de(),pe(),_e()]})}function Lat(r){return R.jsxs(xi,{children:[R.jsx(xi.Section,{title:"Settings",children:R.jsx(xi.NumberStepper,{label:"Height (px)",value:r.chartHeight,onChange:r.onHeightChange,min:80,max:400,step:30})}),R.jsx(xi.Divider,{}),R.jsxs(xi.Section,{title:"Actions",children:[r.onAddGauge&&R.jsx(xi.Button,{icon:sr.ACTION_ADD,label:"Add gauge",onClick:r.onAddGauge}),R.jsx(xi.RemoveButton,{onClick:r.onRemove})]})]})}function kat(r){const{updatePanel:e,removePanel:i}=s_(),n=r.panelConfig,t=G.useRef(null),[o,a]=G.useState(n.heightConfig??150),[s,l]=G.useState(!1);if(G.useEffect(()=>{if(!t.current)return;const g=new ResizeObserver(v=>{for(const y of v){const m=y.contentRect.height;m>0&&a(Math.max(50,m-36-16))}});return g.observe(t.current),()=>g.disconnect()},[]),!n)return null;const u=()=>i(n.id),c=g=>e(n.id,"gauge",v=>({...v,signals:v.signals.filter(y=>y.name!==g.name)})),d=g=>e(n.id,"gauge",v=>({...v,heightConfig:g})),f=n.unresolvedSignals&&n.unresolvedSignals.length>0,h=g=>{e(n.id,"gauge",v=>{const y=new Set(v.signals.map(b=>b.name)),m=g.filter(b=>!y.has(b.name));return{...v,signals:[...v.signals,...m]}}),l(!1)},p=()=>n.signals.length===0&&f?R.jsx(b1,{title:"Signals not available",message:R.jsxs(R.Fragment,{children:[R.jsx("span",{children:"The following signals could not be found:"}),_ot(n.unresolvedSignals)]}),suggestion:"This is likely because you are running against a platform that does not contains these signals."}):R.jsxs("div",{className:"flex flex-wrap gap-4 items-center h-full",children:[n.signals.map(g=>R.jsx(qot,{type:"gauge",signalMetadata:g,initialValue:0,onRemove:()=>c(g),height:o},g.longName())),n.signals.length===0&&R.jsx("div",{className:"text-sm text-muted-foreground",children:"Click + to add a gauge"})]});return R.jsxs(R.Fragment,{children:[R.jsxs(tL,{ref:t,fullHeight:!0,children:[R.jsx(rL,{icon:sr.DATA_CIRCLE_GAUGE,helpTooltip:Dot,dropdown:R.jsx(Lat,{chartHeight:n.heightConfig,onHeightChange:d,onAddGauge:()=>l(!0),onRemove:u}),children:R.jsx("span",{className:"text-xs font-sm",children:"Gauges"})}),R.jsx(iL,{fullHeight:!0,children:p()})]}),R.jsx(mz,{show:s,selectedSignals:n.signals,selectedFrames:[],handleCloseFunction:()=>l(!1),selectSignalsFunction:h,isFramesSelectable:!1,autoSelectParentFrame:!1,enforceFrameSelection:!1})]})}const Iat=R.jsxs("div",{className:"max-w-md space-y-1",children:[R.jsx("p",{className:"text-sm font-semibold",children:"Map"}),R.jsxs("p",{className:"text-xs",children:[R.jsx("span",{className:"font-bold",children:"Settings"}),":"]}),R.jsxs("p",{className:"text-xs ms-2",children:[R.jsx("span",{className:"font-semibold",children:"Latitude"}),": Set the signal for the latitude coordinate",R.jsx("br",{}),R.jsx("span",{className:"font-semibold",children:"Longitude"}),": Set the signal for the longitude coordinate"]})]});function Z3(r){var e,i,n,t;return((e=r.signals)==null?void 0:e.length)===0&&((i=r.frames)==null?void 0:i.length)===0?null:R.jsxs("div",{className:Nr("space-y-2 mx-2 mb-2",r.className),children:[(n=r==null?void 0:r.signals)==null?void 0:n.map((o,a)=>R.jsxs("div",{className:"bg-amber-50 dark:bg-amber-950/30 border border-amber-200 dark:border-amber-800/50 rounded-md px-3 py-2",children:[R.jsxs("div",{className:"flex items-center justify-between gap-2",children:[R.jsxs("div",{className:"flex items-center gap-2",children:[R.jsx(Fr,{type:sr.STATUS_WARNING,className:"text-amber-500 dark:text-amber-400 w-4 h-4 flex-shrink-0"}),R.jsx("p",{className:"text-xs font-medium text-amber-800 dark:text-amber-200 m-0",children:r.title??"Signal not available"})]}),r.onRemoveSignal&&R.jsxs("button",{onClick:()=>{var s;return(s=r.onRemoveSignal)==null?void 0:s.call(r,o)},className:"flex items-center gap-1 text-xs text-amber-600 dark:text-amber-400 hover:text-amber-800 dark:hover:text-amber-200 transition-colors",title:"Remove this signal from the panel",children:[R.jsx("span",{children:"Remove"}),R.jsx(Fr,{type:sr.ACTION_CLOSE,className:"w-3 h-3"})]})]}),R.jsxs("div",{className:"mt-1 ml-6 space-y-0.5 text-xs text-amber-700 dark:text-amber-300",children:[R.jsxs("div",{children:[R.jsx("span",{className:"text-amber-600 dark:text-amber-400",children:"Namespace: "}),R.jsx("span",{className:"font-medium",children:o.namespace})]}),R.jsxs("div",{children:[R.jsx("span",{className:"text-amber-600 dark:text-amber-400",children:"Signal: "}),R.jsx("span",{className:"font-medium",children:o.signal})]})]})]},`${o.namespace}-${o.frame}-${o.signal}-${a}`)),(t=r==null?void 0:r.frames)==null?void 0:t.map((o,a)=>R.jsxs("div",{className:"bg-amber-50 dark:bg-amber-950/30 border border-amber-200 dark:border-amber-800/50 rounded-md px-3 py-2",children:[R.jsxs("div",{className:"flex items-center justify-between gap-2",children:[R.jsxs("div",{className:"flex items-center gap-2",children:[R.jsx(Fr,{type:sr.STATUS_WARNING,className:"text-amber-500 dark:text-amber-400 w-4 h-4 flex-shrink-0"}),R.jsx("p",{className:"text-xs font-medium text-amber-800 dark:text-amber-200 m-0",children:r.title??"Frame not available"})]}),r.onRemoveFrame&&R.jsxs("button",{onClick:()=>{var s;return(s=r.onRemoveFrame)==null?void 0:s.call(r,o)},className:"flex items-center gap-1 text-xs text-amber-600 dark:text-amber-400 hover:text-amber-800 dark:hover:text-amber-200 transition-colors",title:"Remove this signal from the panel",children:[R.jsx("span",{children:"Remove"}),R.jsx(Fr,{type:sr.ACTION_CLOSE,className:"w-3 h-3"})]})]}),R.jsxs("div",{className:"mt-1 ml-6 space-y-0.5 text-xs text-amber-700 dark:text-amber-300",children:[R.jsxs("div",{children:[R.jsx("span",{className:"text-amber-600 dark:text-amber-400",children:"Namespace: "}),R.jsx("span",{className:"font-medium",children:o.namespace})]}),R.jsxs("div",{children:[R.jsx("span",{className:"text-amber-600 dark:text-amber-400",children:"Frame: "}),R.jsx("span",{className:"font-medium",children:o.frame})]})]})]},`${o.namespace}-${o.frame}-${a}`))]})}function Nat(r){var e,i;return R.jsxs(xi,{children:[R.jsxs(xi.Section,{title:"Settings",children:[R.jsx(xi.Button,{label:"Latitude",subtitle:((e=r.signals.latitude)==null?void 0:e.name)??"Not set",onClick:r.onOpenLatitudeModal}),R.jsx(xi.Button,{label:"Longitude",subtitle:((i=r.signals.longitude)==null?void 0:i.name)??"Not set",onClick:r.onOpenLongitudeModal})]}),R.jsx(xi.Divider,{}),R.jsx(xi.Section,{title:"Actions",children:R.jsx(xi.RemoveButton,{onClick:r.onRemove})})]})}function Fat(r){const{updatePanel:e,removePanel:i}=s_(),n=r.panelConfig,{settings:t}=Dg(),o=G.useRef(null),[a,s]=G.useState(!1),[l,u]=G.useState("latitude"),c=()=>i(n.id),d=m=>e(n.id,"map",b=>({...b,signals:{...b.signals,latitude:m}})),f=m=>e(n.id,"map",b=>({...b,signals:{...b.signals,longitude:m}})),h=()=>e(n.id,"map",m=>({...m,unresolvedSignals:m.unresolvedSignals?{...m.unresolvedSignals,latitude:void 0}:void 0})),p=()=>e(n.id,"map",m=>({...m,unresolvedSignals:m.unresolvedSignals?{...m.unresolvedSignals,longitude:void 0}:void 0})),g=n.signals.latitude!==void 0&&n.signals.longitude!==void 0,v=()=>R.jsxs("div",{className:"flex flex-col justify-center items-center h-full",children:[R.jsxs("div",{className:"mb-4 flex flex-col items-center justify-center",children:[R.jsx("div",{className:"w-8 h-8 bg-accent rounded-sm flex items-center justify-center mb-2",children:R.jsx(Fr,{type:sr.TOPOLOGY_ENDPOINT,className:"w-5 h-5 text-foreground"})}),R.jsx("p",{className:"text-sm font-medium text-foreground",children:"Map panel"}),R.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"Select latitude and longitude signals to plot movement on a map"})]}),R.jsxs("div",{className:"flex gap-2",children:[R.jsx(Uc,{icon:n.signals.latitude?sr.STATUS_SUCCESS:sr.ACTION_EDIT,label:n.signals.latitude?"Latitude set":"Set latitude",type:n.signals.latitude?Qo.SUCCESS:Qo.PRIMARY,size:Vl.SM,onClick:()=>{u("latitude"),s(!0)}}),R.jsx(Uc,{icon:n.signals.longitude?sr.STATUS_SUCCESS:sr.ACTION_EDIT,label:n.signals.longitude?"Longitude set":"Set longitude",type:n.signals.longitude?Qo.SUCCESS:Qo.PRIMARY,size:Vl.SM,onClick:()=>{u("longitude"),s(!0)}})]})]}),y=()=>{var m,b;return g?R.jsxs("div",{className:"flex flex-col h-full",children:[((m=n.unresolvedSignals)==null?void 0:m.latitude)&&R.jsx(Z3,{signals:[n.unresolvedSignals.latitude],title:"Latitude signal not available",onRemoveSignal:h}),((b=n.unresolvedSignals)==null?void 0:b.longitude)&&R.jsx(Z3,{signals:[n.unresolvedSignals.longitude],title:"Longitude signal not available",onRemoveSignal:p}),R.jsx("div",{className:"flex-1 min-h-0",children:R.jsx($nt,{googleMapsApiKey:t.googleMapsApiKey,latitudeSignal:n.signals.latitude,longitudeSignal:n.signals.longitude,showSelectSignalModal:S=>{u(S==="latitude"?"latitude":"longitude"),s(!0)},onRemove:c})})]}):v()};return R.jsxs(R.Fragment,{children:[R.jsxs(tL,{ref:o,fullHeight:!0,children:[R.jsx(rL,{icon:sr.TOPOLOGY_ENDPOINT,helpTooltip:Iat,dropdown:R.jsx(Nat,{signals:n.signals,onOpenLatitudeModal:()=>{u("latitude"),s(!0)},onOpenLongitudeModal:()=>{u("longitude"),s(!0)},onRemove:c})}),R.jsx(iL,{fullHeight:!0,padding:!1,children:y()})]}),R.jsx(mz,{show:a,selectedSignals:l==="latitude"?n.signals.latitude?[n.signals.latitude]:[]:n.signals.longitude?[n.signals.longitude]:[],selectedFrames:[],handleCloseFunction:()=>s(!1),selectSignalsFunction:(m,b)=>{m.length!==0&&(l==="latitude"?d(m[0]):f(m[0]))},singleSignalSelectionOnly:!0,isFramesSelectable:!1,autoSelectParentFrame:!1,enforceFrameSelection:!1})]})}function jat(r){let e=2166136261;for(let i=0;i<r.length;i++)e^=r.charCodeAt(i),e=e*16777619>>>0;return e>>>0}function Bat(r,e,i){i/=100;const n=e*Math.min(i,1-i)/100,t=o=>{const a=(o+r/30)%12,s=i-n*Math.max(Math.min(a-3,9-a,1),-1);return Math.round(255*s).toString(16).padStart(2,"0")};return`#${t(0)}${t(8)}${t(4)}`}function Vat(r,e){const i=jat(r),n=(i&255^i>>8&255)&255,t=(i>>8&255^i>>16&255)&255,o=(i>>16&255^i>>24&255)&255,a=Math.floor(n/255*359),s=Math.floor(40+t/255*60),l=e?[50,80]:[40,70],u=Math.floor(l[0]+o/255*(l[1]-l[0]));return Bat(a,s,u)}class Hat extends jt.SmartDateLabelProvider{get formatCursorLabel(){return e=>{const i=new Date(e),n=i.getHours().toString().padStart(2,"0"),t=i.getMinutes().toString().padStart(2,"0"),o=i.getSeconds().toString().padStart(2,"0"),a=i.getMilliseconds().toString().padStart(3,"0");return`${n}:${t}:${o}.${a}`}}get formatLabel(){return Uat}}const Uat=r=>{const e=new Date(r),i=(n,t=2)=>String(n).padStart(t,"0");return`${i(e.getHours())}:${i(e.getMinutes())}:${i(e.getSeconds())}`},dB=(r,e)=>{const i=e.namedValues;return i&&r in i?i[r]+` (${r})`:null},R1e=(r,e,i)=>{if(!r||Object.keys(r).length<=1)return!1;const n=Object.keys(r).map(Number).sort((s,l)=>s-l),t=Math.min(...n),a=Math.max(...n)-t;return e!==void 0&&i!==void 0&&n.some(l=>l<e||l>i)?!1:n.length>1&&a<=10&&n.length>=a*.5},zat=(r,e,i)=>{if(r.id==="y-default"||!r||r.isDeleted)return;r.labelProvider||console.warn(`Axis ${r.id} missing label provider, skipping`),M1e(r,e);const n=R1e(e.namedValues,e.min,e.max);i&&!n?(r.visibleRangeLimit=void 0,r.autoRange=jt.EAutoRange.Never,r.setVisibleRangeWithLimits(new jt.NumberRange(e.min??0,e.max??100))):!i&&!n&&(r.visibleRangeLimit=void 0,r.autoRange=jt.EAutoRange.Always,r.growBy=new jt.NumberRange(.1,.1))},M1e=(r,e)=>{if(!r.labelProvider)return;const i=r.labelProvider.formatLabel.bind(r.labelProvider),n=e.namedValues;if(!n||Object.keys(n).length===0){r.labelProvider.formatLabel=c=>{const d=dB(c,e);return d!==null?d:i(c)};return}const t=Object.keys(n).map(Number).sort((c,d)=>c-d);if(t.length===0){r.labelProvider.formatLabel=c=>{const d=dB(c,e);return d!==null?d:i(c)};return}const o=Math.min(...t),a=Math.max(...t),s=a-o;let l=!1;e.min!==void 0&&e.max!==void 0&&(l=t.some(c=>c<e.min||c>e.max));const u=!l&&t.length>1&&s<=10&&t.length>=s*.5;if(r.drawMinorTickLines=!1,r.minorDelta=Number.MAX_VALUE,u){const c=s>0?s*.1:.5;if(r.autoRange=jt.EAutoRange.Never,r.visibleRange=new jt.NumberRange(o-c,a+c),r.growBy=new jt.NumberRange(0,0),t.length>1){const d=[];for(let h=1;h<t.length;h++)d.push(t[h]-t[h-1]);const f=Math.min(...d);r.majorDelta=f}else r.majorDelta=1;r.labelProvider.formatLabel=d=>{const f=t.find(h=>Math.abs(h-d)<.001);if(f!==void 0){const h=dB(f,e);return h!==null?h:i(d)}return""}}else{if(r.autoRange=jt.EAutoRange.Always,r.growBy=new jt.NumberRange(.1,.1),t.length>1){const c=[];for(let f=1;f<t.length;f++)c.push(t[f]-t[f-1]);const d=Math.min(...c);r.majorDelta=Math.min(d,1)}else r.majorDelta=1;r.labelProvider.formatLabel=c=>{const d=t.find(f=>Math.abs(f-c)<.001);if(d!==void 0){const f=dB(d,e);return f!==null?f:i(c)}return i(c)}}},fB=(r,e,i=1e-9)=>Math.abs(r-e)<=i;class Wat{constructor(){this.groups=new Map,this.locks=new Set,this.groupWindowSizes=new Map,this.verticalGroup=new jt.SciChartVerticalGroup,this.groupSelectedPoint=new Map}add(e,i,n,t){const o=this.ensureGroup(e),a={xAxis:i,onLiveChange:n,onWindowSizeChange:t},s=o.values().next().value;if(s&&s.xAxis.visibleRange){const u=s.xAxis.visibleRange;i.visibleRange=new jt.NumberRange(u.min,u.max)}o.add(a);const l=u=>{if(!u||!u.visibleRange||this.locks.has(e))return;const c=u.visibleRange,d=this.groups.get(e);if(d){this.locks.add(e);try{d.forEach(f=>{if(f.xAxis===i)return;const h=f.xAxis.visibleRange;h&&fB(h.min,c.min)&&fB(h.max,c.max)||(f.xAxis.visibleRange=new jt.NumberRange(c.min,c.max))})}finally{this.locks.delete(e)}}};return i.visibleRangeChanged.subscribe(l),()=>{try{i.visibleRangeChanged.unsubscribe(l)}catch{}const u=this.groups.get(e);u&&(u.delete(a),u.size===0&&this.groups.delete(e))}}setLive(e,i,n,t){const o=this.groups.get(e);if(!o)return;o.forEach(s=>{var l;(l=s.onLiveChange)==null||l.call(s,i)});let a=n;if(i&&!a&&t){const s=this.groupWindowSizes.get(e);if(s){const l=t(),u=500;a=new jt.NumberRange(l-s,l+u)}}if(i&&a){this.locks.add(e);try{o.forEach(s=>{const l=s.xAxis.visibleRange;l&&fB(l.min,a.min)&&fB(l.max,a.max)||(s.xAxis.visibleRange=new jt.NumberRange(a.min,a.max))})}finally{this.locks.delete(e)}}}setWindowSize(e,i){this.groupWindowSizes.set(e,i);const n=this.groups.get(e);n&&n.forEach(t=>{var o;(o=t.onWindowSizeChange)==null||o.call(t,i)})}getSelectedPoint(e){return this.groupSelectedPoint.get(e)}setSelectedPoint(e,i){this.groupSelectedPoint.set(e,i)}getWindowSize(e){return this.groupWindowSizes.get(e)}clearGroup(e){this.groups.delete(e),this.locks.delete(e),this.groupWindowSizes.delete(e)}ensureGroup(e){let i=this.groups.get(e);return i||(i=new Set,this.groups.set(e,i)),i}addSurface(e){this.verticalGroup.addSurfaceToGroup(e)}}const Gat=new Wat;function Yat(){return G.useMemo(()=>Gat,[])}const $at=1.5;class qat{constructor(){this.lastTimestampRef={},this.gapAnnotationsRef=[],this.clearGapAnnotations=e=>{this.gapAnnotationsRef.forEach(i=>{try{e.annotations.remove(i)}catch{}}),this.gapAnnotationsRef=[]}}detectAll(e,i,n){e.forEach(t=>this.detect(t,i,n))}detect(e,i,n){if(!Number.isFinite(e.value))return;const t=e.timestampeUs/1e3,o=this.lastTimestampRef[e.name];if(o!==void 0){const a=t-o,s=$at*1e3;a>s&&(console.log(`Gap detected for ${e.name}: ${a}ms > ${s}ms, inserting line break and gap annotation`),i.append(o+1,NaN),this.addGapAnnotation(o,t,e.name,n))}this.lastTimestampRef[e.name]=t}addGapAnnotation(e,i,n,t){console.log(`addGapAnnotation called: startTime=${e}, endTime=${i}, key=${n}`);const o=new jt.VerticalLineAnnotation({id:`gap-start-${n}-${e}`,x1:e,strokeThickness:1,strokeDashArray:[1,2],annotationLayer:jt.EAnnotationLayer.AboveChart}),a=new jt.VerticalLineAnnotation({id:`gap-end-${n}-${i}`,x1:i,strokeThickness:1,strokeDashArray:[1,2],annotationLayer:jt.EAnnotationLayer.AboveChart});console.log(`Adding gap annotations at start: ${e} and end: ${i}`),t.annotations.add(o),t.annotations.add(a),this.gapAnnotationsRef.push(o,a),console.log(`Gap annotations added, total annotations: ${this.gapAnnotationsRef.length}`)}}const Xat=new qat;function Kat(){return G.useMemo(()=>Xat,[])}const Zat=r=>{const e=new Date(r),i=(n,t=2)=>String(n).padStart(t,"0");return`${i(e.getHours())}:${i(e.getMinutes())}:${i(e.getSeconds())}.${String(e.getMilliseconds()).padStart(3,"0")}`};function Jat(r,e,i,n){function t(a){return Math.abs(a)<1e3?`${Math.round(a)}ms`:`${(a/1e3).toFixed(3)}s`}const o=new jt.RolloverModifier({modifierGroup:"asd",showRolloverLine:!0,snapToDataPoint:!0,hitTestRadius:0,tooltipDataTemplate:a=>{const s=typeof a.xValue=="number"?Zat(a.xValue):a.formattedXValue;let l;if(typeof a.yValue=="number"){const c=n(a.yValue);l=c!==null?c:a.yValue.toFixed(3)}else l=a.formattedYValue;const u=[`${s}`,`${l}`];if(i&&e.getSelectedPoint(i)){const c=e.getSelectedPoint(i),d=a.xValue-e.getSelectedPoint(i).x;if(u.push("- - - - -"),c.id===a.seriesName){const f=n(c.y);l=f!==null?f:c.y.toFixed(3),u.push(`Value: ${l}`)}u.push(`Timediff: ${t(d)}`)}return u}});r.chartModifiers.add(o)}function Qat(r,e,i){const n=new jt.ZoomPanModifier({enableZoom:!1,executeCondition:{button:jt.EExecuteOn.MouseLeftButton,key:jt.EModifierMouseArgKey.Ctrl},xyDirection:jt.EXyDirection.XDirection}),t=new jt.MouseWheelZoomModifier({executeCondition:{key:jt.EModifierMouseArgKey.Alt},xyDirection:jt.EXyDirection.XDirection,growFactor:.01}),o=new jt.RubberBandXyZoomModifier({executeCondition:{button:jt.EExecuteOn.MouseLeftButton,key:jt.EModifierMouseArgKey.Alt},xyDirection:jt.EXyDirection.XDirection}),a=new jt.ZoomExtentsModifier;r.chartModifiers.add(n,t,a,o),r.chartModifiers.add(new jt.DataPointSelectionModifier({onSelectionChanged:s=>{s.selectedDataPoints.length>0&&e.setSelectedPoint(i,{x:s.selectedDataPoints[0].xValue,y:s.selectedDataPoints[0].yValue,id:s.selectedDataPoints[0].seriesName})},allowDragSelect:!1,selectionFill:"#ffffff",selectionStroke:"#ff0000",selectionStrokeThickness:4}))}jt.SciChartSurface.useWasmFromCDN();const est=200,mge=1;function tst({isPaused:r=!1,onPausedChange:e,chartHeight:i=150,windowSizeMs:n=1e4,getTime:t,signals:o,signalBuffersRef:a,isDarkMode:s=!0,groupId:l="subchart-group",useSuggestedMinMax:u=!1,animationMaxFps:c,onRemoveSignal:d}){const f=G.useRef(null),h=G.useRef(new Map),p=G.useRef(null),g=G.useRef(0),v=G.useRef(1e3/c);v.current=1e3/c;const y=G.useRef(n),m=G.useRef(!0),b=G.useRef(null),S=G.useRef(new Map),_=G.useRef(null),C=G.useRef(new Set),T=G.useRef(!1),[x,A]=G.useState(null),[w,L]=G.useState(null),k=G.useRef(new Map),D=G.useRef(t);D.current=t;const j=G.useRef(o);j.current=o;const N=Yat(),V=Kat(),W=G.useRef(new Map);G.useEffect(()=>{y.current=n,N.setWindowSize(l,n)},[n,N,l]),G.useEffect(()=>{r?H():U()},[r]);const K=G.useCallback((Ee,Re)=>{const je=Re.namedValues;return je&&Ee in je?je[Ee]+` (${Ee})`:null},[]),H=G.useCallback(()=>{N.setLive(l,!1),e(!0)},[N,l]),U=G.useCallback(()=>{N.setLive(l,!0,void 0,D.current)},[N,l]),I=G.useCallback(()=>{for(const[Ee,Re]of h.current){const je=a.current.get(Ee);if(!je)continue;const Ke=je.current;if(Ke.length===0)continue;je.current=[];const ot=Ke[0].timestampeUs/1e3,We=S.current.get(Ee)??0;ot<We&&Re.dataSeries.clear(),S.current.set(Ee,Ke[Ke.length-1].timestampeUs/1e3),V.detectAll(Ke,Re.dataSeries,Re.surface);const xe=new Float64Array(Ke.map(he=>he.timestampeUs/1e3)),ve=new Float64Array(Ke.map(he=>he.value));Re.dataSeries.appendRange(xe,ve)}},[V]),Q=G.useCallback((Ee,Re,je,Ke,ot)=>{const We=mge/ot,xe=Ke*We,ve=.005,he=jt.SciChartSubSurface.createSubSurface(Ee,{position:{x:0,y:xe+ve/2,width:1,height:We-ve},isTransparent:!1});he.suspendUpdates();const Se=new jt.DateTimeNumericAxis(Re,{autoRange:jt.EAutoRange.Never,drawLabels:Ke===ot-1,drawMajorTickLines:!1,drawMinorTickLines:!1,drawMajorGridLines:!0,drawMinorGridLines:!1,labelProvider:new Hat,useNativeText:!0});he.xAxes.add(Se);const be=new jt.NumericAxis(Re,{axisAlignment:jt.EAxisAlignment.Left,autoRange:jt.EAutoRange.Always,growBy:new jt.NumberRange(.1,.1),drawMajorTickLines:!1,drawMinorTickLines:!1,drawMajorGridLines:!0,drawMinorGridLines:!1,isInnerAxis:!0});be.growBy=new jt.NumberRange(.1,.1),he.yAxes.add(be),M1e(be,je);const ke=R1e(je.namedValues,je.min,je.max);u&&!ke&&(be.autoRange=jt.EAutoRange.Never,be.visibleRange=new jt.NumberRange(je.min??0,je.max??100));const qe=new jt.XyDataSeries(Re,{fifoCapacity:1e5,dataSeriesName:je.name,dataIsSortedInX:!0,containsNaN:!1}),rt=Vat(je.name,s),St=new jt.FastLineRenderableSeries(Re,{dataSeries:qe,stroke:rt,strokeThickness:2,drawNaNAs:jt.ELineDrawMode.DiscontinuousLine}),xt=new jt.EllipsePointMarker(Re,{width:4,height:4,strokeThickness:0,fill:rt});St.pointMarker=xt,he.renderableSeries.add(St);const It=new jt.VerticalLineAnnotation({id:"selectedPoint",x1:0,strokeThickness:2,strokeDashArray:[3,3],annotationLayer:jt.EAnnotationLayer.AboveChart});he.annotations.add(It),Jat(he,N,l,Qe=>K(Qe,je)),Qat(he,N,l);const ct=N.add(l,Se,Qe=>{m.current=Qe,b.current&&(b.current.style.display=Qe?"none":"block")},Qe=>{y.current=Qe});return W.current.set(je.longName(),ct),X3(he,s),he.resumeUpdates(),{surface:he,dataSeries:qe,xAxis:Se,yAxis:be,signalMeta:je}},[s,u,N,l,K]),Z=G.useCallback(Ee=>{const Re=h.current.get(Ee);if(!Re)return;const je=W.current.get(Ee);je&&(je(),W.current.delete(Ee)),f.current&&f.current.removeSubChart(Re.surface),Re.surface.delete(),h.current.delete(Ee),C.current.delete(Ee),S.current.delete(Ee)},[]),ee=G.useCallback((Ee,Re)=>{const je=j.current;if(je.length===0)return;const Ke=je.length;je.forEach((ot,We)=>{const xe=ot.longName();if(C.current.has(xe)){const ve=h.current.get(xe);if(ve){const he=mge/Ke,Se=We*he,be=.005;ve.surface.subPosition={x:0,y:Se+be/2,width:1,height:he-be},ve.xAxis.drawLabels=We===Ke-1}}else{const ve=Q(Ee,Re,ot,We,Ke);h.current.set(xe,ve),C.current.add(xe)}})},[Q]),ie=G.useMemo(()=>async Ee=>{h.current.clear(),C.current.clear(),S.current.clear();for(const Ke of W.current.values())Ke();W.current.clear();const{wasmContext:Re,sciChartSurface:je}=await jt.SciChartSurface.create(Ee);return f.current=je,_.current=Re,je.applyTheme(a6(s).scichartTheme()),je.domCanvas2D.addEventListener("wheel",Ke=>{Ke.altKey&&H()},{passive:!0}),je.domCanvas2D.addEventListener("pointerdown",Ke=>{(Ke.ctrlKey||Ke.altKey)&&H()}),ee(je,Re),T.current=!0,{sciChartSurface:je}},[s,H,ee]);G.useEffect(()=>{let Ee=!0;const Re=()=>{if(!T.current||!f.current){requestAnimationFrame(Re);return}const je=Ke=>{if(Ee){if(Ke-g.current>=v.current){g.current=Ke,I();const ot=D.current();if(m.current){const xe=new jt.NumberRange(ot-y.current,ot+est);for(const ve of h.current.values())if(ve.surface.xAxes.size()>0){ve.xAxis.visibleRange=xe;const he=ve.surface.annotations.getById("playhead");if(he){const Se=he;Se.x1=ot}}}const We=N.getSelectedPoint(l);if(We){for(const xe of h.current.values())if(xe.surface.xAxes.size()>0){const ve=xe.surface.annotations.getById("selectedPoint");if(ve){const he=ve;he.x1=We.x}}}}p.current=requestAnimationFrame(je)}};p.current=requestAnimationFrame(je)};return Re(),()=>{Ee=!1,p.current&&cancelAnimationFrame(p.current);for(const je of W.current.values())je();W.current.clear(),h.current.clear(),C.current.clear(),S.current.clear(),T.current=!1}},[I,N,l]);const de=G.useMemo(()=>o.map(Ee=>Ee.longName()).join(","),[o]);G.useEffect(()=>{const Ee=f.current,Re=_.current;if(!Ee||!Re||!T.current)return;const je=new Set(j.current.map(Ke=>Ke.longName()));for(const Ke of[...h.current.keys()])je.has(Ke)||Z(Ke);ee(Ee,Re)},[de,ee,Z]),G.useEffect(()=>{if(f.current&&T.current){f.current.applyTheme(a6(s).scichartTheme());for(const Ee of h.current.values())X3(Ee.surface,s)}},[s]),G.useEffect(()=>{if(T.current)for(const Ee of h.current.values()){const{yAxis:Re,signalMeta:je,surface:Ke}=Ee;if(!(!Re||!Ke))try{Ke.suspendUpdates(),zat(Re,je,u)}finally{Ke.resumeUpdates()}}},[u,o]);const pe=i*Math.max(o.length,1),_e=G.useCallback((Ee,Re)=>{if(x===Ee)A(null),L(null);else{const je=Re.getBoundingClientRect();L({top:je.bottom+4,left:je.left}),A(Ee)}},[x]),Te=G.useCallback(Ee=>{navigator.clipboard.writeText(Ee).catch(Re=>{console.error("Failed to copy text:",Re)})},[]),De=G.useCallback(()=>{const Ee=o.find(je=>je.longName()===x);if(!Ee||!w)return R.jsx(R.Fragment,{children:" "});const Re=({label:je,value:Ke,truncate:ot})=>R.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:"8px",minWidth:0},children:[R.jsxs("div",{style:ot?{overflow:"hidden",minWidth:0}:void 0,children:[R.jsxs("span",{style:{opacity:.7},children:[je,": "]}),R.jsx("span",{style:ot?{display:"inline-block",maxWidth:"350px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",verticalAlign:"bottom"}:void 0,title:ot?String(Ke):void 0,children:Ke})]}),R.jsx("button",{onClick:()=>Te(String(Ke)),style:{padding:"2px",background:"transparent",border:"none",cursor:"pointer",color:s?"rgba(255, 255, 255, 0.5)":"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},onMouseEnter:We=>{We.currentTarget.style.color=s?"rgba(255, 255, 255, 0.9)":"rgba(0, 0, 0, 0.9)"},onMouseLeave:We=>{We.currentTarget.style.color=s?"rgba(255, 255, 255, 0.5)":"rgba(0, 0, 0, 0.5)"},title:`Copy ${je}`,children:R.jsx(I6,{size:12})})]});return au.createPortal(R.jsxs("div",{style:{position:"fixed",top:w.top,left:w.left,backgroundColor:s?"#1f2937":"#ffffff",border:`1px solid ${s?"#374151":"#e5e7eb"}`,borderRadius:"6px",padding:"8px 12px",minWidth:"250px",maxWidth:"400px",boxShadow:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",zIndex:1e4,fontSize:"11px",lineHeight:"1.5",color:s?"#e5e7eb":"#1f2937",fontFamily:"monospace",whiteSpace:"pre-wrap",wordBreak:"break-word",pointerEvents:"auto"},children:[R.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"6px"},children:[R.jsx("span",{style:{fontWeight:"bold",fontSize:"12px"},children:"Signal Information"}),R.jsx("button",{onClick:()=>{A(null),L(null)},style:{padding:"2px",background:"transparent",border:"none",cursor:"pointer",color:s?"rgba(255, 255, 255, 0.5)":"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center"},onMouseEnter:je=>{je.currentTarget.style.color=s?"rgba(255, 255, 255, 0.9)":"rgba(0, 0, 0, 0.9)"},onMouseLeave:je=>{je.currentTarget.style.color=s?"rgba(255, 255, 255, 0.5)":"rgba(0, 0, 0, 0.5)"},title:"Close",children:R.jsx(IN,{size:14})})]}),R.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[R.jsx(Re,{label:"Name",value:Ee.name,truncate:!0}),R.jsx(Re,{label:"Frame",value:Ee.frameName,truncate:!0}),R.jsx(Re,{label:"Namespace",value:Ee.namespace}),R.jsx(Re,{label:"ID",value:`${Ee.namespace}:${Ee.name}`,truncate:!0}),Ee.description&&R.jsx(Re,{label:"Description",value:Ee.description}),Ee.unit&&R.jsx(Re,{label:"Unit",value:Ee.unit}),Ee.min!==void 0&&R.jsx(Re,{label:"Min",value:Ee.min}),Ee.max!==void 0&&R.jsx(Re,{label:"Max",value:Ee.max}),Ee.namedValues&&Object.keys(Ee.namedValues).length>0&&R.jsxs("div",{children:[R.jsx("div",{style:{opacity:.7,marginBottom:"2px"},children:"Named Values:"}),R.jsx("div",{style:{paddingLeft:"8px",maxHeight:"150px",overflowY:"auto"},children:Object.entries(Ee.namedValues).map(([je,Ke])=>R.jsxs("div",{style:{fontSize:"10px",display:"flex",justifyContent:"space-between",alignItems:"center",gap:"4px"},children:[R.jsxs("div",{children:[R.jsxs("span",{style:{opacity:.6},children:[je,": "]}),R.jsx("span",{children:Ke})]}),R.jsx("button",{onClick:()=>Te(String(Ke)),style:{padding:"2px",background:"transparent",border:"none",cursor:"pointer",color:s?"rgba(255, 255, 255, 0.5)":"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},onMouseEnter:ot=>{ot.currentTarget.style.color=s?"rgba(255, 255, 255, 0.9)":"rgba(0, 0, 0, 0.9)"},onMouseLeave:ot=>{ot.currentTarget.style.color=s?"rgba(255, 255, 255, 0.5)":"rgba(0, 0, 0, 0.5)"},title:"Copy value",children:R.jsx(I6,{size:10})})]},je))})]})]})]}),document.body)},[x,w,s,o,Te]),Pe=G.useCallback(()=>{const Ee=o.find(Re=>Re.longName()===x);return R.jsxs(R.Fragment,{children:[R.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,pointerEvents:"none",zIndex:1},children:o.map((Re,je)=>{const Ke=je*i,ot=Re.longName();return R.jsxs("div",{style:{position:"absolute",top:Ke-4,left:8,right:8,fontSize:10,color:a6(s).buttonText,fontFamily:"monospace",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[R.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[R.jsx("span",{children:Re.name}),R.jsx("button",{ref:We=>{We&&k.current.set(ot,We)},onClick:We=>_e(ot,We.currentTarget),className:"pointer-events-auto transition-all duration-200",style:{padding:"4px",borderRadius:"50%",background:"transparent",color:s?"rgba(255, 255, 255, 0.7)":"rgba(0, 0, 0, 0.7)",border:"0",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",width:"24px",height:"24px"},onMouseEnter:We=>{We.currentTarget.style.color=s?"rgba(255, 255, 255, 1)":"rgba(0, 0, 0, 1)"},onMouseLeave:We=>{We.currentTarget.style.color=s?"rgba(255, 255, 255, 0.7)":"rgba(0, 0, 0, 0.7)"},title:"Signal information",children:R.jsx(N6,{size:14})})]}),d&&R.jsx("button",{onClick:()=>d(Re),className:`pointer-events-auto opacity-0 group-hover/area:opacity-70 hover:!opacity-100 
                                                   transition-all duration-200 p-0.5 rounded bg-black/50 hover:bg-red-600 
                                                   text-white/60 hover:text-white border-0 cursor-pointer 
                                                   flex items-center justify-center w-4 h-4 text-[10px] leading-none`,title:"Remove signal",children:R.jsx(IN,{size:12})})]},ot)})}),Ee&&w&&De()]})},[o,s,i,d,x,w,_e]);return R.jsxs("div",{style:{position:"relative"},children:[Pe(),R.jsx(eL.SciChartReact,{initChart:ie,style:{width:"100%",height:pe,borderRadius:0,border:"none",overflow:"hidden"}})]})}function Q2(r){const{className:e,...i}=r;return R.jsx("kbd",{"data-slot":"kbd",className:Nr("bg-muted text-muted-foreground border border-muted-foreground border-t-0 border-s-0 in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 h-5 w-fit min-w-5 gap-1 rounded px-1 font-sans text-xs font-medium [&_svg:not([class*='size-'])]:size-3 pointer-events-none inline-flex items-center justify-center select-none",e),...i})}const rst=R.jsxs("div",{className:"max-w-md space-y-1",children:[R.jsx("p",{className:"text-sm font-semibold",children:"Timeseries"}),R.jsxs("p",{className:"text-xs",children:[R.jsx("span",{className:"font-bold",children:"Settings"}),":"]}),R.jsxs("p",{className:"text-xs ms-2",children:[R.jsx("span",{className:"font-semibold",children:"Chart width"}),": Set the width of the chart in seconds",R.jsx("br",{}),R.jsx("span",{className:"font-semibold",children:"Min/max"}),": Set to use signal-defined min/max for Y-axis",R.jsx("br",{}),R.jsx("span",{className:"font-semibold",children:"Max FPS"}),": Set the maximum update frequency for the chart"]}),R.jsxs("p",{className:"text-xs",children:[R.jsx("span",{className:"font-bold",children:"Navigation"}),":"]}),R.jsxs("p",{className:"text-xs ms-2",children:[R.jsx("span",{className:"font-semibold",children:"Zoom in/out"}),": ",R.jsx(Q2,{children:"Alt"})," or"," ",R.jsx(Q2,{className:"font-[arial]",children:"⌥"})," + scroll/pinch",R.jsx("br",{}),R.jsx("span",{className:"font-semibold",children:"Zoom in"}),": ",R.jsx(Q2,{children:"Alt"})," or"," ",R.jsx(Q2,{className:"font-[arial]",children:"⌥"})," + select area",R.jsx("br",{}),R.jsx("span",{className:"font-semibold",children:"Pan"}),": ",R.jsx(Q2,{children:"Ctrl"})," + drag",R.jsx("br",{}),R.jsx("span",{className:"font-semibold",children:"Show all"}),": Double click",R.jsx("br",{}),R.jsx("span",{className:"font-semibold",children:"Select signal value"}),": Click on point",R.jsx("br",{}),R.jsx("span",{className:"font-semibold",children:"Measure time"}),": First select signal value, then hover any chart to see time-diff in tooltip"]})]});function ist({settings:r,onChartWidthChange:e,onUseSuggestedMinMaxChange:i,onToggleSyncCharts:n,onMaxFpsChange:t,onAddSignal:o,onRemove:a}){const s=r.chartWidthSeconds!==void 0||i!==void 0||n!==void 0||t!==void 0;return R.jsxs(xi,{children:[s&&R.jsxs(R.Fragment,{children:[R.jsxs(xi.Section,{title:"Settings",children:[r.chartWidthSeconds!==void 0&&e&&R.jsx(xi.NumberStepper,{label:"Chart width",value:r.chartWidthSeconds,onChange:e,min:5,max:300,step:5,formatValue:l=>`${l}s`}),i&&R.jsx(xi.Toggle,{label:"Min/max",checked:r.useSuggestedMinMax,onChange:i}),t&&R.jsx(xi.NumberStepper,{label:"Max FPS",value:r.maxFps,onChange:t,min:5,max:120,step:5})]}),R.jsx(xi.Divider,{})]}),R.jsxs(xi.Section,{title:"Actions",children:[o&&R.jsx(xi.Button,{icon:sr.ACTION_EDIT,label:"Select signals",onClick:o}),a&&R.jsx(xi.RemoveButton,{onClick:a})]})]})}function nst(r){const{updatePanel:e,removePanel:i}=s_(),n=G.useRef(null),[t,o]=G.useState(80),{isDarkMode:a}=TM(),s=Cj(),l=G.useRef(new Map),[u,c]=G.useState(!1),[d,f]=G.useState(!1),h=G.useRef(new Set),p=r.panelConfig,g=p.unresolvedSignals&&p.unresolvedSignals.length>0,v=T=>(l.current.has(T)||l.current.set(T,{current:[]}),l.current.get(T));G.useEffect(()=>{(()=>{let x=!1;p.signals.forEach(A=>{const w=A.longName();if(h.current.has(w))return;v(w);const L=D=>{const j=l.current.get(w);if(j)for(const N of D.signals)N.name===A.name&&j.current.push(N)},k=new _F([A.id],L,()=>{});s.addPendingSubscription(k),h.current.add(w),x=!0}),x&&s.applyPendingSubscriptions()})()},[s,p.signals]),G.useEffect(()=>{if(!n.current)return;const T=new ResizeObserver(x=>{for(const A of x){const w=A.contentRect.height;if(w>0){let k=w-36;if(g&&p.unresolvedSignals){const N=8+p.unresolvedSignals.length*100;k-=N}const D=Math.max(1,p.signals.length),j=Math.floor(k/D);o(Math.max(50,j))}}});return T.observe(n.current),()=>T.disconnect()},[p.signals,g,p.unresolvedSignals]);const y=()=>Date.now(),m=()=>R.jsxs("div",{className:"flex flex-col justify-center items-center h-full",children:[R.jsxs("div",{className:"mb-4 flex flex-col items-center justify-center",children:[R.jsx("div",{className:"w-8 h-8 bg-accent rounded-sm flex items-center justify-center mb-2",children:R.jsx(Fr,{type:sr.DATA_TIMESERIES,className:"w-5 h-5 text-foreground"})}),R.jsx("p",{className:"text-sm font-medium text-foreground",children:"Timeseries panel"}),R.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"Select signals to plot values over time in a chart"})]}),R.jsx(Uc,{icon:sr.ACTION_EDIT,label:"Select signals",type:Qo.PRIMARY,size:Vl.SM,onClick:()=>c(!0)})]}),b=()=>R.jsxs("button",{onClick:()=>f(!d),className:Nr("flex items-center gap-1 px-2 py-0.5 rounded text-xs transition-colors",d?"bg-green-600/20 text-green-600 dark:text-green-400 hover:bg-green-600/30":"bg-muted text-foreground hover:bg-accent"),children:[R.jsx(Fr,{type:d?sr.MEDIA_PLAY:sr.MEDIA_PAUSE,className:"w-3 h-3"}),R.jsx("span",{className:"text-xs",children:d?"Resume":"Pause"})]}),S=()=>R.jsxs("div",{className:"flex items-center gap-2",children:[b(),R.jsx(ist,{settings:p,onChartWidthChange:T=>e(r.panelId,"timeseries",x=>({...x,chartWidthSeconds:T})),onUseSuggestedMinMaxChange:T=>e(r.panelId,"timeseries",x=>({...x,useSuggestedMinMax:T})),onToggleSyncCharts:T=>e(r.panelId,"timeseries",x=>({...x,syncCharts:T})),onMaxFpsChange:T=>e(r.panelId,"timeseries",x=>({...x,maxFps:T})),onAddSignal:()=>c(!0),onRemove:()=>i(r.panelId)})]}),_=T=>{e(r.panelId,"timeseries",x=>({...x,signals:x.signals.filter(A=>A.name!==T.name)}))},C=T=>p.signals.length===0&&!g?m():R.jsxs(R.Fragment,{children:[g&&R.jsx(Z3,{signals:p.unresolvedSignals??[],onRemoveSignal:x=>e(r.panelId,"timeseries",A=>{var w;return{...A,unresolvedSignals:(w=A.unresolvedSignals)==null?void 0:w.filter(L=>!(L.namespace===x.namespace&&L.frame===x.frame&&L.signal===x.signal))}})}),p.signals.length>0&&R.jsx(tst,{onPausedChange:x=>f(x),isPaused:d,signals:p.signals,signalBuffersRef:l,getTime:y,chartHeight:T,windowSizeMs:p.chartWidthSeconds*1e3,isDarkMode:a,groupId:r.panelId,useSuggestedMinMax:p.useSuggestedMinMax,animationMaxFps:p.maxFps,onRemoveSignal:_})]});return R.jsxs(R.Fragment,{children:[R.jsxs(tL,{ref:n,fullHeight:!0,children:[R.jsx(rL,{icon:sr.DATA_TIMESERIES,dropdown:S(),helpTooltip:rst}),R.jsx(iL,{fullHeight:!0,padding:!1,children:C(t)})]}),R.jsx(mz,{show:u,selectedSignals:p.signals,selectedFrames:[],handleCloseFunction:()=>c(!1),selectSignalsFunction:(T,x)=>{e(r.panelId,"timeseries",A=>({...A,signals:[...T]}))},isFramesSelectable:!1,autoSelectParentFrame:!1,enforceFrameSelection:!1})]})}const ost=R.jsxs("div",{className:"max-w-md space-y-1",children:[R.jsx("p",{className:"text-sm font-semibold",children:"Video"}),R.jsxs("p",{className:"text-xs text-neutral-200",children:[R.jsx("span",{className:"font-bold",children:"Settings"}),":"]}),R.jsxs("p",{className:"text-xs text-neutral-200 ms-2",children:[R.jsx("span",{className:"font-semibold",children:"Sound"}),": Mute/unmute video audio"]})]});function ast(r){const e=r.testOffset!==void 0?r.testOffset:r.videoOffsetSeconds;return R.jsxs(xi,{children:[R.jsx(xi.Section,{title:"Settings",children:R.jsx(xi.Toggle,{label:"Sound",checked:!r.soundMuted,onChange:i=>r.onSoundMutedChange(!i)})}),t1e()&&R.jsxs(R.Fragment,{children:[R.jsx(xi.Divider,{}),R.jsxs(xi.Section,{title:"Debug",children:[R.jsx(xi.Toggle,{label:"Debug panel",checked:r.showDebugPanel,onChange:r.onShowDebugPanelChange}),r.showDebugPanel&&R.jsxs(R.Fragment,{children:[R.jsx(xi.NumberStepper,{label:"Test offset (s)",value:e,onChange:r.onTestOffsetChange,step:.5,formatValue:i=>i.toFixed(1)}),r.testOffset!==void 0&&R.jsx(xi.Button,{icon:sr.ACTION_REFRESH,label:"Reset offset",onClick:()=>r.onTestOffsetChange(void 0),variant:"primary"})]})]})]}),R.jsx(xi.Divider,{}),R.jsxs(xi.Section,{title:"Actions",children:[R.jsx(xi.Button,{icon:sr.FILE_VIDEO,label:"Select video",onClick:r.onSelectVideo}),R.jsx(xi.RemoveButton,{onClick:r.onRemove})]})]})}function sst(r){const{updatePanel:e,removePanel:i}=s_(),n=r.panelConfig,t=G.useRef(null),[o,a]=G.useState(400),[s,l]=G.useState(!0),[u,c]=G.useState(!1),[d,f]=G.useState(void 0),[h,p]=G.useState(null),[g,v]=G.useState(!1),y=n.videoFilePath,m=n.videoName,b=n.recordingSessionPath,S=y!=null&&y.length>0||m!=null&&m.length>0,_=SEe(b||""),C=c9(),{resolvedVideoFile:T,resolvedSessionPath:x,ambiguous:A}=(()=>{if(!S)return{resolvedVideoFile:void 0,resolvedSessionPath:void 0,ambiguous:!1};const N=_==null?void 0:_.recordingSessionInfo.videos.find(V=>V.location===y);if(N)return{resolvedVideoFile:N,resolvedSessionPath:b,ambiguous:!1};if(m){const V=C.flatMap(W=>W.recordingSessionInfo.videos.filter(K=>K.name===m).map(K=>({videoFile:K,sessionPath:W.recordingSessionInfo.path})));if(V.length===1)return{resolvedVideoFile:V[0].videoFile,resolvedSessionPath:V[0].sessionPath,ambiguous:!1};if(V.length>1)return{resolvedVideoFile:void 0,resolvedSessionPath:void 0,ambiguous:!0}}return{resolvedVideoFile:void 0,resolvedSessionPath:void 0,ambiguous:!1}})();G.useEffect(()=>{if(!t.current)return;const N=new ResizeObserver(V=>{for(const W of V){const K=W.contentRect.height;K>0&&a(Math.max(200,K-36-16))}});return N.observe(t.current),()=>N.disconnect()},[]);const w=()=>i(n.id),L=N=>e(n.id,"video",V=>({...V,videoFilePath:N.videoFilePath,recordingSessionPath:N.recordingSessionPath,videoName:N.videoName})),k=()=>{if(!h)return y;const N=h.hasEnded?"Video has ended":`Offset: ${h.offsetSeconds}s`,V=`${iM(h.currentTimeSeconds*1e3)} / ${iM(h.lengthSeconds*1e3)}`;return`${N} · ${V}`},D=()=>R.jsxs("div",{className:"flex flex-col justify-center items-center h-full",children:[R.jsxs("div",{className:"mb-4 flex flex-col items-center justify-center",children:[R.jsx("div",{className:"w-8 h-8 bg-accent rounded-sm flex items-center justify-center mb-2",children:R.jsx(Fr,{type:sr.FILE_VIDEO,className:"w-5 h-5 text-foreground"})}),R.jsx("p",{className:"text-sm font-medium text-foreground",children:"Video panel"}),R.jsx("p",{className:"text-xs text-muted-foreground text-center max-w-sm",children:"Select video from a recording session for synchronized playback"})]}),R.jsx(Uc,{icon:sr.ACTION_ADD,label:"Select video",type:Qo.PRIMARY,size:Vl.SM,onClick:()=>v(!0)})]}),j=()=>S?C.length===0?R.jsx(b1,{title:"No recording session open",message:"No recording sessions are currently open.",suggestion:"Open a recording session to view this video."}):A?R.jsx(b1,{title:"Ambiguous video",message:`Multiple videos named "${m}" were found across open recording sessions.`,suggestion:"Re-select the video to specify which recording session to use."}):!T||!x?R.jsx(b1,{title:"Video file not found",message:`The video "${m||y}" was not found in any open recording session.`,suggestion:"The video may have been removed or renamed."}):R.jsx(Xnt,{panelKey:r.panelId,removePanelFunction:w,videoPanelSettings:{videoFilePath:T.location,recordingSessionPath:x},hideHeader:!0,height:o,soundMuted:s,onSoundMutedChange:l,showDebugPanel:u,onShowDebugPanelChange:c,testOffset:d,onTestOffsetChange:f,onVideoInfoChange:p}):D();return R.jsxs(R.Fragment,{children:[R.jsxs(tL,{ref:t,fullHeight:!0,children:[R.jsx(rL,{icon:sr.FILE_VIDEO,helpTooltip:ost,dropdown:R.jsx(ast,{soundMuted:s,onSoundMutedChange:l,showDebugPanel:u,onShowDebugPanelChange:c,testOffset:d,onTestOffsetChange:f,videoOffsetSeconds:(h==null?void 0:h.offsetSeconds)??0,onSelectVideo:()=>v(!0),onRemove:w}),children:R.jsxs("div",{className:"min-w-0 flex-1",children:[R.jsxs("div",{className:"flex items-center gap-1",children:[R.jsx("span",{className:"text-xs font-sm truncate text-left",title:(T==null?void 0:T.location)||y,children:(T==null?void 0:T.name)||""}),T&&R.jsx(PM,{side:"bottom",content:R.jsxs("div",{className:"text-xs space-y-1",children:[R.jsxs("div",{children:[R.jsx("span",{className:"text-neutral-400",children:"Recording: "}),x]}),R.jsxs("div",{children:[R.jsx("span",{className:"text-neutral-400",children:"Video name: "}),T.name]}),R.jsxs("div",{children:[R.jsx("span",{className:"text-neutral-400",children:"Video path: "}),T.location]}),R.jsxs("div",{children:[R.jsx("span",{className:"text-neutral-400",children:"Offset: "}),T.offsetMs," ms"]})]}),children:R.jsx(Fr,{type:sr.STATUS_INFO,className:"w-3 h-3 text-muted-foreground shrink-0 cursor-help"})})]}),h&&R.jsx("span",{className:"text-[10px] text-muted-foreground block truncate",children:k()})]})}),R.jsx(iL,{fullHeight:!0,padding:!1,children:j()})]}),R.jsx(PKe,{show:g,handleCloseFunction:()=>v(!1),savePanelFunction:(N,V)=>{L(V),v(!1)}})]})}class ir{static getElements(e,i=document){if(typeof e=="string"){const n="getElementById"in i?i:void 0;if(n&&!isNaN(+e[0])){const o=n.getElementById(e);return o?[o]:[]}let t=i.querySelectorAll(e);if(!t.length&&e[0]!=="."&&e[0]!=="#"&&(t=i.querySelectorAll("."+e),t.length||(t=i.querySelectorAll("#"+e)),!t.length)){const o=i.querySelector(`[gs-id="${e}"]`);return o?[o]:[]}return Array.from(t)}return[e]}static getElement(e,i=document){if(typeof e=="string"){const n="getElementById"in i?i:void 0;if(!e.length)return null;if(n&&e[0]==="#")return n.getElementById(e.substring(1));if(e[0]==="#"||e[0]==="."||e[0]==="[")return i.querySelector(e);if(n&&!isNaN(+e[0]))return n.getElementById(e);let t=i.querySelector(e);return n&&!t&&(t=n.getElementById(e)),t||(t=i.querySelector("."+e)),t}return e}static lazyLoad(e){var i,n;return e.lazyLoad||((n=(i=e.grid)==null?void 0:i.opts)==null?void 0:n.lazyLoad)&&e.lazyLoad!==!1}static createDiv(e,i){const n=document.createElement("div");return e.forEach(t=>{t&&n.classList.add(t)}),i==null||i.appendChild(n),n}static shouldSizeToContent(e,i=!1){return(e==null?void 0:e.grid)&&(i?e.sizeToContent===!0||e.grid.opts.sizeToContent===!0&&e.sizeToContent===void 0:!!e.sizeToContent||e.grid.opts.sizeToContent&&e.sizeToContent!==!1)}static isIntercepted(e,i){return!(e.y>=i.y+i.h||e.y+e.h<=i.y||e.x+e.w<=i.x||e.x>=i.x+i.w)}static isTouching(e,i){return ir.isIntercepted(e,{x:i.x-.5,y:i.y-.5,w:i.w+1,h:i.h+1})}static areaIntercept(e,i){const n=e.x>i.x?e.x:i.x,t=e.x+e.w<i.x+i.w?e.x+e.w:i.x+i.w;if(t<=n)return 0;const o=e.y>i.y?e.y:i.y,a=e.y+e.h<i.y+i.h?e.y+e.h:i.y+i.h;return a<=o?0:(t-n)*(a-o)}static area(e){return e.w*e.h}static sort(e,i=1){return e.sort((t,o)=>{const a=i*((t.y??1e4)-(o.y??1e4));return a===0?i*((t.x??1e4)-(o.x??1e4)):a})}static find(e,i){return i?e.find(n=>n.id===i):void 0}static toBool(e){return typeof e=="boolean"?e:typeof e=="string"?(e=e.toLowerCase(),!(e===""||e==="no"||e==="false"||e==="0")):!!e}static toNumber(e){return e===null||e.length===0?void 0:Number(e)}static parseHeight(e){let i,n="px";if(typeof e=="string")if(e==="auto"||e==="")i=0;else{const t=e.match(/^(-[0-9]+\.[0-9]+|[0-9]*\.[0-9]+|-[0-9]+|[0-9]+)(px|em|rem|vh|vw|%|cm|mm)?$/);if(!t)throw new Error(`Invalid height val = ${e}`);n=t[2]||"px",i=parseFloat(t[1])}else i=e;return{h:i,unit:n}}static defaults(e,...i){return i.forEach(n=>{for(const t in n){if(!n.hasOwnProperty(t))return;e[t]===null||e[t]===void 0?e[t]=n[t]:typeof n[t]=="object"&&typeof e[t]=="object"&&ir.defaults(e[t],n[t])}}),e}static same(e,i){if(typeof e!="object")return e==i;if(typeof e!=typeof i||Object.keys(e).length!==Object.keys(i).length)return!1;for(const n in e)if(e[n]!==i[n])return!1;return!0}static copyPos(e,i,n=!1){return i.x!==void 0&&(e.x=i.x),i.y!==void 0&&(e.y=i.y),i.w!==void 0&&(e.w=i.w),i.h!==void 0&&(e.h=i.h),n&&(i.minW&&(e.minW=i.minW),i.minH&&(e.minH=i.minH),i.maxW&&(e.maxW=i.maxW),i.maxH&&(e.maxH=i.maxH)),e}static samePos(e,i){return e&&i&&e.x===i.x&&e.y===i.y&&(e.w||1)===(i.w||1)&&(e.h||1)===(i.h||1)}static sanitizeMinMax(e){e.minW||delete e.minW,e.minH||delete e.minH,e.maxW||delete e.maxW,e.maxH||delete e.maxH}static removeInternalAndSame(e,i){if(!(typeof e!="object"||typeof i!="object")&&!(Array.isArray(e)||Array.isArray(i)))for(let n in e){const t=e[n],o=i[n];n[0]==="_"||t===o?delete e[n]:t&&typeof t=="object"&&o!==void 0&&(ir.removeInternalAndSame(t,o),Object.keys(t).length||delete e[n])}}static removeInternalForSave(e,i=!0){for(let n in e)(n[0]==="_"||e[n]===null||e[n]===void 0)&&delete e[n];delete e.grid,i&&delete e.el,e.autoPosition||delete e.autoPosition,e.noResize||delete e.noResize,e.noMove||delete e.noMove,e.locked||delete e.locked,(e.w===1||e.w===e.minW)&&delete e.w,(e.h===1||e.h===e.minH)&&delete e.h}static throttle(e,i){let n=!1;return(...t)=>{n||(n=!0,setTimeout(()=>{e(...t),n=!1},i))}}static removePositioningStyles(e){const i=e.style;i.position&&i.removeProperty("position"),i.left&&i.removeProperty("left"),i.top&&i.removeProperty("top"),i.width&&i.removeProperty("width"),i.height&&i.removeProperty("height")}static getScrollElement(e){if(!e)return document.scrollingElement||document.documentElement;const i=getComputedStyle(e);return/(auto|scroll)/.test(i.overflow+i.overflowY)?e:ir.getScrollElement(e.parentElement)}static updateScrollPosition(e,i,n){const t=ir.getScrollElement(e);if(!t)return;const o=e.getBoundingClientRect(),a=t.getBoundingClientRect(),s=window.innerHeight||document.documentElement.clientHeight,l=o.bottom-Math.min(a.bottom,s),u=o.top-Math.max(a.top,0),c=t.scrollTop;u<0&&n<0?e.offsetHeight>a.height?t.scrollTop+=n:t.scrollTop+=Math.abs(u)>Math.abs(n)?n:u:l>0&&n>0&&(e.offsetHeight>a.height?t.scrollTop+=n:t.scrollTop+=l>n?n:l),i.top+=t.scrollTop-c}static updateScrollResize(e,i,n){const t=ir.getScrollElement(i),o=t.clientHeight,a=t===ir.getScrollElement()?0:t.getBoundingClientRect().top,s=e.clientY-a,l=s<n,u=s>o-n;l?t.scrollBy({behavior:"smooth",top:s-n}):u&&t.scrollBy({behavior:"smooth",top:n-(o-s)})}static clone(e){return e==null||typeof e!="object"?e:e instanceof Array?[...e]:{...e}}static cloneDeep(e){const i=["parentGrid","el","grid","subGrid","engine"],n=ir.clone(e);for(const t in n)n.hasOwnProperty(t)&&typeof n[t]=="object"&&t.substring(0,2)!=="__"&&!i.find(o=>o===t)&&(n[t]=ir.cloneDeep(e[t]));return n}static cloneNode(e){const i=e.cloneNode(!0);return i.removeAttribute("id"),i}static appendTo(e,i){let n;typeof i=="string"?n=ir.getElement(i):n=i,n&&n.appendChild(e)}static addElStyles(e,i){if(i instanceof Object)for(const n in i)i.hasOwnProperty(n)&&(Array.isArray(i[n])?i[n].forEach(t=>{e.style[n]=t}):e.style[n]=i[n])}static initEvent(e,i){const n={type:i.type},t={button:0,which:0,buttons:1,bubbles:!0,cancelable:!0,target:i.target?i.target:e.target};return["altKey","ctrlKey","metaKey","shiftKey"].forEach(o=>n[o]=e[o]),["pageX","pageY","clientX","clientY","screenX","screenY"].forEach(o=>n[o]=e[o]),{...n,...t}}static simulateMouseEvent(e,i,n){const t=e,o=new MouseEvent(i,{bubbles:!0,composed:!0,cancelable:!0,view:window,detail:1,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY,ctrlKey:t.ctrlKey??!1,altKey:t.altKey??!1,shiftKey:t.shiftKey??!1,metaKey:t.metaKey??!1,button:0,relatedTarget:e.target});(n||e.target).dispatchEvent(o)}static getValuesFromTransformedElement(e){const i=document.createElement("div");ir.addElStyles(i,{opacity:"0",position:"fixed",top:"0px",left:"0px",width:"1px",height:"1px",zIndex:"-999999"}),e.appendChild(i);const n=i.getBoundingClientRect();return e.removeChild(i),i.remove(),{xScale:1/n.width,yScale:1/n.height,xOffset:n.left,yOffset:n.top}}static swap(e,i,n){if(!e)return;const t=e[i];e[i]=e[n],e[n]=t}static canBeRotated(e){var i;return!(!e||e.w===e.h||e.locked||e.noResize||(i=e.grid)!=null&&i.opts.disableResize||e.minW&&e.minW===e.maxW||e.minH&&e.minH===e.maxH)}}class B0{constructor(e={}){this.addedNodes=[],this.removedNodes=[],this.defaultColumn=12,this.column=e.column||this.defaultColumn,this.column>this.defaultColumn&&(this.defaultColumn=this.column),this.maxRow=e.maxRow,this._float=e.float,this.nodes=e.nodes||[],this.onChange=e.onChange}batchUpdate(e=!0,i=!0){return!!this.batchMode===e?this:(this.batchMode=e,e?(this._prevFloat=this._float,this._float=!0,this.cleanNodes(),this.saveInitial()):(this._float=this._prevFloat,delete this._prevFloat,i&&this._packNodes(),this._notify()),this)}_useEntireRowArea(e,i){return(!this.float||this.batchMode&&!this._prevFloat)&&!this._hasLocked&&(!e._moving||e._skipDown||i.y<=e.y)}_fixCollisions(e,i=e,n,t={}){if(this.sortNodes(-1),n=n||this.collide(e,i),!n)return!1;if(e._moving&&!t.nested&&!this.float&&this.swap(e,n))return!0;let o=i;!this._loading&&this._useEntireRowArea(e,i)&&(o={x:0,w:this.column,y:i.y,h:i.h},n=this.collide(e,o,t.skip));let a=!1;const s={nested:!0,pack:!1};let l=0;for(;n=n||this.collide(e,o,t.skip);){if(l++>this.nodes.length*2)throw new Error("Infinite collide check");let u;if(n.locked||this._loading||e._moving&&!e._skipDown&&i.y>e.y&&!this.float&&(!this.collide(n,{...n,y:e.y},e)||!this.collide(n,{...n,y:i.y-n.h},e))){e._skipDown=e._skipDown||i.y>e.y;const c={...i,y:n.y+n.h,...s};u=this._loading&&ir.samePos(e,c)?!0:this.moveNode(e,c),(n.locked||this._loading)&&u?ir.copyPos(i,e):!n.locked&&u&&t.pack&&(this._packNodes(),i.y=n.y+n.h,ir.copyPos(e,i)),a=a||u}else u=this.moveNode(n,{...n,y:i.y+i.h,skip:e,...s});if(!u)return a;n=void 0}return a}collide(e,i=e,n){const t=e._id,o=n==null?void 0:n._id;return this.nodes.find(a=>a._id!==t&&a._id!==o&&ir.isIntercepted(a,i))}collideAll(e,i=e,n){const t=e._id,o=n==null?void 0:n._id;return this.nodes.filter(a=>a._id!==t&&a._id!==o&&ir.isIntercepted(a,i))}directionCollideCoverage(e,i,n){if(!i.rect||!e._rect)return;const t=e._rect,o={...i.rect};o.y>t.y?(o.h+=o.y-t.y,o.y=t.y):o.h+=t.y-o.y,o.x>t.x?(o.w+=o.x-t.x,o.x=t.x):o.w+=t.x-o.x;let a,s=.5;for(let l of n){if(l.locked||!l._rect)break;const u=l._rect;let c=Number.MAX_VALUE,d=Number.MAX_VALUE;t.y<u.y?c=(o.y+o.h-u.y)/u.h:t.y+t.h>u.y+u.h&&(c=(u.y+u.h-o.y)/u.h),t.x<u.x?d=(o.x+o.w-u.x)/u.w:t.x+t.w>u.x+u.w&&(d=(u.x+u.w-o.x)/u.w);const f=Math.min(d,c);f>s&&(s=f,a=l)}return i.collide=a,a}cacheRects(e,i,n,t,o,a){return this.nodes.forEach(s=>s._rect={y:s.y*i+n,x:s.x*e+a,w:s.w*e-a-t,h:s.h*i-n-o}),this}swap(e,i){if(!i||i.locked||!e||e.locked)return!1;function n(){const o=i.x,a=i.y;return i.x=e.x,i.y=e.y,e.h!=i.h?(e.x=o,e.y=i.y+i.h):e.w!=i.w?(e.x=i.x+i.w,e.y=a):(e.x=o,e.y=a),e._dirty=i._dirty=!0,!0}let t;if(e.w===i.w&&e.h===i.h&&(e.x===i.x||e.y===i.y)&&(t=ir.isTouching(e,i)))return n();if(t!==!1){if(e.w===i.w&&e.x===i.x&&(t||(t=ir.isTouching(e,i)))){if(i.y<e.y){const o=e;e=i,i=o}return n()}if(t!==!1){if(e.h===i.h&&e.y===i.y&&(t||(t=ir.isTouching(e,i)))){if(i.x<e.x){const o=e;e=i,i=o}return n()}return!1}}}isAreaEmpty(e,i,n,t){const o={x:e||0,y:i||0,w:n||1,h:t||1};return!this.collide(o)}compact(e="compact",i=!0){if(this.nodes.length===0)return this;i&&this.sortNodes();const n=this.batchMode;n||this.batchUpdate();const t=this._inColumnResize;t||(this._inColumnResize=!0);const o=this.nodes;return this.nodes=[],o.forEach((a,s,l)=>{let u;a.locked||(a.autoPosition=!0,e==="list"&&s&&(u=l[s-1])),this.addNode(a,!1,u)}),t||delete this._inColumnResize,n||this.batchUpdate(!1),this}set float(e){this._float!==e&&(this._float=e||!1,e||this._packNodes()._notify())}get float(){return this._float||!1}sortNodes(e=1){return this.nodes=ir.sort(this.nodes,e),this}_packNodes(){return this.batchMode?this:(this.sortNodes(),this.float?this.nodes.forEach(e=>{if(e._updating||e._orig===void 0||e.y===e._orig.y)return;let i=e.y;for(;i>e._orig.y;)--i,this.collide(e,{x:e.x,y:i,w:e.w,h:e.h})||(e._dirty=!0,e.y=i)}):this.nodes.forEach((e,i)=>{if(!e.locked)for(;e.y>0;){const n=i===0?0:e.y-1;if(!(i===0||!this.collide(e,{x:e.x,y:n,w:e.w,h:e.h})))break;e._dirty=e.y!==n,e.y=n}}),this)}prepareNode(e,i){e._id=e._id??B0._idSeq++;const n=e.id;if(n){let o=1;for(;this.nodes.find(a=>a.id===e.id&&a!==e);)e.id=n+"_"+o++}(e.x===void 0||e.y===void 0||e.x===null||e.y===null)&&(e.autoPosition=!0);const t={x:0,y:0,w:1,h:1};return ir.defaults(e,t),e.autoPosition||delete e.autoPosition,e.noResize||delete e.noResize,e.noMove||delete e.noMove,ir.sanitizeMinMax(e),typeof e.x=="string"&&(e.x=Number(e.x)),typeof e.y=="string"&&(e.y=Number(e.y)),typeof e.w=="string"&&(e.w=Number(e.w)),typeof e.h=="string"&&(e.h=Number(e.h)),isNaN(e.x)&&(e.x=t.x,e.autoPosition=!0),isNaN(e.y)&&(e.y=t.y,e.autoPosition=!0),isNaN(e.w)&&(e.w=t.w),isNaN(e.h)&&(e.h=t.h),this.nodeBoundFix(e,i),e}nodeBoundFix(e,i){const n=e._orig||ir.copyPos({},e);if(e.maxW&&(e.w=Math.min(e.w||1,e.maxW)),e.maxH&&(e.h=Math.min(e.h||1,e.maxH)),e.minW&&(e.w=Math.max(e.w||1,e.minW)),e.minH&&(e.h=Math.max(e.h||1,e.minH)),(e.x||0)+(e.w||1)>this.column&&this.column<this.defaultColumn&&!this._inColumnResize&&!this.skipCacheUpdate&&e._id!=null&&this.findCacheLayout(e,this.defaultColumn)===-1){const o={...e};o.autoPosition||o.x===void 0?(delete o.x,delete o.y):o.x=Math.min(this.defaultColumn-1,o.x),o.w=Math.min(this.defaultColumn,o.w||1),this.cacheOneLayout(o,this.defaultColumn)}return e.w>this.column?e.w=this.column:e.w<1&&(e.w=1),this.maxRow&&e.h>this.maxRow?e.h=this.maxRow:e.h<1&&(e.h=1),e.x<0&&(e.x=0),e.y<0&&(e.y=0),e.x+e.w>this.column&&(i?e.w=this.column-e.x:e.x=this.column-e.w),this.maxRow&&e.y+e.h>this.maxRow&&(i?e.h=this.maxRow-e.y:e.y=this.maxRow-e.h),ir.samePos(e,n)||(e._dirty=!0),this}getDirtyNodes(e){return e?this.nodes.filter(i=>i._dirty&&!ir.samePos(i,i._orig)):this.nodes.filter(i=>i._dirty)}_notify(e){if(this.batchMode||!this.onChange)return this;const i=(e||[]).concat(this.getDirtyNodes());return this.onChange(i),this}cleanNodes(){return this.batchMode?this:(this.nodes.forEach(e=>{delete e._dirty,delete e._lastTried}),this)}saveInitial(){return this.nodes.forEach(e=>{e._orig=ir.copyPos({},e),delete e._dirty}),this._hasLocked=this.nodes.some(e=>e.locked),this}restoreInitial(){return this.nodes.forEach(e=>{!e._orig||ir.samePos(e,e._orig)||(ir.copyPos(e,e._orig),e._dirty=!0)}),this._notify(),this}findEmptyPosition(e,i=this.nodes,n=this.column,t){const o=t?t.y*n+(t.x+t.w):0;let a=!1;for(let s=o;!a;++s){const l=s%n,u=Math.floor(s/n);if(l+e.w>n)continue;const c={x:l,y:u,w:e.w,h:e.h};i.find(d=>ir.isIntercepted(c,d))||((e.x!==l||e.y!==u)&&(e._dirty=!0),e.x=l,e.y=u,delete e.autoPosition,a=!0)}return a}addNode(e,i=!1,n){const t=this.nodes.find(a=>a._id===e._id);if(t)return t;this._inColumnResize?this.nodeBoundFix(e):this.prepareNode(e),delete e._temporaryRemoved,delete e._removeDOM;let o;return e.autoPosition&&this.findEmptyPosition(e,this.nodes,this.column,n)&&(delete e.autoPosition,o=!0),this.nodes.push(e),i&&this.addedNodes.push(e),o||this._fixCollisions(e),this.batchMode||this._packNodes()._notify(),e}removeNode(e,i=!0,n=!1){return this.nodes.find(t=>t._id===e._id)?(n&&this.removedNodes.push(e),i&&(e._removeDOM=!0),this.nodes=this.nodes.filter(t=>t._id!==e._id),e._isAboutToRemove||this._packNodes(),this._notify([e]),this):this}removeAll(e=!0,i=!0){if(delete this._layouts,!this.nodes.length)return this;e&&this.nodes.forEach(t=>t._removeDOM=!0);const n=this.nodes;return this.removedNodes=i?n:[],this.nodes=[],this._notify(n)}moveNodeCheck(e,i){if(!this.changedPosConstrain(e,i))return!1;if(i.pack=!0,!this.maxRow)return this.moveNode(e,i);let n;const t=new B0({column:this.column,float:this.float,nodes:this.nodes.map(a=>a._id===e._id?(n={...a},n):{...a})});if(!n)return!1;const o=t.moveNode(n,i)&&t.getRow()<=Math.max(this.getRow(),this.maxRow);if(!o&&!i.resizing&&i.collide){const a=i.collide.el.gridstackNode;if(this.swap(e,a))return this._notify(),!0}return o?(t.nodes.filter(a=>a._dirty).forEach(a=>{const s=this.nodes.find(l=>l._id===a._id);s&&(ir.copyPos(s,a),s._dirty=!0)}),this._notify(),!0):!1}willItFit(e){if(delete e._willFitPos,!this.maxRow)return!0;const i=new B0({column:this.column,float:this.float,nodes:this.nodes.map(t=>({...t}))}),n={...e};return this.cleanupNode(n),delete n.el,delete n._id,delete n.content,delete n.grid,i.addNode(n),i.getRow()<=this.maxRow?(e._willFitPos=ir.copyPos({},n),!0):!1}changedPosConstrain(e,i){return i.w=i.w||e.w,i.h=i.h||e.h,e.x!==i.x||e.y!==i.y?!0:(e.maxW&&(i.w=Math.min(i.w,e.maxW)),e.maxH&&(i.h=Math.min(i.h,e.maxH)),e.minW&&(i.w=Math.max(i.w,e.minW)),e.minH&&(i.h=Math.max(i.h,e.minH)),e.w!==i.w||e.h!==i.h)}moveNode(e,i){var u,c;if(!e||!i)return!1;let n;i.pack===void 0&&!this.batchMode&&(n=i.pack=!0),typeof i.x!="number"&&(i.x=e.x),typeof i.y!="number"&&(i.y=e.y),typeof i.w!="number"&&(i.w=e.w),typeof i.h!="number"&&(i.h=e.h);const t=e.w!==i.w||e.h!==i.h,o=ir.copyPos({},e,!0);if(ir.copyPos(o,i),this.nodeBoundFix(o,t),ir.copyPos(i,o),!i.forceCollide&&ir.samePos(e,i))return!1;const a=ir.copyPos({},e),s=this.collideAll(e,o,i.skip);let l=!0;if(s.length){const d=e._moving&&!i.nested;let f=d?this.directionCollideCoverage(e,i,s):s[0];if(d&&f&&((c=(u=e.grid)==null?void 0:u.opts)!=null&&c.subGridDynamic)&&!e.grid._isTemp){const h=ir.areaIntercept(i.rect,f._rect),p=ir.area(i.rect),g=ir.area(f._rect);h/(p<g?p:g)>.8&&(f.grid.makeSubGrid(f.el,void 0,e),f=void 0)}f?l=!this._fixCollisions(e,o,f,i):(l=!1,n&&delete i.pack)}return l&&!ir.samePos(e,o)&&(e._dirty=!0,ir.copyPos(e,o)),i.pack&&this._packNodes()._notify(),!ir.samePos(e,a)}getRow(){return this.nodes.reduce((e,i)=>Math.max(e,i.y+i.h),0)}beginUpdate(e){return e._updating||(e._updating=!0,delete e._skipDown,this.batchMode||this.saveInitial()),this}endUpdate(){const e=this.nodes.find(i=>i._updating);return e&&(delete e._updating,delete e._skipDown),this}save(e=!0,i,n){var s;const t=((s=this._layouts)==null?void 0:s.length)||0;let o;t&&(n?n!==this.column&&(o=this._layouts[n]):this.column!==t-1&&(o=this._layouts[t-1]));const a=[];return this.sortNodes(),this.nodes.forEach(l=>{const u=o==null?void 0:o.find(d=>d._id===l._id),c={...l,...u||{}};ir.removeInternalForSave(c,!e),i&&i(l,c),a.push(c)}),a}layoutsNodesChange(e){return!this._layouts||this._inColumnResize?this:(this._layouts.forEach((i,n)=>{if(!i||n===this.column)return this;if(n<this.column)this._layouts[n]=void 0;else{const t=n/this.column;e.forEach(o=>{if(!o._orig)return;const a=i.find(s=>s._id===o._id);a&&(a.y>=0&&o.y!==o._orig.y&&(a.y+=o.y-o._orig.y,a.y<0&&(a.y=0)),o.x!==o._orig.x&&(a.x=Math.round(o.x*t),a.x<0&&(a.x=0)),o.w!==o._orig.w&&(a.w=Math.round(o.w*t),a.w<1&&(a.w=1)))})}}),this)}columnChanged(e,i,n="moveScale"){var s;if(!this.nodes.length||!i||e===i)return this;const t=n==="compact"||n==="list";t&&this.sortNodes(1),i<e&&this.cacheLayout(this.nodes,e),this.batchUpdate();let o=[],a=t?this.nodes:ir.sort(this.nodes,-1);if(i>e&&this._layouts){const l=this._layouts[i]||[],u=this._layouts.length-1;!l.length&&e!==u&&((s=this._layouts[u])!=null&&s.length)&&(e=u,this._layouts[u].forEach(c=>{const d=a.find(f=>f._id===c._id);d&&(!t&&!c.autoPosition&&(d.x=c.x??d.x,d.y=c.y??d.y),d.w=c.w??d.w,(c.x==null||c.y===void 0)&&(d.autoPosition=!0))})),l.forEach(c=>{const d=a.findIndex(f=>f._id===c._id);if(d!==-1){const f=a[d];if(t){f.w=c.w;return}(c.autoPosition||isNaN(c.x)||isNaN(c.y))&&this.findEmptyPosition(c,o),c.autoPosition||(f.x=c.x??f.x,f.y=c.y??f.y,f.w=c.w??f.w,o.push(f)),a.splice(d,1)}})}if(t)this.compact(n,!1);else{if(a.length)if(typeof n=="function")n(i,e,o,a);else{const l=t||n==="none"?1:i/e,u=n==="move"||n==="moveScale",c=n==="scale"||n==="moveScale";a.forEach(d=>{d.x=i===1?0:u?Math.round(d.x*l):Math.min(d.x,i-1),d.w=i===1||e===1?1:c?Math.round(d.w*l)||1:Math.min(d.w,i),o.push(d)}),a=[]}o=ir.sort(o,-1),this._inColumnResize=!0,this.nodes=[],o.forEach(l=>{this.addNode(l,!1),delete l._orig})}return this.nodes.forEach(l=>delete l._orig),this.batchUpdate(!1,!t),delete this._inColumnResize,this}cacheLayout(e,i,n=!1){const t=[];return e.forEach((o,a)=>{if(o._id===void 0){const s=o.id?this.nodes.find(l=>l.id===o.id):void 0;o._id=(s==null?void 0:s._id)??B0._idSeq++}t[a]={x:o.x,y:o.y,w:o.w,_id:o._id}}),this._layouts=n?[]:this._layouts||[],this._layouts[i]=t,this}cacheOneLayout(e,i){e._id=e._id??B0._idSeq++;const n={x:e.x,y:e.y,w:e.w,_id:e._id};(e.autoPosition||e.x===void 0)&&(delete n.x,delete n.y,e.autoPosition&&(n.autoPosition=!0)),this._layouts=this._layouts||[],this._layouts[i]=this._layouts[i]||[];const t=this.findCacheLayout(e,i);return t===-1?this._layouts[i].push(n):this._layouts[i][t]=n,this}findCacheLayout(e,i){var n,t;return((t=(n=this._layouts)==null?void 0:n[i])==null?void 0:t.findIndex(o=>o._id===e._id))??-1}removeNodeFromLayoutCache(e){if(this._layouts)for(let i=0;i<this._layouts.length;i++){const n=this.findCacheLayout(e,i);n!==-1&&this._layouts[i].splice(n,1)}}cleanupNode(e){for(const i in e)i[0]==="_"&&i!=="_id"&&delete e[i];return this}}B0._idSeq=0;const hh={alwaysShowResizeHandle:"mobile",animate:!0,auto:!0,cellHeight:"auto",cellHeightThrottle:100,cellHeightUnit:"px",column:12,draggable:{handle:".grid-stack-item-content",appendTo:"body",scroll:!0},handle:".grid-stack-item-content",itemClass:"grid-stack-item",margin:10,marginUnit:"px",maxRow:0,minRow:0,placeholderClass:"grid-stack-placeholder",placeholderText:"",removableOptions:{accept:"grid-stack-item",decline:"grid-stack-non-removable"},resizable:{handles:"se"},rtl:"auto"};class Ki{}const mg=typeof window<"u"&&typeof document<"u"&&("ontouchstart"in document||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0);class Ph{}function J3(r,e){r.touches.length>1||(r.cancelable&&r.preventDefault(),ir.simulateMouseEvent(r.changedTouches[0],e))}function L1e(r,e){r.cancelable&&r.preventDefault(),ir.simulateMouseEvent(r,e)}function Q3(r){Ph.touchHandled||(Ph.touchHandled=!0,J3(r,"mousedown"))}function eH(r){Ph.touchHandled&&J3(r,"mousemove")}function tH(r){if(!Ph.touchHandled)return;Ph.pointerLeaveTimeout&&(window.clearTimeout(Ph.pointerLeaveTimeout),delete Ph.pointerLeaveTimeout);const e=!!Ki.dragElement;J3(r,"mouseup"),e||J3(r,"click"),Ph.touchHandled=!1}function rH(r){r.pointerType!=="mouse"&&r.target.releasePointerCapture(r.pointerId)}function bge(r){Ki.dragElement&&r.pointerType!=="mouse"&&L1e(r,"mouseenter")}function Sge(r){Ki.dragElement&&r.pointerType!=="mouse"&&(Ph.pointerLeaveTimeout=window.setTimeout(()=>{delete Ph.pointerLeaveTimeout,L1e(r,"mouseleave")},10))}class bz{constructor(e,i,n){this.host=e,this.dir=i,this.option=n,this.moving=!1,this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this._keyEvent=this._keyEvent.bind(this),this._init()}_init(){if(this.option.element)try{this.el=this.option.element instanceof HTMLElement?this.option.element:this.host.querySelector(this.option.element)}catch(e){this.option.element=void 0,console.error("Query for resizeable handle failed, falling back",e)}return this.el||(this.el=document.createElement("div"),this.host.appendChild(this.el)),this.el.classList.add("ui-resizable-handle"),this.el.classList.add(`${bz.prefix}${this.dir}`),this.el.style.zIndex="100",this.el.style.userSelect="none",this.el.addEventListener("mousedown",this._mouseDown),mg&&(this.el.addEventListener("touchstart",Q3),this.el.addEventListener("pointerdown",rH)),this}destroy(){return this.moving&&this._mouseUp(this.mouseDownEvent),this.el.removeEventListener("mousedown",this._mouseDown),mg&&(this.el.removeEventListener("touchstart",Q3),this.el.removeEventListener("pointerdown",rH)),this.option.element||this.host.removeChild(this.el),delete this.el,delete this.host,this}_mouseDown(e){this.mouseDownEvent=e,document.addEventListener("mousemove",this._mouseMove,{capture:!0,passive:!0}),document.addEventListener("mouseup",this._mouseUp,!0),mg&&(this.el.addEventListener("touchmove",eH),this.el.addEventListener("touchend",tH)),e.stopPropagation(),e.preventDefault()}_mouseMove(e){const i=this.mouseDownEvent;this.moving?this._triggerEvent("move",e):Math.abs(e.x-i.x)+Math.abs(e.y-i.y)>2&&(this.moving=!0,this._triggerEvent("start",this.mouseDownEvent),this._triggerEvent("move",e),document.addEventListener("keydown",this._keyEvent)),e.stopPropagation()}_mouseUp(e){this.moving&&(this._triggerEvent("stop",e),document.removeEventListener("keydown",this._keyEvent)),document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),mg&&(this.el.removeEventListener("touchmove",eH),this.el.removeEventListener("touchend",tH)),delete this.moving,delete this.mouseDownEvent,e.stopPropagation(),e.preventDefault()}_keyEvent(e){var i,n;e.key==="Escape"&&((n=(i=this.host.gridstackNode)==null?void 0:i.grid)==null||n.engine.restoreInitial(),this._mouseUp(this.mouseDownEvent))}_triggerEvent(e,i){return this.option[e]&&this.option[e](i),this}}bz.prefix="ui-resizable-";class b7{constructor(){this._eventRegister={}}get disabled(){return this._disabled}on(e,i){this._eventRegister[e]=i}off(e){delete this._eventRegister[e]}enable(){this._disabled=!1}disable(){this._disabled=!0}destroy(){delete this._eventRegister}triggerEvent(e,i){if(!this.disabled&&this._eventRegister&&this._eventRegister[e])return this._eventRegister[e](i)}}class TF extends b7{constructor(e,i={}){super(),this.el=e,this.option=i,this.rectScale={x:1,y:1},this._ui=()=>{const t=this.el.parentElement.getBoundingClientRect(),o={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,top:this.originalRect.top-this.scrolled},a=this.temporalRect||o;return{position:{left:(a.left-t.left)*this.rectScale.x,top:(a.top-t.top)*this.rectScale.y},size:{width:a.width*this.rectScale.x,height:a.height*this.rectScale.y}}},this._mouseOver=this._mouseOver.bind(this),this._mouseOut=this._mouseOut.bind(this),this.enable(),this._setupAutoHide(this.option.autoHide),this._setupHandlers()}on(e,i){super.on(e,i)}off(e){super.off(e)}enable(){super.enable(),this.el.classList.remove("ui-resizable-disabled"),this._setupAutoHide(this.option.autoHide)}disable(){super.disable(),this.el.classList.add("ui-resizable-disabled"),this._setupAutoHide(!1)}destroy(){this._removeHandlers(),this._setupAutoHide(!1),delete this.el,super.destroy()}updateOption(e){const i=e.handles&&e.handles!==this.option.handles,n=e.autoHide&&e.autoHide!==this.option.autoHide;return Object.keys(e).forEach(t=>this.option[t]=e[t]),i&&(this._removeHandlers(),this._setupHandlers()),n&&this._setupAutoHide(this.option.autoHide),this}_setupAutoHide(e){return e?(this.el.classList.add("ui-resizable-autohide"),this.el.addEventListener("mouseover",this._mouseOver),this.el.addEventListener("mouseout",this._mouseOut)):(this.el.classList.remove("ui-resizable-autohide"),this.el.removeEventListener("mouseover",this._mouseOver),this.el.removeEventListener("mouseout",this._mouseOut),Ki.overResizeElement===this&&delete Ki.overResizeElement),this}_mouseOver(e){Ki.overResizeElement||Ki.dragElement||(Ki.overResizeElement=this,this.el.classList.remove("ui-resizable-autohide"))}_mouseOut(e){Ki.overResizeElement===this&&(delete Ki.overResizeElement,this.el.classList.add("ui-resizable-autohide"))}_setupHandlers(){return this.handlers=this.option.handles.split(",").map(e=>e.trim()).map(e=>new bz(this.el,e,{element:this.option.element,start:i=>this._resizeStart(i),stop:i=>this._resizeStop(i),move:i=>this._resizing(i,e)})),this}_resizeStart(e){this.sizeToContent=ir.shouldSizeToContent(this.el.gridstackNode,!0),this.originalRect=this.el.getBoundingClientRect(),this.scrollEl=ir.getScrollElement(this.el),this.scrollY=this.scrollEl.scrollTop,this.scrolled=0,this.startEvent=e,this._setupHelper(),this._applyChange();const i=ir.initEvent(e,{type:"resizestart",target:this.el});return this.option.start&&this.option.start(i,this._ui()),this.el.classList.add("ui-resizable-resizing"),this.triggerEvent("resizestart",i),this}_resizing(e,i){this.scrolled=this.scrollEl.scrollTop-this.scrollY,this.temporalRect=this._getChange(e,i),this._applyChange();const n=ir.initEvent(e,{type:"resize",target:this.el});return this.option.resize&&this.option.resize(n,this._ui()),this.triggerEvent("resize",n),this}_resizeStop(e){const i=ir.initEvent(e,{type:"resizestop",target:this.el});return this._cleanHelper(),this.option.stop&&this.option.stop(i),this.el.classList.remove("ui-resizable-resizing"),this.triggerEvent("resizestop",i),delete this.startEvent,delete this.originalRect,delete this.temporalRect,delete this.scrollY,delete this.scrolled,this}_setupHelper(){this.elOriginStyleVal=TF._originStyleProp.map(n=>this.el.style[n]),this.parentOriginStylePosition=this.el.parentElement.style.position;const e=this.el.parentElement,i=ir.getValuesFromTransformedElement(e);return this.rectScale={x:i.xScale,y:i.yScale},getComputedStyle(this.el.parentElement).position.match(/static/)&&(this.el.parentElement.style.position="relative"),this.el.style.position="absolute",this.el.style.opacity="0.8",this}_cleanHelper(){return TF._originStyleProp.forEach((e,i)=>{this.el.style[e]=this.elOriginStyleVal[i]||null}),this.el.parentElement.style.position=this.parentOriginStylePosition||null,this}_getChange(e,i){const n=this.startEvent,t={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,top:this.originalRect.top-this.scrolled},o=e.clientX-n.clientX,a=this.sizeToContent?0:e.clientY-n.clientY;let s,l;i.indexOf("e")>-1?t.width+=o:i.indexOf("w")>-1&&(t.width-=o,t.left+=o,s=!0),i.indexOf("s")>-1?t.height+=a:i.indexOf("n")>-1&&(t.height-=a,t.top+=a,l=!0);const u=this._constrainSize(t.width,t.height,s,l);return Math.round(t.width)!==Math.round(u.width)&&(i.indexOf("w")>-1&&(t.left+=t.width-u.width),t.width=u.width),Math.round(t.height)!==Math.round(u.height)&&(i.indexOf("n")>-1&&(t.top+=t.height-u.height),t.height=u.height),t}_constrainSize(e,i,n,t){const o=this.option,a=(n?o.maxWidthMoveLeft:o.maxWidth)||Number.MAX_SAFE_INTEGER,s=o.minWidth/this.rectScale.x||e,l=(t?o.maxHeightMoveUp:o.maxHeight)||Number.MAX_SAFE_INTEGER,u=o.minHeight/this.rectScale.y||i,c=Math.min(a,Math.max(s,e)),d=Math.min(l,Math.max(u,i));return{width:c,height:d}}_applyChange(){let e={left:0,top:0,width:0,height:0};if(this.el.style.position==="absolute"){const i=this.el.parentElement,{left:n,top:t}=i.getBoundingClientRect();e={left:n,top:t,width:0,height:0}}return this.temporalRect?(Object.keys(this.temporalRect).forEach(i=>{const n=this.temporalRect[i],t=i==="width"||i==="left"?this.rectScale.x:i==="height"||i==="top"?this.rectScale.y:1;this.el.style[i]=(n-e[i])*t+"px"}),this):this}_removeHandlers(){return this.handlers.forEach(e=>e.destroy()),delete this.handlers,this}}TF._originStyleProp=["width","height","position","left","top","opacity","zIndex"];const lst='input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle';class xF extends b7{constructor(e,i={}){var o;super(),this.el=e,this.option=i,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0};const n=(o=i==null?void 0:i.handle)==null?void 0:o.substring(1),t=e.gridstackNode;this.dragEls=!n||e.classList.contains(n)?[e]:t!=null&&t.subGrid?[e.querySelector(i.handle)||e]:Array.from(e.querySelectorAll(i.handle)),this.dragEls.length===0&&(this.dragEls=[e]),this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this._keyEvent=this._keyEvent.bind(this),this.enable()}on(e,i){super.on(e,i)}off(e){super.off(e)}enable(){this.disabled!==!1&&(super.enable(),this.dragEls.forEach(e=>{e.addEventListener("mousedown",this._mouseDown),mg&&(e.addEventListener("touchstart",Q3),e.addEventListener("pointerdown",rH))}),this.el.classList.remove("ui-draggable-disabled"))}disable(e=!1){this.disabled!==!0&&(super.disable(),this.dragEls.forEach(i=>{i.removeEventListener("mousedown",this._mouseDown),mg&&(i.removeEventListener("touchstart",Q3),i.removeEventListener("pointerdown",rH))}),e||this.el.classList.add("ui-draggable-disabled"))}destroy(){this.dragTimeout&&window.clearTimeout(this.dragTimeout),delete this.dragTimeout,this.mouseDownEvent&&this._mouseUp(this.mouseDownEvent),this.disable(!0),delete this.el,delete this.helper,delete this.option,super.destroy()}updateOption(e){return Object.keys(e).forEach(i=>this.option[i]=e[i]),this}_mouseDown(e){if(Ph.touchHandled&&e.isTrusted&&(Ph.touchHandled=!1),!Ki.mouseHandled)return e.button!==0||!this.dragEls.find(i=>i===e.target)&&e.target.closest(lst)||this.option.cancel&&e.target.closest(this.option.cancel)||(this.mouseDownEvent=e,delete this.dragging,delete Ki.dragElement,delete Ki.dropElement,document.addEventListener("mousemove",this._mouseMove,{capture:!0,passive:!0}),document.addEventListener("mouseup",this._mouseUp,!0),mg&&(e.currentTarget.addEventListener("touchmove",eH),e.currentTarget.addEventListener("touchend",tH)),e.preventDefault(),document.activeElement&&document.activeElement.blur(),Ki.mouseHandled=!0),!0}_callDrag(e){if(!this.dragging)return;const i=ir.initEvent(e,{target:this.el,type:"drag"});this.option.drag&&this.option.drag(i,this.ui()),this.triggerEvent("drag",i)}_mouseMove(e){var n;const i=this.mouseDownEvent;if(this.lastDrag=e,this.dragging)if(this._dragFollow(e),Ki.pauseDrag){const t=Number.isInteger(Ki.pauseDrag)?Ki.pauseDrag:100;this.dragTimeout&&window.clearTimeout(this.dragTimeout),this.dragTimeout=window.setTimeout(()=>this._callDrag(e),t)}else this._callDrag(e);else if(Math.abs(e.x-i.x)+Math.abs(e.y-i.y)>3){this.dragging=!0,Ki.dragElement=this;const t=(n=this.el.gridstackNode)==null?void 0:n.grid;t?Ki.dropElement=t.el.ddElement.ddDroppable:delete Ki.dropElement,this.helper=this._createHelper(),this._setupHelperContainmentStyle(),this.dragTransform=ir.getValuesFromTransformedElement(this.helperContainment),this.dragOffset=this._getDragOffset(e,this.el,this.helperContainment),this._setupHelperStyle(e);const o=ir.initEvent(e,{target:this.el,type:"dragstart"});this.option.start&&this.option.start(o,this.ui()),this.triggerEvent("dragstart",o),document.addEventListener("keydown",this._keyEvent)}return!0}_mouseUp(e){var i,n;if(document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),mg&&e.currentTarget&&(e.currentTarget.removeEventListener("touchmove",eH,!0),e.currentTarget.removeEventListener("touchend",tH,!0)),this.dragging){delete this.dragging,(i=this.el.gridstackNode)==null||delete i._origRotate,document.removeEventListener("keydown",this._keyEvent),((n=Ki.dropElement)==null?void 0:n.el)===this.el.parentElement&&delete Ki.dropElement,this.helperContainment.style.position=this.parentOriginStylePosition||null,this.helper!==this.el&&this.helper.remove(),this._removeHelperStyle();const t=ir.initEvent(e,{target:this.el,type:"dragstop"});this.option.stop&&this.option.stop(t),this.triggerEvent("dragstop",t),Ki.dropElement&&Ki.dropElement.drop(e)}delete this.helper,delete this.mouseDownEvent,delete Ki.dragElement,delete Ki.dropElement,delete Ki.mouseHandled,e.preventDefault()}_keyEvent(e){var t,o;const i=this.el.gridstackNode,n=(i==null?void 0:i.grid)||((o=(t=Ki.dropElement)==null?void 0:t.el)==null?void 0:o.gridstack);if(e.key==="Escape")i&&i._origRotate&&(i._orig=i._origRotate,delete i._origRotate),n==null||n.cancelDrag(),this._mouseUp(this.mouseDownEvent);else if(i&&n&&(e.key==="r"||e.key==="R")){if(!ir.canBeRotated(i))return;i._origRotate=i._origRotate||{...i._orig},delete i._moving,n.setAnimation(!1).rotate(i.el,{top:-this.dragOffset.offsetTop,left:-this.dragOffset.offsetLeft}).setAnimation(),i._moving=!0,this.dragOffset=this._getDragOffset(this.lastDrag,i.el,this.helperContainment),this.helper.style.width=this.dragOffset.width+"px",this.helper.style.height=this.dragOffset.height+"px",ir.swap(i._orig,"w","h"),delete i._rect,this._mouseMove(this.lastDrag)}}_createHelper(){let e=this.el;return typeof this.option.helper=="function"?e=this.option.helper(this.el):this.option.helper==="clone"&&(e=ir.cloneNode(this.el)),e.parentElement||ir.appendTo(e,this.option.appendTo==="parent"?this.el.parentElement:this.option.appendTo),this.dragElementOriginStyle=xF.originStyleProp.map(i=>this.el.style[i]),e}_setupHelperStyle(e){var n,t;this.helper.classList.add("ui-draggable-dragging"),(t=(n=this.el.gridstackNode)==null?void 0:n.grid)==null||t.el.classList.add("grid-stack-dragging");const i=this.helper.style;return i.pointerEvents="none",i.width=this.dragOffset.width+"px",i.height=this.dragOffset.height+"px",i.willChange="left, top",i.position="fixed",this._dragFollow(e),i.transition="none",setTimeout(()=>{this.helper&&(i.transition=null)},0),this}_removeHelperStyle(){var i,n,t;this.helper.classList.remove("ui-draggable-dragging"),(n=(i=this.el.gridstackNode)==null?void 0:i.grid)==null||n.el.classList.remove("grid-stack-dragging");const e=(t=this.helper)==null?void 0:t.gridstackNode;if(!(e!=null&&e._isAboutToRemove)&&this.dragElementOriginStyle){const o=this.helper,a=this.dragElementOriginStyle.transition||null;o.style.transition=this.dragElementOriginStyle.transition="none",xF.originStyleProp.forEach(s=>o.style[s]=this.dragElementOriginStyle[s]||null),setTimeout(()=>o.style.transition=a,50)}return delete this.dragElementOriginStyle,this}_dragFollow(e){const i={left:0,top:0},n=this.helper.style,t=this.dragOffset;n.left=(e.clientX+t.offsetLeft-i.left)*this.dragTransform.xScale+"px",n.top=(e.clientY+t.offsetTop-i.top)*this.dragTransform.yScale+"px"}_setupHelperContainmentStyle(){return this.helperContainment=this.helper.parentElement,this.helper.style.position!=="fixed"&&(this.parentOriginStylePosition=this.helperContainment.style.position,getComputedStyle(this.helperContainment).position.match(/static/)&&(this.helperContainment.style.position="relative")),this}_getDragOffset(e,i,n){let t=0,o=0;n&&(t=this.dragTransform.xOffset,o=this.dragTransform.yOffset);const a=i.getBoundingClientRect();return{left:a.left,top:a.top,offsetLeft:-e.clientX+a.left-t,offsetTop:-e.clientY+a.top-o,width:a.width*this.dragTransform.xScale,height:a.height*this.dragTransform.yScale}}ui(){const i=this.el.parentElement.getBoundingClientRect(),n=this.helper.getBoundingClientRect();return{position:{top:(n.top-i.top)*this.dragTransform.yScale,left:(n.left-i.left)*this.dragTransform.xScale}}}}xF.originStyleProp=["width","height","transform","transform-origin","transition","pointerEvents","position","left","top","minWidth","willChange"];class ust extends b7{constructor(e,i={}){super(),this.el=e,this.option=i,this._mouseEnter=this._mouseEnter.bind(this),this._mouseLeave=this._mouseLeave.bind(this),this.enable(),this._setupAccept()}on(e,i){super.on(e,i)}off(e){super.off(e)}enable(){this.disabled!==!1&&(super.enable(),this.el.classList.add("ui-droppable"),this.el.classList.remove("ui-droppable-disabled"),this.el.addEventListener("mouseenter",this._mouseEnter),this.el.addEventListener("mouseleave",this._mouseLeave),mg&&(this.el.addEventListener("pointerenter",bge),this.el.addEventListener("pointerleave",Sge)))}disable(e=!1){this.disabled!==!0&&(super.disable(),this.el.classList.remove("ui-droppable"),e||this.el.classList.add("ui-droppable-disabled"),this.el.removeEventListener("mouseenter",this._mouseEnter),this.el.removeEventListener("mouseleave",this._mouseLeave),mg&&(this.el.removeEventListener("pointerenter",bge),this.el.removeEventListener("pointerleave",Sge)))}destroy(){this.disable(!0),this.el.classList.remove("ui-droppable"),this.el.classList.remove("ui-droppable-disabled"),super.destroy()}updateOption(e){return Object.keys(e).forEach(i=>this.option[i]=e[i]),this._setupAccept(),this}_mouseEnter(e){if(!Ki.dragElement||Ph.touchHandled&&e.isTrusted||!this._canDrop(Ki.dragElement.el))return;e.preventDefault(),e.stopPropagation(),Ki.dropElement&&Ki.dropElement!==this&&Ki.dropElement._mouseLeave(e,!0),Ki.dropElement=this;const i=ir.initEvent(e,{target:this.el,type:"dropover"});this.option.over&&this.option.over(i,this._ui(Ki.dragElement)),this.triggerEvent("dropover",i),this.el.classList.add("ui-droppable-over")}_mouseLeave(e,i=!1){var t;if(!Ki.dragElement||Ki.dropElement!==this)return;e.preventDefault(),e.stopPropagation();const n=ir.initEvent(e,{target:this.el,type:"dropout"});if(this.option.out&&this.option.out(n,this._ui(Ki.dragElement)),this.triggerEvent("dropout",n),Ki.dropElement===this&&(delete Ki.dropElement,!i)){let o,a=this.el.parentElement;for(;!o&&a;)o=(t=a.ddElement)==null?void 0:t.ddDroppable,a=a.parentElement;o&&o._mouseEnter(e)}}drop(e){e.preventDefault();const i=ir.initEvent(e,{target:this.el,type:"drop"});this.option.drop&&this.option.drop(i,this._ui(Ki.dragElement)),this.triggerEvent("drop",i)}_canDrop(e){return e&&(!this.accept||this.accept(e))}_setupAccept(){return this.option.accept?(typeof this.option.accept=="string"?this.accept=e=>e.classList.contains(this.option.accept)||e.matches(this.option.accept):this.accept=this.option.accept,this):this}_ui(e){return{draggable:e.el,...e.ui()}}}class S7{static init(e){return e.ddElement||(e.ddElement=new S7(e)),e.ddElement}constructor(e){this.el=e}on(e,i){return this.ddDraggable&&["drag","dragstart","dragstop"].indexOf(e)>-1?this.ddDraggable.on(e,i):this.ddDroppable&&["drop","dropover","dropout"].indexOf(e)>-1?this.ddDroppable.on(e,i):this.ddResizable&&["resizestart","resize","resizestop"].indexOf(e)>-1&&this.ddResizable.on(e,i),this}off(e){return this.ddDraggable&&["drag","dragstart","dragstop"].indexOf(e)>-1?this.ddDraggable.off(e):this.ddDroppable&&["drop","dropover","dropout"].indexOf(e)>-1?this.ddDroppable.off(e):this.ddResizable&&["resizestart","resize","resizestop"].indexOf(e)>-1&&this.ddResizable.off(e),this}setupDraggable(e){return this.ddDraggable?this.ddDraggable.updateOption(e):this.ddDraggable=new xF(this.el,e),this}cleanDraggable(){return this.ddDraggable&&(this.ddDraggable.destroy(),delete this.ddDraggable),this}setupResizable(e){return this.ddResizable?this.ddResizable.updateOption(e):this.ddResizable=new TF(this.el,e),this}cleanResizable(){return this.ddResizable&&(this.ddResizable.destroy(),delete this.ddResizable),this}setupDroppable(e){return this.ddDroppable?this.ddDroppable.updateOption(e):this.ddDroppable=new ust(this.el,e),this}cleanDroppable(){return this.ddDroppable&&(this.ddDroppable.destroy(),delete this.ddDroppable),this}}class cst{resizable(e,i,n,t){return this._getDDElements(e,i).forEach(o=>{if(i==="disable"||i==="enable")o.ddResizable&&o.ddResizable[i]();else if(i==="destroy")o.ddResizable&&o.cleanResizable();else if(i==="option")o.setupResizable({[n]:t});else{const s=o.el.gridstackNode.grid;let l=o.el.getAttribute("gs-resize-handles")||s.opts.resizable.handles||"e,s,se";l==="all"&&(l="n,e,s,w,se,sw,ne,nw");const u=!s.opts.alwaysShowResizeHandle;o.setupResizable({...s.opts.resizable,handles:l,autoHide:u,start:i.start,stop:i.stop,resize:i.resize})}}),this}draggable(e,i,n,t){return this._getDDElements(e,i).forEach(o=>{if(i==="disable"||i==="enable")o.ddDraggable&&o.ddDraggable[i]();else if(i==="destroy")o.ddDraggable&&o.cleanDraggable();else if(i==="option")o.setupDraggable({[n]:t});else{const a=o.el.gridstackNode.grid;o.setupDraggable({...a.opts.draggable,start:i.start,stop:i.stop,drag:i.drag})}}),this}dragIn(e,i){return this._getDDElements(e).forEach(n=>n.setupDraggable(i)),this}droppable(e,i,n,t){return typeof i.accept=="function"&&!i._accept&&(i._accept=i.accept,i.accept=o=>i._accept(o)),this._getDDElements(e,i).forEach(o=>{i==="disable"||i==="enable"?o.ddDroppable&&o.ddDroppable[i]():i==="destroy"?o.ddDroppable&&o.cleanDroppable():i==="option"?o.setupDroppable({[n]:t}):o.setupDroppable(i)}),this}isDroppable(e){var i;return!!((i=e==null?void 0:e.ddElement)!=null&&i.ddDroppable&&!e.ddElement.ddDroppable.disabled)}isDraggable(e){var i;return!!((i=e==null?void 0:e.ddElement)!=null&&i.ddDraggable&&!e.ddElement.ddDraggable.disabled)}isResizable(e){var i;return!!((i=e==null?void 0:e.ddElement)!=null&&i.ddResizable&&!e.ddElement.ddResizable.disabled)}on(e,i,n){return this._getDDElements(e).forEach(t=>t.on(i,o=>{n(o,Ki.dragElement?Ki.dragElement.el:o.target,Ki.dragElement?Ki.dragElement.helper:null)})),this}off(e,i){return this._getDDElements(e).forEach(n=>n.off(i)),this}_getDDElements(e,i){const n=e.gridstack||i!=="destroy"&&i!=="disable",t=ir.getElements(e);return t.length?t.map(a=>a.ddElement||(n?S7.init(a):null)).filter(a=>a):[]}}/*!
 * GridStack 12.4.2
 * https://gridstackjs.com/
 *
 * Copyright (c) 2021-2025  Alain Dumesny
 * see root license https://github.com/gridstack/gridstack.js/tree/master/LICENSE
 */const Ed=new cst;class Ai{static init(e={},i=".grid-stack"){if(typeof document>"u")return null;const n=Ai.getGridElement(i);return n?(n.gridstack||(n.gridstack=new Ai(n,ir.cloneDeep(e))),n.gridstack):(console.error(typeof i=="string"?'GridStack.initAll() no grid was found with selector "'+i+`" - element missing or wrong selector ?
Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`:"GridStack.init() no grid element was passed."),null)}static initAll(e={},i=".grid-stack"){const n=[];return typeof document>"u"||(Ai.getGridElements(i).forEach(t=>{t.gridstack||(t.gridstack=new Ai(t,ir.cloneDeep(e))),n.push(t.gridstack)}),n.length===0&&console.error('GridStack.initAll() no grid was found with selector "'+i+`" - element missing or wrong selector ?
Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`)),n}static addGrid(e,i={}){if(!e)return null;let n=e;if(n.gridstack){const a=n.gridstack;return i&&(a.opts={...a.opts,...i}),i.children!==void 0&&a.load(i.children),a}return(!e.classList.contains("grid-stack")||Ai.addRemoveCB)&&(Ai.addRemoveCB?n=Ai.addRemoveCB(e,i,!0,!0):n=ir.createDiv(["grid-stack",i.class],e)),Ai.init(i,n)}static registerEngine(e){Ai.engineClass=e}get placeholder(){if(!this._placeholder){this._placeholder=ir.createDiv([this.opts.placeholderClass,hh.itemClass,this.opts.itemClass]);const e=ir.createDiv(["placeholder-content"],this._placeholder);this.opts.placeholderText&&(e.textContent=this.opts.placeholderText)}return this._placeholder}constructor(e,i={}){var u;this.el=e,this.opts=i,this.animationDelay=310,this._gsEventHandler={},this._extraDragRow=0,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0},e.gridstack=this,this.opts=i=i||{},e.classList.contains("grid-stack")||this.el.classList.add("grid-stack"),i.row&&(i.minRow=i.maxRow=i.row,delete i.row);const n=ir.toNumber(e.getAttribute("gs-row"));i.column==="auto"&&delete i.column,i.alwaysShowResizeHandle!==void 0&&(i._alwaysShowResizeHandle=i.alwaysShowResizeHandle);const t=i.columnOpts;if(t){const c=t.breakpoints;!t.columnWidth&&!(c!=null&&c.length)?delete i.columnOpts:(t.columnMax=t.columnMax||12,(c==null?void 0:c.length)>1&&c.sort((d,f)=>(f.w||0)-(d.w||0)))}const o={...ir.cloneDeep(hh),column:ir.toNumber(e.getAttribute("gs-column"))||hh.column,minRow:n||ir.toNumber(e.getAttribute("gs-min-row"))||hh.minRow,maxRow:n||ir.toNumber(e.getAttribute("gs-max-row"))||hh.maxRow,staticGrid:ir.toBool(e.getAttribute("gs-static"))||hh.staticGrid,sizeToContent:ir.toBool(e.getAttribute("gs-size-to-content"))||void 0,draggable:{handle:(i.handleClass?"."+i.handleClass:i.handle?i.handle:"")||hh.draggable.handle},removableOptions:{accept:i.itemClass||hh.removableOptions.accept,decline:hh.removableOptions.decline}};e.getAttribute("gs-animate")&&(o.animate=ir.toBool(e.getAttribute("gs-animate"))),i=ir.defaults(i,o),this._initMargin(),this.checkDynamicColumn(),this._updateColumnVar(i),i.rtl==="auto"&&(i.rtl=e.style.direction==="rtl"),i.rtl&&this.el.classList.add("grid-stack-rtl");const a=this.el.closest("."+hh.itemClass),s=a==null?void 0:a.gridstackNode;if(s&&(s.subGrid=this,this.parentGridNode=s,this.el.classList.add("grid-stack-nested"),s.el.classList.add("grid-stack-sub-grid")),this._isAutoCellHeight=i.cellHeight==="auto",this._isAutoCellHeight||i.cellHeight==="initial")this.cellHeight(void 0);else{typeof i.cellHeight=="number"&&i.cellHeightUnit&&i.cellHeightUnit!==hh.cellHeightUnit&&(i.cellHeight=i.cellHeight+i.cellHeightUnit,delete i.cellHeightUnit);const c=i.cellHeight;delete i.cellHeight,this.cellHeight(c)}i.alwaysShowResizeHandle==="mobile"&&(i.alwaysShowResizeHandle=mg),this._setStaticClass();const l=i.engineClass||Ai.engineClass||B0;if(this.engine=new l({column:this.getColumn(),float:i.float,maxRow:i.maxRow,onChange:c=>{c.forEach(d=>{const f=d.el;f&&(d._removeDOM?(f&&f.remove(),delete d._removeDOM):this._writePosAttr(f,d))}),this._updateContainerHeight()}}),i.auto&&(this.batchUpdate(),this.engine._loading=!0,this.getGridItems().forEach(c=>this._prepareElement(c)),delete this.engine._loading,this.batchUpdate(!1)),i.children){const c=i.children;delete i.children,c.length&&this.load(c)}this.setAnimation(),i.subGridDynamic&&!Ki.pauseDrag&&(Ki.pauseDrag=!0),((u=i.draggable)==null?void 0:u.pause)!==void 0&&(Ki.pauseDrag=i.draggable.pause),this._setupRemoveDrop(),this._setupAcceptWidget(),this._updateResizeEvent()}_updateColumnVar(e=this.opts){this.el.classList.add("gs-"+e.column),typeof e.column=="number"&&this.el.style.setProperty("--gs-column-width",`${100/e.column}%`)}addWidget(e){if(!e)return;if(typeof e=="string"){console.error("V11: GridStack.addWidget() does not support string anymore. see #2736");return}if(e.ELEMENT_NODE)return console.error("V11: GridStack.addWidget() does not support HTMLElement anymore. use makeWidget()"),this.makeWidget(e);let i,n=e;if(n.grid=this,n.el?i=n.el:Ai.addRemoveCB?i=Ai.addRemoveCB(this.el,e,!0,!1):i=this.createWidgetDivs(n),!i)return;if(n=i.gridstackNode,n&&i.parentElement===this.el&&this.engine.nodes.find(o=>o._id===n._id))return i;const t=this._readAttr(i);return ir.defaults(e,t),this.engine.prepareNode(e),this.el.appendChild(i),this.makeWidget(i,e),i}createWidgetDivs(e){const i=ir.createDiv(["grid-stack-item",this.opts.itemClass]),n=ir.createDiv(["grid-stack-item-content"],i);return ir.lazyLoad(e)?e.visibleObservable||(e.visibleObservable=new IntersectionObserver(([t])=>{var o,a;t.isIntersecting&&((o=e.visibleObservable)==null||o.disconnect(),delete e.visibleObservable,Ai.renderCB(n,e),(a=e.grid)==null||a.prepareDragDrop(e.el))}),window.setTimeout(()=>{var t;return(t=e.visibleObservable)==null?void 0:t.observe(i)})):Ai.renderCB(n,e),i}makeSubGrid(e,i,n,t=!0){var h,p,g;let o=e.gridstackNode;if(o||(o=this.makeWidget(e).gridstackNode),(h=o.subGrid)!=null&&h.el)return o.subGrid;let a,s=this;for(;s&&!a;)a=(p=s.opts)==null?void 0:p.subGridOpts,s=(g=s.parentGridNode)==null?void 0:g.grid;i=ir.cloneDeep({...this.opts,id:void 0,children:void 0,column:"auto",columnOpts:void 0,layout:"list",subGridOpts:void 0,...a||{},...i||o.subGridOpts||{}}),o.subGridOpts=i;let l;i.column==="auto"&&(l=!0,i.column=Math.max(o.w||1,(n==null?void 0:n.w)||1),delete i.columnOpts);let u=o.el.querySelector(".grid-stack-item-content"),c,d;if(t&&(this._removeDD(o.el),d={...o,x:0,y:0},ir.removeInternalForSave(d),delete d.subGridOpts,o.content&&(d.content=o.content,delete o.content),Ai.addRemoveCB?c=Ai.addRemoveCB(this.el,d,!0,!1):(c=ir.createDiv(["grid-stack-item"]),c.appendChild(u),u=ir.createDiv(["grid-stack-item-content"],o.el)),this.prepareDragDrop(o.el)),n){const v=l?i.column:o.w,y=o.h+n.h,m=o.el.style;m.transition="none",this.update(o.el,{w:v,h:y}),setTimeout(()=>m.transition=null)}const f=o.subGrid=Ai.addGrid(u,i);return n!=null&&n._moving&&(f._isTemp=!0),l&&(f._autoColumn=!0),t&&f.makeWidget(c,d),n&&(n._moving?window.setTimeout(()=>ir.simulateMouseEvent(n._event,"mouseenter",f.el),0):f.makeWidget(o.el,o)),this.resizeToContentCheck(!1,o),f}removeAsSubGrid(e){var n;const i=(n=this.parentGridNode)==null?void 0:n.grid;i&&(i.batchUpdate(),i.removeWidget(this.parentGridNode.el,!0,!0),this.engine.nodes.forEach(t=>{t.x+=this.parentGridNode.x,t.y+=this.parentGridNode.y,i.makeWidget(t.el,t)}),i.batchUpdate(!1),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,e&&window.setTimeout(()=>ir.simulateMouseEvent(e._event,"mouseenter",i.el),0))}save(e=!0,i=!1,n=Ai.saveCB,t){const o=this.engine.save(e,n,t);if(o.forEach(a=>{var s;if(e&&a.el&&!a.subGrid&&!n){const l=a.el.querySelector(".grid-stack-item-content");a.content=l==null?void 0:l.innerHTML,a.content||delete a.content}else if(!e&&!n&&delete a.content,(s=a.subGrid)!=null&&s.el){const l=a.w||a.subGrid.getColumn(),u=a.subGrid.save(e,i,n,l);a.subGridOpts=i?u:{children:u},delete a.subGrid}delete a.el}),i){const a=ir.cloneDeep(this.opts);a.marginBottom===a.marginTop&&a.marginRight===a.marginLeft&&a.marginTop===a.marginRight&&(a.margin=a.marginTop,delete a.marginTop,delete a.marginRight,delete a.marginBottom,delete a.marginLeft),a.rtl===(this.el.style.direction==="rtl")&&(a.rtl="auto"),this._isAutoCellHeight&&(a.cellHeight="auto"),this._autoColumn&&(a.column="auto");const s=a._alwaysShowResizeHandle;return delete a._alwaysShowResizeHandle,s!==void 0?a.alwaysShowResizeHandle=s:delete a.alwaysShowResizeHandle,ir.removeInternalAndSame(a,hh),a.children=o,a}return o}load(e,i=Ai.addRemoveCB||!0){e=ir.cloneDeep(e);const n=this.getColumn();e.forEach(c=>{c.w=c.w||c.minW||1,c.h=c.h||c.minH||1}),e=ir.sort(e),this.engine.skipCacheUpdate=this._ignoreLayoutsNodeChange=!0;let t=0;e.forEach(c=>{t=Math.max(t,(c.x||0)+c.w)}),t>this.engine.defaultColumn&&(this.engine.defaultColumn=t),t>n&&(this.engine.nodes.length===0&&this.responseLayout?(this.engine.nodes=e,this.engine.columnChanged(t,n,this.responseLayout),e=this.engine.nodes,this.engine.nodes=[],delete this.responseLayout):this.engine.cacheLayout(e,t,!0));const o=Ai.addRemoveCB;typeof i=="function"&&(Ai.addRemoveCB=i);const a=[];this.batchUpdate();const s=!this.engine.nodes.length,l=s&&this.opts.animate;l&&this.setAnimation(!1),!s&&i&&[...this.engine.nodes].forEach(d=>{if(!d.id)return;ir.find(e,d.id)||(Ai.addRemoveCB&&Ai.addRemoveCB(this.el,d,!1,!1),a.push(d),this.removeWidget(d.el,!0,!1))}),this.engine._loading=!0;const u=[];return this.engine.nodes=this.engine.nodes.filter(c=>ir.find(e,c.id)?(u.push(c),!1):!0),e.forEach(c=>{var f;const d=ir.find(u,c.id);if(d){if(ir.shouldSizeToContent(d)&&(c.h=d.h),this.engine.nodeBoundFix(c),(c.autoPosition||c.x===void 0||c.y===void 0)&&(c.w=c.w||d.w,c.h=c.h||d.h,this.engine.findEmptyPosition(c)),this.engine.nodes.push(d),ir.samePos(d,c)&&this.engine.nodes.length>1&&(this.moveNode(d,{...c,forceCollide:!0}),ir.copyPos(c,d)),this.update(d.el,c),(f=c.subGridOpts)!=null&&f.children){const h=d.el.querySelector(".grid-stack");h&&h.gridstack&&h.gridstack.load(c.subGridOpts.children)}}else i&&this.addWidget(c)}),delete this.engine._loading,this.engine.removedNodes=a,this.batchUpdate(!1),delete this._ignoreLayoutsNodeChange,delete this.engine.skipCacheUpdate,o?Ai.addRemoveCB=o:delete Ai.addRemoveCB,l&&this.setAnimation(!0,!0),this}batchUpdate(e=!0){return this.engine.batchUpdate(e),e||(this._updateContainerHeight(),this._triggerRemoveEvent(),this._triggerAddEvent(),this._triggerChangeEvent()),this}getCellHeight(e=!1){if(this.opts.cellHeight&&this.opts.cellHeight!=="auto"&&(!e||!this.opts.cellHeightUnit||this.opts.cellHeightUnit==="px"))return this.opts.cellHeight;if(this.opts.cellHeightUnit==="rem")return this.opts.cellHeight*parseFloat(getComputedStyle(document.documentElement).fontSize);if(this.opts.cellHeightUnit==="em")return this.opts.cellHeight*parseFloat(getComputedStyle(this.el).fontSize);if(this.opts.cellHeightUnit==="cm")return this.opts.cellHeight*(96/2.54);if(this.opts.cellHeightUnit==="mm")return this.opts.cellHeight*(96/2.54)/10;const i=this.el.querySelector("."+this.opts.itemClass);if(i){const t=ir.toNumber(i.getAttribute("gs-h"))||1;return Math.round(i.offsetHeight/t)}const n=parseInt(this.el.getAttribute("gs-current-row"));return n?Math.round(this.el.getBoundingClientRect().height/n):this.opts.cellHeight}cellHeight(e){if(e!==void 0&&this._isAutoCellHeight!==(e==="auto")&&(this._isAutoCellHeight=e==="auto",this._updateResizeEvent()),(e==="initial"||e==="auto")&&(e=void 0),e===void 0){const n=-this.opts.marginRight-this.opts.marginLeft+this.opts.marginTop+this.opts.marginBottom;e=this.cellWidth()+n}const i=ir.parseHeight(e);return this.opts.cellHeightUnit===i.unit&&this.opts.cellHeight===i.h?this:(this.opts.cellHeightUnit=i.unit,this.opts.cellHeight=i.h,this.el.style.setProperty("--gs-cell-height",`${this.opts.cellHeight}${this.opts.cellHeightUnit}`),this._updateContainerHeight(),this.resizeToContentCheck(),this)}cellWidth(){return this._widthOrContainer()/this.getColumn()}_widthOrContainer(e=!1){var i;return e&&((i=this.opts.columnOpts)!=null&&i.breakpointForWindow)?window.innerWidth:this.el.clientWidth||this.el.parentElement.clientWidth||window.innerWidth}checkDynamicColumn(){var o,a;const e=this.opts.columnOpts;if(!e||!e.columnWidth&&!((o=e.breakpoints)!=null&&o.length))return!1;const i=this.getColumn();let n=i;const t=this._widthOrContainer(!0);if(e.columnWidth)n=Math.min(Math.round(t/e.columnWidth)||1,e.columnMax);else{n=e.columnMax;let s=0;for(;s<e.breakpoints.length&&t<=e.breakpoints[s].w;)n=e.breakpoints[s++].c||i}if(n!==i){const s=(a=e.breakpoints)==null?void 0:a.find(l=>l.c===n);return this.column(n,(s==null?void 0:s.layout)||e.layout),!0}return!1}compact(e="compact",i=!0){return this.engine.compact(e,i),this._triggerChangeEvent(),this}column(e,i="moveScale"){if(!e||e<1||this.opts.column===e)return this;const n=this.getColumn();return this.opts.column=e,this.engine?(this.engine.column=e,this.el.classList.remove("gs-"+n),this._updateColumnVar(),this.engine.columnChanged(n,e,i),this._isAutoCellHeight&&this.cellHeight(),this.resizeToContentCheck(!0),this._ignoreLayoutsNodeChange=!0,this._triggerChangeEvent(),delete this._ignoreLayoutsNodeChange,this):(this.responseLayout=i,this)}getColumn(){return this.opts.column}getGridItems(){return Array.from(this.el.children).filter(e=>e.matches("."+this.opts.itemClass)&&!e.matches("."+this.opts.placeholderClass))}isIgnoreChangeCB(){return this._ignoreLayoutsNodeChange}destroy(e=!0){var i;if(this.el)return this.offAll(),this._updateResizeEvent(!0),this.setStatic(!0,!1),this.setAnimation(!1),e?this.el.parentNode.removeChild(this.el):(this.removeAll(e),this.el.removeAttribute("gs-current-row")),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,delete this.opts,(i=this._placeholder)==null||delete i.gridstackNode,delete this._placeholder,delete this.engine,delete this.el.gridstack,delete this.el,this}float(e){return this.opts.float!==e&&(this.opts.float=this.engine.float=e,this._triggerChangeEvent()),this}getFloat(){return this.engine.float}getCellFromPixel(e,i=!1){const n=this.el.getBoundingClientRect();let t;i?t={top:n.top+document.documentElement.scrollTop,left:n.left}:t={top:this.el.offsetTop,left:this.el.offsetLeft};const o=e.left-t.left,a=e.top-t.top,s=n.width/this.getColumn(),l=n.height/parseInt(this.el.getAttribute("gs-current-row"));return{x:Math.floor(o/s),y:Math.floor(a/l)}}getRow(){return Math.max(this.engine.getRow(),this.opts.minRow||0)}isAreaEmpty(e,i,n,t){return this.engine.isAreaEmpty(e,i,n,t)}makeWidget(e,i){const n=Ai.getElement(e);if(!n||n.gridstackNode)return n;n.parentElement||this.el.appendChild(n),this._prepareElement(n,!0,i);const t=n.gridstackNode;this._updateContainerHeight(),t.subGridOpts&&this.makeSubGrid(n,t.subGridOpts,void 0,!1);let o;return this.opts.column===1&&!this._ignoreLayoutsNodeChange&&(o=this._ignoreLayoutsNodeChange=!0),this._triggerAddEvent(),this._triggerChangeEvent(),o&&delete this._ignoreLayoutsNodeChange,n}on(e,i){return e.indexOf(" ")!==-1?(e.split(" ").forEach(t=>this.on(t,i)),this):(e==="change"||e==="added"||e==="removed"||e==="enable"||e==="disable"?(e==="enable"||e==="disable"?this._gsEventHandler[e]=t=>i(t):this._gsEventHandler[e]=t=>{t.detail&&i(t,t.detail)},this.el.addEventListener(e,this._gsEventHandler[e])):e==="drag"||e==="dragstart"||e==="dragstop"||e==="resizestart"||e==="resize"||e==="resizestop"||e==="dropped"||e==="resizecontent"?this._gsEventHandler[e]=i:console.error("GridStack.on("+e+") event not supported"),this)}off(e){return e.indexOf(" ")!==-1?(e.split(" ").forEach(n=>this.off(n)),this):((e==="change"||e==="added"||e==="removed"||e==="enable"||e==="disable")&&this._gsEventHandler[e]&&this.el.removeEventListener(e,this._gsEventHandler[e]),delete this._gsEventHandler[e],this)}offAll(){return Object.keys(this._gsEventHandler).forEach(e=>this.off(e)),this}removeWidget(e,i=!0,n=!0){return e?(Ai.getElements(e).forEach(t=>{if(t.parentElement&&t.parentElement!==this.el)return;let o=t.gridstackNode;o||(o=this.engine.nodes.find(a=>t===a.el)),o&&(i&&Ai.addRemoveCB&&Ai.addRemoveCB(this.el,o,!1,!1),delete t.gridstackNode,this._removeDD(t),this.engine.removeNode(o,i,n),i&&t.parentElement&&t.remove())}),n&&(this._triggerRemoveEvent(),this._triggerChangeEvent()),this):(console.error("Error: GridStack.removeWidget(undefined) called"),this)}removeAll(e=!0,i=!0){return this.engine.nodes.forEach(n=>{e&&Ai.addRemoveCB&&Ai.addRemoveCB(this.el,n,!1,!1),delete n.el.gridstackNode,this.opts.staticGrid||this._removeDD(n.el)}),this.engine.removeAll(e,i),i&&this._triggerRemoveEvent(),this}setAnimation(e=this.opts.animate,i){return i?setTimeout(()=>{this.opts&&this.setAnimation(e)}):e?this.el.classList.add("grid-stack-animate"):this.el.classList.remove("grid-stack-animate"),this.opts.animate=e,this}hasAnimationCSS(){return this.el.classList.contains("grid-stack-animate")}setStatic(e,i=!0,n=!0){return!!this.opts.staticGrid===e?this:(e?this.opts.staticGrid=!0:delete this.opts.staticGrid,this._setupRemoveDrop(),this._setupAcceptWidget(),this.engine.nodes.forEach(t=>{this.prepareDragDrop(t.el),t.subGrid&&n&&t.subGrid.setStatic(e,i,n)}),i&&this._setStaticClass(),this)}updateOptions(e){var n;const i=this.opts;return e===i?this:(e.acceptWidgets!==void 0&&(i.acceptWidgets=e.acceptWidgets,this._setupAcceptWidget()),e.animate!==void 0&&this.setAnimation(e.animate),e.cellHeight&&this.cellHeight(e.cellHeight),e.class!==void 0&&e.class!==i.class&&(i.class&&this.el.classList.remove(i.class),e.class&&this.el.classList.add(e.class)),e.columnOpts?(this.opts.columnOpts=e.columnOpts,this.checkDynamicColumn()):e.columnOpts===null&&this.opts.columnOpts?(delete this.opts.columnOpts,this._updateResizeEvent()):typeof e.column=="number"&&this.column(e.column),e.margin!==void 0&&this.margin(e.margin),e.staticGrid!==void 0&&this.setStatic(e.staticGrid),e.disableDrag!==void 0&&!e.staticGrid&&this.enableMove(!e.disableDrag),e.disableResize!==void 0&&!e.staticGrid&&this.enableResize(!e.disableResize),e.float!==void 0&&this.float(e.float),e.row!==void 0?(i.minRow=i.maxRow=i.row=e.row,this._updateContainerHeight()):(e.minRow!==void 0&&(i.minRow=e.minRow,this._updateContainerHeight()),e.maxRow!==void 0&&(i.maxRow=e.maxRow)),e.lazyLoad!==void 0&&(i.lazyLoad=e.lazyLoad),(n=e.children)!=null&&n.length&&this.load(e.children),this)}update(e,i){return Ai.getElements(e).forEach(n=>{var c;const t=n==null?void 0:n.gridstackNode;if(!t)return;const o={...ir.copyPos({},t),...ir.cloneDeep(i)};this.engine.nodeBoundFix(o),delete o.autoPosition;const a=["x","y","w","h"];let s;if(a.some(d=>o[d]!==void 0&&o[d]!==t[d])&&(s={},a.forEach(d=>{s[d]=o[d]!==void 0?o[d]:t[d],delete o[d]})),!s&&(o.minW||o.minH||o.maxW||o.maxH)&&(s={}),o.content!==void 0){const d=n.querySelector(".grid-stack-item-content");d&&d.textContent!==o.content&&(t.content=o.content,Ai.renderCB(d,o),(c=t.subGrid)!=null&&c.el&&(d.appendChild(t.subGrid.el),t.subGrid._updateContainerHeight())),delete o.content}let l=!1,u=!1;for(const d in o)d[0]!=="_"&&t[d]!==o[d]&&(t[d]=o[d],l=!0,u=u||!this.opts.staticGrid&&(d==="noResize"||d==="noMove"||d==="locked"));if(ir.sanitizeMinMax(t),s){const d=s.w!==void 0&&s.w!==t.w;this.moveNode(t,s),d&&t.subGrid?t.subGrid.onResize(this.hasAnimationCSS()?t.w:void 0):this.resizeToContentCheck(d,t),delete t._orig}(s||l)&&this._writeAttr(n,t),u&&this.prepareDragDrop(t.el),Ai.updateCB&&Ai.updateCB(t)}),this}moveNode(e,i){const n=e._updating;n||this.engine.cleanNodes().beginUpdate(e),this.engine.moveNode(e,i),this._updateContainerHeight(),n||(this._triggerChangeEvent(),this.engine.endUpdate())}resizeToContent(e){var f,h;if(!e||(e.classList.remove("size-to-content-max"),!e.clientHeight))return;const i=e.gridstackNode;if(!i)return;const n=i.grid;if(!n||e.parentElement!==n.el)return;const t=n.getCellHeight(!0);if(!t)return;let o=i.h?i.h*t:e.clientHeight,a;if(i.resizeToContentParent&&(a=e.querySelector(i.resizeToContentParent)),a||(a=e.querySelector(Ai.resizeToContentParent)),!a)return;const s=e.clientHeight-a.clientHeight,l=i.h?i.h*t-s:a.clientHeight;let u;if(i.subGrid){u=i.subGrid.getRow()*i.subGrid.getCellHeight(!0);const p=i.subGrid.el.getBoundingClientRect(),g=e.getBoundingClientRect();u+=p.top-g.top}else{if((h=(f=i.subGridOpts)==null?void 0:f.children)!=null&&h.length)return;{const p=a.firstElementChild;if(!p){console.error(`Error: GridStack.resizeToContent() widget id:${i.id} '${Ai.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);return}u=p.getBoundingClientRect().height||l}}if(l===u)return;o+=u-l;let c=Math.ceil(o/t);const d=Number.isInteger(i.sizeToContent)?i.sizeToContent:0;d&&c>d&&(c=d,e.classList.add("size-to-content-max")),i.minH&&c<i.minH?c=i.minH:i.maxH&&c>i.maxH&&(c=i.maxH),c!==i.h&&(n._ignoreLayoutsNodeChange=!0,n.moveNode(i,{h:c}),delete n._ignoreLayoutsNodeChange)}resizeToContentCBCheck(e){Ai.resizeToContentCB?Ai.resizeToContentCB(e):this.resizeToContent(e)}rotate(e,i){return Ai.getElements(e).forEach(n=>{const t=n.gridstackNode;if(!ir.canBeRotated(t))return;const o={w:t.h,h:t.w,minH:t.minW,minW:t.minH,maxH:t.maxW,maxW:t.maxH};if(i){const s=i.left>0?Math.floor(i.left/this.cellWidth()):0,l=i.top>0?Math.floor(i.top/this.opts.cellHeight):0;o.x=t.x+s-(t.h-(l+1)),o.y=t.y+l-s}Object.keys(o).forEach(s=>{o[s]===void 0&&delete o[s]});const a=t._orig;this.update(n,o),t._orig=a}),this}margin(e){if(!(typeof e=="string"&&e.split(" ").length>1)){const n=ir.parseHeight(e);if(this.opts.marginUnit===n.unit&&this.opts.margin===n.h)return}return this.opts.margin=e,this.opts.marginTop=this.opts.marginBottom=this.opts.marginLeft=this.opts.marginRight=void 0,this._initMargin(),this}getMargin(){return this.opts.margin}willItFit(e){return this.engine.willItFit(e)}_triggerChangeEvent(){if(this.engine.batchMode)return this;const e=this.engine.getDirtyNodes(!0);return e&&e.length&&(this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(e),this._triggerEvent("change",e)),this.engine.saveInitial(),this}_triggerAddEvent(){var e;if(this.engine.batchMode)return this;if((e=this.engine.addedNodes)!=null&&e.length){this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(this.engine.addedNodes),this.engine.addedNodes.forEach(n=>{delete n._dirty});const i=[...this.engine.addedNodes];this.engine.addedNodes=[],this._triggerEvent("added",i)}return this}_triggerRemoveEvent(){var e;if(this.engine.batchMode)return this;if((e=this.engine.removedNodes)!=null&&e.length){const i=[...this.engine.removedNodes];this.engine.removedNodes=[],this._triggerEvent("removed",i)}return this}_triggerEvent(e,i){const n=i?new CustomEvent(e,{bubbles:!1,detail:i}):new Event(e);let t=this;for(;t.parentGridNode;)t=t.parentGridNode.grid;return t.el.dispatchEvent(n),this}_updateContainerHeight(){if(!this.engine||this.engine.batchMode)return this;const e=this.parentGridNode;let i=this.getRow()+this._extraDragRow;const n=this.opts.cellHeight,t=this.opts.cellHeightUnit;if(!n)return this;if(!e&&!this.opts.minRow){const o=ir.parseHeight(getComputedStyle(this.el).minHeight);if(o.h>0&&o.unit===t){const a=Math.floor(o.h/n);i<a&&(i=a)}}return this.el.setAttribute("gs-current-row",String(i)),this.el.style.removeProperty("min-height"),this.el.style.removeProperty("height"),i&&(this.el.style[e?"minHeight":"height"]=i*n+t),e&&ir.shouldSizeToContent(e)&&e.grid.resizeToContentCBCheck(e.el),this}_prepareElement(e,i=!1,n){n=n||this._readAttr(e),e.gridstackNode=n,n.el=e,n.grid=this,n=this.engine.addNode(n,i),this._writeAttr(e,n),e.classList.add(hh.itemClass,this.opts.itemClass);const t=ir.shouldSizeToContent(n);return t?e.classList.add("size-to-content"):e.classList.remove("size-to-content"),t&&this.resizeToContentCheck(!1,n),ir.lazyLoad(n)||this.prepareDragDrop(n.el),this}_writePosAttr(e,i){return(!i._moving&&!i._resizing||this._placeholder===e)&&(e.style.top=i.y?i.y===1?"var(--gs-cell-height)":`calc(${i.y} * var(--gs-cell-height))`:null,e.style.left=i.x?i.x===1?"var(--gs-column-width)":`calc(${i.x} * var(--gs-column-width))`:null,e.style.width=i.w>1?`calc(${i.w} * var(--gs-column-width))`:null,e.style.height=i.h>1?`calc(${i.h} * var(--gs-cell-height))`:null),e.setAttribute("gs-x",String(i.x)),e.setAttribute("gs-y",String(i.y)),i.w>1?e.setAttribute("gs-w",String(i.w)):e.removeAttribute("gs-w"),i.h>1?e.setAttribute("gs-h",String(i.h)):e.removeAttribute("gs-h"),this}_writeAttr(e,i){if(!i)return this;this._writePosAttr(e,i);const n={noResize:"gs-no-resize",noMove:"gs-no-move",locked:"gs-locked",id:"gs-id",sizeToContent:"gs-size-to-content"};for(const t in n)i[t]?e.setAttribute(n[t],String(i[t])):e.removeAttribute(n[t]);return this}_readAttr(e,i=!0){const n={};n.x=ir.toNumber(e.getAttribute("gs-x")),n.y=ir.toNumber(e.getAttribute("gs-y")),n.w=ir.toNumber(e.getAttribute("gs-w")),n.h=ir.toNumber(e.getAttribute("gs-h")),n.autoPosition=ir.toBool(e.getAttribute("gs-auto-position")),n.noResize=ir.toBool(e.getAttribute("gs-no-resize")),n.noMove=ir.toBool(e.getAttribute("gs-no-move")),n.locked=ir.toBool(e.getAttribute("gs-locked"));const t=e.getAttribute("gs-size-to-content");t&&(t==="true"||t==="false"?n.sizeToContent=ir.toBool(t):n.sizeToContent=parseInt(t,10)),n.id=e.getAttribute("gs-id"),n.maxW=ir.toNumber(e.getAttribute("gs-max-w")),n.minW=ir.toNumber(e.getAttribute("gs-min-w")),n.maxH=ir.toNumber(e.getAttribute("gs-max-h")),n.minH=ir.toNumber(e.getAttribute("gs-min-h")),i&&(n.w===1&&e.removeAttribute("gs-w"),n.h===1&&e.removeAttribute("gs-h"),n.maxW&&e.removeAttribute("gs-max-w"),n.minW&&e.removeAttribute("gs-min-w"),n.maxH&&e.removeAttribute("gs-max-h"),n.minH&&e.removeAttribute("gs-min-h"));for(const o in n){if(!n.hasOwnProperty(o))return;!n[o]&&n[o]!==0&&o!=="sizeToContent"&&delete n[o]}return n}_setStaticClass(){const e=["grid-stack-static"];return this.opts.staticGrid?(this.el.classList.add(...e),this.el.setAttribute("gs-static","true")):(this.el.classList.remove(...e),this.el.removeAttribute("gs-static")),this}onResize(e=(i=>(i=this.el)==null?void 0:i.clientWidth)()){if(!e||this.prevWidth===e)return;this.prevWidth=e,this.batchUpdate();let n=!1;return this._autoColumn&&this.parentGridNode?this.opts.column!==this.parentGridNode.w&&(this.column(this.parentGridNode.w,this.opts.layout||"list"),n=!0):n=this.checkDynamicColumn(),this._isAutoCellHeight&&this.cellHeight(),this.engine.nodes.forEach(t=>{t.subGrid&&t.subGrid.onResize()}),this._skipInitialResize||this.resizeToContentCheck(n),delete this._skipInitialResize,this.batchUpdate(!1),this}resizeToContentCheck(e=!1,i=void 0){if(this.engine){if(e&&this.hasAnimationCSS())return setTimeout(()=>this.resizeToContentCheck(!1,i),this.animationDelay);if(i)ir.shouldSizeToContent(i)&&this.resizeToContentCBCheck(i.el);else if(this.engine.nodes.some(n=>ir.shouldSizeToContent(n))){const n=[...this.engine.nodes];this.batchUpdate(),n.forEach(t=>{ir.shouldSizeToContent(t)&&this.resizeToContentCBCheck(t.el)}),this._ignoreLayoutsNodeChange=!0,this.batchUpdate(!1),this._ignoreLayoutsNodeChange=!1}this._gsEventHandler.resizecontent&&this._gsEventHandler.resizecontent(null,i?[i]:this.engine.nodes)}}_updateResizeEvent(e=!1){const i=!this.parentGridNode&&(this._isAutoCellHeight||this.opts.sizeToContent||this.opts.columnOpts||this.engine.nodes.find(n=>n.sizeToContent));return!e&&i&&!this.resizeObserver?(this._sizeThrottle=ir.throttle(()=>this.onResize(),this.opts.cellHeightThrottle),this.resizeObserver=new ResizeObserver(()=>this._sizeThrottle()),this.resizeObserver.observe(this.el),this._skipInitialResize=!0):(e||!i)&&this.resizeObserver&&(this.resizeObserver.disconnect(),delete this.resizeObserver,delete this._sizeThrottle),this}static getElement(e=".grid-stack-item"){return ir.getElement(e)}static getElements(e=".grid-stack-item"){return ir.getElements(e)}static getGridElement(e){return Ai.getElement(e)}static getGridElements(e){return ir.getElements(e)}_initMargin(){let e,i=0,n=[];typeof this.opts.margin=="string"&&(n=this.opts.margin.split(" ")),n.length===2?(this.opts.marginTop=this.opts.marginBottom=n[0],this.opts.marginLeft=this.opts.marginRight=n[1]):n.length===4?(this.opts.marginTop=n[0],this.opts.marginRight=n[1],this.opts.marginBottom=n[2],this.opts.marginLeft=n[3]):(e=ir.parseHeight(this.opts.margin),this.opts.marginUnit=e.unit,i=this.opts.margin=e.h),["marginTop","marginRight","marginBottom","marginLeft"].forEach(a=>{this.opts[a]===void 0?this.opts[a]=i:(e=ir.parseHeight(this.opts[a]),this.opts[a]=e.h,delete this.opts.margin)}),this.opts.marginUnit=e.unit,this.opts.marginTop===this.opts.marginBottom&&this.opts.marginLeft===this.opts.marginRight&&this.opts.marginTop===this.opts.marginRight&&(this.opts.margin=this.opts.marginTop);const o=this.el.style;return o.setProperty("--gs-item-margin-top",`${this.opts.marginTop}${this.opts.marginUnit}`),o.setProperty("--gs-item-margin-bottom",`${this.opts.marginBottom}${this.opts.marginUnit}`),o.setProperty("--gs-item-margin-right",`${this.opts.marginRight}${this.opts.marginUnit}`),o.setProperty("--gs-item-margin-left",`${this.opts.marginLeft}${this.opts.marginUnit}`),this}static getDD(){return Ed}static setupDragIn(e,i,n,t=document){(i==null?void 0:i.pause)!==void 0&&(Ki.pauseDrag=i.pause),i={appendTo:"body",helper:"clone",...i||{}},(typeof e=="string"?ir.getElements(e,t):e).forEach((a,s)=>{Ed.isDraggable(a)||Ed.dragIn(a,i),n!=null&&n[s]&&(a.gridstackNode=n[s])})}movable(e,i){return this.opts.staticGrid?this:(Ai.getElements(e).forEach(n=>{const t=n.gridstackNode;t&&(i?delete t.noMove:t.noMove=!0,this.prepareDragDrop(t.el))}),this)}resizable(e,i){return this.opts.staticGrid?this:(Ai.getElements(e).forEach(n=>{const t=n.gridstackNode;t&&(i?delete t.noResize:t.noResize=!0,this.prepareDragDrop(t.el))}),this)}disable(e=!0){if(!this.opts.staticGrid)return this.enableMove(!1,e),this.enableResize(!1,e),this._triggerEvent("disable"),this}enable(e=!0){if(!this.opts.staticGrid)return this.enableMove(!0,e),this.enableResize(!0,e),this._triggerEvent("enable"),this}enableMove(e,i=!0){return this.opts.staticGrid?this:(e?delete this.opts.disableDrag:this.opts.disableDrag=!0,this.engine.nodes.forEach(n=>{this.prepareDragDrop(n.el),n.subGrid&&i&&n.subGrid.enableMove(e,i)}),this)}enableResize(e,i=!0){return this.opts.staticGrid?this:(e?delete this.opts.disableResize:this.opts.disableResize=!0,this.engine.nodes.forEach(n=>{this.prepareDragDrop(n.el),n.subGrid&&i&&n.subGrid.enableResize(e,i)}),this)}cancelDrag(){var i;const e=(i=this._placeholder)==null?void 0:i.gridstackNode;e&&(e._isExternal?(e._isAboutToRemove=!0,this.engine.removeNode(e)):e._isAboutToRemove&&Ai._itemRemoving(e.el,!1),this.engine.restoreInitial())}_removeDD(e){return Ed.draggable(e,"destroy").resizable(e,"destroy"),e.gridstackNode&&delete e.gridstackNode._initDD,delete e.ddElement,this}_setupAcceptWidget(){if(this.opts.staticGrid||!this.opts.acceptWidgets&&!this.opts.removable)return Ed.droppable(this.el,"destroy"),this;let e,i;const n=(t,o,a)=>{var f;a=a||o;const s=a.gridstackNode;if(!s)return;if(!((f=s.grid)!=null&&f.el)){a.style.transform=`scale(${1/this.dragTransform.xScale},${1/this.dragTransform.yScale})`;const h=a.getBoundingClientRect();a.style.left=h.x+(this.dragTransform.xScale-1)*(t.clientX-h.x)/this.dragTransform.xScale+"px",a.style.top=h.y+(this.dragTransform.yScale-1)*(t.clientY-h.y)/this.dragTransform.yScale+"px",a.style.transformOrigin="0px 0px"}let{top:l,left:u}=a.getBoundingClientRect();const c=this.el.getBoundingClientRect();u-=c.left,l-=c.top;const d={position:{top:l*this.dragTransform.xScale,left:u*this.dragTransform.yScale}};if(s._temporaryRemoved){if(s.x=Math.max(0,Math.round(u/i)),s.y=Math.max(0,Math.round(l/e)),delete s.autoPosition,this.engine.nodeBoundFix(s),!this.engine.willItFit(s)){if(s.autoPosition=!0,!this.engine.willItFit(s)){Ed.off(o,"drag");return}s._willFitPos&&(ir.copyPos(s,s._willFitPos),delete s._willFitPos)}this._onStartMoving(a,t,d,s,i,e)}else this._dragOrResize(a,t,d,s,i,e)};return Ed.droppable(this.el,{accept:t=>{const o=t.gridstackNode||this._readAttr(t,!1);if((o==null?void 0:o.grid)===this)return!0;if(!this.opts.acceptWidgets)return!1;let a=!0;if(typeof this.opts.acceptWidgets=="function")a=this.opts.acceptWidgets(t);else{const s=this.opts.acceptWidgets===!0?".grid-stack-item":this.opts.acceptWidgets;a=t.matches(s)}if(a&&o&&this.opts.maxRow){const s={w:o.w,h:o.h,minW:o.minW,minH:o.minH};a=this.engine.willItFit(s)}return a}}).on(this.el,"dropover",(t,o,a)=>{let s=(a==null?void 0:a.gridstackNode)||o.gridstackNode;if((s==null?void 0:s.grid)===this&&!s._temporaryRemoved)return!1;if(s!=null&&s._sidebarOrig&&(s.w=s._sidebarOrig.w,s.h=s._sidebarOrig.h),s!=null&&s.grid&&s.grid!==this&&!s._temporaryRemoved&&s.grid._leave(o,a),a=a||o,i=this.cellWidth(),e=this.getCellHeight(!0),!s){const c=a.getAttribute("data-gs-widget")||a.getAttribute("gridstacknode");if(c){try{s=JSON.parse(c)}catch{console.error("Gridstack dropover: Bad JSON format: ",c)}a.removeAttribute("data-gs-widget"),a.removeAttribute("gridstacknode")}s||(s=this._readAttr(a)),s._sidebarOrig={w:s.w,h:s.h}}s.grid||(s.el||(s={...s}),s._isExternal=!0,a.gridstackNode=s);const l=s.w||Math.round(a.offsetWidth/i)||1,u=s.h||Math.round(a.offsetHeight/e)||1;return s.grid&&s.grid!==this?(o._gridstackNodeOrig||(o._gridstackNodeOrig=s),o.gridstackNode=s={...s,w:l,h:u,grid:this},delete s.x,delete s.y,this.engine.cleanupNode(s).nodeBoundFix(s),s._initDD=s._isExternal=s._temporaryRemoved=!0):(s.w=l,s.h=u,s._temporaryRemoved=!0),Ai._itemRemoving(s.el,!1),Ed.on(o,"drag",n),n(t,o,a),!1}).on(this.el,"dropout",(t,o,a)=>{const s=(a==null?void 0:a.gridstackNode)||o.gridstackNode;return s&&(!s.grid||s.grid===this)&&(this._leave(o,a),this._isTemp&&this.removeAsSubGrid(s)),!1}).on(this.el,"drop",(t,o,a)=>{var f,h,p;const s=(a==null?void 0:a.gridstackNode)||o.gridstackNode;if((s==null?void 0:s.grid)===this&&!s._isExternal)return!1;const l=!!this.placeholder.parentElement,u=o!==a;this.placeholder.remove(),delete this.placeholder.gridstackNode,l&&this.opts.animate&&(this.setAnimation(!1),this.setAnimation(!0,!0));const c=o._gridstackNodeOrig;if(delete o._gridstackNodeOrig,l&&(c!=null&&c.grid)&&c.grid!==this){const g=c.grid;g.engine.removeNodeFromLayoutCache(c),g.engine.removedNodes.push(c),g._triggerRemoveEvent()._triggerChangeEvent(),g.parentGridNode&&!g.engine.nodes.length&&g.opts.subGridDynamic&&g.removeAsSubGrid()}if(!s||(l&&(this.engine.cleanupNode(s),s.grid=this),(f=s.grid)==null||delete f._isTemp,Ed.off(o,"drag"),a!==o?(a.remove(),o=a):o.remove(),this._removeDD(o),!l))return!1;const d=(p=(h=s.subGrid)==null?void 0:h.el)==null?void 0:p.gridstack;return ir.copyPos(s,this._readAttr(this.placeholder)),ir.removePositioningStyles(o),u&&(s.content||s.subGridOpts||Ai.addRemoveCB)?(delete s.el,o=this.addWidget(s)):(this._prepareElement(o,!0,s),this.el.appendChild(o),this.resizeToContentCheck(!1,s),d&&(d.parentGridNode=s),this._updateContainerHeight()),this.engine.addedNodes.push(s),this._triggerAddEvent(),this._triggerChangeEvent(),this.engine.endUpdate(),this._gsEventHandler.dropped&&this._gsEventHandler.dropped({...t,type:"dropped"},c&&c.grid?c:void 0,s),!1}),this}static _itemRemoving(e,i){if(!e)return;const n=e?e.gridstackNode:void 0;!(n!=null&&n.grid)||e.classList.contains(n.grid.opts.removableOptions.decline)||(i?n._isAboutToRemove=!0:delete n._isAboutToRemove,i?e.classList.add("grid-stack-item-removing"):e.classList.remove("grid-stack-item-removing"))}_setupRemoveDrop(){if(typeof this.opts.removable!="string")return this;const e=document.querySelector(this.opts.removable);return e?(!this.opts.staticGrid&&!Ed.isDroppable(e)&&Ed.droppable(e,this.opts.removableOptions).on(e,"dropover",(i,n)=>Ai._itemRemoving(n,!0)).on(e,"dropout",(i,n)=>Ai._itemRemoving(n,!1)),this):this}prepareDragDrop(e,i=!1){const n=e==null?void 0:e.gridstackNode;if(!n)return;const t=n.noMove||this.opts.disableDrag,o=n.noResize||this.opts.disableResize,a=this.opts.staticGrid||t&&o;if((i||a)&&(n._initDD&&(this._removeDD(e),delete n._initDD),a&&e.classList.add("ui-draggable-disabled","ui-resizable-disabled"),!i))return this;if(!n._initDD){let s,l;const u=(f,h)=>{this.triggerEvent(f,f.target),s=this.cellWidth(),l=this.getCellHeight(!0),this._onStartMoving(e,f,h,n,s,l)},c=(f,h)=>{this._dragOrResize(e,f,h,n,s,l)},d=f=>{this.placeholder.remove(),delete this.placeholder.gridstackNode,delete n._moving,delete n._resizing,delete n._event,delete n._lastTried;const h=n.w!==n._orig.w,p=f.target;if(!(!p.gridstackNode||p.gridstackNode.grid!==this)){if(n.el=p,n._isAboutToRemove){const g=e.gridstackNode.grid;g._gsEventHandler[f.type]&&g._gsEventHandler[f.type](f,p),g.engine.nodes.push(n),g.removeWidget(e,!0,!0)}else ir.removePositioningStyles(p),n._temporaryRemoved?(this._writePosAttr(p,n),this.engine.addNode(n)):this._writePosAttr(p,n),this.triggerEvent(f,p);this._extraDragRow=0,this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate(),f.type==="resizestop"&&(Number.isInteger(n.sizeToContent)&&(n.sizeToContent=n.h),this.resizeToContentCheck(h,n))}};Ed.draggable(e,{start:u,stop:d,drag:c}).resizable(e,{start:u,stop:d,resize:c}),n._initDD=!0}return Ed.draggable(e,t?"disable":"enable").resizable(e,o?"disable":"enable"),this}_onStartMoving(e,i,n,t,o,a){var s;if(this.engine.cleanNodes().beginUpdate(t),this._writePosAttr(this.placeholder,t),this.el.appendChild(this.placeholder),this.placeholder.gridstackNode=t,(s=t.grid)!=null&&s.el)this.dragTransform=ir.getValuesFromTransformedElement(e);else if(this.placeholder&&this.placeholder.closest(".grid-stack")){const l=this.placeholder.closest(".grid-stack");this.dragTransform=ir.getValuesFromTransformedElement(l)}else this.dragTransform={xScale:1,xOffset:0,yScale:1,yOffset:0};if(t.el=this.placeholder,t._lastUiPosition=n.position,t._prevYPix=n.position.top,t._moving=i.type==="dragstart",t._resizing=i.type==="resizestart",delete t._lastTried,i.type==="dropover"&&t._temporaryRemoved&&(this.engine.addNode(t),t._moving=!0),this.engine.cacheRects(o,a,this.opts.marginTop,this.opts.marginRight,this.opts.marginBottom,this.opts.marginLeft),i.type==="resizestart"){const l=this.getColumn()-t.x,u=(this.opts.maxRow||Number.MAX_SAFE_INTEGER)-t.y;Ed.resizable(e,"option","minWidth",o*Math.min(t.minW||1,l)).resizable(e,"option","minHeight",a*Math.min(t.minH||1,u)).resizable(e,"option","maxWidth",o*Math.min(t.maxW||Number.MAX_SAFE_INTEGER,l)).resizable(e,"option","maxWidthMoveLeft",o*Math.min(t.maxW||Number.MAX_SAFE_INTEGER,t.x+t.w)).resizable(e,"option","maxHeight",a*Math.min(t.maxH||Number.MAX_SAFE_INTEGER,u)).resizable(e,"option","maxHeightMoveUp",a*Math.min(t.maxH||Number.MAX_SAFE_INTEGER,t.y+t.h))}}_dragOrResize(e,i,n,t,o,a){const s={...t._orig};let l,u=this.opts.marginLeft,c=this.opts.marginRight,d=this.opts.marginTop,f=this.opts.marginBottom;const h=Math.round(a*.1),p=Math.round(o*.1);if(u=Math.min(u,p),c=Math.min(c,p),d=Math.min(d,h),f=Math.min(f,h),i.type==="drag"){if(t._temporaryRemoved)return;const v=n.position.top-t._prevYPix;t._prevYPix=n.position.top,this.opts.draggable.scroll!==!1&&ir.updateScrollPosition(e,n.position,v);const y=n.position.left+(n.position.left>t._lastUiPosition.left?-c:u),m=n.position.top+(n.position.top>t._lastUiPosition.top?-f:d);s.x=Math.round(y/o),s.y=Math.round(m/a);const b=this._extraDragRow;if(this.engine.collide(t,s)){const S=this.getRow();let _=Math.max(0,s.y+t.h-S);this.opts.maxRow&&S+_>this.opts.maxRow&&(_=Math.max(0,this.opts.maxRow-S)),this._extraDragRow=_}else this._extraDragRow=0;if(this._extraDragRow!==b&&this._updateContainerHeight(),t.x===s.x&&t.y===s.y)return}else if(i.type==="resize"){if(s.x<0||(ir.updateScrollResize(i,e,a),s.w=Math.round((n.size.width-u)/o),s.h=Math.round((n.size.height-d)/a),t.w===s.w&&t.h===s.h)||t._lastTried&&t._lastTried.w===s.w&&t._lastTried.h===s.h)return;const v=n.position.left+u,y=n.position.top+d;s.x=Math.round(v/o),s.y=Math.round(y/a),l=!0}t._event=i,t._lastTried=s;const g={x:n.position.left+u,y:n.position.top+d,w:(n.size?n.size.width:t.w*o)-u-c,h:(n.size?n.size.height:t.h*a)-d-f};if(this.engine.moveNodeCheck(t,{...s,cellWidth:o,cellHeight:a,rect:g,resizing:l})){t._lastUiPosition=n.position,this.engine.cacheRects(o,a,d,c,f,u),delete t._skipDown,l&&t.subGrid&&t.subGrid.onResize(),this._extraDragRow=0,this._updateContainerHeight();const v=i.target;t._sidebarOrig||this._writePosAttr(v,t),this.triggerEvent(i,v)}}triggerEvent(e,i){let n=this;for(;n.parentGridNode;)n=n.parentGridNode.grid;n._gsEventHandler[e.type]&&n._gsEventHandler[e.type](e,i)}_leave(e,i){i=i||e;const n=i.gridstackNode;if(!n||(i.style.transform=i.style.transformOrigin=null,Ed.off(e,"drag"),n._temporaryRemoved))return;n._temporaryRemoved=!0,this.engine.removeNode(n),n.el=n._isExternal&&i?i:e;const t=n._sidebarOrig;n._isExternal&&this.engine.cleanupNode(n),n._sidebarOrig=t,this.opts.removable===!0&&Ai._itemRemoving(e,!0),e._gridstackNodeOrig?(e.gridstackNode=e._gridstackNodeOrig,delete e._gridstackNodeOrig):n._isExternal&&this.engine.restoreInitial()}}Ai.renderCB=(r,e)=>{r&&(e!=null&&e.content)&&(r.textContent=e.content)};Ai.resizeToContentParent=".grid-stack-item-content";Ai.Utils=ir;Ai.Engine=B0;Ai.GDRev="12.4.2";const dst=80,fst=12,hst=4,pst=G.forwardRef(function({items:e,onLayoutChange:i,columns:n=fst,margin:t=hst,renderItem:o},a){const s=G.useRef(null),l=G.useRef(null),[u,c]=G.useState(new Map),d=G.useRef(!1);return G.useEffect(()=>{if(!(!s.current||d.current))return l.current=Ai.init({handle:".grid-stack-item-drag-handle",column:n,cellHeight:dst,margin:t,float:!0,animate:!0,resizable:{handles:"se"},draggable:{handle:".grid-stack-item-drag-handle"}},s.current),d.current=!0,l.current.on("change",()=>{if(i&&l.current){const f=l.current.getGridItems().map(h=>{const p=h.gridstackNode;return{id:p==null?void 0:p.id,x:(p==null?void 0:p.x)??0,y:(p==null?void 0:p.y)??0,w:(p==null?void 0:p.w)??12,h:(p==null?void 0:p.h)??3}});i(f)}}),()=>{l.current&&(l.current.destroy(!1),l.current=null,d.current=!1)}},[n,t,i]),G.useImperativeHandle(a,()=>({compact:()=>{l.current&&l.current.compact("list",!0)}}),[]),G.useEffect(()=>{const f=l.current;if(!f||!d.current)return;f.batchUpdate();const h=f.getGridItems(),p=new Map;h.forEach(y=>{const m=y.getAttribute("gs-id");m&&p.set(m,y)});const g=new Map;e.forEach(y=>{if(p.has(y.id)){const b=p.get(y.id).querySelector(".grid-stack-item-content");b&&g.set(y.id,b)}else{console.log("Creating new widget",y);const b=f.addWidget({id:y.id,x:y.x??0,y:y.y,w:y.w??3,h:y.h??3,content:""}).querySelector(".grid-stack-item-content");b&&g.set(y.id,b)}});const v=new Set(e.map(y=>y.id));p.forEach((y,m)=>{v.has(m)||f.removeWidget(y)}),f.batchUpdate(!1),queueMicrotask(()=>{c(g)})},[e]),R.jsxs("div",{className:"gridstack-container w-full}",children:[R.jsx("div",{ref:s,className:"grid-stack"}),e.map(f=>{const h=u.get(f.id);return h?R.jsx("div",{children:au.createPortal(o(f,h),h)},f.id):null})]})}),gst=R.jsxs("div",{className:"max-w-md space-y-1",children:[R.jsx("p",{className:"text-sm font-semibold",children:"Trace"}),R.jsxs("p",{className:"text-xs text-neutral-200",children:[R.jsx("span",{className:"font-bold",children:"Settings"}),":"]}),R.jsxs("p",{className:"text-xs text-neutral-200 ms-2",children:[R.jsx("span",{className:"font-semibold",children:"Buffer size"}),": Max number of entries (circular buffer)",R.jsx("br",{}),R.jsx("span",{className:"font-semibold",children:"Sort order"}),": Newest-first or oldest-first",R.jsx("br",{}),R.jsx("span",{className:"font-semibold",children:"Group by frame"}),": Show one row per frame (latest entry)"]})]}),vst={chevron:12,timestamp:100,delta:64,frameId:56,name:140,rawData:200},yst={chevron:12,timestamp:80,delta:50,frameId:50,name:80,rawData:100};class mst{constructor(e){To(this,"buffer");To(this,"head",0);To(this,"tail",0);To(this,"count",0);To(this,"capacity");this.capacity=e,this.buffer=new Array(e)}push(e){this.buffer[this.tail]=e,this.tail=(this.tail+1)%this.capacity,this.count<this.capacity?this.count++:this.head=(this.head+1)%this.capacity}toArray(){const e=[];for(let i=0;i<this.count;i++)e.push(this.buffer[(this.head+i)%this.capacity]);return e}clear(){this.head=0,this.tail=0,this.count=0}get length(){return this.count}resize(e){const i=this.toArray();this.capacity=e,this.buffer=new Array(e),this.head=0,this.tail=0,this.count=0;const n=Math.max(0,i.length-e);for(let t=n;t<i.length;t++)this.push(i[t])}}function _ge(r,e=8){if(!r||r.length===0)return"-";const n=Array.from(r.slice(0,e)).map(t=>t.toString(16).padStart(2,"0").toUpperCase()).join(" ");return r.length>e?`${n}...`:n}function bst(r){const e=new Date(Math.floor(r/1e3)),i=e.getHours().toString().padStart(2,"0"),n=e.getMinutes().toString().padStart(2,"0"),t=e.getSeconds().toString().padStart(2,"0"),o=(r%1e6).toString().padStart(6,"0");return`${i}:${n}:${t}.${o}`}function Sst(r,e){return e===void 0?"-":`${((r-e)/1e6).toFixed(3)}s`}function _st(r){return r===void 0?"-":`0x${r.toString(16).toUpperCase()}`}function Pge(r,e){if(e&&e[r]!==void 0)return e[r]}const c6=[500,1e3,5e3,1e4,2e4,3e4,4e4,5e4];function Pst(r){const e=c6.indexOf(r.bufferSize),i=n=>{const t=Math.max(0,Math.min(c6.length-1,e+n));r.onBufferSizeChange(c6[t])};return R.jsxs(xi,{children:[R.jsxs(xi.Section,{title:"Settings",children:[R.jsx(xi.NumberStepper,{label:"Buffer",value:r.bufferSize,onChange:n=>i(n>r.bufferSize?1:-1),formatValue:n=>n>=1e3?`${n/1e3}k`:n.toString()}),R.jsx(xi.Toggle,{label:"Newest first",checked:r.sortOrder==="newest-first",onChange:n=>r.onSortOrderChange(n?"newest-first":"oldest-first")}),R.jsx(xi.Toggle,{label:"Group by frame",checked:r.groupByFrame,onChange:r.onGroupByFrameChange})]}),R.jsx(xi.Divider,{}),R.jsxs(xi.Section,{title:"Actions",children:[r.onAddSignal&&R.jsx(xi.Button,{icon:sr.ACTION_EDIT,label:"Select signals",onClick:r.onAddSignal}),R.jsx(xi.Button,{icon:sr.ACTION_CLEAR,label:"Clear trace",onClick:r.onClear}),r.onRemove&&R.jsx(xi.RemoveButton,{onClick:r.onRemove})]})]})}const Cst=({entry:r,previousTimestampUs:e,isExpanded:i,onToggle:n,columnWidths:t,hideDelta:o})=>R.jsxs("div",{className:Nr("flex items-center px-2 py-1 cursor-pointer hover:bg-accent border-b border-border/30"),onClick:n,children:[R.jsx("div",{style:{width:t.chevron},className:"flex-shrink-0",children:r.signals.length>0?R.jsx(Fr,{type:i?sr.NAV_CHEVRON_DOWN:sr.NAV_CHEVRON_RIGHT,className:"w-3 h-3 text-muted-foreground"}):R.jsx("span",{className:"w-3 h-3 text-muted-foreground"})}),R.jsx("span",{style:{width:t.timestamp},className:"text-[10px] text-foreground font-mono flex-shrink-0 mr-2",children:bst(r.timestampUs)}),!o&&R.jsxs(R.Fragment,{children:[R.jsx("div",{className:"w-1 flex-shrink-0"}),R.jsx("span",{style:{width:t.delta},className:"text-[10px] text-muted-foreground font-mono flex-shrink-0 ml-2 mr-2",children:Sst(r.timestampUs,e)}),R.jsx("div",{className:"w-1 flex-shrink-0"})]}),R.jsxs("span",{style:{width:t.frameId},className:"text-[10px] text-primary font-mono flex-shrink-0 ml-2 mr-2",children:[r.frameId,"(",_st(r.frameId),")"]}),R.jsx("div",{className:"w-1 flex-shrink-0"}),R.jsx("span",{style:{width:t.name},className:"text-[10px] text-foreground truncate flex-shrink-0 ml-2 mr-2",title:r.frameName,children:r.frameName}),R.jsx("div",{className:"w-1 flex-shrink-0"}),R.jsx("span",{style:{width:t.rawData},className:"text-[10px] text-muted-foreground font-mono truncate flex-shrink-0 ml-2",title:r.rawHex,children:r.rawHex})]}),Tst=({signal:r})=>R.jsxs("div",{className:"flex items-center px-2 py-0.5 bg-muted/60 border-b border-border/20",children:[R.jsx("span",{className:"text-[10px] text-muted-foreground flex-1 truncate mr-4 ml-4",title:r.name,children:r.name}),R.jsx("span",{className:"text-[10px] text-green-600 dark:text-green-400 font-mono w-40 text-left truncate",children:r.formattedValue?`${r.formattedValue} (${r.value})`:r.value}),R.jsx("span",{className:"text-[10px] text-muted-foreground w-32 ml-2",children:r.unit||""})]}),hB=({onResize:r})=>{const[e,i]=G.useState(!1),n=G.useRef(0),t=G.useCallback(o=>{o.preventDefault(),o.stopPropagation(),i(!0),n.current=o.clientX;const a=l=>{const u=l.clientX-n.current;n.current=l.clientX,r(u)},s=()=>{i(!1),document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",s),document.body.style.cursor="",document.body.style.userSelect=""};document.addEventListener("mousemove",a),document.addEventListener("mouseup",s),document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[r]);return R.jsx("div",{className:Nr("w-1 h-full cursor-col-resize hover:bg-blue-500/50 transition-colors flex-shrink-0",e&&"bg-blue-500"),onMouseDown:t})};function xst(r){"use no memo";const{updatePanel:e,removePanel:i}=s_(),n=r.panelConfig,t=n.bufferSize,o=n.sortOrder,a=n.groupByFrame,s=n.expandSignals,l=G.useMemo(()=>n.frames??[],[n.frames]),u=G.useRef(null),c=G.useRef(null),d=Cj(),f=pz(),h=G.useRef(new mst(t)),p=G.useRef([]),g=G.useRef(0),v=G.useRef(new Map),[y,m]=G.useState(0),[b,S]=G.useState(new Set),[_,C]=G.useState(!1),[T,x]=G.useState(0),[A,w]=G.useState(!0),[L,k]=G.useState(!1),[D,j]=G.useState(vst),N=G.useRef(new Map),V=G.useMemo(()=>[],[]),W=24,K=18,H=be=>`${be.namespace}:${be.signal}`,U=be=>`${be.namespace}:${be.name}`,I=be=>`${be.namespace}:${be.frame}`,Q=G.useMemo(()=>{const be=new Map(l.map(ke=>[I(ke),new Set(ke.signals.map(qe=>H(qe)))]));return f.filter(ke=>be.has(ke.longName())).map(ke=>{const qe=be.get(ke.longName());return qe.size===0?{...ke,signals:[]}:{...ke,signals:ke.signals.filter(rt=>qe.has(rt.longName()))}})},[l,f]),Z=G.useMemo(()=>{const be=new Map;return Q.flatMap(ke=>ke.signals).forEach(ke=>{be.set(ke.longName(),ke)}),be},[Q]),ee=G.useCallback((be,ke)=>{const qe=be.signals.map(rt=>{const St=Z.get(U(rt));return{name:rt.name,value:rt.value,formattedValue:Pge(rt.value,St==null?void 0:St.namedValues),unit:(St==null?void 0:St.unit)||""}});return{id:g.current++,frameName:be.name||ke.name,namespace:ke.namespace||"",frameId:ke.frameId,timestampUs:be.timestampUs,rawHex:_ge(be.value),cycleTime:ke.cycleTime,signals:qe}},[Z]);G.useEffect(()=>{if(!d)return;const be=N.current,ke=new Set(Q.map(St=>St.longName())),qe=[];be.forEach((St,xt)=>{ke.has(xt)||(qe.push(St),be.delete(xt))}),qe.length>0&&d.removeSubscriptions(qe);let rt=!1;return Q.forEach(St=>{var Xe,Vt;const xt=St.longName();if(be.has(xt))return;const It=((Xe=l.find(lr=>`${lr.namespace}:${lr.frame}`===St.longName()))==null?void 0:Xe.signals.length)??0,Zt=It>0?new Set(St.signals.map(lr=>lr.name)):null,ct=It>0?St.signals:((Vt=f.find(lr=>lr.longName()===St.longName()))==null?void 0:Vt.signals)??[],Qe=[St.id,...ct.map(lr=>lr.id)],Et=lr=>{const Jt=Zt!==null?lr.signals.filter(kr=>Zt.has(kr.name)):[];p.current.push({frame:{...lr,signals:Jt},metadata:St})},Gt=new _F(Qe,Et,()=>{});d.addPendingSubscription(Gt),be.set(xt,Gt.subscriptionId),rt=!0}),rt&&d.applyPendingSubscriptions(),()=>{const St=Array.from(be.values());St.length>0&&(d.removeSubscriptions(St),be.clear())}},[d,Q,f,l]),G.useEffect(()=>{if(!a)return;const be=new Set(Q.map(ke=>ke.longName()));v.current.forEach((ke,qe)=>{be.has(qe)||v.current.delete(qe)}),m(ke=>ke+1)},[Q,a]),G.useEffect(()=>{const qe=setInterval(()=>{const rt=p.current;if(rt.length>0)if(_)x(rt.length);else if(a){const St=new Set,xt=[];for(const{frame:It,metadata:Zt}of rt){const ct=`${It.name}:${It.timestampUs}`;if(!St.has(ct)){St.add(ct);const Qe=Zt.longName(),Et=v.current.get(Qe);if(Et)Et.timestampUs=It.timestampUs,Et.rawHex=_ge(It.value),Et.signals=It.signals.map(Gt=>{const Xe=Z.get(U(Gt));return{name:Gt.name,value:Gt.value,formattedValue:Pge(Gt.value,Xe==null?void 0:Xe.namedValues),unit:(Xe==null?void 0:Xe.unit)||""}});else{const Gt=ee(It,Zt);v.current.set(Qe,Gt),xt.push(Gt.id)}h.current.push(ee(It,Zt))}}p.current=[],s&&xt.length>0&&S(It=>{const Zt=new Set(It);return xt.forEach(ct=>Zt.add(ct)),Zt}),m(It=>It+1)}else{const St=new Set,xt=[];for(const{frame:It,metadata:Zt}of rt){const ct=`${It.name}:${It.timestampUs}`;if(!St.has(ct)){St.add(ct);const Qe=ee(It,Zt);h.current.push(Qe),xt.push(Qe.id)}}p.current=[],s&&xt.length>0&&S(It=>{const Zt=new Set(It);return xt.forEach(ct=>Zt.add(ct)),Zt}),m(It=>It+1)}},100);return()=>clearInterval(qe)},[_,ee,s,a,Z]),G.useEffect(()=>{h.current.resize(t),m(be=>be+1)},[t]),G.useEffect(()=>{if(a){const be=new Map;for(const ke of h.current.toArray()){const qe=`${ke.namespace}:${ke.frameName}`,rt=be.get(qe);(!rt||ke.timestampUs>rt.timestampUs)&&be.set(qe,ke)}v.current=be}else v.current.clear();m(be=>be+1)},[a]);const ie=a?Array.from(v.current.values()):h.current.toArray(),de=a?[...ie].sort((be,ke)=>be.frameName.localeCompare(ke.frameName)):o==="newest-first"?[...ie].reverse():ie,pe=G.useCallback(be=>{const ke=de[be];return ke&&b.has(ke.id)?W+ke.signals.length*K:W},[de,b]),_e=P1e({count:de.length,getScrollElement:()=>c.current,estimateSize:be=>pe(be),getItemKey:be=>{var ke;return((ke=de[be])==null?void 0:ke.id)??be},measureElement:void 0,overscan:10});G.useEffect(()=>{A&&c.current&&!_&&o==="oldest-first"&&(c.current.scrollTop=c.current.scrollHeight)},[y,A,_,o]);const Te=G.useCallback(()=>{if(!c.current)return;const{scrollTop:be,scrollHeight:ke,clientHeight:qe}=c.current,rt=ke-be-qe<50;w(rt)},[]),De=G.useCallback(be=>{S(ke=>{const qe=new Set(ke);return qe.has(be)?qe.delete(be):qe.add(be),qe})},[]),Pe=G.useCallback((be,ke)=>{j(qe=>{const rt=Math.max(yst[be],qe[be]+ke);return{...qe,[be]:rt}})},[]),Ee=G.useCallback(()=>{h.current.clear(),v.current.clear(),p.current=[],S(new Set),m(be=>be+1),x(0)},[]),Re=()=>R.jsxs("div",{className:"flex flex-col justify-center items-center h-full",children:[R.jsxs("div",{className:"mb-4 flex flex-col items-center justify-center",children:[R.jsx("div",{className:"w-8 h-8 bg-accent rounded-sm flex items-center justify-center mb-2",children:R.jsx(Fr,{type:sr.DATA_TRACE,className:"w-5 h-5 text-foreground"})}),R.jsx("p",{className:"text-sm font-medium text-foreground",children:"Trace panel"}),R.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"Select signals to view values in a table"})]}),R.jsx(Uc,{icon:sr.ACTION_EDIT,label:"Select signals",type:Qo.PRIMARY,size:Vl.SM,onClick:()=>k(!0)})]}),je=()=>R.jsx("div",{className:"flex items-center gap-2",children:R.jsx("span",{className:"text-xxs leading-4 text-muted-foreground bg-muted px-1.5 py-0.5 rounded",children:_?`Paused (${T} pending)`:a?`${de.length.toLocaleString()} unique frames`:`${de.length.toLocaleString()} entries`})}),Ke=G.useCallback(()=>{const be=!s;if(e(r.panelId,"trace",ke=>({...ke,expandSignals:be})),be){const ke=new Set(de.map(qe=>qe.id));S(ke)}else S(new Set)},[s,de,r.panelId,e]),ot=()=>R.jsxs("button",{onClick:()=>C(!_),className:Nr("flex items-center gap-1 px-2 py-0.5 rounded text-xs transition-colors",_?"bg-green-600/20 text-green-600 dark:text-green-400 hover:bg-green-600/30":"bg-muted text-foreground hover:bg-accent"),children:[R.jsx(Fr,{type:_?sr.MEDIA_PLAY:sr.MEDIA_PAUSE,className:"w-3 h-3"}),R.jsx("span",{children:_?"Resume":"Pause"})]}),We=()=>R.jsxs("button",{onClick:Ke,className:Nr("flex items-center gap-1 px-2 py-0.5 rounded text-xs transition-colors",s?"bg-blue-600/20 text-blue-600 dark:text-blue-400 hover:bg-blue-600/30":"bg-muted text-foreground hover:bg-accent"),title:s?"Collapse all signals":"Expand all signals",children:[R.jsx(Fr,{type:s?sr.NAV_CHEVRON_DOWN:sr.NAV_CHEVRON_RIGHT,className:"w-3 h-3"}),R.jsx("span",{children:s?"Collapse All":"Expand All"})]}),xe=()=>{var be;return((be=n.unresolvedFrames)==null?void 0:be.length)===0?R.jsx(R.Fragment,{}):R.jsx(Z3,{signals:[],frames:n.unresolvedFrames??[],onRemoveFrame:ke=>e(r.panelId,"trace",qe=>{var rt;return{...qe,unresolvedFrames:(rt=qe.unresolvedFrames)==null?void 0:rt.filter(St=>!(St.namespace===ke.namespace&&St.frame===ke.frame))}})})},ve=be=>Q.length===0?Re():R.jsxs("div",{className:"flex flex-col h-full",children:[R.jsxs("div",{className:"flex items-center px-2 py-1 bg-muted border-b border-border text-[10px] text-muted-foreground uppercase tracking-wider",children:[R.jsx("span",{style:{width:D.chevron},className:"flex-shrink-0"}),R.jsx("span",{style:{width:D.timestamp},className:"flex-shrink-0 mr-2",children:"Timestamp"}),R.jsx(hB,{onResize:ke=>Pe("timestamp",ke)}),!a&&R.jsxs(R.Fragment,{children:[R.jsx("span",{style:{width:D.delta},className:"flex-shrink-0 ml-2 mr-2",children:"Delta"}),R.jsx(hB,{onResize:ke=>Pe("delta",ke)})]}),R.jsx("span",{style:{width:D.frameId},className:"flex-shrink-0 ml-2 mr-2",children:"Frame ID"}),R.jsx(hB,{onResize:ke=>Pe("frameId",ke)}),R.jsx("span",{style:{width:D.name},className:"flex-shrink-0 ml-2 mr-2",children:"Name"}),R.jsx(hB,{onResize:ke=>Pe("name",ke)}),R.jsx("span",{style:{width:D.rawData},className:"flex-shrink-0 ml-2",children:"Raw Data"})]}),R.jsx("div",{ref:c,className:"flex-1 overflow-auto",style:{height:be-24},onScroll:Te,children:R.jsx("div",{style:{height:_e.getTotalSize(),width:"100%",position:"relative"},children:_e.getVirtualItems().map(ke=>{const qe=de[ke.index];if(!qe)return null;const rt=o==="newest-first"?ke.index+1:ke.index-1,St=de[rt],xt=b.has(qe.id),It=pe(ke.index);return R.jsxs("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:It,transform:`translateY(${ke.start}px)`},children:[R.jsx(Cst,{entry:qe,previousTimestampUs:St==null?void 0:St.timestampUs,isExpanded:xt,onToggle:()=>De(qe.id),columnWidths:D,hideDelta:a}),xt&&qe.signals.map(Zt=>R.jsx(Tst,{signal:Zt},`${qe.id}-${Zt.name}`))]},qe.id)})})})]}),he=()=>R.jsxs("div",{className:"flex items-center gap-2",children:[ot(),We(),R.jsx(Pst,{bufferSize:t,onBufferSizeChange:be=>e(r.panelId,"trace",ke=>({...ke,bufferSize:be})),sortOrder:o,onSortOrderChange:be=>e(r.panelId,"trace",ke=>({...ke,sortOrder:be})),groupByFrame:a,onGroupByFrameChange:be=>e(r.panelId,"trace",ke=>({...ke,groupByFrame:be})),onClear:Ee,onAddSignal:()=>k(!0),onRemove:()=>i(r.panelId)})]}),Se=be=>{const ke=be.map(qe=>({namespace:qe.namespace,frame:qe.name,signals:qe.signals.map(rt=>({namespace:rt.namespace,frame:rt.frameName,signal:rt.name}))}));e(r.panelId,"trace",qe=>({...qe,frames:ke}))};return R.jsxs(R.Fragment,{children:[R.jsxs(tL,{ref:u,fullHeight:!0,children:[R.jsx(rL,{icon:sr.DATA_TRACE,dropdown:he(),helpTooltip:gst,children:je()}),R.jsxs(iL,{fullHeight:!0,padding:!1,children:[xe(),ve(64)]})]}),R.jsx(mz,{show:L,selectedSignals:V,selectedFrames:Q,handleCloseFunction:()=>k(!1),selectEnforcedFramesFunction:Se,isFramesSelectable:!0,enforceFrameSelection:!0,autoSelectParentFrame:!0,selectedFramesAsOnlySourceOfSignals:!0})]})}const Est=G.forwardRef(function(e,i){const{panels:n,updatePanel:t}=s_(),o=G.useRef(null);G.useImperativeHandle(i,()=>({compact:()=>{var c;(c=o.current)==null||c.compact()}}),[]);const a=G.useRef(0);G.useEffect(()=>{if(n.length!==a.current&&o.current){const c=setTimeout(()=>{var d;(d=o.current)==null||d.compact()},50);return a.current=n.length,()=>clearTimeout(c)}},[n.length]);const s=n.map(c=>({id:c.id,x:c.grid.x,y:c.grid.y,w:c.grid.w,h:c.grid.h})),l=G.useCallback(c=>{c.forEach(({id:d,x:f,y:h,w:p,h:g})=>{const v=n.find(y=>y.id===d);v&&t(d,v.type,y=>({...y,grid:{x:f,y:h,w:p,h:g}}))})},[n,t]),u=G.useCallback(c=>{const d=n.find(f=>f.id===c.id);if(!d)return null;switch(d.type){case"timeseries":return R.jsx(nst,{panelId:d.id,panelConfig:d});case"gauge":return R.jsx(kat,{panelId:d.id,panelConfig:d});case"frame-distribution":return R.jsx(Oot,{panelId:d.id,panelConfig:d});case"map":return R.jsx(Fat,{panelId:d.id,panelConfig:d});case"video":return R.jsx(sst,{panelId:d.id,panelConfig:d});case"trace":return R.jsx(xst,{panelId:d.id,panelConfig:d});default:return null}},[n]);return R.jsx(pst,{ref:o,items:s,onLayoutChange:l,renderItem:u})}),_7="remotive-dashboard:0.1",Ast={chartWidthSeconds:30},nL={timeseries:{x:0,y:0,w:12,h:4},gauge:{x:0,y:0,w:12,h:3},map:{x:0,y:0,w:12,h:5},frameDistribution:{x:0,y:0,w:12,h:4},video:{x:0,y:0,w:12,h:5},trace:{x:0,y:0,w:12,h:5}},k1e=[_7],d6="0.1",f6="0.1";function wst(r){const e=r.match(/^([^:]+):(.+)$/);return e?{name:e[1],version:e[2]}:null}function Cge(r){const e=r.match(/^(\d+)\.(\d+)$/);return e?{major:parseInt(e[1],10),minor:parseInt(e[2],10)}:null}function Tge(r,e){const i=Cge(r),n=Cge(e);return!i||!n?r.localeCompare(e):i.major!==n.major?i.major-n.major:i.minor-n.minor}function Ost(r){return k1e.includes(r)}function Dst(r){if(typeof r!="object"||r===null)throw new Error("Invalid configuration: expected an object");const e=r;if(typeof e.schema=="string"){const i=e.schema;if(!Ost(i)){const n=wst(i);throw n&&n.name==="remotive-dashboard"?Tge(n.version,f6)>0?new Error(`This dashboard was created with a newer version (${n.version}) than your application supports (${f6}). Please update Remotive Studio to load this dashboard.`):Tge(n.version,d6)<0?new Error(`This dashboard was created with an old version (${n.version}) that is no longer supported. The minimum supported version is ${d6}. Please recreate the dashboard or contact support for assistance.`):new Error(`Dashboard schema version "${n.version}" is not supported. Supported versions: ${d6} to ${f6}.`):new Error(`Unknown schema "${i}". Expected one of: ${k1e.join(", ")}`)}return e}else throw new Error("Missing or invalid schema field")}function Rst(r){const e=[];return typeof r.schema!="string"&&e.push("Missing or invalid schema field"),Array.isArray(r.panels)?r.panels.forEach((i,n)=>{typeof i!="object"||i===null?e.push(`Panel at index ${n} is not an object`):typeof i.type!="string"&&e.push(`Panel at index ${n} is missing type field`)}):e.push("Missing or invalid panels array"),e}function Mst(){return["timeseries","gauge","map","frameDistribution","video","trace"]}var pB={exports:{}},h6={},_0={},kw={},p6={},g6={},v6={},xge;function iH(){return xge||(xge=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.regexpCode=r.getEsmExportName=r.getProperty=r.safeStringify=r.stringify=r.strConcat=r.addCodeArg=r.str=r._=r.nil=r._Code=r.Name=r.IDENTIFIER=r._CodeOrName=void 0;class e{}r._CodeOrName=e,r.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class i extends e{constructor(m){if(super(),!r.IDENTIFIER.test(m))throw new Error("CodeGen: name must be a valid identifier");this.str=m}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}r.Name=i;class n extends e{constructor(m){super(),this._items=typeof m=="string"?[m]:m}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const m=this._items[0];return m===""||m==='""'}get str(){var m;return(m=this._str)!==null&&m!==void 0?m:this._str=this._items.reduce((b,S)=>`${b}${S}`,"")}get names(){var m;return(m=this._names)!==null&&m!==void 0?m:this._names=this._items.reduce((b,S)=>(S instanceof i&&(b[S.str]=(b[S.str]||0)+1),b),{})}}r._Code=n,r.nil=new n("");function t(y,...m){const b=[y[0]];let S=0;for(;S<m.length;)s(b,m[S]),b.push(y[++S]);return new n(b)}r._=t;const o=new n("+");function a(y,...m){const b=[h(y[0])];let S=0;for(;S<m.length;)b.push(o),s(b,m[S]),b.push(o,h(y[++S]));return l(b),new n(b)}r.str=a;function s(y,m){m instanceof n?y.push(...m._items):m instanceof i?y.push(m):y.push(d(m))}r.addCodeArg=s;function l(y){let m=1;for(;m<y.length-1;){if(y[m]===o){const b=u(y[m-1],y[m+1]);if(b!==void 0){y.splice(m-1,3,b);continue}y[m++]="+"}m++}}function u(y,m){if(m==='""')return y;if(y==='""')return m;if(typeof y=="string")return m instanceof i||y[y.length-1]!=='"'?void 0:typeof m!="string"?`${y.slice(0,-1)}${m}"`:m[0]==='"'?y.slice(0,-1)+m.slice(1):void 0;if(typeof m=="string"&&m[0]==='"'&&!(y instanceof i))return`"${y}${m.slice(1)}`}function c(y,m){return m.emptyStr()?y:y.emptyStr()?m:a`${y}${m}`}r.strConcat=c;function d(y){return typeof y=="number"||typeof y=="boolean"||y===null?y:h(Array.isArray(y)?y.join(","):y)}function f(y){return new n(h(y))}r.stringify=f;function h(y){return JSON.stringify(y).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}r.safeStringify=h;function p(y){return typeof y=="string"&&r.IDENTIFIER.test(y)?new n(`.${y}`):t`[${y}]`}r.getProperty=p;function g(y){if(typeof y=="string"&&r.IDENTIFIER.test(y))return new n(`${y}`);throw new Error(`CodeGen: invalid export name: ${y}, use explicit $id name mapping`)}r.getEsmExportName=g;function v(y){return new n(y.toString())}r.regexpCode=v})(v6)),v6}var y6={},Ege;function Age(){return Ege||(Ege=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.ValueScope=r.ValueScopeName=r.Scope=r.varKinds=r.UsedValueState=void 0;const e=iH();class i extends Error{constructor(u){super(`CodeGen: "code" for ${u} not defined`),this.value=u.value}}var n;(function(l){l[l.Started=0]="Started",l[l.Completed=1]="Completed"})(n||(r.UsedValueState=n={})),r.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class t{constructor({prefixes:u,parent:c}={}){this._names={},this._prefixes=u,this._parent=c}toName(u){return u instanceof e.Name?u:this.name(u)}name(u){return new e.Name(this._newName(u))}_newName(u){const c=this._names[u]||this._nameGroup(u);return`${u}${c.index++}`}_nameGroup(u){var c,d;if(!((d=(c=this._parent)===null||c===void 0?void 0:c._prefixes)===null||d===void 0)&&d.has(u)||this._prefixes&&!this._prefixes.has(u))throw new Error(`CodeGen: prefix "${u}" is not allowed in this scope`);return this._names[u]={prefix:u,index:0}}}r.Scope=t;class o extends e.Name{constructor(u,c){super(c),this.prefix=u}setValue(u,{property:c,itemIndex:d}){this.value=u,this.scopePath=(0,e._)`.${new e.Name(c)}[${d}]`}}r.ValueScopeName=o;const a=(0,e._)`\n`;class s extends t{constructor(u){super(u),this._values={},this._scope=u.scope,this.opts={...u,_n:u.lines?a:e.nil}}get(){return this._scope}name(u){return new o(u,this._newName(u))}value(u,c){var d;if(c.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const f=this.toName(u),{prefix:h}=f,p=(d=c.key)!==null&&d!==void 0?d:c.ref;let g=this._values[h];if(g){const m=g.get(p);if(m)return m}else g=this._values[h]=new Map;g.set(p,f);const v=this._scope[h]||(this._scope[h]=[]),y=v.length;return v[y]=c.ref,f.setValue(c,{property:h,itemIndex:y}),f}getValue(u,c){const d=this._values[u];if(d)return d.get(c)}scopeRefs(u,c=this._values){return this._reduceValues(c,d=>{if(d.scopePath===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return(0,e._)`${u}${d.scopePath}`})}scopeCode(u=this._values,c,d){return this._reduceValues(u,f=>{if(f.value===void 0)throw new Error(`CodeGen: name "${f}" has no value`);return f.value.code},c,d)}_reduceValues(u,c,d={},f){let h=e.nil;for(const p in u){const g=u[p];if(!g)continue;const v=d[p]=d[p]||new Map;g.forEach(y=>{if(v.has(y))return;v.set(y,n.Started);let m=c(y);if(m){const b=this.opts.es5?r.varKinds.var:r.varKinds.const;h=(0,e._)`${h}${b} ${y} = ${m};${this.opts._n}`}else if(m=f==null?void 0:f(y))h=(0,e._)`${h}${m}${this.opts._n}`;else throw new i(y);v.set(y,n.Completed)})}return h}}r.ValueScope=s})(y6)),y6}var wge;function to(){return wge||(wge=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.or=r.and=r.not=r.CodeGen=r.operators=r.varKinds=r.ValueScopeName=r.ValueScope=r.Scope=r.Name=r.regexpCode=r.stringify=r.getProperty=r.nil=r.strConcat=r.str=r._=void 0;const e=iH(),i=Age();var n=iH();Object.defineProperty(r,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(r,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(r,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(r,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(r,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(r,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(r,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(r,"Name",{enumerable:!0,get:function(){return n.Name}});var t=Age();Object.defineProperty(r,"Scope",{enumerable:!0,get:function(){return t.Scope}}),Object.defineProperty(r,"ValueScope",{enumerable:!0,get:function(){return t.ValueScope}}),Object.defineProperty(r,"ValueScopeName",{enumerable:!0,get:function(){return t.ValueScopeName}}),Object.defineProperty(r,"varKinds",{enumerable:!0,get:function(){return t.varKinds}}),r.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class o{optimizeNodes(){return this}optimizeNames(ee,ie){return this}}class a extends o{constructor(ee,ie,de){super(),this.varKind=ee,this.name=ie,this.rhs=de}render({es5:ee,_n:ie}){const de=ee?i.varKinds.var:this.varKind,pe=this.rhs===void 0?"":` = ${this.rhs}`;return`${de} ${this.name}${pe};`+ie}optimizeNames(ee,ie){if(ee[this.name.str])return this.rhs&&(this.rhs=j(this.rhs,ee,ie)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class s extends o{constructor(ee,ie,de){super(),this.lhs=ee,this.rhs=ie,this.sideEffects=de}render({_n:ee}){return`${this.lhs} = ${this.rhs};`+ee}optimizeNames(ee,ie){if(!(this.lhs instanceof e.Name&&!ee[this.lhs.str]&&!this.sideEffects))return this.rhs=j(this.rhs,ee,ie),this}get names(){const ee=this.lhs instanceof e.Name?{}:{...this.lhs.names};return D(ee,this.rhs)}}class l extends s{constructor(ee,ie,de,pe){super(ee,de,pe),this.op=ie}render({_n:ee}){return`${this.lhs} ${this.op}= ${this.rhs};`+ee}}class u extends o{constructor(ee){super(),this.label=ee,this.names={}}render({_n:ee}){return`${this.label}:`+ee}}class c extends o{constructor(ee){super(),this.label=ee,this.names={}}render({_n:ee}){return`break${this.label?` ${this.label}`:""};`+ee}}class d extends o{constructor(ee){super(),this.error=ee}render({_n:ee}){return`throw ${this.error};`+ee}get names(){return this.error.names}}class f extends o{constructor(ee){super(),this.code=ee}render({_n:ee}){return`${this.code};`+ee}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(ee,ie){return this.code=j(this.code,ee,ie),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class h extends o{constructor(ee=[]){super(),this.nodes=ee}render(ee){return this.nodes.reduce((ie,de)=>ie+de.render(ee),"")}optimizeNodes(){const{nodes:ee}=this;let ie=ee.length;for(;ie--;){const de=ee[ie].optimizeNodes();Array.isArray(de)?ee.splice(ie,1,...de):de?ee[ie]=de:ee.splice(ie,1)}return ee.length>0?this:void 0}optimizeNames(ee,ie){const{nodes:de}=this;let pe=de.length;for(;pe--;){const _e=de[pe];_e.optimizeNames(ee,ie)||(N(ee,_e.names),de.splice(pe,1))}return de.length>0?this:void 0}get names(){return this.nodes.reduce((ee,ie)=>k(ee,ie.names),{})}}class p extends h{render(ee){return"{"+ee._n+super.render(ee)+"}"+ee._n}}class g extends h{}class v extends p{}v.kind="else";class y extends p{constructor(ee,ie){super(ie),this.condition=ee}render(ee){let ie=`if(${this.condition})`+super.render(ee);return this.else&&(ie+="else "+this.else.render(ee)),ie}optimizeNodes(){super.optimizeNodes();const ee=this.condition;if(ee===!0)return this.nodes;let ie=this.else;if(ie){const de=ie.optimizeNodes();ie=this.else=Array.isArray(de)?new v(de):de}if(ie)return ee===!1?ie instanceof y?ie:ie.nodes:this.nodes.length?this:new y(V(ee),ie instanceof y?[ie]:ie.nodes);if(!(ee===!1||!this.nodes.length))return this}optimizeNames(ee,ie){var de;if(this.else=(de=this.else)===null||de===void 0?void 0:de.optimizeNames(ee,ie),!!(super.optimizeNames(ee,ie)||this.else))return this.condition=j(this.condition,ee,ie),this}get names(){const ee=super.names;return D(ee,this.condition),this.else&&k(ee,this.else.names),ee}}y.kind="if";class m extends p{}m.kind="for";class b extends m{constructor(ee){super(),this.iteration=ee}render(ee){return`for(${this.iteration})`+super.render(ee)}optimizeNames(ee,ie){if(super.optimizeNames(ee,ie))return this.iteration=j(this.iteration,ee,ie),this}get names(){return k(super.names,this.iteration.names)}}class S extends m{constructor(ee,ie,de,pe){super(),this.varKind=ee,this.name=ie,this.from=de,this.to=pe}render(ee){const ie=ee.es5?i.varKinds.var:this.varKind,{name:de,from:pe,to:_e}=this;return`for(${ie} ${de}=${pe}; ${de}<${_e}; ${de}++)`+super.render(ee)}get names(){const ee=D(super.names,this.from);return D(ee,this.to)}}class _ extends m{constructor(ee,ie,de,pe){super(),this.loop=ee,this.varKind=ie,this.name=de,this.iterable=pe}render(ee){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(ee)}optimizeNames(ee,ie){if(super.optimizeNames(ee,ie))return this.iterable=j(this.iterable,ee,ie),this}get names(){return k(super.names,this.iterable.names)}}class C extends p{constructor(ee,ie,de){super(),this.name=ee,this.args=ie,this.async=de}render(ee){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(ee)}}C.kind="func";class T extends h{render(ee){return"return "+super.render(ee)}}T.kind="return";class x extends p{render(ee){let ie="try"+super.render(ee);return this.catch&&(ie+=this.catch.render(ee)),this.finally&&(ie+=this.finally.render(ee)),ie}optimizeNodes(){var ee,ie;return super.optimizeNodes(),(ee=this.catch)===null||ee===void 0||ee.optimizeNodes(),(ie=this.finally)===null||ie===void 0||ie.optimizeNodes(),this}optimizeNames(ee,ie){var de,pe;return super.optimizeNames(ee,ie),(de=this.catch)===null||de===void 0||de.optimizeNames(ee,ie),(pe=this.finally)===null||pe===void 0||pe.optimizeNames(ee,ie),this}get names(){const ee=super.names;return this.catch&&k(ee,this.catch.names),this.finally&&k(ee,this.finally.names),ee}}class A extends p{constructor(ee){super(),this.error=ee}render(ee){return`catch(${this.error})`+super.render(ee)}}A.kind="catch";class w extends p{render(ee){return"finally"+super.render(ee)}}w.kind="finally";class L{constructor(ee,ie={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...ie,_n:ie.lines?`
`:""},this._extScope=ee,this._scope=new i.Scope({parent:ee}),this._nodes=[new g]}toString(){return this._root.render(this.opts)}name(ee){return this._scope.name(ee)}scopeName(ee){return this._extScope.name(ee)}scopeValue(ee,ie){const de=this._extScope.value(ee,ie);return(this._values[de.prefix]||(this._values[de.prefix]=new Set)).add(de),de}getScopeValue(ee,ie){return this._extScope.getValue(ee,ie)}scopeRefs(ee){return this._extScope.scopeRefs(ee,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(ee,ie,de,pe){const _e=this._scope.toName(ie);return de!==void 0&&pe&&(this._constants[_e.str]=de),this._leafNode(new a(ee,_e,de)),_e}const(ee,ie,de){return this._def(i.varKinds.const,ee,ie,de)}let(ee,ie,de){return this._def(i.varKinds.let,ee,ie,de)}var(ee,ie,de){return this._def(i.varKinds.var,ee,ie,de)}assign(ee,ie,de){return this._leafNode(new s(ee,ie,de))}add(ee,ie){return this._leafNode(new l(ee,r.operators.ADD,ie))}code(ee){return typeof ee=="function"?ee():ee!==e.nil&&this._leafNode(new f(ee)),this}object(...ee){const ie=["{"];for(const[de,pe]of ee)ie.length>1&&ie.push(","),ie.push(de),(de!==pe||this.opts.es5)&&(ie.push(":"),(0,e.addCodeArg)(ie,pe));return ie.push("}"),new e._Code(ie)}if(ee,ie,de){if(this._blockNode(new y(ee)),ie&&de)this.code(ie).else().code(de).endIf();else if(ie)this.code(ie).endIf();else if(de)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(ee){return this._elseNode(new y(ee))}else(){return this._elseNode(new v)}endIf(){return this._endBlockNode(y,v)}_for(ee,ie){return this._blockNode(ee),ie&&this.code(ie).endFor(),this}for(ee,ie){return this._for(new b(ee),ie)}forRange(ee,ie,de,pe,_e=this.opts.es5?i.varKinds.var:i.varKinds.let){const Te=this._scope.toName(ee);return this._for(new S(_e,Te,ie,de),()=>pe(Te))}forOf(ee,ie,de,pe=i.varKinds.const){const _e=this._scope.toName(ee);if(this.opts.es5){const Te=ie instanceof e.Name?ie:this.var("_arr",ie);return this.forRange("_i",0,(0,e._)`${Te}.length`,De=>{this.var(_e,(0,e._)`${Te}[${De}]`),de(_e)})}return this._for(new _("of",pe,_e,ie),()=>de(_e))}forIn(ee,ie,de,pe=this.opts.es5?i.varKinds.var:i.varKinds.const){if(this.opts.ownProperties)return this.forOf(ee,(0,e._)`Object.keys(${ie})`,de);const _e=this._scope.toName(ee);return this._for(new _("in",pe,_e,ie),()=>de(_e))}endFor(){return this._endBlockNode(m)}label(ee){return this._leafNode(new u(ee))}break(ee){return this._leafNode(new c(ee))}return(ee){const ie=new T;if(this._blockNode(ie),this.code(ee),ie.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(T)}try(ee,ie,de){if(!ie&&!de)throw new Error('CodeGen: "try" without "catch" and "finally"');const pe=new x;if(this._blockNode(pe),this.code(ee),ie){const _e=this.name("e");this._currNode=pe.catch=new A(_e),ie(_e)}return de&&(this._currNode=pe.finally=new w,this.code(de)),this._endBlockNode(A,w)}throw(ee){return this._leafNode(new d(ee))}block(ee,ie){return this._blockStarts.push(this._nodes.length),ee&&this.code(ee).endBlock(ie),this}endBlock(ee){const ie=this._blockStarts.pop();if(ie===void 0)throw new Error("CodeGen: not in self-balancing block");const de=this._nodes.length-ie;if(de<0||ee!==void 0&&de!==ee)throw new Error(`CodeGen: wrong number of nodes: ${de} vs ${ee} expected`);return this._nodes.length=ie,this}func(ee,ie=e.nil,de,pe){return this._blockNode(new C(ee,ie,de)),pe&&this.code(pe).endFunc(),this}endFunc(){return this._endBlockNode(C)}optimize(ee=1){for(;ee-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(ee){return this._currNode.nodes.push(ee),this}_blockNode(ee){this._currNode.nodes.push(ee),this._nodes.push(ee)}_endBlockNode(ee,ie){const de=this._currNode;if(de instanceof ee||ie&&de instanceof ie)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${ie?`${ee.kind}/${ie.kind}`:ee.kind}"`)}_elseNode(ee){const ie=this._currNode;if(!(ie instanceof y))throw new Error('CodeGen: "else" without "if"');return this._currNode=ie.else=ee,this}get _root(){return this._nodes[0]}get _currNode(){const ee=this._nodes;return ee[ee.length-1]}set _currNode(ee){const ie=this._nodes;ie[ie.length-1]=ee}}r.CodeGen=L;function k(Z,ee){for(const ie in ee)Z[ie]=(Z[ie]||0)+(ee[ie]||0);return Z}function D(Z,ee){return ee instanceof e._CodeOrName?k(Z,ee.names):Z}function j(Z,ee,ie){if(Z instanceof e.Name)return de(Z);if(!pe(Z))return Z;return new e._Code(Z._items.reduce((_e,Te)=>(Te instanceof e.Name&&(Te=de(Te)),Te instanceof e._Code?_e.push(...Te._items):_e.push(Te),_e),[]));function de(_e){const Te=ie[_e.str];return Te===void 0||ee[_e.str]!==1?_e:(delete ee[_e.str],Te)}function pe(_e){return _e instanceof e._Code&&_e._items.some(Te=>Te instanceof e.Name&&ee[Te.str]===1&&ie[Te.str]!==void 0)}}function N(Z,ee){for(const ie in ee)Z[ie]=(Z[ie]||0)-(ee[ie]||0)}function V(Z){return typeof Z=="boolean"||typeof Z=="number"||Z===null?!Z:(0,e._)`!${Q(Z)}`}r.not=V;const W=I(r.operators.AND);function K(...Z){return Z.reduce(W)}r.and=K;const H=I(r.operators.OR);function U(...Z){return Z.reduce(H)}r.or=U;function I(Z){return(ee,ie)=>ee===e.nil?ie:ie===e.nil?ee:(0,e._)`${Q(ee)} ${Z} ${Q(ie)}`}function Q(Z){return Z instanceof e.Name?Z:(0,e._)`(${Z})`}})(g6)),g6}var Vn={},Oge;function Io(){if(Oge)return Vn;Oge=1,Object.defineProperty(Vn,"__esModule",{value:!0}),Vn.checkStrictMode=Vn.getErrorPath=Vn.Type=Vn.useFunc=Vn.setEvaluated=Vn.evaluatedPropsToName=Vn.mergeEvaluated=Vn.eachItem=Vn.unescapeJsonPointer=Vn.escapeJsonPointer=Vn.escapeFragment=Vn.unescapeFragment=Vn.schemaRefOrVal=Vn.schemaHasRulesButRef=Vn.schemaHasRules=Vn.checkUnknownRules=Vn.alwaysValidSchema=Vn.toHash=void 0;const r=to(),e=iH();function i(_){const C={};for(const T of _)C[T]=!0;return C}Vn.toHash=i;function n(_,C){return typeof C=="boolean"?C:Object.keys(C).length===0?!0:(t(_,C),!o(C,_.self.RULES.all))}Vn.alwaysValidSchema=n;function t(_,C=_.schema){const{opts:T,self:x}=_;if(!T.strictSchema||typeof C=="boolean")return;const A=x.RULES.keywords;for(const w in C)A[w]||S(_,`unknown keyword: "${w}"`)}Vn.checkUnknownRules=t;function o(_,C){if(typeof _=="boolean")return!_;for(const T in _)if(C[T])return!0;return!1}Vn.schemaHasRules=o;function a(_,C){if(typeof _=="boolean")return!_;for(const T in _)if(T!=="$ref"&&C.all[T])return!0;return!1}Vn.schemaHasRulesButRef=a;function s({topSchemaRef:_,schemaPath:C},T,x,A){if(!A){if(typeof T=="number"||typeof T=="boolean")return T;if(typeof T=="string")return(0,r._)`${T}`}return(0,r._)`${_}${C}${(0,r.getProperty)(x)}`}Vn.schemaRefOrVal=s;function l(_){return d(decodeURIComponent(_))}Vn.unescapeFragment=l;function u(_){return encodeURIComponent(c(_))}Vn.escapeFragment=u;function c(_){return typeof _=="number"?`${_}`:_.replace(/~/g,"~0").replace(/\//g,"~1")}Vn.escapeJsonPointer=c;function d(_){return _.replace(/~1/g,"/").replace(/~0/g,"~")}Vn.unescapeJsonPointer=d;function f(_,C){if(Array.isArray(_))for(const T of _)C(T);else C(_)}Vn.eachItem=f;function h({mergeNames:_,mergeToName:C,mergeValues:T,resultToName:x}){return(A,w,L,k)=>{const D=L===void 0?w:L instanceof r.Name?(w instanceof r.Name?_(A,w,L):C(A,w,L),L):w instanceof r.Name?(C(A,L,w),w):T(w,L);return k===r.Name&&!(D instanceof r.Name)?x(A,D):D}}Vn.mergeEvaluated={props:h({mergeNames:(_,C,T)=>_.if((0,r._)`${T} !== true && ${C} !== undefined`,()=>{_.if((0,r._)`${C} === true`,()=>_.assign(T,!0),()=>_.assign(T,(0,r._)`${T} || {}`).code((0,r._)`Object.assign(${T}, ${C})`))}),mergeToName:(_,C,T)=>_.if((0,r._)`${T} !== true`,()=>{C===!0?_.assign(T,!0):(_.assign(T,(0,r._)`${T} || {}`),g(_,T,C))}),mergeValues:(_,C)=>_===!0?!0:{..._,...C},resultToName:p}),items:h({mergeNames:(_,C,T)=>_.if((0,r._)`${T} !== true && ${C} !== undefined`,()=>_.assign(T,(0,r._)`${C} === true ? true : ${T} > ${C} ? ${T} : ${C}`)),mergeToName:(_,C,T)=>_.if((0,r._)`${T} !== true`,()=>_.assign(T,C===!0?!0:(0,r._)`${T} > ${C} ? ${T} : ${C}`)),mergeValues:(_,C)=>_===!0?!0:Math.max(_,C),resultToName:(_,C)=>_.var("items",C)})};function p(_,C){if(C===!0)return _.var("props",!0);const T=_.var("props",(0,r._)`{}`);return C!==void 0&&g(_,T,C),T}Vn.evaluatedPropsToName=p;function g(_,C,T){Object.keys(T).forEach(x=>_.assign((0,r._)`${C}${(0,r.getProperty)(x)}`,!0))}Vn.setEvaluated=g;const v={};function y(_,C){return _.scopeValue("func",{ref:C,code:v[C.code]||(v[C.code]=new e._Code(C.code))})}Vn.useFunc=y;var m;(function(_){_[_.Num=0]="Num",_[_.Str=1]="Str"})(m||(Vn.Type=m={}));function b(_,C,T){if(_ instanceof r.Name){const x=C===m.Num;return T?x?(0,r._)`"[" + ${_} + "]"`:(0,r._)`"['" + ${_} + "']"`:x?(0,r._)`"/" + ${_}`:(0,r._)`"/" + ${_}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return T?(0,r.getProperty)(_).toString():"/"+c(_)}Vn.getErrorPath=b;function S(_,C,T=_.opts.strictSchema){if(T){if(C=`strict mode: ${C}`,T===!0)throw new Error(C);_.self.logger.warn(C)}}return Vn.checkStrictMode=S,Vn}var gB={},Dge;function l_(){if(Dge)return gB;Dge=1,Object.defineProperty(gB,"__esModule",{value:!0});const r=to(),e={data:new r.Name("data"),valCxt:new r.Name("valCxt"),instancePath:new r.Name("instancePath"),parentData:new r.Name("parentData"),parentDataProperty:new r.Name("parentDataProperty"),rootData:new r.Name("rootData"),dynamicAnchors:new r.Name("dynamicAnchors"),vErrors:new r.Name("vErrors"),errors:new r.Name("errors"),this:new r.Name("this"),self:new r.Name("self"),scope:new r.Name("scope"),json:new r.Name("json"),jsonPos:new r.Name("jsonPos"),jsonLen:new r.Name("jsonLen"),jsonPart:new r.Name("jsonPart")};return gB.default=e,gB}var Rge;function Sz(){return Rge||(Rge=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.extendErrors=r.resetErrorsCount=r.reportExtraError=r.reportError=r.keyword$DataError=r.keywordError=void 0;const e=to(),i=Io(),n=l_();r.keywordError={message:({keyword:v})=>(0,e.str)`must pass "${v}" keyword validation`},r.keyword$DataError={message:({keyword:v,schemaType:y})=>y?(0,e.str)`"${v}" keyword must be ${y} ($data)`:(0,e.str)`"${v}" keyword is invalid ($data)`};function t(v,y=r.keywordError,m,b){const{it:S}=v,{gen:_,compositeRule:C,allErrors:T}=S,x=d(v,y,m);b??(C||T)?l(_,x):u(S,(0,e._)`[${x}]`)}r.reportError=t;function o(v,y=r.keywordError,m){const{it:b}=v,{gen:S,compositeRule:_,allErrors:C}=b,T=d(v,y,m);l(S,T),_||C||u(b,n.default.vErrors)}r.reportExtraError=o;function a(v,y){v.assign(n.default.errors,y),v.if((0,e._)`${n.default.vErrors} !== null`,()=>v.if(y,()=>v.assign((0,e._)`${n.default.vErrors}.length`,y),()=>v.assign(n.default.vErrors,null)))}r.resetErrorsCount=a;function s({gen:v,keyword:y,schemaValue:m,data:b,errsCount:S,it:_}){if(S===void 0)throw new Error("ajv implementation error");const C=v.name("err");v.forRange("i",S,n.default.errors,T=>{v.const(C,(0,e._)`${n.default.vErrors}[${T}]`),v.if((0,e._)`${C}.instancePath === undefined`,()=>v.assign((0,e._)`${C}.instancePath`,(0,e.strConcat)(n.default.instancePath,_.errorPath))),v.assign((0,e._)`${C}.schemaPath`,(0,e.str)`${_.errSchemaPath}/${y}`),_.opts.verbose&&(v.assign((0,e._)`${C}.schema`,m),v.assign((0,e._)`${C}.data`,b))})}r.extendErrors=s;function l(v,y){const m=v.const("err",y);v.if((0,e._)`${n.default.vErrors} === null`,()=>v.assign(n.default.vErrors,(0,e._)`[${m}]`),(0,e._)`${n.default.vErrors}.push(${m})`),v.code((0,e._)`${n.default.errors}++`)}function u(v,y){const{gen:m,validateName:b,schemaEnv:S}=v;S.$async?m.throw((0,e._)`new ${v.ValidationError}(${y})`):(m.assign((0,e._)`${b}.errors`,y),m.return(!1))}const c={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function d(v,y,m){const{createErrors:b}=v.it;return b===!1?(0,e._)`{}`:f(v,y,m)}function f(v,y,m={}){const{gen:b,it:S}=v,_=[h(S,m),p(v,m)];return g(v,y,_),b.object(..._)}function h({errorPath:v},{instancePath:y}){const m=y?(0,e.str)`${v}${(0,i.getErrorPath)(y,i.Type.Str)}`:v;return[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,m)]}function p({keyword:v,it:{errSchemaPath:y}},{schemaPath:m,parentSchema:b}){let S=b?y:(0,e.str)`${y}/${v}`;return m&&(S=(0,e.str)`${S}${(0,i.getErrorPath)(m,i.Type.Str)}`),[c.schemaPath,S]}function g(v,{params:y,message:m},b){const{keyword:S,data:_,schemaValue:C,it:T}=v,{opts:x,propertyName:A,topSchemaRef:w,schemaPath:L}=T;b.push([c.keyword,S],[c.params,typeof y=="function"?y(v):y||(0,e._)`{}`]),x.messages&&b.push([c.message,typeof m=="function"?m(v):m]),x.verbose&&b.push([c.schema,C],[c.parentSchema,(0,e._)`${w}${L}`],[n.default.data,_]),A&&b.push([c.propertyName,A])}})(p6)),p6}var Mge;function Lst(){if(Mge)return kw;Mge=1,Object.defineProperty(kw,"__esModule",{value:!0}),kw.boolOrEmptySchema=kw.topBoolOrEmptySchema=void 0;const r=Sz(),e=to(),i=l_(),n={message:"boolean schema is false"};function t(s){const{gen:l,schema:u,validateName:c}=s;u===!1?a(s,!1):typeof u=="object"&&u.$async===!0?l.return(i.default.data):(l.assign((0,e._)`${c}.errors`,null),l.return(!0))}kw.topBoolOrEmptySchema=t;function o(s,l){const{gen:u,schema:c}=s;c===!1?(u.var(l,!1),a(s)):u.var(l,!0)}kw.boolOrEmptySchema=o;function a(s,l){const{gen:u,data:c}=s,d={gen:u,keyword:"false schema",data:c,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:s};(0,r.reportError)(d,n,void 0,l)}return kw}var ac={},Iw={},Lge;function I1e(){if(Lge)return Iw;Lge=1,Object.defineProperty(Iw,"__esModule",{value:!0}),Iw.getRules=Iw.isJSONType=void 0;const r=["string","number","integer","boolean","null","object","array"],e=new Set(r);function i(t){return typeof t=="string"&&e.has(t)}Iw.isJSONType=i;function n(){const t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}return Iw.getRules=n,Iw}var P0={},kge;function N1e(){if(kge)return P0;kge=1,Object.defineProperty(P0,"__esModule",{value:!0}),P0.shouldUseRule=P0.shouldUseGroup=P0.schemaHasRulesForType=void 0;function r({schema:n,self:t},o){const a=t.RULES.types[o];return a&&a!==!0&&e(n,a)}P0.schemaHasRulesForType=r;function e(n,t){return t.rules.some(o=>i(n,o))}P0.shouldUseGroup=e;function i(n,t){var o;return n[t.keyword]!==void 0||((o=t.definition.implements)===null||o===void 0?void 0:o.some(a=>n[a]!==void 0))}return P0.shouldUseRule=i,P0}var Ige;function nH(){if(Ige)return ac;Ige=1,Object.defineProperty(ac,"__esModule",{value:!0}),ac.reportTypeError=ac.checkDataTypes=ac.checkDataType=ac.coerceAndCheckDataType=ac.getJSONTypes=ac.getSchemaTypes=ac.DataType=void 0;const r=I1e(),e=N1e(),i=Sz(),n=to(),t=Io();var o;(function(m){m[m.Correct=0]="Correct",m[m.Wrong=1]="Wrong"})(o||(ac.DataType=o={}));function a(m){const b=s(m.type);if(b.includes("null")){if(m.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!b.length&&m.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');m.nullable===!0&&b.push("null")}return b}ac.getSchemaTypes=a;function s(m){const b=Array.isArray(m)?m:m?[m]:[];if(b.every(r.isJSONType))return b;throw new Error("type must be JSONType or JSONType[]: "+b.join(","))}ac.getJSONTypes=s;function l(m,b){const{gen:S,data:_,opts:C}=m,T=c(b,C.coerceTypes),x=b.length>0&&!(T.length===0&&b.length===1&&(0,e.schemaHasRulesForType)(m,b[0]));if(x){const A=p(b,_,C.strictNumbers,o.Wrong);S.if(A,()=>{T.length?d(m,b,T):v(m)})}return x}ac.coerceAndCheckDataType=l;const u=new Set(["string","number","integer","boolean","null"]);function c(m,b){return b?m.filter(S=>u.has(S)||b==="array"&&S==="array"):[]}function d(m,b,S){const{gen:_,data:C,opts:T}=m,x=_.let("dataType",(0,n._)`typeof ${C}`),A=_.let("coerced",(0,n._)`undefined`);T.coerceTypes==="array"&&_.if((0,n._)`${x} == 'object' && Array.isArray(${C}) && ${C}.length == 1`,()=>_.assign(C,(0,n._)`${C}[0]`).assign(x,(0,n._)`typeof ${C}`).if(p(b,C,T.strictNumbers),()=>_.assign(A,C))),_.if((0,n._)`${A} !== undefined`);for(const L of S)(u.has(L)||L==="array"&&T.coerceTypes==="array")&&w(L);_.else(),v(m),_.endIf(),_.if((0,n._)`${A} !== undefined`,()=>{_.assign(C,A),f(m,A)});function w(L){switch(L){case"string":_.elseIf((0,n._)`${x} == "number" || ${x} == "boolean"`).assign(A,(0,n._)`"" + ${C}`).elseIf((0,n._)`${C} === null`).assign(A,(0,n._)`""`);return;case"number":_.elseIf((0,n._)`${x} == "boolean" || ${C} === null
              || (${x} == "string" && ${C} && ${C} == +${C})`).assign(A,(0,n._)`+${C}`);return;case"integer":_.elseIf((0,n._)`${x} === "boolean" || ${C} === null
              || (${x} === "string" && ${C} && ${C} == +${C} && !(${C} % 1))`).assign(A,(0,n._)`+${C}`);return;case"boolean":_.elseIf((0,n._)`${C} === "false" || ${C} === 0 || ${C} === null`).assign(A,!1).elseIf((0,n._)`${C} === "true" || ${C} === 1`).assign(A,!0);return;case"null":_.elseIf((0,n._)`${C} === "" || ${C} === 0 || ${C} === false`),_.assign(A,null);return;case"array":_.elseIf((0,n._)`${x} === "string" || ${x} === "number"
              || ${x} === "boolean" || ${C} === null`).assign(A,(0,n._)`[${C}]`)}}}function f({gen:m,parentData:b,parentDataProperty:S},_){m.if((0,n._)`${b} !== undefined`,()=>m.assign((0,n._)`${b}[${S}]`,_))}function h(m,b,S,_=o.Correct){const C=_===o.Correct?n.operators.EQ:n.operators.NEQ;let T;switch(m){case"null":return(0,n._)`${b} ${C} null`;case"array":T=(0,n._)`Array.isArray(${b})`;break;case"object":T=(0,n._)`${b} && typeof ${b} == "object" && !Array.isArray(${b})`;break;case"integer":T=x((0,n._)`!(${b} % 1) && !isNaN(${b})`);break;case"number":T=x();break;default:return(0,n._)`typeof ${b} ${C} ${m}`}return _===o.Correct?T:(0,n.not)(T);function x(A=n.nil){return(0,n.and)((0,n._)`typeof ${b} == "number"`,A,S?(0,n._)`isFinite(${b})`:n.nil)}}ac.checkDataType=h;function p(m,b,S,_){if(m.length===1)return h(m[0],b,S,_);let C;const T=(0,t.toHash)(m);if(T.array&&T.object){const x=(0,n._)`typeof ${b} != "object"`;C=T.null?x:(0,n._)`!${b} || ${x}`,delete T.null,delete T.array,delete T.object}else C=n.nil;T.number&&delete T.integer;for(const x in T)C=(0,n.and)(C,h(x,b,S,_));return C}ac.checkDataTypes=p;const g={message:({schema:m})=>`must be ${m}`,params:({schema:m,schemaValue:b})=>typeof m=="string"?(0,n._)`{type: ${m}}`:(0,n._)`{type: ${b}}`};function v(m){const b=y(m);(0,i.reportError)(b,g)}ac.reportTypeError=v;function y(m){const{gen:b,data:S,schema:_}=m,C=(0,t.schemaRefOrVal)(m,_,"type");return{gen:b,keyword:"type",data:S,schema:_.type,schemaCode:C,schemaValue:C,parentSchema:_,params:{},it:m}}return ac}var eN={},Nge;function kst(){if(Nge)return eN;Nge=1,Object.defineProperty(eN,"__esModule",{value:!0}),eN.assignDefaults=void 0;const r=to(),e=Io();function i(t,o){const{properties:a,items:s}=t.schema;if(o==="object"&&a)for(const l in a)n(t,l,a[l].default);else o==="array"&&Array.isArray(s)&&s.forEach((l,u)=>n(t,u,l.default))}eN.assignDefaults=i;function n(t,o,a){const{gen:s,compositeRule:l,data:u,opts:c}=t;if(a===void 0)return;const d=(0,r._)`${u}${(0,r.getProperty)(o)}`;if(l){(0,e.checkStrictMode)(t,`default is ignored for: ${d}`);return}let f=(0,r._)`${d} === undefined`;c.useDefaults==="empty"&&(f=(0,r._)`${f} || ${d} === null || ${d} === ""`),s.if(f,(0,r._)`${d} = ${(0,r.stringify)(a)}`)}return eN}var tg={},la={},Fge;function kg(){if(Fge)return la;Fge=1,Object.defineProperty(la,"__esModule",{value:!0}),la.validateUnion=la.validateArray=la.usePattern=la.callValidateCode=la.schemaProperties=la.allSchemaProperties=la.noPropertyInData=la.propertyInData=la.isOwnProperty=la.hasPropFunc=la.reportMissingProp=la.checkMissingProp=la.checkReportMissingProp=void 0;const r=to(),e=Io(),i=l_(),n=Io();function t(m,b){const{gen:S,data:_,it:C}=m;S.if(c(S,_,b,C.opts.ownProperties),()=>{m.setParams({missingProperty:(0,r._)`${b}`},!0),m.error()})}la.checkReportMissingProp=t;function o({gen:m,data:b,it:{opts:S}},_,C){return(0,r.or)(..._.map(T=>(0,r.and)(c(m,b,T,S.ownProperties),(0,r._)`${C} = ${T}`)))}la.checkMissingProp=o;function a(m,b){m.setParams({missingProperty:b},!0),m.error()}la.reportMissingProp=a;function s(m){return m.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,r._)`Object.prototype.hasOwnProperty`})}la.hasPropFunc=s;function l(m,b,S){return(0,r._)`${s(m)}.call(${b}, ${S})`}la.isOwnProperty=l;function u(m,b,S,_){const C=(0,r._)`${b}${(0,r.getProperty)(S)} !== undefined`;return _?(0,r._)`${C} && ${l(m,b,S)}`:C}la.propertyInData=u;function c(m,b,S,_){const C=(0,r._)`${b}${(0,r.getProperty)(S)} === undefined`;return _?(0,r.or)(C,(0,r.not)(l(m,b,S))):C}la.noPropertyInData=c;function d(m){return m?Object.keys(m).filter(b=>b!=="__proto__"):[]}la.allSchemaProperties=d;function f(m,b){return d(b).filter(S=>!(0,e.alwaysValidSchema)(m,b[S]))}la.schemaProperties=f;function h({schemaCode:m,data:b,it:{gen:S,topSchemaRef:_,schemaPath:C,errorPath:T},it:x},A,w,L){const k=L?(0,r._)`${m}, ${b}, ${_}${C}`:b,D=[[i.default.instancePath,(0,r.strConcat)(i.default.instancePath,T)],[i.default.parentData,x.parentData],[i.default.parentDataProperty,x.parentDataProperty],[i.default.rootData,i.default.rootData]];x.opts.dynamicRef&&D.push([i.default.dynamicAnchors,i.default.dynamicAnchors]);const j=(0,r._)`${k}, ${S.object(...D)}`;return w!==r.nil?(0,r._)`${A}.call(${w}, ${j})`:(0,r._)`${A}(${j})`}la.callValidateCode=h;const p=(0,r._)`new RegExp`;function g({gen:m,it:{opts:b}},S){const _=b.unicodeRegExp?"u":"",{regExp:C}=b.code,T=C(S,_);return m.scopeValue("pattern",{key:T.toString(),ref:T,code:(0,r._)`${C.code==="new RegExp"?p:(0,n.useFunc)(m,C)}(${S}, ${_})`})}la.usePattern=g;function v(m){const{gen:b,data:S,keyword:_,it:C}=m,T=b.name("valid");if(C.allErrors){const A=b.let("valid",!0);return x(()=>b.assign(A,!1)),A}return b.var(T,!0),x(()=>b.break()),T;function x(A){const w=b.const("len",(0,r._)`${S}.length`);b.forRange("i",0,w,L=>{m.subschema({keyword:_,dataProp:L,dataPropType:e.Type.Num},T),b.if((0,r.not)(T),A)})}}la.validateArray=v;function y(m){const{gen:b,schema:S,keyword:_,it:C}=m;if(!Array.isArray(S))throw new Error("ajv implementation error");if(S.some(w=>(0,e.alwaysValidSchema)(C,w))&&!C.opts.unevaluated)return;const x=b.let("valid",!1),A=b.name("_valid");b.block(()=>S.forEach((w,L)=>{const k=m.subschema({keyword:_,schemaProp:L,compositeRule:!0},A);b.assign(x,(0,r._)`${x} || ${A}`),m.mergeValidEvaluated(k,A)||b.if((0,r.not)(x))})),m.result(x,()=>m.reset(),()=>m.error(!0))}return la.validateUnion=y,la}var jge;function Ist(){if(jge)return tg;jge=1,Object.defineProperty(tg,"__esModule",{value:!0}),tg.validateKeywordUsage=tg.validSchemaType=tg.funcKeywordCode=tg.macroKeywordCode=void 0;const r=to(),e=l_(),i=kg(),n=Sz();function t(f,h){const{gen:p,keyword:g,schema:v,parentSchema:y,it:m}=f,b=h.macro.call(m.self,v,y,m),S=u(p,g,b);m.opts.validateSchema!==!1&&m.self.validateSchema(b,!0);const _=p.name("valid");f.subschema({schema:b,schemaPath:r.nil,errSchemaPath:`${m.errSchemaPath}/${g}`,topSchemaRef:S,compositeRule:!0},_),f.pass(_,()=>f.error(!0))}tg.macroKeywordCode=t;function o(f,h){var p;const{gen:g,keyword:v,schema:y,parentSchema:m,$data:b,it:S}=f;l(S,h);const _=!b&&h.compile?h.compile.call(S.self,y,m,S):h.validate,C=u(g,v,_),T=g.let("valid");f.block$data(T,x),f.ok((p=h.valid)!==null&&p!==void 0?p:T);function x(){if(h.errors===!1)L(),h.modifying&&a(f),k(()=>f.error());else{const D=h.async?A():w();h.modifying&&a(f),k(()=>s(f,D))}}function A(){const D=g.let("ruleErrs",null);return g.try(()=>L((0,r._)`await `),j=>g.assign(T,!1).if((0,r._)`${j} instanceof ${S.ValidationError}`,()=>g.assign(D,(0,r._)`${j}.errors`),()=>g.throw(j))),D}function w(){const D=(0,r._)`${C}.errors`;return g.assign(D,null),L(r.nil),D}function L(D=h.async?(0,r._)`await `:r.nil){const j=S.opts.passContext?e.default.this:e.default.self,N=!("compile"in h&&!b||h.schema===!1);g.assign(T,(0,r._)`${D}${(0,i.callValidateCode)(f,C,j,N)}`,h.modifying)}function k(D){var j;g.if((0,r.not)((j=h.valid)!==null&&j!==void 0?j:T),D)}}tg.funcKeywordCode=o;function a(f){const{gen:h,data:p,it:g}=f;h.if(g.parentData,()=>h.assign(p,(0,r._)`${g.parentData}[${g.parentDataProperty}]`))}function s(f,h){const{gen:p}=f;p.if((0,r._)`Array.isArray(${h})`,()=>{p.assign(e.default.vErrors,(0,r._)`${e.default.vErrors} === null ? ${h} : ${e.default.vErrors}.concat(${h})`).assign(e.default.errors,(0,r._)`${e.default.vErrors}.length`),(0,n.extendErrors)(f)},()=>f.error())}function l({schemaEnv:f},h){if(h.async&&!f.$async)throw new Error("async keyword in sync schema")}function u(f,h,p){if(p===void 0)throw new Error(`keyword "${h}" failed to compile`);return f.scopeValue("keyword",typeof p=="function"?{ref:p}:{ref:p,code:(0,r.stringify)(p)})}function c(f,h,p=!1){return!h.length||h.some(g=>g==="array"?Array.isArray(f):g==="object"?f&&typeof f=="object"&&!Array.isArray(f):typeof f==g||p&&typeof f>"u")}tg.validSchemaType=c;function d({schema:f,opts:h,self:p,errSchemaPath:g},v,y){if(Array.isArray(v.keyword)?!v.keyword.includes(y):v.keyword!==y)throw new Error("ajv implementation error");const m=v.dependencies;if(m!=null&&m.some(b=>!Object.prototype.hasOwnProperty.call(f,b)))throw new Error(`parent schema must have dependencies of ${y}: ${m.join(",")}`);if(v.validateSchema&&!v.validateSchema(f[y])){const S=`keyword "${y}" value is invalid at path "${g}": `+p.errorsText(v.validateSchema.errors);if(h.validateSchema==="log")p.logger.error(S);else throw new Error(S)}}return tg.validateKeywordUsage=d,tg}var C0={},Bge;function Nst(){if(Bge)return C0;Bge=1,Object.defineProperty(C0,"__esModule",{value:!0}),C0.extendSubschemaMode=C0.extendSubschemaData=C0.getSubschema=void 0;const r=to(),e=Io();function i(o,{keyword:a,schemaProp:s,schema:l,schemaPath:u,errSchemaPath:c,topSchemaRef:d}){if(a!==void 0&&l!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(a!==void 0){const f=o.schema[a];return s===void 0?{schema:f,schemaPath:(0,r._)`${o.schemaPath}${(0,r.getProperty)(a)}`,errSchemaPath:`${o.errSchemaPath}/${a}`}:{schema:f[s],schemaPath:(0,r._)`${o.schemaPath}${(0,r.getProperty)(a)}${(0,r.getProperty)(s)}`,errSchemaPath:`${o.errSchemaPath}/${a}/${(0,e.escapeFragment)(s)}`}}if(l!==void 0){if(u===void 0||c===void 0||d===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:l,schemaPath:u,topSchemaRef:d,errSchemaPath:c}}throw new Error('either "keyword" or "schema" must be passed')}C0.getSubschema=i;function n(o,a,{dataProp:s,dataPropType:l,data:u,dataTypes:c,propertyName:d}){if(u!==void 0&&s!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:f}=a;if(s!==void 0){const{errorPath:p,dataPathArr:g,opts:v}=a,y=f.let("data",(0,r._)`${a.data}${(0,r.getProperty)(s)}`,!0);h(y),o.errorPath=(0,r.str)`${p}${(0,e.getErrorPath)(s,l,v.jsPropertySyntax)}`,o.parentDataProperty=(0,r._)`${s}`,o.dataPathArr=[...g,o.parentDataProperty]}if(u!==void 0){const p=u instanceof r.Name?u:f.let("data",u,!0);h(p),d!==void 0&&(o.propertyName=d)}c&&(o.dataTypes=c);function h(p){o.data=p,o.dataLevel=a.dataLevel+1,o.dataTypes=[],a.definedProperties=new Set,o.parentData=a.data,o.dataNames=[...a.dataNames,p]}}C0.extendSubschemaData=n;function t(o,{jtdDiscriminator:a,jtdMetadata:s,compositeRule:l,createErrors:u,allErrors:c}){l!==void 0&&(o.compositeRule=l),u!==void 0&&(o.createErrors=u),c!==void 0&&(o.allErrors=c),o.jtdDiscriminator=a,o.jtdMetadata=s}return C0.extendSubschemaMode=t,C0}var Ad={},m6,Vge;function F1e(){return Vge||(Vge=1,m6=function r(e,i){if(e===i)return!0;if(e&&i&&typeof e=="object"&&typeof i=="object"){if(e.constructor!==i.constructor)return!1;var n,t,o;if(Array.isArray(e)){if(n=e.length,n!=i.length)return!1;for(t=n;t--!==0;)if(!r(e[t],i[t]))return!1;return!0}if(e.constructor===RegExp)return e.source===i.source&&e.flags===i.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===i.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===i.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(i).length)return!1;for(t=n;t--!==0;)if(!Object.prototype.hasOwnProperty.call(i,o[t]))return!1;for(t=n;t--!==0;){var a=o[t];if(!r(e[a],i[a]))return!1}return!0}return e!==e&&i!==i}),m6}var b6={exports:{}},Hge;function Fst(){if(Hge)return b6.exports;Hge=1;var r=b6.exports=function(n,t,o){typeof t=="function"&&(o=t,t={}),o=t.cb||o;var a=typeof o=="function"?o:o.pre||function(){},s=o.post||function(){};e(t,a,s,n,"",n)};r.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},r.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},r.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},r.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function e(n,t,o,a,s,l,u,c,d,f){if(a&&typeof a=="object"&&!Array.isArray(a)){t(a,s,l,u,c,d,f);for(var h in a){var p=a[h];if(Array.isArray(p)){if(h in r.arrayKeywords)for(var g=0;g<p.length;g++)e(n,t,o,p[g],s+"/"+h+"/"+g,l,s,h,a,g)}else if(h in r.propsKeywords){if(p&&typeof p=="object")for(var v in p)e(n,t,o,p[v],s+"/"+h+"/"+i(v),l,s,h,a,v)}else(h in r.keywords||n.allKeys&&!(h in r.skipKeywords))&&e(n,t,o,p,s+"/"+h,l,s,h,a)}o(a,s,l,u,c,d,f)}}function i(n){return n.replace(/~/g,"~0").replace(/\//g,"~1")}return b6.exports}var Uge;function _z(){if(Uge)return Ad;Uge=1,Object.defineProperty(Ad,"__esModule",{value:!0}),Ad.getSchemaRefs=Ad.resolveUrl=Ad.normalizeId=Ad._getFullPath=Ad.getFullPath=Ad.inlineRef=void 0;const r=Io(),e=F1e(),i=Fst(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function t(g,v=!0){return typeof g=="boolean"?!0:v===!0?!a(g):v?s(g)<=v:!1}Ad.inlineRef=t;const o=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function a(g){for(const v in g){if(o.has(v))return!0;const y=g[v];if(Array.isArray(y)&&y.some(a)||typeof y=="object"&&a(y))return!0}return!1}function s(g){let v=0;for(const y in g){if(y==="$ref")return 1/0;if(v++,!n.has(y)&&(typeof g[y]=="object"&&(0,r.eachItem)(g[y],m=>v+=s(m)),v===1/0))return 1/0}return v}function l(g,v="",y){y!==!1&&(v=d(v));const m=g.parse(v);return u(g,m)}Ad.getFullPath=l;function u(g,v){return g.serialize(v).split("#")[0]+"#"}Ad._getFullPath=u;const c=/#\/?$/;function d(g){return g?g.replace(c,""):""}Ad.normalizeId=d;function f(g,v,y){return y=d(y),g.resolve(v,y)}Ad.resolveUrl=f;const h=/^[a-z_][-a-z0-9._]*$/i;function p(g,v){if(typeof g=="boolean")return{};const{schemaId:y,uriResolver:m}=this.opts,b=d(g[y]||v),S={"":b},_=l(m,b,!1),C={},T=new Set;return i(g,{allKeys:!0},(w,L,k,D)=>{if(D===void 0)return;const j=_+L;let N=S[D];typeof w[y]=="string"&&(N=V.call(this,w[y])),W.call(this,w.$anchor),W.call(this,w.$dynamicAnchor),S[L]=N;function V(K){const H=this.opts.uriResolver.resolve;if(K=d(N?H(N,K):K),T.has(K))throw A(K);T.add(K);let U=this.refs[K];return typeof U=="string"&&(U=this.refs[U]),typeof U=="object"?x(w,U.schema,K):K!==d(j)&&(K[0]==="#"?(x(w,C[K],K),C[K]=w):this.refs[K]=j),K}function W(K){if(typeof K=="string"){if(!h.test(K))throw new Error(`invalid anchor "${K}"`);V.call(this,`#${K}`)}}}),C;function x(w,L,k){if(L!==void 0&&!e(w,L))throw A(k)}function A(w){return new Error(`reference "${w}" resolves to more than one schema`)}}return Ad.getSchemaRefs=p,Ad}var zge;function Pz(){if(zge)return _0;zge=1,Object.defineProperty(_0,"__esModule",{value:!0}),_0.getData=_0.KeywordCxt=_0.validateFunctionCode=void 0;const r=Lst(),e=nH(),i=N1e(),n=nH(),t=kst(),o=Ist(),a=Nst(),s=to(),l=l_(),u=_z(),c=Io(),d=Sz();function f(Pe){if(_(Pe)&&(T(Pe),S(Pe))){v(Pe);return}h(Pe,()=>(0,r.topBoolOrEmptySchema)(Pe))}_0.validateFunctionCode=f;function h({gen:Pe,validateName:Ee,schema:Re,schemaEnv:je,opts:Ke},ot){Ke.code.es5?Pe.func(Ee,(0,s._)`${l.default.data}, ${l.default.valCxt}`,je.$async,()=>{Pe.code((0,s._)`"use strict"; ${m(Re,Ke)}`),g(Pe,Ke),Pe.code(ot)}):Pe.func(Ee,(0,s._)`${l.default.data}, ${p(Ke)}`,je.$async,()=>Pe.code(m(Re,Ke)).code(ot))}function p(Pe){return(0,s._)`{${l.default.instancePath}="", ${l.default.parentData}, ${l.default.parentDataProperty}, ${l.default.rootData}=${l.default.data}${Pe.dynamicRef?(0,s._)`, ${l.default.dynamicAnchors}={}`:s.nil}}={}`}function g(Pe,Ee){Pe.if(l.default.valCxt,()=>{Pe.var(l.default.instancePath,(0,s._)`${l.default.valCxt}.${l.default.instancePath}`),Pe.var(l.default.parentData,(0,s._)`${l.default.valCxt}.${l.default.parentData}`),Pe.var(l.default.parentDataProperty,(0,s._)`${l.default.valCxt}.${l.default.parentDataProperty}`),Pe.var(l.default.rootData,(0,s._)`${l.default.valCxt}.${l.default.rootData}`),Ee.dynamicRef&&Pe.var(l.default.dynamicAnchors,(0,s._)`${l.default.valCxt}.${l.default.dynamicAnchors}`)},()=>{Pe.var(l.default.instancePath,(0,s._)`""`),Pe.var(l.default.parentData,(0,s._)`undefined`),Pe.var(l.default.parentDataProperty,(0,s._)`undefined`),Pe.var(l.default.rootData,l.default.data),Ee.dynamicRef&&Pe.var(l.default.dynamicAnchors,(0,s._)`{}`)})}function v(Pe){const{schema:Ee,opts:Re,gen:je}=Pe;h(Pe,()=>{Re.$comment&&Ee.$comment&&D(Pe),w(Pe),je.let(l.default.vErrors,null),je.let(l.default.errors,0),Re.unevaluated&&y(Pe),x(Pe),j(Pe)})}function y(Pe){const{gen:Ee,validateName:Re}=Pe;Pe.evaluated=Ee.const("evaluated",(0,s._)`${Re}.evaluated`),Ee.if((0,s._)`${Pe.evaluated}.dynamicProps`,()=>Ee.assign((0,s._)`${Pe.evaluated}.props`,(0,s._)`undefined`)),Ee.if((0,s._)`${Pe.evaluated}.dynamicItems`,()=>Ee.assign((0,s._)`${Pe.evaluated}.items`,(0,s._)`undefined`))}function m(Pe,Ee){const Re=typeof Pe=="object"&&Pe[Ee.schemaId];return Re&&(Ee.code.source||Ee.code.process)?(0,s._)`/*# sourceURL=${Re} */`:s.nil}function b(Pe,Ee){if(_(Pe)&&(T(Pe),S(Pe))){C(Pe,Ee);return}(0,r.boolOrEmptySchema)(Pe,Ee)}function S({schema:Pe,self:Ee}){if(typeof Pe=="boolean")return!Pe;for(const Re in Pe)if(Ee.RULES.all[Re])return!0;return!1}function _(Pe){return typeof Pe.schema!="boolean"}function C(Pe,Ee){const{schema:Re,gen:je,opts:Ke}=Pe;Ke.$comment&&Re.$comment&&D(Pe),L(Pe),k(Pe);const ot=je.const("_errs",l.default.errors);x(Pe,ot),je.var(Ee,(0,s._)`${ot} === ${l.default.errors}`)}function T(Pe){(0,c.checkUnknownRules)(Pe),A(Pe)}function x(Pe,Ee){if(Pe.opts.jtd)return V(Pe,[],!1,Ee);const Re=(0,e.getSchemaTypes)(Pe.schema),je=(0,e.coerceAndCheckDataType)(Pe,Re);V(Pe,Re,!je,Ee)}function A(Pe){const{schema:Ee,errSchemaPath:Re,opts:je,self:Ke}=Pe;Ee.$ref&&je.ignoreKeywordsWithRef&&(0,c.schemaHasRulesButRef)(Ee,Ke.RULES)&&Ke.logger.warn(`$ref: keywords ignored in schema at path "${Re}"`)}function w(Pe){const{schema:Ee,opts:Re}=Pe;Ee.default!==void 0&&Re.useDefaults&&Re.strictSchema&&(0,c.checkStrictMode)(Pe,"default is ignored in the schema root")}function L(Pe){const Ee=Pe.schema[Pe.opts.schemaId];Ee&&(Pe.baseId=(0,u.resolveUrl)(Pe.opts.uriResolver,Pe.baseId,Ee))}function k(Pe){if(Pe.schema.$async&&!Pe.schemaEnv.$async)throw new Error("async schema in sync schema")}function D({gen:Pe,schemaEnv:Ee,schema:Re,errSchemaPath:je,opts:Ke}){const ot=Re.$comment;if(Ke.$comment===!0)Pe.code((0,s._)`${l.default.self}.logger.log(${ot})`);else if(typeof Ke.$comment=="function"){const We=(0,s.str)`${je}/$comment`,xe=Pe.scopeValue("root",{ref:Ee.root});Pe.code((0,s._)`${l.default.self}.opts.$comment(${ot}, ${We}, ${xe}.schema)`)}}function j(Pe){const{gen:Ee,schemaEnv:Re,validateName:je,ValidationError:Ke,opts:ot}=Pe;Re.$async?Ee.if((0,s._)`${l.default.errors} === 0`,()=>Ee.return(l.default.data),()=>Ee.throw((0,s._)`new ${Ke}(${l.default.vErrors})`)):(Ee.assign((0,s._)`${je}.errors`,l.default.vErrors),ot.unevaluated&&N(Pe),Ee.return((0,s._)`${l.default.errors} === 0`))}function N({gen:Pe,evaluated:Ee,props:Re,items:je}){Re instanceof s.Name&&Pe.assign((0,s._)`${Ee}.props`,Re),je instanceof s.Name&&Pe.assign((0,s._)`${Ee}.items`,je)}function V(Pe,Ee,Re,je){const{gen:Ke,schema:ot,data:We,allErrors:xe,opts:ve,self:he}=Pe,{RULES:Se}=he;if(ot.$ref&&(ve.ignoreKeywordsWithRef||!(0,c.schemaHasRulesButRef)(ot,Se))){Ke.block(()=>pe(Pe,"$ref",Se.all.$ref.definition));return}ve.jtd||K(Pe,Ee),Ke.block(()=>{for(const ke of Se.rules)be(ke);be(Se.post)});function be(ke){(0,i.shouldUseGroup)(ot,ke)&&(ke.type?(Ke.if((0,n.checkDataType)(ke.type,We,ve.strictNumbers)),W(Pe,ke),Ee.length===1&&Ee[0]===ke.type&&Re&&(Ke.else(),(0,n.reportTypeError)(Pe)),Ke.endIf()):W(Pe,ke),xe||Ke.if((0,s._)`${l.default.errors} === ${je||0}`))}}function W(Pe,Ee){const{gen:Re,schema:je,opts:{useDefaults:Ke}}=Pe;Ke&&(0,t.assignDefaults)(Pe,Ee.type),Re.block(()=>{for(const ot of Ee.rules)(0,i.shouldUseRule)(je,ot)&&pe(Pe,ot.keyword,ot.definition,Ee.type)})}function K(Pe,Ee){Pe.schemaEnv.meta||!Pe.opts.strictTypes||(H(Pe,Ee),Pe.opts.allowUnionTypes||U(Pe,Ee),I(Pe,Pe.dataTypes))}function H(Pe,Ee){if(Ee.length){if(!Pe.dataTypes.length){Pe.dataTypes=Ee;return}Ee.forEach(Re=>{Z(Pe.dataTypes,Re)||ie(Pe,`type "${Re}" not allowed by context "${Pe.dataTypes.join(",")}"`)}),ee(Pe,Ee)}}function U(Pe,Ee){Ee.length>1&&!(Ee.length===2&&Ee.includes("null"))&&ie(Pe,"use allowUnionTypes to allow union type keyword")}function I(Pe,Ee){const Re=Pe.self.RULES.all;for(const je in Re){const Ke=Re[je];if(typeof Ke=="object"&&(0,i.shouldUseRule)(Pe.schema,Ke)){const{type:ot}=Ke.definition;ot.length&&!ot.some(We=>Q(Ee,We))&&ie(Pe,`missing type "${ot.join(",")}" for keyword "${je}"`)}}}function Q(Pe,Ee){return Pe.includes(Ee)||Ee==="number"&&Pe.includes("integer")}function Z(Pe,Ee){return Pe.includes(Ee)||Ee==="integer"&&Pe.includes("number")}function ee(Pe,Ee){const Re=[];for(const je of Pe.dataTypes)Z(Ee,je)?Re.push(je):Ee.includes("integer")&&je==="number"&&Re.push("integer");Pe.dataTypes=Re}function ie(Pe,Ee){const Re=Pe.schemaEnv.baseId+Pe.errSchemaPath;Ee+=` at "${Re}" (strictTypes)`,(0,c.checkStrictMode)(Pe,Ee,Pe.opts.strictTypes)}class de{constructor(Ee,Re,je){if((0,o.validateKeywordUsage)(Ee,Re,je),this.gen=Ee.gen,this.allErrors=Ee.allErrors,this.keyword=je,this.data=Ee.data,this.schema=Ee.schema[je],this.$data=Re.$data&&Ee.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,c.schemaRefOrVal)(Ee,this.schema,je,this.$data),this.schemaType=Re.schemaType,this.parentSchema=Ee.schema,this.params={},this.it=Ee,this.def=Re,this.$data)this.schemaCode=Ee.gen.const("vSchema",De(this.$data,Ee));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,Re.schemaType,Re.allowUndefined))throw new Error(`${je} value must be ${JSON.stringify(Re.schemaType)}`);("code"in Re?Re.trackErrors:Re.errors!==!1)&&(this.errsCount=Ee.gen.const("_errs",l.default.errors))}result(Ee,Re,je){this.failResult((0,s.not)(Ee),Re,je)}failResult(Ee,Re,je){this.gen.if(Ee),je?je():this.error(),Re?(this.gen.else(),Re(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(Ee,Re){this.failResult((0,s.not)(Ee),void 0,Re)}fail(Ee){if(Ee===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(Ee),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(Ee){if(!this.$data)return this.fail(Ee);const{schemaCode:Re}=this;this.fail((0,s._)`${Re} !== undefined && (${(0,s.or)(this.invalid$data(),Ee)})`)}error(Ee,Re,je){if(Re){this.setParams(Re),this._error(Ee,je),this.setParams({});return}this._error(Ee,je)}_error(Ee,Re){(Ee?d.reportExtraError:d.reportError)(this,this.def.error,Re)}$dataError(){(0,d.reportError)(this,this.def.$dataError||d.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,d.resetErrorsCount)(this.gen,this.errsCount)}ok(Ee){this.allErrors||this.gen.if(Ee)}setParams(Ee,Re){Re?Object.assign(this.params,Ee):this.params=Ee}block$data(Ee,Re,je=s.nil){this.gen.block(()=>{this.check$data(Ee,je),Re()})}check$data(Ee=s.nil,Re=s.nil){if(!this.$data)return;const{gen:je,schemaCode:Ke,schemaType:ot,def:We}=this;je.if((0,s.or)((0,s._)`${Ke} === undefined`,Re)),Ee!==s.nil&&je.assign(Ee,!0),(ot.length||We.validateSchema)&&(je.elseIf(this.invalid$data()),this.$dataError(),Ee!==s.nil&&je.assign(Ee,!1)),je.else()}invalid$data(){const{gen:Ee,schemaCode:Re,schemaType:je,def:Ke,it:ot}=this;return(0,s.or)(We(),xe());function We(){if(je.length){if(!(Re instanceof s.Name))throw new Error("ajv implementation error");const ve=Array.isArray(je)?je:[je];return(0,s._)`${(0,n.checkDataTypes)(ve,Re,ot.opts.strictNumbers,n.DataType.Wrong)}`}return s.nil}function xe(){if(Ke.validateSchema){const ve=Ee.scopeValue("validate$data",{ref:Ke.validateSchema});return(0,s._)`!${ve}(${Re})`}return s.nil}}subschema(Ee,Re){const je=(0,a.getSubschema)(this.it,Ee);(0,a.extendSubschemaData)(je,this.it,Ee),(0,a.extendSubschemaMode)(je,Ee);const Ke={...this.it,...je,items:void 0,props:void 0};return b(Ke,Re),Ke}mergeEvaluated(Ee,Re){const{it:je,gen:Ke}=this;je.opts.unevaluated&&(je.props!==!0&&Ee.props!==void 0&&(je.props=c.mergeEvaluated.props(Ke,Ee.props,je.props,Re)),je.items!==!0&&Ee.items!==void 0&&(je.items=c.mergeEvaluated.items(Ke,Ee.items,je.items,Re)))}mergeValidEvaluated(Ee,Re){const{it:je,gen:Ke}=this;if(je.opts.unevaluated&&(je.props!==!0||je.items!==!0))return Ke.if(Re,()=>this.mergeEvaluated(Ee,s.Name)),!0}}_0.KeywordCxt=de;function pe(Pe,Ee,Re,je){const Ke=new de(Pe,Re,Ee);"code"in Re?Re.code(Ke,je):Ke.$data&&Re.validate?(0,o.funcKeywordCode)(Ke,Re):"macro"in Re?(0,o.macroKeywordCode)(Ke,Re):(Re.compile||Re.validate)&&(0,o.funcKeywordCode)(Ke,Re)}const _e=/^\/(?:[^~]|~0|~1)*$/,Te=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function De(Pe,{dataLevel:Ee,dataNames:Re,dataPathArr:je}){let Ke,ot;if(Pe==="")return l.default.rootData;if(Pe[0]==="/"){if(!_e.test(Pe))throw new Error(`Invalid JSON-pointer: ${Pe}`);Ke=Pe,ot=l.default.rootData}else{const he=Te.exec(Pe);if(!he)throw new Error(`Invalid JSON-pointer: ${Pe}`);const Se=+he[1];if(Ke=he[2],Ke==="#"){if(Se>=Ee)throw new Error(ve("property/index",Se));return je[Ee-Se]}if(Se>Ee)throw new Error(ve("data",Se));if(ot=Re[Ee-Se],!Ke)return ot}let We=ot;const xe=Ke.split("/");for(const he of xe)he&&(ot=(0,s._)`${ot}${(0,s.getProperty)((0,c.unescapeJsonPointer)(he))}`,We=(0,s._)`${We} && ${ot}`);return We;function ve(he,Se){return`Cannot access ${he} ${Se} levels up, current level is ${Ee}`}}return _0.getData=De,_0}var vB={},Wge;function P7(){if(Wge)return vB;Wge=1,Object.defineProperty(vB,"__esModule",{value:!0});class r extends Error{constructor(i){super("validation failed"),this.errors=i,this.ajv=this.validation=!0}}return vB.default=r,vB}var yB={},Gge;function Cz(){if(Gge)return yB;Gge=1,Object.defineProperty(yB,"__esModule",{value:!0});const r=_z();class e extends Error{constructor(n,t,o,a){super(a||`can't resolve reference ${o} from id ${t}`),this.missingRef=(0,r.resolveUrl)(n,t,o),this.missingSchema=(0,r.normalizeId)((0,r.getFullPath)(n,this.missingRef))}}return yB.default=e,yB}var ph={},Yge;function C7(){if(Yge)return ph;Yge=1,Object.defineProperty(ph,"__esModule",{value:!0}),ph.resolveSchema=ph.getCompilingSchema=ph.resolveRef=ph.compileSchema=ph.SchemaEnv=void 0;const r=to(),e=P7(),i=l_(),n=_z(),t=Io(),o=Pz();class a{constructor(y){var m;this.refs={},this.dynamicAnchors={};let b;typeof y.schema=="object"&&(b=y.schema),this.schema=y.schema,this.schemaId=y.schemaId,this.root=y.root||this,this.baseId=(m=y.baseId)!==null&&m!==void 0?m:(0,n.normalizeId)(b==null?void 0:b[y.schemaId||"$id"]),this.schemaPath=y.schemaPath,this.localRefs=y.localRefs,this.meta=y.meta,this.$async=b==null?void 0:b.$async,this.refs={}}}ph.SchemaEnv=a;function s(v){const y=c.call(this,v);if(y)return y;const m=(0,n.getFullPath)(this.opts.uriResolver,v.root.baseId),{es5:b,lines:S}=this.opts.code,{ownProperties:_}=this.opts,C=new r.CodeGen(this.scope,{es5:b,lines:S,ownProperties:_});let T;v.$async&&(T=C.scopeValue("Error",{ref:e.default,code:(0,r._)`require("ajv/dist/runtime/validation_error").default`}));const x=C.scopeName("validate");v.validateName=x;const A={gen:C,allErrors:this.opts.allErrors,data:i.default.data,parentData:i.default.parentData,parentDataProperty:i.default.parentDataProperty,dataNames:[i.default.data],dataPathArr:[r.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:C.scopeValue("schema",this.opts.code.source===!0?{ref:v.schema,code:(0,r.stringify)(v.schema)}:{ref:v.schema}),validateName:x,ValidationError:T,schema:v.schema,schemaEnv:v,rootId:m,baseId:v.baseId||m,schemaPath:r.nil,errSchemaPath:v.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,r._)`""`,opts:this.opts,self:this};let w;try{this._compilations.add(v),(0,o.validateFunctionCode)(A),C.optimize(this.opts.code.optimize);const L=C.toString();w=`${C.scopeRefs(i.default.scope)}return ${L}`,this.opts.code.process&&(w=this.opts.code.process(w,v));const D=new Function(`${i.default.self}`,`${i.default.scope}`,w)(this,this.scope.get());if(this.scope.value(x,{ref:D}),D.errors=null,D.schema=v.schema,D.schemaEnv=v,v.$async&&(D.$async=!0),this.opts.code.source===!0&&(D.source={validateName:x,validateCode:L,scopeValues:C._values}),this.opts.unevaluated){const{props:j,items:N}=A;D.evaluated={props:j instanceof r.Name?void 0:j,items:N instanceof r.Name?void 0:N,dynamicProps:j instanceof r.Name,dynamicItems:N instanceof r.Name},D.source&&(D.source.evaluated=(0,r.stringify)(D.evaluated))}return v.validate=D,v}catch(L){throw delete v.validate,delete v.validateName,w&&this.logger.error("Error compiling schema, function code:",w),L}finally{this._compilations.delete(v)}}ph.compileSchema=s;function l(v,y,m){var b;m=(0,n.resolveUrl)(this.opts.uriResolver,y,m);const S=v.refs[m];if(S)return S;let _=f.call(this,v,m);if(_===void 0){const C=(b=v.localRefs)===null||b===void 0?void 0:b[m],{schemaId:T}=this.opts;C&&(_=new a({schema:C,schemaId:T,root:v,baseId:y}))}if(_!==void 0)return v.refs[m]=u.call(this,_)}ph.resolveRef=l;function u(v){return(0,n.inlineRef)(v.schema,this.opts.inlineRefs)?v.schema:v.validate?v:s.call(this,v)}function c(v){for(const y of this._compilations)if(d(y,v))return y}ph.getCompilingSchema=c;function d(v,y){return v.schema===y.schema&&v.root===y.root&&v.baseId===y.baseId}function f(v,y){let m;for(;typeof(m=this.refs[y])=="string";)y=m;return m||this.schemas[y]||h.call(this,v,y)}function h(v,y){const m=this.opts.uriResolver.parse(y),b=(0,n._getFullPath)(this.opts.uriResolver,m);let S=(0,n.getFullPath)(this.opts.uriResolver,v.baseId,void 0);if(Object.keys(v.schema).length>0&&b===S)return g.call(this,m,v);const _=(0,n.normalizeId)(b),C=this.refs[_]||this.schemas[_];if(typeof C=="string"){const T=h.call(this,v,C);return typeof(T==null?void 0:T.schema)!="object"?void 0:g.call(this,m,T)}if(typeof(C==null?void 0:C.schema)=="object"){if(C.validate||s.call(this,C),_===(0,n.normalizeId)(y)){const{schema:T}=C,{schemaId:x}=this.opts,A=T[x];return A&&(S=(0,n.resolveUrl)(this.opts.uriResolver,S,A)),new a({schema:T,schemaId:x,root:v,baseId:S})}return g.call(this,m,C)}}ph.resolveSchema=h;const p=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function g(v,{baseId:y,schema:m,root:b}){var S;if(((S=v.fragment)===null||S===void 0?void 0:S[0])!=="/")return;for(const T of v.fragment.slice(1).split("/")){if(typeof m=="boolean")return;const x=m[(0,t.unescapeFragment)(T)];if(x===void 0)return;m=x;const A=typeof m=="object"&&m[this.opts.schemaId];!p.has(T)&&A&&(y=(0,n.resolveUrl)(this.opts.uriResolver,y,A))}let _;if(typeof m!="boolean"&&m.$ref&&!(0,t.schemaHasRulesButRef)(m,this.RULES)){const T=(0,n.resolveUrl)(this.opts.uriResolver,y,m.$ref);_=h.call(this,b,T)}const{schemaId:C}=this.opts;if(_=_||new a({schema:m,schemaId:C,root:b,baseId:y}),_.schema!==_.root.schema)return _}return ph}const jst="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Bst="Meta-schema for $data reference (JSON AnySchema extension proposal)",Vst="object",Hst=["$data"],Ust={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},zst=!1,Wst={$id:jst,description:Bst,type:Vst,required:Hst,properties:Ust,additionalProperties:zst};var mB={},tN={exports:{}},S6,$ge;function j1e(){if($ge)return S6;$ge=1;const r=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),e=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function i(f){let h="",p=0,g=0;for(g=0;g<f.length;g++)if(p=f[g].charCodeAt(0),p!==48){if(!(p>=48&&p<=57||p>=65&&p<=70||p>=97&&p<=102))return"";h+=f[g];break}for(g+=1;g<f.length;g++){if(p=f[g].charCodeAt(0),!(p>=48&&p<=57||p>=65&&p<=70||p>=97&&p<=102))return"";h+=f[g]}return h}const n=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function t(f){return f.length=0,!0}function o(f,h,p){if(f.length){const g=i(f);if(g!=="")h.push(g);else return p.error=!0,!1;f.length=0}return!0}function a(f){let h=0;const p={error:!1,address:"",zone:""},g=[],v=[];let y=!1,m=!1,b=o;for(let S=0;S<f.length;S++){const _=f[S];if(!(_==="["||_==="]"))if(_===":"){if(y===!0&&(m=!0),!b(v,g,p))break;if(++h>7){p.error=!0;break}S>0&&f[S-1]===":"&&(y=!0),g.push(":");continue}else if(_==="%"){if(!b(v,g,p))break;b=t}else{v.push(_);continue}}return v.length&&(b===t?p.zone=v.join(""):m?g.push(v.join("")):g.push(i(v))),p.address=g.join(""),p}function s(f){if(l(f,":")<2)return{host:f,isIPV6:!1};const h=a(f);if(h.error)return{host:f,isIPV6:!1};{let p=h.address,g=h.address;return h.zone&&(p+="%"+h.zone,g+="%25"+h.zone),{host:p,isIPV6:!0,escapedHost:g}}}function l(f,h){let p=0;for(let g=0;g<f.length;g++)f[g]===h&&p++;return p}function u(f){let h=f;const p=[];let g=-1,v=0;for(;v=h.length;){if(v===1){if(h===".")break;if(h==="/"){p.push("/");break}else{p.push(h);break}}else if(v===2){if(h[0]==="."){if(h[1]===".")break;if(h[1]==="/"){h=h.slice(2);continue}}else if(h[0]==="/"&&(h[1]==="."||h[1]==="/")){p.push("/");break}}else if(v===3&&h==="/.."){p.length!==0&&p.pop(),p.push("/");break}if(h[0]==="."){if(h[1]==="."){if(h[2]==="/"){h=h.slice(3);continue}}else if(h[1]==="/"){h=h.slice(2);continue}}else if(h[0]==="/"&&h[1]==="."){if(h[2]==="/"){h=h.slice(2);continue}else if(h[2]==="."&&h[3]==="/"){h=h.slice(3),p.length!==0&&p.pop();continue}}if((g=h.indexOf("/",1))===-1){p.push(h);break}else p.push(h.slice(0,g)),h=h.slice(g)}return p.join("")}function c(f,h){const p=h!==!0?escape:unescape;return f.scheme!==void 0&&(f.scheme=p(f.scheme)),f.userinfo!==void 0&&(f.userinfo=p(f.userinfo)),f.host!==void 0&&(f.host=p(f.host)),f.path!==void 0&&(f.path=p(f.path)),f.query!==void 0&&(f.query=p(f.query)),f.fragment!==void 0&&(f.fragment=p(f.fragment)),f}function d(f){const h=[];if(f.userinfo!==void 0&&(h.push(f.userinfo),h.push("@")),f.host!==void 0){let p=unescape(f.host);if(!e(p)){const g=s(p);g.isIPV6===!0?p=`[${g.escapedHost}]`:p=f.host}h.push(p)}return(typeof f.port=="number"||typeof f.port=="string")&&(h.push(":"),h.push(String(f.port))),h.length?h.join(""):void 0}return S6={nonSimpleDomain:n,recomposeAuthority:d,normalizeComponentEncoding:c,removeDotSegments:u,isIPv4:e,isUUID:r,normalizeIPv6:s,stringArrayToHexStripped:i},S6}var _6,qge;function Gst(){if(qge)return _6;qge=1;const{isUUID:r}=j1e(),e=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,i=["http","https","ws","wss","urn","urn:uuid"];function n(_){return i.indexOf(_)!==-1}function t(_){return _.secure===!0?!0:_.secure===!1?!1:_.scheme?_.scheme.length===3&&(_.scheme[0]==="w"||_.scheme[0]==="W")&&(_.scheme[1]==="s"||_.scheme[1]==="S")&&(_.scheme[2]==="s"||_.scheme[2]==="S"):!1}function o(_){return _.host||(_.error=_.error||"HTTP URIs must have a host."),_}function a(_){const C=String(_.scheme).toLowerCase()==="https";return(_.port===(C?443:80)||_.port==="")&&(_.port=void 0),_.path||(_.path="/"),_}function s(_){return _.secure=t(_),_.resourceName=(_.path||"/")+(_.query?"?"+_.query:""),_.path=void 0,_.query=void 0,_}function l(_){if((_.port===(t(_)?443:80)||_.port==="")&&(_.port=void 0),typeof _.secure=="boolean"&&(_.scheme=_.secure?"wss":"ws",_.secure=void 0),_.resourceName){const[C,T]=_.resourceName.split("?");_.path=C&&C!=="/"?C:void 0,_.query=T,_.resourceName=void 0}return _.fragment=void 0,_}function u(_,C){if(!_.path)return _.error="URN can not be parsed",_;const T=_.path.match(e);if(T){const x=C.scheme||_.scheme||"urn";_.nid=T[1].toLowerCase(),_.nss=T[2];const A=`${x}:${C.nid||_.nid}`,w=S(A);_.path=void 0,w&&(_=w.parse(_,C))}else _.error=_.error||"URN can not be parsed.";return _}function c(_,C){if(_.nid===void 0)throw new Error("URN without nid cannot be serialized");const T=C.scheme||_.scheme||"urn",x=_.nid.toLowerCase(),A=`${T}:${C.nid||x}`,w=S(A);w&&(_=w.serialize(_,C));const L=_,k=_.nss;return L.path=`${x||C.nid}:${k}`,C.skipEscape=!0,L}function d(_,C){const T=_;return T.uuid=T.nss,T.nss=void 0,!C.tolerant&&(!T.uuid||!r(T.uuid))&&(T.error=T.error||"UUID is not valid."),T}function f(_){const C=_;return C.nss=(_.uuid||"").toLowerCase(),C}const h={scheme:"http",domainHost:!0,parse:o,serialize:a},p={scheme:"https",domainHost:h.domainHost,parse:o,serialize:a},g={scheme:"ws",domainHost:!0,parse:s,serialize:l},v={scheme:"wss",domainHost:g.domainHost,parse:g.parse,serialize:g.serialize},b={http:h,https:p,ws:g,wss:v,urn:{scheme:"urn",parse:u,serialize:c,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:d,serialize:f,skipNormalize:!0}};Object.setPrototypeOf(b,null);function S(_){return _&&(b[_]||b[_.toLowerCase()])||void 0}return _6={wsIsSecure:t,SCHEMES:b,isValidSchemeName:n,getSchemeHandler:S},_6}var Xge;function Yst(){if(Xge)return tN.exports;Xge=1;const{normalizeIPv6:r,removeDotSegments:e,recomposeAuthority:i,normalizeComponentEncoding:n,isIPv4:t,nonSimpleDomain:o}=j1e(),{SCHEMES:a,getSchemeHandler:s}=Gst();function l(v,y){return typeof v=="string"?v=f(p(v,y),y):typeof v=="object"&&(v=p(f(v,y),y)),v}function u(v,y,m){const b=m?Object.assign({scheme:"null"},m):{scheme:"null"},S=c(p(v,b),p(y,b),b,!0);return b.skipEscape=!0,f(S,b)}function c(v,y,m,b){const S={};return b||(v=p(f(v,m),m),y=p(f(y,m),m)),m=m||{},!m.tolerant&&y.scheme?(S.scheme=y.scheme,S.userinfo=y.userinfo,S.host=y.host,S.port=y.port,S.path=e(y.path||""),S.query=y.query):(y.userinfo!==void 0||y.host!==void 0||y.port!==void 0?(S.userinfo=y.userinfo,S.host=y.host,S.port=y.port,S.path=e(y.path||""),S.query=y.query):(y.path?(y.path[0]==="/"?S.path=e(y.path):((v.userinfo!==void 0||v.host!==void 0||v.port!==void 0)&&!v.path?S.path="/"+y.path:v.path?S.path=v.path.slice(0,v.path.lastIndexOf("/")+1)+y.path:S.path=y.path,S.path=e(S.path)),S.query=y.query):(S.path=v.path,y.query!==void 0?S.query=y.query:S.query=v.query),S.userinfo=v.userinfo,S.host=v.host,S.port=v.port),S.scheme=v.scheme),S.fragment=y.fragment,S}function d(v,y,m){return typeof v=="string"?(v=unescape(v),v=f(n(p(v,m),!0),{...m,skipEscape:!0})):typeof v=="object"&&(v=f(n(v,!0),{...m,skipEscape:!0})),typeof y=="string"?(y=unescape(y),y=f(n(p(y,m),!0),{...m,skipEscape:!0})):typeof y=="object"&&(y=f(n(y,!0),{...m,skipEscape:!0})),v.toLowerCase()===y.toLowerCase()}function f(v,y){const m={host:v.host,scheme:v.scheme,userinfo:v.userinfo,port:v.port,path:v.path,query:v.query,nid:v.nid,nss:v.nss,uuid:v.uuid,fragment:v.fragment,reference:v.reference,resourceName:v.resourceName,secure:v.secure,error:""},b=Object.assign({},y),S=[],_=s(b.scheme||m.scheme);_&&_.serialize&&_.serialize(m,b),m.path!==void 0&&(b.skipEscape?m.path=unescape(m.path):(m.path=escape(m.path),m.scheme!==void 0&&(m.path=m.path.split("%3A").join(":")))),b.reference!=="suffix"&&m.scheme&&S.push(m.scheme,":");const C=i(m);if(C!==void 0&&(b.reference!=="suffix"&&S.push("//"),S.push(C),m.path&&m.path[0]!=="/"&&S.push("/")),m.path!==void 0){let T=m.path;!b.absolutePath&&(!_||!_.absolutePath)&&(T=e(T)),C===void 0&&T[0]==="/"&&T[1]==="/"&&(T="/%2F"+T.slice(2)),S.push(T)}return m.query!==void 0&&S.push("?",m.query),m.fragment!==void 0&&S.push("#",m.fragment),S.join("")}const h=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function p(v,y){const m=Object.assign({},y),b={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let S=!1;m.reference==="suffix"&&(m.scheme?v=m.scheme+":"+v:v="//"+v);const _=v.match(h);if(_){if(b.scheme=_[1],b.userinfo=_[3],b.host=_[4],b.port=parseInt(_[5],10),b.path=_[6]||"",b.query=_[7],b.fragment=_[8],isNaN(b.port)&&(b.port=_[5]),b.host)if(t(b.host)===!1){const x=r(b.host);b.host=x.host.toLowerCase(),S=x.isIPV6}else S=!0;b.scheme===void 0&&b.userinfo===void 0&&b.host===void 0&&b.port===void 0&&b.query===void 0&&!b.path?b.reference="same-document":b.scheme===void 0?b.reference="relative":b.fragment===void 0?b.reference="absolute":b.reference="uri",m.reference&&m.reference!=="suffix"&&m.reference!==b.reference&&(b.error=b.error||"URI is not a "+m.reference+" reference.");const C=s(m.scheme||b.scheme);if(!m.unicodeSupport&&(!C||!C.unicodeSupport)&&b.host&&(m.domainHost||C&&C.domainHost)&&S===!1&&o(b.host))try{b.host=URL.domainToASCII(b.host.toLowerCase())}catch(T){b.error=b.error||"Host's domain name can not be converted to ASCII: "+T}(!C||C&&!C.skipNormalize)&&(v.indexOf("%")!==-1&&(b.scheme!==void 0&&(b.scheme=unescape(b.scheme)),b.host!==void 0&&(b.host=unescape(b.host))),b.path&&(b.path=escape(unescape(b.path))),b.fragment&&(b.fragment=encodeURI(decodeURIComponent(b.fragment)))),C&&C.parse&&C.parse(b,m)}else b.error=b.error||"URI can not be parsed.";return b}const g={SCHEMES:a,normalize:l,resolve:u,resolveComponent:c,equal:d,serialize:f,parse:p};return tN.exports=g,tN.exports.default=g,tN.exports.fastUri=g,tN.exports}var Kge;function $st(){if(Kge)return mB;Kge=1,Object.defineProperty(mB,"__esModule",{value:!0});const r=Yst();return r.code='require("ajv/dist/runtime/uri").default',mB.default=r,mB}var Zge;function qst(){return Zge||(Zge=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.CodeGen=r.Name=r.nil=r.stringify=r.str=r._=r.KeywordCxt=void 0;var e=Pz();Object.defineProperty(r,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var i=to();Object.defineProperty(r,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(r,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(r,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(r,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(r,"Name",{enumerable:!0,get:function(){return i.Name}}),Object.defineProperty(r,"CodeGen",{enumerable:!0,get:function(){return i.CodeGen}});const n=P7(),t=Cz(),o=I1e(),a=C7(),s=to(),l=_z(),u=nH(),c=Io(),d=Wst,f=$st(),h=(U,I)=>new RegExp(U,I);h.code="new RegExp";const p=["removeAdditional","useDefaults","coerceTypes"],g=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),v={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},y={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},m=200;function b(U){var I,Q,Z,ee,ie,de,pe,_e,Te,De,Pe,Ee,Re,je,Ke,ot,We,xe,ve,he,Se,be,ke,qe,rt;const St=U.strict,xt=(I=U.code)===null||I===void 0?void 0:I.optimize,It=xt===!0||xt===void 0?1:xt||0,Zt=(Z=(Q=U.code)===null||Q===void 0?void 0:Q.regExp)!==null&&Z!==void 0?Z:h,ct=(ee=U.uriResolver)!==null&&ee!==void 0?ee:f.default;return{strictSchema:(de=(ie=U.strictSchema)!==null&&ie!==void 0?ie:St)!==null&&de!==void 0?de:!0,strictNumbers:(_e=(pe=U.strictNumbers)!==null&&pe!==void 0?pe:St)!==null&&_e!==void 0?_e:!0,strictTypes:(De=(Te=U.strictTypes)!==null&&Te!==void 0?Te:St)!==null&&De!==void 0?De:"log",strictTuples:(Ee=(Pe=U.strictTuples)!==null&&Pe!==void 0?Pe:St)!==null&&Ee!==void 0?Ee:"log",strictRequired:(je=(Re=U.strictRequired)!==null&&Re!==void 0?Re:St)!==null&&je!==void 0?je:!1,code:U.code?{...U.code,optimize:It,regExp:Zt}:{optimize:It,regExp:Zt},loopRequired:(Ke=U.loopRequired)!==null&&Ke!==void 0?Ke:m,loopEnum:(ot=U.loopEnum)!==null&&ot!==void 0?ot:m,meta:(We=U.meta)!==null&&We!==void 0?We:!0,messages:(xe=U.messages)!==null&&xe!==void 0?xe:!0,inlineRefs:(ve=U.inlineRefs)!==null&&ve!==void 0?ve:!0,schemaId:(he=U.schemaId)!==null&&he!==void 0?he:"$id",addUsedSchema:(Se=U.addUsedSchema)!==null&&Se!==void 0?Se:!0,validateSchema:(be=U.validateSchema)!==null&&be!==void 0?be:!0,validateFormats:(ke=U.validateFormats)!==null&&ke!==void 0?ke:!0,unicodeRegExp:(qe=U.unicodeRegExp)!==null&&qe!==void 0?qe:!0,int32range:(rt=U.int32range)!==null&&rt!==void 0?rt:!0,uriResolver:ct}}class S{constructor(I={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,I=this.opts={...I,...b(I)};const{es5:Q,lines:Z}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:g,es5:Q,lines:Z}),this.logger=k(I.logger);const ee=I.validateFormats;I.validateFormats=!1,this.RULES=(0,o.getRules)(),_.call(this,v,I,"NOT SUPPORTED"),_.call(this,y,I,"DEPRECATED","warn"),this._metaOpts=w.call(this),I.formats&&x.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),I.keywords&&A.call(this,I.keywords),typeof I.meta=="object"&&this.addMetaSchema(I.meta),T.call(this),I.validateFormats=ee}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:I,meta:Q,schemaId:Z}=this.opts;let ee=d;Z==="id"&&(ee={...d},ee.id=ee.$id,delete ee.$id),Q&&I&&this.addMetaSchema(ee,ee[Z],!1)}defaultMeta(){const{meta:I,schemaId:Q}=this.opts;return this.opts.defaultMeta=typeof I=="object"?I[Q]||I:void 0}validate(I,Q){let Z;if(typeof I=="string"){if(Z=this.getSchema(I),!Z)throw new Error(`no schema with key or ref "${I}"`)}else Z=this.compile(I);const ee=Z(Q);return"$async"in Z||(this.errors=Z.errors),ee}compile(I,Q){const Z=this._addSchema(I,Q);return Z.validate||this._compileSchemaEnv(Z)}compileAsync(I,Q){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:Z}=this.opts;return ee.call(this,I,Q);async function ee(De,Pe){await ie.call(this,De.$schema);const Ee=this._addSchema(De,Pe);return Ee.validate||de.call(this,Ee)}async function ie(De){De&&!this.getSchema(De)&&await ee.call(this,{$ref:De},!0)}async function de(De){try{return this._compileSchemaEnv(De)}catch(Pe){if(!(Pe instanceof t.default))throw Pe;return pe.call(this,Pe),await _e.call(this,Pe.missingSchema),de.call(this,De)}}function pe({missingSchema:De,missingRef:Pe}){if(this.refs[De])throw new Error(`AnySchema ${De} is loaded but ${Pe} cannot be resolved`)}async function _e(De){const Pe=await Te.call(this,De);this.refs[De]||await ie.call(this,Pe.$schema),this.refs[De]||this.addSchema(Pe,De,Q)}async function Te(De){const Pe=this._loading[De];if(Pe)return Pe;try{return await(this._loading[De]=Z(De))}finally{delete this._loading[De]}}}addSchema(I,Q,Z,ee=this.opts.validateSchema){if(Array.isArray(I)){for(const de of I)this.addSchema(de,void 0,Z,ee);return this}let ie;if(typeof I=="object"){const{schemaId:de}=this.opts;if(ie=I[de],ie!==void 0&&typeof ie!="string")throw new Error(`schema ${de} must be string`)}return Q=(0,l.normalizeId)(Q||ie),this._checkUnique(Q),this.schemas[Q]=this._addSchema(I,Z,Q,ee,!0),this}addMetaSchema(I,Q,Z=this.opts.validateSchema){return this.addSchema(I,Q,!0,Z),this}validateSchema(I,Q){if(typeof I=="boolean")return!0;let Z;if(Z=I.$schema,Z!==void 0&&typeof Z!="string")throw new Error("$schema must be a string");if(Z=Z||this.opts.defaultMeta||this.defaultMeta(),!Z)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const ee=this.validate(Z,I);if(!ee&&Q){const ie="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(ie);else throw new Error(ie)}return ee}getSchema(I){let Q;for(;typeof(Q=C.call(this,I))=="string";)I=Q;if(Q===void 0){const{schemaId:Z}=this.opts,ee=new a.SchemaEnv({schema:{},schemaId:Z});if(Q=a.resolveSchema.call(this,ee,I),!Q)return;this.refs[I]=Q}return Q.validate||this._compileSchemaEnv(Q)}removeSchema(I){if(I instanceof RegExp)return this._removeAllSchemas(this.schemas,I),this._removeAllSchemas(this.refs,I),this;switch(typeof I){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const Q=C.call(this,I);return typeof Q=="object"&&this._cache.delete(Q.schema),delete this.schemas[I],delete this.refs[I],this}case"object":{const Q=I;this._cache.delete(Q);let Z=I[this.opts.schemaId];return Z&&(Z=(0,l.normalizeId)(Z),delete this.schemas[Z],delete this.refs[Z]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(I){for(const Q of I)this.addKeyword(Q);return this}addKeyword(I,Q){let Z;if(typeof I=="string")Z=I,typeof Q=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),Q.keyword=Z);else if(typeof I=="object"&&Q===void 0){if(Q=I,Z=Q.keyword,Array.isArray(Z)&&!Z.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(j.call(this,Z,Q),!Q)return(0,c.eachItem)(Z,ie=>N.call(this,ie)),this;W.call(this,Q);const ee={...Q,type:(0,u.getJSONTypes)(Q.type),schemaType:(0,u.getJSONTypes)(Q.schemaType)};return(0,c.eachItem)(Z,ee.type.length===0?ie=>N.call(this,ie,ee):ie=>ee.type.forEach(de=>N.call(this,ie,ee,de))),this}getKeyword(I){const Q=this.RULES.all[I];return typeof Q=="object"?Q.definition:!!Q}removeKeyword(I){const{RULES:Q}=this;delete Q.keywords[I],delete Q.all[I];for(const Z of Q.rules){const ee=Z.rules.findIndex(ie=>ie.keyword===I);ee>=0&&Z.rules.splice(ee,1)}return this}addFormat(I,Q){return typeof Q=="string"&&(Q=new RegExp(Q)),this.formats[I]=Q,this}errorsText(I=this.errors,{separator:Q=", ",dataVar:Z="data"}={}){return!I||I.length===0?"No errors":I.map(ee=>`${Z}${ee.instancePath} ${ee.message}`).reduce((ee,ie)=>ee+Q+ie)}$dataMetaSchema(I,Q){const Z=this.RULES.all;I=JSON.parse(JSON.stringify(I));for(const ee of Q){const ie=ee.split("/").slice(1);let de=I;for(const pe of ie)de=de[pe];for(const pe in Z){const _e=Z[pe];if(typeof _e!="object")continue;const{$data:Te}=_e.definition,De=de[pe];Te&&De&&(de[pe]=H(De))}}return I}_removeAllSchemas(I,Q){for(const Z in I){const ee=I[Z];(!Q||Q.test(Z))&&(typeof ee=="string"?delete I[Z]:ee&&!ee.meta&&(this._cache.delete(ee.schema),delete I[Z]))}}_addSchema(I,Q,Z,ee=this.opts.validateSchema,ie=this.opts.addUsedSchema){let de;const{schemaId:pe}=this.opts;if(typeof I=="object")de=I[pe];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof I!="boolean")throw new Error("schema must be object or boolean")}let _e=this._cache.get(I);if(_e!==void 0)return _e;Z=(0,l.normalizeId)(de||Z);const Te=l.getSchemaRefs.call(this,I,Z);return _e=new a.SchemaEnv({schema:I,schemaId:pe,meta:Q,baseId:Z,localRefs:Te}),this._cache.set(_e.schema,_e),ie&&!Z.startsWith("#")&&(Z&&this._checkUnique(Z),this.refs[Z]=_e),ee&&this.validateSchema(I,!0),_e}_checkUnique(I){if(this.schemas[I]||this.refs[I])throw new Error(`schema with key or id "${I}" already exists`)}_compileSchemaEnv(I){if(I.meta?this._compileMetaSchema(I):a.compileSchema.call(this,I),!I.validate)throw new Error("ajv implementation error");return I.validate}_compileMetaSchema(I){const Q=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,I)}finally{this.opts=Q}}}S.ValidationError=n.default,S.MissingRefError=t.default,r.default=S;function _(U,I,Q,Z="error"){for(const ee in U){const ie=ee;ie in I&&this.logger[Z](`${Q}: option ${ee}. ${U[ie]}`)}}function C(U){return U=(0,l.normalizeId)(U),this.schemas[U]||this.refs[U]}function T(){const U=this.opts.schemas;if(U)if(Array.isArray(U))this.addSchema(U);else for(const I in U)this.addSchema(U[I],I)}function x(){for(const U in this.opts.formats){const I=this.opts.formats[U];I&&this.addFormat(U,I)}}function A(U){if(Array.isArray(U)){this.addVocabulary(U);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const I in U){const Q=U[I];Q.keyword||(Q.keyword=I),this.addKeyword(Q)}}function w(){const U={...this.opts};for(const I of p)delete U[I];return U}const L={log(){},warn(){},error(){}};function k(U){if(U===!1)return L;if(U===void 0)return console;if(U.log&&U.warn&&U.error)return U;throw new Error("logger must implement log, warn and error methods")}const D=/^[a-z_$][a-z0-9_$:-]*$/i;function j(U,I){const{RULES:Q}=this;if((0,c.eachItem)(U,Z=>{if(Q.keywords[Z])throw new Error(`Keyword ${Z} is already defined`);if(!D.test(Z))throw new Error(`Keyword ${Z} has invalid name`)}),!!I&&I.$data&&!("code"in I||"validate"in I))throw new Error('$data keyword must have "code" or "validate" function')}function N(U,I,Q){var Z;const ee=I==null?void 0:I.post;if(Q&&ee)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:ie}=this;let de=ee?ie.post:ie.rules.find(({type:_e})=>_e===Q);if(de||(de={type:Q,rules:[]},ie.rules.push(de)),ie.keywords[U]=!0,!I)return;const pe={keyword:U,definition:{...I,type:(0,u.getJSONTypes)(I.type),schemaType:(0,u.getJSONTypes)(I.schemaType)}};I.before?V.call(this,de,pe,I.before):de.rules.push(pe),ie.all[U]=pe,(Z=I.implements)===null||Z===void 0||Z.forEach(_e=>this.addKeyword(_e))}function V(U,I,Q){const Z=U.rules.findIndex(ee=>ee.keyword===Q);Z>=0?U.rules.splice(Z,0,I):(U.rules.push(I),this.logger.warn(`rule ${Q} is not defined`))}function W(U){let{metaSchema:I}=U;I!==void 0&&(U.$data&&this.opts.$data&&(I=H(I)),U.validateSchema=this.compile(I,!0))}const K={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function H(U){return{anyOf:[U,K]}}})(h6)),h6}var bB={},SB={},_B={},Jge;function Xst(){if(Jge)return _B;Jge=1,Object.defineProperty(_B,"__esModule",{value:!0});const r={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return _B.default=r,_B}var oS={},Qge;function Kst(){if(Qge)return oS;Qge=1,Object.defineProperty(oS,"__esModule",{value:!0}),oS.callRef=oS.getValidate=void 0;const r=Cz(),e=kg(),i=to(),n=l_(),t=C7(),o=Io(),a={keyword:"$ref",schemaType:"string",code(u){const{gen:c,schema:d,it:f}=u,{baseId:h,schemaEnv:p,validateName:g,opts:v,self:y}=f,{root:m}=p;if((d==="#"||d==="#/")&&h===m.baseId)return S();const b=t.resolveRef.call(y,m,h,d);if(b===void 0)throw new r.default(f.opts.uriResolver,h,d);if(b instanceof t.SchemaEnv)return _(b);return C(b);function S(){if(p===m)return l(u,g,p,p.$async);const T=c.scopeValue("root",{ref:m});return l(u,(0,i._)`${T}.validate`,m,m.$async)}function _(T){const x=s(u,T);l(u,x,T,T.$async)}function C(T){const x=c.scopeValue("schema",v.code.source===!0?{ref:T,code:(0,i.stringify)(T)}:{ref:T}),A=c.name("valid"),w=u.subschema({schema:T,dataTypes:[],schemaPath:i.nil,topSchemaRef:x,errSchemaPath:d},A);u.mergeEvaluated(w),u.ok(A)}}};function s(u,c){const{gen:d}=u;return c.validate?d.scopeValue("validate",{ref:c.validate}):(0,i._)`${d.scopeValue("wrapper",{ref:c})}.validate`}oS.getValidate=s;function l(u,c,d,f){const{gen:h,it:p}=u,{allErrors:g,schemaEnv:v,opts:y}=p,m=y.passContext?n.default.this:i.nil;f?b():S();function b(){if(!v.$async)throw new Error("async schema referenced by sync schema");const T=h.let("valid");h.try(()=>{h.code((0,i._)`await ${(0,e.callValidateCode)(u,c,m)}`),C(c),g||h.assign(T,!0)},x=>{h.if((0,i._)`!(${x} instanceof ${p.ValidationError})`,()=>h.throw(x)),_(x),g||h.assign(T,!1)}),u.ok(T)}function S(){u.result((0,e.callValidateCode)(u,c,m),()=>C(c),()=>_(c))}function _(T){const x=(0,i._)`${T}.errors`;h.assign(n.default.vErrors,(0,i._)`${n.default.vErrors} === null ? ${x} : ${n.default.vErrors}.concat(${x})`),h.assign(n.default.errors,(0,i._)`${n.default.vErrors}.length`)}function C(T){var x;if(!p.opts.unevaluated)return;const A=(x=d==null?void 0:d.validate)===null||x===void 0?void 0:x.evaluated;if(p.props!==!0)if(A&&!A.dynamicProps)A.props!==void 0&&(p.props=o.mergeEvaluated.props(h,A.props,p.props));else{const w=h.var("props",(0,i._)`${T}.evaluated.props`);p.props=o.mergeEvaluated.props(h,w,p.props,i.Name)}if(p.items!==!0)if(A&&!A.dynamicItems)A.items!==void 0&&(p.items=o.mergeEvaluated.items(h,A.items,p.items));else{const w=h.var("items",(0,i._)`${T}.evaluated.items`);p.items=o.mergeEvaluated.items(h,w,p.items,i.Name)}}}return oS.callRef=l,oS.default=a,oS}var eve;function Zst(){if(eve)return SB;eve=1,Object.defineProperty(SB,"__esModule",{value:!0});const r=Xst(),e=Kst(),i=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",r.default,e.default];return SB.default=i,SB}var PB={},CB={},tve;function Jst(){if(tve)return CB;tve=1,Object.defineProperty(CB,"__esModule",{value:!0});const r=to(),e=r.operators,i={maximum:{okStr:"<=",ok:e.LTE,fail:e.GT},minimum:{okStr:">=",ok:e.GTE,fail:e.LT},exclusiveMaximum:{okStr:"<",ok:e.LT,fail:e.GTE},exclusiveMinimum:{okStr:">",ok:e.GT,fail:e.LTE}},n={message:({keyword:o,schemaCode:a})=>(0,r.str)`must be ${i[o].okStr} ${a}`,params:({keyword:o,schemaCode:a})=>(0,r._)`{comparison: ${i[o].okStr}, limit: ${a}}`},t={keyword:Object.keys(i),type:"number",schemaType:"number",$data:!0,error:n,code(o){const{keyword:a,data:s,schemaCode:l}=o;o.fail$data((0,r._)`${s} ${i[a].fail} ${l} || isNaN(${s})`)}};return CB.default=t,CB}var TB={},rve;function Qst(){if(rve)return TB;rve=1,Object.defineProperty(TB,"__esModule",{value:!0});const r=to(),i={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:n})=>(0,r.str)`must be multiple of ${n}`,params:({schemaCode:n})=>(0,r._)`{multipleOf: ${n}}`},code(n){const{gen:t,data:o,schemaCode:a,it:s}=n,l=s.opts.multipleOfPrecision,u=t.let("res"),c=l?(0,r._)`Math.abs(Math.round(${u}) - ${u}) > 1e-${l}`:(0,r._)`${u} !== parseInt(${u})`;n.fail$data((0,r._)`(${a} === 0 || (${u} = ${o}/${a}, ${c}))`)}};return TB.default=i,TB}var xB={},EB={},ive;function elt(){if(ive)return EB;ive=1,Object.defineProperty(EB,"__esModule",{value:!0});function r(e){const i=e.length;let n=0,t=0,o;for(;t<i;)n++,o=e.charCodeAt(t++),o>=55296&&o<=56319&&t<i&&(o=e.charCodeAt(t),(o&64512)===56320&&t++);return n}return EB.default=r,r.code='require("ajv/dist/runtime/ucs2length").default',EB}var nve;function tlt(){if(nve)return xB;nve=1,Object.defineProperty(xB,"__esModule",{value:!0});const r=to(),e=Io(),i=elt(),t={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:o,schemaCode:a}){const s=o==="maxLength"?"more":"fewer";return(0,r.str)`must NOT have ${s} than ${a} characters`},params:({schemaCode:o})=>(0,r._)`{limit: ${o}}`},code(o){const{keyword:a,data:s,schemaCode:l,it:u}=o,c=a==="maxLength"?r.operators.GT:r.operators.LT,d=u.opts.unicode===!1?(0,r._)`${s}.length`:(0,r._)`${(0,e.useFunc)(o.gen,i.default)}(${s})`;o.fail$data((0,r._)`${d} ${c} ${l}`)}};return xB.default=t,xB}var AB={},ove;function rlt(){if(ove)return AB;ove=1,Object.defineProperty(AB,"__esModule",{value:!0});const r=kg(),e=to(),n={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:t})=>(0,e.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,e._)`{pattern: ${t}}`},code(t){const{data:o,$data:a,schema:s,schemaCode:l,it:u}=t,c=u.opts.unicodeRegExp?"u":"",d=a?(0,e._)`(new RegExp(${l}, ${c}))`:(0,r.usePattern)(t,s);t.fail$data((0,e._)`!${d}.test(${o})`)}};return AB.default=n,AB}var wB={},ave;function ilt(){if(ave)return wB;ave=1,Object.defineProperty(wB,"__esModule",{value:!0});const r=to(),i={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:t}){const o=n==="maxProperties"?"more":"fewer";return(0,r.str)`must NOT have ${o} than ${t} properties`},params:({schemaCode:n})=>(0,r._)`{limit: ${n}}`},code(n){const{keyword:t,data:o,schemaCode:a}=n,s=t==="maxProperties"?r.operators.GT:r.operators.LT;n.fail$data((0,r._)`Object.keys(${o}).length ${s} ${a}`)}};return wB.default=i,wB}var OB={},sve;function nlt(){if(sve)return OB;sve=1,Object.defineProperty(OB,"__esModule",{value:!0});const r=kg(),e=to(),i=Io(),t={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:o}})=>(0,e.str)`must have required property '${o}'`,params:({params:{missingProperty:o}})=>(0,e._)`{missingProperty: ${o}}`},code(o){const{gen:a,schema:s,schemaCode:l,data:u,$data:c,it:d}=o,{opts:f}=d;if(!c&&s.length===0)return;const h=s.length>=f.loopRequired;if(d.allErrors?p():g(),f.strictRequired){const m=o.parentSchema.properties,{definedProperties:b}=o.it;for(const S of s)if((m==null?void 0:m[S])===void 0&&!b.has(S)){const _=d.schemaEnv.baseId+d.errSchemaPath,C=`required property "${S}" is not defined at "${_}" (strictRequired)`;(0,i.checkStrictMode)(d,C,d.opts.strictRequired)}}function p(){if(h||c)o.block$data(e.nil,v);else for(const m of s)(0,r.checkReportMissingProp)(o,m)}function g(){const m=a.let("missing");if(h||c){const b=a.let("valid",!0);o.block$data(b,()=>y(m,b)),o.ok(b)}else a.if((0,r.checkMissingProp)(o,s,m)),(0,r.reportMissingProp)(o,m),a.else()}function v(){a.forOf("prop",l,m=>{o.setParams({missingProperty:m}),a.if((0,r.noPropertyInData)(a,u,m,f.ownProperties),()=>o.error())})}function y(m,b){o.setParams({missingProperty:m}),a.forOf(m,l,()=>{a.assign(b,(0,r.propertyInData)(a,u,m,f.ownProperties)),a.if((0,e.not)(b),()=>{o.error(),a.break()})},e.nil)}}};return OB.default=t,OB}var DB={},lve;function olt(){if(lve)return DB;lve=1,Object.defineProperty(DB,"__esModule",{value:!0});const r=to(),i={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:t}){const o=n==="maxItems"?"more":"fewer";return(0,r.str)`must NOT have ${o} than ${t} items`},params:({schemaCode:n})=>(0,r._)`{limit: ${n}}`},code(n){const{keyword:t,data:o,schemaCode:a}=n,s=t==="maxItems"?r.operators.GT:r.operators.LT;n.fail$data((0,r._)`${o}.length ${s} ${a}`)}};return DB.default=i,DB}var RB={},MB={},uve;function T7(){if(uve)return MB;uve=1,Object.defineProperty(MB,"__esModule",{value:!0});const r=F1e();return r.code='require("ajv/dist/runtime/equal").default',MB.default=r,MB}var cve;function alt(){if(cve)return RB;cve=1,Object.defineProperty(RB,"__esModule",{value:!0});const r=nH(),e=to(),i=Io(),n=T7(),o={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:a,j:s}})=>(0,e.str)`must NOT have duplicate items (items ## ${s} and ${a} are identical)`,params:({params:{i:a,j:s}})=>(0,e._)`{i: ${a}, j: ${s}}`},code(a){const{gen:s,data:l,$data:u,schema:c,parentSchema:d,schemaCode:f,it:h}=a;if(!u&&!c)return;const p=s.let("valid"),g=d.items?(0,r.getSchemaTypes)(d.items):[];a.block$data(p,v,(0,e._)`${f} === false`),a.ok(p);function v(){const S=s.let("i",(0,e._)`${l}.length`),_=s.let("j");a.setParams({i:S,j:_}),s.assign(p,!0),s.if((0,e._)`${S} > 1`,()=>(y()?m:b)(S,_))}function y(){return g.length>0&&!g.some(S=>S==="object"||S==="array")}function m(S,_){const C=s.name("item"),T=(0,r.checkDataTypes)(g,C,h.opts.strictNumbers,r.DataType.Wrong),x=s.const("indices",(0,e._)`{}`);s.for((0,e._)`;${S}--;`,()=>{s.let(C,(0,e._)`${l}[${S}]`),s.if(T,(0,e._)`continue`),g.length>1&&s.if((0,e._)`typeof ${C} == "string"`,(0,e._)`${C} += "_"`),s.if((0,e._)`typeof ${x}[${C}] == "number"`,()=>{s.assign(_,(0,e._)`${x}[${C}]`),a.error(),s.assign(p,!1).break()}).code((0,e._)`${x}[${C}] = ${S}`)})}function b(S,_){const C=(0,i.useFunc)(s,n.default),T=s.name("outer");s.label(T).for((0,e._)`;${S}--;`,()=>s.for((0,e._)`${_} = ${S}; ${_}--;`,()=>s.if((0,e._)`${C}(${l}[${S}], ${l}[${_}])`,()=>{a.error(),s.assign(p,!1).break(T)})))}}};return RB.default=o,RB}var LB={},dve;function slt(){if(dve)return LB;dve=1,Object.defineProperty(LB,"__esModule",{value:!0});const r=to(),e=Io(),i=T7(),t={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:o})=>(0,r._)`{allowedValue: ${o}}`},code(o){const{gen:a,data:s,$data:l,schemaCode:u,schema:c}=o;l||c&&typeof c=="object"?o.fail$data((0,r._)`!${(0,e.useFunc)(a,i.default)}(${s}, ${u})`):o.fail((0,r._)`${c} !== ${s}`)}};return LB.default=t,LB}var kB={},fve;function llt(){if(fve)return kB;fve=1,Object.defineProperty(kB,"__esModule",{value:!0});const r=to(),e=Io(),i=T7(),t={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:o})=>(0,r._)`{allowedValues: ${o}}`},code(o){const{gen:a,data:s,$data:l,schema:u,schemaCode:c,it:d}=o;if(!l&&u.length===0)throw new Error("enum must have non-empty array");const f=u.length>=d.opts.loopEnum;let h;const p=()=>h??(h=(0,e.useFunc)(a,i.default));let g;if(f||l)g=a.let("valid"),o.block$data(g,v);else{if(!Array.isArray(u))throw new Error("ajv implementation error");const m=a.const("vSchema",c);g=(0,r.or)(...u.map((b,S)=>y(m,S)))}o.pass(g);function v(){a.assign(g,!1),a.forOf("v",c,m=>a.if((0,r._)`${p()}(${s}, ${m})`,()=>a.assign(g,!0).break()))}function y(m,b){const S=u[b];return typeof S=="object"&&S!==null?(0,r._)`${p()}(${s}, ${m}[${b}])`:(0,r._)`${s} === ${S}`}}};return kB.default=t,kB}var hve;function ult(){if(hve)return PB;hve=1,Object.defineProperty(PB,"__esModule",{value:!0});const r=Jst(),e=Qst(),i=tlt(),n=rlt(),t=ilt(),o=nlt(),a=olt(),s=alt(),l=slt(),u=llt(),c=[r.default,e.default,i.default,n.default,t.default,o.default,a.default,s.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},l.default,u.default];return PB.default=c,PB}var IB={},KD={},pve;function B1e(){if(pve)return KD;pve=1,Object.defineProperty(KD,"__esModule",{value:!0}),KD.validateAdditionalItems=void 0;const r=to(),e=Io(),n={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:o}})=>(0,r.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,r._)`{limit: ${o}}`},code(o){const{parentSchema:a,it:s}=o,{items:l}=a;if(!Array.isArray(l)){(0,e.checkStrictMode)(s,'"additionalItems" is ignored when "items" is not an array of schemas');return}t(o,l)}};function t(o,a){const{gen:s,schema:l,data:u,keyword:c,it:d}=o;d.items=!0;const f=s.const("len",(0,r._)`${u}.length`);if(l===!1)o.setParams({len:a.length}),o.pass((0,r._)`${f} <= ${a.length}`);else if(typeof l=="object"&&!(0,e.alwaysValidSchema)(d,l)){const p=s.var("valid",(0,r._)`${f} <= ${a.length}`);s.if((0,r.not)(p),()=>h(p)),o.ok(p)}function h(p){s.forRange("i",a.length,f,g=>{o.subschema({keyword:c,dataProp:g,dataPropType:e.Type.Num},p),d.allErrors||s.if((0,r.not)(p),()=>s.break())})}}return KD.validateAdditionalItems=t,KD.default=n,KD}var NB={},ZD={},gve;function V1e(){if(gve)return ZD;gve=1,Object.defineProperty(ZD,"__esModule",{value:!0}),ZD.validateTuple=void 0;const r=to(),e=Io(),i=kg(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(o){const{schema:a,it:s}=o;if(Array.isArray(a))return t(o,"additionalItems",a);s.items=!0,!(0,e.alwaysValidSchema)(s,a)&&o.ok((0,i.validateArray)(o))}};function t(o,a,s=o.schema){const{gen:l,parentSchema:u,data:c,keyword:d,it:f}=o;g(u),f.opts.unevaluated&&s.length&&f.items!==!0&&(f.items=e.mergeEvaluated.items(l,s.length,f.items));const h=l.name("valid"),p=l.const("len",(0,r._)`${c}.length`);s.forEach((v,y)=>{(0,e.alwaysValidSchema)(f,v)||(l.if((0,r._)`${p} > ${y}`,()=>o.subschema({keyword:d,schemaProp:y,dataProp:y},h)),o.ok(h))});function g(v){const{opts:y,errSchemaPath:m}=f,b=s.length,S=b===v.minItems&&(b===v.maxItems||v[a]===!1);if(y.strictTuples&&!S){const _=`"${d}" is ${b}-tuple, but minItems or maxItems/${a} are not specified or different at path "${m}"`;(0,e.checkStrictMode)(f,_,y.strictTuples)}}}return ZD.validateTuple=t,ZD.default=n,ZD}var vve;function clt(){if(vve)return NB;vve=1,Object.defineProperty(NB,"__esModule",{value:!0});const r=V1e(),e={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:i=>(0,r.validateTuple)(i,"items")};return NB.default=e,NB}var FB={},yve;function dlt(){if(yve)return FB;yve=1,Object.defineProperty(FB,"__esModule",{value:!0});const r=to(),e=Io(),i=kg(),n=B1e(),o={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:a}})=>(0,r.str)`must NOT have more than ${a} items`,params:({params:{len:a}})=>(0,r._)`{limit: ${a}}`},code(a){const{schema:s,parentSchema:l,it:u}=a,{prefixItems:c}=l;u.items=!0,!(0,e.alwaysValidSchema)(u,s)&&(c?(0,n.validateAdditionalItems)(a,c):a.ok((0,i.validateArray)(a)))}};return FB.default=o,FB}var jB={},mve;function flt(){if(mve)return jB;mve=1,Object.defineProperty(jB,"__esModule",{value:!0});const r=to(),e=Io(),n={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:t,max:o}})=>o===void 0?(0,r.str)`must contain at least ${t} valid item(s)`:(0,r.str)`must contain at least ${t} and no more than ${o} valid item(s)`,params:({params:{min:t,max:o}})=>o===void 0?(0,r._)`{minContains: ${t}}`:(0,r._)`{minContains: ${t}, maxContains: ${o}}`},code(t){const{gen:o,schema:a,parentSchema:s,data:l,it:u}=t;let c,d;const{minContains:f,maxContains:h}=s;u.opts.next?(c=f===void 0?1:f,d=h):c=1;const p=o.const("len",(0,r._)`${l}.length`);if(t.setParams({min:c,max:d}),d===void 0&&c===0){(0,e.checkStrictMode)(u,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(d!==void 0&&c>d){(0,e.checkStrictMode)(u,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,e.alwaysValidSchema)(u,a)){let b=(0,r._)`${p} >= ${c}`;d!==void 0&&(b=(0,r._)`${b} && ${p} <= ${d}`),t.pass(b);return}u.items=!0;const g=o.name("valid");d===void 0&&c===1?y(g,()=>o.if(g,()=>o.break())):c===0?(o.let(g,!0),d!==void 0&&o.if((0,r._)`${l}.length > 0`,v)):(o.let(g,!1),v()),t.result(g,()=>t.reset());function v(){const b=o.name("_valid"),S=o.let("count",0);y(b,()=>o.if(b,()=>m(S)))}function y(b,S){o.forRange("i",0,p,_=>{t.subschema({keyword:"contains",dataProp:_,dataPropType:e.Type.Num,compositeRule:!0},b),S()})}function m(b){o.code((0,r._)`${b}++`),d===void 0?o.if((0,r._)`${b} >= ${c}`,()=>o.assign(g,!0).break()):(o.if((0,r._)`${b} > ${d}`,()=>o.assign(g,!1).break()),c===1?o.assign(g,!0):o.if((0,r._)`${b} >= ${c}`,()=>o.assign(g,!0)))}}};return jB.default=n,jB}var P6={},bve;function hlt(){return bve||(bve=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.validateSchemaDeps=r.validatePropertyDeps=r.error=void 0;const e=to(),i=Io(),n=kg();r.error={message:({params:{property:l,depsCount:u,deps:c}})=>{const d=u===1?"property":"properties";return(0,e.str)`must have ${d} ${c} when property ${l} is present`},params:({params:{property:l,depsCount:u,deps:c,missingProperty:d}})=>(0,e._)`{property: ${l},
    missingProperty: ${d},
    depsCount: ${u},
    deps: ${c}}`};const t={keyword:"dependencies",type:"object",schemaType:"object",error:r.error,code(l){const[u,c]=o(l);a(l,u),s(l,c)}};function o({schema:l}){const u={},c={};for(const d in l){if(d==="__proto__")continue;const f=Array.isArray(l[d])?u:c;f[d]=l[d]}return[u,c]}function a(l,u=l.schema){const{gen:c,data:d,it:f}=l;if(Object.keys(u).length===0)return;const h=c.let("missing");for(const p in u){const g=u[p];if(g.length===0)continue;const v=(0,n.propertyInData)(c,d,p,f.opts.ownProperties);l.setParams({property:p,depsCount:g.length,deps:g.join(", ")}),f.allErrors?c.if(v,()=>{for(const y of g)(0,n.checkReportMissingProp)(l,y)}):(c.if((0,e._)`${v} && (${(0,n.checkMissingProp)(l,g,h)})`),(0,n.reportMissingProp)(l,h),c.else())}}r.validatePropertyDeps=a;function s(l,u=l.schema){const{gen:c,data:d,keyword:f,it:h}=l,p=c.name("valid");for(const g in u)(0,i.alwaysValidSchema)(h,u[g])||(c.if((0,n.propertyInData)(c,d,g,h.opts.ownProperties),()=>{const v=l.subschema({keyword:f,schemaProp:g},p);l.mergeValidEvaluated(v,p)},()=>c.var(p,!0)),l.ok(p))}r.validateSchemaDeps=s,r.default=t})(P6)),P6}var BB={},Sve;function plt(){if(Sve)return BB;Sve=1,Object.defineProperty(BB,"__esModule",{value:!0});const r=to(),e=Io(),n={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:t})=>(0,r._)`{propertyName: ${t.propertyName}}`},code(t){const{gen:o,schema:a,data:s,it:l}=t;if((0,e.alwaysValidSchema)(l,a))return;const u=o.name("valid");o.forIn("key",s,c=>{t.setParams({propertyName:c}),t.subschema({keyword:"propertyNames",data:c,dataTypes:["string"],propertyName:c,compositeRule:!0},u),o.if((0,r.not)(u),()=>{t.error(!0),l.allErrors||o.break()})}),t.ok(u)}};return BB.default=n,BB}var VB={},_ve;function H1e(){if(_ve)return VB;_ve=1,Object.defineProperty(VB,"__esModule",{value:!0});const r=kg(),e=to(),i=l_(),n=Io(),o={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:a})=>(0,e._)`{additionalProperty: ${a.additionalProperty}}`},code(a){const{gen:s,schema:l,parentSchema:u,data:c,errsCount:d,it:f}=a;if(!d)throw new Error("ajv implementation error");const{allErrors:h,opts:p}=f;if(f.props=!0,p.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(f,l))return;const g=(0,r.allSchemaProperties)(u.properties),v=(0,r.allSchemaProperties)(u.patternProperties);y(),a.ok((0,e._)`${d} === ${i.default.errors}`);function y(){s.forIn("key",c,C=>{!g.length&&!v.length?S(C):s.if(m(C),()=>S(C))})}function m(C){let T;if(g.length>8){const x=(0,n.schemaRefOrVal)(f,u.properties,"properties");T=(0,r.isOwnProperty)(s,x,C)}else g.length?T=(0,e.or)(...g.map(x=>(0,e._)`${C} === ${x}`)):T=e.nil;return v.length&&(T=(0,e.or)(T,...v.map(x=>(0,e._)`${(0,r.usePattern)(a,x)}.test(${C})`))),(0,e.not)(T)}function b(C){s.code((0,e._)`delete ${c}[${C}]`)}function S(C){if(p.removeAdditional==="all"||p.removeAdditional&&l===!1){b(C);return}if(l===!1){a.setParams({additionalProperty:C}),a.error(),h||s.break();return}if(typeof l=="object"&&!(0,n.alwaysValidSchema)(f,l)){const T=s.name("valid");p.removeAdditional==="failing"?(_(C,T,!1),s.if((0,e.not)(T),()=>{a.reset(),b(C)})):(_(C,T),h||s.if((0,e.not)(T),()=>s.break()))}}function _(C,T,x){const A={keyword:"additionalProperties",dataProp:C,dataPropType:n.Type.Str};x===!1&&Object.assign(A,{compositeRule:!0,createErrors:!1,allErrors:!1}),a.subschema(A,T)}}};return VB.default=o,VB}var HB={},Pve;function glt(){if(Pve)return HB;Pve=1,Object.defineProperty(HB,"__esModule",{value:!0});const r=Pz(),e=kg(),i=Io(),n=H1e(),t={keyword:"properties",type:"object",schemaType:"object",code(o){const{gen:a,schema:s,parentSchema:l,data:u,it:c}=o;c.opts.removeAdditional==="all"&&l.additionalProperties===void 0&&n.default.code(new r.KeywordCxt(c,n.default,"additionalProperties"));const d=(0,e.allSchemaProperties)(s);for(const v of d)c.definedProperties.add(v);c.opts.unevaluated&&d.length&&c.props!==!0&&(c.props=i.mergeEvaluated.props(a,(0,i.toHash)(d),c.props));const f=d.filter(v=>!(0,i.alwaysValidSchema)(c,s[v]));if(f.length===0)return;const h=a.name("valid");for(const v of f)p(v)?g(v):(a.if((0,e.propertyInData)(a,u,v,c.opts.ownProperties)),g(v),c.allErrors||a.else().var(h,!0),a.endIf()),o.it.definedProperties.add(v),o.ok(h);function p(v){return c.opts.useDefaults&&!c.compositeRule&&s[v].default!==void 0}function g(v){o.subschema({keyword:"properties",schemaProp:v,dataProp:v},h)}}};return HB.default=t,HB}var UB={},Cve;function vlt(){if(Cve)return UB;Cve=1,Object.defineProperty(UB,"__esModule",{value:!0});const r=kg(),e=to(),i=Io(),n=Io(),t={keyword:"patternProperties",type:"object",schemaType:"object",code(o){const{gen:a,schema:s,data:l,parentSchema:u,it:c}=o,{opts:d}=c,f=(0,r.allSchemaProperties)(s),h=f.filter(S=>(0,i.alwaysValidSchema)(c,s[S]));if(f.length===0||h.length===f.length&&(!c.opts.unevaluated||c.props===!0))return;const p=d.strictSchema&&!d.allowMatchingProperties&&u.properties,g=a.name("valid");c.props!==!0&&!(c.props instanceof e.Name)&&(c.props=(0,n.evaluatedPropsToName)(a,c.props));const{props:v}=c;y();function y(){for(const S of f)p&&m(S),c.allErrors?b(S):(a.var(g,!0),b(S),a.if(g))}function m(S){for(const _ in p)new RegExp(S).test(_)&&(0,i.checkStrictMode)(c,`property ${_} matches pattern ${S} (use allowMatchingProperties)`)}function b(S){a.forIn("key",l,_=>{a.if((0,e._)`${(0,r.usePattern)(o,S)}.test(${_})`,()=>{const C=h.includes(S);C||o.subschema({keyword:"patternProperties",schemaProp:S,dataProp:_,dataPropType:n.Type.Str},g),c.opts.unevaluated&&v!==!0?a.assign((0,e._)`${v}[${_}]`,!0):!C&&!c.allErrors&&a.if((0,e.not)(g),()=>a.break())})})}}};return UB.default=t,UB}var zB={},Tve;function ylt(){if(Tve)return zB;Tve=1,Object.defineProperty(zB,"__esModule",{value:!0});const r=Io(),e={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(i){const{gen:n,schema:t,it:o}=i;if((0,r.alwaysValidSchema)(o,t)){i.fail();return}const a=n.name("valid");i.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),i.failResult(a,()=>i.reset(),()=>i.error())},error:{message:"must NOT be valid"}};return zB.default=e,zB}var WB={},xve;function mlt(){if(xve)return WB;xve=1,Object.defineProperty(WB,"__esModule",{value:!0});const e={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:kg().validateUnion,error:{message:"must match a schema in anyOf"}};return WB.default=e,WB}var GB={},Eve;function blt(){if(Eve)return GB;Eve=1,Object.defineProperty(GB,"__esModule",{value:!0});const r=to(),e=Io(),n={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:t})=>(0,r._)`{passingSchemas: ${t.passing}}`},code(t){const{gen:o,schema:a,parentSchema:s,it:l}=t;if(!Array.isArray(a))throw new Error("ajv implementation error");if(l.opts.discriminator&&s.discriminator)return;const u=a,c=o.let("valid",!1),d=o.let("passing",null),f=o.name("_valid");t.setParams({passing:d}),o.block(h),t.result(c,()=>t.reset(),()=>t.error(!0));function h(){u.forEach((p,g)=>{let v;(0,e.alwaysValidSchema)(l,p)?o.var(f,!0):v=t.subschema({keyword:"oneOf",schemaProp:g,compositeRule:!0},f),g>0&&o.if((0,r._)`${f} && ${c}`).assign(c,!1).assign(d,(0,r._)`[${d}, ${g}]`).else(),o.if(f,()=>{o.assign(c,!0),o.assign(d,g),v&&t.mergeEvaluated(v,r.Name)})})}}};return GB.default=n,GB}var YB={},Ave;function Slt(){if(Ave)return YB;Ave=1,Object.defineProperty(YB,"__esModule",{value:!0});const r=Io(),e={keyword:"allOf",schemaType:"array",code(i){const{gen:n,schema:t,it:o}=i;if(!Array.isArray(t))throw new Error("ajv implementation error");const a=n.name("valid");t.forEach((s,l)=>{if((0,r.alwaysValidSchema)(o,s))return;const u=i.subschema({keyword:"allOf",schemaProp:l},a);i.ok(a),i.mergeEvaluated(u)})}};return YB.default=e,YB}var $B={},wve;function _lt(){if(wve)return $B;wve=1,Object.defineProperty($B,"__esModule",{value:!0});const r=to(),e=Io(),n={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:o})=>(0,r.str)`must match "${o.ifClause}" schema`,params:({params:o})=>(0,r._)`{failingKeyword: ${o.ifClause}}`},code(o){const{gen:a,parentSchema:s,it:l}=o;s.then===void 0&&s.else===void 0&&(0,e.checkStrictMode)(l,'"if" without "then" and "else" is ignored');const u=t(l,"then"),c=t(l,"else");if(!u&&!c)return;const d=a.let("valid",!0),f=a.name("_valid");if(h(),o.reset(),u&&c){const g=a.let("ifClause");o.setParams({ifClause:g}),a.if(f,p("then",g),p("else",g))}else u?a.if(f,p("then")):a.if((0,r.not)(f),p("else"));o.pass(d,()=>o.error(!0));function h(){const g=o.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},f);o.mergeEvaluated(g)}function p(g,v){return()=>{const y=o.subschema({keyword:g},f);a.assign(d,f),o.mergeValidEvaluated(y,d),v?a.assign(v,(0,r._)`${g}`):o.setParams({ifClause:g})}}}};function t(o,a){const s=o.schema[a];return s!==void 0&&!(0,e.alwaysValidSchema)(o,s)}return $B.default=n,$B}var qB={},Ove;function Plt(){if(Ove)return qB;Ove=1,Object.defineProperty(qB,"__esModule",{value:!0});const r=Io(),e={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:i,parentSchema:n,it:t}){n.if===void 0&&(0,r.checkStrictMode)(t,`"${i}" without "if" is ignored`)}};return qB.default=e,qB}var Dve;function Clt(){if(Dve)return IB;Dve=1,Object.defineProperty(IB,"__esModule",{value:!0});const r=B1e(),e=clt(),i=V1e(),n=dlt(),t=flt(),o=hlt(),a=plt(),s=H1e(),l=glt(),u=vlt(),c=ylt(),d=mlt(),f=blt(),h=Slt(),p=_lt(),g=Plt();function v(y=!1){const m=[c.default,d.default,f.default,h.default,p.default,g.default,a.default,s.default,o.default,l.default,u.default];return y?m.push(e.default,n.default):m.push(r.default,i.default),m.push(t.default),m}return IB.default=v,IB}var XB={},KB={},Rve;function Tlt(){if(Rve)return KB;Rve=1,Object.defineProperty(KB,"__esModule",{value:!0});const r=to(),i={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:n})=>(0,r.str)`must match format "${n}"`,params:({schemaCode:n})=>(0,r._)`{format: ${n}}`},code(n,t){const{gen:o,data:a,$data:s,schema:l,schemaCode:u,it:c}=n,{opts:d,errSchemaPath:f,schemaEnv:h,self:p}=c;if(!d.validateFormats)return;s?g():v();function g(){const y=o.scopeValue("formats",{ref:p.formats,code:d.code.formats}),m=o.const("fDef",(0,r._)`${y}[${u}]`),b=o.let("fType"),S=o.let("format");o.if((0,r._)`typeof ${m} == "object" && !(${m} instanceof RegExp)`,()=>o.assign(b,(0,r._)`${m}.type || "string"`).assign(S,(0,r._)`${m}.validate`),()=>o.assign(b,(0,r._)`"string"`).assign(S,m)),n.fail$data((0,r.or)(_(),C()));function _(){return d.strictSchema===!1?r.nil:(0,r._)`${u} && !${S}`}function C(){const T=h.$async?(0,r._)`(${m}.async ? await ${S}(${a}) : ${S}(${a}))`:(0,r._)`${S}(${a})`,x=(0,r._)`(typeof ${S} == "function" ? ${T} : ${S}.test(${a}))`;return(0,r._)`${S} && ${S} !== true && ${b} === ${t} && !${x}`}}function v(){const y=p.formats[l];if(!y){_();return}if(y===!0)return;const[m,b,S]=C(y);m===t&&n.pass(T());function _(){if(d.strictSchema===!1){p.logger.warn(x());return}throw new Error(x());function x(){return`unknown format "${l}" ignored in schema at path "${f}"`}}function C(x){const A=x instanceof RegExp?(0,r.regexpCode)(x):d.code.formats?(0,r._)`${d.code.formats}${(0,r.getProperty)(l)}`:void 0,w=o.scopeValue("formats",{key:l,ref:x,code:A});return typeof x=="object"&&!(x instanceof RegExp)?[x.type||"string",x.validate,(0,r._)`${w}.validate`]:["string",x,w]}function T(){if(typeof y=="object"&&!(y instanceof RegExp)&&y.async){if(!h.$async)throw new Error("async format in sync schema");return(0,r._)`await ${S}(${a})`}return typeof b=="function"?(0,r._)`${S}(${a})`:(0,r._)`${S}.test(${a})`}}}};return KB.default=i,KB}var Mve;function xlt(){if(Mve)return XB;Mve=1,Object.defineProperty(XB,"__esModule",{value:!0});const e=[Tlt().default];return XB.default=e,XB}var Nw={},Lve;function Elt(){return Lve||(Lve=1,Object.defineProperty(Nw,"__esModule",{value:!0}),Nw.contentVocabulary=Nw.metadataVocabulary=void 0,Nw.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Nw.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Nw}var kve;function Alt(){if(kve)return bB;kve=1,Object.defineProperty(bB,"__esModule",{value:!0});const r=Zst(),e=ult(),i=Clt(),n=xlt(),t=Elt(),o=[r.default,e.default,(0,i.default)(),n.default,t.metadataVocabulary,t.contentVocabulary];return bB.default=o,bB}var ZB={},rN={},Ive;function wlt(){if(Ive)return rN;Ive=1,Object.defineProperty(rN,"__esModule",{value:!0}),rN.DiscrError=void 0;var r;return(function(e){e.Tag="tag",e.Mapping="mapping"})(r||(rN.DiscrError=r={})),rN}var Nve;function Olt(){if(Nve)return ZB;Nve=1,Object.defineProperty(ZB,"__esModule",{value:!0});const r=to(),e=wlt(),i=C7(),n=Cz(),t=Io(),a={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:s,tagName:l}})=>s===e.DiscrError.Tag?`tag "${l}" must be string`:`value of tag "${l}" must be in oneOf`,params:({params:{discrError:s,tag:l,tagName:u}})=>(0,r._)`{error: ${s}, tag: ${u}, tagValue: ${l}}`},code(s){const{gen:l,data:u,schema:c,parentSchema:d,it:f}=s,{oneOf:h}=d;if(!f.opts.discriminator)throw new Error("discriminator: requires discriminator option");const p=c.propertyName;if(typeof p!="string")throw new Error("discriminator: requires propertyName");if(c.mapping)throw new Error("discriminator: mapping is not supported");if(!h)throw new Error("discriminator: requires oneOf keyword");const g=l.let("valid",!1),v=l.const("tag",(0,r._)`${u}${(0,r.getProperty)(p)}`);l.if((0,r._)`typeof ${v} == "string"`,()=>y(),()=>s.error(!1,{discrError:e.DiscrError.Tag,tag:v,tagName:p})),s.ok(g);function y(){const S=b();l.if(!1);for(const _ in S)l.elseIf((0,r._)`${v} === ${_}`),l.assign(g,m(S[_]));l.else(),s.error(!1,{discrError:e.DiscrError.Mapping,tag:v,tagName:p}),l.endIf()}function m(S){const _=l.name("valid"),C=s.subschema({keyword:"oneOf",schemaProp:S},_);return s.mergeEvaluated(C,r.Name),_}function b(){var S;const _={},C=x(d);let T=!0;for(let L=0;L<h.length;L++){let k=h[L];if(k!=null&&k.$ref&&!(0,t.schemaHasRulesButRef)(k,f.self.RULES)){const j=k.$ref;if(k=i.resolveRef.call(f.self,f.schemaEnv.root,f.baseId,j),k instanceof i.SchemaEnv&&(k=k.schema),k===void 0)throw new n.default(f.opts.uriResolver,f.baseId,j)}const D=(S=k==null?void 0:k.properties)===null||S===void 0?void 0:S[p];if(typeof D!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${p}"`);T=T&&(C||x(k)),A(D,L)}if(!T)throw new Error(`discriminator: "${p}" must be required`);return _;function x({required:L}){return Array.isArray(L)&&L.includes(p)}function A(L,k){if(L.const)w(L.const,k);else if(L.enum)for(const D of L.enum)w(D,k);else throw new Error(`discriminator: "properties/${p}" must have "const" or "enum"`)}function w(L,k){if(typeof L!="string"||L in _)throw new Error(`discriminator: "${p}" values must be unique strings`);_[L]=k}}}};return ZB.default=a,ZB}const Dlt="http://json-schema.org/draft-07/schema#",Rlt="http://json-schema.org/draft-07/schema#",Mlt="Core schema meta-schema",Llt={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},klt=["object","boolean"],Ilt={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},Nlt={$schema:Dlt,$id:Rlt,title:Mlt,definitions:Llt,type:klt,properties:Ilt,default:!0};var Fve;function Flt(){return Fve||(Fve=1,(function(r,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;const i=qst(),n=Alt(),t=Olt(),o=Nlt,a=["/properties"],s="http://json-schema.org/draft-07/schema";class l extends i.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(p=>this.addVocabulary(p)),this.opts.discriminator&&this.addKeyword(t.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const p=this.opts.$data?this.$dataMetaSchema(o,a):o;this.addMetaSchema(p,s,!1),this.refs["http://json-schema.org/schema"]=s}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}}e.Ajv=l,r.exports=e=l,r.exports.Ajv=l,Object.defineProperty(e,"__esModule",{value:!0}),e.default=l;var u=Pz();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var c=to();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var d=P7();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return d.default}});var f=Cz();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return f.default}})})(pB,pB.exports)),pB.exports}var jlt=Flt();const Blt=Lu(jlt),Vlt="http://json-schema.org/draft-07/schema#",Hlt="remotive-dashboard.schema.json",Ult="Remotive Dashboard Layout",zlt="Schema for Remotive Studio dashboard layout configuration. Compatible with JSON Schema Drafts 4, 6, and 7. To enable strict validation, change all 'additionalProperties: true' to 'additionalProperties: false' throughout this schema.",Wlt=`STRICT MODE: This schema uses lenient validation by default (additionalProperties: true). To enable strict validation that rejects unknown properties, search and replace 'additionalProperties": true' with 'additionalProperties": false' in this file.`,Glt={Signal:{type:"object",description:"Reference to a signal by namespace, frame, and signal name",required:["namespace","frame","signal"],properties:{namespace:{type:"string",description:"Signal namespace identifier"},frame:{type:"string",description:"Frame name containing the signal"},signal:{type:"string",description:"Signal name within the frame"}},additionalProperties:!0},Frame:{type:"object",description:"Reference to a signal by namespace, frame, and signal name",required:["namespace","frame"],properties:{namespace:{type:"string",description:"Signal namespace identifier"},frame:{type:"string",description:"Frame name containing the signal"},signals:{type:"array",items:{$ref:"#/definitions/Signal"},description:"List of signals to display in the frame"}},additionalProperties:!0},GridConfig:{type:"object",description:"Grid position and size for panel layout",required:["x","y","w","h"],properties:{x:{type:"integer",minimum:0,description:"X position in grid units"},y:{type:"integer",minimum:0,description:"Y position in grid units"},w:{type:"integer",minimum:1,description:"Width in grid units"},h:{type:"integer",minimum:1,description:"Height in grid units"}},additionalProperties:!0},TimeseriesPanelContent:{type:"object",description:"Data content for a timeseries panel",required:["signals"],properties:{signals:{type:"array",items:{$ref:"#/definitions/Signal"},description:"List of signals to display in the chart"}},additionalProperties:!0},TimeseriesPanelSettings:{type:"object",description:"Display settings for a timeseries panel",properties:{syncChart:{type:"boolean",description:"Whether to sync chart width with global setting. Default: true"},chartWidthSeconds:{type:"number",minimum:1,description:"Per-panel chart width in seconds. Only used when syncChart is false"},useSuggestedMinMax:{type:"boolean",description:"Use signal-defined min/max for Y-axis. Default: false"},maxFps:{type:"number",minimum:5,maximum:120,description:"Max animation frame rate for the chart (increments of 5). Default: 60"}},additionalProperties:!0},GaugePanelContent:{type:"object",description:"Data content for a gauge panel",required:["signals"],properties:{signals:{type:"array",items:{$ref:"#/definitions/Signal"},description:"List of signals to display as gauges"}},additionalProperties:!0},GaugePanelSettings:{type:"object",description:"Display settings for a gauge panel",properties:{height:{type:"number",description:"Height of each gauge row in pixels"}},additionalProperties:!0},MapPanelContent:{type:"object",description:"Data content for a map panel",properties:{signals:{type:"object",description:"Latitude and longitude signal references",properties:{latitude:{$ref:"#/definitions/Signal"},longitude:{$ref:"#/definitions/Signal"}},additionalProperties:!0}},additionalProperties:!0},FrameDistributionPanelContent:{type:"object",description:"Data content for a frame distribution panel",properties:{namespace:{type:"string",description:"The namespace to subscribe to for frame distribution"}},additionalProperties:!0},VideoPanelContent:{type:"object",description:"Data content for a video panel",required:["videoName"],properties:{videoName:{type:"string",description:"A name like 'front-camera' is used to share one dashboard with multiple recordings/videos"},videoFilePath:{type:"string",description:"Path to the video file"},recordingSessionPath:{type:"string",description:"Path to the recording session"}},additionalProperties:!0},TracePanelContent:{type:"object",description:"Data content for a trace panel",required:["frames"],properties:{frames:{type:"array",items:{$ref:"#/definitions/Frame"},description:"List of frames to display in the trace panel"}},additionalProperties:!0},TracePanelSettings:{type:"object",description:"Display settings for a trace panel",properties:{sortOrder:{type:"string",enum:["newest-first","oldest-first"],description:"Sort order for the trace panel. Default: newest-first"},groupByFrame:{type:"boolean",description:"Whether to group frames by frame name. Default: false"},expandSignals:{type:"boolean",description:"Whether to expand or collapse signals. Default: false"},bufferSize:{type:"integer",minimum:100,description:"The number of entries to display in the trace panel. Default: 10000"}},additionalProperties:!0},TimeseriesPanelConfig:{type:"object",description:"Timeseries chart panel configuration",required:["type"],properties:{type:{type:"string",enum:["timeseries"],description:"Panel type identifier"},content:{$ref:"#/definitions/TimeseriesPanelContent"},settings:{$ref:"#/definitions/TimeseriesPanelSettings"},grid:{$ref:"#/definitions/GridConfig"}},additionalProperties:!0},GaugePanelConfig:{type:"object",description:"Gauge panel configuration for displaying signal values",required:["type"],properties:{type:{type:"string",enum:["gauge"],description:"Panel type identifier"},content:{$ref:"#/definitions/GaugePanelContent"},settings:{$ref:"#/definitions/GaugePanelSettings"},grid:{$ref:"#/definitions/GridConfig"}},additionalProperties:!0},MapPanelConfig:{type:"object",description:"Map panel configuration for displaying geographic data",required:["type"],properties:{type:{type:"string",enum:["map"],description:"Panel type identifier"},content:{$ref:"#/definitions/MapPanelContent"},grid:{$ref:"#/definitions/GridConfig"}},additionalProperties:!0},FrameDistributionPanelConfig:{type:"object",description:"Frame distribution panel for CAN frame visualization",required:["type"],properties:{type:{type:"string",enum:["frameDistribution"],description:"Panel type identifier"},content:{$ref:"#/definitions/FrameDistributionPanelContent"},grid:{$ref:"#/definitions/GridConfig"}},additionalProperties:!0},VideoPanelConfig:{type:"object",description:"Video panel configuration (recording-specific, not portable between recordings)",required:["type"],properties:{type:{type:"string",enum:["video"],description:"Panel type identifier"},content:{$ref:"#/definitions/VideoPanelContent"},grid:{$ref:"#/definitions/GridConfig"}},additionalProperties:!0},TracePanelConfig:{type:"object",description:"Trace panel configuration",required:["type"],properties:{type:{type:"string",enum:["trace"],description:"Panel type identifier"},content:{$ref:"#/definitions/TracePanelContent"},settings:{$ref:"#/definitions/TracePanelSettings"},grid:{$ref:"#/definitions/GridConfig"}},additionalProperties:!0},PanelConfig:{type:"object",description:"Union of all panel configuration types",discriminator:{propertyName:"type"},oneOf:[{$ref:"#/definitions/TimeseriesPanelConfig"},{$ref:"#/definitions/GaugePanelConfig"},{$ref:"#/definitions/MapPanelConfig"},{$ref:"#/definitions/FrameDistributionPanelConfig"},{$ref:"#/definitions/VideoPanelConfig"},{$ref:"#/definitions/TracePanelConfig"}]}},Ylt="object",$lt=["schema","panels"],qlt={schema:{type:"string",enum:["remotive-dashboard:0.1"],description:"Schema identifier and version (format: name:version)"},name:{type:"string",description:"Optional name for the dashboard layout"},chartWidthSeconds:{type:"number",minimum:1,description:"Global chart width in seconds for synced timeseries panels. Default: 30"},panels:{type:"array",items:{$ref:"#/definitions/PanelConfig"},description:"List of panel configurations"}},Xlt=!0,U1e={$schema:Vlt,$id:Hlt,title:Ult,description:zlt,$comment:Wlt,definitions:Glt,type:Ylt,required:$lt,properties:qlt,additionalProperties:Xlt},z1e=new Blt({allErrors:!0,verbose:!0,strict:!0,discriminator:!0}),C6=z1e.compile(U1e),x7=JSON.parse(JSON.stringify(U1e));delete x7.$id;function W1e(r){typeof r=="object"&&r!==null&&(r.additionalProperties===!0&&(r.additionalProperties=!1),Object.values(r).forEach(W1e))}W1e(x7);const T6=z1e.compile(x7);function G1e(r){const e=r.instancePath||"(root)",i=r.message||"unknown error";switch(r.keyword){case"required":return`${e}: missing required property '${r.params.missingProperty}'`;case"enum":return`${e}: ${i}. Allowed values: ${JSON.stringify(r.params.allowedValues)}`;case"type":return`${e}: ${i}`;case"additionalProperties":return`${e}: unexpected property '${r.params.additionalProperty}'`;case"oneOf":return`${e}: must match exactly one panel type schema`;default:return`${e}: ${i}`}}function Klt(r){const e=new Set,i=[];for(const n of r){const t=G1e(n);e.has(t)||(e.add(t),i.push(n))}return i}function Zlt(r){if(!C6(r)){const t=C6.errors?Klt(C6.errors):[];return{valid:!1,errors:t.length>0?t.map(G1e):["Unknown validation error"]}}const i=T6(r),n=[];if(!i&&T6.errors){for(const t of T6.errors)if(t.keyword==="additionalProperties"){const o=t.instancePath||"(root)";n.push(`${o}: unknown property '${t.params.additionalProperty}'`)}}return{valid:!0,warnings:n.length>0?n:void 0}}function oH(r){return{namespace:r.namespace,frame:r.frameName,signal:r.name}}function aH(r,e){return e.find(i=>i.namespace===r.namespace&&i.frameName===r.frame&&i.name===r.signal)}function Jlt(r,e){return e.find(i=>i.namespace===r.namespace&&i.name===r.frame)}function sH(r){return`${r.namespace}:${r.frame}:${r.signal}`}function Qlt(r){return`${r.namespace}:${r.frame}`}function oL(r){return{x:r.x,y:r.y,w:r.w,h:r.h}}function eut(r){switch(r.type){case"timeseries":return tut(r);case"gauge":return rut(r);case"map":return iut(r);case"frame-distribution":return nut(r);case"video":return out(r);case"trace":return aut(r)}}function tut(r){const e={useSuggestedMinMax:r.useSuggestedMinMax,syncChart:r.syncCharts,chartWidthSeconds:r.chartWidthSeconds,maxFps:r.maxFps},i=[...r.signals.map(oH),...r.unresolvedSignals||[]];return{type:"timeseries",...i.length>0?{content:{signals:i}}:{},settings:e,grid:oL(r.grid)}}function rut(r){const e={};r.heightConfig!==void 0&&(e.height=r.heightConfig);const i=[...r.signals.map(oH),...r.unresolvedSignals||[]];return{type:"gauge",...i.length>0?{content:{signals:i}}:{},...Object.keys(e).length>0?{settings:e}:{},grid:oL(r.grid)}}function iut(r){var t,o,a,s;const e={type:"map",grid:oL(r.grid)},i=r.signals.latitude||((t=r.unresolvedSignals)==null?void 0:t.latitude),n=r.signals.longitude||((o=r.unresolvedSignals)==null?void 0:o.longitude);return(i||n)&&(e.content={signals:{}},r.signals.latitude?e.content.signals.latitude=oH(r.signals.latitude):(a=r.unresolvedSignals)!=null&&a.latitude&&(e.content.signals.latitude=r.unresolvedSignals.latitude),r.signals.longitude?e.content.signals.longitude=oH(r.signals.longitude):(s=r.unresolvedSignals)!=null&&s.longitude&&(e.content.signals.longitude=r.unresolvedSignals.longitude)),e}function nut(r){const e={type:"frameDistribution",grid:oL(r.grid)};return r.selectedNamespace&&(e.content={namespace:r.selectedNamespace}),e}function out(r){const e={type:"video",grid:oL(r.grid)};return r.videoName&&(e.content={videoName:r.videoName,...r.videoFilePath?{videoFilePath:r.videoFilePath}:{},...r.recordingSessionPath?{recordingSessionPath:r.recordingSessionPath}:{}}),e}function aut(r){const e={groupByFrame:r.groupByFrame??!1,expandSignals:r.expandSignals??!1,bufferSize:r.bufferSize,sortOrder:r.sortOrder??"newest-first"};return{type:"trace",...r.frames.length>0?{content:{frames:r.frames}}:{},settings:e,grid:oL(r.grid)}}function sut(r,e={},i){const{includeVideoPanels:n=!1,name:t}=e,o={schema:_7,panels:[]};t&&t.trim()&&(o.name=t.trim()),i!==void 0&&i!==Ast.chartWidthSeconds&&(o.chartWidthSeconds=i);for(const a of r){if(a.type==="video"&&!n)continue;const s=eut(a);s&&o.panels.push(s)}return o}function lut(r,e){switch(r.type){case"timeseries":return uut(r,e);case"gauge":return cut(r,e);case"map":return dut(r,e);case"frameDistribution":return fut(r);case"video":return hut(r);case"trace":return put(r,e);default:return null}}function uut(r,e){var o,a,s,l,u;const i=[],n=[];for(const c of((o=r.content)==null?void 0:o.signals)??[]){const d=aH(c,e.availableSignals);d?i.push(d):(n.push(c),e.warnings.push(`Signal not found: ${sH(c)}`))}const t=s1e({id:crypto.randomUUID(),type:"timeseries",grid:r.grid??{...nL.timeseries}});return{...t,signals:i,useSuggestedMinMax:((a=r.settings)==null?void 0:a.useSuggestedMinMax)??t.useSuggestedMinMax,syncCharts:((s=r.settings)==null?void 0:s.syncChart)??t.syncCharts,chartWidthSeconds:((l=r.settings)==null?void 0:l.chartWidthSeconds)||t.chartWidthSeconds,maxFps:((u=r.settings)==null?void 0:u.maxFps)??t.maxFps,unresolvedSignals:n.length>0?n:void 0}}function cut(r,e){var o,a;const i=[],n=[];for(const s of((o=r.content)==null?void 0:o.signals)??[]){const l=aH(s,e.availableSignals);l?i.push(l):(n.push(s),e.warnings.push(`Signal not found: ${sH(s)}`))}const t=c1e({id:crypto.randomUUID(),type:"gauge",grid:r.grid??{...nL.gauge}});return{...t,signals:i,heightConfig:((a=r.settings)==null?void 0:a.height)??t.heightConfig,unresolvedSignals:n.length>0?n:void 0}}function dut(r,e){var s,l,u,c;let i,n;const t={};(l=(s=r.content)==null?void 0:s.signals)!=null&&l.latitude&&(i=aH(r.content.signals.latitude,e.availableSignals),i||(t.latitude=r.content.signals.latitude,e.warnings.push(`Latitude signal not found: ${sH(r.content.signals.latitude)}`))),(c=(u=r.content)==null?void 0:u.signals)!=null&&c.longitude&&(n=aH(r.content.signals.longitude,e.availableSignals),n||(t.longitude=r.content.signals.longitude,e.warnings.push(`Longitude signal not found: ${sH(r.content.signals.longitude)}`)));const o=t.latitude||t.longitude;return{...l1e({id:crypto.randomUUID(),type:"map",grid:r.grid??{...nL.map}}),signals:{latitude:i,longitude:n},unresolvedSignals:o?t:void 0}}function fut(r,e){var n;return{...d1e({id:crypto.randomUUID(),type:"frame-distribution",grid:r.grid??{...nL.frameDistribution}}),selectedNamespace:(n=r.content)==null?void 0:n.namespace}}function hut(r,e){var n,t,o;return{...u1e({id:crypto.randomUUID(),type:"video",grid:r.grid??{...nL.video}}),videoFilePath:(n=r.content)==null?void 0:n.videoFilePath,recordingSessionPath:(t=r.content)==null?void 0:t.recordingSessionPath,videoName:(o=r.content)==null?void 0:o.videoName}}function put(r,e){var o,a,s,l,u;const i=[],n=[];for(const c of((o=r.content)==null?void 0:o.frames)??[])Jlt(c,e.availableFrames)?i.push(c):(n.push(c),e.warnings.push(`Frame not found: ${Qlt(c)}`));const t=a1e({id:crypto.randomUUID(),type:"trace",grid:r.grid??{...nL.trace}});return{...t,frames:i,bufferSize:((a=r.settings)==null?void 0:a.bufferSize)??t.bufferSize,sortOrder:((s=r.settings)==null?void 0:s.sortOrder)??t.sortOrder,groupByFrame:((l=r.settings)==null?void 0:l.groupByFrame)??t.groupByFrame,expandSignals:((u=r.settings)==null?void 0:u.expandSignals)??t.expandSignals,unresolvedFrames:n.length>0?n:void 0}}function gut(r,e,i){const n=[];let t;try{t=JSON.parse(r)}catch(d){return{success:!1,warnings:[],error:`Invalid JSON: ${d instanceof Error?d.message:"Parse error"}`}}let o;try{o=Dst(t)}catch(d){return{success:!1,warnings:[],error:d instanceof Error?d.message:"Migration failed"}}const a=Zlt(o);if(!a.valid)return{success:!1,warnings:[],error:"Schema validation failed",errors:a.errors||[]};a.warnings&&n.push(...a.warnings);const s=Rst(o);if(s.length>0)return{success:!1,warnings:[],error:`Invalid layout: ${s.join(", ")}`};const l=Mst(),u={availableSignals:e,availableFrames:i,warnings:n},c=[];for(const d of o.panels){if(!l.includes(d.type)){n.push(`Unknown panel type: ${d.type} (skipped)`);continue}const f=lut(d,u);f&&c.push(f)}return{success:!0,config:o,panels:c,chartWidthSeconds:o.chartWidthSeconds,warnings:n}}function Y1e(r){return JSON.stringify(r,null,2)}function vut(r){return Y1e(r)}function yut(r){const e={schema:_7,name:r.trim(),panels:[]};return Y1e(e)}function mut(){const{theme:r,setTheme:e}=TM();return R.jsx(R.Fragment,{children:R.jsxs("div",{className:"relative",children:[R.jsxs("select",{value:r,onChange:i=>e(i.target.value),className:"appearance-none pl-3 pr-10 py-2 rounded-md border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-ring cursor-pointer",children:[R.jsx("option",{value:_R.System,children:"System"}),R.jsx("option",{value:_R.Light,children:"Light"}),R.jsx("option",{value:_R.Dark,children:"Dark"})]}),R.jsx(pH,{className:"absolute right-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground pointer-events-none"})]})})}function M$(r){return R.jsxs("div",{className:"flex items-center justify-between p-4",children:[R.jsxs("div",{children:[R.jsx("p",{className:"font-medium text-card-foreground",children:r.label}),R.jsx("p",{className:"text-sm text-muted-foreground",children:r.description})]}),r.children]})}function jve(r){return R.jsxs("section",{children:[R.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[R.jsx("div",{className:"p-2 rounded-lg bg-muted",children:R.jsx(Fr,{type:r.iconType,className:"w-5 h-5 text-muted-foreground"})}),R.jsxs("div",{children:[R.jsx("h2",{className:"text-lg font-semibold text-foreground",children:r.title}),R.jsx("p",{className:"text-sm text-muted-foreground",children:r.description})]})]}),R.jsx("div",{className:"rounded-2xl border border-border bg-card divide-y divide-border",children:r.children})]})}function but(r){return R.jsx("input",{type:"text",value:r.value,onChange:e=>r.onChange(e.target.value),placeholder:r.placeholder,className:"w-64 px-3 py-1.5 text-sm rounded-sm border border-border bg-background text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary disabled:opacity-50 disabled:cursor-not-allowed",disabled:r.disabled})}const Sut={route:fc.SETTINGS,title:"Settings",contextId:ps.SETTINGS,icon:Vi.CONTEXT_SETTINGS,component:_ut};function $1e(){const{connectedBroker:r,disconnectBroker:e}=xU(),{environment:i}=Dg(),[n,t]=G.useState(i.brokerUrl);return R.jsxs(M$,{label:"RemotiveBroker URL",description:"The URL of the RemotiveBroker to connect to",children:[R.jsx(but,{value:n,onChange:t,placeholder:"E.g. http://localhost:12345",disabled:!0}),Qme]})}function _ut(){const{environment:r,updateEnvironment:e,updatePreferences:i,preferences:n}=Dg(),[t,o]=G.useState(r.studioBackendUrl),a=()=>R.jsx(jve,{iconType:sr.SYSTEM_SERVER,title:"Connections",description:"Configure server connections",children:R.jsx($1e,{})}),s=()=>R.jsxs(jve,{iconType:sr.THEME_PALETTE,title:"Preferences",description:"Adjust how RemotiveStudio looks and behaves.",children:[R.jsx(M$,{label:"Theme",description:"Select a color theme",children:R.jsx(mut,{})}),R.jsx(M$,{label:"Hidden files",description:"Show hidden files in the file browser",children:R.jsx(n1e,{defaultChecked:n.showHiddenFiles,onChange:l=>i({showHiddenFiles:l})})})]});return R.jsxs(rb,{children:[R.jsx(YS,{title:"Settings",description:"Customize your RemotiveStudio experience"}),R.jsx(ib,{children:R.jsxs("div",{className:"space-y-8",children:[a(),s(),Qme]})})]})}function Put(r){const e=Grt(),i=r.filePath;if(!e.broker)return R.jsxs(R.Fragment,{children:[R.jsx($1e,{}),R.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center text-muted-foreground",children:[R.jsx(Fr,{type:sr.STATUS_LOADING,className:"w-8 h-8 animate-spin mb-3"}),R.jsx("p",{className:"text-sm",children:"Unable to connect to broker"}),R.jsx("p",{className:"text-xs text-muted-foreground",children:"Trying to connect..."})]})]});const n=!!r.filePath;return R.jsx(Eot,{children:R.jsx(Cut,{filePath:i,isFilesRoute:n})})}const Bve=r=>{var e;return r&&((e=r.split("/").pop())==null?void 0:e.replace(".dashboard.json",""))||""};function Cut(r){const e=kX(),i=G.useRef(null),n=G.useCallback(()=>{var D;(D=i.current)==null||D.compact()},[]),t=s_(),o=Yrt(),a=pz(),{refreshFileTree:s}=Lq(),l=UF(),[u,c]=G.useState(30),[d,f]=G.useState(!1),{files:h}=bEe(),[p,g]=G.useState(Bve(r.filePath||"")),[v,y]=G.useState(!1),m=G.useRef(null),b=G.useRef(crypto.randomUUID());G.useEffect(()=>{const D=new BroadcastChannel("remotive-studio");m.current=D;const j=b.current;return D.onmessage=N=>{const{type:V,id:W}=N.data;W!==j&&(V==="announce"&&(y(!0),D.postMessage({type:"announce-ack",id:j})),V==="announce-ack"&&y(!0),V==="ping"&&D.postMessage({type:"pong",id:j}))},D.postMessage({type:"announce",id:j}),()=>{m.current=null,D.close()}},[]),G.useEffect(()=>{if(!v)return;let D=!1;const j=m.current;if(!j)return;const N=j.onmessage;j.onmessage=W=>{N==null||N.call(j,W);const{type:K,id:H}=W.data;K==="pong"&&H!==b.current&&(D=!0)};const V=setInterval(()=>{D=!1,j.postMessage({type:"ping",id:b.current}),setTimeout(()=>{D||y(!1)},1e3)},3e3);return()=>{clearInterval(V),j.onmessage=N}},[v]);const{tabId:S}=jOe(),{setHasUnsavedChanges:_}=Pq();G.useEffect(()=>{_(S,t.isDirty)},[S,t.isDirty,_]);const C=t.panels.length>0;G.useEffect(()=>{(()=>{console.log("Setting up frontend license"),new Hze(e.grpcUrl).setupFrontendLicense("auZC0a9O/aNgCfBUyVEsyFHTD15184gp2I5cMZjSUT0e2JvEdUHZ2FvQIp8IzCyBK9cRFdViZ+at2eIpePirYQyDwwNQid1G5Kn+m9F/9ll2mRjXsky4EU8gAxgr9g4sF0HKbupsLeaEutxOIEF0gv0Y4h+OqHHl+m9KuYv0rQuxON7cYUznEuNfuZ62v/No4hBpzcSDAzjHgOGLKyfFJQzfL/rvz1lnbdyZ5+iiZCjbjgClpu6vxXdl2R764iiUXQA0UbIdDqzoxxJB/yH3lVdCrMqJii/MnEBiq6bD2nM0DYVb0Sfj3MbgruM7jCAaEPEvBrW+Ef5Le5Kr1ywjdulHtWefacP2hwuPcjrxerAr5yua3RWmL6NktiqvP6NACM3dcoYWR3+mhMA9wLYFqb7IUDceR4N/OfdN0zPTPOj+ixB5vmMTfHdZyutYetDaKJjZ6kSTzvwFo7+/e4P17f3+gr3PFw8/2W0MHAEucg9hmdLAfp6RUxSW/E7HzEWhrApnGfLWQRVOcXwJ7+I+AOiluFTRQcGs6ybAAwmZLQGJvWGihbbA3FMKGANsQqE1BnFpEocj/rl/h4r+eRhBaCqWM8L53D4nV4A41LM3wxKjlzIylsyTTSotvPIZYvKOaMyC+Iu+rityQ2H1kRcOLyYW6YabWxL/R0cj7/xWvdRQ2gvmamtRtrEB8U84dRkyWPYA2A/RcOazYAEJc5M=",void 0)})()},[e]);const T=G.useRef(!1),x=G.useRef(null);G.useEffect(()=>{if(!r.filePath||T.current||x.current===r.filePath)return;(async()=>{T.current=!0;try{const j=await l.getFileContent(r.filePath),N=gut(j,o,a);if(N.success&&N.panels){if(t.replaceAll(N.panels),N.chartWidthSeconds!==void 0&&c(N.chartWidthSeconds),N.warnings.length>0){const V=R.jsx("div",{children:R.jsx("p",{className:"font-medium mb-1",children:"Dashboard loaded with warnings"})});Gn.warning(V,{autoClose:5e3}),console.log("warnings",N.warnings)}}else if(N.errors&&N.errors.length>0){const V=R.jsxs("div",{children:[R.jsxs("p",{className:"font-medium mb-1",children:[N.error||"Schema validation failed",":"]}),R.jsxs("ul",{className:"text-xs space-y-0.5 list-disc list-inside max-h-[300px] overflow-y-auto",children:[N.errors.slice(0,10).map((W,K)=>R.jsx("li",{className:"break-words",children:W},K)),N.errors.length>10&&R.jsxs("li",{children:["...and ",N.errors.length-10," more"]})]})]});Gn.error(V,{autoClose:!1})}else Gn.error(N.error||"Failed to load dashboard",{autoClose:!1});x.current=r.filePath}catch(j){console.error("Error loading dashboard from file:",j),Gn.error(j instanceof Error?j.message:"Failed to load dashboard",{autoClose:!1}),x.current=r.filePath}finally{T.current=!1}})()},[r.filePath,l,t,o,a]);const A=D=>{D==="gauge-row"?t.addPanel("gauge"):D==="signal-timeseries"?t.addPanel("timeseries"):D==="trace"?t.addPanel("trace"):D==="frame-distribution"?t.addPanel("frame-distribution"):D==="map"?t.addPanel("map"):D==="video"?t.addPanel("video"):D==="recording"&&f(!0)},w=G.useCallback(D=>{const j=sut(t.panels,{includeVideoPanels:!0,name:D||void 0},u),N=vut(j),V=D.startsWith("/")?D:`/dashboards/${D}.dashboard.json`;l.uploadAsFile(V,N).then(()=>{g(Bve(V)),t.markClean(),s()}).catch(W=>{console.error("Error saving dashboard:",W.message),Gn.error("Error saving dashboard")})},[l,t,u,s]),L=[{id:"panels",header:"Charts",defaultExpanded:!0,items:[{id:"signal-timeseries",label:"Timeseries",icon:R.jsx(Fr,{type:sr.DATA_TIMESERIES,className:"w-3.5 h-3.5"})},{id:"trace",label:"Trace",icon:R.jsx(Fr,{type:sr.DATA_TRACE,className:"w-3.5 h-3.5"})},{id:"map",label:"Map",icon:R.jsx(Fr,{type:sr.TOPOLOGY_ENDPOINT,className:"w-3.5 h-3.5"})},{id:"frame-distribution",label:"Frame distribution",icon:R.jsx(Fr,{type:sr.CONTEXT_DASHBOARD,className:"w-3.5 h-3.5"})}]},{id:"recording",header:"Recordings",defaultExpanded:!0,items:[{id:"recording",disabled:h.length===0,label:"Open recording",icon:R.jsx(Fr,{type:sr.FOLDER_OPEN,className:"w-3.5 h-3.5"})},{id:"video",label:"Video",disabled:h.length===0,icon:R.jsx(Fr,{type:sr.FILE_VIDEO,className:"w-3.5 h-3.5"})}]}],k=()=>R.jsx(R.Fragment,{children:R.jsxs("div",{className:Nr("flex flex-col items-center justify-center text-center","flex-1"),children:[R.jsx("div",{className:"p-4 rounded-xl bg-muted mb-4",children:R.jsx(Fr,{type:sr.CONTEXT_DASHBOARD,className:"w-8 h-8 text-muted-foreground"})}),R.jsxs("div",{className:"flex flex-col items-center justify-center mb-4",children:[R.jsx("p",{className:"text-foreground text-sm m-0",children:"Ready to start visualizing data?"}),R.jsxs("p",{className:"text-muted-foreground text-xs m-0",children:["Click the ",R.jsx("span",{className:"font-bold",children:"+ Add Panel"})," button in the top right corner to get started."]})]})]})});return R.jsxs(R.Fragment,{children:[v&&R.jsx("div",{className:"flex items-center justify-between gap-2 px-3 py-2 text-warning-foreground text-xs bg-amber-50 dark:bg-amber-500/30 rounded-sm",children:R.jsxs("span",{className:"flex items-center gap-2",children:[R.jsx(Fr,{type:sr.STATUS_WARNING,className:"w-4 h-4 inline text-orange-500 dark:text-orange-400"}),"A dashboard is open in another browser tab. Running dashboards in multiple tabs simultaneously may cause unexpected behavior."]})}),R.jsx("div",{className:"m-1",children:R.jsxs("div",{className:"flex flex-row w-full items-center justify-between",children:[R.jsxs("div",{className:"flex flex-row gap-1",children:[R.jsx(Uc,{icon:sr.PANEL_SHRINK,label:"Compact",type:Qo.SECONDARY,size:Vl.SM,onClick:()=>n()}),R.jsx(Uc,{disabled:!t.isDirty,icon:sr.ACTION_SAVE,label:"Save",type:Qo.SECONDARY,size:Vl.SM,onClick:()=>{w(p)}})]}),R.jsx("div",{className:"flex flex-row gap-1",children:R.jsxs(zq,{children:[R.jsx(Wq,{asChild:!0,children:R.jsxs("button",{type:"button",className:Nr(Q$,Yye[Vl.SM],eq[Qo.PRIMARY],!C&&"ring-1 ring-primary/50 shadow-md shadow-primary/20","data-[state=open]:[&_.add-panel-chevron]:rotate-180"),children:[R.jsx(Fr,{type:sr.ACTION_ADD,className:"w-3 h-3"}),"Add Panel",R.jsx(Fr,{type:sr.NAV_CHEVRON_DOWN,className:"add-panel-chevron w-3 h-3 transition-transform"})]})}),R.jsx(XV,{children:R.jsx(Gq,{align:"end",sideOffset:4,className:Nr("z-[9999] min-w-[200px]","bg-popover border border-border","rounded-md shadow-xl p-1","animate-in fade-in-0 zoom-in-95"),children:L.map(D=>R.jsxs(wbe,{children:[R.jsx(Obe,{className:"px-2 py-1 text-[10px] font-semibold text-muted-foreground uppercase tracking-wider bg-muted/50 rounded-sm",children:D.header}),D.items.map(j=>R.jsxs(E1,{disabled:j.disabled,onSelect:()=>A(j.id),className:Nr("flex items-center gap-2 w-full px-2 py-1.5","text-xs text-popover-foreground outline-none","rounded-sm cursor-pointer transition-colors","data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground","data-[disabled]:opacity-50 data-[disabled]:pointer-events-none"),children:[j.icon,R.jsx("span",{children:j.label})]},j.id))]},D.id))})})]})})]})}),R.jsx("div",{className:"p-0 min-h-0 flex-1 flex flex-col",children:R.jsx(SKe,{children:R.jsxs("div",{className:Nr("flex flex-col min-h-0 flex-1",!C&&"min-h-[calc(100vh-14rem)]"),children:[R.jsx(_Ke,{productAnalyticsTracker:{track:()=>{}},showFileTreeModal:d,setShowFileTreeModal:f}),R.jsx("div",{className:"flex-1 min-h-0 flex flex-col",children:C?R.jsx(Est,{ref:i}):k()})]})})})]})}const Tut={container:"Containers",behavioral_model:"Behavioral Models",ecu:"ECUs",channel:"Channels",endpoint:"Endpoints",socket:"Sockets",service_instance:"Service Instances",ecu_channel:"ECU Channels"},E7=Symbol.for("yaml.alias"),L$=Symbol.for("yaml.document"),kS=Symbol.for("yaml.map"),q1e=Symbol.for("yaml.pair"),Qv=Symbol.for("yaml.scalar"),aL=Symbol.for("yaml.seq"),xp=Symbol.for("yaml.node.type"),lO=r=>!!r&&typeof r=="object"&&r[xp]===E7,Tz=r=>!!r&&typeof r=="object"&&r[xp]===L$,Tj=r=>!!r&&typeof r=="object"&&r[xp]===kS,gl=r=>!!r&&typeof r=="object"&&r[xp]===q1e,Va=r=>!!r&&typeof r=="object"&&r[xp]===Qv,xj=r=>!!r&&typeof r=="object"&&r[xp]===aL;function fl(r){if(r&&typeof r=="object")switch(r[xp]){case kS:case aL:return!0}return!1}function pl(r){if(r&&typeof r=="object")switch(r[xp]){case E7:case kS:case Qv:case aL:return!0}return!1}const X1e=r=>(Va(r)||fl(r))&&!!r.anchor,Vw=Symbol("break visit"),xut=Symbol("skip children"),RN=Symbol("remove node");function sL(r,e){const i=Eut(e);Tz(r)?gR(null,r.contents,i,Object.freeze([r]))===RN&&(r.contents=null):gR(null,r,i,Object.freeze([]))}sL.BREAK=Vw;sL.SKIP=xut;sL.REMOVE=RN;function gR(r,e,i,n){const t=Aut(r,e,i,n);if(pl(t)||gl(t))return wut(r,n,t),gR(r,t,i,n);if(typeof t!="symbol"){if(fl(e)){n=Object.freeze(n.concat(e));for(let o=0;o<e.items.length;++o){const a=gR(o,e.items[o],i,n);if(typeof a=="number")o=a-1;else{if(a===Vw)return Vw;a===RN&&(e.items.splice(o,1),o-=1)}}}else if(gl(e)){n=Object.freeze(n.concat(e));const o=gR("key",e.key,i,n);if(o===Vw)return Vw;o===RN&&(e.key=null);const a=gR("value",e.value,i,n);if(a===Vw)return Vw;a===RN&&(e.value=null)}}return t}function Eut(r){return typeof r=="object"&&(r.Collection||r.Node||r.Value)?Object.assign({Alias:r.Node,Map:r.Node,Scalar:r.Node,Seq:r.Node},r.Value&&{Map:r.Value,Scalar:r.Value,Seq:r.Value},r.Collection&&{Map:r.Collection,Seq:r.Collection},r):r}function Aut(r,e,i,n){var t,o,a,s,l;if(typeof i=="function")return i(r,e,n);if(Tj(e))return(t=i.Map)==null?void 0:t.call(i,r,e,n);if(xj(e))return(o=i.Seq)==null?void 0:o.call(i,r,e,n);if(gl(e))return(a=i.Pair)==null?void 0:a.call(i,r,e,n);if(Va(e))return(s=i.Scalar)==null?void 0:s.call(i,r,e,n);if(lO(e))return(l=i.Alias)==null?void 0:l.call(i,r,e,n)}function wut(r,e,i){const n=e[e.length-1];if(fl(n))n.items[r]=i;else if(gl(n))r==="key"?n.key=i:n.value=i;else if(Tz(n))n.contents=i;else{const t=lO(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${t} parent`)}}const Out={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Dut=r=>r.replace(/[!,[\]{}]/g,e=>Out[e]);class Rd{constructor(e,i){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Rd.defaultYaml,e),this.tags=Object.assign({},Rd.defaultTags,i)}clone(){const e=new Rd(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new Rd(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Rd.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Rd.defaultTags);break}return e}add(e,i){this.atNextDocument&&(this.yaml={explicit:Rd.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Rd.defaultTags),this.atNextDocument=!1);const n=e.trim().split(/[ \t]+/),t=n.shift();switch(t){case"%TAG":{if(n.length!==2&&(i(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;const[o,a]=n;return this.tags[o]=a,!0}case"%YAML":{if(this.yaml.explicit=!0,n.length!==1)return i(0,"%YAML directive should contain exactly one part"),!1;const[o]=n;if(o==="1.1"||o==="1.2")return this.yaml.version=o,!0;{const a=/^\d+\.\d+$/.test(o);return i(6,`Unsupported YAML version ${o}`,a),!1}}default:return i(0,`Unknown directive ${t}`,!0),!1}}tagName(e,i){if(e==="!")return"!";if(e[0]!=="!")return i(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const a=e.slice(2,-1);return a==="!"||a==="!!"?(i(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&i("Verbatim tags must end with a >"),a)}const[,n,t]=e.match(/^(.*!)([^!]*)$/s);t||i(`The ${e} tag has no suffix`);const o=this.tags[n];if(o)try{return o+decodeURIComponent(t)}catch(a){return i(String(a)),null}return n==="!"?e:(i(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[i,n]of Object.entries(this.tags))if(e.startsWith(n))return i+Dut(e.substring(n.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const i=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags);let t;if(e&&n.length>0&&pl(e.contents)){const o={};sL(e.contents,(a,s)=>{pl(s)&&s.tag&&(o[s.tag]=!0)}),t=Object.keys(o)}else t=[];for(const[o,a]of n)o==="!!"&&a==="tag:yaml.org,2002:"||(!e||t.some(s=>s.startsWith(a)))&&i.push(`%TAG ${o} ${a}`);return i.join(`
`)}}Rd.defaultYaml={explicit:!1,version:"1.2"};Rd.defaultTags={"!!":"tag:yaml.org,2002:"};function K1e(r){if(/[\x00-\x19\s,[\]{}]/.test(r)){const i=`Anchor must not contain whitespace or control characters: ${JSON.stringify(r)}`;throw new Error(i)}return!0}function Z1e(r){const e=new Set;return sL(r,{Value(i,n){n.anchor&&e.add(n.anchor)}}),e}function J1e(r,e){for(let i=1;;++i){const n=`${r}${i}`;if(!e.has(n))return n}}function Rut(r,e){const i=[],n=new Map;let t=null;return{onAnchor:o=>{i.push(o),t??(t=Z1e(r));const a=J1e(e,t);return t.add(a),a},setAnchors:()=>{for(const o of i){const a=n.get(o);if(typeof a=="object"&&a.anchor&&(Va(a.node)||fl(a.node)))a.node.anchor=a.anchor;else{const s=new Error("Failed to resolve repeated object (this should not happen)");throw s.source=o,s}}},sourceObjects:n}}function vR(r,e,i,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let t=0,o=n.length;t<o;++t){const a=n[t],s=vR(r,n,String(t),a);s===void 0?delete n[t]:s!==a&&(n[t]=s)}else if(n instanceof Map)for(const t of Array.from(n.keys())){const o=n.get(t),a=vR(r,n,t,o);a===void 0?n.delete(t):a!==o&&n.set(t,a)}else if(n instanceof Set)for(const t of Array.from(n)){const o=vR(r,n,t,t);o===void 0?n.delete(t):o!==t&&(n.delete(t),n.add(o))}else for(const[t,o]of Object.entries(n)){const a=vR(r,n,t,o);a===void 0?delete n[t]:a!==o&&(n[t]=a)}return r.call(e,i,n)}function Cp(r,e,i){if(Array.isArray(r))return r.map((n,t)=>Cp(n,String(t),i));if(r&&typeof r.toJSON=="function"){if(!i||!X1e(r))return r.toJSON(e,i);const n={aliasCount:0,count:1,res:void 0};i.anchors.set(r,n),i.onCreate=o=>{n.res=o,delete i.onCreate};const t=r.toJSON(e,i);return i.onCreate&&i.onCreate(t),t}return typeof r=="bigint"&&!(i!=null&&i.keep)?Number(r):r}class A7{constructor(e){Object.defineProperty(this,xp,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:i,maxAliasCount:n,onAnchor:t,reviver:o}={}){if(!Tz(e))throw new TypeError("A document argument is required");const a={anchors:new Map,doc:e,keep:!0,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},s=Cp(this,"",a);if(typeof t=="function")for(const{count:l,res:u}of a.anchors.values())t(u,l);return typeof o=="function"?vR(o,{"":s},"",s):s}}class w7 extends A7{constructor(e){super(E7),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,i){let n;i!=null&&i.aliasResolveCache?n=i.aliasResolveCache:(n=[],sL(e,{Node:(o,a)=>{(lO(a)||X1e(a))&&n.push(a)}}),i&&(i.aliasResolveCache=n));let t;for(const o of n){if(o===this)break;o.anchor===this.source&&(t=o)}return t}toJSON(e,i){if(!i)return{source:this.source};const{anchors:n,doc:t,maxAliasCount:o}=i,a=this.resolve(t,i);if(!a){const l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let s=n.get(a);if(s||(Cp(a,null,i),s=n.get(a)),(s==null?void 0:s.res)===void 0){const l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(o>=0&&(s.count+=1,s.aliasCount===0&&(s.aliasCount=EV(t,a,n)),s.count*s.aliasCount>o)){const l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return s.res}toString(e,i,n){const t=`*${this.source}`;if(e){if(K1e(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const o=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(o)}if(e.implicitKey)return`${t} `}return t}}function EV(r,e,i){if(lO(e)){const n=e.resolve(r),t=i&&n&&i.get(n);return t?t.count*t.aliasCount:0}else if(fl(e)){let n=0;for(const t of e.items){const o=EV(r,t,i);o>n&&(n=o)}return n}else if(gl(e)){const n=EV(r,e.key,i),t=EV(r,e.value,i);return Math.max(n,t)}return 1}const Q1e=r=>!r||typeof r!="function"&&typeof r!="object";class Pn extends A7{constructor(e){super(Qv),this.value=e}toJSON(e,i){return i!=null&&i.keep?this.value:Cp(this.value,e,i)}toString(){return String(this.value)}}Pn.BLOCK_FOLDED="BLOCK_FOLDED";Pn.BLOCK_LITERAL="BLOCK_LITERAL";Pn.PLAIN="PLAIN";Pn.QUOTE_DOUBLE="QUOTE_DOUBLE";Pn.QUOTE_SINGLE="QUOTE_SINGLE";const Mut="tag:yaml.org,2002:";function Lut(r,e,i){if(e){const n=i.filter(o=>o.tag===e),t=n.find(o=>!o.format)??n[0];if(!t)throw new Error(`Tag ${e} not found`);return t}return i.find(n=>{var t;return((t=n.identify)==null?void 0:t.call(n,r))&&!n.format})}function EF(r,e,i){var d,f,h;if(Tz(r)&&(r=r.contents),pl(r))return r;if(gl(r)){const p=(f=(d=i.schema[kS]).createNode)==null?void 0:f.call(d,i.schema,null,i);return p.items.push(r),p}(r instanceof String||r instanceof Number||r instanceof Boolean||typeof BigInt<"u"&&r instanceof BigInt)&&(r=r.valueOf());const{aliasDuplicateObjects:n,onAnchor:t,onTagObj:o,schema:a,sourceObjects:s}=i;let l;if(n&&r&&typeof r=="object"){if(l=s.get(r),l)return l.anchor??(l.anchor=t(r)),new w7(l.anchor);l={anchor:null,node:null},s.set(r,l)}e!=null&&e.startsWith("!!")&&(e=Mut+e.slice(2));let u=Lut(r,e,a.tags);if(!u){if(r&&typeof r.toJSON=="function"&&(r=r.toJSON()),!r||typeof r!="object"){const p=new Pn(r);return l&&(l.node=p),p}u=r instanceof Map?a[kS]:Symbol.iterator in Object(r)?a[aL]:a[kS]}o&&(o(u),delete i.onTagObj);const c=u!=null&&u.createNode?u.createNode(i.schema,r,i):typeof((h=u==null?void 0:u.nodeClass)==null?void 0:h.from)=="function"?u.nodeClass.from(i.schema,r,i):new Pn(r);return e?c.tag=e:u.default||(c.tag=u.tag),l&&(l.node=c),c}function lH(r,e,i){let n=i;for(let t=e.length-1;t>=0;--t){const o=e[t];if(typeof o=="number"&&Number.isInteger(o)&&o>=0){const a=[];a[o]=n,n=a}else n=new Map([[o,n]])}return EF(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:r,sourceObjects:new Map})}const pN=r=>r==null||typeof r=="object"&&!!r[Symbol.iterator]().next().done;class eOe extends A7{constructor(e,i){super(e),Object.defineProperty(this,"schema",{value:i,configurable:!0,enumerable:!1,writable:!0})}clone(e){const i=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(i.schema=e),i.items=i.items.map(n=>pl(n)||gl(n)?n.clone(e):n),this.range&&(i.range=this.range.slice()),i}addIn(e,i){if(pN(e))this.add(i);else{const[n,...t]=e,o=this.get(n,!0);if(fl(o))o.addIn(t,i);else if(o===void 0&&this.schema)this.set(n,lH(this.schema,t,i));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${t}`)}}deleteIn(e){const[i,...n]=e;if(n.length===0)return this.delete(i);const t=this.get(i,!0);if(fl(t))return t.deleteIn(n);throw new Error(`Expected YAML collection at ${i}. Remaining path: ${n}`)}getIn(e,i){const[n,...t]=e,o=this.get(n,!0);return t.length===0?!i&&Va(o)?o.value:o:fl(o)?o.getIn(t,i):void 0}hasAllNullValues(e){return this.items.every(i=>{if(!gl(i))return!1;const n=i.value;return n==null||e&&Va(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){const[i,...n]=e;if(n.length===0)return this.has(i);const t=this.get(i,!0);return fl(t)?t.hasIn(n):!1}setIn(e,i){const[n,...t]=e;if(t.length===0)this.set(n,i);else{const o=this.get(n,!0);if(fl(o))o.setIn(t,i);else if(o===void 0&&this.schema)this.set(n,lH(this.schema,t,i));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${t}`)}}}const kut=r=>r.replace(/^(?!$)(?: $)?/gm,"#");function V0(r,e){return/^\n+$/.test(r)?r.substring(1):e?r.replace(/^(?! *$)/gm,e):r}const Zw=(r,e,i)=>r.endsWith(`
`)?V0(i,e):i.includes(`
`)?`
`+V0(i,e):(r.endsWith(" ")?"":" ")+i,tOe="flow",k$="block",AV="quoted";function xz(r,e,i="flow",{indentAtStart:n,lineWidth:t=80,minContentWidth:o=20,onFold:a,onOverflow:s}={}){if(!t||t<0)return r;t<o&&(o=0);const l=Math.max(1+o,1+t-e.length);if(r.length<=l)return r;const u=[],c={};let d=t-e.length;typeof n=="number"&&(n>t-Math.max(2,o)?u.push(0):d=t-n);let f,h,p=!1,g=-1,v=-1,y=-1;i===k$&&(g=Vve(r,g,e.length),g!==-1&&(d=g+l));for(let b;b=r[g+=1];){if(i===AV&&b==="\\"){switch(v=g,r[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}y=g}if(b===`
`)i===k$&&(g=Vve(r,g,e.length)),d=g+e.length+l,f=void 0;else{if(b===" "&&h&&h!==" "&&h!==`
`&&h!=="	"){const S=r[g+1];S&&S!==" "&&S!==`
`&&S!=="	"&&(f=g)}if(g>=d)if(f)u.push(f),d=f+l,f=void 0;else if(i===AV){for(;h===" "||h==="	";)h=b,b=r[g+=1],p=!0;const S=g>y+1?g-2:v-1;if(c[S])return r;u.push(S),c[S]=!0,d=S+l,f=void 0}else p=!0}h=b}if(p&&s&&s(),u.length===0)return r;a&&a();let m=r.slice(0,u[0]);for(let b=0;b<u.length;++b){const S=u[b],_=u[b+1]||r.length;S===0?m=`
${e}${r.slice(0,_)}`:(i===AV&&c[S]&&(m+=`${r[S]}\\`),m+=`
${e}${r.slice(S+1,_)}`)}return m}function Vve(r,e,i){let n=e,t=e+1,o=r[t];for(;o===" "||o==="	";)if(e<t+i)o=r[++e];else{do o=r[++e];while(o&&o!==`
`);n=e,t=e+1,o=r[t]}return n}const Ez=(r,e)=>({indentAtStart:e?r.indent.length:r.indentAtStart,lineWidth:r.options.lineWidth,minContentWidth:r.options.minContentWidth}),Az=r=>/^(%|---|\.\.\.)/m.test(r);function Iut(r,e,i){if(!e||e<0)return!1;const n=e-i,t=r.length;if(t<=n)return!1;for(let o=0,a=0;o<t;++o)if(r[o]===`
`){if(o-a>n)return!0;if(a=o+1,t-a<=n)return!1}return!0}function MN(r,e){const i=JSON.stringify(r);if(e.options.doubleQuotedAsJSON)return i;const{implicitKey:n}=e,t=e.options.doubleQuotedMinMultiLineLength,o=e.indent||(Az(r)?"  ":"");let a="",s=0;for(let l=0,u=i[l];u;u=i[++l])if(u===" "&&i[l+1]==="\\"&&i[l+2]==="n"&&(a+=i.slice(s,l)+"\\ ",l+=1,s=l,u="\\"),u==="\\")switch(i[l+1]){case"u":{a+=i.slice(s,l);const c=i.substr(l+2,4);switch(c){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:c.substr(0,2)==="00"?a+="\\x"+c.substr(2):a+=i.substr(l,6)}l+=5,s=l+1}break;case"n":if(n||i[l+2]==='"'||i.length<t)l+=1;else{for(a+=i.slice(s,l)+`

`;i[l+2]==="\\"&&i[l+3]==="n"&&i[l+4]!=='"';)a+=`
`,l+=2;a+=o,i[l+2]===" "&&(a+="\\"),l+=1,s=l+1}break;default:l+=1}return a=s?a+i.slice(s):i,n?a:xz(a,o,AV,Ez(e,!1))}function I$(r,e){if(e.options.singleQuote===!1||e.implicitKey&&r.includes(`
`)||/[ \t]\n|\n[ \t]/.test(r))return MN(r,e);const i=e.indent||(Az(r)?"  ":""),n="'"+r.replace(/'/g,"''").replace(/\n+/g,`$&
${i}`)+"'";return e.implicitKey?n:xz(n,i,tOe,Ez(e,!1))}function yR(r,e){const{singleQuote:i}=e.options;let n;if(i===!1)n=MN;else{const t=r.includes('"'),o=r.includes("'");t&&!o?n=I$:o&&!t?n=MN:n=i?I$:MN}return n(r,e)}let N$;try{N$=new RegExp(`(^|(?<!
))
+(?!
|$)`,"g")}catch{N$=/\n+(?!\n|$)/g}function wV({comment:r,type:e,value:i},n,t,o){const{blockQuote:a,commentString:s,lineWidth:l}=n.options;if(!a||/\n[\t ]+$/.test(i))return yR(i,n);const u=n.indent||(n.forceBlockIndent||Az(i)?"  ":""),c=a==="literal"?!0:a==="folded"||e===Pn.BLOCK_FOLDED?!1:e===Pn.BLOCK_LITERAL?!0:!Iut(i,l,u.length);if(!i)return c?`|
`:`>
`;let d,f;for(f=i.length;f>0;--f){const _=i[f-1];if(_!==`
`&&_!=="	"&&_!==" ")break}let h=i.substring(f);const p=h.indexOf(`
`);p===-1?d="-":i===h||p!==h.length-1?(d="+",o&&o()):d="",h&&(i=i.slice(0,-h.length),h[h.length-1]===`
`&&(h=h.slice(0,-1)),h=h.replace(N$,`$&${u}`));let g=!1,v,y=-1;for(v=0;v<i.length;++v){const _=i[v];if(_===" ")g=!0;else if(_===`
`)y=v;else break}let m=i.substring(0,y<v?y+1:v);m&&(i=i.substring(m.length),m=m.replace(/\n+/g,`$&${u}`));let S=(g?u?"2":"1":"")+d;if(r&&(S+=" "+s(r.replace(/ ?[\r\n]+/g," ")),t&&t()),!c){const _=i.replace(/\n+/g,`
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${u}`);let C=!1;const T=Ez(n,!0);a!=="folded"&&e!==Pn.BLOCK_FOLDED&&(T.onOverflow=()=>{C=!0});const x=xz(`${m}${_}${h}`,u,k$,T);if(!C)return`>${S}
${u}${x}`}return i=i.replace(/\n+/g,`$&${u}`),`|${S}
${u}${m}${i}${h}`}function Nut(r,e,i,n){const{type:t,value:o}=r,{actualString:a,implicitKey:s,indent:l,indentStep:u,inFlow:c}=e;if(s&&o.includes(`
`)||c&&/[[\]{},]/.test(o))return yR(o,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return s||c||!o.includes(`
`)?yR(o,e):wV(r,e,i,n);if(!s&&!c&&t!==Pn.PLAIN&&o.includes(`
`))return wV(r,e,i,n);if(Az(o)){if(l==="")return e.forceBlockIndent=!0,wV(r,e,i,n);if(s&&l===u)return yR(o,e)}const d=o.replace(/\n+/g,`$&
${l}`);if(a){const f=g=>{var v;return g.default&&g.tag!=="tag:yaml.org,2002:str"&&((v=g.test)==null?void 0:v.test(d))},{compat:h,tags:p}=e.doc.schema;if(p.some(f)||h!=null&&h.some(f))return yR(o,e)}return s?d:xz(d,l,tOe,Ez(e,!1))}function O7(r,e,i,n){const{implicitKey:t,inFlow:o}=e,a=typeof r.value=="string"?r:Object.assign({},r,{value:String(r.value)});let{type:s}=r;s!==Pn.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(a.value)&&(s=Pn.QUOTE_DOUBLE);const l=c=>{switch(c){case Pn.BLOCK_FOLDED:case Pn.BLOCK_LITERAL:return t||o?yR(a.value,e):wV(a,e,i,n);case Pn.QUOTE_DOUBLE:return MN(a.value,e);case Pn.QUOTE_SINGLE:return I$(a.value,e);case Pn.PLAIN:return Nut(a,e,i,n);default:return null}};let u=l(s);if(u===null){const{defaultKeyType:c,defaultStringType:d}=e.options,f=t&&c||d;if(u=l(f),u===null)throw new Error(`Unsupported default string type ${f}`)}return u}function rOe(r,e){const i=Object.assign({blockQuote:!0,commentString:kut,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},r.schema.toStringOptions,e);let n;switch(i.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:r,flowCollectionPadding:i.flowCollectionPadding?" ":"",indent:"",indentStep:typeof i.indent=="number"?" ".repeat(i.indent):"  ",inFlow:n,options:i}}function Fut(r,e){var t;if(e.tag){const o=r.filter(a=>a.tag===e.tag);if(o.length>0)return o.find(a=>a.format===e.format)??o[0]}let i,n;if(Va(e)){n=e.value;let o=r.filter(a=>{var s;return(s=a.identify)==null?void 0:s.call(a,n)});if(o.length>1){const a=o.filter(s=>s.test);a.length>0&&(o=a)}i=o.find(a=>a.format===e.format)??o.find(a=>!a.format)}else n=e,i=r.find(o=>o.nodeClass&&n instanceof o.nodeClass);if(!i){const o=((t=n==null?void 0:n.constructor)==null?void 0:t.name)??(n===null?"null":typeof n);throw new Error(`Tag not resolved for ${o} value`)}return i}function jut(r,e,{anchors:i,doc:n}){if(!n.directives)return"";const t=[],o=(Va(r)||fl(r))&&r.anchor;o&&K1e(o)&&(i.add(o),t.push(`&${o}`));const a=r.tag??(e.default?null:e.tag);return a&&t.push(n.directives.tagString(a)),t.join(" ")}function vM(r,e,i,n){var l;if(gl(r))return r.toString(e,i,n);if(lO(r)){if(e.doc.directives)return r.toString(e);if((l=e.resolvedAliases)!=null&&l.has(r))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(r):e.resolvedAliases=new Set([r]),r=r.resolve(e.doc)}let t;const o=pl(r)?r:e.doc.createNode(r,{onTagObj:u=>t=u});t??(t=Fut(e.doc.schema.tags,o));const a=jut(o,t,e);a.length>0&&(e.indentAtStart=(e.indentAtStart??0)+a.length+1);const s=typeof t.stringify=="function"?t.stringify(o,e,i,n):Va(o)?O7(o,e,i,n):o.toString(e,i,n);return a?Va(o)||s[0]==="{"||s[0]==="["?`${a} ${s}`:`${a}
${e.indent}${s}`:s}function But({key:r,value:e},i,n,t){const{allNullValues:o,doc:a,indent:s,indentStep:l,options:{commentString:u,indentSeq:c,simpleKeys:d}}=i;let f=pl(r)&&r.comment||null;if(d){if(f)throw new Error("With simple keys, key nodes cannot have comments");if(fl(r)||!pl(r)&&typeof r=="object"){const T="With simple keys, collection cannot be used as a key value";throw new Error(T)}}let h=!d&&(!r||f&&e==null&&!i.inFlow||fl(r)||(Va(r)?r.type===Pn.BLOCK_FOLDED||r.type===Pn.BLOCK_LITERAL:typeof r=="object"));i=Object.assign({},i,{allNullValues:!1,implicitKey:!h&&(d||!o),indent:s+l});let p=!1,g=!1,v=vM(r,i,()=>p=!0,()=>g=!0);if(!h&&!i.inFlow&&v.length>1024){if(d)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");h=!0}if(i.inFlow){if(o||e==null)return p&&n&&n(),v===""?"?":h?`? ${v}`:v}else if(o&&!d||e==null&&h)return v=`? ${v}`,f&&!p?v+=Zw(v,i.indent,u(f)):g&&t&&t(),v;p&&(f=null),h?(f&&(v+=Zw(v,i.indent,u(f))),v=`? ${v}
${s}:`):(v=`${v}:`,f&&(v+=Zw(v,i.indent,u(f))));let y,m,b;pl(e)?(y=!!e.spaceBefore,m=e.commentBefore,b=e.comment):(y=!1,m=null,b=null,e&&typeof e=="object"&&(e=a.createNode(e))),i.implicitKey=!1,!h&&!f&&Va(e)&&(i.indentAtStart=v.length+1),g=!1,!c&&l.length>=2&&!i.inFlow&&!h&&xj(e)&&!e.flow&&!e.tag&&!e.anchor&&(i.indent=i.indent.substring(2));let S=!1;const _=vM(e,i,()=>S=!0,()=>g=!0);let C=" ";if(f||y||m){if(C=y?`
`:"",m){const T=u(m);C+=`
${V0(T,i.indent)}`}_===""&&!i.inFlow?C===`
`&&b&&(C=`

`):C+=`
${i.indent}`}else if(!h&&fl(e)){const T=_[0],x=_.indexOf(`
`),A=x!==-1,w=i.inFlow??e.flow??e.items.length===0;if(A||!w){let L=!1;if(A&&(T==="&"||T==="!")){let k=_.indexOf(" ");T==="&"&&k!==-1&&k<x&&_[k+1]==="!"&&(k=_.indexOf(" ",k+1)),(k===-1||x<k)&&(L=!0)}L||(C=`
${i.indent}`)}}else(_===""||_[0]===`
`)&&(C="");return v+=C+_,i.inFlow?S&&n&&n():b&&!S?v+=Zw(v,i.indent,u(b)):g&&t&&t(),v}function iOe(r,e){(r==="debug"||r==="warn")&&console.warn(e)}const JB="<<",G0={identify:r=>r===JB||typeof r=="symbol"&&r.description===JB,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Pn(Symbol(JB)),{addToJSMap:nOe}),stringify:()=>JB},Vut=(r,e)=>(G0.identify(e)||Va(e)&&(!e.type||e.type===Pn.PLAIN)&&G0.identify(e.value))&&(r==null?void 0:r.doc.schema.tags.some(i=>i.tag===G0.tag&&i.default));function nOe(r,e,i){if(i=r&&lO(i)?i.resolve(r.doc):i,xj(i))for(const n of i.items)x6(r,e,n);else if(Array.isArray(i))for(const n of i)x6(r,e,n);else x6(r,e,i)}function x6(r,e,i){const n=r&&lO(i)?i.resolve(r.doc):i;if(!Tj(n))throw new Error("Merge sources must be maps or map aliases");const t=n.toJSON(null,r,Map);for(const[o,a]of t)e instanceof Map?e.has(o)||e.set(o,a):e instanceof Set?e.add(o):Object.prototype.hasOwnProperty.call(e,o)||Object.defineProperty(e,o,{value:a,writable:!0,enumerable:!0,configurable:!0});return e}function oOe(r,e,{key:i,value:n}){if(pl(i)&&i.addToJSMap)i.addToJSMap(r,e,n);else if(Vut(r,i))nOe(r,e,n);else{const t=Cp(i,"",r);if(e instanceof Map)e.set(t,Cp(n,t,r));else if(e instanceof Set)e.add(t);else{const o=Hut(i,t,r),a=Cp(n,o,r);o in e?Object.defineProperty(e,o,{value:a,writable:!0,enumerable:!0,configurable:!0}):e[o]=a}}return e}function Hut(r,e,i){if(e===null)return"";if(typeof e!="object")return String(e);if(pl(r)&&(i!=null&&i.doc)){const n=rOe(i.doc,{});n.anchors=new Set;for(const o of i.anchors.keys())n.anchors.add(o.anchor);n.inFlow=!0,n.inStringifyKey=!0;const t=r.toString(n);if(!i.mapKeyWarned){let o=JSON.stringify(t);o.length>40&&(o=o.substring(0,36)+'..."'),iOe(i.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${o}. Set mapAsMap: true to use object keys.`),i.mapKeyWarned=!0}return t}return JSON.stringify(e)}function D7(r,e,i){const n=EF(r,void 0,i),t=EF(e,void 0,i);return new Ud(n,t)}class Ud{constructor(e,i=null){Object.defineProperty(this,xp,{value:q1e}),this.key=e,this.value=i}clone(e){let{key:i,value:n}=this;return pl(i)&&(i=i.clone(e)),pl(n)&&(n=n.clone(e)),new Ud(i,n)}toJSON(e,i){const n=i!=null&&i.mapAsMap?new Map:{};return oOe(i,n,this)}toString(e,i,n){return e!=null&&e.doc?But(this,e,i,n):JSON.stringify(this)}}function aOe(r,e,i){return(e.inFlow??r.flow?zut:Uut)(r,e,i)}function Uut({comment:r,items:e},i,{blockItemPrefix:n,flowChars:t,itemIndent:o,onChompKeep:a,onComment:s}){const{indent:l,options:{commentString:u}}=i,c=Object.assign({},i,{indent:o,type:null});let d=!1;const f=[];for(let p=0;p<e.length;++p){const g=e[p];let v=null;if(pl(g))!d&&g.spaceBefore&&f.push(""),uH(i,f,g.commentBefore,d),g.comment&&(v=g.comment);else if(gl(g)){const m=pl(g.key)?g.key:null;m&&(!d&&m.spaceBefore&&f.push(""),uH(i,f,m.commentBefore,d))}d=!1;let y=vM(g,c,()=>v=null,()=>d=!0);v&&(y+=Zw(y,o,u(v))),d&&v&&(d=!1),f.push(n+y)}let h;if(f.length===0)h=t.start+t.end;else{h=f[0];for(let p=1;p<f.length;++p){const g=f[p];h+=g?`
${l}${g}`:`
`}}return r?(h+=`
`+V0(u(r),l),s&&s()):d&&a&&a(),h}function zut({items:r},e,{flowChars:i,itemIndent:n}){const{indent:t,indentStep:o,flowCollectionPadding:a,options:{commentString:s}}=e;n+=o;const l=Object.assign({},e,{indent:n,inFlow:!0,type:null});let u=!1,c=0;const d=[];for(let p=0;p<r.length;++p){const g=r[p];let v=null;if(pl(g))g.spaceBefore&&d.push(""),uH(e,d,g.commentBefore,!1),g.comment&&(v=g.comment);else if(gl(g)){const m=pl(g.key)?g.key:null;m&&(m.spaceBefore&&d.push(""),uH(e,d,m.commentBefore,!1),m.comment&&(u=!0));const b=pl(g.value)?g.value:null;b?(b.comment&&(v=b.comment),b.commentBefore&&(u=!0)):g.value==null&&(m!=null&&m.comment)&&(v=m.comment)}v&&(u=!0);let y=vM(g,l,()=>v=null);p<r.length-1&&(y+=","),v&&(y+=Zw(y,n,s(v))),!u&&(d.length>c||y.includes(`
`))&&(u=!0),d.push(y),c=d.length}const{start:f,end:h}=i;if(d.length===0)return f+h;if(!u){const p=d.reduce((g,v)=>g+v.length+2,2);u=e.options.lineWidth>0&&p>e.options.lineWidth}if(u){let p=f;for(const g of d)p+=g?`
${o}${t}${g}`:`
`;return`${p}
${t}${h}`}else return`${f}${a}${d.join(" ")}${a}${h}`}function uH({indent:r,options:{commentString:e}},i,n,t){if(n&&t&&(n=n.replace(/^\n+/,"")),n){const o=V0(e(n),r);i.push(o.trimStart())}}function Jw(r,e){const i=Va(e)?e.value:e;for(const n of r)if(gl(n)&&(n.key===e||n.key===i||Va(n.key)&&n.key.value===i))return n}class yp extends eOe{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(kS,e),this.items=[]}static from(e,i,n){const{keepUndefined:t,replacer:o}=n,a=new this(e),s=(l,u)=>{if(typeof o=="function")u=o.call(i,l,u);else if(Array.isArray(o)&&!o.includes(l))return;(u!==void 0||t)&&a.items.push(D7(l,u,n))};if(i instanceof Map)for(const[l,u]of i)s(l,u);else if(i&&typeof i=="object")for(const l of Object.keys(i))s(l,i[l]);return typeof e.sortMapEntries=="function"&&a.items.sort(e.sortMapEntries),a}add(e,i){var a;let n;gl(e)?n=e:!e||typeof e!="object"||!("key"in e)?n=new Ud(e,e==null?void 0:e.value):n=new Ud(e.key,e.value);const t=Jw(this.items,n.key),o=(a=this.schema)==null?void 0:a.sortMapEntries;if(t){if(!i)throw new Error(`Key ${n.key} already set`);Va(t.value)&&Q1e(n.value)?t.value.value=n.value:t.value=n.value}else if(o){const s=this.items.findIndex(l=>o(n,l)<0);s===-1?this.items.push(n):this.items.splice(s,0,n)}else this.items.push(n)}delete(e){const i=Jw(this.items,e);return i?this.items.splice(this.items.indexOf(i),1).length>0:!1}get(e,i){const n=Jw(this.items,e),t=n==null?void 0:n.value;return(!i&&Va(t)?t.value:t)??void 0}has(e){return!!Jw(this.items,e)}set(e,i){this.add(new Ud(e,i),!0)}toJSON(e,i,n){const t=n?new n:i!=null&&i.mapAsMap?new Map:{};i!=null&&i.onCreate&&i.onCreate(t);for(const o of this.items)oOe(i,t,o);return t}toString(e,i,n){if(!e)return JSON.stringify(this);for(const t of this.items)if(!gl(t))throw new Error(`Map items must all be pairs; found ${JSON.stringify(t)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),aOe(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:i})}}const lL={collection:"map",default:!0,nodeClass:yp,tag:"tag:yaml.org,2002:map",resolve(r,e){return Tj(r)||e("Expected a mapping for this tag"),r},createNode:(r,e,i)=>yp.from(r,e,i)};class M1 extends eOe{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(aL,e),this.items=[]}add(e){this.items.push(e)}delete(e){const i=QB(e);return typeof i!="number"?!1:this.items.splice(i,1).length>0}get(e,i){const n=QB(e);if(typeof n!="number")return;const t=this.items[n];return!i&&Va(t)?t.value:t}has(e){const i=QB(e);return typeof i=="number"&&i<this.items.length}set(e,i){const n=QB(e);if(typeof n!="number")throw new Error(`Expected a valid index, not ${e}.`);const t=this.items[n];Va(t)&&Q1e(i)?t.value=i:this.items[n]=i}toJSON(e,i){const n=[];i!=null&&i.onCreate&&i.onCreate(n);let t=0;for(const o of this.items)n.push(Cp(o,String(t++),i));return n}toString(e,i,n){return e?aOe(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+"  ",onChompKeep:n,onComment:i}):JSON.stringify(this)}static from(e,i,n){const{replacer:t}=n,o=new this(e);if(i&&Symbol.iterator in Object(i)){let a=0;for(let s of i){if(typeof t=="function"){const l=i instanceof Set?s:String(a++);s=t.call(i,l,s)}o.items.push(EF(s,void 0,n))}}return o}}function QB(r){let e=Va(r)?r.value:r;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}const uL={collection:"seq",default:!0,nodeClass:M1,tag:"tag:yaml.org,2002:seq",resolve(r,e){return xj(r)||e("Expected a sequence for this tag"),r},createNode:(r,e,i)=>M1.from(r,e,i)},wz={identify:r=>typeof r=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:r=>r,stringify(r,e,i,n){return e=Object.assign({actualString:!0},e),O7(r,e,i,n)}},Oz={identify:r=>r==null,createNode:()=>new Pn(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Pn(null),stringify:({source:r},e)=>typeof r=="string"&&Oz.test.test(r)?r:e.options.nullStr},R7={identify:r=>typeof r=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:r=>new Pn(r[0]==="t"||r[0]==="T"),stringify({source:r,value:e},i){if(r&&R7.test.test(r)){const n=r[0]==="t"||r[0]==="T";if(e===n)return r}return e?i.options.trueStr:i.options.falseStr}};function Ig({format:r,minFractionDigits:e,tag:i,value:n}){if(typeof n=="bigint")return String(n);const t=typeof n=="number"?n:Number(n);if(!isFinite(t))return isNaN(t)?".nan":t<0?"-.inf":".inf";let o=Object.is(n,-0)?"-0":JSON.stringify(n);if(!r&&e&&(!i||i==="tag:yaml.org,2002:float")&&/^\d/.test(o)){let a=o.indexOf(".");a<0&&(a=o.length,o+=".");let s=e-(o.length-a-1);for(;s-- >0;)o+="0"}return o}const sOe={identify:r=>typeof r=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:r=>r.slice(-3).toLowerCase()==="nan"?NaN:r[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Ig},lOe={identify:r=>typeof r=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:r=>parseFloat(r),stringify(r){const e=Number(r.value);return isFinite(e)?e.toExponential():Ig(r)}},uOe={identify:r=>typeof r=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(r){const e=new Pn(parseFloat(r)),i=r.indexOf(".");return i!==-1&&r[r.length-1]==="0"&&(e.minFractionDigits=r.length-i-1),e},stringify:Ig},Dz=r=>typeof r=="bigint"||Number.isInteger(r),M7=(r,e,i,{intAsBigInt:n})=>n?BigInt(r):parseInt(r.substring(e),i);function cOe(r,e,i){const{value:n}=r;return Dz(n)&&n>=0?i+n.toString(e):Ig(r)}const dOe={identify:r=>Dz(r)&&r>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(r,e,i)=>M7(r,2,8,i),stringify:r=>cOe(r,8,"0o")},fOe={identify:Dz,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(r,e,i)=>M7(r,0,10,i),stringify:Ig},hOe={identify:r=>Dz(r)&&r>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(r,e,i)=>M7(r,2,16,i),stringify:r=>cOe(r,16,"0x")},Wut=[lL,uL,wz,Oz,R7,dOe,fOe,hOe,sOe,lOe,uOe];function Hve(r){return typeof r=="bigint"||Number.isInteger(r)}const eV=({value:r})=>JSON.stringify(r),Gut=[{identify:r=>typeof r=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:r=>r,stringify:eV},{identify:r=>r==null,createNode:()=>new Pn(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:eV},{identify:r=>typeof r=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:r=>r==="true",stringify:eV},{identify:Hve,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(r,e,{intAsBigInt:i})=>i?BigInt(r):parseInt(r,10),stringify:({value:r})=>Hve(r)?r.toString():JSON.stringify(r)},{identify:r=>typeof r=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:r=>parseFloat(r),stringify:eV}],Yut={default:!0,tag:"",test:/^/,resolve(r,e){return e(`Unresolved plain scalar ${JSON.stringify(r)}`),r}},$ut=[lL,uL].concat(Gut,Yut),L7={identify:r=>r instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(r,e){if(typeof atob=="function"){const i=atob(r.replace(/[\n\r]/g,"")),n=new Uint8Array(i.length);for(let t=0;t<i.length;++t)n[t]=i.charCodeAt(t);return n}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),r},stringify({comment:r,type:e,value:i},n,t,o){if(!i)return"";const a=i;let s;if(typeof btoa=="function"){let l="";for(let u=0;u<a.length;++u)l+=String.fromCharCode(a[u]);s=btoa(l)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=Pn.BLOCK_LITERAL),e!==Pn.QUOTE_DOUBLE){const l=Math.max(n.options.lineWidth-n.indent.length,n.options.minContentWidth),u=Math.ceil(s.length/l),c=new Array(u);for(let d=0,f=0;d<u;++d,f+=l)c[d]=s.substr(f,l);s=c.join(e===Pn.BLOCK_LITERAL?`
`:" ")}return O7({comment:r,type:e,value:s},n,t,o)}};function pOe(r,e){if(xj(r))for(let i=0;i<r.items.length;++i){let n=r.items[i];if(!gl(n)){if(Tj(n)){n.items.length>1&&e("Each pair must have its own sequence indicator");const t=n.items[0]||new Ud(new Pn(null));if(n.commentBefore&&(t.key.commentBefore=t.key.commentBefore?`${n.commentBefore}
${t.key.commentBefore}`:n.commentBefore),n.comment){const o=t.value??t.key;o.comment=o.comment?`${n.comment}
${o.comment}`:n.comment}n=t}r.items[i]=gl(n)?n:new Ud(n)}}else e("Expected a sequence for this tag");return r}function gOe(r,e,i){const{replacer:n}=i,t=new M1(r);t.tag="tag:yaml.org,2002:pairs";let o=0;if(e&&Symbol.iterator in Object(e))for(let a of e){typeof n=="function"&&(a=n.call(e,String(o++),a));let s,l;if(Array.isArray(a))if(a.length===2)s=a[0],l=a[1];else throw new TypeError(`Expected [key, value] tuple: ${a}`);else if(a&&a instanceof Object){const u=Object.keys(a);if(u.length===1)s=u[0],l=a[s];else throw new TypeError(`Expected tuple with one key, not ${u.length} keys`)}else s=a;t.items.push(D7(s,l,i))}return t}const k7={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:pOe,createNode:gOe};class OR extends M1{constructor(){super(),this.add=yp.prototype.add.bind(this),this.delete=yp.prototype.delete.bind(this),this.get=yp.prototype.get.bind(this),this.has=yp.prototype.has.bind(this),this.set=yp.prototype.set.bind(this),this.tag=OR.tag}toJSON(e,i){if(!i)return super.toJSON(e);const n=new Map;i!=null&&i.onCreate&&i.onCreate(n);for(const t of this.items){let o,a;if(gl(t)?(o=Cp(t.key,"",i),a=Cp(t.value,o,i)):o=Cp(t,"",i),n.has(o))throw new Error("Ordered maps must not include duplicate keys");n.set(o,a)}return n}static from(e,i,n){const t=gOe(e,i,n),o=new this;return o.items=t.items,o}}OR.tag="tag:yaml.org,2002:omap";const I7={collection:"seq",identify:r=>r instanceof Map,nodeClass:OR,default:!1,tag:"tag:yaml.org,2002:omap",resolve(r,e){const i=pOe(r,e),n=[];for(const{key:t}of i.items)Va(t)&&(n.includes(t.value)?e(`Ordered maps must not include duplicate keys: ${t.value}`):n.push(t.value));return Object.assign(new OR,i)},createNode:(r,e,i)=>OR.from(r,e,i)};function vOe({value:r,source:e},i){return e&&(r?yOe:mOe).test.test(e)?e:r?i.options.trueStr:i.options.falseStr}const yOe={identify:r=>r===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Pn(!0),stringify:vOe},mOe={identify:r=>r===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Pn(!1),stringify:vOe},qut={identify:r=>typeof r=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:r=>r.slice(-3).toLowerCase()==="nan"?NaN:r[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Ig},Xut={identify:r=>typeof r=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:r=>parseFloat(r.replace(/_/g,"")),stringify(r){const e=Number(r.value);return isFinite(e)?e.toExponential():Ig(r)}},Kut={identify:r=>typeof r=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(r){const e=new Pn(parseFloat(r.replace(/_/g,""))),i=r.indexOf(".");if(i!==-1){const n=r.substring(i+1).replace(/_/g,"");n[n.length-1]==="0"&&(e.minFractionDigits=n.length)}return e},stringify:Ig},Ej=r=>typeof r=="bigint"||Number.isInteger(r);function Rz(r,e,i,{intAsBigInt:n}){const t=r[0];if((t==="-"||t==="+")&&(e+=1),r=r.substring(e).replace(/_/g,""),n){switch(i){case 2:r=`0b${r}`;break;case 8:r=`0o${r}`;break;case 16:r=`0x${r}`;break}const a=BigInt(r);return t==="-"?BigInt(-1)*a:a}const o=parseInt(r,i);return t==="-"?-1*o:o}function N7(r,e,i){const{value:n}=r;if(Ej(n)){const t=n.toString(e);return n<0?"-"+i+t.substr(1):i+t}return Ig(r)}const Zut={identify:Ej,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(r,e,i)=>Rz(r,2,2,i),stringify:r=>N7(r,2,"0b")},Jut={identify:Ej,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(r,e,i)=>Rz(r,1,8,i),stringify:r=>N7(r,8,"0")},Qut={identify:Ej,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(r,e,i)=>Rz(r,0,10,i),stringify:Ig},ect={identify:Ej,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(r,e,i)=>Rz(r,2,16,i),stringify:r=>N7(r,16,"0x")};class DR extends yp{constructor(e){super(e),this.tag=DR.tag}add(e){let i;gl(e)?i=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?i=new Ud(e.key,null):i=new Ud(e,null),Jw(this.items,i.key)||this.items.push(i)}get(e,i){const n=Jw(this.items,e);return!i&&gl(n)?Va(n.key)?n.key.value:n.key:n}set(e,i){if(typeof i!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof i}`);const n=Jw(this.items,e);n&&!i?this.items.splice(this.items.indexOf(n),1):!n&&i&&this.items.push(new Ud(e))}toJSON(e,i){return super.toJSON(e,i,Set)}toString(e,i,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),i,n);throw new Error("Set items must all have null values")}static from(e,i,n){const{replacer:t}=n,o=new this(e);if(i&&Symbol.iterator in Object(i))for(let a of i)typeof t=="function"&&(a=t.call(i,a,a)),o.items.push(D7(a,null,n));return o}}DR.tag="tag:yaml.org,2002:set";const F7={collection:"map",identify:r=>r instanceof Set,nodeClass:DR,default:!1,tag:"tag:yaml.org,2002:set",createNode:(r,e,i)=>DR.from(r,e,i),resolve(r,e){if(Tj(r)){if(r.hasAllNullValues(!0))return Object.assign(new DR,r);e("Set items must all have null values")}else e("Expected a mapping for this tag");return r}};function j7(r,e){const i=r[0],n=i==="-"||i==="+"?r.substring(1):r,t=a=>e?BigInt(a):Number(a),o=n.replace(/_/g,"").split(":").reduce((a,s)=>a*t(60)+t(s),t(0));return i==="-"?t(-1)*o:o}function bOe(r){let{value:e}=r,i=a=>a;if(typeof e=="bigint")i=a=>BigInt(a);else if(isNaN(e)||!isFinite(e))return Ig(r);let n="";e<0&&(n="-",e*=i(-1));const t=i(60),o=[e%t];return e<60?o.unshift(0):(e=(e-o[0])/t,o.unshift(e%t),e>=60&&(e=(e-o[0])/t,o.unshift(e))),n+o.map(a=>String(a).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const SOe={identify:r=>typeof r=="bigint"||Number.isInteger(r),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(r,e,{intAsBigInt:i})=>j7(r,i),stringify:bOe},_Oe={identify:r=>typeof r=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:r=>j7(r,!1),stringify:bOe},Mz={identify:r=>r instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(r){const e=r.match(Mz.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,i,n,t,o,a,s]=e.map(Number),l=e[7]?Number((e[7]+"00").substr(1,3)):0;let u=Date.UTC(i,n-1,t,o||0,a||0,s||0,l);const c=e[8];if(c&&c!=="Z"){let d=j7(c,!1);Math.abs(d)<30&&(d*=60),u-=6e4*d}return new Date(u)},stringify:({value:r})=>(r==null?void 0:r.toISOString().replace(/(T00:00:00)?\.000Z$/,""))??""},Uve=[lL,uL,wz,Oz,yOe,mOe,Zut,Jut,Qut,ect,qut,Xut,Kut,L7,G0,I7,k7,F7,SOe,_Oe,Mz],zve=new Map([["core",Wut],["failsafe",[lL,uL,wz]],["json",$ut],["yaml11",Uve],["yaml-1.1",Uve]]),Wve={binary:L7,bool:R7,float:uOe,floatExp:lOe,floatNaN:sOe,floatTime:_Oe,int:fOe,intHex:hOe,intOct:dOe,intTime:SOe,map:lL,merge:G0,null:Oz,omap:I7,pairs:k7,seq:uL,set:F7,timestamp:Mz},tct={"tag:yaml.org,2002:binary":L7,"tag:yaml.org,2002:merge":G0,"tag:yaml.org,2002:omap":I7,"tag:yaml.org,2002:pairs":k7,"tag:yaml.org,2002:set":F7,"tag:yaml.org,2002:timestamp":Mz};function E6(r,e,i){const n=zve.get(e);if(n&&!r)return i&&!n.includes(G0)?n.concat(G0):n.slice();let t=n;if(!t)if(Array.isArray(r))t=[];else{const o=Array.from(zve.keys()).filter(a=>a!=="yaml11").map(a=>JSON.stringify(a)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${o} or define customTags array`)}if(Array.isArray(r))for(const o of r)t=t.concat(o);else typeof r=="function"&&(t=r(t.slice()));return i&&(t=t.concat(G0)),t.reduce((o,a)=>{const s=typeof a=="string"?Wve[a]:a;if(!s){const l=JSON.stringify(a),u=Object.keys(Wve).map(c=>JSON.stringify(c)).join(", ");throw new Error(`Unknown custom tag ${l}; use one of ${u}`)}return o.includes(s)||o.push(s),o},[])}const rct=(r,e)=>r.key<e.key?-1:r.key>e.key?1:0;class B7{constructor({compat:e,customTags:i,merge:n,resolveKnownTags:t,schema:o,sortMapEntries:a,toStringDefaults:s}){this.compat=Array.isArray(e)?E6(e,"compat"):e?E6(null,e):null,this.name=typeof o=="string"&&o||"core",this.knownTags=t?tct:{},this.tags=E6(i,this.name,n),this.toStringOptions=s??null,Object.defineProperty(this,kS,{value:lL}),Object.defineProperty(this,Qv,{value:wz}),Object.defineProperty(this,aL,{value:uL}),this.sortMapEntries=typeof a=="function"?a:a===!0?rct:null}clone(){const e=Object.create(B7.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function ict(r,e){var l;const i=[];let n=e.directives===!0;if(e.directives!==!1&&r.directives){const u=r.directives.toString(r);u?(i.push(u),n=!0):r.directives.docStart&&(n=!0)}n&&i.push("---");const t=rOe(r,e),{commentString:o}=t.options;if(r.commentBefore){i.length!==1&&i.unshift("");const u=o(r.commentBefore);i.unshift(V0(u,""))}let a=!1,s=null;if(r.contents){if(pl(r.contents)){if(r.contents.spaceBefore&&n&&i.push(""),r.contents.commentBefore){const d=o(r.contents.commentBefore);i.push(V0(d,""))}t.forceBlockIndent=!!r.comment,s=r.contents.comment}const u=s?void 0:()=>a=!0;let c=vM(r.contents,t,()=>s=null,u);s&&(c+=Zw(c,"",o(s))),(c[0]==="|"||c[0]===">")&&i[i.length-1]==="---"?i[i.length-1]=`--- ${c}`:i.push(c)}else i.push(vM(r.contents,t));if((l=r.directives)!=null&&l.docEnd)if(r.comment){const u=o(r.comment);u.includes(`
`)?(i.push("..."),i.push(V0(u,""))):i.push(`... ${u}`)}else i.push("...");else{let u=r.comment;u&&a&&(u=u.replace(/^\n+/,"")),u&&((!a||s)&&i[i.length-1]!==""&&i.push(""),i.push(V0(o(u),"")))}return i.join(`
`)+`
`}class Lz{constructor(e,i,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,xp,{value:L$});let t=null;typeof i=="function"||Array.isArray(i)?t=i:n===void 0&&i&&(n=i,i=void 0);const o=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},n);this.options=o;let{version:a}=o;n!=null&&n._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new Rd({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,t,n)}clone(){const e=Object.create(Lz.prototype,{[xp]:{value:L$}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=pl(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){JD(this.contents)&&this.contents.add(e)}addIn(e,i){JD(this.contents)&&this.contents.addIn(e,i)}createAlias(e,i){if(!e.anchor){const n=Z1e(this);e.anchor=!i||n.has(i)?J1e(i||"a",n):i}return new w7(e.anchor)}createNode(e,i,n){let t;if(typeof i=="function")e=i.call({"":e},"",e),t=i;else if(Array.isArray(i)){const v=m=>typeof m=="number"||m instanceof String||m instanceof Number,y=i.filter(v).map(String);y.length>0&&(i=i.concat(y)),t=i}else n===void 0&&i&&(n=i,i=void 0);const{aliasDuplicateObjects:o,anchorPrefix:a,flow:s,keepUndefined:l,onTagObj:u,tag:c}=n??{},{onAnchor:d,setAnchors:f,sourceObjects:h}=Rut(this,a||"a"),p={aliasDuplicateObjects:o??!0,keepUndefined:l??!1,onAnchor:d,onTagObj:u,replacer:t,schema:this.schema,sourceObjects:h},g=EF(e,c,p);return s&&fl(g)&&(g.flow=!0),f(),g}createPair(e,i,n={}){const t=this.createNode(e,null,n),o=this.createNode(i,null,n);return new Ud(t,o)}delete(e){return JD(this.contents)?this.contents.delete(e):!1}deleteIn(e){return pN(e)?this.contents==null?!1:(this.contents=null,!0):JD(this.contents)?this.contents.deleteIn(e):!1}get(e,i){return fl(this.contents)?this.contents.get(e,i):void 0}getIn(e,i){return pN(e)?!i&&Va(this.contents)?this.contents.value:this.contents:fl(this.contents)?this.contents.getIn(e,i):void 0}has(e){return fl(this.contents)?this.contents.has(e):!1}hasIn(e){return pN(e)?this.contents!==void 0:fl(this.contents)?this.contents.hasIn(e):!1}set(e,i){this.contents==null?this.contents=lH(this.schema,[e],i):JD(this.contents)&&this.contents.set(e,i)}setIn(e,i){pN(e)?this.contents=i:this.contents==null?this.contents=lH(this.schema,Array.from(e),i):JD(this.contents)&&this.contents.setIn(e,i)}setSchema(e,i={}){typeof e=="number"&&(e=String(e));let n;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Rd({version:"1.1"}),n={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new Rd({version:e}),n={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{const t=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(i.schema instanceof Object)this.schema=i.schema;else if(n)this.schema=new B7(Object.assign(n,i));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:i,mapAsMap:n,maxAliasCount:t,onAnchor:o,reviver:a}={}){const s={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof t=="number"?t:100},l=Cp(this.contents,i??"",s);if(typeof o=="function")for(const{count:u,res:c}of s.anchors.values())o(c,u);return typeof a=="function"?vR(a,{"":l},"",l):l}toJSON(e,i){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:i})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const i=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${i}`)}return ict(this,e)}}function JD(r){if(fl(r))return!0;throw new Error("Expected a YAML collection as document contents")}class POe extends Error{constructor(e,i,n,t){super(),this.name=e,this.code=n,this.message=t,this.pos=i}}class gN extends POe{constructor(e,i,n){super("YAMLParseError",e,i,n)}}class nct extends POe{constructor(e,i,n){super("YAMLWarning",e,i,n)}}const Gve=(r,e)=>i=>{if(i.pos[0]===-1)return;i.linePos=i.pos.map(s=>e.linePos(s));const{line:n,col:t}=i.linePos[0];i.message+=` at line ${n}, column ${t}`;let o=t-1,a=r.substring(e.lineStarts[n-1],e.lineStarts[n]).replace(/[\n\r]+$/,"");if(o>=60&&a.length>80){const s=Math.min(o-39,a.length-79);a="…"+a.substring(s),o-=s-1}if(a.length>80&&(a=a.substring(0,79)+"…"),n>1&&/^ *$/.test(a.substring(0,o))){let s=r.substring(e.lineStarts[n-2],e.lineStarts[n-1]);s.length>80&&(s=s.substring(0,79)+`…
`),a=s+a}if(/[^ ]/.test(a)){let s=1;const l=i.linePos[1];(l==null?void 0:l.line)===n&&l.col>t&&(s=Math.max(1,Math.min(l.col-t,80-o)));const u=" ".repeat(o)+"^".repeat(s);i.message+=`:

${a}
${u}
`}};function yM(r,{flow:e,indicator:i,next:n,offset:t,onError:o,parentIndent:a,startOnNewline:s}){let l=!1,u=s,c=s,d="",f="",h=!1,p=!1,g=null,v=null,y=null,m=null,b=null,S=null,_=null;for(const x of r)switch(p&&(x.type!=="space"&&x.type!=="newline"&&x.type!=="comma"&&o(x.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),p=!1),g&&(u&&x.type!=="comment"&&x.type!=="newline"&&o(g,"TAB_AS_INDENT","Tabs are not allowed as indentation"),g=null),x.type){case"space":!e&&(i!=="doc-start"||(n==null?void 0:n.type)!=="flow-collection")&&x.source.includes("	")&&(g=x),c=!0;break;case"comment":{c||o(x,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const A=x.source.substring(1)||" ";d?d+=f+A:d=A,f="",u=!1;break}case"newline":u?d?d+=x.source:(!S||i!=="seq-item-ind")&&(l=!0):f+=x.source,u=!0,h=!0,(v||y)&&(m=x),c=!0;break;case"anchor":v&&o(x,"MULTIPLE_ANCHORS","A node can have at most one anchor"),x.source.endsWith(":")&&o(x.offset+x.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),v=x,_??(_=x.offset),u=!1,c=!1,p=!0;break;case"tag":{y&&o(x,"MULTIPLE_TAGS","A node can have at most one tag"),y=x,_??(_=x.offset),u=!1,c=!1,p=!0;break}case i:(v||y)&&o(x,"BAD_PROP_ORDER",`Anchors and tags must be after the ${x.source} indicator`),S&&o(x,"UNEXPECTED_TOKEN",`Unexpected ${x.source} in ${e??"collection"}`),S=x,u=i==="seq-item-ind"||i==="explicit-key-ind",c=!1;break;case"comma":if(e){b&&o(x,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),b=x,u=!1,c=!1;break}default:o(x,"UNEXPECTED_TOKEN",`Unexpected ${x.type} token`),u=!1,c=!1}const C=r[r.length-1],T=C?C.offset+C.source.length:t;return p&&n&&n.type!=="space"&&n.type!=="newline"&&n.type!=="comma"&&(n.type!=="scalar"||n.source!=="")&&o(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),g&&(u&&g.indent<=a||(n==null?void 0:n.type)==="block-map"||(n==null?void 0:n.type)==="block-seq")&&o(g,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:b,found:S,spaceBefore:l,comment:d,hasNewline:h,anchor:v,tag:y,newlineAfterProp:m,end:T,start:_??T}}function AF(r){if(!r)return null;switch(r.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(r.source.includes(`
`))return!0;if(r.end){for(const e of r.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of r.items){for(const i of e.start)if(i.type==="newline")return!0;if(e.sep){for(const i of e.sep)if(i.type==="newline")return!0}if(AF(e.key)||AF(e.value))return!0}return!1;default:return!0}}function F$(r,e,i){if((e==null?void 0:e.type)==="flow-collection"){const n=e.end[0];n.indent===r&&(n.source==="]"||n.source==="}")&&AF(e)&&i(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function COe(r,e,i){const{uniqueKeys:n}=r.options;if(n===!1)return!1;const t=typeof n=="function"?n:(o,a)=>o===a||Va(o)&&Va(a)&&o.value===a.value;return e.some(o=>t(o.key,i))}const Yve="All mapping items must start at the same column";function oct({composeNode:r,composeEmptyNode:e},i,n,t,o){var c;const a=(o==null?void 0:o.nodeClass)??yp,s=new a(i.schema);i.atRoot&&(i.atRoot=!1);let l=n.offset,u=null;for(const d of n.items){const{start:f,key:h,sep:p,value:g}=d,v=yM(f,{indicator:"explicit-key-ind",next:h??(p==null?void 0:p[0]),offset:l,onError:t,parentIndent:n.indent,startOnNewline:!0}),y=!v.found;if(y){if(h&&(h.type==="block-seq"?t(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in h&&h.indent!==n.indent&&t(l,"BAD_INDENT",Yve)),!v.anchor&&!v.tag&&!p){u=v.end,v.comment&&(s.comment?s.comment+=`
`+v.comment:s.comment=v.comment);continue}(v.newlineAfterProp||AF(h))&&t(h??f[f.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((c=v.found)==null?void 0:c.indent)!==n.indent&&t(l,"BAD_INDENT",Yve);i.atKey=!0;const m=v.end,b=h?r(i,h,v,t):e(i,m,f,null,v,t);i.schema.compat&&F$(n.indent,h,t),i.atKey=!1,COe(i,s.items,b)&&t(m,"DUPLICATE_KEY","Map keys must be unique");const S=yM(p??[],{indicator:"map-value-ind",next:g,offset:b.range[2],onError:t,parentIndent:n.indent,startOnNewline:!h||h.type==="block-scalar"});if(l=S.end,S.found){y&&((g==null?void 0:g.type)==="block-map"&&!S.hasNewline&&t(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),i.options.strict&&v.start<S.found.offset-1024&&t(b.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const _=g?r(i,g,S,t):e(i,l,p,null,S,t);i.schema.compat&&F$(n.indent,g,t),l=_.range[2];const C=new Ud(b,_);i.options.keepSourceTokens&&(C.srcToken=d),s.items.push(C)}else{y&&t(b.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),S.comment&&(b.comment?b.comment+=`
`+S.comment:b.comment=S.comment);const _=new Ud(b);i.options.keepSourceTokens&&(_.srcToken=d),s.items.push(_)}}return u&&u<l&&t(u,"IMPOSSIBLE","Map comment with trailing content"),s.range=[n.offset,l,u??l],s}function act({composeNode:r,composeEmptyNode:e},i,n,t,o){const a=(o==null?void 0:o.nodeClass)??M1,s=new a(i.schema);i.atRoot&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let l=n.offset,u=null;for(const{start:c,value:d}of n.items){const f=yM(c,{indicator:"seq-item-ind",next:d,offset:l,onError:t,parentIndent:n.indent,startOnNewline:!0});if(!f.found)if(f.anchor||f.tag||d)(d==null?void 0:d.type)==="block-seq"?t(f.end,"BAD_INDENT","All sequence items must start at the same column"):t(l,"MISSING_CHAR","Sequence item without - indicator");else{u=f.end,f.comment&&(s.comment=f.comment);continue}const h=d?r(i,d,f,t):e(i,f.end,c,null,f,t);i.schema.compat&&F$(n.indent,d,t),l=h.range[2],s.items.push(h)}return s.range=[n.offset,l,u??l],s}function Aj(r,e,i,n){let t="";if(r){let o=!1,a="";for(const s of r){const{source:l,type:u}=s;switch(u){case"space":o=!0;break;case"comment":{i&&!o&&n(s,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const c=l.substring(1)||" ";t?t+=a+c:t=c,a="";break}case"newline":t&&(a+=l),o=!0;break;default:n(s,"UNEXPECTED_TOKEN",`Unexpected ${u} at node end`)}e+=l.length}}return{comment:t,offset:e}}const A6="Block collections are not allowed within flow collections",w6=r=>r&&(r.type==="block-map"||r.type==="block-seq");function sct({composeNode:r,composeEmptyNode:e},i,n,t,o){var v;const a=n.start.source==="{",s=a?"flow map":"flow sequence",l=(o==null?void 0:o.nodeClass)??(a?yp:M1),u=new l(i.schema);u.flow=!0;const c=i.atRoot;c&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let d=n.offset+n.start.source.length;for(let y=0;y<n.items.length;++y){const m=n.items[y],{start:b,key:S,sep:_,value:C}=m,T=yM(b,{flow:s,indicator:"explicit-key-ind",next:S??(_==null?void 0:_[0]),offset:d,onError:t,parentIndent:n.indent,startOnNewline:!1});if(!T.found){if(!T.anchor&&!T.tag&&!_&&!C){y===0&&T.comma?t(T.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${s}`):y<n.items.length-1&&t(T.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${s}`),T.comment&&(u.comment?u.comment+=`
`+T.comment:u.comment=T.comment),d=T.end;continue}!a&&i.options.strict&&AF(S)&&t(S,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(y===0)T.comma&&t(T.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${s}`);else if(T.comma||t(T.start,"MISSING_CHAR",`Missing , between ${s} items`),T.comment){let x="";e:for(const A of b)switch(A.type){case"comma":case"space":break;case"comment":x=A.source.substring(1);break e;default:break e}if(x){let A=u.items[u.items.length-1];gl(A)&&(A=A.value??A.key),A.comment?A.comment+=`
`+x:A.comment=x,T.comment=T.comment.substring(x.length+1)}}if(!a&&!_&&!T.found){const x=C?r(i,C,T,t):e(i,T.end,_,null,T,t);u.items.push(x),d=x.range[2],w6(C)&&t(x.range,"BLOCK_IN_FLOW",A6)}else{i.atKey=!0;const x=T.end,A=S?r(i,S,T,t):e(i,x,b,null,T,t);w6(S)&&t(A.range,"BLOCK_IN_FLOW",A6),i.atKey=!1;const w=yM(_??[],{flow:s,indicator:"map-value-ind",next:C,offset:A.range[2],onError:t,parentIndent:n.indent,startOnNewline:!1});if(w.found){if(!a&&!T.found&&i.options.strict){if(_)for(const D of _){if(D===w.found)break;if(D.type==="newline"){t(D,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}T.start<w.found.offset-1024&&t(w.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else C&&("source"in C&&((v=C.source)==null?void 0:v[0])===":"?t(C,"MISSING_CHAR",`Missing space after : in ${s}`):t(w.start,"MISSING_CHAR",`Missing , or : between ${s} items`));const L=C?r(i,C,w,t):w.found?e(i,w.end,_,null,w,t):null;L?w6(C)&&t(L.range,"BLOCK_IN_FLOW",A6):w.comment&&(A.comment?A.comment+=`
`+w.comment:A.comment=w.comment);const k=new Ud(A,L);if(i.options.keepSourceTokens&&(k.srcToken=m),a){const D=u;COe(i,D.items,A)&&t(x,"DUPLICATE_KEY","Map keys must be unique"),D.items.push(k)}else{const D=new yp(i.schema);D.flow=!0,D.items.push(k);const j=(L??A).range;D.range=[A.range[0],j[1],j[2]],u.items.push(D)}d=L?L.range[2]:w.end}}const f=a?"}":"]",[h,...p]=n.end;let g=d;if((h==null?void 0:h.source)===f)g=h.offset+h.source.length;else{const y=s[0].toUpperCase()+s.substring(1),m=c?`${y} must end with a ${f}`:`${y} in block collection must be sufficiently indented and end with a ${f}`;t(d,c?"MISSING_CHAR":"BAD_INDENT",m),h&&h.source.length!==1&&p.unshift(h)}if(p.length>0){const y=Aj(p,g,i.options.strict,t);y.comment&&(u.comment?u.comment+=`
`+y.comment:u.comment=y.comment),u.range=[n.offset,g,y.offset]}else u.range=[n.offset,g,g];return u}function O6(r,e,i,n,t,o){const a=i.type==="block-map"?oct(r,e,i,n,o):i.type==="block-seq"?act(r,e,i,n,o):sct(r,e,i,n,o),s=a.constructor;return t==="!"||t===s.tagName?(a.tag=s.tagName,a):(t&&(a.tag=t),a)}function lct(r,e,i,n,t){var f;const o=n.tag,a=o?e.directives.tagName(o.source,h=>t(o,"TAG_RESOLVE_FAILED",h)):null;if(i.type==="block-seq"){const{anchor:h,newlineAfterProp:p}=n,g=h&&o?h.offset>o.offset?h:o:h??o;g&&(!p||p.offset<g.offset)&&t(g,"MISSING_CHAR","Missing newline after block sequence props")}const s=i.type==="block-map"?"map":i.type==="block-seq"?"seq":i.start.source==="{"?"map":"seq";if(!o||!a||a==="!"||a===yp.tagName&&s==="map"||a===M1.tagName&&s==="seq")return O6(r,e,i,t,a);let l=e.schema.tags.find(h=>h.tag===a&&h.collection===s);if(!l){const h=e.schema.knownTags[a];if((h==null?void 0:h.collection)===s)e.schema.tags.push(Object.assign({},h,{default:!1})),l=h;else return h?t(o,"BAD_COLLECTION_TYPE",`${h.tag} used for ${s} collection, but expects ${h.collection??"scalar"}`,!0):t(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${a}`,!0),O6(r,e,i,t,a)}const u=O6(r,e,i,t,a,l),c=((f=l.resolve)==null?void 0:f.call(l,u,h=>t(o,"TAG_RESOLVE_FAILED",h),e.options))??u,d=pl(c)?c:new Pn(c);return d.range=u.range,d.tag=a,l!=null&&l.format&&(d.format=l.format),d}function uct(r,e,i){const n=e.offset,t=cct(e,r.options.strict,i);if(!t)return{value:"",type:null,comment:"",range:[n,n,n]};const o=t.mode===">"?Pn.BLOCK_FOLDED:Pn.BLOCK_LITERAL,a=e.source?dct(e.source):[];let s=a.length;for(let g=a.length-1;g>=0;--g){const v=a[g][1];if(v===""||v==="\r")s=g;else break}if(s===0){const g=t.chomp==="+"&&a.length>0?`
`.repeat(Math.max(1,a.length-1)):"";let v=n+t.length;return e.source&&(v+=e.source.length),{value:g,type:o,comment:t.comment,range:[n,v,v]}}let l=e.indent+t.indent,u=e.offset+t.length,c=0;for(let g=0;g<s;++g){const[v,y]=a[g];if(y===""||y==="\r")t.indent===0&&v.length>l&&(l=v.length);else{v.length<l&&i(u+v.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),t.indent===0&&(l=v.length),c=g,l===0&&!r.atRoot&&i(u,"BAD_INDENT","Block scalar values in collections must be indented");break}u+=v.length+y.length+1}for(let g=a.length-1;g>=s;--g)a[g][0].length>l&&(s=g+1);let d="",f="",h=!1;for(let g=0;g<c;++g)d+=a[g][0].slice(l)+`
`;for(let g=c;g<s;++g){let[v,y]=a[g];u+=v.length+y.length+1;const m=y[y.length-1]==="\r";if(m&&(y=y.slice(0,-1)),y&&v.length<l){const S=`Block scalar lines must not be less indented than their ${t.indent?"explicit indentation indicator":"first line"}`;i(u-y.length-(m?2:1),"BAD_INDENT",S),v=""}o===Pn.BLOCK_LITERAL?(d+=f+v.slice(l)+y,f=`
`):v.length>l||y[0]==="	"?(f===" "?f=`
`:!h&&f===`
`&&(f=`

`),d+=f+v.slice(l)+y,f=`
`,h=!0):y===""?f===`
`?d+=`
`:f=`
`:(d+=f+y,f=" ",h=!1)}switch(t.chomp){case"-":break;case"+":for(let g=s;g<a.length;++g)d+=`
`+a[g][0].slice(l);d[d.length-1]!==`
`&&(d+=`
`);break;default:d+=`
`}const p=n+t.length+e.source.length;return{value:d,type:o,comment:t.comment,range:[n,p,p]}}function cct({offset:r,props:e},i,n){if(e[0].type!=="block-scalar-header")return n(e[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:t}=e[0],o=t[0];let a=0,s="",l=-1;for(let f=1;f<t.length;++f){const h=t[f];if(!s&&(h==="-"||h==="+"))s=h;else{const p=Number(h);!a&&p?a=p:l===-1&&(l=r+f)}}l!==-1&&n(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${t}`);let u=!1,c="",d=t.length;for(let f=1;f<e.length;++f){const h=e[f];switch(h.type){case"space":u=!0;case"newline":d+=h.source.length;break;case"comment":i&&!u&&n(h,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),d+=h.source.length,c=h.source.substring(1);break;case"error":n(h,"UNEXPECTED_TOKEN",h.message),d+=h.source.length;break;default:{const p=`Unexpected token in block scalar header: ${h.type}`;n(h,"UNEXPECTED_TOKEN",p);const g=h.source;g&&typeof g=="string"&&(d+=g.length)}}}return{mode:o,indent:a,chomp:s,comment:c,length:d}}function dct(r){const e=r.split(/\n( *)/),i=e[0],n=i.match(/^( *)/),o=[n!=null&&n[1]?[n[1],i.slice(n[1].length)]:["",i]];for(let a=1;a<e.length;a+=2)o.push([e[a],e[a+1]]);return o}function fct(r,e,i){const{offset:n,type:t,source:o,end:a}=r;let s,l;const u=(f,h,p)=>i(n+f,h,p);switch(t){case"scalar":s=Pn.PLAIN,l=hct(o,u);break;case"single-quoted-scalar":s=Pn.QUOTE_SINGLE,l=pct(o,u);break;case"double-quoted-scalar":s=Pn.QUOTE_DOUBLE,l=gct(o,u);break;default:return i(r,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${t}`),{value:"",type:null,comment:"",range:[n,n+o.length,n+o.length]}}const c=n+o.length,d=Aj(a,c,e,i);return{value:l,type:s,comment:d.comment,range:[n,c,d.offset]}}function hct(r,e){let i="";switch(r[0]){case"	":i="a tab character";break;case",":i="flow indicator character ,";break;case"%":i="directive indicator character %";break;case"|":case">":{i=`block scalar indicator ${r[0]}`;break}case"@":case"`":{i=`reserved character ${r[0]}`;break}}return i&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${i}`),TOe(r)}function pct(r,e){return(r[r.length-1]!=="'"||r.length===1)&&e(r.length,"MISSING_CHAR","Missing closing 'quote"),TOe(r.slice(1,-1)).replace(/''/g,"'")}function TOe(r){let e,i;try{e=new RegExp(`(.*?)(?<![ 	])[ 	]*\r?
`,"sy"),i=new RegExp(`[ 	]*(.*?)(?:(?<![ 	])[ 	]*)?\r?
`,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,i=/[ \t]*(.*?)[ \t]*\r?\n/sy}let n=e.exec(r);if(!n)return r;let t=n[1],o=" ",a=e.lastIndex;for(i.lastIndex=a;n=i.exec(r);)n[1]===""?o===`
`?t+=o:o=`
`:(t+=o+n[1],o=" "),a=i.lastIndex;const s=/[ \t]*(.*)/sy;return s.lastIndex=a,n=s.exec(r),t+o+((n==null?void 0:n[1])??"")}function gct(r,e){let i="";for(let n=1;n<r.length-1;++n){const t=r[n];if(!(t==="\r"&&r[n+1]===`
`))if(t===`
`){const{fold:o,offset:a}=vct(r,n);i+=o,n=a}else if(t==="\\"){let o=r[++n];const a=yct[o];if(a)i+=a;else if(o===`
`)for(o=r[n+1];o===" "||o==="	";)o=r[++n+1];else if(o==="\r"&&r[n+1]===`
`)for(o=r[++n+1];o===" "||o==="	";)o=r[++n+1];else if(o==="x"||o==="u"||o==="U"){const s={x:2,u:4,U:8}[o];i+=mct(r,n+1,s,e),n+=s}else{const s=r.substr(n-1,2);e(n-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${s}`),i+=s}}else if(t===" "||t==="	"){const o=n;let a=r[n+1];for(;a===" "||a==="	";)a=r[++n+1];a!==`
`&&!(a==="\r"&&r[n+2]===`
`)&&(i+=n>o?r.slice(o,n+1):t)}else i+=t}return(r[r.length-1]!=='"'||r.length===1)&&e(r.length,"MISSING_CHAR",'Missing closing "quote'),i}function vct(r,e){let i="",n=r[e+1];for(;(n===" "||n==="	"||n===`
`||n==="\r")&&!(n==="\r"&&r[e+2]!==`
`);)n===`
`&&(i+=`
`),e+=1,n=r[e+1];return i||(i=" "),{fold:i,offset:e}}const yct={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
`,r:"\r",t:"	",v:"\v",N:"",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","	":"	"};function mct(r,e,i,n){const t=r.substr(e,i),a=t.length===i&&/^[0-9a-fA-F]+$/.test(t)?parseInt(t,16):NaN;if(isNaN(a)){const s=r.substr(e-2,i+2);return n(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${s}`),s}return String.fromCodePoint(a)}function xOe(r,e,i,n){const{value:t,type:o,comment:a,range:s}=e.type==="block-scalar"?uct(r,e,n):fct(e,r.options.strict,n),l=i?r.directives.tagName(i.source,d=>n(i,"TAG_RESOLVE_FAILED",d)):null;let u;r.options.stringKeys&&r.atKey?u=r.schema[Qv]:l?u=bct(r.schema,t,l,i,n):e.type==="scalar"?u=Sct(r,t,e,n):u=r.schema[Qv];let c;try{const d=u.resolve(t,f=>n(i??e,"TAG_RESOLVE_FAILED",f),r.options);c=Va(d)?d:new Pn(d)}catch(d){const f=d instanceof Error?d.message:String(d);n(i??e,"TAG_RESOLVE_FAILED",f),c=new Pn(t)}return c.range=s,c.source=t,o&&(c.type=o),l&&(c.tag=l),u.format&&(c.format=u.format),a&&(c.comment=a),c}function bct(r,e,i,n,t){var s;if(i==="!")return r[Qv];const o=[];for(const l of r.tags)if(!l.collection&&l.tag===i)if(l.default&&l.test)o.push(l);else return l;for(const l of o)if((s=l.test)!=null&&s.test(e))return l;const a=r.knownTags[i];return a&&!a.collection?(r.tags.push(Object.assign({},a,{default:!1,test:void 0})),a):(t(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${i}`,i!=="tag:yaml.org,2002:str"),r[Qv])}function Sct({atKey:r,directives:e,schema:i},n,t,o){const a=i.tags.find(s=>{var l;return(s.default===!0||r&&s.default==="key")&&((l=s.test)==null?void 0:l.test(n))})||i[Qv];if(i.compat){const s=i.compat.find(l=>{var u;return l.default&&((u=l.test)==null?void 0:u.test(n))})??i[Qv];if(a.tag!==s.tag){const l=e.tagString(a.tag),u=e.tagString(s.tag),c=`Value may be parsed as either ${l} or ${u}`;o(t,"TAG_RESOLVE_FAILED",c,!0)}}return a}function _ct(r,e,i){if(e){i??(i=e.length);for(let n=i-1;n>=0;--n){let t=e[n];switch(t.type){case"space":case"comment":case"newline":r-=t.source.length;continue}for(t=e[++n];(t==null?void 0:t.type)==="space";)r+=t.source.length,t=e[++n];break}}return r}const Pct={composeNode:EOe,composeEmptyNode:V7};function EOe(r,e,i,n){const t=r.atKey,{spaceBefore:o,comment:a,anchor:s,tag:l}=i;let u,c=!0;switch(e.type){case"alias":u=Cct(r,e,n),(s||l)&&n(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":u=xOe(r,e,l,n),s&&(u.anchor=s.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":u=lct(Pct,r,e,i,n),s&&(u.anchor=s.source.substring(1));break;default:{const d=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;n(e,"UNEXPECTED_TOKEN",d),u=V7(r,e.offset,void 0,null,i,n),c=!1}}return s&&u.anchor===""&&n(s,"BAD_ALIAS","Anchor cannot be an empty string"),t&&r.options.stringKeys&&(!Va(u)||typeof u.value!="string"||u.tag&&u.tag!=="tag:yaml.org,2002:str")&&n(l??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),o&&(u.spaceBefore=!0),a&&(e.type==="scalar"&&e.source===""?u.comment=a:u.commentBefore=a),r.options.keepSourceTokens&&c&&(u.srcToken=e),u}function V7(r,e,i,n,{spaceBefore:t,comment:o,anchor:a,tag:s,end:l},u){const c={type:"scalar",offset:_ct(e,i,n),indent:-1,source:""},d=xOe(r,c,s,u);return a&&(d.anchor=a.source.substring(1),d.anchor===""&&u(a,"BAD_ALIAS","Anchor cannot be an empty string")),t&&(d.spaceBefore=!0),o&&(d.comment=o,d.range[2]=l),d}function Cct({options:r},{offset:e,source:i,end:n},t){const o=new w7(i.substring(1));o.source===""&&t(e,"BAD_ALIAS","Alias cannot be an empty string"),o.source.endsWith(":")&&t(e+i.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const a=e+i.length,s=Aj(n,a,r.strict,t);return o.range=[e,a,s.offset],s.comment&&(o.comment=s.comment),o}function Tct(r,e,{offset:i,start:n,value:t,end:o},a){const s=Object.assign({_directives:e},r),l=new Lz(void 0,s),u={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},c=yM(n,{indicator:"doc-start",next:t??(o==null?void 0:o[0]),offset:i,onError:a,parentIndent:0,startOnNewline:!0});c.found&&(l.directives.docStart=!0,t&&(t.type==="block-map"||t.type==="block-seq")&&!c.hasNewline&&a(c.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=t?EOe(u,t,c,a):V7(u,c.end,n,null,c,a);const d=l.contents.range[2],f=Aj(o,d,!1,a);return f.comment&&(l.comment=f.comment),l.range=[i,d,f.offset],l}function iN(r){if(typeof r=="number")return[r,r+1];if(Array.isArray(r))return r.length===2?r:[r[0],r[1]];const{offset:e,source:i}=r;return[e,e+(typeof i=="string"?i.length:1)]}function $ve(r){var t;let e="",i=!1,n=!1;for(let o=0;o<r.length;++o){const a=r[o];switch(a[0]){case"#":e+=(e===""?"":n?`

`:`
`)+(a.substring(1)||" "),i=!0,n=!1;break;case"%":((t=r[o+1])==null?void 0:t[0])!=="#"&&(o+=1),i=!1;break;default:i||(n=!0),i=!1}}return{comment:e,afterEmptyLine:n}}class xct{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(i,n,t,o)=>{const a=iN(i);o?this.warnings.push(new nct(a,n,t)):this.errors.push(new gN(a,n,t))},this.directives=new Rd({version:e.version||"1.2"}),this.options=e}decorate(e,i){const{comment:n,afterEmptyLine:t}=$ve(this.prelude);if(n){const o=e.contents;if(i)e.comment=e.comment?`${e.comment}
${n}`:n;else if(t||e.directives.docStart||!o)e.commentBefore=n;else if(fl(o)&&!o.flow&&o.items.length>0){let a=o.items[0];gl(a)&&(a=a.key);const s=a.commentBefore;a.commentBefore=s?`${n}
${s}`:n}else{const a=o.commentBefore;o.commentBefore=a?`${n}
${a}`:n}}i?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:$ve(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,i=!1,n=-1){for(const t of e)yield*this.next(t);yield*this.end(i,n)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(i,n,t)=>{const o=iN(e);o[0]+=i,this.onError(o,"BAD_DIRECTIVE",n,t)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const i=Tct(this.options,this.directives,e,this.onError);this.atDirectives&&!i.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(i,!1),this.doc&&(yield this.doc),this.doc=i,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const i=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new gN(iN(e),"UNEXPECTED_TOKEN",i);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){const n="Unexpected doc-end without preceding document";this.errors.push(new gN(iN(e),"UNEXPECTED_TOKEN",n));break}this.doc.directives.docEnd=!0;const i=Aj(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),i.comment){const n=this.doc.comment;this.doc.comment=n?`${n}
${i.comment}`:i.comment}this.doc.range[2]=i.offset;break}default:this.errors.push(new gN(iN(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,i=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const n=Object.assign({_directives:this.directives},this.options),t=new Lz(void 0,n);this.atDirectives&&this.onError(i,"MISSING_CHAR","Missing directives-end indicator line"),t.range=[0,i,i],this.decorate(t,!1),yield t}}}const AOe="\uFEFF",wOe="",OOe="",j$="";function Ect(r){switch(r){case AOe:return"byte-order-mark";case wOe:return"doc-mode";case OOe:return"flow-error-end";case j$:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
`:case`\r
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(r[0]){case" ":case"	":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function rg(r){switch(r){case void 0:case" ":case`
`:case"\r":case"	":return!0;default:return!1}}const qve=new Set("0123456789ABCDEFabcdef"),Act=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),tV=new Set(",[]{}"),wct=new Set(` ,[]{}
\r	`),D6=r=>!r||wct.has(r);class Oct{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,i=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!i;let n=this.next??"stream";for(;n&&(i||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,i=this.buffer[e];for(;i===" "||i==="	";)i=this.buffer[++e];return!i||i==="#"||i===`
`?!0:i==="\r"?this.buffer[e+1]===`
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let i=this.buffer[e];if(this.indentNext>0){let n=0;for(;i===" ";)i=this.buffer[++n+e];if(i==="\r"){const t=this.buffer[n+e+1];if(t===`
`||!t&&!this.atEnd)return e+n+1}return i===`
`||n>=this.indentNext||!i&&!this.atEnd?e+n:-1}if(i==="-"||i==="."){const n=this.buffer.substr(e,3);if((n==="---"||n==="...")&&rg(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===AOe&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let i=e.length,n=e.indexOf("#");for(;n!==-1;){const o=e[n-1];if(o===" "||o==="	"){i=n-1;break}else n=e.indexOf("#",n+1)}for(;;){const o=e[i-1];if(o===" "||o==="	")i-=1;else break}const t=(yield*this.pushCount(i))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-t),this.pushNewline(),"stream"}if(this.atLineEnd()){const i=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-i),yield*this.pushNewline(),"stream"}return yield wOe,yield*this.parseLineStart()}*parseLineStart(){const e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const i=this.peek(3);if((i==="---"||i==="...")&&rg(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,i==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!rg(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,i]=this.peek(2);if(!i&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&rg(i)){const n=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=n,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(e===null)return this.setNext("doc");let i=yield*this.pushIndicators();switch(e[i]){case"#":yield*this.pushCount(e.length-i);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(D6),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return i+=yield*this.parseBlockScalarHeader(),i+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-i),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,i,n=-1;do e=yield*this.pushNewline(),e>0?(i=yield*this.pushSpaces(!1),this.indentValue=n=i):i=0,i+=yield*this.pushSpaces(!0);while(e+i>0);const t=this.getLine();if(t===null)return this.setNext("flow");if((n!==-1&&n<this.indentNext&&t[0]!=="#"||n===0&&(t.startsWith("---")||t.startsWith("..."))&&rg(t[3]))&&!(n===this.indentNext-1&&this.flowLevel===1&&(t[0]==="]"||t[0]==="}")))return this.flowLevel=0,yield OOe,yield*this.parseLineStart();let o=0;for(;t[o]===",";)o+=yield*this.pushCount(1),o+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(o+=yield*this.pushIndicators(),t[o]){case void 0:return"flow";case"#":return yield*this.pushCount(t.length-o),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(D6),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const a=this.charAt(1);if(this.flowKey||rg(a)||a===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let i=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;i!==-1&&this.buffer[i+1]==="'";)i=this.buffer.indexOf("'",i+2);else for(;i!==-1;){let o=0;for(;this.buffer[i-1-o]==="\\";)o+=1;if(o%2===0)break;i=this.buffer.indexOf('"',i+1)}const n=this.buffer.substring(0,i);let t=n.indexOf(`
`,this.pos);if(t!==-1){for(;t!==-1;){const o=this.continueScalar(t+1);if(o===-1)break;t=n.indexOf(`
`,o)}t!==-1&&(i=t-(n[t-1]==="\r"?2:1))}if(i===-1){if(!this.atEnd)return this.setNext("quoted-scalar");i=this.buffer.length}return yield*this.pushToIndex(i+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){const i=this.buffer[++e];if(i==="+")this.blockScalarKeep=!0;else if(i>"0"&&i<="9")this.blockScalarIndent=Number(i)-1;else if(i!=="-")break}return yield*this.pushUntil(i=>rg(i)||i==="#")}*parseBlockScalar(){let e=this.pos-1,i=0,n;e:for(let o=this.pos;n=this.buffer[o];++o)switch(n){case" ":i+=1;break;case`
`:e=o,i=0;break;case"\r":{const a=this.buffer[o+1];if(!a&&!this.atEnd)return this.setNext("block-scalar");if(a===`
`)break}default:break e}if(!n&&!this.atEnd)return this.setNext("block-scalar");if(i>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=i:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const o=this.continueScalar(e+1);if(o===-1)break;e=this.buffer.indexOf(`
`,o)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let t=e+1;for(n=this.buffer[t];n===" ";)n=this.buffer[++t];if(n==="	"){for(;n==="	"||n===" "||n==="\r"||n===`
`;)n=this.buffer[++t];e=t-1}else if(!this.blockScalarKeep)do{let o=e-1,a=this.buffer[o];a==="\r"&&(a=this.buffer[--o]);const s=o;for(;a===" ";)a=this.buffer[--o];if(a===`
`&&o>=this.pos&&o+1+i>s)e=o;else break}while(!0);return yield j$,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let i=this.pos-1,n=this.pos-1,t;for(;t=this.buffer[++n];)if(t===":"){const o=this.buffer[n+1];if(rg(o)||e&&tV.has(o))break;i=n}else if(rg(t)){let o=this.buffer[n+1];if(t==="\r"&&(o===`
`?(n+=1,t=`
`,o=this.buffer[n+1]):i=n),o==="#"||e&&tV.has(o))break;if(t===`
`){const a=this.continueScalar(n+1);if(a===-1)break;n=Math.max(n,a-2)}}else{if(e&&tV.has(t))break;i=n}return!t&&!this.atEnd?this.setNext("plain-scalar"):(yield j$,yield*this.pushToIndex(i+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,i){const n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(i&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(D6))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,i=this.charAt(1);if(rg(i)||e&&tV.has(i))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,i=this.buffer[e];for(;!rg(i)&&i!==">";)i=this.buffer[++e];return yield*this.pushToIndex(i===">"?e+1:e,!1)}else{let e=this.pos+1,i=this.buffer[e];for(;i;)if(Act.has(i))i=this.buffer[++e];else if(i==="%"&&qve.has(this.buffer[e+1])&&qve.has(this.buffer[e+2]))i=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return e===`
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
`?yield*this.pushCount(2):0}*pushSpaces(e){let i=this.pos-1,n;do n=this.buffer[++i];while(n===" "||e&&n==="	");const t=i-this.pos;return t>0&&(yield this.buffer.substr(this.pos,t),this.pos=i),t}*pushUntil(e){let i=this.pos,n=this.buffer[i];for(;!e(n);)n=this.buffer[++i];return yield*this.pushToIndex(i,!1)}}class Dct{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let i=0,n=this.lineStarts.length;for(;i<n;){const o=i+n>>1;this.lineStarts[o]<e?i=o+1:n=o}if(this.lineStarts[i]===e)return{line:i+1,col:1};if(i===0)return{line:0,col:e};const t=this.lineStarts[i-1];return{line:i,col:e-t+1}}}}function hS(r,e){for(let i=0;i<r.length;++i)if(r[i].type===e)return!0;return!1}function Xve(r){for(let e=0;e<r.length;++e)switch(r[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function DOe(r){switch(r==null?void 0:r.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function rV(r){switch(r.type){case"document":return r.start;case"block-map":{const e=r.items[r.items.length-1];return e.sep??e.start}case"block-seq":return r.items[r.items.length-1].start;default:return[]}}function QD(r){var i;if(r.length===0)return[];let e=r.length;e:for(;--e>=0;)switch(r[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((i=r[++e])==null?void 0:i.type)==="space";);return r.splice(e,r.length)}function Kve(r){if(r.start.type==="flow-seq-start")for(const e of r.items)e.sep&&!e.value&&!hS(e.start,"explicit-key-ind")&&!hS(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,DOe(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}class Rct{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Oct,this.onNewLine=e}*parse(e,i=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const n of this.lexer.lex(e,i))yield*this.next(n);i||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}const i=Ect(e);if(i)if(i==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=i,yield*this.step(),i){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const n=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:n,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if(this.type==="doc-end"&&(e==null?void 0:e.type)!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){const i=e??this.stack.pop();if(!i)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield i;else{const n=this.peek(1);switch(i.type==="block-scalar"?i.indent="indent"in n?n.indent:0:i.type==="flow-collection"&&n.type==="document"&&(i.indent=0),i.type==="flow-collection"&&Kve(i),n.type){case"document":n.value=i;break;case"block-scalar":n.props.push(i);break;case"block-map":{const t=n.items[n.items.length-1];if(t.value){n.items.push({start:[],key:i,sep:[]}),this.onKeyLine=!0;return}else if(t.sep)t.value=i;else{Object.assign(t,{key:i,sep:[]}),this.onKeyLine=!t.explicitKey;return}break}case"block-seq":{const t=n.items[n.items.length-1];t.value?n.items.push({start:[],value:i}):t.value=i;break}case"flow-collection":{const t=n.items[n.items.length-1];!t||t.value?n.items.push({start:[],key:i,sep:[]}):t.sep?t.value=i:Object.assign(t,{key:i,sep:[]});return}default:yield*this.pop(),yield*this.pop(i)}if((n.type==="document"||n.type==="block-map"||n.type==="block-seq")&&(i.type==="block-map"||i.type==="block-seq")){const t=i.items[i.items.length-1];t&&!t.sep&&!t.value&&t.start.length>0&&Xve(t.start)===-1&&(i.indent===0||t.start.every(o=>o.type!=="comment"||o.indent<i.indent))&&(n.type==="document"?n.end=t.start:n.items.push({start:t.start}),i.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{Xve(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}const i=this.startBlockValue(e);i?this.stack.push(i):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){const i=rV(this.peek(2)),n=QD(i);let t;e.end?(t=e.end,t.push(this.sourceToken),delete e.end):t=[this.sourceToken];const o={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:t}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let i=this.source.indexOf(`
`)+1;for(;i!==0;)this.onNewLine(this.offset+i),i=this.source.indexOf(`
`,i)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){var n;const i=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,i.value){const t="end"in i.value?i.value.end:void 0,o=Array.isArray(t)?t[t.length-1]:void 0;(o==null?void 0:o.type)==="comment"?t==null||t.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else i.sep?i.sep.push(this.sourceToken):i.start.push(this.sourceToken);return;case"space":case"comment":if(i.value)e.items.push({start:[this.sourceToken]});else if(i.sep)i.sep.push(this.sourceToken);else{if(this.atIndentedComment(i.start,e.indent)){const t=e.items[e.items.length-2],o=(n=t==null?void 0:t.value)==null?void 0:n.end;if(Array.isArray(o)){Array.prototype.push.apply(o,i.start),o.push(this.sourceToken),e.items.pop();return}}i.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const t=!this.onKeyLine&&this.indent===e.indent,o=t&&(i.sep||i.explicitKey)&&this.type!=="seq-item-ind";let a=[];if(o&&i.sep&&!i.value){const s=[];for(let l=0;l<i.sep.length;++l){const u=i.sep[l];switch(u.type){case"newline":s.push(l);break;case"space":break;case"comment":u.indent>e.indent&&(s.length=0);break;default:s.length=0}}s.length>=2&&(a=i.sep.splice(s[1]))}switch(this.type){case"anchor":case"tag":o||i.value?(a.push(this.sourceToken),e.items.push({start:a}),this.onKeyLine=!0):i.sep?i.sep.push(this.sourceToken):i.start.push(this.sourceToken);return;case"explicit-key-ind":!i.sep&&!i.explicitKey?(i.start.push(this.sourceToken),i.explicitKey=!0):o||i.value?(a.push(this.sourceToken),e.items.push({start:a,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(i.explicitKey)if(i.sep)if(i.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(hS(i.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]});else if(DOe(i.key)&&!hS(i.sep,"newline")){const s=QD(i.start),l=i.key,u=i.sep;u.push(this.sourceToken),delete i.key,delete i.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:l,sep:u}]})}else a.length>0?i.sep=i.sep.concat(a,this.sourceToken):i.sep.push(this.sourceToken);else if(hS(i.start,"newline"))Object.assign(i,{key:null,sep:[this.sourceToken]});else{const s=QD(i.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]})}else i.sep?i.value||o?e.items.push({start:a,key:null,sep:[this.sourceToken]}):hS(i.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):i.sep.push(this.sourceToken):Object.assign(i,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const s=this.flowScalar(this.type);o||i.value?(e.items.push({start:a,key:s,sep:[]}),this.onKeyLine=!0):i.sep?this.stack.push(s):(Object.assign(i,{key:s,sep:[]}),this.onKeyLine=!0);return}default:{const s=this.startBlockValue(e);if(s){if(s.type==="block-seq"){if(!i.explicitKey&&i.sep&&!hS(i.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else t&&e.items.push({start:a});this.stack.push(s);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var n;const i=e.items[e.items.length-1];switch(this.type){case"newline":if(i.value){const t="end"in i.value?i.value.end:void 0,o=Array.isArray(t)?t[t.length-1]:void 0;(o==null?void 0:o.type)==="comment"?t==null||t.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else i.start.push(this.sourceToken);return;case"space":case"comment":if(i.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(i.start,e.indent)){const t=e.items[e.items.length-2],o=(n=t==null?void 0:t.value)==null?void 0:n.end;if(Array.isArray(o)){Array.prototype.push.apply(o,i.start),o.push(this.sourceToken),e.items.pop();return}}i.start.push(this.sourceToken)}return;case"anchor":case"tag":if(i.value||this.indent<=e.indent)break;i.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;i.value||hS(i.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):i.start.push(this.sourceToken);return}if(this.indent>e.indent){const t=this.startBlockValue(e);if(t){this.stack.push(t);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){const i=e.items[e.items.length-1];if(this.type==="flow-error-end"){let n;do yield*this.pop(),n=this.peek(1);while((n==null?void 0:n.type)==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!i||i.sep?e.items.push({start:[this.sourceToken]}):i.start.push(this.sourceToken);return;case"map-value-ind":!i||i.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):i.sep?i.sep.push(this.sourceToken):Object.assign(i,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!i||i.value?e.items.push({start:[this.sourceToken]}):i.sep?i.sep.push(this.sourceToken):i.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const t=this.flowScalar(this.type);!i||i.value?e.items.push({start:[],key:t,sep:[]}):i.sep?this.stack.push(t):Object.assign(i,{key:t,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}const n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{const n=this.peek(2);if(n.type==="block-map"&&(this.type==="map-value-ind"&&n.indent===e.indent||this.type==="newline"&&!n.items[n.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&n.type!=="flow-collection"){const t=rV(n),o=QD(t);Kve(e);const a=e.end.splice(1,e.end.length);a.push(this.sourceToken);const s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:o,key:e,sep:a}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let i=this.source.indexOf(`
`)+1;for(;i!==0;)this.onNewLine(this.offset+i),i=this.source.indexOf(`
`,i)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const i=rV(e),n=QD(i);return n.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const i=rV(e),n=QD(i);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,i){return this.type!=="comment"||this.indent<=i?!1:e.every(n=>n.type==="newline"||n.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function Mct(r){const e=r.prettyErrors!==!1;return{lineCounter:r.lineCounter||e&&new Dct||null,prettyErrors:e}}function Lct(r,e={}){const{lineCounter:i,prettyErrors:n}=Mct(e),t=new Rct(i==null?void 0:i.addNewLine),o=new xct(e);let a=null;for(const s of o.compose(t.parse(r),!0,r.length))if(!a)a=s;else if(a.options.logLevel!=="silent"){a.errors.push(new gN(s.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return n&&i&&(a.errors.forEach(Gve(r,i)),a.warnings.forEach(Gve(r,i))),a}function kct(r,e,i){let n;const t=Lct(r,i);if(!t)return null;if(t.warnings.forEach(o=>iOe(t.options.logLevel,o)),t.errors.length>0){if(t.options.logLevel!=="silent")throw t.errors[0];t.errors=[]}return t.toJS(Object.assign({reviver:n},i))}function Ict(r){const e=kct(r);if(e.schema&&e.schema.startsWith("remotive-topology-platform"))return ROe(e);if(e.schema&&e.schema.startsWith("remotive-topology-instance"))return Nct(e);throw new Error(`Unknown schema: ${e.schema}`)}function ROe(r){var t,o;const e=new Map,i=new Map,n=r.channels||{};for(const[a,s]of Object.entries(n)){const l=(()=>{switch(s.type){case"flexray":return{entityType:"channel",name:a,type:"flexray",platform:s,ecus:[]};case"ethernet":return{entityType:"channel",name:a,type:"ethernet",platform:s,serviceInstances:[],endpoints:[],ecus:[]};case"can":return{entityType:"channel",name:a,type:"can",platform:s,ecus:[]};case"lin":return{entityType:"channel",name:a,type:"lin",platform:s,ecus:[]};default:{const u=s||{type:"?"};throw new Error(`Unknown channel type: ${u.type}`)}}})();i.set(a,l)}for(const a of i.values())if(a.type==="ethernet"){const s=new Map;for(const[u,c]of Object.entries(((t=a.platform.someip)==null?void 0:t.services)||{})){const d={entityType:"service_instance",name:u,channel:a,platform:c,providedBySocket:void 0,consumedBySockets:[]};s.set(u,d),a.serviceInstances.push(d)}const l=new Map;for(const[u,c]of Object.entries(a.platform.endpoints||{})){const d={entityType:"endpoint",name:u,channel:a,platform:c,sockets:[],providedByEcu:void 0};a.endpoints.push(d);for(const[f,h]of Object.entries(c.sockets||{})){const p={entityType:"socket",name:f,channel:a,endpoint:d,platform:h,providedServiceInstances:[],consumedServiceInstances:[],connections:[]};l.set(f,p),d.sockets.push(p);for(const g of h.provided_service_instances||[]){const v=s.get(g);v&&(v.providedBySocket=p,p.providedServiceInstances.push(v))}for(const g of h.consumed_service_instances||[]){const v=s.get(g);v&&(v.consumedBySockets.push(p),p.consumedServiceInstances.push(v))}}}for(const u of l.values())for(const c of u.platform.socket_connections||[]){const d=l.get(c);d&&u.connections.push(d)}}for(const[a,s]of Object.entries(r.ecus||{})){const l={entityType:"ecu",name:a,platform:s,channels:[]};e.set(a,l);for(const[u,c]of Object.entries(s.channels||{})){const d=i.get(u);if(!d){console.warn(`ECU ${a} references unknown channel ${u}`);continue}d.ecus.push(l);const f=(()=>{if(!c||!c.config)switch(d.type){case"ethernet":return{type:"ethernet",providedEndpoints:[]};case"can":return{type:"can"};case"lin":return{type:"lin"};case"flexray":return{type:"flexray"}}if(c.config.type==="ethernet"&&d.type==="ethernet")return{type:"ethernet",providedEndpoints:(c.config.provided_endpoints||[]).map(g=>{const v=d.endpoints.find(y=>y.name===g);if(!v)throw new Error(`ECU ${a} references unknown endpoint ${g} on channel ${u}`);return v.providedByEcu=l,v})};if(d.type==="can")return{type:"can"};if(d.type==="lin")return{type:"lin"};if(d.type==="flexray")return{type:"flexray"};throw new Error(`ECU ${a} channel ${u} has mismatched config type ${c.config.type}`)})(),h={entityType:"ecu_channel",name:u,platform:c||{},ecu:l,channel:d,config:f};l.channels.push(h)}}for(const a of i.values())if(a.type==="ethernet")for(const s of a.serviceInstances)s.providedByEcu=(o=s.providedBySocket)==null?void 0:o.endpoint.providedByEcu;return{ecus:e,channels:i,containers:new Map}}function Nct(r){const e=ROe(r.platform||{});for(const[i,n]of Object.entries(r.channels||{})){const t=e.channels.get(i);if(!t)throw new Error(`Instance references unknown channel ${i}`);t.instance=n}for(const[i,n]of Object.entries(r.ecus||{})){const t=e.ecus.get(i);if(!t)throw new Error(`Instance references unknown ECU ${i}`);t.instance=n;for(const[o,a]of Object.entries(n.channels||{})){const s=t.channels.find(l=>l.name===o);if(!s)throw new Error(`ECU ${i} references unknown channel ${o}`);s.instance=a||{}}n.container&&(t.container={entityType:"container",name:i,instance:n.container,ecu:t}),n.models&&(t.models=Object.entries(n.models).map(([o,a])=>{const s=a.type==="container"&&a.container?{entityType:"container",name:o,instance:a.container,ecu:t}:void 0;return{entityType:"behavioral_model",name:o,instance:a,ecu:t,container:s}}))}for(const[i,n]of Object.entries(r.containers||{})){const t={entityType:"container",name:i,instance:n};e.containers.set(i,t)}return e}function w0(r){switch(r.entityType){case"ecu_channel":return`ecu_channel:${r.ecu.name}:${r.channel.name}`;case"endpoint":return`endpoint:${r.channel.name}:${r.name}`;case"socket":return`socket:${r.channel.name}:${r.name}`;case"service_instance":return`service_instance:${r.channel.name}:${r.name}`}return`${r.entityType}:${r.name}`}function H7(r){return`${r.platform.type||"???"}://${r.endpoint.platform.host||"???"}:${r.platform.port||"???"}`}function MOe(r){const e=r.models?Object.keys(r.models):[];return r.container!==void 0?"Container":e.length>0?"Behavioral Model":r.mock!==void 0?"Mock":"RemotiveBroker"}function fv(r,e){if(!(!e||e.length===0))return{name:Tut[r],parent:null,children:e,childType:r,path:`/${r}s`,type:"folder"}}function Zve(r){const e=r.instance.build&&[...r.instance.build.args||[],r.instance.build.context,r.instance.build.dockerfile,r.instance.build.target]||[];return[...r.instance.profiles||[],r.instance.platform,r.instance.image,...r.instance.volumes||[],...r.instance.ports||[],...r.instance.environment||[],r.instance.working_dir,...r.instance.depends_on||[],r.instance.command,...r.instance.cap_add||[],...r.instance.devices||[],r.instance.control_network,...r.instance.extra_hosts||[],...e].filter(i=>i!==void 0).join(" ")}function Fct(r){var e,i,n,t,o,a,s,l;switch(r.entityType){case"ecu":{const u=r.channels.flatMap(c=>c.config.type==="ethernet"?c.config.providedEndpoints:[]);return{_id:w0(r),name:r.name,entityType:r.entityType,ecu:r.name.toLowerCase(),channel:r.channels.map(c=>c.channel.name.toLowerCase()).join(" "),endpoint:u.map(c=>c.name.toLowerCase()).join(" "),socket:u.flatMap(c=>c.sockets.map(d=>d.name.toLowerCase())).join(" "),service_instance:u.flatMap(c=>c.sockets.map(d=>d.providedServiceInstances.map(f=>f.name.toLowerCase()).join(" "))).join(" "),extra:""}}case"channel":return{_id:w0(r),name:r.name,entityType:r.entityType,ecu:r.ecus.map(u=>u.name.toLowerCase()).join(" "),channel:r.name.toLowerCase(),endpoint:r.type==="ethernet"?r.endpoints.map(u=>u.name.toLowerCase()).join(" "):"",socket:r.type==="ethernet"?r.endpoints.flatMap(u=>u.sockets.map(c=>c.name.toLowerCase())).join(" "):"",service_instance:r.type==="ethernet"?r.serviceInstances.map(u=>u.name.toLowerCase()).join(" "):"",extra:""};case"container":return{_id:w0(r),name:r.name,entityType:r.entityType,ecu:r.ecu?r.ecu.name.toLowerCase():"",channel:"",endpoint:"",socket:"",service_instance:"",extra:Zve(r)};case"behavioral_model":return{_id:w0(r),name:r.name,entityType:r.entityType,ecu:r.ecu.name.toLowerCase(),channel:"",endpoint:"",socket:"",service_instance:"",extra:r.container?Zve(r.container):""};case"endpoint":return{_id:w0(r),name:r.name,entityType:r.entityType,ecu:r.providedByEcu?r.providedByEcu.name.toLowerCase():"",channel:r.channel.name.toLowerCase(),endpoint:r.name.toLowerCase(),socket:r.sockets.map(u=>u.name.toLowerCase()).join(" "),service_instance:r.sockets.flatMap(u=>u.providedServiceInstances.map(c=>c.name.toLowerCase())).join(" "),extra:r.platform.host??""};case"socket":return{_id:w0(r),name:r.name,entityType:r.entityType,ecu:((e=r.endpoint.providedByEcu)==null?void 0:e.name.toLowerCase())??"",channel:r.channel.name.toLowerCase(),endpoint:r.endpoint.name.toLowerCase(),socket:r.name.toLowerCase(),service_instance:r.providedServiceInstances.map(u=>u.name.toLowerCase()).join(" "),extra:((i=r.platform.port)==null?void 0:i.toString())??""};case"service_instance":return{_id:w0(r),name:r.name,entityType:r.entityType,ecu:((t=(n=r.providedBySocket)==null?void 0:n.endpoint.providedByEcu)==null?void 0:t.name.toLowerCase())||"",channel:r.channel.name.toLowerCase(),endpoint:((o=r.providedBySocket)==null?void 0:o.endpoint.name.toLowerCase())||"",socket:((a=r.providedBySocket)==null?void 0:a.name.toLowerCase())||"",service_instance:r.name.toLowerCase(),extra:[(s=r.platform.service_id)==null?void 0:s.toString(),(l=r.platform.instance_id)==null?void 0:l.toString()].filter(u=>u!==void 0).join(" ")}}throw new Error(`Unsupported entity type: ${r.entityType}`)}function jct(r){const e=Array.from(r.channels.values()),i=e.filter(f=>f.type==="ethernet").flatMap(f=>f.serviceInstances),n=e.filter(f=>f.type==="ethernet").flatMap(f=>f.endpoints),t=n.flatMap(f=>f.sockets),o=Array.from(r.ecus.values()),a=o.flatMap(f=>f.container?[f.container]:[]),s=o.flatMap(f=>f.models?f.models:[]),l=Array.from(r.containers.values()),u=[...e,...o,...i,...n,...t,...l,...a,...s],c=u.map(Fct),d=new K3(["name","entityType","ecu","channel","endpoint","socket","service_instance","extra"],c,[]);return{graph:r,entities:Uct(u,f=>w0(f)),index:d}}function Bct(r,e){if(e.trim()==="")return[fv("channel",Array.from(r.graph.channels.values())),fv("ecu",Array.from(r.graph.ecus.values())),fv("container",Array.from(r.graph.containers.values()))].filter(a=>a!==void 0);const[i,n]=Vct(e),t=r.index.search(i,n).map(a=>r.entities[a.id]),o=Hct(t,a=>a.entityType);return[fv("channel",o.channel),fv("ecu",o.ecu),fv("endpoint",o.endpoint),fv("socket",o.socket),fv("service_instance",o.service_instance),fv("container",o.container),fv("behavioral_model",o.behavioral_model)].filter(a=>a!==void 0)}function Vct(r){const e=r.split(" ").map(t=>{if(t.indexOf(":")>0){const[o,...a]=t.split(":");if(o==="ecu"||o==="channel"||o==="endpoint"||o==="socket"||o==="service_instance"||o==="container"||o==="behavioral_model")return{type:"entityType",entityType:o,value:a.join(":")}}return{type:"string",value:t}}),i=e.filter(t=>t.type==="string").map(t=>t.value).join(" "),n=e.filter(t=>t.type==="entityType").map(t=>C1e(!0,t.value,[t.entityType]));return[pR(i,["name","extra"]),n]}function Hct(r,e){return r.reduce((i,n)=>{const t=e(n);return(i[t]??(i[t]=[])).push(n),i},{})}function Uct(r,e){return r.reduce((i,n)=>{const t=e(n);if(i[t])throw new Error(`Duplicate key found when grouping by unique: ${String(t)}`);return i[t]=n,i},{})}function zct(r){return r.name}function Wct(r,e){let i=r;for(;i!==null;){if(i.type==="entity"&&i.entity===e)return!0;i=i.parent}return!1}function hv(r,e){const i=Wct(r,e);return{type:"entity",parent:r,path:`${r.path}/${w0(e)}`,name:`${zct(e)}`,isAncestorRef:i,entity:e,expandable:!(i||e.entityType==="container"&&e.ecu===void 0)}}function Gct(r){return Yct(r).sort((e,i)=>{if(e.type==="folder"&&i.type==="entity")return-1;if(e.type==="entity"&&i.type==="folder")return 1;if(e.type==="entity"&&i.type==="entity"){const n=e.entity.entityType.localeCompare(i.entity.entityType);if(n!==0)return n}return e.name.localeCompare(i.name)})}function Yct(r){switch(r.type){case"folder":return r.children.map(e=>hv(r,e));case"entity":switch(r.entity.entityType){case"channel":{const e=r.entity;if(e.type==="ethernet"){const i=e.endpoints.length>0?{type:"folder",parent:r,childType:"endpoint",children:e.endpoints,name:"Endpoints",path:`${r.path}/endpoints`}:void 0,n=e.serviceInstances.length>0?{type:"folder",parent:r,childType:"service_instance",children:e.serviceInstances,name:"Service Instances",path:`${r.path}/serviceInstances`}:void 0,t=e.ecus.length>0?{type:"folder",parent:r,childType:"ecu",children:e.ecus,name:"ECUs",path:`${r.path}/ecus`}:void 0;return[i,n,t].filter(o=>o!==void 0)}return[{type:"folder",parent:r,childType:"ecu",children:e.ecus,name:"ECUs",path:`${r.path}/ecus`}]}case"ecu":{const e=r.entity,i=e.models&&e.models.length>0?[{type:"folder",parent:r,childType:"behavioral_model",children:e.models,name:"Behavioral Models",path:`${r.path}/models`}]:[];return[...[...e.channels,e.container].filter(t=>t!==void 0).map(t=>hv(r,t)),...i]}case"container":return[r.entity.ecu].filter(i=>i!==void 0).map(i=>hv(r,i));case"behavioral_model":return[r.entity.ecu].filter(i=>i!==void 0).map(i=>hv(r,i));case"ecu_channel":{const e=r.entity,i=e.config.type==="ethernet"&&e.config.providedEndpoints.length>0?[{type:"folder",parent:r,childType:"endpoint",children:e.config.providedEndpoints,name:"Provided Endpoints",path:`${r.path}/providedEndpoints`}]:[];return[hv(r,e.channel),hv(r,e.ecu),...i]}case"endpoint":{const e=r.entity,i=e.providedByEcu?hv(r,e.providedByEcu):void 0;return[e.sockets.length>0?{type:"folder",parent:r,childType:"socket",children:e.sockets,name:"Sockets",path:`${r.path}/sockets`}:void 0,i,hv(r,e.channel)].filter(t=>t!==void 0)}case"socket":{const e=r.entity,i=e.consumedServiceInstances.length>0?{type:"folder",parent:r,childType:"service_instance",children:e.consumedServiceInstances,name:"Consumed Service Instances",path:`${r.path}/consumedServiceInstances`}:void 0,n=e.providedServiceInstances.length>0?{type:"folder",parent:r,childType:"service_instance",children:e.providedServiceInstances,name:"Provided Service Instances",path:`${r.path}/providedServiceInstances`}:void 0,t=e.connections.length>0?{type:"folder",parent:r,childType:"socket",children:e.connections,name:"Connections",path:`${r.path}/connections`}:void 0;return[hv(r,e.endpoint),n,i,t].filter(o=>o!==void 0)}case"service_instance":{const e=r.entity,i=e.consumedBySockets.length>0?{type:"folder",parent:r,childType:"socket",children:e.consumedBySockets,name:"Consumed By Sockets",path:`${r.path}/consumedBySockets`}:void 0;return[e.providedBySocket&&hv(r,e.providedBySocket),i].filter(n=>n!==void 0)}}}}function $ct({content:r}){const[e,i]=G.useState({}),[n,t]=G.useState(""),[o,a]=G.useState(!1),[s,l]=G.useState(!1),[u,c]=G.useState({hovered:null,highlightedEntity:null}),[d,f]=G.useState(null),h=G.useCallback(j=>{t(j),i({}),c({hovered:null,highlightedEntity:null})},[]),{graphIndex:p,parseError:g}=G.useMemo(()=>{try{const j=Ict(r);return{graphIndex:jct(j),parseError:null}}catch(j){return{graphIndex:null,parseError:j instanceof Error?j.message:"Failed to parse topology file"}}},[r]),v=G.useCallback(j=>{i(N=>{const V={...N};return N[j.path]?delete V[j.path]:V[j.path]=Gct(j),V})},[]),y=G.useCallback(j=>{const N=e[j.path];return N?s?N.filter(V=>V.type==="folder"||!!V.entity.instance):N:[]},[e,s]),m=G.useCallback(j=>{const N=e[j.path];return N?N.filter(V=>V.type==="entity"&&!V.entity.instance):[]},[e]),b=G.useCallback(j=>{c({hovered:j,highlightedEntity:j.type!=="folder"?j.entity:null})},[]),S=G.useCallback(j=>{c({hovered:null,highlightedEntity:j})},[]),_=G.useCallback(j=>{const N="type"in j&&j.type==="folder",V="type"in j&&j.type==="entity",W="entityType"in j;N||V?b(j):W&&S(j)},[b,S]),C=G.useCallback(()=>{c({hovered:null,highlightedEntity:null})},[]),T=G.useCallback(j=>{f(j)},[]),x=G.useCallback(()=>{f(null)},[]),A=G.useMemo(()=>{if(!p)return[];const j=Bct(p,n);return s?j.filter(N=>N.type==="folder"||N.entity.instance):j},[p,n,s]),w=G.useCallback(j=>e[j.path]!==void 0,[e]),L=G.useCallback(j=>j.type!=="folder"&&d!==null&&j.entity===d,[d]),k=G.useCallback(j=>u.hovered===j,[u.hovered]),D=G.useCallback(j=>j.type!=="folder"&&u.highlightedEntity===j.entity&&u.hovered!==j,[u.highlightedEntity,u.hovered]);return{parseError:g,filteredNodes:A,searchQuery:n,setSearchQuery:h,showSearchOptions:o,setShowSearchOptions:a,showOnlyInstanced:s,setShowOnlyInstanced:l,toggleNode:v,getChildren:y,getUninstantiatedChildren:m,hoverState:u,handleMouseEnter:_,handleMouseLeave:C,selectedEntity:d,selectEntity:T,clearSelection:x,isNodeExpanded:w,isNodeSelected:L,isNodeHovered:k,isNodeHighlightedAncestor:D}}function Jve({message:r,error:e,className:i}){return R.jsxs("div",{className:Nr("h-full flex flex-col items-center justify-center",i),children:[R.jsx("div",{className:"p-4 rounded-xl bg-destructive/10 mb-4",children:R.jsx(Fr,{type:sr.STATUS_ERROR,className:"w-8 h-8 text-destructive"})}),R.jsx("p",{className:"text-foreground font-medium mb-1",children:r}),R.jsx("p",{className:"text-sm text-muted-foreground text-center max-w-md",children:e})]})}function U7(r){return R.jsxs("div",{className:Nr("text-xs font-medium text-foreground",r.className),children:[r.title,r.subtitle!=null&&r.subtitle!==""&&R.jsx("span",{className:"ms-2 font-normal text-muted-foreground",children:r.subtitle})]})}function qct(r){return r==null?"N/A":typeof r=="boolean"?r?"Yes":"No":String(r)}function Xct(r){const e=qct(r.value);return R.jsxs("div",{className:"mx-4 flex items-start gap-2 text-xs",children:[R.jsxs("span",{className:"text-muted-foreground min-w-[100px] shrink-0",children:[r.label,":"]}),r.onClick?R.jsx("button",{className:"text-primary hover:underline break-all text-left cursor-pointer",onClick:r.onClick,children:e}):R.jsx("span",{className:"text-foreground break-all",children:e})]})}function hs(r){return R.jsxs("div",{className:"space-y-0.5 my-3 mb-5",children:[r.title!=null&&R.jsx(U7,{className:"mb-2",title:r.title,subtitle:r.subtitle}),r.rows.map(([e,i,n])=>R.jsx(Xct,{label:e,value:i,onClick:n},e))]})}function Kct(r,e){const i=r.split("/");i.pop();for(const n of e.replace(/^\.\//,"").split("/"))n===".."?i.pop():i.push(n);return i.join("/")}function Zct(r){const{channel:e,filePath:i,entity:n}=r,t=kq(),o=G.useCallback(()=>{const u=n.platform.database;u&&i&&t(Kct(i,u))},[n.platform.database,i,t]),s=!!(n.platform.database&&i)?o:void 0,l=[s?["Database",n.platform.database,s]:["Database",n.platform.database]];switch(e.type){case"flexray":return R.jsx(hs,{title:"Platform",rows:[...l,["Channel name",e.platform.flexray_physical_channel_name],["Speed",e.platform.speed],["High/Low Byte Order",e.platform.is_high_low_byte_order],["Macrotick (µs)",e.platform.macrotick_microseconds],["Static Slot Macroticks",e.platform.static_slot_macroticks],["Cycle (µs)",e.platform.cycle_microseconds],["Number of Static Slots",e.platform.number_of_static_slots],["Number of Minislots",e.platform.number_of_minislots]]});case"ethernet":return R.jsx(hs,{title:"Platform",rows:[...l,["Subnet",e.platform.subnet],["Cluster Name",e.platform.cluster_name],["VLAN",e.platform.vlan]]});case"lin":return R.jsx(hs,{title:"Platform",rows:[...l]});case"can":return R.jsx(hs,{title:"Platform",rows:[...l,["Baudrate",e.platform.baudrate],["CAN Physical Channel Name",e.platform.can_physical_channel_name]]})}}function Jct(r){var e,i,n,t;switch((e=r.instance.driver)==null?void 0:e.type){case"virtual":return R.jsx(hs,{title:"Instance",subtitle:"Virtual",rows:[["Subnet",r.instance.driver.subnet],["Target host",r.instance.driver.target_host],["Port",r.instance.driver.port]]});case"bridge":return R.jsx(hs,{title:"Instance",subtitle:"Bridge",rows:[["Name",r.instance.driver.name]]});case"udp":return R.jsx(hs,{title:"Instance",subtitle:"UDP",rows:[["Target host",r.instance.driver.target_host],["Target port",r.instance.driver.port],["Subnet",r.instance.driver.subnet]]});case"remotivebus":switch((i=r.instance.driver.config)==null?void 0:i.type){case"can":return R.jsx("div",{children:R.jsx(hs,{title:"Instance",subtitle:"RemotiveBus CAN",rows:[["Device",r.instance.driver.config.device],["Host device",r.instance.driver.config.host_device],["TX queue length",r.instance.driver.config.txqueuelen]]})});case"vcan":return R.jsxs("div",{children:[R.jsx(hs,{title:"Instance",subtitle:"RemotiveBus VCAN",rows:[["Device",r.instance.driver.config.device],["Host device",r.instance.driver.config.host_device]]}),r.instance.driver.config.plugin&&R.jsx(Qct,{plugin:r.instance.driver.config.plugin})]});default:return R.jsxs("div",{children:["Unknown driver type ",(n=r.instance.driver)==null?void 0:n.type]})}case"dockercan":return R.jsx(hs,{title:"Instance",subtitle:"DockerCAN",rows:[["Device",r.instance.driver.device_name],["Peer",r.instance.driver.peer]]});default:return R.jsxs("div",{children:["Unknown driver type ",(t=r.instance.driver)==null?void 0:t.type]})}}function Qct(r){const e=`${r.plugin.driver?` (${r.plugin.driver})`:""}`;return R.jsx("div",{className:"mt-4",children:R.jsx(hs,{title:"RemotiveBus",subtitle:`Plugin${e}`,rows:Object.entries(r.plugin).filter(([i])=>i!=="driver")})})}function edt(r){return R.jsxs(R.Fragment,{children:[R.jsx(Zct,{channel:r.entity,filePath:r.filePath,entity:r.entity}),r.mode==="instance"&&r.entity.instance&&R.jsx("div",{className:"mt-4",children:R.jsx(Jct,{instance:r.entity.instance})})]})}function tdt(r){const{entity:e,mode:i}=r;if(i==="platform")return null;if(!e.instance)return R.jsx(hs,{title:"Not instantiated",rows:[]});const n=e.instance.models?Object.keys(e.instance.models):[],t=MOe(e.instance);return R.jsx(hs,{title:"Instance",subtitle:t,rows:[["Mock",e.instance.mock!==void 0],["Container",e.instance.container!==void 0],["Models",n.length>0?n.join(", "):"-"]]})}const rdt={ecu_channel:{icon:sr.TOPOLOGY_SERVICE,color:"text-amber-500",hoverBg:"hover:bg-amber-500/10",badgeBg:"bg-amber-500"},service_instance:{icon:sr.TOPOLOGY_INSTANCE,color:"text-purple-500",hoverBg:"hover:bg-purple-500/10",badgeBg:"bg-purple-500"},socket:{icon:sr.TOPOLOGY_SOCKET,color:"text-cyan-500",hoverBg:"hover:bg-cyan-500/10",badgeBg:"bg-cyan-500"},endpoint:{icon:sr.TOPOLOGY_ENDPOINT,color:"text-rose-500",hoverBg:"hover:bg-rose-500/10",badgeBg:"bg-rose-500"},ecu:{icon:sr.TOPOLOGY_ECU,color:"text-blue-500",hoverBg:"hover:bg-blue-500/10",badgeBg:"bg-blue-500"},channel:{icon:sr.TOPOLOGY_CHANNEL,color:"text-emerald-500",hoverBg:"hover:bg-emerald-500/10",badgeBg:"bg-emerald-500"},container:{icon:sr.TOPOLOGY_CONTAINER,color:"text-green-500",hoverBg:"hover:bg-green-500/10",badgeBg:"bg-green-500"},behavioral_model:{icon:sr.TOPOLOGY_BEHAVIORAL_MODEL,color:"text-green-500",hoverBg:"hover:bg-green-500/10",badgeBg:"bg-green-500"}};function B$(r){return rdt[r]}function LOe(r){const{icon:e,color:i}=B$(r.entity.entityType);return R.jsxs("div",{className:Nr("flex items-center justify-between gap-2 px-2 overflow-hidden my-1",r.className),children:[R.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[R.jsx("div",{className:Nr("p-1 rounded shrink-0",i),children:R.jsx(Fr,{type:e,className:"w-3.5 h-3.5"})}),R.jsxs("div",{className:"min-w-0 flex-1 flex flex-col items-baseline",children:[R.jsxs("p",{className:"w-full text-sm font-semibold truncate flex items-baseline gap-0",title:r.entity.name,children:[r.entity.name,r.subtitle!=null&&r.subtitle!==""&&R.jsx("span",{className:"ms-2 text-xs text-muted-foreground font-normal truncate",title:r.subtitle,children:r.subtitle})]}),R.jsx("p",{className:"w-full text-xs text-muted-foreground truncate capitalize",title:r.entity.entityType,children:r.entity.entityType})]})]}),r.onClose!=null&&R.jsx("button",{onClick:r.onClose,className:"p-2 rounded-md hover:bg-muted transition-colors shrink-0","aria-label":"Close detail panel",children:R.jsx(Fr,{type:sr.ACTION_CLOSE,className:"w-4 h-4 text-muted-foreground"})})]})}function kz(r){return R.jsxs(R.Fragment,{children:[R.jsx(U7,{className:"mb-2 mt-3",title:"Related Entities"}),r.children]})}function bg(r){const{entity:e,subtitle:i,onSelectEntity:n,onEntityMouseEnter:t,onEntityMouseLeave:o}=r,a=R.jsx(LOe,{entity:e,subtitle:i});return R.jsx("div",{className:"flex flex-col mb-1",children:n!=null?R.jsx("button",{type:"button",onClick:()=>n(e),onMouseEnter:()=>t==null?void 0:t(e),onMouseLeave:()=>o==null?void 0:o(),className:Nr("w-full text-left rounded-md transition-colors","hover:bg-muted active:opacity-90 cursor-pointer","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40 focus-visible:ring-offset-2 focus-visible:ring-offset-background"),children:a}):a})}function idt(r){const{entity:e,mode:i,onSelectEntity:n,onEntityMouseEnter:t,onEntityMouseLeave:o}=r,a=s=>{var l;switch((l=s.config)==null?void 0:l.type){case void 0:return R.jsx(hs,{title:"Instance",rows:[]});case"can":return R.jsx(hs,{title:"Instance",subtitle:"CAN",rows:[]});case"ethernet":return R.jsx(hs,{title:"Instance",subtitle:"Ethernet",rows:[]});case"lin":return R.jsx(hs,{title:"Instance",subtitle:"LIN",rows:[["Schedule autostart",s.config.schedule_autostart],["Schedule table name",s.config.schedule_table_name]]})}};return R.jsxs(R.Fragment,{children:[R.jsx(hs,{title:"Platform",rows:[["Database",e.platform.database]]}),i==="instance"&&e.instance&&a(e.instance),R.jsxs(kz,{children:[R.jsx(bg,{entity:e.ecu,onSelectEntity:n,onEntityMouseEnter:t,onEntityMouseLeave:o}),R.jsx(bg,{entity:e.channel,onSelectEntity:n,onEntityMouseEnter:t,onEntityMouseLeave:o})]})]})}function ndt(r){if(r.description==null||r.description==="")return null;const e=r.description.trim().replace(/\.+$/,"")+".";return R.jsx("p",{className:"text-xs text-muted-foreground mb-2 break-words",title:r.description,children:e})}function odt(r){const{entity:e,onSelectEntity:i,onEntityMouseEnter:n,onEntityMouseLeave:t}=r;return R.jsxs(R.Fragment,{children:[R.jsx(ndt,{}),R.jsx(hs,{title:"Platform",rows:[["Port",e.platform.port],["Protocol",e.platform.type]]}),R.jsxs(kz,{children:[R.jsx(bg,{entity:e.endpoint,subtitle:e.endpoint.platform.host,onSelectEntity:i,onEntityMouseEnter:n,onEntityMouseLeave:t}),e.endpoint.providedByEcu&&R.jsx(bg,{entity:e.endpoint.providedByEcu,subtitle:"Provided by",onSelectEntity:i,onEntityMouseEnter:n,onEntityMouseLeave:t}),R.jsx(bg,{entity:e.channel,onSelectEntity:i,onEntityMouseEnter:n,onEntityMouseLeave:t})]})]})}function adt(r){const{entity:e,onSelectEntity:i,onEntityMouseEnter:n,onEntityMouseLeave:t}=r;return R.jsxs(R.Fragment,{children:[R.jsx(hs,{title:"Platform",rows:[["Host",e.platform.host]]}),R.jsxs(kz,{children:[e.providedByEcu&&R.jsx(bg,{entity:e.providedByEcu,subtitle:"Provided by",onSelectEntity:i,onEntityMouseEnter:n,onEntityMouseLeave:t}),R.jsx(bg,{entity:e.channel,onSelectEntity:i,onEntityMouseEnter:n,onEntityMouseLeave:t})]})]})}function sdt(r){const{entity:e,onSelectEntity:i,onEntityMouseEnter:n,onEntityMouseLeave:t}=r;return R.jsxs(R.Fragment,{children:[R.jsx(hs,{title:"Platform",rows:[["Service ID",e.platform.service_id],["Instance ID",e.platform.instance_id],["Version Major",e.platform.version_major],["Version Minor",e.platform.version_minor]]}),R.jsxs(kz,{children:[e.providedBySocket&&R.jsx(bg,{entity:e.providedBySocket,subtitle:`Provided by | ${H7(e.providedBySocket)}`,onSelectEntity:i,onEntityMouseEnter:n,onEntityMouseLeave:t}),e.providedBySocket&&R.jsx(bg,{entity:e.providedBySocket.endpoint,subtitle:"Provided by",onSelectEntity:i,onEntityMouseEnter:n,onEntityMouseLeave:t}),R.jsx(bg,{entity:e.channel,onSelectEntity:i,onEntityMouseEnter:n,onEntityMouseLeave:t}),e.providedByEcu&&R.jsx(bg,{entity:e.providedByEcu,subtitle:"Provided by",onSelectEntity:i,onEntityMouseEnter:n,onEntityMouseLeave:t})]})]})}function kOe(r){var i,n,t,o,a,s,l,u,c,d,f,h,p,g,v,y,m,b,S,_,C,T;const{entity:e}=r;return R.jsxs(R.Fragment,{children:[R.jsx(hs,{title:"Container",rows:[["profiles",(((i=e.instance)==null?void 0:i.profiles)||[]).join(", ")],["platform",((n=e.instance)==null?void 0:n.platform)||""],["image",((t=e.instance)==null?void 0:t.image)||""],["volumes",(((o=e.instance)==null?void 0:o.volumes)||[]).join(", ")],["ports",(((a=e.instance)==null?void 0:a.ports)||[]).join(", ")],["environment",(((s=e.instance)==null?void 0:s.environment)||[]).join(", ")],["working_dir",((l=e.instance)==null?void 0:l.working_dir)||""],["depends_on",(((u=e.instance)==null?void 0:u.depends_on)||[]).join(", ")],["command",((c=e.instance)==null?void 0:c.command)||""],["cap_add",(((d=e.instance)==null?void 0:d.cap_add)||[]).join(", ")],["devices",(((f=e.instance)==null?void 0:f.devices)||[]).join(", ")],["control_network",((h=e.instance)==null?void 0:h.control_network)||""],["extra_hosts",(((p=e.instance)==null?void 0:p.extra_hosts)||[]).join(", ")]]}),((g=e.instance)==null?void 0:g.build)&&R.jsx(hs,{title:"Build",rows:[["args",(((y=(v=e.instance)==null?void 0:v.build)==null?void 0:y.args)||[]).join(", ")],["context",((b=(m=e.instance)==null?void 0:m.build)==null?void 0:b.context)||""],["dockerfile",((_=(S=e.instance)==null?void 0:S.build)==null?void 0:_.dockerfile)||""],["target",((T=(C=e.instance)==null?void 0:C.build)==null?void 0:T.target)||""]]})]})}function ldt(r){const{entity:e,onSelectEntity:i,onEntityMouseEnter:n,onEntityMouseLeave:t}=r;return R.jsxs(R.Fragment,{children:[R.jsx(hs,{title:"Behavioral Model",rows:[["Type",e.instance.type]]}),e.container&&R.jsx(kOe,{entity:e.container,mode:"instance",onSelectEntity:i,onEntityMouseEnter:n,onEntityMouseLeave:t})]})}function T0(r){return R.jsx("div",{className:"px-4 pt-1",children:r.children})}function udt(r){switch(r.entity.entityType){case"channel":return R.jsx(T0,{children:R.jsx(edt,{entity:r.entity,mode:r.mode,filePath:r.filePath,onSelectEntity:r.onSelectEntity,onEntityMouseEnter:r.onEntityMouseEnter,onEntityMouseLeave:r.onEntityMouseLeave})});case"ecu":return R.jsx(T0,{children:R.jsx(tdt,{entity:r.entity,mode:r.mode,onSelectEntity:r.onSelectEntity,onEntityMouseEnter:r.onEntityMouseEnter,onEntityMouseLeave:r.onEntityMouseLeave})});case"ecu_channel":return R.jsx(T0,{children:R.jsx(idt,{entity:r.entity,mode:r.mode,onSelectEntity:r.onSelectEntity,onEntityMouseEnter:r.onEntityMouseEnter,onEntityMouseLeave:r.onEntityMouseLeave})});case"socket":return R.jsx(T0,{children:R.jsx(odt,{entity:r.entity,mode:r.mode,onSelectEntity:r.onSelectEntity,onEntityMouseEnter:r.onEntityMouseEnter,onEntityMouseLeave:r.onEntityMouseLeave})});case"endpoint":return R.jsx(T0,{children:R.jsx(adt,{entity:r.entity,mode:r.mode,onSelectEntity:r.onSelectEntity,onEntityMouseEnter:r.onEntityMouseEnter,onEntityMouseLeave:r.onEntityMouseLeave})});case"service_instance":return R.jsx(T0,{children:R.jsx(sdt,{entity:r.entity,mode:r.mode,onSelectEntity:r.onSelectEntity,onEntityMouseEnter:r.onEntityMouseEnter,onEntityMouseLeave:r.onEntityMouseLeave})});case"container":return R.jsx(T0,{children:R.jsx(kOe,{entity:r.entity,mode:r.mode,onSelectEntity:r.onSelectEntity,onEntityMouseEnter:r.onEntityMouseEnter,onEntityMouseLeave:r.onEntityMouseLeave})});case"behavioral_model":return R.jsx(T0,{children:R.jsx(ldt,{entity:r.entity,mode:r.mode,onSelectEntity:r.onSelectEntity,onEntityMouseEnter:r.onEntityMouseEnter,onEntityMouseLeave:r.onEntityMouseLeave})});default:return R.jsx(T0,{children:R.jsx(U7,{title:"Not supported"})})}}const cdt=400,ddt=200,fdt=800;function hdt(r){const e=y7(),[i,n]=G.useState(e?200:cdt),[t,o]=G.useState(!1),a=G.useRef(null),s=u=>{u.preventDefault(),o(!0)};if(G.useEffect(()=>{if(!t)return;const u=d=>{if(!a.current)return;const h=a.current.getBoundingClientRect().right-d.clientX;n(Math.max(ddt,Math.min(fdt,h)))},c=()=>{o(!1)};return document.addEventListener("mousemove",u),document.addEventListener("mouseup",c),()=>{document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",c)}},[t]),!r.entity)return R.jsx(R.Fragment,{});const l=()=>R.jsx("div",{onMouseDown:s,className:Nr("absolute top-0 left-0 w-2 h-full cursor-ew-resize","hover:bg-primary/20 active:bg-primary/20 transition-colors")});return R.jsxs("div",{ref:a,className:Nr("relative flex flex-col shrink-0","h-full overflow-hidden","border-s border-muted",r.className),style:{width:i},children:[l(),R.jsx(LOe,{subtitle:r.entity.entityType==="socket"?H7(r.entity):void 0,entity:r.entity,onClose:r.onClose,border:!0}),R.jsx("div",{className:"flex-1 overflow-auto overscroll-contain",children:R.jsx(udt,{entity:r.entity,mode:r.mode,filePath:r.filePath,onSelectEntity:r.onSelectEntity,onEntityMouseEnter:r.onEntityMouseEnter,onEntityMouseLeave:r.onEntityMouseLeave})})]})}function pdt(r){return R.jsxs("div",{className:Nr("relative",r.disabled&&"opacity-50",r.className),children:[R.jsx(Fr,{type:sr.ACTION_SEARCH,className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),R.jsx("input",{type:"text",value:r.searchQuery,onChange:e=>r.onSearchChange(e.target.value),placeholder:"Search, e.g. bodycan or ecu:BCM",disabled:r.disabled,className:Nr("w-full pl-9 pr-10 py-2 text-sm rounded-full","bg-background dark:bg-muted/30 border border-border","text-foreground placeholder:text-muted-foreground","focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary/50","transition-colors",r.disabled&&"cursor-not-allowed")}),R.jsx(PM,{side:"left",className:"absolute right-3 top-1/2 -translate-y-1/2",content:R.jsxs("div",{className:"max-w-xs space-y-2",children:[R.jsx("p",{className:"text-sm font-medium",children:"Search tips"}),R.jsx("p",{className:"text-xs text-neutral-400",children:'Start filtering in all categories by typing any text. Prepend the category name with a colon to filter in only that category, e.g. "ecu:CCZM" or "channel:BCM".'})]}),children:R.jsx("div",{className:"text-muted-foreground",children:R.jsx(Fr,{type:sr.STATUS_HELP,className:"w-4 h-4"})})})]})}const Qve="text-muted-foreground text-xs m-0";function eye(r){if(!(r.icon??r.title??r.subtitle??r.subtitleElement))return null;const i=r.subtitleElement??r.subtitle;return R.jsxs("div",{className:Nr("flex flex-col items-center justify-center h-full text-center",r.className),children:[r.icon&&R.jsx("div",{className:"p-4 rounded-xl bg-muted mb-4",children:R.jsx("div",{className:"w-8 h-8 flex items-center justify-center [&>svg]:w-8 [&>svg]:h-8 text-muted-foreground",children:r.icon})}),(r.title??i)&&R.jsxs("div",{className:"flex flex-col items-center justify-center mb-4",children:[r.title&&R.jsx("p",{className:"text-foreground text-sm mb-1",children:r.title}),r.subtitleElement!==void 0?R.jsx("div",{className:Qve,children:r.subtitleElement}):r.subtitle!==void 0&&R.jsx("p",{className:Qve,children:r.subtitle})]})]})}function gdt(r){const e=r.isSelected??!1,i=r.isHovered??!1,n=r.isHighlightedAsAncestor??!1,t=r.node.type!=="folder",{icon:o,color:a,hoverBg:s,badgeBg:l}=r.node.type==="folder"?B$(r.node.childType):B$(r.node.entity.entityType),u=r.node.type!=="folder"&&!r.node.expandable,c=r.node.type!=="folder"&&r.node.isAncestorRef,d=r.node.type==="entity"&&!!r.node.entity.instance,f=r.mode==="instance",h=()=>{var C;!u&&!r.isExpanded&&r.onToggle(),t&&((C=r.onInfoClick)==null||C.call(r))},p=C=>{var T;C.stopPropagation(),(T=r.onInfoClick)==null||T.call(r)},g=()=>n?"bg-primary/20 ring-1 ring-primary/40":i&&c?"bg-muted/80":i?"bg-muted/60":"",v=C=>{C.stopPropagation(),u||r.onToggle()},y=()=>u?R.jsx("span",{className:"w-4 h-4"}):R.jsx("span",{className:"w-4 h-4 flex items-center justify-center shrink-0 cursor-pointer",onClick:v,children:r.isExpanded?R.jsx(Fr,{type:sr.NAV_CHEVRON_DOWN,className:"w-3.5 h-3.5 text-muted-foreground"}):R.jsx(Fr,{type:sr.NAV_CHEVRON_RIGHT,className:"w-3.5 h-3.5 text-muted-foreground"})}),m=()=>R.jsxs("div",{className:"relative shrink-0",children:[R.jsx(Fr,{type:o,className:Nr("w-4 h-4",c?"opacity-40":a,n&&"opacity-100")}),r.mode==="instance"&&d&&R.jsx("span",{className:Nr("absolute -top-0.5 -right-0.5 w-1.5 h-1.5 rounded-full ring-1 ring-background",c?"bg-current opacity-40":l)})]}),b=()=>{if(r.node.type!=="folder")switch(r.node.entity.entityType){case"endpoint":return r.node.entity.platform.host;case"socket":return H7(r.node.entity);case"ecu":return r.node.entity.instance&&MOe(r.node.entity.instance)}},S=()=>{const C=r.node.type==="entity"&&r.node.entity.instance?"instance":void 0,T=[b(),C].filter(Boolean).join(" | ");return R.jsx(R.Fragment,{children:R.jsxs("span",{className:Nr("truncate font-normal",u&&"italic",n&&"text-primary font-semibold"),children:[r.node.name,R.jsx("span",{className:"ms-1 text-xs text-muted-foreground",children:T})]})})},_=()=>R.jsx(R.Fragment,{children:R.jsx("button",{onClick:p,title:e?"This is currently selected":"View details",className:Nr("p-0.5 rounded transition-opacity",e?"opacity-100 text-foreground":"opacity-0 group-hover:opacity-100 hover:bg-muted/80 text-muted-foreground hover:text-foreground"),"aria-label":"View details",children:R.jsx(Fr,{type:sr.STATUS_INFO,className:"w-3.5 h-3.5"})})});return R.jsxs("div",{className:Nr("flex items-center gap-1.5 py-1.5 px-2 cursor-pointer rounded-md mx-1 group","text-sm transition-all duration-150",u?"text-muted-foreground/50 hover:text-muted-foreground/70 hover:bg-muted/40":Nr("text-foreground",s),g(),f&&!d&&r.node.type!=="folder"&&"opacity-70"),style:{paddingLeft:`${r.depth*20+8}px`},onClick:h,onMouseEnter:r.onMouseEnter,onMouseLeave:r.onMouseLeave,"data-testid":`topology-node-${r.node.path}`,"data-node-id":r.node.path,children:[y(),m(),S(),t&&_()]})}function vdt(r){const e=n=>R.jsx(eye,{icon:R.jsx(Fr,{type:sr.SYSTEM_NETWORK,className:"w-8 h-8 text-muted-foreground"}),title:`There is nothing to visualize in this ${n}`,subtitleElement:R.jsxs("span",{className:"inline-flex",children:["You can still view the text content of the resolved ",n," by switching to the"," ",R.jsx(Fr,{type:sr.VIEW_TEXT,className:"w-4 h-4 text-muted-foreground mx-1"})," ","view."]})}),i=(n,t)=>{const o=r.isNodeExpanded(n),a=r.getChildren(n),s=r.getUninstantiatedChildren(n);return R.jsxs("div",{children:[R.jsx(gdt,{node:n,depth:t,mode:r.mode,isExpanded:o,onToggle:()=>r.onToggleNode(n),isSelected:r.isNodeSelected(n),isHovered:r.isNodeHovered(n),isHighlightedAsAncestor:r.isNodeHighlightedAncestor(n),onMouseEnter:()=>r.onNodeMouseEnter(n),onMouseLeave:r.onNodeMouseLeave,onInfoClick:()=>{var l;return(l=r.onNodeInfoClick)==null?void 0:l.call(r,n)}}),o&&R.jsxs(R.Fragment,{children:[a.map(l=>i(l,t+1)),r.showOnlyInstanced&&s.length>0&&R.jsx("span",{className:"text-xs italic text-muted-foreground block mt-1",style:{paddingLeft:`${(t+1)*20+8}px`},children:s.length===1?"Filtering out 1 uninstantiated child.":`Filtering out ${s.length} uninstantiated children.`})]})]},n.path)};return r.searchQuery.trim()!==""&&r.nodes.length===0?R.jsx("div",{className:"flex-1 overflow-auto overscroll-contain py-2",children:R.jsx(eye,{title:"No results match your search.",subtitle:"Try a different search term or clear the search to see the full tree."})}):r.nodes.length===0?R.jsx("div",{className:"flex-1 overflow-auto overscroll-contain py-2",children:e(r.mode)}):R.jsx("div",{className:"flex-1 overflow-auto overscroll-contain py-2",children:r.nodes.map(n=>i(n,0))})}const ydt=[{value:"tree",icon:sr.VIEW_TREE,tooltip:"Tree view"},{value:"text",icon:sr.VIEW_TEXT,tooltip:"YAML"}];function tye(r){const{getResolvedPlatform:e,getResolvedInstance:i}=UF(),[n,t]=G.useState("tree"),[o,a]=G.useState(null),[s,l]=G.useState(!0),[u,c]=G.useState(null),d=$ct({content:o??""});G.useEffect(()=>{let y=!1;return(async()=>{try{const b=r.mode==="platform"?await e(r.filePath):await i(r.filePath);y||a(b)}catch(b){if(!y){const S=b instanceof Error?b.message:`Failed to load ${r.mode}`;c(S),Gn.error(S)}}finally{y||l(!1)}})(),()=>{y=!0}},[r.filePath,e,i,r.mode]);const f=y=>{d.setSearchQuery(y)};if(u)return R.jsx(Jve,{message:`Failed to load ${r.mode}`,error:u});if(s)return R.jsxs("div",{className:Nr("h-full flex flex-col items-center justify-center text-muted-foreground"),children:[R.jsx(Fr,{type:sr.STATUS_LOADING,className:"w-8 h-8 animate-spin mb-3"}),R.jsxs("p",{className:"text-sm",children:["Resolving ",r.mode,"..."]})]});if(o===null)return null;if(d.parseError)return R.jsx(Jve,{message:`Failed to parse ${r.mode}`,error:d.parseError});const h=d.selectedEntity!==null,p=()=>R.jsx(R.Fragment,{children:R.jsxs("div",{className:"flex items-center gap-2",children:[R.jsx(pdt,{searchQuery:d.searchQuery,onSearchChange:f,disabled:n==="text",className:"flex-1"}),r.mode==="instance"&&R.jsx(PM,{content:R.jsx("p",{className:"text-xs",children:d.showOnlyInstanced?"Show all entities":"Show only instantiated entities"}),side:"bottom",delay:400,children:R.jsx("button",{onClick:()=>d.setShowOnlyInstanced(!d.showOnlyInstanced),className:Nr("p-2 rounded-md transition-colors",d.showOnlyInstanced?"bg-primary/20 text-primary":"text-muted-foreground hover:bg-muted hover:text-foreground"),children:R.jsx(Fr,{type:sr.ACTION_FILTER,className:"w-4 h-4"})})}),R.jsx(Wje,{options:ydt,value:n,onChange:t})]})}),g=()=>R.jsxs(R.Fragment,{children:[n==="tree"&&R.jsx(vdt,{nodes:d.filteredNodes,searchQuery:d.searchQuery,mode:r.mode,showOnlyInstanced:d.showOnlyInstanced,isNodeSelected:d.isNodeSelected,isNodeExpanded:d.isNodeExpanded,isNodeHovered:d.isNodeHovered,isNodeHighlightedAncestor:d.isNodeHighlightedAncestor,onToggleNode:d.toggleNode,getChildren:d.getChildren,getUninstantiatedChildren:d.getUninstantiatedChildren,onNodeMouseEnter:d.handleMouseEnter,onNodeMouseLeave:d.handleMouseLeave,onNodeInfoClick:y=>d.selectEntity(y.type==="entity"?y.entity:null)}),n==="text"&&R.jsx(I0e,{text:o,language:"yaml",className:"flex-1 mt-1"})]}),v=()=>R.jsx(R.Fragment,{children:h&&R.jsx(hdt,{entity:d.selectedEntity,onClose:d.clearSelection,onSelectEntity:d.selectEntity,onEntityMouseEnter:d.handleMouseEnter,onEntityMouseLeave:d.handleMouseLeave,mode:r.mode,filePath:r.filePath})});return R.jsxs("div",{className:Nr("flex overflow-hidden relative h-full min-h-0",r.className),children:[R.jsxs("div",{className:"flex-1 flex flex-col min-w-0 min-h-0 overflow-hidden",children:[R.jsx("div",{className:"flex-shrink-0 space-y-2 px-2",children:p()}),R.jsx("div",{className:"flex-1 min-h-0 flex flex-col",children:g()})]}),v()]})}function mdt(r){return{path:typeof r.path=="string"?r.path:void 0,fileType:typeof r.fileType=="string"?r.fileType:void 0}}const bdt={route:fc.FILES,title:"File",contextId:ps.FILES,icon:Vi.CONTEXT_FILES,component:Cdt,validateSearch:mdt};function Sdt(r){return R.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center text-muted-foreground",children:[R.jsx(Fr,{type:sr.STATUS_LOADING,className:"w-8 h-8 animate-spin mb-3"}),R.jsx("p",{className:"text-sm",children:r.message})]})}function _dt(r){return R.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center",children:[R.jsx("div",{className:"p-4 rounded-xl bg-destructive/10 mb-4",children:R.jsx(Fr,{type:sr.STATUS_ERROR,className:"w-8 h-8 text-destructive"})}),R.jsx("p",{className:"text-foreground font-medium mb-1",children:"Failed to load file"}),R.jsx("p",{className:"text-sm text-muted-foreground",children:r.message})]})}function Pdt(r){return R.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center",children:[R.jsx("div",{className:"p-4 rounded-xl bg-muted mb-4",children:R.jsx(Fr,{type:sr.FILE_UNKNOWN,className:"w-8 h-8 text-muted-foreground"})}),R.jsx("p",{className:"text-foreground font-medium mb-1",children:"Unsupported file type"}),R.jsx("p",{className:"text-xs text-muted-foreground text-center max-w-md mb-4",children:"This file type will not be automatically previewed. You can preview it as text, but the content might not be readable."}),R.jsx(Uc,{type:Qo.PRIMARY,onClick:r.onViewAsText,label:"View as text",icon:sr.CONTENT_CODE})]})}function Cdt(){const{getFileContent:r,getFileUrl:e}=UF(),{tabs:i,activeTab:n,closeOtherTabs:t}=Pq(),{params:o}=jOe(),a=(o==null?void 0:o.path)||"",s=o==null?void 0:o.fileType,l=p3e(s),[u,c]=G.useState(()=>h3e(o==null?void 0:o.viewMode,l)),d=a.split("/").pop()||a,f=d3e(d),h=zUe(f),p=e(a),v=!XUe(l)&&u!=="unsupported",[y,m]=G.useState(null),[b,S]=G.useState(v),[_,C]=G.useState(null);G.useEffect(()=>{v&&r(a).then(D=>{D===null?C("Failed to load file"):m(D)}).catch(D=>C(D.message||"Unknown error")).finally(()=>S(!1))},[a,r,v]);const T=$Ue(l,f),x=G.useMemo(()=>l?qUe(l):[],[l]),A=D=>{c(D)},w=G.useMemo(()=>{const D=[];for(const j of x){const N=KUe[j];N&&D.push({value:j,icon:FF(N.iconName),label:N.label,isLoading:!1})}return D},[x]),L=()=>b?R.jsx(Sdt,{message:"Loading file..."}):_?R.jsx(_dt,{message:_}):u==="unsupported"?R.jsx(Pdt,{onViewAsText:()=>A("text")}):R.jsxs(R.Fragment,{children:[x.includes("image")&&R.jsx("div",{className:u==="image"?"h-full":"hidden",children:R.jsx(lHe,{url:p,fileName:d,onError:()=>C("Failed to load image")})},"image"),x.includes("video")&&R.jsx("div",{className:u==="video"?"h-full":"hidden",children:R.jsx(uHe,{url:p,onError:()=>C("Failed to load video")})},"video"),x.includes("audio")&&R.jsx("div",{className:u==="audio"?"h-full":"hidden",children:R.jsx(cHe,{url:p,onError:()=>C("Failed to load audio")})},"audio"),(x.includes("text")||u==="text")&&y!==null&&R.jsx("div",{className:u==="text"?"h-full min-h-0 flex flex-col":"hidden",children:R.jsx(I0e,{text:y,language:h,className:"flex-1 min-h-0"})},"text"),x.includes("platform")&&R.jsx("div",{className:u==="platform"?"h-full min-h-0 flex flex-col":"hidden",children:R.jsx(tye,{filePath:a,mode:"platform",className:"flex-1 min-h-0"})},"platform"),x.includes("instance")&&R.jsx("div",{className:u==="instance"?"h-full min-h-0 flex flex-col":"hidden",children:R.jsx(tye,{filePath:a,mode:"instance",className:"flex-1 min-h-0"})},"instance"),x.includes("signal-database")&&y!==null&&R.jsx("div",{className:u==="signal-database"?"h-full":"hidden",children:R.jsx("div",{children:"Signal Database Viewer"})},"signal-database"),x.includes("dashboard")&&R.jsx("div",{className:u==="dashboard"?"flex flex-col":"hidden",children:R.jsx(Put,{filePath:a})},"dashboard")]}),k=u==="dashboard";return R.jsxs(rb,{maxWidth:"full",className:k?"overflow-auto":"overflow-hidden",children:[R.jsx(YS,{className:"p-0",children:R.jsx(UUe,{fileName:d,filePath:a,fileIcon:T,viewModeOptions:w,currentViewMode:u,onViewModeChange:A,onCloseOtherTabs:()=>(n==null?void 0:n.id)&&t(n.id),hasOtherTabs:i.length>1})}),R.jsx(ib,{className:Nr("p-0",!k&&"min-h-0"),children:R.jsx("div",{className:Nr("flex flex-col",!k&&"flex-1 min-h-0 overflow-hidden"),children:L()},`fileviewer-${a}`)})]})}function Tdt(r){return R.jsxs("div",{className:"flex rounded-md border border-border px-4 py-2 bg-card justify-between items-center",children:[R.jsxs("div",{className:"flex flex-col gap-0",children:[R.jsx("span",{className:"text-md text-card-foreground",children:r.label}),R.jsx("span",{className:"text-sm text-muted-foreground text-card-foreground",children:r.description})]}),R.jsx("span",{className:"text-md text-muted-foreground",children:r.value})]})}function aS(r){return R.jsxs("a",{href:r.href,target:"_blank",rel:"noopener noreferrer",className:"rounded-xl border border-border bg-card p-4 hover:bg-muted/50 transition-colors group flex items-start gap-4",children:[R.jsx("div",{className:"p-2 rounded-lg bg-muted group-hover:bg-background transition-colors",children:R.jsx(Fr,{type:r.iconType,className:"w-5 h-5 text-muted-foreground group-hover:text-foreground transition-colors"})}),R.jsxs("div",{children:[R.jsx("p",{className:"font-medium text-card-foreground group-hover:text-foreground transition-colors",children:r.title}),R.jsx("p",{className:"text-sm text-muted-foreground",children:r.description})]})]})}const xdt={route:fc.ABOUT,title:"About",contextId:ps.ABOUT,icon:Vi.CONTEXT_ABOUT,component:Edt};function Edt(){const{environment:r}=Dg(),e=()=>R.jsxs(R.Fragment,{children:[R.jsx("h2",{className:"text-lg font-semibold text-foreground mb-5",children:"RemotiveLabs resources"}),R.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2 sm:gap-3 ",children:[R.jsx(aS,{iconType:sr.CONTENT_BOOK_TEXT,title:"Documentation",description:"Read the official documentation",href:"https://docs.remotivelabs.com"}),R.jsx(aS,{iconType:sr.BRAND_GITHUB,title:"GitHub",description:"View source code and contribute",href:"https://github.com/remotivelabs"}),R.jsx(aS,{iconType:sr.PANEL_TOP,title:"Website",description:"Read more about RemotiveLabs",href:"https://remotivelabs.com"}),R.jsx(aS,{iconType:sr.CONTENT_NEWS,title:"Blog",description:"Read news, guides & articles",href:"https://www.remotivelabs.com/blog"}),R.jsx(aS,{iconType:sr.BRAND_YOUTUBE,title:"Youtube",description:"Watch video guides & demos",href:"https://www.youtube.com/channel/UClSPiaP1zWIZEMgsDF7AODQ"}),R.jsx(aS,{iconType:sr.BRAND_LINKEDIN,title:"LinkedIn",description:"Follow for company updates",href:"https://www.linkedin.com/company/remotivelabs"})]})]}),i=()=>R.jsxs(R.Fragment,{children:[R.jsx("h2",{className:"text-lg font-semibold text-foreground mb-5",children:"Legal"}),R.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2 sm:gap-3 ",children:[R.jsx(aS,{iconType:sr.FILE_GENERIC,title:"Privacy Policy",description:"How we handle your data",href:"https://www.remotivelabs.com/privacy-policy"}),R.jsx(aS,{iconType:sr.FILE_GENERIC,title:"EULA",description:"Terms and license information",href:"https://www.remotivelabs.com/license"})]})]}),n=()=>R.jsxs(R.Fragment,{children:[R.jsx("h2",{className:"text-lg font-semibold text-foreground mb-5",children:"Version Information"}),R.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2 sm:gap-3 ",children:r.versions.map(t=>R.jsx(Tdt,{label:t.name,value:t.version},t.name))})]});return R.jsxs(rb,{children:[R.jsx(YS,{title:"About",description:"Information about RemotiveStudio and RemotiveLabs"}),R.jsxs(ib,{children:[R.jsx("section",{className:"mb-10",children:n()}),R.jsx("section",{className:"mb-10",children:i()}),R.jsx("section",{className:"mb-10",children:e()})]})]})}const Adt={route:fc.TOPOLOGY_PLATFORM,title:"Platform",contextId:ps.TOPOLOGY,icon:Vi.SYSTEM_SERVER,component:wdt};function wdt(){return R.jsxs(rb,{children:[R.jsx(YS,{title:"Platform",description:"View the platform that the running topology is using"}),R.jsx(ib,{children:R.jsxs("div",{className:"rounded-2xl border-2 border-dashed border-border bg-muted/20 p-16 flex flex-col items-center justify-center text-center",children:[R.jsx("div",{className:"p-5 rounded-2xl bg-muted mb-6",children:R.jsx(Fr,{type:sr.SYSTEM_SERVER,className:"w-10 h-10 text-muted-foreground"})}),R.jsx("h2",{className:"text-xl font-semibold text-foreground mb-3",children:"Coming soon..."}),R.jsx("p",{className:"text-muted-foreground max-w-lg",children:"This is where you'll be able to visualize the platform that the running topology is using"})]})})]})}const Odt={route:fc.TOPOLOGY_INSTANCE,title:"Instance",contextId:ps.TOPOLOGY,icon:Vi.OBJECT_BOX,component:Ddt};function Ddt(){return R.jsxs(rb,{children:[R.jsx(YS,{title:"Instance",description:"View the instance of the running topology"}),R.jsx(ib,{children:R.jsxs("div",{className:"rounded-2xl border-2 border-dashed border-border bg-muted/20 p-16 flex flex-col items-center justify-center text-center",children:[R.jsx("div",{className:"p-5 rounded-2xl bg-muted mb-6",children:R.jsx(Fr,{type:sr.OBJECT_BOX,className:"w-10 h-10 text-muted-foreground"})}),R.jsx("h2",{className:"text-xl font-semibold text-foreground mb-3",children:"Coming soon..."}),R.jsx("p",{className:"text-muted-foreground max-w-lg",children:"This is where you'll be able to visualize the instance of the running topology"})]})})]})}const Rdt={route:fc.TOPOLOGY_RESTBUS,title:"Restbus",contextId:ps.TOPOLOGY,icon:Vi.OBJECT_BUS,component:Mdt};function Mdt(){return R.jsxs(rb,{children:[R.jsx(YS,{title:"Restbus",description:"Configure the restbus simulation for the running topology"}),R.jsx(ib,{children:R.jsxs("div",{className:"rounded-2xl border-2 border-dashed border-border bg-muted/20 p-16 flex flex-col items-center justify-center text-center",children:[R.jsx("div",{className:"p-5 rounded-2xl bg-muted mb-6",children:R.jsx(Fr,{type:sr.OBJECT_BUS,className:"w-10 h-10 text-muted-foreground"})}),R.jsx("h2",{className:"text-xl font-semibold text-foreground mb-3",children:"Coming soon..."}),R.jsx("p",{className:"text-muted-foreground max-w-lg",children:"This is where you'll be able to configure restbus simulation"})]})})]})}const Ldt={route:fc.TOPOLOGY_API_PLAYGROUND,title:"API Playground",contextId:ps.TOPOLOGY,icon:Vi.CONTENT_CODE,component:kdt};function kdt(){return R.jsxs(rb,{children:[R.jsx(YS,{title:"API Playground",description:"Explore and test the API of the running topology interactively"}),R.jsx(ib,{children:R.jsxs("div",{className:"rounded-2xl border-2 border-dashed border-border bg-muted/20 p-16 flex flex-col items-center justify-center text-center",children:[R.jsx("div",{className:"p-5 rounded-2xl bg-muted mb-6",children:R.jsx(Fr,{type:sr.FILE_CODE,className:"w-10 h-10 text-muted-foreground"})}),R.jsx("h2",{className:"text-xl font-semibold text-foreground mb-3",children:"Coming soon..."}),R.jsx("p",{className:"text-muted-foreground max-w-lg",children:"This is where you'll be able to interact with the running topology, e.g. send CAN messages or call SOME/IP services."})]})})]})}function Idt(){return R.jsx(rb,{children:R.jsx(ib,{className:"flex items-center justify-center min-h-[60vh]",children:R.jsx(Gdt,{title:"Page not found",description:"The page you're looking for doesn't exist or has been moved."})})})}function Ndt(r){const e=r.error?[r.error.message,r.error.stack].filter(Boolean).join(`

`):null;return R.jsx("div",{className:"min-h-screen flex flex-col items-center justify-center w-full p-5",children:R.jsxs("div",{className:"w-full max-w-3xl bg-background rounded-md border border-border/70 p-5",children:[R.jsx("div",{className:"flex flex-col items-center justify-center text-center gap-6 w-full",children:R.jsxs("div",{className:"py-14 px-6",children:[R.jsx("p",{className:"text-lg text-foreground",children:"Something went wrong..."}),R.jsxs("p",{className:"text-muted-foreground text-sm",children:["If this keeps happening, please contact"," ",R.jsx("a",{href:"mailto:support@remotivelabs.com",children:"support@remotivelabs.com"}),"."]}),R.jsx("div",{className:"mt-6",children:R.jsx("button",{type:"button",className:Nr(Q$,eq[Qo.PRIMARY],"gap-2 px-5 py-2 text-sm rounded-full"),onClick:()=>{sessionStorage.clear(),window.location.href="/"},children:"Reload application"})})]})}),e&&R.jsxs("div",{className:"w-full",children:[R.jsx("label",{className:"text-sm font-medium text-muted-foreground mb-1 block",children:"Error details"}),R.jsx("textarea",{readOnly:!0,className:Nr("w-full min-h-[200px] p-2 rounded-md border border-border bg-muted","font-mono text-xs text-foreground resize-y"),value:e,"aria-label":"Error details"})]})]})})}const Iz=[l3e,u3e,bdt,Adt,Odt,Rdt,Ldt,Sut,xdt],Fdt=new Map(Iz.map(r=>[r.route,r]));function Nz(r){return Fdt.get(r)}function jdt(r){return Iz.filter(e=>e.contextId===r)}const Bdt=new Set([ps.TOPOLOGY,ps.FILES]);function z7(r){return Bdt.has(r.id)}function Vdt(r,e){if(r==="/")return null;const i=new URLSearchParams(e);if(r===fc.FILES){const t=i.get("path")||"",o=t.split("/").pop()||"File",a=i.get("fileType")??void 0,s=i.get("viewMode")??void 0,l=`file:${t}`;return{id:l,open:u=>u(fc.FILES,{id:l,title:o,params:{path:t,fileType:a,viewMode:s}})}}const n=Iz.find(t=>t.route===r);return n?{id:n.route,open:t=>t(n.route)}:null}function Hdt(r){const e=r.type;if(!r.params)return e;const i=new URLSearchParams;for(const[t,o]of Object.entries(r.params))o!==void 0&&i.set(t,o);const n=i.toString();return n?`${e}?${n}`:e}function IOe(r){return r==="/"||r===fc.FILES?!0:Iz.some(e=>e.route===r)}const NOe=G.createContext(null);function Udt(){return typeof window>"u"?"/":window.location.pathname}function zdt(r){const e=G.useContext(_q);if(!e)throw new Error("PagesProvider must be used within an ActivityTabsProvider");const[i,n]=G.useState(Udt),t=!IOe(i),o={pages:e.tabs,activePage:e.activeTab,effectivePathname:i,isNotFoundRoute:t,setEffectivePathname:n,openPage:e.openTab,setActivePage:e.switchActiveTab};return R.jsx(NOe.Provider,{value:o,children:r.children})}function u_(){const r=G.useContext(NOe);if(!r)throw new Error("usePages must be used within a PagesProvider");return{pages:r.pages,activePage:r.activePage,isNotFoundRoute:r.isNotFoundRoute,effectivePathname:r.effectivePathname,setEffectivePathname:r.setEffectivePathname,openPage:r.openPage,setActivePage:r.setActivePage}}const FOe=G.createContext(null);function Wdt(r){const e=G.useMemo(()=>({tabId:r.tabId,params:r.params}),[r.tabId,r.params]);return R.jsx(FOe.Provider,{value:e,children:r.children})}function jOe(){const r=G.useContext(FOe);if(!r)throw new Error("usePageParams must be used within a PageParamsProvider");return{tabId:r.tabId,params:r.params}}function Gdt(r){const{openPage:e}=u_();return R.jsxs("div",{className:"flex flex-col items-center justify-center text-center gap-6 min-h-[60vh]",children:[R.jsx("p",{className:"text-8xl font-bold text-muted-foreground/20",children:"404"}),R.jsxs("div",{className:"space-y-2",children:[R.jsx("h1",{className:"text-2xl font-bold text-foreground",children:r.title}),R.jsx("p",{className:"text-muted-foreground max-w-md",children:r.description})]}),R.jsx(Uc,{onClick:()=>{e(fc.OVERVIEW)},label:"Back to overview",type:Qo.PRIMARY})]})}class Ydt extends G.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}render(){return this.state.error?this.props.fallback(this.state.error):this.props.children}}function $dt(r){const{handleContextClick:e,isContextActive:i,getIcon:n}=CM({onPanelContextSelect:r.onContextSelect}),t=r.contexts.filter(c=>c.position===M0.MAIN),o=r.contexts.filter(c=>c.position===M0.BOTTOM),a=c=>{const d=n(c.icon),f=i(c.id);return R.jsx(l0e,{label:c.label,side:"right",children:R.jsx("button",{onClick:()=>e(c),className:Nr("w-10 h-10 rounded-md flex items-center justify-center transition-all duration-200","hover:bg-white/10 hover:shadow-sm",f?"bg-white/15 text-white shadow-sm":"text-green-400"),"data-testid":`context-tab-${c.id}`,"data-context":c.id,"data-active":f,children:R.jsx(Fr,{type:d,className:"w-5 h-5"})})},c.id)},s=()=>R.jsx("div",{className:"flex flex-col gap-1",children:t.map(a)}),l=()=>R.jsx("div",{className:"flex flex-col gap-1 items-center",children:o.map(a)}),u=R.jsx("div",{className:"p-2 mb-4",children:R.jsx("div",{className:"w-8 h-8 rounded-md flex items-center justify-center",children:R.jsx("img",{src:"/images/remotivelabs-logo_icon-neg_low.png",alt:"RemotiveStudio",className:"w-full h-full"})})});return R.jsxs("div",{className:"flex flex-col items-center gap-1 py-2 w-14 text-white/80",children:[u,s(),R.jsx("div",{className:"flex-1"}),l()]})}function qdt(r){const[e,i]=G.useState(""),[n,t]=G.useState(!1),o=G.useRef(null),{getDirectoryContents:a}=UF();G.useEffect(()=>{const f=requestAnimationFrame(()=>{var h;return(h=o.current)==null?void 0:h.focus()});return()=>cancelAnimationFrame(f)},[]);const s=e.trim(),l=s?s.startsWith("/")?s:`/dashboards/${s}.dashboard.json`:"",u=()=>{s&&r.onCreate(s)},c=f=>{f.key==="Enter"&&s?u():f.key==="Escape"&&r.onClose()},d=G.useRef([]);return G.useEffect(()=>{a("/dashboards").then(f=>{d.current=f})},[a]),G.useEffect(()=>{t(d.current.some(f=>f.path===l))},[l]),R.jsx(AH,{show:!0,onClose:r.onClose,size:"sm",children:R.jsxs("div",{className:"p-5",children:[R.jsx("h3",{className:"text-sm font-medium mb-4",children:"New Dashboard"}),R.jsx("div",{className:"space-y-4",children:R.jsxs("div",{children:[R.jsx("label",{className:"block text-xs text-muted-foreground mb-1",children:"Name"}),R.jsx("input",{ref:o,type:"text",value:e,onChange:f=>i(f.target.value),onKeyDown:c,placeholder:"My Dashboard",className:"w-full px-2 py-1.5 text-sm rounded border border-border bg-background focus:outline-none focus:ring-1 focus:ring-primary disabled:opacity-50 disabled:cursor-not-allowed"})]})}),n&&R.jsx("p",{className:"text-xs text-red-500 mt-2",children:"A dashboard with this name already exists."}),R.jsxs("div",{className:"flex justify-end gap-2 mt-4",children:[R.jsx(Uc,{type:Qo.PRIMARY,size:Vl.SM,label:"Cancel",onClick:r.onClose}),R.jsx(Uc,{type:n?Qo.DESTRUCTIVE:Qo.SUCCESS,size:Vl.SM,label:r.isSaving?"Creating...":n?"Overwrite":"Create",onClick:u})]}),l&&R.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:l})]})})}function BOe(r){const[e,i]=G.useState(!1),[n,t]=G.useState(!1),o=UF(),{refreshFileTree:a}=Lq(),s=kq(),l=G.useCallback(u=>{if(!u||n)return;t(!0);const c=u.startsWith("/")?u:`/dashboards/${u}.dashboard.json`,d=yut(u);o.uploadAsFile(c,d).then(()=>{a(),i(!1),s(c,"FILE_TYPE_DASHBOARD")}).catch(f=>{console.error("Error creating dashboard:",f.message),Gn.error("Error creating dashboard")}).finally(()=>{t(!1)})},[n,o,a,s]);return R.jsxs(R.Fragment,{children:[R.jsxs("button",{onClick:()=>i(!0),className:Nr("w-full flex items-center gap-2.5 px-3 py-2 text-sm text-left","transition-colors duration-150","hover:bg-white/5",r.className),children:[R.jsx(Fr,{type:sr.ACTION_ADD,className:"w-4 h-4 opacity-70 text-blue-400"}),R.jsx("span",{children:"New Dashboard"})]}),e&&R.jsx(qdt,{onClose:()=>i(!1),onCreate:l,isSaving:n})]})}const Xdt=224,Kdt=140,Zdt=800;function Jdt(r){var h;const{togglePanelCollapsed:e}=CM(),[i,n]=G.useState(Xdt),[t,o]=G.useState(!1),a=G.useRef(null),s=(h=r.activeContext)==null?void 0:h.id,l=p=>{p.preventDefault(),o(!0)};G.useEffect(()=>{if(!t)return;const p=v=>{if(!a.current)return;const y=a.current.getBoundingClientRect(),m=v.clientX-y.left;n(Math.max(Kdt,Math.min(Zdt,m)))},g=()=>{o(!1)};return document.addEventListener("mousemove",p),document.addEventListener("mouseup",g),()=>{document.removeEventListener("mousemove",p),document.removeEventListener("mouseup",g)}},[t]);const u=()=>!r.collapsed&&R.jsx("div",{onMouseDown:l,className:`absolute top-0 right-0 w-2 h-full cursor-ew-resize 
            hover:bg-white/20 active:bg-white/20 transition-colors`}),c=()=>R.jsx(l0e,{label:"Collapse panel",side:"right",children:R.jsx("button",{onClick:e,className:"p-1 rounded-sm hover:bg-white/10 transition-colors",children:R.jsx(Fr,{type:sr.PANEL_LEFT_CLOSE,className:"w-5 h-5 text-white/90"})})}),d=()=>{var p;switch(s){case ps.TOPOLOGY:case ps.FILES:return R.jsxs(R.Fragment,{children:[R.jsx("h2",{className:"text-sm font-semibold text-white capitalize",children:((p=r.activeContext)==null?void 0:p.label)||s}),c()]});default:return R.jsx(R.Fragment,{})}},f=()=>{switch(s){case ps.TOPOLOGY:return R.jsx(BOe,{});case ps.FILES:return R.jsx(k0e,{});default:return R.jsx(R.Fragment,{})}};return R.jsxs("div",{ref:a,className:`relative transition-[width] overflow-hidden
        ${r.collapsed?"w-0":""}
        ${t?"duration-0":"duration-300 ease-in-out"}`,style:{width:r.collapsed?0:i},"data-testid":"context-panel","data-collapsed":r.collapsed,children:[R.jsxs("div",{className:"h-full border-s border-white/10 flex flex-col text-white/80",style:{width:i},children:[R.jsx("div",{className:"ps-3 pe-3 pt-3 pb-2 flex items-center justify-between",children:d()}),R.jsx("div",{className:"flex-1 overflow-auto",children:R.jsx("div",{className:"min-w-max",children:f()})})]}),u()]})}function Qdt(){const{contexts:r,activeContext:e,panelCollapsed:i,setActiveContext:n}=CM(),t=z7(e)&&!i;return R.jsxs("div",{className:Nr("flex h-full rounded-md overflow-hidden shrink-0","bg-[radial-gradient(183.91%_56.41%_at_13.33%_6.53%,#05345a_13.13%,#001324_93.52%)]","dark:bg-[radial-gradient(183.91%_56.41%_at_13.33%_6.53%,#222222_13.13%,#10121c_93.52%)]","border border-border/70"),style:{boxShadow:"var(--shadow-sidebar)"},"data-testid":"sidebar",children:[R.jsx($dt,{contexts:r,onContextSelect:n}),R.jsx(Jdt,{activeContext:e,collapsed:!t})]})}const VOe=50,eft=50,HOe=80,tft=`calc(100vh - ${HOe}px)`,rft=`calc(100vh - ${HOe+eft}px)`;function ift(r){const[e,i]=G.useState(null),{contexts:n,allContexts:t,setActiveContext:o,handleContextClick:a,isContextActive:s,getIcon:l}=CM({onPanelContextSelect:p=>{e===p?i(null):(i(p),o(p))},onNavigate:()=>i(null)}),u=n.find(p=>p.id===e),c=u&&(u.id===ps.FILES||u.id===ps.TOPOLOGY),d=()=>R.jsxs(R.Fragment,{children:[c&&R.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm z-40 transition-opacity duration-300",onClick:()=>i(null)}),R.jsx("div",{className:Nr("fixed z-50","transition-all duration-300 ease-out",c?"opacity-100 translate-y-0":"opacity-0 translate-y-full pointer-events-none"),style:{left:r.gap,right:r.gap,bottom:VOe+r.gap},children:R.jsxs("div",{className:Nr("rounded-t-md overflow-hidden","bg-black/80","border border-white/40","shadow-2xl"),style:{maxHeight:tft},children:[R.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-white/10",children:[R.jsx("h2",{className:"text-sm font-semibold text-white capitalize",children:u==null?void 0:u.label}),R.jsx("button",{onClick:()=>i(null),className:"w-8 h-8 flex items-center justify-center text-white/60 hover:bg-white/10 hover:text-white transition-colors",children:R.jsx(Fr,{type:sr.NAV_CHEVRON_DOWN,className:"w-5 h-5"})})]}),R.jsxs("div",{className:"overflow-auto text-white/80",style:{maxHeight:rft},children:[e===ps.TOPOLOGY&&R.jsx(BOe,{className:"px-4 py-3 gap-3"}),e===ps.FILES&&R.jsx("div",{className:"px-2 py-2",children:R.jsx(k0e,{})})]})]})})]}),f=()=>R.jsx(R.Fragment,{children:R.jsx("div",{className:Nr("fixed bottom-0 z-50","bg-[radial-gradient(183.91%_56.41%_at_50%_0%,#05345a_13.13%,#001324_93.52%)]","dark:bg-[radial-gradient(183.91%_56.41%_at_50%_0%,#222222_13.13%,#10121c_93.52%)]",c?"rounded-b-md":"rounded-md","safe-area-inset-bottom","border border-white/20 "),style:{left:r.gap,right:r.gap,bottom:r.gap,boxShadow:"0 -4px 20px rgba(0, 0, 0, 0.3)",paddingBottom:"env(safe-area-inset-bottom, 0px)"},"data-testid":"mobile-sidebar",children:R.jsx("div",{className:"flex items-center justify-center px-1",children:t.map(h)})})}),h=p=>{const g=l(p.icon),v=s(p.id);return R.jsxs("button",{onClick:()=>a(p),className:Nr("flex flex-col items-center justify-center gap-0.5 min-w-[64px]","transition-all duration-200","active:scale-95"," m-0 p-1",v?"text-white":"text-green-400",v?"bg-white/15 shadow-sm":"hover:bg-white/10"),"data-testid":`mobile-context-tab-${p.id}`,"data-context":p.id,"data-active":v,children:[R.jsx("div",{className:Nr("w-6 h-6 flex items-center justify-center transition-all duration-200"),children:R.jsx(Fr,{type:g,className:"w-4 h-4"})}),R.jsx("span",{className:"text-[10px] text-white font-medium",children:p.label})]},p.id)};return R.jsxs(R.Fragment,{children:[d(),f()]})}const nft={"not-found":"SECURITY_LOCK",overview:"CONTEXT_HOME",files:"CONTEXT_FILES",dashboard:"CONTEXT_DASHBOARD",topology:"CONTEXT_TOPOLOGY",settings:"CONTEXT_SETTINGS",about:"CONTEXT_ABOUT"};function oft(r){return r.includes(":")?r:r.replace(/^\//,"").replace(/\//g,"-")}function aft(r){const e=G.useRef(null);G.useEffect(()=>{r.isActive&&e.current&&e.current.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})},[r.isActive]);const i=s=>{s.preventDefault(),s.stopPropagation(),r.onClose()},n=Nz(r.tab.type),t=n!=null&&n.contextId?FF(nft[n.contextId]):null,o=r.tab.title??(n==null?void 0:n.title)??"Page",a=oft(r.tab.id);return R.jsxs("div",{ref:e,onClick:r.onSelect,className:Nr("group flex items-center gap-1.5 px-2 h-7 cursor-pointer transition-all duration-200 rounded-sm min-w-30 relative select-none no-underline",r.isActive?"bg-topbar-tab-active text-topbar-tab-active-foreground shadow-sm":"bg-topbar-tab text-topbar-tab-foreground hover:bg-topbar-tab-hover hover:text-topbar-foreground"),"data-testid":`page-tab-${a}`,"data-active":r.isActive,children:[R.jsx("button",{type:"button",onClick:i,onMouseDown:s=>s.stopPropagation(),className:Nr("flex-shrink-0 p-0.5 rounded transition-all duration-200","group-hover:opacity-100","hover:bg-white/60 dark:hover:bg-white/20",r.isActive&&" hover:bg-white/20"),"data-testid":`page-tab-close-${a}`,children:R.jsx(Fr,{type:sr.ACTION_CLOSE,className:"w-3 h-3"})}),R.jsx("span",{className:"text-xs font-medium truncate",children:o}),t&&R.jsx(Fr,{type:t,className:"w-3.5 h-3.5 flex-shrink-0 opacity-70"})]})}function sft(){const{tabs:r,activeTab:e,setActiveTab:i,closeTab:n}=Pq();return R.jsx("div",{className:"flex items-center gap-1 h-full px-1 pr-3 flex-nowrap w-full","data-testid":"page-tabs",children:r.map(t=>R.jsx(aft,{tab:t,isActive:t.id===(e==null?void 0:e.id),onSelect:()=>i(t.id),onClose:()=>n(t.id)},t.id))})}const UOe=G.createContext(null);class lft{constructor(e){To(this,"studioBackendUrl");this.studioBackendUrl=e.endsWith("/")?e.slice(0,-1):e}async getCurrentUser(){try{const e=await fetch(`${this.studioBackendUrl}/auth/whoami`);return e.ok?await e.json():(console.error(`Failed to fetch user info: ${e.status}`),null)}catch(e){return console.error("Error fetching current user:",e),null}}}function uft(r){return G.useMemo(()=>new lft(r),[r])}function cft(r){const{environment:e}=Dg(),i=uft(e.studioBackendUrl),[n,t]=G.useState(null),[o,a]=G.useState(!0);G.useEffect(()=>{let l=!0;async function u(){if(e.authMode){const c=await i.getCurrentUser();l&&(t(c),a(!1))}else t(null),a(!1)}return u(),()=>{l=!1}},[i,e]);const s={user:n,isLoading:o};return R.jsx(UOe.Provider,{value:s,children:r.children})}function dft(){const r=G.useContext(UOe);if(!r)throw new Error("useUser must be used within a UserProvider");return r}function fft({user:r,onClose:e,show:i}){const n=[r.givenName,r.familyName].join(" "),t=()=>R.jsxs(R.Fragment,{children:[R.jsx("h2",{className:"text-lg font-semibold text-neutral-900 dark:text-white",children:n}),R.jsx("p",{className:"text-sm text-neutral-500 dark:text-neutral-400 mt-1",children:r.email})]}),o=()=>R.jsx(R.Fragment,{children:r.picture?R.jsx("img",{src:r.picture,alt:n,className:"w-20 h-20 rounded-full mb-4 object-cover shadow-lg"}):R.jsx("div",{className:Nr("w-20 h-20 rounded-full mb-4","bg-gradient-to-br from-green-400 to-emerald-600","flex items-center justify-center","shadow-lg"),children:R.jsx(Fr,{type:sr.USER_PROFILE,className:"w-10 h-10 text-white"})})});return R.jsx(AH,{show:i,onClose:e,size:"sm",children:R.jsx("div",{className:"p-6 pb-5",children:R.jsxs("div",{className:"flex flex-col items-center text-center",children:[o(),t()]})})})}const rye=200,iye=Nr("flex items-center gap-2 px-3 py-2","text-xs text-neutral-700 dark:text-neutral-200","hover:bg-neutral-100 dark:hover:bg-neutral-700","transition-colors");function hft({dropdownRef:r,position:e,children:i}){return au.createPortal(R.jsx("div",{ref:r,className:Nr("fixed z-[9999]","min-w-[200px] py-1","bg-white dark:bg-neutral-800","border border-neutral-200 dark:border-neutral-700","rounded-md shadow-lg","animate-fade-in"),style:{top:e.top,left:e.left},children:i}),document.body)}function pft(r){const e=r.compact??!1,{user:i,isLoading:n}=dft(),[t,o]=G.useState(!1),[a,s]=G.useState(!1),[l,u]=G.useState(null),c=G.useRef(null),d=G.useRef(null),f=!!i,h=(i==null?void 0:i.givenName)||(i==null?void 0:i.email.split("@")[0]);G.useEffect(()=>{if(t&&c.current){const g=c.current.getBoundingClientRect(),v=rye;let y=g.right-v;y<8&&(y=8),u({top:g.bottom+4,left:y})}},[t]),G.useEffect(()=>{function g(v){const y=v.target;c.current&&!c.current.contains(y)&&d.current&&!d.current.contains(y)&&o(!1)}if(t)return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[t]);const p=()=>{o(!1),s(!0)};return n?R.jsx("div",{className:Nr("flex items-center gap-1.5 h-7 my-auto rounded-sm","bg-neutral-200/80 dark:bg-neutral-800/40","border border-neutral-300/50 dark:border-neutral-700/50","animate-pulse","px-1",e?"w-12":"w-24"),children:R.jsx("div",{className:"w-5 h-5 rounded-md bg-neutral-300 dark:bg-neutral-700"})}):R.jsxs(R.Fragment,{children:[R.jsxs("button",{ref:c,onClick:()=>o(!t),className:Nr("flex items-center gap-1.5 h-7 my-auto rounded-sm","transition-colors cursor-pointer",f?["bg-green-200/80 dark:bg-green-900/40","border border-green-300/50 dark:border-green-700/50","hover:bg-green-300/80 dark:hover:bg-green-800/50","px-1"]:["bg-neutral-200/80 dark:bg-neutral-800/40","border border-neutral-300/50 dark:border-neutral-700/50","hover:bg-neutral-300/80 dark:hover:bg-neutral-700/50",e?"px-2":"px-3"]),children:[i!=null&&i.picture?R.jsx("img",{src:i.picture,alt:h,className:"w-5 h-5 rounded-md object-cover"}):R.jsx("div",{className:Nr("flex items-center justify-center w-5 h-5 rounded-md",f?"bg-green-300 dark:bg-green-700":"bg-neutral-300 dark:bg-neutral-700"),children:R.jsx(Fr,{type:sr.USER_PROFILE,className:Nr("w-3 h-3",f?"text-green-700 dark:text-green-200":"text-neutral-500 dark:text-neutral-400")})}),!e&&R.jsx("span",{className:Nr(`text-xs truncate max-w-[${rye}px]`,f?"text-green-800 dark:text-green-200":"text-neutral-600 dark:text-neutral-400"),children:h??"Not signed in"}),R.jsx(Fr,{type:sr.NAV_CHEVRON_DOWN,className:Nr("w-3 h-3 transition-transform",f?"text-green-700 dark:text-green-300":"text-neutral-500 dark:text-neutral-400",t&&"rotate-180")})]}),t&&l&&R.jsxs(hft,{dropdownRef:d,position:l,children:[f&&R.jsxs("button",{onClick:p,className:Nr(iye,"w-full text-left"),children:[R.jsx(Fr,{type:sr.USER_PROFILE_CIRCLE,className:"w-4 h-4 text-neutral-500 dark:text-neutral-400"}),"Profile information"]}),R.jsxs("a",{href:"https://cloud.remotivelabs.com",target:"_blank",rel:"noopener noreferrer",onClick:()=>o(!1),className:iye,children:[R.jsx(Fr,{type:sr.ACTION_EXTERNAL_LINK,className:"w-4 h-4 text-neutral-500 dark:text-neutral-400"}),"Go to RemotiveCloud"]})]}),i&&R.jsx(fft,{show:a,user:i,onClose:()=>s(!1)})]})}const gft="flex items-center justify-center h-7 w-7 my-auto rounded-sm border px-1",vft=()=>{const{connectedBroker:r}=xU(),{environment:e}=Dg(),i="text-xs p-1 flex flex-col gap-0.5",t=(u=>R.jsxs("div",{className:i,children:[R.jsx("div",{className:"font-semibold",children:"RemotiveBroker"}),R.jsx("span",{className:"font-mono text-[11px]",children:u?(r==null?void 0:r.grpcUrl)||"":e.brokerUrl||"—"}),R.jsx("div",{className:"text-muted-foreground flex items-center gap-1.5 mt-0.5",children:u?R.jsxs(R.Fragment,{children:[R.jsx(Fr,{type:sr.SYSTEM_WIFI,className:"w-3.5 h-3.5 text-green-500"}),R.jsx("span",{children:"Connected"})]}):R.jsxs(R.Fragment,{children:[R.jsx(Fr,{type:sr.SYSTEM_WIFI_OFF,className:"w-3.5 h-3.5 text-red-500"}),R.jsx("span",{children:"Disconnected"})]})})]}))(r!==void 0),o=r?sr.SYSTEM_WIFI:sr.SYSTEM_WIFI_OFF,a=r?"text-green-600 dark:text-green-500":"text-red-700 dark:text-red-600",s=r?"dark:bg-green-500/20 bg-green-500/30 border-green-300/50 dark:border-green-700/50":"dark:bg-red-600/20 bg-red-500/30 border-red-300/50 dark:border-red-700/50",l=r?"border-green-300/50 dark:border-green-700/50":"border-red-300/50 dark:border-red-700/50";return R.jsx("div",{className:"flex items-center",children:R.jsx(PM,{content:t,children:R.jsx("div",{className:`${gft} ${s} ${l} ${a}`,children:R.jsx(Fr,{type:o,className:"w-4 h-4"})})})})};function yft(){const r=w1e();return R.jsxs("div",{className:"flex items-center h-10 w-full max-w-full bg-topbar text-topbar-foreground rounded-md rounded-b-none overflow-hidden border border-b-0",style:{boxShadow:"var(--shadow-topbar)"},"data-testid":"top-bar",children:[R.jsx("div",{className:"flex-1 min-w-0 h-full overflow-x-auto overflow-y-hidden scrollbar-thin",children:R.jsx(sft,{})}),R.jsx("div",{className:"flex-shrink-0 px-1 border-s",children:R.jsxs("div",{className:"flex items-center gap-1",children:[R.jsx(vft,{}),R.jsx(pft,{compact:r})]})})]})}function mft(){const{pages:r,activePage:e,isNotFoundRoute:i}=u_();return i?R.jsx(Idt,{}):r.length===0?R.jsx(c0e,{}):R.jsx(R.Fragment,{children:r.map(n=>{const t=Nz(n.type);if(!t)return null;const o=t.component;return R.jsx(G.Activity,{mode:n.id===(e==null?void 0:e.id)?"visible":"hidden",children:R.jsx(Wdt,{tabId:n.id,params:n.params,children:R.jsx(o,{})})},n.id)})})}const E0=6,bft=VOe+E0+7;function Sft(){const r=w1e(),e=r?{paddingTop:E0,paddingLeft:E0,paddingRight:E0,paddingBottom:0}:{padding:E0,gap:E0};return R.jsxs("div",{className:Nr("w-screen flex",r?"h-screen flex-col min-h-0":"h-screen flex-row"),style:e,children:[!r&&R.jsx("div",{className:Nr(`shrink-0 sticky top-[${E0}px] h-[calc(100vh-${E0*2}px)]`),children:R.jsx(Qdt,{})}),R.jsxs("div",{className:Nr("flex-1 min-w-0 flex flex-col",r&&"min-h-0"),style:{boxShadow:"var(--shadow-page)"},children:[R.jsx("div",{className:Nr("shrink-0 z-10 w-full max-w-full"),children:R.jsx(yft,{})}),R.jsx("main",{className:Nr("flex-1 min-h-0 flex flex-col bg-background rounded-md rounded-t-none border border-border/100 overflow-auto"),style:{marginBottom:r?bft:void 0,paddingBottom:r?"env(safe-area-inset-bottom, 0px)":void 0},"data-testid":"page-view",children:R.jsx("div",{className:"flex-1 min-h-0 flex flex-col",children:R.jsx(mft,{})})})]}),r&&R.jsx(ift,{gap:E0})]})}function _ft(){const{environment:r}=Dg();return R.jsx(t4e,{brokerUrl:r.brokerUrl,children:R.jsx(Wrt,{children:R.jsx(Q3e,{children:R.jsx(a3e,{children:R.jsx(cft,{children:R.jsx(Sft,{})})})})})})}const Pft=WMe({routeTree:kMe({component:()=>R.jsx(Cme,{delayDuration:0,children:R.jsx($Ve,{children:R.jsxs(JVe,{children:[R.jsx(_ft,{}),R.jsx(XVe,{})]})})})}),disableGlobalCatchBoundary:!0});uRe.createRoot(document.getElementById("root")).render(R.jsx(An.StrictMode,{children:R.jsx(Ydt,{fallback:r=>R.jsx(Ndt,{error:r}),children:R.jsx($Me,{router:Pft})})}));export{mZ as _,R as j,G as r};
