@flyfish-group/file-viewer-web 1.0.9

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 (201) hide show
  1. package/LICENSE +160 -0
  2. package/README.md +41 -0
  3. package/dist/index.d.ts +60 -0
  4. package/dist/index.js +165 -0
  5. package/dist/node.d.ts +23 -0
  6. package/dist/node.js +43 -0
  7. package/package.json +67 -0
  8. package/scripts/copy-assets.mjs +59 -0
  9. package/viewer/assets/AudioViewer-0CSMvCtp.css +1 -0
  10. package/viewer/assets/AudioViewer-HHLkFx24.js +1 -0
  11. package/viewer/assets/CadViewer-BYC0zQ0T.js +1 -0
  12. package/viewer/assets/CadViewer-Cv8b95Gj.css +1 -0
  13. package/viewer/assets/CodeViewer-HGV-dwr6.css +1 -0
  14. package/viewer/assets/CodeViewer-VQE6BewI.js +4 -0
  15. package/viewer/assets/DrawingViewer-BtEGTvJQ.js +2 -0
  16. package/viewer/assets/DrawingViewer-CHm6iXmV.css +1 -0
  17. package/viewer/assets/EpubViewer-5hOhOgl5.js +2 -0
  18. package/viewer/assets/EpubViewer-Cci0l1Vm.css +1 -0
  19. package/viewer/assets/ImageViewer-D2_fTk_7.css +10 -0
  20. package/viewer/assets/ImageViewer-D8t2LOeu.js +1 -0
  21. package/viewer/assets/MarkdownViewer-47tSKoCN.css +1 -0
  22. package/viewer/assets/MarkdownViewer-CauCMix8.js +64 -0
  23. package/viewer/assets/OfdViewer-DZCDN3UD.css +1 -0
  24. package/viewer/assets/OfdViewer-d-bt92VG.js +2 -0
  25. package/viewer/assets/PdfView-BmvyynSl.js +558 -0
  26. package/viewer/assets/PdfView-CS_IFVnD.css +1 -0
  27. package/viewer/assets/PptxRender-BQ5mqB0E.css +1 -0
  28. package/viewer/assets/PptxRender-DPUrsWGR.js +32 -0
  29. package/viewer/assets/UmdViewer-DgDIrlID.js +3 -0
  30. package/viewer/assets/UmdViewer-DpObj56a.css +1 -0
  31. package/viewer/assets/XlsxTable-BxlH06s2.css +1 -0
  32. package/viewer/assets/XlsxTable-Dca8o5_N.js +5 -0
  33. package/viewer/assets/ar-SA-G6X2FPQ2-DWAZRxPu.js +10 -0
  34. package/viewer/assets/arc-Dimj_7G-.js +1 -0
  35. package/viewer/assets/architecture-7EHR7CIX-PuoqTBea.js +1 -0
  36. package/viewer/assets/architectureDiagram-3BPJPVTR-ourcMGqp.js +36 -0
  37. package/viewer/assets/az-AZ-76LH7QW2-CD-SA1wC.js +1 -0
  38. package/viewer/assets/bg-BG-XCXSNQG7-lFFvFyxW.js +5 -0
  39. package/viewer/assets/blockDiagram-GPEHLZMM-DETJLwVU.js +132 -0
  40. package/viewer/assets/bn-BD-2XOGV67Q-CuUcZaL8.js +5 -0
  41. package/viewer/assets/c4Diagram-AAUBKEIU-DCfnD0yS.js +10 -0
  42. package/viewer/assets/ca-ES-6MX7JW3Y-Cj4OlC6R.js +8 -0
  43. package/viewer/assets/channel-Cvj3_InT.js +1 -0
  44. package/viewer/assets/chunk-2J33WTMH-vXxffsmH.js +1 -0
  45. package/viewer/assets/chunk-3OPIFGDE-C9LtEwmG.js +62 -0
  46. package/viewer/assets/chunk-4BX2VUAB-CIKyExbu.js +1 -0
  47. package/viewer/assets/chunk-55IACEB6-uprZKw0K.js +1 -0
  48. package/viewer/assets/chunk-5ZQYHXKU-C2girjDc.js +2 -0
  49. package/viewer/assets/chunk-6U3AYISY-sM9HnDSj.js +12 -0
  50. package/viewer/assets/chunk-727SXJPM-BJJusOVj.js +206 -0
  51. package/viewer/assets/chunk-AGHRB4JF-vbzngFky.js +1 -0
  52. package/viewer/assets/chunk-AQP2D5EJ-BPoH0fiI.js +231 -0
  53. package/viewer/assets/chunk-BSJP7CBP-9m7kELGq.js +1 -0
  54. package/viewer/assets/chunk-CSCIHK7Q-OdsAx3G8.js +124 -0
  55. package/viewer/assets/chunk-EIO257PC-B13QElRc.js +22 -0
  56. package/viewer/assets/chunk-FMBD7UC4-DiXlV5mw.js +15 -0
  57. package/viewer/assets/chunk-K2UTITRG-CJkr0tXj.js +35 -0
  58. package/viewer/assets/chunk-KSCS5N6A-WSLcjFr5.js +10 -0
  59. package/viewer/assets/chunk-L5ZTLDWV-B_HlbJUe.js +1 -0
  60. package/viewer/assets/chunk-LZXEDZCA-Cqd1LSkM.js +2 -0
  61. package/viewer/assets/chunk-ND2GUHAM-28eJdx7E.js +1 -0
  62. package/viewer/assets/chunk-NZK2D7GU-BUIZFEFT.js +1 -0
  63. package/viewer/assets/chunk-O5CBEL6O-DZNjSn6F.js +70 -0
  64. package/viewer/assets/chunk-QZHKN3VN-DQmrlo26.js +1 -0
  65. package/viewer/assets/chunk-SRAX5OIU-D2mqL_eA.js +1 -0
  66. package/viewer/assets/chunk-WU5MYG2G-CI2E4kog.js +1 -0
  67. package/viewer/assets/chunk-XPW4576I-CvDbpA2d.js +32 -0
  68. package/viewer/assets/chunk-Z3N5DIM6-DVAc8Qv7.js +1 -0
  69. package/viewer/assets/chunk-ZUYEQ4TG-DaQMhOk1.js +7 -0
  70. package/viewer/assets/classDiagram-4FO5ZUOK-BR_8dE4R.js +1 -0
  71. package/viewer/assets/classDiagram-v2-Q7XG4LA2-BSPdc-Mh.js +1 -0
  72. package/viewer/assets/cose-bilkent-S5V4N54A-DT4OXn3T.js +1 -0
  73. package/viewer/assets/cs-CZ-2BRQDIVT-9YP2OnzR.js +11 -0
  74. package/viewer/assets/cytoscape.esm-DQPqE0MR.js +321 -0
  75. package/viewer/assets/da-DK-5WZEPLOC-DyH5OvyC.js +5 -0
  76. package/viewer/assets/dagre-BM42HDAG-BQqjetsc.js +4 -0
  77. package/viewer/assets/dagre-D7L3ChvY.js +1 -0
  78. package/viewer/assets/de-DE-XR44H4JA-Dm-lIYs8.js +8 -0
  79. package/viewer/assets/defaultLocale-GXPQCpCV.js +1 -0
  80. package/viewer/assets/diagram-2AECGRRQ-DQj687EE.js +43 -0
  81. package/viewer/assets/diagram-5GNKFQAL-C9cKajpJ.js +10 -0
  82. package/viewer/assets/diagram-KO2AKTUF-BrHr9ddz.js +3 -0
  83. package/viewer/assets/diagram-LMA3HP47-B_3VIpAA.js +24 -0
  84. package/viewer/assets/diagram-OG6HWLK6-CKGkIofl.js +24 -0
  85. package/viewer/assets/directory-open-01563666-DJpMaT5E.js +1 -0
  86. package/viewer/assets/directory-open-4ed118d0-vrMz6VGC.js +1 -0
  87. package/viewer/assets/dist-BWLXExfL.js +27 -0
  88. package/viewer/assets/dist-Bl_HJvJC.js +1 -0
  89. package/viewer/assets/dist-CDIdMEAB.js +7 -0
  90. package/viewer/assets/docx-preview-CiJ_X4bw.js +20 -0
  91. package/viewer/assets/el-GR-BZB4AONW-r581kidc.js +10 -0
  92. package/viewer/assets/en-B4ZKOASM-Crn8bm25.js +1 -0
  93. package/viewer/assets/erDiagram-TEJ5UH35-BEdSv6Fr.js +85 -0
  94. package/viewer/assets/es-ES-U4NZUMDT-Cwbu6VfM.js +9 -0
  95. package/viewer/assets/eu-ES-A7QVB2H4-BQQ8mY2m.js +11 -0
  96. package/viewer/assets/eventmodeling-FCH6USID-ClPyqCMG.js +1 -0
  97. package/viewer/assets/fa-IR-HGAKTJCU-eYy7h0Hx.js +8 -0
  98. package/viewer/assets/fi-FI-Z5N7JZ37-0dUJDB5b.js +6 -0
  99. package/viewer/assets/file-open-002ab408-D8YX4_im.js +1 -0
  100. package/viewer/assets/file-open-7c801643-ssV9zcu_.js +1 -0
  101. package/viewer/assets/file-save-3189631c-DxUkN-yO.js +1 -0
  102. package/viewer/assets/file-save-745eba88-VPL_lGKy.js +1 -0
  103. package/viewer/assets/flowDiagram-I6XJVG4X-BuWsqPkc.js +162 -0
  104. package/viewer/assets/fr-FR-RHASNOE6-CcYw1Zvt.js +9 -0
  105. package/viewer/assets/ganttDiagram-6RSMTGT7-CJySS69b.js +292 -0
  106. package/viewer/assets/gitGraph-WXDBUCRP-ce180Qdx.js +1 -0
  107. package/viewer/assets/gitGraphDiagram-PVQCEYII-DR2VhZO_.js +106 -0
  108. package/viewer/assets/gl-ES-HMX3MZ6V-C3Iv5ndX.js +10 -0
  109. package/viewer/assets/graphlib-Bk2wNdF0.js +1 -0
  110. package/viewer/assets/he-IL-6SHJWFNN-CL8Or2hC.js +10 -0
  111. package/viewer/assets/hi-IN-IWLTKZ5I-DgAD87B-.js +4 -0
  112. package/viewer/assets/hu-HU-A5ZG7DT2-B8ITrvUt.js +7 -0
  113. package/viewer/assets/id-ID-SAP4L64H-VQ2OqDi1.js +10 -0
  114. package/viewer/assets/image-GAAHSSAO-DbYjE9JA.js +1 -0
  115. package/viewer/assets/image-blob-reduce.esm-Co0wHMYu.js +2 -0
  116. package/viewer/assets/index-0hvuUhZv.js +106 -0
  117. package/viewer/assets/index-Bwjgtadn.css +1 -0
  118. package/viewer/assets/info-J43DQDTF-CMRAUPs-.js +1 -0
  119. package/viewer/assets/infoDiagram-5YYISTIA-DxNv4IA7.js +2 -0
  120. package/viewer/assets/init-Bj57mB65.js +1 -0
  121. package/viewer/assets/ishikawaDiagram-YF4QCWOH-2rCqsio7.js +70 -0
  122. package/viewer/assets/it-IT-JPQ66NNP-D777F8zf.js +11 -0
  123. package/viewer/assets/ja-JP-DBVTYXUO-D1PJdPJe.js +8 -0
  124. package/viewer/assets/journeyDiagram-JHISSGLW-DQQq5Lp7.js +139 -0
  125. package/viewer/assets/jszip.min-D1xSKQ08.js +2 -0
  126. package/viewer/assets/kaa-6HZHGXH3-fRgBr8Mi.js +1 -0
  127. package/viewer/assets/kab-KAB-ZGHBKWFO-DlQ49dRn.js +8 -0
  128. package/viewer/assets/kanban-definition-UN3LZRKU-B5eO6Mg1.js +89 -0
  129. package/viewer/assets/katex-C22v-RF3.js +257 -0
  130. package/viewer/assets/kk-KZ-P5N5QNE5-Hq_H-Gj0.js +1 -0
  131. package/viewer/assets/km-KH-HSX4SM5Z-BhI31DxZ.js +11 -0
  132. package/viewer/assets/ko-KR-MTYHY66A-ImUZQcvz.js +9 -0
  133. package/viewer/assets/ku-TR-6OUDTVRD-DfaC8QXn.js +9 -0
  134. package/viewer/assets/linear-CjCAJGt1.js +1 -0
  135. package/viewer/assets/logo-DG62cSZK.png +0 -0
  136. package/viewer/assets/lt-LT-XHIRWOB4-I-ZCC3dU.js +3 -0
  137. package/viewer/assets/lv-LV-5QDEKY6T-Qq5QdgfN.js +7 -0
  138. package/viewer/assets/mermaid-parser.core-Bdy3q53b.js +161 -0
  139. package/viewer/assets/mindmap-definition-RKZ34NQL-m96D2ClP.js +96 -0
  140. package/viewer/assets/mr-IN-CRQNXWMA-BeP3PnlU.js +13 -0
  141. package/viewer/assets/my-MM-5M5IBNSE-BYx0eFn7.js +1 -0
  142. package/viewer/assets/nb-NO-T6EIAALU-C9J5JzGe.js +10 -0
  143. package/viewer/assets/nl-NL-IS3SIHDZ-CMVLrD7F.js +8 -0
  144. package/viewer/assets/nn-NO-6E72VCQL-BBxsrvc2.js +8 -0
  145. package/viewer/assets/oc-FR-POXYY2M6-CHEXPovt.js +8 -0
  146. package/viewer/assets/ofd-D8TA6tcU.js +6 -0
  147. package/viewer/assets/ordinal-CEZ33b-s.js +1 -0
  148. package/viewer/assets/pa-IN-N4M65BXN-Bnyu119-.js +4 -0
  149. package/viewer/assets/packet-YPE3B663-mGtuymGQ.js +1 -0
  150. package/viewer/assets/pdf.worker-BZPf8fJG.js +50 -0
  151. package/viewer/assets/percentages-BXMCSKIN-CBvdjJLu.js +1 -0
  152. package/viewer/assets/pica-CB7jwGa3.js +2 -0
  153. package/viewer/assets/pie-DUmD7IHG.js +1 -0
  154. package/viewer/assets/pie-LRSECV5Y-CGMZQePM.js +1 -0
  155. package/viewer/assets/pieDiagram-4H26LBE5-DVleOheM.js +30 -0
  156. package/viewer/assets/pl-PL-T2D74RX3-Cw72z8vE.js +9 -0
  157. package/viewer/assets/pptx.worker-c0GnmoEE.js +23 -0
  158. package/viewer/assets/prod-Npfld6sP.js +149 -0
  159. package/viewer/assets/pt-BR-5N22H2LF-ok3TV3dt.js +9 -0
  160. package/viewer/assets/pt-PT-UZXXM6DQ-BX423IXU.js +9 -0
  161. package/viewer/assets/quadrantDiagram-W4KKPZXB-CV_EkNJ-.js +7 -0
  162. package/viewer/assets/radar-GUYGQ44K-C81hKZN2.js +1 -0
  163. package/viewer/assets/requirementDiagram-4Y6WPE33-B_kmlnjO.js +84 -0
  164. package/viewer/assets/ro-RO-JPDTUUEW-Pv4aDgxu.js +11 -0
  165. package/viewer/assets/rough.esm-BrTFrov0.js +1 -0
  166. package/viewer/assets/roundRect-BDOnP7qU.js +1 -0
  167. package/viewer/assets/ru-RU-B4JR7IUQ-BGRCDPgW.js +9 -0
  168. package/viewer/assets/sankeyDiagram-5OEKKPKP-CCXvqmNS.js +40 -0
  169. package/viewer/assets/sequenceDiagram-3UESZ5HK-CoR9l1O_.js +162 -0
  170. package/viewer/assets/sheet.worker-DXcmIjpw.js +68 -0
  171. package/viewer/assets/si-LK-N5RQ5JYF-CSeZ8jFh.js +1 -0
  172. package/viewer/assets/sk-SK-C5VTKIMK-BrMoO_Q1.js +6 -0
  173. package/viewer/assets/sl-SI-NN7IZMDC-B_x--94y.js +6 -0
  174. package/viewer/assets/src-BBw8FbvP.js +1 -0
  175. package/viewer/assets/src-BbUo_1sw.js +5 -0
  176. package/viewer/assets/stateDiagram-AJRCARHV-DdTaUVJA.js +1 -0
  177. package/viewer/assets/stateDiagram-v2-BHNVJYJU-D9_r8kG7.js +1 -0
  178. package/viewer/assets/subset-shared.chunk-DpZLNUjP.js +1 -0
  179. package/viewer/assets/subset-worker.chunk-DoDHTOze.js +1 -0
  180. package/viewer/assets/sv-SE-XGPEYMSR-BB4gq_Zc.js +10 -0
  181. package/viewer/assets/ta-IN-2NMHFXQM-9zxtttPw.js +9 -0
  182. package/viewer/assets/th-TH-HPSO5L25-Bu674ZxS.js +2 -0
  183. package/viewer/assets/time-0omzMTb_.js +1 -0
  184. package/viewer/assets/timeline-definition-PNZ67QCA-CLUsDmue.js +120 -0
  185. package/viewer/assets/tr-TR-DEFEU3FU-BOU8hW6c.js +7 -0
  186. package/viewer/assets/treeView-BLDUP644-NZTNRLdP.js +1 -0
  187. package/viewer/assets/treemap-LRROVOQU-BMknj0en.js +1 -0
  188. package/viewer/assets/uk-UA-QMV73CPH-DExt1pCB.js +6 -0
  189. package/viewer/assets/vennDiagram-CIIHVFJN-DFmAzwyu.js +34 -0
  190. package/viewer/assets/vi-VN-M7AON7JQ-ChzDxy_w.js +5 -0
  191. package/viewer/assets/wardley-L42UT6IY-D9i-Iven.js +1 -0
  192. package/viewer/assets/wardleyDiagram-YWT4CUSO-DpnSL_l7.js +78 -0
  193. package/viewer/assets/worker-ref-zQl5Zn-S.js +1 -0
  194. package/viewer/assets/xlsx-ff7ER-JZ.png +0 -0
  195. package/viewer/assets/xychartDiagram-2RQKCTM6-DTybmPGf.js +7 -0
  196. package/viewer/assets/zh-CN-LNUGB5OW-AIyEr3br.js +10 -0
  197. package/viewer/assets/zh-HK-E62DVLB3-CyQvIghB.js +1 -0
  198. package/viewer/assets/zh-TW-RAJ6MFWO-C9bb32Ou.js +9 -0
  199. package/viewer/favicon.ico +0 -0
  200. package/viewer/flyfish-viewer-manifest.json +5 -0
  201. package/viewer/index.html +14 -0
@@ -0,0 +1,32 @@
1
+ import{S as e,_ as t,d as n,h as r,m as i,p as a,r as o,u as s}from"./index-0hvuUhZv.js";import{a as c,c as l,i as u,n as d,o as f,t as p}from"./linear-CjCAJGt1.js";import{t as m}from"./ordinal-CEZ33b-s.js";import{A as h,C as g,E as _,M as v,O as y,T as b,a as x,c as S,d as C,i as w,j as T,k as E,l as D,n as O,o as k,r as ee,s as te,t as ne,x as re,y as ie}from"./time-0omzMTb_.js";import{$ as ae,C as oe,L as se,Q as A,R as ce,S as le,_ as ue,a as de,b as fe,c as pe,d as me,et as he,f as ge,g as _e,h as ve,i as ye,l as be,m as xe,n as Se,nt as Ce,o as we,p as Te,r as Ee,rt as De,s as Oe,t as ke,tt as Ae,u as je,v as Me,x as Ne,y as Pe,z as Fe}from"./src-BBw8FbvP.js";import{r as Ie,t as Le}from"./defaultLocale-GXPQCpCV.js";import{t as Re}from"./init-Bj57mB65.js";import{t as ze}from"./arc-Dimj_7G-.js";import{t as Be}from"./pie-DUmD7IHG.js";import{t as Ve}from"./worker-ref-zQl5Zn-S.js";function He(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Ue(e,t){if(e=He(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}function We(e){return typeof e==`string`?new ae([document.querySelectorAll(e)],[document.documentElement]):new ae([Ae(e)],he)}var Ge={passive:!1},Ke={capture:!0,passive:!1};function qe(e){e.stopImmediatePropagation()}function Je(e){e.preventDefault(),e.stopImmediatePropagation()}function Ye(e){var t=e.document.documentElement,n=A(e).on(`dragstart.drag`,Je,Ke);`onselectstart`in t?n.on(`selectstart.drag`,Je,Ke):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect=`none`)}function Xe(e,t){var n=e.document.documentElement,r=A(e).on(`dragstart.drag`,null);t&&(r.on(`click.drag`,Je,Ke),setTimeout(function(){r.on(`click.drag`,null)},0)),`onselectstart`in n?r.on(`selectstart.drag`,null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var Ze=e=>()=>e;function Qe(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:a,x:o,y:s,dx:c,dy:l,dispatch:u}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:u}})}Qe.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function $e(e){return!e.ctrlKey&&!e.button}function et(){return this.parentNode}function tt(e,t){return t??{x:e.x,y:e.y}}function nt(){return navigator.maxTouchPoints||`ontouchstart`in this}function rt(){var e=$e,t=et,n=tt,r=nt,i={},a=De(`start`,`drag`,`end`),o=0,s,c,l,u,d=0;function f(e){e.on(`mousedown.drag`,p).filter(r).on(`touchstart.drag`,g).on(`touchmove.drag`,_,Ge).on(`touchend.drag touchcancel.drag`,v).style(`touch-action`,`none`).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}function p(n,r){if(!(u||!e.call(this,n,r))){var i=y(this,t.call(this,n,r),n,r,`mouse`);i&&(A(n.view).on(`mousemove.drag`,m,Ke).on(`mouseup.drag`,h,Ke),Ye(n.view),qe(n),l=!1,s=n.clientX,c=n.clientY,i(`start`,n))}}function m(e){if(Je(e),!l){var t=e.clientX-s,n=e.clientY-c;l=t*t+n*n>d}i.mouse(`drag`,e)}function h(e){A(e.view).on(`mousemove.drag mouseup.drag`,null),Xe(e.view,l),Je(e),i.mouse(`end`,e)}function g(n,r){if(e.call(this,n,r)){var i=n.changedTouches,a=t.call(this,n,r),o=i.length,s,c;for(s=0;s<o;++s)(c=y(this,a,n,r,i[s].identifier,i[s]))&&(qe(n),c(`start`,n,i[s]))}}function _(e){var t=e.changedTouches,n=t.length,r,a;for(r=0;r<n;++r)(a=i[t[r].identifier])&&(Je(e),a(`drag`,e,t[r]))}function v(e){var t=e.changedTouches,n=t.length,r,a;for(u&&clearTimeout(u),u=setTimeout(function(){u=null},500),r=0;r<n;++r)(a=i[t[r].identifier])&&(qe(e),a(`end`,e,t[r]))}function y(e,t,r,s,c,l){var u=a.copy(),d=Ue(l||r,t),p,m,h;if((h=n.call(e,new Qe(`beforestart`,{sourceEvent:r,target:f,identifier:c,active:o,x:d[0],y:d[1],dx:0,dy:0,dispatch:u}),s))!=null)return p=h.x-d[0]||0,m=h.y-d[1]||0,function n(r,a,l){var g=d,_;switch(r){case`start`:i[c]=n,_=o++;break;case`end`:delete i[c],--o;case`drag`:d=Ue(l||a,t),_=o;break}u.call(r,e,new Qe(r,{sourceEvent:a,subject:h,target:f,identifier:c,active:_,x:d[0]+p,y:d[1]+m,dx:d[0]-g[0],dy:d[1]-g[1],dispatch:u}),s)}}return f.filter=function(t){return arguments.length?(e=typeof t==`function`?t:Ze(!!t),f):e},f.container=function(e){return arguments.length?(t=typeof e==`function`?e:Ze(e),f):t},f.subject=function(e){return arguments.length?(n=typeof e==`function`?e:Ze(e),f):n},f.touchable=function(e){return arguments.length?(r=typeof e==`function`?e:Ze(!!e),f):r},f.on=function(){var e=a.on.apply(a,arguments);return e===a?f:e},f.clickDistance=function(e){return arguments.length?(d=(e=+e)*e,f):Math.sqrt(d)},f}var it=e=>+e,at={},ot={},st=34,ct=10,lt=13;function ut(e){return Function(`d`,`return {`+e.map(function(e,t){return JSON.stringify(e)+`: d[`+t+`] || ""`}).join(`,`)+`}`)}function dt(e,t){var n=ut(e);return function(r,i){return t(n(r),i,e)}}function ft(e){var t=Object.create(null),n=[];return e.forEach(function(e){for(var r in e)r in t||n.push(t[r]=r)}),n}function pt(e,t){var n=e+``,r=n.length;return r<t?Array(t-r+1).join(0)+n:n}function mt(e){return e<0?`-`+pt(-e,6):e>9999?`+`+pt(e,6):pt(e,4)}function ht(e){var t=e.getUTCHours(),n=e.getUTCMinutes(),r=e.getUTCSeconds(),i=e.getUTCMilliseconds();return isNaN(e)?`Invalid Date`:mt(e.getUTCFullYear(),4)+`-`+pt(e.getUTCMonth()+1,2)+`-`+pt(e.getUTCDate(),2)+(i?`T`+pt(t,2)+`:`+pt(n,2)+`:`+pt(r,2)+`.`+pt(i,3)+`Z`:r?`T`+pt(t,2)+`:`+pt(n,2)+`:`+pt(r,2)+`Z`:n||t?`T`+pt(t,2)+`:`+pt(n,2)+`Z`:``)}function gt(e){var t=RegExp(`["`+e+`
2
+ \r]`),n=e.charCodeAt(0);function r(e,t){var n,r,a=i(e,function(e,i){if(n)return n(e,i-1);r=e,n=t?dt(e,t):ut(e)});return a.columns=r||[],a}function i(e,t){var r=[],i=e.length,a=0,o=0,s,c=i<=0,l=!1;e.charCodeAt(i-1)===ct&&--i,e.charCodeAt(i-1)===lt&&--i;function u(){if(c)return ot;if(l)return l=!1,at;var t,r=a,o;if(e.charCodeAt(r)===st){for(;a++<i&&e.charCodeAt(a)!==st||e.charCodeAt(++a)===st;);return(t=a)>=i?c=!0:(o=e.charCodeAt(a++))===ct?l=!0:o===lt&&(l=!0,e.charCodeAt(a)===ct&&++a),e.slice(r+1,t-1).replace(/""/g,`"`)}for(;a<i;){if((o=e.charCodeAt(t=a++))===ct)l=!0;else if(o===lt)l=!0,e.charCodeAt(a)===ct&&++a;else if(o!==n)continue;return e.slice(r,t)}return c=!0,e.slice(r,i)}for(;(s=u())!==ot;){for(var d=[];s!==at&&s!==ot;)d.push(s),s=u();t&&(d=t(d,o++))==null||r.push(d)}return r}function a(t,n){return t.map(function(t){return n.map(function(e){return u(t[e])}).join(e)})}function o(t,n){return n??=ft(t),[n.map(u).join(e)].concat(a(t,n)).join(`
3
+ `)}function s(e,t){return t??=ft(e),a(e,t).join(`
4
+ `)}function c(e){return e.map(l).join(`
5
+ `)}function l(t){return t.map(u).join(e)}function u(e){return e==null?``:e instanceof Date?ht(e):t.test(e+=``)?`"`+e.replace(/"/g,`""`)+`"`:e}return{parse:r,parseRows:i,format:o,formatBody:s,formatRows:c,formatRow:l,formatValue:u}}var _t=gt(`,`),vt=_t.parse,yt=_t.parseRows;_t.format,_t.formatBody,_t.formatRows,_t.formatRow,_t.formatValue;var bt=gt(` `),xt=bt.parse,St=bt.parseRows;bt.format,bt.formatBody,bt.formatRows,bt.formatRow,bt.formatValue;function Ct(e){return Math.log(e)}function wt(e){return Math.exp(e)}function Tt(e){return-Math.log(-e)}function Et(e){return-Math.exp(-e)}function Dt(e){return isFinite(e)?+(`1e`+e):e<0?0:e}function Ot(e){return e===10?Dt:e===Math.E?Math.exp:t=>e**+t}function kt(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function At(e){return(t,n)=>-e(-t,n)}function jt(e){let t=e(Ct,wt),n=t.domain,r=10,i,a;function o(){return i=kt(r),a=Ot(r),n()[0]<0?(i=At(i),a=At(a),e(Tt,Et)):e(Ct,wt),t}return t.base=function(e){return arguments.length?(r=+e,o()):r},t.domain=function(e){return arguments.length?(n(e),o()):n()},t.ticks=e=>{let t=n(),o=t[0],s=t[t.length-1],c=s<o;c&&([o,s]=[s,o]);let u=i(o),d=i(s),f,p,m=e==null?10:+e,h=[];if(!(r%1)&&d-u<m){if(u=Math.floor(u),d=Math.ceil(d),o>0){for(;u<=d;++u)for(f=1;f<r;++f)if(p=u<0?f/a(-u):f*a(u),!(p<o)){if(p>s)break;h.push(p)}}else for(;u<=d;++u)for(f=r-1;f>=1;--f)if(p=u>0?f/a(-u):f*a(u),!(p<o)){if(p>s)break;h.push(p)}h.length*2<m&&(h=l(o,s,m))}else h=l(u,d,Math.min(d-u,m)).map(a);return c?h.reverse():h},t.tickFormat=(e,n)=>{if(e??=10,n??=r===10?`s`:`,`,typeof n!=`function`&&(!(r%1)&&(n=Ie(n)).precision==null&&(n.trim=!0),n=Le(n)),e===1/0)return n;let o=Math.max(1,r*e/t.ticks().length);return e=>{let t=e/a(Math.round(i(e)));return t*r<r-.5&&(t*=r),t<=o?n(e):``}},t.nice=()=>n(y(n(),{floor:e=>a(Math.floor(i(e))),ceil:e=>a(Math.ceil(i(e)))})),t}function j(){let e=jt(c()).domain([1,10]);return e.copy=()=>u(e,j()).base(e.base()),Re.apply(e,arguments),e}function Mt(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Nt(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Pt(e){var t=1,n=e(Mt(t),Nt(t));return n.constant=function(n){return arguments.length?e(Mt(t=+n),Nt(t)):t},d(n)}function Ft(){var e=Pt(c());return e.copy=function(){return u(e,Ft()).constant(e.constant())},Re.apply(e,arguments)}function It(){return Re.apply(ne(S,te,D,C,ie,re,g,b,_,x).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Lt(e,t,n){var r=null,i=se(!0),a=null,o=Ne,s=null,c=oe(l);e=typeof e==`function`?e:e===void 0?Pe:se(+e),t=typeof t==`function`?t:se(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?fe:se(+n);function l(l){var u,d,f,p=(l=le(l)).length,m,h=!1,g,_=Array(p),v=Array(p);for(a??(s=o(g=c())),u=0;u<=p;++u){if(!(u<p&&i(m=l[u],u,l))===h)if(h=!h)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return Me().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:se(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:se(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:se(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:se(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:se(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:se(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:se(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}function Rt(e,t){if(e===void 0||!e.document)throw Error(`jQuery requires a window with a document`);var n=[],r=Object.getPrototypeOf,i=n.slice,a=n.flat?function(e){return n.flat.call(e)}:function(e){return n.concat.apply([],e)},o=n.push,s=n.indexOf,c={},l=c.toString,u=c.hasOwnProperty,d=u.toString,f=d.call(Object),p={};function m(e){return e==null?e+``:typeof e==`object`?c[l.call(e)]||`object`:typeof e}function h(e){return e!=null&&e===e.window}function g(e){var t=!!e&&e.length,n=m(e);return typeof e==`function`||h(e)?!1:n===`array`||t===0||typeof t==`number`&&t>0&&t-1 in e}var _=e.document,v={type:!0,src:!0,nonce:!0,noModule:!0};function y(e,t,n){n||=_;var r,i=n.createElement(`script`);for(r in i.text=e,v)t&&t[r]&&(i[r]=t[r]);n.head.appendChild(i).parentNode&&i.parentNode.removeChild(i)}var b=`4.0.0`,x=/HTML$/i,S=function(e,t){return new S.fn.init(e,t)};S.fn=S.prototype={jquery:b,constructor:S,length:0,toArray:function(){return i.call(this)},get:function(e){return e==null?i.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(e){return this.pushStack(S.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(i.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()}},S.extend=S.fn.extend=function(){var e,t,n,r,i,a,o=arguments[0]||{},s=1,c=arguments.length,l=!1;for(typeof o==`boolean`&&(l=o,o=arguments[s]||{},s++),typeof o!=`object`&&typeof o!=`function`&&(o={}),s===c&&(o=this,s--);s<c;s++)if((e=arguments[s])!=null)for(t in e)r=e[t],!(t===`__proto__`||o===r)&&(l&&r&&(S.isPlainObject(r)||(i=Array.isArray(r)))?(n=o[t],a=i&&!Array.isArray(n)?[]:!i&&!S.isPlainObject(n)?{}:n,i=!1,o[t]=S.extend(l,a,r)):r!==void 0&&(o[t]=r));return o},S.extend({expando:`jQuery`+(b+Math.random()).replace(/\D/g,``),isReady:!0,error:function(e){throw Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!e||l.call(e)!==`[object Object]`?!1:(t=r(e),t?(n=u.call(t,`constructor`)&&t.constructor,typeof n==`function`&&d.call(n)===f):!0)},isEmptyObject:function(e){for(var t in e)return!1;return!0},globalEval:function(e,t,n){y(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(g(e))for(n=e.length;r<n&&t.call(e[r],r,e[r])!==!1;r++);else for(r in e)if(t.call(e[r],r,e[r])===!1)break;return e},text:function(e){var t,n=``,r=0,i=e.nodeType;if(!i)for(;t=e[r++];)n+=S.text(t);return i===1||i===11?e.textContent:i===9?e.documentElement.textContent:i===3||i===4?e.nodeValue:n},makeArray:function(e,t){var n=t||[];return e!=null&&(g(Object(e))?S.merge(n,typeof e==`string`?[e]:e):o.call(n,e)),n},inArray:function(e,t,n){return t==null?-1:s.call(t,e,n)},isXMLDoc:function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!x.test(t||n&&n.nodeName||`HTML`)},contains:function(e,t){var n=t&&t.parentNode;return e===n||!!(n&&n.nodeType===1&&(e.contains?e.contains(n):e.compareDocumentPosition&&e.compareDocumentPosition(n)&16))},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r,i=[],a=0,o=e.length,s=!n;a<o;a++)r=!t(e[a],a),r!==s&&i.push(e[a]);return i},map:function(e,t,n){var r,i,o=0,s=[];if(g(e))for(r=e.length;o<r;o++)i=t(e[o],o,n),i!=null&&s.push(i);else for(o in e)i=t(e[o],o,n),i!=null&&s.push(i);return a(s)},guid:1,support:p}),typeof Symbol==`function`&&(S.fn[Symbol.iterator]=n[Symbol.iterator]),S.each(`Boolean Number String Function Array Date RegExp Object Error Symbol`.split(` `),function(e,t){c[`[object `+t+`]`]=t.toLowerCase()});function C(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var w=n.pop,T=`[\\x20\\t\\r\\n\\f]`,E=_.documentMode,D=E&&RegExp(`:enabled|:disabled|\\[`+T+`*name`+T+`*=`+T+`*(?:''|"")`),O=RegExp(`^`+T+`+|((?:^|[^\\\\])(?:\\\\.)*)`+T+`+$`,`g`),k=`(?:\\\\[\\da-fA-F]{1,6}`+T+`?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+`,ee=RegExp(`^`+T+`*([>+~]|`+T+`)`+T+`*`),te=RegExp(T+`|>`),ne=/[+~]/,re=_.documentElement,ie=re.matches||re.msMatchesSelector;function ae(){var e=[];function t(n,r){return e.push(n+` `)>S.expr.cacheLength&&delete t[e.shift()],t[n+` `]=r}return t}function oe(e){return e&&e.getElementsByTagName!==void 0&&e}var se=`\\[`+T+`*(`+k+`)(?:`+T+`*([*^$|!~]?=)`+T+`*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(`+k+`))|)`+T+`*\\]`,A=`:(`+k+`)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|`+se+`)*)|.*)\\)|)`,ce={ID:RegExp(`^#(`+k+`)`),CLASS:RegExp(`^\\.(`+k+`)`),TAG:RegExp(`^(`+k+`|[*])`),ATTR:RegExp(`^`+se),PSEUDO:RegExp(`^`+A),CHILD:RegExp(`^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(`+T+`*(even|odd|(([+-]|)(\\d*)n|)`+T+`*(?:([+-]|)`+T+`*(\\d+)|))`+T+`*\\)|)`,`i`)},le=new RegExp(A),ue=RegExp(`\\\\[\\da-fA-F]{1,6}`+T+`?|\\\\([^\\r\\n\\f])`,`g`),de=function(e,t){var n=`0x`+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,n&1023|56320))};function fe(e){return e.replace(ue,de)}function pe(e){S.error(`Syntax error, unrecognized expression: `+e)}var me=RegExp(`^`+T+`*,`+T+`*`),he=ae();function ge(e,t){var n,r,i,a,o,s,c,l=he[e+` `];if(l)return t?0:l.slice(0);for(o=e,s=[],c=S.expr.preFilter;o;){for(a in(!n||(r=me.exec(o)))&&(r&&(o=o.slice(r[0].length)||o),s.push(i=[])),n=!1,(r=ee.exec(o))&&(n=r.shift(),i.push({value:n,type:r[0].replace(O,` `)}),o=o.slice(n.length)),ce)(r=S.expr.match[a].exec(o))&&(!c[a]||(r=c[a](r)))&&(n=r.shift(),i.push({value:n,type:a,matches:r}),o=o.slice(n.length));if(!n)break}return t?o.length:o?pe(e):he(e,s).slice(0)}var _e={ATTR:function(e){return e[1]=fe(e[1]),e[3]=fe(e[3]||e[4]||e[5]||``),e[2]===`~=`&&(e[3]=` `+e[3]+` `),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1].slice(0,3)===`nth`?(e[3]||pe(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*(e[3]===`even`||e[3]===`odd`)),e[5]=+(e[7]+e[8]||e[3]===`odd`)):e[3]&&pe(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return ce.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||``:n&&le.test(n)&&(t=ge(n,!0))&&(t=n.indexOf(`)`,n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}};function ve(e){for(var t=0,n=e.length,r=``;t<n;t++)r+=e[t].value;return r}function ye(e,t,n,r,i,a,o){var s=0,c=e.length,l=n==null;if(m(n)===`object`)for(s in i=!0,n)ye(e,t,s,n[s],!0,a,o);else if(r!==void 0&&(i=!0,typeof r!=`function`&&(o=!0),l&&(o?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(S(e),n)})),t))for(;s<c;s++)t(e[s],n,o?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):c?t(e[0],n):a}var be=/[^\x20\t\r\n\f]+/g;S.fn.extend({attr:function(e,t){return ye(this,S.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){S.removeAttr(this,e)})}}),S.extend({attr:function(e,t,n){var r,i,a=e.nodeType;if(!(a===3||a===8||a===2)){if(e.getAttribute===void 0)return S.prop(e,t,n);if((a!==1||!S.isXMLDoc(e))&&(i=S.attrHooks[t.toLowerCase()]),n!==void 0){if(n===null||n===!1&&t.toLowerCase().indexOf(`aria-`)!==0){S.removeAttr(e,t);return}return i&&`set`in i&&(r=i.set(e,n,t))!==void 0?r:(e.setAttribute(t,n),n)}return i&&`get`in i&&(r=i.get(e,t))!==null?r:(r=e.getAttribute(t),r??void 0)}},attrHooks:{},removeAttr:function(e,t){var n,r=0,i=t&&t.match(be);if(i&&e.nodeType===1)for(;n=i[r++];)e.removeAttribute(n)}}),E&&(S.attrHooks.type={set:function(e,t){if(t===`radio`&&C(e,`input`)){var n=e.value;return e.setAttribute(`type`,t),n&&(e.value=n),t}}});var xe=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function Se(e,t){return t?e===`\0`?`�`:e.slice(0,-1)+`\\`+e.charCodeAt(e.length-1).toString(16)+` `:`\\`+e}S.escapeSelector=function(e){return(e+``).replace(xe,Se)};var Ce=n.sort,we=n.splice,Te;function Ee(e,t){if(e===t)return Te=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1,n&1?e==_||e.ownerDocument==_&&S.contains(_,e)?-1:t==_||t.ownerDocument==_&&S.contains(_,t)?1:0:n&4?-1:1)}S.uniqueSort=function(e){var t,n=[],r=0,i=0;if(Te=!1,Ce.call(e,Ee),Te){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)we.call(e,n[r],1)}return e},S.fn.uniqueSort=function(){return this.pushStack(S.uniqueSort(i.apply(this)))};var De,Oe,ke,Ae,je,Me=0,Ne=0,Pe=ae(),Fe=ae(),Ie=ae(),Le=RegExp(T+`+`,`g`),Re=RegExp(`^`+k+`$`),ze=S.extend({needsContext:RegExp(`^`+T+`*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(`+T+`*((?:-\\d)?\\d*)`+T+`*\\)|)(?=[^-]|$)`,`i`)},ce),Be=/^(?:input|select|textarea|button)$/i,Ve=/^h\d$/i,He=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Ue=function(){Ze()},We=$e(function(e){return e.disabled===!0&&C(e,`fieldset`)},{dir:`parentNode`,next:`legend`});function Ge(e,t,n,r){var i,a,s,c,l,u,d,f=t&&t.ownerDocument,p=t?t.nodeType:9;if(n||=[],typeof e!=`string`||!e||p!==1&&p!==9&&p!==11)return n;if(!r&&(Ze(t),t||=ke,je)){if(p!==11&&(l=He.exec(e))){if(i=l[1]){if(p===9)return(s=t.getElementById(i))&&o.call(n,s),n;if(f&&(s=f.getElementById(i))&&S.contains(t,s))return o.call(n,s),n}else if(l[2])return o.apply(n,t.getElementsByTagName(e)),n;else if((i=l[3])&&t.getElementsByClassName)return o.apply(n,t.getElementsByClassName(i)),n}if(!Ie[e+` `]&&(!D||!D.test(e))){if(d=e,f=t,p===1&&(te.test(e)||ee.test(e))){for(f=ne.test(e)&&oe(t.parentNode)||t,(f!=t||E)&&((c=t.getAttribute(`id`))?c=S.escapeSelector(c):t.setAttribute(`id`,c=S.expando)),u=ge(e),a=u.length;a--;)u[a]=(c?`#`+c:`:scope`)+` `+ve(u[a]);d=u.join(`,`)}try{return o.apply(n,f.querySelectorAll(d)),n}catch{Ie(e,!0)}finally{c===S.expando&&t.removeAttribute(`id`)}}}return st(e.replace(O,`$1`),t,n,r)}function Ke(e){return e[S.expando]=!0,e}function qe(e){return function(t){return C(t,`input`)&&t.type===e}}function Je(e){return function(t){return(C(t,`input`)||C(t,`button`))&&t.type===e}}function Ye(e){return function(t){return`form`in t?t.parentNode&&t.disabled===!1?`label`in t?`label`in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&We(t)===e:t.disabled===e:`label`in t?t.disabled===e:!1}}function Xe(e){return Ke(function(t){return t=+t,Ke(function(n,r){for(var i,a=e([],n.length,t),o=a.length;o--;)n[i=a[o]]&&(n[i]=!(r[i]=n[i]))})})}function Ze(e){var t,n=e?e.ownerDocument||e:_;n==ke||n.nodeType!==9||(ke=n,Ae=ke.documentElement,je=!S.isXMLDoc(ke),E&&_!=ke&&(t=ke.defaultView)&&t.top!==t&&t.addEventListener(`unload`,Ue))}for(De in Ge.matches=function(e,t){return Ge(e,null,null,t)},Ge.matchesSelector=function(e,t){if(Ze(e),je&&!Ie[t+` `]&&(!D||!D.test(t)))try{return ie.call(e,t)}catch{Ie(t,!0)}return Ge(t,ke,null,[e]).length>0},S.expr={cacheLength:50,createPseudo:Ke,match:ze,find:{ID:function(e,t){if(t.getElementById!==void 0&&je){var n=t.getElementById(e);return n?[n]:[]}},TAG:function(e,t){return t.getElementsByTagName===void 0?t.querySelectorAll(e):t.getElementsByTagName(e)},CLASS:function(e,t){if(t.getElementsByClassName!==void 0&&je)return t.getElementsByClassName(e)}},relative:{">":{dir:`parentNode`,first:!0}," ":{dir:`parentNode`},"+":{dir:`previousSibling`,first:!0},"~":{dir:`previousSibling`}},preFilter:_e,filter:{ID:function(e){var t=fe(e);return function(e){return e.getAttribute(`id`)===t}},TAG:function(e){var t=fe(e).toLowerCase();return e===`*`?function(){return!0}:function(e){return C(e,t)}},CLASS:function(e){var t=Pe[e+` `];return t||(t=RegExp(`(^|`+T+`)`+e+`(`+T+`|$)`))&&Pe(e,function(e){return t.test(typeof e.className==`string`&&e.className||e.getAttribute!==void 0&&e.getAttribute(`class`)||``)})},ATTR:function(e,t,n){return function(r){var i=S.attr(r,e);return i==null?t===`!=`:t?(i+=``,t===`=`?i===n:t===`!=`?i!==n:t===`^=`?n&&i.indexOf(n)===0:t===`*=`?n&&i.indexOf(n)>-1:t===`$=`?n&&i.slice(-n.length)===n:t===`~=`?(` `+i.replace(Le,` `)+` `).indexOf(n)>-1:t===`|=`?i===n||i.slice(0,n.length+1)===n+`-`:!1):!0}},CHILD:function(e,t,n,r,i){var a=e.slice(0,3)!==`nth`,o=e.slice(-4)!==`last`,s=t===`of-type`;return r===1&&i===0?function(e){return!!e.parentNode}:function(t,n,c){var l,u,d,f,p,m=a===o?`previousSibling`:`nextSibling`,h=t.parentNode,g=s&&t.nodeName.toLowerCase(),_=!c&&!s,v=!1;if(h){if(a){for(;m;){for(d=t;d=d[m];)if(s?C(d,g):d.nodeType===1)return!1;p=m=e===`only`&&!p&&`nextSibling`}return!0}if(p=[o?h.firstChild:h.lastChild],o&&_){for(u=h[S.expando]||(h[S.expando]={}),l=u[e]||[],f=l[0]===Me&&l[1],v=f&&l[2],d=f&&h.childNodes[f];d=++f&&d&&d[m]||(v=f=0)||p.pop();)if(d.nodeType===1&&++v&&d===t){u[e]=[Me,f,v];break}}else if(_&&(u=t[S.expando]||(t[S.expando]={}),l=u[e]||[],f=l[0]===Me&&l[1],v=f),v===!1)for(;(d=++f&&d&&d[m]||(v=f=0)||p.pop())&&!((s?C(d,g):d.nodeType===1)&&++v&&(_&&(u=d[S.expando]||(d[S.expando]={}),u[e]=[Me,v]),d===t)););return v-=i,v===r||v%r===0&&v/r>=0}}},PSEUDO:function(e,t){var n=S.expr.pseudos[e]||S.expr.setFilters[e.toLowerCase()]||pe(`unsupported pseudo: `+e);return n[S.expando]?n(t):n}},pseudos:{not:Ke(function(e){var t=[],n=[],r=ot(e.replace(O,`$1`));return r[S.expando]?Ke(function(e,t,n,i){for(var a,o=r(e,null,i,[]),s=e.length;s--;)(a=o[s])&&(e[s]=!(t[s]=a))}):function(e,i,a){return t[0]=e,r(t,null,a,n),t[0]=null,!n.pop()}}),has:Ke(function(e){return function(t){return Ge(e,t).length>0}}),contains:Ke(function(e){return e=fe(e),function(t){return(t.textContent||S.text(t)).indexOf(e)>-1}}),lang:Ke(function(e){return Re.test(e||``)||pe(`unsupported lang: `+e),e=fe(e).toLowerCase(),function(t){var n;do if(n=je?t.lang:t.getAttribute(`xml:lang`)||t.getAttribute(`lang`))return n=n.toLowerCase(),n===e||n.indexOf(e+`-`)===0;while((t=t.parentNode)&&t.nodeType===1);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===Ae},focus:function(e){return e===ke.activeElement&&ke.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:Ye(!1),disabled:Ye(!0),checked:function(e){return C(e,`input`)&&!!e.checked||C(e,`option`)&&!!e.selected},selected:function(e){return E&&e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!S.expr.pseudos.empty(e)},header:function(e){return Ve.test(e.nodeName)},input:function(e){return Be.test(e.nodeName)},button:function(e){return C(e,`input`)&&e.type===`button`||C(e,`button`)},text:function(e){return C(e,`input`)&&e.type===`text`},first:Xe(function(){return[0]}),last:Xe(function(e,t){return[t-1]}),eq:Xe(function(e,t,n){return[n<0?n+t:n]}),even:Xe(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:Xe(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:Xe(function(e,t,n){for(var r=n<0?n+t:n>t?t:n;--r>=0;)e.push(r);return e}),gt:Xe(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},S.expr.pseudos.nth=S.expr.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})S.expr.pseudos[De]=qe(De);for(De in{submit:!0,reset:!0})S.expr.pseudos[De]=Je(De);function Qe(){}Qe.prototype=S.expr.pseudos,S.expr.setFilters=new Qe;function $e(e,t,n){var r=t.dir,i=t.next,a=i||r,o=n&&a===`parentNode`,s=Ne++;return t.first?function(t,n,i){for(;t=t[r];)if(t.nodeType===1||o)return e(t,n,i);return!1}:function(t,n,c){var l,u,d=[Me,s];if(c){for(;t=t[r];)if((t.nodeType===1||o)&&e(t,n,c))return!0}else for(;t=t[r];)if(t.nodeType===1||o){if(u=t[S.expando]||(t[S.expando]={}),i&&C(t,i))t=t[r]||t;else if((l=u[a])&&l[0]===Me&&l[1]===s)return d[2]=l[2];else if(u[a]=d,d[2]=e(t,n,c))return!0}return!1}}function et(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function tt(e,t,n){for(var r=0,i=t.length;r<i;r++)Ge(e,t[r],n);return n}function nt(e,t,n,r,i){for(var a,o=[],s=0,c=e.length,l=t!=null;s<c;s++)(a=e[s])&&(!n||n(a,r,i))&&(o.push(a),l&&t.push(s));return o}function rt(e,t,n,r,i,a){return r&&!r[S.expando]&&(r=rt(r)),i&&!i[S.expando]&&(i=rt(i,a)),Ke(function(a,c,l,u){var d,f,p,m,h=[],g=[],_=c.length,v=a||tt(t||`*`,l.nodeType?[l]:l,[]),y=e&&(a||!t)?nt(v,h,e,l,u):v;if(n?(m=i||(a?e:_||r)?[]:c,n(y,m,l,u)):m=y,r)for(d=nt(m,g),r(d,[],l,u),f=d.length;f--;)(p=d[f])&&(m[g[f]]=!(y[g[f]]=p));if(a){if(i||e){if(i){for(d=[],f=m.length;f--;)(p=m[f])&&d.push(y[f]=p);i(null,m=[],d,u)}for(f=m.length;f--;)(p=m[f])&&(d=i?s.call(a,p):h[f])>-1&&(a[d]=!(c[d]=p))}}else m=nt(m===c?m.splice(_,m.length):m),i?i(null,c,m,u):o.apply(c,m)})}function it(e){for(var t,n,r,i=e.length,a=S.expr.relative[e[0].type],o=a||S.expr.relative[` `],c=+!!a,l=$e(function(e){return e===t},o,!0),u=$e(function(e){return s.call(t,e)>-1},o,!0),d=[function(e,n,r){var i=!a&&(r||n!=Oe)||((t=n).nodeType?l(e,n,r):u(e,n,r));return t=null,i}];c<i;c++)if(n=S.expr.relative[e[c].type])d=[$e(et(d),n)];else{if(n=S.expr.filter[e[c].type].apply(null,e[c].matches),n[S.expando]){for(r=++c;r<i&&!S.expr.relative[e[r].type];r++);return rt(c>1&&et(d),c>1&&ve(e.slice(0,c-1).concat({value:e[c-2].type===` `?`*`:``})).replace(O,`$1`),n,c<r&&it(e.slice(c,r)),r<i&&it(e=e.slice(r)),r<i&&ve(e))}d.push(n)}return et(d)}function at(e,t){var n=t.length>0,r=e.length>0,i=function(i,a,s,c,l){var u,d,f,p=0,m=`0`,h=i&&[],g=[],_=Oe,v=i||r&&S.expr.find.TAG(`*`,l),y=Me+=_==null?1:Math.random()||.1;for(l&&(Oe=a==ke||a||l);(u=v[m])!=null;m++){if(r&&u){for(d=0,!a&&u.ownerDocument!=ke&&(Ze(u),s=!je);f=e[d++];)if(f(u,a||ke,s)){o.call(c,u);break}l&&(Me=y)}n&&((u=!f&&u)&&p--,i&&h.push(u))}if(p+=m,n&&m!==p){for(d=0;f=t[d++];)f(h,g,a,s);if(i){if(p>0)for(;m--;)h[m]||g[m]||(g[m]=w.call(c));g=nt(g)}o.apply(c,g),l&&!i&&g.length>0&&p+t.length>1&&S.uniqueSort(c)}return l&&(Me=y,Oe=_),h};return n?Ke(i):i}function ot(e,t){var n,r=[],i=[],a=Fe[e+` `];if(!a){for(t||=ge(e),n=t.length;n--;)a=it(t[n]),a[S.expando]?r.push(a):i.push(a);a=Fe(e,at(i,r)),a.selector=e}return a}function st(e,t,n,r){var i,a,s,c,l,u=typeof e==`function`&&e,d=!r&&ge(e=u.selector||e);if(n||=[],d.length===1){if(a=d[0]=d[0].slice(0),a.length>2&&(s=a[0]).type===`ID`&&t.nodeType===9&&je&&S.expr.relative[a[1].type]){if(t=(S.expr.find.ID(fe(s.matches[0]),t)||[])[0],t)u&&(t=t.parentNode);else return n;e=e.slice(a.shift().value.length)}for(i=ze.needsContext.test(e)?0:a.length;i--&&(s=a[i],!S.expr.relative[c=s.type]);)if((l=S.expr.find[c])&&(r=l(fe(s.matches[0]),ne.test(a[0].type)&&oe(t.parentNode)||t))){if(a.splice(i,1),e=r.length&&ve(a),!e)return o.apply(n,r),n;break}}return(u||ot(e,d))(r,t,!je,n,!t||ne.test(e)&&oe(t.parentNode)||t),n}Ze(),S.find=Ge,Ge.compile=ot,Ge.select=st,Ge.setDocument=Ze,Ge.tokenize=ge;function ct(e,t,n){for(var r=[],i=n!==void 0;(e=e[t])&&e.nodeType!==9;)if(e.nodeType===1){if(i&&S(e).is(n))break;r.push(e)}return r}function lt(e,t){for(var n=[];e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}var ut=S.expr.match.needsContext,dt=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function ft(e){return e[0]===`<`&&e[e.length-1]===`>`&&e.length>=3}function pt(e,t,n){return typeof t==`function`?S.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?S.grep(e,function(e){return e===t!==n}):typeof t==`string`?S.filter(t,e,n):S.grep(e,function(e){return s.call(t,e)>-1!==n})}S.filter=function(e,t,n){var r=t[0];return n&&(e=`:not(`+e+`)`),t.length===1&&r.nodeType===1?S.find.matchesSelector(r,e)?[r]:[]:S.find.matches(e,S.grep(t,function(e){return e.nodeType===1}))},S.fn.extend({find:function(e){var t,n,r=this.length,i=this;if(typeof e!=`string`)return this.pushStack(S(e).filter(function(){for(t=0;t<r;t++)if(S.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)S.find(e,i[t],n);return r>1?S.uniqueSort(n):n},filter:function(e){return this.pushStack(pt(this,e||[],!1))},not:function(e){return this.pushStack(pt(this,e||[],!0))},is:function(e){return!!pt(this,typeof e==`string`&&ut.test(e)?S(e):e||[],!1).length}});var mt,ht=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,gt=S.fn.init=function(e,t){var n,r;if(!e)return this;if(e.nodeType)return this[0]=e,this.length=1,this;if(typeof e==`function`)return mt.ready===void 0?e(S):mt.ready(e);if(n=e+``,ft(n))n=[null,e,null];else if(typeof e==`string`)n=ht.exec(e);else return S.makeArray(e,this);if(n&&(n[1]||!t))if(n[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:_,!0)),dt.test(n[1])&&S.isPlainObject(t))for(n in t)typeof this[n]==`function`?this[n](t[n]):this.attr(n,t[n]);return this}else return r=_.getElementById(n[2]),r&&(this[0]=r,this.length=1),this;else if(!t||t.jquery)return(t||mt).find(e);else return this.constructor(t).find(e)};gt.prototype=S.fn,mt=S(_);var _t=/^(?:parents|prev(?:Until|All))/,vt={children:!0,contents:!0,next:!0,prev:!0};S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(S.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,a=[],o=typeof e!=`string`&&S(e);if(!ut.test(e)){for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(o?o.index(n)>-1:n.nodeType===1&&S.find.matchesSelector(n,e))){a.push(n);break}}return this.pushStack(a.length>1?S.uniqueSort(a):a)},index:function(e){return e?typeof e==`string`?s.call(S(e),this[0]):s.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(e,t))))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}});function yt(e,t){for(;(e=e[t])&&e.nodeType!==1;);return e}S.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return ct(e,`parentNode`)},parentsUntil:function(e,t,n){return ct(e,`parentNode`,n)},next:function(e){return yt(e,`nextSibling`)},prev:function(e){return yt(e,`previousSibling`)},nextAll:function(e){return ct(e,`nextSibling`)},prevAll:function(e){return ct(e,`previousSibling`)},nextUntil:function(e,t,n){return ct(e,`nextSibling`,n)},prevUntil:function(e,t,n){return ct(e,`previousSibling`,n)},siblings:function(e){return lt((e.parentNode||{}).firstChild,e)},children:function(e){return lt(e.firstChild)},contents:function(e){return e.contentDocument!=null&&r(e.contentDocument)?e.contentDocument:(C(e,`template`)&&(e=e.content||e),S.merge([],e.childNodes))}},function(e,t){S.fn[e]=function(n,r){var i=S.map(this,t,n);return e.slice(-5)!==`Until`&&(r=n),r&&typeof r==`string`&&(i=S.filter(r,i)),this.length>1&&(vt[e]||S.uniqueSort(i),_t.test(e)&&i.reverse()),this.pushStack(i)}});function bt(e){var t={};return S.each(e.match(be)||[],function(e,n){t[n]=!0}),t}S.Callbacks=function(e){e=typeof e==`string`?bt(e):S.extend({},e);var t,n,r,i,a=[],o=[],s=-1,c=function(){for(i||=e.once,r=t=!0;o.length;s=-1)for(n=o.shift();++s<a.length;)a[s].apply(n[0],n[1])===!1&&e.stopOnFalse&&(s=a.length,n=!1);e.memory||(n=!1),t=!1,i&&(a=n?[]:``)},l={add:function(){return a&&(n&&!t&&(s=a.length-1,o.push(n)),(function t(n){S.each(n,function(n,r){typeof r==`function`?(!e.unique||!l.has(r))&&a.push(r):r&&r.length&&m(r)!==`string`&&t(r)})})(arguments),n&&!t&&c()),this},remove:function(){return S.each(arguments,function(e,t){for(var n;(n=S.inArray(t,a,n))>-1;)a.splice(n,1),n<=s&&s--}),this},has:function(e){return e?S.inArray(e,a)>-1:a.length>0},empty:function(){return a&&=[],this},disable:function(){return i=o=[],a=n=``,this},disabled:function(){return!a},lock:function(){return i=o=[],!n&&!t&&(a=n=``),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n||=[],n=[e,n.slice?n.slice():n],o.push(n),t||c()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l};function xt(e){return e}function St(e){throw e}function Ct(e,t,n,r){var i;try{e&&typeof(i=e.promise)==`function`?i.call(e).done(t).fail(n):e&&typeof(i=e.then)==`function`?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n(e)}}S.extend({Deferred:function(t){var n=[[`notify`,`progress`,S.Callbacks(`memory`),S.Callbacks(`memory`),2],[`resolve`,`done`,S.Callbacks(`once memory`),S.Callbacks(`once memory`),0,`resolved`],[`reject`,`fail`,S.Callbacks(`once memory`),S.Callbacks(`once memory`),1,`rejected`]],r=`pending`,i={state:function(){return r},always:function(){return a.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return S.Deferred(function(t){S.each(n,function(n,r){var i=typeof e[r[4]]==`function`&&e[r[4]];a[r[1]](function(){var e=i&&i.apply(this,arguments);e&&typeof e.promise==`function`?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+`With`](this,i?[e]:arguments)})}),e=null}).promise()},then:function(t,r,i){var a=0;function o(t,n,r,i){return function(){var s=this,c=arguments,l=function(){var e,l;if(!(t<a)){if(e=r.apply(s,c),e===n.promise())throw TypeError(`Thenable self-resolution`);l=e&&(typeof e==`object`||typeof e==`function`)&&e.then,typeof l==`function`?i?l.call(e,o(a,n,xt,i),o(a,n,St,i)):(a++,l.call(e,o(a,n,xt,i),o(a,n,St,i),o(a,n,xt,n.notifyWith))):(r!==xt&&(s=void 0,c=[e]),(i||n.resolveWith)(s,c))}},u=i?l:function(){try{l()}catch(e){S.Deferred.exceptionHook&&S.Deferred.exceptionHook(e,u.error),t+1>=a&&(r!==St&&(s=void 0,c=[e]),n.rejectWith(s,c))}};t?u():(S.Deferred.getErrorHook&&(u.error=S.Deferred.getErrorHook()),e.setTimeout(u))}}return S.Deferred(function(e){n[0][3].add(o(0,e,typeof i==`function`?i:xt,e.notifyWith)),n[1][3].add(o(0,e,typeof t==`function`?t:xt)),n[2][3].add(o(0,e,typeof r==`function`?r:St))}).promise()},promise:function(e){return e==null?i:S.extend(e,i)}},a={};return S.each(n,function(e,t){var o=t[2],s=t[5];i[t[1]]=o.add,s&&o.add(function(){r=s},n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),o.add(t[3].fire),a[t[0]]=function(){return a[t[0]+`With`](this===a?void 0:this,arguments),this},a[t[0]+`With`]=o.fireWith}),i.promise(a),t&&t.call(a,a),a},when:function(e){var t=arguments.length,n=t,r=Array(n),a=i.call(arguments),o=S.Deferred(),s=function(e){return function(n){r[e]=this,a[e]=arguments.length>1?i.call(arguments):n,--t||o.resolveWith(r,a)}};if(t<=1&&(Ct(e,o.done(s(n)).resolve,o.reject,!t),o.state()===`pending`||typeof(a[n]&&a[n].then)==`function`))return o.then();for(;n--;)Ct(a[n],s(n),o.reject);return o.promise()}});var wt=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(t,n){t&&wt.test(t.name)&&e.console.warn(`jQuery.Deferred exception`,t,n)},S.readyException=function(t){e.setTimeout(function(){throw t})};var Tt=S.Deferred();S.fn.ready=function(e){return Tt.then(e).catch(function(e){S.readyException(e)}),this},S.extend({isReady:!1,readyWait:1,ready:function(e){(e===!0?--S.readyWait:S.isReady)||(S.isReady=!0,!(e!==!0&&--S.readyWait>0)&&Tt.resolveWith(_,[S]))}}),S.ready.then=Tt.then;function Et(){_.removeEventListener(`DOMContentLoaded`,Et),e.removeEventListener(`load`,Et),S.ready()}_.readyState===`loading`?(_.addEventListener(`DOMContentLoaded`,Et),e.addEventListener(`load`,Et)):e.setTimeout(S.ready);var Dt=/-([a-z])/g;function Ot(e,t){return t.toUpperCase()}function kt(e){return e.replace(Dt,Ot)}function At(e){return e.nodeType===1||e.nodeType===9||!+e.nodeType}function jt(){this.expando=S.expando+ jt.uid++}jt.uid=1,jt.prototype={cache:function(e){var t=e[this.expando];return t||(t=Object.create(null),At(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if(typeof t==`string`)i[kt(t)]=n;else for(r in t)i[kt(r)]=t[r];return n},get:function(e,t){return t===void 0?this.cache(e):e[this.expando]&&e[this.expando][kt(t)]},access:function(e,t,n){return t===void 0||t&&typeof t==`string`&&n===void 0?this.get(e,t):(this.set(e,t,n),n===void 0?t:n)},remove:function(e,t){var n,r=e[this.expando];if(r!==void 0){if(t!==void 0)for(Array.isArray(t)?t=t.map(kt):(t=kt(t),t=(t in r)?[t]:t.match(be)||[]),n=t.length;n--;)delete r[t[n]];(t===void 0||S.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return t!==void 0&&!S.isEmptyObject(t)}};var j=new jt,Mt=new jt,Nt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Pt=/[A-Z]/g;function Ft(e){return e===`true`?!0:e===`false`?!1:e===`null`?null:e===+e+``?+e:Nt.test(e)?JSON.parse(e):e}function It(e,t,n){var r;if(n===void 0&&e.nodeType===1)if(r=`data-`+t.replace(Pt,`-$&`).toLowerCase(),n=e.getAttribute(r),typeof n==`string`){try{n=Ft(n)}catch{}Mt.set(e,t,n)}else n=void 0;return n}S.extend({hasData:function(e){return Mt.hasData(e)||j.hasData(e)},data:function(e,t,n){return Mt.access(e,t,n)},removeData:function(e,t){Mt.remove(e,t)},_data:function(e,t,n){return j.access(e,t,n)},_removeData:function(e,t){j.remove(e,t)}}),S.fn.extend({data:function(e,t){var n,r,i,a=this[0],o=a&&a.attributes;if(e===void 0){if(this.length&&(i=Mt.get(a),a.nodeType===1&&!j.get(a,`hasDataAttrs`))){for(n=o.length;n--;)o[n]&&(r=o[n].name,r.indexOf(`data-`)===0&&(r=kt(r.slice(5)),It(a,r,i[r])));j.set(a,`hasDataAttrs`,!0)}return i}return typeof e==`object`?this.each(function(){Mt.set(this,e)}):ye(this,function(t){var n;if(a&&t===void 0)return n=Mt.get(a,e),n!==void 0||(n=It(a,e),n!==void 0)?n:void 0;this.each(function(){Mt.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){Mt.remove(this,e)})}}),S.extend({queue:function(e,t,n){var r;if(e)return t=(t||`fx`)+`queue`,r=j.get(e,t),n&&(!r||Array.isArray(n)?r=j.set(e,t,S.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t||=`fx`;var n=S.queue(e,t),r=n.length,i=n.shift(),a=S._queueHooks(e,t);i===`inprogress`&&(i=n.shift(),r--),i&&(t===`fx`&&n.unshift(`inprogress`),delete a.stop,i.call(e,function(){S.dequeue(e,t)},a)),!r&&a&&a.empty.fire()},_queueHooks:function(e,t){var n=t+`queueHooks`;return j.get(e,n)||j.set(e,n,{empty:S.Callbacks(`once memory`).add(function(){j.remove(e,[t+`queue`,n])})})}}),S.fn.extend({queue:function(e,t){var n=2;return typeof e!=`string`&&(t=e,e=`fx`,n--),arguments.length<n?S.queue(this[0],e):t===void 0?this:this.each(function(){var n=S.queue(this,e,t);S._queueHooks(this,e),e===`fx`&&n[0]!==`inprogress`&&S.dequeue(this,e)})},dequeue:function(e){return this.each(function(){S.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||`fx`,[])},promise:function(e,t){var n,r=1,i=S.Deferred(),a=this,o=this.length,s=function(){--r||i.resolveWith(a,[a])};for(typeof e!=`string`&&(t=e,e=void 0),e||=`fx`;o--;)n=j.get(a[o],e+`queueHooks`),n&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var Lt=`[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)`,Rt=RegExp(`^(?:([+-])=|)(`+Lt+`)([a-z%]*)$`,`i`),zt=[`Top`,`Right`,`Bottom`,`Left`];function Bt(e,t){return e=t||e,e.style.display===`none`||e.style.display===``&&S.css(e,`display`)===`none`}var M=/^[a-z]/,N=/^(?:Border(?:Top|Right|Bottom|Left)?(?:Width|)|(?:Margin|Padding)?(?:Top|Right|Bottom|Left)?|(?:Min|Max)?(?:Width|Height))$/;function P(e){return M.test(e)&&N.test(e[0].toUpperCase()+e.slice(1))}function F(e,t,n,r){var i,a,o=20,s=r?function(){return r.cur()}:function(){return S.css(e,t,``)},c=s(),l=n&&n[3]||(P(t)?`px`:``),u=e.nodeType&&(!P(t)||l!==`px`&&+c)&&Rt.exec(S.css(e,t));if(u&&u[3]!==l){for(c/=2,l||=u[3],u=+c||1;o--;)S.style(e,t,u+l),(1-a)*(1-(a=s()/c||.5))<=0&&(o=0),u/=a;u*=2,S.style(e,t,u+l),n||=[]}return n&&(u=+u||+c||0,i=n[1]?u+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=u,r.end=i)),i}var Vt=/^-ms-/;function Ht(e){return kt(e.replace(Vt,`ms-`))}var Ut={};function Wt(e){var t,n=e.ownerDocument,r=e.nodeName,i=Ut[r];return i||(t=n.body.appendChild(n.createElement(r)),i=S.css(t,`display`),t.parentNode.removeChild(t),i===`none`&&(i=`block`),Ut[r]=i,i)}function I(e,t){for(var n,r,i=[],a=0,o=e.length;a<o;a++)r=e[a],r.style&&(n=r.style.display,t?(n===`none`&&(i[a]=j.get(r,`display`)||null,i[a]||(r.style.display=``)),r.style.display===``&&Bt(r)&&(i[a]=Wt(r))):n!==`none`&&(i[a]=`none`,j.set(r,`display`,n)));for(a=0;a<o;a++)i[a]!=null&&(e[a].style.display=i[a]);return e}S.fn.extend({show:function(){return I(this,!0)},hide:function(){return I(this)},toggle:function(e){return typeof e==`boolean`?e?this.show():this.hide():this.each(function(){Bt(this)?S(this).show():S(this).hide()})}});var Gt=function(e){return S.contains(e.ownerDocument,e)||e.getRootNode(Kt)===e.ownerDocument},Kt={composed:!0};re.getRootNode||(Gt=function(e){return S.contains(e.ownerDocument,e)});var qt=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Jt={thead:[`table`],col:[`colgroup`,`table`],tr:[`tbody`,`table`],td:[`tr`,`tbody`,`table`]};Jt.tbody=Jt.tfoot=Jt.colgroup=Jt.caption=Jt.thead,Jt.th=Jt.td;function L(e,t){var r=e.getElementsByTagName===void 0?e.querySelectorAll===void 0?[]:e.querySelectorAll(t||`*`):n.slice.call(e.getElementsByTagName(t||`*`));return t===void 0||t&&C(e,t)?S.merge([e],r):r}var Yt=/^$|^module$|\/(?:java|ecma)script/i;function Xt(e,t){for(var n=0,r=e.length;n<r;n++)j.set(e[n],`globalEval`,!t||j.get(t[n],`globalEval`))}var R=/<|&#?\w+;/;function z(e,t,r,i,a){for(var o,s,c,l,u,d,f=t.createDocumentFragment(),p=[],h=0,_=e.length;h<_;h++)if(o=e[h],o||o===0)if(m(o)===`object`&&(o.nodeType||g(o)))S.merge(p,o.nodeType?[o]:o);else if(!R.test(o))p.push(t.createTextNode(o));else{for(s||=f.appendChild(t.createElement(`div`)),c=(qt.exec(o)||[``,``])[1].toLowerCase(),l=Jt[c]||n,d=l.length;--d>-1;)s=s.appendChild(t.createElement(l[d]));s.innerHTML=S.htmlPrefilter(o),S.merge(p,s.childNodes),s=f.firstChild,s.textContent=``}for(f.textContent=``,h=0;o=p[h++];){if(i&&S.inArray(o,i)>-1){a&&a.push(o);continue}if(u=Gt(o),s=L(f.appendChild(o),`script`),u&&Xt(s),r)for(d=0;o=s[d++];)Yt.test(o.type||``)&&r.push(o)}return f}function Zt(e){return e.type=(e.getAttribute(`type`)!==null)+`/`+e.type,e}function Qt(e){return(e.type||``).slice(0,5)===`true/`?e.type=e.type.slice(5):e.removeAttribute(`type`),e}function B(e,t,n,r){t=a(t);var i,o,s,c,l,u,d=0,f=e.length,p=f-1,m=t[0];if(typeof m==`function`)return e.each(function(i){var a=e.eq(i);t[0]=m.call(this,i,a.html()),B(a,t,n,r)});if(f&&(i=z(t,e[0].ownerDocument,!1,e,r),o=i.firstChild,i.childNodes.length===1&&(i=o),o||r)){for(s=S.map(L(i,`script`),Zt),c=s.length;d<f;d++)l=i,d!==p&&(l=S.clone(l,!0,!0),c&&S.merge(s,L(l,`script`))),n.call(e[d],l,d);if(c)for(u=s[s.length-1].ownerDocument,S.map(s,Qt),d=0;d<c;d++)l=s[d],Yt.test(l.type||``)&&!j.get(l,`globalEval`)&&S.contains(u,l)&&(l.src&&(l.type||``).toLowerCase()!==`module`?S._evalUrl&&!l.noModule&&S._evalUrl(l.src,{nonce:l.nonce,crossOrigin:l.crossOrigin},u):y(l.textContent,l,u))}return e}var $t=/^(?:checkbox|radio)$/i,en=/^([^.]*)(?:\.(.+)|)/;function V(){return!0}function tn(){return!1}function nn(e,t,n,r,i,a){var o,s;if(typeof t==`object`){for(s in typeof n!=`string`&&(r||=n,n=void 0),t)nn(e,s,n,r,t[s],a);return e}if(r==null&&i==null?(i=n,r=n=void 0):i??(typeof n==`string`?(i=r,r=void 0):(i=r,r=n,n=void 0)),i===!1)i=tn;else if(!i)return e;return a===1&&(o=i,i=function(e){return S().off(e),o.apply(this,arguments)},i.guid=o.guid||=S.guid++),e.each(function(){S.event.add(this,t,i,r,n)})}S.event={add:function(e,t,n,r,i){var a,o,s,c,l,u,d,f,p,m,h,g=j.get(e);if(At(e))for(n.handler&&(a=n,n=a.handler,i=a.selector),i&&S.find.matchesSelector(re,i),n.guid||=S.guid++,(c=g.events)||(c=g.events=Object.create(null)),(o=g.handle)||(o=g.handle=function(t){return S!==void 0&&S.event.triggered!==t.type?S.event.dispatch.apply(e,arguments):void 0}),t=(t||``).match(be)||[``],l=t.length;l--;)s=en.exec(t[l])||[],p=h=s[1],m=(s[2]||``).split(`.`).sort(),p&&(d=S.event.special[p]||{},p=(i?d.delegateType:d.bindType)||p,d=S.event.special[p]||{},u=S.extend({type:p,origType:h,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&S.expr.match.needsContext.test(i),namespace:m.join(`.`)},a),(f=c[p])||(f=c[p]=[],f.delegateCount=0,(!d.setup||d.setup.call(e,r,m,o)===!1)&&e.addEventListener&&e.addEventListener(p,o)),d.add&&(d.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),i?f.splice(f.delegateCount++,0,u):f.push(u))},remove:function(e,t,n,r,i){var a,o,s,c,l,u,d,f,p,m,h,g=j.hasData(e)&&j.get(e);if(!(!g||!(c=g.events))){for(t=(t||``).match(be)||[``],l=t.length;l--;){if(s=en.exec(t[l])||[],p=h=s[1],m=(s[2]||``).split(`.`).sort(),!p){for(p in c)S.event.remove(e,p+t[l],n,r,!0);continue}for(d=S.event.special[p]||{},p=(r?d.delegateType:d.bindType)||p,f=c[p]||[],s=s[2]&&RegExp(`(^|\\.)`+m.join(`\\.(?:.*\\.|)`)+`(\\.|$)`),o=a=f.length;a--;)u=f[a],(i||h===u.origType)&&(!n||n.guid===u.guid)&&(!s||s.test(u.namespace))&&(!r||r===u.selector||r===`**`&&u.selector)&&(f.splice(a,1),u.selector&&f.delegateCount--,d.remove&&d.remove.call(e,u));o&&!f.length&&((!d.teardown||d.teardown.call(e,m,g.handle)===!1)&&S.removeEvent(e,p,g.handle),delete c[p])}S.isEmptyObject(c)&&j.remove(e,`handle events`)}},dispatch:function(e){var t,n,r,i,a,o,s=Array(arguments.length),c=S.event.fix(e),l=(j.get(this,`events`)||Object.create(null))[c.type]||[],u=S.event.special[c.type]||{};for(s[0]=c,t=1;t<arguments.length;t++)s[t]=arguments[t];if(c.delegateTarget=this,!(u.preDispatch&&u.preDispatch.call(this,c)===!1)){for(o=S.event.handlers.call(this,c,l),t=0;(i=o[t++])&&!c.isPropagationStopped();)for(c.currentTarget=i.elem,n=0;(a=i.handlers[n++])&&!c.isImmediatePropagationStopped();)(!c.rnamespace||a.namespace===!1||c.rnamespace.test(a.namespace))&&(c.handleObj=a,c.data=a.data,r=((S.event.special[a.origType]||{}).handle||a.handler).apply(i.elem,s),r!==void 0&&(c.result=r)===!1&&(c.preventDefault(),c.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,c),c.result}},handlers:function(e,t){var n,r,i,a,o,s=[],c=t.delegateCount,l=e.target;if(c&&!(e.type===`click`&&e.button>=1)){for(;l!==this;l=l.parentNode||this)if(l.nodeType===1&&!(e.type===`click`&&l.disabled===!0)){for(a=[],o={},n=0;n<c;n++)r=t[n],i=r.selector+` `,o[i]===void 0&&(o[i]=r.needsContext?S(i,this).index(l)>-1:S.find(i,this,null,[l]).length),o[i]&&a.push(r);a.length&&s.push({elem:l,handlers:a})}}return l=this,c<t.length&&s.push({elem:l,handlers:t.slice(c)}),s},addProp:function(e,t){Object.defineProperty(S.Event.prototype,e,{enumerable:!0,configurable:!0,get:typeof t==`function`?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[S.expando]?e:new S.Event(e)},special:S.extend(Object.create(null),{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return $t.test(t.type)&&t.click&&C(t,`input`)&&rn(t,`click`,!0),!1},trigger:function(e){var t=this||e;return $t.test(t.type)&&t.click&&C(t,`input`)&&rn(t,`click`),!0},_default:function(e){var t=e.target;return $t.test(t.type)&&t.click&&C(t,`input`)&&j.get(t,`click`)||C(t,`a`)}},beforeunload:{postDispatch:function(e){e.result!==void 0&&e.preventDefault()}}})};function rn(e,t,n){if(!n){j.get(e,t)===void 0&&S.event.add(e,t,V);return}j.set(e,t,!1),S.event.add(e,t,{namespace:!1,handler:function(e){var n,r=j.get(this,t);if(e.isTrigger&1&&this[t]){if(r.length)(S.event.special[t]||{}).delegateType&&e.stopPropagation();else if(r=i.call(arguments),j.set(this,t,r),this[t](),n=j.get(this,t),j.set(this,t,!1),r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n&&n.value}else r.length&&(j.set(this,t,{value:S.event.trigger(r[0],r.slice(1),this)}),e.stopPropagation(),e.isImmediatePropagationStopped=V)}})}S.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},S.Event=function(e,t){if(!(this instanceof S.Event))return new S.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented?V:tn,this.target=e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&S.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[S.expando]=!0},S.Event.prototype={constructor:S.Event,isDefaultPrevented:tn,isPropagationStopped:tn,isImmediatePropagationStopped:tn,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=V,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=V,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=V,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},S.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},S.event.addProp),S.each({focus:`focusin`,blur:`focusout`},function(e,t){function n(e){var t=S.event.fix(e);t.type=e.type===`focusin`?`focus`:`blur`,t.isSimulated=!0,t.target===t.currentTarget&&j.get(this,`handle`)(t)}S.event.special[e]={setup:function(){if(rn(this,e,!0),E)this.addEventListener(t,n);else return!1},trigger:function(){return rn(this,e),!0},teardown:function(){if(E)this.removeEventListener(t,n);else return!1},_default:function(t){return j.get(t.target,e)},delegateType:t}}),S.each({mouseenter:`mouseover`,mouseleave:`mouseout`,pointerenter:`pointerover`,pointerleave:`pointerout`},function(e,t){S.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,a=e.handleObj;return(!i||i!==r&&!S.contains(r,i))&&(e.type=a.origType,n=a.handler.apply(this,arguments),e.type=t),n}}}),S.fn.extend({on:function(e,t,n,r){return nn(this,e,t,n,r)},one:function(e,t,n,r){return nn(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,S(e.delegateTarget).off(r.namespace?r.origType+`.`+r.namespace:r.origType,r.selector,r.handler),this;if(typeof e==`object`){for(i in e)this.off(i,t,e[i]);return this}return(t===!1||typeof t==`function`)&&(n=t,t=void 0),n===!1&&(n=tn),this.each(function(){S.event.remove(this,e,n,t)})}});var an=/<script|<style|<link/i;function on(e,t){return C(e,`table`)&&C(t.nodeType===11?t.firstChild:t,`tr`)&&S(e).children(`tbody`)[0]||e}function sn(e,t){var n,r,i,a=j.get(e,`events`);if(t.nodeType===1){if(a)for(n in j.remove(t,`handle events`),a)for(r=0,i=a[n].length;r<i;r++)S.event.add(t,n,a[n][r]);Mt.hasData(e)&&Mt.set(t,S.extend({},Mt.get(e)))}}function cn(e,t,n){for(var r,i=t?S.filter(t,e):e,a=0;(r=i[a])!=null;a++)!n&&r.nodeType===1&&S.cleanData(L(r)),r.parentNode&&(n&&Gt(r)&&Xt(L(r,`script`)),r.parentNode.removeChild(r));return e}S.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,a,o,s=e.cloneNode(!0),c=Gt(e);if(E&&(e.nodeType===1||e.nodeType===11)&&!S.isXMLDoc(e))for(o=L(s),a=L(e),r=0,i=a.length;r<i;r++)C(o[r],`textarea`)&&(o[r].defaultValue=a[r].defaultValue);if(t)if(n)for(a||=L(e),o||=L(s),r=0,i=a.length;r<i;r++)sn(a[r],o[r]);else sn(e,s);return o=L(s,`script`),o.length>0&&Xt(o,!c&&L(e,`script`)),s},cleanData:function(e){for(var t,n,r,i=S.event.special,a=0;(n=e[a])!==void 0;a++)if(At(n)){if(t=n[j.expando]){if(t.events)for(r in t.events)i[r]?S.event.remove(n,r):S.removeEvent(n,r,t.handle);n[j.expando]=void 0}n[Mt.expando]&&(n[Mt.expando]=void 0)}}}),S.fn.extend({detach:function(e){return cn(this,e,!0)},remove:function(e){return cn(this,e)},text:function(e){return ye(this,function(e){return e===void 0?S.text(this):this.empty().each(function(){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&(this.textContent=e)})},null,e,arguments.length)},append:function(){return B(this,arguments,function(e){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&on(this,e).appendChild(e)})},prepend:function(){return B(this,arguments,function(e){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var t=on(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return B(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return B(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;(e=this[t])!=null;t++)e.nodeType===1&&(S.cleanData(L(e,!1)),e.textContent=``);return this},clone:function(e,t){return e??=!1,t??=e,this.map(function(){return S.clone(this,e,t)})},html:function(e){return ye(this,function(e){var t=this[0]||{},n=0,r=this.length;if(e===void 0&&t.nodeType===1)return t.innerHTML;if(typeof e==`string`&&!an.test(e)&&!Jt[(qt.exec(e)||[``,``])[1].toLowerCase()]){e=S.htmlPrefilter(e);try{for(;n<r;n++)t=this[n]||{},t.nodeType===1&&(S.cleanData(L(t,!1)),t.innerHTML=e);t=0}catch{}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return B(this,arguments,function(t){var n=this.parentNode;S.inArray(this,e)<0&&(S.cleanData(L(this)),n&&n.replaceChild(t,this))},e)}}),S.each({appendTo:`append`,prependTo:`prepend`,insertBefore:`before`,insertAfter:`after`,replaceAll:`replaceWith`},function(e,t){S.fn[e]=function(e){for(var n,r=[],i=S(e),a=i.length-1,s=0;s<=a;s++)n=s===a?this:this.clone(!0),S(i[s])[t](n),o.apply(r,n);return this.pushStack(r)}});var ln=RegExp(`^(`+Lt+`)(?!px)[a-z%]+$`,`i`),un=/^--/;function dn(t){var n=t.ownerDocument.defaultView;return n||=e,n.getComputedStyle(t)}function fn(e,t,n){var r,i,a={};for(i in t)a[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=a[i];return r}function pn(e,t,n){var r,i=un.test(t);return n||=dn(e),n&&(r=n.getPropertyValue(t)||n[t],i&&r&&(r=r.replace(O,`$1`)||void 0),r===``&&!Gt(e)&&(r=S.style(e,t))),r===void 0?r:r+``}var H=[`Webkit`,`Moz`,`ms`],mn=_.createElement(`div`).style;function hn(e){for(var t=e[0].toUpperCase()+e.slice(1),n=H.length;n--;)if(e=H[n]+t,e in mn)return e}function gn(e){return e in mn?e:hn(e)||e}var _n,vn,yn=_.createElement(`table`);function bn(){if(!(!yn||!yn.style)){var t,n=_.createElement(`col`),r=_.createElement(`tr`),i=_.createElement(`td`);if(yn.style.cssText=`position:absolute;left:-11111px;border-collapse:separate;border-spacing:0`,r.style.cssText=`box-sizing:content-box;border:1px solid;height:1px`,i.style.cssText=`height:9px;width:9px;padding:0`,n.span=2,re.appendChild(yn).appendChild(n).parentNode.appendChild(r).appendChild(i).parentNode.appendChild(i.cloneNode(!0)),yn.offsetWidth===0){re.removeChild(yn);return}t=e.getComputedStyle(r),vn=E||Math.round(parseFloat(e.getComputedStyle(n).width))===18,_n=Math.round(parseFloat(t.height)+parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth))===r.offsetHeight,re.removeChild(yn),yn=null}}S.extend(p,{reliableTrDimensions:function(){return bn(),_n},reliableColDimensions:function(){return bn(),vn}});var xn={position:`absolute`,visibility:`hidden`,display:`block`},Sn={letterSpacing:`0`,fontWeight:`400`};function Cn(e,t,n){var r=Rt.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||`px`):t}function wn(e,t,n,r,i,a){var o=+(t===`width`),s=0,c=0,l=0;if(n===(r?`border`:`content`))return 0;for(;o<4;o+=2)n===`margin`&&(l+=S.css(e,n+zt[o],!0,i)),r?(n===`content`&&(c-=S.css(e,`padding`+zt[o],!0,i)),n!==`margin`&&(c-=S.css(e,`border`+zt[o]+`Width`,!0,i))):(c+=S.css(e,`padding`+zt[o],!0,i),n===`padding`?s+=S.css(e,`border`+zt[o]+`Width`,!0,i):c+=S.css(e,`border`+zt[o]+`Width`,!0,i));return!r&&a>=0&&(c+=Math.max(0,Math.ceil(e[`offset`+t[0].toUpperCase()+t.slice(1)]-a-c-s-.5))||0),c+l}function Tn(e,t,n){var r=dn(e),i=(E||n)&&S.css(e,`boxSizing`,!1,r)===`border-box`,a=i,o=pn(e,t,r),s=`offset`+t[0].toUpperCase()+t.slice(1);if(ln.test(o)){if(!n)return o;o=`auto`}return(o===`auto`||E&&i||!p.reliableColDimensions()&&C(e,`col`)||!p.reliableTrDimensions()&&C(e,`tr`))&&e.getClientRects().length&&(i=S.css(e,`boxSizing`,!1,r)===`border-box`,a=s in e,a&&(o=e[s])),o=parseFloat(o)||0,o+wn(e,t,n||(i?`border`:`content`),a,r,o)+`px`}S.extend({cssHooks:{},style:function(e,t,n,r){if(!(!e||e.nodeType===3||e.nodeType===8||!e.style)){var i,a,o,s=Ht(t),c=un.test(t),l=e.style;if(c||(t=gn(s)),o=S.cssHooks[t]||S.cssHooks[s],n!==void 0){if(a=typeof n,a===`string`&&(i=Rt.exec(n))&&i[1]&&(n=F(e,t,i),a=`number`),n==null||n!==n)return;a===`number`&&(n+=i&&i[3]||(P(s)?`px`:``)),E&&n===``&&t.indexOf(`background`)===0&&(l[t]=`inherit`),(!o||!(`set`in o)||(n=o.set(e,n,r))!==void 0)&&(c?l.setProperty(t,n):l[t]=n)}else return o&&`get`in o&&(i=o.get(e,!1,r))!==void 0?i:l[t]}},css:function(e,t,n,r){var i,a,o,s=Ht(t);return un.test(t)||(t=gn(s)),o=S.cssHooks[t]||S.cssHooks[s],o&&`get`in o&&(i=o.get(e,!0,n)),i===void 0&&(i=pn(e,t,r)),i===`normal`&&t in Sn&&(i=Sn[t]),n===``||n?(a=parseFloat(i),n===!0||isFinite(a)?a||0:i):i}}),S.each([`height`,`width`],function(e,t){S.cssHooks[t]={get:function(e,n,r){if(n)return S.css(e,`display`)===`none`?fn(e,xn,function(){return Tn(e,t,r)}):Tn(e,t,r)},set:function(e,n,r){var i,a=dn(e),o=r&&S.css(e,`boxSizing`,!1,a)===`border-box`,s=r?wn(e,t,r,o,a):0;return s&&(i=Rt.exec(n))&&(i[3]||`px`)!==`px`&&(e.style[t]=n,n=S.css(e,t)),Cn(e,n,s)}}}),S.each({margin:``,padding:``,border:`Width`},function(e,t){S.cssHooks[e+t]={expand:function(n){for(var r=0,i={},a=typeof n==`string`?n.split(` `):[n];r<4;r++)i[e+zt[r]+t]=a[r]||a[r-2]||a[0];return i}},e!==`margin`&&(S.cssHooks[e+t].set=Cn)}),S.fn.extend({css:function(e,t){return ye(this,function(e,t,n){var r,i,a={},o=0;if(Array.isArray(t)){for(r=dn(e),i=t.length;o<i;o++)a[t[o]]=S.css(e,t[o],!1,r);return a}return n===void 0?S.css(e,t):S.style(e,t,n)},e,t,arguments.length>1)}});function En(e,t,n,r,i){return new En.prototype.init(e,t,n,r,i)}S.Tween=En,En.prototype={constructor:En,init:function(e,t,n,r,i,a){this.elem=e,this.prop=n,this.easing=i||S.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=a||(P(n)?`px`:``)},cur:function(){var e=En.propHooks[this.prop];return e&&e.get?e.get(this):En.propHooks._default.get(this)},run:function(e){var t,n=En.propHooks[this.prop];return this.options.duration?this.pos=t=S.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):En.propHooks._default.set(this),this}},En.prototype.init.prototype=En.prototype,En.propHooks={_default:{get:function(e){var t;return e.elem.nodeType!==1||e.elem[e.prop]!=null&&e.elem.style[e.prop]==null?e.elem[e.prop]:(t=S.css(e.elem,e.prop,``),!t||t===`auto`?0:t)},set:function(e){S.fx.step[e.prop]?S.fx.step[e.prop](e):e.elem.nodeType===1&&(S.cssHooks[e.prop]||e.elem.style[gn(e.prop)]!=null)?S.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},S.easing={linear:function(e){return e},swing:function(e){return .5-Math.cos(e*Math.PI)/2},_default:`swing`},S.fx=En.prototype.init,S.fx.step={};var Dn,On,kn=/^(?:toggle|show|hide)$/,An=/queueHooks$/;function jn(){On&&(_.hidden===!1&&e.requestAnimationFrame?e.requestAnimationFrame(jn):e.setTimeout(jn,13),S.fx.tick())}function Mn(){return e.setTimeout(function(){Dn=void 0}),Dn=Date.now()}function Nn(e,t){var n,r=0,i={height:e};for(t=+!!t;r<4;r+=2-t)n=zt[r],i[`margin`+n]=i[`padding`+n]=e;return t&&(i.opacity=i.width=e),i}function Pn(e,t,n){for(var r,i=(Ln.tweeners[t]||[]).concat(Ln.tweeners[`*`]),a=0,o=i.length;a<o;a++)if(r=i[a].call(n,t,e))return r}function Fn(e,t,n){var r,i,a,o,s,c,l,u,d=`width`in t||`height`in t,f=this,p={},m=e.style,h=e.nodeType&&Bt(e),g=j.get(e,`fxshow`);for(r in n.queue||(o=S._queueHooks(e,`fx`),o.unqueued??(o.unqueued=0,s=o.empty.fire,o.empty.fire=function(){o.unqueued||s()}),o.unqueued++,f.always(function(){f.always(function(){o.unqueued--,S.queue(e,`fx`).length||o.empty.fire()})})),t)if(i=t[r],kn.test(i)){if(delete t[r],a||=i===`toggle`,i===(h?`hide`:`show`))if(i===`show`&&g&&g[r]!==void 0)h=!0;else continue;p[r]=g&&g[r]||S.style(e,r)}if(c=!S.isEmptyObject(t),!(!c&&S.isEmptyObject(p)))for(r in d&&e.nodeType===1&&(n.overflow=[m.overflow,m.overflowX,m.overflowY],l=g&&g.display,l??=j.get(e,`display`),u=S.css(e,`display`),u===`none`&&(l?u=l:(I([e],!0),l=e.style.display||l,u=S.css(e,`display`),I([e]))),(u===`inline`||u===`inline-block`&&l!=null)&&S.css(e,`float`)===`none`&&(c||(f.done(function(){m.display=l}),l??=(u=m.display,u===`none`?``:u)),m.display=`inline-block`)),n.overflow&&(m.overflow=`hidden`,f.always(function(){m.overflow=n.overflow[0],m.overflowX=n.overflow[1],m.overflowY=n.overflow[2]})),c=!1,p)c||(g?`hidden`in g&&(h=g.hidden):g=j.set(e,`fxshow`,{display:l}),a&&(g.hidden=!h),h&&I([e],!0),f.done(function(){for(r in h||I([e]),j.remove(e,`fxshow`),p)S.style(e,r,p[r])})),c=Pn(h?g[r]:0,r,f),r in g||(g[r]=c.start,h&&(c.end=c.start,c.start=0))}function In(e,t){var n,r,i,a,o;for(n in e)if(r=Ht(n),i=t[r],a=e[n],Array.isArray(a)&&(i=a[1],a=e[n]=a[0]),n!==r&&(e[r]=a,delete e[n]),o=S.cssHooks[r],o&&`expand`in o)for(n in a=o.expand(a),delete e[r],a)n in e||(e[n]=a[n],t[n]=i);else t[r]=i}function Ln(e,t,n){var r,i,a=0,o=Ln.prefilters.length,s=S.Deferred().always(function(){delete c.elem}),c=function(){if(i)return!1;for(var t=Dn||Mn(),n=Math.max(0,l.startTime+l.duration-t),r=1-(n/l.duration||0),a=0,o=l.tweens.length;a<o;a++)l.tweens[a].run(r);return s.notifyWith(e,[l,r,n]),r<1&&o?n:(o||s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:S.extend({},t),opts:S.extend(!0,{specialEasing:{},easing:S.easing._default},n),originalProperties:t,originalOptions:n,startTime:Dn||Mn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=S.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return t?(s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),u=l.props;for(In(u,l.opts.specialEasing);a<o;a++)if(r=Ln.prefilters[a].call(l,e,u,l.opts),r)return typeof r.stop==`function`&&(S._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return S.map(u,Pn,l),typeof l.opts.start==`function`&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),S.fx.timer(S.extend(c,{elem:e,anim:l,queue:l.opts.queue})),l}S.Animation=S.extend(Ln,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return F(n.elem,e,Rt.exec(t),n),n}]},tweener:function(e,t){typeof e==`function`?(t=e,e=[`*`]):e=e.match(be);for(var n,r=0,i=e.length;r<i;r++)n=e[r],Ln.tweeners[n]=Ln.tweeners[n]||[],Ln.tweeners[n].unshift(t)},prefilters:[Fn],prefilter:function(e,t){t?Ln.prefilters.unshift(e):Ln.prefilters.push(e)}}),S.speed=function(e,t,n){var r=e&&typeof e==`object`?S.extend({},e):{complete:n||t||typeof e==`function`&&e,duration:e,easing:n&&t||t&&typeof t!=`function`&&t};return S.fx.off?r.duration=0:typeof r.duration!=`number`&&(r.duration in S.fx.speeds?r.duration=S.fx.speeds[r.duration]:r.duration=S.fx.speeds._default),(r.queue==null||r.queue===!0)&&(r.queue=`fx`),r.old=r.complete,r.complete=function(){typeof r.old==`function`&&r.old.call(this),r.queue&&S.dequeue(this,r.queue)},r},S.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Bt).css(`opacity`,0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=S.isEmptyObject(e),a=S.speed(t,n,r),o=function(){var t=Ln(this,S.extend({},e),a);(i||j.get(this,`finish`))&&t.stop(!0)};return o.finish=o,i||a.queue===!1?this.each(o):this.queue(a.queue,o)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return typeof e!=`string`&&(n=t,t=e,e=void 0),t&&this.queue(e||`fx`,[]),this.each(function(){var t=!0,i=e!=null&&e+`queueHooks`,a=S.timers,o=j.get(this);if(i)o[i]&&o[i].stop&&r(o[i]);else for(i in o)o[i]&&o[i].stop&&An.test(i)&&r(o[i]);for(i=a.length;i--;)a[i].elem===this&&(e==null||a[i].queue===e)&&(a[i].anim.stop(n),t=!1,a.splice(i,1));(t||!n)&&S.dequeue(this,e)})},finish:function(e){return e!==!1&&(e||=`fx`),this.each(function(){var t,n=j.get(this),r=n[e+`queue`],i=n[e+`queueHooks`],a=S.timers,o=r?r.length:0;for(n.finish=!0,S.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=a.length;t--;)a[t].elem===this&&a[t].queue===e&&(a[t].anim.stop(!0),a.splice(t,1));for(t=0;t<o;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),S.each([`toggle`,`show`,`hide`],function(e,t){var n=S.fn[t];S.fn[t]=function(e,r,i){return e==null||typeof e==`boolean`?n.apply(this,arguments):this.animate(Nn(t,!0),e,r,i)}}),S.each({slideDown:Nn(`show`),slideUp:Nn(`hide`),slideToggle:Nn(`toggle`),fadeIn:{opacity:`show`},fadeOut:{opacity:`hide`},fadeToggle:{opacity:`toggle`}},function(e,t){S.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),S.timers=[],S.fx.tick=function(){var e,t=0,n=S.timers;for(Dn=Date.now();t<n.length;t++)e=n[t],!e()&&n[t]===e&&n.splice(t--,1);n.length||S.fx.stop(),Dn=void 0},S.fx.timer=function(e){S.timers.push(e),S.fx.start()},S.fx.start=function(){On||(On=!0,jn())},S.fx.stop=function(){On=null},S.fx.speeds={slow:600,fast:200,_default:400},S.fn.delay=function(t,n){return t=S.fx&&S.fx.speeds[t]||t,n||=`fx`,this.queue(n,function(n,r){var i=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(i)}})};var Rn=/^(?:input|select|textarea|button)$/i,zn=/^(?:a|area)$/i;S.fn.extend({prop:function(e,t){return ye(this,S.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[S.propFix[e]||e]})}}),S.extend({prop:function(e,t,n){var r,i,a=e.nodeType;if(!(a===3||a===8||a===2))return(a!==1||!S.isXMLDoc(e))&&(t=S.propFix[t]||t,i=S.propHooks[t]),n===void 0?i&&`get`in i&&(r=i.get(e,t))!==null?r:e[t]:i&&`set`in i&&(r=i.set(e,n,t))!==void 0?r:e[t]=n},propHooks:{tabIndex:{get:function(e){var t=e.getAttribute(`tabindex`);return t?parseInt(t,10):Rn.test(e.nodeName)||zn.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:`htmlFor`,class:`className`}}),E&&(S.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),S.each([`tabIndex`,`readOnly`,`maxLength`,`cellSpacing`,`cellPadding`,`rowSpan`,`colSpan`,`useMap`,`frameBorder`,`contentEditable`],function(){S.propFix[this.toLowerCase()]=this});function Bn(e){return(e.match(be)||[]).join(` `)}function U(e){return e.getAttribute&&e.getAttribute(`class`)||``}function W(e){return Array.isArray(e)?e:typeof e==`string`&&e.match(be)||[]}S.fn.extend({addClass:function(e){var t,n,r,i,a,o;return typeof e==`function`?this.each(function(t){S(this).addClass(e.call(this,t,U(this)))}):(t=W(e),t.length?this.each(function(){if(r=U(this),n=this.nodeType===1&&` `+Bn(r)+` `,n){for(a=0;a<t.length;a++)i=t[a],n.indexOf(` `+i+` `)<0&&(n+=i+` `);o=Bn(n),r!==o&&this.setAttribute(`class`,o)}}):this)},removeClass:function(e){var t,n,r,i,a,o;return typeof e==`function`?this.each(function(t){S(this).removeClass(e.call(this,t,U(this)))}):arguments.length?(t=W(e),t.length?this.each(function(){if(r=U(this),n=this.nodeType===1&&` `+Bn(r)+` `,n){for(a=0;a<t.length;a++)for(i=t[a];n.indexOf(` `+i+` `)>-1;)n=n.replace(` `+i+` `,` `);o=Bn(n),r!==o&&this.setAttribute(`class`,o)}}):this):this.attr(`class`,``)},toggleClass:function(e,t){var n,r,i,a;return typeof e==`function`?this.each(function(n){S(this).toggleClass(e.call(this,n,U(this),t),t)}):typeof t==`boolean`?t?this.addClass(e):this.removeClass(e):(n=W(e),n.length?this.each(function(){for(a=S(this),i=0;i<n.length;i++)r=n[i],a.hasClass(r)?a.removeClass(r):a.addClass(r)}):this)},hasClass:function(e){var t,n,r=0;for(t=` `+e+` `;n=this[r++];)if(n.nodeType===1&&(` `+Bn(U(n))+` `).indexOf(t)>-1)return!0;return!1}}),S.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=typeof e==`function`,this.each(function(n){var i;this.nodeType===1&&(i=r?e.call(this,n,S(this).val()):e,i==null?i=``:typeof i==`number`?i+=``:Array.isArray(i)&&(i=S.map(i,function(e){return e==null?``:e+``})),t=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()],(!t||!(`set`in t)||t.set(this,i,`value`)===void 0)&&(this.value=i))})):i?(t=S.valHooks[i.type]||S.valHooks[i.nodeName.toLowerCase()],t&&`get`in t&&(n=t.get(i,`value`))!==void 0?n:(n=i.value,n??``)):void 0}}),S.extend({valHooks:{select:{get:function(e){var t,n,r,i=e.options,a=e.selectedIndex,o=e.type===`select-one`,s=o?null:[],c=o?a+1:i.length;for(r=a<0?c:o?a:0;r<c;r++)if(n=i[r],n.selected&&!n.disabled&&(!n.parentNode.disabled||!C(n.parentNode,`optgroup`))){if(t=S(n).val(),o)return t;s.push(t)}return s},set:function(e,t){for(var n,r,i=e.options,a=S.makeArray(t),o=i.length;o--;)r=i[o],(r.selected=S.inArray(S(r).val(),a)>-1)&&(n=!0);return n||(e.selectedIndex=-1),a}}}}),E&&(S.valHooks.option={get:function(e){return e.getAttribute(`value`)??Bn(S.text(e))}}),S.each([`radio`,`checkbox`],function(){S.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=S.inArray(S(e).val(),t)>-1}}});var G=/^(?:focusinfocus|focusoutblur)$/,K=function(e){e.stopPropagation()};S.extend(S.event,{trigger:function(t,n,r,i){var a,o,s,c,l,d,f,p,m=[r||_],g=u.call(t,`type`)?t.type:t,v=u.call(t,`namespace`)?t.namespace.split(`.`):[];if(o=p=s=r||=_,!(r.nodeType===3||r.nodeType===8)&&!G.test(g+S.event.triggered)&&(g.indexOf(`.`)>-1&&(v=g.split(`.`),g=v.shift(),v.sort()),l=g.indexOf(`:`)<0&&`on`+g,t=t[S.expando]?t:new S.Event(g,typeof t==`object`&&t),t.isTrigger=i?2:3,t.namespace=v.join(`.`),t.rnamespace=t.namespace?RegExp(`(^|\\.)`+v.join(`\\.(?:.*\\.|)`)+`(\\.|$)`):null,t.result=void 0,t.target||=r,n=n==null?[t]:S.makeArray(n,[t]),f=S.event.special[g]||{},!(!i&&f.trigger&&f.trigger.apply(r,n)===!1))){if(!i&&!f.noBubble&&!h(r)){for(c=f.delegateType||g,G.test(c+g)||(o=o.parentNode);o;o=o.parentNode)m.push(o),s=o;s===(r.ownerDocument||_)&&m.push(s.defaultView||s.parentWindow||e)}for(a=0;(o=m[a++])&&!t.isPropagationStopped();)p=o,t.type=a>1?c:f.bindType||g,d=(j.get(o,`events`)||Object.create(null))[t.type]&&j.get(o,`handle`),d&&d.apply(o,n),d=l&&o[l],d&&d.apply&&At(o)&&(t.result=d.apply(o,n),t.result===!1&&t.preventDefault());return t.type=g,!i&&!t.isDefaultPrevented()&&(!f._default||f._default.apply(m.pop(),n)===!1)&&At(r)&&l&&typeof r[g]==`function`&&!h(r)&&(s=r[l],s&&(r[l]=null),S.event.triggered=g,t.isPropagationStopped()&&p.addEventListener(g,K),r[g](),t.isPropagationStopped()&&p.removeEventListener(g,K),S.event.triggered=void 0,s&&(r[l]=s)),t.result}},simulate:function(e,t,n){var r=S.extend(new S.Event,n,{type:e,isSimulated:!0});S.event.trigger(r,null,t)}}),S.fn.extend({trigger:function(e,t){return this.each(function(){S.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return S.event.trigger(e,t,n,!0)}});var q=e.location,J={guid:Date.now()},Vn=/\?/;S.parseXML=function(t){var n,r;if(!t||typeof t!=`string`)return null;try{n=new e.DOMParser().parseFromString(t,`text/xml`)}catch{}return r=n&&n.getElementsByTagName(`parsererror`)[0],(!n||r)&&S.error(`Invalid XML: `+(r?S.map(r.childNodes,function(e){return e.textContent}).join(`
6
+ `):t)),n};var Hn=/\[\]$/,Un=/\r?\n/g,Wn=/^(?:submit|button|image|reset|file)$/i,Gn=/^(?:input|select|textarea|keygen)/i;function Kn(e,t,n,r){var i;if(Array.isArray(t))S.each(t,function(t,i){n||Hn.test(e)?r(e,i):Kn(e+`[`+(typeof i==`object`&&i?t:``)+`]`,i,n,r)});else if(!n&&m(t)===`object`)for(i in t)Kn(e+`[`+i+`]`,t[i],n,r);else r(e,t)}S.param=function(e,t){var n,r=[],i=function(e,t){var n=typeof t==`function`?t():t;r[r.length]=encodeURIComponent(e)+`=`+encodeURIComponent(n??``)};if(e==null)return``;if(Array.isArray(e)||e.jquery&&!S.isPlainObject(e))S.each(e,function(){i(this.name,this.value)});else for(n in e)Kn(n,e[n],t,i);return r.join(`&`)},S.fn.extend({serialize:function(){return S.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=S.prop(this,`elements`);return e?S.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!S(this).is(`:disabled`)&&Gn.test(this.nodeName)&&!Wn.test(e)&&(this.checked||!$t.test(e))}).map(function(e,t){var n=S(this).val();return n==null?null:Array.isArray(n)?S.map(n,function(e){return{name:t.name,value:e.replace(Un,`\r
7
+ `)}}):{name:t.name,value:n.replace(Un,`\r
8
+ `)}}).get()}});var qn=/%20/g,Y=/#.*$/,X=/([?&])_=[^&]*/,Z=/^(.*?):[ \t]*([^\r\n]*)$/gm,Jn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Yn=/^(?:GET|HEAD)$/,Q=/^\/\//,Xn={},Zn={},Qn=`*/*`,$n=_.createElement(`a`);$n.href=q.href;function er(e){return function(t,n){typeof t!=`string`&&(n=t,t=`*`);var r,i=0,a=t.toLowerCase().match(be)||[];if(typeof n==`function`)for(;r=a[i++];)r[0]===`+`?(r=r.slice(1)||`*`,(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function tr(e,t,n,r){var i={},a=e===Zn;function o(s){var c;return i[s]=!0,S.each(e[s]||[],function(e,s){var l=s(t,n,r);if(typeof l==`string`&&!a&&!i[l])return t.dataTypes.unshift(l),o(l),!1;if(a)return!(c=l)}),c}return o(t.dataTypes[0])||!i[`*`]&&o(`*`)}function nr(e,t){var n,r,i=S.ajaxSettings.flatOptions||{};for(n in t)t[n]!==void 0&&((i[n]?e:r||={})[n]=t[n]);return r&&S.extend(!0,e,r),e}function rr(e,t,n){for(var r,i,a,o,s=e.contents,c=e.dataTypes;c[0]===`*`;)c.shift(),r===void 0&&(r=e.mimeType||t.getResponseHeader(`Content-Type`));if(r){for(i in s)if(s[i]&&s[i].test(r)){c.unshift(i);break}}if(c[0]in n)a=c[0];else{for(i in n){if(!c[0]||e.converters[i+` `+c[0]]){a=i;break}o||=i}a||=o}if(a)return a!==c[0]&&c.unshift(a),n[a]}function ir(e,t,n,r){var i,a,o,s,c,l={},u=e.dataTypes.slice();if(u[1])for(o in e.converters)l[o.toLowerCase()]=e.converters[o];for(a=u.shift();a;)if(e.responseFields[a]&&(n[e.responseFields[a]]=t),!c&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),c=a,a=u.shift(),a){if(a===`*`)a=c;else if(c!==`*`&&c!==a){if(o=l[c+` `+a]||l[`* `+a],!o){for(i in l)if(s=i.split(` `),s[1]===a&&(o=l[c+` `+s[0]]||l[`* `+s[0]],o)){o===!0?o=l[i]:l[i]!==!0&&(a=s[0],u.unshift(s[1]));break}}if(o!==!0)if(o&&e.throws)t=o(t);else try{t=o(t)}catch(e){return{state:`parsererror`,error:o?e:`No conversion from `+c+` to `+a}}}}return{state:`success`,data:t}}S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:q.href,type:`GET`,isLocal:Jn.test(q.protocol),global:!0,processData:!0,async:!0,contentType:`application/x-www-form-urlencoded; charset=UTF-8`,accepts:{"*":Qn,text:`text/plain`,html:`text/html`,xml:`application/xml, text/xml`,json:`application/json, text/javascript`},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:`responseXML`,text:`responseText`,json:`responseJSON`},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?nr(nr(e,S.ajaxSettings),t):nr(S.ajaxSettings,e)},ajaxPrefilter:er(Xn),ajaxTransport:er(Zn),ajax:function(t,n){typeof t==`object`&&(n=t,t=void 0),n||={};var r,i,a,o,s,c,l,u,d,f,p=S.ajaxSetup({},n),m=p.context||p,h=p.context&&(m.nodeType||m.jquery)?S(m):S.event,g=S.Deferred(),v=S.Callbacks(`once memory`),y=p.statusCode||{},b={},x={},C=`canceled`,w={readyState:0,getResponseHeader:function(e){var t;if(l){if(!o)for(o={};t=Z.exec(a);)o[t[1].toLowerCase()+` `]=(o[t[1].toLowerCase()+` `]||[]).concat(t[2]);t=o[e.toLowerCase()+` `]}return t==null?null:t.join(`, `)},getAllResponseHeaders:function(){return l?a:null},setRequestHeader:function(e,t){return l??(e=x[e.toLowerCase()]=x[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return l??(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(l)w.always(e[w.status]);else for(t in e)y[t]=[y[t],e[t]];return this},abort:function(e){var t=e||C;return r&&r.abort(t),T(0,t),this}};if(g.promise(w),p.url=((t||p.url||q.href)+``).replace(Q,q.protocol+`//`),p.type=n.method||n.type||p.method||p.type,p.dataTypes=(p.dataType||`*`).toLowerCase().match(be)||[``],p.crossDomain==null){c=_.createElement(`a`);try{c.href=p.url,c.href=c.href,p.crossDomain=$n.protocol+`//`+$n.host!=c.protocol+`//`+c.host}catch{p.crossDomain=!0}}if(tr(Xn,p,n,w),p.data&&p.processData&&typeof p.data!=`string`&&(p.data=S.param(p.data,p.traditional)),l)return w;for(d in u=S.event&&p.global,u&&S.active++===0&&S.event.trigger(`ajaxStart`),p.type=p.type.toUpperCase(),p.hasContent=!Yn.test(p.type),i=p.url.replace(Y,``),p.hasContent?p.data&&p.processData&&(p.contentType||``).indexOf(`application/x-www-form-urlencoded`)===0&&(p.data=p.data.replace(qn,`+`)):(f=p.url.slice(i.length),p.data&&(p.processData||typeof p.data==`string`)&&(i+=(Vn.test(i)?`&`:`?`)+p.data,delete p.data),p.cache===!1&&(i=i.replace(X,`$1`),f=(Vn.test(i)?`&`:`?`)+`_=`+ J.guid+++f),p.url=i+f),p.ifModified&&(S.lastModified[i]&&w.setRequestHeader(`If-Modified-Since`,S.lastModified[i]),S.etag[i]&&w.setRequestHeader(`If-None-Match`,S.etag[i])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&w.setRequestHeader(`Content-Type`,p.contentType),w.setRequestHeader(`Accept`,p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+(p.dataTypes[0]===`*`?``:`, `+Qn+`; q=0.01`):p.accepts[`*`]),p.headers)w.setRequestHeader(d,p.headers[d]);if(p.beforeSend&&(p.beforeSend.call(m,w,p)===!1||l))return w.abort();if(C=`abort`,v.add(p.complete),w.done(p.success),w.fail(p.error),r=tr(Zn,p,n,w),!r)T(-1,`No Transport`);else{if(w.readyState=1,u&&h.trigger(`ajaxSend`,[w,p]),l)return w;p.async&&p.timeout>0&&(s=e.setTimeout(function(){w.abort(`timeout`)},p.timeout));try{l=!1,r.send(b,T)}catch(e){if(l)throw e;T(-1,e)}}function T(t,n,o,c){var d,f,_,b,x,C=n;l||(l=!0,s&&e.clearTimeout(s),r=void 0,a=c||``,w.readyState=t>0?4:0,d=t>=200&&t<300||t===304,o&&(b=rr(p,w,o)),!d&&S.inArray(`script`,p.dataTypes)>-1&&S.inArray(`json`,p.dataTypes)<0&&(p.converters[`text script`]=function(){}),b=ir(p,b,w,d),d?(p.ifModified&&(x=w.getResponseHeader(`Last-Modified`),x&&(S.lastModified[i]=x),x=w.getResponseHeader(`etag`),x&&(S.etag[i]=x)),t===204||p.type===`HEAD`?C=`nocontent`:t===304?C=`notmodified`:(C=b.state,f=b.data,_=b.error,d=!_)):(_=C,(t||!C)&&(C=`error`,t<0&&(t=0))),w.status=t,w.statusText=(n||C)+``,d?g.resolveWith(m,[f,C,w]):g.rejectWith(m,[w,C,_]),w.statusCode(y),y=void 0,u&&h.trigger(d?`ajaxSuccess`:`ajaxError`,[w,p,d?f:_]),v.fireWith(m,[w,C]),u&&(h.trigger(`ajaxComplete`,[w,p]),--S.active||S.event.trigger(`ajaxStop`)))}return w},getJSON:function(e,t,n){return S.get(e,t,n,`json`)},getScript:function(e,t){return S.get(e,void 0,t,`script`)}}),S.each([`get`,`post`],function(e,t){S[t]=function(e,n,r,i){return(typeof n==`function`||n===null)&&(i||=r,r=n,n=void 0),S.ajax(S.extend({url:e,type:t,dataType:i,data:n,success:r},S.isPlainObject(e)&&e))}}),S.ajaxPrefilter(function(e){for(var t in e.headers)t.toLowerCase()===`content-type`&&(e.contentType=e.headers[t]||``)}),S._evalUrl=function(e,t,n){return S.ajax({url:e,type:`GET`,dataType:`script`,cache:!0,async:!1,global:!1,scriptAttrs:t.crossOrigin?{crossOrigin:t.crossOrigin}:void 0,converters:{"text script":function(){}},dataFilter:function(e){S.globalEval(e,t,n)}})},S.fn.extend({wrapAll:function(e){var t;return this[0]&&(typeof e==`function`&&(e=e.call(this[0])),t=S(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return typeof e==`function`?this.each(function(t){S(this).wrapInner(e.call(this,t))}):this.each(function(){var t=S(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=typeof e==`function`;return this.each(function(n){S(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not(`body`).each(function(){S(this).replaceWith(this.childNodes)}),this}}),S.expr.pseudos.hidden=function(e){return!S.expr.pseudos.visible(e)},S.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},S.ajaxSettings.xhr=function(){return new e.XMLHttpRequest};var ar={0:200};S.ajaxTransport(function(e){var t;return{send:function(n,r){var i,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(i in e.xhrFields)a[i]=e.xhrFields[i];for(i in e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),!e.crossDomain&&!n[`X-Requested-With`]&&(n[`X-Requested-With`]=`XMLHttpRequest`),n)a.setRequestHeader(i,n[i]);t=function(e){return function(){t&&(t=a.onload=a.onerror=a.onabort=a.ontimeout=null,e===`abort`?a.abort():e===`error`?r(a.status,a.statusText):r(ar[a.status]||a.status,a.statusText,(a.responseType||`text`)===`text`?{text:a.responseText}:{binary:a.response},a.getAllResponseHeaders()))}},a.onload=t(),a.onabort=a.onerror=a.ontimeout=t(`error`),t=t(`abort`);try{a.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}});function or(e){return e.scriptAttrs||!e.headers&&(e.crossDomain||e.async&&S.inArray(`json`,e.dataTypes)<0)}S.ajaxSetup({accepts:{script:`text/javascript, application/javascript, application/ecmascript, application/x-ecmascript`},converters:{"text script":function(e){return S.globalEval(e),e}}}),S.ajaxPrefilter(`script`,function(e){e.cache===void 0&&(e.cache=!1),or(e)&&(e.type=`GET`)}),S.ajaxTransport(`script`,function(e){if(or(e)){var t,n;return{send:function(r,i){t=S(`<script>`).attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on(`load error`,n=function(e){t.remove(),n=null,e&&i(e.type===`error`?404:200,e.type)}),_.head.appendChild(t[0])},abort:function(){n&&n()}}}});var sr=[],cr=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:`callback`,jsonpCallback:function(){var e=sr.pop()||S.expando+`_`+ J.guid++;return this[e]=!0,e}}),S.ajaxPrefilter(`jsonp`,function(t,n,r){var i,a,o,s=t.jsonp!==!1&&(cr.test(t.url)?`url`:typeof t.data==`string`&&(t.contentType||``).indexOf(`application/x-www-form-urlencoded`)===0&&cr.test(t.data)&&`data`);return i=t.jsonpCallback=typeof t.jsonpCallback==`function`?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(cr,`$1`+i):t.jsonp!==!1&&(t.url+=(Vn.test(t.url)?`&`:`?`)+t.jsonp+`=`+i),t.converters[`script json`]=function(){return o||S.error(i+` was not called`),o[0]},t.dataTypes[0]=`json`,a=e[i],e[i]=function(){o=arguments},r.always(function(){a===void 0?S(e).removeProp(i):e[i]=a,t[i]&&(t.jsonpCallback=n.jsonpCallback,sr.push(i)),o&&typeof a==`function`&&a(o[0]),o=a=void 0}),`script`}),S.ajaxPrefilter(function(t,n){typeof t.data!=`string`&&!S.isPlainObject(t.data)&&!Array.isArray(t.data)&&!(`processData`in n)&&(t.processData=!1),t.data instanceof e.FormData&&(t.contentType=!1)}),S.parseHTML=function(t,n,r){if(typeof t!=`string`&&!ft(t+``))return[];typeof n==`boolean`&&(r=n,n=!1);var i,a;return n||=new e.DOMParser().parseFromString(``,`text/html`),i=dt.exec(t),a=!r&&[],i?[n.createElement(i[1])]:(i=z([t],n,a),a&&a.length&&S(a).remove(),S.merge([],i.childNodes))},S.fn.load=function(e,t,n){var r,i,a,o=this,s=e.indexOf(` `);return s>-1&&(r=Bn(e.slice(s)),e=e.slice(0,s)),typeof t==`function`?(n=t,t=void 0):t&&typeof t==`object`&&(i=`POST`),o.length>0&&S.ajax({url:e,type:i||`GET`,dataType:`html`,data:t}).done(function(e){a=arguments,o.html(r?S(`<div>`).append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){o.each(function(){n.apply(this,a||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(e){return S.grep(S.timers,function(t){return e===t.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,a,o,s,c,l,u=S.css(e,`position`),d=S(e),f={};u===`static`&&(e.style.position=`relative`),s=d.offset(),a=S.css(e,`top`),c=S.css(e,`left`),l=(u===`absolute`||u===`fixed`)&&(a+c).indexOf(`auto`)>-1,l?(r=d.position(),o=r.top,i=r.left):(o=parseFloat(a)||0,i=parseFloat(c)||0),typeof t==`function`&&(t=t.call(e,n,S.extend({},s))),t.top!=null&&(f.top=t.top-s.top+o),t.left!=null&&(f.left=t.left-s.left+i),`using`in t?t.using.call(e,f):d.css(f)}},S.fn.extend({offset:function(e){if(arguments.length)return e===void 0?this:this.each(function(t){S.offset.setOffset(this,e,t)});var t,n,r=this[0];if(r)return r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if(S.css(r,`position`)===`fixed`)t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&e!==n.documentElement&&S.css(e,`position`)===`static`;)e=e.offsetParent||n.documentElement;e&&e!==r&&e.nodeType===1&&S.css(e,`position`)!==`static`&&(i=S(e).offset(),i.top+=S.css(e,`borderTopWidth`,!0),i.left+=S.css(e,`borderLeftWidth`,!0))}return{top:t.top-i.top-S.css(r,`marginTop`,!0),left:t.left-i.left-S.css(r,`marginLeft`,!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&S.css(e,`position`)===`static`;)e=e.offsetParent;return e||re})}}),S.each({scrollLeft:`pageXOffset`,scrollTop:`pageYOffset`},function(e,t){var n=t===`pageYOffset`;S.fn[e]=function(r){return ye(this,function(e,r,i){var a;if(h(e)?a=e:e.nodeType===9&&(a=e.defaultView),i===void 0)return a?a[t]:e[r];a?a.scrollTo(n?a.pageXOffset:i,n?i:a.pageYOffset):e[r]=i},e,r,arguments.length)}}),S.each({Height:`height`,Width:`width`},function(e,t){S.each({padding:`inner`+e,content:t,"":`outer`+e},function(n,r){S.fn[r]=function(i,a){var o=arguments.length&&(n||typeof i!=`boolean`),s=n||(i===!0||a===!0?`margin`:`border`);return ye(this,function(t,n,i){var a;return h(t)?r.indexOf(`outer`)===0?t[`inner`+e]:t.document.documentElement[`client`+e]:t.nodeType===9?(a=t.documentElement,Math.max(t.body[`scroll`+e],a[`scroll`+e],t.body[`offset`+e],a[`offset`+e],a[`client`+e])):i===void 0?S.css(t,n,s):S.style(t,n,i,s)},t,o?i:void 0,o)}})}),S.each([`ajaxStart`,`ajaxStop`,`ajaxComplete`,`ajaxError`,`ajaxSuccess`,`ajaxSend`],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return arguments.length===1?this.off(e,`**`):this.off(t,e||`**`,n)},hover:function(e,t){return this.on(`mouseenter`,e).on(`mouseleave`,t||e)}}),S.each(`blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu`.split(` `),function(e,t){S.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),S.proxy=function(e,t){var n,r,a;if(typeof t==`string`&&(n=e[t],t=e,e=n),typeof e==`function`)return r=i.call(arguments,2),a=function(){return e.apply(t||this,r.concat(i.call(arguments)))},a.guid=e.guid=e.guid||S.guid++,a},S.holdReady=function(e){e?S.readyWait++:S.ready(!0)},S.expr[`:`]=S.expr.filters=S.expr.pseudos,typeof define==`function`&&define.amd&&define(`jquery`,[],function(){return S});var lr=e.jQuery,ur=e.$;return S.noConflict=function(t){return e.$===S&&(e.$=ur),t&&e.jQuery===S&&(e.jQuery=lr),S},t===void 0&&(e.jQuery=e.$=S),S}var zt=Rt(window,!0),Bt=()=>({slidesScale:``,slideMode:!1,slideType:`divs2slidesjs`,revealjsPath:``,keyBoardShortCut:!1,mediaProcess:!0,jsZipV2:!1,themeProcess:!0,incSlide:{width:0,height:0},slideModeConfig:{first:1,nav:!0,navTxtColor:`black`,keyBoardShortCut:!0,showSlideNum:!0,showTotalSlideNum:!0,autoSlide:!0,randomAutoSlide:!1,loop:!1,background:!1,transition:`default`,transitionTime:1},revealjsConfig:{}}),M=function(){return M=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},M.apply(this,arguments)};function N(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var P={button:`bb-button`,chart:`bb-chart`,empty:`bb-empty`,main:`bb-main`,target:`bb-target`,EXPANDED:`_expanded_`,dummy:`_dummy_`},F={arc:`bb-arc`,arcLabelLine:`bb-arc-label-line`,arcLabelLineText:`bb-arc-label-line-text`,arcRange:`bb-arc-range`,arcs:`bb-arcs`,chartArc:`bb-chart-arc`,chartArcs:`bb-chart-arcs`,chartArcsBackground:`bb-chart-arcs-background`,chartArcsTitle:`bb-chart-arcs-title`,needle:`bb-needle`},Vt={area:`bb-area`,areas:`bb-areas`},Ht={axis:`bb-axis`,axisX:`bb-axis-x`,axisXLabel:`bb-axis-x-label`,axisY:`bb-axis-y`,axisY2:`bb-axis-y2`,axisY2Label:`bb-axis-y2-label`,axisYLabel:`bb-axis-y-label`,axisXTooltip:`bb-axis-x-tooltip`,axisYTooltip:`bb-axis-y-tooltip`,axisY2Tooltip:`bb-axis-y2-tooltip`,axisTooltipX:`bb-axis-tooltip-x`,axisTooltipY:`bb-axis-tooltip-y`},Ut={bar:`bb-bar`,bars:`bb-bars`,chartBar:`bb-chart-bar`,chartBars:`bb-chart-bars`,barConnectLine:`bb-bar-connectLine`},Wt={candlestick:`bb-candlestick`,candlesticks:`bb-candlesticks`,chartCandlestick:`bb-chart-candlestick`,chartCandlesticks:`bb-chart-candlesticks`,valueDown:`bb-value-down`,valueUp:`bb-value-up`},I={chartCircles:`bb-chart-circles`,circle:`bb-circle`,circles:`bb-circles`},Gt={colorPattern:`bb-color-pattern`,colorScale:`bb-colorscale`},Kt={dragarea:`bb-dragarea`,INCLUDED:`_included_`},qt={funnel:`bb-funnel`,chartFunnel:`bb-chart-funnel`,chartFunnels:`bb-chart-funnels`,funnelBackground:`bb-funnel-background`},Jt={chartArcsGaugeMax:`bb-chart-arcs-gauge-max`,chartArcsGaugeMin:`bb-chart-arcs-gauge-min`,chartArcsGaugeUnit:`bb-chart-arcs-gauge-unit`,chartArcsGaugeTitle:`bb-chart-arcs-gauge-title`,gaugeValue:`bb-gauge-value`},L={legend:`bb-legend`,legendBackground:`bb-legend-background`,legendItem:`bb-legend-item`,legendItemEvent:`bb-legend-item-event`,legendItemHidden:`bb-legend-item-hidden`,legendItemPoint:`bb-legend-item-point`,legendItemTile:`bb-legend-item-tile`},Yt={chartLine:`bb-chart-line`,chartLines:`bb-chart-lines`,line:`bb-line`,lines:`bb-lines`},Xt={eventRect:`bb-event-rect`,eventRects:`bb-event-rects`,eventRectsMultiple:`bb-event-rects-multiple`,eventRectsSingle:`bb-event-rects-single`},R={focused:`bb-focused`,defocused:`bb-defocused`,legendItemFocused:`bb-legend-item-focused`,xgridFocus:`bb-xgrid-focus`,ygridFocus:`bb-ygrid-focus`},z={grid:`bb-grid`,gridLines:`bb-grid-lines`,xgrid:`bb-xgrid`,xgridLine:`bb-xgrid-line`,xgridLines:`bb-xgrid-lines`,xgrids:`bb-xgrids`,ygrid:`bb-ygrid`,ygridLine:`bb-ygrid-line`,ygridLines:`bb-ygrid-lines`,ygrids:`bb-ygrids`},Zt={chartRadar:`bb-chart-radar`,chartRadars:`bb-chart-radars`},Qt={region:`bb-region`,regions:`bb-regions`},B={selectedCircle:`bb-selected-circle`,selectedCircles:`bb-selected-circles`,SELECTED:`_selected_`},$t={shape:`bb-shape`,shapes:`bb-shapes`},en={brush:`bb-brush`,subchart:`bb-subchart`},V={chartText:`bb-chart-text`,chartTexts:`bb-chart-texts`,text:`bb-text`,texts:`bb-texts`,title:`bb-title`,textBorderRect:`bb-text-border`,textLabelImage:`bb-text-label-image`,TextOverlapping:`text-overlapping`},tn={tooltip:`bb-tooltip`,tooltipContainer:`bb-tooltip-container`,tooltipName:`bb-tooltip-name`},nn=M(M(M(M(M(M(M(M(M(M(M(M(M(M(M(M(M(M(M(M(M(M(M(M(M({},P),F),Vt),Ht),Ut),Wt),I),Gt),Kt),Jt),L),Yt),Xt),R),qt),z),Zt),Qt),B),$t),en),V),tn),{treemap:`bb-treemap`,chartTreemap:`bb-chart-treemap`,chartTreemaps:`bb-chart-treemaps`}),{buttonZoomReset:`bb-zoom-reset`,zoomBrush:`bb-zoom-brush`}),rn={boost_useCssRule:!1,boost_useWorker:!1},an={color_pattern:[],color_tiles:void 0,color_threshold:{},color_onover:void 0},on={legend_contents_bindto:void 0,legend_contents_template:`<span style='color:#fff;padding:5px;background-color:{=COLOR}'>{=TITLE}</span>`,legend_equally:!1,legend_hide:!1,legend_inset_anchor:`top-left`,legend_inset_x:10,legend_inset_y:0,legend_inset_step:void 0,legend_item_interaction:!0,legend_item_dblclick:!1,legend_item_onclick:void 0,legend_item_onover:void 0,legend_item_onout:void 0,legend_item_tile_width:10,legend_item_tile_height:10,legend_item_tile_r:5,legend_item_tile_type:`rectangle`,legend_format:void 0,legend_padding:0,legend_position:`bottom`,legend_show:!0,legend_tooltip:!1,legend_usePoint:!1},sn={bindto:`#chart`,background:{},clipPath:!0,svg_classname:void 0,size_width:void 0,size_height:void 0,padding:!0,padding_mode:void 0,padding_left:void 0,padding_right:void 0,padding_top:void 0,padding_bottom:void 0,resize_auto:!0,resize_timer:!0,onclick:void 0,onover:void 0,onout:void 0,onresize:void 0,onresized:void 0,onbeforeinit:void 0,oninit:void 0,onafterinit:void 0,onrendered:void 0,transition_duration:250,plugins:[],render:{},regions:[]},cn={title_text:void 0,title_padding:{top:0,right:0,bottom:0,left:0},title_position:`center`},ln={tooltip_show:!0,tooltip_doNotHide:!1,tooltip_grouped:!0,tooltip_format_title:void 0,tooltip_format_name:void 0,tooltip_format_value:void 0,tooltip_position:void 0,tooltip_contents:{},tooltip_init_show:!1,tooltip_init_x:0,tooltip_init_position:void 0,tooltip_linked:!1,tooltip_linked_name:``,tooltip_onshow:function(){},tooltip_onhide:function(){},tooltip_onshown:function(){},tooltip_onhidden:function(){},tooltip_order:null},un={data_x:void 0,data_idConverter:function(e){return e},data_names:{},data_classes:{},data_type:void 0,data_types:{},data_order:`desc`,data_groups:[],data_groupsZeroAs:`positive`,data_color:void 0,data_colors:{},data_labels:{},data_labels_backgroundColors:void 0,data_labels_colors:void 0,data_labels_position:{},data_labels_imgUrl:void 0,data_hide:!1,data_filter:void 0,data_onclick:function(){},data_onover:function(){},data_onout:function(){},data_onshown:void 0,data_onhidden:void 0,data_onmin:void 0,data_onmax:void 0,data_url:void 0,data_headers:void 0,data_json:void 0,data_rows:void 0,data_columns:void 0,data_mimeType:`csv`,data_keys:void 0,data_empty_label_text:``},dn={interaction_enabled:!0,interaction_brighten:!0,interaction_inputType_mouse:!0,interaction_inputType_touch:{},interaction_onout:!0};function fn(){return typeof globalThis==`object`&&globalThis!==null&&globalThis.Object===Object&&globalThis||typeof global==`object`&&global!==null&&global.Object===Object&&global||typeof self==`object`&&self!==null&&self.Object===Object&&self||Function(`return this`)()}function pn(e){var t=typeof e?.requestAnimationFrame==`function`&&typeof e?.cancelAnimationFrame==`function`,n=typeof e?.requestIdleCallback==`function`&&typeof e?.cancelIdleCallback==`function`,r=function(e){return setTimeout(e,1)},i=function(e){return clearTimeout(e)};return[t?e.requestAnimationFrame:r,t?e.cancelAnimationFrame:i,n?e.requestIdleCallback:r,n?e.cancelIdleCallback:i]}var H=fn(),mn=H?.document,hn=pn(H),gn=hn[0],_n=hn[2],vn=new Set(`span.div.p.br.b.i.em.strong.u.s.sub.sup.ul.ol.li.dl.dt.dd.table.thead.tbody.tfoot.tr.th.td.caption.colgroup.col.hr.pre.code.blockquote.a.img.svg.g.path.circle.ellipse.rect.line.polyline.polygon.text.tspan.textPath.use.defs.symbol.clipPath.mask.linearGradient.radialGradient.stop.pattern.marker.title.desc`.split(`.`)),yn=new Set(`class.id.style.title.lang.dir.href.src.alt.width.height.colspan.rowspan.scope.headers.d.points.x.y.x1.x2.y1.y2.cx.cy.r.rx.ry.dx.dy.viewBox.preserveAspectRatio.transform.fill.fill-opacity.fill-rule.stroke.stroke-width.stroke-opacity.stroke-linecap.stroke-linejoin.stroke-dasharray.stroke-dashoffset.opacity.clip-path.clip-rule.mask.font-family.font-size.font-weight.font-style.text-anchor.dominant-baseline.offset.stop-color.stop-opacity.gradientUnits.gradientTransform.spreadMethod.patternUnits.patternTransform.marker-start.marker-mid.marker-end.markerWidth.markerHeight.refX.refY.xlink:href`.split(`.`)),bn=new Set([`http:`,`https:`,`mailto:`]),xn=new Set([`href`,`src`,`xlink:href`]),Sn=/^<\/?([a-zA-Z][a-zA-Z0-9]*)/,Cn=/^<\/([a-zA-Z][a-zA-Z0-9]*)\s*>$/,wn=/^<([a-zA-Z][a-zA-Z0-9]*)([\s\S]*?)(\/?)>$/,Tn=/([a-zA-Z][\w:-]*)\s*(?:=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+)))?/g,En=/url\s*\(\s*["']?([^"')]+)["']?\s*\)/gi,Dn=[`expression(`,`behavior:`,`binding:`,`@import`,`@charset`,`-moz-binding:`];function On(e){return e.replace(/&colon;/gi,`:`).replace(/&newline;/gi,`
9
+ `).replace(/&tab;/gi,` `).replace(/&nbsp;/gi,` `).replace(/&lt;/gi,`<`).replace(/&gt;/gi,`>`).replace(/&amp;/gi,`&`).replace(/&quot;/gi,`"`).replace(/&apos;/gi,`'`).replace(/&#(\d+);/gi,function(e,t){return String.fromCharCode(parseInt(t,10))}).replace(/&#x([0-9a-f]+);/gi,function(e,t){return String.fromCharCode(parseInt(t,16))})}function kn(e){var t=On(e).trim().replace(/[\s\u0000-\u001f]/g,``).toLowerCase();if(!t||t.startsWith(`#`)||t.startsWith(`/`)||t.startsWith(`./`)||t.startsWith(`../`)||!t.includes(`:`))return!0;var n=t.indexOf(`:`);if(n>0){var r=t.substring(0,n+1);return bn.has(r)}return!1}function An(e){var t=On(e).replace(/[\u0000-\u001f]/g,``);En.lastIndex=0;for(var n;(n=En.exec(t))!==null;)if(!kn(n[1]))return null;for(var r=t.toLowerCase().replace(/\s/g,``),i=0,a=Dn;i<a.length;i++){var o=a[i];if(r.includes(o))return null}return e}var jn={'"':`&quot;`,"'":`&#39;`,"`":`&#96;`},Mn=/["'`]/g;function Nn(e){return e.replace(Mn,function(e){return jn[e]})}function Pn(e,t,n){if(n===void 0&&(n=!1),xn.has(e))return kn(t)?n?Nn(t):t:null;if(e===`style`){var r=An(t);return r===null?null:n?Nn(r):r}var i=On(t).toLowerCase().replace(/\s/g,``);return/\bon\w+=/.test(i)?null:n?Nn(t):t}function Fn(e){var t=e.match(Sn);return t?t[1].toLowerCase():null}function In(e){var t=Fn(e);return t!==null&&vn.has(t)}function Ln(e){var t=e.match(Cn);if(t)return`</${t[1].toLowerCase()}>`;var n=e.match(wn);if(!n)return``;var r=n[1],i=n[2],a=n[3],o=r.toLowerCase(),s=[];Tn.lastIndex=0;for(var c;(c=Tn.exec(i))!==null;){var l=c[1].toLowerCase(),u=c[2],d=c[3],f=c[4];if(!l.startsWith(`on`)){var p=void 0,m=void 0;if(u!==void 0)p=u,m=`"`;else if(d!==void 0)p=d,m=`'`;else if(f!==void 0)p=f,m=`"`;else{yn.has(l)&&s.push(l);continue}if(yn.has(l)){var h=Pn(l,p,f!==void 0);h!==null&&s.push(`${l}=${m}${h}${m}`)}}}return`<${o}${s.length>0?` ${s.join(` `)}`:``}${a?`/>`:`>`}`}function Rn(e){return typeof e!=`string`||!e||e.indexOf(`<`)===-1?e:e.replace(/<\/?[^>]*>|[^<>\s]+>/g,function(e){return e.startsWith(`<!--`)?``:e.startsWith(`<`)?In(e)?Ln(e):e.replace(/</g,`&lt;`):e.slice(0,-1)+`&gt;`})}function zn(e,t,n){n===void 0&&(n=!1);var r=function(t){return t[e?`getBoundingClientRect`:`getBBox`]()};return n?r(t):!(`rect`in t)||`rect`in t&&t.hasAttribute(`width`)&&t.rect.width!==+(t.getAttribute(`width`)||0)?t.rect=r(t):t.rect}function Bn(e,t){for(var n=0;n<e.length;n++){var r=e[n];r&&t(r,n)}}var U=function(e){return e||e===0},W=function(e){return typeof e==`function`},G=function(e){return typeof e==`string`},K=function(e){return typeof e==`number`},q=function(e){return e===void 0},J=function(e){return e!==void 0},Vn=function(e){return typeof e==`boolean`},Hn=function(e){return Math.ceil(e/10)*10},Un=function(e){return Math.ceil(e)+.5},Wn=function(e){return e[1]-e[0]},Gn=function(e){return typeof e==`object`},Kn=function(e){for(var t in e)return!1;return!0},qn=function(e){return q(e)||e===null||G(e)&&e.length===0||Gn(e)&&!(e instanceof Date)&&Kn(e)||K(e)&&isNaN(e)},Y=function(e){return!qn(e)},X=function(e){return Array.isArray(e)},Z=function(e){return e&&!e?.nodeType&&Gn(e)&&!X(e)};function Jn(e,t,n){return J(e[t])?e[t]:n}function Yn(e,t){var n=!1;return Object.keys(e).forEach(function(r){return e[r]===t&&(n=!0)}),n}function Q(e,t){var n=[...arguments].slice(2),r=W(e);return r&&e.call.apply(e,N([t],n,!1)),r}function Xn(e,t){var n=0,r=function(){var e=[...arguments];!--n&&t.apply.apply(t,N([this],e,!1))};`duration`in e?e.each(function(){return++n}).on(`end`,r):(++n,e.call(r))}function Zn(e,t,n,r){if(n===void 0&&(n=[-1,1]),r===void 0&&(r=!1),!(!e||!G(t)))if(t.indexOf(`
10
+ `)===-1)e.text(t);else{var i=[e.text(),t].map(function(e){return e.replace(/[\s\n]/g,``)});if(i[0]!==i[1]){var a=t.split(`
11
+ `),o=r?a.length-1:1;e.html(``),a.forEach(function(t,r){e.append(`tspan`).attr(`x`,0).attr(`dy`,`${r===0?n[0]*o:n[1]}em`).text(t)})}}}function Qn(e){var t=e.getBBox(),n=t.x,r=t.y,i=t.width,a=t.height;return[{x:n,y:r+a},{x:n,y:r},{x:n+i,y:r},{x:n+i,y:r+a}]}function $n(e){var t=nr(e),n=t.width,r=t.height,i=Qn(e);return{x:i[0].x,y:Math.min(i[0].y,i[1].y),width:n,height:r}}function er(e,t){var n=e&&(e.touches||e.sourceEvent&&e.sourceEvent.touches)?.[0],r=[0,0];try{r=Ue(n||e,t)}catch{}return r.map(function(e){return isNaN(e)?0:e})}function tr(e){var t=e.event,n=e.$el,r=n.subchart.main||n.main,i;return t&&t.type===`brush`?i=t.selection:r&&(i=r.select(`.bb-brush`).node())&&(i=ce(i)),i}function nr(e,t){return t===void 0&&(t=!1),zn(!0,e,t)}function rr(e,t){return t===void 0&&(t=!1),zn(!1,e,t)}function ir(e,t,n){e===void 0&&(e=!0),t===void 0&&(t=0),n===void 0&&(n=1e4);var r=H.crypto||H.msCrypto,i=r?t+r.getRandomValues(new Uint32Array(1))[0]%(n-t+1):Math.floor(Math.random()*(n-t)+t);return e?String(i):i}function ar(e,t,n,r,i){if(n>r)return-1;var a=Math.floor((n+r)/2),o=e[a],s=o.x,c=o.w,l=c===void 0?0:c;return i&&(s=e[a].y,l=e[a].h),t>=s&&t<=s+l?a:t<s?ar(e,t,n,a-1,i):ar(e,t,a+1,r,i)}function or(e){var t=tr(e);return t?t[0]===t[1]:!0}function sr(){var e=[...arguments],t=function(e){if(Z(e)&&e.constructor){var n=new e.constructor;for(var r in e)n[r]=t(e[r]);return n}return e};return e.map(function(e){return t(e)}).reduce(function(e,t){return M(M({},e),t)})}function cr(e,t){for(var n in e===void 0&&(e={}),X(t)&&t.forEach(function(t){return cr(e,t)}),t)/^\d+$/.test(n)||n in e||(e[n]=t[n]);return e}var lr=function(e){return e.charAt(0).toUpperCase()+e.slice(1)};function ur(e,t){return t===void 0&&(t=`-`),e.split(t).map(function(e,t){return t?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():e.toLowerCase()}).join(``)}var dr=function(e){return[].slice.call(e)};function fr(e,t,n){var r=e.rootSelector,i=r===void 0?``:r,a=e.sheet,o=`${i} ${function(e){return e.replace(/\s?(bb-)/g,`.$1`).replace(/\.+/g,`.`)}(t)} {${n.join(`;`)}}`;return a[a.insertRule?`insertRule`:`addRule`](o,a.cssRules.length)}function pr(e){var t=[];return e.forEach(function(e){var n;try{e.cssRules&&e.cssRules.length&&(t=t.concat(dr(e.cssRules)))}catch(t){(n=H.console)==null||n.warn(`Error while reading rules from ${e.href}: ${t.toString()}`)}}),t}function mr(e){return{x:(H.pageXOffset??H.scrollX??0)+(e.scrollLeft??0),y:(H.pageYOffset??H.scrollY??0)+(e.scrollTop??0)}}function hr(e,t,n,r){t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=!0);var i=new DOMPoint(t,n),a=e.getScreenCTM(),o=i.matrixTransform(r?a?.inverse():a);if(r===!1){var s=nr(e);o.x-=s.x,o.y-=s.y}return o}function gr(e){var t=e?e.transform:null,n=t&&t.baseVal;return n&&n.numberOfItems?n.getItem(0).matrix:{a:0,b:0,c:0,d:0,e:0,f:0}}function _r(e){var t=e[0]instanceof Date,n=(t?e.map(Number):e).filter(function(e,t,n){return n.indexOf(e)===t});return t?n.map(function(e){return new Date(e)}):n}function vr(e){return e&&e.length?e.reduce(function(e,t){return e.concat(t)}):[]}function yr(e){var t=[...arguments].slice(1);if(!t.length||t.length===1&&!t[0])return e;var n=t.shift();return Z(e)&&Z(n)&&Object.keys(n).forEach(function(t){if(!/^(__proto__|constructor|prototype)$/i.test(t)){var r=n[t];Z(r)?(!e[t]&&(e[t]={}),e[t]=yr(e[t],r)):e[t]=X(r)?r.concat():r}}),yr.apply(void 0,N([e],t,!1))}function br(e,t){t===void 0&&(t=!0);var n;return e[0]instanceof Date?n=t?function(e,t){return e-t}:function(e,t){return t-e}:t&&!e.every(isNaN)?n=function(e,t){return e-t}:t||(n=function(e,t){return e>t&&-1||e<t&&1||e===t&&0}),e.concat().sort(n)}function xr(e,t){var n=t.filter(function(e){return Y(e)});return n.length?K(n[0])?n=Math[e].apply(Math,n):n[0]instanceof Date&&(n=br(n,e===`min`)[0]):n=void 0,n}var Sr={mouse:(function(){var e=function(){return{bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0}};try{return new MouseEvent(`t`),function(t,n,r){r===void 0&&(r=e()),t.dispatchEvent(new MouseEvent(n,r))}}catch{return function(t,n,r){r===void 0&&(r=e());var i=mn.createEvent(`MouseEvent`);i.initMouseEvent(n,r.bubbles,r.cancelable,H,0,r.screenX,r.screenY,r.clientX,r.clientY,!1,!1,!1,!1,0,null),t.dispatchEvent(i)}}})(),touch:function(e,t,n){var r=new Touch(yr({identifier:Date.now(),target:e,radiusX:2.5,radiusY:2.5,rotationAngle:10,force:.5},n));e.dispatchEvent(new TouchEvent(t,{cancelable:!0,bubbles:!0,shiftKey:!0,touches:[r],targetTouches:[],changedTouches:[r]}))}};function Cr(e,t){var n=e;for(var r in t)n=n.replace(RegExp(`{=${r}}`,`g`),t[r]);return Rn(n)}function wr(e){var t;if(e instanceof Date)t=e;else if(G(e)){var n=this,r=n.config;t=n.format.dataTime(r.data_xFormat)(e)??new Date(e)}else K(e)&&!isNaN(e)&&(t=new Date(+e));return(!t||isNaN(+t))&&console&&console.error&&console.error(`Failed to parse x '${e}' to Date object`),t}function Tr(e){var t=e.attr(`viewBox`);return t?/(\d+(\.\d+)?){3}/.test(t):!1}function Er(e,t,n){n===void 0&&(n=!1);for(var r=!!e.node,i=!1,a=0,o=Object.entries(t);a<o.length;a++){var s=o[a],c=s[0],l=s[1];if(i=r?e.style(c)===l:e.style[c]===l,n===!1&&i)break}return i}function Dr(){return mn?.hidden===!1||mn?.visibilityState===`visible`}function Or(e,t){var n=H.DocumentTouch,r=H.matchMedia,i=H.navigator,a=r?.(`(pointer:coarse)`).matches,o=!1;if(t)if(i&&`maxTouchPoints`in i)o=i.maxTouchPoints>0;else if(`ontouchmove`in H||n&&mn instanceof n)o=!0;else if(a)o=!0;else{var s=i.userAgent;o=/\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(s)||/\b(Android|Windows Phone|iPad|iPod)\b/i.test(s)}return e&&!a&&r?.(`(pointer:fine)`).matches&&`mouse`||o&&`touch`||`mouse`}function kr(e,t){t()===!1?gn(function(){return kr(e,t)}):e()}function Ar(e){if(Z(e)&&!G(e)){var t=e;return{top:t.top||0,right:t.right||0,bottom:t.bottom||0,left:t.left||0}}var n=(G(e)?e.trim().split(/\s+/):[e]).map(function(e){return+e||0}),r=n[0],i=n[1],a=i===void 0?r:i,o=n[2],s=o===void 0?r:o,c=n[3];return{top:r,right:a,bottom:s,left:c===void 0?a:c}}function jr(e,t){e.pendingRaf===null?(e.pendingRaf=H.requestAnimationFrame(function(){e.pendingRaf=null}),t()):(H.cancelAnimationFrame(e.pendingRaf),e.pendingRaf=H.requestAnimationFrame(function(){e.pendingRaf=null,t()}))}function Mr(e,t){t===void 0&&(t=(function(e){return e}));var n=new Set;return Bn(e,function(e,r){n.add(t(e,r))}),n}function Nr(e,t,n){n===void 0&&(n=(function(e){return e}));var r=new Map;return Bn(e,function(e,i){r.set(t(e,i),n(e,i))}),r}var Pr=function(){function e(){return sr(sn,rn,un,an,dn,on,cn,ln,e.data)}return e.setOptions=function(e){this.data=e.reduce(function(e,t){return M(M({},e),t)},this.data)},e.data={},e}(),Fr={element:function(){function e(){return{chart:null,main:null,svg:null,axis:{x:null,y:null,y2:null,subX:null},axisTooltip:{x:null,y:null,y2:null},defs:null,tooltip:null,legend:null,title:null,subchart:{main:null,bar:null,line:null,area:null},arcs:null,bar:null,candlestick:null,line:null,area:null,circle:null,radar:null,text:null,grid:{main:null,x:null,y:null},gridLines:{main:null,x:null,y:null},region:{main:null,list:null},eventRect:null,zoomResetBtn:null}}return e}(),state:function(){function e(){return{width:0,width2:0,height:0,height2:0,margin:{top:0,bottom:0,left:0,right:0},margin2:{top:0,bottom:0,left:0,right:0},margin3:{top:0,bottom:0,left:0,right:0},arcWidth:0,arcHeight:0,xAxisHeight:0,hasAxis:!1,hasFunnel:!1,hasRadar:!1,hasTreemap:!1,cssRule:{},loading:void 0,domain:void 0,current:{domain:void 0,width:0,height:0,dataMax:0,maxTickSize:{x:{width:0,height:0,ticks:[],clipPath:0,domain:``},y:{width:0,height:0,domain:``},y2:{width:0,height:0,domain:``}},types:[],needle:void 0,zoomDomain:null},isLegendRight:!1,isLegendInset:!1,isLegendTop:!1,isLegendLeft:!1,legendStep:0,legendItemWidth:0,legendItemHeight:0,legendHasRendered:!1,eventReceiver:{currentIdx:-1,rect:{},data:[],coords:[]},axis:{x:{padding:{left:0,right:0},tickCount:0}},rotatedPadding:{left:30,right:0,top:5},withoutFadeIn:{},inputType:``,datetimeId:``,clip:{id:``,idXAxis:``,idYAxis:``,idXAxisTickTexts:``,idGrid:``,idSubchart:``,path:``,pathXAxis:``,pathYAxis:``,pathXAxisTickTexts:``,pathGrid:``},event:null,dragStart:null,dragging:!1,flowing:!1,cancelClick:!1,mouseover:!1,rendered:!1,transiting:!1,redrawing:!1,resizing:!1,toggling:!1,zooming:!1,hasNegativeValue:!1,hasPositiveValue:!0,orgAreaOpacity:`0.2`,orgConfig:{},hiddenTargetIds:[],hiddenLegendIds:[],focusedTargetIds:[],defocusedTargetIds:[],radius:0,innerRadius:0,outerRadius:void 0,innerRadiusRatio:0,gaugeArcWidth:0,radiusExpanded:0,xgridAttr:{x1:null,x2:null,y1:null,y2:null},pendingRaf:null,rafBatchQueue:[]}}return e}()},Ir=function(){function e(){var e=this;Object.keys(Fr).forEach(function(t){e[t]=new Fr[t]})}return e.prototype.getStore=function(e){return this[e]},e}(),Lr={bubbleBaseLength:`$baseLength`,colorPattern:`__colorPattern__`,dataMinMax:`$dataMinMax`,dataTotalSum:`$dataTotalSum`,dataTotalPerIndex:`$totalPerIndex`,filteredTargets:`$filteredTargets`,visibilityChecksum:`visibilityChecksum`,legendItemTextBox:`legendItemTextBox`,legendItemMap:`$legendItemMap`,radarPoints:`$radarPoints`,radarTextWidth:`$radarTextWidth`,setOverOut:`setOverOut`,callOverOutForTouch:`callOverOutForTouch`,textRect:`textRect`,shapeOffset:`$shapeOffset`},Rr=function(){function e(){this.cache={}}return e.prototype.add=function(e,t,n){return n===void 0&&(n=!1),this.cache[e]=n?this.cloneTarget(t):t,this.cache[e]},e.prototype.remove=function(e){var t=this;(G(e)?[e]:e).forEach(function(e){return delete t.cache[e]})},e.prototype.get=function(e,t){if(t===void 0&&(t=!1),t&&Array.isArray(e)){for(var n=[],r=0,i=void 0;i=e[r];r++)i in this.cache&&n.push(this.cloneTarget(this.cache[i]));return n}else{var a=this.cache[e];return U(a)?a:null}},e.prototype.has=function(e){return e in this.cache&&this.cache[e]!==null},e.prototype.getKeys=function(){return Object.keys(this.cache)},e.prototype.reset=function(e){var t=this;for(var n in t.cache)(e||/^\$/.test(n))&&(t.cache[n]=null)},e.prototype.cloneTarget=function(e){return{id:e.id,id_org:e.id_org,values:e.values.map(function(e){return{x:e.x,value:e.value,id:e.id}})}},e}(),$={AREA:`area`,AREA_LINE_RANGE:`area-line-range`,AREA_SPLINE:`area-spline`,AREA_SPLINE_RANGE:`area-spline-range`,AREA_STEP:`area-step`,AREA_STEP_RANGE:`area-step-range`,BAR:`bar`,BUBBLE:`bubble`,CANDLESTICK:`candlestick`,DONUT:`donut`,FUNNEL:`funnel`,GAUGE:`gauge`,LINE:`line`,PIE:`pie`,POLAR:`polar`,RADAR:`radar`,SCATTER:`scatter`,SPLINE:`spline`,STEP:`step`,TREEMAP:`treemap`},zr={AREA:`initArea`,AREA_LINE_RANGE:`initArea`,AREA_SPLINE:`initArea`,AREA_SPLINE_RANGE:`initArea`,AREA_STEP:`initArea`,AREA_STEP_RANGE:`initArea`,BAR:`initBar`,BUBBLE:`initCircle`,CANDLESTICK:`initCandlestick`,DONUT:`initArc`,FUNNEL:`initFunnel`,GAUGE:`initArc`,LINE:`initLine`,PIE:`initArc`,POLAR:`initPolar`,RADAR:`initCircle`,SCATTER:`initCircle`,SPLINE:`initLine`,STEP:`initLine`,TREEMAP:`initTreemap`},Br={Area:[$.AREA,$.AREA_SPLINE,$.AREA_SPLINE_RANGE,$.AREA_LINE_RANGE,$.AREA_STEP,$.AREA_STEP_RANGE],AreaRange:[$.AREA_SPLINE_RANGE,$.AREA_LINE_RANGE,$.AREA_STEP_RANGE],Arc:[$.PIE,$.DONUT,$.GAUGE,$.POLAR,$.RADAR],Line:[$.LINE,$.SPLINE,$.AREA,$.AREA_SPLINE,$.AREA_SPLINE_RANGE,$.AREA_LINE_RANGE,$.STEP,$.AREA_STEP,$.AREA_STEP_RANGE],Step:[$.STEP,$.AREA_STEP,$.AREA_STEP_RANGE],Spline:[$.SPLINE,$.AREA_SPLINE,$.AREA_SPLINE_RANGE]};function Vr(e){var t=e,n=t.config,r=``;if(qn(n.data_type||n.data_types)&&!t[zr.LINE])r=`line`;else for(var i in zr){var a=$[i];if(t.hasType(a)&&!t[zr[i]]){r=a;break}}r&&Hr(`Please, make sure if %c${ur(r)}`,`module has been imported and specified correctly.`,`https://github.com/naver/billboard.js/wiki/CHANGELOG-v2#modularization-by-its-functionality`)}function Hr(e,t,n){var r=`[billboard.js]`;if(H.console?.error){var i=[`background:red;color:white;display:block;font-size:15px`,t];console.error.apply(console,N([`❌ ${r} ${e}`,`background:red;color:white;display:block;font-size:15px`],i,!1)),console.info(`%cℹ️`,`font-size:15px`,n)}throw Error(`${r} ${e.replace(/\%c([a-z-]+)/i,`'$1' `)} ${t}`)}var Ur=H.setTimeout,Wr=H.clearTimeout;function Gr(e){var t=[],n,r=function(){r.clear(),e===!1?_n(function(){t.forEach(function(e){return e()})},{timeout:200}):n=Ur(function(){t.forEach(function(e){return e()})},K(e)?e:200)};return r.clear=function(){n&&=(Wr(n),null)},r.add=function(e){return t.push(e)},r.remove=function(e){return t.splice(t.indexOf(e),1)},r}function Kr(){var e=[],t=function(t,n){function r(){for(var t=0,n=0,r=void 0;r=e[n];n++){if(r===!0||r.empty?.call(r)){t++;continue}if(Dr()===!1){t=e.length;break}try{r.transition()}catch{t++}}return t===e.length}kr(function(){n?.()},r)};return t.add=function(t){X(t)?e=e.concat(t):e.push(t)},t}var qr={};function Jr(e,t){var n=e.toString(),r=n.replace(/(function|[\s\W\n])/g,``).substring(0,15);return r in qr||(qr[r]=new H.Blob([`${t?.map(String).join(`;`)??``}
12
+
13
+ self.onmessage=function({data}) {
14
+ const result = (${n}).apply(null, data);
15
+ self.postMessage(result);
16
+ };`],{type:`text/javascript`})),H.URL.createObjectURL(qr[r])}function Yr(e){var t=new H.Worker(e);return t.onerror=function(e){console.error?console.error(e):console.log(e)},t}function Xr(e,t,n,r){e===void 0&&(e=!0);var i=function(){var e=[...arguments];n(t.apply(void 0,e))};if(H.Worker&&e){var a=Jr(t,r),o=Yr(a);i=function(){var e=[...arguments];o.postMessage(e),o.onmessage=function(e){return H.URL.revokeObjectURL(a),n(e.data)}}}return i}function Zr(e){var t=[];return e.forEach(function(e,n){var r=e[0];e.forEach(function(e,i){if(i>0){if(t[i-1]===void 0&&(t[i-1]={}),e===void 0)throw Error(`Source data is missing a component at (${n}, ${i})!`);t[i-1][r]=e}})}),t}function Qr(e){var t=e[0],n=[];return e.forEach(function(e,r){if(r>0){var i={};e.forEach(function(e,n){if(e===void 0)throw Error(`Source data is missing a component at (${r}, ${n})!`);i[t[n]]=e}),n.push(i)}}),n}function $r(e,t){var n=[],r,i;if(Array.isArray(e)){var a=function(e,t){if(e[t]!==void 0)return e[t];var n=t.replace(/\[(\w+)\]/g,`.$1`).replace(/^\./,``).split(`.`),r=e;return n.some(function(e){return!(r=r&&e in r?r[e]:void 0)}),r};r=t.x?t.value.concat(t.x):t.value,n.push(r),e.forEach(function(e){var t=r.map(function(t){var n=a(e,t);return n===void 0&&(n=null),n});n.push(t)}),i=Qr(n)}else Object.keys(e).forEach(function(t){var r,i=e[t].concat();(r=i.unshift)==null||r.call(i,t),n.push(i)}),i=Zr(n);return i}function ei(e,t,n,r,i){t===void 0&&(t=`csv`);var a=new XMLHttpRequest,o={csv:ni,tsv:ri,json:$r};a.open(`GET`,e),n&&Object.keys(n).forEach(function(e){a.setRequestHeader(e,n[e])}),a.onreadystatechange=function(){if(a.readyState===4)if(a.status===200){var n=a.responseText;n&&i.call(this,o[t](t===`json`?JSON.parse(n):n,r))}else throw Error(`${e}: Something went wrong loading!`)},a.send()}function ti(e,t){var n=e.rows(t),r;return n.length===1?(r=[{}],n[0].forEach(function(e){r[0][e]=null})):r=e.parse(t),r}function ni(e){return ti({rows:yt,parse:vt},e)}function ri(e){return ti({rows:St,parse:xt},e)}function ii(e,t){var n=e||t?.data_keys;return n?.x&&(t.data_x=n.x),n}function ai(e,t,n){var r=this,i=this,a=i.config,o;e.forEach(function(e){var s=i.getXKey(e);if(n.customX||n.timeSeries?n.xs.indexOf(s)>=0?o=(n.appendXs&&i.data.xs[e]||[]).concat(t.map(function(t,n){var r=U(t[s]);return r?i.generateTargetX(r,e,n):!1}).filter(function(e){return e!==!1})):a.data_x?o=r.getOtherTargetXs():Y(a.data_xs)&&(o=i.getXValuesOfXKey(s,i.data.targets)):o=t.map(function(e,t){return t}),o)i.data.xs[e]=o;else throw Error(`x is not defined for id = "${e}".`)})}var oi={convertData:function(e,t){var n=this.config,r=function(e){return e?.length&&!qn(e[0])?n.boost_useWorker:!1},i=e;if(e.bindto&&(i={},[`url`,`mimeType`,`headers`,`keys`,`json`,`keys`,`rows`,`columns`].forEach(function(t){var n=`data_${t}`;n in e&&(i[t]=e[n])})),i.url&&t)ei(i.url,i.mimeType,i.headers,ii(i.keys,n),t);else if(i.json)Xr(r(i.json),$r,t,[Zr,Qr])(i.json,ii(i.keys,n));else if(i.rows)Xr(r(i.rows),Qr,t)(i.rows);else if(i.columns)Xr(r(i.columns),Zr,t)(i.columns);else if(e.bindto)throw Error(`url or json or rows or columns is required.`)},convertDataToTargets:function(e,t){var n=this,r=n.axis,i=n.config,a=n.state,o=i.data_type,s=Object.keys(e[0]||{}),c=s.length?s.reduce(function(e,t){return n.isX.call(n,t)?e.xs.push(t):n.isNotX.call(n,t)&&e.ids.push(t),e},{ids:[],xs:[]}):{ids:[],xs:[]},l=c.ids,u={appendXs:t,xs:c.xs,idConverter:i.data_idConverter.bind(n.api),categorized:r?.isCategorized(),timeSeries:r?.isTimeSeries(),customX:r?.isCustomX()};ai.bind(n)(l,e,u);var d=l.map(function(t,r){var o=i.data_idConverter.bind(n.api)(t),s=n.getXKey(t),c=u.customX&&u.categorized,l=c&&(function(){var t=Mr(i.axis_x_categories);return e.every(function(e){return t.has(e.x)})})(),d=e.__append__,f=s===null&&d?n.api.data.values(t).length:0;return{id:o,id_org:t,values:e.map(function(e,u){var p=e[s],m=e[t],h;return m=m!==null&&!isNaN(m)&&!Z(m)?+m:X(m)||Z(m)?m:null,(c||a.hasRadar)&&r===0&&!q(p)?(!l&&r===0&&u===0&&!d&&(i.axis_x_categories=[]),h=i.axis_x_categories.indexOf(p),h===-1&&(h=i.axis_x_categories.length,i.axis_x_categories.push(p))):h=n.generateTargetX(p,t,f+u),(q(m)||n.data.xs[t].length<=u)&&(h=void 0),{x:h,value:m,id:o,index:-1}}).filter(function(e){return J(e.x)})}});if(d.forEach(function(e){var t;i.data_xSort&&(e.values=e.values.sort(function(e,t){return(e.x||e.x===0?e.x:1/0)-(t.x||t.x===0?t.x:1/0)})),e.values.forEach(function(e,t){return e.index=t}),(t=n.data.xs[e.id])==null||t.sort(function(e,t){return e-t})}),a.hasNegativeValue=n.hasNegativeValueInTargets(d),a.hasPositiveValue=n.hasPositiveValueInTargets(d),o&&n.isValidChartType(o)){var f=n.mapToIds(d).filter(function(e){return!(e in i.data_types)||!n.isValidChartType(i.data_types[e])});n.setTargetType(f,o)}return d.forEach(function(e){return n.cache.add(e.id_org,e,!0)}),d}},si={isX:function(e){var t=this.config,n=t.data_x&&e===t.data_x,r=Y(t.data_xs)&&Yn(t.data_xs,e);return n||r},isNotX:function(e){return!this.isX(e)},isStackNormalized:function(){var e=this.config;return!!((e.data_stack_normalize===!0||Gn(e.data_stack_normalize))&&e.data_groups.length)},isStackNormalizedPerGroup:function(){var e=this.config;return!!(Gn(e.data_stack_normalize)&&e.data_stack_normalize?.perGroup&&e.data_groups.length)},isGrouped:function(e){var t=this.config.data_groups;return e?t.some(function(t){return t.indexOf(e)>=0&&t.length>1}):t.length>0},hasAxisGroupedData:function(e){var t=this,n=t.axis;return t.data.targets.filter(function(t){return n.getId(t.id)===e}).map(function(e){return e.id}).some(function(e){return t.isGrouped(e)})},getXKey:function(e){var t=this.config;return t.data_x?t.data_x:Y(t.data_xs)?t.data_xs[e]:null},getXValuesOfXKey:function(e,t){var n=this,r=t&&Y(t)?n.mapToIds(t):[],i;return r.forEach(function(t){n.getXKey(t)===e&&(i=n.data.xs[t])}),i},getIndexByX:function(e,t){var n=this;return t?t.indexOf(G(e)?e:+e):(n.filterByX(n.data.targets,e)[0]||{index:null}).index},getXValue:function(e,t){var n=this;return e in n.data.xs&&n.data.xs[e]&&U(n.data.xs[e][t])?n.data.xs[e][t]:t},getOtherTargetXs:function(){var e=this,t=Object.keys(e.data.xs);return t.length?e.data.xs[t[0]]:null},getOtherTargetX:function(e){var t=this.getOtherTargetXs();return t&&e<t.length?t[e]:null},addXs:function(e){var t=this.config;Object.keys(e).forEach(function(n){t.data_xs[n]=e[n]})},isMultipleX:function(){return!this.config.axis_x_forceAsSingle&&(Y(this.config.data_xs)||this.hasType(`bubble`)||this.hasType(`scatter`))},addName:function(e){var t=this.config,n;return e&&(n=t.data_names[e.id],e.name=n===void 0?e.id:n),e},getAllValuesOnIndex:function(e,t){t===void 0&&(t=!1);var n=this,r=n.filterTargetsToShow(n.data.targets).map(function(t){return n.addName(n.getValueOnIndex(t.values,e))});return t&&(r=r.filter(function(e){return e&&`value`in e&&U(e.value)})),r},getValueOnIndex:function(e,t){var n=e.filter(function(e){return e.index===t});return n.length?n[0]:null},updateTargetX:function(e,t){var n=this;e.forEach(function(e){e.values.forEach(function(r,i){r.x=n.generateTargetX(t[i],e.id,i)}),n.data.xs[e.id]=t})},updateTargetXs:function(e,t){var n=this;e.forEach(function(e){t[e.id]&&n.updateTargetX([e],t[e.id])})},generateTargetX:function(e,t,n){var r=this,i=r.axis,a=i?.isCategorized()?n:e||n;return i?.isTimeSeries()?a=wr.bind(r)(e||r.getXValue(t,n)):i?.isCustomX()&&!i?.isCategorized()&&(a=U(e)?+e:r.getXValue(t,n)),a},updateXs:function(e){e.length&&(this.axis.xs=e.map(function(e){return e.x}))},getPrevX:function(e){var t=this.axis.xs[e-1];return J(t)?t:null},getNextX:function(e){var t=this.axis.xs[e+1];return J(t)?t:null},getBaseValue:function(e){var t=this,n=t.state.hasAxis,r=e.value;return r&&n&&(t.isAreaRangeType(e)?r=t.getRangedData(e,`mid`):t.isBubbleZType(e)&&(r=t.getBubbleZData(r,`y`))),r},getMinMaxValue:function(e){var t=this.getBaseValue.bind(this),n,r;return(e||this.data.targets.map(function(e){return e.values})).forEach(function(e,i){var a=e.map(t).filter(K);n=Math.min.apply(Math,N([i?n:1/0],a,!1)),r=Math.max.apply(Math,N([i?r:-1/0],a,!1))}),{min:n,max:r}},getMinMaxData:function(){var e=this,t=Lr.dataMinMax,n=e.cache.get(t);if(!n){var r=e.data.targets.map(function(e){return e.values}),i=e.getMinMaxValue(r),a=[],o=[],s=i.min,c=i.max;r.forEach(function(t){var n=e.getFilteredDataByValue(t,s),r=e.getFilteredDataByValue(t,c);n.length&&(a=a.concat(n)),r.length&&(o=o.concat(r))}),e.cache.add(t,n={min:a,max:o})}return n},getTotalPerIndex:function(e){var t=this,n=t.config,r=e?`${Lr.dataTotalPerIndex}-${e}`:Lr.dataTotalPerIndex,i=t.cache.get(r);if((t.config.data_groups.length||t.isStackNormalized())&&!i){i=[];var a=t.data.targets;if(t.isStackNormalizedPerGroup()&&e){var o=n.data_groups.find(function(t){return t.indexOf(e)>=0});if(o)a=a.filter(function(e){return o.indexOf(e.id)>=0});else return null}a.forEach(function(e){e.values.forEach(function(e,t){i[t]||(i[t]=0),i[t]+=~~e.value})}),t.cache.add(r,i)}return i},getTotalDataSum:function(e){var t=this,n=Lr.dataTotalSum,r=t.cache.get(n);return K(r)||(r=t.data.targets.reduce(function(e,t){return e+t.values.reduce(function(e,t){return e+(t.value??0)},0)},0),t.cache.add(n,r)),e&&(r-=t.getHiddenTotalDataSum()),r},getHiddenTotalDataSum:function(){var e=this,t=e.api,n=e.state.hiddenTargetIds,r=0;return n.length&&(r=t.data.values.bind(t)(n).reduce(function(e,t){return e+t})),r},getFilteredDataByValue:function(e,t){var n=this;return e.filter(function(e){return n.getBaseValue(e)===t})},getMaxDataCount:function(){return Math.max.apply(Math,N(N([],this.data.targets.map(function(e){return e.values.length}),!1),[0],!1))},getMaxDataCountTarget:function(){var e=this.filterTargetsToShow()||[],t=e.length,n=this.config.axis_x_inverted;return t>1?(e=e.map(function(e){return e.values}).reduce(function(e,t){return e.concat(t)}).map(function(e){return e.x}),e=br(_r(e)).map(function(e,t,r){return{x:e,index:n?r.length-t-1:t}})):t&&(e=e[0].values.concat()),e},mapToIds:function(e){return e.map(function(e){return e.id})},mapToTargetIds:function(e){var t=this;return e?X(e)?e.concat():[e]:t.mapToIds(t.data.targets)},hasTarget:function(e,t){for(var n=this.mapToIds(e),r=0,i=void 0;i=n[r];r++)if(i===t)return!0;return!1},isTargetToShow:function(e){return this.state.hiddenTargetIds.indexOf(e)<0},isLegendToShow:function(e){return this.state.hiddenLegendIds.indexOf(e)<0},filterTargetsToShow:function(e){var t=this;if(!e){var n=t.cache,r=t.data,i=t.state,a=Lr.filteredTargets,o=i.hiddenTargetIds.join(`,`);if(o!==n.get(Lr.visibilityChecksum)&&(n.remove(a),n.add(Lr.visibilityChecksum,o)),n.has(a))return n.get(a);var s=r.targets.filter(function(e){return t.isTargetToShow(e.id)});return n.add(a,s),s}return e.filter(function(e){return t.isTargetToShow(e.id)})},mapTargetsToUniqueXs:function(e){var t=this.axis,n=[];return e?.length&&(n=_r(vr(e.map(function(e){return e.values.map(function(e){return+e.x})}))),n=t?.isTimeSeries()?n.map(function(e){return new Date(+e)}):n.map(Number)),br(n)},addTargetIds:function(e,t){var n=this.state;(X(t)?t:[t]).forEach(function(t){n[e].indexOf(t)<0&&n[e].push(t)})},removeTargetIds:function(e,t){var n=this.state;(X(t)?t:[t]).forEach(function(t){var r=n[e].indexOf(t);r>=0&&n[e].splice(r,1)})},addHiddenTargetIds:function(e){this.addTargetIds(`hiddenTargetIds`,e)},removeHiddenTargetIds:function(e){this.removeTargetIds(`hiddenTargetIds`,e)},addHiddenLegendIds:function(e){this.addTargetIds(`hiddenLegendIds`,e)},removeHiddenLegendIds:function(e){this.removeTargetIds(`hiddenLegendIds`,e)},getValuesAsIdKeyed:function(e){var t=this,n=t.state.hasAxis,r={},i=t.isMultipleX(),a=i?t.mapTargetsToUniqueXs(e).map(function(e){return G(e)?e:+e}):null,o=a?new Map(a.map(function(e,t){return[e,t]})):null;return e.forEach(function(e){var a=[];e.values.filter(function(e){var t=e.value;return U(t)||t===null}).forEach(function(e){var r=e.value;if(r!==null&&t.isCandlestickType(e)&&(r=X(r)?r.slice(0,4):[r.open,r.high,r.low,r.close]),X(r))a.push.apply(a,r);else if(Z(r)&&`high`in r)a.push.apply(a,Object.values(r));else if(t.isBubbleZType(e))a.push(n&&t.getBubbleZData(r,`y`));else if(i&&o){var s=G(e.x)?e.x:+e.x,c=o.get(s);c!==void 0&&(a[c]=r)}else a.push(r)}),r[e.id]=a}),r},checkValueInTargets:function(e,t){return Object.keys(e).some(function(n){return e[n].values.some(function(e){return t(e.value)})})},hasMultiTargets:function(){return this.filterTargetsToShow().length>1},hasNegativeValueInTargets:function(e){return this.checkValueInTargets(e,function(e){return e<0})},hasPositiveValueInTargets:function(e){return this.checkValueInTargets(e,function(e){return e>0})},orderTargets:function(e){var t=this,n=N([],e,!0),r=t.getSortCompareFn();return r&&n.sort(r),n},getSortCompareFn:function(e){e===void 0&&(e=!1);var t=this,n=t.config.data_order,r=/asc/i.test(n),i=/desc/i.test(n),a;if(r||i){var o=function(e,t){return e+Math.abs(t.value)},s=function(e){return K(e)?e:`values`in e?e.values.reduce(o,0):e.value};a=function(t,n){var i=s(t),a=s(n);return e?r?i-a:a-i:r?a-i:i-a}}else W(n)&&(a=n.bind(t.api));return a||null},filterByX:function(e,t){return vr(e.map(function(e){return e.values})).filter(function(e){return e.x-t===0})},filterNullish:function(e){var t=function(e){return U(e.value)};return e&&e.filter(function(e){return`value`in e?t(e):e.values.some(t)})},filterRemoveNull:function(e){var t=this;return e.filter(function(e){return U(t.getBaseValue(e))})},filterByXDomain:function(e,t){return e.map(function(e){return{id:e.id,id_org:e.id_org,values:e.values.filter(function(e){return t[0]<=e.x&&e.x<=t[1]})}})},hasDataLabel:function(){var e=this.config.data_labels;return Vn(e)&&e||Gn(e)&&Y(e)},hasNullDataValue:function(e){return e.some(function(e){return e.value===null})},getDataIndexFromEvent:function(e){var t=this,n=t.$el,r=t.config,i=t.state,a=i.hasRadar,o=i.inputType,s=i.eventReceiver,c=s.coords,l=s.rect,u;if(a){var d=e.target;/tspan/i.test(d.tagName)&&(d=d.parentNode);var f=A(d).datum();u=f&&Object.keys(f).length===1?f.index:void 0}else{var p=r.axis_rotated,m=mr(n.chart.node()),h=o===`touch`&&e.changedTouches?e.changedTouches[0]:e,g=p?h.clientY+m.y:h.clientX+m.x;if(Tr(n.svg)){var _=[g,0];p&&_.reverse(),g=hr.apply(void 0,N([n.eventRect.node()],_,!1))[p?`y`:`x`]}else g-=p?l.top:l.left;u=ar(c,g,0,c.length-1,p)}return u},getDataLabelLength:function(e,t,n){var r=this,i=1.3;return r.getTextRect([e,t].map(function(e){return r.dataLabelFormat()(e)}))?.map(function(e){return e[n]*i})||[0,0]},isNoneArc:function(e){return this.hasTarget(this.data.targets,e.id)},isArc:function(e){return`data`in e&&this.hasTarget(this.data.targets,e.data.id)},findSameXOfValues:function(e,t){var n=e[t].x,r=[],i;for(i=t-1;i>=0&&n===e[i].x;i--)r.push(e[i]);for(i=t;i<e.length&&n===e[i].x;i++)r.push(e[i]);return r},findClosestFromTargets:function(e,t){var n=this,r=e.map(function(e){return n.findClosest(e.values,t)});return n.findClosest(r,t)},findClosest:function(e,t){var n=this,r=n.$el.main,i=e.filter(function(e){return e&&U(e.value)}),a,o;return i.filter(function(e){return n.isBarType(e.id)||n.isCandlestickType(e.id)}).forEach(function(e){var t=n.isBarType(e.id)?`.${Ut.chartBar}.${P.target}${n.getTargetSelectorSuffix(e.id)} .${Ut.bar}-${e.index}`:`.${Wt.chartCandlestick}.${P.target}${n.getTargetSelectorSuffix(e.id)} .${Wt.candlestick}-${e.index} path`;!o&&n.isWithinBar(r.select(t).node())&&(o=e)}),i.filter(function(e){return!n.isBarType(e.id)&&!n.isCandlestickType(e.id)}).forEach(function(e){var r=n.dist(e,t);a=n.getPointSensitivity(e),r<a&&(a=r,o=e)}),o},dist:function(e,t){var n=this,r=n.config.axis_rotated,i=n.scale,a=+r,o=+!r,s=n.circleY(e,e.index),c=(i.zoom||i.x)(e.x);return Math.sqrt((c-t[a])**2+(s-t[o])**2)},convertValuesToStep:function(e){var t=this,n=t.axis,r=t.config.line_step_type,i=n?n.isCategorized():!1,a=X(e)?e.concat():[e];if(!(i||/step\-(after|before)/.test(r)))return e;if(a.length){var o=a[0],s=a[a.length-1],c=o.id,l=o.x;a.unshift({x:--l,value:o.value,id:c}),i&&r===`step-after`&&a.unshift({x:--l,value:o.value,id:c}),l=s.x,a.push({x:++l,value:s.value,id:c}),i&&r===`step-before`&&a.push({x:++l,value:s.value,id:c})}return a},convertValuesToRange:function(e){var t=X(e)?e.concat():[e],n=[];return t.forEach(function(e){var t=e.x,r=e.id;n.push({x:t,id:r,value:e.value[0]}),n.push({x:t,id:r,value:e.value[2]})}),n},updateDataAttributes:function(e,t){var n=this,r=n.config[`data_${e}`];return q(t)?r:(Object.keys(t).forEach(function(e){r[e]=t[e]}),n.redraw({withLegend:!0}),r)},getRangedData:function(e,t,n){t===void 0&&(t=``),n===void 0&&(n=`areaRange`);var r=e?.value;if(X(r)){if(n===`bar`)return r.reduce(function(e,t){return t-e});var i={areaRange:[`high`,`mid`,`low`],candlestick:[`open`,`high`,`low`,`close`,`volume`]}[n].indexOf(t);return i>=0&&r?r[i]:void 0}else if(r&&t)return r[t];return r},setRatioForGroupedData:function(e){var t=this;if(t.config.data_groups.length&&e.some(function(e){return t.isGrouped(e.id)})){var n=function(e){return t.getRatio(`index`,e,!0)};e.forEach(function(e){`values`in e?e.values.forEach(n):n(e)})}},getRatio:function(e,t,n){n===void 0&&(n=!1);var r=this,i=r.config,a=r.state,o=r.api,s=0;if(t&&o.data.shown().length)if(s=t.ratio||t.value,e===`arc`)if(r.pie.padAngle()())s=t.value/r.getTotalDataSum(!0);else{var c=i.gauge_fullCircle?r.getArcLength():r.getStartingAngle()*-2,l=r.hasType(`gauge`)?c:Math.PI*2;s=(t.endAngle-t.startAngle)/l}else if(e===`index`){var u=o.data.values.bind(o),d=a.hiddenTargetIds,f=this.getTotalPerIndex(r.isStackNormalizedPerGroup()?t.id:void 0);if(f===null)return s;if(d.length){var p=d;if(r.isStackNormalizedPerGroup()&&t.id){var m=i.data_groups.find(function(e){return e.indexOf(t.id)>=0});m&&(p=p.filter(function(e){return m.indexOf(e)>=0}))}if(p.length){var h=u(p,!1);h.length&&(h=h.reduce(function(e,t){return e.map(function(e,n){return~~e+t[n]})}),f=f.map(function(e,t){return e-h[t]}))}}var g=f[t.index];t.ratio=K(t.value)&&f&&g?t.value/g:0,s=t.ratio}else if(e===`radar`)s=parseFloat(String(Math.max(t.value,0)))/a.current.dataMax*i.radar_size_ratio;else if(e===`bar`){var _=r.getYScaleById.bind(r)(t.id).domain().reduce(function(e,t){return t-e});s=_===0?0:Math.abs(r.getRangedData(t,null,e)/_)}else e===`treemap`&&(s/=r.getTotalDataSum(!0));return n&&s?s*100:s},updateDataIndexByX:function(e){var t=this,n=e.reduce(function(e,t,n){return e[Number(t.x)]=n,e},{});t.data.targets.forEach(function(e){e.values.forEach(function(e,t){var r=n[Number(e.x)];r===void 0&&(r=t),e.index=r})})},isBubbleZType:function(e){return this.isBubbleType(e)&&(Z(e.value)&&(`z`in e.value||`y`in e.value)||X(e.value)&&e.value.length>=2)},isBarRangeType:function(e){var t=this,n=e.value;return t.isBarType(e)&&X(n)&&n.length>=2&&n.every(K)},getDataById:function(e){var t=this.cache.get(e)||this.api.data(e);return t?.[0]??t}};function ci(e,t){t===void 0&&(t=!1);var n=this,r=n.api;t&&n.api.flush(!0),e?.call(r)}var li={load:function(e,t){var n=this,r=n.axis,i=n.data,a=n.org,o=n.scale,s=t.append,c={domain:null,currentDomain:null,x:null},l=e;l&&(t.filter&&(l=l.filter(t.filter)),(t.type||t.types)&&l.forEach(function(e){var r=t.types?.[e.id]||t.type;n.setTargetType(e.id,r)}),i.targets.forEach(function(e){for(var t=0;t<l.length;t++)if(e.id===l[t].id){e.values=s?e.values.concat(l[t].values):l[t].values,l.splice(t,1);break}}),i.targets=i.targets.concat(l)),n.updateTargets(i.targets),o.zoom&&(c.x=r.isCategorized()?o.x.orgScale():(a.xScale||o.x).copy(),c.domain=n.getXDomain(i.targets),c.x.domain(c.domain),c.currentDomain=n.zoom.getDomain(),n.withinRange(c.currentDomain,void 0,c.domain)||(o.x.domain(c.domain),o.zoom=null,n.$el.eventRect.property(`__zoom`,null))),n.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),o.zoom?(a.xDomain=c.domain,a.xScale=c.x,r.isCategorized()&&(c.currentDomain=n.getZoomDomainValue(c.currentDomain),a.xDomain=n.getZoomDomainValue(a.xDomain),a.xScale=c.x.domain(a.xDomain)),n.updateCurrentZoomTransform(c.x,c.currentDomain)):a.xScale&&a.xScale.domain(a.xDomain),n.updateTypesElements(),ci.call(n,t.done,t.resizeAfter)},loadFromArgs:function(e){var t=this;t.config&&(t.cache.reset(),t.convertData(e,function(n){var r=e.data||n;e.append&&(r.__append__=!0),r&&t.load(t.convertDataToTargets.call(t,r),e)}))},unload:function(e,t){var n=this,r=n.state,i=n.$el,a=n.$T,o=!!n.hasLegendDefsPoint?.call(n),s=t,c=e;if(n.cache.reset(),s||=function(){},c=c.filter(function(e){return n.hasTarget(n.data.targets,e)}),!c||c.length===0){s();return}c.forEach(function(e){var t,a=n.getTargetSelectorSuffix(e);r.withoutFadeIn[e]=!1,i.legend&&i.legend.selectAll(`.${L.legendItem}${a}`).remove(),n.data.targets=n.data.targets.filter(function(t){return t.id!==e}),o&&((t=i.defs)==null||t.select(`#${n.getDefsPointId(a)}`).remove())}),r.hasFunnel&&n.updateFunnel(n.data.targets),r.hasTreemap&&n.updateTargetsForTreemap(n.data.targets),n.updateTypesElements(),a(i.svg.selectAll(c.map(function(e){return n.selectorTarget(e)}))).style(`opacity`,`0`).remove().call(Xn,s)}},ui={setExpand:function(e,t,n){var r=this,i=r.config;r.$el.circle&&i.point_focus_expand_enabled&&r.expandCircles(e,t,n),r.expandBarTypeShapes(!0,e,t,n)},expandBarTypeShapes:function(e,t,n,r){e===void 0&&(e=!0);var i=this;[`bar`,`candlestick`].filter(function(e){return i.$el[e]}).forEach(function(a){r&&i.$el[a].classed(P.EXPANDED,!1),i.getShapeByIndex(a,t,n).classed(P.EXPANDED,e)})},setOverOut:function(e,t){var n=this,r=n.config,i=n.state,a=i.hasFunnel,o=i.hasRadar,s=i.hasTreemap,c=n.$el.main,l=Z(t);if(l||t!==-1){var u=r[e?`data_onover`:`data_onout`].bind(n.api);if(r.color_onover&&n.setOverColor(e,t,l),l){var d=n.getTargetSelectorSuffix(t.id),f=a||s?`${P.target+d} .${$t.shape}`:F.arc+d;u(t,c.select(`.${f}`).node())}else if(r.tooltip_grouped)e&&(o&&n.isPointFocusOnly()?n.showCircleFocus(n.getAllValuesOnIndex(t,!0)):n.setExpand(t,null,!0)),!n.isMultipleX()&&c.selectAll(`.${$t.shape}-${t}`).each(function(e){u(e,this)});else{var p=n.cache.get(Lr.setOverOut)||[],m=c.selectAll(`.${$t.shape}-${t}`).filter(function(e){return n.isWithinShape(this,e)}),h=m.filter(function(){var e=this;return p.every(function(t){return t!==e})});if(!e||m.empty()||p.length===h.size()&&h.nodes().every(function(e,t){return e!==p[t]}))for(;p.length;){var g=p.pop();r.data_onout.bind(n.api)(A(g).datum(),g)}h.each(function(){e&&(u(A(this).datum(),this),p.push(this))}),n.cache.add(Lr.setOverOut,p)}}},callOverOutForTouch:function(e){var t=this,n=t.cache.get(Lr.callOverOutForTouch);(Z(e)&&n?e.id!==n.id:e!==n)&&((n||K(n))&&t.setOverOut(!1,n),(e||K(e))&&t.setOverOut(!0,e),t.cache.add(Lr.callOverOutForTouch,e))},getDraggableSelection:function(){var e=this,t=e.config,n=e.state;return t.interaction_enabled&&t.data_selection_draggable&&e.drag?rt().on(`drag`,function(t){n.event=t,e.drag(er(t,this))}).on(`start`,function(t){n.event=t,e.dragstart(er(t,this))}).on(`end`,function(t){n.event=t,e.dragend()}):function(){}},dispatchEvent:function(e,t,n){var r,i=this,a=i.config,o=i.state,s=o.eventReceiver,c=o.hasAxis,l=o.hasFunnel,u=o.hasRadar,d=o.hasTreemap,f=i.$el,p=f.eventRect,m=f.funnel,h=f.radar,g=f.svg,_=f.treemap,v=((r=(l||d)&&s.rect||u&&h.axes.select(`.${Ht.axis}-${t} text`)||p||i.getArcElementByIdOrIndex?.call(i,t))?.node)?.call(r);if(v){var y=i.isMultipleX(),b=a.axis_rotated,x=nr(v),S=x.width,C=x.left,w=x.top;if(c&&!u&&!y){var T=s.coords[t];T?(S=T.w,C+=T.x,w+=T.y):(S=0,C=0,w=0)}var E=C+(n?n[0]:0)+(y||b?0:S/2),D=w+(n?n[1]:0)+(b?4:0);if(Tr(g)){var O=hr(i.$el.eventRect.node(),E,D,!1);E=O.x,D=O.y}var k={screenX:E,screenY:D,clientX:E,clientY:D,bubbles:u};(l||d)&&(v=(m??_).node()),Sr[/^(mouse|click)/.test(e)?`mouse`:`touch`](v,e,k)}},setDragStatus:function(e){this.state.dragging=e},unbindZoomEvent:function(){var e=this.$el,t=e.eventRect,n=e.zoomResetBtn;t?.on(`.zoom wheel.zoom .drag`,null),n?.on(`click`,null).style(`display`,`none`)},unbindAllEvents:function(){var e,t=this,n=t.$el,r=n.arcs,i=n.eventRect,a=n.legend,o=n.region,s=n.svg,c=n.treemap,l=t.brush,u=[`wheel`,`click`,`mouseover`,`mousemove`,`mouseout`,`touchstart`,`touchmove`,`touchend`,`touchstart.eventRect`,`touchmove.eventRect`,`touchend.eventRect`,`.brush`,`.drag`,`.zoom`,`wheel.zoom`,`dblclick.zoom`].join(` `);[s,i,o?.list,l?.getSelection(),r?.selectAll(`path`),a?.selectAll(`g`),c].forEach(function(e){return e?.on(u,null)}),(e=t.unbindZoomEvent)==null||e.call(t)}},di={categoryName:function(e){return this.config.axis_x_categories?.[e]??e}},fi={generateClass:function(e,t){return` ${e} ${e+this.getTargetSelectorSuffix(t)}`},getClass:function(e,t){var n=this,r=/s$/.test(e),i=/^(area|arc|line|funnel|treemap)s?$/.test(e),a=r?`id`:`index`;return function(o){var s=o.data||o;return((t?n.generateClass(nn[r?`shapes`:`shape`],s[a]):``)+n.generateClass(nn[e],s[i?`id`:a])).trim()}},getChartClass:function(e){var t=this;return function(n){return nn[`chart${e}`]+t.classTarget((n.data?n.data:n).id)}},generateExtraLineClass:function(){var e=this.config.line_classes||[],t=[];return function(n){var r=n.id||n.data?.id||n;return t.indexOf(r)<0&&t.push(r),e[t.indexOf(r)%e.length]}},classRegion:function(e,t){return`${this.generateClass(nn.region,t)} ${`class`in e?e.class:``}`},classTarget:function(e){var t=this.config.data_classes[e],n=``;return t&&(n=` ${nn.target}-${t}`),this.generateClass(nn.target,e)+n},classFocus:function(e){return this.classFocused(e)+this.classDefocused(e)},classFocused:function(e){return` ${this.state.focusedTargetIds.indexOf(e.id)>=0?nn.focused:``}`},classDefocused:function(e){return` ${this.state.defocusedTargetIds.indexOf(e.id)>=0?nn.defocused:``}`},getTargetSelectorSuffix:function(e){return(e||e===0?`-${e}`:``).replace(/[\x00-\x20\x7F-\xA0\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\]/g,`-`)},selectorTarget:function(e,t,n){t===void 0&&(t=``),n===void 0&&(n=``);var r=this.getTargetSelectorSuffix(e);return`${t}.${nn.target+r} ${n}, ${t}.${nn.circles+r} ${n}`},selectorTargets:function(e,t){var n=this,r=e||[];return r.length?r.map(function(e){return n.selectorTarget(e,t)}):null},selectorLegend:function(e){return`.${nn.legendItem+this.getTargetSelectorSuffix(e)}`},selectorLegends:function(e){var t=this;return e?.length?e.map(function(e){return t.selectorLegend(e)}):null}},pi=function(e,t,n){var r=A(e.cloneNode(!0));return r.attr(`id`,n).insert(`rect`,`:first-child`).attr(`width`,r.attr(`width`)).attr(`height`,r.attr(`height`)).style(`fill`,t),{id:n,node:r.node()}};function mi(e){var t=Lr.colorPattern,n=mn.body,r=n[t];if(!r){var i=`;`,a=e.classed(Gt.colorPattern,!0).style(`background-image`);e.classed(Gt.colorPattern,!1),a.indexOf(i)>-1&&(r=a.replace(/url[^#]*|["'()]|(\s|%20)/g,``).split(i).map(function(e){return e.trim().replace(/[\"'\s]/g,``)}).filter(Boolean),n[t]=r)}return r}var hi=[`#1f77b4`,`#ff7f0e`,`#2ca02c`,`#d62728`,`#9467bd`,`#8c564b`,`#e377c2`,`#7f7f7f`,`#bcbd22`,`#17becf`],gi={generateColor:function(){var e=this,t=e.$el,n=e.config,r=[],i=n.area_linearGradient||n.bar_linearGradient||n.point_radialGradient,a=Y(n.color_pattern)?n.color_pattern:m(mi(t.chart)||hi).range(),o=a;if(W(n.color_tiles)){var s=n.color_tiles.bind(e.api)(),c=a.map(function(t,n){var r=t.replace(/[#\(\)\s,]/g,``),i=`${e.state.datetimeId}-pattern-${r}-${n}`;return pi(s[n%s.length],t,i)});a=c.map(function(e){return`url(#${e.id})`}),e.patterns=c}return function(t){var s=n.data_colors,c=n.data_color,l=t.id||t.data?.id||t,u=e.isTypeOf(l,[`line`,`spline`,`step`])||!n.data_types[l],d;if(W(s[l])?d=s[l].bind(e.api)(t):s[l]?d=s[l]:(r.indexOf(l)<0&&r.push(l),d=u?o[r.indexOf(l)%o.length]:a[r.indexOf(l)%a.length],s[l]=d),d=W(c)?c.call(e.api,d,t):d,i){var f=e.$el.defs.selectAll(`[id\$='-gradient${e.getTargetSelectorSuffix(l)}'] stop`),p;f.each(function(e,t){p=t===0?this.style.stopColor:this.style.stopColor===p}),p===!0&&f.attr(`stop-color`,d)}return d}},generateLevelColor:function(){var e=this.config,t=e.color_pattern,n=e.color_threshold,r=n.unit===`value`,i=n.max||100,a=n.values&&n.values.length?n.values:[];return Y(n)?function(e){for(var n=r?e:e*100/i,o=t[t.length-1],s=0,c=a.length;s<c;s++)if(n<=a[s]){o=t[s];break}return o}:null},generateTextBGColorFilter:function(e,t){t===void 0&&(t={x:0,y:0,width:1,height:1});var n=this,r=n.$el.defs,i=n.state;if(e){var a=[];G(e)?a.push(``):Z(e)?a=Object.keys(e):W(e)&&(a=n.mapToTargetIds()),a.forEach(function(a){var o=`${i.datetimeId}-labels-bg${n.getTargetSelectorSuffix(a)}${G(e)?n.getTargetSelectorSuffix(e):``}`,s=Rn(a===``?e:e?.[a]||``);r.select(`#${o}`).empty()&&r.append(`filter`).attr(`x`,t.x).attr(`y`,t.y).attr(`width`,t.width).attr(`height`,t.height).attr(`id`,o).html(`<feFlood flood-color="${s}" />
17
+ <feComposite in="SourceGraphic" />`)})}},getGradienColortUrl:function(e){return`url(#${this.state.datetimeId}-gradient${this.getTargetSelectorSuffix(e)})`},updateLinearGradient:function(){var e=this,t=e.config,n=e.data.targets,r=e.state.datetimeId,i=e.$el.defs;n.forEach(function(n){var a=`${r}-gradient${e.getTargetSelectorSuffix(n.id)}`,o=e.hasPointType()&&t.point_radialGradient,s=e.isAreaType(n)&&`area`||e.isBarType(n)&&`bar`;if((o||s)&&i.select(`#${a}`).empty()){var c=e.color(n),l={defs:null,stops:[]};if(o){var u=o.cx,d=u===void 0?.3:u,f=o.cy,p=f===void 0?.3:f,m=o.r,h=m===void 0?.7:m,g=o.stops,_=g===void 0?[[.1,c,0],[.9,c,1]]:g;l.stops=_,l.defs=i.append(`radialGradient`).attr(`id`,`${a}`).attr(`cx`,d).attr(`cy`,p).attr(`r`,h)}else{var v=t.axis_rotated,y=t[`${s}_linearGradient`],b=y.x,x=b===void 0?v?[1,0]:[0,0]:b,S=y.y,C=S===void 0?v?[0,0]:[0,1]:S,w=y.stops,_=w===void 0?[[0,c,1],[1,c,0]]:w;l.stops=_,l.defs=i.append(`linearGradient`).attr(`id`,`${a}`).attr(`x1`,x[0]).attr(`x2`,x[1]).attr(`y1`,C[0]).attr(`y2`,C[1])}l.stops.forEach(function(t){var r=t[0],i=t[1],a=t[2],o=W(i)?i.bind(e.api)(n.id):i;l.defs&&l.defs.append(`stop`).attr(`offset`,r).attr(`stop-color`,o||c).attr(`stop-opacity`,a)})}})},setOverColor:function(e,t){var n=this,r=n.config,i=n.$el.main,a=r.color_onover,o=e?a:n.color;Z(o)?o=function(e){var t=e.id;return t in a?a[t]:n.color(t)}:G(o)?o=function(){return a}:W(a)&&(o=o.bind(n.api)),i.selectAll(Z(t)?`.${F.arc}${n.getTargetSelectorSuffix(t.id)}`:`.${$t.shape}-${t}`).style(`fill`,o)}},_i={getYDomainMinMax:function(e,t){var n=this,r=n.axis,i=n.config,a=t===`min`,o=i.data_groups,s=n.mapToIds(e),c=Mr(s),l=n.getValuesAsIdKeyed(e);if(o.length>0){var u=n[`has${a?`Negative`:`Positive`}ValueInTargets`](e),d=new Map(s.map(function(e){return[e,r.getId(e)]}));o.forEach(function(e){var t=e.filter(function(e){return c.has(e)});if(t.length){var n=t[0],r=d.get(n);u&&l[n]&&(l[n]=l[n].map(function(e){return(a?e<0:e>0)?e:0})),t.filter(function(e,t){return t>0}).forEach(function(e){if(l[e]){var t=d.get(e);l[e].forEach(function(e,i){var o=+e;t===r&&!(u&&(a?o>0:o<0))&&(l[n][i]+=o)})}})}})}return xr(t,Object.keys(l).map(function(e){return xr(t,l[e])}))},isHiddenTargetWithYDomain:function(e){var t=this;return t.state.hiddenTargetIds.some(function(n){return t.axis.getId(n)===e})},getYDomain:function(e,t,n){var r=this,i=r.axis,a=r.config,o=r.scale,s=`axis_${t}`;if(r.isStackNormalized()&&e.filter(function(e){return i.getId(e.id)===t}).map(function(e){return e.id}).some(function(e){return r.isGrouped(e)}))return[0,100];var c=o?.[t]&&o[t].type===`log`,l=e.filter(function(e){return i.getId(e.id)===t}),u=n?r.filterByXDomain(l,n):l;if(u.length===0)return r.isHiddenTargetWithYDomain(t)?o[t].domain():t===`y2`?o.y.domain():r.getYDomain(e,`y2`,n);var d=a[`${s}_min`],f=a[`${s}_max`],p=a[`${s}_center`],m=a[`${s}_inverted`],h=r.hasDataLabel()&&a.axis_rotated,g=r.hasDataLabel()&&!a.axis_rotated,_=r.getYDomainMinMax(u,`min`),v=r.getYDomainMinMax(u,`max`),y=N([$.BAR,$.BUBBLE,$.SCATTER],Br.Line,!0).some(function(e){var t=e.indexOf(`area`)>-1?`area`:e;return r.hasType(e,u,!0)&&a[`${t}_zerobased`]});_=U(d)?d:U(f)?_<=f?_:f-10:_,v=U(f)?f:U(d)?d<=v?v:d+10:v,isNaN(_)&&(_=0),isNaN(v)&&(v=_),_===v&&(_<0?v=0:_=0);var b=_>=0&&v>=0,x=_<=0&&v<=0;(U(d)&&b||U(f)&&x)&&(y=!1),y&&(b&&(_=0),x&&(v=0));var S=Math.abs(v-_),C={top:S*.1,bottom:S*.1};if(J(p)){var w=Math.max(Math.abs(_),Math.abs(v));v=p+w,_=p-w}if(h){var T=Wn(o.y.range()),E=r.getDataLabelLength(_,v,`width`).map(function(e){var t=e/T;return isFinite(t)?t:0});[`bottom`,`top`].forEach(function(e,t){C[e]+=S*(E[t]/(1-E[0]-E[1]))})}else if(g){var D=r.getDataLabelLength(_,v,`height`);[`bottom`,`top`].forEach(function(e,t){C[e]+=r.convertPixelToScale(`y`,D[t],S)})}C=r.getResettedPadding(C);var O=a[`${s}_padding`];Y(O)&&[`bottom`,`top`].forEach(function(e){C[e]=i.getPadding(O,e,C[e],S)}),y&&(b&&(C.bottom=_),x&&(C.top=-v));var k=c?[_,v].map(function(e){return e<0?0:e}):[_-C.bottom,v+C.top];return m?k.reverse():k},getXDomainMinMax:function(e,t){var n=this,r=n.config[`axis_x_${t}`],i=xr(t,e.map(function(e){return xr(t,e.values.map(function(e){return e.x}))})),a=Z(r)?r.value:r;return a=J(a)&&n.axis?.isTimeSeries()?wr.bind(this)(a):a,Z(r)&&r.fit&&(t===`min`&&a<i||t===`max`&&a>i)&&(a=void 0),J(a)?a:i},getXDomainPadding:function(e,t){var n=this,r=n.axis,i=n.config.axis_x_padding,a=r.isTimeSeries()&&t,o=Wn(e),s;if(r.isCategorized()||a)s=0;else if(n.hasType(`bar`)){var c=n.getMaxDataCount();s=c>1?o/(c-1)/2:.5}else s=n.getResettedPadding(o*.01);var l=K(i)?{left:i,right:i}:i,u=l.left,d=u===void 0?s:u,f=l.right,p=f===void 0?s:f;if(i.unit===`px`){var m=Math.abs(o+o*.2);d=r.getPadding(i,`left`,s,m),p=r.getPadding(i,`right`,s,m)}else{var h=o+d+p;if(a&&h){var g=o/t/h;d=d/h/g,p=p/h/g}}return{left:d,right:p}},getXDomain:function(e){var t=this,n=t.axis,r=t.config,i=t.scale.x,a=r.axis_x_inverted,o=[t.getXDomainMinMax(e,`min`),t.getXDomainMinMax(e,`max`)],s=o[0],c=s===void 0?0:s,l=o[1],u=l===void 0?0:l;if(i.type!==`log`){var d=n.isCategorized(),f=n.isTimeSeries(),p=t.getXDomainPadding(o),m=o[0],h=o[1];m-h===0&&!d&&(f?(m=new Date(m.getTime()*.5),h=new Date(h.getTime()*1.5)):(m=m===0?1:m*.5,h=h===0?-1:h*1.5)),(m||m===0)&&(c=f?new Date(m.getTime()-p.left):m-p.left),(h||h===0)&&(u=f?new Date(h.getTime()+p.right):h+p.right)}return a?[u,c]:[c,u]},updateXDomain:function(e,t,n,r,i){var a,o=this,s=o.config,c=o.org,l=o.scale,u=l.x,d=l.subX,f=s.zoom_enabled;if(n&&(u.domain(i||br(o.getXDomain(e),!s.axis_x_inverted)),c.xDomain=u.domain(),d.domain(u.domain()),(a=o.brush)==null||a.scale(d)),t){var p=i||!o.brush||or(o)?c.xDomain:tr(o).map(d.invert);u.domain(p)}return(n||t)&&f&&o.zoom.updateScaleExtent(),r&&u.domain(o.trimXDomain(u.orgDomain())),u.domain()},trimXDomain:function(e){var t=this,n=t.config.axis_x_inverted,r=t.getZoomDomain(),i=r[0],a=r[1];return(n?e[0]>=i:e[0]<=i)&&(e[1]=+e[1]+(i-e[0]),e[0]=i),(n?e[1]<=a:e[1]>=a)&&(e[0]=+e[0]-(e[1]-a),e[1]=a),e},getZoomDomain:function(e,t){e===void 0&&(e=`zoom`),t===void 0&&(t=!1);var n=this,r=n.config,i=n.scale,a=n.org,o=t&&i[e]?i[e].domain():a.xDomain,s=o[0],c=o[1];return e===`zoom`&&(J(r.zoom_x_min)&&(s=xr(`min`,[s,r.zoom_x_min])),J(r.zoom_x_max)&&(c=xr(`max`,[c,r.zoom_x_max]))),[s,c]},getZoomDomainValue:function(e){var t=this,n=t.config;if(t.axis.isCategorized()&&Array.isArray(e)){var r=n.axis_x_inverted;return e.map(function(e,t){return Number(e)+(t===0?+r:+!r)})}return e},convertPixelToScale:function(e,t,n){var r=this,i=r.config,a=r.state,o=i.axis_rotated;return n*(t/a[e===`x`?o?`height`:`width`:o?`width`:`height`])},withinRange:function(e,t,n){t===void 0&&(t=[0,0]);var r=this.config.axis_x_inverted,i=n,a=i[0],o=i[1];if(Array.isArray(e)){var s=N([],e,!0);if(r&&s.reverse(),s[0]<s[1])return e.every(function(n,i){return(i===0?r?+n<=a:+n>=a:r?+n>=o:+n<=o)&&!e.every(function(e,n){return e===t[n]})})}return!1}};function vi(e,t,n){var r=e.config,i=`axis_${t}_tick_format`;return(r[i]?r[i]:e.defaultValueFormat).call(e.api,n)}var yi={yFormat:function(e){return vi(this,`y`,e)},y2Format:function(e){return vi(this,`y2`,e)},getDefaultValueFormat:function(){var e=this,t=e.defaultArcValueFormat,n=e.yFormat,r=e.y2Format,i=e.hasArcType(null,[`gauge`,`polar`,`radar`]);return function(a,o,s){return(i?t:e.axis&&e.axis.getId(s)===`y2`?r:n).call(e,a,o)}},defaultValueFormat:function(e){return X(e)?e.join(`~`):U(e)?+e:``},defaultArcValueFormat:function(e,t){return`${(t*100).toFixed(1)}%`},defaultPolarValueFormat:function(e){return`${e}`},dataLabelFormat:function(e){var t=this,n=t.config.data_labels,r=function(e){var t=`~`,n=e;return X(e)?n=e.join(t):Z(e)&&(n=Object.values(e).join(t)),n},i=r;return W(n.format)?i=n.format:Gn(n.format)&&(i=n.format[e]?n.format[e]===!0?r:n.format[e]:function(){return``}),i.bind(t.api)}};function bi(e){var t=this,n=t.getDataById(e);return t.levelColor?t.levelColor(n.values[0].value):t.color(n)}function xi(e,t){t===void 0&&(t=!0);var n=this.config,r=n.data_names[e]??e;return t&&W(n.legend_format)&&(r=n.legend_format(r,e===r?void 0:e)),r}function Si(e,t){if(!(!t||t.empty())){var n=[];t.each(function(e){n.push({id:e,node:this})});var r=Nr(n,function(e){return e.id},function(e){return e.node});e.cache.add(Lr.legendItemMap,r)}}var Ci={initLegend:function(){var e=this,t=e.config,n=e.$el;e.legendItemTextBox={},e.state.legendHasRendered=!1,t.legend_show?(t.legend_contents_bindto||(n.legend=e.$el.svg.append(`g`).classed(L.legend,!0).attr(`transform`,e.getTranslate(`legend`))),e.updateLegend()):e.state.hiddenLegendIds=e.mapToIds(e.data.targets)},updateLegend:function(e,t,n){var r,i=this,a=i.config,o=i.state,s=i.scale,c=i.$el,l=t||{withTransform:!1,withTransitionForTransform:!1,withTransition:!1};l.withTransition=Jn(l,`withTransition`,!0),l.withTransitionForTransform=Jn(l,`withTransitionForTransform`,!0),a.legend_contents_bindto&&a.legend_contents_template?i.updateLegendTemplate():o.hasTreemap||i.updateLegendElement(e||i.mapToIds(i.data.targets),l,n),(r=c.legend)==null||r.selectAll(`.${L.legendItem}`).classed(L.legendItemHidden,function(e){var t=!i.isTargetToShow(e);return t&&(this.style.opacity=null),t}),i.updateScales(!1,!s.zoom),i.updateSvgSize(),i.transformAll(l.withTransitionForTransform,n),o.legendHasRendered=!0},updateLegendTemplate:function(){var e=this,t=e.config,n=e.$el,r=A(t.legend_contents_bindto),i=t.legend_contents_template;if(!r.empty()){var a=e.mapToIds(e.data.targets),o=[],s=``;a.forEach(function(t){var n=W(i)?Rn(i.call(e.api,t,e.color(t),e.api.data(t)[0].values)):Cr(i,{COLOR:e.color(t),TITLE:t});n&&(o.push(t),s+=n)});var c=r.html(s).selectAll(function(){return this.childNodes}).data(o);e.setLegendItem(c),n.legend=r}},updateSizeForLegend:function(e){var t=this,n=t.config,r=t.state,i=r.isLegendTop,a=r.isLegendLeft,o=r.isLegendRight,s=r.isLegendInset,c=r.current,l=e.width,u=e.height,d={top:i?t.getCurrentPaddingByDirection(`top`)+n.legend_inset_y+5.5:c.height-u-t.getCurrentPaddingByDirection(`bottom`)-n.legend_inset_y,left:a?t.getCurrentPaddingByDirection(`left`)+n.legend_inset_x+.5:c.width-l-t.getCurrentPaddingByDirection(`right`)-n.legend_inset_x+.5};t.state.margin3={top:o?0:s?d.top:c.height-u,right:NaN,bottom:0,left:o?c.width-l:s?d.left:0}},transformLegend:function(e){var t=this,n=t.$el.legend,r=t.$T;r(n,e).attr(`transform`,t.getTranslate(`legend`))},updateLegendStep:function(e){this.state.legendStep=e},updateLegendItemWidth:function(e){this.state.legendItemWidth=e},updateLegendItemHeight:function(e){this.state.legendItemHeight=e},updateLegendItemColor:function(e,t){var n=this;if(n.$el.legend){var r=n.getLegendItemById(e);r&&A(r).select(`line`).style(`stroke`,t)}},getLegendWidth:function(){var e=this,t=e.state,n=t.current.width,r=t.isLegendRight,i=t.isLegendInset,a=t.legendItemWidth,o=t.legendStep;return e.config.legend_show?r||i?a*(o+1):n:0},getLegendHeight:function(){var e=this,t=e.state,n=t.current,r=t.isLegendRight,i=t.legendItemHeight,a=t.legendStep,o=e.config.padding?.mode===`fit`;return e.config.legend_show?r?n.height:Math.max(o?10:20,i)*(a+1):0},opacityForUnfocusedLegend:function(e){return e.classed(L.legendItemHidden)?null:`0.3`},toggleFocusLegend:function(e,t){var n=this,r=n.$el.legend,i=n.$T,a=n.mapToTargetIds(e);r&&i(r.selectAll(`.${L.legendItem}`).filter(function(e){return a.indexOf(e)>=0}).classed(R.legendItemFocused,t)).style(`opacity`,function(){return t?null:n.opacityForUnfocusedLegend.call(n,A(this))})},revertLegend:function(){var e=this,t=e.$el.legend,n=e.$T;t&&n(t.selectAll(`.${L.legendItem}`).classed(R.legendItemFocused,!1)).style(`opacity`,null)},showLegend:function(e){var t=this,n=t.config,r=t.$el,i=t.$T;n.legend_show||(n.legend_show=!0,r.legend?r.legend.style(`visibility`,null):t.initLegend(),!t.state.legendHasRendered&&t.updateLegend()),t.removeHiddenLegendIds(e),i(r.legend.selectAll(t.selectorLegends(e)).style(`visibility`,null)).style(`opacity`,null)},hideLegend:function(e){var t=this,n=t.config,r=t.$el.legend;n.legend_show&&qn(e)&&(n.legend_show=!1,r.style(`visibility`,`hidden`)),t.addHiddenLegendIds(e),r.selectAll(t.selectorLegends(e)).style(`opacity`,`0`).style(`visibility`,`hidden`)},getLegendItemTextBox:function(e,t){var n=this,r=n.cache,i=n.state,a,o=Lr.legendItemTextBox;return e&&(a=!i.redrawing&&r.get(o)||{},a[e]||(a[e]=n.getTextRect(t,L.legendItem),r.add(o,a)),a=a[e]),a},setLegendItem:function(e){var t=this,n=t.$el,r=t.api,i=t.config,a=t.state,o=a.inputType===`touch`,s=t.hasType(`gauge`),c=i.boost_useCssRule,l=i.legend_item_interaction;e.attr(`class`,function(e){var n=A(this);return(!n.empty()&&n.attr(`class`)||``)+t.generateClass(L.legendItem,e)}).style(`visibility`,function(e){return t.isLegendToShow(e)?null:`hidden`}),i.interaction_enabled&&(c&&[[`.${L.legendItem}`,`cursor:pointer`],[`.${L.legendItem} text`,`pointer-events:none`],[`.${L.legendItemPoint} text`,`pointer-events:none`],[`.${L.legendItemTile}`,`pointer-events:none`],[`.${L.legendItemEvent}`,`fill-opacity:0`]].forEach(function(e){var r=e[0],i=e[1];t.setCssRule(!1,r,[i])(n.legend)}),e.on(l.dblclick?`dblclick`:`click`,l||W(i.legend_item_onclick)?function(e,n){if(!Q(i.legend_item_onclick,r,n,!a.hiddenTargetIds.includes(n))){var s=e.altKey,c=e.target;e.type===`dblclick`||s?a.hiddenTargetIds.length&&c.parentNode.getAttribute(`class`).indexOf(L.legendItemHidden)===-1?r.show():(r.hide(),r.show(n)):(r.toggle(n),A(this).classed(R.legendItemFocused,!1))}o&&t.hideTooltip()}:null),!o&&e.on(`mouseout`,l||W(i.legend_item_onout)?function(e,n){Q(i.legend_item_onout,r,n,!a.hiddenTargetIds.includes(n))||(A(this).classed(R.legendItemFocused,!1),s&&t.undoMarkOverlapped(t,`.${Jt.gaugeValue}`),t.api.revert())}:null).on(`mouseover`,l||W(i.legend_item_onover)?function(e,n){Q(i.legend_item_onover,r,n,!a.hiddenTargetIds.includes(n))||(A(this).classed(R.legendItemFocused,!0),s&&t.markOverlapped(n,t,`.${Jt.gaugeValue}`),!a.transiting&&t.isTargetToShow(n)&&r.focus(n))}:null),!e.empty()&&e.on(`click mouseout mouseover`)&&e.style(`cursor`,t.getStylePropValue(`pointer`))),Si(t,e)},getLegendItemById:function(e){var t=this,n=t.cache.get(Lr.legendItemMap);return n&&n instanceof Map?n.get(e)||null:(t.$el.legend?.selectAll(`.${L.legendItem}`).filter(function(t){return t===e}))?.node()||null},updateLegendElement:function(e,t){var n=this,r=n.config,i=n.state,a=n.$el.legend,o=n.$T,s=r.legend_item_tile_type!==`circle`,c=r.legend_item_tile_r,l={width:s?r.legend_item_tile_width:c*2,height:s?r.legend_item_tile_height:c*2},u={padding:{top:4,right:10},max:{width:0,height:0},posMin:10,step:0,tileWidth:l.width+5,totalLength:0},d={offsets:{},widths:{},heights:{},margins:[0],steps:{}},f,p,m,h=e.filter(function(e){return!J(r.data_names[e])||r.data_names[e]!==null}),g=t.withTransition,_=n.getUpdateLegendPositions(h,u,d);i.isLegendInset&&(u.step=r.legend_inset_step?r.legend_inset_step:h.length,n.updateLegendStep(u.step)),i.isLegendRight?(f=function(e){return u.max.width*d.steps[e]},p=function(e){return d.margins[d.steps[e]]+d.offsets[e]}):i.isLegendInset?(f=function(e){return u.max.width*d.steps[e]+10},p=function(e){return d.margins[d.steps[e]]+d.offsets[e]}):(f=function(e){return d.margins[d.steps[e]]+d.offsets[e]},p=function(e){return u.max.height*d.steps[e]});var v={xText:function(e,t){return f(e,t)+4+l.width},xRect:function(e,t){return f(e,t)},x1Tile:function(e,t){return f(e,t)-2},x2Tile:function(e,t){return f(e,t)-2+l.width},yText:function(e,t){return p(e,t)+9},yRect:function(e,t){return p(e,t)-5},yTile:function(e,t){return p(e,t)+4}};n.generateLegendItem(h,l,_,v),m=a.select(`.${L.legendBackground} rect`),i.isLegendInset&&u.max.width>0&&m.size()===0&&(m=a.insert(`g`,`.${L.legendItem}`).attr(`class`,L.legendBackground).append(`rect`)),r.legend_tooltip&&a.selectAll(`title`).data(h).text(function(e){return xi.bind(n)(e,!1)}),o(a.selectAll(`text`).data(h).text(function(e){return xi.bind(n)(e)}).each(function(e,t){_(this,e,t)}),g).attr(`x`,v.xText).attr(`y`,v.yText),o(a.selectAll(`rect.${L.legendItemEvent}`).data(h),g).attr(`width`,function(e){return d.widths[e]}).attr(`height`,function(e){return d.heights[e]}).attr(`x`,v.xRect).attr(`y`,v.yRect),n.updateLegendItemPos(h,g,v),m&&o(m,g).attr(`height`,n.getLegendHeight()-12).attr(`width`,u.max.width*(u.step+1)+10),n.updateLegendItemWidth(u.max.width),n.updateLegendItemHeight(u.max.height),n.updateLegendStep(u.step)},getUpdateLegendPositions:function(e,t,n){var r=this,i=r.config,a=r.state,o=a.isLegendRight||a.isLegendInset;return function(s,c,l){var u=l===0,d=l===e.length-1,f=r.getLegendItemTextBox(c,s),p=f.width+t.tileWidth+(d&&!o?0:t.padding.right)+i.legend_padding,m=f.height+t.padding.top,h=o?m:p,g=o?r.getLegendHeight():r.getLegendWidth(),_,v=function(e,r){r||(_=(g-t.totalLength-h)/2,_<t.posMin&&(_=(g-h)/2,t.totalLength=0,t.step++)),n.steps[e]=t.step,n.margins[t.step]=a.isLegendInset?10:_,n.offsets[e]=t.totalLength,t.totalLength+=h};if(u&&(t.totalLength=0,t.step=0,t.max.width=0,t.max.height=0),i.legend_show&&!r.isLegendToShow(c)){n.widths[c]=0,n.heights[c]=0,n.steps[c]=0,n.offsets[c]=0;return}n.widths[c]=p,n.heights[c]=m,(!t.max.width||p>=t.max.width)&&(t.max.width=p),(!t.max.height||m>=t.max.height)&&(t.max.height=m);var y=o?t.max.height:t.max.width;i.legend_equally?(Object.keys(n.widths).forEach(function(e){return n.widths[e]=t.max.width}),Object.keys(n.heights).forEach(function(e){return n.heights[e]=t.max.height}),_=(g-y*e.length)/2,_<t.posMin?(t.totalLength=0,t.step=0,e.forEach(function(e){return v(e)})):v(c,!0)):v(c)}},generateLegendItem:function(e,t,n,r){var i=this,a=i.config,o=i.state,s=i.$el.legend,c=a.legend_usePoint,l=a.legend_item_tile_r,u=a.legend_item_tile_type,d=u!==`circle`,f=o.isLegendRight||o.isLegendInset,p=-200,m=s.selectAll(`.${L.legendItem}`).data(e).enter().append(`g`);if(i.setLegendItem(m),a.legend_tooltip&&m.append(`title`).text(function(e){return e}),m.append(`text`).text(function(e){return xi.bind(i)(e)}).each(function(e,t){n(this,e,t)}).style(`pointer-events`,i.getStylePropValue(`none`)).attr(`x`,f?r.xText:p).attr(`y`,f?p:r.yText),m.append(`rect`).attr(`class`,L.legendItemEvent).style(`fill-opacity`,i.getStylePropValue(`0`)).attr(`x`,f?r.xRect:p).attr(`y`,f?p:r.yRect),c){var h=[],g=i.getValidPointPattern();m.append(function(e){h.indexOf(e)===-1&&h.push(e);var t=g[h.indexOf(e)%g.length];return t===`rectangle`&&(t=`rect`),mn.createElementNS(Ce.svg,`hasValidPointType`in i&&i.hasValidPointType(t)?t:`use`)}).attr(`class`,L.legendItemPoint).style(`fill`,bi.bind(i)).style(`pointer-events`,i.getStylePropValue(`none`)).attr(`href`,function(e,t,n){var r=n[t].nodeName.toLowerCase(),a=i.getTargetSelectorSuffix(e);return r===`use`?`#${o.datetimeId}-point${a}`:void 0})}else m.append(d?`line`:u).attr(`class`,L.legendItemTile).style(`stroke`,bi.bind(i)).style(`pointer-events`,i.getStylePropValue(`none`)).call(function(e){u===`circle`?e.attr(`r`,l).style(`fill`,bi.bind(i)).attr(`cx`,f?r.x2Tile:p).attr(`cy`,f?p:r.yTile):d&&e.attr(`stroke-width`,t.height).attr(`x1`,f?r.x1Tile:p).attr(`y1`,f?p:r.yTile).attr(`x2`,f?r.x2Tile:p).attr(`y2`,f?p:r.yTile)})},updateLegendItemPos:function(e,t,n){var r=this,i=r.config,a=r.$el.legend,o=r.$T,s=i.legend_usePoint,c=i.legend_item_tile_type,l=c!==`circle`;if(s){var u=a.selectAll(`.${L.legendItemPoint}`).data(e);o(u,t).each(function(){var e=this.nodeName.toLowerCase(),t=i.point_r,r=`x`,a=`y`,o=2,s=2.5,c=null,l=null,u=null;if(e===`circle`){var d=t*.2;r=`cx`,a=`cy`,c=t+d,o=t*2,s=-d}else if(e===`rect`){var d=t*2.5;l=d,u=d,s=3}A(this).attr(r,function(e){return n.x1Tile(e)+o}).attr(a,function(e){return n.yTile(e)-s}).attr(`r`,c).attr(`width`,l).attr(`height`,u)})}else{var u=a.selectAll(`.${L.legendItemTile}`).data(e);o(u,t).style(`stroke`,bi.bind(r)).call(function(e){c===`circle`?e.attr(`cx`,function(e){var t=n.x2Tile(e);return t-(t-n.x1Tile(e))/2}).attr(`cy`,n.yTile):l&&e.attr(`x1`,n.x1Tile).attr(`y1`,n.yTile).attr(`x2`,n.x2Tile).attr(`y2`,n.yTile)})}}},wi={redraw:function(e){var t,n;e===void 0&&(e={});var r=this,i=r.config,a=r.state,o=r.$el,s=o.main,c=o.treemap;a.redrawing=!0;var l=r.filterTargetsToShow(r.data.targets),u=e.flow,d=e.initializing,f=r.getWithOption(e),p=f.Transition?i.transition_duration:0,m=f.TransitionForExit?p:0,h=f.TransitionForAxis?p:0,g=r.axis?.generateTransitions(h);r.updateSizes(d),f.Legend&&i.legend_show?(e.withTransition=!!p,!c&&r.updateLegend(r.mapToIds(r.data.targets),e,g)):f.Dimension&&r.updateDimension(!0),i.data_empty_label_text&&s.select(`text.${V.text}.${P.empty}`).attr(`x`,a.width/2).attr(`y`,a.height/2).text(i.data_empty_label_text).style(`display`,l.length?`none`:null),a.hasAxis?(r.axis.redrawAxis(l,f,g,u,d),r.hasGrid()&&r.updateGrid(),i.regions.length&&r.updateRegion(),[`bar`,`candlestick`,`line`,`area`].forEach(function(e){var t=lr(e);(/^(line|area)$/.test(e)&&r.hasTypeOf(t)||r.hasType(e))&&r[`update${t}`](f.TransitionForExit)}),o.text&&s.selectAll(`.${B.selectedCircles}`).filter(r.isBarType.bind(r)).selectAll(`circle`).remove(),i.interaction_enabled&&!u&&f.EventRect&&(r.redrawEventRect(),(t=r.bindZoomEvent)==null||t.call(r))):(o.arcs&&r.redrawArc(p,m,f.Transform),o.radar&&r.redrawRadar(),o.polar&&r.redrawPolar(),o.funnel&&r.redrawFunnel(),c&&r.updateTreemap(m)),!a.resizing&&!c&&(r.hasPointType()||a.hasRadar)?r.updateCircle():r.hasLegendDefsPoint?.call(r)&&r.data.targets.forEach(r.point(`create`,this)),r.hasDataLabel()&&!r.hasArcType(null,[`radar`])&&r.updateText(),(n=r.redrawTitle)==null||n.call(r),d&&r.updateTypesElements(),r.generateRedrawList(l,u,p,f.Subchart),r.updateTooltipOnRedraw(),r.callPluginHook(`$redraw`,e,p)},generateRedrawList:function(e,t,n,r){var i=this,a=i.config,o=i.state,s=i.getDrawShape();o.hasAxis&&a.subchart_show&&i.redrawSubchart(r,n,s);var c=t&&i.generateFlow({targets:e,flow:t,duration:t.duration,shape:s,xv:i.xv.bind(i)}),l=(n||c)&&Dr(),u=i.getRedrawList(s,t,c,l),d=function(){c&&c(),o.redrawing=!1,Q(a.onrendered,i.api)};if(d)if(l&&u.length){var f=Kr();Fe().duration(n).each(function(){u.reduce(function(e,t){return e.concat(t)},[]).forEach(function(e){return f.add(e)})}).call(f,d)}else o.transiting||d();i.mapToIds(i.data.targets).forEach(function(e){o.withoutFadeIn[e]=!0})},getRedrawList:function(e,t,n,r){var i=this,a=i.config,o=i.state,s=o.hasAxis,c=o.hasRadar,l=o.hasTreemap,u=i.$el.grid,d=e.pos,f=d.cx,p=d.cy,m=d.xForText,h=d.yForText,g=[];return s&&((a.grid_x_lines.length||a.grid_y_lines.length)&&g.push(i.redrawGrid(r)),a.regions.length&&g.push(i.redrawRegion(r)),Object.keys(e.type).forEach(function(t){var n=lr(t),a=e.type[t];(/^(area|line)$/.test(t)&&i.hasTypeOf(n)||i.hasType(t))&&g.push(i[`redraw${n}`](a,r))}),!t&&u.main&&g.push(i.updateGridFocus())),(!i.hasArcType()||c)&&Y(a.data_labels)&&a.data_labels!==!1&&g.push(i.redrawText(m,h,t,r)),(i.hasPointType()||c)&&!i.isPointFocusOnly()&&i.redrawCircle&&g.push(i.redrawCircle(f,p,r,n)),l&&g.push(i.redrawTreemap(r)),g},updateAndRedraw:function(e){e===void 0&&(e={});var t=this,n=t.config,r=t.state,i;e.withTransition=Jn(e,`withTransition`,!0),e.withTransform=Jn(e,`withTransform`,!1),e.withLegend=Jn(e,`withLegend`,!1),e.withUpdateXDomain=!0,e.withUpdateOrgXDomain=!0,e.withTransitionForExit=!1,e.withTransitionForTransform=Jn(e,`withTransitionForTransform`,e.withTransition),e.withLegend&&n.legend_show||(r.hasAxis&&(i=t.axis.generateTransitions(e.withTransitionForAxis?n.transition_duration:0)),t.updateScales(),t.updateSvgSize(),t.transformAll(e.withTransitionForTransform,i)),t.redraw(e,i)}};function Ti(e,t,n){e===void 0&&(e=`linear`);var r={linear:p,log:Ft,_log:j,time:O,utc:It}[e]();return r.type=e,/_?log/.test(e)&&r.clamp(!0),r.range([t??0,n??1])}var Ei={getXScale:function(e,t,n,r){var i=this,a=i.state.loading!==`append`&&i.scale.zoom||Ti(i.axis.getAxisType(`x`),e,t);return i.getCustomizedXScale(n?a.domain(n):a,r)},getYScale:function(e,t,n,r){var i=Ti(this.axis.getAxisType(e),t,n);return r&&i.domain(r),i},getYScaleById:function(e,t){t===void 0&&(t=!1);var n=this.axis?.getId(e)===`y2`,r=t?n?`subY2`:`subY`:n?`y2`:`y`;return this.scale[r]},getCustomizedXScale:function(e,t){var n=this,r=t||(function(){return n.axis.x.tickOffset()}),i=n.config.axis_x_inverted,a=function(t){return e(t)+r()};for(var o in e)a[o]=e[o];return a.orgDomain=function(){return e.domain()},a.orgScale=function(){return e},n.axis.isCategorized()&&(a.domain=function(t){var n=t;return arguments.length?(e.domain(n),a):(n=this.orgDomain(),i?[n[0]+1,n[1]]:[n[0],n[1]+1])}),a},updateScales:function(e,t){var n;t===void 0&&(t=!0);var r=this,i=r.axis,a=r.config,o=r.format,s=r.org,c=r.scale,l=r.state,u=l.current,d=l.width,f=l.height,m=l.width2,h=l.height2,g=l.hasAxis,_=l.hasTreemap;if(g){var v=a.axis_rotated,y=r.getResettedPadding(1),b={x:v?y:0,y:v?0:f,subX:+!!v,subY:v?0:h},x={x:v?f:d,y:v?d:y,subX:v?f:d,subY:v?m:1},S=t&&c.x?.orgDomain(),C=t&&s.xDomain;c.x=r.getXScale(b.x,x.x,S,function(){return i.x.tickOffset()}),c.subX=r.getXScale(b.x,x.x,C,function(e){return e%1?0:(i.subX??i.x).tickOffset()}),o.xAxisTick=i.getXAxisTickFormat(),o.subXAxisTick=i.getXAxisTickFormat(!0),i.setAxis(`x`,c.x,a.axis_x_tick_outer,e),a.subchart_show&&i.setAxis(`subX`,c.subX,a.axis_x_tick_outer,e),c.y=r.getYScale(`y`,b.y,x.y,c.y?c.y.domain():a.axis_y_default),c.subY=r.getYScale(`y`,b.subY,x.subY,c.subY?c.subY.domain():a.axis_y_default),i.setAxis(`y`,c.y,a.axis_y_tick_outer,e),a.axis_y2_show&&(c.y2=r.getYScale(`y2`,b.y,x.y,c.y2?c.y2.domain():a.axis_y2_default),c.subY2=r.getYScale(`y2`,b.subY,x.subY,c.subY2?c.subY2.domain():a.axis_y2_default),i.setAxis(`y2`,c.y2,a.axis_y2_tick_outer,e))}else if(_){var w=r.getCurrentPadding();c.x=p().rangeRound([w.left,u.width-w.right]),c.y=p().rangeRound([w.top,u.height-w.bottom])}else (n=r.updateArc)==null||n.call(r)},xx:function(e){var t=this,n=t.config,r=t.scale,i=r.x,a=r.zoom,o=n.zoom_enabled&&a?a:i;return e?o(U(e.x)?e.x:e):null},xv:function(e){var t=this,n=t.axis,r=t.config,i=t.scale,a=i.x,o=i.zoom,s=r.zoom_enabled&&o?o:a,c=t.getBaseValue(e);return n.isTimeSeries()?c=wr.call(t,c):n.isCategorized()&&G(c)&&(c=r.axis_x_categories.indexOf(c)),s(c)},yv:function(e){var t=this,n=t.scale,r=n.y,i=n.y2;return(e.axis&&e.axis===`y2`?i:r)(t.getBaseValue(e))},subxx:function(e){return e?this.scale.subX(e.x):null}},Di={setContainerSize:function(){var e=this,t=e.state;t.current.width=e.getCurrentWidth(),t.current.height=e.getCurrentHeight()},getCurrentWidth:function(){var e=this;return e.config.size_width||e.getParentWidth()},getCurrentHeight:function(){var e=this,t=e.config,n=t.size_height||e.getParentHeight();return n>0?n:320/(e.hasType(`gauge`)&&!t.gauge_fullCircle?2:1)},getParentRectValue:function(e){for(var t=`offset${lr(e)}`,n=this.$el.chart.node(),r=0;r<30&&n&&n.tagName!==`BODY`;){try{r=nr(n,!0)[e]}catch{t in n&&(r=n[t])}n=n.parentNode}var i=mn.body[t];return r>i&&(r=i),r},getParentWidth:function(){return this.getParentRectValue(`width`)},getParentHeight:function(){var e=this.$el.chart.style(`height`),t=0;return e&&(t=/px$/.test(e)?parseInt(e,10):this.getParentRectValue(`height`)),t},getSvgLeft:function(e){var t=this,n=t.config,r=t.state.hasAxis,i=t.$el,a=n.axis_rotated,o=a||!a&&!n.axis_y_inner,s=a?Ht.axisX:Ht.axisY,c=i.main.select(`.${s}`).node(),l=r&&n[`axis_${a?`x`:`y`}_label`],u=0;if(r&&(G(l)||G(l.text)||/^inner-/.test(l?.position))){var d=i.main.select(`.${s}-label`);d.empty()||(u=nr(d.node()).left)}var f=c&&o?nr(c,!e):{right:0},p=nr(i.chart.node(),!e).left+u,m=t.hasArcType(),h=f.right-p-(m?0:t.getCurrentPaddingByDirection(`left`,e));return h>0?h:0},updateDimension:function(e){var t,n=this,r=n.config,i=n.state.hasAxis,a=n.$el;i&&!e&&n.axis.x&&r.axis_rotated&&((t=n.axis.subX)==null||t.create(a.axis.subX)),n.updateScales(e),n.updateSvgSize(),n.transformAll(!1)},updateSvgSize:function(){var e=this,t=e.config,n=e.state,r=n.clip,i=n.current,a=n.hasAxis,o=n.width,s=n.height,c=e.$el.svg;if(t.resize_auto===`viewBox`?c.attr(`viewBox`,`0 0 ${i.width} ${i.height}`):c.attr(`width`,i.width).attr(`height`,i.height),a){var l=c.select(`.${en.brush} .overlay`),u={width:0,height:0};l.size()&&(u.width=+l.attr(`width`),u.height=+l.attr(`height`)),c.selectAll([`#${r.id}`,`#${r.idGrid}`]).select(`rect`).attr(`width`,o).attr(`height`,s),c.select(`#${r.idXAxis}`).select(`rect`).call(e.setXAxisClipPath.bind(e)),c.select(`#${r.idYAxis}`).select(`rect`).call(e.setYAxisClipPath.bind(e)),r.idSubchart&&c.select(`#${r.idSubchart}`).select(`rect`).attr(`width`,o).attr(`height`,u.height)}},getCurrentPaddingByDirection:function(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=this,i=r.config,a=r.$el,o=r.state.hasAxis,s=i.axis_rotated,c=i.padding?.mode===`fit`,l=K(i[`padding_${e}`])?i[`padding_${e}`]:void 0,u=o?{top:s?`y2`:null,bottom:s?`y`:`x`,left:s?`x`:`y`,right:s?null:`y2`}[e]:null,d=/^(left|right)$/.test(e),f=u&&i[`axis_${u}_inner`],p=u&&i[`axis_${u}_show`],m=u?i[`axis_${u}_axes`].length:0,h=u?d?r.getAxisWidthByAxisId(u,t):r.getHorizontalAxisHeight(u):0,g=20,_=0;!c&&d&&(h=Hn(h));var v=o&&d&&(f||q(l)&&!p)?0:c?(p?h:0)+(l??0):q(l)?h:l;return d&&o?(u&&(c||f)&&i[`axis_${u}_label`].text&&(v+=r.axis.getAxisLabelPosition(u).isOuter?g:0),e===`right`?(v+=s?!c&&q(l)?10:2:!p||f?c?2:1:0,v+=n?r.axis.getXAxisTickTextY2Overflow(g):0):e===`left`&&s&&q(l)&&(v=i.axis_x_show?c?h:Math.max(h,40):1)):e===`top`?(a.title&&a.title.node()&&(v+=r.getTitlePadding()),_=s&&!f?m:0):e===`bottom`&&o&&s&&!p&&(v+=1),v+h*m-_},getCurrentPadding:function(e){e===void 0&&(e=!1);var t=this,n=[`top`,`bottom`,`left`,`right`].map(function(n){return t.getCurrentPaddingByDirection(n,null,e)});return{top:n[0],bottom:n[1],left:n[2],right:n[3]}},getResettedPadding:function(e){var t=this.config,n=K(e),r=n?0:{};return t.padding===!1?!n&&Object.keys(e).forEach(function(n){r[n]=!qn(t.data_labels)&&t.data_labels!==!1&&n===`top`?e[n]:0}):r=e,r},updateSizes:function(e){var t,n,r=this,i=r.config,a=r.state,o=r.$el.legend,s=i.axis_rotated,c=r.hasArcType()||a.hasFunnel||a.hasTreemap,l=i.padding?.mode===`fit`;!e&&r.setContainerSize();var u={width:o?r.getLegendWidth():0,height:o?r.getLegendHeight():0};!c&&i.axis_x_show&&i.axis_x_tick_autorotate&&r.updateXAxisTickClip();var d={right:i.legend_show&&a.isLegendRight?r.getLegendWidth()+(l?0:20):0,bottom:!i.legend_show||a.isLegendRight||a.isLegendInset?0:u.height},f=s||c?0:r.getHorizontalAxisHeight(`x`),p=i.subchart_axis_x_show&&i.subchart_axis_x_tick_text_show?f:30,m=i.subchart_show&&!c?i.subchart_size_height+p:0,h=r.hasType(`gauge`)&&i.arc_needle_show&&!i.gauge_fullCircle&&!i.gauge_label_show?10:0,g=r.getCurrentPadding(!0);if(a.margin=!c&&s?{top:g.top,right:c?0:g.right+d.right,bottom:d.bottom+g.bottom,left:m+(c?0:g.left)}:{top:(l?0:4)+g.top,right:c?0:g.right+d.right,bottom:h+m+d.bottom+g.bottom,left:c?0:g.left},a.margin=r.getResettedPadding(a.margin),a.margin2=s?{top:a.margin.top,right:NaN,bottom:20+d.bottom,left:r.state.rotatedPadding.left}:{top:a.current.height-m-d.bottom,right:NaN,bottom:p+d.bottom,left:a.margin.left},a.margin3={top:0,right:NaN,bottom:0,left:0},(t=r.updateSizeForLegend)==null||t.call(r,u),a.width=a.current.width-a.margin.left-a.margin.right,a.height=a.current.height-a.margin.top-a.margin.bottom,a.width<0&&(a.width=0),a.height<0&&(a.height=0),a.width2=s?a.margin.left-a.rotatedPadding.left-a.rotatedPadding.right:a.width,a.height2=s?a.height:a.current.height-a.margin2.top-a.margin2.bottom,a.width2<0&&(a.width2=0),a.height2<0&&(a.height2=0),r.hasArcType()){var _=r.hasType(`gauge`),v=i.legend_show&&a.isLegendRight,y=(a.hasRadar&&r.cache.get(Lr.radarTextWidth))??0;a.arcWidth=a.width-(v?u.width+10:0)-y,a.arcHeight=a.height-(v&&!_?0:10),i.arc_rangeText_values?.length&&(_?(a.arcWidth-=25,a.arcHeight-=10,a.margin.left+=10):(a.arcHeight-=20,a.margin.top+=10)),_&&!i.gauge_fullCircle&&(a.arcHeight+=a.height-r.getPaddingBottomForGauge()),(n=r.updateRadius)==null||n.call(r)}a.isLegendRight&&c&&(a.margin3.left=a.arcWidth/2+a.radiusExpanded*1.1)}},Oi={setCssRule:function(e,t,n,r){var i=this,a=i.config,o=i.state,s=o.cssRule,c=o.style;return a.boost_useCssRule?function(a){a.each(function(a){var o=r&&r?.call(i,a),l=`${e?`.${$t.shapes+i.getTargetSelectorSuffix(a.id)}`:``}${t}`;t in s&&c.sheet.deleteRule(s[l]),i.state.cssRule[l]=fr(c,l,n.filter(Boolean).map(function(e){return G(o)&&e.indexOf(`:`)===-1?`${e}: ${o}`:e||``}))})}:function(){}},getStylePropValue:function(e){return this.config.boost_useCssRule?null:W(e)?e.bind(this):e}};function ki(e){var t=`middle`;return e>0&&e<=170?t=`end`:e>190&&e<=360&&(t=`start`),t}function Ai(e,t,n,r,i){var a=this,o=e.value,s=a.isCandlestickType(e),c=K(o)&&o<0||s&&!a.getCandlestickData(e)?._isUp,l=t.x,u=t.y,d=4,f=d*2;return r?n===`start`?(l+=c?0:f,u+=d):n===`middle`?(l+=f,u-=f):n===`end`&&(c&&(l-=f),u+=d):(n===`start`?(l+=d,c&&(u+=f*2)):n===`middle`?u-=f:n===`end`&&(l-=d,c&&(u+=f*2)),i&&(u+=c?-17:s?13:7)),{x:l,y:u}}function ji(e,t){var n=this.config.data_labels_position,r=e.id,i=e.index,a=e.value;return(W(n)?n.bind(this.api)(t,a,r,i,this.$el.text):(r in n?n[r]:n)[t])??0}function Mi(e,t,n){var r=this,i=r.config,a=r.$T,o=i.axis_rotated,s=i.data_labels.border,c=s.padding,l=c===void 0?`3 5`:c,u=s.radius,d=u===void 0?10:u,f=s.stroke,p=f===void 0?`#000`:f,m=s.strokeWidth,h=m===void 0?1:m,g=s.fill,_=g===void 0?`none`:g,v=Ar(l),y=i.data_labels.border!==!0,b=rr(e),x=A(e.previousElementSibling);(x.empty()||x.node()?.tagName!==`rect`||!x.attr(`class`)?.includes(n))&&(x=A(e.parentNode).insert(`rect`,function(){return e}).attr(`class`,`${V.textBorderRect} ${n}`).attr(`width`,b.width+(y?v.left+v.right:0)).attr(`height`,b.height+(y?v.top+v.bottom:0)),y&&x.style(`fill`,_).style(`stroke`,p).style(`stroke-width`,`${h}px`).attr(`rx`,d).attr(`ry`,d)),a(x).attr(`x`,t.x-(y?v.left:0)-(o?0:b.width/2)).attr(`y`,t.y-(y?v.top:0)-b.height/4*3.2)}function Ni(e,t){return e===void 0&&(e=0),e>=(this.config[`${t}_label_threshold`]||0)}function Pi(){var e=this,t=e.$el.text,n=e.config;(e.state.arcWidth?e.getArcLabelConfig(`image`):n.data_labels.image)&&t.filter(function(){var e=this.previousElementSibling;return e?e.tagName!==`image`||!e.classList.contains(V.textLabelImage):!0}).each(function(t){var n=Fi.call(e,t),r=n.url,i=n.width,a=n.height,o=n.pos;r&&A(this.parentNode)?.insert(`image`,`${this.getAttribute(`class`)?.replace(/(?:^(.)|\s)/g,`.$1`)??`text`}`).style(`opacity`,`0`).attr(`href`,function(e){return Cr(r,{ID:`id`in e?e.id:e.data.id})}).attr(`class`,V.textLabelImage).style(`pointer-events`,`none`).attr(`width`,i).attr(`height`,a).attr(`transform`,o?`translate(${o.x??0} ${o.y??0})`:null)})}function Fi(e){var t=this,n=t.config,r=t.state.arcWidth?t.getArcLabelConfig(`image`):n.data_labels.image;if(W(r))return r.call(t.api,e.value,e.id,e.index)??{url:``,width:0,height:0,pos:{x:0,y:0}};if(r){var i=r.url,a=i===void 0?``:i,o=r.width,s=o===void 0?0:o,c=r.height;return{url:a,width:s,height:c===void 0?0:c,pos:r.pos}}return null}function Ii(e,t){var n=this,r=this,i=r.config,a=r.state,o=a.arcWidth,s=a.hasTreemap,c=i.axis_rotated,l=A(e.previousElementSibling),u=function(e){var t=e.style.opacity!==`0`&&e.style.fillOpacity!==`0`;return(o?e.textContent:t)&&n.previousElementSibling?.tagName!==`image`};if(!l.empty()&&l.node()?.tagName===`image`){var d=nr(e),f=l.attr(`width`)/2,p=l.attr(`height`)/2,m=t.x-f,h=t.y-p-d.height/2;c?t.x+=f:(s&&(m=-f,h=-(p*2+d.height)),r.hasType(`pie`)||r.hasType(`polar`)||(t.y+=p)),r.$T(l).style(`opacity`,u(e)?null:`0`).attr(`x`,m).attr(`y`,h)}}function Li(e){return Nr(e,function(e){return e},function(e){return rr(e)})}var Ri={opacityForText:function(e){var t=this;return t.isBarType(e)&&!Ni.call(t,Math.abs(t.getRatio(`bar`,e)),`bar`)?`0`:t.hasDataLabel?null:`0`},initText:function(){var e=this.$el;e.main.select(`.${P.chart}`).append(`g`).attr(`class`,V.chartTexts).style(`pointer-events`,e.funnel||e.treemap?`none`:null)},updateTargetsForText:function(e){var t=this,n=t.getChartClass(`Text`),r=t.getClass(`texts`,`id`),i=t.classFocus.bind(t);t.$el.main.select(`.${V.chartTexts}`).selectAll(`.${V.chartText}`).data(t.filterNullish(e)).attr(`class`,function(e){return`${n(e)}${i(e)}`.trim()}).enter().append(`g`).style(`opacity`,`0`).attr(`class`,n).call(t.setCssRule(!0,` .${V.text}`,[`fill`,`pointer-events:none`],t.updateTextColor)).append(`g`).attr(`class`,r)},updateText:function(){var e=this,t=e.$el,n=e.$T,r=e.config,i=e.axis,a=e.getClass(`text`,`index`),o=r.data_labels.centered,s=t.main.selectAll(`.${V.texts}`).selectAll(`.${V.text}`).data(e.labelishData.bind(e));n(s.exit()).style(`fill-opacity`,`0`).remove(),t.text=s.enter().append(`text`).merge(s).attr(`class`,a).attr(`text-anchor`,function(t){var n=r[`axis_${i?.getId(t.id)}_inverted`]?t.value>0:t.value<0;if(e.isCandlestickType(t))n=!e.getCandlestickData(t)?._isUp;else if(e.isTreemapType(t))return o?`middle`:`start`;return r.axis_rotated?n?`end`:`start`:`middle`}).style(`fill`,e.getStylePropValue(e.updateTextColor)).style(`fill-opacity`,`0`).each(function(t,n,r){var i=A(this),a=t.value;if(e.isBubbleZType(t))a=e.getBubbleZData(a,`z`);else if(e.isCandlestickType(t)){var o=e.getCandlestickData(t);o&&(a=o.close)}a=e.isTreemapType(t)?e.treemapDataLabelFormat(t)(i):e.dataLabelFormat(t.id)(a,t.id,t.index,r),K(a)?this.textContent=a:Zn(i,a,void 0,!0)}),Pi.call(e)},updateTextColor:function(e){var t=this,n=t.config,r=n.data_labels_colors,i=t.isArcType(e)&&!t.isRadarType(e)||t.isFunnelType(e)||t.isTreemapType(e)?null:t.color(e),a;if(G(r)?a=r:Z(r)?a=r[(e.data||e).id]:W(r)&&(a=r.bind(t.api)(i,e)),t.isCandlestickType(e)&&!W(r)&&!t.getCandlestickData(e)?._isUp){var o=n.candlestick_color_down;a=Z(o)?o[e.id]:o}return a||i},updateTextBGColor:function(e,t){var n=this,r=n.$el.defs,i=``;if(t){var a=G(t)?``:n.getTargetSelectorSuffix(`id`in e?e.id:e.data.id),o=r.select([`filter[id*='labels-bg`,`']`].join(a));if(o.size()&&(i=`url(#${o.attr(`id`)})`),W(t)){n.generateTextBGColorFilter(t);var s=n.color(e),c=t.bind(n.api)(s,e);c?o.select(`feFlood`).attr(`flood-color`,c):i=``}}return i||null},redrawText:function(e,t,n,r){var i=this,a=i.$T,o=i.axis,s=i.config,c=i.state.hasTreemap,l=ir(!0),u=s.axis_rotated,d=s.data_labels.rotate,f=ki(d),p=d?`rotate(${d})`:``,m=new Map;if(s.data_labels.centered){var h=[];i.$el.text.each(function(e){(i.isBarType(e)||i.isTreemapType(e))&&h.push(this)}),h.length>0&&(m=Li(h))}return i.$el.text.style(`fill`,i.getStylePropValue(i.updateTextColor)).attr(`filter`,function(e){return i.updateTextBGColor.bind(i)(e,s.data_labels_backgroundColors)}).style(`fill-opacity`,n?0:i.opacityForText.bind(i)).each(function(n,h){var g=m.get(this),_=a(c&&this.childElementCount?this.parentNode:this,!!(r&&(this.getAttribute(`x`)||this.getAttribute(`transform`))),l),v=s[`axis_${o?.getId(n.id)}_inverted`],y={x:e.bind(this)(n,h,g),y:t.bind(this)(n,h,g)};d&&(y=Ai.bind(i)(n,y,f,u,v),_.attr(`text-anchor`,f)),Ii.call(i,this,y),this.childElementCount||d?_.attr(`transform`,`translate(${y.x} ${y.y}) ${p}`):_.attr(`x`,y.x).attr(`y`,y.y),s.data_labels.border&&Mi.call(i,_.node(),y,`${V.textBorderRect}-${h}`)}),!0},getTextRect:function(e,t){var n,r=this,i,a,o;Array.isArray(e)?i=`${Lr.textRect}-${e.join(`_`)}`:(a=(n=e).node?.call(n)??e,/text/i.test(a.tagName)||(a=a.querySelector(`text`)),o=a.textContent,i=`${Lr.textRect}-${o.replace(/\W/g,`_`)}`);var s=r.cache.get(i)||[];return s.length===0&&((r.$el.svg||r.$el.chart.select(`svg`)).selectAll(`.${P.dummy}`).data(o?[o]:e).enter().append(`text`).style(`visibility`,`hidden`).style(`font`,a?A(a).style(`font`):null).classed(t||P.dummy,!0).text(function(e){return e}).each(function(e,t){s[t]=nr(this)}).remove(),r.cache.add(i,s)),s.length>1?s:s[0]},generateXYForText:function(e,t){var n=this,r=n.state,i=r.hasRadar,a=r.hasFunnel,o=r.hasTreemap,s=Object.keys(e),c={},l=t?n.getXForText:n.getYForText;return a&&s.push(`funnel`),i&&s.push(`radar`),o&&s.push(`treemap`),s.forEach(function(t){c[t]=n[`generateGet${lr(t)}Points`](e[t],!1)}),function(e,t){var r=n.isAreaType(e)&&`area`||n.isBarType(e)&&`bar`||n.isCandlestickType(e)&&`candlestick`||n.isFunnelType(e)&&`funnel`||n.isRadarType(e)&&`radar`||n.isTreemapType(e)&&`treemap`||`line`;return l.call(n,c[r](e,t),e,this)}},getCenteredTextPos:function(e,t,n,r,i){var a=this,o=a.config,s=o.axis_rotated,c=a.isBarType(e),l=a.isTreemapType(e);if(o.data_labels.centered&&(c||l)){var u=i||rr(n);if(c){var d=a.getRangedData(e,null,`bar`)>=0;if(s){var f=(d?t[1][1]-t[0][1]:t[0][1]-t[1][1])/2+u.width/2;return d?-f-3:f+2}else{var p=(d?t[0][1]-t[1][1]:t[1][1]-t[0][1])/2+u.height/2;return d?p:-p-2}}else if(l)return r===`x`?(t[1][0]-t[0][0])/2:(t[1][1]-t[0][1])/2-u.y-u.height/2}return 0},getXForText:function(e,t,n,r){var i=this,a=i.config,o=a.axis_rotated,s=i.isFunnelType(t),c=i.isTreemapType(t),l=e?e[0][0]:0;if(i.isCandlestickType(t))o?l=i.getCandlestickData(t)?._isUp?e[2][2]+4:e[2][1]-4:l+=(e[1][0]-l)/2;else if(s)l+=i.state.current.width/2;else if(c)l+=a.data_labels.centered?0:5;else if(o){var u=a[`axis_${i.axis.getId(t.id)}_inverted`],d=i.isBarType(t)?4:6,f=t.value;l=e[2][1],u?l-=d*(f>0?1:-1):l+=d*(f<0?-1:1)}else l=i.hasType(`bar`)?(e[2][0]+e[0][0])/2:l;return(o||c)&&(l+=i.getCenteredTextPos(t,e,n,`x`,r)),l+ji.call(this,t,`x`)},getYForText:function(e,t,n,r){var i=this,a=i.axis,o=i.config,s=i.state,c=o.axis_rotated,l=o[`axis_${a?.getId(t.id)}_inverted`],u=i.isBarType(t),d=i.isFunnelType(t),f=i.isTreemapType(t),p=o.point_r,m=nr(n),h=t.value,g=3,_;if(i.isCandlestickType(t))h=i.getCandlestickData(t),c?(_=e[0][0],_+=(e[1][0]-_)/2+g):(_=h&&h._isUp?e[2][2]-g:e[2][1]+g*4,l&&(_+=15*(h._isUp?1:-1)));else if(d)_=e?e[0][1]+(e[1][1]-e[0][1])/2+m.height/2-3:0;else if(f)_=e[0][1]+(o.data_labels.centered?0:m.height+5);else if(c)_=(e[0][0]+e[2][0]+m.height*.6)/2;else if(_=e[2][1],K(p)&&p>5&&(i.isLineType(t)||i.isScatterType(t))&&(g+=o.point_r/2.3),h<0||h===0&&!s.hasPositiveValue&&s.hasNegativeValue)_+=l?u?-3:-5:m.height+(u?-g:g);else{var v=-g*2;u?v=-g:i.isBubbleType(t)&&(v=g),l&&(v=u?10:15),_+=v}return(!c||f)&&(_+=i.getCenteredTextPos(t,e,n,`y`,r)),_+ji.call(this,t,`y`)},markOverlapped:function(e,t,n){var r=t.$el.arcs.selectAll(n),i=r.filter(function(t){return t.data.id!==e}),a=r.filter(function(t){return t.data.id===e}),o=gr(a.node()),s=function(e,t){return Math.sqrt(e**2+t**2)};a.node()&&i.each(function(){var e=gr(this),t=A(this),n=s(o.e,o.f)>s(e.e,e.f)?a:t,r=Math.ceil(Math.abs(o.e-e.e))<Math.ceil(n.node().getComputedTextLength()),i=Math.ceil(Math.abs(o.f-e.f))<parseInt(a.style(`font-size`),10);t.classed(V.TextOverlapping,r&&i)})},undoMarkOverlapped:function(e,t){e.$el.arcs.selectAll(t).each(function(){We([this,this.previousSibling]).classed(V.TextOverlapping,!1)})}};function zi(e,t){e===void 0&&(e=`left`);var n=K(t);return e.indexOf(`center`)>-1?n?t/2:`middle`:e.indexOf(`right`)>-1?n?t:`end`:n?0:`start`}var Bi={initTitle:function(){var e=this,t=e.config,n=e.$el;t.title_text&&(n.title=n.svg.append(`g`),Zn(n.title.append(`text`).style(`text-anchor`,zi(t.title_position)).attr(`class`,V.title),t.title_text,[.3,1.5]))},redrawTitle:function(){var e=this,t=e.config,n=e.state.current,r=e.$el.title;if(r){var i=zi(t.title_position,n.width),a=(t.title_padding.top||0)+e.getTextRect(e.$el.title,V.title).height;r.attr(`transform`,`translate(${i}, ${a})`)}},getTitlePadding:function(){var e=this,t=e.$el.title,n=e.config;return(n.title_padding.top||0)+(t?e.getTextRect(t,V.title).height:0)+(n.title_padding.bottom||0)}},Vi={initTooltip:function(){var e=this,t=e.config,n=e.$el;n.tooltip=A(t.tooltip_contents.bindto),n.tooltip.empty()&&(n.tooltip=n.chart.append(`div`).attr(`class`,tn.tooltipContainer).style(`position`,`absolute`).style(`pointer-events`,`none`).style(`display`,`none`)),e.bindTooltipResizePos()},initShowTooltip:function(){var e,t=this,n=t.config,r=t.$el,i=t.state,a=i.hasAxis,o=i.hasRadar;if(n.tooltip_init_show){var s=!(a||o);t.axis?.isTimeSeries()&&G(n.tooltip_init_x)&&(n.tooltip_init_x=wr.call(t,n.tooltip_init_x)),t.api.tooltip.show({data:(e={},e[s?`index`:`x`]=n.tooltip_init_x,e)});var c=n.tooltip_init_position;if(!n.tooltip_contents.bindto&&!qn(c)){var l=c.top,u=l===void 0?0:l,d=c.left,f=d===void 0?50:d;r.tooltip.style(`top`,G(u)?u:`${u}px`).style(`left`,G(f)?f:`${f}px`).style(`display`,null)}}},getTooltipHTML:function(){var e=[...arguments],t=this,n=t.api,r=t.config;return Rn(W(r.tooltip_contents)?r.tooltip_contents.bind(n).apply(void 0,e):t.getTooltipContent.apply(t,e))},getTooltipContent:function(e,t,n,r){var i=this,a=i.api,o=i.config,s=i.state,c=i.$el,l=[`title`,`name`,`value`].map(function(e){var t=o[`tooltip_format_${e}`];return W(t)?t.bind(a):t}),u=l[0],d=l[1],f=l[2],p=function(){var e=[...arguments];return(u||t).apply(void 0,e)},m=function(){var e=[...arguments];return(d||(function(e){return e})).apply(void 0,e)},h=function(e,t,r,a){var o=f;return o||=s.hasTreemap||i.isStackNormalized()&&(!i.isStackNormalizedPerGroup()||i.isGrouped(r))?function(e,t){return`${(t*100).toFixed(2)}%`}:n,o(e,t,r,a)},g=o.tooltip_order,_=function(e){return i.axis&&i.isBubbleZType(e)?i.getBubbleZData(e.value,`z`):i.getBaseValue(e)},v=i.levelColor?function(e){return i.levelColor(e.value)}:function(e){return r(e)},y=o.tooltip_contents,b=y.template,x=i.mapToTargetIds();if(g===null&&o.data_groups.length){var S=i.orderTargets(i.data.targets).map(function(e){return e.id}).reverse();e.sort(function(e,t){var n=e?e.value:null,r=t?t.value:null;return n>0&&r>0&&(n=e.id?S.indexOf(e.id):null,r=t.id?S.indexOf(t.id):null),n-r})}else if(/^(asc|desc)$/.test(g)){var C=g===`asc`;e.sort(function(e,t){var n=e?_(e):null,r=t?_(t):null;return C?n-r:r-n})}else W(g)&&e.sort(g.bind(a));var w=i.getTooltipContentTemplate(b),T=e.length,E,D,O,k,ee,te=function(){if(D=e[ee],!D||!(_(D)||_(D)===0))return`continue`;if(q(E)){var t=(s.hasAxis||s.hasRadar)&&p(D.x);E=Cr(w[0],{CLASS_TOOLTIP:tn.tooltip,TITLE:U(t)?b?t:`<tr><th colspan="2">${t}</th></tr>`:``})}if(!D.ratio&&c.arcs&&(O=[`arc`,i.$el.arcs.select(`path.${F.arc}-${D.id}`).data()[0]],D.ratio=i.getRatio.apply(i,O)),O=[D.ratio,D.id,D.index],i.isAreaRangeType(D)){var n=[`high`,`low`].map(function(e){return h.apply(void 0,N([i.getRangedData(D,e)],O,!1))}),r=n[0],a=n[1];k=`<b>Mid:</b> ${h.apply(void 0,N([_(D)],O,!1))} <b>High:</b> ${r} <b>Low:</b> ${a}`}else if(i.isCandlestickType(D)){var o=[`open`,`high`,`low`,`close`,`volume`].map(function(e){return i.getRangedData(D,e,`candlestick`)?h.apply(void 0,N([i.getRangedData(D,e,`candlestick`)],O,!1)):void 0}),l=o[0],r=o[1],a=o[2],u=o[3],d=o[4];k=`<b>Open:</b> ${l} <b>High:</b> ${r} <b>Low:</b> ${a} <b>Close:</b> ${u}${d?` <b>Volume:</b> ${d}`:``}`}else if(i.isBarRangeType(D)){var f=D.value,g=D.id,S=D.index;k=`${h(f,void 0,g,S)}`}else k=h.apply(void 0,N([_(D)],O,!1));if(k!==void 0){if(D.name===null)return`continue`;var C=m.apply(void 0,N([D.name??D.id],O,!1)),T=v(D),te={CLASS_TOOLTIP_NAME:tn.tooltipName+i.getTargetSelectorSuffix(D.id),COLOR:b||!i.patterns?T:`<svg><rect style="fill:${T}" width="10" height="10"></rect></svg>`,NAME:C,VALUE:k};if(b&&Z(y.text)){var ne=x.indexOf(D.id);Object.keys(y.text).forEach(function(e){te[e]=y.text[e][ne]})}E+=Cr(w[1],te)}};for(ee=0;ee<T;ee++)te();return`${E}</table>`},getTooltipContentTemplate:function(e){return(e||`<table class="{=CLASS_TOOLTIP}"><tbody>
18
+ {=TITLE}
19
+ {{<tr class="{=CLASS_TOOLTIP_NAME}">
20
+ <td class="name">${this.patterns?`{=COLOR}`:`<span style="background-color:{=COLOR}"></span>`}{=NAME}</td>
21
+ <td class="value">{=VALUE}</td>
22
+ </tr>}}
23
+ </tbody></table>`).replace(/(\r?\n|\t)/g,``).split(/{{(.*)}}/)},setTooltipPosition:function(e,t){var n=this,r=n.config,i=n.scale,a=n.state,o=n.$el,s=o.eventRect,c=o.tooltip,l=o.svg,u=r.tooltip_contents.bindto,d=r.axis_rotated,f=c?.datum();if(!u&&f){var p=e??JSON.parse(f.current),m=er(a.event,t??s?.node()),h={x:m[0],y:m[1]};if(a.hasAxis&&i.x&&f&&`x`in f){var g=function(e,t,r){e===void 0&&(e=0),r===void 0&&(r=`y`);var o=i[t?n.axis?.getId(t):r];return o?o(e)+(d?a.margin.left:a.margin.top):0};h.xAxis=i.x(f.x)+(r.tooltip_position?d?a.margin.top:a.margin.left:0),p.length===1?h.yAxis=g(p[0].value,p[0].id):h.yAxis=g}var _=f.width,v=_===void 0?0:_,y=f.height,b=y===void 0?0:y,x=r.tooltip_position?.bind(n.api)(p,v,b,s?.node(),h)??(Tr(l)?n.getTooltipPositionViewBox.bind(n)(v,b,h):n.getTooltipPosition.bind(n)(v,b,h));[`top`,`left`].forEach(function(e){var t=x[e];c.style(e,`${t}px`),e===`left`&&!f.xPosInPercent&&(f.xPosInPercent=t/a.current.width*100)})}},getTooltipPositionViewBox:function(e,t,n){var r=this,i=r.$el,a=i.eventRect,o=i.svg,s=r.config,c=r.state,l=s.axis_rotated,u=r.hasArcType()||c.hasFunnel||c.hasTreemap,d=(u?o:a)?.node()??c.event.target,f=n.x,p=n.y;c.hasAxis&&(f=l?f:n.xAxis,p=l?n.xAxis:p);var m=hr(d,f,p,!1),h=nr(d),g=hr(d,20,0,!1).x,_=m.y,v=m.x+e/2+g;return u&&(c.hasFunnel||c.hasTreemap||c.hasRadar?(v-=e/2+g,_+=t):(_+=h.height/2,v+=h.width/2-(e-g))),v+e>h.width&&(v=h.width-e-g),_+t>h.height&&(_-=t*2),{top:_,left:v}},getTooltipPosition:function(e,t,n){var r=this,i=r.config,a=r.scale,o=r.state,s=o.width,c=o.height,l=o.current,u=o.hasFunnel,d=o.hasRadar,f=o.hasTreemap,p=o.isLegendRight,m=o.inputType,h=r.hasType(`gauge`)&&!i.gauge_fullCircle,g=i.axis_rotated,_=r.hasArcType(),v=r.getSvgLeft(!0),y=v+l.width-r.getCurrentPaddingByDirection(`right`),b=20,x=n.x,S=n.y;if(d)x+=x>=s/2?15:-(e+15),S+=15;else if(_){if(m!==`touch`){var C=r.getTitlePadding?.call(r)??0;C&&h&&i.arc_rangeText_values?.length&&(C+=10),x+=(s-(p?r.getLegendWidth():0))/2,S+=(h?c:c/2+t)+C}}else if(u||f)S+=t;else{var w={top:r.getCurrentPaddingByDirection(`top`,!0),left:r.getCurrentPaddingByDirection(`left`,!0)};g?(x+=v+w.left+b,S=w.top+n.xAxis+b,y-=v):(x=v+w.left+b+(a.zoom?x:n.xAxis),S+=w.top-5)}if(x+e+15>y&&(x-=e+(u||f||_?0:g?b*2:38)),S+t>l.height){var T=f?t+10:30;S-=h?t*1.5:t+T}var E={top:S,left:x};return Object.keys(E).forEach(function(e){E[e]<0&&(E[e]=0)}),E},showTooltip:function(e,t){var n=this,r=n.config,i=n.$el.tooltip,a=e.filter(function(e){return e&&U(n.getBaseValue(e))});if(!(!i||a.length===0||!r.tooltip_show)){var o=i.datum(),s=JSON.stringify(e);if(!o||o.current!==s){var c=e.concat().sort()[0],l=c.index,u=c.x;Q(r.tooltip_onshow,n.api,e),i.html(n.getTooltipHTML(e,n.axis?n.axis.getXAxisTickFormat():n.categoryName.bind(n),n.getDefaultValueFormat(),n.color)).style(`display`,null).style(`visibility`,null).datum(o={index:l,x:u,current:s,width:i.property(`offsetWidth`),height:i.property(`offsetHeight`)}),Q(r.tooltip_onshown,n.api,e),n._handleLinkedCharts(!0,l)}n.setTooltipPosition(a,t)}},bindTooltipResizePos:function(){var e=this,t=e.resizeFunction,n=e.state,r=e.$el.tooltip;t.add(function(){if(r.style(`display`)===`block`){var e=n.current,t=r.datum(),i=t.width,a=t.xPosInPercent,o=e.width/100*a,s=e.width-(o+i);s<0&&(o+=s),r.style(`left`,`${o}px`)}})},hideTooltip:function(e){var t=this,n=t.api,r=t.config,i=t.$el.tooltip;if(i&&i.style(`display`)!==`none`&&(!r.tooltip_doNotHide||e)){var a=JSON.parse(i.datum().current??{});Q(r.tooltip_onhide,n,a),i.style(`display`,`none`).datum(null),Q(r.tooltip_onhidden,n,a)}},_handleLinkedCharts:function(e,t){var n=this,r=n.charts,i=n.config;if(n.state.event?.isTrusted&&i.tooltip_linked&&r.length>1){var a=i.tooltip_linked_name;r.filter(function(e){return e!==n.api}).forEach(function(n){var r=n.internal,i=r.config,o=r.$el,s=i.tooltip_linked,c=i.tooltip_linked_name,l=mn.body.contains(o.chart.node());if(s&&a===c&&l){var u=t!==o.tooltip.data()[0]?.index;try{n.tooltip[e&&u?`show`:`hide`]({index:t})}catch{}}})}},updateTooltipOnRedraw:function(e,t){var n=this,r=n.config,i=n.$el,a=i.eventRect,o=i.svg,s=i.tooltip,c=n.state,l=c.event,u=c.hasAxis,d=c.hasRadar,f=c.hasTreemap;if(s?.style(`display`)===`block`&&l){var p=e??(d?o:a)?.node();if(u||d)if(n.isMultipleX())n.selectRectForMultipleXs(p,!1);else{var m=t??n.getDataIndexFromEvent(l);t===-1?n.api.tooltip.hide():(n.selectRectForSingle(p,m),n.setExpand(m,null,!0))}else{var h=l.clientX,g=l.clientY;setTimeout(function(){var e=[h,g].every(Number.isFinite)&&mn.elementFromPoint(h,g),t=e&&A(e).datum();if(t){var r=n.hasArcType()?n.convertToArcData(n.updateAngle(t)):t?.data;f&&(e=o.node()),r&&n.showTooltip([r],e)}else n.api.tooltip.hide()},r.transition_duration)}}}},Hi={getTranslate:function(e,t){t===void 0&&(t=0);var n=this,r=n.config,i=n.state,a=r.axis_rotated,o=0,s,c;if(t&&/^(x|y2?)$/.test(e)&&(o=n.getAxisSize(e)*t),e===`main`)s=Un(i.margin.left),c=Un(i.margin.top);else if(e===`context`)s=Un(i.margin2.left),c=Un(i.margin2.top);else if(e===`legend`)s=i.margin3.left,c=i.margin3.top;else if(e===`x`)s=a?-o:0,c=a?0:i.height+o;else if(e===`y`)s=a?0:-o,c=a?i.height+o:0;else if(e===`y2`)s=a?0:i.width+o,c=a?-o-1:0;else if(e===`subX`)s=0,c=a?0:i.height2;else if(e===`arc`)s=i.arcWidth/2,c=i.arcHeight/2,r.arc_rangeText_values?.length&&(c+=5+(n.hasType(`gauge`)&&r.title_text?10:0));else if(e===`polar`)s=i.arcWidth/2,c=i.arcHeight/2;else if(e===`radar`){var l=n.getRadarSize(),u=l[0],d=l[1];s=i.width/2-u,c=i.height/2-d}return`translate(${s}, ${c})`},transformMain:function(e,t){var n=this,r=n.$el.main,i=n.$T,a=t?.axisX?t.axisX:i(r.select(`.${Ht.axisX}`),e),o=t?.axisY?t.axisY:i(r.select(`.${Ht.axisY}`),e),s=t?.axisY2?t.axisY2:i(r.select(`.${Ht.axisY2}`),e);i(r,e).attr(`transform`,n.getTranslate(`main`)),a.attr(`transform`,n.getTranslate(`x`)),o.attr(`transform`,n.getTranslate(`y`)),s.attr(`transform`,n.getTranslate(`y2`)),r.select(`.${F.chartArcs}`).attr(`transform`,n.getTranslate(`arc`))},transformAll:function(e,t){var n=this,r=n.config,i=n.state,a=i.hasAxis,o=i.hasFunnel,s=i.hasTreemap,c=n.$el;!o&&!s&&n.transformMain(e,t),a&&r.subchart_show&&n.transformContext(e,t),c.legend&&n.transformLegend(e)}},Ui={isValidChartType:function(e){return!!(e&&Object.values($).indexOf(e)>-1)},setTargetType:function(e,t){var n=this,r=n.config,i=n.state.withoutFadeIn;n.mapToTargetIds(e).forEach(function(e){i[e]=t===r.data_types[e],r.data_types[e]=t}),e||(r.data_type=t)},updateTypesElements:function(){var e=this,t=e.state.current;Object.keys($).forEach(function(n){var r=$[n],i=e.hasType(r,null,!0),a=t.types.indexOf(r);a===-1&&i?t.types.push(r):a>-1&&!i&&t.types.splice(a,1)}),e.setChartElements()},hasType:function(e,t,n){n===void 0&&(n=!1);var r=this,i=r.config,a=r.state.current,o=i.data_types,s=t||r.data.targets,c=!1;return!n&&a.types?.indexOf(e)>-1?c=!0:s?.length?s.forEach(function(t){var n=o[t.id];(n===e||!n&&e===`line`)&&(c=!0)}):Object.keys(o).length?Object.keys(o).forEach(function(t){o[t]===e&&(c=!0)}):c=i.data_type===e,c},hasTypeOf:function(e,t,n){var r=this;return n===void 0&&(n=[]),e in Br?!Br[e].filter(function(e){return n.indexOf(e)===-1}).every(function(e){return!r.hasType(e,t)}):!1},isTypeOf:function(e,t){var n=G(e)?e:e.id,r=this.config&&(this.config.data_types?.[n]||this.config.data_type);return X(t)?t.indexOf(r)>=0:r===t},hasPointType:function(){var e=this;return e.hasTypeOf(`Line`)||e.hasType(`bubble`)||e.hasType(`scatter`)},hasArcType:function(e,t){return this.hasTypeOf(`Arc`,e,t)},hasMultiArcGauge:function(){return this.hasType(`gauge`)&&this.config.gauge_type===`multi`},isLineType:function(e){var t=G(e)?e:e.id;return!this.config.data_types[t]||this.isTypeOf(t,Br.Line)},isStepType:function(e){return this.isTypeOf(e,Br.Step)},isSplineType:function(e){return this.isTypeOf(e,Br.Spline)},isAreaType:function(e){return this.isTypeOf(e,Br.Area)},isAreaRangeType:function(e){return this.isTypeOf(e,Br.AreaRange)},isBarType:function(e){return this.isTypeOf(e,`bar`)},isBubbleType:function(e){return this.isTypeOf(e,`bubble`)},isCandlestickType:function(e){return this.isTypeOf(e,`candlestick`)},isScatterType:function(e){return this.isTypeOf(e,`scatter`)},isTreemapType:function(e){return this.isTypeOf(e,`treemap`)},isPieType:function(e){return this.isTypeOf(e,`pie`)},isFunnelType:function(e){return this.isTypeOf(e,`funnel`)},isGaugeType:function(e){return this.isTypeOf(e,`gauge`)},isDonutType:function(e){return this.isTypeOf(e,`donut`)},isPolarType:function(e){return this.isTypeOf(e,`polar`)},isRadarType:function(e){return this.isTypeOf(e,`radar`)},isArcType:function(e){return this.isPieType(e)||this.isDonutType(e)||this.isGaugeType(e)||this.isPolarType(e)||this.isRadarType(e)},isCirclePoint:function(e){var t=this.config,n=t.point_pattern,r=!1;return r=e?.tagName===`circle`?!0:t.point_type===`circle`&&(!n||X(n)&&n.length===0),r},lineData:function(e){return this.isLineType(e)?[e]:[]},arcData:function(e){return this.isArcType(e.data)?[e]:[]},labelishData:function(e){return this.isBarType(e)||this.isLineType(e)||this.isScatterType(e)||this.isBubbleType(e)||this.isCandlestickType(e)||this.isFunnelType(e)||this.isRadarType(e)||this.isTreemapType(e)?e.values.filter(function(e){return K(e.value)||!!e.value}):[]},barLineBubbleData:function(e){return this.isBarType(e)||this.isLineType(e)||this.isBubbleType(e)?e.values:[]},isInterpolationType:function(e){return[`basis`,`basis-closed`,`basis-open`,`bundle`,`cardinal`,`cardinal-closed`,`cardinal-open`,`catmull-rom`,`catmull-rom-closed`,`catmull-rom-open`,`linear`,`linear-closed`,`monotone-x`,`monotone-y`,`natural`].indexOf(e)>=0}};function Wi(e){var t=this,n;return t.isLineType(e)?n=t.generateGetLinePoints(t.getShapeIndices(t.isLineType)):t.isBarType(e)&&(n=t.generateGetBarPoints(t.getShapeIndices(t.isBarType))),n}var Gi={getDrawShape:function(){var e=this,t=e.config.axis_rotated,n=e.state,r=n.hasRadar,i=n.hasTreemap,a={type:{},indices:{},pos:{}};if(!i&&[`bar`,`candlestick`,`line`,`area`].forEach(function(t){var n=lr(/^(bubble|scatter)$/.test(t)?`line`:t);if(e.hasType(t)||e.hasTypeOf(n)||t===`line`&&(e.hasType(`bubble`)||e.hasType(`scatter`))){var r=e.getShapeIndices(e[`is${n}Type`]),i=e[`generateDraw${n}`];a.indices[t]=r,a.type[t]=i?i.bind(e)(r,!1):void 0}}),!e.hasArcType()||r||i){var o=void 0,s=void 0;i||(o=r?e.radarCircleX:t?e.circleY:e.circleX,s=r?e.radarCircleY:t?e.circleX:e.circleY),a.pos={xForText:e.generateXYForText(a.indices,!0),yForText:e.generateXYForText(a.indices,!1),cx:(o||function(){}).bind(e),cy:(s||function(){}).bind(e)}}return a},getShapeIndices:function(e){var t=this,n=t.config,r=n.data_xs,i=Y(r),a={},o=i?{}:0;return i&&_r(Object.keys(r).map(function(e){return r[e]})).forEach(function(e){o[e]=0,a[e]={}}),t.filterTargetsToShow(t.data.targets.filter(e,t)).forEach(function(e){for(var t=(e.id in r)?r[e.id]:``,i=t?a[t]:a,s=0,c=void 0;c=n.data_groups[s];s++)if(!(c.indexOf(e.id)<0))for(var l=0,u=void 0;u=c[l];l++){if(u in i){i[e.id]=i[u];break}e.id!==u&&t&&(i[u]=i[e.id]??o[t])}q(i[e.id])&&(i[e.id]=t?o[t]++:o++,i.__max__=(t?o[t]:o)-1)}),a},getIndices:function(e,t,n){var r=this,i=r.config,a=i.data_xs,o=i.bar_indices_removeNull,s=t.id,c=t.index;if(r.isBarType(s)&&o){var l={};return r.getAllValuesOnIndex(c,!0).forEach(function(e,t){l[e.id]=t,l.__max__=t}),l}return Y(a)?e[a[s]]:e},getIndicesMax:function(e){return Y(this.config.data_xs)?Object.keys(e).map(function(t){return e[t].__max__||0}).reduce(function(e,t){return e+t}):e.__max__},getShapeX:function(e,t,n){var r=this,i=r.config,a=r.scale,o=n?a.subX:a.zoom||a.x,s=i.bar_overlap,c=i.bar_padding,l=function(e,t){return e+t},u=Gn(e)&&(e._$total.length?e._$total.reduce(l)/2:0);return function(n){var i=r.getIndices(t,n,`getShapeX`),a=n.id in i?i[n.id]:0,d=(i.__max__||0)+1,f=0;if(Y(n.x)){var p=o(n.x,!0);if(u){var m=e[n.id]||e._$width;f=s?p-m/2:p-m+e._$total.slice(0,a+1).reduce(l)-u}else f=p-(K(e)?e:e._$width)*(d/2-(s?1:a))}return e&&f&&d>1&&c&&(a&&(f+=c*a),d>2?f-=(d-1)*c/2:d===2&&(f-=c/2)),f}},getShapeY:function(e){var t=this,n=t.isStackNormalized();return function(r){var i=r.value;return K(r)?i=r:t.isAreaRangeType(r)?i=t.getBaseValue(r,`mid`):n?i=t.getRatio(`index`,r,!0):t.isBubbleZType(r)?i=t.getBubbleZData(r.value,`y`):t.isBarRangeType(r)&&(i=i[1]),t.getYScaleById(r.id,e)(i)}},getShapeYMin:function(e){var t=this,n=t.axis.getId(e),r=t.scale[n].domain()[0],i=t.config[`axis_${n}_inverted`];return!t.isGrouped(e)&&!i&&r>0?r:0},getShapeOffsetData:function(e){var t=this,n=t.orderTargets(t.filterTargetsToShow(t.data.targets.filter(e,t))),r=n.map(function(e){return e.id}).join(`_`),i=`${Lr.shapeOffset}_${r}`,a=t.cache.get(i);if(a)return a;var o=t.isStackNormalized(),s=n.map(function(e){var n=e.values,r={};t.isStepType(e)&&(n=t.convertValuesToStep(n));var i=n.reduce(function(e,n){var i=Number(n.x);return e[i]=n,r[i]=o?t.getRatio(`index`,n,!0):n.value,e},{});return{id:e.id,rowValues:n,rowValueMapByXValue:i,values:r}}),c={indexMapByTargetId:n.reduce(function(e,t,n){var r=t.id;return e[r]=n,e},{}),shapeOffsetTargets:s};return t.cache.add(i,c),c},getShapeOffset:function(e,t,n){var r=this,i=r.getShapeOffsetData(e),a=i.shapeOffsetTargets,o=i.indexMapByTargetId,s=r.config.data_groupsZeroAs;return function(e,i){var c=e.id,l=e.value,u=e.x,d=r.getIndices(t,e),f=r.getYScaleById(c,n);if(r.isBarRangeType(e))return f(l[0]);var p=Number(u),m=f(s===`zero`?0:r.getShapeYMin(c)),h=m;return a.filter(function(e){return e.id!==c&&d[e.id]===d[c]}).forEach(function(e){var t=e.id,n=e.rowValueMapByXValue,r=e.rowValues,a=e.values;if(o[t]<o[c]){var u=a[p],d=r[i];(!d||Number(d.x)!==p)&&(d=n[p]),d?.value*l>=0&&K(u)&&(l!==0||s===`positive`&&u>0||s===`negative`&&u<0)&&(h+=f(u)-m)}}),h}},circleY:function(e,t){var n=this,r=e.id,i;return n.isGrouped(r)&&(i=Wi.bind(n)(e)),i?i(e,t)[0][1]:n.getYScaleById(r)(n.getBaseValue(e))},getBarW:function(e,t,n){var r=this,i=r.config,a=r.org,o=r.scale,s=r.state,c=r.getMaxDataCount(),l=e===`bar`&&i.data_groups?.length,u=`${e}_width`,d=(r.getZoomTransform?.call(r)??{k:1}).k,f=[i.axis_x_min??a.xDomain[0],i.axis_x_max??a.xDomain[1]].map(r.axis.isTimeSeries()?wr.bind(r):Number),p=t.tickInterval(c);if(o.zoom&&!r.axis.isCategorized()&&d>1){var m=f.every(function(e,t){return e===a.xDomain[t]});p=a.xDomain.map(function(e,t){var n=m?e:e-Math.abs(f[t]);return o.zoom(n)}).reduce(function(e,t){return Math.abs(e)+t})/c}var h=function(e){var t=e?i[u][e]:i[u],a=e?t.ratio:i[`${u}_ratio`],o=e?t.max:i[`${u}_max`],l=K(t)?t:W(t)?t.call(r,s.width,n,c):n?p*a/n:0;return o&&l>o?o:l},g=h();return!l&&Gn(i[u])&&(g={_$width:g,_$total:[]},r.filterTargetsToShow(r.data.targets).forEach(function(e){i[u][e.id]&&(g[e.id]=h(e.id),g._$total.push(g[e.id]||g._$width))})),g},getShapeByIndex:function(e,t,n){var r=this,i=r.$el,a=U(t)?`-${t}`:``,o=i[e];return o=o&&!o.empty()?o.filter(function(e){return n?e.id===n:!0}).filter(function(e){return U(t)?e.index===t:!0}):(n?i.main.selectAll(`.${nn[`${e}s`]}${r.getTargetSelectorSuffix(n)}`):i.main).selectAll(`.${nn[e]}${a}`),o},isWithinShape:function(e,t){var n=this,r=A(e),i;return n.isTargetToShow(t.id)?n.hasValidPointType?.call(n,e.nodeName)?i=n.isStepType(t)?n.isWithinStep(e,n.getYScaleById(t.id)(n.getBaseValue(t))):n.isWithinCircle(e,n.isBubbleType(t)?n.pointSelectR(t)*1.5:0):e.nodeName===`path`&&(i=r.classed(nn.bar)?n.isWithinBar(e):!0):i=!1,i},getInterpolate:function(e){var t=this.getInterpolateType(e);return{basis:ue,"basis-closed":_e,"basis-open":ve,bundle:xe,cardinal:Te,"cardinal-closed":ge,"cardinal-open":me,"catmull-rom":je,"catmull-rom-closed":be,"catmull-rom-open":pe,"monotone-x":de,"monotone-y":we,natural:ye,"linear-closed":Oe,linear:Ne,step:Ee,"step-after":ke,"step-before":Se}[t]},getInterpolateType:function(e){var t=this,n=t.config,r=n.spline_interpolation_type,i=t.isInterpolationType(r)?r:`cardinal`;return t.isSplineType(e)?i:t.isStepType(e)?n.line_step_type:`linear`},isWithinBar:function(e){var t=er(this.state.event,e),n=Qn(e),r=n[0],i=n[1],a=Math.min(r.x,i.x),o=Math.min(r.y,i.y),s=this.config.bar_sensitivity,c=rr(e,!0),l=c.width,u=c.height,d=a-s,f=a+l+s,p=o+u+s,m=o-s;return d<t[0]&&t[0]<f&&m<t[1]&&t[1]<p}},Ki=function(){function e(e){this.data={xs:{},targets:[]},this.scale={x:null,y:null,y2:null,subX:null,subY:null,subY2:null,zoom:null},this.org={xScale:null,xDomain:null},this.format={extraLineClasses:null,xAxisTick:null,dataTime:null,defaultAxisTime:null,axisTime:null};var t=this;t.api=e,t.config=new Pr,t.cache=new Rr;var n=new Ir;t.$el=n.getStore(`element`),t.state=n.getStore(`state`),t.$T=t.$T.bind(t)}return e.prototype.$T=function(e,t,n){var r=this,i=r.config,a=r.state,o=i.transition_duration,s=i.subchart_show,c=e;return c&&=(`tagName`in c&&(c=A(c)),(t!==!1&&o||t)&&(!a.zooming||a.dragging)&&!a.resizing&&a.rendered&&!s?c.transition(n).duration(o):c),c},e.prototype.beforeInit=function(){var e=this;e.callPluginHook(`$beforeInit`),Q(e.config.onbeforeinit,e.api)},e.prototype.afterInit=function(){var e=this;e.callPluginHook(`$afterInit`),Q(e.config.onafterinit,e.api)},e.prototype.init=function(){var e=this,t=e.config,n=e.state,r=e.$el,i=t.boost_useCssRule,a=t.bindto;Vr(e);var o=e.hasArcType();if(n.hasRadar=!n.hasAxis&&e.hasType(`radar`),n.hasFunnel=!n.hasAxis&&e.hasType(`funnel`),n.hasTreemap=!n.hasAxis&&e.hasType(`treemap`),n.hasAxis=!o&&!n.hasFunnel&&!n.hasTreemap,n.datetimeId=`bb-${+new Date*ir()}`,i){var s=mn.createElement(`style`);s.type=`text/css`,mn.head.appendChild(s),n.style={rootSelctor:`.${n.datetimeId}`,sheet:s.sheet},r.style=s}var c={element:a,classname:`bb`};Z(a)&&(c.element=a.element||`#chart`,c.classname=a.classname||c.classname),r.chart=W(c.element.node)?a.element:A(c.element||[]),r.chart.empty()&&(r.chart=A(mn.body.appendChild(mn.createElement(`div`)))),r.chart.html(``).classed(c.classname,!0).classed(n.datetimeId,i).style(`position`,`relative`),e.initParams(),e.initToRender()},e.prototype.initToRender=function(e){var t=this,n=t.config,r=t.state,i=t.$el.chart,a=function(){return Er(i,{display:`none`,visibility:`hidden`})},o=n.render.lazy===!1?!1:n.render.lazy||a(),s=H.MutationObserver;o&&s&&n.render.observe!==!1&&!e&&new s(function(e,n){a()||(n.disconnect(),!r.rendered&&t.initToRender(!0))}).observe(i.node(),{attributes:!0,attributeFilter:[`class`,`style`]}),(!o||e)&&t.convertData(n,function(e){t.initWithData(e),t.afterInit()})},e.prototype.initParams=function(){var e=this,t=e.config,n=e.format,r=e.state;if(e.color=e.generateColor(),e.levelColor=e.generateLevelColor(),t.padding===!1&&(t.axis_x_show=!1,t.axis_y_show=!1,t.axis_y2_show=!1,t.subchart_show=!1),(e.hasPointType()||e.hasLegendDefsPoint?.call(e))&&(e.point=e.generatePoint()),r.hasAxis){e.initClip(),n.extraLineClasses=e.generateExtraLineClass(),n.dataTime=t.data_xLocaltime?w:k,n.axisTime=t.axis_x_localtime?ee:x;var i=t.zoom_enabled&&t.zoom_type===`drag`;n.defaultAxisTime=function(t){var r=e.scale,a=r.x,o=r.zoom,s=i?o:o&&a.orgDomain().toString()!==o.domain().toString(),c=t.getMilliseconds()&&`.%L`||t.getSeconds()&&`.:%S`||t.getMinutes()&&`%I:%M`||t.getHours()&&`%I %p`||t.getDate()!==1&&`%b %d`||s&&t.getDate()===1&&`%b'%y`||t.getMonth()&&`%-m/%-d`||`%Y`;return n.axisTime(c)(t)}}var a=t.legend_position,o=t.legend_inset_anchor,s=t.axis_rotated;r.isLegendRight=a===`right`,r.isLegendInset=a===`inset`,r.isLegendTop=o===`top-left`||o===`top-right`,r.isLegendLeft=o===`top-left`||o===`bottom-left`,r.rotatedPadding.top=e.getResettedPadding(r.rotatedPadding.top),r.rotatedPadding.right=s&&!t.axis_x_show?0:30,r.inputType=Or(t.interaction_inputType_mouse,t.interaction_inputType_touch)},e.prototype.initWithData=function(e){var t,n,r=this,i=r.config,a=r.scale,o=r.state,s=r.$el,c=r.org,l=o.hasAxis,u=o.hasFunnel,d=o.hasTreemap,f=i.interaction_enabled,p=r.hasType(`polar`),m=i.data_labels_backgroundColors;if(l&&(r.axis=r.getAxisInstance(),i.zoom_enabled&&r.initZoom()),r.data.xs={},r.data.targets=r.convertDataToTargets(e),i.data_filter&&(r.data.targets=r.data.targets.filter(i.data_filter.bind(r.api))),i.data_hide&&r.addHiddenTargetIds(i.data_hide===!0?r.mapToIds(r.data.targets):i.data_hide),i.legend_hide&&r.addHiddenLegendIds(i.legend_hide===!0?r.mapToIds(r.data.targets):i.legend_hide),r.updateSizes(),r.updateScales(!0),l){var h=a.x,g=a.y,_=a.y2,v=a.subX,y=a.subY,b=a.subY2;h&&(h.domain(br(r.getXDomain(r.data.targets),!i.axis_x_inverted)),v.domain(h.domain()),c.xDomain=h.domain()),g&&(g.domain(r.getYDomain(r.data.targets,`y`)),y.domain(g.domain())),_&&(_.domain(r.getYDomain(r.data.targets,`y2`)),b&&b.domain(_.domain()))}if(s.svg=s.chart.append(`svg`).style(`overflow`,`hidden`).style(`display`,`block`),f&&o.inputType){var x=o.inputType===`touch`,S=i.onclick,C=i.onover,w=i.onout;s.svg.on(`click`,S?.bind(r.api)||null).on(x?`touchstart`:`mouseenter`,C?.bind(r.api)||null,x?{passive:!0}:void 0).on(x?`touchend`:`mouseleave`,w?.bind(r.api)||null)}i.svg_classname&&s.svg.attr(`class`,i.svg_classname);var T=W(i.color_tiles)&&r.patterns;(l||T||p||d||m||r.hasLegendDefsPoint?.call(r))&&(s.defs=s.svg.append(`defs`),l&&[`id`,`idXAxis`,`idYAxis`,`idGrid`].forEach(function(e){r.appendClip(s.defs,o.clip[e])}),r.generateTextBGColorFilter(m),T&&r.patterns.forEach(function(e){return s.defs.append(function(){return e.node})})),r.updateSvgSize(),r.bindResize();var E=s.svg.append(`g`).classed(P.main,!0).attr(`transform`,u||d?null:r.getTranslate(`main`));if(s.main=E,i.subchart_show&&r.initSubchart(),i.tooltip_show&&r.initTooltip(),i.title_text&&r.initTitle(),!d&&i.legend_show&&r.initLegend(),i.data_empty_label_text&&E.append(`text`).attr(`class`,`${V.text} ${P.empty}`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`),l&&(i.regions.length&&r.initRegion(),!i.clipPath&&r.axis.init()),E.append(`g`).classed(P.chart,!0).attr(`clip-path`,l?o.clip.path:null),r.callPluginHook(`$init`),r.initChartElements(),l&&(f&&((t=r.initEventRect)==null||t.call(r)),r.initGrid(),i.clipPath&&((n=r.axis)==null||n.init())),r.updateTargets(r.data.targets),r.updateDimension(),Q(i.oninit,r.api),r.setBackground(),r.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1,initializing:!0}),i.data_onmin||i.data_onmax){var D=r.getMinMaxData();Q(i.data_onmin,r.api,D.min),Q(i.data_onmax,r.api,D.max)}i.tooltip_show&&r.initShowTooltip(),o.rendered=!0},e.prototype.initChartElements=function(){var e=this,t=e.state,n=t.hasAxis,r=t.hasRadar,i=t.hasTreemap,a=[];if(n){var o=[`bar`,`bubble`,`candlestick`,`line`];e.config.bar_front&&o.push(o.shift());for(var s=0,c=o;s<c.length;s++){var l=c[s],u=lr(l);(l===`line`&&e.hasTypeOf(u)||e.hasType(l))&&a.push(u)}}else if(i)a.push(`Treemap`);else if(e.hasType(`funnel`))a.push(`Funnel`);else{var d=e.hasType(`polar`),f=e.hasType(`gauge`);r||a.push(`Arc`,`Pie`),f?a.push(`Gauge`):r?a.push(`Radar`):d&&a.push(`Polar`)}for(var p=0,m=a;p<m.length;p++)e[`init${m[p]}`]();Y(e.config.data_labels)&&!e.hasArcType(null,[`radar`])&&e.initText()},e.prototype.setChartElements=function(){var e=this,t=e.$el,n=t.chart,r=t.svg,i=t.defs,a=t.main,o=t.tooltip,s=t.legend,c=t.title,l=t.grid,u=t.needle,d=t.arcs,f=t.circle,p=t.bar,m=t.candlestick,h=t.line,g=t.area,_=t.text;e.api.$={chart:n,svg:r,defs:i,main:a,tooltip:o,legend:s,title:c,grid:l,arc:d,circles:f,bar:{bars:p},candlestick:m,line:{lines:h,areas:g},needle:u,text:{texts:_}}},e.prototype.setBackground=function(){var e=this,t=e.config.background,n=e.state,r=e.$el.svg;if(Y(t)){var i=r.select(`g`).insert(t.imgUrl?`image`:`rect`,`:first-child`);t.imgUrl?i.attr(`href`,t.imgUrl):t.color&&i.style(`fill`,t.color).attr(`clip-path`,n.clip.path),i.attr(`class`,t.class||null).attr(`width`,`100%`).attr(`height`,`100%`)}},e.prototype.updateTargets=function(e){var t,n,r=this,i=r.state,a=i.hasAxis,o=i.hasFunnel,s=i.hasRadar,c=i.hasTreemap,l=function(t){return r[`updateTargetsFor${t}`](e.filter(r[`is${t}Type`].bind(r)))};if(r.updateTargetsForText(e),a){for(var u=[`bar`,`candlestick`,`line`],d=0,f=u;d<f.length;d++){var p=f[d],m=lr(p);(p===`line`&&r.hasTypeOf(m)||r.hasType(p))&&l(m)}(t=r.updateTargetsForSubchart)==null||t.call(r,e)}else if(r.hasArcType(e)){var h=`Arc`;s?h=`Radar`:r.hasType(`polar`)&&(h=`Polar`),l(h)}else o?l(`Funnel`):c&&l(`Treemap`);var g=r.hasType(`bubble`)||r.hasType(`scatter`);g&&((n=r.updateTargetForCircle)==null||n.call(r)),r.filterTargetsToShowAtInit(g)},e.prototype.filterTargetsToShowAtInit=function(e){e===void 0&&(e=!1);var t=this,n=t.$el.svg,r=t.$T,i=`.${P.target}`;e&&(i+=`, .${I.chartCircles} > .${I.circles}`),r(n.selectAll(i).filter(function(e){return t.isTargetToShow(e.id)})).style(`opacity`,null)},e.prototype.getWithOption=function(e){for(var t={Dimension:!0,EventRect:!0,Legend:!1,Subchart:!0,Transform:!1,Transition:!0,TrimXDomain:!0,UpdateXAxis:`UpdateXDomain`,UpdateXDomain:!1,UpdateOrgXDomain:!1,TransitionForExit:`Transition`,TransitionForAxis:`Transition`,Y:!0},n=0,r=Object.entries(t);n<r.length;n++){var i=r[n],a=i[0],o=i[1],s=G(o)?t[o]:o;t[a]=Jn(e,`with${a}`,s)}return t},e.prototype.initialOpacity=function(e){var t=this,n=t.state.withoutFadeIn;return t.getBaseValue(e)!==null&&n[e.id]?null:`0`},e.prototype.bindResize=function(){var e=this,t=e.$el,n=e.config,r=e.state,i=Gr(n.resize_timer),a=n.resize_auto,o=[];o.push(function(){return Q(n.onresize,e.api)}),/^(true|parent)$/.test(a)&&o.push(function(){r.resizing=!0,n.legend_show&&(e.updateSizes(),e.updateLegend()),e.api.flush(!1)}),o.push(function(){Q(n.onresized,e.api),r.resizing=!1}),o.forEach(function(e){return i.add(e)}),e.resizeFunction=i,a===`parent`?(e.resizeFunction.resizeObserver=new ResizeObserver(e.resizeFunction.bind(e))).observe(t.chart.node().parentNode):H.addEventListener(`resize`,e.resizeFunction)},e.prototype.callPluginHook=function(e){for(var t=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];this.config.plugins.forEach(function(r){e===`$beforeInit`&&(r.$$=t,t.api.plugins.push(r)),r[e].apply(r,n)})},e}();cr(Ki.prototype,[oi,si,li,di,fi,gi,_i,ui,yi,Ci,wi,Ei,Gi,Di,Oi,Ri,Bi,Vi,Hi,Ui]);function qi(e){var t=this.config,n,r,i,a=function(){var e=r.shift();if(e&&n&&Gn(n)&&e in n)return n=n[e],a();if(!e)return n};Object.keys(t).forEach(function(o){n=e,r=o.split(`_`),i=a(),J(i)&&(t[o]=i)}),this.api&&(this.state.orgConfig=e)}var Ji={resize:function(e){var t=this.internal,n=t.config,r=t.state;r.rendered&&(n.size_width=e?e.width:null,n.size_height=e?e.height:null,r.resizing=!0,this.flush(!1),t.resizeFunction())},flush:function(e){var t,n,r=this.internal,i=r.state,a=r.$el.zoomResetBtn;i.rendered?(i.resizing?(t=r.brush)==null||t.updateResize():(n=r.axis)==null||n.setOrient(),a?.style(`display`,`none`),r.scale.zoom&&(i.current.zoomDomain=r.scale.zoom.domain()),r.scale.zoom=null,e?r.redraw({withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withLegend:!0}):r.updateAndRedraw({withLegend:!0,withTransition:!1,withTransitionForTransform:!1}),!i.resizing&&r.brush&&(r.brush.getSelection().call(r.brush.move),r.unselectRect()),i.current.zoomDomain&&(r.api.zoom(i.current.zoomDomain),i.current.zoomDomain=null)):r.initToRender(!0)},destroy:function(){var e=this,t,n=this.internal,r=n.$el,i=r.chart,a=r.style,o=r.svg;if(Y(n))for(var s in n.callPluginHook(`$willDestroy`),n.charts.splice(n.charts.indexOf(this),1),n.unbindAllEvents(),o.select(`*`).interrupt(),n.resizeFunction.clear(),(t=n.resizeFunction.resizeObserver)==null||t.disconnect(),H.removeEventListener(`resize`,n.resizeFunction),i.classed(`bb`,!1).style(`position`,null).selectChildren().remove(),a&&a.parentNode.removeChild(a),Object.keys(this).forEach(function(t){t===`internal`&&Object.keys(n).forEach(function(e){n[e]=null}),e[t]=null,delete e[t]}),this)this[s]=function(){};return null},config:function(e,t,n){var r=this.internal,i=r.config,a=r.state,o=e?.replace(/\./g,`_`),s;return e&&o in i?J(t)?(i[o]=t,s=t,n&&this.flush()):s=i[o]:(arguments.length===0||qn(e))&&(s=a.orgConfig),s}},Yi={color:function(e){return this.internal.color(e)}},Xi=function(e){var t=this.internal.data.targets;if(!q(e)){var n=X(e)?e:[e];return t.filter(function(e){return n.some(function(t){return t===e.id})})}return t};cr(Xi,{shown:function(e){return this.internal.filterTargetsToShow(this.data(e))},values:function(e,t){t===void 0&&(t=!0);var n=null;if(e){var r=this.data(e);X(r)&&(n=[],r.forEach(function(e){var r=e.values.map(function(e){return e.value});t?n=n.concat(r):n.push(r)}))}return n},names:function(e){return this.internal.updateDataAttributes(`names`,e)},colors:function(e){return this.internal.updateDataAttributes(`colors`,e)},axes:function(e){return this.internal.updateDataAttributes(`axes`,e)},min:function(){return this.internal.getMinMaxData().min},max:function(){return this.internal.getMinMaxData().max}});var Zi={data:Xi},Qi=function(e){return H.btoa?.call(H,encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(e,t){return String.fromCharCode(Number(`0x${t}`))}))};function $i(e,t,n){var r=t||n,i=r.width,a=r.height,o=new XMLSerializer,s=e.cloneNode(!0),c=pr(dr(mn.styleSheets)).filter(function(e){return e.cssText}).map(function(e){return e.cssText});s.setAttribute(`xmlns`,Ce.xhtml),s.style.margin=`0`,s.style.padding=`0`,t.preserveFontStyle&&s.querySelectorAll(`text`).forEach(function(e){e.innerHTML=``});var l=o.serializeToString(s),u=mn.createElement(`style`);u.appendChild(mn.createTextNode(c.join(`
24
+ `)));var d=o.serializeToString(u);return`data:image/svg+xml;base64,${Qi(`<svg xmlns="${Ce.svg}" width="${i}" height="${a}"
25
+ viewBox="0 0 ${n.width} ${n.height}"
26
+ preserveAspectRatio="${t?.preserveAspectRatio===!1?`none`:`xMinYMid meet`}">
27
+ <foreignObject width="100%" height="100%">
28
+ ${d}
29
+ ${l.replace(/(url\()[^#]+/g,`$1`)}
30
+ </foreignObject></svg>`)}`}function ea(e,t){var n=t.top,r=t.left,i=rr(e,!0),a=i.x,o=i.y,s=e.getScreenCTM(),c=s.a,l=s.b,u=s.c,d=s.d,f=s.e,p=s.f,m=nr(e,!0),h=m.width,g=m.height;return{x:c*a+u*o+f-r,y:l*a+d*o+p-n+(g-Math.round(g/4)),width:h,height:g}}function ta(e){var t=nr(e),n=t.left,r=t.top,i=function(e){return e.textContent||e.childElementCount},a=[];return dr(e.querySelectorAll(`text`)).filter(i).forEach(function(e){var t=function(e){var t,i=H.getComputedStyle(e),a=i.fill,o=i.fontFamily,s=i.fontSize,c=i.textAnchor,l=i.transform,u=ea(e,{left:n,top:r}),d=u.x,f=u.y,p=u.width,m=u.height;return t={},t[e.textContent]={x:d,y:f,width:p,height:m,fill:a,fontFamily:o,fontSize:s,textAnchor:c,transform:l},t};if(e.childElementCount>1)return dr(e.querySelectorAll(`tspan`)).filter(i).forEach(function(e){a.push(t(e))}),[];a.push(t(e))}),a}function na(e,t){t.forEach(function(t){Object.keys(t).forEach(function(n){var r=t[n],i=r.x,a=r.y,o=r.width,s=r.height,c=r.fill,l=r.fontFamily,u=r.fontSize,d=r.transform;if(e.save(),e.font=`${u} ${l}`,e.fillStyle=c,d===`none`)e.fillText(n,i,a);else{var f=d.replace(/(matrix|\(|\))/g,``).split(`,`);f.splice(4).every(function(e){return+e==0})?(f.push(i+o-o/4),f.push(a-s+s/3)):(f.push(i),f.push(a)),e.transform.apply(e,f),e.fillText(n,0,0)}e.restore()})})}var ra={export:function(e,t){var n=this,r=this.internal,i=r.state,a=r.$el,o=a.chart,s=a.svg,c=i.current,l=c.width,u=c.height,d=yr(Object.create(null),{width:l,height:u,preserveAspectRatio:!0,preserveFontStyle:!1,mimeType:`image/png`},e),f=$i(o.node(),d,{width:l,height:u}),p=d.preserveFontStyle?ta(s.node()):[];if(t&&W(t)){var m=new Image;m.crossOrigin=`Anonymous`,m.onload=function(){var e=mn.createElement(`canvas`),r=e.getContext(`2d`);e.width=d.width||l,e.height=d.height||u,r.drawImage(m,0,0),p.length&&=(na(r,p),0),t.bind(n)(e.toDataURL(d.mimeType))},m.src=f}return f}},ia={focus:function(e){var t=this.internal,n=t.state,r=t.mapToTargetIds(e),i=t.$el.svg.selectAll(t.selectorTargets(r.filter(t.isTargetToShow,t)));this.revert(),this.defocus(),i.classed(R.focused,!0).classed(R.defocused,!1),t.hasArcType()&&!n.hasRadar&&(t.expandArc(r),t.hasType(`gauge`)&&t.markOverlapped(e,t,`.${Jt.gaugeValue}`)),t.toggleFocusLegend(r,!0),n.focusedTargetIds=r,n.defocusedTargetIds=n.defocusedTargetIds.filter(function(e){return r.indexOf(e)<0})},defocus:function(e){var t=this.internal,n=t.state,r=t.mapToTargetIds(e);t.$el.svg.selectAll(t.selectorTargets(r.filter(t.isTargetToShow,t))).classed(R.focused,!1).classed(R.defocused,!0),t.hasArcType(null,[`polar`])&&(t.unexpandArc(r),t.hasType(`gauge`)&&t.undoMarkOverlapped(t,`.${Jt.gaugeValue}`)),t.toggleFocusLegend(r,!1),n.focusedTargetIds=n.focusedTargetIds.filter(function(e){return r.indexOf(e)<0}),n.defocusedTargetIds=r},revert:function(e){var t=this.internal,n=t.config,r=t.state,i=t.$el,a=t.mapToTargetIds(e);i.svg.selectAll(t.selectorTargets(a)).classed(R.focused,!1).classed(R.defocused,!1),t.hasArcType(null,[`polar`])&&t.unexpandArc(a),n.legend_show&&(t.showLegend(a.filter(t.isLegendToShow.bind(t))),i.legend.selectAll(t.selectorLegends(a)).filter(function(){return A(this).classed(R.legendItemFocused)}).classed(R.legendItemFocused,!1)),r.focusedTargetIds=[],r.defocusedTargetIds=[]}},aa={legend:{show:function(e){var t=this.internal;t.showLegend(t.mapToTargetIds(e)),t.updateAndRedraw({withLegend:!0})},hide:function(e){var t=this.internal;t.hideLegend(t.mapToTargetIds(e)),t.updateAndRedraw({withLegend:!0})}}},oa={load:function(e){var t=this.internal,n=t.config;e.xs&&t.addXs(e.xs),`names`in e&&this.data.names(e.names),`classes`in e&&Object.keys(e.classes).forEach(function(t){n.data_classes[t]=e.classes[t]}),`categories`in e&&t.axis.isCategorized()&&(n.axis_x_categories=e.categories),`axes`in e&&Object.keys(e.axes).forEach(function(t){n.data_axes[t]=e.axes[t]}),`colors`in e&&Object.keys(e.colors).forEach(function(t){n.data_colors[t]=e.colors[t]}),`unload`in e&&e.unload!==!1?t.unload(t.mapToTargetIds(e.unload===!0?null:e.unload),function(){_n(function(){return t.loadFromArgs(e)})}):t.loadFromArgs(e)},unload:function(e){var t=this.internal,n=e||{};qn(n)&&this.tooltip.hide(),X(n)?n={ids:n}:G(n)&&(n={ids:[n]});var r=t.mapToTargetIds(n.ids);t.unload(r,function(){t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),t.cache.remove(r),ci.call(t,n.done,n.resizeAfter)})}};function sa(e,t,n){var r=this,i=this.internal,a=i.mapToTargetIds(t),o=i.state.hiddenTargetIds.map(function(e){return a.indexOf(e)>-1&&e}).filter(Boolean);i.state.toggling=!0,i[`${e?`remove`:`add`}HiddenTargetIds`](a);var s=i.$el.svg.selectAll(i.selectorTargets(a)),c=e?null:`0`;e&&o.length&&(s.style(`display`,null),Q(i.config.data_onshown,this,o)),i.$T(s).style(`opacity`,c,`important`).call(Xn,function(){!e&&o.length===0&&(s.style(`display`,`none`),Q(i.config?.data_onhidden,r,a)),s.style(`opacity`,c)}),n.withLegend&&i[`${e?`show`:`hide`}Legend`](a),i.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),i.state.toggling=!1}var ca={show:function(e,t){t===void 0&&(t={}),sa.call(this,!0,e,t)},hide:function(e,t){t===void 0&&(t={}),sa.call(this,!1,e,t)},toggle:function(e,t){var n=this;t===void 0&&(t={});var r=this.internal,i={show:[],hide:[]};r.mapToTargetIds(e).forEach(function(e){return i[r.isTargetToShow(e)?`hide`:`show`].push(e)}),i.show.length&&this.show(i.show,t),i.hide.length&&setTimeout(function(){return n.hide(i.hide,t)},0)}},la={tooltip:{show:function(e){var t=this.internal,n=t.$el,r=t.config,i=t.state,a=i.eventReceiver,o=i.hasFunnel,s=i.hasTreemap,c=i.inputType,l,u;if(e.mouse&&(u=e.mouse),e.data){var d=e.data,f=t.getYScaleById(d.id)?.(d.value);if((o||s)&&d.id){var p=t.selectorTarget(d.id,void 0,`.${$t.shape}`);a.rect=n.main.select(p)}else t.isMultipleX()?u=[t.xx(d),f]:(r.tooltip_grouped||(u=[0,f]),l=d.index??(t.hasArcType()&&d.id?t.getArcElementByIdOrIndex(d.id)?.datum().index:t.getIndexByX(d.x)))}else J(e.x)?l=t.getIndexByX(e.x):J(e.index)&&(l=e.index);(c===`mouse`?[`mouseover`,`mousemove`]:[`touchstart`]).forEach(function(e){t.dispatchEvent(e,l,u)})},hide:function(){var e,t,n,r=this.internal,i=r.state.inputType,a=r.$el.tooltip?.datum();if(a){var o=JSON.parse(a.current)[0].index;(i===`mouse`?[`mouseout`]:[`touchend`]).forEach(function(e){r.dispatchEvent(e,o)})}i===`touch`&&r.callOverOutForTouch(),r.hideTooltip(!0),(e=r.hideGridFocus)==null||e.call(r),(t=r.unexpandCircles)==null||t.call(r),(n=r.expandBarTypeShapes)==null||n.call(r,!1)}}},ua=function(){function e(t){this.plugins=[];var n=new Ki(this);this.internal=n,(function e(t,n,r){Object.keys(t).forEach(function(i){var a=W(t[i]),o=n!==r,s=Y(t[i]),c=s&&Object.keys(t[i]).length>0;a&&(!o&&c||o)?n[i]=t[i].bind(r):s&&!a?n[i]={}:n[i]=t[i],c&&e(t[i],n[i],r)})})(e.prototype,this,this),qi.call(n,t),n.beforeInit(),n.init()}return e}();cr(ua.prototype,[Ji,Yi,Zi,ra,ia,aa,oa,ca,la]);function da(e,t,n){var r=e.config,i=function(e,n){var i=K(n)?n:n===!1?void 0:null;i!==null&&(r[`axis_${e}_${t}`]=i)};J(n)&&(Gn(n)?Object.keys(n).forEach(function(e){i(e,n[e])}):(K(n)||n===!1)&&[`y`,`y2`].forEach(function(e){i(e,n)}),e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))}function fa(e,t){var n=e.config;return{x:n[`axis_x_${t}`],y:n[`axis_y_${t}`],y2:n[`axis_y2_${t}`]}}var pa={axis:{labels:function(e){var t=this.internal,n;return e&&(Object.keys(e).forEach(function(n){t.axis.setLabelText(n,e[n])}),t.axis.updateLabels()),[`x`,`y`,`y2`].forEach(function(e){var r=t.axis.getLabelText(e);r&&(!n&&(n={}),n[e]=r)}),n},min:function(e){var t=this.internal;return U(e)||e===!1?da(t,`min`,e):fa(t,`min`)},max:function(e){var t=this.internal;return U(e)||e===!1?da(t,`max`,e):fa(t,`max`)},range:function(e){var t=this.axis;if(arguments.length){var n=e.min,r=e.max;J(r)&&t.max(r),J(n)&&t.min(n)}else return{max:t.max(),min:t.min()}}}},ma={category:function(e,t){var n=this.internal,r=n.config;return arguments.length>1&&(r.axis_x_categories[e]=t,n.redraw()),r.axis_x_categories[e]},categories:function(e){var t=this.internal,n=t.config;if(!e||!Array.isArray(e)){var r=n.axis_x_categories;return qn(r)?Object.values(t.data.xs)[0]:r}return n.axis_x_categories=e,t.redraw(),n.axis_x_categories}},ha={flow:function(e){var t=this.internal,n;(e.json||e.rows||e.columns)&&t.convertData(e,function(e){n=e,r()});function r(){var r,i=0,a=0,o,s;if(!(t.state.redrawing||!n||!Dr())){var c=[],l=t.getMaxDataCount(),u=t.convertDataToTargets(n,!0),d=t.axis.isTimeSeries();t.data.targets.forEach(function(e){for(var t=!1,n=0;n<u.length;n++)if(e.id===u[n].id){t=!0,e.values[e.values.length-1]&&(a=e.values[e.values.length-1].index+1),i=u[n].values.length;for(var r=0;r<i;r++)u[n].values[r].index=a+r,d||(u[n].values[r].x=a+r);e.values=e.values.concat(u[n].values),u.splice(n,1);break}!t&&c.push(e.id)}),t.data.targets.forEach(function(e){for(var n=0;n<c.length;n++)if(e.id===c[n]){a=e.values[e.values.length-1].index+1;for(var r=0;r<i;r++)e.values.push({id:e.id,index:a+r,x:d?t.getOtherTargetX(a+r):a+r,value:null})}}),t.data.targets.length&&u.forEach(function(e){for(var n=[],r=t.data.targets[0].values[0].index;r<a;r++)n.push({id:e.id,index:r,x:d?t.getOtherTargetX(r):r,value:null});e.values.forEach(function(e){e.index+=a,d||(e.x+=a)}),e.values=n.concat(e.values)}),t.data.targets=t.data.targets.concat(u);var f=t.data.targets[0],p=f.values[0];J(e.to)?(i=0,s=d?wr.call(t,e.to):e.to,f.values.forEach(function(e){e.x<s&&i++})):J(e.length)&&(i=e.length),l?l===1&&d&&(o=(f.values[f.values.length-1].x-p.x)/2,r=[new Date(+p.x-o),new Date(+p.x+o)]):(o=d?f.values.length>1?f.values[f.values.length-1].x-p.x:p.x-t.getXDomain(t.data.targets)[0]:1,r=[p.x-o,p.x]),r&&t.updateXDomain(null,!0,!0,!1,r),t.updateTargets(t.data.targets),t.redraw({flow:{index:p.index,length:i,duration:U(e.duration)?e.duration:t.config.transition_duration,done:e.done,orgDataCount:l},withLegend:!0,withTransition:l>1,withTrimXDomain:!1,withUpdateXAxis:!0})}}}};function ga(e,t){var n=this.internal,r=n.config,i=r.transition_duration&&Dr(),a=`grid_${t}_lines`;return e?(r[a]=e,n.updateGrid(),n.redrawGrid(i),r[a]):r[a]}function _a(e,t){var n=`grid_${t}_lines`;return ga.bind(this)(this.internal.config[n].concat(e||[]),t)}function va(e,t){this.internal.removeGridLines(e,t)}var ya=function(e){return ga.bind(this)(e,`x`)};cr(ya,{add:function(e){return _a.bind(this)(e,`x`)},remove:function(e){return va.bind(this)(e,!0)}});var ba=function(e){return ga.bind(this)(e,`y`)};cr(ba,{add:function(e){return _a.bind(this)(e,`y`)},remove:function(e){return va.bind(this)(e,!1)}});var xa={xgrids:ya,ygrids:ba},Sa={groups:function(e){var t=this.internal,n=t.config;return q(e)?n.data_groups:(n.data_groups=e,t.redraw(),n.data_groups)}};function Ca(e,t){t===void 0&&(t=!1);var n=this.internal,r=n.config,i=r.transition_duration&&Dr();return e?(r.regions=t?r.regions.concat(e):e,n.updateRegion(),n.redrawRegion(i),t?r.regions:e):r.regions}var wa=function(e){return Ca.bind(this)(e)};cr(wa,{add:function(e){return Ca.bind(this)(e,!0)},remove:function(e){var t=this.internal,n=t.config,r=t.$T,i=e||{},a=Jn(i,`classes`,[Qt.region]),o=t.$el.main.select(`.${Qt.regions}`).selectAll(a.map(function(e){return`.${e}`}));return r(o).style(`opacity`,`0`).remove(),o=n.regions,Object.keys(i).length?(o=o.filter(function(e){var t=!1;return e.class?(e.class.split(` `).forEach(function(e){a.indexOf(e)>=0&&(t=!0)}),!t):!0}),n.regions=o):n.regions=[],o}});var Ta={regions:wa},Ea={x:function(e){var t=this.internal,n=t.axis,r=t.data,i=n.isCustomX()&&n.isCategorized();return X(e)&&(i?this.categories(e):(t.updateTargetX(r.targets,e),t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))),i?this.categories():r.xs},xs:function(e){var t=this.internal;return Z(e)&&(t.updateTargetXs(t.data.targets,e),t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),t.data.xs}},Da=function(){function e(e){this.charSize={};var t=Ti(),n=e.config,r=e.params;this.owner=e,this.config=n,this.scale=t,(n.noTransition||!r.config.transition_duration)&&(n.withoutTransition=!0),n.range=this.scaleExtent((r.orgXScale||t).range())}return e.prototype.getSizeFor1Char=function(e,t,n){n===void 0&&(n=!0);var r={w:5.5,h:11.5};return this.charSize[e]&&n?this.charSize[e]:(!t.empty()&&t.text(`0`).call(function(e){try{var t=rr(e.node(),!0),n=t.width,i=t.height;n&&i&&(r.w=n,r.h=i)}finally{e.text(``)}}),this.charSize[e]=r,r)},e.prototype.getTickTransformSetter=function(e){var t=this.config,n=e===`x`?function(e){return`translate(${e+t.tickOffset},0)`}:function(e){return`translate(0,${e})`};return function(e,t){e.attr(`transform`,function(e){var r=t(e);return U(e)?n(r):null})}},e.prototype.scaleExtent=function(e){var t=e[0],n=e[e.length-1];return t<n?[t,n]:[n,t]},e.prototype.generateTicks=function(e,t){var n=this.owner.params.tickStepSize,r=e.domain(),i=r[0],a=r[1],o=[];if(t&&n)for(var s=Math.round(i);s<=a;)o.push(s),s+=n;else if(e.ticks){var c=this.config.tickArguments;if(e.type===`log`&&!c){var l=Ti(`_log`).domain([i>0?i:1,a]).range(e.range());o=l.ticks();for(var u=a.toFixed().length;o.length>15;u--)o=l.ticks(u);o.splice(0,1,i),o.splice(o.length-1,1,a)}else o=e.ticks.apply(e,this.config.tickArguments||[]);o=o.map(function(e){return G(e)&&K(e)&&!isNaN(e)&&Math.round(e*10)/10||e})}return o},e.prototype.copyScale=function(){var e=this.scale.copy();return e.domain().length||e.domain(this.scale.domain()),e.type=this.scale.type,e},e.prototype.textFormatted=function(e){var t=this.config.tickFormat,n=/\d+\.\d+0{5,}\d$/.test(e)?+String(e).replace(/0+\d$/,``):e,r=t?t(n):n;return J(r)?r:``},e.prototype.transitionise=function(e){var t=this.config,n=e;if(t.withoutTransition)n=e.interrupt();else if(t.transition||!this.owner.params.noTransition)try{n=e.transition(t.transition)}catch{}return n},e}(),Oa=function(){function e(e){e===void 0&&(e={});var t={innerTickSize:6,outerTickSize:e.outerTick?6:0,orient:`bottom`,range:[],tickArguments:null,tickCentered:null,tickCulling:!0,tickFormat:null,tickLength:9,tickOffset:0,tickPadding:3,tickValues:null,transition:null,noTransition:e.noTransition};t.tickLength=Math.max(t.innerTickSize,0)+t.tickPadding,this.config=t,this.params=e,this.helper=new Da(this)}return e.prototype.create=function(e){var t=this,n=t.config,r=t.helper,i=t.params,a=r.scale,o=n.orient,s=this.splitTickText.bind(t),c=/^(left|right)$/.test(o),l=/^(top|bottom)$/.test(o),u=r.getTickTransformSetter(l?`x`:`y`),d=u===r.axisX?`y`:`x`,f=/^(top|left)$/.test(o)?-1:1,p=i.tickTextRotate;this.config.range=a.rangeExtent?a.rangeExtent():r.scaleExtent((i.orgXScale||a).range());var m=n.innerTickSize,h=n.tickLength,g=n.range,_=i.id,v=_&&/^(x|y|y2)$/.test(_)?i.config[`axis_${_}_tick_text_position`]:{x:0,y:0},y=_===`subX`?`subchart_axis_x`:`axis_${_}`,b=i.config[`${y}_show`],x={tick:b?i.config[`${y}_tick_show`]:!1,text:b?i.config[`${y}_tick_text_show`]:!1},S=i.config.axis_evalTextSize,C;e.each(function(){var e=A(this),y=this.__chart__||a,b=r.copyScale();C=e,this.__chart__=b,n.tickOffset=i.isCategory?(b(1)-b(0))/2:0;var w=e.selectAll(`.domain`).data([0]);if(w.enter().append(`path`).attr(`class`,`domain`).merge(w).attr(`d`,function(){var e=n.outerTickSize*f;return l?`M${g[0]},${e}V0H${g[1]}V${e}`:`M${e},${g[0]}H0V${g[1]}H${e}`}),x.tick||x.text){var T=n.tickValues||r.generateTicks(b,c||i.config.axis_rotated);t.generatedTicks=T;var E=e.selectAll(`.tick`).data(T,b),D=E.enter().insert(`g`,`.domain`).attr(`class`,`tick`),O=E.exit().remove();E=D.merge(E),x.tick&&D.append(`line`),x.text&&D.append(`text`);var k=E.select(`text`),ee=[],te={w:0,h:0};W(S)&&(te=S.bind(t.params.owner.api)(k.node(),_),this.classList.contains(P.dummy)&&(this.sizeFor1Char=te)),(!te||te.w===0||te.h===0)&&(te=t.helper.getSizeFor1Char(o,k,!!S));var ne=k.selectAll(`tspan`).data(function(e,t){var n=i.tickMultiline?s(e,b,T,c,te.w):X(r.textFormatted(e))?r.textFormatted(e).concat():[r.textFormatted(e)];return ee[t]=n.length,n.map(function(e){return{index:t,splitted:e}})});ne.exit().remove(),ne=ne.enter().append(`tspan`).merge(ne).text(function(e){return e.splitted}),ne.attr(`x`,l?0:h*f).attr(`dx`,(function(){var e=0;return/(top|bottom)/.test(o)&&p&&(e=8*Math.sin(p/180*Math.PI)*(o===`top`?-1:1)),e+(v.x||0)})()).attr(`dy`,function(e,t){var n=`.71em`,r=0;return o!==`top`&&(r=te.h,t===0&&(r=c?-((ee[e.index]-1)*(te.h/2)-3):v.y===0?n:0)),K(r)&&v.y?r+v.y:r||n});var re=E.select(`line`),ie=E.select(`text`);if(D.select(`line`).attr(`${d}2`,m*f),D.select(`text`).attr(d,h*f),t.setTickLineTextPosition(re,ie,te),i.tickTitle){var ae=ie.select(`title`);(ae.empty()?ie.append(`title`):ae).text(function(e){return i.tickTitle[e]})}if(b.bandwidth){var oe=b,se=oe.bandwidth()/2;y=function(e){return oe(e)+se},b=y}else y.bandwidth?y=b:u(O,b);E=i.owner.state.flowing?r.transitionise(E):i.owner.$T(E),u(D,y),u(E.style(`opacity`,null),b)}}),this.g=C},e.prototype.getGeneratedTicks=function(e){var t=this.generatedTicks?.length-1,n=this.generatedTicks;if(t>e){var r=Math.round(t/e+.1);n=this.generatedTicks.map(function(e,t){return t%r===0?e:null}).filter(function(e){return e!==null}).splice(0,e)}return n},e.prototype.getTickXY=function(){var e=this.config,t={x:0,y:0};return this.params.isCategory&&(t.x=e.tickCentered?0:e.tickOffset,t.y=e.tickCentered?e.tickOffset:0),t},e.prototype.getTickSize=function(e){var t=this.helper.scale,n=this.config,r=n.innerTickSize,i=n.range,a=t(e)+(n.tickCentered?0:n.tickOffset);return i[0]<a&&a<i[1]?r:0},e.prototype.setTickLineTextPosition=function(e,t,n){var r=this,i=this.getTickXY(),a=this.config,o=a.innerTickSize,s=a.orient,c=a.tickLength,l=a.tickOffset,u=this.params.id,d=this.params.tickTextRotate,f=6,p=n.h/2-f,m=function(e){var t=[`start`,`end`];return s===`top`&&t.reverse(),e?t[e>0?0:1]:`middle`},h=function(e){return e?`rotate(${e})`:null},g=function(e){var t=e/(s===`bottom`?15:23);return e?11.5-2.5*t*(e>0?1:-1):c},_=this.params.owner.config,v=_.axis_rotated,y=_.axis_x_tick_text_inner,b=this.params.config[`axis_${u}_tick_inner`];switch(s){case`bottom`:e.attr(`x1`,i.x).attr(`x2`,i.x).attr(`y2`,function(e){return r.getTickSize.bind(r)(e)*(b?-1:1)}),t.attr(`x`,0).attr(`y`,g(d)).style(`text-anchor`,m(d)).style(`text-anchor`,function(e,t,n){var r=n.length;return!v&&t===0&&(y===!0||y.first)?`start`:!v&&t===r-1&&(y===!0||y.last)?`end`:m(d)}).attr(`transform`,h(d));break;case`top`:e.attr(`x2`,0).attr(`y2`,b?o:-o),t.attr(`x`,0).attr(`y`,-(g(d)+p+f)).style(`text-anchor`,m(d)).attr(`transform`,h(d));break;case`left`:e.attr(`x2`,b?o:-o).attr(`y1`,i.y).attr(`y2`,i.y),t.attr(`x`,-c).attr(`y`,l+(v?p/4:p)).style(`text-anchor`,`end`);break;case`right`:e.attr(`x2`,b?-o:o).attr(`y2`,0),t.attr(`x`,c).attr(`y`,p).style(`text-anchor`,`start`)}},e.prototype.splitTickText=function(e,t,n,r,i){var a=this.params,o=this.helper.textFormatted(e),s=G(o)&&o.indexOf(`
31
+ `)>-1?o.split(`
32
+ `):[];if(s.length)return s;if(X(o))return o;var c=a.tickWidth;(!c||c<=0)&&(c=r?95:a.isCategory?(a.isInverted?t(n[0])-t(n[1]):t(n[1])-t(n[0]))-12:110);function l(e,t){for(var n,r,a,o=1;o<t.length;o++)if(t.charAt(o)===` `&&(r=o),n=t.substr(0,o+1),a=i*n.length,c<a)return l(e.concat(t.substr(0,r||o)),t.slice(r?r+1:o));return e.concat(t)}return l(s,String(o))},e.prototype.scale=function(e){return arguments.length?(this.helper.scale=e,this):this.helper.scale},e.prototype.orient=function(e){return arguments.length?(this.config.orient=e in{top:1,right:1,bottom:1,left:1}?String(e):`bottom`,this):this.config.orient},e.prototype.tickFormat=function(e){var t=this.config;return arguments.length?(t.tickFormat=e,this):t.tickFormat},e.prototype.tickCentered=function(e){var t=this.config;return arguments.length?(t.tickCentered=e,this):t.tickCentered},e.prototype.tickOffset=function(){return this.config.tickOffset},e.prototype.tickInterval=function(e){var t=this.config,n=t.outerTickSize,r=t.tickOffset,i=t.tickValues,a;if(this.params.isCategory)a=r*2;else{var o=this.params.owner.scale.zoom??this.helper.scale;a=(this.g.select(`path.domain`).node().getTotalLength()-n*2)/(e||this.g.selectAll(`line`).size());var s=i?i.map(function(e,t,n){var r=t+1;return r<n.length?o(n[r])-o(e):null}).filter(Boolean):[];a=Math.min.apply(Math,N(N([],s,!1),[a],!1))}return a===1/0?0:a},e.prototype.ticks=function(){var e=[...arguments],t=this.config;return e.length?(t.tickArguments=dr(e),this):t.tickArguments},e.prototype.tickCulling=function(e){var t=this.config;return arguments.length?(t.tickCulling=e,this):t.tickCulling},e.prototype.tickValues=function(e){var t=this,n=this.config;if(W(e))n.tickValues=function(){return e(t.helper.scale.domain())};else{if(!arguments.length)return n.tickValues;n.tickValues=e}return this},e.prototype.setTransition=function(e){return this.config.transition=e,this},e}(),ka={getAxisInstance:function(){return this.axis||new Aa(this)}},Aa=function(){function e(e){this.axesList={},this.tick={x:null,y:null,y2:null},this.xs=[],this.orient={x:`bottom`,y:`left`,y2:`right`,subX:`bottom`},this.owner=e,this.setOrient()}return e.prototype.getAxisClassName=function(e){return`${Ht.axis} ${Ht[`axis${lr(e)}`]}`},e.prototype.isHorizontal=function(e,t){var n=e.config.axis_rotated;return t?n:!n},e.prototype.isCategorized=function(){var e=this.owner,t=e.config,n=e.state;return t.axis_x_type.indexOf(`category`)>=0||n.hasRadar},e.prototype.isCustomX=function(){var e=this.owner.config;return!this.isTimeSeries()&&(e.data_x||Y(e.data_xs))},e.prototype.isTimeSeries=function(e){return e===void 0&&(e=`x`),this.owner.config[`axis_${e}_type`]===`timeseries`},e.prototype.isLog=function(e){return e===void 0&&(e=`x`),this.owner.config[`axis_${e}_type`]===`log`},e.prototype.isTimeSeriesY=function(){return this.isTimeSeries(`y`)},e.prototype.getAxisType=function(e){e===void 0&&(e=`x`);var t=`linear`;return this.isTimeSeries(e)?t=this.owner.config.axis_x_localtime?`time`:`utc`:this.isLog(e)&&(t=`log`),t},e.prototype.getExtent=function(){var e=this.owner,t=e.config,n=e.scale,r=t.axis_x_extent;if(r){if(W(r))r=r.bind(e.api)(e.getXDomain(e.data.targets),n.subX);else if(this.isTimeSeries()&&r.every(isNaN)){var i=wr.bind(e);r=r.map(function(e){return n.subX(i(e))})}}return r},e.prototype.init=function(){var e=this,t=this.owner,n=t.config,r=t.$el,i=r.main,a=r.axis,o=t.state.clip,s=[`x`,`y`];n.axis_y2_show&&s.push(`y2`),s.forEach(function(r){var s=e.getAxisClassName(r);a[r]=i.append(`g`).attr(`class`,s).attr(`clip-path`,function(){var e=null;return r===`x`?e=o.pathXAxis:r===`y`&&(e=o.pathYAxis),e}).attr(`transform`,t.getTranslate(r)).style(`visibility`,n[`axis_${r}_show`]?null:`hidden`),e.generateAxes(r)})},e.prototype.setOrient=function(){var e=this.owner.config,t=e.axis_rotated,n=e.axis_y_inner,r=e.axis_y2_inner;this.orient={x:t?`left`:`bottom`,y:t?n?`top`:`bottom`:n?`right`:`left`,y2:t?r?`bottom`:`top`:r?`left`:`right`,subX:t?`left`:`bottom`}},e.prototype.generateAxes=function(e){var t=this.owner,n=t.config,r=[],i=n[`axis_${e}_axes`],a=n.axis_rotated,o;e===`x`?o=a?h:E:e===`y`?o=a?E:h:e===`y2`&&(o=a?v:T),i.length&&i.forEach(function(n){var i=n.tick||{},a=t.scale[e].copy();n.domain&&a.domain(n.domain),r.push(o(a).ticks(i.count).tickFormat(W(i.format)?i.format.bind(t.api):(function(e){return e})).tickValues(i.values).tickSizeOuter(i.outer===!1?0:6))}),this.axesList[e]=r},e.prototype.updateAxes=function(){var e=this,t=this.owner,n=t.config,r=t.$el.main,i=t.$T;Object.keys(this.axesList).forEach(function(a){var o=n[`axis_${a}_axes`],s=t.scale[a].copy(),c=s.range();e.axesList[a].forEach(function(l,u){var d=l.scale().range();c.every(function(e,t){return e===d[t]})||l.scale().range(c);var f=`${e.getAxisClassName(a)}-${u+1}`,p=r.select(`.${f.replace(/\s/,`.`)}`);p.empty()?p=r.append(`g`).attr(`class`,f).style(`visibility`,n[`axis_${a}_show`]?null:`hidden`).call(l):(o[u].domain&&s.domain(o[u].domain),i(p).call(l.scale(s))),p.attr(`transform`,t.getTranslate(a,u+1))})})},e.prototype.setAxis=function(e,t,n,r){var i=this.owner;e!==`subX`&&(this.tick[e]=this.getTickValues(e)),this[e]=this.getAxis(e,t,n,e===`x`&&(i.scale.zoom||i.config.subchart_show||i.state.resizing)?!0:r)},e.prototype.getAxis=function(e,t,n,r,i){var a=this.owner,o=a.config,s=/^(x|subX)$/.test(e),c=s?`x`:e,l=s&&this.isCategorized(),u=this.orient[e],d=i?0:a.getAxisTickRotate(c),f;if(s)f=e===`subX`?a.format.subXAxisTick:a.format.xAxisTick;else{var p=o[`axis_${e}_tick_format`];W(p)&&(f=p.bind(a.api))}var m=this.tick[c],h=yr({outerTick:n,noTransition:r,config:o,id:e,tickTextRotate:d,owner:a},s&&{isCategory:l,isInverted:o.axis_x_inverted,tickMultiline:o.axis_x_tick_multiline,tickWidth:o.axis_x_tick_width,tickTitle:l&&o.axis_x_tick_tooltip&&a.api.categories(),orgXScale:a.scale.x});s||(h.tickStepSize=o[`axis_${c}_tick_stepSize`]);var g=new Oa(h).scale(s&&a.scale.zoom||t).orient(u);if(s&&this.isTimeSeries()&&m&&!W(m)){var _=wr.bind(a);m=m.map(function(e){return _(e)})}else !s&&this.isTimeSeriesY()&&(g.ticks(o.axis_y_tick_time_value),m=null);m&&g.tickValues(m),g.tickFormat(f||!s&&a.isStackNormalized()&&a.hasAxisGroupedData(e)&&(function(e){return`${e}%`})),l&&(g.tickCentered(o.axis_x_tick_centered),qn(o.axis_x_tick_culling)&&(o.axis_x_tick_culling=!1));var v=o[`axis_${c}_tick_count`];return v&&g.ticks(v),g},e.prototype.updateXAxisTickValues=function(e,t){var n,r=this.owner,i=r.config,a=i.axis_x_tick_fit,o=i.axis_x_tick_count,s;return(a||o&&a)&&(s=r.mapTargetsToUniqueXs(e),this.isCategorized()&&o>s.length&&(o=s.length),s=this.generateTickValues(s,o,this.isTimeSeries())),t?t.tickValues(s):this.x&&(this.x.tickValues(s),(n=this.subX)==null||n.tickValues(s)),s},e.prototype.getId=function(e){var t=this.owner,n=t.config,r=t.scale,i=n.data_axes[e];return(!i||!r[i])&&(i=`y`),i},e.prototype.getXAxisTickFormat=function(e){var t=this.owner,n=t.config,r=t.format,i=e&&n.subchart_axis_x_tick_format||n.axis_x_tick_format,a=this.isTimeSeries(),o=this.isCategorized(),s;return i?W(i)?s=i.bind(t.api):a&&(s=function(e){return e?r.axisTime(i)(e):``}):s=a?r.defaultAxisTime:o?t.categoryName:function(e){return e<0?e.toFixed(0):e},W(s)?function(e){return s.apply(t,o?[e,t.categoryName(e)]:[e])}:s},e.prototype.getTickValues=function(e){var t=this.owner,n=t.config[`axis_${e}_tick_values`],r=t[`${e}Axis`];return(W(n)?n.call(t.api):n)||(r?r.tickValues():void 0)},e.prototype.getLabelOptionByAxisId=function(e){return this.owner.config[`axis_${e}_label`]},e.prototype.getLabelText=function(e){var t=this.getLabelOptionByAxisId(e);return G(t)?t:t?t.text:null},e.prototype.setLabelText=function(e,t){var n=this.owner.config,r=this.getLabelOptionByAxisId(e);G(r)?n[`axis_${e}_label`]=t:r&&(r.text=t)},e.prototype.getLabelPosition=function(e,t){var n=this.owner.config.axis_rotated,r=this.getLabelOptionByAxisId(e),i=Gn(r)&&r.position?r.position:t[+!n],a=function(e){return!!~i.indexOf(e)};return{isInner:a(`inner`),isOuter:a(`outer`),isLeft:a(`left`),isCenter:a(`center`),isRight:a(`right`),isTop:a(`top`),isMiddle:a(`middle`),isBottom:a(`bottom`)}},e.prototype.getAxisLabelPosition=function(e){return this.getLabelPosition(e,e===`x`?[`inner-top`,`inner-right`]:[`inner-right`,`inner-top`])},e.prototype.getLabelPositionById=function(e){return this.getAxisLabelPosition(e)},e.prototype.xForAxisLabel=function(e){var t=this.owner,n=t.state,r=n.width,i=n.height,a=this.getAxisLabelPosition(e),o=a.isMiddle?-i/2:0;return this.isHorizontal(t,e!==`x`)?o=a.isLeft?0:a.isCenter?r/2:r:a.isBottom&&(o=-i),o},e.prototype.textAnchorForAxisLabel=function(e){var t=this.owner,n=this.getAxisLabelPosition(e),r=n.isMiddle?`middle`:`end`;return this.isHorizontal(t,e!==`x`)?r=n.isLeft?`start`:n.isCenter?`middle`:`end`:n.isBottom&&(r=`start`),r},e.prototype.dxForAxisLabel=function(e){var t=this.owner,n=this.getAxisLabelPosition(e),r=n.isBottom?`0.5em`:`0`;return this.isHorizontal(t,e!==`x`)?r=n.isLeft?`0.5em`:n.isRight?`-0.5em`:`0`:n.isTop&&(r=`-0.5em`),r},e.prototype.dyForAxisLabel=function(e){var t=this.owner,n=t.config,r=n.axis_rotated,i=this.getAxisLabelPosition(e).isInner,a=n[`axis_${e}_tick_rotate`]?t.getHorizontalAxisHeight(e):0,o=this.getMaxTickSize(e).width,s;if(e===`x`){var c=n.axis_x_height;s=r?i?`1.2em`:-25-o:i?`-0.5em`:c?c-10:a?a-10:`3em`}else s={y:[`-0.5em`,10,`3em`,`1.2em`,10],y2:[`1.2em`,-20,`-2.2em`,`-0.5em`,15]}[e],s=r?i?s[0]:a?a*(e===`y2`?-1:1)-s[1]:s[2]:i?s[3]:(s[4]+(n[`axis_${e}_inner`]?0:o+s[4]))*(e===`y`?-1:1);return s},e.prototype.getMaxTickSize=function(e,t){var n=this.owner,r=n.config,i=n.state,a=i.current,o=i.resizing,s=n.$el,c=s.svg,l=s.chart,u=a.maxTickSize[e],d=`axis_${e}`,f={width:0,height:0};if(o||t||!r[`${d}_show`]||u.width>0&&n.filterTargetsToShow().length===0)return u;if(c){var p=/^y2?$/.test(e),m=n.filterTargetsToShow(n.data.targets),h=n.scale[e].copy().domain(n[`get${p?`Y`:`X`}Domain`](m,e)),g=h.domain(),_=g[0]===g[1]&&g.every(function(e){return e>0}),v=X(u.domain)&&u.domain[0]===u.domain[1]&&u.domain.every(function(e){return e>0});if(_||v)return u.size;u.domain=g,p||u.ticks.splice(0);var y=this.getAxis(e,h,!1,!1,!0),b=r[`${d}_tick_rotate`],x=r[`${d}_tick_count`];!r[`${d}_tick_values`]&&x&&y.tickValues(this.generateTickValues(g,x,p?this.isTimeSeriesY():this.isTimeSeries())),!p&&this.updateXAxisTickValues(m,y);var S=l.append(`svg`).style(`visibility`,`hidden`).style(`position`,`fixed`).style(`top`,`0`).style(`left`,`0`),C=S.append(`g`).attr(`class`,`${Ht[`axis${lr(e)}`]} ${P.dummy}`);y.create(C);var w=C.node().sizeFor1Char;S.selectAll(`text`).attr(`transform`,K(b)?`rotate(${b})`:null).each(function(e,t){var n=w?{width:this.textContent.length*w.w,height:w.h}:nr(this,!0),r=n.width,i=n.height;f.width=Math.max(f.width,r),f.height=Math.max(f.height,i),p||(u.ticks[t]=r)}),S.remove()}return Object.keys(f).forEach(function(e){f[e]>0&&(u[e]=f[e])}),u},e.prototype.getXAxisTickTextY2Overflow=function(e){var t=this.owner,n=t.axis,r=t.config,i=t.state,a=i.current,o=i.isLegendRight,s=i.legendItemWidth,c=t.getAxisTickRotate(`x`),l=c>0&&c<90;if((n.isCategorized()||n.isTimeSeries())&&r.axis_x_tick_fit&&(!r.axis_x_tick_culling||qn(r.axis_x_tick_culling))&&!r.axis_x_tick_multiline&&l){var u=r.axis_y2_show&&a.maxTickSize.y2.width||0,d=o&&s||0,f=a.width-t.getCurrentPaddingByDirection(`left`),p=this.getXAxisTickMaxOverflow(c,f-e)-u-d,m=Math.max(0,p)+e;return Math.min(m,f/2)}return 0},e.prototype.getXAxisTickMaxOverflow=function(e,t){for(var n=this.owner,r=n.axis,i=n.config,a=n.state,o=r.isTimeSeries(),s=a.current.maxTickSize.x.ticks,c=s.length,l=a.axis.x.padding,u=l.left,d=l.right,f=0,p=c-(o&&i.axis_x_tick_fit?.5:0),m=0;m<c;m++){var h=m+1,g=Math.cos(Math.PI*e/180)*s[m],_=h-(o?1:.5)+u;if(!(_<=0)){var v=(t-g)/_,y=p-h,b=d*v,x=y*v+b,S=g-v/2-x;f=Math.max(f,S)}}var C=n.filterTargetsToShow(n.data.targets),w=0;if(!o&&i.axis_x_tick_count<=C.length&&C[0].values.length){var T=Ti(n.axis.getAxisType(`x`),0,t-f).domain([u*-1,n.getXDomainMax(n.data.targets)+1+d]);w=(T(1)-T(0))/2}return f+w},e.prototype.updateLabels=function(e){var t=this,n=this.owner,r=n.config,i=n.$el.main,a=n.$T,o=r.axis_rotated;[`x`,`y`,`y2`].forEach(function(n){var r=t.getLabelText(n),s=`axis${lr(n)}`,c=Ht[`${s}Label`];if(r){var l=i.select(`text.${c}`);l.empty()&&(l=i.select(`g.${Ht[s]}`).insert(`text`,`:first-child`).attr(`class`,c).attr(`transform`,[`rotate(-90)`,null][n===`x`?+!o:+o]).style(`text-anchor`,function(){return t.textAnchorForAxisLabel(n)})),a(l,e).attr(`x`,function(){return t.xForAxisLabel(n)}).attr(`dx`,function(){return t.dxForAxisLabel(n)}).attr(`dy`,function(){return t.dyForAxisLabel(n)}).text(r)}})},e.prototype.getPadding=function(e,t,n,r){var i=K(e)?e:e[t];return U(i)?this.owner.convertPixelToScale(/(bottom|top)/.test(t)?`y`:`x`,i,r):n},e.prototype.generateTickValues=function(e,t,n){var r=e;if(t){var i=W(t)?t():t;if(i===1)r=[e[0]];else if(i===2)r=[e[0],e[e.length-1]];else if(i>2){var a=this.isCategorized(),o=i-2,s=e[0],c=e[e.length-1],l=(c-s)/(o+1),u=void 0;r=[s];for(var d=0;d<o;d++)u=+s+l*(d+1),r.push(n?new Date(u):a?Math.round(u):u);r.push(c)}}return n||(r=r.sort(function(e,t){return e-t})),r},e.prototype.generateTransitions=function(e){var t=this.owner,n=t.$el.axis,r=t.$T,i=[`x`,`y`,`y2`,`subX`].map(function(t){return r(n[t],e)});return{axisX:i[0],axisY:i[1],axisY2:i[2],axisSubX:i[3]}},e.prototype.redraw=function(e,t,n){var r=this,i=this.owner,a=i.config,o=i.state,s=i.$el,c=t?`0`:null;[`x`,`y`,`y2`,`subX`].forEach(function(t){var i=r[t],o=s.axis[t];i&&o&&(!n&&!a.transition_duration&&(i.config.withoutTransition=!0),o.style(`opacity`,c),i.create(e[`axis${lr(t)}`]))}),this.updateAxes(),!o.rendered&&a.axis_tooltip&&this.setAxisTooltip()},e.prototype.redrawAxis=function(e,t,n,r,i){var a=this,o,s,c,l=this.owner,u=l.config,d=l.scale,f=l.$el,p=!!d.zoom,m;!p&&this.isCategorized()&&e.length===0&&d.x.domain([0,f.axis.x.selectAll(`.tick`).size()]),d.x&&e.length?(!p&&l.updateXDomain(e,t.UpdateXDomain,t.UpdateOrgXDomain,t.TrimXDomain),u.axis_x_tick_values||this.updateXAxisTickValues(e)):this.x&&(this.x.tickValues([]),(o=this.subX)==null||o.tickValues([])),u.zoom_rescale&&!r&&(m=d.x.orgDomain()),[`y`,`y2`].forEach(function(t){var n=`axis_${t}_`,r=d[t];if(r){var i=u[`${n}tick_values`],o=u[`${n}tick_count`];if(r.domain(l.getYDomain(e,t,m)),!i&&o){var s=l.axis[t],c=r.domain();s.tickValues(a.generateTickValues(c,c.every(function(e){return e===0})?1:o,a.isTimeSeriesY()))}}}),this.redraw(n,l.hasArcType(),i),this.updateLabels(t.Transition),(t.UpdateXDomain||t.UpdateXAxis||t.Y)&&e.length&&this.setCulling(),t.Y&&((s=d.subY)==null||s.domain(l.getYDomain(e,`y`)),(c=d.subY2)==null||c.domain(l.getYDomain(e,`y2`)))},e.prototype.setCulling=function(){var e=this.owner,t=e.config,n=e.state,r=n.clip,i=n.current,a=e.$el;[`subX`,`x`,`y`,`y2`].forEach(function(e){var n=a.axis[e],o=`axis_${e===`subX`?`x`:e}_tick_culling`,s=t[o];if(n&&s){var c=n.selectAll(`.tick`),l=br(c.data(),!t[`${o}_reverse`]),u=l.length,d=t[`${o}_max`],f=t[`${o}_lines`],p;if(u){for(var m=1;m<u;m++)if(u/m<d){p=m;break}c.each(function(e){var t=f?this.querySelector(`text`):this;t&&(t.style.display=l.indexOf(e)%p?`none`:null)})}else c.style(`display`,null);if(e===`x`){var h=i.maxTickSize.x.clipPath?r.pathXAxisTickTexts:null;a.svg.selectAll(`.${Ht.axisX} .tick text`).attr(`clip-path`,h)}}})},e.prototype.setAxisTooltip=function(){var e=this.owner,t=e.config,n=t.axis_rotated,r=t.axis_tooltip,i=e.$el,a=i.axis,o=i.axisTooltip,s=r.backgroundColor??`black`;e.generateTextBGColorFilter(s,{x:-.15,y:-.2,width:1.3,height:1.3}),[`x`,`y`,`y2`].forEach(function(t){var r,i;if(G(s)||s[t])if(o[t]=a[t]?.append(`text`).classed(Ht[`axis${t.toUpperCase()}Tooltip`],!0).attr(`filter`,e.updateTextBGColor({id:t},s)),n){var c=t===`x`?`x`:`y`,l=t===`y`?`1.15em`:t===`x`?`-0.3em`:`-0.4em`;(r=o[t])==null||r.attr(c,l).attr(`d${t===`x`?`y`:`x`}`,t===`x`?`0.4em`:`-1.3em`).style(`text-anchor`,t===`x`?`end`:null)}else{var c=t===`x`?`y`:`x`,l=t===`x`?`1.15em`:`${t===`y`?`-`:``}0.4em`;(i=o[t])==null||i.attr(c,l).attr(`d${t===`x`?`x`:`y`}`,t===`x`?`-1em`:`0.3em`).style(`text-anchor`,t===`y`?`end`:null)}})},e}(),ja={initEventRect:function(){this.$el.main.select(`.${P.chart}`).append(`g`).attr(`class`,Xt.eventRects).style(`fill-opacity`,`0`)},redrawEventRect:function(){var e,t=this,n=t.config,r=t.state,i=t.$el,a=t.isMultipleX(),o=n.axis_x_inverted;if(i.eventRect)t.updateEventRect(i.eventRect,!0);else if(t.data.targets.length){var s=t.$el.main.select(`.${Xt.eventRects}`).style(`cursor`,n.zoom_enabled&&n.zoom_type!==`drag`?n.axis_rotated?`ns-resize`:`ew-resize`:null).classed(Xt.eventRectsMultiple,a).classed(Xt.eventRectsSingle,!a).selectAll(`.${Xt.eventRect}`).data([0]).enter().append(`rect`);t.updateEventRect(s),t.updateEventType(s),s.call(t.getDraggableSelection()),i.eventRect=s,t.state.inputType===`touch`&&!i.svg.on(`touchstart.eventRect`)&&!t.hasArcType()&&t.bindTouchOnEventRect(),r.rendered&&t.updateEventRect(i.eventRect,!0)}if(!a){var c=t.getMaxDataCountTarget();(!n.data_xSort||o)&&c.sort(function(e,t){return o?t.x-e.x:e.x-t.x}),t.updateDataIndexByX(c),t.updateXs(c),(e=t.updatePointClass)==null||e.call(t,!0),r.eventReceiver.data=c}t.updateEventRectData()},bindTouchOnEventRect:function(){var e=this,t=e.config,n=e.state,r=e.$el,i=r.eventRect,a=r.svg,o=function(t){if(e.isMultipleX())e.selectRectForMultipleXs(t);else{var r=e.getDataIndexFromEvent(n.event);e.callOverOutForTouch(r),r===-1?e.unselectRect():e.selectRectForSingle(t,r)}},s=function(){e.unselectRect(),e.callOverOutForTouch()},c=t.interaction_inputType_touch.preventDefault,l=Vn(c)&&c||!1,u=!isNaN(c)&&c||null,d,f=!l&&u===null,p=function(e){var n=e.type,r=e.changedTouches[0][`client${t.axis_rotated?`Y`:`X`}`];n===`touchstart`?l?e.preventDefault():u!==null&&(d=r):n===`touchmove`&&(l||d===!0||u!==null&&Math.abs(d-r)>=u)&&(d=!0,e.preventDefault())};i.on(`touchstart`,function(t){n.event=t,e.updateEventRect()},{passive:f}).on(`touchstart.eventRect touchmove.eventRect`,function(t){if(n.event=t,!i.empty()&&i.classed(Xt.eventRect)){if(n.dragging||n.flowing||e.hasArcType()||t.touches.length>1)return;p(t),o(i.node())}else s()},{passive:f}).on(`touchend.eventRect`,function(t){n.event=t,!i.empty()&&i.classed(Xt.eventRect)&&(e.hasArcType()||!e.toggleShape||n.cancelClick)&&(n.cancelClick&&=!1)},{passive:f}),a.on(`touchstart`,function(e){n.event=e;var t=e.target;t&&t!==i.node()&&s()},{passive:f})},updateEventRect:function(e,t){t===void 0&&(t=!1);var n=this,r=n.state,i=n.$el,a=r.eventReceiver,o=r.width,s=r.height,c=r.rendered,l=r.resizing,u=e||i.eventRect;(!c||l||t)&&(u.attr(`x`,0).attr(`y`,0).attr(`width`,o).attr(`height`,s),(!c||t)&&u.classed(Xt.eventRect,!0)),function(){if(a){var e=mr(i.chart.node());a.rect=nr(u.node(),!0).toJSON(),a.rect.top+=e.y,a.rect.left+=e.x}}()},updateEventType:function(e){var t=this,n=Vn(e),r=n?t.$el.eventRect:e,i=n?e!==r?.datum().multipleX:!1;r&&(i&&r?.on(`mouseover mousemove mouseout click`,null),t.isMultipleX()?t.generateEventRectsForMultipleXs(r):t.generateEventRectsForSingleX(r))},updateEventRectData:function(){var e=this,t=e.config,n=e.scale,r=e.state,i=n.zoom||n.x,a=t.axis_rotated,o=e.isMultipleX(),s,c,l,u;if(e.updateEventType(o),o)s=0,c=0,l=r.width,u=r.height;else{var d,f=void 0;if(e.axis.isCategorized())d=e.getEventRectWidth(),f=function(e){return i(e.x)-d/2};else{var p=function(t){var n=t.index;return{prev:e.getPrevX(n),next:e.getNextX(n)}};d=function(e){var t=p(e),n=i.domain(),o;return t.prev===null&&t.next===null?o=a?r.height:r.width:t.prev===null?o=(i(t.next)+i(e.x))/2:t.next===null?o=i(n[1])-(i(t.prev)+i(e.x))/2:(Object.keys(t).forEach(function(e,r){t[e]=t[e]??n[r]}),o=Math.max(0,(i(t.next)-i(t.prev))/2)),o},f=function(e){var t=p(e);return t.prev===null&&t.next===null?0:t.prev===null?i(i.domain()[0]):(i(e.x)+i(t.prev))/2}}s=a?0:f,c=a?f:0,l=a?r.width:d,u=a?d:r.height}var m=r.eventReceiver,h=function(e,t){return W(e)?e(t):e};m.coords.splice(m.data.length),m.data.forEach(function(e,t){m.coords[t]={x:h(s,e),y:h(c,e),w:h(l,e),h:h(u,e)}})},selectRectForSingle:function(e,t){var n,r,i=this,a=i.config,o=i.$el,s=o.main,c=o.circle,l=a.data_selection_enabled,u=a.data_selection_grouped,d=a.data_selection_isselectable,f=a.tooltip_grouped,p=i.getAllValuesOnIndex(t);if(!(f&&(i.showTooltip(p,e),(n=i.showGridFocus)==null||n.call(i,p),!l||u))){!c&&s.selectAll(`.${P.EXPANDED}:not(.${$t.shape}-${t})`).classed(P.EXPANDED,!1);var m=s.selectAll(`.${$t.shape}-${t}`).classed(P.EXPANDED,!0).style(`cursor`,d?`pointer`:null).filter(function(e){return i.isWithinShape(this,e)});m.empty()&&!f&&a.interaction_onout&&((r=i.hideGridFocus)==null||r.call(i),i.hideTooltip(),!u&&i.setExpand(t)),m.call(function(n){var r,a,o=n.data();l&&(u||d?.bind(i.api)(o))&&(e.style.cursor=`pointer`),f||(i.showTooltip(o,e),(r=i.showGridFocus)==null||r.call(i,o),(a=i.unexpandCircles)==null||a.call(i),n.each(function(e){return i.setExpand(t,e.id)}))})}},selectRectForMultipleXs:function(e,t){t===void 0&&(t=!0);var n=this,r=n.config,i=n.state,a=n.filterTargetsToShow(n.data.targets);if(!(i.dragging||n.hasArcType(a))){var o=er(i.event,e),s=n.findClosestFromTargets(a,o);if(t&&i.mouseover&&(!s||s.id!==i.mouseover.id)&&(r.data_onout.call(n.api,i.mouseover),i.mouseover=void 0),!s){n.unselectRect();return}var c=(n.isBubbleType(s)||n.isScatterType(s)||!r.tooltip_grouped?[s]:n.filterByX(a,s.x)).map(function(e){return n.addName(e)});n.showTooltip(c,e),n.setExpand(s.index,s.id,!0),n.showGridFocus(c);var l=n.dist(s,o);(n.isBarType(s.id)||l<n.getPointSensitivity(s))&&(n.$el.svg.select(`.${Xt.eventRect}`).style(`cursor`,`pointer`),t&&(!i.mouseover||i.mouseover.x!==s.x||i.mouseover.id!==s.id)&&(r.data_onover.call(n.api,s),i.mouseover=s))}},unselectRect:function(){var e=this,t=e.$el,n=t.circle,r=t.tooltip;e.$el.svg.select(`.${Xt.eventRect}`).style(`cursor`,null),e.hideGridFocus(),r&&(e.hideTooltip(),e._handleLinkedCharts(!1)),n&&!e.isPointFocusOnly()&&e.unexpandCircles(),e.expandBarTypeShapes(!1)},generateEventRectsForSingleX:function(e){var t=this,n=t.config,r=t.state,i=r.eventReceiver,a=e.style(`cursor`,n.data_selection_enabled&&n.data_selection_grouped?`pointer`:null).on(`click`,function(e){r.event=e;var n=i.currentIdx,a=i.data[n===-1?t.getDataIndexFromEvent(e):n];t.clickHandlerForSingleX.bind(this)(a,t)}).datum({multipleX:!1});if(r.inputType===`mouse`){var o=function(e){var n=e?t.getDataIndexFromEvent(e):i.currentIdx;return n>-1?i.data[n]:null};a.on(`mouseover`,function(e){r.event=e,t.updateEventRect(),Object.values(t.$el.axisTooltip).forEach(function(e){return e?.style(`display`,null)})}).on(`mousemove`,function(e){var a=o(e);if(r.event=e,a){var s=a.index,c=n.line_step_type;if(n.line_step_tooltipMatch&&t.hasType(`step`)&&/^step\-(before|after)$/.test(c)){var l=t.scale.zoom||t.scale.x,u=t.axis.xs[s],d=l.invert(er(e,this)[0]);c===`step-after`&&d<u?--s:c===`step-before`&&d>u&&(s+=1)}t.showAxisGridFocus();var f=n.tooltip_grouped&&s===i.currentIdx;if(r.dragging||r.flowing||t.hasArcType()||f){n.tooltip_show&&f&&t.setTooltipPosition();return}s!==i.currentIdx&&(t.setOverOut(!1,i.currentIdx),i.currentIdx=s),s===-1?t.unselectRect():t.selectRectForSingle(this,s),t.setOverOut(s!==-1,s)}}).on(`mouseout`,function(e){r.event=e,!(!n||t.hasArcType()||i.currentIdx===-1||!n.interaction_onout)&&(t.hideAxisGridFocus(),t.unselectRect(),t.setOverOut(!1,i.currentIdx),i.currentIdx=-1)})}return a},clickHandlerForSingleX:function(e,t){var n=t,r=n.config,i=n.state,a=n.$el.main;if(!e||n.hasArcType()||i.cancelClick){i.cancelClick&&=!1;return}var o=e.index;a.selectAll(`.${$t.shape}-${o}`).each(function(e){var t;(r.data_selection_grouped||n.isWithinShape(this,e))&&((t=n.toggleShape)==null||t.call(n,this,e,o),r.data_onclick.bind(n.api)(e,this))})},generateEventRectsForMultipleXs:function(e){var t=this,n=t.config,r=t.state;e.on(`click`,function(e){r.event=e,t.clickHandlerForMultipleXS.bind(this)(t)}).datum({multipleX:!0}),r.inputType===`mouse`&&e.on(`mouseover mousemove`,function(e){r.event=e,t.selectRectForMultipleXs(this)}).on(`mouseout`,function(e){r.event=e,!(!t.config||t.hasArcType()||!n.interaction_onout)&&t.unselectRect()})},clickHandlerForMultipleXS:function(e){var t=e,n=t.config,r=t.state,i=t.filterTargetsToShow(t.data.targets);if(!t.hasArcType(i)){var a=er(r.event,this),o=t.findClosestFromTargets(i,a),s=t.getPointSensitivity(o);o&&(t.isBarType(o.id)||t.dist(o,a)<s)&&t.$el.main.selectAll(`.${$t.shapes}${t.getTargetSelectorSuffix(o.id)}`).selectAll(`.${$t.shape}-${o.index}`).each(function(){var e;(n.data_selection_grouped||t.isWithinShape(this,o))&&((e=t.toggleShape)==null||e.call(t,this,o,o.index),n.data_onclick.bind(t.api)(o,this))})}}},Ma={generateFlow:function(e){var t=this,n=t.data,r=t.state,i=t.$el;return function(){var a=e.flow.length;r.flowing=!0,n.targets.forEach(function(e){e.values.splice(0,a)}),t.updateXGrid&&t.updateXGrid(!0);var o={};[`axis.x`,`grid.x`,`gridLines.x`,`region.list`,`text`,`bar`,`line`,`area`,`circle`].forEach(function(e){var t=e.split(`.`),n=i[t[0]];n&&t.length>1&&(n=n[t[1]]),n?.size()&&(o[e]=n)}),t.hideGridFocus(),t.setFlowList(o,e)}},setFlowList:function(e,t){var n=this,r=t.flow,i=t.targets,a=r.duration,o=a===void 0?t.duration:a,s=r.index,c=r.length,l=r.orgDataCount,u=n.getFlowTransform(i,l,s,c),d=Kr(),f;d.add(Object.keys(e).map(function(t){return f=e[t].transition().ease(it).duration(o),f=t===`axis.x`?f.call(function(e){n.axis.x.setTransition(e).create(e)}):t===`region.list`?f.filter(n.isRegionOnX).attr(`transform`,u):f.attr(`transform`,u),f})),f.call(d,function(){n.cleanUpFlow(e,t)})},cleanUpFlow:function(e,t){var n=this,r=n.config,i=n.state,a=n.$el.svg,o=r.axis_rotated,s=t.flow,c=t.shape,l=t.xv,u=c.pos,d=u.cx,f=u.cy,p=u.xForText,m=u.yForText,h=s.done,g=h===void 0?function(){}:h,_=s.length;_&&([`circle`,`text`,`shape`,`eventRect`].forEach(function(e){for(var t=[],n=0;n<_;n++)t.push(`.${nn[e]}-${n}`);a.selectAll(`.${nn[`${e}s`]}`).selectAll(t).remove()}),a.select(`.${nn.xgrid}`).remove()),Object.keys(e).forEach(function(t){var a=e[t];t!==`axis.x`&&a.attr(`transform`,null),t===`grid.x`?a.attr(i.xgridAttr):t===`gridLines.x`?(a.attr(`x1`,o?0:l).attr(`x2`,o?i.width:l),a.select(`text`).attr(`x`,o?i.width:0).attr(`y`,l)):/^(area|bar|line)$/.test(t)?a.attr(`d`,c.type[t]):t===`text`?a.attr(`x`,p).attr(`y`,m).style(`fill-opacity`,n.opacityForText.bind(n)):t===`circle`?n.isCirclePoint()?a.attr(`cx`,d).attr(`cy`,f):a.attr(`x`,function(e){return d(e)-r.point_r}).attr(`y`,function(e){return f(e)-r.point_r}):t===`region.list`&&a.select(`rect`).filter(n.isRegionOnX).attr(`x`,n.regionX.bind(n)).attr(`width`,n.regionWidth.bind(n))}),r.interaction_enabled&&n.redrawEventRect(),g.call(n.api),i.flowing=!1},getFlowTransform:function(e,t,n,r){var i=this,a=i.data,o=i.scale.x,s=a.targets[0].values,c=i.getValueOnIndex(s,n),l=i.getValueOnIndex(s,n+r),u,d=o.domain(),f=i.updateXDomain(e,!0,!0);t?u=t===1||c?.x===l?.x||i.axis.isTimeSeries()?o(d[0])-o(f[0]):o(c?.x||0)-o(l.x):s.length===1?i.axis.isTimeSeries()?(c=i.getValueOnIndex(s,0),l=i.getValueOnIndex(s,s.length-1),u=o(c.x)-o(l.x)):u=Wn(f)/2:u=o(d[0])-o(f[0]);var p=Wn(d)/Wn(f);return`translate(${u},0) scale(${p},1)`}},Na={initClip:function(){var e=this,t=e.state,n=t.clip;n.id=`${t.datetimeId}-clip`,n.idXAxis=`${n.id}-xaxis`,n.idYAxis=`${n.id}-yaxis`,n.idGrid=`${n.id}-grid`,n.path=e.getClipPath(n.id),n.pathXAxis=e.getClipPath(n.idXAxis),n.pathYAxis=e.getClipPath(n.idYAxis),n.pathGrid=e.getClipPath(n.idGrid)},getClipPath:function(e){var t=this.config;return!t.clipPath&&/-clip$/.test(e)||!t.axis_x_clipPath&&/-clip-xaxis$/.test(e)||!t.axis_y_clipPath&&/-clip-yaxis$/.test(e)?null:`url(#${e})`},appendClip:function(e,t){t&&e.append(`clipPath`).attr(`id`,t).append(`rect`)},setXAxisClipPath:function(e){var t=this,n=t.config,r=t.state,i=r.margin,a=r.width,o=r.height,s=n.axis_rotated,c=Math.max(30,i.left)-(s?0:20),l=(s?i.top+o+10:i.bottom)+20,u=s?-(1+c):-(c-1),d=-15,f=s?i.left+20:a+10+c;e.attr(`x`,u).attr(`y`,d).attr(`width`,f).attr(`height`,l)},setYAxisClipPath:function(e){var t=this,n=t.config,r=t.state,i=r.margin,a=r.width,o=r.height,s=n.axis_rotated,c=Math.max(30,i.left)-(s?20:0),l=n.axis_y_inner,u=l&&!s?n.axis_y_label.text?-20:-1:s?-(1+c):-(c-1),d=-(s?20:i.top),f=(s?a+15+c:i.left+20)+(l?20:0),p=(s?i.bottom+10:i.top+o)+10;e.attr(`x`,u).attr(`y`,d).attr(`width`,f).attr(`height`,p)},updateXAxisTickClip:function(){var e=this,t=e.config,n=e.state,r=n.clip,i=n.xAxisHeight,a=e.$el.defs,o=e.getHorizontalAxisHeight(`x`);if(a&&!r.idXAxisTickTexts){var s=`${r.id}-xaxisticktexts`;e.appendClip(a,s),r.pathXAxisTickTexts=e.getClipPath(r.idXAxisTickTexts),r.idXAxisTickTexts=s}!t.axis_x_tick_multiline&&e.getAxisTickRotate(`x`)&&o!==i&&(e.setXAxisTickClipWidth(),e.setXAxisTickTextClipPathWidth()),e.state.xAxisHeight=o},setXAxisTickClipWidth:function(){var e=this,t=e.config,n=e.state.current.maxTickSize,r=e.getAxisTickRotate(`x`);if(!t.axis_x_tick_multiline&&r){var i=Math.sin(Math.PI/180*Math.abs(r));n.x.clipPath=(e.getHorizontalAxisHeight(`x`)-20)/i}else n.x.clipPath=null},setXAxisTickTextClipPathWidth:function(){var e=this,t=e.state,n=t.clip,r=t.current,i=e.$el.svg;i&&i.select(`#${n.idXAxisTickTexts} rect`).attr(`width`,r.maxTickSize.x.clipPath).attr(`height`,30)}},Pa=function(e){return U(e.position)||`end`},Fa=function(e){return e.position===`start`?4:e.position===`middle`?0:-4};function Ia(e,t,n){return function(r){var i=e?0:t;return r.position===`start`?i=e?-n:0:r.position===`middle`&&(i=(e?-n:t)/2),i}}function La(e,t){e.each(function(){var e=A(this);[`x1`,`x2`,`y1`,`y2`].forEach(function(t){return e.attr(t,+e.attr(t))})})}var Ra={hasGrid:function(){var e=this.config;return[`x`,`y`].some(function(t){return e[`grid_${t}_show`]||e[`grid_${t}_lines`].length})},initGrid:function(){var e=this;e.hasGrid()&&e.initGridLines(),e.initFocusGrid()},initGridLines:function(){var e=this,t=e.config,n=e.state.clip,r=e.$el;(t.grid_x_lines.length||t.grid_y_lines.length)&&(r.gridLines.main=r.main.insert(`g`,`.${P.chart}${t.grid_lines_front?` + *`:``}`).attr(`clip-path`,n.pathGrid).attr(`class`,`${z.grid} ${z.gridLines}`),r.gridLines.main.append(`g`).attr(`class`,z.xgridLines),r.gridLines.main.append(`g`).attr(`class`,z.ygridLines),r.gridLines.x=We([]))},updateXGrid:function(e){var t=this,n=t.config,r=t.scale,i=t.state,a=t.$el,o=a.main,s=a.grid,c=n.axis_rotated,l=t.generateGridData(n.grid_x_type,r.x),u=t.axis.isCategorized()?t.axis.x.tickOffset():0,d=function(e){return(r.zoom||r.x)(e)+u*(c?-1:1)};i.xgridAttr=c?{x1:0,x2:i.width,y1:d,y2:d}:{x1:d,x2:d,y1:0,y2:i.height},s.x=o.select(`.${z.xgrids}`).selectAll(`.${z.xgrid}`).data(l),s.x.exit().remove(),s.x=s.x.enter().append(`line`).attr(`class`,z.xgrid).merge(s.x),e||s.x.each(function(){var e=A(this);Object.keys(i.xgridAttr).forEach(function(t){e.attr(t,i.xgridAttr[t]).style(`opacity`,function(){return e.attr(c?`y1`:`x1`)===(c?i.height:0)?`0`:null})})})},updateYGrid:function(){var e=this,t=e.axis,n=e.config,r=e.scale,i=e.state,a=e.$el,o=a.grid,s=a.main,c=n.axis_rotated,l=function(e){return r.y(e)},u=t.y.getGeneratedTicks(n.grid_y_ticks)||e.scale.y.ticks(n.grid_y_ticks);o.y=s.select(`.${z.ygrids}`).selectAll(`.${z.ygrid}`).data(u),o.y.exit().remove(),o.y=o.y.enter().append(`line`).attr(`class`,z.ygrid).merge(o.y),o.y.attr(`x1`,c?l:0).attr(`x2`,c?l:i.width).attr(`y1`,c?0:l).attr(`y2`,c?i.height:l),La(o.y)},updateGrid:function(){var e=this,t=e.$el,n=t.grid;!t.gridLines.main&&e.initGridLines(),n.main.style(`visibility`,e.hasArcType()?`hidden`:null),e.hideGridFocus(),e.updateGridLines(`x`),e.updateGridLines(`y`)},updateGridLines:function(e){var t=this,n=t.config,r=t.$el,i=r.gridLines,a=r.main,o=t.$T,s=n.axis_rotated,c=e===`x`;n[`grid_${e}_show`]&&t[`update${e.toUpperCase()}Grid`]();var l=a.select(`.${z[`${e}gridLines`]}`).selectAll(`.${z[`${e}gridLine`]}`).data(n[`grid_${e}_lines`]);o(l.exit()).style(`opacity`,`0`).remove();var u=l.enter().append(`g`);u.append(`line`).style(`opacity`,`0`),l=u.merge(l),l.each(function(e){var t=A(this);t.select(`text`).empty()&&e.text&&t.append(`text`).style(`opacity`,`0`)}),o(l.attr(`class`,function(t){return`${z[`${e}gridLine`]} ${t.class||``}`.trim()}).select(`text`).attr(`text-anchor`,Pa).attr(`transform`,function(){return c?s?null:`rotate(-90)`:s?`rotate(-90)`:null}).attr(`dx`,Fa).attr(`dy`,-5)).text(function(e){return e.text??this.remove()}),i[e]=l},redrawGrid:function(e){var t=this,n=t.config.axis_rotated,r=t.state,i=r.width,a=r.height,o=t.$el.gridLines,s=t.$T,c=t.xv.bind(t),l=t.yv.bind(t),u=o.x.select(`line`),d=o.x.select(`text`),f=o.y.select(`line`),p=o.y.select(`text`);return u=s(u,e).attr(`x1`,n?0:c).attr(`x2`,n?i:c).attr(`y1`,n?c:0).attr(`y2`,n?c:a),d=s(d,e).attr(`x`,Ia(!n,i,a)).attr(`y`,c),f=s(f,e).attr(`x1`,n?l:0).attr(`x2`,n?l:i).attr(`y1`,n?0:l).attr(`y2`,n?a:l),p=s(p,e).attr(`x`,Ia(n,i,a)).attr(`y`,l),[u.style(`opacity`,null),d.style(`opacity`,null),f.style(`opacity`,null),p.style(`opacity`,null)]},initFocusGrid:function(){var e=this,t=e.config,n=e.state.clip,r=e.$el,i=t.grid_front,a=`.${i&&r.gridLines.main?z.gridLines:P.chart}${i?` + *`:``}`,o=r.main.insert(`g`,a).attr(`clip-path`,n.pathGrid).attr(`class`,z.grid);if(r.grid.main=o,t.grid_x_show&&o.append(`g`).attr(`class`,z.xgrids),t.grid_y_show&&o.append(`g`).attr(`class`,z.ygrids),t.axis_tooltip){var s=o.append(`g`).attr(`class`,`bb-axis-tooltip`);s.append(`line`).attr(`class`,`bb-axis-tooltip-x`),s.append(`line`).attr(`class`,`bb-axis-tooltip-y`)}t.interaction_enabled&&t.grid_focus_show&&!t.axis_tooltip&&(o.append(`g`).attr(`class`,R.xgridFocus).append(`line`).attr(`class`,R.xgridFocus),t.grid_focus_y&&!t.tooltip_grouped&&o.append(`g`).attr(`class`,R.ygridFocus).append(`line`).attr(`class`,R.ygridFocus))},showAxisGridFocus:function(){for(var e=this,t=e.config,n=e.format,r=e.state,i=r.event,a=r.width,o=r.height,s=t.axis_rotated,c=er(i,e.$el.eventRect?.node()),l=c[0],u=c[1],d={x:l,y:u},f=0,p=Object.entries(e.$el.axisTooltip);f<p.length;f++){var m=p[f],h=m[0],g=m[1],_=h===`x`&&!s||h!==`x`&&s?`x`:`y`,v=d[_],y=e.scale[h]?.invert(v);y&&(y=h===`x`&&e.axis.isTimeSeries()?n.xAxisTick(y):y?.toFixed(2),g?.attr(_,v).text(y))}e.$el.main.selectAll(`line.bb-axis-tooltip-x, line.bb-axis-tooltip-y`).style(`visibility`,null).each(function(e,t){var n=A(this);t===0?n.attr(`x1`,l).attr(`x2`,l).attr(`y1`,t?0:o).attr(`y2`,t?o:0):n.attr(`x1`,t?0:a).attr(`x2`,t?a:0).attr(`y1`,u).attr(`y2`,u)})},hideAxisGridFocus:function(){var e=this;e.$el.main.selectAll(`line.${Ht.axisTooltipX}, line.${Ht.axisTooltipY}`).style(`visibility`,`hidden`),Object.values(e.$el.axisTooltip).forEach(function(e){return e?.style(`display`,`none`)})},showGridFocus:function(e){var t,n=this,r=n.config,i=n.state,a=i.width,o=i.height,s=r.axis_rotated,c=n.$el.main.selectAll(`line.${R.xgridFocus}, line.${R.ygridFocus}`),l=(e||[c.datum()]).filter(function(e){return e&&U(n.getBaseValue(e))});if(!(!r.tooltip_show||l.length===0||!r.axis_x_forceAsSingle&&n.hasType(`bubble`)||n.hasArcType())){var u=r.grid_focus_edge&&!r.tooltip_grouped,d=n.xx.bind(n);c.style(`visibility`,null).data(l.concat(l)).each(function(e){var t=A(this),r={x:d(e),y:n.getYScaleById(e.id)(e.value)},i;if(t.classed(R.xgridFocus))i=s?[null,r.x,u?r.y:a,r.x]:[r.x,u?r.y:null,r.x,o];else{var c=n.axis.getId(e.id)===`y2`;i=s?[r.y,u&&!c?r.x:null,r.y,u&&c?r.x:o]:[u&&c?r.x:null,r.y,u&&!c?r.x:a,r.y]}[`x1`,`y1`,`x2`,`y2`].forEach(function(e,n){return t.attr(e,i[n])})}),La(c),(t=n.showCircleFocus)==null||t.call(n,e)}},hideGridFocus:function(){var e,t=this,n=t.state,r=n.inputType,i=n.resizing,a=t.$el.main;(r===`mouse`||!i)&&(a.selectAll(`line.${R.xgridFocus}, line.${R.ygridFocus}`).style(`visibility`,`hidden`),(e=t.hideCircleFocus)==null||e.call(t))},updateGridFocus:function(){var e,t=this,n=t.state,r=n.inputType,i=n.width,a=n.height,o=n.resizing,s=t.$el.grid.main.select(`line.${R.xgridFocus}`);if(r===`touch`)s.empty()?o&&((e=t.showCircleFocus)==null||e.call(t)):t.showGridFocus();else{var c=t.config.axis_rotated;s.attr(`x1`,c?0:-10).attr(`x2`,c?i:-10).attr(`y1`,c?-10:0).attr(`y2`,c?-10:a)}return!0},generateGridData:function(e,t){var n=this,r=n.$el.main.select(`.${Ht.axisX}`).selectAll(`.tick`).size(),i=[];if(e===`year`)for(var a=n.getXDomain().map(function(e){return e.getFullYear()}),o=a[0],s=a[1],c=o;c<=s;c++)i.push(new Date(`${c}-01-01 00:00:00`));else i=t.ticks(10),i.length>r&&(i=i.filter(function(e){return String(e).indexOf(`.`)<0}));return i},getGridFilterToRemove:function(e){return e?function(t){var n=!1;return(X(e)?e.concat():[e]).forEach(function(e){(`value`in e&&t.value===e.value||`class`in e&&t.class===e.class)&&(n=!0)}),n}:function(){return!0}},removeGridLines:function(e,t){var n=this,r=n.config,i=n.$T,a=n.getGridFilterToRemove(e),o=function(e){return!a(e)},s=t?z.xgridLines:z.ygridLines,c=t?z.xgridLine:z.ygridLine;i(n.$el.main.select(`.${s}`).selectAll(`.${c}`).filter(a)).style(`opacity`,`0`).remove();var l=`grid_${t?`x`:`y`}_lines`;r[l]=r[l].filter(o)}},za={initRegion:function(){var e=this,t=e.$el;t.region.main=t.main.insert(`g`,`:first-child`).attr(`clip-path`,e.state.clip.path).attr(`class`,Qt.regions)},updateRegion:function(){var e=this,t=e.config,n=e.$el.region,r=e.$T;n.main||e.initRegion(),n.main.style(`visibility`,e.hasArcType()?`hidden`:null);var i=n.main.selectAll(`.${Qt.region}`).data(t.regions);r(i.exit()).style(`opacity`,`0`).remove();var a=i.enter().append(`g`);a.append(`rect`).style(`fill-opacity`,`0`),n.list=a.merge(i).attr(`class`,e.classRegion.bind(e)),n.list.each(function(e){A(this).select(`text`).empty()&&e.label?.text&&A(this).append(`text`).style(`opacity`,`0`)})},redrawRegion:function(e){var t=this,n=t.$el.region,r=t.$T,i=t.regionX.bind(t),a=t.regionY.bind(t),o=[`width`,`height`],s=n.list.select(`rect`),c=n.list.selectAll(`text`);return s=r(s,e).attr(`x`,i).attr(`y`,a).attr(`width`,t.regionWidth.bind(t)).attr(`height`,t.regionHeight.bind(t)),c=r(c,e).text(function(e){return e.label?.text}).attr(`transform`,function(e){return e.label.rotated?` rotate(-90)`:null}).attr(`transform`,function(e){var t=this,n=e.label??{},r=n.x,s=r===void 0?0:r,c=n.y,l=c===void 0?0:c,u=n.center,d=u===void 0?!1:u,f=n.rotated,p=f===void 0?!1:f,m=this.previousElementSibling,h={x:0,y:0};return G(d)&&[`x`,`y`].forEach(function(e,n){d.indexOf(e)>-1&&(h[e]=(+m.getAttribute(o[n])-nr(t)[o[n]])/2)}),`translate(${i(e)+h.x+s}, ${a(e)+h.y+l})${p?` rotate(-90)`:``}`}).attr(`text-anchor`,function(e){return e.label?.rotated?`end`:null}).attr(`dy`,`1em`).style(`fill`,function(e){return e.label?.color??null}),[s.style(`fill-opacity`,function(e){return U(e.opacity)?e.opacity:null}).on(`end`,function(){A(this.parentNode).selectAll(`rect:not([x])`).remove()}),c.style(`opacity`,null)]},regionX:function(e){return this.getRegionSize(`x`,e)},regionY:function(e){return this.getRegionSize(`y`,e)},regionWidth:function(e){return this.getRegionSize(`width`,e)},regionHeight:function(e){return this.getRegionSize(`height`,e)},getRegionSize:function(e,t){var n=this,r=n.config,i=n.scale,a=n.state,o=r.axis_rotated,s=/(x|y|y2)/.test(e),c=s?e===`x`:e===`width`,l=!s&&n[c?`regionX`:`regionY`](t),u=s?`start`:`end`,d=s?0:a[e],f;if(t.axis===`y`||t.axis===`y2`?(!s&&!c?u=`start`:s&&!c&&(u=`end`),(c?o:!o)&&u in t&&(f=i[t.axis])):(c?!o:o)&&u in t&&(f=i.zoom||i.x),f){var p=0;d=t[u],n.axis.isTimeSeries(t.axis)?d=wr.call(n,d):/(x|width)/.test(e)&&n.axis.isCategorized()&&isNaN(d)&&(d=r.axis_x_categories.indexOf(d),p=n.axis.x.tickOffset()*(u===`start`?-1:1)),d=f(d)+p}return s?d:d<l?0:d-l},isRegionOnX:function(e){return!e.axis||e.axis===`x`}},Ba={getAxisSize:function(e){var t=this,n=t.config.axis_rotated;return n&&e===`x`||!n&&/y2?/.test(e)?t.getAxisWidthByAxisId(e,!0):t.getHorizontalAxisHeight(e)},getAxisWidthByAxisId:function(e,t){var n=this;if(n.axis){var r=n.axis?.getLabelPositionById(e),i=n.axis.getMaxTickSize(e,t).width,a=i===0?.5:0;return i+(n.config.padding?.mode===`fit`?r.isInner?10+a:10:r.isInner?20+a:40)}else return 40},getHorizontalAxisHeight:function(e){var t=this,n=t.config,r=t.state,i=r.rotatedPadding,a=r.isLegendRight,o=r.isLegendInset,s=n.axis_rotated,c=n.padding?.mode===`fit`,l=n[`axis_${e}_inner`],u=n[`axis_${e}_label`].text,d=13,f=n.padding?.mode===`fit`?l&&!u?+(e===`y`):20:30;if(e===`x`&&!n.axis_x_show)return 8;if(e===`x`&&K(n.axis_x_height))return n.axis_x_height;if(e===`y`&&!n.axis_y_show)return n.legend_show&&!a&&!o?10:1;if(e===`y2`&&!n.axis_y2_show)return c?0:i.top;var p=t.axis.getMaxTickSize(e),m=Math.abs(n.axis_x_tick_rotate)>0&&(!n.axis_x_tick_autorotate||t.needToRotateXAxisTickTexts());return(n.axis_x_tick_multiline||m)&&p.height>d&&(f+=p.height-d),f+(t.axis.getLabelPositionById(e).isInner?0:10)+(e===`y2`&&!s?-10:0)},getEventRectWidth:function(){var e=this,t=e.config,n=e.axis,r=t.axis_x_inverted,i=n.x.tickInterval();return Math.max(0,r?Math.abs(i):i)},getAxisTickRotate:function(e){var t=this,n=t.axis,r=t.config,i=t.state,a=t.$el,o=r[`axis_${e}_tick_rotate`];if(e===`x`){var s=n.isCategorized()||n.isTimeSeries();if(r.axis_x_tick_fit&&s){var c=r.axis_x_tick_count,l=i.current.maxTickSize.x.ticks.length,u=0;if(c?u=c>l?l:c:l&&(u=l),u!==i.axis.x.tickCount){var d=t.data.targets;i.axis.x.padding=t.getXDomainPadding([t.getXDomainMinMax(d,`min`),t.getXDomainMinMax(d,`max`)],u)}i.axis.x.tickCount=u}a.svg&&r.axis_x_tick_autorotate&&r.axis_x_tick_fit&&!r.axis_x_tick_multiline&&!r.axis_x_tick_culling&&s&&(o=t.needToRotateXAxisTickTexts()?r.axis_x_tick_rotate:0)}return o},needToRotateXAxisTickTexts:function(){var e=this,t=e.state,n=t.axis,r=t.current,i=t.isLegendRight,a=t.legendItemWidth,o=i&&a,s=r.width-o-e.getCurrentPaddingByDirection(`left`)-e.getCurrentPaddingByDirection(`right`),c=n.x.tickCount+n.x.padding.left+n.x.padding.right;return e.axis.getMaxTickSize(`x`).width>(c?s/c:0)}},Va=M(M(M({axis_evalTextSize:!0,axis_rotated:!1,axis_tooltip:!1},{axis_x_clipPath:!0,axis_x_show:!0,axis_x_forceAsSingle:!1,axis_x_type:`indexed`,axis_x_localtime:!0,axis_x_categories:[],axis_x_tick_centered:!1,axis_x_tick_format:void 0,axis_x_tick_culling:{},axis_x_tick_culling_max:10,axis_x_tick_culling_lines:!0,axis_x_tick_culling_reverse:!1,axis_x_tick_count:void 0,axis_x_tick_inner:!1,axis_x_tick_show:!0,axis_x_tick_text_show:!0,axis_x_tick_text_inner:!1,axis_x_tick_text_position:{x:0,y:0},axis_x_tick_fit:!0,axis_x_tick_values:null,axis_x_tick_autorotate:!1,axis_x_tick_rotate:0,axis_x_tick_outer:!0,axis_x_tick_multiline:!0,axis_x_tick_width:null,axis_x_tick_tooltip:!1,axis_x_max:void 0,axis_x_min:void 0,axis_x_inverted:!1,axis_x_padding:{},axis_x_height:void 0,axis_x_extent:void 0,axis_x_label:{},axis_x_axes:[]}),{axis_y_clipPath:!0,axis_y_show:!0,axis_y_type:`indexed`,axis_y_max:void 0,axis_y_min:void 0,axis_y_inverted:!1,axis_y_center:void 0,axis_y_inner:!1,axis_y_label:{},axis_y_tick_format:void 0,axis_y_tick_culling:!1,axis_y_tick_culling_max:5,axis_y_tick_culling_lines:!0,axis_y_tick_culling_reverse:!1,axis_y_tick_inner:!1,axis_y_tick_outer:!0,axis_y_tick_values:null,axis_y_tick_rotate:0,axis_y_tick_count:void 0,axis_y_tick_show:!0,axis_y_tick_stepSize:null,axis_y_tick_text_show:!0,axis_y_tick_text_position:{x:0,y:0},axis_y_tick_time_value:void 0,axis_y_padding:{},axis_y_default:void 0,axis_y_axes:[]}),{axis_y2_show:!1,axis_y2_type:`indexed`,axis_y2_max:void 0,axis_y2_min:void 0,axis_y2_inverted:!1,axis_y2_center:void 0,axis_y2_inner:!1,axis_y2_label:{},axis_y2_tick_format:void 0,axis_y2_tick_culling:!1,axis_y2_tick_culling_max:5,axis_y2_tick_culling_lines:!0,axis_y2_tick_culling_reverse:!1,axis_y2_tick_inner:!1,axis_y2_tick_outer:!0,axis_y2_tick_values:null,axis_y2_tick_rotate:0,axis_y2_tick_count:void 0,axis_y2_tick_show:!0,axis_y2_tick_stepSize:null,axis_y2_tick_text_show:!0,axis_y2_tick_text_position:{x:0,y:0},axis_y2_padding:{},axis_y2_default:void 0,axis_y2_axes:[]}),Ha={grid_x_show:!1,grid_x_type:`tick`,grid_x_lines:[],grid_y_show:!1,grid_y_lines:[],grid_y_ticks:void 0,grid_focus_edge:!1,grid_focus_show:!0,grid_focus_y:!1,grid_front:!1,grid_lines_front:!0},Ua={data_xs:{},data_xFormat:`%Y-%m-%d`,data_xLocaltime:!0,data_xSort:!0,data_axes:{},data_regions:{},data_stack_normalize:!1},Wa=[pa,ma,ha,xa,Sa,Ta,Ea],Ga={axis:ka,clip:Na,eventrect:ja,flow:Ma,grid:Ra,region:za,sizeAxis:Ba},Ka={optDataAxis:Ua,optAxis:Va,optGrid:Ha},qa=15,Ja=20,Ya=.35;function Xa(e){e===void 0&&(e=!1);var t=this;return[`donut`,`pie`,`polar`,`gauge`].find(function(n){return t.hasType(n)&&!(n===`gauge`&&e&&t.hasMultiArcGauge())})}function Za(){var e=this,t=e.config,n=Xa.call(e,!0),r=n&&t[`${n}_label_line`],i=Gn(r),a=function(e,t,n){return n},o={show:r===!0||i&&r?.show!==!1,distance:i&&r?.distance||Ja};if(r===!0)return{chartType:n,line:o,text:{formatter:a}};if(!i)return{chartType:n,line:{show:!1,distance:Ja},text:{formatter:null}};var s=a;return W(r.text)?s=r.text:r.text===!1&&(s=null),{chartType:n,line:o,text:{formatter:s}}}function Qa(e,t){var n=this,r=n.state,i=n.updateAngle(e);if(!i)return null;var a=n.getRadius(e).outerRadius,o=a;n.hasType(`polar`)&&(o=n.getPolarOuterRadius(e,a),a=r.radius);var s=(i.startAngle+i.endAngle)/2;Math.abs(i.endAngle-i.startAngle-2*Math.PI)<.01&&(s=Math.PI/2);var c=Math.sin(s),l=-Math.cos(s),u={x:c*o,y:l*o},d=a+qa,f={x:c*d,y:l*d},p=c>=0;return{startPoint:u,breakPoint:f,endPoint:{x:f.x+t*(p?1:-1),y:f.y},isRight:p,midAngle:s}}function $a(){return Za.call(this).line.show}function eo(e){var t=this,n=t.$el.arcs,r=t.$T,i=Za.call(t),a=i.line,o=i.text,s=a.distance,c=null;n.selectAll(`.${F.chartArc}`).each(function(n){var i=A(this),l=Qa.call(t,n,s),u=n._cache??{},d=u.ratio,f=u.meetsThreshold,p=u.updated;if(!(!p||!l)){var m=t.isTargetToShow(n.data.id)&&f,h=l.startPoint,g=l.breakPoint,_=l.endPoint,v=l.isRight,y=`${h.x},${h.y} ${g.x},${g.y} ${_.x},${_.y}`;if(a.show){var b=i.select(`.${F.arcLabelLine}`);b.empty()&&(b=i.append(`polyline`).attr(`class`,F.arcLabelLine)),r(b,e).attr(`points`,y).style(`stroke`,t.color(n.data)).style(`opacity`,m?null:`0`)}var x=i.select(`.${F.arcLabelLineText}`);if(x.empty()&&(x=i.append(`text`).attr(`class`,F.arcLabelLineText).style(`pointer-events`,`none`)),m){var S=p.value,C=n.data.id,w=(o.formatter??t.getArcLabelConfig(`format`)??t.defaultArcValueFormat)(S,d,C).toString();Zn(x,w,[-1,1],!1);var T={x:_.x+5*(v?1:-1),y:_.y};x.style(`text-anchor`,v?`start`:`end`);var E=x.node(),D=E?.querySelectorAll(`tspan`);if(c===null&&(c=parseFloat(H.getComputedStyle(E).fontSize)||12),D&&D.length>1){var O=(D.length-3)/2;T.y+=(-O+Ya)*c}else T.y+=Ya*c;r(x,e).attr(`transform`,`translate(${T.x},${T.y})`).style(`opacity`,null).style(`fill`,t.updateTextColor.bind(t)(n))}else r(x,e).style(`opacity`,`0`)}})}function to(e){return[`donut`,`pie`,`polar`,`gauge`].find(function(t){return e.hasType(t)})}function no(e,t,n,r){var i=e.config,a=e.state.radiusExpanded,o=n.endAngle-Math.PI/2,s=Math.sin(o),c={x:Math.cos(o)*(a+(r?5:25)),y:s*(a+15-Math.abs(s*10))+3};if(r){var l=i.arc_rangeText_position;if(l){var u=i.arc_rangeText_values,d=W(l)?l(u[t.index]):l;c.x+=d?.x??0,c.y+=d?.y??0}}return c}function ro(e,t,n,r){var i=e.config,a=to(e),o=a?i[`${a}_label_ratio`]:void 0;if(o)o=W(o)?o.bind(e.api)(t,n,r):o;else{var s=36,c=.375,l=1.175,u=.8,d=s/n;o=n&&r?(d>c?l-d:u)*n/r:0}return o}function io(e,t,n){var r=e.getRadius(t).outerRadius;e.hasType(`polar`)&&(r=e.getPolarOuterRadius(t,r));var i=e.svgArc.centroid(n).map(function(e){return isNaN(e)?0:e}),a=i[0],o=i[1],s=Math.sqrt(a*a+o*o),c=ro(e,t,r,s);return{pos:{x:a,y:o},ratio:c}}function ao(e){e===void 0&&(e=0);var t=this,n=t.config,r=t.state,i=t.hasMultiArcGauge(),a=r.gaugeArcWidth/t.filterTargetsToShow(t.data.targets).length,o=e?Math.min(r.radiusExpanded*e-r.radius,a*.8-(1-e)*100):0;return{inner:function(e){var n=t.getRadius(e).innerRadius;return i?r.radius-a*(e.index+1):K(n)?n:0},outer:function(n){var s=t.getRadius(n).outerRadius,c;if(i)c=r.radius-a*n.index+o;else if(t.hasType(`polar`)&&!e)c=t.getPolarOuterRadius(n,s);else if(c=s,e){var l=r.radiusExpanded;r.radius!==s&&(l-=Math.abs(r.radius-s)),c=l*e}return c},corner:function(e,r){var i=n.arc_cornerRadius_ratio,a=i===void 0?0:i,o=n.arc_cornerRadius,s=o===void 0?0:o,c=e.data.id,l=e.value,u=0;return u=a?a*r:K(s)?s:s.call(t.api,c,l,r),u}}}function oo(e){return function(t){var n=function(e){var t=e.startAngle,n=t===void 0?0:t,r=e.endAngle,i=r===void 0?0:r,a=e.padAngle;return{startAngle:n,endAngle:i,padAngle:a===void 0?0:a}},r=f(n(this._current),n(t));return this._current=t,function(n){var i=r(n),a=t.data,o=t.index,s=t.value;return e(M(M({},i),{data:a,index:o,value:s}))}}}var so={initPie:function(){var e=this,t=e.config,n=t.data_type,r=t[`${n}_padding`],i=t[`${n}_startingAngle`]||0,a=(r?r*.01:t[`${n}_padAngle`])||0;e.pie=Be().startAngle(i).endAngle(i+2*Math.PI).padAngle(a).value(function(e){return e.values?.reduce(function(e,t){return e+t.value},0)??e}).sort(e.getSortCompareFn.bind(e)(!0))},updateRadius:function(){var e=this,t=e.config,n=e.state,r=t[`${t.data_type}_padding`],i=t.gauge_width||t.donut_width,a=e.filterTargetsToShow(e.data.targets).length*t.gauge_arcs_minWidth,o=.85,s=$a.call(e)?o:1;n.radiusExpanded=Math.min(n.arcWidth,n.arcHeight)/2*(e.hasMultiArcGauge()&&t.gauge_label_show?o:s),n.radius=n.radiusExpanded*.95,n.innerRadiusRatio=i?(n.radius-i)/n.radius:.6,n.gaugeArcWidth=i||(a<=n.radius-n.innerRadius?n.radius-n.innerRadius:a<=n.radius?a:n.radius);var c=t.pie_innerRadius||(r?r*(n.innerRadiusRatio+.1):0);n.outerRadius=t.pie_outerRadius,n.innerRadius=e.hasType(`donut`)||e.hasType(`gauge`)?n.radius*n.innerRadiusRatio:c},getRadius:function(e){var t=this,n=e?.data,r=t.state,i=r.innerRadius,a=r.outerRadius;return!K(i)&&n&&(i=i[n.id]||0),Z(a)&&n&&n.id in a?a=a[n.id]:K(a)||(a=t.state.radius),{innerRadius:i,outerRadius:a}},updateArc:function(){var e=this;e.updateRadius(),e.svgArc=e.getSvgArc(),e.svgArcExpanded=e.getSvgArcExpanded()},getArcLength:function(){var e=this.config.gauge_arcLength*3.6,t=e/360*2;return e<-360?t=-2:e>360&&(t=2),t*Math.PI},getStartingAngle:function(){var e=this,t=e.config,n=t.data_type,r=e.hasType(`gauge`)?t.gauge_fullCircle:!1,i=-1*Math.PI/2,a=Math.PI/2,o=t[`${n}_startingAngle`]||0;return!r&&o<=i?o=i:!r&&o>=a?o=a:(o>Math.PI||o<-1*Math.PI)&&(o=Math.PI),o},updateAngle:function(e,t){t===void 0&&(t=!1);var n=this,r=n.config,i=n.state,a=t&&n.hasType(`gauge`),o=n.pie,s=e,c=!1;if(!r)return null;var l=n.getStartingAngle(),u=r.gauge_fullCircle||t&&!a?n.getArcLength():l*-2;if(s.data&&n.isGaugeType(s.data)&&!n.hasMultiArcGauge()){var d=r.gauge_min,f=r.gauge_max,p=u*((n.getTotalDataSum(i.rendered)-d)/(f-d));o=o.startAngle(l).endAngle(p+l)}if(t===!1&&o(n.filterTargetsToShow()).forEach(function(e,t){!c&&e.data.id===s.data?.id&&(c=!0,s=e,s.index=t)}),isNaN(s.startAngle)&&(s.startAngle=0),isNaN(s.endAngle)&&(s.endAngle=s.startAngle),t||s.data&&(r.gauge_enforceMinMax||n.hasMultiArcGauge())){var d=r.gauge_min,f=r.gauge_max,m=t&&!a?n.getTotalDataSum(i.rendered):f,h=u/(m-d),g=s.value??0,_=g<d?0:g<m?g-d:m-d;s.startAngle=l,s.endAngle=l+h*_}return c||t?s:null},getSvgArc:function(){var e=this,t=ao.call(e),n=t.inner,r=t.outer,i=t.corner,a=ze().innerRadius(n).outerRadius(r),o=function(t,n){var o=`M 0 0`;if(t.value||t.data){var s=n?t:e.updateAngle(t)??null;s&&(o=a.cornerRadius(i(s,r(s)))(s))}return o};return o.centroid=a.centroid,o},getSvgArcExpanded:function(e){e===void 0&&(e=1);var t=this,n=ao.call(t,e),r=n.inner,i=n.outer,a=n.corner,o=ze().innerRadius(r).outerRadius(i);return function(e){var n=t.updateAngle(e),r=i(n),s=0;return n&&(s=a(n,r)),n?o.cornerRadius(s)(n):`M 0 0`}},getArc:function(e,t,n){return n||this.isArcType(e.data)?this.svgArc(e,t):`M 0 0`},redrawArcRangeText:function(){var e=this,t=e.config,n=e.$el.arcs,r=e.state,i=e.$T,a=t.arc_rangeText_format,o=e.hasType(`gauge`)&&t.arc_rangeText_fixed,s=t.arc_rangeText_values;if(s?.length){var c=t.arc_rangeText_unit===`%`,l=e.getTotalDataSum(r.rendered);c&&(s=s.map(function(e){return l/100*e}));var u=e.pie(s).map(function(e,t){return e.index=t,e}),d=n.selectAll(`.${F.arcRange}`).data(s);d.exit(),d=i(d.enter().append(`text`).attr(`class`,F.arcRange).style(`text-anchor`,`middle`).style(`pointer-events`,`none`).style(`opacity`,`0`).text(function(e){var t=c?e/l*100:e;return W(a)?a(t):`${t}${c?`%`:``}`}).merge(d)),(!r.rendered||r.rendered&&!o)&&l>0&&d.attr(`transform`,function(t,n){return e.transformForArcLabel(this,u[n],!0)}),d.style(`opacity`,function(e){return!o&&(e>l||l===0)?`0`:null})}},transformForArcLabel:function(e,t,n){n===void 0&&(n=!1);var r=this,i=r.updateAngle(t,n);if(!i)return``;var a,o=1;if(n||r.hasMultiArcGauge())a=no(r,t,i,n);else if(!r.hasType(`gauge`)||r.data.targets.length>1){var s=io(r,t,i);a=s.pos,o=s.ratio}else return``;return Ii.call(r,e,a),`translate(${a.x*o},${a.y*o})`},convertToArcData:function(e){return this.addName({id:`data`in e?e.data.id:e.id,value:e.value,ratio:this.getRatio(`arc`,e),index:e.index})},textForArcLabel:function(e){var t=this,n=t.hasType(`gauge`),r=[`donut`,`gauge`,`pie`,`polar`].filter(t.hasType.bind(t))?.[0];t.shouldShowArcLabel()&&e.style(`fill`,t.updateTextColor.bind(t)).attr(`filter`,function(e){return t.updateTextBGColor.bind(t)(e,t.config.data_labels_backgroundColors)}).each(function(e){var i=A(this),a=t.updateAngle(e),o=t.getRatio(`arc`,a),s=Ni.call(t,o,r);if(e._cache={updated:a,ratio:o,meetsThreshold:s},s){var c=(a||e).value;Zn(i,(t.getArcLabelConfig(`format`)||t.defaultArcValueFormat)(c,o,e.data.id).toString(),[-1,1],n)}else i.text(``)})},expandArc:function(e){var t=this,n=t.state.transiting,r=t.$el;if(n){var i=setInterval(function(){n||(clearInterval(i),r.legend.selectAll(`.${R.legendItemFocused}`).size()>0&&t.expandArc(e))},10);return}var a=t.mapToTargetIds(e);r.svg.selectAll(t.selectorTargets(a,`.${F.chartArc}`)).each(function(e){if(t.shouldExpand(e.data.id)){var n=t.getExpandConfig(e.data.id,`duration`),r=t.getSvgArcExpanded(t.getExpandConfig(e.data.id,`rate`));A(this).selectAll(`path`).transition().duration(n).attrTween(`d`,oo(t.svgArcExpanded.bind(t))).transition().duration(n*2).attrTween(`d`,oo(r.bind(t)))}})},unexpandArc:function(e){var t=this,n=t.state.transiting,r=t.$el.svg;if(!n){var i=t.mapToTargetIds(e);r.selectAll(t.selectorTargets(i,`.${F.chartArc}`)).selectAll(`path`).transition().duration(function(e){return t.getExpandConfig(e.data.id,`duration`)}).attrTween(`d`,oo(t.svgArc.bind(t))),r.selectAll(`${F.arc}`).style(`opacity`,null)}},getExpandConfig:function(e,t){var n=this,r=n.config,i={duration:50,rate:.98},a;return n.isDonutType(e)?a=`donut`:n.isGaugeType(e)?a=`gauge`:n.isPieType(e)&&(a=`pie`),a?r[`${a}_expand_${t}`]:i[t]},shouldExpand:function(e){var t=this,n=t.config;return t.isDonutType(e)&&n.donut_expand||t.isGaugeType(e)&&n.gauge_expand||t.isPieType(e)&&n.pie_expand},shouldShowArcLabel:function(){var e=this,t=e.config;return[`donut`,`gauge`,`pie`,`polar`].some(function(n){return e.hasType(n)&&t[`${n}_label_show`]})},getArcLabelConfig:function(e){e===void 0&&(e=`format`);var t=this,n=t.config,r=function(e){return e};return[`donut`,`gauge`,`pie`,`polar`].filter(t.hasType.bind(t)).forEach(function(t){r=n[`${t}_label_${e}`]}),e===`format`&&W(r)?r.bind(t.api):r},updateTargetsForArc:function(e){var t=this,n=t.$el,r=t.hasType(`gauge`),i=t.getChartClass(`Arc`),a=t.getClass(`arcs`,!0),o=t.classFocus.bind(t),s=n.main.select(`.${F.chartArcs}`),c=s.selectAll(`.${F.chartArc}`).data(t.pie(e)).attr(`class`,function(e){return i(e)+o(e.data)}),l=c.enter().append(`g`).attr(`class`,i).call(this.setCssRule(!1,`.${F.chartArcs} text`,[`pointer-events:none`,`text-anchor:middle`]));l.append(`g`).attr(`class`,a).merge(c),l.append(`text`).attr(`dy`,r&&!t.hasMultiTargets()?`-.1em`:null).style(`opacity`,`0`).style(`text-anchor`,t.getStylePropValue(`middle`)).style(`pointer-events`,t.getStylePropValue(`none`)),n.text=s.selectAll(`.${P.target} text`)},initArc:function(){var e=this,t=e.$el;t.arcs=t.main.select(`.${P.chart}`).append(`g`).attr(`class`,F.chartArcs).attr(`transform`,e.getTranslate(`arc`)),e.setArcTitle()},setArcTitle:function(e){var t=this,n=e||t.getArcTitle(),r=t.hasType(`gauge`);if(n){var i=r?Jt.chartArcsGaugeTitle:F.chartArcsTitle,a=t.$el.arcs.select(`.${i}`);a.empty()&&(a=t.$el.arcs.append(`text`).attr(`class`,i).style(`text-anchor`,`middle`)),r&&a.attr(`dy`,`-0.3em`),Zn(a,n,r?void 0:[-.6,1.35],!0)}},getArcTitle:function(){var e=this,t=e.hasType(`donut`)&&`donut`||e.hasType(`gauge`)&&`gauge`;return t?e.config[`${t}_title`]:``},getArcTitleWithNeedleValue:function(){var e=this,t=e.config,n=e.state,r=e.getArcTitle();if(r&&e.config.arc_needle_show&&/{=[A-Z_]+}/.test(r)){var i=n.current.needle;return K(i)||(i=t.arc_needle_value),Cr(r,{NEEDLE_VALUE:~~i})}return!1},redrawArc:function(e,t,n){var r=this,i=r.config,a=r.state,o=r.$el.main,s=i.interaction_enabled,c=s&&i.data_selection_isselectable,l=o.selectAll(`.${F.arcs}`).selectAll(`.${F.arc}`).data(r.arcData.bind(r));l.exit().transition().duration(t).style(`opacity`,`0`).remove(),l=l.enter().append(`path`).attr(`class`,r.getClass(`arc`,!0)).style(`fill`,function(e){return r.color(e.data)}).style(`cursor`,function(e){return(c?.bind)?.call(c,r.api)(e)?`pointer`:null}).style(`opacity`,`0`).each(function(e){r.isGaugeType(e.data)&&(e.startAngle=i.gauge_startingAngle,e.endAngle=i.gauge_startingAngle),this._current=e}).merge(l),r.hasType(`gauge`)&&(r.updateGaugeMax(),r.hasMultiArcGauge()&&r.redrawArcGaugeLine()),l.attr(`transform`,function(e){return!r.isGaugeType(e.data)&&n?`scale(0)`:``}).style(`opacity`,function(e){return e===this._current?`0`:null}).each(function(){a.transiting=!0}).transition().duration(e).attrTween(`d`,function(e){var t=r.updateAngle(e);if(!t)return function(){return`M 0 0`};isNaN(this._current.startAngle)&&(this._current.startAngle=0),isNaN(this._current.endAngle)&&(this._current.endAngle=this._current.startAngle);var n=f(this._current,t);return this._current=n(0),function(t){var i=n(t);return i.data=e.data,r.getArc(i,!0)}}).attr(`transform`,n?`scale(1)`:``).style(`fill`,function(e){var t;return r.levelColor?(t=r.levelColor(e.data.values[0].value),i.data_colors[e.data.id]=t):t=r.color(e.data),t}).style(`opacity`,null).call(Xn,function(){if(r.levelColor){var e=A(this),t=e.datum(this._current);r.updateLegendItemColor(t.data.id,e.style(`fill`))}a.transiting=!1,Q(i.onrendered,r.api)}),s&&r.bindArcEvent(l),r.hasType(`polar`)&&r.redrawPolar(),r.hasType(`gauge`)&&r.redrawBackgroundArcs(),i.arc_needle_show&&r.redrawNeedle(),r.redrawArcText(e),r.redrawArcRangeText()},redrawNeedle:function(){var e=this,t=e.$el,n=e.config,r=e.state,i=r.hiddenTargetIds,a=(r.radius-1)/100*n.arc_needle_length,o=i.length!==e.data.targets.length,s=e.$el.arcs.select(`.${F.needle}`),c=n.arc_needle_path,l=n.arc_needle_bottom_width/2,u=n.arc_needle_top_width/2,d=n.arc_needle_top_rx,f=n.arc_needle_top_ry,p=n.arc_needle_bottom_len,m=n.arc_needle_bottom_rx,h=n.arc_needle_bottom_ry,g=e.getNeedleAngle(),_=function(){var t=e.getArcTitleWithNeedleValue();t&&e.setArcTitle(t)};if(_(),s.empty()&&(s=t.arcs.append(`path`).classed(F.needle,!0),t.needle=s,t.needle.updateHelper=function(r,i){i===void 0&&(i=!1),t.needle.style(`display`)!==`none`&&e.$T(t.needle).style(`transform`,`rotate(${e.getNeedleAngle(r)}deg)`).call(Xn,function(){i&&(n.arc_needle_value=r),_()})}),o){var v=W(c)?c.call(e,a):`M-${l} ${p} A${m} ${h} 0 0 0 ${l} ${p} L${u} -${a} A${d} ${f} 0 0 0 -${u} -${a} L-${l} ${p} Z`;e.$T(s).attr(`d`,v).style(`fill`,n.arc_needle_color).style(`display`,null).style(`transform`,`rotate(${g}deg)`)}else s.style(`display`,`none`)},getNeedleAngle:function(e){var t=this,n=t.config,r=t.state,i=t.getArcLength(),a=t.hasType(`gauge`),o=t.getTotalDataSum(!0),s=J(e)?e:n.arc_needle_value,c=n[`${n.data_type}_startingAngle`]||0,l=0;if(K(s)||(s=a&&t.data.targets.length===1?o:0),r.current.needle=s,a){c=t.getStartingAngle();var u=n.gauge_fullCircle?i:c*-2,d=n.gauge_min,f=n.gauge_max;l=u*((s-d)/(f-d))}else l=s/o*i;return(c+l)*(180/Math.PI)},redrawBackgroundArcs:function(){var e=this,t=e.config,n=e.state,r=e.hasMultiArcGauge(),i=t.gauge_fullCircle,a=e.filterTargetsToShow(e.data.targets).length===0&&!!t.data_empty_label_text,o=e.getStartingAngle(),s=i?o+e.getArcLength():o*-1,c=e.$el.arcs.select(`${r?`g`:``}.${F.chartArcsBackground}`);if(r){var l=0;c=c.selectAll(`path.${F.chartArcsBackground}`).data(e.data.targets),c.enter().append(`path`).attr(`class`,function(e,t){return`${F.chartArcsBackground} ${F.chartArcsBackground}-${t}`}).merge(c).style(`fill`,t.gauge_background||null).attr(`d`,function(r){var i=r.id;if(a||n.hiddenTargetIds.indexOf(i)>=0)return`M 0 0`;var c={data:[{value:t.gauge_max}],startAngle:o,endAngle:s,index:l++};return e.getArc(c,!0,!0)}),c.exit().remove()}else c.attr(`d`,a?`M 0 0`:function(){var n={data:[{value:t.gauge_max}],startAngle:o,endAngle:s};return e.getArc(n,!0,!0)})},bindArcEvent:function(e){var t=this,n=t.config,r=t.state,i=r.inputType===`touch`,a=r.inputType===`mouse`;function o(e,n,r){t.expandArc(r),t.api.focus(r),t.toggleFocusLegend(r,!0),t.showTooltip([n],e)}function s(e){t.unexpandArc(void 0),t.api.revert(),t.revertLegend(),t.hideTooltip()}if(e.on(`click`,function(e,r,i){var a,o=t.updateAngle(r),s;o&&(s=t.convertToArcData(o),(a=t.toggleShape)==null||a.call(t,this,s,i),n.data_onclick.bind(t.api)(s,this))}),a&&e.on(`mouseover`,function(e,n){if(!r.transiting){r.event=e;var i=t.updateAngle(n),a=i?t.convertToArcData(i):null,s=a?.id||void 0;o(this,a,s),t.setOverOut(!0,a)}}).on(`mouseout`,function(e,i){if(!(r.transiting||!n.interaction_onout)){r.event=e;var a=t.updateAngle(i),o=a?t.convertToArcData(a):null;s(),t.setOverOut(!1,o)}}).on(`mousemove`,function(e,n){var i=t.updateAngle(n),a=i?t.convertToArcData(i):null;r.event=e,t.showTooltip([a],this)}),i&&t.hasArcType()&&!t.radars){var c=function(e){var t=e.changedTouches?.[0]??{clientX:0,clientY:0},n=t.clientX,r=t.clientY;return A(mn.elementFromPoint(n,r))};t.$el.svg.on(`touchstart touchmove`,function(e){if(!r.transiting){r.event=e;var n=c(e).datum(),i=n?.data&&n.data.id?t.updateAngle(n):null,a=i?t.convertToArcData(i):null,l=a?.id||void 0;t.callOverOutForTouch(a),q(l)?s():o(this,a,l)}},{passive:!0})}},redrawArcText:function(e){var t=this,n=t.config,r=t.state,i=t.$el,a=i.main,o=i.arcs,s=t.hasType(`gauge`),c=t.hasMultiArcGauge(),l;if(s&&t.data.targets.length===1&&n.gauge_title||(l=a.selectAll(`.${F.chartArc}`).select(`text`).style(`opacity`,`0`).attr(`class`,function(e){return t.isGaugeType(e.data)?Jt.gaugeValue:null}).call(t.textForArcLabel.bind(t)).style(`font-size`,function(e){return t.isGaugeType(e.data)&&t.data.targets.length===1&&!c?`${Math.round(r.radius/5)}px`:null}),Pi.call(t),l.attr(`transform`,function(e){return t.transformForArcLabel.bind(t)(this,e)}).transition().duration(e).style(`opacity`,function(e){return t.isTargetToShow(e.data.id)&&t.isArcType(e.data)?null:`0`}),c&&l.attr(`dy`,`-.1em`)),a.select(`.${F.chartArcsTitle}`).style(`opacity`,t.hasType(`donut`)||s?null:`0`),s){var u=n.gauge_fullCircle;u&&l?.attr(`dy`,`${c?0:Math.round(r.radius/14)}`),n.gauge_label_show&&(o.select(`.${Jt.chartArcsGaugeUnit}`).attr(`dy`,`${u?1.5:.75}em`).text(n.gauge_units),o.select(`.${Jt.chartArcsGaugeMin}`).attr(`dx`,`${-1*(r.innerRadius+(r.radius-r.innerRadius)/(u?1:2))}px`).attr(`dy`,`1.2em`).text(t.textForGaugeMinMax(n.gauge_min,!1)),!u&&o.select(`.${Jt.chartArcsGaugeMax}`).attr(`dx`,`${r.innerRadius+(r.radius-r.innerRadius)/2}px`).attr(`dy`,`1.2em`).text(t.textForGaugeMinMax(n.gauge_max,!0)))}$a.call(t)&&eo.call(t,e)},getArcElementByIdOrIndex:function(e){var t=this.$el.arcs,n=K(e)?function(t){return t.index===e}:function(t){return t.data.id===e};return t?.selectAll(`.${P.target} path`).filter(n)}},co={initArea:function(e){var t=this,n=t.config;e.insert(`g`,`.${n.area_front?I.circles:Yt.lines}`).attr(`class`,t.getClass(`areas`,!0))},updateAreaColor:function(e){var t=this;return t.config.area_linearGradient?t.getGradienColortUrl(e.id):t.color(e)},updateArea:function(e,t){t===void 0&&(t=!1);var n=this,r=n.config,i=n.state,a=n.$el,o=n.$T,s=t?a.subchart:a;r.area_linearGradient&&n.updateLinearGradient();var c=s.main.selectAll(`.${Vt.areas}`).selectAll(`.${Vt.area}`).data(n.lineData.bind(n));o(c.exit(),e).style(`opacity`,`0`).remove(),s.area=c.enter().append(`path`).attr(`class`,n.getClass(`area`,!0)).style(`fill`,n.updateAreaColor.bind(n)).style(`opacity`,function(){return i.orgAreaOpacity=A(this).style(`opacity`),`0`}).merge(c),c.style(`opacity`,i.orgAreaOpacity),n.setRatioForGroupedData(s.area.data())},redrawArea:function(e,t,n){n===void 0&&(n=!1);var r=this,i=(n?this.$el.subchart:this.$el).area,a=r.state.orgAreaOpacity;return[r.$T(i,t,ir()).attr(`d`,e).style(`fill`,r.updateAreaColor.bind(r)).style(`opacity`,function(e){return String(r.isAreaRangeType(e)?a/1.75:a)})]},generateDrawArea:function(e,t){var n=this,r=n.config,i=r.line_connectNull,a=r.axis_rotated,o=n.generateGetAreaPoints(e,t),s=n.getYScaleById.bind(n),c=function(e){return(t?n.subxx:n.xx).call(n,e)},l=function(e,r){return n.isGrouped(e.id)?o(e,r)[0][1]:s(e.id,t)(n.isAreaRangeType(e)?n.getRangedData(e,`high`):n.getShapeYMin(e.id))},u=function(e,r){return n.isGrouped(e.id)?o(e,r)[1][1]:s(e.id,t)(n.isAreaRangeType(e)?n.getRangedData(e,`low`):e.value)};return function(e){var t=i?n.filterRemoveNull(e.values):e.values,o=0,s=0,d;if(n.isAreaType(e)){var f=Lt();f=a?f.y(c).x0(l).x1(u):f.x(c).y0(r.area_above?0:r.area_below?n.state.height:l).y1(u),i||(f=f.defined(function(e){return n.getBaseValue(e)!==null})),n.isStepType(e)&&(t=n.convertValuesToStep(t)),d=f.curve(n.getCurve(e))(t)}else t[0]&&(o=n.scale.x(t[0].x),s=n.getYScaleById(e.id)(t[0].value)),d=a?`M ${s} ${o}`:`M ${o} ${s}`;return d||`M 0 0`}},generateGetAreaPoints:function(e,t){var n=this,r=n.config,i=n.getShapeX(0,e,t),a=n.getShapeY(!!t),o=n.getShapeOffset(n.isAreaType,e,t),s=n.getYScaleById.bind(n);return function(e,c){var l=s.call(n,e.id,t)(n.getShapeYMin(e.id)),u=o(e,c)||l,d=i(e),f=e.value,p=a(e);return r.axis_rotated&&(f>0&&p<l||f<0&&l<p)&&(p=l),[[d,u],[d,p-(l-u)],[d,p-(l-u)],[d,u]]}}};function lo(e){var t=this.config.bar_connectLine,n=t?.[e]||t;return/^(start|end)\-(start|end)$/.test(n)?n:null}var uo={initBar:function(){var e=this,t=e.$el,n=e.config,r=e.state.clip;t.bar=t.main.select(`.${P.chart}`),t.bar=n.bar_front?t.bar.append(`g`):t.bar.insert(`g`,`:first-child`),t.bar.attr(`class`,Ut.chartBars).call(this.setCssRule(!1,`.${Ut.chartBars}`,[`pointer-events:none`])),n.clipPath===!1&&(n.bar_radius||n.bar_radius_ratio)&&t.bar.attr(`clip-path`,r.pathXAxis.replace(/#[^)]*/,`#${r.id}`))},updateTargetsForBar:function(e){var t=this,n=t.config,r=t.$el,i=t.getChartClass(`Bar`),a=t.getClass(`bars`,!0),o=t.classFocus.bind(t),s=n.interaction_enabled&&n.data_selection_isselectable;r.bar||t.initBar(),r.main.select(`.${Ut.chartBars}`).selectAll(`.${Ut.chartBar}`).data(t.filterNullish(e)).attr(`class`,function(e){return i(e)+o(e)}).enter().append(`g`).attr(`class`,i).style(`opacity`,`0`).style(`pointer-events`,t.getStylePropValue(`none`)).append(`g`).attr(`class`,a).style(`cursor`,function(e){return(s?.bind)?.call(s,t.api)(e)?`pointer`:null}).call(function(e){t.setCssRule(!0,` .${Ut.bar}`,[`fill`],t.color)(e),e.each(function(e){lo.call(t,e.id)&&A(this).append(`path`).attr(`class`,Ut.barConnectLine)})})},updateBar:function(e,t){t===void 0&&(t=!1);var n=this,r=n.config,i=n.$el,a=n.$T,o=t?i.subchart:i,s=n.getClass(`bar`,!0),c=n.initialOpacity.bind(n);r.bar_linearGradient&&n.updateLinearGradient();var l=o.main.selectAll(`.${Ut.bars}`).selectAll(`.${Ut.bar}`).data(n.labelishData.bind(n));a(l.exit(),e).style(`opacity`,`0`).remove(),o.bar=l.enter().append(`path`).attr(`class`,s).style(`fill`,n.updateBarColor.bind(n)).merge(l).style(`opacity`,c),n.setRatioForGroupedData(o.bar.data())},updateBarColor:function(e){var t=this,n=t.getStylePropValue(t.color);return t.config.bar_linearGradient?t.getGradienColortUrl(e.id):n?n(e):null},redrawBar:function(e,t,n){n===void 0&&(n=!1);var r=this,i=(n?r.$el.subchart:r.$el).bar,a=[];return[r.$T(i,t,ir()).attr(`d`,function(n,i,o){var s=(K(n.value)||r.isBarRangeType(n))&&e(n,i),c=lo.call(r,n.id);if(s.length>1&&(a.push(s[1]),i===o.length-1)){var l=r.$T(A(this.parentNode.querySelector(`.${Ut.barConnectLine}`)),t,ir());r.updateConnectLine(l,c,a),a.splice(0)}return s[0]}).style(`fill`,r.updateBarColor.bind(r)).style(`clip-path`,function(e){return e.clipPath}).style(`opacity`,null)]},generateDrawBar:function(e,t){var n=this,r=n.config,i=n.generateGetBarPoints(e,t),a=r.axis_rotated,o=r.bar_radius,s=r.bar_radius_ratio,c=K(o)&&o>0?function(){return o}:K(s)?function(e){return e*s}:null;return function(e,t){var o=i(e,t),s=+a,l=+!s,u=e.value<0,d=r[`axis_${n.axis.getId(e.id)}_inverted`],f=!d&&u||d&&!u,p=[``,``],m=n.isGrouped(e.id),h=c&&m?n.isStackingRadiusData(e):!1,g=[o[0][s],o[0][l]],_=0;if(e.clipPath=null,c){var v=a?l:s,y=o[2][v]-o[0][v];_=!m||h?c(y):0;var b=`a${_} ${_} ${f?`1 0 0`:`0 0 1`} `;p[+!a]=`${b}${_},${_}`,p[+a]=`${b}${[-_,_][a?`sort`:`reverse`]()}`,f&&p.reverse()}var x=a?o[1][s]+(f?_:-_):o[1][l]+(f?-_:_);if(_){var S=``;a?f&&g[0]<x?S=`0 ${x-g[0]}px 0 0`:!f&&g[0]>x&&(S=`0 0 0 ${g[0]-x}px`):f&&g[1]>x?S=`${g[1]-x}px 0 0 0`:!f&&g[1]<x&&(S=`0 0 ${x-g[1]}px 0`),S&&(e.clipPath=`inset(${S})`)}var C=a?`H${x} ${p[0]}V${o[2][l]-_} ${p[1]}H${o[3][s]}`:`V${x} ${p[0]}H${o[2][s]-_} ${p[1]}V${o[3][l]}`,w=[`M${o[0][s]},${o[0][l]}${C}z`];return lo.call(n,e.id)&&w.push(a?{x:o[0][s],y:o[0][l],width:o[0][s]-x,height:o[2][l]-o[0][l]}:{x:o[0][s],y:x,width:o[2][s]-o[0][s],height:o[3][l]-x}),w}},isStackingRadiusData:function(e){var t=this,n=t.$el,r=t.config,i=t.data,a=t.state,o=e.id,s=e.index,c=e.value;if(a.hiddenTargetIds.indexOf(o)>-1){var l=n.bar.filter(function(e){return e.id===o&&e.value===c});return!l.empty()&&/a\d+/i.test(l.attr(`d`))}var u=r.data_groups.find(function(e){return e.indexOf(o)>-1}),d=t.orderTargets(t.filterTargetsToShow(i.targets.filter(t.isBarType,t))).filter(function(e){return u.indexOf(e.id)>-1}).map(function(e){return e.values.filter(function(e){return e.index===s&&(K(c)&&c>0?e.value>0:e.value<0)})[0]}).filter(Boolean).map(function(e){return e.id});return c!==0&&d.indexOf(o)===d.length-1},generateGetBarPoints:function(e,t){var n=this,r=n.config,i=t?n.axis.subX:n.axis.x,a=n.getIndicesMax(e)+1,o=n.getBarW(`bar`,i,a),s=n.getShapeX(o,e,!!t),c=n.getShapeY(!!t),l=n.getShapeOffset(n.isBarType,e,!!t),u=n.getYScaleById.bind(n);return function(e,i){var a=e.id,d=u.call(n,a,t)(n.getShapeYMin(a)),f=l(e,i)||d,p=K(o)?o:o[e.id]||o._$width,m=r[`axis_${n.axis.getId(a)}_inverted`],h=e.value,g=s(e),_=c(e);r.axis_rotated&&!m&&(h>0&&_<d||h<0&&d<_)&&(_=d),n.isBarRangeType(e)||(_-=d-f);var v=g+p;return[[g,f],[g,_],[v,_],[v,f]]}},updateConnectLine:function(e,t,n){var r=this,i=n.map(function(e,n,i){var a=r.config.axis_rotated,o=/^start-(start|end)$/.test(t),s=/^end-(start|end)$/.test(t),c=[],l=a?s?e.x-e.width:e.x:e.x+e.width,u=a||o?e.y+e.height:e.y;return n===0?c.push(`${l},${u}`):(c.push(a?`L${e.x-(/\w+-end$/.test(t)?e.width:0)},${e.y}`:`L${e.x},${e.y+(/\w+-start$/.test(t)?e.height:0)}`),n<i.length-1&&c.push(`M${l},${u}`)),c.join(` `)});e.attr(`d`,`M${i.join(``)}z`)}};function fo(e,t,n,r){r===void 0&&(r=!1);for(var i=e?[e,0]:n,a=function(e){n.forEach(function(n){e+n<=t&&i.push(n),e+=n}),o=e},o,s=e||n.reduce(function(e,t){return e+t});s<=t;)a(s),s=o;return i.length%2!=0&&i.push(r?n[1]:0),{dash:i.join(` `),length:i.reduce(function(e,t){return e+t},0)}}function po(e,t,n){var r=this,i=[],a=`2 2`;if(J(t))for(var o=function(e,t){return q(e)?t:n?wr.call(r,e):e},s=0,c=void 0;c=t[s];s++)i[s]={start:o(c.start,e[0].x),end:o(c.end,e[e.length-1].x),style:c.style||{dasharray:a}};return i}var mo={initLine:function(){var e=this.$el;e.line=e.main.select(`.${P.chart}`).append(`g`).attr(`class`,Yt.chartLines).call(this.setCssRule(!1,`.${Yt.chartLines}`,[`pointer-events:none`]))},updateTargetsForLine:function(e){var t=this,n=t.$el,r=n.area,i=n.line,a=n.main,o=t.getChartClass(`Line`),s=t.getClass(`lines`,!0),c=t.classFocus.bind(t);i||t.initLine();var l=e.filter(function(e){return!(t.isScatterType(e)||t.isBubbleType(e))}),u=a.select(`.${Yt.chartLines}`).selectAll(`.${Yt.chartLine}`).data(t.filterNullish(l)).attr(`class`,function(e){return o(e)+c(e)}),d=u.enter().append(`g`).attr(`class`,o).style(`opacity`,`0`).style(`pointer-events`,t.getStylePropValue(`none`));if(d.append(`g`).attr(`class`,s),t.hasTypeOf(`Area`)){var f=(!r&&d.empty()?u:d).filter(t.isAreaType.bind(t));t.initArea(f)}t.updateTargetForCircle(l,d)},updateLine:function(e,t){t===void 0&&(t=!1);var n=this,r=n.format.extraLineClasses,i=n.$el,a=n.$T,o=t?i.subchart:i,s=o.main.selectAll(`.${Yt.lines}`).selectAll(`.${Yt.line}`).data(n.lineData.bind(n));a(s.exit(),e).style(`opacity`,`0`).remove(),o.line=s.enter().append(`path`).attr(`class`,function(e){return`${n.getClass(`line`,!0)(e)} ${r(e)||``}`}).style(`stroke`,n.color).merge(s).style(`opacity`,n.initialOpacity.bind(n)).attr(`transform`,null)},redrawLine:function(e,t,n){n===void 0&&(n=!1);var r=this,i=r.$el,a=r.$T,o=(n?i.subchart:i).line;return[a(o,t,ir()).attr(`d`,e).style(`stroke`,this.color).style(`opacity`,null)]},getCurve:function(e){var t=this;return t.config.axis_rotated&&t.isStepType(e)?function(n){var r=t.getInterpolate(e)(n);return r.orgPoint=r.point,r.pointRotated=function(e,t){this._point===1&&(this._point=2);var n=this._y*(1-this._t)+t*this._t;this._context.lineTo(this._x,n),this._context.lineTo(e,n),this._x=e,this._y=t},r.point=function(e,t){this._point===0?this.orgPoint(e,t):this.pointRotated(e,t)},r}:t.getInterpolate(e)},generateDrawLine:function(e,t){var n=this,r=n.config,i=n.scale,a=r.line_connectNull,o=r.axis_rotated,s=n.generateGetLinePoints(e,t),c=n.getYScaleById.bind(n),l=function(e){return(t?n.subxx:n.xx).call(n,e)},u=function(e,r){return n.isGrouped(e.id)?s(e,r)[0][1]:c(e.id,t)(n.getBaseValue(e))},d=Me();d=o?d.x(u).y(l):d.x(l).y(u),a||(d=d.defined(function(e){return n.getBaseValue(e)!==null}));var f=t?i.subX:i.x;return function(e){var s=c(e.id,t),l=a?n.filterRemoveNull(e.values):e.values,u=0,p=0,m;if(n.isLineType(e)){var h=r.data_regions[e.id];h?(n.isAreaRangeType(e)&&(l=l.map(function(e){return M(M({},e),{value:n.getRangedData(e,`mid`)})})),m=n.lineWithRegions(l,i.zoom||f,s,h)):(n.isStepType(e)&&(l=n.convertValuesToStep(l)),m=d.curve(n.getCurve(e))(l))}else l[0]&&(u=f(l[0].x),p=s(l[0].value)),m=o?`M ${p} ${u}`:`M ${u} ${p}`;return m||`M 0 0`}},lineWithRegions:function(e,t,n,r){for(var i=this,a=i.config.axis_rotated,o=i.axis.isTimeSeries(),s=`2 2`,c=po.bind(i)(e,r,o),l=i.hasNullDataValue(e),u,d,f,p,m=a?function(e){return n(e.value)}:function(e){return t(e.x)},h=a?function(e){return t(e.x)}:function(e){return n(e.value)},g=function(e){return`M${e[0][0]},${e[0][1]}L${e[1][0]},${e[1][1]}`},_=o?function(e,r,i,o){var s=e.x.getTime(),c=r.x-e.x,l=new Date(s+c*i),u=new Date(s+c*(i+o));return g(a?[[n(d(i)),t(l)],[n(d(i+f)),t(u)]]:[[t(l),n(d(i))],[t(u),n(d(i+f))]])}:function(e,r,i,o){var s=t(r.x,!a),c=n(r.value,a),l=i+o,f=t(u(i),!a),p=n(d(i),a),m=t(u(l),!a),h=n(d(l),a);m>s&&(m=s),e.value>r.value&&(a?h<c:h>c)&&(h=c);var _=[[f,p],[m,h]];return a&&_.forEach(function(e){return e.reverse()}),g(_)},v={x:i.axis.getAxisType(`x`),y:i.axis.getAxisType(`y`)},y=``,b=i.$el.line.filter(function(t){return t.id===e[0].id}),x=b.clone().style(`display`,`none`),S=function(e,t){return e.attr(`d`,t).node().getTotalLength()},C={dash:[],lastLength:0},w=!1,T=0,E=void 0;E=e[T];T++){var D=e[T-1],O=D&&U(D.value),k=i.isWithinRegions(E.x,c);if(U(E.value)){if(q(c)||!k||!O)y+=`${T&&O?`L`:`M`}${m(E)},${h(E)}`;else if(O)if(k=(k?.dasharray||s).split(` `).map(Number),u=Ti(v.x,D.x,E.x),d=Ti(v.y,D.value,E.value),l){var ee=t(E.x)-t(D.x),te=n(E.value)-n(D.value),ne=Math.sqrt(ee**2+te**2);f=k[0]/ne,p=f*k[1];for(var re=f;re<=1;re+=p)y+=_(D,E,re,f),re+p>=1&&(y+=_(D,E,1,0))}else{var ie=[];if(w=E.x===e[e.length-1].x,o){var ae=+D.x,oe=new Date(ae),se=new Date(ae+(+E.x-ae));ie=[[t(oe),n(d(0))],[t(se),n(d(1))]]}else ie=[[t(u(0)),n(d(0))],[t(u(1)),n(d(1))]];a&&ie.forEach(function(e){return e.reverse()});var A=S(x,y),ce=S(x,y+=`L${ie[1].join(`,`)}`),le=fo(A-C.lastLength,ce-C.lastLength,k,w);C.lastLength+=le.length,C.dash.push(le.dash)}}}return C.dash.length&&(!w&&C.dash.push(S(x,y)),x.remove(),b.attr(`stroke-dasharray`,C.dash.join(` `))),y},isWithinRegions:function(e,t){for(var n=0,r=void 0;r=t[n];n++)if(r.start<e&&e<=r.end)return r.style;return!1},isWithinStep:function(e,t){return Math.abs(t-er(this.state.event,e)[1])<30},shouldDrawPointsForLine:function(e){var t=this.config.line_point;return t===!0||X(t)&&t.indexOf(e.id)!==-1}},ho=function(){return ir()},go={initialOpacityForCircle:function(e){var t=this,n=t.config,r=t.state.withoutFadeIn,i=n.point_opacity;return q(i)&&(i=this.getBaseValue(e)!==null&&r[e.id]?this.opacityForCircle(e):`0`),i},opacityForCircle:function(e){var t=this.config,n=t.point_opacity;return q(n)&&(n=t.point_show&&!this.isPointFocusOnly?.call(this)?null:`0`,n=U(this.getBaseValue(e))?this.isBubbleType(e)||this.isScatterType(e)?`0.5`:n:`0`),n},initCircle:function(){var e=this,t=e.$el.main;!e.point&&(e.point=e.generatePoint()),(e.hasType(`bubble`)||e.hasType(`scatter`))&&t.select(`.${P.chart} > .${I.chartCircles}`).empty()&&t.select(`.${P.chart}`).append(`g`).attr(`class`,I.chartCircles)},updateTargetForCircle:function(e,t){var n=this,r=this,i=r.config,a=r.data,o=r.$el,s=i.interaction_enabled&&i.data_selection_enabled,c=s&&i.data_selection_isselectable,l=r.getClass(`circles`,!0);if(i.point_show){r.initCircle();var u=e,d=t;if(!u){u=r.filterNullish(a.targets).filter(function(e){return n.isScatterType(e)||n.isBubbleType(e)});var f=o.main.select(`.${I.chartCircles}`).style(`pointer-events`,`none`).selectAll(`.${I.circles}`).data(u);f.exit().remove(),d=f.enter()}s&&d.append(`g`).attr(`class`,function(e){return r.generateClass(B.selectedCircles,e.id)}),d.append(`g`).attr(`class`,l).call(function(e){r.setCssRule(!0,`.${I.circles}`,[`cursor:pointer`],c)(e),r.setCssRule(!0,` .${I.circle}`,[`fill`,`stroke`],r.color)(e)}).style(`opacity`,function(){return A(this.parentNode).attr(`class`).indexOf(I.chartCircles)>-1?`0`:null}),s&&u.forEach(function(e){o.main.selectAll(`.${B.selectedCircles}${r.getTargetSelectorSuffix(e.id)}`).selectAll(`${B.selectedCircle}`).each(function(t){t.value=e.values[t.index].value})})}},updateCircle:function(e){e===void 0&&(e=!1);var t=this,n=t.config,r=t.state,i=t.$el,a=t.isPointFocusOnly(),o=e?i.subchart:i;if(n.point_show&&!r.toggling){n.point_radialGradient&&t.updateLinearGradient();var s=o.main.selectAll(`.${I.circles}`).selectAll(`.${I.circle}`).data(function(e){var n=t.isLineType(e)&&t.shouldDrawPointsForLine(e)||t.isBubbleType(e)||t.isRadarType(e)||t.isScatterType(e)?a?[e.values[0]]:e.values:[];return t.filterNullish(n)});s.exit().remove(),s.enter().filter(Boolean).append(t.point(`create`,this,t.pointR.bind(t),t.updateCircleColor.bind(t))),o.circle=o.main.selectAll(`.${I.circles} .${I.circle}`).style(`stroke`,t.getStylePropValue(t.color)).style(`opacity`,t.initialOpacityForCircle.bind(t))}},updateCircleColor:function(e){var t=this,n=t.getStylePropValue(t.color);return t.config.point_radialGradient?t.getGradienColortUrl(e.id):n?n(e):null},redrawCircle:function(e,t,n,r,i){i===void 0&&(i=!1);var a=this,o=a.state.rendered,s=a.$el,c=a.$T,l=i?s.subchart:s,u=l.main.selectAll(`.${B.selectedCircle}`);if(!a.config.point_show)return[];var d=a.point(`update`,a,e,t,a.updateCircleColor.bind(a),n,r,u),f=a.isCirclePoint()?`c`:``,p=ir(),m=a.opacityForCircle.bind(a),h=[];return l.circle.each(function(e){var t=d.bind(this)(e);t=c(t,n||!o,p).style(`opacity`,m),h.push(t)}),[h,c(u,n).attr(`${f}x`,e).attr(`${f}y`,t)]},showCircleFocus:function(e){var t=this,n=t.state,r=n.hasRadar,i=n.resizing,a=n.toggling,o=n.transiting,s=t.$el.circle;if(o===!1&&s&&t.isPointFocusOnly()){var c=(r?t.radarCircleX:t.circleX).bind(t),l=(r?t.radarCircleY:t.circleY).bind(t),u=a||q(e),d=t.point(`update`,t,c,l,t.getStylePropValue(t.color),i?!1:u);e&&(s=s.filter(function(t){var n=e.filter?.call(e,function(e){return e.id===t.id});return n.length?A(this).datum(n[0]):!1})),s.attr(`class`,this.updatePointClass.bind(this)).style(`opacity`,null).each(function(e){var n=e.id,r=e.index,i=e.value,a=`hidden`;U(i)&&(d.bind(this)(e),t.expandCircles(r,n),a=``),this.style.visibility=a})}},hideCircleFocus:function(){var e=this,t=e.$el.circle;e.isPointFocusOnly()&&t&&(e.unexpandCircles(),t.style(`visibility`,`hidden`))},circleX:function(e){return this.xx(e)},updateCircleY:function(e){e===void 0&&(e=!1);var t=this,n=t.generateGetLinePoints(t.getShapeIndices(t.isLineType),e);return function(r,i){var a=r.id;return t.isGrouped(a)?n(r,i)[0][1]:t.getYScaleById(a,e)(t.getBaseValue(r))}},expandCircles:function(e,t,n){var r=this,i=r.pointExpandedR.bind(r);n&&r.unexpandCircles();var a=r.getShapeByIndex(`circle`,e,t).classed(P.EXPANDED,!0),o=i(a)/r.config.point_r,s=1-o;r.isCirclePoint()?a.attr(`r`,i):a.each(function(){var e=A(this);if(this.tagName===`circle`)e.attr(`r`,i);else{var t=rr(this),n=t.width,r=t.height,a=s*(+e.attr(`x`)+n/2),c=s*(+e.attr(`y`)+r/2);e.attr(`transform`,`translate(${a} ${c}) scale(${o})`)}})},unexpandCircles:function(e){var t=this,n=t.pointR.bind(t),r=t.getShapeByIndex(`circle`,e).filter(function(){return A(this).classed(P.EXPANDED)}).classed(P.EXPANDED,!1);if(r.attr(`r`,n),!t.isCirclePoint()){var i=n(r)/t.config.point_r;r.attr(`transform`,i===1?null:`scale(${i})`)}},pointR:function(e){var t=this,n=t.config.point_r,r=n;return t.isBubbleType(e)?r=t.getBubbleR(e):W(n)&&(r=n.bind(t.api)(e)),e.r=r,r},pointExpandedR:function(e){var t=this,n=t.config,r=t.isBubbleType(e)?1.15:1.75;return n.point_focus_expand_enabled?n.point_focus_expand_r||t.pointR(e)*r:t.pointR(e)},pointSelectR:function(e){var t=this,n=t.config.point_select_r;return W(n)?n(e):n||t.pointR(e)*4},isPointFocusOnly:function(){var e=this;return e.config.point_focus_only&&!e.hasType(`bubble`)&&!e.hasType(`scatter`)&&!e.hasArcType(null,[`radar`])},isWithinCircle:function(e,t){var n=this.state,r=er(n.event,e),i=A(e),a=this.isCirclePoint(e)?`c`:``,o=this.getPointSensitivity(i?.datum()),s=+i.attr(`${a}x`),c=+i.attr(`${a}y`);if(!(s||c)&&e.nodeType===1){var l=nr(e),u=l.x,d=l.y;s=u,c=d}return Math.sqrt((s-r[0])**2+(c-r[1])**2)<(t||o)},getPointSensitivity:function(e){var t=this,n=t.config.point_sensitivity;if(e)W(n)?n=n.call(t.api,e):n===`radius`&&(n=e.r);else return n;return n},updatePointClass:function(e){var t=this,n=t.$el.circle,r=!1;return(Z(e)||n)&&(r=e===!0?n.each(function(e){var n=t.getClass(`circle`,!0)(e);this.getAttribute(`class`).indexOf(P.EXPANDED)>-1&&(n+=` ${P.EXPANDED}`),this.setAttribute(`class`,n)}):t.getClass(`circle`,!0)(e)),r},generateGetLinePoints:function(e,t){var n=this,r=n.config,i=n.getShapeX(0,e,t),a=n.getShapeY(t),o=n.getShapeOffset(n.isLineType,e,t),s=n.getYScaleById.bind(n);return function(e,c){var l=s.call(n,e.id,t)(n.getShapeYMin(e.id)),u=o(e,c)||l,d=i(e),f=a(e);r.axis_rotated&&(e.value>0&&f<l||e.value<0&&l<f)&&(f=l);var p=[d,f-(l-u)];return[p,p,p,p]}},custom:{create:function(e,t,n){return e.append(`use`).attr(`xlink:href`,`#${t}`).attr(`class`,this.updatePointClass.bind(this)).style(`fill`,n).node()},update:function(e,t,n,r,i,a,o){var s=this,c=rr(e.node()),l=c.width,u=c.height,d=function(e){return U(e.value)?t(e)-l/2:0},f=function(e){return U(e.value)?n(e)-u/2:0},p=e;return i&&(a&&p.attr(`x`,d),p=s.$T(p,i,ho()),o&&s.$T(o,i,ho())),p.attr(`x`,d).attr(`y`,f).style(`fill`,r)}},circle:{create:function(e,t,n){return e.append(`circle`).attr(`class`,this.updatePointClass.bind(this)).attr(`r`,t).style(`fill`,n).node()},update:function(e,t,n,r,i,a,o){var s=this,c=e;return s.hasType(`bubble`)&&c.attr(`r`,s.pointR.bind(s)),i&&(a&&c.attr(`cx`,t),c.attr(`cx`)&&(c=s.$T(c,i,ho())),o&&s.$T(c,i,ho())),c.attr(`cx`,t).attr(`cy`,n).style(`fill`,r)}},rectangle:{create:function(e,t,n){var r=function(e){return t(e)*2};return e.append(`rect`).attr(`class`,this.updatePointClass.bind(this)).attr(`width`,r).attr(`height`,r).style(`fill`,n).node()},update:function(e,t,n,r,i,a,o){var s=this,c=s.config.point_r,l=function(e){return t(e)-c},u=function(e){return n(e)-c},d=e;return i&&(a&&d.attr(`x`,l),d=s.$T(d,i,ho()),o&&s.$T(o,i,ho())),d.attr(`x`,l).attr(`y`,u).style(`fill`,r)}}};function _o(e){return Gn(e)&&W(e.create)&&W(e.update)}function vo(e,t){var n=this,r=function(e,t){for(var n=e.attributes,r=0,i;i=n[r];r++)i=i.name,t.setAttribute(i,e.getAttribute(i))},i=new DOMParser().parseFromString(Rn(e),`image/svg+xml`).documentElement,a=mn.createElementNS(Ce.svg,i.nodeName.toLowerCase());if(a.id=t,a.style.fill=`inherit`,a.style.stroke=`inherit`,r(i,a),i.childNodes?.length){var o=A(a);`innerHTML`in a?o.html(Rn(i.innerHTML)):dr(i.childNodes).forEach(function(e){r(e,o.append(e.tagName).node())})}n.$el.defs.node().appendChild(a)}var yo={hasValidPointType:function(e){return/^(circle|rect(angle)?|polygon|ellipse|use)$/i.test(e||this.config.point_type)},hasLegendDefsPoint:function(){var e=this.config;return e.legend_show&&e.point_pattern?.length&&e.legend_usePoint},getDefsPointId:function(e){return`${this.state.datetimeId}-point${e}`},getValidPointPattern:function(){var e=this.config,t=/^(circle|rect(angle)?)$/i.test(e.point_type)?e.point_type:`circle`;return Y(e.point_pattern)?e.point_pattern:[t]},generatePoint:function(){var e=this,t=e.$el,n=e.config,r=[],i=e.getValidPointPattern();return function(a,o){var s=[...arguments].slice(2);return function(c){var l=e.getTargetSelectorSuffix(c.id||c.data?.id||c),u=A(this);r.indexOf(l)<0&&r.push(l);var d=i[r.indexOf(l)%i.length];if(e.hasValidPointType(d))d=e[d];else if(!_o(d||n.point_type)){var f=e.getDefsPointId(l);if(t.defs.select(`#${f}`).size()<1&&vo.call(e,d,f),a===`create`)return e.custom?.create.bind(o).apply(void 0,N([u,f],s,!1));if(a===`update`)return e.custom?.update.bind(o).apply(void 0,N([u],s,!1))}return d[a]?.bind(o).apply(void 0,N([u],s,!1))}}}};Lr.radarPoints,Lr.radarTextWidth;var bo={point_show:!0,point_r:2.5,point_radialGradient:!1,point_sensitivity:10,point_focus_expand_enabled:!0,point_focus_expand_r:void 0,point_focus_only:!1,point_opacity:void 0,point_pattern:[],point_select_r:void 0,point_type:`circle`},xo={area_above:!1,area_below:!1,area_front:!0,area_linearGradient:!1,area_zerobased:!0},So={bar_connectLine:!1,bar_front:!1,bar_indices_removeNull:!1,bar_label_threshold:0,bar_linearGradient:!1,bar_overlap:!1,bar_padding:0,bar_radius:void 0,bar_radius_ratio:void 0,bar_sensitivity:2,bar_width:void 0,bar_width_ratio:.6,bar_width_max:void 0,bar_zerobased:!0},Co={line_connectNull:!1,line_step_type:`step`,line_step_tooltipMatch:!1,line_zerobased:!1,line_classes:void 0,line_point:!0},wo={scatter_zerobased:!1},To={arc_cornerRadius:0,arc_cornerRadius_ratio:0,arc_needle_show:!1,arc_needle_color:void 0,arc_needle_value:void 0,arc_needle_path:void 0,arc_needle_length:100,arc_needle_top_rx:0,arc_needle_top_ry:0,arc_needle_top_width:0,arc_needle_bottom_rx:1,arc_needle_bottom_ry:1,arc_needle_bottom_width:15,arc_needle_bottom_len:0,arc_rangeText_values:void 0,arc_rangeText_unit:`absolute`,arc_rangeText_fixed:!1,arc_rangeText_format:void 0,arc_rangeText_position:void 0};-1*Math.PI/2;var Eo={pie_label_show:!0,pie_label_format:void 0,pie_label_ratio:void 0,pie_label_threshold:.05,pie_label_line:!1,pie_label_image:void 0,pie_expand:{},pie_expand_rate:.98,pie_expand_duration:50,pie_innerRadius:0,pie_outerRadius:void 0,pie_padAngle:0,pie_padding:0,pie_startingAngle:0};function Do(e,t){cr(Ki.prototype,Object.values(Ga).concat(e)),cr(ua.prototype,Wa),Pr.setOptions(Object.values(Ka).concat(t||[]))}function Oo(e,t){Do([yo,go,mo].concat(e||[])),Pr.setOptions([bo,Co].concat(t||[]))}function ko(e,t){cr(Ki.prototype,[so,yo].concat(e||[])),Pr.setOptions([bo].concat(t||[]))}var Ao=function(){return Oo(co,[xo]),(Ao=function(){return $.AREA})()},jo=function(){return Oo(),(jo=function(){return $.LINE})()},Mo=function(){return ko(void 0,[To,Eo]),(Mo=function(){return $.PIE})()},No=function(){return Do([uo,yo],[So,bo]),(No=function(){return $.BAR})()},Po=function(){return Do([yo,go],[bo,wo]),(Po=function(){return $.SCATTER})()};cr(function(e){var t=this.internal,n=t.axis,r=t.brush,i=t.config,a=t.scale,o=a.x,s=a.subX,c=t.state,l;return i.subchart_show&&(l=e,Array.isArray(l)?(n.isTimeSeries()&&(l=l.map(function(e){return wr.bind(t)(e)})),t.withinRange(l,t.getZoomDomain(`subX`,!0),t.getZoomDomain(`subX`))&&(c.domain=l,r.move(r.getSelection(),l.map(s)))):l=c.domain??o.orgDomain()),l},{show:function(){var e,t=this.internal,n=t.$el.subchart,r=t.config,i=r.subchart_show;if(!i){t.unbindZoomEvent(),r.subchart_show=!i,!n.main&&t.initSubchart();var a=n.main.selectAll(`.${P.target}`);t.data.targets.length!==a.size()&&(t.updateSizes(),t.updateTargetsForSubchart(t.data.targets),a=n.main?.selectAll(`.${P.target}`)),a?.style(`opacity`,null),(e=n.main)==null||e.style(`display`,null),this.resize()}},hide:function(){var e=this.internal,t=e.$el.subchart.main,n=e.config;n.subchart_show&&t?.style(`display`)!==`none`&&(n.subchart_show=!1,t.style(`display`,`none`),this.resize())},toggle:function(){var e=this.internal.config;this.subchart[e.subchart_show?`hide`:`show`]()},reset:function(){var e=this.internal.brush;e.clear(e.getSelection())}}),cr(function(e){var t=this.internal,n=t.axis,r=t.config,i=t.org,a=t.scale,o=t.state,s=n.isCategorized(),c;if(r.zoom_enabled)if(c=e,Array.isArray(c)){if(n.isTimeSeries()&&(c=c.map(function(e){return wr.bind(t)(e)})),t.withinRange(c,t.getZoomDomain(`zoom`,!0),t.getZoomDomain(`zoom`))){if(o.domain=c,c=t.getZoomDomainValue(c),t.api.tooltip.hide(),r.subchart_show){var l=a.zoom||a.x;t.brush.getSelection().call(t.brush.move,c.map(l))}else{var l=s?a.x.orgScale():i.xScale||a.x;t.updateCurrentZoomTransform(l,c)}t.setZoomResetButton()}}else c=t.zoom.getDomain();return o.domain??c},{enable:function(e){var t=this.internal,n=t.config;/^(drag|wheel)$/.test(e)&&(n.zoom_type=e),n.zoom_enabled=!!e,t.zoom?e===!1&&t.bindZoomEvent(!1):(t.initZoom(),t.bindZoomEvent()),t.updateAndRedraw()},max:function(e){var t=this.internal,n=t.config,r=t.org.xDomain;return(e===0||e)&&(n.zoom_x_max=xr(`max`,[r[1],e])),n.zoom_x_max},min:function(e){var t=this.internal,n=t.config,r=t.org.xDomain;return(e===0||e)&&(n.zoom_x_min=xr(`min`,[r[0],e])),n.zoom_x_min},range:function(e){var t=this.zoom;if(Z(e)){var n=e.min,r=e.max;J(n)&&t.min(n),J(r)&&t.max(r)}return{min:t.min(),max:t.max()}}}),M(M({},{drag:function(e){var t=this,n=t.config,r=t.state,i=t.$el.main,a=n.data_selection_grouped,o=n.interaction_enabled&&n.data_selection_isselectable;if(!(t.hasArcType()||!n.data_selection_enabled||n.zoom_enabled&&!t.zoom.altDomain||!n.data_selection_multiple)){var s=r.dragStart||[0,0],c=s[0],l=s[1],u=e[0],d=e[1],f=Math.min(c,u),p=Math.max(c,u),m=a?r.margin.top:Math.min(l,d),h=a?r.height:Math.max(l,d);jr(t.state,function(){!t||!t.$el||!t.$el.main||(i.select(`.${Kt.dragarea}`).attr(`x`,f).attr(`y`,m).attr(`width`,p-f).attr(`height`,h-m),i.selectAll(`.${$t.shapes}`).selectAll(`.${$t.shape}`).filter(function(e){return o?.bind(t.api)(e)}).each(function(e,n){var r=A(this),i=r.classed(B.SELECTED),a=r.classed(Kt.INCLUDED),o=!1,s;if(r.classed(I.circle)){var c=r.attr(`cx`)*1,l=r.attr(`cy`)*1;s=t.togglePoint,o=f<c&&c<p&&m<l&&l<h}else if(r.classed(Ut.bar)){var u=$n(this),c=u.x,l=u.y,d=u.width,g=u.height;s=t.togglePath,o=!(p<c||c+d<f)&&!(h<l||l+g<m)}else return;o^a&&(r.classed(Kt.INCLUDED,!a),r.classed(B.SELECTED,!i),s.call(t,!i,r,e,n))}))})}},dragstart:function(e){var t=this,n=t.config,r=t.state,i=t.$el.main;t.hasArcType()||!n.data_selection_enabled||(r.dragStart=e,i.select(`.${P.chart}`).append(`rect`).attr(`class`,Kt.dragarea).style(`opacity`,`0.1`),t.setDragStatus(!0))},dragend:function(){var e=this,t=e.config,n=e.$el.main,r=e.$T;e.hasArcType()||!t.data_selection_enabled||(r(n.select(`.${Kt.dragarea}`)).style(`opacity`,`0`).remove(),n.selectAll(`.${$t.shape}`).classed(Kt.INCLUDED,!1),e.setDragStatus(!1))}}),{selectPoint:function(e,t,n){var r=this,i=r.config,a=r.$el.main,o=r.$T,s=i.axis_rotated,c=(s?r.circleY:r.circleX).bind(r),l=(s?r.circleX:r.circleY).bind(r),u=r.pointSelectR.bind(r);Q(i.data_onselected,r.api,t,e.node()),o(a.select(`.${B.selectedCircles}${r.getTargetSelectorSuffix(t.id)}`).selectAll(`.${B.selectedCircle}-${n}`).data([t]).enter().append(`circle`).attr(`class`,function(){return r.generateClass(B.selectedCircle,n)}).attr(`cx`,c).attr(`cy`,l).attr(`stroke`,r.color).attr(`r`,function(e){return r.pointSelectR(e)*1.4})).attr(`r`,u)},unselectPoint:function(e,t,n){var r=this,i=r.config,a=r.$el.main,o=r.$T;Q(i.data_onunselected,r.api,t,e?.node()),o(a.select(`.${B.selectedCircles}${r.getTargetSelectorSuffix(t.id)}`).selectAll(`.${B.selectedCircle}-${n}`)).attr(`r`,0).remove()},togglePoint:function(e,t,n,r){var i=`${e?``:`un`}selectPoint`;this[i](t,n,r)},selectPath:function(e,t){var n=this,r=n.config;Q(r.data_onselected,n.api,t,e.node()),r.interaction_brighten&&e.style(`filter`,`brightness(1.25)`)},unselectPath:function(e,t){var n=this,r=n.config;Q(r.data_onunselected,n.api,t,e.node()),r.interaction_brighten&&e.style(`filter`,null)},togglePath:function(e,t,n,r){this[`${e?``:`un`}selectPath`](t,n,r)},getToggle:function(e,t){var n=this;return e.nodeName===`path`?n.togglePath:n.isStepType(t)?function(){}:n.togglePoint},toggleShape:function(e,t,n){var r=this,i=r.config,a=r.$el.main;if(i.data_selection_enabled&&i.data_selection_isselectable.bind(r.api)(t)){var o=A(e),s=o.classed(B.SELECTED),c=r.getToggle(e,t).bind(r),l;if(!i.data_selection_multiple){var u=r.isPointFocusOnly?.call(r),d=`.${u?B.selectedCircles:$t.shapes}`;i.data_selection_grouped&&(d+=r.getTargetSelectorSuffix(t.id)),a.selectAll(d).selectAll(u?`.${B.selectedCircle}`:`.${$t.shape}.${B.SELECTED}`).classed(B.SELECTED,!1).each(function(e){var t=A(this);l=t,c(!1,t,e,e.index)})}(!l||l.node()!==o.node())&&(o.classed(B.SELECTED,!s),c(!s,o,t,n))}}});var Fo=Object.create(null),Io={version:`3.18.0`,generate:function(e){var t=new ua(yr(Object.create(null),Fo,e));return t.internal.charts=this.instance,this.instance.push(t),t},defaults:function(e){return Z(e)&&(Fo=e),Fo},instance:[],plugin:{}},Lo=e=>{Ro(e.MsgQueue),Vo(zt(`.block`)),Vo(zt(`table td`))};function Ro(e){e.forEach(e=>Bo(e?.data))}var zo=(e,t=e=>{})=>({axis:(e=>(t(e),e))({x:{tick:{format(t){return e[0].xlabels[t]||t}}}})});function Bo(e){if(!e)return;let{chartID:t,chartType:n,chartData:r}=e,i={bindto:`#${t}`};switch(n){case`lineChart`:Object.assign(i,{data:{columns:r.map(e=>[e.key,...e.values.map(({y:e})=>e)]),type:jo()},...zo(r),interaction:{enabled:!0}});break;case`barChart`:Object.assign(i,{data:{columns:r.map(e=>[e.key,...e.values.map(({y:e})=>e)]),type:No()},...zo(r,e=>e.x.tick.multiline=!0)});break;case`pieChart`:case`pie3DChart`:Object.assign(i,{data:{columns:Object.values(r[0].xlabels).map((e,t)=>[e,r[0].values[t].y]),type:Mo()}});break;case`areaChart`:Object.assign(i,{data:{columns:r.map(e=>[e.key,...e.values.map(({y:e})=>e)]),type:Ao()},interaction:{enabled:!0},...zo(r)});break;case`scatterChart`:Object.assign(i,{data:{xs:{y:`x`},columns:r.map((e,t)=>[t?`y`:`x`,...e]),type:Po()},axis:{x:{label:`X`,showDist:!0,tick:{format:Le(`.02f`)}},y:{label:`Y`,showDist:!0,tick:{format:Le(`.02f`)}}}});break;default:}i.data&&Io.generate(i)}function Vo(e){let t=e;for(let e=0;e<t.length;e++){let n=zt(t[e]).find(`.numeric-bullet-style`);if(n.length>0){let e=``,t=``,r=0,i=[],a=0,o=[];for(let s=0;s<n.length;s++){let c=zt(n[s]).data(`bulltname`),l=zt(n[s]).data(`bulltlvl`);r==0?(e=c,t=l,i[a]=r,o[a]=c,r++):c==e&&l==t?(e=c,t=l,r++,i[a]=r,o[a]=c):c!=e&&l==t||c!=e&&Number(l)>Number(t)?(e=c,t=l,a++,i[a]=r,o[a]=c,r=1):c!=e&&Number(l)<Number(t)&&(e=c,t=l,a--,r=i[a]+1);let u=Ho(o[a],r);zt(n[s]).html(u)}}}}function Ho(e,t){let n=``;switch(e){case`arabicPeriod`:n=t+`. `;break;case`arabicParenR`:n=t+`) `;break;case`alphaLcParenR`:n=Ko(t,`lowerCase`)+`) `;break;case`alphaLcPeriod`:n=Ko(t,`lowerCase`)+`. `;break;case`alphaUcParenR`:n=Ko(t,`upperCase`)+`) `;break;case`alphaUcPeriod`:n=Ko(t,`upperCase`)+`. `;break;case`romanUcPeriod`:n=Uo(t)+`. `;break;case`romanLcParenR`:n=Uo(t)+`) `;break;case`hebrew2Minus`:n=Wo.format(t)+`-`;break;default:n=String(t)}return n}function Uo(e){if(!+e)return!1;let t=String(+e).split(``),n=`.C.CC.CCC.CD.D.DC.DCC.DCCC.CM..X.XX.XXX.XL.L.LX.LXX.LXXX.XC..I.II.III.IV.V.VI.VII.VIII.IX`.split(`.`),r=``,i=3;for(;i--;)r=(n[+(t.pop()??``)+i*10]||``)+r;return Array(+t.join(``)+1).join(`M`)+r}var Wo=Go([[1e3,``],[400,`ת`],[300,`ש`],[200,`ר`],[100,`ק`],[90,`צ`],[80,`פ`],[70,`ע`],[60,`ס`],[50,`נ`],[40,`מ`],[30,`ל`],[20,`כ`],[10,`י`],[9,`ט`],[8,`ח`],[7,`ז`],[6,`ו`],[5,`ה`],[4,`ד`],[3,`ג`],[2,`ב`],[1,`א`],[/יה/,`ט״ו`],[/יו/,`ט״ז`],[/([א-ת])([א-ת])$/,`$1״$2`],[/^([א-ת])$/,`$1׳`]]);function Go(e){return e.slice().sort(function(e,t){return t[1].length-e[1].length}),{format:function(t){let n=``;return zt.each(e,function(){let e=this[0];if(parseInt(e)>0)for(;t>=e;t-=e)n+=this[1];else n=n.replace(e,this[1])}),n}}}function Ko(e,t){e=Number(e)-1;let n=``;return t==`upperCase`?n=((e/26>=1?String.fromCharCode(e/26+64):``)+String.fromCharCode(e%26+65)).toUpperCase():t==`lowerCase`&&(n=((e/26>=1?String.fromCharCode(e/26+64):``)+String.fromCharCode(e%26+65)).toLowerCase()),n}var qo={create(){return Ve(`pptx.worker.js`).defaults(()=>new Worker(new URL(``+new URL(`pptx.worker-c0GnmoEE.js`,import.meta.url).href,``+import.meta.url),{type:`module`}))}},Jo=o(n({__name:`PptxRender`,props:{data:{},options:{type:Function,default:Bt}},setup(n){let o=n,c=e(null);return(()=>{let e={isDone:!1,thumbElement:null,worker:null,timer:null,resizeObserver:null,resizeFrame:0},t={startWorker(){e.worker&&e.worker.terminate(),e.timer&&clearInterval(e.timer);let t=e.worker=qo.create();t.addEventListener(`message`,e=>{this.processMessage(e.data)},!1),t.addEventListener(`error`,e=>{console.error(e)},!1),t.postMessage({type:`processPPTX`,data:o.data,IE11:`MSInputMethodContext`in window&&`documentMode`in document,options:o.options()}),e.timer=window.setInterval(this.stopWorker,500)},stopWorker(){e.isDone&&(e.worker?.terminate(),console.log(`worker terminated`),e.timer&&clearInterval(e.timer))},scheduleResize(){window.cancelAnimationFrame(e.resizeFrame),e.resizeFrame=window.requestAnimationFrame(()=>{this.resize()})},resize(){if(c.value){let e=zt(c.value),t=Math.max(...Array.from(e.children(`.slide, section`)).map(e=>e.offsetWidth),0),n=e[0].offsetWidth;if(!t||!n)return;e.css({transform:`scale(${Math.min(1,n/t)})`,"transform-origin":`top left`})}},processMessage(t){if(e.isDone||!c.value)return;let n=zt(c.value),{thumbElement:r}=e;switch(t.type){case`slide`:console.log(`正在处理:`,t.slide_num),n.append(t.data),a(()=>{this.scheduleResize()});break;case`pptx-thumb`:r&&zt(r).attr(`src`,`data:image/jpeg;base64,${t.data}`);break;case`slideSize`:break;case`globalCSS`:n.append(`<style>${t.data}</style>`);break;case`ExecutionTime`:case`Done`:console.log(`pptx渲染完成,耗时`,t.data),Lo(t.charts),e.isDone=!0,a(()=>{this.scheduleResize()});break;case`WARN`:console.warn(`PPTX processing warning: `,t.data);break;case`ERROR`:e.isDone=!0,console.error(`PPTX processing error: `,t.data);break;case`DEBUG`:console.debug(`Worker: `,t.data);break;default:console.info(`Worker: `,t.data)}}};r(()=>{t.startWorker(),c.value&&(e.resizeObserver=new ResizeObserver(()=>{t.scheduleResize()}),e.resizeObserver.observe(c.value),c.value.parentElement&&e.resizeObserver.observe(c.value.parentElement))}),i(()=>{e.worker?.terminate(),e.timer&&clearInterval(e.timer),window.cancelAnimationFrame(e.resizeFrame),e.resizeObserver?.disconnect()})})(),(e,n)=>(t(),s(`div`,{class:`pptx-wrapper`,ref_key:`wrapper`,ref:c},null,512))}}),[[`__scopeId`,`data-v-08511eed`]]);export{Jo as default};