@sheetxl/react 0.7.9 → 0.7.11

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.
@@ -1,6 +1,6 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(`._sheetxl-sheet_1qeq6_5 ._viewport-overlay_1qeq6_6{pointer-events:none}._sheetxl-sheet_1qeq6_5 ._viewport-overlay_1qeq6_6 *{pointer-events:initial}._sheetxl-sheet_1qeq6_5 .cell-container>*{overflow:hidden}._sheetxl-sheet_1qeq6_5 .cell-container .text-box{position:absolute}._sheetxl-sheet_1qeq6_5 .cell-container .text-line{text-rendering:optimizespeed;position:absolute;vertical-align:baseline;white-space:pre}._sheetxl-sheet_1qeq6_5 .cell-container .filter-button{position:absolute;display:flex;align-items:center;justify-content:center;flex-direction:row;margin-bottom:4px}._sheetxl-sheet_1qeq6_5 .cell-container .text-debug-bounds{position:absolute;background:green;pointer-events:none;opacity:.2}._sheetxl-sheet_1qeq6_5 .cell-container .fill{position:absolute}._sheetxl-sheet_1qeq6_5 .cell-container .pending{width:6px;height:6px;top:5px;left:4px;position:absolute;border:var(--sxl-app-color-primary-dark, grey) .5px;border-style:double;border-radius:50%;background-color:var(--sxl-app-color-button-surface, grey);opacity:1;animation:_pulse_1qeq6_1 1.5s infinite alternate}@keyframes _pulse_1qeq6_1{0%{transform:scale(1);opacity:1}50%{transform:scale(1.2);opacity:.8}to{transform:scale(1);opacity:1}}._sheetxl-sheet_1qeq6_5 .cell-container .slider{position:absolute;width:130%;height:2px;bottom:1px;opacity:0;animation:_fadeIn_1qeq6_1 0s .5s forwards;overflow-x:hidden}._sheetxl-sheet_1qeq6_5 .cell-container .line{position:absolute;opacity:.3;background:var(--sxl-app-color-primary-light, rgb(173, 173, 173)) .5px;width:100%;height:2px}._sheetxl-sheet_1qeq6_5 .cell-container .subline{position:absolute;background:var(--sxl-app-color-primary, rgb(77, 77, 77)) .5px;opacity:.9;height:3px}._sheetxl-sheet_1qeq6_5 .cell-container .inc{animation-delay:0s;animation:_increase_1qeq6_1 3s infinite}@keyframes _fadeIn_1qeq6_1{0%{opacity:0;height:0px}to{opacity:1;height:2px}}@keyframes _increase_1qeq6_1{0%{left:-150%;width:30%;animation-timing-function:ease}to{left:100%;width:30%}}._TaskPaneArea_6dmgk_5{position:absolute;height:100%;width:100%;display:flex;flex-direction:row}._TaskPaneTitle_6dmgk_13{display:flex;box-sizing:border-box;flex:1 1 0;flex-direction:row;align-items:center;font-size:1.25rem;height:100%;width:100%;padding:8px 16px;border-bottom:solid rgba(0,0,0,.2) 1px}._TaskPaneTitle_6dmgk_13 .title{opacity:.87}._TaskPaneTitle_6dmgk_13.focused .title{opacity:1}._TaskPaneFrame_6dmgk_36{display:flex;position:relative;flex-direction:column;width:100%;box-sizing:border-box;flex:1 1 0;min-height:0;align-items:stretch;justify-content:stretch;margin-bottom:4px;border-radius:4px;overflow:hidden}._TaskPaneStrip_6dmgk_52{display:flex;flex-direction:column;gap:4px;margin-top:4px;margin-left:2px}._TaskPaneStripItem_6dmgk_60{display:flex;flex-direction:row;align-items:center;padding:4px;border-radius:4px;border:grey solid 1px}._TaskPaneStripItem_6dmgk_60.selected{font-weight:700}._sheet-scrollbar_104cg_1{margin-left:2px;margin-bottom:1px;align-items:center}._sheet-selection_12wyx_5 .fill-handle .dragging,._movable-area_314c6_5 .moveable-control-box .dragging{opacity:0}._movable-area_314c6_5 .moveable-control-box .moveable-control{width:11px;height:11px;margin-top:-5.5px;margin-left:-5.5px;background-color:var(--sxl-app-color-background, white);background-image:var(--sxl-app-image-background);border:2px solid var(--sxl-app-color-primary-dark, grey)}._movable-area_314c6_5 .moveable-control-box .moveable-line{background:var(--sxl-app-color-grey, grey)}@media (pointer: coarse){._movable-area_314c6_5 .moveable-control-box .moveable-control{width:22px;height:22px;margin-top:-11px;margin-left:-11px}}._editable-input_1bqx6_6{position:absolute;left:0;top:0;width:100%;min-height:calc(100% + 1px);border:none;padding:0;outline:none;color:inherit;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:1.2;letter-spacing:inherit;text-transform:inherit;background:transparent}@keyframes _pop_1wyun_1{0%{transform:scale(1)}to{transform:scale(var(--scale))}}@keyframes _fadeIn_1wyun_33{0%{opacity:0}to{opacity:1}}._Wrapper_1wyun_25{display:flex;box-sizing:border-box;transform:translate3d(var(--translate-x, 0),var(--translate-y, 0),0) scaleX(var(--scale-x, 1)) scaleY(var(--scale-y, 1));transform-origin:0 0;touch-action:manipulation}._Wrapper_1wyun_25._dragOverlay_1wyun_37{z-index:999}._Item_1wyun_47{position:relative;display:flex;align-items:center;outline:none;box-sizing:border-box;transform-origin:50% 50%;-webkit-tap-highlight-color:transparent;transform:scale(var(--scale, 1))}._Item_1wyun_47:not(._withHandle_1wyun_61){touch-action:manipulation}._Item_1wyun_47._dragging_1wyun_66:not(._dragOverlay_1wyun_37){z-index:999}._Item_1wyun_47._dragOverlay_1wyun_37{cursor:inherit;animation:_pop_1wyun_1 .2s cubic-bezier(.18,.67,.6,1.22);transform:scale(var(--scale));opacity:1}._Row_1kr10_1{display:flex;box-sizing:border-box}._TabStrip_3x0dp_1::-webkit-scrollbar{display:none;height:0px}._TabStrip_3x0dp_1{overflow-y:auto;overflow-x:hidden;position:relative}._script-editor_iy654_5 .monaco-editor{position:absolute}._script-editor_iy654_5 .monaco-editor .margin-icon{display:block;width:16px;height:16px;background-size:16px;background-repeat:no-repeat;background-position:center;background-size:contain}._script-editor_iy654_5 .monaco-editor .formula{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="grey"><path d="m 12.106007,8.1692949 c 0.124174,-0.1578352 0.181773,-0.3565642 0.283755,-0.5271169 0.10273,-0.1715492 0.04413,-0.2027176 -0.129161,-0.2014713 -0.685452,0.00576 -1.371152,-0.00277 -2.056604,0.00501 C 10.021228,7.4479573 9.9586414,7.407817 9.9935503,7.2080883 10.145401,6.3413623 10.291269,5.4736396 10.51219,4.6213758 10.642847,4.1167002 10.782479,3.6117747 11.061498,3.1622046 11.339518,2.7138809 11.726751,2.5974365 12.2035,2.829328 c 0.398455,0.1934923 0.722604,0.4827333 0.990152,0.8340617 0.116944,0.1535968 0.27079,0.2740306 0.449073,0.1715499 0.343348,-0.1974819 0.644807,-0.4383502 0.819599,-0.826332 0.100985,-0.2244112 0.157836,-0.476001 0.04039,-0.7058977 C 14.339646,1.9840253 14.038187,1.7618584 13.707056,1.6394296 13.156999,1.4362128 12.562559,1.4840872 12.017239,1.6758341 11.38789,1.8970037 10.783727,2.2625445 10.259602,2.6724688 10.066109,2.8238217 9.8783519,2.9839017 9.7013165,3.1547035 9.0502751,3.7823067 8.5657962,4.529097 8.2246919,5.3651534 7.9823276,5.9595939 7.7888351,6.5660026 7.6913412,7.2015842 7.673637,7.318528 7.6357391,7.423253 7.5065759,7.4432009 7.3472438,7.4678879 7.1592376,7.4436995 6.9974121,7.4441728 6.6351128,7.4451447 6.2598478,7.3676233 5.9915515,7.6815496 5.8721151,7.8211835 5.7461952,7.9840062 5.6439635,8.1371045 c -0.1009847,0.1518511 -0.093255,0.3002122 0.085027,0.367535 0.1957362,0.073561 0.4528118,0.026182 0.6530361,0.0197 0.2645558,-0.00847 0.5291116,0.00501 0.7936674,-7.476e-4 0.1820229,-0.00374 0.2413669,0.030421 0.2064588,0.2358807 C 7.3487406,8.9587006 7.3095941,9.1492003 7.2804197,9.3464333 7.1804317,10.024404 7.0667304,10.700629 6.9525298,11.376606 6.7936963,12.314146 6.6371075,13.252434 6.4655575,14.188478 6.3017374,15.082631 6.1855427,15.985013 5.983074,16.873433 5.8249883,17.568607 5.7240037,18.277248 5.5556954,18.969682 5.4145655,19.550158 5.293882,20.143601 4.9722259,20.665731 4.7380909,21.045734 4.3959882,21.206312 3.9663652,21.104829 3.5778849,21.012322 3.2115961,20.866205 2.8951763,20.608631 2.6862246,20.438328 2.4473513,20.31141 2.1920214,20.458026 1.9519014,20.595915 1.7791048,20.851743 1.646453,21.088123 1.2205704,21.847879 1.915497,22.569984 2.6655289,22.684434 3.1692071,22.760986 3.666153,22.580208 4.1087416,22.356046 4.6996913,22.056582 5.2103511,21.635437 5.6387269,21.13874 5.9898058,20.731558 6.3575906,20.343327 6.6500737,19.890016 6.8450616,19.58756 7.0238427,19.274881 7.1866655,18.954471 7.7639005,17.817206 8.1227091,16.589926 8.4189318,15.354418 8.5613081,14.760227 8.716401,14.169777 8.8478064,13.572843 9.0268365,12.760724 9.1741996,11.934891 9.3083481,11.114294 9.3749255,10.707112 9.4310263,10.300679 9.5160532,9.8967389 9.5861222,9.5636133 9.6442168,9.2185186 9.6890985,8.8814035 9.7414633,8.4891827 9.990308,8.5136187 10.329668,8.4762164 c 0.286249,-0.03167 0.574492,-0.046376 0.861739,-0.067571 0.230395,-0.016703 0.494951,0.00396 0.711881,-0.088019 0.07754,-0.032911 0.147613,-0.080788 0.202719,-0.1513533 z"/><path d="M 22.473802,7.8481382 C 22.426924,7.6912996 22.341898,7.5501696 22.231437,7.4294861 22.130452,7.3192756 21.987827,7.1749046 21.851933,7.1098255 21.411589,6.8988785 20.817398,7.0838898 20.436149,7.3422154 20.23343,7.479854 20.052405,7.6519026 19.871131,7.8167201 19.691352,7.9802913 19.517061,8.1488492 19.35723,8.3321177 19.025101,8.7128687 18.724639,9.1210479 18.436396,9.5354601 18.296263,9.7374301 17.901549,10.472252 17.781115,10.399942 17.654198,10.323892 17.495365,9.5905657 17.435023,9.3843566 17.351243,9.0978583 17.29539,8.8016361 17.161741,8.5323425 16.97922,8.1643081 16.865268,7.7623629 16.608941,7.4307332 16.325934,7.0639457 16.001036,6.9584722 15.558946,7.092371 c -0.43436,0.1314054 -0.78469,0.4049374 -1.128539,0.6819608 -0.503927,0.4056851 -0.879442,0.926319 -1.256951,1.4439609 -0.28226,0.387483 -0.284753,0.3857373 0.04488,0.7380631 0.206458,0.2211702 0.202718,0.2184272 0.389229,-0.00847 0.2663,-0.3251469 0.524872,-0.6595196 0.882433,-0.8934057 0.261315,-0.1713009 0.417904,-0.1368908 0.57948,0.1326518 0.07929,0.1326517 0.146866,0.2752777 0.200225,0.4208957 0.335619,0.9141014 0.590201,1.8541344 0.89191,2.7784594 0.03815,0.117691 -0.01122,0.193991 -0.06707,0.278519 -0.356565,0.538837 -0.719363,1.074182 -1.123054,1.578607 -0.320409,0.401198 -0.643312,0.803891 -1.073932,1.097621 -0.187757,0.128912 -0.40768,0.217679 -0.635831,0.156839 -0.233887,-0.06283 -0.37377,-0.27478 -0.587459,-0.373521 -0.006,-0.003 -0.01272,-0.0052 -0.01895,-0.0079 -0.09974,-0.04064 -0.249845,-0.0389 -0.353074,-0.01571 -0.454059,0.102482 -0.697669,0.614139 -0.790177,1.023813 -0.08379,0.371776 -0.0013,0.778209 0.261315,1.062463 0.228899,0.24785 0.572248,0.351327 0.901634,0.356315 0.189003,0.0028 0.39995,-0.04663 0.57549,-0.11445 0.670241,-0.262062 1.181649,-0.887172 1.605038,-1.441717 0.285501,-0.374517 0.550555,-0.763994 0.829573,-1.143499 0.230645,-0.313677 0.68595,-1.247726 0.81586,-1.250718 0.07854,-0.0017 0.09924,0.185762 0.114199,0.241117 0.03341,0.123675 0.06658,0.247351 0.102232,0.370279 0.167561,0.578481 0.343848,1.156464 0.525122,1.730458 0.120934,0.384242 0.315921,0.782697 0.560779,1.103356 0.07431,0.09749 0.167311,0.190749 0.26306,0.266799 0.371276,0.296972 0.838799,0.27453 1.266177,0.123177 0.191498,-0.06757 0.370029,-0.163071 0.539335,-0.275527 0.781948,-0.519886 1.340732,-1.244235 1.868598,-2.002495 0.124423,-0.178781 0.107467,-0.278769 -0.03441,-0.428127 -0.367286,-0.386237 -0.357062,-0.389727 -0.705149,0.01995 -0.261066,0.306446 -0.527117,0.612643 -0.879442,0.818851 -0.245855,0.144621 -0.413416,0.103229 -0.592696,-0.118439 -0.14861,-0.183518 -0.246353,-0.396709 -0.33138,-0.614886 -0.349831,-0.901136 -0.588954,-1.838675 -0.885177,-2.757515 -0.21743,-0.674231 -0.223414,-0.680464 0.20945,-1.248723 0.447575,-0.587708 0.875703,-1.1968602 1.462163,-1.6613914 0.431119,-0.3416031 0.73183,-0.3226534 1.129037,0.059094 0.0788,0.075801 0.207456,0.1388856 0.316919,0.1476127 0.369781,0.029674 0.691187,-0.3024566 0.880939,-0.5792304 0.188006,-0.2727835 0.259319,-0.6183768 0.163072,-0.9392845 z"/></svg>');cursor:pointer}._script-editor_iy654_5 .monaco-editor .macro{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="grey"><path d="M 5.1933594,1.4433594 6.3417969,2.5234375 6.2109375,2.6621094 c -3.466072,3.6769426 -3.467641,9.6565186 0,13.3339846 l 0.1308594,0.136718 -1.1484375,1.082032 -0.1328125,-0.140625 c -4.0371886,-4.28224 -4.0373752,-11.2077961 0,-15.4902346 z m 14.4726566,0 0.132812,0.140625 c 4.03717,4.2822197 4.037356,11.2058636 0,15.4882816 l -0.132812,0.140625 -1.148438,-1.080079 0.130859,-0.138671 c 3.465532,-3.675243 3.466902,-9.6542123 0,-13.3320316 L 18.517578,2.5234375 Z M 7.7597656,4.4335937 8.8769531,5.5488281 8.7421875,5.6816406 c -2.0366665,2.0366662 -2.037411,5.3404354 0,7.3769534 L 8.8769531,13.191406 7.7597656,14.310547 7.625,14.173828 C 4.9718615,11.520692 4.9723209,7.222936 7.6269531,4.5683594 Z m 9.3398434,0 0.132813,0.1347657 c 2.653779,2.6537788 2.65545,6.9500666 0,9.6054686 l -0.132813,0.136719 -1.117187,-1.119141 0.134765,-0.132812 c 2.036637,-2.035554 2.037534,-5.3391996 0,-7.3769534 L 15.982422,5.5488281 Z m -4.669921,1.7011719 c 0.811773,0 1.627703,0.304374 2.25,0.90625 1.260638,1.2198223 1.260413,3.1986104 0,4.4179684 -0.355144,0.343115 -0.779063,0.585007 -1.226563,0.732422 l -0.234375,0.07617 v 3.386719 h 0.002 v 6.048828 c 0,0.436615 -0.351565,0.791016 -0.789062,0.791016 -0.43763,0 -0.791016,-0.354618 -0.791016,-0.791016 v -3.308594 -6.126953 l -0.234375,-0.07617 c -0.448339,-0.147699 -0.871819,-0.38969 -1.226562,-0.732422 -1.2608671,-1.22004 -1.2605877,-3.1984433 0,-4.4179684 0.62227,-0.6019293 1.438264,-0.90625 2.25,-0.90625 z m 0,1.5820313 c -0.417461,0 -0.829931,0.1510762 -1.146485,0.4570312 -0.615751,0.5967629 -0.616877,1.5583713 0,2.1562499 0.314469,0.303373 0.726552,0.455078 1.146485,0.455078 0.421182,0 0.833304,-0.153008 1.148437,-0.457031 0.61548,-0.5965047 0.616739,-1.5585025 0,-2.15625 C 13.261859,7.8661993 12.846121,7.7167969 12.429688,7.7167969 Z"/></svg>');cursor:pointer}._script-editor_iy654_5 .monaco-editor .autorun{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="grey"><path d="M10 15h5.88c.27-.31.67-.5 1.12-.5.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5c-.44 0-.84-.19-1.12-.5H11.9c-.46 2.28-2.48 4-4.9 4-2.76 0-5-2.24-5-5 0-2.42 1.72-4.44 4-4.9v2.07c-1.16.41-2 1.53-2 2.83 0 1.65 1.35 3 3 3s3-1.35 3-3zm2.5-11c1.65 0 3 1.35 3 3h2c0-2.76-2.24-5-5-5s-5 2.24-5 5c0 1.43.6 2.71 1.55 3.62l-2.35 3.9c-.68.14-1.2.75-1.2 1.48 0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5c0-.16-.02-.31-.07-.45l3.38-5.63C10.49 9.61 9.5 8.42 9.5 7c0-1.65 1.35-3 3-3m4.5 9c-.64 0-1.23.2-1.72.54l-3.05-5.07C11.53 8.35 11 7.74 11 7c0-.83.67-1.5 1.5-1.5S14 6.17 14 7c0 .15-.02.29-.06.43l2.19 3.65c.28-.05.57-.08.87-.08 2.76 0 5 2.24 5 5s-2.24 5-5 5c-1.85 0-3.47-1.01-4.33-2.5h2.67c.48.32 1.05.5 1.66.5 1.65 0 3-1.35 3-3s-1.35-3-3-3"/></svg>');cursor:pointer}`)),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
2
  "use strict";/**
3
- * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.7.9
3
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.7.11
4
4
  *
5
5
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
6
6
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -12,7 +12,7 @@ For example, you can prevent people from editing locked cells or making formatti
12
12
 
13
13
  The table and table specific styling will be removed but the values will be preserved.`,icon:"InsertTable"},function(g){X(this,g,!0)}),new r.Command("convertTableToRange",i,{label:"Convert To Range",description:`Convert the table into a normal range of cells.
14
14
 
15
- The values and the formatting are preserved.`,icon:"InsertTable"},function(g){X(this,g,!1)}),new r.Command("tableTotalRowToggle",i,{label:"Toggle Table Total Row",description:"Toggle Total Row on/off.",scopedLabels:{table:"Total Row"},shortcut:{key:"T",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Alt]}},function(){const g=this.context().table();g&&g.setShowTotals(!g.getShowTotals())}),new r.Command("tableHeaderRowToggle",i,{label:"Toggle Table Header Row",description:"Toggle Header Row on/off.",scopedLabels:{table:"Header Row"}},function(){const g=this.context().table();g&&g.setShowHeaders(!g.getShowHeaders())}),new r.Command("autoFilterToggle",i,{label:"Toggle Filter",scopedLabels:{filter:"Filter"},description:"Toggle Auto Filter on/off.",icon:"FilterToggle",shortcut:{key:"L",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){const g=this.context().table();g&&g.setShowFilterButton(!g.getShowFilterButton())}),new r.Command("autoFilterReapply",i,{label:"Reapply Filter",scopedLabels:{filter:"Reapply"},description:"Reapply the filter and sort with the latest changes.",icon:"FilterReapply",shortcut:{key:"L",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Alt]}}),new r.Command("autoFilterClear",i,{label:"Clear Filter",scopedLabels:{filter:"Clear"},description:"Clear the filters criteria from the current filter..",icon:"FilterClear"}),new r.SimpleCommand("startEditValueAbove",i,{label:"Copy From Above",description:"Copy the value from the cell above the active cell into the cell or the formula bar.",shortcut:[{key:"Quote",modifiers:[r.KeyModifiers.Ctrl]},{key:'"',modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}]},ze),new r.Command("formatPainterToggle",i,{label:"Format Painter",description:"Apply style to another part of your workbook.",icon:"FormatPaint"}),new r.SimpleCommand("insertCells",i,{label:"Insert Cells",scopedLabels:{insertCells:"At Selection"},description:"Inserts cells at the current selection.",icon:"InsertCells",shortcut:{key:"=",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){ee(this)}),new r.SimpleCommand("insertCellsShiftRight",i,{label:"Insert Cells (Shift Right)",scopedLabels:{insertCells:"Shift Right"},description:"Insert cells to the left and shift the current cells to the right.",icon:"InsertCellsRight"},function(){ee(this,d.IRange.Orientation.Column)}),new r.SimpleCommand("insertCellsShiftDown",i,{label:"Insert Cells (Shift Down)",scopedLabels:{insertCells:"Shift Down"},description:"Insert cells above and shift the current cells downward.",icon:"InsertCellsDown"},function(){return ee(this,d.IRange.Orientation.Row)}),new r.SimpleCommand("insertRows",i,{label:"Insert Row(s)",scopedLabels:{insertCells:"Row(s)"},description:"Insert a row above the current position.",icon:"InsertRow"},function(){return ee(this,d.IRange.Orientation.Row,!0)}),new r.SimpleCommand("insertColumns",i,{label:"Insert Column(s)",scopedLabels:{insertCells:"Column(s)"},description:"Insert a column before the current position.",icon:"InsertColumn2"},function(){return ee(this,d.IRange.Orientation.Column,!0)}),new r.SimpleCommand("insertRowsAfter",i,{label:"Insert Row Below",scopedLabels:{insertCells:"Row Below"},description:"Insert a row below the current position."},function(){return ee(this,d.IRange.Orientation.Row,!0,!0)}),new r.SimpleCommand("insertColumnsAfter",i,{label:"Insert Column After",scopedLabels:{insertCells:"Column After"},description:"Insert a column after the current position."},function(){return ee(this,d.IRange.Orientation.Column,!0,!0)}),new r.SimpleCommand("deleteCells",i,{label:"Delete Cells",scopedLabels:{deleteCells:"At Selection"},description:"Delete the cells.",icon:"DeleteCells",shortcut:{key:"-",modifiers:[r.KeyModifiers.Ctrl]}},function(){return ne(this)}),new r.SimpleCommand("deleteCellsShiftUp",i,{label:"Delete Cells (Shift Up)",scopedLabels:{deleteCells:"Shift up"},description:"Delete cells the current current downward.",icon:"DeleteCellsUp"},function(){return ne(this,d.IRange.Orientation.Row)}),new r.SimpleCommand("deleteCellsShiftLeft",i,{label:"Delete Cells (Shift Left)",scopedLabels:{deleteCells:"Shift Left"},description:"Delete cells the current cells to the right.",icon:"DeleteCellsLeft"},function(){return ne(this,d.IRange.Orientation.Column)}),new r.SimpleCommand("deleteRows",i,{label:"Delete Rows",scopedLabels:{deleteCells:"Rows"},description:"Delete the rows at the current selection.",icon:"DeleteRows"},function(){return ne(this,d.IRange.Orientation.Row,!0)}),new r.SimpleCommand("deleteColumns",i,{label:"Delete Columns",scopedLabels:{deleteCells:"Columns"},description:"Delete the columns at the current selection.",icon:"DeleteColumns"},function(){return ne(this,d.IRange.Orientation.Column,!0)}),new r.SimpleCommand("flashFill",i,{label:"Flash Fill",description:"Do a flash fill.",shortcut:[{key:"e",modifiers:[r.KeyModifiers.Ctrl]},{key:"e",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Alt]}]}),new r.SimpleCommand("fillDown",i,{label:"Fill Down",description:"Copy the top-most value from the selection to the bottom of the selection.",icon:"FillDown",shortcut:{key:"d",modifiers:[r.KeyModifiers.Ctrl]}},function(){return ae(this,d.IRange.Direction.Down)}),new r.SimpleCommand("fillRight",i,{label:"Fill Right",description:"Copy the left-most value from the selection to the right of the selection.",icon:"FillRight",shortcut:[{key:"r",modifiers:[r.KeyModifiers.Ctrl]}]},function(){return ae(this,d.IRange.Direction.Right)}),new r.SimpleCommand("fillUp",i,{label:"Fill Up",description:"Copy the bottom-most value from the selection to the top of the selection.",icon:"FillUp"},function(){return ae(this,d.IRange.Direction.Up)}),new r.SimpleCommand("fillLeft",i,{label:"Fill Left",description:"Copy the right-most value from the selection to the left of the selection.",icon:"FillLeft"},function(){return ae(this,d.IRange.Direction.Left)}),new r.SimpleCommand("formatBorderAddOutline",i,{label:"Add Outline Border",description:"Apply an outline border.",shortcut:{key:"7",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){return R(this,{border:{left:{style:d.IBorder.StrokeStyle.Thin,color:null},top:{style:d.IBorder.StrokeStyle.Thin,color:null},right:{style:d.IBorder.StrokeStyle.Thin,color:null},bottom:{style:d.IBorder.StrokeStyle.Thin,color:null}}})}),new r.SimpleCommand("formatBorderClearOutline",i,{label:"Remove Outline Border",description:"Remove the outline border.",shortcut:{key:"_",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){return R(this,{border:null})}),new r.SimpleCommand("formatIndentDecrease",i,{label:"Decrease Indent",description:"Move your content closer to the border.",icon:"FormatIndentDecrease"},function(){return R(this,g=>{const T=g.getAlignment().getIndent()-1;return{alignment:{indent:T>0?T:0}}})}),new r.SimpleCommand("formatIndentIncrease",i,{label:"Increase Indent",description:"Move your content further from the border.",icon:"FormatIndentIncrease"},function(){return R(this,g=>{const T={alignment:{indent:g.getAlignment().getIndent()+1}};return g.getAlignment().getHorizontal()===d.ITextFrame.HorizontalAlignment.General&&(T.alignment.horizontal=d.ITextFrame.HorizontalAlignment.Left),T})}),new r.Command("mergeToggle",i,{label:"Merge",description:"Combine and center the contents into a single cell.",icon:"MergeAll",shortcut:{key:"m",modifiers:[r.KeyModifiers.Ctrl]}}),new r.SimpleCommand("mergeHorizontal",i,{label:"Merge Horizontally",description:"Combine the contents into horizontal rows.",icon:"MergeHorizontal"}),new r.SimpleCommand("mergeVertical",i,{label:"Merge Vertically",description:"Combine the contents into vertical columns.",icon:"MergeVertical"}),new r.SimpleCommand("unmerge",i,{label:"Unmerge",description:"Split merged cells into multiple cells.",icon:"MergeUnMerge"}),new r.SimpleCommand("clearContents",i,{label:"Clear Contents",scopedLabels:{clear:"Contents"},icon:"ClearContents",description:`Clear only the contents in the cells.
15
+ The values and the formatting are preserved.`,icon:"InsertTable"},function(g){X(this,g,!1)}),new r.Command("tableTotalRowToggle",i,{label:"Toggle Table Total Row",description:"Toggle Total Row on/off.",scopedLabels:{table:"Total Row"},shortcut:{key:"T",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Alt]}},function(){const g=this.context().table();g&&g.setShowTotals(!g.getShowTotals())}),new r.Command("tableHeaderRowToggle",i,{label:"Toggle Table Header Row",description:"Toggle Header Row on/off.",scopedLabels:{table:"Header Row"}},function(){const g=this.context().table();g&&g.setShowHeaders(!g.getShowHeaders())}),new r.Command("autoFilterToggle",i,{label:"Toggle Filter",scopedLabels:{filter:"Filter"},description:"Toggle Auto Filter on/off.",icon:"FilterToggle",shortcut:{key:"L",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){const g=this.context().table();g&&g.setShowFilterButton(!g.getShowFilterButton())}),new r.Command("autoFilterReapply",i,{label:"Reapply Filter",scopedLabels:{filter:"Reapply"},description:"Reapply the filter and sort with the latest changes.",icon:"FilterReapply",shortcut:{key:"L",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Alt]}}),new r.Command("autoFilterClear",i,{label:"Clear Filter",scopedLabels:{filter:"Clear"},description:"Clear the filters criteria from the current filter..",icon:"FilterClear"}),new r.SimpleCommand("startEditValueAbove",i,{label:"Copy From Above",description:"Copy the value from the cell above the active cell into the cell or the formula bar.",shortcut:[{key:"Quote",modifiers:[r.KeyModifiers.Ctrl]},{key:'"',modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}]},ze),new r.Command("formatPainterToggle",i,{label:"Format Painter",description:"Apply style to another part of your workbook.",icon:"FormatPaint.yellow"}),new r.SimpleCommand("insertCells",i,{label:"Insert Cells",scopedLabels:{insertCells:"At Selection"},description:"Inserts cells at the current selection.",icon:"InsertCells",shortcut:{key:"=",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){ee(this)}),new r.SimpleCommand("insertCellsShiftRight",i,{label:"Insert Cells (Shift Right)",scopedLabels:{insertCells:"Shift Right"},description:"Insert cells to the left and shift the current cells to the right.",icon:"InsertCellsRight"},function(){ee(this,d.IRange.Orientation.Column)}),new r.SimpleCommand("insertCellsShiftDown",i,{label:"Insert Cells (Shift Down)",scopedLabels:{insertCells:"Shift Down"},description:"Insert cells above and shift the current cells downward.",icon:"InsertCellsDown"},function(){return ee(this,d.IRange.Orientation.Row)}),new r.SimpleCommand("insertRows",i,{label:"Insert Row(s)",scopedLabels:{insertCells:"Row(s)"},description:"Insert a row above the current position.",icon:"InsertRow"},function(){return ee(this,d.IRange.Orientation.Row,!0)}),new r.SimpleCommand("insertColumns",i,{label:"Insert Column(s)",scopedLabels:{insertCells:"Column(s)"},description:"Insert a column before the current position.",icon:"InsertColumn2"},function(){return ee(this,d.IRange.Orientation.Column,!0)}),new r.SimpleCommand("insertRowsAfter",i,{label:"Insert Row Below",scopedLabels:{insertCells:"Row Below"},description:"Insert a row below the current position."},function(){return ee(this,d.IRange.Orientation.Row,!0,!0)}),new r.SimpleCommand("insertColumnsAfter",i,{label:"Insert Column After",scopedLabels:{insertCells:"Column After"},description:"Insert a column after the current position."},function(){return ee(this,d.IRange.Orientation.Column,!0,!0)}),new r.SimpleCommand("deleteCells",i,{label:"Delete Cells",scopedLabels:{deleteCells:"At Selection"},description:"Delete the cells.",icon:"DeleteCells",shortcut:{key:"-",modifiers:[r.KeyModifiers.Ctrl]}},function(){return ne(this)}),new r.SimpleCommand("deleteCellsShiftUp",i,{label:"Delete Cells (Shift Up)",scopedLabels:{deleteCells:"Shift up"},description:"Delete cells the current current downward.",icon:"DeleteCellsUp"},function(){return ne(this,d.IRange.Orientation.Row)}),new r.SimpleCommand("deleteCellsShiftLeft",i,{label:"Delete Cells (Shift Left)",scopedLabels:{deleteCells:"Shift Left"},description:"Delete cells the current cells to the right.",icon:"DeleteCellsLeft"},function(){return ne(this,d.IRange.Orientation.Column)}),new r.SimpleCommand("deleteRows",i,{label:"Delete Rows",scopedLabels:{deleteCells:"Rows"},description:"Delete the rows at the current selection.",icon:"DeleteRows"},function(){return ne(this,d.IRange.Orientation.Row,!0)}),new r.SimpleCommand("deleteColumns",i,{label:"Delete Columns",scopedLabels:{deleteCells:"Columns"},description:"Delete the columns at the current selection.",icon:"DeleteColumns"},function(){return ne(this,d.IRange.Orientation.Column,!0)}),new r.SimpleCommand("flashFill",i,{label:"Flash Fill",description:"Do a flash fill.",shortcut:[{key:"e",modifiers:[r.KeyModifiers.Ctrl]},{key:"e",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Alt]}]}),new r.SimpleCommand("fillDown",i,{label:"Fill Down",description:"Copy the top-most value from the selection to the bottom of the selection.",icon:"FillDown",shortcut:{key:"d",modifiers:[r.KeyModifiers.Ctrl]}},function(){return ae(this,d.IRange.Direction.Down)}),new r.SimpleCommand("fillRight",i,{label:"Fill Right",description:"Copy the left-most value from the selection to the right of the selection.",icon:"FillRight",shortcut:[{key:"r",modifiers:[r.KeyModifiers.Ctrl]}]},function(){return ae(this,d.IRange.Direction.Right)}),new r.SimpleCommand("fillUp",i,{label:"Fill Up",description:"Copy the bottom-most value from the selection to the top of the selection.",icon:"FillUp"},function(){return ae(this,d.IRange.Direction.Up)}),new r.SimpleCommand("fillLeft",i,{label:"Fill Left",description:"Copy the right-most value from the selection to the left of the selection.",icon:"FillLeft"},function(){return ae(this,d.IRange.Direction.Left)}),new r.SimpleCommand("formatBorderAddOutline",i,{label:"Add Outline Border",description:"Apply an outline border.",shortcut:{key:"7",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){return R(this,{border:{left:{style:d.IBorder.StrokeStyle.Thin,color:null},top:{style:d.IBorder.StrokeStyle.Thin,color:null},right:{style:d.IBorder.StrokeStyle.Thin,color:null},bottom:{style:d.IBorder.StrokeStyle.Thin,color:null}}})}),new r.SimpleCommand("formatBorderClearOutline",i,{label:"Remove Outline Border",description:"Remove the outline border.",shortcut:{key:"_",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){return R(this,{border:null})}),new r.SimpleCommand("formatIndentDecrease",i,{label:"Decrease Indent",description:"Move your content closer to the border.",icon:"FormatIndentDecrease"},function(){return R(this,g=>{const T=g.getAlignment().getIndent()-1;return{alignment:{indent:T>0?T:0}}})}),new r.SimpleCommand("formatIndentIncrease",i,{label:"Increase Indent",description:"Move your content further from the border.",icon:"FormatIndentIncrease"},function(){return R(this,g=>{const T={alignment:{indent:g.getAlignment().getIndent()+1}};return g.getAlignment().getHorizontal()===d.ITextFrame.HorizontalAlignment.General&&(T.alignment.horizontal=d.ITextFrame.HorizontalAlignment.Left),T})}),new r.Command("mergeToggle",i,{label:"Merge",description:"Combine and center the contents into a single cell.",icon:"MergeAll",shortcut:{key:"m",modifiers:[r.KeyModifiers.Ctrl]}}),new r.SimpleCommand("mergeHorizontal",i,{label:"Merge Horizontally",description:"Combine the contents into horizontal rows.",icon:"MergeHorizontal"}),new r.SimpleCommand("mergeVertical",i,{label:"Merge Vertically",description:"Combine the contents into vertical columns.",icon:"MergeVertical"}),new r.SimpleCommand("unmerge",i,{label:"Unmerge",description:"Split merged cells into multiple cells.",icon:"MergeUnMerge"}),new r.SimpleCommand("clearContents",i,{label:"Clear Contents",scopedLabels:{clear:"Contents"},icon:"ClearContents",description:`Clear only the contents in the cells.
16
16
 
17
17
  The formatting is not cleared.`,shortcut:{key:"Delete"}},function(){P(this,d.ICell.Content.Values)}),new r.SimpleCommand("clearFormats",i,{label:"Clear Formats",scopedLabels:{clear:"Formats"},icon:"ClearFormats",description:"Clear only the formatting that is applied to the cells."},function(){P(this,d.ICell.Content.Formats)}),new r.SimpleCommand("clearHyperlinks",i,{label:"Clear Hyperlinks",scopedLabels:{clear:"Hyperlinks"},description:"Clear only the hyperlinks in the cells."},function(){P(this,d.ICell.Content.Hyperlinks)}),new r.SimpleCommand("clearComments",i,{label:"Clear Comments",scopedLabels:{clear:"Comments"},description:"Clear the comments from the cells."},function(){P(this,d.ICell.Content.Comments)}),new r.SimpleCommand("clearAll",i,{label:"Clear All",scopedLabels:{clear:"All"},icon:"ClearAll",description:`Clears everything from the cells.
18
18
 
@@ -20,14 +20,14 @@ All contents and formatting are removed.`,shortcut:{key:"Delete",modifiers:[r.Ke
20
20
 
21
21
  The formatting is not applied.`,icon:"PasteValues",shortcut:{key:"V",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}}),new r.Command("pasteFormats",f,{label:"Paste Formatting",scopedLabels:{paste:"Formatting"},description:`Paste only the formats of the selected cells.
22
22
 
23
- The content is not applied.`,icon:"PasteFormats"}),new r.Command("pasteFormulas",f,{label:"Paste Formulas",scopedLabels:{paste:"Formulas"},description:"Paste only the formulas of the selected cells. The values and formatting is not applied.",icon:"PasteFormulas"}),new r.Command("pasteTranspose",f,{label:"Paste Transpose",scopedLabels:{paste:"Transpose"},description:"Paste with the rows and columns flipped.",icon:"PasteTranspose"}),new r.Command("pasteLinks",f,{label:"Paste Links",scopedLabels:{paste:"Links"},description:"Paste as formula references to the original cells.",icon:"PasteLinks"})];l.addCommands(A,!0)},[l,e]),o.useEffect(()=>{if(!l)return;const f={disabled:!t.getProtection().isFormatCellsAllowed()};l.getCommand("pasteValues").updateCallback(A=>M.paste({...ti,...A})).update(f),l.getCommand("pasteFormats").updateCallback((A,S)=>M.paste({...ni,description:S.label(),...A})).update(f),l.getCommand("pasteFormulas").updateCallback((A,S)=>M.paste({...oi,description:S.label(),...A})).update(f),l.getCommand("pasteTranspose").updateCallback((A,S)=>M.paste({...ri,description:S.label(),...A})).update(f),l.getCommand("pasteLinks").updateCallback((A,S)=>M.paste({...li,description:S.label(),...A})).update(f),l.getCommand("cut").update(f),l.getCommand("paste").update(f)},[t,l]);const L=o.useMemo(()=>{if(!F||!I.current)return;const f=F.key;if(f!=="copy"&&f!=="cut"&&f!=="formatPainter")return;const A=I.current.getItem();if(A.getSource()!==t)return;const S=I.current.isCut?.(),W=S?b:p,D=S?s:h,O=A.getCoords(),_=O?[O]:null;return _&&_.length!==0?de=>{const U=[];for(let H=0;H<_.length;H++){const R=_[H],$=de.toClipBounds(de.getRangeCoordsBounds(R,{top:0,left:0,right:1,bottom:1}),ut.SELECTION_CLIP_INSETS);$&&(U.push(u({range:R,key:`copy-selection-background-${H}`,x:$.x,y:$.y,width:Math.max($.width,0),height:Math.max($.height,0),stroke:W,strokeWidth:2})),U.push(u({range:R,key:`copy-selection-foreground-${H}`,x:$.x+($.width<=2?-1:0),y:$.y,width:Math.max($.width,3),height:Math.max($.height,3),stroke:D,strokeWidth:2,isAnimatedStroke:!0})))}return U}:null},[F,t,n,h,p,s,b]);return{...M,clipboard:V,overlays:L}},ii=o.memo(o.forwardRef((e,t)=>{const{view:n,element:l,sheet:a,gridStyle:i,commands:m}=e,h=i.body??{},s=a.getView(),{overlays:p}=Pr({element:l,sheet:a,sheetView:s,commands:m,copyForegroundColor:i.selection.strokeFill,copyBackgroundColor:h.fill,cutForegroundColor:i.selectionRemove.strokeFill,cutBackgroundColor:h.fill});return tt(a?.getSelection(),{onChange(b){}}),o.useEffect(()=>{n?.getStage()},[n?.getStage()]),p&&n?p(n):null})),ai="_sheet-selection_12wyx_5",si={key:"dragCut",description:"Drag selection to move cell contents.",cursor:"move"},ci={key:"dragCutInsert",description:"Drag selection to insert cell contents.",cursor:"copy"},di={key:"dragCopy",description:"Drag selection to copy cell contents."},ui={key:"dragCopyInsert",description:"Drag selection to insert copied cell contents.",cursor:"move"},er=(e,t)=>t.ctrlKey&&t.shiftKey?ui:t.ctrlKey?di:t.shiftKey?ci:si,gi={key:"fill",description:"Drag selection to extend series or fill.",cursor:"crosshair"},hi=o.memo(o.forwardRef((e,t)=>{const{view:n,commands:l,className:a,onFirstRender:i,onShowTooltip:m,onCloseTooltip:h,sheet:s,gridRef:p,gridStyle:b,isActive:v,editingCoords:u,...I}=e,x=n?.getBounds(),F=r.useCallbackRef(m,[m]),z=r.useCallbackRef(h,[h]),[K,V]=o.useState(()=>s?.getSelection().getCoords()),M=r.useCallbackRef(B=>{ge.CoordUtils.isEqualSelectionCoords(B,K)||s&&s.getSelection().updateCoords(B)},[s,K]),L=r.useEditMode(),f=o.useRef(null),[A,S]=o.useState(s?.getProtection().isLocked()),[W,D]=o.useState(s?.getView().getMovableSelection().length>0),O=r.ReactUtils.detectIt().primaryInput==="touch",_=!O&&v,de=u??L.getMode()?.args?.stateAndCoords?.coords,U=de!==void 0||W,H=r.useCallbackRef(B=>{const ne=ge.CoordUtils.cellToRange(B);if(s.isClosed())return ne;const me=s.getRange(ne,{ignoreHidden:!0}).getMerges();return me.length===0?ne:me[0]},[s]),R=r.useCallbackRef((B,ne,me,ae,ze,le)=>{const fe=s.getSelectedRange().getExtended(ae,B).getCoords();switch(ae){case d.IRange.Direction.Up:return fe.rowStart;case d.IRange.Direction.Down:return fe.rowEnd;case d.IRange.Direction.Left:return fe.colStart;case d.IRange.Direction.Right:return fe.colEnd}},[s]),$=r.useCallbackRef(()=>{const B=s.getUsedRange()?.getCoords(),ne=s.getRowHeaders().getUsedRange()?.getCoords(),me=s.getColumnHeaders().getUsedRange()?.getCoords();return{...B,colEnd:Math.max(B?.colEnd??0,me?.max??0),rowEnd:Math.max(B?.rowEnd??0,ne?.max??0)}},[s]),k=r.useCallbackRef((B,ne)=>s.getRowHeaders().hiddenHeadersAt(B,ne),[s]),P=r.useCallbackRef((B,ne)=>s.getColumnHeaders().hiddenHeadersAt(B,ne),[s]),ee=r.useCallbackRef(B=>s.getRange(B,{ignoreHidden:!0}).getMerges(),[s]),re=r.useCallbackRef(B=>{s?.getSelection().setAdjusting(B)},[s]),Re=r.useCallbackRef(async()=>{s?.getSelection().setAdjusting(null),L.getMode()?.key==="formatPainter"&&(await l?.getCommand("pasteFormats")?.execute({}),L.setMode(null))},[L,K,s,l]),he=o.useMemo(()=>{const B=L.getMode();return B?.key==="cut"||B?.key==="copy"},[L]);tt(s?.getView(),{onMovableSelectionChange:()=>{D(s.getView().getMovableSelection().length>0)}}),tt(s?.getSelection(),{onChange(B){const ne=s.getSelection().getCoords();V(ne)}}),tt(s,{onProtectionChange:()=>{S(s.getProtection().isLocked())}});const{body:De={}}=b||{},Fe=r.useNotifier(),ve=n.getLayout(),ke=!(_&&K.ranges.length<=1&&de===null&&!A&&(!L.getMode()||he)),{cursor:$e,overlay:te,onPointerDown:X}=ut.useSelection({gridRef:p,commands:l,layout:ve,getCellCoordsAsRangeCoords:H,selection:K,fillHandleBorderColor:De.fill,selectionBackgroundColor:v?b.selection.fill:b.selectionInactive.fill,selectionBorderColor:v?b.selection.strokeFill:b.selectionInactive.strokeFill,selectionRemoveBackgroundColor:v?b.selectionRemove.fill:b.selectionInactive.fill,selectionRemoveBorderColor:v?b.selectionRemove.strokeFill:b.selectionInactive.strokeFill,disableFillDrag:ke,disableMoveDrag:O||!(v&&K.ranges.length<=1&&de===null&&!A),disableTouchSelection:U,onSelectionChange:M,onSelectionDragStart:re,onSelectionDragEnd:Re,onMoveDragStart:(B,ne,me)=>{L.setMode(er(0,me))},onMoveDragUpdate:(B,ne,me)=>{L.setMode(er(0,me))},onMoveDragEnd:(B,ne)=>{L.setMode(null)},onMoveDragDone:async(B,ne,me)=>{if(ge.CoordUtils.isEqualRanges(B,ne))return;const ae=s.getRange(ne);if(Fe?.showOptions){const be=ae.getDifferences(B);let He=!1;const C=be.getCount();for(let Pe=0;!He&&Pe<C;Pe++)He=be.at(Pe).isContentful();if(He&&await Fe?.showOptions({title:"Confirm",description:"There is already data here. Do you want to replace it?",options:["Replace","Cancel"],defaultOption:"Replace"})!=="Replace")return}const ze=!me.ctrlKey,le=me.shiftKey,fe=le?ze?"Insert Moved Cells":"Insert Copied Cells":ze?"Move Cells":"Copy Cells",Ee=await Fe?.showBusy?.(fe);try{const be=s.getRange(B);await ae.doBatch(async()=>{le?await ae.insertFrom(B,{isCut:ze,undoRange:be}):await ae.copyFrom(B,{isCut:ze,undoRange:be}),be.autoFit({skipCustomSize:!0,orientations:d.IRange.Orientations.Row,minContent:!0}),ae.autoFit({skipCustomSize:!0,orientations:d.IRange.Orientations.Row,minContent:!0})},{description:fe,autoSelect:!0})}catch(be){Fe?.showError?.(be)}finally{Ee?.()}},contentfulCellFinder:R,hiddenRowsAt:k,hiddenColumnsAt:P,mergedRanges:ee,getDataCoords:$,canSelectionSpanMergedCells:B=>{const ne=s.getRange(B);return ne.isEntireColumns()||ne.isEntireRows()},onFill:async(B,ne)=>{const me="Auto Fill",ae=await Fe?.showBusy?.(me);try{await s.doBatch(()=>{s.getRange(B).autoFill(ne),s.getRange(ne).autoFit({orientations:d.IRange.Orientations.Row,skipCustomSize:!0,minContent:!0})},{description:me,autoSelect:!0})}catch(ze){Fe?.showError?.(ze)}finally{f.current=null,ae?.()}},onFillPreview:(B,ne,me)=>{if(p.current&&F){L.setMode(gi);try{f.current?.direction!==me&&(f.current=null,s.getRange(B).autoFill(ne,{previewOnly:C=>{f.current={callback:C,direction:me}}}));const ae=f.current?.callback?.(ne);if(!ae||ae.isEmpty())return;const ze=ae.toText();if(!ze)return;const le=ge.CoordUtils.cellToRange(ae.getCoords()),fe=n.getRelativePointFromClient(0,0);let Ee=0,be=0,He=r.ToolTipPlacement.Bottom;if(me===d.IRange.Direction.Down){Ee=ve.getColOffset(le.colEnd+1)-fe.x;const C=ve.getRowOffset(le.rowEnd),Pe=ve.getRowOffset(le.rowEnd+1);be=Pe-(Pe-C)/2-fe.y,He=r.ToolTipPlacement.Right}else if(me===d.IRange.Direction.Right){be=ve.getRowOffset(le.rowEnd+1)-fe.y;const C=ve.getColOffset(le.colEnd),Pe=ve.getColOffset(le.colEnd+1);Ee=Pe-(Pe-C)/2-fe.x,He=r.ToolTipPlacement.Bottom}else if(me===d.IRange.Direction.Up){Ee=ve.getColOffset(le.colEnd+1)-fe.x;const C=ve.getRowOffset(le.rowStart),Pe=ve.getRowOffset(le.rowStart+1);be=Pe-(Pe-C)/2-fe.y,He=r.ToolTipPlacement.Right}else if(me===d.IRange.Direction.Left){be=ve.getRowOffset(le.rowEnd+1)-fe.y;const C=ve.getColOffset(le.colStart),Pe=ve.getColOffset(le.colStart+1);Ee=Pe-(Pe-C)/2-fe.x,He=r.ToolTipPlacement.Bottom}F({anchor:{x:Ee,y:be},display:ze,placement:He})}catch(ae){Fe?.showError?.(ae)}}},onFillDone:()=>{f.current=null,L.setMode(null),z?.()}}),ce=r.useCallbackRef(B=>{X(r.ReactUtils.createSyntheticEvent(B))},[X,de]);o.useEffect(()=>{const B=n?.getStage();if(B)return B.addEventListener("pointerdown",ce),()=>{B.removeEventListener("pointerdown",ce)}},[n?.getStage()]);const Ae=r.useImperativeElement(t,()=>({}),[]),Ce=o.useRef(null);return c.jsx("div",{className:st(a,"sheet-selection",ai),style:{position:"absolute",width:x?.width,height:x?.height,overflow:"hidden",pointerEvents:"none",willChange:"none"},ref:Xt([Ae,Ce]),...I,children:te(n)})})),Fn=Object.freeze({x:0,y:0,width:0,height:0}),mi={fireOnModelChange:!1},fi=o.memo(o.forwardRef((e,t)=>{const{children:n,view:l,movable:a,onRefLoad:i,onRefUnload:m,onHide:h,onShow:s,onUnFocus:p,isDragging:b,updateFrameBounds:v,dragStart:u,style:I,disabled:x,renderMovable:F,...z}=e,[K,V]=o.useState(Fn),[M,L]=o.useState(null),[f,A]=o.useState(!1),S=o.useRef(null);o.useLayoutEffect(()=>{if(a.isClosed())return;const D=a.getBounds();if(!D)return;const O=l.toViewBounds(D);V(O??Fn),v(O??Fn)},[l?.getBounds()]),tt(a,{onBoundsChange:D=>{const O=D.getBounds();if(!O)return;const _=l.toViewBounds(O);V(_??Fn),v(_)},onSelectionChange:()=>{const D=ge.CommonUtils.hasFocus(S.current,!0);!f&&!D||a.isSelected()||p()}}),tt(a,{onRequestFocus:()=>ge.CommonUtils.whenFocus(S.current,!0)},mi),o.useEffect(()=>{const D=S.current;return i(D),()=>{m(D)}},[]);const W=o.useMemo(()=>{if(!K)return null;let{width:D,height:O}=K;return F({view:l,movable:a,disabled:x,isDragging:b,style:{position:"relative",left:0,top:0,width:D,height:O},onHide:h,onShow:s})},[l,a,K.width,K.height,x,b]);return c.jsx("div",{className:"movable",tabIndex:0,ref:Xt([S,t]),style:{display:"flex",alignItems:"stretch",justifyContent:"stretch",position:"absolute",maxWidth:"auto",maxHeight:"auto",minWidth:"auto",minHeight:"auto",left:K.x,top:K.y,width:K.width,height:K.height,...I},onMouseDown:async D=>{const O=D.shiftKey||D.ctrlKey,_=a.isSelected(),de=D.currentTarget;O&&_?a.unselect():(_&&!O||await a.select({addToSelection:O}),u(D.nativeEvent,de),de.focus())},onFocus:D=>{D.relatedTarget&&!M&&L(D.relatedTarget),A(!0)},onBlur:D=>{M&&!S?.current?.contains(D.relatedTarget)&&L(null),D.relatedTarget&&A(!1)},...z,children:W})})),pi="_movable-area_314c6_5",jr=o.memo(o.forwardRef((e,t)=>{const{view:n,movables:l,movablesView:a,renderMovable:i,transactional:m,onUnFocus:h,onFocus:s,disabled:p=!1,disableDrag:b=!1,disableResize:v=!1,className:u,style:I,renderDirections:x=["nw","n","ne","w","e","sw","s","se"],onFirstRender:F,...z}=e,K=n.getBounds(),V=r.useCallbackRef(F,[F]),M=r.useCallbackRef(h,[h]),L=r.useCallbackRef(s,[s]),[f,A]=o.useState([]),[S,W]=o.useState(!1),[D,O]=o.useState(!1),_=o.useRef(!0),de=o.useRef(new Map),U=o.useRef(new Map),H=o.useRef(new Map),R=o.useRef(new Map),$=o.useRef(new Map),k=o.useRef({onRequestFocus:ie=>(ne(ie),null)}),P=o.useRef(null),ee=o.useRef(null),re=o.useRef(null),[Re,he]=o.useReducer(ie=>ie+1,0);o.useLayoutEffect(()=>{he()},[n,l]),tt(l,{onCollectionChange:()=>{const ie=l.getItems({address:n.getVisibleRangeCoords(),ignoreHidden:!0}),Me=$.current;Me.forEach(Ie=>{Ie()}),Me.clear();const Le=k.current;for(let Ie=0;Ie<ie.length;Ie++){const xe=ie[Ie];if(xe.isClosed())continue;const N=xe.addListeners(Le);Me.set(xe,N)}he()},onInvalidated:()=>{he()}}),tt(a,{onMovableSelectionChange(ie){Fe(),he()}});const De=o.useCallback((ie,Me)=>{const Le=H.current.get(ie);re.current&&(re.current.getTargets().forEach(Ie=>{if(Ie===Le)return Ie.style.left=Me.x+"px",Ie.style.top=Me.y+"px",Ie.style.width=Me.width+"px",void(Ie.style.height=Me.height+"px")}),re.current.updateRect())},[]),Fe=()=>{const ie=[],Me=a.getMovableSelection();Me.forEach(Le=>{const Ie=H.current.get(Le);Ie&&Me.indexOf(Le)!==-1&&ie.push(Ie)}),A(Le=>ge.CommonUtils.isEqualArrays(Le,ie)?Le:ie)},ve=o.useRef(null),ke=o.useRef(null),$e=o.useMemo(()=>(ke.current||(ke.current=new Promise(ie=>{ve.current=ie})),ke.current),[]),te=o.useRef(null),X=r.useCallbackRef(async(ie,Me)=>{te.current=Me,await(async()=>!(!await $e.then()||!re.current))()&&te.current===Me&&re.current.dragStart(ie,Me)},[f]),[ce,Ae]=o.useState(!1),Ce=o.useRef(null),B=o.useRef(null),ne=r.useCallbackRef(async(ie=null)=>{if(ie||(ie=a.getMovableSelection()[0]),!ie)return M?.(),!1;const Me=H.current.get(ie);Me?(await ge.CommonUtils.whenFocus(Me),Me.focus(),B.current=Me,Ce.current=null):Ce.current=ie},[a]);o.useEffect(()=>{ce&&f.length>0&&B.current!==f[0]&&ne(),_.current&&(V?.(),_.current=!1)},[f]);const me=o.useMemo(()=>{const ie=l.getItems({address:n.getVisibleRangeCoords(),ignoreHidden:!0});if(ie.length===0&&de.current.size===0)return null;const Me=(Y,j,Z,qe=!0)=>{const g=Y.isSelected(),T={tabIndex:Z,view:n,movable:Y,onRefLoad:q=>{Ce.current===Y&&(q.focus(),B.current=q,Ce.current=null),H.current.set(Y,q),U.current.set(q,Y),j.rendered=!0,Fe()},onRefUnload:q=>{H.current.delete(Y),U.current.delete(q),j.rendered=!1,Fe()},onUnFocus:M,onHide:q=>{j.onHide=q},onShow:q=>{j.onShow=q},isDragging:g&&(D||S),disabled:p,renderMovable:i,updateFrameBounds:q=>{De(Y,q)},dragStart:X,onMouseUp:()=>{if(te.current=null,ee.current){W(!1),O(!1);let q=!1;R.current?.forEach(y=>{ge.CommonUtils.isEqualBounds(y.movable.getBounds(),y.startBounds)||(q=!0)}),q?ze():le()}},style:{opacity:qe?S&&g?.7:void 0:0,zIndex:S&&g?Y.getZIndex()+ie.length:void 0,pointerEvents:qe?void 0:"none",cursor:D&&g?"grabbing":p||b?"initial":"move",boxShadow:!g||D&&!S?void 0:"1px 1px 2px 2px rgba(0,0,0,.15)"}};return c.jsx(fi,{...T},`movable-${Y.getUUID()}`)},Le=de.current,Ie=new Map,xe=[];for(let Y=0;Y<ie.length;Y++){const j=ie[Y];if(j.isClosed())continue;let Z=Le.get(j);Z||(Z={frame:null,shown:null,onShow:null,onHide:null,rendered:!1,doShow:(qe,g)=>{if(!g||g.shown===!0)return;g.shown=!0;const T=++g.visibilityRequestId;requestAnimationFrame(()=>{const q=de.current.get(qe);q&&T===g.visibilityRequestId&&(g.onShow?.(qe),q.shown=!0)})},doHide:async(qe,g)=>{if(!g||g?.shown===!1)return;g.shown=!1;const T=++g.visibilityRequestId,q=await Promise.resolve(g.onHide?.(qe));T===g.visibilityRequestId&&q!==!1&&(g.shown=!1,de.current.delete(qe),he())},visibilityRequestId:0}),Z.frame=Me(j,Z,Y,!0),xe.push(Z.frame),Z.doShow(j,Z),Le.delete(j),Ie.set(j,Z)}const N=[];return a.getMovableSelection().forEach(Y=>{const j=Le.get(Y);j&&(j.frame=Me(Y,j,-1,!1),N.push(j.frame),Le.delete(Y),Ie.set(Y,j))}),Le.forEach((Y,j)=>{Y.frame=Me(j,Y,-1,!1),N.push(Y.frame),Y.doHide(j,Y),Le.delete(j),Ie.set(j,Y)}),de.current=Ie,Fe(),[...N,...xe]},[Re,n,i,p,b,v,S,D]),ae=r.useCallbackRef((ie,Me)=>{const Le=`${Me} ${f.length===1?d.TextUtils.capitalize(U.current?.get(f[0]).getContent().getType()):"Drawings"}`;ee.current&&(console.warn(`Transaction ${ee.current.getDescription()} is being replaced by ${Le}`),ee.current.rollback(),ee.current=null),ee.current=m.beginCommit({description:Le}),R.current.clear();for(let Ie=0;Ie<f.length;Ie++){const xe=f[Ie],N=U.current?.get(xe);N?R.current.set(xe,{movable:N,startBounds:n.toViewBounds(N.getBounds())}):console.warn("invalid element",N)}},[m,n,f]),ze=o.useCallback(()=>{if(!ee.current)return;const ie=[];R.current?.forEach(Me=>{ie.push(Me.movable)}),ee.current.commit({viewAfter:{view:a,movableSelection:ie}}),R.current.clear(),ee.current=null},[]),le=o.useCallback(()=>{ee.current&&(ee.current.rollback(),ee.current=null)},[]),fe=o.useRef(null);o.useEffect(()=>{fe.current&&(fe.current.onscroll=ie=>{ie.preventDefault(),ie.srcElement.scrollTop=0,ie.srcElement.scrollLeft=0})},[fe.current]);const Ee=r.useImperativeElement(t,()=>({isMovableArea:()=>!0,focusMovable:ne,focus:()=>{ne()}}),[a]),[be,He]=o.useState(null),C=o.useRef(!1),Pe=o.useRef(!1),Be=o.useRef(!1);o.useEffect(()=>{if(p||f.length===0||Be.current||C.current)return;if(Pe.current)return void requestAnimationFrame(()=>{re.current&&P.current&&re.current.refTargets.length>0&&(Be.current=!0,ve.current?.(!0)),A([...f])});C.current=!0;const ie=o.lazy(async()=>{try{const Me=await Promise.resolve().then(()=>require("./iw22IxEErpMWqfjk.cjs"));return C.current=!1,Pe.current=!0,A([...f]),Me}catch(Me){return console.warn(Me),ve.current?.(!1),null}});He(ie)},[f,p,b,v]);const Qe=o.useMemo(()=>!be||p?null:c.jsx(o.Suspense,{children:c.jsx(be,{className:st({dragging:S||D,resizing:S,moving:D}),container:null,ref:re,target:re.current?f:[],draggable:!p&&!b,resizable:!p&&!v,individualGroupable:!0,edgeDraggable:!1,throttleDrag:2,throttleResize:2,origin:!1,keepRatio:!1,renderDirections:x,onResizeStart:ie=>{ae(ie.target,"Resize")},onResize:ie=>{if(!ee.current)return ie.stopDrag(),void he();W(!0);const Me=ie.direction[0]!==0&&ie.direction[1]!==0;let Le=0,Ie=0;for(let xe=0;xe<f.length;xe++){const N=f[xe],Y=R.current.get(N),j=U.current.get(N);if(!Y||!j){console.warn("invalid element");continue}let Z=ie.dist[0],qe=ie.dist[1],g=ie.drag.dist[0],T=ie.drag.dist[1],q=Y.startBounds.width,y=Y.startBounds.height;xe===0?(Le=q,Ie=y):(Z*=q/Le,g*=q/Le,qe*=y/Ie,T*=y/Ie);const w={...Y.startBounds};if(w.width=Math.max(0,q+Z),w.height=Math.max(0,y+qe),ie.direction[0]===-1&&(w.width=Math.max(0,Math.min(Y.startBounds.x+q,q-g))),ie.direction[1]===-1&&(w.height=Math.max(0,Math.min(Y.startBounds.y+y,y-T))),Me&&(j.isLockAspectRatio()||ie.inputEvent?.shiftKey)){const E=q/y,G=w.width/w.height;G>E?w.height=w.width/E:G<E&&(w.width=w.height*E)}ie.direction[0]===-1&&(w.x=Math.max(0,Math.min(Y.startBounds.x+q,Y.startBounds.x+q-w.width))),ie.direction[1]===-1&&(w.y=Math.min(Y.startBounds.y+y,Y.startBounds.y+y-w.height)),Y.movable.setBounds(n.toAbsoluteBounds(w))}},onResizeEnd:ie=>{W(!1),ze()},onDragStart:ie=>{ae(ie.target,"Move")},onDrag:ie=>{if(!ee.current)return ie.stopDrag(),void he();O(!0);for(let Me=0;Me<f.length;Me++){const Le=f[Me],Ie=R.current.get(Le);Ie?Ie.movable.setBounds(n.toAbsoluteBounds({...Ie.startBounds,x:Ie.startBounds.x+ie.translate[0],y:Ie.startBounds.y+ie.translate[1]})):console.warn("invalid element")}},onDragEnd:ie=>{},onMouseUp:ie=>{}})}),[Re,be,f,n,p,b,v,S,D]);return c.jsx("div",{className:st(u,"movable-area",pi),style:{width:K.width,height:K.height,...I,position:"absolute",overflow:"hidden",willChange:"transform"},ref:Xt([Ee,fe]),...z,children:c.jsx("div",{className:"movable-scroll",style:{position:"absolute",cursor:"initial",left:0,top:0,width:K.width,height:K.height},...z,children:c.jsxs("div",{ref:P,style:{position:"absolute",pointerEvents:"auto"},onFocus:ie=>{L?.(),Ae(!0)},onBlur:ie=>{Ae(!1)},onKeyDownCapture:ie=>{if(ie.isDefaultPrevented())return;const Me=ie.nativeEvent.ctrlKey,Le=ie.nativeEvent.altKey,Ie=ie.nativeEvent.shiftKey;if(ie.which===r.KeyCodes.Escape){const Z=a.getMovableSelection();let qe=[...Z];return f.forEach(g=>{if(qe.length===0)return;const T=U.current.get(g);let q=qe.indexOf(T);qe.splice(q,1)}),qe.length!==Z.length&&a.selectMovables(qe),qe.length===0&&M?.(),void ie.preventDefault()}const xe=.1,N=Z=>{l.updateSelected(qe=>{qe.setRotation(qe.getRotation()+Z)},"Rotate")},Y=(Z,qe=!0)=>{l.updateSelected(g=>{const T=g.getBounds();let q=1+Z;qe||(q=1/q);const y=Math.sqrt(Math.pow(T.width,2)+Math.pow(T.height,2)),w=Math.atan2(T.height,T.width),E=q*y;if(E<10)return;const G=E*Math.cos(w),oe=E*Math.sin(w),se={x:T.x+(T.width-G)/2,y:T.y+(T.height-oe)/2,width:G,height:oe};g.setBounds(se)},"Resize")},j=Z=>{l.updateSelected(qe=>{const g=qe.getBounds(),T={x:g.x+(Z.x??0),y:g.y+(Z.y??0),width:g.width+(Z.width??0),height:g.height+(Z.height??0)};qe.setBounds(T)},"Nudge")};if(ie.which===r.KeyCodes.Delete)l.updateSelected(Z=>{Z.delete()},"Delete"),ie.preventDefault();else if(ie.key==="a"&&Me){const Z=a.getMovableSelection();a.selectMovables(l.getItems(),!0),a.selectMovables(Z,!0),ie.preventDefault()}else ie.key==="ArrowLeft"?(Ie?Y(xe,!1):Le?N(-10):j({x:Me?-10:-1}),ie.preventDefault()):ie.key==="ArrowRight"?(Ie?Y(xe,!0):Le?N(10):j({x:Me?10:1}),ie.preventDefault()):ie.key==="ArrowUp"?(Ie?Y(xe,!0):j({y:Me?-10:-1}),ie.preventDefault()):ie.key==="ArrowDown"&&(Ie?Y(xe,!1):j({y:Me?10:1}),ie.preventDefault())},children:[me,Qe]})})})})),$t=e=>{let t=Number.MAX_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER,l=0,a=0;for(let i=0;i<e.length;i++){const m=e[i].getBounds();t=Math.min(m.x,t),n=Math.min(m.y,n),l=Math.max(m.x+m.width,l),a=Math.max(m.y+m.height,a)}return{x:t,y:n,width:l-t,height:a-n}},tr=(e,t=!0)=>{const n=[],l=t?"x":"y",a=t?"y":"x",i=t?"width":"height";let m=0,h=Number.MAX_SAFE_INTEGER,s=0;for(let v=0;v<e.length;v++){const u=e[v],I=u.getBounds();m+=I[i],h=Math.min(I[l],h),s=Math.max(I[l]+I[i],s),n.push({bounds:I,movable:u})}const p=(s-h-m)/(e.length-1);n.sort((v,u)=>{const I=v.bounds[l],x=u.bounds[l];return I!==x?I-x:v.bounds[a]-u.bounds[a]});const b=new Map;b.set(n[0].movable,n[0].bounds);for(let v=1;v<n.length-1;v++){const u=n[v-1].bounds,I={...n[v].bounds};I[l]=u[l]+u[i]+p,n[v].bounds=I,b.set(n[v].movable,I)}return b.set(n[n.length-1].movable,n[n.length-1].bounds),b};function Or(e){const{movables:t,movablesView:n,transactional:l,commands:a,target:i,onRepeatCommandChange:m}=e,h=r.useNotifier(),s=r.useEditMode();o.useRef(s.getMode()).current=s.getMode();const p=r.useCallbackRef(async(M,L,f=null,A=!0)=>{const S=async()=>{const W=await Promise.resolve(h?.showBusy?.(M.label()));try{await L();const D=f??M?.label?.();if(m){let O=null;M&&D!==!1&&(O=new r.SimpleCommand(M.key(),i,{label:D,description:D},S)),m(O)}W?.(),A&&s.setMode(null)}catch(D){W?.(),h?.showError?.(D)}};await S()},[m,h]),[b,v]=o.useReducer(M=>M+1,0),u=r.useCallbackRef((M,L,f)=>{if(!n)return;const A=n.getMovableSelection();if(A.length===0)return;let S="Drawings";if(A.length===1){const D=A[0];S=d.TextUtils.capitalize(D.getContent().getType())??"Drawing"}const W=`${M.label()} ${S}`;p(M,()=>{let D=null;l&&(D=l.beginCommit(W));const O=n.getMovableSelection();if(O.length===0)return;const _=f?.(O);for(let de=0;de<O.length;de++){const U=O[de];L(U,_)}D?.commit()})},[n,l]),[I,x]=o.useState(n.getMovableSelection()[0]??null),[F,z]=o.useState(!I||I?.isProtected()),K=o.useMemo(()=>[new r.Command("moveToFront",i,{label:"Bring to Front",description:"Move to the front of all of the other drawings.",icon:"DrawToFront",shortcut:{key:"BracketRight",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){u(this,M=>{M.moveToFront()})}),new r.Command("moveForward",i,{label:"Bring Forward",description:"Move forward one layer in the z order.",icon:"DrawMoveForward",shortcut:{key:"BracketRight",modifiers:[r.KeyModifiers.Ctrl]}},function(){u(this,M=>{M.moveForward()})}),new r.Command("moveToBack",i,{label:"Send to Back",description:"Move to the back of all of the other drawings.",icon:"DrawToBack",shortcut:{key:"BracketLeft",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){u(this,M=>{M.moveToBack()})}),new r.Command("moveBackward",i,{label:"Send Backward",description:"Move backwards one layer in the z order.",icon:"DrawMoveBackward",shortcut:{key:"BracketLeft",modifiers:[r.KeyModifiers.Ctrl]}},function(){u(this,M=>{M.moveBackward()})}),new r.Command("toggleLockAspectRatio",i,{label:"Lock Aspect Ratio",description:"Toggle whether the aspect ratio should be maintained when resizing from corners.",icon:"DrawAspect"},function(){u(this,M=>{M.setLockAspectRatio(!M.isLockAspectRatio())})}),new r.Command("formatAnchorTypeTwoCell",i,{label:"Move and size with cells",description:"Set your drawing to move and resize when underling sheet resizes.",icon:"DrawResize"},function(){u(this,M=>{M.setAnchorType(d.IAnchored.Type.TwoCell)})}),new r.Command("formatAnchorTypeOneCell",i,{label:"Move but don't size with cells",description:"Set your drawing to only move when underling sheet resizes.",icon:"DrawResize"},function(){u(this,M=>{M.setAnchorType(d.IAnchored.Type.OneCell)})}),new r.Command("formatAnchorTypeAbsolute",i,{label:"Don't move or size with cells",description:"Set your drawing to never move or resize when underling sheet resizes.",icon:"DrawResize"},function(){u(this,M=>{M.setAnchorType(d.IAnchored.Type.Absolute)})}),new r.Command("formatDrawAlignLeft",i,{label:"Align Left",description:"Align the selected drawings to the left.",icon:"DrawAlignLeft"},function(){u(this,(M,L)=>{M.setBounds({x:L.x})},$t)}),new r.Command("formatDrawAlignCenter",i,{label:"Align Center",description:"Align the selected drawings vertically relative to each other.",icon:"DrawAlignCenter"},function(){u(this,(M,L)=>{M.setBounds({x:(L.width-M.getBounds().width)/2+L.x})},$t)}),new r.Command("formatDrawAlignRight",i,{label:"Align Right",description:"Align the selected drawings to the right.",icon:"DrawAlignRight"},function(){u(this,(M,L)=>{M.setBounds({x:L.width-M.getBounds().width+L.x})},$t)}),new r.Command("formatDrawAlignTop",i,{label:"Align Top",description:"Align the selected drawings to the top.",icon:"DrawAlignTop"},function(){u(this,(M,L)=>{M.setBounds({y:L.y})},$t)}),new r.Command("formatDrawAlignMiddle",i,{label:"Align Middle",description:"Align the selected drawings horizontally relative to each other.",icon:"DrawAlignMiddle"},function(){u(this,(M,L)=>{M.setBounds({y:(L.height-M.getBounds().height)/2+L.y})},$t)}),new r.Command("formatDrawAlignBottom",i,{label:"Align Bottom",description:"Align the selected drawings to the bottom.",icon:"DrawAlignBottom"},function(){u(this,(M,L)=>{M.setBounds({y:L.height-M.getBounds().height+L.y})},$t)}),new r.Command("formatDrawDistributeHorz",i,{label:"Distribute Horizontally",description:"Distribute the selected drawings horizontally with equal spacing between each.",icon:"DrawDistributeHorz"},function(){u(this,(M,L)=>{M.setBounds(L.get(M))},M=>tr(M))}),new r.Command("formatDrawDistributeVert",i,{label:"Distribute Vertically",description:"Distribute the selected drawings vertically with equal spacing between each.",icon:"DrawDistributeVert"},function(){u(this,(M,L)=>{M.setBounds(L.get(M))},M=>tr(M,!1))}),new r.Command("formatDrawFlipHorz",i,{label:"Flip Horizontally",description:"Flip the selected drawings horizontally."}),new r.Command("formatDrawFlipVert",i,{label:"Flip Vertically",description:"Flip the selected drawings vertically."}),new r.Command("formatDrawGroup",i,{label:"Group",description:"Group the selected drawings into a single drawing.",icon:"DrawGroup"}),new r.Command("formatDrawUngroup",i,{label:"Ungroup",description:"Break the group of a drawing into individual drawings.",icon:"DrawUngroup"}),new r.Command("formatDrawSwapShapes",i,{label:"Swap Shapes",description:"Swap the positions of the swap."}),new r.Command("formatDrawSwapShapesHorz",i,{label:"Swap Shapes Horizontally",description:"Swap the positions of the swap horizontally."}),new r.Command("formatDrawSwapShapesVert",i,{label:"Swap Shapes Vertically",description:"Swap the positions of the swap vertically."})],[n,I]);o.useEffect(()=>{},[s]);const V=o.useMemo(()=>{let M=null;return M=a?a.createChildGroup(i,"movable",!1):new r.CommandGroup(i,"movable"),M.addCommands(K,!0),M},[a,K]);return tt(I,{onAnyChange:()=>{V.getCommand("formatAnchorTypeTwoCell").update({state:I?.getAnchorType()===d.IAnchored.Type.TwoCell}),V.getCommand("formatAnchorTypeOneCell").update({state:I?.getAnchorType()===d.IAnchored.Type.OneCell}),V.getCommand("formatAnchorTypeAbsolute").update({state:I?.getAnchorType()===d.IAnchored.Type.Absolute}),V.getCommand("formatAnchorTypeAbsolute").update({state:I?.getAnchorType()===d.IAnchored.Type.Absolute}),V.getCommand("toggleLockAspectRatio").update({state:I?.isLockAspectRatio()})},onProtectedChange:M=>{z(M.isProtected())},onDelete:()=>{}}),tt(n,{onMovableSelectionChange:()=>{const M=n.getMovableSelection()[0]??null;x(M),z(!M||M.isProtected()),v()}}),tt(t,{onCollectionChange:()=>{v()}}),o.useEffect(()=>{const M={disabled:F};V.getCommand("formatAnchorTypeTwoCell").update(M),V.getCommand("formatAnchorTypeOneCell").update(M),V.getCommand("formatAnchorTypeAbsolute").update(M),V.getCommand("toggleLockAspectRatio").update(M);const L=t.getCount(),f=n.getMovableSelection(),A=F||L<=1||f.length===0;let S={disabled:A},W=S;if(!A&&f.length===1){const _=f[0];_.getZIndex()===0&&(S={disabled:!0}),_.getZIndex()===L-1&&(W={disabled:!0})}V.getCommand("moveToFront").update(W),V.getCommand("moveForward").update(W),V.getCommand("moveToBack").update(S),V.getCommand("moveBackward").update(S);const D={disabled:F||f.length<=1};V.getCommand("formatDrawAlignLeft").update(D),V.getCommand("formatDrawAlignCenter").update(D),V.getCommand("formatDrawAlignRight").update(D),V.getCommand("formatDrawAlignTop").update(D),V.getCommand("formatDrawAlignMiddle").update(D),V.getCommand("formatDrawAlignBottom").update(D),V.getCommand("formatDrawFlipHorz").update(D),V.getCommand("formatDrawFlipVert").update(D),V.getCommand("formatDrawGroup").update(D),V.getCommand("formatDrawUngroup").update(D),V.getCommand("formatDrawSwapShapes").update(D),V.getCommand("formatDrawSwapShapesHorz").update(D),V.getCommand("formatDrawSwapShapesVert").update(D);const O={disabled:F||f.length<=2};V.getCommand("formatDrawDistributeHorz").update(O),V.getCommand("formatDrawDistributeVert").update(O)},[b,F,b]),V}const vi=o.memo(o.forwardRef((e,t)=>{const{children:n,disabled:l,description:a,view:i,isDragging:m,onHide:h,onShow:s,...p}=e;o.useEffect(()=>{},[a]);const b=r.useImperativeElement(t,()=>({isEmptyFrame:()=>!0}),[]),[v,{height:u,width:I}]=Ot();return c.jsx("div",{...p,ref:Xt([b,v]),children:c.jsx("div",{className:"chart-editor",style:{width:"100%",height:"100%",border:"var(--sxl-app-color-grey, grey) solid 1px",backgroundColor:"var(--sxl-app-color-background, white)",backgroundImage:"var(--sxl-app-image-background)",alignItems:"center",justifyContent:"center",zoom:i.getZoom(),display:"flex",position:"relative",filter:l?"blur(1px)":void 0,boxShadow:m?"1px 1px 2px var(--sxl-app-color-shadow, rgba(0,0,0,.15))":void 0},children:c.jsx("div",{style:{textAlign:"center"},children:a})})})})),Ci=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:l,movableProps:a,renderMovable:i,commands:m,target:h,onRepeatCommandChange:s}=e,p=Or({movables:l.getMovables(),movablesView:l?.getView(),transactional:l,onRepeatCommandChange:s,commands:m,target:h});o.useEffect(()=>{n?.getStage()},[n?.getStage()]);const b=o.useMemo(()=>c.jsx(jr,{ref:t,view:n,movables:l.getMovables(),disableResize:!l.getProtection().isObjectsAllowed(),disableDrag:!l.getProtection().isObjectsAllowed(),movablesView:l.getView(),transactional:l,renderMovable:i,...a,onFocus:()=>{p.activate(),a?.onFocus?.()}},"movable-area"),[l,a,m,p]);return b&&n?b:null})),yi=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:l,gridStyle:a,getCellEditor:i,showProtectedError:m,setEditingCoords:h,commands:s}=e,p=r.useEditMode(),[b,v]=o.useState(null),[u,I]=o.useState(null),[x,F]=o.useState(null),[z,K]=o.useState(null),[V,M]=o.useState(null);o.useLayoutEffect(()=>{if(x===null)return K(null),void M(null);const k=()=>{const P=l.getRange(x).getCell(),ee=P.getStyle();let re,Re=ee.getFill()?.toCSS(a.body.darkMode);Re.background!=="none"&&Re.background!=="transparent"||(Re=l.getStyles().getNormal().getFill().toCSS(a.body.darkMode)),Re.background!=="none"&&Re.background!=="transparent"||(Re={background:a.body.fill}),K({style:Re}),P&&!P.getFormula()&&(re=P?.getRenderHorizontalAlignment()),M(re??r.HorizontalAlignment.Left)};return k(),l.getRange(x).addListener(()=>{k()})},[l,x,a?.body]);const L=r.useCallbackRef(()=>{let k=u.editState.dirty??"";if(u.editState.dirty!==void 0){const P=d.TextUtils.clampString(k);try{const ee=u.sheet.getRange(u.coords),re=`Typing '${P}' into ${ee.toString()}`;return ee.setValue(k,{description:re,autoFit:!0}),F(null),I(null),p.setMode(null),h(null),!0}catch(ee){throw ge.Notifier.error(new Error(`Unable to enter '${P}'.`,{cause:ee})),ee}}},[l,u]),f=r.useCallbackRef(k=>l.getRange(k).getCell().getExtrusions()??ge.CoordUtils.cellToRange(k),[l]),A=r.useCallbackRef(k=>{let P=d.IRange.Orientation.Row,ee=!1;k!==d.IRange.Direction.Up&&k!==d.IRange.Direction.Down||(P=d.IRange.Orientation.Column),k!==d.IRange.Direction.Left&&k!==d.IRange.Direction.Up||(ee=!0),l.getSelection().traverse(P,ee)},[l]),S=o.useCallback((k,P)=>{if(i)return i(k,P);if(!l)return null;const{ref:ee,...re}=k;return c.jsx(Tr,{ref:ee,...re,sheet:l,bodyStyle:a?.body,activeCoords:P,commands:s,onChangeEdit:Re=>{const he={sheet:l,coords:P,editState:Re};p.setMode(De=>({...De,description:he.editState.editMode?"Edit":"Enter",args:{...De?.args,stateAndCoords:he}}))},editState:u.editState})},[l,z,i,u,x]),{overlay:W,startEdit:D,submitEdit:O,cancelEdit:_,onKeyboardEventNative:de,onPointerEventNative:U}=ut.useKeyboardEditorOverlay({view:n,activeCoords:b,getCellEditor:S,canEdit:()=>{const k=l.getProtection();if(k.isReadOnly())return!1;const P=k.isLocked();return P&&m(),!P},onBeforeStartEdit:k=>{const P=Ir(()=>l.getRange(k).getCell()),ee={sheet:l,coords:k,editState:Object.freeze(P)};p.setMode({key:"edit",args:{stateAndCoords:ee}}),I(ee)},onStartEdit:k=>{F(k),h(k)},onSubmitEdit:L,onCancelEdit:k=>{F(null),I(null),p.setMode(null),h(null)},onDoneEdit:k=>{p.setMode(null)},onNavigate:A,containerProps:z,borderStrokeFill:a.selection?.strokeFill,borderStrokeWidth:l?.getSelection().getCoords().ranges?.length>1?1:2,alignment:V,getRangeCoords:f});tt(l.getSelection(),{onChange(k){v(l.getSelection().getCoords().cell)}});const H=r.useCallbackRef(k=>{U(k),x&&O()},[U,_,x]),R=o.useCallback(k=>{U(k)},[U]),$=o.useCallback(k=>{de(k)},[de]);return o.useEffect(()=>{const k=n?.getStage();if(k)return k.addEventListener("pointerdown",H),k.addEventListener("dblclick",R),k.addEventListener("keydown",$),()=>{k.removeEventListener("pointerdown",H),k.removeEventListener("dblclick",R),k.removeEventListener("keydown",$)}},[n?.getStage()]),o.useEffect(()=>{const k=p.getMode(),P=k?.key;P==="edit"||P==="enter"?u?k.args?.cancel?_():k.args?.submit?O():I(k.args?.stateAndCoords):D(k.args?.start):x&&_()},[p]),W(n,t)})),Br="white",Vr="black",wi=`url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg' %3E%3Cg%3E%3Cpath d='m 14.5,8 -5.6875,5.6875 v -3.25 H 1.5 v -4.875 h 7.3125 v -3.25 z' stroke='${Vr}' fill='${Br}'/%3E%3C/g%3E%3C/svg%3E%0A") 15 8, pointer`,bi=`url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg' %3E%3Cg%3E%3Cpath d='M 13.24564,12.979958 H 5.2023009 L 7.500398,10.681861 2.3296796,5.5111425 5.7768252,2.0639969 10.947543,7.2347153 13.24564,4.9366182 Z' stroke='${Vr}' fill='${Br}'/%3E%3C/g%3E%3C/svg%3E%0A") 12 12, pointer`,xi=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:l}=e,[a,i]=o.useState(l.getTables().getCount()>0),[m,h]=o.useState(null),[s,p]=o.useState(null),[b,v]=o.useState(null),[u,I]=o.useState(null),x=r.useCallbackRef(()=>{if(l.getTables().getCount()>0){i(!0);const f=l.getTables().getItems({address:n.getVisibleRangeCoords()});h(f.length>0?f:null)}else i(!1),h(null)},[l,n]),F=r.useCallbackRef(f=>{f.preventDefault(),f.stopPropagation();const A=n.getCellCoordsFromClient(f.clientX,f.clientY),S=l.getTables().getItems({address:A});S.length===1&&S[0].select()},[n,l]),z=r.useCallbackRef(f=>{f.preventDefault(),f.stopPropagation();const A=n.getCellCoordsFromClient(f.clientX,f.clientY),S=l.getTables().getItems({address:A});if(S.length===1){const W=S[0].getRange().getCoords(),D={colStart:W.colStart,rowStart:A.rowIndex,colEnd:W.colEnd,rowEnd:A.rowIndex};l.getRange(D).select()}},[n,l]),K=r.useCallbackRef(()=>{if(!a)return;const f=l.getTables().getItems({address:n.getVisibleRangeCoords()});h(f.length>0?f:null)},[l,a,n]);tt(l?.getSelection(),{onChange(f){p(l.getSelection().getCoords().cell)}}),tt(b,{onAnyChange(f){x(),K()}}),tt(u,{onAnyChange(f){K()}}),tt(l,{onTablesChange(f){x(),K()},onInvalidated(f){x(),K()}});const V=o.useMemo(()=>ge.CommonUtils.debounce(ge.CommonUtils.throttle(K,300),300),[]);o.useEffect(()=>{V()},[n]),o.useEffect(()=>{let f=null;if(m)for(let A=0;A<m.length&&!f;A++){const S=m[A],W=S.getRange().getCoords();d.CoordUtils.isCellWithinRange(s,W)&&(f=S)}v(f)},[s,m]);const M=r.useCallbackRef(f=>{let A=null;if(m)for(let S=0;S<m.length;S++){const W=m[S],D=W.getRange().getCoords();let O=n.getRangeCoordsBounds(D);const _=n.getRelativePointFromClient(f.clientX,f.clientY),de=_.x,U=_.y;if(de>=O.x&&de<=O.x+O.width&&U>=O.y&&U<=O.y+O.height){const H=n.getViewportSize();de<=0||U<=0||de>=H.width||U>=H.height||(A=W)}}I(A)},[n,m]);if(o.useEffect(()=>{const f=n?.getStage();if(f&&m)return f.addEventListener("mousemove",M),f.addEventListener("mouseleave",M),()=>{f.removeEventListener("mousemove",M),f.removeEventListener("mouseleave",M)}},[m,n?.getStage()]),!n||!m||m.length===0)return null;const L=[];for(let f=0;f<m.length;f++){const A=m[f];if(A.isClosed())continue;const S=A===u,W=A===b,D=A.getRange().getCoords(),O=n.getRangeCoordsBounds(D);let _;if(S||W){const de=A.getStyle().getProperties(),U=de.headerRow?.fill?.background??de.wholeTable?.border?.top?.color?.toString();if(U&&l){const H=l.getStyles().parseColor(U);H&&(_=H.toCSS())}_||(_="var(--sxl-app-color-shadow, rgba(0,0,0,.15))")}L.push(c.jsx("div",{style:{position:"absolute",left:O.x,top:O.y,width:Math.min(16,O.width),height:O.height,pointerEvents:"all",cursor:wi},onMouseDown:z},`table-select-row-${A.getName()}`)),L.push(c.jsx("div",{style:{position:"absolute",left:O.x,top:O.y,width:Math.min(16,O.width),height:Math.min(16,O.height),pointerEvents:"all",cursor:bi},onMouseDown:F},`table-select-${A.getName()}`)),L.push(c.jsx(ut.Selection,{x:O.x,y:O.y,width:O.width,height:O.height,range:D,strokeWidth:W?.5:0,stroke:_??"var(--sxl-app-color-grey, grey)",style:{willChange:"box-shadow",transition:"box-shadow 80ms ease-in-out",boxShadow:S?`${_} 0px 0px 1px 1px`:void 0}},`table-outline-${A.getName()}`))}return L})),qi=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:l,animationTime:a=60}=e,[i,m]=o.useState(null),[h,s]=o.useState(null),p=o.useRef(null),b=r.useCallbackRef(()=>{const z=l.getSelectedCell(),K=z.getSpill()?.getCoords()??null;ge.CoordUtils.isEqualRanges(K,i)||(s(K?{transition:i?"move":"in",bounds:n.getRangeCoordsBounds(K),coords:K}:{transition:"out",bounds:n.getRangeCoordsBounds(i),coords:i}),m(K))},[l,n,i]);o.useEffect(()=>(p.current&&(clearTimeout(p.current),p.current=null),h&&(p.current=setTimeout(()=>{s(null),p.current=null},a)),()=>{p.current&&(clearTimeout(p.current),p.current=null)}),[h,a]);const v=o.useMemo(()=>ge.CommonUtils.debounce(ge.CommonUtils.throttle(b,80),80),[]);if(tt(l?.getSelection(),{onChange(z){v()}}),tt(l,{onSpillsChange(z){b()},onInvalidated(z){b()}}),!n||!i&&!h)return null;const u=l.getRange(i).getValue()instanceof d.FormulaError.Spill,I=[];let x=h?.bounds??n.getRangeCoordsBounds(i);if(h&&!ge.CommonUtils.isEqualBounds(h.bounds,n.getRangeCoordsBounds(h.coords))&&s(null),x=n.toClipBounds(x,-10),!x)return;const F="var(--sxl-app-color-primary-dark, rgba(0,0,0,.15))";return I.push(c.jsx(ut.Selection,{x:x.x,y:x.y,width:x.width,height:x.height,range:i,strokeWidth:1,stroke:F,style:{willChange:"transform, opacity, width, height, opacity, left, top",strokeDasharray:u?"6 3":void 0,opacity:h?.transition==="out"?0:1,transition:h?.transition?h.transition==="in"||h.transition==="out"?`opacity ${1.5*a}ms ease-in-out`:`left ${a}ms ease-out, top ${a}ms ease-out, width ${a}ms ease-out, height ${a}ms ease-out`:"none",boxShadow:`${F} 0px 0px 4px 0px`}},"spill-outline}")),I})),Si={position:"absolute",top:0,left:0,bottom:0,right:0},nr=(e,t)=>{const n={...e},l=t?.getNormal().getFont(),a=l?.toCSS(),i={text:{fontFamily:a?.fontFamily,fontSize:l?.getSize()}},m=n.body=ge.CommonUtils.mergeContentful(e.body,i);return n.body=ge.CommonUtils.mergeContentful({fill:"#fff",strokeFill:"#dad8d6",strokeWidth:.5,text:{fontWeight:"400",fontStyle:"normal",fill:"#040404"}},m),n.buttonSurface=ge.CommonUtils.mergeContentful({fill:"#fff",text:{fill:"black"},edgeStrokeFill:"black"},n.buttonSurface),n.selection={fill:"rgba(16, 124, 65, 0.1)",strokeFill:"#217346",strokeWidth:2,...e.selection},n.selectionInactive={...n.selection,fill:"rgba(16, 124, 65, 0.1)",strokeFill:"#dad8d6",...e.selectionInactive},n.selectionRemove={...n.selection,fill:"rgba(200, 0, 0, 0.1)",strokeFill:"rgba(200, 0, 0, 1)",...e.selectionRemove},n.headerSelection={...n.selection,...e.headerSelection},n.headerSelectionInactive={...n.selectionInactive,...e.headerSelectionInactive},n.header=ge.CommonUtils.mergeContentful(n.body,{edgeStrokeFill:"rgb(171, 171, 171)",fill:"#f0f0f0",strokeShadow:void 0,edgeStrokeWidth:1},e.header),n.header=ge.CommonUtils.mergeContentful(n.header,i),n.headerSelect=ge.CommonUtils.mergeContentful(n.header,{fill:"rgba(16, 124, 65, 0.1)",text:{fill:n.headerSelection.strokeFill,fontWeight:"700"}},e.headerSelect),n.headerSelect=ge.CommonUtils.mergeContentful(n.headerSelect,i),n.headerSelectAll=ge.CommonUtils.mergeContentful(n.headerSelect,{},e.headerSelectAll),n.headerSelectAll=ge.CommonUtils.mergeContentful(n.headerSelectAll,i),n},Ri={fireOnModelChange:!1},or={},Hr=o.memo(o.forwardRef((e,t)=>{const{sheet:n,gridStyle:l=or,headersStyle:a=or,onSheetContextMenu:i,showColumnHeaders:m,columnHeaderProps:h,showRowHeaders:s,rowHeaderProps:p,showScrollbars:b=!0,scrollPaneProps:v,onViewportChange:u,commands:I,onRepeatCommandChange:x,onMoveCell:F,overlays:z,renderMovable:K,viewportComponent:V,onElementLoad:M,getCellEditor:L,onFocus:f,onBlur:A,style:S=r.ReactUtils.EmptyCssProperties,onShowTooltip:W,onShowColumnTooltip:D,onShowRowTooltip:O,onCloseTooltip:_,gridProps:de,cellRenderProps:U,...H}=e;if(o.useEffect(()=>{d.LicenseManager._validate(!0)},[]),!n)throw new Error("ISheet must be provided.");const[R,$]=o.useReducer(J=>J+1,0),[k,{width:P,height:ee}]=Ot(),re=r.useCallbackRef(W,[W]),Re=r.useCallbackRef(D,[D]),he=r.useCallbackRef(O,[O]),De=r.useCallbackRef(_,[_]),Fe=o.useRef(!1);o.useLayoutEffect(()=>{Fe.current=!0},[n]);const ve=n?.getStyles(),ke=o.useMemo(()=>nr(l,ve),[l,ve]),$e=o.useMemo(()=>nr(a,ve),[a,ve]),{body:te={},buttonSurface:X={}}=ke,{header:ce={},headerSelect:Ae={},headerSelectAll:Ce={}}=$e,B=o.useRef(null),[ne,me]=o.useState(()=>n?.getView()),ae=(ne?.getZoomScale()??100)/100,ze=o.useMemo(()=>({vertical:ne.isShowColumnGridlines()&&ae>=.4,horizontal:ne.isShowRowGridlines()&&ae>=.4}),[ne?.isShowColumnGridlines(),ne?.isShowRowGridlines(),ae]),le=o.useMemo(()=>{if(ne?.getGridLineColor())return{strokeDasharray:"1,1"}},[ne?.getGridLineColor(),ke]),fe=m??ne?.isShowColumnHeaders(),Ee=s??ne?.isShowRowHeaders(),[be,He]=o.useState({width:0,height:0}),C=o.useMemo(()=>{let J=40,Se=20;const Ke=n?.getStyles().getNormal().getFont();if(be.width>0&&be.height>0){const Ve=Ke?.toCSS()?.fontFamily??ke.header.text.fontFamily,Ye=Ke?.getSize()??ke.header.text.fontSize,Ge=d.IFont.getSharedMeasurer()(""+be.height,Math.ceil(Ye*d.IFont.getDeviceScale()),Ve);J=Ge.width,Se=Ge.lineHeight}return{width:Math.round(J+5),height:Math.round(Se+3)}},[be,ke?.header.text,n]),Pe=Ee?ae*C.width:ce.edgeStrokeWidth,Be=fe?ae*C.height:ce.edgeStrokeWidth,Qe=Math.max(P,(n?.getColumnHeaders().getDefaultSize()??C.width)+Pe+1),ie=Math.max(ee,(n?.getRowHeaders().getDefaultSize()??C.height)+Be+1),Me=o.useRef(new Map),Le=o.useRef(null),Ie=()=>({getColOffset:J=>n.getColumnHeaders().findOffset(J),getColIndex:J=>n.getColumnHeaders().findIndex(J),getRowOffset:J=>n.getRowHeaders().findOffset(J),getRowIndex:J=>n.getRowHeaders().findIndex(J)}),[xe,N]=o.useState(()=>Ie()),[Y,j]=o.useState(!1),[Z,qe]=o.useState(null),g=!0,T=ke.selection?.strokeFill,q=o.useCallback(()=>Mt.current,[]),[y,w]=o.useState(),E=r.useCallbackRef(J=>{w(J);const Se=n?n.getView():null;Se&&Se.setTopLeft(J?{left:J.left,top:J.top}:null),u?.(J)},[n,u]),G=o.useRef(null);o.useEffect(()=>{if(!y||!n)return;const J=n.getRangeAtBounds({x:y.left,y:y.top,width:y.width,height:y.height});G.current?.(),G.current=J.addListener(()=>{const Se=J.getCoords();B?.current?.invalidate(Se)})},[y,n]);const[oe,se]=o.useState(()=>n?.getView().getTopLeft()),ue=r.useCallbackRef(J=>{const Se=ge.CoordUtils.cellToRange(J);if(n.isClosed())return Se;const Ke=n.getRange(Se,{ignoreHidden:!0}).getMerges();return Ke.length===0?Se:Ke[0]},[n]),Q=J=>{if(!J||J.coords.colIndex===0&&J.coords.rowIndex===0)return null;const Se={};return J.coords.colIndex>0&&(Se[ge.AnchorLocation.Left]={index:J.coords.colIndex,scrollOffset:J.topLeft.left}),J.coords.rowIndex>0&&(Se[ge.AnchorLocation.Top]={index:J.coords.rowIndex,scrollOffset:J.topLeft.top}),Se},[ye,pe]=o.useState(()=>Q(n.getView().getFreezePanes())),we=r.useEditMode(),Ue=o.useCallback(()=>B.current,[]),Te=r.useCallbackRef(J=>{we.setMode(Se=>Se?.key==="edit"?{...Se,args:{...Se.args}}:{key:"edit",args:{stateAndCoords:null,start:J}})},[]),Ne=r.useCallbackRef(()=>y,[y]),je=Lr({sheet:n,commands:I,target:Ue,onRepeatCommandChange:x,bodyStyle:te,onStartEdit:Te,getViewport:Ne}),[_e,We]=o.useState(n.getSelection().isEntire()),[et,Oe]=o.useState(ne?.getMovableSelection().length>0),Xe=Z!==null||et,ct=null,[bt,it]=o.useState(!1);o.useEffect(()=>{it(!1)},[n.getProtection()]);const Ze=r.useNotifier(),xt=r.useCallbackRef(()=>{bt||(it(!0),Ze.showMessage?.(c.jsxs("span",{children:["This sheet is protected.",c.jsx("br",{}),"To make a change, unprotect the sheet. You might be requested to enter a password."]}),{type:r.NotifierType.Error}))},[Ze,bt]),ft=o.useMemo(()=>{const J=we.getMode();return J?.cursor?J.cursor:null},[ct,we]),[mt,pt]=o.useState(null),at=o.useRef(!1),[Qt,It]=o.useState([]),Dt=o.useRef(null),[zt,en]=o.useState(ge.TypesUtils.EmptyTopLeft),[Et,wn]=o.useState(ge.TypesUtils.EmptyTopLeft);o.useEffect(()=>{en({left:oe?.left,top:0})},[oe?.left]),o.useEffect(()=>{wn({left:0,top:oe?.top})},[oe?.top]),tt(n?.getView(),{onFreezeSplitChange:()=>{pe(Q(n.getView().getFreezePanes()))},onTopLeftChange:()=>{se(n.getView().getTopLeft())},onMovableSelectionChange:()=>{Oe(n.getView().getMovableSelection().length>0)}}),tt(n?.getSelection(),{onChange:()=>{We(n.getSelection().isEntire())}}),tt(n,{onViewChange(){me(n.getView()),N(Ie())},onLayoutChange:()=>{const J=n.getEntireRange();He({height:J.getRowCount(),width:J.getColumnCount()}),N(Ie())},onStyleChange:()=>{Nt()},onMovablesChange:()=>{},onInvalidated:()=>{Nt()}}),tt(n,{onRequestScrollIntoView:async(J,Se)=>{if(!Se)return;const Ke={colIndex:Se?.coords?.colStart,rowIndex:Se?.coords?.rowStart};return await B.current?.scrollCellCoordsIntoView(Ke,Se?.scroll),!0},onRequestFocus:()=>ge.CommonUtils.whenFocus(Mt.current)},Ri);const yt=o.useRef(!1),Vt=o.useMemo(()=>{const J=ge.CommonUtils.debounce(Ve=>{requestAnimationFrame(()=>{at.current&&Re?.(Ve)})},32),Se=(Ve,Ye)=>{at.current=!0,pt([Ge=>{if(!Ge.toClipBounds(Ge.getRangeCoordsBounds({rowStart:0,rowEnd:be.height,colStart:Ve,colEnd:Ve})))return;const lt=Ge.getLayout(),rt=Math.max(0,lt.getColOffset(Ve)),ot=Ge.getBounds(),wt=Math.min(ot.x+ot.width,lt.getColOffset(Ve+1)),Tt=Ge.getAnchor();if(Ye!==null&&(Tt===ge.AnchorLocation.Left||Tt===ge.AnchorLocation.Center||Tt===ge.AnchorLocation.Right)){const lo=ge.CommonUtils.roundAccurately(Ye*ge.CommonUtils.getDPI(),0),Tn=ge.CommonUtils.roundAccurately(n?.getColumnWidthAsFontUnit(Ye/ae),2).toFixed(2),io="Width: "+(Ye?Tn+" ("+lo+" pixels)":"Hidden"),on=Yn.current.getGridElement().getRelativePointFromClient(0,0),Kt=0-on.y,In=0-on.y+Be,ao=on.x-ot.x;J({anchor:{x:rt-ao,y:Kt,width:wt-rt,height:In-Kt},display:io})}const Pt=[0,0,0,ot.height],to={style:{boxShadow:`0.5px 0px 0px 0px ${l?.body?.fill}`},pathProps:{stroke:T}},no={x:rt-1,y:0,width:1,height:ot.height},oo={style:{boxShadow:`-0.5px 0px 0px 0px ${l?.body?.fill}`},pathProps:{stroke:T}},ro={x:wt-1,y:0,width:1,height:ot.height};return c.jsxs(o.Fragment,{children:[c.jsx(ut.SVGLine,{linePoints:Pt,bounds:no,...to}),c.jsx(ut.SVGLine,{linePoints:Pt,bounds:ro,...oo})]},"resize-dividers")}])};let Ke=null;return{onResizeHeadersStart:(Ve,Ye,Ge)=>{Ke=n.beginCommit(Ge),yt.current=!1,Se(Ve,Ye)},onResizeHeaders:(Ve,Ye,Ge)=>{yt.current=!1,Se(Ve,Ye)},onResizeHeadersDown:(Ve,Ye)=>{yt.current=!0,setTimeout(()=>{yt.current&&Se(Ve,Ye)},360)},onResizeHeadersEnd:(Ve,Ye,Ge)=>{Ke?.commit({description:Ge}),Ke=null,yt.current=!1,requestAnimationFrame(()=>De?.()),at.current=!1,pt(null)},onResizeHeadersUp:Ve=>{yt.current=!1,requestAnimationFrame(()=>De?.()),at.current=!1,pt(null)},...h}},[n,h,Be,mt]),tn=o.useMemo(()=>{const J=ge.CommonUtils.debounce(Ve=>{requestAnimationFrame(()=>{at.current&&he?.(Ve)})},32),Se=(Ve,Ye)=>{at.current=!0,pt([Ge=>{if(!Ge.toClipBounds(Ge.getRangeCoordsBounds({rowStart:Ve,rowEnd:Ve,colStart:0,colEnd:be.width})))return;const lt=Ge.getLayout(),rt=Math.max(0,lt.getRowOffset(Ve)),ot=Ge.getBounds(),wt=Math.min(ot.y+ot.height,lt.getRowOffset(Ve+1)),Tt=Ge.getAnchor();if(Ye!==null&&(Tt===ge.AnchorLocation.Top||Tt===ge.AnchorLocation.Center||Tt===ge.AnchorLocation.Bottom)){const lo=Math.floor(10*ge.CommonUtils.getDPI())/10,Tn=ge.CommonUtils.roundAccurately(Ye*lo,0),io=ge.CommonUtils.roundAccurately(Tn/ae/(n?.getRowHeaders().getScaleFactor()*ge.CommonUtils.getDPI()),2).toFixed(2),on="Height: "+(Ye?io+" ("+Tn+" pixels)":"Hidden"),Kt=Ut.current.getGridElement().getRelativePointFromClient(0,0),In=0-Kt.x,ao=0-Kt.x+Pe,Il=Kt.y-ot.y;J({anchor:{x:In,y:rt-Il,width:ao-In,height:wt-rt},display:on})}const Pt=[0,0,ot.width,0],to={style:{boxShadow:`0px 0.5px 0px 0px ${l?.body?.fill}`},pathProps:{stroke:T}},no={x:0,y:rt-1,width:ot.width,height:1},oo={style:{boxShadow:`0px -0.5px 0px 0px ${l?.body?.fill}`},pathProps:{stroke:T}},ro={x:0,y:wt-1,width:ot.width,height:1};return c.jsxs(o.Fragment,{children:[c.jsx(ut.SVGLine,{linePoints:Pt,bounds:no,...to}),c.jsx(ut.SVGLine,{linePoints:Pt,bounds:ro,...oo})]},"resize-dividers")}])};let Ke=null;return{onResizeHeadersStart:(Ve,Ye,Ge)=>{Ke=n.beginCommit(Ge),yt.current=!1,Se(Ve,Ye)},onResizeHeaders:(Ve,Ye,Ge)=>{yt.current=!1,Se(Ve,Ye)},onResizeHeadersDown:(Ve,Ye)=>{yt.current=!0,setTimeout(()=>{yt.current&&Se(Ve,Ye)},360)},onResizeHeadersEnd:(Ve,Ye,Ge)=>{Ke?.commit({description:Ge}),Ke=null,yt.current=!1,requestAnimationFrame(()=>De?.()),at.current=!1,pt(null)},onResizeHeadersUp:Ve=>{yt.current=!1,requestAnimationFrame(()=>De?.()),at.current=!1,pt(null)},...p}},[n,p,Pe]),Mt=r.useImperativeElement(t,()=>{const J=Ke=>{n?.getView()&&n.getView().selectMovables([]),Le.current=null,B?.current?.focus(Ke)},Se=async(Ke=null)=>{if(Ke||(Ke=n?.getView().getMovableSelection()[0]),!Ke)return!1;const Ve=Ke.getAnchorCoords();if(!Ve)return!1;const Ye=B.current?.getViewFromCellCoords({colIndex:Ve.colStart,rowIndex:Ve.rowStart});if(!Ye)return!1;const Ge=Ye.getAnchor();n?.getView().getMovableSelection().indexOf(Ke)===-1&&n?.getView().selectMovables([Ke]);let lt=Me.current?.get(Ge);return lt?.current?(await lt.current.focusMovable(Ke),!0):(Le.current={movable:Ke,anchor:Ge},!0)};return{getGridElement:()=>B.current,getRowHeaderElement:()=>Ut.current,getColumnHeaderElement:()=>Yn.current,rowHeaderHeight:()=>Be,colHeaderWidth:()=>Pe,startEdit:Te,submitEdit:()=>{we.setMode(Ke=>Ke?.key!=="edit"?Ke:{key:"edit",args:{stateAndCoords:null,submit:!0}})},cancelEdit:()=>{we.setMode(Ke=>Ke?.key!=="edit"?Ke:{key:"edit",args:{stateAndCoords:null,cancel:!0}})},isEditing:Z!==null,focus:Ke=>{n?.getView().getMovableSelection().length>0&&Se()||J(Ke)},focusSheet:J,focusMovable:Se,contains:Ke=>B?.current?.contains?.(Ke),invalidate:Nt,isSheetElement:()=>!0,getSheet:()=>n}},[n]),Nt=o.useCallback(J=>{Fe.current||(B?.current?.invalidate(J),$?.())},[]);o.useEffect(()=>{Nt()},[ke]);const bn=_e?Ce.edgeStrokeFill:ce.fill,nt=_e?Ae.fill:typeof ke.headerHover=="function"?ke.headerHover(ce)?.fill:ce.fill,xn=o.useMemo(()=>V?c.jsx("div",{className:st("sheetxl-viewport-overlay",Ul),style:{width:"100%",height:"100%",boxSizing:"border-box",position:"absolute"},children:V}):c.jsx(c.Fragment,{}),[V]);let Ht=null;fe&&Ee&&(Ht=c.jsxs("div",{tabIndex:-1,className:"top-left-corner",style:{padding:"2 2",position:"absolute",height:`${Be}px`,width:`${Pe}px`,zIndex:1,boxSizing:"border-box",cursor:"cell"},onMouseDown:J=>{let Se=!J.ctrlKey;je?.getCommand("selectAll")?.execute(!Se||J.button!==0),J.nativeEvent.which===r.MouseButtonCodes.Right?i?.({originalEvent:J,clientX:J.clientX,clientY:J.clientY,rowIndex:-1,colIndex:-1}):B.current?.focus()},children:[c.jsx("div",{style:{height:Be-5+"px",width:Be-5+"px",clipPath:`path('M${Be-5} 0 L0 ${Be-5} L${Be-5} ${Be-5} L${Be-5} 0 Z')`,borderRight:`2px solid ${bn}`,borderBottom:`2px solid ${bn}`,background:`${nt}`,boxSizing:"border-box",position:"absolute",right:"2px",bottom:"2px"}}),c.jsx("div",{style:{position:"absolute",height:`${Be}px`,width:`${Pe}px`,boxSizing:"border-box",borderRight:`solid 1px ${ce.strokeFill}`,borderBottom:`solid 1px ${ce.strokeFill}`,right:"-1px",bottom:"-1px"}})]}));const nn=r.useCallbackRef(({_left:J,_top:Se})=>{},[]),dt=r.useCallbackRef(J=>{if(!i)return;const Se=B.current.getViewFromClient(J.clientX,J.clientY)?.getCellCoordsFromClient(J.clientX,J.clientY);Se&&(i({originalEvent:J,clientX:J.clientX,clientY:J.clientY,rowIndex:Se.rowIndex,colIndex:Se.colIndex}),J.stopPropagation(),J.preventDefault())},[i]),vt=r.useCallbackRef(J=>{if(!(!J.shiftKey&&(J.ctrlKey||J.metaKey)))return;const{deltaY:Se}=J;return Se>0?je.getCommand("sheetZoomOut")?.execute():Se<0&&je.getCommand("sheetZoomIn")?.execute(),Se===0},[je]);o.useEffect(()=>{It(null),Dt.current=null,at.current=!1,pt(null);const J=n?.getView().getTopLeft();nn(J),B.current?.scrollTo(J),se(J),me(n.getView()),pe(Q(n.getView().getFreezePanes())),N(Ie()),$()},[n?.getView()]);const qn=o.useCallback((J,Se)=>n.getRowHeaders().hiddenHeadersAt(J,Se),[n]),Sn=o.useCallback((J,Se)=>n.getColumnHeaders().hiddenHeadersAt(J,Se),[n]),Lt=r.useCallbackRef(J=>{const Se=J.getVisibleRangeCoords();if(!Se)return null;const Ke=[];return n.getRange(Se).forEach((Ve,Ye)=>{const Ge=Ye.getCoords(),lt=Ye.getCell();(rt=>{if(rt.isEmpty())return!1;const ot=rt.getSpans();if(ot.width>1||ot.height>1||rt.getStyle().hasVisibleStyling()||ne.isShowFormulas()&&rt.getFormula()!==null)return!0;const wt=rt.getValue();return wt!==null&&!(!ne.isShowZeros()&&wt===0&&rt.getType()===d.ScalarType.Number)})(lt)&&Ke.push({coords:Ge,value:lt,range:ne.isShowFormulas()?null:lt.getExtrusions()})},{ignoreHidden:!0,includeMergeOverflow:!0}),Ke},[n,ne.isShowZeros(),ne.isShowFormulas(),Z]);o.useEffect(()=>{const J=[];z&&J.push(...z),mt&&J.push(...mt),ge.CommonUtils.isEqualArrays(J,Dt.current)||(Dt.current=J,It(J))},[z,mt,ke]);const Rn=o.useMemo(()=>({style:{boxShadow:`0.5px 0.5px 0px 0px ${l?.body?.fill}`},pathProps:{stroke:l?.body?.text?.fill??"black"}}),[ke?.header?.edgeStrokeFill]),Xn=r.useCallbackRef(J=>{J.isDefaultPrevented()||J.isPropagationStopped()||(Le.current=null,n?.getView().getMovableSelection().length>0&&n.getView().selectMovables([]))},[n]),kn=o.useMemo(()=>{const J=we.getMode();return J?.key==="cut"||J?.key==="copy"},[we]),Mn=r.useCallbackRef(async J=>{const Se=we.getMode();return J.keyCode===r.KeyCodes.Escape&&Se?(J.preventDefault(),void we.setMode(null)):J.keyCode===r.KeyCodes.Enter&&kn?(J.preventDefault(),await je?.getCommand("paste")?.execute(),void we.setMode(null)):void je?.dispatchToFocusedCommand(J)},[je,we]),Ut=o.useRef(null),bl=o.useMemo(()=>c.jsx("div",{tabIndex:-1,style:{position:"relative",flex:"0",top:`${Be+1}px`,width:`${Pe+ce.edgeStrokeWidth}px`,minWidth:`${Pe+ce.edgeStrokeWidth}px`,borderRight:`solid ${ce.edgeStrokeWidth}px ${ce.edgeStrokeFill}`,height:`calc(100% - ${Be}px)`,boxSizing:"border-box",zIndex:"2"},children:c.jsx(Qo,{ref:Ut,sheetElement:Mt.current,gridRef:B,freezeStart:ye?.[ge.AnchorLocation.Top],oppositeSize:Pe,containerWidth:Pe,containerHeight:ie,sheetHeader:n.getRowHeaders(),gridStyle:$e,verticalPadding:Math.max(0,Math.floor(n.getStyles().getNormal().getFont().getSize()/10)),scrollPoint:Et,onSheetContextMenu:i,tabIndex:-1,style:{position:"relative",flex:"0",top:`${Be+1}px`,width:`${Pe+ce.edgeStrokeWidth}px`,minWidth:`${Pe+ce.edgeStrokeWidth}px`,borderRight:`solid ${ce.edgeStrokeWidth}px ${ce.edgeStrokeFill}`,height:`calc(100% - ${Be}px)`,boxSizing:"border-box",zIndex:"2",...tn?.style},...tn})}),[Pe,Be,ie,n,Et,ye?.[ge.AnchorLocation.Top],ke,g,i,ce.fill,p]),Yn=o.useRef(null),xl=o.useMemo(()=>c.jsx("div",{tabIndex:-1,style:{position:"relative",left:"0px",width:"100%",height:`${Be+ce.edgeStrokeWidth}px`,minHeight:`${Be+ce.edgeStrokeWidth}px`,borderBottom:`solid ${ce.edgeStrokeWidth}px ${ce.edgeStrokeFill}`,boxSizing:"border-box",zIndex:"1"},children:c.jsx(Qo,{ref:Yn,sheetElement:Mt.current,gridRef:B,freezeStart:ye?.[ge.AnchorLocation.Left],oppositeSize:Be,containerWidth:Qe,containerHeight:Be,sheetHeader:n.getColumnHeaders(),gridStyle:$e,scrollPoint:zt,onSheetContextMenu:i,...Vt,style:{...Vt?.style,position:"relative",left:"0px",width:"100%",height:`${Be+ce.edgeStrokeWidth}px`,minHeight:`${Be+ce.edgeStrokeWidth}px`,borderBottom:`solid ${ce.edgeStrokeWidth}px ${ce.edgeStrokeFill}`,boxSizing:"border-box",zIndex:"1"}})}),[Be,Qe,n,zt,ye?.[ge.AnchorLocation.Left],ke,ce.fill,g,i,h]),ql=r.useCallbackRef(J=>{const{value:Se,key:Ke,...Ve}=J;let Ye=Se,Ge=Z;if(!Ge||Ge.colIndex===J.coords.colIndex&&Ge.rowIndex===J.coords.rowIndex||(Ge=null),!Ye){const ot=J.range;if(Ye=n.getRange({rowIndex:ot.rowStart,colIndex:ot.colStart}).getCell(),Ye.isEmpty())return null}let lt=null;Ye.getHyperlink()&&(lt=async ot=>{if(U?.onLinkMouseDown?.(ot),ot.button===0&&!ot.isDefaultPrevented()){ot.stopPropagation(),ot.preventDefault();try{await Ye.getHyperlink()?.open()}catch(wt){Ze.showError?.(wt)}}}),Ge&&Ge.colIndex===J.range.colStart&&Ge.rowIndex===J.range.rowStart&&(Ye=Ye.createTemporaryCell({value:null}));const rt=n.getStyles();return o.createElement(Mr,{...Ve,key:Ke,bodyStyle:te,docTheme:rt.getTheme(),normalStyle:rt.getNormal(),showFormulas:ne.isShowFormulas(),showZeros:ne.isShowZeros(),onLinkMouseDown:lt,...U,value:Ye})},[n,xe,te,Z,ne?.isShowFormulas(),ne.isShowZeros()]),Sl=o.useCallback((J,Se)=>{const{key:Ke,...Ve}=J;return[c.jsx(Jl,{ref:Se,getVisibleCells:Lt,sheet:n,gridStyle:ke,...Ve},`border-${Ke}`),c.jsx(xi,{ref:Se,sheet:n,commands:je,...Ve},`table-${Ke}`),c.jsx(qi,{ref:Se,sheet:n,...Ve},`spill-${Ke}`),c.jsx(hi,{ref:Se,sheet:n,commands:je,onShowTooltip:re,onCloseTooltip:De,gridStyle:ke,gridRef:B,editingCoords:Z,isActive:g,...Ve},`selection-${Ke}`),c.jsx(ii,{ref:Se,sheet:n,commands:je,gridStyle:ke,element:q,...Ve},`copy-paste-${Ke}`),c.jsx(Ci,{ref:Se,sheet:n,commands:je,target:Ue,renderMovable:K,movableProps:{onUnFocus:()=>{Mt.current.focus()}},...Ve},`movable-${Ke}`),c.jsx(yi,{ref:Se,sheet:n,commands:je,gridStyle:ke,getCellEditor:L,showProtectedError:xt,setEditingCoords:qe,...Ve},`editor-${Ke}`)]},[n,B.current,ke,L,je,Ze]),[Lo,Rl]=o.useState(!1),kl=o.useMemo(()=>{if(Qe===0||ie===0)return null;const J=n.getStyles().getNormal(),Se=J.getFont(),Ke=J.getFill(),Ve=J.getBorder(),Ye=J.getFill().getType()===d.IFill.Type.None;let Ge=le,lt=le;const rt=(wt,Tt,Pt)=>Pt?{stroke:Ve.getBottom().isNone()?"none":wt.getColor().toRGBA(te.darkMode).toString(),...Tt}:Tt;lt=rt(Ve.getBottom(),lt,!Ve.getBottom().isNone()),lt=rt(Ve.getTop(),lt,!Ve.getTop().isNone()),Ge=rt(Ve.getRight(),Ge,!Ve.getRight().isNone()),Ge=rt(Ve.getLeft(),Ge,!Ve.getLeft().isNone());let ot=ne?.getGridLineColor()?.toRGBA(te.darkMode).toString()??te.strokeFill;return Ye||(lt=rt(Ve.getBottom(),lt,!0),lt=rt(Ve.getTop(),lt,!0),Ge=rt(Ve.getRight(),Ge,!0),Ge=rt(Ve.getLeft(),Ge,!0)),c.jsx(ut.Grid,{className:"sheetxl-sheet-primary",style:{...Si,...Ke.toCSS(te.darkMode),...Se.toCSS(te.darkMode,ae),"--sxl-app-color-background":te.fill,"--sxl-app-color-shadow":ke.colorShadow,"--sxl-app-color-grey":ke.colorGrey,"--sxl-app-color-button-fill":X.fill,"--sxl-app-color-button-text":X.text?.fill,"--sxl-app-color-button-border":X.edgeStrokeFill,"--sxl-app-color-primary-dark":ke.selection.strokeFill},ref:B,zoom:ae,...de,onFirstRender:wt=>{Rl(!0),de?.onFirstRender?.(wt),je?.activate()},showGridLines:ze,gridLineColor:ot,gridLineColumnsProps:Ge,gridLineRowsProps:lt,freezeLeft:ye?.[ge.AnchorLocation.Left],freezeLeftProps:Rn,freezeTop:ye?.[ge.AnchorLocation.Top],freezeTopProps:Rn,width:Qe,height:ie,columnCount:be.width,rowCount:be.height,cursor:ft??ct??"cell",clipCells:!0,layout:xe,cellRenderer:ql,overlayRenderer:Sl,getCellCoordsAsRangeCoords:ue,hiddenRowsAt:qn,hiddenColumnsAt:Sn,getVisibleCells:Lt,onWheelScroll:vt,onPointerDown:Xn,onKeyDown:Mn,onViewportChange:E,onImmediateScroll:nn,scrollPoint:oe,stageProps:{onFocus:()=>{je?.activate()}},overlays:Qt})},[R]);o.useEffect(()=>{Fe.current||$()},[xe,ye,ae,je,oe?.left,oe?.top,te,de,Qe,ie,ft,Qt,g,ct]);let Jn={flex:"1 1 100%",display:"flex",alignContent:"stretch",position:"relative"};b||(Jn={...Jn,...S});const Ml=o.useMemo(()=>{const J=n.getStyles().getTheme(),Se=J.getColorScheme(),Ke=J.getFontScheme();return{"--sxl-doc-color-dk1":Se.getDk1().toCSS(te.darkMode),"--sxl-doc-color-dk2":Se.getDk2().toCSS(te.darkMode),"--sxl-doc-color-lt1":Se.getLt1().toCSS(te.darkMode),"--sxl-doc-color-lt2":Se.getLt2().toCSS(te.darkMode),"--sxl-doc-color-accent1":Se.getAccent1().toCSS(te.darkMode),"--sxl-doc-color-accent2":Se.getAccent2().toCSS(te.darkMode),"--sxl-doc-color-accent3":Se.getAccent3().toCSS(te.darkMode),"--sxl-doc-color-accent4":Se.getAccent4().toCSS(te.darkMode),"--sxl-doc-color-accent5":Se.getAccent5().toCSS(te.darkMode),"--sxl-doc-color-accent6":Se.getAccent6().toCSS(te.darkMode),"--sxl-doc-color-hlink":Se.getHlink().toCSS(te.darkMode),"--sxl-doc-color-fol-hlink":Se.getFolHlink().toCSS(te.darkMode),"--sxl-doc-font-major":Ke.getMajorFont(),"--sxl-doc-font-minor":Ke.getMinorFont()}},[n.getStyles().getTheme()]),Po=r.useCallbackRef(J=>{const{style:Se,...Ke}=J;return c.jsx(Mo,{...Ke,style:{paddingLeft:"4px",paddingRight:"4px",...Se},sheet:n})},[n]);let Qn=c.jsx("div",{style:Jn,onTouchStart:()=>{jo()},onFocus:J=>{j(!0),f?.(J)},onBlur:J=>{j(!1),A?.(J)},ref:Mt,...H,children:c.jsx("div",{className:st("sheetxl-sheet",Hl),style:{position:"absolute",width:"100%",height:"100%",boxSizing:"border-box",display:"flex",flexDirection:"column",flex:"1 1 100%",zIndex:"0",...Ml},children:c.jsxs("div",{style:{display:"flex",flexDirection:"row",flex:"1 1 100%"},children:[Ht,bl,c.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:"1 1 100%",overflow:"hidden",position:"relative"},children:[xl,c.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:"1 1 100%",position:"relative",borderRight:`solid ${ce.edgeStrokeWidth}px ${ce.edgeStrokeFill}`,backgroundColor:te.fill},ref:k,onContextMenu:dt,children:[kl,xn,c.jsx(Kl,{style:{position:"absolute",right:24,bottom:4},colorLicensee:ke?.selection?.strokeFill,colorCredits:ke?.body?.text?.fill})]})]})]})})});b&&(Qn=c.jsx(r.ScrollPane,{style:{flex:"1 1 100%",overflow:"hidden",background:`${ce.fill}`,minHeight:2*C.height,minWidth:2*C.width,...S},viewport:y,touchElement:B.current?.stage,disableTouch:Xe,onScrollViewport:J=>{B.current?.scrollTo(J)},createHorizontalScrollbar:Po,createVerticalScrollbar:Po,...v,children:Qn})),o.useEffect(()=>{Fe.current=!1,$?.(),Y&&Mt.current?.focus()},[n]);const[eo,Tl]=o.useState(!1),jo=r.useCallbackRef(()=>{eo||Tl(!0)},[eo]);return o.useEffect(()=>{if(Lo)return typeof M=="function"&&M(),r.ReactUtils.detectIt().primaryInput==="touch"&&jo(),()=>{}},[M,Lo,eo]),Qn}));Hr.displayName="SheetElement";const ki=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),rr="data:image/webp;base64,UklGRhIPAABXRUJQVlA4TAYPAAAv/8F/EM8HIZJtWU0fdlTh3wRCIMlkE+EqkiTFyt57/KQ8/zKeEf5iaseNJClS1DGDxWcwvhfuCo5tW88SHw8Xh5ypbC3tnf8QHEfOB/D97w4PuFHBIx6MHJ74zvj/0aLdlH9AYWEjHiwOJR5M7Q+FAigmTRQOJRqczrVUKABQSMYgoAFFAhIwBkgaYEkBSABowDGgcYakUZirArQhRMUIIHGLBIAEEoDRfyokIAEAMhrSRmEOSPyS/jvR+BYFIWkUhLQhCpLGGQ2rhPiCOKPxDIVQmAZQDMYIjCTfNQXVJv8pnQqhuAonnczGDPv0VwFw/w+uGiAwQYjJXxffaJzROKPHoArGAPA+6o9AtiIj4XgAWGKCwAQBVNMSHQNEjTMqOSWPQEFRHOVl4vp/nnhI/DBNK8CGXCpeFvONip/jvPn67qb957v+Nssyv96/Jwg/xzT9yORhfR4fb6vF9ef39Nt62g55v37/7dRzfx9xFLRtIyX8ae+/AxARE8APxbCQtkidoqVGDBDxR3r8/59vo88vnW07v9nrY+l0tn0zemuSnn03W83Otn2zcarbfIrZqnG7Ykr77/nS5PP+/E6/iP7DgiRJiZX13F2QhYM/OrBtm7at/ZB927Zt27ZtPr/oK7Jt27b9x7dtGxcv1sFcc/R1woj+S2IkSZGkaXMpD2sZhqf3R5Y/23+2/2z/2f6z/Wf7z/af7T/bf7b/bP/97S8/r8tpn2+Rafa98ufeMc3nfK8v3V9QZHWVtFs5f/i2z8bd7+E/nX/Vuk9+uO6dF3IuWEy12r0S9eGUdA5q0RtuvnxxXpUFVPf5eQlfe7jG8j58Q6+uZZZNRGmv+GgOidbMMHMMy/WbJu7az/wcUqUk9C01LJNj5tZsDsnuizfPWh/F3WdN4FDO/eiYow4LozJuhpfDoPtcywyr8pAYDpv2RlmOB1TF7fBymPXAqA4Wwskrp3JY9oVZZA2efmm8m8O2Xa796tcoMprDvA2DAprXfkYWC9C0eflat2xrBgtRrKuDwgXemsKS5I6vr2zVzq9ZnLbUUzSHL5lFast+JTPi1rJUZWzN1bBuSSxZ7pvqaFfeVpYub2QtzaqI3McCtsppqPXPTWc0C9kjB3TqyFcsZ54b8/XpXJSHRW23qU1LJrC4PdFRlWsMzWCJ815ZpUYDU1no7mqiQ7VvYbnz9zIUaOkqFr3tZ7XnfKSHhe/+ON3pNJblL8N1QXEG+xlCXzXXmvKZjKJYn9IWKV7POMqIqlaYVtEMpU0l6lq46Eo3g2lvO2WtRPoB48m/SFXjwt3JiMqYp6eJkHWTGVQ3BZSky30Mq0/KVMTnZ2BN6aggV2UwtPa0UI+rGV1pylkm1RjB+IpZqpoxRG5ghGW/oZjr9xlj+xarZSiBBEaZe5BSxhK4jXHmeVElj/2Bkeb2KeQVzWKs7eumDnMZbemtlGEU4236UVUYyojb3UATK5Yx5lY30sOqRVlBn3YPdqKCgrexZ7SwcknQP13bfjWC6nD1XEcreHs8QgXOTg369bDmlxFQNU28mRpwYUMNXDcTQVXC2woYTOo2DrJxk1+ZQ9/9PIeNprjRs72ij4H2wbdZjdzdTDYizUXG9P3gnfZGDVy3gFMxD5ZBN9U7BWoJpoK2OpBvHvbYArWBUlFDgXu8QG2BVJanG2xLxC/UckNZZ6Om5VZmnd1NQfvtrRJzByPGXHr8ohqyn/eOr0MIZXAJZFvF1zGAUvC0AuzT+LpgXxJ7K/BuK/jA8LpiXhpPwZ3dcFN4XbIukUVgnVR01Y4WhVi19KLTC6Ca/vD4uevReM40PgHVY9GFMC2bHkAtG10Qy9K5rzHOLQkcGVwYwxJ6H+fspuAC2ZVSG5Rbjg0ulFk5Ta2FcUHTvcqtGrCo7aqZFo2EaK3oOXi0mpOO+xoinOB8cGgF2JTYrQC9EFoRJqV2Gp6Z3oisEItymxKBbniR+yIrxqDsBoCzUGQFpS+93fnYNiO4Z6FVwxc1WjXpotdCc0HoXHRMPucfY0qQTXJ6L+jqGCY0EzekcaOm+LY/g4PSCGCuirwgDtJ4dePy/uCvg2tJ8wNkhDzmObBsJDkhj7OagtL3rrwAhX84mnWiv8Yz+M/IXgyZHTFNc3jZ7dLYfSNo5uA2EpLzJT/c8b1liOY47CtHKOEfj+xcyRJ2vCqAx0MyRR2zE88uwr4hV9RxkoHGeIDv93Cf8aVotiT/uiTb0X+uKfFgnCw5Y473FWJxu7whx/wull0JkMwhx5MMJJ6UPeKYjyCZ43iw/BHHTwOxtAQAOPafwGEExem+vKd794bhxzckhNFvDgGbYbhCgoAbe46jcKsw0MbcH4Qv3hAH2vgOHIsbg4CNPScxuFcoWGPuhWFX8WnO/gt7hufPIVhSEstIOjN7ChF4WDhIY34RwcqGb4uHWfjnPZwmAQGN73PI7xkh4Yy5nvzuFhPOeKj4OkhQsqeJF9qz0DXAWB45sBFU7K6QXoKENTLOzPyC9PYIDGR8sfBOscikTwfzHp3MJlOPcujyB2TnYjiEMbeUfn0jOoRxP9GVeRgPYPyk6FqH3AaAUh5ZkOL4hpC/XLOim8/yXQ3yxXxWck9o4gb3h85/inFrhLfLQf3iIZIPNfmWLFQvniG4DyUPtYvHij7V0UXl4uxqua0vG3WLOUduNxjdELBn98vm8Jroy5z5jCSzJpY9m/CWnF43NYtvlHu8CclKxeJPxDabzNQrfkBsZ8pNteLMCKmdIDu1irmj1LaRn1rFraT2oAxVKh4oNcuHj7aRx9FNhof3pPaq5Djyzsi2RD3sDXmCSAejD/wqmeIM3y7JzS1b9YkfkfpAIchXdeI1Yu9ZqrHaxNOFdqGcVSbmgMyW974v2DmPb3A+lMhsbcl6rMrMXCCz9WSuKnFDmW0gdzWJc2S2suxVJO4s9YiT/uoRt5TZ1gJQjbitzMaJQC3iFVJfqhAElYiX6M3VCQ7FijMOokpYIfSTMFQLbYV+QQhlobUXtDJB9dBZ6OnOAFVEjtDznfyribpCz3e2ryoKLP9yJ4Uyu9x+rsmYUS2zS7yrjDSpjwuidbXxtdCmda46NghtGuPq4yOphx071LYKeZ+E7hXXamTk37XjTjzo+gqq0ThI7L2Nq9X7Z7Gexp1aq1ofnovVNO7cmfX67FyspXEnP/P74qxa1uho3Omrm6ZePpF73PkPzL41q5gbSOzu8PrOvGbek9uoXvF2Z1bKbQOvd8yajU3kdpHRx+W6yY4QfGfjfT4tV87dJLfBD1y+Kqudm0jwjjX5orx6+ol+ISM9viernxV/5+53wqw94f3OSCHJ/XII3Z/23S+tgPeHH5DovQgYoAWye5ovQkdldwpehNIDspuOLkSPkfDdCXaXo+7Pdj8G87pGemPRgnRI/Eua2/Pd78zMMvH3OhxtZhw/I/G7AytM78lvS6o4lQI4YuRQcbofwH5n//w6UqDeJwDtSBSpNyEcXSigSHkgHIqUqXq6x53xGUFoV56ZdHwZg41hYuU5jsF0b6AE6zEC0fEk0RqAwpIg0XKXwDiC6G9ghGsLwWgXolUZFzVxWAxjph3TgRyLsuFHIATsfQLS1gQRWw7laOMARGyyQUi61z5k/QiKRd1Dtq8Qi79e847ZDst/3Al+ROO7N6xn5HGtQWh62DdqiwiOWWyjtipAeLrXNGzvQjq40J5hu/ccIoPvOcbtUlBnFMF8VdZFswowGX6U4Yl+2KOLQHWiW+D2NUPl5/29Ijcb2NEGtYqc/ySw0wlzV2+038muI2AtFXWS2zCsewq3gsl+ZytEZnC/Xmi/011M0FpQYSPW/QRcwWC/80WfA3fcCXdOr2+ElFz+/U74CoFrnkPjFCy97I2tInRdo9T6RkgGku93yrYEz68HZdY3QrKQungC2DoKVCQTifM3g3g6yfboZfY76zCC2CeKHAvMNmPW/U47vogw9kKo4KzkLGMFzONOfFSo0Myk3O3A3xLMLlKowOxk3O/MtQlnj8QKy1C+/U69koCa6/BYQVnK1kcEtUV6kP1OvqsRVkOuV+wYMpuOqfY7ew8C26/7B+s6Y4maQXC7VMG6zFqaHigmvK0aravMZfm5E7SFfMJhdo/WRfZy/NwZ5hHk5vkgWscByNAj1YS5CxStwxCUb3dTQt2T4ToKQvGfO0kbgu3f28J1EIbCP3eWKwl40x8Yrm0ginaLQcg79ZCgX7UJRcEmnSPsncBBv2oZjGLF5sA/70y3oj/vTIcVcIpRHw3+nS1mnLHIzH1JAdV+MPhXk4WkRC5SQU1Sg3711QgJSnwfRWjhFPPuQ33e2b4oIi30WgZDblUd0kPzIbsvhzTRMMCm1yNddClc3iPqOO+ULrD2HSJ15EiEyr2YFFJVPFCeHqSSAh/gvPsZtZx32ptQPkd3xZx24NkYX1EbIsVczQUotivppivhSW1J2undDHDzGhqQfno+HZmHCkhDtYzG5fZzpKOOTUblxmrSUic2gjrv9KSoym8GJH0l6SozC40J9UlbHUnB4vETpK9OPorkZURWkcY6H4VjEbPupLWe9WKwriHpreZfIniyqPOkuSLmuaU3rRtpr4N7hf9/4yfSX+d2Sj6tqZdBKsx5j9Tu6EBa7IRLZLt6OUiRHZoqr62NSJddiHTLKsVJ+uzAWElXLBheRhrN4ZwmpcdakFarNS9bxDnMToMUW9148cTMKyfldvpu0WTecJz0mxEn1x2e+DzScQ6fTAsmZ2xtTz+n5juS5bGlM+m66meSZPl7Y2dnUnjLtmaIsSpxVEdSerkuvwiTmOedIMV38uKUcHfXqwFSflVL4zPDeJxhV3uyBB2/cnx4+sK8QJahqm47Y8PNg9c0JItRedyM2PAxMWqZQVakyrgZMeFg7y8PsS7VeuO70P4bxP3ZRaUGWZ6OmVv9oSk63llBVqkLh4Zt9IaW1Tt6tjfIYhWRY86YGCKH/WWGmUOWraaHxzw1yV2DMxQ2zHq51Tmyfl2o99bI25Jig2vP54ljDp9ykLWsdj3fkO9vvWPKtL8wndo7YeztOy8bcKh5OVncyhq2XNrd96ZpLrjy5/qYb/l8S7q2r1NJlj/bf7b/bP/Z/rP9Z/vP9p/tP9t/tv9s//3djwA=",Ur=o.memo(o.forwardRef((e,t)=>{const{children:n,disabled:l,style:a,picture:i,description:m,isDragging:h,view:s,onHide:p,onShow:b,onKeyDownCapture:v,onFocus:u,onBlur:I,loadingPanel:x,...F}=e,[z,K]=o.useState(!1),[V,M]=o.useState(null),[L,f]=o.useState(null),[A,S]=o.useState(null);o.useEffect(()=>{f(null),i.getDetails().then(O=>{K(!1),f(O.asUrl()),O.asSVGText?.()&&S(O.asSVGText())}).catch(O=>{console.warn(O),K(!0),f(rr),S(null)})},[i]);const W=r.useImperativeElement(t,()=>({isPictureEditor:()=>!0}),[]),D=o.useMemo(()=>{if(L||A)return c.jsx("img",{style:{flex:"1",width:"100%",height:"100%",border:z?"var(--sxl-app-color-grey, grey) solid 1px":void 0,backgroundColor:z?"var(--sxl-app-color-background, white)":void 0,boxShadow:z?"0px 0px 3px var(--sxl-app-color-error, red)":void 0,objectFit:z?"contain":void 0,opacity:V?1:0,filter:"var(--sxl-app-filter-dark-invert)"},draggable:!1,src:L,onLoad:()=>{M(!0)},onError:({currentTarget:O})=>{console.log("error"),O.onerror=null,f(rr),K(!0)},alt:m??`${i.getType()}`})},[V,i,L,A,h]);if(!i.isClosed())return c.jsxs("div",{className:"picture-editor",style:{position:"relative",display:"flex",flex:"1 1 100%",filter:h?"drop-shadow(1px 1px 1.5px var(--sxl-app-color-shadow, rgba(0, 0, 0, .25)))":void 0,...a,width:"100%",height:"100%"},tabIndex:0,...F,onKeyDownCapture:O=>{v?.(O)},ref:W,children:[V||z?void 0:x,D]})}));Ur.displayName="PictureEditor";const Mi=o.memo(o.forwardRef((e,t)=>{const{children:n,disabled:l,chart:a,view:i,isDragging:m,onHide:h,onShow:s,...p}=e;o.useEffect(()=>{},[a]);const b=r.useImperativeElement(t,()=>({isChartEditor:()=>!0}),[]),[v,{height:u,width:I}]=Ot();if(!a.isClosed())return c.jsx("div",{...p,ref:Xt([b,v]),children:c.jsx("div",{className:"chart-editor",style:{width:"100%",height:"100%",backgroundColor:"var(--sxl-app-color-background, white)",backgroundImage:"var(--sxl-app-image-background)",alignItems:"center",justifyContent:"center",zoom:i.getZoom(),display:"flex",position:"relative",border:"var(--sxl-app-color-grey, grey) solid 1px",filter:l?"blur(1px)":void 0,boxShadow:m?"1px 1px 2px var(--sxl-app-color-shadow, rgba(0,0,0,.15))":void 0},children:c.jsx("div",{style:{textAlign:"center"},children:a.getDescription()})})})})),Ti="_editable-input_1bqx6_6",Ii=e=>c.jsx("input",{...e}),Kr=o.memo(o.forwardRef((e,t)=>{const{style:n={},className:l,value:a="",onSubmit:i,onChange:m,onCancel:h,createInput:s=Ii,styleHover:p={},dragging:b,maxLength:v,disabled:u=!1,readOnly:I=!1,...x}=e,[F,z]=o.useState(!1),[K,V]=o.useState(!1),[M,L]=o.useState(a);o.useEffect(()=>{L(a)},[a]);const f=o.useRef(null),[A,S]=o.useState(null),W=r.useNotifier(),D=o.useCallback(function($){const k=$.message;A!==k&&(W?.showMessage?.(k,{type:r.NotifierType.Error}),S(k))},[W,A]),O=o.useCallback($=>{let k=!1;try{k=i?.($)??!0}catch(P){D(P)}return k?(f.current=null,V(!1),L($),k):(setTimeout(()=>{f.current?.focus()},0),k)},[i]),_=r.useCallbackRef(()=>{L(a),f.current=null,V(!1),h?.()},[h,a]),de=o.useMemo(()=>{if(!K)return null;const $={className:st(Ti),autoFocus:!0,spellCheck:!1,name:"editable-label",autoComplete:"off",maxLength:v,type:"text",value:M,onFocus:k=>{f.current||(f.current=k.target,setTimeout(()=>{k.target?.select()},0))},onBlur:k=>{f.current&&O(M)},onChange:k=>{K&&L(k.target.value)},onMouseDown:k=>k.stopPropagation(),onKeyDown:k=>k.code==="Escape"?(k.preventDefault(),void _()):k.code==="Enter"?(k.preventDefault(),void O(k.target.value)):void(k.code!=="Tab"?k.stopPropagation():O(k.target.value))};return c.jsx(c.Fragment,{children:s($)})},[K,M,O,_,s,u]),[U,H]=o.useState();o.useLayoutEffect(()=>{let $=Object.assign({},n);(b||F)&&($=Object.assign($,p)),H($)},[b,F,p,n]),o.useEffect(()=>{de&&m?.(M)},[de,m,M]);const R=r.useImperativeElement(t,()=>({startEdit(){u||I||V(!0)},cancel(){_()}}),[]);return c.jsxs("div",{...x,ref:R,style:{flexDirection:"column",display:"flex",...U},className:st(l),children:[c.jsxs("div",{style:{position:"relative",boxSizing:"content-box",whiteSpace:"pre",userSelect:"none",display:"flex",justifyContent:"center"},onDoubleClick:()=>{u||I||V(!0)},onMouseEnter:()=>z(!0),onMouseLeave:()=>z(!1),children:[c.jsx("div",{className:"editable-label-container",style:{textAlign:"center",display:"flex",minHeight:"1em",marginTop:"2px",opacity:K?0:1},children:M}),de]}),c.jsx("div",{style:{whiteSpace:"pre",position:"relative",maxHeight:"0px",height:"0px",visibility:"hidden",marginLeft:"1px",marginRight:"1px",overflow:"hidden",...p},children:M})]})})),$n=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0;function Yt(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function To(e){return"nodeType"in e}function Ct(e){var t,n;return e?Yt(e)?e:To(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Io(e){const{Document:t}=Ct(e);return e instanceof t}function vn(e){return!Yt(e)&&e instanceof Ct(e).HTMLElement}function $r(e){return e instanceof Ct(e).SVGElement}function Zt(e){return e?Yt(e)?e.document:To(e)?Io(e)?e:vn(e)||$r(e)?e.ownerDocument:document:document:document}const Rt=$n?o.useLayoutEffect:o.useEffect;function Wn(e){const t=o.useRef(e);return Rt(()=>{t.current=e}),o.useCallback(function(){for(var n=arguments.length,l=new Array(n),a=0;a<n;a++)l[a]=arguments[a];return t.current==null?void 0:t.current(...l)},[])}function mn(e,t){t===void 0&&(t=[e]);const n=o.useRef(e);return Rt(()=>{n.current!==e&&(n.current=e)},t),n}function cn(e,t){const n=o.useRef();return o.useMemo(()=>{const l=e(n.current);return n.current=l,l},[...t])}function jn(e){const t=Wn(e),n=o.useRef(null),l=o.useCallback(a=>{a!==n.current&&t?.(a,n.current),n.current=a},[]);return[n,l]}function On(e){const t=o.useRef();return o.useEffect(()=>{t.current=e},[e]),t.current}let uo={};function Cn(e,t){return o.useMemo(()=>{if(t)return t;const n=uo[e]==null?0:uo[e]+1;return uo[e]=n,e+"-"+n},[e,t])}function Wr(e){return function(t){for(var n=arguments.length,l=new Array(n>1?n-1:0),a=1;a<n;a++)l[a-1]=arguments[a];return l.reduce((i,m)=>{const h=Object.entries(m);for(const[s,p]of h){const b=i[s];b!=null&&(i[s]=b+e*p)}return i},{...t})}}const _t=Wr(1),fn=Wr(-1);function _n(e){if(!e)return!1;const{KeyboardEvent:t}=Ct(e.target);return t&&e instanceof t}function Bn(e){if((function(t){if(!t)return!1;const{TouchEvent:n}=Ct(t.target);return n&&t instanceof n})(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return(function(t){return"clientX"in t&&"clientY"in t})(e)?{x:e.clientX,y:e.clientY}:null}const Bt=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Bt.Translate.toString(e),Bt.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:l}=e;return t+" "+n+"ms "+l}}}),lr="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Ei(e){return e.matches(lr)?e:e.querySelector(lr)}const Fi={display:"none"};function Ai(e){let{id:t,value:n}=e;return o.createElement("div",{id:t,style:Fi},n)}function Di(e){let{id:t,announcement:n,ariaLiveType:l="assertive"}=e;return o.createElement("div",{id:t,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":l,"aria-atomic":!0},n)}const _r=o.createContext(null),zi={draggable:`
23
+ The content is not applied.`,icon:"PasteFormats"}),new r.Command("pasteFormulas",f,{label:"Paste Formulas",scopedLabels:{paste:"Formulas"},description:"Paste only the formulas of the selected cells. The values and formatting is not applied.",icon:"PasteFormulas"}),new r.Command("pasteTranspose",f,{label:"Paste Transpose",scopedLabels:{paste:"Transpose"},description:"Paste with the rows and columns flipped.",icon:"PasteTranspose"}),new r.Command("pasteLinks",f,{label:"Paste Links",scopedLabels:{paste:"Links"},description:"Paste as formula references to the original cells.",icon:"PasteLinks"})];l.addCommands(A,!0)},[l,e]),o.useEffect(()=>{if(!l)return;const f={disabled:!t.getProtection().isFormatCellsAllowed()};l.getCommand("pasteValues").updateCallback(A=>M.paste({...ti,...A})).update(f),l.getCommand("pasteFormats").updateCallback((A,S)=>M.paste({...ni,description:S.label(),...A})).update(f),l.getCommand("pasteFormulas").updateCallback((A,S)=>M.paste({...oi,description:S.label(),...A})).update(f),l.getCommand("pasteTranspose").updateCallback((A,S)=>M.paste({...ri,description:S.label(),...A})).update(f),l.getCommand("pasteLinks").updateCallback((A,S)=>M.paste({...li,description:S.label(),...A})).update(f),l.getCommand("cut").update(f),l.getCommand("paste").update(f)},[t,l]);const L=o.useMemo(()=>{if(!F||!I.current)return;const f=F.key;if(f!=="copy"&&f!=="cut"&&f!=="formatPainter")return;const A=I.current.getItem();if(A.getSource()!==t)return;const S=I.current.isCut?.(),W=S?b:p,D=S?s:h,O=A.getCoords(),_=O?[O]:null;return _&&_.length!==0?de=>{const U=[];for(let H=0;H<_.length;H++){const R=_[H],$=de.toClipBounds(de.getRangeCoordsBounds(R,{top:0,left:0,right:1,bottom:1}),ut.SELECTION_CLIP_INSETS);$&&(U.push(u({range:R,key:`copy-selection-background-${H}`,x:$.x,y:$.y,width:Math.max($.width,0),height:Math.max($.height,0),stroke:W,strokeWidth:2})),U.push(u({range:R,key:`copy-selection-foreground-${H}`,x:$.x+($.width<=2?-1:0),y:$.y,width:Math.max($.width,3),height:Math.max($.height,3),stroke:D,strokeWidth:2,isAnimatedStroke:!0})))}return U}:null},[F,t,n,h,p,s,b]);return{...M,clipboard:V,overlays:L}},ii=o.memo(o.forwardRef((e,t)=>{const{view:n,element:l,sheet:a,gridStyle:i,commands:m}=e,h=i.body??{},s=a.getView(),{overlays:p}=Pr({element:l,sheet:a,sheetView:s,commands:m,copyForegroundColor:i.selection.strokeFill,copyBackgroundColor:h.fill,cutForegroundColor:i.selectionRemove.strokeFill,cutBackgroundColor:h.fill});return tt(a?.getSelection(),{onChange(b){}}),o.useEffect(()=>{n?.getStage()},[n?.getStage()]),p&&n?p(n):null})),ai="_sheet-selection_12wyx_5",si={key:"dragCut",description:"Drag selection to move cell contents.",cursor:"move"},ci={key:"dragCutInsert",description:"Drag selection to insert cell contents.",cursor:"copy"},di={key:"dragCopy",description:"Drag selection to copy cell contents."},ui={key:"dragCopyInsert",description:"Drag selection to insert copied cell contents.",cursor:"move"},er=(e,t)=>t.ctrlKey&&t.shiftKey?ui:t.ctrlKey?di:t.shiftKey?ci:si,gi={key:"fill",description:"Drag selection to extend series or fill.",cursor:"crosshair"},hi=o.memo(o.forwardRef((e,t)=>{const{view:n,commands:l,className:a,onFirstRender:i,onShowTooltip:m,onCloseTooltip:h,sheet:s,gridRef:p,gridStyle:b,isActive:v,editingCoords:u,...I}=e,x=n?.getBounds(),F=r.useCallbackRef(m,[m]),z=r.useCallbackRef(h,[h]),[K,V]=o.useState(()=>s?.getSelection().getCoords()),M=r.useCallbackRef(B=>{ge.CoordUtils.isEqualSelectionCoords(B,K)||s&&s.getSelection().updateCoords(B)},[s,K]),L=r.useEditMode(),f=o.useRef(null),[A,S]=o.useState(s?.getProtection().isLocked()),[W,D]=o.useState(s?.getView().getMovableSelection().length>0),O=r.ReactUtils.detectIt().primaryInput==="touch",_=!O&&v,de=u??L.getMode()?.args?.stateAndCoords?.coords??null,U=de!==null||W,H=r.useCallbackRef(B=>{const ne=ge.CoordUtils.cellToRange(B);if(s.isClosed())return ne;const me=s.getRange(ne,{ignoreHidden:!0}).getMerges();return me.length===0?ne:me[0]},[s]),R=r.useCallbackRef((B,ne,me,ae,ze,le)=>{const fe=s.getSelectedRange().getExtended(ae,B).getCoords();switch(ae){case d.IRange.Direction.Up:return fe.rowStart;case d.IRange.Direction.Down:return fe.rowEnd;case d.IRange.Direction.Left:return fe.colStart;case d.IRange.Direction.Right:return fe.colEnd}},[s]),$=r.useCallbackRef(()=>{const B=s.getUsedRange()?.getCoords(),ne=s.getRowHeaders().getUsedRange()?.getCoords(),me=s.getColumnHeaders().getUsedRange()?.getCoords();return{...B,colEnd:Math.max(B?.colEnd??0,me?.max??0),rowEnd:Math.max(B?.rowEnd??0,ne?.max??0)}},[s]),k=r.useCallbackRef((B,ne)=>s.getRowHeaders().hiddenHeadersAt(B,ne),[s]),P=r.useCallbackRef((B,ne)=>s.getColumnHeaders().hiddenHeadersAt(B,ne),[s]),ee=r.useCallbackRef(B=>s.getRange(B,{ignoreHidden:!0}).getMerges(),[s]),re=r.useCallbackRef(B=>{s?.getSelection().setAdjusting(B)},[s]),Re=r.useCallbackRef(async()=>{s?.getSelection().setAdjusting(null),L.getMode()?.key==="formatPainter"&&(await l?.getCommand("pasteFormats")?.execute({}),L.setMode(null))},[L,K,s,l]),he=o.useMemo(()=>{const B=L.getMode();return B?.key==="cut"||B?.key==="copy"},[L]);tt(s?.getView(),{onMovableSelectionChange:()=>{D(s.getView().getMovableSelection().length>0)}}),tt(s?.getSelection(),{onChange(B){const ne=s.getSelection().getCoords();V(ne)}}),tt(s,{onProtectionChange:()=>{S(s.getProtection().isLocked())}});const{body:De={}}=b||{},Fe=r.useNotifier(),ve=n.getLayout(),ke=!(_&&K.ranges.length<=1&&de===null&&!A&&(!L.getMode()||he)),{cursor:$e,overlay:te,onPointerDown:X}=ut.useSelection({gridRef:p,commands:l,layout:ve,getCellCoordsAsRangeCoords:H,selection:K,fillHandleBorderColor:De.fill,selectionBackgroundColor:v?b.selection.fill:b.selectionInactive.fill,selectionBorderColor:v?b.selection.strokeFill:b.selectionInactive.strokeFill,selectionRemoveBackgroundColor:v?b.selectionRemove.fill:b.selectionInactive.fill,selectionRemoveBorderColor:v?b.selectionRemove.strokeFill:b.selectionInactive.strokeFill,disableFillDrag:ke,disableMoveDrag:O||!(v&&K.ranges.length<=1&&de===null&&!A),disableTouchSelection:U,onSelectionChange:M,onSelectionDragStart:re,onSelectionDragEnd:Re,onMoveDragStart:(B,ne,me)=>{L.setMode(er(0,me))},onMoveDragUpdate:(B,ne,me)=>{L.setMode(er(0,me))},onMoveDragEnd:(B,ne)=>{L.setMode(null)},onMoveDragDone:async(B,ne,me)=>{if(ge.CoordUtils.isEqualRanges(B,ne))return;const ae=s.getRange(ne);if(Fe?.showOptions){const be=ae.getDifferences(B);let He=!1;const C=be.getCount();for(let Pe=0;!He&&Pe<C;Pe++)He=be.at(Pe).isContentful();if(He&&await Fe?.showOptions({title:"Confirm",description:"There is already data here. Do you want to replace it?",options:["Replace","Cancel"],defaultOption:"Replace"})!=="Replace")return}const ze=!me.ctrlKey,le=me.shiftKey,fe=le?ze?"Insert Moved Cells":"Insert Copied Cells":ze?"Move Cells":"Copy Cells",Ee=await Fe?.showBusy?.(fe);try{const be=s.getRange(B);await ae.doBatch(async()=>{le?await ae.insertFrom(B,{isCut:ze,undoRange:be}):await ae.copyFrom(B,{isCut:ze,undoRange:be}),be.autoFit({skipCustomSize:!0,orientations:d.IRange.Orientations.Row,minContent:!0}),ae.autoFit({skipCustomSize:!0,orientations:d.IRange.Orientations.Row,minContent:!0})},{description:fe,autoSelect:!0})}catch(be){Fe?.showError?.(be)}finally{Ee?.()}},contentfulCellFinder:R,hiddenRowsAt:k,hiddenColumnsAt:P,mergedRanges:ee,getDataCoords:$,canSelectionSpanMergedCells:B=>{const ne=s.getRange(B);return ne.isEntireColumns()||ne.isEntireRows()},onFill:async(B,ne)=>{const me="Auto Fill",ae=await Fe?.showBusy?.(me);try{await s.doBatch(()=>{s.getRange(B).autoFill(ne),s.getRange(ne).autoFit({orientations:d.IRange.Orientations.Row,skipCustomSize:!0,minContent:!0})},{description:me,autoSelect:!0})}catch(ze){Fe?.showError?.(ze)}finally{f.current=null,ae?.()}},onFillPreview:(B,ne,me)=>{if(p.current&&F){L.setMode(gi);try{f.current?.direction!==me&&(f.current=null,s.getRange(B).autoFill(ne,{previewOnly:C=>{f.current={callback:C,direction:me}}}));const ae=f.current?.callback?.(ne);if(!ae||ae.isEmpty())return;const ze=ae.toText();if(!ze)return;const le=ge.CoordUtils.cellToRange(ae.getCoords()),fe=n.getRelativePointFromClient(0,0);let Ee=0,be=0,He=r.ToolTipPlacement.Bottom;if(me===d.IRange.Direction.Down){Ee=ve.getColOffset(le.colEnd+1)-fe.x;const C=ve.getRowOffset(le.rowEnd),Pe=ve.getRowOffset(le.rowEnd+1);be=Pe-(Pe-C)/2-fe.y,He=r.ToolTipPlacement.Right}else if(me===d.IRange.Direction.Right){be=ve.getRowOffset(le.rowEnd+1)-fe.y;const C=ve.getColOffset(le.colEnd),Pe=ve.getColOffset(le.colEnd+1);Ee=Pe-(Pe-C)/2-fe.x,He=r.ToolTipPlacement.Bottom}else if(me===d.IRange.Direction.Up){Ee=ve.getColOffset(le.colEnd+1)-fe.x;const C=ve.getRowOffset(le.rowStart),Pe=ve.getRowOffset(le.rowStart+1);be=Pe-(Pe-C)/2-fe.y,He=r.ToolTipPlacement.Right}else if(me===d.IRange.Direction.Left){be=ve.getRowOffset(le.rowEnd+1)-fe.y;const C=ve.getColOffset(le.colStart),Pe=ve.getColOffset(le.colStart+1);Ee=Pe-(Pe-C)/2-fe.x,He=r.ToolTipPlacement.Bottom}F({anchor:{x:Ee,y:be},display:ze,placement:He})}catch(ae){Fe?.showError?.(ae)}}},onFillDone:()=>{f.current=null,L.setMode(null),z?.()}}),ce=r.useCallbackRef(B=>{X(r.ReactUtils.createSyntheticEvent(B))},[X,de]);o.useEffect(()=>{const B=n?.getStage();if(B)return B.addEventListener("pointerdown",ce),()=>{B.removeEventListener("pointerdown",ce)}},[n?.getStage()]);const Ae=r.useImperativeElement(t,()=>({}),[]),Ce=o.useRef(null);return c.jsx("div",{className:st(a,"sheet-selection",ai),style:{position:"absolute",width:x?.width,height:x?.height,overflow:"hidden",pointerEvents:"none",willChange:"none"},ref:Xt([Ae,Ce]),...I,children:te(n)})})),Fn=Object.freeze({x:0,y:0,width:0,height:0}),mi={fireOnModelChange:!1},fi=o.memo(o.forwardRef((e,t)=>{const{children:n,view:l,movable:a,onRefLoad:i,onRefUnload:m,onHide:h,onShow:s,onUnFocus:p,isDragging:b,updateFrameBounds:v,dragStart:u,style:I,disabled:x,renderMovable:F,...z}=e,[K,V]=o.useState(Fn),[M,L]=o.useState(null),[f,A]=o.useState(!1),S=o.useRef(null);o.useLayoutEffect(()=>{if(a.isClosed())return;const D=a.getBounds();if(!D)return;const O=l.toViewBounds(D);V(O??Fn),v(O??Fn)},[l?.getBounds()]),tt(a,{onBoundsChange:D=>{const O=D.getBounds();if(!O)return;const _=l.toViewBounds(O);V(_??Fn),v(_)},onSelectionChange:()=>{const D=ge.CommonUtils.hasFocus(S.current,!0);!f&&!D||a.isSelected()||p()}}),tt(a,{onRequestFocus:()=>ge.CommonUtils.whenFocus(S.current,!0)},mi),o.useEffect(()=>{const D=S.current;return i(D),()=>{m(D)}},[]);const W=o.useMemo(()=>{if(!K)return null;let{width:D,height:O}=K;return F({view:l,movable:a,disabled:x,isDragging:b,style:{position:"relative",left:0,top:0,width:D,height:O},onHide:h,onShow:s})},[l,a,K.width,K.height,x,b]);return c.jsx("div",{className:"movable",tabIndex:0,ref:Xt([S,t]),style:{display:"flex",alignItems:"stretch",justifyContent:"stretch",position:"absolute",maxWidth:"auto",maxHeight:"auto",minWidth:"auto",minHeight:"auto",left:K.x,top:K.y,width:K.width,height:K.height,...I},onMouseDown:async D=>{const O=D.shiftKey||D.ctrlKey,_=a.isSelected(),de=D.currentTarget;O&&_?a.unselect():(_&&!O||await a.select({addToSelection:O}),u(D.nativeEvent,de),de.focus())},onFocus:D=>{D.relatedTarget&&!M&&L(D.relatedTarget),A(!0)},onBlur:D=>{M&&!S?.current?.contains(D.relatedTarget)&&L(null),D.relatedTarget&&A(!1)},...z,children:W})})),pi="_movable-area_314c6_5",jr=o.memo(o.forwardRef((e,t)=>{const{view:n,movables:l,movablesView:a,renderMovable:i,transactional:m,onUnFocus:h,onFocus:s,disabled:p=!1,disableDrag:b=!1,disableResize:v=!1,className:u,style:I,renderDirections:x=["nw","n","ne","w","e","sw","s","se"],onFirstRender:F,...z}=e,K=n.getBounds(),V=r.useCallbackRef(F,[F]),M=r.useCallbackRef(h,[h]),L=r.useCallbackRef(s,[s]),[f,A]=o.useState([]),[S,W]=o.useState(!1),[D,O]=o.useState(!1),_=o.useRef(!0),de=o.useRef(new Map),U=o.useRef(new Map),H=o.useRef(new Map),R=o.useRef(new Map),$=o.useRef(new Map),k=o.useRef({onRequestFocus:ie=>(ne(ie),null)}),P=o.useRef(null),ee=o.useRef(null),re=o.useRef(null),[Re,he]=o.useReducer(ie=>ie+1,0);o.useLayoutEffect(()=>{he()},[n,l]),tt(l,{onCollectionChange:()=>{const ie=l.getItems({address:n.getVisibleRangeCoords(),ignoreHidden:!0}),Me=$.current;Me.forEach(Ie=>{Ie()}),Me.clear();const Le=k.current;for(let Ie=0;Ie<ie.length;Ie++){const xe=ie[Ie];if(xe.isClosed())continue;const N=xe.addListeners(Le);Me.set(xe,N)}he()},onInvalidated:()=>{he()}}),tt(a,{onMovableSelectionChange(ie){Fe(),he()}});const De=o.useCallback((ie,Me)=>{const Le=H.current.get(ie);re.current&&(re.current.getTargets().forEach(Ie=>{if(Ie===Le)return Ie.style.left=Me.x+"px",Ie.style.top=Me.y+"px",Ie.style.width=Me.width+"px",void(Ie.style.height=Me.height+"px")}),re.current.updateRect())},[]),Fe=()=>{const ie=[],Me=a.getMovableSelection();Me.forEach(Le=>{const Ie=H.current.get(Le);Ie&&Me.indexOf(Le)!==-1&&ie.push(Ie)}),A(Le=>ge.CommonUtils.isEqualArrays(Le,ie)?Le:ie)},ve=o.useRef(null),ke=o.useRef(null),$e=o.useMemo(()=>(ke.current||(ke.current=new Promise(ie=>{ve.current=ie})),ke.current),[]),te=o.useRef(null),X=r.useCallbackRef(async(ie,Me)=>{te.current=Me,await(async()=>!(!await $e.then()||!re.current))()&&te.current===Me&&re.current.dragStart(ie,Me)},[f]),[ce,Ae]=o.useState(!1),Ce=o.useRef(null),B=o.useRef(null),ne=r.useCallbackRef(async(ie=null)=>{if(ie||(ie=a.getMovableSelection()[0]),!ie)return M?.(),!1;const Me=H.current.get(ie);Me?(await ge.CommonUtils.whenFocus(Me),Me.focus(),B.current=Me,Ce.current=null):Ce.current=ie},[a]);o.useEffect(()=>{ce&&f.length>0&&B.current!==f[0]&&ne(),_.current&&(V?.(),_.current=!1)},[f]);const me=o.useMemo(()=>{const ie=l.getItems({address:n.getVisibleRangeCoords(),ignoreHidden:!0});if(ie.length===0&&de.current.size===0)return null;const Me=(Y,j,Z,qe=!0)=>{const g=Y.isSelected(),T={tabIndex:Z,view:n,movable:Y,onRefLoad:q=>{Ce.current===Y&&(q.focus(),B.current=q,Ce.current=null),H.current.set(Y,q),U.current.set(q,Y),j.rendered=!0,Fe()},onRefUnload:q=>{H.current.delete(Y),U.current.delete(q),j.rendered=!1,Fe()},onUnFocus:M,onHide:q=>{j.onHide=q},onShow:q=>{j.onShow=q},isDragging:g&&(D||S),disabled:p,renderMovable:i,updateFrameBounds:q=>{De(Y,q)},dragStart:X,onMouseUp:()=>{if(te.current=null,ee.current){W(!1),O(!1);let q=!1;R.current?.forEach(y=>{ge.CommonUtils.isEqualBounds(y.movable.getBounds(),y.startBounds)||(q=!0)}),q?ze():le()}},style:{opacity:qe?S&&g?.7:void 0:0,zIndex:S&&g?Y.getZIndex()+ie.length:void 0,pointerEvents:qe?void 0:"none",cursor:D&&g?"grabbing":p||b?"initial":"move",boxShadow:!g||D&&!S?void 0:"1px 1px 2px 2px rgba(0,0,0,.15)"}};return c.jsx(fi,{...T},`movable-${Y.getUUID()}`)},Le=de.current,Ie=new Map,xe=[];for(let Y=0;Y<ie.length;Y++){const j=ie[Y];if(j.isClosed())continue;let Z=Le.get(j);Z||(Z={frame:null,shown:null,onShow:null,onHide:null,rendered:!1,doShow:(qe,g)=>{if(!g||g.shown===!0)return;g.shown=!0;const T=++g.visibilityRequestId;requestAnimationFrame(()=>{const q=de.current.get(qe);q&&T===g.visibilityRequestId&&(g.onShow?.(qe),q.shown=!0)})},doHide:async(qe,g)=>{if(!g||g?.shown===!1)return;g.shown=!1;const T=++g.visibilityRequestId,q=await Promise.resolve(g.onHide?.(qe));T===g.visibilityRequestId&&q!==!1&&(g.shown=!1,de.current.delete(qe),he())},visibilityRequestId:0}),Z.frame=Me(j,Z,Y,!0),xe.push(Z.frame),Z.doShow(j,Z),Le.delete(j),Ie.set(j,Z)}const N=[];return a.getMovableSelection().forEach(Y=>{const j=Le.get(Y);j&&(j.frame=Me(Y,j,-1,!1),N.push(j.frame),Le.delete(Y),Ie.set(Y,j))}),Le.forEach((Y,j)=>{Y.frame=Me(j,Y,-1,!1),N.push(Y.frame),Y.doHide(j,Y),Le.delete(j),Ie.set(j,Y)}),de.current=Ie,Fe(),[...N,...xe]},[Re,n,i,p,b,v,S,D]),ae=r.useCallbackRef((ie,Me)=>{const Le=`${Me} ${f.length===1?d.TextUtils.capitalize(U.current?.get(f[0]).getContent().getType()):"Drawings"}`;ee.current&&(console.warn(`Transaction ${ee.current.getDescription()} is being replaced by ${Le}`),ee.current.rollback(),ee.current=null),ee.current=m.beginCommit({description:Le}),R.current.clear();for(let Ie=0;Ie<f.length;Ie++){const xe=f[Ie],N=U.current?.get(xe);N?R.current.set(xe,{movable:N,startBounds:n.toViewBounds(N.getBounds())}):console.warn("invalid element",N)}},[m,n,f]),ze=o.useCallback(()=>{if(!ee.current)return;const ie=[];R.current?.forEach(Me=>{ie.push(Me.movable)}),ee.current.commit({viewAfter:{view:a,movableSelection:ie}}),R.current.clear(),ee.current=null},[]),le=o.useCallback(()=>{ee.current&&(ee.current.rollback(),ee.current=null)},[]),fe=o.useRef(null);o.useEffect(()=>{fe.current&&(fe.current.onscroll=ie=>{ie.preventDefault(),ie.srcElement.scrollTop=0,ie.srcElement.scrollLeft=0})},[fe.current]);const Ee=r.useImperativeElement(t,()=>({isMovableArea:()=>!0,focusMovable:ne,focus:()=>{ne()}}),[a]),[be,He]=o.useState(null),C=o.useRef(!1),Pe=o.useRef(!1),Be=o.useRef(!1);o.useEffect(()=>{if(p||f.length===0||Be.current||C.current)return;if(Pe.current)return void requestAnimationFrame(()=>{re.current&&P.current&&re.current.refTargets.length>0&&(Be.current=!0,ve.current?.(!0)),A([...f])});C.current=!0;const ie=o.lazy(async()=>{try{const Me=await Promise.resolve().then(()=>require("./CWsZHjHeJ3RGU4H5.cjs"));return C.current=!1,Pe.current=!0,A([...f]),Me}catch(Me){return console.warn(Me),ve.current?.(!1),null}});He(ie)},[f,p,b,v]);const Qe=o.useMemo(()=>!be||p?null:c.jsx(o.Suspense,{children:c.jsx(be,{className:st({dragging:S||D,resizing:S,moving:D}),container:null,ref:re,target:re.current?f:[],draggable:!p&&!b,resizable:!p&&!v,individualGroupable:!0,edgeDraggable:!1,throttleDrag:2,throttleResize:2,origin:!1,keepRatio:!1,renderDirections:x,onResizeStart:ie=>{ae(ie.target,"Resize")},onResize:ie=>{if(!ee.current)return ie.stopDrag(),void he();W(!0);const Me=ie.direction[0]!==0&&ie.direction[1]!==0;let Le=0,Ie=0;for(let xe=0;xe<f.length;xe++){const N=f[xe],Y=R.current.get(N),j=U.current.get(N);if(!Y||!j){console.warn("invalid element");continue}let Z=ie.dist[0],qe=ie.dist[1],g=ie.drag.dist[0],T=ie.drag.dist[1],q=Y.startBounds.width,y=Y.startBounds.height;xe===0?(Le=q,Ie=y):(Z*=q/Le,g*=q/Le,qe*=y/Ie,T*=y/Ie);const w={...Y.startBounds};if(w.width=Math.max(0,q+Z),w.height=Math.max(0,y+qe),ie.direction[0]===-1&&(w.width=Math.max(0,Math.min(Y.startBounds.x+q,q-g))),ie.direction[1]===-1&&(w.height=Math.max(0,Math.min(Y.startBounds.y+y,y-T))),Me&&(j.isLockAspectRatio()||ie.inputEvent?.shiftKey)){const E=q/y,G=w.width/w.height;G>E?w.height=w.width/E:G<E&&(w.width=w.height*E)}ie.direction[0]===-1&&(w.x=Math.max(0,Math.min(Y.startBounds.x+q,Y.startBounds.x+q-w.width))),ie.direction[1]===-1&&(w.y=Math.min(Y.startBounds.y+y,Y.startBounds.y+y-w.height)),Y.movable.setBounds(n.toAbsoluteBounds(w))}},onResizeEnd:ie=>{W(!1),ze()},onDragStart:ie=>{ae(ie.target,"Move")},onDrag:ie=>{if(!ee.current)return ie.stopDrag(),void he();O(!0);for(let Me=0;Me<f.length;Me++){const Le=f[Me],Ie=R.current.get(Le);Ie?Ie.movable.setBounds(n.toAbsoluteBounds({...Ie.startBounds,x:Ie.startBounds.x+ie.translate[0],y:Ie.startBounds.y+ie.translate[1]})):console.warn("invalid element")}},onDragEnd:ie=>{},onMouseUp:ie=>{}})}),[Re,be,f,n,p,b,v,S,D]);return c.jsx("div",{className:st(u,"movable-area",pi),style:{width:K.width,height:K.height,...I,position:"absolute",overflow:"hidden",willChange:"transform"},ref:Xt([Ee,fe]),...z,children:c.jsx("div",{className:"movable-scroll",style:{position:"absolute",cursor:"initial",left:0,top:0,width:K.width,height:K.height},...z,children:c.jsxs("div",{ref:P,style:{position:"absolute",pointerEvents:"auto"},onFocus:ie=>{L?.(),Ae(!0)},onBlur:ie=>{Ae(!1)},onKeyDownCapture:ie=>{if(ie.isDefaultPrevented())return;const Me=ie.nativeEvent.ctrlKey,Le=ie.nativeEvent.altKey,Ie=ie.nativeEvent.shiftKey;if(ie.which===r.KeyCodes.Escape){const Z=a.getMovableSelection();let qe=[...Z];return f.forEach(g=>{if(qe.length===0)return;const T=U.current.get(g);let q=qe.indexOf(T);qe.splice(q,1)}),qe.length!==Z.length&&a.selectMovables(qe),qe.length===0&&M?.(),void ie.preventDefault()}const xe=.1,N=Z=>{l.updateSelected(qe=>{qe.setRotation(qe.getRotation()+Z)},"Rotate")},Y=(Z,qe=!0)=>{l.updateSelected(g=>{const T=g.getBounds();let q=1+Z;qe||(q=1/q);const y=Math.sqrt(Math.pow(T.width,2)+Math.pow(T.height,2)),w=Math.atan2(T.height,T.width),E=q*y;if(E<10)return;const G=E*Math.cos(w),oe=E*Math.sin(w),se={x:T.x+(T.width-G)/2,y:T.y+(T.height-oe)/2,width:G,height:oe};g.setBounds(se)},"Resize")},j=Z=>{l.updateSelected(qe=>{const g=qe.getBounds(),T={x:g.x+(Z.x??0),y:g.y+(Z.y??0),width:g.width+(Z.width??0),height:g.height+(Z.height??0)};qe.setBounds(T)},"Nudge")};if(ie.which===r.KeyCodes.Delete)l.updateSelected(Z=>{Z.delete()},"Delete"),ie.preventDefault();else if(ie.key==="a"&&Me){const Z=a.getMovableSelection();a.selectMovables(l.getItems(),!0),a.selectMovables(Z,!0),ie.preventDefault()}else ie.key==="ArrowLeft"?(Ie?Y(xe,!1):Le?N(-10):j({x:Me?-10:-1}),ie.preventDefault()):ie.key==="ArrowRight"?(Ie?Y(xe,!0):Le?N(10):j({x:Me?10:1}),ie.preventDefault()):ie.key==="ArrowUp"?(Ie?Y(xe,!0):j({y:Me?-10:-1}),ie.preventDefault()):ie.key==="ArrowDown"&&(Ie?Y(xe,!1):j({y:Me?10:1}),ie.preventDefault())},children:[me,Qe]})})})})),$t=e=>{let t=Number.MAX_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER,l=0,a=0;for(let i=0;i<e.length;i++){const m=e[i].getBounds();t=Math.min(m.x,t),n=Math.min(m.y,n),l=Math.max(m.x+m.width,l),a=Math.max(m.y+m.height,a)}return{x:t,y:n,width:l-t,height:a-n}},tr=(e,t=!0)=>{const n=[],l=t?"x":"y",a=t?"y":"x",i=t?"width":"height";let m=0,h=Number.MAX_SAFE_INTEGER,s=0;for(let v=0;v<e.length;v++){const u=e[v],I=u.getBounds();m+=I[i],h=Math.min(I[l],h),s=Math.max(I[l]+I[i],s),n.push({bounds:I,movable:u})}const p=(s-h-m)/(e.length-1);n.sort((v,u)=>{const I=v.bounds[l],x=u.bounds[l];return I!==x?I-x:v.bounds[a]-u.bounds[a]});const b=new Map;b.set(n[0].movable,n[0].bounds);for(let v=1;v<n.length-1;v++){const u=n[v-1].bounds,I={...n[v].bounds};I[l]=u[l]+u[i]+p,n[v].bounds=I,b.set(n[v].movable,I)}return b.set(n[n.length-1].movable,n[n.length-1].bounds),b};function Or(e){const{movables:t,movablesView:n,transactional:l,commands:a,target:i,onRepeatCommandChange:m}=e,h=r.useNotifier(),s=r.useEditMode();o.useRef(s.getMode()).current=s.getMode();const p=r.useCallbackRef(async(M,L,f=null,A=!0)=>{const S=async()=>{const W=await Promise.resolve(h?.showBusy?.(M.label()));try{await L();const D=f??M?.label?.();if(m){let O=null;M&&D!==!1&&(O=new r.SimpleCommand(M.key(),i,{label:D,description:D},S)),m(O)}W?.(),A&&s.setMode(null)}catch(D){W?.(),h?.showError?.(D)}};await S()},[m,h]),[b,v]=o.useReducer(M=>M+1,0),u=r.useCallbackRef((M,L,f)=>{if(!n)return;const A=n.getMovableSelection();if(A.length===0)return;let S="Drawings";if(A.length===1){const D=A[0];S=d.TextUtils.capitalize(D.getContent().getType())??"Drawing"}const W=`${M.label()} ${S}`;p(M,()=>{let D=null;l&&(D=l.beginCommit(W));const O=n.getMovableSelection();if(O.length===0)return;const _=f?.(O);for(let de=0;de<O.length;de++){const U=O[de];L(U,_)}D?.commit()})},[n,l]),[I,x]=o.useState(n.getMovableSelection()[0]??null),[F,z]=o.useState(!I||I?.isProtected()),K=o.useMemo(()=>[new r.Command("moveToFront",i,{label:"Bring to Front",description:"Move to the front of all of the other drawings.",icon:"DrawToFront",shortcut:{key:"BracketRight",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){u(this,M=>{M.moveToFront()})}),new r.Command("moveForward",i,{label:"Bring Forward",description:"Move forward one layer in the z order.",icon:"DrawMoveForward",shortcut:{key:"BracketRight",modifiers:[r.KeyModifiers.Ctrl]}},function(){u(this,M=>{M.moveForward()})}),new r.Command("moveToBack",i,{label:"Send to Back",description:"Move to the back of all of the other drawings.",icon:"DrawToBack",shortcut:{key:"BracketLeft",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){u(this,M=>{M.moveToBack()})}),new r.Command("moveBackward",i,{label:"Send Backward",description:"Move backwards one layer in the z order.",icon:"DrawMoveBackward",shortcut:{key:"BracketLeft",modifiers:[r.KeyModifiers.Ctrl]}},function(){u(this,M=>{M.moveBackward()})}),new r.Command("toggleLockAspectRatio",i,{label:"Lock Aspect Ratio",description:"Toggle whether the aspect ratio should be maintained when resizing from corners.",icon:"DrawAspect"},function(){u(this,M=>{M.setLockAspectRatio(!M.isLockAspectRatio())})}),new r.Command("formatAnchorTypeTwoCell",i,{label:"Move and size with cells",description:"Set your drawing to move and resize when underling sheet resizes.",icon:"DrawResize"},function(){u(this,M=>{M.setAnchorType(d.IAnchored.Type.TwoCell)})}),new r.Command("formatAnchorTypeOneCell",i,{label:"Move but don't size with cells",description:"Set your drawing to only move when underling sheet resizes.",icon:"DrawResize"},function(){u(this,M=>{M.setAnchorType(d.IAnchored.Type.OneCell)})}),new r.Command("formatAnchorTypeAbsolute",i,{label:"Don't move or size with cells",description:"Set your drawing to never move or resize when underling sheet resizes.",icon:"DrawResize"},function(){u(this,M=>{M.setAnchorType(d.IAnchored.Type.Absolute)})}),new r.Command("formatDrawAlignLeft",i,{label:"Align Left",description:"Align the selected drawings to the left.",icon:"DrawAlignLeft"},function(){u(this,(M,L)=>{M.setBounds({x:L.x})},$t)}),new r.Command("formatDrawAlignCenter",i,{label:"Align Center",description:"Align the selected drawings vertically relative to each other.",icon:"DrawAlignCenter"},function(){u(this,(M,L)=>{M.setBounds({x:(L.width-M.getBounds().width)/2+L.x})},$t)}),new r.Command("formatDrawAlignRight",i,{label:"Align Right",description:"Align the selected drawings to the right.",icon:"DrawAlignRight"},function(){u(this,(M,L)=>{M.setBounds({x:L.width-M.getBounds().width+L.x})},$t)}),new r.Command("formatDrawAlignTop",i,{label:"Align Top",description:"Align the selected drawings to the top.",icon:"DrawAlignTop"},function(){u(this,(M,L)=>{M.setBounds({y:L.y})},$t)}),new r.Command("formatDrawAlignMiddle",i,{label:"Align Middle",description:"Align the selected drawings horizontally relative to each other.",icon:"DrawAlignMiddle"},function(){u(this,(M,L)=>{M.setBounds({y:(L.height-M.getBounds().height)/2+L.y})},$t)}),new r.Command("formatDrawAlignBottom",i,{label:"Align Bottom",description:"Align the selected drawings to the bottom.",icon:"DrawAlignBottom"},function(){u(this,(M,L)=>{M.setBounds({y:L.height-M.getBounds().height+L.y})},$t)}),new r.Command("formatDrawDistributeHorz",i,{label:"Distribute Horizontally",description:"Distribute the selected drawings horizontally with equal spacing between each.",icon:"DrawDistributeHorz"},function(){u(this,(M,L)=>{M.setBounds(L.get(M))},M=>tr(M))}),new r.Command("formatDrawDistributeVert",i,{label:"Distribute Vertically",description:"Distribute the selected drawings vertically with equal spacing between each.",icon:"DrawDistributeVert"},function(){u(this,(M,L)=>{M.setBounds(L.get(M))},M=>tr(M,!1))}),new r.Command("formatDrawFlipHorz",i,{label:"Flip Horizontally",description:"Flip the selected drawings horizontally."}),new r.Command("formatDrawFlipVert",i,{label:"Flip Vertically",description:"Flip the selected drawings vertically."}),new r.Command("formatDrawGroup",i,{label:"Group",description:"Group the selected drawings into a single drawing.",icon:"DrawGroup"}),new r.Command("formatDrawUngroup",i,{label:"Ungroup",description:"Break the group of a drawing into individual drawings.",icon:"DrawUngroup"}),new r.Command("formatDrawSwapShapes",i,{label:"Swap Shapes",description:"Swap the positions of the swap."}),new r.Command("formatDrawSwapShapesHorz",i,{label:"Swap Shapes Horizontally",description:"Swap the positions of the swap horizontally."}),new r.Command("formatDrawSwapShapesVert",i,{label:"Swap Shapes Vertically",description:"Swap the positions of the swap vertically."})],[n,I]);o.useEffect(()=>{},[s]);const V=o.useMemo(()=>{let M=null;return M=a?a.createChildGroup(i,"movable",!1):new r.CommandGroup(i,"movable"),M.addCommands(K,!0),M},[a,K]);return tt(I,{onAnyChange:()=>{V.getCommand("formatAnchorTypeTwoCell").update({state:I?.getAnchorType()===d.IAnchored.Type.TwoCell}),V.getCommand("formatAnchorTypeOneCell").update({state:I?.getAnchorType()===d.IAnchored.Type.OneCell}),V.getCommand("formatAnchorTypeAbsolute").update({state:I?.getAnchorType()===d.IAnchored.Type.Absolute}),V.getCommand("formatAnchorTypeAbsolute").update({state:I?.getAnchorType()===d.IAnchored.Type.Absolute}),V.getCommand("toggleLockAspectRatio").update({state:I?.isLockAspectRatio()})},onProtectedChange:M=>{z(M.isProtected())},onDelete:()=>{}}),tt(n,{onMovableSelectionChange:()=>{const M=n.getMovableSelection()[0]??null;x(M),z(!M||M.isProtected()),v()}}),tt(t,{onCollectionChange:()=>{v()}}),o.useEffect(()=>{const M={disabled:F};V.getCommand("formatAnchorTypeTwoCell").update(M),V.getCommand("formatAnchorTypeOneCell").update(M),V.getCommand("formatAnchorTypeAbsolute").update(M),V.getCommand("toggleLockAspectRatio").update(M);const L=t.getCount(),f=n.getMovableSelection(),A=F||L<=1||f.length===0;let S={disabled:A},W=S;if(!A&&f.length===1){const _=f[0];_.getZIndex()===0&&(S={disabled:!0}),_.getZIndex()===L-1&&(W={disabled:!0})}V.getCommand("moveToFront").update(W),V.getCommand("moveForward").update(W),V.getCommand("moveToBack").update(S),V.getCommand("moveBackward").update(S);const D={disabled:F||f.length<=1};V.getCommand("formatDrawAlignLeft").update(D),V.getCommand("formatDrawAlignCenter").update(D),V.getCommand("formatDrawAlignRight").update(D),V.getCommand("formatDrawAlignTop").update(D),V.getCommand("formatDrawAlignMiddle").update(D),V.getCommand("formatDrawAlignBottom").update(D),V.getCommand("formatDrawFlipHorz").update(D),V.getCommand("formatDrawFlipVert").update(D),V.getCommand("formatDrawGroup").update(D),V.getCommand("formatDrawUngroup").update(D),V.getCommand("formatDrawSwapShapes").update(D),V.getCommand("formatDrawSwapShapesHorz").update(D),V.getCommand("formatDrawSwapShapesVert").update(D);const O={disabled:F||f.length<=2};V.getCommand("formatDrawDistributeHorz").update(O),V.getCommand("formatDrawDistributeVert").update(O)},[b,F,b]),V}const vi=o.memo(o.forwardRef((e,t)=>{const{children:n,disabled:l,description:a,view:i,isDragging:m,onHide:h,onShow:s,...p}=e;o.useEffect(()=>{},[a]);const b=r.useImperativeElement(t,()=>({isEmptyFrame:()=>!0}),[]),[v,{height:u,width:I}]=Ot();return c.jsx("div",{...p,ref:Xt([b,v]),children:c.jsx("div",{className:"chart-editor",style:{width:"100%",height:"100%",border:"var(--sxl-app-color-grey, grey) solid 1px",backgroundColor:"var(--sxl-app-color-background, white)",backgroundImage:"var(--sxl-app-image-background)",alignItems:"center",justifyContent:"center",zoom:i.getZoom(),display:"flex",position:"relative",filter:l?"blur(1px)":void 0,boxShadow:m?"1px 1px 2px var(--sxl-app-color-shadow, rgba(0,0,0,.15))":void 0},children:c.jsx("div",{style:{textAlign:"center"},children:a})})})})),Ci=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:l,movableProps:a,renderMovable:i,commands:m,target:h,onRepeatCommandChange:s}=e,p=Or({movables:l.getMovables(),movablesView:l?.getView(),transactional:l,onRepeatCommandChange:s,commands:m,target:h});o.useEffect(()=>{n?.getStage()},[n?.getStage()]);const b=o.useMemo(()=>c.jsx(jr,{ref:t,view:n,movables:l.getMovables(),disableResize:!l.getProtection().isObjectsAllowed(),disableDrag:!l.getProtection().isObjectsAllowed(),movablesView:l.getView(),transactional:l,renderMovable:i,...a,onFocus:()=>{p.activate(),a?.onFocus?.()}},"movable-area"),[l,a,m,p]);return b&&n?b:null})),yi=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:l,gridStyle:a,getCellEditor:i,showProtectedError:m,setEditingCoords:h,commands:s}=e,p=r.useEditMode(),[b,v]=o.useState(null),[u,I]=o.useState(null),[x,F]=o.useState(null),[z,K]=o.useState(null),[V,M]=o.useState(null);o.useLayoutEffect(()=>{if(x===null)return K(null),void M(null);const k=()=>{const P=l.getRange(x).getCell(),ee=P.getStyle();let re,Re=ee.getFill()?.toCSS(a.body.darkMode);Re.background!=="none"&&Re.background!=="transparent"||(Re=l.getStyles().getNormal().getFill().toCSS(a.body.darkMode)),Re.background!=="none"&&Re.background!=="transparent"||(Re={background:a.body.fill}),K({style:Re}),P&&!P.getFormula()&&(re=P?.getRenderHorizontalAlignment()),M(re??r.HorizontalAlignment.Left)};return k(),l.getRange(x).addListener(()=>{k()})},[l,x,a?.body]);const L=r.useCallbackRef(()=>{let k=u.editState.dirty??"";if(u.editState.dirty!==void 0){const P=d.TextUtils.clampString(k);try{const ee=u.sheet.getRange(u.coords),re=`Typing '${P}' into ${ee.toString()}`;return ee.setValue(k,{description:re,autoFit:!0}),F(null),I(null),p.setMode(null),h(null),!0}catch(ee){throw ge.Notifier.error(new Error(`Unable to enter '${P}'.`,{cause:ee})),ee}}},[l,u]),f=r.useCallbackRef(k=>l.getRange(k).getCell().getExtrusions()??ge.CoordUtils.cellToRange(k),[l]),A=r.useCallbackRef(k=>{let P=d.IRange.Orientation.Row,ee=!1;k!==d.IRange.Direction.Up&&k!==d.IRange.Direction.Down||(P=d.IRange.Orientation.Column),k!==d.IRange.Direction.Left&&k!==d.IRange.Direction.Up||(ee=!0),l.getSelection().traverse(P,ee)},[l]),S=o.useCallback((k,P)=>{if(i)return i(k,P);if(!l)return null;const{ref:ee,...re}=k;return c.jsx(Tr,{ref:ee,...re,sheet:l,bodyStyle:a?.body,activeCoords:P,commands:s,onChangeEdit:Re=>{const he={sheet:l,coords:P,editState:Re};p.setMode(De=>({...De,description:he.editState.editMode?"Edit":"Enter",args:{...De?.args,stateAndCoords:he}}))},editState:u.editState})},[l,z,i,u,x]),{overlay:W,startEdit:D,submitEdit:O,cancelEdit:_,onKeyboardEventNative:de,onPointerEventNative:U}=ut.useKeyboardEditorOverlay({view:n,activeCoords:b,getCellEditor:S,canEdit:()=>{const k=l.getProtection();if(k.isReadOnly())return!1;const P=k.isLocked();return P&&m(),!P},onBeforeStartEdit:k=>{const P=Ir(()=>l.getRange(k).getCell()),ee={sheet:l,coords:k,editState:Object.freeze(P)};p.setMode({key:"edit",args:{stateAndCoords:ee}}),I(ee)},onStartEdit:k=>{F(k),h(k)},onSubmitEdit:L,onCancelEdit:k=>{F(null),I(null),p.setMode(null),h(null)},onDoneEdit:k=>{p.setMode(null)},onNavigate:A,containerProps:z,borderStrokeFill:a.selection?.strokeFill,borderStrokeWidth:l?.getSelection().getCoords().ranges?.length>1?1:2,alignment:V,getRangeCoords:f});tt(l.getSelection(),{onChange(k){v(l.getSelection().getCoords().cell)}});const H=r.useCallbackRef(k=>{U(k),x&&O()},[U,_,x]),R=o.useCallback(k=>{U(k)},[U]),$=o.useCallback(k=>{de(k)},[de]);return o.useEffect(()=>{const k=n?.getStage();if(k)return k.addEventListener("pointerdown",H),k.addEventListener("dblclick",R),k.addEventListener("keydown",$),()=>{k.removeEventListener("pointerdown",H),k.removeEventListener("dblclick",R),k.removeEventListener("keydown",$)}},[n?.getStage()]),o.useEffect(()=>{const k=p.getMode(),P=k?.key;P==="edit"||P==="enter"?u?k.args?.cancel?_():k.args?.submit?O():I(k.args?.stateAndCoords):D(k.args?.start):x&&_()},[p]),W(n,t)})),Br="white",Vr="black",wi=`url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg' %3E%3Cg%3E%3Cpath d='m 14.5,8 -5.6875,5.6875 v -3.25 H 1.5 v -4.875 h 7.3125 v -3.25 z' stroke='${Vr}' fill='${Br}'/%3E%3C/g%3E%3C/svg%3E%0A") 15 8, pointer`,bi=`url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg' %3E%3Cg%3E%3Cpath d='M 13.24564,12.979958 H 5.2023009 L 7.500398,10.681861 2.3296796,5.5111425 5.7768252,2.0639969 10.947543,7.2347153 13.24564,4.9366182 Z' stroke='${Vr}' fill='${Br}'/%3E%3C/g%3E%3C/svg%3E%0A") 12 12, pointer`,xi=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:l}=e,[a,i]=o.useState(l.getTables().getCount()>0),[m,h]=o.useState(null),[s,p]=o.useState(null),[b,v]=o.useState(null),[u,I]=o.useState(null),x=r.useCallbackRef(()=>{if(l.getTables().getCount()>0){i(!0);const f=l.getTables().getItems({address:n.getVisibleRangeCoords()});h(f.length>0?f:null)}else i(!1),h(null)},[l,n]),F=r.useCallbackRef(f=>{f.preventDefault(),f.stopPropagation();const A=n.getCellCoordsFromClient(f.clientX,f.clientY),S=l.getTables().getItems({address:A});S.length===1&&S[0].select()},[n,l]),z=r.useCallbackRef(f=>{f.preventDefault(),f.stopPropagation();const A=n.getCellCoordsFromClient(f.clientX,f.clientY),S=l.getTables().getItems({address:A});if(S.length===1){const W=S[0].getRange().getCoords(),D={colStart:W.colStart,rowStart:A.rowIndex,colEnd:W.colEnd,rowEnd:A.rowIndex};l.getRange(D).select()}},[n,l]),K=r.useCallbackRef(()=>{if(!a)return;const f=l.getTables().getItems({address:n.getVisibleRangeCoords()});h(f.length>0?f:null)},[l,a,n]);tt(l?.getSelection(),{onChange(f){p(l.getSelection().getCoords().cell)}}),tt(b,{onAnyChange(f){x(),K()}}),tt(u,{onAnyChange(f){K()}}),tt(l,{onTablesChange(f){x(),K()},onInvalidated(f){x(),K()}});const V=o.useMemo(()=>ge.CommonUtils.debounce(ge.CommonUtils.throttle(K,300),300),[]);o.useEffect(()=>{V()},[n]),o.useEffect(()=>{let f=null;if(m)for(let A=0;A<m.length&&!f;A++){const S=m[A],W=S.getRange().getCoords();d.CoordUtils.isCellWithinRange(s,W)&&(f=S)}v(f)},[s,m]);const M=r.useCallbackRef(f=>{let A=null;if(m)for(let S=0;S<m.length;S++){const W=m[S],D=W.getRange().getCoords();let O=n.getRangeCoordsBounds(D);const _=n.getRelativePointFromClient(f.clientX,f.clientY),de=_.x,U=_.y;if(de>=O.x&&de<=O.x+O.width&&U>=O.y&&U<=O.y+O.height){const H=n.getViewportSize();de<=0||U<=0||de>=H.width||U>=H.height||(A=W)}}I(A)},[n,m]);if(o.useEffect(()=>{const f=n?.getStage();if(f&&m)return f.addEventListener("mousemove",M),f.addEventListener("mouseleave",M),()=>{f.removeEventListener("mousemove",M),f.removeEventListener("mouseleave",M)}},[m,n?.getStage()]),!n||!m||m.length===0)return null;const L=[];for(let f=0;f<m.length;f++){const A=m[f];if(A.isClosed())continue;const S=A===u,W=A===b,D=A.getRange().getCoords(),O=n.getRangeCoordsBounds(D);let _;if(S||W){const de=A.getStyle().getProperties(),U=de.headerRow?.fill?.background??de.wholeTable?.border?.top?.color?.toString();if(U&&l){const H=l.getStyles().parseColor(U);H&&(_=H.toCSS())}_||(_="var(--sxl-app-color-shadow, rgba(0,0,0,.15))")}L.push(c.jsx("div",{style:{position:"absolute",left:O.x,top:O.y,width:Math.min(16,O.width),height:O.height,pointerEvents:"all",cursor:wi},onMouseDown:z},`table-select-row-${A.getName()}`)),L.push(c.jsx("div",{style:{position:"absolute",left:O.x,top:O.y,width:Math.min(16,O.width),height:Math.min(16,O.height),pointerEvents:"all",cursor:bi},onMouseDown:F},`table-select-${A.getName()}`)),L.push(c.jsx(ut.Selection,{x:O.x,y:O.y,width:O.width,height:O.height,range:D,strokeWidth:W?.5:0,stroke:_??"var(--sxl-app-color-grey, grey)",style:{willChange:"box-shadow",transition:"box-shadow 80ms ease-in-out",boxShadow:S?`${_} 0px 0px 1px 1px`:void 0}},`table-outline-${A.getName()}`))}return L})),qi=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:l,animationTime:a=60}=e,[i,m]=o.useState(null),[h,s]=o.useState(null),p=o.useRef(null),b=r.useCallbackRef(()=>{const z=l.getSelectedCell(),K=z.getSpill()?.getCoords()??null;ge.CoordUtils.isEqualRanges(K,i)||(s(K?{transition:i?"move":"in",bounds:n.getRangeCoordsBounds(K),coords:K}:{transition:"out",bounds:n.getRangeCoordsBounds(i),coords:i}),m(K))},[l,n,i]);o.useEffect(()=>(p.current&&(clearTimeout(p.current),p.current=null),h&&(p.current=setTimeout(()=>{s(null),p.current=null},a)),()=>{p.current&&(clearTimeout(p.current),p.current=null)}),[h,a]);const v=o.useMemo(()=>ge.CommonUtils.debounce(ge.CommonUtils.throttle(b,80),80),[]);if(tt(l?.getSelection(),{onChange(z){v()}}),tt(l,{onSpillsChange(z){b()},onInvalidated(z){b()}}),!n||!i&&!h)return null;const u=l.getRange(i).getValue()instanceof d.FormulaError.Spill,I=[];let x=h?.bounds??n.getRangeCoordsBounds(i);if(h&&!ge.CommonUtils.isEqualBounds(h.bounds,n.getRangeCoordsBounds(h.coords))&&s(null),x=n.toClipBounds(x,-10),!x)return;const F="var(--sxl-app-color-primary-dark, rgba(0,0,0,.15))";return I.push(c.jsx(ut.Selection,{x:x.x,y:x.y,width:x.width,height:x.height,range:i,strokeWidth:1,stroke:F,style:{willChange:"transform, opacity, width, height, opacity, left, top",strokeDasharray:u?"6 3":void 0,opacity:h?.transition==="out"?0:1,transition:h?.transition?h.transition==="in"||h.transition==="out"?`opacity ${1.5*a}ms ease-in-out`:`left ${a}ms ease-out, top ${a}ms ease-out, width ${a}ms ease-out, height ${a}ms ease-out`:"none",boxShadow:`${F} 0px 0px 4px 0px`}},"spill-outline}")),I})),Si={position:"absolute",top:0,left:0,bottom:0,right:0},nr=(e,t)=>{const n={...e},l=t?.getNormal().getFont(),a=l?.toCSS(),i={text:{fontFamily:a?.fontFamily,fontSize:l?.getSize()}},m=n.body=ge.CommonUtils.mergeContentful(e.body,i);return n.body=ge.CommonUtils.mergeContentful({fill:"#fff",strokeFill:"#dad8d6",strokeWidth:.5,text:{fontWeight:"400",fontStyle:"normal",fill:"#040404"}},m),n.buttonSurface=ge.CommonUtils.mergeContentful({fill:"#fff",text:{fill:"black"},edgeStrokeFill:"black"},n.buttonSurface),n.selection={fill:"rgba(16, 124, 65, 0.1)",strokeFill:"#217346",strokeWidth:2,...e.selection},n.selectionInactive={...n.selection,fill:"rgba(16, 124, 65, 0.1)",strokeFill:"#dad8d6",...e.selectionInactive},n.selectionRemove={...n.selection,fill:"rgba(200, 0, 0, 0.1)",strokeFill:"rgba(200, 0, 0, 1)",...e.selectionRemove},n.headerSelection={...n.selection,...e.headerSelection},n.headerSelectionInactive={...n.selectionInactive,...e.headerSelectionInactive},n.header=ge.CommonUtils.mergeContentful(n.body,{edgeStrokeFill:"rgb(171, 171, 171)",fill:"#f0f0f0",strokeShadow:void 0,edgeStrokeWidth:1},e.header),n.header=ge.CommonUtils.mergeContentful(n.header,i),n.headerSelect=ge.CommonUtils.mergeContentful(n.header,{fill:"rgba(16, 124, 65, 0.1)",text:{fill:n.headerSelection.strokeFill,fontWeight:"700"}},e.headerSelect),n.headerSelect=ge.CommonUtils.mergeContentful(n.headerSelect,i),n.headerSelectAll=ge.CommonUtils.mergeContentful(n.headerSelect,{},e.headerSelectAll),n.headerSelectAll=ge.CommonUtils.mergeContentful(n.headerSelectAll,i),n},Ri={fireOnModelChange:!1},or={},Hr=o.memo(o.forwardRef((e,t)=>{const{sheet:n,gridStyle:l=or,headersStyle:a=or,onSheetContextMenu:i,showColumnHeaders:m,columnHeaderProps:h,showRowHeaders:s,rowHeaderProps:p,showScrollbars:b=!0,scrollPaneProps:v,onViewportChange:u,commands:I,onRepeatCommandChange:x,onMoveCell:F,overlays:z,renderMovable:K,viewportComponent:V,onElementLoad:M,getCellEditor:L,onFocus:f,onBlur:A,style:S=r.ReactUtils.EmptyCssProperties,onShowTooltip:W,onShowColumnTooltip:D,onShowRowTooltip:O,onCloseTooltip:_,gridProps:de,cellRenderProps:U,...H}=e;if(o.useEffect(()=>{d.LicenseManager._validate(!0)},[]),!n)throw new Error("ISheet must be provided.");const[R,$]=o.useReducer(J=>J+1,0),[k,{width:P,height:ee}]=Ot(),re=r.useCallbackRef(W,[W]),Re=r.useCallbackRef(D,[D]),he=r.useCallbackRef(O,[O]),De=r.useCallbackRef(_,[_]),Fe=o.useRef(!1);o.useLayoutEffect(()=>{Fe.current=!0},[n]);const ve=n?.getStyles(),ke=o.useMemo(()=>nr(l,ve),[l,ve]),$e=o.useMemo(()=>nr(a,ve),[a,ve]),{body:te={},buttonSurface:X={}}=ke,{header:ce={},headerSelect:Ae={},headerSelectAll:Ce={}}=$e,B=o.useRef(null),[ne,me]=o.useState(()=>n?.getView()),ae=(ne?.getZoomScale()??100)/100,ze=o.useMemo(()=>({vertical:ne.isShowColumnGridlines()&&ae>=.4,horizontal:ne.isShowRowGridlines()&&ae>=.4}),[ne?.isShowColumnGridlines(),ne?.isShowRowGridlines(),ae]),le=o.useMemo(()=>{if(ne?.getGridLineColor())return{strokeDasharray:"1,1"}},[ne?.getGridLineColor(),ke]),fe=m??ne?.isShowColumnHeaders(),Ee=s??ne?.isShowRowHeaders(),[be,He]=o.useState({width:0,height:0}),C=o.useMemo(()=>{let J=40,Se=20;const Ke=n?.getStyles().getNormal().getFont();if(be.width>0&&be.height>0){const Ve=Ke?.toCSS()?.fontFamily??ke.header.text.fontFamily,Ye=Ke?.getSize()??ke.header.text.fontSize,Ge=d.IFont.getSharedMeasurer()(""+be.height,Math.ceil(Ye*d.IFont.getDeviceScale()),Ve);J=Ge.width,Se=Ge.lineHeight}return{width:Math.round(J+5),height:Math.round(Se+3)}},[be,ke?.header.text,n]),Pe=Ee?ae*C.width:ce.edgeStrokeWidth,Be=fe?ae*C.height:ce.edgeStrokeWidth,Qe=Math.max(P,(n?.getColumnHeaders().getDefaultSize()??C.width)+Pe+1),ie=Math.max(ee,(n?.getRowHeaders().getDefaultSize()??C.height)+Be+1),Me=o.useRef(new Map),Le=o.useRef(null),Ie=()=>({getColOffset:J=>n.getColumnHeaders().findOffset(J),getColIndex:J=>n.getColumnHeaders().findIndex(J),getRowOffset:J=>n.getRowHeaders().findOffset(J),getRowIndex:J=>n.getRowHeaders().findIndex(J)}),[xe,N]=o.useState(()=>Ie()),[Y,j]=o.useState(!1),[Z,qe]=o.useState(null),g=!0,T=ke.selection?.strokeFill,q=o.useCallback(()=>Mt.current,[]),[y,w]=o.useState(),E=r.useCallbackRef(J=>{w(J);const Se=n?n.getView():null;Se&&Se.setTopLeft(J?{left:J.left,top:J.top}:null),u?.(J)},[n,u]),G=o.useRef(null);o.useEffect(()=>{if(!y||!n)return;const J=n.getRangeAtBounds({x:y.left,y:y.top,width:y.width,height:y.height});G.current?.(),G.current=J.addListener(()=>{const Se=J.getCoords();B?.current?.invalidate(Se)})},[y,n]);const[oe,se]=o.useState(()=>n?.getView().getTopLeft()),ue=r.useCallbackRef(J=>{const Se=ge.CoordUtils.cellToRange(J);if(n.isClosed())return Se;const Ke=n.getRange(Se,{ignoreHidden:!0}).getMerges();return Ke.length===0?Se:Ke[0]},[n]),Q=J=>{if(!J||J.coords.colIndex===0&&J.coords.rowIndex===0)return null;const Se={};return J.coords.colIndex>0&&(Se[ge.AnchorLocation.Left]={index:J.coords.colIndex,scrollOffset:J.topLeft.left}),J.coords.rowIndex>0&&(Se[ge.AnchorLocation.Top]={index:J.coords.rowIndex,scrollOffset:J.topLeft.top}),Se},[ye,pe]=o.useState(()=>Q(n.getView().getFreezePanes())),we=r.useEditMode(),Ue=o.useCallback(()=>B.current,[]),Te=r.useCallbackRef(J=>{we.setMode(Se=>Se?.key==="edit"?{...Se,args:{...Se.args}}:{key:"edit",args:{stateAndCoords:null,start:J}})},[]),Ne=r.useCallbackRef(()=>y,[y]),je=Lr({sheet:n,commands:I,target:Ue,onRepeatCommandChange:x,bodyStyle:te,onStartEdit:Te,getViewport:Ne}),[_e,We]=o.useState(n.getSelection().isEntire()),[et,Oe]=o.useState(ne?.getMovableSelection().length>0),Xe=Z!==null||et,ct=null,[bt,it]=o.useState(!1);o.useEffect(()=>{it(!1)},[n.getProtection()]);const Ze=r.useNotifier(),xt=r.useCallbackRef(()=>{bt||(it(!0),Ze.showMessage?.(c.jsxs("span",{children:["This sheet is protected.",c.jsx("br",{}),"To make a change, unprotect the sheet. You might be requested to enter a password."]}),{type:r.NotifierType.Error}))},[Ze,bt]),ft=o.useMemo(()=>{const J=we.getMode();return J?.cursor?J.cursor:null},[ct,we]),[mt,pt]=o.useState(null),at=o.useRef(!1),[Qt,It]=o.useState([]),Dt=o.useRef(null),[zt,en]=o.useState(ge.TypesUtils.EmptyTopLeft),[Et,wn]=o.useState(ge.TypesUtils.EmptyTopLeft);o.useEffect(()=>{en({left:oe?.left,top:0})},[oe?.left]),o.useEffect(()=>{wn({left:0,top:oe?.top})},[oe?.top]),tt(n?.getView(),{onFreezeSplitChange:()=>{pe(Q(n.getView().getFreezePanes()))},onTopLeftChange:()=>{se(n.getView().getTopLeft())},onMovableSelectionChange:()=>{Oe(n.getView().getMovableSelection().length>0)}}),tt(n?.getSelection(),{onChange:()=>{We(n.getSelection().isEntire())}}),tt(n,{onViewChange(){me(n.getView()),N(Ie())},onLayoutChange:()=>{const J=n.getEntireRange();He({height:J.getRowCount(),width:J.getColumnCount()}),N(Ie())},onStyleChange:()=>{Nt()},onMovablesChange:()=>{},onInvalidated:()=>{Nt()}}),tt(n,{onRequestScrollIntoView:async(J,Se)=>{if(!Se)return;const Ke={colIndex:Se?.coords?.colStart,rowIndex:Se?.coords?.rowStart};return await B.current?.scrollCellCoordsIntoView(Ke,Se?.scroll),!0},onRequestFocus:()=>ge.CommonUtils.whenFocus(Mt.current)},Ri);const yt=o.useRef(!1),Vt=o.useMemo(()=>{const J=ge.CommonUtils.debounce(Ve=>{requestAnimationFrame(()=>{at.current&&Re?.(Ve)})},32),Se=(Ve,Ye)=>{at.current=!0,pt([Ge=>{if(!Ge.toClipBounds(Ge.getRangeCoordsBounds({rowStart:0,rowEnd:be.height,colStart:Ve,colEnd:Ve})))return;const lt=Ge.getLayout(),rt=Math.max(0,lt.getColOffset(Ve)),ot=Ge.getBounds(),wt=Math.min(ot.x+ot.width,lt.getColOffset(Ve+1)),Tt=Ge.getAnchor();if(Ye!==null&&(Tt===ge.AnchorLocation.Left||Tt===ge.AnchorLocation.Center||Tt===ge.AnchorLocation.Right)){const lo=ge.CommonUtils.roundAccurately(Ye*ge.CommonUtils.getDPI(),0),Tn=ge.CommonUtils.roundAccurately(n?.getColumnWidthAsFontUnit(Ye/ae),2).toFixed(2),io="Width: "+(Ye?Tn+" ("+lo+" pixels)":"Hidden"),on=Yn.current.getGridElement().getRelativePointFromClient(0,0),Kt=0-on.y,In=0-on.y+Be,ao=on.x-ot.x;J({anchor:{x:rt-ao,y:Kt,width:wt-rt,height:In-Kt},display:io})}const Pt=[0,0,0,ot.height],to={style:{boxShadow:`0.5px 0px 0px 0px ${l?.body?.fill}`},pathProps:{stroke:T}},no={x:rt-1,y:0,width:1,height:ot.height},oo={style:{boxShadow:`-0.5px 0px 0px 0px ${l?.body?.fill}`},pathProps:{stroke:T}},ro={x:wt-1,y:0,width:1,height:ot.height};return c.jsxs(o.Fragment,{children:[c.jsx(ut.SVGLine,{linePoints:Pt,bounds:no,...to}),c.jsx(ut.SVGLine,{linePoints:Pt,bounds:ro,...oo})]},"resize-dividers")}])};let Ke=null;return{onResizeHeadersStart:(Ve,Ye,Ge)=>{Ke=n.beginCommit(Ge),yt.current=!1,Se(Ve,Ye)},onResizeHeaders:(Ve,Ye,Ge)=>{yt.current=!1,Se(Ve,Ye)},onResizeHeadersDown:(Ve,Ye)=>{yt.current=!0,setTimeout(()=>{yt.current&&Se(Ve,Ye)},360)},onResizeHeadersEnd:(Ve,Ye,Ge)=>{Ke?.commit({description:Ge}),Ke=null,yt.current=!1,requestAnimationFrame(()=>De?.()),at.current=!1,pt(null)},onResizeHeadersUp:Ve=>{yt.current=!1,requestAnimationFrame(()=>De?.()),at.current=!1,pt(null)},...h}},[n,h,Be,mt]),tn=o.useMemo(()=>{const J=ge.CommonUtils.debounce(Ve=>{requestAnimationFrame(()=>{at.current&&he?.(Ve)})},32),Se=(Ve,Ye)=>{at.current=!0,pt([Ge=>{if(!Ge.toClipBounds(Ge.getRangeCoordsBounds({rowStart:Ve,rowEnd:Ve,colStart:0,colEnd:be.width})))return;const lt=Ge.getLayout(),rt=Math.max(0,lt.getRowOffset(Ve)),ot=Ge.getBounds(),wt=Math.min(ot.y+ot.height,lt.getRowOffset(Ve+1)),Tt=Ge.getAnchor();if(Ye!==null&&(Tt===ge.AnchorLocation.Top||Tt===ge.AnchorLocation.Center||Tt===ge.AnchorLocation.Bottom)){const lo=Math.floor(10*ge.CommonUtils.getDPI())/10,Tn=ge.CommonUtils.roundAccurately(Ye*lo,0),io=ge.CommonUtils.roundAccurately(Tn/ae/(n?.getRowHeaders().getScaleFactor()*ge.CommonUtils.getDPI()),2).toFixed(2),on="Height: "+(Ye?io+" ("+Tn+" pixels)":"Hidden"),Kt=Ut.current.getGridElement().getRelativePointFromClient(0,0),In=0-Kt.x,ao=0-Kt.x+Pe,Il=Kt.y-ot.y;J({anchor:{x:In,y:rt-Il,width:ao-In,height:wt-rt},display:on})}const Pt=[0,0,ot.width,0],to={style:{boxShadow:`0px 0.5px 0px 0px ${l?.body?.fill}`},pathProps:{stroke:T}},no={x:0,y:rt-1,width:ot.width,height:1},oo={style:{boxShadow:`0px -0.5px 0px 0px ${l?.body?.fill}`},pathProps:{stroke:T}},ro={x:0,y:wt-1,width:ot.width,height:1};return c.jsxs(o.Fragment,{children:[c.jsx(ut.SVGLine,{linePoints:Pt,bounds:no,...to}),c.jsx(ut.SVGLine,{linePoints:Pt,bounds:ro,...oo})]},"resize-dividers")}])};let Ke=null;return{onResizeHeadersStart:(Ve,Ye,Ge)=>{Ke=n.beginCommit(Ge),yt.current=!1,Se(Ve,Ye)},onResizeHeaders:(Ve,Ye,Ge)=>{yt.current=!1,Se(Ve,Ye)},onResizeHeadersDown:(Ve,Ye)=>{yt.current=!0,setTimeout(()=>{yt.current&&Se(Ve,Ye)},360)},onResizeHeadersEnd:(Ve,Ye,Ge)=>{Ke?.commit({description:Ge}),Ke=null,yt.current=!1,requestAnimationFrame(()=>De?.()),at.current=!1,pt(null)},onResizeHeadersUp:Ve=>{yt.current=!1,requestAnimationFrame(()=>De?.()),at.current=!1,pt(null)},...p}},[n,p,Pe]),Mt=r.useImperativeElement(t,()=>{const J=Ke=>{n?.getView()&&n.getView().selectMovables([]),Le.current=null,B?.current?.focus(Ke)},Se=async(Ke=null)=>{if(Ke||(Ke=n?.getView().getMovableSelection()[0]),!Ke)return!1;const Ve=Ke.getAnchorCoords();if(!Ve)return!1;const Ye=B.current?.getViewFromCellCoords({colIndex:Ve.colStart,rowIndex:Ve.rowStart});if(!Ye)return!1;const Ge=Ye.getAnchor();n?.getView().getMovableSelection().indexOf(Ke)===-1&&n?.getView().selectMovables([Ke]);let lt=Me.current?.get(Ge);return lt?.current?(await lt.current.focusMovable(Ke),!0):(Le.current={movable:Ke,anchor:Ge},!0)};return{getGridElement:()=>B.current,getRowHeaderElement:()=>Ut.current,getColumnHeaderElement:()=>Yn.current,rowHeaderHeight:()=>Be,colHeaderWidth:()=>Pe,startEdit:Te,submitEdit:()=>{we.setMode(Ke=>Ke?.key!=="edit"?Ke:{key:"edit",args:{stateAndCoords:null,submit:!0}})},cancelEdit:()=>{we.setMode(Ke=>Ke?.key!=="edit"?Ke:{key:"edit",args:{stateAndCoords:null,cancel:!0}})},isEditing:Z!==null,focus:Ke=>{n?.getView().getMovableSelection().length>0&&Se()||J(Ke)},focusSheet:J,focusMovable:Se,contains:Ke=>B?.current?.contains?.(Ke),invalidate:Nt,isSheetElement:()=>!0,getSheet:()=>n}},[n]),Nt=o.useCallback(J=>{Fe.current||(B?.current?.invalidate(J),$?.())},[]);o.useEffect(()=>{Nt()},[ke]);const bn=_e?Ce.edgeStrokeFill:ce.fill,nt=_e?Ae.fill:typeof ke.headerHover=="function"?ke.headerHover(ce)?.fill:ce.fill,xn=o.useMemo(()=>V?c.jsx("div",{className:st("sheetxl-viewport-overlay",Ul),style:{width:"100%",height:"100%",boxSizing:"border-box",position:"absolute"},children:V}):c.jsx(c.Fragment,{}),[V]);let Ht=null;fe&&Ee&&(Ht=c.jsxs("div",{tabIndex:-1,className:"top-left-corner",style:{padding:"2 2",position:"absolute",height:`${Be}px`,width:`${Pe}px`,zIndex:1,boxSizing:"border-box",cursor:"cell"},onMouseDown:J=>{let Se=!J.ctrlKey;je?.getCommand("selectAll")?.execute(!Se||J.button!==0),J.nativeEvent.which===r.MouseButtonCodes.Right?i?.({originalEvent:J,clientX:J.clientX,clientY:J.clientY,rowIndex:-1,colIndex:-1}):B.current?.focus()},children:[c.jsx("div",{style:{height:Be-5+"px",width:Be-5+"px",clipPath:`path('M${Be-5} 0 L0 ${Be-5} L${Be-5} ${Be-5} L${Be-5} 0 Z')`,borderRight:`2px solid ${bn}`,borderBottom:`2px solid ${bn}`,background:`${nt}`,boxSizing:"border-box",position:"absolute",right:"2px",bottom:"2px"}}),c.jsx("div",{style:{position:"absolute",height:`${Be}px`,width:`${Pe}px`,boxSizing:"border-box",borderRight:`solid 1px ${ce.strokeFill}`,borderBottom:`solid 1px ${ce.strokeFill}`,right:"-1px",bottom:"-1px"}})]}));const nn=r.useCallbackRef(({_left:J,_top:Se})=>{},[]),dt=r.useCallbackRef(J=>{if(!i)return;const Se=B.current.getViewFromClient(J.clientX,J.clientY)?.getCellCoordsFromClient(J.clientX,J.clientY);Se&&(i({originalEvent:J,clientX:J.clientX,clientY:J.clientY,rowIndex:Se.rowIndex,colIndex:Se.colIndex}),J.stopPropagation(),J.preventDefault())},[i]),vt=r.useCallbackRef(J=>{if(!(!J.shiftKey&&(J.ctrlKey||J.metaKey)))return;const{deltaY:Se}=J;return Se>0?je.getCommand("sheetZoomOut")?.execute():Se<0&&je.getCommand("sheetZoomIn")?.execute(),Se===0},[je]);o.useEffect(()=>{It(null),Dt.current=null,at.current=!1,pt(null);const J=n?.getView().getTopLeft();nn(J),B.current?.scrollTo(J),se(J),me(n.getView()),pe(Q(n.getView().getFreezePanes())),N(Ie()),$()},[n?.getView()]);const qn=o.useCallback((J,Se)=>n.getRowHeaders().hiddenHeadersAt(J,Se),[n]),Sn=o.useCallback((J,Se)=>n.getColumnHeaders().hiddenHeadersAt(J,Se),[n]),Lt=r.useCallbackRef(J=>{const Se=J.getVisibleRangeCoords();if(!Se)return null;const Ke=[];return n.getRange(Se).forEach((Ve,Ye)=>{const Ge=Ye.getCoords(),lt=Ye.getCell();(rt=>{if(rt.isEmpty())return!1;const ot=rt.getSpans();if(ot.width>1||ot.height>1||rt.getStyle().hasVisibleStyling()||ne.isShowFormulas()&&rt.getFormula()!==null)return!0;const wt=rt.getValue();return wt!==null&&!(!ne.isShowZeros()&&wt===0&&rt.getType()===d.ScalarType.Number)})(lt)&&Ke.push({coords:Ge,value:lt,range:ne.isShowFormulas()?null:lt.getExtrusions()})},{ignoreHidden:!0,includeMergeOverflow:!0}),Ke},[n,ne.isShowZeros(),ne.isShowFormulas(),Z]);o.useEffect(()=>{const J=[];z&&J.push(...z),mt&&J.push(...mt),ge.CommonUtils.isEqualArrays(J,Dt.current)||(Dt.current=J,It(J))},[z,mt,ke]);const Rn=o.useMemo(()=>({style:{boxShadow:`0.5px 0.5px 0px 0px ${l?.body?.fill}`},pathProps:{stroke:l?.body?.text?.fill??"black"}}),[ke?.header?.edgeStrokeFill]),Xn=r.useCallbackRef(J=>{J.isDefaultPrevented()||J.isPropagationStopped()||(Le.current=null,n?.getView().getMovableSelection().length>0&&n.getView().selectMovables([]))},[n]),kn=o.useMemo(()=>{const J=we.getMode();return J?.key==="cut"||J?.key==="copy"},[we]),Mn=r.useCallbackRef(async J=>{const Se=we.getMode();return J.keyCode===r.KeyCodes.Escape&&Se?(J.preventDefault(),void we.setMode(null)):J.keyCode===r.KeyCodes.Enter&&kn?(J.preventDefault(),await je?.getCommand("paste")?.execute(),void we.setMode(null)):void je?.dispatchToFocusedCommand(J)},[je,we]),Ut=o.useRef(null),bl=o.useMemo(()=>c.jsx("div",{tabIndex:-1,style:{position:"relative",flex:"0",top:`${Be+1}px`,width:`${Pe+ce.edgeStrokeWidth}px`,minWidth:`${Pe+ce.edgeStrokeWidth}px`,borderRight:`solid ${ce.edgeStrokeWidth}px ${ce.edgeStrokeFill}`,height:`calc(100% - ${Be}px)`,boxSizing:"border-box",zIndex:"2"},children:c.jsx(Qo,{ref:Ut,sheetElement:Mt.current,gridRef:B,freezeStart:ye?.[ge.AnchorLocation.Top],oppositeSize:Pe,containerWidth:Pe,containerHeight:ie,sheetHeader:n.getRowHeaders(),gridStyle:$e,verticalPadding:Math.max(0,Math.floor(n.getStyles().getNormal().getFont().getSize()/10)),scrollPoint:Et,onSheetContextMenu:i,tabIndex:-1,style:{position:"relative",flex:"0",top:`${Be+1}px`,width:`${Pe+ce.edgeStrokeWidth}px`,minWidth:`${Pe+ce.edgeStrokeWidth}px`,borderRight:`solid ${ce.edgeStrokeWidth}px ${ce.edgeStrokeFill}`,height:`calc(100% - ${Be}px)`,boxSizing:"border-box",zIndex:"2",...tn?.style},...tn})}),[Pe,Be,ie,n,Et,ye?.[ge.AnchorLocation.Top],ke,g,i,ce.fill,p]),Yn=o.useRef(null),xl=o.useMemo(()=>c.jsx("div",{tabIndex:-1,style:{position:"relative",left:"0px",width:"100%",height:`${Be+ce.edgeStrokeWidth}px`,minHeight:`${Be+ce.edgeStrokeWidth}px`,borderBottom:`solid ${ce.edgeStrokeWidth}px ${ce.edgeStrokeFill}`,boxSizing:"border-box",zIndex:"1"},children:c.jsx(Qo,{ref:Yn,sheetElement:Mt.current,gridRef:B,freezeStart:ye?.[ge.AnchorLocation.Left],oppositeSize:Be,containerWidth:Qe,containerHeight:Be,sheetHeader:n.getColumnHeaders(),gridStyle:$e,scrollPoint:zt,onSheetContextMenu:i,...Vt,style:{...Vt?.style,position:"relative",left:"0px",width:"100%",height:`${Be+ce.edgeStrokeWidth}px`,minHeight:`${Be+ce.edgeStrokeWidth}px`,borderBottom:`solid ${ce.edgeStrokeWidth}px ${ce.edgeStrokeFill}`,boxSizing:"border-box",zIndex:"1"}})}),[Be,Qe,n,zt,ye?.[ge.AnchorLocation.Left],ke,ce.fill,g,i,h]),ql=r.useCallbackRef(J=>{const{value:Se,key:Ke,...Ve}=J;let Ye=Se,Ge=Z;if(!Ge||Ge.colIndex===J.coords.colIndex&&Ge.rowIndex===J.coords.rowIndex||(Ge=null),!Ye){const ot=J.range;if(Ye=n.getRange({rowIndex:ot.rowStart,colIndex:ot.colStart}).getCell(),Ye.isEmpty())return null}let lt=null;Ye.getHyperlink()&&(lt=async ot=>{if(U?.onLinkMouseDown?.(ot),ot.button===0&&!ot.isDefaultPrevented()){ot.stopPropagation(),ot.preventDefault();try{await Ye.getHyperlink()?.open()}catch(wt){Ze.showError?.(wt)}}}),Ge&&Ge.colIndex===J.range.colStart&&Ge.rowIndex===J.range.rowStart&&(Ye=Ye.createTemporaryCell({value:null}));const rt=n.getStyles();return o.createElement(Mr,{...Ve,key:Ke,bodyStyle:te,docTheme:rt.getTheme(),normalStyle:rt.getNormal(),showFormulas:ne.isShowFormulas(),showZeros:ne.isShowZeros(),onLinkMouseDown:lt,...U,value:Ye})},[n,xe,te,Z,ne?.isShowFormulas(),ne.isShowZeros()]),Sl=o.useCallback((J,Se)=>{const{key:Ke,...Ve}=J;return[c.jsx(Jl,{ref:Se,getVisibleCells:Lt,sheet:n,gridStyle:ke,...Ve},`border-${Ke}`),c.jsx(xi,{ref:Se,sheet:n,commands:je,...Ve},`table-${Ke}`),c.jsx(qi,{ref:Se,sheet:n,...Ve},`spill-${Ke}`),c.jsx(hi,{ref:Se,sheet:n,commands:je,onShowTooltip:re,onCloseTooltip:De,gridStyle:ke,gridRef:B,editingCoords:Z,isActive:g,...Ve},`selection-${Ke}`),c.jsx(ii,{ref:Se,sheet:n,commands:je,gridStyle:ke,element:q,...Ve},`copy-paste-${Ke}`),c.jsx(Ci,{ref:Se,sheet:n,commands:je,target:Ue,renderMovable:K,movableProps:{onUnFocus:()=>{Mt.current.focus()}},...Ve},`movable-${Ke}`),c.jsx(yi,{ref:Se,sheet:n,commands:je,gridStyle:ke,getCellEditor:L,showProtectedError:xt,setEditingCoords:qe,...Ve},`editor-${Ke}`)]},[n,B.current,ke,L,je,Ze]),[Lo,Rl]=o.useState(!1),kl=o.useMemo(()=>{if(Qe===0||ie===0)return null;const J=n.getStyles().getNormal(),Se=J.getFont(),Ke=J.getFill(),Ve=J.getBorder(),Ye=J.getFill().getType()===d.IFill.Type.None;let Ge=le,lt=le;const rt=(wt,Tt,Pt)=>Pt?{stroke:Ve.getBottom().isNone()?"none":wt.getColor().toRGBA(te.darkMode).toString(),...Tt}:Tt;lt=rt(Ve.getBottom(),lt,!Ve.getBottom().isNone()),lt=rt(Ve.getTop(),lt,!Ve.getTop().isNone()),Ge=rt(Ve.getRight(),Ge,!Ve.getRight().isNone()),Ge=rt(Ve.getLeft(),Ge,!Ve.getLeft().isNone());let ot=ne?.getGridLineColor()?.toRGBA(te.darkMode).toString()??te.strokeFill;return Ye||(lt=rt(Ve.getBottom(),lt,!0),lt=rt(Ve.getTop(),lt,!0),Ge=rt(Ve.getRight(),Ge,!0),Ge=rt(Ve.getLeft(),Ge,!0)),c.jsx(ut.Grid,{className:"sheetxl-sheet-primary",style:{...Si,...Ke.toCSS(te.darkMode),...Se.toCSS(te.darkMode,ae),"--sxl-app-color-background":te.fill,"--sxl-app-color-shadow":ke.colorShadow,"--sxl-app-color-grey":ke.colorGrey,"--sxl-app-color-button-fill":X.fill,"--sxl-app-color-button-text":X.text?.fill,"--sxl-app-color-button-border":X.edgeStrokeFill,"--sxl-app-color-primary-dark":ke.selection.strokeFill},ref:B,zoom:ae,...de,onFirstRender:wt=>{Rl(!0),de?.onFirstRender?.(wt),je?.activate()},showGridLines:ze,gridLineColor:ot,gridLineColumnsProps:Ge,gridLineRowsProps:lt,freezeLeft:ye?.[ge.AnchorLocation.Left],freezeLeftProps:Rn,freezeTop:ye?.[ge.AnchorLocation.Top],freezeTopProps:Rn,width:Qe,height:ie,columnCount:be.width,rowCount:be.height,cursor:ft??ct??"cell",clipCells:!0,layout:xe,cellRenderer:ql,overlayRenderer:Sl,getCellCoordsAsRangeCoords:ue,hiddenRowsAt:qn,hiddenColumnsAt:Sn,getVisibleCells:Lt,onWheelScroll:vt,onPointerDown:Xn,onKeyDown:Mn,onViewportChange:E,onImmediateScroll:nn,scrollPoint:oe,stageProps:{onFocus:()=>{je?.activate()}},overlays:Qt})},[R]);o.useEffect(()=>{Fe.current||$()},[xe,ye,ae,je,oe?.left,oe?.top,te,de,Qe,ie,ft,Qt,g,ct]);let Jn={flex:"1 1 100%",display:"flex",alignContent:"stretch",position:"relative"};b||(Jn={...Jn,...S});const Ml=o.useMemo(()=>{const J=n.getStyles().getTheme(),Se=J.getColorScheme(),Ke=J.getFontScheme();return{"--sxl-doc-color-dk1":Se.getDk1().toCSS(te.darkMode),"--sxl-doc-color-dk2":Se.getDk2().toCSS(te.darkMode),"--sxl-doc-color-lt1":Se.getLt1().toCSS(te.darkMode),"--sxl-doc-color-lt2":Se.getLt2().toCSS(te.darkMode),"--sxl-doc-color-accent1":Se.getAccent1().toCSS(te.darkMode),"--sxl-doc-color-accent2":Se.getAccent2().toCSS(te.darkMode),"--sxl-doc-color-accent3":Se.getAccent3().toCSS(te.darkMode),"--sxl-doc-color-accent4":Se.getAccent4().toCSS(te.darkMode),"--sxl-doc-color-accent5":Se.getAccent5().toCSS(te.darkMode),"--sxl-doc-color-accent6":Se.getAccent6().toCSS(te.darkMode),"--sxl-doc-color-hlink":Se.getHlink().toCSS(te.darkMode),"--sxl-doc-color-fol-hlink":Se.getFolHlink().toCSS(te.darkMode),"--sxl-doc-font-major":Ke.getMajorFont(),"--sxl-doc-font-minor":Ke.getMinorFont()}},[n.getStyles().getTheme()]),Po=r.useCallbackRef(J=>{const{style:Se,...Ke}=J;return c.jsx(Mo,{...Ke,style:{paddingLeft:"4px",paddingRight:"4px",...Se},sheet:n})},[n]);let Qn=c.jsx("div",{style:Jn,onTouchStart:()=>{jo()},onFocus:J=>{j(!0),f?.(J)},onBlur:J=>{j(!1),A?.(J)},ref:Mt,...H,children:c.jsx("div",{className:st("sheetxl-sheet",Hl),style:{position:"absolute",width:"100%",height:"100%",boxSizing:"border-box",display:"flex",flexDirection:"column",flex:"1 1 100%",zIndex:"0",...Ml},children:c.jsxs("div",{style:{display:"flex",flexDirection:"row",flex:"1 1 100%"},children:[Ht,bl,c.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:"1 1 100%",overflow:"hidden",position:"relative"},children:[xl,c.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:"1 1 100%",position:"relative",borderRight:`solid ${ce.edgeStrokeWidth}px ${ce.edgeStrokeFill}`,backgroundColor:te.fill},ref:k,onContextMenu:dt,children:[kl,xn,c.jsx(Kl,{style:{position:"absolute",right:24,bottom:4},colorLicensee:ke?.selection?.strokeFill,colorCredits:ke?.body?.text?.fill})]})]})]})})});b&&(Qn=c.jsx(r.ScrollPane,{style:{flex:"1 1 100%",overflow:"hidden",background:`${ce.fill}`,minHeight:2*C.height,minWidth:2*C.width,...S},viewport:y,touchElement:B.current?.stage,disableTouch:Xe,onScrollViewport:J=>{B.current?.scrollTo(J)},createHorizontalScrollbar:Po,createVerticalScrollbar:Po,...v,children:Qn})),o.useEffect(()=>{Fe.current=!1,$?.(),Y&&Mt.current?.focus()},[n]);const[eo,Tl]=o.useState(!1),jo=r.useCallbackRef(()=>{eo||Tl(!0)},[eo]);return o.useEffect(()=>{if(Lo)return typeof M=="function"&&M(),r.ReactUtils.detectIt().primaryInput==="touch"&&jo(),()=>{}},[M,Lo,eo]),Qn}));Hr.displayName="SheetElement";const ki=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),rr="data:image/webp;base64,UklGRhIPAABXRUJQVlA4TAYPAAAv/8F/EM8HIZJtWU0fdlTh3wRCIMlkE+EqkiTFyt57/KQ8/zKeEf5iaseNJClS1DGDxWcwvhfuCo5tW88SHw8Xh5ypbC3tnf8QHEfOB/D97w4PuFHBIx6MHJ74zvj/0aLdlH9AYWEjHiwOJR5M7Q+FAigmTRQOJRqczrVUKABQSMYgoAFFAhIwBkgaYEkBSABowDGgcYakUZirArQhRMUIIHGLBIAEEoDRfyokIAEAMhrSRmEOSPyS/jvR+BYFIWkUhLQhCpLGGQ2rhPiCOKPxDIVQmAZQDMYIjCTfNQXVJv8pnQqhuAonnczGDPv0VwFw/w+uGiAwQYjJXxffaJzROKPHoArGAPA+6o9AtiIj4XgAWGKCwAQBVNMSHQNEjTMqOSWPQEFRHOVl4vp/nnhI/DBNK8CGXCpeFvONip/jvPn67qb957v+Nssyv96/Jwg/xzT9yORhfR4fb6vF9ef39Nt62g55v37/7dRzfx9xFLRtIyX8ae+/AxARE8APxbCQtkidoqVGDBDxR3r8/59vo88vnW07v9nrY+l0tn0zemuSnn03W83Otn2zcarbfIrZqnG7Ykr77/nS5PP+/E6/iP7DgiRJiZX13F2QhYM/OrBtm7at/ZB927Zt27ZtPr/oK7Jt27b9x7dtGxcv1sFcc/R1woj+S2IkSZGkaXMpD2sZhqf3R5Y/23+2/2z/2f6z/Wf7z/af7T/bf7b/bP/97S8/r8tpn2+Rafa98ufeMc3nfK8v3V9QZHWVtFs5f/i2z8bd7+E/nX/Vuk9+uO6dF3IuWEy12r0S9eGUdA5q0RtuvnxxXpUFVPf5eQlfe7jG8j58Q6+uZZZNRGmv+GgOidbMMHMMy/WbJu7az/wcUqUk9C01LJNj5tZsDsnuizfPWh/F3WdN4FDO/eiYow4LozJuhpfDoPtcywyr8pAYDpv2RlmOB1TF7fBymPXAqA4Wwskrp3JY9oVZZA2efmm8m8O2Xa796tcoMprDvA2DAprXfkYWC9C0eflat2xrBgtRrKuDwgXemsKS5I6vr2zVzq9ZnLbUUzSHL5lFast+JTPi1rJUZWzN1bBuSSxZ7pvqaFfeVpYub2QtzaqI3McCtsppqPXPTWc0C9kjB3TqyFcsZ54b8/XpXJSHRW23qU1LJrC4PdFRlWsMzWCJ815ZpUYDU1no7mqiQ7VvYbnz9zIUaOkqFr3tZ7XnfKSHhe/+ON3pNJblL8N1QXEG+xlCXzXXmvKZjKJYn9IWKV7POMqIqlaYVtEMpU0l6lq46Eo3g2lvO2WtRPoB48m/SFXjwt3JiMqYp6eJkHWTGVQ3BZSky30Mq0/KVMTnZ2BN6aggV2UwtPa0UI+rGV1pylkm1RjB+IpZqpoxRG5ghGW/oZjr9xlj+xarZSiBBEaZe5BSxhK4jXHmeVElj/2Bkeb2KeQVzWKs7eumDnMZbemtlGEU4236UVUYyojb3UATK5Yx5lY30sOqRVlBn3YPdqKCgrexZ7SwcknQP13bfjWC6nD1XEcreHs8QgXOTg369bDmlxFQNU28mRpwYUMNXDcTQVXC2woYTOo2DrJxk1+ZQ9/9PIeNprjRs72ij4H2wbdZjdzdTDYizUXG9P3gnfZGDVy3gFMxD5ZBN9U7BWoJpoK2OpBvHvbYArWBUlFDgXu8QG2BVJanG2xLxC/UckNZZ6Om5VZmnd1NQfvtrRJzByPGXHr8ohqyn/eOr0MIZXAJZFvF1zGAUvC0AuzT+LpgXxJ7K/BuK/jA8LpiXhpPwZ3dcFN4XbIukUVgnVR01Y4WhVi19KLTC6Ca/vD4uevReM40PgHVY9GFMC2bHkAtG10Qy9K5rzHOLQkcGVwYwxJ6H+fspuAC2ZVSG5Rbjg0ulFk5Ta2FcUHTvcqtGrCo7aqZFo2EaK3oOXi0mpOO+xoinOB8cGgF2JTYrQC9EFoRJqV2Gp6Z3oisEItymxKBbniR+yIrxqDsBoCzUGQFpS+93fnYNiO4Z6FVwxc1WjXpotdCc0HoXHRMPucfY0qQTXJ6L+jqGCY0EzekcaOm+LY/g4PSCGCuirwgDtJ4dePy/uCvg2tJ8wNkhDzmObBsJDkhj7OagtL3rrwAhX84mnWiv8Yz+M/IXgyZHTFNc3jZ7dLYfSNo5uA2EpLzJT/c8b1liOY47CtHKOEfj+xcyRJ2vCqAx0MyRR2zE88uwr4hV9RxkoHGeIDv93Cf8aVotiT/uiTb0X+uKfFgnCw5Y473FWJxu7whx/wull0JkMwhx5MMJJ6UPeKYjyCZ43iw/BHHTwOxtAQAOPafwGEExem+vKd794bhxzckhNFvDgGbYbhCgoAbe46jcKsw0MbcH4Qv3hAH2vgOHIsbg4CNPScxuFcoWGPuhWFX8WnO/gt7hufPIVhSEstIOjN7ChF4WDhIY34RwcqGb4uHWfjnPZwmAQGN73PI7xkh4Yy5nvzuFhPOeKj4OkhQsqeJF9qz0DXAWB45sBFU7K6QXoKENTLOzPyC9PYIDGR8sfBOscikTwfzHp3MJlOPcujyB2TnYjiEMbeUfn0jOoRxP9GVeRgPYPyk6FqH3AaAUh5ZkOL4hpC/XLOim8/yXQ3yxXxWck9o4gb3h85/inFrhLfLQf3iIZIPNfmWLFQvniG4DyUPtYvHij7V0UXl4uxqua0vG3WLOUduNxjdELBn98vm8Jroy5z5jCSzJpY9m/CWnF43NYtvlHu8CclKxeJPxDabzNQrfkBsZ8pNteLMCKmdIDu1irmj1LaRn1rFraT2oAxVKh4oNcuHj7aRx9FNhof3pPaq5Djyzsi2RD3sDXmCSAejD/wqmeIM3y7JzS1b9YkfkfpAIchXdeI1Yu9ZqrHaxNOFdqGcVSbmgMyW974v2DmPb3A+lMhsbcl6rMrMXCCz9WSuKnFDmW0gdzWJc2S2suxVJO4s9YiT/uoRt5TZ1gJQjbitzMaJQC3iFVJfqhAElYiX6M3VCQ7FijMOokpYIfSTMFQLbYV+QQhlobUXtDJB9dBZ6OnOAFVEjtDznfyribpCz3e2ryoKLP9yJ4Uyu9x+rsmYUS2zS7yrjDSpjwuidbXxtdCmda46NghtGuPq4yOphx071LYKeZ+E7hXXamTk37XjTjzo+gqq0ThI7L2Nq9X7Z7Gexp1aq1ofnovVNO7cmfX67FyspXEnP/P74qxa1uho3Omrm6ZePpF73PkPzL41q5gbSOzu8PrOvGbek9uoXvF2Z1bKbQOvd8yajU3kdpHRx+W6yY4QfGfjfT4tV87dJLfBD1y+Kqudm0jwjjX5orx6+ol+ISM9viernxV/5+53wqw94f3OSCHJ/XII3Z/23S+tgPeHH5DovQgYoAWye5ovQkdldwpehNIDspuOLkSPkfDdCXaXo+7Pdj8G87pGemPRgnRI/Eua2/Pd78zMMvH3OhxtZhw/I/G7AytM78lvS6o4lQI4YuRQcbofwH5n//w6UqDeJwDtSBSpNyEcXSigSHkgHIqUqXq6x53xGUFoV56ZdHwZg41hYuU5jsF0b6AE6zEC0fEk0RqAwpIg0XKXwDiC6G9ghGsLwWgXolUZFzVxWAxjph3TgRyLsuFHIATsfQLS1gQRWw7laOMARGyyQUi61z5k/QiKRd1Dtq8Qi79e847ZDst/3Al+ROO7N6xn5HGtQWh62DdqiwiOWWyjtipAeLrXNGzvQjq40J5hu/ccIoPvOcbtUlBnFMF8VdZFswowGX6U4Yl+2KOLQHWiW+D2NUPl5/29Ijcb2NEGtYqc/ySw0wlzV2+038muI2AtFXWS2zCsewq3gsl+ZytEZnC/Xmi/011M0FpQYSPW/QRcwWC/80WfA3fcCXdOr2+ElFz+/U74CoFrnkPjFCy97I2tInRdo9T6RkgGku93yrYEz68HZdY3QrKQungC2DoKVCQTifM3g3g6yfboZfY76zCC2CeKHAvMNmPW/U47vogw9kKo4KzkLGMFzONOfFSo0Myk3O3A3xLMLlKowOxk3O/MtQlnj8QKy1C+/U69koCa6/BYQVnK1kcEtUV6kP1OvqsRVkOuV+wYMpuOqfY7ew8C26/7B+s6Y4maQXC7VMG6zFqaHigmvK0aravMZfm5E7SFfMJhdo/WRfZy/NwZ5hHk5vkgWscByNAj1YS5CxStwxCUb3dTQt2T4ToKQvGfO0kbgu3f28J1EIbCP3eWKwl40x8Yrm0ginaLQcg79ZCgX7UJRcEmnSPsncBBv2oZjGLF5sA/70y3oj/vTIcVcIpRHw3+nS1mnLHIzH1JAdV+MPhXk4WkRC5SQU1Sg3711QgJSnwfRWjhFPPuQ33e2b4oIi30WgZDblUd0kPzIbsvhzTRMMCm1yNddClc3iPqOO+ULrD2HSJ15EiEyr2YFFJVPFCeHqSSAh/gvPsZtZx32ptQPkd3xZx24NkYX1EbIsVczQUotivppivhSW1J2undDHDzGhqQfno+HZmHCkhDtYzG5fZzpKOOTUblxmrSUic2gjrv9KSoym8GJH0l6SozC40J9UlbHUnB4vETpK9OPorkZURWkcY6H4VjEbPupLWe9WKwriHpreZfIniyqPOkuSLmuaU3rRtpr4N7hf9/4yfSX+d2Sj6tqZdBKsx5j9Tu6EBa7IRLZLt6OUiRHZoqr62NSJddiHTLKsVJ+uzAWElXLBheRhrN4ZwmpcdakFarNS9bxDnMToMUW9148cTMKyfldvpu0WTecJz0mxEn1x2e+DzScQ6fTAsmZ2xtTz+n5juS5bGlM+m66meSZPl7Y2dnUnjLtmaIsSpxVEdSerkuvwiTmOedIMV38uKUcHfXqwFSflVL4zPDeJxhV3uyBB2/cnx4+sK8QJahqm47Y8PNg9c0JItRedyM2PAxMWqZQVakyrgZMeFg7y8PsS7VeuO70P4bxP3ZRaUGWZ6OmVv9oSk63llBVqkLh4Zt9IaW1Tt6tjfIYhWRY86YGCKH/WWGmUOWraaHxzw1yV2DMxQ2zHq51Tmyfl2o99bI25Jig2vP54ljDp9ykLWsdj3fkO9vvWPKtL8wndo7YeztOy8bcKh5OVncyhq2XNrd96ZpLrjy5/qYb/l8S7q2r1NJlj/bf7b/bP/Z/rP9Z/vP9p/tP9t/tv9s//3djwA=",Ur=o.memo(o.forwardRef((e,t)=>{const{children:n,disabled:l,style:a,picture:i,description:m,isDragging:h,view:s,onHide:p,onShow:b,onKeyDownCapture:v,onFocus:u,onBlur:I,loadingPanel:x,...F}=e,[z,K]=o.useState(!1),[V,M]=o.useState(null),[L,f]=o.useState(null),[A,S]=o.useState(null);o.useEffect(()=>{f(null),i.getDetails().then(O=>{K(!1),f(O.asUrl()),O.asSVGText?.()&&S(O.asSVGText())}).catch(O=>{console.warn(O),K(!0),f(rr),S(null)})},[i]);const W=r.useImperativeElement(t,()=>({isPictureEditor:()=>!0}),[]),D=o.useMemo(()=>{if(L||A)return c.jsx("img",{style:{flex:"1",width:"100%",height:"100%",border:z?"var(--sxl-app-color-grey, grey) solid 1px":void 0,backgroundColor:z?"var(--sxl-app-color-background, white)":void 0,boxShadow:z?"0px 0px 3px var(--sxl-app-color-error, red)":void 0,objectFit:z?"contain":void 0,opacity:V?1:0,filter:"var(--sxl-app-filter-dark-invert)"},draggable:!1,src:L,onLoad:()=>{M(!0)},onError:({currentTarget:O})=>{console.log("error"),O.onerror=null,f(rr),K(!0)},alt:m??`${i.getType()}`})},[V,i,L,A,h]);if(!i.isClosed())return c.jsxs("div",{className:"picture-editor",style:{position:"relative",display:"flex",flex:"1 1 100%",filter:h?"drop-shadow(1px 1px 1.5px var(--sxl-app-color-shadow, rgba(0, 0, 0, .25)))":void 0,...a,width:"100%",height:"100%"},tabIndex:0,...F,onKeyDownCapture:O=>{v?.(O)},ref:W,children:[V||z?void 0:x,D]})}));Ur.displayName="PictureEditor";const Mi=o.memo(o.forwardRef((e,t)=>{const{children:n,disabled:l,chart:a,view:i,isDragging:m,onHide:h,onShow:s,...p}=e;o.useEffect(()=>{},[a]);const b=r.useImperativeElement(t,()=>({isChartEditor:()=>!0}),[]),[v,{height:u,width:I}]=Ot();if(!a.isClosed())return c.jsx("div",{...p,ref:Xt([b,v]),children:c.jsx("div",{className:"chart-editor",style:{width:"100%",height:"100%",backgroundColor:"var(--sxl-app-color-background, white)",backgroundImage:"var(--sxl-app-image-background)",alignItems:"center",justifyContent:"center",zoom:i.getZoom(),display:"flex",position:"relative",border:"var(--sxl-app-color-grey, grey) solid 1px",filter:l?"blur(1px)":void 0,boxShadow:m?"1px 1px 2px var(--sxl-app-color-shadow, rgba(0,0,0,.15))":void 0},children:c.jsx("div",{style:{textAlign:"center"},children:a.getDescription()})})})})),Ti="_editable-input_1bqx6_6",Ii=e=>c.jsx("input",{...e}),Kr=o.memo(o.forwardRef((e,t)=>{const{style:n={},className:l,value:a="",onSubmit:i,onChange:m,onCancel:h,createInput:s=Ii,styleHover:p={},dragging:b,maxLength:v,disabled:u=!1,readOnly:I=!1,...x}=e,[F,z]=o.useState(!1),[K,V]=o.useState(!1),[M,L]=o.useState(a);o.useEffect(()=>{L(a)},[a]);const f=o.useRef(null),[A,S]=o.useState(null),W=r.useNotifier(),D=o.useCallback(function($){const k=$.message;A!==k&&(W?.showMessage?.(k,{type:r.NotifierType.Error}),S(k))},[W,A]),O=o.useCallback($=>{let k=!1;try{k=i?.($)??!0}catch(P){D(P)}return k?(f.current=null,V(!1),L($),k):(setTimeout(()=>{f.current?.focus()},0),k)},[i]),_=r.useCallbackRef(()=>{L(a),f.current=null,V(!1),h?.()},[h,a]),de=o.useMemo(()=>{if(!K)return null;const $={className:st(Ti),autoFocus:!0,spellCheck:!1,name:"editable-label",autoComplete:"off",maxLength:v,type:"text",value:M,onFocus:k=>{f.current||(f.current=k.target,setTimeout(()=>{k.target?.select()},0))},onBlur:k=>{f.current&&O(M)},onChange:k=>{K&&L(k.target.value)},onMouseDown:k=>k.stopPropagation(),onKeyDown:k=>k.code==="Escape"?(k.preventDefault(),void _()):k.code==="Enter"?(k.preventDefault(),void O(k.target.value)):void(k.code!=="Tab"?k.stopPropagation():O(k.target.value))};return c.jsx(c.Fragment,{children:s($)})},[K,M,O,_,s,u]),[U,H]=o.useState();o.useLayoutEffect(()=>{let $=Object.assign({},n);(b||F)&&($=Object.assign($,p)),H($)},[b,F,p,n]),o.useEffect(()=>{de&&m?.(M)},[de,m,M]);const R=r.useImperativeElement(t,()=>({startEdit(){u||I||V(!0)},cancel(){_()}}),[]);return c.jsxs("div",{...x,ref:R,style:{flexDirection:"column",display:"flex",...U},className:st(l),children:[c.jsxs("div",{style:{position:"relative",boxSizing:"content-box",whiteSpace:"pre",userSelect:"none",display:"flex",justifyContent:"center"},onDoubleClick:()=>{u||I||V(!0)},onMouseEnter:()=>z(!0),onMouseLeave:()=>z(!1),children:[c.jsx("div",{className:"editable-label-container",style:{textAlign:"center",display:"flex",minHeight:"1em",marginTop:"2px",opacity:K?0:1},children:M}),de]}),c.jsx("div",{style:{whiteSpace:"pre",position:"relative",maxHeight:"0px",height:"0px",visibility:"hidden",marginLeft:"1px",marginRight:"1px",overflow:"hidden",...p},children:M})]})})),$n=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0;function Yt(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function To(e){return"nodeType"in e}function Ct(e){var t,n;return e?Yt(e)?e:To(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Io(e){const{Document:t}=Ct(e);return e instanceof t}function vn(e){return!Yt(e)&&e instanceof Ct(e).HTMLElement}function $r(e){return e instanceof Ct(e).SVGElement}function Zt(e){return e?Yt(e)?e.document:To(e)?Io(e)?e:vn(e)||$r(e)?e.ownerDocument:document:document:document}const Rt=$n?o.useLayoutEffect:o.useEffect;function Wn(e){const t=o.useRef(e);return Rt(()=>{t.current=e}),o.useCallback(function(){for(var n=arguments.length,l=new Array(n),a=0;a<n;a++)l[a]=arguments[a];return t.current==null?void 0:t.current(...l)},[])}function mn(e,t){t===void 0&&(t=[e]);const n=o.useRef(e);return Rt(()=>{n.current!==e&&(n.current=e)},t),n}function cn(e,t){const n=o.useRef();return o.useMemo(()=>{const l=e(n.current);return n.current=l,l},[...t])}function jn(e){const t=Wn(e),n=o.useRef(null),l=o.useCallback(a=>{a!==n.current&&t?.(a,n.current),n.current=a},[]);return[n,l]}function On(e){const t=o.useRef();return o.useEffect(()=>{t.current=e},[e]),t.current}let uo={};function Cn(e,t){return o.useMemo(()=>{if(t)return t;const n=uo[e]==null?0:uo[e]+1;return uo[e]=n,e+"-"+n},[e,t])}function Wr(e){return function(t){for(var n=arguments.length,l=new Array(n>1?n-1:0),a=1;a<n;a++)l[a-1]=arguments[a];return l.reduce((i,m)=>{const h=Object.entries(m);for(const[s,p]of h){const b=i[s];b!=null&&(i[s]=b+e*p)}return i},{...t})}}const _t=Wr(1),fn=Wr(-1);function _n(e){if(!e)return!1;const{KeyboardEvent:t}=Ct(e.target);return t&&e instanceof t}function Bn(e){if((function(t){if(!t)return!1;const{TouchEvent:n}=Ct(t.target);return n&&t instanceof n})(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return(function(t){return"clientX"in t&&"clientY"in t})(e)?{x:e.clientX,y:e.clientY}:null}const Bt=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Bt.Translate.toString(e),Bt.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:l}=e;return t+" "+n+"ms "+l}}}),lr="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Ei(e){return e.matches(lr)?e:e.querySelector(lr)}const Fi={display:"none"};function Ai(e){let{id:t,value:n}=e;return o.createElement("div",{id:t,style:Fi},n)}function Di(e){let{id:t,announcement:n,ariaLiveType:l="assertive"}=e;return o.createElement("div",{id:t,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":l,"aria-atomic":!0},n)}const _r=o.createContext(null),zi={draggable:`
24
24
  To pick up a draggable item, press the space bar.
25
25
  While dragging, use the arrow keys to move the item.
26
26
  Press space again to drop the item in its new position, or press escape to cancel.
27
- `},Ni={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Li(e){let{announcements:t=Ni,container:n,hiddenTextDescribedById:l,screenReaderInstructions:a=zi}=e;const{announce:i,announcement:m}=(function(){const[v,u]=o.useState("");return{announce:o.useCallback(I=>{I!=null&&u(I)},[]),announcement:v}})(),h=Cn("DndLiveRegion"),[s,p]=o.useState(!1);if(o.useEffect(()=>{p(!0)},[]),(function(v){const u=o.useContext(_r);o.useEffect(()=>{if(!u)throw new Error("useDndMonitor must be used within a children of <DndContext>");return u(v)},[v,u])})(o.useMemo(()=>({onDragStart(v){let{active:u}=v;i(t.onDragStart({active:u}))},onDragMove(v){let{active:u,over:I}=v;t.onDragMove&&i(t.onDragMove({active:u,over:I}))},onDragOver(v){let{active:u,over:I}=v;i(t.onDragOver({active:u,over:I}))},onDragEnd(v){let{active:u,over:I}=v;i(t.onDragEnd({active:u,over:I}))},onDragCancel(v){let{active:u,over:I}=v;i(t.onDragCancel({active:u,over:I}))}}),[i,t])),!s)return null;const b=o.createElement(o.Fragment,null,o.createElement(Ai,{id:l,value:a.draggable}),o.createElement(Di,{id:h,announcement:m}));return n?jt.createPortal(b,n):b}var gt;function Vn(){}function go(e,t){return o.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(gt||(gt={}));const kt=Object.freeze({x:0,y:0});function Gr(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Pi(e,t){const n=Bn(e);return n?(n.x-t.left)/t.width*100+"% "+(n.y-t.top)/t.height*100+"%":"0 0"}function Zr(e,t){let{data:{value:n}}=e,{data:{value:l}}=t;return n-l}function ji(e,t){let{data:{value:n}}=e,{data:{value:l}}=t;return l-n}function ir(e){let{left:t,top:n,height:l,width:a}=e;return[{x:t,y:n},{x:t+a,y:n},{x:t,y:n+l},{x:t+a,y:n+l}]}function Xr(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function ar(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const Oi=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:l}=e;const a=ar(t,t.left,t.top),i=[];for(const m of l){const{id:h}=m,s=n.get(h);if(s){const p=Gr(ar(s),a);i.push({id:h,data:{droppableContainer:m,value:p}})}}return i.sort(Zr)};function Bi(e,t){const n=Math.max(t.top,e.top),l=Math.max(t.left,e.left),a=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),m=a-l,h=i-n;if(l<a&&n<i){const s=t.width*t.height,p=e.width*e.height,b=m*h;return Number((b/(s+p-b)).toFixed(4))}return 0}const Vi=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:l}=e;const a=[];for(const i of l){const{id:m}=i,h=n.get(m);if(h){const s=Bi(h,t);s>0&&a.push({id:m,data:{droppableContainer:i,value:s}})}}return a.sort(ji)};function sr(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:kt}function Hi(e){return function(t){for(var n=arguments.length,l=new Array(n>1?n-1:0),a=1;a<n;a++)l[a-1]=arguments[a];return l.reduce((i,m)=>({...i,top:i.top+e*m.y,bottom:i.bottom+e*m.y,left:i.left+e*m.x,right:i.right+e*m.x}),{...t})}}const Ui=Hi(1);function Yr(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}const Ki={ignoreTransform:!1};function Jt(e,t){t===void 0&&(t=Ki);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:p,transformOrigin:b}=Ct(e).getComputedStyle(e);p&&(n=(function(v,u,I){const x=Yr(u);if(!x)return v;const{scaleX:F,scaleY:z,x:K,y:V}=x,M=v.left-K-(1-F)*parseFloat(I),L=v.top-V-(1-z)*parseFloat(I.slice(I.indexOf(" ")+1)),f=F?v.width/F:v.width,A=z?v.height/z:v.height;return{width:f,height:A,top:L,right:M+f,bottom:L+A,left:M}})(n,p,b))}const{top:l,left:a,width:i,height:m,bottom:h,right:s}=n;return{top:l,left:a,width:i,height:m,bottom:h,right:s}}function cr(e){return Jt(e,{ignoreTransform:!0})}function Gn(e,t){const n=[];return e?(function l(a){if(t!=null&&n.length>=t||!a)return n;if(Io(a)&&a.scrollingElement!=null&&!n.includes(a.scrollingElement))return n.push(a.scrollingElement),n;if(!vn(a)||$r(a)||n.includes(a))return n;const i=Ct(e).getComputedStyle(a);return a!==e&&(function(m,h){h===void 0&&(h=Ct(m).getComputedStyle(m));const s=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(p=>{const b=h[p];return typeof b=="string"&&s.test(b)})})(a,i)&&n.push(a),(function(m,h){return h===void 0&&(h=Ct(m).getComputedStyle(m)),h.position==="fixed"})(a,i)?n:l(a.parentNode)})(e):n}function Jr(e){const[t]=Gn(e,1);return t??null}function ho(e){return $n&&e?Yt(e)?e:To(e)?Io(e)||e===Zt(e).scrollingElement?window:vn(e)?e:null:null:null}function Qr(e){return Yt(e)?e.scrollX:e.scrollLeft}function el(e){return Yt(e)?e.scrollY:e.scrollTop}function Co(e){return{x:Qr(e),y:el(e)}}var ht;function tl(e){return!(!$n||!e)&&e===document.scrollingElement}function nl(e){const t={x:0,y:0},n=tl(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},l={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=l.y,isRight:e.scrollLeft>=l.x,maxScroll:l,minScroll:t}}(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(ht||(ht={}));const $i={x:.2,y:.2};function Wi(e,t,n,l,a){let{top:i,left:m,right:h,bottom:s}=n;l===void 0&&(l=10),a===void 0&&(a=$i);const{isTop:p,isBottom:b,isLeft:v,isRight:u}=nl(e),I={x:0,y:0},x={x:0,y:0},F=t.height*a.y,z=t.width*a.x;return!p&&i<=t.top+F?(I.y=ht.Backward,x.y=l*Math.abs((t.top+F-i)/F)):!b&&s>=t.bottom-F&&(I.y=ht.Forward,x.y=l*Math.abs((t.bottom-F-s)/F)),!u&&h>=t.right-z?(I.x=ht.Forward,x.x=l*Math.abs((t.right-z-h)/z)):!v&&m<=t.left+z&&(I.x=ht.Backward,x.x=l*Math.abs((t.left+z-m)/z)),{direction:I,speed:x}}function _i(e){if(e===document.scrollingElement){const{innerWidth:i,innerHeight:m}=window;return{top:0,left:0,right:i,bottom:m,width:i,height:m}}const{top:t,left:n,right:l,bottom:a}=e.getBoundingClientRect();return{top:t,left:n,right:l,bottom:a,width:e.clientWidth,height:e.clientHeight}}function ol(e){return e.reduce((t,n)=>_t(t,Co(n)),kt)}function rl(e,t){if(t===void 0&&(t=Jt),!e)return;const{top:n,left:l,bottom:a,right:i}=t(e);Jr(e)&&(a<=0||i<=0||n>=window.innerHeight||l>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Gi=[["x",["left","right"],function(e){return e.reduce((t,n)=>t+Qr(n),0)}],["y",["top","bottom"],function(e){return e.reduce((t,n)=>t+el(n),0)}]];class yo{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const l=Gn(n),a=ol(l);this.rect={...t},this.width=t.width,this.height=t.height;for(const[i,m,h]of Gi)for(const s of m)Object.defineProperty(this,s,{get:()=>{const p=h(l),b=a[i]-p;return this.rect[s]+b},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class dn{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var l;return(l=this.target)==null?void 0:l.removeEventListener(...n)})},this.target=t}add(t,n,l){var a;(a=this.target)==null||a.addEventListener(t,n,l),this.listeners.push([t,n,l])}}function mo(e,t){const n=Math.abs(e.x),l=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+l**2)>t:"x"in t&&"y"in t?n>t.x&&l>t.y:"x"in t?n>t.x:"y"in t&&l>t.y}var qt,Je;function dr(e){e.preventDefault()}function Zi(e){e.stopPropagation()}(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(qt||(qt={})),(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(Je||(Je={}));const ll={start:[Je.Space,Je.Enter],cancel:[Je.Esc],end:[Je.Space,Je.Enter,Je.Tab]},Xi=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Je.Right:return{...n,x:n.x+25};case Je.Left:return{...n,x:n.x-25};case Je.Down:return{...n,y:n.y+25};case Je.Up:return{...n,y:n.y-25}}};class Eo{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new dn(Zt(n)),this.windowListeners=new dn(Ct(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(qt.Resize,this.handleCancel),this.windowListeners.add(qt.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(qt.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,l=t.node.current;l&&rl(l),n(kt)}handleKeyDown(t){if(_n(t)){const{active:n,context:l,options:a}=this.props,{keyboardCodes:i=ll,coordinateGetter:m=Xi,scrollBehavior:h="smooth"}=a,{code:s}=t;if(i.end.includes(s))return void this.handleEnd(t);if(i.cancel.includes(s))return void this.handleCancel(t);const{collisionRect:p}=l.current,b=p?{x:p.left,y:p.top}:kt;this.referenceCoordinates||(this.referenceCoordinates=b);const v=m(t,{active:n,context:l.current,currentCoordinates:b});if(v){const u=fn(v,b),I={x:0,y:0},{scrollableAncestors:x}=l.current;for(const F of x){const z=t.code,{isTop:K,isRight:V,isLeft:M,isBottom:L,maxScroll:f,minScroll:A}=nl(F),S=_i(F),W={x:Math.min(z===Je.Right?S.right-S.width/2:S.right,Math.max(z===Je.Right?S.left:S.left+S.width/2,v.x)),y:Math.min(z===Je.Down?S.bottom-S.height/2:S.bottom,Math.max(z===Je.Down?S.top:S.top+S.height/2,v.y))},D=z===Je.Right&&!V||z===Je.Left&&!M,O=z===Je.Down&&!L||z===Je.Up&&!K;if(D&&W.x!==v.x){const _=F.scrollLeft+u.x,de=z===Je.Right&&_<=f.x||z===Je.Left&&_>=A.x;if(de&&!u.y)return void F.scrollTo({left:_,behavior:h});I.x=de?F.scrollLeft-_:z===Je.Right?F.scrollLeft-f.x:F.scrollLeft-A.x,I.x&&F.scrollBy({left:-I.x,behavior:h});break}if(O&&W.y!==v.y){const _=F.scrollTop+u.y,de=z===Je.Down&&_<=f.y||z===Je.Up&&_>=A.y;if(de&&!u.x)return void F.scrollTo({top:_,behavior:h});I.y=de?F.scrollTop-_:z===Je.Down?F.scrollTop-f.y:F.scrollTop-A.y,I.y&&F.scrollBy({top:-I.y,behavior:h});break}}this.handleMove(t,_t(fn(v,this.referenceCoordinates),I))}}}handleMove(t,n){const{onMove:l}=this.props;t.preventDefault(),l(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function ur(e){return!!(e&&"distance"in e)}function gr(e){return!!(e&&"delay"in e)}Eo.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:l=ll,onActivation:a}=t,{active:i}=n;const{code:m}=e.nativeEvent;if(l.start.includes(m)){const h=i.activatorNode.current;return(!h||e.target===h)&&(e.preventDefault(),a?.({event:e.nativeEvent}),!0)}return!1}}];class Fo{constructor(t,n,l){var a;l===void 0&&(l=(function(h){const{EventTarget:s}=Ct(h);return h instanceof s?h:Zt(h)})(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:i}=t,{target:m}=i;this.props=t,this.events=n,this.document=Zt(m),this.documentListeners=new dn(this.document),this.listeners=new dn(l),this.windowListeners=new dn(Ct(m)),this.initialCoordinates=(a=Bn(i))!=null?a:kt,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:l}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(qt.Resize,this.handleCancel),this.windowListeners.add(qt.DragStart,dr),this.windowListeners.add(qt.VisibilityChange,this.handleCancel),this.windowListeners.add(qt.ContextMenu,dr),this.documentListeners.add(qt.Keydown,this.handleKeydown),n){if(l!=null&&l({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(gr(n))return this.timeoutId=setTimeout(this.handleStart,n.delay),void this.handlePending(n);if(ur(n))return void this.handlePending(n)}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:l,onPending:a}=this.props;a(l,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(qt.Click,Zi,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(qt.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:l,initialCoordinates:a,props:i}=this,{onMove:m,options:{activationConstraint:h}}=i;if(!a)return;const s=(n=Bn(t))!=null?n:kt,p=fn(a,s);if(!l&&h){if(ur(h)){if(h.tolerance!=null&&mo(p,h.tolerance))return this.handleCancel();if(mo(p,h.distance))return this.handleStart()}return gr(h)&&mo(p,h.tolerance)?this.handleCancel():void this.handlePending(h,p)}t.cancelable&&t.preventDefault(),m(s)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===Je.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Yi={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class il extends Fo{constructor(t){const{event:n}=t,l=Zt(n.target);super(t,Yi,l)}}il.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:l}=t;return!(!n.isPrimary||n.button!==0)&&(l?.({event:n}),!0)}}];const Ji={move:{name:"mousemove"},end:{name:"mouseup"}};var wo;(function(e){e[e.RightClick=2]="RightClick"})(wo||(wo={}));class al extends Fo{constructor(t){super(t,Ji,Zt(t.event.target))}}al.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:l}=t;return n.button!==wo.RightClick&&(l?.({event:n}),!0)}}];const fo={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class sl extends Fo{constructor(t){super(t,fo)}static setup(){return window.addEventListener(fo.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(fo.move.name,t)};function t(){}}}var un,Hn;function Qi(e){let{acceleration:t,activator:n=un.Pointer,canScroll:l,draggingRect:a,enabled:i,interval:m=5,order:h=Hn.TreeOrder,pointerCoordinates:s,scrollableAncestors:p,scrollableAncestorRects:b,delta:v,threshold:u}=e;const I=(function(A){let{delta:S,disabled:W}=A;const D=On(S);return cn(O=>{if(W||!D||!O)return ea;const _={x:Math.sign(S.x-D.x),y:Math.sign(S.y-D.y)};return{x:{[ht.Backward]:O.x[ht.Backward]||_.x===-1,[ht.Forward]:O.x[ht.Forward]||_.x===1},y:{[ht.Backward]:O.y[ht.Backward]||_.y===-1,[ht.Forward]:O.y[ht.Forward]||_.y===1}}},[W,S,D])})({delta:v,disabled:!i}),[x,F]=(function(){const A=o.useRef(null);return[o.useCallback((S,W)=>{A.current=setInterval(S,W)},[]),o.useCallback(()=>{A.current!==null&&(clearInterval(A.current),A.current=null)},[])]})(),z=o.useRef({x:0,y:0}),K=o.useRef({x:0,y:0}),V=o.useMemo(()=>{switch(n){case un.Pointer:return s?{top:s.y,bottom:s.y,left:s.x,right:s.x}:null;case un.DraggableRect:return a}},[n,a,s]),M=o.useRef(null),L=o.useCallback(()=>{const A=M.current;if(!A)return;const S=z.current.x*K.current.x,W=z.current.y*K.current.y;A.scrollBy(S,W)},[]),f=o.useMemo(()=>h===Hn.TreeOrder?[...p].reverse():p,[h,p]);o.useEffect(()=>{if(i&&p.length&&V){for(const A of f){if(l?.(A)===!1)continue;const S=p.indexOf(A),W=b[S];if(!W)continue;const{direction:D,speed:O}=Wi(A,W,V,t,u);for(const _ of["x","y"])I[_][D[_]]||(O[_]=0,D[_]=0);if(O.x>0||O.y>0)return F(),M.current=A,x(L,m),z.current=O,void(K.current=D)}z.current={x:0,y:0},K.current={x:0,y:0},F()}else F()},[t,L,l,F,i,m,JSON.stringify(V),JSON.stringify(I),x,p,f,b,JSON.stringify(u)])}sl.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:l}=t;const{touches:a}=n;return!(a.length>1)&&(l?.({event:n}),!0)}}],(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(un||(un={})),(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Hn||(Hn={}));const ea={x:{[ht.Backward]:!1,[ht.Forward]:!1},y:{[ht.Backward]:!1,[ht.Forward]:!1}};var pn,bo;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(pn||(pn={})),(function(e){e.Optimized="optimized"})(bo||(bo={}));const hr=new Map;function xo(e,t){return cn(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Un(e){let{callback:t,disabled:n}=e;const l=Wn(t),a=o.useMemo(()=>{if(n||typeof window>"u"||window.ResizeObserver===void 0)return;const{ResizeObserver:i}=window;return new i(l)},[n]);return o.useEffect(()=>()=>a?.disconnect(),[a]),a}function ta(e){return new yo(Jt(e),e)}function mr(e,t,n){t===void 0&&(t=ta);const[l,a]=o.useState(null);function i(){a(s=>{if(!e)return null;var p;if(e.isConnected===!1)return(p=s??n)!=null?p:null;const b=t(e);return JSON.stringify(s)===JSON.stringify(b)?s:b})}const m=(function(s){let{callback:p,disabled:b}=s;const v=Wn(p),u=o.useMemo(()=>{if(b||typeof window>"u"||window.MutationObserver===void 0)return;const{MutationObserver:I}=window;return new I(v)},[v,b]);return o.useEffect(()=>()=>u?.disconnect(),[u]),u})({callback(s){if(e)for(const p of s){const{type:b,target:v}=p;if(b==="childList"&&v instanceof HTMLElement&&v.contains(e)){i();break}}}}),h=Un({callback:i});return Rt(()=>{i(),e?(h?.observe(e),m?.observe(document.body,{childList:!0,subtree:!0})):(h?.disconnect(),m?.disconnect())},[e]),l}const fr=[];function pr(e,t){t===void 0&&(t=[]);const n=o.useRef(null);return o.useEffect(()=>{n.current=null},t),o.useEffect(()=>{const l=e!==kt;l&&!n.current&&(n.current=e),!l&&n.current&&(n.current=null)},[e]),n.current?fn(e,n.current):kt}function vr(e){return o.useMemo(()=>e?(function(t){const n=t.innerWidth,l=t.innerHeight;return{top:0,left:0,right:n,bottom:l,width:n,height:l}})(e):null,[e])}const Cr=[];function cl(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return vn(t)?t:e}const na=[{sensor:il,options:{}},{sensor:Eo,options:{}}],oa={current:{}},zn={draggable:{measure:cr},droppable:{measure:cr,strategy:pn.WhileDragging,frequency:bo.Optimized},dragOverlay:{measure:Jt}};class gn extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,l;return(n=(l=this.get(t))==null?void 0:l.node.current)!=null?n:void 0}}const ra={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new gn,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Vn},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:zn,measureDroppableContainers:Vn,windowRect:null,measuringScheduled:!1},dl={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Vn,draggableNodes:new Map,over:null,measureDroppableContainers:Vn},yn=o.createContext(dl),ul=o.createContext(ra);function la(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new gn}}}function ia(e,t){switch(t.type){case gt.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case gt.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case gt.DragEnd:case gt.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case gt.RegisterDroppable:{const{element:n}=t,{id:l}=n,a=new gn(e.droppable.containers);return a.set(l,n),{...e,droppable:{...e.droppable,containers:a}}}case gt.SetDroppableDisabled:{const{id:n,key:l,disabled:a}=t,i=e.droppable.containers.get(n);if(!i||l!==i.key)return e;const m=new gn(e.droppable.containers);return m.set(n,{...i,disabled:a}),{...e,droppable:{...e.droppable,containers:m}}}case gt.UnregisterDroppable:{const{id:n,key:l}=t,a=e.droppable.containers.get(n);if(!a||l!==a.key)return e;const i=new gn(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function aa(e){let{disabled:t}=e;const{active:n,activatorEvent:l,draggableNodes:a}=o.useContext(yn),i=On(l),m=On(n?.id);return o.useEffect(()=>{if(!t&&!l&&i&&m!=null){if(!_n(i)||document.activeElement===i.target)return;const h=a.get(m);if(!h)return;const{activatorNode:s,node:p}=h;if(!s.current&&!p.current)return;requestAnimationFrame(()=>{for(const b of[s.current,p.current]){if(!b)continue;const v=Ei(b);if(v){v.focus();break}}})}},[l,t,a,m,i]),null}function gl(e,t){let{transform:n,...l}=t;return e!=null&&e.length?e.reduce((a,i)=>i({transform:a,...l}),n):n}const Zn=o.createContext({...kt,scaleX:1,scaleY:1});var At;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(At||(At={}));const sa=o.memo(function(e){var t,n,l,a;let{id:i,accessibility:m,autoScroll:h=!0,children:s,sensors:p=na,collisionDetection:b=Vi,measuring:v,modifiers:u,...I}=e;const x=o.useReducer(ia,void 0,la),[F,z]=x,[K,V]=(function(){const[w]=o.useState(()=>new Set),E=o.useCallback(G=>(w.add(G),()=>w.delete(G)),[w]);return[o.useCallback(G=>{let{type:oe,event:se}=G;w.forEach(ue=>{var Q;return(Q=ue[oe])==null?void 0:Q.call(ue,se)})},[w]),E]})(),[M,L]=o.useState(At.Uninitialized),f=M===At.Initialized,{draggable:{active:A,nodes:S,translate:W},droppable:{containers:D}}=F,O=A!=null?S.get(A):null,_=o.useRef({initial:null,translated:null}),de=o.useMemo(()=>{var w;return A!=null?{id:A,data:(w=O?.data)!=null?w:oa,rect:_}:null},[A,O]),U=o.useRef(null),[H,R]=o.useState(null),[$,k]=o.useState(null),P=mn(I,Object.values(I)),ee=Cn("DndDescribedBy",i),re=o.useMemo(()=>D.getEnabled(),[D]),Re=(he=v,o.useMemo(()=>({draggable:{...zn.draggable,...he?.draggable},droppable:{...zn.droppable,...he?.droppable},dragOverlay:{...zn.dragOverlay,...he?.dragOverlay}}),[he?.draggable,he?.droppable,he?.dragOverlay]));var he;const{droppableRects:De,measureDroppableContainers:Fe,measuringScheduled:ve}=(function(w,E){let{dragging:G,dependencies:oe,config:se}=E;const[ue,Q]=o.useState(null),{frequency:ye,measure:pe,strategy:we}=se,Ue=o.useRef(w),Te=(function(){switch(we){case pn.Always:return!1;case pn.BeforeDragging:return G;default:return!G}})(),Ne=mn(Te),je=o.useCallback(function(et){et===void 0&&(et=[]),Ne.current||Q(Oe=>Oe===null?et:Oe.concat(et.filter(Xe=>!Oe.includes(Xe))))},[Ne]),_e=o.useRef(null),We=cn(et=>{if(Te&&!G)return hr;if(!et||et===hr||Ue.current!==w||ue!=null){const Oe=new Map;for(let Xe of w){if(!Xe)continue;if(ue&&ue.length>0&&!ue.includes(Xe.id)&&Xe.rect.current){Oe.set(Xe.id,Xe.rect.current);continue}const ct=Xe.node.current,bt=ct?new yo(pe(ct),ct):null;Xe.rect.current=bt,bt&&Oe.set(Xe.id,bt)}return Oe}return et},[w,ue,G,Te,pe]);return o.useEffect(()=>{Ue.current=w},[w]),o.useEffect(()=>{Te||je()},[G,Te]),o.useEffect(()=>{ue&&ue.length>0&&Q(null)},[JSON.stringify(ue)]),o.useEffect(()=>{Te||typeof ye!="number"||_e.current!==null||(_e.current=setTimeout(()=>{je(),_e.current=null},ye))},[ye,Te,je,...oe]),{droppableRects:We,measureDroppableContainers:je,measuringScheduled:ue!=null}})(re,{dragging:f,dependencies:[W.x,W.y],config:Re.droppable}),ke=(function(w,E){const G=E!=null?w.get(E):void 0,oe=G?G.node.current:null;return cn(se=>{var ue;return E==null?null:(ue=oe??se)!=null?ue:null},[oe,E])})(S,A),$e=o.useMemo(()=>$?Bn($):null,[$]),te=(function(){const w=H?.autoScrollEnabled===!1,E=typeof h=="object"?h.enabled===!1:h===!1,G=f&&!w&&!E;return typeof h=="object"?{...h,enabled:G}:{enabled:G}})(),X=(function(w,E){return xo(w,E)})(ke,Re.draggable.measure);(function(w){let{activeNode:E,measure:G,initialRect:oe,config:se=!0}=w;const ue=o.useRef(!1),{x:Q,y:ye}=typeof se=="boolean"?{x:se,y:se}:se;Rt(()=>{if(!Q&&!ye||!E)return void(ue.current=!1);if(ue.current||!oe)return;const pe=E?.node.current;if(!pe||pe.isConnected===!1)return;const we=sr(G(pe),oe);if(Q||(we.x=0),ye||(we.y=0),ue.current=!0,Math.abs(we.x)>0||Math.abs(we.y)>0){const Ue=Jr(pe);Ue&&Ue.scrollBy({top:we.y,left:we.x})}},[E,Q,ye,oe,G])})({activeNode:A!=null?S.get(A):null,config:te.layoutShiftCompensation,initialRect:X,measure:Re.draggable.measure});const ce=mr(ke,Re.draggable.measure,X),Ae=mr(ke?ke.parentElement:null),Ce=o.useRef({activatorEvent:null,active:null,activeNode:ke,collisionRect:null,collisions:null,droppableRects:De,draggableNodes:S,draggingNode:null,draggingNodeRect:null,droppableContainers:D,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),B=D.getNodeFor((t=Ce.current.over)==null?void 0:t.id),ne=(function(w){let{measure:E}=w;const[G,oe]=o.useState(null),se=Un({callback:o.useCallback(pe=>{for(const{target:we}of pe)if(vn(we)){oe(Ue=>{const Te=E(we);return Ue?{...Ue,width:Te.width,height:Te.height}:Te});break}},[E])}),ue=o.useCallback(pe=>{const we=cl(pe);se?.disconnect(),we&&se?.observe(we),oe(we?E(we):null)},[E,se]),[Q,ye]=jn(ue);return o.useMemo(()=>({nodeRef:Q,rect:G,setRef:ye}),[G,Q,ye])})({measure:Re.dragOverlay.measure}),me=(n=ne.nodeRef.current)!=null?n:ke,ae=f?(l=ne.rect)!=null?l:ce:null,ze=!!(ne.nodeRef.current&&ne.rect),le=sr(fe=ze?null:ce,xo(fe));var fe;const Ee=vr(me?Ct(me):null),be=(function(w){const E=o.useRef(w),G=cn(oe=>w?oe&&oe!==fr&&w&&E.current&&w.parentNode===E.current.parentNode?oe:Gn(w):fr,[w]);return o.useEffect(()=>{E.current=w},[w]),G})(f?B??ke:null),He=(function(w,E){E===void 0&&(E=Jt);const[G]=w,oe=vr(G?Ct(G):null),[se,ue]=o.useState(Cr);function Q(){ue(()=>w.length?w.map(pe=>tl(pe)?oe:new yo(E(pe),pe)):Cr)}const ye=Un({callback:Q});return Rt(()=>{ye?.disconnect(),Q(),w.forEach(pe=>ye?.observe(pe))},[w]),se})(be),C=gl(u,{transform:{x:W.x-le.x,y:W.y-le.y,scaleX:1,scaleY:1},activatorEvent:$,active:de,activeNodeRect:ce,containerNodeRect:Ae,draggingNodeRect:ae,over:Ce.current.over,overlayNodeRect:ne.rect,scrollableAncestors:be,scrollableAncestorRects:He,windowRect:Ee}),Pe=$e?_t($e,W):null,Be=(function(w){const[E,G]=o.useState(null),oe=o.useRef(w),se=o.useCallback(ue=>{const Q=ho(ue.target);Q&&G(ye=>ye?(ye.set(Q,Co(Q)),new Map(ye)):null)},[]);return o.useEffect(()=>{const ue=oe.current;if(w!==ue){Q(ue);const ye=w.map(pe=>{const we=ho(pe);return we?(we.addEventListener("scroll",se,{passive:!0}),[we,Co(we)]):null}).filter(pe=>pe!=null);G(ye.length?new Map(ye):null),oe.current=w}return()=>{Q(w),Q(ue)};function Q(ye){ye.forEach(pe=>{const we=ho(pe);we?.removeEventListener("scroll",se)})}},[se,w]),o.useMemo(()=>w.length?E?Array.from(E.values()).reduce((ue,Q)=>_t(ue,Q),kt):ol(w):kt,[w,E])})(be),Qe=pr(Be),ie=pr(Be,[ce]),Me=_t(C,Qe),Le=ae?Ui(ae,C):null,Ie=de&&Le?b({active:de,collisionRect:Le,droppableRects:De,droppableContainers:re,pointerCoordinates:Pe}):null,xe=Xr(Ie,"id"),[N,Y]=o.useState(null),j=(function(w,E,G){return{...w,scaleX:E&&G?E.width/G.width:1,scaleY:E&&G?E.height/G.height:1}})(ze?C:_t(C,ie),(a=N?.rect)!=null?a:null,ce),Z=o.useRef(null),qe=o.useCallback((w,E)=>{let{sensor:G,options:oe}=E;if(U.current==null)return;const se=S.get(U.current);if(!se)return;const ue=w.nativeEvent,Q=new G({active:U.current,activeNode:se,event:ue,options:oe,context:Ce,onAbort(pe){if(!S.get(pe))return;const{onDragAbort:we}=P.current,Ue={id:pe};we?.(Ue),K({type:"onDragAbort",event:Ue})},onPending(pe,we,Ue,Te){if(!S.get(pe))return;const{onDragPending:Ne}=P.current,je={id:pe,constraint:we,initialCoordinates:Ue,offset:Te};Ne?.(je),K({type:"onDragPending",event:je})},onStart(pe){const we=U.current;if(we==null)return;const Ue=S.get(we);if(!Ue)return;const{onDragStart:Te}=P.current,Ne={activatorEvent:ue,active:{id:we,data:Ue.data,rect:_}};jt.unstable_batchedUpdates(()=>{Te?.(Ne),L(At.Initializing),z({type:gt.DragStart,initialCoordinates:pe,active:we}),K({type:"onDragStart",event:Ne}),R(Z.current),k(ue)})},onMove(pe){z({type:gt.DragMove,coordinates:pe})},onEnd:ye(gt.DragEnd),onCancel:ye(gt.DragCancel)});function ye(pe){return async function(){const{active:we,collisions:Ue,over:Te,scrollAdjustedTranslate:Ne}=Ce.current;let je=null;if(we&&Ne){const{cancelDrop:_e}=P.current;je={activatorEvent:ue,active:we,collisions:Ue,delta:Ne,over:Te},pe===gt.DragEnd&&typeof _e=="function"&&await Promise.resolve(_e(je))&&(pe=gt.DragCancel)}U.current=null,jt.unstable_batchedUpdates(()=>{z({type:pe}),L(At.Uninitialized),Y(null),R(null),k(null),Z.current=null;const _e=pe===gt.DragEnd?"onDragEnd":"onDragCancel";if(je){const We=P.current[_e];We?.(je),K({type:_e,event:je})}})}}Z.current=Q},[S]),g=o.useCallback((w,E)=>(G,oe)=>{const se=G.nativeEvent,ue=S.get(oe);if(U.current!==null||!ue||se.dndKit||se.defaultPrevented)return;const Q={active:ue};w(G,E.options,Q)===!0&&(se.dndKit={capturedBy:E.sensor},U.current=oe,qe(G,E))},[S,qe]),T=(function(w,E){return o.useMemo(()=>w.reduce((G,oe)=>{const{sensor:se}=oe;return[...G,...se.activators.map(ue=>({eventName:ue.eventName,handler:E(ue.handler,oe)}))]},[]),[w,E])})(p,g);(function(w){o.useEffect(()=>{if(!$n)return;const E=w.map(G=>{let{sensor:oe}=G;return oe.setup==null?void 0:oe.setup()});return()=>{for(const G of E)G?.()}},w.map(E=>{let{sensor:G}=E;return G}))})(p),Rt(()=>{ce&&M===At.Initializing&&L(At.Initialized)},[ce,M]),o.useEffect(()=>{const{onDragMove:w}=P.current,{active:E,activatorEvent:G,collisions:oe,over:se}=Ce.current;if(!E||!G)return;const ue={active:E,activatorEvent:G,collisions:oe,delta:{x:Me.x,y:Me.y},over:se};jt.unstable_batchedUpdates(()=>{w?.(ue),K({type:"onDragMove",event:ue})})},[Me.x,Me.y]),o.useEffect(()=>{const{active:w,activatorEvent:E,collisions:G,droppableContainers:oe,scrollAdjustedTranslate:se}=Ce.current;if(!w||U.current==null||!E||!se)return;const{onDragOver:ue}=P.current,Q=oe.get(xe),ye=Q&&Q.rect.current?{id:Q.id,rect:Q.rect.current,data:Q.data,disabled:Q.disabled}:null,pe={active:w,activatorEvent:E,collisions:G,delta:{x:se.x,y:se.y},over:ye};jt.unstable_batchedUpdates(()=>{Y(ye),ue?.(pe),K({type:"onDragOver",event:pe})})},[xe]),Rt(()=>{Ce.current={activatorEvent:$,active:de,activeNode:ke,collisionRect:Le,collisions:Ie,droppableRects:De,draggableNodes:S,draggingNode:me,draggingNodeRect:ae,droppableContainers:D,over:N,scrollableAncestors:be,scrollAdjustedTranslate:Me},_.current={initial:ae,translated:Le}},[de,ke,Ie,Le,S,me,ae,De,D,N,be,Me]),Qi({...te,delta:W,draggingRect:Le,pointerCoordinates:Pe,scrollableAncestors:be,scrollableAncestorRects:He});const q=o.useMemo(()=>({active:de,activeNode:ke,activeNodeRect:ce,activatorEvent:$,collisions:Ie,containerNodeRect:Ae,dragOverlay:ne,draggableNodes:S,droppableContainers:D,droppableRects:De,over:N,measureDroppableContainers:Fe,scrollableAncestors:be,scrollableAncestorRects:He,measuringConfiguration:Re,measuringScheduled:ve,windowRect:Ee}),[de,ke,ce,$,Ie,Ae,ne,S,D,De,N,Fe,be,He,Re,ve,Ee]),y=o.useMemo(()=>({activatorEvent:$,activators:T,active:de,activeNodeRect:ce,ariaDescribedById:{draggable:ee},dispatch:z,draggableNodes:S,over:N,measureDroppableContainers:Fe}),[$,T,de,ce,z,ee,S,N,Fe]);return o.createElement(_r.Provider,{value:V},o.createElement(yn.Provider,{value:y},o.createElement(ul.Provider,{value:q},o.createElement(Zn.Provider,{value:j},s)),o.createElement(aa,{disabled:m?.restoreFocus===!1})),o.createElement(Li,{...m,hiddenTextDescribedById:ee}))}),ca=o.createContext(null),yr="button";function da(e){let{id:t,data:n,disabled:l=!1,attributes:a}=e;const i=Cn("Draggable"),{activators:m,activatorEvent:h,active:s,activeNodeRect:p,ariaDescribedById:b,draggableNodes:v,over:u}=o.useContext(yn),{role:I=yr,roleDescription:x="draggable",tabIndex:F=0}=a??{},z=s?.id===t,K=o.useContext(z?Zn:ca),[V,M]=jn(),[L,f]=jn(),A=(function(W,D){return o.useMemo(()=>W.reduce((O,_)=>{let{eventName:de,handler:U}=_;return O[de]=H=>{U(H,D)},O},{}),[W,D])})(m,t),S=mn(n);return Rt(()=>(v.set(t,{id:t,key:i,node:V,activatorNode:L,data:S}),()=>{const W=v.get(t);W&&W.key===i&&v.delete(t)}),[v,t]),{active:s,activatorEvent:h,activeNodeRect:p,attributes:o.useMemo(()=>({role:I,tabIndex:F,"aria-disabled":l,"aria-pressed":!(!z||I!==yr)||void 0,"aria-roledescription":x,"aria-describedby":b.draggable}),[l,I,F,z,x,b.draggable]),isDragging:z,listeners:l?void 0:A,node:V,over:u,setNodeRef:M,setActivatorNodeRef:f,transform:K}}function hl(){return o.useContext(ul)}const ua={timeout:25};function ga(e){let{animation:t,children:n}=e;const[l,a]=o.useState(null),[i,m]=o.useState(null),h=On(n);return n||l||!h||a(h),Rt(()=>{if(!i)return;const s=l?.key,p=l?.props.id;s!=null&&p!=null?Promise.resolve(t(p,i)).then(()=>{a(null)}):a(null)},[t,l,i]),o.createElement(o.Fragment,null,n,l?o.cloneElement(l,{ref:m}):null)}const ha={x:0,y:0,scaleX:1,scaleY:1};function ma(e){let{children:t}=e;return o.createElement(yn.Provider,{value:dl},o.createElement(Zn.Provider,{value:ha},t))}const fa={position:"fixed",touchAction:"none"},pa=e=>_n(e)?"transform 250ms ease":void 0,va=o.forwardRef((e,t)=>{let{as:n,activatorEvent:l,adjustScale:a,children:i,className:m,rect:h,style:s,transform:p,transition:b=pa}=e;if(!h)return null;const v=a?p:{...p,scaleX:1,scaleY:1},u={...fa,width:h.width,height:h.height,top:h.top,left:h.left,transform:Bt.Transform.toString(v),transformOrigin:a&&l?Pi(l,h):void 0,transition:typeof b=="function"?b(l):b,...s};return o.createElement(n,{className:m,style:u,ref:t},i)}),Ca=e=>t=>{let{active:n,dragOverlay:l}=t;const a={},{styles:i,className:m}=e;if(i!=null&&i.active)for(const[h,s]of Object.entries(i.active))s!==void 0&&(a[h]=n.node.style.getPropertyValue(h),n.node.style.setProperty(h,s));if(i!=null&&i.dragOverlay)for(const[h,s]of Object.entries(i.dragOverlay))s!==void 0&&l.node.style.setProperty(h,s);return m!=null&&m.active&&n.node.classList.add(m.active),m!=null&&m.dragOverlay&&l.node.classList.add(m.dragOverlay),function(){for(const[h,s]of Object.entries(a))n.node.style.setProperty(h,s);m!=null&&m.active&&n.node.classList.remove(m.active)}},ml={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:Bt.Transform.toString(t)},{transform:Bt.Transform.toString(n)}]},sideEffects:Ca({styles:{active:{opacity:"0"}}})};function ya(e){let{config:t,draggableNodes:n,droppableContainers:l,measuringConfiguration:a}=e;return Wn((i,m)=>{if(t===null)return;const h=n.get(i);if(!h)return;const s=h.node.current;if(!s)return;const p=cl(m);if(!p)return;const{transform:b}=Ct(m).getComputedStyle(m),v=Yr(b);if(!v)return;const u=typeof t=="function"?t:(function(I){const{duration:x,easing:F,sideEffects:z,keyframes:K}={...ml,...I};return V=>{let{active:M,dragOverlay:L,transform:f,...A}=V;if(!x)return;const S={x:L.rect.left-M.rect.left,y:L.rect.top-M.rect.top},W={scaleX:f.scaleX!==1?M.rect.width*f.scaleX/L.rect.width:1,scaleY:f.scaleY!==1?M.rect.height*f.scaleY/L.rect.height:1},D={x:f.x-S.x,y:f.y-S.y,...W},O=K({...A,active:M,dragOverlay:L,transform:{initial:f,final:D}}),[_]=O,de=O[O.length-1];if(JSON.stringify(_)===JSON.stringify(de))return;const U=z?.({active:M,dragOverlay:L,...A}),H=L.node.animate(O,{duration:x,easing:F,fill:"forwards"});return new Promise(R=>{H.onfinish=()=>{U?.(),R()}})}})(t);return rl(s,a.draggable.measure),u({active:{id:i,data:h.data,node:s,rect:a.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:m,rect:a.dragOverlay.measure(p)},droppableContainers:l,measuringConfiguration:a,transform:v})})}let wr=0;function wa(e){return o.useMemo(()=>{if(e!=null)return wr++,wr},[e])}const ba=o.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:l,style:a,transition:i,modifiers:m,wrapperElement:h="div",className:s,zIndex:p=999}=e;const{activatorEvent:b,active:v,activeNodeRect:u,containerNodeRect:I,draggableNodes:x,droppableContainers:F,dragOverlay:z,over:K,measuringConfiguration:V,scrollableAncestors:M,scrollableAncestorRects:L,windowRect:f}=hl(),A=o.useContext(Zn),S=wa(v?.id),W=gl(m,{activatorEvent:b,active:v,activeNodeRect:u,containerNodeRect:I,draggingNodeRect:z.rect,over:K,overlayNodeRect:z.rect,scrollableAncestors:M,scrollableAncestorRects:L,transform:A,windowRect:f}),D=xo(u),O=ya({config:l,draggableNodes:x,droppableContainers:F,measuringConfiguration:V}),_=D?z.setRef:void 0;return o.createElement(ma,null,o.createElement(ga,{animation:O},v&&S?o.createElement(va,{key:S,id:v.id,ref:_,as:h,activatorEvent:b,adjustScale:t,className:s,transition:i,rect:D,style:{zIndex:p,...a},transform:W},n):null))});function Ao(e,t,n){const l=e.slice();return l.splice(n<0?l.length+n:n,0,l.splice(t,1)[0]),l}function xa(e,t){return e.reduce((n,l,a)=>{const i=t.get(l);return i&&(n[a]=i),n},Array(e.length))}function An(e){return e!==null&&e>=0}const Dn={scaleX:1,scaleY:1},qa=e=>{var t;let{rects:n,activeNodeRect:l,activeIndex:a,overIndex:i,index:m}=e;const h=(t=n[a])!=null?t:l;if(!h)return null;const s=(function(p,b,v){const u=p[b],I=p[b-1],x=p[b+1];return!u||!I&&!x?0:v<b?I?u.left-(I.left+I.width):x.left-(u.left+u.width):x?x.left-(u.left+u.width):u.left-(I.left+I.width)})(n,m,a);if(m===a){const p=n[i];return p?{x:a<i?p.left+p.width-(h.left+h.width):p.left-h.left,y:0,...Dn}:null}return m>a&&m<=i?{x:-h.width-s,y:0,...Dn}:m<a&&m>=i?{x:h.width+s,y:0,...Dn}:{x:0,y:0,...Dn}},Do=e=>{let{rects:t,activeIndex:n,overIndex:l,index:a}=e;const i=Ao(t,l,n),m=t[a],h=i[a];return h&&m?{x:h.left-m.left,y:h.top-m.top,scaleX:h.width/m.width,scaleY:h.height/m.height}:null},fl="Sortable",pl=o.createContext({activeIndex:-1,containerId:fl,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Do,disabled:{draggable:!1,droppable:!1}});function Sa(e){let{children:t,id:n,items:l,strategy:a=Do,disabled:i=!1}=e;const{active:m,dragOverlay:h,droppableRects:s,over:p,measureDroppableContainers:b}=hl(),v=Cn(fl,n),u=h.rect!==null,I=o.useMemo(()=>l.map(A=>typeof A=="object"&&"id"in A?A.id:A),[l]),x=m!=null,F=m?I.indexOf(m.id):-1,z=p?I.indexOf(p.id):-1,K=o.useRef(I),V=!(function(A,S){if(A===S)return!0;if(A.length!==S.length)return!1;for(let W=0;W<A.length;W++)if(A[W]!==S[W])return!1;return!0})(I,K.current),M=z!==-1&&F===-1||V,L=(function(A){return typeof A=="boolean"?{draggable:A,droppable:A}:A})(i);Rt(()=>{V&&x&&b(I)},[V,I,x,b]),o.useEffect(()=>{K.current=I},[I]);const f=o.useMemo(()=>({activeIndex:F,containerId:v,disabled:L,disableTransforms:M,items:I,overIndex:z,useDragOverlay:u,sortedRects:xa(I,s),strategy:a}),[F,v,L.draggable,L.droppable,M,I,z,s,u,a]);return o.createElement(pl.Provider,{value:f},t)}const Ra=e=>{let{id:t,items:n,activeIndex:l,overIndex:a}=e;return Ao(n,l,a).indexOf(t)},ka=e=>{let{containerId:t,isSorting:n,wasDragging:l,index:a,items:i,newIndex:m,previousItems:h,previousContainerId:s,transition:p}=e;return!(!p||!l)&&(h===i||a!==m)&&(!!n||m!==a&&t===s)},Ma={duration:200,easing:"ease"},vl="transform",Ta=Bt.Transition.toString({property:vl,duration:0,easing:"linear"}),Ia={roleDescription:"sortable"};function Ea(e){let{animateLayoutChanges:t=ka,attributes:n,disabled:l,data:a,getNewIndex:i=Ra,id:m,strategy:h,resizeObserverConfig:s,transition:p=Ma}=e;const{items:b,containerId:v,activeIndex:u,disabled:I,disableTransforms:x,sortedRects:F,overIndex:z,useDragOverlay:K,strategy:V}=o.useContext(pl),M=(function(B,ne){var me,ae;return typeof B=="boolean"?{draggable:B,droppable:!1}:{draggable:(me=B?.draggable)!=null?me:ne.draggable,droppable:(ae=B?.droppable)!=null?ae:ne.droppable}})(l,I),L=b.indexOf(m),f=o.useMemo(()=>({sortable:{containerId:v,index:L,items:b},...a}),[v,a,L,b]),A=o.useMemo(()=>b.slice(b.indexOf(m)),[b,m]),{rect:S,node:W,isOver:D,setNodeRef:O}=(function(B){let{data:ne,disabled:me=!1,id:ae,resizeObserverConfig:ze}=B;const le=Cn("Droppable"),{active:fe,dispatch:Ee,over:be,measureDroppableContainers:He}=o.useContext(yn),C=o.useRef({disabled:me}),Pe=o.useRef(!1),Be=o.useRef(null),Qe=o.useRef(null),{disabled:ie,updateMeasurementsFor:Me,timeout:Le}={...ua,...ze},Ie=mn(Me??ae),xe=Un({callback:o.useCallback(()=>{Pe.current?(Qe.current!=null&&clearTimeout(Qe.current),Qe.current=setTimeout(()=>{He(Array.isArray(Ie.current)?Ie.current:[Ie.current]),Qe.current=null},Le)):Pe.current=!0},[Le]),disabled:ie||!fe}),N=o.useCallback((qe,g)=>{xe&&(g&&(xe.unobserve(g),Pe.current=!1),qe&&xe.observe(qe))},[xe]),[Y,j]=jn(N),Z=mn(ne);return o.useEffect(()=>{xe&&Y.current&&(xe.disconnect(),Pe.current=!1,xe.observe(Y.current))},[Y,xe]),o.useEffect(()=>(Ee({type:gt.RegisterDroppable,element:{id:ae,key:le,disabled:me,node:Y,rect:Be,data:Z}}),()=>Ee({type:gt.UnregisterDroppable,key:le,id:ae})),[ae]),o.useEffect(()=>{me!==C.current.disabled&&(Ee({type:gt.SetDroppableDisabled,id:ae,key:le,disabled:me}),C.current.disabled=me)},[ae,le,me,Ee]),{active:fe,rect:Be,isOver:be?.id===ae,node:Y,over:be,setNodeRef:j}})({id:m,data:f,disabled:M.droppable,resizeObserverConfig:{updateMeasurementsFor:A,...s}}),{active:_,activatorEvent:de,activeNodeRect:U,attributes:H,setNodeRef:R,listeners:$,isDragging:k,over:P,setActivatorNodeRef:ee,transform:re}=da({id:m,data:f,attributes:{...Ia,...n},disabled:M.draggable}),Re=(function(){for(var B=arguments.length,ne=new Array(B),me=0;me<B;me++)ne[me]=arguments[me];return o.useMemo(()=>ae=>{ne.forEach(ze=>ze(ae))},ne)})(O,R),he=!!_,De=he&&!x&&An(u)&&An(z),Fe=!K&&k,ve=Fe&&De?re:null,ke=De?ve??(h??V)({rects:F,activeNodeRect:U,activeIndex:u,overIndex:z,index:L}):null,$e=An(u)&&An(z)?i({id:m,items:b,activeIndex:u,overIndex:z}):L,te=_?.id,X=o.useRef({activeId:te,items:b,newIndex:$e,containerId:v}),ce=b!==X.current.items,Ae=t({active:_,containerId:v,isDragging:k,isSorting:he,id:m,index:L,items:b,newIndex:X.current.newIndex,previousItems:X.current.items,previousContainerId:X.current.containerId,transition:p,wasDragging:X.current.activeId!=null}),Ce=(function(B){let{disabled:ne,index:me,node:ae,rect:ze}=B;const[le,fe]=o.useState(null),Ee=o.useRef(me);return Rt(()=>{if(!ne&&me!==Ee.current&&ae.current){const be=ze.current;if(be){const He=Jt(ae.current,{ignoreTransform:!0}),C={x:be.left-He.left,y:be.top-He.top,scaleX:be.width/He.width,scaleY:be.height/He.height};(C.x||C.y)&&fe(C)}}me!==Ee.current&&(Ee.current=me)},[ne,me,ae,ze]),o.useEffect(()=>{le&&fe(null)},[le]),le})({disabled:!Ae,index:L,node:W,rect:S});return o.useEffect(()=>{he&&X.current.newIndex!==$e&&(X.current.newIndex=$e),v!==X.current.containerId&&(X.current.containerId=v),b!==X.current.items&&(X.current.items=b)},[he,$e,v,b]),o.useEffect(()=>{if(te===X.current.activeId)return;if(te!=null&&X.current.activeId==null)return void(X.current.activeId=te);const B=setTimeout(()=>{X.current.activeId=te},50);return()=>clearTimeout(B)},[te]),{active:_,activeIndex:u,attributes:H,data:f,rect:S,index:L,newIndex:$e,items:b,isOver:D,isSorting:he,isDragging:k,listeners:$,node:W,overIndex:z,over:P,setNodeRef:Re,setActivatorNodeRef:ee,setDroppableNodeRef:O,setDraggableNodeRef:R,transform:Ce??ke,transition:(function(){if(Ce||ce&&X.current.newIndex===L)return Ta;if(!(Fe&&!_n(de)||!p)&&(he||Ae))return Bt.Transition.toString({...p,property:vl})})()}}function Kn(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const Fa=[Je.Down,Je.Right,Je.Up,Je.Left],Aa=(e,t)=>{let{context:{active:n,collisionRect:l,droppableRects:a,droppableContainers:i,over:m,scrollableAncestors:h}}=t;if(Fa.includes(e.code)){if(e.preventDefault(),!n||!l)return;const s=[];i.getEnabled().forEach(v=>{if(!v||v!=null&&v.disabled)return;const u=a.get(v.id);if(u)switch(e.code){case Je.Down:l.top<u.top&&s.push(v);break;case Je.Up:l.top>u.top&&s.push(v);break;case Je.Left:l.left>u.left&&s.push(v);break;case Je.Right:l.left<u.left&&s.push(v)}});const p=(v=>{let{collisionRect:u,droppableRects:I,droppableContainers:x}=v;const F=ir(u),z=[];for(const K of x){const{id:V}=K,M=I.get(V);if(M){const L=ir(M),f=F.reduce((S,W,D)=>S+Gr(L[D],W),0),A=Number((f/4).toFixed(4));z.push({id:V,data:{droppableContainer:K,value:A}})}}return z.sort(Zr)})({collisionRect:l,droppableRects:a,droppableContainers:s});let b=Xr(p,"id");if(b===m?.id&&p.length>1&&(b=p[1].id),b!=null){const v=i.get(n.id),u=i.get(b),I=u?a.get(u.id):null,x=u?.node.current;if(x&&I&&v&&u){const F=Gn(x).some((L,f)=>h[f]!==L),z=br(v,u),K=(function(L,f){return!Kn(L)||!Kn(f)||!br(L,f)?!1:L.data.current.sortable.index<f.data.current.sortable.index})(v,u),V=F||!z?{x:0,y:0}:{x:K?l.width-I.width:0,y:K?l.height-I.height:0},M={x:I.left,y:I.top};return V.x&&V.y?M:fn(M,V)}}}};function br(e,t){return!(!Kn(e)||!Kn(t))&&e.data.current.sortable.containerId===t.data.current.sortable.containerId}const Da=e=>{let{transform:t}=e;return{...t,y:0}},Cl=o.memo(o.forwardRef((e,t)=>{const{children:n,style:l,className:a,index:i,editing:m,editable:h,selectedIndex:s,background:p,activeColor:b,borderColor:v,borderWidth:u,dragging:I,...x}=e;return c.jsxs("div",{ref:t,className:st(a),style:{...l,display:"flex",flexDirection:"column",background:s===i?"white":p,minHeight:"0px",fontFamily:"inherit",fontSize:"16px",fontWeight:s===i?"700":"400",lineHeight:"1",letterSpacing:"0px",textTransform:"none",minWidth:"unset"},...x,children:[c.jsxs("div",{style:{flex:"1 1 100%",display:"flex",flexDirection:"row"},children:[c.jsx("div",{style:{marginLeft:s===i?"0px":"-1px",marginTop:s===i?"0px":"4px",marginBottom:"0px",background:"grey",minWidth:"1px"}}),n,s===i?c.jsx("div",{style:{marginLeft:"0px",marginTop:"0px",marginBottom:"0px",background:"grey",minWidth:"1px"}}):c.jsx(c.Fragment,{})]}),c.jsx("div",{style:{flex:"1 1 100%",background:s===i&&b?b?.toCSS():"none",minHeight:"2px"}})]})})),St={Wrapper:"_Wrapper_1wyun_25",fadeIn:"_fadeIn_1wyun_33",dragOverlay:"_dragOverlay_1wyun_37",Item:"_Item_1wyun_47",withHandle:"_withHandle_1wyun_61",dragging:"_dragging_1wyun_66",disabled:"_disabled_1wyun_74"},zo=o.memo(o.forwardRef(({color:e,dragOverlay:t,dragging:n,disabled:l,fadeIn:a,handle:i,height:m,index:h,listeners:s,onRemove:p,renderItem:b,sorting:v,style:u,transition:I,transform:x,value:F,wrapperStyle:z,...K},V)=>{o.useEffect(()=>{if(t)return document.body.style.cursor="grabbing",()=>{document.body.style.cursor=""}},[t]);const M=b?b({dragOverlay:!!t,dragging:!!n,sorting:!!v,index:h,fadeIn:!!a,listeners:s,ref:V,style:u,transform:x,transition:I,value:F}):c.jsx(c.Fragment,{children:F});return c.jsx("div",{className:st("tab-item",St.Wrapper,a&&St.fadeIn,v&&St.sorting,t&&St.dragOverlay),style:{...z,transition:[I,z?.transition].filter(Boolean).join(", "),"--translate-x":x?`${Math.round(x.x)}px`:void 0,"--translate-y":x?`${Math.round(x.y)}px`:void 0,"--scale-x":x?.scaleX?`${x.scaleX}`:void 0,"--scale-y":x?.scaleY?`${x.scaleY}`:void 0,"--index":h},ref:V,children:c.jsx("div",{className:st(St.Item,n&&St.dragging,i&&St.withHandle,t&&St.dragOverlay,l&&St.disabled,e&&St.color,"dragging"),style:u,"data-cypress":"draggable-item",...i?void 0:s,...K,tabIndex:i?void 0:-1,children:M})})})),xr={Row:"_Row_1kr10_1"},yl=o.memo(o.forwardRef(({children:e,horizontal:t,style:n},l)=>c.jsx("div",{ref:l,style:{...n},className:st(xr.Row,t&&xr.horizontal),children:e}))),za={...ml},Na=o.memo(o.forwardRef((e,t)=>{const{className:n,activationConstraint:l,animateLayoutChanges:a,adjustScale:i=!1,collisionDetection:m=Oi,coordinateGetter:h=Aa,dropAnimation:s=za,getItemStyles:p=()=>({}),getNewIndex:b,handle:v=!1,items:u,onMove:I,isDisabled:x=()=>!1,measuring:F,modifiers:z,renderItem:K,renderDivider:V,reorderItems:M=Ao,strategy:L=Do,style:f,useDragOverlay:A=!0,onDragStart:S,wrapperStyle:W=()=>({})}=e,[D,O]=o.useState(()=>u);o.useEffect(()=>{O(u)},[u]);const[_,de]=o.useState(null),U=(function(){for(var P=arguments.length,ee=new Array(P),re=0;re<P;re++)ee[re]=arguments[re];return o.useMemo(()=>[...ee].filter(Re=>Re!=null),[...ee])})(go(al,{activationConstraint:l}),go(sl,{activationConstraint:l}),go(Eo,{scrollBehavior:"Cypress"in window?"auto":void 0,coordinateGetter:h})),H=D.indexOf.bind(D),R=_?H(_):-1,$=[];D.map((P,ee)=>{$.push(c.jsx(La,{id:P,handle:v,index:ee,style:p,wrapperStyle:W,disabled:x(P),renderItem:K,animateLayoutChanges:a,useDragOverlay:A,getNewIndex:b},P+"-"+ee));const re=V?.({key:"divider-"+ee});re&&$.push(re)});const{getPortalContainer:k}=r.useFullscreenPortal();return c.jsxs(sa,{sensors:U,collisionDetection:m,onDragStart:P=>{const{active:ee}=P;ee&&(S?.(P),de(ee.id))},autoScroll:{canScroll:P=>!0},onDragEnd:P=>{if(de(null),P.over){const ee=H(P.over.id);R!==ee&&(O(re=>M(re,R,ee)),I?.(R,ee))}},onDragCancel:()=>{de(null)},measuring:F,modifiers:z,children:[c.jsx("div",{style:{display:"flex",justifyContent:"flex-start",boxSizing:"border-box",...f},className:st(n,St.Wrapper),children:c.jsx(Sa,{items:D,strategy:L,children:c.jsx(yl,{ref:t,children:$})})}),A?jt.createPortal(c.jsx(ba,{adjustScale:i,dropAnimation:s,children:_?c.jsx(zo,{value:D[R],handle:v,renderItem:K,wrapperStyle:W({index:R,isDragging:!0,id:D[R]}),index:R,dragging:!0,style:p({id:D[R],index:R,isSorting:_!==null,isDragging:!0,overIndex:-1,isDragOverlay:!0}),dragOverlay:!0}):null}),k()):null]})}));function La({disabled:e,animateLayoutChanges:t,getNewIndex:n,handle:l,id:a,index:i,onRemove:m,style:h,renderItem:s,useDragOverlay:p,wrapperStyle:b}){const{attributes:v,isDragging:u,isSorting:I,listeners:x,overIndex:F,setNodeRef:z,transform:K,transition:V}=Ea({id:a,animateLayoutChanges:t,disabled:e,getNewIndex:n});return c.jsx(zo,{ref:z,value:a,disabled:e,dragging:u,sorting:I,handle:l,renderItem:s,index:i,style:h({index:i,id:a,isDragging:u,isSorting:I,overIndex:F}),onRemove:m?()=>m(a):void 0,transform:K,transition:V,wrapperStyle:b({index:i,isDragging:u,id:a}),listeners:x,"data-index":i,"data-id":a,dragOverlay:!p&&u,...v})}const Pa="_TabStrip_3x0dp_1",ja=new d.Color("rgb(33, 115, 70)"),Oa="#eee",Ba=e=>c.jsx(Cl,{...e}),wl=o.memo(o.forwardRef((e,t)=>{const{children:n,style:l,className:a,selectedTabIndex:i=0,tabNames:m=[],onSelectedTabIndexChange:h,onTabNameChange:s,onTabMove:p,createScrollStartButton:b=r.defaultCreateScrollStartButton,createScrollEndButton:v=r.defaultCreateScrollEndButton,createScrollEdgeButton:u=r.defaultCreateScrollEdgeButton,createTabButton:I=Ba,createTabDivider:x,editLabelProps:F,disabled:z=!1,disableDrag:K=!1,background:V="white",activeColor:M=ja,borderColor:L=Oa,borderWidth:f=1}=e,[A,S]=o.useState(i),[W,D]=o.useState(m),O=o.useCallback(le=>{const fe=k.current?.[le]?.closest(".tab-item")??k.current?.[le];fe&&Fe.current?.scrollTo({top:fe.offsetTop,left:fe.offsetLeft,behavior:"smooth"})},[]);o.useEffect(()=>{O(i)},[i]);const _=o.useCallback((le,fe)=>{fe!==A&&(S(fe),h?.(fe)),O(fe)},[h,A]),de=o.useCallback((le,fe)=>{p?.(le,fe)},[p]),U=o.useRef(null),[H,R]=o.useState(-1),$=o.useCallback((le,fe)=>{s?.(le,fe)},[s]);o.useLayoutEffect(()=>{S(i)},[i]),o.useLayoutEffect(()=>{D(m)},[m]);const k=o.useRef([]),P=o.useRef(null);o.useImperativeHandle(t,()=>Object.assign({startEdit(le){k.current?.[le]?.startEdit()},cancel(le){k.current?.[le]?.cancel()}},P.current),[A,H]);const ee=o.useCallback(({value:le,index:fe,dragging:Ee})=>{const{style:be,maxLength:He,...C}=F||{},Pe=c.jsx(Kr,{ref:Be=>{k.current[fe]=Be},value:le,disabled:z,maxLength:He,style:{color:A===fe&&M?M?.toRGBA().toString():"inherit",flex:"1 1 100%",paddingTop:"1px",paddingBottom:"1px",...be},styleHover:{},onSubmit:Be=>(U.current=!1,R(-1),$(fe,Be)),onCancel:()=>{U.current=!1,R(-1)},onChange:Be=>{U.current=!0,R(fe)},...C});return I({onClick:Be=>_(Be,fe),value:le,index:fe,editing:H===fe&&U.current,editable:!0,disabled:z,selectedIndex:A,background:V,activeColor:M,borderColor:L,borderWidth:f,dragging:Ee,children:Pe})},[A,$,_,F,z,H,I]),[re,{width:Re}]=Ot(),[he,{width:De}]=Ot(),Fe=o.useRef(null),[ve,ke]=o.useState({left:0,top:0,width:0,height:0}),[$e,te]=o.useState(null);o.useEffect(()=>{$e!==null&&Fe.current&&Fe.current.scrollTo({left:$e,behavior:"smooth"})},[$e]);const X=o.useCallback((le,fe=!1)=>{if(!Fe.current)return 0;let Ee=Fe.current.firstChild.getBoundingClientRect(),be=Fe.current.firstChild.firstChild.children,He=0;return He=fe?0:r.ScrollUtils.getScrollTo(le,Ee.left,be,!0,Math.max(0,le-200)),te(He),Math.max(0,He)},[]),ce=o.useCallback((le,fe=!1)=>{if(!Fe.current)return 0;let Ee=Fe.current.firstChild.getBoundingClientRect(),be=Fe.current.firstChild.firstChild.children,He=0;const C=Math.ceil(De-Re);return He=fe?C:r.ScrollUtils.getScrollTo(le,Ee.left,be,!1,Math.max(0,le+200)),te(He),Math.min(C,He)},[De,Re]),Ae=o.useRef(null),Ce=o.useRef(null),B=o.useCallback(()=>{Ce.current&&(clearTimeout(Ce.current),Ce.current=null,Ae.current=null)},[]),ne=o.useCallback((le,fe,Ee=260)=>{Ae.current=le,Ce.current=setTimeout(()=>{const be=fe?X(Ae.current||le):ce(Ae.current||le);be!==Ae.current?ne(be,fe,120):B()},Ee)},[X,ce,B]);o.useEffect(()=>()=>B(),[B]);const me=o.useMemo(()=>({style:{marginLeft:"4px",marginRight:"6px"},disabled:Math.floor(ve.left)<=0||Math.floor(De-Re)===0,orientation:r.ScrollbarOrientation.Horizontal,onMouseUp:B,onMouseLeave:B,onMouseDown:()=>ne(Fe.current.scrollLeft,!0),onClick:le=>X(Math.min(Fe.current.scrollLeft,$e??Number.MAX_SAFE_INTEGER),le.ctrlKey)}),[ve,$e,De,Re]),ae=o.useMemo(()=>({style:{marginLeft:"6px",marginRight:"4px"},disabled:Math.floor(De-Re)<=Math.ceil(ve.left),orientation:r.ScrollbarOrientation.Horizontal,onMouseUp:B,onMouseLeave:B,onMouseDown:()=>ne(Fe.current.scrollLeft,!1),onClick:le=>ce(Math.max(Fe.current.scrollLeft,$e??0),le.ctrlKey)}),[ve,$e,De,Re]),ze=o.useMemo(()=>c.jsxs(c.Fragment,{children:[c.jsx("div",{style:{minWidth:"16px"}}),n,u?.(me)]}),[me,ae,b,v,n,u]);return c.jsxs("div",{style:{...l,display:"flex",alignItems:"stretch"},className:st(Pa,a),ref:P,children:[c.jsx("div",{style:{borderTop:`solid ${L} ${f}px`,position:"absolute",width:"100%"}}),c.jsx("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:ze}),c.jsx("div",{className:"Tabs",ref:re,style:{flex:"1 1 100%",display:"flex",position:"relative",overflow:"hidden"},children:c.jsx("div",{style:{position:"relative",overflowY:"hidden",overflowX:"hidden",marginBottom:"3px"},ref:Fe,onScroll:le=>{ke({left:le.target.scrollLeft,top:le.target.scrollTop,width:le.target.scrollWidth,height:le.target.scrollHeight})},children:c.jsx(Na,{isDisabled:le=>z||K,items:W,strategy:qa,modifiers:[Da],ref:he,renderItem:ee,renderDivider:x,onMove:de,activationConstraint:{distance:15}})})}),c.jsx("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:u(ae)})]})}));wl.displayName="TabStrip";const Nn=o.createContext(null);Nn.displayName="DocThemesContext";const Va="_script-editor_iy654_5",Ha={lightbulb:{enabled:!1},tabSize:2,acceptSuggestionOnCommitCharacter:!0,acceptSuggestionOnEnter:"on",accessibilitySupport:"auto",automaticLayout:!0,autoIndent:!1,codeLens:!0,colorDecorators:!0,contextmenu:!0,cursorBlinking:"blink",cursorSmoothCaretAnimation:!1,cursorStyle:"line",disableLayerHinting:!1,disableMonospaceOptimizations:!1,dragAndDrop:!0,glyphMargin:!0,fixedOverflowWidgets:!1,folding:!0,foldingStrategy:"auto",fontLigatures:!1,formatOnPaste:!0,formatOnType:!1,hideCursorInOverviewRuler:!1,highlightActiveIndentGuide:!0,links:!0,lineDecorationsWidth:8,lineNumbersMinChars:3,mouseWheelZoom:!1,multiCursorMergeOverlapping:!0,multiCursorModifier:"alt",overviewRulerBorder:!0,overviewRulerLanes:2,quickSuggestions:!0,quickSuggestionsDelay:100,readOnly:!1,renderControlCharacters:!1,renderFinalNewline:!0,renderIndentGuides:!0,renderLineHighlight:"all",renderWhitespace:"none",revealHorizontalRightPadding:30,roundedSelection:!0,rulers:[],scrollBeyondLastColumn:5,scrollBeyondLastLine:!0,selectOnLineNumbers:!0,selectionClipboard:!0,selectionHighlight:!0,showLightbulbIconMode:!1,showFoldingControls:"mouseover",smoothScrolling:!0,suggestOnTriggerCharacters:!0,wordBasedSuggestions:!0,wordSeparators:`~!@#$%^&*()-=+[{]}|;:'",.<>/?`,wordWrap:"off",wordWrapBreakAfterCharacters:" })]?|&,;",wordWrapBreakBeforeCharacters:"{([+",wordWrapBreakObtrusiveCharacters:".",wordWrapColumn:80,wordWrapMinified:!0,wrappingIndent:"none"},Ua=o.lazy(()=>Promise.resolve().then(()=>require("./DTllJ68guWq5oyfK.cjs")));let ln,an,Ft=["define","require"],qr=!1,Ln="@0.7.9";Ln!=="@local"&&Ln!=="@0.0.0"||(Ln="");const Ka=`https://cdn.jsdelivr.net/npm/@sheetxl/sdk${Ln}/types/scripting.d.ts`,Sr=async(e,t,n)=>{const l=e.getModel();if(!l)return;const a=await t.languages.typescript.getTypeScriptWorker(),i=await a(l.uri),m=await i.getNavigationTree(l.uri.toString()),h=e.getPosition();let s={...h};s.lineNumber=1,s.column=1;let p=!1;for(let F=h.lineNumber;F>=1;F--)if(l.getLineContent(F).trim()===""){const z=No(m,l.getOffsetAt({lineNumber:F,column:1}),"function");if(!z||Wa(z)){p=!0,s.lineNumber=F+1;break}{const K=z.spans[0].start;F=l.getPositionAt(K).lineNumber,s.lineNumber=F}}let b=n,v=!1;!p&&!b.startsWith(`
27
+ `},Ni={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Li(e){let{announcements:t=Ni,container:n,hiddenTextDescribedById:l,screenReaderInstructions:a=zi}=e;const{announce:i,announcement:m}=(function(){const[v,u]=o.useState("");return{announce:o.useCallback(I=>{I!=null&&u(I)},[]),announcement:v}})(),h=Cn("DndLiveRegion"),[s,p]=o.useState(!1);if(o.useEffect(()=>{p(!0)},[]),(function(v){const u=o.useContext(_r);o.useEffect(()=>{if(!u)throw new Error("useDndMonitor must be used within a children of <DndContext>");return u(v)},[v,u])})(o.useMemo(()=>({onDragStart(v){let{active:u}=v;i(t.onDragStart({active:u}))},onDragMove(v){let{active:u,over:I}=v;t.onDragMove&&i(t.onDragMove({active:u,over:I}))},onDragOver(v){let{active:u,over:I}=v;i(t.onDragOver({active:u,over:I}))},onDragEnd(v){let{active:u,over:I}=v;i(t.onDragEnd({active:u,over:I}))},onDragCancel(v){let{active:u,over:I}=v;i(t.onDragCancel({active:u,over:I}))}}),[i,t])),!s)return null;const b=o.createElement(o.Fragment,null,o.createElement(Ai,{id:l,value:a.draggable}),o.createElement(Di,{id:h,announcement:m}));return n?jt.createPortal(b,n):b}var gt;function Vn(){}function go(e,t){return o.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(gt||(gt={}));const kt=Object.freeze({x:0,y:0});function Gr(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Pi(e,t){const n=Bn(e);return n?(n.x-t.left)/t.width*100+"% "+(n.y-t.top)/t.height*100+"%":"0 0"}function Zr(e,t){let{data:{value:n}}=e,{data:{value:l}}=t;return n-l}function ji(e,t){let{data:{value:n}}=e,{data:{value:l}}=t;return l-n}function ir(e){let{left:t,top:n,height:l,width:a}=e;return[{x:t,y:n},{x:t+a,y:n},{x:t,y:n+l},{x:t+a,y:n+l}]}function Xr(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function ar(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const Oi=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:l}=e;const a=ar(t,t.left,t.top),i=[];for(const m of l){const{id:h}=m,s=n.get(h);if(s){const p=Gr(ar(s),a);i.push({id:h,data:{droppableContainer:m,value:p}})}}return i.sort(Zr)};function Bi(e,t){const n=Math.max(t.top,e.top),l=Math.max(t.left,e.left),a=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),m=a-l,h=i-n;if(l<a&&n<i){const s=t.width*t.height,p=e.width*e.height,b=m*h;return Number((b/(s+p-b)).toFixed(4))}return 0}const Vi=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:l}=e;const a=[];for(const i of l){const{id:m}=i,h=n.get(m);if(h){const s=Bi(h,t);s>0&&a.push({id:m,data:{droppableContainer:i,value:s}})}}return a.sort(ji)};function sr(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:kt}function Hi(e){return function(t){for(var n=arguments.length,l=new Array(n>1?n-1:0),a=1;a<n;a++)l[a-1]=arguments[a];return l.reduce((i,m)=>({...i,top:i.top+e*m.y,bottom:i.bottom+e*m.y,left:i.left+e*m.x,right:i.right+e*m.x}),{...t})}}const Ui=Hi(1);function Yr(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}const Ki={ignoreTransform:!1};function Jt(e,t){t===void 0&&(t=Ki);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:p,transformOrigin:b}=Ct(e).getComputedStyle(e);p&&(n=(function(v,u,I){const x=Yr(u);if(!x)return v;const{scaleX:F,scaleY:z,x:K,y:V}=x,M=v.left-K-(1-F)*parseFloat(I),L=v.top-V-(1-z)*parseFloat(I.slice(I.indexOf(" ")+1)),f=F?v.width/F:v.width,A=z?v.height/z:v.height;return{width:f,height:A,top:L,right:M+f,bottom:L+A,left:M}})(n,p,b))}const{top:l,left:a,width:i,height:m,bottom:h,right:s}=n;return{top:l,left:a,width:i,height:m,bottom:h,right:s}}function cr(e){return Jt(e,{ignoreTransform:!0})}function Gn(e,t){const n=[];return e?(function l(a){if(t!=null&&n.length>=t||!a)return n;if(Io(a)&&a.scrollingElement!=null&&!n.includes(a.scrollingElement))return n.push(a.scrollingElement),n;if(!vn(a)||$r(a)||n.includes(a))return n;const i=Ct(e).getComputedStyle(a);return a!==e&&(function(m,h){h===void 0&&(h=Ct(m).getComputedStyle(m));const s=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(p=>{const b=h[p];return typeof b=="string"&&s.test(b)})})(a,i)&&n.push(a),(function(m,h){return h===void 0&&(h=Ct(m).getComputedStyle(m)),h.position==="fixed"})(a,i)?n:l(a.parentNode)})(e):n}function Jr(e){const[t]=Gn(e,1);return t??null}function ho(e){return $n&&e?Yt(e)?e:To(e)?Io(e)||e===Zt(e).scrollingElement?window:vn(e)?e:null:null:null}function Qr(e){return Yt(e)?e.scrollX:e.scrollLeft}function el(e){return Yt(e)?e.scrollY:e.scrollTop}function Co(e){return{x:Qr(e),y:el(e)}}var ht;function tl(e){return!(!$n||!e)&&e===document.scrollingElement}function nl(e){const t={x:0,y:0},n=tl(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},l={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=l.y,isRight:e.scrollLeft>=l.x,maxScroll:l,minScroll:t}}(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(ht||(ht={}));const $i={x:.2,y:.2};function Wi(e,t,n,l,a){let{top:i,left:m,right:h,bottom:s}=n;l===void 0&&(l=10),a===void 0&&(a=$i);const{isTop:p,isBottom:b,isLeft:v,isRight:u}=nl(e),I={x:0,y:0},x={x:0,y:0},F=t.height*a.y,z=t.width*a.x;return!p&&i<=t.top+F?(I.y=ht.Backward,x.y=l*Math.abs((t.top+F-i)/F)):!b&&s>=t.bottom-F&&(I.y=ht.Forward,x.y=l*Math.abs((t.bottom-F-s)/F)),!u&&h>=t.right-z?(I.x=ht.Forward,x.x=l*Math.abs((t.right-z-h)/z)):!v&&m<=t.left+z&&(I.x=ht.Backward,x.x=l*Math.abs((t.left+z-m)/z)),{direction:I,speed:x}}function _i(e){if(e===document.scrollingElement){const{innerWidth:i,innerHeight:m}=window;return{top:0,left:0,right:i,bottom:m,width:i,height:m}}const{top:t,left:n,right:l,bottom:a}=e.getBoundingClientRect();return{top:t,left:n,right:l,bottom:a,width:e.clientWidth,height:e.clientHeight}}function ol(e){return e.reduce((t,n)=>_t(t,Co(n)),kt)}function rl(e,t){if(t===void 0&&(t=Jt),!e)return;const{top:n,left:l,bottom:a,right:i}=t(e);Jr(e)&&(a<=0||i<=0||n>=window.innerHeight||l>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Gi=[["x",["left","right"],function(e){return e.reduce((t,n)=>t+Qr(n),0)}],["y",["top","bottom"],function(e){return e.reduce((t,n)=>t+el(n),0)}]];class yo{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const l=Gn(n),a=ol(l);this.rect={...t},this.width=t.width,this.height=t.height;for(const[i,m,h]of Gi)for(const s of m)Object.defineProperty(this,s,{get:()=>{const p=h(l),b=a[i]-p;return this.rect[s]+b},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class dn{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var l;return(l=this.target)==null?void 0:l.removeEventListener(...n)})},this.target=t}add(t,n,l){var a;(a=this.target)==null||a.addEventListener(t,n,l),this.listeners.push([t,n,l])}}function mo(e,t){const n=Math.abs(e.x),l=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+l**2)>t:"x"in t&&"y"in t?n>t.x&&l>t.y:"x"in t?n>t.x:"y"in t&&l>t.y}var qt,Je;function dr(e){e.preventDefault()}function Zi(e){e.stopPropagation()}(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(qt||(qt={})),(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(Je||(Je={}));const ll={start:[Je.Space,Je.Enter],cancel:[Je.Esc],end:[Je.Space,Je.Enter,Je.Tab]},Xi=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Je.Right:return{...n,x:n.x+25};case Je.Left:return{...n,x:n.x-25};case Je.Down:return{...n,y:n.y+25};case Je.Up:return{...n,y:n.y-25}}};class Eo{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new dn(Zt(n)),this.windowListeners=new dn(Ct(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(qt.Resize,this.handleCancel),this.windowListeners.add(qt.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(qt.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,l=t.node.current;l&&rl(l),n(kt)}handleKeyDown(t){if(_n(t)){const{active:n,context:l,options:a}=this.props,{keyboardCodes:i=ll,coordinateGetter:m=Xi,scrollBehavior:h="smooth"}=a,{code:s}=t;if(i.end.includes(s))return void this.handleEnd(t);if(i.cancel.includes(s))return void this.handleCancel(t);const{collisionRect:p}=l.current,b=p?{x:p.left,y:p.top}:kt;this.referenceCoordinates||(this.referenceCoordinates=b);const v=m(t,{active:n,context:l.current,currentCoordinates:b});if(v){const u=fn(v,b),I={x:0,y:0},{scrollableAncestors:x}=l.current;for(const F of x){const z=t.code,{isTop:K,isRight:V,isLeft:M,isBottom:L,maxScroll:f,minScroll:A}=nl(F),S=_i(F),W={x:Math.min(z===Je.Right?S.right-S.width/2:S.right,Math.max(z===Je.Right?S.left:S.left+S.width/2,v.x)),y:Math.min(z===Je.Down?S.bottom-S.height/2:S.bottom,Math.max(z===Je.Down?S.top:S.top+S.height/2,v.y))},D=z===Je.Right&&!V||z===Je.Left&&!M,O=z===Je.Down&&!L||z===Je.Up&&!K;if(D&&W.x!==v.x){const _=F.scrollLeft+u.x,de=z===Je.Right&&_<=f.x||z===Je.Left&&_>=A.x;if(de&&!u.y)return void F.scrollTo({left:_,behavior:h});I.x=de?F.scrollLeft-_:z===Je.Right?F.scrollLeft-f.x:F.scrollLeft-A.x,I.x&&F.scrollBy({left:-I.x,behavior:h});break}if(O&&W.y!==v.y){const _=F.scrollTop+u.y,de=z===Je.Down&&_<=f.y||z===Je.Up&&_>=A.y;if(de&&!u.x)return void F.scrollTo({top:_,behavior:h});I.y=de?F.scrollTop-_:z===Je.Down?F.scrollTop-f.y:F.scrollTop-A.y,I.y&&F.scrollBy({top:-I.y,behavior:h});break}}this.handleMove(t,_t(fn(v,this.referenceCoordinates),I))}}}handleMove(t,n){const{onMove:l}=this.props;t.preventDefault(),l(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function ur(e){return!!(e&&"distance"in e)}function gr(e){return!!(e&&"delay"in e)}Eo.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:l=ll,onActivation:a}=t,{active:i}=n;const{code:m}=e.nativeEvent;if(l.start.includes(m)){const h=i.activatorNode.current;return(!h||e.target===h)&&(e.preventDefault(),a?.({event:e.nativeEvent}),!0)}return!1}}];class Fo{constructor(t,n,l){var a;l===void 0&&(l=(function(h){const{EventTarget:s}=Ct(h);return h instanceof s?h:Zt(h)})(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:i}=t,{target:m}=i;this.props=t,this.events=n,this.document=Zt(m),this.documentListeners=new dn(this.document),this.listeners=new dn(l),this.windowListeners=new dn(Ct(m)),this.initialCoordinates=(a=Bn(i))!=null?a:kt,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:l}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(qt.Resize,this.handleCancel),this.windowListeners.add(qt.DragStart,dr),this.windowListeners.add(qt.VisibilityChange,this.handleCancel),this.windowListeners.add(qt.ContextMenu,dr),this.documentListeners.add(qt.Keydown,this.handleKeydown),n){if(l!=null&&l({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(gr(n))return this.timeoutId=setTimeout(this.handleStart,n.delay),void this.handlePending(n);if(ur(n))return void this.handlePending(n)}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:l,onPending:a}=this.props;a(l,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(qt.Click,Zi,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(qt.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:l,initialCoordinates:a,props:i}=this,{onMove:m,options:{activationConstraint:h}}=i;if(!a)return;const s=(n=Bn(t))!=null?n:kt,p=fn(a,s);if(!l&&h){if(ur(h)){if(h.tolerance!=null&&mo(p,h.tolerance))return this.handleCancel();if(mo(p,h.distance))return this.handleStart()}return gr(h)&&mo(p,h.tolerance)?this.handleCancel():void this.handlePending(h,p)}t.cancelable&&t.preventDefault(),m(s)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===Je.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Yi={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class il extends Fo{constructor(t){const{event:n}=t,l=Zt(n.target);super(t,Yi,l)}}il.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:l}=t;return!(!n.isPrimary||n.button!==0)&&(l?.({event:n}),!0)}}];const Ji={move:{name:"mousemove"},end:{name:"mouseup"}};var wo;(function(e){e[e.RightClick=2]="RightClick"})(wo||(wo={}));class al extends Fo{constructor(t){super(t,Ji,Zt(t.event.target))}}al.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:l}=t;return n.button!==wo.RightClick&&(l?.({event:n}),!0)}}];const fo={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class sl extends Fo{constructor(t){super(t,fo)}static setup(){return window.addEventListener(fo.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(fo.move.name,t)};function t(){}}}var un,Hn;function Qi(e){let{acceleration:t,activator:n=un.Pointer,canScroll:l,draggingRect:a,enabled:i,interval:m=5,order:h=Hn.TreeOrder,pointerCoordinates:s,scrollableAncestors:p,scrollableAncestorRects:b,delta:v,threshold:u}=e;const I=(function(A){let{delta:S,disabled:W}=A;const D=On(S);return cn(O=>{if(W||!D||!O)return ea;const _={x:Math.sign(S.x-D.x),y:Math.sign(S.y-D.y)};return{x:{[ht.Backward]:O.x[ht.Backward]||_.x===-1,[ht.Forward]:O.x[ht.Forward]||_.x===1},y:{[ht.Backward]:O.y[ht.Backward]||_.y===-1,[ht.Forward]:O.y[ht.Forward]||_.y===1}}},[W,S,D])})({delta:v,disabled:!i}),[x,F]=(function(){const A=o.useRef(null);return[o.useCallback((S,W)=>{A.current=setInterval(S,W)},[]),o.useCallback(()=>{A.current!==null&&(clearInterval(A.current),A.current=null)},[])]})(),z=o.useRef({x:0,y:0}),K=o.useRef({x:0,y:0}),V=o.useMemo(()=>{switch(n){case un.Pointer:return s?{top:s.y,bottom:s.y,left:s.x,right:s.x}:null;case un.DraggableRect:return a}},[n,a,s]),M=o.useRef(null),L=o.useCallback(()=>{const A=M.current;if(!A)return;const S=z.current.x*K.current.x,W=z.current.y*K.current.y;A.scrollBy(S,W)},[]),f=o.useMemo(()=>h===Hn.TreeOrder?[...p].reverse():p,[h,p]);o.useEffect(()=>{if(i&&p.length&&V){for(const A of f){if(l?.(A)===!1)continue;const S=p.indexOf(A),W=b[S];if(!W)continue;const{direction:D,speed:O}=Wi(A,W,V,t,u);for(const _ of["x","y"])I[_][D[_]]||(O[_]=0,D[_]=0);if(O.x>0||O.y>0)return F(),M.current=A,x(L,m),z.current=O,void(K.current=D)}z.current={x:0,y:0},K.current={x:0,y:0},F()}else F()},[t,L,l,F,i,m,JSON.stringify(V),JSON.stringify(I),x,p,f,b,JSON.stringify(u)])}sl.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:l}=t;const{touches:a}=n;return!(a.length>1)&&(l?.({event:n}),!0)}}],(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(un||(un={})),(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Hn||(Hn={}));const ea={x:{[ht.Backward]:!1,[ht.Forward]:!1},y:{[ht.Backward]:!1,[ht.Forward]:!1}};var pn,bo;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(pn||(pn={})),(function(e){e.Optimized="optimized"})(bo||(bo={}));const hr=new Map;function xo(e,t){return cn(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Un(e){let{callback:t,disabled:n}=e;const l=Wn(t),a=o.useMemo(()=>{if(n||typeof window>"u"||window.ResizeObserver===void 0)return;const{ResizeObserver:i}=window;return new i(l)},[n]);return o.useEffect(()=>()=>a?.disconnect(),[a]),a}function ta(e){return new yo(Jt(e),e)}function mr(e,t,n){t===void 0&&(t=ta);const[l,a]=o.useState(null);function i(){a(s=>{if(!e)return null;var p;if(e.isConnected===!1)return(p=s??n)!=null?p:null;const b=t(e);return JSON.stringify(s)===JSON.stringify(b)?s:b})}const m=(function(s){let{callback:p,disabled:b}=s;const v=Wn(p),u=o.useMemo(()=>{if(b||typeof window>"u"||window.MutationObserver===void 0)return;const{MutationObserver:I}=window;return new I(v)},[v,b]);return o.useEffect(()=>()=>u?.disconnect(),[u]),u})({callback(s){if(e)for(const p of s){const{type:b,target:v}=p;if(b==="childList"&&v instanceof HTMLElement&&v.contains(e)){i();break}}}}),h=Un({callback:i});return Rt(()=>{i(),e?(h?.observe(e),m?.observe(document.body,{childList:!0,subtree:!0})):(h?.disconnect(),m?.disconnect())},[e]),l}const fr=[];function pr(e,t){t===void 0&&(t=[]);const n=o.useRef(null);return o.useEffect(()=>{n.current=null},t),o.useEffect(()=>{const l=e!==kt;l&&!n.current&&(n.current=e),!l&&n.current&&(n.current=null)},[e]),n.current?fn(e,n.current):kt}function vr(e){return o.useMemo(()=>e?(function(t){const n=t.innerWidth,l=t.innerHeight;return{top:0,left:0,right:n,bottom:l,width:n,height:l}})(e):null,[e])}const Cr=[];function cl(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return vn(t)?t:e}const na=[{sensor:il,options:{}},{sensor:Eo,options:{}}],oa={current:{}},zn={draggable:{measure:cr},droppable:{measure:cr,strategy:pn.WhileDragging,frequency:bo.Optimized},dragOverlay:{measure:Jt}};class gn extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,l;return(n=(l=this.get(t))==null?void 0:l.node.current)!=null?n:void 0}}const ra={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new gn,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Vn},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:zn,measureDroppableContainers:Vn,windowRect:null,measuringScheduled:!1},dl={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Vn,draggableNodes:new Map,over:null,measureDroppableContainers:Vn},yn=o.createContext(dl),ul=o.createContext(ra);function la(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new gn}}}function ia(e,t){switch(t.type){case gt.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case gt.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case gt.DragEnd:case gt.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case gt.RegisterDroppable:{const{element:n}=t,{id:l}=n,a=new gn(e.droppable.containers);return a.set(l,n),{...e,droppable:{...e.droppable,containers:a}}}case gt.SetDroppableDisabled:{const{id:n,key:l,disabled:a}=t,i=e.droppable.containers.get(n);if(!i||l!==i.key)return e;const m=new gn(e.droppable.containers);return m.set(n,{...i,disabled:a}),{...e,droppable:{...e.droppable,containers:m}}}case gt.UnregisterDroppable:{const{id:n,key:l}=t,a=e.droppable.containers.get(n);if(!a||l!==a.key)return e;const i=new gn(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function aa(e){let{disabled:t}=e;const{active:n,activatorEvent:l,draggableNodes:a}=o.useContext(yn),i=On(l),m=On(n?.id);return o.useEffect(()=>{if(!t&&!l&&i&&m!=null){if(!_n(i)||document.activeElement===i.target)return;const h=a.get(m);if(!h)return;const{activatorNode:s,node:p}=h;if(!s.current&&!p.current)return;requestAnimationFrame(()=>{for(const b of[s.current,p.current]){if(!b)continue;const v=Ei(b);if(v){v.focus();break}}})}},[l,t,a,m,i]),null}function gl(e,t){let{transform:n,...l}=t;return e!=null&&e.length?e.reduce((a,i)=>i({transform:a,...l}),n):n}const Zn=o.createContext({...kt,scaleX:1,scaleY:1});var At;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(At||(At={}));const sa=o.memo(function(e){var t,n,l,a;let{id:i,accessibility:m,autoScroll:h=!0,children:s,sensors:p=na,collisionDetection:b=Vi,measuring:v,modifiers:u,...I}=e;const x=o.useReducer(ia,void 0,la),[F,z]=x,[K,V]=(function(){const[w]=o.useState(()=>new Set),E=o.useCallback(G=>(w.add(G),()=>w.delete(G)),[w]);return[o.useCallback(G=>{let{type:oe,event:se}=G;w.forEach(ue=>{var Q;return(Q=ue[oe])==null?void 0:Q.call(ue,se)})},[w]),E]})(),[M,L]=o.useState(At.Uninitialized),f=M===At.Initialized,{draggable:{active:A,nodes:S,translate:W},droppable:{containers:D}}=F,O=A!=null?S.get(A):null,_=o.useRef({initial:null,translated:null}),de=o.useMemo(()=>{var w;return A!=null?{id:A,data:(w=O?.data)!=null?w:oa,rect:_}:null},[A,O]),U=o.useRef(null),[H,R]=o.useState(null),[$,k]=o.useState(null),P=mn(I,Object.values(I)),ee=Cn("DndDescribedBy",i),re=o.useMemo(()=>D.getEnabled(),[D]),Re=(he=v,o.useMemo(()=>({draggable:{...zn.draggable,...he?.draggable},droppable:{...zn.droppable,...he?.droppable},dragOverlay:{...zn.dragOverlay,...he?.dragOverlay}}),[he?.draggable,he?.droppable,he?.dragOverlay]));var he;const{droppableRects:De,measureDroppableContainers:Fe,measuringScheduled:ve}=(function(w,E){let{dragging:G,dependencies:oe,config:se}=E;const[ue,Q]=o.useState(null),{frequency:ye,measure:pe,strategy:we}=se,Ue=o.useRef(w),Te=(function(){switch(we){case pn.Always:return!1;case pn.BeforeDragging:return G;default:return!G}})(),Ne=mn(Te),je=o.useCallback(function(et){et===void 0&&(et=[]),Ne.current||Q(Oe=>Oe===null?et:Oe.concat(et.filter(Xe=>!Oe.includes(Xe))))},[Ne]),_e=o.useRef(null),We=cn(et=>{if(Te&&!G)return hr;if(!et||et===hr||Ue.current!==w||ue!=null){const Oe=new Map;for(let Xe of w){if(!Xe)continue;if(ue&&ue.length>0&&!ue.includes(Xe.id)&&Xe.rect.current){Oe.set(Xe.id,Xe.rect.current);continue}const ct=Xe.node.current,bt=ct?new yo(pe(ct),ct):null;Xe.rect.current=bt,bt&&Oe.set(Xe.id,bt)}return Oe}return et},[w,ue,G,Te,pe]);return o.useEffect(()=>{Ue.current=w},[w]),o.useEffect(()=>{Te||je()},[G,Te]),o.useEffect(()=>{ue&&ue.length>0&&Q(null)},[JSON.stringify(ue)]),o.useEffect(()=>{Te||typeof ye!="number"||_e.current!==null||(_e.current=setTimeout(()=>{je(),_e.current=null},ye))},[ye,Te,je,...oe]),{droppableRects:We,measureDroppableContainers:je,measuringScheduled:ue!=null}})(re,{dragging:f,dependencies:[W.x,W.y],config:Re.droppable}),ke=(function(w,E){const G=E!=null?w.get(E):void 0,oe=G?G.node.current:null;return cn(se=>{var ue;return E==null?null:(ue=oe??se)!=null?ue:null},[oe,E])})(S,A),$e=o.useMemo(()=>$?Bn($):null,[$]),te=(function(){const w=H?.autoScrollEnabled===!1,E=typeof h=="object"?h.enabled===!1:h===!1,G=f&&!w&&!E;return typeof h=="object"?{...h,enabled:G}:{enabled:G}})(),X=(function(w,E){return xo(w,E)})(ke,Re.draggable.measure);(function(w){let{activeNode:E,measure:G,initialRect:oe,config:se=!0}=w;const ue=o.useRef(!1),{x:Q,y:ye}=typeof se=="boolean"?{x:se,y:se}:se;Rt(()=>{if(!Q&&!ye||!E)return void(ue.current=!1);if(ue.current||!oe)return;const pe=E?.node.current;if(!pe||pe.isConnected===!1)return;const we=sr(G(pe),oe);if(Q||(we.x=0),ye||(we.y=0),ue.current=!0,Math.abs(we.x)>0||Math.abs(we.y)>0){const Ue=Jr(pe);Ue&&Ue.scrollBy({top:we.y,left:we.x})}},[E,Q,ye,oe,G])})({activeNode:A!=null?S.get(A):null,config:te.layoutShiftCompensation,initialRect:X,measure:Re.draggable.measure});const ce=mr(ke,Re.draggable.measure,X),Ae=mr(ke?ke.parentElement:null),Ce=o.useRef({activatorEvent:null,active:null,activeNode:ke,collisionRect:null,collisions:null,droppableRects:De,draggableNodes:S,draggingNode:null,draggingNodeRect:null,droppableContainers:D,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),B=D.getNodeFor((t=Ce.current.over)==null?void 0:t.id),ne=(function(w){let{measure:E}=w;const[G,oe]=o.useState(null),se=Un({callback:o.useCallback(pe=>{for(const{target:we}of pe)if(vn(we)){oe(Ue=>{const Te=E(we);return Ue?{...Ue,width:Te.width,height:Te.height}:Te});break}},[E])}),ue=o.useCallback(pe=>{const we=cl(pe);se?.disconnect(),we&&se?.observe(we),oe(we?E(we):null)},[E,se]),[Q,ye]=jn(ue);return o.useMemo(()=>({nodeRef:Q,rect:G,setRef:ye}),[G,Q,ye])})({measure:Re.dragOverlay.measure}),me=(n=ne.nodeRef.current)!=null?n:ke,ae=f?(l=ne.rect)!=null?l:ce:null,ze=!!(ne.nodeRef.current&&ne.rect),le=sr(fe=ze?null:ce,xo(fe));var fe;const Ee=vr(me?Ct(me):null),be=(function(w){const E=o.useRef(w),G=cn(oe=>w?oe&&oe!==fr&&w&&E.current&&w.parentNode===E.current.parentNode?oe:Gn(w):fr,[w]);return o.useEffect(()=>{E.current=w},[w]),G})(f?B??ke:null),He=(function(w,E){E===void 0&&(E=Jt);const[G]=w,oe=vr(G?Ct(G):null),[se,ue]=o.useState(Cr);function Q(){ue(()=>w.length?w.map(pe=>tl(pe)?oe:new yo(E(pe),pe)):Cr)}const ye=Un({callback:Q});return Rt(()=>{ye?.disconnect(),Q(),w.forEach(pe=>ye?.observe(pe))},[w]),se})(be),C=gl(u,{transform:{x:W.x-le.x,y:W.y-le.y,scaleX:1,scaleY:1},activatorEvent:$,active:de,activeNodeRect:ce,containerNodeRect:Ae,draggingNodeRect:ae,over:Ce.current.over,overlayNodeRect:ne.rect,scrollableAncestors:be,scrollableAncestorRects:He,windowRect:Ee}),Pe=$e?_t($e,W):null,Be=(function(w){const[E,G]=o.useState(null),oe=o.useRef(w),se=o.useCallback(ue=>{const Q=ho(ue.target);Q&&G(ye=>ye?(ye.set(Q,Co(Q)),new Map(ye)):null)},[]);return o.useEffect(()=>{const ue=oe.current;if(w!==ue){Q(ue);const ye=w.map(pe=>{const we=ho(pe);return we?(we.addEventListener("scroll",se,{passive:!0}),[we,Co(we)]):null}).filter(pe=>pe!=null);G(ye.length?new Map(ye):null),oe.current=w}return()=>{Q(w),Q(ue)};function Q(ye){ye.forEach(pe=>{const we=ho(pe);we?.removeEventListener("scroll",se)})}},[se,w]),o.useMemo(()=>w.length?E?Array.from(E.values()).reduce((ue,Q)=>_t(ue,Q),kt):ol(w):kt,[w,E])})(be),Qe=pr(Be),ie=pr(Be,[ce]),Me=_t(C,Qe),Le=ae?Ui(ae,C):null,Ie=de&&Le?b({active:de,collisionRect:Le,droppableRects:De,droppableContainers:re,pointerCoordinates:Pe}):null,xe=Xr(Ie,"id"),[N,Y]=o.useState(null),j=(function(w,E,G){return{...w,scaleX:E&&G?E.width/G.width:1,scaleY:E&&G?E.height/G.height:1}})(ze?C:_t(C,ie),(a=N?.rect)!=null?a:null,ce),Z=o.useRef(null),qe=o.useCallback((w,E)=>{let{sensor:G,options:oe}=E;if(U.current==null)return;const se=S.get(U.current);if(!se)return;const ue=w.nativeEvent,Q=new G({active:U.current,activeNode:se,event:ue,options:oe,context:Ce,onAbort(pe){if(!S.get(pe))return;const{onDragAbort:we}=P.current,Ue={id:pe};we?.(Ue),K({type:"onDragAbort",event:Ue})},onPending(pe,we,Ue,Te){if(!S.get(pe))return;const{onDragPending:Ne}=P.current,je={id:pe,constraint:we,initialCoordinates:Ue,offset:Te};Ne?.(je),K({type:"onDragPending",event:je})},onStart(pe){const we=U.current;if(we==null)return;const Ue=S.get(we);if(!Ue)return;const{onDragStart:Te}=P.current,Ne={activatorEvent:ue,active:{id:we,data:Ue.data,rect:_}};jt.unstable_batchedUpdates(()=>{Te?.(Ne),L(At.Initializing),z({type:gt.DragStart,initialCoordinates:pe,active:we}),K({type:"onDragStart",event:Ne}),R(Z.current),k(ue)})},onMove(pe){z({type:gt.DragMove,coordinates:pe})},onEnd:ye(gt.DragEnd),onCancel:ye(gt.DragCancel)});function ye(pe){return async function(){const{active:we,collisions:Ue,over:Te,scrollAdjustedTranslate:Ne}=Ce.current;let je=null;if(we&&Ne){const{cancelDrop:_e}=P.current;je={activatorEvent:ue,active:we,collisions:Ue,delta:Ne,over:Te},pe===gt.DragEnd&&typeof _e=="function"&&await Promise.resolve(_e(je))&&(pe=gt.DragCancel)}U.current=null,jt.unstable_batchedUpdates(()=>{z({type:pe}),L(At.Uninitialized),Y(null),R(null),k(null),Z.current=null;const _e=pe===gt.DragEnd?"onDragEnd":"onDragCancel";if(je){const We=P.current[_e];We?.(je),K({type:_e,event:je})}})}}Z.current=Q},[S]),g=o.useCallback((w,E)=>(G,oe)=>{const se=G.nativeEvent,ue=S.get(oe);if(U.current!==null||!ue||se.dndKit||se.defaultPrevented)return;const Q={active:ue};w(G,E.options,Q)===!0&&(se.dndKit={capturedBy:E.sensor},U.current=oe,qe(G,E))},[S,qe]),T=(function(w,E){return o.useMemo(()=>w.reduce((G,oe)=>{const{sensor:se}=oe;return[...G,...se.activators.map(ue=>({eventName:ue.eventName,handler:E(ue.handler,oe)}))]},[]),[w,E])})(p,g);(function(w){o.useEffect(()=>{if(!$n)return;const E=w.map(G=>{let{sensor:oe}=G;return oe.setup==null?void 0:oe.setup()});return()=>{for(const G of E)G?.()}},w.map(E=>{let{sensor:G}=E;return G}))})(p),Rt(()=>{ce&&M===At.Initializing&&L(At.Initialized)},[ce,M]),o.useEffect(()=>{const{onDragMove:w}=P.current,{active:E,activatorEvent:G,collisions:oe,over:se}=Ce.current;if(!E||!G)return;const ue={active:E,activatorEvent:G,collisions:oe,delta:{x:Me.x,y:Me.y},over:se};jt.unstable_batchedUpdates(()=>{w?.(ue),K({type:"onDragMove",event:ue})})},[Me.x,Me.y]),o.useEffect(()=>{const{active:w,activatorEvent:E,collisions:G,droppableContainers:oe,scrollAdjustedTranslate:se}=Ce.current;if(!w||U.current==null||!E||!se)return;const{onDragOver:ue}=P.current,Q=oe.get(xe),ye=Q&&Q.rect.current?{id:Q.id,rect:Q.rect.current,data:Q.data,disabled:Q.disabled}:null,pe={active:w,activatorEvent:E,collisions:G,delta:{x:se.x,y:se.y},over:ye};jt.unstable_batchedUpdates(()=>{Y(ye),ue?.(pe),K({type:"onDragOver",event:pe})})},[xe]),Rt(()=>{Ce.current={activatorEvent:$,active:de,activeNode:ke,collisionRect:Le,collisions:Ie,droppableRects:De,draggableNodes:S,draggingNode:me,draggingNodeRect:ae,droppableContainers:D,over:N,scrollableAncestors:be,scrollAdjustedTranslate:Me},_.current={initial:ae,translated:Le}},[de,ke,Ie,Le,S,me,ae,De,D,N,be,Me]),Qi({...te,delta:W,draggingRect:Le,pointerCoordinates:Pe,scrollableAncestors:be,scrollableAncestorRects:He});const q=o.useMemo(()=>({active:de,activeNode:ke,activeNodeRect:ce,activatorEvent:$,collisions:Ie,containerNodeRect:Ae,dragOverlay:ne,draggableNodes:S,droppableContainers:D,droppableRects:De,over:N,measureDroppableContainers:Fe,scrollableAncestors:be,scrollableAncestorRects:He,measuringConfiguration:Re,measuringScheduled:ve,windowRect:Ee}),[de,ke,ce,$,Ie,Ae,ne,S,D,De,N,Fe,be,He,Re,ve,Ee]),y=o.useMemo(()=>({activatorEvent:$,activators:T,active:de,activeNodeRect:ce,ariaDescribedById:{draggable:ee},dispatch:z,draggableNodes:S,over:N,measureDroppableContainers:Fe}),[$,T,de,ce,z,ee,S,N,Fe]);return o.createElement(_r.Provider,{value:V},o.createElement(yn.Provider,{value:y},o.createElement(ul.Provider,{value:q},o.createElement(Zn.Provider,{value:j},s)),o.createElement(aa,{disabled:m?.restoreFocus===!1})),o.createElement(Li,{...m,hiddenTextDescribedById:ee}))}),ca=o.createContext(null),yr="button";function da(e){let{id:t,data:n,disabled:l=!1,attributes:a}=e;const i=Cn("Draggable"),{activators:m,activatorEvent:h,active:s,activeNodeRect:p,ariaDescribedById:b,draggableNodes:v,over:u}=o.useContext(yn),{role:I=yr,roleDescription:x="draggable",tabIndex:F=0}=a??{},z=s?.id===t,K=o.useContext(z?Zn:ca),[V,M]=jn(),[L,f]=jn(),A=(function(W,D){return o.useMemo(()=>W.reduce((O,_)=>{let{eventName:de,handler:U}=_;return O[de]=H=>{U(H,D)},O},{}),[W,D])})(m,t),S=mn(n);return Rt(()=>(v.set(t,{id:t,key:i,node:V,activatorNode:L,data:S}),()=>{const W=v.get(t);W&&W.key===i&&v.delete(t)}),[v,t]),{active:s,activatorEvent:h,activeNodeRect:p,attributes:o.useMemo(()=>({role:I,tabIndex:F,"aria-disabled":l,"aria-pressed":!(!z||I!==yr)||void 0,"aria-roledescription":x,"aria-describedby":b.draggable}),[l,I,F,z,x,b.draggable]),isDragging:z,listeners:l?void 0:A,node:V,over:u,setNodeRef:M,setActivatorNodeRef:f,transform:K}}function hl(){return o.useContext(ul)}const ua={timeout:25};function ga(e){let{animation:t,children:n}=e;const[l,a]=o.useState(null),[i,m]=o.useState(null),h=On(n);return n||l||!h||a(h),Rt(()=>{if(!i)return;const s=l?.key,p=l?.props.id;s!=null&&p!=null?Promise.resolve(t(p,i)).then(()=>{a(null)}):a(null)},[t,l,i]),o.createElement(o.Fragment,null,n,l?o.cloneElement(l,{ref:m}):null)}const ha={x:0,y:0,scaleX:1,scaleY:1};function ma(e){let{children:t}=e;return o.createElement(yn.Provider,{value:dl},o.createElement(Zn.Provider,{value:ha},t))}const fa={position:"fixed",touchAction:"none"},pa=e=>_n(e)?"transform 250ms ease":void 0,va=o.forwardRef((e,t)=>{let{as:n,activatorEvent:l,adjustScale:a,children:i,className:m,rect:h,style:s,transform:p,transition:b=pa}=e;if(!h)return null;const v=a?p:{...p,scaleX:1,scaleY:1},u={...fa,width:h.width,height:h.height,top:h.top,left:h.left,transform:Bt.Transform.toString(v),transformOrigin:a&&l?Pi(l,h):void 0,transition:typeof b=="function"?b(l):b,...s};return o.createElement(n,{className:m,style:u,ref:t},i)}),Ca=e=>t=>{let{active:n,dragOverlay:l}=t;const a={},{styles:i,className:m}=e;if(i!=null&&i.active)for(const[h,s]of Object.entries(i.active))s!==void 0&&(a[h]=n.node.style.getPropertyValue(h),n.node.style.setProperty(h,s));if(i!=null&&i.dragOverlay)for(const[h,s]of Object.entries(i.dragOverlay))s!==void 0&&l.node.style.setProperty(h,s);return m!=null&&m.active&&n.node.classList.add(m.active),m!=null&&m.dragOverlay&&l.node.classList.add(m.dragOverlay),function(){for(const[h,s]of Object.entries(a))n.node.style.setProperty(h,s);m!=null&&m.active&&n.node.classList.remove(m.active)}},ml={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:Bt.Transform.toString(t)},{transform:Bt.Transform.toString(n)}]},sideEffects:Ca({styles:{active:{opacity:"0"}}})};function ya(e){let{config:t,draggableNodes:n,droppableContainers:l,measuringConfiguration:a}=e;return Wn((i,m)=>{if(t===null)return;const h=n.get(i);if(!h)return;const s=h.node.current;if(!s)return;const p=cl(m);if(!p)return;const{transform:b}=Ct(m).getComputedStyle(m),v=Yr(b);if(!v)return;const u=typeof t=="function"?t:(function(I){const{duration:x,easing:F,sideEffects:z,keyframes:K}={...ml,...I};return V=>{let{active:M,dragOverlay:L,transform:f,...A}=V;if(!x)return;const S={x:L.rect.left-M.rect.left,y:L.rect.top-M.rect.top},W={scaleX:f.scaleX!==1?M.rect.width*f.scaleX/L.rect.width:1,scaleY:f.scaleY!==1?M.rect.height*f.scaleY/L.rect.height:1},D={x:f.x-S.x,y:f.y-S.y,...W},O=K({...A,active:M,dragOverlay:L,transform:{initial:f,final:D}}),[_]=O,de=O[O.length-1];if(JSON.stringify(_)===JSON.stringify(de))return;const U=z?.({active:M,dragOverlay:L,...A}),H=L.node.animate(O,{duration:x,easing:F,fill:"forwards"});return new Promise(R=>{H.onfinish=()=>{U?.(),R()}})}})(t);return rl(s,a.draggable.measure),u({active:{id:i,data:h.data,node:s,rect:a.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:m,rect:a.dragOverlay.measure(p)},droppableContainers:l,measuringConfiguration:a,transform:v})})}let wr=0;function wa(e){return o.useMemo(()=>{if(e!=null)return wr++,wr},[e])}const ba=o.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:l,style:a,transition:i,modifiers:m,wrapperElement:h="div",className:s,zIndex:p=999}=e;const{activatorEvent:b,active:v,activeNodeRect:u,containerNodeRect:I,draggableNodes:x,droppableContainers:F,dragOverlay:z,over:K,measuringConfiguration:V,scrollableAncestors:M,scrollableAncestorRects:L,windowRect:f}=hl(),A=o.useContext(Zn),S=wa(v?.id),W=gl(m,{activatorEvent:b,active:v,activeNodeRect:u,containerNodeRect:I,draggingNodeRect:z.rect,over:K,overlayNodeRect:z.rect,scrollableAncestors:M,scrollableAncestorRects:L,transform:A,windowRect:f}),D=xo(u),O=ya({config:l,draggableNodes:x,droppableContainers:F,measuringConfiguration:V}),_=D?z.setRef:void 0;return o.createElement(ma,null,o.createElement(ga,{animation:O},v&&S?o.createElement(va,{key:S,id:v.id,ref:_,as:h,activatorEvent:b,adjustScale:t,className:s,transition:i,rect:D,style:{zIndex:p,...a},transform:W},n):null))});function Ao(e,t,n){const l=e.slice();return l.splice(n<0?l.length+n:n,0,l.splice(t,1)[0]),l}function xa(e,t){return e.reduce((n,l,a)=>{const i=t.get(l);return i&&(n[a]=i),n},Array(e.length))}function An(e){return e!==null&&e>=0}const Dn={scaleX:1,scaleY:1},qa=e=>{var t;let{rects:n,activeNodeRect:l,activeIndex:a,overIndex:i,index:m}=e;const h=(t=n[a])!=null?t:l;if(!h)return null;const s=(function(p,b,v){const u=p[b],I=p[b-1],x=p[b+1];return!u||!I&&!x?0:v<b?I?u.left-(I.left+I.width):x.left-(u.left+u.width):x?x.left-(u.left+u.width):u.left-(I.left+I.width)})(n,m,a);if(m===a){const p=n[i];return p?{x:a<i?p.left+p.width-(h.left+h.width):p.left-h.left,y:0,...Dn}:null}return m>a&&m<=i?{x:-h.width-s,y:0,...Dn}:m<a&&m>=i?{x:h.width+s,y:0,...Dn}:{x:0,y:0,...Dn}},Do=e=>{let{rects:t,activeIndex:n,overIndex:l,index:a}=e;const i=Ao(t,l,n),m=t[a],h=i[a];return h&&m?{x:h.left-m.left,y:h.top-m.top,scaleX:h.width/m.width,scaleY:h.height/m.height}:null},fl="Sortable",pl=o.createContext({activeIndex:-1,containerId:fl,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Do,disabled:{draggable:!1,droppable:!1}});function Sa(e){let{children:t,id:n,items:l,strategy:a=Do,disabled:i=!1}=e;const{active:m,dragOverlay:h,droppableRects:s,over:p,measureDroppableContainers:b}=hl(),v=Cn(fl,n),u=h.rect!==null,I=o.useMemo(()=>l.map(A=>typeof A=="object"&&"id"in A?A.id:A),[l]),x=m!=null,F=m?I.indexOf(m.id):-1,z=p?I.indexOf(p.id):-1,K=o.useRef(I),V=!(function(A,S){if(A===S)return!0;if(A.length!==S.length)return!1;for(let W=0;W<A.length;W++)if(A[W]!==S[W])return!1;return!0})(I,K.current),M=z!==-1&&F===-1||V,L=(function(A){return typeof A=="boolean"?{draggable:A,droppable:A}:A})(i);Rt(()=>{V&&x&&b(I)},[V,I,x,b]),o.useEffect(()=>{K.current=I},[I]);const f=o.useMemo(()=>({activeIndex:F,containerId:v,disabled:L,disableTransforms:M,items:I,overIndex:z,useDragOverlay:u,sortedRects:xa(I,s),strategy:a}),[F,v,L.draggable,L.droppable,M,I,z,s,u,a]);return o.createElement(pl.Provider,{value:f},t)}const Ra=e=>{let{id:t,items:n,activeIndex:l,overIndex:a}=e;return Ao(n,l,a).indexOf(t)},ka=e=>{let{containerId:t,isSorting:n,wasDragging:l,index:a,items:i,newIndex:m,previousItems:h,previousContainerId:s,transition:p}=e;return!(!p||!l)&&(h===i||a!==m)&&(!!n||m!==a&&t===s)},Ma={duration:200,easing:"ease"},vl="transform",Ta=Bt.Transition.toString({property:vl,duration:0,easing:"linear"}),Ia={roleDescription:"sortable"};function Ea(e){let{animateLayoutChanges:t=ka,attributes:n,disabled:l,data:a,getNewIndex:i=Ra,id:m,strategy:h,resizeObserverConfig:s,transition:p=Ma}=e;const{items:b,containerId:v,activeIndex:u,disabled:I,disableTransforms:x,sortedRects:F,overIndex:z,useDragOverlay:K,strategy:V}=o.useContext(pl),M=(function(B,ne){var me,ae;return typeof B=="boolean"?{draggable:B,droppable:!1}:{draggable:(me=B?.draggable)!=null?me:ne.draggable,droppable:(ae=B?.droppable)!=null?ae:ne.droppable}})(l,I),L=b.indexOf(m),f=o.useMemo(()=>({sortable:{containerId:v,index:L,items:b},...a}),[v,a,L,b]),A=o.useMemo(()=>b.slice(b.indexOf(m)),[b,m]),{rect:S,node:W,isOver:D,setNodeRef:O}=(function(B){let{data:ne,disabled:me=!1,id:ae,resizeObserverConfig:ze}=B;const le=Cn("Droppable"),{active:fe,dispatch:Ee,over:be,measureDroppableContainers:He}=o.useContext(yn),C=o.useRef({disabled:me}),Pe=o.useRef(!1),Be=o.useRef(null),Qe=o.useRef(null),{disabled:ie,updateMeasurementsFor:Me,timeout:Le}={...ua,...ze},Ie=mn(Me??ae),xe=Un({callback:o.useCallback(()=>{Pe.current?(Qe.current!=null&&clearTimeout(Qe.current),Qe.current=setTimeout(()=>{He(Array.isArray(Ie.current)?Ie.current:[Ie.current]),Qe.current=null},Le)):Pe.current=!0},[Le]),disabled:ie||!fe}),N=o.useCallback((qe,g)=>{xe&&(g&&(xe.unobserve(g),Pe.current=!1),qe&&xe.observe(qe))},[xe]),[Y,j]=jn(N),Z=mn(ne);return o.useEffect(()=>{xe&&Y.current&&(xe.disconnect(),Pe.current=!1,xe.observe(Y.current))},[Y,xe]),o.useEffect(()=>(Ee({type:gt.RegisterDroppable,element:{id:ae,key:le,disabled:me,node:Y,rect:Be,data:Z}}),()=>Ee({type:gt.UnregisterDroppable,key:le,id:ae})),[ae]),o.useEffect(()=>{me!==C.current.disabled&&(Ee({type:gt.SetDroppableDisabled,id:ae,key:le,disabled:me}),C.current.disabled=me)},[ae,le,me,Ee]),{active:fe,rect:Be,isOver:be?.id===ae,node:Y,over:be,setNodeRef:j}})({id:m,data:f,disabled:M.droppable,resizeObserverConfig:{updateMeasurementsFor:A,...s}}),{active:_,activatorEvent:de,activeNodeRect:U,attributes:H,setNodeRef:R,listeners:$,isDragging:k,over:P,setActivatorNodeRef:ee,transform:re}=da({id:m,data:f,attributes:{...Ia,...n},disabled:M.draggable}),Re=(function(){for(var B=arguments.length,ne=new Array(B),me=0;me<B;me++)ne[me]=arguments[me];return o.useMemo(()=>ae=>{ne.forEach(ze=>ze(ae))},ne)})(O,R),he=!!_,De=he&&!x&&An(u)&&An(z),Fe=!K&&k,ve=Fe&&De?re:null,ke=De?ve??(h??V)({rects:F,activeNodeRect:U,activeIndex:u,overIndex:z,index:L}):null,$e=An(u)&&An(z)?i({id:m,items:b,activeIndex:u,overIndex:z}):L,te=_?.id,X=o.useRef({activeId:te,items:b,newIndex:$e,containerId:v}),ce=b!==X.current.items,Ae=t({active:_,containerId:v,isDragging:k,isSorting:he,id:m,index:L,items:b,newIndex:X.current.newIndex,previousItems:X.current.items,previousContainerId:X.current.containerId,transition:p,wasDragging:X.current.activeId!=null}),Ce=(function(B){let{disabled:ne,index:me,node:ae,rect:ze}=B;const[le,fe]=o.useState(null),Ee=o.useRef(me);return Rt(()=>{if(!ne&&me!==Ee.current&&ae.current){const be=ze.current;if(be){const He=Jt(ae.current,{ignoreTransform:!0}),C={x:be.left-He.left,y:be.top-He.top,scaleX:be.width/He.width,scaleY:be.height/He.height};(C.x||C.y)&&fe(C)}}me!==Ee.current&&(Ee.current=me)},[ne,me,ae,ze]),o.useEffect(()=>{le&&fe(null)},[le]),le})({disabled:!Ae,index:L,node:W,rect:S});return o.useEffect(()=>{he&&X.current.newIndex!==$e&&(X.current.newIndex=$e),v!==X.current.containerId&&(X.current.containerId=v),b!==X.current.items&&(X.current.items=b)},[he,$e,v,b]),o.useEffect(()=>{if(te===X.current.activeId)return;if(te!=null&&X.current.activeId==null)return void(X.current.activeId=te);const B=setTimeout(()=>{X.current.activeId=te},50);return()=>clearTimeout(B)},[te]),{active:_,activeIndex:u,attributes:H,data:f,rect:S,index:L,newIndex:$e,items:b,isOver:D,isSorting:he,isDragging:k,listeners:$,node:W,overIndex:z,over:P,setNodeRef:Re,setActivatorNodeRef:ee,setDroppableNodeRef:O,setDraggableNodeRef:R,transform:Ce??ke,transition:(function(){if(Ce||ce&&X.current.newIndex===L)return Ta;if(!(Fe&&!_n(de)||!p)&&(he||Ae))return Bt.Transition.toString({...p,property:vl})})()}}function Kn(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const Fa=[Je.Down,Je.Right,Je.Up,Je.Left],Aa=(e,t)=>{let{context:{active:n,collisionRect:l,droppableRects:a,droppableContainers:i,over:m,scrollableAncestors:h}}=t;if(Fa.includes(e.code)){if(e.preventDefault(),!n||!l)return;const s=[];i.getEnabled().forEach(v=>{if(!v||v!=null&&v.disabled)return;const u=a.get(v.id);if(u)switch(e.code){case Je.Down:l.top<u.top&&s.push(v);break;case Je.Up:l.top>u.top&&s.push(v);break;case Je.Left:l.left>u.left&&s.push(v);break;case Je.Right:l.left<u.left&&s.push(v)}});const p=(v=>{let{collisionRect:u,droppableRects:I,droppableContainers:x}=v;const F=ir(u),z=[];for(const K of x){const{id:V}=K,M=I.get(V);if(M){const L=ir(M),f=F.reduce((S,W,D)=>S+Gr(L[D],W),0),A=Number((f/4).toFixed(4));z.push({id:V,data:{droppableContainer:K,value:A}})}}return z.sort(Zr)})({collisionRect:l,droppableRects:a,droppableContainers:s});let b=Xr(p,"id");if(b===m?.id&&p.length>1&&(b=p[1].id),b!=null){const v=i.get(n.id),u=i.get(b),I=u?a.get(u.id):null,x=u?.node.current;if(x&&I&&v&&u){const F=Gn(x).some((L,f)=>h[f]!==L),z=br(v,u),K=(function(L,f){return!Kn(L)||!Kn(f)||!br(L,f)?!1:L.data.current.sortable.index<f.data.current.sortable.index})(v,u),V=F||!z?{x:0,y:0}:{x:K?l.width-I.width:0,y:K?l.height-I.height:0},M={x:I.left,y:I.top};return V.x&&V.y?M:fn(M,V)}}}};function br(e,t){return!(!Kn(e)||!Kn(t))&&e.data.current.sortable.containerId===t.data.current.sortable.containerId}const Da=e=>{let{transform:t}=e;return{...t,y:0}},Cl=o.memo(o.forwardRef((e,t)=>{const{children:n,style:l,className:a,index:i,editing:m,editable:h,selectedIndex:s,background:p,activeColor:b,borderColor:v,borderWidth:u,dragging:I,...x}=e;return c.jsxs("div",{ref:t,className:st(a),style:{...l,display:"flex",flexDirection:"column",background:s===i?"white":p,minHeight:"0px",fontFamily:"inherit",fontSize:"16px",fontWeight:s===i?"700":"400",lineHeight:"1",letterSpacing:"0px",textTransform:"none",minWidth:"unset"},...x,children:[c.jsxs("div",{style:{flex:"1 1 100%",display:"flex",flexDirection:"row"},children:[c.jsx("div",{style:{marginLeft:s===i?"0px":"-1px",marginTop:s===i?"0px":"4px",marginBottom:"0px",background:"grey",minWidth:"1px"}}),n,s===i?c.jsx("div",{style:{marginLeft:"0px",marginTop:"0px",marginBottom:"0px",background:"grey",minWidth:"1px"}}):c.jsx(c.Fragment,{})]}),c.jsx("div",{style:{flex:"1 1 100%",background:s===i&&b?b?.toCSS():"none",minHeight:"2px"}})]})})),St={Wrapper:"_Wrapper_1wyun_25",fadeIn:"_fadeIn_1wyun_33",dragOverlay:"_dragOverlay_1wyun_37",Item:"_Item_1wyun_47",withHandle:"_withHandle_1wyun_61",dragging:"_dragging_1wyun_66",disabled:"_disabled_1wyun_74"},zo=o.memo(o.forwardRef(({color:e,dragOverlay:t,dragging:n,disabled:l,fadeIn:a,handle:i,height:m,index:h,listeners:s,onRemove:p,renderItem:b,sorting:v,style:u,transition:I,transform:x,value:F,wrapperStyle:z,...K},V)=>{o.useEffect(()=>{if(t)return document.body.style.cursor="grabbing",()=>{document.body.style.cursor=""}},[t]);const M=b?b({dragOverlay:!!t,dragging:!!n,sorting:!!v,index:h,fadeIn:!!a,listeners:s,ref:V,style:u,transform:x,transition:I,value:F}):c.jsx(c.Fragment,{children:F});return c.jsx("div",{className:st("tab-item",St.Wrapper,a&&St.fadeIn,v&&St.sorting,t&&St.dragOverlay),style:{...z,transition:[I,z?.transition].filter(Boolean).join(", "),"--translate-x":x?`${Math.round(x.x)}px`:void 0,"--translate-y":x?`${Math.round(x.y)}px`:void 0,"--scale-x":x?.scaleX?`${x.scaleX}`:void 0,"--scale-y":x?.scaleY?`${x.scaleY}`:void 0,"--index":h},ref:V,children:c.jsx("div",{className:st(St.Item,n&&St.dragging,i&&St.withHandle,t&&St.dragOverlay,l&&St.disabled,e&&St.color,"dragging"),style:u,"data-cypress":"draggable-item",...i?void 0:s,...K,tabIndex:i?void 0:-1,children:M})})})),xr={Row:"_Row_1kr10_1"},yl=o.memo(o.forwardRef(({children:e,horizontal:t,style:n},l)=>c.jsx("div",{ref:l,style:{...n},className:st(xr.Row,t&&xr.horizontal),children:e}))),za={...ml},Na=o.memo(o.forwardRef((e,t)=>{const{className:n,activationConstraint:l,animateLayoutChanges:a,adjustScale:i=!1,collisionDetection:m=Oi,coordinateGetter:h=Aa,dropAnimation:s=za,getItemStyles:p=()=>({}),getNewIndex:b,handle:v=!1,items:u,onMove:I,isDisabled:x=()=>!1,measuring:F,modifiers:z,renderItem:K,renderDivider:V,reorderItems:M=Ao,strategy:L=Do,style:f,useDragOverlay:A=!0,onDragStart:S,wrapperStyle:W=()=>({})}=e,[D,O]=o.useState(()=>u);o.useEffect(()=>{O(u)},[u]);const[_,de]=o.useState(null),U=(function(){for(var P=arguments.length,ee=new Array(P),re=0;re<P;re++)ee[re]=arguments[re];return o.useMemo(()=>[...ee].filter(Re=>Re!=null),[...ee])})(go(al,{activationConstraint:l}),go(sl,{activationConstraint:l}),go(Eo,{scrollBehavior:"Cypress"in window?"auto":void 0,coordinateGetter:h})),H=D.indexOf.bind(D),R=_?H(_):-1,$=[];D.map((P,ee)=>{$.push(c.jsx(La,{id:P,handle:v,index:ee,style:p,wrapperStyle:W,disabled:x(P),renderItem:K,animateLayoutChanges:a,useDragOverlay:A,getNewIndex:b},P+"-"+ee));const re=V?.({key:"divider-"+ee});re&&$.push(re)});const{getPortalContainer:k}=r.useFullscreenPortal();return c.jsxs(sa,{sensors:U,collisionDetection:m,onDragStart:P=>{const{active:ee}=P;ee&&(S?.(P),de(ee.id))},autoScroll:{canScroll:P=>!0},onDragEnd:P=>{if(de(null),P.over){const ee=H(P.over.id);R!==ee&&(O(re=>M(re,R,ee)),I?.(R,ee))}},onDragCancel:()=>{de(null)},measuring:F,modifiers:z,children:[c.jsx("div",{style:{display:"flex",justifyContent:"flex-start",boxSizing:"border-box",...f},className:st(n,St.Wrapper),children:c.jsx(Sa,{items:D,strategy:L,children:c.jsx(yl,{ref:t,children:$})})}),A?jt.createPortal(c.jsx(ba,{adjustScale:i,dropAnimation:s,children:_?c.jsx(zo,{value:D[R],handle:v,renderItem:K,wrapperStyle:W({index:R,isDragging:!0,id:D[R]}),index:R,dragging:!0,style:p({id:D[R],index:R,isSorting:_!==null,isDragging:!0,overIndex:-1,isDragOverlay:!0}),dragOverlay:!0}):null}),k()):null]})}));function La({disabled:e,animateLayoutChanges:t,getNewIndex:n,handle:l,id:a,index:i,onRemove:m,style:h,renderItem:s,useDragOverlay:p,wrapperStyle:b}){const{attributes:v,isDragging:u,isSorting:I,listeners:x,overIndex:F,setNodeRef:z,transform:K,transition:V}=Ea({id:a,animateLayoutChanges:t,disabled:e,getNewIndex:n});return c.jsx(zo,{ref:z,value:a,disabled:e,dragging:u,sorting:I,handle:l,renderItem:s,index:i,style:h({index:i,id:a,isDragging:u,isSorting:I,overIndex:F}),onRemove:m?()=>m(a):void 0,transform:K,transition:V,wrapperStyle:b({index:i,isDragging:u,id:a}),listeners:x,"data-index":i,"data-id":a,dragOverlay:!p&&u,...v})}const Pa="_TabStrip_3x0dp_1",ja=new d.Color("rgb(33, 115, 70)"),Oa="#eee",Ba=e=>c.jsx(Cl,{...e}),wl=o.memo(o.forwardRef((e,t)=>{const{children:n,style:l,className:a,selectedTabIndex:i=0,tabNames:m=[],onSelectedTabIndexChange:h,onTabNameChange:s,onTabMove:p,createScrollStartButton:b=r.defaultCreateScrollStartButton,createScrollEndButton:v=r.defaultCreateScrollEndButton,createScrollEdgeButton:u=r.defaultCreateScrollEdgeButton,createTabButton:I=Ba,createTabDivider:x,editLabelProps:F,disabled:z=!1,disableDrag:K=!1,background:V="white",activeColor:M=ja,borderColor:L=Oa,borderWidth:f=1}=e,[A,S]=o.useState(i),[W,D]=o.useState(m),O=o.useCallback(le=>{const fe=k.current?.[le]?.closest(".tab-item")??k.current?.[le];fe&&Fe.current?.scrollTo({top:fe.offsetTop,left:fe.offsetLeft,behavior:"smooth"})},[]);o.useEffect(()=>{O(i)},[i]);const _=o.useCallback((le,fe)=>{fe!==A&&(S(fe),h?.(fe)),O(fe)},[h,A]),de=o.useCallback((le,fe)=>{p?.(le,fe)},[p]),U=o.useRef(null),[H,R]=o.useState(-1),$=o.useCallback((le,fe)=>{s?.(le,fe)},[s]);o.useLayoutEffect(()=>{S(i)},[i]),o.useLayoutEffect(()=>{D(m)},[m]);const k=o.useRef([]),P=o.useRef(null);o.useImperativeHandle(t,()=>Object.assign({startEdit(le){k.current?.[le]?.startEdit()},cancel(le){k.current?.[le]?.cancel()}},P.current),[A,H]);const ee=o.useCallback(({value:le,index:fe,dragging:Ee})=>{const{style:be,maxLength:He,...C}=F||{},Pe=c.jsx(Kr,{ref:Be=>{k.current[fe]=Be},value:le,disabled:z,maxLength:He,style:{color:A===fe&&M?M?.toRGBA().toString():"inherit",flex:"1 1 100%",paddingTop:"1px",paddingBottom:"1px",...be},styleHover:{},onSubmit:Be=>(U.current=!1,R(-1),$(fe,Be)),onCancel:()=>{U.current=!1,R(-1)},onChange:Be=>{U.current=!0,R(fe)},...C});return I({onClick:Be=>_(Be,fe),value:le,index:fe,editing:H===fe&&U.current,editable:!0,disabled:z,selectedIndex:A,background:V,activeColor:M,borderColor:L,borderWidth:f,dragging:Ee,children:Pe})},[A,$,_,F,z,H,I]),[re,{width:Re}]=Ot(),[he,{width:De}]=Ot(),Fe=o.useRef(null),[ve,ke]=o.useState({left:0,top:0,width:0,height:0}),[$e,te]=o.useState(null);o.useEffect(()=>{$e!==null&&Fe.current&&Fe.current.scrollTo({left:$e,behavior:"smooth"})},[$e]);const X=o.useCallback((le,fe=!1)=>{if(!Fe.current)return 0;let Ee=Fe.current.firstChild.getBoundingClientRect(),be=Fe.current.firstChild.firstChild.children,He=0;return He=fe?0:r.ScrollUtils.getScrollTo(le,Ee.left,be,!0,Math.max(0,le-200)),te(He),Math.max(0,He)},[]),ce=o.useCallback((le,fe=!1)=>{if(!Fe.current)return 0;let Ee=Fe.current.firstChild.getBoundingClientRect(),be=Fe.current.firstChild.firstChild.children,He=0;const C=Math.ceil(De-Re);return He=fe?C:r.ScrollUtils.getScrollTo(le,Ee.left,be,!1,Math.max(0,le+200)),te(He),Math.min(C,He)},[De,Re]),Ae=o.useRef(null),Ce=o.useRef(null),B=o.useCallback(()=>{Ce.current&&(clearTimeout(Ce.current),Ce.current=null,Ae.current=null)},[]),ne=o.useCallback((le,fe,Ee=260)=>{Ae.current=le,Ce.current=setTimeout(()=>{const be=fe?X(Ae.current||le):ce(Ae.current||le);be!==Ae.current?ne(be,fe,120):B()},Ee)},[X,ce,B]);o.useEffect(()=>()=>B(),[B]);const me=o.useMemo(()=>({style:{marginLeft:"4px",marginRight:"6px"},disabled:Math.floor(ve.left)<=0||Math.floor(De-Re)===0,orientation:r.ScrollbarOrientation.Horizontal,onMouseUp:B,onMouseLeave:B,onMouseDown:()=>ne(Fe.current.scrollLeft,!0),onClick:le=>X(Math.min(Fe.current.scrollLeft,$e??Number.MAX_SAFE_INTEGER),le.ctrlKey)}),[ve,$e,De,Re]),ae=o.useMemo(()=>({style:{marginLeft:"6px",marginRight:"4px"},disabled:Math.floor(De-Re)<=Math.ceil(ve.left),orientation:r.ScrollbarOrientation.Horizontal,onMouseUp:B,onMouseLeave:B,onMouseDown:()=>ne(Fe.current.scrollLeft,!1),onClick:le=>ce(Math.max(Fe.current.scrollLeft,$e??0),le.ctrlKey)}),[ve,$e,De,Re]),ze=o.useMemo(()=>c.jsxs(c.Fragment,{children:[c.jsx("div",{style:{minWidth:"16px"}}),n,u?.(me)]}),[me,ae,b,v,n,u]);return c.jsxs("div",{style:{...l,display:"flex",alignItems:"stretch"},className:st(Pa,a),ref:P,children:[c.jsx("div",{style:{borderTop:`solid ${L} ${f}px`,position:"absolute",width:"100%"}}),c.jsx("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:ze}),c.jsx("div",{className:"Tabs",ref:re,style:{flex:"1 1 100%",display:"flex",position:"relative",overflow:"hidden"},children:c.jsx("div",{style:{position:"relative",overflowY:"hidden",overflowX:"hidden",marginBottom:"3px"},ref:Fe,onScroll:le=>{ke({left:le.target.scrollLeft,top:le.target.scrollTop,width:le.target.scrollWidth,height:le.target.scrollHeight})},children:c.jsx(Na,{isDisabled:le=>z||K,items:W,strategy:qa,modifiers:[Da],ref:he,renderItem:ee,renderDivider:x,onMove:de,activationConstraint:{distance:15}})})}),c.jsx("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:u(ae)})]})}));wl.displayName="TabStrip";const Nn=o.createContext(null);Nn.displayName="DocThemesContext";const Va="_script-editor_iy654_5",Ha={lightbulb:{enabled:!1},tabSize:2,acceptSuggestionOnCommitCharacter:!0,acceptSuggestionOnEnter:"on",accessibilitySupport:"auto",automaticLayout:!0,autoIndent:!1,codeLens:!0,colorDecorators:!0,contextmenu:!0,cursorBlinking:"blink",cursorSmoothCaretAnimation:!1,cursorStyle:"line",disableLayerHinting:!1,disableMonospaceOptimizations:!1,dragAndDrop:!0,glyphMargin:!0,fixedOverflowWidgets:!1,folding:!0,foldingStrategy:"auto",fontLigatures:!1,formatOnPaste:!0,formatOnType:!1,hideCursorInOverviewRuler:!1,highlightActiveIndentGuide:!0,links:!0,lineDecorationsWidth:8,lineNumbersMinChars:3,mouseWheelZoom:!1,multiCursorMergeOverlapping:!0,multiCursorModifier:"alt",overviewRulerBorder:!0,overviewRulerLanes:2,quickSuggestions:!0,quickSuggestionsDelay:100,readOnly:!1,renderControlCharacters:!1,renderFinalNewline:!0,renderIndentGuides:!0,renderLineHighlight:"all",renderWhitespace:"none",revealHorizontalRightPadding:30,roundedSelection:!0,rulers:[],scrollBeyondLastColumn:5,scrollBeyondLastLine:!0,selectOnLineNumbers:!0,selectionClipboard:!0,selectionHighlight:!0,showLightbulbIconMode:!1,showFoldingControls:"mouseover",smoothScrolling:!0,suggestOnTriggerCharacters:!0,wordBasedSuggestions:!0,wordSeparators:`~!@#$%^&*()-=+[{]}|;:'",.<>/?`,wordWrap:"off",wordWrapBreakAfterCharacters:" })]?|&,;",wordWrapBreakBeforeCharacters:"{([+",wordWrapBreakObtrusiveCharacters:".",wordWrapColumn:80,wordWrapMinified:!0,wrappingIndent:"none"},Ua=o.lazy(()=>Promise.resolve().then(()=>require("./m_YD42EXTmwxH030.cjs")));let ln,an,Ft=["define","require"],qr=!1,Ln="@0.7.11";Ln!=="@local"&&Ln!=="@0.0.0"||(Ln="");const Ka=`https://cdn.jsdelivr.net/npm/@sheetxl/sdk${Ln}/types/scripting.d.ts`,Sr=async(e,t,n)=>{const l=e.getModel();if(!l)return;const a=await t.languages.typescript.getTypeScriptWorker(),i=await a(l.uri),m=await i.getNavigationTree(l.uri.toString()),h=e.getPosition();let s={...h};s.lineNumber=1,s.column=1;let p=!1;for(let F=h.lineNumber;F>=1;F--)if(l.getLineContent(F).trim()===""){const z=No(m,l.getOffsetAt({lineNumber:F,column:1}),"function");if(!z||Wa(z)){p=!0,s.lineNumber=F+1;break}{const K=z.spans[0].start;F=l.getPositionAt(K).lineNumber,s.lineNumber=F}}let b=n,v=!1;!p&&!b.startsWith(`
28
28
  `)&&s.lineNumber>1&&(b=`
29
29
  `+b,v=!0);let u=!1;l.getLineCount()>1&&(b.endsWith(`
30
30
 
31
31
  `)||(b+=`
32
32
 
33
- `,u=!0));const I=[{range:new t.Range(s.lineNumber,s.column,s.lineNumber,s.column),text:`${b}`}];let x=null;l.pushEditOperations([],I,F=>(x=F[0].range,v&&x.startLineNumber++,u&&x.endLineNumber--,[new t.Selection(x.startLineNumber,x.startColumn,x.endLineNumber,x.endColumn)])),e.setSelection({startLineNumber:x.endLineNumber,startColumn:x.endColumn,endLineNumber:x.startLineNumber,endColumn:x.startColumn})};function $a(e,t){let n=null;const l=e.length;for(let a=0;!n&&a<l;a++){const i=e[a];i.getName()===t.text&&(n=i)}return n?n.getContext():"formula"}function qo(e,t,n,l,a=[]){if(l.kind==="function"&&l.kindModifiers==="export"){const i=l.spans[0].start,m=e.getPositionAt(i);a.push({name:l.text,type:$a(n,l),lineNumber:m.lineNumber})}if(l.childItems)for(const i of l.childItems)qo(e,t,n,i,a);return a}function No(e,t,n="function",l){const a=e.spans,i=a.length;for(let m=0;m<i;m++){const h=a[m];if(h.start<=t&&t<h.start+h.length){if(e.kind===n&&(!l||e.kindModifiers===l))return e;for(const s of e.childItems||[]){const p=No(s,t,n,l);if(p)return p}}return null}}function Wa(e){return e.kind==="comment"}const _a=o.memo(o.forwardRef((e,t)=>{const{className:n,style:l,commands:a,readOnly:i=!1,darkMode:m,loadingPanel:h,autoFocus:s=!0,frame:p,onStatusChange:b,...v}=e,u=o.useRef(null),I=o.useRef(!1),x=o.useMemo(()=>({contains(te){if(!u.current)return;const X=u.current.editor;return X&&X.getDomNode()?.contains(te)},focus(){if(!u.current)return;const te=u.current.editor;return te&&te.getDomNode()?.focus()}}),[]),F=o.useMemo(()=>[new r.Command("help",x,{label:"Script Commands",description:"Open Editor Commands",shortcut:{key:"F1"}},()=>{})],[]),z=o.useMemo(()=>{let te=null;const X=()=>x;return te=a?a.createChildGroup(X,"scriptEditor",!1):new r.CommandGroup(X,"scriptEditor"),te.addCommands(F,!0),te},[a,F]),K=a.getGroup("workbook"),V=r.useCommands(K,["executeSelectedScript","saveScripts"]),M=V[0],L=V[1],f=M?.context(),[A,S]=o.useState({message:"Loading",cursor:"",dirty:!1}),[W,D]=o.useState({loading:!1,compiling:!1,errors:[],warnings:[]}),O=r.useCallbackRef(te=>{S(X=>{const ce={...X,...te};return ge.CommonUtils.deepEqual(ce,X)?X:(L.update({disabled:!ce.dirty}).updateCallback(async()=>{await _()}),ce)})},[b,L]);o.useEffect(()=>{b?.(A)},[b,A]);const _=r.useCallbackRef(async()=>{if(!u.current)return;const te=u.current.editor;let X;if(A.dirty){const ce=te.getValue();await f?.saveSource(ce),X=f?.getScripts().getModules().getByName("scripts");const Ae=X?.getSource(),Ce=te.getValue(),B=(Ae?.length??0)!==ce.length||Ae!==Ce;O({dirty:B})}else X=f?.getScripts().getModules().getByName("scripts");return X},[A]);o.useEffect(()=>{const te=p?.addListener({onBeforeHide:async()=>(await _(),!0)});return()=>{te?.()}},[p]),o.useEffect(()=>{const te=f?.getScripts();if(te)return te.addListeners({onBeforeSearch:()=>_()})},[f]);const de=r.useCallbackRef(te=>{M?.execute(te)},[M]),U=o.useRef(""),[H,R]=o.useState(!1),$=r.useCallbackRef(async()=>{if(!u.current)return null;const te=u.current,X=te.editor;if(!X)return null;const ce=te.monaco,Ae=await(async(Ce,B,ne="export")=>{const me=Ce.getModel();if(!me)return null;const ae=await B.languages.typescript.getTypeScriptWorker(),ze=await ae(me.uri),le=await ze.getNavigationTree(me.uri.toString());let fe=null,Ee=Ce.getSelection();if(!Ee)return null;const be=Ee.startLineNumber===Ee.endLineNumber&&Ee.startColumn===Ee.endColumn?me.getLineCount():Math.min(Ee.endLineNumber,me.getLineCount());for(let He=Ee.startLineNumber;!fe&&He<=be;He++){const C=No(le,me.getOffsetAt({lineNumber:He,column:1}),"function",ne);C&&(fe=C.text)}return fe})(X,ce);return O({message:(Ae??"").toUpperCase()}),Ae?{source:X.getValue(),name:Ae}:null},[]);r.useCallbackRef(ge.CommonUtils.debounce(_,200),[]);const k=r.useCallbackRef(async(te,X,ce)=>{D(Ce=>({...Ce,compiling:!0}));const Ae=await f?.getScripts().createModule({source:ce?.getValue(),declarationsOnly:!0});Ae&&((async function(Ce,B){const ne=[];for(let me=1;me<Ce.getLineCount()+1;me++){const ae={startLineNumber:me,startColumn:1,endLineNumber:me,endColumn:Ce.getLineLength(me)+1},ze=Ce.getValueInRange(ae).indexOf("modelt");ze!==-1&&ne.push({message:"found 'modelt'",resource:"https://www.sheetxl.com",severity:B.MarkerSeverity.Hint,startLineNumber:ae.startLineNumber,startColumn:ze+1,endLineNumber:ae.startLineNumber,endColumn:ze+5})}B.editor.setModelMarkers(Ce,"owner",ne)})(te,X),(async function(Ce,B,ne,me){const ae=await B.languages.typescript.getTypeScriptWorker(),ze=await ae(Ce.uri),le=await ze.getNavigationTree(Ce.uri.toString()),fe=qo(Ce,B,me,le).map(Ee=>{let be=null,He=null;return Ee.type==="formula"?(be="formula.margin-icon",He="Formula"):Ee.type==="macro"?(be="macro.margin-icon",He="Macro"):Ee.type==="autoRun"&&(be="autorun.margin-icon",He="Auto Run"),{range:new B.Range(Ee.lineNumber,1,Ee.lineNumber,1),options:{isWholeLine:!1,glyphMarginClassName:be,glyphMarginHoverMessage:{value:He},stickiness:B.editor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges}}});De.current&&De.current.clear(),De.current=ne.createDecorationsCollection(fe)})(te,X,ce,Ae?Ae.getFunctions().getItems():ge.CommonUtils.EmptyArray),D(Ce=>({...Ce,compiling:!1})))},[f]),P=r.useCallbackRef(ge.CommonUtils.debounce(k,580),[]),ee=r.useCallbackRef(async(te=void 0)=>{if(!u.current||!f)return;const X=u.current.editor.getPosition(),ce={cursor:X?X.toString():""};te!==void 0&&(ce.message=te),O(ce);const Ae=$();f.setSelectedFunction(Ae)},[f]);o.useEffect(()=>{},[W]);const re=o.useRef(null),Re=r.useCallbackRef(async()=>{await _(),p?.close()},[p]);o.useEffect(()=>{if(!f)return;const te={insertSnippet:ce=>{u.current?.editor&&Sr(u.current.editor,u.current.monaco,ce)},close:()=>Re()};f.setEditor(te),f.setSelectedFunction($());const X=f.addContainerListener({onBeforeSave:async()=>{_()},onReadonlyChange(){},onScriptChange:async()=>{if(!u.current?.editor||!f)return;const ce=u.current.editor,Ae=f.getScripts().getModules().getItems()[0]?.getSource()??"";ce.setValue(Ae)}});return()=>{f.setEditor(null),X()}},[f]),o.useEffect(()=>()=>{const te=re.current;if(te){te.dispose();const X=te.debounceTimer;X!==void 0&&clearTimeout(X),re.current=null}},[H]);const he=r.useCallbackRef(te=>{const X=u.current?.editor;return!!X&&(X.focus(te),!0)},[A]),De=o.useRef(null),Fe=r.useCallbackRef((te,X)=>{u.current={monaco:X,editor:te},R(!0),ee("Loading Types");const ce=f?.getScripts().getModules().getItems()[0]?.getSource()??"";te.setValue(ce),Promise.resolve().then(()=>require("./DDzLr5SR58jIZjh1.cjs")).then(Ce=>Ce.customEditor).then(async Ce=>{ee(""),Ce.AutoTypings.create(te,{shareCache:!0,dontAdaptEditorOptions:!0,monaco:X,onUpdate:(B,ne)=>{if(B.type==="LookedUpPackage"&&B.success!==void 0){const me=X.languages.typescript.typescriptDefaults.getDiagnosticsOptions();X.languages.typescript.typescriptDefaults.setDiagnosticsOptions({...me,diagnosticCodesToIgnore:[]})}},onError:B=>{B==="Not implemented yet"&&(B="Compile Errors"),console.warn("Error compiling types",B)}}).then(B=>{re.current=B;const ne=te.getModel();P(ne,X,te),(()=>{if(qr)return;const me=(ze,le)=>{try{if(le===void 0)try{delete globalThis[ze]}catch{try{globalThis[ze]=void 0}catch{}}else globalThis[ze]=le}catch{}},ae=Ft.length;for(let ze=0;ze<ae;ze++){const le=Ft[ze];me(le,ln[le])}ln=void 0,qr=!0})()})}),te.addCommand("executeScript",function(Ce,...B){B?.[0]&&de({functionName:B?.[0]})},""),te.addAction({id:"executeScript",label:"Execute",keybindings:[X.KeyCode.F8],run:async Ce=>{const B=$();f?.setSelectedFunction(B);const ne=await B;de(ne)}}),te.addAction({id:"saveScript",label:"Save Script",keybindings:[X.KeyMod.CtrlCmd|X.KeyCode.KeyS],run:Ce=>{_()}}),te.onMouseDown(async Ce=>{if(Ce.target.type===X.editor.MouseTargetType.GUTTER_GLYPH_MARGIN){const B=Ce.target.position.lineNumber,ne=await X.languages.typescript.getTypeScriptWorker(),me=await ne(Ae.uri),ae=await me.getNavigationTree(Ae.uri.toString()),ze=(await _()).getFunctions().getItems(),le=qo(Ae,X,ze,ae).find(fe=>fe.lineNumber===B);if(le){const fe=Ce.event.browserEvent.button;fe===0?le.type==="macro"||le.type==="autoRun"?de({functionName:le.name}):le.type==="formula"&&f?.quickInsertFunction?.(le.name):fe===2&&(console.log("Context menu for function:",le.name),Ce.event.browserEvent.preventDefault())}}}),te.onDidChangeModelContent(()=>{O({dirty:!0}),P(Ae,X,te)}),X.editor.onDidChangeMarkers(Ce=>{Ce.some(B=>B.toString()===Ae.uri.toString())});const Ae=te.getModel();(function(Ce,B){B.languages.registerInlayHintsProvider("typescript",{provideInlayHints(ne,me,ae){const ze=[];for(let le=1;le<ne.getLineCount()+1;le++){const fe={startLineNumber:le,startColumn:1,endLineNumber:le,endColumn:ne.getLineLength(le)+1},Ee="hint",be=ne.getValueInRange(fe).indexOf("hint");be!==-1&&ze.push({kind:B.languages.InlayHintKind.Type,position:{lineNumber:fe.startLineNumber,column:be+Ee.length+1},label:"[hint]"})}return{hints:ze,dispose:()=>{}}}})})(0,X),Ae.onDidChangeContent(Ce=>{const B=f?.getScripts().getModules().getByName("scripts"),ne=B?.getSource(),me=te.getValue(),ae=(ne?.length??0)!==me.length||ne!==me;O({dirty:ae})}),te.onDidChangeCursorPosition(Ce=>{ee()})},[f]),ve=o.useMemo(()=>H?null:h||c.jsx("div",{style:{position:"absolute",width:"100%",height:"100%"},children:"Loading..."}),[H,h]),ke=o.useMemo(()=>{if(!H){if(!ln){ln={};const X=Ft.length;for(let ce=0;ce<X;ce++){const Ae=Ft[ce];ln[Ae]=globalThis[Ae]}}if(an){const X=Ft.length;for(let ce=0;ce<X;ce++){const Ae=Ft[ce];globalThis[Ae]=an[Ae]}}}const te=f?.getScripts().getModules().getByName("scripts")?.getSource()??"";return c.jsxs("div",{style:{display:"flex",flex:"1 1 100%",width:"100%",flexDirection:"row",position:"relative",boxSizing:"border-box"},children:[c.jsx(o.Suspense,{children:c.jsx(Ua,{theme:m?"extended-dark":"extended",options:{...Ha,fixedOverflowWidgets:!0,readOnly:i},language:"typescript",value:te,onValidate:X=>{let ce=!1;const Ae=X?X.length:0;for(let Ce=0;!ce&&Ce<Ae;Ce++)X[Ce].severity===8&&(ce=!0)},beforeMount:X=>{X.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!1,noSyntaxValidation:!1,diagnosticCodesToIgnore:[2307]}),X.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0}),X.editor.defineTheme("extended",{base:"vs",inherit:!0,rules:[],colors:{}}),X.editor.defineTheme("extended-dark",{base:"vs-dark",inherit:!0,rules:[],colors:{}}),(async()=>{let ce=!1,Ae=!1;try{const Ce=await(async()=>await(await fetch(Ka)).text())(),B=X.Uri.parse('inmemory://model/"sheetxl-models".d.ts');let ne=X.editor.getModel(B);ne?Ae=!0:ne=X.editor.createModel(Ce,"typescript",B),X.editor.setModelMarkers(ne,"default",[]),ce=!0}catch(Ce){console.warn("cant load types",Ce)}if(X.languages.registerLinkProvider("*",{provideLinks:(Ce,B)=>{const ne=[],me={links:ne},ae=Ce.getLinesContent(),ze=ae.length;for(let le=1;le<=ze;le++){const fe=ae[le-1],Ee=X.editor.tokenize(fe,"typescript"),be=Ee[0].length;for(let He=0;He<be;He++){const C=Ee[0]?.[He];if(C&&C.type.startsWith("string")){let Pe=C.offset,Be=Ee[0]?.[He+1]?.offset??fe.length,Qe=new X.Range(le,Pe+1,le,Be+1),ie=Ce.getValueInRange(Qe);const Me=ie[0];Me!=="`"&&Me!=="'"&&Me!=='"'||(Pe++,ie=ie.substring(1));const Le=ie[ie.length-1];Le!=="`"&&Le!=="'"&&Le!=='"'||(Pe++,ie=ie.substring(0,ie.length-1));try{f.getRanges(ie)&&ne.push({range:{endColumn:Be,endLineNumber:le,startColumn:Pe,startLineNumber:le},tooltip:`Goto range '${ie}'`,url:`/range/${ie}`})}catch(Ie){console.warn(Ie)}}}}return me}}),X.editor.registerLinkOpener({open(Ce){if(Ce?.path?.startsWith("/range/")){try{f.getRanges(Ce.path.substring(7))?.select()}catch(B){console.warn("invalid range",B)}return!0}return!1}}),!Ae){const Ce=X.languages.typescript.typescriptDefaults.getCompilerOptions();X.languages.typescript.typescriptDefaults.setCompilerOptions({...Ce,target:X.languages.typescript.ScriptTarget.ES2020,lib:["webworker","es2020","esnext.asynciterable"],downlevelIteration:!0,moduleResolution:X.languages.typescript.ModuleResolutionKind.NodeJs,allowSyntheticDefaultImports:!0,baseUrl:"inmemory://model/",allowNonTsExtensions:!0})}if(U.current&&(await Sr(u.current.editor,u.current.monaco,U.current),U.current=null),I.current&&requestAnimationFrame(async()=>{I.current&&X.editor.focus()}),!an){an={};const Ce=Ft.length;for(let B=0;B<Ce;B++){const ne=Ft[B];an[ne]=globalThis[ne]}}})()},onMount:Fe})}),ve]})},[f,z,i,ve,m]),$e=r.useImperativeElement(t,()=>({isScriptEditorElement:()=>!0,focus:te=>{he(te)},close:()=>Re(),getEditor:()=>f?.getEditor()}),[f]);return o.useEffect(()=>(s&&requestAnimationFrame(()=>{$e.current?.focus()}),()=>{u.current?.editor&&requestAnimationFrame(()=>{$e.current?.contains(document.activeElement)&&$e.current?.focus()})}),[]),c.jsx("div",{className:st("script-editor",Va,n),style:{display:"flex",flexDirection:"row",flex:"1 1 100%",position:"relative",...l},ref:$e,...v,children:ke})}));Object.defineProperty(exports,"LicenseManager",{enumerable:!0,get:()=>d.LicenseManager}),exports.ChartAreaIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 896 v 1067 h -1878 v -1878 h 43 v 989 l 253 256 l 544 -345 l 74 -91 l 644 466 l 277 -464 m 0 718 l -913 -662 l -476 591 l -403 -408 v 785 h 1792 z"}),c.jsx("path",{className:"styled background",d:"M 530 1511 l 473 -588 l 914 656 l 24 53 v 304 h -1834 l 2 -864 z"}),c.jsx("path",{className:"styled info_light",d:"M 1939 923 v 658 l -288 -192 m -1272 -40 l 525 -312 l -374 474 z"}),c.jsx("path",{className:"styled info_dark",d:"M 361 1342 l 572 -362 l 22 36 l -571 362 m 1248 1 l 287 -483 l 37 22 l -287 482 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 896 v 1067 h -1878 v -1878 h 43 v 989 l 400 405 l 471 -585 l 921 667 v -665 m 0 1024 v -306 l -913 -662 l -476 591 l -403 -408 v 785 z"})]}),exports.ChartAreaStackedIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 640 v 926 l -641 -554 l -618 703 l -576 -575 v 780 h 1835 v 43 h -1878 v -1878 h 43 v 353 l 576 577 l 661 -704 l 276 329 z"}),c.jsx("path",{className:"styled background",d:"M 1963 1941 h -1856 v -853 l 597 597 l 618 -704 l 641 555 z"}),c.jsx("path",{className:"styled info_light",d:"M 1963 1536 l -641 -555 l -618 704 l -597 -597 v -640 l 597 597 l 661 -704 l 269 319 h 329 z"}),c.jsx("path",{className:"styled info_dark",d:"M 1963 640 v 43 h -342 l -258 -310 l -659 702 l -597 -598 v -60 l 597 598 l 661 -704 l 276 329 m 322 866 v 60 l -641 -554 l -618 703 l -597 -597 v -62 l 597 599 l 618 -704 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 z"})]}),exports.ChartAreaStackedPercentIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 85 v 1878 h -1878 v -1878 m 1835 1524 l -788 -746 l -576 662 l -428 -428 v 823 h 1792 z"}),c.jsx("path",{className:"styled background",d:"M 1941 1941 h -1834 v -1834 h 1834 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 85 v 1878 h -1878 v -1878 m 1835 43 h -1792 v 1792 h 1792 z"}),c.jsx("path",{className:"styled info_light",d:"M 1941 107 v 1493 l -810 -768 l -576 661 l -448 -448 v -938 z"}),c.jsx("path",{className:"styled info_dark",d:"M 1963 1649 l -831 -786 l -576 662 l -471 -467 v -973 h 1878 m -43 1465 v -1422 h -1792 v 908 l 426 426 l 575 -661 z"})]}),exports.ChartBarIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 171 h 1707 v 341 h -640 v 299 h -1067 v 171 h 811 v 298 h 512 v 342 h -1323 v 213 m 0 -1067 h 1024 v -256 h -1024 m 0 1067 h 1280 v -256 h -1280 z"}),c.jsx("path",{className:"styled background",d:"M 1429 1387 v 298 h -1322 v -298 m 1066 -811 v 299 h -1066 v -299 z"}),c.jsx("path",{className:"styled info_light",d:"M 1813 277 v 299 h -1706 v -299 z"}),c.jsx("path",{className:"styled info_dark",d:"M 101 597 v -42 h 1691 v -256 h -1691 v -43 h 1734 v 341 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 917 1088 v 299 h -810 v -299 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 896 1109 h -795 v -42 h 838 v 322 h -43 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 768 h 1024 v -256 h 43 v 299 h -1067 v 469 h 1323 v 342 h -1323 v 213 m 0 -512 v 256 h 1280 v -256 z"})]}),exports.ChartBarStackedIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 1237 v 512 h -1237 v 256 h 1621 v 512 h -1621 v 299 m 0 -1109 h 555 v -427 h -555 m 0 1195 h 768 v -427 h -768 z"}),c.jsx("path",{className:"styled background",d:"M 107 832 v -469 h 597 v 469 m -597 768 v -469 h 810 v 469 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 597 v 512 h -597 v 256 h 811 v 512 h -811 v 299 m 0 -768 v 427 h 768 v -427 m -768 -768 v 427 h 555 v -427 z"}),c.jsx("path",{className:"styled info_light",d:"M 704 832 v -469 h 640 v 469 z"}),c.jsx("path",{className:"styled info_dark",d:"M 1365 341 v 512 h -682 v -512 m 640 43 h -598 v 427 h 598 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 917 1600 v -469 h 811 v 469 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1749 1109 v 512 h -853 v -512 m 811 43 h -768 v 427 h 768 z"})]}),exports.ChartBarStackedPercentIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 1621 v 512 h -1621 v 256 h 1621 v 512 h -1621 v 299 m 0 -1109 h 384 v -427 h -384 m 0 1195 h 1024 v -427 h -1024 z"}),c.jsx("path",{className:"styled background",d:"M 107 832 v -469 h 426 v 469 m -426 768 v -469 h 1066 v 469 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 427 v 512 h -427 v 256 h 1067 v 512 h -1067 v 299 m 0 -768 v 427 h 1024 v -427 m -1024 -768 v 427 h 384 v -427 z"}),c.jsx("path",{className:"styled info_light",d:"M 533 832 v -469 h 1195 v 469 z"}),c.jsx("path",{className:"styled info_dark",d:"M 1749 341 v 512 h -1237 v -512 m 1195 43 h -1152 v 427 h 1152 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 1173 1600 v -469 h 555 v 469 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1749 1109 v 512 h -597 v -512 m 555 43 h -512 v 427 h 512 z"})]}),exports.ChartBubble3DIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 171 v -1323 h 341 v 512 h 299 v 811 h 170 v -1067 h 299 v -640 h 341 v 1707 m -853 0 v -768 h -256 v 768 m 1067 0 v -1664 h -256 v 1664 z"}),c.jsx("path",{className:"styled background",d:"M 1728 1941 h -299 v -1706 h 299 m -811 1706 h -298 v -810 h 298 z"}),c.jsx("path",{className:"styled info_light",d:"M 619 1941 h -299 v -1322 h 299 z"}),c.jsx("path",{className:"styled info_dark",d:"M 640 1941 h -43 v -1301 h -256 v 1301 h -42 v -1344 h 341 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 1429 1941 h -298 v -1066 h 298 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 768 v -768 h -256 v -43 h 299 v 811 h 469 v -1707 h 341 v 1707 m -42 0 v -1664 h -256 v 1664 z"})]}),exports.ChartBubbleIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 171 v -1323 h 341 v 512 h 299 v 811 h 170 v -1067 h 299 v -640 h 341 v 1707 m -853 0 v -768 h -256 v 768 m 1067 0 v -1664 h -256 v 1664 z"}),c.jsx("path",{className:"styled background",d:"M 1728 1941 h -299 v -1706 h 299 m -811 1706 h -298 v -810 h 298 z"}),c.jsx("path",{className:"styled info_light",d:"M 619 1941 h -299 v -1322 h 299 z"}),c.jsx("path",{className:"styled info_dark",d:"M 640 1941 h -43 v -1301 h -256 v 1301 h -42 v -1344 h 341 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 1429 1941 h -298 v -1066 h 298 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 768 v -768 h -256 v -43 h 299 v 811 h 469 v -1707 h 341 v 1707 m -42 0 v -1664 h -256 v 1664 z"})]}),exports.ChartColumnIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 171 v -1323 h 341 v 512 h 299 v 811 h 170 v -1067 h 299 v -640 h 341 v 1707 m -853 0 v -768 h -256 v 768 m 1067 0 v -1664 h -256 v 1664 z"}),c.jsx("path",{className:"styled background",d:"M 1728 1941 h -299 v -1706 h 299 m -811 1706 h -298 v -810 h 298 z"}),c.jsx("path",{className:"styled info_light",d:"M 619 1941 h -299 v -1322 h 299 z"}),c.jsx("path",{className:"styled info_dark",d:"M 640 1941 h -43 v -1301 h -256 v 1301 h -42 v -1344 h 341 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 1429 1941 h -298 v -1066 h 298 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 768 v -768 h -256 v -43 h 299 v 811 h 469 v -1707 h 341 v 1707 m -42 0 v -1664 h -256 v 1664 z"})]}),exports.ChartColumnStackedIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -1195 h 512 v 1195 h 256 v -1621 h 512 v 1621 m -810 -512 h -427 v 512 h 427 m 768 -768 h -427 v 768 h 427 z"}),c.jsx("path",{className:"styled background",d:"M 832 1941 h -469 v -554 h 469 m 768 554 h -469 v -810 h 469 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -555 h 512 v 555 h 256 v -811 h 512 v 811 m -469 0 h 427 v -768 h -427 m -768 768 h 427 v -512 h -427 z"}),c.jsx("path",{className:"styled info_light",d:"M 832 1387 h -469 v -640 h 469 z"}),c.jsx("path",{className:"styled info_dark",d:"M 341 725 h 512 v 683 h -512 m 43 -640 v 597 h 427 v -597 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 1600 1131 h -469 v -811 h 469 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1109 299 h 512 v 853 h -512 m 43 -811 v 768 h 427 v -768 z"})]}),exports.ChartColumnStackedPercentIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -1621 h 512 v 1621 h 256 v -1621 h 512 v 1621 m -810 -384 h -427 v 384 h 427 m 768 -1024 h -427 v 1024 h 427 z"}),c.jsx("path",{className:"styled background",d:"M 832 1941 h -469 v -426 h 469 m 768 426 h -469 v -1066 h 469 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -427 h 512 v 427 h 256 v -1067 h 512 v 1067 m -469 0 h 427 v -1024 h -427 m -768 1024 h 427 v -384 h -427 z"}),c.jsx("path",{className:"styled info_light",d:"M 832 1515 h -469 v -1195 h 469 z"}),c.jsx("path",{className:"styled info_dark",d:"M 341 299 h 512 v 1237 h -512 m 43 -1195 v 1152 h 427 v -1152 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 1600 875 h -469 v -555 h 469 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1109 299 h 512 v 597 h -512 m 43 -555 v 512 h 427 v -512 z"})]}),exports.ChartEditor=Mi,exports.ChartLineIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1165 l 574 -574 l 197 144 l 402 -402 l 361 360 l 263 -301 l 32 28 l -265 303 l 264 265 l -30 30 l -262 -263 l -317 362 l -444 -326 l -775 776 v 268 m 806 -1074 l 407 299 l 292 -335 l -332 -332 m -1173 832 v 281 l 740 -740 l -162 -119 z"}),c.jsx("path",{className:"styled info",d:"M 122 1658 l -30 -30 l 1209 -1210 l 655 655 l -30 30 l -625 -625 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1165 l 574 -574 l 639 469 l 584 -668 l 32 28 l -610 697 l -641 -470 l -578 578 v 610 z"})]}),exports.ChartLineMarkersIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 128 1920 h 1835 v 43 h -1878 v -214 h -42 v -170 h 42 v -256 h -42 v -171 h 42 v -1067 h 43 v 1067 h 55 l 457 -457 v -98 h 171 v 117 l 99 73 l 175 -190 h -18 v -170 h 170 v 140 l 233 233 l 280 -373 v -171 h 170 v 171 h -118 l -302 402 l 194 195 h 98 v 171 h -171 v -171 h 13 l -160 -160 l -109 144 v 144 h -170 v -104 l -279 -205 l -703 759 v 147 h -85 m 1015 -1152 l -199 215 l 251 184 v -15 h 139 l 110 -147 l -237 -237 m -1079 726 v 256 h 48 l 705 -761 l -70 -52 v 2 h -171 v -12 l -427 426 v 141 z"}),c.jsx("path",{className:"styled current_color",d:"M 128 1920 h 1835 v 43 h -1878 v -640 h -42 v -171 h 42 v -1067 h 43 v 1067 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 416 -554 v -171 h 170 v 171 h -118 l -437 581 v 144 h -170 v -104 l -384 -282 v 2 h -171 v -12 l -427 426 v 141 h -85 z"}),c.jsx("path",{className:"styled info",d:"M 1694 1024 h 98 v 171 h -171 v -171 h 13 l -427 -427 h -64 l -930 1005 v 147 h -170 v -170 h 133 l 909 -982 h -18 v -170 h 170 v 140 z"})]}),exports.ChartLineStackedIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1037 l 571 -570 l 535 259 l 651 -550 l 27 33 l -669 565 l -534 -259 l -581 582 v 452 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z"}),c.jsx("path",{className:"styled info",d:"M 121 1189 l -29 -31 l 607 -606 l 535 259 l 651 -550 l 27 33 l -669 565 l -534 -259 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1549 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z"})]}),exports.ChartLineStackedMarkersIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -256 h -42 v -171 h 42 v -1067 h 43 v 1067 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -554 v -171 h 171 v 171 h -118 l -437 581 v 144 h -170 v -104 l -384 -282 v 2 h -171 v -12 l -427 426 v 141 h -85 v 256 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -1494 h 43 v 1494 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z"}),c.jsx("path",{className:"styled info",d:"M 1802 427 l -437 581 v 144 h -170 v -104 l -384 -282 v 2 h -171 v -12 l -427 426 v 141 h -170 v -171 h 140 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -554 v -171 h 171 v 171 z"})]}),exports.ChartLineStackedPercentIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 171 h 1749 v 43 h -1749 v 1335 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z"}),c.jsx("path",{className:"styled info",d:"M 1877 299 h -1770 v -43 h 1770 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1549 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z"})]}),exports.ChartLineStackedPercentMarkersIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -1195 h -42 v -171 h 42 v -128 h 43 v 128 h 85 v 43 h 384 v -43 h 171 v 43 h 427 v -43 h 170 v 43 h 384 v -43 h 171 v 171 h -171 v -85 h -384 v 85 h -170 v -85 h -427 v 85 h -171 v -85 h -384 v 85 h -85 v 1195 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -1494 h 43 v 1494 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z"}),c.jsx("path",{className:"styled info",d:"M 1920 213 v 171 h -171 v -85 h -384 v 85 h -170 v -85 h -427 v 85 h -171 v -85 h -384 v 85 h -170 v -171 h 170 v 43 h 384 v -43 h 171 v 43 h 427 v -43 h 170 v 43 h 384 v -43 z"})]}),exports.ChartPieDoughnutIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 104 -22 202 q -22 98 -63 187 q -41 89 -98 168 q -58 78 -130 142 q -125 112 -284 176 q -160 64 -342 64 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -126 33 -244 q 33 -118 93 -221 q 59 -104 144 -190 q 84 -86 187 -148 q 102 -62 221 -97 q 118 -36 247 -39 m 307 1305 q 81 -65 129 -159 q 47 -95 47 -207 q 0 -97 -37 -182 q -37 -86 -100 -149 q -64 -64 -149 -101 q -86 -37 -183 -37 q -11 0 -21 1 q -11 0 -22 1 q -90 8 -167 48 q -78 39 -135 102 q -58 62 -91 144 q -33 81 -33 173 q 0 97 37 183 q 37 85 101 149 q 63 63 149 100 q 85 37 182 37 q 84 0 159 -27 q 74 -28 134 -76 m -293 530 q 173 0 325 -60 q 151 -61 270 -168 l -272 -272 q -66 54 -148 85 q -82 31 -175 31 q -106 0 -199 -40 q -94 -40 -163 -109 q -70 -70 -110 -163 q -40 -94 -40 -200 q 0 -100 37 -189 q 36 -90 100 -158 q 63 -69 149 -112 q 85 -43 183 -51 v -384 q -119 6 -228 41 q -109 35 -204 94 q -95 59 -172 140 q -78 81 -133 179 q -56 97 -86 209 q -30 111 -30 231 q 0 124 32 239 q 32 114 91 214 q 58 99 140 181 q 81 81 181 140 q 99 58 214 90 q 114 32 238 32 z"}),c.jsx("path",{className:"styled background",d:"M 1658 1692 q -125 119 -286 187 q -162 68 -348 68 q -127 0 -244 -33 q -118 -33 -220 -93 q -103 -60 -186 -143 q -84 -84 -144 -186 q -60 -103 -93 -220 q -33 -118 -33 -245 q 0 -125 32 -241 q 32 -116 90 -217 q 58 -101 140 -184 q 81 -84 181 -144 q 99 -61 214 -95 q 115 -35 239 -38 v 429 q -97 5 -181 45 q -85 40 -148 106 q -63 65 -99 152 q -36 86 -36 184 q 0 101 39 190 q 38 89 104 155 q 66 66 155 105 q 89 38 190 38 q 91 0 171 -30 q 80 -31 144 -85 z"}),c.jsx("path",{className:"styled current_color",d:"M 1364 1406 q -69 61 -155 96 q -86 34 -185 34 q -106 0 -199 -40 q -94 -40 -163 -109 q -70 -70 -110 -163 q -40 -94 -40 -200 q 0 -103 39 -194 q 38 -92 105 -161 q 66 -69 156 -110 q 89 -42 191 -46 v 42 q -94 4 -175 43 q -82 38 -142 101 q -61 63 -96 147 q -35 84 -35 178 q 0 97 37 183 q 37 85 101 149 q 63 63 149 100 q 85 37 182 37 q 90 0 169 -31 q 79 -31 141 -86 m 332 333 q -127 118 -291 186 q -164 68 -351 68 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -128 33 -246 q 32 -119 92 -222 q 59 -103 143 -188 q 84 -86 186 -147 q 102 -62 220 -97 q 117 -35 244 -38 v 43 q -121 3 -233 37 q -112 33 -209 92 q -98 58 -177 140 q -80 81 -137 180 q -57 98 -88 211 q -31 113 -31 235 q 0 124 32 239 q 32 114 91 214 q 58 99 140 181 q 81 81 181 140 q 99 58 214 90 q 114 32 238 32 q 179 0 335 -64 q 155 -65 276 -178 z"}),c.jsx("path",{className:"styled info_light",d:"M 1515 1024 q 0 -102 -38 -191 q -39 -89 -106 -156 q -67 -67 -156 -105 q -89 -39 -191 -39 q -5 0 -10 1 q -6 0 -11 0 v -426 q 5 0 11 0 q 5 -1 10 -1 q 127 0 244 33 q 117 32 219 92 q 102 60 186 144 q 83 83 143 185 q 60 102 93 219 q 32 117 32 244 q 0 99 -20 193 q -21 93 -58 178 q -38 85 -92 160 q -54 75 -121 138 l -302 -301 q 77 -68 122 -162 q 45 -95 45 -206 z"}),c.jsx("path",{className:"styled info_dark",d:"M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 104 -22 202 q -22 98 -63 188 q -41 89 -98 168 q -58 78 -130 142 l -333 -334 q 81 -65 129 -159 q 47 -95 47 -207 q 0 -97 -37 -182 q -37 -86 -100 -149 q -64 -64 -149 -101 q -86 -37 -183 -37 q -11 0 -21 1 q -11 0 -22 1 v -471 q 11 0 22 0 q 10 -1 21 -1 m 627 1579 q 62 -61 112 -133 q 50 -73 85 -154 q 35 -81 54 -170 q 18 -89 18 -183 q 0 -124 -32 -238 q -32 -115 -90 -214 q -59 -100 -140 -181 q -82 -82 -181 -140 q -100 -59 -214 -91 q -115 -32 -239 -32 v 384 q 106 0 200 40 q 93 40 163 110 q 69 69 109 163 q 40 93 40 199 q 0 109 -42 204 q -42 94 -114 164 z"})]}),exports.ChartPieIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 130 -33 250 q -34 119 -95 224 q -62 104 -147 190 q -86 86 -190 147 q -105 61 -225 95 q -120 33 -249 33 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -126 32 -243 q 31 -117 89 -219 q 58 -102 140 -187 q 82 -86 182 -148 q 100 -62 217 -99 q 116 -37 243 -43 m -862 939 q 0 124 32 238 q 32 114 91 214 q 58 99 140 181 q 82 82 182 141 q 99 58 214 90 q 114 32 237 32 q 173 0 325 -61 q 151 -61 272 -167 l -638 -638 v -924 q -121 6 -230 41 q -109 35 -204 94 q -95 59 -172 140 q -78 81 -133 179 q -55 97 -85 209 q -31 111 -31 231 z"}),c.jsx("path",{className:"styled background",d:"M 1941 1024 q 0 127 -32 244 q -33 117 -93 219 q -60 102 -143 186 q -84 83 -186 143 q -102 60 -219 93 q -117 32 -244 32 q -127 0 -244 -32 q -117 -33 -219 -93 q -102 -60 -185 -143 q -84 -84 -144 -186 q -60 -102 -92 -219 q -33 -117 -33 -244 q 0 -127 33 -244 q 32 -117 92 -219 q 60 -102 144 -185 q 83 -84 185 -144 q 102 -60 219 -92 q 117 -33 244 -33 q 127 0 244 33 q 117 32 219 92 q 102 60 186 144 q 83 83 143 185 q 60 102 93 219 q 32 117 32 244 z"}),c.jsx("path",{className:"styled current_color",d:"M 1666 1709 q -127 118 -291 186 q -164 68 -351 68 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -128 33 -246 q 32 -119 92 -222 q 59 -103 143 -188 q 84 -86 186 -147 q 102 -62 220 -97 q 117 -35 244 -38 v 43 q -121 3 -233 37 q -112 33 -209 92 q -97 59 -177 140 q -80 81 -137 180 q -57 98 -88 211 q -31 113 -31 235 q 0 124 32 238 q 32 114 91 214 q 58 99 140 181 q 82 82 182 141 q 99 58 214 90 q 114 32 237 32 q 178 0 334 -65 q 156 -65 277 -177 z"}),c.jsx("path",{className:"styled info_light",d:"M 1024 107 q 127 0 244 33 q 117 32 219 92 q 102 60 186 144 q 83 83 143 185 q 60 102 93 219 q 32 117 32 244 q 0 99 -20 193 q -21 93 -58 178 q -38 85 -92 160 q -54 75 -121 138 l -647 -648 v -937 q 5 0 11 0 q 5 -1 10 -1 z"}),c.jsx("path",{className:"styled info_dark",d:"M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 104 -22 202 q -22 98 -62 187 q -41 89 -99 168 q -58 78 -130 142 q -9 -8 -15 -15 q -6 -6 -10 -10 q -5 -5 -5 -6 l -639 -638 v -969 m 670 1578 q 62 -61 112 -133 q 50 -72 85 -153 q 35 -82 54 -170 q 18 -89 18 -183 q 0 -123 -32 -237 q -32 -115 -90 -214 q -59 -100 -141 -182 q -82 -82 -181 -140 q -100 -59 -214 -91 q -115 -32 -238 -32 v 908 z"})]}),exports.ChartScatterLinesIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1503 1457 l -10 61 l -42 -6 l 16 -96 l -334 -380 l -309 389 l -72 -147 l -248 421 l -37 -21 l 262 -446 l -463 -951 l 39 -18 l 451 925 l 227 -387 l 149 168 l 564 -710 l -184 1143 l 263 299 l -68 -525 l 42 -5 l 83 661 m -728 -828 l -114 -130 l -212 360 l 54 112 m 644 14 l 155 -951 l -471 593 m 803 918 v 43 h -1878 v -1878 h 43 v 1835 z"}),c.jsx("path",{className:"styled info",d:"M 1493 1518 l -42 -6 l 180 -1103 l -807 1016 l -558 -1144 l 39 -18 l 527 1083 l 864 -1087 z"}),c.jsx("path",{className:"styled current_color",d:"M 1832 1832 l -842 -958 l -486 825 l -37 -21 l 516 -877 l 792 900 l -68 -525 l 42 -5 m 214 749 v 43 h -1878 v -1878 h 43 v 1835 z"})]}),exports.ChartScatterLinesMarkersIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 213 342 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 63 q -17 28 -44 45 l 361 762 l 165 -282 q -36 -14 -59 -46 q -23 -32 -23 -73 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 62 q -16 28 -42 45 l 78 89 l 449 -570 q -20 -18 -31 -42 q -11 -25 -11 -53 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -11 0 -20 -2 q -10 -2 -19 -5 l -258 814 l 410 467 l -54 -422 q -5 1 -8 1 q -4 0 -8 0 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 38 -19 69 q -20 30 -52 46 l 70 565 l -482 -549 l -46 145 q 26 17 43 45 q 16 28 16 63 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 15 0 29 3 l 53 -166 l -189 -214 l -295 375 l -69 -146 l -147 251 q 29 17 47 46 q 17 29 17 64 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 q 11 0 23 3 l 166 -283 l -375 -789 q -14 3 -28 3 m 982 1109 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 m 341 -1323 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 m -105 275 l -401 509 l 176 200 m -355 -301 l -187 301 l 52 129 l 258 -327 l -93 -106 q -15 3 -30 3 m -638 -683 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 z"}),c.jsx("path",{className:"styled background",d:"M 1771 296 q 0 22 -8 42 q -9 19 -23 34 q -15 15 -35 24 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -24 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -15 34 -23 q 19 -9 41 -9 q 22 0 42 9 q 20 8 35 23 q 14 14 23 34 q 8 19 8 41 m -1320 7 q 0 22 -8 42 q -9 19 -23 34 q -15 15 -34 24 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -35 -24 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 15 -15 35 -23 q 19 -9 41 -9 q 22 0 42 9 q 19 8 34 23 q 14 14 23 34 q 8 19 8 41 m 902 1232 q 0 23 -8 43 q -9 19 -23 34 q -15 14 -35 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -43 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -15 34 -23 q 19 -9 41 -9 q 22 0 42 9 q 20 8 35 23 q 14 14 23 34 q 8 19 8 41 z"}),c.jsx("path",{className:"styled info",d:"M 1664 171 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -11 0 -20 -2 q -10 -2 -19 -5 l -319 1008 q 26 17 43 45 q 16 28 16 63 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 15 0 29 3 l 293 -923 l -724 918 l -466 -982 q -14 3 -28 3 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 63 q -17 28 -44 45 l 435 919 l 734 -932 q -20 -18 -31 -42 q -11 -25 -11 -53 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 m -1323 213 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 m 982 1152 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 m 341 -1152 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 z"}),c.jsx("path",{className:"styled current_color",d:"M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 1636 1182 l 70 565 l -825 -939 q -15 3 -30 3 l -360 615 q 29 17 47 46 q 17 29 17 64 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 q 11 0 23 3 l 357 -609 q -36 -14 -59 -46 q -23 -32 -23 -73 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 62 q -16 28 -42 45 l 726 826 l -54 -422 q -5 1 -8 1 q -4 0 -8 0 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 38 -19 69 q -20 30 -52 46 z"})]}),exports.ChartScatterLinesMarkersSmoothIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 1664 1501 q 37 13 61 46 q 24 33 24 75 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 v -34 q 0 -140 -15 -248 q -16 -108 -42 -191 l -7 2 q -26 93 -66 161 q -40 68 -88 116 q -48 47 -101 76 q -54 29 -108 44 q -2 24 -13 46 q -11 21 -28 37 q -17 15 -39 24 q -22 9 -47 9 q -45 0 -78 -26 q -34 -26 -45 -66 q -115 -15 -221 -84 q -107 -69 -207 -190 q -36 91 -59 176 q -24 85 -38 152 q 41 12 67 46 q 26 33 26 78 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -26 10 -48 q 9 -23 25 -40 q 16 -18 38 -28 q 22 -10 47 -12 q 15 -73 42 -167 q 26 -95 69 -195 q -48 -62 -94 -141 q -47 -80 -89 -168 q -43 -88 -80 -178 q -37 -91 -64 -176 q -25 -2 -46 -12 q -22 -11 -37 -28 q -16 -17 -25 -39 q -9 -23 -9 -48 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 45 -26 79 q -27 33 -69 44 q 19 59 48 135 q 29 75 67 158 q 37 82 84 167 q 47 85 103 163 q 33 -72 76 -141 q 42 -70 96 -131 q -38 -36 -38 -90 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 35 0 64 17 q 28 16 45 43 q 63 -32 133 -48 q 70 -17 154 -17 q 6 0 39 4 q 32 3 79 21 q 47 17 102 54 q 55 37 107 105 q 21 -9 45 -9 q 5 0 9 1 q 3 0 7 0 q 1 -20 2 -40 q 0 -21 0 -43 q 0 -174 -33 -390 q -14 3 -28 3 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 35 -16 64 q -17 28 -44 45 q 18 113 27 215 q 8 102 8 193 q 0 25 0 48 q 0 23 -2 46 q 32 16 51 46 q 19 30 19 68 q 0 35 -16 63 q -17 28 -43 45 q 30 96 45 210 q 14 114 14 248 m -171 -1206 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 q 0 35 25 60 q 25 25 60 25 m -1408 86 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 m 982 1152 q 35 0 60 -25 q 25 -25 25 -61 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 12 27 19 q 15 6 33 6 m 354 -278 q 59 -80 92 -194 q -23 -4 -42 -15 q -19 -12 -33 -28 q -14 -17 -22 -38 q -8 -21 -8 -45 q 0 -29 13 -54 q 12 -26 32 -43 q -45 -61 -95 -94 q -51 -34 -93 -49 q -43 -15 -71 -17 q -29 -3 -31 -3 q -78 0 -144 16 q -67 15 -126 46 q 3 14 3 28 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -29 0 -55 -13 q -57 63 -101 136 q -44 73 -77 150 q 41 53 87 99 q 45 46 96 82 q 50 36 106 60 q 55 23 115 32 q 1 -25 12 -47 q 11 -22 28 -38 q 17 -16 40 -25 q 22 -10 48 -10 q 45 0 79 28 q 34 27 45 69 q 61 -19 120 -56 q 59 -37 110 -105 z"}),c.jsx("path",{className:"styled background",d:"M 1305 1497 q 0 23 -8 43 q -9 20 -24 35 q -15 15 -35 24 q -20 8 -43 8 q -23 0 -43 -8 q -20 -9 -35 -24 q -15 -15 -23 -35 q -9 -20 -9 -43 q 0 -23 9 -43 q 8 -20 23 -35 q 15 -15 35 -23 q 20 -9 43 -9 q 23 0 43 9 q 20 8 35 23 q 15 15 24 35 q 8 20 8 43 m -890 -1072 q 0 23 -9 43 q -9 20 -24 35 q -15 15 -35 24 q -20 8 -42 8 q -23 0 -43 -8 q -20 -9 -35 -24 q -15 -15 -23 -35 q -9 -20 -9 -43 q 0 -23 9 -43 q 8 -20 23 -35 q 15 -15 35 -23 q 20 -9 43 -9 q 22 0 42 9 q 20 8 35 23 q 15 15 24 35 q 9 20 9 43 m 1317 -167 q 0 23 -8 43 q -9 20 -24 35 q -15 15 -35 24 q -20 8 -43 8 q -23 0 -43 -8 q -20 -9 -35 -24 q -15 -15 -23 -35 q -9 -20 -9 -43 q 0 -23 9 -43 q 8 -20 23 -35 q 15 -15 35 -23 q 20 -9 43 -9 q 23 0 43 9 q 20 8 35 23 q 15 15 24 35 q 8 20 8 43 z"}),c.jsx("path",{className:"styled info",d:"M 1689 365 q 18 112 27 213 q 8 101 8 193 q 0 183 -35 322 q -35 138 -106 234 q -29 38 -60 67 q -32 29 -65 51 q -34 21 -68 36 q -35 14 -68 24 q -2 24 -13 46 q -11 21 -28 37 q -17 15 -39 24 q -22 9 -47 9 q -45 0 -78 -26 q -34 -26 -45 -66 q -114 -15 -224 -87 q -110 -72 -211 -196 q -101 -125 -189 -299 q -89 -174 -160 -393 q -25 -2 -46 -12 q -22 -11 -37 -28 q -16 -17 -25 -39 q -9 -23 -9 -48 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 45 -26 79 q -27 33 -69 44 q 23 69 59 161 q 35 92 83 191 q 48 99 109 197 q 61 98 136 179 q 74 81 161 137 q 87 55 187 70 q 1 -25 12 -47 q 11 -22 28 -38 q 17 -16 40 -25 q 22 -10 48 -10 q 45 0 79 28 q 34 27 45 69 q 61 -19 120 -56 q 59 -37 110 -105 q 133 -178 133 -530 q 0 -174 -33 -390 q -14 3 -28 3 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 35 -16 64 q -17 28 -44 45 m -1476 62 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 m 982 1152 q 35 0 60 -25 q 25 -25 25 -61 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 12 27 19 q 15 6 33 6 m 341 -1323 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 z"}),c.jsx("path",{className:"styled current_color",d:"M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 1664 1501 q 37 13 61 46 q 24 33 24 75 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 v -34 q 0 -140 -15 -248 q -16 -108 -42 -191 q -14 3 -28 3 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -29 13 -54 q 12 -26 32 -43 q -45 -61 -95 -94 q -51 -34 -93 -49 q -43 -15 -71 -17 q -29 -3 -31 -3 q -78 0 -144 16 q -67 15 -126 46 q 3 14 3 28 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -29 0 -55 -13 q -66 73 -115 161 q -49 87 -84 176 q -35 88 -58 172 q -24 83 -37 148 q 41 12 67 46 q 26 33 26 78 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -26 10 -48 q 9 -23 25 -40 q 16 -18 38 -28 q 22 -10 47 -12 q 14 -67 38 -152 q 23 -86 59 -177 q 36 -92 87 -182 q 50 -90 118 -167 q -38 -36 -38 -90 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 35 0 64 17 q 28 16 45 43 q 63 -32 133 -48 q 70 -17 154 -17 q 6 0 39 4 q 32 3 79 21 q 47 17 102 54 q 55 37 107 105 q 21 -9 45 -9 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 35 -16 63 q -17 28 -43 45 q 30 96 45 210 q 14 114 14 248 z"})]}),exports.ChartScatterLinesSmoothIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 m 1577 -902 q 93 215 93 547 q 0 88 -6 184 l -43 -3 q 3 -47 5 -92 q 2 -45 2 -88 q 0 -277 -68 -470 q -25 97 -65 167 q -40 70 -89 119 q -49 48 -104 78 q -55 29 -108 46 q -54 16 -103 22 q -49 5 -87 5 q -74 0 -141 -21 q -68 -21 -129 -58 q -62 -37 -116 -88 q -55 -51 -104 -111 q -39 93 -64 181 q -25 88 -40 157 q -15 69 -21 112 q -6 42 -6 44 l -42 -4 q 0 -2 7 -48 q 6 -46 23 -120 q 16 -74 44 -168 q 27 -94 70 -192 q -60 -79 -109 -167 q -50 -88 -90 -174 q -40 -86 -70 -164 q -30 -79 -50 -141 q -21 -62 -32 -102 q -11 -40 -13 -47 l 42 -11 q 0 2 10 37 q 10 35 29 93 q 19 58 48 135 q 28 76 66 160 q 38 83 86 170 q 47 86 104 165 q 45 -96 106 -184 q 61 -89 142 -156 q 80 -68 181 -108 q 101 -40 227 -40 q 3 0 22 2 q 19 1 49 9 q 30 8 68 25 q 38 16 80 46 q 41 29 83 75 q 42 46 80 112 q 5 -42 8 -87 q 2 -45 2 -93 q 0 -243 -64 -562 l 42 -8 q 65 325 65 569 q 0 68 -5 130 q -5 61 -15 117 m -156 283 q 79 -106 111 -275 q -33 -74 -72 -125 q -40 -51 -81 -84 q -41 -34 -80 -52 q -39 -19 -69 -27 q -31 -9 -49 -11 q -19 -2 -20 -2 q -121 0 -218 41 q -97 40 -173 107 q -77 67 -135 155 q -58 87 -101 181 q 47 60 100 112 q 53 51 112 89 q 58 37 123 59 q 65 21 136 21 q 45 0 99 -7 q 54 -7 110 -27 q 55 -21 109 -58 q 54 -37 98 -97 z"}),c.jsx("path",{className:"styled info",d:"M 1792 1749 l -43 -3 q 6 -93 6 -178 q 0 -244 -51 -422 q -51 -179 -152 -287 q -47 -49 -93 -76 q -46 -28 -83 -40 q -38 -13 -62 -15 q -24 -3 -25 -3 q -124 0 -223 44 q -99 43 -177 114 q -78 71 -136 162 q -58 90 -100 186 q -42 95 -69 187 q -28 91 -44 164 q -16 72 -22 118 q -7 46 -7 49 l -42 -4 q 0 -3 5 -34 q 4 -32 14 -84 q 10 -52 27 -120 q 17 -68 43 -144 q 25 -76 60 -156 q 35 -80 82 -155 q 46 -76 105 -143 q 58 -67 131 -117 q 73 -51 161 -80 q 88 -29 193 -29 q 3 0 30 3 q 27 2 69 16 q 41 14 92 44 q 51 30 102 84 q 216 231 216 735 q 0 45 -2 91 q -2 45 -5 93 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 m 1004 -387 q -111 0 -207 -46 q -97 -46 -179 -121 q -83 -75 -151 -172 q -68 -97 -122 -199 q -55 -102 -96 -201 q -41 -99 -68 -178 q -28 -80 -43 -132 q -15 -53 -17 -62 l 42 -11 q 1 2 14 50 q 13 47 40 124 q 26 76 66 173 q 39 96 91 197 q 52 101 118 197 q 65 96 144 171 q 79 75 171 121 q 92 46 197 46 q 45 0 99 -7 q 54 -7 110 -27 q 56 -21 110 -58 q 54 -37 98 -97 q 133 -180 133 -528 q 0 -121 -16 -261 q -16 -141 -48 -302 l 42 -8 q 65 325 65 569 q 0 364 -142 556 q -50 67 -111 108 q -62 40 -123 62 q -62 22 -119 29 q -57 7 -98 7 z"})]}),exports.ChartScatterMarkersIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 384 213 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 1323 42 q 26 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 7 33 7 m -939 298 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 427 128 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 m 0 213 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 m 768 384 v 43 h -1878 v -1878 h 43 v 1835 m 1579 -213 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 m -854 -982 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m -469 982 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m 1024 -640 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 z"}),c.jsx("path",{className:"styled background",d:"M 1195 1344 q 22 0 42 9 q 19 8 33 23 q 14 14 23 34 q 8 19 8 41 q 0 45 -30 76 q -31 30 -76 30 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -14 -23 -33 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -15 34 -23 q 19 -9 41 -9 m -427 -341 q 22 0 42 9 q 19 8 34 22 q 14 14 23 34 q 8 19 8 41 q 0 22 -8 42 q -9 19 -23 34 q -15 14 -34 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -14 34 -22 q 19 -9 41 -9 m 939 -512 q 45 0 76 31 q 30 30 30 75 q 0 22 -8 42 q -9 19 -23 34 q -14 14 -33 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -14 34 -22 q 19 -9 41 -9 m -1323 -256 q 22 0 42 9 q 19 8 34 22 q 14 14 23 34 q 8 19 8 41 q 0 22 -8 42 q -9 19 -23 34 q -15 14 -34 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -14 34 -22 q 19 -9 41 -9 z"}),c.jsx("path",{className:"styled info",d:"M 384 213 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 1323 42 q 26 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 7 33 7 m -939 298 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 427 128 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 m 0 213 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 m 1579 -213 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 m -854 -982 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m -469 982 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m 1024 -640 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 z"})]}),exports.CommandContext=ki,exports.CornerTriangle=vo,exports.DateUtils=El,exports.DefaultTaskPaneRegistry=Pn,exports.DocThemesContext=Nn,exports.DocThemesProvider=e=>{const{themes:t,children:n}=e;return c.jsx(Nn.Provider,{value:t,children:n})},exports.EditableLabel=Kr,exports.EmptyFrame=vi,exports.FilterButton=kr,exports.FontUtils=Fl,exports.Item=zo,exports.LogoNoPaddingIcon=e=>c.jsxs("svg",{...e,viewBox:"0 0 48 48",children:[c.jsx("path",{d:"M 2.2827924,0 C 1.5038324,0 0.87090248,0.52603 0.87090248,1.17149 v 25.39667 h -0.01 v 20.2607 c 0,0.39663 0.24025002,0.74639 0.60481992,0.95852 v 0.18499 h 0.50664 c 0.0972,0.0173 0.19732,0.0276 0.30092,0.0276 h 15.5346916 16.7448 v 0 h 11.35822 c 0.10311,0 0.20276,-0.0104 0.29945,-0.0276 h 0.0696 v -0.0182 c 0.59938,-0.13566 1.04238,-0.58606 1.04238,-1.12526 V 26.96484 c 0.006,-0.0429 0.009,-0.0853 0.009,-0.12925 V 1.17154 c 0,-0.64586 -0.63293,-1.17149 -1.41189,-1.17149 h -15.7478 v 2e-4 h -2.06997 V 5e-5 Z",fill:"#547DBE"}),c.jsx("path",{d:"m 2.8338324,2.7184 v 9.0404 H 11.538484 V 2.7184 Z m 11.2334116,0 v 9.0404 h 8.70465 V 2.7184 Z m 11.26696,0 v 9.0404 h 8.70465 V 2.7184 Z m 11.33258,0 v 9.0404 h 8.70465 V 2.7184 Z M 2.8338324,14.32723 v 8.84046 h 8.7046516 v -8.84046 z m 11.2334116,0 v 8.84046 h 8.70465 v -8.84046 z m 11.26696,0 v 8.84046 h 8.70465 v -8.84046 z m 11.33258,0 v 8.84046 h 8.70465 V 14.32723 Z M 2.8338324,25.73691 v 8.67308 h 8.7046516 v -8.67308 z m 11.2334116,0 v 8.67308 h 8.73721 v -8.67308 z m 11.26696,0 v 8.67308 h 8.70465 v -8.67308 z m 11.33258,0 v 8.67308 h 8.70465 V 25.73691 Z M 2.8693424,36.61859 v 8.67357 h 8.7046616 v -8.67357 z m 11.2339116,0 v 8.67357 h 8.73771 v -8.67357 z m 11.26697,0 v 8.67357 h 8.70465 v -8.67357 z m 11.33257,0 v 8.67357 h 8.70465 v -8.67357 z",fill:"#FFFFFF"}),c.jsx("path",{d:"m 2.8254424,2.72091 v 9.04041 H 11.570544 V 2.72091 Z m 0,11.60889 v 8.84036 H 11.570544 V 14.3298 Z m 0,11.40958 v 8.67357 h 8.7451016 v -8.67357 z m 0.036,10.88167 v 8.67358 h 8.7451116 v -8.67358 z",fill:"#547DBE",fillOpacity:"0.4"}),c.jsx("path",{d:"m 30.820434,6.19497 c 1.85291,0 3.66241,0.29708 5.4285,0.89113 1.7656,0.5942 3.49568,1.50108 5.19073,2.72107 l -2.37584,3.25571 c -1.40941,-1.01391 -2.79515,-1.76647 -4.15721,-2.25759 -1.36206,-0.49111 -2.72412,-0.73667 -4.08618,-0.73667 -2.5817,0 -4.58902,0.53064 -6.02232,1.59218 -1.43334,1.06143 -2.14989,2.56661 -2.14989,4.51523 v 0.0237 c 0,1.36241 0.41177,2.40021 1.23532,3.11315 0.82355,0.71288 1.89253,1.24367 3.20703,1.59217 1.31446,0.3485 2.71608,0.67341 4.20493,0.97439 1.29842,0.26929 2.58944,0.58216 3.87257,0.9386 1.28263,0.3565 2.45032,0.8635 3.50356,1.52097 1.05324,0.65747 1.89288,1.5486 2.51841,2.6734 0.62553,1.12485 0.93829,2.59035 0.93829,4.39635 v 0.0477 c 0,3.18435 -1.10849,5.64817 -3.32597,7.39066 -2.21698,1.7425 -5.33724,2.61399 -9.35978,2.61399 -1.67882,0 -3.25863,-0.15841 -4.73958,-0.47523 -1.4808,-0.31681 -2.86644,-0.79204 -4.15737,-1.42617 -1.29077,-0.63363 -2.49827,-1.42567 -3.6227,-2.37612 l 2.54179,-3.20819 c 1.39383,1.204 2.91819,2.10717 4.57323,2.70928 1.6549,0.60205 3.45641,0.90307 5.40463,0.90307 2.73991,0 4.85823,-0.52704 6.35447,-1.58048 1.49674,-1.05359 2.24511,-2.53098 2.24511,-4.43213 v -0.0237 c 0,-1.37834 -0.37197,-2.43583 -1.11639,-3.17245 -0.74442,-0.73668 -1.71824,-1.2912 -2.92194,-1.66359 -1.2037,-0.37223 -2.51051,-0.6851 -3.91993,-0.9386 -1.34627,-0.23762 -2.69635,-0.51485 -4.05046,-0.83182 -1.35417,-0.31677 -2.59339,-0.7841 -3.71782,-1.40204 -1.12448,-0.61779 -2.03125,-1.49708 -2.72017,-2.63782 -0.68898,-1.14078 -1.03341,-2.66156 -1.03341,-4.5627 v -0.0237 c 0,-3.21623 1.06898,-5.70753 3.20718,-7.47386 2.13805,-1.76648 5.15506,-2.64981 9.05121,-2.64981 z",strokeWidth:"2.5",stroke:"#EB594D",fill:"#f9CECB"})]}),exports.LogoTextNoPaddingIcon=Dr,exports.MovableArea=jr,exports.PictureEditor=Ur,exports.Row=yl,exports.ScriptEditor=_a,exports.SheetCellEditor=Tr,exports.SheetCellRenderer=Mr,exports.SheetElement=Hr,exports.SheetScrollbar=Mo,exports.StaticBorderRenderer=Vl,exports.StyledStrokePath=Er,exports.Tab=Cl,exports.TabStrip=wl,exports.TaskPaneArea=Zl,exports.TaskPaneProvider=({children:e,createArea:t,onUpdateArea:n,registry:l=Pn})=>{const a=o.useRef(null),i=o.useRef(null),[m,h]=o.useState(null),[s,p]=o.useState(null),b=o.useMemo(()=>({activateTaskPane(u,I){i.current!==u&&(a.current?a.current.activateTaskPane(u,I):(h(u),v(u)))}}),[]),v=r.useCallbackRef(u=>{const I=t({registry:l,onClose:()=>{p(null),n?.(null)}},x=>{x&&p(x)});return n?.(I),I},[t,l,m]);return o.useEffect(()=>{s&&m&&(s.activateTaskPane(m,{focus:!0}),h(null))},[m,s]),o.createElement(zr.Provider,{value:s??b},e)},exports.TaskPaneStrip=ko,exports.TaskPaneTitle=Ro,exports.createCellEditStateFromCell=Ir,exports.useBordersOverlay=So,exports.useDocThemes=()=>{const e=o.useContext(Nn),[t]=o.useState(()=>new d.ThemeCollection);return o.useMemo(()=>e||t,[e])},exports.useModelListener=tt,exports.useMovableCommands=Or,exports.useRangeListener=(e,t,n,l)=>{const a=o.useRef(n);a.current=n;const i=l?.fireOnAddressChange??!0;o.useEffect(()=>{if(!e||!t||!a.current){const s={getSource:()=>null,trigger:"delete",isDataChange:!1,isTransactional:!1,isUndo:!1,timeStamp:Date.now()};return void a.current?.(s)}const m=s=>{a.current?.(s)},h=e.getRange(t).addListener(m,l);if(i){const s=e.getRange(t);m({getSource:()=>s,trigger:"modelChange",isDataChange:!1,isTransactional:!1,isUndo:!1,timeStamp:Date.now()})}return()=>{h?.()}},[e,t])},exports.useSheetCommands=Lr,exports.useSheetCopyPaste=Pr,exports.useTaskPaneArea=Nr,Object.keys(r).forEach(e=>{e==="default"||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:()=>r[e]})});
33
+ `,u=!0));const I=[{range:new t.Range(s.lineNumber,s.column,s.lineNumber,s.column),text:`${b}`}];let x=null;l.pushEditOperations([],I,F=>(x=F[0].range,v&&x.startLineNumber++,u&&x.endLineNumber--,[new t.Selection(x.startLineNumber,x.startColumn,x.endLineNumber,x.endColumn)])),e.setSelection({startLineNumber:x.endLineNumber,startColumn:x.endColumn,endLineNumber:x.startLineNumber,endColumn:x.startColumn})};function $a(e,t){let n=null;const l=e.length;for(let a=0;!n&&a<l;a++){const i=e[a];i.getName()===t.text&&(n=i)}return n?n.getContext():"formula"}function qo(e,t,n,l,a=[]){if(l.kind==="function"&&l.kindModifiers==="export"){const i=l.spans[0].start,m=e.getPositionAt(i);a.push({name:l.text,type:$a(n,l),lineNumber:m.lineNumber})}if(l.childItems)for(const i of l.childItems)qo(e,t,n,i,a);return a}function No(e,t,n="function",l){const a=e.spans,i=a.length;for(let m=0;m<i;m++){const h=a[m];if(h.start<=t&&t<h.start+h.length){if(e.kind===n&&(!l||e.kindModifiers===l))return e;for(const s of e.childItems||[]){const p=No(s,t,n,l);if(p)return p}}return null}}function Wa(e){return e.kind==="comment"}const _a=o.memo(o.forwardRef((e,t)=>{const{className:n,style:l,commands:a,readOnly:i=!1,darkMode:m,loadingPanel:h,autoFocus:s=!0,frame:p,onStatusChange:b,...v}=e,u=o.useRef(null),I=o.useRef(!1),x=o.useMemo(()=>({contains(te){if(!u.current)return;const X=u.current.editor;return X&&X.getDomNode()?.contains(te)},focus(){if(!u.current)return;const te=u.current.editor;return te&&te.getDomNode()?.focus()}}),[]),F=o.useMemo(()=>[new r.Command("help",x,{label:"Script Commands",description:"Open Editor Commands",shortcut:{key:"F1"}},()=>{})],[]),z=o.useMemo(()=>{let te=null;const X=()=>x;return te=a?a.createChildGroup(X,"scriptEditor",!1):new r.CommandGroup(X,"scriptEditor"),te.addCommands(F,!0),te},[a,F]),K=a.getGroup("workbook"),V=r.useCommands(K,["executeSelectedScript","saveScripts"]),M=V[0],L=V[1],f=M?.context(),[A,S]=o.useState({message:"Loading",cursor:"",dirty:!1}),[W,D]=o.useState({loading:!1,compiling:!1,errors:[],warnings:[]}),O=r.useCallbackRef(te=>{S(X=>{const ce={...X,...te};return ge.CommonUtils.deepEqual(ce,X)?X:(L.update({disabled:!ce.dirty}).updateCallback(async()=>{await _()}),ce)})},[b,L]);o.useEffect(()=>{b?.(A)},[b,A]);const _=r.useCallbackRef(async()=>{if(!u.current)return;const te=u.current.editor;let X;if(A.dirty){const ce=te.getValue();await f?.saveSource(ce),X=f?.getScripts().getModules().getByName("scripts");const Ae=X?.getSource(),Ce=te.getValue(),B=(Ae?.length??0)!==ce.length||Ae!==Ce;O({dirty:B})}else X=f?.getScripts().getModules().getByName("scripts");return X},[A]);o.useEffect(()=>{const te=p?.addListener({onBeforeHide:async()=>(await _(),!0)});return()=>{te?.()}},[p]),o.useEffect(()=>{const te=f?.getScripts();if(te)return te.addListeners({onBeforeSearch:()=>_()})},[f]);const de=r.useCallbackRef(te=>{M?.execute(te)},[M]),U=o.useRef(""),[H,R]=o.useState(!1),$=r.useCallbackRef(async()=>{if(!u.current)return null;const te=u.current,X=te.editor;if(!X)return null;const ce=te.monaco,Ae=await(async(Ce,B,ne="export")=>{const me=Ce.getModel();if(!me)return null;const ae=await B.languages.typescript.getTypeScriptWorker(),ze=await ae(me.uri),le=await ze.getNavigationTree(me.uri.toString());let fe=null,Ee=Ce.getSelection();if(!Ee)return null;const be=Ee.startLineNumber===Ee.endLineNumber&&Ee.startColumn===Ee.endColumn?me.getLineCount():Math.min(Ee.endLineNumber,me.getLineCount());for(let He=Ee.startLineNumber;!fe&&He<=be;He++){const C=No(le,me.getOffsetAt({lineNumber:He,column:1}),"function",ne);C&&(fe=C.text)}return fe})(X,ce);return O({message:(Ae??"").toUpperCase()}),Ae?{source:X.getValue(),name:Ae}:null},[]);r.useCallbackRef(ge.CommonUtils.debounce(_,200),[]);const k=r.useCallbackRef(async(te,X,ce)=>{D(Ce=>({...Ce,compiling:!0}));const Ae=await f?.getScripts().createModule({source:ce?.getValue(),declarationsOnly:!0});Ae&&((async function(Ce,B){const ne=[];for(let me=1;me<Ce.getLineCount()+1;me++){const ae={startLineNumber:me,startColumn:1,endLineNumber:me,endColumn:Ce.getLineLength(me)+1},ze=Ce.getValueInRange(ae).indexOf("modelt");ze!==-1&&ne.push({message:"found 'modelt'",resource:"https://www.sheetxl.com",severity:B.MarkerSeverity.Hint,startLineNumber:ae.startLineNumber,startColumn:ze+1,endLineNumber:ae.startLineNumber,endColumn:ze+5})}B.editor.setModelMarkers(Ce,"owner",ne)})(te,X),(async function(Ce,B,ne,me){const ae=await B.languages.typescript.getTypeScriptWorker(),ze=await ae(Ce.uri),le=await ze.getNavigationTree(Ce.uri.toString()),fe=qo(Ce,B,me,le).map(Ee=>{let be=null,He=null;return Ee.type==="formula"?(be="formula.margin-icon",He="Formula"):Ee.type==="macro"?(be="macro.margin-icon",He="Macro"):Ee.type==="autoRun"&&(be="autorun.margin-icon",He="Auto Run"),{range:new B.Range(Ee.lineNumber,1,Ee.lineNumber,1),options:{isWholeLine:!1,glyphMarginClassName:be,glyphMarginHoverMessage:{value:He},stickiness:B.editor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges}}});De.current&&De.current.clear(),De.current=ne.createDecorationsCollection(fe)})(te,X,ce,Ae?Ae.getFunctions().getItems():ge.CommonUtils.EmptyArray),D(Ce=>({...Ce,compiling:!1})))},[f]),P=r.useCallbackRef(ge.CommonUtils.debounce(k,580),[]),ee=r.useCallbackRef(async(te=void 0)=>{if(!u.current||!f)return;const X=u.current.editor.getPosition(),ce={cursor:X?X.toString():""};te!==void 0&&(ce.message=te),O(ce);const Ae=$();f.setSelectedFunction(Ae)},[f]);o.useEffect(()=>{},[W]);const re=o.useRef(null),Re=r.useCallbackRef(async()=>{await _(),p?.close()},[p]);o.useEffect(()=>{if(!f)return;const te={insertSnippet:ce=>{u.current?.editor&&Sr(u.current.editor,u.current.monaco,ce)},close:()=>Re()};f.setEditor(te),f.setSelectedFunction($());const X=f.addContainerListener({onBeforeSave:async()=>{_()},onReadonlyChange(){},onScriptChange:async()=>{if(!u.current?.editor||!f)return;const ce=u.current.editor,Ae=f.getScripts().getModules().getItems()[0]?.getSource()??"";ce.setValue(Ae)}});return()=>{f.setEditor(null),X()}},[f]),o.useEffect(()=>()=>{const te=re.current;if(te){te.dispose();const X=te.debounceTimer;X!==void 0&&clearTimeout(X),re.current=null}},[H]);const he=r.useCallbackRef(te=>{const X=u.current?.editor;return!!X&&(X.focus(te),!0)},[A]),De=o.useRef(null),Fe=r.useCallbackRef((te,X)=>{u.current={monaco:X,editor:te},R(!0),ee("Loading Types");const ce=f?.getScripts().getModules().getItems()[0]?.getSource()??"";te.setValue(ce),Promise.resolve().then(()=>require("./BRF90bOHjPoRZA_3.cjs")).then(Ce=>Ce.customEditor).then(async Ce=>{ee(""),Ce.AutoTypings.create(te,{shareCache:!0,dontAdaptEditorOptions:!0,monaco:X,onUpdate:(B,ne)=>{if(B.type==="LookedUpPackage"&&B.success!==void 0){const me=X.languages.typescript.typescriptDefaults.getDiagnosticsOptions();X.languages.typescript.typescriptDefaults.setDiagnosticsOptions({...me,diagnosticCodesToIgnore:[]})}},onError:B=>{B==="Not implemented yet"&&(B="Compile Errors"),console.warn("Error compiling types",B)}}).then(B=>{re.current=B;const ne=te.getModel();P(ne,X,te),(()=>{if(qr)return;const me=(ze,le)=>{try{if(le===void 0)try{delete globalThis[ze]}catch{try{globalThis[ze]=void 0}catch{}}else globalThis[ze]=le}catch{}},ae=Ft.length;for(let ze=0;ze<ae;ze++){const le=Ft[ze];me(le,ln[le])}ln=void 0,qr=!0})()})}),te.addCommand("executeScript",function(Ce,...B){B?.[0]&&de({functionName:B?.[0]})},""),te.addAction({id:"executeScript",label:"Execute",keybindings:[X.KeyCode.F8],run:async Ce=>{const B=$();f?.setSelectedFunction(B);const ne=await B;de(ne)}}),te.addAction({id:"saveScript",label:"Save Script",keybindings:[X.KeyMod.CtrlCmd|X.KeyCode.KeyS],run:Ce=>{_()}}),te.onMouseDown(async Ce=>{if(Ce.target.type===X.editor.MouseTargetType.GUTTER_GLYPH_MARGIN){const B=Ce.target.position.lineNumber,ne=await X.languages.typescript.getTypeScriptWorker(),me=await ne(Ae.uri),ae=await me.getNavigationTree(Ae.uri.toString()),ze=(await _()).getFunctions().getItems(),le=qo(Ae,X,ze,ae).find(fe=>fe.lineNumber===B);if(le){const fe=Ce.event.browserEvent.button;fe===0?le.type==="macro"||le.type==="autoRun"?de({functionName:le.name}):le.type==="formula"&&f?.quickInsertFunction?.(le.name):fe===2&&(console.log("Context menu for function:",le.name),Ce.event.browserEvent.preventDefault())}}}),te.onDidChangeModelContent(()=>{O({dirty:!0}),P(Ae,X,te)}),X.editor.onDidChangeMarkers(Ce=>{Ce.some(B=>B.toString()===Ae.uri.toString())});const Ae=te.getModel();(function(Ce,B){B.languages.registerInlayHintsProvider("typescript",{provideInlayHints(ne,me,ae){const ze=[];for(let le=1;le<ne.getLineCount()+1;le++){const fe={startLineNumber:le,startColumn:1,endLineNumber:le,endColumn:ne.getLineLength(le)+1},Ee="hint",be=ne.getValueInRange(fe).indexOf("hint");be!==-1&&ze.push({kind:B.languages.InlayHintKind.Type,position:{lineNumber:fe.startLineNumber,column:be+Ee.length+1},label:"[hint]"})}return{hints:ze,dispose:()=>{}}}})})(0,X),Ae.onDidChangeContent(Ce=>{const B=f?.getScripts().getModules().getByName("scripts"),ne=B?.getSource(),me=te.getValue(),ae=(ne?.length??0)!==me.length||ne!==me;O({dirty:ae})}),te.onDidChangeCursorPosition(Ce=>{ee()})},[f]),ve=o.useMemo(()=>H?null:h||c.jsx("div",{style:{position:"absolute",width:"100%",height:"100%"},children:"Loading..."}),[H,h]),ke=o.useMemo(()=>{if(!H){if(!ln){ln={};const X=Ft.length;for(let ce=0;ce<X;ce++){const Ae=Ft[ce];ln[Ae]=globalThis[Ae]}}if(an){const X=Ft.length;for(let ce=0;ce<X;ce++){const Ae=Ft[ce];globalThis[Ae]=an[Ae]}}}const te=f?.getScripts().getModules().getByName("scripts")?.getSource()??"";return c.jsxs("div",{style:{display:"flex",flex:"1 1 100%",width:"100%",flexDirection:"row",position:"relative",boxSizing:"border-box"},children:[c.jsx(o.Suspense,{children:c.jsx(Ua,{theme:m?"extended-dark":"extended",options:{...Ha,fixedOverflowWidgets:!0,readOnly:i},language:"typescript",value:te,onValidate:X=>{let ce=!1;const Ae=X?X.length:0;for(let Ce=0;!ce&&Ce<Ae;Ce++)X[Ce].severity===8&&(ce=!0)},beforeMount:X=>{X.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!1,noSyntaxValidation:!1,diagnosticCodesToIgnore:[2307]}),X.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0}),X.editor.defineTheme("extended",{base:"vs",inherit:!0,rules:[],colors:{}}),X.editor.defineTheme("extended-dark",{base:"vs-dark",inherit:!0,rules:[],colors:{}}),(async()=>{let ce=!1,Ae=!1;try{const Ce=await(async()=>await(await fetch(Ka)).text())(),B=X.Uri.parse('inmemory://model/"sheetxl-models".d.ts');let ne=X.editor.getModel(B);ne?Ae=!0:ne=X.editor.createModel(Ce,"typescript",B),X.editor.setModelMarkers(ne,"default",[]),ce=!0}catch(Ce){console.warn("cant load types",Ce)}if(X.languages.registerLinkProvider("*",{provideLinks:(Ce,B)=>{const ne=[],me={links:ne},ae=Ce.getLinesContent(),ze=ae.length;for(let le=1;le<=ze;le++){const fe=ae[le-1],Ee=X.editor.tokenize(fe,"typescript"),be=Ee[0].length;for(let He=0;He<be;He++){const C=Ee[0]?.[He];if(C&&C.type.startsWith("string")){let Pe=C.offset,Be=Ee[0]?.[He+1]?.offset??fe.length,Qe=new X.Range(le,Pe+1,le,Be+1),ie=Ce.getValueInRange(Qe);const Me=ie[0];Me!=="`"&&Me!=="'"&&Me!=='"'||(Pe++,ie=ie.substring(1));const Le=ie[ie.length-1];Le!=="`"&&Le!=="'"&&Le!=='"'||(Pe++,ie=ie.substring(0,ie.length-1));try{f.getRanges(ie)&&ne.push({range:{endColumn:Be,endLineNumber:le,startColumn:Pe,startLineNumber:le},tooltip:`Goto range '${ie}'`,url:`/range/${ie}`})}catch(Ie){console.warn(Ie)}}}}return me}}),X.editor.registerLinkOpener({open(Ce){if(Ce?.path?.startsWith("/range/")){try{f.getRanges(Ce.path.substring(7))?.select()}catch(B){console.warn("invalid range",B)}return!0}return!1}}),!Ae){const Ce=X.languages.typescript.typescriptDefaults.getCompilerOptions();X.languages.typescript.typescriptDefaults.setCompilerOptions({...Ce,target:X.languages.typescript.ScriptTarget.ES2020,lib:["webworker","es2020","esnext.asynciterable"],downlevelIteration:!0,moduleResolution:X.languages.typescript.ModuleResolutionKind.NodeJs,allowSyntheticDefaultImports:!0,baseUrl:"inmemory://model/",allowNonTsExtensions:!0})}if(U.current&&(await Sr(u.current.editor,u.current.monaco,U.current),U.current=null),I.current&&requestAnimationFrame(async()=>{I.current&&X.editor.focus()}),!an){an={};const Ce=Ft.length;for(let B=0;B<Ce;B++){const ne=Ft[B];an[ne]=globalThis[ne]}}})()},onMount:Fe})}),ve]})},[f,z,i,ve,m]),$e=r.useImperativeElement(t,()=>({isScriptEditorElement:()=>!0,focus:te=>{he(te)},close:()=>Re(),getEditor:()=>f?.getEditor()}),[f]);return o.useEffect(()=>(s&&requestAnimationFrame(()=>{$e.current?.focus()}),()=>{u.current?.editor&&requestAnimationFrame(()=>{$e.current?.contains(document.activeElement)&&$e.current?.focus()})}),[]),c.jsx("div",{className:st("script-editor",Va,n),style:{display:"flex",flexDirection:"row",flex:"1 1 100%",position:"relative",...l},ref:$e,...v,children:ke})}));Object.defineProperty(exports,"LicenseManager",{enumerable:!0,get:()=>d.LicenseManager}),exports.ChartAreaIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 896 v 1067 h -1878 v -1878 h 43 v 989 l 253 256 l 544 -345 l 74 -91 l 644 466 l 277 -464 m 0 718 l -913 -662 l -476 591 l -403 -408 v 785 h 1792 z"}),c.jsx("path",{className:"styled background",d:"M 530 1511 l 473 -588 l 914 656 l 24 53 v 304 h -1834 l 2 -864 z"}),c.jsx("path",{className:"styled info_light",d:"M 1939 923 v 658 l -288 -192 m -1272 -40 l 525 -312 l -374 474 z"}),c.jsx("path",{className:"styled info_dark",d:"M 361 1342 l 572 -362 l 22 36 l -571 362 m 1248 1 l 287 -483 l 37 22 l -287 482 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 896 v 1067 h -1878 v -1878 h 43 v 989 l 400 405 l 471 -585 l 921 667 v -665 m 0 1024 v -306 l -913 -662 l -476 591 l -403 -408 v 785 z"})]}),exports.ChartAreaStackedIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 640 v 926 l -641 -554 l -618 703 l -576 -575 v 780 h 1835 v 43 h -1878 v -1878 h 43 v 353 l 576 577 l 661 -704 l 276 329 z"}),c.jsx("path",{className:"styled background",d:"M 1963 1941 h -1856 v -853 l 597 597 l 618 -704 l 641 555 z"}),c.jsx("path",{className:"styled info_light",d:"M 1963 1536 l -641 -555 l -618 704 l -597 -597 v -640 l 597 597 l 661 -704 l 269 319 h 329 z"}),c.jsx("path",{className:"styled info_dark",d:"M 1963 640 v 43 h -342 l -258 -310 l -659 702 l -597 -598 v -60 l 597 598 l 661 -704 l 276 329 m 322 866 v 60 l -641 -554 l -618 703 l -597 -597 v -62 l 597 599 l 618 -704 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 z"})]}),exports.ChartAreaStackedPercentIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 85 v 1878 h -1878 v -1878 m 1835 1524 l -788 -746 l -576 662 l -428 -428 v 823 h 1792 z"}),c.jsx("path",{className:"styled background",d:"M 1941 1941 h -1834 v -1834 h 1834 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 85 v 1878 h -1878 v -1878 m 1835 43 h -1792 v 1792 h 1792 z"}),c.jsx("path",{className:"styled info_light",d:"M 1941 107 v 1493 l -810 -768 l -576 661 l -448 -448 v -938 z"}),c.jsx("path",{className:"styled info_dark",d:"M 1963 1649 l -831 -786 l -576 662 l -471 -467 v -973 h 1878 m -43 1465 v -1422 h -1792 v 908 l 426 426 l 575 -661 z"})]}),exports.ChartBarIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 171 h 1707 v 341 h -640 v 299 h -1067 v 171 h 811 v 298 h 512 v 342 h -1323 v 213 m 0 -1067 h 1024 v -256 h -1024 m 0 1067 h 1280 v -256 h -1280 z"}),c.jsx("path",{className:"styled background",d:"M 1429 1387 v 298 h -1322 v -298 m 1066 -811 v 299 h -1066 v -299 z"}),c.jsx("path",{className:"styled info_light",d:"M 1813 277 v 299 h -1706 v -299 z"}),c.jsx("path",{className:"styled info_dark",d:"M 101 597 v -42 h 1691 v -256 h -1691 v -43 h 1734 v 341 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 917 1088 v 299 h -810 v -299 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 896 1109 h -795 v -42 h 838 v 322 h -43 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 768 h 1024 v -256 h 43 v 299 h -1067 v 469 h 1323 v 342 h -1323 v 213 m 0 -512 v 256 h 1280 v -256 z"})]}),exports.ChartBarStackedIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 1237 v 512 h -1237 v 256 h 1621 v 512 h -1621 v 299 m 0 -1109 h 555 v -427 h -555 m 0 1195 h 768 v -427 h -768 z"}),c.jsx("path",{className:"styled background",d:"M 107 832 v -469 h 597 v 469 m -597 768 v -469 h 810 v 469 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 597 v 512 h -597 v 256 h 811 v 512 h -811 v 299 m 0 -768 v 427 h 768 v -427 m -768 -768 v 427 h 555 v -427 z"}),c.jsx("path",{className:"styled info_light",d:"M 704 832 v -469 h 640 v 469 z"}),c.jsx("path",{className:"styled info_dark",d:"M 1365 341 v 512 h -682 v -512 m 640 43 h -598 v 427 h 598 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 917 1600 v -469 h 811 v 469 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1749 1109 v 512 h -853 v -512 m 811 43 h -768 v 427 h 768 z"})]}),exports.ChartBarStackedPercentIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 1621 v 512 h -1621 v 256 h 1621 v 512 h -1621 v 299 m 0 -1109 h 384 v -427 h -384 m 0 1195 h 1024 v -427 h -1024 z"}),c.jsx("path",{className:"styled background",d:"M 107 832 v -469 h 426 v 469 m -426 768 v -469 h 1066 v 469 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 427 v 512 h -427 v 256 h 1067 v 512 h -1067 v 299 m 0 -768 v 427 h 1024 v -427 m -1024 -768 v 427 h 384 v -427 z"}),c.jsx("path",{className:"styled info_light",d:"M 533 832 v -469 h 1195 v 469 z"}),c.jsx("path",{className:"styled info_dark",d:"M 1749 341 v 512 h -1237 v -512 m 1195 43 h -1152 v 427 h 1152 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 1173 1600 v -469 h 555 v 469 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1749 1109 v 512 h -597 v -512 m 555 43 h -512 v 427 h 512 z"})]}),exports.ChartBubble3DIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 171 v -1323 h 341 v 512 h 299 v 811 h 170 v -1067 h 299 v -640 h 341 v 1707 m -853 0 v -768 h -256 v 768 m 1067 0 v -1664 h -256 v 1664 z"}),c.jsx("path",{className:"styled background",d:"M 1728 1941 h -299 v -1706 h 299 m -811 1706 h -298 v -810 h 298 z"}),c.jsx("path",{className:"styled info_light",d:"M 619 1941 h -299 v -1322 h 299 z"}),c.jsx("path",{className:"styled info_dark",d:"M 640 1941 h -43 v -1301 h -256 v 1301 h -42 v -1344 h 341 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 1429 1941 h -298 v -1066 h 298 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 768 v -768 h -256 v -43 h 299 v 811 h 469 v -1707 h 341 v 1707 m -42 0 v -1664 h -256 v 1664 z"})]}),exports.ChartBubbleIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 171 v -1323 h 341 v 512 h 299 v 811 h 170 v -1067 h 299 v -640 h 341 v 1707 m -853 0 v -768 h -256 v 768 m 1067 0 v -1664 h -256 v 1664 z"}),c.jsx("path",{className:"styled background",d:"M 1728 1941 h -299 v -1706 h 299 m -811 1706 h -298 v -810 h 298 z"}),c.jsx("path",{className:"styled info_light",d:"M 619 1941 h -299 v -1322 h 299 z"}),c.jsx("path",{className:"styled info_dark",d:"M 640 1941 h -43 v -1301 h -256 v 1301 h -42 v -1344 h 341 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 1429 1941 h -298 v -1066 h 298 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 768 v -768 h -256 v -43 h 299 v 811 h 469 v -1707 h 341 v 1707 m -42 0 v -1664 h -256 v 1664 z"})]}),exports.ChartColumnIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 171 v -1323 h 341 v 512 h 299 v 811 h 170 v -1067 h 299 v -640 h 341 v 1707 m -853 0 v -768 h -256 v 768 m 1067 0 v -1664 h -256 v 1664 z"}),c.jsx("path",{className:"styled background",d:"M 1728 1941 h -299 v -1706 h 299 m -811 1706 h -298 v -810 h 298 z"}),c.jsx("path",{className:"styled info_light",d:"M 619 1941 h -299 v -1322 h 299 z"}),c.jsx("path",{className:"styled info_dark",d:"M 640 1941 h -43 v -1301 h -256 v 1301 h -42 v -1344 h 341 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 1429 1941 h -298 v -1066 h 298 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 768 v -768 h -256 v -43 h 299 v 811 h 469 v -1707 h 341 v 1707 m -42 0 v -1664 h -256 v 1664 z"})]}),exports.ChartColumnStackedIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -1195 h 512 v 1195 h 256 v -1621 h 512 v 1621 m -810 -512 h -427 v 512 h 427 m 768 -768 h -427 v 768 h 427 z"}),c.jsx("path",{className:"styled background",d:"M 832 1941 h -469 v -554 h 469 m 768 554 h -469 v -810 h 469 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -555 h 512 v 555 h 256 v -811 h 512 v 811 m -469 0 h 427 v -768 h -427 m -768 768 h 427 v -512 h -427 z"}),c.jsx("path",{className:"styled info_light",d:"M 832 1387 h -469 v -640 h 469 z"}),c.jsx("path",{className:"styled info_dark",d:"M 341 725 h 512 v 683 h -512 m 43 -640 v 597 h 427 v -597 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 1600 1131 h -469 v -811 h 469 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1109 299 h 512 v 853 h -512 m 43 -811 v 768 h 427 v -768 z"})]}),exports.ChartColumnStackedPercentIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -1621 h 512 v 1621 h 256 v -1621 h 512 v 1621 m -810 -384 h -427 v 384 h 427 m 768 -1024 h -427 v 1024 h 427 z"}),c.jsx("path",{className:"styled background",d:"M 832 1941 h -469 v -426 h 469 m 768 426 h -469 v -1066 h 469 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -427 h 512 v 427 h 256 v -1067 h 512 v 1067 m -469 0 h 427 v -1024 h -427 m -768 1024 h 427 v -384 h -427 z"}),c.jsx("path",{className:"styled info_light",d:"M 832 1515 h -469 v -1195 h 469 z"}),c.jsx("path",{className:"styled info_dark",d:"M 341 299 h 512 v 1237 h -512 m 43 -1195 v 1152 h 427 v -1152 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 1600 875 h -469 v -555 h 469 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1109 299 h 512 v 597 h -512 m 43 -555 v 512 h 427 v -512 z"})]}),exports.ChartEditor=Mi,exports.ChartLineIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1165 l 574 -574 l 197 144 l 402 -402 l 361 360 l 263 -301 l 32 28 l -265 303 l 264 265 l -30 30 l -262 -263 l -317 362 l -444 -326 l -775 776 v 268 m 806 -1074 l 407 299 l 292 -335 l -332 -332 m -1173 832 v 281 l 740 -740 l -162 -119 z"}),c.jsx("path",{className:"styled info",d:"M 122 1658 l -30 -30 l 1209 -1210 l 655 655 l -30 30 l -625 -625 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1165 l 574 -574 l 639 469 l 584 -668 l 32 28 l -610 697 l -641 -470 l -578 578 v 610 z"})]}),exports.ChartLineMarkersIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 128 1920 h 1835 v 43 h -1878 v -214 h -42 v -170 h 42 v -256 h -42 v -171 h 42 v -1067 h 43 v 1067 h 55 l 457 -457 v -98 h 171 v 117 l 99 73 l 175 -190 h -18 v -170 h 170 v 140 l 233 233 l 280 -373 v -171 h 170 v 171 h -118 l -302 402 l 194 195 h 98 v 171 h -171 v -171 h 13 l -160 -160 l -109 144 v 144 h -170 v -104 l -279 -205 l -703 759 v 147 h -85 m 1015 -1152 l -199 215 l 251 184 v -15 h 139 l 110 -147 l -237 -237 m -1079 726 v 256 h 48 l 705 -761 l -70 -52 v 2 h -171 v -12 l -427 426 v 141 z"}),c.jsx("path",{className:"styled current_color",d:"M 128 1920 h 1835 v 43 h -1878 v -640 h -42 v -171 h 42 v -1067 h 43 v 1067 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 416 -554 v -171 h 170 v 171 h -118 l -437 581 v 144 h -170 v -104 l -384 -282 v 2 h -171 v -12 l -427 426 v 141 h -85 z"}),c.jsx("path",{className:"styled info",d:"M 1694 1024 h 98 v 171 h -171 v -171 h 13 l -427 -427 h -64 l -930 1005 v 147 h -170 v -170 h 133 l 909 -982 h -18 v -170 h 170 v 140 z"})]}),exports.ChartLineStackedIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1037 l 571 -570 l 535 259 l 651 -550 l 27 33 l -669 565 l -534 -259 l -581 582 v 452 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z"}),c.jsx("path",{className:"styled info",d:"M 121 1189 l -29 -31 l 607 -606 l 535 259 l 651 -550 l 27 33 l -669 565 l -534 -259 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1549 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z"})]}),exports.ChartLineStackedMarkersIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -256 h -42 v -171 h 42 v -1067 h 43 v 1067 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -554 v -171 h 171 v 171 h -118 l -437 581 v 144 h -170 v -104 l -384 -282 v 2 h -171 v -12 l -427 426 v 141 h -85 v 256 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -1494 h 43 v 1494 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z"}),c.jsx("path",{className:"styled info",d:"M 1802 427 l -437 581 v 144 h -170 v -104 l -384 -282 v 2 h -171 v -12 l -427 426 v 141 h -170 v -171 h 140 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -554 v -171 h 171 v 171 z"})]}),exports.ChartLineStackedPercentIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 171 h 1749 v 43 h -1749 v 1335 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z"}),c.jsx("path",{className:"styled info",d:"M 1877 299 h -1770 v -43 h 1770 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1549 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z"})]}),exports.ChartLineStackedPercentMarkersIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -1195 h -42 v -171 h 42 v -128 h 43 v 128 h 85 v 43 h 384 v -43 h 171 v 43 h 427 v -43 h 170 v 43 h 384 v -43 h 171 v 171 h -171 v -85 h -384 v 85 h -170 v -85 h -427 v 85 h -171 v -85 h -384 v 85 h -85 v 1195 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -1494 h 43 v 1494 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z"}),c.jsx("path",{className:"styled info",d:"M 1920 213 v 171 h -171 v -85 h -384 v 85 h -170 v -85 h -427 v 85 h -171 v -85 h -384 v 85 h -170 v -171 h 170 v 43 h 384 v -43 h 171 v 43 h 427 v -43 h 170 v 43 h 384 v -43 z"})]}),exports.ChartPieDoughnutIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 104 -22 202 q -22 98 -63 187 q -41 89 -98 168 q -58 78 -130 142 q -125 112 -284 176 q -160 64 -342 64 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -126 33 -244 q 33 -118 93 -221 q 59 -104 144 -190 q 84 -86 187 -148 q 102 -62 221 -97 q 118 -36 247 -39 m 307 1305 q 81 -65 129 -159 q 47 -95 47 -207 q 0 -97 -37 -182 q -37 -86 -100 -149 q -64 -64 -149 -101 q -86 -37 -183 -37 q -11 0 -21 1 q -11 0 -22 1 q -90 8 -167 48 q -78 39 -135 102 q -58 62 -91 144 q -33 81 -33 173 q 0 97 37 183 q 37 85 101 149 q 63 63 149 100 q 85 37 182 37 q 84 0 159 -27 q 74 -28 134 -76 m -293 530 q 173 0 325 -60 q 151 -61 270 -168 l -272 -272 q -66 54 -148 85 q -82 31 -175 31 q -106 0 -199 -40 q -94 -40 -163 -109 q -70 -70 -110 -163 q -40 -94 -40 -200 q 0 -100 37 -189 q 36 -90 100 -158 q 63 -69 149 -112 q 85 -43 183 -51 v -384 q -119 6 -228 41 q -109 35 -204 94 q -95 59 -172 140 q -78 81 -133 179 q -56 97 -86 209 q -30 111 -30 231 q 0 124 32 239 q 32 114 91 214 q 58 99 140 181 q 81 81 181 140 q 99 58 214 90 q 114 32 238 32 z"}),c.jsx("path",{className:"styled background",d:"M 1658 1692 q -125 119 -286 187 q -162 68 -348 68 q -127 0 -244 -33 q -118 -33 -220 -93 q -103 -60 -186 -143 q -84 -84 -144 -186 q -60 -103 -93 -220 q -33 -118 -33 -245 q 0 -125 32 -241 q 32 -116 90 -217 q 58 -101 140 -184 q 81 -84 181 -144 q 99 -61 214 -95 q 115 -35 239 -38 v 429 q -97 5 -181 45 q -85 40 -148 106 q -63 65 -99 152 q -36 86 -36 184 q 0 101 39 190 q 38 89 104 155 q 66 66 155 105 q 89 38 190 38 q 91 0 171 -30 q 80 -31 144 -85 z"}),c.jsx("path",{className:"styled current_color",d:"M 1364 1406 q -69 61 -155 96 q -86 34 -185 34 q -106 0 -199 -40 q -94 -40 -163 -109 q -70 -70 -110 -163 q -40 -94 -40 -200 q 0 -103 39 -194 q 38 -92 105 -161 q 66 -69 156 -110 q 89 -42 191 -46 v 42 q -94 4 -175 43 q -82 38 -142 101 q -61 63 -96 147 q -35 84 -35 178 q 0 97 37 183 q 37 85 101 149 q 63 63 149 100 q 85 37 182 37 q 90 0 169 -31 q 79 -31 141 -86 m 332 333 q -127 118 -291 186 q -164 68 -351 68 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -128 33 -246 q 32 -119 92 -222 q 59 -103 143 -188 q 84 -86 186 -147 q 102 -62 220 -97 q 117 -35 244 -38 v 43 q -121 3 -233 37 q -112 33 -209 92 q -98 58 -177 140 q -80 81 -137 180 q -57 98 -88 211 q -31 113 -31 235 q 0 124 32 239 q 32 114 91 214 q 58 99 140 181 q 81 81 181 140 q 99 58 214 90 q 114 32 238 32 q 179 0 335 -64 q 155 -65 276 -178 z"}),c.jsx("path",{className:"styled info_light",d:"M 1515 1024 q 0 -102 -38 -191 q -39 -89 -106 -156 q -67 -67 -156 -105 q -89 -39 -191 -39 q -5 0 -10 1 q -6 0 -11 0 v -426 q 5 0 11 0 q 5 -1 10 -1 q 127 0 244 33 q 117 32 219 92 q 102 60 186 144 q 83 83 143 185 q 60 102 93 219 q 32 117 32 244 q 0 99 -20 193 q -21 93 -58 178 q -38 85 -92 160 q -54 75 -121 138 l -302 -301 q 77 -68 122 -162 q 45 -95 45 -206 z"}),c.jsx("path",{className:"styled info_dark",d:"M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 104 -22 202 q -22 98 -63 188 q -41 89 -98 168 q -58 78 -130 142 l -333 -334 q 81 -65 129 -159 q 47 -95 47 -207 q 0 -97 -37 -182 q -37 -86 -100 -149 q -64 -64 -149 -101 q -86 -37 -183 -37 q -11 0 -21 1 q -11 0 -22 1 v -471 q 11 0 22 0 q 10 -1 21 -1 m 627 1579 q 62 -61 112 -133 q 50 -73 85 -154 q 35 -81 54 -170 q 18 -89 18 -183 q 0 -124 -32 -238 q -32 -115 -90 -214 q -59 -100 -140 -181 q -82 -82 -181 -140 q -100 -59 -214 -91 q -115 -32 -239 -32 v 384 q 106 0 200 40 q 93 40 163 110 q 69 69 109 163 q 40 93 40 199 q 0 109 -42 204 q -42 94 -114 164 z"})]}),exports.ChartPieIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 130 -33 250 q -34 119 -95 224 q -62 104 -147 190 q -86 86 -190 147 q -105 61 -225 95 q -120 33 -249 33 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -126 32 -243 q 31 -117 89 -219 q 58 -102 140 -187 q 82 -86 182 -148 q 100 -62 217 -99 q 116 -37 243 -43 m -862 939 q 0 124 32 238 q 32 114 91 214 q 58 99 140 181 q 82 82 182 141 q 99 58 214 90 q 114 32 237 32 q 173 0 325 -61 q 151 -61 272 -167 l -638 -638 v -924 q -121 6 -230 41 q -109 35 -204 94 q -95 59 -172 140 q -78 81 -133 179 q -55 97 -85 209 q -31 111 -31 231 z"}),c.jsx("path",{className:"styled background",d:"M 1941 1024 q 0 127 -32 244 q -33 117 -93 219 q -60 102 -143 186 q -84 83 -186 143 q -102 60 -219 93 q -117 32 -244 32 q -127 0 -244 -32 q -117 -33 -219 -93 q -102 -60 -185 -143 q -84 -84 -144 -186 q -60 -102 -92 -219 q -33 -117 -33 -244 q 0 -127 33 -244 q 32 -117 92 -219 q 60 -102 144 -185 q 83 -84 185 -144 q 102 -60 219 -92 q 117 -33 244 -33 q 127 0 244 33 q 117 32 219 92 q 102 60 186 144 q 83 83 143 185 q 60 102 93 219 q 32 117 32 244 z"}),c.jsx("path",{className:"styled current_color",d:"M 1666 1709 q -127 118 -291 186 q -164 68 -351 68 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -128 33 -246 q 32 -119 92 -222 q 59 -103 143 -188 q 84 -86 186 -147 q 102 -62 220 -97 q 117 -35 244 -38 v 43 q -121 3 -233 37 q -112 33 -209 92 q -97 59 -177 140 q -80 81 -137 180 q -57 98 -88 211 q -31 113 -31 235 q 0 124 32 238 q 32 114 91 214 q 58 99 140 181 q 82 82 182 141 q 99 58 214 90 q 114 32 237 32 q 178 0 334 -65 q 156 -65 277 -177 z"}),c.jsx("path",{className:"styled info_light",d:"M 1024 107 q 127 0 244 33 q 117 32 219 92 q 102 60 186 144 q 83 83 143 185 q 60 102 93 219 q 32 117 32 244 q 0 99 -20 193 q -21 93 -58 178 q -38 85 -92 160 q -54 75 -121 138 l -647 -648 v -937 q 5 0 11 0 q 5 -1 10 -1 z"}),c.jsx("path",{className:"styled info_dark",d:"M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 104 -22 202 q -22 98 -62 187 q -41 89 -99 168 q -58 78 -130 142 q -9 -8 -15 -15 q -6 -6 -10 -10 q -5 -5 -5 -6 l -639 -638 v -969 m 670 1578 q 62 -61 112 -133 q 50 -72 85 -153 q 35 -82 54 -170 q 18 -89 18 -183 q 0 -123 -32 -237 q -32 -115 -90 -214 q -59 -100 -141 -182 q -82 -82 -181 -140 q -100 -59 -214 -91 q -115 -32 -238 -32 v 908 z"})]}),exports.ChartScatterLinesIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1503 1457 l -10 61 l -42 -6 l 16 -96 l -334 -380 l -309 389 l -72 -147 l -248 421 l -37 -21 l 262 -446 l -463 -951 l 39 -18 l 451 925 l 227 -387 l 149 168 l 564 -710 l -184 1143 l 263 299 l -68 -525 l 42 -5 l 83 661 m -728 -828 l -114 -130 l -212 360 l 54 112 m 644 14 l 155 -951 l -471 593 m 803 918 v 43 h -1878 v -1878 h 43 v 1835 z"}),c.jsx("path",{className:"styled info",d:"M 1493 1518 l -42 -6 l 180 -1103 l -807 1016 l -558 -1144 l 39 -18 l 527 1083 l 864 -1087 z"}),c.jsx("path",{className:"styled current_color",d:"M 1832 1832 l -842 -958 l -486 825 l -37 -21 l 516 -877 l 792 900 l -68 -525 l 42 -5 m 214 749 v 43 h -1878 v -1878 h 43 v 1835 z"})]}),exports.ChartScatterLinesMarkersIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 213 342 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 63 q -17 28 -44 45 l 361 762 l 165 -282 q -36 -14 -59 -46 q -23 -32 -23 -73 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 62 q -16 28 -42 45 l 78 89 l 449 -570 q -20 -18 -31 -42 q -11 -25 -11 -53 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -11 0 -20 -2 q -10 -2 -19 -5 l -258 814 l 410 467 l -54 -422 q -5 1 -8 1 q -4 0 -8 0 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 38 -19 69 q -20 30 -52 46 l 70 565 l -482 -549 l -46 145 q 26 17 43 45 q 16 28 16 63 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 15 0 29 3 l 53 -166 l -189 -214 l -295 375 l -69 -146 l -147 251 q 29 17 47 46 q 17 29 17 64 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 q 11 0 23 3 l 166 -283 l -375 -789 q -14 3 -28 3 m 982 1109 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 m 341 -1323 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 m -105 275 l -401 509 l 176 200 m -355 -301 l -187 301 l 52 129 l 258 -327 l -93 -106 q -15 3 -30 3 m -638 -683 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 z"}),c.jsx("path",{className:"styled background",d:"M 1771 296 q 0 22 -8 42 q -9 19 -23 34 q -15 15 -35 24 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -24 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -15 34 -23 q 19 -9 41 -9 q 22 0 42 9 q 20 8 35 23 q 14 14 23 34 q 8 19 8 41 m -1320 7 q 0 22 -8 42 q -9 19 -23 34 q -15 15 -34 24 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -35 -24 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 15 -15 35 -23 q 19 -9 41 -9 q 22 0 42 9 q 19 8 34 23 q 14 14 23 34 q 8 19 8 41 m 902 1232 q 0 23 -8 43 q -9 19 -23 34 q -15 14 -35 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -43 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -15 34 -23 q 19 -9 41 -9 q 22 0 42 9 q 20 8 35 23 q 14 14 23 34 q 8 19 8 41 z"}),c.jsx("path",{className:"styled info",d:"M 1664 171 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -11 0 -20 -2 q -10 -2 -19 -5 l -319 1008 q 26 17 43 45 q 16 28 16 63 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 15 0 29 3 l 293 -923 l -724 918 l -466 -982 q -14 3 -28 3 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 63 q -17 28 -44 45 l 435 919 l 734 -932 q -20 -18 -31 -42 q -11 -25 -11 -53 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 m -1323 213 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 m 982 1152 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 m 341 -1152 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 z"}),c.jsx("path",{className:"styled current_color",d:"M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 1636 1182 l 70 565 l -825 -939 q -15 3 -30 3 l -360 615 q 29 17 47 46 q 17 29 17 64 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 q 11 0 23 3 l 357 -609 q -36 -14 -59 -46 q -23 -32 -23 -73 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 62 q -16 28 -42 45 l 726 826 l -54 -422 q -5 1 -8 1 q -4 0 -8 0 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 38 -19 69 q -20 30 -52 46 z"})]}),exports.ChartScatterLinesMarkersSmoothIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 1664 1501 q 37 13 61 46 q 24 33 24 75 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 v -34 q 0 -140 -15 -248 q -16 -108 -42 -191 l -7 2 q -26 93 -66 161 q -40 68 -88 116 q -48 47 -101 76 q -54 29 -108 44 q -2 24 -13 46 q -11 21 -28 37 q -17 15 -39 24 q -22 9 -47 9 q -45 0 -78 -26 q -34 -26 -45 -66 q -115 -15 -221 -84 q -107 -69 -207 -190 q -36 91 -59 176 q -24 85 -38 152 q 41 12 67 46 q 26 33 26 78 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -26 10 -48 q 9 -23 25 -40 q 16 -18 38 -28 q 22 -10 47 -12 q 15 -73 42 -167 q 26 -95 69 -195 q -48 -62 -94 -141 q -47 -80 -89 -168 q -43 -88 -80 -178 q -37 -91 -64 -176 q -25 -2 -46 -12 q -22 -11 -37 -28 q -16 -17 -25 -39 q -9 -23 -9 -48 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 45 -26 79 q -27 33 -69 44 q 19 59 48 135 q 29 75 67 158 q 37 82 84 167 q 47 85 103 163 q 33 -72 76 -141 q 42 -70 96 -131 q -38 -36 -38 -90 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 35 0 64 17 q 28 16 45 43 q 63 -32 133 -48 q 70 -17 154 -17 q 6 0 39 4 q 32 3 79 21 q 47 17 102 54 q 55 37 107 105 q 21 -9 45 -9 q 5 0 9 1 q 3 0 7 0 q 1 -20 2 -40 q 0 -21 0 -43 q 0 -174 -33 -390 q -14 3 -28 3 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 35 -16 64 q -17 28 -44 45 q 18 113 27 215 q 8 102 8 193 q 0 25 0 48 q 0 23 -2 46 q 32 16 51 46 q 19 30 19 68 q 0 35 -16 63 q -17 28 -43 45 q 30 96 45 210 q 14 114 14 248 m -171 -1206 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 q 0 35 25 60 q 25 25 60 25 m -1408 86 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 m 982 1152 q 35 0 60 -25 q 25 -25 25 -61 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 12 27 19 q 15 6 33 6 m 354 -278 q 59 -80 92 -194 q -23 -4 -42 -15 q -19 -12 -33 -28 q -14 -17 -22 -38 q -8 -21 -8 -45 q 0 -29 13 -54 q 12 -26 32 -43 q -45 -61 -95 -94 q -51 -34 -93 -49 q -43 -15 -71 -17 q -29 -3 -31 -3 q -78 0 -144 16 q -67 15 -126 46 q 3 14 3 28 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -29 0 -55 -13 q -57 63 -101 136 q -44 73 -77 150 q 41 53 87 99 q 45 46 96 82 q 50 36 106 60 q 55 23 115 32 q 1 -25 12 -47 q 11 -22 28 -38 q 17 -16 40 -25 q 22 -10 48 -10 q 45 0 79 28 q 34 27 45 69 q 61 -19 120 -56 q 59 -37 110 -105 z"}),c.jsx("path",{className:"styled background",d:"M 1305 1497 q 0 23 -8 43 q -9 20 -24 35 q -15 15 -35 24 q -20 8 -43 8 q -23 0 -43 -8 q -20 -9 -35 -24 q -15 -15 -23 -35 q -9 -20 -9 -43 q 0 -23 9 -43 q 8 -20 23 -35 q 15 -15 35 -23 q 20 -9 43 -9 q 23 0 43 9 q 20 8 35 23 q 15 15 24 35 q 8 20 8 43 m -890 -1072 q 0 23 -9 43 q -9 20 -24 35 q -15 15 -35 24 q -20 8 -42 8 q -23 0 -43 -8 q -20 -9 -35 -24 q -15 -15 -23 -35 q -9 -20 -9 -43 q 0 -23 9 -43 q 8 -20 23 -35 q 15 -15 35 -23 q 20 -9 43 -9 q 22 0 42 9 q 20 8 35 23 q 15 15 24 35 q 9 20 9 43 m 1317 -167 q 0 23 -8 43 q -9 20 -24 35 q -15 15 -35 24 q -20 8 -43 8 q -23 0 -43 -8 q -20 -9 -35 -24 q -15 -15 -23 -35 q -9 -20 -9 -43 q 0 -23 9 -43 q 8 -20 23 -35 q 15 -15 35 -23 q 20 -9 43 -9 q 23 0 43 9 q 20 8 35 23 q 15 15 24 35 q 8 20 8 43 z"}),c.jsx("path",{className:"styled info",d:"M 1689 365 q 18 112 27 213 q 8 101 8 193 q 0 183 -35 322 q -35 138 -106 234 q -29 38 -60 67 q -32 29 -65 51 q -34 21 -68 36 q -35 14 -68 24 q -2 24 -13 46 q -11 21 -28 37 q -17 15 -39 24 q -22 9 -47 9 q -45 0 -78 -26 q -34 -26 -45 -66 q -114 -15 -224 -87 q -110 -72 -211 -196 q -101 -125 -189 -299 q -89 -174 -160 -393 q -25 -2 -46 -12 q -22 -11 -37 -28 q -16 -17 -25 -39 q -9 -23 -9 -48 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 45 -26 79 q -27 33 -69 44 q 23 69 59 161 q 35 92 83 191 q 48 99 109 197 q 61 98 136 179 q 74 81 161 137 q 87 55 187 70 q 1 -25 12 -47 q 11 -22 28 -38 q 17 -16 40 -25 q 22 -10 48 -10 q 45 0 79 28 q 34 27 45 69 q 61 -19 120 -56 q 59 -37 110 -105 q 133 -178 133 -530 q 0 -174 -33 -390 q -14 3 -28 3 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 35 -16 64 q -17 28 -44 45 m -1476 62 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 m 982 1152 q 35 0 60 -25 q 25 -25 25 -61 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 12 27 19 q 15 6 33 6 m 341 -1323 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 z"}),c.jsx("path",{className:"styled current_color",d:"M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 1664 1501 q 37 13 61 46 q 24 33 24 75 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 v -34 q 0 -140 -15 -248 q -16 -108 -42 -191 q -14 3 -28 3 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -29 13 -54 q 12 -26 32 -43 q -45 -61 -95 -94 q -51 -34 -93 -49 q -43 -15 -71 -17 q -29 -3 -31 -3 q -78 0 -144 16 q -67 15 -126 46 q 3 14 3 28 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -29 0 -55 -13 q -66 73 -115 161 q -49 87 -84 176 q -35 88 -58 172 q -24 83 -37 148 q 41 12 67 46 q 26 33 26 78 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -26 10 -48 q 9 -23 25 -40 q 16 -18 38 -28 q 22 -10 47 -12 q 14 -67 38 -152 q 23 -86 59 -177 q 36 -92 87 -182 q 50 -90 118 -167 q -38 -36 -38 -90 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 35 0 64 17 q 28 16 45 43 q 63 -32 133 -48 q 70 -17 154 -17 q 6 0 39 4 q 32 3 79 21 q 47 17 102 54 q 55 37 107 105 q 21 -9 45 -9 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 35 -16 63 q -17 28 -43 45 q 30 96 45 210 q 14 114 14 248 z"})]}),exports.ChartScatterLinesSmoothIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 m 1577 -902 q 93 215 93 547 q 0 88 -6 184 l -43 -3 q 3 -47 5 -92 q 2 -45 2 -88 q 0 -277 -68 -470 q -25 97 -65 167 q -40 70 -89 119 q -49 48 -104 78 q -55 29 -108 46 q -54 16 -103 22 q -49 5 -87 5 q -74 0 -141 -21 q -68 -21 -129 -58 q -62 -37 -116 -88 q -55 -51 -104 -111 q -39 93 -64 181 q -25 88 -40 157 q -15 69 -21 112 q -6 42 -6 44 l -42 -4 q 0 -2 7 -48 q 6 -46 23 -120 q 16 -74 44 -168 q 27 -94 70 -192 q -60 -79 -109 -167 q -50 -88 -90 -174 q -40 -86 -70 -164 q -30 -79 -50 -141 q -21 -62 -32 -102 q -11 -40 -13 -47 l 42 -11 q 0 2 10 37 q 10 35 29 93 q 19 58 48 135 q 28 76 66 160 q 38 83 86 170 q 47 86 104 165 q 45 -96 106 -184 q 61 -89 142 -156 q 80 -68 181 -108 q 101 -40 227 -40 q 3 0 22 2 q 19 1 49 9 q 30 8 68 25 q 38 16 80 46 q 41 29 83 75 q 42 46 80 112 q 5 -42 8 -87 q 2 -45 2 -93 q 0 -243 -64 -562 l 42 -8 q 65 325 65 569 q 0 68 -5 130 q -5 61 -15 117 m -156 283 q 79 -106 111 -275 q -33 -74 -72 -125 q -40 -51 -81 -84 q -41 -34 -80 -52 q -39 -19 -69 -27 q -31 -9 -49 -11 q -19 -2 -20 -2 q -121 0 -218 41 q -97 40 -173 107 q -77 67 -135 155 q -58 87 -101 181 q 47 60 100 112 q 53 51 112 89 q 58 37 123 59 q 65 21 136 21 q 45 0 99 -7 q 54 -7 110 -27 q 55 -21 109 -58 q 54 -37 98 -97 z"}),c.jsx("path",{className:"styled info",d:"M 1792 1749 l -43 -3 q 6 -93 6 -178 q 0 -244 -51 -422 q -51 -179 -152 -287 q -47 -49 -93 -76 q -46 -28 -83 -40 q -38 -13 -62 -15 q -24 -3 -25 -3 q -124 0 -223 44 q -99 43 -177 114 q -78 71 -136 162 q -58 90 -100 186 q -42 95 -69 187 q -28 91 -44 164 q -16 72 -22 118 q -7 46 -7 49 l -42 -4 q 0 -3 5 -34 q 4 -32 14 -84 q 10 -52 27 -120 q 17 -68 43 -144 q 25 -76 60 -156 q 35 -80 82 -155 q 46 -76 105 -143 q 58 -67 131 -117 q 73 -51 161 -80 q 88 -29 193 -29 q 3 0 30 3 q 27 2 69 16 q 41 14 92 44 q 51 30 102 84 q 216 231 216 735 q 0 45 -2 91 q -2 45 -5 93 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 m 1004 -387 q -111 0 -207 -46 q -97 -46 -179 -121 q -83 -75 -151 -172 q -68 -97 -122 -199 q -55 -102 -96 -201 q -41 -99 -68 -178 q -28 -80 -43 -132 q -15 -53 -17 -62 l 42 -11 q 1 2 14 50 q 13 47 40 124 q 26 76 66 173 q 39 96 91 197 q 52 101 118 197 q 65 96 144 171 q 79 75 171 121 q 92 46 197 46 q 45 0 99 -7 q 54 -7 110 -27 q 56 -21 110 -58 q 54 -37 98 -97 q 133 -180 133 -528 q 0 -121 -16 -261 q -16 -141 -48 -302 l 42 -8 q 65 325 65 569 q 0 364 -142 556 q -50 67 -111 108 q -62 40 -123 62 q -62 22 -119 29 q -57 7 -98 7 z"})]}),exports.ChartScatterMarkersIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 384 213 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 1323 42 q 26 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 7 33 7 m -939 298 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 427 128 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 m 0 213 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 m 768 384 v 43 h -1878 v -1878 h 43 v 1835 m 1579 -213 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 m -854 -982 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m -469 982 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m 1024 -640 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 z"}),c.jsx("path",{className:"styled background",d:"M 1195 1344 q 22 0 42 9 q 19 8 33 23 q 14 14 23 34 q 8 19 8 41 q 0 45 -30 76 q -31 30 -76 30 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -14 -23 -33 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -15 34 -23 q 19 -9 41 -9 m -427 -341 q 22 0 42 9 q 19 8 34 22 q 14 14 23 34 q 8 19 8 41 q 0 22 -8 42 q -9 19 -23 34 q -15 14 -34 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -14 34 -22 q 19 -9 41 -9 m 939 -512 q 45 0 76 31 q 30 30 30 75 q 0 22 -8 42 q -9 19 -23 34 q -14 14 -33 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -14 34 -22 q 19 -9 41 -9 m -1323 -256 q 22 0 42 9 q 19 8 34 22 q 14 14 23 34 q 8 19 8 41 q 0 22 -8 42 q -9 19 -23 34 q -15 14 -34 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -14 34 -22 q 19 -9 41 -9 z"}),c.jsx("path",{className:"styled info",d:"M 384 213 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 1323 42 q 26 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 7 33 7 m -939 298 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 427 128 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 m 0 213 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 m 1579 -213 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 m -854 -982 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m -469 982 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m 1024 -640 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 z"})]}),exports.CommandContext=ki,exports.CornerTriangle=vo,exports.DateUtils=El,exports.DefaultTaskPaneRegistry=Pn,exports.DocThemesContext=Nn,exports.DocThemesProvider=e=>{const{themes:t,children:n}=e;return c.jsx(Nn.Provider,{value:t,children:n})},exports.EditableLabel=Kr,exports.EmptyFrame=vi,exports.FilterButton=kr,exports.FontUtils=Fl,exports.Item=zo,exports.LogoNoPaddingIcon=e=>c.jsxs("svg",{...e,viewBox:"0 0 48 48",children:[c.jsx("path",{d:"M 2.2827924,0 C 1.5038324,0 0.87090248,0.52603 0.87090248,1.17149 v 25.39667 h -0.01 v 20.2607 c 0,0.39663 0.24025002,0.74639 0.60481992,0.95852 v 0.18499 h 0.50664 c 0.0972,0.0173 0.19732,0.0276 0.30092,0.0276 h 15.5346916 16.7448 v 0 h 11.35822 c 0.10311,0 0.20276,-0.0104 0.29945,-0.0276 h 0.0696 v -0.0182 c 0.59938,-0.13566 1.04238,-0.58606 1.04238,-1.12526 V 26.96484 c 0.006,-0.0429 0.009,-0.0853 0.009,-0.12925 V 1.17154 c 0,-0.64586 -0.63293,-1.17149 -1.41189,-1.17149 h -15.7478 v 2e-4 h -2.06997 V 5e-5 Z",fill:"#547DBE"}),c.jsx("path",{d:"m 2.8338324,2.7184 v 9.0404 H 11.538484 V 2.7184 Z m 11.2334116,0 v 9.0404 h 8.70465 V 2.7184 Z m 11.26696,0 v 9.0404 h 8.70465 V 2.7184 Z m 11.33258,0 v 9.0404 h 8.70465 V 2.7184 Z M 2.8338324,14.32723 v 8.84046 h 8.7046516 v -8.84046 z m 11.2334116,0 v 8.84046 h 8.70465 v -8.84046 z m 11.26696,0 v 8.84046 h 8.70465 v -8.84046 z m 11.33258,0 v 8.84046 h 8.70465 V 14.32723 Z M 2.8338324,25.73691 v 8.67308 h 8.7046516 v -8.67308 z m 11.2334116,0 v 8.67308 h 8.73721 v -8.67308 z m 11.26696,0 v 8.67308 h 8.70465 v -8.67308 z m 11.33258,0 v 8.67308 h 8.70465 V 25.73691 Z M 2.8693424,36.61859 v 8.67357 h 8.7046616 v -8.67357 z m 11.2339116,0 v 8.67357 h 8.73771 v -8.67357 z m 11.26697,0 v 8.67357 h 8.70465 v -8.67357 z m 11.33257,0 v 8.67357 h 8.70465 v -8.67357 z",fill:"#FFFFFF"}),c.jsx("path",{d:"m 2.8254424,2.72091 v 9.04041 H 11.570544 V 2.72091 Z m 0,11.60889 v 8.84036 H 11.570544 V 14.3298 Z m 0,11.40958 v 8.67357 h 8.7451016 v -8.67357 z m 0.036,10.88167 v 8.67358 h 8.7451116 v -8.67358 z",fill:"#547DBE",fillOpacity:"0.4"}),c.jsx("path",{d:"m 30.820434,6.19497 c 1.85291,0 3.66241,0.29708 5.4285,0.89113 1.7656,0.5942 3.49568,1.50108 5.19073,2.72107 l -2.37584,3.25571 c -1.40941,-1.01391 -2.79515,-1.76647 -4.15721,-2.25759 -1.36206,-0.49111 -2.72412,-0.73667 -4.08618,-0.73667 -2.5817,0 -4.58902,0.53064 -6.02232,1.59218 -1.43334,1.06143 -2.14989,2.56661 -2.14989,4.51523 v 0.0237 c 0,1.36241 0.41177,2.40021 1.23532,3.11315 0.82355,0.71288 1.89253,1.24367 3.20703,1.59217 1.31446,0.3485 2.71608,0.67341 4.20493,0.97439 1.29842,0.26929 2.58944,0.58216 3.87257,0.9386 1.28263,0.3565 2.45032,0.8635 3.50356,1.52097 1.05324,0.65747 1.89288,1.5486 2.51841,2.6734 0.62553,1.12485 0.93829,2.59035 0.93829,4.39635 v 0.0477 c 0,3.18435 -1.10849,5.64817 -3.32597,7.39066 -2.21698,1.7425 -5.33724,2.61399 -9.35978,2.61399 -1.67882,0 -3.25863,-0.15841 -4.73958,-0.47523 -1.4808,-0.31681 -2.86644,-0.79204 -4.15737,-1.42617 -1.29077,-0.63363 -2.49827,-1.42567 -3.6227,-2.37612 l 2.54179,-3.20819 c 1.39383,1.204 2.91819,2.10717 4.57323,2.70928 1.6549,0.60205 3.45641,0.90307 5.40463,0.90307 2.73991,0 4.85823,-0.52704 6.35447,-1.58048 1.49674,-1.05359 2.24511,-2.53098 2.24511,-4.43213 v -0.0237 c 0,-1.37834 -0.37197,-2.43583 -1.11639,-3.17245 -0.74442,-0.73668 -1.71824,-1.2912 -2.92194,-1.66359 -1.2037,-0.37223 -2.51051,-0.6851 -3.91993,-0.9386 -1.34627,-0.23762 -2.69635,-0.51485 -4.05046,-0.83182 -1.35417,-0.31677 -2.59339,-0.7841 -3.71782,-1.40204 -1.12448,-0.61779 -2.03125,-1.49708 -2.72017,-2.63782 -0.68898,-1.14078 -1.03341,-2.66156 -1.03341,-4.5627 v -0.0237 c 0,-3.21623 1.06898,-5.70753 3.20718,-7.47386 2.13805,-1.76648 5.15506,-2.64981 9.05121,-2.64981 z",strokeWidth:"2.5",stroke:"#EB594D",fill:"#f9CECB"})]}),exports.LogoTextNoPaddingIcon=Dr,exports.MovableArea=jr,exports.PictureEditor=Ur,exports.Row=yl,exports.ScriptEditor=_a,exports.SheetCellEditor=Tr,exports.SheetCellRenderer=Mr,exports.SheetElement=Hr,exports.SheetScrollbar=Mo,exports.StaticBorderRenderer=Vl,exports.StyledStrokePath=Er,exports.Tab=Cl,exports.TabStrip=wl,exports.TaskPaneArea=Zl,exports.TaskPaneProvider=({children:e,createArea:t,onUpdateArea:n,registry:l=Pn})=>{const a=o.useRef(null),i=o.useRef(null),[m,h]=o.useState(null),[s,p]=o.useState(null),b=o.useMemo(()=>({activateTaskPane(u,I){i.current!==u&&(a.current?a.current.activateTaskPane(u,I):(h(u),v(u)))}}),[]),v=r.useCallbackRef(u=>{const I=t({registry:l,onClose:()=>{p(null),n?.(null)}},x=>{x&&p(x)});return n?.(I),I},[t,l,m]);return o.useEffect(()=>{s&&m&&(s.activateTaskPane(m,{focus:!0}),h(null))},[m,s]),o.createElement(zr.Provider,{value:s??b},e)},exports.TaskPaneStrip=ko,exports.TaskPaneTitle=Ro,exports.createCellEditStateFromCell=Ir,exports.useBordersOverlay=So,exports.useDocThemes=()=>{const e=o.useContext(Nn),[t]=o.useState(()=>new d.ThemeCollection);return o.useMemo(()=>e||t,[e])},exports.useModelListener=tt,exports.useMovableCommands=Or,exports.useRangeListener=(e,t,n,l)=>{const a=o.useRef(n);a.current=n;const i=l?.fireOnAddressChange??!0;o.useEffect(()=>{if(!e||!t||!a.current){const s={getSource:()=>null,getFrom:()=>null,getTo:()=>null,trigger:"delete",isDataChange:!1,isTransactional:!1,isUndo:!1,timeStamp:Date.now()};return void a.current?.(s)}const m=s=>{a.current?.(s)},h=e.getRange(t).addListener(m,l);if(i){const s=e.getRange(t);m({getSource:()=>s,getFrom:()=>null,getTo:()=>null,trigger:"modelChange",isDataChange:!1,isTransactional:!1,isUndo:!1,timeStamp:Date.now()})}return()=>{h?.()}},[e,t])},exports.useSheetCommands=Lr,exports.useSheetCopyPaste=Pr,exports.useTaskPaneArea=Nr,Object.keys(r).forEach(e=>{e==="default"||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:()=>r[e]})});