@sheetxl/react 0.7.4 → 0.7.5

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%}}._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.4
3
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.7.5
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.
@@ -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.`,shortcut:{key:"V",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}}),new r.Command("pasteFormats",m,{label:"Paste Formatting",scopedLabels:{paste:"Formatting"},description:`Paste only the formats of the selected cells.
22
22
 
23
- The content is not applied.`}),new r.Command("pasteFormulas",m,{label:"Paste Formulas",scopedLabels:{paste:"Formulas"},description:"Paste only the formulas of the selected cells. The values and formatting is not applied."}),new r.Command("pasteTranspose",m,{label:"Paste Transpose",scopedLabels:{paste:"Transpose"},description:"Paste with the rows and columns flipped."}),new r.Command("pasteLinks",m,{label:"Paste Links",scopedLabels:{paste:"Links"},description:"Paste as formula references to the original cells."})];i.addCommands(q,!0)},[i,e]),o.useEffect(()=>{if(!i)return;const m={disabled:!t.getProtection().isFormatCellsAllowed()};i.getCommand("pasteValues").updateCallback(q=>R.paste({...Bl,...q})).update(m),i.getCommand("pasteFormats").updateCallback((q,T)=>R.paste({...Vl,description:T.label(),...q})).update(m),i.getCommand("pasteFormulas").updateCallback((q,T)=>R.paste({...Pl,description:T.label(),...q})).update(m),i.getCommand("pasteTranspose").updateCallback((q,T)=>R.paste({...Hl,description:T.label(),...q})).update(m),i.getCommand("pasteLinks").updateCallback((q,T)=>R.paste({...Ul,description:T.label(),...q})).update(m),i.getCommand("cut").update(m),i.getCommand("paste").update(m)},[t,i]);const O=o.useMemo(()=>{if(!A||!E.current)return;const m=A.key;if(m!=="copy"&&m!=="cut"&&m!=="formatPainter")return;const q=E.current.getItem();if(q.getSource()!==t)return;const T=E.current.isCut?.(),$=T?S:f,I=T?s:g,k=q.getCoords(),Z=k?[k]:null;return Z&&Z.length!==0?X=>{const B=[];for(let j=0;j<Z.length;j++){const H=Z[j],J=X.toClipBounds(X.getRangeCoordsBounds(H,{top:0,left:0,right:1,bottom:1}),dt.SELECTION_CLIP_INSETS);J&&(B.push(h({range:H,key:`copy-selection-background-${j}`,x:J.x,y:J.y,width:Math.max(J.width,0),height:Math.max(J.height,0),stroke:$,strokeWidth:2})),B.push(h({range:H,key:`copy-selection-foreground-${j}`,x:J.x+(J.width<=2?-1:0),y:J.y,width:Math.max(J.width,3),height:Math.max(J.height,3),stroke:I,strokeWidth:2,isAnimatedStroke:!0})))}return B}:null},[A,t,n,g,f,s,S]);return{...R,clipboard:P,overlays:O}},Kl=o.memo(o.forwardRef((e,t)=>{const{view:n,element:i,sheet:a,gridStyle:l,commands:C}=e,g=l.body??{},s=a.getView(),{overlays:f}=Tr({element:i,sheet:a,sheetView:s,commands:C,copyForegroundColor:l.selection.strokeFill,copyBackgroundColor:g.fill,cutForegroundColor:l.selectionRemove.strokeFill,cutBackgroundColor:g.fill});return Qe(a?.getSelection(),{onChange(S){}}),o.useEffect(()=>{n?.getStage()},[n?.getStage()]),f&&n?f(n):null})),$l="_sheet-selection_12wyx_5",Wl={key:"dragCut",description:"Drag selection to move cell contents.",cursor:"move"},Gl={key:"dragCutInsert",description:"Drag selection to insert cell contents.",cursor:"copy"},_l={key:"dragCopy",description:"Drag selection to copy cell contents."},Zl={key:"dragCopyInsert",description:"Drag selection to insert copied cell contents.",cursor:"move"},Go=(e,t)=>t.ctrlKey&&t.shiftKey?Zl:t.ctrlKey?_l:t.shiftKey?Gl:Wl,Xl={key:"fill",description:"Drag selection to extend series or fill.",cursor:"crosshair"},Yl=o.memo(o.forwardRef((e,t)=>{const{view:n,commands:i,className:a,onFirstRender:l,onShowTooltip:C,onCloseTooltip:g,sheet:s,gridRef:f,gridStyle:S,isActive:p,editingCoords:h,...E}=e,x=n?.getBounds(),A=r.useCallbackRef(C,[C]),N=r.useCallbackRef(g,[g]),[K,P]=o.useState(()=>s?.getSelection().getCoords()),R=r.useCallbackRef(Y=>{me.CoordUtils.isEqualSelectionCoords(Y,K)||s&&s.getSelection().updateCoords(Y)},[s,K]),O=r.useEditMode(),m=o.useRef(null),[q,T]=o.useState(s?.getProtection().isLocked()),[$,I]=o.useState(s?.getView().getMovableSelection().length>0),k=r.ReactUtils.detectIt().primaryInput==="touch",Z=!k&&p,X=h!==null||$,B=r.useCallbackRef(Y=>{const W=me.CoordUtils.cellToRange(Y);if(s.isClosed())return W;const le=s.getRange(W,{excludeHidden:!0}).getMerges();return le.length===0?W:le[0]},[s]),j=r.useCallbackRef((Y,W,le,fe,ce,Se)=>{const ie=s.getSelectedRange().getExtended(fe,Y).getCoords();switch(fe){case d.IRange.Direction.Up:return ie.rowStart;case d.IRange.Direction.Down:return ie.rowEnd;case d.IRange.Direction.Left:return ie.colStart;case d.IRange.Direction.Right:return ie.colEnd}},[s]),H=r.useCallbackRef(()=>{const Y=s.getUsedRange()?.getCoords(),W=s.getRowHeaders().getUsedRange()?.getCoords(),le=s.getColumnHeaders().getUsedRange()?.getCoords();return{...Y,colEnd:Math.max(Y?.colEnd??0,le?.max??0),rowEnd:Math.max(Y?.rowEnd??0,W?.max??0)}},[s]),J=r.useCallbackRef((Y,W)=>s.getRowHeaders().hiddenHeadersAt(Y,W),[s]),M=r.useCallbackRef((Y,W)=>s.getColumnHeaders().hiddenHeadersAt(Y,W),[s]),U=r.useCallbackRef(Y=>s.getRange(Y,{excludeHidden:!0}).getMerges(),[s]),ue=r.useCallbackRef(Y=>{s?.getSelection().setAdjusting(Y)},[s]),we=r.useCallbackRef(async()=>{s?.getSelection().setAdjusting(null),O.getMode()?.key==="formatPainter"&&(await i?.getCommand("pasteFormats")?.execute({}),O.setMode(null))},[O,K,s,i]),je=o.useMemo(()=>{const Y=O.getMode();return Y?.key==="cut"||Y?.key==="copy"},[O]);Qe(s?.getView(),{onMovableSelectionChange:()=>{I(s.getView().getMovableSelection().length>0)}}),Qe(s?.getSelection(),{onChange(Y){const W=s.getSelection().getCoords();P(W)}}),Qe(s,{onProtectionChange:()=>{T(s.getProtection().isLocked())}});const{body:Te={}}=S||{},ae=r.useNotifier(),Me=n.getLayout(),Ke=!(Z&&K.ranges.length<=1&&h===null&&!q&&(!O.getMode()||je)),{cursor:Ee,overlay:Ue,onPointerDown:re}=dt.useSelection({gridRef:f,commands:i,layout:Me,getCellCoordsAsRangeCoords:B,selection:K,fillHandleBorderColor:Te.fill,selectionBackgroundColor:p?S.selection.fill:S.selectionInactive.fill,selectionBorderColor:p?S.selection.strokeFill:S.selectionInactive.strokeFill,selectionRemoveBackgroundColor:p?S.selectionRemove.fill:S.selectionInactive.fill,selectionRemoveBorderColor:p?S.selectionRemove.strokeFill:S.selectionInactive.strokeFill,disableFillDrag:Ke,disableMoveDrag:k||!(p&&K.ranges.length<=1&&h===null&&!q),disableTouchSelection:X,onSelectionChange:R,onSelectionDragStart:ue,onSelectionDragEnd:we,onMoveDragStart:(Y,W,le)=>{O.setMode(Go(0,le))},onMoveDragUpdate:(Y,W,le)=>{O.setMode(Go(0,le))},onMoveDragEnd:(Y,W)=>{O.setMode(null)},onMoveDragDone:async(Y,W,le)=>{if(me.CoordUtils.isEqualRanges(Y,W))return;const fe=s.getRange(W);if(ae?.showOptions){const xe=fe.getDifferences(Y);let Re=!1;const b=xe.getCount();for(let Fe=0;!Re&&Fe<b;Fe++)Re=xe.at(Fe).isContentful();if(Re&&await ae?.showOptions({title:"Confirm",description:"There is already data here. Do you want to replace it?",options:["Replace","Cancel"],defaultOption:"Replace"})!=="Replace")return}const ce=!le.ctrlKey,Se=le.shiftKey,ie=Se?ce?"Insert Moved Cells":"Insert Copied Cells":ce?"Move Cells":"Copy Cells",ve=await ae?.showBusy?.(ie);try{const xe=s.getRange(Y);await fe.doBatch(async()=>{Se?await fe.insertFrom(Y,{isCut:ce,undoRange:xe}):await fe.copyFrom(Y,{isCut:ce,undoRange:xe}),xe.autoFit({skipCustomSize:!0,orientations:d.IRange.Orientations.Row,minContent:!0}),fe.autoFit({skipCustomSize:!0,orientations:d.IRange.Orientations.Row,minContent:!0})},{description:ie,autoSelect:!0})}catch(xe){ae?.showError?.(xe)}finally{ve?.()}},contentfulCellFinder:j,hiddenRowsAt:J,hiddenColumnsAt:M,mergedRanges:U,getDataCoords:H,canSelectionSpanMergedCells:Y=>{const W=s.getRange(Y);return W.isEntireColumns()||W.isEntireRows()},onFill:async(Y,W)=>{const le="Auto Fill",fe=await ae?.showBusy?.(le);try{await s.doBatch(()=>{s.getRange(Y).autoFill(W),s.getRange(W).autoFit({orientations:d.IRange.Orientations.Row,skipCustomSize:!0,minContent:!0})},{description:le,autoSelect:!0})}catch(ce){ae?.showError?.(ce)}finally{m.current=null,fe?.()}},onFillPreview:(Y,W,le)=>{if(f.current&&A){O.setMode(Xl);try{m.current?.direction!==le&&(m.current=null,s.getRange(Y).autoFill(W,{previewOnly:b=>{m.current={callback:b,direction:le}}}));const fe=m.current?.callback?.(W);if(!fe||fe.isEmpty())return;const ce=fe.toText();if(!ce)return;const Se=me.CoordUtils.cellToRange(fe.getCoords()),ie=n.getRelativePointFromClient(0,0);let ve=0,xe=0,Re=r.ToolTipPlacement.Bottom;if(le===d.IRange.Direction.Down){ve=Me.getColOffset(Se.colEnd+1)-ie.x;const b=Me.getRowOffset(Se.rowEnd),Fe=Me.getRowOffset(Se.rowEnd+1);xe=Fe-(Fe-b)/2-ie.y,Re=r.ToolTipPlacement.Right}else if(le===d.IRange.Direction.Right){xe=Me.getRowOffset(Se.rowEnd+1)-ie.y;const b=Me.getColOffset(Se.colEnd),Fe=Me.getColOffset(Se.colEnd+1);ve=Fe-(Fe-b)/2-ie.x,Re=r.ToolTipPlacement.Bottom}else if(le===d.IRange.Direction.Up){ve=Me.getColOffset(Se.colEnd+1)-ie.x;const b=Me.getRowOffset(Se.rowStart),Fe=Me.getRowOffset(Se.rowStart+1);xe=Fe-(Fe-b)/2-ie.y,Re=r.ToolTipPlacement.Right}else if(le===d.IRange.Direction.Left){xe=Me.getRowOffset(Se.rowEnd+1)-ie.y;const b=Me.getColOffset(Se.colStart),Fe=Me.getColOffset(Se.colStart+1);ve=Fe-(Fe-b)/2-ie.x,Re=r.ToolTipPlacement.Bottom}A({anchor:{x:ve,y:xe},display:ce,placement:Re})}catch(fe){ae?.showError?.(fe)}}},onFillDone:()=>{m.current=null,O.setMode(null),N?.()}}),te=r.useCallbackRef(Y=>{re(r.ReactUtils.createSyntheticEvent(Y))},[re,h]);o.useEffect(()=>{const Y=n?.getStage();if(Y)return Y.addEventListener("pointerdown",te),()=>{Y.removeEventListener("pointerdown",te)}},[n?.getStage()]);const pe=r.useImperativeElement(t,()=>({}),[]),Le=o.useRef(null);return c.jsx("div",{className:yt(a,"sheet-selection",$l),style:{position:"absolute",width:x?.width,height:x?.height,overflow:"hidden",pointerEvents:"none",willChange:"none"},ref:Xt([pe,Le]),...E,children:Ue(n)})})),In=Object.freeze({x:0,y:0,width:0,height:0}),Jl={fireOnModelChange:!1},Ql=o.memo(o.forwardRef((e,t)=>{const{children:n,view:i,movable:a,onRefLoad:l,onRefUnload:C,onHide:g,onShow:s,onUnFocus:f,isDragging:S,updateFrameBounds:p,dragStart:h,style:E,disabled:x,renderMovable:A,...N}=e,[K,P]=o.useState(In),[R,O]=o.useState(null),[m,q]=o.useState(!1),T=o.useRef(null);o.useLayoutEffect(()=>{if(a.isClosed())return;const I=a.getBounds();if(!I)return;const k=i.toViewBounds(I);P(k??In),p(k??In)},[i?.getBounds()]),Qe(a,{onBoundsChange:I=>{const k=I.getBounds();if(!k)return;const Z=i.toViewBounds(k);P(Z??In),p(Z)},onSelectionChange:()=>{const I=me.CommonUtils.hasFocus(T.current,!0);!m&&!I||a.isSelected()||f()}}),Qe(a,{onRequestFocus:()=>me.CommonUtils.whenFocus(T.current,!0)},Jl),o.useEffect(()=>{const I=T.current;return l(I),()=>{C(I)}},[]);const $=o.useMemo(()=>{if(!K)return null;let{width:I,height:k}=K;return A({view:i,movable:a,disabled:x,isDragging:S,style:{position:"relative",left:0,top:0,width:I,height:k},onHide:g,onShow:s})},[i,a,K.width,K.height,x,S]);return c.jsx("div",{className:"movable",tabIndex:0,ref:Xt([T,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,...E},onMouseDown:async I=>{const k=I.shiftKey||I.ctrlKey,Z=a.isSelected(),X=I.currentTarget;k&&Z?a.unselect():(Z&&!k||await a.select({addToSelection:k}),h(I.nativeEvent,X),X.focus())},onFocus:I=>{I.relatedTarget&&!R&&O(I.relatedTarget),q(!0)},onBlur:I=>{R&&!T?.current?.contains(I.relatedTarget)&&O(null),I.relatedTarget&&q(!1)},...N,children:$})})),ei="_movable-area_314c6_5",Ir=o.memo(o.forwardRef((e,t)=>{const{view:n,movables:i,movablesView:a,renderMovable:l,transactional:C,onUnFocus:g,onFocus:s,disabled:f=!1,disableDrag:S=!1,disableResize:p=!1,className:h,style:E,renderDirections:x=["nw","n","ne","w","e","sw","s","se"],onFirstRender:A,...N}=e,K=n.getBounds(),P=r.useCallbackRef(A,[A]),R=r.useCallbackRef(g,[g]),O=r.useCallbackRef(s,[s]),[m,q]=o.useState([]),[T,$]=o.useState(!1),[I,k]=o.useState(!1),Z=o.useRef(!0),X=o.useRef(new Map),B=o.useRef(new Map),j=o.useRef(new Map),H=o.useRef(new Map),J=o.useRef(new Map),M=o.useRef({onRequestFocus:oe=>(le(oe),null)}),U=o.useRef(null),ue=o.useRef(null),we=o.useRef(null),[je,Te]=o.useReducer(oe=>oe+1,0);o.useLayoutEffect(()=>{Te()},[n,i]),Qe(i,{onCollectionChange:()=>{const oe=i.getItems({address:n.getVisibleRangeCoords(),excludeHidden:!0}),ke=J.current;ke.forEach(ye=>{ye()}),ke.clear();const Ae=M.current;for(let ye=0;ye<oe.length;ye++){const De=oe[ye];if(De.isClosed())continue;const D=De.addListeners(Ae);ke.set(De,D)}Te()},onInvalidated:()=>{Te()}}),Qe(a,{onMovableSelectionChange(oe){Me(),Te()}});const ae=o.useCallback((oe,ke)=>{const Ae=j.current.get(oe);we.current&&(we.current.getTargets().forEach(ye=>{if(ye===Ae)return ye.style.left=ke.x+"px",ye.style.top=ke.y+"px",ye.style.width=ke.width+"px",void(ye.style.height=ke.height+"px")}),we.current.updateRect())},[]),Me=()=>{const oe=[],ke=a.getMovableSelection();ke.forEach(Ae=>{const ye=j.current.get(Ae);ye&&ke.indexOf(Ae)!==-1&&oe.push(ye)}),q(Ae=>me.CommonUtils.isEqualArrays(Ae,oe)?Ae:oe)},Ke=o.useRef(null),Ee=o.useRef(null),Ue=o.useMemo(()=>(Ee.current||(Ee.current=new Promise(oe=>{Ke.current=oe})),Ee.current),[]),re=o.useRef(null),te=r.useCallbackRef(async(oe,ke)=>{re.current=ke,await(async()=>!(!await Ue.then()||!we.current))()&&re.current===ke&&we.current.dragStart(oe,ke)},[m]),[pe,Le]=o.useState(!1),Y=o.useRef(null),W=o.useRef(null),le=r.useCallbackRef(async(oe=null)=>{if(oe||(oe=a.getMovableSelection()[0]),!oe)return R?.(),!1;const ke=j.current.get(oe);ke?(await me.CommonUtils.whenFocus(ke),ke.focus(),W.current=ke,Y.current=null):Y.current=oe},[a]);o.useEffect(()=>{pe&&m.length>0&&W.current!==m[0]&&le(),Z.current&&(P?.(),Z.current=!1)},[m]);const fe=o.useMemo(()=>{const oe=i.getItems({address:n.getVisibleRangeCoords(),excludeHidden:!0});if(oe.length===0&&X.current.size===0)return null;const ke=(ee,L,G,u=!0)=>{const w=ee.isSelected(),F={tabIndex:G,view:n,movable:ee,onRefLoad:v=>{Y.current===ee&&(v.focus(),W.current=v,Y.current=null),j.current.set(ee,v),B.current.set(v,ee),L.rendered=!0,Me()},onRefUnload:v=>{j.current.delete(ee),B.current.delete(v),L.rendered=!1,Me()},onUnFocus:R,onHide:v=>{L.onHide=v},onShow:v=>{L.onShow=v},isDragging:w&&(I||T),disabled:f,renderMovable:l,updateFrameBounds:v=>{ae(ee,v)},dragStart:te,onMouseUp:()=>{if(re.current=null,ue.current){$(!1),k(!1);let v=!1;H.current?.forEach(z=>{me.CommonUtils.isEqualBounds(z.movable.getBounds(),z.startBounds)||(v=!0)}),v?Se():ie()}},style:{opacity:u?T&&w?.7:void 0:0,zIndex:T&&w?ee.getZIndex()+oe.length:void 0,pointerEvents:u?void 0:"none",cursor:I&&w?"grabbing":f||S?"initial":"move",boxShadow:!w||I&&!T?void 0:"1px 1px 2px 2px rgba(0,0,0,.15)"}};return c.jsx(Ql,{...F},`movable-${ee.getUUID()}`)},Ae=X.current,ye=new Map,De=[];for(let ee=0;ee<oe.length;ee++){const L=oe[ee];if(L.isClosed())continue;let G=Ae.get(L);G||(G={frame:null,shown:null,onShow:null,onHide:null,rendered:!1,doShow:(u,w)=>{if(!w||w.shown===!0)return;w.shown=!0;const F=++w.visibilityRequestId;requestAnimationFrame(()=>{const v=X.current.get(u);v&&F===w.visibilityRequestId&&(w.onShow?.(u),v.shown=!0)})},doHide:async(u,w)=>{if(!w||w?.shown===!1)return;w.shown=!1;const F=++w.visibilityRequestId,v=await Promise.resolve(w.onHide?.(u));F===w.visibilityRequestId&&v!==!1&&(w.shown=!1,X.current.delete(u),Te())},visibilityRequestId:0}),G.frame=ke(L,G,ee,!0),De.push(G.frame),G.doShow(L,G),Ae.delete(L),ye.set(L,G)}const D=[];return a.getMovableSelection().forEach(ee=>{const L=Ae.get(ee);L&&(L.frame=ke(ee,L,-1,!1),D.push(L.frame),Ae.delete(ee),ye.set(ee,L))}),Ae.forEach((ee,L)=>{ee.frame=ke(L,ee,-1,!1),D.push(ee.frame),ee.doHide(L,ee),Ae.delete(L),ye.set(L,ee)}),X.current=ye,Me(),[...D,...De]},[je,n,l,f,S,p,T,I]),ce=r.useCallbackRef((oe,ke)=>{const Ae=`${ke} ${m.length===1?d.TextUtils.capitalize(B.current?.get(m[0]).getContent().getType()):"Drawings"}`;ue.current&&(console.warn(`Transaction ${ue.current.getDescription()} is being replaced by ${Ae}`),ue.current.rollback(),ue.current=null),ue.current=C.beginCommit({description:Ae}),H.current.clear();for(let ye=0;ye<m.length;ye++){const De=m[ye],D=B.current?.get(De);D?H.current.set(De,{movable:D,startBounds:n.toViewBounds(D.getBounds())}):console.warn("invalid element",D)}},[C,n,m]),Se=o.useCallback(()=>{if(!ue.current)return;const oe=[];H.current?.forEach(ke=>{oe.push(ke.movable)}),ue.current.commit({viewAfter:{view:a,movableSelection:oe}}),H.current.clear(),ue.current=null},[]),ie=o.useCallback(()=>{ue.current&&(ue.current.rollback(),ue.current=null)},[]),ve=o.useRef(null);o.useEffect(()=>{ve.current&&(ve.current.onscroll=oe=>{oe.preventDefault(),oe.srcElement.scrollTop=0,oe.srcElement.scrollLeft=0})},[ve.current]);const xe=r.useImperativeElement(t,()=>({isMovableArea:()=>!0,focusMovable:le,focus:()=>{le()}}),[a]),[Re,b]=o.useState(null),Fe=o.useRef(!1),Ze=o.useRef(!1),ze=o.useRef(!1);o.useEffect(()=>{if(f||m.length===0||ze.current||Fe.current)return;if(Ze.current)return void requestAnimationFrame(()=>{we.current&&U.current&&we.current.refTargets.length>0&&(ze.current=!0,Ke.current?.(!0)),q([...m])});Fe.current=!0;const oe=o.lazy(async()=>{try{const ke=await Promise.resolve().then(()=>require("./BOiKu7fplmXOBUig.cjs"));return Fe.current=!1,Ze.current=!0,q([...m]),ke}catch(ke){return console.warn(ke),Ke.current?.(!1),null}});b(oe)},[m,f,S,p]);const et=o.useMemo(()=>!Re||f?null:c.jsx(o.Suspense,{children:c.jsx(Re,{className:yt({dragging:T||I,resizing:T,moving:I}),container:null,ref:we,target:we.current?m:[],draggable:!f&&!S,resizable:!f&&!p,individualGroupable:!0,edgeDraggable:!1,throttleDrag:2,throttleResize:2,origin:!1,keepRatio:!1,renderDirections:x,onResizeStart:oe=>{ce(oe.target,"Resize")},onResize:oe=>{if(!ue.current)return oe.stopDrag(),void Te();$(!0);const ke=oe.direction[0]!==0&&oe.direction[1]!==0;let Ae=0,ye=0;for(let De=0;De<m.length;De++){const D=m[De],ee=H.current.get(D),L=B.current.get(D);if(!ee||!L){console.warn("invalid element");continue}let G=oe.dist[0],u=oe.dist[1],w=oe.drag.dist[0],F=oe.drag.dist[1],v=ee.startBounds.width,z=ee.startBounds.height;De===0?(Ae=v,ye=z):(G*=v/Ae,w*=v/Ae,u*=z/ye,F*=z/ye);const y={...ee.startBounds};if(y.width=Math.max(0,v+G),y.height=Math.max(0,z+u),oe.direction[0]===-1&&(y.width=Math.max(0,Math.min(ee.startBounds.x+v,v-w))),oe.direction[1]===-1&&(y.height=Math.max(0,Math.min(ee.startBounds.y+z,z-F))),ke&&(L.isLockAspectRatio()||oe.inputEvent?.shiftKey)){const V=v/z,_=y.width/y.height;_>V?y.height=y.width/V:_<V&&(y.width=y.height*V)}oe.direction[0]===-1&&(y.x=Math.max(0,Math.min(ee.startBounds.x+v,ee.startBounds.x+v-y.width))),oe.direction[1]===-1&&(y.y=Math.min(ee.startBounds.y+z,ee.startBounds.y+z-y.height)),ee.movable.setBounds(n.toAbsoluteBounds(y))}},onResizeEnd:oe=>{$(!1),Se()},onDragStart:oe=>{ce(oe.target,"Move")},onDrag:oe=>{if(!ue.current)return oe.stopDrag(),void Te();k(!0);for(let ke=0;ke<m.length;ke++){const Ae=m[ke],ye=H.current.get(Ae);ye?ye.movable.setBounds(n.toAbsoluteBounds({...ye.startBounds,x:ye.startBounds.x+oe.translate[0],y:ye.startBounds.y+oe.translate[1]})):console.warn("invalid element")}},onDragEnd:oe=>{},onMouseUp:oe=>{}})}),[je,Re,m,n,f,S,p,T,I]);return c.jsx("div",{className:yt(h,"movable-area",ei),style:{width:K.width,height:K.height,...E,position:"absolute",overflow:"hidden",willChange:"transform"},ref:Xt([xe,ve]),...N,children:c.jsx("div",{className:"movable-scroll",style:{position:"absolute",cursor:"initial",left:0,top:0,width:K.width,height:K.height},...N,children:c.jsxs("div",{ref:U,style:{position:"absolute",pointerEvents:"auto"},onFocus:oe=>{O?.(),Le(!0)},onBlur:oe=>{Le(!1)},onKeyDownCapture:oe=>{if(oe.isDefaultPrevented())return;const ke=oe.nativeEvent.ctrlKey,Ae=oe.nativeEvent.altKey,ye=oe.nativeEvent.shiftKey;if(oe.which===r.KeyCodes.Escape){const G=a.getMovableSelection();let u=[...G];return m.forEach(w=>{if(u.length===0)return;const F=B.current.get(w);let v=u.indexOf(F);u.splice(v,1)}),u.length!==G.length&&a.selectMovables(u),u.length===0&&R?.(),void oe.preventDefault()}const De=.1,D=G=>{i.updateSelected(u=>{u.setRotation(u.getRotation()+G)},"Rotate")},ee=(G,u=!0)=>{i.updateSelected(w=>{const F=w.getBounds();let v=1+G;u||(v=1/v);const z=Math.sqrt(Math.pow(F.width,2)+Math.pow(F.height,2)),y=Math.atan2(F.height,F.width),V=v*z;if(V<10)return;const _=V*Math.cos(y),Q=V*Math.sin(y),se={x:F.x+(F.width-_)/2,y:F.y+(F.height-Q)/2,width:_,height:Q};w.setBounds(se)},"Resize")},L=G=>{i.updateSelected(u=>{const w=u.getBounds(),F={x:w.x+(G.x??0),y:w.y+(G.y??0),width:w.width+(G.width??0),height:w.height+(G.height??0)};u.setBounds(F)},"Nudge")};if(oe.which===r.KeyCodes.Delete)i.updateSelected(G=>{G.delete()},"Delete"),oe.preventDefault();else if(oe.key==="a"&&ke){const G=a.getMovableSelection();a.selectMovables(i.getItems(),!0),a.selectMovables(G,!0),oe.preventDefault()}else oe.key==="ArrowLeft"?(ye?ee(De,!1):Ae?D(-10):L({x:ke?-10:-1}),oe.preventDefault()):oe.key==="ArrowRight"?(ye?ee(De,!0):Ae?D(10):L({x:ke?10:1}),oe.preventDefault()):oe.key==="ArrowUp"?(ye?ee(De,!0):L({y:ke?-10:-1}),oe.preventDefault()):oe.key==="ArrowDown"&&(ye?ee(De,!1):L({y:ke?10:1}),oe.preventDefault())},children:[fe,et]})})})})),Wt=e=>{let t=Number.MAX_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER,i=0,a=0;for(let l=0;l<e.length;l++){const C=e[l].getBounds();t=Math.min(C.x,t),n=Math.min(C.y,n),i=Math.max(C.x+C.width,i),a=Math.max(C.y+C.height,a)}return{x:t,y:n,width:i-t,height:a-n}},_o=(e,t=!0)=>{const n=[],i=t?"x":"y",a=t?"y":"x",l=t?"width":"height";let C=0,g=Number.MAX_SAFE_INTEGER,s=0;for(let p=0;p<e.length;p++){const h=e[p],E=h.getBounds();C+=E[l],g=Math.min(E[i],g),s=Math.max(E[i]+E[l],s),n.push({bounds:E,movable:h})}const f=(s-g-C)/(e.length-1);n.sort((p,h)=>{const E=p.bounds[i],x=h.bounds[i];return E!==x?E-x:p.bounds[a]-h.bounds[a]});const S=new Map;S.set(n[0].movable,n[0].bounds);for(let p=1;p<n.length-1;p++){const h=n[p-1].bounds,E={...n[p].bounds};E[i]=h[i]+h[l]+f,n[p].bounds=E,S.set(n[p].movable,E)}return S.set(n[n.length-1].movable,n[n.length-1].bounds),S};function Er(e){const{movables:t,movablesView:n,transactional:i,commands:a,target:l,onRepeatCommandChange:C}=e,g=r.useNotifier(),s=r.useEditMode();o.useRef(s.getMode()).current=s.getMode();const f=r.useCallbackRef(async(R,O,m=null,q=!0)=>{const T=async()=>{const $=await Promise.resolve(g?.showBusy?.(R.label()));try{await O();const I=m??R?.label?.();if(C){let k=null;R&&I!==!1&&(k=new r.SimpleCommand(R.key(),l,{label:I,description:I},T)),C(k)}$?.(),q&&s.setMode(null)}catch(I){$?.(),g?.showError?.(I)}};await T()},[C,g]),[S,p]=o.useReducer(R=>R+1,0),h=r.useCallbackRef((R,O,m)=>{if(!n)return;const q=n.getMovableSelection();if(q.length===0)return;let T="Drawings";if(q.length===1){const I=q[0];T=d.TextUtils.capitalize(I.getContent().getType())??"Drawing"}const $=`${R.label()} ${T}`;f(R,()=>{let I=null;i&&(I=i.beginCommit($));const k=n.getMovableSelection();if(k.length===0)return;const Z=m?.(k);for(let X=0;X<k.length;X++){const B=k[X];O(B,Z)}I?.commit()})},[n,i]),[E,x]=o.useState(n.getMovableSelection()[0]??null),[A,N]=o.useState(!E||E?.isProtected()),K=o.useMemo(()=>[new r.Command("moveToFront",l,{label:"Bring to Front",description:"Move to the front of all of the other drawings.",shortcut:{key:"BracketRight",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){h(this,R=>{R.moveToFront()})}),new r.Command("moveForward",l,{label:"Bring Forward",description:"Move forward one layer in the z order.",shortcut:{key:"BracketRight",modifiers:[r.KeyModifiers.Ctrl]}},function(){h(this,R=>{R.moveForward()})}),new r.Command("moveToBack",l,{label:"Send to Back",description:"Move to the back of all of the other drawings.",shortcut:{key:"BracketLeft",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){h(this,R=>{R.moveToBack()})}),new r.Command("moveBackward",l,{label:"Send Backward",description:"Move backwards one layer in the z order.",shortcut:{key:"BracketLeft",modifiers:[r.KeyModifiers.Ctrl]}},function(){h(this,R=>{R.moveBackward()})}),new r.Command("toggleLockAspectRatio",l,{label:"Lock Aspect Ratio",description:"Toggle whether the aspect ratio should be maintained when resizing from corners."},function(){h(this,R=>{R.setLockAspectRatio(!R.isLockAspectRatio())})}),new r.Command("formatAnchorTypeTwoCell",l,{label:"Move and size with cells",description:"Set your drawing to move and resize when underling sheet resizes."},function(){h(this,R=>{R.setAnchorType(d.IAnchored.Type.TwoCell)})}),new r.Command("formatAnchorTypeOneCell",l,{label:"Move but don't size with cells",description:"Set your drawing to only move when underling sheet resizes."},function(){h(this,R=>{R.setAnchorType(d.IAnchored.Type.OneCell)})}),new r.Command("formatAnchorTypeAbsolute",l,{label:"Don't move or size with cells",description:"Set your drawing to never move or resize when underling sheet resizes."},function(){h(this,R=>{R.setAnchorType(d.IAnchored.Type.Absolute)})}),new r.Command("formatDrawAlignLeft",l,{label:"Align Left",description:"Align the selected drawings to the left."},function(){h(this,(R,O)=>{R.setBounds({x:O.x})},Wt)}),new r.Command("formatDrawAlignCenter",l,{label:"Align Center",description:"Align the selected drawings vertically relative to each other."},function(){h(this,(R,O)=>{R.setBounds({x:(O.width-R.getBounds().width)/2+O.x})},Wt)}),new r.Command("formatDrawAlignRight",l,{label:"Align Right",description:"Align the selected drawings to the right."},function(){h(this,(R,O)=>{R.setBounds({x:O.width-R.getBounds().width+O.x})},Wt)}),new r.Command("formatDrawAlignTop",l,{label:"Align Top",description:"Align the selected drawings to the top."},function(){h(this,(R,O)=>{R.setBounds({y:O.y})},Wt)}),new r.Command("formatDrawAlignMiddle",l,{label:"Align Middle",description:"Align the selected drawings horizontally relative to each other."},function(){h(this,(R,O)=>{R.setBounds({y:(O.height-R.getBounds().height)/2+O.y})},Wt)}),new r.Command("formatDrawAlignBottom",l,{label:"Align Bottom",description:"Align the selected drawings to the bottom."},function(){h(this,(R,O)=>{R.setBounds({y:O.height-R.getBounds().height+O.y})},Wt)}),new r.Command("formatDrawDistributeHorz",l,{label:"Distribute Horizontally",description:"Distribute the selected drawings horizontally with equal spacing between each."},function(){h(this,(R,O)=>{R.setBounds(O.get(R))},R=>_o(R))}),new r.Command("formatDrawDistributeVert",l,{label:"Distribute Vertically",description:"Distribute the selected drawings vertically with equal spacing between each."},function(){h(this,(R,O)=>{R.setBounds(O.get(R))},R=>_o(R,!1))}),new r.Command("formatDrawFlipHorz",l,{label:"Flip Horizontally",description:"Flip the selected drawings horizontally."}),new r.Command("formatDrawFlipVert",l,{label:"Flip Vertically",description:"Flip the selected drawings vertically."}),new r.Command("formatDrawGroup",l,{label:"Group",description:"Group the selected drawings into a single drawing."}),new r.Command("formatDrawUngroup",l,{label:"Ungroup",description:"Break the group of a drawing into individual drawings."}),new r.Command("formatDrawSwapShapes",l,{label:"Swap Shapes",description:"Swap the positions of the swap."}),new r.Command("formatDrawSwapShapesHorz",l,{label:"Swap Shapes Horizontally",description:"Swap the positions of the swap horizontally."}),new r.Command("formatDrawSwapShapesVert",l,{label:"Swap Shapes Vertically",description:"Swap the positions of the swap vertically."})],[n,E]);o.useEffect(()=>{},[s]);const P=o.useMemo(()=>{let R=null;return R=a?a.createChildGroup(l,"movable",!1):new r.CommandGroup(l,"movable"),R.addCommands(K,!0),R},[a,K]);return Qe(E,{onAnyChange:()=>{P.getCommand("formatAnchorTypeTwoCell").update({state:E?.getAnchorType()===d.IAnchored.Type.TwoCell}),P.getCommand("formatAnchorTypeOneCell").update({state:E?.getAnchorType()===d.IAnchored.Type.OneCell}),P.getCommand("formatAnchorTypeAbsolute").update({state:E?.getAnchorType()===d.IAnchored.Type.Absolute}),P.getCommand("formatAnchorTypeAbsolute").update({state:E?.getAnchorType()===d.IAnchored.Type.Absolute}),P.getCommand("toggleLockAspectRatio").update({state:E?.isLockAspectRatio()})},onProtectedChange:R=>{N(R.isProtected())},onDelete:()=>{}}),Qe(n,{onMovableSelectionChange:()=>{const R=n.getMovableSelection()[0]??null;x(R),N(!R||R.isProtected()),p()}}),Qe(t,{onCollectionChange:()=>{p()}}),o.useEffect(()=>{const R={disabled:A};P.getCommand("formatAnchorTypeTwoCell").update(R),P.getCommand("formatAnchorTypeOneCell").update(R),P.getCommand("formatAnchorTypeAbsolute").update(R),P.getCommand("toggleLockAspectRatio").update(R);const O=t.getCount(),m=n.getMovableSelection(),q=A||O<=1||m.length===0;let T={disabled:q},$=T;if(!q&&m.length===1){const Z=m[0];Z.getZIndex()===0&&(T={disabled:!0}),Z.getZIndex()===O-1&&($={disabled:!0})}P.getCommand("moveToFront").update($),P.getCommand("moveForward").update($),P.getCommand("moveToBack").update(T),P.getCommand("moveBackward").update(T);const I={disabled:A||m.length<=1};P.getCommand("formatDrawAlignLeft").update(I),P.getCommand("formatDrawAlignCenter").update(I),P.getCommand("formatDrawAlignRight").update(I),P.getCommand("formatDrawAlignTop").update(I),P.getCommand("formatDrawAlignMiddle").update(I),P.getCommand("formatDrawAlignBottom").update(I),P.getCommand("formatDrawFlipHorz").update(I),P.getCommand("formatDrawFlipVert").update(I),P.getCommand("formatDrawGroup").update(I),P.getCommand("formatDrawUngroup").update(I),P.getCommand("formatDrawSwapShapes").update(I),P.getCommand("formatDrawSwapShapesHorz").update(I),P.getCommand("formatDrawSwapShapesVert").update(I);const k={disabled:A||m.length<=2};P.getCommand("formatDrawDistributeHorz").update(k),P.getCommand("formatDrawDistributeVert").update(k)},[S,A,S]),P}const ti=o.memo(o.forwardRef((e,t)=>{const{children:n,disabled:i,description:a,view:l,isDragging:C,onHide:g,onShow:s,...f}=e;o.useEffect(()=>{},[a]);const S=r.useImperativeElement(t,()=>({isEmptyFrame:()=>!0}),[]),[p,{height:h,width:E}]=Ot();return c.jsx("div",{...f,ref:Xt([S,p]),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:l.getZoom(),display:"flex",position:"relative",filter:i?"blur(1px)":void 0,boxShadow:C?"1px 1px 2px var(--sxl-app-color-shadow, rgba(0,0,0,.15))":void 0},children:c.jsx("div",{style:{textAlign:"center"},children:a})})})})),ni=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:i,movableProps:a,renderMovable:l,commands:C,target:g,onRepeatCommandChange:s}=e,f=Er({movables:i.getMovables(),movablesView:i?.getView(),transactional:i,onRepeatCommandChange:s,commands:C,target:g});o.useEffect(()=>{n?.getStage()},[n?.getStage()]);const S=o.useMemo(()=>c.jsx(Ir,{ref:t,view:n,movables:i.getMovables(),disableResize:!i.getProtection().isObjectsAllowed(),disableDrag:!i.getProtection().isObjectsAllowed(),movablesView:i.getView(),transactional:i,renderMovable:l,...a,onFocus:()=>{f.activate(),a?.onFocus?.()}},"movable-area"),[i,a,C,f]);return S&&n?S:null})),oi=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:i,gridStyle:a,getCellEditor:l,showProtectedError:C,setEditingCoords:g,commands:s}=e,f=r.useEditMode(),[S,p]=o.useState(null),[h,E]=o.useState(null),[x,A]=o.useState(null),[N,K]=o.useState(null),[P,R]=o.useState(null);o.useLayoutEffect(()=>{if(x===null)return K(null),void R(null);const M=()=>{const U=i.getRange(x).getCell(),ue=U.getStyle();let we,je=ue.getFill()?.toCSS(a.body.darkMode);je.background!=="none"&&je.background!=="transparent"||(je=i.getStyles().getNormal().getFill().toCSS(a.body.darkMode)),je.background!=="none"&&je.background!=="transparent"||(je={background:a.body.fill}),K({style:je}),U&&!U.getFormula()&&(we=U?.getRenderHorizontalAlignment()),R(we??r.HorizontalAlignment.Left)};return M(),i.getRange(x).addListener(()=>{M()})},[i,x,a?.body]);const O=r.useCallbackRef(()=>{let M=h.editState.dirty??"";if(h.editState.dirty!==void 0){const U=d.TextUtils.clampString(M);try{const ue=h.sheet.getRange(h.coords),we=`Typing '${U}' into ${ue.toString()}`;return ue.setValue(M,{description:we,autoFit:!0}),A(null),E(null),f.setMode(null),g(null),!0}catch(ue){throw me.Notifier.error(new Error(`Unable to enter '${U}'.`,{cause:ue})),ue}}},[i,h]),m=r.useCallbackRef(M=>i.getRange(M).getCell().getExtrusions()??me.CoordUtils.cellToRange(M),[i]),q=r.useCallbackRef(M=>{let U=d.IRange.Orientation.Row,ue=!1;M!==d.IRange.Direction.Up&&M!==d.IRange.Direction.Down||(U=d.IRange.Orientation.Column),M!==d.IRange.Direction.Left&&M!==d.IRange.Direction.Up||(ue=!0),i.getSelection().traverse(U,ue)},[i]),T=o.useCallback((M,U)=>{if(l)return l(M,U);if(!i)return null;const{ref:ue,...we}=M;return c.jsx(wr,{ref:ue,...we,sheet:i,bodyStyle:a?.body,activeCoords:U,commands:s,onChangeEdit:je=>{const Te={sheet:i,coords:U,editState:je};f.setMode(ae=>({...ae,description:Te.editState.editMode?"Edit":"Enter",args:{...ae?.args,stateAndCoords:Te}}))},editState:h.editState})},[i,N,l,h,x]),{overlay:$,startEdit:I,submitEdit:k,cancelEdit:Z,onKeyboardEventNative:X,onPointerEventNative:B}=dt.useKeyboardEditorOverlay({view:n,activeCoords:S,getCellEditor:T,canEdit:()=>{const M=i.getProtection();if(M.isReadOnly())return!1;const U=M.isLocked();return U&&C(),!U},onBeforeStartEdit:M=>{const U=xr(()=>i.getRange(M).getCell()),ue={sheet:i,coords:M,editState:Object.freeze(U)};f.setMode({key:"edit",args:{stateAndCoords:ue}}),E(ue)},onStartEdit:M=>{A(M),g(M)},onSubmitEdit:O,onCancelEdit:M=>{A(null),E(null),f.setMode(null),g(null)},onDoneEdit:M=>{f.setMode(null)},onNavigate:q,containerProps:N,borderStrokeFill:a.selection?.strokeFill,borderStrokeWidth:i?.getSelection().getCoords().ranges?.length>1?1:2,alignment:P,getRangeCoords:m});Qe(i.getSelection(),{onChange(M){p(i.getSelection().getCoords().cell)}});const j=r.useCallbackRef(M=>{B(M),x&&k()},[B,Z,x]),H=o.useCallback(M=>{B(M)},[B]),J=o.useCallback(M=>{X(M)},[X]);return o.useEffect(()=>{const M=n?.getStage();if(M)return M.addEventListener("pointerdown",j),M.addEventListener("dblclick",H),M.addEventListener("keydown",J),()=>{M.removeEventListener("pointerdown",j),M.removeEventListener("dblclick",H),M.removeEventListener("keydown",J)}},[n?.getStage()]),o.useEffect(()=>{const M=f.getMode(),U=M?.key;U==="edit"||U==="enter"?h?M.args?.cancel?Z():M.args?.submit?k():E(M.args?.stateAndCoords):I(M.args?.start):x&&Z()},[f]),$(n,t)})),Fr="white",Ar="black",ri=`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='${Ar}' fill='${Fr}'/%3E%3C/g%3E%3C/svg%3E%0A") 15 8, pointer`,li=`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='${Ar}' fill='${Fr}'/%3E%3C/g%3E%3C/svg%3E%0A") 12 12, pointer`,ii=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:i}=e,[a,l]=o.useState(i.getTables().getCount()>0),[C,g]=o.useState(null),[s,f]=o.useState(null),[S,p]=o.useState(null),[h,E]=o.useState(null),x=r.useCallbackRef(()=>{if(i.getTables().getCount()>0){l(!0);const m=i.getTables().getItems({address:n.getVisibleRangeCoords()});g(m.length>0?m:null)}else l(!1),g(null)},[i,n]),A=r.useCallbackRef(m=>{m.preventDefault(),m.stopPropagation();const q=n.getCellCoordsFromClient(m.clientX,m.clientY),T=i.getTables().getItems({address:q});T.length===1&&T[0].select()},[n,i]),N=r.useCallbackRef(m=>{m.preventDefault(),m.stopPropagation();const q=n.getCellCoordsFromClient(m.clientX,m.clientY),T=i.getTables().getItems({address:q});if(T.length===1){const $=T[0].getRange().getCoords(),I={colStart:$.colStart,rowStart:q.rowIndex,colEnd:$.colEnd,rowEnd:q.rowIndex};i.getRange(I).select()}},[n,i]),K=r.useCallbackRef(()=>{if(!a)return;const m=i.getTables().getItems({address:n.getVisibleRangeCoords()});g(m.length>0?m:null)},[i,a,n]);Qe(i?.getSelection(),{onChange(m){f(i.getSelection().getCoords().cell)}}),Qe(S,{onAnyChange(m){x(),K()}}),Qe(h,{onAnyChange(m){K()}}),Qe(i,{onTablesChange(m){x(),K()},onInvalidated(m){x(),K()}});const P=o.useMemo(()=>me.CommonUtils.debounce(me.CommonUtils.throttle(K,300),300),[]);o.useEffect(()=>{P()},[n]),o.useEffect(()=>{let m=null;if(C)for(let q=0;q<C.length&&!m;q++){const T=C[q],$=T.getRange().getCoords();d.CoordUtils.isCellWithinRange(s,$)&&(m=T)}p(m)},[s,C]);const R=r.useCallbackRef(m=>{let q=null;if(C)for(let T=0;T<C.length;T++){const $=C[T],I=$.getRange().getCoords();let k=n.getRangeCoordsBounds(I);const Z=n.getRelativePointFromClient(m.clientX,m.clientY),X=Z.x,B=Z.y;if(X>=k.x&&X<=k.x+k.width&&B>=k.y&&B<=k.y+k.height){const j=n.getViewportSize();X<=0||B<=0||X>=j.width||B>=j.height||(q=$)}}E(q)},[n,C]);if(o.useEffect(()=>{const m=n?.getStage();if(m&&C)return m.addEventListener("mousemove",R),m.addEventListener("mouseleave",R),()=>{m.removeEventListener("mousemove",R),m.removeEventListener("mouseleave",R)}},[C,n?.getStage()]),!n||!C||C.length===0)return null;const O=[];for(let m=0;m<C.length;m++){const q=C[m];if(q.isClosed())continue;const T=q===h,$=q===S,I=q.getRange().getCoords(),k=n.getRangeCoordsBounds(I);let Z;if(T||$){const X=q.getStyle().getProperties(),B=X.headerRow?.fill?.background??X.wholeTable?.border?.top?.color?.toString();if(B&&i){const j=i.getStyles().parseColor(B);j&&(Z=j.toCSS())}Z||(Z="var(--sxl-app-color-shadow, rgba(0,0,0,.15))")}O.push(c.jsx("div",{style:{position:"absolute",left:k.x,top:k.y,width:Math.min(16,k.width),height:k.height,pointerEvents:"all",cursor:ri},onMouseDown:N},`table-select-row-${q.getName()}`)),O.push(c.jsx("div",{style:{position:"absolute",left:k.x,top:k.y,width:Math.min(16,k.width),height:Math.min(16,k.height),pointerEvents:"all",cursor:li},onMouseDown:A},`table-select-${q.getName()}`)),O.push(c.jsx(dt.Selection,{x:k.x,y:k.y,width:k.width,height:k.height,range:I,strokeWidth:$?.5:0,stroke:Z??"var(--sxl-app-color-grey, grey)",style:{willChange:"box-shadow",transition:"box-shadow 80ms ease-in-out",boxShadow:T?`${Z} 0px 0px 1px 1px`:void 0}},`table-outline-${q.getName()}`))}return O})),ai=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:i,animationTime:a=60}=e,[l,C]=o.useState(null),[g,s]=o.useState(null),f=o.useRef(null),S=r.useCallbackRef(()=>{const N=i.getSelectedCell(),K=N.getSpill()?.getCoords()??null;me.CoordUtils.isEqualRanges(K,l)||(s(K?{transition:l?"move":"in",bounds:n.getRangeCoordsBounds(K),coords:K}:{transition:"out",bounds:n.getRangeCoordsBounds(l),coords:l}),C(K))},[i,n,l]);o.useEffect(()=>(f.current&&(clearTimeout(f.current),f.current=null),g&&(f.current=setTimeout(()=>{s(null),f.current=null},a)),()=>{f.current&&(clearTimeout(f.current),f.current=null)}),[g,a]);const p=o.useMemo(()=>me.CommonUtils.debounce(me.CommonUtils.throttle(S,80),80),[]);if(Qe(i?.getSelection(),{onChange(N){p()}}),Qe(i,{onSpillsChange(N){S()},onInvalidated(N){S()}}),!n||!l&&!g)return null;const h=i.getRange(l).getValue()instanceof d.FormulaError.Spill,E=[];let x=g?.bounds??n.getRangeCoordsBounds(l);if(g&&!me.CommonUtils.isEqualBounds(g.bounds,n.getRangeCoordsBounds(g.coords))&&s(null),x=n.toClipBounds(x,-10),!x)return;const A="var(--sxl-app-color-primary-dark, rgba(0,0,0,.15))";return E.push(c.jsx(dt.Selection,{x:x.x,y:x.y,width:x.width,height:x.height,range:l,strokeWidth:1,stroke:A,style:{willChange:"transform, opacity, width, height, opacity, left, top",strokeDasharray:h?"6 3":void 0,opacity:g?.transition==="out"?0:1,transition:g?.transition?g.transition==="in"||g.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:`${A} 0px 0px 4px 0px`}},"spill-outline}")),E})),si={position:"absolute",top:0,left:0,bottom:0,right:0},Zo=(e,t)=>{const n={...e},i=t?.getNormal().getFont(),a=i?.toCSS(),l={text:{fontFamily:a?.fontFamily,fontSize:i?.getSize()}},C=n.body=me.CommonUtils.mergeContentful(e.body,l);return n.body=me.CommonUtils.mergeContentful({fill:"#fff",strokeFill:"#dad8d6",strokeWidth:.5,text:{fontWeight:"400",fontStyle:"normal",fill:"#040404"}},C),n.buttonSurface=me.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=me.CommonUtils.mergeContentful(n.body,{edgeStrokeFill:"rgb(171, 171, 171)",fill:"#f0f0f0",strokeShadow:void 0,edgeStrokeWidth:1},e.header),n.header=me.CommonUtils.mergeContentful(n.header,l),n.headerSelect=me.CommonUtils.mergeContentful(n.header,{fill:"rgba(16, 124, 65, 0.1)",text:{fill:n.headerSelection.strokeFill,fontWeight:"700"}},e.headerSelect),n.headerSelect=me.CommonUtils.mergeContentful(n.headerSelect,l),n.headerSelectAll=me.CommonUtils.mergeContentful(n.headerSelect,{},e.headerSelectAll),n.headerSelectAll=me.CommonUtils.mergeContentful(n.headerSelectAll,l),n},di={fireOnModelChange:!1},Xo={},Dr=o.memo(o.forwardRef((e,t)=>{const{sheet:n,gridStyle:i=Xo,headersStyle:a=Xo,onSheetContextMenu:l,showColumnHeaders:C,columnHeaderProps:g,showRowHeaders:s,rowHeaderProps:f,showScrollbars:S=!0,scrollPaneProps:p,onViewportChange:h,commands:E,onRepeatCommandChange:x,onMoveCell:A,overlays:N,renderMovable:K,viewportComponent:P,onElementLoad:R,getCellEditor:O,onFocus:m,onBlur:q,style:T=r.ReactUtils.EmptyCssProperties,onShowTooltip:$,onShowColumnTooltip:I,onShowRowTooltip:k,onCloseTooltip:Z,gridProps:X,cellRenderProps:B,...j}=e;if(o.useEffect(()=>{d.LicenseManager._validate(!0)},[]),!n)throw new Error("ISheet must be provided.");const[H,J]=o.useReducer(ne=>ne+1,0),[M,{width:U,height:ue}]=Ot(),we=r.useCallbackRef($,[$]),je=r.useCallbackRef(I,[I]),Te=r.useCallbackRef(k,[k]),ae=r.useCallbackRef(Z,[Z]),Me=o.useRef(!1);o.useLayoutEffect(()=>{Me.current=!0},[n]);const Ke=n?.getStyles(),Ee=o.useMemo(()=>Zo(i,Ke),[i,Ke]),Ue=o.useMemo(()=>Zo(a,Ke),[a,Ke]),{body:re={},buttonSurface:te={}}=Ee,{header:pe={},headerSelect:Le={},headerSelectAll:Y={}}=Ue,W=o.useRef(null),[le,fe]=o.useState(()=>n?.getView()),ce=(le?.getZoomScale()??100)/100,Se=o.useMemo(()=>({vertical:le.isShowColumnGridlines()&&ce>=.4,horizontal:le.isShowRowGridlines()&&ce>=.4}),[le?.isShowColumnGridlines(),le?.isShowRowGridlines(),ce]),ie=o.useMemo(()=>{if(le?.getGridLineColor())return{strokeDasharray:"1,1"}},[le?.getGridLineColor(),Ee]),ve=C??le?.isShowColumnHeaders(),xe=s??le?.isShowRowHeaders(),[Re,b]=o.useState({width:0,height:0}),Fe=o.useMemo(()=>{let ne=40,qe=20;const He=n?.getStyles().getNormal().getFont();if(Re.width>0&&Re.height>0){const Pe=He?.toCSS()?.fontFamily??Ee.header.text.fontFamily,Xe=He?.getSize()??Ee.header.text.fontSize,We=d.IFont.getSharedMeasurer()(""+Re.height,Math.ceil(Xe*d.IFont.getDeviceScale()),Pe);ne=We.width,qe=We.lineHeight}return{width:Math.round(ne+5),height:Math.round(qe+3)}},[Re,Ee?.header.text,n]),Ze=xe?ce*Fe.width:pe.edgeStrokeWidth,ze=ve?ce*Fe.height:pe.edgeStrokeWidth,et=Math.max(U,(n?.getColumnHeaders().getDefaultSize()??Fe.width)+Ze+1),oe=Math.max(ue,(n?.getRowHeaders().getDefaultSize()??Fe.height)+ze+1),ke=o.useRef(new Map),Ae=o.useRef(null),ye=()=>({getColOffset:ne=>n.getColumnHeaders().findOffset(ne),getColIndex:ne=>n.getColumnHeaders().findIndex(ne),getRowOffset:ne=>n.getRowHeaders().findOffset(ne),getRowIndex:ne=>n.getRowHeaders().findIndex(ne)}),[De,D]=o.useState(()=>ye()),[ee,L]=o.useState(!1),[G,u]=o.useState(null),w=!0,F=Ee.selection?.strokeFill,v=o.useCallback(()=>Mt.current,[]),[z,y]=o.useState(),V=r.useCallbackRef(ne=>{y(ne),n&&n.getView()&&n.getView().setTopLeft(ne?{left:ne.left,top:ne.top}:null),h?.(ne)},[n,h]),_=o.useRef(null);o.useEffect(()=>{if(!z||!n)return;const ne=n.getRangeAtBounds({x:z.left,y:z.top,width:z.width,height:z.height});_.current?.(),_.current=ne.addListener(()=>{const qe=ne.getCoords();W?.current?.invalidate(qe)})},[z,n]);const[Q,se]=o.useState(()=>n?.getView().getTopLeft()),de=r.useCallbackRef(ne=>{const qe=me.CoordUtils.cellToRange(ne);if(n.isClosed())return qe;const He=n.getRange(qe,{excludeHidden:!0}).getMerges();return He.length===0?qe:He[0]},[n]),ge=ne=>{if(!ne||ne.coords.colIndex===0&&ne.coords.rowIndex===0)return null;const qe={};return ne.coords.colIndex>0&&(qe[me.AnchorLocation.Left]={index:ne.coords.colIndex,scrollOffset:ne.topLeft.left}),ne.coords.rowIndex>0&&(qe[me.AnchorLocation.Top]={index:ne.coords.rowIndex,scrollOffset:ne.topLeft.top}),qe},[Ce,be]=o.useState(()=>ge(n.getView().getFreezePanes())),he=r.useEditMode(),Ie=o.useCallback(()=>W.current,[]),Be=r.useCallbackRef(ne=>{he.setMode(qe=>qe?.key==="edit"?{...qe,args:{...qe.args}}:{key:"edit",args:{stateAndCoords:null,start:ne}})},[]),Ne=r.useCallbackRef(()=>z,[z]),Ve=Mr({sheet:n,commands:E,target:Ie,onRepeatCommandChange:x,bodyStyle:re,onStartEdit:Be,getViewport:Ne}),[$e,_e]=o.useState(n.getSelection().isEntire()),[Oe,Ye]=o.useState(le?.getMovableSelection().length>0),at=G!==null||Oe,ht=null,[qt,Ge]=o.useState(!1);o.useEffect(()=>{Ge(!1)},[n.getProtection()]);const ot=r.useNotifier(),pt=r.useCallbackRef(()=>{qt||(Ge(!0),ot.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}))},[ot,qt]),wt=o.useMemo(()=>{const ne=he.getMode();return ne?.cursor?ne.cursor:null},[ht,he]),[vt,gt]=o.useState(null),it=o.useRef(!1),[Et,Bt]=o.useState([]),Qt=o.useRef(null),[Dt,en]=o.useState(me.TypesUtils.EmptyTopLeft),[It,xn]=o.useState(me.TypesUtils.EmptyTopLeft);o.useEffect(()=>{en({left:Q?.left,top:0})},[Q?.left]),o.useEffect(()=>{xn({left:0,top:Q?.top})},[Q?.top]),Qe(n?.getView(),{onFreezeSplitChange:()=>{be(ge(n.getView().getFreezePanes()))},onTopLeftChange:()=>{se(n.getView().getTopLeft())},onMovableSelectionChange:()=>{Ye(n.getView().getMovableSelection().length>0)}}),Qe(n?.getSelection(),{onChange:()=>{_e(n.getSelection().isEntire())}}),Qe(n,{onViewChange(){fe(n.getView()),D(ye())},onLayoutChange:()=>{const ne=n.getEntireRange();b({height:ne.getRowCount(),width:ne.getColumnCount()}),D(ye())},onStyleChange:()=>{zt()},onMovablesChange:()=>{},onInvalidated:()=>{zt()}}),Qe(n,{onRequestScrollIntoView:async(ne,qe)=>{if(!qe)return;const He={colIndex:qe?.coords.colStart,rowIndex:qe?.coords.rowStart};return await W.current?.scrollCellCoordsIntoView(He,qe?.scroll),!0},onRequestFocus:()=>me.CommonUtils.whenFocus(Mt.current)},di);const Ct=o.useRef(!1),Vt=o.useMemo(()=>{const ne=me.CommonUtils.debounce(Pe=>{requestAnimationFrame(()=>{it.current&&je?.(Pe)})},32),qe=(Pe,Xe)=>{it.current=!0,gt([We=>{if(!We.toClipBounds(We.getRangeCoordsBounds({rowStart:0,rowEnd:Re.height,colStart:Pe,colEnd:Pe})))return;const lt=We.getLayout(),rt=Math.max(0,lt.getColOffset(Pe)),nt=We.getBounds(),bt=Math.min(nt.x+nt.width,lt.getColOffset(Pe+1)),Tt=We.getAnchor();if(Xe!==null&&(Tt===me.AnchorLocation.Left||Tt===me.AnchorLocation.Center||Tt===me.AnchorLocation.Right)){const to=me.CommonUtils.roundAccurately(Xe*me.CommonUtils.getDPI(),0),kn=me.CommonUtils.roundAccurately(n?.getColumnWidthAsFontUnit(Xe/ce),2).toFixed(2),no="Width: "+(Xe?kn+" ("+to+" pixels)":"Hidden"),ln=Kt.current.getGridElement().getRelativePointFromClient(0,0),$t=0-ln.y,Mn=0-ln.y+ze,oo=ln.x-nt.x;ne({anchor:{x:rt-oo,y:$t,width:bt-rt,height:Mn-$t},display:no})}const Nt=[0,0,0,nt.height],Yn={style:{boxShadow:`0.5px 0px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:F}},Jn={x:rt-1,y:0,width:1,height:nt.height},Qn={style:{boxShadow:`-0.5px 0px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:F}},eo={x:bt-1,y:0,width:1,height:nt.height};return c.jsxs(o.Fragment,{children:[c.jsx(dt.SVGLine,{linePoints:Nt,bounds:Jn,...Yn}),c.jsx(dt.SVGLine,{linePoints:Nt,bounds:eo,...Qn})]},"resize-dividers")}])};let He=null;return{onResizeHeadersStart:(Pe,Xe,We)=>{He=n.beginCommit(We),Ct.current=!1,qe(Pe,Xe)},onResizeHeaders:(Pe,Xe,We)=>{Ct.current=!1,qe(Pe,Xe)},onResizeHeadersDown:(Pe,Xe)=>{Ct.current=!0,setTimeout(()=>{Ct.current&&qe(Pe,Xe)},360)},onResizeHeadersEnd:(Pe,Xe,We)=>{He?.commit({description:We}),He=null,Ct.current=!1,requestAnimationFrame(()=>ae?.()),it.current=!1,gt(null)},onResizeHeadersUp:Pe=>{Ct.current=!1,requestAnimationFrame(()=>ae?.()),it.current=!1,gt(null)},...g}},[n,g,ze,vt]),tn=o.useMemo(()=>{const ne=me.CommonUtils.debounce(Pe=>{requestAnimationFrame(()=>{it.current&&Te?.(Pe)})},32),qe=(Pe,Xe)=>{it.current=!0,gt([We=>{if(!We.toClipBounds(We.getRangeCoordsBounds({rowStart:Pe,rowEnd:Pe,colStart:0,colEnd:Re.width})))return;const lt=We.getLayout(),rt=Math.max(0,lt.getRowOffset(Pe)),nt=We.getBounds(),bt=Math.min(nt.y+nt.height,lt.getRowOffset(Pe+1)),Tt=We.getAnchor();if(Xe!==null&&(Tt===me.AnchorLocation.Top||Tt===me.AnchorLocation.Center||Tt===me.AnchorLocation.Bottom)){const to=Math.floor(10*me.CommonUtils.getDPI())/10,kn=me.CommonUtils.roundAccurately(Xe*to,0),no=me.CommonUtils.roundAccurately(kn/ce/(n?.getRowHeaders().getScaleFactor()*me.CommonUtils.getDPI()),2).toFixed(2),ln="Height: "+(Xe?no+" ("+kn+" pixels)":"Hidden"),$t=Ut.current.getGridElement().getRelativePointFromClient(0,0),Mn=0-$t.x,oo=0-$t.x+Ze,bl=$t.y-nt.y;ne({anchor:{x:Mn,y:rt-bl,width:oo-Mn,height:bt-rt},display:ln})}const Nt=[0,0,nt.width,0],Yn={style:{boxShadow:`0px 0.5px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:F}},Jn={x:0,y:rt-1,width:nt.width,height:1},Qn={style:{boxShadow:`0px -0.5px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:F}},eo={x:0,y:bt-1,width:nt.width,height:1};return c.jsxs(o.Fragment,{children:[c.jsx(dt.SVGLine,{linePoints:Nt,bounds:Jn,...Yn}),c.jsx(dt.SVGLine,{linePoints:Nt,bounds:eo,...Qn})]},"resize-dividers")}])};let He=null;return{onResizeHeadersStart:(Pe,Xe,We)=>{He=n.beginCommit(We),Ct.current=!1,qe(Pe,Xe)},onResizeHeaders:(Pe,Xe,We)=>{Ct.current=!1,qe(Pe,Xe)},onResizeHeadersDown:(Pe,Xe)=>{Ct.current=!0,setTimeout(()=>{Ct.current&&qe(Pe,Xe)},360)},onResizeHeadersEnd:(Pe,Xe,We)=>{He?.commit({description:We}),He=null,Ct.current=!1,requestAnimationFrame(()=>ae?.()),it.current=!1,gt(null)},onResizeHeadersUp:Pe=>{Ct.current=!1,requestAnimationFrame(()=>ae?.()),it.current=!1,gt(null)},...f}},[n,f,Ze]),Mt=r.useImperativeElement(t,()=>{const ne=He=>{n?.getView()&&n.getView().selectMovables([]),Ae.current=null,W?.current?.focus(He)},qe=async(He=null)=>{if(He||(He=n?.getView().getMovableSelection()[0]),!He)return!1;const Pe=He.getAnchorCoords();if(!Pe)return!1;const Xe=W.current?.getViewFromCellCoords({colIndex:Pe.colStart,rowIndex:Pe.rowStart});if(!Xe)return!1;const We=Xe.getAnchor();n?.getView().getMovableSelection().indexOf(He)===-1&&n?.getView().selectMovables([He]);let lt=ke.current?.get(We);return lt?.current?(await lt.current.focusMovable(He),!0):(Ae.current={movable:He,anchor:We},!0)};return{getGridElement:()=>W.current,getRowHeaderElement:()=>Ut.current,getColumnHeaderElement:()=>Kt.current,rowHeaderHeight:()=>ze,colHeaderWidth:()=>Ze,startEdit:Be,submitEdit:()=>{he.setMode(He=>He?.key!=="edit"?He:{key:"edit",args:{stateAndCoords:null,submit:!0}})},cancelEdit:()=>{he.setMode(He=>He?.key!=="edit"?He:{key:"edit",args:{stateAndCoords:null,cancel:!0}})},isEditing:G!==null,focus:He=>{n?.getView().getMovableSelection().length>0&&qe()||ne(He)},focusSheet:ne,focusMovable:qe,contains:He=>W?.current?.contains?.(He),invalidate:zt,isSheetElement:()=>!0,getSheet:()=>n}},[n]),zt=o.useCallback(ne=>{Me.current||(W?.current?.invalidate(ne),J?.())},[]);o.useEffect(()=>{zt()},[Ee]);const qn=$e?Y.edgeStrokeFill:pe.fill,tt=$e?Le.fill:typeof Ee.headerHover=="function"?Ee.headerHover(pe)?.fill:pe.fill,Sn=o.useMemo(()=>P?c.jsx("div",{className:yt("sheetxl-viewport-overlay",Dl),style:{width:"100%",height:"100%",boxSizing:"border-box",position:"absolute"},children:P}):c.jsx(c.Fragment,{}),[P]);let Pt=null;ve&&xe&&(Pt=c.jsxs("div",{tabIndex:-1,className:"top-left-corner",style:{padding:"2 2",position:"absolute",height:`${ze}px`,width:`${Ze}px`,zIndex:1,boxSizing:"border-box",cursor:"cell"},onMouseDown:ne=>{let qe=!ne.ctrlKey;Ve?.getCommand("selectAll")?.execute(!qe||ne.button!==0),ne.nativeEvent.which===r.MouseButtonCodes.Right?l?.({originalEvent:ne,clientX:ne.clientX,clientY:ne.clientY,rowIndex:-1,colIndex:-1}):W.current?.focus()},children:[c.jsx("div",{style:{height:ze-5+"px",width:ze-5+"px",clipPath:`path('M${ze-5} 0 L0 ${ze-5} L${ze-5} ${ze-5} L${ze-5} 0 Z')`,borderRight:`2px solid ${qn}`,borderBottom:`2px solid ${qn}`,background:`${tt}`,boxSizing:"border-box",position:"absolute",right:"2px",bottom:"2px"}}),c.jsx("div",{style:{position:"absolute",height:`${ze}px`,width:`${Ze}px`,boxSizing:"border-box",borderRight:`solid 1px ${pe.strokeFill}`,borderBottom:`solid 1px ${pe.strokeFill}`,right:"-1px",bottom:"-1px"}})]}));const nn=r.useCallbackRef(({_left:ne,_top:qe})=>{},[]),st=r.useCallbackRef(ne=>{if(!l)return;const qe=W.current.getViewFromClient(ne.clientX,ne.clientY)?.getCellCoordsFromClient(ne.clientX,ne.clientY);qe&&(l({originalEvent:ne,clientX:ne.clientX,clientY:ne.clientY,rowIndex:qe.rowIndex,colIndex:qe.colIndex}),ne.stopPropagation(),ne.preventDefault())},[l]),mt=r.useCallbackRef(ne=>{if(!(!ne.shiftKey&&(ne.ctrlKey||ne.metaKey)))return;const{deltaY:qe}=ne;return qe>0?Ve.getCommand("sheetZoomOut")?.execute():qe<0&&Ve.getCommand("sheetZoomIn")?.execute(),qe===0},[Ve]);o.useEffect(()=>{Bt(null),Qt.current=null,it.current=!1,gt(null);const ne=n?.getView().getTopLeft();nn(ne),W.current?.scrollTo(ne),se(ne),fe(n.getView()),be(ge(n.getView().getFreezePanes())),D(ye()),J()},[n?.getView()]);const on=r.useCallbackRef(ne=>{const qe=ne.getVisibleRangeCoords();if(!qe)return null;const He=[];return n.getRange(qe).forEach((Pe,Xe)=>{const We=Xe.getCoords(),lt=Xe.getCell();(rt=>{if(rt.isEmpty())return!1;const nt=rt.getSpans();if(nt.width>1||nt.height>1||rt.getStyle().hasVisibleStyling()||le.isShowFormulas()&&rt.getFormula()!==null)return!0;const bt=rt.getValue();return bt!==null&&!(!le.isShowZeros()&&bt===0&&rt.getType()===d.ScalarType.Number)})(lt)&&He.push({coords:We,value:lt,range:le.isShowFormulas()?null:lt.getExtrusions()})},{excludeHidden:!0,includeMergeOverflow:!0}),He},[n,le.isShowZeros(),le.isShowFormulas(),G]);o.useEffect(()=>{const ne=[];N&&ne.push(...N),vt&&ne.push(...vt),me.CommonUtils.isEqualArrays(ne,Qt.current)||(Qt.current=ne,Bt(ne))},[N,vt,Ee]);const rn=o.useMemo(()=>({style:{boxShadow:`0.5px 0.5px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:i?.body?.text?.fill??"black"}}),[Ee?.header?.edgeStrokeFill]),Ht=r.useCallbackRef(ne=>{ne.isDefaultPrevented()||ne.isPropagationStopped()||(Ae.current=null,n?.getView().getMovableSelection().length>0&&n.getView().selectMovables([]))},[n]),Wn=o.useMemo(()=>{const ne=he.getMode();return ne?.key==="cut"||ne?.key==="copy"},[he]),Gn=r.useCallbackRef(async ne=>{const qe=he.getMode();return ne.keyCode===r.KeyCodes.Escape&&qe?(ne.preventDefault(),void he.setMode(null)):ne.keyCode===r.KeyCodes.Enter&&Wn?(ne.preventDefault(),await Ve?.getCommand("paste")?.execute(),void he.setMode(null)):void Ve?.dispatchToFocusedCommand(ne)},[Ve,he]),Ut=o.useRef(null),Rn=o.useMemo(()=>c.jsx("div",{tabIndex:-1,style:{position:"relative",flex:"0",top:`${ze+1}px`,width:`${Ze+pe.edgeStrokeWidth}px`,minWidth:`${Ze+pe.edgeStrokeWidth}px`,borderRight:`solid ${pe.edgeStrokeWidth}px ${pe.edgeStrokeFill}`,height:`calc(100% - ${ze}px)`,boxSizing:"border-box",zIndex:"2"},children:c.jsx(Wo,{ref:Ut,sheetElement:Mt.current,gridRef:W,freezeStart:Ce?.[me.AnchorLocation.Top],oppositeSize:Ze,containerWidth:Ze,containerHeight:oe,sheetHeader:n.getRowHeaders(),gridStyle:Ue,verticalPadding:Math.max(0,Math.floor(n.getStyles().getNormal().getFont().getSize()/10)),scrollPoint:It,onSheetContextMenu:l,tabIndex:-1,style:{position:"relative",flex:"0",top:`${ze+1}px`,width:`${Ze+pe.edgeStrokeWidth}px`,minWidth:`${Ze+pe.edgeStrokeWidth}px`,borderRight:`solid ${pe.edgeStrokeWidth}px ${pe.edgeStrokeFill}`,height:`calc(100% - ${ze}px)`,boxSizing:"border-box",zIndex:"2",...tn?.style},...tn})}),[Ze,ze,oe,n,It,Ce?.[me.AnchorLocation.Top],Ee,w,l,pe.fill,f]),Kt=o.useRef(null),gl=o.useMemo(()=>c.jsx("div",{tabIndex:-1,style:{position:"relative",left:"0px",width:"100%",height:`${ze+pe.edgeStrokeWidth}px`,minHeight:`${ze+pe.edgeStrokeWidth}px`,borderBottom:`solid ${pe.edgeStrokeWidth}px ${pe.edgeStrokeFill}`,boxSizing:"border-box",zIndex:"1"},children:c.jsx(Wo,{ref:Kt,sheetElement:Mt.current,gridRef:W,freezeStart:Ce?.[me.AnchorLocation.Left],oppositeSize:ze,containerWidth:et,containerHeight:ze,sheetHeader:n.getColumnHeaders(),gridStyle:Ue,scrollPoint:Dt,onSheetContextMenu:l,...Vt,style:{...Vt?.style,position:"relative",left:"0px",width:"100%",height:`${ze+pe.edgeStrokeWidth}px`,minHeight:`${ze+pe.edgeStrokeWidth}px`,borderBottom:`solid ${pe.edgeStrokeWidth}px ${pe.edgeStrokeFill}`,boxSizing:"border-box",zIndex:"1"}})}),[ze,et,n,Dt,Ce?.[me.AnchorLocation.Left],Ee,pe.fill,w,l,g]),hl=r.useCallbackRef(ne=>{const{value:qe,key:He,...Pe}=ne;let Xe=qe,We=G;if(!We||We.colIndex===ne.coords.colIndex&&We.rowIndex===ne.coords.rowIndex||(We=null),!Xe){const nt=ne.range;if(Xe=n.getRange({rowIndex:nt.rowStart,colIndex:nt.colStart}).getCell(),Xe.isEmpty())return null}let lt=null;Xe.getHyperlink()&&(lt=async nt=>{if(B?.onLinkMouseDown?.(nt),nt.button===0&&!nt.isDefaultPrevented()){nt.stopPropagation(),nt.preventDefault();try{await Xe.getHyperlink()?.open()}catch(bt){ot.showError?.(bt)}}}),We&&We.colIndex===ne.range.colStart&&We.rowIndex===ne.range.rowStart&&(Xe=Xe.createTemporaryCell({value:null}));const rt=n.getStyles();return o.createElement(yr,{...Pe,key:He,bodyStyle:re,docTheme:rt.getTheme(),normalStyle:rt.getNormal(),showFormulas:le.isShowFormulas(),showZeros:le.isShowZeros(),onLinkMouseDown:lt,...B,value:Xe})},[n,De,re,G,le?.isShowFormulas(),le.isShowZeros()]),ml=o.useCallback((ne,qe)=>{const{key:He,...Pe}=ne;return[c.jsx(Ll,{ref:qe,getVisibleCells:on,sheet:n,gridStyle:Ee,...Pe},`border-${He}`),c.jsx(ii,{ref:qe,sheet:n,commands:Ve,...Pe},`table-${He}`),c.jsx(ai,{ref:qe,sheet:n,...Pe},`spill-${He}`),c.jsx(Yl,{ref:qe,sheet:n,commands:Ve,onShowTooltip:we,onCloseTooltip:ae,gridStyle:Ee,gridRef:W,editingCoords:G,isActive:w,...Pe},`selection-${He}`),c.jsx(Kl,{ref:qe,sheet:n,commands:Ve,gridStyle:Ee,element:v,...Pe},`copy-paste-${He}`),c.jsx(ni,{ref:qe,sheet:n,commands:Ve,target:Ie,renderMovable:K,movableProps:{onUnFocus:()=>{Mt.current.focus()}},...Pe},`movable-${He}`),c.jsx(oi,{ref:qe,sheet:n,commands:Ve,gridStyle:Ee,getCellEditor:O,showProtectedError:pt,setEditingCoords:u,...Pe},`editor-${He}`)]},[n,W.current,Ee,O,Ve,ot]),[Eo,fl]=o.useState(!1),pl=o.useMemo(()=>{if(et===0||oe===0)return null;const ne=n.getStyles().getNormal(),qe=ne.getFont(),He=ne.getFill(),Pe=ne.getBorder(),Xe=ne.getFill().getType()===d.IFill.Type.None;let We=ie,lt=ie;const rt=(bt,Tt,Nt)=>Nt?{stroke:Pe.getBottom().isNone()?"none":bt.getColor().toRGBA(re.darkMode).toString(),...Tt}:Tt;lt=rt(Pe.getBottom(),lt,!Pe.getBottom().isNone()),lt=rt(Pe.getTop(),lt,!Pe.getTop().isNone()),We=rt(Pe.getRight(),We,!Pe.getRight().isNone()),We=rt(Pe.getLeft(),We,!Pe.getLeft().isNone());let nt=le?.getGridLineColor()?.toRGBA(re.darkMode).toString()??re.strokeFill;return Xe||(lt=rt(Pe.getBottom(),lt,!0),lt=rt(Pe.getTop(),lt,!0),We=rt(Pe.getRight(),We,!0),We=rt(Pe.getLeft(),We,!0)),c.jsx(dt.Grid,{className:"sheetxl-sheet-primary",style:{...si,...He.toCSS(re.darkMode),...qe.toCSS(re.darkMode,ce),"--sxl-app-color-background":re.fill,"--sxl-app-color-shadow":Ee.colorShadow,"--sxl-app-color-grey":Ee.colorGrey,"--sxl-app-color-button-fill":te.fill,"--sxl-app-color-button-text":te.text?.fill,"--sxl-app-color-button-border":te.edgeStrokeFill,"--sxl-app-color-primary-dark":Ee.selection.strokeFill},ref:W,zoom:ce,...X,onFirstRender:bt=>{fl(!0),X?.onFirstRender?.(bt),Ve?.activate()},showGridLines:Se,gridLineColor:nt,gridLineColumnsProps:We,gridLineRowsProps:lt,freezeLeft:Ce?.[me.AnchorLocation.Left],freezeLeftProps:rn,freezeTop:Ce?.[me.AnchorLocation.Top],freezeTopProps:rn,width:et,height:oe,columnCount:Re.width,rowCount:Re.height,cursor:wt??ht??"cell",clipCells:!0,layout:De,cellRenderer:hl,overlayRenderer:ml,getCellCoordsAsRangeCoords:de,getVisibleCells:on,onWheelScroll:mt,onPointerDown:Ht,onKeyDown:Gn,onViewportChange:V,onImmediateScroll:nn,scrollPoint:Q,stageProps:{onFocus:()=>{Ve?.activate()}},overlays:Et})},[H]);o.useEffect(()=>{Me.current||J()},[De,Ce,ce,Ve,Q?.left,Q?.top,re,X,et,oe,wt,Et,w,ht]);let _n={flex:"1 1 100%",display:"flex",alignContent:"stretch",position:"relative"};S||(_n={..._n,...T});const vl=o.useMemo(()=>{const ne=n.getStyles().getTheme(),qe=ne.getColorScheme(),He=ne.getFontScheme();return{"--sxl-doc-color-dk1":qe.getDk1().toCSS(re.darkMode),"--sxl-doc-color-dk2":qe.getDk2().toCSS(re.darkMode),"--sxl-doc-color-lt1":qe.getLt1().toCSS(re.darkMode),"--sxl-doc-color-lt2":qe.getLt2().toCSS(re.darkMode),"--sxl-doc-color-accent1":qe.getAccent1().toCSS(re.darkMode),"--sxl-doc-color-accent2":qe.getAccent2().toCSS(re.darkMode),"--sxl-doc-color-accent3":qe.getAccent3().toCSS(re.darkMode),"--sxl-doc-color-accent4":qe.getAccent4().toCSS(re.darkMode),"--sxl-doc-color-accent5":qe.getAccent5().toCSS(re.darkMode),"--sxl-doc-color-accent6":qe.getAccent6().toCSS(re.darkMode),"--sxl-doc-color-hlink":qe.getHlink().toCSS(re.darkMode),"--sxl-doc-color-fol-hlink":qe.getFolHlink().toCSS(re.darkMode),"--sxl-doc-font-major":He.getMajorFont(),"--sxl-doc-font-minor":He.getMinorFont()}},[n.getStyles().getTheme()]);let Zn=c.jsx("div",{style:_n,onTouchStart:()=>{Fo()},onFocus:ne=>{L(!0),m?.(ne)},onBlur:ne=>{L(!1),q?.(ne)},ref:Mt,...j,children:c.jsx("div",{className:yt("sheetxl-sheet",Al),style:{position:"absolute",width:"100%",height:"100%",boxSizing:"border-box",display:"flex",flexDirection:"column",flex:"1 1 100%",zIndex:"0",...vl},children:c.jsxs("div",{style:{display:"flex",flexDirection:"row",flex:"1 1 100%"},children:[Pt,Rn,c.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:"1 1 100%",overflow:"hidden",position:"relative"},children:[gl,c.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:"1 1 100%",position:"relative",borderRight:`solid ${pe.edgeStrokeWidth}px ${pe.edgeStrokeFill}`,backgroundColor:re.fill},ref:M,onContextMenu:st,children:[pl,Sn,c.jsx(zl,{style:{position:"absolute",right:24,bottom:4},colorLicensee:Ee?.selection?.strokeFill,colorCredits:Ee?.body?.text?.fill})]})]})]})})});if(S){const ne=qe=>c.jsx(wo,{...qe,sheet:n});Zn=c.jsx(r.ScrollPane,{style:{flex:"1 1 100%",overflow:"hidden",background:`${pe.fill}`,minHeight:2*Fe.height,minWidth:2*Fe.width,...T},viewport:z,touchElement:W.current?.stage,disableTouch:at,onScrollViewport:qe=>{W.current?.scrollTo(qe)},createHorizontalScrollbar:ne,createVerticalScrollbar:ne,...p,children:Zn})}o.useEffect(()=>{Me.current=!1,J?.(),ee&&Mt.current?.focus()},[n]);const[Xn,Cl]=o.useState(!1),Fo=r.useCallbackRef(()=>{Xn||Cl(!0)},[Xn]);return o.useEffect(()=>{if(Eo)return typeof R=="function"&&R(),r.ReactUtils.detectIt().primaryInput==="touch"&&Fo(),()=>{}},[R,Eo,Xn]),Zn}));Dr.displayName="SheetElement";const ci=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Yo="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=",zr=o.memo(o.forwardRef((e,t)=>{const{children:n,disabled:i,style:a,picture:l,description:C,isDragging:g,view:s,onHide:f,onShow:S,onKeyDownCapture:p,onFocus:h,onBlur:E,loadingPanel:x,...A}=e,[N,K]=o.useState(!1),[P,R]=o.useState(null),[O,m]=o.useState(null),[q,T]=o.useState(null);o.useEffect(()=>{m(null),l.getDetails().then(k=>{K(!1),m(k.asUrl()),k.asSVGText?.()&&T(k.asSVGText())}).catch(k=>{console.warn(k),K(!0),m(Yo),T(null)})},[l]);const $=r.useImperativeElement(t,()=>({isPictureEditor:()=>!0}),[]),I=o.useMemo(()=>{if(O||q)return c.jsx("img",{style:{flex:"1",width:"100%",height:"100%",border:N?"var(--sxl-app-color-grey, grey) solid 1px":void 0,backgroundColor:N?"var(--sxl-app-color-background, white)":void 0,boxShadow:N?"0px 0px 3px var(--sxl-app-color-error, red)":void 0,objectFit:N?"contain":void 0,opacity:P?1:0,filter:"var(--sxl-app-filter-dark-invert)"},draggable:!1,src:O,onLoad:()=>{R(!0)},onError:({currentTarget:k})=>{console.log("error"),k.onerror=null,m(Yo),K(!0)},alt:C??`${l.getType()}`})},[P,l,O,q,g]);if(!l.isClosed())return c.jsxs("div",{className:"picture-editor",style:{position:"relative",display:"flex",flex:"1 1 100%",filter:g?"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,...A,onKeyDownCapture:k=>{p?.(k)},ref:$,children:[P||N?void 0:x,I]})}));zr.displayName="PictureEditor";const ui=o.memo(o.forwardRef((e,t)=>{const{children:n,disabled:i,chart:a,view:l,isDragging:C,onHide:g,onShow:s,...f}=e;o.useEffect(()=>{},[a]);const S=r.useImperativeElement(t,()=>({isChartEditor:()=>!0}),[]),[p,{height:h,width:E}]=Ot();if(!a.isClosed())return c.jsx("div",{...f,ref:Xt([S,p]),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:l.getZoom(),display:"flex",position:"relative",border:"var(--sxl-app-color-grey, grey) solid 1px",filter:i?"blur(1px)":void 0,boxShadow:C?"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()})})})})),gi="_editable-input_1bqx6_6",hi=e=>c.jsx("input",{...e}),Nr=o.memo(o.forwardRef((e,t)=>{const{style:n={},className:i,value:a="",onSubmit:l,onChange:C,onCancel:g,createInput:s=hi,styleHover:f={},dragging:S,maxLength:p,disabled:h=!1,readOnly:E=!1,...x}=e,[A,N]=o.useState(!1),[K,P]=o.useState(!1),[R,O]=o.useState(a);o.useEffect(()=>{O(a)},[a]);const m=o.useRef(null),[q,T]=o.useState(null),$=r.useNotifier(),I=o.useCallback(function(J){const M=J.message;q!==M&&($?.showMessage?.(M,{type:r.NotifierType.Error}),T(M))},[$,q]),k=o.useCallback(J=>{let M=!1;try{M=l?.(J)??!0}catch(U){I(U)}return M?(m.current=null,P(!1),O(J),M):(setTimeout(()=>{m.current?.focus()},0),M)},[l]),Z=r.useCallbackRef(()=>{O(a),m.current=null,P(!1),g?.()},[g,a]),X=o.useMemo(()=>{if(!K)return null;const J={className:yt(gi),autoFocus:!0,spellCheck:!1,name:"editable-label",autoComplete:"off",maxLength:p,type:"text",value:R,onFocus:M=>{m.current||(m.current=M.target,setTimeout(()=>{M.target?.select()},0))},onBlur:M=>{m.current&&k(R)},onChange:M=>{K&&O(M.target.value)},onMouseDown:M=>M.stopPropagation(),onKeyDown:M=>M.code==="Escape"?(M.preventDefault(),void Z()):M.code==="Enter"?(M.preventDefault(),void k(M.target.value)):void(M.code!=="Tab"?M.stopPropagation():k(M.target.value))};return c.jsx(c.Fragment,{children:s(J)})},[K,R,k,Z,s,h]),[B,j]=o.useState();o.useLayoutEffect(()=>{let J=Object.assign({},n);(S||A)&&(J=Object.assign(J,f)),j(J)},[S,A,f,n]),o.useEffect(()=>{X&&C?.(R)},[X,C,R]);const H=r.useImperativeElement(t,()=>({startEdit(){h||E||P(!0)},cancel(){Z()}}),[]);return c.jsxs("div",{...x,ref:H,style:{flexDirection:"column",display:"flex",...B},className:yt(i),children:[c.jsxs("div",{style:{position:"relative",boxSizing:"content-box",whiteSpace:"pre",userSelect:"none",display:"flex",justifyContent:"center"},onDoubleClick:()=>{h||E||P(!0)},onMouseEnter:()=>N(!0),onMouseLeave:()=>N(!1),children:[c.jsx("div",{className:"editable-label-container",style:{textAlign:"center",display:"flex",minHeight:"1em",marginTop:"2px",opacity:K?0:1},children:R}),X]}),c.jsx("div",{style:{whiteSpace:"pre",position:"relative",maxHeight:"0px",height:"0px",visibility:"hidden",marginLeft:"1px",marginRight:"1px",overflow:"hidden",...f},children:R})]})})),Pn=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 xo(e){return"nodeType"in e}function ft(e){var t,n;return e?Yt(e)?e:xo(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function qo(e){const{Document:t}=ft(e);return e instanceof t}function bn(e){return!Yt(e)&&e instanceof ft(e).HTMLElement}function Lr(e){return e instanceof ft(e).SVGElement}function Zt(e){return e?Yt(e)?e.document:xo(e)?qo(e)?e:bn(e)||Lr(e)?e.ownerDocument:document:document:document}const Rt=Pn?o.useLayoutEffect:o.useEffect;function Hn(e){const t=o.useRef(e);return Rt(()=>{t.current=e}),o.useCallback(function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return t.current==null?void 0:t.current(...i)},[])}function pn(e,t){t===void 0&&(t=[e]);const n=o.useRef(e);return Rt(()=>{n.current!==e&&(n.current=e)},t),n}function un(e,t){const n=o.useRef();return o.useMemo(()=>{const i=e(n.current);return n.current=i,i},[...t])}function zn(e){const t=Hn(e),n=o.useRef(null),i=o.useCallback(a=>{a!==n.current&&t?.(a,n.current),n.current=a},[]);return[n,i]}function Nn(e){const t=o.useRef();return o.useEffect(()=>{t.current=e},[e]),t.current}let io={};function yn(e,t){return o.useMemo(()=>{if(t)return t;const n=io[e]==null?0:io[e]+1;return io[e]=n,e+"-"+n},[e,t])}function Or(e){return function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];return i.reduce((l,C)=>{const g=Object.entries(C);for(const[s,f]of g){const S=l[s];S!=null&&(l[s]=S+e*f)}return l},{...t})}}const _t=Or(1),vn=Or(-1);function Un(e){if(!e)return!1;const{KeyboardEvent:t}=ft(e.target);return t&&e instanceof t}function Ln(e){if((function(t){if(!t)return!1;const{TouchEvent:n}=ft(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 jt=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[jt.Translate.toString(e),jt.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:i}=e;return t+" "+n+"ms "+i}}}),Jo="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function mi(e){return e.matches(Jo)?e:e.querySelector(Jo)}const fi={display:"none"};function pi(e){let{id:t,value:n}=e;return o.createElement("div",{id:t,style:fi},n)}function vi(e){let{id:t,announcement:n,ariaLiveType:i="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":i,"aria-atomic":!0},n)}const jr=o.createContext(null),Ci={draggable:`
23
+ The content is not applied.`}),new r.Command("pasteFormulas",m,{label:"Paste Formulas",scopedLabels:{paste:"Formulas"},description:"Paste only the formulas of the selected cells. The values and formatting is not applied."}),new r.Command("pasteTranspose",m,{label:"Paste Transpose",scopedLabels:{paste:"Transpose"},description:"Paste with the rows and columns flipped."}),new r.Command("pasteLinks",m,{label:"Paste Links",scopedLabels:{paste:"Links"},description:"Paste as formula references to the original cells."})];i.addCommands(q,!0)},[i,e]),o.useEffect(()=>{if(!i)return;const m={disabled:!t.getProtection().isFormatCellsAllowed()};i.getCommand("pasteValues").updateCallback(q=>R.paste({...Bl,...q})).update(m),i.getCommand("pasteFormats").updateCallback((q,T)=>R.paste({...Vl,description:T.label(),...q})).update(m),i.getCommand("pasteFormulas").updateCallback((q,T)=>R.paste({...Pl,description:T.label(),...q})).update(m),i.getCommand("pasteTranspose").updateCallback((q,T)=>R.paste({...Hl,description:T.label(),...q})).update(m),i.getCommand("pasteLinks").updateCallback((q,T)=>R.paste({...Ul,description:T.label(),...q})).update(m),i.getCommand("cut").update(m),i.getCommand("paste").update(m)},[t,i]);const O=o.useMemo(()=>{if(!A||!E.current)return;const m=A.key;if(m!=="copy"&&m!=="cut"&&m!=="formatPainter")return;const q=E.current.getItem();if(q.getSource()!==t)return;const T=E.current.isCut?.(),$=T?S:f,I=T?s:g,k=q.getCoords(),Z=k?[k]:null;return Z&&Z.length!==0?X=>{const B=[];for(let j=0;j<Z.length;j++){const H=Z[j],J=X.toClipBounds(X.getRangeCoordsBounds(H,{top:0,left:0,right:1,bottom:1}),dt.SELECTION_CLIP_INSETS);J&&(B.push(h({range:H,key:`copy-selection-background-${j}`,x:J.x,y:J.y,width:Math.max(J.width,0),height:Math.max(J.height,0),stroke:$,strokeWidth:2})),B.push(h({range:H,key:`copy-selection-foreground-${j}`,x:J.x+(J.width<=2?-1:0),y:J.y,width:Math.max(J.width,3),height:Math.max(J.height,3),stroke:I,strokeWidth:2,isAnimatedStroke:!0})))}return B}:null},[A,t,n,g,f,s,S]);return{...R,clipboard:P,overlays:O}},Kl=o.memo(o.forwardRef((e,t)=>{const{view:n,element:i,sheet:a,gridStyle:l,commands:C}=e,g=l.body??{},s=a.getView(),{overlays:f}=Tr({element:i,sheet:a,sheetView:s,commands:C,copyForegroundColor:l.selection.strokeFill,copyBackgroundColor:g.fill,cutForegroundColor:l.selectionRemove.strokeFill,cutBackgroundColor:g.fill});return Qe(a?.getSelection(),{onChange(S){}}),o.useEffect(()=>{n?.getStage()},[n?.getStage()]),f&&n?f(n):null})),$l="_sheet-selection_12wyx_5",Wl={key:"dragCut",description:"Drag selection to move cell contents.",cursor:"move"},Gl={key:"dragCutInsert",description:"Drag selection to insert cell contents.",cursor:"copy"},_l={key:"dragCopy",description:"Drag selection to copy cell contents."},Zl={key:"dragCopyInsert",description:"Drag selection to insert copied cell contents.",cursor:"move"},Go=(e,t)=>t.ctrlKey&&t.shiftKey?Zl:t.ctrlKey?_l:t.shiftKey?Gl:Wl,Xl={key:"fill",description:"Drag selection to extend series or fill.",cursor:"crosshair"},Yl=o.memo(o.forwardRef((e,t)=>{const{view:n,commands:i,className:a,onFirstRender:l,onShowTooltip:C,onCloseTooltip:g,sheet:s,gridRef:f,gridStyle:S,isActive:p,editingCoords:h,...E}=e,x=n?.getBounds(),A=r.useCallbackRef(C,[C]),N=r.useCallbackRef(g,[g]),[K,P]=o.useState(()=>s?.getSelection().getCoords()),R=r.useCallbackRef(Y=>{me.CoordUtils.isEqualSelectionCoords(Y,K)||s&&s.getSelection().updateCoords(Y)},[s,K]),O=r.useEditMode(),m=o.useRef(null),[q,T]=o.useState(s?.getProtection().isLocked()),[$,I]=o.useState(s?.getView().getMovableSelection().length>0),k=r.ReactUtils.detectIt().primaryInput==="touch",Z=!k&&p,X=h!==null||$,B=r.useCallbackRef(Y=>{const W=me.CoordUtils.cellToRange(Y);if(s.isClosed())return W;const le=s.getRange(W,{excludeHidden:!0}).getMerges();return le.length===0?W:le[0]},[s]),j=r.useCallbackRef((Y,W,le,fe,ce,Se)=>{const ie=s.getSelectedRange().getExtended(fe,Y).getCoords();switch(fe){case d.IRange.Direction.Up:return ie.rowStart;case d.IRange.Direction.Down:return ie.rowEnd;case d.IRange.Direction.Left:return ie.colStart;case d.IRange.Direction.Right:return ie.colEnd}},[s]),H=r.useCallbackRef(()=>{const Y=s.getUsedRange()?.getCoords(),W=s.getRowHeaders().getUsedRange()?.getCoords(),le=s.getColumnHeaders().getUsedRange()?.getCoords();return{...Y,colEnd:Math.max(Y?.colEnd??0,le?.max??0),rowEnd:Math.max(Y?.rowEnd??0,W?.max??0)}},[s]),J=r.useCallbackRef((Y,W)=>s.getRowHeaders().hiddenHeadersAt(Y,W),[s]),M=r.useCallbackRef((Y,W)=>s.getColumnHeaders().hiddenHeadersAt(Y,W),[s]),U=r.useCallbackRef(Y=>s.getRange(Y,{excludeHidden:!0}).getMerges(),[s]),ue=r.useCallbackRef(Y=>{s?.getSelection().setAdjusting(Y)},[s]),we=r.useCallbackRef(async()=>{s?.getSelection().setAdjusting(null),O.getMode()?.key==="formatPainter"&&(await i?.getCommand("pasteFormats")?.execute({}),O.setMode(null))},[O,K,s,i]),je=o.useMemo(()=>{const Y=O.getMode();return Y?.key==="cut"||Y?.key==="copy"},[O]);Qe(s?.getView(),{onMovableSelectionChange:()=>{I(s.getView().getMovableSelection().length>0)}}),Qe(s?.getSelection(),{onChange(Y){const W=s.getSelection().getCoords();P(W)}}),Qe(s,{onProtectionChange:()=>{T(s.getProtection().isLocked())}});const{body:Te={}}=S||{},ae=r.useNotifier(),Me=n.getLayout(),Ke=!(Z&&K.ranges.length<=1&&h===null&&!q&&(!O.getMode()||je)),{cursor:Ee,overlay:Ue,onPointerDown:re}=dt.useSelection({gridRef:f,commands:i,layout:Me,getCellCoordsAsRangeCoords:B,selection:K,fillHandleBorderColor:Te.fill,selectionBackgroundColor:p?S.selection.fill:S.selectionInactive.fill,selectionBorderColor:p?S.selection.strokeFill:S.selectionInactive.strokeFill,selectionRemoveBackgroundColor:p?S.selectionRemove.fill:S.selectionInactive.fill,selectionRemoveBorderColor:p?S.selectionRemove.strokeFill:S.selectionInactive.strokeFill,disableFillDrag:Ke,disableMoveDrag:k||!(p&&K.ranges.length<=1&&h===null&&!q),disableTouchSelection:X,onSelectionChange:R,onSelectionDragStart:ue,onSelectionDragEnd:we,onMoveDragStart:(Y,W,le)=>{O.setMode(Go(0,le))},onMoveDragUpdate:(Y,W,le)=>{O.setMode(Go(0,le))},onMoveDragEnd:(Y,W)=>{O.setMode(null)},onMoveDragDone:async(Y,W,le)=>{if(me.CoordUtils.isEqualRanges(Y,W))return;const fe=s.getRange(W);if(ae?.showOptions){const xe=fe.getDifferences(Y);let Re=!1;const b=xe.getCount();for(let Fe=0;!Re&&Fe<b;Fe++)Re=xe.at(Fe).isContentful();if(Re&&await ae?.showOptions({title:"Confirm",description:"There is already data here. Do you want to replace it?",options:["Replace","Cancel"],defaultOption:"Replace"})!=="Replace")return}const ce=!le.ctrlKey,Se=le.shiftKey,ie=Se?ce?"Insert Moved Cells":"Insert Copied Cells":ce?"Move Cells":"Copy Cells",ve=await ae?.showBusy?.(ie);try{const xe=s.getRange(Y);await fe.doBatch(async()=>{Se?await fe.insertFrom(Y,{isCut:ce,undoRange:xe}):await fe.copyFrom(Y,{isCut:ce,undoRange:xe}),xe.autoFit({skipCustomSize:!0,orientations:d.IRange.Orientations.Row,minContent:!0}),fe.autoFit({skipCustomSize:!0,orientations:d.IRange.Orientations.Row,minContent:!0})},{description:ie,autoSelect:!0})}catch(xe){ae?.showError?.(xe)}finally{ve?.()}},contentfulCellFinder:j,hiddenRowsAt:J,hiddenColumnsAt:M,mergedRanges:U,getDataCoords:H,canSelectionSpanMergedCells:Y=>{const W=s.getRange(Y);return W.isEntireColumns()||W.isEntireRows()},onFill:async(Y,W)=>{const le="Auto Fill",fe=await ae?.showBusy?.(le);try{await s.doBatch(()=>{s.getRange(Y).autoFill(W),s.getRange(W).autoFit({orientations:d.IRange.Orientations.Row,skipCustomSize:!0,minContent:!0})},{description:le,autoSelect:!0})}catch(ce){ae?.showError?.(ce)}finally{m.current=null,fe?.()}},onFillPreview:(Y,W,le)=>{if(f.current&&A){O.setMode(Xl);try{m.current?.direction!==le&&(m.current=null,s.getRange(Y).autoFill(W,{previewOnly:b=>{m.current={callback:b,direction:le}}}));const fe=m.current?.callback?.(W);if(!fe||fe.isEmpty())return;const ce=fe.toText();if(!ce)return;const Se=me.CoordUtils.cellToRange(fe.getCoords()),ie=n.getRelativePointFromClient(0,0);let ve=0,xe=0,Re=r.ToolTipPlacement.Bottom;if(le===d.IRange.Direction.Down){ve=Me.getColOffset(Se.colEnd+1)-ie.x;const b=Me.getRowOffset(Se.rowEnd),Fe=Me.getRowOffset(Se.rowEnd+1);xe=Fe-(Fe-b)/2-ie.y,Re=r.ToolTipPlacement.Right}else if(le===d.IRange.Direction.Right){xe=Me.getRowOffset(Se.rowEnd+1)-ie.y;const b=Me.getColOffset(Se.colEnd),Fe=Me.getColOffset(Se.colEnd+1);ve=Fe-(Fe-b)/2-ie.x,Re=r.ToolTipPlacement.Bottom}else if(le===d.IRange.Direction.Up){ve=Me.getColOffset(Se.colEnd+1)-ie.x;const b=Me.getRowOffset(Se.rowStart),Fe=Me.getRowOffset(Se.rowStart+1);xe=Fe-(Fe-b)/2-ie.y,Re=r.ToolTipPlacement.Right}else if(le===d.IRange.Direction.Left){xe=Me.getRowOffset(Se.rowEnd+1)-ie.y;const b=Me.getColOffset(Se.colStart),Fe=Me.getColOffset(Se.colStart+1);ve=Fe-(Fe-b)/2-ie.x,Re=r.ToolTipPlacement.Bottom}A({anchor:{x:ve,y:xe},display:ce,placement:Re})}catch(fe){ae?.showError?.(fe)}}},onFillDone:()=>{m.current=null,O.setMode(null),N?.()}}),te=r.useCallbackRef(Y=>{re(r.ReactUtils.createSyntheticEvent(Y))},[re,h]);o.useEffect(()=>{const Y=n?.getStage();if(Y)return Y.addEventListener("pointerdown",te),()=>{Y.removeEventListener("pointerdown",te)}},[n?.getStage()]);const pe=r.useImperativeElement(t,()=>({}),[]),Le=o.useRef(null);return c.jsx("div",{className:yt(a,"sheet-selection",$l),style:{position:"absolute",width:x?.width,height:x?.height,overflow:"hidden",pointerEvents:"none",willChange:"none"},ref:Xt([pe,Le]),...E,children:Ue(n)})})),In=Object.freeze({x:0,y:0,width:0,height:0}),Jl={fireOnModelChange:!1},Ql=o.memo(o.forwardRef((e,t)=>{const{children:n,view:i,movable:a,onRefLoad:l,onRefUnload:C,onHide:g,onShow:s,onUnFocus:f,isDragging:S,updateFrameBounds:p,dragStart:h,style:E,disabled:x,renderMovable:A,...N}=e,[K,P]=o.useState(In),[R,O]=o.useState(null),[m,q]=o.useState(!1),T=o.useRef(null);o.useLayoutEffect(()=>{if(a.isClosed())return;const I=a.getBounds();if(!I)return;const k=i.toViewBounds(I);P(k??In),p(k??In)},[i?.getBounds()]),Qe(a,{onBoundsChange:I=>{const k=I.getBounds();if(!k)return;const Z=i.toViewBounds(k);P(Z??In),p(Z)},onSelectionChange:()=>{const I=me.CommonUtils.hasFocus(T.current,!0);!m&&!I||a.isSelected()||f()}}),Qe(a,{onRequestFocus:()=>me.CommonUtils.whenFocus(T.current,!0)},Jl),o.useEffect(()=>{const I=T.current;return l(I),()=>{C(I)}},[]);const $=o.useMemo(()=>{if(!K)return null;let{width:I,height:k}=K;return A({view:i,movable:a,disabled:x,isDragging:S,style:{position:"relative",left:0,top:0,width:I,height:k},onHide:g,onShow:s})},[i,a,K.width,K.height,x,S]);return c.jsx("div",{className:"movable",tabIndex:0,ref:Xt([T,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,...E},onMouseDown:async I=>{const k=I.shiftKey||I.ctrlKey,Z=a.isSelected(),X=I.currentTarget;k&&Z?a.unselect():(Z&&!k||await a.select({addToSelection:k}),h(I.nativeEvent,X),X.focus())},onFocus:I=>{I.relatedTarget&&!R&&O(I.relatedTarget),q(!0)},onBlur:I=>{R&&!T?.current?.contains(I.relatedTarget)&&O(null),I.relatedTarget&&q(!1)},...N,children:$})})),ei="_movable-area_314c6_5",Ir=o.memo(o.forwardRef((e,t)=>{const{view:n,movables:i,movablesView:a,renderMovable:l,transactional:C,onUnFocus:g,onFocus:s,disabled:f=!1,disableDrag:S=!1,disableResize:p=!1,className:h,style:E,renderDirections:x=["nw","n","ne","w","e","sw","s","se"],onFirstRender:A,...N}=e,K=n.getBounds(),P=r.useCallbackRef(A,[A]),R=r.useCallbackRef(g,[g]),O=r.useCallbackRef(s,[s]),[m,q]=o.useState([]),[T,$]=o.useState(!1),[I,k]=o.useState(!1),Z=o.useRef(!0),X=o.useRef(new Map),B=o.useRef(new Map),j=o.useRef(new Map),H=o.useRef(new Map),J=o.useRef(new Map),M=o.useRef({onRequestFocus:oe=>(le(oe),null)}),U=o.useRef(null),ue=o.useRef(null),we=o.useRef(null),[je,Te]=o.useReducer(oe=>oe+1,0);o.useLayoutEffect(()=>{Te()},[n,i]),Qe(i,{onCollectionChange:()=>{const oe=i.getItems({address:n.getVisibleRangeCoords(),excludeHidden:!0}),ke=J.current;ke.forEach(ye=>{ye()}),ke.clear();const Ae=M.current;for(let ye=0;ye<oe.length;ye++){const De=oe[ye];if(De.isClosed())continue;const D=De.addListeners(Ae);ke.set(De,D)}Te()},onInvalidated:()=>{Te()}}),Qe(a,{onMovableSelectionChange(oe){Me(),Te()}});const ae=o.useCallback((oe,ke)=>{const Ae=j.current.get(oe);we.current&&(we.current.getTargets().forEach(ye=>{if(ye===Ae)return ye.style.left=ke.x+"px",ye.style.top=ke.y+"px",ye.style.width=ke.width+"px",void(ye.style.height=ke.height+"px")}),we.current.updateRect())},[]),Me=()=>{const oe=[],ke=a.getMovableSelection();ke.forEach(Ae=>{const ye=j.current.get(Ae);ye&&ke.indexOf(Ae)!==-1&&oe.push(ye)}),q(Ae=>me.CommonUtils.isEqualArrays(Ae,oe)?Ae:oe)},Ke=o.useRef(null),Ee=o.useRef(null),Ue=o.useMemo(()=>(Ee.current||(Ee.current=new Promise(oe=>{Ke.current=oe})),Ee.current),[]),re=o.useRef(null),te=r.useCallbackRef(async(oe,ke)=>{re.current=ke,await(async()=>!(!await Ue.then()||!we.current))()&&re.current===ke&&we.current.dragStart(oe,ke)},[m]),[pe,Le]=o.useState(!1),Y=o.useRef(null),W=o.useRef(null),le=r.useCallbackRef(async(oe=null)=>{if(oe||(oe=a.getMovableSelection()[0]),!oe)return R?.(),!1;const ke=j.current.get(oe);ke?(await me.CommonUtils.whenFocus(ke),ke.focus(),W.current=ke,Y.current=null):Y.current=oe},[a]);o.useEffect(()=>{pe&&m.length>0&&W.current!==m[0]&&le(),Z.current&&(P?.(),Z.current=!1)},[m]);const fe=o.useMemo(()=>{const oe=i.getItems({address:n.getVisibleRangeCoords(),excludeHidden:!0});if(oe.length===0&&X.current.size===0)return null;const ke=(ee,L,G,u=!0)=>{const w=ee.isSelected(),F={tabIndex:G,view:n,movable:ee,onRefLoad:v=>{Y.current===ee&&(v.focus(),W.current=v,Y.current=null),j.current.set(ee,v),B.current.set(v,ee),L.rendered=!0,Me()},onRefUnload:v=>{j.current.delete(ee),B.current.delete(v),L.rendered=!1,Me()},onUnFocus:R,onHide:v=>{L.onHide=v},onShow:v=>{L.onShow=v},isDragging:w&&(I||T),disabled:f,renderMovable:l,updateFrameBounds:v=>{ae(ee,v)},dragStart:te,onMouseUp:()=>{if(re.current=null,ue.current){$(!1),k(!1);let v=!1;H.current?.forEach(z=>{me.CommonUtils.isEqualBounds(z.movable.getBounds(),z.startBounds)||(v=!0)}),v?Se():ie()}},style:{opacity:u?T&&w?.7:void 0:0,zIndex:T&&w?ee.getZIndex()+oe.length:void 0,pointerEvents:u?void 0:"none",cursor:I&&w?"grabbing":f||S?"initial":"move",boxShadow:!w||I&&!T?void 0:"1px 1px 2px 2px rgba(0,0,0,.15)"}};return c.jsx(Ql,{...F},`movable-${ee.getUUID()}`)},Ae=X.current,ye=new Map,De=[];for(let ee=0;ee<oe.length;ee++){const L=oe[ee];if(L.isClosed())continue;let G=Ae.get(L);G||(G={frame:null,shown:null,onShow:null,onHide:null,rendered:!1,doShow:(u,w)=>{if(!w||w.shown===!0)return;w.shown=!0;const F=++w.visibilityRequestId;requestAnimationFrame(()=>{const v=X.current.get(u);v&&F===w.visibilityRequestId&&(w.onShow?.(u),v.shown=!0)})},doHide:async(u,w)=>{if(!w||w?.shown===!1)return;w.shown=!1;const F=++w.visibilityRequestId,v=await Promise.resolve(w.onHide?.(u));F===w.visibilityRequestId&&v!==!1&&(w.shown=!1,X.current.delete(u),Te())},visibilityRequestId:0}),G.frame=ke(L,G,ee,!0),De.push(G.frame),G.doShow(L,G),Ae.delete(L),ye.set(L,G)}const D=[];return a.getMovableSelection().forEach(ee=>{const L=Ae.get(ee);L&&(L.frame=ke(ee,L,-1,!1),D.push(L.frame),Ae.delete(ee),ye.set(ee,L))}),Ae.forEach((ee,L)=>{ee.frame=ke(L,ee,-1,!1),D.push(ee.frame),ee.doHide(L,ee),Ae.delete(L),ye.set(L,ee)}),X.current=ye,Me(),[...D,...De]},[je,n,l,f,S,p,T,I]),ce=r.useCallbackRef((oe,ke)=>{const Ae=`${ke} ${m.length===1?d.TextUtils.capitalize(B.current?.get(m[0]).getContent().getType()):"Drawings"}`;ue.current&&(console.warn(`Transaction ${ue.current.getDescription()} is being replaced by ${Ae}`),ue.current.rollback(),ue.current=null),ue.current=C.beginCommit({description:Ae}),H.current.clear();for(let ye=0;ye<m.length;ye++){const De=m[ye],D=B.current?.get(De);D?H.current.set(De,{movable:D,startBounds:n.toViewBounds(D.getBounds())}):console.warn("invalid element",D)}},[C,n,m]),Se=o.useCallback(()=>{if(!ue.current)return;const oe=[];H.current?.forEach(ke=>{oe.push(ke.movable)}),ue.current.commit({viewAfter:{view:a,movableSelection:oe}}),H.current.clear(),ue.current=null},[]),ie=o.useCallback(()=>{ue.current&&(ue.current.rollback(),ue.current=null)},[]),ve=o.useRef(null);o.useEffect(()=>{ve.current&&(ve.current.onscroll=oe=>{oe.preventDefault(),oe.srcElement.scrollTop=0,oe.srcElement.scrollLeft=0})},[ve.current]);const xe=r.useImperativeElement(t,()=>({isMovableArea:()=>!0,focusMovable:le,focus:()=>{le()}}),[a]),[Re,b]=o.useState(null),Fe=o.useRef(!1),Ze=o.useRef(!1),ze=o.useRef(!1);o.useEffect(()=>{if(f||m.length===0||ze.current||Fe.current)return;if(Ze.current)return void requestAnimationFrame(()=>{we.current&&U.current&&we.current.refTargets.length>0&&(ze.current=!0,Ke.current?.(!0)),q([...m])});Fe.current=!0;const oe=o.lazy(async()=>{try{const ke=await Promise.resolve().then(()=>require("./BsJnIwNed3pBcnMi.cjs"));return Fe.current=!1,Ze.current=!0,q([...m]),ke}catch(ke){return console.warn(ke),Ke.current?.(!1),null}});b(oe)},[m,f,S,p]);const et=o.useMemo(()=>!Re||f?null:c.jsx(o.Suspense,{children:c.jsx(Re,{className:yt({dragging:T||I,resizing:T,moving:I}),container:null,ref:we,target:we.current?m:[],draggable:!f&&!S,resizable:!f&&!p,individualGroupable:!0,edgeDraggable:!1,throttleDrag:2,throttleResize:2,origin:!1,keepRatio:!1,renderDirections:x,onResizeStart:oe=>{ce(oe.target,"Resize")},onResize:oe=>{if(!ue.current)return oe.stopDrag(),void Te();$(!0);const ke=oe.direction[0]!==0&&oe.direction[1]!==0;let Ae=0,ye=0;for(let De=0;De<m.length;De++){const D=m[De],ee=H.current.get(D),L=B.current.get(D);if(!ee||!L){console.warn("invalid element");continue}let G=oe.dist[0],u=oe.dist[1],w=oe.drag.dist[0],F=oe.drag.dist[1],v=ee.startBounds.width,z=ee.startBounds.height;De===0?(Ae=v,ye=z):(G*=v/Ae,w*=v/Ae,u*=z/ye,F*=z/ye);const y={...ee.startBounds};if(y.width=Math.max(0,v+G),y.height=Math.max(0,z+u),oe.direction[0]===-1&&(y.width=Math.max(0,Math.min(ee.startBounds.x+v,v-w))),oe.direction[1]===-1&&(y.height=Math.max(0,Math.min(ee.startBounds.y+z,z-F))),ke&&(L.isLockAspectRatio()||oe.inputEvent?.shiftKey)){const V=v/z,_=y.width/y.height;_>V?y.height=y.width/V:_<V&&(y.width=y.height*V)}oe.direction[0]===-1&&(y.x=Math.max(0,Math.min(ee.startBounds.x+v,ee.startBounds.x+v-y.width))),oe.direction[1]===-1&&(y.y=Math.min(ee.startBounds.y+z,ee.startBounds.y+z-y.height)),ee.movable.setBounds(n.toAbsoluteBounds(y))}},onResizeEnd:oe=>{$(!1),Se()},onDragStart:oe=>{ce(oe.target,"Move")},onDrag:oe=>{if(!ue.current)return oe.stopDrag(),void Te();k(!0);for(let ke=0;ke<m.length;ke++){const Ae=m[ke],ye=H.current.get(Ae);ye?ye.movable.setBounds(n.toAbsoluteBounds({...ye.startBounds,x:ye.startBounds.x+oe.translate[0],y:ye.startBounds.y+oe.translate[1]})):console.warn("invalid element")}},onDragEnd:oe=>{},onMouseUp:oe=>{}})}),[je,Re,m,n,f,S,p,T,I]);return c.jsx("div",{className:yt(h,"movable-area",ei),style:{width:K.width,height:K.height,...E,position:"absolute",overflow:"hidden",willChange:"transform"},ref:Xt([xe,ve]),...N,children:c.jsx("div",{className:"movable-scroll",style:{position:"absolute",cursor:"initial",left:0,top:0,width:K.width,height:K.height},...N,children:c.jsxs("div",{ref:U,style:{position:"absolute",pointerEvents:"auto"},onFocus:oe=>{O?.(),Le(!0)},onBlur:oe=>{Le(!1)},onKeyDownCapture:oe=>{if(oe.isDefaultPrevented())return;const ke=oe.nativeEvent.ctrlKey,Ae=oe.nativeEvent.altKey,ye=oe.nativeEvent.shiftKey;if(oe.which===r.KeyCodes.Escape){const G=a.getMovableSelection();let u=[...G];return m.forEach(w=>{if(u.length===0)return;const F=B.current.get(w);let v=u.indexOf(F);u.splice(v,1)}),u.length!==G.length&&a.selectMovables(u),u.length===0&&R?.(),void oe.preventDefault()}const De=.1,D=G=>{i.updateSelected(u=>{u.setRotation(u.getRotation()+G)},"Rotate")},ee=(G,u=!0)=>{i.updateSelected(w=>{const F=w.getBounds();let v=1+G;u||(v=1/v);const z=Math.sqrt(Math.pow(F.width,2)+Math.pow(F.height,2)),y=Math.atan2(F.height,F.width),V=v*z;if(V<10)return;const _=V*Math.cos(y),Q=V*Math.sin(y),se={x:F.x+(F.width-_)/2,y:F.y+(F.height-Q)/2,width:_,height:Q};w.setBounds(se)},"Resize")},L=G=>{i.updateSelected(u=>{const w=u.getBounds(),F={x:w.x+(G.x??0),y:w.y+(G.y??0),width:w.width+(G.width??0),height:w.height+(G.height??0)};u.setBounds(F)},"Nudge")};if(oe.which===r.KeyCodes.Delete)i.updateSelected(G=>{G.delete()},"Delete"),oe.preventDefault();else if(oe.key==="a"&&ke){const G=a.getMovableSelection();a.selectMovables(i.getItems(),!0),a.selectMovables(G,!0),oe.preventDefault()}else oe.key==="ArrowLeft"?(ye?ee(De,!1):Ae?D(-10):L({x:ke?-10:-1}),oe.preventDefault()):oe.key==="ArrowRight"?(ye?ee(De,!0):Ae?D(10):L({x:ke?10:1}),oe.preventDefault()):oe.key==="ArrowUp"?(ye?ee(De,!0):L({y:ke?-10:-1}),oe.preventDefault()):oe.key==="ArrowDown"&&(ye?ee(De,!1):L({y:ke?10:1}),oe.preventDefault())},children:[fe,et]})})})})),Wt=e=>{let t=Number.MAX_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER,i=0,a=0;for(let l=0;l<e.length;l++){const C=e[l].getBounds();t=Math.min(C.x,t),n=Math.min(C.y,n),i=Math.max(C.x+C.width,i),a=Math.max(C.y+C.height,a)}return{x:t,y:n,width:i-t,height:a-n}},_o=(e,t=!0)=>{const n=[],i=t?"x":"y",a=t?"y":"x",l=t?"width":"height";let C=0,g=Number.MAX_SAFE_INTEGER,s=0;for(let p=0;p<e.length;p++){const h=e[p],E=h.getBounds();C+=E[l],g=Math.min(E[i],g),s=Math.max(E[i]+E[l],s),n.push({bounds:E,movable:h})}const f=(s-g-C)/(e.length-1);n.sort((p,h)=>{const E=p.bounds[i],x=h.bounds[i];return E!==x?E-x:p.bounds[a]-h.bounds[a]});const S=new Map;S.set(n[0].movable,n[0].bounds);for(let p=1;p<n.length-1;p++){const h=n[p-1].bounds,E={...n[p].bounds};E[i]=h[i]+h[l]+f,n[p].bounds=E,S.set(n[p].movable,E)}return S.set(n[n.length-1].movable,n[n.length-1].bounds),S};function Er(e){const{movables:t,movablesView:n,transactional:i,commands:a,target:l,onRepeatCommandChange:C}=e,g=r.useNotifier(),s=r.useEditMode();o.useRef(s.getMode()).current=s.getMode();const f=r.useCallbackRef(async(R,O,m=null,q=!0)=>{const T=async()=>{const $=await Promise.resolve(g?.showBusy?.(R.label()));try{await O();const I=m??R?.label?.();if(C){let k=null;R&&I!==!1&&(k=new r.SimpleCommand(R.key(),l,{label:I,description:I},T)),C(k)}$?.(),q&&s.setMode(null)}catch(I){$?.(),g?.showError?.(I)}};await T()},[C,g]),[S,p]=o.useReducer(R=>R+1,0),h=r.useCallbackRef((R,O,m)=>{if(!n)return;const q=n.getMovableSelection();if(q.length===0)return;let T="Drawings";if(q.length===1){const I=q[0];T=d.TextUtils.capitalize(I.getContent().getType())??"Drawing"}const $=`${R.label()} ${T}`;f(R,()=>{let I=null;i&&(I=i.beginCommit($));const k=n.getMovableSelection();if(k.length===0)return;const Z=m?.(k);for(let X=0;X<k.length;X++){const B=k[X];O(B,Z)}I?.commit()})},[n,i]),[E,x]=o.useState(n.getMovableSelection()[0]??null),[A,N]=o.useState(!E||E?.isProtected()),K=o.useMemo(()=>[new r.Command("moveToFront",l,{label:"Bring to Front",description:"Move to the front of all of the other drawings.",shortcut:{key:"BracketRight",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){h(this,R=>{R.moveToFront()})}),new r.Command("moveForward",l,{label:"Bring Forward",description:"Move forward one layer in the z order.",shortcut:{key:"BracketRight",modifiers:[r.KeyModifiers.Ctrl]}},function(){h(this,R=>{R.moveForward()})}),new r.Command("moveToBack",l,{label:"Send to Back",description:"Move to the back of all of the other drawings.",shortcut:{key:"BracketLeft",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){h(this,R=>{R.moveToBack()})}),new r.Command("moveBackward",l,{label:"Send Backward",description:"Move backwards one layer in the z order.",shortcut:{key:"BracketLeft",modifiers:[r.KeyModifiers.Ctrl]}},function(){h(this,R=>{R.moveBackward()})}),new r.Command("toggleLockAspectRatio",l,{label:"Lock Aspect Ratio",description:"Toggle whether the aspect ratio should be maintained when resizing from corners."},function(){h(this,R=>{R.setLockAspectRatio(!R.isLockAspectRatio())})}),new r.Command("formatAnchorTypeTwoCell",l,{label:"Move and size with cells",description:"Set your drawing to move and resize when underling sheet resizes."},function(){h(this,R=>{R.setAnchorType(d.IAnchored.Type.TwoCell)})}),new r.Command("formatAnchorTypeOneCell",l,{label:"Move but don't size with cells",description:"Set your drawing to only move when underling sheet resizes."},function(){h(this,R=>{R.setAnchorType(d.IAnchored.Type.OneCell)})}),new r.Command("formatAnchorTypeAbsolute",l,{label:"Don't move or size with cells",description:"Set your drawing to never move or resize when underling sheet resizes."},function(){h(this,R=>{R.setAnchorType(d.IAnchored.Type.Absolute)})}),new r.Command("formatDrawAlignLeft",l,{label:"Align Left",description:"Align the selected drawings to the left."},function(){h(this,(R,O)=>{R.setBounds({x:O.x})},Wt)}),new r.Command("formatDrawAlignCenter",l,{label:"Align Center",description:"Align the selected drawings vertically relative to each other."},function(){h(this,(R,O)=>{R.setBounds({x:(O.width-R.getBounds().width)/2+O.x})},Wt)}),new r.Command("formatDrawAlignRight",l,{label:"Align Right",description:"Align the selected drawings to the right."},function(){h(this,(R,O)=>{R.setBounds({x:O.width-R.getBounds().width+O.x})},Wt)}),new r.Command("formatDrawAlignTop",l,{label:"Align Top",description:"Align the selected drawings to the top."},function(){h(this,(R,O)=>{R.setBounds({y:O.y})},Wt)}),new r.Command("formatDrawAlignMiddle",l,{label:"Align Middle",description:"Align the selected drawings horizontally relative to each other."},function(){h(this,(R,O)=>{R.setBounds({y:(O.height-R.getBounds().height)/2+O.y})},Wt)}),new r.Command("formatDrawAlignBottom",l,{label:"Align Bottom",description:"Align the selected drawings to the bottom."},function(){h(this,(R,O)=>{R.setBounds({y:O.height-R.getBounds().height+O.y})},Wt)}),new r.Command("formatDrawDistributeHorz",l,{label:"Distribute Horizontally",description:"Distribute the selected drawings horizontally with equal spacing between each."},function(){h(this,(R,O)=>{R.setBounds(O.get(R))},R=>_o(R))}),new r.Command("formatDrawDistributeVert",l,{label:"Distribute Vertically",description:"Distribute the selected drawings vertically with equal spacing between each."},function(){h(this,(R,O)=>{R.setBounds(O.get(R))},R=>_o(R,!1))}),new r.Command("formatDrawFlipHorz",l,{label:"Flip Horizontally",description:"Flip the selected drawings horizontally."}),new r.Command("formatDrawFlipVert",l,{label:"Flip Vertically",description:"Flip the selected drawings vertically."}),new r.Command("formatDrawGroup",l,{label:"Group",description:"Group the selected drawings into a single drawing."}),new r.Command("formatDrawUngroup",l,{label:"Ungroup",description:"Break the group of a drawing into individual drawings."}),new r.Command("formatDrawSwapShapes",l,{label:"Swap Shapes",description:"Swap the positions of the swap."}),new r.Command("formatDrawSwapShapesHorz",l,{label:"Swap Shapes Horizontally",description:"Swap the positions of the swap horizontally."}),new r.Command("formatDrawSwapShapesVert",l,{label:"Swap Shapes Vertically",description:"Swap the positions of the swap vertically."})],[n,E]);o.useEffect(()=>{},[s]);const P=o.useMemo(()=>{let R=null;return R=a?a.createChildGroup(l,"movable",!1):new r.CommandGroup(l,"movable"),R.addCommands(K,!0),R},[a,K]);return Qe(E,{onAnyChange:()=>{P.getCommand("formatAnchorTypeTwoCell").update({state:E?.getAnchorType()===d.IAnchored.Type.TwoCell}),P.getCommand("formatAnchorTypeOneCell").update({state:E?.getAnchorType()===d.IAnchored.Type.OneCell}),P.getCommand("formatAnchorTypeAbsolute").update({state:E?.getAnchorType()===d.IAnchored.Type.Absolute}),P.getCommand("formatAnchorTypeAbsolute").update({state:E?.getAnchorType()===d.IAnchored.Type.Absolute}),P.getCommand("toggleLockAspectRatio").update({state:E?.isLockAspectRatio()})},onProtectedChange:R=>{N(R.isProtected())},onDelete:()=>{}}),Qe(n,{onMovableSelectionChange:()=>{const R=n.getMovableSelection()[0]??null;x(R),N(!R||R.isProtected()),p()}}),Qe(t,{onCollectionChange:()=>{p()}}),o.useEffect(()=>{const R={disabled:A};P.getCommand("formatAnchorTypeTwoCell").update(R),P.getCommand("formatAnchorTypeOneCell").update(R),P.getCommand("formatAnchorTypeAbsolute").update(R),P.getCommand("toggleLockAspectRatio").update(R);const O=t.getCount(),m=n.getMovableSelection(),q=A||O<=1||m.length===0;let T={disabled:q},$=T;if(!q&&m.length===1){const Z=m[0];Z.getZIndex()===0&&(T={disabled:!0}),Z.getZIndex()===O-1&&($={disabled:!0})}P.getCommand("moveToFront").update($),P.getCommand("moveForward").update($),P.getCommand("moveToBack").update(T),P.getCommand("moveBackward").update(T);const I={disabled:A||m.length<=1};P.getCommand("formatDrawAlignLeft").update(I),P.getCommand("formatDrawAlignCenter").update(I),P.getCommand("formatDrawAlignRight").update(I),P.getCommand("formatDrawAlignTop").update(I),P.getCommand("formatDrawAlignMiddle").update(I),P.getCommand("formatDrawAlignBottom").update(I),P.getCommand("formatDrawFlipHorz").update(I),P.getCommand("formatDrawFlipVert").update(I),P.getCommand("formatDrawGroup").update(I),P.getCommand("formatDrawUngroup").update(I),P.getCommand("formatDrawSwapShapes").update(I),P.getCommand("formatDrawSwapShapesHorz").update(I),P.getCommand("formatDrawSwapShapesVert").update(I);const k={disabled:A||m.length<=2};P.getCommand("formatDrawDistributeHorz").update(k),P.getCommand("formatDrawDistributeVert").update(k)},[S,A,S]),P}const ti=o.memo(o.forwardRef((e,t)=>{const{children:n,disabled:i,description:a,view:l,isDragging:C,onHide:g,onShow:s,...f}=e;o.useEffect(()=>{},[a]);const S=r.useImperativeElement(t,()=>({isEmptyFrame:()=>!0}),[]),[p,{height:h,width:E}]=Ot();return c.jsx("div",{...f,ref:Xt([S,p]),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:l.getZoom(),display:"flex",position:"relative",filter:i?"blur(1px)":void 0,boxShadow:C?"1px 1px 2px var(--sxl-app-color-shadow, rgba(0,0,0,.15))":void 0},children:c.jsx("div",{style:{textAlign:"center"},children:a})})})})),ni=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:i,movableProps:a,renderMovable:l,commands:C,target:g,onRepeatCommandChange:s}=e,f=Er({movables:i.getMovables(),movablesView:i?.getView(),transactional:i,onRepeatCommandChange:s,commands:C,target:g});o.useEffect(()=>{n?.getStage()},[n?.getStage()]);const S=o.useMemo(()=>c.jsx(Ir,{ref:t,view:n,movables:i.getMovables(),disableResize:!i.getProtection().isObjectsAllowed(),disableDrag:!i.getProtection().isObjectsAllowed(),movablesView:i.getView(),transactional:i,renderMovable:l,...a,onFocus:()=>{f.activate(),a?.onFocus?.()}},"movable-area"),[i,a,C,f]);return S&&n?S:null})),oi=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:i,gridStyle:a,getCellEditor:l,showProtectedError:C,setEditingCoords:g,commands:s}=e,f=r.useEditMode(),[S,p]=o.useState(null),[h,E]=o.useState(null),[x,A]=o.useState(null),[N,K]=o.useState(null),[P,R]=o.useState(null);o.useLayoutEffect(()=>{if(x===null)return K(null),void R(null);const M=()=>{const U=i.getRange(x).getCell(),ue=U.getStyle();let we,je=ue.getFill()?.toCSS(a.body.darkMode);je.background!=="none"&&je.background!=="transparent"||(je=i.getStyles().getNormal().getFill().toCSS(a.body.darkMode)),je.background!=="none"&&je.background!=="transparent"||(je={background:a.body.fill}),K({style:je}),U&&!U.getFormula()&&(we=U?.getRenderHorizontalAlignment()),R(we??r.HorizontalAlignment.Left)};return M(),i.getRange(x).addListener(()=>{M()})},[i,x,a?.body]);const O=r.useCallbackRef(()=>{let M=h.editState.dirty??"";if(h.editState.dirty!==void 0){const U=d.TextUtils.clampString(M);try{const ue=h.sheet.getRange(h.coords),we=`Typing '${U}' into ${ue.toString()}`;return ue.setValue(M,{description:we,autoFit:!0}),A(null),E(null),f.setMode(null),g(null),!0}catch(ue){throw me.Notifier.error(new Error(`Unable to enter '${U}'.`,{cause:ue})),ue}}},[i,h]),m=r.useCallbackRef(M=>i.getRange(M).getCell().getExtrusions()??me.CoordUtils.cellToRange(M),[i]),q=r.useCallbackRef(M=>{let U=d.IRange.Orientation.Row,ue=!1;M!==d.IRange.Direction.Up&&M!==d.IRange.Direction.Down||(U=d.IRange.Orientation.Column),M!==d.IRange.Direction.Left&&M!==d.IRange.Direction.Up||(ue=!0),i.getSelection().traverse(U,ue)},[i]),T=o.useCallback((M,U)=>{if(l)return l(M,U);if(!i)return null;const{ref:ue,...we}=M;return c.jsx(wr,{ref:ue,...we,sheet:i,bodyStyle:a?.body,activeCoords:U,commands:s,onChangeEdit:je=>{const Te={sheet:i,coords:U,editState:je};f.setMode(ae=>({...ae,description:Te.editState.editMode?"Edit":"Enter",args:{...ae?.args,stateAndCoords:Te}}))},editState:h.editState})},[i,N,l,h,x]),{overlay:$,startEdit:I,submitEdit:k,cancelEdit:Z,onKeyboardEventNative:X,onPointerEventNative:B}=dt.useKeyboardEditorOverlay({view:n,activeCoords:S,getCellEditor:T,canEdit:()=>{const M=i.getProtection();if(M.isReadOnly())return!1;const U=M.isLocked();return U&&C(),!U},onBeforeStartEdit:M=>{const U=xr(()=>i.getRange(M).getCell()),ue={sheet:i,coords:M,editState:Object.freeze(U)};f.setMode({key:"edit",args:{stateAndCoords:ue}}),E(ue)},onStartEdit:M=>{A(M),g(M)},onSubmitEdit:O,onCancelEdit:M=>{A(null),E(null),f.setMode(null),g(null)},onDoneEdit:M=>{f.setMode(null)},onNavigate:q,containerProps:N,borderStrokeFill:a.selection?.strokeFill,borderStrokeWidth:i?.getSelection().getCoords().ranges?.length>1?1:2,alignment:P,getRangeCoords:m});Qe(i.getSelection(),{onChange(M){p(i.getSelection().getCoords().cell)}});const j=r.useCallbackRef(M=>{B(M),x&&k()},[B,Z,x]),H=o.useCallback(M=>{B(M)},[B]),J=o.useCallback(M=>{X(M)},[X]);return o.useEffect(()=>{const M=n?.getStage();if(M)return M.addEventListener("pointerdown",j),M.addEventListener("dblclick",H),M.addEventListener("keydown",J),()=>{M.removeEventListener("pointerdown",j),M.removeEventListener("dblclick",H),M.removeEventListener("keydown",J)}},[n?.getStage()]),o.useEffect(()=>{const M=f.getMode(),U=M?.key;U==="edit"||U==="enter"?h?M.args?.cancel?Z():M.args?.submit?k():E(M.args?.stateAndCoords):I(M.args?.start):x&&Z()},[f]),$(n,t)})),Fr="white",Ar="black",ri=`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='${Ar}' fill='${Fr}'/%3E%3C/g%3E%3C/svg%3E%0A") 15 8, pointer`,li=`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='${Ar}' fill='${Fr}'/%3E%3C/g%3E%3C/svg%3E%0A") 12 12, pointer`,ii=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:i}=e,[a,l]=o.useState(i.getTables().getCount()>0),[C,g]=o.useState(null),[s,f]=o.useState(null),[S,p]=o.useState(null),[h,E]=o.useState(null),x=r.useCallbackRef(()=>{if(i.getTables().getCount()>0){l(!0);const m=i.getTables().getItems({address:n.getVisibleRangeCoords()});g(m.length>0?m:null)}else l(!1),g(null)},[i,n]),A=r.useCallbackRef(m=>{m.preventDefault(),m.stopPropagation();const q=n.getCellCoordsFromClient(m.clientX,m.clientY),T=i.getTables().getItems({address:q});T.length===1&&T[0].select()},[n,i]),N=r.useCallbackRef(m=>{m.preventDefault(),m.stopPropagation();const q=n.getCellCoordsFromClient(m.clientX,m.clientY),T=i.getTables().getItems({address:q});if(T.length===1){const $=T[0].getRange().getCoords(),I={colStart:$.colStart,rowStart:q.rowIndex,colEnd:$.colEnd,rowEnd:q.rowIndex};i.getRange(I).select()}},[n,i]),K=r.useCallbackRef(()=>{if(!a)return;const m=i.getTables().getItems({address:n.getVisibleRangeCoords()});g(m.length>0?m:null)},[i,a,n]);Qe(i?.getSelection(),{onChange(m){f(i.getSelection().getCoords().cell)}}),Qe(S,{onAnyChange(m){x(),K()}}),Qe(h,{onAnyChange(m){K()}}),Qe(i,{onTablesChange(m){x(),K()},onInvalidated(m){x(),K()}});const P=o.useMemo(()=>me.CommonUtils.debounce(me.CommonUtils.throttle(K,300),300),[]);o.useEffect(()=>{P()},[n]),o.useEffect(()=>{let m=null;if(C)for(let q=0;q<C.length&&!m;q++){const T=C[q],$=T.getRange().getCoords();d.CoordUtils.isCellWithinRange(s,$)&&(m=T)}p(m)},[s,C]);const R=r.useCallbackRef(m=>{let q=null;if(C)for(let T=0;T<C.length;T++){const $=C[T],I=$.getRange().getCoords();let k=n.getRangeCoordsBounds(I);const Z=n.getRelativePointFromClient(m.clientX,m.clientY),X=Z.x,B=Z.y;if(X>=k.x&&X<=k.x+k.width&&B>=k.y&&B<=k.y+k.height){const j=n.getViewportSize();X<=0||B<=0||X>=j.width||B>=j.height||(q=$)}}E(q)},[n,C]);if(o.useEffect(()=>{const m=n?.getStage();if(m&&C)return m.addEventListener("mousemove",R),m.addEventListener("mouseleave",R),()=>{m.removeEventListener("mousemove",R),m.removeEventListener("mouseleave",R)}},[C,n?.getStage()]),!n||!C||C.length===0)return null;const O=[];for(let m=0;m<C.length;m++){const q=C[m];if(q.isClosed())continue;const T=q===h,$=q===S,I=q.getRange().getCoords(),k=n.getRangeCoordsBounds(I);let Z;if(T||$){const X=q.getStyle().getProperties(),B=X.headerRow?.fill?.background??X.wholeTable?.border?.top?.color?.toString();if(B&&i){const j=i.getStyles().parseColor(B);j&&(Z=j.toCSS())}Z||(Z="var(--sxl-app-color-shadow, rgba(0,0,0,.15))")}O.push(c.jsx("div",{style:{position:"absolute",left:k.x,top:k.y,width:Math.min(16,k.width),height:k.height,pointerEvents:"all",cursor:ri},onMouseDown:N},`table-select-row-${q.getName()}`)),O.push(c.jsx("div",{style:{position:"absolute",left:k.x,top:k.y,width:Math.min(16,k.width),height:Math.min(16,k.height),pointerEvents:"all",cursor:li},onMouseDown:A},`table-select-${q.getName()}`)),O.push(c.jsx(dt.Selection,{x:k.x,y:k.y,width:k.width,height:k.height,range:I,strokeWidth:$?.5:0,stroke:Z??"var(--sxl-app-color-grey, grey)",style:{willChange:"box-shadow",transition:"box-shadow 80ms ease-in-out",boxShadow:T?`${Z} 0px 0px 1px 1px`:void 0}},`table-outline-${q.getName()}`))}return O})),ai=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:i,animationTime:a=60}=e,[l,C]=o.useState(null),[g,s]=o.useState(null),f=o.useRef(null),S=r.useCallbackRef(()=>{const N=i.getSelectedCell(),K=N.getSpill()?.getCoords()??null;me.CoordUtils.isEqualRanges(K,l)||(s(K?{transition:l?"move":"in",bounds:n.getRangeCoordsBounds(K),coords:K}:{transition:"out",bounds:n.getRangeCoordsBounds(l),coords:l}),C(K))},[i,n,l]);o.useEffect(()=>(f.current&&(clearTimeout(f.current),f.current=null),g&&(f.current=setTimeout(()=>{s(null),f.current=null},a)),()=>{f.current&&(clearTimeout(f.current),f.current=null)}),[g,a]);const p=o.useMemo(()=>me.CommonUtils.debounce(me.CommonUtils.throttle(S,80),80),[]);if(Qe(i?.getSelection(),{onChange(N){p()}}),Qe(i,{onSpillsChange(N){S()},onInvalidated(N){S()}}),!n||!l&&!g)return null;const h=i.getRange(l).getValue()instanceof d.FormulaError.Spill,E=[];let x=g?.bounds??n.getRangeCoordsBounds(l);if(g&&!me.CommonUtils.isEqualBounds(g.bounds,n.getRangeCoordsBounds(g.coords))&&s(null),x=n.toClipBounds(x,-10),!x)return;const A="var(--sxl-app-color-primary-dark, rgba(0,0,0,.15))";return E.push(c.jsx(dt.Selection,{x:x.x,y:x.y,width:x.width,height:x.height,range:l,strokeWidth:1,stroke:A,style:{willChange:"transform, opacity, width, height, opacity, left, top",strokeDasharray:h?"6 3":void 0,opacity:g?.transition==="out"?0:1,transition:g?.transition?g.transition==="in"||g.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:`${A} 0px 0px 4px 0px`}},"spill-outline}")),E})),si={position:"absolute",top:0,left:0,bottom:0,right:0},Zo=(e,t)=>{const n={...e},i=t?.getNormal().getFont(),a=i?.toCSS(),l={text:{fontFamily:a?.fontFamily,fontSize:i?.getSize()}},C=n.body=me.CommonUtils.mergeContentful(e.body,l);return n.body=me.CommonUtils.mergeContentful({fill:"#fff",strokeFill:"#dad8d6",strokeWidth:.5,text:{fontWeight:"400",fontStyle:"normal",fill:"#040404"}},C),n.buttonSurface=me.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=me.CommonUtils.mergeContentful(n.body,{edgeStrokeFill:"rgb(171, 171, 171)",fill:"#f0f0f0",strokeShadow:void 0,edgeStrokeWidth:1},e.header),n.header=me.CommonUtils.mergeContentful(n.header,l),n.headerSelect=me.CommonUtils.mergeContentful(n.header,{fill:"rgba(16, 124, 65, 0.1)",text:{fill:n.headerSelection.strokeFill,fontWeight:"700"}},e.headerSelect),n.headerSelect=me.CommonUtils.mergeContentful(n.headerSelect,l),n.headerSelectAll=me.CommonUtils.mergeContentful(n.headerSelect,{},e.headerSelectAll),n.headerSelectAll=me.CommonUtils.mergeContentful(n.headerSelectAll,l),n},di={fireOnModelChange:!1},Xo={},Dr=o.memo(o.forwardRef((e,t)=>{const{sheet:n,gridStyle:i=Xo,headersStyle:a=Xo,onSheetContextMenu:l,showColumnHeaders:C,columnHeaderProps:g,showRowHeaders:s,rowHeaderProps:f,showScrollbars:S=!0,scrollPaneProps:p,onViewportChange:h,commands:E,onRepeatCommandChange:x,onMoveCell:A,overlays:N,renderMovable:K,viewportComponent:P,onElementLoad:R,getCellEditor:O,onFocus:m,onBlur:q,style:T=r.ReactUtils.EmptyCssProperties,onShowTooltip:$,onShowColumnTooltip:I,onShowRowTooltip:k,onCloseTooltip:Z,gridProps:X,cellRenderProps:B,...j}=e;if(o.useEffect(()=>{d.LicenseManager._validate(!0)},[]),!n)throw new Error("ISheet must be provided.");const[H,J]=o.useReducer(ne=>ne+1,0),[M,{width:U,height:ue}]=Ot(),we=r.useCallbackRef($,[$]),je=r.useCallbackRef(I,[I]),Te=r.useCallbackRef(k,[k]),ae=r.useCallbackRef(Z,[Z]),Me=o.useRef(!1);o.useLayoutEffect(()=>{Me.current=!0},[n]);const Ke=n?.getStyles(),Ee=o.useMemo(()=>Zo(i,Ke),[i,Ke]),Ue=o.useMemo(()=>Zo(a,Ke),[a,Ke]),{body:re={},buttonSurface:te={}}=Ee,{header:pe={},headerSelect:Le={},headerSelectAll:Y={}}=Ue,W=o.useRef(null),[le,fe]=o.useState(()=>n?.getView()),ce=(le?.getZoomScale()??100)/100,Se=o.useMemo(()=>({vertical:le.isShowColumnGridlines()&&ce>=.4,horizontal:le.isShowRowGridlines()&&ce>=.4}),[le?.isShowColumnGridlines(),le?.isShowRowGridlines(),ce]),ie=o.useMemo(()=>{if(le?.getGridLineColor())return{strokeDasharray:"1,1"}},[le?.getGridLineColor(),Ee]),ve=C??le?.isShowColumnHeaders(),xe=s??le?.isShowRowHeaders(),[Re,b]=o.useState({width:0,height:0}),Fe=o.useMemo(()=>{let ne=40,qe=20;const He=n?.getStyles().getNormal().getFont();if(Re.width>0&&Re.height>0){const Pe=He?.toCSS()?.fontFamily??Ee.header.text.fontFamily,Xe=He?.getSize()??Ee.header.text.fontSize,We=d.IFont.getSharedMeasurer()(""+Re.height,Math.ceil(Xe*d.IFont.getDeviceScale()),Pe);ne=We.width,qe=We.lineHeight}return{width:Math.round(ne+5),height:Math.round(qe+3)}},[Re,Ee?.header.text,n]),Ze=xe?ce*Fe.width:pe.edgeStrokeWidth,ze=ve?ce*Fe.height:pe.edgeStrokeWidth,et=Math.max(U,(n?.getColumnHeaders().getDefaultSize()??Fe.width)+Ze+1),oe=Math.max(ue,(n?.getRowHeaders().getDefaultSize()??Fe.height)+ze+1),ke=o.useRef(new Map),Ae=o.useRef(null),ye=()=>({getColOffset:ne=>n.getColumnHeaders().findOffset(ne),getColIndex:ne=>n.getColumnHeaders().findIndex(ne),getRowOffset:ne=>n.getRowHeaders().findOffset(ne),getRowIndex:ne=>n.getRowHeaders().findIndex(ne)}),[De,D]=o.useState(()=>ye()),[ee,L]=o.useState(!1),[G,u]=o.useState(null),w=!0,F=Ee.selection?.strokeFill,v=o.useCallback(()=>Mt.current,[]),[z,y]=o.useState(),V=r.useCallbackRef(ne=>{y(ne),n&&n.getView()&&n.getView().setTopLeft(ne?{left:ne.left,top:ne.top}:null),h?.(ne)},[n,h]),_=o.useRef(null);o.useEffect(()=>{if(!z||!n)return;const ne=n.getRangeAtBounds({x:z.left,y:z.top,width:z.width,height:z.height});_.current?.(),_.current=ne.addListener(()=>{const qe=ne.getCoords();W?.current?.invalidate(qe)})},[z,n]);const[Q,se]=o.useState(()=>n?.getView().getTopLeft()),de=r.useCallbackRef(ne=>{const qe=me.CoordUtils.cellToRange(ne);if(n.isClosed())return qe;const He=n.getRange(qe,{excludeHidden:!0}).getMerges();return He.length===0?qe:He[0]},[n]),ge=ne=>{if(!ne||ne.coords.colIndex===0&&ne.coords.rowIndex===0)return null;const qe={};return ne.coords.colIndex>0&&(qe[me.AnchorLocation.Left]={index:ne.coords.colIndex,scrollOffset:ne.topLeft.left}),ne.coords.rowIndex>0&&(qe[me.AnchorLocation.Top]={index:ne.coords.rowIndex,scrollOffset:ne.topLeft.top}),qe},[Ce,be]=o.useState(()=>ge(n.getView().getFreezePanes())),he=r.useEditMode(),Ie=o.useCallback(()=>W.current,[]),Be=r.useCallbackRef(ne=>{he.setMode(qe=>qe?.key==="edit"?{...qe,args:{...qe.args}}:{key:"edit",args:{stateAndCoords:null,start:ne}})},[]),Ne=r.useCallbackRef(()=>z,[z]),Ve=Mr({sheet:n,commands:E,target:Ie,onRepeatCommandChange:x,bodyStyle:re,onStartEdit:Be,getViewport:Ne}),[$e,_e]=o.useState(n.getSelection().isEntire()),[Oe,Ye]=o.useState(le?.getMovableSelection().length>0),at=G!==null||Oe,ht=null,[qt,Ge]=o.useState(!1);o.useEffect(()=>{Ge(!1)},[n.getProtection()]);const ot=r.useNotifier(),pt=r.useCallbackRef(()=>{qt||(Ge(!0),ot.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}))},[ot,qt]),wt=o.useMemo(()=>{const ne=he.getMode();return ne?.cursor?ne.cursor:null},[ht,he]),[vt,gt]=o.useState(null),it=o.useRef(!1),[Et,Bt]=o.useState([]),Qt=o.useRef(null),[Dt,en]=o.useState(me.TypesUtils.EmptyTopLeft),[It,xn]=o.useState(me.TypesUtils.EmptyTopLeft);o.useEffect(()=>{en({left:Q?.left,top:0})},[Q?.left]),o.useEffect(()=>{xn({left:0,top:Q?.top})},[Q?.top]),Qe(n?.getView(),{onFreezeSplitChange:()=>{be(ge(n.getView().getFreezePanes()))},onTopLeftChange:()=>{se(n.getView().getTopLeft())},onMovableSelectionChange:()=>{Ye(n.getView().getMovableSelection().length>0)}}),Qe(n?.getSelection(),{onChange:()=>{_e(n.getSelection().isEntire())}}),Qe(n,{onViewChange(){fe(n.getView()),D(ye())},onLayoutChange:()=>{const ne=n.getEntireRange();b({height:ne.getRowCount(),width:ne.getColumnCount()}),D(ye())},onStyleChange:()=>{zt()},onMovablesChange:()=>{},onInvalidated:()=>{zt()}}),Qe(n,{onRequestScrollIntoView:async(ne,qe)=>{if(!qe)return;const He={colIndex:qe?.coords.colStart,rowIndex:qe?.coords.rowStart};return await W.current?.scrollCellCoordsIntoView(He,qe?.scroll),!0},onRequestFocus:()=>me.CommonUtils.whenFocus(Mt.current)},di);const Ct=o.useRef(!1),Vt=o.useMemo(()=>{const ne=me.CommonUtils.debounce(Pe=>{requestAnimationFrame(()=>{it.current&&je?.(Pe)})},32),qe=(Pe,Xe)=>{it.current=!0,gt([We=>{if(!We.toClipBounds(We.getRangeCoordsBounds({rowStart:0,rowEnd:Re.height,colStart:Pe,colEnd:Pe})))return;const lt=We.getLayout(),rt=Math.max(0,lt.getColOffset(Pe)),nt=We.getBounds(),bt=Math.min(nt.x+nt.width,lt.getColOffset(Pe+1)),Tt=We.getAnchor();if(Xe!==null&&(Tt===me.AnchorLocation.Left||Tt===me.AnchorLocation.Center||Tt===me.AnchorLocation.Right)){const to=me.CommonUtils.roundAccurately(Xe*me.CommonUtils.getDPI(),0),kn=me.CommonUtils.roundAccurately(n?.getColumnWidthAsFontUnit(Xe/ce),2).toFixed(2),no="Width: "+(Xe?kn+" ("+to+" pixels)":"Hidden"),ln=Kt.current.getGridElement().getRelativePointFromClient(0,0),$t=0-ln.y,Mn=0-ln.y+ze,oo=ln.x-nt.x;ne({anchor:{x:rt-oo,y:$t,width:bt-rt,height:Mn-$t},display:no})}const Nt=[0,0,0,nt.height],Yn={style:{boxShadow:`0.5px 0px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:F}},Jn={x:rt-1,y:0,width:1,height:nt.height},Qn={style:{boxShadow:`-0.5px 0px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:F}},eo={x:bt-1,y:0,width:1,height:nt.height};return c.jsxs(o.Fragment,{children:[c.jsx(dt.SVGLine,{linePoints:Nt,bounds:Jn,...Yn}),c.jsx(dt.SVGLine,{linePoints:Nt,bounds:eo,...Qn})]},"resize-dividers")}])};let He=null;return{onResizeHeadersStart:(Pe,Xe,We)=>{He=n.beginCommit(We),Ct.current=!1,qe(Pe,Xe)},onResizeHeaders:(Pe,Xe,We)=>{Ct.current=!1,qe(Pe,Xe)},onResizeHeadersDown:(Pe,Xe)=>{Ct.current=!0,setTimeout(()=>{Ct.current&&qe(Pe,Xe)},360)},onResizeHeadersEnd:(Pe,Xe,We)=>{He?.commit({description:We}),He=null,Ct.current=!1,requestAnimationFrame(()=>ae?.()),it.current=!1,gt(null)},onResizeHeadersUp:Pe=>{Ct.current=!1,requestAnimationFrame(()=>ae?.()),it.current=!1,gt(null)},...g}},[n,g,ze,vt]),tn=o.useMemo(()=>{const ne=me.CommonUtils.debounce(Pe=>{requestAnimationFrame(()=>{it.current&&Te?.(Pe)})},32),qe=(Pe,Xe)=>{it.current=!0,gt([We=>{if(!We.toClipBounds(We.getRangeCoordsBounds({rowStart:Pe,rowEnd:Pe,colStart:0,colEnd:Re.width})))return;const lt=We.getLayout(),rt=Math.max(0,lt.getRowOffset(Pe)),nt=We.getBounds(),bt=Math.min(nt.y+nt.height,lt.getRowOffset(Pe+1)),Tt=We.getAnchor();if(Xe!==null&&(Tt===me.AnchorLocation.Top||Tt===me.AnchorLocation.Center||Tt===me.AnchorLocation.Bottom)){const to=Math.floor(10*me.CommonUtils.getDPI())/10,kn=me.CommonUtils.roundAccurately(Xe*to,0),no=me.CommonUtils.roundAccurately(kn/ce/(n?.getRowHeaders().getScaleFactor()*me.CommonUtils.getDPI()),2).toFixed(2),ln="Height: "+(Xe?no+" ("+kn+" pixels)":"Hidden"),$t=Ut.current.getGridElement().getRelativePointFromClient(0,0),Mn=0-$t.x,oo=0-$t.x+Ze,bl=$t.y-nt.y;ne({anchor:{x:Mn,y:rt-bl,width:oo-Mn,height:bt-rt},display:ln})}const Nt=[0,0,nt.width,0],Yn={style:{boxShadow:`0px 0.5px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:F}},Jn={x:0,y:rt-1,width:nt.width,height:1},Qn={style:{boxShadow:`0px -0.5px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:F}},eo={x:0,y:bt-1,width:nt.width,height:1};return c.jsxs(o.Fragment,{children:[c.jsx(dt.SVGLine,{linePoints:Nt,bounds:Jn,...Yn}),c.jsx(dt.SVGLine,{linePoints:Nt,bounds:eo,...Qn})]},"resize-dividers")}])};let He=null;return{onResizeHeadersStart:(Pe,Xe,We)=>{He=n.beginCommit(We),Ct.current=!1,qe(Pe,Xe)},onResizeHeaders:(Pe,Xe,We)=>{Ct.current=!1,qe(Pe,Xe)},onResizeHeadersDown:(Pe,Xe)=>{Ct.current=!0,setTimeout(()=>{Ct.current&&qe(Pe,Xe)},360)},onResizeHeadersEnd:(Pe,Xe,We)=>{He?.commit({description:We}),He=null,Ct.current=!1,requestAnimationFrame(()=>ae?.()),it.current=!1,gt(null)},onResizeHeadersUp:Pe=>{Ct.current=!1,requestAnimationFrame(()=>ae?.()),it.current=!1,gt(null)},...f}},[n,f,Ze]),Mt=r.useImperativeElement(t,()=>{const ne=He=>{n?.getView()&&n.getView().selectMovables([]),Ae.current=null,W?.current?.focus(He)},qe=async(He=null)=>{if(He||(He=n?.getView().getMovableSelection()[0]),!He)return!1;const Pe=He.getAnchorCoords();if(!Pe)return!1;const Xe=W.current?.getViewFromCellCoords({colIndex:Pe.colStart,rowIndex:Pe.rowStart});if(!Xe)return!1;const We=Xe.getAnchor();n?.getView().getMovableSelection().indexOf(He)===-1&&n?.getView().selectMovables([He]);let lt=ke.current?.get(We);return lt?.current?(await lt.current.focusMovable(He),!0):(Ae.current={movable:He,anchor:We},!0)};return{getGridElement:()=>W.current,getRowHeaderElement:()=>Ut.current,getColumnHeaderElement:()=>Kt.current,rowHeaderHeight:()=>ze,colHeaderWidth:()=>Ze,startEdit:Be,submitEdit:()=>{he.setMode(He=>He?.key!=="edit"?He:{key:"edit",args:{stateAndCoords:null,submit:!0}})},cancelEdit:()=>{he.setMode(He=>He?.key!=="edit"?He:{key:"edit",args:{stateAndCoords:null,cancel:!0}})},isEditing:G!==null,focus:He=>{n?.getView().getMovableSelection().length>0&&qe()||ne(He)},focusSheet:ne,focusMovable:qe,contains:He=>W?.current?.contains?.(He),invalidate:zt,isSheetElement:()=>!0,getSheet:()=>n}},[n]),zt=o.useCallback(ne=>{Me.current||(W?.current?.invalidate(ne),J?.())},[]);o.useEffect(()=>{zt()},[Ee]);const qn=$e?Y.edgeStrokeFill:pe.fill,tt=$e?Le.fill:typeof Ee.headerHover=="function"?Ee.headerHover(pe)?.fill:pe.fill,Sn=o.useMemo(()=>P?c.jsx("div",{className:yt("sheetxl-viewport-overlay",Dl),style:{width:"100%",height:"100%",boxSizing:"border-box",position:"absolute"},children:P}):c.jsx(c.Fragment,{}),[P]);let Pt=null;ve&&xe&&(Pt=c.jsxs("div",{tabIndex:-1,className:"top-left-corner",style:{padding:"2 2",position:"absolute",height:`${ze}px`,width:`${Ze}px`,zIndex:1,boxSizing:"border-box",cursor:"cell"},onMouseDown:ne=>{let qe=!ne.ctrlKey;Ve?.getCommand("selectAll")?.execute(!qe||ne.button!==0),ne.nativeEvent.which===r.MouseButtonCodes.Right?l?.({originalEvent:ne,clientX:ne.clientX,clientY:ne.clientY,rowIndex:-1,colIndex:-1}):W.current?.focus()},children:[c.jsx("div",{style:{height:ze-5+"px",width:ze-5+"px",clipPath:`path('M${ze-5} 0 L0 ${ze-5} L${ze-5} ${ze-5} L${ze-5} 0 Z')`,borderRight:`2px solid ${qn}`,borderBottom:`2px solid ${qn}`,background:`${tt}`,boxSizing:"border-box",position:"absolute",right:"2px",bottom:"2px"}}),c.jsx("div",{style:{position:"absolute",height:`${ze}px`,width:`${Ze}px`,boxSizing:"border-box",borderRight:`solid 1px ${pe.strokeFill}`,borderBottom:`solid 1px ${pe.strokeFill}`,right:"-1px",bottom:"-1px"}})]}));const nn=r.useCallbackRef(({_left:ne,_top:qe})=>{},[]),st=r.useCallbackRef(ne=>{if(!l)return;const qe=W.current.getViewFromClient(ne.clientX,ne.clientY)?.getCellCoordsFromClient(ne.clientX,ne.clientY);qe&&(l({originalEvent:ne,clientX:ne.clientX,clientY:ne.clientY,rowIndex:qe.rowIndex,colIndex:qe.colIndex}),ne.stopPropagation(),ne.preventDefault())},[l]),mt=r.useCallbackRef(ne=>{if(!(!ne.shiftKey&&(ne.ctrlKey||ne.metaKey)))return;const{deltaY:qe}=ne;return qe>0?Ve.getCommand("sheetZoomOut")?.execute():qe<0&&Ve.getCommand("sheetZoomIn")?.execute(),qe===0},[Ve]);o.useEffect(()=>{Bt(null),Qt.current=null,it.current=!1,gt(null);const ne=n?.getView().getTopLeft();nn(ne),W.current?.scrollTo(ne),se(ne),fe(n.getView()),be(ge(n.getView().getFreezePanes())),D(ye()),J()},[n?.getView()]);const on=r.useCallbackRef(ne=>{const qe=ne.getVisibleRangeCoords();if(!qe)return null;const He=[];return n.getRange(qe).forEach((Pe,Xe)=>{const We=Xe.getCoords(),lt=Xe.getCell();(rt=>{if(rt.isEmpty())return!1;const nt=rt.getSpans();if(nt.width>1||nt.height>1||rt.getStyle().hasVisibleStyling()||le.isShowFormulas()&&rt.getFormula()!==null)return!0;const bt=rt.getValue();return bt!==null&&!(!le.isShowZeros()&&bt===0&&rt.getType()===d.ScalarType.Number)})(lt)&&He.push({coords:We,value:lt,range:le.isShowFormulas()?null:lt.getExtrusions()})},{excludeHidden:!0,includeMergeOverflow:!0}),He},[n,le.isShowZeros(),le.isShowFormulas(),G]);o.useEffect(()=>{const ne=[];N&&ne.push(...N),vt&&ne.push(...vt),me.CommonUtils.isEqualArrays(ne,Qt.current)||(Qt.current=ne,Bt(ne))},[N,vt,Ee]);const rn=o.useMemo(()=>({style:{boxShadow:`0.5px 0.5px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:i?.body?.text?.fill??"black"}}),[Ee?.header?.edgeStrokeFill]),Ht=r.useCallbackRef(ne=>{ne.isDefaultPrevented()||ne.isPropagationStopped()||(Ae.current=null,n?.getView().getMovableSelection().length>0&&n.getView().selectMovables([]))},[n]),Wn=o.useMemo(()=>{const ne=he.getMode();return ne?.key==="cut"||ne?.key==="copy"},[he]),Gn=r.useCallbackRef(async ne=>{const qe=he.getMode();return ne.keyCode===r.KeyCodes.Escape&&qe?(ne.preventDefault(),void he.setMode(null)):ne.keyCode===r.KeyCodes.Enter&&Wn?(ne.preventDefault(),await Ve?.getCommand("paste")?.execute(),void he.setMode(null)):void Ve?.dispatchToFocusedCommand(ne)},[Ve,he]),Ut=o.useRef(null),Rn=o.useMemo(()=>c.jsx("div",{tabIndex:-1,style:{position:"relative",flex:"0",top:`${ze+1}px`,width:`${Ze+pe.edgeStrokeWidth}px`,minWidth:`${Ze+pe.edgeStrokeWidth}px`,borderRight:`solid ${pe.edgeStrokeWidth}px ${pe.edgeStrokeFill}`,height:`calc(100% - ${ze}px)`,boxSizing:"border-box",zIndex:"2"},children:c.jsx(Wo,{ref:Ut,sheetElement:Mt.current,gridRef:W,freezeStart:Ce?.[me.AnchorLocation.Top],oppositeSize:Ze,containerWidth:Ze,containerHeight:oe,sheetHeader:n.getRowHeaders(),gridStyle:Ue,verticalPadding:Math.max(0,Math.floor(n.getStyles().getNormal().getFont().getSize()/10)),scrollPoint:It,onSheetContextMenu:l,tabIndex:-1,style:{position:"relative",flex:"0",top:`${ze+1}px`,width:`${Ze+pe.edgeStrokeWidth}px`,minWidth:`${Ze+pe.edgeStrokeWidth}px`,borderRight:`solid ${pe.edgeStrokeWidth}px ${pe.edgeStrokeFill}`,height:`calc(100% - ${ze}px)`,boxSizing:"border-box",zIndex:"2",...tn?.style},...tn})}),[Ze,ze,oe,n,It,Ce?.[me.AnchorLocation.Top],Ee,w,l,pe.fill,f]),Kt=o.useRef(null),gl=o.useMemo(()=>c.jsx("div",{tabIndex:-1,style:{position:"relative",left:"0px",width:"100%",height:`${ze+pe.edgeStrokeWidth}px`,minHeight:`${ze+pe.edgeStrokeWidth}px`,borderBottom:`solid ${pe.edgeStrokeWidth}px ${pe.edgeStrokeFill}`,boxSizing:"border-box",zIndex:"1"},children:c.jsx(Wo,{ref:Kt,sheetElement:Mt.current,gridRef:W,freezeStart:Ce?.[me.AnchorLocation.Left],oppositeSize:ze,containerWidth:et,containerHeight:ze,sheetHeader:n.getColumnHeaders(),gridStyle:Ue,scrollPoint:Dt,onSheetContextMenu:l,...Vt,style:{...Vt?.style,position:"relative",left:"0px",width:"100%",height:`${ze+pe.edgeStrokeWidth}px`,minHeight:`${ze+pe.edgeStrokeWidth}px`,borderBottom:`solid ${pe.edgeStrokeWidth}px ${pe.edgeStrokeFill}`,boxSizing:"border-box",zIndex:"1"}})}),[ze,et,n,Dt,Ce?.[me.AnchorLocation.Left],Ee,pe.fill,w,l,g]),hl=r.useCallbackRef(ne=>{const{value:qe,key:He,...Pe}=ne;let Xe=qe,We=G;if(!We||We.colIndex===ne.coords.colIndex&&We.rowIndex===ne.coords.rowIndex||(We=null),!Xe){const nt=ne.range;if(Xe=n.getRange({rowIndex:nt.rowStart,colIndex:nt.colStart}).getCell(),Xe.isEmpty())return null}let lt=null;Xe.getHyperlink()&&(lt=async nt=>{if(B?.onLinkMouseDown?.(nt),nt.button===0&&!nt.isDefaultPrevented()){nt.stopPropagation(),nt.preventDefault();try{await Xe.getHyperlink()?.open()}catch(bt){ot.showError?.(bt)}}}),We&&We.colIndex===ne.range.colStart&&We.rowIndex===ne.range.rowStart&&(Xe=Xe.createTemporaryCell({value:null}));const rt=n.getStyles();return o.createElement(yr,{...Pe,key:He,bodyStyle:re,docTheme:rt.getTheme(),normalStyle:rt.getNormal(),showFormulas:le.isShowFormulas(),showZeros:le.isShowZeros(),onLinkMouseDown:lt,...B,value:Xe})},[n,De,re,G,le?.isShowFormulas(),le.isShowZeros()]),ml=o.useCallback((ne,qe)=>{const{key:He,...Pe}=ne;return[c.jsx(Ll,{ref:qe,getVisibleCells:on,sheet:n,gridStyle:Ee,...Pe},`border-${He}`),c.jsx(ii,{ref:qe,sheet:n,commands:Ve,...Pe},`table-${He}`),c.jsx(ai,{ref:qe,sheet:n,...Pe},`spill-${He}`),c.jsx(Yl,{ref:qe,sheet:n,commands:Ve,onShowTooltip:we,onCloseTooltip:ae,gridStyle:Ee,gridRef:W,editingCoords:G,isActive:w,...Pe},`selection-${He}`),c.jsx(Kl,{ref:qe,sheet:n,commands:Ve,gridStyle:Ee,element:v,...Pe},`copy-paste-${He}`),c.jsx(ni,{ref:qe,sheet:n,commands:Ve,target:Ie,renderMovable:K,movableProps:{onUnFocus:()=>{Mt.current.focus()}},...Pe},`movable-${He}`),c.jsx(oi,{ref:qe,sheet:n,commands:Ve,gridStyle:Ee,getCellEditor:O,showProtectedError:pt,setEditingCoords:u,...Pe},`editor-${He}`)]},[n,W.current,Ee,O,Ve,ot]),[Eo,fl]=o.useState(!1),pl=o.useMemo(()=>{if(et===0||oe===0)return null;const ne=n.getStyles().getNormal(),qe=ne.getFont(),He=ne.getFill(),Pe=ne.getBorder(),Xe=ne.getFill().getType()===d.IFill.Type.None;let We=ie,lt=ie;const rt=(bt,Tt,Nt)=>Nt?{stroke:Pe.getBottom().isNone()?"none":bt.getColor().toRGBA(re.darkMode).toString(),...Tt}:Tt;lt=rt(Pe.getBottom(),lt,!Pe.getBottom().isNone()),lt=rt(Pe.getTop(),lt,!Pe.getTop().isNone()),We=rt(Pe.getRight(),We,!Pe.getRight().isNone()),We=rt(Pe.getLeft(),We,!Pe.getLeft().isNone());let nt=le?.getGridLineColor()?.toRGBA(re.darkMode).toString()??re.strokeFill;return Xe||(lt=rt(Pe.getBottom(),lt,!0),lt=rt(Pe.getTop(),lt,!0),We=rt(Pe.getRight(),We,!0),We=rt(Pe.getLeft(),We,!0)),c.jsx(dt.Grid,{className:"sheetxl-sheet-primary",style:{...si,...He.toCSS(re.darkMode),...qe.toCSS(re.darkMode,ce),"--sxl-app-color-background":re.fill,"--sxl-app-color-shadow":Ee.colorShadow,"--sxl-app-color-grey":Ee.colorGrey,"--sxl-app-color-button-fill":te.fill,"--sxl-app-color-button-text":te.text?.fill,"--sxl-app-color-button-border":te.edgeStrokeFill,"--sxl-app-color-primary-dark":Ee.selection.strokeFill},ref:W,zoom:ce,...X,onFirstRender:bt=>{fl(!0),X?.onFirstRender?.(bt),Ve?.activate()},showGridLines:Se,gridLineColor:nt,gridLineColumnsProps:We,gridLineRowsProps:lt,freezeLeft:Ce?.[me.AnchorLocation.Left],freezeLeftProps:rn,freezeTop:Ce?.[me.AnchorLocation.Top],freezeTopProps:rn,width:et,height:oe,columnCount:Re.width,rowCount:Re.height,cursor:wt??ht??"cell",clipCells:!0,layout:De,cellRenderer:hl,overlayRenderer:ml,getCellCoordsAsRangeCoords:de,getVisibleCells:on,onWheelScroll:mt,onPointerDown:Ht,onKeyDown:Gn,onViewportChange:V,onImmediateScroll:nn,scrollPoint:Q,stageProps:{onFocus:()=>{Ve?.activate()}},overlays:Et})},[H]);o.useEffect(()=>{Me.current||J()},[De,Ce,ce,Ve,Q?.left,Q?.top,re,X,et,oe,wt,Et,w,ht]);let _n={flex:"1 1 100%",display:"flex",alignContent:"stretch",position:"relative"};S||(_n={..._n,...T});const vl=o.useMemo(()=>{const ne=n.getStyles().getTheme(),qe=ne.getColorScheme(),He=ne.getFontScheme();return{"--sxl-doc-color-dk1":qe.getDk1().toCSS(re.darkMode),"--sxl-doc-color-dk2":qe.getDk2().toCSS(re.darkMode),"--sxl-doc-color-lt1":qe.getLt1().toCSS(re.darkMode),"--sxl-doc-color-lt2":qe.getLt2().toCSS(re.darkMode),"--sxl-doc-color-accent1":qe.getAccent1().toCSS(re.darkMode),"--sxl-doc-color-accent2":qe.getAccent2().toCSS(re.darkMode),"--sxl-doc-color-accent3":qe.getAccent3().toCSS(re.darkMode),"--sxl-doc-color-accent4":qe.getAccent4().toCSS(re.darkMode),"--sxl-doc-color-accent5":qe.getAccent5().toCSS(re.darkMode),"--sxl-doc-color-accent6":qe.getAccent6().toCSS(re.darkMode),"--sxl-doc-color-hlink":qe.getHlink().toCSS(re.darkMode),"--sxl-doc-color-fol-hlink":qe.getFolHlink().toCSS(re.darkMode),"--sxl-doc-font-major":He.getMajorFont(),"--sxl-doc-font-minor":He.getMinorFont()}},[n.getStyles().getTheme()]);let Zn=c.jsx("div",{style:_n,onTouchStart:()=>{Fo()},onFocus:ne=>{L(!0),m?.(ne)},onBlur:ne=>{L(!1),q?.(ne)},ref:Mt,...j,children:c.jsx("div",{className:yt("sheetxl-sheet",Al),style:{position:"absolute",width:"100%",height:"100%",boxSizing:"border-box",display:"flex",flexDirection:"column",flex:"1 1 100%",zIndex:"0",...vl},children:c.jsxs("div",{style:{display:"flex",flexDirection:"row",flex:"1 1 100%"},children:[Pt,Rn,c.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:"1 1 100%",overflow:"hidden",position:"relative"},children:[gl,c.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:"1 1 100%",position:"relative",borderRight:`solid ${pe.edgeStrokeWidth}px ${pe.edgeStrokeFill}`,backgroundColor:re.fill},ref:M,onContextMenu:st,children:[pl,Sn,c.jsx(zl,{style:{position:"absolute",right:24,bottom:4},colorLicensee:Ee?.selection?.strokeFill,colorCredits:Ee?.body?.text?.fill})]})]})]})})});if(S){const ne=qe=>c.jsx(wo,{...qe,sheet:n});Zn=c.jsx(r.ScrollPane,{style:{flex:"1 1 100%",overflow:"hidden",background:`${pe.fill}`,minHeight:2*Fe.height,minWidth:2*Fe.width,...T},viewport:z,touchElement:W.current?.stage,disableTouch:at,onScrollViewport:qe=>{W.current?.scrollTo(qe)},createHorizontalScrollbar:ne,createVerticalScrollbar:ne,...p,children:Zn})}o.useEffect(()=>{Me.current=!1,J?.(),ee&&Mt.current?.focus()},[n]);const[Xn,Cl]=o.useState(!1),Fo=r.useCallbackRef(()=>{Xn||Cl(!0)},[Xn]);return o.useEffect(()=>{if(Eo)return typeof R=="function"&&R(),r.ReactUtils.detectIt().primaryInput==="touch"&&Fo(),()=>{}},[R,Eo,Xn]),Zn}));Dr.displayName="SheetElement";const ci=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Yo="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=",zr=o.memo(o.forwardRef((e,t)=>{const{children:n,disabled:i,style:a,picture:l,description:C,isDragging:g,view:s,onHide:f,onShow:S,onKeyDownCapture:p,onFocus:h,onBlur:E,loadingPanel:x,...A}=e,[N,K]=o.useState(!1),[P,R]=o.useState(null),[O,m]=o.useState(null),[q,T]=o.useState(null);o.useEffect(()=>{m(null),l.getDetails().then(k=>{K(!1),m(k.asUrl()),k.asSVGText?.()&&T(k.asSVGText())}).catch(k=>{console.warn(k),K(!0),m(Yo),T(null)})},[l]);const $=r.useImperativeElement(t,()=>({isPictureEditor:()=>!0}),[]),I=o.useMemo(()=>{if(O||q)return c.jsx("img",{style:{flex:"1",width:"100%",height:"100%",border:N?"var(--sxl-app-color-grey, grey) solid 1px":void 0,backgroundColor:N?"var(--sxl-app-color-background, white)":void 0,boxShadow:N?"0px 0px 3px var(--sxl-app-color-error, red)":void 0,objectFit:N?"contain":void 0,opacity:P?1:0,filter:"var(--sxl-app-filter-dark-invert)"},draggable:!1,src:O,onLoad:()=>{R(!0)},onError:({currentTarget:k})=>{console.log("error"),k.onerror=null,m(Yo),K(!0)},alt:C??`${l.getType()}`})},[P,l,O,q,g]);if(!l.isClosed())return c.jsxs("div",{className:"picture-editor",style:{position:"relative",display:"flex",flex:"1 1 100%",filter:g?"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,...A,onKeyDownCapture:k=>{p?.(k)},ref:$,children:[P||N?void 0:x,I]})}));zr.displayName="PictureEditor";const ui=o.memo(o.forwardRef((e,t)=>{const{children:n,disabled:i,chart:a,view:l,isDragging:C,onHide:g,onShow:s,...f}=e;o.useEffect(()=>{},[a]);const S=r.useImperativeElement(t,()=>({isChartEditor:()=>!0}),[]),[p,{height:h,width:E}]=Ot();if(!a.isClosed())return c.jsx("div",{...f,ref:Xt([S,p]),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:l.getZoom(),display:"flex",position:"relative",border:"var(--sxl-app-color-grey, grey) solid 1px",filter:i?"blur(1px)":void 0,boxShadow:C?"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()})})})})),gi="_editable-input_1bqx6_6",hi=e=>c.jsx("input",{...e}),Nr=o.memo(o.forwardRef((e,t)=>{const{style:n={},className:i,value:a="",onSubmit:l,onChange:C,onCancel:g,createInput:s=hi,styleHover:f={},dragging:S,maxLength:p,disabled:h=!1,readOnly:E=!1,...x}=e,[A,N]=o.useState(!1),[K,P]=o.useState(!1),[R,O]=o.useState(a);o.useEffect(()=>{O(a)},[a]);const m=o.useRef(null),[q,T]=o.useState(null),$=r.useNotifier(),I=o.useCallback(function(J){const M=J.message;q!==M&&($?.showMessage?.(M,{type:r.NotifierType.Error}),T(M))},[$,q]),k=o.useCallback(J=>{let M=!1;try{M=l?.(J)??!0}catch(U){I(U)}return M?(m.current=null,P(!1),O(J),M):(setTimeout(()=>{m.current?.focus()},0),M)},[l]),Z=r.useCallbackRef(()=>{O(a),m.current=null,P(!1),g?.()},[g,a]),X=o.useMemo(()=>{if(!K)return null;const J={className:yt(gi),autoFocus:!0,spellCheck:!1,name:"editable-label",autoComplete:"off",maxLength:p,type:"text",value:R,onFocus:M=>{m.current||(m.current=M.target,setTimeout(()=>{M.target?.select()},0))},onBlur:M=>{m.current&&k(R)},onChange:M=>{K&&O(M.target.value)},onMouseDown:M=>M.stopPropagation(),onKeyDown:M=>M.code==="Escape"?(M.preventDefault(),void Z()):M.code==="Enter"?(M.preventDefault(),void k(M.target.value)):void(M.code!=="Tab"?M.stopPropagation():k(M.target.value))};return c.jsx(c.Fragment,{children:s(J)})},[K,R,k,Z,s,h]),[B,j]=o.useState();o.useLayoutEffect(()=>{let J=Object.assign({},n);(S||A)&&(J=Object.assign(J,f)),j(J)},[S,A,f,n]),o.useEffect(()=>{X&&C?.(R)},[X,C,R]);const H=r.useImperativeElement(t,()=>({startEdit(){h||E||P(!0)},cancel(){Z()}}),[]);return c.jsxs("div",{...x,ref:H,style:{flexDirection:"column",display:"flex",...B},className:yt(i),children:[c.jsxs("div",{style:{position:"relative",boxSizing:"content-box",whiteSpace:"pre",userSelect:"none",display:"flex",justifyContent:"center"},onDoubleClick:()=>{h||E||P(!0)},onMouseEnter:()=>N(!0),onMouseLeave:()=>N(!1),children:[c.jsx("div",{className:"editable-label-container",style:{textAlign:"center",display:"flex",minHeight:"1em",marginTop:"2px",opacity:K?0:1},children:R}),X]}),c.jsx("div",{style:{whiteSpace:"pre",position:"relative",maxHeight:"0px",height:"0px",visibility:"hidden",marginLeft:"1px",marginRight:"1px",overflow:"hidden",...f},children:R})]})})),Pn=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 xo(e){return"nodeType"in e}function ft(e){var t,n;return e?Yt(e)?e:xo(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function qo(e){const{Document:t}=ft(e);return e instanceof t}function bn(e){return!Yt(e)&&e instanceof ft(e).HTMLElement}function Lr(e){return e instanceof ft(e).SVGElement}function Zt(e){return e?Yt(e)?e.document:xo(e)?qo(e)?e:bn(e)||Lr(e)?e.ownerDocument:document:document:document}const Rt=Pn?o.useLayoutEffect:o.useEffect;function Hn(e){const t=o.useRef(e);return Rt(()=>{t.current=e}),o.useCallback(function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return t.current==null?void 0:t.current(...i)},[])}function pn(e,t){t===void 0&&(t=[e]);const n=o.useRef(e);return Rt(()=>{n.current!==e&&(n.current=e)},t),n}function un(e,t){const n=o.useRef();return o.useMemo(()=>{const i=e(n.current);return n.current=i,i},[...t])}function zn(e){const t=Hn(e),n=o.useRef(null),i=o.useCallback(a=>{a!==n.current&&t?.(a,n.current),n.current=a},[]);return[n,i]}function Nn(e){const t=o.useRef();return o.useEffect(()=>{t.current=e},[e]),t.current}let io={};function yn(e,t){return o.useMemo(()=>{if(t)return t;const n=io[e]==null?0:io[e]+1;return io[e]=n,e+"-"+n},[e,t])}function Or(e){return function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];return i.reduce((l,C)=>{const g=Object.entries(C);for(const[s,f]of g){const S=l[s];S!=null&&(l[s]=S+e*f)}return l},{...t})}}const _t=Or(1),vn=Or(-1);function Un(e){if(!e)return!1;const{KeyboardEvent:t}=ft(e.target);return t&&e instanceof t}function Ln(e){if((function(t){if(!t)return!1;const{TouchEvent:n}=ft(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 jt=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[jt.Translate.toString(e),jt.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:i}=e;return t+" "+n+"ms "+i}}}),Jo="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function mi(e){return e.matches(Jo)?e:e.querySelector(Jo)}const fi={display:"none"};function pi(e){let{id:t,value:n}=e;return o.createElement("div",{id:t,style:fi},n)}function vi(e){let{id:t,announcement:n,ariaLiveType:i="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":i,"aria-atomic":!0},n)}const jr=o.createContext(null),Ci={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
- `},bi={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 yi(e){let{announcements:t=bi,container:n,hiddenTextDescribedById:i,screenReaderInstructions:a=Ci}=e;const{announce:l,announcement:C}=(function(){const[p,h]=o.useState("");return{announce:o.useCallback(E=>{E!=null&&h(E)},[]),announcement:p}})(),g=yn("DndLiveRegion"),[s,f]=o.useState(!1);if(o.useEffect(()=>{f(!0)},[]),(function(p){const h=o.useContext(jr);o.useEffect(()=>{if(!h)throw new Error("useDndMonitor must be used within a children of <DndContext>");return h(p)},[p,h])})(o.useMemo(()=>({onDragStart(p){let{active:h}=p;l(t.onDragStart({active:h}))},onDragMove(p){let{active:h,over:E}=p;t.onDragMove&&l(t.onDragMove({active:h,over:E}))},onDragOver(p){let{active:h,over:E}=p;l(t.onDragOver({active:h,over:E}))},onDragEnd(p){let{active:h,over:E}=p;l(t.onDragEnd({active:h,over:E}))},onDragCancel(p){let{active:h,over:E}=p;l(t.onDragCancel({active:h,over:E}))}}),[l,t])),!s)return null;const S=o.createElement(o.Fragment,null,o.createElement(pi,{id:i,value:a.draggable}),o.createElement(vi,{id:g,announcement:C}));return n?Lt.createPortal(S,n):S}var ct;function On(){}function ao(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"})(ct||(ct={}));const kt=Object.freeze({x:0,y:0});function Br(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function wi(e,t){const n=Ln(e);return n?(n.x-t.left)/t.width*100+"% "+(n.y-t.top)/t.height*100+"%":"0 0"}function Vr(e,t){let{data:{value:n}}=e,{data:{value:i}}=t;return n-i}function xi(e,t){let{data:{value:n}}=e,{data:{value:i}}=t;return i-n}function Qo(e){let{left:t,top:n,height:i,width:a}=e;return[{x:t,y:n},{x:t+a,y:n},{x:t,y:n+i},{x:t+a,y:n+i}]}function Pr(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function er(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 qi=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:i}=e;const a=er(t,t.left,t.top),l=[];for(const C of i){const{id:g}=C,s=n.get(g);if(s){const f=Br(er(s),a);l.push({id:g,data:{droppableContainer:C,value:f}})}}return l.sort(Vr)};function Si(e,t){const n=Math.max(t.top,e.top),i=Math.max(t.left,e.left),a=Math.min(t.left+t.width,e.left+e.width),l=Math.min(t.top+t.height,e.top+e.height),C=a-i,g=l-n;if(i<a&&n<l){const s=t.width*t.height,f=e.width*e.height,S=C*g;return Number((S/(s+f-S)).toFixed(4))}return 0}const Ri=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:i}=e;const a=[];for(const l of i){const{id:C}=l,g=n.get(C);if(g){const s=Si(g,t);s>0&&a.push({id:C,data:{droppableContainer:l,value:s}})}}return a.sort(xi)};function tr(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:kt}function ki(e){return function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];return i.reduce((l,C)=>({...l,top:l.top+e*C.y,bottom:l.bottom+e*C.y,left:l.left+e*C.x,right:l.right+e*C.x}),{...t})}}const Mi=ki(1);function Hr(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 Ti={ignoreTransform:!1};function Jt(e,t){t===void 0&&(t=Ti);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:f,transformOrigin:S}=ft(e).getComputedStyle(e);f&&(n=(function(p,h,E){const x=Hr(h);if(!x)return p;const{scaleX:A,scaleY:N,x:K,y:P}=x,R=p.left-K-(1-A)*parseFloat(E),O=p.top-P-(1-N)*parseFloat(E.slice(E.indexOf(" ")+1)),m=A?p.width/A:p.width,q=N?p.height/N:p.height;return{width:m,height:q,top:O,right:R+m,bottom:O+q,left:R}})(n,f,S))}const{top:i,left:a,width:l,height:C,bottom:g,right:s}=n;return{top:i,left:a,width:l,height:C,bottom:g,right:s}}function nr(e){return Jt(e,{ignoreTransform:!0})}function Kn(e,t){const n=[];return e?(function i(a){if(t!=null&&n.length>=t||!a)return n;if(qo(a)&&a.scrollingElement!=null&&!n.includes(a.scrollingElement))return n.push(a.scrollingElement),n;if(!bn(a)||Lr(a)||n.includes(a))return n;const l=ft(e).getComputedStyle(a);return a!==e&&(function(C,g){g===void 0&&(g=ft(C).getComputedStyle(C));const s=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(f=>{const S=g[f];return typeof S=="string"&&s.test(S)})})(a,l)&&n.push(a),(function(C,g){return g===void 0&&(g=ft(C).getComputedStyle(C)),g.position==="fixed"})(a,l)?n:i(a.parentNode)})(e):n}function Ur(e){const[t]=Kn(e,1);return t??null}function so(e){return Pn&&e?Yt(e)?e:xo(e)?qo(e)||e===Zt(e).scrollingElement?window:bn(e)?e:null:null:null}function Kr(e){return Yt(e)?e.scrollX:e.scrollLeft}function $r(e){return Yt(e)?e.scrollY:e.scrollTop}function mo(e){return{x:Kr(e),y:$r(e)}}var ut;function Wr(e){return!(!Pn||!e)&&e===document.scrollingElement}function Gr(e){const t={x:0,y:0},n=Wr(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},i={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=i.y,isRight:e.scrollLeft>=i.x,maxScroll:i,minScroll:t}}(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(ut||(ut={}));const Ii={x:.2,y:.2};function Ei(e,t,n,i,a){let{top:l,left:C,right:g,bottom:s}=n;i===void 0&&(i=10),a===void 0&&(a=Ii);const{isTop:f,isBottom:S,isLeft:p,isRight:h}=Gr(e),E={x:0,y:0},x={x:0,y:0},A=t.height*a.y,N=t.width*a.x;return!f&&l<=t.top+A?(E.y=ut.Backward,x.y=i*Math.abs((t.top+A-l)/A)):!S&&s>=t.bottom-A&&(E.y=ut.Forward,x.y=i*Math.abs((t.bottom-A-s)/A)),!h&&g>=t.right-N?(E.x=ut.Forward,x.x=i*Math.abs((t.right-N-g)/N)):!p&&C<=t.left+N&&(E.x=ut.Backward,x.x=i*Math.abs((t.left+N-C)/N)),{direction:E,speed:x}}function Fi(e){if(e===document.scrollingElement){const{innerWidth:l,innerHeight:C}=window;return{top:0,left:0,right:l,bottom:C,width:l,height:C}}const{top:t,left:n,right:i,bottom:a}=e.getBoundingClientRect();return{top:t,left:n,right:i,bottom:a,width:e.clientWidth,height:e.clientHeight}}function _r(e){return e.reduce((t,n)=>_t(t,mo(n)),kt)}function Zr(e,t){if(t===void 0&&(t=Jt),!e)return;const{top:n,left:i,bottom:a,right:l}=t(e);Ur(e)&&(a<=0||l<=0||n>=window.innerHeight||i>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Ai=[["x",["left","right"],function(e){return e.reduce((t,n)=>t+Kr(n),0)}],["y",["top","bottom"],function(e){return e.reduce((t,n)=>t+$r(n),0)}]];class fo{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 i=Kn(n),a=_r(i);this.rect={...t},this.width=t.width,this.height=t.height;for(const[l,C,g]of Ai)for(const s of C)Object.defineProperty(this,s,{get:()=>{const f=g(i),S=a[l]-f;return this.rect[s]+S},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class gn{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var i;return(i=this.target)==null?void 0:i.removeEventListener(...n)})},this.target=t}add(t,n,i){var a;(a=this.target)==null||a.addEventListener(t,n,i),this.listeners.push([t,n,i])}}function co(e,t){const n=Math.abs(e.x),i=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+i**2)>t:"x"in t&&"y"in t?n>t.x&&i>t.y:"x"in t?n>t.x:"y"in t&&i>t.y}var xt,Je;function or(e){e.preventDefault()}function Di(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"})(xt||(xt={})),(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 Xr={start:[Je.Space,Je.Enter],cancel:[Je.Esc],end:[Je.Space,Je.Enter,Je.Tab]},zi=(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 So{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 gn(Zt(n)),this.windowListeners=new gn(ft(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(xt.Resize,this.handleCancel),this.windowListeners.add(xt.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(xt.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,i=t.node.current;i&&Zr(i),n(kt)}handleKeyDown(t){if(Un(t)){const{active:n,context:i,options:a}=this.props,{keyboardCodes:l=Xr,coordinateGetter:C=zi,scrollBehavior:g="smooth"}=a,{code:s}=t;if(l.end.includes(s))return void this.handleEnd(t);if(l.cancel.includes(s))return void this.handleCancel(t);const{collisionRect:f}=i.current,S=f?{x:f.left,y:f.top}:kt;this.referenceCoordinates||(this.referenceCoordinates=S);const p=C(t,{active:n,context:i.current,currentCoordinates:S});if(p){const h=vn(p,S),E={x:0,y:0},{scrollableAncestors:x}=i.current;for(const A of x){const N=t.code,{isTop:K,isRight:P,isLeft:R,isBottom:O,maxScroll:m,minScroll:q}=Gr(A),T=Fi(A),$={x:Math.min(N===Je.Right?T.right-T.width/2:T.right,Math.max(N===Je.Right?T.left:T.left+T.width/2,p.x)),y:Math.min(N===Je.Down?T.bottom-T.height/2:T.bottom,Math.max(N===Je.Down?T.top:T.top+T.height/2,p.y))},I=N===Je.Right&&!P||N===Je.Left&&!R,k=N===Je.Down&&!O||N===Je.Up&&!K;if(I&&$.x!==p.x){const Z=A.scrollLeft+h.x,X=N===Je.Right&&Z<=m.x||N===Je.Left&&Z>=q.x;if(X&&!h.y)return void A.scrollTo({left:Z,behavior:g});E.x=X?A.scrollLeft-Z:N===Je.Right?A.scrollLeft-m.x:A.scrollLeft-q.x,E.x&&A.scrollBy({left:-E.x,behavior:g});break}if(k&&$.y!==p.y){const Z=A.scrollTop+h.y,X=N===Je.Down&&Z<=m.y||N===Je.Up&&Z>=q.y;if(X&&!h.x)return void A.scrollTo({top:Z,behavior:g});E.y=X?A.scrollTop-Z:N===Je.Down?A.scrollTop-m.y:A.scrollTop-q.y,E.y&&A.scrollBy({top:-E.y,behavior:g});break}}this.handleMove(t,_t(vn(p,this.referenceCoordinates),E))}}}handleMove(t,n){const{onMove:i}=this.props;t.preventDefault(),i(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 rr(e){return!!(e&&"distance"in e)}function lr(e){return!!(e&&"delay"in e)}So.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:i=Xr,onActivation:a}=t,{active:l}=n;const{code:C}=e.nativeEvent;if(i.start.includes(C)){const g=l.activatorNode.current;return(!g||e.target===g)&&(e.preventDefault(),a?.({event:e.nativeEvent}),!0)}return!1}}];class Ro{constructor(t,n,i){var a;i===void 0&&(i=(function(g){const{EventTarget:s}=ft(g);return g instanceof s?g:Zt(g)})(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:l}=t,{target:C}=l;this.props=t,this.events=n,this.document=Zt(C),this.documentListeners=new gn(this.document),this.listeners=new gn(i),this.windowListeners=new gn(ft(C)),this.initialCoordinates=(a=Ln(l))!=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:i}}}=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(xt.Resize,this.handleCancel),this.windowListeners.add(xt.DragStart,or),this.windowListeners.add(xt.VisibilityChange,this.handleCancel),this.windowListeners.add(xt.ContextMenu,or),this.documentListeners.add(xt.Keydown,this.handleKeydown),n){if(i!=null&&i({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(lr(n))return this.timeoutId=setTimeout(this.handleStart,n.delay),void this.handlePending(n);if(rr(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:i,onPending:a}=this.props;a(i,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(xt.Click,Di,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(xt.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:i,initialCoordinates:a,props:l}=this,{onMove:C,options:{activationConstraint:g}}=l;if(!a)return;const s=(n=Ln(t))!=null?n:kt,f=vn(a,s);if(!i&&g){if(rr(g)){if(g.tolerance!=null&&co(f,g.tolerance))return this.handleCancel();if(co(f,g.distance))return this.handleStart()}return lr(g)&&co(f,g.tolerance)?this.handleCancel():void this.handlePending(g,f)}t.cancelable&&t.preventDefault(),C(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 Ni={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Yr extends Ro{constructor(t){const{event:n}=t,i=Zt(n.target);super(t,Ni,i)}}Yr.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;return!(!n.isPrimary||n.button!==0)&&(i?.({event:n}),!0)}}];const Li={move:{name:"mousemove"},end:{name:"mouseup"}};var po;(function(e){e[e.RightClick=2]="RightClick"})(po||(po={}));class Jr extends Ro{constructor(t){super(t,Li,Zt(t.event.target))}}Jr.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;return n.button!==po.RightClick&&(i?.({event:n}),!0)}}];const uo={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Qr extends Ro{constructor(t){super(t,uo)}static setup(){return window.addEventListener(uo.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(uo.move.name,t)};function t(){}}}var hn,jn;function Oi(e){let{acceleration:t,activator:n=hn.Pointer,canScroll:i,draggingRect:a,enabled:l,interval:C=5,order:g=jn.TreeOrder,pointerCoordinates:s,scrollableAncestors:f,scrollableAncestorRects:S,delta:p,threshold:h}=e;const E=(function(q){let{delta:T,disabled:$}=q;const I=Nn(T);return un(k=>{if($||!I||!k)return ji;const Z={x:Math.sign(T.x-I.x),y:Math.sign(T.y-I.y)};return{x:{[ut.Backward]:k.x[ut.Backward]||Z.x===-1,[ut.Forward]:k.x[ut.Forward]||Z.x===1},y:{[ut.Backward]:k.y[ut.Backward]||Z.y===-1,[ut.Forward]:k.y[ut.Forward]||Z.y===1}}},[$,T,I])})({delta:p,disabled:!l}),[x,A]=(function(){const q=o.useRef(null);return[o.useCallback((T,$)=>{q.current=setInterval(T,$)},[]),o.useCallback(()=>{q.current!==null&&(clearInterval(q.current),q.current=null)},[])]})(),N=o.useRef({x:0,y:0}),K=o.useRef({x:0,y:0}),P=o.useMemo(()=>{switch(n){case hn.Pointer:return s?{top:s.y,bottom:s.y,left:s.x,right:s.x}:null;case hn.DraggableRect:return a}},[n,a,s]),R=o.useRef(null),O=o.useCallback(()=>{const q=R.current;if(!q)return;const T=N.current.x*K.current.x,$=N.current.y*K.current.y;q.scrollBy(T,$)},[]),m=o.useMemo(()=>g===jn.TreeOrder?[...f].reverse():f,[g,f]);o.useEffect(()=>{if(l&&f.length&&P){for(const q of m){if(i?.(q)===!1)continue;const T=f.indexOf(q),$=S[T];if(!$)continue;const{direction:I,speed:k}=Ei(q,$,P,t,h);for(const Z of["x","y"])E[Z][I[Z]]||(k[Z]=0,I[Z]=0);if(k.x>0||k.y>0)return A(),R.current=q,x(O,C),N.current=k,void(K.current=I)}N.current={x:0,y:0},K.current={x:0,y:0},A()}else A()},[t,O,i,A,l,C,JSON.stringify(P),JSON.stringify(E),x,f,m,S,JSON.stringify(h)])}Qr.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;const{touches:a}=n;return!(a.length>1)&&(i?.({event:n}),!0)}}],(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(hn||(hn={})),(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(jn||(jn={}));const ji={x:{[ut.Backward]:!1,[ut.Forward]:!1},y:{[ut.Backward]:!1,[ut.Forward]:!1}};var Cn,vo;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Cn||(Cn={})),(function(e){e.Optimized="optimized"})(vo||(vo={}));const ir=new Map;function Co(e,t){return un(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Bn(e){let{callback:t,disabled:n}=e;const i=Hn(t),a=o.useMemo(()=>{if(n||typeof window>"u"||window.ResizeObserver===void 0)return;const{ResizeObserver:l}=window;return new l(i)},[n]);return o.useEffect(()=>()=>a?.disconnect(),[a]),a}function Bi(e){return new fo(Jt(e),e)}function ar(e,t,n){t===void 0&&(t=Bi);const[i,a]=o.useState(null);function l(){a(s=>{if(!e)return null;var f;if(e.isConnected===!1)return(f=s??n)!=null?f:null;const S=t(e);return JSON.stringify(s)===JSON.stringify(S)?s:S})}const C=(function(s){let{callback:f,disabled:S}=s;const p=Hn(f),h=o.useMemo(()=>{if(S||typeof window>"u"||window.MutationObserver===void 0)return;const{MutationObserver:E}=window;return new E(p)},[p,S]);return o.useEffect(()=>()=>h?.disconnect(),[h]),h})({callback(s){if(e)for(const f of s){const{type:S,target:p}=f;if(S==="childList"&&p instanceof HTMLElement&&p.contains(e)){l();break}}}}),g=Bn({callback:l});return Rt(()=>{l(),e?(g?.observe(e),C?.observe(document.body,{childList:!0,subtree:!0})):(g?.disconnect(),C?.disconnect())},[e]),i}const sr=[];function dr(e,t){t===void 0&&(t=[]);const n=o.useRef(null);return o.useEffect(()=>{n.current=null},t),o.useEffect(()=>{const i=e!==kt;i&&!n.current&&(n.current=e),!i&&n.current&&(n.current=null)},[e]),n.current?vn(e,n.current):kt}function cr(e){return o.useMemo(()=>e?(function(t){const n=t.innerWidth,i=t.innerHeight;return{top:0,left:0,right:n,bottom:i,width:n,height:i}})(e):null,[e])}const ur=[];function el(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return bn(t)?t:e}const Vi=[{sensor:Yr,options:{}},{sensor:So,options:{}}],Pi={current:{}},An={draggable:{measure:nr},droppable:{measure:nr,strategy:Cn.WhileDragging,frequency:vo.Optimized},dragOverlay:{measure:Jt}};class mn 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,i;return(n=(i=this.get(t))==null?void 0:i.node.current)!=null?n:void 0}}const Hi={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new mn,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:On},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:An,measureDroppableContainers:On,windowRect:null,measuringScheduled:!1},tl={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:On,draggableNodes:new Map,over:null,measureDroppableContainers:On},wn=o.createContext(tl),nl=o.createContext(Hi);function Ui(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new mn}}}function Ki(e,t){switch(t.type){case ct.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case ct.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 ct.DragEnd:case ct.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ct.RegisterDroppable:{const{element:n}=t,{id:i}=n,a=new mn(e.droppable.containers);return a.set(i,n),{...e,droppable:{...e.droppable,containers:a}}}case ct.SetDroppableDisabled:{const{id:n,key:i,disabled:a}=t,l=e.droppable.containers.get(n);if(!l||i!==l.key)return e;const C=new mn(e.droppable.containers);return C.set(n,{...l,disabled:a}),{...e,droppable:{...e.droppable,containers:C}}}case ct.UnregisterDroppable:{const{id:n,key:i}=t,a=e.droppable.containers.get(n);if(!a||i!==a.key)return e;const l=new mn(e.droppable.containers);return l.delete(n),{...e,droppable:{...e.droppable,containers:l}}}default:return e}}function $i(e){let{disabled:t}=e;const{active:n,activatorEvent:i,draggableNodes:a}=o.useContext(wn),l=Nn(i),C=Nn(n?.id);return o.useEffect(()=>{if(!t&&!i&&l&&C!=null){if(!Un(l)||document.activeElement===l.target)return;const g=a.get(C);if(!g)return;const{activatorNode:s,node:f}=g;if(!s.current&&!f.current)return;requestAnimationFrame(()=>{for(const S of[s.current,f.current]){if(!S)continue;const p=mi(S);if(p){p.focus();break}}})}},[i,t,a,C,l]),null}function ol(e,t){let{transform:n,...i}=t;return e!=null&&e.length?e.reduce((a,l)=>l({transform:a,...i}),n):n}const $n=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 Wi=o.memo(function(e){var t,n,i,a;let{id:l,accessibility:C,autoScroll:g=!0,children:s,sensors:f=Vi,collisionDetection:S=Ri,measuring:p,modifiers:h,...E}=e;const x=o.useReducer(Ki,void 0,Ui),[A,N]=x,[K,P]=(function(){const[y]=o.useState(()=>new Set),V=o.useCallback(_=>(y.add(_),()=>y.delete(_)),[y]);return[o.useCallback(_=>{let{type:Q,event:se}=_;y.forEach(de=>{var ge;return(ge=de[Q])==null?void 0:ge.call(de,se)})},[y]),V]})(),[R,O]=o.useState(At.Uninitialized),m=R===At.Initialized,{draggable:{active:q,nodes:T,translate:$},droppable:{containers:I}}=A,k=q!=null?T.get(q):null,Z=o.useRef({initial:null,translated:null}),X=o.useMemo(()=>{var y;return q!=null?{id:q,data:(y=k?.data)!=null?y:Pi,rect:Z}:null},[q,k]),B=o.useRef(null),[j,H]=o.useState(null),[J,M]=o.useState(null),U=pn(E,Object.values(E)),ue=yn("DndDescribedBy",l),we=o.useMemo(()=>I.getEnabled(),[I]),je=(Te=p,o.useMemo(()=>({draggable:{...An.draggable,...Te?.draggable},droppable:{...An.droppable,...Te?.droppable},dragOverlay:{...An.dragOverlay,...Te?.dragOverlay}}),[Te?.draggable,Te?.droppable,Te?.dragOverlay]));var Te;const{droppableRects:ae,measureDroppableContainers:Me,measuringScheduled:Ke}=(function(y,V){let{dragging:_,dependencies:Q,config:se}=V;const[de,ge]=o.useState(null),{frequency:Ce,measure:be,strategy:he}=se,Ie=o.useRef(y),Be=(function(){switch(he){case Cn.Always:return!1;case Cn.BeforeDragging:return _;default:return!_}})(),Ne=pn(Be),Ve=o.useCallback(function(Oe){Oe===void 0&&(Oe=[]),Ne.current||ge(Ye=>Ye===null?Oe:Ye.concat(Oe.filter(at=>!Ye.includes(at))))},[Ne]),$e=o.useRef(null),_e=un(Oe=>{if(Be&&!_)return ir;if(!Oe||Oe===ir||Ie.current!==y||de!=null){const Ye=new Map;for(let at of y){if(!at)continue;if(de&&de.length>0&&!de.includes(at.id)&&at.rect.current){Ye.set(at.id,at.rect.current);continue}const ht=at.node.current,qt=ht?new fo(be(ht),ht):null;at.rect.current=qt,qt&&Ye.set(at.id,qt)}return Ye}return Oe},[y,de,_,Be,be]);return o.useEffect(()=>{Ie.current=y},[y]),o.useEffect(()=>{Be||Ve()},[_,Be]),o.useEffect(()=>{de&&de.length>0&&ge(null)},[JSON.stringify(de)]),o.useEffect(()=>{Be||typeof Ce!="number"||$e.current!==null||($e.current=setTimeout(()=>{Ve(),$e.current=null},Ce))},[Ce,Be,Ve,...Q]),{droppableRects:_e,measureDroppableContainers:Ve,measuringScheduled:de!=null}})(we,{dragging:m,dependencies:[$.x,$.y],config:je.droppable}),Ee=(function(y,V){const _=V!=null?y.get(V):void 0,Q=_?_.node.current:null;return un(se=>{var de;return V==null?null:(de=Q??se)!=null?de:null},[Q,V])})(T,q),Ue=o.useMemo(()=>J?Ln(J):null,[J]),re=(function(){const y=j?.autoScrollEnabled===!1,V=typeof g=="object"?g.enabled===!1:g===!1,_=m&&!y&&!V;return typeof g=="object"?{...g,enabled:_}:{enabled:_}})(),te=(function(y,V){return Co(y,V)})(Ee,je.draggable.measure);(function(y){let{activeNode:V,measure:_,initialRect:Q,config:se=!0}=y;const de=o.useRef(!1),{x:ge,y:Ce}=typeof se=="boolean"?{x:se,y:se}:se;Rt(()=>{if(!ge&&!Ce||!V)return void(de.current=!1);if(de.current||!Q)return;const be=V?.node.current;if(!be||be.isConnected===!1)return;const he=tr(_(be),Q);if(ge||(he.x=0),Ce||(he.y=0),de.current=!0,Math.abs(he.x)>0||Math.abs(he.y)>0){const Ie=Ur(be);Ie&&Ie.scrollBy({top:he.y,left:he.x})}},[V,ge,Ce,Q,_])})({activeNode:q!=null?T.get(q):null,config:re.layoutShiftCompensation,initialRect:te,measure:je.draggable.measure});const pe=ar(Ee,je.draggable.measure,te),Le=ar(Ee?Ee.parentElement:null),Y=o.useRef({activatorEvent:null,active:null,activeNode:Ee,collisionRect:null,collisions:null,droppableRects:ae,draggableNodes:T,draggingNode:null,draggingNodeRect:null,droppableContainers:I,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),W=I.getNodeFor((t=Y.current.over)==null?void 0:t.id),le=(function(y){let{measure:V}=y;const[_,Q]=o.useState(null),se=Bn({callback:o.useCallback(be=>{for(const{target:he}of be)if(bn(he)){Q(Ie=>{const Be=V(he);return Ie?{...Ie,width:Be.width,height:Be.height}:Be});break}},[V])}),de=o.useCallback(be=>{const he=el(be);se?.disconnect(),he&&se?.observe(he),Q(he?V(he):null)},[V,se]),[ge,Ce]=zn(de);return o.useMemo(()=>({nodeRef:ge,rect:_,setRef:Ce}),[_,ge,Ce])})({measure:je.dragOverlay.measure}),fe=(n=le.nodeRef.current)!=null?n:Ee,ce=m?(i=le.rect)!=null?i:pe:null,Se=!!(le.nodeRef.current&&le.rect),ie=tr(ve=Se?null:pe,Co(ve));var ve;const xe=cr(fe?ft(fe):null),Re=(function(y){const V=o.useRef(y),_=un(Q=>y?Q&&Q!==sr&&y&&V.current&&y.parentNode===V.current.parentNode?Q:Kn(y):sr,[y]);return o.useEffect(()=>{V.current=y},[y]),_})(m?W??Ee:null),b=(function(y,V){V===void 0&&(V=Jt);const[_]=y,Q=cr(_?ft(_):null),[se,de]=o.useState(ur);function ge(){de(()=>y.length?y.map(be=>Wr(be)?Q:new fo(V(be),be)):ur)}const Ce=Bn({callback:ge});return Rt(()=>{Ce?.disconnect(),ge(),y.forEach(be=>Ce?.observe(be))},[y]),se})(Re),Fe=ol(h,{transform:{x:$.x-ie.x,y:$.y-ie.y,scaleX:1,scaleY:1},activatorEvent:J,active:X,activeNodeRect:pe,containerNodeRect:Le,draggingNodeRect:ce,over:Y.current.over,overlayNodeRect:le.rect,scrollableAncestors:Re,scrollableAncestorRects:b,windowRect:xe}),Ze=Ue?_t(Ue,$):null,ze=(function(y){const[V,_]=o.useState(null),Q=o.useRef(y),se=o.useCallback(de=>{const ge=so(de.target);ge&&_(Ce=>Ce?(Ce.set(ge,mo(ge)),new Map(Ce)):null)},[]);return o.useEffect(()=>{const de=Q.current;if(y!==de){ge(de);const Ce=y.map(be=>{const he=so(be);return he?(he.addEventListener("scroll",se,{passive:!0}),[he,mo(he)]):null}).filter(be=>be!=null);_(Ce.length?new Map(Ce):null),Q.current=y}return()=>{ge(y),ge(de)};function ge(Ce){Ce.forEach(be=>{const he=so(be);he?.removeEventListener("scroll",se)})}},[se,y]),o.useMemo(()=>y.length?V?Array.from(V.values()).reduce((de,ge)=>_t(de,ge),kt):_r(y):kt,[y,V])})(Re),et=dr(ze),oe=dr(ze,[pe]),ke=_t(Fe,et),Ae=ce?Mi(ce,Fe):null,ye=X&&Ae?S({active:X,collisionRect:Ae,droppableRects:ae,droppableContainers:we,pointerCoordinates:Ze}):null,De=Pr(ye,"id"),[D,ee]=o.useState(null),L=(function(y,V,_){return{...y,scaleX:V&&_?V.width/_.width:1,scaleY:V&&_?V.height/_.height:1}})(Se?Fe:_t(Fe,oe),(a=D?.rect)!=null?a:null,pe),G=o.useRef(null),u=o.useCallback((y,V)=>{let{sensor:_,options:Q}=V;if(B.current==null)return;const se=T.get(B.current);if(!se)return;const de=y.nativeEvent,ge=new _({active:B.current,activeNode:se,event:de,options:Q,context:Y,onAbort(be){if(!T.get(be))return;const{onDragAbort:he}=U.current,Ie={id:be};he?.(Ie),K({type:"onDragAbort",event:Ie})},onPending(be,he,Ie,Be){if(!T.get(be))return;const{onDragPending:Ne}=U.current,Ve={id:be,constraint:he,initialCoordinates:Ie,offset:Be};Ne?.(Ve),K({type:"onDragPending",event:Ve})},onStart(be){const he=B.current;if(he==null)return;const Ie=T.get(he);if(!Ie)return;const{onDragStart:Be}=U.current,Ne={activatorEvent:de,active:{id:he,data:Ie.data,rect:Z}};Lt.unstable_batchedUpdates(()=>{Be?.(Ne),O(At.Initializing),N({type:ct.DragStart,initialCoordinates:be,active:he}),K({type:"onDragStart",event:Ne}),H(G.current),M(de)})},onMove(be){N({type:ct.DragMove,coordinates:be})},onEnd:Ce(ct.DragEnd),onCancel:Ce(ct.DragCancel)});function Ce(be){return async function(){const{active:he,collisions:Ie,over:Be,scrollAdjustedTranslate:Ne}=Y.current;let Ve=null;if(he&&Ne){const{cancelDrop:$e}=U.current;Ve={activatorEvent:de,active:he,collisions:Ie,delta:Ne,over:Be},be===ct.DragEnd&&typeof $e=="function"&&await Promise.resolve($e(Ve))&&(be=ct.DragCancel)}B.current=null,Lt.unstable_batchedUpdates(()=>{N({type:be}),O(At.Uninitialized),ee(null),H(null),M(null),G.current=null;const $e=be===ct.DragEnd?"onDragEnd":"onDragCancel";if(Ve){const _e=U.current[$e];_e?.(Ve),K({type:$e,event:Ve})}})}}G.current=ge},[T]),w=o.useCallback((y,V)=>(_,Q)=>{const se=_.nativeEvent,de=T.get(Q);if(B.current!==null||!de||se.dndKit||se.defaultPrevented)return;const ge={active:de};y(_,V.options,ge)===!0&&(se.dndKit={capturedBy:V.sensor},B.current=Q,u(_,V))},[T,u]),F=(function(y,V){return o.useMemo(()=>y.reduce((_,Q)=>{const{sensor:se}=Q;return[..._,...se.activators.map(de=>({eventName:de.eventName,handler:V(de.handler,Q)}))]},[]),[y,V])})(f,w);(function(y){o.useEffect(()=>{if(!Pn)return;const V=y.map(_=>{let{sensor:Q}=_;return Q.setup==null?void 0:Q.setup()});return()=>{for(const _ of V)_?.()}},y.map(V=>{let{sensor:_}=V;return _}))})(f),Rt(()=>{pe&&R===At.Initializing&&O(At.Initialized)},[pe,R]),o.useEffect(()=>{const{onDragMove:y}=U.current,{active:V,activatorEvent:_,collisions:Q,over:se}=Y.current;if(!V||!_)return;const de={active:V,activatorEvent:_,collisions:Q,delta:{x:ke.x,y:ke.y},over:se};Lt.unstable_batchedUpdates(()=>{y?.(de),K({type:"onDragMove",event:de})})},[ke.x,ke.y]),o.useEffect(()=>{const{active:y,activatorEvent:V,collisions:_,droppableContainers:Q,scrollAdjustedTranslate:se}=Y.current;if(!y||B.current==null||!V||!se)return;const{onDragOver:de}=U.current,ge=Q.get(De),Ce=ge&&ge.rect.current?{id:ge.id,rect:ge.rect.current,data:ge.data,disabled:ge.disabled}:null,be={active:y,activatorEvent:V,collisions:_,delta:{x:se.x,y:se.y},over:Ce};Lt.unstable_batchedUpdates(()=>{ee(Ce),de?.(be),K({type:"onDragOver",event:be})})},[De]),Rt(()=>{Y.current={activatorEvent:J,active:X,activeNode:Ee,collisionRect:Ae,collisions:ye,droppableRects:ae,draggableNodes:T,draggingNode:fe,draggingNodeRect:ce,droppableContainers:I,over:D,scrollableAncestors:Re,scrollAdjustedTranslate:ke},Z.current={initial:ce,translated:Ae}},[X,Ee,ye,Ae,T,fe,ce,ae,I,D,Re,ke]),Oi({...re,delta:$,draggingRect:Ae,pointerCoordinates:Ze,scrollableAncestors:Re,scrollableAncestorRects:b});const v=o.useMemo(()=>({active:X,activeNode:Ee,activeNodeRect:pe,activatorEvent:J,collisions:ye,containerNodeRect:Le,dragOverlay:le,draggableNodes:T,droppableContainers:I,droppableRects:ae,over:D,measureDroppableContainers:Me,scrollableAncestors:Re,scrollableAncestorRects:b,measuringConfiguration:je,measuringScheduled:Ke,windowRect:xe}),[X,Ee,pe,J,ye,Le,le,T,I,ae,D,Me,Re,b,je,Ke,xe]),z=o.useMemo(()=>({activatorEvent:J,activators:F,active:X,activeNodeRect:pe,ariaDescribedById:{draggable:ue},dispatch:N,draggableNodes:T,over:D,measureDroppableContainers:Me}),[J,F,X,pe,N,ue,T,D,Me]);return o.createElement(jr.Provider,{value:P},o.createElement(wn.Provider,{value:z},o.createElement(nl.Provider,{value:v},o.createElement($n.Provider,{value:L},s)),o.createElement($i,{disabled:C?.restoreFocus===!1})),o.createElement(yi,{...C,hiddenTextDescribedById:ue}))}),Gi=o.createContext(null),gr="button";function _i(e){let{id:t,data:n,disabled:i=!1,attributes:a}=e;const l=yn("Draggable"),{activators:C,activatorEvent:g,active:s,activeNodeRect:f,ariaDescribedById:S,draggableNodes:p,over:h}=o.useContext(wn),{role:E=gr,roleDescription:x="draggable",tabIndex:A=0}=a??{},N=s?.id===t,K=o.useContext(N?$n:Gi),[P,R]=zn(),[O,m]=zn(),q=(function($,I){return o.useMemo(()=>$.reduce((k,Z)=>{let{eventName:X,handler:B}=Z;return k[X]=j=>{B(j,I)},k},{}),[$,I])})(C,t),T=pn(n);return Rt(()=>(p.set(t,{id:t,key:l,node:P,activatorNode:O,data:T}),()=>{const $=p.get(t);$&&$.key===l&&p.delete(t)}),[p,t]),{active:s,activatorEvent:g,activeNodeRect:f,attributes:o.useMemo(()=>({role:E,tabIndex:A,"aria-disabled":i,"aria-pressed":!(!N||E!==gr)||void 0,"aria-roledescription":x,"aria-describedby":S.draggable}),[i,E,A,N,x,S.draggable]),isDragging:N,listeners:i?void 0:q,node:P,over:h,setNodeRef:R,setActivatorNodeRef:m,transform:K}}function rl(){return o.useContext(nl)}const Zi={timeout:25};function Xi(e){let{animation:t,children:n}=e;const[i,a]=o.useState(null),[l,C]=o.useState(null),g=Nn(n);return n||i||!g||a(g),Rt(()=>{if(!l)return;const s=i?.key,f=i?.props.id;s!=null&&f!=null?Promise.resolve(t(f,l)).then(()=>{a(null)}):a(null)},[t,i,l]),o.createElement(o.Fragment,null,n,i?o.cloneElement(i,{ref:C}):null)}const Yi={x:0,y:0,scaleX:1,scaleY:1};function Ji(e){let{children:t}=e;return o.createElement(wn.Provider,{value:tl},o.createElement($n.Provider,{value:Yi},t))}const Qi={position:"fixed",touchAction:"none"},ea=e=>Un(e)?"transform 250ms ease":void 0,ta=o.forwardRef((e,t)=>{let{as:n,activatorEvent:i,adjustScale:a,children:l,className:C,rect:g,style:s,transform:f,transition:S=ea}=e;if(!g)return null;const p=a?f:{...f,scaleX:1,scaleY:1},h={...Qi,width:g.width,height:g.height,top:g.top,left:g.left,transform:jt.Transform.toString(p),transformOrigin:a&&i?wi(i,g):void 0,transition:typeof S=="function"?S(i):S,...s};return o.createElement(n,{className:C,style:h,ref:t},l)}),na=e=>t=>{let{active:n,dragOverlay:i}=t;const a={},{styles:l,className:C}=e;if(l!=null&&l.active)for(const[g,s]of Object.entries(l.active))s!==void 0&&(a[g]=n.node.style.getPropertyValue(g),n.node.style.setProperty(g,s));if(l!=null&&l.dragOverlay)for(const[g,s]of Object.entries(l.dragOverlay))s!==void 0&&i.node.style.setProperty(g,s);return C!=null&&C.active&&n.node.classList.add(C.active),C!=null&&C.dragOverlay&&i.node.classList.add(C.dragOverlay),function(){for(const[g,s]of Object.entries(a))n.node.style.setProperty(g,s);C!=null&&C.active&&n.node.classList.remove(C.active)}},ll={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:jt.Transform.toString(t)},{transform:jt.Transform.toString(n)}]},sideEffects:na({styles:{active:{opacity:"0"}}})};function oa(e){let{config:t,draggableNodes:n,droppableContainers:i,measuringConfiguration:a}=e;return Hn((l,C)=>{if(t===null)return;const g=n.get(l);if(!g)return;const s=g.node.current;if(!s)return;const f=el(C);if(!f)return;const{transform:S}=ft(C).getComputedStyle(C),p=Hr(S);if(!p)return;const h=typeof t=="function"?t:(function(E){const{duration:x,easing:A,sideEffects:N,keyframes:K}={...ll,...E};return P=>{let{active:R,dragOverlay:O,transform:m,...q}=P;if(!x)return;const T={x:O.rect.left-R.rect.left,y:O.rect.top-R.rect.top},$={scaleX:m.scaleX!==1?R.rect.width*m.scaleX/O.rect.width:1,scaleY:m.scaleY!==1?R.rect.height*m.scaleY/O.rect.height:1},I={x:m.x-T.x,y:m.y-T.y,...$},k=K({...q,active:R,dragOverlay:O,transform:{initial:m,final:I}}),[Z]=k,X=k[k.length-1];if(JSON.stringify(Z)===JSON.stringify(X))return;const B=N?.({active:R,dragOverlay:O,...q}),j=O.node.animate(k,{duration:x,easing:A,fill:"forwards"});return new Promise(H=>{j.onfinish=()=>{B?.(),H()}})}})(t);return Zr(s,a.draggable.measure),h({active:{id:l,data:g.data,node:s,rect:a.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:C,rect:a.dragOverlay.measure(f)},droppableContainers:i,measuringConfiguration:a,transform:p})})}let hr=0;function ra(e){return o.useMemo(()=>{if(e!=null)return hr++,hr},[e])}const la=o.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:i,style:a,transition:l,modifiers:C,wrapperElement:g="div",className:s,zIndex:f=999}=e;const{activatorEvent:S,active:p,activeNodeRect:h,containerNodeRect:E,draggableNodes:x,droppableContainers:A,dragOverlay:N,over:K,measuringConfiguration:P,scrollableAncestors:R,scrollableAncestorRects:O,windowRect:m}=rl(),q=o.useContext($n),T=ra(p?.id),$=ol(C,{activatorEvent:S,active:p,activeNodeRect:h,containerNodeRect:E,draggingNodeRect:N.rect,over:K,overlayNodeRect:N.rect,scrollableAncestors:R,scrollableAncestorRects:O,transform:q,windowRect:m}),I=Co(h),k=oa({config:i,draggableNodes:x,droppableContainers:A,measuringConfiguration:P}),Z=I?N.setRef:void 0;return o.createElement(Ji,null,o.createElement(Xi,{animation:k},p&&T?o.createElement(ta,{key:T,id:p.id,ref:Z,as:g,activatorEvent:S,adjustScale:t,className:s,transition:l,rect:I,style:{zIndex:f,...a},transform:$},n):null))});function ko(e,t,n){const i=e.slice();return i.splice(n<0?i.length+n:n,0,i.splice(t,1)[0]),i}function ia(e,t){return e.reduce((n,i,a)=>{const l=t.get(i);return l&&(n[a]=l),n},Array(e.length))}function En(e){return e!==null&&e>=0}const Fn={scaleX:1,scaleY:1},aa=e=>{var t;let{rects:n,activeNodeRect:i,activeIndex:a,overIndex:l,index:C}=e;const g=(t=n[a])!=null?t:i;if(!g)return null;const s=(function(f,S,p){const h=f[S],E=f[S-1],x=f[S+1];return!h||!E&&!x?0:p<S?E?h.left-(E.left+E.width):x.left-(h.left+h.width):x?x.left-(h.left+h.width):h.left-(E.left+E.width)})(n,C,a);if(C===a){const f=n[l];return f?{x:a<l?f.left+f.width-(g.left+g.width):f.left-g.left,y:0,...Fn}:null}return C>a&&C<=l?{x:-g.width-s,y:0,...Fn}:C<a&&C>=l?{x:g.width+s,y:0,...Fn}:{x:0,y:0,...Fn}},Mo=e=>{let{rects:t,activeIndex:n,overIndex:i,index:a}=e;const l=ko(t,i,n),C=t[a],g=l[a];return g&&C?{x:g.left-C.left,y:g.top-C.top,scaleX:g.width/C.width,scaleY:g.height/C.height}:null},il="Sortable",al=o.createContext({activeIndex:-1,containerId:il,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Mo,disabled:{draggable:!1,droppable:!1}});function sa(e){let{children:t,id:n,items:i,strategy:a=Mo,disabled:l=!1}=e;const{active:C,dragOverlay:g,droppableRects:s,over:f,measureDroppableContainers:S}=rl(),p=yn(il,n),h=g.rect!==null,E=o.useMemo(()=>i.map(q=>typeof q=="object"&&"id"in q?q.id:q),[i]),x=C!=null,A=C?E.indexOf(C.id):-1,N=f?E.indexOf(f.id):-1,K=o.useRef(E),P=!(function(q,T){if(q===T)return!0;if(q.length!==T.length)return!1;for(let $=0;$<q.length;$++)if(q[$]!==T[$])return!1;return!0})(E,K.current),R=N!==-1&&A===-1||P,O=(function(q){return typeof q=="boolean"?{draggable:q,droppable:q}:q})(l);Rt(()=>{P&&x&&S(E)},[P,E,x,S]),o.useEffect(()=>{K.current=E},[E]);const m=o.useMemo(()=>({activeIndex:A,containerId:p,disabled:O,disableTransforms:R,items:E,overIndex:N,useDragOverlay:h,sortedRects:ia(E,s),strategy:a}),[A,p,O.draggable,O.droppable,R,E,N,s,h,a]);return o.createElement(al.Provider,{value:m},t)}const da=e=>{let{id:t,items:n,activeIndex:i,overIndex:a}=e;return ko(n,i,a).indexOf(t)},ca=e=>{let{containerId:t,isSorting:n,wasDragging:i,index:a,items:l,newIndex:C,previousItems:g,previousContainerId:s,transition:f}=e;return!(!f||!i)&&(g===l||a!==C)&&(!!n||C!==a&&t===s)},ua={duration:200,easing:"ease"},sl="transform",ga=jt.Transition.toString({property:sl,duration:0,easing:"linear"}),ha={roleDescription:"sortable"};function ma(e){let{animateLayoutChanges:t=ca,attributes:n,disabled:i,data:a,getNewIndex:l=da,id:C,strategy:g,resizeObserverConfig:s,transition:f=ua}=e;const{items:S,containerId:p,activeIndex:h,disabled:E,disableTransforms:x,sortedRects:A,overIndex:N,useDragOverlay:K,strategy:P}=o.useContext(al),R=(function(W,le){var fe,ce;return typeof W=="boolean"?{draggable:W,droppable:!1}:{draggable:(fe=W?.draggable)!=null?fe:le.draggable,droppable:(ce=W?.droppable)!=null?ce:le.droppable}})(i,E),O=S.indexOf(C),m=o.useMemo(()=>({sortable:{containerId:p,index:O,items:S},...a}),[p,a,O,S]),q=o.useMemo(()=>S.slice(S.indexOf(C)),[S,C]),{rect:T,node:$,isOver:I,setNodeRef:k}=(function(W){let{data:le,disabled:fe=!1,id:ce,resizeObserverConfig:Se}=W;const ie=yn("Droppable"),{active:ve,dispatch:xe,over:Re,measureDroppableContainers:b}=o.useContext(wn),Fe=o.useRef({disabled:fe}),Ze=o.useRef(!1),ze=o.useRef(null),et=o.useRef(null),{disabled:oe,updateMeasurementsFor:ke,timeout:Ae}={...Zi,...Se},ye=pn(ke??ce),De=Bn({callback:o.useCallback(()=>{Ze.current?(et.current!=null&&clearTimeout(et.current),et.current=setTimeout(()=>{b(Array.isArray(ye.current)?ye.current:[ye.current]),et.current=null},Ae)):Ze.current=!0},[Ae]),disabled:oe||!ve}),D=o.useCallback((u,w)=>{De&&(w&&(De.unobserve(w),Ze.current=!1),u&&De.observe(u))},[De]),[ee,L]=zn(D),G=pn(le);return o.useEffect(()=>{De&&ee.current&&(De.disconnect(),Ze.current=!1,De.observe(ee.current))},[ee,De]),o.useEffect(()=>(xe({type:ct.RegisterDroppable,element:{id:ce,key:ie,disabled:fe,node:ee,rect:ze,data:G}}),()=>xe({type:ct.UnregisterDroppable,key:ie,id:ce})),[ce]),o.useEffect(()=>{fe!==Fe.current.disabled&&(xe({type:ct.SetDroppableDisabled,id:ce,key:ie,disabled:fe}),Fe.current.disabled=fe)},[ce,ie,fe,xe]),{active:ve,rect:ze,isOver:Re?.id===ce,node:ee,over:Re,setNodeRef:L}})({id:C,data:m,disabled:R.droppable,resizeObserverConfig:{updateMeasurementsFor:q,...s}}),{active:Z,activatorEvent:X,activeNodeRect:B,attributes:j,setNodeRef:H,listeners:J,isDragging:M,over:U,setActivatorNodeRef:ue,transform:we}=_i({id:C,data:m,attributes:{...ha,...n},disabled:R.draggable}),je=(function(){for(var W=arguments.length,le=new Array(W),fe=0;fe<W;fe++)le[fe]=arguments[fe];return o.useMemo(()=>ce=>{le.forEach(Se=>Se(ce))},le)})(k,H),Te=!!Z,ae=Te&&!x&&En(h)&&En(N),Me=!K&&M,Ke=Me&&ae?we:null,Ee=ae?Ke??(g??P)({rects:A,activeNodeRect:B,activeIndex:h,overIndex:N,index:O}):null,Ue=En(h)&&En(N)?l({id:C,items:S,activeIndex:h,overIndex:N}):O,re=Z?.id,te=o.useRef({activeId:re,items:S,newIndex:Ue,containerId:p}),pe=S!==te.current.items,Le=t({active:Z,containerId:p,isDragging:M,isSorting:Te,id:C,index:O,items:S,newIndex:te.current.newIndex,previousItems:te.current.items,previousContainerId:te.current.containerId,transition:f,wasDragging:te.current.activeId!=null}),Y=(function(W){let{disabled:le,index:fe,node:ce,rect:Se}=W;const[ie,ve]=o.useState(null),xe=o.useRef(fe);return Rt(()=>{if(!le&&fe!==xe.current&&ce.current){const Re=Se.current;if(Re){const b=Jt(ce.current,{ignoreTransform:!0}),Fe={x:Re.left-b.left,y:Re.top-b.top,scaleX:Re.width/b.width,scaleY:Re.height/b.height};(Fe.x||Fe.y)&&ve(Fe)}}fe!==xe.current&&(xe.current=fe)},[le,fe,ce,Se]),o.useEffect(()=>{ie&&ve(null)},[ie]),ie})({disabled:!Le,index:O,node:$,rect:T});return o.useEffect(()=>{Te&&te.current.newIndex!==Ue&&(te.current.newIndex=Ue),p!==te.current.containerId&&(te.current.containerId=p),S!==te.current.items&&(te.current.items=S)},[Te,Ue,p,S]),o.useEffect(()=>{if(re===te.current.activeId)return;if(re!=null&&te.current.activeId==null)return void(te.current.activeId=re);const W=setTimeout(()=>{te.current.activeId=re},50);return()=>clearTimeout(W)},[re]),{active:Z,activeIndex:h,attributes:j,data:m,rect:T,index:O,newIndex:Ue,items:S,isOver:I,isSorting:Te,isDragging:M,listeners:J,node:$,overIndex:N,over:U,setNodeRef:je,setActivatorNodeRef:ue,setDroppableNodeRef:k,setDraggableNodeRef:H,transform:Y??Ee,transition:(function(){if(Y||pe&&te.current.newIndex===O)return ga;if(!(Me&&!Un(X)||!f)&&(Te||Le))return jt.Transition.toString({...f,property:sl})})()}}function Vn(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],pa=(e,t)=>{let{context:{active:n,collisionRect:i,droppableRects:a,droppableContainers:l,over:C,scrollableAncestors:g}}=t;if(fa.includes(e.code)){if(e.preventDefault(),!n||!i)return;const s=[];l.getEnabled().forEach(p=>{if(!p||p!=null&&p.disabled)return;const h=a.get(p.id);if(h)switch(e.code){case Je.Down:i.top<h.top&&s.push(p);break;case Je.Up:i.top>h.top&&s.push(p);break;case Je.Left:i.left>h.left&&s.push(p);break;case Je.Right:i.left<h.left&&s.push(p)}});const f=(p=>{let{collisionRect:h,droppableRects:E,droppableContainers:x}=p;const A=Qo(h),N=[];for(const K of x){const{id:P}=K,R=E.get(P);if(R){const O=Qo(R),m=A.reduce((T,$,I)=>T+Br(O[I],$),0),q=Number((m/4).toFixed(4));N.push({id:P,data:{droppableContainer:K,value:q}})}}return N.sort(Vr)})({collisionRect:i,droppableRects:a,droppableContainers:s});let S=Pr(f,"id");if(S===C?.id&&f.length>1&&(S=f[1].id),S!=null){const p=l.get(n.id),h=l.get(S),E=h?a.get(h.id):null,x=h?.node.current;if(x&&E&&p&&h){const A=Kn(x).some((O,m)=>g[m]!==O),N=mr(p,h),K=(function(O,m){return!Vn(O)||!Vn(m)||!mr(O,m)?!1:O.data.current.sortable.index<m.data.current.sortable.index})(p,h),P=A||!N?{x:0,y:0}:{x:K?i.width-E.width:0,y:K?i.height-E.height:0},R={x:E.left,y:E.top};return P.x&&P.y?R:vn(R,P)}}}};function mr(e,t){return!(!Vn(e)||!Vn(t))&&e.data.current.sortable.containerId===t.data.current.sortable.containerId}const va=e=>{let{transform:t}=e;return{...t,y:0}},dl=o.memo(o.forwardRef((e,t)=>{const{children:n,style:i,className:a,index:l,editing:C,editable:g,selectedIndex:s,background:f,activeColor:S,borderColor:p,borderWidth:h,dragging:E,...x}=e;return c.jsxs("div",{ref:t,className:yt(a),style:{...i,display:"flex",flexDirection:"column",background:s===l?"white":f,minHeight:"0px",fontFamily:"inherit",fontSize:"16px",fontWeight:s===l?"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===l?"0px":"-1px",marginTop:s===l?"0px":"4px",marginBottom:"0px",background:"grey",minWidth:"1px"}}),n,s===l?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===l&&S?S?.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"},To=o.memo(o.forwardRef(({color:e,dragOverlay:t,dragging:n,disabled:i,fadeIn:a,handle:l,height:C,index:g,listeners:s,onRemove:f,renderItem:S,sorting:p,style:h,transition:E,transform:x,value:A,wrapperStyle:N,...K},P)=>{o.useEffect(()=>{if(t)return document.body.style.cursor="grabbing",()=>{document.body.style.cursor=""}},[t]);const R=S?S({dragOverlay:!!t,dragging:!!n,sorting:!!p,index:g,fadeIn:!!a,listeners:s,ref:P,style:h,transform:x,transition:E,value:A}):c.jsx(c.Fragment,{children:A});return c.jsx("div",{className:yt("tab-item",St.Wrapper,a&&St.fadeIn,p&&St.sorting,t&&St.dragOverlay),style:{...N,transition:[E,N?.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":g},ref:P,children:c.jsx("div",{className:yt(St.Item,n&&St.dragging,l&&St.withHandle,t&&St.dragOverlay,i&&St.disabled,e&&St.color,"dragging"),style:h,"data-cypress":"draggable-item",...l?void 0:s,...K,tabIndex:l?void 0:-1,children:R})})})),fr={Row:"_Row_1kr10_1"},cl=o.memo(o.forwardRef(({children:e,horizontal:t,style:n},i)=>c.jsx("div",{ref:i,style:{...n},className:yt(fr.Row,t&&fr.horizontal),children:e}))),Ca={...ll},ba=o.memo(o.forwardRef((e,t)=>{const{className:n,activationConstraint:i,animateLayoutChanges:a,adjustScale:l=!1,collisionDetection:C=qi,coordinateGetter:g=pa,dropAnimation:s=Ca,getItemStyles:f=()=>({}),getNewIndex:S,handle:p=!1,items:h,onMove:E,isDisabled:x=()=>!1,measuring:A,modifiers:N,renderItem:K,renderDivider:P,reorderItems:R=ko,strategy:O=Mo,style:m,useDragOverlay:q=!0,onDragStart:T,wrapperStyle:$=()=>({})}=e,[I,k]=o.useState(()=>h);o.useEffect(()=>{k(h)},[h]);const[Z,X]=o.useState(null),B=(function(){for(var U=arguments.length,ue=new Array(U),we=0;we<U;we++)ue[we]=arguments[we];return o.useMemo(()=>[...ue].filter(je=>je!=null),[...ue])})(ao(Jr,{activationConstraint:i}),ao(Qr,{activationConstraint:i}),ao(So,{scrollBehavior:"Cypress"in window?"auto":void 0,coordinateGetter:g})),j=I.indexOf.bind(I),H=Z?j(Z):-1,J=[];I.map((U,ue)=>{J.push(c.jsx(ya,{id:U,handle:p,index:ue,style:f,wrapperStyle:$,disabled:x(U),renderItem:K,animateLayoutChanges:a,useDragOverlay:q,getNewIndex:S},U+"-"+ue));const we=P?.({key:"divider-"+ue});we&&J.push(we)});const{getPortalContainer:M}=r.useFullscreenPortal();return c.jsxs(Wi,{sensors:B,collisionDetection:C,onDragStart:U=>{const{active:ue}=U;ue&&(T?.(U),X(ue.id))},autoScroll:{canScroll:U=>!0},onDragEnd:U=>{if(X(null),U.over){const ue=j(U.over.id);H!==ue&&(k(we=>R(we,H,ue)),E?.(H,ue))}},onDragCancel:()=>{X(null)},measuring:A,modifiers:N,children:[c.jsx("div",{style:{display:"flex",justifyContent:"flex-start",boxSizing:"border-box",...m},className:yt(n,St.Wrapper),children:c.jsx(sa,{items:I,strategy:O,children:c.jsx(cl,{ref:t,children:J})})}),q?Lt.createPortal(c.jsx(la,{adjustScale:l,dropAnimation:s,children:Z?c.jsx(To,{value:I[H],handle:p,renderItem:K,wrapperStyle:$({index:H,isDragging:!0,id:I[H]}),index:H,dragging:!0,style:f({id:I[H],index:H,isSorting:Z!==null,isDragging:!0,overIndex:-1,isDragOverlay:!0}),dragOverlay:!0}):null}),M()):null]})}));function ya({disabled:e,animateLayoutChanges:t,getNewIndex:n,handle:i,id:a,index:l,onRemove:C,style:g,renderItem:s,useDragOverlay:f,wrapperStyle:S}){const{attributes:p,isDragging:h,isSorting:E,listeners:x,overIndex:A,setNodeRef:N,transform:K,transition:P}=ma({id:a,animateLayoutChanges:t,disabled:e,getNewIndex:n});return c.jsx(To,{ref:N,value:a,disabled:e,dragging:h,sorting:E,handle:i,renderItem:s,index:l,style:g({index:l,id:a,isDragging:h,isSorting:E,overIndex:A}),onRemove:C?()=>C(a):void 0,transform:K,transition:P,wrapperStyle:S({index:l,isDragging:h,id:a}),listeners:x,"data-index":l,"data-id":a,dragOverlay:!f&&h,...p})}const wa="_TabStrip_3x0dp_1",xa=new d.Color("rgb(33, 115, 70)"),qa="#eee",Sa=e=>c.jsx(dl,{...e}),ul=o.memo(o.forwardRef((e,t)=>{const{children:n,style:i,className:a,selectedTabIndex:l=0,tabNames:C=[],onSelectedTabIndexChange:g,onTabNameChange:s,onTabMove:f,createScrollStartButton:S=r.defaultCreateScrollStartButton,createScrollEndButton:p=r.defaultCreateScrollEndButton,createScrollEdgeButton:h=r.defaultCreateScrollEdgeButton,createTabButton:E=Sa,createTabDivider:x,editLabelProps:A,disabled:N=!1,disableDrag:K=!1,background:P="white",activeColor:R=xa,borderColor:O=qa,borderWidth:m=1}=e,[q,T]=o.useState(l),[$,I]=o.useState(C),k=o.useCallback(ie=>{const ve=M.current?.[ie]?.closest(".tab-item")??M.current?.[ie];ve&&Me.current?.scrollTo({top:ve.offsetTop,left:ve.offsetLeft,behavior:"smooth"})},[]);o.useEffect(()=>{k(l)},[l]);const Z=o.useCallback((ie,ve)=>{ve!==q&&(T(ve),g?.(ve)),k(ve)},[g,q]),X=o.useCallback((ie,ve)=>{f?.(ie,ve)},[f]),B=o.useRef(null),[j,H]=o.useState(-1),J=o.useCallback((ie,ve)=>{s?.(ie,ve)},[s]);o.useLayoutEffect(()=>{T(l)},[l]),o.useLayoutEffect(()=>{I(C)},[C]);const M=o.useRef([]),U=o.useRef(null);o.useImperativeHandle(t,()=>Object.assign({startEdit(ie){M.current?.[ie]?.startEdit()},cancel(ie){M.current?.[ie]?.cancel()}},U.current),[q,j]);const ue=o.useCallback(({value:ie,index:ve,dragging:xe})=>{const{style:Re,maxLength:b,...Fe}=A||{},Ze=c.jsx(Nr,{ref:ze=>{M.current[ve]=ze},value:ie,disabled:N,maxLength:b,style:{color:q===ve&&R?R?.toRGBA().toString():"inherit",flex:"1 1 100%",paddingTop:"1px",paddingBottom:"1px",...Re},styleHover:{},onSubmit:ze=>(B.current=!1,H(-1),J(ve,ze)),onCancel:()=>{B.current=!1,H(-1)},onChange:ze=>{B.current=!0,H(ve)},...Fe});return E({onClick:ze=>Z(ze,ve),value:ie,index:ve,editing:j===ve&&B.current,editable:!0,disabled:N,selectedIndex:q,background:P,activeColor:R,borderColor:O,borderWidth:m,dragging:xe,children:Ze})},[q,J,Z,A,N,j,E]),[we,{width:je}]=Ot(),[Te,{width:ae}]=Ot(),Me=o.useRef(null),[Ke,Ee]=o.useState({left:0,top:0,width:0,height:0}),[Ue,re]=o.useState(null);o.useEffect(()=>{Ue!==null&&Me.current&&Me.current.scrollTo({left:Ue,behavior:"smooth"})},[Ue]);const te=o.useCallback((ie,ve=!1)=>{if(!Me.current)return 0;let xe=Me.current.firstChild.getBoundingClientRect(),Re=Me.current.firstChild.firstChild.children,b=0;return b=ve?0:r.ScrollUtils.getScrollTo(ie,xe.left,Re,!0,Math.max(0,ie-200)),re(b),Math.max(0,b)},[]),pe=o.useCallback((ie,ve=!1)=>{if(!Me.current)return 0;let xe=Me.current.firstChild.getBoundingClientRect(),Re=Me.current.firstChild.firstChild.children,b=0;const Fe=Math.ceil(ae-je);return b=ve?Fe:r.ScrollUtils.getScrollTo(ie,xe.left,Re,!1,Math.max(0,ie+200)),re(b),Math.min(Fe,b)},[ae,je]),Le=o.useRef(null),Y=o.useRef(null),W=o.useCallback(()=>{Y.current&&(clearTimeout(Y.current),Y.current=null,Le.current=null)},[]),le=o.useCallback((ie,ve,xe=260)=>{Le.current=ie,Y.current=setTimeout(()=>{const Re=ve?te(Le.current||ie):pe(Le.current||ie);Re!==Le.current?le(Re,ve,120):W()},xe)},[te,pe,W]);o.useEffect(()=>()=>W(),[W]);const fe=o.useMemo(()=>({style:{marginLeft:"4px",marginRight:"6px"},disabled:Math.floor(Ke.left)<=0||Math.floor(ae-je)===0,orientation:r.ScrollbarOrientation.Horizontal,onMouseUp:W,onMouseLeave:W,onMouseDown:()=>le(Me.current.scrollLeft,!0),onClick:ie=>te(Math.min(Me.current.scrollLeft,Ue??Number.MAX_SAFE_INTEGER),ie.ctrlKey)}),[Ke,Ue,ae,je]),ce=o.useMemo(()=>({style:{marginLeft:"6px",marginRight:"4px"},disabled:Math.floor(ae-je)<=Math.ceil(Ke.left),orientation:r.ScrollbarOrientation.Horizontal,onMouseUp:W,onMouseLeave:W,onMouseDown:()=>le(Me.current.scrollLeft,!1),onClick:ie=>pe(Math.max(Me.current.scrollLeft,Ue??0),ie.ctrlKey)}),[Ke,Ue,ae,je]),Se=o.useMemo(()=>c.jsxs(c.Fragment,{children:[c.jsx("div",{style:{minWidth:"16px"}}),n,h?.(fe)]}),[fe,ce,S,p,n,h]);return c.jsxs("div",{style:{...i,display:"flex",alignItems:"stretch"},className:yt(wa,a),ref:U,children:[c.jsx("div",{style:{borderTop:`solid ${O} ${m}px`,position:"absolute",width:"100%"}}),c.jsx("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:Se}),c.jsx("div",{className:"Tabs",ref:we,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:Me,onScroll:ie=>{Ee({left:ie.target.scrollLeft,top:ie.target.scrollTop,width:ie.target.scrollWidth,height:ie.target.scrollHeight})},children:c.jsx(ba,{isDisabled:ie=>N||K,items:$,strategy:aa,modifiers:[va],ref:Te,renderItem:ue,renderDivider:x,onMove:X,activationConstraint:{distance:15}})})}),c.jsx("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:h(ce)})]})}));ul.displayName="TabStrip";const Dn=o.createContext(null);Dn.displayName="DocThemesContext";const Ra="_script-editor_iy654_5",ka={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"},Ma=o.lazy(()=>Promise.resolve().then(()=>require("./BqAdbrtwf1TyCjaL.cjs")));let sn,dn,Ft=["define","require"],pr=!1;const vr=async(e,t,n)=>{const i=e.getModel();if(!i)return;const a=await t.languages.typescript.getTypeScriptWorker(),l=await a(i.uri),C=await l.getNavigationTree(i.uri.toString()),g=e.getPosition();let s={...g};s.lineNumber=1,s.column=1;let f=!1;for(let A=g.lineNumber;A>=1;A--)if(i.getLineContent(A).trim()===""){const N=Io(C,i.getOffsetAt({lineNumber:A,column:1}),"function");if(!N||Ia(N)){f=!0,s.lineNumber=A+1;break}{const K=N.spans[0].start;A=i.getPositionAt(K).lineNumber,s.lineNumber=A}}let S=n,p=!1;!f&&!S.startsWith(`
27
+ `},bi={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 yi(e){let{announcements:t=bi,container:n,hiddenTextDescribedById:i,screenReaderInstructions:a=Ci}=e;const{announce:l,announcement:C}=(function(){const[p,h]=o.useState("");return{announce:o.useCallback(E=>{E!=null&&h(E)},[]),announcement:p}})(),g=yn("DndLiveRegion"),[s,f]=o.useState(!1);if(o.useEffect(()=>{f(!0)},[]),(function(p){const h=o.useContext(jr);o.useEffect(()=>{if(!h)throw new Error("useDndMonitor must be used within a children of <DndContext>");return h(p)},[p,h])})(o.useMemo(()=>({onDragStart(p){let{active:h}=p;l(t.onDragStart({active:h}))},onDragMove(p){let{active:h,over:E}=p;t.onDragMove&&l(t.onDragMove({active:h,over:E}))},onDragOver(p){let{active:h,over:E}=p;l(t.onDragOver({active:h,over:E}))},onDragEnd(p){let{active:h,over:E}=p;l(t.onDragEnd({active:h,over:E}))},onDragCancel(p){let{active:h,over:E}=p;l(t.onDragCancel({active:h,over:E}))}}),[l,t])),!s)return null;const S=o.createElement(o.Fragment,null,o.createElement(pi,{id:i,value:a.draggable}),o.createElement(vi,{id:g,announcement:C}));return n?Lt.createPortal(S,n):S}var ct;function On(){}function ao(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"})(ct||(ct={}));const kt=Object.freeze({x:0,y:0});function Br(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function wi(e,t){const n=Ln(e);return n?(n.x-t.left)/t.width*100+"% "+(n.y-t.top)/t.height*100+"%":"0 0"}function Vr(e,t){let{data:{value:n}}=e,{data:{value:i}}=t;return n-i}function xi(e,t){let{data:{value:n}}=e,{data:{value:i}}=t;return i-n}function Qo(e){let{left:t,top:n,height:i,width:a}=e;return[{x:t,y:n},{x:t+a,y:n},{x:t,y:n+i},{x:t+a,y:n+i}]}function Pr(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function er(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 qi=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:i}=e;const a=er(t,t.left,t.top),l=[];for(const C of i){const{id:g}=C,s=n.get(g);if(s){const f=Br(er(s),a);l.push({id:g,data:{droppableContainer:C,value:f}})}}return l.sort(Vr)};function Si(e,t){const n=Math.max(t.top,e.top),i=Math.max(t.left,e.left),a=Math.min(t.left+t.width,e.left+e.width),l=Math.min(t.top+t.height,e.top+e.height),C=a-i,g=l-n;if(i<a&&n<l){const s=t.width*t.height,f=e.width*e.height,S=C*g;return Number((S/(s+f-S)).toFixed(4))}return 0}const Ri=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:i}=e;const a=[];for(const l of i){const{id:C}=l,g=n.get(C);if(g){const s=Si(g,t);s>0&&a.push({id:C,data:{droppableContainer:l,value:s}})}}return a.sort(xi)};function tr(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:kt}function ki(e){return function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];return i.reduce((l,C)=>({...l,top:l.top+e*C.y,bottom:l.bottom+e*C.y,left:l.left+e*C.x,right:l.right+e*C.x}),{...t})}}const Mi=ki(1);function Hr(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 Ti={ignoreTransform:!1};function Jt(e,t){t===void 0&&(t=Ti);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:f,transformOrigin:S}=ft(e).getComputedStyle(e);f&&(n=(function(p,h,E){const x=Hr(h);if(!x)return p;const{scaleX:A,scaleY:N,x:K,y:P}=x,R=p.left-K-(1-A)*parseFloat(E),O=p.top-P-(1-N)*parseFloat(E.slice(E.indexOf(" ")+1)),m=A?p.width/A:p.width,q=N?p.height/N:p.height;return{width:m,height:q,top:O,right:R+m,bottom:O+q,left:R}})(n,f,S))}const{top:i,left:a,width:l,height:C,bottom:g,right:s}=n;return{top:i,left:a,width:l,height:C,bottom:g,right:s}}function nr(e){return Jt(e,{ignoreTransform:!0})}function Kn(e,t){const n=[];return e?(function i(a){if(t!=null&&n.length>=t||!a)return n;if(qo(a)&&a.scrollingElement!=null&&!n.includes(a.scrollingElement))return n.push(a.scrollingElement),n;if(!bn(a)||Lr(a)||n.includes(a))return n;const l=ft(e).getComputedStyle(a);return a!==e&&(function(C,g){g===void 0&&(g=ft(C).getComputedStyle(C));const s=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(f=>{const S=g[f];return typeof S=="string"&&s.test(S)})})(a,l)&&n.push(a),(function(C,g){return g===void 0&&(g=ft(C).getComputedStyle(C)),g.position==="fixed"})(a,l)?n:i(a.parentNode)})(e):n}function Ur(e){const[t]=Kn(e,1);return t??null}function so(e){return Pn&&e?Yt(e)?e:xo(e)?qo(e)||e===Zt(e).scrollingElement?window:bn(e)?e:null:null:null}function Kr(e){return Yt(e)?e.scrollX:e.scrollLeft}function $r(e){return Yt(e)?e.scrollY:e.scrollTop}function mo(e){return{x:Kr(e),y:$r(e)}}var ut;function Wr(e){return!(!Pn||!e)&&e===document.scrollingElement}function Gr(e){const t={x:0,y:0},n=Wr(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},i={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=i.y,isRight:e.scrollLeft>=i.x,maxScroll:i,minScroll:t}}(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(ut||(ut={}));const Ii={x:.2,y:.2};function Ei(e,t,n,i,a){let{top:l,left:C,right:g,bottom:s}=n;i===void 0&&(i=10),a===void 0&&(a=Ii);const{isTop:f,isBottom:S,isLeft:p,isRight:h}=Gr(e),E={x:0,y:0},x={x:0,y:0},A=t.height*a.y,N=t.width*a.x;return!f&&l<=t.top+A?(E.y=ut.Backward,x.y=i*Math.abs((t.top+A-l)/A)):!S&&s>=t.bottom-A&&(E.y=ut.Forward,x.y=i*Math.abs((t.bottom-A-s)/A)),!h&&g>=t.right-N?(E.x=ut.Forward,x.x=i*Math.abs((t.right-N-g)/N)):!p&&C<=t.left+N&&(E.x=ut.Backward,x.x=i*Math.abs((t.left+N-C)/N)),{direction:E,speed:x}}function Fi(e){if(e===document.scrollingElement){const{innerWidth:l,innerHeight:C}=window;return{top:0,left:0,right:l,bottom:C,width:l,height:C}}const{top:t,left:n,right:i,bottom:a}=e.getBoundingClientRect();return{top:t,left:n,right:i,bottom:a,width:e.clientWidth,height:e.clientHeight}}function _r(e){return e.reduce((t,n)=>_t(t,mo(n)),kt)}function Zr(e,t){if(t===void 0&&(t=Jt),!e)return;const{top:n,left:i,bottom:a,right:l}=t(e);Ur(e)&&(a<=0||l<=0||n>=window.innerHeight||i>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Ai=[["x",["left","right"],function(e){return e.reduce((t,n)=>t+Kr(n),0)}],["y",["top","bottom"],function(e){return e.reduce((t,n)=>t+$r(n),0)}]];class fo{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 i=Kn(n),a=_r(i);this.rect={...t},this.width=t.width,this.height=t.height;for(const[l,C,g]of Ai)for(const s of C)Object.defineProperty(this,s,{get:()=>{const f=g(i),S=a[l]-f;return this.rect[s]+S},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class gn{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var i;return(i=this.target)==null?void 0:i.removeEventListener(...n)})},this.target=t}add(t,n,i){var a;(a=this.target)==null||a.addEventListener(t,n,i),this.listeners.push([t,n,i])}}function co(e,t){const n=Math.abs(e.x),i=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+i**2)>t:"x"in t&&"y"in t?n>t.x&&i>t.y:"x"in t?n>t.x:"y"in t&&i>t.y}var xt,Je;function or(e){e.preventDefault()}function Di(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"})(xt||(xt={})),(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 Xr={start:[Je.Space,Je.Enter],cancel:[Je.Esc],end:[Je.Space,Je.Enter,Je.Tab]},zi=(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 So{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 gn(Zt(n)),this.windowListeners=new gn(ft(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(xt.Resize,this.handleCancel),this.windowListeners.add(xt.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(xt.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,i=t.node.current;i&&Zr(i),n(kt)}handleKeyDown(t){if(Un(t)){const{active:n,context:i,options:a}=this.props,{keyboardCodes:l=Xr,coordinateGetter:C=zi,scrollBehavior:g="smooth"}=a,{code:s}=t;if(l.end.includes(s))return void this.handleEnd(t);if(l.cancel.includes(s))return void this.handleCancel(t);const{collisionRect:f}=i.current,S=f?{x:f.left,y:f.top}:kt;this.referenceCoordinates||(this.referenceCoordinates=S);const p=C(t,{active:n,context:i.current,currentCoordinates:S});if(p){const h=vn(p,S),E={x:0,y:0},{scrollableAncestors:x}=i.current;for(const A of x){const N=t.code,{isTop:K,isRight:P,isLeft:R,isBottom:O,maxScroll:m,minScroll:q}=Gr(A),T=Fi(A),$={x:Math.min(N===Je.Right?T.right-T.width/2:T.right,Math.max(N===Je.Right?T.left:T.left+T.width/2,p.x)),y:Math.min(N===Je.Down?T.bottom-T.height/2:T.bottom,Math.max(N===Je.Down?T.top:T.top+T.height/2,p.y))},I=N===Je.Right&&!P||N===Je.Left&&!R,k=N===Je.Down&&!O||N===Je.Up&&!K;if(I&&$.x!==p.x){const Z=A.scrollLeft+h.x,X=N===Je.Right&&Z<=m.x||N===Je.Left&&Z>=q.x;if(X&&!h.y)return void A.scrollTo({left:Z,behavior:g});E.x=X?A.scrollLeft-Z:N===Je.Right?A.scrollLeft-m.x:A.scrollLeft-q.x,E.x&&A.scrollBy({left:-E.x,behavior:g});break}if(k&&$.y!==p.y){const Z=A.scrollTop+h.y,X=N===Je.Down&&Z<=m.y||N===Je.Up&&Z>=q.y;if(X&&!h.x)return void A.scrollTo({top:Z,behavior:g});E.y=X?A.scrollTop-Z:N===Je.Down?A.scrollTop-m.y:A.scrollTop-q.y,E.y&&A.scrollBy({top:-E.y,behavior:g});break}}this.handleMove(t,_t(vn(p,this.referenceCoordinates),E))}}}handleMove(t,n){const{onMove:i}=this.props;t.preventDefault(),i(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 rr(e){return!!(e&&"distance"in e)}function lr(e){return!!(e&&"delay"in e)}So.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:i=Xr,onActivation:a}=t,{active:l}=n;const{code:C}=e.nativeEvent;if(i.start.includes(C)){const g=l.activatorNode.current;return(!g||e.target===g)&&(e.preventDefault(),a?.({event:e.nativeEvent}),!0)}return!1}}];class Ro{constructor(t,n,i){var a;i===void 0&&(i=(function(g){const{EventTarget:s}=ft(g);return g instanceof s?g:Zt(g)})(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:l}=t,{target:C}=l;this.props=t,this.events=n,this.document=Zt(C),this.documentListeners=new gn(this.document),this.listeners=new gn(i),this.windowListeners=new gn(ft(C)),this.initialCoordinates=(a=Ln(l))!=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:i}}}=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(xt.Resize,this.handleCancel),this.windowListeners.add(xt.DragStart,or),this.windowListeners.add(xt.VisibilityChange,this.handleCancel),this.windowListeners.add(xt.ContextMenu,or),this.documentListeners.add(xt.Keydown,this.handleKeydown),n){if(i!=null&&i({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(lr(n))return this.timeoutId=setTimeout(this.handleStart,n.delay),void this.handlePending(n);if(rr(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:i,onPending:a}=this.props;a(i,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(xt.Click,Di,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(xt.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:i,initialCoordinates:a,props:l}=this,{onMove:C,options:{activationConstraint:g}}=l;if(!a)return;const s=(n=Ln(t))!=null?n:kt,f=vn(a,s);if(!i&&g){if(rr(g)){if(g.tolerance!=null&&co(f,g.tolerance))return this.handleCancel();if(co(f,g.distance))return this.handleStart()}return lr(g)&&co(f,g.tolerance)?this.handleCancel():void this.handlePending(g,f)}t.cancelable&&t.preventDefault(),C(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 Ni={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Yr extends Ro{constructor(t){const{event:n}=t,i=Zt(n.target);super(t,Ni,i)}}Yr.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;return!(!n.isPrimary||n.button!==0)&&(i?.({event:n}),!0)}}];const Li={move:{name:"mousemove"},end:{name:"mouseup"}};var po;(function(e){e[e.RightClick=2]="RightClick"})(po||(po={}));class Jr extends Ro{constructor(t){super(t,Li,Zt(t.event.target))}}Jr.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;return n.button!==po.RightClick&&(i?.({event:n}),!0)}}];const uo={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Qr extends Ro{constructor(t){super(t,uo)}static setup(){return window.addEventListener(uo.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(uo.move.name,t)};function t(){}}}var hn,jn;function Oi(e){let{acceleration:t,activator:n=hn.Pointer,canScroll:i,draggingRect:a,enabled:l,interval:C=5,order:g=jn.TreeOrder,pointerCoordinates:s,scrollableAncestors:f,scrollableAncestorRects:S,delta:p,threshold:h}=e;const E=(function(q){let{delta:T,disabled:$}=q;const I=Nn(T);return un(k=>{if($||!I||!k)return ji;const Z={x:Math.sign(T.x-I.x),y:Math.sign(T.y-I.y)};return{x:{[ut.Backward]:k.x[ut.Backward]||Z.x===-1,[ut.Forward]:k.x[ut.Forward]||Z.x===1},y:{[ut.Backward]:k.y[ut.Backward]||Z.y===-1,[ut.Forward]:k.y[ut.Forward]||Z.y===1}}},[$,T,I])})({delta:p,disabled:!l}),[x,A]=(function(){const q=o.useRef(null);return[o.useCallback((T,$)=>{q.current=setInterval(T,$)},[]),o.useCallback(()=>{q.current!==null&&(clearInterval(q.current),q.current=null)},[])]})(),N=o.useRef({x:0,y:0}),K=o.useRef({x:0,y:0}),P=o.useMemo(()=>{switch(n){case hn.Pointer:return s?{top:s.y,bottom:s.y,left:s.x,right:s.x}:null;case hn.DraggableRect:return a}},[n,a,s]),R=o.useRef(null),O=o.useCallback(()=>{const q=R.current;if(!q)return;const T=N.current.x*K.current.x,$=N.current.y*K.current.y;q.scrollBy(T,$)},[]),m=o.useMemo(()=>g===jn.TreeOrder?[...f].reverse():f,[g,f]);o.useEffect(()=>{if(l&&f.length&&P){for(const q of m){if(i?.(q)===!1)continue;const T=f.indexOf(q),$=S[T];if(!$)continue;const{direction:I,speed:k}=Ei(q,$,P,t,h);for(const Z of["x","y"])E[Z][I[Z]]||(k[Z]=0,I[Z]=0);if(k.x>0||k.y>0)return A(),R.current=q,x(O,C),N.current=k,void(K.current=I)}N.current={x:0,y:0},K.current={x:0,y:0},A()}else A()},[t,O,i,A,l,C,JSON.stringify(P),JSON.stringify(E),x,f,m,S,JSON.stringify(h)])}Qr.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;const{touches:a}=n;return!(a.length>1)&&(i?.({event:n}),!0)}}],(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(hn||(hn={})),(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(jn||(jn={}));const ji={x:{[ut.Backward]:!1,[ut.Forward]:!1},y:{[ut.Backward]:!1,[ut.Forward]:!1}};var Cn,vo;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Cn||(Cn={})),(function(e){e.Optimized="optimized"})(vo||(vo={}));const ir=new Map;function Co(e,t){return un(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Bn(e){let{callback:t,disabled:n}=e;const i=Hn(t),a=o.useMemo(()=>{if(n||typeof window>"u"||window.ResizeObserver===void 0)return;const{ResizeObserver:l}=window;return new l(i)},[n]);return o.useEffect(()=>()=>a?.disconnect(),[a]),a}function Bi(e){return new fo(Jt(e),e)}function ar(e,t,n){t===void 0&&(t=Bi);const[i,a]=o.useState(null);function l(){a(s=>{if(!e)return null;var f;if(e.isConnected===!1)return(f=s??n)!=null?f:null;const S=t(e);return JSON.stringify(s)===JSON.stringify(S)?s:S})}const C=(function(s){let{callback:f,disabled:S}=s;const p=Hn(f),h=o.useMemo(()=>{if(S||typeof window>"u"||window.MutationObserver===void 0)return;const{MutationObserver:E}=window;return new E(p)},[p,S]);return o.useEffect(()=>()=>h?.disconnect(),[h]),h})({callback(s){if(e)for(const f of s){const{type:S,target:p}=f;if(S==="childList"&&p instanceof HTMLElement&&p.contains(e)){l();break}}}}),g=Bn({callback:l});return Rt(()=>{l(),e?(g?.observe(e),C?.observe(document.body,{childList:!0,subtree:!0})):(g?.disconnect(),C?.disconnect())},[e]),i}const sr=[];function dr(e,t){t===void 0&&(t=[]);const n=o.useRef(null);return o.useEffect(()=>{n.current=null},t),o.useEffect(()=>{const i=e!==kt;i&&!n.current&&(n.current=e),!i&&n.current&&(n.current=null)},[e]),n.current?vn(e,n.current):kt}function cr(e){return o.useMemo(()=>e?(function(t){const n=t.innerWidth,i=t.innerHeight;return{top:0,left:0,right:n,bottom:i,width:n,height:i}})(e):null,[e])}const ur=[];function el(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return bn(t)?t:e}const Vi=[{sensor:Yr,options:{}},{sensor:So,options:{}}],Pi={current:{}},An={draggable:{measure:nr},droppable:{measure:nr,strategy:Cn.WhileDragging,frequency:vo.Optimized},dragOverlay:{measure:Jt}};class mn 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,i;return(n=(i=this.get(t))==null?void 0:i.node.current)!=null?n:void 0}}const Hi={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new mn,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:On},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:An,measureDroppableContainers:On,windowRect:null,measuringScheduled:!1},tl={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:On,draggableNodes:new Map,over:null,measureDroppableContainers:On},wn=o.createContext(tl),nl=o.createContext(Hi);function Ui(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new mn}}}function Ki(e,t){switch(t.type){case ct.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case ct.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 ct.DragEnd:case ct.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ct.RegisterDroppable:{const{element:n}=t,{id:i}=n,a=new mn(e.droppable.containers);return a.set(i,n),{...e,droppable:{...e.droppable,containers:a}}}case ct.SetDroppableDisabled:{const{id:n,key:i,disabled:a}=t,l=e.droppable.containers.get(n);if(!l||i!==l.key)return e;const C=new mn(e.droppable.containers);return C.set(n,{...l,disabled:a}),{...e,droppable:{...e.droppable,containers:C}}}case ct.UnregisterDroppable:{const{id:n,key:i}=t,a=e.droppable.containers.get(n);if(!a||i!==a.key)return e;const l=new mn(e.droppable.containers);return l.delete(n),{...e,droppable:{...e.droppable,containers:l}}}default:return e}}function $i(e){let{disabled:t}=e;const{active:n,activatorEvent:i,draggableNodes:a}=o.useContext(wn),l=Nn(i),C=Nn(n?.id);return o.useEffect(()=>{if(!t&&!i&&l&&C!=null){if(!Un(l)||document.activeElement===l.target)return;const g=a.get(C);if(!g)return;const{activatorNode:s,node:f}=g;if(!s.current&&!f.current)return;requestAnimationFrame(()=>{for(const S of[s.current,f.current]){if(!S)continue;const p=mi(S);if(p){p.focus();break}}})}},[i,t,a,C,l]),null}function ol(e,t){let{transform:n,...i}=t;return e!=null&&e.length?e.reduce((a,l)=>l({transform:a,...i}),n):n}const $n=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 Wi=o.memo(function(e){var t,n,i,a;let{id:l,accessibility:C,autoScroll:g=!0,children:s,sensors:f=Vi,collisionDetection:S=Ri,measuring:p,modifiers:h,...E}=e;const x=o.useReducer(Ki,void 0,Ui),[A,N]=x,[K,P]=(function(){const[y]=o.useState(()=>new Set),V=o.useCallback(_=>(y.add(_),()=>y.delete(_)),[y]);return[o.useCallback(_=>{let{type:Q,event:se}=_;y.forEach(de=>{var ge;return(ge=de[Q])==null?void 0:ge.call(de,se)})},[y]),V]})(),[R,O]=o.useState(At.Uninitialized),m=R===At.Initialized,{draggable:{active:q,nodes:T,translate:$},droppable:{containers:I}}=A,k=q!=null?T.get(q):null,Z=o.useRef({initial:null,translated:null}),X=o.useMemo(()=>{var y;return q!=null?{id:q,data:(y=k?.data)!=null?y:Pi,rect:Z}:null},[q,k]),B=o.useRef(null),[j,H]=o.useState(null),[J,M]=o.useState(null),U=pn(E,Object.values(E)),ue=yn("DndDescribedBy",l),we=o.useMemo(()=>I.getEnabled(),[I]),je=(Te=p,o.useMemo(()=>({draggable:{...An.draggable,...Te?.draggable},droppable:{...An.droppable,...Te?.droppable},dragOverlay:{...An.dragOverlay,...Te?.dragOverlay}}),[Te?.draggable,Te?.droppable,Te?.dragOverlay]));var Te;const{droppableRects:ae,measureDroppableContainers:Me,measuringScheduled:Ke}=(function(y,V){let{dragging:_,dependencies:Q,config:se}=V;const[de,ge]=o.useState(null),{frequency:Ce,measure:be,strategy:he}=se,Ie=o.useRef(y),Be=(function(){switch(he){case Cn.Always:return!1;case Cn.BeforeDragging:return _;default:return!_}})(),Ne=pn(Be),Ve=o.useCallback(function(Oe){Oe===void 0&&(Oe=[]),Ne.current||ge(Ye=>Ye===null?Oe:Ye.concat(Oe.filter(at=>!Ye.includes(at))))},[Ne]),$e=o.useRef(null),_e=un(Oe=>{if(Be&&!_)return ir;if(!Oe||Oe===ir||Ie.current!==y||de!=null){const Ye=new Map;for(let at of y){if(!at)continue;if(de&&de.length>0&&!de.includes(at.id)&&at.rect.current){Ye.set(at.id,at.rect.current);continue}const ht=at.node.current,qt=ht?new fo(be(ht),ht):null;at.rect.current=qt,qt&&Ye.set(at.id,qt)}return Ye}return Oe},[y,de,_,Be,be]);return o.useEffect(()=>{Ie.current=y},[y]),o.useEffect(()=>{Be||Ve()},[_,Be]),o.useEffect(()=>{de&&de.length>0&&ge(null)},[JSON.stringify(de)]),o.useEffect(()=>{Be||typeof Ce!="number"||$e.current!==null||($e.current=setTimeout(()=>{Ve(),$e.current=null},Ce))},[Ce,Be,Ve,...Q]),{droppableRects:_e,measureDroppableContainers:Ve,measuringScheduled:de!=null}})(we,{dragging:m,dependencies:[$.x,$.y],config:je.droppable}),Ee=(function(y,V){const _=V!=null?y.get(V):void 0,Q=_?_.node.current:null;return un(se=>{var de;return V==null?null:(de=Q??se)!=null?de:null},[Q,V])})(T,q),Ue=o.useMemo(()=>J?Ln(J):null,[J]),re=(function(){const y=j?.autoScrollEnabled===!1,V=typeof g=="object"?g.enabled===!1:g===!1,_=m&&!y&&!V;return typeof g=="object"?{...g,enabled:_}:{enabled:_}})(),te=(function(y,V){return Co(y,V)})(Ee,je.draggable.measure);(function(y){let{activeNode:V,measure:_,initialRect:Q,config:se=!0}=y;const de=o.useRef(!1),{x:ge,y:Ce}=typeof se=="boolean"?{x:se,y:se}:se;Rt(()=>{if(!ge&&!Ce||!V)return void(de.current=!1);if(de.current||!Q)return;const be=V?.node.current;if(!be||be.isConnected===!1)return;const he=tr(_(be),Q);if(ge||(he.x=0),Ce||(he.y=0),de.current=!0,Math.abs(he.x)>0||Math.abs(he.y)>0){const Ie=Ur(be);Ie&&Ie.scrollBy({top:he.y,left:he.x})}},[V,ge,Ce,Q,_])})({activeNode:q!=null?T.get(q):null,config:re.layoutShiftCompensation,initialRect:te,measure:je.draggable.measure});const pe=ar(Ee,je.draggable.measure,te),Le=ar(Ee?Ee.parentElement:null),Y=o.useRef({activatorEvent:null,active:null,activeNode:Ee,collisionRect:null,collisions:null,droppableRects:ae,draggableNodes:T,draggingNode:null,draggingNodeRect:null,droppableContainers:I,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),W=I.getNodeFor((t=Y.current.over)==null?void 0:t.id),le=(function(y){let{measure:V}=y;const[_,Q]=o.useState(null),se=Bn({callback:o.useCallback(be=>{for(const{target:he}of be)if(bn(he)){Q(Ie=>{const Be=V(he);return Ie?{...Ie,width:Be.width,height:Be.height}:Be});break}},[V])}),de=o.useCallback(be=>{const he=el(be);se?.disconnect(),he&&se?.observe(he),Q(he?V(he):null)},[V,se]),[ge,Ce]=zn(de);return o.useMemo(()=>({nodeRef:ge,rect:_,setRef:Ce}),[_,ge,Ce])})({measure:je.dragOverlay.measure}),fe=(n=le.nodeRef.current)!=null?n:Ee,ce=m?(i=le.rect)!=null?i:pe:null,Se=!!(le.nodeRef.current&&le.rect),ie=tr(ve=Se?null:pe,Co(ve));var ve;const xe=cr(fe?ft(fe):null),Re=(function(y){const V=o.useRef(y),_=un(Q=>y?Q&&Q!==sr&&y&&V.current&&y.parentNode===V.current.parentNode?Q:Kn(y):sr,[y]);return o.useEffect(()=>{V.current=y},[y]),_})(m?W??Ee:null),b=(function(y,V){V===void 0&&(V=Jt);const[_]=y,Q=cr(_?ft(_):null),[se,de]=o.useState(ur);function ge(){de(()=>y.length?y.map(be=>Wr(be)?Q:new fo(V(be),be)):ur)}const Ce=Bn({callback:ge});return Rt(()=>{Ce?.disconnect(),ge(),y.forEach(be=>Ce?.observe(be))},[y]),se})(Re),Fe=ol(h,{transform:{x:$.x-ie.x,y:$.y-ie.y,scaleX:1,scaleY:1},activatorEvent:J,active:X,activeNodeRect:pe,containerNodeRect:Le,draggingNodeRect:ce,over:Y.current.over,overlayNodeRect:le.rect,scrollableAncestors:Re,scrollableAncestorRects:b,windowRect:xe}),Ze=Ue?_t(Ue,$):null,ze=(function(y){const[V,_]=o.useState(null),Q=o.useRef(y),se=o.useCallback(de=>{const ge=so(de.target);ge&&_(Ce=>Ce?(Ce.set(ge,mo(ge)),new Map(Ce)):null)},[]);return o.useEffect(()=>{const de=Q.current;if(y!==de){ge(de);const Ce=y.map(be=>{const he=so(be);return he?(he.addEventListener("scroll",se,{passive:!0}),[he,mo(he)]):null}).filter(be=>be!=null);_(Ce.length?new Map(Ce):null),Q.current=y}return()=>{ge(y),ge(de)};function ge(Ce){Ce.forEach(be=>{const he=so(be);he?.removeEventListener("scroll",se)})}},[se,y]),o.useMemo(()=>y.length?V?Array.from(V.values()).reduce((de,ge)=>_t(de,ge),kt):_r(y):kt,[y,V])})(Re),et=dr(ze),oe=dr(ze,[pe]),ke=_t(Fe,et),Ae=ce?Mi(ce,Fe):null,ye=X&&Ae?S({active:X,collisionRect:Ae,droppableRects:ae,droppableContainers:we,pointerCoordinates:Ze}):null,De=Pr(ye,"id"),[D,ee]=o.useState(null),L=(function(y,V,_){return{...y,scaleX:V&&_?V.width/_.width:1,scaleY:V&&_?V.height/_.height:1}})(Se?Fe:_t(Fe,oe),(a=D?.rect)!=null?a:null,pe),G=o.useRef(null),u=o.useCallback((y,V)=>{let{sensor:_,options:Q}=V;if(B.current==null)return;const se=T.get(B.current);if(!se)return;const de=y.nativeEvent,ge=new _({active:B.current,activeNode:se,event:de,options:Q,context:Y,onAbort(be){if(!T.get(be))return;const{onDragAbort:he}=U.current,Ie={id:be};he?.(Ie),K({type:"onDragAbort",event:Ie})},onPending(be,he,Ie,Be){if(!T.get(be))return;const{onDragPending:Ne}=U.current,Ve={id:be,constraint:he,initialCoordinates:Ie,offset:Be};Ne?.(Ve),K({type:"onDragPending",event:Ve})},onStart(be){const he=B.current;if(he==null)return;const Ie=T.get(he);if(!Ie)return;const{onDragStart:Be}=U.current,Ne={activatorEvent:de,active:{id:he,data:Ie.data,rect:Z}};Lt.unstable_batchedUpdates(()=>{Be?.(Ne),O(At.Initializing),N({type:ct.DragStart,initialCoordinates:be,active:he}),K({type:"onDragStart",event:Ne}),H(G.current),M(de)})},onMove(be){N({type:ct.DragMove,coordinates:be})},onEnd:Ce(ct.DragEnd),onCancel:Ce(ct.DragCancel)});function Ce(be){return async function(){const{active:he,collisions:Ie,over:Be,scrollAdjustedTranslate:Ne}=Y.current;let Ve=null;if(he&&Ne){const{cancelDrop:$e}=U.current;Ve={activatorEvent:de,active:he,collisions:Ie,delta:Ne,over:Be},be===ct.DragEnd&&typeof $e=="function"&&await Promise.resolve($e(Ve))&&(be=ct.DragCancel)}B.current=null,Lt.unstable_batchedUpdates(()=>{N({type:be}),O(At.Uninitialized),ee(null),H(null),M(null),G.current=null;const $e=be===ct.DragEnd?"onDragEnd":"onDragCancel";if(Ve){const _e=U.current[$e];_e?.(Ve),K({type:$e,event:Ve})}})}}G.current=ge},[T]),w=o.useCallback((y,V)=>(_,Q)=>{const se=_.nativeEvent,de=T.get(Q);if(B.current!==null||!de||se.dndKit||se.defaultPrevented)return;const ge={active:de};y(_,V.options,ge)===!0&&(se.dndKit={capturedBy:V.sensor},B.current=Q,u(_,V))},[T,u]),F=(function(y,V){return o.useMemo(()=>y.reduce((_,Q)=>{const{sensor:se}=Q;return[..._,...se.activators.map(de=>({eventName:de.eventName,handler:V(de.handler,Q)}))]},[]),[y,V])})(f,w);(function(y){o.useEffect(()=>{if(!Pn)return;const V=y.map(_=>{let{sensor:Q}=_;return Q.setup==null?void 0:Q.setup()});return()=>{for(const _ of V)_?.()}},y.map(V=>{let{sensor:_}=V;return _}))})(f),Rt(()=>{pe&&R===At.Initializing&&O(At.Initialized)},[pe,R]),o.useEffect(()=>{const{onDragMove:y}=U.current,{active:V,activatorEvent:_,collisions:Q,over:se}=Y.current;if(!V||!_)return;const de={active:V,activatorEvent:_,collisions:Q,delta:{x:ke.x,y:ke.y},over:se};Lt.unstable_batchedUpdates(()=>{y?.(de),K({type:"onDragMove",event:de})})},[ke.x,ke.y]),o.useEffect(()=>{const{active:y,activatorEvent:V,collisions:_,droppableContainers:Q,scrollAdjustedTranslate:se}=Y.current;if(!y||B.current==null||!V||!se)return;const{onDragOver:de}=U.current,ge=Q.get(De),Ce=ge&&ge.rect.current?{id:ge.id,rect:ge.rect.current,data:ge.data,disabled:ge.disabled}:null,be={active:y,activatorEvent:V,collisions:_,delta:{x:se.x,y:se.y},over:Ce};Lt.unstable_batchedUpdates(()=>{ee(Ce),de?.(be),K({type:"onDragOver",event:be})})},[De]),Rt(()=>{Y.current={activatorEvent:J,active:X,activeNode:Ee,collisionRect:Ae,collisions:ye,droppableRects:ae,draggableNodes:T,draggingNode:fe,draggingNodeRect:ce,droppableContainers:I,over:D,scrollableAncestors:Re,scrollAdjustedTranslate:ke},Z.current={initial:ce,translated:Ae}},[X,Ee,ye,Ae,T,fe,ce,ae,I,D,Re,ke]),Oi({...re,delta:$,draggingRect:Ae,pointerCoordinates:Ze,scrollableAncestors:Re,scrollableAncestorRects:b});const v=o.useMemo(()=>({active:X,activeNode:Ee,activeNodeRect:pe,activatorEvent:J,collisions:ye,containerNodeRect:Le,dragOverlay:le,draggableNodes:T,droppableContainers:I,droppableRects:ae,over:D,measureDroppableContainers:Me,scrollableAncestors:Re,scrollableAncestorRects:b,measuringConfiguration:je,measuringScheduled:Ke,windowRect:xe}),[X,Ee,pe,J,ye,Le,le,T,I,ae,D,Me,Re,b,je,Ke,xe]),z=o.useMemo(()=>({activatorEvent:J,activators:F,active:X,activeNodeRect:pe,ariaDescribedById:{draggable:ue},dispatch:N,draggableNodes:T,over:D,measureDroppableContainers:Me}),[J,F,X,pe,N,ue,T,D,Me]);return o.createElement(jr.Provider,{value:P},o.createElement(wn.Provider,{value:z},o.createElement(nl.Provider,{value:v},o.createElement($n.Provider,{value:L},s)),o.createElement($i,{disabled:C?.restoreFocus===!1})),o.createElement(yi,{...C,hiddenTextDescribedById:ue}))}),Gi=o.createContext(null),gr="button";function _i(e){let{id:t,data:n,disabled:i=!1,attributes:a}=e;const l=yn("Draggable"),{activators:C,activatorEvent:g,active:s,activeNodeRect:f,ariaDescribedById:S,draggableNodes:p,over:h}=o.useContext(wn),{role:E=gr,roleDescription:x="draggable",tabIndex:A=0}=a??{},N=s?.id===t,K=o.useContext(N?$n:Gi),[P,R]=zn(),[O,m]=zn(),q=(function($,I){return o.useMemo(()=>$.reduce((k,Z)=>{let{eventName:X,handler:B}=Z;return k[X]=j=>{B(j,I)},k},{}),[$,I])})(C,t),T=pn(n);return Rt(()=>(p.set(t,{id:t,key:l,node:P,activatorNode:O,data:T}),()=>{const $=p.get(t);$&&$.key===l&&p.delete(t)}),[p,t]),{active:s,activatorEvent:g,activeNodeRect:f,attributes:o.useMemo(()=>({role:E,tabIndex:A,"aria-disabled":i,"aria-pressed":!(!N||E!==gr)||void 0,"aria-roledescription":x,"aria-describedby":S.draggable}),[i,E,A,N,x,S.draggable]),isDragging:N,listeners:i?void 0:q,node:P,over:h,setNodeRef:R,setActivatorNodeRef:m,transform:K}}function rl(){return o.useContext(nl)}const Zi={timeout:25};function Xi(e){let{animation:t,children:n}=e;const[i,a]=o.useState(null),[l,C]=o.useState(null),g=Nn(n);return n||i||!g||a(g),Rt(()=>{if(!l)return;const s=i?.key,f=i?.props.id;s!=null&&f!=null?Promise.resolve(t(f,l)).then(()=>{a(null)}):a(null)},[t,i,l]),o.createElement(o.Fragment,null,n,i?o.cloneElement(i,{ref:C}):null)}const Yi={x:0,y:0,scaleX:1,scaleY:1};function Ji(e){let{children:t}=e;return o.createElement(wn.Provider,{value:tl},o.createElement($n.Provider,{value:Yi},t))}const Qi={position:"fixed",touchAction:"none"},ea=e=>Un(e)?"transform 250ms ease":void 0,ta=o.forwardRef((e,t)=>{let{as:n,activatorEvent:i,adjustScale:a,children:l,className:C,rect:g,style:s,transform:f,transition:S=ea}=e;if(!g)return null;const p=a?f:{...f,scaleX:1,scaleY:1},h={...Qi,width:g.width,height:g.height,top:g.top,left:g.left,transform:jt.Transform.toString(p),transformOrigin:a&&i?wi(i,g):void 0,transition:typeof S=="function"?S(i):S,...s};return o.createElement(n,{className:C,style:h,ref:t},l)}),na=e=>t=>{let{active:n,dragOverlay:i}=t;const a={},{styles:l,className:C}=e;if(l!=null&&l.active)for(const[g,s]of Object.entries(l.active))s!==void 0&&(a[g]=n.node.style.getPropertyValue(g),n.node.style.setProperty(g,s));if(l!=null&&l.dragOverlay)for(const[g,s]of Object.entries(l.dragOverlay))s!==void 0&&i.node.style.setProperty(g,s);return C!=null&&C.active&&n.node.classList.add(C.active),C!=null&&C.dragOverlay&&i.node.classList.add(C.dragOverlay),function(){for(const[g,s]of Object.entries(a))n.node.style.setProperty(g,s);C!=null&&C.active&&n.node.classList.remove(C.active)}},ll={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:jt.Transform.toString(t)},{transform:jt.Transform.toString(n)}]},sideEffects:na({styles:{active:{opacity:"0"}}})};function oa(e){let{config:t,draggableNodes:n,droppableContainers:i,measuringConfiguration:a}=e;return Hn((l,C)=>{if(t===null)return;const g=n.get(l);if(!g)return;const s=g.node.current;if(!s)return;const f=el(C);if(!f)return;const{transform:S}=ft(C).getComputedStyle(C),p=Hr(S);if(!p)return;const h=typeof t=="function"?t:(function(E){const{duration:x,easing:A,sideEffects:N,keyframes:K}={...ll,...E};return P=>{let{active:R,dragOverlay:O,transform:m,...q}=P;if(!x)return;const T={x:O.rect.left-R.rect.left,y:O.rect.top-R.rect.top},$={scaleX:m.scaleX!==1?R.rect.width*m.scaleX/O.rect.width:1,scaleY:m.scaleY!==1?R.rect.height*m.scaleY/O.rect.height:1},I={x:m.x-T.x,y:m.y-T.y,...$},k=K({...q,active:R,dragOverlay:O,transform:{initial:m,final:I}}),[Z]=k,X=k[k.length-1];if(JSON.stringify(Z)===JSON.stringify(X))return;const B=N?.({active:R,dragOverlay:O,...q}),j=O.node.animate(k,{duration:x,easing:A,fill:"forwards"});return new Promise(H=>{j.onfinish=()=>{B?.(),H()}})}})(t);return Zr(s,a.draggable.measure),h({active:{id:l,data:g.data,node:s,rect:a.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:C,rect:a.dragOverlay.measure(f)},droppableContainers:i,measuringConfiguration:a,transform:p})})}let hr=0;function ra(e){return o.useMemo(()=>{if(e!=null)return hr++,hr},[e])}const la=o.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:i,style:a,transition:l,modifiers:C,wrapperElement:g="div",className:s,zIndex:f=999}=e;const{activatorEvent:S,active:p,activeNodeRect:h,containerNodeRect:E,draggableNodes:x,droppableContainers:A,dragOverlay:N,over:K,measuringConfiguration:P,scrollableAncestors:R,scrollableAncestorRects:O,windowRect:m}=rl(),q=o.useContext($n),T=ra(p?.id),$=ol(C,{activatorEvent:S,active:p,activeNodeRect:h,containerNodeRect:E,draggingNodeRect:N.rect,over:K,overlayNodeRect:N.rect,scrollableAncestors:R,scrollableAncestorRects:O,transform:q,windowRect:m}),I=Co(h),k=oa({config:i,draggableNodes:x,droppableContainers:A,measuringConfiguration:P}),Z=I?N.setRef:void 0;return o.createElement(Ji,null,o.createElement(Xi,{animation:k},p&&T?o.createElement(ta,{key:T,id:p.id,ref:Z,as:g,activatorEvent:S,adjustScale:t,className:s,transition:l,rect:I,style:{zIndex:f,...a},transform:$},n):null))});function ko(e,t,n){const i=e.slice();return i.splice(n<0?i.length+n:n,0,i.splice(t,1)[0]),i}function ia(e,t){return e.reduce((n,i,a)=>{const l=t.get(i);return l&&(n[a]=l),n},Array(e.length))}function En(e){return e!==null&&e>=0}const Fn={scaleX:1,scaleY:1},aa=e=>{var t;let{rects:n,activeNodeRect:i,activeIndex:a,overIndex:l,index:C}=e;const g=(t=n[a])!=null?t:i;if(!g)return null;const s=(function(f,S,p){const h=f[S],E=f[S-1],x=f[S+1];return!h||!E&&!x?0:p<S?E?h.left-(E.left+E.width):x.left-(h.left+h.width):x?x.left-(h.left+h.width):h.left-(E.left+E.width)})(n,C,a);if(C===a){const f=n[l];return f?{x:a<l?f.left+f.width-(g.left+g.width):f.left-g.left,y:0,...Fn}:null}return C>a&&C<=l?{x:-g.width-s,y:0,...Fn}:C<a&&C>=l?{x:g.width+s,y:0,...Fn}:{x:0,y:0,...Fn}},Mo=e=>{let{rects:t,activeIndex:n,overIndex:i,index:a}=e;const l=ko(t,i,n),C=t[a],g=l[a];return g&&C?{x:g.left-C.left,y:g.top-C.top,scaleX:g.width/C.width,scaleY:g.height/C.height}:null},il="Sortable",al=o.createContext({activeIndex:-1,containerId:il,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Mo,disabled:{draggable:!1,droppable:!1}});function sa(e){let{children:t,id:n,items:i,strategy:a=Mo,disabled:l=!1}=e;const{active:C,dragOverlay:g,droppableRects:s,over:f,measureDroppableContainers:S}=rl(),p=yn(il,n),h=g.rect!==null,E=o.useMemo(()=>i.map(q=>typeof q=="object"&&"id"in q?q.id:q),[i]),x=C!=null,A=C?E.indexOf(C.id):-1,N=f?E.indexOf(f.id):-1,K=o.useRef(E),P=!(function(q,T){if(q===T)return!0;if(q.length!==T.length)return!1;for(let $=0;$<q.length;$++)if(q[$]!==T[$])return!1;return!0})(E,K.current),R=N!==-1&&A===-1||P,O=(function(q){return typeof q=="boolean"?{draggable:q,droppable:q}:q})(l);Rt(()=>{P&&x&&S(E)},[P,E,x,S]),o.useEffect(()=>{K.current=E},[E]);const m=o.useMemo(()=>({activeIndex:A,containerId:p,disabled:O,disableTransforms:R,items:E,overIndex:N,useDragOverlay:h,sortedRects:ia(E,s),strategy:a}),[A,p,O.draggable,O.droppable,R,E,N,s,h,a]);return o.createElement(al.Provider,{value:m},t)}const da=e=>{let{id:t,items:n,activeIndex:i,overIndex:a}=e;return ko(n,i,a).indexOf(t)},ca=e=>{let{containerId:t,isSorting:n,wasDragging:i,index:a,items:l,newIndex:C,previousItems:g,previousContainerId:s,transition:f}=e;return!(!f||!i)&&(g===l||a!==C)&&(!!n||C!==a&&t===s)},ua={duration:200,easing:"ease"},sl="transform",ga=jt.Transition.toString({property:sl,duration:0,easing:"linear"}),ha={roleDescription:"sortable"};function ma(e){let{animateLayoutChanges:t=ca,attributes:n,disabled:i,data:a,getNewIndex:l=da,id:C,strategy:g,resizeObserverConfig:s,transition:f=ua}=e;const{items:S,containerId:p,activeIndex:h,disabled:E,disableTransforms:x,sortedRects:A,overIndex:N,useDragOverlay:K,strategy:P}=o.useContext(al),R=(function(W,le){var fe,ce;return typeof W=="boolean"?{draggable:W,droppable:!1}:{draggable:(fe=W?.draggable)!=null?fe:le.draggable,droppable:(ce=W?.droppable)!=null?ce:le.droppable}})(i,E),O=S.indexOf(C),m=o.useMemo(()=>({sortable:{containerId:p,index:O,items:S},...a}),[p,a,O,S]),q=o.useMemo(()=>S.slice(S.indexOf(C)),[S,C]),{rect:T,node:$,isOver:I,setNodeRef:k}=(function(W){let{data:le,disabled:fe=!1,id:ce,resizeObserverConfig:Se}=W;const ie=yn("Droppable"),{active:ve,dispatch:xe,over:Re,measureDroppableContainers:b}=o.useContext(wn),Fe=o.useRef({disabled:fe}),Ze=o.useRef(!1),ze=o.useRef(null),et=o.useRef(null),{disabled:oe,updateMeasurementsFor:ke,timeout:Ae}={...Zi,...Se},ye=pn(ke??ce),De=Bn({callback:o.useCallback(()=>{Ze.current?(et.current!=null&&clearTimeout(et.current),et.current=setTimeout(()=>{b(Array.isArray(ye.current)?ye.current:[ye.current]),et.current=null},Ae)):Ze.current=!0},[Ae]),disabled:oe||!ve}),D=o.useCallback((u,w)=>{De&&(w&&(De.unobserve(w),Ze.current=!1),u&&De.observe(u))},[De]),[ee,L]=zn(D),G=pn(le);return o.useEffect(()=>{De&&ee.current&&(De.disconnect(),Ze.current=!1,De.observe(ee.current))},[ee,De]),o.useEffect(()=>(xe({type:ct.RegisterDroppable,element:{id:ce,key:ie,disabled:fe,node:ee,rect:ze,data:G}}),()=>xe({type:ct.UnregisterDroppable,key:ie,id:ce})),[ce]),o.useEffect(()=>{fe!==Fe.current.disabled&&(xe({type:ct.SetDroppableDisabled,id:ce,key:ie,disabled:fe}),Fe.current.disabled=fe)},[ce,ie,fe,xe]),{active:ve,rect:ze,isOver:Re?.id===ce,node:ee,over:Re,setNodeRef:L}})({id:C,data:m,disabled:R.droppable,resizeObserverConfig:{updateMeasurementsFor:q,...s}}),{active:Z,activatorEvent:X,activeNodeRect:B,attributes:j,setNodeRef:H,listeners:J,isDragging:M,over:U,setActivatorNodeRef:ue,transform:we}=_i({id:C,data:m,attributes:{...ha,...n},disabled:R.draggable}),je=(function(){for(var W=arguments.length,le=new Array(W),fe=0;fe<W;fe++)le[fe]=arguments[fe];return o.useMemo(()=>ce=>{le.forEach(Se=>Se(ce))},le)})(k,H),Te=!!Z,ae=Te&&!x&&En(h)&&En(N),Me=!K&&M,Ke=Me&&ae?we:null,Ee=ae?Ke??(g??P)({rects:A,activeNodeRect:B,activeIndex:h,overIndex:N,index:O}):null,Ue=En(h)&&En(N)?l({id:C,items:S,activeIndex:h,overIndex:N}):O,re=Z?.id,te=o.useRef({activeId:re,items:S,newIndex:Ue,containerId:p}),pe=S!==te.current.items,Le=t({active:Z,containerId:p,isDragging:M,isSorting:Te,id:C,index:O,items:S,newIndex:te.current.newIndex,previousItems:te.current.items,previousContainerId:te.current.containerId,transition:f,wasDragging:te.current.activeId!=null}),Y=(function(W){let{disabled:le,index:fe,node:ce,rect:Se}=W;const[ie,ve]=o.useState(null),xe=o.useRef(fe);return Rt(()=>{if(!le&&fe!==xe.current&&ce.current){const Re=Se.current;if(Re){const b=Jt(ce.current,{ignoreTransform:!0}),Fe={x:Re.left-b.left,y:Re.top-b.top,scaleX:Re.width/b.width,scaleY:Re.height/b.height};(Fe.x||Fe.y)&&ve(Fe)}}fe!==xe.current&&(xe.current=fe)},[le,fe,ce,Se]),o.useEffect(()=>{ie&&ve(null)},[ie]),ie})({disabled:!Le,index:O,node:$,rect:T});return o.useEffect(()=>{Te&&te.current.newIndex!==Ue&&(te.current.newIndex=Ue),p!==te.current.containerId&&(te.current.containerId=p),S!==te.current.items&&(te.current.items=S)},[Te,Ue,p,S]),o.useEffect(()=>{if(re===te.current.activeId)return;if(re!=null&&te.current.activeId==null)return void(te.current.activeId=re);const W=setTimeout(()=>{te.current.activeId=re},50);return()=>clearTimeout(W)},[re]),{active:Z,activeIndex:h,attributes:j,data:m,rect:T,index:O,newIndex:Ue,items:S,isOver:I,isSorting:Te,isDragging:M,listeners:J,node:$,overIndex:N,over:U,setNodeRef:je,setActivatorNodeRef:ue,setDroppableNodeRef:k,setDraggableNodeRef:H,transform:Y??Ee,transition:(function(){if(Y||pe&&te.current.newIndex===O)return ga;if(!(Me&&!Un(X)||!f)&&(Te||Le))return jt.Transition.toString({...f,property:sl})})()}}function Vn(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],pa=(e,t)=>{let{context:{active:n,collisionRect:i,droppableRects:a,droppableContainers:l,over:C,scrollableAncestors:g}}=t;if(fa.includes(e.code)){if(e.preventDefault(),!n||!i)return;const s=[];l.getEnabled().forEach(p=>{if(!p||p!=null&&p.disabled)return;const h=a.get(p.id);if(h)switch(e.code){case Je.Down:i.top<h.top&&s.push(p);break;case Je.Up:i.top>h.top&&s.push(p);break;case Je.Left:i.left>h.left&&s.push(p);break;case Je.Right:i.left<h.left&&s.push(p)}});const f=(p=>{let{collisionRect:h,droppableRects:E,droppableContainers:x}=p;const A=Qo(h),N=[];for(const K of x){const{id:P}=K,R=E.get(P);if(R){const O=Qo(R),m=A.reduce((T,$,I)=>T+Br(O[I],$),0),q=Number((m/4).toFixed(4));N.push({id:P,data:{droppableContainer:K,value:q}})}}return N.sort(Vr)})({collisionRect:i,droppableRects:a,droppableContainers:s});let S=Pr(f,"id");if(S===C?.id&&f.length>1&&(S=f[1].id),S!=null){const p=l.get(n.id),h=l.get(S),E=h?a.get(h.id):null,x=h?.node.current;if(x&&E&&p&&h){const A=Kn(x).some((O,m)=>g[m]!==O),N=mr(p,h),K=(function(O,m){return!Vn(O)||!Vn(m)||!mr(O,m)?!1:O.data.current.sortable.index<m.data.current.sortable.index})(p,h),P=A||!N?{x:0,y:0}:{x:K?i.width-E.width:0,y:K?i.height-E.height:0},R={x:E.left,y:E.top};return P.x&&P.y?R:vn(R,P)}}}};function mr(e,t){return!(!Vn(e)||!Vn(t))&&e.data.current.sortable.containerId===t.data.current.sortable.containerId}const va=e=>{let{transform:t}=e;return{...t,y:0}},dl=o.memo(o.forwardRef((e,t)=>{const{children:n,style:i,className:a,index:l,editing:C,editable:g,selectedIndex:s,background:f,activeColor:S,borderColor:p,borderWidth:h,dragging:E,...x}=e;return c.jsxs("div",{ref:t,className:yt(a),style:{...i,display:"flex",flexDirection:"column",background:s===l?"white":f,minHeight:"0px",fontFamily:"inherit",fontSize:"16px",fontWeight:s===l?"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===l?"0px":"-1px",marginTop:s===l?"0px":"4px",marginBottom:"0px",background:"grey",minWidth:"1px"}}),n,s===l?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===l&&S?S?.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"},To=o.memo(o.forwardRef(({color:e,dragOverlay:t,dragging:n,disabled:i,fadeIn:a,handle:l,height:C,index:g,listeners:s,onRemove:f,renderItem:S,sorting:p,style:h,transition:E,transform:x,value:A,wrapperStyle:N,...K},P)=>{o.useEffect(()=>{if(t)return document.body.style.cursor="grabbing",()=>{document.body.style.cursor=""}},[t]);const R=S?S({dragOverlay:!!t,dragging:!!n,sorting:!!p,index:g,fadeIn:!!a,listeners:s,ref:P,style:h,transform:x,transition:E,value:A}):c.jsx(c.Fragment,{children:A});return c.jsx("div",{className:yt("tab-item",St.Wrapper,a&&St.fadeIn,p&&St.sorting,t&&St.dragOverlay),style:{...N,transition:[E,N?.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":g},ref:P,children:c.jsx("div",{className:yt(St.Item,n&&St.dragging,l&&St.withHandle,t&&St.dragOverlay,i&&St.disabled,e&&St.color,"dragging"),style:h,"data-cypress":"draggable-item",...l?void 0:s,...K,tabIndex:l?void 0:-1,children:R})})})),fr={Row:"_Row_1kr10_1"},cl=o.memo(o.forwardRef(({children:e,horizontal:t,style:n},i)=>c.jsx("div",{ref:i,style:{...n},className:yt(fr.Row,t&&fr.horizontal),children:e}))),Ca={...ll},ba=o.memo(o.forwardRef((e,t)=>{const{className:n,activationConstraint:i,animateLayoutChanges:a,adjustScale:l=!1,collisionDetection:C=qi,coordinateGetter:g=pa,dropAnimation:s=Ca,getItemStyles:f=()=>({}),getNewIndex:S,handle:p=!1,items:h,onMove:E,isDisabled:x=()=>!1,measuring:A,modifiers:N,renderItem:K,renderDivider:P,reorderItems:R=ko,strategy:O=Mo,style:m,useDragOverlay:q=!0,onDragStart:T,wrapperStyle:$=()=>({})}=e,[I,k]=o.useState(()=>h);o.useEffect(()=>{k(h)},[h]);const[Z,X]=o.useState(null),B=(function(){for(var U=arguments.length,ue=new Array(U),we=0;we<U;we++)ue[we]=arguments[we];return o.useMemo(()=>[...ue].filter(je=>je!=null),[...ue])})(ao(Jr,{activationConstraint:i}),ao(Qr,{activationConstraint:i}),ao(So,{scrollBehavior:"Cypress"in window?"auto":void 0,coordinateGetter:g})),j=I.indexOf.bind(I),H=Z?j(Z):-1,J=[];I.map((U,ue)=>{J.push(c.jsx(ya,{id:U,handle:p,index:ue,style:f,wrapperStyle:$,disabled:x(U),renderItem:K,animateLayoutChanges:a,useDragOverlay:q,getNewIndex:S},U+"-"+ue));const we=P?.({key:"divider-"+ue});we&&J.push(we)});const{getPortalContainer:M}=r.useFullscreenPortal();return c.jsxs(Wi,{sensors:B,collisionDetection:C,onDragStart:U=>{const{active:ue}=U;ue&&(T?.(U),X(ue.id))},autoScroll:{canScroll:U=>!0},onDragEnd:U=>{if(X(null),U.over){const ue=j(U.over.id);H!==ue&&(k(we=>R(we,H,ue)),E?.(H,ue))}},onDragCancel:()=>{X(null)},measuring:A,modifiers:N,children:[c.jsx("div",{style:{display:"flex",justifyContent:"flex-start",boxSizing:"border-box",...m},className:yt(n,St.Wrapper),children:c.jsx(sa,{items:I,strategy:O,children:c.jsx(cl,{ref:t,children:J})})}),q?Lt.createPortal(c.jsx(la,{adjustScale:l,dropAnimation:s,children:Z?c.jsx(To,{value:I[H],handle:p,renderItem:K,wrapperStyle:$({index:H,isDragging:!0,id:I[H]}),index:H,dragging:!0,style:f({id:I[H],index:H,isSorting:Z!==null,isDragging:!0,overIndex:-1,isDragOverlay:!0}),dragOverlay:!0}):null}),M()):null]})}));function ya({disabled:e,animateLayoutChanges:t,getNewIndex:n,handle:i,id:a,index:l,onRemove:C,style:g,renderItem:s,useDragOverlay:f,wrapperStyle:S}){const{attributes:p,isDragging:h,isSorting:E,listeners:x,overIndex:A,setNodeRef:N,transform:K,transition:P}=ma({id:a,animateLayoutChanges:t,disabled:e,getNewIndex:n});return c.jsx(To,{ref:N,value:a,disabled:e,dragging:h,sorting:E,handle:i,renderItem:s,index:l,style:g({index:l,id:a,isDragging:h,isSorting:E,overIndex:A}),onRemove:C?()=>C(a):void 0,transform:K,transition:P,wrapperStyle:S({index:l,isDragging:h,id:a}),listeners:x,"data-index":l,"data-id":a,dragOverlay:!f&&h,...p})}const wa="_TabStrip_3x0dp_1",xa=new d.Color("rgb(33, 115, 70)"),qa="#eee",Sa=e=>c.jsx(dl,{...e}),ul=o.memo(o.forwardRef((e,t)=>{const{children:n,style:i,className:a,selectedTabIndex:l=0,tabNames:C=[],onSelectedTabIndexChange:g,onTabNameChange:s,onTabMove:f,createScrollStartButton:S=r.defaultCreateScrollStartButton,createScrollEndButton:p=r.defaultCreateScrollEndButton,createScrollEdgeButton:h=r.defaultCreateScrollEdgeButton,createTabButton:E=Sa,createTabDivider:x,editLabelProps:A,disabled:N=!1,disableDrag:K=!1,background:P="white",activeColor:R=xa,borderColor:O=qa,borderWidth:m=1}=e,[q,T]=o.useState(l),[$,I]=o.useState(C),k=o.useCallback(ie=>{const ve=M.current?.[ie]?.closest(".tab-item")??M.current?.[ie];ve&&Me.current?.scrollTo({top:ve.offsetTop,left:ve.offsetLeft,behavior:"smooth"})},[]);o.useEffect(()=>{k(l)},[l]);const Z=o.useCallback((ie,ve)=>{ve!==q&&(T(ve),g?.(ve)),k(ve)},[g,q]),X=o.useCallback((ie,ve)=>{f?.(ie,ve)},[f]),B=o.useRef(null),[j,H]=o.useState(-1),J=o.useCallback((ie,ve)=>{s?.(ie,ve)},[s]);o.useLayoutEffect(()=>{T(l)},[l]),o.useLayoutEffect(()=>{I(C)},[C]);const M=o.useRef([]),U=o.useRef(null);o.useImperativeHandle(t,()=>Object.assign({startEdit(ie){M.current?.[ie]?.startEdit()},cancel(ie){M.current?.[ie]?.cancel()}},U.current),[q,j]);const ue=o.useCallback(({value:ie,index:ve,dragging:xe})=>{const{style:Re,maxLength:b,...Fe}=A||{},Ze=c.jsx(Nr,{ref:ze=>{M.current[ve]=ze},value:ie,disabled:N,maxLength:b,style:{color:q===ve&&R?R?.toRGBA().toString():"inherit",flex:"1 1 100%",paddingTop:"1px",paddingBottom:"1px",...Re},styleHover:{},onSubmit:ze=>(B.current=!1,H(-1),J(ve,ze)),onCancel:()=>{B.current=!1,H(-1)},onChange:ze=>{B.current=!0,H(ve)},...Fe});return E({onClick:ze=>Z(ze,ve),value:ie,index:ve,editing:j===ve&&B.current,editable:!0,disabled:N,selectedIndex:q,background:P,activeColor:R,borderColor:O,borderWidth:m,dragging:xe,children:Ze})},[q,J,Z,A,N,j,E]),[we,{width:je}]=Ot(),[Te,{width:ae}]=Ot(),Me=o.useRef(null),[Ke,Ee]=o.useState({left:0,top:0,width:0,height:0}),[Ue,re]=o.useState(null);o.useEffect(()=>{Ue!==null&&Me.current&&Me.current.scrollTo({left:Ue,behavior:"smooth"})},[Ue]);const te=o.useCallback((ie,ve=!1)=>{if(!Me.current)return 0;let xe=Me.current.firstChild.getBoundingClientRect(),Re=Me.current.firstChild.firstChild.children,b=0;return b=ve?0:r.ScrollUtils.getScrollTo(ie,xe.left,Re,!0,Math.max(0,ie-200)),re(b),Math.max(0,b)},[]),pe=o.useCallback((ie,ve=!1)=>{if(!Me.current)return 0;let xe=Me.current.firstChild.getBoundingClientRect(),Re=Me.current.firstChild.firstChild.children,b=0;const Fe=Math.ceil(ae-je);return b=ve?Fe:r.ScrollUtils.getScrollTo(ie,xe.left,Re,!1,Math.max(0,ie+200)),re(b),Math.min(Fe,b)},[ae,je]),Le=o.useRef(null),Y=o.useRef(null),W=o.useCallback(()=>{Y.current&&(clearTimeout(Y.current),Y.current=null,Le.current=null)},[]),le=o.useCallback((ie,ve,xe=260)=>{Le.current=ie,Y.current=setTimeout(()=>{const Re=ve?te(Le.current||ie):pe(Le.current||ie);Re!==Le.current?le(Re,ve,120):W()},xe)},[te,pe,W]);o.useEffect(()=>()=>W(),[W]);const fe=o.useMemo(()=>({style:{marginLeft:"4px",marginRight:"6px"},disabled:Math.floor(Ke.left)<=0||Math.floor(ae-je)===0,orientation:r.ScrollbarOrientation.Horizontal,onMouseUp:W,onMouseLeave:W,onMouseDown:()=>le(Me.current.scrollLeft,!0),onClick:ie=>te(Math.min(Me.current.scrollLeft,Ue??Number.MAX_SAFE_INTEGER),ie.ctrlKey)}),[Ke,Ue,ae,je]),ce=o.useMemo(()=>({style:{marginLeft:"6px",marginRight:"4px"},disabled:Math.floor(ae-je)<=Math.ceil(Ke.left),orientation:r.ScrollbarOrientation.Horizontal,onMouseUp:W,onMouseLeave:W,onMouseDown:()=>le(Me.current.scrollLeft,!1),onClick:ie=>pe(Math.max(Me.current.scrollLeft,Ue??0),ie.ctrlKey)}),[Ke,Ue,ae,je]),Se=o.useMemo(()=>c.jsxs(c.Fragment,{children:[c.jsx("div",{style:{minWidth:"16px"}}),n,h?.(fe)]}),[fe,ce,S,p,n,h]);return c.jsxs("div",{style:{...i,display:"flex",alignItems:"stretch"},className:yt(wa,a),ref:U,children:[c.jsx("div",{style:{borderTop:`solid ${O} ${m}px`,position:"absolute",width:"100%"}}),c.jsx("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:Se}),c.jsx("div",{className:"Tabs",ref:we,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:Me,onScroll:ie=>{Ee({left:ie.target.scrollLeft,top:ie.target.scrollTop,width:ie.target.scrollWidth,height:ie.target.scrollHeight})},children:c.jsx(ba,{isDisabled:ie=>N||K,items:$,strategy:aa,modifiers:[va],ref:Te,renderItem:ue,renderDivider:x,onMove:X,activationConstraint:{distance:15}})})}),c.jsx("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:h(ce)})]})}));ul.displayName="TabStrip";const Dn=o.createContext(null);Dn.displayName="DocThemesContext";const Ra="_script-editor_iy654_5",ka={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"},Ma=o.lazy(()=>Promise.resolve().then(()=>require("./qFryYDUi48aWqUKG.cjs")));let sn,dn,Ft=["define","require"],pr=!1;const vr=async(e,t,n)=>{const i=e.getModel();if(!i)return;const a=await t.languages.typescript.getTypeScriptWorker(),l=await a(i.uri),C=await l.getNavigationTree(i.uri.toString()),g=e.getPosition();let s={...g};s.lineNumber=1,s.column=1;let f=!1;for(let A=g.lineNumber;A>=1;A--)if(i.getLineContent(A).trim()===""){const N=Io(C,i.getOffsetAt({lineNumber:A,column:1}),"function");if(!N||Ia(N)){f=!0,s.lineNumber=A+1;break}{const K=N.spans[0].start;A=i.getPositionAt(K).lineNumber,s.lineNumber=A}}let S=n,p=!1;!f&&!S.startsWith(`
28
28
  `)&&s.lineNumber>1&&(S=`
29
29
  `+S,p=!0);let h=!1;i.getLineCount()>1&&(S.endsWith(`
30
30
 
31
31
  `)||(S+=`
32
32
 
33
- `,h=!0));const E=[{range:new t.Range(s.lineNumber,s.column,s.lineNumber,s.column),text:`${S}`}];let x=null;i.pushEditOperations([],E,A=>(x=A[0].range,p&&x.startLineNumber++,h&&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 Ta(e,t){let n=null;const i=e.length;for(let a=0;!n&&a<i;a++){const l=e[a];l.getName()===t.text&&(n=l)}return n?n.getContext():"formula"}function bo(e,t,n,i,a=[]){if(i.kind==="function"&&i.kindModifiers==="export"){const l=i.spans[0].start,C=e.getPositionAt(l);a.push({name:i.text,type:Ta(n,i),lineNumber:C.lineNumber})}if(i.childItems)for(const l of i.childItems)bo(e,t,n,l,a);return a}function Io(e,t,n="function",i){const a=e.spans,l=a.length;for(let C=0;C<l;C++){const g=a[C];if(g.start<=t&&t<g.start+g.length){if(e.kind===n&&(!i||e.kindModifiers===i))return e;for(const s of e.childItems||[]){const f=Io(s,t,n,i);if(f)return f}}return null}}function Ia(e){return e.kind==="comment"}const Ea=o.memo(o.forwardRef((e,t)=>{const{className:n,style:i,commands:a,readOnly:l=!1,onClose:C,darkMode:g,loadingPanel:s,autoFocus:f=!0,onStatusChange:S,...p}=e,h=o.useRef(null),E=r.useCallbackRef(C,[C]),x=o.useRef(!1),A=o.useMemo(()=>({contains(re){if(!h.current)return;const te=h.current.editor;return te&&te.getDomNode()?.contains(re)},focus(){if(!h.current)return;const re=h.current.editor;return re&&re.getDomNode()?.focus()}}),[]),N=o.useMemo(()=>[new r.Command("help",A,{label:"Script Commands",description:"Open Editor Commands",shortcut:{key:"F1"}},()=>{})],[]),K=o.useMemo(()=>{let re=null;const te=()=>A;return re=a?a.createChildGroup(te,"scriptEditor",!1):new r.CommandGroup(te,"scriptEditor"),re.addCommands(N,!0),re},[a,N]),P=r.useCommands(K,["executeSelectedScript","saveScripts"]),R=P[0],O=P[1],m=R?.context(),[q,T]=o.useState({message:"Loading",cursor:"",dirty:!1}),[$,I]=o.useState({loading:!1,compiling:!1,errors:[],warnings:[]}),k=r.useCallbackRef(re=>{T(te=>{const pe={...te,...re};return me.CommonUtils.deepEqual(pe,te)?te:(O.update({disabled:!pe.dirty}).updateCallback(async()=>{await Z()}),pe)})},[S,O]);o.useEffect(()=>{S?.(q)},[S,q]);const Z=r.useCallbackRef(async()=>{if(!h.current)return;const re=h.current.editor;let te;if(q.dirty){const pe=re.getValue();await m?.saveSource(pe),te=m?.getScripts().getModules().getByName("scripts");const Le=te?.getSource(),Y=re.getValue(),W=(Le?.length??0)!==pe.length||Le!==Y;k({dirty:W})}else te=m?.getScripts().getModules().getByName("scripts");return te},[q]);o.useEffect(()=>{const re=m?.getScripts();if(re)return re.addListeners({onBeforeSearch:()=>Z()})},[m]);const X=r.useCallbackRef(re=>{R?.execute(re)},[R]),B=o.useRef(""),[j,H]=o.useState(!1),J=r.useCallbackRef(async()=>{if(!h.current)return null;const re=h.current,te=re.editor;if(!te)return null;const pe=re.monaco,Le=await(async(Y,W,le="export")=>{const fe=Y.getModel();if(!fe)return null;const ce=await W.languages.typescript.getTypeScriptWorker(),Se=await ce(fe.uri),ie=await Se.getNavigationTree(fe.uri.toString());let ve=null,xe=Y.getSelection();const Re=xe.startLineNumber===xe.endLineNumber&&xe.startColumn===xe.endColumn?fe.getLineCount():Math.min(xe.endLineNumber,fe.getLineCount());for(let b=xe.startLineNumber;!ve&&b<=Re;b++){const Fe=Io(ie,fe.getOffsetAt({lineNumber:b,column:1}),"function",le);Fe&&(ve=Fe.text)}return ve})(te,pe);return k({message:(Le??"").toUpperCase()}),Le?{source:te.getValue(),name:Le}:null},[]);r.useCallbackRef(me.CommonUtils.debounce(Z,200),[]);const M=r.useCallbackRef(async(re,te,pe)=>{I(Y=>({...Y,compiling:!0}));const Le=await m?.getScripts().createModule({source:pe?.getValue(),declarationsOnly:!0});Le&&((async function(Y,W){const le=[];for(let fe=1;fe<Y.getLineCount()+1;fe++){const ce={startLineNumber:fe,startColumn:1,endLineNumber:fe,endColumn:Y.getLineLength(fe)+1},Se=Y.getValueInRange(ce).indexOf("modelt");Se!==-1&&le.push({message:"found 'modelt'",resource:"https://www.sheetxl.com",severity:W.MarkerSeverity.Hint,startLineNumber:ce.startLineNumber,startColumn:Se+1,endLineNumber:ce.startLineNumber,endColumn:Se+5})}W.editor.setModelMarkers(Y,"owner",le)})(re,te),(async function(Y,W,le,fe){const ce=await W.languages.typescript.getTypeScriptWorker(),Se=await ce(Y.uri),ie=await Se.getNavigationTree(Y.uri.toString()),ve=bo(Y,W,fe,ie).map(xe=>{let Re=null,b=null;return xe.type==="formula"?(Re="formula.margin-icon",b="Formula"):xe.type==="macro"?(Re="macro.margin-icon",b="Macro"):xe.type==="autoRun"&&(Re="autorun.margin-icon",b="Auto Run"),{range:new W.Range(xe.lineNumber,1,xe.lineNumber,1),options:{isWholeLine:!1,glyphMarginClassName:Re,glyphMarginHoverMessage:{value:b},stickiness:W.editor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges}}});ae.current&&ae.current.clear(),ae.current=le.createDecorationsCollection(ve)})(re,te,pe,Le?Le.getFunctions().getItems():me.CommonUtils.EmptyArray),I(Y=>({...Y,compiling:!1})))},[m]),U=r.useCallbackRef(me.CommonUtils.debounce(M,580),[]),ue=r.useCallbackRef(async(re=void 0)=>{if(!h.current||!m)return;const te=h.current.editor.getPosition(),pe={cursor:te?te.toString():""};re!==void 0&&(pe.message=re),k(pe);const Le=J();m.setSelectedFunction(Le)},[m]);o.useEffect(()=>{},[$]);const we=o.useRef(null),je=r.useCallbackRef(async()=>{await Z(),E?.()},[E]);o.useEffect(()=>{if(!m)return;const re={insertSnippet:pe=>{h.current?.editor&&vr(h.current.editor,h.current.monaco,pe)},close:()=>je()};m.setEditor(re),m.setSelectedFunction(J());const te=m.addContainerListener({onBeforeSave:async()=>{Z()},onReadonlyChange(){},onScriptChange:async()=>{if(!h.current?.editor||!m)return;const pe=h.current.editor,Le=m.getScripts().getModules().getItems()[0]?.getSource()??"";pe.setValue(Le)}});return()=>{m.setEditor(null),te()}},[m]),o.useEffect(()=>()=>{const re=we.current;if(re){re.dispose();const te=re.debounceTimer;te!==void 0&&clearTimeout(te),we.current=null}},[j]);const Te=r.useCallbackRef(re=>{const te=h.current?.editor;return!!te&&(te.focus(re),!0)},[q]),ae=o.useRef(null),Me=r.useCallbackRef((re,te)=>{h.current={monaco:te,editor:re},H(!0),ue("Loading Types");const pe=m.getScripts().getModules().getItems()[0]?.getSource()??"";re.setValue(pe),Promise.resolve().then(()=>require("./DbXdgK9pTSUI1I-u.cjs")).then(Y=>Y.customEditor).then(async Y=>{ue(""),Y.AutoTypings.create(re,{shareCache:!0,dontAdaptEditorOptions:!0,monaco:te,onUpdate:(W,le)=>{if(W.type==="LookedUpPackage"&&W.success!==void 0){const fe=te.languages.typescript.typescriptDefaults.getDiagnosticsOptions();te.languages.typescript.typescriptDefaults.setDiagnosticsOptions({...fe,diagnosticCodesToIgnore:[]})}},onError:W=>{W==="Not implemented yet"&&(W="Compile Errors"),console.warn("Error compiling types",W)}}).then(W=>{we.current=W;const le=re.getModel();U(le,te,re),(()=>{if(pr)return;const fe=(Se,ie)=>{try{if(ie===void 0)try{delete globalThis[Se]}catch{try{globalThis[Se]=void 0}catch{}}else globalThis[Se]=ie}catch{}},ce=Ft.length;for(let Se=0;Se<ce;Se++){const ie=Ft[Se];fe(ie,sn[ie])}sn=void 0,pr=!0})()})}),re.addCommand("executeScript",function(Y,...W){W?.[0]&&X({functionName:W?.[0]})},""),re.addAction({id:"executeScript",label:"Execute",keybindings:[te.KeyCode.F8],run:async Y=>{const W=J();m.setSelectedFunction(W);const le=await W;X(le)}}),re.addAction({id:"saveScript",label:"Save Script",keybindings:[te.KeyMod.CtrlCmd|te.KeyCode.KeyS],run:Y=>{Z()}}),re.onMouseDown(async Y=>{if(Y.target.type===te.editor.MouseTargetType.GUTTER_GLYPH_MARGIN){const W=Y.target.position.lineNumber,le=await te.languages.typescript.getTypeScriptWorker(),fe=await le(Le.uri),ce=await fe.getNavigationTree(Le.uri.toString()),Se=(await Z()).getFunctions().getItems(),ie=bo(Le,te,Se,ce).find(ve=>ve.lineNumber===W);if(ie){const ve=Y.event.browserEvent.button;ve===0?ie.type==="macro"||ie.type==="autoRun"?X({functionName:ie.name}):ie.type==="formula"&&m.quickInsertFunction?.(ie.name):ve===2&&(console.log("Context menu for function:",ie.name),Y.event.browserEvent.preventDefault())}}}),re.onDidChangeModelContent(()=>{k({dirty:!0}),U(Le,te,re)}),te.editor.onDidChangeMarkers(Y=>{Y.some(W=>W.toString()===Le.uri.toString())});const Le=re.getModel();(function(Y,W){W.languages.registerInlayHintsProvider("typescript",{provideInlayHints(le,fe,ce){const Se=[];for(let ie=1;ie<le.getLineCount()+1;ie++){const ve={startLineNumber:ie,startColumn:1,endLineNumber:ie,endColumn:le.getLineLength(ie)+1},xe="hint",Re=le.getValueInRange(ve).indexOf("hint");Re!==-1&&Se.push({kind:W.languages.InlayHintKind.Type,position:{lineNumber:ve.startLineNumber,column:Re+xe.length+1},label:"[hint]"})}return{hints:Se,dispose:()=>{}}}})})(0,te),Le.onDidChangeContent(Y=>{const W=m?.getScripts().getModules().getByName("scripts"),le=W?.getSource(),fe=re.getValue(),ce=(le?.length??0)!==fe.length||le!==fe;k({dirty:ce})}),re.onDidChangeCursorPosition(Y=>{ue()})},[m]),Ke=o.useMemo(()=>j?null:s||c.jsx("div",{style:{position:"absolute",width:"100%",height:"100%"},children:"Loading..."}),[j,s]),Ee=o.useMemo(()=>{if(!j){if(!sn){sn={};const te=Ft.length;for(let pe=0;pe<te;pe++){const Le=Ft[pe];sn[Le]=globalThis[Le]}}if(dn){const te=Ft.length;for(let pe=0;pe<te;pe++){const Le=Ft[pe];globalThis[Le]=dn[Le]}}}const re=m?.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(Ma,{theme:g?"extended-dark":"extended",options:{...ka,fixedOverflowWidgets:!0,readOnly:l},language:"typescript",value:re,onValidate:te=>{let pe=!1;const Le=te?te.length:0;for(let Y=0;!pe&&Y<Le;Y++)te[Y].severity===8&&(pe=!0)},beforeMount:te=>{te.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!1,noSyntaxValidation:!1,diagnosticCodesToIgnore:[2307]}),te.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0}),te.editor.defineTheme("extended",{base:"vs",inherit:!0,rules:[],colors:{}}),te.editor.defineTheme("extended-dark",{base:"vs-dark",inherit:!0,rules:[],colors:{}}),(async()=>{let pe=!1,Le=!1;try{const Y=await(async()=>await(await fetch("https://cdn.jsdelivr.net/npm/@sheetxl/sdk@0.7.4/types/scripting.d.ts")).text())(),W=te.Uri.parse('inmemory://model/"sheetxl-models".d.ts');let le=te.editor.getModel(W);le?Le=!0:le=te.editor.createModel(Y,"typescript",W),te.editor.setModelMarkers(le,"default",[]),pe=!0}catch(Y){console.warn("cant load types",Y)}if(te.languages.registerLinkProvider("*",{provideLinks:(Y,W)=>{const le=[],fe={links:le},ce=Y.getLinesContent(),Se=ce.length;for(let ie=1;ie<=Se;ie++){const ve=ce[ie-1],xe=te.editor.tokenize(ve,"typescript"),Re=xe[0].length;for(let b=0;b<Re;b++){const Fe=xe[0]?.[b];if(Fe&&Fe.type.startsWith("string")){let Ze=Fe.offset,ze=xe[0]?.[b+1]?.offset??ve.length,et=new te.Range(ie,Ze+1,ie,ze+1),oe=Y.getValueInRange(et);const ke=oe[0];ke!=="`"&&ke!=="'"&&ke!=='"'||(Ze++,oe=oe.substring(1));const Ae=oe[oe.length-1];Ae!=="`"&&Ae!=="'"&&Ae!=='"'||(Ze++,oe=oe.substring(0,oe.length-1));try{m.getRanges(oe)&&le.push({range:{endColumn:ze,endLineNumber:ie,startColumn:Ze,startLineNumber:ie},tooltip:`Goto range '${oe}'`,url:`/range/${oe}`})}catch(ye){console.warn(ye)}}}}return fe}}),te.editor.registerLinkOpener({open(Y){if(Y?.path?.startsWith("/range/")){try{m.getRanges(Y.path.substring(7))?.select()}catch(W){console.warn("invalid range",W)}return!0}return!1}}),!Le){const Y=te.languages.typescript.typescriptDefaults.getCompilerOptions();te.languages.typescript.typescriptDefaults.setCompilerOptions({...Y,target:te.languages.typescript.ScriptTarget.ES2020,lib:["webworker","es2020","esnext.asynciterable"],downlevelIteration:!0,moduleResolution:te.languages.typescript.ModuleResolutionKind.NodeJs,allowSyntheticDefaultImports:!0,baseUrl:"inmemory://model/",allowNonTsExtensions:!0})}if(B.current&&(await vr(h.current.editor,h.current.monaco,B.current),B.current=null),x.current&&requestAnimationFrame(async()=>{x.current&&te.editor.focus()}),!dn){dn={};const Y=Ft.length;for(let W=0;W<Y;W++){const le=Ft[W];dn[le]=globalThis[le]}}})()},onMount:Me})}),Ke]})},[m,K,l,Ke,g]),Ue=r.useImperativeElement(t,()=>({isScriptEditorElement:()=>!0,focus:re=>{Te(re)},close:()=>je(),getEditor:()=>m?.getEditor()}),[m]);return o.useEffect(()=>(f&&requestAnimationFrame(()=>{Ue.current?.focus()}),()=>{h.current?.editor&&requestAnimationFrame(()=>{Ue.current?.contains(document.activeElement)&&Ue.current?.focus()})}),[]),c.jsx("div",{className:yt("script-editor",Ra,n),style:{display:"flex",flexDirection:"row",flex:"1 1 100%",position:"relative",...i},ref:Ue,...p,children:Ee})}));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=ui,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=ci,exports.CornerTriangle=ho,exports.DateUtils=yl,exports.DocThemesContext=Dn,exports.DocThemesProvider=e=>{const{themes:t,children:n}=e;return c.jsx(Dn.Provider,{value:t,children:n})},exports.EditableLabel=Nr,exports.EmptyFrame=ti,exports.FilterButton=br,exports.FontUtils=wl,exports.Item=To,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=kr,exports.MovableArea=Ir,exports.PictureEditor=zr,exports.Row=cl,exports.ScriptEditor=Ea,exports.SheetCellEditor=wr,exports.SheetCellRenderer=yr,exports.SheetElement=Dr,exports.SheetScrollbar=wo,exports.StaticBorderRenderer=Fl,exports.StyledStrokePath=qr,exports.Tab=dl,exports.TabStrip=ul,exports.createCellEditStateFromCell=xr,exports.useBordersOverlay=yo,exports.useDocThemes=()=>{const e=o.useContext(Dn),[t]=o.useState(()=>new d.ThemeCollection);return o.useMemo(()=>e||t,[e])},exports.useModelListener=Qe,exports.useMovableCommands=Er,exports.useRangeListener=(e,t,n,i)=>{const a=o.useRef(n);a.current=n;const l=i?.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 C=s=>{a.current?.(s)},g=e.getRange(t).addListener(C,i);if(l){const s=e.getRange(t);C({getSource:()=>s,trigger:"modelChange",isDataChange:!1,isTransactional:!1,isUndo:!1,timeStamp:Date.now()})}return()=>{g?.()}},[e,t])},exports.useSheetCommands=Mr,exports.useSheetCopyPaste=Tr,Object.keys(r).forEach(e=>{e==="default"||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:()=>r[e]})});
33
+ `,h=!0));const E=[{range:new t.Range(s.lineNumber,s.column,s.lineNumber,s.column),text:`${S}`}];let x=null;i.pushEditOperations([],E,A=>(x=A[0].range,p&&x.startLineNumber++,h&&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 Ta(e,t){let n=null;const i=e.length;for(let a=0;!n&&a<i;a++){const l=e[a];l.getName()===t.text&&(n=l)}return n?n.getContext():"formula"}function bo(e,t,n,i,a=[]){if(i.kind==="function"&&i.kindModifiers==="export"){const l=i.spans[0].start,C=e.getPositionAt(l);a.push({name:i.text,type:Ta(n,i),lineNumber:C.lineNumber})}if(i.childItems)for(const l of i.childItems)bo(e,t,n,l,a);return a}function Io(e,t,n="function",i){const a=e.spans,l=a.length;for(let C=0;C<l;C++){const g=a[C];if(g.start<=t&&t<g.start+g.length){if(e.kind===n&&(!i||e.kindModifiers===i))return e;for(const s of e.childItems||[]){const f=Io(s,t,n,i);if(f)return f}}return null}}function Ia(e){return e.kind==="comment"}const Ea=o.memo(o.forwardRef((e,t)=>{const{className:n,style:i,commands:a,readOnly:l=!1,onClose:C,darkMode:g,loadingPanel:s,autoFocus:f=!0,onStatusChange:S,...p}=e,h=o.useRef(null),E=r.useCallbackRef(C,[C]),x=o.useRef(!1),A=o.useMemo(()=>({contains(re){if(!h.current)return;const te=h.current.editor;return te&&te.getDomNode()?.contains(re)},focus(){if(!h.current)return;const re=h.current.editor;return re&&re.getDomNode()?.focus()}}),[]),N=o.useMemo(()=>[new r.Command("help",A,{label:"Script Commands",description:"Open Editor Commands",shortcut:{key:"F1"}},()=>{})],[]),K=o.useMemo(()=>{let re=null;const te=()=>A;return re=a?a.createChildGroup(te,"scriptEditor",!1):new r.CommandGroup(te,"scriptEditor"),re.addCommands(N,!0),re},[a,N]),P=r.useCommands(K,["executeSelectedScript","saveScripts"]),R=P[0],O=P[1],m=R?.context(),[q,T]=o.useState({message:"Loading",cursor:"",dirty:!1}),[$,I]=o.useState({loading:!1,compiling:!1,errors:[],warnings:[]}),k=r.useCallbackRef(re=>{T(te=>{const pe={...te,...re};return me.CommonUtils.deepEqual(pe,te)?te:(O.update({disabled:!pe.dirty}).updateCallback(async()=>{await Z()}),pe)})},[S,O]);o.useEffect(()=>{S?.(q)},[S,q]);const Z=r.useCallbackRef(async()=>{if(!h.current)return;const re=h.current.editor;let te;if(q.dirty){const pe=re.getValue();await m?.saveSource(pe),te=m?.getScripts().getModules().getByName("scripts");const Le=te?.getSource(),Y=re.getValue(),W=(Le?.length??0)!==pe.length||Le!==Y;k({dirty:W})}else te=m?.getScripts().getModules().getByName("scripts");return te},[q]);o.useEffect(()=>{const re=m?.getScripts();if(re)return re.addListeners({onBeforeSearch:()=>Z()})},[m]);const X=r.useCallbackRef(re=>{R?.execute(re)},[R]),B=o.useRef(""),[j,H]=o.useState(!1),J=r.useCallbackRef(async()=>{if(!h.current)return null;const re=h.current,te=re.editor;if(!te)return null;const pe=re.monaco,Le=await(async(Y,W,le="export")=>{const fe=Y.getModel();if(!fe)return null;const ce=await W.languages.typescript.getTypeScriptWorker(),Se=await ce(fe.uri),ie=await Se.getNavigationTree(fe.uri.toString());let ve=null,xe=Y.getSelection();const Re=xe.startLineNumber===xe.endLineNumber&&xe.startColumn===xe.endColumn?fe.getLineCount():Math.min(xe.endLineNumber,fe.getLineCount());for(let b=xe.startLineNumber;!ve&&b<=Re;b++){const Fe=Io(ie,fe.getOffsetAt({lineNumber:b,column:1}),"function",le);Fe&&(ve=Fe.text)}return ve})(te,pe);return k({message:(Le??"").toUpperCase()}),Le?{source:te.getValue(),name:Le}:null},[]);r.useCallbackRef(me.CommonUtils.debounce(Z,200),[]);const M=r.useCallbackRef(async(re,te,pe)=>{I(Y=>({...Y,compiling:!0}));const Le=await m?.getScripts().createModule({source:pe?.getValue(),declarationsOnly:!0});Le&&((async function(Y,W){const le=[];for(let fe=1;fe<Y.getLineCount()+1;fe++){const ce={startLineNumber:fe,startColumn:1,endLineNumber:fe,endColumn:Y.getLineLength(fe)+1},Se=Y.getValueInRange(ce).indexOf("modelt");Se!==-1&&le.push({message:"found 'modelt'",resource:"https://www.sheetxl.com",severity:W.MarkerSeverity.Hint,startLineNumber:ce.startLineNumber,startColumn:Se+1,endLineNumber:ce.startLineNumber,endColumn:Se+5})}W.editor.setModelMarkers(Y,"owner",le)})(re,te),(async function(Y,W,le,fe){const ce=await W.languages.typescript.getTypeScriptWorker(),Se=await ce(Y.uri),ie=await Se.getNavigationTree(Y.uri.toString()),ve=bo(Y,W,fe,ie).map(xe=>{let Re=null,b=null;return xe.type==="formula"?(Re="formula.margin-icon",b="Formula"):xe.type==="macro"?(Re="macro.margin-icon",b="Macro"):xe.type==="autoRun"&&(Re="autorun.margin-icon",b="Auto Run"),{range:new W.Range(xe.lineNumber,1,xe.lineNumber,1),options:{isWholeLine:!1,glyphMarginClassName:Re,glyphMarginHoverMessage:{value:b},stickiness:W.editor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges}}});ae.current&&ae.current.clear(),ae.current=le.createDecorationsCollection(ve)})(re,te,pe,Le?Le.getFunctions().getItems():me.CommonUtils.EmptyArray),I(Y=>({...Y,compiling:!1})))},[m]),U=r.useCallbackRef(me.CommonUtils.debounce(M,580),[]),ue=r.useCallbackRef(async(re=void 0)=>{if(!h.current||!m)return;const te=h.current.editor.getPosition(),pe={cursor:te?te.toString():""};re!==void 0&&(pe.message=re),k(pe);const Le=J();m.setSelectedFunction(Le)},[m]);o.useEffect(()=>{},[$]);const we=o.useRef(null),je=r.useCallbackRef(async()=>{await Z(),E?.()},[E]);o.useEffect(()=>{if(!m)return;const re={insertSnippet:pe=>{h.current?.editor&&vr(h.current.editor,h.current.monaco,pe)},close:()=>je()};m.setEditor(re),m.setSelectedFunction(J());const te=m.addContainerListener({onBeforeSave:async()=>{Z()},onReadonlyChange(){},onScriptChange:async()=>{if(!h.current?.editor||!m)return;const pe=h.current.editor,Le=m.getScripts().getModules().getItems()[0]?.getSource()??"";pe.setValue(Le)}});return()=>{m.setEditor(null),te()}},[m]),o.useEffect(()=>()=>{const re=we.current;if(re){re.dispose();const te=re.debounceTimer;te!==void 0&&clearTimeout(te),we.current=null}},[j]);const Te=r.useCallbackRef(re=>{const te=h.current?.editor;return!!te&&(te.focus(re),!0)},[q]),ae=o.useRef(null),Me=r.useCallbackRef((re,te)=>{h.current={monaco:te,editor:re},H(!0),ue("Loading Types");const pe=m.getScripts().getModules().getItems()[0]?.getSource()??"";re.setValue(pe),Promise.resolve().then(()=>require("./CE955M-HEnxcgkwj.cjs")).then(Y=>Y.customEditor).then(async Y=>{ue(""),Y.AutoTypings.create(re,{shareCache:!0,dontAdaptEditorOptions:!0,monaco:te,onUpdate:(W,le)=>{if(W.type==="LookedUpPackage"&&W.success!==void 0){const fe=te.languages.typescript.typescriptDefaults.getDiagnosticsOptions();te.languages.typescript.typescriptDefaults.setDiagnosticsOptions({...fe,diagnosticCodesToIgnore:[]})}},onError:W=>{W==="Not implemented yet"&&(W="Compile Errors"),console.warn("Error compiling types",W)}}).then(W=>{we.current=W;const le=re.getModel();U(le,te,re),(()=>{if(pr)return;const fe=(Se,ie)=>{try{if(ie===void 0)try{delete globalThis[Se]}catch{try{globalThis[Se]=void 0}catch{}}else globalThis[Se]=ie}catch{}},ce=Ft.length;for(let Se=0;Se<ce;Se++){const ie=Ft[Se];fe(ie,sn[ie])}sn=void 0,pr=!0})()})}),re.addCommand("executeScript",function(Y,...W){W?.[0]&&X({functionName:W?.[0]})},""),re.addAction({id:"executeScript",label:"Execute",keybindings:[te.KeyCode.F8],run:async Y=>{const W=J();m.setSelectedFunction(W);const le=await W;X(le)}}),re.addAction({id:"saveScript",label:"Save Script",keybindings:[te.KeyMod.CtrlCmd|te.KeyCode.KeyS],run:Y=>{Z()}}),re.onMouseDown(async Y=>{if(Y.target.type===te.editor.MouseTargetType.GUTTER_GLYPH_MARGIN){const W=Y.target.position.lineNumber,le=await te.languages.typescript.getTypeScriptWorker(),fe=await le(Le.uri),ce=await fe.getNavigationTree(Le.uri.toString()),Se=(await Z()).getFunctions().getItems(),ie=bo(Le,te,Se,ce).find(ve=>ve.lineNumber===W);if(ie){const ve=Y.event.browserEvent.button;ve===0?ie.type==="macro"||ie.type==="autoRun"?X({functionName:ie.name}):ie.type==="formula"&&m.quickInsertFunction?.(ie.name):ve===2&&(console.log("Context menu for function:",ie.name),Y.event.browserEvent.preventDefault())}}}),re.onDidChangeModelContent(()=>{k({dirty:!0}),U(Le,te,re)}),te.editor.onDidChangeMarkers(Y=>{Y.some(W=>W.toString()===Le.uri.toString())});const Le=re.getModel();(function(Y,W){W.languages.registerInlayHintsProvider("typescript",{provideInlayHints(le,fe,ce){const Se=[];for(let ie=1;ie<le.getLineCount()+1;ie++){const ve={startLineNumber:ie,startColumn:1,endLineNumber:ie,endColumn:le.getLineLength(ie)+1},xe="hint",Re=le.getValueInRange(ve).indexOf("hint");Re!==-1&&Se.push({kind:W.languages.InlayHintKind.Type,position:{lineNumber:ve.startLineNumber,column:Re+xe.length+1},label:"[hint]"})}return{hints:Se,dispose:()=>{}}}})})(0,te),Le.onDidChangeContent(Y=>{const W=m?.getScripts().getModules().getByName("scripts"),le=W?.getSource(),fe=re.getValue(),ce=(le?.length??0)!==fe.length||le!==fe;k({dirty:ce})}),re.onDidChangeCursorPosition(Y=>{ue()})},[m]),Ke=o.useMemo(()=>j?null:s||c.jsx("div",{style:{position:"absolute",width:"100%",height:"100%"},children:"Loading..."}),[j,s]),Ee=o.useMemo(()=>{if(!j){if(!sn){sn={};const te=Ft.length;for(let pe=0;pe<te;pe++){const Le=Ft[pe];sn[Le]=globalThis[Le]}}if(dn){const te=Ft.length;for(let pe=0;pe<te;pe++){const Le=Ft[pe];globalThis[Le]=dn[Le]}}}const re=m?.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(Ma,{theme:g?"extended-dark":"extended",options:{...ka,fixedOverflowWidgets:!0,readOnly:l},language:"typescript",value:re,onValidate:te=>{let pe=!1;const Le=te?te.length:0;for(let Y=0;!pe&&Y<Le;Y++)te[Y].severity===8&&(pe=!0)},beforeMount:te=>{te.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!1,noSyntaxValidation:!1,diagnosticCodesToIgnore:[2307]}),te.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0}),te.editor.defineTheme("extended",{base:"vs",inherit:!0,rules:[],colors:{}}),te.editor.defineTheme("extended-dark",{base:"vs-dark",inherit:!0,rules:[],colors:{}}),(async()=>{let pe=!1,Le=!1;try{const Y=await(async()=>await(await fetch("https://cdn.jsdelivr.net/npm/@sheetxl/sdk@0.7.5/types/scripting.d.ts")).text())(),W=te.Uri.parse('inmemory://model/"sheetxl-models".d.ts');let le=te.editor.getModel(W);le?Le=!0:le=te.editor.createModel(Y,"typescript",W),te.editor.setModelMarkers(le,"default",[]),pe=!0}catch(Y){console.warn("cant load types",Y)}if(te.languages.registerLinkProvider("*",{provideLinks:(Y,W)=>{const le=[],fe={links:le},ce=Y.getLinesContent(),Se=ce.length;for(let ie=1;ie<=Se;ie++){const ve=ce[ie-1],xe=te.editor.tokenize(ve,"typescript"),Re=xe[0].length;for(let b=0;b<Re;b++){const Fe=xe[0]?.[b];if(Fe&&Fe.type.startsWith("string")){let Ze=Fe.offset,ze=xe[0]?.[b+1]?.offset??ve.length,et=new te.Range(ie,Ze+1,ie,ze+1),oe=Y.getValueInRange(et);const ke=oe[0];ke!=="`"&&ke!=="'"&&ke!=='"'||(Ze++,oe=oe.substring(1));const Ae=oe[oe.length-1];Ae!=="`"&&Ae!=="'"&&Ae!=='"'||(Ze++,oe=oe.substring(0,oe.length-1));try{m.getRanges(oe)&&le.push({range:{endColumn:ze,endLineNumber:ie,startColumn:Ze,startLineNumber:ie},tooltip:`Goto range '${oe}'`,url:`/range/${oe}`})}catch(ye){console.warn(ye)}}}}return fe}}),te.editor.registerLinkOpener({open(Y){if(Y?.path?.startsWith("/range/")){try{m.getRanges(Y.path.substring(7))?.select()}catch(W){console.warn("invalid range",W)}return!0}return!1}}),!Le){const Y=te.languages.typescript.typescriptDefaults.getCompilerOptions();te.languages.typescript.typescriptDefaults.setCompilerOptions({...Y,target:te.languages.typescript.ScriptTarget.ES2020,lib:["webworker","es2020","esnext.asynciterable"],downlevelIteration:!0,moduleResolution:te.languages.typescript.ModuleResolutionKind.NodeJs,allowSyntheticDefaultImports:!0,baseUrl:"inmemory://model/",allowNonTsExtensions:!0})}if(B.current&&(await vr(h.current.editor,h.current.monaco,B.current),B.current=null),x.current&&requestAnimationFrame(async()=>{x.current&&te.editor.focus()}),!dn){dn={};const Y=Ft.length;for(let W=0;W<Y;W++){const le=Ft[W];dn[le]=globalThis[le]}}})()},onMount:Me})}),Ke]})},[m,K,l,Ke,g]),Ue=r.useImperativeElement(t,()=>({isScriptEditorElement:()=>!0,focus:re=>{Te(re)},close:()=>je(),getEditor:()=>m?.getEditor()}),[m]);return o.useEffect(()=>(f&&requestAnimationFrame(()=>{Ue.current?.focus()}),()=>{h.current?.editor&&requestAnimationFrame(()=>{Ue.current?.contains(document.activeElement)&&Ue.current?.focus()})}),[]),c.jsx("div",{className:yt("script-editor",Ra,n),style:{display:"flex",flexDirection:"row",flex:"1 1 100%",position:"relative",...i},ref:Ue,...p,children:Ee})}));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=ui,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=ci,exports.CornerTriangle=ho,exports.DateUtils=yl,exports.DocThemesContext=Dn,exports.DocThemesProvider=e=>{const{themes:t,children:n}=e;return c.jsx(Dn.Provider,{value:t,children:n})},exports.EditableLabel=Nr,exports.EmptyFrame=ti,exports.FilterButton=br,exports.FontUtils=wl,exports.Item=To,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=kr,exports.MovableArea=Ir,exports.PictureEditor=zr,exports.Row=cl,exports.ScriptEditor=Ea,exports.SheetCellEditor=wr,exports.SheetCellRenderer=yr,exports.SheetElement=Dr,exports.SheetScrollbar=wo,exports.StaticBorderRenderer=Fl,exports.StyledStrokePath=qr,exports.Tab=dl,exports.TabStrip=ul,exports.createCellEditStateFromCell=xr,exports.useBordersOverlay=yo,exports.useDocThemes=()=>{const e=o.useContext(Dn),[t]=o.useState(()=>new d.ThemeCollection);return o.useMemo(()=>e||t,[e])},exports.useModelListener=Qe,exports.useMovableCommands=Er,exports.useRangeListener=(e,t,n,i)=>{const a=o.useRef(n);a.current=n;const l=i?.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 C=s=>{a.current?.(s)},g=e.getRange(t).addListener(C,i);if(l){const s=e.getRange(t);C({getSource:()=>s,trigger:"modelChange",isDataChange:!1,isTransactional:!1,isUndo:!1,timeStamp:Date.now()})}return()=>{g?.()}},[e,t])},exports.useSheetCommands=Mr,exports.useSheetCopyPaste=Tr,Object.keys(r).forEach(e=>{e==="default"||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:()=>r[e]})});