@arcgis/core 4.27.0-next.20230421 → 4.27.0-next.20230422
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/085e9a46ee3a8a1a5e20.js +1 -0
- package/assets/esri/core/workers/chunks/5f3899efbb967c6e8422.js +1 -0
- package/assets/esri/core/workers/chunks/f47046967c3b13996a14.js +1 -0
- package/assets/esri/themes/base/widgets/_Editor.scss +1 -0
- package/assets/esri/themes/base/widgets/_FeatureMedia.scss +1 -1
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/widgets/Popup/t9n/Popup.json +1 -1
- package/assets/esri/widgets/Popup/t9n/Popup_en.json +1 -1
- package/chunks/Button.js +5 -0
- package/chunks/ColorSet.js +5 -0
- package/chunks/DefaultTheme.js +5 -0
- package/chunks/Theme.js +5 -0
- package/chunks/Tick.js +5 -0
- package/chunks/Tooltip.js +5 -0
- package/interfaces.d.ts +6 -0
- package/layers/ImageryTileLayer.js +1 -1
- package/layers/mixins/ImageryTileMixin.js +1 -1
- package/layers/support/SubtypeSublayer.js +1 -1
- package/layers/support/rasterFunctions/BandArithmeticFunction.js +1 -1
- package/layers/support/rasterFunctions/NDVIFunction.js +1 -1
- package/layers/support/rasterFunctions/rasterFunctionHelper.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
- package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
- package/views/layers/ImageryTileLayerView.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/Feature/FeatureMedia/chartCommon.js +5 -0
- package/widgets/Feature/FeatureMedia/pieChart.js +5 -0
- package/widgets/Feature/FeatureMedia/xyChart.js +5 -0
- package/widgets/Feature/FeatureMedia.js +1 -1
- package/widgets/support/chartUtilsAm5.js +5 -0
- package/assets/esri/core/workers/chunks/353e5b283e0f4416684a.js +0 -1
- package/assets/esri/core/workers/chunks/81529aee5e6efa3afc83.js +0 -1
- package/assets/esri/core/workers/chunks/bcd79124744cd3682c78.js +0 -1
- package/widgets/support/am5chartUtils.js +0 -5
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{chartColorSets as e}from"@esri/calcite-colors";import"../../intl.js";import{o as t,e as i,k as s,E as r,i as a,a as n,c as o,b as l,P as h,d as u,f as c,T as d,n as b,g as f,h as p,p as m,j as g,l as _,m as y,q as v,r as w,s as x,t as P,u as k,v as O,w as M,x as j,A as S,D as E,y as T,z as C,B,C as D,F as A,G as L,M as z,H as F,I as H,J as Y,K as I,L as R,N as U,O as W,Q as V,R as N,S as X,U as G,V as q,W as K,X as Z,Y as J,Z as $,_ as Q,$ as ee,a0 as te,a1 as ie,a2 as se,a3 as re,a4 as ae,a5 as ne,a6 as oe,a7 as le,a8 as he,a9 as ue,aa as ce,ab as de,ac as be,ad as fe,ae as pe,af as me,ag as ge,ah as _e,ai as ye}from"../../chunks/Theme.js";import{T as ve}from"../../chunks/Tooltip.js";import{D as we}from"../../chunks/DefaultTheme.js";import{getLocale as xe}from"../../intl/locale.js";class Pe{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((e=>{i(e,(e=>{i(this._targets,(t=>{t.target===e.target&&t.callback()}))}))}))}addTarget(e,t){this._observer.observe(e,{box:"border-box"}),this._targets.push({target:e,callback:t})}removeTarget(e){this._observer.unobserve(e),s(this._targets,(t=>t.target!==e))}}class ke{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(e,t){if(null===this._timer){let e=null;const t=()=>{const s=Date.now();(null===e||s>e+ke.delay)&&(e=s,i(this._targets,(e=>{let t=e.target.getBoundingClientRect();t.width===e.size.width&&t.height===e.size.height||(e.size=t,e.callback())}))),0===this._targets.length?this._timer=null:this._timer=requestAnimationFrame(t)};this._timer=requestAnimationFrame(t)}let s={width:0,height:0,left:0,right:0,top:0,bottom:0,x:0,y:0};this._targets.push({target:e,callback:t,size:s})}removeTarget(e){s(this._targets,(t=>t.target!==e)),0===this._targets.length&&null!==this._timer&&(cancelAnimationFrame(this._timer),this._timer=null)}}Object.defineProperty(ke,"delay",{enumerable:!0,configurable:!0,writable:!0,value:200});let Oe=null;function Me(){return null===Oe&&(Oe="undefined"!=typeof ResizeObserver?new Pe:new ke),Oe}class je{constructor(e,i){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}),this._sensor=Me(),this._element=e,this._listener=t(i),this._sensor.addTarget(e,i)}isDisposed(){return this._disposed}dispose(){this._disposed||(this._disposed=!0,this._sensor.removeTarget(this._element),this._listener.dispose())}get sensor(){return this._sensor}}class Se extends r{}Object.defineProperty(Se,"className",{enumerable:!0,configurable:!0,writable:!0,value:"InterfaceColors"}),Object.defineProperty(Se,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:r.classNames.concat([Se.className])});class Ee extends r{_setDefaults(){this._setDefault("negativeBase",0),this._setDefault("numberFormat","#,###.#####"),this._setDefault("smallNumberThreshold",1);const e="_big_number_suffix_",t="_small_number_suffix_",i="_byte_suffix_";this._setDefault("bigNumberPrefixes",[{number:1e3,suffix:this._t(e+"3")},{number:1e6,suffix:this._t(e+"6")},{number:1e9,suffix:this._t(e+"9")},{number:1e12,suffix:this._t(e+"12")},{number:1e15,suffix:this._t(e+"15")},{number:1e18,suffix:this._t(e+"18")},{number:1e21,suffix:this._t(e+"21")},{number:1e24,suffix:this._t(e+"24")}]),this._setDefault("smallNumberPrefixes",[{number:1e-24,suffix:this._t(t+"24")},{number:1e-21,suffix:this._t(t+"21")},{number:1e-18,suffix:this._t(t+"18")},{number:1e-15,suffix:this._t(t+"15")},{number:1e-12,suffix:this._t(t+"12")},{number:1e-9,suffix:this._t(t+"9")},{number:1e-6,suffix:this._t(t+"6")},{number:.001,suffix:this._t(t+"3")}]),this._setDefault("bytePrefixes",[{number:1,suffix:this._t(i+"B")},{number:1024,suffix:this._t(i+"KB")},{number:1048576,suffix:this._t(i+"MB")},{number:1073741824,suffix:this._t(i+"GB")},{number:1099511627776,suffix:this._t(i+"TB")},{number:0x4000000000000,suffix:this._t(i+"PB")}]),super._setDefaults()}_beforeChanged(){super._beforeChanged()}format(e,t,i){let s;(null==t||a(t)&&"number"===t.toLowerCase())&&(t=this.get("numberFormat",""));let r=Number(e);if(n(t))try{return this.get("intlLocales")?new Intl.NumberFormat(this.get("intlLocales"),t).format(r):new Intl.NumberFormat(void 0,t).format(r)}catch(u){return"Invalid"}else{t=o(t);let e,a=this.parseFormat(t,this._root.language);e=r>this.get("negativeBase")?a.positive:r<this.get("negativeBase")?a.negative:a.zero,null==i||e.mod||(e=l(e),e.decimals.active=0==r?0:i),s=e.template.split(h).join(this.applyFormat(r,e))}return s}parseFormat(e,t){const i=t.translateEmpty("_thousandSeparator"),s=t.translateEmpty("_decimalSeparator");let r={positive:{thousands:{active:-1,passive:-1,interval:-1,separator:i},decimals:{active:-1,passive:-1,separator:s},template:"",source:"",parsed:!1},negative:{thousands:{active:-1,passive:-1,interval:-1,separator:i},decimals:{active:-1,passive:-1,separator:s},template:"",source:"",parsed:!1},zero:{thousands:{active:-1,passive:-1,interval:-1,separator:i},decimals:{active:-1,passive:-1,separator:s},template:"",source:"",parsed:!1}},a=(e=e.replace("||",u)).split("|");return r.positive.source=a[0],void 0===a[2]?r.zero=r.positive:r.zero.source=a[2],void 0===a[1]?r.negative=r.positive:r.negative.source=a[1],c(r,((e,t)=>{if(t.parsed)return;let i=t.source;"number"===i.toLowerCase()&&(i=this.get("numberFormat","#,###.#####"));let s=d.chunk(i,!0);for(let r=0;r<s.length;r++){let e=s[r];if(e.text=e.text.replace(u,"|"),"value"===e.type){let i=e.text.match(/[#0.,]+[ ]?[abespABESP%!]?[abespABESP‰!]?/);if(i)if(null===i||""===i[0])t.template+=e.text;else{let s=i[0].match(/[abespABESP%‰!]{2}|[abespABESP%‰]{1}$/);s&&(t.mod=s[0].toLowerCase(),t.modSpacing=!!i[0].match(/[ ]{1}[abespABESP%‰!]{1}$/));let r=i[0].split(".");if(""===r[0]);else{t.thousands.active=(r[0].match(/0/g)||[]).length,t.thousands.passive=(r[0].match(/\#/g)||[]).length+t.thousands.active;let e=r[0].split(",");1===e.length||(t.thousands.interval=(e.pop()||"").length,0===t.thousands.interval&&(t.thousands.interval=-1))}void 0===r[1]||(t.decimals.active=(r[1].match(/0/g)||[]).length,t.decimals.passive=(r[1].match(/\#/g)||[]).length+t.decimals.active),t.template+=e.text.split(i[0]).join(h)}}else t.template+=e.text}t.parsed=!0})),r}applyFormat(e,t){let i=e<0;e=Math.abs(e);let s="",r="",a=t.mod?t.mod.split(""):[];if(-1!==a.indexOf("b")){let i=this.applyPrefix(e,this.get("bytePrefixes"),-1!==a.indexOf("!"));e=i[0],s=i[1],r=i[2],t.modSpacing&&(r=" "+r)}else if(-1!==a.indexOf("a")){let i=this.applyPrefix(e,e<this.get("smallNumberThreshold")?this.get("smallNumberPrefixes"):this.get("bigNumberPrefixes"),-1!==a.indexOf("!"));e=i[0],s=i[1],r=i[2],t.modSpacing&&(r=" "+r)}else if(-1!==a.indexOf("p")){let t=Math.min(e.toString().length+2,21);e=parseFloat(e.toPrecision(t)),s=this._root.language.translate("_percentPrefix"),r=this._root.language.translate("_percentSuffix"),""==s&&""==r&&(r="%")}else if(-1!==a.indexOf("%")){let t=Math.min(e.toString().length+2,21);e*=100,e=parseFloat(e.toPrecision(t)),r="%"}else if(-1!==a.indexOf("‰")){let t=Math.min(e.toString().length+3,21);e*=1e3,e=parseFloat(e.toPrecision(t)),r="‰"}if(-1!==a.indexOf("e")){let i;i=t.decimals.passive>=0?e.toExponential(t.decimals.passive).split("e"):e.toExponential().split("e"),e=Number(i[0]),r="e"+i[1],t.modSpacing&&(r=" "+r)}else if(0===t.decimals.passive)e=Math.round(e);else if(t.decimals.passive>0){let i=Math.pow(10,t.decimals.passive);e=Math.round(e*i)/i}let n="",o=b(e).split("."),l=o[0];if(l.length<t.thousands.active&&(l=Array(t.thousands.active-l.length+1).join("0")+l),t.thousands.interval>0){let e=[],i=l.split("").reverse().join("");for(let s=0,r=l.length;s<=r;s+=t.thousands.interval){let r=i.substr(s,t.thousands.interval).split("").reverse().join("");""!==r&&e.unshift(r)}l=e.join(t.thousands.separator)}n+=l,1===o.length&&o.push("");let h=o[1];return h.length<t.decimals.active&&(h+=Array(t.decimals.active-h.length+1).join("0")),""!==h&&(n+=t.decimals.separator+h),""===n&&(n="0"),0!==e&&i&&-1===a.indexOf("s")&&(n="-"+n),s&&(n=s+n),r&&(n+=r),n}applyPrefix(e,t,i=!1){let s=e,r="",a="",n=!1,o=1;for(let l=0,h=t.length;l<h;l++)t[l].number<=e&&(0===t[l].number?s=0:(s=e/t[l].number,o=t[l].number),r=t[l].prefix,a=t[l].suffix,n=!0);return!n&&i&&t.length&&0!=e&&(s=e/t[0].number,r=t[0].prefix,a=t[0].suffix,n=!0),n&&(s=parseFloat(s.toPrecision(Math.min(o.toString().length+Math.floor(s).toString().replace(/[^0-9]*/g,"").length,21)))),[s,r,a]}escape(e){return e.replace("||",u)}unescape(e){return e.replace(u,"|")}}function Te(e,t){let i=0,s=0,r=1,a=0,n=0,o=0,l=0,h=0;return e.formatToParts(t).forEach((e=>{switch(e.type){case"year":i=+e.value;break;case"month":s=+e.value-1;break;case"day":r=+e.value;break;case"hour":a=+e.value;break;case"minute":n=+e.value;break;case"second":o=+e.value;break;case"fractionalSecond":l=+e.value;break;case"weekday":switch(e.value){case"Sun":h=0;break;case"Mon":h=1;break;case"Tue":h=2;break;case"Wed":h=3;break;case"Thu":h=4;break;case"Fri":h=5;break;case"Sat":h=6}}})),24===a&&(a=0),{year:i,month:s,day:r,hour:a,minute:n,second:o,millisecond:l,weekday:h}}function Ce(e,t){const{year:i,month:s,day:r,hour:a,minute:n,second:o,millisecond:l}=Te(e,t);return Date.UTC(i,s,r,a,n,o,l)}class Be{constructor(e,t){if(Object.defineProperty(this,"_utc",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_dtf",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),!t)throw new Error("You cannot use `new Class()`, instead use `Class.new()`");this.name=e,this._utc=new Intl.DateTimeFormat("UTC",{hour12:!1,timeZone:"UTC",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",weekday:"short",fractionalSecondDigits:3}),this._dtf=new Intl.DateTimeFormat("UTC",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",weekday:"short",fractionalSecondDigits:3})}static new(e){return new this(e,!0)}convertLocal(e){const t=this.offsetUTC(e),i=e.getTimezoneOffset(),s=new Date(e);s.setUTCMinutes(s.getUTCMinutes()-(t-i));const r=s.getTimezoneOffset();return i!=r&&s.setUTCMinutes(s.getUTCMinutes()+r-i),s}offsetUTC(e){return(Ce(this._utc,e)-Ce(this._dtf,e))/6e4}parseDate(e){return Te(this._dtf,e)}}class De extends r{_setDefaults(){this._setDefault("capitalize",!0),this._setDefault("dateFormat","yyyy-MM-dd"),super._setDefaults()}_beforeChanged(){super._beforeChanged()}format(e,t){let i;void 0!==t&&""!==t||(t=this.get("dateFormat","yyyy-MM-dd"));let s=e;if(n(t))try{const e=this.get("intlLocales");return e?new Intl.DateTimeFormat(e,t).format(s):new Intl.DateTimeFormat(void 0,t).format(s)}catch(o){return"Invalid"}let r=this.parseFormat(t);const a=this._root.timezone;return a&&!this._root.utc&&(s=a.convertLocal(s)),f(s.getTime())?(i=this.applyFormat(s,r),this.get("capitalize")&&(i=i.replace(/^.{1}/,i.substr(0,1).toUpperCase())),i):"Invalid date"}applyFormat(e,t){let i,s,r,a,n,o,l,u,c=t.template,d=e.getTime();this._root.utc?(i=e.getUTCFullYear(),s=e.getUTCMonth(),r=e.getUTCDay(),a=e.getUTCDate(),n=e.getUTCHours(),o=e.getUTCMinutes(),l=e.getUTCSeconds(),u=e.getUTCMilliseconds()):(i=e.getFullYear(),s=e.getMonth(),r=e.getDay(),a=e.getDate(),n=e.getHours(),o=e.getMinutes(),l=e.getSeconds(),u=e.getMilliseconds());for(let b=0,f=t.parts.length;b<f;b++){let f="";switch(t.parts[b]){case"G":f=this._t(i<0?"_era_bc":"_era_ad");break;case"yyyy":f=Math.abs(i).toString(),i<0&&(f+=this._t("_era_bc"));break;case"yyy":case"yy":case"y":f=Math.abs(i).toString().substr(-t.parts[b].length),i<0&&(f+=this._t("_era_bc"));break;case"YYYY":case"YYY":case"YY":case"Y":let h=x(e,this._root.utc);f="YYYY"==t.parts[b]?Math.abs(h).toString():Math.abs(h).toString().substr(-t.parts[b].length),h<0&&(f+=this._t("_era_bc"));break;case"u":case"F":case"g":break;case"q":f=""+Math.ceil((e.getMonth()+1)/3);break;case"MMMMM":f=this._t(this._getMonth(s)).substr(0,1);break;case"MMMM":f=this._t(this._getMonth(s));break;case"MMM":f=this._t(this._getShortMonth(s));break;case"MM":f=m(s+1,2,"0");break;case"M":f=(s+1).toString();break;case"ww":f=m(w(e,this._root.utc),2,"0");break;case"w":f=w(e,this._root.utc).toString();break;case"W":f=v(e,this._root.utc).toString();break;case"dd":f=m(a,2,"0");break;case"d":f=a.toString();break;case"DD":case"DDD":f=m(y(e,this._root.utc).toString(),t.parts[b].length,"0");break;case"D":f=y(e,this._root.utc).toString();break;case"t":f=this._root.language.translateFunc("_dateOrd").call(this,a);break;case"E":f=(r||7).toString();break;case"EE":f=m((r||7).toString(),2,"0");break;case"EEE":case"eee":f=this._t(this._getShortWeekday(r));break;case"EEEE":case"eeee":f=this._t(this._getWeekday(r));break;case"EEEEE":case"eeeee":f=this._t(this._getShortWeekday(r)).substr(0,1);break;case"e":case"ee":f=(r-(this._root.locale.firstDayOfWeek||1)+1).toString(),"ee"==t.parts[b]&&(f=m(f,2,"0"));break;case"a":f=n>=12?this._t("PM"):this._t("AM");break;case"aa":f=n>=12?this._t("P.M."):this._t("A.M.");break;case"aaa":f=n>=12?this._t("P"):this._t("A");break;case"h":f=_(n).toString();break;case"hh":f=m(_(n),2,"0");break;case"H":f=n.toString();break;case"HH":f=m(n,2,"0");break;case"K":f=_(n,0).toString();break;case"KK":f=m(_(n,0),2,"0");break;case"k":f=(n+1).toString();break;case"kk":f=m(n+1,2,"0");break;case"m":f=o.toString();break;case"mm":f=m(o,2,"0");break;case"s":f=l.toString();break;case"ss":f=m(l,2,"0");break;case"S":case"SS":case"SSS":f=Math.round(u/1e3*Math.pow(10,t.parts[b].length)).toString();break;case"x":f=d.toString();break;case"n":case"nn":case"nnn":f=m(u,t.parts[b].length,"0");break;case"z":f=g(e,!1,!1,this._root.utc);break;case"zz":f=g(e,!0,!1,this._root.utc);break;case"zzz":f=g(e,!1,!0,this._root.utc);break;case"zzzz":f=g(e,!0,!0,this._root.utc);break;case"Z":case"ZZ":let c=this._root.utc?"UTC":this._root.timezone;c instanceof Be&&(c=c.name);const P=c?p(c):e.getTimezoneOffset();let k=Math.abs(P)/60,O=Math.floor(k),M=60*k-60*O;this._root.utc&&(O=0,M=0),"Z"==t.parts[b]?(f="GMT",f+=P>0?"-":"+",f+=m(O,2)+":"+m(M,2)):(f=P>0?"-":"+",f+=m(O,2)+m(M,2));break;case"i":f=e.toISOString();break;case"I":f=e.toUTCString()}c=c.replace(h,f)}return c}parseFormat(e){let t={template:"",parts:[]},i=d.chunk(e,!0);for(let s=0;s<i.length;s++){let e=i[s];if("value"===e.type){if(e.text.match(/^date$/i)){let t=this.get("dateFormat","yyyy-MM-dd");a(t)||(t="yyyy-MM-dd"),e.text=t}let i=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);if(i)for(let s=0;s<i.length;s++)t.parts.push(i[s]),e.text=e.text.replace(i[s],h)}t.template+=e.text}return t}_months(){return["January","February","March","April","May","June","July","August","September","October","November","December"]}_getMonth(e){return this._months()[e]}_shortMonths(){return["Jan","Feb","Mar","Apr","May(short)","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}_getShortMonth(e){return this._shortMonths()[e]}_weekdays(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}_getWeekday(e){return this._weekdays()[e]}_shortWeekdays(){return["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]}_getShortWeekday(e){return this._shortWeekdays()[e]}parse(e,t){if(e instanceof Date)return e;if(f(e))return new Date(e);let i;a(e)||(e=e.toString());let s="";t=(t=o(t)).substr(0,e.length);let r=this.parseFormat(t),n={year:-1,year3:-1,year2:-1,year1:-1,month:-1,monthShort:-1,monthLong:-1,weekdayShort:-1,weekdayLong:-1,day:-1,yearDay:-1,week:-1,hourBase0:-1,hour12Base0:-1,hourBase1:-1,hour12Base1:-1,minute:-1,second:-1,millisecond:-1,millisecondDigits:-1,am:-1,zone:-1,timestamp:-1,iso:-1},l={year:1970,month:0,day:1,hour:0,minute:0,second:0,millisecond:0,timestamp:null,offset:0,utc:this._root.utc},h=0,u=0;for(let a=0;a<r.parts.length;a++){switch(u=a+h+1,r.parts[a]){case"yyyy":case"YYYY":s+="([0-9]{4})",n.year=u;break;case"yyy":case"YYY":s+="([0-9]{3})",n.year3=u;break;case"yy":case"YY":s+="([0-9]{2})",n.year2=u;break;case"y":case"Y":s+="([0-9]{1})",n.year1=u;break;case"MMMM":s+="("+this.getStringList(this._months()).join("|")+")",n.monthLong=u;break;case"MMM":s+="("+this.getStringList(this._shortMonths()).join("|")+")",n.monthShort=u;break;case"MM":case"M":s+="([0-9]{2}|[0-9]{1})",n.month=u;break;case"ww":case"w":s+="([0-9]{2}|[0-9]{1})",n.week=u;break;case"dd":case"d":s+="([0-9]{2}|[0-9]{1})",n.day=u;break;case"DDD":case"DD":case"D":s+="([0-9]{3}|[0-9]{2}|[0-9]{1})",n.yearDay=u;break;case"dddd":s+="("+this.getStringList(this._weekdays()).join("|")+")",n.weekdayLong=u;break;case"ddd":s+="("+this.getStringList(this._shortWeekdays()).join("|")+")",n.weekdayShort=u;break;case"aaa":case"aa":case"a":s+="("+this.getStringList(["AM","PM","A.M.","P.M.","A","P"]).join("|")+")",n.am=u;break;case"hh":case"h":s+="([0-9]{2}|[0-9]{1})",n.hour12Base1=u;break;case"HH":case"H":s+="([0-9]{2}|[0-9]{1})",n.hourBase0=u;break;case"KK":case"K":s+="([0-9]{2}|[0-9]{1})",n.hour12Base0=u;break;case"kk":case"k":s+="([0-9]{2}|[0-9]{1})",n.hourBase1=u;break;case"mm":case"m":s+="([0-9]{2}|[0-9]{1})",n.minute=u;break;case"ss":case"s":s+="([0-9]{2}|[0-9]{1})",n.second=u;break;case"SSS":case"SS":case"S":s+="([0-9]{3}|[0-9]{2}|[0-9]{1})",n.millisecond=u,n.millisecondDigits=r.parts[a].length;break;case"nnn":case"nn":case"n":s+="([0-9]{3}|[0-9]{2}|[0-9]{1})",n.millisecond=u;break;case"x":s+="([0-9]{1,})",n.timestamp=u;break;case"Z":s+="GMT([-+]+[0-9]{2}:[0-9]{2})",n.zone=u;break;case"ZZ":s+="([\\-+]+[0-9]{2}[0-9]{2})",n.zone=u;break;case"i":s+="([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}|$)",n.iso=u,h+=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":h--}s+="[^0-9]*"}let c=new RegExp(s),d=e.match(c);if(d){if(n.year>-1&&(l.year=parseInt(d[n.year])),n.year3>-1){let e=parseInt(d[n.year3]);e+=1e3,l.year=e}if(n.year2>-1){let e=parseInt(d[n.year2]);e+=e>50?1e3:2e3,l.year=e}if(n.year1>-1){let e=parseInt(d[n.year1]);e=10*Math.floor((new Date).getFullYear()/10)+e,l.year=e}if(n.monthLong>-1&&(l.month=this.resolveMonth(d[n.monthLong])),n.monthShort>-1&&(l.month=this.resolveShortMonth(d[n.monthShort])),n.month>-1&&(l.month=parseInt(d[n.month])-1),n.week>-1&&-1===n.day&&(l.month=0,l.day=P(parseInt(d[n.week]),l.year,1,this._root.utc)),n.day>-1&&(l.day=parseInt(d[n.day])),n.yearDay>-1&&(l.month=0,l.day=parseInt(d[n.yearDay])),n.hourBase0>-1&&(l.hour=parseInt(d[n.hourBase0])),n.hourBase1>-1&&(l.hour=parseInt(d[n.hourBase1])-1),n.hour12Base0>-1){let e=parseInt(d[n.hour12Base0]);11==e&&(e=0),n.am>-1&&!this.isAm(d[n.am])&&(e+=12),l.hour=e}if(n.hour12Base1>-1){let e=parseInt(d[n.hour12Base1]);12==e&&(e=0),n.am>-1&&!this.isAm(d[n.am])&&(e+=12),l.hour=e}if(n.minute>-1&&(l.minute=parseInt(d[n.minute])),n.second>-1&&(l.second=parseInt(d[n.second])),n.millisecond>-1){let e=parseInt(d[n.millisecond]);2==n.millisecondDigits?e*=10:1==n.millisecondDigits&&(e*=100),l.millisecond=e}if(n.timestamp>-1){l.timestamp=parseInt(d[n.timestamp]);const e=new Date(l.timestamp);l.year=e.getUTCFullYear(),l.month=e.getUTCMonth(),l.day=e.getUTCDate(),l.hour=e.getUTCHours(),l.minute=e.getUTCMinutes(),l.second=e.getUTCSeconds(),l.millisecond=e.getUTCMilliseconds()}n.zone>-1&&(l.offset=this.resolveTimezoneOffset(new Date(l.year,l.month,l.day),d[n.zone])),n.iso>-1&&(l.year=k(d[n.iso+0]),l.month=k(d[n.iso+1])-1,l.day=k(d[n.iso+2]),l.hour=k(d[n.iso+3]),l.minute=k(d[n.iso+4]),l.second=k(d[n.iso+5]),l.millisecond=k(d[n.iso+6]),"Z"==d[n.iso+7]||"z"==d[n.iso+7]?l.utc=!0:""!=d[n.iso+7]&&(l.offset=this.resolveTimezoneOffset(new Date(l.year,l.month,l.day),d[n.iso+7]))),i=l.utc?new Date(Date.UTC(l.year,l.month,l.day,l.hour,l.minute,l.second,l.millisecond)):new Date(l.year,l.month,l.day,l.hour,l.minute+l.offset,l.second,l.millisecond)}else i=new Date(e);return i}resolveTimezoneOffset(e,t){if(t.match(/([+\-]?)([0-9]{2}):?([0-9]{2})/)){let i=t.match(/([+\-]?)([0-9]{2}):?([0-9]{2})/),s=i[1],r=i[2],a=i[3],n=60*parseInt(r)+parseInt(a);return"+"==s&&(n*=-1),n-(e||new Date).getTimezoneOffset()}return 0}resolveMonth(e){let t=this._months().indexOf(e);return t>-1||!this._root.language.isDefault()&&(t=this._root.language.translateAll(this._months()).indexOf(e),t>-1)?t:0}resolveShortMonth(e){let t=this._shortMonths().indexOf(e);return t>-1?t:(t=this._months().indexOf(e),t>-1||this._root.language&&!this._root.language.isDefault()&&(t=this._root.language.translateAll(this._shortMonths()).indexOf(e),t>-1)?t:0)}isAm(e){return this.getStringList(["AM","A.M.","A"]).indexOf(e.toUpperCase())>-1}getStringList(e){let t=[];for(let i=0;i<e.length;i++)this._root.language?t.push(O(this._t(e[i]))):t.push(O(e[i]));return t}}class Ae extends r{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(){const e="_duration_millisecond",t="_duration_second",i="_duration_minute",s="_duration_hour",r="_duration_day",a="_duration_week",n="_duration_month",o="_duration_year",l="_second",h="_minute",u="_hour",c="_day",d="_week",b="_week",f="_year";this._setDefault("negativeBase",0),this._setDefault("baseUnit","second"),this._setDefault("durationFormats",{millisecond:{millisecond:this._t(e),second:this._t(e+l),minute:this._t(e+h),hour:this._t(e+u),day:this._t(e+c),week:this._t(e+d),month:this._t(e+b),year:this._t(e+f)},second:{second:this._t(t),minute:this._t(t+h),hour:this._t(t+u),day:this._t(t+c),week:this._t(t+d),month:this._t(t+b),year:this._t(t+f)},minute:{minute:this._t(i),hour:this._t(i+u),day:this._t(i+c),week:this._t(i+d),month:this._t(i+b),year:this._t(i+f)},hour:{hour:this._t(s),day:this._t(s+c),week:this._t(s+d),month:this._t(s+b),year:this._t(s+f)},day:{day:this._t(r),week:this._t(r+d),month:this._t(r+b),year:this._t(r+f)},week:{week:this._t(a),month:this._t(a+b),year:this._t(a+f)},month:{month:this._t(n),year:this._t(n+f)},year:{year:this._t(o)}}),super._setDefaults()}_beforeChanged(){super._beforeChanged()}format(e,t,i){let s=i||this.get("baseUnit");void 0!==t&&""!==t||(t=null!=this.get("durationFormat")?this.get("durationFormat"):this.getFormat(k(e),void 0,s)),t=o(t);let r,a=this.parseFormat(t,s),n=Number(e);r=n>this.get("negativeBase")?a.positive:n<this.get("negativeBase")?a.negative:a.zero;let l=this.applyFormat(n,r);return""!==r.color&&(l="["+r.color+"]"+l+"[/]"),l}parseFormat(e,t){let i=t||this.get("baseUnit"),s={positive:{color:"",template:"",parts:[],source:"",baseUnit:i,parsed:!1,absolute:!1},negative:{color:"",template:"",parts:[],source:"",baseUnit:i,parsed:!1,absolute:!1},zero:{color:"",template:"",parts:[],source:"",baseUnit:i,parsed:!1,absolute:!1}},r=(e=e.replace("||",u)).split("|");return s.positive.source=r[0],void 0===r[2]?s.zero=s.positive:s.zero.source=r[2],void 0===r[1]?s.negative=s.positive:s.negative.source=r[1],c(s,((e,t)=>{if(t.parsed)return;let i=t.source,s=[];s=t.source.match(/^\[([^\]]*)\]/),s&&s.length&&""!==s[0]&&(i=t.source.substr(s[0].length),t.color=s[1]);let r=d.chunk(i,!0);for(let a=0;a<r.length;a++){let e=r[a];if(e.text=e.text.replace(u,"|"),"value"===e.type){e.text.match(/[yYMdDwhHKkmsSn]+a/)&&(t.absolute=!0,e.text=e.text.replace(/([yYMdDwhHKkmsSn]+)a/,"$1"));let i=e.text.match(/y+|Y+|M+|d+|D+|w+|h+|H+|K+|k+|m+|s+|S+|n+/g);if(i)for(let s=0;s<i.length;s++)null==i[s]&&(i[s]=this._unitAliases[i[s]]),t.parts.push(i[s]),e.text=e.text.replace(i[s],h)}t.template+=e.text}t.parsed=!0})),s}applyFormat(e,t){let i=!t.absolute&&e<this.get("negativeBase");e=Math.abs(e);let s=this.toTimeStamp(e,t.baseUnit),r=t.template;for(let a=0,n=t.parts.length;a<n;a++){let e=t.parts[a],i=this._toTimeUnit(e.substr(0,1)),n=e.length,o=Math.floor(s/this._getUnitValue(i));r=r.replace(h,m(o,n,"0")),s-=o*this._getUnitValue(i)}return i&&(r="-"+r),r}toTimeStamp(e,t){return e*this._getUnitValue(t)}_toTimeUnit(e){switch(e){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(e,t,i){if(null!=this.get("durationFormat"))return this.get("durationFormat");if(i||(i=this.get("baseUnit")),null!=t&&e!=t){e=Math.abs(e),t=Math.abs(t);let s=this.getValueUnit(Math.max(e,t),i);return this.get("durationFormats")[i][s]}{let t=this.getValueUnit(e,i);return this.get("durationFormats")[i][t]}}getValueUnit(e,t){let i;t||(t=this.get("baseUnit"));let s=this.getMilliseconds(e,t);return M(this._getUnitValues(),((e,r)=>{if(e==t||i){if(s/r<=1)return i||(i=e),!1;i=e}return!0})),i}getMilliseconds(e,t){return t||(t=this.get("baseUnit")),e*this._getUnitValue(t)}_getUnitValue(e){return this._getUnitValues()[e]}_getUnitValues(){return{millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:2592e6,year:31536e6}}}const Le={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:"μ",_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(e){let t="th";if(e<11||e>13)switch(e%10){case 1:t="st";break;case 2:t="nd";break;case 3:t="rd"}return t},"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 ze extends r{_setDefaults(){this.setPrivate("defaultLocale",Le),super._setDefaults()}translate(e,t,...i){t||(t=this._root.locale||this.getPrivate("defaultLocale"));let s=e,r=t[e];if(null===r)s="";else if(null!=r)r&&(s=r);else if(t!==this.getPrivate("defaultLocale"))return this.translate(e,this.getPrivate("defaultLocale"),...i);if(i.length)for(let a=i.length,n=0;n<a;++n)s=s.split("%"+(n+1)).join(i[n]);return s}translateAny(e,t,...i){return this.translate(e,t,...i)}setTranslationAny(e,t,i){(i||this._root.locale)[e]=t}setTranslationsAny(e,t){c(e,((e,i)=>{this.setTranslationAny(e,i,t)}))}translateEmpty(e,t,...i){let s=this.translate(e,t,...i);return s==e?"":s}translateFunc(e,t){return this._root.locale[e]?this._root.locale[e]:t!==this.getPrivate("defaultLocale")?this.translateFunc(e,this.getPrivate("defaultLocale")):()=>""}translateAll(e,t){return this.isDefault()?e:j(e,(e=>this.translate(e,t)))}isDefault(){return this.getPrivate("defaultLocale")===this._root.locale}}class Fe{constructor(e=1,t=0,i=0,s=1,r=0,a=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=e,this.b=t,this.c=i,this.d=s,this.tx=r,this.ty=a}setTransform(e,t,i,s,r,a=1){this.a=Math.cos(r)*a,this.b=Math.sin(r)*a,this.c=-Math.sin(r)*a,this.d=Math.cos(r)*a,this.tx=e-(i*this.a+s*this.c),this.ty=t-(i*this.b+s*this.d)}apply(e){return{x:this.a*e.x+this.c*e.y+this.tx,y:this.b*e.x+this.d*e.y+this.ty}}applyInverse(e){const t=1/(this.a*this.d+this.c*-this.b);return{x:this.d*t*e.x+-this.c*t*e.y+(this.ty*this.c-this.tx*this.d)*t,y:this.a*t*e.y+-this.b*t*e.x+(-this.ty*this.a+this.tx*this.b)*t}}append(e){const t=this.a,i=this.b,s=this.c,r=this.d;this.a=e.a*t+e.b*s,this.b=e.a*i+e.b*r,this.c=e.c*t+e.d*s,this.d=e.c*i+e.d*r,this.tx=e.tx*t+e.ty*s+this.tx,this.ty=e.tx*i+e.ty*r+this.ty}prepend(e){const t=this.tx;if(1!==e.a||0!==e.b||0!==e.c||1!==e.d){const t=this.a,i=this.c;this.a=t*e.a+this.b*e.c,this.b=t*e.b+this.b*e.d,this.c=i*e.a+this.d*e.c,this.d=i*e.b+this.d*e.d}this.tx=t*e.a+this.ty*e.c+e.tx,this.ty=t*e.b+this.ty*e.d+e.ty}copyFrom(e){this.a=e.a,this.b=e.b,this.c=e.c,this.d=e.d,this.tx=e.tx,this.ty=e.ty}}var He=function(){function e(e,t){var i=[],s=!0,r=!1,a=void 0;try{for(var n,o=e[Symbol.iterator]();!(s=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);s=!0);}catch(l){r=!0,a=l}finally{try{!s&&o.return&&o.return()}finally{if(r)throw a}}return i}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),Ye=2*Math.PI,Ie=function(e,t,i,s,r,a,n){var o=e.x,l=e.y;return{x:s*(o*=t)-r*(l*=i)+a,y:r*o+s*l+n}},Re=function(e,t){var i=1.5707963267948966===t?.551915024494:-1.5707963267948966===t?-.551915024494:4/3*Math.tan(t/4),s=Math.cos(e),r=Math.sin(e),a=Math.cos(e+t),n=Math.sin(e+t);return[{x:s-r*i,y:r+s*i},{x:a+n*i,y:n-a*i},{x:a,y:n}]},Ue=function(e,t,i,s){var r=e*i+t*s;return r>1&&(r=1),r<-1&&(r=-1),(e*s-t*i<0?-1:1)*Math.acos(r)},We=function(e,t,i,s,r,a,n,o,l,h,u,c){var d=Math.pow(r,2),b=Math.pow(a,2),f=Math.pow(u,2),p=Math.pow(c,2),m=d*b-d*p-b*f;m<0&&(m=0),m/=d*p+b*f;var g=(m=Math.sqrt(m)*(n===o?-1:1))*r/a*c,_=m*-a/r*u,y=h*g-l*_+(e+i)/2,v=l*g+h*_+(t+s)/2,w=(u-g)/r,x=(c-_)/a,P=(-u-g)/r,k=(-c-_)/a,O=Ue(1,0,w,x),M=Ue(w,x,P,k);return 0===o&&M>0&&(M-=Ye),1===o&&M<0&&(M+=Ye),[y,v,O,M]},Ve=function(e){var t=e.px,i=e.py,s=e.cx,r=e.cy,a=e.rx,n=e.ry,o=e.xAxisRotation,l=void 0===o?0:o,h=e.largeArcFlag,u=void 0===h?0:h,c=e.sweepFlag,d=void 0===c?0:c,b=[];if(0===a||0===n)return[];var f=Math.sin(l*Ye/360),p=Math.cos(l*Ye/360),m=p*(t-s)/2+f*(i-r)/2,g=-f*(t-s)/2+p*(i-r)/2;if(0===m&&0===g)return[];a=Math.abs(a),n=Math.abs(n);var _=Math.pow(m,2)/Math.pow(a,2)+Math.pow(g,2)/Math.pow(n,2);_>1&&(a*=Math.sqrt(_),n*=Math.sqrt(_));var y=We(t,i,s,r,a,n,u,d,f,p,m,g),v=He(y,4),w=v[0],x=v[1],P=v[2],k=v[3],O=Math.abs(k)/(Ye/4);Math.abs(1-O)<1e-7&&(O=1);var M=Math.max(Math.ceil(O),1);k/=M;for(var j=0;j<M;j++)b.push(Re(P,k)),P+=k;return b.map((function(e){var t=Ie(e[0],a,n,p,f,w,x),i=t.x,s=t.y,r=Ie(e[1],a,n,p,f,w,x),o=r.x,l=r.y,h=Ie(e[2],a,n,p,f,w,x);return{x1:i,y1:s,x2:o,y2:l,x:h.x,y:h.y}}))};function Ne(e,t,i){if(t!==i)throw new Error("Required "+i+" arguments for "+e+" but got "+t)}function Xe(e,t,i){if(t<i)throw new Error("Required at least "+i+" arguments for "+e+" but got "+t)}function Ge(e,t,i){if(Xe(e,t,i),t%i!=0)throw new Error("Arguments for "+e+" must be in pairs of "+i)}function qe(e){for(let t=0;t<e.length;t+=7){let i=t+3,s=e[i];if(s.length>1){const t=/^([01])([01])(.*)$/.exec(s);null!==t&&(e.splice(i,0,t[1]),++i,e.splice(i,0,t[2]),++i,t[3].length>0?e[i]=t[3]:e.splice(i,1))}if(++i,s=e[i],s.length>1){const t=/^([01])(.+)$/.exec(s);null!==t&&(e.splice(i,0,t[1]),++i,e[i]=t[2])}}}function Ke(e){if(0===e||1===e)return e;throw new Error("Flag must be 0 or 1")}function Ze(e){const t=[0,0,0];for(let i=0;i<24;i++)t[i%3]<<=1,t[i%3]|=1&e,e>>=1;return(0|t[2])+(t[1]<<8)+(t[0]<<16)}function Je(e,t){for(;(!e.interactive||t(e))&&e._parent;)e=e._parent}function $e(e,t,i){return C(e,F(t),(e=>{let t=e.touches;t?(0==t.length&&(t=e.changedTouches),i(Y(t))):i([e])}))}function Qe(e){const t=document.createElement("canvas");t.width=1,t.height=1;const i=t.getContext("2d",{willReadFrequently:!0});i.drawImage(e,0,0,1,1);try{return i.getImageData(0,0,1,1),!1}catch(s){return console.warn('Image "'+e.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 et(e){e.width=0,e.height=0,e.style.width="0px",e.style.height="0px"}class tt{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(e){this._x=e}set y(e){this._y=e}}class it extends G{constructor(e){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:!1}),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 tt}),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 Fe}),Object.defineProperty(this,"_matrix",{enumerable:!0,configurable:!0,writable:!0,value:new Fe}),Object.defineProperty(this,"_uMatrix",{enumerable:!0,configurable:!0,writable:!0,value:new Fe}),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=e}_dispose(){this._renderer._removeObject(this),this.getLayer().dirty=!0}getCanvas(){return this.getLayer().view}getLayer(){let e=this;for(;;){if(e._layer)return e._layer;if(!e._parent)return this._renderer.defaultLayer;e=e._parent}}setLayer(e,t){if(null==e)this._layer=void 0;else{const i=!0;this._layer=this._renderer.getLayer(e,i),this._layer.visible=i,this._layer.margin=t,t&&q(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(e){}_getColorId(){return void 0===this._colorId&&(this._colorId=this._renderer.paintId(this)),this._colorId}_isInteractive(){return 0==this.inactive&&(this.interactive||this._renderer._forceInteractive>0)}_isInteractiveMask(){return this._isInteractive()}contains(e){for(;;){if(e===this)return!0;if(!e._parent)return!1;e=e._parent}}toGlobal(e){return this._matrix.apply(e)}toLocal(e){return this._matrix.applyInverse(e)}getLocalMatrix(){return this._uMatrix.setTransform(0,0,this.pivot.x,this.pivot.y,this.angle*Math.PI/180,this.scale),this._uMatrix}getLocalBounds(){if(!this._localBounds){const e=1e7;this._localBounds={left:e,top:e,right:-e,bottom:-e},this._addBounds(this._localBounds)}return this._localBounds}getAdjustedBounds(e){this._setMatrix();const t=this.getLocalMatrix(),i=t.apply({x:e.left,y:e.top}),s=t.apply({x:e.right,y:e.top}),r=t.apply({x:e.right,y:e.bottom}),a=t.apply({x:e.left,y:e.bottom});return{left:Math.min(i.x,s.x,r.x,a.x),top:Math.min(i.y,s.y,r.y,a.y),right:Math.max(i.x,s.x,r.x,a.x),bottom:Math.max(i.y,s.y,r.y,a.y)}}on(e,t,i){return this.interactive?this._renderer._addEvent(this,e,t,i):new E((()=>{}))}_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(e,t){const i=this._matrix;let s=i.tx*t,r=i.ty*t;this.crisp&&(s=Math.floor(s)+.5,r=Math.floor(r)+.5),e.setTransform(i.a*t,i.b*t,i.c*t,i.d*t,s,r)}_transformMargin(e,t,i){const s=this._matrix;e.setTransform(s.a*t,s.b*t,s.c*t,s.d*t,(s.tx+i.left)*t,(s.ty+i.top)*t)}_transformLayer(e,t,i){i.margin?this._transformMargin(e,i.scale||t,i.margin):this._transform(e,i.scale||t)}render(e){if(this.visible&&(!1!==this.exportable||!this._renderer._omitTainted)){this._setMatrix();const t=this._renderer.resolution,s=this._renderer.layers,r=this._renderer._ghostLayer,a=r.context,n=this.mask;n&&n._setMatrix(),i(s,(e=>{if(e){const i=e.context;i.save(),n&&(n._transformLayer(i,t,e),n._runPath(i),i.clip()),i.globalAlpha=this.compoundAlpha*this.alpha,this._transformLayer(i,t,e),this.filter&&(i.filter=this.filter)}})),a.save(),n&&this._isInteractiveMask()&&(n._transformMargin(a,t,r.margin),n._runPath(a),a.clip()),this._transformMargin(a,t,r.margin),this._render(e),a.restore(),i(s,(e=>{e&&e.context.restore()}))}}_render(e){if(!1===this.exportable){(this._layer||e).tainted=!0}}hovering(){return this._renderer._hovering.has(this)}dragging(){return this._renderer._dragging.some((e=>e.value===this))}shouldCancelTouch(){const e=this._renderer;return!(e.tapToActivate&&!e._touchActive)&&(!!this.cancelTouch||!!this._parent&&this._parent.shouldCancelTouch())}}class st extends it{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(){return this.interactiveChildren||super._isInteractiveMask()}addChild(e){e._parent=this,this._children.push(e),e._layer&&this.registerChildLayer(e._layer)}addChildAt(e,t){e._parent=this,this._children.splice(t,0,e),e._layer&&this.registerChildLayer(e._layer)}removeChild(e){e._parent=void 0,H(this._children,e)}_render(e){super._render(e);const t=this._renderer;this.interactive&&this.interactiveChildren&&++t._forceInteractive;const s=this._layer||e;i(this._children,(e=>{e.compoundAlpha=this.compoundAlpha*this.alpha,e.render(s)})),this.interactive&&this.interactiveChildren&&--t._forceInteractive}registerChildLayer(e){this._childLayers||(this._childLayers=[]),I(this._childLayers,e),this._parent&&this._parent.registerChildLayer(e)}markDirtyLayer(e=!1){super.markDirtyLayer(),e&&this._childLayers&&i(this._childLayers,(e=>e.dirty=!0))}_dispose(){super._dispose(),this._childLayers&&i(this._childLayers,(e=>{e.dirty=!0}))}}function rt(e,t){e.left=Math.min(e.left,t.x),e.top=Math.min(e.top,t.y),e.right=Math.max(e.right,t.x),e.bottom=Math.max(e.bottom,t.y)}class at{colorize(e,t){}path(e){}addBounds(e){}}class nt extends at{colorize(e,t){e.beginPath()}}class ot extends at{constructor(e){super(),Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,writable:!0,value:e})}colorize(e,t){e.fillStyle=void 0!==t?t:this.color}}class lt extends at{constructor(e){super(),Object.defineProperty(this,"clearShadow",{enumerable:!0,configurable:!0,writable:!0,value:e})}colorize(e,t){e.fill(),this.clearShadow&&(e.shadowColor="",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}}class ht extends at{colorize(e,t){e.stroke()}}class ut extends at{constructor(e,t,i){super(),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"lineJoin",{enumerable:!0,configurable:!0,writable:!0,value:i})}colorize(e,t){e.strokeStyle=void 0!==t?t:this.color,e.lineWidth=this.width,this.lineJoin&&(e.lineJoin=this.lineJoin)}}class ct extends at{constructor(e){super(),Object.defineProperty(this,"dash",{enumerable:!0,configurable:!0,writable:!0,value:e})}colorize(e,t){e.setLineDash(this.dash)}}class dt extends at{constructor(e){super(),Object.defineProperty(this,"dashOffset",{enumerable:!0,configurable:!0,writable:!0,value:e})}colorize(e,t){e.lineDashOffset=this.dashOffset}}class bt extends at{constructor(e,t,i,s){super(),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,writable:!0,value:s})}path(e){e.rect(this.x,this.y,this.width,this.height)}addBounds(e){const t=this.x,i=this.y,s=t+this.width,r=i+this.height;rt(e,{x:t,y:i}),rt(e,{x:s,y:i}),rt(e,{x:t,y:r}),rt(e,{x:s,y:r})}}class ft extends at{constructor(e,t,i){super(),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"radius",{enumerable:!0,configurable:!0,writable:!0,value:i})}path(e){e.moveTo(this.x+this.radius,this.y),e.arc(this.x,this.y,this.radius,0,2*Math.PI)}addBounds(e){rt(e,{x:this.x-this.radius,y:this.y-this.radius}),rt(e,{x:this.x+this.radius,y:this.y+this.radius})}}class pt extends at{constructor(e,t,i,s){super(),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"radiusX",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"radiusY",{enumerable:!0,configurable:!0,writable:!0,value:s})}path(e){e.ellipse(0,0,this.radiusX,this.radiusY,0,0,2*Math.PI)}addBounds(e){rt(e,{x:this.x-this.radiusX,y:this.y-this.radiusY}),rt(e,{x:this.x+this.radiusX,y:this.y+this.radiusY})}}class mt extends at{constructor(e,t,i,s,r,a){super(),Object.defineProperty(this,"cx",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"cy",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"radius",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"startAngle",{enumerable:!0,configurable:!0,writable:!0,value:s}),Object.defineProperty(this,"endAngle",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"anticlockwise",{enumerable:!0,configurable:!0,writable:!0,value:a})}path(e){this.radius>0&&e.arc(this.cx,this.cy,this.radius,this.startAngle,this.endAngle,this.anticlockwise)}addBounds(e){let t=K(this.cx,this.cy,this.startAngle*Z,this.endAngle*Z,this.radius);rt(e,{x:t.left,y:t.top}),rt(e,{x:t.right,y:t.bottom})}}class gt extends at{constructor(e,t,i,s,r){super(),Object.defineProperty(this,"x1",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"y1",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"x2",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"y2",{enumerable:!0,configurable:!0,writable:!0,value:s}),Object.defineProperty(this,"radius",{enumerable:!0,configurable:!0,writable:!0,value:r})}path(e){this.radius>0&&e.arcTo(this.x1,this.y1,this.x2,this.y2,this.radius)}addBounds(e){}}class _t extends at{constructor(e,t){super(),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,writable:!0,value:t})}path(e){e.lineTo(this.x,this.y)}addBounds(e){rt(e,{x:this.x,y:this.y})}}class yt extends at{constructor(e,t){super(),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,writable:!0,value:t})}path(e){e.moveTo(this.x,this.y)}addBounds(e){rt(e,{x:this.x,y:this.y})}}class vt extends at{path(e){e.closePath()}}class wt extends at{constructor(e,t,i,s,r,a){super(),Object.defineProperty(this,"cpX",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"cpY",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"cpX2",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"cpY2",{enumerable:!0,configurable:!0,writable:!0,value:s}),Object.defineProperty(this,"toX",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"toY",{enumerable:!0,configurable:!0,writable:!0,value:a})}path(e){e.bezierCurveTo(this.cpX,this.cpY,this.cpX2,this.cpY2,this.toX,this.toY)}addBounds(e){rt(e,{x:this.cpX,y:this.cpY}),rt(e,{x:this.cpX2,y:this.cpY2}),rt(e,{x:this.toX,y:this.toY})}}class xt extends at{constructor(e,t,i,s){super(),Object.defineProperty(this,"cpX",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"cpY",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"toX",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"toY",{enumerable:!0,configurable:!0,writable:!0,value:s})}path(e){e.quadraticCurveTo(this.cpX,this.cpY,this.toX,this.toY)}addBounds(e){rt(e,{x:this.cpX,y:this.cpY}),rt(e,{x:this.toX,y:this.toY})}}class Pt extends at{constructor(e,t,i,s,r){super(),Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"blur",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"offsetX",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"offsetY",{enumerable:!0,configurable:!0,writable:!0,value:s}),Object.defineProperty(this,"opacity",{enumerable:!0,configurable:!0,writable:!0,value:r})}colorize(e,t){this.opacity&&(e.fillStyle=this.color),e.shadowColor=this.color,e.shadowBlur=this.blur,e.shadowOffsetX=this.offsetX,e.shadowOffsetY=this.offsetY}}class kt extends at{constructor(e,t,i,s,r){super(),Object.defineProperty(this,"image",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,writable:!0,value:s}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,writable:!0,value:r})}path(e){e.drawImage(this.image,this.x,this.y,this.width,this.height)}addBounds(e){rt(e,{x:this.x,y:this.y}),rt(e,{x:this.width,y:this.height})}}class Ot extends it{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:R.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(e){this._operations.push(e)}beginFill(e,t=1){this._fillAlpha=t,e?e instanceof D?this._pushOp(new ot(e.toCSS(t))):(this.isMeasured=!0,this._pushOp(new ot(e))):this._pushOp(new ot("rgba(0, 0, 0, "+t+")"))}endFill(){this._pushOp(new lt(this._hasShadows))}endStroke(){this._pushOp(new ht)}beginPath(){this._pushOp(new nt)}lineStyle(e=0,t,i=1,s){this._strokeAlpha=i,t?t instanceof D?this._pushOp(new ut(e,t.toCSS(i),s)):this._pushOp(new ut(e,t,s)):this._pushOp(new ut(e,"rgba(0, 0, 0, "+i+")",s))}setLineDash(e){this._pushOp(new ct(e||[]))}setLineDashOffset(e=0){this._pushOp(new dt(e))}drawRect(e,t,i,s){this._pushOp(new bt(e,t,i,s))}drawCircle(e,t,i){this._pushOp(new ft(e,t,i))}drawEllipse(e,t,i,s){this._pushOp(new pt(e,t,i,s))}arc(e,t,i,s,r,a=!1){this._pushOp(new mt(e,t,i,s,r,a))}arcTo(e,t,i,s,r){this._pushOp(new gt(e,t,i,s,r))}lineTo(e,t){this._pushOp(new _t(e,t))}moveTo(e,t){this._pushOp(new yt(e,t))}bezierCurveTo(e,t,i,s,r,a){this._pushOp(new wt(e,t,i,s,r,a))}quadraticCurveTo(e,t,i,s){this._pushOp(new xt(e,t,i,s))}closePath(){this._pushOp(new vt)}shadow(e,t=0,i=0,s=0,r){this._hasShadows=!0,this._pushOp(new Pt(r?e.toCSS(r):e.toCSS(this._fillAlpha||this._strokeAlpha),t,i,s))}image(e,t,i,s,r){this._pushOp(new kt(e,t,i,s,r))}svgPath(e){let t=0,s=0,r=null,a=null,n=null,o=null;const l=/([MmZzLlHhVvCcSsQqTtAa])([^MmZzLlHhVvCcSsQqTtAa]*)/g,h=/[\u0009\u0020\u000A\u000C\u000D]*([\+\-]?[0-9]*\.?[0-9]+(?:[eE][\+\-]?[0-9]+)?)[\u0009\u0020\u000A\u000C\u000D]*,?/g;let u;for(;null!==(u=l.exec(e));){const e=u[1],l=u[2],c=[];for(;null!==(u=h.exec(l));)c.push(u[1]);switch("S"!==e&&"s"!==e&&"C"!==e&&"c"!==e&&(r=null,a=null),"Q"!==e&&"q"!==e&&"T"!==e&&"t"!==e&&(n=null,o=null),e){case"M":Ge(e,c.length,2),t=+c[0],s=+c[1],this.moveTo(t,s);for(let e=2;e<c.length;e+=2)t=+c[e],s=+c[e+1],this.lineTo(t,s);break;case"m":Ge(e,c.length,2),t+=+c[0],s+=+c[1],this.moveTo(t,s);for(let e=2;e<c.length;e+=2)t+=+c[e],s+=+c[e+1],this.lineTo(t,s);break;case"L":Ge(e,c.length,2);for(let e=0;e<c.length;e+=2)t=+c[e],s=+c[e+1],this.lineTo(t,s);break;case"l":Ge(e,c.length,2);for(let e=0;e<c.length;e+=2)t+=+c[e],s+=+c[e+1],this.lineTo(t,s);break;case"H":Xe(e,c.length,1);for(let e=0;e<c.length;++e)t=+c[e],this.lineTo(t,s);break;case"h":Xe(e,c.length,1);for(let e=0;e<c.length;++e)t+=+c[e],this.lineTo(t,s);break;case"V":Xe(e,c.length,1);for(let e=0;e<c.length;++e)s=+c[e],this.lineTo(t,s);break;case"v":Xe(e,c.length,1);for(let e=0;e<c.length;++e)s+=+c[e],this.lineTo(t,s);break;case"C":Ge(e,c.length,6);for(let e=0;e<c.length;e+=6){const i=+c[e],n=+c[e+1];r=+c[e+2],a=+c[e+3],t=+c[e+4],s=+c[e+5],this.bezierCurveTo(i,n,r,a,t,s)}break;case"c":Ge(e,c.length,6);for(let e=0;e<c.length;e+=6){const i=+c[e]+t,n=+c[e+1]+s;r=+c[e+2]+t,a=+c[e+3]+s,t+=+c[e+4],s+=+c[e+5],this.bezierCurveTo(i,n,r,a,t,s)}break;case"S":Ge(e,c.length,4),null!==r&&null!==a||(r=t,a=s);for(let e=0;e<c.length;e+=4){const i=2*t-r,n=2*s-a;r=+c[e],a=+c[e+1],t=+c[e+2],s=+c[e+3],this.bezierCurveTo(i,n,r,a,t,s)}break;case"s":Ge(e,c.length,4),null!==r&&null!==a||(r=t,a=s);for(let e=0;e<c.length;e+=4){const i=2*t-r,n=2*s-a;r=+c[e]+t,a=+c[e+1]+s,t+=+c[e+2],s+=+c[e+3],this.bezierCurveTo(i,n,r,a,t,s)}break;case"Q":Ge(e,c.length,4);for(let e=0;e<c.length;e+=4)n=+c[e],o=+c[e+1],t=+c[e+2],s=+c[e+3],this.quadraticCurveTo(n,o,t,s);break;case"q":Ge(e,c.length,4);for(let e=0;e<c.length;e+=4)n=+c[e]+t,o=+c[e+1]+s,t+=+c[e+2],s+=+c[e+3],this.quadraticCurveTo(n,o,t,s);break;case"T":Ge(e,c.length,2),null!==n&&null!==o||(n=t,o=s);for(let e=0;e<c.length;e+=2)n=2*t-n,o=2*s-o,t=+c[e],s=+c[e+1],this.quadraticCurveTo(n,o,t,s);break;case"t":Ge(e,c.length,2),null!==n&&null!==o||(n=t,o=s);for(let e=0;e<c.length;e+=2)n=2*t-n,o=2*s-o,t+=+c[e],s+=+c[e+1],this.quadraticCurveTo(n,o,t,s);break;case"A":case"a":const l="a"===e;qe(c),Ge(e,c.length,7);for(let e=0;e<c.length;e+=7){let r=+c[e+5],a=+c[e+6];l&&(r+=t,a+=s);const n=Ve({px:t,py:s,rx:+c[e],ry:+c[e+1],xAxisRotation:+c[e+2],largeArcFlag:Ke(+c[e+3]),sweepFlag:Ke(+c[e+4]),cx:r,cy:a});i(n,(e=>{this.bezierCurveTo(e.x1,e.y1,e.x2,e.y2,e.x,e.y),t=e.x,s=e.y}))}break;case"Z":case"z":Ne(e,c.length,0),this.closePath()}}}_runPath(e){e.beginPath(),i(this._operations,(t=>{t.path(e)}))}_render(e){super._render(e);const t=this._layer||e,s=t.dirty,r=this._isInteractive();if(s||r){const e=t.context,a=this._renderer._ghostLayer.context;let n;s&&(e.globalCompositeOperation=this.blendMode,e.beginPath()),r&&(a.beginPath(),n=this._getColorId()),i(this._operations,(t=>{s&&(t.path(e),t.colorize(e,void 0)),r&&(t.path(a),t.colorize(a,n))}))}}renderDetached(e){if(this.visible){this._setMatrix(),e.save();const t=this.mask;t&&(t._setMatrix(),t._transform(e,1),t._runPath(e),e.clip()),e.globalAlpha=this.compoundAlpha*this.alpha,this._transform(e,1),this.filter&&(e.filter=this.filter),e.globalCompositeOperation=this.blendMode,e.beginPath(),i(this._operations,(t=>{t.path(e),t.colorize(e,void 0)})),e.restore()}}_addBounds(e){this.visible&&this.isMeasured&&i(this._operations,(t=>{t.addBounds(e)}))}}class Mt extends it{constructor(e,t,i){super(e),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=t,this.style=i}invalidateBounds(){super.invalidateBounds(),this._textInfo=void 0}_shared(e){this.style.textAlign&&(e.textAlign=this.style.textAlign),this.style.direction&&(e.direction=this.style.direction),this.style.textBaseline&&(e.textBaseline=this.style.textBaseline)}_prerender(e,t=!1,i=!1){super._render(e);const s=e.context,r=this._renderer._ghostLayer.context,a=this.style;let n=this._getFontStyle(void 0,i);s.font=n,this._isInteractive()&&!t&&(r.font=n),a.fill&&(a.fill instanceof D?s.fillStyle=a.fill.toCSS(null!=a.fillOpacity?a.fillOpacity:1):s.fillStyle=a.fill),a.shadowColor&&(e.context.shadowColor=a.shadowColor.toCSS(a.shadowOpacity||1)),a.shadowBlur&&(e.context.shadowBlur=a.shadowBlur),a.shadowOffsetX&&(e.context.shadowOffsetX=a.shadowOffsetX),a.shadowOffsetY&&(e.context.shadowOffsetY=a.shadowOffsetY),this._shared(s),this._isInteractive()&&!t&&(r.fillStyle=this._getColorId(),this._shared(r))}_getFontStyle(e,t=!1){const i=this.style;let s=[];return e&&e.fontVariant?s.push(e.fontVariant):i.fontVariant&&s.push(i.fontVariant),t||(e&&e.fontWeight?s.push(e.fontWeight):i.fontWeight&&s.push(i.fontWeight)),e&&e.fontStyle?s.push(e.fontStyle):i.fontStyle&&s.push(i.fontStyle),e&&e.fontSize?(f(e.fontSize)&&(e.fontSize=e.fontSize+"px"),s.push(e.fontSize)):i.fontSize&&(f(i.fontSize)&&(i.fontSize=i.fontSize+"px"),s.push(i.fontSize)),e&&e.fontFamily?s.push(e.fontFamily):i.fontFamily?s.push(i.fontFamily):s.length&&s.push("Arial"),s.join(" ")}_render(e){const t=this._layer||e;if(this._textInfo||this._measure(t),this.textVisible){const e=this._isInteractive(),s=t.context,r=t.dirty,a=this._renderer._ghostLayer.context;s.save(),a.save(),this._prerender(t),i(this._textInfo,((t,n)=>{i(t.textChunks,((i,n)=>{if(i.style&&(s.save(),a.save(),s.font=i.style,this._isInteractive()&&(a.font=i.style)),i.fill&&(s.save(),s.fillStyle=i.fill.toCSS()),r&&s.fillText(i.text,i.offsetX,t.offsetY+i.offsetY),"underline"==i.textDecoration||"line-through"==i.textDecoration){let e,r=1,a=1,n=i.height,o=i.offsetX;switch(this.style.textAlign){case"right":case"end":o-=i.width;break;case"center":o-=i.width/2}if(i.style){switch(d.getTextStyle(i.style).fontWeight){case"bolder":case"bold":case"700":case"800":case"900":r=2}}n&&(a=n/20),e="line-through"==i.textDecoration?r+t.offsetY+i.offsetY-i.height/2:r+1.5*a+t.offsetY+i.offsetY,s.save(),s.beginPath(),i.fill?s.strokeStyle=i.fill.toCSS():this.style.fill&&this.style.fill instanceof D&&(s.strokeStyle=this.style.fill.toCSS()),s.lineWidth=r*a,s.moveTo(o,e),s.lineTo(o+i.width,e),s.stroke(),s.restore()}e&&this.interactive&&a.fillText(i.text,i.offsetX,t.offsetY+i.offsetY),i.fill&&s.restore(),i.style&&(s.restore(),a.restore())}))})),s.restore(),a.restore()}}_addBounds(e){if(this.visible&&this.isMeasured){const t=this._measure(this.getLayer());rt(e,{x:t.left,y:t.top}),rt(e,{x:t.right,y:t.bottom})}}_ignoreFontWeight(){return/apple/i.test(navigator.vendor)}_measure(e){const t=e.context,s=this._renderer._ghostLayer.context,r="rtl"==this.style.direction;this._textInfo=[];const a=this.style.oversizedBehavior,n=this.style.maxWidth,o=f(n)&&"truncate"==a,l=f(n)&&("wrap"==a||"wrap-no-break"==a);t.save(),s.save(),this._prerender(e,!0,this._ignoreFontWeight());const h="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",u=this.text.toString().replace(/\r/g,"").split(/\n/);let c,b=!0,p=0,m=0,g=0;i(u,((e,i)=>{let r;for(r=""==e?[{type:"value",text:""}]:d.chunk(e,!1,this.style.ignoreFormatting);r.length>0;){let e={offsetY:g,ascent:0,width:0,height:0,left:0,right:0,textChunks:[]};const i=this._measureText(h,t),a=i.actualBoundingBoxAscent+i.actualBoundingBoxDescent;let u;e.height=a,e.ascent=i.actualBoundingBoxAscent;let f,_,y,v=this.style.textDecoration,w=!1,x=!0,P=[];U(r,((i,a)=>{if("format"==i.type)if("[/]"==i.text)b||(t.restore(),s.restore(),b=!0),f=void 0,c=void 0,_=void 0,v=this.style.textDecoration,y=void 0,u=i.text;else{b||(t.restore(),s.restore());let r=d.getTextStyle(i.text);const a=this._getFontStyle(r);t.save(),s.save(),t.font=a,c=a,u=i.text,r.textDecoration&&(v=r.textDecoration),r.fill&&(f=r.fill),r.width&&(_=k(r.width)),r.verticalAlign&&(y=r.verticalAlign),b=!1;const n=this._measureText(h,t),o=n.actualBoundingBoxAscent+n.actualBoundingBoxDescent;o>e.height&&(e.height=o),n.actualBoundingBoxAscent>e.ascent&&(e.ascent=n.actualBoundingBoxAscent)}else if("value"==i.type&&!w){const s=this._measureText(i.text,t);let h=s.actualBoundingBoxLeft+s.actualBoundingBoxRight;if(o){let s=x||this.style.breakWords||!1;const r=this.style.ellipsis||"",a=this._measureText(r,t),o=a.actualBoundingBoxLeft+a.actualBoundingBoxRight;if(e.width+h>n){const a=n-e.width-o;i.text=this._truncateText(t,i.text,a,s),i.text+=r,w=!0}}else if(l&&e.width+h>n){const s=n-e.width,o=this._truncateText(t,i.text,s,!1,x&&"wrap-no-break"!=this.style.oversizedBehavior);if(""==o)return this.textVisible=!0,!1;P=r.slice(a+1),J(o)!=J(i.text)&&(P.unshift({type:"value",text:i.text.substr(o.length)}),u&&P.unshift({type:"format",text:u})),i.text=J(o),r=[],w=!0}let d=1,b=1;if(c&&_&&_>h){const e=h/_;switch(this.style.textAlign){case"right":case"end":d=e;break;case"center":d=e,b=e;break;default:b=e}h=_}const p=s.actualBoundingBoxAscent+s.actualBoundingBoxDescent;p>e.height&&(e.height=p),s.actualBoundingBoxAscent>e.ascent&&(e.ascent=s.actualBoundingBoxAscent),e.width+=h,e.left+=s.actualBoundingBoxLeft/d,e.right+=s.actualBoundingBoxRight/b,e.textChunks.push({style:c,fill:f,text:i.text,width:h,height:p,left:s.actualBoundingBoxLeft,right:s.actualBoundingBoxRight,ascent:s.actualBoundingBoxAscent,offsetX:0,offsetY:0,textDecoration:v,verticalAlign:y}),x=!1}return!0})),this.style.lineHeight instanceof W?(e.height*=this.style.lineHeight.value,e.ascent*=this.style.lineHeight.value):(e.height*=this.style.lineHeight||1.2,e.ascent*=this.style.lineHeight||1.2),p<e.left&&(p=e.left),m<e.right&&(m=e.right),this._textInfo.push(e),g+=e.height,r=P||[]}})),b||(t.restore(),s.restore()),i(this._textInfo,((e,t)=>{let s=0;i(e.textChunks,(t=>{if(t.offsetX=s+t.left-e.left,t.offsetY+=e.height-e.height*(this.style.baselineRatio||.19),s+=t.width,t.verticalAlign)switch(t.verticalAlign){case"super":t.offsetY-=e.height/2-t.height/2;break;case"sub":t.offsetY+=t.height/2}}))}));const _={left:r?-m:-p,top:0,right:r?p:m,bottom:g};if("none"!==a){const e=this._fitRatio(_);if(e<1)if("fit"==a)f(this.style.minScale)&&e<this.style.minScale?(this.textVisible=!1,_.left=0,_.top=0,_.right=0,_.bottom=0):(this._originalScale&&1!=this._originalScale||(this._originalScale=this.scale),this.scale=e,this.textVisible=!0);else if("hide"==a)this.textVisible=!1,_.left=0,_.top=0,_.right=0,_.bottom=0;else{switch(this.style.textAlign){case"right":case"end":_.left=-n,_.right=0;break;case"center":_.left=-n/2,_.right=n/2;break;default:_.left=0,_.right=n}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}return t.restore(),s.restore(),_}_fitRatio(e){const t=this.style.maxWidth,i=this.style.maxHeight;if(!f(t)&&!f(i))return 1;const s=e.right-e.left,r=e.bottom-e.top;return Math.min(t/s||1,i/r||1)}_truncateText(e,t,i,s=!1,r=!0){let a;do{if(s)t=t.slice(0,-1);else{let e=t.replace(/[^,;:!?\\\/\s]+[,;:!?\\\/\s]*$/g,"");if(""==e&&r)s=!0;else{if(""==e)return t;t=e}}const i=this._measureText(t,e);a=i.actualBoundingBoxLeft+i.actualBoundingBoxRight}while(a>i&&""!=t);return t}_measureText(e,t){let i=t.measureText(e),s={};if(null==i.actualBoundingBoxAscent){const t=document.createElement("div");t.innerText=e,t.style.visibility="hidden",t.style.position="absolute",t.style.top="-1000000px;",t.style.fontFamily=this.style.fontFamily||"",t.style.fontSize=this.style.fontSize+"",document.body.appendChild(t);const r=t.getBoundingClientRect();document.body.removeChild(t);const a=r.height,n=i.width;s={actualBoundingBoxAscent:a,actualBoundingBoxDescent:0,actualBoundingBoxLeft:0,actualBoundingBoxRight:n,fontBoundingBoxAscent:a,fontBoundingBoxDescent:0,width:n}}else s={actualBoundingBoxAscent:i.actualBoundingBoxAscent,actualBoundingBoxDescent:i.actualBoundingBoxDescent,actualBoundingBoxLeft:i.actualBoundingBoxLeft,actualBoundingBoxRight:i.actualBoundingBoxRight,fontBoundingBoxAscent:i.actualBoundingBoxAscent,fontBoundingBoxDescent:i.actualBoundingBoxDescent,width:i.width};const r=i.width;switch(this.style.textAlign){case"right":case"end":s.actualBoundingBoxLeft=r,s.actualBoundingBoxRight=0;break;case"center":s.actualBoundingBoxLeft=r/2,s.actualBoundingBoxRight=r/2;break;default:s.actualBoundingBoxLeft=0,s.actualBoundingBoxRight=r}return s}}class jt{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:V(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:"…"}),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 St extends Mt{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(e){if("circular"===this.textType)this._renderCircular(e);else super._render(e)}_renderCircular(e){if(this.textVisible){const t=this._layer||e;this._prerender(t);const s=this._isInteractive(),r=t.context,a=t.dirty,n=this._renderer._ghostLayer.context;r.save(),s&&n.save(),this._textInfo||this._measure(t);let o=this.radius||0,l=this.startAngle||0,h=0,u=this.orientation,c="auto"==u?"auto":"inward"==u;const d=this.inside,b=this.style.textAlign||"left",f=this.kerning||0;let p="left"==b?1:-1;const m=!this._textReversed;if("auto"==c){let e=0,t=0;i(this._textInfo,((t,i)=>{const s=l+t.width/(o-t.height)/2*-p;s>e&&(e=s)})),t="left"==b?(e+h/2)*Z:"right"==b?(e-h/2)*Z:l*Z,t=N(t),c=t>=270||t<=90}1==c&&m&&(this._textInfo.reverse(),this._textReversed=!0),i(this._textInfo,((e,t)=>{const u=e.height;d||(o+=u),(-1==p&&c||1==p&&!c)&&m&&e.textChunks.reverse();let g=l;h=0,"center"==b&&(g+=e.width/(o-u)/2*-p,h=g-l),g+=Math.PI*(c?0:1),r.save(),s&&n.save(),r.rotate(g),s&&n.rotate(g);let _=0;i(e.textChunks,((e,t)=>{const i=e.text,l=e.width;_=l/2/(o-u)*p,r.rotate(_),s&&n.rotate(_),e.style&&(r.save(),n.save(),r.font=e.style,s&&(n.font=e.style)),e.fill&&(r.save(),r.fillStyle=e.fill.toCSS()),r.textBaseline="middle",r.textAlign="center",s&&(n.textBaseline="middle",n.textAlign="center"),a&&r.fillText(i,0,(c?1:-1)*(0-o+u/2)),s&&n.fillText(i,0,(c?1:-1)*(0-o+u/2)),e.fill&&r.restore(),e.style&&(r.restore(),n.restore()),_=(l/2+f)/(o-u)*p,r.rotate(_),s&&n.rotate(_)})),r.restore(),s&&n.restore(),d&&(o-=u)})),r.restore(),s&&n.restore()}}_measure(e){return"circular"===this.textType?this._measureCircular(e):super._measure(e)}_measureCircular(e){const t=e.context,s=this._renderer._ghostLayer.context,r="rtl"==this.style.direction,a=this.style.oversizedBehavior,n=this.style.maxWidth,o=f(n)&&"truncate"==a,l=this.style.ellipsis||"";let h;this.textVisible=!0,this._textInfo=[],this._textReversed=!1,t.save(),s.save(),this._prerender(e,!0);const u=this.text.toString().replace(/\r/g,"").split(/\n/);let c=!0,b=0,p=0;return i(u,((e,a)=>{let u,f,m,g=d.chunk(e,!1,this.style.ignoreFormatting),_={offsetY:p,ascent:0,width:0,height:0,left:0,right:0,textChunks:[]};i(g,((e,i)=>{if("format"==e.type){if("[/]"==e.text)c||(t.restore(),s.restore(),c=!0),f=void 0,u=void 0,m=void 0;else{let i=d.getTextStyle(e.text);const r=this._getFontStyle(i);t.save(),s.save(),t.font=r,u=r,i.fill&&(f=i.fill),i.width&&(m=k(i.width)),c=!1}o&&(h=this._measureText(l,t))}else if("value"==e.type){const i=e.text.match(/./gu)||[];r&&i.reverse();for(let e=0;e<i.length;e++){const s=i[e],a=this._measureText(s,t);let c=a.width;u&&m&&m>c&&(c=m);const d=a.actualBoundingBoxAscent+a.actualBoundingBoxDescent;if(d>_.height&&(_.height=d),a.actualBoundingBoxAscent>_.ascent&&(_.ascent=a.actualBoundingBoxAscent),_.width+=c,_.left+=a.actualBoundingBoxLeft,_.right+=a.actualBoundingBoxRight,_.textChunks.push({style:u,fill:f,text:s,width:c,height:d+a.actualBoundingBoxDescent,left:a.actualBoundingBoxLeft,right:a.actualBoundingBoxRight,ascent:a.actualBoundingBoxAscent,offsetX:0,offsetY:d,textDecoration:void 0}),b+=c,o){h||(h=this._measureText(l,t));const e=h.actualBoundingBoxLeft+h.actualBoundingBoxRight;if(b+=e,b+e>n){1==_.textChunks.length?this.textVisible=!1:(_.width+=e,_.left+=h.actualBoundingBoxLeft,_.right+=h.actualBoundingBoxRight,_.textChunks.push({style:u,fill:f,text:l,width:e,height:d+h.actualBoundingBoxDescent,left:h.actualBoundingBoxLeft,right:h.actualBoundingBoxRight,ascent:h.actualBoundingBoxAscent,offsetX:0,offsetY:d,textDecoration:void 0}));break}}if(r)break}}})),this.style.lineHeight instanceof W?_.height*=this.style.lineHeight.value:_.height*=this.style.lineHeight||1.2,this._textInfo.push(_),p+=_.height})),c||(t.restore(),s.restore()),"hide"==a&&b>n&&(this.textVisible=!1),i(this._textInfo,(e=>{i(e.textChunks,(t=>{t.offsetY+=Math.round((e.height-t.height+(e.ascent-t.ascent))/2)}))})),t.restore(),s.restore(),{left:0,top:0,right:0,bottom:0}}}class Et extends it{constructor(e,t){super(e),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=t}_dispose(){super._dispose(),this._imageMask&&et(this._imageMask)}getLocalBounds(){if(!this._localBounds){let e=0,t=0;this.width&&(e=this.width),this.height&&(t=this.height),this._localBounds={left:0,top:0,right:e,bottom:t},this._addBounds(this._localBounds)}return this._localBounds}_render(e){if(super._render(e),this.image){const t=this._layer||e;if(void 0===this.tainted&&(this.tainted=Qe(this.image),t.tainted=!0),this.tainted&&this._renderer._omitTainted)return;if(t.dirty){this.shadowColor&&(t.context.shadowColor=this.shadowColor.toCSS(this.shadowOpacity||1)),this.shadowBlur&&(t.context.shadowBlur=this.shadowBlur),this.shadowOffsetX&&(t.context.shadowOffsetX=this.shadowOffsetX),this.shadowOffsetY&&(t.context.shadowOffsetY=this.shadowOffsetY);const e=this.width||this.image.naturalWidth,i=this.height||this.image.naturalHeight;t.context.drawImage(this.image,0,0,e,i)}if(this.interactive&&this._isInteractive()){const e=this._getMask(this.image);this._renderer._ghostLayer.context.drawImage(e,0,0)}}}clear(){super.clear(),this.image=void 0,this._imageMask=void 0}_getMask(e){if(void 0===this._imageMask){const t=this.width||e.naturalWidth,i=this.height||e.naturalHeight,s=document.createElement("canvas");s.width=t,s.height=i;const r=s.getContext("2d");r.imageSmoothingEnabled=!1,r.fillStyle=this._getColorId(),r.fillRect(0,0,t,i),Qe(e)||(r.globalCompositeOperation="destination-in",r.drawImage(e,0,0,t,i)),this._imageMask=s}return this._imageMask}}class Tt{constructor(e,t,i,s){Object.defineProperty(this,"event",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"originalPoint",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"point",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"bbox",{enumerable:!0,configurable:!0,writable:!0,value:s}),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}),T("touchevents")&&e instanceof Touch?this.id=e.identifier:this.id=null}}class Ct extends S{constructor(e){if(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 Bt}),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,"_domWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_domHeight",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_canvasWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_canvasHeight",{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=e??window.devicePixelRatio,this.view.style.position="absolute",this.view.appendChild(this._layerDom),this._disposers.push(new E((()=>{c(this._events,((e,t)=>{t.disposer.dispose()})),i(this.layers,(e=>{et(e.view),e.exportableView&&et(e.exportableView)})),et(this._ghostLayer.view),et(this._patternCanvas)}))),this._disposers.push(t((()=>{null==e&&(this.resolution=window.devicePixelRatio)}))),T("touchevents")){const e=e=>{0!==this._dragging.length&&U(this._dragging,(t=>!t.value.shouldCancelTouch()||(e.preventDefault(),!1))),this._touchActiveTimeout&&this._delayTouchDeactivate()};this._disposers.push(C(window,"touchstart",e,{passive:!1})),this._disposers.push(C(this.view,"touchstart",e,{passive:!1})),this._disposers.push(C(this.view,"touchmove",(()=>{this._touchActiveTimeout&&this._delayTouchDeactivate()}),{passive:!0})),this._disposers.push(C(window,"click",(e=>{this._touchActive=!1}),{passive:!0})),this._disposers.push(C(this.view,"click",(e=>{window.setTimeout((()=>{this._touchActive=!0,this._delayTouchDeactivate()}),100)}),{passive:!0}))}T("wheelevents")&&this._disposers.push(C(this.view,"wheel",(e=>{let t=!1;this._hovering.forEach((e=>{if(e.wheelable)return t=!0,!1})),t&&e.preventDefault()}),{passive:!1}))}_delayTouchDeactivate(){this._touchActiveTimeout&&clearTimeout(this._touchActiveTimeout),this.tapToActivateTimeout>0&&(this._touchActiveTimeout=window.setTimeout((()=>{this._touchActive=!1}),this.tapToActivateTimeout))}get debugGhostView(){return!!this._ghostLayer.view.parentNode}set debugGhostView(e){e?this._ghostLayer.view.parentNode||this.view.appendChild(this._ghostLayer.view):this._ghostLayer.view.parentNode&&this._ghostLayer.view.parentNode.removeChild(this._ghostLayer.view)}createLinearGradient(e,t,i,s){return this.defaultLayer.context.createLinearGradient(e,t,i,s)}createRadialGradient(e,t,i,s,r,a){return this.defaultLayer.context.createRadialGradient(e,t,i,s,r,a)}createPattern(e,t,i,s,r){return this._patternCanvas.width=s,this._patternCanvas.height=r,this._patternContext.clearRect(0,0,s,r),t.renderDetached(this._patternContext),e.renderDetached(this._patternContext),this._patternContext.createPattern(this._patternCanvas,i)}makeContainer(){return new st(this)}makeGraphics(){return new Ot(this)}makeText(e,t){return new Mt(this,e,t)}makeTextStyle(){return new jt}makeRadialText(e,t){return new St(this,e,t)}makePicture(e){return new Et(this,e)}resizeLayer(e){e.resize(this._canvasWidth,this._canvasHeight,this._domWidth,this._domHeight,this.resolution)}resizeGhost(){this._ghostLayer.resize(this._canvasWidth,this._canvasHeight,this._domWidth,this._domHeight,this.resolution)}resize(e,t,s,r){this._canvasWidth=e,this._canvasHeight=t,this._domWidth=s,this._domHeight=r,i(this.layers,(e=>{e&&(e.dirty=!0,this.resizeLayer(e))})),this.resizeGhost(),this.view.style.width=s+"px",this.view.style.height=r+"px"}createDetachedLayer(e=!1){const t=document.createElement("canvas"),i=t.getContext("2d",{willReadFrequently:e}),s=new Dt(t,i);return t.style.position="absolute",t.style.top="0px",t.style.left="0px",s}getLayerByOrder(e){const t=this.layers,i=t.length;for(let s=0;s<i;s++){const i=t[s];if(i.order==e)return i}}getLayer(e,t=!0){let i=this.getLayerByOrder(e);if(i)return i;const s=this.createDetachedLayer(99==e);s.order=e,s.visible=t,s.visible&&this.resizeLayer(s);const r=this.layers;r.push(s),r.sort(((e,t)=>e.order>t.order?1:e.order<t.order?-1:0));const a=r.length;let n;for(let o=B(r,s)+1;o<a;o++)if(r[o].visible){n=r[o];break}return s.visible&&(void 0===n?this._layerDom.appendChild(s.view):this._layerDom.insertBefore(s.view,n.view)),s}render(e){if(this._dirtyLayers.length=0,i(this.layers,(e=>{e&&e.dirty&&e.visible&&(this._dirtyLayers.push(e),e.clear())})),this._ghostLayer.clear(),e.render(this.defaultLayer),this._ghostLayer.context.restore(),i(this.layers,(e=>{if(e){const t=e.context;t.beginPath(),t.moveTo(0,0),t.stroke()}})),i(this._dirtyLayers,(e=>{e.context.restore(),e.dirty=!1})),this._hovering.size&&this._lastPointerMoveEvent){const e=this._lastPointerMoveEvent.native;i(this._lastPointerMoveEvent.events,(t=>{this._dispatchGlobalMousemove(t,e)}))}}paintId(e){const t=Ze(++this._colorId),i=D.fromHex(t).toCSS();return this._colorMap[i]=e,i}_removeObject(e){void 0!==e._colorId&&delete this._colorMap[e._colorId]}_adjustBoundingBox(e){const t=this._ghostLayer.margin;return new DOMRect(e.left-t.left,e.top-t.top,e.width+t.left+t.right,e.height+t.top+t.bottom)}getEvent(e,t=!0){const i=this.view.getBoundingClientRect(),s={x:e.clientX||0,y:e.clientY||0},r={x:s.x-(t?i.left:0),y:s.y-(t?i.top:0)};return new Tt(e,s,r,this._adjustBoundingBox(i))}_getHitTarget(e,t,i){if(0===t.width||0===t.height||e.x<t.left||e.x>t.right||e.y<t.top||e.y>t.bottom)return;if(!this._layerDom.contains(i.target))return;const s=this._ghostLayer.getImageData(e,t);if(0===s.data[0]&&0===s.data[1]&&0===s.data[2])return!1;const r=D.fromRGB(s.data[0],s.data[1],s.data[2]).toCSS();return this._colorMap[r]}_withEvents(e,t){const i=this._events[e];if(void 0!==i){i.dispatching=!0;try{t(i)}finally{i.dispatching=!1,i.cleanup&&(i.cleanup=!1,s(i.callbacks,(e=>!e.disposed)),0===i.callbacks.length&&(i.disposer.dispose(),delete this._events[e]))}}}_dispatchEventAll(e,t){this.interactionsEnabled&&this._withEvents(e,(e=>{i(e.callbacks,(e=>{e.disposed||e.callback.call(e.context,t)}))}))}_dispatchEvent(e,t,s){if(!this.interactionsEnabled)return!1;let r=!1;return this._withEvents(e,(e=>{i(e.callbacks,(e=>{e.disposed||e.object!==t||(e.callback.call(e.context,s),r=!0)}))})),r}_dispatchMousedown(e){const t=e.button;if(0!=t&&2!=t&&1!=t&&void 0!==t)return;const i=this.getEvent(e),s=this._getHitTarget(i.originalPoint,i.bbox,e);if(s){const e=i.id;let t=!1;Je(s,(s=>{const r={id:e,value:s};if(this._mousedown.push(r),!t&&this._dispatchEvent("pointerdown",s,i)){t=!0;this._dragging.some((t=>t.value===s&&t.id===e))||this._dragging.push(r)}return!0}))}}_dispatchGlobalMousemove(e,t){const i=this.getEvent(e),s=this._getHitTarget(i.originalPoint,i.bbox,e);i.native=t,s?(this._hovering.forEach((e=>{e.contains(s)||(this._hovering.delete(e),e.cursorOverStyle&&A(document.body,"cursor",e._replacedCursorStyle),this._dispatchEvent("pointerout",e,i))})),i.native&&Je(s,(e=>(this._hovering.has(e)||(this._hovering.add(e),e.cursorOverStyle&&(e._replacedCursorStyle=X(document.body,"cursor"),A(document.body,"cursor",e.cursorOverStyle)),this._dispatchEvent("pointerover",e,i)),!0)))):(this._hovering.forEach((e=>{e.cursorOverStyle&&A(document.body,"cursor",e._replacedCursorStyle),this._dispatchEvent("pointerout",e,i)})),this._hovering.clear()),this._dispatchEventAll("globalpointermove",i)}_dispatchGlobalMouseup(e,t){const i=this.getEvent(e);i.native=t,this._dispatchEventAll("globalpointerup",i)}_dispatchDragMove(e){if(0!==this._dragging.length){const t=this.getEvent(e),i=t.id;this._dragging.forEach((e=>{e.id===i&&this._dispatchEvent("pointermove",e.value,t)}))}}_dispatchDragEnd(e){const t=e.button;let i;if(0==t||void 0===t)i="click";else if(2==t)i="rightclick";else{if(1!=t)return;i="middleclick"}const s=this.getEvent(e),r=s.id;if(0!==this._mousedown.length){const t=this._getHitTarget(s.originalPoint,s.bbox,e);t&&this._mousedown.forEach((e=>{e.id===r&&e.value.contains(t)&&this._dispatchEvent(i,e.value,s)})),this._mousedown.length=0}0!==this._dragging.length&&(this._dragging.forEach((e=>{e.id===r&&this._dispatchEvent("pointerup",e.value,s)})),this._dragging.length=0)}_dispatchDoubleClick(e){const t=this.getEvent(e),i=this._getHitTarget(t.originalPoint,t.bbox,e);i&&Je(i,(e=>!this._dispatchEvent("dblclick",e,t)))}_dispatchWheel(e){const t=this.getEvent(e),i=this._getHitTarget(t.originalPoint,t.bbox,e);i&&Je(i,(e=>!this._dispatchEvent("wheel",e,t)))}_makeSharedEvent(e,t){if(void 0===this._listeners[e]){const i=t();this._listeners[e]=new L((()=>{delete this._listeners[e],i.dispose()}))}return this._listeners[e].increment()}_onPointerEvent(e,t){let i=!1,s=null;function r(){s=null,i=!1}return new z([new E((()=>{null!==s&&clearTimeout(s),r()})),C(this.view,F(e),(e=>{i=!0,null!==s&&clearTimeout(s),s=window.setTimeout(r,0)})),$e(window,e,(e=>{null!==s&&(clearTimeout(s),s=null),t(e,i),i=!1}))])}_initEvent(e){switch(e){case"globalpointermove":case"pointerover":case"pointerout":return this._makeSharedEvent("pointermove",(()=>{const e=(e,t)=>{this._lastPointerMoveEvent={events:e,native:t},i(e,(e=>{this._dispatchGlobalMousemove(e,t)}))};return new z([this._onPointerEvent("pointerdown",e),this._onPointerEvent("pointermove",e)])}));case"globalpointerup":return this._makeSharedEvent("pointerup",(()=>{var e=this._onPointerEvent("pointerup",((e,t)=>{i(e,(e=>{this._dispatchGlobalMouseup(e,t)})),this._lastPointerMoveEvent={events:e,native:t}})),t=this._onPointerEvent("pointercancel",((e,t)=>{i(e,(e=>{this._dispatchGlobalMouseup(e,t)})),this._lastPointerMoveEvent={events:e,native:t}}));return new E((()=>{e.dispose(),t.dispose()}))}));case"click":case"rightclick":case"middleclick":case"pointerdown":case"pointermove":case"pointerup":return this._makeSharedEvent("pointerdown",(()=>{const e=this._onPointerEvent("pointerdown",(e=>{i(e,(e=>{this._dispatchMousedown(e)}))})),t=this._onPointerEvent("pointermove",(e=>{i(e,(e=>{this._dispatchDragMove(e)}))})),s=this._onPointerEvent("pointerup",(e=>{i(e,(e=>{this._dispatchDragEnd(e)}))})),r=this._onPointerEvent("pointercancel",(e=>{i(e,(e=>{this._dispatchDragEnd(e)}))}));return new E((()=>{e.dispose(),t.dispose(),s.dispose(),r.dispose()}))}));case"dblclick":return this._makeSharedEvent("dblclick",(()=>this._onPointerEvent("dblclick",(e=>{i(e,(e=>{this._dispatchDoubleClick(e)}))}))));case"wheel":return this._makeSharedEvent("wheel",(()=>C(window,F("wheel"),(e=>{this._dispatchWheel(e)}),{passive:!1})))}}_addEvent(e,t,i,s){let r=this._events[t];void 0===r&&(r=this._events[t]={disposer:this._initEvent(t),callbacks:[],dispatching:!1,cleanup:!1});const a={object:e,context:s,callback:i,disposed:!1};return r.callbacks.push(a),new E((()=>{a.disposed=!0,r.dispatching?r.cleanup=!0:(H(r.callbacks,a),0===r.callbacks.length&&(r.disposer.dispose(),delete this._events[t]))}))}getCanvas(e,t){this.render(e),t||(t={});let s=this.resolution,r=Math.floor(this._canvasWidth*this.resolution),a=Math.floor(this._canvasHeight*this.resolution);if(t.minWidth&&t.minWidth>r){let e=t.minWidth/r;e>s&&(s=e*this.resolution)}if(t.minHeight&&t.minHeight>a){let e=t.minHeight/a;e>s&&(s=e*this.resolution)}if(t.maxWidth&&t.maxWidth<r){let e=t.maxWidth/r;e<s&&(s=e*this.resolution)}if(t.maxHeight&&t.maxHeight>a){let e=t.maxHeight/a;e<s&&(s=e*this.resolution)}t.maintainPixelRatio&&(s/=this.resolution);const n=[];let o=!1;const l=document.createElement("canvas");s!=this.resolution&&(o=!0,r=r*s/this.resolution,a=a*s/this.resolution),l.width=r,l.height=a,l.style.position="fixed",l.style.top="-10000px",this.view.appendChild(l),n.push(l);const h=l.getContext("2d");let u=0,c=0,d=!1;return i(this.layers,(e=>{if(e&&e.visible&&(e.tainted||o)){d=!0,e.exportableView=e.view,e.exportableContext=e.context,e.view=document.createElement("canvas"),e.view.style.position="fixed",e.view.style.top="-10000px",this.view.appendChild(e.view),n.push(e.view);let t=0,i=0;e.margin&&(t+=e.margin.left||0+e.margin.right||0,i+=e.margin.top||0+e.margin.bottom||0),e.view.width=r+t,e.view.height=a+i,e.context=e.view.getContext("2d"),e.dirty=!0,e.scale=s}})),d&&(this._omitTainted=!0,this.render(e),this._omitTainted=!1),i(this.layers,(e=>{if(e&&e.visible){let t=0,i=0;e.margin&&(t=-(e.margin.left||0)*this.resolution,i=-(e.margin.top||0)*this.resolution),h.drawImage(e.view,t,i),e.exportableView&&(e.view=e.exportableView,e.exportableView=void 0),e.exportableContext&&(e.context=e.exportableContext,e.exportableContext=void 0),u<e.view.clientWidth&&(u=e.view.clientWidth),c<e.view.clientHeight&&(c=e.view.clientHeight),e.scale=void 0}})),l.style.width=u+"px",l.style.height=c+"px",i(n,(e=>{e.style.position="",e.style.top="",this.view.removeChild(e)})),l}}class Bt{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,"_width",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_height",{enumerable:!0,configurable:!0,writable:!0,value: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(e,t,i,s,r){e+=this.margin.left+this.margin.right,t+=this.margin.top+this.margin.bottom,i+=this.margin.left+this.margin.right,s+=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(e*r),this._height=Math.floor(t*r),this.view.width=this._width,this.view.style.width=i+"px",this.view.height=this._height,this.view.style.height=s+"px"}getImageData(e,t){return this.context.getImageData(Math.round((e.x-t.left)/t.width*this._width),Math.round((e.y-t.top)/t.height*this._height),1,1)}setMargin(e){this.margin.left=0,this.margin.right=0,this.margin.top=0,this.margin.bottom=0,i(e,(e=>{e.margin&&(this.margin.left=Math.max(this.margin.left,e.margin.left),this.margin.right=Math.max(this.margin.right,e.margin.right),this.margin.top=Math.max(this.margin.top,e.margin.top),this.margin.bottom=Math.max(this.margin.bottom,e.margin.bottom))}))}clear(){this.context.save(),this.context.fillStyle="#000",this.context.fillRect(0,0,this._width,this._height)}}class Dt{constructor(e,t){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=e,this.context=t}resize(e,t,i,s,r){null!=this.width&&(e=this.width,i=this.width),null!=this.height&&(t=this.height,s=this.height),this.margin?(e+=this.margin.left+this.margin.right,t+=this.margin.top+this.margin.bottom,i+=this.margin.left+this.margin.right,s+=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(e*r),this._height=Math.floor(t*r),this.view.width=this._width,this.view.style.width=i+"px",this.view.height=this._height,this.view.style.height=s+"px"}clear(){this.context.save(),this.context.clearRect(0,0,this._width,this._height)}}function At(e,t){null==e?requestAnimationFrame(t):setTimeout((()=>{requestAnimationFrame(t)}),1e3/e)}class Lt{constructor(e,t={},s){if(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,"_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 $}),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:ze.new(this,{})}),Object.defineProperty(this,"locale",{enumerable:!0,configurable:!0,writable:!0,value:Le}),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:Ee.new(this,{})}),Object.defineProperty(this,"dateFormatter",{enumerable:!0,configurable:!0,writable:!0,value:De.new(this,{})}),Object.defineProperty(this,"durationFormatter",{enumerable:!0,configurable:!0,writable:!0,value:Ae.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:Q.new(this,{})}),Object.defineProperty(this,"horizontalLayout",{enumerable:!0,configurable:!0,writable:!0,value:ee.new(this,{})}),Object.defineProperty(this,"gridLayout",{enumerable:!0,configurable:!0,writable:!0,value:te.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:[]}),!s)throw new Error("You cannot use `new Class()`, instead use `Class.new()`");let r,a;if(this._settings=t,0==t.accessible&&(this._a11yD=!0),null==t.useSafeResolution&&(t.useSafeResolution=!0),t.useSafeResolution&&(r=ge()),this._renderer=new Ct(r),a=e instanceof HTMLElement?e:document.getElementById(e),i(ie.rootElements,(e=>{if(e.dom===a)throw new Error("You cannot have multiple Roots on the same DOM node")})),this.interfaceColors=Se.new(this,{}),null===a)throw new Error("Could not find HTML element with id `"+e+"`");this.dom=a;let n=document.createElement("div");n.style.position="relative",n.style.height="100%",a.appendChild(n);const o=t.tooltipContainerBounds;o&&(this._tooltipContainerSettings=o),this._inner=n,this._updateComputedStyles(),ie.rootElements.push(this)}static new(e,t){const i=new Lt(e,t,!0);return i._init(),i}moveDOM(e){let t;if(t=e instanceof HTMLElement?e:document.getElementById(e),t){for(;this.dom.childNodes.length>0;)t.appendChild(this.dom.childNodes[0]);this.dom=t,this._initResizeSensor(),this.resize()}}_handleLogo(){if(this._logo){const e=this.dom.offsetWidth,t=this.dom.offsetHeight;e<=150||t<=60?this._logo.hide():this._logo.show()}}_showBranding(){if(!this._logo){const e=this.tooltipContainer.children.push(se.new(this,{interactive:!0,interactiveChildren:!1,position:"absolute",setStateOnChildren:!0,paddingTop:9,paddingRight:9,paddingBottom:9,paddingLeft:9,scale:.6,y:V(100),centerY:re,tooltipText:"Created using amCharts 5",tooltipX:re,cursorOverStyle:"pointer",background:ae.new(this,{fill:ne(4671320),fillOpacity:0,tooltipY:5})})),t=ve.new(this,{pointerOrientation:"horizontal",paddingTop:4,paddingRight:7,paddingBottom:4,paddingLeft:7});t.label.setAll({fontSize:12}),t.get("background").setAll({fill:this.interfaceColors.get("background"),stroke:this.interfaceColors.get("grid"),strokeOpacity:.3}),e.set("tooltip",t),e.events.on("click",(()=>{window.open("https://www.amcharts.com/","_blank")})),e.states.create("hover",{});e.children.push(oe.new(this,{stroke:ne(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:ne(3976191)});e.children.push(oe.new(this,{stroke:ne(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:ne(4671320)}),this._logo=e,this._handleLogo()}}_getRealSize(){return this.dom.getBoundingClientRect()}_getCalculatedSize(e){return this._settings.calculateSize?this._settings.calculateSize(e):{width:e.width,height:e.height}}_init(){const e=this._renderer,t=this._getRealSize(),i=this._getCalculatedSize(t),s=Math.floor(i.width),r=Math.floor(i.height),a=Math.floor(t.width),n=Math.floor(t.height),o=se.new(this,{visible:!0,width:a,height:n});this._rootContainer=o,this._rootContainer._defaultThemes.push(we.new(this));const l=o.children.push(se.new(this,{visible:!0,width:re,height:re}));this.container=l,e.resize(a,n,s,r),this._inner.appendChild(e.view),this._initResizeSensor();const h=document.createElement("div");if(this._htmlElementContainer=h,h.className="am5-html-container",h.style.position="absolute",h.style.pointerEvents="none",this._tooltipContainerSettings||(h.style.overflow="hidden"),this._inner.appendChild(h),!0!==this._a11yD){const t=document.createElement("div");t.className="am5-reader-container",t.setAttribute("role","alert"),t.style.position="absolute",t.style.width="1px",t.style.height="1px",t.style.overflow="hidden",t.style.clip="rect(1px, 1px, 1px, 1px)",this._readerAlertElement=t,this._inner.appendChild(this._readerAlertElement);const i=document.createElement("div");i.className="am5-focus-container",i.style.position="absolute",i.style.pointerEvents="none",i.style.top="0px",i.style.left="0px",i.style.overflow="hidden",i.style.width=s+"px",i.style.height=r+"px",i.setAttribute("role","application"),q(i,!1),this._focusElementContainer=i,this._inner.appendChild(this._focusElementContainer);const a=document.createElement("div");this._tooltipElementContainer=a,a.className="am5-tooltip-container",this._inner.appendChild(a),T("keyboardevents")&&(this._disposers.push(C(window,"keydown",(e=>{16==e.keyCode?this._isShift=!0:9==e.keyCode&&(this._isShift=e.shiftKey)}))),this._disposers.push(C(window,"keyup",(e=>{16==e.keyCode&&(this._isShift=!1)}))),this._disposers.push(C(i,"keydown",(t=>{const i=this._focusedSprite;if(i){27==t.keyCode&&(le(),this._focusedSprite=void 0);let s=0,r=0;switch(t.keyCode){case 13:t.preventDefault();const a=e.getEvent(new MouseEvent("click"));return void i.events.dispatch("click",{type:"click",originalEvent:a.event,point:a.point,simulated:!0,target:i});case 37:s=-6;break;case 39:s=6;break;case 38:r=-6;break;case 40:r=6;break;default:return}if(0!=s||0!=r){if(t.preventDefault(),!i.isDragging()){this._keyboardDragPoint={x:0,y:0};const t=e.getEvent(new MouseEvent("mousedown",{clientX:0,clientY:0}));i.events.isEnabled("pointerdown")&&i.events.dispatch("pointerdown",{type:"pointerdown",originalEvent:t.event,point:t.point,simulated:!0,target:i})}const a=this._keyboardDragPoint;a.x+=s,a.y+=r;const n=e.getEvent(new MouseEvent("mousemove",{clientX:a.x,clientY:a.y}),!1);i.events.isEnabled("globalpointermove")&&i.events.dispatch("globalpointermove",{type:"globalpointermove",originalEvent:n.event,point:n.point,simulated:!0,target:i})}}}))),this._disposers.push(C(i,"keyup",(t=>{if(this._focusedSprite){const i=this._focusedSprite,s=t.keyCode;switch(s){case 37:case 39:case 38:case 40:if(i.isDragging()){const t=this._keyboardDragPoint,s=e.getEvent(new MouseEvent("mouseup",{clientX:t.x,clientY:t.y}));return i.events.isEnabled("globalpointerup")&&i.events.dispatch("globalpointerup",{type:"globalpointerup",originalEvent:s.event,point:s.point,simulated:!0,target:i}),void(this._keyboardDragPoint=void 0)}if(i.get("focusableGroup")){const e=i.get("focusableGroup"),t=this._tabindexes.filter((t=>t.get("focusableGroup")==e));let r=t.indexOf(i);const a=t.length-1;r+=39==s||40==s?1:-1,r<0?r=a:r>a&&(r=0),he(t[r].getPrivate("focusElement").dom)}}}}))))}this._startTicker(),this.setThemes([]),this._addTooltip(),this._hasLicense()||this._showBranding()}_initResizeSensor(){this._resizeSensorDisposer&&this._resizeSensorDisposer.dispose(),this._resizeSensorDisposer=new je(this.dom,(()=>{this.autoResize&&this.resize()})),this._disposers.push(this._resizeSensorDisposer)}resize(){const e=this._getRealSize(),t=this._getCalculatedSize(e),i=Math.floor(t.width),s=Math.floor(t.height);if(i>0&&s>0){const t=Math.floor(e.width),r=Math.floor(e.height),a=this._htmlElementContainer;if(a.style.width=i+"px",a.style.height=s+"px",!0!==this._a11yD){const e=this._focusElementContainer;e.style.width=i+"px",e.style.height=s+"px"}this._renderer.resize(t,r,i,s);const n=this._rootContainer;n.setPrivate("width",t),n.setPrivate("height",r),this._render(),this._handleLogo()}}_render(){this._renderer.render(this._rootContainer._display),this._focusElementDirty&&(this._updateCurrentFocus(),this._focusElementDirty=!1)}_runTickers(e){i(this._tickers,(t=>{t(e)}))}_runAnimations(e){s(this._animations,(t=>t._runAnimation(e)))}_runDirties(){let e={};for(;this._isDirtyParents;)this._isDirtyParents=!1,ue(this._dirtyParents).forEach((t=>{const i=this._dirtyParents[t];delete this._dirtyParents[t],i.isDisposed()||(e[i.uid]=i,i._prepareChildren())}));ue(e).forEach((t=>{e[t]._updateChildren()}));const t=[];ue(this._dirty).forEach((e=>{const i=this._dirty[e];i.isDisposed()?delete this._dirty[i.uid]:(t.push(i),i._beforeChanged())})),t.forEach((e=>{e._changed(),delete this._dirty[e.uid],e._clearDirty()})),this._isDirty=!1;const i={},s=[];ue(this._dirtyBounds).forEach((e=>{const t=this._dirtyBounds[e];delete this._dirtyBounds[e],t.isDisposed()||(i[t.uid]=t.depth(),s.push(t))})),this._positionHTMLElements(),s.sort(((e,t)=>ce(i[t.uid],i[e.uid]))),s.forEach((e=>{e._updateBounds()}));const r=this._dirtyPositions;ue(r).forEach((e=>{const t=r[e];delete r[e],t.isDisposed()||t._updatePosition()})),t.forEach((e=>{e._afterChanged()}))}_renderFrame(e){return!this._updateTick||(this.events.isEnabled("framestarted")&&this.events.dispatch("framestarted",{type:"framestarted",target:this,timestamp:e}),this._checkComputedStyles(),this._runTickers(e),this._runAnimations(e),this._runDirties(),this._render(),this._positionHTMLElements(),this.events.isEnabled("frameended")&&this.events.dispatch("frameended",{type:"frameended",target:this,timestamp:e}),0===this._tickers.length&&0===this._animations.length&&!this._isDirty)}_runTicker(e,t){if(!this.isDisposed()){this.animationTime=e;this._renderFrame(e)?(this._ticker=null,this.animationTime=null):this._paused||(t?this._ticker:At(this.fps,this._ticker))}}_runTickerNow(){if(!this.isDisposed())for(;;){const e=performance.now();this.animationTime=e;if(this._renderFrame(e)){this.animationTime=null;break}}}_startTicker(){null===this._ticker&&(this.animationTime=null,this._ticker=e=>{this._runTicker(e)},At(this.fps,this._ticker))}get updateTick(){return this._updateTick}set updateTick(e){this._updateTick=e,e&&this._startTicker()}_addDirtyEntity(e){void 0===this._dirty[e.uid]&&(this._isDirty=!0,this._dirty[e.uid]=e,this._startTicker())}_addDirtyParent(e){void 0===this._dirtyParents[e.uid]&&(this._isDirty=!0,this._isDirtyParents=!0,this._dirtyParents[e.uid]=e,this._startTicker())}_addDirtyBounds(e){void 0===this._dirtyBounds[e.uid]&&(this._isDirty=!0,this._dirtyBounds[e.uid]=e,this._startTicker())}_addDirtyPosition(e){void 0===this._dirtyPositions[e.uid]&&(this._isDirty=!0,this._dirtyPositions[e.uid]=e,this._startTicker())}_addAnimation(e){-1===this._animations.indexOf(e)&&(this._animations.push(e),this._startTicker())}_markDirty(){this._isDirty=!0}_markDirtyRedraw(){this.events.once("frameended",(()=>{this._isDirty=!0,this._startTicker()}))}eachFrame(e){return this._tickers.push(e),this._startTicker(),new E((()=>{H(this._tickers,e)}))}markDirtyGlobal(e){e||(e=this.container),e.walkChildren((e=>{e instanceof se&&this.markDirtyGlobal(e),e.markDirty(),e.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(),i(this._disposers,(e=>{e.dispose()})),this._inner&&de(this._inner),be(ie.rootElements,this))}isDisposed(){return this._isDisposed}readerAlert(e){!0!==this._a11yD&&(this._readerAlertElement.innerHTML=fe(e))}setThemes(e){this._rootContainer.set("themes",e);const t=this.tooltipContainer;t&&t._applyThemes();const i=this.interfaceColors;i&&i._applyThemes()}_addTooltip(){if(!this.tooltipContainer){const e=this._tooltipContainerSettings,t=this._rootContainer.children.push(se.new(this,{position:"absolute",isMeasured:!1,width:re,height:re,layer:e?35:30,layerMargin:e||void 0}));this.tooltipContainer=t;const i=ve.new(this,{});this.container.set("tooltip",i),i.hide(0),this._tooltip=i}}_registerTabindexOrder(e){1!=this._a11yD&&(e.get("focusable")?I(this._tabindexes,e):be(this._tabindexes,e),this._invalidateTabindexes())}_unregisterTabindexOrder(e){1!=this._a11yD&&(be(this._tabindexes,e),this._invalidateTabindexes())}_invalidateTabindexes(){if(1==this._a11yD)return;this._tabindexes.sort(((e,t)=>{const i=e.get("tabindexOrder",0),s=t.get("tabindexOrder",0);return i==s?0:i>s?1:-1}));const e=[];i(this._tabindexes,((t,i)=>{t.getPrivate("focusElement")?this._moveFocusElement(i,t):this._makeFocusElement(i,t);const s=t.get("focusableGroup");s&&(-1!==e.indexOf(s)?t.getPrivate("focusElement").dom.setAttribute("tabindex","-1"):e.push(s))}))}_updateCurrentFocus(){1!=this._a11yD&&this._focusedSprite&&(this._decorateFocusElement(this._focusedSprite),this._positionFocusElement(this._focusedSprite))}_decorateFocusElement(e,t){if(1==this._a11yD)return;if(t||(t=e.getPrivate("focusElement").dom),!t)return;e.get("visible")&&"tooltip"!=e.get("role")&&!e.isHidden()?"-1"!=t.getAttribute("tabindex")&&t.setAttribute("tabindex",""+this.tabindex):t.removeAttribute("tabindex");const i=e.get("role");i?t.setAttribute("role",i):t.removeAttribute("role");const s=e.get("ariaLabel");if(s){const i=pe(e,s);t.setAttribute("aria-label",i)}else t.removeAttribute("aria-label");const r=e.get("ariaLive");r?t.setAttribute("aria-live",r):t.removeAttribute("aria-live");const a=e.get("ariaChecked");null!=a?t.setAttribute("aria-checked",a?"true":"false"):t.removeAttribute("aria-checked"),e.get("ariaHidden")?t.setAttribute("aria-hidden","hidden"):t.removeAttribute("aria-hidden");const n=e.get("ariaOrientation");n?t.setAttribute("aria-orientation",n):t.removeAttribute("aria-orientation");const o=e.get("ariaValueNow");o?t.setAttribute("aria-valuenow",o):t.removeAttribute("aria-valuenow");const l=e.get("ariaValueMin");l?t.setAttribute("aria-valuemin",l):t.removeAttribute("aria-valuemin");const h=e.get("ariaValueMax");h?t.setAttribute("aria-valuemax",h):t.removeAttribute("aria-valuemax");const u=e.get("ariaValueText");u?t.setAttribute("aria-valuetext",u):t.removeAttribute("aria-valuetext");const c=e.get("ariaControls");c?t.setAttribute("aria-controls",c):t.removeAttribute("aria-controls")}_makeFocusElement(e,t){if(t.getPrivate("focusElement")||1==this._a11yD)return;const i=document.createElement("div");"tooltip"!=t.get("role")&&(i.tabIndex=this.tabindex),i.style.position="absolute",q(i,!1);const s=[];t.setPrivate("focusElement",{dom:i,disposers:s}),this._decorateFocusElement(t),s.push(C(i,"focus",(t=>{this._handleFocus(t,e)}))),s.push(C(i,"blur",(t=>{this._handleBlur(t,e)}))),this._moveFocusElement(e,t)}_removeFocusElement(e){if(1==this._a11yD)return;be(this._tabindexes,e);const t=e.getPrivate("focusElement");if(t){this._focusElementContainer.removeChild(t.dom),i(t.disposers,(e=>{e.dispose()}))}}_hideFocusElement(e){if(1==this._a11yD)return;e.getPrivate("focusElement").dom.style.display="none"}_moveFocusElement(e,t){if(1==this._a11yD)return;const i=this._focusElementContainer,s=t.getPrivate("focusElement").dom;if(s===this._focusElementContainer.children[e])return;const r=this._focusElementContainer.children[e+1];r?i.insertBefore(s,r):i.append(s)}_positionFocusElement(e){if(1==this._a11yD)return;const t=e.globalBounds();let i=t.right==t.left?e.width():t.right-t.left,s=t.top==t.bottom?e.height():t.bottom-t.top,r=t.left-2,a=t.top-2;i<0&&(r+=i,i=Math.abs(i)),s<0&&(a+=s,s=Math.abs(s));const n=e.getPrivate("focusElement").dom;n.style.top=a+"px",n.style.left=r+"px",n.style.width=i+4+"px",n.style.height=s+4+"px"}_handleFocus(e,t){if(1==this._a11yD)return;const i=this._tabindexes[t];i.isVisibleDeep()?(this._positionFocusElement(i),this._focusedSprite=i,i.events.isEnabled("focus")&&i.events.dispatch("focus",{type:"focus",originalEvent:e,target:i})):this._focusNext(e.target,this._isShift?-1:1)}_focusNext(e,t){if(1==this._a11yD)return;var i=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=""]','[contentEditable="true"]','[contentEditable="TRUE"]','[tabindex]:not([tabindex^="-"])'].join(",")));let s=i.indexOf(e)+t;s<0?s=i.length-1:s>=i.length&&(s=0),i[s].focus()}_handleBlur(e,t){if(1==this._a11yD)return;const i=this._focusedSprite;i&&i.events.isEnabled("blur")&&i.events.dispatch("blur",{type:"blur",originalEvent:e,target:i}),this._focusedSprite=void 0}updateTooltip(e){if(1==this._a11yD)return;const t=fe(e._getText());let i=e.getPrivate("tooltipElement");"tooltip"==e.get("role")&&""!=t?(i||(i=this._makeTooltipElement(e)),i.innerHTML!=t&&(i.innerHTML=t)):i&&(i.remove(),e.removePrivate("tooltipElement"))}_makeTooltipElement(e){const t=this._tooltipElementContainer,i=document.createElement("div");return i.style.position="absolute",i.style.width="1px",i.style.height="1px",i.style.overflow="hidden",i.style.clip="rect(1px, 1px, 1px, 1px)",q(i,!1),this._decorateFocusElement(e,i),t.append(i),e.setPrivate("tooltipElement",i),i}_removeTooltipElement(e){if(1==this._a11yD)return;const t=e.getPrivate("tooltipElement");if(t){const e=t.parentElement;e&&e.removeChild(t)}}_invalidateAccessibility(e){if(1==this._a11yD)return;this._focusElementDirty=!0;const t=e.getPrivate("focusElement");e.get("focusable")?t&&(this._decorateFocusElement(e),this._positionFocusElement(e)):t&&this._removeFocusElement(e)}focused(e){return this._focusedSprite===e}documentPointToRoot(e){const t=this.dom.getBoundingClientRect();return{x:e.x-t.left,y:e.y-t.top}}rootPointToDocument(e){const t=this.dom.getBoundingClientRect();return{x:e.x+t.left,y:e.y+t.top}}addDisposer(e){return this._disposers.push(e),e}_updateComputedStyles(){const e=window.getComputedStyle(this.dom);let t="";c(e,((e,i)=>{a(e)&&e.match(/^font/)&&(t+=i)}));const i=t!=this._fontHash;return i&&(this._fontHash=t),i}_checkComputedStyles(){this._updateComputedStyles()&&this._invalidateLabelBounds(this.container)}_invalidateLabelBounds(e){e instanceof se?e.children.each((e=>{this._invalidateLabelBounds(e)})):e instanceof me&&e.markDirtyBounds()}_hasLicense(){for(let e=0;e<ie.licenses.length;e++)if(ie.licenses[e].match(/^AM5C.{5,}/i))return!0;return!1}_licenseApplied(){this._logo&&this._logo.set("forceHidden",!0)}get debugGhostView(){return this._renderer.debugGhostView}set debugGhostView(e){this._renderer.debugGhostView=e}set tapToActivate(e){this._renderer.tapToActivate=e}get tapToActivate(){return this._renderer.tapToActivate}set tapToActivateTimeout(e){this._renderer.tapToActivateTimeout=e}get tapToActivateTimeout(){return this._renderer.tapToActivateTimeout}_makeHTMLElement(e){const t=this._htmlElementContainer,i=document.createElement("div");return e.setPrivate("htmlElement",i),i.style.position="absolute",i.style.overflow="auto",i.style.boxSizing="border-box",q(i,e.get("interactive",!1)),e.events.isEnabled("click")&&(q(i,!0),this._disposers.push(C(i,"click",(t=>{const i=this._renderer.getEvent(t);e.events.dispatch("click",{type:"click",originalEvent:i.event,point:i.point,simulated:!1,target:e})})))),this._positionHTMLElement(e),t.append(i),I(this._htmlEnabledContainers,e),i}_positionHTMLElements(){i(this._htmlEnabledContainers,(e=>{this._positionHTMLElement(e)}))}_positionHTMLElement(e){const t=e.getPrivate("htmlElement");if(t){i(["paddingTop","paddingRight","paddingBottom","paddingLeft","minWidth","minHeight","maxWidth","maxHeight"],(i=>{const s=e.get(i);t.style[i]=s?s+"px":""}));const s=e.compositeOpacity();setTimeout((()=>{t.style.opacity=s+""}),10);const r=e.isVisibleDeep();r&&(t.style.display="block");const a=e.globalBounds();t.style.top=a.top+"px",t.style.left=a.left+"px";const n=e.get("width"),o=e.get("height");let l=0,h=0;if(n&&(l=e.width()),o&&(h=e.height()),n&&o)e.removePrivate("minWidth"),e.removePrivate("minHeight");else{t.style.position="fixed",t.style.width="",t.style.height="";const i=t.getBoundingClientRect();t.style.position="absolute",l=i.width,h=i.height,e._adjustedLocalBounds={left:0,right:0,top:0,bottom:0},e.setPrivate("minWidth",l),e.setPrivate("minHeight",h)}l>0&&(t.style.minWidth=l+"px"),h>0&&(t.style.minHeight=h+"px"),r&&0!=s||(t.style.display="none")}}_setHTMLContent(e,t){let i=e.getPrivate("htmlElement");i||(i=this._makeHTMLElement(e)),i.innerHTML!=t&&(i.innerHTML=t)}_removeHTMLContent(e){let t=e.getPrivate("htmlElement");t&&this._htmlElementContainer.removeChild(t),be(this._htmlEnabledContainers,e)}}_e("AM5C241025748");const zt="en-us",Ft=new Map([["ar",()=>import("../../chunks/ar2.js")],["bg-bg",()=>import("../../chunks/bg_BG2.js")],["bs-ba",()=>import("../../chunks/bs_BA2.js")],["ca-es",()=>import("../../chunks/ca_ES2.js")],["cs-cz",()=>import("../../chunks/cs_CZ2.js")],["da-dk",()=>import("../../chunks/da_DK2.js")],["de-de",()=>import("../../chunks/de_DE2.js")],["de-ch",()=>import("../../chunks/de_CH2.js")],["el-gr",()=>import("../../chunks/el_GR2.js")],["en-us",()=>import("../../chunks/en_US2.js")],["en-ca",()=>import("../../chunks/en_CA2.js")],["es-es",()=>import("../../chunks/es_ES2.js")],["et-ee",()=>import("../../chunks/et_EE2.js")],["fi-fi",()=>import("../../chunks/fi_FI2.js")],["fr-fr",()=>import("../../chunks/fr_FR2.js")],["he-il",()=>import("../../chunks/he_IL2.js")],["hr-hr",()=>import("../../chunks/hr_HR2.js")],["hu-hu",()=>import("../../chunks/hu_HU2.js")],["id-id",()=>import("../../chunks/id_ID2.js")],["it-it",()=>import("../../chunks/it_IT2.js")],["ja-jp",()=>import("../../chunks/ja_JP2.js")],["ko-kr",()=>import("../../chunks/ko_KR2.js")],["lt-lt",()=>import("../../chunks/lt_LT2.js")],["lv-lv",()=>import("../../chunks/lv_LV2.js")],["nb-no",()=>import("../../chunks/nb_NO2.js")],["nl-nl",()=>import("../../chunks/nl_NL2.js")],["pl-pl",()=>import("../../chunks/pl_PL2.js")],["pt-br",()=>import("../../chunks/pt_BR2.js")],["pt-pt",()=>import("../../chunks/pt_PT2.js")],["ro-ro",()=>import("../../chunks/ro_RO2.js")],["ru-ru",()=>import("../../chunks/ru_RU2.js")],["sk-sk",()=>import("../../chunks/sk_SK2.js")],["sl-sl",()=>import("../../chunks/sl_SL2.js")],["sr-rs",()=>import("../../chunks/sr_RS2.js")],["sv-se",()=>import("../../chunks/sv_SE2.js")],["th-th",()=>import("../../chunks/th_TH2.js")],["tr-tr",()=>import("../../chunks/tr_TR2.js")],["uk-ua",()=>import("../../chunks/uk_UA2.js")],["vi-vn",()=>import("../../chunks/vi_VN2.js")],["zh-cn",()=>import("../../chunks/zh_Hans2.js")],["zh-hk",()=>import("../../chunks/zh_Hant2.js")],["zh-tw",()=>import("../../chunks/zh_Hant2.js")]]);function Ht(e){const t=e.split("-")[0].toLowerCase();let i=null;for(const s of Ft.keys())if(s.startsWith(t)){i=s;break}return i}function Yt(e){return e?Ft.has(e.toLowerCase())?e.toLowerCase():Ht(e)||zt:zt}async function It(e,t=xe()){const i=Lt.new(e);return i.locale=(await Ft.get(Yt(t))()).default,i}function Rt(t="default"){const i=e.find((e=>e.name===t));return i?i.colors.map((e=>ne(e))):null}class Ut extends ye{setupDefaultRules(){const e=Rt();e&&this.rule("ColorSet").set("colors",e)}}export{Ut as EsriThemeAm5,It as createRoot};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[908],{84552:(e,t,r)=>{r.d(t,{Z:()=>y});var i=r(43697),s=r(2368),n=r(96674),o=r(35463),a=r(5600),l=(r(75215),r(67676),r(80442),r(36030)),u=r(52011),p=r(78981);let d=class extends((0,s.J)(n.wq)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.rJ)(this.value,this.unit,"milliseconds")}};(0,i._)([(0,l.J)(p.v,{nonNullable:!0})],d.prototype,"unit",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{write:!0},nonNullable:!0})],d.prototype,"value",void 0),d=(0,i._)([(0,u.j)("esri.TimeInterval")],d);const y=d},3920:(e,t,r)=>{r.d(t,{p:()=>u,r:()=>p});var i=r(43697),s=r(15923),n=r(61247),o=r(5600),a=r(52011),l=r(72762);const u=e=>{let t=class extends e{constructor(){super(...arguments),this._handles=new n.Z,this._updatingHandles=new l.t}destroy(){this.destroyed||(this._handles.destroy(),this._updatingHandles.destroy())}get handles(){return this._handles}get updatingHandles(){return this._updatingHandles}};return(0,i._)([(0,o.Cb)({readOnly:!0})],t.prototype,"handles",null),(0,i._)([(0,o.Cb)({readOnly:!0})],t.prototype,"updatingHandles",null),t=(0,i._)([(0,a.j)("esri.core.HandleOwner")],t),t};let p=class extends(u(s.Z)){};p=(0,i._)([(0,a.j)("esri.core.HandleOwner")],p)},68668:(e,t,r)=>{r.d(t,{G:()=>o,w:()=>a});var i=r(66643),s=r(46791),n=r(83379);async function o(e,t){return await e.load(),a(e,t)}async function a(e,t){const r=[],o=(...e)=>{for(const t of e)null!=t&&(Array.isArray(t)?o(...t):s.Z.isCollection(t)?t.forEach((e=>o(e))):n.Z.isLoadable(t)&&r.push(t))};t(o);let a=null;if(await(0,i.UI)(r,(async e=>{const t=await(0,i.q6)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load());!1!==t.ok||a||(a=t)})),a)throw a.error;return e}},42033:(e,t,r)=>{async function i(e,t){const{WhereClause:i}=await r.e(1534).then(r.bind(r,41534));return i.create(e,t)}function s(e,t){return null!=e?null!=t?`(${e}) AND (${t})`:e:t}r.d(t,{E:()=>i,_:()=>s})},72762:(e,t,r)=>{r.d(t,{t:()=>p});var i=r(43697),s=r(15923),n=r(61247),o=r(17445),a=r(1654),l=r(5600),u=r(52011);let p=class extends s.Z{constructor(){super(...arguments),this.updating=!1,this._handleId=0,this._handles=new n.Z,this._scheduleHandleId=0,this._pendingPromises=new Set}destroy(){this.removeAll(),this._handles.destroy()}add(e,t,r={}){return this._installWatch(e,t,r,o.YP)}addWhen(e,t,r={}){return this._installWatch(e,t,r,o.gx)}addOnCollectionChange(e,t,{initial:r=!1,final:i=!1}={}){const s=++this._handleId;return this._handles.add([(0,o.on)(e,"after-changes",this._createSyncUpdatingCallback(),o.Z_),(0,o.on)(e,"change",t,{onListenerAdd:r?e=>t({added:e.toArray(),removed:[]}):void 0,onListenerRemove:i?e=>t({added:[],removed:e.toArray()}):void 0})],s),{remove:()=>this._handles.remove(s)}}addPromise(e){if(null==e)return e;const t=++this._handleId;this._handles.add({remove:()=>{this._pendingPromises.delete(e)&&(0!==this._pendingPromises.size||this._handles.has(d)||this._set("updating",!1))}},t),this._pendingPromises.add(e),this._set("updating",!0);const r=()=>this._handles.remove(t);return e.then(r,r),e}removeAll(){this._pendingPromises.clear(),this._handles.removeAll(),this._set("updating",!1)}_installWatch(e,t,r={},i){const s=++this._handleId;r.sync||this._installSyncUpdatingWatch(e,s);const n=i(e,t,r);return this._handles.add(n,s),{remove:()=>this._handles.remove(s)}}_installSyncUpdatingWatch(e,t){const r=this._createSyncUpdatingCallback(),i=(0,o.YP)(e,r,{sync:!0,equals:()=>!1});return this._handles.add(i,t),i}_createSyncUpdatingCallback(){return()=>{this._handles.remove(d),++this._scheduleHandleId;const e=this._scheduleHandleId;this._get("updating")||this._set("updating",!0),this._handles.add((0,a.Os)((()=>{e===this._scheduleHandleId&&(this._set("updating",this._pendingPromises.size>0),this._handles.remove(d))})),d)}}};(0,i._)([(0,l.Cb)({readOnly:!0})],p.prototype,"updating",void 0),p=(0,i._)([(0,u.j)("esri.core.support.WatchUpdatingTracking")],p);const d=-42},30359:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Se});var i=r(43697),s=r(46791),n=r(20102),o=r(3920),a=r(68668),l=r(16453),u=r(95330),p=r(17445),d=r(42033),y=r(17452),c=r(5600),h=(r(75215),r(67676),r(80442),r(71715)),m=r(52011),b=r(31263),f=r(87085),g=r(54295),v=r(17287),w=r(71612),_=r(17017),C=r(66361),S=r(53713),F=r(38009),I=r(16859),T=r(34760),x=r(72965),E=r(28294),j=r(66677),O=r(21506),A=r(50957),L=r(53518),R=r(35671),P=r(96674),Z=r(30556),U=r(72729);let D=class extends P.wq{constructor(){super(...arguments),this.code=null,this.defaultValues={},this.domains=null,this.name=null}readDomains(e){if(!e)return null;const t={};for(const r of Object.keys(e))t[r]=(0,U.im)(e[r]);return t}writeDomains(e,t){if(!e)return;const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i._)([(0,c.Cb)({type:Number,json:{write:!0}})],D.prototype,"code",void 0),(0,i._)([(0,c.Cb)({type:Object,json:{write:!0}})],D.prototype,"defaultValues",void 0),(0,i._)([(0,c.Cb)({json:{write:!0}})],D.prototype,"domains",void 0),(0,i._)([(0,h.r)("domains")],D.prototype,"readDomains",null),(0,i._)([(0,Z.c)("domains")],D.prototype,"writeDomains",null),(0,i._)([(0,c.Cb)({type:String,json:{write:!0}})],D.prototype,"name",void 0),D=(0,i._)([(0,m.j)("esri.layers.support.Subtype")],D);const Q=D;var k=r(51773),M=r(16050),q=(r(12501),r(28756),r(92271),r(72529),r(5499)),N=r(84382),G=r(81571),z=(r(91423),r(10699)),H=r(22974),V=r(83379),W=r(92604),B=r(78286),$=r(63213),J=r(55343),K=r(70082),Y=r(54306),X=r(30707),ee=r(14165),te=r(32163),re=r(28412);const ie=["charts","editingEnabled","formTemplate","labelsVisible","labelingInfo","legendEnabled","minScale","maxScale","opacity","popupEnabled","popupTemplate","renderer","subtypeCode","templates","title","visible"],se={key:"type",base:q.Z,errorContext:"renderer",typeMap:{simple:N.Z,"unique-value":G.Z,"class-breaks":M.Z}},ne=(0,L.v)(),oe=(0,$.d)({types:se});let ae=0;function le(e){const t=e.json.write;return"object"==typeof t?t.ignoreOrigin=!0:e.json.write={ignoreOrigin:!0},e}function ue(e){switch(e){case"point":case"multipoint":return re.xA.clone();case"polyline":return re.CJ.clone();case"polygon":case"multipatch":return re.z3.clone();default:return null}}function pe(e,t){return null==e?null:t.subtypes?.find((t=>t.code===e))}function de(e,t){let r=null;switch(t.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":r="point";break;case"esriGeometryPolyline":r="line";break;case"esriGeometryPolygon":case"esriGeometryMultiPatch":r="polygon";break;default:t.type,r=null}const i={},s=pe(e,t);if(null!=s){const{defaultValues:e}=s;for(const t in e)i[t]=e[t]}return i[t.subtypeField]=e,new K.Z({name:"New Feature",drawingTool:r,prototype:{attributes:i}})}const ye="esri.layers.support.SubtypeSublayer";let ce=class extends((0,o.p)((0,l.R)((0,z.IG)(V.Z)))){constructor(e){super(e),this.charts=null,this.editingEnabled=!0,this.fieldOverrides=null,this.fieldsIndex=null,this.formTemplate=null,this.id=`${Date.now().toString(16)}-subtype-sublayer-${ae++}`,this.type="subtype-sublayer",this.labelsVisible=!0,this.labelingInfo=null,this.layerType="ArcGISFeatureLayer",this.legendEnabled=!0,this.listMode="show",this.minScale=0,this.maxScale=0,this.opacity=1,this.popupEnabled=!0,this.popupTemplate=null,this.subtypeCode=null,this.templates=null,this.title=null,this.visible=!0}get capabilities(){return this.parent?.capabilities}get effectiveCapabilities(){return this.parent?.effectiveCapabilities}get effectiveEditingEnabled(){const{parent:e}=this;return e?e.effectiveEditingEnabled&&this.editingEnabled:this.editingEnabled}get elevationInfo(){return this.parent?.elevationInfo}writeFieldOverrides(e,t,r){const{fields:i,parent:s}=this;let n;if(i){n=[];let e=0;i.forEach((({name:t,alias:r,editable:i,visible:o})=>{if(!o)return;const a=s?.fields?.find((e=>e.name===t));if(!a)return;const l={name:t};let u=!1;r!==a.alias&&(l.alias=r,u=!0),i!==a.editable&&(l.editable=i,u=!0),n.push(l),u&&e++})),0===e&&n.length===i.length&&(n=null)}else n=(0,H.d9)(e);n?.length&&(0,B.RB)(r,n,t)}get fields(){const{parent:e,fieldOverrides:t,subtypeCode:r}=this,i=e?.fields;if(!e||!i?.length)return null;const{subtypes:s,subtypeField:n}=e,o=s?.find((e=>e.code===r)),a=o?.defaultValues,l=o?.domains,u=[];for(const e of i){const i=e.clone(),{name:s}=i,o=t?.find((e=>e.name===s));if(i.visible=!t||!!o,o){const{alias:e,editable:t}=o;e&&(i.alias=e),!1===t&&(i.editable=!1)}const p=a?.[s]??null;i.defaultValue=s===n?r:p;const d=l?.[s]??null;i.domain=s===n?null:d?"inherited"===d.type?i.domain:d.clone():null,u.push(i)}return u}get geometryType(){return this.parent?.geometryType}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}get objectIdField(){return this.parent||W.Z.getLogger(ye).error(me("objectIdField")),this.parent?.objectIdField}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){(0,R.YN)(e,this.fieldsIndex),this._override("renderer",e)}get renderer(){if(this._isOverridden("renderer"))return this._get("renderer");const{parent:e}=this;return e&&!e.isTable&&"mesh"!==e.geometryType?function(e){return new N.Z({symbol:ue(e)})}(e.geometryType):null}readRendererFromService(e,t,r){if("Table"===t.type)return null;const i=t.drawingInfo?.renderer,s=oe(i,t,r);let n;const{subtypeCode:o}=this;if(null!=o&&function(e,t){return!(!t||"unique-value"!==e?.type||"string"!=typeof e.field||e.field.toLowerCase()!==t.toLowerCase()||e.field2||e.field3||e.valueExpression)}(s,t.subtypeField)){const e=s.uniqueValueInfos?.find((({value:e})=>(e="number"==typeof e?String(e):e)===String(o)));e&&(n=new N.Z({symbol:e.symbol}))}else"simple"!==s?.type||s.visualVariables?.length||(n=s);return n}readRenderer(e,t,r){const i=t?.layerDefinition?.drawingInfo?.renderer;if(!i)return;const s=i.visualVariables?.some((e=>"rotationInfo"!==e.type));return s?void 0:oe(i,t,r)||void 0}get spatialReference(){return this.parent?.spatialReference}readTemplatesFromService(e,t){return[de(this.subtypeCode,t)]}readTitleFromService(e,t){const r=pe(this.subtypeCode,t);return null!=r?r.name:null}get url(){return this.parent?.url}get userHasUpdateItemPrivileges(){return!!this.parent?.userHasUpdateItemPrivileges}async addAttachment(e,t){const{parent:r}=this;if(!r)throw me("addAttachment");if(e.getAttribute(r.subtypeField)!==this.subtypeCode)throw new n.Z("subtype-sublayer:addAttachment","The feature provided does not belong to this SubtypeSublayer");return r.addAttachment(e,t)}async updateAttachment(e,t,r){const{parent:i}=this;if(!i)throw me("updateAttachment");if(e.getAttribute(i.subtypeField)!==this.subtypeCode)throw new n.Z("subtype-sublayer:updateAttachment","The feature provided does not belong to this SubtypeSublayer");return i.updateAttachment(e,t,r)}async deleteAttachments(e,t){const{parent:r}=this;if(!r)throw me("deleteAttachments");if(e.getAttribute(r.subtypeField)!==this.subtypeCode)throw new n.Z("subtype-sublayer:deleteAttachments","The feature provided does not belong to this SubtypeSublayer");return r.deleteAttachments(e,t)}async applyEdits(e,t){if(!this.parent)throw me("applyEdits");return this.parent.applyEdits(e,t)}createPopupTemplate(e){let t=this;const{parent:r,fields:i,title:s}=this;if(r){const{displayField:e,editFieldsInfo:n,objectIdField:o}=r;t={displayField:e,editFieldsInfo:n,fields:i,objectIdField:o,title:s}}return(0,te.eZ)(t,e)}createQuery(){if(!this.parent)throw me("createQuery");const e=(0,A.rP)(this.parent),t=`${this.parent.subtypeField}=${this.subtypeCode}`;return e.where=(0,d._)(t,this.parent.definitionExpression),e}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e){return this._getLayerDomain(e)}hasUserOverrides(){return ie.some((e=>this.originIdOf(e)===b.s3.USER))}async queryAttachments(e,t){const r=await this.load();if(!r.parent)throw me("queryAttachments");const i=e.clone();return i.where=he(i.where,r.parent.subtypeField,r.subtypeCode),r.parent.queryAttachments(e,t)}async queryFeatures(e,t){const r=await this.load();if(!r.parent)throw me("queryFeatures");const i=ee.Z.from(e)??r.createQuery();return null!=e&&(i.where=he(i.where,r.parent.subtypeField,r.subtypeCode)),r.parent.queryFeatures(i,t)}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}};(0,i._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],ce.prototype,"capabilities",null),(0,i._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],ce.prototype,"effectiveCapabilities",null),(0,i._)([(0,c.Cb)({json:{write:{ignoreOrigin:!0}}})],ce.prototype,"charts",void 0),(0,i._)([(0,c.Cb)({type:Boolean,nonNullable:!0,json:{name:"enableEditing",write:{ignoreOrigin:!0}}})],ce.prototype,"editingEnabled",void 0),(0,i._)([(0,c.Cb)({type:Boolean,readOnly:!0})],ce.prototype,"effectiveEditingEnabled",null),(0,i._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],ce.prototype,"elevationInfo",null),(0,i._)([(0,c.Cb)({readOnly:!0,json:{name:"layerDefinition.fieldOverrides",origins:{service:{read:!1}},write:{ignoreOrigin:!0,allowNull:!0}}})],ce.prototype,"fieldOverrides",void 0),(0,i._)([(0,Z.c)("fieldOverrides")],ce.prototype,"writeFieldOverrides",null),(0,i._)([(0,c.Cb)({...ne.fields,readOnly:!0,json:{read:!1}})],ce.prototype,"fields",null),(0,i._)([(0,c.Cb)(ne.fieldsIndex)],ce.prototype,"fieldsIndex",void 0),(0,i._)([(0,c.Cb)({type:J.Z,json:{name:"formInfo",write:{ignoreOrigin:!0}}})],ce.prototype,"formTemplate",void 0),(0,i._)([(0,c.Cb)({type:String,readOnly:!0,json:{origins:{service:{read:!1}},write:{ignoreOrigin:!0}}})],ce.prototype,"id",void 0),(0,i._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],ce.prototype,"geometryType",null),(0,i._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],ce.prototype,"type",void 0),(0,i._)([(0,c.Cb)(le((0,H.d9)(O.iR)))],ce.prototype,"labelsVisible",void 0),(0,i._)([(0,c.Cb)({type:[Y.Z],json:{name:"layerDefinition.drawingInfo.labelingInfo",origins:{service:{read:!1}},read:{reader:X.r},write:{ignoreOrigin:!0}}})],ce.prototype,"labelingInfo",void 0),(0,i._)([(0,c.Cb)({type:["ArcGISFeatureLayer"],readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0}}})],ce.prototype,"layerType",void 0),(0,i._)([(0,c.Cb)(le((0,H.d9)(O.rn)))],ce.prototype,"legendEnabled",void 0),(0,i._)([(0,c.Cb)({type:["show","hide"]})],ce.prototype,"listMode",void 0),(0,i._)([(0,c.Cb)((()=>{const e=(0,H.d9)(O.rO);return e.json.origins.service.read=!1,le(e)})())],ce.prototype,"minScale",void 0),(0,i._)([(0,c.Cb)((()=>{const e=(0,H.d9)(O.u1);return e.json.origins.service.read=!1,le(e)})())],ce.prototype,"maxScale",void 0),(0,i._)([(0,c.Cb)({readOnly:!0})],ce.prototype,"effectiveScaleRange",null),(0,i._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],ce.prototype,"objectIdField",null),(0,i._)([(0,c.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0,json:{write:{ignoreOrigin:!0}}})],ce.prototype,"opacity",void 0),(0,i._)([(0,c.Cb)()],ce.prototype,"parent",void 0),(0,i._)([(0,c.Cb)(le((0,H.d9)(O.C_)))],ce.prototype,"popupEnabled",void 0),(0,i._)([(0,c.Cb)({type:k.Z,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],ce.prototype,"popupTemplate",void 0),(0,i._)([(0,c.Cb)({readOnly:!0})],ce.prototype,"defaultPopupTemplate",null),(0,i._)([(0,c.Cb)({types:se,json:{write:{target:"layerDefinition.drawingInfo.renderer",ignoreOrigin:!0}}})],ce.prototype,"renderer",null),(0,i._)([(0,h.r)("service","renderer",["drawingInfo.renderer","subtypeField","type"])],ce.prototype,"readRendererFromService",null),(0,i._)([(0,h.r)("renderer",["layerDefinition.drawingInfo.renderer"])],ce.prototype,"readRenderer",null),(0,i._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],ce.prototype,"spatialReference",null),(0,i._)([(0,c.Cb)({type:Number,json:{origins:{service:{read:!1}},write:{ignoreOrigin:!0}}})],ce.prototype,"subtypeCode",void 0),(0,i._)([(0,c.Cb)({type:[K.Z],json:{name:"layerDefinition.templates",write:{ignoreOrigin:!0}}})],ce.prototype,"templates",void 0),(0,i._)([(0,h.r)("service","templates",["geometryType","subtypeField","subtypes","type"])],ce.prototype,"readTemplatesFromService",null),(0,i._)([(0,c.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],ce.prototype,"title",void 0),(0,i._)([(0,h.r)("service","title",["subtypes"])],ce.prototype,"readTitleFromService",null),(0,i._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],ce.prototype,"url",null),(0,i._)([(0,c.Cb)({readOnly:!0})],ce.prototype,"userHasUpdateItemPrivileges",null),(0,i._)([(0,c.Cb)({type:Boolean,nonNullable:!0,json:{name:"visibility",write:{ignoreOrigin:!0}}})],ce.prototype,"visible",void 0),ce=(0,i._)([(0,m.j)(ye)],ce);const he=(e,t,r)=>{const i=new RegExp(`${t}=[0-9]`),s=`${t}=${r}`,n=e??"";return i.test(n)?n.replace(i,s):(0,d._)(s,n)},me=e=>new n.Z(`This sublayer must have a parent SubtypeGroupLayer in order to use ${e}`),be=ce;var fe=r(76259),ge=r(60199);const ve="SubtypeGroupLayer";function we(e,t){return new n.Z("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}const _e=(0,L.v)();let Ce=class extends((0,S.B)((0,C.o1)((0,w.h)((0,E.n)((0,x.M)((0,T.Q)((0,v.Y)((0,F.q)((0,I.I)((0,l.R)((0,_.N)((0,g.V)((0,o.p)(f.Z)))))))))))))){constructor(...e){super(...e),this._sublayersCollectionChanged=!1,this._sublayerLookup=new Map,this.fields=null,this.fieldsIndex=null,this.outFields=null,this.subtypes=null,this.sublayers=new(s.Z.ofType(be)),this.timeInfo=null,this.title="Layer",this.type="subtype-group",this.addHandles((0,p.YP)((()=>this.sublayers),((e,t)=>this._handleSublayersChange(e,t)),p.Z_))}destroy(){this.source?.destroy()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(u.r9).then((async()=>{if(!this.url)throw new n.Z("subtype-grouplayer:missing-url-or-source","SubtypeGroupLayer must be created with either a url or a portal item");if(null==this.layerId)throw new n.Z("subtype-grouplayer:missing-layerid","layerId is required for a SubtypeGroupLayer created with url");return this._initLayerProperties(await this.createGraphicsSource(t))})).then((()=>this._setUserPrivileges(this.serviceItemId,e))).then((()=>(0,A.nU)(this,e)));return this.addResolvingPromise(r),Promise.resolve(this)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}get effectiveEditingEnabled(){return(0,A.sX)(this)}get parsedUrl(){const e=(0,y.mN)(this.url);return null!=e&&null!=this.layerId&&(e.path=(0,y.v_)(e.path,this.layerId.toString())),e}set source(e){this._get("source")!==e&&this._set("source",e)}readTitleFromService(e,{name:t}){return this.url?(0,j.a7)(this.url,t):t}async addAttachment(e,t){return(0,A.JD)(this,e,t,ve)}async updateAttachment(e,t,r){return(0,A.Y5)(this,e,t,r,ve)}async applyEdits(e,t){return(0,A.Jj)(this,e,t)}on(e,t){return super.on(e,t)}async createGraphicsSource(e){const{default:t}=await(0,u.Hl)(Promise.all([r.e(4599),r.e(9771)]).then(r.bind(r,6502)),e);return new t({layer:this}).load({signal:e})}createQuery(){const e=(0,A.rP)(this),t=this.sublayers.map((e=>e.subtypeCode));return e.where=(0,d._)(`${this.subtypeField} IN (${t.join(",")})`,this.definitionExpression),e}async deleteAttachments(e,t){return(0,A.FV)(this,e,t,ve)}async fetchRecomputedExtents(e){return(0,A.Ci)(this,e,ve)}getFieldDomain(e,t){return this._getLayerDomain(e)}getField(e){return this.fieldsIndex.get(e)}findSublayerForFeature(e){const t=this.fieldsIndex.get(this.subtypeField),r=e.attributes[t.name];return this._sublayerLookup.get(r)}loadAll(){return(0,a.G)(this,(e=>{e(this.sublayers)}))}async queryAttachments(e,t){return(0,A.SU)(this,e,t,ve)}async queryFeatures(e,t){const r=await this.load(),i=ee.Z.from(e)??r.createQuery(),s=i.outFields??[];s.includes(this.subtypeField)||(s.push(this.subtypeField),i.outFields=s);const n=await r.source.queryFeatures(i,t);if(n?.features)for(const e of n.features)e.layer=e.sourceLayer=this.findSublayerForFeature(e);return n}async queryObjectIds(e,t){return(0,A.tD)(this,e,t,ve)}async queryFeatureCount(e,t){return(0,A.VG)(this,e,t,ve)}async queryExtent(e,t){return(0,A.KE)(this,e,t,ve)}async queryRelatedFeatures(e,t){return(0,A.kp)(this,e,t,ve)}async queryRelatedFeaturesCount(e,t){return(0,A.C9)(this,e,t,ve)}write(e,t){const{origin:r,layerContainerType:i,messages:s}=t;if(this.isTable){if("web-scene"===r||"web-map"===r&&"tables"!==i)return s?.push(we(this,"using a table source cannot be written to web scenes and web maps")),null}else if(this.loaded&&"web-map"===r&&"tables"===i)return s?.push(we(this,"using a non-table source cannot be written to tables in web maps")),null;return this.sublayers?.length?super.write(e,t):(s?.push(new n.Z("web-document-write:invalid-property",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' has invalid value for 'sublayers' property. 'sublayers' collection should contain at least one sublayer`,{layer:this})),null)}serviceSupportsSpatialReference(e){return!!this.loaded&&(0,ge.D)(this,e)}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}async _initLayerProperties(e){this._set("source",e);const{sourceJSON:t}=e;if(t&&(this.sourceJSON=t,this.read(t,{origin:"service",url:this.parsedUrl})),this.isTable)throw new n.Z("subtype-grouplayer:unsupported-source","SubtypeGroupLayer cannot be created using a layer with table source");if(!this.subtypes?.length)throw new n.Z("subtype-grouplayer:missing-subtypes","SubtypeGroupLayer must be created using a layer with subtypes");this._verifyFields(),(0,R.UF)(this.timeInfo,this.fieldsIndex)}async hasDataChanged(){return(0,A.gG)(this)}_verifyFields(){const e=this.parsedUrl?.path??"undefined";this.objectIdField||console.log("SubtypeGroupLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||-1!==e.search(/\/FeatureServer\//i)||this.fields?.some((e=>"geometry"===e.type))||console.log("SubtypeGroupLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null})),this.handles.remove("sublayers-owner"),this._sublayerLookup.clear()),e&&(e.forEach((e=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)})),this._sublayersCollectionChanged=!1,this.handles.add([e.on("after-add",(({item:e})=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)})),e.on("after-remove",(({item:e})=>{e.parent=null,this._sublayerLookup.delete(e.subtypeCode)})),e.on("after-changes",(()=>{this._sublayersCollectionChanged=!0}))],"sublayers-owner"))}};(0,i._)([(0,c.Cb)({readOnly:!0})],Ce.prototype,"createQueryVersion",null),(0,i._)([(0,c.Cb)({readOnly:!0})],Ce.prototype,"editingEnabled",null),(0,i._)([(0,c.Cb)({readOnly:!0})],Ce.prototype,"effectiveEditingEnabled",null),(0,i._)([(0,c.Cb)({..._e.fields,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],Ce.prototype,"fields",void 0),(0,i._)([(0,c.Cb)(_e.fieldsIndex)],Ce.prototype,"fieldsIndex",void 0),(0,i._)([(0,c.Cb)(O.id)],Ce.prototype,"id",void 0),(0,i._)([(0,c.Cb)({type:["show","hide","hide-children"]})],Ce.prototype,"listMode",void 0),(0,i._)([(0,c.Cb)({value:"SubtypeGroupLayer",type:["SubtypeGroupLayer"]})],Ce.prototype,"operationalLayerType",void 0),(0,i._)([(0,c.Cb)(_e.outFields)],Ce.prototype,"outFields",void 0),(0,i._)([(0,c.Cb)({readOnly:!0})],Ce.prototype,"parsedUrl",null),(0,i._)([(0,c.Cb)()],Ce.prototype,"source",null),(0,i._)([(0,c.Cb)({type:[Q],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Ce.prototype,"subtypes",void 0),(0,i._)([(0,c.Cb)({type:s.Z.ofType(be),json:{origins:{service:{read:{source:"subtypes",reader:(e,t,r)=>{const i=e.map((({code:e})=>{const i=new be({subtypeCode:e});return i.read(t,r),i}));return new(s.Z.ofType(be))(i)}}}},name:"layers",write:{overridePolicy(e,t,r){const i=this.originOf("sublayers"),s=b.s3.PORTAL_ITEM;let n=!0;if((0,b.M9)(i)===s&&(0,b.M9)(r.origin)>s){const t=e.some((e=>e.hasUserOverrides()));n=this._sublayersCollectionChanged||t}return{enabled:n,ignoreOrigin:!0}}}}})],Ce.prototype,"sublayers",void 0),(0,i._)([(0,c.Cb)({type:fe.Z})],Ce.prototype,"timeInfo",void 0),(0,i._)([(0,c.Cb)({json:{origins:{"portal-item":{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0}}}}})],Ce.prototype,"title",void 0),(0,i._)([(0,h.r)("service","title",["name"])],Ce.prototype,"readTitleFromService",null),(0,i._)([(0,c.Cb)({json:{read:!1}})],Ce.prototype,"type",void 0),Ce=(0,i._)([(0,m.j)("esri.layers.SubtypeGroupLayer")],Ce);const Se=Ce},54295:(e,t,r)=>{r.d(t,{V:()=>o});var i=r(43697),s=r(5600),n=(r(75215),r(67676),r(80442),r(52011));const o=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i._)([(0,s.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,n.j)("esri.layers.mixins.APIKeyMixin")],t),t}},17287:(e,t,r)=>{r.d(t,{Y:()=>l});var i=r(43697),s=r(92604),n=r(5600),o=(r(75215),r(67676),r(80442),r(52011)),a=r(66677);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.Qc)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Nm)(e,s.Z.getLogger(this.declaredClass)))}};return(0,i._)([(0,n.Cb)()],t.prototype,"title",null),(0,i._)([(0,n.Cb)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,o.j)("esri.layers.mixins.ArcGISService")],t),t}},28294:(e,t,r)=>{r.d(t,{n:()=>y});var i=r(43697),s=r(92835),n=r(84552),o=r(5600),a=(r(75215),r(67676),r(80442),r(71715)),l=r(52011),u=r(35671),p=r(76259),d=r(78981);const y=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const i=r.timeOffset,s=d.v.fromJSON(r.timeOffsetUnits);return i&&s?new n.Z({value:i,unit:s}):null}set timeInfo(e){(0,u.UF)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i._)([(0,o.Cb)({type:s.Z,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,i._)([(0,o.Cb)({type:n.Z})],t.prototype,"timeOffset",void 0),(0,i._)([(0,a.r)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,i._)([(0,o.Cb)({value:null,type:p.Z,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,i._)([(0,o.Cb)({type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"},origins:{"web-scene":{read:!1,write:!1}}}})],t.prototype,"useViewTime",void 0),t=(0,i._)([(0,l.j)("esri.layers.mixins.TemporalLayer")],t),t}},70082:(e,t,r)=>{r.d(t,{Z:()=>d});var i=r(43697),s=r(2368),n=r(35454),o=r(96674),a=r(5600),l=(r(75215),r(67676),r(80442),r(52011));const u=new n.X({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let p=class extends((0,s.J)(o.wq)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i._)([(0,a.Cb)({json:{write:!0}})],p.prototype,"name",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],p.prototype,"description",void 0),(0,i._)([(0,a.Cb)({json:{read:u.read,write:u.write}})],p.prototype,"drawingTool",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],p.prototype,"prototype",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],p.prototype,"thumbnail",void 0),p=(0,i._)([(0,l.j)("esri.layers.support.FeatureTemplate")],p);const d=p},56765:(e,t,r)=>{r.d(t,{Z:()=>p});var i,s=r(43697),n=r(46791),o=r(96674),a=r(5600),l=(r(75215),r(67676),r(80442),r(52011));let u=i=class extends o.wq{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new n.Z}clone(){return new i({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,s._)([(0,a.Cb)({type:String,json:{write:!0}})],u.prototype,"floorField",void 0),(0,s._)([(0,a.Cb)({json:{read:!1,write:!1}})],u.prototype,"viewAllMode",void 0),(0,s._)([(0,a.Cb)({json:{read:!1,write:!1}})],u.prototype,"viewAllLevelIds",void 0),u=i=(0,s._)([(0,l.j)("esri.layers.support.LayerFloorInfo")],u);const p=u},76259:(e,t,r)=>{r.d(t,{Z:()=>m});var i=r(43697),s=r(92835),n=r(84552),o=r(2368),a=r(96674),l=r(5600),u=(r(75215),r(67676),r(80442),r(71715)),p=r(52011),d=r(30556),y=r(80216);function c(e,t){return n.Z.fromJSON({value:e,unit:t})}let h=class extends((0,o.J)(a.wq)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeReference=null,this.trackIdField=null,this.useTime=!0}readFullTimeExtent(e,t){if(!t.timeExtent||!Array.isArray(t.timeExtent)||2!==t.timeExtent.length)return null;const r=new Date(t.timeExtent[0]),i=new Date(t.timeExtent[1]);return new s.Z({start:r,end:i})}writeFullTimeExtent(e,t){e&&null!=e.start&&null!=e.end?t.timeExtent=[e.start.getTime(),e.end.getTime()]:t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?c(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?c(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,i._)([(0,l.Cb)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],h.prototype,"cumulative",void 0),(0,i._)([(0,l.Cb)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"endField",void 0),(0,i._)([(0,l.Cb)({type:s.Z,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"fullTimeExtent",void 0),(0,i._)([(0,u.r)("fullTimeExtent",["timeExtent"])],h.prototype,"readFullTimeExtent",null),(0,i._)([(0,d.c)("fullTimeExtent")],h.prototype,"writeFullTimeExtent",null),(0,i._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],h.prototype,"hasLiveData",void 0),(0,i._)([(0,l.Cb)({type:n.Z,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"interval",void 0),(0,i._)([(0,u.r)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],h.prototype,"readInterval",null),(0,i._)([(0,d.c)("interval")],h.prototype,"writeInterval",null),(0,i._)([(0,l.Cb)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"startField",void 0),(0,i._)([(0,l.Cb)({type:y.Z,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"timeReference",void 0),(0,i._)([(0,l.Cb)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"trackIdField",void 0),(0,i._)([(0,l.Cb)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],h.prototype,"useTime",void 0),h=(0,i._)([(0,p.j)("esri.layers.support.TimeInfo")],h);const m=h},53518:(e,t,r)=>{r.d(t,{v:()=>a});var i=r(92604),s=r(1231),n=r(99514),o=r(35671);function a(){return{fields:{type:[s.Z],value:null},fieldsIndex:{readOnly:!0,get(){return new n.Z(this.fields||[])}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e||!e.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const r=this.fieldsIndex?.has(t);r||i.Z.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,o.Q0)(this.fieldsIndex,e)}}}}},72064:(e,t,r)=>{r.d(t,{h:()=>d});var i=r(80442),s=r(66677);const n={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"};function o(e,t,r){return!!l(e,t,r)}function a(e,t,r){return l(e,t,r)}function l(e,t,r){return e&&e.hasOwnProperty(t)?e[t]:r}function u(e){const t=e?.supportedSpatialAggregationStatistics?.map((e=>e.toLowerCase()));return{envelope:!!t?.includes("envelopeaggregate"),centroid:!!t?.includes("centroidaggregate"),convexHull:!!t?.includes("convexhullaggregate")}}function p(e,t){const r=e?.supportedOperationsWithCacheHint?.map((e=>e.toLowerCase()));return!!r?.includes(t.toLowerCase())}function d(e,t){return{analytics:y(e),attachment:c(e),data:h(e),metadata:m(e),operations:b(e.capabilities,e,t),query:f(e,t),queryRelated:g(e),queryTopFeatures:v(e),editing:w(e)}}function y(e){return{supportsCacheHint:p(e.advancedQueryCapabilities,"queryAnalytics")}}function c(e){const t=e.attachmentProperties,r={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1,supportsCacheHint:p(e.advancedQueryCapabilities,"queryAttachments"),supportsResize:o(e,"supportsAttachmentsResizing",!1)};return t&&Array.isArray(t)&&t.forEach((e=>{const t=n[e.name];t&&(r[t]=!!e.isEnabled)})),r}function h(e){return{isVersioned:o(e,"isDataVersioned",!1),supportsAttachment:o(e,"hasAttachments",!1),supportsM:o(e,"hasM",!1),supportsZ:o(e,"hasZ",!1)}}function m(e){return{supportsAdvancedFieldProperties:o(e,"supportsFieldDescriptionProperty",!1)}}function b(e,t,r){const i=e?e.toLowerCase().split(",").map((e=>e.trim())):[],n=r?(0,s.Qc)(r):null,a=i.includes(null!=n&&"MapServer"===n.serverType?"data":"query"),l=i.includes("editing")&&!t.datesInUnknownTimezone;let u=l&&i.includes("create"),p=l&&i.includes("delete"),d=l&&i.includes("update");const y=i.includes("changetracking"),c=t.advancedQueryCapabilities;return l&&!(u||p||d)&&(u=p=d=!0),{supportsCalculate:o(t,"supportsCalculate",!1),supportsTruncate:o(t,"supportsTruncate",!1),supportsValidateSql:o(t,"supportsValidateSql",!1),supportsAdd:u,supportsDelete:p,supportsEditing:l,supportsChangeTracking:y,supportsQuery:a,supportsQueryAnalytics:o(c,"supportsQueryAnalytic",!1),supportsQueryAttachments:o(c,"supportsQueryAttachments",!1),supportsQueryTopFeatures:o(c,"supportsTopFeaturesQuery",!1),supportsResizeAttachments:o(t,"supportsAttachmentsResizing",!1),supportsSync:i.includes("sync"),supportsUpdate:d,supportsExceedsLimitStatistics:o(t,"supportsExceedsLimitStatistics",!1)}}function f(e,t){const r=e.advancedQueryCapabilities,n=e.ownershipBasedAccessControlForFeatures,l=e.archivingInfo,d=e.currentVersion,y=t?.includes("MapServer"),c=!y||d>=(0,i.Z)("mapserver-pbf-version-support"),h=(0,s.M8)(t),m=new Set((e.supportedQueryFormats??"").split(",").map((e=>e.toLowerCase().trim())));return{supportsStatistics:o(r,"supportsStatistics",e.supportsStatistics),supportsPercentileStatistics:o(r,"supportsPercentileStatistics",!1),supportsSpatialAggregationStatistics:o(r,"supportsSpatialAggregationStatistics",!1),supportedSpatialAggregationStatistics:u(r),supportsCentroid:o(r,"supportsReturningGeometryCentroid",!1),supportsDistance:o(r,"supportsQueryWithDistance",!1),supportsDistinct:o(r,"supportsDistinct",e.supportsAdvancedQueries),supportsExtent:o(r,"supportsReturningQueryExtent",!1),supportsGeometryProperties:o(r,"supportsReturningGeometryProperties",!1),supportsHavingClause:o(r,"supportsHavingClause",!1),supportsOrderBy:o(r,"supportsOrderBy",e.supportsAdvancedQueries),supportsPagination:o(r,"supportsPagination",!1),supportsQuantization:o(e,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:o(e,"supportsQuantizationEditMode",!1),supportsQueryGeometry:o(e,"supportsReturningQueryGeometry",!1),supportsResultType:o(r,"supportsQueryWithResultType",!1),supportsMaxRecordCountFactor:o(r,"supportsMaxRecordCountFactor",!1),supportsSqlExpression:o(r,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:o(e,"useStandardizedQueries",!1),supportsTopFeaturesQuery:o(r,"supportsTopFeaturesQuery",!1),supportsQueryByOthers:o(n,"allowOthersToQuery",!0),supportsHistoricMoment:o(l,"supportsQueryWithHistoricMoment",!1),supportsFormatPBF:c&&m.has("pbf"),supportsDisjointSpatialRelationship:o(r,"supportsDisjointSpatialRel",!1),supportsCacheHint:o(r,"supportsQueryWithCacheHint",!1)||p(r,"query"),supportsDefaultSpatialReference:o(r,"supportsDefaultSR",!1),supportsCompactGeometry:h,supportsFullTextSearch:o(r,"supportsFullTextSearch",!1),maxRecordCountFactor:a(e,"maxRecordCountFactor",void 0),maxRecordCount:a(e,"maxRecordCount",void 0),standardMaxRecordCount:a(e,"standardMaxRecordCount",void 0),tileMaxRecordCount:a(e,"tileMaxRecordCount",void 0)}}function g(e){const t=e.advancedQueryCapabilities,r=o(t,"supportsAdvancedQueryRelated",!1);return{supportsPagination:o(t,"supportsQueryRelatedPagination",!1),supportsCount:r,supportsOrderBy:r,supportsCacheHint:p(t,"queryRelated")}}function v(e){return{supportsCacheHint:p(e.advancedQueryCapabilities,"queryTopFilter")}}function w(e){const t=e.ownershipBasedAccessControlForFeatures,r=e?e.advancedEditingCapabilities:void 0;return{supportsGeometryUpdate:o(e,"allowGeometryUpdates",!0),supportsGlobalId:o(e,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:o(e,"supportsReturnServiceEditsInSourceSR",!1),supportsRollbackOnFailure:o(e,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:o(e,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:o(e,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:o(t,"allowAnonymousToDelete",!0),supportsDeleteByOthers:o(t,"allowOthersToDelete",!0),supportsUpdateByAnonymous:o(t,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:o(t,"allowOthersToUpdate",!0),supportsAsyncApplyEdits:o(r,"supportsAsyncApplyEdits",!1)}}},78981:(e,t,r)=>{r.d(t,{v:()=>i});const i=(0,r(35454).w)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},51706:(e,t,r)=>{var i,s;function n(e){return e&&"esri.renderers.visualVariables.SizeVariable"===e.declaredClass}function o(e){return null!=e&&!isNaN(e)&&isFinite(e)}function a(e){return e.valueExpression?i.Expression:e.field&&"string"==typeof e.field?i.Field:i.Unknown}function l(e,t){const r=t||a(e),n=e.valueUnit||"unknown";return r===i.Unknown?s.Constant:e.stops?s.Stops:null!=e.minSize&&null!=e.maxSize&&null!=e.minDataValue&&null!=e.maxDataValue?s.ClampedLinear:"unknown"===n?null!=e.minSize&&null!=e.minDataValue?e.minSize&&e.minDataValue?s.Proportional:s.Additive:s.Identity:s.RealWorldSize}r.d(t,{PS:()=>a,QW:()=>l,RY:()=>i,hL:()=>s,iY:()=>n,qh:()=>o}),function(e){e.Unknown="unknown",e.Expression="expression",e.Field="field"}(i||(i={})),function(e){e.Unknown="unknown",e.Stops="stops",e.ClampedLinear="clamped-linear",e.Proportional="proportional",e.Additive="additive",e.Constant="constant",e.Identity="identity",e.RealWorldSize="real-world-size"}(s||(s={}))},56545:(e,t,r)=>{r.d(t,{Z:()=>y});var i,s=r(43697),n=r(96674),o=r(22974),a=r(5600),l=r(75215),u=r(52011),p=r(30556);let d=i=class extends n.wq{constructor(e){super(e),this.attachmentTypes=null,this.attachmentsWhere=null,this.cacheHint=void 0,this.keywords=null,this.globalIds=null,this.name=null,this.num=null,this.objectIds=null,this.returnMetadata=!1,this.size=null,this.start=null,this.where=null}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new i((0,o.d9)({attachmentTypes:this.attachmentTypes,attachmentsWhere:this.attachmentsWhere,cacheHint:this.cacheHint,keywords:this.keywords,where:this.where,globalIds:this.globalIds,name:this.name,num:this.num,objectIds:this.objectIds,returnMetadata:this.returnMetadata,size:this.size,start:this.start}))}};(0,s._)([(0,a.Cb)({type:[String],json:{write:!0}})],d.prototype,"attachmentTypes",void 0),(0,s._)([(0,a.Cb)({type:String,json:{read:{source:"attachmentsDefinitionExpression"},write:{target:"attachmentsDefinitionExpression"}}})],d.prototype,"attachmentsWhere",void 0),(0,s._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],d.prototype,"cacheHint",void 0),(0,s._)([(0,a.Cb)({type:[String],json:{write:!0}})],d.prototype,"keywords",void 0),(0,s._)([(0,a.Cb)({type:[Number],json:{write:!0}})],d.prototype,"globalIds",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],d.prototype,"name",void 0),(0,s._)([(0,a.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],d.prototype,"num",void 0),(0,s._)([(0,a.Cb)({type:[Number],json:{write:!0}})],d.prototype,"objectIds",void 0),(0,s._)([(0,a.Cb)({type:Boolean,json:{default:!1,write:!0}})],d.prototype,"returnMetadata",void 0),(0,s._)([(0,a.Cb)({type:[Number],json:{write:!0}})],d.prototype,"size",void 0),(0,s._)([(0,a.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],d.prototype,"start",void 0),(0,s._)([(0,p.c)("start"),(0,p.c)("num")],d.prototype,"writeStart",null),(0,s._)([(0,a.Cb)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],d.prototype,"where",void 0),d=i=(0,s._)([(0,u.j)("esri.rest.support.AttachmentQuery")],d),d.from=(0,l.se)(d);const y=d},58333:(e,t,r)=>{r.d(t,{ET:()=>n,I4:()=>s,eG:()=>l,lF:()=>o,lj:()=>p,qP:()=>a,wW:()=>u});const i=[252,146,31,255],s={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},n={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},o={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},u={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},p={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
|