@arcgis/map-components 6.0.0-next.41 → 6.0.0-next.43

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.
Files changed (173) hide show
  1. package/dist/cdn/{HOMM5T7F.js → 23FQMZEJ.js} +1 -1
  2. package/dist/cdn/{OT4D3TVG.js → 2KGJ7SZH.js} +1 -1
  3. package/dist/cdn/{GTQOMGD7.js → 2MIHLZFT.js} +1 -1
  4. package/dist/cdn/{NF426VVG.js → 3L2QSX64.js} +1 -1
  5. package/dist/cdn/{IH2T7XRU.js → 3VLSPKTJ.js} +1 -1
  6. package/dist/cdn/3ZRVPLIZ.js +2 -0
  7. package/dist/cdn/{TII37L6V.js → 4FBPT5MA.js} +1 -1
  8. package/dist/cdn/{6WT5CUW4.js → 4IPFHL7W.js} +1 -1
  9. package/dist/cdn/{5XZKVLHC.js → 5ATTOWK4.js} +1 -1
  10. package/dist/cdn/{HUZLTULW.js → 5MRT5VRJ.js} +1 -1
  11. package/dist/cdn/6E4PVTTN.js +2 -0
  12. package/dist/cdn/{JBD7Q5YD.js → 6NCSWYYX.js} +1 -1
  13. package/dist/cdn/{5VK56DPB.js → 6NY67VW5.js} +1 -1
  14. package/dist/cdn/{RX7LVZ5V.js → 6P7V62WJ.js} +1 -1
  15. package/dist/cdn/{2BKWAHTD.js → 6TLX4R5A.js} +1 -1
  16. package/dist/cdn/6YPY3QWH.js +2 -0
  17. package/dist/cdn/72KS3TKM.js +2 -0
  18. package/dist/cdn/{5IWCWL2Q.js → 7FB4DOVH.js} +1 -1
  19. package/dist/cdn/{DYKRS7YX.js → 7GXJ6HJZ.js} +1 -1
  20. package/dist/cdn/7WUY57GO.js +2 -0
  21. package/dist/cdn/{DVLTVCIH.js → 7YSYI32G.js} +1 -1
  22. package/dist/cdn/{AMRGLUBB.js → AKSCONMP.js} +1 -1
  23. package/dist/cdn/{FTRRLFYT.js → B6VGTQ4L.js} +1 -1
  24. package/dist/cdn/BQCOYIEH.js +2 -0
  25. package/dist/cdn/{Y6MM3GUE.js → BVWTI63V.js} +1 -1
  26. package/dist/cdn/{4DRKK3S6.js → CBCAUSDJ.js} +1 -1
  27. package/dist/cdn/{CX23L4OX.js → CPK3PMBE.js} +1 -1
  28. package/dist/cdn/CSVVXWVY.js +2 -0
  29. package/dist/cdn/{Y4GL4RZF.js → CX5AZKYT.js} +1 -1
  30. package/dist/cdn/{2J6WEB6T.js → DEICCDP4.js} +1 -1
  31. package/dist/cdn/DJAFLMKA.js +2 -0
  32. package/dist/cdn/DSINA62N.js +4 -0
  33. package/dist/cdn/{NYIKMTKG.js → E4ZUESKS.js} +1 -1
  34. package/dist/cdn/{UJBFSJDF.js → E5BLQ5FK.js} +1 -1
  35. package/dist/cdn/{KKSTZRNG.js → EDGXY4OL.js} +1 -1
  36. package/dist/cdn/{YEPFWDQQ.js → EL5AFBNE.js} +1 -1
  37. package/dist/cdn/{GEZIZQV6.js → EN5NCDOJ.js} +1 -1
  38. package/dist/cdn/{QNQOBXLM.js → EQA4WO3H.js} +1 -1
  39. package/dist/cdn/{JILA7S66.js → FLSEDKWU.js} +1 -1
  40. package/dist/cdn/{625O4F4L.js → GQVCBPZS.js} +1 -1
  41. package/dist/cdn/{I7XTEFQP.js → GSGFAJCR.js} +1 -1
  42. package/dist/cdn/{BXBPEOE3.js → GSU7GNNP.js} +1 -1
  43. package/dist/cdn/{IZFEOYED.js → H2PXK4AT.js} +1 -1
  44. package/dist/cdn/{RCJ3GROZ.js → HBQAYD5H.js} +1 -1
  45. package/dist/cdn/{D7RGMUI2.js → IAJNBAC5.js} +1 -1
  46. package/dist/cdn/{JPQ5ELDQ.js → INMMQJOE.js} +1 -1
  47. package/dist/cdn/{OMDFAKMT.js → IQYLP2H7.js} +1 -1
  48. package/dist/cdn/{DVH35LZL.js → J2K2LRII.js} +1 -1
  49. package/dist/cdn/JUTSSJJF.js +2 -0
  50. package/dist/cdn/JZYDXRQ6.js +4 -0
  51. package/dist/cdn/{Y6ZJNJZ7.js → KSOO3XZ2.js} +1 -1
  52. package/dist/cdn/{KLSIUZNN.js → MKL4YXDU.js} +1 -1
  53. package/dist/cdn/{EMOYKTQL.js → O2BFE6NY.js} +1 -1
  54. package/dist/cdn/OUFB4LJK.js +2 -0
  55. package/dist/cdn/{GFC6LS4L.js → OYG42YJL.js} +1 -1
  56. package/dist/cdn/{O2RCWKKW.js → PD2BELF2.js} +1 -1
  57. package/dist/cdn/{T2JBUILX.js → PFYEJDRJ.js} +1 -1
  58. package/dist/cdn/{JWCEHGEZ.js → PNMBUGPD.js} +1 -1
  59. package/dist/cdn/QEAEEU72.js +2 -0
  60. package/dist/cdn/{U53HTVZS.js → RUJLTSDR.js} +1 -1
  61. package/dist/cdn/{IH7XQCY4.js → SA7B3XQG.js} +1 -1
  62. package/dist/cdn/{CNUAMIZQ.js → T5RX6NXT.js} +2 -2
  63. package/dist/cdn/T7PDMEAD.js +2 -0
  64. package/dist/cdn/{7PMJ7HCH.js → U5BYZI4G.js} +1 -1
  65. package/dist/cdn/UPXNXNTT.js +2 -0
  66. package/dist/cdn/{MG2HQ3FT.js → UW3FYQWG.js} +1 -1
  67. package/dist/cdn/V34ZYXUI.js +2 -0
  68. package/dist/cdn/{WRB2DEQ6.js → W6ILOTBW.js} +1 -1
  69. package/dist/cdn/{EZFBYRI4.js → WYX6WXW4.js} +1 -1
  70. package/dist/cdn/{JFE63ANJ.js → X27EW2YC.js} +1 -1
  71. package/dist/cdn/{6GFNMSM4.js → XHHVIWXO.js} +1 -1
  72. package/dist/cdn/{7P24CQF4.js → XOWOMVSW.js} +1 -1
  73. package/dist/cdn/{CRJB272X.js → XURPEC42.js} +1 -1
  74. package/dist/cdn/{WVRIR3PK.js → YB6AHPU5.js} +1 -1
  75. package/dist/cdn/{LQYTLVCL.js → YRQXG7GX.js} +1 -1
  76. package/dist/cdn/{LHH3PS5H.js → ZVGWUEUE.js} +1 -1
  77. package/dist/cdn/assets/time-zone-chip/t9n/messages.en.json +1 -1
  78. package/dist/cdn/index.js +1 -1
  79. package/dist/cdn/main.css +1 -1
  80. package/dist/chunks/AnalysisViewModel.js +1 -1
  81. package/dist/chunks/async-utils.js +1 -1
  82. package/dist/chunks/slots.js +1 -1
  83. package/dist/components/arcgis-daylight/customElement.d.ts +43 -50
  84. package/dist/components/arcgis-daylight/customElement.js +231 -225
  85. package/dist/components/arcgis-editor/customElement.d.ts +0 -1
  86. package/dist/components/arcgis-elevation-profile/customElement.d.ts +8 -0
  87. package/dist/components/arcgis-elevation-profile/customElement.js +39 -38
  88. package/dist/components/arcgis-line-of-sight/customElement.d.ts +4 -1
  89. package/dist/components/arcgis-link-chart/customElement.d.ts +0 -1
  90. package/dist/components/arcgis-map/customElement.d.ts +0 -1
  91. package/dist/components/arcgis-scene/customElement.d.ts +0 -1
  92. package/dist/components/arcgis-shadow-cast/customElement.d.ts +36 -24
  93. package/dist/components/arcgis-shadow-cast/customElement.js +105 -128
  94. package/dist/components/arcgis-sketch/customElement.d.ts +0 -1
  95. package/dist/components/arcgis-time-zone-chip/customElement.d.ts +8 -0
  96. package/dist/components/arcgis-time-zone-chip/customElement.js +27 -18
  97. package/dist/components/arcgis-utility-network-trace-locations/customElement.js +34 -34
  98. package/dist/components/types.d.ts +7 -0
  99. package/dist/docs/api.json +1 -1
  100. package/dist/docs/docs.json +1 -1
  101. package/dist/docs/vscode.html-custom-data.json +1 -1
  102. package/dist/docs/web-types.json +1 -1
  103. package/dist/index.d.ts +0 -10
  104. package/dist/loader.js +3 -4
  105. package/dist/types/lumina.d.ts +6 -11
  106. package/dist/types/preact.d.ts +6 -12
  107. package/dist/types/react.d.ts +6 -13
  108. package/dist/types/stencil.d.ts +6 -11
  109. package/package.json +7 -7
  110. package/dist/cdn/27TSPXYV.js +0 -2
  111. package/dist/cdn/2JSC2QUL.js +0 -2
  112. package/dist/cdn/43IGD6V3.js +0 -2
  113. package/dist/cdn/4JR57ZIQ.js +0 -2
  114. package/dist/cdn/6BT6RP22.js +0 -2
  115. package/dist/cdn/6KYZMT4A.js +0 -2
  116. package/dist/cdn/BJUFDQGX.js +0 -2
  117. package/dist/cdn/DFNH6YRR.js +0 -2
  118. package/dist/cdn/GOMR7D5M.js +0 -2
  119. package/dist/cdn/HKKNU4CX.js +0 -2
  120. package/dist/cdn/LZUAJU6O.js +0 -2
  121. package/dist/cdn/PYBUTNHM.js +0 -2
  122. package/dist/cdn/SKV3CQSZ.js +0 -2
  123. package/dist/cdn/TXVB6WRV.js +0 -2
  124. package/dist/cdn/UYDXI4AK.js +0 -4
  125. package/dist/cdn/YAWLVMV6.js +0 -2
  126. package/dist/cdn/YGBYB3BZ.js +0 -2
  127. package/dist/components/arcgis-utility-network-validate-topology/customElement.d.ts +0 -100
  128. package/dist/components/arcgis-utility-network-validate-topology/customElement.js +0 -44
  129. package/dist/components/arcgis-utility-network-validate-topology/index.d.ts +0 -1
  130. package/dist/components/arcgis-utility-network-validate-topology/index.js +0 -1
  131. /package/dist/cdn/{SLQPDAGN.js → 237ZYFAI.js} +0 -0
  132. /package/dist/cdn/{AYQJ2LTV.js → 4LNUUNTS.js} +0 -0
  133. /package/dist/cdn/{OLSESBZ7.js → 4RG2L4NX.js} +0 -0
  134. /package/dist/cdn/{N2YWWQOS.js → 6F6UDFL6.js} +0 -0
  135. /package/dist/cdn/{62HMPABL.js → 6FZQAFDW.js} +0 -0
  136. /package/dist/cdn/{RTDY3HLR.js → 6RNYBJQG.js} +0 -0
  137. /package/dist/cdn/{ZCL4XHIZ.js → 6YT2MRU6.js} +0 -0
  138. /package/dist/cdn/{XQ2WXTW7.js → AAF7U7C7.js} +0 -0
  139. /package/dist/cdn/{IRFIHD5X.js → AZFQTGM4.js} +0 -0
  140. /package/dist/cdn/{XCSF7KJK.js → BVR6RYPL.js} +0 -0
  141. /package/dist/cdn/{DPEWQQEB.js → C3VCBV5R.js} +0 -0
  142. /package/dist/cdn/{ZSKO7HLH.js → COJJ4ST7.js} +0 -0
  143. /package/dist/cdn/{NVN2CATF.js → CSLBASOL.js} +0 -0
  144. /package/dist/cdn/{2P5AJORF.js → DDUJHOQ5.js} +0 -0
  145. /package/dist/cdn/{DLUFAV4S.js → F25B6VFT.js} +0 -0
  146. /package/dist/cdn/{PWZHB6VD.js → FC4U5FYO.js} +0 -0
  147. /package/dist/cdn/{SLNXNVPI.js → H3SNBMDP.js} +0 -0
  148. /package/dist/cdn/{QWMDZDQA.js → HDNFEQXP.js} +0 -0
  149. /package/dist/cdn/{FJMXBIN5.js → HMAEKQ63.js} +0 -0
  150. /package/dist/cdn/{T34W3GKP.js → HRKFC3ZC.js} +0 -0
  151. /package/dist/cdn/{5GTPIPN7.js → ID3JLPN6.js} +0 -0
  152. /package/dist/cdn/{KOMTNQPT.js → IKNNVF57.js} +0 -0
  153. /package/dist/cdn/{OFBWNR54.js → J3U6IFQO.js} +0 -0
  154. /package/dist/cdn/{CHMBPPHS.js → JUG5VVPL.js} +0 -0
  155. /package/dist/cdn/{MEISDI2H.js → KYUDUFNZ.js} +0 -0
  156. /package/dist/cdn/{4LWSF6AI.js → L63YJ5AF.js} +0 -0
  157. /package/dist/cdn/{LVIYMA67.js → LGPNCTTW.js} +0 -0
  158. /package/dist/cdn/{LS4U4GD5.js → LH4SQVC2.js} +0 -0
  159. /package/dist/cdn/{XGWYQ7FU.js → LNUFIKD5.js} +0 -0
  160. /package/dist/cdn/{7YT5W57B.js → NIASADUV.js} +0 -0
  161. /package/dist/cdn/{UDXDE3LW.js → NJ3CJS46.js} +0 -0
  162. /package/dist/cdn/{6SL7YNKF.js → NXC47WWQ.js} +0 -0
  163. /package/dist/cdn/{ZNIMZP5R.js → O527UXXI.js} +0 -0
  164. /package/dist/cdn/{G4IKO2R6.js → OXZOWO5A.js} +0 -0
  165. /package/dist/cdn/{SFDCS6A2.js → PHFJU5KL.js} +0 -0
  166. /package/dist/cdn/{TP2KQRW6.js → QHK5I5OO.js} +0 -0
  167. /package/dist/cdn/{IAYL44LK.js → RB3QNSQJ.js} +0 -0
  168. /package/dist/cdn/{ECA47Z37.js → T4CJDMMZ.js} +0 -0
  169. /package/dist/cdn/{AKTIOEYM.js → TAU22PX7.js} +0 -0
  170. /package/dist/cdn/{ZHYXFOYU.js → VP47DYTR.js} +0 -0
  171. /package/dist/cdn/{NVKOZL7X.js → WMP77MLQ.js} +0 -0
  172. /package/dist/cdn/{5GGAWGSN.js → WMRMVZHH.js} +0 -0
  173. /package/dist/cdn/{GCPR7XFU.js → YEEPGAEP.js} +0 -0
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import{$ as _e,A as Li,B as Ei,C as Oi,K as Hi,S as Ni,U as Fi,W as Ui,X as P,Y as ii,Z as si,_ as Wi,a as q,b as ti,f as Mi,i as ge,m as ei,r as Ii,x as et}from"./AKSCONMP.js";import{a as A,b as fe,d as R,e as C}from"./NJ3CJS46.js";import{A as Ft,B as Si,D as $i,G as at,H as Ut,I as Ai,K as I,O as _t,Q as yt,S as Bi,T as At,U as ri,V as Vi,X as Jt,Y as zi,a as Pi,b as Ge,c as ki,e as Ke,g as D,h as Ye,j as Xe,m as qt,n as Ze,o as qe,p as y,q as gt,r as Ci,s as $t,t as J,v as Je,x as me,y as Qe,z as Ri}from"./NXC47WWQ.js";import{a as je}from"./TAVTDQ6S.js";function Qt(a,t){if(!(a>=0&&a<t))throw new Error("Index out of bounds: "+a)}var ct=class{constructor(t=[]){this.events=new At,this._values=t}get values(){return this._values}contains(t){return this._values.indexOf(t)!==-1}removeValue(t){let e=0,i=this._values.length;for(;e<i;)this._values[e]===t?(this.removeIndex(e),--i):++e}indexOf(t){return qt(this._values,t)}get length(){return this._values.length}hasIndex(t){return t>=0&&t<this._values.length}getIndex(t){return this._values[t]}_onPush(t){this.events.isEnabled("push")&&this.events.dispatch("push",{type:"push",target:this,newValue:t})}_onInsertIndex(t,e){this.events.isEnabled("insertIndex")&&this.events.dispatch("insertIndex",{type:"insertIndex",target:this,index:t,newValue:e})}_onSetIndex(t,e,i){this.events.isEnabled("setIndex")&&this.events.dispatch("setIndex",{type:"setIndex",target:this,index:t,oldValue:e,newValue:i})}_onSwap(t,e){this.events.isEnabled("swap")&&this.events.dispatch("swap",{type:"swap",target:this,a:t,b:e})}_onRemoveIndex(t,e){this.events.isEnabled("removeIndex")&&this.events.dispatch("removeIndex",{type:"removeIndex",target:this,index:t,oldValue:e})}_onMoveIndex(t,e,i){this.events.isEnabled("moveIndex")&&this.events.dispatch("moveIndex",{type:"moveIndex",target:this,oldIndex:t,newIndex:e,value:i})}_onClear(t){this.events.isEnabled("clear")&&this.events.dispatch("clear",{type:"clear",target:this,oldValues:t})}setIndex(t,e){Qt(t,this._values.length);let i=this._values[t];return i!==e&&(this._values[t]=e,this._onSetIndex(t,i,e)),i}insertIndex(t,e){return Qt(t,this._values.length+1),me(this._values,t,e),this._onInsertIndex(t,e),e}swap(t,e){let i=this._values.length;if(Qt(t,i),Qt(e,i),t!==e){let r=this._values[t],s=this._values[e];this._values[t]=s,this._values[e]=r,this._onSwap(r,s)}}removeIndex(t){Qt(t,this._values.length);let e=this._values[t];return Qe(this._values,t),this._onRemoveIndex(t,e),e}moveValue(t,e){let i=this.indexOf(t);if(i!==-1)if(Qe(this._values,i),e==null){let r=this._values.length;this._values.push(t),this._onMoveIndex(i,r,t)}else me(this._values,e,t),this._onMoveIndex(i,e,t);else e==null?(this._values.push(t),this._onPush(t)):(me(this._values,e,t),this._onInsertIndex(e,t));return t}push(t){return this._values.push(t),this._onPush(t),t}unshift(t){return this.insertIndex(0,t),t}pushAll(t){y(t,e=>{this.push(e)})}copyFrom(t){this.pushAll(t._values)}pop(){return this._values.length-1<0?void 0:this.removeIndex(this._values.length-1)}shift(){return this._values.length?this.removeIndex(0):void 0}setAll(t){let e=this._values;this._values=[],this._onClear(e),y(t,i=>{this._values.push(i),this._onPush(i)})}clear(){this.setAll([])}*[Symbol.iterator](){let t=this._values.length;for(let e=0;e<t;++e)yield this._values[e]}each(t){y(this._values,t)}eachReverse(t){gt(this._values,t)}},te=class extends ct{constructor(){super(...arguments),this.autoDispose=!0,this._disposed=!1}swap(t,e){let i=this.autoDispose;this.autoDispose=!1,super.swap(t,e),this.autoDispose=i}_onSetIndex(t,e,i){this.autoDispose&&e.dispose(),super._onSetIndex(t,e,i)}_onRemoveIndex(t,e){this.autoDispose&&e.dispose(),super._onRemoveIndex(t,e)}_onClear(t){this.autoDispose&&y(t,e=>{e.dispose()}),super._onClear(t)}_dispose(){this.autoDispose&&y(this._values,t=>{t.dispose()})}isDisposed(){return this._disposed}dispose(){this._disposed||(this._disposed=!0,this._dispose())}},ji=class extends te{constructor(t,e){super(),this.template=t,this.make=e}_dispose(){super._dispose(),this.autoDispose&&this.template.dispose()}};var vt={};je(vt,{DEGREES:()=>Wt,HALFPI:()=>ai,PI:()=>ve,RADIANS:()=>Bt,boundsOverlap:()=>Fs,ceil:()=>Cs,circlesOverlap:()=>Ws,closest:()=>Ns,cos:()=>Z,fitAngleToRange:()=>Ms,fitToRange:()=>xe,getAngle:()=>Is,getArcBounds:()=>As,getArcPoint:()=>ye,getCubicControlPointA:()=>Rs,getCubicControlPointB:()=>Ss,getPointOnCubicCurve:()=>Es,getPointOnLine:()=>Os,getPointOnQuadraticCurve:()=>Ls,inBounds:()=>ni,mergeBounds:()=>Bs,normalizeAngle:()=>nt,resolveLocationOnPath:()=>Hs,round:()=>ks,sin:()=>X,spiralPoints:()=>Us,tan:()=>$s});var ve=Math.PI,ai=ve/2,Bt=ve/180,Wt=180/ve;function ks(a,t,e){if(!D(t)||t<=0){let i=Math.round(a);return e&&i-a==.5&&i--,i}else{let i=Math.pow(10,t);return Math.round(a*i)/i}}function Cs(a,t){if(!D(t)||t<=0)return Math.ceil(a);{let e=Math.pow(10,t);return Math.ceil(a*e)/e}}function Rs(a,t,e,i,r){return{x:(-a.x+t.x/i+e.x)*i,y:(-a.y+t.y/r+e.y)*r}}function Ss(a,t,e,i,r){return{x:(a.x+t.x/i-e.x)*i,y:(a.y+t.y/r-e.y)*r}}function xe(a,t,e){return Math.min(Math.max(a,t),e)}function X(a){return Math.sin(Bt*a)}function $s(a){return Math.tan(Bt*a)}function Z(a){return Math.cos(Bt*a)}function nt(a){return a=a%360,a<0&&(a+=360),a}function As(a,t,e,i,r){if(!Number.isFinite(e)||!Number.isFinite(i)||Math.abs(i-e)>=360){let u=Number.isFinite(r)?Math.abs(r):0;return{left:a-u,top:t-u,right:a+u,bottom:t+u}}let s=Number.MAX_VALUE,n=Number.MAX_VALUE,o=-Number.MAX_VALUE,l=-Number.MAX_VALUE,h=[];h.push(ye(r,e)),h.push(ye(r,i));let d=Math.min(Math.floor(e/90)*90,Math.floor(i/90)*90),p=Math.max(Math.ceil(e/90)*90,Math.ceil(i/90)*90);for(let u=d;u<=p;u+=90)u>=e&&u<=i&&h.push(ye(r,u));for(let u=0;u<h.length;u++){let c=h[u];c.x<s&&(s=c.x),c.y<n&&(n=c.y),c.x>o&&(o=c.x),c.y>l&&(l=c.y)}return{left:a+s,top:t+n,right:a+o,bottom:t+l}}function ye(a,t){return{x:a*Z(t),y:a*X(t)}}function Bs(a){let t=a.length;if(t>0){let e=a[0],i=e.left,r=e.top,s=e.right,n=e.bottom;if(t>1)for(let o=1;o<t;o++)e=a[o],i=Math.min(e.left,i),s=Math.max(e.right,s),r=Math.min(e.top,r),n=Math.max(e.bottom,n);return{left:i,right:s,top:r,bottom:n}}return{left:0,right:0,top:0,bottom:0}}function Ms(a,t,e){if(t>e){let n=t;t=e,e=n}a=nt(a);let i=(t-nt(t))/360;a<t&&(a+=360*(i+1));let r=t+(e-t)/2+180,s=t+(e-t)/2-180;return a>e&&(a-360>t?a-=360:a<r?a=e:a=t),a<t&&(a>s?a=t:a=e),a}function ni(a,t){return a.x>=t.left&&a.y>=t.top&&a.x<=t.right&&a.y<=t.bottom}function Is(a,t){t||(t={x:a.x*2,y:a.y*2});let e=t.x-a.x,i=t.y-a.y,r=Math.atan2(i,e)*Wt;return r<0&&(r+=360),nt(r)}function Ls(a,t,e,i){let r=(1-i)*(1-i)*a.x+2*(1-i)*i*e.x+i*i*t.x,s=(1-i)*(1-i)*a.y+2*(1-i)*i*e.y+i*i*t.y;return{x:r,y:s}}function Es(a,t,e,i,r){let s=1-r,n=s*s*s*a.x+3*s*s*r*e.x+3*s*r*r*i.x+r*r*r*t.x,o=s*s*s*a.y+3*s*s*r*e.y+3*s*r*r*i.y+r*r*r*t.y;return{x:n,y:o}}function Os(a,t,e){return{x:a.x+(t.x-a.x)*e,y:a.y+(t.y-a.y)*e}}function Hs(a,t){let e=t.length;if(e>0){let i=t[e-1],r=a*i,s=0;for(let h=0;h<e;h++)if(t[h]>=r){s=h;break}let n=s>0?t[s-1]:0,o=t[s]-n,l=o>0?(r-n)/o:0;return{index:s,t:l}}return{index:0,t:0}}function Ns(a,t){return a.reduce(function(e,i){return Math.abs(i-t)<Math.abs(e-t)?i:e})}function Fs(a,t){let e=a.left<t.right&&a.right>t.left,i=a.top<t.bottom&&a.bottom>t.top;return e&&i}function Us(a,t,e,i,r,s,n,o,l){let h=r+.01;o=nt(o),l=nt(l);let d=o*Bt;l<o&&(l+=360);let p=[];for(;h<e+n;){let u=s;u/2>h&&(u=2*h);let c=Math.max(.01,Math.min(1,h/200));u=u*c;let m=d*Wt,g={x:a+h*Math.cos(d),y:t+h*i/e*Math.sin(d)};if(p.push(g),h=r+.01+(m-o)/360*n,d+=2*Math.asin(u/2/h),d*Wt>l+360*Math.ceil((e-r)/n))break}return p.shift(),p}function Ws(a,t){return Math.hypot(a.x-t.x,a.y-t.y)<=a.radius+t.radius}var we={};je(we,{bounce:()=>qi,byName:()=>hi,circle:()=>Xi,cubic:()=>it,easingInfo:()=>Te,elastic:()=>ts,exp:()=>Ki,inOut:()=>Zi,linear:()=>Vt,out:()=>ft,pow:()=>Vs,quad:()=>Gi,sine:()=>Yi,yoyo:()=>li});function De(a,t){return a._easingInfo=t,a}function Te(a){return a?a._easingInfo:void 0}function Vt(a){return a}function Gi(a){return a*a}function it(a){return a*a*a}function Vs(a,t){return Math.pow(a,t)}function Ki(a){return Math.pow(2,10*a-10)}function Yi(a){return 1-Math.cos(a*ai)}function Xi(a){return 1-Math.sqrt(1-a*a)}function li(a){let t=function(i){return i<.5?a(i*2):a((1-i)*2)},e=Te(a);return e&&!e.yoyo?De(t,Object.assign(Object.assign({},e),{yoyo:!0})):t}function ft(a){let t=function(i){return 1-a(1-i)},e=Te(a);return e&&!e.ease&&!e.yoyo?De(t,Object.assign(Object.assign({},e),{ease:"out"})):t}function Zi(a){let t=function(i){return i<=.5?a(i*2)/2:1-a((1-i)*2)/2},e=Te(a);return e&&!e.ease&&!e.yoyo?De(t,Object.assign(Object.assign({},e),{ease:"inOut"})):t}var oi=4/11,zs=6/11,js=8/11,Gs=3/4,Ks=9/11,Ys=10/11,Xs=15/16,Zs=21/22,qs=63/64,be=1/oi/oi;function qi(a){return 1-Js(1-a)}function Js(a){return a=a,a<oi?be*a*a:a<js?be*(a-=zs)*a+Gs:a<Ys?be*(a-=Ks)*a+Xs:be*(a-=Zs)*a+qs}var Qs=2*Math.PI,Ji=1,Qi=.3/Qs,tr=Math.asin(1/Ji)*Qi;function ts(a){let t=a;return Ji*Math.pow(2,10*--t)*Math.sin((tr-t)/Qi)}var es={linear:Vt,quad:Gi,cubic:it,exp:Ki,sine:Yi,circle:Xi,bounce:qi,elastic:ts};I(es,(a,t)=>{De(t,{easing:String(a)})});function hi(a,t){let e=a&&es[a]||Vt;return t==="out"?ft(e):t==="inOut"?Zi(e):e}var di=class{constructor(){this.version="5.22.0",this.licenses=[],this.entitiesById={},this.rootElements=[],this.autoDispose=!1,this.geometryFunctions={}}},Mt=new di;function $r(a){Mt.licenses.push(a)}function Ar(){let a;for(;a=Mt.rootElements.pop();)a.dispose()}function Br(a){let t;return Mt.rootElements.forEach(e=>{e.dom.id==a&&(t=e)}),t}var ui=class{constructor(t,e){this._userSettings={},this._computedSettings={},this._entity=t,this._settings=e,I(e,i=>{this._userSettings[i]=!0})}get(t,e){let i=this._settings[t];return i!==void 0?i:e}setRaw(t,e){this._settings[t]=e}set(t,e){this._userSettings[t]=!0,delete this._computedSettings[t],this.setRaw(t,e)}_setCRaw(t,e){this.setRaw(t,e),this._computedSettings[t]=!0}_setC(t,e){let i=!this._computedSettings[t]&&this._settings[t]===e;this.set(t,e),i||(this._computedSettings[t]=!0)}remove(t){delete this._userSettings[t],delete this._computedSettings[t],delete this._settings[t]}setAll(t){Ut(t).forEach(([e,i])=>{this.set(e,i)})}_eachSetting(t){I(this._settings,t)}apply(){let t={};t.stateAnimationEasing=!0,t.stateAnimationDuration=!0;let e=this._entity.states.lookup("default");this._eachSetting((i,r)=>{t[i]||(t[i]=!0,this!==e&&(i in e._settings||e._setCRaw(i,this._entity.get(i))),this._entity._setC(i,r))})}applyAnimate(t){t==null&&(t=this._settings.stateAnimationDuration),t==null&&(t=this.get("stateAnimationDuration",this._entity.get("stateAnimationDuration",0)));let e=this._settings.stateAnimationEasing;e==null&&(e=this.get("stateAnimationEasing",this._entity.get("stateAnimationEasing",it)));let i=this._entity.states.lookup("default"),r={};r.stateAnimationEasing=!0,r.stateAnimationDuration=!0;let s={};return this._eachSetting((n,o)=>{if(!r[n]){r[n]=!0,this!=i&&(n in i._settings||i._setCRaw(n,this._entity.get(n)));let l=this._entity.animate({key:n,to:o,duration:t,easing:e});l&&(s[n]=l)}}),s}},Pe=class{constructor(t){this._states={},this._entity=t}lookup(t){return this._states[t]}create(t,e){let i=this._states[t];if(i)return i.setAll(e),i;{let r=new ui(this._entity,e);return this._states[t]=r,r}}_createC(t,e){let i=this.create(t,e);return I(e,r=>{i._computedSettings[r]=!0}),i}remove(t){delete this._states[t]}apply(t){let e=this._states[t];e&&e.apply(),this._entity._applyState(t)}applyAnimate(t,e){let i,r=this._states[t];return r&&(i=r.applyAnimate(e)),this._entity._applyStateAnimated(t,e),i}};var pi=class{constructor(t){this._callbacks={},this._disabled={},this._entity=t}_addInternal(t,e){return e._amInternal=!0,this.add(t,e)}_isInternal(t){return t._amInternal===!0}add(t,e){let i=this._callbacks[t];return i===void 0&&(i=this._callbacks[t]=[]),i.push(e),this._entity._markDirtyKey(t),new _t(()=>{J(i,e)&&this._entity._markDirtyKey(t)})}remove(t){let e=this._callbacks[t];e!==void 0&&(delete this._callbacks[t],e.length!==0&&this._entity._markDirtyKey(t))}enable(t){this._disabled[t]&&(delete this._disabled[t],this._entity._markDirtyKey(t))}disable(t){this._disabled[t]||(this._disabled[t]=!0,this._entity._markDirtyKey(t))}fold(t,e){if(!this._disabled[t]){let i=this._callbacks[t];if(i!==void 0)for(let r=0,s=i.length;r<s;++r)e=i[r](e,this._entity,t)}return e}},zt=class{constructor(t,e,i,r,s,n,o){this._time=0,this._stopped=!1,this._playing=!0,this._declared=!1,this.events=new At,this._animation=t,this._from=e,this._to=i,this._duration=r,this._easing=s,this._loops=n,this._interpolate=Wi(e,i),this._oldTime=o}get to(){return this._to}get duration(){return this._duration}get easing(){return this._easing}get loops(){return this._loops}get from(){return this._from}get playing(){return this._playing}get stopped(){return this._stopped}stop(){this._stopped||(this._stopped=!0,this._playing=!1,this.events.isEnabled("stopped")&&this.events.dispatch("stopped",{type:"stopped",target:this}))}pause(){this._playing=!1,this._oldTime=null}play(){!this._stopped&&!this._playing&&(this._playing=!0,this._animation._startAnimation())}get percentage(){return this._time/this._duration}waitForStop(){return new Promise((t,e)=>{if(this._stopped)t();else{let i=()=>{r.dispose(),t()},r=this.events.on("stopped",i)}})}_checkEnded(){return this._loops>1?(--this._loops,!1):!0}_run(t){this._oldTime!==null&&(this._time+=t-this._oldTime,this._time>this._duration&&(this._time=this._duration)),this._oldTime=t}_reset(t){this._oldTime=t,this._time=0}_value(t){if(t<=0)return this._from;let e=this._easing(t);return e>=.999999?this._to:e<=1e-6?this._from:this._interpolate(e,this._from,this._to)}},er=0;var ie=0,se=class{constructor(t){this.uid=++er,this._privateSettings={},this._settingEvents={},this._privateSettingEvents={},this._debouncedSettingEvents={},this._debouncedPrivateSettingEvents={},this._prevSettings={},this._prevPrivateSettings={},this._animatingSettings={},this._animatingPrivateSettings={},this._disposed=!1,this._userProperties={},this._computedProperties={},this._animationBases={},this._animationWriting=0,this.enableDispose=!0,this._settings=t}_checkDirty(){at(this._settings).forEach(t=>{this._userProperties[t]=!0,this._markDirtyKey(t)})}resetUserSettings(){this._userProperties={},this._computedProperties={}}_runAnimation(t){let e=_e.Stopped;if(!this.isDisposed()){let i=!1,r=!1;I(this._animatingSettings,(s,n)=>{if(n.stopped)this._stopAnimation(s);else if(n.playing){n._run(t);let o=n.percentage;o>=1?n._checkEnded()?this._setAnimated(s,n._value(1)):(i=!0,n._reset(t),this._set(s,n._value(1))):(i=!0,this._set(s,n._value(o)))}else r=!0}),I(this._animatingPrivateSettings,(s,n)=>{if(n.stopped)this._stopAnimationPrivate(s);else if(n.playing){n._run(t);let o=n.percentage;o>=1?n._checkEnded()?this.setPrivate(s,n._value(1)):(i=!0,n._reset(t),this._setPrivate(s,n._value(1))):(i=!0,this._setPrivate(s,n._value(o)))}else r=!0}),i?e=_e.Playing:r&&(e=_e.Paused)}return e}_markDirtyKey(t){this.markDirty()}_markDirtyPrivateKey(t){this.markDirty()}on(t,e){let i=this._settingEvents[t];return i===void 0&&(i=this._settingEvents[t]=[]),i.push(e),new _t(()=>{J(i,e),i.length===0&&delete this._settingEvents[t]})}off(t,e){let i=this._settingEvents[t];i!==void 0&&e!==void 0?J(i,e):delete this._settingEvents[t]}once(t,e){let i=this.on(t,(r,s,n)=>{i.dispose(),e(r,s,n)});return i}_onDebouncedHelper(t,e,i,r){let s=t[e];s===void 0&&(s=t[e]=[]);let n={cb:i,delay:r};return s.push(n),new _t(()=>{n.timeout&&window.clearTimeout(n.timeout),J(s,n),s.length===0&&delete t[e]})}_offDebouncedHelper(t,e,i){let r=t[e];if(r!==void 0)if(i!==void 0){let s=Ri(r,n=>n.cb===i);if(s!==-1){let n=r[s];n.timeout&&window.clearTimeout(n.timeout),r.splice(s,1),r.length===0&&delete t[e]}}else y(r,s=>{s.timeout&&window.clearTimeout(s.timeout)}),delete t[e]}onDebounced(t,e,i){return this._onDebouncedHelper(this._debouncedSettingEvents,t,e,i)}offDebounced(t,e){this._offDebouncedHelper(this._debouncedSettingEvents,t,e)}onceDebounced(t,e,i){let r=this.onDebounced(t,(s,n,o)=>{r.dispose(),e(s,n,o)},i);return r}onPrivate(t,e){let i=this._privateSettingEvents[t];return i===void 0&&(i=this._privateSettingEvents[t]=[]),i.push(e),new _t(()=>{J(i,e),i.length===0&&delete this._privateSettingEvents[t]})}offPrivate(t,e){let i=this._privateSettingEvents[t];i!==void 0&&e!==void 0?J(i,e):delete this._privateSettingEvents[t]}onPrivateDebounced(t,e,i){return this._onDebouncedHelper(this._debouncedPrivateSettingEvents,t,e,i)}offDebouncedPrivate(t,e){this._offDebouncedHelper(this._debouncedPrivateSettingEvents,t,e)}getRaw(t,e){let i=this._settings[t];return i!==void 0?i:e}has(t){return t in this._settings}get(t,e){return this.getRaw(t,e)}_sendKeyEvent(t,e){let i=this._settingEvents[t];i!==void 0&&y(i.slice(),s=>{s(e,this,t)});let r=this._debouncedSettingEvents[t];r!==void 0&&y(r,s=>{s.timeout&&window.clearTimeout(s.timeout),s.timeout=window.setTimeout(()=>{s.timeout=void 0,s.cb(e,this,t)},s.delay)})}_sendPrivateKeyEvent(t,e){let i=this._privateSettingEvents[t];i!==void 0&&y(i.slice(),s=>{s(e,this,t)});let r=this._debouncedPrivateSettingEvents[t];r!==void 0&&y(r,s=>{s.timeout&&window.clearTimeout(s.timeout),s.timeout=window.setTimeout(()=>{s.timeout=void 0,s.cb(e,this,t)},s.delay)})}_setRaw(t,e,i){this._prevSettings[t]=e,this._sendKeyEvent(t,i)}setRaw(t,e){let i=this._settings[t];this._settings[t]=e,i!==e&&this._setRaw(t,i,e)}_set(t,e){let i=this._settings[t];this._settings[t]=e,i!==e&&(this._setRaw(t,i,e),this._markDirtyKey(t))}_stopAnimation(t){let e=this._animatingSettings[t];e&&(delete this._animatingSettings[t],e.stop())}set(t,e){return this._set(t,e),this._stopAnimation(t),e}remove(t){t in this._settings&&(this._prevSettings[t]=this._settings[t],delete this._settings[t],this._sendKeyEvent(t,void 0),this._markDirtyKey(t)),this._stopAnimation(t)}removeAll(){y(at(this._settings),t=>{this.remove(t)})}getPrivate(t,e){let i=this._privateSettings[t];return i!==void 0?i:e}_setPrivateRaw(t,e,i){this._prevPrivateSettings[t]=e,this._sendPrivateKeyEvent(t,i)}setPrivateRaw(t,e){let i=this._privateSettings[t];this._privateSettings[t]=e,i!==e&&this._setPrivateRaw(t,i,e)}_setPrivate(t,e){let i=this._privateSettings[t];this._privateSettings[t]=e,i!==e&&(this._setPrivateRaw(t,i,e),this._markDirtyPrivateKey(t))}_stopAnimationPrivate(t){let e=this._animatingPrivateSettings[t];e&&(e.stop(),delete this._animatingPrivateSettings[t])}setPrivate(t,e){return this._setPrivate(t,e),this._stopAnimationPrivate(t),e}removePrivate(t){t in this._privateSettings&&(this._prevPrivateSettings[t]=this._privateSettings[t],delete this._privateSettings[t],this._markDirtyPrivateKey(t)),this._stopAnimationPrivate(t)}setAll(t){I(t,(e,i)=>{this.set(e,i)})}_setAnimated(t,e){let i=this._userProperties[t]&&!this._computedProperties[t];this._animationWriting++;try{this.set(t,e)}finally{this._animationWriting--}i||(this._computedProperties[t]=!0)}animate(t){let e=t.key,i=t.to,r=t.duration||0,s=t.loops||1,n=t.from===void 0?this.get(e):t.from,o=t.easing===void 0?Vt:t.easing;if(r===0)this._setAnimated(e,i);else if(n===void 0||n===i)this._setAnimated(e,i);else{this._setAnimated(e,n);let h=this._animatingSettings[e]=new zt(this,n,i,r,o,s,this._animationTime());return this._startAnimation(),h}let l=new zt(this,n,i,r,o,s,null);return l.stop(),l}animatePrivate(t){let e=t.key,i=t.to,r=t.duration||0,s=t.loops||1,n=t.from===void 0?this.getPrivate(e):t.from,o=t.easing===void 0?Vt:t.easing;if(r===0)this.setPrivate(e,i);else if(n===void 0||n===i)this.setPrivate(e,i);else{this.setPrivate(e,n);let h=this._animatingPrivateSettings[e]=new zt(this,n,i,r,o,s,this._animationTime());return this._startAnimation(),h}let l=new zt(this,n,i,r,o,s,null);return l.stop(),l}_dispose(){}isDisposed(){return this._disposed}dispose(){this.enableDispose&&!this._disposed&&(this._disposed=!0,this._dispose())}},z=class extends se{constructor(t,e,i,r=[]){if(super(e),this.states=new Pe(this),this.adapters=new pi(this),this.events=this._createEvents(),this._userPrivateProperties={},this._dirty={},this._dirtyPrivate={},this._templates=[],this._defaultThemes=[],this._templateDisposers=[],this._disposers=[],this._runSetup=!0,this._disposerProperties={},this._builtIn=!1,this._declaredAnimations=[],this._declaredTimers=[],this._animationsApplied=!1,!i)throw new Error("You cannot use `new Class()`, instead use `Class.new()`");this._root=t,this._internalTemplates=r,e.id&&this._registerId(e.id)}static new(t,e,i){let r=ie>0,s=!r&&e.themeTags?e.themeTags.slice():void 0;ie++;try{let n=new this(t,e,!0);return n._builtIn=r,n._userThemeTags=s,n._template=i,n._afterNew(),n}finally{ie--}}static _new(t,e,i=[]){ie++;try{let r=new this(t,e,!0,i);return r._builtIn=!0,r._afterNew(),r}finally{ie--}}_afterNew(){this._checkDirty();let t=!1,e=this._template;e&&(t=!0,e._setObjectTemplate(this)),y(this._internalTemplates,i=>{t=!0,i._setObjectTemplate(this)}),t&&this._applyTemplates(!1),this.states.create("default",{}),this._setDefaults()}_afterNewApplyThemes(){this._checkDirty();let t=this._template;t&&t._setObjectTemplate(this),y(this._internalTemplates,e=>{e._setObjectTemplate(this)}),this.states.create("default",{}),this._setDefaults(),this._applyThemes()}_createEvents(){return new At}get classNames(){return this.constructor.classNames}get className(){return this.constructor.className}_setDefaults(){}_setDefaultFn(t,e){let i=this.get(t);if(i)return i;{let r=e();return this._setC(t,r),r}}_setDefault(t,e){this.has(t)||(super.set(t,e),this._computedProperties[t]=!0)}_setRawDefault(t,e){this.has(t)||(super.setRaw(t,e),this._computedProperties[t]=!0)}_clearDirty(){this._animationsApplied=!1,at(this._dirty).forEach(t=>{this._dirty[t]=!1}),at(this._dirtyPrivate).forEach(t=>{this._dirtyPrivate[t]=!1})}isDirty(t){return!!this._dirty[t]}isPrivateDirty(t){return!!this._dirtyPrivate[t]}_markDirtyKey(t){this._dirty[t]=!0,super._markDirtyKey(t)}_markDirtyPrivateKey(t){this._dirtyPrivate[t]=!0,super._markDirtyKey(t)}isType(t){return this.classNames.indexOf(t)!==-1}_pushPropertyDisposer(t,e){let i=this._disposerProperties[t];return i===void 0&&(i=this._disposerProperties[t]=[]),i.push(e),e}_disposeProperty(t){let e=this._disposerProperties[t];e!==void 0&&(y(e,i=>{i.dispose()}),delete this._disposerProperties[t])}set template(t){let e=this._template;e!==t&&(this._template=t,e&&e._removeObjectTemplate(this),t&&t._setObjectTemplate(this),this._applyTemplates())}get template(){return this._template}markDirty(){this._root._addDirtyEntity(this)}_startAnimation(){this._root._addAnimation(this)}_animationTime(){return this._root.animationTime}_applyState(t){}_applyStateAnimated(t,e){}get(t,e){let i=this.adapters.fold(t,this._settings[t]);return i!==void 0?i:e}isUserSetting(t){return this._userProperties[t]||!1}set(t,e){return this._userProperties[t]=!0,delete this._computedProperties[t],this._animationWriting||delete this._animationBases[t],super.set(t,e)}_setC(t,e){let i=this._userProperties[t]&&!this._computedProperties[t]&&this._settings[t]===e,r=this.set(t,e);return i||(this._computedProperties[t]=!0),r}_setCRaw(t,e){let i=this._userProperties[t]&&!this._computedProperties[t]&&this._settings[t]===e;this.setRaw(t,e),i||(this._computedProperties[t]=!0)}_markC(...t){return y(t,e=>{this._computedProperties[e]=!0}),this}_setCAll(t){I(t,(e,i)=>{this._setC(e,i)})}isComputedSetting(t){return this._computedProperties[t]||!1}setRaw(t,e){this._userProperties[t]=!0,delete this._computedProperties[t],this._animationWriting||delete this._animationBases[t],super.setRaw(t,e)}_setSoft(t,e){return this._userProperties[t]?e:super.set(t,e)}remove(t){delete this._userProperties[t],delete this._computedProperties[t],this._removeTemplateProperty(t)}setPrivate(t,e){return this._userPrivateProperties[t]=!0,super.setPrivate(t,e)}setPrivateRaw(t,e){this._userPrivateProperties[t]=!0,super.setPrivateRaw(t,e)}removePrivate(t){delete this._userPrivateProperties[t],this._removeTemplatePrivateProperty(t)}_setTemplateProperty(t,e,i){if(!this._userProperties[e]){let r=this._findTemplateByKey(e);t===r&&super.set(e,i)}}_setTemplatePrivateProperty(t,e,i){if(!this._userPrivateProperties[e]){let r=this._findTemplateByPrivateKey(e);t===r&&super.setPrivate(e,i)}}_addBaseTemplate(t){this._internalTemplates.indexOf(t)===-1&&(this._internalTemplates=[t].concat(this._internalTemplates),t._setObjectTemplate(this),this._applyTemplates())}_removeTemplateProperty(t){if(!this._userProperties[t]){let e=this._findTemplateByKey(t);e?super.set(t,e._settings[t]):super.remove(t)}}_removeTemplatePrivateProperty(t){if(!this._userPrivateProperties[t]){let e=this._findTemplateByPrivateKey(t);e?super.setPrivate(t,e._privateSettings[t]):super.removePrivate(t)}}_walkParents(t){t(this._root._rootContainer),t(this)}_applyStateByKey(t){let e=this.states.create(t,{}),i={};this._eachTemplate(r=>{let s=r.states.lookup(t);s&&s._apply(e,i)}),I(e._settings,r=>{!i[r]&&!e._userSettings[r]&&e.remove(r)})}_applyTemplate(t,e){this._templateDisposers.push(t._apply(this,e)),I(t._settings,(i,r)=>{!e.settings[i]&&!this._userProperties[i]&&(e.settings[i]=!0,super.set(i,r))}),I(t._privateSettings,(i,r)=>{!e.privateSettings[i]&&!this._userPrivateProperties[i]&&(e.privateSettings[i]=!0,super.setPrivate(i,r))}),this._runSetup&&t.setup&&(this._runSetup=!1,t.setup(this))}_findStaticTemplate(t){if(this._template&&t(this._template))return this._template}_eachTemplate(t){this._findStaticTemplate(e=>(t(e),!1)),gt(this._internalTemplates,t),y(this._templates,t)}_applyTemplates(t=!0){t&&this._disposeTemplates();let e={settings:{},privateSettings:{},states:{}};this._eachTemplate(i=>{this._applyTemplate(i,e)}),t&&(I(this._settings,i=>{!this._userProperties[i]&&!e.settings[i]&&super.remove(i)}),I(this._privateSettings,i=>{!this._userPrivateProperties[i]&&!e.privateSettings[i]&&super.removePrivate(i)}))}_findTemplate(t){let e=this._findStaticTemplate(t);if(e===void 0){let i=Si(this._internalTemplates,t);return i===void 0?Ft(this._templates,t):i}else return e}_findTemplateByKey(t){return this._findTemplate(e=>t in e._settings)}_findTemplateByPrivateKey(t){return this._findTemplate(e=>t in e._privateSettings)}_disposeTemplates(){y(this._templateDisposers,t=>{t.dispose()}),this._templateDisposers.length=0}_removeTemplates(){y(this._templates,t=>{t._removeObjectTemplate(this)}),this._templates.length=0}_applyThemes(t=!1){if(this.get("ignoreThemes"))return!1;let e=!1,i=[],r=[],s=new Set,n=this.get("themeTagsSelf");return n&&y(n,o=>{s.add(o)}),this._walkParents(o=>{o===this._root._rootContainer&&(e=!0),o._defaultThemes.length>0&&i.push(o._defaultThemes);let l=o.get("themes");l&&r.push(l);let h=o.get("themeTags");h&&y(h,d=>{s.add(d)})}),r=i.concat(r),this._removeTemplates(),(e||t)&&gt(this.classNames,o=>{let l=[];y(r,h=>{y(h,d=>{let p=d._lookupRules(o);p&&gt(p,u=>{if(u.tags.every(m=>s.has(m))){let m=$i(l,g=>{let v=ri(u.tags.length,g.tags.length);return v===0?Vi(u.tags,g.tags,ri):v});l.splice(m.index,0,u)}})})}),y(l,h=>{this._templates.push(h.template),h.template._setObjectTemplate(this)})}),this._applyTemplates(),(e||t)&&(this._runSetup=!1),e||t}_changed(){}_stopDeclaredAnimations(t=!0){y(this._declaredTimers,e=>this.removeDispose(e)),this._declaredTimers=[],y(this._declaredAnimations,e=>e.animation.stop()),this._declaredAnimations=[],t&&(I(this._animationBases,(e,i)=>{this._set(e,i.value),i.user?this._userProperties[e]=!0:delete this._userProperties[e],i.computed?this._computedProperties[e]=!0:delete this._computedProperties[e]}),this._animationBases={})}_playDeclaredAnimations(){this._stopDeclaredAnimations();let t=this.get("animations");!t||!t.length||y(t,e=>{let i=e.target==="dataItem"?this.dataItem:this,r=e.key;if(!i||!r)return;i===this&&!this._animationBases[r]&&(this._animationBases[r]={value:this._settings[r],user:!!this._userProperties[r],computed:!!this._computedProperties[r]});let s=hi(e.easing,e.ease),n=e.duration||0,o=e.loops===0?1/0:e.loops||1,l=()=>{if(i.isDisposed())return;let h=i.animate({key:r,from:e.from,to:e.to,duration:e.yoyo?n*2:n,easing:e.yoyo?li(s):s,loops:o});h._declared=!0,this._declaredAnimations.push({target:i,key:r,animation:h})};e.delay?this._declaredTimers.push(this.setTimeout(l,e.delay)):l()})}_applyDeclaredAnimations(){!this._animationsApplied&&this.isDirty("animations")&&(this._animationsApplied=!0,this._playDeclaredAnimations())}_beforeChanged(){if(this._applyDeclaredAnimations(),this.isDirty("id")){let t=this.get("id");t&&this._registerId(t);let e=this._prevSettings.id;e&&(delete this._root.entitiesById[e],delete Mt.entitiesById[e])}}_registerId(t){if(this._root.entitiesById[t]&&this._root.entitiesById[t]!==this)throw new Error('An entity with id "'+t+'" already exists.');this._root.entitiesById[t]=this,Mt.entitiesById[t]=this}_afterChanged(){}addDisposer(t){return this._disposers.push(t),t}_dispose(){super._dispose(),this._stopDeclaredAnimations(!1);let t=this._template;t&&t._removeObjectTemplate(this),y(this._internalTemplates,i=>{i._removeObjectTemplate(this)}),this._removeTemplates(),this._disposeTemplates(),this.events.dispose(),this._disposers.forEach(i=>{i.dispose()}),I(this._disposerProperties,(i,r)=>{y(r,s=>{s.dispose()})});let e=this.get("id");e&&(delete this._root.entitiesById[e],delete Mt.entitiesById[e])}setTimeout(t,e){let i=setTimeout(()=>{this.removeDispose(r),t()},e),r=new _t(()=>{clearTimeout(i)});return this._disposers.push(r),r}removeDispose(t){if(!this.isDisposed()){let e=qt(this._disposers,t);e>-1&&this._disposers.splice(e,1)}t.dispose()}hasTag(t){return qt(this.get("themeTags",[]),t)!==-1}addTag(t){if(!this.hasTag(t)){let e=this.get("themeTags",[]);e.push(t),this.set("themeTags",e)}}_getUserThemeTags(){let t=this._userThemeTags;if(!t)return[];let e=this.get("themeTags",[]);return t.filter(i=>e.indexOf(i)!==-1)}_addUserThemeTags(t){let e=this._userThemeTags||[];y(t,i=>{e.indexOf(i)===-1&&e.push(i)}),this._userThemeTags=e}removeTag(t){if(this.hasTag(t)){let e=this.get("themeTags",[]);$t(e,t),this.set("themeTags",e)}}_t(t,e,...i){return this._root.language.translate(t,e,...i)}get root(){return this._root}};z.className="Entity";z.classNames=["Entity"];var ke=class a extends At{constructor(t){super(),this._rendererDisposers={},this._dispatchParents=!0,this._sprite=t}_makePointerEvent(t,e){return{type:t,originalEvent:e.event,point:e.point,simulated:e.simulated,native:e.native,target:this._sprite}}_onRenderer(t,e){this._sprite._setC("interactive",!0),this._sprite._display.interactive=!0;let i=this._rendererDisposers[t];if(i===void 0){let r=this._sprite._display.on(t,s=>{e.call(this,s)});i=this._rendererDisposers[t]=new Bi(()=>{delete this._rendererDisposers[t],r.dispose()})}return i.increment()}_on(t,e,i,r,s,n,o){let l=super._on(t,e,i,r,s,n,o),h=a.RENDERER_EVENTS[e];return h!==void 0&&(l.disposer=new yt([l.disposer,this._onRenderer(e,h)])),l}stopParentDispatch(){this._dispatchParents=!1}dispatchParents(t,e){let i=this._dispatchParents;this._dispatchParents=!0;try{this.dispatch(t,e),this._dispatchParents&&this._sprite.parent&&this._sprite.parent.events.dispatchParents(t,e)}finally{this._dispatchParents=i}}};ke.RENDERER_EVENTS={click:function(a){this.isEnabled("click")&&!this._sprite.isDragging()&&this._sprite._hasDown()&&!this._sprite._hasMoved(this._makePointerEvent("click",a))&&this.dispatch("click",this._makePointerEvent("click",a))},rightclick:function(a){this.isEnabled("rightclick")&&this.dispatch("rightclick",this._makePointerEvent("rightclick",a))},middleclick:function(a){this.isEnabled("middleclick")&&this.dispatch("middleclick",this._makePointerEvent("middleclick",a))},dblclick:function(a){this.dispatchParents("dblclick",this._makePointerEvent("dblclick",a))},pointerover:function(a){let t=this._sprite,e=!0;if(t.getPrivate("trustBounds")){t._getBounds();let i=t.globalBounds();if(t.isType("Graphics")){let r=t.get("strokeWidth",1)/2;r>=1&&(i.left-=r,i.right+=r,i.top-=r,i.bottom+=r)}ni(a.point,i)||(e=!1,t._root._renderer.removeHovering(t._display))}e&&this.isEnabled("pointerover")&&this.dispatch("pointerover",this._makePointerEvent("pointerover",a))},pointerout:function(a){this.isEnabled("pointerout")&&this.dispatch("pointerout",this._makePointerEvent("pointerout",a))},pointerdown:function(a){this.dispatchParents("pointerdown",this._makePointerEvent("pointerdown",a))},pointerup:function(a){this.isEnabled("pointerup")&&this.dispatch("pointerup",this._makePointerEvent("pointerup",a))},globalpointerup:function(a){this.isEnabled("globalpointerup")&&this.dispatch("globalpointerup",this._makePointerEvent("globalpointerup",a))},globalpointermove:function(a){this.isEnabled("globalpointermove")&&this.dispatch("globalpointermove",this._makePointerEvent("globalpointermove",a))},globalpointerdown:function(a){this.isEnabled("globalpointerdown")&&this.dispatch("globalpointerdown",this._makePointerEvent("globalpointerdown",a))},wheel:function(a){this.dispatchParents("wheel",{type:"wheel",target:this._sprite,originalEvent:a.event,point:a.point})}};var N=class extends z{constructor(){super(...arguments),this._adjustedLocalBounds={left:0,right:0,top:0,bottom:0},this._localBounds={left:0,right:0,top:0,bottom:0},this._sizeDirty=!1,this._isDragging=!1,this._isHidden=!1,this._isShowing=!1,this._isHiding=!1,this._isDown=!1,this._downPoints={},this._appeared=!1,this._appearApplied=!1,this._appearPending=!1}_afterNew(){this.setPrivateRaw("visible",!0),super._afterNew()}markDirtyKey(t){this._markDirtyKey(t)}_markDirtyKey(t){super._markDirtyKey(t),(t=="x"||t=="y"||t=="dx"||t=="dy")&&(this.markDirtyBounds(),this._addPercentagePositionChildren(),this.markDirtyPosition())}_markDirtyPrivateKey(t){super._markDirtyPrivateKey(t),(t=="x"||t=="y")&&this.markDirtyPosition()}_removeTemplateField(){this._templateField&&this._templateField._removeObjectTemplate(this)}_createEvents(){return new ke(this)}_processTemplateField(){let t,e,i=this.get("templateField");if(i){let r=this.dataItem;if(r){let s=r.dataContext;s&&(e=s[i])}}e!==this._templateFieldRaw&&(this._templateFieldRaw=e,t=e,!(t instanceof Jt)&&t&&(t=Jt.new(t)),this._templateField!==t&&(this._removeTemplateField(),this._templateField=t,t&&t._setObjectTemplate(this),this._applyTemplates()))}_setDataItem(t){let e=this._dataItem;this._dataItem=t,this._processTemplateField();let i="dataitemchanged";if(t!=e){let r=this.get("animations");r&&r.some(s=>s.target==="dataItem")&&this._markDirtyKey("animations"),this.events.isEnabled(i)&&this.events.dispatch(i,{type:i,target:this,oldDataItem:e,newDataItem:t})}}set dataItem(t){this._setDataItem(t)}get dataItem(){if(this._dataItem)return this._dataItem;{let t=this._parent;for(;t;){if(t._dataItem)return t._dataItem;t=t._parent}}}_exportName(){let t=this._dataItem;if(t&&t.component)return t.component._dataItemName(t,this)}_nameForExport(t){let e=this._exportName();return this._display.exportName=e!==t?e:void 0,e||t}_addPercentageSizeChildren(){let t=this.parent;t&&(this.get("width")instanceof A||this.get("height")instanceof A?Je(t._percentageSizeChildren,this):J(t._percentageSizeChildren,this))}_addPercentagePositionChildren(){let t=this.parent;t&&(this.get("x")instanceof A||this.get("y")instanceof A?Je(t._percentagePositionChildren,this):J(t._percentagePositionChildren,this))}markDirtyPosition(){this._root._addDirtyPosition(this)}updatePivotPoint(){let t=this._localBounds;if(t){let e=this.get("centerX");e!=null&&(this._display.pivot.x=t.left+et(e,t.right-t.left));let i=this.get("centerY");i!=null&&(this._display.pivot.y=t.top+et(i,t.bottom-t.top))}}_beforeChanged(){if(super._beforeChanged(),this._applyAutoAppear(),this._handleStates(),this.isDirty("tooltip")){let t=this._prevSettings.tooltip;t&&t.dispose()}if((this.isDirty("layer")||this.isDirty("layerMargin"))&&(this._display.setLayer(this.get("layer"),this.get("layerMargin")),this.markDirtyLayer()),this.isDirty("tooltipPosition")){let t=this._tooltipMoveDp;t&&(t.dispose(),this._tooltipMoveDp=void 0);let e=this._tooltipPointerDp;e&&(e.dispose(),this._tooltipPointerDp=void 0),this.get("tooltipPosition")=="pointer"&&(this.isHover()&&(this._tooltipMoveDp=this.events.on("globalpointermove",i=>{this.showTooltip(i.point)})),this._tooltipPointerDp=new yt([this.events.on("pointerover",()=>{let i=this._tooltipMoveDp;i&&(i.dispose(),this._tooltipMoveDp=void 0),this._tooltipMoveDp=this.events.on("globalpointermove",r=>{this.showTooltip(r.point)})}),this.events.on("pointerout",()=>{let i=this._tooltipMoveDp;i&&(i.dispose(),this._tooltipMoveDp=void 0)})]))}}_handleStates(){this.isDirty("active")&&(this.get("active")?(this.states.applyAnimate("active"),this._setC("ariaChecked",!0)):(this.isHidden()||this.states.applyAnimate("default"),this._setC("ariaChecked",!1)),this.markDirtyAccessibility()),this.isDirty("disabled")&&(this.get("disabled")?(this.states.applyAnimate("disabled"),this._setC("ariaChecked",!1)):(this.isHidden()||this.states.applyAnimate("default"),this._setC("ariaChecked",!0)),this.markDirtyAccessibility())}_changed(){super._changed();let t=this._display,e=this.events;if(this.isDirty("draggable")){let i=this.get("draggable");i?(this._setC("interactive",!0),this._dragDp=new yt([e.on("pointerdown",r=>{this.dragStart(r)}),e.on("globalpointermove",r=>{this.dragMove(r)}),e.on("globalpointerup",r=>{this.dragStop(r)})])):this._dragDp&&(this._dragDp.dispose(),this._dragDp=void 0),t.cancelTouch=!!i}if(this.isDirty("tooltipText")||this.isDirty("tooltipHTML")||this.isDirty("showTooltipOn")){let i=this.get("tooltipText"),r=this.get("tooltipHTML"),s=this.get("showTooltipOn","hover");this._tooltipDp&&(this._tooltipDp.dispose(),this._tooltipDp=void 0),(i||r)&&(s=="click"?(this._tooltipDp=new yt([e.on("click",()=>{this.setTimeout(()=>{let n=this.getTooltip();n&&!n.isHidden()&&n.get("tooltipTarget")===this?this.hideTooltip():this.showTooltip()},10)}),Mi(document,"click",n=>{this.hideTooltip()})]),this._disposers.push(this._tooltipDp)):s=="always"||(this._tooltipDp=new yt([e.on("pointerover",()=>{this.showTooltip()}),e.on("pointerout",()=>{this.hideTooltip()})]),this._disposers.push(this._tooltipDp)))}if(this.isDirty("toggleKey")){let i=this.get("toggleKey");i&&i!="none"?this._toggleDp=e.on("click",()=>{this._isDragging||this.set(i,!this.get(i))}):this._toggleDp&&(this._toggleDp.dispose(),this._toggleDp=void 0)}if(this.isDirty("opacity")&&(t.alpha=Math.max(0,this.get("opacity",1)),this.get("focusable")&&this.markDirtyAccessibility()),this.isDirty("rotation")&&(this.markDirtyBounds(),t.angle=this.get("rotation",0)),this.isDirty("scale")&&(this.markDirtyBounds(),t.scale=this.get("scale",0)),this.isPrivateDirty("deform")&&(this.markDirtyBounds(),t.deform=this.getPrivate("deform")||null),(this.isDirty("centerX")||this.isDirty("centerY"))&&(this.markDirtyBounds(),this.updatePivotPoint()),(this.isDirty("visible")||this.isPrivateDirty("visible")||this.isDirty("forceHidden"))&&(!this.get("visible")||!this.getPrivate("visible")||this.get("forceHidden")?(t.visible=!1,this.hideTooltip()):t.visible=!0,this.markDirtyBounds(),this.get("focusable")&&this.markDirtyAccessibility()),this.isDirty("width")||this.isDirty("height")){this.markDirtyBounds(),this._addPercentageSizeChildren();let i=this.parent;i&&(this.isDirty("width")&&this.get("width")instanceof A||this.isDirty("height")&&this.get("height")instanceof A)&&(i.markDirty(),i._prevWidth=0),this._sizeDirty=!0}if((this.isDirty("maxWidth")||this.isDirty("maxHeight")||this.isPrivateDirty("width")||this.isPrivateDirty("height")||this.isDirty("minWidth")||this.isDirty("minHeight")||this.isPrivateDirty("maxWidth")||this.isPrivateDirty("maxHeight")||this.isPrivateDirty("minWidth")||this.isPrivateDirty("minHeight")||this.isDirty("marginLeft")||this.isDirty("marginTop")||this.isDirty("marginRight")||this.isDirty("marginBottom"))&&(this.markDirtyBounds(),this._sizeDirty=!0),this._sizeDirty&&this._updateSize(),this.isDirty("wheelable")){let i=this.get("wheelable");i&&this._setC("interactive",!0),t.wheelable=!!i}if(this.isPrivateDirty("focusExcluded")&&this.get("focusable")&&(this._root._registerTabindexOrder(this),this.markDirtyAccessibility()),(this.isDirty("tabindexOrder")||this.isDirty("focusableGroup"))&&(this.get("focusable")?this._root._registerTabindexOrder(this):this._root._unregisterTabindexOrder(this)),this.isDirty("filter")||this.isDirty("blur")||this.isDirty("saturate")||this.isDirty("brightness")||this.isDirty("contrast")||this.isDirty("sepia")||this.isDirty("hue")||this.isDirty("invert")){let i=this.get("filter",""),r=this.get("blur",0);r!=0&&(i+=" blur("+r+"px)");let s=this.get("saturate",1);s!=1&&(i+=" saturate("+s+")");let n=this.get("brightness",1);n!=1&&(i+=" brightness("+n+")");let o=this.get("contrast",1);o!=1&&(i+=" contrast("+o+")");let l=this.get("sepia",0);l!=0&&(i+=" sepia("+l+")");let h=this.get("hue",0);h!=0&&(i+=" hue-rotate("+h+"deg)");let d=this.get("invert",0);d!=0&&(i+=" invert("+d+")"),t.filter=i.trim()}if(this.isDirty("cursorOverStyle")&&(t.cursorOverStyle=this.get("cursorOverStyle")),this.isDirty("hoverOnFocus")&&(this.get("hoverOnFocus")?this._focusDp=new yt([e.on("focus",()=>{let i=this.getTooltip();i&&(i._focusAnnounce=!0),this.showTooltip()}),e.on("blur",()=>{let i=this.getTooltip();i&&(i._focusAnnounce=!1),this.hideTooltip()})]):this._focusDp&&(this._focusDp.dispose(),this._focusDp=void 0)),this.isDirty("focusable")&&(this.get("focusable")?this._root._registerTabindexOrder(this):this._root._unregisterTabindexOrder(this),this.markDirtyAccessibility(),this._disposers.push(e.on("blur",()=>{this.setPrivateRaw("touchHovering",!1)})),this._disposers.push(e.once("boundschanged",()=>{this.markDirtyAccessibility()}))),(this.isPrivateDirty("focusable")||this.isPrivateDirty("focusOutOfView"))&&this.markDirtyAccessibility(),(this.isDirty("role")||this.isDirty("ariaLive")||this.isDirty("ariaChecked")||this.isDirty("ariaCurrent")||this.isDirty("ariaSelected")||this.isDirty("ariaExpanded")||this.isDirty("ariaHidden")||this.isDirty("ariaOrientation")||this.isDirty("ariaValueNow")||this.isDirty("ariaValueMin")||this.isDirty("ariaValueMax")||this.isDirty("ariaValueText")||this.isDirty("ariaLabel")||this.isDirty("ariaControls"))&&this.markDirtyAccessibility(),this.isDirty("exportable")&&(t.exportable=this.get("exportable")),this.isDirty("interactive")){let i=this.events;this.get("interactive")&&!i.isDisposed()?this._hoverDp=new yt([i.on("click",r=>{ei(r.originalEvent)&&(this.getPrivate("touchHovering")||this.setTimeout(()=>{this._handleOver(),(this.get("tooltipText")||this.get("tooltipHTML"))&&this.showTooltip(),this.setPrivateRaw("touchHovering",!0),this.events.dispatch("pointerover",{type:"pointerover",target:r.target,originalEvent:r.originalEvent,point:r.point,simulated:r.simulated})},10))}),i.on("globalpointerup",r=>{ei(r.originalEvent)&&this.getPrivate("touchHovering")&&!this.isHover()&&(this._handleOut(),(this.get("tooltipText")||this.get("tooltipHTML"))&&this.hideTooltip(),this.setPrivateRaw("touchHovering",!1),this.events.dispatch("pointerout",{type:"pointerout",target:r.target,originalEvent:r.originalEvent,point:r.point,simulated:r.simulated})),this._isDown&&this._handleUp(r)}),i.on("pointerover",()=>{this._handleOver()}),i.on("pointerout",()=>{this._handleOut()}),i.on("pointerdown",r=>{this._handleDown(r)})]):(this._display.interactive=!1,this._hoverDp&&(this._hoverDp.dispose(),this._hoverDp=void 0))}this.isDirty("forceInactive")&&(this._display.inactive=this.get("forceInactive",null)),this.get("showTooltipOn")=="always"&&this._display.visible&&this.showTooltip()}dragStart(t){this._dragEvent=t,this.events.stopParentDispatch()}dragStop(t){if(this._dragEvent=void 0,this._dragPoint=void 0,this.events.stopParentDispatch(),this._isDragging){this._isDragging=!1;let e="dragstop";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this,originalEvent:t.originalEvent,point:t.point,simulated:t.simulated})}}_handleOver(){this.isHidden()||(this.get("active")&&this.states.lookup("hoverActive")?this.states.applyAnimate("hoverActive"):this.get("disabled")&&this.states.lookup("hoverDisabled")?this.states.applyAnimate("hoverDisabled"):this.states.applyAnimate("hover"),this.get("draggable")&&this._isDown&&this.states.lookup("down")&&this.states.applyAnimate("down"))}_handleOut(){this.isHidden()||(this.get("active")&&this.states.lookup("active")?this.states.applyAnimate("active"):this.get("disabled")&&this.states.lookup("disabled")?this.states.applyAnimate("disabled"):(this.states.lookup("hover")||this.states.lookup("hoverActive"))&&this.states.applyAnimate("default"),this.get("draggable")&&this._isDown&&this.states.lookup("down")&&this.states.applyAnimate("down"))}_handleUp(t){if(!this.isHidden()){this.get("active")&&this.states.lookup("active")?this.states.applyAnimate("active"):this.get("disabled")&&this.states.lookup("disabled")?this.states.applyAnimate("disabled"):this.states.lookup("down")&&(this.isHover()?this.states.applyAnimate("hover"):this.states.applyAnimate("default")),this._downPoint=void 0;let e=ge(t.originalEvent);delete this._downPoints[e],at(this._downPoints).length==0&&(this._isDown=!1)}}_hasMoved(t){let e=ge(t.originalEvent),i=this._downPoints[e];if(i){let r=Math.abs(i.x-t.point.x),s=Math.abs(i.y-t.point.y);return r>5||s>5}return!1}_hasDown(){return at(this._downPoints).length>0}_handleDown(t){let e=this.parent;if(e&&!this.get("draggable")&&e._handleDown(t),this.get("interactive")&&!this.isHidden()){this.states.lookup("down")&&this.states.applyAnimate("down"),this._downPoint={x:t.point.x,y:t.point.y},this._isDown=!0;let i=ge(t.originalEvent);this._downPoints[i]={x:t.point.x,y:t.point.y}}}dragMove(t){let e=this._dragEvent;if(e){if(e.simulated&&!t.simulated)return!0;let i=0,r=this.parent,s=1;for(;r!=null;)i+=r.get("rotation",0),s*=r.get("scale",1),r=r.parent;let n=(t.point.x-e.point.x)/s,o=(t.point.y-e.point.y)/s,l=this.events;if(e.simulated&&!this._isDragging){this._isDragging=!0,this._dragEvent=t,this._dragPoint={x:this.x(),y:this.y()};let h="dragstart";l.isEnabled(h)&&l.dispatch(h,{type:h,target:this,originalEvent:t.originalEvent,point:t.point,simulated:t.simulated})}if(this._isDragging){let h=this._dragPoint;this.set("x",h.x+n*Z(i)+o*X(i)),this.set("y",h.y+o*Z(i)-n*X(i));let d="dragged";l.isEnabled(d)&&l.dispatch(d,{type:d,target:this,originalEvent:t.originalEvent,point:t.point,simulated:t.simulated})}else if(Math.hypot(n,o)>5){this._isDragging=!0,this._dragEvent=t,this._dragPoint={x:this.x(),y:this.y()};let h="dragstart";l.isEnabled(h)&&l.dispatch(h,{type:h,target:this,originalEvent:t.originalEvent,point:t.point,simulated:t.simulated})}}}_updateSize(){}_getBounds(){this._localBounds=this._display.getLocalBounds()}depth(){let t=this.parent,e=0;for(;;)if(t)++e,t=t.parent;else return e}markDirtySize(){this._sizeDirty=!0,this.markDirty()}markDirtyBounds(){let t=this._display;if(this.get("isMeasured")){this._root._addDirtyBounds(this),t.isMeasured=!0,t.invalidateBounds();let e=this.parent;e&&this.get("position")!="absolute"&&(e.get("width")==null||e.get("height")==null||e.get("layout"))&&e.markDirtyBounds(),this.get("focusable")&&this.markDirtyAccessibility()}}markDirtyAccessibility(){this._root._invalidateAccessibility(this)}markDirtyLayer(){this._display.markDirtyLayer(!0)}markDirty(){super.markDirty(),this.markDirtyLayer()}_updateBounds(){let t=this._adjustedLocalBounds,e;if(!this.get("visible")||!this.getPrivate("visible")||this.get("forceHidden")?(e={left:0,right:0,top:0,bottom:0},this._localBounds=e,this._adjustedLocalBounds=e):(this._getBounds(),this._fixMinBounds(this._localBounds),this.updatePivotPoint(),this._adjustedLocalBounds=this._display.getAdjustedBounds(this._localBounds),e=this._adjustedLocalBounds),!t||t.left!==e.left||t.top!==e.top||t.right!==e.right||t.bottom!==e.bottom){let i="boundschanged";this.events.isEnabled(i)&&this.events.dispatch(i,{type:i,target:this}),this.parent&&(this.parent.markDirty(),this.parent.markDirtyBounds()),this.getPrivate("showingTooltip")&&this.showTooltip(),this.get("focusable")&&this.markDirtyAccessibility()}}_fixMinBounds(t){let e=this.get("minWidth",this.getPrivate("minWidth")),i=this.get("minHeight",this.getPrivate("minHeight"));D(e)&&t.right-t.left<e&&(t.right=t.left+e),D(i)&&t.bottom-t.top<i&&(t.bottom=t.top+i);let r=this.getPrivate("width"),s=this.getPrivate("height");D(r)&&(r>0?t.right=t.left+r:t.left=t.right+r),D(s)&&(s>0?t.bottom=t.top+s:t.top=t.bottom+s)}_removeParent(t){t&&(t.children.removeValue(this),J(t._percentageSizeChildren,this),J(t._percentagePositionChildren,this))}_autoAppearReady(){return!0}_applyAutoAppear(){if(this.isDirty("autoAppear")&&!this.get("autoAppear")&&(this._appeared=!1),this._appearApplied||this._appeared||!this.get("autoAppear")||!this._autoAppearReady()||(this._appearApplied=!0,this._appeared=!0,this.get("visible")===!1||this.isHidden()||this.isShowing()))return;let t=this.get("appearDuration"),e=this.get("appearDelay",0);this._appearPending=!0,this.hide(0).then(()=>{let i=()=>{this._appearPending=!1,this.isDisposed()||(this.show(t),this._replayDeclaredAnimations())};e?this.setTimeout(i,e):i()})}_replayDeclaredAnimations(){let t=this.get("animations"),e=this.states.lookup("hidden");if(t&&e){let i=Object.keys(e._settings);t.some(r=>r.target!=="dataItem"&&i.indexOf(r.key)!==-1)&&this._playDeclaredAnimations()}}_clearDirty(){super._clearDirty(),this._appearApplied=!1,this._sizeDirty=!1}hover(){this.isDisposed()||(this.showTooltip(),this._handleOver())}unhover(){this.isDisposed()||(this.hideTooltip(),this._handleOut())}showTooltip(t){if(!this.isDisposed()){let e=this.getTooltip(),i=this.get("tooltipText"),r=this.get("tooltipHTML");if((i||r)&&e){let s=this.get("tooltipPosition"),n=this.getPrivate("tooltipTarget",this);if(s=="pointer"&&!t&&(t=this.getPrivate("lastTooltipCoords")),(s=="fixed"||!t)&&(this._display._setMatrix(),t=this.toGlobal(n._getTooltipPoint())),s=="pointer"){let h=this.getPrivate("lastTooltipCoords");if(h&&h.x==t.x&&h.y==t.y)return;this.setPrivate("lastTooltipCoords",t)}e.set("pointTo",t),e.set("tooltipTarget",n),e.get("x")||e.set("x",t.x),e.get("y")||e.set("y",t.y),i&&e.label.set("text",i),r&&e.label.set("html",r);let o=this.dataItem;if(o&&e.label._setDataItem(o),this.get("showTooltipOn")=="always"&&(t.x<0||t.x>this._root.width()||t.y<0||t.y>this._root.height())){this.hideTooltip();return}e.label.text.markDirtyText();let l=e.show();return this.setPrivateRaw("showingTooltip",!0),l}}}hideTooltip(){let t=this.getTooltip();if(t&&(this.removePrivate("lastTooltipCoords"),t.get("tooltipTarget")==this.getPrivate("tooltipTarget",this)||this.get("tooltip")==t)){let e=t.get("keepTargetHover")&&t.get("stateAnimationDuration",0)==0?400:void 0,i=t.hide(e);return this.setPrivateRaw("showingTooltip",!1),i}}_getTooltipPoint(){let t=this._localBounds;if(t){let e=0,i=0;return this.get("isMeasured")?(e=t.left+et(this.get("tooltipX",0),t.right-t.left),i=t.top+et(this.get("tooltipY",0),t.bottom-t.top)):(e=et(this.get("tooltipX",0),this.width()),i=et(this.get("tooltipY",0),this.height())),{x:e,y:i}}return{x:0,y:0}}getTooltip(){let t=this.get("tooltip");if(t)return t;{let e=this.parent;if(e)return e.getTooltip()}}_updatePosition(){let t=this.parent,e=this.get("dx",0),i=this.get("dy",0),r=this.get("x"),s=this.getPrivate("x"),n=0,o=0,l=this.get("position");r instanceof A&&(t?r=t.innerWidth()*r.value+t.get("paddingLeft",0):r=0),D(r)?n=r+e:s!=null?n=s:t&&l=="relative"&&(n=t.get("paddingLeft",0)+e);let h=this.get("y"),d=this.getPrivate("y");h instanceof A&&(t?h=t.innerHeight()*h.value+t.get("paddingTop",0):h=0),D(h)?o=h+i:d!=null?o=d:t&&l=="relative"&&(o=t.get("paddingTop",0)+i);let p=this._display;if(p.x!=n||p.y!=o){p.invalidateBounds(),p.x=n,p.y=o;let u="positionchanged";this.events.isEnabled(u)&&this.events.dispatch(u,{type:u,target:this})}this.getPrivate("showingTooltip")&&this.showTooltip()}x(){let t=this.get("x"),e=this.getPrivate("x"),i=this.parent;return i?t instanceof A?et(t,i.innerWidth())+i.get("paddingLeft",0):D(t)?t:e??i.get("paddingLeft",this._display.x):this._display.x}y(){let t=this.getPrivate("y");if(t!=null)return t;let e=this.get("y"),i=this.parent;return i?e instanceof A?et(e,i.innerHeight())+i.get("paddingTop",0):D(e)?e:t??i.get("paddingTop",this._display.y):this._display.y}_dispose(){super._dispose(),this._display.dispose(),this._removeTemplateField(),this._removeParent(this.parent),this._root._removeFocusElement(this);let t=this.get("tooltip");t&&t.dispose(),this.markDirty()}adjustedLocalBounds(){return this._fixMinBounds(this._adjustedLocalBounds),this._adjustedLocalBounds}localBounds(){return this._localBounds}bounds(){let t=this._adjustedLocalBounds,e=this.x(),i=this.y();return{left:t.left+e,right:t.right+e,top:t.top+i,bottom:t.bottom+i}}globalBounds(){return this._toGlobalBounds(this.localBounds())}_focusBounds(){return this.get("isMeasured")?this.globalBounds():this._toGlobalBounds(this._display.getContentBounds())}_toGlobalBounds(t){let e=this.toGlobal({x:t.left,y:t.top}),i=this.toGlobal({x:t.right,y:t.top}),r=this.toGlobal({x:t.right,y:t.bottom}),s=this.toGlobal({x:t.left,y:t.bottom});return{left:Math.min(e.x,i.x,r.x,s.x),top:Math.min(e.y,i.y,r.y,s.y),right:Math.max(e.x,i.x,r.x,s.x),bottom:Math.max(e.y,i.y,r.y,s.y)}}_onShow(t){}_onHide(t){}appear(t,e){return q(this,void 0,void 0,function*(){return this._appearPending=!0,yield this.hide(0),e?new Promise((i,r)=>{this.setTimeout(()=>{this._appearPending=!1,i(this.show(t))},e)}):(this._appearPending=!1,this.show(t))})}show(t){return q(this,void 0,void 0,function*(){if(!this._isShowing){this._isHidden=!1,this._isShowing=!0,this._isHiding=!1,this.states.lookup("default").get("visible")&&this._setC("visible",!0),this._onShow(t);let e=this.states.applyAnimate("default",t);yield ii(e),this._isShowing=!1}})}hide(t){return q(this,void 0,void 0,function*(){if(!this._isHiding&&!this._isHidden){this._isHiding=!0,this._isShowing=!1;let e=this.states.lookup("hidden");e||(e=this.states._createC("hidden",{opacity:0,visible:!1})),this._isHidden=!0,this._onHide(t);let i=this.states.applyAnimate("hidden",t);yield ii(i),this._isHiding=!1}})}isHidden(){return this._isHidden}isShowing(){return this._isShowing}isHiding(){return this._isHiding}isHover(){return this._display.hovering()}isFocus(){return this._root.focused(this)}isDragging(){return this._isDragging}isVisible(){return!!(this.get("visible")&&this.getPrivate("visible")&&!this.get("forceHidden"))}isVisibleDeep(){return this._parent?this._parent.isVisibleDeep()&&this.isVisible():this.isVisible()}compositeOpacity(){let t=this.get("opacity",1);return this._parent?this._parent.compositeOpacity()*t:t}compositeScale(){let t=this.get("scale",1);return this._parent?this._parent.compositeScale()*t:t}compositeRotation(){let t=this.get("rotation",0);return this._parent?this._parent.compositeRotation()+t:t}width(){let t=this.get("width"),e=this.get("maxWidth",this.getPrivate("maxWidth")),i=this.get("minWidth",this.getPrivate("minWidth")),r=this.getPrivate("width"),s=0;if(D(r))s=r;else if(t==null)this._adjustedLocalBounds&&(s=this._adjustedLocalBounds.right-this._adjustedLocalBounds.left);else if(t instanceof A){let n=this.parent;n?s=n.innerWidth()*t.value:s=this._root.width()*t.value}else D(t)&&(s=t);return D(i)&&(s=Math.max(i,s)),D(e)&&(s=Math.min(e,s)),s}maxWidth(){let t=this.get("maxWidth",this.getPrivate("maxWidth"));if(D(t))return t;{let i=this.get("width");if(D(i))return i}let e=this.parent;return e?e.innerWidth():this._root.width()}maxHeight(){let t=this.get("maxHeight",this.getPrivate("maxHeight"));if(D(t))return t;{let i=this.get("height");if(D(i))return i}let e=this.parent;return e?e.innerHeight():this._root.height()}height(){let t=this.get("height"),e=this.get("maxHeight",this.getPrivate("maxHeight")),i=this.get("minHeight",this.getPrivate("minHeight")),r=this.getPrivate("height"),s=0;if(D(r))s=r;else if(t==null)this._adjustedLocalBounds&&(s=this._adjustedLocalBounds.bottom-this._adjustedLocalBounds.top);else if(t instanceof A){let n=this.parent;n?s=n.innerHeight()*t.value:s=this._root.height()*t.value}else D(t)&&(s=t);return D(i)&&(s=Math.max(i,s)),D(e)&&(s=Math.min(e,s)),s}_findStaticTemplate(t){return this._templateField&&t(this._templateField)?this._templateField:super._findStaticTemplate(t)}_walkParents(t){(this._parent||this._virtualParent)&&this._walkParent(t)}_walkParent(t){this._parent?this._parent._walkParent(t):this._virtualParent&&this._virtualParent._walkParent(t),t(this)}set virtualParent(t){this._virtualParent!==t&&(this._virtualParent=t,this._applyThemes())}get parent(){return this._parent}_setParent(t,e=!1){let i=this._parent;t!==i&&(this.markDirtyBounds(),t.markDirty(),this._parent=t,e&&(this._removeParent(i),t&&(this._addPercentageSizeChildren(),this._addPercentagePositionChildren())),this.markDirtyPosition(),this._applyThemes())}getNumberFormatter(){return this.get("numberFormatter",this._root.numberFormatter)}getDateFormatter(){return this.get("dateFormatter",this._root.dateFormatter)}getDurationFormatter(){return this.get("durationFormatter",this._root.durationFormatter)}toGlobal(t){return this._display.toGlobal(t)}toLocal(t){return this._display.toLocal(t)}_getDownPoint(){let t=this._getDownPointId();if(t)return this._downPoints[t]}_getDownPointId(){if(this._downPoints)return Ai(this._downPoints,(t,e)=>t>e?1:t<e?-1:0)[0]}toFront(){let t=this.parent;t&&t.children.moveValue(this,t.children.length-1)}toBack(){let t=this.parent;t&&t.children.moveValue(this,0)}};N.className="Sprite";N.classNames=z.classNames.concat([N.className]);var xt=class extends z{constructor(){super(...arguments),this._display=this._root._renderer.makeGraphics(),this._backgroundDisplay=this._root._renderer.makeGraphics(),this._clear=!1}_afterNew(){super._afterNewApplyThemes()}get pattern(){return this._pattern}_draw(){}_beforeChanged(){super._beforeChanged(),(this.isDirty("repetition")||this.isDirty("width")||this.isDirty("height")||this.isDirty("rotation")||this.isDirty("strokeWidth")||this.isDirty("strokeDasharray")||this.isDirty("strokeDashoffset")||this.isDirty("colorOpacity")||this.isDirty("fillOpacity"))&&(this._clear=!0),this._checkDirtyFill()}_checkDirtyFill(){(this.isDirty("color")||this.isDirty("fill"))&&(this._clear=!0)}_changed(){if(super._changed(),this._clear){let t=this.get("repetition",""),e=this.get("width",100),i=this.get("height",100),r=this.get("fill"),s=this.get("fillOpacity",1),n=this._backgroundDisplay,o=this._display;o.clear(),n.clear(),r&&s>0&&(n.beginFill(r,s),n.drawRect(0,0,e,i),n.endFill()),o.angle=this.get("rotation",0),this._draw(),this._pattern=this._root._renderer.createPattern(o,n,t,e,i)}this._clear=!1}};xt.className="Pattern";xt.classNames=z.classNames.concat([xt.className]);var bt=class extends xt{_beforeChanged(){super._beforeChanged(),this._clear=!0,this.isDirty("src")&&this._load();let t=this.get("canvas");t&&(this.set("width",t.width),this.set("height",t.height))}_draw(){super._draw();let t=this.get("colorOpacity");t!==void 0&&(this._display.alpha=Math.max(0,t));let e=this._image;if(e){let r=this.get("width",100),s=this.get("height",100),n=this.get("fit","image"),o=0,l=0;n=="pattern"?(o=r,l=s,this.markDirty()):(o=e.width,l=e.height,n=="image"&&(this.set("width",o),this.set("height",l)));let h=this.get("centered",!0),d=0,p=0;h&&(d=r/2-o/2,p=s/2-l/2),this._display.image(e,o,l,d,p)}let i=this.get("canvas");i&&this._display.image(i,i.width,i.height,0,0)}_load(){let t=this.get("src");if(t){let e=new Image;e.src=t,e.decode().then(()=>{this._image=e,this.markDirty(),this.events.isEnabled("loaded")&&this.events.dispatch("loaded",{type:"loaded",target:this})}).catch(i=>{})}}};bt.className="PicturePattern";bt.classNames=xt.classNames.concat([bt.className]);var Ce;(function(a){a.ADD="lighter",a.COLOR="color",a.COLOR_BURN="color-burn",a.COLOR_DODGE="color-dodge",a.DARKEN="darken",a.DIFFERENCE="difference",a.DST_OVER="destination-over",a.EXCLUSION="exclusion",a.HARD_LIGHT="hard-light",a.HUE="hue",a.LIGHTEN="lighten",a.LUMINOSITY="luminosity",a.MULTIPLY="multiply",a.NORMAL="source-over",a.OVERLAY="overlay",a.SATURATION="saturation",a.SCREEN="screen",a.SOFT_LIGHT="soft-light",a.SRC_ATOP="source-atop",a.XOR="xor"})(Ce||(Ce={}));var ra=["fill","fillOpacity","stroke","strokeWidth","strokeOpacity","fillPattern","strokePattern","fillGradient","strokeGradient","strokeDasharray","strokeDashoffset","shadowBlur","shadowColor","shadowOpacity","shadowOffsetX","shadowOffsetY","blur","sepia","invert","brightness","hue","contrast","saturate"],st=class extends N{constructor(){super(...arguments),this._display=this._root._renderer.makeGraphics(),this._clear=!1}_beforeChanged(){if(super._beforeChanged(),(this.isDirty("draw")||this.isDirty("svgPath"))&&this.markDirtyBounds(),(this.isDirty("fill")||this.isDirty("stroke")||this.isDirty("visible")||this.isDirty("forceHidden")||this.isDirty("scale")||this.isDirty("fillGradient")||this.isDirty("strokeGradient")||this.isDirty("fillPattern")||this.isDirty("strokePattern")||this.isDirty("fillOpacity")||this.isDirty("strokeOpacity")||this.isDirty("strokeWidth")||this.isDirty("draw")||this.isDirty("blendMode")||this.isDirty("strokeDasharray")||this.isDirty("strokeDashoffset")||this.isDirty("svgPath")||this.isDirty("lineJoin")||this.isDirty("lineCap")||this.isDirty("shadowColor")||this.isDirty("shadowBlur")||this.isDirty("shadowOffsetX")||this.isDirty("shadowOffsetY")||this.isDirty("shadowOpacity"))&&(this._clear=!0),this._display.crisp=this.get("crisp",!1),this.isDirty("fillGradient")){let t=this.get("fillGradient");if(t){this._display.isMeasured=!0;let e=t.get("target");e&&(this._disposers.push(e.events.on("boundschanged",()=>{this._markDirtyKey("fill")})),this._disposers.push(e.events.on("positionchanged",()=>{this._markDirtyKey("fill")})))}}if(this.isDirty("strokeGradient")){let t=this.get("strokeGradient");if(t){this._display.isMeasured=!0;let e=t.get("target");e&&(this._disposers.push(e.events.on("boundschanged",()=>{this._markDirtyKey("stroke")})),this._disposers.push(e.events.on("positionchanged",()=>{this._markDirtyKey("stroke")})))}}}_changed(){if(super._changed(),this._clear){this.markDirtyBounds(),this.markDirtyLayer(),this._display.clear();let t=this.get("strokeDasharray");D(t)&&(t<.5?t=[0]:t=[t]),this._display.setLineDash(t);let e=this.get("strokeDashoffset");e&&this._display.setLineDashOffset(e);let i=this.get("blendMode",Ce.NORMAL);this._display.blendMode=i;let r=this.get("draw");r&&typeof r=="function"&&r(this._display,this);let s=this.get("svgPath");s!=null&&this._display.svgPath(s)}}_afterChanged(){if(super._afterChanged(),this._clear){let t=this.get("fill"),e=this.get("fillGradient"),i=this.get("fillPattern"),r=this.get("fillOpacity"),s=this.get("stroke"),n=this.get("strokeGradient"),o=this.get("strokePattern"),l=this.get("shadowColor"),h=this.get("shadowBlur"),d=this.get("shadowOffsetX"),p=this.get("shadowOffsetY"),u=this.get("shadowOpacity");if(l&&(h||d||p)&&this._display.shadow(l,h,d,p,u),t&&!e&&(this._display.beginFill(t,r),this._display.endFill()),e){if(t){let m=e.get("stops",[]);m.length&&y(m,g=>{(!g.color||g.colorInherited)&&t&&(g.color=t,g.colorInherited=!0),(g.opacity==null||g.opacityInherited)&&(g.opacity=r,g.opacityInherited=!0)})}let c=e.getFill(this);c&&(this._display.beginFill(c,r),this._display.endFill())}if(i){let c=i.pattern;c&&(this._display.beginFill(c,r),this._display.endFill(),i instanceof bt&&i.events.once("loaded",()=>{this._clear=!0,this.markDirty()}))}if(s||n||o){let c=this.get("strokeOpacity"),m=this.get("strokeWidth",1);this.get("nonScalingStroke")&&(m=m/this.get("scale",1)),this.get("crisp")&&(m/=this._root._renderer.resolution);let g=this.get("lineJoin"),v=this.get("lineCap");if(s&&!n&&(this._display.lineStyle(m,s,c,g,v),this._display.endStroke()),n){let _=n.get("stops",[]);_.length&&y(_,w=>{(!w.color||w.colorInherited)&&s&&(w.color=s,w.colorInherited=!0),(w.opacity==null||w.opacityInherited)&&(w.opacity=c,w.opacityInherited=!0)});let f=n.getFill(this);f&&(this._display.lineStyle(m,f,c,g,v),this._display.endStroke())}if(o){let _=o.pattern;_&&(this._display.lineStyle(m,_,c,g,v),this._display.endStroke(),o instanceof bt&&o.events.once("loaded",()=>{this._clear=!0,this.markDirty()}))}}if(this.getPrivate("showingTooltip")&&this.showTooltip(),this.get("focusable")&&!this.get("isMeasured")){let c=this.getPrivate("focusElement");c&&(this._root.focused(this)||c.dom.getAttribute("aria-hidden")=="true"==this._root._hasFocusSize(this))&&this.markDirtyAccessibility()}}this._clear=!1}};st.className="Graphics";st.classNames=N.classNames.concat([st.className]);var mt=class extends st{_afterNew(){super._afterNew(),this._display.isMeasured=!0,this.setPrivateRaw("trustBounds",!0)}_beforeChanged(){super._beforeChanged(),(this.isDirty("width")||this.isDirty("height")||this.isPrivateDirty("width")||this.isPrivateDirty("height")||this.isDirty("containStroke"))&&(this._clear=!0)}_changed(){super._changed(),this._clear&&!this.get("draw")&&this._draw()}_draw(){let t=this.width(),e=this.height(),i=0,r=0,s=t/Math.abs(t),n=e/Math.abs(e);if(this.get("containStroke",!1)){let o=this.get("strokeWidth",0);t-=o*s,e-=o*n,i+=o/2*s,r+=o/2*n}this._display.drawRect(i,r,t,e)}_updateSize(){this.markDirty(),this._clear=!0}};mt.className="Rectangle";mt.classNames=st.classNames.concat([mt.className]);function Q(a,t){a.get("reverseChildren",!1)?a.children.eachReverse(t):a.children.each(t)}function Gt(a,t,e){let i=a.get("paddingLeft",0),s=a.get("width")!=null||a.getPrivate("width")!=null?i+a.innerWidth():e,n=i+s;for(let o=0;o<t.length;o++){let l=t[o];l.child.setPrivate("x",n-l.x-l.right-l.left)}}var G=class extends z{};G.className="Layout";G.classNames=z.classNames.concat([G.className]);var Dt=class extends G{updateContainer(t){let e=t.get("paddingLeft",0),i=t.innerWidth(),r=0;Q(t,l=>{if(l.isVisible()&&l.get("position")=="relative"){let h=l.get("width");if(h instanceof A){r+=h.value;let d=i*h.value,p=l.get("minWidth",l.getPrivate("minWidth",-1/0));p>d&&(i-=p,r-=h.value);let u=l.get("maxWidth",l.getPrivate("maxWidth",1/0));d>u&&(i-=u,r-=h.value)}else D(h)||(h=l.width()),i-=h+l.get("marginLeft",0)+l.get("marginRight",0)}}),(i<=0||i==1/0)&&(i=.1),Q(t,l=>{if(l.isVisible()&&l.get("position")=="relative"){let h=l.get("width");if(h instanceof A){let d=i*h.value/r-l.get("marginLeft",0)-l.get("marginRight",0),p=l.get("minWidth",l.getPrivate("minWidth",-1/0)),u=l.get("maxWidth",l.getPrivate("maxWidth",1/0));d=Math.min(Math.max(p,d),u),l.setPrivate("width",d)}else l._prevSettings.width instanceof A&&l.setPrivate("width",void 0)}});let s=e,n=t._isRtl(),o=[];Q(t,l=>{if(l.get("position")=="relative")if(l.isVisible()){let h=l.adjustedLocalBounds(),d=l.get("marginLeft",0),p=l.get("marginRight",0),u=l.get("maxWidth"),c=h.left,m=h.right;u&&m-c>u&&(m=c+u);let g=s+d-c;n?o.push({child:l,x:g,left:c,right:m}):l.setPrivate("x",g),s=g+m+p}else l.setPrivate("x",void 0)}),n&&Gt(t,o,s)}};Dt.className="HorizontalLayout";Dt.classNames=G.classNames.concat([Dt.className]);var ci=new WeakSet,Tt=class extends G{updateContainer(t){let e=t.get("paddingTop",0),i=t.innerHeight(),r=0;Q(t,d=>{if(d.isVisible()&&d.get("position")=="relative"){let p=d.get("height");if(p instanceof A){r+=p.value;let u=i*p.value,c=d.get("minHeight",d.getPrivate("minHeight",-1/0));c>u&&(i-=c,r-=p.value);let m=d.get("maxHeight",d.getPrivate("maxHeight",1/0));u>m&&(i-=m,r-=p.value)}else D(p)||(p=d.height()),i-=p+d.get("marginTop",0)+d.get("marginBottom",0)}}),(i<=0||i==1/0)&&(i=.1),Q(t,d=>{if(d.isVisible()&&d.get("position")=="relative"){let p=d.get("height");if(p instanceof A){let u=i*p.value/r-d.get("marginTop",0)-d.get("marginBottom",0),c=d.get("minHeight",d.getPrivate("minHeight",-1/0)),m=d.get("maxHeight",d.getPrivate("maxHeight",1/0));u=Math.min(Math.max(c,u),m),d.setPrivate("height",u)}else d._prevSettings.height instanceof A&&d.setPrivate("height",void 0)}});let s=e,n=t._isRtl(),o=t.get("paddingLeft",0),l=[],h=o;Q(t,d=>{if(d.get("position")=="relative")if(d.isVisible()){let p=d.adjustedLocalBounds();d.get("x")==null&&(n?(l.push({child:d,x:o,left:p.left,right:p.right}),h=Math.max(h,o+p.right),ci.add(d)):ci.has(d)&&(ci.delete(d),d.setPrivate("x",void 0)));let u=d.get("marginTop",0),c=p.top,m=p.bottom,g=d.get("maxHeight");g&&m-c>g&&(m=c+g);let v=d.get("marginBottom",0),_=s+u-c;d.setPrivate("y",_),s=_+m+v}else d.setPrivate("y",void 0)}),l.length&&Gt(t,l,h)}};Tt.className="VerticalLayout";Tt.classNames=G.classNames.concat([Tt.className]);var lt=class extends G{_afterNew(){this._setRawDefault("maxColumns",Number.MAX_VALUE),super._afterNew()}updateContainer(t){let e=t.get("paddingLeft",0),i=t.get("paddingRight",0),r=t.get("paddingTop",0),s=t.maxWidth()-e-i,n=s,o=1;Q(t,_=>{if(_.get("visible")&&_.getPrivate("visible")&&!_.get("forceHidden")&&_.get("position")!="absolute"){let f=_.width();f<n&&(n=f),f>o&&(o=f)}}),n=xe(n,1,s),o=xe(o,1,s);let l=1;this.get("fixedWidthGrid")?l=s/o:l=s/n,l=Math.max(1,Math.floor(l)),l=Math.min(this.get("maxColumns",Number.MAX_VALUE),l);let h=this.getColumnWidths(t,l,o,s),d=r,p=0,u=0;l=h.length;let c=e,m=t._isRtl(),g=[],v=e;Q(t,_=>{if(_.get("position")=="relative"&&_.isVisible()){let f=_.get("marginTop",0),w=_.get("marginBottom",0),k=_.adjustedLocalBounds(),S=_.get("marginLeft",0),E=_.get("marginRight",0),F=c+S-k.left,U=d+f-k.top;m?g.push({child:_,x:F,left:k.left,right:k.right}):_.setPrivate("x",F),_.setPrivate("y",U),c+=h[p]+E,v=Math.max(v,c),u=Math.max(u,_.height()+f+w),p++,p>=l&&(p=0,c=e,d+=u,u=0)}}),m&&Gt(t,g,v)}getColumnWidths(t,e,i,r){let s=0,n=[],o=0;return Q(t,l=>{let h=l.adjustedLocalBounds();l.get("position")!="absolute"&&l.isVisible()&&(this.get("fixedWidthGrid")?n[o]=i:n[o]=Math.max(n[o]|0,h.right-h.left+l.get("marginLeft",0)+l.get("marginRight",0)),o<t.children.length-1&&(o++,o==e&&(o=0)))}),y(n,l=>{s+=l}),s>r?e>2?(e-=1,this.getColumnWidths(t,e,i,r)):[r]:n}};lt.className="GridLayout";lt.classNames=G.classNames.concat([lt.className]);var Kt=class{static escape(t){return t.replace(/\[\[/g,this.prefix+"1").replace(/([^\/\]]{1})\]\]/g,"$1"+this.prefix+"2").replace(/\]\]/g,this.prefix+"2").replace(/\{\{/g,this.prefix+"3").replace(/\}\}/g,this.prefix+"4").replace(/\'\'/g,this.prefix+"5")}static unescape(t){return t.replace(new RegExp(this.prefix+"1","g"),"[[").replace(new RegExp(this.prefix+"2","g"),"]]").replace(new RegExp(this.prefix+"3","g"),"{{").replace(new RegExp(this.prefix+"4","g"),"}}").replace(new RegExp(this.prefix+"5","g"),"''")}static cleanUp(t){return t.replace(/\[\[/g,"[").replace(/\]\]/g,"]").replace(/\{\{/g,"{").replace(/\}\}/g,"}").replace(/\'\'/g,"'")}static chunk(t,e=!1,i=!1){let r=[];t=this.escape(t);let s=e?t.split("'"):[t];for(let n=0;n<s.length;n++){let o=s[n];if(o!=="")if(n%2===0){o=o.replace(/\]\[/g,"]"+Xe+"["),o=o.replace(/\[\]/g,"[ ]");let l=o.split(/[\[\]]+/);for(let h=0;h<l.length;h++){let d=this.cleanUp(this.unescape(l[h]));d!==Xe&&d!==""&&(h%2===0?r.push({type:"value",text:d}):r.push({type:i?"value":"format",text:"["+d+"]"}))}}else{let l=o.split(/[\[\]]+/);for(let h=0;h<l.length;h++){let d=this.cleanUp(this.unescape(l[h]));d!==""&&(h%2===0?r.push({type:"text",text:d}):this.isImage(d)?r.push({type:"image",text:"["+d+"]"}):r.push({type:"format",text:"["+d+"]"}))}}}return r}static isImage(t){return!!t.match(/img[ ]?:/)}static getTextStyle(t){let e={};if(t==""||t=="[ ]")return{};let i=t.match(/('[^']*')|("[^"]*")/gi);if(i)for(let s=0;s<i.length;s++)t=t.replace(i[s],i[s].replace(/['"]*/g,"").replace(/[ ]+/g,"+"));t=t.replace(/,\s+/g,",");let r=t.match(/([\w\-]*:[\s]?[^;\s\]]*)|(\#[\w]{1,6})|([\w\-]+)|(\/)/gi);if(!r)return{};for(let s=0;s<r.length;s++)if(r[s].match(/^(normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900)$/i))e.fontWeight=r[s];else if(r[s].match(/^(underline|line-through)$/i))e.textDecoration=r[s];else if(r[s]!="/")if(!r[s].match(/:/))e.fill=P.fromString(r[s]);else{let n=r[s].replace(/\+/g," ").split(/:[ ]*/);e[n[0]]=n[1]}return e}};Kt.prefix="__amcharts__";function Yt(a,t){if(t!=null){t=""+t,t=Kt.escape(t);let e=t.match(/\{([^}]+)\}/g),i;if(e)for(i=0;i<e.length;i++){let r=e[i].replace(/\{([^}]+)\}/,"$1"),s=fi(a,r,"");s==null&&(s=""),t=t.split(e[i]).join(s)}t=Kt.unescape(t)}else t="";return t}function fi(a,t,e){let i,r=a.dataItem,s=[],n=/(format[a-zA-Z]*)\((.*)\)|([^.]+)/g,o;for(;o=n.exec(t),o!==null;)if(o[3]){s.push({prop:o[3]});let l=a.getDateFormatter().get("dateFields",[]),h=a.getNumberFormatter().get("numericFields",[]),d=a.getDurationFormatter().get("durationFields",[]);l.indexOf(o[3])!==-1?s.push({method:"formatDate",params:[]}):h.indexOf(o[3])!==-1?s.push({method:"formatNumber",params:[]}):d.indexOf(o[3])!==-1&&s.push({method:"formatDuration",params:[]})}else{let l=[];if(Li(o[2])!=""){let h=/'([^']*)'|"([^"]*)"|([0-9\-]+)/g,d;for(;d=h.exec(o[2]),d!==null;)l.push(d[1]||d[2]||d[3])}s.push({method:o[1],params:l})}if(r){i=It(a,s,r._settings),(i==null||Ye(i))&&(i=It(a,s,r));let l=r.dataContext;i==null&&l&&(i=It(a,s,l),i==null&&(i=It(a,[{prop:t}],l)),i==null&&l.dataContext&&(i=It(a,s,l.dataContext))),i==null&&r.component&&r.component.dataItem!==r&&(i=fi(r.component,t,e))}return i==null&&(i=It(a,s,a)),i==null&&a.parent&&(i=fi(a.parent,t,e)),i}function ir(a,t){let e=a.getPrivate("customData");if(Ye(e))return e[t]}function It(a,t,e,i){let r=e,s=!1;for(let n=0,o=t.length;n<o;n++){let l=t[n];if(l.prop){if(r instanceof N){let h=r.get(l.prop);h==null&&(h=r.getPrivate(l.prop)),h==null&&(h=ir(r,l.prop)),h==null&&(h=r[l.prop]),r=h}else if(r.get){let h=r.get(l.prop);h==null&&(h=r[l.prop]),r=h}else r=r[l.prop];if(r==null)return}else switch(l.method){case"formatNumber":let h=Ge(r);h!=null&&(r=a.getNumberFormatter().format(h,i||l.params[0]||void 0),s=!0);break;case"formatDate":let d=ki(r);if(!Ke(d)||Pi(d.getTime()))return;d!=null&&(r=a.getDateFormatter().format(d,i||l.params[0]||void 0),s=!0);break;case"formatDuration":let p=Ge(r);p!=null&&(r=a.getDurationFormatter().format(p,i||l.params[0]||void 0,l.params[1]||void 0),s=!0);break;case"urlEncode":case"encodeURIComponent":r=encodeURIComponent(r);break;default:r[l.method]&&r[l.method].apply(e,l.params);break}}if(!s){let n=[{method:"",params:i}];if(i==null)D(r)?(n[0].method="formatNumber",n[0].params=""):Ke(r)&&(n[0].method="formatDate",n[0].params="");else{let o=Oi(i);o==="number"?n[0].method="formatNumber":o==="date"?n[0].method="formatDate":o==="duration"&&(n[0].method="formatDuration")}n[0].method&&(r=It(a,n,r))}return r}var Re=class extends ct{constructor(t){super(),this._disposed=!1,this._container=t,this._events=this.events.onAll(e=>{if(e.type==="clear")y(e.oldValues,i=>{this._onRemoved(i)});else if(e.type==="push")this._onInserted(e.newValue);else if(e.type==="setIndex")this._onRemoved(e.oldValue),this._onInserted(e.newValue,e.index);else if(e.type==="insertIndex")this._onInserted(e.newValue,e.index);else if(e.type==="removeIndex")this._onRemoved(e.oldValue);else if(e.type==="moveIndex")this._onRemoved(e.value),this._onInserted(e.value,e.newIndex);else throw new Error("Unknown IListEvent type")})}_onInserted(t,e){t._setParent(this._container,!0);let i=this._container._childrenDisplay;e===void 0?i.addChild(t._display):i.addChildAt(t._display,e)}_onRemoved(t){this._container._childrenDisplay.removeChild(t._display),this._container.markDirtyBounds(),this._container.markDirty()}isDisposed(){return this._disposed}dispose(){this._disposed||(this._disposed=!0,this._events.dispose(),y(this.values,t=>{t.dispose()}))}};var L=class a extends N{constructor(){super(...arguments),this._display=this._root._renderer.makeContainer(),this._childrenDisplay=this._root._renderer.makeContainer(),this.children=new Re(this),this._percentageSizeChildren=[],this._percentagePositionChildren=[],this._prevWidth=0,this._prevHeight=0,this._contentWidth=0,this._contentHeight=0,this._childrenPrep=!1,this._childrenUpdt=!1}_afterNew(){super._afterNew(),this._display.addChild(this._childrenDisplay)}_setDefaultTagged(t,e,i){let r=this._setDefaultFn(t,i),s=r;return s.set("themeTags",Ni(s.get("themeTags",[]),e)),r}_afterChanged(){super._afterChanged(),this._childrenPrep=!1,this._childrenUpdt=!1}_dispose(){gt(this.allChildren(),t=>{t.dispose()}),this.getPrivate("htmlElement")&&this._root._removeHTMLContent(this),super._dispose()}_beforeChanged(){this._childrenPrep||this._prepareChildren(),this._childrenUpdt||this._updateChildren(),super._beforeChanged()}_changed(){if(super._changed(),this.isDirty("interactiveChildren")&&(this._display.interactiveChildren=this.get("interactiveChildren",!1)),this.isDirty("layout")&&(this._prevWidth=0,this._prevHeight=0,this.markDirtyBounds(),this._prevSettings.layout&&this.children.each(t=>{t.removePrivate("x"),t.removePrivate("y")})),this.isDirty("direction")&&(this.markDirtyBounds(),this.children.each(t=>{t.markDirtyBounds()})),(this.isDirty("paddingTop")||this.isDirty("paddingBottom")||this.isDirty("paddingLeft")||this.isDirty("paddingRight"))&&(this.children.each(t=>{t.markDirtyPosition()}),this.markDirtyBounds()),this.isDirty("maskContent")){let t=this._childrenDisplay,e=this._contentMask;this.get("maskContent")?e||(e=mt.new(this._root,{x:-.5,y:-.5,width:this.width()+1,height:this.height()+1}),this._contentMask=e,t.addChildAt(e._display,0),t.mask=e._display):e&&(t.removeChild(e._display),t.mask=null,e.dispose(),this._contentMask=void 0)}}_updateSize(){super._updateSize(),y(this._percentageSizeChildren,t=>{t._updateSize()}),y(this._percentagePositionChildren,t=>{t.markDirtyPosition(),t._updateSize()}),this.updateBackground()}updateBackground(){let t=this.get("background"),e=this._localBounds;if(e&&!this.isHidden()){let i=e.left,r=e.top,s=e.right-i,n=e.bottom-r,o=this.get("maxWidth"),l=this.get("maxHeight");l&&n>l&&(n=l),o&&s>o&&(s=o);let h=this.width(),d=this.height();this.get("scale",1)!=1&&(this.get("width")==null&&this.getPrivate("width")==null&&(h=s),this.get("height")==null&&this.getPrivate("height")==null&&(d=n)),t&&(t._setCAll({width:s,height:n,x:i,y:r}),this._display.interactive&&(t._display.interactive=!0));let p=this._contentMask;p&&p.setAll({width:h+1,height:d+1});let u=this.get("verticalScrollbar");if(u){u._setC("height",d),u._setC("x",h-u.width()-u.get("marginRight",0));let c=Math.min(1,d/this._contentHeight),m=Math.max(0,1-c),g=u.get("start",0);g>m&&(g=m,u._setC("start",g)),u._setC("end",g+c);let v=u.get("background");v&&v._setCAll({width:u.width(),height:d});let _=!0;this._contentHeight<=d&&(_=!1),u.setPrivate("visible",_)}}}_applyThemes(t=!1){return super._applyThemes(t)?(this.eachChildren(e=>{e._applyThemes(t)}),!0):!1}_applyState(t){super._applyState(t),this.get("setStateOnChildren")&&this.eachChildren(e=>{e.states.apply(t)})}_applyStateAnimated(t,e){super._applyStateAnimated(t,e),this.get("setStateOnChildren")&&this.eachChildren(i=>{i.states.applyAnimate(t,e)})}innerWidth(){return this.width()-this.get("paddingRight",0)-this.get("paddingLeft",0)}innerHeight(){return this.height()-this.get("paddingTop",0)-this.get("paddingBottom",0)}_getBounds(){if(this.get("html")){let t=this._localBounds;t&&(this._contentWidth=t.right-t.left,this._contentHeight=t.bottom-t.top)}else{let t=this.get("width"),e=this.get("height"),i=this.getPrivate("width"),r=this.getPrivate("height"),s={left:0,top:0,right:this.width(),bottom:this.height()},n=this.get("layout"),o=!1,l=!1;if((n instanceof Dt||n instanceof lt)&&(o=!0),n instanceof Tt&&(l=!0),!((t!=null||i!=null)&&(e!=null||r!=null)&&!this.get("verticalScrollbar"))){let h=Number.MAX_VALUE,d=h,p=-h,u=h,c=-h,m=this.get("paddingLeft",0),g=this.get("paddingTop",0),v=this.get("paddingRight",0),_=this.get("paddingBottom",0),f=o&&this._isRtl();this.children.each(S=>{if(S.get("position")!="absolute"&&S.get("isMeasured")&&S.isVisible()){let E=S.adjustedLocalBounds(),F=S.x(),U=S.y(),M=F+E.left,W=F+E.right,H=U+E.top,O=U+E.bottom;o&&(M-=S.get(f?"marginRight":"marginLeft",0),W+=S.get(f?"marginLeft":"marginRight",0)),l&&(H-=S.get("marginTop",0),O+=S.get("marginBottom",0)),M<d&&(d=M),W>p&&(p=W),H<u&&(u=H),O>c&&(c=O)}}),d==h&&(d=0),p==-h&&(p=0),u==h&&(u=0),c==-h&&(c=0),s.left=d-m,s.top=u-g,s.right=p+v,s.bottom=c+_;let w=this.get("minWidth");D(w)&&w>0&&s.right-s.left<w&&(s.right>=w?s.left=s.right-w:s.right=s.left+w);let k=this.get("minHeight");D(k)&&k>0&&s.bottom-s.top<k&&(s.bottom>=k?s.top=s.bottom-k:s.bottom=s.top+k)}this._contentWidth=s.right-s.left,this._contentHeight=s.bottom-s.top,D(t)&&(s.left=0,s.right=t),D(i)&&(s.left=0,s.right=i),D(e)&&(s.top=0,s.bottom=e),D(r)&&(s.top=0,s.bottom=r),this._localBounds=s}}_isRtl(){let t=this.get("direction");if(t)return t=="rtl";let e=this.parent,i=this.get("themeTagsSelf");return this.isType("Legend")?this._root.settings.direction=="rtl":e&&e.isType("Legend")&&i&&i.indexOf("itemcontainer")!=-1?e._isRtl():!1}_updateBounds(){let t=this.get("layout");t&&t.updateContainer(this),super._updateBounds(),this.updateBackground()}markDirty(){super.markDirty(),this._root._addDirtyParent(this)}_prepareChildren(){this._applyDeclaredAnimations(),this._applyAutoAppear(),this._childrenPrep=!0;let t=this.innerWidth(),e=this.innerHeight();if(t!=this._prevWidth||e!=this._prevHeight){let i=this.get("layout"),r=!1,s=!1;i&&((i instanceof Dt||i instanceof lt)&&(r=!0),i instanceof Tt&&(s=!0)),y(this._percentageSizeChildren,n=>{if(!r){let o=n.get("width");o instanceof A&&n.setPrivate("width",o.value*t)}if(!s){let o=n.get("height");o instanceof A&&n.setPrivate("height",o.value*e)}}),y(this._percentagePositionChildren,n=>{n.markDirtyPosition(),n.markDirtyBounds()}),this._prevWidth=t,this._prevHeight=e,this._sizeDirty=!0,this.updateBackground()}}_updateHTMLContent(){let t=this.get("html","");t&&t!==""?this._root._setHTMLContent(this,Yt(this,t)):this._root._removeHTMLContent(this),this._root._positionHTMLElement(this)}scrollToChild(t){let e=this.get("verticalScrollbar");if(e){let i=t.y(),r=this.innerHeight(),s=t.height(),n=this._contentHeight,o=Math.max(0,1-this.height()/n);if(i+s*.7+this._childrenDisplay.y>r||i-s*.3+this._childrenDisplay.y<0){let l=Math.max(0,Math.min(o,(i-s/2)/n));e.animate({key:"start",to:l,duration:e.get("animationDuration",0),easing:e.get("animationEasing")})}}}_nameForExport(t){let e=super._nameForExport(t);return this.children.each(i=>{i._nameForExport(e)}),e}_updateChildren(){if(this._childrenUpdt=!0,this.isDirty("html")&&this._updateHTMLContent(),this.isDirty("verticalScrollbar")){let t=this.get("verticalScrollbar");if(t){if(t._setParent(this),t.startGrip.setPrivate("visible",!1),t.endGrip.setPrivate("visible",!1),!this._scrollbarRestore){let e=i=>this.isUserSetting(i)&&!this.isComputedSetting(i);this._scrollbarRestore={maskContent:e("maskContent")?this.get("maskContent"):void 0,paddingRight:e("paddingRight")?this.get("paddingRight"):void 0}}this._setC("maskContent",!0),this._setC("paddingRight",t.width()+t.get("marginRight",0)+t.get("marginLeft",0)),this._setDefaultTagged("background",["background"],()=>mt.new(this._root,{fillOpacity:0,fill:this._root.interfaceColors.get("alternativeBackground")})._markC("fillOpacity","fill")),this._vsbd0=this.events.on("wheel",e=>{let i=e.originalEvent;if(Ii(i,this))i.preventDefault();else return;let r=i.deltaY/5e3,s=t.get("start",0),n=t.get("end",1);s+r<=0&&(r=-s),n+r>=1&&(r=1-n),s+r>=0&&n+r<=1&&(t._setC("start",s+r),t._setC("end",n+r))}),this._disposers.push(this._vsbd0),this._vsbd1=t.events.on("rangechanged",()=>{let e=this._contentHeight,i=this._childrenDisplay,r=this._contentMask;i.y=-t.get("start",0)*e,i.markDirtyLayer(),r&&(r._display.y=-i.y,i.mask=r._display)}),this._disposers.push(this._vsbd1),this._display.addChild(t._display)}else{let e=this._prevSettings.verticalScrollbar;if(e){this._display.removeChild(e._display),this._vsbd0&&(this._vsbd0.dispose(),$t(this._disposers,this._vsbd0),this._vsbd0=void 0),this._vsbd1&&(this._vsbd1.dispose(),$t(this._disposers,this._vsbd1),this._vsbd1=void 0);let i=this._childrenDisplay;i.y=0,this.setPrivate("height",void 0);let r=this._scrollbarRestore||{};this._scrollbarRestore=void 0,this.isComputedSetting("maskContent")&&(r.maskContent!=null?this.set("maskContent",r.maskContent):this.remove("maskContent")),this.isComputedSetting("paddingRight")&&(r.paddingRight!=null?this.set("paddingRight",r.paddingRight):this.remove("paddingRight"))}}}if(this.isDirty("background")){let t=this._prevSettings.background;t&&this._display.removeChild(t._display);let e=this.get("background");e instanceof N&&(e._setC("isMeasured",!1),e._setParent(this),e.get("templateField")&&e._processTemplateField(),this._display.addChildAt(e._display,0),e instanceof mt&&!e.isUserSetting("crisp")&&e._setC("crisp",!0))}if(this.isDirty("mask")){let t=this.get("mask"),e=this._prevSettings.mask;if(e&&(this._display.removeChild(e._display),e!=t&&e.dispose()),t){let i=t.parent;i&&i.children.removeValue(t),t._setParent(this),this._display.addChildAt(t._display,0),this._childrenDisplay.mask=t._display}else this._childrenDisplay.mask=this._contentMask?this._contentMask._display:null}}_processTemplateField(){super._processTemplateField(),this.children.each(t=>{t._processTemplateField()})}walkChildren(t){this.children.each((e,i)=>{e instanceof a&&e.walkChildren(t),t(e,i)})}eachChildren(t){let e=this.get("background");e&&t(e);let i=this.get("verticalScrollbar");i&&t(i);let r=this.get("mask");r&&t(r),this.children.values.forEach(s=>{t(s)})}allChildren(){let t=[];return this.eachChildren(e=>{t.push(e)}),t}_setDataItem(t){let e=t!==this._dataItem;super._setDataItem(t);let i=this.get("background");i&&i.get("templateField")&&i._processTemplateField();let r=this.get("html","");r&&r!==""&&e&&this._root._setHTMLContent(this,Yt(this,r))}contentWidth(){return this._contentWidth}contentHeight(){return this._contentHeight}};L.className="Container";L.classNames=N.classNames.concat([L.className]);var ht=class extends N{constructor(){super(...arguments),this.textStyle=this._root._renderer.makeTextStyle(),this._display=this._root._renderer.makeText("",this.textStyle),this._textStyles=["textAlign","fontFamily","fontSize","fontStyle","fontWeight","fontStyle","fontVariant","textDecoration","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","shadowOpacity","lineHeight","baselineRatio","direction","textBaseline","oversizedBehavior","breakWords","ellipsis","minScale","maxChars"]}_updateBounds(){if(this.get("text")){super._updateBounds();let t=this.get("fillGradient");t&&(this._display.style.fill=t.getFill(this))}else{let t={left:0,right:0,top:0,bottom:0};this._adjustedLocalBounds=t}}_changed(){super._changed(),this._display.clear();let t=this.textStyle;if(this.isDirty("opacity")){let i=this.get("opacity",1);this._display.alpha=i}if((this.isDirty("text")||this.isDirty("populateText"))&&(this._display.text=this._getText(),this.markDirtyBounds(),this.get("role")=="tooltip"&&this._root.updateTooltip(this)),this.isPrivateDirty("tooltipElement")&&this.getPrivate("tooltipElement")&&this._disposers.push(new _t(()=>{this._root._removeTooltipElement(this)})),this.isDirty("width")&&(t.wordWrapWidth=this.width(),this.markDirtyBounds()),this.isDirty("oversizedBehavior")&&(t.oversizedBehavior=this.get("oversizedBehavior","none"),this._display.invalidateVisibility(),this.markDirtyBounds()),this.isDirty("breakWords")&&(t.breakWords=this.get("breakWords",!1),this.markDirtyBounds()),this.isDirty("ellipsis")&&(t.ellipsis=this.get("ellipsis"),this.markDirtyBounds()),this.isDirty("ignoreFormatting")&&(t.ignoreFormatting=this.get("ignoreFormatting",!1),this.markDirtyBounds()),this.isDirty("minScale")&&(t.minScale=this.get("minScale",0),this.markDirtyBounds()),this.isDirty("fill")||this.isDirty("fillGradient")){let i=this.get("fill"),r=this.get("fillGradient"),s=this.get("fillOpacity");if(r){if(i){let n=r.get("stops",[]);n.length&&y(n,o=>{(!o.color||o.colorInherited)&&i&&(o.color=i,o.colorInherited=!0),(o.opacity==null||o.opacityInherited)&&(o.opacity=s,o.opacityInherited=!0)})}t.fill=r.getFill(this)}else i&&(t.fill=i)}this.isDirty("fillOpacity")&&(t.fillOpacity=this.get("fillOpacity",1)),(this.isDirty("maxWidth")||this.isPrivateDirty("maxWidth"))&&(t.maxWidth=this.get("maxWidth",this.getPrivate("maxWidth")),this.markDirtyBounds()),(this.isDirty("maxHeight")||this.isPrivateDirty("maxHeight"))&&(t.maxHeight=this.get("maxHeight",this.getPrivate("maxHeight")),this.markDirtyBounds()),y(this._textStyles,i=>{this._dirty[i]&&(t[i]=this.get(i),this.markDirtyBounds())});let e=this._direction();t.direction!==e&&(t.direction=e,this.markDirtyBounds()),t.fontSize=this.get("fontSize"),t.fontFamily=this.get("fontFamily"),this._display.style=t,this.isDirty("role")&&this.get("role")=="tooltip"&&this._root.updateTooltip(this)}_getText(){let t=this.get("text","");return this.get("maxChars")&&(t=Ei(t,this.get("maxChars",1e8),this.get("breakWords"),this.get("ellipsis"))),this.get("populateText")?Yt(this,t):t}_getAccessibleText(){let t=this.get("ariaLabel");return t!==void 0?this.get("populateText")?Yt(this,t):t:this._getText()}_drawnBounds(){let t=this.localBounds(),e=this._display,i=e._textInfo,r=t.left,s=t.right;if(i&&i.length&&e.textVisible&&s>r){let n=0,o=0;y(i,d=>{n=Math.max(n,d.left),o=Math.max(o,d.right)});let l=this.get("textAlign"),h=this._direction()=="rtl"&&l!="left"&&l!="right";r=h?-o:-n,s=h?n:o,s>r||(r=t.left,s=t.right)}return{left:r,right:s,top:t.top,bottom:t.bottom}}_direction(){return this.get("direction")||this._root._direction()}_drawnGlobalBounds(){return this._toGlobalBounds(this._drawnBounds())}markDirtyText(){this._display.text=this._getText(),this.get("role")=="tooltip"&&this._root.updateTooltip(this),this.markDirtyBounds(),this.markDirty()}_setDataItem(t){super._setDataItem(t),this.get("populateText")&&this.markDirtyText()}getNumberFormatter(){return this.parent?this.parent.getNumberFormatter():super.getNumberFormatter()}getDateFormatter(){return this.parent?this.parent.getDateFormatter():super.getDateFormatter()}getDurationFormatter(){return this.parent?this.parent.getDurationFormatter():super.getDurationFormatter()}};ht.className="Text";ht.classNames=N.classNames.concat([ht.className]);var K=class extends L{constructor(){super(...arguments),this._textKeys=["text","fill","fillGradient","fillOpacity","textAlign","fontFamily","fontSize","fontStyle","fontWeight","fontStyle","fontVariant","textDecoration","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","shadowOpacity","lineHeight","baselineRatio","direction","textBaseline","oversizedBehavior","breakWords","ellipsis","minScale","populateText","role","ignoreFormatting","maxChars","ariaLabel"]}get text(){return this._text}_afterNew(){super._afterNew(),this._makeText(),y(this._textKeys,t=>{let e=this._getTextKeyValue(t);e!=null&&this._text.set(t,e)}),this.get("html","")!==""&&this._text.set("text",""),this.onPrivate("maxWidth",()=>{this._setMaxDimentions()}),this.onPrivate("maxHeight",()=>{this._setMaxDimentions()})}_makeText(){this._text=this.children.push(ht.new(this._root,{}))}_getTextKeyValue(t){if((t==="fontFamily"||t==="fontSize"||t==="fontWeight")&&!this.isUserSetting(t)){let e=this._root.settings[t];if(e!=null)return e}return this.get(t)}_updateChildren(){super._updateChildren();let t=this._text;y(this._textKeys,r=>{this._text.set(r,this._getTextKeyValue(r))}),(this.isDirty("maxWidth")||this.isDirty("maxHeight")||this.isDirty("rotation")||this.isDirty("paddingLeft")||this.isDirty("paddingRight")||this.isDirty("paddingTop")||this.isDirty("paddingBottom"))&&this._setMaxDimentions(),this.get("html","")!==""?(t.set("text",""),this.isDirty("text")&&!this.isDirty("html")&&this._updateHTMLContent()):(t.set("text",this.get("text")),this._maybeUpdateHTMLColor()),(this.isDirty("fill")||this.isDirty("fillGradient"))&&this._maybeUpdateHTMLColor();let e=t._direction()=="rtl";if(this.isDirty("textAlign")||this.isDirty("width")||this.isDirty("direction")||e!==this._rtlPlaced){this._rtlPlaced=e;let r=this.get("textAlign"),s;this.get("width")!=null?r=="center"?s=C:r=="right"||r=="end"&&!e||e&&r!="left"&&r!="end"?s=R:s=0:r=="left"||r=="start"?s=this.get("paddingLeft",0):(r=="right"||r=="end")&&(s=-this.get("paddingRight",0)),t.set("x",s)}let i=this.get("background");i&&i.setPrivate("visible",t._display.textVisible)}_maybeUpdateHTMLColor(){let t=this.getPrivate("htmlElement");t&&this.get("fill")&&(t.style.color=this.get("fill").toCSSHex())}_setMaxDimentions(){let t=nt(this.get("rotation",0)),e=t==90||t==270,i=this._text,r=this.get("paddingLeft",0)+this.get("paddingRight",0),s=this.get("paddingTop",0)+this.get("paddingBottom",0),n=this.get("maxWidth",this.getPrivate("maxWidth",1/0));D(n)?i.set(e?"maxHeight":"maxWidth",n-(e?s:r)):i.set(e?"maxHeight":"maxWidth",void 0);let o=this.get("maxHeight",this.getPrivate("maxHeight",1/0));D(o)?i.set(e?"maxWidth":"maxHeight",o-(e?r:s)):i.set(e?"maxWidth":"maxHeight",void 0),this.root.events.once("frameended",()=>{i.markDirtyBounds()})}_setDataItem(t){super._setDataItem(t),this._markDirtyKey("text"),this._markDirtyKey("html");let e=this._text;e.get("populateText")&&e.markDirtyText();let i=this.get("html");i&&i!==""&&this._updateHTMLContent()}getText(){return this._text._getText()}getAccessibleText(){return this._text._getAccessibleText()}};K.className="Label";K.classNames=L.classNames.concat([K.className]);var Se=class extends ct{incrementRef(){}decrementRef(){}_onPush(t){this.processor&&this.processor.processRow(t),super._onPush(t)}_onInsertIndex(t,e){this.processor&&this.processor.processRow(e),super._onInsertIndex(t,e)}_onSetIndex(t,e,i){this.processor&&this.processor.processRow(i),super._onSetIndex(t,e,i)}},is=class{constructor(t){this._value=t}incrementRef(){}decrementRef(){}};var re=class extends se{constructor(t,e,i){super(i),this.dataContext=e,this.component=t,this._settings.visible=!0,this._checkDirty()}markDirty(){this.component.markDirtyValues(this)}_startAnimation(){this.component._root._addAnimation(this)}_animationTime(){return this.component._root.animationTime}_dispose(){this.component&&this.component.disposeDataItem(this),super._dispose()}show(t){this.setRaw("visible",!0),this.component&&this.component.showDataItem(this,t)}hide(t){this.setRaw("visible",!1),this.component&&this.component.hideDataItem(this,t)}isHidden(){return!this.get("visible")}},wt=class extends L{constructor(){super(...arguments),this._data=new Se,this._dataItems=[],this._mainDataItems=this._dataItems,this.valueFields=[],this.fields=["id"],this._valuesDirty=!1,this._dataChanged=!1,this._dataGrouped=!1,this.inited=!1}_dataItemName(t,e){}set data(t){t.incrementRef(),this._data.decrementRef(),this._data=t}get data(){return this._data}_dispose(){super._dispose(),this._data.decrementRef()}_onDataClear(){}_afterNew(){super._afterNew(),this._data.incrementRef(),this._updateFields(),this._disposers.push(this.data.events.onAll(t=>{let e=this._mainDataItems;if(this.markDirtyValues(),this._markDirtyGroup(),this._dataChanged=!0,t.type==="clear")y(e,i=>{i.dispose()}),e.length=0,this._onDataClear();else if(t.type==="push"){let i=new re(this,t.newValue,this._makeDataItem(t.newValue));e.push(i),this.processDataItem(i)}else if(t.type==="setIndex"){let i=e[t.index],r=this._makeDataItem(t.newValue);i.bullets&&i.bullets.length==0&&(i.bullets=void 0),Ut(r).forEach(([s,n])=>{i.get(s)!=n&&i.animate({key:s,to:n,duration:this.get("interpolationDuration",0),easing:this.get("interpolationEasing")})}),i.dataContext=t.newValue,this._processTemplateFields(i)}else if(t.type==="insertIndex"){let i=new re(this,t.newValue,this._makeDataItem(t.newValue));e.splice(t.index,0,i),this.processDataItem(i)}else if(t.type==="removeIndex")e[t.index].dispose(),e.splice(t.index,1);else if(t.type==="moveIndex"){let i=e[t.oldIndex];e.splice(t.oldIndex,1),e.splice(t.newIndex,0,i)}else throw new Error("Unknown IStreamEvent type");this._afterDataChange()}))}_processTemplateFields(t){I(t._settings,(e,i)=>{i instanceof N&&i.dataItem===t&&i._processTemplateField()}),y(t.bullets||[],e=>{let i=e.get("sprite");i&&i._processTemplateField()})}_postUpdateData(){}updateData(t){let e=-1;y(t,(i,r)=>{let s=this.dataItems[r];if(!s)this.data.push(i);else{let n=s.dataContext;n&&Ut(i).forEach(([l,h])=>{n[l]=h}),this._processTemplateFields(s);let o=this._makeDataItem(n);Ut(o).forEach(([l,h])=>{var d;if(s.get(l)!=h){s.set(l,h);let p=(d=this._valueFieldsF[l])===null||d===void 0?void 0:d.workingKey;p&&s.set(p,h)}})}e=r});for(let i=this.dataItems.length-1;i>e;i--){let r=this.dataItems[i];$t(this.dataItems,r),r.dispose()}this._postUpdateData()}_updateFields(){this.valueFields&&(this._valueFields=[],this._valueFieldsF={},y(this.valueFields,t=>{this.get(t+"Field")&&(this._valueFields.push(t),this._valueFieldsF[t]={fieldKey:t+"Field",workingKey:t+"Working"})})),this.fields&&(this._fields=[],this._fieldsF={},y(this.fields,t=>{this.get(t+"Field")&&(this._fields.push(t),this._fieldsF[t]=t+"Field")}))}get dataItems(){return this._dataItems}processDataItem(t){}_makeDataItem(t){let e={};return this._valueFields&&y(this._valueFields,i=>{let r=this.get(this._valueFieldsF[i].fieldKey);e[i]=t[r],e[this._valueFieldsF[i].workingKey]=e[i]}),this._fields&&y(this._fields,i=>{let r=this.get(this._fieldsF[i]);e[i]=t[r]}),e}makeDataItem(t,e){let i=new re(this,e,t);return this.processDataItem(i),i}pushDataItem(t,e){let i=this.makeDataItem(t,e);return this._mainDataItems.push(i),i}disposeDataItem(t){}showDataItem(t,e){return q(this,void 0,void 0,function*(){t.set("visible",!0)})}hideDataItem(t,e){return q(this,void 0,void 0,function*(){t.set("visible",!1)})}_clearDirty(){super._clearDirty(),this._valuesDirty=!1}_afterDataChange(){}_afterChanged(){if(super._afterChanged(),this._dataChanged){let t="datavalidated";this.events.isEnabled(t)&&this.events.dispatch(t,{type:t,target:this}),this._dataChanged=!1}if(this._valuesDirty){let t="valueschanged";this.events.isEnabled(t)&&this.events.dispatch(t,{type:t,target:this})}this.inited=!0}markDirtyValues(t){this.markDirty(),this._valuesDirty=!0}_markDirtyGroup(){this._dataGrouped=!1}markDirtySize(){this._sizeDirty=!0,this.markDirty()}getDataItemById(t){return Ft(this.dataItems,e=>e.get("id")==t)}};wt.className="Component";wt.classNames=L.classNames.concat([wt.className]);var ls={};je(ls,{add:()=>nr,checkChange:()=>ns,chooseInterval:()=>os,copy:()=>ar,getDateIntervalDuration:()=>sr,getDuration:()=>tt,getIntervalDuration:()=>rs,getNextUnit:()=>ss,getTime:()=>rr,getUnitValue:()=>hr,now:()=>as,roun:()=>lr,round:()=>Lt,sleep:()=>mi,timeUnitDurations:()=>$e});function mi(a){return new Promise((t,e)=>{setTimeout(t,a)})}var $e={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:365.242/12*864e5,year:31536e6};function ss(a){switch(a){case"year":return;case"month":return"year";case"week":return"month";case"day":return"month";case"hour":return"day";case"minute":return"hour";case"second":return"minute";case"millisecond":return"second"}}function tt(a,t){return t==null&&(t=1),$e[a]*t}function rs(a){return a?$e[a.timeUnit]*a.count:0}function sr(a,t,e,i,r){let s=a.timeUnit,n=a.count;if(s=="hour"||s=="minute"||s=="second"||s=="millisecond")return $e[a.timeUnit]*a.count;{let o=Lt(new Date(t.getTime()),s,n,e,i,void 0,r).getTime(),l=o+n*tt(s)*1.05;return l=Lt(new Date(l),s,1,e,i,void 0,r).getTime(),l-o}}function as(){return new Date}function rr(){return as().getTime()}function ar(a){return new Date(a.getTime())}function ns(a,t,e,i,r){if(t-a>tt(e,1.2))return!0;let s=new Date(a),n=new Date(t),o=i;r&&!i&&(s=new Date(a-Math.round(r.offsetUTC(s)*6e4)),n=new Date(t-Math.round(r.offsetUTC(n)*6e4)),o=!0);let l=0,h=0;!o&&e!="millisecond"&&(l=s.getTimezoneOffset(),s.setUTCMinutes(s.getUTCMinutes()-l),h=n.getTimezoneOffset(),n.setUTCMinutes(n.getUTCMinutes()-h));let d=!1;switch(e){case"year":s.getUTCFullYear()!=n.getUTCFullYear()&&(d=!0);break;case"month":(s.getUTCFullYear()!=n.getUTCFullYear()||s.getUTCMonth()!=n.getUTCMonth())&&(d=!0);break;case"day":(s.getUTCMonth()!=n.getUTCMonth()||s.getUTCDate()!=n.getUTCDate())&&(d=!0);break;case"hour":s.getUTCHours()!=n.getUTCHours()&&(d=!0);break;case"minute":s.getUTCMinutes()!=n.getUTCMinutes()&&(d=!0);break;case"second":s.getUTCSeconds()!=n.getUTCSeconds()&&(d=!0);break;case"millisecond":s.getTime()!=n.getTime()&&(d=!0);break}if(d)return d;let p=ss(e);return p?ns(a,t,p,i,r):!1}function nr(a,t,e,i,r){if(r&&!i)return or(a,t,e,r);let s=0;switch(!i&&t!="millisecond"&&(s=a.getTimezoneOffset(),a.setUTCMinutes(a.getUTCMinutes()-s)),t){case"day":let n=a.getUTCDate();a.setUTCDate(n+e);break;case"second":let o=a.getUTCSeconds();a.setUTCSeconds(o+e);break;case"millisecond":let l=a.getUTCMilliseconds();a.setUTCMilliseconds(l+e);break;case"hour":let h=a.getUTCHours();a.setUTCHours(h+e);break;case"minute":let d=a.getUTCMinutes();a.setUTCMinutes(d+e);break;case"year":let p=a.getUTCFullYear();a.setUTCFullYear(p+e);break;case"month":let u=a.getUTCDate(),c=new Date(a.getUTCFullYear(),a.getUTCMonth(),0).getUTCDate(),m=a.getUTCMonth();u>c?a.setUTCMonth(m+e,c):a.setUTCMonth(m+e);break;case"week":let g=a.getUTCDate();a.setUTCDate(g+e*7);break}if(!i&&t!="millisecond"&&(a.setUTCMinutes(a.getUTCMinutes()+s),t=="day"||t=="week"||t=="month"||t=="year")){let n=a.getTimezoneOffset();if(n!=s){let o=n-s;a.setUTCMinutes(a.getUTCMinutes()+o),a.getTimezoneOffset()!=n&&a.setUTCMinutes(a.getUTCMinutes()-o)}}return a}function or(a,t,e,i){let r=a.getTime();if(isNaN(r))return a;if(t!="day"&&t!="week"&&t!="month"&&t!="year")return a.setTime(r+tt(t,e)),a;let s=Math.round(i.offsetUTC(a)*6e4),n=new Date(r-s);switch(t){case"day":n.setUTCDate(n.getUTCDate()+e);break;case"week":n.setUTCDate(n.getUTCDate()+e*7);break;case"month":let h=n.getUTCDate(),d=new Date(ti(n.getUTCFullYear(),n.getUTCMonth(),0,0,0,0,0)).getUTCDate();h>d?n.setUTCMonth(n.getUTCMonth()+e,d):n.setUTCMonth(n.getUTCMonth()+e);break;case"year":n.setUTCFullYear(n.getUTCFullYear()+e);break}let o=n.getTime()+s,l=Math.round(i.offsetUTC(new Date(o))*6e4);if(l!=s){o=n.getTime()+l;let h=Math.round(i.offsetUTC(new Date(o))*6e4);h!=l&&(o=n.getTime()+Math.max(l,h))}return a.setTime(o),a}function lr(a,t,e,i,r){let s;return r!=null&&(s=new Date(r)),Lt(new Date(a),t,e,i.locale.firstDayOfWeek,i.utc,s,i.timezone).getTime()}function Lt(a,t,e,i,r,s,n){if(!n||r){let o=0;switch(!r&&t!="millisecond"&&(o=a.getTimezoneOffset(),a.setUTCMinutes(a.getUTCMinutes()-o)),t){case"day":let l=a.getUTCDate();if(e>1){if(s){s=Lt(s,"day",1);let _=a.getTime()-s.getTime(),f=Math.floor(_/tt("day")/e),w=tt("day",f*e);a.setTime(s.getTime()+w-o*tt("minute"))}}else a.setUTCDate(l);a.setUTCHours(0,0,0,0);break;case"second":let h=a.getUTCSeconds();e>1&&(h=Math.floor(h/e)*e),a.setUTCSeconds(h,0);break;case"millisecond":if(e==1)return a;let d=a.getUTCMilliseconds();d=Math.floor(d/e)*e,a.setUTCMilliseconds(d);break;case"hour":let p=a.getUTCHours();e>1&&(p=Math.floor(p/e)*e),a.setUTCHours(p,0,0,0);break;case"minute":let u=a.getUTCMinutes();e>1&&(u=Math.floor(u/e)*e),a.setUTCMinutes(u,0,0);break;case"month":let c=a.getUTCMonth();e>1&&(e==2||e==3||e==4||e==6)&&(c=Math.floor(c/e)*e),a.setUTCMonth(c,1),a.setUTCHours(0,0,0,0);break;case"year":let m=a.getUTCFullYear();e>1&&(m=Math.floor(m/e)*e),a.setUTCFullYear(m,0,1),a.setUTCHours(0,0,0,0);break;case"week":if(e>1&&s){s=Lt(s,"week",1);let _=a.getTime()-s.getTime(),f=Math.floor(_/tt("week")/e),w=tt("week",f*e);a.setTime(s.getTime()+w-o*tt("minute"))}let g=a.getUTCDate(),v=a.getUTCDay();D(i)||(i=1),v>=i?g=g-v+i:g=g-(7+v)+i,a.setUTCDate(g),a.setUTCHours(0,0,0,0);break}if(!r&&t!="millisecond"&&(a.setUTCMinutes(a.getUTCMinutes()+o),t=="day"||t=="week"||t=="month"||t=="year")){let l=a.getTimezoneOffset();if(l!=o){let h=l-o;a.setUTCMinutes(a.getUTCMinutes()+h)}}return a}else{if(isNaN(a.getTime()))return a;let o=a.getTime(),l=n.offsetUTC(a),h=n.parseDate(a),d=h.year,p=h.month,u=h.day,c=h.hour,m=h.minute,g=h.second,v=h.millisecond,_=h.weekday,f=l;switch(t){case"day":if(e>1&&s){s=Lt(s,"day",1,i,r,void 0,n);let E=a.getTime()-s.getTime(),F=Math.floor(E/tt("day")/e),U=tt("day",F*e);a.setTime(s.getTime()+U),h=n.parseDate(a),d=h.year,p=h.month,u=h.day}c=0,m=f,g=0,v=0;break;case"second":m+=f,e>1&&(g=Math.floor(g/e)*e),v=0;break;case"millisecond":m+=f,e>1&&(v=Math.floor(v/e)*e);break;case"hour":e>1&&(c=Math.floor(c/e)*e),m=f,g=0,v=0;break;case"minute":e>1&&(m=Math.floor(m/e)*e),m+=f,g=0,v=0;break;case"month":e>1&&(p=Math.floor(p/e)*e),u=1,c=0,m=f,g=0,v=0;break;case"year":e>1&&(d=Math.floor(d/e)*e),p=0,u=1,c=0,m=f,g=0,v=0;break;case"week":D(i)||(i=1),_>=i?u=u-_+i:u=u-(7+_)+i,c=0,m=f,g=0,v=0;break}a=new Date(ti(d,p,u,c,m,g,v));let w=a.getTime(),k=36e5;t=="hour"&&(k=36e5*e),w+k<=o&&(t=="hour"||t=="minute"||t=="second"||t=="millisecond")&&(a=new Date(w+k));let S=n.offsetUTC(a);return S!=f&&a.setTime(a.getTime()+(S-f)*6e4),a}}function os(a,t,e,i){let r=i[a],s=rs(r),n=i.length-1;if(a>=n)return Object.assign({},i[n]);let o=Math.ceil(t/s);return t<s&&a>0?Object.assign({},i[a-1]):o<=e?Object.assign({},i[a]):a+1<i.length?os(a+1,t,e,i):Object.assign({},i[a])}function hr(a,t){switch(t){case"day":return a.getDate();case"second":return a.getSeconds();case"millisecond":return a.getMilliseconds();case"hour":return a.getHours();case"minute":return a.getMinutes();case"month":return a.getMonth();case"year":return a.getFullYear();case"week":return Hi(a)}}function qa(a,t,e,i=.01){let r=a.isComputedSetting(t);if(e==null){if(r)return a.remove(t),!0}else if(r||!a.isUserSetting(t)){let s=a.get(t);if(D(e)&&D(s)?Math.abs(s-e)>i:s!==e)return a._setC(t,e),!0}return!1}function hs(a){let t=a._display._textInfo||[],e={widest:0,width:0,tallest:0,height:0,count:t.length};return y(t,i=>{e.widest=Math.max(e.widest,i.width),e.width+=i.width,e.tallest=Math.max(e.tallest,i.height),e.height+=i.height}),e}function ds(a,t){a._passTimer||(a._passTimer=a._rootContainer.setTimeout(()=>{a._passTimer=void 0,a._passRound++,a._addDirtyEntity(a._rootContainer)},Math.max(0,t)))}function dr(a){return[a.get("fontSize"),a.get("fontFamily"),a.get("fontWeight"),a.root._fontLoads].join()}function us(a,t){return a.left<t.right-.5&&t.left<a.right-.5&&a.top<t.bottom-.5&&t.top<a.bottom-.5}function ps(a,t){return a.left>=t.left-1&&a.right<=t.right+1&&a.top>=t.top-1&&a.bottom<=t.bottom+1}var Ae=class{constructor(){this.out={},this._suspects={},this._next={}}check(t,e,i,r){let s=t.uid,n=this.out[s];if(!n&&(!e||i(e)))return 0;let o=r?t.text._getText():t.text._display.text,l=dr(t);if(n&&n.font!==l)return delete this.out[s],-1;let h=t.x(),d=t.y();if(t.get("textType")=="circular"){let v=t.radius(),_=t.get("labelAngle",0);h=v*Z(_),d=v*X(_)}let p=t.parent,u=p?p.toGlobal({x:h,y:d}):{x:h,y:d},c=t.text.localBounds(),m=c.right-c.left,g=c.bottom-c.top;if(n){let v=u.x-n.x,_=u.y-n.y;if(e={left:n.box.left+v,right:n.box.right+v,top:n.box.top+_,bottom:n.box.bottom+_},o===n.text)m=n.w,g=n.h;else{if(delete this.out[s],!(m>0&&g>0&&n.w>0&&n.h>0))return-1;let f=t.get("rotation",0),w=Math.abs(X(f))>Math.abs(Z(f)),k=w?g/n.h:m/n.w,S=w?m/n.w:g/n.h;e={left:u.x+(e.left-u.x)*k,right:u.x+(e.right-u.x)*k,top:u.y+(e.top-u.y)*S,bottom:u.y+(e.bottom-u.y)*S}}if(i(e))return delete this.out[s],-1}else{let v=this._suspects[s];if(!v||Math.abs(v.x-u.x)>=.5||Math.abs(v.y-u.y)>=.5)return this._next[s]=u,0}return this.out[s]={label:t,box:e,x:u.x,y:u.y,text:o,w:m,h:g,font:l},n?0:1}end(){return I(this.out,(t,e)=>{e.label.isDisposed()&&delete this.out[t]}),this._suspects=this._next,this._next={},at(this._suspects).length>0}};var gi=class{constructor(){this._cells={}}hits(t){let e=!1;return this._cellsOf(t,i=>{let r=this._cells[i];!e&&r&&(e=Ze(r,s=>us(t,s)))}),e}add(t){this._cellsOf(t,e=>{(this._cells[e]||(this._cells[e]=[])).push(t)})}_cellsOf(t,e){if(!isFinite(t.left)||!isFinite(t.right)||!isFinite(t.top)||!isFinite(t.bottom))return;let i=64,r=Math.floor(t.right/i),s=Math.floor(t.bottom/i);for(let n=Math.floor(t.left/i);n<=r;n++)for(let o=Math.floor(t.top/i);o<=s;o++)e(n+","+o)}},cs=["fill","fillGradient","fillPattern","stroke","strokeGradient"];function ur(a,t){let e=t.length-1;if(e<1)return t[0];let i=(a>0?Math.min(1,a):0)*e,r=Math.min(Math.floor(i),e-1),s=t[r],n=t[r+1],o=i-r;if(D(s))return s+(n-s)*o;if(s instanceof P)return P.interpolate(o,s,n);if(s instanceof A)return si(o,s,n)}var ae=class extends wt{constructor(){super(...arguments),this._aggregatesCalculated=!1,this._selectionAggregatesCalculated=!1,this._dataProcessed=!1,this._baseSeriesDirty=!1,this._passFrames=0,this._passTime=0,this.bullets=new ct,this.bulletsContainer=L.new(this._root,{width:R,height:R,position:"absolute"})._markC("width","height","position")}_exportName(){let t=this.get("name");return t!=null&&t!==""?String(t):Fi(this.className)}_dataItemName(t,e){let i=t,r=t.dataContext,s;Ci(["name","category","categoryX","categoryY"],o=>{let l=i.get(o);return l!=null&&l!==""?(s=String(l),!1):!0}),s===void 0&&r&&r.name!=null&&r.name!==""&&(s=String(r.name)),s===void 0&&i.get("id")!=null&&i.get("id")!==""&&(s=String(i.get("id")));let n={Label:"label",RadialLabel:"label",Tick:"tick"}[e.className];return s!==void 0&&n?s+" "+n:s}_afterNew(){this.valueFields.push("value","customValue"),this.fields.push("url"),super._afterNew(),this.setPrivate("customData",{}),this._disposers.push(this.bullets.events.onAll(()=>{this._handleBullets(this.dataItems)}))}_dispose(){this.bulletsContainer.dispose(),super._dispose()}_eachBulletLabel(t){let e=this.dataItems,i=e.length,r=this.startIndex(),s=this.endIndex();r>0&&r--,s<i&&s++;let n=(o,l)=>{o instanceof K?t(o,l):o instanceof L&&o.children.each(h=>n(h,l))};for(let o=r;o<s;o++){let l=e[o].bullets;l&&y(l,h=>{let d=h.get("sprite");d&&!d.isDisposed()&&n(d,h)})}}_bulletLabelShown(t,e){if(t.isDisposed())return!1;if(t.isComputedSetting("forceHidden")){if(!t.get("visible")||!t.getPrivate("visible"))return!1}else if(!t._display.visible)return!1;let i=t.parent;return!i||!this._bulletDrawn(i,e)||t.get("opacity",1)<=0?!1:t.text._display.text!==""||t.get("html","")!==""}_bulletDrawn(t,e){let i=e[t.uid];if(i===void 0){let r=t.parent;i=t._display.visible&&(!r||this._bulletDrawn(r,e)),e[t.uid]=i}return i}_bulletLabelBox(t){let e=t,i=e._arcGlobalBounds?e._arcGlobalBounds():void 0;return i||(i=t.text._drawnGlobalBounds(),(t.get("html","")!==""||i.right-i.left>0&&t.get("background"))&&(i=t.globalBounds())),i.right-i.left>0&&i.bottom-i.top>0?i:void 0}_fitBulletLabels(){let t=this.chart,e=t&&t.series?t.series.values:[this];if(e.indexOf(this)<0&&(e=[this]),Ft(e,o=>!o.isDisposed()&&o.get("autoLabels",!1))!==this)return;let i=this._root.container.globalBounds();if(!this._passDue(e,[i.left,i.top,i.right,i.bottom,this._root._fontLoads].join()))return;let r=new gi,s={},n={};y([!1,!0],o=>{y(e,l=>{!l.isDisposed()&&l.get("autoLabels",!1)==o&&l._fitOwnBulletLabels(r,i,n,s)})})}_fitOwnBulletLabels(t,e,i,r){let s=this.get("autoLabels")?this._labelFit:void 0;if(!this.bullets.length){this._releaseBulletLabels();return}let n=d=>{let p=d.parent;if(!p)return e;let u=i[p.uid];if(!u){u=e;for(let c=p;c;c=c.parent)if(c.get("maskContent")){let m=c.toGlobal({x:0,y:0}),g=c.toGlobal({x:c.width(),y:c.height()});u={left:Math.max(e.left,Math.min(m.x,g.x)),right:Math.min(e.right,Math.max(m.x,g.x)),top:Math.max(e.top,Math.min(m.y,g.y)),bottom:Math.min(e.bottom,Math.max(m.y,g.y))};break}i[p.uid]=u}return u},o,l=d=>{let p=ps(d,n(o))&&!t.hits(d);return p&&t.add(d),p};this._eachBulletLabel((d,p)=>{let u=this._bulletLabelShown(d,r),c=!1;if(s&&s.out[d.uid]&&(d.isComputedSetting("forceHidden")?c=!0:delete s.out[d.uid]),!u)return;if(p._moving()){c&&(d.remove("forceHidden"),delete s.out[d.uid]);return}let m=c?void 0:this._bulletLabelBox(d);if(!s||p.get("stacked")||d.isUserSetting("forceHidden")&&!d.isComputedSetting("forceHidden")){m&&t.add(m);return}o=d;let g=s.check(d,m,l);g>0?d._setC("forceHidden",!0):g<0&&(d.remove("forceHidden"),this._passFrames=Math.max(this._passFrames,2))});let h=o;s&&s.end()&&h&&(h.markDirty(),this._passFrames=Math.max(this._passFrames,1))}_passDue(t,e){let i=0;y(t,s=>{i=Math.max(i,s._passFrames),s._passFrames=Math.max(0,s._passFrames-1)});let r=Date.now();return e+="|"+this._root._passRound,i>0||e!==this._passKey||r-this._passTime>=500?(this._passKey=e,this._passTime=r,!0):(ds(this._root,500-(r-this._passTime)),!1)}_releaseBulletLabels(){let t=this._labelFit;if(t){for(let e in t.out){let i=t.out[e].label;!i.isDisposed()&&i.isComputedSetting("forceHidden")&&i.remove("forceHidden")}t.out={}}}startIndex(){let t=this.dataItems.length;return Math.min(this.getPrivate("startIndex",0),t)}endIndex(){let t=this.dataItems.length;return Math.max(0,Math.min(this.getPrivate("endIndex",t),t))}_handleBullets(t){y(t,e=>{let i=e.bullets;i&&(y(i,r=>{r.dispose()}),e.bullets=void 0)}),this.markDirtyValues()}_makeBullets(t){this._shouldMakeBullet(t)&&(t.bullets=[],this.bullets.each(e=>{this._makeBullet(t,e)}))}_shouldMakeBullet(t){return!0}_makeBullet(t,e,i){let r=e(this._root,this,t);return r&&(r._index=i,this._makeBulletReal(t,r)),r}_getBulletContainer(t){return this.bulletsContainer}_makeBulletReal(t,e){let i=e.get("sprite");i&&(i._setDataItem(t),i.setRaw("position","absolute"),this._applyBulletDefaultPaint(i,t),this._linkSprite(i,t),this._getBulletContainer(t).children.push(i)),e.series=this,t.bullets.push(e)}_linkSprite(t,e){let i=!1,r=s=>{s&&!i&&(i=!0,t.events.on("click",()=>{this.openUrl(e)})),!(t.isUserSetting("cursorOverStyle")&&!t.isComputedSetting("cursorOverStyle"))&&(s?t._setC("cursorOverStyle","pointer"):t.get("cursorOverStyle")=="pointer"&&t.remove("cursorOverStyle"))};r(e.get("url")),t.addDisposer(e.on("url",s=>r(s)))}openUrl(t){let e=t.get("url");if(e&&!/^(javascript|data|vbscript):/i.test(String(e).replace(/[\s\x00-\x1f]/g,""))){let i=this.get("linkTarget","_self");window.open(e,i,i=="_blank"?"noopener":void 0)}}_applyBulletDefaultPaint(t,e){if(t.isType("Graphics")&&t.get("fill")==null&&t.get("fillGradient")==null&&t.get("fillPattern")==null&&t.get("stroke")==null&&t.get("strokeGradient")==null){let r=e?e.get("fill"):void 0;r!=null?(t.set("fill",r),t.set("fillGradient",this.get("fillGradient")),t.set("fillPattern",this.get("fillPattern")),t.set("stroke",this.get("stroke")),t.set("strokeGradient",this.get("strokeGradient"))):t._addBaseTemplate(this._getBulletPaint())}}_getBulletPaint(){return this._bulletPaint||(this._bulletPaint=Jt.new({}),this._syncBulletPaint()),this._bulletPaint}_syncBulletPaint(){let t=this._bulletPaint;t&&y(cs,e=>{let i=this.get(e);i!=null?t._setC(e,i):t.remove(e)})}addBullet(t,e){t.bullets||(t.bullets=[]),e&&this._makeBulletReal(t,e)}_autoAppearReady(){return this.dataItems.length>0}_clearDirty(){super._clearDirty(),this._aggregatesCalculated=!1,this._baseSeriesDirty=!1,this._selectionAggregatesCalculated=!1}_prepareChildren(){super._prepareChildren(),this._passFrames=3,this.get("autoLabels")&&!this._labelFit&&(this._labelFit=new Ae,this._disposers.push(this._root.events.on("frameended",()=>{this.get("autoLabels")?this._fitBulletLabels():this._releaseBulletLabels()}))),this._bulletPaint&&Ze(cs,n=>this.isDirty(n))&&this._syncBulletPaint();let t=this.dataItems,e=t.length,i=this.startIndex(),r=this.endIndex();if(this.isDirty("urlField")){this._updateFields();let n=this.get("urlField");y(t,o=>{let l=o.dataContext;o.set("url",n&&l?l[n]:void 0)})}if(this.isDirty("name")&&this.updateLegendValue(),this.isDirty("heatRules")&&(this._valuesDirty=!0),this.isPrivateDirty("baseValueSeries")){let n=this.getPrivate("baseValueSeries");n&&this._disposers.push(n.onPrivate("startIndex",()=>{this._baseSeriesDirty=!0,this.markDirtyValues()}))}if(this.get("calculateAggregates")&&(this._valuesDirty&&!this._dataProcessed&&(this._aggregatesCalculated||(this._calculateAggregates(0,e),this._aggregatesCalculated=!0,i!=0&&(this._psi=void 0))),(this._psi!=i||this._pei!=r||this.isPrivateDirty("adjustedStartIndex"))&&!this._selectionAggregatesCalculated&&(i===0&&r===e&&this._aggregatesCalculated||this._calculateAggregates(i,r),this._selectionAggregatesCalculated=!0)),this.isDirty("tooltip")){let n=this.get("tooltip");n&&(n.hide(0),n.set("tooltipTarget",this))}if(this.isDirty("fill")||this.isDirty("stroke")){let n,o=this.get("legendDataItem");if(o&&(n=o.get("markerRectangle"),n&&this.isVisible())){if(this.isDirty("stroke")){let l=this.get("stroke");n.set("stroke",l)}if(this.isDirty("fill")){let l=this.get("fill");n.set("fill",l)}}this.updateLegendMarker(void 0)}if(this.bullets.length>0){let n=this.startIndex(),o=this.endIndex();o<e&&o++;for(let l=n;l<o;l++){let h=t[l];h.bullets||this._makeBullets(h)}}}_handleRemoved(){}_adjustStartIndex(t){return t}_calculateAggregates(t,e){let i=this._valueFields;if(!i)throw new Error("No value fields are set for the series.");let r=this.get("excludeFromAggregate");r&&(i=i.filter(v=>r.indexOf(v)==-1));let s={},n={},o={},l={},h={},d={},p={},u={},c={};for(let v=0,_=i.length;v<_;v++){let f=i[v];s[f]=0,n[f]=0,o[f]=0}let m=this.dataItems,g=m.length;for(let v=0,_=i.length;v<_;v++){let f=i[v],w=f+"Change",k=f+"ChangePercent",S=f+"ChangePrevious",E=f+"ChangePreviousPercent",F=f+"ChangeSelection",U=f+"ChangeSelectionPercent",M=f;f==="valueX"||f.endsWith("ValueX")?M="valueX":(f==="valueY"||f.endsWith("ValueY"))&&(M="valueY");let W=this.getPrivate("baseValueSeries"),H=this.getPrivate("adjustedStartIndex",t),O=(x,T,$)=>{if(t===0){let ut=d[M],St=T-ut;x.setRaw(w,St),x.setRaw(k,St/ut*100)}let Rt=T-c[M],dt=T-d[M];x.setRaw(S,Rt),x.setRaw(E,Rt/c[M]*100),x.setRaw(F,dt),x.setRaw(U,dt/d[M]*100),c[$]=T};for(let x=H;x<e;x++){let T=m[x];if(T){let $=T.get(f);if($!=null){l[f]==null&&(l[f]=$),h[f]==null&&(h[f]=$),d[f]==null&&(d[f]=$,c[f]=$,W&&(d[M]=W._getBase(M)));break}}}for(let x=H;x<e;x++){let T=m[x];if(T){let $=T._settings[f];$!=null&&(o[f]++,s[f]+=$,n[f]+=Math.abs($),l[f]>$&&(l[f]=$),h[f]<$&&(h[f]=$),p[f]=$,O(T,$,f))}}if(u[f]=s[f]/o[f],e<g){let x=m[e];if(x){let T=x.get(f);T!=null&&O(x,T,f)}}if(e+1<g){let x=m[e+1];if(x){let T=x.get(f);T!=null&&O(x,T,f)}}t>0&&t--,delete c[f];for(let x=t;x<H;x++){let T=m[x];if(T){let $=T.get(f);c[f]==null&&(c[f]=$),$!=null&&O(T,$,f)}}}for(let v=0,_=i.length;v<_;v++){let f=i[v];this.setPrivate(f+"AverageSelection",u[f]),this.setPrivate(f+"CountSelection",o[f]),this.setPrivate(f+"SumSelection",s[f]),this.setPrivate(f+"AbsoluteSumSelection",n[f]),this.setPrivate(f+"LowSelection",l[f]),this.setPrivate(f+"HighSelection",h[f]),this.setPrivate(f+"OpenSelection",d[f]),this.setPrivate(f+"CloseSelection",p[f])}if(t===0&&e===g)for(let v=0,_=i.length;v<_;v++){let f=i[v];this.setPrivate(f+"Average",u[f]),this.setPrivate(f+"Count",o[f]),this.setPrivate(f+"Sum",s[f]),this.setPrivate(f+"AbsoluteSum",n[f]),this.setPrivate(f+"Low",l[f]),this.setPrivate(f+"High",h[f]),this.setPrivate(f+"Open",d[f]),this.setPrivate(f+"Close",p[f])}}_updateChildren(){super._updateChildren(),this._psi=this.startIndex(),this._pei=this.endIndex(),this.isDirty("visible")&&this.bulletsContainer._setC("visible",this.get("visible"));let t=this.get("heatRules");if(this._valuesDirty&&t&&t.length>0&&y(t,e=>{let i=D(e.minValue)?e.minValue:this.getPrivate(e.dataField+"Low")||0,r=D(e.maxValue)?e.maxValue:this.getPrivate(e.dataField+"High")||0;if(e.logarithmic&&!e.customFunction&&i<=0){let s=1/0;y(e.target._entities,n=>{let o=n.dataItem?n.dataItem.get(e.dataField):void 0;D(o)&&o>0&&o<s&&(s=o)}),s<1/0&&(i=s)}y(e.target._entities,s=>{let n=s.dataItem.get(e.dataField);if(!D(n)){e.neutral&&s._setC(e.key,e.neutral);let o=s.states;if(o){let l=o.lookup("default");l&&e.neutral&&l._setC(e.key,e.neutral)}if(!e.customFunction)return}if(e.customFunction)e.customFunction.call(this,s,i,r,n);else{let o;e.logarithmic?o=(Math.log(n)*Math.LOG10E-Math.log(i)*Math.LOG10E)/(Math.log(r)*Math.LOG10E-Math.log(i)*Math.LOG10E):o=(n-i)/(r-i),e.logarithmic&&n<=0&&(o=0),D(n)&&(!D(o)||Math.abs(o)==1/0)&&(o=.5),o=Math.max(0,Math.min(1,o));let l;e.stops&&e.stops.length?l=ur(o,e.stops):D(e.min)?l=e.min+(e.max-e.min)*o:e.min instanceof P?l=P.interpolate(o,e.min,e.max):e.min instanceof A&&(l=si(o,e.min,e.max)),s._setC(e.key,l);let h=s.states;if(h){let d=h.lookup("default");d&&d._setC(e.key,l)}}})}),this.get("visible")){let e=this.dataItems,i=e.length,r=this.startIndex(),s=this.endIndex();s<i&&s++,r>0&&r--;for(let n=0;n<r;n++)this._hideBullets(e[n]);for(let n=r;n<s;n++)this._positionBullets(e[n]);for(let n=s;n<i;n++)this._hideBullets(e[n])}}_positionBullets(t){t.bullets&&y(t.bullets,e=>{this._positionBullet(e);let i=e.get("sprite");e.get("dynamic")&&(i&&(i._markDirtyKey("fill"),i.markDirtySize()),i instanceof L&&i.walkChildren(r=>{r._markDirtyKey("fill"),r.markDirtySize(),r instanceof K&&r.text.markDirtyText()})),i instanceof K&&i.get("populateText")&&i.text.markDirtyText()})}_hideBullets(t){t.bullets&&y(t.bullets,e=>{let i=e.get("sprite");i&&i.setPrivate("visible",!1)})}_positionBullet(t){}_placeBulletsContainer(t){t.bulletsContainer.children.moveValue(this.bulletsContainer)}_removeBulletsContainer(){let t=this.bulletsContainer;t.parent&&t.parent.children.removeValue(t)}disposeDataItem(t){let e=t.bullets;e&&(y(e,i=>{i.dispose()}),t.bullets=void 0)}_getItemReaderLabel(){return""}showDataItem(t,e){let i=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return q(this,void 0,void 0,function*(){let r=[i.showDataItem.call(this,t,e)],s=t.bullets;s&&y(s,n=>{let o=n.get("sprite");o&&r.push(o.show(e))}),yield Promise.all(r)})}hideDataItem(t,e){let i=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return q(this,void 0,void 0,function*(){let r=[i.hideDataItem.call(this,t,e)],s=t.bullets;s&&y(s,n=>{let o=n.get("sprite");o&&r.push(o.hide(e))}),yield Promise.all(r)})}_sequencedShowHide(t,e){return q(this,void 0,void 0,function*(){if(this.get("sequencedInterpolation"))if(D(e)||(e=this.get("interpolationDuration",0)),e>0){let i=this.startIndex(),r=this.endIndex();yield Promise.all(qe(this.dataItems,(s,n)=>q(this,void 0,void 0,function*(){let o=e||0;(n<i-10||n>r+10)&&(o=0);let l=this.get("sequencedDelay",0)+o/(r-i);yield mi(l*(n-i)),t?yield this.showDataItem(s,o):yield this.hideDataItem(s,o)})))}else yield Promise.all(qe(this.dataItems,i=>t?this.showDataItem(i,0):this.hideDataItem(i,0)))})}updateLegendValue(t){if(t){let e=t.get("legendDataItem");if(e){let i=e.get("valueLabel");if(i){let s=i.text,n="";i._setDataItem(t),n=this.get("legendValueText",s.get("text","")),i.set("text",n),s.markDirtyText()}let r=e.get("label");if(r){let s=r.text,n="";r._setDataItem(t),n=this.get("legendLabelText",s.get("text","")),r.set("text",n),s.markDirtyText()}}}}updateLegendMarker(t){}_onHide(){super._onHide();let t=this.getTooltip();t&&t.hide()}hoverDataItem(t){}unhoverDataItem(t){}_getBase(t){let e=this.dataItems[this.startIndex()];return e?e.get(t):0}};ae.className="Series";ae.classNames=wt.classNames.concat([ae.className]);function _i(a,t){for(let e=0,i=t.length;e<i;e++){let r=t[e];if(r.length>0){let s=r[0];if(s.length>0){let n=s[0];a.moveTo(n.x,n.y);for(let o=0,l=r.length;o<l;o++)pr(a,r[o])}}}}function pr(a,t){for(let e=0,i=t.length;e<i;e++){let r=t[e];a.lineTo(r.x,r.y)}}var Pt=class extends st{_beforeChanged(){super._beforeChanged(),(this.isDirty("points")||this.isDirty("segments")||this._sizeDirty||this.isPrivateDirty("width")||this.isPrivateDirty("height"))&&(this._clear=!0)}_changed(){if(super._changed(),this._clear){let t=this.get("points"),e=this.get("segments");if(t&&t.length>0){let i=t[0];this._display.moveTo(i.x,i.y),_i(this._display,[[t]])}else if(e)_i(this._display,e);else if(!this.get("draw")){let i=this.width(),r=this.height();this._display.moveTo(0,0),this._display.lineTo(i,r)}}}};Pt.className="Line";Pt.classNames=st.classNames.concat([Pt.className]);var Et=class extends ht{constructor(){super(...arguments),this._display=this._root._renderer.makeRadialText("",this.textStyle)}_afterNew(){super._afterNew()}_beforeChanged(){super._beforeChanged(),this._display.clear(),this.isDirty("textType")&&(this._display.textType=this.get("textType"),this.markDirtyBounds()),this.isDirty("radius")&&(this._display.radius=this.get("radius"),this.markDirtyBounds()),this.isDirty("startAngle")&&(this._display.startAngle=(this.get("startAngle",0)+90)*Bt,this.markDirtyBounds()),this.isDirty("inside")&&(this._display.inside=this.get("inside"),this.markDirtyBounds()),this.isDirty("orientation")&&(this._display.orientation=this.get("orientation"),this.markDirtyBounds()),this.isDirty("kerning")&&(this._display.kerning=this.get("kerning"),this.markDirtyBounds())}};Et.className="RadialText";Et.classNames=ht.classNames.concat([Et.className]);var ne=class extends K{constructor(){super(...arguments),this._flipped=!1}_afterNew(){this._textKeys.push("textType","kerning"),super._afterNew()}_makeText(){this._text=this.children.push(Et.new(this._root,{}))}baseRadius(){let t=this.getPrivate("radius",0),e=this.getPrivate("innerRadius",0),i=this.get("baseRadius",0);return e+et(i,t-e)}radius(){let t=this.get("inside",!1);return this.baseRadius()+this.get("radius",0)*(t?-1:1)}_arcSize(){if(this.get("textType")!="circular")return;let t=hs(this._text),e=t.widest+(t.count?this.get("kerning",0)*(this._text._display.text||"").length:0);return e>0?{length:e,height:t.height}:void 0}_arc(t,e){e==null&&(e=this.radius());let r=this.get("inside",!1)?e-t.height:e+t.height,s=this.get("labelAngle",0),n=Math.min(e,r),o=n>0?t.length/n*Wt:0,l=this._text.get("textAlign","left"),h=l=="center"?s-o/2:l=="left"?s:s-o;return{start:h,end:h+o,inner:n,outer:Math.max(e,r)}}_arcGlobalBounds(){let t=this._arcSize(),e=this.parent;if(!t||!e)return;let i=this._arc(t),r=[i.start,i.end];for(let o=Math.ceil(i.start/90)*90;o<i.end;o+=90)r.push(o);let s=[],n=[];return y(r,o=>{y([i.inner,i.outer],l=>{let h=e.toGlobal({x:l*Z(o),y:l*X(o)});s.push(h.x),n.push(h.y)})}),{left:Math.min(...s),right:Math.max(...s),top:Math.min(...n),bottom:Math.max(...n)}}_updateChildren(){if(super._updateChildren(),this.isDirty("baseRadius")||this.isPrivateDirty("radius")||this.isPrivateDirty("innerRadius")||this.isDirty("labelAngle")||this.isDirty("radius")||this.isDirty("inside")||this.isDirty("orientation")||this.isDirty("textType")){let t=this.get("textType","adjusted"),e=this.get("inside",!1),i=this.get("orientation"),r=nt(this.get("labelAngle",0));this._text.set("startAngle",this.get("labelAngle",0)),this._text.set("inside",e);let s=X(r),n=Z(r),o=this.baseRadius(),l=this.radius();if(this._display.angle=0,t=="circular")this._setCAll({paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}),this.setRaw("x",void 0),this.setRaw("y",void 0),this._text.set("orientation",i),this._text.set("radius",l);else{o==0&&(r=0,l=0);let h=l*n,d=l*s;t=="radial"?(this.setRaw("x",h),this.setRaw("y",d),r<90||r>270||i!="auto"?(this._display.angle=r,this._flipped=!1):(this._display.angle=r+180,this._flipped=!0),this._dirty.rotation=!1):t=="adjusted"?(this.setRaw("centerX",C),this.setRaw("centerY",C),this.setRaw("x",h),this.setRaw("y",d)):t=="regular"&&(this.setRaw("x",h),this.setRaw("y",d))}this.markDirtyPosition(),this.markDirtyBounds()}}_updateBounds(){let t=this._localBounds;super._updateBounds();let e=this._localBounds,i=this.get("textType");(i=="adjusted"||i=="radial")&&t&&e&&(Math.abs(e.right-e.left-(t.right-t.left))>.01||Math.abs(e.bottom-e.top-(t.bottom-t.top))>.01)&&this.markDirtyPosition()}_updatePosition(){let t=this.get("textType","regular"),e=this.get("inside",!1),i=0,r=0,s=this.get("labelAngle",0),n=this.localBounds(),o=n.right-n.left,l=n.bottom-n.top;if(t=="radial"){if(this._flipped){let h=this.get("centerX");h instanceof A&&(o=o*(1-h.value*2)),i=o*Z(s),r=o*X(s)}}else!e&&t=="adjusted"&&(i=o/2*Z(s),r=l/2*X(s));this._setCRaw("dx",i),this._setCRaw("dy",r),super._updatePosition()}get text(){return this._text}};ne.className="RadialLabel";ne.classNames=K.classNames.concat([ne.className]);var kt=class extends L{constructor(){super(...arguments),this.chartContainer=this.children.push(L.new(this._root,{width:R,height:R,interactiveChildren:!1})),this.bulletsContainer=L.new(this._root,{interactiveChildren:!1,isMeasured:!1,position:"absolute",width:R,height:R})}};kt.className="Chart";kt.classNames=L.classNames.concat([kt.className]);var oe=class extends kt{constructor(){super(...arguments),this.seriesContainer=L.new(this._root,{width:R,height:R,isMeasured:!1}),this.series=new te}_afterNew(){super._afterNew(),this._disposers.push(this.series);let t=this.seriesContainer.children;this._disposers.push(this.series.events.onAll(e=>{if(e.type==="clear"){y(e.oldValues,s=>{this._removeSeries(s)});let i=this.get("colors");i&&i.reset();let r=this.get("patterns");r&&r.reset()}else if(e.type==="push")t.moveValue(e.newValue),this._processSeries(e.newValue);else if(e.type==="setIndex")t.setIndex(e.index,e.newValue),this._processSeries(e.newValue);else if(e.type==="insertIndex")t.insertIndex(e.index,e.newValue),this._processSeries(e.newValue);else if(e.type==="removeIndex")this._removeSeries(e.oldValue);else if(e.type==="moveIndex")t.moveValue(e.value,e.newIndex),this._processSeries(e.value);else if(e.type==="swap"){let i=e.a,r=e.b,s=this.series.indexOf(i),n=this.series.indexOf(r);t.moveValue(i,n),t.moveValue(r,s),this.series.each(o=>{this._processSeries(o),o.markDirtyValues()})}else throw new Error("Unknown IListEvent type")}))}_processSeries(t){t.chart=this,t._placeBulletsContainer(this)}_removeSeries(t){t._handleRemoved(),t.isDisposed()||(this.seriesContainer.children.removeValue(t),t._removeBulletsContainer())}};oe.className="SerialChart";oe.classNames=kt.classNames.concat([oe.className]);var le=class extends Pt{};le.className="Tick";le.classNames=Pt.classNames.concat([le.className]);var fs=new WeakMap,ms=new WeakMap;function Be(a){let t=fs.get(a);return t==null&&(t=a.length,fs.set(a,t)),t}function fr(a,t){for(;t;)[a,t]=[t,a%t];return a}var he=class extends z{static paletteLength(t){return Be(t)}_afterNew(){super._afterNewApplyThemes(),this._dirty.colors=!1}_beforeChanged(){this.isDirty("colors")&&this.reset()}generateColors(){this.setPrivate("currentPass",this.getPrivate("currentPass",0)+1);let t=this.get("colors");(!t||t.length==0)&&(t=[this.get("baseColor",P.fromHex(16711680))],this._setCRaw("colors",t));let e=t,i=Be(e),r=Math.floor(e.length/i);this.getPrivate("numColors")||this.setPrivate("numColors",i);let s=this.get("passOptions"),n=this.get("reuse"),o=this.get("repeatLightness",0),l=h=>{ms.set(h,this),e.push(h)};if(n&&o){for(let h=0;h<i;h++){let d=e[h].toHSL();l(P.fromHSL(d.h,d.s,Math.min(1,Math.max(0,d.l+o*r))))}return}for(let h=0;h<i;h++)if(n)e.push(e[h]);else{let d=e[h].toHSL(),p=d.h+(s.hue||0)*r;for(;p>1;)p-=1;let u=d.s+(s.saturation||0)*r;u>1&&(u=1),u<0&&(u=0);let c=d.l+(s.lightness||0)*r;for(;c>1;)c-=1;l(P.fromHSL(p,u,c))}}static generatedLike(t,e){let i=ms.get(t);if(!i)return!1;let r=i.get("passOptions")||{},s=e.get("passOptions")||{};return!!i.get("reuse")==!!e.get("reuse")&&i.get("repeatLightness",0)==e.get("repeatLightness",0)&&(r.hue||0)==(s.hue||0)&&(r.saturation||0)==(s.saturation||0)&&(r.lightness||0)==(s.lightness||0)}getIndex(t){let e=this.get("colors",[]),i=this.get("saturation");return t>=e.length?(this.generateColors(),this.getIndex(t)):i!=null?P.saturate(e[t],i):e[t]}next(){let t=this.getPrivate("currentStep",this.get("startIndex",0)),e=this.getPrivate("currentCount",0);return this.setPrivate("currentStep",t+this.get("step",1)),this.setPrivate("currentCount",e+1),this.getIndex(this.reuseIndex(t,e))}reuseIndex(t,e){if(this.get("reuse")&&t%1==0){let i=Be(this.get("colors",[]));if(i>0){let r=((t+this.reuseOffset(e))%i+i)%i;return Math.floor(e/i)*i+r}}return t}reuseOffset(t){let e=this.get("step",1);if(this.get("reuse")&&e>0&&e%1==0){let i=Be(this.get("colors",[]));if(i>1){let r=fr(e,i);if(r>1)return Math.floor(t/(i/r))%r}}return 0}reset(){this.setPrivate("currentStep",this.get("startIndex",0)),this.setPrivate("currentPass",0),this.setPrivate("currentCount",0)}};he.className="ColorSet";he.classNames=z.classNames.concat([he.className]);function b(a,t,e,i){a.set(t,e.get(i)),e.on(i,r=>{a.set(t,r)})}var gs=class extends zi{setupDefaultRules(){super.setupDefaultRules();let t=this._root.language,e=this._root.interfaceColors,i=this._root.horizontalLayout,r=this._root.verticalLayout,s=this.rule.bind(this);s("InterfaceColors").setAll({stroke:P.fromHex(15066597),fill:P.fromHex(15987699),primaryButton:P.fromHex(6788316),primaryButtonHover:P.fromHex(6779356),primaryButtonDown:P.fromHex(6872182),primaryButtonActive:P.fromHex(6872182),primaryButtonDisabled:P.fromHex(14342874),primaryButtonTextDisabled:P.fromHex(16777215),primaryButtonText:P.fromHex(16777215),primaryButtonStroke:P.fromHex(16777215),secondaryButton:P.fromHex(14277081),secondaryButtonHover:P.fromHex(10724259),secondaryButtonDown:P.fromHex(9276813),secondaryButtonActive:P.fromHex(15132390),secondaryButtonText:P.fromHex(0),secondaryButtonStroke:P.fromHex(16777215),grid:P.fromHex(0),background:P.fromHex(16777215),alternativeBackground:P.fromHex(0),text:P.fromHex(0),alternativeText:P.fromHex(16777215),disabled:P.fromHex(11382189),positive:P.fromHex(5288704),negative:P.fromHex(11730944),warning:P.fromHex(15909424)});{let n=s("ColorSet");n.setAll({passOptions:{hue:.05,saturation:0,lightness:0},colors:[P.fromHex(6797276)],step:1,reuse:!1,startIndex:0}),n.setPrivate("currentStep",0),n.setPrivate("currentPass",0)}s("Entity").setAll({stateAnimationDuration:0,stateAnimationEasing:ft(it)}),s("Component").setAll({interpolationDuration:0,interpolationEasing:ft(it)}),s("Sprite").setAll({visible:!0,scale:1,opacity:1,rotation:0,position:"relative",tooltipX:C,tooltipY:C,tooltipPosition:"fixed",isMeasured:!0}),s("Sprite").states.create("default",{visible:!0,opacity:1}),s("Container").setAll({interactiveChildren:!0,setStateOnChildren:!1}),s("Graphics").setAll({strokeWidth:1}),s("Chart").setAll({width:R,height:R,interactiveChildren:!1}),s("ZoomableContainer").setAll({width:R,height:R,wheelable:!0,pinchZoom:!0,maxZoomLevel:32,minZoomLevel:1,zoomStep:2,animationEasing:ft(it),animationDuration:600,maxPanOut:.4}),s("ZoomableContainer",["serialchartcontainer"]).setAll({wheelable:!1,pinchZoom:!1,maskContent:!0}),s("Sprite",["horizontal","center"]).setAll({centerX:C,x:C}),s("Sprite",["vertical","center"]).setAll({centerY:C,y:C}),s("Container",["horizontal","layout"]).setAll({layout:i}),s("Container",["vertical","layout"]).setAll({layout:r}),s("Pattern").setAll({repetition:"repeat",width:50,height:50,rotation:0,fillOpacity:1}),s("LinePattern").setAll({gap:6,colorOpacity:1,width:49,height:49}),s("RectanglePattern").setAll({gap:6,checkered:!1,centered:!0,maxWidth:5,maxHeight:5,width:48,height:48,strokeWidth:0}),s("CirclePattern").setAll({gap:5,checkered:!1,centered:!1,radius:3,strokeWidth:0,width:45,height:45}),s("GrainPattern").setAll({width:200,height:200,colors:[P.fromHex(0)],size:1,horizontalGap:0,verticalGap:0,density:1,minOpacity:0,maxOpacity:.2});{let n=s("PatternSet");n.setAll({step:1}),b(n,"color",e,"stroke")}s("LinearGradient").setAll({rotation:90}),s("Legend").setAll({fillField:"fill",strokeField:"stroke",nameField:"name",layout:lt.new(this._root,{}),layer:30,clickTarget:"itemContainer"}),s("Container",["legend","item","itemcontainer"]).setAll({paddingLeft:5,paddingRight:5,paddingBottom:5,paddingTop:5,layout:i,setStateOnChildren:!0,interactiveChildren:!1,ariaChecked:!0,focusable:!0,ariaLabel:t.translate("Press ENTER to toggle"),role:"checkbox"});{let n=s("Rectangle",["legend","item","background"]);n.setAll({fillOpacity:0}),b(n,"fill",e,"background")}s("Container",["legend","marker"]).setAll({setStateOnChildren:!0,centerY:C,paddingLeft:0,paddingRight:0,paddingBottom:0,paddingTop:0,width:18,height:18}),s("RoundedRectangle",["legend","marker","rectangle"]).setAll({width:R,height:R,cornerRadiusBL:3,cornerRadiusTL:3,cornerRadiusBR:3,cornerRadiusTR:3});{let n=s("RoundedRectangle",["legend","marker","rectangle"]).states.create("disabled",{});b(n,"fill",e,"disabled"),b(n,"stroke",e,"disabled")}s("Label",["legend","label"]).setAll({centerY:C,marginLeft:5,paddingRight:0,paddingLeft:0,paddingTop:0,paddingBottom:0,populateText:!0});{let n=s("Label",["legend","label"]).states.create("disabled",{});b(n,"fill",e,"disabled")}s("Label",["legend","value","label"]).setAll({centerY:C,marginLeft:5,paddingRight:0,paddingLeft:0,paddingTop:0,paddingBottom:0,width:50,centerX:R,populateText:!0});{let n=s("Label",["legend","value","label"]).states.create("disabled",{});b(n,"fill",e,"disabled")}s("HeatLegend").setAll({stepCount:1}),s("RoundedRectangle",["heatlegend","marker"]).setAll({cornerRadiusTR:0,cornerRadiusBR:0,cornerRadiusTL:0,cornerRadiusBL:0}),s("RoundedRectangle",["vertical","heatlegend","marker"]).setAll({height:R,width:15}),s("RoundedRectangle",["horizontal","heatlegend","marker"]).setAll({width:R,height:15}),s("HeatLegend",["vertical"]).setAll({height:R}),s("HeatLegend",["horizontal"]).setAll({width:R}),s("Label",["heatlegend","start"]).setAll({paddingLeft:5,paddingRight:5,paddingTop:5,paddingBottom:5}),s("Label",["heatlegend","end"]).setAll({paddingLeft:5,paddingRight:5,paddingTop:5,paddingBottom:5});{let n=s("Label");n.setAll({paddingTop:8,paddingBottom:8,paddingLeft:10,paddingRight:10,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',fontSize:"1em",populateText:!1}),b(n,"fill",e,"text")}s("RadialLabel").setAll({textType:"regular",centerY:C,centerX:C,inside:!1,radius:0,baseRadius:R,orientation:"auto",textAlign:"center"}),s("EditableLabel").setAll({editOn:"click",themeTags:["editablelabel"],multiLine:!0}),s("RoundedRectangle",["editablelabel","background"]).setAll({fillOpacity:0,fill:P.fromHex(0),cornerRadiusBL:3,cornerRadiusBR:3,cornerRadiusTL:3,cornerRadiusTR:3,strokeOpacity:0,stroke:P.fromHex(0)}),s("RoundedRectangle",["editablelabel","background"]).states.create("active",{strokeOpacity:.2}),s("RoundedRectangle").setAll({cornerRadiusTL:8,cornerRadiusBL:8,cornerRadiusTR:8,cornerRadiusBR:8}),s("PointedRectangle").setAll({pointerBaseWidth:15,pointerLength:10,cornerRadius:8}),s("Slice").setAll({shiftRadius:0,dRadius:0,dInnerRadius:0});{let n=s("Tick");n.setAll({strokeOpacity:.15,isMeasured:!1,length:4.5,position:"absolute",crisp:!0}),b(n,"stroke",e,"grid")}s("Bullet").setAll({locationX:.5,locationY:.5}),s("Tooltip").setAll({position:"absolute",getFillFromSprite:!0,getStrokeFromSprite:!1,autoTextColor:!0,paddingTop:9,paddingBottom:8,paddingLeft:10,paddingRight:10,marginBottom:5,pointerOrientation:"vertical",centerX:C,centerY:C,animationEasing:ft(it),exportable:!1}),s("Tooltip",["system"]).setAll({pointerOrientation:"horizontal",paddingTop:4,paddingRight:7,paddingBottom:4,paddingLeft:7});{let n=s("PointedRectangle",["tooltip","system","background"]);n.setAll({strokeOpacity:.3}),b(n,"fill",e,"background"),b(n,"stroke",e,"grid")}s("Label",["tooltip","system"]).setAll({fontSize:12,fill:e.get("background")}),s("Polygon").setAll({animationEasing:ft(it)}),s("Link").setAll({cornerRadius:8,setStateOnChildren:!0});{let n=s("OrthogonalLine",["link","line"]);n.setAll({isMeasured:!1,crisp:!0});let o=n.states.create("active",{strokeWidth:2});b(o,"stroke",e,"negative")}s("OrthogonalLine",["link","hit"]).setAll({strokeWidth:10,opacity:0,strokeOpacity:0});{let n=s("OrthogonalLine");n.setAll({strokeWidth:1,strokeOpacity:1,cornerRadius:10}),b(n,"stroke",e,"grid")}{let n=s("Triangle",["link"]);n.setAll({width:14,height:10,centerY:0}),b(n,"fill",e,"grid"),b(n,"stroke",e,"grid"),n.states.create("default",{stateAnimationDuration:0});let o=n.states.create("active",{stateAnimationDuration:0,stroke:Ui(16777215),strokeWidth:2});o.set("draw",l=>{l.arc(0,0,11,0,Math.PI*2),l.moveTo(-4,-4),l.lineTo(4,4),l.moveTo(4,-4),l.lineTo(-4,4)}),b(o,"fill",e,"negative")}s("PointedRectangle",["tooltip","background"]).setAll({strokeOpacity:.9,cornerRadius:4,pointerLength:4,pointerBaseWidth:8,fillOpacity:.9,stroke:P.fromHex(16777215)});{let n=s("Label",["tooltip"]);n.setAll({role:"tooltip",populateText:!0,paddingRight:0,paddingTop:0,paddingLeft:0,paddingBottom:0}),b(n,"fill",e,"alternativeText")}s("Button").setAll({paddingTop:8,paddingBottom:8,paddingLeft:10,paddingRight:10,interactive:!0,layout:i,interactiveChildren:!1,setStateOnChildren:!0,focusable:!0}),s("Button").states.create("hover",{}),s("Button").states.create("down",{stateAnimationDuration:0}),s("Button").states.create("active",{}),s("Button").states.create("disabled",{forceInactive:!0});{let n=s("RoundedRectangle",["button","background"]);b(n,"fill",e,"primaryButton"),b(n,"stroke",e,"primaryButtonStroke")}{let n=s("RoundedRectangle",["button","background"]).states.create("hover",{});b(n,"fill",e,"primaryButtonHover")}{let n=s("RoundedRectangle",["button","background"]).states.create("down",{stateAnimationDuration:0});b(n,"fill",e,"primaryButtonDown")}{let n=s("RoundedRectangle",["button","background"]).states.create("active",{});b(n,"fill",e,"primaryButtonActive")}{let n=s("RoundedRectangle",["button","background"]).states.create("disabled",{});b(n,"fill",e,"primaryButtonDisabled")}{let n=s("Graphics",["button","icon"]).states.create("disabled",{});b(n,"fill",e,"primaryButtonTextDisabled")}{let n=s("Label",["button"]).states.create("disabled",{});b(n,"fill",e,"primaryButtonTextDisabled")}{let n=s("Graphics",["button","icon"]);n.setAll({forceInactive:!0}),b(n,"stroke",e,"primaryButtonText")}{let n=s("Label",["button"]);b(n,"fill",e,"primaryButtonText")}s("ConfirmButton").setAll({toggleKey:"active",setStateOnChildren:!0,label:K.new(this._root,{text:t.translate("Confirm"),forceHidden:!0})});{let n=s("RoundedRectangle",["button","background","confirm"]).states.create("active",{});b(n,"fill",e,"negative")}s("Label",["button","confirm"]).setAll({paddingTop:0,paddingBottom:0,paddingRight:3,paddingLeft:5}),s("Label",["button","confirm"]).states.create("default",{stateAnimationDuration:0}),s("Label",["button","confirm"]).states.create("active",{forceHidden:!1,stateAnimationDuration:0});{let n=s("Graphics",["icon","confirm","button"]);n.setAll({stateAnimationDuration:0}),n.states.create("default",{stateAnimationDuration:0}),b(n,"stroke",e,"primaryButtonText")}{let n=s("Graphics",["icon","confirm","button"]).states.create("active",{svgPath:"M -5 1 L 0 6 L 8 -5",strokeWidth:2});b(n,"stroke",e,"primaryButtonText")}{let n=s("Graphics",["icon","confirm","button","secondary"]).states.create("active",{});b(n,"stroke",e,"primaryButtonText")}{let n=s("RoundedRectangle",["button","background","confirm","secondary"]).states.create("active",{fillOpacity:1});b(n,"fill",e,"negative")}{let n=s("RoundedRectangle",["button","background","confirm","secondary"]).states.create("hoverActive",{fillOpacity:1});b(n,"fill",e,"negative")}s("Button",["button","confirm"]).states.create("hoverActive",{}),s("Button",["zoom"]).setAll({paddingTop:18,paddingBottom:18,paddingLeft:12,paddingRight:12,centerX:46,centerY:-10,y:0,x:R,role:"button",ariaLabel:t.translate("Zoom Out"),layer:30});{let n=s("RoundedRectangle",["background","button","zoom"]);n.setAll({cornerRadiusBL:40,cornerRadiusBR:40,cornerRadiusTL:40,cornerRadiusTR:40}),b(n,"fill",e,"primaryButton")}{let n=s("RoundedRectangle",["background","button","zoom"]).states.create("hover",{});b(n,"fill",e,"primaryButtonHover")}{let n=s("RoundedRectangle",["background","button","zoom"]).states.create("down",{stateAnimationDuration:0});b(n,"fill",e,"primaryButtonDown")}{let n=s("Graphics",["icon","button","zoom"]);n.setAll({crisp:!0,strokeOpacity:.7,draw:o=>{o.moveTo(0,0),o.lineTo(12,0)}}),b(n,"stroke",e,"primaryButtonText")}s("Button",["resize"]).setAll({paddingTop:9,paddingBottom:9,paddingLeft:13,paddingRight:13,draggable:!0,centerX:C,centerY:C,position:"absolute",role:"slider",ariaValueMin:"0",ariaValueMax:"100",ariaLabel:t.translate("Use up and down arrows to move selection")});{let n=s("RoundedRectangle",["background","resize","button"]);n.setAll({cornerRadiusBL:40,cornerRadiusBR:40,cornerRadiusTL:40,cornerRadiusTR:40}),b(n,"fill",e,"secondaryButton"),b(n,"stroke",e,"secondaryButtonStroke")}{let n=s("RoundedRectangle",["background","resize","button"]).states.create("hover",{});b(n,"fill",e,"secondaryButtonHover")}{let n=s("RoundedRectangle",["background","resize","button"]).states.create("down",{stateAnimationDuration:0});b(n,"fill",e,"secondaryButtonDown")}{let n=s("Graphics",["resize","button","icon"]);n.setAll({interactive:!1,crisp:!0,strokeOpacity:.5,draw:o=>{o.moveTo(0,.5),o.lineTo(0,12.5),o.moveTo(4,.5),o.lineTo(4,12.5)}}),b(n,"stroke",e,"secondaryButtonText")}s("Button",["resize","vertical"]).setAll({rotation:90,cursorOverStyle:"ns-resize"}),s("Button",["resize","horizontal"]).setAll({cursorOverStyle:"ew-resize"}),s("Button",["play"]).setAll({paddingTop:13,paddingBottom:13,paddingLeft:14,paddingRight:14,ariaLabel:t.translate("Play"),toggleKey:"active"});{let n=s("RoundedRectangle",["play","background"]);n.setAll({strokeOpacity:.5,cornerRadiusBL:100,cornerRadiusBR:100,cornerRadiusTL:100,cornerRadiusTR:100}),b(n,"fill",e,"primaryButton")}{let n=s("Graphics",["play","icon"]);n.setAll({stateAnimationDuration:0,dx:1,draw:o=>{o.moveTo(0,-5),o.lineTo(8,0),o.lineTo(0,5),o.lineTo(0,-5)}}),b(n,"fill",e,"primaryButtonText")}s("Graphics",["play","icon"]).states.create("default",{stateAnimationDuration:0}),s("Graphics",["play","icon"]).states.create("active",{stateAnimationDuration:0,draw:n=>{n.moveTo(-4,-5),n.lineTo(-1,-5),n.lineTo(-1,5),n.lineTo(-4,5),n.lineTo(-4,-5),n.moveTo(4,-5),n.lineTo(1,-5),n.lineTo(1,5),n.lineTo(4,5),n.lineTo(4,-5)}}),s("Button",["switch"]).setAll({paddingTop:4,paddingBottom:4,paddingLeft:4,paddingRight:4,ariaLabel:t.translate("Press ENTER to toggle"),toggleKey:"active",width:40,height:24,layout:null});{let n=s("RoundedRectangle",["switch","background"]);n.setAll({strokeOpacity:.5,cornerRadiusBL:100,cornerRadiusBR:100,cornerRadiusTL:100,cornerRadiusTR:100}),b(n,"fill",e,"primaryButton")}{let n=s("Circle",["switch","icon"]);n.setAll({radius:8,centerY:0,centerX:0,dx:0}),b(n,"fill",e,"primaryButtonText")}s("Graphics",["switch","icon"]).states.create("active",{dx:16}),s("Scrollbar").setAll({start:0,end:1,layer:30,animationEasing:ft(it)}),s("Scrollbar",["vertical"]).setAll({marginRight:13,marginLeft:13,minWidth:12,height:R}),s("Scrollbar",["horizontal"]).setAll({marginTop:13,marginBottom:13,minHeight:12,width:R}),this.rule("Button",["scrollbar"]).setAll({exportable:!1});{let n=s("RoundedRectangle",["scrollbar","main","background"]);n.setAll({cornerRadiusTL:8,cornerRadiusBL:8,cornerRadiusTR:8,cornerRadiusBR:8,fillOpacity:.8}),b(n,"fill",e,"fill")}{let n=s("RoundedRectangle",["scrollbar","thumb"]);n.setAll({role:"slider",ariaLive:"polite",position:"absolute",draggable:!0}),b(n,"fill",e,"secondaryButton")}{let n=s("RoundedRectangle",["scrollbar","thumb"]).states.create("hover",{});b(n,"fill",e,"secondaryButtonHover")}{let n=s("RoundedRectangle",["scrollbar","thumb"]).states.create("down",{stateAnimationDuration:0});b(n,"fill",e,"secondaryButtonDown")}s("RoundedRectangle",["scrollbar","thumb","vertical"]).setAll({x:C,width:R,centerX:C,ariaLabel:t.translate("Use up and down arrows to move selection")}),s("RoundedRectangle",["scrollbar","thumb","horizontal"]).setAll({y:C,centerY:C,height:R,ariaLabel:t.translate("Use left and right arrows to move selection")});{let n=s("PointedRectangle",["axis","tooltip","background"]);n.setAll({cornerRadius:0}),b(n,"fill",e,"alternativeBackground")}s("Label",["axis","tooltip"]).setAll({role:void 0}),s("Label",["axis","tooltip","y"]).setAll({textAlign:"right"}),s("Label",["axis","tooltip","y","opposite"]).setAll({textAlign:"left"}),s("Label",["axis","tooltip","x"]).setAll({textAlign:"center"}),s("Tooltip",["categoryaxis"]).setAll({labelText:"{category}"}),s("Star").setAll({spikes:5,innerRadius:5,radius:10}),s("Tooltip",["stock"]).setAll({paddingTop:6,paddingBottom:5,paddingLeft:7,paddingRight:7}),s("Tooltip",["indicator"]).setAll({forceHidden:!0}),s("PointedRectangle",["tooltip","stock","axis"]).setAll({pointerLength:0,pointerBaseWidth:0,cornerRadius:3}),s("Label",["tooltip","stock"]).setAll({fontSize:"0.8em"}),s("SpriteResizer").setAll({rotationStep:10,isMeasured:!1}),s("Container",["resizer","grip"]).states.create("hover",{});{let n=s("RoundedRectangle",["resizer","grip"]);n.setAll({strokeOpacity:.7,strokeWidth:1,fillOpacity:1,width:12,height:12}),b(n,"fill",e,"background"),b(n,"stroke",e,"alternativeBackground")}{let n=s("RoundedRectangle",["resizer","grip","outline"]);n.setAll({strokeOpacity:0,fillOpacity:0,width:20,height:20}),n.states.create("hover",{fillOpacity:.3}),b(n,"fill",e,"alternativeBackground")}s("RoundedRectangle",["resizer","grip","left"]).setAll({cornerRadiusBL:0,cornerRadiusBR:0,cornerRadiusTL:0,cornerRadiusTR:0}),s("RoundedRectangle",["resizer","grip","right"]).setAll({cornerRadiusBL:0,cornerRadiusBR:0,cornerRadiusTL:0,cornerRadiusTR:0});{let n=s("Rectangle",["resizer","rectangle"]);n.setAll({strokeDasharray:[2,2],strokeOpacity:.5,strokeWidth:1}),b(n,"stroke",e,"alternativeBackground")}s("Graphics",["button","plus","icon"]).setAll({x:C,y:C,draw:n=>{n.moveTo(-4,0),n.lineTo(4,0),n.moveTo(0,-4),n.lineTo(0,4)}}),s("Graphics",["button","minus","icon"]).setAll({x:C,y:C,draw:n=>{n.moveTo(-4,0),n.lineTo(4,0)}}),s("Graphics",["button","home","icon"]).setAll({x:C,y:C,svgPath:"M 8 -1 L 6 -1 L 6 7 L 2 7 L 2 1 L -2 1 L -2 7 L -6 7 L -6 -1 L -8 -1 L 0 -9 L 8 -1 Z M 8 -1"}),s("Button",["zoomtools"]).setAll({marginTop:1,marginBottom:2,role:"button"}),s("Button",["zoomtools","plus"]).setAll({ariaLabel:t.translate("Press ENTER to zoom in")}),s("Button",["zoomtools","minus"]).setAll({ariaLabel:t.translate("Press ENTER to zoom out")}),s("Button",["zoomtools","home"]).setAll({ariaLabel:t.translate("Home")}),s("ZoomTools").setAll({x:R,centerX:R,y:R,centerY:R,paddingRight:10,paddingBottom:10}),s("ProgressPie").setAll({radius:R,width:50,height:50,centerX:fe(-50),centerY:fe(-50),innerRadius:fe(85),numberFormat:"#."});{let n=s("Label",["progresspie"]);n.setAll({centerX:C,centerY:C,fontSize:"0.75em"}),b(n,"fill",e,"primaryButton")}{let n=s("Circle",["progresspie"]);n.setAll({fillOpacity:.5}),b(n,"fill",e,"background")}{let n=s("Slice",["progresspie"]);n.setAll({startAngle:-90}),b(n,"fill",e,"primaryButton")}{let n=s("Slice",["progresspie","background"]);n.setAll({fillOpacity:.2,arc:360}),b(n,"fill",e,"primaryButton")}s("EditableLabel",["numericstepper"]).setAll({y:C,centerY:C,multiLine:!1,marginRight:2});{let n=s("Container",["numericstepper","buttons"]);n.setAll({layout:this._root.verticalLayout,centerY:C,y:C,marginRight:10,opacity:0}),n.states.create("active",{opacity:1}),n.states.create("default",{opacity:0})}{let n=s("Triangle",["numericstepper"]);n.setAll({width:17,height:11,marginTop:3,marginBottom:3,strokeWidth:5,strokeOpacity:0,cursorOverStyle:"pointer"}),b(n,"fill",e,"secondaryButton")}s("Triangle",["downbutton"]).setAll({rotation:180})}};function B(a){return function(){return a}}var yi=Math.abs,V=Math.atan2,Ct=Math.cos,_s=Math.max,Me=Math.min,rt=Math.sin,Ot=Math.sqrt,j=1e-12,Xt=Math.PI,de=Xt/2,ys=2*Xt;function vs(a){return a>1?0:a<-1?Xt:Math.acos(a)}function vi(a){return a>=1?de:a<=-1?-de:Math.asin(a)}var xi=Math.PI,bi=2*xi,Ht=1e-6,mr=bi-Ht;function xs(a){this._+=a[0];for(let t=1,e=a.length;t<e;++t)this._+=arguments[t]+a[t]}function gr(a){let t=Math.floor(a);if(!(t>=0))throw new Error(`invalid digits: ${a}`);if(t>15)return xs;let e=10**t;return function(i){this._+=i[0];for(let r=1,s=i.length;r<s;++r)this._+=Math.round(arguments[r]*e)/e+i[r]}}var Nt=class{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?xs:gr(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,i,r){this._append`Q${+t},${+e},${this._x1=+i},${this._y1=+r}`}bezierCurveTo(t,e,i,r,s,n){this._append`C${+t},${+e},${+i},${+r},${this._x1=+s},${this._y1=+n}`}arcTo(t,e,i,r,s){if(t=+t,e=+e,i=+i,r=+r,s=+s,s<0)throw new Error(`negative radius: ${s}`);let n=this._x1,o=this._y1,l=i-t,h=r-e,d=n-t,p=o-e,u=d*d+p*p;if(this._x1===null)this._append`M${this._x1=t},${this._y1=e}`;else if(u>Ht)if(!(Math.abs(p*l-h*d)>Ht)||!s)this._append`L${this._x1=t},${this._y1=e}`;else{let c=i-n,m=r-o,g=l*l+h*h,v=c*c+m*m,_=Math.sqrt(g),f=Math.sqrt(u),w=s*Math.tan((xi-Math.acos((g+u-v)/(2*_*f)))/2),k=w/f,S=w/_;Math.abs(k-1)>Ht&&this._append`L${t+k*d},${e+k*p}`,this._append`A${s},${s},0,0,${+(p*c>d*m)},${this._x1=t+S*l},${this._y1=e+S*h}`}}arc(t,e,i,r,s,n){if(t=+t,e=+e,i=+i,n=!!n,i<0)throw new Error(`negative radius: ${i}`);let o=i*Math.cos(r),l=i*Math.sin(r),h=t+o,d=e+l,p=1^n,u=n?r-s:s-r;this._x1===null?this._append`M${h},${d}`:(Math.abs(this._x1-h)>Ht||Math.abs(this._y1-d)>Ht)&&this._append`L${h},${d}`,i&&(u<0&&(u=u%bi+bi),u>mr?this._append`A${i},${i},0,1,${p},${t-o},${e-l}A${i},${i},0,1,${p},${this._x1=h},${this._y1=d}`:u>Ht&&this._append`A${i},${i},0,${+(u>=xi)},${p},${this._x1=t+i*Math.cos(s)},${this._y1=e+i*Math.sin(s)}`)}rect(t,e,i,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${i=+i}v${+r}h${-i}Z`}toString(){return this._}};function bs(){return new Nt}bs.prototype=Nt.prototype;function Zt(a){let t=3;return a.digits=function(e){if(!arguments.length)return t;if(e==null)t=null;else{let i=Math.floor(e);if(!(i>=0))throw new RangeError(`invalid digits: ${e}`);t=i}return a},()=>new Nt(t)}function _r(a){return a.innerRadius}function yr(a){return a.outerRadius}function vr(a){return a.startAngle}function xr(a){return a.endAngle}function br(a){return a&&a.padAngle}function Dr(a,t,e,i,r,s,n,o){var l=e-a,h=i-t,d=n-r,p=o-s,u=p*l-d*h;if(!(u*u<j))return u=(d*(t-s)-p*(a-r))/u,[a+u*l,t+u*h]}function Ie(a,t,e,i,r,s,n){var o=a-e,l=t-i,h=(n?s:-s)/Ot(o*o+l*l),d=h*l,p=-h*o,u=a+d,c=t+p,m=e+d,g=i+p,v=(u+m)/2,_=(c+g)/2,f=m-u,w=g-c,k=f*f+w*w,S=r-s,E=u*g-m*c,F=(w<0?-1:1)*Ot(_s(0,S*S*k-E*E)),U=(E*w-f*F)/k,M=(-E*f-w*F)/k,W=(E*w+f*F)/k,H=(-E*f+w*F)/k,O=U-v,x=M-_,T=W-v,$=H-_;return O*O+x*x>T*T+$*$&&(U=W,M=H),{cx:U,cy:M,x01:-d,y01:-p,x11:U*(r/S-1),y11:M*(r/S-1)}}function Tr(){var a=_r,t=yr,e=B(0),i=null,r=vr,s=xr,n=br,o=null,l=Zt(h);function h(){var d,p,u=+a.apply(this,arguments),c=+t.apply(this,arguments),m=r.apply(this,arguments)-de,g=s.apply(this,arguments)-de,v=yi(g-m),_=g>m;if(o||(o=d=l()),c<u&&(p=c,c=u,u=p),!(c>j))o.moveTo(0,0);else if(v>ys-j)o.moveTo(c*Ct(m),c*rt(m)),o.arc(0,0,c,m,g,!_),u>j&&(o.moveTo(u*Ct(g),u*rt(g)),o.arc(0,0,u,g,m,_));else{var f=m,w=g,k=m,S=g,E=v,F=v,U=n.apply(this,arguments)/2,M=U>j&&(i?+i.apply(this,arguments):Ot(u*u+c*c)),W=Me(yi(c-u)/2,+e.apply(this,arguments)),H=W,O=W,x,T;if(M>j){var $=vi(M/u*rt(U)),Rt=vi(M/c*rt(U));(E-=$*2)>j?($*=_?1:-1,k+=$,S-=$):(E=0,k=S=(m+g)/2),(F-=Rt*2)>j?(Rt*=_?1:-1,f+=Rt,w-=Rt):(F=0,f=w=(m+g)/2)}var dt=c*Ct(f),ut=c*rt(f),St=u*Ct(S),ue=u*rt(S);if(W>j){var pe=c*Ct(w),ce=c*rt(w),Ne=u*Ct(k),Fe=u*rt(k),pt;if(v<Xt)if(pt=Dr(dt,ut,Ne,Fe,pe,ce,St,ue)){var Ue=dt-pt[0],We=ut-pt[1],Ve=pe-pt[0],ze=ce-pt[1],Ti=1/rt(vs((Ue*Ve+We*ze)/(Ot(Ue*Ue+We*We)*Ot(Ve*Ve+ze*ze)))/2),wi=Ot(pt[0]*pt[0]+pt[1]*pt[1]);H=Me(W,(u-wi)/(Ti-1)),O=Me(W,(c-wi)/(Ti+1))}else H=O=0}F>j?O>j?(x=Ie(Ne,Fe,dt,ut,c,O,_),T=Ie(pe,ce,St,ue,c,O,_),o.moveTo(x.cx+x.x01,x.cy+x.y01),O<W?o.arc(x.cx,x.cy,O,V(x.y01,x.x01),V(T.y01,T.x01),!_):(o.arc(x.cx,x.cy,O,V(x.y01,x.x01),V(x.y11,x.x11),!_),o.arc(0,0,c,V(x.cy+x.y11,x.cx+x.x11),V(T.cy+T.y11,T.cx+T.x11),!_),o.arc(T.cx,T.cy,O,V(T.y11,T.x11),V(T.y01,T.x01),!_))):(o.moveTo(dt,ut),o.arc(0,0,c,f,w,!_)):o.moveTo(dt,ut),!(u>j)||!(E>j)?o.lineTo(St,ue):H>j?(x=Ie(St,ue,pe,ce,u,-H,_),T=Ie(dt,ut,Ne,Fe,u,-H,_),o.lineTo(x.cx+x.x01,x.cy+x.y01),H<W?o.arc(x.cx,x.cy,H,V(x.y01,x.x01),V(T.y01,T.x01),!_):(o.arc(x.cx,x.cy,H,V(x.y01,x.x01),V(x.y11,x.x11),!_),o.arc(0,0,u,V(x.cy+x.y11,x.cx+x.x11),V(T.cy+T.y11,T.cx+T.x11),_),o.arc(T.cx,T.cy,H,V(T.y11,T.x11),V(T.y01,T.x01),!_))):o.arc(0,0,u,S,k,_)}if(o.closePath(),d)return o=null,d+""||null}return h.centroid=function(){var d=(+a.apply(this,arguments)+ +t.apply(this,arguments))/2,p=(+r.apply(this,arguments)+ +s.apply(this,arguments))/2-Xt/2;return[Ct(p)*d,rt(p)*d]},h.innerRadius=function(d){return arguments.length?(a=typeof d=="function"?d:B(+d),h):a},h.outerRadius=function(d){return arguments.length?(t=typeof d=="function"?d:B(+d),h):t},h.cornerRadius=function(d){return arguments.length?(e=typeof d=="function"?d:B(+d),h):e},h.padRadius=function(d){return arguments.length?(i=d==null?null:typeof d=="function"?d:B(+d),h):i},h.startAngle=function(d){return arguments.length?(r=typeof d=="function"?d:B(+d),h):r},h.endAngle=function(d){return arguments.length?(s=typeof d=="function"?d:B(+d),h):s},h.padAngle=function(d){return arguments.length?(n=typeof d=="function"?d:B(+d),h):n},h.context=function(d){return arguments.length?(o=d??null,h):o},h}var Jn=Array.prototype.slice;function Le(a){return typeof a=="object"&&"length"in a?a:Array.from(a)}function Ds(a){this._context=a}Ds.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(a,t){switch(a=+a,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(a,t):this._context.moveTo(a,t);break;case 1:this._point=2;default:this._context.lineTo(a,t);break}}};function Ee(a){return new Ds(a)}function Oe(a){return a[0]}function He(a){return a[1]}function Di(a,t){var e=B(!0),i=null,r=Ee,s=null,n=Zt(o);a=typeof a=="function"?a:a===void 0?Oe:B(a),t=typeof t=="function"?t:t===void 0?He:B(t);function o(l){var h,d=(l=Le(l)).length,p,u=!1,c;for(i==null&&(s=r(c=n())),h=0;h<=d;++h)!(h<d&&e(p=l[h],h,l))===u&&((u=!u)?s.lineStart():s.lineEnd()),u&&s.point(+a(p,h,l),+t(p,h,l));if(c)return s=null,c+""||null}return o.x=function(l){return arguments.length?(a=typeof l=="function"?l:B(+l),o):a},o.y=function(l){return arguments.length?(t=typeof l=="function"?l:B(+l),o):t},o.defined=function(l){return arguments.length?(e=typeof l=="function"?l:B(!!l),o):e},o.curve=function(l){return arguments.length?(r=l,i!=null&&(s=r(i)),o):r},o.context=function(l){return arguments.length?(l==null?i=s=null:s=r(i=l),o):i},o}function wr(a,t,e){var i=null,r=B(!0),s=null,n=Ee,o=null,l=Zt(h);a=typeof a=="function"?a:a===void 0?Oe:B(+a),t=typeof t=="function"?t:t===void 0?B(0):B(+t),e=typeof e=="function"?e:e===void 0?He:B(+e);function h(p){var u,c,m,g=(p=Le(p)).length,v,_=!1,f,w=new Array(g),k=new Array(g);for(s==null&&(o=n(f=l())),u=0;u<=g;++u){if(!(u<g&&r(v=p[u],u,p))===_)if(_=!_)c=u,o.areaStart(),o.lineStart();else{for(o.lineEnd(),o.lineStart(),m=u-1;m>=c;--m)o.point(w[m],k[m]);o.lineEnd(),o.areaEnd()}_&&(w[u]=+a(v,u,p),k[u]=+t(v,u,p),o.point(i?+i(v,u,p):w[u],e?+e(v,u,p):k[u]))}if(f)return o=null,f+""||null}function d(){return Di().defined(r).curve(n).context(s)}return h.x=function(p){return arguments.length?(a=typeof p=="function"?p:B(+p),i=null,h):a},h.x0=function(p){return arguments.length?(a=typeof p=="function"?p:B(+p),h):a},h.x1=function(p){return arguments.length?(i=p==null?null:typeof p=="function"?p:B(+p),h):i},h.y=function(p){return arguments.length?(t=typeof p=="function"?p:B(+p),e=null,h):t},h.y0=function(p){return arguments.length?(t=typeof p=="function"?p:B(+p),h):t},h.y1=function(p){return arguments.length?(e=p==null?null:typeof p=="function"?p:B(+p),h):e},h.lineX0=h.lineY0=function(){return d().x(a).y(t)},h.lineY1=function(){return d().x(a).y(e)},h.lineX1=function(){return d().x(i).y(t)},h.defined=function(p){return arguments.length?(r=typeof p=="function"?p:B(!!p),h):r},h.curve=function(p){return arguments.length?(n=p,s!=null&&(o=n(s)),h):n},h.context=function(p){return arguments.length?(p==null?s=o=null:o=n(s=p),h):s},h}function Ts(a,t,e){a._context.bezierCurveTo(a._x1+a._k*(a._x2-a._x0),a._y1+a._k*(a._y2-a._y0),a._x2+a._k*(a._x1-t),a._y2+a._k*(a._y1-e),a._x2,a._y2)}function ws(a,t){this._context=a,this._k=(1-t)/6}ws.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Ts(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(a,t){switch(a=+a,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(a,t):this._context.moveTo(a,t);break;case 1:this._point=2,this._x1=a,this._y1=t;break;case 2:this._point=3;default:Ts(this,a,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=a,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Pr=(function a(t){function e(i){return new ws(i,t)}return e.tension=function(i){return a(+i)},e})(0);function Ps(a,t){this._context=a,this._t=t}Ps.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(a,t){switch(a=+a,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(a,t):this._context.moveTo(a,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(a,t);else{var e=this._x*(1-this._t)+a*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,t)}break}}this._x=a,this._y=t}};function kr(a){return new Ps(a,1)}export{ct as a,te as b,ji as c,Bt as d,Wt as e,ks as f,Cs as g,xe as h,X as i,$s as j,Z as k,nt as l,As as m,Bs as n,Is as o,Ns as p,vt as q,it as r,ft as s,we as t,Mt as u,$r as v,Ar as w,Br as x,zt as y,z,N as A,xt as B,bt as C,Ce as D,ra as E,st as F,mt as G,G as H,Dt as I,Tt as J,lt as K,Kt as L,Yt as M,fi as N,ir as O,It as P,L as Q,ht as R,K as S,b as T,gs as U,Se as V,is as W,re as X,wt as Y,qa as Z,hs as _,dr as $,us as aa,ps as ba,Ae as ca,ss as da,tt as ea,rs as fa,sr as ga,ns as ha,lr as ia,Lt as ja,os as ka,hr as la,ls as ma,ae as na,Pt as oa,Et as pa,ne as qa,Tr as ra,Di as sa,wr as ta,Pr as ua,kr as va,kt as wa,oe as xa,le as ya,he as za};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import k from"./WRB2DEQ6.js";import{a as V}from"./YEPGUNSV.js";import i from"./DP2UXNPJ.js";import h from"./HU57LQOA.js";import g from"./SKV3CQSZ.js";import"./WJQUE4DR.js";import{b as U,c as Z,d as j}from"./366GLQ5R.js";import f from"./ZRT4RJ62.js";import{a as P}from"./SAI7K4OO.js";import e from"./3VFPLRD3.js";import d from"./E3RBRDUV.js";import{f as L,h as S}from"./FY7P5YLX.js";import"./IRDDLVT2.js";import b from"./TJHVEY7T.js";import{a as x}from"./LXME6MU5.js";import{P as M,Q as v,R as N,T as y,X as c,Y as R,_ as B,a as O,b as a,o as C,p as $,x as A}from"./IW3P4TGM.js";import"./TAVTDQ6S.js";export default $arcgis.t(([Q,{substitute:u,formatNumber:I},{watch:r},{stripHTML:k},W,{renderingSanitizer:F},{initializeProjection:Y},ee,,,,z,,,{d:H},{c:K,d:G}])=>{var te=O`:host{display:flex;overflow:hidden;flex:1 1 auto}.root{--calcite-color-background: var(--calcite-color-foreground-1);display:flex;overflow:hidden;flex:1 1 auto;flex-direction:column}.root img{image-orientation:from-image}.flow-item-collapsed{--calcite-flow-border-color: none}.container{display:flex;flex:1 1 auto;background-color:var(--calcite-color-foreground-1)}.container calcite-list{width:100%}.container:not(:empty,.content-hidden){padding:var(--arcgis-internal-padding-md, var(--calcite-space-md))}.root .arcgis-feature,.root .arcgis-feature-relationship,.root .arcgis-feature-utility-network-associations{background-color:transparent}.heading{word-break:break-word;word-wrap:break-word}.header,.footer{display:flex;align-items:center;justify-content:flex-end;background-color:var(--calcite-color-foreground-1)}.footer{flex:1}.pagination-text{padding-inline:var(--calcite-space-sm);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size-sm)}.loader{align-self:center;padding-inline:var(--calcite-space-lg)}.pagination-action-bar{flex:1}.pagination-menu-button{padding-inline:var(--calcite-space-2xs);border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.icon{display:inline-block;flex:0 0 var(--calcite-space-lg);width:var(--calcite-space-lg);height:var(--calcite-space-lg)}.action-image{flex:0 0 var(--calcite-space-lg);background-position:50% 50%;background-repeat:no-repeat;background-size:contain;width:var(--calcite-space-lg);height:var(--calcite-space-lg)}.header{border-block-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.content-feature{--calcite-flow-item-footer-padding: 0}.feature-menu-observer{position:relative;bottom:var(--calcite-space-2xl);z-index:2;text-align:center}.action-exit{transform:scaleX(-1)}`,ie=new ee({icon:"magnifying-glass-plus",id:"zoom-to-feature",title:"{messages.zoom}"}),_=ie.clone(),se=25;function ne(E){return E?.declaredClass.startsWith("esri.layers.")??!1}var oe=z(Q),D=class extends N{constructor(){super(...arguments),this._direction=L(),this._fetchFeaturesController=null,this._featureMenuIntersectionObserverCallback=([e])=>{e?.isIntersecting&&this.viewModel.featurePage!=null&&this.viewModel.featurePage++},this._featureMenuIntersectionObserver=new IntersectionObserver(this._featureMenuIntersectionObserverCallback,{root:window.document}),this._featureMenuIntersectionObserverNode=null,this._rootFlowItemNode=M(),this._featureMenuViewportNode=M(),this._actionBarMenuNode=M(),this._flowContainerNode=M(),this.messages=P(),this._selectedFeatureComponent=M(),this._cancelOpenRelatedFeature=()=>{let{_openRelatedFeatureAbortController:e}=this;e&&e.abort(),this._openRelatedFeatureAbortController=null},this._spinnerVisible=!1,this._spinnerVisibilityTimeout=null,this._openRelatedFeatureAbortController=null,this.flowItems=new W,this.viewModel=oe(this),this.actions=this.viewModel.actions,this.active=this.viewModel.active,this.autoDestroyDisabled=!1,this.collapsed=!1,this.content=this.viewModel.content,this.defaultPopupTemplateEnabled=this.viewModel.defaultPopupTemplateEnabled,this.featureCount=this.viewModel.featureCount,this.featureMenuOpen=this.viewModel.featureMenuOpen,this.featureMenuTitle=this.viewModel.featureMenuTitle,this.featureNavigationTop=!1,this.features=this.viewModel.features,this.featuresPerPage=this.viewModel.featuresPerPage,this.featureViewModelAbilities=this.viewModel.featureViewModelAbilities,this.goToOverride=this.viewModel.goToOverride,this.headerActions=new W,this.heading=this.viewModel.title,this.headingLevel=2,this.hideActionBar=!1,this.hideCloseButton=!1,this.hideFeatureMenuHeading=!1,this.hideFeatureNavigation=!1,this.hideFeatureListLayerTitle=!1,this.hideHeading=!1,this.hideSelectFeature=!1,this.hideSpinner=!1,this.hideContent=!1,this.hideExpressionContent=!1,this.hideLastEditedInfo=!1,this.highlightDisabled=this.viewModel.highlightEnabled,this.includeDefaultActionsDisabled=this.viewModel.includeDefaultActions,this.initialDisplayMode=this.viewModel.initialDisplayMode,this.location=this.viewModel.location,this.map=this.viewModel.map,this.open=this.viewModel.visible,this.promises=this.viewModel.promises,this.responsiveActionsEnabled=!1,this.selectedFeature=this.viewModel.selectedFeature,this.selectedFeatureIndex=this.viewModel.selectedFeatureIndex,this.showCollapseButton=!1,this.spatialReference=this.viewModel.spatialReference,this.state=this.viewModel.state,this.timeZone=this.viewModel.timeZone,this.updateLocationEnabled=this.viewModel.updateLocationEnabled,this.view=this.viewModel.view,this.arcgisPropertyChange=S()("active","collapsed","effectiveHeading","featureCount","featureMenuOpen","features","promises","selectedDrillInFeature","selectedFeature","selectedFeatureComponent","selectedFeatureIndex","state","open"),this.arcgisReady=A(),this.arcgisClose=A(),this.arcgisTriggerAction=A()}static{this.properties={_openRelatedFeatureAbortController:16,flowItems:16,_hideActionText:16,_featureNavigationVisible:16,_isCollapsed:16,_collapseEnabled:16,_featureFlowItemSelected:16,viewModel:0,actions:0,active:0,autoDestroyDisabled:5,collapseDirection:1,collapsed:5,content:1,defaultPopupTemplateEnabled:5,effectiveHeading:32,featureCount:9,featureMenuOpen:5,featureMenuTitle:1,featureNavigationTop:5,features:0,featuresPerPage:9,featureViewModelAbilities:0,goToOverride:0,headerActions:0,heading:1,headingLevel:9,hideActionBar:5,hideCloseButton:5,hideFeatureMenuHeading:5,hideFeatureNavigation:5,hideFeatureListLayerTitle:5,hideHeading:5,hideSelectFeature:5,hideSpinner:5,hideContent:5,chartAnimationDisabled:5,hideAttachmentsContent:5,hideCustomContent:5,hideExpressionContent:5,hideFieldsContent:5,hideMediaContent:5,hideRelationshipContent:5,hideTextContent:5,hideUtilityNetworkContent:5,hideLastEditedInfo:5,highlightDisabled:5,icon:1,includeDefaultActionsDisabled:5,initialDisplayMode:1,label:1,location:0,map:0,messageOverrides:0,open:5,referenceElement:1,promises:0,responsiveActionsEnabled:5,selectedDrillInFeature:32,selectedFeature:0,selectedFeatureComponent:32,selectedFeatureIndex:9,showCollapseButton:5,spatialReference:0,state:32,timeZone:1,updateLocationEnabled:5,view:0}}static{this.styles=te}get _hideActionText(){if(!this.responsiveActionsEnabled)return!1;let e=this.viewModel.view?.widthBreakpoint;return e==="xsmall"||e==="small"||e==="medium"}get _featureNavigationVisible(){return this.viewModel.active&&this.viewModel.featureCount>1&&!!this.viewModel.selectedFeature&&!this.hideFeatureNavigation}get _isCollapsed(){return this._collapseEnabled&&this.collapsed}get _collapseEnabled(){return this.showCollapseButton&&(this.initialDisplayMode==="list"||!!(this.heading||this.viewModel.selectedFeatureViewModel?.title)&&!!(this.content||this.viewModel.selectedFeatureViewModel?.content))}get _featureFlowItemSelected(){return this.initialDisplayMode==="list"?!!this.selectedFeature:!this.featureMenuOpen}get chartAnimationDisabled(){return!(this.viewModel.featureViewModelAbilities?.chartAnimation??!0)}set chartAnimationDisabled(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.chartAnimation=!e}get hideAttachmentsContent(){return!(this.viewModel.featureViewModelAbilities?.attachmentsContent??!0)}set hideAttachmentsContent(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.attachmentsContent=!e}get hideCustomContent(){return!(this.viewModel.featureViewModelAbilities?.customContent??!0)}set hideCustomContent(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.customContent=!e}get hideFieldsContent(){return!(this.viewModel.featureViewModelAbilities?.fieldsContent??!0)}set hideFieldsContent(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.fieldsContent=!e}get hideMediaContent(){return!(this.viewModel.featureViewModelAbilities?.mediaContent??!0)}set hideMediaContent(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.mediaContent=!e}get hideRelationshipContent(){return!(this.viewModel.featureViewModelAbilities?.relationshipContent??!0)}set hideRelationshipContent(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.relationshipContent=!e}get hideTextContent(){return!(this.viewModel.featureViewModelAbilities?.textContent??!0)}set hideTextContent(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.textContent=!e}get hideUtilityNetworkContent(){return!(this.viewModel.featureViewModelAbilities?.utilityNetworkAssociationsContent??!0)}set hideUtilityNetworkContent(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.utilityNetworkAssociationsContent=!e}async clear(){return this.viewModel.clear()}async close(){this.open=!1}async destroy(){await this.manager.destroy(),this._clearSpinnerVisibilityTimeout(),this._removeSpinner(this.referenceElement),this._cancelOpenRelatedFeature(),this._removeFlowItems(),this._unobserveFeatureMenuObserver(),this._cancelFetchingFeatures(),this._featureMenuIntersectionObserver?.disconnect()}async fetchFeatures(e,t){this._cancelFetchingFeatures();let{signal:s}=t??{},i=new AbortController,{signal:n}=i,o=s?AbortSignal.any([n,s]):n;if(this._fetchFeaturesController=i,!e&&this.view&&this.location&&(await Y(this.location.spatialReference,this.view.spatialReference,null,{signal:o}),e=this.view.toScreen(this.location)??void 0),!e)return;let l=await this.viewModel.fetchFeatures(e,{...t,signal:o});this.location=l.location,this.promises=l.pendingFeatures}async next(){return $("warn",this,"The return type of FeaturesViewModel on the next() method is deprecated. At 6.0, this method will return void."),this.viewModel.next()}async previous(){return $("warn",this,"The return type of FeaturesViewModel on the previous() method is deprecated. At 6.0, this method will return void."),this.viewModel.previous()}async setFocus(){this._flowContainerNode.value?.setFocus()}async triggerAction(e){if($("warn",this,"The triggerAction() method is deprecated since 5.1. Trigger actions with manual user interaction within the component.",{once:!0}),!e.disabled)return e?.type==="toggle"&&(e.value=!e.value),await G(e,this.viewModel)}connectedCallback(){super.connectedCallback(),this._createSpinner()}disconnectedCallback(){super.disconnectedCallback(),this._clearSpinnerVisibilityTimeout(),this._removeSpinner(this.referenceElement)}loaded(){this.manager.onLifecycle(()=>[r(()=>this.viewModel?.selectedFeatureIndex,(e,t)=>this._selectedFeatureIndexUpdated(e,t)),r(()=>this.viewModel?.view,(e,t)=>t&&this._viewChange()),r(()=>this._spinnerEl?.screenLocation,()=>this._closeOpenActionMenu()),r(()=>this.selectedFeatureComponent?.viewModel,()=>this._removeFlowItems()),r(()=>this.viewModel?.featureViewModels,()=>this._featureMenuViewportScrollTop()),r(()=>this.flowItems.length,()=>this._syncSelectedDrillInFeature()),r(()=>[this.viewModel?.title,this.viewModel?.selectedFeatureViewModel?.title,this.viewModel?.selectedFeatureViewModel?.state],()=>this._syncEffectiveHeading(),{initial:!0}),r(()=>[this.flowItems?.length,this.featureMenuOpen],()=>{this.setFocus()}),r(()=>this.referenceElement,(e,t)=>{this._removeSpinner(t),this._createSpinner()},{initial:!0}),r(()=>[this.hideSpinner,this.viewModel?.view,this.viewModel?.location,this.viewModel?.waitingForResult,this.viewModel?.visible],()=>this._createSpinner(),{initial:!0})])}updated(){let e=this._selectedFeatureComponent.value??void 0;this.selectedFeatureComponent!==e&&C(()=>this.selectedFeatureComponent=e)}_syncSelectedDrillInFeature(){let e=this.flowItems.getItemAt(this.flowItems.length-1);C(()=>this.selectedDrillInFeature=e?.graphic??void 0)}_syncEffectiveHeading(){let e=this._calculateEffectiveHeading();this.effectiveHeading!==e&&C(()=>this.effectiveHeading=e)}_cancelFetchingFeatures(){this._fetchFeaturesController?.abort(),this._fetchFeaturesController=null}_handleClose(){this.close(),this.arcgisClose.emit()}_groupResultsByLayer(){let{featureViewModels:e}=this.viewModel,t=new Map;return e.forEach(s=>{let i=s?.graphic;if(!i)return;let n=H(i),o=ne(n)?n:null,l=t.get(o)??[];t.set(o,[...l,s])}),t}_handleCollapseToggle(){this.collapsed=!this.collapsed}async _openRelatedFeature(e){this._cancelOpenRelatedFeature();let t=new AbortController;if(this._openRelatedFeatureAbortController=t,await e.updateGeometry(),this._openRelatedFeatureAbortController!==t)return;let s=e.graphic,i=s?.geometry;if(i==null||s==null){this._openRelatedFeatureAbortController===t&&(this._openRelatedFeatureAbortController=null);return}if(this._removeFlowItems(),await this.viewModel.zoomTo({target:i}),this._openRelatedFeatureAbortController!==t)return;let{labelPointExecute:n}=await $arcgis.t(m=>m[0],"geometry/operators/labelPointOperator");if(this._openRelatedFeatureAbortController!==t)return;let o=n(i);o!=null&&(this.location=o),this.features=[s],this.open=!0,await this.setFocus(),this._openRelatedFeatureAbortController===t&&(this._openRelatedFeatureAbortController=null)}_handlePaginationMenuButton(){this._updateFeatureMenu()}_openFeatureMenu(){this._updateFeatureMenu(!0)}_closeFeatureMenu(){this._updateFeatureMenu(!1)}_updateFeatureMenu(e=!this.featureMenuOpen){this.featureMenuOpen=e}_previousFeature(){this.viewModel.previous()}_nextFeature(){this.viewModel.next()}_handleFeatureBack(){this.initialDisplayMode==="list"?(this.selectedFeatureIndex=-1,this.setFocus()):this._openFeatureMenu()}_handleFeatureMenuBack(){this.initialDisplayMode==="list"?(this.selectedFeatureIndex=-1,this.setFocus()):this.featureMenuOpen&&this._closeFeatureMenu()}_setActiveFeature(e){let{viewModel:t}=this;t.activeFeature=t.features?.[e]||null}_removeActiveFeature(){this.viewModel.activeFeature=null}_selectFeature(e){this.viewModel.selectedFeatureIndex=e,this.initialDisplayMode==="feature"?this._handleFeatureMenuBack():this.setFocus()}_unobserveFeatureMenuObserver(){this._featureMenuIntersectionObserverNode&&this._featureMenuIntersectionObserver.unobserve(this._featureMenuIntersectionObserverNode)}_featureMenuIntersectionObserverCreated(e){this._unobserveFeatureMenuObserver(),e&&this._featureMenuIntersectionObserver.observe(e),this._featureMenuIntersectionObserverNode=e}_getActionTitle(e){let{messages:t,selectedFeature:s}=this,{id:i}=e,n=s?.attributes,o=e.title??"",l=i==="zoom-to-feature"?u(o,{messages:t}):i==="remove-selected-feature"?u(o,{messages:t}):i==="zoom-to-clustered-features"?u(o,{messages:t}):i==="browse-clustered-features"?u(o,{messages:t}):e.title;return l&&n?u(l,n):l??""}_onMainKeydown(e){let{key:t}=e;e.defaultPrevented||U(e)||(j(t,this._direction,{horizontalOnly:!0})&&(e.stopPropagation(),e.preventDefault(),this._handleFeatureMenuBack(),this.previous(),this.setFocus()),Z(t,this._direction,{horizontalOnly:!0})&&(e.stopPropagation(),e.preventDefault(),this._handleFeatureMenuBack(),this.next(),this.setFocus()))}_featureMenuViewportScrollTop(){this._featureMenuViewportNode.value?.scrollContentTo({top:0})}_selectedFeatureIndexUpdated(e,t){let{featureCount:s,waitingForResult:i}=this.viewModel;i||!s||e===t||e===-1||(this._removeFlowItems(),this._rootFlowItemNode.value?.scrollContentTo({top:0}))}_triggerAction(e){this.triggerAction(e),this.arcgisTriggerAction.emit({action:e})}_viewChange(){this.viewModel.clear(),this.open=!1}_closeOpenActionMenu(){let{_actionBarMenuNode:e}=this;e.value&&(e.value.menuOpen=!1)}_removeFlowItems(){this.flowItems?.destroyAll()}_getDrillInFlowItemDescription(e){switch(e.flowType){case"feature":case"feature-association":case"feature-utility-network-associations":case"feature-utility-network-association-type":return e.description;case"feature-relationship":return e.allItemsDescription}}_handleDrillInBackClick(){this.flowItems?.pop()?.destroy()}_calculateEffectiveHeading(){let{title:e,selectedFeatureViewModel:t}=this.viewModel;return t?t?.state==="error"?this.messages?.errorMessage??"":t?.title||"":e??""}_getHeading(){return!this.hideHeading&&this.effectiveHeading?this.effectiveHeading:""}_removeSpinner(e){e?.manager?.component?.extraContent?.remove(this._spinnerEl),this._spinnerEl=void 0}_clearSpinnerVisibilityTimeout(){this._spinnerVisibilityTimeout!=null&&(clearTimeout(this._spinnerVisibilityTimeout),this._spinnerVisibilityTimeout=null)}_getSpinnerTrackLocation(){return!this.hideSpinner&&this.viewModel.visible&&this.viewModel?.waitingForResult?this._spinnerVisible?!0:(this._spinnerVisibilityTimeout??=setTimeout(()=>{this._spinnerVisibilityTimeout=null,this._spinnerVisible=!0,this._createSpinner()},se),!1):(this._clearSpinnerVisibilityTimeout(),this._spinnerVisible=!1,!1)}_createSpinner(){let e=this.referenceElement;e&&(this._removeSpinner(e),this._spinnerEl=R(a`<arcgis-spinner .label=${this.messages.loading??""} .trackLocation=${this._getSpinnerTrackLocation()} .location=${this.viewModel?.location??void 0} .referenceElement=${e} .view=${this.viewModel?.view??void 0}></arcgis-spinner>`),e.manager?.component?.extraContent?.add(this._spinnerEl))}render(){return a`<div class="root" @keydown=${this._onMainKeydown}>${this._renderHeader()}${this._renderContentContainer()}</div>`}_renderFeatureNavigation(){return[this._renderPagination(),this.initialDisplayMode==="list"?this._renderFeaturePaginationText():this._renderFeatureMenuButton()]}_renderHeader(){return this.featureNavigationTop&&this._featureNavigationVisible?a`<div class="header">${this._renderFeatureNavigation()}</div>`:null}_renderFooter(){return!this.featureNavigationTop&&this._featureNavigationVisible?a`<div class="footer" slot=footer>${this._renderFeatureNavigation()}</div>`:null}_renderFeaturePaginationText(){let{messages:e,viewModel:t}=this,{featureCount:s,selectedFeatureIndex:i}=t;return a`<div class="pagination-text">${u(e.pageText??"",{index:I(i+1),total:I(s)})}</div>`}_renderFeatureMenuButton(){let{messages:e,viewModel:t}=this,{featureCount:s,streamingFeatures:i,selectedFeatureIndex:n,pendingPromisesCount:o}=t,l=o>0||i;return a`<calcite-action class="pagination-menu-button" icon=list .label=${e.selectFeature} .loading=${l} @click=${this._handlePaginationMenuButton} .text=${u(e.pageText??"",{index:I(n+1),total:I(s)})} text-enabled title=${e.selectFeature??c}></calcite-action>`}_renderPagination(){let{previous:e,next:t}=this.messages;return a`<calcite-action-bar class="pagination-action-bar" expand-toggle-disabled layout=horizontal overflow-mode=none scale=s><calcite-action-group scale=s><calcite-action class="pagination-previous" icon=chevron-left icon-flip-rtl .label=${e??""} @click=${this._previousFeature} .text=${e??""} title=${e??""??c}></calcite-action><calcite-action icon=chevron-right icon-flip-rtl .label=${t??""} @click=${this._nextFeature} .text=${t??""} title=${t??""??c}></calcite-action></calcite-action-group></calcite-action-bar>`}_renderFeatureMenuItem(e){let{initialDisplayMode:t}=this,{selectedFeatureViewModel:s,featureViewModels:i}=this.viewModel,n=e===s,o=i.indexOf(e);return a`<calcite-list-item @blur=${this._removeActiveFeature} @focus=${()=>this._setActiveFeature(o)} @mouseleave=${this._removeActiveFeature} @mouseover=${()=>this._setActiveFeature(o)} .selected=${n} @calciteListItemSelect=${()=>this._selectFeature(o)}><span .innerHTML=${(F.sanitize(e.title)||this.messages.untitled)??""} slot=content></span>${t==="list"?a`<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon>`:null}</calcite-list-item>`}_renderFeatureMenu(){let{messages:e,viewModel:t}=this,s=this._groupResultsByLayer(),i=this.initialDisplayMode==="list"?"none":"single";return t.featureViewModels.length?a`<calcite-list display-mode=flat .label=${e?.featuresList??""} selection-appearance=icon .selectionMode=${i}>${Array.from(s.keys(),n=>{let o=s.get(n)?.map(d=>this._renderFeatureMenuItem(d)),l=n?n.title??this.messages.untitled:null;return!this.hideFeatureListLayerTitle&&l!==null?V(n??"map-graphics",a`<calcite-list-item-group .heading=${l}>${o}</calcite-list-item-group>`):o})}</calcite-list>`:null}_renderHeaderAction(e){let t=e.title||"";return e.visible?a`<calcite-action .active=${e.type==="toggle"?e.value:!1} .disabled=${e.disabled} .icon=${e.icon??void 0} .indicator=${e.active} .loading=${e.active} @click=${()=>this._triggerAction(e)} slot=header-actions-end .text=${t} title=${t??c}></calcite-action>`:null}_renderHeaderActions(){return this.headerActions.map(e=>this._renderHeaderAction(e)).toArray()}_renderContentFeature(){let{headingLevel:e,hideCloseButton:t,_isCollapsed:s,_collapseEnabled:i,_featureFlowItemSelected:n,featureNavigationTop:o,flowItems:l,initialDisplayMode:d,selectedFeature:g,hideHeading:f}=this,{active:m,selectedFeatureViewModel:p,content:w}=this.viewModel,h=this._getHeading();if(d==="list"&&!g)return null;let b=l.length===0&&n,T=p?!p.content:!w;return a`<calcite-flow-item class=${y(x({"content-feature":!0,"flow-item-collapsed":s}))} .closable=${!t} .closed=${!m} .collapsed=${s} .collapseDirection=${this.collapseDirection??(o?"down":"up")} .collapsible=${i} .headingLevel=${e} .selected=${b} @calciteFlowItemBack=${this._handleFeatureBack} .loading=${!!this._openRelatedFeatureAbortController} .messageOverrides=${{collapse:this.messages.collapse,expand:this.messages.expand}} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} .heading=${!f&&h?k(h):void 0} ${v(this._rootFlowItemNode)}>${!f&&h?a`<div slot=heading><div .innerHTML=${F.sanitize(h??"")??""}></div></div>`:null}${this._renderHeaderActions()}${this._renderActionBar()}<div class=${y(x("container","content-container",{"content-hidden":T}))}>${this._renderContent()}</div>${this._renderFooter()}</calcite-flow-item>`}_renderFeatureMenuContainer(){let{viewModel:e,hideCloseButton:t,featureMenuTitle:s,messages:i,initialDisplayMode:n,featureMenuOpen:o,_featureFlowItemSelected:l,_collapseEnabled:d,_isCollapsed:g,featureNavigationTop:f,headingLevel:m}=this,{active:p,featureViewModels:w,streamingFeatures:h,pendingPromisesCount:b}=e,T=b>0||h,X=s??i.selectFeature;if(n==="feature"&&!o)return null;let q=!l;return a`<calcite-flow-item class=${y(x({"flow-item-collapsed":g}))} .closable=${n==="list"&&!t} .closed=${!p} .collapsed=${n==="list"&&g} .collapseDirection=${this.collapseDirection??(f?"down":"up")} .collapsible=${n==="list"&&d} .messageOverrides=${{collapse:this.messages.collapse,expand:this.messages.expand}} .description=${this.hideFeatureMenuHeading?void 0:u(i.total??"",{total:w.length})} .heading=${this.hideFeatureMenuHeading?void 0:X} .headingLevel=${m} .loading=${e.waitingForContents} .selected=${q} @calciteFlowItemBack=${J=>{J.preventDefault(),this._handleFeatureMenuBack()}} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} ${v(this._featureMenuViewportNode)}>${n==="list"?this._renderHeaderActions():null}${T?a`<calcite-loader class="loader" inline .label=${i.loading??""} slot=header-actions-end></calcite-loader>`:null}<div class="container">${this._renderFeatureMenu()}</div><div class="feature-menu-observer" ${v(this._featureMenuIntersectionObserverCreated)}></div>${n==="feature"?a`<calcite-button appearance=transparent @click=${this._handleFeatureMenuBack} slot=footer-start width=full>${i.back}</calcite-button>`:null}</calcite-flow-item>`}_renderFlowItem(e,t){let{messages:s,hideCloseButton:i,hideSelectFeature:n,active:o,hideHeading:l}=this,d="graphic"in e&&"isFeatureFromTable"in e&&!e.isFeatureFromTable,g=d&&!n,f=e.flowType==="feature-association",m=s.returnToInitialFeature??"",p=s?.selectFeature,w=this._getActionTitle(_),h=!this.hideActionBar&&f&&d;return a`<calcite-flow-item .closable=${!i} .closed=${!o} .description=${k(this._getDrillInFlowItemDescription(e)??"")} .heading=${l?void 0:k(e.heading??"")} .selected=${t} @calciteFlowItemBack=${b=>{b.preventDefault(),this._handleDrillInBackClick()}} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose}>${l?null:a`<div slot=heading><div .innerHTML=${F.sanitize(e.heading??"")??""}></div></div>`}<div slot=description><div .innerHTML=${F.sanitize(this._getDrillInFlowItemDescription(e)??"")??""}></div></div><calcite-action class="action-exit" icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${m??""} title=${m??""??c}></calcite-action>${g?a`<calcite-action icon=zoom-to-object @click=${()=>this._openRelatedFeature(e)} slot=header-actions-end .text=${p??""} title=${p??c}></calcite-action>`:null}${h?a`<calcite-action-bar expand-toggle-disabled expanded scale=s slot=action-bar><calcite-action-group overlay-positioning=fixed scale=s><calcite-action .disabled=${_.disabled} .icon=${_.icon??void 0} .loading=${_.active} scale=s text-enabled .text=${w} title=${w??c} @click=${()=>K(this.viewModel,_,e.viewModel)}></calcite-action></calcite-action-group></calcite-action-bar>`:null}<div class="container">${e}</div></calcite-flow-item>`}_renderContentContainer(){let e=this.flowItems?.toArray(),t=e?.map((i,n)=>this._renderFlowItem(i,this._featureFlowItemSelected&&n===e.length-1)),s=this.initialDisplayMode==="list"?[this._renderFeatureMenuContainer(),this._renderContentFeature(),t]:[this._renderContentFeature(),t,this._renderFeatureMenuContainer()];return a`<calcite-flow ${v(this._flowContainerNode)}>${s}</calcite-flow>`}_renderActionBar(){let e=this.viewModel.selectedFeatureViewModel?.isFeatureFromTable&&!this.location?this.viewModel.allActions.filter(t=>t.id!==_.id):this.viewModel.allActions;return!this._isCollapsed&&!this.hideActionBar&&e.length?a`<calcite-action-bar expand-toggle-disabled .expanded=${!this._hideActionText} scale=s slot=action-bar><calcite-action-group overlay-positioning=fixed scale=s ${v(this._actionBarMenuNode)}>${this._renderActions()}</calcite-action-group></calcite-action-bar>`:null}_renderActions(){return this.viewModel.allActions.toArray().map(e=>{let t=this._getActionTitle(e);return a`<calcite-action .active=${e.type==="toggle"?e.value:!1} .disabled=${e.disabled} .icon=${e.icon??void 0} .loading=${e.active} scale=s .textEnabled=${!this._hideActionText} .text=${t??""} title=${t??c} .hidden=${!e.visible} @click=${()=>this._triggerAction(e)}></calcite-action>`})}_renderContent(){let{content:e,selectedFeatureViewModel:t}=this.viewModel;return t?a`<arcgis-feature .autoDestroyDisabled=${this.autoDestroyDisabled} .chartAnimationDisabled=${this.chartAnimationDisabled} .defaultPopupTemplateEnabled=${this.defaultPopupTemplateEnabled} .flowItems=${this.flowItems} .graphic=${t.graphic} .headingLevel=${this.headingLevel+1} .hideAttachmentsContent=${this.hideAttachmentsContent} .hideContent=${this.hideContent} .hideCustomContent=${this.hideCustomContent} .hideExpressionContent=${this.hideExpressionContent} .hideFieldsContent=${this.hideFieldsContent} hide-heading .hideLastEditedInfo=${this.hideLastEditedInfo} .hideMediaContent=${this.hideMediaContent} .hideTextContent=${this.hideTextContent} .location=${this.location} .map=${this.map} .messageOverrides=${this.messageOverrides} .referenceElement=${this.referenceElement} .showRelationshipContent=${!this.hideRelationshipContent} .showUtilityNetworkContent=${!this.hideUtilityNetworkContent} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} ${v(this._selectedFeatureComponent)}></arcgis-feature>`:typeof e=="string"?V(e,a`<div .innerHTML=${F.sanitize(e)??""}></div>`):e??null}};B("arcgis-features",D);return D},"widgets/Features/FeaturesViewModel","intl","core/reactiveUtils","applications/Components/stringUtils","core/Collection","applications/Components/sanitizerUtils","applications/Components/featureUtils","support/actions/ActionButton",b,d,e,f,g,h,i,k)
2
+ import k from"./W6ILOTBW.js";import{a as V}from"./YEPGUNSV.js";import i from"./DP2UXNPJ.js";import h from"./HU57LQOA.js";import g from"./3ZRVPLIZ.js";import"./WJQUE4DR.js";import{b as U,c as Z,d as j}from"./366GLQ5R.js";import f from"./ZRT4RJ62.js";import{a as P}from"./SAI7K4OO.js";import e from"./3VFPLRD3.js";import d from"./E3RBRDUV.js";import{f as L,h as S}from"./FY7P5YLX.js";import"./IRDDLVT2.js";import b from"./TJHVEY7T.js";import{a as x}from"./LXME6MU5.js";import{P as M,Q as v,R as N,T as y,X as c,Y as R,_ as B,a as O,b as a,o as C,p as $,x as A}from"./IW3P4TGM.js";import"./TAVTDQ6S.js";export default $arcgis.t(([Q,{substitute:u,formatNumber:I},{watch:r},{stripHTML:k},W,{renderingSanitizer:F},{initializeProjection:Y},ee,,,,z,,,{d:H},{c:K,d:G}])=>{var te=O`:host{display:flex;overflow:hidden;flex:1 1 auto}.root{--calcite-color-background: var(--calcite-color-foreground-1);display:flex;overflow:hidden;flex:1 1 auto;flex-direction:column}.root img{image-orientation:from-image}.flow-item-collapsed{--calcite-flow-border-color: none}.container{display:flex;flex:1 1 auto;background-color:var(--calcite-color-foreground-1)}.container calcite-list{width:100%}.container:not(:empty,.content-hidden){padding:var(--arcgis-internal-padding-md, var(--calcite-space-md))}.root .arcgis-feature,.root .arcgis-feature-relationship,.root .arcgis-feature-utility-network-associations{background-color:transparent}.heading{word-break:break-word;word-wrap:break-word}.header,.footer{display:flex;align-items:center;justify-content:flex-end;background-color:var(--calcite-color-foreground-1)}.footer{flex:1}.pagination-text{padding-inline:var(--calcite-space-sm);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size-sm)}.loader{align-self:center;padding-inline:var(--calcite-space-lg)}.pagination-action-bar{flex:1}.pagination-menu-button{padding-inline:var(--calcite-space-2xs);border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.icon{display:inline-block;flex:0 0 var(--calcite-space-lg);width:var(--calcite-space-lg);height:var(--calcite-space-lg)}.action-image{flex:0 0 var(--calcite-space-lg);background-position:50% 50%;background-repeat:no-repeat;background-size:contain;width:var(--calcite-space-lg);height:var(--calcite-space-lg)}.header{border-block-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.content-feature{--calcite-flow-item-footer-padding: 0}.feature-menu-observer{position:relative;bottom:var(--calcite-space-2xl);z-index:2;text-align:center}.action-exit{transform:scaleX(-1)}`,ie=new ee({icon:"magnifying-glass-plus",id:"zoom-to-feature",title:"{messages.zoom}"}),_=ie.clone(),se=25;function ne(E){return E?.declaredClass.startsWith("esri.layers.")??!1}var oe=z(Q),D=class extends N{constructor(){super(...arguments),this._direction=L(),this._fetchFeaturesController=null,this._featureMenuIntersectionObserverCallback=([e])=>{e?.isIntersecting&&this.viewModel.featurePage!=null&&this.viewModel.featurePage++},this._featureMenuIntersectionObserver=new IntersectionObserver(this._featureMenuIntersectionObserverCallback,{root:window.document}),this._featureMenuIntersectionObserverNode=null,this._rootFlowItemNode=M(),this._featureMenuViewportNode=M(),this._actionBarMenuNode=M(),this._flowContainerNode=M(),this.messages=P(),this._selectedFeatureComponent=M(),this._cancelOpenRelatedFeature=()=>{let{_openRelatedFeatureAbortController:e}=this;e&&e.abort(),this._openRelatedFeatureAbortController=null},this._spinnerVisible=!1,this._spinnerVisibilityTimeout=null,this._openRelatedFeatureAbortController=null,this.flowItems=new W,this.viewModel=oe(this),this.actions=this.viewModel.actions,this.active=this.viewModel.active,this.autoDestroyDisabled=!1,this.collapsed=!1,this.content=this.viewModel.content,this.defaultPopupTemplateEnabled=this.viewModel.defaultPopupTemplateEnabled,this.featureCount=this.viewModel.featureCount,this.featureMenuOpen=this.viewModel.featureMenuOpen,this.featureMenuTitle=this.viewModel.featureMenuTitle,this.featureNavigationTop=!1,this.features=this.viewModel.features,this.featuresPerPage=this.viewModel.featuresPerPage,this.featureViewModelAbilities=this.viewModel.featureViewModelAbilities,this.goToOverride=this.viewModel.goToOverride,this.headerActions=new W,this.heading=this.viewModel.title,this.headingLevel=2,this.hideActionBar=!1,this.hideCloseButton=!1,this.hideFeatureMenuHeading=!1,this.hideFeatureNavigation=!1,this.hideFeatureListLayerTitle=!1,this.hideHeading=!1,this.hideSelectFeature=!1,this.hideSpinner=!1,this.hideContent=!1,this.hideExpressionContent=!1,this.hideLastEditedInfo=!1,this.highlightDisabled=this.viewModel.highlightEnabled,this.includeDefaultActionsDisabled=this.viewModel.includeDefaultActions,this.initialDisplayMode=this.viewModel.initialDisplayMode,this.location=this.viewModel.location,this.map=this.viewModel.map,this.open=this.viewModel.visible,this.promises=this.viewModel.promises,this.responsiveActionsEnabled=!1,this.selectedFeature=this.viewModel.selectedFeature,this.selectedFeatureIndex=this.viewModel.selectedFeatureIndex,this.showCollapseButton=!1,this.spatialReference=this.viewModel.spatialReference,this.state=this.viewModel.state,this.timeZone=this.viewModel.timeZone,this.updateLocationEnabled=this.viewModel.updateLocationEnabled,this.view=this.viewModel.view,this.arcgisPropertyChange=S()("active","collapsed","effectiveHeading","featureCount","featureMenuOpen","features","promises","selectedDrillInFeature","selectedFeature","selectedFeatureComponent","selectedFeatureIndex","state","open"),this.arcgisReady=A(),this.arcgisClose=A(),this.arcgisTriggerAction=A()}static{this.properties={_openRelatedFeatureAbortController:16,flowItems:16,_hideActionText:16,_featureNavigationVisible:16,_isCollapsed:16,_collapseEnabled:16,_featureFlowItemSelected:16,viewModel:0,actions:0,active:0,autoDestroyDisabled:5,collapseDirection:1,collapsed:5,content:1,defaultPopupTemplateEnabled:5,effectiveHeading:32,featureCount:9,featureMenuOpen:5,featureMenuTitle:1,featureNavigationTop:5,features:0,featuresPerPage:9,featureViewModelAbilities:0,goToOverride:0,headerActions:0,heading:1,headingLevel:9,hideActionBar:5,hideCloseButton:5,hideFeatureMenuHeading:5,hideFeatureNavigation:5,hideFeatureListLayerTitle:5,hideHeading:5,hideSelectFeature:5,hideSpinner:5,hideContent:5,chartAnimationDisabled:5,hideAttachmentsContent:5,hideCustomContent:5,hideExpressionContent:5,hideFieldsContent:5,hideMediaContent:5,hideRelationshipContent:5,hideTextContent:5,hideUtilityNetworkContent:5,hideLastEditedInfo:5,highlightDisabled:5,icon:1,includeDefaultActionsDisabled:5,initialDisplayMode:1,label:1,location:0,map:0,messageOverrides:0,open:5,referenceElement:1,promises:0,responsiveActionsEnabled:5,selectedDrillInFeature:32,selectedFeature:0,selectedFeatureComponent:32,selectedFeatureIndex:9,showCollapseButton:5,spatialReference:0,state:32,timeZone:1,updateLocationEnabled:5,view:0}}static{this.styles=te}get _hideActionText(){if(!this.responsiveActionsEnabled)return!1;let e=this.viewModel.view?.widthBreakpoint;return e==="xsmall"||e==="small"||e==="medium"}get _featureNavigationVisible(){return this.viewModel.active&&this.viewModel.featureCount>1&&!!this.viewModel.selectedFeature&&!this.hideFeatureNavigation}get _isCollapsed(){return this._collapseEnabled&&this.collapsed}get _collapseEnabled(){return this.showCollapseButton&&(this.initialDisplayMode==="list"||!!(this.heading||this.viewModel.selectedFeatureViewModel?.title)&&!!(this.content||this.viewModel.selectedFeatureViewModel?.content))}get _featureFlowItemSelected(){return this.initialDisplayMode==="list"?!!this.selectedFeature:!this.featureMenuOpen}get chartAnimationDisabled(){return!(this.viewModel.featureViewModelAbilities?.chartAnimation??!0)}set chartAnimationDisabled(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.chartAnimation=!e}get hideAttachmentsContent(){return!(this.viewModel.featureViewModelAbilities?.attachmentsContent??!0)}set hideAttachmentsContent(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.attachmentsContent=!e}get hideCustomContent(){return!(this.viewModel.featureViewModelAbilities?.customContent??!0)}set hideCustomContent(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.customContent=!e}get hideFieldsContent(){return!(this.viewModel.featureViewModelAbilities?.fieldsContent??!0)}set hideFieldsContent(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.fieldsContent=!e}get hideMediaContent(){return!(this.viewModel.featureViewModelAbilities?.mediaContent??!0)}set hideMediaContent(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.mediaContent=!e}get hideRelationshipContent(){return!(this.viewModel.featureViewModelAbilities?.relationshipContent??!0)}set hideRelationshipContent(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.relationshipContent=!e}get hideTextContent(){return!(this.viewModel.featureViewModelAbilities?.textContent??!0)}set hideTextContent(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.textContent=!e}get hideUtilityNetworkContent(){return!(this.viewModel.featureViewModelAbilities?.utilityNetworkAssociationsContent??!0)}set hideUtilityNetworkContent(e){this.viewModel.featureViewModelAbilities??={},this.viewModel.featureViewModelAbilities.utilityNetworkAssociationsContent=!e}async clear(){return this.viewModel.clear()}async close(){this.open=!1}async destroy(){await this.manager.destroy(),this._clearSpinnerVisibilityTimeout(),this._removeSpinner(this.referenceElement),this._cancelOpenRelatedFeature(),this._removeFlowItems(),this._unobserveFeatureMenuObserver(),this._cancelFetchingFeatures(),this._featureMenuIntersectionObserver?.disconnect()}async fetchFeatures(e,t){this._cancelFetchingFeatures();let{signal:s}=t??{},i=new AbortController,{signal:n}=i,o=s?AbortSignal.any([n,s]):n;if(this._fetchFeaturesController=i,!e&&this.view&&this.location&&(await Y(this.location.spatialReference,this.view.spatialReference,null,{signal:o}),e=this.view.toScreen(this.location)??void 0),!e)return;let l=await this.viewModel.fetchFeatures(e,{...t,signal:o});this.location=l.location,this.promises=l.pendingFeatures}async next(){return $("warn",this,"The return type of FeaturesViewModel on the next() method is deprecated. At 6.0, this method will return void."),this.viewModel.next()}async previous(){return $("warn",this,"The return type of FeaturesViewModel on the previous() method is deprecated. At 6.0, this method will return void."),this.viewModel.previous()}async setFocus(){this._flowContainerNode.value?.setFocus()}async triggerAction(e){if($("warn",this,"The triggerAction() method is deprecated since 5.1. Trigger actions with manual user interaction within the component.",{once:!0}),!e.disabled)return e?.type==="toggle"&&(e.value=!e.value),await G(e,this.viewModel)}connectedCallback(){super.connectedCallback(),this._createSpinner()}disconnectedCallback(){super.disconnectedCallback(),this._clearSpinnerVisibilityTimeout(),this._removeSpinner(this.referenceElement)}loaded(){this.manager.onLifecycle(()=>[r(()=>this.viewModel?.selectedFeatureIndex,(e,t)=>this._selectedFeatureIndexUpdated(e,t)),r(()=>this.viewModel?.view,(e,t)=>t&&this._viewChange()),r(()=>this._spinnerEl?.screenLocation,()=>this._closeOpenActionMenu()),r(()=>this.selectedFeatureComponent?.viewModel,()=>this._removeFlowItems()),r(()=>this.viewModel?.featureViewModels,()=>this._featureMenuViewportScrollTop()),r(()=>this.flowItems.length,()=>this._syncSelectedDrillInFeature()),r(()=>[this.viewModel?.title,this.viewModel?.selectedFeatureViewModel?.title,this.viewModel?.selectedFeatureViewModel?.state],()=>this._syncEffectiveHeading(),{initial:!0}),r(()=>[this.flowItems?.length,this.featureMenuOpen],()=>{this.setFocus()}),r(()=>this.referenceElement,(e,t)=>{this._removeSpinner(t),this._createSpinner()},{initial:!0}),r(()=>[this.hideSpinner,this.viewModel?.view,this.viewModel?.location,this.viewModel?.waitingForResult,this.viewModel?.visible],()=>this._createSpinner(),{initial:!0})])}updated(){let e=this._selectedFeatureComponent.value??void 0;this.selectedFeatureComponent!==e&&C(()=>this.selectedFeatureComponent=e)}_syncSelectedDrillInFeature(){let e=this.flowItems.getItemAt(this.flowItems.length-1);C(()=>this.selectedDrillInFeature=e?.graphic??void 0)}_syncEffectiveHeading(){let e=this._calculateEffectiveHeading();this.effectiveHeading!==e&&C(()=>this.effectiveHeading=e)}_cancelFetchingFeatures(){this._fetchFeaturesController?.abort(),this._fetchFeaturesController=null}_handleClose(){this.close(),this.arcgisClose.emit()}_groupResultsByLayer(){let{featureViewModels:e}=this.viewModel,t=new Map;return e.forEach(s=>{let i=s?.graphic;if(!i)return;let n=H(i),o=ne(n)?n:null,l=t.get(o)??[];t.set(o,[...l,s])}),t}_handleCollapseToggle(){this.collapsed=!this.collapsed}async _openRelatedFeature(e){this._cancelOpenRelatedFeature();let t=new AbortController;if(this._openRelatedFeatureAbortController=t,await e.updateGeometry(),this._openRelatedFeatureAbortController!==t)return;let s=e.graphic,i=s?.geometry;if(i==null||s==null){this._openRelatedFeatureAbortController===t&&(this._openRelatedFeatureAbortController=null);return}if(this._removeFlowItems(),await this.viewModel.zoomTo({target:i}),this._openRelatedFeatureAbortController!==t)return;let{labelPointExecute:n}=await $arcgis.t(m=>m[0],"geometry/operators/labelPointOperator");if(this._openRelatedFeatureAbortController!==t)return;let o=n(i);o!=null&&(this.location=o),this.features=[s],this.open=!0,await this.setFocus(),this._openRelatedFeatureAbortController===t&&(this._openRelatedFeatureAbortController=null)}_handlePaginationMenuButton(){this._updateFeatureMenu()}_openFeatureMenu(){this._updateFeatureMenu(!0)}_closeFeatureMenu(){this._updateFeatureMenu(!1)}_updateFeatureMenu(e=!this.featureMenuOpen){this.featureMenuOpen=e}_previousFeature(){this.viewModel.previous()}_nextFeature(){this.viewModel.next()}_handleFeatureBack(){this.initialDisplayMode==="list"?(this.selectedFeatureIndex=-1,this.setFocus()):this._openFeatureMenu()}_handleFeatureMenuBack(){this.initialDisplayMode==="list"?(this.selectedFeatureIndex=-1,this.setFocus()):this.featureMenuOpen&&this._closeFeatureMenu()}_setActiveFeature(e){let{viewModel:t}=this;t.activeFeature=t.features?.[e]||null}_removeActiveFeature(){this.viewModel.activeFeature=null}_selectFeature(e){this.viewModel.selectedFeatureIndex=e,this.initialDisplayMode==="feature"?this._handleFeatureMenuBack():this.setFocus()}_unobserveFeatureMenuObserver(){this._featureMenuIntersectionObserverNode&&this._featureMenuIntersectionObserver.unobserve(this._featureMenuIntersectionObserverNode)}_featureMenuIntersectionObserverCreated(e){this._unobserveFeatureMenuObserver(),e&&this._featureMenuIntersectionObserver.observe(e),this._featureMenuIntersectionObserverNode=e}_getActionTitle(e){let{messages:t,selectedFeature:s}=this,{id:i}=e,n=s?.attributes,o=e.title??"",l=i==="zoom-to-feature"?u(o,{messages:t}):i==="remove-selected-feature"?u(o,{messages:t}):i==="zoom-to-clustered-features"?u(o,{messages:t}):i==="browse-clustered-features"?u(o,{messages:t}):e.title;return l&&n?u(l,n):l??""}_onMainKeydown(e){let{key:t}=e;e.defaultPrevented||U(e)||(j(t,this._direction,{horizontalOnly:!0})&&(e.stopPropagation(),e.preventDefault(),this._handleFeatureMenuBack(),this.previous(),this.setFocus()),Z(t,this._direction,{horizontalOnly:!0})&&(e.stopPropagation(),e.preventDefault(),this._handleFeatureMenuBack(),this.next(),this.setFocus()))}_featureMenuViewportScrollTop(){this._featureMenuViewportNode.value?.scrollContentTo({top:0})}_selectedFeatureIndexUpdated(e,t){let{featureCount:s,waitingForResult:i}=this.viewModel;i||!s||e===t||e===-1||(this._removeFlowItems(),this._rootFlowItemNode.value?.scrollContentTo({top:0}))}_triggerAction(e){this.triggerAction(e),this.arcgisTriggerAction.emit({action:e})}_viewChange(){this.viewModel.clear(),this.open=!1}_closeOpenActionMenu(){let{_actionBarMenuNode:e}=this;e.value&&(e.value.menuOpen=!1)}_removeFlowItems(){this.flowItems?.destroyAll()}_getDrillInFlowItemDescription(e){switch(e.flowType){case"feature":case"feature-association":case"feature-utility-network-associations":case"feature-utility-network-association-type":return e.description;case"feature-relationship":return e.allItemsDescription}}_handleDrillInBackClick(){this.flowItems?.pop()?.destroy()}_calculateEffectiveHeading(){let{title:e,selectedFeatureViewModel:t}=this.viewModel;return t?t?.state==="error"?this.messages?.errorMessage??"":t?.title||"":e??""}_getHeading(){return!this.hideHeading&&this.effectiveHeading?this.effectiveHeading:""}_removeSpinner(e){e?.manager?.component?.extraContent?.remove(this._spinnerEl),this._spinnerEl=void 0}_clearSpinnerVisibilityTimeout(){this._spinnerVisibilityTimeout!=null&&(clearTimeout(this._spinnerVisibilityTimeout),this._spinnerVisibilityTimeout=null)}_getSpinnerTrackLocation(){return!this.hideSpinner&&this.viewModel.visible&&this.viewModel?.waitingForResult?this._spinnerVisible?!0:(this._spinnerVisibilityTimeout??=setTimeout(()=>{this._spinnerVisibilityTimeout=null,this._spinnerVisible=!0,this._createSpinner()},se),!1):(this._clearSpinnerVisibilityTimeout(),this._spinnerVisible=!1,!1)}_createSpinner(){let e=this.referenceElement;e&&(this._removeSpinner(e),this._spinnerEl=R(a`<arcgis-spinner .label=${this.messages.loading??""} .trackLocation=${this._getSpinnerTrackLocation()} .location=${this.viewModel?.location??void 0} .referenceElement=${e} .view=${this.viewModel?.view??void 0}></arcgis-spinner>`),e.manager?.component?.extraContent?.add(this._spinnerEl))}render(){return a`<div class="root" @keydown=${this._onMainKeydown}>${this._renderHeader()}${this._renderContentContainer()}</div>`}_renderFeatureNavigation(){return[this._renderPagination(),this.initialDisplayMode==="list"?this._renderFeaturePaginationText():this._renderFeatureMenuButton()]}_renderHeader(){return this.featureNavigationTop&&this._featureNavigationVisible?a`<div class="header">${this._renderFeatureNavigation()}</div>`:null}_renderFooter(){return!this.featureNavigationTop&&this._featureNavigationVisible?a`<div class="footer" slot=footer>${this._renderFeatureNavigation()}</div>`:null}_renderFeaturePaginationText(){let{messages:e,viewModel:t}=this,{featureCount:s,selectedFeatureIndex:i}=t;return a`<div class="pagination-text">${u(e.pageText??"",{index:I(i+1),total:I(s)})}</div>`}_renderFeatureMenuButton(){let{messages:e,viewModel:t}=this,{featureCount:s,streamingFeatures:i,selectedFeatureIndex:n,pendingPromisesCount:o}=t,l=o>0||i;return a`<calcite-action class="pagination-menu-button" icon=list .label=${e.selectFeature} .loading=${l} @click=${this._handlePaginationMenuButton} .text=${u(e.pageText??"",{index:I(n+1),total:I(s)})} text-enabled title=${e.selectFeature??c}></calcite-action>`}_renderPagination(){let{previous:e,next:t}=this.messages;return a`<calcite-action-bar class="pagination-action-bar" expand-toggle-disabled layout=horizontal overflow-mode=none scale=s><calcite-action-group scale=s><calcite-action class="pagination-previous" icon=chevron-left icon-flip-rtl .label=${e??""} @click=${this._previousFeature} .text=${e??""} title=${e??""??c}></calcite-action><calcite-action icon=chevron-right icon-flip-rtl .label=${t??""} @click=${this._nextFeature} .text=${t??""} title=${t??""??c}></calcite-action></calcite-action-group></calcite-action-bar>`}_renderFeatureMenuItem(e){let{initialDisplayMode:t}=this,{selectedFeatureViewModel:s,featureViewModels:i}=this.viewModel,n=e===s,o=i.indexOf(e);return a`<calcite-list-item @blur=${this._removeActiveFeature} @focus=${()=>this._setActiveFeature(o)} @mouseleave=${this._removeActiveFeature} @mouseover=${()=>this._setActiveFeature(o)} .selected=${n} @calciteListItemSelect=${()=>this._selectFeature(o)}><span .innerHTML=${(F.sanitize(e.title)||this.messages.untitled)??""} slot=content></span>${t==="list"?a`<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon>`:null}</calcite-list-item>`}_renderFeatureMenu(){let{messages:e,viewModel:t}=this,s=this._groupResultsByLayer(),i=this.initialDisplayMode==="list"?"none":"single";return t.featureViewModels.length?a`<calcite-list display-mode=flat .label=${e?.featuresList??""} selection-appearance=icon .selectionMode=${i}>${Array.from(s.keys(),n=>{let o=s.get(n)?.map(d=>this._renderFeatureMenuItem(d)),l=n?n.title??this.messages.untitled:null;return!this.hideFeatureListLayerTitle&&l!==null?V(n??"map-graphics",a`<calcite-list-item-group .heading=${l}>${o}</calcite-list-item-group>`):o})}</calcite-list>`:null}_renderHeaderAction(e){let t=e.title||"";return e.visible?a`<calcite-action .active=${e.type==="toggle"?e.value:!1} .disabled=${e.disabled} .icon=${e.icon??void 0} .indicator=${e.active} .loading=${e.active} @click=${()=>this._triggerAction(e)} slot=header-actions-end .text=${t} title=${t??c}></calcite-action>`:null}_renderHeaderActions(){return this.headerActions.map(e=>this._renderHeaderAction(e)).toArray()}_renderContentFeature(){let{headingLevel:e,hideCloseButton:t,_isCollapsed:s,_collapseEnabled:i,_featureFlowItemSelected:n,featureNavigationTop:o,flowItems:l,initialDisplayMode:d,selectedFeature:g,hideHeading:f}=this,{active:m,selectedFeatureViewModel:p,content:w}=this.viewModel,h=this._getHeading();if(d==="list"&&!g)return null;let b=l.length===0&&n,T=p?!p.content:!w;return a`<calcite-flow-item class=${y(x({"content-feature":!0,"flow-item-collapsed":s}))} .closable=${!t} .closed=${!m} .collapsed=${s} .collapseDirection=${this.collapseDirection??(o?"down":"up")} .collapsible=${i} .headingLevel=${e} .selected=${b} @calciteFlowItemBack=${this._handleFeatureBack} .loading=${!!this._openRelatedFeatureAbortController} .messageOverrides=${{collapse:this.messages.collapse,expand:this.messages.expand}} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} .heading=${!f&&h?k(h):void 0} ${v(this._rootFlowItemNode)}>${!f&&h?a`<div slot=heading><div .innerHTML=${F.sanitize(h??"")??""}></div></div>`:null}${this._renderHeaderActions()}${this._renderActionBar()}<div class=${y(x("container","content-container",{"content-hidden":T}))}>${this._renderContent()}</div>${this._renderFooter()}</calcite-flow-item>`}_renderFeatureMenuContainer(){let{viewModel:e,hideCloseButton:t,featureMenuTitle:s,messages:i,initialDisplayMode:n,featureMenuOpen:o,_featureFlowItemSelected:l,_collapseEnabled:d,_isCollapsed:g,featureNavigationTop:f,headingLevel:m}=this,{active:p,featureViewModels:w,streamingFeatures:h,pendingPromisesCount:b}=e,T=b>0||h,X=s??i.selectFeature;if(n==="feature"&&!o)return null;let q=!l;return a`<calcite-flow-item class=${y(x({"flow-item-collapsed":g}))} .closable=${n==="list"&&!t} .closed=${!p} .collapsed=${n==="list"&&g} .collapseDirection=${this.collapseDirection??(f?"down":"up")} .collapsible=${n==="list"&&d} .messageOverrides=${{collapse:this.messages.collapse,expand:this.messages.expand}} .description=${this.hideFeatureMenuHeading?void 0:u(i.total??"",{total:w.length})} .heading=${this.hideFeatureMenuHeading?void 0:X} .headingLevel=${m} .loading=${e.waitingForContents} .selected=${q} @calciteFlowItemBack=${J=>{J.preventDefault(),this._handleFeatureMenuBack()}} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} ${v(this._featureMenuViewportNode)}>${n==="list"?this._renderHeaderActions():null}${T?a`<calcite-loader class="loader" inline .label=${i.loading??""} slot=header-actions-end></calcite-loader>`:null}<div class="container">${this._renderFeatureMenu()}</div><div class="feature-menu-observer" ${v(this._featureMenuIntersectionObserverCreated)}></div>${n==="feature"?a`<calcite-button appearance=transparent @click=${this._handleFeatureMenuBack} slot=footer-start width=full>${i.back}</calcite-button>`:null}</calcite-flow-item>`}_renderFlowItem(e,t){let{messages:s,hideCloseButton:i,hideSelectFeature:n,active:o,hideHeading:l}=this,d="graphic"in e&&"isFeatureFromTable"in e&&!e.isFeatureFromTable,g=d&&!n,f=e.flowType==="feature-association",m=s.returnToInitialFeature??"",p=s?.selectFeature,w=this._getActionTitle(_),h=!this.hideActionBar&&f&&d;return a`<calcite-flow-item .closable=${!i} .closed=${!o} .description=${k(this._getDrillInFlowItemDescription(e)??"")} .heading=${l?void 0:k(e.heading??"")} .selected=${t} @calciteFlowItemBack=${b=>{b.preventDefault(),this._handleDrillInBackClick()}} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose}>${l?null:a`<div slot=heading><div .innerHTML=${F.sanitize(e.heading??"")??""}></div></div>`}<div slot=description><div .innerHTML=${F.sanitize(this._getDrillInFlowItemDescription(e)??"")??""}></div></div><calcite-action class="action-exit" icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${m??""} title=${m??""??c}></calcite-action>${g?a`<calcite-action icon=zoom-to-object @click=${()=>this._openRelatedFeature(e)} slot=header-actions-end .text=${p??""} title=${p??c}></calcite-action>`:null}${h?a`<calcite-action-bar expand-toggle-disabled expanded scale=s slot=action-bar><calcite-action-group overlay-positioning=fixed scale=s><calcite-action .disabled=${_.disabled} .icon=${_.icon??void 0} .loading=${_.active} scale=s text-enabled .text=${w} title=${w??c} @click=${()=>K(this.viewModel,_,e.viewModel)}></calcite-action></calcite-action-group></calcite-action-bar>`:null}<div class="container">${e}</div></calcite-flow-item>`}_renderContentContainer(){let e=this.flowItems?.toArray(),t=e?.map((i,n)=>this._renderFlowItem(i,this._featureFlowItemSelected&&n===e.length-1)),s=this.initialDisplayMode==="list"?[this._renderFeatureMenuContainer(),this._renderContentFeature(),t]:[this._renderContentFeature(),t,this._renderFeatureMenuContainer()];return a`<calcite-flow ${v(this._flowContainerNode)}>${s}</calcite-flow>`}_renderActionBar(){let e=this.viewModel.selectedFeatureViewModel?.isFeatureFromTable&&!this.location?this.viewModel.allActions.filter(t=>t.id!==_.id):this.viewModel.allActions;return!this._isCollapsed&&!this.hideActionBar&&e.length?a`<calcite-action-bar expand-toggle-disabled .expanded=${!this._hideActionText} scale=s slot=action-bar><calcite-action-group overlay-positioning=fixed scale=s ${v(this._actionBarMenuNode)}>${this._renderActions()}</calcite-action-group></calcite-action-bar>`:null}_renderActions(){return this.viewModel.allActions.toArray().map(e=>{let t=this._getActionTitle(e);return a`<calcite-action .active=${e.type==="toggle"?e.value:!1} .disabled=${e.disabled} .icon=${e.icon??void 0} .loading=${e.active} scale=s .textEnabled=${!this._hideActionText} .text=${t??""} title=${t??c} .hidden=${!e.visible} @click=${()=>this._triggerAction(e)}></calcite-action>`})}_renderContent(){let{content:e,selectedFeatureViewModel:t}=this.viewModel;return t?a`<arcgis-feature .autoDestroyDisabled=${this.autoDestroyDisabled} .chartAnimationDisabled=${this.chartAnimationDisabled} .defaultPopupTemplateEnabled=${this.defaultPopupTemplateEnabled} .flowItems=${this.flowItems} .graphic=${t.graphic} .headingLevel=${this.headingLevel+1} .hideAttachmentsContent=${this.hideAttachmentsContent} .hideContent=${this.hideContent} .hideCustomContent=${this.hideCustomContent} .hideExpressionContent=${this.hideExpressionContent} .hideFieldsContent=${this.hideFieldsContent} hide-heading .hideLastEditedInfo=${this.hideLastEditedInfo} .hideMediaContent=${this.hideMediaContent} .hideTextContent=${this.hideTextContent} .location=${this.location} .map=${this.map} .messageOverrides=${this.messageOverrides} .referenceElement=${this.referenceElement} .showRelationshipContent=${!this.hideRelationshipContent} .showUtilityNetworkContent=${!this.hideUtilityNetworkContent} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} ${v(this._selectedFeatureComponent)}></arcgis-feature>`:typeof e=="string"?V(e,a`<div .innerHTML=${F.sanitize(e)??""}></div>`):e??null}};B("arcgis-features",D);return D},"widgets/Features/FeaturesViewModel","intl","core/reactiveUtils","applications/Components/stringUtils","core/Collection","applications/Components/sanitizerUtils","applications/Components/featureUtils","support/actions/ActionButton",b,d,e,f,g,h,i,k)