Custom Gis Application with Arcgis Javascript API with modern layouting
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

247 lines
123 KiB

// All material copyright Esri, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.30/esri/copyright.txt for details.
//>>built
define("require exports ../intl ./Theme ./Tooltip ./DefaultTheme ../intl/locale".split(" "),function(v,ha,gb,g,ia,sa,ta){function ua(a,b,c){if(b!==c)throw Error("Required "+c+" arguments for "+a+" but got "+b);}function Q(a,b,c){if(b<c)throw Error("Required at least "+c+" arguments for "+a+" but got "+b);}function O(a,b,c){Q(a,b,c);if(0!==b%c)throw Error("Arguments for "+a+" must be in pairs of "+c);}function va(a){for(let c=0;c<a.length;c+=7){let d=c+3;var b=a[d];1<b.length&&(b=/^([01])([01])(.*)$/.exec(b),
null!==b&&(a.splice(d,0,b[1]),++d,a.splice(d,0,b[2]),++d,0<b[3].length?a[d]=b[3]:a.splice(d,1)));++d;b=a[d];1<b.length&&(b=/^([01])(.+)$/.exec(b),null!==b&&(a.splice(d,0,b[1]),++d,a[d]=b[2]))}}function ja(a){if(0===a||1===a)return a;throw Error("Flag must be 0 or 1");}function V(a,b){for(;!a.interactive||b(a);)if(a._parent)a=a._parent;else break}function wa(a,b,c){return g.addEventListener(a,g.getRendererEvent(b),d=>{const e=g.getEventTarget(d);let f=d.touches;f?(0==f.length&&(f=d.changedTouches),
c(g.copy$1(f),e)):c([d],e)})}function ka(a){var b=document.createElement("canvas");b.width=1;b.height=1;b=b.getContext("2d",{willReadFrequently:!0});b.drawImage(a,0,0,1,1);try{return b.getImageData(0,0,1,1),!1}catch(c){return console.warn('Image "'+a.src+'" is loaded from different host and is not covered by CORS policy. For more information about the implications read here: https://www.amcharts.com/docs/v5/concepts/cors'),!0}}function R(a){a.width=0;a.height=0;a.style.width="0px";a.style.height=
"0px"}function F(a,b){a.left=Math.min(a.left,b.x);a.top=Math.min(a.top,b.y);a.right=Math.max(a.right,b.x);a.bottom=Math.max(a.bottom,b.y)}function la(a,b){null==a?requestAnimationFrame(b):setTimeout(()=>{requestAnimationFrame(b)},1E3/a)}class xa{constructor(){Object.defineProperty(this,"_observer",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_targets",{enumerable:!0,configurable:!0,writable:!0,value:[]});this._observer=new ResizeObserver(a=>{g.each(a,b=>{g.each(this._targets,
c=>{c.target===b.target&&c.callback()})})})}addTarget(a,b){this._observer.observe(a,{box:"border-box"});this._targets.push({target:a,callback:b})}removeTarget(a){this._observer.unobserve(a);g.keepIf(this._targets,b=>b.target!==a)}}class Z{constructor(){Object.defineProperty(this,"_timer",{enumerable:!0,configurable:!0,writable:!0,value:null});Object.defineProperty(this,"_targets",{enumerable:!0,configurable:!0,writable:!0,value:[]})}addTarget(a,b){if(null===this._timer){let c=null;const d=()=>{const e=
Date.now();if(null===c||e>c+Z.delay)c=e,g.each(this._targets,f=>{let k=f.target.getBoundingClientRect();if(k.width!==f.size.width||k.height!==f.size.height)f.size=k,f.callback()});this._timer=0===this._targets.length?null:requestAnimationFrame(d)};this._timer=requestAnimationFrame(d)}this._targets.push({target:a,callback:b,size:{width:0,height:0,left:0,right:0,top:0,bottom:0,x:0,y:0}})}removeTarget(a){g.keepIf(this._targets,b=>b.target!==a);0===this._targets.length&&null!==this._timer&&(cancelAnimationFrame(this._timer),
this._timer=null)}}Object.defineProperty(Z,"delay",{enumerable:!0,configurable:!0,writable:!0,value:200});let aa=null;class ya{constructor(a,b){Object.defineProperty(this,"_sensor",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_element",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_listener",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_disposed",{enumerable:!0,configurable:!0,
writable:!0,value:!1});null===aa&&(aa="undefined"!==typeof ResizeObserver?new xa:new Z);this._sensor=aa;this._element=a;this._listener=g.onZoom(b);this._sensor.addTarget(a,b)}isDisposed(){return this._disposed}dispose(){this._disposed||(this._disposed=!0,this._sensor.removeTarget(this._element),this._listener.dispose())}get sensor(){return this._sensor}}class W extends g.Entity{}Object.defineProperty(W,"className",{enumerable:!0,configurable:!0,writable:!0,value:"InterfaceColors"});Object.defineProperty(W,
"classNames",{enumerable:!0,configurable:!0,writable:!0,value:g.Entity.classNames.concat([W.className])});class ma extends g.Entity{_setDefaults(){this._setDefault("negativeBase",0);this._setDefault("numberFormat","#,###.#####");this._setDefault("smallNumberThreshold",1);this._setDefault("bigNumberPrefixes",[{number:1E3,suffix:this._t("_big_number_suffix_3")},{number:1E6,suffix:this._t("_big_number_suffix_6")},{number:1E9,suffix:this._t("_big_number_suffix_9")},{number:1E12,suffix:this._t("_big_number_suffix_12")},
{number:1E15,suffix:this._t("_big_number_suffix_15")},{number:1E18,suffix:this._t("_big_number_suffix_18")},{number:1E21,suffix:this._t("_big_number_suffix_21")},{number:1E24,suffix:this._t("_big_number_suffix_24")}]);this._setDefault("smallNumberPrefixes",[{number:1E-24,suffix:this._t("_small_number_suffix_24")},{number:1E-21,suffix:this._t("_small_number_suffix_21")},{number:1E-18,suffix:this._t("_small_number_suffix_18")},{number:1E-15,suffix:this._t("_small_number_suffix_15")},{number:1E-12,suffix:this._t("_small_number_suffix_12")},
{number:1E-9,suffix:this._t("_small_number_suffix_9")},{number:1E-6,suffix:this._t("_small_number_suffix_6")},{number:.001,suffix:this._t("_small_number_suffix_3")}]);this._setDefault("bytePrefixes",[{number:1,suffix:this._t("_byte_suffix_B")},{number:1024,suffix:this._t("_byte_suffix_KB")},{number:1048576,suffix:this._t("_byte_suffix_MB")},{number:1073741824,suffix:this._t("_byte_suffix_GB")},{number:1099511627776,suffix:this._t("_byte_suffix_TB")},{number:0x4000000000000,suffix:this._t("_byte_suffix_PB")}]);
super._setDefaults()}_beforeChanged(){super._beforeChanged()}format(a,b,c){if(null==b||g.isString(b)&&"number"===b.toLowerCase())b=this.get("numberFormat","");a=Number(a);if(g.isObject(b))try{return this.get("intlLocales")?(new Intl.NumberFormat(this.get("intlLocales"),b)).format(a):(new Intl.NumberFormat(void 0,b)).format(a)}catch(d){return"Invalid"}else b=g.cleanFormat(b),b=this.parseFormat(b,this._root.language),b=a>this.get("negativeBase")?b.positive:a<this.get("negativeBase")?b.negative:b.zero,
null==c||b.mod||(b=g.copy(b),b.decimals.active=0==a?0:c),c=b.template.split(g.PLACEHOLDER).join(this.applyFormat(a,b));!0===this.get("forceLTR")&&(c="\u200e"+c);return c}parseFormat(a,b){var c=b.translateEmpty("_thousandSeparator");b=b.translateEmpty("_decimalSeparator");c={positive:{thousands:{active:-1,passive:-1,interval:-1,separator:c},decimals:{active:-1,passive:-1,separator:b},template:"",source:"",parsed:!1},negative:{thousands:{active:-1,passive:-1,interval:-1,separator:c},decimals:{active:-1,
passive:-1,separator:b},template:"",source:"",parsed:!1},zero:{thousands:{active:-1,passive:-1,interval:-1,separator:c},decimals:{active:-1,passive:-1,separator:b},template:"",source:"",parsed:!1}};a=a.replace("||",g.PLACEHOLDER2);a=a.split("|");c.positive.source=a[0];"undefined"===typeof a[2]?c.zero=c.positive:c.zero.source=a[2];"undefined"===typeof a[1]?c.negative=c.positive:c.negative.source=a[1];g.each$1(c,(d,e)=>{if(!e.parsed){d=e.source;"number"===d.toLowerCase()&&(d=this.get("numberFormat",
"#,###.#####"));d=g.TextFormatter.chunk(d,!0);for(let k=0;k<d.length;k++){let l=d[k];l.text=l.text.replace(g.PLACEHOLDER2,"|");if("value"===l.type){let n=l.text.match(/[#0.,]+[ ]?[abespABESP%!]?[abespABESP\u2030!]?/);if(n)if(null===n||""===n[0])e.template+=l.text;else{var f=n[0].match(/[abespABESP%\u2030!]{2}|[abespABESP%\u2030]{1}$/);f&&(e.mod=f[0].toLowerCase(),e.modSpacing=n[0].match(/[ ]{1}[abespABESP%\u2030!]{1}$/)?!0:!1);f=n[0].split(".");if(""!==f[0]){e.thousands.active=(f[0].match(/0/g)||
[]).length;e.thousands.passive=(f[0].match(/#/g)||[]).length+e.thousands.active;let m=f[0].split(",");1!==m.length&&(e.thousands.interval=(m.pop()||"").length,0===e.thousands.interval&&(e.thousands.interval=-1))}"undefined"!==typeof f[1]&&(e.decimals.active=(f[1].match(/0/g)||[]).length,e.decimals.passive=(f[1].match(/#/g)||[]).length+e.decimals.active);e.template+=l.text.split(n[0]).join(g.PLACEHOLDER)}}else e.template+=l.text}e.parsed=!0}});return c}applyFormat(a,b){let c=0>a;a=Math.abs(a);let d=
"";var e="";let f=b.mod?b.mod.split(""):[];-1!==f.indexOf("b")?(e=this.applyPrefix(a,this.get("bytePrefixes"),-1!==f.indexOf("!")),a=e[0],d=e[1],e=e[2],b.modSpacing&&(e=" "+e)):-1!==f.indexOf("a")?(e=this.applyPrefix(a,a<this.get("smallNumberThreshold")?this.get("smallNumberPrefixes"):this.get("bigNumberPrefixes"),-1!==f.indexOf("!")),a=e[0],d=e[1],e=e[2],b.modSpacing&&(e=" "+e)):-1!==f.indexOf("p")?(a=parseFloat(a.toPrecision(Math.min(a.toString().length+2,21))),d=this._root.language.translate("_percentPrefix"),
e=this._root.language.translate("_percentSuffix"),""==d&&""==e&&(e="%")):-1!==f.indexOf("%")?(a=parseFloat((100*a).toPrecision(Math.min(a.toString().length+2,21))),e="%"):-1!==f.indexOf("\u2030")&&(a=parseFloat((1E3*a).toPrecision(Math.min(a.toString().length+3,21))),e="\u2030");if(-1!==f.indexOf("e"))e=0<=b.decimals.passive?a.toExponential(b.decimals.passive).split("e"):a.toExponential().split("e"),a=Number(e[0]),e="e"+e[1],b.modSpacing&&(e=" "+e);else if(0===b.decimals.passive)a=Math.round(a);else if(0<
b.decimals.passive){var k=Math.pow(10,b.decimals.passive);a=Math.round(a*k)/k}k="";var l=g.numberToString(a).split("."),n=l[0];n.length<b.thousands.active&&(n=Array(b.thousands.active-n.length+1).join("0")+n);if(0<b.thousands.interval){let m=[],p=n.split("").reverse().join("");for(let t=0,h=n.length;t<=h;t+=b.thousands.interval)n=p.substr(t,b.thousands.interval).split("").reverse().join(""),""!==n&&m.unshift(n);n=m.join(b.thousands.separator)}k+=n;1===l.length&&l.push("");l=l[1];l.length<b.decimals.active&&
(l+=Array(b.decimals.active-l.length+1).join("0"));""!==l&&(k+=b.decimals.separator+l);""===k&&(k="0");0!==a&&c&&-1===f.indexOf("s")&&(k="-"+k);d&&(k=d+k);e&&(k+=e);return k}applyPrefix(a,b,c=!1){let d=a,e="",f="",k=!1,l=1;for(let n=0,m=b.length;n<m;n++)b[n].number<=a&&(0===b[n].number?d=0:(d=a/b[n].number,l=b[n].number),e=b[n].prefix,f=b[n].suffix,k=!0);!k&&c&&b.length&&0!=a&&(d=a/b[0].number,e=b[0].prefix,f=b[0].suffix,k=!0);k&&(d=parseFloat(d.toPrecision(Math.min(l.toString().length+Math.floor(d).toString().replace(/[^0-9]*/g,
"").length,21))));return[d,e,f]}escape(a){return a.replace("||",g.PLACEHOLDER2)}unescape(a){return a.replace(g.PLACEHOLDER2,"|")}}class za extends g.Entity{_setDefaults(){this._setDefault("capitalize",!0);this._setDefault("dateFormat","yyyy-MM-dd");super._setDefaults()}_beforeChanged(){super._beforeChanged()}format(a,b,c=!1){if("undefined"===typeof b||""===b)b=this.get("dateFormat","yyyy-MM-dd");if(g.isObject(b))try{var d=this.get("intlLocales");return d?(new Intl.DateTimeFormat(d,b)).format(a):(new Intl.DateTimeFormat(void 0,
b)).format(a)}catch(e){return"Invalid"}b=this.parseFormat(b);d=this._root.timezone;!d||this._root.utc||c||(a=d.convertLocal(a));if(!g.isNumber(a.getTime()))return"Invalid date";c=this.applyFormat(a,b,c);this.get("capitalize")&&(c=c.replace(/^.{1}/,c.substr(0,1).toUpperCase()));return c}applyFormat(a,b,c=!1){let d=b.template,e,f,k,l,n,m,p,t=a.getTime();this._root.utc&&!c?(c=a.getUTCFullYear(),e=a.getUTCMonth(),f=a.getUTCDay(),k=a.getUTCDate(),l=a.getUTCHours(),n=a.getUTCMinutes(),m=a.getUTCSeconds(),
p=a.getUTCMilliseconds()):(c=a.getFullYear(),e=a.getMonth(),f=a.getDay(),k=a.getDate(),l=a.getHours(),n=a.getMinutes(),m=a.getSeconds(),p=a.getMilliseconds());for(let r=0,w=b.parts.length;r<w;r++){var h="";switch(b.parts[r]){case "G":h=this._t(0>c?"_era_bc":"_era_ad");break;case "yyyy":h=Math.abs(c).toString();0>c&&(h+=this._t("_era_bc"));break;case "yyy":case "yy":case "y":h=Math.abs(c).toString().substr(-b.parts[r].length);0>c&&(h+=this._t("_era_bc"));break;case "YYYY":case "YYY":case "YY":case "Y":var u=
g.getWeekYear(a,this._root.utc);h="YYYY"==b.parts[r]?Math.abs(u).toString():Math.abs(u).toString().substr(-b.parts[r].length);0>u&&(h+=this._t("_era_bc"));break;case "q":h=""+Math.ceil((a.getMonth()+1)/3);break;case "MMMMM":h=this._t(this._getMonth(e)).substr(0,1);break;case "MMMM":h=this._t(this._getMonth(e));break;case "MMM":h=this._t(this._getShortMonth(e));break;case "MM":h=g.padString(e+1,2,"0");break;case "M":h=(e+1).toString();break;case "ww":h=g.padString(g.getWeek(a,this._root.utc),2,"0");
break;case "w":h=g.getWeek(a,this._root.utc).toString();break;case "W":h=g.getMonthWeek(a,this._root.utc).toString();break;case "dd":h=g.padString(k,2,"0");break;case "d":h=k.toString();break;case "DD":case "DDD":h=g.padString(g.getYearDay(a,this._root.utc).toString(),b.parts[r].length,"0");break;case "D":h=g.getYearDay(a,this._root.utc).toString();break;case "t":h=this._root.language.translateFunc("_dateOrd").call(this,k);break;case "E":h=(f||7).toString();break;case "EE":h=g.padString((f||7).toString(),
2,"0");break;case "EEE":case "eee":h=this._t(this._getShortWeekday(f));break;case "EEEE":case "eeee":h=this._t(this._getWeekday(f));break;case "EEEEE":case "eeeee":h=this._t(this._getShortWeekday(f)).substr(0,1);break;case "e":case "ee":h=(f-(this._root.locale.firstDayOfWeek||1)+1).toString();"ee"==b.parts[r]&&(h=g.padString(h,2,"0"));break;case "a":h=12<=l?this._t("PM"):this._t("AM");break;case "aa":h=12<=l?this._t("P.M."):this._t("A.M.");break;case "aaa":h=12<=l?this._t("P"):this._t("A");break;
case "h":h=g.get12Hours(l).toString();break;case "hh":h=g.padString(g.get12Hours(l),2,"0");break;case "H":h=l.toString();break;case "HH":h=g.padString(l,2,"0");break;case "K":h=g.get12Hours(l,0).toString();break;case "KK":h=g.padString(g.get12Hours(l,0),2,"0");break;case "k":h=(l+1).toString();break;case "kk":h=g.padString(l+1,2,"0");break;case "m":h=n.toString();break;case "mm":h=g.padString(n,2,"0");break;case "s":h=m.toString();break;case "ss":h=g.padString(m,2,"0");break;case "S":case "SS":case "SSS":h=
Math.round(p/1E3*Math.pow(10,b.parts[r].length)).toString();break;case "x":h=t.toString();break;case "n":case "nn":case "nnn":h=g.padString(p,b.parts[r].length,"0");break;case "z":h=g.getTimeZone(a,!1,!1,this._root.utc,this._root.timezone?this._root.timezone.name:void 0).replace(/[+-]+[0-9]+$/,"");break;case "zz":h=g.getTimeZone(a,!0,!1,this._root.utc,this._root.timezone?this._root.timezone.name:void 0);break;case "zzz":h=g.getTimeZone(a,!1,!0,this._root.utc,this._root.timezone?this._root.timezone.name:
void 0).replace(/[+-]+[0-9]+$/,"");break;case "zzzz":h=g.getTimeZone(a,!0,!0,this._root.utc,this._root.timezone?this._root.timezone.name:void 0);break;case "Z":case "ZZ":u=(h=this._root.utc?"UTC":this._root.timezone)?g.getTimezoneOffset(h):a.getTimezoneOffset();h=Math.abs(u)/60;let q=Math.floor(h),A=60*h-60*q;this._root.utc&&(A=q=0);"Z"==b.parts[r]?(h="GMT",h+=0<u?"-":"+",h+=g.padString(q,2)+":"+g.padString(A,2)):(h=0<u?"-":"+",h+=g.padString(q,2)+g.padString(A,2));break;case "i":h=a.toISOString();
break;case "I":h=a.toUTCString()}d=d.replace(g.PLACEHOLDER,h)}return d}parseFormat(a){let b={template:"",parts:[]};a=g.TextFormatter.chunk(a,!0);for(let d=0;d<a.length;d++){let e=a[d];if("value"===e.type){if(e.text.match(/^date$/i)){var c=this.get("dateFormat","yyyy-MM-dd");g.isString(c)||(c="yyyy-MM-dd");e.text=c}if(c=e.text.match(/G|yyyy|yyy|yy|y|YYYY|YYY|YY|Y|u|q|MMMMM|MMMM|MMM|MM|M|ww|w|W|dd|d|DDD|DD|D|F|g|EEEEE|EEEE|EEE|EE|E|eeeee|eeee|eee|ee|e|aaa|aa|a|hh|h|HH|H|KK|K|kk|k|mm|m|ss|s|SSS|SS|S|A|zzzz|zzz|zz|z|ZZ|Z|t|x|nnn|nn|n|i|I/g))for(let f=
0;f<c.length;f++)b.parts.push(c[f]),e.text=e.text.replace(c[f],g.PLACEHOLDER)}b.template+=e.text}return b}_months(){return"January February March April May June July August September October November December".split(" ")}_getMonth(a){return this._months()[a]}_shortMonths(){return"Jan Feb Mar Apr May(short) Jun Jul Aug Sep Oct Nov Dec".split(" ")}_getShortMonth(a){return this._shortMonths()[a]}_weekdays(){return"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" ")}_getWeekday(a){return this._weekdays()[a]}_shortWeekdays(){return"Sun Mon Tue Wed Thu Fri Sat".split(" ")}_getShortWeekday(a){return this._shortWeekdays()[a]}parse(a,
b){if(a instanceof Date)return a;if(g.isNumber(a))return new Date(a);if("x"==b)return new Date(parseInt(a));g.isString(a)||(a=a.toString());var c="";b=g.cleanFormat(b);b=b.substr(0,a.length);let d=this.parseFormat(b);var e=-1,f=-1,k=-1,l=-1,n=-1,m=-1,p=-1,t=-1,h=-1,u=-1,r=-1,w=-1,q=-1,A=-1,y=-1,B=-1,H=-1,C=-1,L=-1,M=b=-1,G=-1,x=1970,I=0,z=1,D=0,K=0,N=0,S=0,P=null,ba=0,na=this._root.utc;let E=P=0;for(let T=0;T<d.parts.length;T++){E=T+P+1;switch(d.parts[T]){case "yyyy":case "YYYY":c+="([0-9]{4})";e=
E;break;case "yyy":case "YYY":c+="([0-9]{3})";f=E;break;case "yy":case "YY":c+="([0-9]{2})";k=E;break;case "y":case "Y":c+="([0-9]{1})";l=E;break;case "MMMM":c+="("+this.getStringList(this._months()).join("|")+")";p=E;break;case "MMM":c+="("+this.getStringList(this._shortMonths()).join("|")+")";m=E;break;case "MM":case "M":c+="([0-9]{2}|[0-9]{1})";n=E;break;case "ww":case "w":c+="([0-9]{2}|[0-9]{1})";u=E;break;case "dd":case "d":c+="([0-9]{2}|[0-9]{1})";t=E;break;case "DDD":case "DD":case "D":c+=
"([0-9]{3}|[0-9]{2}|[0-9]{1})";h=E;break;case "dddd":c+="("+this.getStringList(this._weekdays()).join("|")+")";break;case "ddd":c+="("+this.getStringList(this._shortWeekdays()).join("|")+")";break;case "aaa":case "aa":case "a":c+="("+this.getStringList("AM PM A.M. P.M. A P".split(" ")).join("|")+")";L=E;break;case "hh":case "h":c+="([0-9]{2}|[0-9]{1})";A=E;break;case "HH":case "H":c+="([0-9]{2}|[0-9]{1})";r=E;break;case "KK":case "K":c+="([0-9]{2}|[0-9]{1})";w=E;break;case "kk":case "k":c+="([0-9]{2}|[0-9]{1})";
q=E;break;case "mm":case "m":c+="([0-9]{2}|[0-9]{1})";y=E;break;case "ss":case "s":c+="([0-9]{2}|[0-9]{1})";B=E;break;case "SSS":case "SS":case "S":c+="([0-9]{3}|[0-9]{2}|[0-9]{1})";H=E;C=d.parts[T].length;break;case "nnn":case "nn":case "n":c+="([0-9]{3}|[0-9]{2}|[0-9]{1})";H=E;break;case "x":c+="([0-9]{1,})";M=E;break;case "Z":c+="GMT([-+]+[0-9]{2}:[0-9]{2})";b=E;break;case "ZZ":c+="([\\-+]+[0-9]{2}[0-9]{2})";b=E;break;case "i":c+="([0-9]{4})-?([0-9]{2})-?([0-9]{2})T?([0-9]{2}):?([0-9]{2}):?([0-9]{2})\\.?([0-9]{0,3})([zZ]|[+\\-][0-9]{2}:?[0-9]{2}|$)";
G=E;P+=7;break;case "G":case "YYYY":case "YYY":case "YY":case "Y":case "MMMMM":case "W":case "EEEEE":case "EEEE":case "EEE":case "EE":case "E":case "eeeee":case "eeee":case "eee":case "ee":case "e":case "zzzz":case "zzz":case "zz":case "z":case "t":P--}c+="[^0-9]*"}(c=a.match(new RegExp(c)))?(-1<e&&(x=parseInt(c[e])),-1<f&&(x=parseInt(c[f])+1E3),-1<k&&(x=parseInt(c[k]),x=50<x?x+1E3:x+2E3),-1<l&&(x=parseInt(c[l]),x=10*Math.floor((new Date).getFullYear()/10)+x),-1<p&&(I=this.resolveMonth(c[p])),-1<
m&&(I=this.resolveShortMonth(c[m])),-1<n&&(I=parseInt(c[n])-1),-1<u&&-1===t&&(I=0,z=g.getDayFromWeek(parseInt(c[u]),x,1,this._root.utc)),-1<t&&(z=parseInt(c[t])),-1<h&&(I=0,z=parseInt(c[h])),-1<r&&(D=parseInt(c[r])),-1<q&&(D=parseInt(c[q])-1),-1<w&&(D=parseInt(c[w]),11==D&&(D=0),-1<L&&!this.isAm(c[L])&&(D+=12)),-1<A&&(D=parseInt(c[A]),12==D&&(D=0),-1<L&&!this.isAm(c[L])&&(D+=12)),-1<y&&(K=parseInt(c[y])),-1<B&&(N=parseInt(c[B])),-1<H&&(y=parseInt(c[H]),2==C?y*=10:1==C&&(y*=100),S=y),-1<M&&(P=parseInt(c[M]),
C=new Date(P),x=C.getUTCFullYear(),I=C.getUTCMonth(),z=C.getUTCDate(),D=C.getUTCHours(),K=C.getUTCMinutes(),N=C.getUTCSeconds(),S=C.getUTCMilliseconds()),-1<b&&(ba=this.resolveTimezoneOffset(new Date(x,I,z),c[b])),-1<G&&(x=g.toNumber(c[G+0]),I=g.toNumber(c[G+1])-1,z=g.toNumber(c[G+2]),D=g.toNumber(c[G+3]),K=g.toNumber(c[G+4]),N=g.toNumber(c[G+5]),S=g.toNumber(c[G+6]),"Z"==c[G+7]||"z"==c[G+7]?na=!0:""!=c[G+7]&&(ba=this.resolveTimezoneOffset(new Date(x,I,z),c[G+7]))),b=na?new Date(Date.UTC(x,I,z,D,
K,N,S)):new Date(x,I,z,D,K+ba,N,S)):b=new Date(a);return b}resolveTimezoneOffset(a,b){if(b.match(/([+\-]?)([0-9]{2}):?([0-9]{2})/)){var c=b.match(/([+\-]?)([0-9]{2}):?([0-9]{2})/);b=c[1];let d=c[3];c=60*parseInt(c[2])+parseInt(d);"+"==b&&(c*=-1);a=(a||new Date).getTimezoneOffset();return c-a}return 0}resolveMonth(a){let b=this._months().indexOf(a);return-1<b||!this._root.language.isDefault()&&(b=this._root.language.translateAll(this._months()).indexOf(a),-1<b)?b:0}resolveShortMonth(a){let b=this._shortMonths().indexOf(a);
if(-1<b)return b;b=this._months().indexOf(a);return-1<b||this._root.language&&!this._root.language.isDefault()&&(b=this._root.language.translateAll(this._shortMonths()).indexOf(a),-1<b)?b:0}isAm(a){return-1<this.getStringList(["AM","A.M.","A"]).indexOf(a.toUpperCase())}getStringList(a){let b=[];for(let c=0;c<a.length;c++)this._root.language?b.push(g.escapeForRgex(this._t(a[c]))):b.push(g.escapeForRgex(a[c]));return b}}class Aa extends g.Entity{constructor(){super(...arguments);Object.defineProperty(this,
"_unitAliases",{enumerable:!0,configurable:!0,writable:!0,value:{Y:"y",D:"d",H:"h",K:"h",k:"h",n:"S"}})}_setDefaults(){this._setDefault("negativeBase",0);this._setDefault("baseUnit","second");this._setDefault("durationFormats",{millisecond:{millisecond:this._t("_duration_millisecond"),second:this._t("_duration_millisecond_second"),minute:this._t("_duration_millisecond_minute"),hour:this._t("_duration_millisecond_hour"),day:this._t("_duration_millisecond_day"),week:this._t("_duration_millisecond_week"),
month:this._t("_duration_millisecond_week"),year:this._t("_duration_millisecond_year")},second:{second:this._t("_duration_second"),minute:this._t("_duration_second_minute"),hour:this._t("_duration_second_hour"),day:this._t("_duration_second_day"),week:this._t("_duration_second_week"),month:this._t("_duration_second_week"),year:this._t("_duration_second_year")},minute:{minute:this._t("_duration_minute"),hour:this._t("_duration_minute_hour"),day:this._t("_duration_minute_day"),week:this._t("_duration_minute_week"),
month:this._t("_duration_minute_week"),year:this._t("_duration_minute_year")},hour:{hour:this._t("_duration_hour"),day:this._t("_duration_hour_day"),week:this._t("_duration_hour_week"),month:this._t("_duration_hour_week"),year:this._t("_duration_hour_year")},day:{day:this._t("_duration_day"),week:this._t("_duration_day_week"),month:this._t("_duration_day_week"),year:this._t("_duration_day_year")},week:{week:this._t("_duration_week"),month:this._t("_duration_week_week"),year:this._t("_duration_week_year")},
month:{month:this._t("_duration_month"),year:this._t("_duration_month_year")},year:{year:this._t("_duration_year")}});super._setDefaults()}_beforeChanged(){super._beforeChanged()}format(a,b,c){c=c||this.get("baseUnit");if("undefined"===typeof b||""===b)b=null!=this.get("durationFormat")?this.get("durationFormat"):this.getFormat(g.toNumber(a),void 0,c);b=g.cleanFormat(b);b=this.parseFormat(b,c);a=Number(a);b=a>this.get("negativeBase")?b.positive:a<this.get("negativeBase")?b.negative:b.zero;a=this.applyFormat(a,
b);""!==b.color&&(a="["+b.color+"]"+a+"[/]");return a}parseFormat(a,b){b=b||this.get("baseUnit");b={positive:{color:"",template:"",parts:[],source:"",baseUnit:b,parsed:!1,absolute:!1},negative:{color:"",template:"",parts:[],source:"",baseUnit:b,parsed:!1,absolute:!1},zero:{color:"",template:"",parts:[],source:"",baseUnit:b,parsed:!1,absolute:!1}};a=a.replace("||",g.PLACEHOLDER2);a=a.split("|");b.positive.source=a[0];"undefined"===typeof a[2]?b.zero=b.positive:b.zero.source=a[2];"undefined"===typeof a[1]?
b.negative=b.positive:b.negative.source=a[1];g.each$1(b,(c,d)=>{if(!d.parsed){c=d.source;var e=[];(e=d.source.match(/^\[([^\]]*)\]/))&&e.length&&""!==e[0]&&(c=d.source.substr(e[0].length),d.color=e[1]);c=g.TextFormatter.chunk(c,!0);for(e=0;e<c.length;e++){let f=c[e];f.text=f.text.replace(g.PLACEHOLDER2,"|");if("value"===f.type){f.text.match(/[yYMdDwhHKkmsSn]+a/)&&(d.absolute=!0,f.text=f.text.replace(/([yYMdDwhHKkmsSn]+)a/,"$1"));let k=f.text.match(/y+|Y+|M+|d+|D+|w+|h+|H+|K+|k+|m+|s+|S+|n+/g);if(k)for(let l=
0;l<k.length;l++)null==k[l]&&(k[l]=this._unitAliases[k[l]]),d.parts.push(k[l]),f.text=f.text.replace(k[l],g.PLACEHOLDER)}d.template+=f.text}d.parsed=!0}});return b}applyFormat(a,b){let c=!b.absolute&&a<this.get("negativeBase");a=Math.abs(a);a=this.toTimeStamp(a,b.baseUnit);let d=b.template;for(let f=0,k=b.parts.length;f<k;f++){var e=b.parts[f];let l=this._toTimeUnit(e.substr(0,1));e=e.length;let n=Math.floor(a/this._getUnitValue(l));d=d.replace(g.PLACEHOLDER,g.padString(n,e,"0"));a-=n*this._getUnitValue(l)}c&&
(d="-"+d);return d}toTimeStamp(a,b){return a*this._getUnitValue(b)}_toTimeUnit(a){switch(a){case "S":return"millisecond";case "s":return"second";case "m":return"minute";case "h":return"hour";case "d":return"day";case "w":return"week";case "M":return"month";case "y":return"year"}}getFormat(a,b,c){if(null!=this.get("durationFormat"))return this.get("durationFormat");c||=this.get("baseUnit");if(null!=b&&a!=b)return a=Math.abs(a),b=Math.abs(b),a=this.getValueUnit(Math.max(a,b),c),this.get("durationFormats")[c][a];
a=this.getValueUnit(a,c);return this.get("durationFormats")[c][a]}getValueUnit(a,b){b||=this.get("baseUnit");let c,d=this.getMilliseconds(a,b);g.eachContinue(this._getUnitValues(),(e,f)=>{if(e==b||c){if(1>=d/f)return c||=e,!1;c=e}return!0});return c}getMilliseconds(a,b){b||=this.get("baseUnit");return a*this._getUnitValue(b)}_getUnitValue(a){return this._getUnitValues()[a]}_getUnitValues(){return{millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5,month:2592E6,year:31536E6}}}const oa=
{firstDayOfWeek:1,_decimalSeparator:".",_thousandSeparator:",",_percentPrefix:null,_percentSuffix:"%",_big_number_suffix_3:"k",_big_number_suffix_6:"M",_big_number_suffix_9:"G",_big_number_suffix_12:"T",_big_number_suffix_15:"P",_big_number_suffix_18:"E",_big_number_suffix_21:"Z",_big_number_suffix_24:"Y",_small_number_suffix_3:"m",_small_number_suffix_6:"\u03bc",_small_number_suffix_9:"n",_small_number_suffix_12:"p",_small_number_suffix_15:"f",_small_number_suffix_18:"a",_small_number_suffix_21:"z",
_small_number_suffix_24:"y",_byte_suffix_B:"B",_byte_suffix_KB:"KB",_byte_suffix_MB:"MB",_byte_suffix_GB:"GB",_byte_suffix_TB:"TB",_byte_suffix_PB:"PB",_date:"yyyy-MM-dd",_date_millisecond:"mm:ss SSS",_date_millisecond_full:"HH:mm:ss SSS",_date_second:"HH:mm:ss",_date_second_full:"HH:mm:ss",_date_minute:"HH:mm",_date_minute_full:"HH:mm - MMM dd, yyyy",_date_hour:"HH:mm",_date_hour_full:"HH:mm - MMM dd, yyyy",_date_day:"MMM dd",_date_day_full:"MMM dd, yyyy",_date_week:"ww",_date_week_full:"MMM dd, yyyy",
_date_month:"MMM",_date_month_full:"MMM, yyyy",_date_year:"yyyy",_duration_millisecond:"SSS",_duration_millisecond_second:"ss.SSS",_duration_millisecond_minute:"mm:ss SSS",_duration_millisecond_hour:"hh:mm:ss SSS",_duration_millisecond_day:"d'd' mm:ss SSS",_duration_millisecond_week:"d'd' mm:ss SSS",_duration_millisecond_month:"M'm' dd'd' mm:ss SSS",_duration_millisecond_year:"y'y' MM'm' dd'd' mm:ss SSS",_duration_second:"ss",_duration_second_minute:"mm:ss",_duration_second_hour:"hh:mm:ss",_duration_second_day:"d'd' hh:mm:ss",
_duration_second_week:"d'd' hh:mm:ss",_duration_second_month:"M'm' dd'd' hh:mm:ss",_duration_second_year:"y'y' MM'm' dd'd' hh:mm:ss",_duration_minute:"mm",_duration_minute_hour:"hh:mm",_duration_minute_day:"d'd' hh:mm",_duration_minute_week:"d'd' hh:mm",_duration_minute_month:"M'm' dd'd' hh:mm",_duration_minute_year:"y'y' MM'm' dd'd' hh:mm",_duration_hour:"hh'h'",_duration_hour_day:"d'd' hh'h'",_duration_hour_week:"d'd' hh'h'",_duration_hour_month:"M'm' dd'd' hh'h'",_duration_hour_year:"y'y' MM'm' dd'd' hh'h'",
_duration_day:"d'd'",_duration_day_week:"d'd'",_duration_day_month:"M'm' dd'd'",_duration_day_year:"y'y' MM'm' dd'd'",_duration_week:"w'w'",_duration_week_month:"w'w'",_duration_week_year:"w'w'",_duration_month:"M'm'",_duration_month_year:"y'y' MM'm'",_duration_year:"y'y'",_era_ad:"AD",_era_bc:"BC",A:"",P:"",AM:"",PM:"","A.M.":"","P.M.":"",January:"",February:"",March:"",April:"",May:"",June:"",July:"",August:"",September:"",October:"",November:"",December:"",Jan:"",Feb:"",Mar:"",Apr:"","May(short)":"May",
Jun:"",Jul:"",Aug:"",Sep:"",Oct:"",Nov:"",Dec:"",Sunday:"",Monday:"",Tuesday:"",Wednesday:"",Thursday:"",Friday:"",Saturday:"",Sun:"",Mon:"",Tue:"",Wed:"",Thu:"",Fri:"",Sat:"",_dateOrd:function(a){let b="th";if(11>a||13<a)switch(a%10){case 1:b="st";break;case 2:b="nd";break;case 3:b="rd"}return b},"Zoom Out":"",Play:"",Stop:"",Legend:"","Press ENTER to toggle":"",Loading:"",Home:"",Chart:"","Serial chart":"","X/Y chart":"","Pie chart":"","Gauge chart":"","Radar chart":"","Sankey diagram":"","Flow diagram":"",
"Chord diagram":"","TreeMap chart":"","Force directed tree":"","Sliced chart":"",Series:"","Candlestick Series":"","OHLC Series":"","Column Series":"","Line Series":"","Pie Slice Series":"","Funnel Series":"","Pyramid Series":"","X/Y Series":"",Map:"","Press ENTER to zoom in":"","Press ENTER to zoom out":"","Use arrow keys to zoom in and out":"","Use plus and minus keys on your keyboard to zoom in and out":"",Export:"",Image:"",Data:"",Print:"","Press ENTER or use arrow keys to navigate":"","Press ENTER to open":"",
"Press ENTER to print.":"","Press ENTER to export as %1.":"","(Press ESC to close this message)":"","Image Export Complete":"","Export operation took longer than expected. Something might have gone wrong.":"","Saved from":"",PNG:"",JPG:"",GIF:"",SVG:"",PDF:"",JSON:"",CSV:"",XLSX:"",HTML:"","Use TAB to select grip buttons or left and right arrows to change selection":"","Use left and right arrows to move selection":"","Use left and right arrows to move left selection":"","Use left and right arrows to move right selection":"",
"Use TAB select grip buttons or up and down arrows to change selection":"","Use up and down arrows to move selection":"","Use up and down arrows to move lower selection":"","Use up and down arrows to move upper selection":"","From %1 to %2":"","From %1":"","To %1":"","No parser available for file: %1":"","Error parsing file: %1":"","Unable to load file: %1":"","Invalid date":"",Close:"",Minimize:""};class Ba extends g.Entity{_setDefaults(){this.setPrivate("defaultLocale",oa);super._setDefaults()}translate(a,
b,...c){b||=this._root.locale||this.getPrivate("defaultLocale");let d=a,e=b[a];if(null===e)d="";else if(null!=e)e&&(d=e);else if(b!==this.getPrivate("defaultLocale"))return this.translate(a,this.getPrivate("defaultLocale"),...c);if(c.length)for(let f=c.length,k=0;k<f;++k)d=d.split("%"+(k+1)).join(c[k]);return d}translateAny(a,b,...c){return this.translate(a,b,...c)}setTranslationAny(a,b,c){(c||this._root.locale)[a]=b}setTranslationsAny(a,b){g.each$1(a,(c,d)=>{this.setTranslationAny(c,d,b)})}translateEmpty(a,
b,...c){b=this.translate(a,b,...c);return b==a?"":b}translateFunc(a,b){return this._root.locale[a]?this._root.locale[a]:b!==this.getPrivate("defaultLocale")?this.translateFunc(a,this.getPrivate("defaultLocale")):()=>""}translateAll(a,b){return this.isDefault()?a:g.map(a,c=>this.translate(c,b))}isDefault(){return this.getPrivate("defaultLocale")===this._root.locale}}class ca{constructor(a=1,b=0,c=0,d=1,e=0,f=0){Object.defineProperty(this,"a",{enumerable:!0,configurable:!0,writable:!0,value:void 0});
Object.defineProperty(this,"b",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"c",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"d",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"tx",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"ty",{enumerable:!0,configurable:!0,writable:!0,value:void 0});this.a=a;this.b=b;this.c=c;this.d=d;this.tx=e;this.ty=
f}setTransform(a,b,c,d,e,f=1){this.a=Math.cos(e)*f;this.b=Math.sin(e)*f;this.c=-Math.sin(e)*f;this.d=Math.cos(e)*f;this.tx=a-(c*this.a+d*this.c);this.ty=b-(c*this.b+d*this.d)}apply(a){return{x:this.a*a.x+this.c*a.y+this.tx,y:this.b*a.x+this.d*a.y+this.ty}}applyInverse(a){const b=1/(this.a*this.d+this.c*-this.b);return{x:this.d*b*a.x+-this.c*b*a.y+(this.ty*this.c-this.tx*this.d)*b,y:this.a*b*a.y+-this.b*b*a.x+(-this.ty*this.a+this.tx*this.b)*b}}append(a){const b=this.a,c=this.b,d=this.c,e=this.d;this.a=
a.a*b+a.b*d;this.b=a.a*c+a.b*e;this.c=a.c*b+a.d*d;this.d=a.c*c+a.d*e;this.tx=a.tx*b+a.ty*d+this.tx;this.ty=a.tx*c+a.ty*e+this.ty}prepend(a){const b=this.tx;if(1!==a.a||0!==a.b||0!==a.c||1!==a.d){const c=this.a,d=this.c;this.a=c*a.a+this.b*a.c;this.b=c*a.b+this.b*a.d;this.c=d*a.a+this.d*a.c;this.d=d*a.b+this.d*a.d}this.tx=b*a.a+this.ty*a.c+a.tx;this.ty=b*a.b+this.ty*a.d+a.ty}copyFrom(a){this.a=a.a;this.b=a.b;this.c=a.c;this.d=a.d;this.tx=a.tx;this.ty=a.ty}}var Ca=function(){return function(a,b){if(Array.isArray(a))return a;
if(Symbol.iterator in Object(a)){var c=[],d=!0,e=!1,f=void 0;try{for(var k=a[Symbol.iterator](),l;!(d=(l=k.next()).done)&&(c.push(l.value),!b||c.length!==b);d=!0);}catch(n){e=!0,f=n}finally{try{if(!d&&k["return"])k["return"]()}finally{if(e)throw f;}}return c}throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),U=2*Math.PI,da=function(a,b,c,d,e,f,k){var l=a.x;a=a.y;l*=b;a*=c;return{x:d*l-e*a+f,y:e*l+d*a+k}},Da=function(a,b){var c=1.5707963267948966===b?.551915024494:-1.5707963267948966===
b?-.551915024494:4/3*Math.tan(b/4),d=Math.cos(a),e=Math.sin(a),f=Math.cos(a+b);a=Math.sin(a+b);return[{x:d-e*c,y:e+d*c},{x:f+a*c,y:a-f*c},{x:f,y:a}]},pa=function(a,b,c,d){var e=a*c+b*d;1<e&&(e=1);-1>e&&(e=-1);return(0>a*d-b*c?-1:1)*Math.acos(e)},Ea=function(a,b,c,d,e,f,k,l,n,m,p,t){var h=Math.pow(e,2),u=Math.pow(f,2),r=Math.pow(p,2),w=Math.pow(t,2),q=h*u-h*w-u*r;0>q&&(q=0);q=Math.sqrt(q/(h*w+u*r))*(k===l?-1:1);k=q*e/f*t;q=q*-f/e*p;a=m*k-n*q+(a+c)/2;b=n*k+m*q+(b+d)/2;d=(p-k)/e;n=(t-q)/f;e=(-p-k)/e;
t=(-t-q)/f;f=pa(1,0,d,n);t=pa(d,n,e,t);0===l&&0<t&&(t-=U);1===l&&0>t&&(t+=U);return[a,b,f,t]},Fa=function(a){var b=a.px,c=a.py,d=a.cx,e=a.cy,f=a.rx,k=a.ry,l=a.xAxisRotation,n=void 0===l?0:l;l=a.largeArcFlag;var m=a.sweepFlag;a=[];if(0===f||0===k)return[];var p=Math.sin(n*U/360),t=Math.cos(n*U/360);n=t*(b-d)/2+p*(c-e)/2;var h=-p*(b-d)/2+t*(c-e)/2;if(0===n&&0===h)return[];f=Math.abs(f);k=Math.abs(k);var u=Math.pow(n,2)/Math.pow(f,2)+Math.pow(h,2)/Math.pow(k,2);1<u&&(f*=Math.sqrt(u),k*=Math.sqrt(u));
b=Ea(b,c,d,e,f,k,void 0===l?0:l,void 0===m?0:m,p,t,n,h);c=Ca(b,4);var r=c[0],w=c[1];b=c[2];c=c[3];d=Math.abs(c)/(U/4);1E-7>Math.abs(1-d)&&(d=1);d=Math.max(Math.ceil(d),1);c/=d;for(e=0;e<d;e++)a.push(Da(b,c)),b+=c;return a.map(function(q){var A=da(q[0],f,k,t,p,r,w),y=A.x;A=A.y;var B=da(q[1],f,k,t,p,r,w),H=B.x;B=B.y;q=da(q[2],f,k,t,p,r,w);return{x1:y,y1:A,x2:H,y2:B,x:q.x,y:q.y}})};class Ga{constructor(){Object.defineProperty(this,"_x",{enumerable:!0,configurable:!0,writable:!0,value:0});Object.defineProperty(this,
"_y",{enumerable:!0,configurable:!0,writable:!0,value:0})}get x(){return this._x}get y(){return this._y}set x(a){this._x=a}set y(a){this._y=a}}class X extends g.DisposerClass{constructor(a){super();Object.defineProperty(this,"_layer",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"mask",{enumerable:!0,configurable:!0,writable:!0,value:null});Object.defineProperty(this,"visible",{enumerable:!0,configurable:!0,writable:!0,value:!0});Object.defineProperty(this,"exportable",
{enumerable:!0,configurable:!0,writable:!0,value:!0});Object.defineProperty(this,"interactive",{enumerable:!0,configurable:!0,writable:!0,value:!1});Object.defineProperty(this,"inactive",{enumerable:!0,configurable:!0,writable:!0,value:null});Object.defineProperty(this,"wheelable",{enumerable:!0,configurable:!0,writable:!0,value:!1});Object.defineProperty(this,"cancelTouch",{enumerable:!0,configurable:!0,writable:!0,value:!1});Object.defineProperty(this,"isMeasured",{enumerable:!0,configurable:!0,
writable:!0,value:!1});Object.defineProperty(this,"buttonMode",{enumerable:!0,configurable:!0,writable:!0,value:!1});Object.defineProperty(this,"alpha",{enumerable:!0,configurable:!0,writable:!0,value:1});Object.defineProperty(this,"compoundAlpha",{enumerable:!0,configurable:!0,writable:!0,value:1});Object.defineProperty(this,"angle",{enumerable:!0,configurable:!0,writable:!0,value:0});Object.defineProperty(this,"scale",{enumerable:!0,configurable:!0,writable:!0,value:1});Object.defineProperty(this,
"x",{enumerable:!0,configurable:!0,writable:!0,value:0});Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,writable:!0,value:0});Object.defineProperty(this,"crisp",{enumerable:!0,configurable:!0,writable:!0,value:!1});Object.defineProperty(this,"pivot",{enumerable:!0,configurable:!0,writable:!0,value:new Ga});Object.defineProperty(this,"filter",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"cursorOverStyle",{enumerable:!0,configurable:!0,writable:!0,
value:void 0});Object.defineProperty(this,"_replacedCursorStyle",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_localMatrix",{enumerable:!0,configurable:!0,writable:!0,value:new ca});Object.defineProperty(this,"_matrix",{enumerable:!0,configurable:!0,writable:!0,value:new ca});Object.defineProperty(this,"_uMatrix",{enumerable:!0,configurable:!0,writable:!0,value:new ca});Object.defineProperty(this,"_renderer",{enumerable:!0,configurable:!0,writable:!0,value:void 0});
Object.defineProperty(this,"_parent",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_localBounds",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_bounds",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_colorId",{enumerable:!0,configurable:!0,writable:!0,value:void 0});this._renderer=a}subStatus(a){return{inactive:null==this.inactive?a.inactive:this.inactive,layer:this._layer||a.layer}}_dispose(){this._renderer._removeObject(this);
this.getLayer().dirty=!0}getCanvas(){return this.getLayer().view}getLayer(){let a=this;for(;;){if(a._layer)return a._layer;if(a._parent)a=a._parent;else return this._renderer.defaultLayer}}setLayer(a,b){null==a?this._layer=void 0:(this._layer=this._renderer.getLayer(a,!0),this._layer.visible=!0,(this._layer.margin=b)&&g.setInteractive(this._layer.view,!1),this._renderer._ghostLayer.setMargin(this._renderer.layers),this._parent&&this._parent.registerChildLayer(this._layer),this._layer.dirty=!0,this._renderer.resizeLayer(this._layer),
this._renderer.resizeGhost())}markDirtyLayer(){this.getLayer().dirty=!0}clear(){this.invalidateBounds()}invalidateBounds(){this._localBounds=void 0}_addBounds(a){}_getColorId(){void 0===this._colorId&&(this._colorId=this._renderer.paintId(this));return this._colorId}_isInteractive(a){return!a.inactive&&(this.interactive||0<this._renderer._forceInteractive)}_isInteractiveMask(a){return this._isInteractive(a)}contains(a){for(;;){if(a===this)return!0;if(a._parent)a=a._parent;else return!1}}toGlobal(a){return this._matrix.apply(a)}toLocal(a){return this._matrix.applyInverse(a)}getLocalMatrix(){this._uMatrix.setTransform(0,
0,this.pivot.x,this.pivot.y,this.angle*Math.PI/180,this.scale);return this._uMatrix}getLocalBounds(){this._localBounds||(this._localBounds={left:1E7,top:1E7,right:-1E7,bottom:-1E7},this._addBounds(this._localBounds));return this._localBounds}getAdjustedBounds(a){this._setMatrix();const b=this.getLocalMatrix(),c=b.apply({x:a.left,y:a.top}),d=b.apply({x:a.right,y:a.top}),e=b.apply({x:a.right,y:a.bottom});a=b.apply({x:a.left,y:a.bottom});return{left:Math.min(c.x,d.x,e.x,a.x),top:Math.min(c.y,d.y,e.y,
a.y),right:Math.max(c.x,d.x,e.x,a.x),bottom:Math.max(c.y,d.y,e.y,a.y)}}on(a,b,c){return this.interactive?this._renderer._addEvent(this,a,b,c):new g.Disposer(()=>{})}_setMatrix(){this._localMatrix.setTransform(this.x,this.y,this.pivot.x,this.pivot.y,this.angle*Math.PI/180,this.scale);this._matrix.copyFrom(this._localMatrix);this._parent&&this._matrix.prepend(this._parent._matrix)}_transform(a,b){const c=this._matrix;let d=c.tx*b,e=c.ty*b;this.crisp&&(d=Math.floor(d)+.5,e=Math.floor(e)+.5);a.setTransform(c.a*
b,c.b*b,c.c*b,c.d*b,d,e)}_transformMargin(a,b,c){const d=this._matrix;a.setTransform(d.a*b,d.b*b,d.c*b,d.d*b,(d.tx+c.left)*b,(d.ty+c.top)*b)}_transformLayer(a,b,c){c.margin?this._transformMargin(a,c.scale||b,c.margin):this._transform(a,c.scale||b)}render(a){if(this.visible&&(!1!==this.exportable||!this._renderer._omitTainted)){this._setMatrix();a=this.subStatus(a);const b=this._renderer.resolution,c=this._renderer.layers,d=this._renderer._ghostLayer,e=d.context,f=this.mask;f&&f._setMatrix();g.each(c,
k=>{if(k){const l=k.context;l.save();f&&(f._transformLayer(l,b,k),f._runPath(l),l.clip());l.globalAlpha=this.compoundAlpha*this.alpha;this._transformLayer(l,b,k);this.filter&&(l.filter=this.filter)}});e.save();f&&this._isInteractiveMask(a)&&(f._transformMargin(e,b,d.margin),f._runPath(e),e.clip());this._transformMargin(e,b,d.margin);this._render(a);e.restore();g.each(c,k=>{k&&k.context.restore()})}}_render(a){!1===this.exportable&&(a.layer.tainted=!0)}hovering(){return this._renderer._hovering.has(this)}dragging(){return this._renderer._dragging.some(a=>
a.value===this)}shouldCancelTouch(){const a=this._renderer;return a.tapToActivate&&!a._touchActive?!1:this.cancelTouch?!0:this._parent?this._parent.shouldCancelTouch():!1}}class Ha extends X{constructor(){super(...arguments);Object.defineProperty(this,"interactiveChildren",{enumerable:!0,configurable:!0,writable:!0,value:!0});Object.defineProperty(this,"_childLayers",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_children",{enumerable:!0,configurable:!0,writable:!0,
value:[]})}_isInteractiveMask(a){return this.interactiveChildren||super._isInteractiveMask(a)}addChild(a){a._parent=this;this._children.push(a);a._layer&&this.registerChildLayer(a._layer)}addChildAt(a,b){a._parent=this;this._children.splice(b,0,a);a._layer&&this.registerChildLayer(a._layer)}removeChild(a){a._parent=void 0;g.removeFirst(this._children,a)}_render(a){super._render(a);const b=this._renderer;this.interactive&&this.interactiveChildren&&++b._forceInteractive;g.each(this._children,c=>{c.compoundAlpha=
this.compoundAlpha*this.alpha;c.render(a)});this.interactive&&this.interactiveChildren&&--b._forceInteractive}registerChildLayer(a){this._childLayers||(this._childLayers=[]);g.pushOne(this._childLayers,a);this._parent&&this._parent.registerChildLayer(a)}markDirtyLayer(a=!1){super.markDirtyLayer();a&&this._childLayers&&g.each(this._childLayers,b=>b.dirty=!0)}_dispose(){super._dispose();this._childLayers&&g.each(this._childLayers,a=>{a.dirty=!0})}}class J{colorize(a,b){}colorizeGhost(a,b){this.colorize(a,
b)}path(a){}pathGhost(a){this.path(a)}addBounds(a){}}class Ia extends J{colorize(a,b){a.beginPath()}}class ea extends J{constructor(a){super();Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,writable:!0,value:a})}colorize(a,b){a.fillStyle=void 0!==b?b:this.color}}class Ja extends J{constructor(a){super();Object.defineProperty(this,"clearShadow",{enumerable:!0,configurable:!0,writable:!0,value:a})}colorize(a,b){a.fill();this.clearShadow&&(a.shadowColor="",a.shadowBlur=0,a.shadowOffsetX=
0,a.shadowOffsetY=0)}}class Ka extends J{colorize(a,b){a.stroke()}}class fa extends J{constructor(a,b,c){super();Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,writable:!0,value:a});Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,writable:!0,value:b});Object.defineProperty(this,"lineJoin",{enumerable:!0,configurable:!0,writable:!0,value:c})}colorize(a,b){a.strokeStyle=void 0!==b?b:this.color;a.lineWidth=this.width;this.lineJoin&&(a.lineJoin=this.lineJoin)}}class La extends J{constructor(a){super();
Object.defineProperty(this,"dash",{enumerable:!0,configurable:!0,writable:!0,value:a})}colorize(a,b){a.setLineDash(this.dash)}}class Ma extends J{constructor(a){super();Object.defineProperty(this,"dashOffset",{enumerable:!0,configurable:!0,writable:!0,value:a})}colorize(a,b){a.lineDashOffset=this.dashOffset}}class Na extends J{constructor(a,b,c,d){super();Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,writable:!0,value:a});Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,
writable:!0,value:b});Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,writable:!0,value:c});Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,writable:!0,value:d})}path(a){a.rect(this.x,this.y,this.width,this.height)}addBounds(a){const b=this.x,c=this.y,d=b+this.width,e=c+this.height;F(a,{x:b,y:c});F(a,{x:d,y:c});F(a,{x:b,y:e});F(a,{x:d,y:e})}}class Oa extends J{constructor(a,b,c){super();Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,writable:!0,
value:a});Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,writable:!0,value:b});Object.defineProperty(this,"radius",{enumerable:!0,configurable:!0,writable:!0,value:c})}path(a){a.moveTo(this.x+this.radius,this.y);a.arc(this.x,this.y,this.radius,0,2*Math.PI)}addBounds(a){F(a,{x:this.x-this.radius,y:this.y-this.radius});F(a,{x:this.x+this.radius,y:this.y+this.radius})}}class Pa extends J{constructor(a,b,c,d){super();Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,writable:!0,
value:a});Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,writable:!0,value:b});Object.defineProperty(this,"radiusX",{enumerable:!0,configurable:!0,writable:!0,value:c});Object.defineProperty(this,"radiusY",{enumerable:!0,configurable:!0,writable:!0,value:d})}path(a){a.ellipse(0,0,this.radiusX,this.radiusY,0,0,2*Math.PI)}addBounds(a){F(a,{x:this.x-this.radiusX,y:this.y-this.radiusY});F(a,{x:this.x+this.radiusX,y:this.y+this.radiusY})}}class Qa extends J{constructor(a,b,c,d,e,f){super();
Object.defineProperty(this,"cx",{enumerable:!0,configurable:!0,writable:!0,value:a});Object.defineProperty(this,"cy",{enumerable:!0,configurable:!0,writable:!0,value:b});Object.defineProperty(this,"radius",{enumerable:!0,configurable:!0,writable:!0,value:c});Object.defineProperty(this,"startAngle",{enumerable:!0,configurable:!0,writable:!0,value:d});Object.defineProperty(this,"endAngle",{enumerable:!0,configurable:!0,writable:!0,value:e});Object.defineProperty(this,"anticlockwise",{enumerable:!0,
configurable:!0,writable:!0,value:f})}path(a){0<this.radius&&a.arc(this.cx,this.cy,this.radius,this.startAngle,this.endAngle,this.anticlockwise)}addBounds(a){let b=g.getArcBounds(this.cx,this.cy,this.startAngle*g.DEGREES,this.endAngle*g.DEGREES,this.radius);F(a,{x:b.left,y:b.top});F(a,{x:b.right,y:b.bottom})}}class Ra extends J{constructor(a,b,c,d,e){super();Object.defineProperty(this,"x1",{enumerable:!0,configurable:!0,writable:!0,value:a});Object.defineProperty(this,"y1",{enumerable:!0,configurable:!0,
writable:!0,value:b});Object.defineProperty(this,"x2",{enumerable:!0,configurable:!0,writable:!0,value:c});Object.defineProperty(this,"y2",{enumerable:!0,configurable:!0,writable:!0,value:d});Object.defineProperty(this,"radius",{enumerable:!0,configurable:!0,writable:!0,value:e})}path(a){0<this.radius&&a.arcTo(this.x1,this.y1,this.x2,this.y2,this.radius)}addBounds(a){}}class Sa extends J{constructor(a,b){super();Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,writable:!0,value:a});Object.defineProperty(this,
"y",{enumerable:!0,configurable:!0,writable:!0,value:b})}path(a){a.lineTo(this.x,this.y)}addBounds(a){F(a,{x:this.x,y:this.y})}}class Ta extends J{constructor(a,b){super();Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,writable:!0,value:a});Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,writable:!0,value:b})}path(a){a.moveTo(this.x,this.y)}addBounds(a){F(a,{x:this.x,y:this.y})}}class Ua extends J{path(a){a.closePath()}}class Va extends J{constructor(a,b,c,d,e,f){super();
Object.defineProperty(this,"cpX",{enumerable:!0,configurable:!0,writable:!0,value:a});Object.defineProperty(this,"cpY",{enumerable:!0,configurable:!0,writable:!0,value:b});Object.defineProperty(this,"cpX2",{enumerable:!0,configurable:!0,writable:!0,value:c});Object.defineProperty(this,"cpY2",{enumerable:!0,configurable:!0,writable:!0,value:d});Object.defineProperty(this,"toX",{enumerable:!0,configurable:!0,writable:!0,value:e});Object.defineProperty(this,"toY",{enumerable:!0,configurable:!0,writable:!0,
value:f})}path(a){a.bezierCurveTo(this.cpX,this.cpY,this.cpX2,this.cpY2,this.toX,this.toY)}addBounds(a){F(a,{x:this.cpX,y:this.cpY});F(a,{x:this.cpX2,y:this.cpY2});F(a,{x:this.toX,y:this.toY})}}class Wa extends J{constructor(a,b,c,d){super();Object.defineProperty(this,"cpX",{enumerable:!0,configurable:!0,writable:!0,value:a});Object.defineProperty(this,"cpY",{enumerable:!0,configurable:!0,writable:!0,value:b});Object.defineProperty(this,"toX",{enumerable:!0,configurable:!0,writable:!0,value:c});Object.defineProperty(this,
"toY",{enumerable:!0,configurable:!0,writable:!0,value:d})}path(a){a.quadraticCurveTo(this.cpX,this.cpY,this.toX,this.toY)}addBounds(a){F(a,{x:this.cpX,y:this.cpY});F(a,{x:this.toX,y:this.toY})}}class Xa extends J{constructor(a,b,c,d,e){super();Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,writable:!0,value:a});Object.defineProperty(this,"blur",{enumerable:!0,configurable:!0,writable:!0,value:b});Object.defineProperty(this,"offsetX",{enumerable:!0,configurable:!0,writable:!0,value:c});
Object.defineProperty(this,"offsetY",{enumerable:!0,configurable:!0,writable:!0,value:d});Object.defineProperty(this,"opacity",{enumerable:!0,configurable:!0,writable:!0,value:e})}colorize(a,b){this.opacity&&(a.fillStyle=this.color);a.shadowColor=this.color;a.shadowBlur=this.blur;a.shadowOffsetX=this.offsetX;a.shadowOffsetY=this.offsetY}colorizeGhost(a,b){}}class Ya extends J{constructor(a,b,c,d,e){super();Object.defineProperty(this,"image",{enumerable:!0,configurable:!0,writable:!0,value:a});Object.defineProperty(this,
"width",{enumerable:!0,configurable:!0,writable:!0,value:b});Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,writable:!0,value:c});Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,writable:!0,value:d});Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,writable:!0,value:e})}path(a){a.drawImage(this.image,this.x,this.y,this.width,this.height)}addBounds(a){F(a,{x:this.x,y:this.y});F(a,{x:this.width,y:this.height})}}class Za extends X{constructor(){super(...arguments);
Object.defineProperty(this,"_operations",{enumerable:!0,configurable:!0,writable:!0,value:[]});Object.defineProperty(this,"blendMode",{enumerable:!0,configurable:!0,writable:!0,value:g.BlendMode.NORMAL});Object.defineProperty(this,"_hasShadows",{enumerable:!0,configurable:!0,writable:!0,value:!1});Object.defineProperty(this,"_fillAlpha",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_strokeAlpha",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}clear(){super.clear();
this._operations.length=0}_pushOp(a){this._operations.push(a)}beginFill(a,b=1){this._fillAlpha=b;a?a instanceof g.Color?this._pushOp(new ea(a.toCSS(b))):(this.isMeasured=!0,this._pushOp(new ea(a))):this._pushOp(new ea("rgba(0, 0, 0, "+b+")"))}endFill(){this._pushOp(new Ja(this._hasShadows))}endStroke(){this._pushOp(new Ka)}beginPath(){this._pushOp(new Ia)}lineStyle(a=0,b,c=1,d){this._strokeAlpha=c;b?b instanceof g.Color?this._pushOp(new fa(a,b.toCSS(c),d)):this._pushOp(new fa(a,b,d)):this._pushOp(new fa(a,
"rgba(0, 0, 0, "+c+")",d))}setLineDash(a){this._pushOp(new La(a?a:[]))}setLineDashOffset(a=0){this._pushOp(new Ma(a))}drawRect(a,b,c,d){this._pushOp(new Na(a,b,c,d))}drawCircle(a,b,c){this._pushOp(new Oa(a,b,c))}drawEllipse(a,b,c,d){this._pushOp(new Pa(a,b,c,d))}arc(a,b,c,d,e,f=!1){this._pushOp(new Qa(a,b,c,d,e,f))}arcTo(a,b,c,d,e){this._pushOp(new Ra(a,b,c,d,e))}lineTo(a,b){this._pushOp(new Sa(a,b))}moveTo(a,b){this._pushOp(new Ta(a,b))}bezierCurveTo(a,b,c,d,e,f){this._pushOp(new Va(a,b,c,d,e,f))}quadraticCurveTo(a,
b,c,d){this._pushOp(new Wa(a,b,c,d))}closePath(){this._pushOp(new Ua)}shadow(a,b=0,c=0,d=0,e){this._hasShadows=!0;this._pushOp(new Xa(e?a.toCSS(e):a.toCSS(this._fillAlpha||this._strokeAlpha),b,c,d))}image(a,b,c,d,e){this._pushOp(new Ya(a,b,c,d,e))}svgPath(a){let b=0,c=0,d=null,e=null,f=null,k=null;const l=/([MmZzLlHhVvCcSsQqTtAa])([^MmZzLlHhVvCcSsQqTtAa]*)/g,n=/[\u0009\u0020\u000A\u000C\u000D]*([\+\-]?[0-9]*\.?[0-9]+(?:[eE][\+\-]?[0-9]+)?)[\u0009\u0020\u000A\u000C\u000D]*,?/g;for(var m;null!==(m=
l.exec(a));){var p=m[1],t=m[2];const h=[];for(;null!==(m=n.exec(t));)h.push(m[1]);"S"!==p&&"s"!==p&&"C"!==p&&"c"!==p&&(e=d=null);"Q"!==p&&"q"!==p&&"T"!==p&&"t"!==p&&(k=f=null);switch(p){case "M":O(p,h.length,2);b=+h[0];c=+h[1];this.moveTo(b,c);for(m=2;m<h.length;m+=2)b=+h[m],c=+h[m+1],this.lineTo(b,c);break;case "m":O(p,h.length,2);b+=+h[0];c+=+h[1];this.moveTo(b,c);for(m=2;m<h.length;m+=2)b+=+h[m],c+=+h[m+1],this.lineTo(b,c);break;case "L":O(p,h.length,2);for(m=0;m<h.length;m+=2)b=+h[m],c=+h[m+1],
this.lineTo(b,c);break;case "l":O(p,h.length,2);for(m=0;m<h.length;m+=2)b+=+h[m],c+=+h[m+1],this.lineTo(b,c);break;case "H":Q(p,h.length,1);for(m=0;m<h.length;++m)b=+h[m],this.lineTo(b,c);break;case "h":Q(p,h.length,1);for(m=0;m<h.length;++m)b+=+h[m],this.lineTo(b,c);break;case "V":Q(p,h.length,1);for(m=0;m<h.length;++m)c=+h[m],this.lineTo(b,c);break;case "v":Q(p,h.length,1);for(m=0;m<h.length;++m)c+=+h[m],this.lineTo(b,c);break;case "C":O(p,h.length,6);for(m=0;m<h.length;m+=6)p=+h[m],t=+h[m+1],d=
+h[m+2],e=+h[m+3],b=+h[m+4],c=+h[m+5],this.bezierCurveTo(p,t,d,e,b,c);break;case "c":O(p,h.length,6);for(m=0;m<h.length;m+=6)p=+h[m]+b,t=+h[m+1]+c,d=+h[m+2]+b,e=+h[m+3]+c,b+=+h[m+4],c+=+h[m+5],this.bezierCurveTo(p,t,d,e,b,c);break;case "S":O(p,h.length,4);if(null===d||null===e)d=b,e=c;for(m=0;m<h.length;m+=4)p=2*b-d,t=2*c-e,d=+h[m],e=+h[m+1],b=+h[m+2],c=+h[m+3],this.bezierCurveTo(p,t,d,e,b,c);break;case "s":O(p,h.length,4);if(null===d||null===e)d=b,e=c;for(m=0;m<h.length;m+=4)p=2*b-d,t=2*c-e,d=+h[m]+
b,e=+h[m+1]+c,b+=+h[m+2],c+=+h[m+3],this.bezierCurveTo(p,t,d,e,b,c);break;case "Q":O(p,h.length,4);for(m=0;m<h.length;m+=4)f=+h[m],k=+h[m+1],b=+h[m+2],c=+h[m+3],this.quadraticCurveTo(f,k,b,c);break;case "q":O(p,h.length,4);for(m=0;m<h.length;m+=4)f=+h[m]+b,k=+h[m+1]+c,b+=+h[m+2],c+=+h[m+3],this.quadraticCurveTo(f,k,b,c);break;case "T":O(p,h.length,2);if(null===f||null===k)f=b,k=c;for(m=0;m<h.length;m+=2)f=2*b-f,k=2*c-k,b=+h[m],c=+h[m+1],this.quadraticCurveTo(f,k,b,c);break;case "t":O(p,h.length,2);
if(null===f||null===k)f=b,k=c;for(m=0;m<h.length;m+=2)f=2*b-f,k=2*c-k,b+=+h[m],c+=+h[m+1],this.quadraticCurveTo(f,k,b,c);break;case "A":case "a":m="a"===p;va(h);O(p,h.length,7);for(p=0;p<h.length;p+=7){t=+h[p+5];let u=+h[p+6];m&&(t+=b,u+=c);t=Fa({px:b,py:c,rx:+h[p],ry:+h[p+1],xAxisRotation:+h[p+2],largeArcFlag:ja(+h[p+3]),sweepFlag:ja(+h[p+4]),cx:t,cy:u});g.each(t,r=>{this.bezierCurveTo(r.x1,r.y1,r.x2,r.y2,r.x,r.y);b=r.x;c=r.y})}break;case "Z":case "z":ua(p,h.length,0),this.closePath()}}}_runPath(a){a.beginPath();
g.each(this._operations,b=>{b.path(a)})}_render(a){super._render(a);const b=a.layer.dirty,c=this._isInteractive(a);if(b||c){const d=a.layer.context,e=this._renderer._ghostLayer.context;b&&(d.globalCompositeOperation=this.blendMode,d.beginPath());let f;c&&(e.beginPath(),f=this._getColorId());g.each(this._operations,k=>{b&&(k.path(d),k.colorize(d,void 0));c&&(k.pathGhost(e),k.colorizeGhost(e,f))})}}renderDetached(a){if(this.visible){this._setMatrix();a.save();const b=this.mask;b&&(b._setMatrix(),b._transform(a,
1),b._runPath(a),a.clip());a.globalAlpha=this.compoundAlpha*this.alpha;this._transform(a,1);this.filter&&(a.filter=this.filter);a.globalCompositeOperation=this.blendMode;a.beginPath();g.each(this._operations,c=>{c.path(a);c.colorize(a,void 0)});a.restore()}}_addBounds(a){this.visible&&this.isMeasured&&g.each(this._operations,b=>{b.addBounds(a)})}}class qa extends X{constructor(a,b,c){super(a);Object.defineProperty(this,"text",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,
"style",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"resolution",{enumerable:!0,configurable:!0,writable:!0,value:1});Object.defineProperty(this,"textVisible",{enumerable:!0,configurable:!0,writable:!0,value:!0});Object.defineProperty(this,"_textInfo",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_originalScale",{enumerable:!0,configurable:!0,writable:!0,value:1});this.text=b;this.style=c}invalidateBounds(){super.invalidateBounds();
this._textInfo=void 0}_shared(a){this.style.textAlign&&(a.textAlign=this.style.textAlign);this.style.direction&&(a.direction=this.style.direction);this.style.textBaseline&&(a.textBaseline=this.style.textBaseline)}_prerender(a,b=!1,c=!1){super._render(a);const d=a.layer.context,e=this._renderer._ghostLayer.context,f=this.style;c=this._getFontStyle(void 0,c);d.font=c;this._isInteractive(a)&&!b&&(e.font=c);f.fill&&(d.fillStyle=f.fill instanceof g.Color?f.fill.toCSS(void 0!=f.fillOpacity?f.fillOpacity:
1):f.fill);f.shadowColor&&(a.layer.context.shadowColor=f.shadowColor.toCSS(f.shadowOpacity||1));f.shadowBlur&&(a.layer.context.shadowBlur=f.shadowBlur);f.shadowOffsetX&&(a.layer.context.shadowOffsetX=f.shadowOffsetX);f.shadowOffsetY&&(a.layer.context.shadowOffsetY=f.shadowOffsetY);this._shared(d);this._isInteractive(a)&&!b&&(e.fillStyle=this._getColorId(),this._shared(e))}_getFontStyle(a,b=!1){const c=this.style;let d=[];a&&a.fontVariant?d.push(a.fontVariant):c.fontVariant&&d.push(c.fontVariant);
b||(a&&a.fontWeight?d.push(a.fontWeight):c.fontWeight&&d.push(c.fontWeight));a&&a.fontStyle?d.push(a.fontStyle):c.fontStyle&&d.push(c.fontStyle);a&&a.fontSize?(g.isNumber(a.fontSize)&&(a.fontSize+="px"),d.push(a.fontSize)):c.fontSize&&(g.isNumber(c.fontSize)&&(c.fontSize+="px"),d.push(c.fontSize));a&&a.fontFamily?d.push(a.fontFamily):c.fontFamily?d.push(c.fontFamily):d.length&&d.push("Arial");return d.join(" ")}_render(a){this._textInfo||this._measure(a);if(this.textVisible){const b=this._isInteractive(a),
c=a.layer.context,d=a.layer.dirty,e=this._renderer._ghostLayer.context;c.save();e.save();this._prerender(a);g.each(this._textInfo,(f,k)=>{g.each(f.textChunks,(l,n)=>{l.style&&(c.save(),e.save(),c.font=l.style,this._isInteractive(a)&&(e.font=l.style));l.fill&&(c.save(),c.fillStyle=l.fill.toCSS());d&&c.fillText(l.text,l.offsetX,f.offsetY+l.offsetY);if("underline"==l.textDecoration||"line-through"==l.textDecoration){let p=n=1;var m=l.height;let t=l.offsetX;switch(this.style.textAlign){case "right":case "end":t-=
l.width;break;case "center":t-=l.width/2}if(l.style)switch(g.TextFormatter.getTextStyle(l.style).fontWeight){case "bolder":case "bold":case "700":case "800":case "900":n=2}m&&(p=m/20);m="line-through"==l.textDecoration?n+f.offsetY+l.offsetY-l.height/2:n+1.5*p+f.offsetY+l.offsetY;c.save();c.beginPath();l.fill?c.strokeStyle=l.fill.toCSS():this.style.fill&&this.style.fill instanceof g.Color&&(c.strokeStyle=this.style.fill.toCSS());c.lineWidth=n*p;c.moveTo(t,m);c.lineTo(t+l.width,m);c.stroke();c.restore()}b&&
this.interactive&&e.fillText(l.text,l.offsetX,f.offsetY+l.offsetY);l.fill&&c.restore();l.style&&(c.restore(),e.restore())})});c.restore();e.restore()}}_addBounds(a){if(this.visible&&this.isMeasured){const b=this._measure({inactive:this.inactive,layer:this.getLayer()});F(a,{x:b.left,y:b.top});F(a,{x:b.right,y:b.bottom})}}_ignoreFontWeight(){return/apple/i.test(navigator.vendor)}_measure(a){const b=a.layer.context,c=this._renderer._ghostLayer.context;var d="rtl"==this.style.direction;this._textInfo=
[];const e=this.style.oversizedBehavior,f=this.style.maxWidth,k=g.isNumber(f)&&"truncate"==e,l=g.isNumber(f)&&("wrap"==e||"wrap-no-break"==e);b.save();c.save();this._prerender(a,!0,this._ignoreFontWeight());a=this.text.toString().replace(/\r/g,"").split(/\n/);let n=!0,m=0,p=0,t=0,h;g.each(a,(u,r)=>{let w;for(w=""==u?[{type:"value",text:""}]:g.TextFormatter.chunk(u,!1,this.style.ignoreFormatting);0<w.length;){let q={offsetY:t,ascent:0,width:0,height:0,left:0,right:0,textChunks:[]};u=this._measureText("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",
b);q.height=u.actualBoundingBoxAscent+u.actualBoundingBoxDescent;q.ascent=u.actualBoundingBoxAscent;let A,y=this.style.textDecoration,B,H,C=!1,L=!0,M=[],G;g.eachContinue$1(w,(x,I)=>{if("format"==x.type)if("[/]"==x.text)n||(b.restore(),c.restore(),n=!0),H=h=B=void 0,y=this.style.textDecoration,G=void 0,A=x.text;else{n||(b.restore(),c.restore());var z=g.TextFormatter.getTextStyle(x.text),D=this._getFontStyle(z);b.save();c.save();h=b.font=D;A=x.text;z.textDecoration&&(y=z.textDecoration);z.fill&&(B=
z.fill);z.width&&(H=g.toNumber(z.width));z.verticalAlign&&(G=z.verticalAlign);n=!1;x=this._measureText("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",b);z=x.actualBoundingBoxAscent+x.actualBoundingBoxDescent;z>q.height&&(q.height=z);x.actualBoundingBoxAscent>q.ascent&&(q.ascent=x.actualBoundingBoxAscent)}else if("value"==x.type&&!C){z=this._measureText(x.text,b);D=z.actualBoundingBoxLeft+z.actualBoundingBoxRight;if(k){I=L||this.style.breakWords||!1;var K=this.style.ellipsis||"",
N=this._measureText(K,b);N=N.actualBoundingBoxLeft+N.actualBoundingBoxRight;q.width+D>f&&(x.text=this._truncateText(b,x.text,f-q.width-N,I),x.text+=K,C=!0)}else if(l&&q.width+D>f){K=this._truncateText(b,x.text,f-q.width,!1,L&&"wrap-no-break"!=this.style.oversizedBehavior);if(""==K)return this.textVisible=!0,!1;M=w.slice(I+1);g.trim(K)!=g.trim(x.text)&&(M.unshift({type:"value",text:x.text.substr(K.length)}),A&&M.unshift({type:"format",text:A}));x.text=g.trim(K);w=[];C=!0}K=I=1;if(h&&H&&H>D){D/=H;switch(this.style.textAlign){case "right":case "end":I=
D;break;case "center":K=I=D;break;default:K=D}D=H}N=z.actualBoundingBoxAscent+z.actualBoundingBoxDescent;N>q.height&&(q.height=N);z.actualBoundingBoxAscent>q.ascent&&(q.ascent=z.actualBoundingBoxAscent);q.width+=D;q.left+=z.actualBoundingBoxLeft/I;q.right+=z.actualBoundingBoxRight/K;q.textChunks.push({style:h,fill:B,text:x.text,width:D,height:N,left:z.actualBoundingBoxLeft,right:z.actualBoundingBoxRight,ascent:z.actualBoundingBoxAscent,offsetX:0,offsetY:0,textDecoration:y,verticalAlign:G});L=!1}return!0});
this.style.lineHeight instanceof g.Percent?(q.height*=this.style.lineHeight.value,q.ascent*=this.style.lineHeight.value):(q.height*=this.style.lineHeight||1.2,q.ascent*=this.style.lineHeight||1.2);m<q.left&&(m=q.left);p<q.right&&(p=q.right);this._textInfo.push(q);t+=q.height;w=M||[]}});n||(b.restore(),c.restore());g.each(this._textInfo,(u,r)=>{let w=0;g.each(u.textChunks,q=>{q.offsetX=w+q.left-u.left;q.offsetY+=u.height-u.height*(this.style.baselineRatio||.19);w+=q.width;if(q.verticalAlign)switch(q.verticalAlign){case "super":q.offsetY-=
u.height/2-q.height/2;break;case "sub":q.offsetY+=q.height/2}})});d={left:d?-p:-m,top:0,right:d?m:p,bottom:t};if("none"!==e)if(a=this._fitRatio(d),1>a)if("fit"==e)g.isNumber(this.style.minScale)&&a<this.style.minScale?(this.textVisible=!1,d.left=0,d.top=0,d.right=0,d.bottom=0):(this._originalScale&&1!=this._originalScale||(this._originalScale=this.scale),this.scale=a,this.textVisible=!0);else if("hide"==e)this.textVisible=!1,d.left=0,d.top=0,d.right=0,d.bottom=0;else{switch(this.style.textAlign){case "right":case "end":d.left=
-f;d.right=0;break;case "center":d.left=-f/2;d.right=f/2;break;default:d.left=0,d.right=f}this.scale=this._originalScale||1;this._originalScale=void 0;this.textVisible=!0}else this.scale=this._originalScale||1,this._originalScale=void 0,this.textVisible=!0;b.restore();c.restore();return d}_fitRatio(a){const b=this.style.maxWidth,c=this.style.maxHeight;return g.isNumber(b)||g.isNumber(c)?Math.min(b/(a.right-a.left)||1,c/(a.bottom-a.top)||1):1}_truncateText(a,b,c,d=!1,e=!0){do{if(d)b=b.slice(0,-1);
else{var f=b.replace(/[^,;:!?\\\/\s\u200b]+[,;:!?\\\/\s\u200b]*$/g,"");if(""!=f&&f!==b||!e)if(""==f)break;else b=f;else d=!0}f=this._measureText(b,a);f=f.actualBoundingBoxLeft+f.actualBoundingBoxRight}while(f>c&&""!=b);return b}_measureText(a,b){b=b.measureText(a);var c={};null==b.actualBoundingBoxAscent?(c=document.createElement("div"),c.innerText=a,c.style.visibility="hidden",c.style.position="absolute",c.style.top="-1000000px;",c.style.fontFamily=this.style.fontFamily||"",c.style.fontSize=this.style.fontSize+
"",document.body.appendChild(c),a=c.getBoundingClientRect(),document.body.removeChild(c),a=a.height,c=b.width,c={actualBoundingBoxAscent:a,actualBoundingBoxDescent:0,actualBoundingBoxLeft:0,actualBoundingBoxRight:c,fontBoundingBoxAscent:a,fontBoundingBoxDescent:0,width:c}):c={actualBoundingBoxAscent:b.actualBoundingBoxAscent,actualBoundingBoxDescent:b.actualBoundingBoxDescent,actualBoundingBoxLeft:b.actualBoundingBoxLeft,actualBoundingBoxRight:b.actualBoundingBoxRight,fontBoundingBoxAscent:b.actualBoundingBoxAscent,
fontBoundingBoxDescent:b.actualBoundingBoxDescent,width:b.width};b=b.width;switch(this.style.textAlign){case "right":case "end":c.actualBoundingBoxLeft=b;c.actualBoundingBoxRight=0;break;case "center":c.actualBoundingBoxLeft=b/2;c.actualBoundingBoxRight=b/2;break;default:c.actualBoundingBoxLeft=0,c.actualBoundingBoxRight=b}return c}}class $a{constructor(){Object.defineProperty(this,"fill",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"fillOpacity",{enumerable:!0,
configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"textAlign",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"fontFamily",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"fontWeight",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,
writable:!0,value:void 0});Object.defineProperty(this,"fontVariant",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"textDecoration",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"shadowColor",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"shadowBlur",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"shadowOffsetX",{enumerable:!0,configurable:!0,writable:!0,
value:void 0});Object.defineProperty(this,"shadowOffsetY",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"shadowOpacity",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"lineHeight",{enumerable:!0,configurable:!0,writable:!0,value:g.percent(120)});Object.defineProperty(this,"baselineRatio",{enumerable:!0,configurable:!0,writable:!0,value:.19});Object.defineProperty(this,"direction",{enumerable:!0,configurable:!0,writable:!0,
value:void 0});Object.defineProperty(this,"textBaseline",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"oversizedBehavior",{enumerable:!0,configurable:!0,writable:!0,value:"none"});Object.defineProperty(this,"breakWords",{enumerable:!0,configurable:!0,writable:!0,value:!1});Object.defineProperty(this,"ellipsis",{enumerable:!0,configurable:!0,writable:!0,value:"\u2026"});Object.defineProperty(this,"maxWidth",{enumerable:!0,configurable:!0,writable:!0,value:void 0});
Object.defineProperty(this,"maxHeight",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"minScale",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"ignoreFormatting",{enumerable:!0,configurable:!0,writable:!0,value:!1})}}class ab extends qa{constructor(){super(...arguments);Object.defineProperty(this,"textType",{enumerable:!0,configurable:!0,writable:!0,value:"circular"});Object.defineProperty(this,"radius",{enumerable:!0,configurable:!0,
writable:!0,value:void 0});Object.defineProperty(this,"startAngle",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"inside",{enumerable:!0,configurable:!0,writable:!0,value:!1});Object.defineProperty(this,"orientation",{enumerable:!0,configurable:!0,writable:!0,value:"auto"});Object.defineProperty(this,"kerning",{enumerable:!0,configurable:!0,writable:!0,value:0});Object.defineProperty(this,"_textReversed",{enumerable:!0,configurable:!0,writable:!0,value:!1})}_render(a){switch(this.textType){case "circular":this._renderCircular(a);
break;default:super._render(a)}}_renderCircular(a){if(this.textVisible){this._prerender(a);const b=this._isInteractive(a),c=a.layer.context,d=a.layer.dirty,e=this._renderer._ghostLayer.context;c.save();b&&e.save();this._textInfo||this._measure(a);let f=this.radius||0,k=this.startAngle||0,l=0;a=this.orientation;let n="auto"==a?"auto":"inward"==a;const m=this.inside,p=this.style.textAlign||"left",t=this.kerning||0;let h="left"==p?1:-1;const u=!this._textReversed;if("auto"==n){let r=0;a=0;g.each(this._textInfo,
(w,q)=>{w=k+w.width/(f-w.height)/2*-h;w>r&&(r=w)});a="left"==p?(r+l/2)*g.DEGREES:"right"==p?(r-l/2)*g.DEGREES:k*g.DEGREES;a=g.normalizeAngle(a);n=270<=a||90>=a}1==n&&u&&(this._textInfo.reverse(),this._textReversed=!0);g.each(this._textInfo,(r,w)=>{const q=r.height;m||(f+=q);(-1==h&&n||1==h&&!n)&&u&&r.textChunks.reverse();w=k;l=0;"center"==p&&(w+=r.width/(f-q)/2*-h,l=w-k);w+=Math.PI*(n?0:1);c.save();b&&e.save();c.rotate(w);b&&e.rotate(w);let A=0;g.each(r.textChunks,(y,B)=>{B=y.text;const H=y.width;
A=H/2/(f-q)*h;c.rotate(A);b&&e.rotate(A);y.style&&(c.save(),e.save(),c.font=y.style,b&&(e.font=y.style));y.fill&&(c.save(),c.fillStyle=y.fill.toCSS());c.textBaseline="middle";c.textAlign="center";b&&(e.textBaseline="middle",e.textAlign="center");d&&c.fillText(B,0,(n?1:-1)*(0-f+q/2));b&&e.fillText(B,0,(n?1:-1)*(0-f+q/2));y.fill&&c.restore();y.style&&(c.restore(),e.restore());A=(H/2+t)/(f-q)*h;c.rotate(A);b&&e.rotate(A)});c.restore();b&&e.restore();m&&(f-=q)});c.restore();b&&e.restore()}}_measure(a){switch(this.textType){case "circular":return this._measureCircular(a);
default:return super._measure(a)}}_measureCircular(a){const b=a.layer.context,c=this._renderer._ghostLayer.context,d="rtl"==this.style.direction,e=this.style.oversizedBehavior,f=this.style.maxWidth,k=g.isNumber(f)&&"truncate"==e,l=this.style.ellipsis||"";let n;this.textVisible=!0;this._textInfo=[];this._textReversed=!1;b.save();c.save();this._prerender(a,!0);a=this.text.toString().replace(/\r/g,"").split(/\n/);let m=!0,p=0,t=0;g.each(a,(h,u)=>{h=g.TextFormatter.chunk(h,!1,this.style.ignoreFormatting);
let r={offsetY:t,ascent:0,width:0,height:0,left:0,right:0,textChunks:[]},w,q,A;g.each(h,(y,B)=>{if("format"==y.type)"[/]"==y.text?(m||(b.restore(),c.restore(),m=!0),A=w=q=void 0):(B=g.TextFormatter.getTextStyle(y.text),y=this._getFontStyle(B),b.save(),c.save(),w=b.font=y,B.fill&&(q=B.fill),B.width&&(A=g.toNumber(B.width)),m=!1),k&&(n=this._measureText(l,b));else if("value"==y.type)for(B=y.text.match(/./gu)||[],d&&(B=g.splitString(y.text),B.reverse()),y=0;y<B.length;y++){const H=B[y],C=this._measureText(H,
b);let L=C.width;w&&A&&A>L&&(L=A);const M=C.actualBoundingBoxAscent+C.actualBoundingBoxDescent;M>r.height&&(r.height=M);C.actualBoundingBoxAscent>r.ascent&&(r.ascent=C.actualBoundingBoxAscent);p+=L;if(k){n||=this._measureText(l,b);const G=n.actualBoundingBoxLeft+n.actualBoundingBoxRight;if(p+G>f){1==r.textChunks.length?this.textVisible=!1:(r.width+=G,r.left+=n.actualBoundingBoxLeft,r.right+=n.actualBoundingBoxRight,r.textChunks.push({style:w,fill:q,text:l,width:G,height:M+n.actualBoundingBoxDescent,
left:n.actualBoundingBoxLeft,right:n.actualBoundingBoxRight,ascent:n.actualBoundingBoxAscent,offsetX:0,offsetY:M,textDecoration:void 0}));break}}r.width+=L;r.left+=C.actualBoundingBoxLeft;r.right+=C.actualBoundingBoxRight;r.textChunks.push({style:w,fill:q,text:H,width:L,height:M+C.actualBoundingBoxDescent,left:C.actualBoundingBoxLeft,right:C.actualBoundingBoxRight,ascent:C.actualBoundingBoxAscent,offsetX:0,offsetY:M,textDecoration:void 0})}});r.height=this.style.lineHeight instanceof g.Percent?r.height*
this.style.lineHeight.value:r.height*(this.style.lineHeight||1.2);this._textInfo.push(r);t+=r.height});m||(b.restore(),c.restore());"hide"==e&&p>f&&(this.textVisible=!1);g.each(this._textInfo,h=>{g.each(h.textChunks,u=>{u.offsetY+=Math.round((h.height-u.height+(h.ascent-u.ascent))/2)})});b.restore();c.restore();return{left:0,top:0,right:0,bottom:0}}}class bb extends X{constructor(a,b){super(a);Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,
"height",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"image",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"tainted",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"shadowColor",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"shadowBlur",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"shadowOffsetX",{enumerable:!0,
configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"shadowOffsetY",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"shadowOpacity",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_imageMask",{enumerable:!0,configurable:!0,writable:!0,value:void 0});this.image=b}_dispose(){super._dispose();this._imageMask&&R(this._imageMask)}getLocalBounds(){if(!this._localBounds){let a=0,b=0;this.width&&(a=this.width);this.height&&
(b=this.height);this._localBounds={left:0,top:0,right:a,bottom:b};this._addBounds(this._localBounds)}return this._localBounds}_render(a){super._render(a);this.image&&(void 0===this.tainted&&(this.tainted=ka(this.image),a.layer.tainted=!0),this.tainted&&this._renderer._omitTainted||(a.layer.dirty&&(this.shadowColor&&(a.layer.context.shadowColor=this.shadowColor.toCSS(this.shadowOpacity||1)),this.shadowBlur&&(a.layer.context.shadowBlur=this.shadowBlur),this.shadowOffsetX&&(a.layer.context.shadowOffsetX=
this.shadowOffsetX),this.shadowOffsetY&&(a.layer.context.shadowOffsetY=this.shadowOffsetY),a.layer.context.drawImage(this.image,0,0,this.width||this.image.naturalWidth,this.height||this.image.naturalHeight)),this.interactive&&this._isInteractive(a)&&(a=this._getMask(this.image),this._renderer._ghostLayer.context.drawImage(a,0,0))))}clear(){super.clear();this._imageMask=this.image=void 0}_getMask(a){if(void 0===this._imageMask){const b=this.width||a.naturalWidth,c=this.height||a.naturalHeight,d=document.createElement("canvas");
d.width=b;d.height=c;const e=d.getContext("2d");e.imageSmoothingEnabled=!1;e.fillStyle=this._getColorId();e.fillRect(0,0,b,c);ka(a)||(e.globalCompositeOperation="destination-in",e.drawImage(a,0,0,b,c));this._imageMask=d}return this._imageMask}}class cb{constructor(a,b,c,d){Object.defineProperty(this,"event",{enumerable:!0,configurable:!0,writable:!0,value:a});Object.defineProperty(this,"originalPoint",{enumerable:!0,configurable:!0,writable:!0,value:b});Object.defineProperty(this,"point",{enumerable:!0,
configurable:!0,writable:!0,value:c});Object.defineProperty(this,"bbox",{enumerable:!0,configurable:!0,writable:!0,value:d});Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"simulated",{enumerable:!0,configurable:!0,writable:!0,value:!1});Object.defineProperty(this,"native",{enumerable:!0,configurable:!0,writable:!0,value:!0});g.supports("touchevents")&&a instanceof Touch?this.id=a.identifier:this.id=null}}class db extends g.ArrayDisposer{constructor(a){super();
Object.defineProperty(this,"view",{enumerable:!0,configurable:!0,writable:!0,value:document.createElement("div")});Object.defineProperty(this,"_layerDom",{enumerable:!0,configurable:!0,writable:!0,value:document.createElement("div")});Object.defineProperty(this,"layers",{enumerable:!0,configurable:!0,writable:!0,value:[]});Object.defineProperty(this,"_dirtyLayers",{enumerable:!0,configurable:!0,writable:!0,value:[]});Object.defineProperty(this,"defaultLayer",{enumerable:!0,configurable:!0,writable:!0,
value:this.getLayer(0)});Object.defineProperty(this,"_ghostLayer",{enumerable:!0,configurable:!0,writable:!0,value:new eb});Object.defineProperty(this,"_patternCanvas",{enumerable:!0,configurable:!0,writable:!0,value:document.createElement("canvas")});Object.defineProperty(this,"_patternContext",{enumerable:!0,configurable:!0,writable:!0,value:this._patternCanvas.getContext("2d")});Object.defineProperty(this,"_realWidth",{enumerable:!0,configurable:!0,writable:!0,value:0});Object.defineProperty(this,
"_realHeight",{enumerable:!0,configurable:!0,writable:!0,value:0});Object.defineProperty(this,"_calculatedWidth",{enumerable:!0,configurable:!0,writable:!0,value:0});Object.defineProperty(this,"_calculatedHeight",{enumerable:!0,configurable:!0,writable:!0,value:0});Object.defineProperty(this,"resolution",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"interactionsEnabled",{enumerable:!0,configurable:!0,writable:!0,value:!0});Object.defineProperty(this,"_listeners",
{enumerable:!0,configurable:!0,writable:!0,value:{}});Object.defineProperty(this,"_events",{enumerable:!0,configurable:!0,writable:!0,value:{}});Object.defineProperty(this,"_colorId",{enumerable:!0,configurable:!0,writable:!0,value:0});Object.defineProperty(this,"_colorMap",{enumerable:!0,configurable:!0,writable:!0,value:{}});Object.defineProperty(this,"_forceInteractive",{enumerable:!0,configurable:!0,writable:!0,value:0});Object.defineProperty(this,"_omitTainted",{enumerable:!0,configurable:!0,
writable:!0,value:!1});Object.defineProperty(this,"_hovering",{enumerable:!0,configurable:!0,writable:!0,value:new Set});Object.defineProperty(this,"_dragging",{enumerable:!0,configurable:!0,writable:!0,value:[]});Object.defineProperty(this,"_mousedown",{enumerable:!0,configurable:!0,writable:!0,value:[]});Object.defineProperty(this,"_lastPointerMoveEvent",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"tapToActivate",{enumerable:!0,configurable:!0,writable:!0,
value:!1});Object.defineProperty(this,"tapToActivateTimeout",{enumerable:!0,configurable:!0,writable:!0,value:3E3});Object.defineProperty(this,"_touchActive",{enumerable:!0,configurable:!0,writable:!0,value:!1});Object.defineProperty(this,"_touchActiveTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0});this.resolution=null==a?window.devicePixelRatio:a;this.view.style.position="absolute";this.view.setAttribute("aria-hidden","true");this.view.appendChild(this._layerDom);this._disposers.push(new g.Disposer(()=>
{g.each$1(this._events,(b,c)=>{c.disposer.dispose()});g.each(this.layers,b=>{R(b.view);b.exportableView&&R(b.exportableView)});R(this._ghostLayer.view);R(this._patternCanvas)}));this._disposers.push(g.onZoom(()=>{null==a&&(this.resolution=window.devicePixelRatio)}));if(g.supports("touchevents")){const b=c=>{0!==this._dragging.length&&g.eachContinue$1(this._dragging,d=>d.value.shouldCancelTouch()?(c.preventDefault(),!1):!0);this._touchActiveTimeout&&this._delayTouchDeactivate()};this._disposers.push(g.addEventListener(window,
"touchstart",b,{passive:!1}));this._disposers.push(g.addEventListener(this.view,"touchstart",b,{passive:!1}));this._disposers.push(g.addEventListener(this.view,"touchmove",()=>{this._touchActiveTimeout&&this._delayTouchDeactivate()},{passive:!0}));this._disposers.push(g.addEventListener(window,"click",c=>{this._touchActive=!1},{passive:!0}));this._disposers.push(g.addEventListener(this.view,"click",c=>{window.setTimeout(()=>{this._touchActive=!0;this._delayTouchDeactivate()},100)},{passive:!0}))}g.supports("wheelevents")&&
this._disposers.push(g.addEventListener(this.view,"wheel",b=>{let c=!1;this._hovering.forEach(d=>{if(d.wheelable)return c=!0,!1});c&&b.preventDefault()},{passive:!1}))}resetImageArray(){this._ghostLayer.imageArray=void 0}_delayTouchDeactivate(){this._touchActiveTimeout&&clearTimeout(this._touchActiveTimeout);0<this.tapToActivateTimeout&&(this._touchActiveTimeout=window.setTimeout(()=>{this._touchActive=!1},this.tapToActivateTimeout))}get debugGhostView(){return!!this._ghostLayer.view.parentNode}set debugGhostView(a){a?
this._ghostLayer.view.parentNode||this.view.appendChild(this._ghostLayer.view):this._ghostLayer.view.parentNode&&this._ghostLayer.view.parentNode.removeChild(this._ghostLayer.view)}createLinearGradient(a,b,c,d){return this.defaultLayer.context.createLinearGradient(a,b,c,d)}createRadialGradient(a,b,c,d,e,f){return this.defaultLayer.context.createRadialGradient(a,b,c,d,e,f)}createPattern(a,b,c,d,e){this._patternCanvas.width=d;this._patternCanvas.height=e;this._patternContext.clearRect(0,0,d,e);b.renderDetached(this._patternContext);
a.renderDetached(this._patternContext);return this._patternContext.createPattern(this._patternCanvas,c)}makeContainer(){return new Ha(this)}makeGraphics(){return new Za(this)}makeText(a,b){return new qa(this,a,b)}makeTextStyle(){return new $a}makeRadialText(a,b){return new ab(this,a,b)}makePicture(a){return new bb(this,a)}resizeLayer(a){a.resize(this._calculatedWidth,this._calculatedHeight,this._calculatedWidth,this._calculatedHeight,this.resolution)}resizeGhost(){this._ghostLayer.resize(this._calculatedWidth,
this._calculatedHeight,this._calculatedWidth,this._calculatedHeight,this.resolution)}resize(a,b,c,d){this._realWidth=a;this._realHeight=b;this._calculatedWidth=c;this._calculatedHeight=d;g.each(this.layers,e=>{e&&(e.dirty=!0,this.resizeLayer(e))});this.resizeGhost();this.view.style.width=c+"px";this.view.style.height=d+"px"}createDetachedLayer(a=!1){const b=document.createElement("canvas");a=b.getContext("2d",{willReadFrequently:a});a=new fb(b,a);b.style.position="absolute";b.style.top="0px";b.style.left=
"0px";return a}getLayerByOrder(a){const b=this.layers,c=b.length;for(let d=0;d<c;d++){const e=b[d];if(e.order==a)return e}}getLayer(a,b=!0){var c=this.getLayerByOrder(a);if(c)return c;c=this.createDetachedLayer(99==a);c.order=a;c.visible=b;c.view.className="am5-layer-"+a;c.visible&&this.resizeLayer(c);a=this.layers;a.push(c);a.sort((f,k)=>f.order>k.order?1:f.order<k.order?-1:0);b=a.length;var d=g.indexOf(a,c);let e;for(d+=1;d<b;d++)if(a[d].visible){e=a[d];break}c.visible&&(void 0===e?this._layerDom.appendChild(c.view):
this._layerDom.insertBefore(c.view,e.view));return c}render(a){this._dirtyLayers.length=0;g.each(this.layers,b=>{b&&b.dirty&&b.visible&&(this._dirtyLayers.push(b),b.clear())});this._ghostLayer.clear();a.render({inactive:null,layer:this.defaultLayer});this._ghostLayer.context.restore();g.each(this.layers,b=>{b&&(b=b.context,b.beginPath(),b.moveTo(0,0),b.stroke())});g.each(this._dirtyLayers,b=>{b.context.restore();b.dirty=!1});if(this._hovering.size&&this._lastPointerMoveEvent){const {events:b,target:c,
native:d}=this._lastPointerMoveEvent;g.each(b,e=>{this._dispatchGlobalMousemove(e,c,d)})}}paintId(a){var b=++this._colorId;const c=[0,0,0];for(let d=0;24>d;d++)c[d%3]<<=1,c[d%3]|=b&1,b>>=1;b=g.Color.fromHex((c[0]|0)+(c[1]<<8)+(c[2]<<16)).toCSS();this._colorMap[b]=a;return b}_removeObject(a){void 0!==a._colorId&&delete this._colorMap[a._colorId]}_adjustBoundingBox(a){const b=this._ghostLayer.margin;return new DOMRect(-b.left,-b.top,a.width+b.left+b.right,a.height+b.top+b.bottom)}getEvent(a,b=!0){const c=
this.view.getBoundingClientRect(),d=a.clientX||0,e=a.clientY||0;return new cb(a,{x:d-c.left,y:e-c.top},{x:this._calculatedWidth/this._realWidth*(d-(b?c.left:0)),y:this._calculatedHeight/this._realHeight*(e-(b?c.top:0))},this._adjustBoundingBox(c))}_getHitTarget(a,b,c){if(!(0===b.width||0===b.height||a.x<b.left||a.x>b.right||a.y<b.top||a.y>b.bottom)&&c&&this._layerDom.contains(c)){a=this._ghostLayer.getImageData(a,b);if(0===a.data[0]&&0===a.data[1]&&0===a.data[2])return!1;a=g.Color.fromRGB(a.data[0],
a.data[1],a.data[2]).toCSS();return this._colorMap[a]}}getObjectAtPoint(a){a=this._ghostLayer.getImageArray(a);if(0!==a[0]||0!==a[1]||0!==a[2])return a=g.Color.fromRGB(a[0],a[1],a[2]).toCSS(),this._colorMap[a]}_withEvents(a,b){const c=this._events[a];if(void 0!==c){c.dispatching=!0;try{b(c)}finally{c.dispatching=!1,c.cleanup&&(c.cleanup=!1,g.keepIf(c.callbacks,d=>!d.disposed),0===c.callbacks.length&&(c.disposer.dispose(),delete this._events[a]))}}}_dispatchEventAll(a,b){this.interactionsEnabled&&
this._withEvents(a,c=>{g.each(c.callbacks,d=>{d.disposed||d.callback.call(d.context,b)})})}_dispatchEvent(a,b,c){if(!this.interactionsEnabled)return!1;let d=!1;this._withEvents(a,e=>{g.each(e.callbacks,f=>{f.disposed||f.object!==b||(f.callback.call(f.context,c),d=!0)})});return d}_dispatchMousedown(a,b){const c=a.button;if(0==c||2==c||1==c||void 0===c){var d=this.getEvent(a);if(a=this._getHitTarget(d.originalPoint,d.bbox,b)){const e=d.id;let f=!1;V(a,k=>{const l={id:e,value:k};this._mousedown.push(l);
!f&&this._dispatchEvent("pointerdown",k,d)&&(f=!0,this._dragging.some(n=>n.value===k&&n.id===e)||this._dragging.push(l));return!0})}}}_dispatchGlobalMousemove(a,b,c){const d=this.getEvent(a),e=this._getHitTarget(d.originalPoint,d.bbox,b);d.native=c;e?(this._hovering.forEach(f=>{f.contains(e)||(this._hovering.delete(f),f.cursorOverStyle&&g.setStyle(document.body,"cursor",f._replacedCursorStyle),this._dispatchEvent("pointerout",f,d))}),d.native&&V(e,f=>{this._hovering.has(f)||(this._hovering.add(f),
f.cursorOverStyle&&(f._replacedCursorStyle=g.getStyle(document.body,"cursor"),g.setStyle(document.body,"cursor",f.cursorOverStyle)),this._dispatchEvent("pointerover",f,d));return!0})):(this._hovering.forEach(f=>{f.cursorOverStyle&&g.setStyle(document.body,"cursor",f._replacedCursorStyle);this._dispatchEvent("pointerout",f,d)}),this._hovering.clear());this._dispatchEventAll("globalpointermove",d)}removeHovering(a){this._hovering.delete(a);a.cursorOverStyle&&g.setStyle(document.body,"cursor",a._replacedCursorStyle)}_dispatchGlobalMouseup(a,
b){a=this.getEvent(a);a.native=b;this._dispatchEventAll("globalpointerup",a)}_dispatchDragMove(a){if(0!==this._dragging.length){const b=this.getEvent(a),c=b.id;this._dragging.forEach(d=>{d.id===c&&this._dispatchEvent("pointermove",d.value,b)})}}_dispatchDragEnd(a,b){const c=a.button;let d;if(0==c||void 0===c)d="click";else if(2==c)d="rightclick";else if(1==c)d="middleclick";else return;const e=this.getEvent(a),f=e.id;if(0!==this._mousedown.length){const k=this._getHitTarget(e.originalPoint,e.bbox,
b);k&&this._mousedown.forEach(l=>{l.id===f&&l.value.contains(k)&&this._dispatchEvent(d,l.value,e)});this._mousedown.length=0}0!==this._dragging.length&&(this._dragging.forEach(k=>{k.id===f&&this._dispatchEvent("pointerup",k.value,e)}),this._dragging.length=0)}_dispatchDoubleClick(a,b){const c=this.getEvent(a);(a=this._getHitTarget(c.originalPoint,c.bbox,b))&&V(a,d=>this._dispatchEvent("dblclick",d,c)?!1:!0)}_dispatchWheel(a,b){const c=this.getEvent(a);(a=this._getHitTarget(c.originalPoint,c.bbox,
b))&&V(a,d=>this._dispatchEvent("wheel",d,c)?!1:!0)}_makeSharedEvent(a,b){if(void 0===this._listeners[a]){const c=b();this._listeners[a]=new g.CounterDisposer(()=>{delete this._listeners[a];c.dispose()})}return this._listeners[a].increment()}_onPointerEvent(a,b){function c(){e=null;d=!1}let d=!1,e=null;return new g.MultiDisposer([new g.Disposer(()=>{null!==e&&clearTimeout(e);c()}),g.addEventListener(this.view,g.getRendererEvent(a),f=>{d=!0;null!==e&&clearTimeout(e);e=window.setTimeout(c,0)}),wa(window,
a,(f,k)=>{null!==e&&(clearTimeout(e),e=null);b(f,k,d);d=!1})])}_initEvent(a){switch(a){case "globalpointermove":case "pointerover":case "pointerout":return this._makeSharedEvent("pointermove",()=>{const b=(c,d,e)=>{this._lastPointerMoveEvent={events:c,target:d,native:e};g.each(c,f=>{this._dispatchGlobalMousemove(f,d,e)})};return new g.MultiDisposer([this._onPointerEvent("pointerdown",b),this._onPointerEvent("pointermove",b)])});case "globalpointerup":return this._makeSharedEvent("pointerup",()=>{const b=
this._onPointerEvent("pointerup",(d,e,f)=>{g.each(d,k=>{this._dispatchGlobalMouseup(k,f)});this._lastPointerMoveEvent={events:d,target:e,native:f}}),c=this._onPointerEvent("pointercancel",(d,e,f)=>{g.each(d,k=>{this._dispatchGlobalMouseup(k,f)});this._lastPointerMoveEvent={events:d,target:e,native:f}});return new g.Disposer(()=>{b.dispose();c.dispose()})});case "click":case "rightclick":case "middleclick":case "pointerdown":case "pointermove":case "pointerup":return this._makeSharedEvent("pointerdown",
()=>{const b=this._onPointerEvent("pointerdown",(f,k)=>{g.each(f,l=>{this._dispatchMousedown(l,k)})}),c=this._onPointerEvent("pointermove",f=>{g.each(f,k=>{this._dispatchDragMove(k)})}),d=this._onPointerEvent("pointerup",(f,k)=>{g.each(f,l=>{this._dispatchDragEnd(l,k)})}),e=this._onPointerEvent("pointercancel",(f,k)=>{g.each(f,l=>{this._dispatchDragEnd(l,k)})});return new g.Disposer(()=>{b.dispose();c.dispose();d.dispose();e.dispose()})});case "dblclick":return this._makeSharedEvent("dblclick",()=>
this._onPointerEvent("dblclick",(b,c)=>{g.each(b,d=>{this._dispatchDoubleClick(d,c)})}));case "wheel":return this._makeSharedEvent("wheel",()=>g.addEventListener(this.view,g.getRendererEvent("wheel"),b=>{this._dispatchWheel(b,g.getEventTarget(b))},{passive:!1}))}}_addEvent(a,b,c,d){let e=this._events[b];void 0===e&&(e=this._events[b]={disposer:this._initEvent(b),callbacks:[],dispatching:!1,cleanup:!1});const f={object:a,context:d,callback:c,disposed:!1};e.callbacks.push(f);return new g.Disposer(()=>
{f.disposed=!0;e.dispatching?e.cleanup=!0:(g.removeFirst(e.callbacks,f),0===e.callbacks.length&&(e.disposer.dispose(),delete this._events[b]))})}getCanvas(a,b){this.render(a);b||={};let c=this.resolution,d=Math.floor(this._calculatedWidth*this.resolution),e=Math.floor(this._calculatedHeight*this.resolution);if(b.minWidth&&b.minWidth>d){var f=b.minWidth/d;f>c&&(c=f*this.resolution)}b.minHeight&&b.minHeight>e&&(f=b.minHeight/e,f>c&&(c=f*this.resolution));b.maxWidth&&b.maxWidth<d&&(f=b.maxWidth/d,f<
c&&(c=f*this.resolution));b.maxHeight&&b.maxHeight>e&&(f=b.maxHeight/e,f<c&&(c=f*this.resolution));b.maintainPixelRatio&&(c/=this.resolution);const k=[];let l=!1;b=document.createElement("canvas");c!=this.resolution&&(l=!0,d=d*c/this.resolution,e=e*c/this.resolution);b.width=d;b.height=e;b.style.position="fixed";b.style.top="-10000px";this.view.appendChild(b);k.push(b);const n=b.getContext("2d");let m=0,p=0,t=!1;g.each(this.layers,h=>{if(h&&h.visible&&(h.tainted||l)){t=!0;h.exportableView=h.view;
h.exportableContext=h.context;h.view=document.createElement("canvas");h.view.style.position="fixed";h.view.style.top="-10000px";this.view.appendChild(h.view);k.push(h.view);let u=0,r=0;h.margin&&(u+=h.margin.left||0+h.margin.right||0,r+=h.margin.top||0+h.margin.bottom||0);h.view.width=d+u;h.view.height=e+r;h.context=h.view.getContext("2d");h.dirty=!0;h.scale=c}});t&&(this._omitTainted=!0,this.render(a),this._omitTainted=!1);g.each(this.layers,h=>{if(h&&h.visible){let u=0,r=0;h.margin&&(u=-(h.margin.left||
0)*this.resolution,r=-(h.margin.top||0)*this.resolution);n.drawImage(h.view,u,r);h.exportableView&&(h.view=h.exportableView,h.exportableView=void 0);h.exportableContext&&(h.context=h.exportableContext,h.exportableContext=void 0);m<h.view.clientWidth&&(m=h.view.clientWidth);p<h.view.clientHeight&&(p=h.view.clientHeight);h.scale=void 0}});b.style.width=m+"px";b.style.height=p+"px";g.each(k,h=>{h.style.position="";h.style.top="";this.view.removeChild(h)});return b}}class eb{constructor(){Object.defineProperty(this,
"view",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"context",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"margin",{enumerable:!0,configurable:!0,writable:!0,value:{left:0,right:0,top:0,bottom:0}});Object.defineProperty(this,"_resolution",{enumerable:!0,configurable:!0,writable:!0,value:1});Object.defineProperty(this,"_width",{enumerable:!0,configurable:!0,writable:!0,value:0});Object.defineProperty(this,"_height",{enumerable:!0,
configurable:!0,writable:!0,value:0});Object.defineProperty(this,"imageArray",{enumerable:!0,configurable:!0,writable:!0,value:void 0});this.view=document.createElement("canvas");this.context=this.view.getContext("2d",{alpha:!1,willReadFrequently:!0});this.context.imageSmoothingEnabled=!1;this.view.style.position="absolute";this.view.style.top="0px";this.view.style.left="0px"}resize(a,b,c,d,e){this._resolution=e;a+=this.margin.left+this.margin.right;b+=this.margin.top+this.margin.bottom;c+=this.margin.left+
this.margin.right;d+=this.margin.top+this.margin.bottom;this.view.style.left=-this.margin.left+"px";this.view.style.top=-this.margin.top+"px";this._width=Math.floor(a*e);this._height=Math.floor(b*e);this.view.width=this._width;this.view.style.width=c+"px";this.view.height=this._height;this.view.style.height=d+"px"}getImageData(a,b){return this.context.getImageData(Math.round((a.x-b.left)/b.width*this._width),Math.round((a.y-b.top)/b.height*this._height),1,1)}getImageArray(a){this.imageArray||(this.imageArray=
this.context.getImageData(0,0,this._width,this._height).data);const b=this.imageArray;a=4*(Math.round(a.y*this._resolution)*this._width+Math.round(a.x*this._resolution));return[b[a],b[a+1],b[a+2],b[a+3]]}setMargin(a){this.margin.left=0;this.margin.right=0;this.margin.top=0;this.margin.bottom=0;g.each(a,b=>{b.margin&&(this.margin.left=Math.max(this.margin.left,b.margin.left),this.margin.right=Math.max(this.margin.right,b.margin.right),this.margin.top=Math.max(this.margin.top,b.margin.top),this.margin.bottom=
Math.max(this.margin.bottom,b.margin.bottom))})}clear(){this.context.save();this.context.fillStyle="#000";this.context.fillRect(0,0,this._width,this._height)}}class fb{constructor(a,b){Object.defineProperty(this,"view",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"context",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"tainted",{enumerable:!0,configurable:!0,writable:!0,value:!0});Object.defineProperty(this,"margin",{enumerable:!0,
configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"order",{enumerable:!0,configurable:!0,writable:!0,value:0});Object.defineProperty(this,"visible",{enumerable:!0,configurable:!0,writable:!0,value:!0});Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"scale",{enumerable:!0,configurable:!0,writable:!0,value:void 0});
Object.defineProperty(this,"dirty",{enumerable:!0,configurable:!0,writable:!0,value:!0});Object.defineProperty(this,"exportableView",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"exportableContext",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_width",{enumerable:!0,configurable:!0,writable:!0,value:0});Object.defineProperty(this,"_height",{enumerable:!0,configurable:!0,writable:!0,value:0});this.view=a;this.context=b}resize(a,
b,c,d,e){null!=this.width&&(c=a=this.width);null!=this.height&&(d=b=this.height);this.margin?(a+=this.margin.left+this.margin.right,b+=this.margin.top+this.margin.bottom,c+=this.margin.left+this.margin.right,d+=this.margin.top+this.margin.bottom,this.view.style.left=-this.margin.left+"px",this.view.style.top=-this.margin.top+"px"):(this.view.style.left="0px",this.view.style.top="0px");this._width=Math.floor(a*e);this._height=Math.floor(b*e);this.view.width=this._width;this.view.style.width=c+"px";
this.view.height=this._height;this.view.style.height=d+"px"}clear(){this.context.save();this.context.clearRect(0,0,this._width,this._height)}}class ra{constructor(a,b={},c){Object.defineProperty(this,"dom",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_inner",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_settings",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_isDirty",{enumerable:!0,
configurable:!0,writable:!0,value:!1});Object.defineProperty(this,"_isDirtyParents",{enumerable:!0,configurable:!0,writable:!0,value:!1});Object.defineProperty(this,"_isDirtyAnimation",{enumerable:!0,configurable:!0,writable:!0,value:!1});Object.defineProperty(this,"_dirty",{enumerable:!0,configurable:!0,writable:!0,value:{}});Object.defineProperty(this,"_dirtyParents",{enumerable:!0,configurable:!0,writable:!0,value:{}});Object.defineProperty(this,"_dirtyBounds",{enumerable:!0,configurable:!0,writable:!0,
value:{}});Object.defineProperty(this,"_dirtyPositions",{enumerable:!0,configurable:!0,writable:!0,value:{}});Object.defineProperty(this,"_ticker",{enumerable:!0,configurable:!0,writable:!0,value:null});Object.defineProperty(this,"_tickers",{enumerable:!0,configurable:!0,writable:!0,value:[]});Object.defineProperty(this,"_updateTick",{enumerable:!0,configurable:!0,writable:!0,value:!0});Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:new g.EventDispatcher});Object.defineProperty(this,
"animationTime",{enumerable:!0,configurable:!0,writable:!0,value:null});Object.defineProperty(this,"_animations",{enumerable:!0,configurable:!0,writable:!0,value:[]});Object.defineProperty(this,"_renderer",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_rootContainer",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"tooltipContainer",
{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_tooltipContainerSettings",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_tooltip",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"language",{enumerable:!0,configurable:!0,writable:!0,value:Ba.new(this,{})});Object.defineProperty(this,"locale",{enumerable:!0,configurable:!0,writable:!0,value:oa});Object.defineProperty(this,"utc",{enumerable:!0,
configurable:!0,writable:!0,value:!1});Object.defineProperty(this,"timezone",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"fps",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"numberFormatter",{enumerable:!0,configurable:!0,writable:!0,value:ma.new(this,{})});Object.defineProperty(this,"dateFormatter",{enumerable:!0,configurable:!0,writable:!0,value:za.new(this,{})});Object.defineProperty(this,"durationFormatter",{enumerable:!0,
configurable:!0,writable:!0,value:Aa.new(this,{})});Object.defineProperty(this,"tabindex",{enumerable:!0,configurable:!0,writable:!0,value:0});Object.defineProperty(this,"_tabindexes",{enumerable:!0,configurable:!0,writable:!0,value:[]});Object.defineProperty(this,"_a11yD",{enumerable:!0,configurable:!0,writable:!0,value:!1});Object.defineProperty(this,"_focusElementDirty",{enumerable:!0,configurable:!0,writable:!0,value:!1});Object.defineProperty(this,"_focusElementContainer",{enumerable:!0,configurable:!0,
writable:!0,value:void 0});Object.defineProperty(this,"_focusedSprite",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_isShift",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_keyboardDragPoint",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_tooltipElementContainer",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_readerAlertElement",{enumerable:!0,
configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_logo",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_tooltipDiv",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"nonce",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"interfaceColors",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"verticalLayout",{enumerable:!0,configurable:!0,
writable:!0,value:g.VerticalLayout.new(this,{})});Object.defineProperty(this,"horizontalLayout",{enumerable:!0,configurable:!0,writable:!0,value:g.HorizontalLayout.new(this,{})});Object.defineProperty(this,"gridLayout",{enumerable:!0,configurable:!0,writable:!0,value:g.GridLayout.new(this,{})});Object.defineProperty(this,"_paused",{enumerable:!0,configurable:!0,writable:!0,value:!1});Object.defineProperty(this,"autoResize",{enumerable:!0,configurable:!0,writable:!0,value:!0});Object.defineProperty(this,
"_fontHash",{enumerable:!0,configurable:!0,writable:!0,value:""});Object.defineProperty(this,"_isDisposed",{enumerable:!0,configurable:!0,writable:!0,value:!1});Object.defineProperty(this,"_disposers",{enumerable:!0,configurable:!0,writable:!0,value:[]});Object.defineProperty(this,"_resizeSensorDisposer",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_tooltips",{enumerable:!0,configurable:!0,writable:!0,value:[]});Object.defineProperty(this,"_htmlElementContainer",
{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_htmlEnabledContainers",{enumerable:!0,configurable:!0,writable:!0,value:[]});if(!c)throw Error("You cannot use `new Class()`, instead use `Class.new()`");this._settings=b;0==b.accessible&&(this._a11yD=!0);null==b.useSafeResolution&&(b.useSafeResolution=!0);let d;b.useSafeResolution&&(d=g.getSafeResolution());this._renderer=new db(d);let e;e=a instanceof HTMLElement?a:document.getElementById(a);g.each(g.registry.rootElements,
f=>{if(f.dom===e)throw Error("You cannot have multiple Roots on the same DOM node");});this.interfaceColors=W.new(this,{});if(null===e)throw Error("Could not find HTML element with id `"+a+"`");this.dom=e;a=document.createElement("div");a.style.position="relative";a.style.width="100%";a.style.height="100%";e.appendChild(a);if(b=b.tooltipContainerBounds)this._tooltipContainerSettings=b;this._inner=a;this._updateComputedStyles();g.registry.rootElements.push(this)}static new(a,b){a=new ra(a,b,!0);a._init();
return a}moveDOM(a){if(a=a instanceof HTMLElement?a:document.getElementById(a)){for(;0<this.dom.childNodes.length;)a.appendChild(this.dom.childNodes[0]);this.dom=a;this._initResizeSensor();this.resize()}}_handleLogo(){if(this._logo){const a=this.dom.offsetHeight;150>=this.dom.offsetWidth||60>=a?this._logo.hide():this._logo.show()}}_showBranding(){if(!this._logo){const a=this.tooltipContainer.children.push(g.Container.new(this,{interactive:!0,interactiveChildren:!1,position:"absolute",setStateOnChildren:!0,
paddingTop:9,paddingRight:9,paddingBottom:9,paddingLeft:9,scale:.6,y:g.percent(100),centerY:g.p100,tooltipText:"Created using amCharts 5",tooltipX:g.p100,cursorOverStyle:"pointer",background:g.Rectangle.new(this,{fill:g.color(4671320),fillOpacity:0,tooltipY:5})})),b=ia.Tooltip.new(this,{pointerOrientation:"horizontal",paddingTop:4,paddingRight:7,paddingBottom:4,paddingLeft:7});b.label.setAll({fontSize:12});b.get("background").setAll({fill:this.interfaceColors.get("background"),stroke:this.interfaceColors.get("grid"),
strokeOpacity:.3});a.set("tooltip",b);a.events.on("click",()=>{window.open("https://www.amcharts.com/","_blank")});a.states.create("hover",{});a.children.push(g.Graphics.new(this,{stroke:g.color(13421772),strokeWidth:3,svgPath:"M5 25 L13 25h13.6c3.4 0 6 0 10.3-4.3s5.2-12 8.6-12c3.4 0 4.3 8.6 7.7 8.6M83.4 25H79.8c-3.4 0-6 0-10.3-4.3s-5.2-12-8.6-12-4.3 8.6-7.7 8.6"})).states.create("hover",{stroke:g.color(3976191)});a.children.push(g.Graphics.new(this,{stroke:g.color(8947848),strokeWidth:3,svgPath:"M83.4 25h-31C37 25 39.5 4.4 28.4 4.4S18.9 24.2 4.3 25H0"})).states.create("hover",
{stroke:g.color(4671320)});this._logo=a;this._handleLogo()}}_getRealSize(){return this.dom.getBoundingClientRect()}_getCalculatedSize(a){return this._settings.calculateSize?this._settings.calculateSize(a):{width:a.width,height:a.height}}_init(){var a=this._settings;!1!==a.accessible&&(a.focusable&&(this._inner.setAttribute("focusable","true"),this._inner.setAttribute("tabindex",this.tabindex+"")),a.ariaLabel&&this._inner.setAttribute("aria-label",a.ariaLabel),a.role&&this._inner.setAttribute("role",
a.role));const b=this._renderer;var c=this._getRealSize(),d=this._getCalculatedSize(c);a=Math.floor(d.width);d=Math.floor(d.height);var e=Math.floor(c.width);c=Math.floor(c.height);const f=g.Container.new(this,{visible:!0,width:a,height:d});this._rootContainer=f;this._rootContainer._defaultThemes.push(sa.DefaultTheme.new(this));this.container=f.children.push(g.Container.new(this,{visible:!0,width:g.p100,height:g.p100}));b.resize(e,c,a,d);this._inner.appendChild(b.view);this._initResizeSensor();this._htmlElementContainer=
e=document.createElement("div");e.className="am5-html-container";e.style.position="absolute";e.style.pointerEvents="none";this._tooltipContainerSettings||(e.style.overflow="hidden");this._inner.appendChild(e);!0!==this._a11yD&&(e=document.createElement("div"),e.className="am5-reader-container",e.setAttribute("role","alert"),e.style.position="absolute",e.style.width="1px",e.style.height="1px",e.style.overflow="hidden",e.style.clip="rect(1px, 1px, 1px, 1px)",this._readerAlertElement=e,this._inner.appendChild(this._readerAlertElement),
e=document.createElement("div"),e.className="am5-focus-container",e.style.position="absolute",e.style.pointerEvents="none",e.style.top="0px",e.style.left="0px",e.style.overflow="hidden",e.style.width=a+"px",e.style.height=d+"px",e.setAttribute("role","graphics-document"),g.setInteractive(e,!1),this._focusElementContainer=e,this._inner.appendChild(this._focusElementContainer),this._tooltipElementContainer=a=document.createElement("div"),a.className="am5-tooltip-container",this._inner.appendChild(a),
g.supports("keyboardevents")&&(this._disposers.push(g.addEventListener(window,"keydown",k=>{const l=g.getEventKey(k);"Shift"==l?this._isShift=!0:"Tab"==l&&(this._isShift=k.shiftKey)})),this._disposers.push(g.addEventListener(window,"keyup",k=>{"Shift"==g.getEventKey(k)&&(this._isShift=!1)})),this._disposers.push(g.addEventListener(e,"click",()=>{const k=this._focusedSprite;if(k){const l=b.getEvent(new MouseEvent("click"));k.events.dispatch("click",{type:"click",originalEvent:l.event,point:l.point,
simulated:!0,target:k})}})),this._disposers.push(g.addEventListener(e,"keydown",k=>{const l=this._focusedSprite;if(l){"Escape"==k.key&&(g.blur(),this._focusedSprite=void 0);var n=0;let m=0;const p=g.getEventKey(k);switch(p){case "Enter":case " ":if(" "==p&&"checkbox"!=l.get("role"))return;k.preventDefault();n=b.getEvent(new MouseEvent("mouse"));l.events.dispatch("click",{type:"click",originalEvent:n.event,point:n.point,simulated:!0,target:l});return;case "ArrowLeft":n=-6;break;case "ArrowRight":n=
6;break;case "ArrowUp":m=-6;break;case "ArrowDown":m=6;break;default:return}if(0!=n||0!=m)k.preventDefault(),l.isDragging()||(this._keyboardDragPoint={x:0,y:0},k=b.getEvent(new MouseEvent("mousedown",{clientX:0,clientY:0})),l.events.isEnabled("pointerdown")&&l.events.dispatch("pointerdown",{type:"pointerdown",originalEvent:k.event,point:k.point,simulated:!0,target:l})),k=this._keyboardDragPoint,k.x+=n,k.y+=m,n=b.getEvent(new MouseEvent("mousemove",{clientX:k.x,clientY:k.y}),!1),l.events.isEnabled("globalpointermove")&&
l.events.dispatch("globalpointermove",{type:"globalpointermove",originalEvent:n.event,point:n.point,simulated:!0,target:l})}})),this._disposers.push(g.addEventListener(e,"keyup",k=>{if(this._focusedSprite){var l=this._focusedSprite;k=g.getEventKey(k);switch(k){case "ArrowLeft":case "ArrowRight":case "ArrowTop":case "ArrowDown":if(l.isDragging())k=this._keyboardDragPoint,k=b.getEvent(new MouseEvent("mouseup",{clientX:k.x,clientY:k.y})),l.events.isEnabled("globalpointerup")&&l.events.dispatch("globalpointerup",
{type:"globalpointerup",originalEvent:k.event,point:k.point,simulated:!0,target:l}),this._keyboardDragPoint=void 0;else if(l.get("focusableGroup")){const n=l.get("focusableGroup"),m=this._tabindexes.filter(t=>t.get("focusableGroup")==n&&!1!==t.getPrivate("focusable")&&t.isVisibleDeep()?!0:!1);l=m.indexOf(l);const p=m.length-1;l+="ArrowRight"==k||"ArrowDown"==k?1:-1;0>l?l=p:l>p&&(l=0);g.focus(m[l].getPrivate("focusElement").dom)}}}}))));this._startTicker();this.setThemes([]);this._addTooltip();this._hasLicense()||
this._showBranding()}_initResizeSensor(){this._resizeSensorDisposer&&this._resizeSensorDisposer.dispose();this._resizeSensorDisposer=new ya(this.dom,()=>{this.autoResize&&this.resize()});this._disposers.push(this._resizeSensorDisposer)}resize(){var a=this._getRealSize(),b=this._getCalculatedSize(a);const c=Math.floor(b.width);b=Math.floor(b.height);if(0<c&&0<b){var d=Math.floor(a.width);a=Math.floor(a.height);var e=this._htmlElementContainer;e.style.width=c+"px";e.style.height=b+"px";!0!==this._a11yD&&
(e=this._focusElementContainer,e.style.width=c+"px",e.style.height=b+"px");this._renderer.resize(d,a,c,b);d=this._rootContainer;d.setPrivate("width",c);d.setPrivate("height",b);this._render();this._handleLogo()}}_render(){this._renderer.render(this._rootContainer._display);this._focusElementDirty&&(this._updateCurrentFocus(),this._focusElementDirty=!1)}_runTickers(a){g.each(this._tickers,b=>{b(a)})}_runAnimations(a){let b=0;g.keepIf(this._animations,c=>{c=c._runAnimation(a);if(c===g.AnimationState.Stopped)return!1;
c===g.AnimationState.Playing&&++b;return!0});this._isDirtyAnimation=!1;return 0===b}_runDirties(){let a={};for(;this._isDirtyParents;)this._isDirtyParents=!1,g.keys(this._dirtyParents).forEach(f=>{const k=this._dirtyParents[f];delete this._dirtyParents[f];k.isDisposed()||(a[k.uid]=k,k._prepareChildren())});g.keys(a).forEach(f=>{a[f]._updateChildren()});const b=[];g.keys(this._dirty).forEach(f=>{f=this._dirty[f];f.isDisposed()?delete this._dirty[f.uid]:(b.push(f),f._beforeChanged())});b.forEach(f=>
{f._changed();delete this._dirty[f.uid];f._clearDirty()});this._isDirty=!1;const c={},d=[];g.keys(this._dirtyBounds).forEach(f=>{const k=this._dirtyBounds[f];delete this._dirtyBounds[f];k.isDisposed()||(c[k.uid]=k.depth(),d.push(k))});this._positionHTMLElements();d.sort((f,k)=>g.compare(c[k.uid],c[f.uid]));d.forEach(f=>{f._updateBounds()});const e=this._dirtyPositions;g.keys(e).forEach(f=>{const k=e[f];delete e[f];k.isDisposed()||k._updatePosition()});b.forEach(f=>{f._afterChanged()})}_renderFrame(a){if(this._updateTick){this.events.isEnabled("framestarted")&&
this.events.dispatch("framestarted",{type:"framestarted",target:this,timestamp:a});this._checkComputedStyles();this._runTickers(a);const b=this._runAnimations(a);this._runDirties();this._render();this._renderer.resetImageArray();this._positionHTMLElements();this.events.isEnabled("frameended")&&this.events.dispatch("frameended",{type:"frameended",target:this,timestamp:a});return 0===this._tickers.length&&b&&!this._isDirtyAnimation&&!this._isDirty}return!0}_runTicker(a,b){this.isDisposed()||(this.animationTime=
a,this._renderFrame(a)?this.animationTime=this._ticker=null:this._paused||(b?this._ticker:la(this.fps,this._ticker)))}_runTickerNow(a=1E4){if(!this.isDisposed())for(a=performance.now()+a;;){const b=performance.now();if(b>=a){this.animationTime=null;break}this.animationTime=b;if(this._renderFrame(b)){this.animationTime=null;break}}}_startTicker(){null===this._ticker&&(this.animationTime=null,this._ticker=a=>{this._runTicker(a)},la(this.fps,this._ticker))}get updateTick(){return this._updateTick}set updateTick(a){(this._updateTick=
a)&&this._startTicker()}_addDirtyEntity(a){this._isDirty=!0;void 0===this._dirty[a.uid]&&(this._dirty[a.uid]=a);this._startTicker()}_addDirtyParent(a){this._isDirtyParents=this._isDirty=!0;void 0===this._dirtyParents[a.uid]&&(this._dirtyParents[a.uid]=a);this._startTicker()}_addDirtyBounds(a){this._isDirty=!0;void 0===this._dirtyBounds[a.uid]&&(this._dirtyBounds[a.uid]=a);this._startTicker()}_addDirtyPosition(a){this._isDirty=!0;void 0===this._dirtyPositions[a.uid]&&(this._dirtyPositions[a.uid]=a);
this._startTicker()}_addAnimation(a){this._isDirtyAnimation=!0;-1===this._animations.indexOf(a)&&this._animations.push(a);this._startTicker()}_markDirty(){this._isDirty=!0}_markDirtyRedraw(){this.events.once("frameended",()=>{this._isDirty=!0;this._startTicker()})}eachFrame(a){this._tickers.push(a);this._startTicker();return new g.Disposer(()=>{g.removeFirst(this._tickers,a)})}markDirtyGlobal(a){a||(a=this.container);a.walkChildren(b=>{b instanceof g.Container&&this.markDirtyGlobal(b);b.markDirty();
b.markDirtyBounds()})}width(){return Math.floor(this._getCalculatedSize(this._getRealSize()).width)}height(){return Math.floor(this._getCalculatedSize(this._getRealSize()).height)}dispose(){this._isDisposed||(this._isDisposed=!0,this._rootContainer.dispose(),this._renderer.dispose(),this.horizontalLayout.dispose(),this.verticalLayout.dispose(),this.interfaceColors.dispose(),g.each(this._disposers,a=>{a.dispose()}),this._inner&&g.removeElement(this._inner),g.remove(g.registry.rootElements,this))}isDisposed(){return this._isDisposed}readerAlert(a){!0!==
this._a11yD&&(this._readerAlertElement.innerHTML=g.stripTags(a))}setThemes(a){this._rootContainer.set("themes",a);(a=this.tooltipContainer)&&a._applyThemes();(a=this.interfaceColors)&&a._applyThemes()}_addTooltip(){if(!this.tooltipContainer){var a=this._tooltipContainerSettings;this.tooltipContainer=this._rootContainer.children.push(g.Container.new(this,{position:"absolute",isMeasured:!1,width:g.p100,height:g.p100,layer:a?35:30,layerMargin:a?a:void 0}));a=ia.Tooltip.new(this,{});this.container.set("tooltip",
a);a.hide(0);this._tooltip=a}}_registerTabindexOrder(a){1!=this._a11yD&&(a.get("focusable")?g.pushOne(this._tabindexes,a):g.remove(this._tabindexes,a),this._invalidateTabindexes())}_unregisterTabindexOrder(a){1!=this._a11yD&&(g.remove(this._tabindexes,a),this._invalidateTabindexes())}_invalidateTabindexes(){if(1!=this._a11yD){this._tabindexes.sort((b,c)=>{b=b.get("tabindexOrder",0);c=c.get("tabindexOrder",0);return b==c?0:b>c?1:-1});var a=[];g.each(this._tabindexes,(b,c)=>{b.getPrivate("focusElement")?
this._moveFocusElement(c,b):this._makeFocusElement(c,b);(c=b.get("focusableGroup"))&&!1!==b.getPrivate("focusable")&&(-1!==a.indexOf(c)?b.getPrivate("focusElement").dom.setAttribute("tabindex","-1"):a.push(c))})}}_updateCurrentFocus(){1!=this._a11yD&&this._focusedSprite&&(this._decorateFocusElement(this._focusedSprite),this._positionFocusElement(this._focusedSprite))}_decorateFocusElement(a,b){if(1!=this._a11yD&&(b||(b=a.getPrivate("focusElement").dom),b)){var c=a.get("role");c?b.setAttribute("role",
c):b.removeAttribute("role");var d=a.get("ariaLabel");d?(d=g.populateString(a,d),b.setAttribute("aria-label",d)):b.removeAttribute("aria-label");(d=a.get("ariaLive"))?b.setAttribute("aria-live",d):b.removeAttribute("aria-live");d=a.get("ariaChecked");null!=d&&c&&-1!=="checkbox option radio menuitemcheckbox menuitemradio treeitem".split(" ").indexOf(c)?b.setAttribute("aria-checked",d?"true":"false"):b.removeAttribute("aria-checked");d=a.get("ariaCurrent");null!=d?b.setAttribute("aria-current",d):b.removeAttribute("aria-current");
d=a.get("ariaSelected");null!=d&&c&&-1!=="gridcell option row tab columnheader rowheader treeitem".split(" ").indexOf(c)?b.setAttribute("aria-selected",d?"true":"false"):b.removeAttribute("aria-selected");a.get("ariaHidden")?b.setAttribute("aria-hidden","true"):b.removeAttribute("aria-hidden");(c=a.get("ariaOrientation"))?b.setAttribute("aria-orientation",c):b.removeAttribute("aria-orientation");(c=a.get("ariaValueNow"))?b.setAttribute("aria-valuenow",c):b.removeAttribute("aria-valuenow");(c=a.get("ariaValueMin"))?
b.setAttribute("aria-valuemin",c):b.removeAttribute("aria-valuemin");(c=a.get("ariaValueMax"))?b.setAttribute("aria-valuemax",c):b.removeAttribute("aria-valuemax");(c=a.get("ariaValueText"))?b.setAttribute("aria-valuetext",c):b.removeAttribute("aria-valuetext");(c=a.get("ariaControls"))?b.setAttribute("aria-controls",c):b.removeAttribute("aria-controls");a.get("visible")&&0!==a.get("opacity")&&"tooltip"!=a.get("role")&&!a.isHidden()&&!1!==a.getPrivate("focusable")?("-1"!=b.getAttribute("tabindex")&&
b.setAttribute("tabindex",""+this.tabindex),b.removeAttribute("aria-hidden")):(b.removeAttribute("tabindex"),b.setAttribute("aria-hidden","true"))}}_makeFocusElement(a,b){if(!b.getPrivate("focusElement")&&1!=this._a11yD){var c=document.createElement("div");"tooltip"!=b.get("role")&&(c.tabIndex=this.tabindex);c.style.position="absolute";g.setInteractive(c,!1);var d=[];b.setPrivate("focusElement",{dom:c,disposers:d});this._decorateFocusElement(b);d.push(g.addEventListener(c,"focus",e=>{this._handleFocus(e)}));
d.push(g.addEventListener(c,"blur",e=>{this._handleBlur(e)}));this._moveFocusElement(a,b)}}_removeFocusElement(a){1!=this._a11yD&&(g.remove(this._tabindexes,a),a=a.getPrivate("focusElement"))&&(this._focusElementContainer.removeChild(a.dom),g.each(a.disposers,b=>{b.dispose()}))}_hideFocusElement(a){1!=this._a11yD&&(a.getPrivate("focusElement").dom.style.display="none")}_moveFocusElement(a,b){if(1!=this._a11yD){var c=this._focusElementContainer;b=b.getPrivate("focusElement").dom;b!==this._focusElementContainer.children[a]&&
((a=this._focusElementContainer.children[a+1])?c.insertBefore(b,a):c.append(b))}}_positionFocusElement(a){if(1!=this._a11yD&&void 0!=a){var b=a.globalBounds(),c=b.right==b.left?a.width():b.right-b.left,d=b.top==b.bottom?a.height():b.bottom-b.top,e=void 0!==this._settings.focusPadding?this._settings.focusPadding:2,f=b.left-e;b=b.top-e;0>c&&(f+=c,c=Math.abs(c));0>d&&(b+=d,d=Math.abs(d));a=a.getPrivate("focusElement").dom;a.style.top=b+"px";a.style.left=f+"px";a.style.width=c+2*e+"px";a.style.height=
d+2*e+"px"}}_getSpriteByFocusElement(a){let b;g.eachContinue$1(this._tabindexes,(c,d)=>c.getPrivate("focusElement").dom===a?(b=c,!1):!0);return b}_handleFocus(a){if(1!=this._a11yD){var b=this._getSpriteByFocusElement(a.target);b&&(b.isVisibleDeep()?(this._positionFocusElement(b),this._focusedSprite=b,b.events.isEnabled("focus")&&b.events.dispatch("focus",{type:"focus",originalEvent:a,target:b})):this._focusNext(a.target,this._isShift?-1:1))}}_focusNext(a,b){if(1!=this._a11yD){var c=Array.from(document.querySelectorAll('a[href],area[href],button:not([disabled]),details,input:not([disabled]),iframe:not([disabled]),select:not([disabled]),textarea:not([disabled]),[contentEditable\x3d""],[contentEditable\x3d"true"],[contentEditable\x3d"TRUE"],[tabindex]:not([tabindex^\x3d"-"])'));
a=c.indexOf(a)+b;0>a?a=c.length-1:a>=c.length&&(a=0);c[a].focus()}}_handleBlur(a){if(1!=this._a11yD){var b=this._focusedSprite;b&&!b.isDisposed()&&b.events.isEnabled("blur")&&b.events.dispatch("blur",{type:"blur",originalEvent:a,target:b});this._focusedSprite=void 0}}updateTooltip(a){if(1!=this._a11yD){var b=g.stripTags(a._getText()),c=a.getPrivate("tooltipElement");"tooltip"==a.get("role")&&""!=b?(c||=this._makeTooltipElement(a),c.innerHTML!=b&&(c.innerHTML=b),c.setAttribute("aria-hidden",a.isVisibleDeep()?
"false":"true")):c&&(c.remove(),a.removePrivate("tooltipElement"))}}_makeTooltipElement(a){const b=this._tooltipElementContainer,c=document.createElement("div");c.style.position="absolute";c.style.width="1px";c.style.height="1px";c.style.overflow="hidden";c.style.clip="rect(1px, 1px, 1px, 1px)";g.setInteractive(c,!1);this._decorateFocusElement(a,c);b.append(c);a.setPrivate("tooltipElement",c);return c}_removeTooltipElement(a){if(1!=this._a11yD&&(a=a.getPrivate("tooltipElement"))){const b=a.parentElement;
b&&b.removeChild(a)}}_invalidateAccessibility(a){if(1!=this._a11yD){this._focusElementDirty=!0;var b=a.getPrivate("focusElement");a.get("focusable")?b&&(this._decorateFocusElement(a),this._positionFocusElement(a)):b&&this._removeFocusElement(a)}}focused(a){return this._focusedSprite===a}documentPointToRoot(a){const b=this._getRealSize(),c=this._getCalculatedSize(b);return{x:c.width/b.width*(a.x-b.left),y:c.height/b.height*(a.y-b.top)}}rootPointToDocument(a){const b=this._getRealSize(),c=this._getCalculatedSize(b);
return{x:a.x/(c.width/b.width)+b.left,y:a.y/(c.height/b.height)+b.top}}addDisposer(a){this._disposers.push(a);return a}_updateComputedStyles(){var a=window.getComputedStyle(this.dom);let b="";g.each$1(a,(c,d)=>{g.isString(c)&&c.match(/^font/)&&(b+=d)});if(a=b!=this._fontHash)this._fontHash=b;return a}_checkComputedStyles(){this._updateComputedStyles()&&this._invalidateLabelBounds(this.container)}_invalidateLabelBounds(a){a instanceof g.Container?a.children.each(b=>{this._invalidateLabelBounds(b)}):
a instanceof g.Text&&a.markDirtyBounds()}_hasLicense(){for(let a=0;a<g.registry.licenses.length;a++)if(g.registry.licenses[a].match(/^AM5C.{5,}/i))return!0;return!1}_licenseApplied(){this._logo&&this._logo.set("forceHidden",!0)}get debugGhostView(){return this._renderer.debugGhostView}set debugGhostView(a){this._renderer.debugGhostView=a}set tapToActivate(a){this._renderer.tapToActivate=a}get tapToActivate(){return this._renderer.tapToActivate}set tapToActivateTimeout(a){this._renderer.tapToActivateTimeout=
a}get tapToActivateTimeout(){return this._renderer.tapToActivateTimeout}_makeHTMLElement(a){const b=this._htmlElementContainer,c=document.createElement("div");a.setPrivate("htmlElement",c);c.style.position="absolute";c.style.overflow="auto";c.style.boxSizing="border-box";g.setInteractive(c,a.get("interactive",!1));a.events.isEnabled("click")&&(g.setInteractive(c,!0),this._disposers.push(g.addEventListener(c,"click",d=>{d=this._renderer.getEvent(d);a.events.dispatch("click",{type:"click",originalEvent:d.event,
point:d.point,simulated:!1,target:a})})));this._positionHTMLElement(a);b.append(c);g.pushOne(this._htmlEnabledContainers,a);return c}_positionHTMLElements(){g.each(this._htmlEnabledContainers,a=>{this._positionHTMLElement(a)})}_positionHTMLElement(a){const b=a.getPrivate("htmlElement");if(b){g.each("paddingTop paddingRight paddingBottom paddingLeft minWidth minHeight maxWidth maxHeight".split(" "),p=>{const t=a.get(p);b.style[p]=t?t+"px":""});const d=a.compositeScale()||1,e=a.compositeRotation()||
0;b.style.transform="";b.style.transformOrigin="";const f=a.compositeOpacity();setTimeout(()=>{b.style.opacity=f+""},10);const k=a.isVisibleDeep();k&&(b.style.display="block");var c=a.globalBounds();b.style.top=c.top+"px";b.style.left=c.left+"px";c=a.get("width");const l=a.get("height");let n=0,m=0;c&&(n=a.width());l&&(m=a.height());if(c&&l)a.removePrivate("minWidth"),a.removePrivate("minHeight");else{b.style.position="fixed";b.style.width="";b.style.height="";const p=b.getBoundingClientRect();b.style.position=
"absolute";c||(n=p.width);l||(m=p.height);a._adjustedLocalBounds={left:0,right:0,top:0,bottom:0};a.setPrivate("minWidth",n/d);a.setPrivate("minHeight",m/d)}0<n&&(b.style.minWidth=n+"px");0<m&&(b.style.minHeight=m+"px");k&&0!=f||(b.style.display="none");1!=d&&(b.style.transform+="scale("+d+")");0!=e&&(b.style.transform+=" rotate("+e+"deg)");""!=b.style.transform&&(b.style.transformOrigin=a.get("centerX",0)+"% "+a.get("centerY",0)+"%")}}_setHTMLContent(a,b){let c=a.getPrivate("htmlElement");c||=this._makeHTMLElement(a);
c.innerHTML!=b&&(c.innerHTML=b)}_removeHTMLContent(a){let b=a.getPrivate("htmlElement");b&&(this._htmlElementContainer.removeChild(b),a.removePrivate("htmlElement"));g.remove(this._htmlEnabledContainers,a)}}g.addLicense("AM5C241025748");const Y=new Map([["ar",()=>new Promise((a,b)=>v(["./ar"],a,b))],["bg-bg",()=>new Promise((a,b)=>v(["./bg_BG"],a,b))],["bs-ba",()=>new Promise((a,b)=>v(["./bs_BA"],a,b))],["ca-es",()=>new Promise((a,b)=>v(["./ca_ES"],a,b))],["cs-cz",()=>new Promise((a,b)=>v(["./cs_CZ"],
a,b))],["da-dk",()=>new Promise((a,b)=>v(["./da_DK"],a,b))],["de-de",()=>new Promise((a,b)=>v(["./de_DE"],a,b))],["de-ch",()=>new Promise((a,b)=>v(["./de_CH"],a,b))],["el-gr",()=>new Promise((a,b)=>v(["./el_GR"],a,b))],["en-us",()=>new Promise((a,b)=>v(["./en_US"],a,b))],["en-ca",()=>new Promise((a,b)=>v(["./en_CA"],a,b))],["es-es",()=>new Promise((a,b)=>v(["./es_ES"],a,b))],["et-ee",()=>new Promise((a,b)=>v(["./et_EE"],a,b))],["fi-fi",()=>new Promise((a,b)=>v(["./fi_FI"],a,b))],["fr-fr",()=>new Promise((a,
b)=>v(["./fr_FR"],a,b))],["he-il",()=>new Promise((a,b)=>v(["./he_IL"],a,b))],["hr-hr",()=>new Promise((a,b)=>v(["./hr_HR"],a,b))],["hu-hu",()=>new Promise((a,b)=>v(["./hu_HU"],a,b))],["id-id",()=>new Promise((a,b)=>v(["./id_ID"],a,b))],["it-it",()=>new Promise((a,b)=>v(["./it_IT"],a,b))],["ja-jp",()=>new Promise((a,b)=>v(["./ja_JP"],a,b))],["ko-kr",()=>new Promise((a,b)=>v(["./ko_KR"],a,b))],["lt-lt",()=>new Promise((a,b)=>v(["./lt_LT"],a,b))],["lv-lv",()=>new Promise((a,b)=>v(["./lv_LV"],a,b))],
["nb-no",()=>new Promise((a,b)=>v(["./nb_NO"],a,b))],["nl-nl",()=>new Promise((a,b)=>v(["./nl_NL"],a,b))],["pl-pl",()=>new Promise((a,b)=>v(["./pl_PL"],a,b))],["pt-br",()=>new Promise((a,b)=>v(["./pt_BR"],a,b))],["pt-pt",()=>new Promise((a,b)=>v(["./pt_PT"],a,b))],["ro-ro",()=>new Promise((a,b)=>v(["./ro_RO"],a,b))],["ru-ru",()=>new Promise((a,b)=>v(["./ru_RU"],a,b))],["sk-sk",()=>new Promise((a,b)=>v(["./sk_SK"],a,b))],["sl-sl",()=>new Promise((a,b)=>v(["./sl_SL"],a,b))],["sr-rs",()=>new Promise((a,
b)=>v(["./sr_RS"],a,b))],["sv-se",()=>new Promise((a,b)=>v(["./sv_SE"],a,b))],["th-th",()=>new Promise((a,b)=>v(["./th_TH"],a,b))],["tr-tr",()=>new Promise((a,b)=>v(["./tr_TR"],a,b))],["uk-ua",()=>new Promise((a,b)=>v(["./uk_UA"],a,b))],["vi-vn",()=>new Promise((a,b)=>v(["./vi_VN"],a,b))],["zh-cn",()=>new Promise((a,b)=>v(["./zh_Hans"],a,b))],["zh-hk",()=>new Promise((a,b)=>v(["./zh_Hant"],a,b))],["zh-tw",()=>new Promise((a,b)=>v(["./zh_Hant"],a,b))]]);ha.NumberFormatter=ma;ha.createRoot=async function(a,
b=ta.getLocale()){a=ra.new(a);var c=Y.get;if(b)if(Y.has(b.toLowerCase()))var d=b.toLowerCase();else{b=b.split("-")[0].toLowerCase();let e=null;for(d of Y.keys())if(d.startsWith(b)){e=d;break}d=e||"en-us"}else d="en-us";a.locale=(await c.call(Y,d)()).default;return a}});