@sheetxl/react 0.6.17 → 0.6.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/cjs/{h8lPGgv9cVj8fFQP.cjs → CR-NCvvs9fGrPpo3.cjs} +1 -1
- package/browser/cjs/{CC5Mt9hnLmMA_80l.cjs → Dc7wlVYwIQGS2M3U.cjs} +1 -1
- package/browser/cjs/index.cjs +10 -10
- package/browser/cjs/{733mgpb8sZEz51Zu.cjs → uZorIwfVPOsnGRmK.cjs} +1 -1
- package/browser/esm/{CBTmZtSd4cl5RgQX.mjs → CLyGkzbKPN5SnksR.mjs} +1 -1
- package/browser/esm/{BrF3cWIyyBnGYHZJ.mjs → DRANb7mus_7OUudL.mjs} +1 -1
- package/browser/esm/{BJF9NFa3EZpBkX1a.mjs → K8x4JdifuZb36Uw8.mjs} +1 -1
- package/browser/esm/index.mjs +940 -940
- package/node/esm/{B5wXNt_H2jBDwij-.mjs → BiHcCoh_FGlIztuz.mjs} +1 -1
- package/node/esm/index.mjs +28 -28
- package/package.json +5 -5
package/browser/esm/index.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
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
|
-
import { FormulaError as ti, NumberFormat as Yt, ICell as Xt, IBorder as Dt, ITextFrame as pe, GeomUtils as Rt, ScalarType as Gn, IFont as ut, IRange as
|
|
2
|
+
import { FormulaError as ti, NumberFormat as Yt, ICell as Xt, IBorder as Dt, ITextFrame as pe, GeomUtils as Rt, ScalarType as Gn, IFont as ut, IRange as Ce, LicenseManager as ni, IColor as tl, AutoFill as nl, ISheetView as en, Color as oi, IFill as ho, RangeClipboardItem as ol, ExternalRangeClipboardItem as rl, TextUtils as tr, IAnchored as an, CoordUtils as il, ThemeCollection as ll } from "@sheetxl/sdk";
|
|
3
3
|
import { LicenseManager as Ld } from "@sheetxl/sdk";
|
|
4
|
-
import { ReactUtils as at, useImperativeElement as Zt, useCallbackRef as le, KeyCodes as At, SimpleCommand as je, Command as Y, KeyModifiers as
|
|
4
|
+
import { ReactUtils as at, useImperativeElement as Zt, useCallbackRef as le, KeyCodes as At, SimpleCommand as je, Command as Y, KeyModifiers as te, CommandGroup as Co, useCopyPaste as ri, useEditMode as gn, useGlobalClipboard as al, NotificationType as nr, useCommands as ii, ScrollbarOrientation as sn, VirtualScrollbar as sl, MouseButtonCodes as li, ToolTipPlacement as Ln, DefaultNotifier as dl, HorizontalAlignment as cl, ScrollPane as ul, useFullscreenPortal as gl, defaultCreateScrollStartButton as hl, defaultCreateScrollEndButton as ml, defaultCreateScrollEdgeButton as pl, ScrollUtils as hr } from "@sheetxl/utils-react";
|
|
5
5
|
export * from "@sheetxl/utils-react";
|
|
6
6
|
import { jsx as f, jsxs as et, Fragment as xn } from "react/jsx-runtime";
|
|
7
7
|
import { CommonUtils as Xe, AnchorLocation as bt, TypesUtils as _n, CoordUtils as Ct } from "@sheetxl/utils";
|
|
8
|
-
import ot, { memo as ft, useMemo as
|
|
8
|
+
import ot, { memo as ft, useMemo as Se, useState as me, forwardRef as yt, useRef as Te, useEffect as be, useLayoutEffect as Bt, useCallback as Ze, version as fl, useReducer as dn, Suspense as ai, createElement as vl, createContext as kn, useContext as Jt, cloneElement as wl, useImperativeHandle as yl } from "react";
|
|
9
9
|
import { STANDARD_KEY_CHARS as bl, useSelection as si, useHeaderSelection as ql, HeaderRenderer as Cl, Grid as di, HeaderDivider as Sl, SELECTION_CLIP_INSETS as _o, defaultSelectionRenderer as xl, useKeyboardEditorOverlay as kl, Selection as ci, SVGLine as ao } from "@sheetxl/grid-react";
|
|
10
10
|
import { unstable_batchedUpdates as Hn, createPortal as ui } from "react-dom";
|
|
11
11
|
/**
|
|
12
|
-
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.6.
|
|
12
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.6.19
|
|
13
13
|
*
|
|
14
14
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
15
15
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -25,7 +25,7 @@ const Zn = (e = 6e4) => new Date(Math.floor(Date.now() / e) * e), Qs = Object.fr
|
|
|
25
25
|
let S = "red", b = [], T = [];
|
|
26
26
|
return t === bt.TopLeft ? (S = l ? "rgb(255, 198, 246)" : "green", b.push(m), T.push(m), b.push(m + d), T.push(m), b.push(m), T.push(m + d)) : t === bt.TopRight ? (S = l ? "rgb(0, 255, 255)" : "red", b.push(n - m), T.push(m), b.push(n - (m + d)), T.push(m), b.push(n - m), T.push(m + d)) : t === bt.BottomRight ? (S = l ? "rgb(236, 252, 211)" : "purple", b.push(n - m), T.push(r - m), b.push(n - (m + d)), T.push(r - m), b.push(n - m), T.push(r - (m + d))) : t === bt.BottomLeft && (S = l ? "rgb(255, 236, 183)" : "blue", b.push(m), T.push(r - m), b.push(m + d), T.push(r - m), b.push(m), T.push(r - (m + d))), f("svg", { width: `${n}`, height: `${r}`, viewBox: `0 0 ${n} ${r}`, style: { position: "absolute", width: `${n}px`, height: `${r}px`, pointerEvents: "none", ...a }, ...C, children: f("path", { d: `M ${b[0]} ${T[0]} L ${b[1]} ${T[1]} L ${b[2]} ${T[2]} L ${b[0]} ${T[0]} Z`, fill: c ?? S, ...p }) });
|
|
27
27
|
}), Rl = (e) => {
|
|
28
|
-
const { renderBounds: t, darkMode: n, zoom: r, disabled: i, filter: o, onFilterButtonMouseDown: l, style: c, ...p } = e, a =
|
|
28
|
+
const { renderBounds: t, darkMode: n, zoom: r, disabled: i, filter: o, onFilterButtonMouseDown: l, style: c, ...p } = e, a = Se(() => {
|
|
29
29
|
let S = null;
|
|
30
30
|
const b = o.getSortField();
|
|
31
31
|
b && (S = b.reverse);
|
|
@@ -47,21 +47,21 @@ const Zn = (e = 6e4) => new Date(Math.floor(Date.now() / e) * e), Qs = Object.fr
|
|
|
47
47
|
}
|
|
48
48
|
else x = v.getNumberFormat();
|
|
49
49
|
L || (V = v.getTextOverflow());
|
|
50
|
-
const P = V ? V.colBounds.width + V.leftOffset + V.rightOffset : O,
|
|
51
|
-
let
|
|
52
|
-
x && (
|
|
50
|
+
const P = V ? V.colBounds.width + V.leftOffset + V.rightOffset : O, ee = V ? V.anchorBounds.x - V.leftOffset : 0, I = V ? V.anchorBounds.width : O, A = V ? V.anchorBounds.x : 0;
|
|
51
|
+
let se, we = v.getRenderHorizontalAlignment();
|
|
52
|
+
x && (se = x?.formattedRuns, k = se?.runs[0]?.text ?? x.displayText);
|
|
53
53
|
const Ge = v.getCalcStatus() === Xt.CalcStatus.Pending;
|
|
54
|
-
let
|
|
54
|
+
let Ae = null, ue = q.getFill().toCSS(N, r), Ie = 0, Je = 0;
|
|
55
55
|
if (!q.getBorder().isEmpty()) {
|
|
56
56
|
const Oe = q.getBorder().getRight();
|
|
57
|
-
!Oe.isNone() && Dt.BuiltInDefinitions.get(Oe.getStyle()).width > 1 && (
|
|
57
|
+
!Oe.isNone() && Dt.BuiltInDefinitions.get(Oe.getStyle()).width > 1 && (Ie = 1);
|
|
58
58
|
const D = q.getBorder().getBottom();
|
|
59
59
|
!D.isNone() && Dt.BuiltInDefinitions.get(D.getStyle()).width > 1 && (Je = 1);
|
|
60
60
|
}
|
|
61
61
|
let Ye = null;
|
|
62
|
-
if (O !== I ||
|
|
62
|
+
if (O !== I || Ie || Je || typeof ue?.backgroundPosition == "number") {
|
|
63
63
|
const { backgroundPosition: Oe, ...D } = ue, X = Oe ?? 0, F = p?.getScrollTopLeft(), _ = X ? -(r.x + (F.left ?? 0)) % X : 0, s = X ? -(r.y + (F.top ?? 0)) % X : 0;
|
|
64
|
-
(Oe !== void 0 ||
|
|
64
|
+
(Oe !== void 0 || Ie || Je || O !== I) && (Object.keys(D).length === 1 && D.background === "none" || (ue = null, Ye = f("div", { className: "fill", style: { marginLeft: `${_}px`, marginTop: `${s}px`, left: A * c, width: at.boundPixel(I * c - _ + 1 + Ie), height: at.boundPixel(r.height - s + 1 + Je), ...D } }, "background")));
|
|
65
65
|
}
|
|
66
66
|
let Fe = null;
|
|
67
67
|
const ge = v.getComments(), $ = v.getWarnings(), Le = v.getErrors();
|
|
@@ -71,59 +71,59 @@ const Zn = (e = 6e4) => new Date(Math.floor(Date.now() / e) * e), Qs = Object.fr
|
|
|
71
71
|
}
|
|
72
72
|
const ye = q.getFont();
|
|
73
73
|
let Z = x?.conditionalColor;
|
|
74
|
-
const K = q.getAlignment(),
|
|
75
|
-
let
|
|
76
|
-
const Ne = { ...o, left: o.left - 1, top: o.top - 1, width: o.width + 1 +
|
|
74
|
+
const K = q.getAlignment(), oe = K.getHorizontal() === pe.HorizontalAlignment.Fill, re = K.getHorizontal() === pe.HorizontalAlignment.CenterContinuous || oe, he = re || L ? 0 : K.getRotation(), xe = v.getInsets(), ae = xe.top + xe.bottom;
|
|
75
|
+
let qe = xe.left, De = xe.right;
|
|
76
|
+
const Ne = { ...o, left: o.left - 1, top: o.top - 1, width: o.width + 1 + Ie, height: o.height + 1 + Je }, u = v.getColumnFilter(), Be = u && !u?.hasHiddenButton();
|
|
77
77
|
let st = null;
|
|
78
78
|
Ge && (st = et("div", { className: "slider", children: [f("div", { className: "line" }), f("div", { className: "subline inc" })] }, "pending"));
|
|
79
|
-
const Ke = !(Ge || Be || Ye || i || Fe ||
|
|
79
|
+
const Ke = !(Ge || Be || Ye || i || Fe || se?.runs.length > 1 || V || he % 360 != 0);
|
|
80
80
|
ue?.background === "none" && (ue = null);
|
|
81
81
|
let Qe = re || !(!V || !(V.rightIndex > 0 || V.leftIndex > 0 || V.colSpan > 1));
|
|
82
82
|
if (!Qe) {
|
|
83
83
|
const Oe = v.getSpans();
|
|
84
84
|
(Oe.width > 1 || Oe.height > 1) && (Qe = !0);
|
|
85
85
|
}
|
|
86
|
-
const
|
|
86
|
+
const ne = { ...ue, ...Ne, pointerEvents: b ? "auto" : void 0 };
|
|
87
87
|
if (!Xe.isEmpty(k) || !Xe.isEmpty(x?.repeatPlaceholder)) {
|
|
88
88
|
const Oe = x?.canWrap ?? !1;
|
|
89
89
|
let D = null, X = null, F = null, _ = [], s = !0;
|
|
90
90
|
m || L || w !== 0 || (s = !1);
|
|
91
91
|
const y = v.getTextFrame(L);
|
|
92
92
|
if (s && y) {
|
|
93
|
-
let M = P - 1 - (
|
|
93
|
+
let M = P - 1 - (qe + De);
|
|
94
94
|
if (he) {
|
|
95
95
|
D = y.layout().bounds;
|
|
96
|
-
const
|
|
97
|
-
if (
|
|
98
|
-
let fe =
|
|
96
|
+
const Re = { x: 0, y: 0, width: P - 1, height: R };
|
|
97
|
+
if (se) {
|
|
98
|
+
let fe = se.width;
|
|
99
99
|
if (x.repeatPlaceholder || x.repeatChars.length > 0) {
|
|
100
|
-
const ve = Rt.boundsToPoints(
|
|
101
|
-
fe = Rt.minBoundingRect(
|
|
100
|
+
const ve = Rt.boundsToPoints(Re), Me = Rt.rotatePoints(ve, -he);
|
|
101
|
+
fe = Rt.minBoundingRect(Me).width;
|
|
102
102
|
}
|
|
103
103
|
D = { ...D, width: fe };
|
|
104
104
|
}
|
|
105
|
-
F = Rt.clipToOuterRect({ ...D, width: D.width + 1 +
|
|
105
|
+
F = Rt.clipToOuterRect({ ...D, width: D.width + 1 + qe + De }, Re, he), M = F.width - 1 - (qe + De) + 0.01;
|
|
106
106
|
}
|
|
107
107
|
let g = null;
|
|
108
108
|
Oe && (g = { width: M });
|
|
109
109
|
let z = null, h = x?.repeatPlaceholder;
|
|
110
110
|
const B = y.layout(g);
|
|
111
|
-
if (D = B.bounds, L ? D = { ...D, width: 0 } :
|
|
111
|
+
if (D = B.bounds, L ? D = { ...D, width: 0 } : se && (D = { ...D, width: x.repeatPlaceholder || x.repeatChars.length > 0 ? M : se.width }), he && Oe) {
|
|
112
112
|
let ce = null;
|
|
113
|
-
B.visitLines({ visitTextLine: (
|
|
114
|
-
let ve =
|
|
115
|
-
const
|
|
113
|
+
B.visitLines({ visitTextLine: (Re, fe) => {
|
|
114
|
+
let ve = Re.bounds;
|
|
115
|
+
const Me = Rt.boundsToPoints(ve), We = Rt.rotatePoints(Me, he), He = Rt.minBoundingRect(We);
|
|
116
116
|
ve = { ...ve, x: (He.width - ve.width) / 2, y: (He.height - ve.height) / 2 }, ce = ce ? Rt.unionBounds(ce, ve) : ve;
|
|
117
|
-
} }), D = { ...ce, width: ce.width +
|
|
117
|
+
} }), D = { ...ce, width: ce.width + qe + De };
|
|
118
118
|
}
|
|
119
119
|
if (!h && v.getType() !== Gn.String && Math.floor(D.width) > M) {
|
|
120
120
|
if (q.getNumberFormat() === "General" && v.getType() === Gn.Number) {
|
|
121
|
-
const ce = q.measureText("0"),
|
|
122
|
-
if (
|
|
123
|
-
const We = `0${
|
|
121
|
+
const ce = q.measureText("0"), Re = Math.floor(M / ce.width), fe = w, ve = Xe.splitNumber(fe), Me = Math.min(10, Re - (Math.max(1, ve.ipLength) + 1) - (fe < 0 ? 1 : 0));
|
|
122
|
+
if (Me >= -1) {
|
|
123
|
+
const We = `0${Me > 0 ? "." : ""}${"#".repeat(Math.max(0, Me))}`;
|
|
124
124
|
z = v.getNumberFormat(We).displayText, z === "0" && fe < 0 && (z = "-0");
|
|
125
125
|
} else if (Math.abs(fe) >= Math.pow(10, 5) || Math.abs(fe) <= Math.pow(10, -5)) {
|
|
126
|
-
const We =
|
|
126
|
+
const We = Re - 5 - (fe < 0 ? 1 : 0);
|
|
127
127
|
if (We >= 0) {
|
|
128
128
|
const He = `0.${"0".repeat(Math.max(0, We - 1))}E+00`;
|
|
129
129
|
z = v.getNumberFormat(He).displayText;
|
|
@@ -132,27 +132,27 @@ const Zn = (e = 6e4) => new Date(Math.floor(Date.now() / e) * e), Qs = Object.fr
|
|
|
132
132
|
}
|
|
133
133
|
z || (h = "#");
|
|
134
134
|
}
|
|
135
|
-
if (!h &&
|
|
136
|
-
const ce = q.measureText(h),
|
|
137
|
-
z =
|
|
135
|
+
if (!h && se?.lastRepeatIndex >= 0 && se?.width > M && (h = "#"), h && M > 0) {
|
|
136
|
+
const ce = q.measureText(h), Re = Math.floor((M || 1) / (ce?.width || 1));
|
|
137
|
+
z = Re > 0 ? h.repeat(Re) : "", we = pe.HorizontalAlignment.Center;
|
|
138
138
|
}
|
|
139
139
|
if (L && (we = pe.HorizontalAlignment.Left), z) {
|
|
140
140
|
const ce = q.measureText(z).width;
|
|
141
141
|
ce && (D = { ...D, width: ce });
|
|
142
142
|
}
|
|
143
|
-
if (X = { ...D, width: D.width +
|
|
144
|
-
const ce = Rt.boundsToPoints(X),
|
|
143
|
+
if (X = { ...D, width: D.width + qe + De, height: D.height }, he && !Oe) {
|
|
144
|
+
const ce = Rt.boundsToPoints(X), Re = Rt.rotatePoints(ce, he), fe = Rt.minBoundingRect(Re);
|
|
145
145
|
X.width = fe.width, X.height = fe.height;
|
|
146
146
|
}
|
|
147
|
-
we === pe.HorizontalAlignment.Center || we === pe.HorizontalAlignment.CenterContinuous ? X.x = (P - X.width) / 2 : we === pe.HorizontalAlignment.Right ? X.x = P - X.width - 0.5 : X.x = 0.5, K.getVertical() === pe.VerticalAlignment.Center ? X.y = (R - X.height) / 2 : K.getVertical() === pe.VerticalAlignment.Bottom ? X.y = R - X.height -
|
|
147
|
+
we === pe.HorizontalAlignment.Center || we === pe.HorizontalAlignment.CenterContinuous ? X.x = (P - X.width) / 2 : we === pe.HorizontalAlignment.Right ? X.x = P - X.width - 0.5 : X.x = 0.5, K.getVertical() === pe.VerticalAlignment.Center ? X.y = (R - X.height) / 2 : K.getVertical() === pe.VerticalAlignment.Bottom ? X.y = R - X.height - ae : X.y = ae;
|
|
148
148
|
const G = Ke ? { ...H } : void 0, J = { style: { left: o.left - 1, top: o.top - 1, width: o.width + 1, height: o.height + 1, transform: he ? `rotate(${he}deg)` : void 0, cursor: b ? "pointer" : void 0, pointerEvents: b ? "auto" : void 0, zIndex: Qe ? 1 : void 0, ...ue }, onMouseDown: b, onDoubleClick: b ? (ce) => {
|
|
149
149
|
ce.stopPropagation(), ce.preventDefault();
|
|
150
150
|
} : null, ...G };
|
|
151
151
|
U && (J.style.textDecorationStyle = "wavy", J.style.textDecorationColor = N ? "rgb(0, 255, 255)" : "red", J.style.textDecorationLine = "underline");
|
|
152
|
-
const ie = ye.getSize(),
|
|
152
|
+
const ie = ye.getSize(), de = (ce, Re, fe, ve, Me, We, He, tt = null) => {
|
|
153
153
|
let $e = ie * c, rt = fe, Pe = He?.runs ? He.runs : [{ type: Yt.ParseRunType.Text, text: ce, width: q.measureText(ce, $e).width }];
|
|
154
154
|
He && He?.width !== D.width && (D = { ...D, width: He?.width });
|
|
155
|
-
let dt =
|
|
155
|
+
let dt = qe;
|
|
156
156
|
if (He?.lastRepeatIndex >= 0 && M > He?.width) {
|
|
157
157
|
const it = He.runs[He.lastRepeatIndex];
|
|
158
158
|
if (it) {
|
|
@@ -167,10 +167,10 @@ const Zn = (e = 6e4) => new Date(Math.floor(Date.now() / e) * e), Qs = Object.fr
|
|
|
167
167
|
}
|
|
168
168
|
const St = (it, wt, Ft, Ht, Nt, Mt, qt, Qt, hn, Dn = null) => {
|
|
169
169
|
let on, En = rt.width;
|
|
170
|
-
|
|
170
|
+
Me === pe.HorizontalAlignment.Justify ? (En = Nt, We || (on = "justify")) : Me === pe.HorizontalAlignment.Distributed && (En = Nt, on = We || it.text.split(" ").length - 1 == 0 ? "center" : "justify");
|
|
171
171
|
const { style: Kt, className: to, ...Lt } = Dn;
|
|
172
172
|
let mn = it.text;
|
|
173
|
-
if (
|
|
173
|
+
if (Me === pe.HorizontalAlignment.Fill && x?.repeatChars.length === 0) {
|
|
174
174
|
const xt = Math.max(1, Math.floor((rt?.width ?? 0) / (qt?.width ?? 1)));
|
|
175
175
|
mn = mn.repeat(xt);
|
|
176
176
|
}
|
|
@@ -183,7 +183,7 @@ const Zn = (e = 6e4) => new Date(Math.floor(Date.now() / e) * e), Qs = Object.fr
|
|
|
183
183
|
const ht = { textAlign: on, textAlignLast: on, ...Kt, ...ye.toCSS(N, c, !0), fontSize: $e * ut.getDeviceScale() };
|
|
184
184
|
Ke || (ht.background = void 0), Z && (ht.color = Z.toCSS(N));
|
|
185
185
|
const oo = dt + wt;
|
|
186
|
-
let pn =
|
|
186
|
+
let pn = xe.top + rt.y + 0;
|
|
187
187
|
if (rn && (pn += hn - $e), Mt) {
|
|
188
188
|
const xt = (qt.x + oo) * c + 1, Et = (qt.y + pn) * c + 1;
|
|
189
189
|
Et < 0 ? ht.marginTop = Et : ht.paddingTop = Et, xt < 0 ? (ht.width = (Kt?.width ?? 0) - xt, ht.left = (Kt?.left ?? 0) + xt) : ht.paddingLeft = xt, ht.paddingRight = Math.max(0, (Kt?.width ?? 0) - En * c - xt), ht.paddingBottom = Math.max(0, (Kt?.height ?? 0) - rt.height * c - Et), ht.height = (Kt?.height ?? 0) + (Et < 0 ? -Et : 0), (Et < 0 || xt < 0) && (ht.clipPath = `inset(${Et < 0 ? -Et : 0}px 0px 0px ${xt < 0 ? 1 - xt : 0}px)`);
|
|
@@ -191,7 +191,7 @@ const Zn = (e = 6e4) => new Date(Math.floor(Date.now() / e) * e), Qs = Object.fr
|
|
|
191
191
|
ht.left = (qt.x + wt) * c + 1, ht.top = (qt.y + (rt.y + 0)) * c + 1;
|
|
192
192
|
const xt = Rt.centerPoint({ x: dt + wt, y: 0, width: it.width, height: rt.height }), Et = Rt.centerPoint({ x: dt, y: 0, width: Nt, height: rt.height }), zn = Rt.rotatePoints([xt], he, Et), Fn = { x: zn[0].x - xt.x, y: zn[0].y - xt.y };
|
|
193
193
|
ht.left = ht.left + Fn.x * c, ht.top = ht.top + Fn.y * c;
|
|
194
|
-
const fn = { ...rt, x: dt, y:
|
|
194
|
+
const fn = { ...rt, x: dt, y: xe.top, width: rt.width + (qe + De) }, Mo = Rt.boundsToPoints(fn), Do = Rt.rotatePoints(Mo, he), vn = Rt.minBoundingRect(Do);
|
|
195
195
|
fn.width = vn.width, fn.height = vn.height;
|
|
196
196
|
const ro = Rt.centerPoint(fn), wn = { x: ro.x - Et.x, y: ro.y - Et.y };
|
|
197
197
|
ht.left = ht.left + wn.x * c, ht.top = ht.top + wn.y * c;
|
|
@@ -207,46 +207,46 @@ const Zn = (e = 6e4) => new Date(Math.floor(Date.now() / e) * e), Qs = Object.fr
|
|
|
207
207
|
D = { ...D, width: it };
|
|
208
208
|
}
|
|
209
209
|
let zt = rt.x;
|
|
210
|
-
|
|
210
|
+
Me === pe.HorizontalAlignment.Right ? zt += D.width - rt.width : Me !== pe.HorizontalAlignment.Center && Me !== pe.HorizontalAlignment.CenterContinuous || (zt += (D.width - rt.width) / 2), He?.lastRepeatIndex >= 0 && (zt = rt.x);
|
|
211
211
|
const Pt = Pe.length;
|
|
212
212
|
for (let it = 0; it < Pt; it++) {
|
|
213
213
|
const wt = Pe[it];
|
|
214
|
-
(wt.type === Yt.ParseRunType.Text || wt.type === Yt.ParseRunType.Repeat) && (wt.type, Yt.ParseRunType.Repeat, St(wt, zt, it,
|
|
214
|
+
(wt.type === Yt.ParseRunType.Text || wt.type === Yt.ParseRunType.Repeat) && (wt.type, Yt.ParseRunType.Repeat, St(wt, zt, it, Re, Me === pe.HorizontalAlignment.Justify || Me === pe.HorizontalAlignment.Distributed || He?.lastRepeatIndex >= 0 ? M : rt.width, Ke, { x: X.x + ee, y: X.y, width: wt.width, height: D.height }, 0, ve, tt)), zt += wt.width;
|
|
215
215
|
}
|
|
216
216
|
};
|
|
217
|
-
z ?
|
|
218
|
-
const ve = ce.runs[0].text.replace(/\s+$/, ""),
|
|
219
|
-
let We = we === pe.HorizontalAlignment.Justify && (
|
|
217
|
+
z ? de(z, 0, { x: 0, y: 0, ...D }, B.lines[0].baseline, we, !0, null, J) : B.visitLines({ visitTextLine: (ce, Re, fe) => {
|
|
218
|
+
const ve = ce.runs[0].text.replace(/\s+$/, ""), Me = Re === fe - 1;
|
|
219
|
+
let We = we === pe.HorizontalAlignment.Justify && (Me || ce.runs[0].text.endsWith(`
|
|
220
220
|
`)) ? pe.HorizontalAlignment.Left : we, He = 0;
|
|
221
|
-
|
|
222
|
-
let tt =
|
|
221
|
+
Re > 0 && (K.getVertical() === pe.VerticalAlignment.Distributed || K.getVertical() === pe.VerticalAlignment.Justify) && (He = Math.max(0, (R - (ae + 3) - ce.bounds.height * fe) / (fe - 1) * Re)), K.getVertical() === pe.VerticalAlignment.Distributed && he && he % 90 == 0 && he % 180 != 0 && (We = pe.HorizontalAlignment.Distributed), We !== pe.HorizontalAlignment.Justify && We !== pe.HorizontalAlignment.Distributed && We !== pe.HorizontalAlignment.Fill || (D = { ...D, width: M });
|
|
222
|
+
let tt = oe || x && (x.repeatChars.length > 0 || x.spacingChars.length > 0) ? D.width : ce.bounds.width;
|
|
223
223
|
const $e = { ...ce.bounds, y: ce.bounds.y + He + 0, width: tt };
|
|
224
|
-
|
|
224
|
+
de(ve, Re, $e, y.lines[0].baseline, We, Me, fe === 1 ? se : null, Ke && Re > 0 ? { ...J, style: { ...J.style, background: void 0 } } : J);
|
|
225
225
|
} });
|
|
226
226
|
}
|
|
227
|
-
_.length > 0 && (
|
|
227
|
+
_.length > 0 && (Ae = _);
|
|
228
228
|
}
|
|
229
|
-
if (Ke) return
|
|
230
|
-
let
|
|
229
|
+
if (Ke) return Ae && Ae.length > 0 ? Ae : f("div", { style: ne, ...H });
|
|
230
|
+
let Ee = b ? "auto" : Ne.pointerEvents, Ve = null;
|
|
231
231
|
if (Be) {
|
|
232
232
|
const Oe = { x: A * c - 1, y: -1, width: I * c + 1, height: R * c + 1 };
|
|
233
|
-
|
|
233
|
+
Ee = "auto", Ve = j({ renderBounds: Oe, darkMode: N, className: "filter-button", disabled: !v.isEditAllowed(), zoom: c, filter: v.getColumnFilter(), onFilterButtonMouseDown: T, ...E }), Ve && (Ve = f("div", { style: { ...Oe, position: "absolute", zIndex: 2, display: "flex", alignItems: "end" }, onDoubleClick: (D) => {
|
|
234
234
|
D.stopPropagation(), D.preventDefault();
|
|
235
235
|
}, children: Ve }, "filterButton"));
|
|
236
236
|
}
|
|
237
|
-
Ge && !
|
|
238
|
-
const
|
|
239
|
-
return f("div", { style: { ...ue, ...Ne, pointerEvents:
|
|
237
|
+
Ge && !Ae && (Ae = f("div", { style: { position: "absolute", left: 0, right: 0, top: 0, bottom: 0, display: "flex", alignItems: "center", justifyContent: "center", pointerEvents: "none" }, children: "..." }, "pending-ellipsis"));
|
|
238
|
+
const ke = [Ye, Ae, i, Fe, st, Ve];
|
|
239
|
+
return f("div", { style: { ...ue, ...Ne, pointerEvents: Ee }, ...H, children: ke });
|
|
240
240
|
}, pr = { text: "", placeholder: "" }, fr = (e, t) => {
|
|
241
241
|
if (e.clean().getStyle().getNumberFormat().indexOf("%") === -1) return !1;
|
|
242
242
|
const n = t ?? e.dirty ?? "";
|
|
243
243
|
return n.length === 0 || n.endsWith("%") && !isNaN(parseFloat(n.substring(0, n.length - 1)));
|
|
244
244
|
}, Ml = Object.freeze([At.Delete, At.Home, At.End]), Dl = ft(yt((e, t) => {
|
|
245
|
-
const { editState: n, onStartEdit: r, onChangeEdit: i, onSubmitEdit: o, onCancelEdit: l, onDoneEdit: c, defaultTextStyle: p, useRichStyling: a = !0, bodyStyle: C, activeCoords: d, sheet: m, commands: S, containerBounds: b, setNaturalDimensions: T, onFocus: E, disabled: j, style: H, zoom: R = 1, linesVisible: O, autoFocus: v = !1, ...w } = e, { height: q = 0, width: N = 0 } = b ?? {}, x = C?.darkMode ?? !1, k =
|
|
245
|
+
const { editState: n, onStartEdit: r, onChangeEdit: i, onSubmitEdit: o, onCancelEdit: l, onDoneEdit: c, defaultTextStyle: p, useRichStyling: a = !0, bodyStyle: C, activeCoords: d, sheet: m, commands: S, containerBounds: b, setNaturalDimensions: T, onFocus: E, disabled: j, style: H, zoom: R = 1, linesVisible: O, autoFocus: v = !1, ...w } = e, { height: q = 0, width: N = 0 } = b ?? {}, x = C?.darkMode ?? !1, k = Te(null), [W, U] = me(!1), [V, L] = me(null), [P, ee] = me(() => n);
|
|
246
246
|
be(() => {
|
|
247
|
-
Je.current = !1,
|
|
247
|
+
Je.current = !1, ee(n);
|
|
248
248
|
}, [n]);
|
|
249
|
-
const I =
|
|
249
|
+
const I = Se(() => {
|
|
250
250
|
const D = P.clean();
|
|
251
251
|
let X = D.getStyle();
|
|
252
252
|
a || (X = X.createTemporaryStyle({ font: { size: p?.fontSize } }));
|
|
@@ -256,13 +256,13 @@ const Zn = (e = 6e4) => new Date(Math.floor(Date.now() / e) * e), Qs = Object.fr
|
|
|
256
256
|
if (!G) return pr;
|
|
257
257
|
let J = G.getStyle()?.getQuotePrefix();
|
|
258
258
|
if (B.dirty === void 0 || B.dirty === null) {
|
|
259
|
-
let ie = "",
|
|
260
|
-
|
|
259
|
+
let ie = "", de = G.getFormulaText();
|
|
260
|
+
de && (ie = de, J = !1), ie || (ie = G.toTextUnformatted(!0) ?? "");
|
|
261
261
|
let ce = "";
|
|
262
262
|
if (!B.editMode && G.isSpillOverflow()) {
|
|
263
|
-
const
|
|
264
|
-
if (
|
|
265
|
-
const fe =
|
|
263
|
+
const Re = G.getSpill();
|
|
264
|
+
if (Re) {
|
|
265
|
+
const fe = Re.getCell(), ve = fe.getFormulaText();
|
|
266
266
|
fe.isEqual(G) || (ce = ve);
|
|
267
267
|
}
|
|
268
268
|
}
|
|
@@ -271,10 +271,10 @@ const Zn = (e = 6e4) => new Date(Math.floor(Date.now() / e) * e), Qs = Object.fr
|
|
|
271
271
|
return { text: B.dirty ?? "", placeholder: "" };
|
|
272
272
|
})(P), z = g.text, h = pe.toCSSHorizontalTextAlign(a && !F ? P.clean()?.getRenderHorizontalAlignment() : pe.HorizontalAlignment.Left);
|
|
273
273
|
return { style: X, isWrapped: M, textValue: z, formula: F, frameVertAlign: y, placeholder: g.placeholder, insets: a ? D.getInsets() : _n.EmptyRect, textAlign: h };
|
|
274
|
-
}, [P, p, x, R, a]), A =
|
|
274
|
+
}, [P, p, x, R, a]), A = Te(null), se = Zt(t, () => ({ startEdit: (D) => {
|
|
275
275
|
k.current = D?.initialSelection;
|
|
276
276
|
const X = { ...n, editMode: D?.editMode ?? !1 };
|
|
277
|
-
D?.text !== void 0 && (X.dirty = D.text), X.editMode === n.editMode && X.dirty === n.dirty || (
|
|
277
|
+
D?.text !== void 0 && (X.dirty = D.text), X.editMode === n.editMode && X.dirty === n.dirty || (ee(X), Ae?.(X));
|
|
278
278
|
}, submitEdit: () => Ye(), cancelEdit() {
|
|
279
279
|
Fe();
|
|
280
280
|
}, autoFocus() {
|
|
@@ -287,7 +287,7 @@ const Zn = (e = 6e4) => new Date(Math.floor(Date.now() / e) * e), Qs = Object.fr
|
|
|
287
287
|
const D = A.current;
|
|
288
288
|
I.textValue, D && D.setSelectionRange(V.start, V.end, V.direction);
|
|
289
289
|
}, [A.current, V, I.textValue]);
|
|
290
|
-
const we =
|
|
290
|
+
const we = Se(() => {
|
|
291
291
|
const D = P?.clean(), X = I.style.createTemporaryTextFrame(I.textValue, D?.getType() === Gn.String), F = a ? D.getInsets().right + D.getInsets().left : 0;
|
|
292
292
|
let _ = null;
|
|
293
293
|
return I.isWrapped && (_ = { width: N - F }), X.layout(_);
|
|
@@ -297,15 +297,15 @@ const Zn = (e = 6e4) => new Date(Math.floor(Date.now() / e) * e), Qs = Object.fr
|
|
|
297
297
|
const D = I.style, X = D.getInsets() ?? _n.EmptyRect, F = a ? X.left + X.right : 0, _ = a ? 0.04 * D.getFont().getSize() : 1, s = Math.round(I.isWrapped ? void 0 : we.bounds.width + F + _), y = Math.round(we.bounds.height);
|
|
298
298
|
T?.({ width: s, height: y });
|
|
299
299
|
}, [we, T, I, a, P]);
|
|
300
|
-
const
|
|
300
|
+
const Ae = le(i, [i]), ue = le((D) => {
|
|
301
301
|
if (P.dirty === D) return;
|
|
302
302
|
const X = { ...P };
|
|
303
|
-
X.dirty = D, A.current,
|
|
304
|
-
}, [P]),
|
|
303
|
+
X.dirty = D, A.current, ee(X), Ae?.(X);
|
|
304
|
+
}, [P]), Ie = le((D) => {
|
|
305
305
|
if (P.editMode === D) return;
|
|
306
306
|
const X = { ...P };
|
|
307
|
-
X.editMode = D,
|
|
308
|
-
}, [P]), Je =
|
|
307
|
+
X.editMode = D, ee(X), Ae?.(X);
|
|
308
|
+
}, [P]), Je = Te(!1), Ye = le(() => {
|
|
309
309
|
if (Je.current) return !1;
|
|
310
310
|
try {
|
|
311
311
|
o?.(P), c?.(), Je.current = !0;
|
|
@@ -314,17 +314,17 @@ const Zn = (e = 6e4) => new Date(Math.floor(Date.now() / e) * e), Qs = Object.fr
|
|
|
314
314
|
}
|
|
315
315
|
return !0;
|
|
316
316
|
}, [o, P]), Fe = le(() => {
|
|
317
|
-
Je.current = !0,
|
|
317
|
+
Je.current = !0, ee(n), l?.(), c?.();
|
|
318
318
|
}, [l, n]), ge = le((D) => {
|
|
319
319
|
if (!A.current) return;
|
|
320
320
|
if (D.key, D.isDefaultPrevented(), !(D.isTrusted || D.nativeEvent.ctrlKey || D.nativeEvent.metaKey || D.nativeEvent.altKey || D.nativeEvent.isComposing || bl.indexOf(D.nativeEvent.key) === -1 && D.nativeEvent.key !== "Backspace")) {
|
|
321
321
|
const g = { ...P };
|
|
322
322
|
let z = 0;
|
|
323
|
-
return fr(g, g.dirty) && !isNaN(parseFloat(D.key)) ? (g.dirty?.endsWith("%") ? g.dirty = (g.dirty.substring(0, g.dirty.length - 1) ?? "") + D.key + "%" : g.dirty = (g.dirty ?? "") + D.key + "%", z = g.dirty.length - 1) : D.nativeEvent.key === "Backspace" ? (g.dirty = "", z = g.dirty.length) : (g.dirty = (g.dirty ?? "") + D.key, z = g.dirty.length), A.current.value = g?.dirty, k.current = { start: z, end: z, direction: "forward" }, A.current?.setSelectionRange(z, z, "forward"),
|
|
323
|
+
return fr(g, g.dirty) && !isNaN(parseFloat(D.key)) ? (g.dirty?.endsWith("%") ? g.dirty = (g.dirty.substring(0, g.dirty.length - 1) ?? "") + D.key + "%" : g.dirty = (g.dirty ?? "") + D.key + "%", z = g.dirty.length - 1) : D.nativeEvent.key === "Backspace" ? (g.dirty = "", z = g.dirty.length) : (g.dirty = (g.dirty ?? "") + D.key, z = g.dirty.length), A.current.value = g?.dirty, k.current = { start: z, end: z, direction: "forward" }, A.current?.setSelectionRange(z, z, "forward"), ee(g), Ae?.(g), void D.preventDefault();
|
|
324
324
|
}
|
|
325
325
|
const X = D.nativeEvent.ctrlKey, F = D.nativeEvent.shiftKey, _ = D.nativeEvent.altKey, s = D.nativeEvent.metaKey;
|
|
326
326
|
if (X && D.key === "z" && D.stopPropagation(), D.which === At.Escape) return D.preventDefault(), void Fe();
|
|
327
|
-
if (D.which === At.F2) return
|
|
327
|
+
if (D.which === At.F2) return Ie(!0), void D.preventDefault();
|
|
328
328
|
const y = D.target;
|
|
329
329
|
if (D.key === "%" && y.selectionStart === y.selectionEnd && y.value[y.selectionStart] === "%" && P?.clean().getStyle().numberFormat.includes("%")) return L({ start: y.selectionStart + 1, end: y.selectionEnd + 1, direction: y.selectionDirection }), void D.preventDefault();
|
|
330
330
|
if (D.which === At.Enter) {
|
|
@@ -333,22 +333,22 @@ const Zn = (e = 6e4) => new Date(Math.floor(Date.now() / e) * e), Qs = Object.fr
|
|
|
333
333
|
` + I.textValue.substring(y.selectionEnd);
|
|
334
334
|
return ue(g), void L({ start: y.selectionStart + 1, end: y.selectionStart + 1, direction: y.selectionDirection });
|
|
335
335
|
}
|
|
336
|
-
return void (Ye() && m.getSelection().traverse(
|
|
336
|
+
return void (Ye() && m.getSelection().traverse(Ce.Orientation.Column, F));
|
|
337
337
|
}
|
|
338
|
-
if (D.which === At.Tab) return D.preventDefault(), void (Ye() && m.getSelection().traverse(
|
|
338
|
+
if (D.which === At.Tab) return D.preventDefault(), void (Ye() && m.getSelection().traverse(Ce.Orientation.Row, F));
|
|
339
339
|
let M = null;
|
|
340
340
|
switch (D.which) {
|
|
341
341
|
case At.Left:
|
|
342
|
-
M =
|
|
342
|
+
M = Ce.Direction.Left;
|
|
343
343
|
break;
|
|
344
344
|
case At.Right:
|
|
345
|
-
M =
|
|
345
|
+
M = Ce.Direction.Right;
|
|
346
346
|
break;
|
|
347
347
|
case At.Up:
|
|
348
|
-
M =
|
|
348
|
+
M = Ce.Direction.Up;
|
|
349
349
|
break;
|
|
350
350
|
case At.Down:
|
|
351
|
-
M =
|
|
351
|
+
M = Ce.Direction.Down;
|
|
352
352
|
}
|
|
353
353
|
if (M && !(X || F || _ || s) && !P.editMode)
|
|
354
354
|
return void Ye();
|
|
@@ -370,7 +370,7 @@ const Zn = (e = 6e4) => new Date(Math.floor(Date.now() / e) * e), Qs = Object.fr
|
|
|
370
370
|
}, [d, m]);
|
|
371
371
|
be(() => m.getRange(d).addListener(() => {
|
|
372
372
|
const D = { ...P, clean: () => m.getRange(d).getCell() };
|
|
373
|
-
|
|
373
|
+
ee(D), Ae?.(D);
|
|
374
374
|
}), [d, m, P]);
|
|
375
375
|
const Z = Ze(() => {
|
|
376
376
|
const D = P.clean().createTemporaryCell({ value: Zn(), style: { numberFormat: "Medium Time" } }).toText();
|
|
@@ -378,34 +378,34 @@ const Zn = (e = 6e4) => new Date(Math.floor(Date.now() / e) * e), Qs = Object.fr
|
|
|
378
378
|
}, [m]), K = Ze(() => {
|
|
379
379
|
const D = P.clean().createTemporaryCell({ value: Zn(), style: { numberFormat: "Short Date" } }).toText();
|
|
380
380
|
ue((A.current?.value ?? "") + D);
|
|
381
|
-
}, [m]),
|
|
381
|
+
}, [m]), oe = Se(() => ({ element: () => A.current, doCopy: (D) => {
|
|
382
382
|
const X = A.current.value.substring(A.current.selectionStart, A.current.selectionEnd);
|
|
383
383
|
if (D?.isCut) {
|
|
384
384
|
const F = A.current.value.substring(0, A.current.selectionStart) + A.current.value.substring(A.current.selectionEnd, A.current.value.length);
|
|
385
385
|
ue(F);
|
|
386
386
|
}
|
|
387
387
|
return X;
|
|
388
|
-
} }), [A.current]), re =
|
|
388
|
+
} }), [A.current]), re = Se(() => ({ element: () => A.current, doPaste: async (D, X) => {
|
|
389
389
|
const F = await D.toText?.();
|
|
390
390
|
if (!F) return !0;
|
|
391
391
|
const _ = A.current.value.substring(0, A.current.selectionStart) + F + A.current.value.substring(A.current.selectionEnd, A.current.value.length);
|
|
392
392
|
return ue(_), L({ start: A.current.selectionStart + F.length, end: A.current.selectionStart + F.length, direction: "forward" }), !0;
|
|
393
|
-
} }), [A.current]), he =
|
|
393
|
+
} }), [A.current]), he = Se(() => ({ contains: (D) => A.current?.contains(D) || !1, focus() {
|
|
394
394
|
A.current.focus();
|
|
395
|
-
} }), []),
|
|
395
|
+
} }), []), xe = Se(() => [new je("selectAll", he, { label: "Select All", description: "Select all of the text in cell.", shortcut: { key: "a", modifiers: [te.Ctrl] } }, $), new je("startEditValueAbove", he, { label: "Copy From Above", description: "Copy the value from the cell above the active cell into the cell or the formula bar.", shortcut: [{ key: '"', modifiers: [te.Ctrl] }, { key: '"', modifiers: [te.Ctrl, te.Shift] }] }, ye), new je("startEditCurrentTime", he, { label: "Current Time", description: "Insert the current time.", shortcut: { key: "Semicolon", modifiers: [te.Ctrl, te.Shift] } }, Z), new je("startEditCurrentDate", he, { label: "Current Date", description: "Insert the current date.", shortcut: { key: "Semicolon", modifiers: [te.Ctrl] } }, K), new Y("relativeReferencesToggle", he, { label: "Toggle References", description: "Toggles cell references from relative to absolute, to partially absolute, back to relative again.", shortcut: { key: "F4" } }, Le), new Y("toggleEditorFocus", he, { label: "Toggle Editor Focus", description: "Moves focus between editors such as formula editor and inline editor.", shortcut: { key: "F2", modifiers: [te.Ctrl] } })], []), ae = Se(() => {
|
|
396
396
|
let D = null;
|
|
397
397
|
const X = () => ({ contains: (F) => A.current?.contains(F) || !1, focus() {
|
|
398
398
|
A.current.focus();
|
|
399
399
|
} });
|
|
400
|
-
return D = S ? S.createChildGroup(X, "editor", !1) : new Co(X, "editor"), D.addCommands(
|
|
401
|
-
}, [S,
|
|
402
|
-
ri(
|
|
403
|
-
const [
|
|
400
|
+
return D = S ? S.createChildGroup(X, "editor", !1) : new Co(X, "editor"), D.addCommands(xe, !0), D;
|
|
401
|
+
}, [S, xe]), qe = Se(() => ({ notifier: null, source: oe, target: re, commands: ae }), [oe, re, ae]);
|
|
402
|
+
ri(qe);
|
|
403
|
+
const [De, Ne] = me(!v);
|
|
404
404
|
be(() => {
|
|
405
405
|
Ne(!1);
|
|
406
406
|
}, []);
|
|
407
407
|
const u = le((D) => {
|
|
408
|
-
U(!0),
|
|
408
|
+
U(!0), ae?.activate();
|
|
409
409
|
const X = k.current;
|
|
410
410
|
if (X !== !1) {
|
|
411
411
|
let F, _;
|
|
@@ -416,23 +416,23 @@ const Zn = (e = 6e4) => new Date(Math.floor(Date.now() / e) * e), Qs = Object.fr
|
|
|
416
416
|
}, [E, P]), Be = I.insets;
|
|
417
417
|
let st = Be.left + 1;
|
|
418
418
|
const Ke = Be.left + Be.right + 2 - 1, Qe = we?.bounds.height ?? 0;
|
|
419
|
-
let
|
|
420
|
-
I.frameVertAlign === pe.VerticalAlignment.Center ?
|
|
419
|
+
let ne, Ee = Be.top;
|
|
420
|
+
I.frameVertAlign === pe.VerticalAlignment.Center ? Ee = Math.max(0, (q - (Be.top + Be.bottom) - Qe) / 2) : I.frameVertAlign === pe.VerticalAlignment.Bottom && (Ee = Math.max(0, q - (Be.top + Be.bottom) - Qe)), O !== void 0 && we?.lines[0]?.bounds && (ne = we?.lines[0]?.bounds.height * O);
|
|
421
421
|
const Ve = I.style.getFont();
|
|
422
|
-
let
|
|
423
|
-
Ve.isSuperSub() && (
|
|
422
|
+
let ke = Ve.getSize();
|
|
423
|
+
Ve.isSuperSub() && (ke *= Ve.getSuperSubScale()), ke *= ut.getDeviceScale() * R;
|
|
424
424
|
const Oe = a ? Ve.toCSS(x, R) : null;
|
|
425
425
|
return f("div", { className: "sheet-cell-editor", onMouseDown: (D) => {
|
|
426
426
|
A.current && document.activeElement !== A.current && requestAnimationFrame(() => {
|
|
427
427
|
A.current.focus();
|
|
428
428
|
});
|
|
429
|
-
}, ref:
|
|
429
|
+
}, ref: se, ...w, style: { display: "flex", flexGrow: 1, alignSelf: "stretch", height: "100%", width: "100%", maxWidth: "100%", maxHeight: "100%", cursor: "initial", ...H }, children: f("div", { className: "editor-placement", style: { display: "flex", flexGrow: 1, position: "relative", top: Ee * R + 1, left: st * R, width: `calc(100% - ${Ke * R}px)`, maxWidth: `calc(100% - ${Ke * R}px)`, height: (ne ?? Qe) * R, maxHeight: (ne ?? Qe) * R }, children: f("textarea", { spellCheck: "false", placeholder: I.placeholder, ref: A, value: I.textValue, disabled: De, readOnly: j || m.getProtection().isReadOnly(), name: "sheet-cell-editor", autoComplete: "off", autoCapitalize: "off", style: { flex: "1 1 100%", font: "inherit", ...Oe, fontSize: ke ? `${ke}px` : "inherit", textAlign: I.textAlign, lineHeight: (we?.lines[0]?.bounds.height ?? 0) * R + "px", height: (we?.bounds.height ?? 0) * R, boxSizing: "border-box", padding: "0px", margin: "0px", borderWidth: 0, outline: "none", resize: "none", overflow: "hidden", background: "transparent", maxHeight: "100%", maxWidth: "100%", width: "100%", userSelect: "text", position: "absolute", whiteSpace: I.isWrapped ? "normal" : "pre", wordWrap: "break-word" }, onFocus: u, onBlur: () => {
|
|
430
430
|
U(!1);
|
|
431
431
|
}, onSelect: (D) => {
|
|
432
432
|
}, onChange: (D) => {
|
|
433
433
|
A.current && !Je.current && (k.current = !1, ue(D.target.value), I.textValue, D.target.value, D.target.selectionStart, D.target.selectionEnd, D.target.selectionDirection, L({ start: D.target.selectionStart, end: D.target.selectionEnd, direction: D.target.selectionDirection }));
|
|
434
434
|
}, onMouseDown: (D) => {
|
|
435
|
-
W &&
|
|
435
|
+
W && Ie(!0);
|
|
436
436
|
}, onKeyDown: ge }) }) });
|
|
437
437
|
})), El = (e, t) => ({ clean: e, dirty: t, editMode: !1 }), Al = (e) => {
|
|
438
438
|
const { length: t = 0, width: n = 1, dashArray: r = null, dashArrayAdditional: i = null, isDouble: o = !1, isAngled: l = !1, offsetX: c = 0, offsetY: p = 0, isVertical: a = !1, ...C } = e, d = (H) => {
|
|
@@ -483,7 +483,7 @@ var Rn = parseInt(fl.split(".")[0], 10) >= 19 ? function(e) {
|
|
|
483
483
|
}, Il = function() {
|
|
484
484
|
}, hi = typeof window < "u", Pn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, zl = hi ? Bt : be, vr = { x: 0, y: 0, width: 0, height: 0, top: 0, left: 0, bottom: 0, right: 0 };
|
|
485
485
|
const cn = hi && window.ResizeObserver !== void 0 ? function() {
|
|
486
|
-
var e = me(null), t = e[0], n = e[1], r = me(vr), i = r[0], o = r[1], l =
|
|
486
|
+
var e = me(null), t = e[0], n = e[1], r = me(vr), i = r[0], o = r[1], l = Se(function() {
|
|
487
487
|
return new window.ResizeObserver(function(c) {
|
|
488
488
|
if (c[0]) {
|
|
489
489
|
var p = c[0].contentRect, a = p.x, C = p.y, d = p.width, m = p.height, S = p.top, b = p.left, T = p.bottom, E = p.right;
|
|
@@ -517,13 +517,13 @@ const cn = hi && window.ResizeObserver !== void 0 ? function() {
|
|
|
517
517
|
E = Math.floor(E + (L.width === 2 ? 0 : L.width / 2));
|
|
518
518
|
}
|
|
519
519
|
if (R) {
|
|
520
|
-
const L = p ? "colStart" : "rowStart", P = p ? "colEnd" : "rowEnd",
|
|
520
|
+
const L = p ? "colStart" : "rowStart", P = p ? "colEnd" : "rowEnd", ee = p ? C?.getRowOffset : C?.getColOffset;
|
|
521
521
|
let I = 0, A = 0;
|
|
522
522
|
O = [], v = [];
|
|
523
|
-
for (let
|
|
524
|
-
const we = a[
|
|
525
|
-
if (we.stroke.getStyle() === Dt.StrokeStyle.Double &&
|
|
526
|
-
const Ge =
|
|
523
|
+
for (let se = 0; se < a.length; se++) {
|
|
524
|
+
const we = a[se];
|
|
525
|
+
if (we.stroke.getStyle() === Dt.StrokeStyle.Double && ee) {
|
|
526
|
+
const Ge = ee(we.range[w]) - (N - j);
|
|
527
527
|
we.range[L] < r[L] && (O.push(Ge - I), I = Ge, O.push(1), I++), we.range[P] > r[P] && (v.push(Ge - A), A = Ge, v.push(1), A++);
|
|
528
528
|
}
|
|
529
529
|
}
|
|
@@ -535,7 +535,7 @@ const cn = hi && window.ResizeObserver !== void 0 ? function() {
|
|
|
535
535
|
return f(Al, { offsetX: m + x + W, offsetY: S + k + W, length: E + j, isVertical: p, stroke: H, width: d.width, dashArray: O ?? d.pattern, dashArrayAdditional: v, isDouble: R, isAngled: d.description.toLowerCase().includes("slant") }, t);
|
|
536
536
|
}, mi = ({ getBorderAt: e, borderRenderer: t = Ll, getVisibleCells: n, darkMode: r, forceThinBorder: i = !1, defaultColor: o = "black", shiftIfWide: l = !1 }) => {
|
|
537
537
|
const c = le(n, [n]);
|
|
538
|
-
return { overlay:
|
|
538
|
+
return { overlay: Se(() => (a) => {
|
|
539
539
|
const C = a.toClipBounds(a.getRangeCoordsBounds(), -3);
|
|
540
540
|
if (!C) return;
|
|
541
541
|
const d = c(a);
|
|
@@ -543,15 +543,15 @@ const cn = hi && window.ResizeObserver !== void 0 ? function() {
|
|
|
543
543
|
const m = a.getVisibleColumnOffsets(), S = a.getVisibleRowOffsets();
|
|
544
544
|
let b = [], T = [];
|
|
545
545
|
const E = a.getVisibleColumns(), j = a.getVisibleRows(), H = [], R = [], O = [], v = (x, k, W, U, V, L, P) => {
|
|
546
|
-
const
|
|
547
|
-
x[k] || (x[k] = []), x[k].length > 0 && x[k][x[k].length - 1]?.index === U ? x[k][x[k].length - 1] =
|
|
546
|
+
const ee = { index: U, stroke: V, visibleIndex: W, edge: L, length: P };
|
|
547
|
+
x[k] || (x[k] = []), x[k].length > 0 && x[k][x[k].length - 1]?.index === U ? x[k][x[k].length - 1] = ee : x[k].push(ee);
|
|
548
548
|
};
|
|
549
549
|
for (let x = 0; x < d.length; x++) {
|
|
550
550
|
const k = d[x], W = k.coords;
|
|
551
551
|
if (!W) continue;
|
|
552
552
|
const U = k?.range ?? { rowStart: W.rowIndex, colStart: W.colIndex, rowEnd: W.rowIndex, colEnd: W.colIndex }, V = a.getVisibleRangeCoords();
|
|
553
553
|
if (!Ct.isRangesIntersect(U, V) && !Ct.isRangeWithinRange(U, V)) continue;
|
|
554
|
-
const L = W.colIndex, P = W.rowIndex,
|
|
554
|
+
const L = W.colIndex, P = W.rowIndex, ee = m[L], I = S[P];
|
|
555
555
|
if (U.rowEnd !== U.rowStart) {
|
|
556
556
|
const ge = S[U.rowStart]?.spanIndex ?? -1, $ = S[U.rowEnd]?.spanIndex ?? S[j[j.length - 1]].spanIndex + 1;
|
|
557
557
|
b.push({ ...U, rowStart: ge, rowEnd: $ });
|
|
@@ -560,33 +560,33 @@ const cn = hi && window.ResizeObserver !== void 0 ? function() {
|
|
|
560
560
|
const ge = m[U.colStart]?.spanIndex ?? -1, $ = m[U.colEnd]?.spanIndex ?? m[E[E.length - 1]].spanIndex + 1;
|
|
561
561
|
T.push({ ...U, colStart: ge, colEnd: $ });
|
|
562
562
|
}
|
|
563
|
-
const A = k.value,
|
|
564
|
-
if (!
|
|
565
|
-
const we =
|
|
566
|
-
let
|
|
567
|
-
if (!
|
|
568
|
-
const Ye =
|
|
569
|
-
we.isNone() || v(H, Ye, Fe, P, we, Dt.Edge.Left,
|
|
563
|
+
const A = k.value, se = e(A, x);
|
|
564
|
+
if (!se || se.isEmpty()) continue;
|
|
565
|
+
const we = se.getLeft(), Ge = se.getTop(), Ae = se.getRight(), ue = se.getBottom();
|
|
566
|
+
let Ie = 1, Je = 1;
|
|
567
|
+
if (!ee || !I) continue;
|
|
568
|
+
const Ye = ee.spanIndex, Fe = I.spanIndex;
|
|
569
|
+
we.isNone() || v(H, Ye, Fe, P, we, Dt.Edge.Left, Ie), Ge.isNone() || v(R, Fe, Ye, L, Ge, Dt.Edge.Top, Je), Ae.isNone() || v(H, Ye + Je, Fe, P, Ae, Dt.Edge.Right, Ie), ue.isNone() || v(R, Fe + Ie, Ye, L, ue, Dt.Edge.Bottom, Je);
|
|
570
570
|
}
|
|
571
571
|
const w = (x, k, W) => {
|
|
572
572
|
const U = [];
|
|
573
573
|
return x.forEach((V, L) => {
|
|
574
574
|
let P = null;
|
|
575
|
-
V.sort((
|
|
576
|
-
for (let
|
|
577
|
-
const I = V[
|
|
575
|
+
V.sort((ee, I) => ee.visibleIndex - I.visibleIndex);
|
|
576
|
+
for (let ee = 0; ee < V.length; ee++) {
|
|
577
|
+
const I = V[ee];
|
|
578
578
|
if (!I?.stroke || k[L] === void 0 && k[L - 1] === void 0) continue;
|
|
579
579
|
let A = !1;
|
|
580
|
-
if (W) for (let
|
|
581
|
-
let ue = b[
|
|
580
|
+
if (W) for (let Ae = 0; !A && Ae < b.length; Ae++) {
|
|
581
|
+
let ue = b[Ae];
|
|
582
582
|
ue.colStart <= I.index && ue.colEnd >= I.index && ue.rowStart < L && ue.rowEnd >= L && (A = !0);
|
|
583
583
|
}
|
|
584
|
-
else for (let
|
|
585
|
-
let ue = T[
|
|
584
|
+
else for (let Ae = 0; !A && Ae < T.length; Ae++) {
|
|
585
|
+
let ue = T[Ae];
|
|
586
586
|
ue.rowStart <= I.index && ue.rowEnd >= I.index && ue.colStart < L && ue.colEnd >= L && (A = !0);
|
|
587
587
|
}
|
|
588
588
|
if (A) continue;
|
|
589
|
-
const
|
|
589
|
+
const se = I.stroke?.getColor(), we = se ? se.toRGBA().toString() : o, Ge = I.stroke.getStyle() + ":" + we;
|
|
590
590
|
(Ge !== P?.key || P && P.visibleIndex + 1 < I.visibleIndex) && (P && U.push(P), P = { key: Ge, index: k[L] ?? k[L - 1] + 1, visibleIndex: I.visibleIndex, edge: I.edge, stroke: I.stroke, from: I.index, to: I.index + I.length - 1, intersections: [], length: 1 }), P.to = I.index + I.length - 1, P.visibleIndex = I.visibleIndex;
|
|
591
591
|
}
|
|
592
592
|
P && U.push(P);
|
|
@@ -606,13 +606,13 @@ const cn = hi && window.ResizeObserver !== void 0 ? function() {
|
|
|
606
606
|
for (let x = 0; x < N.length; x++) {
|
|
607
607
|
const k = N[x];
|
|
608
608
|
let W = k.stroke;
|
|
609
|
-
const U = `rBorder:${k.index}:${k.from}:${k.to}:${k.edge}`, V = { rowStart: k.index, rowEnd: k.index, colStart: k.from, colEnd: k.to + 1 }, L = a.getLayout(), P = !1,
|
|
609
|
+
const U = `rBorder:${k.index}:${k.from}:${k.to}:${k.edge}`, V = { rowStart: k.index, rowEnd: k.index, colStart: k.from, colEnd: k.to + 1 }, L = a.getLayout(), P = !1, ee = L.getColOffset(V.colStart), I = L.getRowOffset(V.rowStart), A = [ee, I, L.getColOffset(V.colEnd), I];
|
|
610
610
|
O.push(t({ key: U, points: A, stroke: W, darkMode: r, forceThinBorder: i, shiftIfWide: l, range: V, intersections: k.intersections, layout: L, isVertical: P }));
|
|
611
611
|
}
|
|
612
612
|
for (let x = 0; x < q.length; x++) {
|
|
613
613
|
const k = q[x];
|
|
614
614
|
let W = k.stroke;
|
|
615
|
-
const U = `cBorder:${k.index}:${k.from}:${k.to}:${k.edge}`, V = { rowStart: k.from, rowEnd: k.to + 1, colStart: k.index, colEnd: k.index }, L = a.getLayout(), P = !0,
|
|
615
|
+
const U = `cBorder:${k.index}:${k.from}:${k.to}:${k.edge}`, V = { rowStart: k.from, rowEnd: k.to + 1, colStart: k.index, colEnd: k.index }, L = a.getLayout(), P = !0, ee = L.getColOffset(V.colStart), I = [ee, L.getRowOffset(V.rowStart), ee, L.getRowOffset(V.rowEnd)];
|
|
616
616
|
O.push(t({ key: U, stroke: W, points: I, darkMode: r, forceThinBorder: i, shiftIfWide: l, range: V, intersections: k.intersections, layout: L, isVertical: P }));
|
|
617
617
|
}
|
|
618
618
|
return f("svg", { width: `${C.width}`, height: `${C.height}`, viewBox: `0 0 ${C.width} ${C.height}`, preserveAspectRatio: "none", shapeRendering: "crispEdges", style: { position: "absolute", left: "0px", top: "0px", width: `${C.width}px`, height: `${C.height}px`, pointerEvents: "none", transitionTimingFunction: "linear", transitionDelay: "0", transitionProperty: "left, top, width, height", willChange: "left, top, width, height, stroke-dashoffset", overflow: "visible" }, children: O }, "borders");
|
|
@@ -620,32 +620,32 @@ const cn = hi && window.ResizeObserver !== void 0 ? function() {
|
|
|
620
620
|
}, wr = bt.Center, Ol = Object.freeze({ horizontal: !1, vertical: !1 }), yr = _n.EmptyTopLeft, Bl = (e, t) => Ct.EmptyCell, Vl = (e, t) => new Promise((n, r) => {
|
|
621
621
|
r("StaticBorderRenderer does not support scrolling");
|
|
622
622
|
}), td = ft((e) => {
|
|
623
|
-
const { getBorderAt: t, width: n, height: r, style: i, rowCount: o = 2, columnCount: l = 2, darkMode: c, forceThinBorder: p, children: a, ...C } = e, d =
|
|
623
|
+
const { getBorderAt: t, width: n, height: r, style: i, rowCount: o = 2, columnCount: l = 2, darkMode: c, forceThinBorder: p, children: a, ...C } = e, d = Te(null), [m, { width: S, height: b }] = cn(), T = n ?? S, E = r ?? b, j = Se(() => {
|
|
624
624
|
const P = [];
|
|
625
|
-
for (let
|
|
626
|
-
const A = { colIndex: I, rowIndex:
|
|
625
|
+
for (let ee = 0; ee < o; ee++) for (let I = 0; I < l; I++) {
|
|
626
|
+
const A = { colIndex: I, rowIndex: ee };
|
|
627
627
|
P.push({ coords: A, value: A });
|
|
628
628
|
}
|
|
629
629
|
return P;
|
|
630
|
-
}, []), H = Ze((P) => j, [j]), { overlay: R } = mi({ getVisibleCells: H, getBorderAt: t, darkMode: c, forceThinBorder: p }), O = Math.floor(T / l), v = Math.floor(E / o), w = { getColOffset: (P) => Math.ceil(P * O) + 0, getRowOffset: (P) => Math.ceil(P * v) + 0, getColIndex: (P) => Math.floor((P - 0) / O) - 1, getRowIndex: (P) => Math.floor((P - 0) / v) - 1 }, q = { rowStart: 0, colStart: 0, rowEnd: o, colEnd: l }, N = { x: 0, y: 0, width: Math.max(0, T) + 0, height: Math.max(0, E) + 0 }, x =
|
|
631
|
-
const P = {},
|
|
632
|
-
for (let I = 0; I < l; I++) P[I] = { offset: I *
|
|
630
|
+
}, []), H = Ze((P) => j, [j]), { overlay: R } = mi({ getVisibleCells: H, getBorderAt: t, darkMode: c, forceThinBorder: p }), O = Math.floor(T / l), v = Math.floor(E / o), w = { getColOffset: (P) => Math.ceil(P * O) + 0, getRowOffset: (P) => Math.ceil(P * v) + 0, getColIndex: (P) => Math.floor((P - 0) / O) - 1, getRowIndex: (P) => Math.floor((P - 0) / v) - 1 }, q = { rowStart: 0, colStart: 0, rowEnd: o, colEnd: l }, N = { x: 0, y: 0, width: Math.max(0, T) + 0, height: Math.max(0, E) + 0 }, x = Se(() => {
|
|
631
|
+
const P = {}, ee = Math.floor(T / l);
|
|
632
|
+
for (let I = 0; I < l; I++) P[I] = { offset: I * ee, size: ee, spanIndex: I };
|
|
633
633
|
return P;
|
|
634
|
-
}, [T, E]), k =
|
|
635
|
-
const P = {},
|
|
636
|
-
for (let I = 0; I < o; I++) P[I] = { offset: I *
|
|
634
|
+
}, [T, E]), k = Se(() => {
|
|
635
|
+
const P = {}, ee = Math.floor(E / o);
|
|
636
|
+
for (let I = 0; I < o; I++) P[I] = { offset: I * ee, size: ee, spanIndex: I };
|
|
637
637
|
return P;
|
|
638
638
|
}, [T, E]);
|
|
639
639
|
if (!R) return null;
|
|
640
640
|
const W = { width: T, height: E }, U = { width: T, height: E }, V = { getStage: () => d.current, getTotalSize: () => W, getViewportSize: () => U, getLayout: () => w, getCellCoordsAsRangeCoords: Ct.cellToRange, getVisibleRangeCoords: () => q, getVisibleRows: () => {
|
|
641
641
|
const P = [];
|
|
642
|
-
for (let
|
|
642
|
+
for (let ee = 0; ee < o; ee++) P.push(ee);
|
|
643
643
|
return P;
|
|
644
|
-
}, getTotalRangeCoords: () => q, getRelativePointFromClient: (P,
|
|
644
|
+
}, getTotalRangeCoords: () => q, getRelativePointFromClient: (P, ee) => ({ x: P, y: ee }), getVisibleColumns: () => {
|
|
645
645
|
const P = [];
|
|
646
|
-
for (let
|
|
646
|
+
for (let ee = 0; ee < l; ee++) P.push(ee);
|
|
647
647
|
return P;
|
|
648
|
-
}, toClipBounds: (P,
|
|
648
|
+
}, toClipBounds: (P, ee) => N, toViewBounds: (P) => P, toAbsoluteBounds: (P) => P, getBounds: () => N, getInsets: () => null, getRangeCoordsBounds: (P, ee) => null, getVisibleColumnOffsets: () => x, getVisibleRowOffsets: () => k, allViews: () => ({ [wr]: V }), getAnchor: () => wr, getZoom: () => 1, scrollCellCoordsIntoView: Vl, getCellCoordsFromClient: Bl, getScrollOrientation: () => Ol, getScrollTopLeft: () => yr, getFreezeTopLeft: () => yr }, L = R(V);
|
|
649
649
|
return et("div", { style: { ...i, position: "relative", display: "flex" }, ...C, children: [f("div", { ref: Rn([d, m]), style: { flex: "1 1 100%", display: "flex", maxWidth: "100%", maxHeight: "100%" }, children: a }), L] });
|
|
650
650
|
});
|
|
651
651
|
function pi(e) {
|
|
@@ -687,7 +687,7 @@ const Hl = "_sheetxl-sheet_1qeq6_5", Pl = "_viewport-overlay_1qeq6_6", Wl = (e)
|
|
|
687
687
|
let O = null;
|
|
688
688
|
return !b && E?.length > 0 && (O = f("div", { style: { opacity: 0.7, fontWeight: "500", fontSize: "16px", textAlign: "left", color: t }, children: E })), f("div", { style: { pointerEvents: "none", display: "flex", flexDirection: "column", overflow: "hidden", ...l }, ...c, children: et("div", { style: { position: "relative", display: "flex", flexDirection: "column" }, children: [C ? f(Wl, { style: m }) : f("svg", { width: H, height: R, style: m, children: f("image", { style: { width: H, height: R }, href: "https://www.sheetxl.com/watermark.svg", onError: () => d(!0) }) }), et("div", { children: [O, S, f("div", { style: { height: "0px", fontSize: "16px", textAlign: "left", width: "0px", opacity: 0.8, color: r }, children: i })] })] }) });
|
|
689
689
|
}), gt = (e, t, n) => {
|
|
690
|
-
const r =
|
|
690
|
+
const r = Te(t);
|
|
691
691
|
r.current = t;
|
|
692
692
|
const i = n?.fireOnModelChange ?? !0;
|
|
693
693
|
be(() => {
|
|
@@ -707,7 +707,7 @@ const Hl = "_sheetxl-sheet_1qeq6_5", Pl = "_viewport-overlay_1qeq6_6", Wl = (e)
|
|
|
707
707
|
};
|
|
708
708
|
}, [e]);
|
|
709
709
|
}, nd = (e, t, n, r) => {
|
|
710
|
-
const i =
|
|
710
|
+
const i = Te(n);
|
|
711
711
|
i.current = n;
|
|
712
712
|
const o = r?.fireOnAddressChange ?? !0;
|
|
713
713
|
be(() => {
|
|
@@ -728,8 +728,8 @@ const Hl = "_sheetxl-sheet_1qeq6_5", Pl = "_viewport-overlay_1qeq6_6", Wl = (e)
|
|
|
728
728
|
}, [e, t]);
|
|
729
729
|
}, so = new oi("transparent");
|
|
730
730
|
function Ul(e) {
|
|
731
|
-
const { sheet: t, onRepeatCommandChange: n, bodyStyle: r, commands: i, target: o, notifier: l, onStartEdit: c, getViewport: p } = e, [a, C] = me(null), [d, m] = me(null), S =
|
|
732
|
-
|
|
731
|
+
const { sheet: t, onRepeatCommandChange: n, bodyStyle: r, commands: i, target: o, notifier: l, onStartEdit: c, getViewport: p } = e, [a, C] = me(null), [d, m] = me(null), S = Te(null), b = le(c, [c]), T = le(p, [p]), [E, j] = me(), [H, R] = me(() => t?.getStyles().parseColor(tl.Scheme.Bg2)), [O, v] = me(() => t?.getStyles().getNormal().getFont().getFill()), w = gn();
|
|
732
|
+
Te(w.getMode()).current = w.getMode();
|
|
733
733
|
const q = al(), [N, x] = me(Xe.EmptyArray), k = Ze(() => {
|
|
734
734
|
if (S.current !== t) return;
|
|
735
735
|
const s = t.getSelectedRanges();
|
|
@@ -745,11 +745,11 @@ function Ul(e) {
|
|
|
745
745
|
}, [t]);
|
|
746
746
|
const U = le(() => t.getRange(a).getCell(), [t, a]), V = le(async (s, y, M = null, g = !1, z = !0) => {
|
|
747
747
|
const h = s?.label?.(), B = async () => {
|
|
748
|
-
const
|
|
748
|
+
const de = await Promise.resolve(z && l?.showBusy?.(h ?? "Busy..."));
|
|
749
749
|
try {
|
|
750
|
-
await t.doBatch(async () => y(t), h), g && w.setMode(null),
|
|
750
|
+
await t.doBatch(async () => y(t), h), g && w.setMode(null), de && de();
|
|
751
751
|
} catch (ce) {
|
|
752
|
-
if (
|
|
752
|
+
if (de && de(), !ce) return;
|
|
753
753
|
l?.showError?.(ce);
|
|
754
754
|
}
|
|
755
755
|
}, G = [];
|
|
@@ -757,30 +757,30 @@ function Ul(e) {
|
|
|
757
757
|
const ie = async () => (G.push(B), (async () => {
|
|
758
758
|
if (!J) {
|
|
759
759
|
for (J = !0; G.length > 0; ) {
|
|
760
|
-
const
|
|
761
|
-
|
|
760
|
+
const de = G.shift();
|
|
761
|
+
de && await de();
|
|
762
762
|
}
|
|
763
763
|
J = !1;
|
|
764
764
|
}
|
|
765
765
|
})());
|
|
766
766
|
if (n) {
|
|
767
|
-
let
|
|
767
|
+
let de = null;
|
|
768
768
|
if (M !== !1 && s) {
|
|
769
769
|
const ce = M ?? h;
|
|
770
|
-
|
|
770
|
+
de = new je(s.key(), o, { label: ce, description: ce }, ie);
|
|
771
771
|
}
|
|
772
|
-
n(
|
|
772
|
+
n(de);
|
|
773
773
|
}
|
|
774
774
|
return ie();
|
|
775
775
|
}, [t, n, l]), L = le((s, y, M = !1, g) => V(s, (z) => {
|
|
776
776
|
const h = z.getSelectedRanges();
|
|
777
|
-
M && h.getStyle().update(null, g), h.getStyle().update(y, g), h.autoFit({ expandOnly:
|
|
777
|
+
M && h.getStyle().update(null, g), h.getStyle().update(y, g), h.autoFit({ expandOnly: Ce.Orientation.Column, minContent: !0, skipCustomSize: !0 });
|
|
778
778
|
}), [t]), P = le((s, y, M) => {
|
|
779
779
|
V(s, (g) => {
|
|
780
780
|
let z = y;
|
|
781
781
|
(M || y?.address) && (z = z ?? {}, !M && y?.address?.startsWith("#") ? M = y?.address.substring(1) : M && (z.displayText = M)), g.getSelectedRange().setHyperlink(z);
|
|
782
782
|
});
|
|
783
|
-
}, [t]),
|
|
783
|
+
}, [t]), ee = le((s, y) => {
|
|
784
784
|
V(s, (M) => {
|
|
785
785
|
M.getSelectedRange().setComments(y);
|
|
786
786
|
});
|
|
@@ -790,7 +790,7 @@ function Ul(e) {
|
|
|
790
790
|
});
|
|
791
791
|
}, [t]), A = le(async (s, y, M = !1, g = !1) => V(s, async (z) => {
|
|
792
792
|
let h = z.getSelectedRanges();
|
|
793
|
-
M && (y ===
|
|
793
|
+
M && (y === Ce.Orientation.Row ? h = h.getEntireRows(g) : y === Ce.Orientation.Column && (h = h.getEntireColumns(g)));
|
|
794
794
|
let B = null;
|
|
795
795
|
const G = w.getMode()?.key;
|
|
796
796
|
if (G === "copy" || G === "cut") {
|
|
@@ -799,66 +799,66 @@ function Ul(e) {
|
|
|
799
799
|
}
|
|
800
800
|
if (B) {
|
|
801
801
|
const J = await h.insertFrom(B, { ...B.getMarkOptions(), orientation: y, autoSelect: !0 });
|
|
802
|
-
!J || J.isEntireRows() || J.isEntireColumns() || J.autoFit({ orientations:
|
|
802
|
+
!J || J.isEntireRows() || J.isEntireColumns() || J.autoFit({ orientations: Ce.Orientations.Row, minContent: !0 }), w.setMode(null);
|
|
803
803
|
} else h.insert(y, { autoSelect: !0 });
|
|
804
|
-
}, "Insert Cells", !1), [w]), [
|
|
804
|
+
}, "Insert Cells", !1), [w]), [se, we] = me(null), Ge = le((s) => t.getStyles().setDefaultTableStyle(s), [t]), Ae = le((s) => {
|
|
805
805
|
t.getStyles().getTableStyle(s)?.delete();
|
|
806
806
|
}, [t]), ue = le((s, y) => {
|
|
807
807
|
V(s, async (M) => {
|
|
808
808
|
const g = M.getSelectedRange(), z = M.getSelectedCell().getCoords();
|
|
809
809
|
let h = null, B = 0;
|
|
810
|
-
const G = z.rowIndex > 0 ? M.getRange({ rowIndex: z.rowIndex, colIndex: z.colIndex }).getExtended(
|
|
811
|
-
G && M.getRange({ colStart: z.colIndex, rowStart: G.getCoords().rowStart, colEnd: z.colIndex, rowEnd: G.getCoords().rowStart }).isContentful() && (h =
|
|
812
|
-
const J = z.colIndex > 0 ? M.getRange({ rowIndex: z.rowIndex, colIndex: z.colIndex - 1 }).getExtended(
|
|
810
|
+
const G = z.rowIndex > 0 ? M.getRange({ rowIndex: z.rowIndex, colIndex: z.colIndex }).getExtended(Ce.Direction.Up) : null;
|
|
811
|
+
G && M.getRange({ colStart: z.colIndex, rowStart: G.getCoords().rowStart, colEnd: z.colIndex, rowEnd: G.getCoords().rowStart }).isContentful() && (h = Ce.Direction.Up, B = z.rowIndex - G.getCoords().rowEnd);
|
|
812
|
+
const J = z.colIndex > 0 ? M.getRange({ rowIndex: z.rowIndex, colIndex: z.colIndex - 1 }).getExtended(Ce.Direction.Left) : null;
|
|
813
813
|
if (J && M.getRange({ colStart: J.getCoords().colStart, rowStart: z.rowIndex, colEnd: J.getCoords().colStart, rowEnd: z.rowIndex }).isContentful()) {
|
|
814
|
-
const
|
|
815
|
-
(
|
|
814
|
+
const de = z.colIndex - J.getCoords().colEnd;
|
|
815
|
+
(de < B || !h) && (h = Ce.Direction.Left, B = de);
|
|
816
816
|
}
|
|
817
817
|
let ie = null;
|
|
818
|
-
if (h ===
|
|
818
|
+
if (h === Ce.Direction.Up) {
|
|
819
819
|
if (ie = { ...G.getCoords() }, (ie.rowEnd === z.rowIndex || !M.getRange({ colIndex: z.colIndex, rowIndex: z.rowIndex - 1 }).isContentful()) && ie.rowStart > 0 && M.getRange({ colIndex: z.colIndex, rowIndex: ie.rowStart - 1 }).isContentful()) {
|
|
820
|
-
const
|
|
821
|
-
ie = { colStart: z.colIndex, rowStart:
|
|
820
|
+
const de = G.getExtended(Ce.Direction.Up);
|
|
821
|
+
ie = { colStart: z.colIndex, rowStart: de.getCoords().rowStart, colEnd: z.colIndex, rowEnd: G.getCoords().rowEnd };
|
|
822
822
|
}
|
|
823
823
|
ie.rowEnd = z.rowIndex - 1;
|
|
824
|
-
} else if (h ===
|
|
824
|
+
} else if (h === Ce.Direction.Left) {
|
|
825
825
|
if (ie = { ...J.getCoords() }, (ie.colEnd === z.colIndex || !M.getRange({ colIndex: z.colIndex - 1, rowIndex: z.rowIndex }).isContentful()) && ie.colStart > 0 && M.getRange({ colIndex: ie.colStart - 1, rowIndex: z.rowIndex }).isContentful()) {
|
|
826
|
-
const
|
|
827
|
-
ie = { colStart:
|
|
826
|
+
const de = J.getExtended(Ce.Direction.Left);
|
|
827
|
+
ie = { colStart: de.getCoords().colStart, rowStart: z.rowIndex, colEnd: de.getCoords().colEnd, rowEnd: z.rowIndex };
|
|
828
828
|
}
|
|
829
829
|
ie.colEnd = z.colIndex - 1;
|
|
830
830
|
}
|
|
831
831
|
if (g.size !== 1 && h) {
|
|
832
|
-
const
|
|
833
|
-
for (let tt =
|
|
834
|
-
|
|
832
|
+
const de = g.getCoords(), ce = g.startIncrementalUpdates({ orientation: Ce.Orientation.Column }), Re = { ...ie }, fe = de.rowStart, ve = de.rowEnd, Me = de.colStart, We = de.colEnd, He = h === Ce.Direction.Up;
|
|
833
|
+
for (let tt = Me; tt <= We; tt++) {
|
|
834
|
+
Re.colStart = He ? tt : ie.colStart + (tt - Me), Re.colEnd = He ? tt : ie.colEnd + (tt - Me);
|
|
835
835
|
for (let $e = fe; $e <= ve; $e++) {
|
|
836
|
-
|
|
837
|
-
const rt = M.getRange(
|
|
836
|
+
Re.rowStart = He ? ie.rowStart + ($e - fe) : $e, Re.rowEnd = He ? ie.rowEnd + ($e - fe) : $e;
|
|
837
|
+
const rt = M.getRange(Re).toString();
|
|
838
838
|
ce.pushAt($e, tt, `=${y}(${rt})`);
|
|
839
839
|
}
|
|
840
840
|
}
|
|
841
841
|
ce.apply();
|
|
842
842
|
} else {
|
|
843
|
-
const
|
|
844
|
-
b?.({ text: `${ce}${
|
|
843
|
+
const de = ie ? M.getRange(ie).toString() : "", ce = `=${y}(`;
|
|
844
|
+
b?.({ text: `${ce}${de})`, editMode: !0, initialSelection: { start: ce.length, end: ce.length + de.length } });
|
|
845
845
|
}
|
|
846
846
|
}, !1);
|
|
847
|
-
}, [t]),
|
|
847
|
+
}, [t]), Ie = le((s, y, M = !1, g = !0) => {
|
|
848
848
|
V(s, async (z) => {
|
|
849
849
|
let h = null;
|
|
850
|
-
if (
|
|
850
|
+
if (se) return void se.updateStyleOptions(y);
|
|
851
851
|
{
|
|
852
852
|
const J = z.getSelectedRanges().getFixed(!0), ie = z.getSelectedRange().getDefaultSortCriteria();
|
|
853
|
-
let
|
|
854
|
-
h = g ? new Promise((ce,
|
|
855
|
-
const fe = { tableOptions:
|
|
856
|
-
|
|
853
|
+
let de = { ranges: J, hasHeader: ie?.options?.hasHeader ?? !1 };
|
|
854
|
+
h = g ? new Promise((ce, Re) => {
|
|
855
|
+
const fe = { tableOptions: de, onCancel: () => {
|
|
856
|
+
Re();
|
|
857
857
|
}, onDone: (ve) => {
|
|
858
858
|
ce(ve);
|
|
859
859
|
}, context: { getNames: () => z.getNames() } };
|
|
860
860
|
l.showWindow?.("tableNew", fe);
|
|
861
|
-
}) : { option: "Ok", tableOptions:
|
|
861
|
+
}) : { option: "Ok", tableOptions: de };
|
|
862
862
|
}
|
|
863
863
|
const B = await Promise.resolve(h);
|
|
864
864
|
if (B?.option !== "Ok") throw null;
|
|
@@ -870,7 +870,7 @@ function Ul(e) {
|
|
|
870
870
|
}
|
|
871
871
|
G();
|
|
872
872
|
}, !1, !0, !1);
|
|
873
|
-
}, [
|
|
873
|
+
}, [se]), Je = le(() => r, [r]), Ye = le((s) => ({ styles: () => t.getStyles(), table: () => s, bodyStyle: Je, getNames: () => t.getNames() }), [t]), Fe = le(async (s, y, M, g = !0) => {
|
|
874
874
|
let z = null;
|
|
875
875
|
if (!y) {
|
|
876
876
|
let h = t.getSelectedRange();
|
|
@@ -924,28 +924,28 @@ Continue?`, options: ["Convert", "Cancel"], defaultOption: "Convert" }) !== "Con
|
|
|
924
924
|
let h = z.at(0);
|
|
925
925
|
h.size === 1 && (h = h.getSurrounding());
|
|
926
926
|
const B = g.getSelection().getCoords().cell;
|
|
927
|
-
let G = h.getDefaultSortCriteria(
|
|
927
|
+
let G = h.getDefaultSortCriteria(Ce.Orientation.Row, B);
|
|
928
928
|
if (!G) {
|
|
929
929
|
if (M) throw new Error("Invalid sort selection. Sort requires a single range with data.");
|
|
930
930
|
return;
|
|
931
931
|
}
|
|
932
932
|
let J = G.options;
|
|
933
|
-
if (M && (J = new Promise((
|
|
934
|
-
const
|
|
933
|
+
if (M && (J = new Promise((de, ce) => {
|
|
934
|
+
const Re = { range: h, options: G.options, cell: B, onCancel: () => {
|
|
935
935
|
ce();
|
|
936
936
|
}, onDone: (fe) => {
|
|
937
|
-
fe ?
|
|
937
|
+
fe ? de(fe.options) : ce();
|
|
938
938
|
} };
|
|
939
|
-
l.showWindow?.("sort",
|
|
939
|
+
l.showWindow?.("sort", Re);
|
|
940
940
|
})), J = await Promise.resolve(J), !J) return;
|
|
941
941
|
const ie = await Promise.resolve(l?.showBusy?.(s.label()));
|
|
942
942
|
try {
|
|
943
943
|
h.doBatch(() => {
|
|
944
|
-
const
|
|
945
|
-
h.sort(
|
|
944
|
+
const de = { ...J, ...y };
|
|
945
|
+
h.sort(de), h.autoFit({ orientations: de?.orientation === Ce.Orientation.Column ? Ce.Orientations.Column : Ce.Orientations.Row, skipCustomSize: !0, minContent: !0 });
|
|
946
946
|
}, s?.label?.());
|
|
947
|
-
} catch (
|
|
948
|
-
ie(), l?.showError?.(
|
|
947
|
+
} catch (de) {
|
|
948
|
+
ie(), l?.showError?.(de);
|
|
949
949
|
}
|
|
950
950
|
ie();
|
|
951
951
|
}, !1, !1, !1);
|
|
@@ -979,7 +979,7 @@ Continue?`, options: ["Convert", "Cancel"], defaultOption: "Convert" }) !== "Con
|
|
|
979
979
|
}, [t]), K = le((s, y, M) => {
|
|
980
980
|
V(s, async (g) => {
|
|
981
981
|
let z = g.getSelectedRanges();
|
|
982
|
-
M && (y ===
|
|
982
|
+
M && (y === Ce.Orientation.Row ? z = z.getEntireRows() : y === Ce.Orientation.Column && (z = z.getEntireColumns())), z.delete(y);
|
|
983
983
|
}, "Delete Cells");
|
|
984
984
|
}, [t]);
|
|
985
985
|
le(async (s) => {
|
|
@@ -992,7 +992,7 @@ Continue?`, options: ["Convert", "Cancel"], defaultOption: "Convert" }) !== "Con
|
|
|
992
992
|
}
|
|
993
993
|
return y;
|
|
994
994
|
}, [t, l]);
|
|
995
|
-
const
|
|
995
|
+
const oe = le(async (s, y, M) => {
|
|
996
996
|
const g = await l?.showBusy?.(s.label());
|
|
997
997
|
try {
|
|
998
998
|
const z = await t.getMovables().addImage(y, { autoSelect: !0, ...M });
|
|
@@ -1006,17 +1006,17 @@ Continue?`, options: ["Convert", "Cancel"], defaultOption: "Convert" }) !== "Con
|
|
|
1006
1006
|
V(s, async (M) => {
|
|
1007
1007
|
const g = M.getSelectedRanges();
|
|
1008
1008
|
g.doBatch(() => {
|
|
1009
|
-
const z = y ===
|
|
1009
|
+
const z = y === Ce.Direction.Up || y === Ce.Direction.Down, h = g.getCoords().slice().sort(Ct.createRangeComparator(z ? Ce.Orientation.Row : Ce.Orientation.Column));
|
|
1010
1010
|
for (let B = 0; B < h.length; B++) {
|
|
1011
1011
|
const G = h[B];
|
|
1012
1012
|
let J = G;
|
|
1013
1013
|
const ie = M.getRange(J).getMerges();
|
|
1014
|
-
let
|
|
1014
|
+
let de = 0, ce = 0;
|
|
1015
1015
|
if (ie.length > 0) {
|
|
1016
|
-
const
|
|
1017
|
-
|
|
1016
|
+
const Re = ie[0];
|
|
1017
|
+
de = Re.rowEnd - Re.rowStart, ce = Re.colEnd - Re.colStart;
|
|
1018
1018
|
}
|
|
1019
|
-
y ===
|
|
1019
|
+
y === Ce.Direction.Left ? J = { ...G, colStart: G.colEnd + ce } : y === Ce.Direction.Right ? J = { ...G, colEnd: G.colStart + ce } : y === Ce.Direction.Up ? J = { ...G, rowStart: G.rowEnd + de } : y === Ce.Direction.Down && (J = { ...G, rowEnd: G.rowStart + de }), M.getRange(J).autoFill(G, { filler: nl.Types.Copy }), M.getRange(G).autoFit({ orientations: Ce.Orientations.Row, skipCustomSize: !0, minContent: !0 });
|
|
1020
1020
|
}
|
|
1021
1021
|
}, { autoSelect: !0, description: s.label() });
|
|
1022
1022
|
});
|
|
@@ -1028,7 +1028,7 @@ Continue?`, options: ["Convert", "Cancel"], defaultOption: "Convert" }) !== "Con
|
|
|
1028
1028
|
M && (s = M.toTextUnformatted(!0));
|
|
1029
1029
|
}
|
|
1030
1030
|
b?.({ text: s });
|
|
1031
|
-
}, [t]), [
|
|
1031
|
+
}, [t]), [xe, ae] = dn((s) => s + 1, 0), [qe, De] = dn((s) => s + 1, 0), Ne = Se(() => [new Y("gridlinesToggle", o, { label: "Gridlines", scopedLabels: { view: "Gridlines" }, description: "Toggle whether the lines between rows and columns in the sheet are displayed." }), new Y("sheetViewToggleGridlinesRows", o, { label: "Row Gridlines", scopedLabels: { view: "Row Gridlines", gridlines: "Rows" }, description: "Toggle whether the lines between rows in the sheet are displayed." }), new Y("sheetViewToggleGridlinesColumns", o, { label: "Column Gridlines", scopedLabels: { view: "Columns Gridlines", gridlines: "Columns" }, description: "Toggle whether the lines between columns in the sheet are displayed." }), new Y("sheetViewFormatGridlinesColor", o, { label: "Gridlines Color", description: "Color the rows and column gridlines." }), new Y("sheetViewToggleShowHeadings", o, { label: "Headings", scopedLabels: { view: "Headings" }, description: "Toggle whether the row and column headings are displayed." }), new Y("sheetViewToggleShowHeadingRows", o, { label: "Row Headings", scopedLabels: { view: "Row Headings", headings: "Rows" }, description: "Toggle whether the row headings are displayed." }), new Y("sheetViewToggleShowHeadingColumns", o, { label: "Column Headings", scopedLabels: { view: "Columns Headings", headings: "Columns" }, description: "Toggle whether the column headings are displayed." }), new Y("sheetViewToggleShowHeadingsNumeric", o, { label: "Numeric Headers", description: "Toggle whether cell headings show numbers or A1 conventions.", shortcut: { key: "h", modifiers: [te.Ctrl, te.Shift] } }), new Y("sheetViewToggleFormulaView", o, { label: "Show Formulas", description: "Toggle whether cells show formula or values.", shortcut: [{ key: "`", modifiers: [te.Ctrl] }, { key: "`", modifiers: [te.Ctrl, te.Shift] }] }), new Y("sheetViewToggleShowZeros", o, { label: "Show Zeros", description: "Toggle whether cell with zero value shows '0' or blank." }), new je("selectComments", o, { label: "Select Comments", description: "Select the cells with comments.", shortcut: { key: "O", modifiers: [te.Ctrl, te.Shift] } }, () => ye()), new Y("selectAll", o, { label: "Select All", description: "Select the closest data or the entire sheet if no data is nearby.", shortcut: [{ key: "A", modifiers: [te.Ctrl] }, { key: "Space", modifiers: [te.Ctrl, te.Shift] }] }, (s = !1) => Z(!1, s)), new je("selectRegion", o, { label: "Select Region", description: "Select the closest data.", shortcut: { key: "*", modifiers: [te.Ctrl, te.Shift] } }, () => Z(!0, !1)), new je("breakSelection", o, { label: "Select Visible", description: "Break the selection based on hidden rows and columns.", shortcut: { key: "Semicolon", modifiers: [te.Ctrl, te.Alt] } }, () => Le()), new je("formatTextRotate0", o, { label: "No Text Rotation", description: "Remove all text rotation." }), new je("formatTextRotate45", o, { label: "Angle Clockwise", description: "Angle text 45 degrees downward." }), new je("formatTextRotate90", o, { label: "Rotate Text Down", description: "Angle your text so that it aligns with the left." }), new je("formatTextRotate270", o, { label: "Rotate Text Up", description: "Angle your text so that it aligns with the right." }), new je("formatTextRotate315", o, { label: "Angle Counterclockwise", description: "Angle text 45 degrees upward." }), new Y("formatTextRotateCustom", o, { label: "Custom Text Rotation", description: "Angle your text using a custom angle." }), new je("formatTextRotateVertical", o, { label: "Vertical Text", description: "Stack text vertically." }), new je("sortAscending", o, { label: "Sort Ascending", scopedLabels: { sort: "Ascending" }, description: "Lowest to Highest." }, function() {
|
|
1032
1032
|
$(this, { reverse: !1 }, !1);
|
|
1033
1033
|
}), new je("sortDescending", o, { label: "Sort Descending", scopedLabels: { sort: "Descending" }, description: "Highest to Lowest." }, function() {
|
|
1034
1034
|
$(this, { reverse: !0 }, !1);
|
|
@@ -1038,56 +1038,56 @@ Continue?`, options: ["Convert", "Cancel"], defaultOption: "Convert" }) !== "Con
|
|
|
1038
1038
|
For example, you can prevent people from editing locked cells or making formatting changes.` }), new Y("formatSheetTabColor", o, { label: "Tab Color", description: "Color the tab to help differentiate for other sheets." }), new Y("formatCellStyle", o, { label: "Cell Styles", scopedLabels: { cellStyle: "Apply" }, description: "A colorful style is a great way to make important data stand out on the sheet." }, function(s) {
|
|
1039
1039
|
L(this, { named: s.getName() }, !0);
|
|
1040
1040
|
}), new Y("formatTableStyle", o, { label: "Format as Table", scopedLabels: { table: "Apply (Keep Styles)" }, description: "Create a table or apply style to the current table." }, function(s) {
|
|
1041
|
-
|
|
1041
|
+
Ie(this, s);
|
|
1042
1042
|
}), new Y("formatTableStyleClearCellStyles", o, { label: "Format as Table (Clear Styles)", scopedLabels: { table: "Apply (Clear Styles)" }, description: "Create a table or apply style to the current table and clears all cell styles." }, function(s) {
|
|
1043
|
-
|
|
1043
|
+
Ie(this, s, !0);
|
|
1044
1044
|
}), new Y("formatTableStyleClearTableStyle", o, { label: "Clear Table Style", scopedLabels: { table: "Clear Style" }, description: "Remove all the styling that is specific for the table." }, function() {
|
|
1045
|
-
|
|
1046
|
-
}), new Y("setDefaultTableStyle", o, { label: "Set Default Table Style", scopedLabels: { table: "Set As Default" }, description: "Sets the default table style used when a table is inserted." }, Ge), new Y("deleteTableStyle", o, { label: "Delete Table Style", scopedLabels: { table: "Delete" }, description: "Remove the current table style." },
|
|
1045
|
+
Ie(this, { name: null }, !0);
|
|
1046
|
+
}), new Y("setDefaultTableStyle", o, { label: "Set Default Table Style", scopedLabels: { table: "Set As Default" }, description: "Sets the default table style used when a table is inserted." }, Ge), new Y("deleteTableStyle", o, { label: "Delete Table Style", scopedLabels: { table: "Delete" }, description: "Remove the current table style." }, Ae), new Y("formatBorder", o, { label: "Border", description: "Create an outline border." }, function(s) {
|
|
1047
1047
|
L(this, { border: s });
|
|
1048
1048
|
}), new Y("formatFillColor", o, { label: "Fill Color", description: "Color the background of the cells to make them stand out." }, function(s) {
|
|
1049
1049
|
L(this, { fill: s });
|
|
1050
1050
|
}), new Y("formatFontColor", o, { label: "Font Color", description: "Change the color of your text." }, function(s) {
|
|
1051
1051
|
L(this, { font: { fill: s } });
|
|
1052
|
-
}), new Y("formatBoldToggle", o, { label: "Bold", description: "Toggle bold formatting of text.", shortcut: [{ key: "B", modifiers: [
|
|
1052
|
+
}), new Y("formatBoldToggle", o, { label: "Bold", description: "Toggle bold formatting of text.", shortcut: [{ key: "B", modifiers: [te.Ctrl] }, { key: "2", modifiers: [te.Ctrl] }] }), new Y("formatItalicToggle", o, { label: "Italic", description: "Toggle italic formatting of text.", shortcut: [{ key: "I", modifiers: [te.Ctrl] }, { key: "3", modifiers: [te.Ctrl] }] }), new Y("formatUnderlinedToggle", o, { label: "Underline", scopedLabels: { underline: "Single" }, description: "Underline the text.", shortcut: [{ key: "u", modifiers: [te.Ctrl] }, { key: "4", modifiers: [te.Ctrl] }] }), new Y("formatUnderlinedDoubleToggle", o, { label: "Double Underline", scopedLabels: { underline: "Double" }, description: "Double underline the text." }), new Y("formatUnderlinedAccountingToggle", o, { label: "Accounting Underline", scopedLabels: { underline: "Accounting" }, description: "Use accounting underline for the text." }), new Y("formatUnderlinedAccountingDoubleToggle", o, { label: "Double Accounting Underline", scopedLabels: { underline: "Double Accounting" }, description: "Use accounting double underline the text." }), new Y("formatStrikeThroughToggle", o, { label: "Strikethrough", description: "Toggle strike-through formatting of text.", shortcut: { key: "5", modifiers: [te.Ctrl] } }), new Y("formatSuperscriptToggle", o, { label: "Superscript", description: "Format your text to be smaller and sit at the top of the line." }), new Y("formatSubscriptToggle", o, { label: "Subscript", description: "Format your text to be smaller and sit at the bottom of the line." }), new Y("formatAlignTopToggle", o, { label: "Align Top", description: "Align text to the top." }), new Y("formatTextOverflowVisibleToggle", o, { label: "Overflow Text", description: "Overflow text to the next cells." }), new Y("formatTextOverflowWrapToggle", o, { label: "Wrap Text", description: "Wrap text with the existing cell and increase the height as required." }), new Y("formatTextOverflowClipToggle", o, { label: "Clip Text", description: "Clip text that falls outside of the existing cell." }), new Y("formatTextOverflowShrinkToggle", o, { label: "Shrink Text", description: "Shrink the text font to fit within existing cell." }), new Y("formatTextOverflowEllipsisToggle", o, { label: "Ellipsis Text", description: "Add a trailing '…' to the text to indicate text is partially hidden." }), new Y("formatAlignMiddleToggle", o, { label: "Align Middle", description: "Align text so that it is centered between the top and bottom of the cell." }), new Y("formatAlignBottomToggle", o, { label: "Align Bottom", description: "Align text to the bottom." }), new Y("formatAlignJustifyVerticalToggle", o, { label: "Justify Vertically", description: "Each 'word' in each line of text inside the cell is evenly distributed across the height of the cell." }), new Y("formatAlignDistributedVerticalToggle", o, { label: "Distribute Vertically", description: "Justify your content vertically." }), new Y("formatAlignLeftToggle", o, { label: "Align Left", description: "Align your content to the left." }), new Y("formatAlignCenterToggle", o, { label: "Align Center", description: "Center your content." }), new Y("formatAlignRightToggle", o, { label: "Align Right", description: "Align your content to the right." }), new Y("formatAlignJustifyToggle", o, { label: "Align Justify", description: "Justify your content." }), new Y("formatAlignCenterContinuousToggle", o, { label: "Center Across", description: "Center your content across multiple cells." }), new Y("formatAlignFillToggle", o, { label: "Fill Across", description: "Repeat the value to fill the entire cell." }), new Y("formatAlignDistributedHorizontalToggle", o, { label: "Distribute Horizontally", description: "Each 'word' in each line of text inside the cell is evenly distributed across the width of the cell." }), new je("formatFontSizeIncrease", o, { label: "Increase Font Size", description: "Make your text a bit bigger.", shortcut: { key: ">", modifiers: [te.Ctrl, te.Shift] } }, function() {
|
|
1053
1053
|
L(this, (s) => ({ font: { size: Zo(s.getFont().getSize(), !0) } }));
|
|
1054
|
-
}), new je("formatFontSizeDecrease", o, { label: "Decrease Font Size", description: "Make your text a bit smaller.", shortcut: { key: "<", modifiers: [
|
|
1054
|
+
}), new je("formatFontSizeDecrease", o, { label: "Decrease Font Size", description: "Make your text a bit smaller.", shortcut: { key: "<", modifiers: [te.Ctrl, te.Shift] } }, function() {
|
|
1055
1055
|
L(this, (s) => ({ font: { size: Zo(s.getFont().getSize(), !1) } }));
|
|
1056
1056
|
}), new Y("formatFontFamily", o, { label: "Font", description: "Select the font your text." }, function(s) {
|
|
1057
1057
|
L(this, { font: { family: s } });
|
|
1058
1058
|
}), new Y("formatFontSize", o, { label: "Font Size", description: "Change the size of your text." }, function(s) {
|
|
1059
1059
|
L(this, { font: { size: s } });
|
|
1060
|
-
}), new Y("formatNumberDialog", o, { label: "Custom Number Format", scopedLabels: { numberFormat: "Custom" }, description: "Create a custom number format.", shortcut: [{ key: "1", modifiers: [
|
|
1060
|
+
}), new Y("formatNumberDialog", o, { label: "Custom Number Format", scopedLabels: { numberFormat: "Custom" }, description: "Create a custom number format.", shortcut: [{ key: "1", modifiers: [te.Ctrl] }, { key: "1", modifiers: [te.Ctrl, te.Alt] }] }, function(s, y) {
|
|
1061
1061
|
const M = this, g = { initialValue: s ?? y.state(), context: y.context(), onInputOption: (z, h) => {
|
|
1062
1062
|
L(M, { numberFormat: z });
|
|
1063
1063
|
} };
|
|
1064
1064
|
l.showWindow?.("numberFormat", g);
|
|
1065
1065
|
}), new Y("formatNumberFormat", o, { label: "Number Format", description: "Choose the format for your cells, such as percentage, currency, date or time." }, function(s) {
|
|
1066
1066
|
L(this, { numberFormat: s });
|
|
1067
|
-
}), new Y("formatNumberFormatGeneralStyle", o, { label: "General Style", description: "Remove all specific formatting.", shortcut: { key: "Backquote", modifiers: [
|
|
1067
|
+
}), new Y("formatNumberFormatGeneralStyle", o, { label: "General Style", description: "Remove all specific formatting.", shortcut: { key: "Backquote", modifiers: [te.Ctrl, te.Shift] } }, function() {
|
|
1068
1068
|
L(this, { numberFormat: Yt.Type.General });
|
|
1069
|
-
}), new Y("formatNumberFormatNumberStyle", o, { label: "Number Style", description: "Format as number with two decimals and comma.", shortcut: { key: "1", modifiers: [
|
|
1069
|
+
}), new Y("formatNumberFormatNumberStyle", o, { label: "Number Style", description: "Format as number with two decimals and comma.", shortcut: { key: "1", modifiers: [te.Ctrl, te.Shift] } }, function() {
|
|
1070
1070
|
L(this, { numberFormat: "#,##0.00" });
|
|
1071
|
-
}), new Y("formatNumberFormatTimeStyle", o, { label: "Time Style", description: "Format as time with hour and minute, and AM or PM.", shortcut: { key: "2", modifiers: [
|
|
1071
|
+
}), new Y("formatNumberFormatTimeStyle", o, { label: "Time Style", description: "Format as time with hour and minute, and AM or PM.", shortcut: { key: "2", modifiers: [te.Ctrl, te.Shift] } }, function() {
|
|
1072
1072
|
L(this, { numberFormat: "h:mm AM/PM" });
|
|
1073
|
-
}), new Y("formatNumberFormatDateStyle", o, { label: "Date Style", description: "Format as date with day, month, and year.", shortcut: { key: "3", modifiers: [
|
|
1073
|
+
}), new Y("formatNumberFormatDateStyle", o, { label: "Date Style", description: "Format as date with day, month, and year.", shortcut: { key: "3", modifiers: [te.Ctrl, te.Shift] } }, function() {
|
|
1074
1074
|
L(this, { numberFormat: "d-mmm-yy" });
|
|
1075
|
-
}), new Y("formatNumberFormatAccountingStyle", o, { label: "Accounting Style", description: "Format as Dollars, Euros, or other currency.", shortcut: { key: "4", modifiers: [
|
|
1075
|
+
}), new Y("formatNumberFormatAccountingStyle", o, { label: "Accounting Style", description: "Format as Dollars, Euros, or other currency.", shortcut: { key: "4", modifiers: [te.Ctrl, te.Shift] } }, function(s) {
|
|
1076
1076
|
L(this, { numberFormat: s ?? '_($* #,##0.00_);_($* (#,##0.00);_($* "-"??_);_(@_)' });
|
|
1077
|
-
}), new Y("formatNumberFormatPercentStyle", o, { label: "Percent Style", description: "Format as a percent with no decimal places.", shortcut: { key: "5", modifiers: [
|
|
1077
|
+
}), new Y("formatNumberFormatPercentStyle", o, { label: "Percent Style", description: "Format as a percent with no decimal places.", shortcut: { key: "5", modifiers: [te.Ctrl, te.Shift] } }, function() {
|
|
1078
1078
|
L(this, { numberFormat: "0%" });
|
|
1079
|
-
}), new Y("formatNumberFormatScientificStyle", o, { label: "Scientific Style", description: "Format as a scientific number with two decimal places .", shortcut: { key: "6", modifiers: [
|
|
1079
|
+
}), new Y("formatNumberFormatScientificStyle", o, { label: "Scientific Style", description: "Format as a scientific number with two decimal places .", shortcut: { key: "6", modifiers: [te.Ctrl, te.Shift] } }, function() {
|
|
1080
1080
|
L(this, { numberFormat: "0.00E+00" });
|
|
1081
|
-
}), new Y("formatNumberFormatCommaStyle", o, { label: "Comma Style", description: "Format with a thousands separator.", shortcut: { key: ",", modifiers: [
|
|
1081
|
+
}), new Y("formatNumberFormatCommaStyle", o, { label: "Comma Style", description: "Format with a thousands separator.", shortcut: { key: ",", modifiers: [te.Ctrl] } }, function() {
|
|
1082
1082
|
L(this, { numberFormat: '_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)' });
|
|
1083
1083
|
}), new Y("formatNumberFormatIncreaseDecimal", o, { label: "Increase Decimal", description: "Show more decimal places for a more precise value." }, function() {
|
|
1084
1084
|
L(this, (s) => ({ numberFormat: Yt.Parser.adjustDecimalPlaces(s.getNumberFormat(), 1) }));
|
|
1085
1085
|
}), new Y("formatNumberFormatDecreaseDecimal", o, { label: "Decrease Decimal", description: "Show few decimal places." }, function() {
|
|
1086
1086
|
L(this, (s) => ({ numberFormat: Yt.Parser.adjustDecimalPlaces(s.getNumberFormat(), -1) }));
|
|
1087
|
-
}), new Y("displayPlaceholdersToggle", o, { label: "Display Placeholders", description: "Switch between hiding objects, displaying objects, and displaying placeholders for objects.", shortcut: { key: "6", modifiers: [
|
|
1088
|
-
}), new Y("displayOutlineSymbolsToggle", o, { label: "Display Outline Symbols", description: "Display or hide the outline symbols.", shortcut: { key: "8", modifiers: [
|
|
1087
|
+
}), new Y("displayPlaceholdersToggle", o, { label: "Display Placeholders", description: "Switch between hiding objects, displaying objects, and displaying placeholders for objects.", shortcut: { key: "6", modifiers: [te.Ctrl] } }), new je("noOp", o, { label: "Do nothing", description: "Do Nothing.", shortcut: { key: "7", modifiers: [te.Ctrl] } }, function() {
|
|
1088
|
+
}), new Y("displayOutlineSymbolsToggle", o, { label: "Display Outline Symbols", description: "Display or hide the outline symbols.", shortcut: { key: "8", modifiers: [te.Ctrl] } }), new Y("hideRows", o, { label: "Hide Rows", description: "Hide the rows.", shortcut: { key: "9", modifiers: [te.Ctrl] } }), new Y("unhideRows", o, { label: "Unhide Rows", description: "Unhide the rows.", shortcut: { key: "(", modifiers: [te.Ctrl, te.Shift] } }), new Y("hideColumns", o, { label: "Hide Columns", description: "Hide the columns.", shortcut: [{ key: "0", modifiers: [te.Ctrl] }, { key: "0", modifiers: [te.Ctrl, te.Alt] }] }), new Y("unhideColumns", o, { label: "Unhide Columns", description: "Unhide the columns.", shortcut: { key: ")", modifiers: [te.Ctrl, te.Shift] } }), new je("calculate", o, { label: "Calculate Sheet", description: "Recalculate the formulas on the current sheet.", shortcut: { key: "=", modifiers: [te.Ctrl] } }), new Y("insertFunction", o, { label: "Insert Function", disabled: !0, scopedLabels: { insert: "Function", insertFunction: "More Functions..." }, description: "Work with the function in the current cell.", shortcut: { key: "F3", modifiers: [te.Shift] } }, function(s) {
|
|
1089
1089
|
s && ue(this, s.getName());
|
|
1090
|
-
}), new Y("insertFunctionSum", o, { label: "Quick Sum", scopedLabels: { insertFunction: "Sum" }, description: "Quick sum of the cells.", shortcut: { key: "=", modifiers: [
|
|
1090
|
+
}), new Y("insertFunctionSum", o, { label: "Quick Sum", scopedLabels: { insertFunction: "Sum" }, description: "Quick sum of the cells.", shortcut: { key: "=", modifiers: [te.Alt] } }, function() {
|
|
1091
1091
|
ue(this, "SUM");
|
|
1092
1092
|
}), new Y("insertFunctionAverage", o, { label: "Quick Average", scopedLabels: { insertFunction: "Average" }, description: "Quick average of the cells." }, function() {
|
|
1093
1093
|
ue(this, "AVERAGE");
|
|
@@ -1097,16 +1097,16 @@ For example, you can prevent people from editing locked cells or making formatti
|
|
|
1097
1097
|
ue(this, "MAX");
|
|
1098
1098
|
}), new Y("insertFunctionMin", o, { label: "Quick Min", scopedLabels: { insertFunction: "Min" }, description: "Quick minimum of the cells." }, function() {
|
|
1099
1099
|
ue(this, "MIN");
|
|
1100
|
-
}), new Y("startEditCurrentTime", o, { label: "Current Time", description: "Insert the current time.", shortcut: { key: "Semicolon", modifiers: [
|
|
1100
|
+
}), new Y("startEditCurrentTime", o, { label: "Current Time", description: "Insert the current time.", shortcut: { key: "Semicolon", modifiers: [te.Ctrl, te.Shift] } }, function() {
|
|
1101
1101
|
b?.({ text: t.createTemporaryCell({ value: Zn(), style: { numberFormat: "Medium Time" } }).toText() });
|
|
1102
|
-
}), new Y("startEditCurrentDate", o, { label: "Current Date", description: "Insert the current date.", shortcut: { key: "Semicolon", modifiers: [
|
|
1102
|
+
}), new Y("startEditCurrentDate", o, { label: "Current Date", description: "Insert the current date.", shortcut: { key: "Semicolon", modifiers: [te.Ctrl] } }, function() {
|
|
1103
1103
|
b?.({ text: t.createTemporaryCell({ value: Zn(), style: { numberFormat: "Short Date" } }).toText() });
|
|
1104
|
-
}), new je("sheetZoomOut", o, { label: "Zoom Out", description: "Zoom out to see less detail but more area.", shortcut: [{ key: "-", modifiers: [
|
|
1104
|
+
}), new je("sheetZoomOut", o, { label: "Zoom Out", description: "Zoom out to see less detail but more area.", shortcut: [{ key: "-", modifiers: [te.Ctrl, te.Alt] }, { key: "NumpadSubtract", modifiers: [te.Ctrl, te.Alt] }] }), new je("sheetZoomIn", o, { label: "Zoom In", description: "Zoom in to see more detail but less area.", shortcut: [{ key: "=", modifiers: [te.Ctrl, te.Alt] }, { key: "NumpadAdd", modifiers: [te.Ctrl, te.Alt] }] }), new je("sheetZoom100", o, { label: "Zoom 100%", description: "Zoom document to 100%.", shortcut: { key: "o", modifiers: [te.Ctrl, te.Alt] } }), new Y("updateHyperlink", o, { label: "Link", scopedLabels: { contextMenu: "Insert Link…", insert: "Link…", hyperlink: "Edit" }, description: "Create a hyperlink to either another webpage or another location within this document.", context: () => U, shortcut: [{ key: "K", modifiers: [te.Ctrl] }, { key: "K", modifiers: [te.Ctrl, te.Alt] }] }, async function(s, y) {
|
|
1105
1105
|
const M = this, g = { context: y.context(), onUpdateHyperlink: (z, h) => {
|
|
1106
1106
|
P(M, z, h);
|
|
1107
1107
|
} };
|
|
1108
1108
|
l.showWindow?.("hyperlink", g);
|
|
1109
|
-
}), new Y("openHyperlink", o, { label: "Open Link", scopedLabels: { hyperlink: "Open" }, shortcut: { key: "Enter", modifiers: [
|
|
1109
|
+
}), new Y("openHyperlink", o, { label: "Open Link", scopedLabels: { hyperlink: "Open" }, shortcut: { key: "Enter", modifiers: [te.Ctrl] }, description: "Open the hyperlink or goto another location within this document.", context: () => U }, async (s, y) => {
|
|
1110
1110
|
const M = y.context()();
|
|
1111
1111
|
if (!M) return;
|
|
1112
1112
|
const g = M.getHyperlink();
|
|
@@ -1117,29 +1117,29 @@ For example, you can prevent people from editing locked cells or making formatti
|
|
|
1117
1117
|
}
|
|
1118
1118
|
}), new Y("deleteHyperlink", o, { label: "Delete Link", scopedLabels: { hyperlink: "Delete" }, description: "Remove the hyperlink.", context: () => U }, function(s, y) {
|
|
1119
1119
|
P(this, null, null);
|
|
1120
|
-
}), new je("insertNote", o, { label: "Insert Note", scopedLabels: { contextMenu: "Insert Note…", insert: "Note" }, shortcut: { key: "F2", modifiers: [
|
|
1120
|
+
}), new je("insertNote", o, { label: "Insert Note", scopedLabels: { contextMenu: "Insert Note…", insert: "Note" }, shortcut: { key: "F2", modifiers: [te.Shift] }, description: "Add a note to the cell." }, (s, y) => {
|
|
1121
1121
|
((M, g) => {
|
|
1122
1122
|
M?.showMessage?.(et("p", { style: { marginTop: "0px", marginBottom: "0px" }, children: [g, " is not yet implemented.", f("br", {}), f("br", {}), "Please see the ", f("a", { style: { whiteSpace: "nowrap" }, href: "https://www.sheetxl.com/docs/guides/introduction/roadmap", target: "_blank", rel: "noopener", children: "SheetXL Roadmap" }), "."] }));
|
|
1123
1123
|
})(l, y.label());
|
|
1124
|
-
}), new Y("updateComments", o, { label: "Comments", scopedLabels: { contextMenu: "Insert Comments…", insert: "Comments…" }, shortcut: { key: "M", modifiers: [
|
|
1124
|
+
}), new Y("updateComments", o, { label: "Comments", scopedLabels: { contextMenu: "Insert Comments…", insert: "Comments…" }, shortcut: { key: "M", modifiers: [te.Ctrl, te.Alt] }, description: "Add a comment to the current cell.", context: () => U }, async function(s, y) {
|
|
1125
1125
|
const M = this, g = { context: y.context(), onUpdateComments: (z) => {
|
|
1126
|
-
|
|
1126
|
+
ee(M, z);
|
|
1127
1127
|
} };
|
|
1128
1128
|
l.showWindow?.("comments", g);
|
|
1129
1129
|
}), new Y("deleteComments", o, { label: "Delete Comments", description: "Remove any comments.", context: () => U }, function(s, y) {
|
|
1130
|
-
|
|
1130
|
+
ee(this, null);
|
|
1131
1131
|
}), new Y("insertImageFromFile", o, { label: "Insert Image", scopedLabels: { contextMenu: "Insert Image…", insert: "Image…", insertImage: "From Device…" }, description: "Insert a picture from your device." }, async function(s = null) {
|
|
1132
1132
|
let y = null, M = null;
|
|
1133
|
-
typeof s == "string" ? M = s : y = s?.file ? s.file : s, (y || (y = await Xe.openFileDialog(M ?? "image/*"), y)) && await
|
|
1133
|
+
typeof s == "string" ? M = s : y = s?.file ? s.file : s, (y || (y = await Xe.openFileDialog(M ?? "image/*"), y)) && await oe(this, { file: y }, s?.options);
|
|
1134
1134
|
}), new Y("insertImageFromURL", o, { label: "Insert Image From Web", scopedLabels: { insert: "Image From Web", insertImage: "From the Web…" }, description: "Insert a picture from the web." }, async function(s) {
|
|
1135
1135
|
if (!s) {
|
|
1136
1136
|
const y = await l?.showInputOptions?.({ title: "Insert Image from Web", description: "Enter the web address for the image to insert.", inputLabel: "Address", initialValue: "https://picsum.photos/360", inputProps: { style: { minWidth: "440px" } }, options: ["Insert"] });
|
|
1137
1137
|
if (y.option !== "Insert") return;
|
|
1138
1138
|
s = y.input;
|
|
1139
1139
|
}
|
|
1140
|
-
s &&
|
|
1141
|
-
}), new je("insertTable", o, { label: "Insert Table", scopedLabels: { contextMenu: "Insert Table…", insert: "Table" }, description: "Create a table. Tables enable auto formatting, sorting, filtering, and other advanced features.", shortcut: [{ key: "L", modifiers: [
|
|
1142
|
-
|
|
1140
|
+
s && oe(this, { fetch: s });
|
|
1141
|
+
}), new je("insertTable", o, { label: "Insert Table", scopedLabels: { contextMenu: "Insert Table…", insert: "Table" }, description: "Create a table. Tables enable auto formatting, sorting, filtering, and other advanced features.", shortcut: [{ key: "L", modifiers: [te.Ctrl] }, { key: "T", modifiers: [te.Alt, te.Ctrl] }] }, function() {
|
|
1142
|
+
Ie(this);
|
|
1143
1143
|
}), new Y("editTable", o, { label: "Edit Table…", scopedLabels: { table: "Edit…", namedItem: "Edit…" }, description: "Edit the table to adjust formatting, sorting, filtering, or other advanced features." }, function(s) {
|
|
1144
1144
|
let y = null, M = !1;
|
|
1145
1145
|
s.isITable ? y = s : s.getValue() && (y = s.getValue(), M = !0), Fe(this, y, M);
|
|
@@ -1151,50 +1151,50 @@ The table and table specific styling will be removed but the values will be pres
|
|
|
1151
1151
|
|
|
1152
1152
|
The values and the formatting are preserved.` }, function(s) {
|
|
1153
1153
|
ge(this, s, !1);
|
|
1154
|
-
}), new Y("tableTotalRowToggle", o, { label: "Toggle Table Total Row", description: "Toggle Total Row on/off.", scopedLabels: { table: "Total Row" }, shortcut: { key: "T", modifiers: [
|
|
1154
|
+
}), new Y("tableTotalRowToggle", o, { label: "Toggle Table Total Row", description: "Toggle Total Row on/off.", scopedLabels: { table: "Total Row" }, shortcut: { key: "T", modifiers: [te.Ctrl, te.Alt] } }, function() {
|
|
1155
1155
|
const s = this.context().table();
|
|
1156
1156
|
s && s.setShowTotals(!s.getShowTotals());
|
|
1157
1157
|
}), new Y("tableHeaderRowToggle", o, { label: "Toggle Table Header Row", description: "Toggle Header Row on/off.", scopedLabels: { table: "Header Row" } }, function() {
|
|
1158
1158
|
const s = this.context().table();
|
|
1159
1159
|
s && s.setShowHeaders(!s.getShowHeaders());
|
|
1160
|
-
}), new Y("autoFilterToggle", o, { label: "Toggle Filter", scopedLabels: { filter: "Filter" }, description: "Toggle Auto Filter on/off.", shortcut: { key: "L", modifiers: [
|
|
1160
|
+
}), new Y("autoFilterToggle", o, { label: "Toggle Filter", scopedLabels: { filter: "Filter" }, description: "Toggle Auto Filter on/off.", shortcut: { key: "L", modifiers: [te.Ctrl, te.Shift] } }, function() {
|
|
1161
1161
|
const s = this.context().table();
|
|
1162
1162
|
s && s.setShowFilterButton(!s.getShowFilterButton());
|
|
1163
|
-
}), new Y("autoFilterReapply", o, { label: "Reapply Filter", scopedLabels: { filter: "Reapply" }, description: "Reapply the filter and sort with the latest changes.", shortcut: { key: "L", modifiers: [
|
|
1163
|
+
}), new Y("autoFilterReapply", o, { label: "Reapply Filter", scopedLabels: { filter: "Reapply" }, description: "Reapply the filter and sort with the latest changes.", shortcut: { key: "L", modifiers: [te.Ctrl, te.Alt] } }), new Y("autoFilterClear", o, { label: "Clear Filter", scopedLabels: { filter: "Clear" }, description: "Clear the filters criteria from the current filter.." }), new je("startEditValueAbove", o, { label: "Copy From Above", description: "Copy the value from the cell above the active cell into the cell or the formula bar.", shortcut: [{ key: "Quote", modifiers: [te.Ctrl] }, { key: '"', modifiers: [te.Ctrl, te.Shift] }] }, he), new Y("formatPainterToggle", o, { label: "Format Painter", description: "Apply style to another part of your workbook." }), new je("insertCells", o, { label: "Insert Cells", scopedLabels: { insertCells: "At Selection" }, description: "Inserts cells at the current selection.", shortcut: { key: "=", modifiers: [te.Ctrl, te.Shift] } }, function() {
|
|
1164
1164
|
A(this);
|
|
1165
1165
|
}), new je("insertCellsShiftRight", o, { label: "Insert Cells (Shift Right)", scopedLabels: { insertCells: "Shift Right" }, description: "Insert cells to the left and shift the current cells to the right." }, function() {
|
|
1166
|
-
A(this,
|
|
1166
|
+
A(this, Ce.Orientation.Column);
|
|
1167
1167
|
}), new je("insertCellsShiftDown", o, { label: "Insert Cells (Shift Down)", scopedLabels: { insertCells: "Shift Down" }, description: "Insert cells above and shift the current cells downward." }, function() {
|
|
1168
|
-
return A(this,
|
|
1168
|
+
return A(this, Ce.Orientation.Row);
|
|
1169
1169
|
}), new je("insertRows", o, { label: "Insert Row(s)", scopedLabels: { insertCells: "Row(s)" }, description: "Insert a row above the current position." }, function() {
|
|
1170
|
-
return A(this,
|
|
1170
|
+
return A(this, Ce.Orientation.Row, !0);
|
|
1171
1171
|
}), new je("insertColumns", o, { label: "Insert Column(s)", scopedLabels: { insertCells: "Column(s)" }, description: "Insert a column before the current position." }, function() {
|
|
1172
|
-
return A(this,
|
|
1172
|
+
return A(this, Ce.Orientation.Column, !0);
|
|
1173
1173
|
}), new je("insertRowsAfter", o, { label: "Insert Row Below", scopedLabels: { insertCells: "Row Below" }, description: "Insert a row below the current position." }, function() {
|
|
1174
|
-
return A(this,
|
|
1174
|
+
return A(this, Ce.Orientation.Row, !0, !0);
|
|
1175
1175
|
}), new je("insertColumnsAfter", o, { label: "Insert Column After", scopedLabels: { insertCells: "Column After" }, description: "Insert a column after the current position." }, function() {
|
|
1176
|
-
return A(this,
|
|
1177
|
-
}), new je("deleteCells", o, { label: "Delete Cells", scopedLabels: { deleteCells: "At Selection" }, description: "Delete the cells.", shortcut: { key: "-", modifiers: [
|
|
1176
|
+
return A(this, Ce.Orientation.Column, !0, !0);
|
|
1177
|
+
}), new je("deleteCells", o, { label: "Delete Cells", scopedLabels: { deleteCells: "At Selection" }, description: "Delete the cells.", shortcut: { key: "-", modifiers: [te.Ctrl] } }, function() {
|
|
1178
1178
|
return K(this);
|
|
1179
1179
|
}), new je("deleteCellsShiftUp", o, { label: "Delete Cells (Shift Up)", scopedLabels: { deleteCells: "Shift up" }, description: "Delete cells the current current downward." }, function() {
|
|
1180
|
-
return K(this,
|
|
1180
|
+
return K(this, Ce.Orientation.Row);
|
|
1181
1181
|
}), new je("deleteCellsShiftLeft", o, { label: "Delete Cells (Shift Left)", scopedLabels: { deleteCells: "Shift Left" }, description: "Delete cells the current cells to the right." }, function() {
|
|
1182
|
-
return K(this,
|
|
1182
|
+
return K(this, Ce.Orientation.Column);
|
|
1183
1183
|
}), new je("deleteRows", o, { label: "Delete Rows", scopedLabels: { deleteCells: "Rows" }, description: "Delete the rows at the current selection." }, function() {
|
|
1184
|
-
return K(this,
|
|
1184
|
+
return K(this, Ce.Orientation.Row, !0);
|
|
1185
1185
|
}), new je("deleteColumns", o, { label: "Delete Columns", scopedLabels: { deleteCells: "Columns" }, description: "Delete the columns at the current selection." }, function() {
|
|
1186
|
-
return K(this,
|
|
1187
|
-
}), new je("flashFill", o, { label: "Flash Fill", description: "Do a flash fill.", shortcut: [{ key: "e", modifiers: [
|
|
1188
|
-
return re(this,
|
|
1189
|
-
}), new je("fillRight", o, { label: "Fill Right", description: "Copy the left-most value from the selection to the right of the selection.", shortcut: [{ key: "r", modifiers: [
|
|
1190
|
-
return re(this,
|
|
1186
|
+
return K(this, Ce.Orientation.Column, !0);
|
|
1187
|
+
}), new je("flashFill", o, { label: "Flash Fill", description: "Do a flash fill.", shortcut: [{ key: "e", modifiers: [te.Ctrl] }, { key: "e", modifiers: [te.Ctrl, te.Alt] }] }), new je("fillDown", o, { label: "Fill Down", description: "Copy the top-most value from the selection to the bottom of the selection.", shortcut: { key: "d", modifiers: [te.Ctrl] } }, function() {
|
|
1188
|
+
return re(this, Ce.Direction.Down);
|
|
1189
|
+
}), new je("fillRight", o, { label: "Fill Right", description: "Copy the left-most value from the selection to the right of the selection.", shortcut: [{ key: "r", modifiers: [te.Ctrl] }] }, function() {
|
|
1190
|
+
return re(this, Ce.Direction.Right);
|
|
1191
1191
|
}), new je("fillUp", o, { label: "Fill Up", description: "Copy the bottom-most value from the selection to the top of the selection." }, function() {
|
|
1192
|
-
return re(this,
|
|
1192
|
+
return re(this, Ce.Direction.Up);
|
|
1193
1193
|
}), new je("fillLeft", o, { label: "Fill Left", description: "Copy the right-most value from the selection to the left of the selection." }, function() {
|
|
1194
|
-
return re(this,
|
|
1195
|
-
}), new je("formatBorderAddOutline", o, { label: "Add Outline Border", description: "Apply an outline border.", shortcut: { key: "7", modifiers: [
|
|
1194
|
+
return re(this, Ce.Direction.Left);
|
|
1195
|
+
}), new je("formatBorderAddOutline", o, { label: "Add Outline Border", description: "Apply an outline border.", shortcut: { key: "7", modifiers: [te.Ctrl, te.Shift] } }, function() {
|
|
1196
1196
|
return L(this, { border: { left: { style: Dt.StrokeStyle.Thin, color: null }, top: { style: Dt.StrokeStyle.Thin, color: null }, right: { style: Dt.StrokeStyle.Thin, color: null }, bottom: { style: Dt.StrokeStyle.Thin, color: null } } });
|
|
1197
|
-
}), new je("formatBorderClearOutline", o, { label: "Remove Outline Border", description: "Remove the outline border.", shortcut: { key: "_", modifiers: [
|
|
1197
|
+
}), new je("formatBorderClearOutline", o, { label: "Remove Outline Border", description: "Remove the outline border.", shortcut: { key: "_", modifiers: [te.Ctrl, te.Shift] } }, function() {
|
|
1198
1198
|
return L(this, { border: null });
|
|
1199
1199
|
}), new je("formatIndentDecrease", o, { label: "Decrease Indent", description: "Move your content closer to the border." }, function() {
|
|
1200
1200
|
return L(this, (s) => {
|
|
@@ -1206,7 +1206,7 @@ The values and the formatting are preserved.` }, function(s) {
|
|
|
1206
1206
|
const y = { alignment: { indent: s.getAlignment().getIndent() + 1 } };
|
|
1207
1207
|
return s.getAlignment().getHorizontal() === pe.HorizontalAlignment.General && (y.alignment.horizontal = pe.HorizontalAlignment.Left), y;
|
|
1208
1208
|
});
|
|
1209
|
-
}), new Y("mergeToggle", o, { label: "Merge", description: "Combine and center the contents into a single cell.", shortcut: { key: "m", modifiers: [
|
|
1209
|
+
}), new Y("mergeToggle", o, { label: "Merge", description: "Combine and center the contents into a single cell.", shortcut: { key: "m", modifiers: [te.Ctrl] } }), new je("mergeHorizontal", o, { label: "Merge Horizontally", description: "Combine the contents into horizontal rows." }), new je("mergeVertical", o, { label: "Merge Vertically", description: "Combine the contents into vertical columns." }), new je("unmerge", o, { label: "Unmerge", description: "Split merged cells into multiple cells." }), new je("clearContents", o, { label: "Clear Contents", scopedLabels: { clear: "Contents" }, description: `Clear only the contents in the cells.
|
|
1210
1210
|
|
|
1211
1211
|
The formatting is not cleared.`, shortcut: { key: "Delete" } }, function() {
|
|
1212
1212
|
I(this, Xt.Content.Values);
|
|
@@ -1218,9 +1218,9 @@ The formatting is not cleared.`, shortcut: { key: "Delete" } }, function() {
|
|
|
1218
1218
|
I(this, Xt.Content.Comments);
|
|
1219
1219
|
}), new je("clearAll", o, { label: "Clear All", scopedLabels: { clear: "All" }, description: `Clears everything from the cells.
|
|
1220
1220
|
|
|
1221
|
-
All contents and formatting are removed.`, shortcut: { key: "Delete", modifiers: [
|
|
1221
|
+
All contents and formatting are removed.`, shortcut: { key: "Delete", modifiers: [te.Ctrl, te.Shift] } }, function() {
|
|
1222
1222
|
I(this);
|
|
1223
|
-
}), new Y("freezeToggle", o, { label: "Freeze Panes", description: "Keep rows and columns visible while the rest of the sheet scrolls (based on current selection)." }), new Y("freezeToggleHorizontal", o, { label: "Freeze Top Rows", description: "Keep the top rows visible while scrolling through the rest of the sheet." }), new Y("freezeToggleVertical", o, { label: "Freeze Left Columns", description: "Keep the left columns visible while scrolling through the rest of the sheet." }), new je("unfreeze", o, { label: "Unfreeze Panes", description: "Unfreeze both the rows and columns." }), new je("autoFitRows", o, { label: "Autofit Rows", description: "Adjust the rows to the best height." }), new je("autoFitColumns", o, { label: "Autofit Columns", description: "Adjust the columns to the best width." })], []), u =
|
|
1223
|
+
}), new Y("freezeToggle", o, { label: "Freeze Panes", description: "Keep rows and columns visible while the rest of the sheet scrolls (based on current selection)." }), new Y("freezeToggleHorizontal", o, { label: "Freeze Top Rows", description: "Keep the top rows visible while scrolling through the rest of the sheet." }), new Y("freezeToggleVertical", o, { label: "Freeze Left Columns", description: "Keep the left columns visible while scrolling through the rest of the sheet." }), new je("unfreeze", o, { label: "Unfreeze Panes", description: "Unfreeze both the rows and columns." }), new je("autoFitRows", o, { label: "Autofit Rows", description: "Adjust the rows to the best height." }), new je("autoFitColumns", o, { label: "Autofit Columns", description: "Adjust the columns to the best width." })], []), u = Se(() => {
|
|
1224
1224
|
let s = null;
|
|
1225
1225
|
return s = i ? i.createChildGroup(o, "sheet", !1) : new Co(o, "sheet"), s.addCommands(Ne, !0), s;
|
|
1226
1226
|
}, [i, Ne]), [Be, st] = me(!1), [Ke, Qe] = me(!1);
|
|
@@ -1232,60 +1232,60 @@ All contents and formatting are removed.`, shortcut: { key: "Delete", modifiers:
|
|
|
1232
1232
|
let h = !0;
|
|
1233
1233
|
for (let B = 0; h && B < s.length; B++) h = Ct.isSingleCell(s[B]);
|
|
1234
1234
|
Qe(z), st(y.length === 0 && !z && (g || !h));
|
|
1235
|
-
}, [
|
|
1235
|
+
}, [qe, d, t]), ii(i, null, { onChange: () => {
|
|
1236
1236
|
const s = !t.getProtection().isFormatCellsAllowed(), y = w.getMode()?.key === "formatPainter";
|
|
1237
1237
|
u.getCommand("formatPainterToggle").update({ disabled: s || !i?.getCommand("copy"), state: () => y }).updateCallback(() => y ? void w.setMode(null) : u.getCommand("copy").execute({ editMode: { key: "formatPainter", description: "Use the mouse to apply the copied format to another selection.", cursor: `url("data:image/svg+xml,%3Csvg width='30' height='22' viewBox='0 0 30 22' xmlns='http://www.w3.org/2000/svg' %3E%3Cg%3E%3Cpath d='M 26.737611,2.811068 V 2.0241451 c 0,-0.4328075 -0.354115,-0.7869227 -0.786923,-0.7869227 h -9.443074 c -0.432808,0 -0.786923,0.3541152 -0.786923,0.7869227 v 3.1476914 c 0,0.4328076 0.354115,0.7869235 0.786923,0.7869235 h 9.443074 c 0.432808,0 0.786923,-0.3541159 0.786923,-0.7869235 V 4.3849137 h 0.786923 v 3.1476915 h -7.869229 v 8.6561518 c 0,0.432808 0.354116,0.786923 0.786923,0.786923 h 1.573846 c 0.432807,0 0.786923,-0.354115 0.786923,-0.786923 V 9.1064513 H 29.09838 V 2.811068 Z M 10.714339,6.2116849 c -1.60877,0.0017 -3.2175361,0.00425 -4.8263048,0.00609 0.0012,1.5756989 0.00158,3.1513905 0.00244,4.7270891 -1.5978311,0.0017 -3.1956617,0.0034 -4.7934919,0.0043 0.00335,1.740011 0.00655,3.480012 0.00988,5.220023 1.5954589,0 3.1909181,0 4.7863775,0 -0.0017,1.606793 -0.00353,3.213585 -0.0051,4.820375 1.7440936,0.0016 3.4881881,0.0033 5.2322842,0.005 -0.0014,-1.608503 -0.0018,-3.217015 -0.0028,-4.825519 1.58518,0 3.17036,0 4.755543,0 0.0033,-1.741851 0.0073,-3.483705 0.01072,-5.225556 -1.58808,0 -3.176158,0 -4.764238,0 0,-1.5775391 0,-3.1550792 0,-4.7326117 -0.135065,1.3e-4 -0.270128,1.982e-4 -0.40519,4.047e-4 z' stroke='black' fill='white'/%3E%3C/g%3E%3C/svg%3E%0A") 7 12, pointer` } }));
|
|
1238
|
-
} }, [w,
|
|
1239
|
-
|
|
1238
|
+
} }, [w, xe, i]), gt(t.getView(), { onFreezeSplitChange: () => {
|
|
1239
|
+
De();
|
|
1240
1240
|
} }), gt(t.getSelection(), { onChange: () => {
|
|
1241
1241
|
W();
|
|
1242
1242
|
} });
|
|
1243
|
-
const
|
|
1243
|
+
const ne = () => {
|
|
1244
1244
|
u.getCommand("sheetViewFormatGridlinesColor").update({ state: () => t.getView().getGridLineColor(), context: () => ({ onColorSelect: (s) => {
|
|
1245
1245
|
}, darkMode: r.darkMode, autoColor: t.getStyles().parseColor(r.strokeFill), schemeLookup: t.getStyles().schemeLookup(), recentColors: () => t.getStyles().recentColors(), addRecentColor: (s) => t.getStyles().addRecentColor(s), clearRecentColors: () => t.getStyles().clearRecentColors() }) }), u.getCommand("formatSheetTabColor").updateCallback((s) => {
|
|
1246
1246
|
t.setTabColor(s);
|
|
1247
1247
|
}).update({ state: () => t?.getTabColor() ?? so, context: () => ({ onColorSelect: (s) => {
|
|
1248
1248
|
}, darkMode: r.darkMode, autoColor: so, schemeLookup: t.getStyles().schemeLookup(), recentColors: () => t.getStyles().recentColors(), addRecentColor: (s) => t.getStyles().addRecentColor(s), clearRecentColors: () => t.getStyles().clearRecentColors() }) });
|
|
1249
|
-
},
|
|
1249
|
+
}, Ee = () => {
|
|
1250
1250
|
u.getCommand("formatBorder").update({ context: () => ({ onBorderSelect: (s) => {
|
|
1251
1251
|
j(s);
|
|
1252
1252
|
}, darkMode: r.darkMode, quickBorder: E, autoColor: t.getStyles().getNormal().getFont().getFill(), autoStyle: Dt.StrokeStyle.Thin, createTemporaryBorder: (s) => t.getStyles().getNormal().createTemporaryStyle({ border: s }).getBorder(), schemeLookup: t.getStyles().schemeLookup() }) });
|
|
1253
1253
|
};
|
|
1254
1254
|
be(() => {
|
|
1255
|
-
|
|
1255
|
+
Ee();
|
|
1256
1256
|
}, [E]), be(() => {
|
|
1257
1257
|
const s = !t.getProtection().isInsertHyperlinksAllowed();
|
|
1258
1258
|
u.getCommand("openHyperlink").update({ disabled: !U().getHyperlink() }), u.getCommand("deleteHyperlink").update({ disabled: s || !U().getHyperlink() });
|
|
1259
1259
|
const y = U().getHyperlink() ? "Edit" : "Insert", M = "Link";
|
|
1260
1260
|
u.getCommand("updateHyperlink").update({ label: () => (U().getHyperlink(), `${y} ${M}`), scopedLabels: { contextMenu: `${y} ${M}…`, insert: `${M}…`, hyperlink: `${y}…` }, disabled: s });
|
|
1261
|
-
}, [U()?.getHyperlink(),
|
|
1261
|
+
}, [U()?.getHyperlink(), xe]), be(() => {
|
|
1262
1262
|
const s = U().getComments(), y = () => s ? "Edit" : "Insert", M = () => s ? "Comments" : "Comment";
|
|
1263
1263
|
u.getCommand("updateComments").update({ label: () => `${y()} ${M()}`, scopedLabels: { contextMenu: `${y()} ${M()}…`, insert: `${M()}…` } });
|
|
1264
|
-
}, [U()?.getComments(),
|
|
1264
|
+
}, [U()?.getComments(), xe]), gt(t, { onViewChange: () => {
|
|
1265
1265
|
const s = t.getView();
|
|
1266
|
-
u.getCommand("sheetViewToggleFormulaView").update({ state: s.isShowFormulas() }), u.getCommand("sheetViewToggleShowZeros").update({ state: s.isShowZeros() }), u.getCommand("gridlinesToggle").update({ state: s.isShowColumnGridlines() || s.isShowRowGridlines() }), u.getCommand("sheetViewToggleGridlinesColumns").update({ state: s.isShowColumnGridlines() }), u.getCommand("sheetViewToggleGridlinesRows").update({ state: s.isShowRowGridlines() }), u.getCommand("sheetViewToggleShowHeadings").update({ state: s.isShowColumnHeaders() || s.isShowRowHeaders() }), u.getCommand("sheetViewToggleShowHeadingColumns").update({ state: s.isShowColumnHeaders() }), u.getCommand("sheetViewToggleShowHeadingRows").update({ state: s.isShowRowHeaders() }), u.getCommand("sheetViewToggleShowHeadingsNumeric").update({ state: () => t.getView().getColumnHeaderStyle() === en.HeaderTextStyle.Zero && t.getView().getRowHeaderStyle() === en.HeaderTextStyle.Zero }),
|
|
1266
|
+
u.getCommand("sheetViewToggleFormulaView").update({ state: s.isShowFormulas() }), u.getCommand("sheetViewToggleShowZeros").update({ state: s.isShowZeros() }), u.getCommand("gridlinesToggle").update({ state: s.isShowColumnGridlines() || s.isShowRowGridlines() }), u.getCommand("sheetViewToggleGridlinesColumns").update({ state: s.isShowColumnGridlines() }), u.getCommand("sheetViewToggleGridlinesRows").update({ state: s.isShowRowGridlines() }), u.getCommand("sheetViewToggleShowHeadings").update({ state: s.isShowColumnHeaders() || s.isShowRowHeaders() }), u.getCommand("sheetViewToggleShowHeadingColumns").update({ state: s.isShowColumnHeaders() }), u.getCommand("sheetViewToggleShowHeadingRows").update({ state: s.isShowRowHeaders() }), u.getCommand("sheetViewToggleShowHeadingsNumeric").update({ state: () => t.getView().getColumnHeaderStyle() === en.HeaderTextStyle.Zero && t.getView().getRowHeaderStyle() === en.HeaderTextStyle.Zero }), ne();
|
|
1267
1267
|
}, onTabColorChange: () => {
|
|
1268
|
-
|
|
1268
|
+
ne();
|
|
1269
1269
|
}, onMergesChange: () => {
|
|
1270
|
-
|
|
1270
|
+
De();
|
|
1271
1271
|
}, onMovablesChange: () => {
|
|
1272
|
-
|
|
1272
|
+
De();
|
|
1273
1273
|
}, onTablesChange: () => {
|
|
1274
|
-
|
|
1274
|
+
De();
|
|
1275
1275
|
}, onProtectionChange: () => {
|
|
1276
|
-
|
|
1276
|
+
De(), ae();
|
|
1277
1277
|
}, onStyleChange: () => {
|
|
1278
|
-
|
|
1278
|
+
ne(), Ee(), De();
|
|
1279
1279
|
} }), be(() => {
|
|
1280
|
-
|
|
1280
|
+
ne(), Ee();
|
|
1281
1281
|
}, [r]), be(() => {
|
|
1282
|
-
const s = !t.getProtection().isFormatCellsAllowed(), y = N.length > 0 && !
|
|
1282
|
+
const s = !t.getProtection().isFormatCellsAllowed(), y = N.length > 0 && !se || s, M = Ye(se), g = { context: M };
|
|
1283
1283
|
u.getCommand("editTable").update(g), u.getCommand("deleteTable").update(g), u.getCommand("convertTableToRange").update(g);
|
|
1284
1284
|
const z = { context: M, disabled: y };
|
|
1285
|
-
u.getCommand("formatTableStyle").update({ label:
|
|
1285
|
+
u.getCommand("formatTableStyle").update({ label: se ? "Apply Table Style" : "Format As Table", ...z }), u.getCommand("formatTableStyleClearCellStyles").update(z), u.getCommand("deleteTableStyle").update(z), u.getCommand("convertTableToRange").update(z), u.getCommand("insertTable").update({ disabled: y || N.length > 0 });
|
|
1286
1286
|
const h = { context: M, disabled: y || N.length === 0 };
|
|
1287
|
-
u.getCommand("tableHeaderRowToggle").update(h), u.getCommand("tableTotalRowToggle").update(h), u.getCommand("autoFilterToggle").update(h), u.getCommand("formatTableStyleClearTableStyle").update({ ...h, disabled: h.disabled || !
|
|
1288
|
-
}, [
|
|
1287
|
+
u.getCommand("tableHeaderRowToggle").update(h), u.getCommand("tableTotalRowToggle").update(h), u.getCommand("autoFilterToggle").update(h), u.getCommand("formatTableStyleClearTableStyle").update({ ...h, disabled: h.disabled || !se || se.getStyleOptions().name === null });
|
|
1288
|
+
}, [se, N, xe]), be(() => {
|
|
1289
1289
|
u.getCommand("sheetZoomOut").updateCallback(() => {
|
|
1290
1290
|
t.getView().update({ zoomScale: Xe.findNextStep(t.getView().getZoomScale(), !1) });
|
|
1291
1291
|
}), u.getCommand("sheetZoomIn").updateCallback(() => {
|
|
@@ -1334,8 +1334,8 @@ All contents and formatting are removed.`, shortcut: { key: "Delete", modifiers:
|
|
|
1334
1334
|
}).update({ state: M, disabled: () => !a || !M() && a.colIndex === 0 }), u.getCommand("unfreeze").updateCallback(() => {
|
|
1335
1335
|
t.getView().setFreezePanes(null);
|
|
1336
1336
|
}).update({ disabled: () => !g() });
|
|
1337
|
-
}, [
|
|
1338
|
-
const Ve = U().getStyle(),
|
|
1337
|
+
}, [qe, a, t, r]);
|
|
1338
|
+
const Ve = U().getStyle(), ke = Ve.getFont(), Oe = Ve.getAlignment(), D = Oe.getHorizontal(), X = Oe.getVertical(), F = Oe.getOverflow(), _ = Oe.getRotation();
|
|
1339
1339
|
return be(() => {
|
|
1340
1340
|
u.getCommand("formatCellStyle").update({ context: () => ({ styles: () => t.getStyles(), named: () => U().getStyle(!0).getNamed(), bodyStyle: Je, createTemporaryCell: (Pe) => t.createTemporaryCell(Pe) }) }), u.getCommand("formatFillColor").update({ state: () => {
|
|
1341
1341
|
let Pe = null;
|
|
@@ -1346,39 +1346,39 @@ All contents and formatting are removed.`, shortcut: { key: "Delete", modifiers:
|
|
|
1346
1346
|
return { onColorSelect: (dt) => {
|
|
1347
1347
|
R(dt ?? so);
|
|
1348
1348
|
}, darkMode: r.darkMode, quickColor: H, autoColor: so, schemeLookup: Pe.schemeLookup(), recentColors: Pe.recentColors(), addRecentColor: (dt) => Pe.addRecentColor(dt), clearRecentColors: () => Pe.clearRecentColors() };
|
|
1349
|
-
} }), u.getCommand("formatFontColor").update({ state: () =>
|
|
1349
|
+
} }), u.getCommand("formatFontColor").update({ state: () => ke.toJSON()?.fill ? ke.getFill() : null, context: () => {
|
|
1350
1350
|
const Pe = t.getStyles();
|
|
1351
1351
|
return { onColorSelect: (dt) => {
|
|
1352
1352
|
v(dt);
|
|
1353
1353
|
}, darkMode: r.darkMode, quickColor: O, autoColor: Pe.getNormal().getFont().getFill(), schemeLookup: Pe.schemeLookup(), recentColors: Pe.recentColors(), addRecentColor: (dt) => Pe.addRecentColor(dt), clearRecentColors: () => Pe.clearRecentColors() };
|
|
1354
|
-
} }), u.getCommand("formatNumberFormat").update({ state: () => Ve.getNumberFormat(), context: () => U }), u.getCommand("formatNumberDialog").update({ state: () => Ve.getNumberFormat(), context: () => U }), u.getCommand("formatFontFamily").update({ state: () =>
|
|
1354
|
+
} }), u.getCommand("formatNumberFormat").update({ state: () => Ve.getNumberFormat(), context: () => U }), u.getCommand("formatNumberDialog").update({ state: () => Ve.getNumberFormat(), context: () => U }), u.getCommand("formatFontFamily").update({ state: () => ke.getFamily() }), u.getCommand("formatFontSize").update({ state: () => ke.getSize() });
|
|
1355
1355
|
const s = function() {
|
|
1356
|
-
const Pe =
|
|
1356
|
+
const Pe = ke.getWeight() || 0;
|
|
1357
1357
|
return !isNaN(Pe) && Pe > 500;
|
|
1358
1358
|
};
|
|
1359
1359
|
u.getCommand("formatBoldToggle").updateCallback(function() {
|
|
1360
1360
|
L(this, { font: { weight: s() ? 400 : 700 } });
|
|
1361
1361
|
}).update({ state: s });
|
|
1362
1362
|
const y = function() {
|
|
1363
|
-
return
|
|
1363
|
+
return ke.getStyle() === ut.Style.Italic;
|
|
1364
1364
|
};
|
|
1365
1365
|
u.getCommand("formatItalicToggle").updateCallback(function() {
|
|
1366
1366
|
L(this, { font: { style: y() ? ut.Style.Normal : ut.Style.Italic } });
|
|
1367
1367
|
}).update({ state: y }), u.getCommand("formatStrikeThroughToggle").updateCallback(function() {
|
|
1368
|
-
L(this, { font: { strike: !
|
|
1369
|
-
}).update({ state:
|
|
1370
|
-
L(this, { font: { underline:
|
|
1371
|
-
}).update({ state:
|
|
1372
|
-
L(this, { font: { underline:
|
|
1373
|
-
}).update({ state:
|
|
1374
|
-
L(this, { font: { underline:
|
|
1375
|
-
}).update({ state:
|
|
1376
|
-
L(this, { font: { underline:
|
|
1377
|
-
}).update({ state:
|
|
1378
|
-
L(this, { font: { verticalAlign:
|
|
1379
|
-
}).update({ state:
|
|
1380
|
-
L(this, { font: { verticalAlign:
|
|
1381
|
-
}).update({ state:
|
|
1368
|
+
L(this, { font: { strike: !ke.getStrike() } });
|
|
1369
|
+
}).update({ state: ke.getStrike() }), u.getCommand("formatUnderlinedToggle").updateCallback(function() {
|
|
1370
|
+
L(this, { font: { underline: ke.getUnderline() !== ut.UnderlineStyle.Single ? ut.UnderlineStyle.Single : ut.UnderlineStyle.None } });
|
|
1371
|
+
}).update({ state: ke.getUnderline() === ut.UnderlineStyle.Single }), u.getCommand("formatUnderlinedDoubleToggle").updateCallback(function() {
|
|
1372
|
+
L(this, { font: { underline: ke.getUnderline() !== ut.UnderlineStyle.Double ? ut.UnderlineStyle.Double : ut.UnderlineStyle.None } });
|
|
1373
|
+
}).update({ state: ke.getUnderline() === ut.UnderlineStyle.Double }), u.getCommand("formatUnderlinedAccountingToggle").updateCallback(function() {
|
|
1374
|
+
L(this, { font: { underline: ke.getUnderline() !== ut.UnderlineStyle.SingleAccounting ? ut.UnderlineStyle.SingleAccounting : ut.UnderlineStyle.None } });
|
|
1375
|
+
}).update({ state: ke.getUnderline() === ut.UnderlineStyle.SingleAccounting }), u.getCommand("formatUnderlinedAccountingDoubleToggle").updateCallback(function() {
|
|
1376
|
+
L(this, { font: { underline: ke.getUnderline() !== ut.UnderlineStyle.DoubleAccounting ? ut.UnderlineStyle.DoubleAccounting : ut.UnderlineStyle.None } });
|
|
1377
|
+
}).update({ state: ke.getUnderline() === ut.UnderlineStyle.DoubleAccounting }), u.getCommand("formatSuperscriptToggle").updateCallback(function() {
|
|
1378
|
+
L(this, { font: { verticalAlign: ke.getVerticalAlignment() !== ut.VerticalAlignment.Super ? ut.VerticalAlignment.Super : ut.VerticalAlignment.Baseline } });
|
|
1379
|
+
}).update({ state: ke.getVerticalAlignment() === ut.VerticalAlignment.Super }), u.getCommand("formatSubscriptToggle").updateCallback(function() {
|
|
1380
|
+
L(this, { font: { verticalAlign: ke.getVerticalAlignment() !== ut.VerticalAlignment.Sub ? ut.VerticalAlignment.Sub : ut.VerticalAlignment.Baseline } });
|
|
1381
|
+
}).update({ state: ke.getVerticalAlignment() === ut.VerticalAlignment.Sub });
|
|
1382
1382
|
const M = () => F === pe.Overflow.Visible;
|
|
1383
1383
|
u.getCommand("formatTextOverflowVisibleToggle").updateCallback(function() {
|
|
1384
1384
|
L(this, { alignment: { overflow: (M(), pe.Overflow.Visible) } });
|
|
@@ -1423,24 +1423,24 @@ All contents and formatting are removed.`, shortcut: { key: "Delete", modifiers:
|
|
|
1423
1423
|
u.getCommand("formatAlignBottomToggle").updateCallback(function() {
|
|
1424
1424
|
L(this, { alignment: { vertical: (ie(), pe.VerticalAlignment.Bottom) } });
|
|
1425
1425
|
}).update({ state: ie });
|
|
1426
|
-
const
|
|
1426
|
+
const de = function() {
|
|
1427
1427
|
return X === pe.VerticalAlignment.Justify;
|
|
1428
1428
|
};
|
|
1429
1429
|
u.getCommand("formatAlignJustifyVerticalToggle").updateCallback(function() {
|
|
1430
|
-
L(this, { alignment: { vertical:
|
|
1431
|
-
}).update({ state:
|
|
1430
|
+
L(this, { alignment: { vertical: de() ? pe.VerticalAlignment.Bottom : pe.VerticalAlignment.Justify } });
|
|
1431
|
+
}).update({ state: de });
|
|
1432
1432
|
const ce = function() {
|
|
1433
1433
|
return X === pe.VerticalAlignment.Distributed;
|
|
1434
1434
|
};
|
|
1435
1435
|
u.getCommand("formatAlignDistributedVerticalToggle").updateCallback(function() {
|
|
1436
1436
|
L(this, { alignment: { vertical: ce() ? pe.VerticalAlignment.Bottom : pe.VerticalAlignment.Distributed } });
|
|
1437
1437
|
}).update({ state: ce });
|
|
1438
|
-
const
|
|
1438
|
+
const Re = function() {
|
|
1439
1439
|
return D === pe.HorizontalAlignment.Left;
|
|
1440
1440
|
};
|
|
1441
1441
|
u.getCommand("formatAlignLeftToggle").updateCallback(function() {
|
|
1442
|
-
L(this, { alignment: { horizontal:
|
|
1443
|
-
}).update({ state:
|
|
1442
|
+
L(this, { alignment: { horizontal: Re() ? pe.HorizontalAlignment.General : pe.HorizontalAlignment.Left } });
|
|
1443
|
+
}).update({ state: Re });
|
|
1444
1444
|
const fe = function() {
|
|
1445
1445
|
return D === pe.HorizontalAlignment.Center;
|
|
1446
1446
|
};
|
|
@@ -1454,13 +1454,13 @@ All contents and formatting are removed.`, shortcut: { key: "Delete", modifiers:
|
|
|
1454
1454
|
const Pe = { alignment: { horizontal: ve() ? pe.HorizontalAlignment.General : pe.HorizontalAlignment.CenterContinuous, rotation: null } };
|
|
1455
1455
|
L(this, Pe);
|
|
1456
1456
|
}).update({ state: ve });
|
|
1457
|
-
const
|
|
1457
|
+
const Me = function() {
|
|
1458
1458
|
return D === pe.HorizontalAlignment.Fill;
|
|
1459
1459
|
};
|
|
1460
1460
|
u.getCommand("formatAlignFillToggle").updateCallback(function() {
|
|
1461
|
-
const Pe = { alignment: { horizontal:
|
|
1461
|
+
const Pe = { alignment: { horizontal: Me() ? pe.HorizontalAlignment.General : pe.HorizontalAlignment.Fill, rotation: null } };
|
|
1462
1462
|
L(this, Pe);
|
|
1463
|
-
}).update({ state:
|
|
1463
|
+
}).update({ state: Me });
|
|
1464
1464
|
const We = function() {
|
|
1465
1465
|
return D === pe.HorizontalAlignment.Distributed;
|
|
1466
1466
|
};
|
|
@@ -1500,7 +1500,7 @@ All contents and formatting are removed.`, shortcut: { key: "Delete", modifiers:
|
|
|
1500
1500
|
const qt = await Promise.resolve(l?.showBusy?.(wt.label()));
|
|
1501
1501
|
try {
|
|
1502
1502
|
const Qt = Ft.getSelectedRanges();
|
|
1503
|
-
if (Qt.merge({ orientations: it, discardMultipleValues: Mt }), it ===
|
|
1503
|
+
if (Qt.merge({ orientations: it, discardMultipleValues: Mt }), it === Ce.Orientations.Both) {
|
|
1504
1504
|
const hn = { alignment: { horizontal: pe.HorizontalAlignment.Center } };
|
|
1505
1505
|
Qt.getStyle().update(hn);
|
|
1506
1506
|
}
|
|
@@ -1535,11 +1535,11 @@ All contents and formatting are removed.`, shortcut: { key: "Delete", modifiers:
|
|
|
1535
1535
|
});
|
|
1536
1536
|
};
|
|
1537
1537
|
u.getCommand("mergeToggle").updateCallback(function() {
|
|
1538
|
-
Ct.isSingleCell(t.getSelectedRange().getCoords()) || (y ? g(this) : M(
|
|
1538
|
+
Ct.isSingleCell(t.getSelectedRange().getCoords()) || (y ? g(this) : M(Ce.Orientations.Both, this));
|
|
1539
1539
|
}).update({ state: y, disabled: !Be || s }), u.getCommand("mergeHorizontal").updateCallback(function() {
|
|
1540
|
-
M(
|
|
1540
|
+
M(Ce.Orientations.Column, this);
|
|
1541
1541
|
}).update({ disabled: !Be || s }), u.getCommand("mergeVertical").updateCallback(function() {
|
|
1542
|
-
M(
|
|
1542
|
+
M(Ce.Orientations.Row, this);
|
|
1543
1543
|
}).update({ disabled: !Be }), u.getCommand("unmerge").updateCallback(function() {
|
|
1544
1544
|
g(this);
|
|
1545
1545
|
}).update({ disabled: !y || !Be || s });
|
|
@@ -1562,30 +1562,30 @@ All contents and formatting are removed.`, shortcut: { key: "Delete", modifiers:
|
|
|
1562
1562
|
});
|
|
1563
1563
|
}).update(z), u.getCommand("autoFitRows").updateCallback(function() {
|
|
1564
1564
|
V(this, (it) => {
|
|
1565
|
-
it.getSelectedRanges().autoFit({ orientations:
|
|
1565
|
+
it.getSelectedRanges().autoFit({ orientations: Ce.Orientations.Row });
|
|
1566
1566
|
});
|
|
1567
1567
|
}).update(z), u.getCommand("autoFitColumns").updateCallback(function() {
|
|
1568
1568
|
V(this, (it) => {
|
|
1569
|
-
it.getSelectedRanges().autoFit({ orientations:
|
|
1569
|
+
it.getSelectedRanges().autoFit({ orientations: Ce.Orientations.Column });
|
|
1570
1570
|
});
|
|
1571
1571
|
}).update(z);
|
|
1572
|
-
let h = !1, B = 0, G = !1, J = !1, ie = 0,
|
|
1573
|
-
!d || s || Ke || (h = d.isEntireColumnsAny(), h && !d.isEntireColumns() ? G = !0 : B = d.getColumnCount(), J = d.isEntireRowsAny(), J && !d.isEntireRows() ?
|
|
1572
|
+
let h = !1, B = 0, G = !1, J = !1, ie = 0, de = !1;
|
|
1573
|
+
!d || s || Ke || (h = d.isEntireColumnsAny(), h && !d.isEntireColumns() ? G = !0 : B = d.getColumnCount(), J = d.isEntireRowsAny(), J && !d.isEntireRows() ? de = !0 : ie = d.getRowCount());
|
|
1574
1574
|
const ce = { disabled: s || d && d.getCount() !== 1 };
|
|
1575
1575
|
u.getCommand("sortAscending").update(ce), u.getCommand("sortDescending").update(ce);
|
|
1576
|
-
const
|
|
1576
|
+
const Re = { disabled: h || J || s || Ke }, fe = h || s || Ke || de;
|
|
1577
1577
|
fe && (B = 1);
|
|
1578
1578
|
const ve = J || s || Ke || G;
|
|
1579
1579
|
ve && (ie = 1);
|
|
1580
|
-
let
|
|
1581
|
-
B > 1 && (rt = We = B + " ", Pe = He = "s"), ie > 1 && (dt = tt = ie + " ", St = $e = "s"), w.getMode()?.key === "copy" ? (
|
|
1580
|
+
let Me = "", We = "", He = "", tt = "", $e = "", rt = "", Pe = "", dt = "", St = "";
|
|
1581
|
+
B > 1 && (rt = We = B + " ", Pe = He = "s"), ie > 1 && (dt = tt = ie + " ", St = $e = "s"), w.getMode()?.key === "copy" ? (Me = tt = We = "Copied ", He = $e = "s") : w.getMode()?.key === "cut" && (Me = tt = We = "Cut ", He = $e = "s");
|
|
1582
1582
|
let zt = "", Pt = "";
|
|
1583
1583
|
if (d) {
|
|
1584
|
-
const it = d.getDefaultShiftOrientation() ===
|
|
1584
|
+
const it = d.getDefaultShiftOrientation() === Ce.Orientation.Column;
|
|
1585
1585
|
zt = ` (${it ? "Shift Right" : "Shift Down"})`, Pt = ` (${it ? "Shift Left" : "Shift up"})`, u.getCommand("deleteCells").update({ label: `Delete Cells${Pt}` });
|
|
1586
1586
|
}
|
|
1587
|
-
u.getCommand("insertCells").update({ label: `Insert ${
|
|
1588
|
-
}, [
|
|
1587
|
+
u.getCommand("insertCells").update({ label: `Insert ${Me}Cells${zt}`, scopedLabels: { insertCells: `${Me}At Selection` } }), u.getCommand("insertCellsShiftRight").update(Re), u.getCommand("insertCellsShiftDown").update(Re), u.getCommand("deleteCellsShiftUp").update(Re), u.getCommand("deleteCellsShiftLeft").update(Re), u.getCommand("insertRows").update({ label: `Insert ${tt}Row${$e}`, scopedLabels: { insertCells: `${tt}Row${$e}` }, disabled: ve }), u.getCommand("insertRowsAfter").update({ label: `Insert ${tt}Row${$e} Below`, disabled: ve }), u.getCommand("insertColumns").update({ label: `Insert ${We}Column${He}`, scopedLabels: { insertCells: `${We}Column${He}` }, disabled: fe }), u.getCommand("insertColumnsAfter").update({ label: `Insert ${We}Column${He} After`, disabled: fe }), u.getCommand("deleteRows").update({ label: `Delete ${dt}Row${St}`, scopedLabels: { deleteCells: `${dt}Row${St}` }, disabled: ve }), u.getCommand("deleteColumns").update({ label: `Delete ${rt}Column${Pe}`, scopedLabels: { deleteCells: `${rt}Column${Pe}` }, disabled: fe });
|
|
1588
|
+
}, [qe, Be, Ke, d, w, l, xe]), be(() => {
|
|
1589
1589
|
const s = t.getProtection(), y = t.getProtection().isLocked(), M = !s.isFormatCellsAllowed(), g = { disabled: M };
|
|
1590
1590
|
u.getCommand("protectionSheetToggle").updateCallback(async (B, G) => {
|
|
1591
1591
|
let J = null;
|
|
@@ -1593,9 +1593,9 @@ All contents and formatting are removed.`, shortcut: { key: "Delete", modifiers:
|
|
|
1593
1593
|
if (y) {
|
|
1594
1594
|
let ie = null;
|
|
1595
1595
|
if (s.hasPassword()) {
|
|
1596
|
-
const
|
|
1597
|
-
if (
|
|
1598
|
-
ie =
|
|
1596
|
+
const de = await l?.showInputOptions({ title: "Password Required", description: "Enter a password to unprotected", options: ["Unprotect", "Cancel"], defaultOption: "Unprotect", inputType: "password" });
|
|
1597
|
+
if (de.option !== "Unprotect") return;
|
|
1598
|
+
ie = de.input;
|
|
1599
1599
|
}
|
|
1600
1600
|
J = await Promise.resolve(l?.showBusy?.(G.label())), await s.unlock(ie);
|
|
1601
1601
|
} else J = await Promise.resolve(l?.showBusy?.(G.label())), await s.lock();
|
|
@@ -1606,7 +1606,7 @@ All contents and formatting are removed.`, shortcut: { key: "Delete", modifiers:
|
|
|
1606
1606
|
}).update({ state: y, label: () => y ? "Unprotect Sheet" : "Protect Sheet", scopedLabels: { sheet: y ? "Unprotect" : "Protect" } }), u.getCommand("deleteTable").update(g), u.getCommand("sortAscending").update(g), u.getCommand("sortDescending").update(g), u.getCommand("sortCustom")?.update(g), u.getCommand("updateComments").update(g), u.getCommand("deleteComments").update(g), u.getCommand("insertChart")?.update(g), u.getCommand("insertImageFromFile").update(g), u.getCommand("insertImageFromURL").update(g), u.getCommand("formatBorder").update(g), u.getCommand("formatFillColor").update(g), u.getCommand("formatFontColor").update(g), u.getCommand("formatBoldToggle").update(g), u.getCommand("formatItalicToggle").update(g), u.getCommand("formatUnderlinedToggle").update(g), u.getCommand("formatStrikeThroughToggle").update(g), u.getCommand("formatSuperscriptToggle").update(g), u.getCommand("formatSubscriptToggle").update(g), u.getCommand("formatAlignTopToggle").update(g), u.getCommand("formatTextOverflowVisibleToggle").update(g), u.getCommand("formatTextOverflowWrapToggle").update(g), u.getCommand("formatTextOverflowClipToggle").update(g), u.getCommand("formatTextOverflowShrinkToggle").update(g), u.getCommand("formatAlignMiddleToggle").update(g), u.getCommand("formatAlignBottomToggle").update(g), u.getCommand("formatAlignDistributedVerticalToggle").update(g), u.getCommand("formatAlignJustifyVerticalToggle").update(g), u.getCommand("formatAlignLeftToggle").update(g), u.getCommand("formatAlignCenterToggle").update(g), u.getCommand("formatAlignRightToggle").update(g), u.getCommand("formatAlignJustifyToggle").update(g), u.getCommand("formatAlignCenterContinuousToggle").update(g), u.getCommand("formatAlignDistributedHorizontalToggle").update(g), u.getCommand("formatAlignFillToggle").update(g), u.getCommand("formatFontSizeIncrease").update(g), u.getCommand("formatFontSizeDecrease").update(g), u.getCommand("formatFontFamily").update(g), u.getCommand("formatFontSize").update(g), u.getCommand("formatNumberFormat").update(g), u.getCommand("formatNumberFormatGeneralStyle").update(g), u.getCommand("formatNumberFormatNumberStyle").update(g), u.getCommand("formatNumberFormatTimeStyle").update(g), u.getCommand("formatNumberFormatDateStyle").update(g), u.getCommand("formatNumberFormatAccountingStyle").update(g), u.getCommand("formatNumberFormatPercentStyle").update(g), u.getCommand("formatNumberFormatScientificStyle").update(g), u.getCommand("formatNumberFormatCommaStyle").update(g), u.getCommand("formatNumberFormatIncreaseDecimal").update(g), u.getCommand("formatNumberFormatDecreaseDecimal").update(g), u.getCommand("hideColumns").update(g), u.getCommand("unhideColumns").update(g), u.getCommand("hideRows").update(g), u.getCommand("unhideRows").update(g), u.getCommand("insertFunctionSum").update(g), u.getCommand("insertFunctionAverage").update(g), u.getCommand("insertFunctionCount").update(g), u.getCommand("insertFunctionMax").update(g), u.getCommand("insertFunctionMin").update(g), u.getCommand("insertFunction").update(g), u.getCommand("startEditCurrentTime").update(g), u.getCommand("startEditCurrentDate").update(g), u.getCommand("startEditValueAbove").update(g), u.getCommand("fillDown").update(g), u.getCommand("fillRight").update(g), u.getCommand("fillUp").update(g), u.getCommand("fillLeft").update(g), u.getCommand("formatCellStyle").update(g), u.getCommand("formatTableStyle").update(g), u.getCommand("formatPainterToggle").update(g), u.getCommand("formatBorderAddOutline").update(g), u.getCommand("formatBorderClearOutline").update(g), u.getCommand("formatIndentDecrease").update(g), u.getCommand("formatIndentIncrease").update(g), u.getCommand("clearContents").update(g), u.getCommand("clearFormats").update(g), u.getCommand("clearAll").update(g), u.getCommand("clearComments").update(g), u.getCommand("clearHyperlinks").update(g), u.getCommand("autoFilterClear").update(g), u.getCommand("autoFilterReapply").update(g);
|
|
1607
1607
|
const z = D === pe.HorizontalAlignment.CenterContinuous || D === pe.HorizontalAlignment.Fill, h = { disabled: M || z };
|
|
1608
1608
|
u.getCommand("formatTextRotate0").update(h), u.getCommand("formatTextRotate45").update(h), u.getCommand("formatTextRotate90").update(h), u.getCommand("formatTextRotate270").update(h), u.getCommand("formatTextRotate315").update(h), u.getCommand("formatTextRotateCustom").update(h), u.getCommand("formatTextRotateVertical").update(h);
|
|
1609
|
-
}, [
|
|
1609
|
+
}, [qe]), u;
|
|
1610
1610
|
}
|
|
1611
1611
|
var br, qr;
|
|
1612
1612
|
(function() {
|
|
@@ -1638,28 +1638,28 @@ var br, qr;
|
|
|
1638
1638
|
br = function(b, T, E) {
|
|
1639
1639
|
var j, H, R, O, v, w, q = 0, N = !1, x = !1, k = !0;
|
|
1640
1640
|
if (typeof b != "function") throw new TypeError("Expected a function");
|
|
1641
|
-
function W(
|
|
1641
|
+
function W(ee) {
|
|
1642
1642
|
var I = j, A = H;
|
|
1643
|
-
return j = H = void 0, q =
|
|
1643
|
+
return j = H = void 0, q = ee, O = b.apply(A, I);
|
|
1644
1644
|
}
|
|
1645
|
-
function U(
|
|
1646
|
-
var I =
|
|
1647
|
-
return w === void 0 || I >= T || I < 0 || x &&
|
|
1645
|
+
function U(ee) {
|
|
1646
|
+
var I = ee - w;
|
|
1647
|
+
return w === void 0 || I >= T || I < 0 || x && ee - q >= R;
|
|
1648
1648
|
}
|
|
1649
1649
|
function V() {
|
|
1650
|
-
var
|
|
1651
|
-
if (U(
|
|
1650
|
+
var ee = d();
|
|
1651
|
+
if (U(ee)) return L(ee);
|
|
1652
1652
|
v = setTimeout(V, (function(I) {
|
|
1653
1653
|
var A = T - (I - w);
|
|
1654
1654
|
return x ? C(A, R - (I - q)) : A;
|
|
1655
|
-
})(
|
|
1655
|
+
})(ee));
|
|
1656
1656
|
}
|
|
1657
|
-
function L(
|
|
1658
|
-
return v = void 0, k && j ? W(
|
|
1657
|
+
function L(ee) {
|
|
1658
|
+
return v = void 0, k && j ? W(ee) : (j = H = void 0, O);
|
|
1659
1659
|
}
|
|
1660
1660
|
function P() {
|
|
1661
|
-
var
|
|
1662
|
-
if (j = arguments, H = this, w =
|
|
1661
|
+
var ee = d(), I = U(ee);
|
|
1662
|
+
if (j = arguments, H = this, w = ee, I) {
|
|
1663
1663
|
if (v === void 0) return (function(A) {
|
|
1664
1664
|
return q = A, v = setTimeout(V, T), N ? W(A) : O;
|
|
1665
1665
|
})(w);
|
|
@@ -1760,7 +1760,7 @@ function Tr(e, t) {
|
|
|
1760
1760
|
const fi = ft(yt((e, t) => {
|
|
1761
1761
|
const { style: n = at.EmptyCssProperties, orientation: r, sheet: i, onShowTooltip: o, onCloseTooltip: l, onScrollOffset: c, showCustomScrollButtons: p = !1, offset: a = 0, totalSize: C = 0, viewportSize: d = 0, ...m } = e;
|
|
1762
1762
|
if (!i) throw new Error("SheetScrollBar needs a sheet model");
|
|
1763
|
-
const [S] = cn(), b = le(o, [o]), T = le(l, [l]), E =
|
|
1763
|
+
const [S] = cn(), b = le(o, [o]), T = le(l, [l]), E = Se(() => j === null && H === null ? null : (ue) => {
|
|
1764
1764
|
Tr(j, ue), Tr(H, ue);
|
|
1765
1765
|
}, [j = S, H = t]);
|
|
1766
1766
|
var j, H;
|
|
@@ -1771,9 +1771,9 @@ const fi = ft(yt((e, t) => {
|
|
|
1771
1771
|
const ue = i.getView().getFreezePanes();
|
|
1772
1772
|
return r === sn.Vertical ? ue.coords.rowIndex === 0 ? { shift: 0, scroll: 0 } : { shift: i.getRowHeaders().findOffset(ue.coords.rowIndex) - ue.topLeft.top, scroll: ue.topLeft.top } : ue.coords.colIndex === 0 ? { shift: 0, scroll: 0 } : { shift: i.getColumnHeaders().findOffset(ue.coords.colIndex) - ue.topLeft.left, scroll: ue.topLeft.left };
|
|
1773
1773
|
}, [w, q] = me(v), [N, x] = me(null), [k, W] = me(!1), U = r === sn.Vertical ? i.getRowHeaders() : i.getColumnHeaders(), V = () => {
|
|
1774
|
-
const ue = i.getUsedRange()?.getCoords() ?? Ct.EmptyRange,
|
|
1775
|
-
return { colIndex: Math.max(ue.colEnd,
|
|
1776
|
-
}, [L, P] = me(V),
|
|
1774
|
+
const ue = i.getUsedRange()?.getCoords() ?? Ct.EmptyRange, Ie = i.getSelection().getCoords().cell;
|
|
1775
|
+
return { colIndex: Math.max(ue.colEnd, Ie.colIndex), rowIndex: Math.max(ue.rowEnd, Ie.rowIndex) };
|
|
1776
|
+
}, [L, P] = me(V), ee = L ? (r === sn.Vertical ? L.rowIndex : L.colIndex) + 1 : 0, I = () => {
|
|
1777
1777
|
const ue = V();
|
|
1778
1778
|
Ct.isEqualCells(L, ue) || P(ue);
|
|
1779
1779
|
};
|
|
@@ -1786,18 +1786,18 @@ const fi = ft(yt((e, t) => {
|
|
|
1786
1786
|
const ue = U.getTextAt(U.findIndex(R / (i.getView().getZoomScale() / 100) + w.scroll + w.shift));
|
|
1787
1787
|
W(!0), b?.({ ...N, display: (r === sn.Vertical ? "Row" : "Column") + ": " + ue });
|
|
1788
1788
|
}, [a, R, w, r, N, U, k, i]);
|
|
1789
|
-
const A = le((ue,
|
|
1789
|
+
const A = le((ue, Ie, Je) => {
|
|
1790
1790
|
O(ue);
|
|
1791
|
-
const Ye = ue + w.scroll, Fe =
|
|
1791
|
+
const Ye = ue + w.scroll, Fe = Ie + w.shift, ge = Je + w.shift + w.scroll;
|
|
1792
1792
|
c?.(Ye, Fe, ge);
|
|
1793
|
-
}, [c, w]),
|
|
1794
|
-
return f(sl, { ref: E, style: n, offset:
|
|
1793
|
+
}, [c, w]), se = a - w.scroll, we = d - w.shift, Ge = C - (w.shift + w.scroll), Ae = U.findOffset(ee) * (i.getView().getZoomScale() / 100) - (w.scroll + w.shift);
|
|
1794
|
+
return f(sl, { ref: E, style: n, offset: se, viewportSize: we, totalSize: Ge, orientation: r, showCustomScrollButtons: p, onMouseDown: (ue) => {
|
|
1795
1795
|
x({ anchor: { x: ue.clientX, y: ue.clientY } }), ue.preventDefault();
|
|
1796
1796
|
}, onScrollOffset: A, onMouseOut: () => {
|
|
1797
1797
|
x(null);
|
|
1798
1798
|
}, onMouseUp: () => {
|
|
1799
1799
|
x(null);
|
|
1800
|
-
}, minSize:
|
|
1800
|
+
}, minSize: Ae, ...m });
|
|
1801
1801
|
}));
|
|
1802
1802
|
fi.displayName = "SheetScrollbar";
|
|
1803
1803
|
const Mr = (e, t, n = null) => {
|
|
@@ -1808,45 +1808,45 @@ const Mr = (e, t, n = null) => {
|
|
|
1808
1808
|
}
|
|
1809
1809
|
return r;
|
|
1810
1810
|
}, Dr = ft(yt((e, t) => {
|
|
1811
|
-
const { sheetHeader: n, gridRef: r, sheetElement: i, commands: o, oppositeSize: l = 30, containerWidth: c, containerHeight: p, headerText: a, freezeStart: C, gridStyle: d, verticalPadding: m, horizontalPadding: S, onSheetContextMenu: b, onResizeHeadersStart: T, onResizeHeaders: E, onResizeHeadersEnd: j, onResizeHeadersDown: H, onResizeHeadersUp: R, scrollPoint: O, onSelectionStart: v, onSelectionEnd: w } = e, q =
|
|
1811
|
+
const { sheetHeader: n, gridRef: r, sheetElement: i, commands: o, oppositeSize: l = 30, containerWidth: c, containerHeight: p, headerText: a, freezeStart: C, gridStyle: d, verticalPadding: m, horizontalPadding: S, onSheetContextMenu: b, onResizeHeadersStart: T, onResizeHeaders: E, onResizeHeadersEnd: j, onResizeHeadersDown: H, onResizeHeadersUp: R, scrollPoint: O, onSelectionStart: v, onSelectionEnd: w } = e, q = Se(() => n.getOrientation(), [n]), N = Te(null), [x, k] = dn((F) => F + 1, 0), [W, U] = dn((F) => F + 1, 0), V = n?.getSheet(), L = Te(!1);
|
|
1812
1812
|
Bt(() => {
|
|
1813
1813
|
L.current = !0;
|
|
1814
1814
|
}, [n]);
|
|
1815
|
-
const P =
|
|
1816
|
-
const F = q ===
|
|
1815
|
+
const P = Se(() => n.getEntireRange().getCoords().max + 1, [n]), ee = Se(() => {
|
|
1816
|
+
const F = q === Ce.Orientation.Column;
|
|
1817
1817
|
return { left: F ? O.left : 0, top: F ? 0 : O.top };
|
|
1818
|
-
}, [O]), [I, A] = me(V?.getView().getZoomScale() / 100), [
|
|
1818
|
+
}, [O]), [I, A] = me(V?.getView().getZoomScale() / 100), [se, we] = me(null);
|
|
1819
1819
|
gt(n, { onSizesChange: (F) => {
|
|
1820
|
-
A(V?.getView().getZoomScale() / 100),
|
|
1820
|
+
A(V?.getView().getZoomScale() / 100), xe(re());
|
|
1821
1821
|
} });
|
|
1822
1822
|
const Ge = Ze(() => {
|
|
1823
1823
|
N.current?.invalidate(), U();
|
|
1824
|
-
}, []),
|
|
1824
|
+
}, []), Ae = Ze(Xe.debounce(() => {
|
|
1825
1825
|
Ge();
|
|
1826
|
-
}, 10), []), [ue,
|
|
1826
|
+
}, 10), []), [ue, Ie] = me(null);
|
|
1827
1827
|
gt(n.getSheet(), { onSelectionChange() {
|
|
1828
|
-
|
|
1828
|
+
Ie(V?.getSelection().getCoords()), Ae();
|
|
1829
1829
|
}, onProtectionChange() {
|
|
1830
1830
|
Ge();
|
|
1831
1831
|
}, onViewChange() {
|
|
1832
|
-
|
|
1832
|
+
Ae();
|
|
1833
1833
|
} }), Bt(() => {
|
|
1834
|
-
|
|
1834
|
+
xe(re());
|
|
1835
1835
|
}, [q, I, l]), Bt(() => {
|
|
1836
|
-
we(null), A(n?.getSheet().getView().getZoomScale() / 100),
|
|
1836
|
+
we(null), A(n?.getSheet().getView().getZoomScale() / 100), xe(re());
|
|
1837
1837
|
}, [n]);
|
|
1838
1838
|
const Je = Ze((F) => n.at(F)?.isHidden() || n.at(F)?.getSize() === 0, [n]), Ye = Ze((F, _) => n.hiddenHeadersAt(F, _), [Je]), Fe = le((F) => n.isSelected(F), [n]), ge = le((F) => n.isSelectedAll(F), [n]), $ = Ze(() => n.getMinSize(), [n]), Le = Ze(() => n.getMaxSize(), [n]), ye = le((F, _, s) => {
|
|
1839
1839
|
_ /= I;
|
|
1840
1840
|
const y = { size: _ = Math.max($(), Math.min(Xe.roundAccurately(_, $()), Le())), hidden: !1 }, M = [];
|
|
1841
1841
|
if (_ <= 0 && (y.hidden = !0, y.size = s), M.push({ address: { min: F, max: F }, update: y }), _ < 0) {
|
|
1842
|
-
const g = q ===
|
|
1842
|
+
const g = q === Ce.Orientation.Column, z = g ? he.getColOffset : he.getRowOffset, h = g ? he.getColIndex : he.getRowIndex, B = z(F);
|
|
1843
1843
|
let G = h(B + _);
|
|
1844
1844
|
const J = z(G);
|
|
1845
1845
|
J === B + _ ? G-- : M.push({ address: { min: G, max: G }, update: { size: B - J + _ } }), F - G > 1 && M.push({ address: { min: G + 1, max: F - 1 }, update: { hidden: !0 } });
|
|
1846
1846
|
}
|
|
1847
1847
|
n.updateHeaderPairs(M), E?.(F, _, s);
|
|
1848
1848
|
}, [x, n, I, E]), Z = le((F, _, s) => {
|
|
1849
|
-
const y = q ===
|
|
1849
|
+
const y = q === Ce.Orientation.Column;
|
|
1850
1850
|
let M = null, g = { min: F, max: F };
|
|
1851
1851
|
if (n.isSelectedAll(F)) {
|
|
1852
1852
|
const z = n.getSelectedRuns();
|
|
@@ -1861,11 +1861,11 @@ const Mr = (e, t, n = null) => {
|
|
|
1861
1861
|
}
|
|
1862
1862
|
j?.(F, _, M);
|
|
1863
1863
|
}, [x, n, j]), K = le((F, _) => {
|
|
1864
|
-
const s = q ===
|
|
1864
|
+
const s = q === Ce.Orientation.Column;
|
|
1865
1865
|
T(F, _, `Resize ${s ? "Column" : "Row"}(s)`);
|
|
1866
|
-
}, [T]),
|
|
1866
|
+
}, [T]), oe = le((F) => {
|
|
1867
1867
|
let _ = !1;
|
|
1868
|
-
const s = q ===
|
|
1868
|
+
const s = q === Ce.Orientation.Column, y = n.getSheet().getEntireRange().getCoords(), M = [], g = n.getSelectedRuns(), z = (h) => {
|
|
1869
1869
|
let B;
|
|
1870
1870
|
B = s ? { colStart: h.min, rowStart: y.rowStart, colEnd: h.max, rowEnd: y.rowEnd } : { colStart: y.colStart, rowStart: h.min, colEnd: y.colEnd, rowEnd: h.max }, M.push(B);
|
|
1871
1871
|
};
|
|
@@ -1873,19 +1873,19 @@ const Mr = (e, t, n = null) => {
|
|
|
1873
1873
|
const B = g[h];
|
|
1874
1874
|
B.value.isSelectedAll && (B.min <= F && B.max >= F && (_ = !0), z(B));
|
|
1875
1875
|
}
|
|
1876
|
-
if (_ || z({ min: F, max: F }), n.getSheet().getRanges(M).autoFit({ orientations: s ?
|
|
1876
|
+
if (_ || z({ min: F, max: F }), n.getSheet().getRanges(M).autoFit({ orientations: s ? Ce.Orientations.Column : Ce.Orientations.Row }), Je(F)) {
|
|
1877
1877
|
const h = { hidden: null }, B = Mr(g, h);
|
|
1878
1878
|
_ || B.push({ address: F, update: h }), n.updateHeaderPairs(B);
|
|
1879
1879
|
}
|
|
1880
1880
|
j?.(F, null, "Resize Column(s)");
|
|
1881
1881
|
}, [x, n, j, Je]), re = () => {
|
|
1882
|
-
const F = q ===
|
|
1882
|
+
const F = q === Ce.Orientation.Column;
|
|
1883
1883
|
return { getColOffset: (_) => F ? n.findOffset(_) : _ === 0 ? 0 : l / I, getColIndex: (_) => F ? n.findIndex(_) : 0, getRowOffset: (_) => F ? _ === 0 ? 0 : l / I : n.findOffset(_), getRowIndex: (_) => F ? 0 : n.findIndex(_) };
|
|
1884
|
-
}, [he,
|
|
1884
|
+
}, [he, xe] = me(() => re()), ae = Ze((F, _) => F.nativeEvent.which !== li.Right || !ge(q === Ce.Orientation.Column ? _.colIndex : _.rowIndex), [q, ge]), qe = le((F) => {
|
|
1885
1885
|
i.focusSheet();
|
|
1886
|
-
}, [i]),
|
|
1886
|
+
}, [i]), De = le((F) => {
|
|
1887
1887
|
V?.getSelection().updateCoords(F);
|
|
1888
|
-
}, [V]), { ...Ne } = si({ gridRef: r, commands: null, layout: he, selection: ue, fillHandleBorderColor: d.body.fill, selectionBackgroundColor: d.selection.fill, selectionBorderColor: d.selection.strokeFill, selectionRemoveBackgroundColor: d.selectionRemove.fill, selectionRemoveBorderColor: d.selectionRemove.strokeFill, disableTouchSelection: !0, onSelectionChange:
|
|
1888
|
+
}, [V]), { ...Ne } = si({ gridRef: r, commands: null, layout: he, selection: ue, fillHandleBorderColor: d.body.fill, selectionBackgroundColor: d.selection.fill, selectionBorderColor: d.selection.strokeFill, selectionRemoveBackgroundColor: d.selectionRemove.fill, selectionRemoveBorderColor: d.selectionRemove.strokeFill, disableTouchSelection: !0, onSelectionChange: De, canSelectionSpanMergedCells: (F) => {
|
|
1889
1889
|
const _ = V.getRange(F);
|
|
1890
1890
|
return _.isEntireColumns() || _.isEntireRows();
|
|
1891
1891
|
} }), u = le(() => {
|
|
@@ -1894,10 +1894,10 @@ const Mr = (e, t, n = null) => {
|
|
|
1894
1894
|
F && F.setAdjusting(F.getCoords());
|
|
1895
1895
|
}, [V, v]), Be = le(async () => {
|
|
1896
1896
|
V?.getSelection().setAdjusting(null), w?.();
|
|
1897
|
-
}, [V, w]), { ...st } = ql({ orientation: q, headerCount: P, gridRef: N, gridMainRef: r, newSelection: Ne?.newSelection, modifySelection: Ne?.modifySelection, appendSelection: Ne?.appendSelection, clearSelections: Ne?.clearSelections, pointerDownInterceptor:
|
|
1897
|
+
}, [V, w]), { ...st } = ql({ orientation: q, headerCount: P, gridRef: N, gridMainRef: r, newSelection: Ne?.newSelection, modifySelection: Ne?.modifySelection, appendSelection: Ne?.appendSelection, clearSelections: Ne?.clearSelections, pointerDownInterceptor: ae, onPointerUp: qe, onDragStart: u, onDragEnd: Be }), Ke = d.selection?.strokeFill;
|
|
1898
1898
|
be(() => {
|
|
1899
1899
|
if (!N.current) return void we(null);
|
|
1900
|
-
const F = q ===
|
|
1900
|
+
const F = q === Ce.Orientation.Column, _ = n.getSelectedRuns(), s = n.isProtected() ? null : ye, y = (g, z, h) => {
|
|
1901
1901
|
if (h) return f("div", F ? { style: { position: "absolute", borderBottom: `${d.headerSelection.strokeWidth}px solid ${Ke}`, pointerEvents: "none", top: `${at.boundPixel(-d.headerSelection.strokeWidth / 2)}px`, left: `${at.boundPixel(h.x - d.headerSelection.strokeWidth)}px`, width: `${at.boundPixel(h.width + d.headerSelection.strokeWidth + 1, !0)}px`, height: l + d.headerSelection.strokeWidth - 0.5 + "px" } } : { style: { position: "absolute", borderRight: `${d.headerSelection.strokeWidth}px solid ${Ke}`, pointerEvents: "none", top: `${at.boundPixel(h.y - d.headerSelection.strokeWidth)}px`, left: `${at.boundPixel(-d.headerSelection.strokeWidth / 2)}px`, width: l + d.headerSelection.strokeWidth - 0.5 + "px", height: `${at.boundPixel(h.height + d.headerSelection.strokeWidth + 1, !0)}px` } }, g);
|
|
1902
1902
|
}, M = (g, z, h) => {
|
|
1903
1903
|
const B = { x: 0, y: 0, width: 0, height: 0 };
|
|
@@ -1920,23 +1920,23 @@ const Mr = (e, t, n = null) => {
|
|
|
1920
1920
|
let J = [];
|
|
1921
1921
|
const ie = [];
|
|
1922
1922
|
for (let ve = 0; ve < B.length; ve++) {
|
|
1923
|
-
const
|
|
1924
|
-
if (!h || h.max <
|
|
1925
|
-
const rt = Xe.findEqualOrGreater(_,
|
|
1923
|
+
const Me = B[ve], We = ve < B.length - 1 ? B[ve + 1] : Me + Ye(Me + 1, !1) + 1, He = Me + 1 !== We;
|
|
1924
|
+
if (!h || h.max < Me) if (_.length > 0 && _[_.length - 1].max >= Me) {
|
|
1925
|
+
const rt = Xe.findEqualOrGreater(_, Me, (Pe) => Pe.max);
|
|
1926
1926
|
h = _[rt];
|
|
1927
1927
|
} else h = null;
|
|
1928
1928
|
let tt = !1, $e = !1;
|
|
1929
|
-
if (h?.value && (h.min <=
|
|
1929
|
+
if (h?.value && (h.min <= Me || h.min <= We && !He) && (tt = !0, $e = h.value.isSelectedAll), Me === G) {
|
|
1930
1930
|
let rt = !1, Pe = !1;
|
|
1931
|
-
h?.value && h.min <=
|
|
1931
|
+
h?.value && h.min <= Me && (rt = !0, Pe = h.value.isSelectedAll), Me > 0 && ie.push({ index: Me - 1, isNextHidden: He, isSelected: rt, isSelectedAll: Pe, disabledResize: !0 });
|
|
1932
1932
|
}
|
|
1933
|
-
if ($e && J.push(ie.length), ie.push({ index:
|
|
1933
|
+
if ($e && J.push(ie.length), ie.push({ index: Me, isHidden: ve === 0 && Ye(Me, !1) > 0, isNextHidden: He, isSelected: tt, isSelectedAll: $e, onDividerMouseDown: H, onDividerResizeStart: K, onDividerResize: s, onDividerMouseUp: R, onDividerResizeEnd: Z, onDividerAutoFit: oe }), He) {
|
|
1934
1934
|
let rt = !1, Pe = !1;
|
|
1935
|
-
if (h && h.min >=
|
|
1935
|
+
if (h && h.min >= Me && h.max <= We - 1 && h.value.isSelectedAll && J.push(ie.length), !(h?.value && h.max >= We)) if (_.length > 0 && _[_.length - 1].max >= We) {
|
|
1936
1936
|
const dt = Xe.findEqualOrGreater(_, We, (St) => St.max);
|
|
1937
1937
|
h = _[dt];
|
|
1938
1938
|
} else h = null;
|
|
1939
|
-
h?.value && h.min <= We && (rt = h.value.isSelected, Pe = h.value.isSelectedAll), We > 0 && ie.push({ index: We - 1, isHidden: !0, isSelected: rt, isSelectedAll: Pe, onDividerMouseDown: H, onDividerResizeStart: K, onDividerResize: s, onDividerMouseUp: R, onDividerResizeEnd: Z, onDividerAutoFit:
|
|
1939
|
+
h?.value && h.min <= We && (rt = h.value.isSelected, Pe = h.value.isSelectedAll), We > 0 && ie.push({ index: We - 1, isHidden: !0, isSelected: rt, isSelectedAll: Pe, onDividerMouseDown: H, onDividerResizeStart: K, onDividerResize: s, onDividerMouseUp: R, onDividerResizeEnd: Z, onDividerAutoFit: oe });
|
|
1940
1940
|
}
|
|
1941
1941
|
}
|
|
1942
1942
|
if (J.length > 0) {
|
|
@@ -1946,14 +1946,14 @@ const Mr = (e, t, n = null) => {
|
|
|
1946
1946
|
let tt = null;
|
|
1947
1947
|
F ? (tt = g.getRangeCoordsBounds({ rowStart: 0, rowEnd: 0, colStart: He, colEnd: He }), tt.x + tt.width > g.getBounds().width && (ve -= 1, ve === 0 && (ve = -1))) : (tt = g.getRangeCoordsBounds({ rowStart: He, rowEnd: He, colStart: 0, colEnd: 0 }), tt.y + tt.height > g.getBounds().height && (ve -= 1, ve === 0 && (ve = -1)));
|
|
1948
1948
|
}
|
|
1949
|
-
const
|
|
1949
|
+
const Me = _?.[_.length - 1], We = g.getAnchor();
|
|
1950
1950
|
if (We === "t" || We === "l") {
|
|
1951
1951
|
const He = ie[J[Math.max(0, J.length - 1)]];
|
|
1952
|
-
He.showTouchDivider =
|
|
1952
|
+
He.showTouchDivider = Me && Me.max <= He.index;
|
|
1953
1953
|
} else ve >= 0 && (ie[J[ve]].showTouchDivider = !0);
|
|
1954
1954
|
}
|
|
1955
|
-
const { header:
|
|
1956
|
-
for (let ve = 0; ve < ie.length; ve++) z.push(f(Sl, { orientation: q, view: g, headerStyle:
|
|
1955
|
+
const { header: de, headerSelect: ce, headerSelectAll: Re, headerHover: fe } = d ?? {};
|
|
1956
|
+
for (let ve = 0; ve < ie.length; ve++) z.push(f(Sl, { orientation: q, view: g, headerStyle: de, headerStyleSelect: ce, headerStyleSelectAll: Re, headerStyleHover: fe, disabled: n.isProtected(), ...ie[ve] }, `divider${ve}`));
|
|
1957
1957
|
return z;
|
|
1958
1958
|
}, (g) => {
|
|
1959
1959
|
const z = [];
|
|
@@ -1963,17 +1963,17 @@ const Mr = (e, t, n = null) => {
|
|
|
1963
1963
|
}, [W, !0, Ke, d, he, P, C, x, I]), be(() => {
|
|
1964
1964
|
N.current?.invalidate();
|
|
1965
1965
|
}, [x]);
|
|
1966
|
-
const Qe = le((F) => a ? a(F) : n.getTextAt(F), [a, n]),
|
|
1966
|
+
const Qe = le((F) => a ? a(F) : n.getTextAt(F), [a, n]), ne = le((F) => {
|
|
1967
1967
|
const { header: _, headerSelect: s, headerSelectAll: y, headerHover: M } = d ?? {}, { range: g, key: z, ...h } = F;
|
|
1968
|
-
return f(Cl, { orientation: q, index: q ===
|
|
1969
|
-
}, [x, P, d, I, n]),
|
|
1968
|
+
return f(Cl, { orientation: q, index: q === Ce.Orientation.Column ? g.colStart : g.rowStart, isSelected: Fe, isSelectedAll: ge, zoomScale: 100 * I, headerText: Qe, headerStyle: _, headerStyleSelect: s, headerStyleSelectAll: y, headerStyleHover: M, verticalPadding: m, horizontalPadding: S, ...h }, z);
|
|
1969
|
+
}, [x, P, d, I, n]), Ee = gn(), Ve = Se(() => {
|
|
1970
1970
|
const F = "white", _ = "black", s = {};
|
|
1971
1971
|
if (at.detectIt().primaryInput !== "touch") {
|
|
1972
|
-
let y = q ===
|
|
1973
|
-
|
|
1972
|
+
let y = q === Ce.Orientation.Column ? `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 8,14.5 2.3125,8.8125 h 3.25 V 1.5 h 4.875 v 7.3125 h 3.25 z' stroke='${_}' fill='${F}'/%3E%3C/g%3E%3C/svg%3E%0A") 8 15, pointer` : `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='${_}' fill='${F}'/%3E%3C/g%3E%3C/svg%3E%0A") 15 8, pointer`;
|
|
1973
|
+
Ee.getMode()?.key === "formatPainter" && (y = `url("data:image/svg+xml,%3Csvg width='30' height='22' viewBox='0 0 30 22' xmlns='http://www.w3.org/2000/svg' %3E%3Cg%3E%3Cpath d='M 26.737611,2.811068 V 2.0241451 c 0,-0.4328075 -0.354115,-0.7869227 -0.786923,-0.7869227 h -9.443074 c -0.432808,0 -0.786923,0.3541152 -0.786923,0.7869227 v 3.1476914 c 0,0.4328076 0.354115,0.7869235 0.786923,0.7869235 h 9.443074 c 0.432808,0 0.786923,-0.3541159 0.786923,-0.7869235 V 4.3849137 h 0.786923 v 3.1476915 h -7.869229 v 8.6561518 c 0,0.432808 0.354116,0.786923 0.786923,0.786923 h 1.573846 c 0.432807,0 0.786923,-0.354115 0.786923,-0.786923 V 9.1064513 H 29.09838 V 2.811068 Z M 10.714339,6.2116849 c -1.60877,0.0017 -3.2175361,0.00425 -4.8263048,0.00609 0.0012,1.5756989 0.00158,3.1513905 0.00244,4.7270891 -1.5978311,0.0017 -3.1956617,0.0034 -4.7934919,0.0043 0.00335,1.740011 0.00655,3.480012 0.00988,5.220023 1.5954589,0 3.1909181,0 4.7863775,0 -0.0017,1.606793 -0.00353,3.213585 -0.0051,4.820375 1.7440936,0.0016 3.4881881,0.0033 5.2322842,0.005 -0.0014,-1.608503 -0.0018,-3.217015 -0.0028,-4.825519 1.58518,0 3.17036,0 4.755543,0 0.0033,-1.741851 0.0073,-3.483705 0.01072,-5.225556 -1.58808,0 -3.176158,0 -4.764238,0 0,-1.5775391 0,-3.1550792 0,-4.7326117 -0.135065,1.3e-4 -0.270128,1.982e-4 -0.40519,4.047e-4 z' stroke='${_}' fill='${F}'/%3E%3C/g%3E%3C/svg%3E%0A") 7 12, pointer`), s.cursor = y;
|
|
1974
1974
|
}
|
|
1975
1975
|
return s.backgroundColor = d?.header?.fill || "transparent", s;
|
|
1976
|
-
}, [q, x,
|
|
1976
|
+
}, [q, x, Ee, d]), ke = Zt(t, () => ({ scrollTo: (F) => {
|
|
1977
1977
|
N.current?.scrollTo(F);
|
|
1978
1978
|
}, forceRender: () => {
|
|
1979
1979
|
k();
|
|
@@ -1982,12 +1982,12 @@ const Mr = (e, t, n = null) => {
|
|
|
1982
1982
|
}, [st]), D = Ze((F) => {
|
|
1983
1983
|
const _ = st.getCellCoordsFromClient(F.clientX, F.clientY);
|
|
1984
1984
|
if (!_ || !b) return;
|
|
1985
|
-
const s = q ===
|
|
1985
|
+
const s = q === Ce.Orientation.Column;
|
|
1986
1986
|
b({ originalEvent: F, clientX: F.clientX, clientY: F.clientY, rowIndex: s ? -1 : _.rowIndex, colIndex: s ? _.colIndex : -1 }), F.stopPropagation(), F.preventDefault();
|
|
1987
|
-
}, [st, b]), X =
|
|
1988
|
-
const F = q ===
|
|
1989
|
-
return f("div", { ref:
|
|
1990
|
-
}, [
|
|
1987
|
+
}, [st, b]), X = Se(() => {
|
|
1988
|
+
const F = q === Ce.Orientation.Column;
|
|
1989
|
+
return f("div", { ref: ke, children: f(di, { className: "sheet-header", style: Ve, ref: N, scrollPoint: ee, columnCount: F ? P : 1, rowCount: F ? 1 : P, width: F ? c : l, height: F ? l : p, freezeLeft: F ? C : void 0, freezeTop: F ? void 0 : C, hiddenColumnsAt: F ? Ye : void 0, hiddenRowsAt: F ? void 0 : Ye, showGridLines: !1, layout: he, clipCells: !1, allowOverlaysOverflow: !0, enableMouseWheel: !1, onContextMenu: D, onPointerDown: Oe, zoom: I, cellRenderer: ne, overlays: se }) });
|
|
1990
|
+
}, [se, he, c, p, ee, Ve, W]);
|
|
1991
1991
|
return be(() => {
|
|
1992
1992
|
L.current = !1, N.current?.invalidate(), U();
|
|
1993
1993
|
}, [n, d]), X;
|
|
@@ -1995,10 +1995,10 @@ const Mr = (e, t, n = null) => {
|
|
|
1995
1995
|
const { view: n, sheet: r, getVisibleCells: i, gridStyle: o } = e, l = le((a, C) => a.getStyle().getBorder(), []), { overlay: c } = mi({ getVisibleCells: i, getBorderAt: l, darkMode: o.body.darkMode, shiftIfWide: !0 }), p = c(n);
|
|
1996
1996
|
return p && n ? p : null;
|
|
1997
1997
|
})), _l = { key: "copy", description: "'Copy' Select destination and press ENTER or choose Paste." }, Zl = { key: "cut", description: "'Cut' Select destination and press ENTER or choose Paste." }, Kl = { type: Xt.Content.Values }, Yl = { fitDestination: !0, type: Xt.Content.Formats }, Xl = { fitDestination: !0, type: Xt.Content.Formulas }, Jl = { transpose: !0 }, Ql = { fitDestination: !0, adjustCells: (e, t, n) => ({ value: `=${t.getA1({ $colIndex: !0, $rowIndex: !0 })}` }) }, ea = ({ element: e, sheet: t, sheetView: n, commands: r, onClipboardUpdate: i, onPaste: o, selectionRenderer: l = xl, copyForegroundColor: c = "rgb(33, 115, 70)", cutForegroundColor: p = "rgb(33, 115, 70)", copyBackgroundColor: a = "white", cutBackgroundColor: C = "white", notifier: d, ...m }) => {
|
|
1998
|
-
const S = le(l, [l]), b =
|
|
1998
|
+
const S = le(l, [l]), b = Te(null), T = gn(), E = T.getMode(), j = Se(() => ({ element: e, doCopy: (w) => {
|
|
1999
1999
|
const q = t.getSelectedRanges().getSnapshot(w);
|
|
2000
2000
|
return new ol(q);
|
|
2001
|
-
} }), [t, n, e]), H =
|
|
2001
|
+
} }), [t, n, e]), H = Se(() => ({ element: e, importFromExternal: async (w, q) => {
|
|
2002
2002
|
const N = new rl(w, q, t.getStyles(), t.isDate1904());
|
|
2003
2003
|
return await N.parse() ? N : null;
|
|
2004
2004
|
}, doPaste: async (w, q) => {
|
|
@@ -2007,7 +2007,7 @@ const Mr = (e, t, n = null) => {
|
|
|
2007
2007
|
const N = t.getSelectedRange(), x = w.getItem(), k = x.getName();
|
|
2008
2008
|
return await N.doBatch(async () => {
|
|
2009
2009
|
const W = await N.copyFrom(x, q);
|
|
2010
|
-
!W || W.isEntireRows() || W.isEntireColumns() || W.autoFit({ orientations:
|
|
2010
|
+
!W || W.isEntireRows() || W.isEntireColumns() || W.autoFit({ orientations: Ce.Orientations.Row, minContent: !0 });
|
|
2011
2011
|
}, { description: "Paste" + (k ? ` ${k}` : ""), autoSelect: !0 }), !0;
|
|
2012
2012
|
} }), [t, n, d, e]), { clipboard: R, ...O } = ri({ ...m, source: j, commands: r, target: H, notifier: d, onClipboardUpdate: (w) => {
|
|
2013
2013
|
const q = w?.getItemType() === "range" ? w : null;
|
|
@@ -2029,12 +2029,12 @@ const Mr = (e, t, n = null) => {
|
|
|
2029
2029
|
}
|
|
2030
2030
|
N && T.setMode(null), e?.()?.focus(), o?.(w, q);
|
|
2031
2031
|
} });
|
|
2032
|
-
|
|
2032
|
+
Se(() => {
|
|
2033
2033
|
const w = e;
|
|
2034
2034
|
if (!r) return;
|
|
2035
2035
|
const q = [new Y("pasteValues", w, { label: "Paste Values", scopedLabels: { paste: "Values" }, description: `Paste only the values of the selected cells.
|
|
2036
2036
|
|
|
2037
|
-
The formatting is not applied.`, shortcut: { key: "V", modifiers: [
|
|
2037
|
+
The formatting is not applied.`, shortcut: { key: "V", modifiers: [te.Ctrl, te.Shift] } }), new Y("pasteFormats", w, { label: "Paste Formatting", scopedLabels: { paste: "Formatting" }, description: `Paste only the formats of the selected cells.
|
|
2038
2038
|
|
|
2039
2039
|
The content is not applied.` }), new Y("pasteFormulas", w, { label: "Paste Formulas", scopedLabels: { paste: "Formulas" }, description: "Paste only the formulas of the selected cells. The values and formatting is not applied." }), new Y("pasteTranspose", w, { label: "Paste Transpose", scopedLabels: { paste: "Transpose" }, description: "Paste with the rows and columns flipped." }), new Y("pasteLinks", w, { label: "Paste Links", scopedLabels: { paste: "Links" }, description: "Paste as formula references to the original cells." })];
|
|
2040
2040
|
r.addCommands(q, !0);
|
|
@@ -2043,7 +2043,7 @@ The content is not applied.` }), new Y("pasteFormulas", w, { label: "Paste Formu
|
|
|
2043
2043
|
const w = { disabled: !t.getProtection().isFormatCellsAllowed() };
|
|
2044
2044
|
r.getCommand("pasteValues").updateCallback((q) => O.paste({ ...Kl, ...q })).update(w), r.getCommand("pasteFormats").updateCallback((q, N) => O.paste({ ...Yl, description: N.label(), ...q })).update(w), r.getCommand("pasteFormulas").updateCallback((q, N) => O.paste({ ...Xl, description: N.label(), ...q })).update(w), r.getCommand("pasteTranspose").updateCallback((q, N) => O.paste({ ...Jl, description: N.label(), ...q })).update(w), r.getCommand("pasteLinks").updateCallback((q, N) => O.paste({ ...Ql, description: N.label(), ...q })).update(w), r.getCommand("cut").update(w), r.getCommand("paste").update(w);
|
|
2045
2045
|
}, [t, r]);
|
|
2046
|
-
const v =
|
|
2046
|
+
const v = Se(() => {
|
|
2047
2047
|
if (!E || !b.current) return;
|
|
2048
2048
|
const w = E.key;
|
|
2049
2049
|
if (w !== "copy" && w !== "cut" && w !== "formatPainter") return;
|
|
@@ -2053,8 +2053,8 @@ The content is not applied.` }), new Y("pasteFormulas", w, { label: "Paste Formu
|
|
|
2053
2053
|
return U && U.length !== 0 ? (V) => {
|
|
2054
2054
|
const L = [];
|
|
2055
2055
|
for (let P = 0; P < U.length; P++) {
|
|
2056
|
-
const
|
|
2057
|
-
I && (L.push(S({ range:
|
|
2056
|
+
const ee = U[P], I = V.toClipBounds(V.getRangeCoordsBounds(ee, { top: 0, left: 0, right: 1, bottom: 1 }), _o);
|
|
2057
|
+
I && (L.push(S({ range: ee, key: `copy-selection-background-${P}`, x: I.x, y: I.y, width: Math.max(I.width, 0), height: Math.max(I.height, 0), stroke: x, strokeWidth: 2 })), L.push(S({ range: ee, key: `copy-selection-foreground-${P}`, x: I.x + (I.width <= 2 ? -1 : 0), y: I.y, width: Math.max(I.width, 3), height: Math.max(I.height, 3), stroke: k, strokeWidth: 2, isAnimatedStroke: !0 })));
|
|
2058
2058
|
}
|
|
2059
2059
|
return L;
|
|
2060
2060
|
} : null;
|
|
@@ -2069,31 +2069,31 @@ The content is not applied.` }), new Y("pasteFormulas", w, { label: "Paste Formu
|
|
|
2069
2069
|
})), na = "_sheet-selection_12wyx_5", oa = { key: "dragCut", description: "Drag selection to move cell contents.", cursor: "move" }, ra = { key: "dragCutInsert", description: "Drag selection to insert cell contents.", cursor: "copy" }, ia = { key: "dragCopy", description: "Drag selection to copy cell contents." }, la = { key: "dragCopyInsert", description: "Drag selection to insert copied cell contents.", cursor: "move" }, Er = (e, t) => t.ctrlKey && t.shiftKey ? la : t.ctrlKey ? ia : t.shiftKey ? ra : oa, aa = { key: "fill", description: "Drag selection to extend series or fill.", cursor: "crosshair" }, sa = ft(yt((e, t) => {
|
|
2070
2070
|
const { view: n, commands: r, className: i, onFirstRender: o, notifier: l, onShowTooltip: c, onCloseTooltip: p, sheet: a, gridRef: C, gridStyle: d, isActive: m, editingCoords: S, ...b } = e, T = n?.getBounds(), E = le(c, [c]), j = le(p, [p]), [H, R] = me(() => a?.getSelection().getCoords()), O = le((Z) => {
|
|
2071
2071
|
Ct.isEqualSelectionCoords(Z, H) || a && a.getSelection().updateCoords(Z);
|
|
2072
|
-
}, [a, H]), v = gn(), w =
|
|
2072
|
+
}, [a, H]), v = gn(), w = Te(null), [q, N] = me(a?.getProtection().isLocked()), [x, k] = me(a?.getView().getMovableSelection().length > 0), W = at.detectIt().primaryInput === "touch", U = !W && m, V = S !== null || x, L = le((Z) => {
|
|
2073
2073
|
const K = Ct.cellToRange(Z);
|
|
2074
2074
|
if (a.isClosed()) return K;
|
|
2075
|
-
const
|
|
2076
|
-
return
|
|
2077
|
-
}, [a]), P = le((Z, K,
|
|
2078
|
-
const
|
|
2075
|
+
const oe = a.getRange(K, { excludeHidden: !0 }).getMerges();
|
|
2076
|
+
return oe.length === 0 ? K : oe[0];
|
|
2077
|
+
}, [a]), P = le((Z, K, oe, re, he, xe) => {
|
|
2078
|
+
const ae = a.getSelectedRange().getExtended(re, Z).getCoords();
|
|
2079
2079
|
switch (re) {
|
|
2080
|
-
case
|
|
2081
|
-
return
|
|
2082
|
-
case
|
|
2083
|
-
return
|
|
2084
|
-
case
|
|
2085
|
-
return
|
|
2086
|
-
case
|
|
2087
|
-
return
|
|
2080
|
+
case Ce.Direction.Up:
|
|
2081
|
+
return ae.rowStart;
|
|
2082
|
+
case Ce.Direction.Down:
|
|
2083
|
+
return ae.rowEnd;
|
|
2084
|
+
case Ce.Direction.Left:
|
|
2085
|
+
return ae.colStart;
|
|
2086
|
+
case Ce.Direction.Right:
|
|
2087
|
+
return ae.colEnd;
|
|
2088
2088
|
}
|
|
2089
|
-
}, [a]),
|
|
2090
|
-
const Z = a.getUsedRange()?.getCoords(), K = a.getRowHeaders().getUsedRange()?.getCoords(),
|
|
2091
|
-
return { ...Z, colEnd: Math.max(Z?.colEnd ?? 0,
|
|
2092
|
-
}, [a]), I = le((Z, K) => a.getRowHeaders().hiddenHeadersAt(Z, K), [a]), A = le((Z, K) => a.getColumnHeaders().hiddenHeadersAt(Z, K), [a]),
|
|
2089
|
+
}, [a]), ee = le(() => {
|
|
2090
|
+
const Z = a.getUsedRange()?.getCoords(), K = a.getRowHeaders().getUsedRange()?.getCoords(), oe = a.getColumnHeaders().getUsedRange()?.getCoords();
|
|
2091
|
+
return { ...Z, colEnd: Math.max(Z?.colEnd ?? 0, oe?.max ?? 0), rowEnd: Math.max(Z?.rowEnd ?? 0, K?.max ?? 0) };
|
|
2092
|
+
}, [a]), I = le((Z, K) => a.getRowHeaders().hiddenHeadersAt(Z, K), [a]), A = le((Z, K) => a.getColumnHeaders().hiddenHeadersAt(Z, K), [a]), se = le((Z) => a.getRange(Z, { excludeHidden: !0 }).getMerges(), [a]), we = le((Z) => {
|
|
2093
2093
|
a?.getSelection().setAdjusting(Z);
|
|
2094
2094
|
}, [a]), Ge = le(async () => {
|
|
2095
2095
|
a?.getSelection().setAdjusting(null), v.getMode()?.key === "formatPainter" && (await r?.getCommand("pasteFormats")?.execute({}), v.setMode(null));
|
|
2096
|
-
}, [v, H, a, r]),
|
|
2096
|
+
}, [v, H, a, r]), Ae = Se(() => {
|
|
2097
2097
|
const Z = v.getMode();
|
|
2098
2098
|
return Z?.key === "cut" || Z?.key === "copy";
|
|
2099
2099
|
}, [v]);
|
|
@@ -2105,79 +2105,79 @@ The content is not applied.` }), new Y("pasteFormulas", w, { label: "Paste Formu
|
|
|
2105
2105
|
} }), gt(a, { onProtectionChange: () => {
|
|
2106
2106
|
N(a.getProtection().isLocked());
|
|
2107
2107
|
} });
|
|
2108
|
-
const { body: ue = {} } = d || {},
|
|
2109
|
-
v.setMode(Er(0,
|
|
2110
|
-
}, onMoveDragUpdate: (Z, K,
|
|
2111
|
-
v.setMode(Er(0,
|
|
2108
|
+
const { body: ue = {} } = d || {}, Ie = n.getLayout(), Je = !(U && H.ranges.length <= 1 && S === null && !q && (!v.getMode() || Ae)), { cursor: Ye, overlay: Fe, onPointerDown: ge } = si({ gridRef: C, commands: r, layout: Ie, getCellCoordsAsRangeCoords: L, selection: H, fillHandleBorderColor: ue.fill, selectionBackgroundColor: m ? d.selection.fill : d.selectionInactive.fill, selectionBorderColor: m ? d.selection.strokeFill : d.selectionInactive.strokeFill, selectionRemoveBackgroundColor: m ? d.selectionRemove.fill : d.selectionInactive.fill, selectionRemoveBorderColor: m ? d.selectionRemove.strokeFill : d.selectionInactive.strokeFill, disableFillDrag: Je, disableMoveDrag: W || !(m && H.ranges.length <= 1 && S === null && !q), disableTouchSelection: V, onSelectionChange: O, onSelectionDragStart: we, onSelectionDragEnd: Ge, onMoveDragStart: (Z, K, oe) => {
|
|
2109
|
+
v.setMode(Er(0, oe));
|
|
2110
|
+
}, onMoveDragUpdate: (Z, K, oe) => {
|
|
2111
|
+
v.setMode(Er(0, oe));
|
|
2112
2112
|
}, onMoveDragEnd: (Z, K) => {
|
|
2113
2113
|
v.setMode(null);
|
|
2114
|
-
}, onMoveDragDone: async (Z, K,
|
|
2114
|
+
}, onMoveDragDone: async (Z, K, oe) => {
|
|
2115
2115
|
if (Ct.isEqualRanges(Z, K)) return;
|
|
2116
2116
|
const re = a.getRange(K);
|
|
2117
2117
|
if (l?.showOptions) {
|
|
2118
|
-
const
|
|
2118
|
+
const De = re.getDifferences(Z);
|
|
2119
2119
|
let Ne = !1;
|
|
2120
|
-
const u =
|
|
2121
|
-
for (let Be = 0; !Ne && Be < u; Be++) Ne =
|
|
2120
|
+
const u = De.getCount();
|
|
2121
|
+
for (let Be = 0; !Ne && Be < u; Be++) Ne = De.at(Be).isContentful();
|
|
2122
2122
|
if (Ne && await l?.showOptions({ title: "Confirm", description: "There is already data here. Do you want to replace it?", options: ["Replace", "Cancel"], defaultOption: "Replace" }) !== "Replace")
|
|
2123
2123
|
return;
|
|
2124
2124
|
}
|
|
2125
|
-
const he = !
|
|
2125
|
+
const he = !oe.ctrlKey, xe = oe.shiftKey, ae = xe ? he ? "Insert Moved Cells" : "Insert Copied Cells" : he ? "Move Cells" : "Copy Cells", qe = await l?.showBusy?.(ae);
|
|
2126
2126
|
try {
|
|
2127
|
-
const
|
|
2127
|
+
const De = a.getRange(Z);
|
|
2128
2128
|
await re.doBatch(async () => {
|
|
2129
|
-
|
|
2130
|
-
}, { description:
|
|
2131
|
-
} catch (
|
|
2132
|
-
l?.showError?.(
|
|
2129
|
+
xe ? await re.insertFrom(Z, { isCut: he, undoRange: De }) : await re.copyFrom(Z, { isCut: he, undoRange: De }), De.autoFit({ skipCustomSize: !0, orientations: Ce.Orientations.Row, minContent: !0 }), re.autoFit({ skipCustomSize: !0, orientations: Ce.Orientations.Row, minContent: !0 });
|
|
2130
|
+
}, { description: ae, autoSelect: !0 });
|
|
2131
|
+
} catch (De) {
|
|
2132
|
+
l?.showError?.(De);
|
|
2133
2133
|
} finally {
|
|
2134
|
-
|
|
2134
|
+
qe?.();
|
|
2135
2135
|
}
|
|
2136
|
-
}, contentfulCellFinder: P, hiddenRowsAt: I, hiddenColumnsAt: A, mergedRanges:
|
|
2136
|
+
}, contentfulCellFinder: P, hiddenRowsAt: I, hiddenColumnsAt: A, mergedRanges: se, getDataCoords: ee, canSelectionSpanMergedCells: (Z) => {
|
|
2137
2137
|
const K = a.getRange(Z);
|
|
2138
2138
|
return K.isEntireColumns() || K.isEntireRows();
|
|
2139
2139
|
}, onFill: async (Z, K) => {
|
|
2140
|
-
const
|
|
2140
|
+
const oe = "Auto Fill", re = await l?.showBusy?.(oe);
|
|
2141
2141
|
try {
|
|
2142
2142
|
await a.doBatch(() => {
|
|
2143
|
-
a.getRange(Z).autoFill(K), a.getRange(K).autoFit({ orientations:
|
|
2144
|
-
}, { description:
|
|
2143
|
+
a.getRange(Z).autoFill(K), a.getRange(K).autoFit({ orientations: Ce.Orientations.Row, skipCustomSize: !0, minContent: !0 });
|
|
2144
|
+
}, { description: oe, autoSelect: !0 });
|
|
2145
2145
|
} catch (he) {
|
|
2146
2146
|
l?.showError?.(he);
|
|
2147
2147
|
} finally {
|
|
2148
2148
|
w.current = null, re?.();
|
|
2149
2149
|
}
|
|
2150
|
-
}, onFillPreview: (Z, K,
|
|
2150
|
+
}, onFillPreview: (Z, K, oe) => {
|
|
2151
2151
|
if (C.current && E) {
|
|
2152
2152
|
v.setMode(aa);
|
|
2153
2153
|
try {
|
|
2154
|
-
w.current?.direction !==
|
|
2155
|
-
w.current = { callback: u, direction:
|
|
2154
|
+
w.current?.direction !== oe && (w.current = null, a.getRange(Z).autoFill(K, { previewOnly: (u) => {
|
|
2155
|
+
w.current = { callback: u, direction: oe };
|
|
2156
2156
|
} }));
|
|
2157
2157
|
const re = w.current?.callback?.(K);
|
|
2158
2158
|
if (!re || re.isEmpty()) return;
|
|
2159
2159
|
const he = re.toText();
|
|
2160
2160
|
if (!he) return;
|
|
2161
|
-
const
|
|
2162
|
-
let
|
|
2163
|
-
if (
|
|
2164
|
-
|
|
2165
|
-
const u =
|
|
2166
|
-
|
|
2167
|
-
} else if (
|
|
2168
|
-
|
|
2169
|
-
const u =
|
|
2170
|
-
|
|
2171
|
-
} else if (
|
|
2172
|
-
|
|
2173
|
-
const u =
|
|
2174
|
-
|
|
2175
|
-
} else if (
|
|
2176
|
-
|
|
2177
|
-
const u =
|
|
2178
|
-
|
|
2161
|
+
const xe = Ct.cellToRange(re.getCoords()), ae = n.getRelativePointFromClient(0, 0);
|
|
2162
|
+
let qe = 0, De = 0, Ne = Ln.Bottom;
|
|
2163
|
+
if (oe === Ce.Direction.Down) {
|
|
2164
|
+
qe = Ie.getColOffset(xe.colEnd + 1) - ae.x;
|
|
2165
|
+
const u = Ie.getRowOffset(xe.rowEnd), Be = Ie.getRowOffset(xe.rowEnd + 1);
|
|
2166
|
+
De = Be - (Be - u) / 2 - ae.y, Ne = Ln.Right;
|
|
2167
|
+
} else if (oe === Ce.Direction.Right) {
|
|
2168
|
+
De = Ie.getRowOffset(xe.rowEnd + 1) - ae.y;
|
|
2169
|
+
const u = Ie.getColOffset(xe.colEnd), Be = Ie.getColOffset(xe.colEnd + 1);
|
|
2170
|
+
qe = Be - (Be - u) / 2 - ae.x, Ne = Ln.Bottom;
|
|
2171
|
+
} else if (oe === Ce.Direction.Up) {
|
|
2172
|
+
qe = Ie.getColOffset(xe.colEnd + 1) - ae.x;
|
|
2173
|
+
const u = Ie.getRowOffset(xe.rowStart), Be = Ie.getRowOffset(xe.rowStart + 1);
|
|
2174
|
+
De = Be - (Be - u) / 2 - ae.y, Ne = Ln.Right;
|
|
2175
|
+
} else if (oe === Ce.Direction.Left) {
|
|
2176
|
+
De = Ie.getRowOffset(xe.rowEnd + 1) - ae.y;
|
|
2177
|
+
const u = Ie.getColOffset(xe.colStart), Be = Ie.getColOffset(xe.colStart + 1);
|
|
2178
|
+
qe = Be - (Be - u) / 2 - ae.x, Ne = Ln.Bottom;
|
|
2179
2179
|
}
|
|
2180
|
-
E({ anchor: { x:
|
|
2180
|
+
E({ anchor: { x: qe, y: De }, display: he, placement: Ne });
|
|
2181
2181
|
} catch (re) {
|
|
2182
2182
|
l?.showError?.(re);
|
|
2183
2183
|
}
|
|
@@ -2193,10 +2193,10 @@ The content is not applied.` }), new Y("pasteFormulas", w, { label: "Paste Formu
|
|
|
2193
2193
|
Z.removeEventListener("pointerdown", $);
|
|
2194
2194
|
};
|
|
2195
2195
|
}, [n?.getStage()]);
|
|
2196
|
-
const Le = Zt(t, () => ({}), []), ye =
|
|
2196
|
+
const Le = Zt(t, () => ({}), []), ye = Te(null);
|
|
2197
2197
|
return f("div", { className: Vt(i, "sheet-selection", na), style: { position: "absolute", width: T?.width, height: T?.height, overflow: "hidden", pointerEvents: "none", willChange: "none" }, ref: Rn([Le, ye]), ...b, children: Fe(n) });
|
|
2198
2198
|
})), co = Object.freeze({ x: 0, y: 0, width: 0, height: 0 }), da = { fireOnModelChange: !1 }, ca = ft(yt((e, t) => {
|
|
2199
|
-
const { children: n, view: r, movable: i, onRefLoad: o, onRefUnload: l, onHide: c, onShow: p, onUnFocus: a, isDragging: C, updateFrameBounds: d, dragStart: m, style: S, disabled: b, renderMovable: T, ...E } = e, [j, H] = me(co), [R, O] = me(null), [v, w] = me(!1), q =
|
|
2199
|
+
const { children: n, view: r, movable: i, onRefLoad: o, onRefUnload: l, onHide: c, onShow: p, onUnFocus: a, isDragging: C, updateFrameBounds: d, dragStart: m, style: S, disabled: b, renderMovable: T, ...E } = e, [j, H] = me(co), [R, O] = me(null), [v, w] = me(!1), q = Te(null);
|
|
2200
2200
|
Bt(() => {
|
|
2201
2201
|
if (i.isClosed()) return;
|
|
2202
2202
|
const x = i.getBounds();
|
|
@@ -2217,7 +2217,7 @@ The content is not applied.` }), new Y("pasteFormulas", w, { label: "Paste Formu
|
|
|
2217
2217
|
l(x);
|
|
2218
2218
|
};
|
|
2219
2219
|
}, []);
|
|
2220
|
-
const N =
|
|
2220
|
+
const N = Se(() => {
|
|
2221
2221
|
if (!j) return null;
|
|
2222
2222
|
let { width: x, height: k } = j;
|
|
2223
2223
|
return T({ view: r, movable: i, disabled: b, isDragging: C, style: { position: "relative", left: 0, top: 0, width: x, height: k }, onHide: c, onShow: p });
|
|
@@ -2231,58 +2231,58 @@ The content is not applied.` }), new Y("pasteFormulas", w, { label: "Paste Formu
|
|
|
2231
2231
|
R && !q?.current?.contains(x.relatedTarget) && O(null), x.relatedTarget && w(!1);
|
|
2232
2232
|
}, ...E, children: N });
|
|
2233
2233
|
})), ua = "_movable-area_314c6_5", ga = ft(yt((e, t) => {
|
|
2234
|
-
const { view: n, movables: r, movablesView: i, renderMovable: o, transactional: l, onUnFocus: c, onFocus: p, disabled: a = !1, disableDrag: C = !1, disableResize: d = !1, className: m, style: S, renderDirections: b = ["nw", "n", "ne", "w", "e", "sw", "s", "se"], onFirstRender: T, ...E } = e, j = n.getBounds(), H = le(T, [T]), R = le(c, [c]), O = le(p, [p]), [v, w] = me([]), [q, N] = me(!1), [x, k] = me(!1), W =
|
|
2234
|
+
const { view: n, movables: r, movablesView: i, renderMovable: o, transactional: l, onUnFocus: c, onFocus: p, disabled: a = !1, disableDrag: C = !1, disableResize: d = !1, className: m, style: S, renderDirections: b = ["nw", "n", "ne", "w", "e", "sw", "s", "se"], onFirstRender: T, ...E } = e, j = n.getBounds(), H = le(T, [T]), R = le(c, [c]), O = le(p, [p]), [v, w] = me([]), [q, N] = me(!1), [x, k] = me(!1), W = Te(!0), U = Te(/* @__PURE__ */ new Map()), V = Te(/* @__PURE__ */ new Map()), L = Te(/* @__PURE__ */ new Map()), P = Te(/* @__PURE__ */ new Map()), ee = Te(/* @__PURE__ */ new Map()), I = Te({ onRequestFocus: (ne) => (oe(ne), null) }), A = Te(null), se = Te(null), we = Te(null), [Ge, Ae] = dn((ne) => ne + 1, 0);
|
|
2235
2235
|
Bt(() => {
|
|
2236
|
-
|
|
2236
|
+
Ae();
|
|
2237
2237
|
}, [n, r]), gt(r, { onCollectionChange: () => {
|
|
2238
|
-
const
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
}),
|
|
2238
|
+
const ne = r.getItems({ address: n.getVisibleRangeCoords(), excludeHidden: !0 }), Ee = ee.current;
|
|
2239
|
+
Ee.forEach((ke) => {
|
|
2240
|
+
ke();
|
|
2241
|
+
}), Ee.clear();
|
|
2242
2242
|
const Ve = I.current;
|
|
2243
|
-
for (let
|
|
2244
|
-
const Oe =
|
|
2243
|
+
for (let ke = 0; ke < ne.length; ke++) {
|
|
2244
|
+
const Oe = ne[ke];
|
|
2245
2245
|
if (Oe.isClosed()) continue;
|
|
2246
2246
|
const D = Oe.addListeners(Ve);
|
|
2247
|
-
|
|
2247
|
+
Ee.set(Oe, D);
|
|
2248
2248
|
}
|
|
2249
|
-
|
|
2249
|
+
Ae();
|
|
2250
2250
|
}, onInvalidated: () => {
|
|
2251
|
-
|
|
2252
|
-
} }), gt(i, { onMovableSelectionChange(
|
|
2253
|
-
|
|
2251
|
+
Ae();
|
|
2252
|
+
} }), gt(i, { onMovableSelectionChange(ne) {
|
|
2253
|
+
Ie(), Ae();
|
|
2254
2254
|
} });
|
|
2255
|
-
const ue = Ze((
|
|
2256
|
-
const Ve = L.current.get(
|
|
2257
|
-
we.current && (we.current.getTargets().forEach((
|
|
2258
|
-
if (
|
|
2255
|
+
const ue = Ze((ne, Ee) => {
|
|
2256
|
+
const Ve = L.current.get(ne);
|
|
2257
|
+
we.current && (we.current.getTargets().forEach((ke) => {
|
|
2258
|
+
if (ke === Ve) return ke.style.left = Ee.x + "px", ke.style.top = Ee.y + "px", ke.style.width = Ee.width + "px", void (ke.style.height = Ee.height + "px");
|
|
2259
2259
|
}), we.current.updateRect());
|
|
2260
|
-
}, []),
|
|
2261
|
-
const
|
|
2262
|
-
|
|
2263
|
-
const
|
|
2264
|
-
|
|
2265
|
-
}), w((Ve) => Xe.isEqualArrays(Ve,
|
|
2266
|
-
}, Je =
|
|
2267
|
-
Je.current =
|
|
2268
|
-
})), Ye.current), []), ge =
|
|
2269
|
-
ge.current =
|
|
2270
|
-
}, [v]), [Le, ye] = me(!1), Z =
|
|
2271
|
-
if (
|
|
2272
|
-
const
|
|
2273
|
-
|
|
2260
|
+
}, []), Ie = () => {
|
|
2261
|
+
const ne = [], Ee = i.getMovableSelection();
|
|
2262
|
+
Ee.forEach((Ve) => {
|
|
2263
|
+
const ke = L.current.get(Ve);
|
|
2264
|
+
ke && Ee.indexOf(Ve) !== -1 && ne.push(ke);
|
|
2265
|
+
}), w((Ve) => Xe.isEqualArrays(Ve, ne) ? Ve : ne);
|
|
2266
|
+
}, Je = Te(null), Ye = Te(null), Fe = Se(() => (Ye.current || (Ye.current = new Promise((ne) => {
|
|
2267
|
+
Je.current = ne;
|
|
2268
|
+
})), Ye.current), []), ge = Te(null), $ = le(async (ne, Ee) => {
|
|
2269
|
+
ge.current = Ee, await (async () => !(!await Fe.then() || !we.current))() && ge.current === Ee && we.current.dragStart(ne, Ee);
|
|
2270
|
+
}, [v]), [Le, ye] = me(!1), Z = Te(null), K = Te(null), oe = le(async (ne = null) => {
|
|
2271
|
+
if (ne || (ne = i.getMovableSelection()[0]), !ne) return R?.(), !1;
|
|
2272
|
+
const Ee = L.current.get(ne);
|
|
2273
|
+
Ee ? (await Xe.whenFocus(Ee), Ee.focus(), K.current = Ee, Z.current = null) : Z.current = ne;
|
|
2274
2274
|
}, [i]);
|
|
2275
2275
|
be(() => {
|
|
2276
|
-
Le && v.length > 0 && K.current !== v[0] &&
|
|
2276
|
+
Le && v.length > 0 && K.current !== v[0] && oe(), W.current && (H?.(), W.current = !1);
|
|
2277
2277
|
}, [v]);
|
|
2278
|
-
const re =
|
|
2279
|
-
const
|
|
2280
|
-
if (
|
|
2281
|
-
const
|
|
2278
|
+
const re = Se(() => {
|
|
2279
|
+
const ne = r.getItems({ address: n.getVisibleRangeCoords(), excludeHidden: !0 });
|
|
2280
|
+
if (ne.length === 0 && U.current.size === 0) return null;
|
|
2281
|
+
const Ee = (X, F, _, s = !0) => {
|
|
2282
2282
|
const y = X.isSelected(), M = { tabIndex: _, view: n, movable: X, onRefLoad: (g) => {
|
|
2283
|
-
Z.current === X && (g.focus(), K.current = g, Z.current = null), L.current.set(X, g), V.current.set(g, X), F.rendered = !0,
|
|
2283
|
+
Z.current === X && (g.focus(), K.current = g, Z.current = null), L.current.set(X, g), V.current.set(g, X), F.rendered = !0, Ie();
|
|
2284
2284
|
}, onRefUnload: (g) => {
|
|
2285
|
-
L.current.delete(X), V.current.delete(g), F.rendered = !1,
|
|
2285
|
+
L.current.delete(X), V.current.delete(g), F.rendered = !1, Ie();
|
|
2286
2286
|
}, onUnFocus: R, onHide: (g) => {
|
|
2287
2287
|
F.onHide = g;
|
|
2288
2288
|
}, onShow: (g) => {
|
|
@@ -2290,18 +2290,18 @@ The content is not applied.` }), new Y("pasteFormulas", w, { label: "Paste Formu
|
|
|
2290
2290
|
}, isDragging: y && (x || q), disabled: a, renderMovable: o, updateFrameBounds: (g) => {
|
|
2291
2291
|
ue(X, g);
|
|
2292
2292
|
}, dragStart: $, onMouseUp: () => {
|
|
2293
|
-
if (ge.current = null,
|
|
2293
|
+
if (ge.current = null, se.current) {
|
|
2294
2294
|
N(!1), k(!1);
|
|
2295
2295
|
let g = !1;
|
|
2296
2296
|
P.current?.forEach((z) => {
|
|
2297
2297
|
Xe.isEqualBounds(z.movable.getBounds(), z.startBounds) || (g = !0);
|
|
2298
|
-
}), g ?
|
|
2298
|
+
}), g ? xe() : ae();
|
|
2299
2299
|
}
|
|
2300
|
-
}, style: { opacity: s ? q && y ? 0.7 : void 0 : 0, zIndex: q && y ? X.getZIndex() +
|
|
2300
|
+
}, style: { opacity: s ? q && y ? 0.7 : void 0 : 0, zIndex: q && y ? X.getZIndex() + ne.length : void 0, pointerEvents: s ? void 0 : "none", cursor: x && y ? "grabbing" : a || C ? "initial" : "move", boxShadow: !y || x && !q ? void 0 : "1px 1px 2px 2px rgba(0,0,0,.15)" } };
|
|
2301
2301
|
return f(ca, { ...M }, `movable-${X.getUUID()}`);
|
|
2302
|
-
}, Ve = U.current,
|
|
2303
|
-
for (let X = 0; X <
|
|
2304
|
-
const F =
|
|
2302
|
+
}, Ve = U.current, ke = /* @__PURE__ */ new Map(), Oe = [];
|
|
2303
|
+
for (let X = 0; X < ne.length; X++) {
|
|
2304
|
+
const F = ne[X];
|
|
2305
2305
|
if (F.isClosed()) continue;
|
|
2306
2306
|
let _ = Ve.get(F);
|
|
2307
2307
|
_ || (_ = { frame: null, shown: null, onShow: null, onHide: null, rendered: !1, doShow: (s, y) => {
|
|
@@ -2316,100 +2316,100 @@ The content is not applied.` }), new Y("pasteFormulas", w, { label: "Paste Formu
|
|
|
2316
2316
|
if (!y || y?.shown === !1) return;
|
|
2317
2317
|
y.shown = !1;
|
|
2318
2318
|
const M = ++y.visibilityRequestId, g = await Promise.resolve(y.onHide?.(s));
|
|
2319
|
-
M === y.visibilityRequestId && g !== !1 && (y.shown = !1, U.current.delete(s),
|
|
2320
|
-
}, visibilityRequestId: 0 }), _.frame =
|
|
2319
|
+
M === y.visibilityRequestId && g !== !1 && (y.shown = !1, U.current.delete(s), Ae());
|
|
2320
|
+
}, visibilityRequestId: 0 }), _.frame = Ee(F, _, X, !0), Oe.push(_.frame), _.doShow(F, _), Ve.delete(F), ke.set(F, _);
|
|
2321
2321
|
}
|
|
2322
2322
|
const D = [];
|
|
2323
2323
|
return i.getMovableSelection().forEach((X) => {
|
|
2324
2324
|
const F = Ve.get(X);
|
|
2325
|
-
F && (F.frame =
|
|
2325
|
+
F && (F.frame = Ee(X, F, -1, !1), D.push(F.frame), Ve.delete(X), ke.set(X, F));
|
|
2326
2326
|
}), Ve.forEach((X, F) => {
|
|
2327
|
-
X.frame =
|
|
2328
|
-
}), U.current =
|
|
2329
|
-
}, [Ge, n, o, a, C, d, q, x]), he = le((
|
|
2330
|
-
const Ve = `${
|
|
2331
|
-
|
|
2332
|
-
for (let
|
|
2333
|
-
const Oe = v[
|
|
2327
|
+
X.frame = Ee(F, X, -1, !1), D.push(X.frame), X.doHide(F, X), Ve.delete(F), ke.set(F, X);
|
|
2328
|
+
}), U.current = ke, Ie(), [...D, ...Oe];
|
|
2329
|
+
}, [Ge, n, o, a, C, d, q, x]), he = le((ne, Ee) => {
|
|
2330
|
+
const Ve = `${Ee} ${v.length === 1 ? tr.capitalize(V.current?.get(v[0]).getContent().getType()) : "Drawings"}`;
|
|
2331
|
+
se.current && (console.warn(`Transaction ${se.current.getDescription()} is being replaced by ${Ve}`), se.current.rollback(), se.current = null), se.current = l.beginCommit({ description: Ve }), P.current.clear();
|
|
2332
|
+
for (let ke = 0; ke < v.length; ke++) {
|
|
2333
|
+
const Oe = v[ke], D = V.current?.get(Oe);
|
|
2334
2334
|
D ? P.current.set(Oe, { movable: D, startBounds: n.toViewBounds(D.getBounds()) }) : console.warn("invalid element", D);
|
|
2335
2335
|
}
|
|
2336
|
-
}, [l, n, v]),
|
|
2337
|
-
if (!
|
|
2338
|
-
const
|
|
2339
|
-
P.current?.forEach((
|
|
2340
|
-
|
|
2341
|
-
}),
|
|
2342
|
-
}, []),
|
|
2343
|
-
|
|
2344
|
-
}, []),
|
|
2336
|
+
}, [l, n, v]), xe = Ze(() => {
|
|
2337
|
+
if (!se.current) return;
|
|
2338
|
+
const ne = [];
|
|
2339
|
+
P.current?.forEach((Ee) => {
|
|
2340
|
+
ne.push(Ee.movable);
|
|
2341
|
+
}), se.current.commit({ viewAfter: { view: i, movableSelection: ne } }), P.current.clear(), se.current = null;
|
|
2342
|
+
}, []), ae = Ze(() => {
|
|
2343
|
+
se.current && (se.current.rollback(), se.current = null);
|
|
2344
|
+
}, []), qe = Te(null);
|
|
2345
2345
|
be(() => {
|
|
2346
|
-
|
|
2347
|
-
|
|
2346
|
+
qe.current && (qe.current.onscroll = (ne) => {
|
|
2347
|
+
ne.preventDefault(), ne.srcElement.scrollTop = 0, ne.srcElement.scrollLeft = 0;
|
|
2348
2348
|
});
|
|
2349
|
-
}, [
|
|
2350
|
-
const
|
|
2351
|
-
|
|
2352
|
-
} }), [i]), [Ne, u] = me(null), Be =
|
|
2349
|
+
}, [qe.current]);
|
|
2350
|
+
const De = Zt(t, () => ({ isMovableArea: () => !0, focusMovable: oe, focus: () => {
|
|
2351
|
+
oe();
|
|
2352
|
+
} }), [i]), [Ne, u] = me(null), Be = Te(!1), st = Te(!1), Ke = Te(!1);
|
|
2353
2353
|
be(() => {
|
|
2354
2354
|
if (a || v.length === 0 || Ke.current || Be.current) return;
|
|
2355
2355
|
if (st.current) return void requestAnimationFrame(() => {
|
|
2356
2356
|
we.current && A.current && we.current.refTargets.length > 0 && (Ke.current = !0, Je.current?.(!0)), w([...v]);
|
|
2357
2357
|
});
|
|
2358
2358
|
Be.current = !0;
|
|
2359
|
-
const
|
|
2359
|
+
const ne = ot.lazy(async () => {
|
|
2360
2360
|
try {
|
|
2361
|
-
const
|
|
2362
|
-
return Be.current = !1, st.current = !0, w([...v]),
|
|
2363
|
-
} catch (
|
|
2364
|
-
return console.warn(
|
|
2361
|
+
const Ee = await import("./DRANb7mus_7OUudL.mjs");
|
|
2362
|
+
return Be.current = !1, st.current = !0, w([...v]), Ee;
|
|
2363
|
+
} catch (Ee) {
|
|
2364
|
+
return console.warn(Ee), Je.current?.(!1), null;
|
|
2365
2365
|
}
|
|
2366
2366
|
});
|
|
2367
|
-
u(
|
|
2367
|
+
u(ne);
|
|
2368
2368
|
}, [v, a, C, d]);
|
|
2369
|
-
const Qe =
|
|
2370
|
-
he(
|
|
2371
|
-
}, onResize: (
|
|
2372
|
-
if (!
|
|
2369
|
+
const Qe = Se(() => !Ne || a ? null : f(ai, { children: f(Ne, { className: Vt({ dragging: q || x, resizing: q, moving: x }), container: null, ref: we, target: we.current ? v : [], draggable: !a && !C, resizable: !a && !d, individualGroupable: !0, edgeDraggable: !1, throttleDrag: 2, throttleResize: 2, origin: !1, keepRatio: !1, renderDirections: b, onResizeStart: (ne) => {
|
|
2370
|
+
he(ne.target, "Resize");
|
|
2371
|
+
}, onResize: (ne) => {
|
|
2372
|
+
if (!se.current) return ne.stopDrag(), void Ae();
|
|
2373
2373
|
N(!0);
|
|
2374
|
-
const
|
|
2375
|
-
let Ve = 0,
|
|
2374
|
+
const Ee = ne.direction[0] !== 0 && ne.direction[1] !== 0;
|
|
2375
|
+
let Ve = 0, ke = 0;
|
|
2376
2376
|
for (let Oe = 0; Oe < v.length; Oe++) {
|
|
2377
2377
|
const D = v[Oe], X = P.current.get(D), F = V.current.get(D);
|
|
2378
2378
|
if (!X || !F) {
|
|
2379
2379
|
console.warn("invalid element");
|
|
2380
2380
|
continue;
|
|
2381
2381
|
}
|
|
2382
|
-
let _ =
|
|
2383
|
-
Oe === 0 ? (Ve = g,
|
|
2382
|
+
let _ = ne.dist[0], s = ne.dist[1], y = ne.drag.dist[0], M = ne.drag.dist[1], g = X.startBounds.width, z = X.startBounds.height;
|
|
2383
|
+
Oe === 0 ? (Ve = g, ke = z) : (_ *= g / Ve, y *= g / Ve, s *= z / ke, M *= z / ke);
|
|
2384
2384
|
const h = { ...X.startBounds };
|
|
2385
|
-
if (h.width = Math.max(0, g + _), h.height = Math.max(0, z + s),
|
|
2385
|
+
if (h.width = Math.max(0, g + _), h.height = Math.max(0, z + s), ne.direction[0] === -1 && (h.width = Math.max(0, Math.min(X.startBounds.x + g, g - y))), ne.direction[1] === -1 && (h.height = Math.max(0, Math.min(X.startBounds.y + z, z - M))), Ee && (F.isLockAspectRatio() || ne.inputEvent?.shiftKey)) {
|
|
2386
2386
|
const B = g / z, G = h.width / h.height;
|
|
2387
2387
|
G > B ? h.height = h.width / B : G < B && (h.width = h.height * B);
|
|
2388
2388
|
}
|
|
2389
|
-
|
|
2389
|
+
ne.direction[0] === -1 && (h.x = Math.max(0, Math.min(X.startBounds.x + g, X.startBounds.x + g - h.width))), ne.direction[1] === -1 && (h.y = Math.min(X.startBounds.y + z, X.startBounds.y + z - h.height)), X.movable.setBounds(n.toAbsoluteBounds(h));
|
|
2390
2390
|
}
|
|
2391
|
-
}, onResizeEnd: (
|
|
2392
|
-
N(!1),
|
|
2393
|
-
}, onDragStart: (
|
|
2394
|
-
he(
|
|
2395
|
-
}, onDrag: (
|
|
2396
|
-
if (!
|
|
2391
|
+
}, onResizeEnd: (ne) => {
|
|
2392
|
+
N(!1), xe();
|
|
2393
|
+
}, onDragStart: (ne) => {
|
|
2394
|
+
he(ne.target, "Move");
|
|
2395
|
+
}, onDrag: (ne) => {
|
|
2396
|
+
if (!se.current) return ne.stopDrag(), void Ae();
|
|
2397
2397
|
k(!0);
|
|
2398
|
-
for (let
|
|
2399
|
-
const Ve = v[
|
|
2400
|
-
|
|
2398
|
+
for (let Ee = 0; Ee < v.length; Ee++) {
|
|
2399
|
+
const Ve = v[Ee], ke = P.current.get(Ve);
|
|
2400
|
+
ke ? ke.movable.setBounds(n.toAbsoluteBounds({ ...ke.startBounds, x: ke.startBounds.x + ne.translate[0], y: ke.startBounds.y + ne.translate[1] })) : console.warn("invalid element");
|
|
2401
2401
|
}
|
|
2402
|
-
}, onDragEnd: (
|
|
2403
|
-
}, onMouseUp: (
|
|
2402
|
+
}, onDragEnd: (ne) => {
|
|
2403
|
+
}, onMouseUp: (ne) => {
|
|
2404
2404
|
} }) }), [Ge, Ne, v, n, a, C, d, q, x]);
|
|
2405
|
-
return f("div", { className: Vt(m, "movable-area", ua), style: { width: j.width, height: j.height, ...S, position: "absolute", overflow: "hidden", willChange: "transform" }, ref: Rn([
|
|
2405
|
+
return f("div", { className: Vt(m, "movable-area", ua), style: { width: j.width, height: j.height, ...S, position: "absolute", overflow: "hidden", willChange: "transform" }, ref: Rn([De, qe]), ...E, children: f("div", { className: "movable-scroll", style: { position: "absolute", cursor: "initial", left: 0, top: 0, width: j.width, height: j.height }, ...E, children: et("div", { ref: A, style: { position: "absolute", pointerEvents: "auto" }, onFocus: (ne) => {
|
|
2406
2406
|
O?.(), ye(!0);
|
|
2407
|
-
}, onBlur: (
|
|
2407
|
+
}, onBlur: (ne) => {
|
|
2408
2408
|
ye(!1);
|
|
2409
|
-
}, onKeyDownCapture: (
|
|
2410
|
-
if (
|
|
2411
|
-
const
|
|
2412
|
-
if (
|
|
2409
|
+
}, onKeyDownCapture: (ne) => {
|
|
2410
|
+
if (ne.isDefaultPrevented()) return;
|
|
2411
|
+
const Ee = ne.nativeEvent.ctrlKey, Ve = ne.nativeEvent.altKey, ke = ne.nativeEvent.shiftKey;
|
|
2412
|
+
if (ne.which === At.Escape) {
|
|
2413
2413
|
const _ = i.getMovableSelection();
|
|
2414
2414
|
let s = [..._];
|
|
2415
2415
|
return v.forEach((y) => {
|
|
@@ -2417,7 +2417,7 @@ The content is not applied.` }), new Y("pasteFormulas", w, { label: "Paste Formu
|
|
|
2417
2417
|
const M = V.current.get(y);
|
|
2418
2418
|
let g = s.indexOf(M);
|
|
2419
2419
|
s.splice(g, 1);
|
|
2420
|
-
}), s.length !== _.length && i.selectMovables(s), s.length === 0 && R?.(), void
|
|
2420
|
+
}), s.length !== _.length && i.selectMovables(s), s.length === 0 && R?.(), void ne.preventDefault();
|
|
2421
2421
|
}
|
|
2422
2422
|
const Oe = 0.1, D = (_) => {
|
|
2423
2423
|
r.updateSelected((s) => {
|
|
@@ -2439,13 +2439,13 @@ The content is not applied.` }), new Y("pasteFormulas", w, { label: "Paste Formu
|
|
|
2439
2439
|
s.setBounds(M);
|
|
2440
2440
|
}, "Nudge");
|
|
2441
2441
|
};
|
|
2442
|
-
if (
|
|
2442
|
+
if (ne.which === At.Delete) r.updateSelected((_) => {
|
|
2443
2443
|
_.delete();
|
|
2444
|
-
}, "Delete"),
|
|
2445
|
-
else if (
|
|
2444
|
+
}, "Delete"), ne.preventDefault();
|
|
2445
|
+
else if (ne.key === "a" && Ee) {
|
|
2446
2446
|
const _ = i.getMovableSelection();
|
|
2447
|
-
i.selectMovables(r.getItems(), !0), i.selectMovables(_, !0),
|
|
2448
|
-
} else
|
|
2447
|
+
i.selectMovables(r.getItems(), !0), i.selectMovables(_, !0), ne.preventDefault();
|
|
2448
|
+
} else ne.key === "ArrowLeft" ? (ke ? X(Oe, !1) : Ve ? D(-10) : F({ x: Ee ? -10 : -1 }), ne.preventDefault()) : ne.key === "ArrowRight" ? (ke ? X(Oe, !0) : Ve ? D(10) : F({ x: Ee ? 10 : 1 }), ne.preventDefault()) : ne.key === "ArrowUp" ? (ke ? X(Oe, !0) : F({ y: Ee ? -10 : -1 }), ne.preventDefault()) : ne.key === "ArrowDown" && (ke ? X(Oe, !1) : F({ y: Ee ? 10 : 1 }), ne.preventDefault());
|
|
2449
2449
|
}, children: [re, Qe] }) }) });
|
|
2450
2450
|
})), bn = (e) => {
|
|
2451
2451
|
let t = Number.MAX_SAFE_INTEGER, n = Number.MAX_SAFE_INTEGER, r = 0, i = 0;
|
|
@@ -2476,7 +2476,7 @@ The content is not applied.` }), new Y("pasteFormulas", w, { label: "Paste Formu
|
|
|
2476
2476
|
};
|
|
2477
2477
|
function ha(e) {
|
|
2478
2478
|
const { movables: t, movablesView: n, transactional: r, commands: i, target: o, onRepeatCommandChange: l, notifier: c } = e, p = gn();
|
|
2479
|
-
|
|
2479
|
+
Te(p.getMode()).current = p.getMode();
|
|
2480
2480
|
const a = le(async (R, O, v = null, w = !0) => {
|
|
2481
2481
|
const q = async () => {
|
|
2482
2482
|
const N = await Promise.resolve(c?.showBusy?.(R.label()));
|
|
@@ -2515,19 +2515,19 @@ function ha(e) {
|
|
|
2515
2515
|
}
|
|
2516
2516
|
x?.commit();
|
|
2517
2517
|
});
|
|
2518
|
-
}, [n, r]), [S, b] = me(n.getMovableSelection()[0] ?? null), [T, E] = me(!S || S?.isProtected()), j =
|
|
2518
|
+
}, [n, r]), [S, b] = me(n.getMovableSelection()[0] ?? null), [T, E] = me(!S || S?.isProtected()), j = Se(() => [new Y("moveToFront", o, { label: "Bring to Front", description: "Move to the front of all of the other drawings.", shortcut: { key: "BracketRight", modifiers: [te.Ctrl, te.Shift] } }, function() {
|
|
2519
2519
|
m(this, (R) => {
|
|
2520
2520
|
R.moveToFront();
|
|
2521
2521
|
});
|
|
2522
|
-
}), new Y("moveForward", o, { label: "Bring Forward", description: "Move forward one layer in the z order.", shortcut: { key: "BracketRight", modifiers: [
|
|
2522
|
+
}), new Y("moveForward", o, { label: "Bring Forward", description: "Move forward one layer in the z order.", shortcut: { key: "BracketRight", modifiers: [te.Ctrl] } }, function() {
|
|
2523
2523
|
m(this, (R) => {
|
|
2524
2524
|
R.moveForward();
|
|
2525
2525
|
});
|
|
2526
|
-
}), new Y("moveToBack", o, { label: "Send to Back", description: "Move to the back of all of the other drawings.", shortcut: { key: "BracketLeft", modifiers: [
|
|
2526
|
+
}), new Y("moveToBack", o, { label: "Send to Back", description: "Move to the back of all of the other drawings.", shortcut: { key: "BracketLeft", modifiers: [te.Ctrl, te.Shift] } }, function() {
|
|
2527
2527
|
m(this, (R) => {
|
|
2528
2528
|
R.moveToBack();
|
|
2529
2529
|
});
|
|
2530
|
-
}), new Y("moveBackward", o, { label: "Send Backward", description: "Move backwards one layer in the z order.", shortcut: { key: "BracketLeft", modifiers: [
|
|
2530
|
+
}), new Y("moveBackward", o, { label: "Send Backward", description: "Move backwards one layer in the z order.", shortcut: { key: "BracketLeft", modifiers: [te.Ctrl] } }, function() {
|
|
2531
2531
|
m(this, (R) => {
|
|
2532
2532
|
R.moveBackward();
|
|
2533
2533
|
});
|
|
@@ -2582,7 +2582,7 @@ function ha(e) {
|
|
|
2582
2582
|
}), new Y("formatDrawFlipHorz", o, { label: "Flip Horizontally", description: "Flip the selected drawings horizontally." }), new Y("formatDrawFlipVert", o, { label: "Flip Vertically", description: "Flip the selected drawings vertically." }), new Y("formatDrawGroup", o, { label: "Group", description: "Group the selected drawings into a single drawing." }), new Y("formatDrawUngroup", o, { label: "Ungroup", description: "Break the group of a drawing into individual drawings." }), new Y("formatDrawSwapShapes", o, { label: "Swap Shapes", description: "Swap the positions of the swap." }), new Y("formatDrawSwapShapesHorz", o, { label: "Swap Shapes Horizontally", description: "Swap the positions of the swap horizontally." }), new Y("formatDrawSwapShapesVert", o, { label: "Swap Shapes Vertically", description: "Swap the positions of the swap vertically." })], [n, S]);
|
|
2583
2583
|
be(() => {
|
|
2584
2584
|
}, [p]);
|
|
2585
|
-
const H =
|
|
2585
|
+
const H = Se(() => {
|
|
2586
2586
|
let R = null;
|
|
2587
2587
|
return R = i ? i.createChildGroup(o, "movable", !1) : new Co(o, "movable"), R.addCommands(j, !0), R;
|
|
2588
2588
|
}, [i, j]);
|
|
@@ -2623,7 +2623,7 @@ const od = ft(yt((e, t) => {
|
|
|
2623
2623
|
be(() => {
|
|
2624
2624
|
n?.getStage();
|
|
2625
2625
|
}, [n?.getStage()]);
|
|
2626
|
-
const d =
|
|
2626
|
+
const d = Se(() => f(ga, { ref: t, view: n, movables: r.getMovables(), disableResize: !r.getProtection().isObjectsAllowed(), disableDrag: !r.getProtection().isObjectsAllowed(), movablesView: r.getView(), transactional: r, renderMovable: o, ...i, onFocus: () => {
|
|
2627
2627
|
C.activate(), i?.onFocus?.();
|
|
2628
2628
|
} }, "movable-area"), [r, i, l, C]);
|
|
2629
2629
|
return d && n ? d : null;
|
|
@@ -2632,9 +2632,9 @@ const od = ft(yt((e, t) => {
|
|
|
2632
2632
|
Bt(() => {
|
|
2633
2633
|
if (T === null) return H(null), void O(null);
|
|
2634
2634
|
const A = () => {
|
|
2635
|
-
const
|
|
2636
|
-
let Ge,
|
|
2637
|
-
|
|
2635
|
+
const se = r.getRange(T).getCell(), we = se.getStyle();
|
|
2636
|
+
let Ge, Ae = we.getFill()?.toCSS(i.body.darkMode);
|
|
2637
|
+
Ae.background !== "none" && Ae.background !== "transparent" || (Ae = r.getStyles().getNormal().getFill().toCSS(i.body.darkMode)), Ae.background !== "none" && Ae.background !== "transparent" || (Ae = { background: i.body.fill }), H({ style: Ae }), se && !se.getFormula() && (Ge = se?.getRenderHorizontalAlignment()), O(Ge ?? cl.Left);
|
|
2638
2638
|
};
|
|
2639
2639
|
return A(), r.getRange(T).addListener(() => {
|
|
2640
2640
|
A();
|
|
@@ -2643,32 +2643,32 @@ const od = ft(yt((e, t) => {
|
|
|
2643
2643
|
const v = le(() => {
|
|
2644
2644
|
let A = S.editState.dirty ?? "";
|
|
2645
2645
|
if (S.editState.dirty !== void 0) {
|
|
2646
|
-
const
|
|
2646
|
+
const se = tr.clampString(A);
|
|
2647
2647
|
try {
|
|
2648
|
-
const we = S.sheet.getRange(S.coords), Ge = `Typing '${
|
|
2648
|
+
const we = S.sheet.getRange(S.coords), Ge = `Typing '${se}' into ${we.toString()}`;
|
|
2649
2649
|
return we.setValue(A, { description: Ge, autoFit: !0 }), E(null), b(null), C.setMode(null), c(null), !0;
|
|
2650
2650
|
} catch (we) {
|
|
2651
|
-
throw a.showError(new Error(`Unable to enter '${
|
|
2651
|
+
throw a.showError(new Error(`Unable to enter '${se}'.`, { cause: we })), we;
|
|
2652
2652
|
}
|
|
2653
2653
|
}
|
|
2654
2654
|
}, [r, S, a]), w = le((A) => r.getRange(A).getCell().getExtrusions() ?? Ct.cellToRange(A), [r]), q = le((A) => {
|
|
2655
|
-
let
|
|
2656
|
-
A !==
|
|
2657
|
-
}, [r]), N = Ze((A,
|
|
2658
|
-
if (o) return o(A,
|
|
2655
|
+
let se = Ce.Orientation.Row, we = !1;
|
|
2656
|
+
A !== Ce.Direction.Up && A !== Ce.Direction.Down || (se = Ce.Orientation.Column), A !== Ce.Direction.Left && A !== Ce.Direction.Up || (we = !0), r.getSelection().traverse(se, we);
|
|
2657
|
+
}, [r]), N = Ze((A, se) => {
|
|
2658
|
+
if (o) return o(A, se);
|
|
2659
2659
|
if (!r) return null;
|
|
2660
2660
|
const { ref: we, ...Ge } = A;
|
|
2661
|
-
return f(Dl, { ref: we, ...Ge, sheet: r, bodyStyle: i?.body, activeCoords:
|
|
2662
|
-
const ue = { sheet: r, coords:
|
|
2663
|
-
C.setMode((
|
|
2661
|
+
return f(Dl, { ref: we, ...Ge, sheet: r, bodyStyle: i?.body, activeCoords: se, commands: p, onChangeEdit: (Ae) => {
|
|
2662
|
+
const ue = { sheet: r, coords: se, editState: Ae };
|
|
2663
|
+
C.setMode((Ie) => ({ ...Ie, description: ue.editState.editMode ? "Edit" : "Enter", args: { ...Ie?.args, stateAndCoords: ue } }));
|
|
2664
2664
|
}, editState: S.editState });
|
|
2665
2665
|
}, [r, j, o, S, T]), { overlay: x, startEdit: k, submitEdit: W, cancelEdit: U, onKeyboardEventNative: V, onPointerEventNative: L } = kl({ view: n, activeCoords: d, getCellEditor: N, canEdit: () => {
|
|
2666
2666
|
const A = r.getProtection();
|
|
2667
2667
|
if (A.isReadOnly()) return !1;
|
|
2668
|
-
const
|
|
2669
|
-
return
|
|
2668
|
+
const se = A.isLocked();
|
|
2669
|
+
return se && l(), !se;
|
|
2670
2670
|
}, onBeforeStartEdit: (A) => {
|
|
2671
|
-
const
|
|
2671
|
+
const se = El(() => r.getRange(A).getCell()), we = { sheet: r, coords: A, editState: Object.freeze(se) };
|
|
2672
2672
|
C.setMode({ key: "edit", args: { stateAndCoords: we } }), b(we);
|
|
2673
2673
|
}, onStartEdit: (A) => {
|
|
2674
2674
|
E(A), c(A);
|
|
@@ -2682,19 +2682,19 @@ const od = ft(yt((e, t) => {
|
|
|
2682
2682
|
} });
|
|
2683
2683
|
const P = le((A) => {
|
|
2684
2684
|
L(A), T && W();
|
|
2685
|
-
}, [L, U, T]),
|
|
2685
|
+
}, [L, U, T]), ee = Ze((A) => {
|
|
2686
2686
|
L(A);
|
|
2687
2687
|
}, [L]), I = Ze((A) => {
|
|
2688
2688
|
V(A);
|
|
2689
2689
|
}, [V]);
|
|
2690
2690
|
return be(() => {
|
|
2691
2691
|
const A = n?.getStage();
|
|
2692
|
-
if (A) return A.addEventListener("pointerdown", P), A.addEventListener("dblclick",
|
|
2693
|
-
A.removeEventListener("pointerdown", P), A.removeEventListener("dblclick",
|
|
2692
|
+
if (A) return A.addEventListener("pointerdown", P), A.addEventListener("dblclick", ee), A.addEventListener("keydown", I), () => {
|
|
2693
|
+
A.removeEventListener("pointerdown", P), A.removeEventListener("dblclick", ee), A.removeEventListener("keydown", I);
|
|
2694
2694
|
};
|
|
2695
2695
|
}, [n?.getStage()]), be(() => {
|
|
2696
|
-
const A = C.getMode(),
|
|
2697
|
-
|
|
2696
|
+
const A = C.getMode(), se = A?.key;
|
|
2697
|
+
se === "edit" || se === "enter" ? S ? A.args?.cancel ? U() : A.args?.submit ? W() : b(A.args?.stateAndCoords) : k(A.args?.start) : T && U();
|
|
2698
2698
|
}, [C]), x(n, t);
|
|
2699
2699
|
})), vi = "white", wi = "black", fa = `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='${wi}' fill='${vi}'/%3E%3C/g%3E%3C/svg%3E%0A") 15 8, pointer`, va = `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='${wi}' fill='${vi}'/%3E%3C/g%3E%3C/svg%3E%0A") 12 12, pointer`, wa = ft(yt((e, t) => {
|
|
2700
2700
|
const { view: n, sheet: r } = e, [i, o] = ot.useState(r.getTables().getCount() > 0), [l, c] = ot.useState(null), [p, a] = ot.useState(null), [C, d] = ot.useState(null), [m, S] = ot.useState(null), b = le(() => {
|
|
@@ -2808,13 +2808,13 @@ const od = ft(yt((e, t) => {
|
|
|
2808
2808
|
if (ot.useEffect(() => {
|
|
2809
2809
|
ni._validate(!0);
|
|
2810
2810
|
}, []), !n) throw new Error("ISheet must be provided.");
|
|
2811
|
-
const [
|
|
2811
|
+
const [ee, I] = ot.useReducer((Q) => Q + 1, 0), [A, { width: se, height: we }] = cn(), Ge = le(x, [x]), Ae = le(k, [k]), ue = le(W, [W]), Ie = le(U, [U]), Je = Te(!1);
|
|
2812
2812
|
Bt(() => {
|
|
2813
2813
|
Je.current = !0;
|
|
2814
2814
|
}, [n]);
|
|
2815
|
-
const Ye = n?.getStyles(), Fe =
|
|
2815
|
+
const Ye = n?.getStyles(), Fe = Se(() => Ir(r, Ye), [r, Ye]), ge = Se(() => Ir(i, Ye), [i, Ye]), { body: $ = {}, buttonSurface: Le = {} } = Fe, { header: ye = {}, headerSelect: Z = {}, headerSelectAll: K = {} } = ge, oe = Te(null), [re, he] = me(() => n?.getView()), xe = (re?.getZoomScale() ?? 100) / 100, ae = Se(() => ({ vertical: re.isShowColumnGridlines() && xe >= 0.4, horizontal: re.isShowRowGridlines() && xe >= 0.4 }), [re?.isShowColumnGridlines(), re?.isShowRowGridlines(), xe]), qe = Se(() => {
|
|
2816
2816
|
if (re?.getGridLineColor()) return { strokeDasharray: "1,1" };
|
|
2817
|
-
}, [re?.getGridLineColor(), Fe]),
|
|
2817
|
+
}, [re?.getGridLineColor(), Fe]), De = l ?? re?.isShowColumnHeaders(), Ne = p ?? re?.isShowRowHeaders(), [u, Be] = me({ width: 0, height: 0 }), st = Se(() => {
|
|
2818
2818
|
let Q = 40, ze = 20;
|
|
2819
2819
|
const _e = n?.getStyles().getNormal().getFont();
|
|
2820
2820
|
if (u.width > 0 && u.height > 0) {
|
|
@@ -2822,46 +2822,46 @@ const od = ft(yt((e, t) => {
|
|
|
2822
2822
|
Q = nt.width, ze = nt.lineHeight;
|
|
2823
2823
|
}
|
|
2824
2824
|
return { width: Math.round(Q + 5), height: Math.round(ze + 3) };
|
|
2825
|
-
}, [u, Fe?.header.text, n]), Ke = Ne ?
|
|
2825
|
+
}, [u, Fe?.header.text, n]), Ke = Ne ? xe * st.width : ye.edgeStrokeWidth, Qe = De ? xe * st.height : ye.edgeStrokeWidth, ne = Math.max(se, (n?.getColumnHeaders().getDefaultSize() ?? st.width) + Ke + 1), Ee = Math.max(we, (n?.getRowHeaders().getDefaultSize() ?? st.height) + Qe + 1), Ve = Te(/* @__PURE__ */ new Map()), ke = Te(null), Oe = () => ({ getColOffset: (Q) => n.getColumnHeaders().findOffset(Q), getColIndex: (Q) => n.getColumnHeaders().findIndex(Q), getRowOffset: (Q) => n.getRowHeaders().findOffset(Q), getRowIndex: (Q) => n.getRowHeaders().findIndex(Q) }), [D, X] = me(() => Oe()), [F, _] = me(!1), [s, y] = me(null), M = !0, g = Fe.selection?.strokeFill, z = Ze(() => Gt.current, []), [h, B] = me(), G = le((Q) => {
|
|
2826
2826
|
B(Q), n && n.getView() && n.getView().setTopLeft(Q ? { left: Q.left, top: Q.top } : null), m?.(Q);
|
|
2827
|
-
}, [n, m]), J =
|
|
2827
|
+
}, [n, m]), J = Te(null);
|
|
2828
2828
|
be(() => {
|
|
2829
2829
|
if (!h || !n) return;
|
|
2830
2830
|
const Q = n.getRangeAtBounds({ x: h.left, y: h.top, width: h.width, height: h.height });
|
|
2831
2831
|
J.current?.(), J.current = Q.addListener(() => {
|
|
2832
2832
|
const ze = Q.getCoords();
|
|
2833
|
-
|
|
2833
|
+
oe?.current?.invalidate(ze);
|
|
2834
2834
|
});
|
|
2835
2835
|
}, [h, n]);
|
|
2836
|
-
const [ie,
|
|
2836
|
+
const [ie, de] = me(() => n?.getView().getTopLeft()), ce = le((Q) => {
|
|
2837
2837
|
const ze = Ct.cellToRange(Q);
|
|
2838
2838
|
if (n.isClosed()) return ze;
|
|
2839
2839
|
const _e = n.getRange(ze, { excludeHidden: !0 }).getMerges();
|
|
2840
2840
|
return _e.length === 0 ? ze : _e[0];
|
|
2841
|
-
}, [n]),
|
|
2841
|
+
}, [n]), Re = (Q) => {
|
|
2842
2842
|
if (!Q || Q.coords.colIndex === 0 && Q.coords.rowIndex === 0) return null;
|
|
2843
2843
|
const ze = {};
|
|
2844
2844
|
return Q.coords.colIndex > 0 && (ze[bt.Left] = { index: Q.coords.colIndex, scrollOffset: Q.topLeft.left }), Q.coords.rowIndex > 0 && (ze[bt.Top] = { index: Q.coords.rowIndex, scrollOffset: Q.topLeft.top }), ze;
|
|
2845
|
-
}, [fe, ve] = me(() =>
|
|
2846
|
-
|
|
2845
|
+
}, [fe, ve] = me(() => Re(n.getView().getFreezePanes())), Me = gn(), We = Ze(() => oe.current, []), He = le((Q) => {
|
|
2846
|
+
Me.setMode((ze) => ze?.key === "edit" ? { ...ze, args: { ...ze.args } } : { key: "edit", args: { stateAndCoords: null, start: Q } });
|
|
2847
2847
|
}, []), tt = le(() => h, [h]), $e = Ul({ sheet: n, commands: S, target: We, onRepeatCommandChange: b, bodyStyle: $, notifier: N, onStartEdit: He, getViewport: tt }), [rt, Pe] = me(n.getSelection().isEntire()), [dt, St] = me(re?.getMovableSelection().length > 0), zt = s !== null || dt, Pt = null, [it, wt] = me(!1);
|
|
2848
2848
|
be(() => {
|
|
2849
2849
|
wt(!1);
|
|
2850
2850
|
}, [n.getProtection()]);
|
|
2851
2851
|
const Ft = le(() => {
|
|
2852
2852
|
it || (wt(!0), N.showMessage?.(et("span", { children: ["This sheet is protected.", f("br", {}), "To make a change, unprotect the sheet. You might be requested to enter a password."] }), { type: nr.Error }));
|
|
2853
|
-
}, [N, it]), Ht =
|
|
2854
|
-
const Q =
|
|
2853
|
+
}, [N, it]), Ht = Se(() => {
|
|
2854
|
+
const Q = Me.getMode();
|
|
2855
2855
|
return Q?.cursor ? Q.cursor : null;
|
|
2856
|
-
}, [Pt,
|
|
2856
|
+
}, [Pt, Me]), [Nt, Mt] = me(null), qt = Te(!1), [Qt, hn] = me([]), Dn = Te(null), [on, En] = me(_n.EmptyTopLeft), [Kt, to] = me(_n.EmptyTopLeft);
|
|
2857
2857
|
be(() => {
|
|
2858
2858
|
En({ left: ie?.left, top: 0 });
|
|
2859
2859
|
}, [ie?.left]), be(() => {
|
|
2860
2860
|
to({ left: 0, top: ie?.top });
|
|
2861
2861
|
}, [ie?.top]), gt(n?.getView(), { onFreezeSplitChange: () => {
|
|
2862
|
-
ve(
|
|
2862
|
+
ve(Re(n.getView().getFreezePanes()));
|
|
2863
2863
|
}, onTopLeftChange: () => {
|
|
2864
|
-
|
|
2864
|
+
de(n.getView().getTopLeft());
|
|
2865
2865
|
}, onMovableSelectionChange: () => {
|
|
2866
2866
|
St(n.getView().getMovableSelection().length > 0);
|
|
2867
2867
|
} }), gt(n?.getSelection(), { onChange: () => {
|
|
@@ -2879,19 +2879,19 @@ const od = ft(yt((e, t) => {
|
|
|
2879
2879
|
} }), gt(n, { onRequestScrollIntoView: async (Q, ze) => {
|
|
2880
2880
|
if (!ze) return;
|
|
2881
2881
|
const _e = { colIndex: ze?.coords.colStart, rowIndex: ze?.coords.rowStart };
|
|
2882
|
-
return await
|
|
2882
|
+
return await oe.current?.scrollCellCoordsIntoView(_e, ze?.scroll), !0;
|
|
2883
2883
|
}, onRequestFocus: () => Xe.whenFocus(Gt.current) }, qa);
|
|
2884
|
-
const Lt =
|
|
2884
|
+
const Lt = Te(!1), mn = Se(() => {
|
|
2885
2885
|
const Q = Xe.debounce((Ue) => {
|
|
2886
2886
|
requestAnimationFrame(() => {
|
|
2887
|
-
qt.current &&
|
|
2887
|
+
qt.current && Ae?.(Ue);
|
|
2888
2888
|
});
|
|
2889
2889
|
}, 32), ze = (Ue, lt) => {
|
|
2890
2890
|
qt.current = !0, Mt([(nt) => {
|
|
2891
2891
|
if (!nt.toClipBounds(nt.getRangeCoordsBounds({ rowStart: 0, rowEnd: u.height, colStart: Ue, colEnd: Ue }))) return;
|
|
2892
2892
|
const vt = nt.getLayout(), pt = Math.max(0, vt.getColOffset(Ue)), mt = nt.getBounds(), Ot = Math.min(mt.x + mt.width, vt.getColOffset(Ue + 1)), _t = nt.getAnchor();
|
|
2893
2893
|
if (lt !== null && (_t === bt.Left || _t === bt.Center || _t === bt.Right)) {
|
|
2894
|
-
const Oo = Xe.roundAccurately(lt * Xe.getDPI(), 0), io = Xe.roundAccurately(n?.getColumnWidthAsFontUnit(lt /
|
|
2894
|
+
const Oo = Xe.roundAccurately(lt * Xe.getDPI(), 0), io = Xe.roundAccurately(n?.getColumnWidthAsFontUnit(lt / xe), 2).toFixed(2), Bo = "Width: " + (lt ? io + " (" + Oo + " pixels)" : "Hidden"), Nn = wn.current.getGridElement().getRelativePointFromClient(0, 0), yn = 0 - Nn.y, lo = 0 - Nn.y + Qe, Vo = Nn.x - mt.x;
|
|
2895
2895
|
Q({ anchor: { x: pt - Vo, y: yn, width: Ot - pt, height: lo - yn }, display: Bo });
|
|
2896
2896
|
}
|
|
2897
2897
|
const ln = [0, 0, 0, mt.height], zo = { style: { boxShadow: `0.5px 0px 0px 0px ${r?.body?.fill}` }, pathProps: { stroke: g } }, Fo = { x: pt - 1, y: 0, width: 1, height: mt.height }, No = { style: { boxShadow: `-0.5px 0px 0px 0px ${r?.body?.fill}` }, pathProps: { stroke: g } }, Lo = { x: Ot - 1, y: 0, width: 1, height: mt.height };
|
|
@@ -2908,11 +2908,11 @@ const od = ft(yt((e, t) => {
|
|
|
2908
2908
|
Lt.current && ze(Ue, lt);
|
|
2909
2909
|
}, 360);
|
|
2910
2910
|
}, onResizeHeadersEnd: (Ue, lt, nt) => {
|
|
2911
|
-
_e?.commit({ description: nt }), _e = null, Lt.current = !1, requestAnimationFrame(() =>
|
|
2911
|
+
_e?.commit({ description: nt }), _e = null, Lt.current = !1, requestAnimationFrame(() => Ie?.()), qt.current = !1, Mt(null);
|
|
2912
2912
|
}, onResizeHeadersUp: (Ue) => {
|
|
2913
|
-
Lt.current = !1, requestAnimationFrame(() =>
|
|
2913
|
+
Lt.current = !1, requestAnimationFrame(() => Ie?.()), qt.current = !1, Mt(null);
|
|
2914
2914
|
}, ...c };
|
|
2915
|
-
}, [n, c, Qe, Nt]), An =
|
|
2915
|
+
}, [n, c, Qe, Nt]), An = Se(() => {
|
|
2916
2916
|
const Q = Xe.debounce((Ue) => {
|
|
2917
2917
|
requestAnimationFrame(() => {
|
|
2918
2918
|
qt.current && ue?.(Ue);
|
|
@@ -2922,7 +2922,7 @@ const od = ft(yt((e, t) => {
|
|
|
2922
2922
|
if (!nt.toClipBounds(nt.getRangeCoordsBounds({ rowStart: Ue, rowEnd: Ue, colStart: 0, colEnd: u.width }))) return;
|
|
2923
2923
|
const vt = nt.getLayout(), pt = Math.max(0, vt.getRowOffset(Ue)), mt = nt.getBounds(), Ot = Math.min(mt.y + mt.height, vt.getRowOffset(Ue + 1)), _t = nt.getAnchor();
|
|
2924
2924
|
if (lt !== null && (_t === bt.Top || _t === bt.Center || _t === bt.Bottom)) {
|
|
2925
|
-
const Oo = Math.floor(10 * Xe.getDPI()) / 10, io = Xe.roundAccurately(lt * Oo, 0), Bo = Xe.roundAccurately(io /
|
|
2925
|
+
const Oo = Math.floor(10 * Xe.getDPI()) / 10, io = Xe.roundAccurately(lt * Oo, 0), Bo = Xe.roundAccurately(io / xe / (n?.getRowHeaders().getScaleFactor() * Xe.getDPI()), 2).toFixed(2), Nn = "Height: " + (lt ? Bo + " (" + io + " pixels)" : "Hidden"), yn = vn.current.getGridElement().getRelativePointFromClient(0, 0), lo = 0 - yn.x, Vo = 0 - yn.x + Ke, el = yn.y - mt.y;
|
|
2926
2926
|
Q({ anchor: { x: lo, y: pt - el, width: Vo - lo, height: Ot - pt }, display: Nn });
|
|
2927
2927
|
}
|
|
2928
2928
|
const ln = [0, 0, mt.width, 0], zo = { style: { boxShadow: `0px 0.5px 0px 0px ${r?.body?.fill}` }, pathProps: { stroke: g } }, Fo = { x: 0, y: pt - 1, width: mt.width, height: 1 }, No = { style: { boxShadow: `0px -0.5px 0px 0px ${r?.body?.fill}` }, pathProps: { stroke: g } }, Lo = { x: 0, y: Ot - 1, width: mt.width, height: 1 };
|
|
@@ -2939,47 +2939,47 @@ const od = ft(yt((e, t) => {
|
|
|
2939
2939
|
Lt.current && ze(Ue, lt);
|
|
2940
2940
|
}, 360);
|
|
2941
2941
|
}, onResizeHeadersEnd: (Ue, lt, nt) => {
|
|
2942
|
-
_e?.commit({ description: nt }), _e = null, Lt.current = !1, requestAnimationFrame(() =>
|
|
2942
|
+
_e?.commit({ description: nt }), _e = null, Lt.current = !1, requestAnimationFrame(() => Ie?.()), qt.current = !1, Mt(null);
|
|
2943
2943
|
}, onResizeHeadersUp: (Ue) => {
|
|
2944
|
-
Lt.current = !1, requestAnimationFrame(() =>
|
|
2944
|
+
Lt.current = !1, requestAnimationFrame(() => Ie?.()), qt.current = !1, Mt(null);
|
|
2945
2945
|
}, ...a };
|
|
2946
2946
|
}, [n, a, Ke]), Gt = Zt(t, () => {
|
|
2947
2947
|
const Q = (_e) => {
|
|
2948
|
-
n?.getView() && n.getView().selectMovables([]),
|
|
2948
|
+
n?.getView() && n.getView().selectMovables([]), ke.current = null, oe?.current?.focus(_e);
|
|
2949
2949
|
}, ze = async (_e = null) => {
|
|
2950
2950
|
if (_e || (_e = n?.getView().getMovableSelection()[0]), !_e) return !1;
|
|
2951
2951
|
const Ue = _e.getAnchorCoords();
|
|
2952
2952
|
if (!Ue) return !1;
|
|
2953
|
-
const lt =
|
|
2953
|
+
const lt = oe.current?.getViewFromCellCoords({ colIndex: Ue.colStart, rowIndex: Ue.rowStart });
|
|
2954
2954
|
if (!lt) return !1;
|
|
2955
2955
|
const nt = lt.getAnchor();
|
|
2956
2956
|
n?.getView().getMovableSelection().indexOf(_e) === -1 && n?.getView().selectMovables([_e]);
|
|
2957
2957
|
let vt = Ve.current?.get(nt);
|
|
2958
|
-
return vt?.current ? (await vt.current.focusMovable(_e), !0) : (
|
|
2958
|
+
return vt?.current ? (await vt.current.focusMovable(_e), !0) : (ke.current = { movable: _e, anchor: nt }, !0);
|
|
2959
2959
|
};
|
|
2960
|
-
return { getGridElement: () =>
|
|
2961
|
-
|
|
2960
|
+
return { getGridElement: () => oe.current, getRowHeaderElement: () => vn.current, getColumnHeaderElement: () => wn.current, rowHeaderHeight: () => Qe, colHeaderWidth: () => Ke, startEdit: He, submitEdit: () => {
|
|
2961
|
+
Me.setMode((_e) => _e?.key !== "edit" ? _e : { key: "edit", args: { stateAndCoords: null, submit: !0 } });
|
|
2962
2962
|
}, cancelEdit: () => {
|
|
2963
|
-
|
|
2963
|
+
Me.setMode((_e) => _e?.key !== "edit" ? _e : { key: "edit", args: { stateAndCoords: null, cancel: !0 } });
|
|
2964
2964
|
}, isEditing: s !== null, focus: (_e) => {
|
|
2965
2965
|
n?.getView().getMovableSelection().length > 0 && ze() || Q(_e);
|
|
2966
|
-
}, focusSheet: Q, focusMovable: ze, contains: (_e) =>
|
|
2966
|
+
}, focusSheet: Q, focusMovable: ze, contains: (_e) => oe?.current?.contains?.(_e), invalidate: rn, isSheetElement: () => !0, getSheet: () => n };
|
|
2967
2967
|
}, [n]), rn = Ze((Q) => {
|
|
2968
|
-
Je.current || (
|
|
2968
|
+
Je.current || (oe?.current?.invalidate(Q), I?.());
|
|
2969
2969
|
}, []);
|
|
2970
2970
|
be(() => {
|
|
2971
2971
|
rn();
|
|
2972
2972
|
}, [Fe]);
|
|
2973
|
-
const no = rt ? K.edgeStrokeFill : ye.fill, ht = rt ? Z.fill : typeof Fe.headerHover == "function" ? Fe.headerHover(ye)?.fill : ye.fill, oo =
|
|
2973
|
+
const no = rt ? K.edgeStrokeFill : ye.fill, ht = rt ? Z.fill : typeof Fe.headerHover == "function" ? Fe.headerHover(ye)?.fill : ye.fill, oo = Se(() => H ? f("div", { className: Vt("sheetxl-viewport-overlay", Pl), style: { width: "100%", height: "100%", boxSizing: "border-box", position: "absolute" }, children: H }) : f(xn, {}), [H]);
|
|
2974
2974
|
let pn = null;
|
|
2975
|
-
|
|
2975
|
+
De && Ne && (pn = et("div", { tabIndex: -1, className: "top-left-corner", style: { padding: "2 2", position: "absolute", height: `${Qe}px`, width: `${Ke}px`, zIndex: 1, boxSizing: "border-box", cursor: "cell" }, onMouseDown: (Q) => {
|
|
2976
2976
|
let ze = !Q.ctrlKey;
|
|
2977
|
-
$e?.getCommand("selectAll")?.execute(!ze || Q.button !== 0), Q.nativeEvent.which === li.Right ? o?.({ originalEvent: Q, clientX: Q.clientX, clientY: Q.clientY, rowIndex: -1, colIndex: -1 }) :
|
|
2977
|
+
$e?.getCommand("selectAll")?.execute(!ze || Q.button !== 0), Q.nativeEvent.which === li.Right ? o?.({ originalEvent: Q, clientX: Q.clientX, clientY: Q.clientY, rowIndex: -1, colIndex: -1 }) : oe.current?.focus();
|
|
2978
2978
|
}, children: [f("div", { style: { height: Qe - 5 + "px", width: Qe - 5 + "px", clipPath: `path('M${Qe - 5} 0 L0 ${Qe - 5} L${Qe - 5} ${Qe - 5} L${Qe - 5} 0 Z')`, borderRight: `2px solid ${no}`, borderBottom: `2px solid ${no}`, background: `${ht}`, boxSizing: "border-box", position: "absolute", right: "2px", bottom: "2px" } }), f("div", { style: { position: "absolute", height: `${Qe}px`, width: `${Ke}px`, boxSizing: "border-box", borderRight: `solid 1px ${ye.strokeFill}`, borderBottom: `solid 1px ${ye.strokeFill}`, right: "-1px", bottom: "-1px" } })] }));
|
|
2979
2979
|
const In = le(({ _left: Q, _top: ze }) => {
|
|
2980
2980
|
}, []), xt = le((Q) => {
|
|
2981
2981
|
if (!o) return;
|
|
2982
|
-
const ze =
|
|
2982
|
+
const ze = oe.current.getViewFromClient(Q.clientX, Q.clientY)?.getCellCoordsFromClient(Q.clientX, Q.clientY);
|
|
2983
2983
|
ze && (o({ originalEvent: Q, clientX: Q.clientX, clientY: Q.clientY, rowIndex: ze.rowIndex, colIndex: ze.colIndex }), Q.stopPropagation(), Q.preventDefault());
|
|
2984
2984
|
}, [o]), Et = le((Q) => {
|
|
2985
2985
|
if (!(!Q.shiftKey && (Q.ctrlKey || Q.metaKey))) return;
|
|
@@ -2989,7 +2989,7 @@ const od = ft(yt((e, t) => {
|
|
|
2989
2989
|
be(() => {
|
|
2990
2990
|
hn(null), Dn.current = null, qt.current = !1, Mt(null);
|
|
2991
2991
|
const Q = n?.getView().getTopLeft();
|
|
2992
|
-
In(Q),
|
|
2992
|
+
In(Q), oe.current?.scrollTo(Q), de(Q), he(n.getView()), ve(Re(n.getView().getFreezePanes())), X(Oe()), I();
|
|
2993
2993
|
}, [n?.getView()]);
|
|
2994
2994
|
const zn = le((Q) => {
|
|
2995
2995
|
const ze = Q.getVisibleRangeCoords();
|
|
@@ -3010,15 +3010,15 @@ const od = ft(yt((e, t) => {
|
|
|
3010
3010
|
const Q = [];
|
|
3011
3011
|
E && Q.push(...E), Nt && Q.push(...Nt), Xe.isEqualArrays(Q, Dn.current) || (Dn.current = Q, hn(Q));
|
|
3012
3012
|
}, [E, Nt, Fe]);
|
|
3013
|
-
const Fn =
|
|
3014
|
-
Q.isDefaultPrevented() || Q.isPropagationStopped() || (
|
|
3015
|
-
}, [n]), Mo =
|
|
3016
|
-
const Q =
|
|
3013
|
+
const Fn = Se(() => ({ style: { boxShadow: `0.5px 0.5px 0px 0px ${r?.body?.fill}` }, pathProps: { stroke: r?.body?.text?.fill ?? "black" } }), [Fe?.header?.edgeStrokeFill]), fn = le((Q) => {
|
|
3014
|
+
Q.isDefaultPrevented() || Q.isPropagationStopped() || (ke.current = null, n?.getView().getMovableSelection().length > 0 && n.getView().selectMovables([]));
|
|
3015
|
+
}, [n]), Mo = Se(() => {
|
|
3016
|
+
const Q = Me.getMode();
|
|
3017
3017
|
return Q?.key === "cut" || Q?.key === "copy";
|
|
3018
|
-
}, [
|
|
3019
|
-
const ze =
|
|
3020
|
-
return Q.keyCode === At.Escape && ze ? (Q.preventDefault(), void
|
|
3021
|
-
}, [$e,
|
|
3018
|
+
}, [Me]), Do = le(async (Q) => {
|
|
3019
|
+
const ze = Me.getMode();
|
|
3020
|
+
return Q.keyCode === At.Escape && ze ? (Q.preventDefault(), void Me.setMode(null)) : Q.keyCode === At.Enter && Mo ? (Q.preventDefault(), await $e?.getCommand("paste")?.execute(), void Me.setMode(null)) : void $e?.dispatchToFocusedCommand(Q);
|
|
3021
|
+
}, [$e, Me]), vn = Te(null), ro = Se(() => f("div", { tabIndex: -1, style: { position: "relative", flex: "0", top: `${Qe + 1}px`, width: `${Ke + ye.edgeStrokeWidth}px`, minWidth: `${Ke + ye.edgeStrokeWidth}px`, borderRight: `solid ${ye.edgeStrokeWidth}px ${ye.edgeStrokeFill}`, height: `calc(100% - ${Qe}px)`, boxSizing: "border-box", zIndex: "2" }, children: f(Dr, { ref: vn, sheetElement: Gt.current, gridRef: oe, freezeStart: fe?.[bt.Top], oppositeSize: Ke, containerWidth: Ke, containerHeight: Ee, sheetHeader: n.getRowHeaders(), gridStyle: ge, verticalPadding: Math.max(0, Math.floor(n.getStyles().getNormal().getFont().getSize() / 10)), scrollPoint: Kt, onSheetContextMenu: o, tabIndex: -1, style: { position: "relative", flex: "0", top: `${Qe + 1}px`, width: `${Ke + ye.edgeStrokeWidth}px`, minWidth: `${Ke + ye.edgeStrokeWidth}px`, borderRight: `solid ${ye.edgeStrokeWidth}px ${ye.edgeStrokeFill}`, height: `calc(100% - ${Qe}px)`, boxSizing: "border-box", zIndex: "2", ...An?.style }, ...An }) }), [Ke, Qe, Ee, n, Kt, fe?.[bt.Top], Fe, M, o, ye.fill, a]), wn = Te(null), _i = Se(() => f("div", { tabIndex: -1, style: { position: "relative", left: "0px", width: "100%", height: `${Qe + ye.edgeStrokeWidth}px`, minHeight: `${Qe + ye.edgeStrokeWidth}px`, borderBottom: `solid ${ye.edgeStrokeWidth}px ${ye.edgeStrokeFill}`, boxSizing: "border-box", zIndex: "1" }, children: f(Dr, { ref: wn, sheetElement: Gt.current, gridRef: oe, freezeStart: fe?.[bt.Left], oppositeSize: Qe, containerWidth: ne, containerHeight: Qe, sheetHeader: n.getColumnHeaders(), gridStyle: ge, scrollPoint: on, onSheetContextMenu: o, ...mn, style: { ...mn?.style, position: "relative", left: "0px", width: "100%", height: `${Qe + ye.edgeStrokeWidth}px`, minHeight: `${Qe + ye.edgeStrokeWidth}px`, borderBottom: `solid ${ye.edgeStrokeWidth}px ${ye.edgeStrokeFill}`, boxSizing: "border-box", zIndex: "1" } }) }), [Qe, ne, n, on, fe?.[bt.Left], Fe, ye.fill, M, o, c]), Zi = le((Q) => {
|
|
3022
3022
|
const { value: ze, key: _e, ...Ue } = Q;
|
|
3023
3023
|
let lt = ze, nt = s;
|
|
3024
3024
|
if (!nt || nt.colIndex === Q.coords.colIndex && nt.rowIndex === Q.coords.rowIndex || (nt = null), !lt) {
|
|
@@ -3040,28 +3040,28 @@ const od = ft(yt((e, t) => {
|
|
|
3040
3040
|
return vl(Tl, { ...Ue, key: _e, bodyStyle: $, docTheme: pt.getTheme(), normalStyle: pt.getNormal(), showFormulas: re.isShowFormulas(), showZeros: re.isShowZeros(), onLinkMouseDown: vt, ...L, value: lt });
|
|
3041
3041
|
}, [n, D, $, s, re?.isShowFormulas(), re.isShowZeros()]), Ki = Ze((Q, ze) => {
|
|
3042
3042
|
const { key: _e, ...Ue } = Q;
|
|
3043
|
-
return [f(Gl, { ref: ze, getVisibleCells: zn, sheet: n, gridStyle: Fe, ...Ue }, `border-${_e}`), f(wa, { ref: ze, sheet: n, commands: $e, ...Ue }, `table-${_e}`), f(ya, { ref: ze, sheet: n, ...Ue }, `spill-${_e}`), f(sa, { ref: ze, sheet: n, commands: $e, notifier: N, onShowTooltip: Ge, onCloseTooltip:
|
|
3043
|
+
return [f(Gl, { ref: ze, getVisibleCells: zn, sheet: n, gridStyle: Fe, ...Ue }, `border-${_e}`), f(wa, { ref: ze, sheet: n, commands: $e, ...Ue }, `table-${_e}`), f(ya, { ref: ze, sheet: n, ...Ue }, `spill-${_e}`), f(sa, { ref: ze, sheet: n, commands: $e, notifier: N, onShowTooltip: Ge, onCloseTooltip: Ie, gridStyle: Fe, gridRef: oe, editingCoords: s, isActive: M, ...Ue }, `selection-${_e}`), f(ta, { ref: ze, sheet: n, commands: $e, gridStyle: Fe, element: z, notifier: N, ...Ue }, `copy-paste-${_e}`), f(ma, { ref: ze, sheet: n, commands: $e, target: We, notifier: N, renderMovable: j, movableProps: { onUnFocus: () => {
|
|
3044
3044
|
Gt.current.focus();
|
|
3045
3045
|
} }, ...Ue }, `movable-${_e}`), f(pa, { ref: ze, sheet: n, commands: $e, notifier: N, gridStyle: Fe, getCellEditor: O, showProtectedError: Ft, setEditingCoords: y, ...Ue }, `editor-${_e}`)];
|
|
3046
|
-
}, [n,
|
|
3047
|
-
if (
|
|
3046
|
+
}, [n, oe.current, Fe, O, $e, N]), [ur, Yi] = me(!1), Xi = Se(() => {
|
|
3047
|
+
if (ne === 0 || Ee === 0) return null;
|
|
3048
3048
|
const Q = n.getStyles().getNormal(), ze = Q.getFont(), _e = Q.getFill(), Ue = Q.getBorder(), lt = Q.getFill().getType() === ho.Type.None;
|
|
3049
|
-
let nt =
|
|
3049
|
+
let nt = qe, vt = qe;
|
|
3050
3050
|
const pt = (Ot, _t, ln) => ln ? { stroke: Ue.getBottom().isNone() ? "none" : Ot.getColor().toRGBA($.darkMode).toString(), ..._t } : _t;
|
|
3051
3051
|
vt = pt(Ue.getBottom(), vt, !Ue.getBottom().isNone()), vt = pt(Ue.getTop(), vt, !Ue.getTop().isNone()), nt = pt(Ue.getRight(), nt, !Ue.getRight().isNone()), nt = pt(Ue.getLeft(), nt, !Ue.getLeft().isNone());
|
|
3052
3052
|
let mt = re?.getGridLineColor()?.toRGBA($.darkMode).toString() ?? $.strokeFill;
|
|
3053
|
-
return lt || (vt = pt(Ue.getBottom(), vt, !0), vt = pt(Ue.getTop(), vt, !0), nt = pt(Ue.getRight(), nt, !0), nt = pt(Ue.getLeft(), nt, !0)), f(di, { className: "sheetxl-sheet-primary", style: { ...ba, ..._e.toCSS($.darkMode), ...ze.toCSS($.darkMode,
|
|
3053
|
+
return lt || (vt = pt(Ue.getBottom(), vt, !0), vt = pt(Ue.getTop(), vt, !0), nt = pt(Ue.getRight(), nt, !0), nt = pt(Ue.getLeft(), nt, !0)), f(di, { className: "sheetxl-sheet-primary", style: { ...ba, ..._e.toCSS($.darkMode), ...ze.toCSS($.darkMode, xe), "--sxl-app-color-background": $.fill, "--sxl-app-color-shadow": Fe.colorShadow, "--sxl-app-color-grey": Fe.colorGrey, "--sxl-app-color-button-fill": Le.fill, "--sxl-app-color-button-text": Le.text?.fill, "--sxl-app-color-button-border": Le.edgeStrokeFill, "--sxl-app-color-primary-dark": Fe.selection.strokeFill }, ref: oe, zoom: xe, ...V, onFirstRender: (Ot) => {
|
|
3054
3054
|
Yi(!0), V?.onFirstRender?.(Ot), $e?.activate();
|
|
3055
|
-
}, showGridLines:
|
|
3055
|
+
}, showGridLines: ae, gridLineColor: mt, gridLineColumnsProps: nt, gridLineRowsProps: vt, freezeLeft: fe?.[bt.Left], freezeLeftProps: Fn, freezeTop: fe?.[bt.Top], freezeTopProps: Fn, width: ne, height: Ee, columnCount: u.width, rowCount: u.height, cursor: Ht ?? Pt ?? "cell", clipCells: !0, layout: D, cellRenderer: Zi, overlayRenderer: Ki, getCellCoordsAsRangeCoords: ce, getVisibleCells: zn, onWheelScroll: Et, onPointerDown: fn, onKeyDown: Do, onViewportChange: G, onImmediateScroll: In, scrollPoint: ie, stageProps: { onFocus: () => {
|
|
3056
3056
|
$e?.activate();
|
|
3057
3057
|
} }, overlays: Qt });
|
|
3058
|
-
}, [
|
|
3058
|
+
}, [ee]);
|
|
3059
3059
|
be(() => {
|
|
3060
3060
|
Je.current || I();
|
|
3061
|
-
}, [D, fe,
|
|
3061
|
+
}, [D, fe, xe, $e, ie?.left, ie?.top, $, V, ne, Ee, Ht, Qt, M, Pt]);
|
|
3062
3062
|
let Eo = { flex: "1 1 100%", display: "flex", alignContent: "stretch", position: "relative" };
|
|
3063
3063
|
C || (Eo = { ...Eo, ...q });
|
|
3064
|
-
const Ji =
|
|
3064
|
+
const Ji = Se(() => {
|
|
3065
3065
|
const Q = n.getStyles().getTheme(), ze = Q.getColorScheme(), _e = Q.getFontScheme();
|
|
3066
3066
|
return { "--sxl-doc-color-dk1": ze.getDk1().toCSS($.darkMode), "--sxl-doc-color-dk2": ze.getDk2().toCSS($.darkMode), "--sxl-doc-color-lt1": ze.getLt1().toCSS($.darkMode), "--sxl-doc-color-lt2": ze.getLt2().toCSS($.darkMode), "--sxl-doc-color-accent1": ze.getAccent1().toCSS($.darkMode), "--sxl-doc-color-accent2": ze.getAccent2().toCSS($.darkMode), "--sxl-doc-color-accent3": ze.getAccent3().toCSS($.darkMode), "--sxl-doc-color-accent4": ze.getAccent4().toCSS($.darkMode), "--sxl-doc-color-accent5": ze.getAccent5().toCSS($.darkMode), "--sxl-doc-color-accent6": ze.getAccent6().toCSS($.darkMode), "--sxl-doc-color-hlink": ze.getHlink().toCSS($.darkMode), "--sxl-doc-color-fol-hlink": ze.getFolHlink().toCSS($.darkMode), "--sxl-doc-font-major": _e.getMajorFont(), "--sxl-doc-font-minor": _e.getMinorFont() };
|
|
3067
3067
|
}, [n.getStyles().getTheme()]);
|
|
@@ -3074,8 +3074,8 @@ const od = ft(yt((e, t) => {
|
|
|
3074
3074
|
}, ref: Gt, ...P, children: f("div", { className: Vt("sheetxl-sheet", Hl), style: { position: "absolute", width: "100%", height: "100%", boxSizing: "border-box", display: "flex", flexDirection: "column", flex: "1 1 100%", zIndex: "0", ...Ji }, children: et("div", { style: { display: "flex", flexDirection: "row", flex: "1 1 100%" }, children: [pn, ro, et("div", { style: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden", position: "relative" }, children: [_i, et("div", { style: { display: "flex", flexDirection: "column", flex: "1 1 100%", position: "relative", borderRight: `solid ${ye.edgeStrokeWidth}px ${ye.edgeStrokeFill}`, backgroundColor: $.fill }, ref: A, onContextMenu: xt, children: [Xi, oo, f($l, { style: { position: "absolute", right: 24, bottom: 4 }, colorLicensee: Fe?.selection?.strokeFill, colorCredits: Fe?.body?.text?.fill })] })] })] }) }) });
|
|
3075
3075
|
if (C) {
|
|
3076
3076
|
const Q = (ze) => f(fi, { ...ze, sheet: n });
|
|
3077
|
-
Ao = f(ul, { style: { flex: "1 1 100%", overflow: "hidden", background: `${ye.fill}`, minHeight: 2 * st.height, minWidth: 2 * st.width, ...q }, viewport: h, touchElement:
|
|
3078
|
-
|
|
3077
|
+
Ao = f(ul, { style: { flex: "1 1 100%", overflow: "hidden", background: `${ye.fill}`, minHeight: 2 * st.height, minWidth: 2 * st.width, ...q }, viewport: h, touchElement: oe.current?.stage, disableTouch: zt, onScrollViewport: (ze) => {
|
|
3078
|
+
oe.current?.scrollTo(ze);
|
|
3079
3079
|
}, createHorizontalScrollbar: Q, createVerticalScrollbar: Q, ...d, children: Ao });
|
|
3080
3080
|
}
|
|
3081
3081
|
be(() => {
|
|
@@ -3099,7 +3099,7 @@ const rd = Object.freeze(Object.defineProperty({ __proto__: null }, Symbol.toStr
|
|
|
3099
3099
|
console.warn(k), j(!0), v(Fr), q(null);
|
|
3100
3100
|
});
|
|
3101
3101
|
}, [o]);
|
|
3102
|
-
const N = Zt(t, () => ({ isPictureEditor: () => !0 }), []), x =
|
|
3102
|
+
const N = Zt(t, () => ({ isPictureEditor: () => !0 }), []), x = Se(() => {
|
|
3103
3103
|
if (O || w) return f("img", { style: { flex: "1", width: "100%", height: "100%", border: E ? "var(--sxl-app-color-grey, grey) solid 1px" : void 0, backgroundColor: E ? "var(--sxl-app-color-background, white)" : void 0, boxShadow: E ? "0px 0px 3px var(--sxl-app-color-error, red)" : void 0, objectFit: E ? "contain" : void 0, opacity: H ? 1 : 0, filter: "var(--sxl-app-filter-dark-invert)" }, draggable: !1, src: O, onLoad: () => {
|
|
3104
3104
|
R(!0);
|
|
3105
3105
|
}, onError: ({ currentTarget: k }) => {
|
|
@@ -3122,24 +3122,24 @@ const id = ft(yt((e, t) => {
|
|
|
3122
3122
|
be(() => {
|
|
3123
3123
|
v(i);
|
|
3124
3124
|
}, [i]);
|
|
3125
|
-
const w =
|
|
3126
|
-
const I =
|
|
3125
|
+
const w = Te(null), [q, N] = me(null), x = Ze(function(ee) {
|
|
3126
|
+
const I = ee.message;
|
|
3127
3127
|
q !== I && (a?.showMessage?.(I, { type: nr.Error }), N(I));
|
|
3128
|
-
}, [a, q]), k = Ze((
|
|
3128
|
+
}, [a, q]), k = Ze((ee) => {
|
|
3129
3129
|
let I = !1;
|
|
3130
3130
|
try {
|
|
3131
|
-
I = o?.(
|
|
3131
|
+
I = o?.(ee) ?? !0;
|
|
3132
3132
|
} catch (A) {
|
|
3133
3133
|
x(A);
|
|
3134
3134
|
}
|
|
3135
|
-
return I ? (w.current = null, R(!1), v(
|
|
3135
|
+
return I ? (w.current = null, R(!1), v(ee), I) : (setTimeout(() => {
|
|
3136
3136
|
w.current?.focus();
|
|
3137
3137
|
}, 0), I);
|
|
3138
3138
|
}, [o]), W = le(() => {
|
|
3139
3139
|
v(i), w.current = null, R(!1), c?.();
|
|
3140
|
-
}, [c, i]), U =
|
|
3140
|
+
}, [c, i]), U = Se(() => {
|
|
3141
3141
|
if (!H) return null;
|
|
3142
|
-
const
|
|
3142
|
+
const ee = { className: Vt(xa), autoFocus: !0, spellCheck: !1, name: "editable-label", autoComplete: "off", maxLength: m, type: "text", value: O, onFocus: (I) => {
|
|
3143
3143
|
w.current || (w.current = I.target, setTimeout(() => {
|
|
3144
3144
|
I.target?.select();
|
|
3145
3145
|
}, 0));
|
|
@@ -3148,11 +3148,11 @@ const id = ft(yt((e, t) => {
|
|
|
3148
3148
|
}, onChange: (I) => {
|
|
3149
3149
|
H && v(I.target.value);
|
|
3150
3150
|
}, onMouseDown: (I) => I.stopPropagation(), onKeyDown: (I) => I.code === "Escape" ? (I.preventDefault(), void W()) : I.code === "Enter" ? (I.preventDefault(), void k(I.target.value)) : void (I.code !== "Tab" ? I.stopPropagation() : k(I.target.value)) };
|
|
3151
|
-
return f(xn, { children: p(
|
|
3151
|
+
return f(xn, { children: p(ee) });
|
|
3152
3152
|
}, [H, O, k, W, p, S]), [V, L] = me();
|
|
3153
3153
|
Bt(() => {
|
|
3154
|
-
let
|
|
3155
|
-
(d || E) && (
|
|
3154
|
+
let ee = Object.assign({}, n);
|
|
3155
|
+
(d || E) && (ee = Object.assign(ee, C)), L(ee);
|
|
3156
3156
|
}, [d, E, C, n]), be(() => {
|
|
3157
3157
|
U && l?.(O);
|
|
3158
3158
|
}, [U, l, O]);
|
|
@@ -3191,7 +3191,7 @@ function Sn(e) {
|
|
|
3191
3191
|
}
|
|
3192
3192
|
const Ut = So ? Bt : be;
|
|
3193
3193
|
function xo(e) {
|
|
3194
|
-
const t =
|
|
3194
|
+
const t = Te(e);
|
|
3195
3195
|
return Ut(() => {
|
|
3196
3196
|
t.current = e;
|
|
3197
3197
|
}), Ze(function() {
|
|
@@ -3201,33 +3201,33 @@ function xo(e) {
|
|
|
3201
3201
|
}
|
|
3202
3202
|
function Kn(e, t) {
|
|
3203
3203
|
t === void 0 && (t = [e]);
|
|
3204
|
-
const n =
|
|
3204
|
+
const n = Te(e);
|
|
3205
3205
|
return Ut(() => {
|
|
3206
3206
|
n.current !== e && (n.current = e);
|
|
3207
3207
|
}, t), n;
|
|
3208
3208
|
}
|
|
3209
3209
|
function Wn(e, t) {
|
|
3210
|
-
const n =
|
|
3211
|
-
return
|
|
3210
|
+
const n = Te();
|
|
3211
|
+
return Se(() => {
|
|
3212
3212
|
const r = e(n.current);
|
|
3213
3213
|
return n.current = r, r;
|
|
3214
3214
|
}, [...t]);
|
|
3215
3215
|
}
|
|
3216
3216
|
function po(e) {
|
|
3217
|
-
const t = xo(e), n =
|
|
3217
|
+
const t = xo(e), n = Te(null), r = Ze((i) => {
|
|
3218
3218
|
i !== n.current && t?.(i, n.current), n.current = i;
|
|
3219
3219
|
}, []);
|
|
3220
3220
|
return [n, r];
|
|
3221
3221
|
}
|
|
3222
3222
|
function fo(e) {
|
|
3223
|
-
const t =
|
|
3223
|
+
const t = Te();
|
|
3224
3224
|
return be(() => {
|
|
3225
3225
|
t.current = e;
|
|
3226
3226
|
}, [e]), t.current;
|
|
3227
3227
|
}
|
|
3228
3228
|
let Wo = {};
|
|
3229
3229
|
function Qn(e, t) {
|
|
3230
|
-
return
|
|
3230
|
+
return Se(() => {
|
|
3231
3231
|
if (t) return t;
|
|
3232
3232
|
const n = Wo[e] == null ? 0 : Wo[e] + 1;
|
|
3233
3233
|
return Wo[e] = n, e + "-" + n;
|
|
@@ -3330,7 +3330,7 @@ function za(e) {
|
|
|
3330
3330
|
if (!m) throw new Error("useDndMonitor must be used within a children of <DndContext>");
|
|
3331
3331
|
return m(d);
|
|
3332
3332
|
}, [d, m]);
|
|
3333
|
-
})(
|
|
3333
|
+
})(Se(() => ({ onDragStart(d) {
|
|
3334
3334
|
let { active: m } = d;
|
|
3335
3335
|
o(t.onDragStart({ active: m }));
|
|
3336
3336
|
}, onDragMove(d) {
|
|
@@ -3353,7 +3353,7 @@ var kt;
|
|
|
3353
3353
|
function wo() {
|
|
3354
3354
|
}
|
|
3355
3355
|
function $o(e, t) {
|
|
3356
|
-
return
|
|
3356
|
+
return Se(() => ({ sensor: e, options: t ?? {} }), [e, t]);
|
|
3357
3357
|
}
|
|
3358
3358
|
(function(e) {
|
|
3359
3359
|
e.DragStart = "dragStart", e.DragMove = "dragMove", e.DragEnd = "dragEnd", e.DragCancel = "dragCancel", e.DragOver = "dragOver", e.RegisterDroppable = "registerDroppable", e.SetDroppableDisabled = "setDroppableDisabled", e.UnregisterDroppable = "unregisterDroppable";
|
|
@@ -3770,25 +3770,25 @@ function Ya(e) {
|
|
|
3770
3770
|
return { x: { [Tt.Backward]: k.x[Tt.Backward] || W.x === -1, [Tt.Forward]: k.x[Tt.Forward] || W.x === 1 }, y: { [Tt.Backward]: k.y[Tt.Backward] || W.y === -1, [Tt.Forward]: k.y[Tt.Forward] || W.y === 1 } };
|
|
3771
3771
|
}, [N, q, x]);
|
|
3772
3772
|
})({ delta: d, disabled: !o }), [b, T] = (function() {
|
|
3773
|
-
const w =
|
|
3773
|
+
const w = Te(null);
|
|
3774
3774
|
return [Ze((q, N) => {
|
|
3775
3775
|
w.current = setInterval(q, N);
|
|
3776
3776
|
}, []), Ze(() => {
|
|
3777
3777
|
w.current !== null && (clearInterval(w.current), w.current = null);
|
|
3778
3778
|
}, [])];
|
|
3779
|
-
})(), E =
|
|
3779
|
+
})(), E = Te({ x: 0, y: 0 }), j = Te({ x: 0, y: 0 }), H = Se(() => {
|
|
3780
3780
|
switch (n) {
|
|
3781
3781
|
case Un.Pointer:
|
|
3782
3782
|
return p ? { top: p.y, bottom: p.y, left: p.x, right: p.x } : null;
|
|
3783
3783
|
case Un.DraggableRect:
|
|
3784
3784
|
return i;
|
|
3785
3785
|
}
|
|
3786
|
-
}, [n, i, p]), R =
|
|
3786
|
+
}, [n, i, p]), R = Te(null), O = Ze(() => {
|
|
3787
3787
|
const w = R.current;
|
|
3788
3788
|
if (!w) return;
|
|
3789
3789
|
const q = E.current.x * j.current.x, N = E.current.y * j.current.y;
|
|
3790
3790
|
w.scrollBy(q, N);
|
|
3791
|
-
}, []), v =
|
|
3791
|
+
}, []), v = Se(() => c === yo.TreeOrder ? [...a].reverse() : a, [c, a]);
|
|
3792
3792
|
be(() => {
|
|
3793
3793
|
if (o && a.length && H) {
|
|
3794
3794
|
for (const w of v) {
|
|
@@ -3825,7 +3825,7 @@ function Qo(e, t) {
|
|
|
3825
3825
|
}
|
|
3826
3826
|
function bo(e) {
|
|
3827
3827
|
let { callback: t, disabled: n } = e;
|
|
3828
|
-
const r = xo(t), i =
|
|
3828
|
+
const r = xo(t), i = Se(() => {
|
|
3829
3829
|
if (n || typeof window > "u" || window.ResizeObserver === void 0) return;
|
|
3830
3830
|
const { ResizeObserver: o } = window;
|
|
3831
3831
|
return new o(r);
|
|
@@ -3849,7 +3849,7 @@ function Ur(e, t, n) {
|
|
|
3849
3849
|
}
|
|
3850
3850
|
const l = (function(p) {
|
|
3851
3851
|
let { callback: a, disabled: C } = p;
|
|
3852
|
-
const d = xo(a), m =
|
|
3852
|
+
const d = xo(a), m = Se(() => {
|
|
3853
3853
|
if (C || typeof window > "u" || window.MutationObserver === void 0) return;
|
|
3854
3854
|
const { MutationObserver: S } = window;
|
|
3855
3855
|
return new S(d);
|
|
@@ -3871,7 +3871,7 @@ function Ur(e, t, n) {
|
|
|
3871
3871
|
const jr = [];
|
|
3872
3872
|
function Gr(e, t) {
|
|
3873
3873
|
t === void 0 && (t = []);
|
|
3874
|
-
const n =
|
|
3874
|
+
const n = Te(null);
|
|
3875
3875
|
return be(() => {
|
|
3876
3876
|
n.current = null;
|
|
3877
3877
|
}, t), be(() => {
|
|
@@ -3880,7 +3880,7 @@ function Gr(e, t) {
|
|
|
3880
3880
|
}, [e]), n.current ? Yn(e, n.current) : jt;
|
|
3881
3881
|
}
|
|
3882
3882
|
function _r(e) {
|
|
3883
|
-
return
|
|
3883
|
+
return Se(() => e ? (function(t) {
|
|
3884
3884
|
const n = t.innerWidth, r = t.innerHeight;
|
|
3885
3885
|
return { top: 0, left: 0, right: n, bottom: r, width: n, height: r };
|
|
3886
3886
|
})(e) : null, [e]);
|
|
@@ -3984,19 +3984,19 @@ const is = ft(function(e) {
|
|
|
3984
3984
|
const [h] = me(() => /* @__PURE__ */ new Set()), B = Ze((G) => (h.add(G), () => h.delete(G)), [h]);
|
|
3985
3985
|
return [Ze((G) => {
|
|
3986
3986
|
let { type: J, event: ie } = G;
|
|
3987
|
-
h.forEach((
|
|
3987
|
+
h.forEach((de) => {
|
|
3988
3988
|
var ce;
|
|
3989
|
-
return (ce =
|
|
3989
|
+
return (ce = de[J]) == null ? void 0 : ce.call(de, ie);
|
|
3990
3990
|
});
|
|
3991
3991
|
}, [h]), B];
|
|
3992
|
-
})(), [R, O] = me(nn.Uninitialized), v = R === nn.Initialized, { draggable: { active: w, nodes: q, translate: N }, droppable: { containers: x } } = T, k = w != null ? q.get(w) : null, W =
|
|
3992
|
+
})(), [R, O] = me(nn.Uninitialized), v = R === nn.Initialized, { draggable: { active: w, nodes: q, translate: N }, droppable: { containers: x } } = T, k = w != null ? q.get(w) : null, W = Te({ initial: null, translated: null }), U = Se(() => {
|
|
3993
3993
|
var h;
|
|
3994
3994
|
return w != null ? { id: w, data: (h = k?.data) != null ? h : es, rect: W } : null;
|
|
3995
|
-
}, [w, k]), V =
|
|
3996
|
-
var
|
|
3997
|
-
const { droppableRects: ue, measureDroppableContainers:
|
|
3995
|
+
}, [w, k]), V = Te(null), [L, P] = me(null), [ee, I] = me(null), A = Kn(S, Object.values(S)), se = Qn("DndDescribedBy", o), we = Se(() => x.getEnabled(), [x]), Ge = Se(() => ({ draggable: { ...mo.draggable, ...Ae?.draggable }, droppable: { ...mo.droppable, ...Ae?.droppable }, dragOverlay: { ...mo.dragOverlay, ...Ae?.dragOverlay } }), [(Ae = d) == null ? void 0 : Ae.draggable, Ae?.droppable, Ae?.dragOverlay]);
|
|
3996
|
+
var Ae;
|
|
3997
|
+
const { droppableRects: ue, measureDroppableContainers: Ie, measuringScheduled: Je } = (function(h, B) {
|
|
3998
3998
|
let { dragging: G, dependencies: J, config: ie } = B;
|
|
3999
|
-
const [
|
|
3999
|
+
const [de, ce] = me(null), { frequency: Re, measure: fe, strategy: ve } = ie, Me = Te(h), We = (function() {
|
|
4000
4000
|
switch (ve) {
|
|
4001
4001
|
case Xn.Always:
|
|
4002
4002
|
return !1;
|
|
@@ -4007,13 +4007,13 @@ const is = ft(function(e) {
|
|
|
4007
4007
|
}
|
|
4008
4008
|
})(), He = Kn(We), tt = Ze(function(Pe) {
|
|
4009
4009
|
Pe === void 0 && (Pe = []), He.current || ce((dt) => dt === null ? Pe : dt.concat(Pe.filter((St) => !dt.includes(St))));
|
|
4010
|
-
}, [He]), $e =
|
|
4010
|
+
}, [He]), $e = Te(null), rt = Wn((Pe) => {
|
|
4011
4011
|
if (We && !G) return $r;
|
|
4012
|
-
if (!Pe || Pe === $r ||
|
|
4012
|
+
if (!Pe || Pe === $r || Me.current !== h || de != null) {
|
|
4013
4013
|
const dt = /* @__PURE__ */ new Map();
|
|
4014
4014
|
for (let St of h) {
|
|
4015
4015
|
if (!St) continue;
|
|
4016
|
-
if (
|
|
4016
|
+
if (de && de.length > 0 && !de.includes(St.id) && St.rect.current) {
|
|
4017
4017
|
dt.set(St.id, St.rect.current);
|
|
4018
4018
|
continue;
|
|
4019
4019
|
}
|
|
@@ -4023,25 +4023,25 @@ const is = ft(function(e) {
|
|
|
4023
4023
|
return dt;
|
|
4024
4024
|
}
|
|
4025
4025
|
return Pe;
|
|
4026
|
-
}, [h,
|
|
4026
|
+
}, [h, de, G, We, fe]);
|
|
4027
4027
|
return be(() => {
|
|
4028
|
-
|
|
4028
|
+
Me.current = h;
|
|
4029
4029
|
}, [h]), be(() => {
|
|
4030
4030
|
We || tt();
|
|
4031
4031
|
}, [G, We]), be(() => {
|
|
4032
|
-
|
|
4033
|
-
}, [JSON.stringify(
|
|
4034
|
-
We || typeof
|
|
4032
|
+
de && de.length > 0 && ce(null);
|
|
4033
|
+
}, [JSON.stringify(de)]), be(() => {
|
|
4034
|
+
We || typeof Re != "number" || $e.current !== null || ($e.current = setTimeout(() => {
|
|
4035
4035
|
tt(), $e.current = null;
|
|
4036
|
-
},
|
|
4037
|
-
}, [
|
|
4036
|
+
}, Re));
|
|
4037
|
+
}, [Re, We, tt, ...J]), { droppableRects: rt, measureDroppableContainers: tt, measuringScheduled: de != null };
|
|
4038
4038
|
})(we, { dragging: v, dependencies: [N.x, N.y], config: Ge.droppable }), Ye = (function(h, B) {
|
|
4039
4039
|
const G = B != null ? h.get(B) : void 0, J = G ? G.node.current : null;
|
|
4040
4040
|
return Wn((ie) => {
|
|
4041
|
-
var
|
|
4042
|
-
return B == null ? null : (
|
|
4041
|
+
var de;
|
|
4042
|
+
return B == null ? null : (de = J ?? ie) != null ? de : null;
|
|
4043
4043
|
}, [J, B]);
|
|
4044
|
-
})(q, w), Fe =
|
|
4044
|
+
})(q, w), Fe = Se(() => ee ? vo(ee) : null, [ee]), ge = (function() {
|
|
4045
4045
|
const h = L?.autoScrollEnabled === !1, B = typeof c == "object" ? c.enabled === !1 : c === !1, G = v && !h && !B;
|
|
4046
4046
|
return typeof c == "object" ? { ...c, enabled: G } : { enabled: G };
|
|
4047
4047
|
})(), $ = (function(h, B) {
|
|
@@ -4049,110 +4049,110 @@ const is = ft(function(e) {
|
|
|
4049
4049
|
})(Ye, Ge.draggable.measure);
|
|
4050
4050
|
(function(h) {
|
|
4051
4051
|
let { activeNode: B, measure: G, initialRect: J, config: ie = !0 } = h;
|
|
4052
|
-
const
|
|
4052
|
+
const de = Te(!1), { x: ce, y: Re } = typeof ie == "boolean" ? { x: ie, y: ie } : ie;
|
|
4053
4053
|
Ut(() => {
|
|
4054
|
-
if (!ce && !
|
|
4055
|
-
if (
|
|
4054
|
+
if (!ce && !Re || !B) return void (de.current = !1);
|
|
4055
|
+
if (de.current || !J) return;
|
|
4056
4056
|
const fe = B?.node.current;
|
|
4057
4057
|
if (!fe || fe.isConnected === !1) return;
|
|
4058
4058
|
const ve = Br(G(fe), J);
|
|
4059
|
-
if (ce || (ve.x = 0),
|
|
4060
|
-
const
|
|
4061
|
-
|
|
4059
|
+
if (ce || (ve.x = 0), Re || (ve.y = 0), de.current = !0, Math.abs(ve.x) > 0 || Math.abs(ve.y) > 0) {
|
|
4060
|
+
const Me = Ri(fe);
|
|
4061
|
+
Me && Me.scrollBy({ top: ve.y, left: ve.x });
|
|
4062
4062
|
}
|
|
4063
|
-
}, [B, ce,
|
|
4063
|
+
}, [B, ce, Re, J, G]);
|
|
4064
4064
|
})({ activeNode: w != null ? q.get(w) : null, config: ge.layoutShiftCompensation, initialRect: $, measure: Ge.draggable.measure });
|
|
4065
|
-
const Le = Ur(Ye, Ge.draggable.measure, $), ye = Ur(Ye ? Ye.parentElement : null), Z =
|
|
4065
|
+
const Le = Ur(Ye, Ge.draggable.measure, $), ye = Ur(Ye ? Ye.parentElement : null), Z = Te({ activatorEvent: null, active: null, activeNode: Ye, collisionRect: null, collisions: null, droppableRects: ue, draggableNodes: q, draggingNode: null, draggingNodeRect: null, droppableContainers: x, over: null, scrollableAncestors: [], scrollAdjustedTranslate: null }), K = x.getNodeFor((t = Z.current.over) == null ? void 0 : t.id), oe = (function(h) {
|
|
4066
4066
|
let { measure: B } = h;
|
|
4067
4067
|
const [G, J] = me(null), ie = bo({ callback: Ze((fe) => {
|
|
4068
4068
|
for (const { target: ve } of fe) if (Jn(ve)) {
|
|
4069
|
-
J((
|
|
4069
|
+
J((Me) => {
|
|
4070
4070
|
const We = B(ve);
|
|
4071
|
-
return
|
|
4071
|
+
return Me ? { ...Me, width: We.width, height: We.height } : We;
|
|
4072
4072
|
});
|
|
4073
4073
|
break;
|
|
4074
4074
|
}
|
|
4075
|
-
}, [B]) }),
|
|
4075
|
+
}, [B]) }), de = Ze((fe) => {
|
|
4076
4076
|
const ve = Oi(fe);
|
|
4077
4077
|
ie?.disconnect(), ve && ie?.observe(ve), J(ve ? B(ve) : null);
|
|
4078
|
-
}, [B, ie]), [ce,
|
|
4079
|
-
return
|
|
4080
|
-
})({ measure: Ge.dragOverlay.measure }), re = (n =
|
|
4081
|
-
var
|
|
4082
|
-
const
|
|
4083
|
-
const B =
|
|
4078
|
+
}, [B, ie]), [ce, Re] = po(de);
|
|
4079
|
+
return Se(() => ({ nodeRef: ce, rect: G, setRef: Re }), [G, ce, Re]);
|
|
4080
|
+
})({ measure: Ge.dragOverlay.measure }), re = (n = oe.nodeRef.current) != null ? n : Ye, he = v ? (r = oe.rect) != null ? r : Le : null, xe = !!(oe.nodeRef.current && oe.rect), ae = Br(qe = xe ? null : Le, Qo(qe));
|
|
4081
|
+
var qe;
|
|
4082
|
+
const De = _r(re ? It(re) : null), Ne = (function(h) {
|
|
4083
|
+
const B = Te(h), G = Wn((J) => h ? J && J !== jr && h && B.current && h.parentNode === B.current.parentNode ? J : Ro(h) : jr, [h]);
|
|
4084
4084
|
return be(() => {
|
|
4085
4085
|
B.current = h;
|
|
4086
4086
|
}, [h]), G;
|
|
4087
4087
|
})(v ? K ?? Ye : null), u = (function(h, B) {
|
|
4088
4088
|
B === void 0 && (B = Mn);
|
|
4089
|
-
const [G] = h, J = _r(G ? It(G) : null), [ie,
|
|
4089
|
+
const [G] = h, J = _r(G ? It(G) : null), [ie, de] = me(Zr);
|
|
4090
4090
|
function ce() {
|
|
4091
|
-
|
|
4091
|
+
de(() => h.length ? h.map((fe) => Di(fe) ? J : new Yo(B(fe), fe)) : Zr);
|
|
4092
4092
|
}
|
|
4093
|
-
const
|
|
4093
|
+
const Re = bo({ callback: ce });
|
|
4094
4094
|
return Ut(() => {
|
|
4095
|
-
|
|
4095
|
+
Re?.disconnect(), ce(), h.forEach((fe) => Re?.observe(fe));
|
|
4096
4096
|
}, [h]), ie;
|
|
4097
|
-
})(Ne), Be = Hi(m, { transform: { x: N.x -
|
|
4098
|
-
const [B, G] = me(null), J =
|
|
4099
|
-
const ce = Uo(
|
|
4100
|
-
ce && G((
|
|
4097
|
+
})(Ne), Be = Hi(m, { transform: { x: N.x - ae.x, y: N.y - ae.y, scaleX: 1, scaleY: 1 }, activatorEvent: ee, active: U, activeNodeRect: Le, containerNodeRect: ye, draggingNodeRect: he, over: Z.current.over, overlayNodeRect: oe.rect, scrollableAncestors: Ne, scrollableAncestorRects: u, windowRect: De }), st = Fe ? Cn(Fe, N) : null, Ke = (function(h) {
|
|
4098
|
+
const [B, G] = me(null), J = Te(h), ie = Ze((de) => {
|
|
4099
|
+
const ce = Uo(de.target);
|
|
4100
|
+
ce && G((Re) => Re ? (Re.set(ce, Ko(ce)), new Map(Re)) : null);
|
|
4101
4101
|
}, []);
|
|
4102
4102
|
return be(() => {
|
|
4103
|
-
const
|
|
4104
|
-
if (h !==
|
|
4105
|
-
ce(
|
|
4106
|
-
const
|
|
4103
|
+
const de = J.current;
|
|
4104
|
+
if (h !== de) {
|
|
4105
|
+
ce(de);
|
|
4106
|
+
const Re = h.map((fe) => {
|
|
4107
4107
|
const ve = Uo(fe);
|
|
4108
4108
|
return ve ? (ve.addEventListener("scroll", ie, { passive: !0 }), [ve, Ko(ve)]) : null;
|
|
4109
4109
|
}).filter((fe) => fe != null);
|
|
4110
|
-
G(
|
|
4110
|
+
G(Re.length ? new Map(Re) : null), J.current = h;
|
|
4111
4111
|
}
|
|
4112
4112
|
return () => {
|
|
4113
|
-
ce(h), ce(
|
|
4113
|
+
ce(h), ce(de);
|
|
4114
4114
|
};
|
|
4115
|
-
function ce(
|
|
4116
|
-
|
|
4115
|
+
function ce(Re) {
|
|
4116
|
+
Re.forEach((fe) => {
|
|
4117
4117
|
const ve = Uo(fe);
|
|
4118
4118
|
ve?.removeEventListener("scroll", ie);
|
|
4119
4119
|
});
|
|
4120
4120
|
}
|
|
4121
|
-
}, [ie, h]),
|
|
4122
|
-
})(Ne), Qe = Gr(Ke),
|
|
4121
|
+
}, [ie, h]), Se(() => h.length ? B ? Array.from(B.values()).reduce((de, ce) => Cn(de, ce), jt) : Ai(h) : jt, [h, B]);
|
|
4122
|
+
})(Ne), Qe = Gr(Ke), ne = Gr(Ke, [Le]), Ee = Cn(Be, Qe), Ve = he ? Ha(he, Be) : null, ke = U && Ve ? C({ active: U, collisionRect: Ve, droppableRects: ue, droppableContainers: we, pointerCoordinates: st }) : null, Oe = xi(ke, "id"), [D, X] = me(null), F = (function(h, B, G) {
|
|
4123
4123
|
return { ...h, scaleX: B && G ? B.width / G.width : 1, scaleY: B && G ? B.height / G.height : 1 };
|
|
4124
|
-
})(
|
|
4124
|
+
})(xe ? Be : Cn(Be, ne), (i = D?.rect) != null ? i : null, Le), _ = Te(null), s = Ze((h, B) => {
|
|
4125
4125
|
let { sensor: G, options: J } = B;
|
|
4126
4126
|
if (V.current == null) return;
|
|
4127
4127
|
const ie = q.get(V.current);
|
|
4128
4128
|
if (!ie) return;
|
|
4129
|
-
const
|
|
4129
|
+
const de = h.nativeEvent, ce = new G({ active: V.current, activeNode: ie, event: de, options: J, context: Z, onAbort(fe) {
|
|
4130
4130
|
if (!q.get(fe)) return;
|
|
4131
|
-
const { onDragAbort: ve } = A.current,
|
|
4132
|
-
ve?.(
|
|
4133
|
-
}, onPending(fe, ve,
|
|
4131
|
+
const { onDragAbort: ve } = A.current, Me = { id: fe };
|
|
4132
|
+
ve?.(Me), j({ type: "onDragAbort", event: Me });
|
|
4133
|
+
}, onPending(fe, ve, Me, We) {
|
|
4134
4134
|
if (!q.get(fe)) return;
|
|
4135
|
-
const { onDragPending: He } = A.current, tt = { id: fe, constraint: ve, initialCoordinates:
|
|
4135
|
+
const { onDragPending: He } = A.current, tt = { id: fe, constraint: ve, initialCoordinates: Me, offset: We };
|
|
4136
4136
|
He?.(tt), j({ type: "onDragPending", event: tt });
|
|
4137
4137
|
}, onStart(fe) {
|
|
4138
4138
|
const ve = V.current;
|
|
4139
4139
|
if (ve == null) return;
|
|
4140
|
-
const
|
|
4141
|
-
if (!
|
|
4142
|
-
const { onDragStart: We } = A.current, He = { activatorEvent:
|
|
4140
|
+
const Me = q.get(ve);
|
|
4141
|
+
if (!Me) return;
|
|
4142
|
+
const { onDragStart: We } = A.current, He = { activatorEvent: de, active: { id: ve, data: Me.data, rect: W } };
|
|
4143
4143
|
Hn(() => {
|
|
4144
|
-
We?.(He), O(nn.Initializing), E({ type: kt.DragStart, initialCoordinates: fe, active: ve }), j({ type: "onDragStart", event: He }), P(_.current), I(
|
|
4144
|
+
We?.(He), O(nn.Initializing), E({ type: kt.DragStart, initialCoordinates: fe, active: ve }), j({ type: "onDragStart", event: He }), P(_.current), I(de);
|
|
4145
4145
|
});
|
|
4146
4146
|
}, onMove(fe) {
|
|
4147
4147
|
E({ type: kt.DragMove, coordinates: fe });
|
|
4148
|
-
}, onEnd:
|
|
4149
|
-
function
|
|
4148
|
+
}, onEnd: Re(kt.DragEnd), onCancel: Re(kt.DragCancel) });
|
|
4149
|
+
function Re(fe) {
|
|
4150
4150
|
return async function() {
|
|
4151
|
-
const { active: ve, collisions:
|
|
4151
|
+
const { active: ve, collisions: Me, over: We, scrollAdjustedTranslate: He } = Z.current;
|
|
4152
4152
|
let tt = null;
|
|
4153
4153
|
if (ve && He) {
|
|
4154
4154
|
const { cancelDrop: $e } = A.current;
|
|
4155
|
-
tt = { activatorEvent:
|
|
4155
|
+
tt = { activatorEvent: de, active: ve, collisions: Me, delta: He, over: We }, fe === kt.DragEnd && typeof $e == "function" && await Promise.resolve($e(tt)) && (fe = kt.DragCancel);
|
|
4156
4156
|
}
|
|
4157
4157
|
V.current = null, Hn(() => {
|
|
4158
4158
|
E({ type: fe }), O(nn.Uninitialized), X(null), P(null), I(null), _.current = null;
|
|
@@ -4166,14 +4166,14 @@ const is = ft(function(e) {
|
|
|
4166
4166
|
}
|
|
4167
4167
|
_.current = ce;
|
|
4168
4168
|
}, [q]), y = Ze((h, B) => (G, J) => {
|
|
4169
|
-
const ie = G.nativeEvent,
|
|
4170
|
-
if (V.current !== null || !
|
|
4171
|
-
const ce = { active:
|
|
4169
|
+
const ie = G.nativeEvent, de = q.get(J);
|
|
4170
|
+
if (V.current !== null || !de || ie.dndKit || ie.defaultPrevented) return;
|
|
4171
|
+
const ce = { active: de };
|
|
4172
4172
|
h(G, B.options, ce) === !0 && (ie.dndKit = { capturedBy: B.sensor }, V.current = J, s(G, B));
|
|
4173
4173
|
}, [q, s]), M = (function(h, B) {
|
|
4174
|
-
return
|
|
4174
|
+
return Se(() => h.reduce((G, J) => {
|
|
4175
4175
|
const { sensor: ie } = J;
|
|
4176
|
-
return [...G, ...ie.activators.map((
|
|
4176
|
+
return [...G, ...ie.activators.map((de) => ({ eventName: de.eventName, handler: B(de.handler, J) }))];
|
|
4177
4177
|
}, []), [h, B]);
|
|
4178
4178
|
})(a, y);
|
|
4179
4179
|
(function(h) {
|
|
@@ -4195,27 +4195,27 @@ const is = ft(function(e) {
|
|
|
4195
4195
|
}, [Le, R]), be(() => {
|
|
4196
4196
|
const { onDragMove: h } = A.current, { active: B, activatorEvent: G, collisions: J, over: ie } = Z.current;
|
|
4197
4197
|
if (!B || !G) return;
|
|
4198
|
-
const
|
|
4198
|
+
const de = { active: B, activatorEvent: G, collisions: J, delta: { x: Ee.x, y: Ee.y }, over: ie };
|
|
4199
4199
|
Hn(() => {
|
|
4200
|
-
h?.(
|
|
4200
|
+
h?.(de), j({ type: "onDragMove", event: de });
|
|
4201
4201
|
});
|
|
4202
|
-
}, [
|
|
4202
|
+
}, [Ee.x, Ee.y]), be(() => {
|
|
4203
4203
|
const { active: h, activatorEvent: B, collisions: G, droppableContainers: J, scrollAdjustedTranslate: ie } = Z.current;
|
|
4204
4204
|
if (!h || V.current == null || !B || !ie) return;
|
|
4205
|
-
const { onDragOver:
|
|
4205
|
+
const { onDragOver: de } = A.current, ce = J.get(Oe), Re = ce && ce.rect.current ? { id: ce.id, rect: ce.rect.current, data: ce.data, disabled: ce.disabled } : null, fe = { active: h, activatorEvent: B, collisions: G, delta: { x: ie.x, y: ie.y }, over: Re };
|
|
4206
4206
|
Hn(() => {
|
|
4207
|
-
X(
|
|
4207
|
+
X(Re), de?.(fe), j({ type: "onDragOver", event: fe });
|
|
4208
4208
|
});
|
|
4209
4209
|
}, [Oe]), Ut(() => {
|
|
4210
|
-
Z.current = { activatorEvent:
|
|
4211
|
-
}, [U, Ye,
|
|
4212
|
-
const g =
|
|
4213
|
-
return ot.createElement(qi.Provider, { value: H }, ot.createElement(eo.Provider, { value: z }, ot.createElement(Vi.Provider, { value: g }, ot.createElement(To.Provider, { value: F }, p)), ot.createElement(rs, { disabled: l?.restoreFocus === !1 })), ot.createElement(za, { ...l, hiddenTextDescribedById:
|
|
4210
|
+
Z.current = { activatorEvent: ee, active: U, activeNode: Ye, collisionRect: Ve, collisions: ke, droppableRects: ue, draggableNodes: q, draggingNode: re, draggingNodeRect: he, droppableContainers: x, over: D, scrollableAncestors: Ne, scrollAdjustedTranslate: Ee }, W.current = { initial: he, translated: Ve };
|
|
4211
|
+
}, [U, Ye, ke, Ve, q, re, he, ue, x, D, Ne, Ee]), Ya({ ...ge, delta: N, draggingRect: Ve, pointerCoordinates: st, scrollableAncestors: Ne, scrollableAncestorRects: u });
|
|
4212
|
+
const g = Se(() => ({ active: U, activeNode: Ye, activeNodeRect: Le, activatorEvent: ee, collisions: ke, containerNodeRect: ye, dragOverlay: oe, draggableNodes: q, droppableContainers: x, droppableRects: ue, over: D, measureDroppableContainers: Ie, scrollableAncestors: Ne, scrollableAncestorRects: u, measuringConfiguration: Ge, measuringScheduled: Je, windowRect: De }), [U, Ye, Le, ee, ke, ye, oe, q, x, ue, D, Ie, Ne, u, Ge, Je, De]), z = Se(() => ({ activatorEvent: ee, activators: M, active: U, activeNodeRect: Le, ariaDescribedById: { draggable: se }, dispatch: E, draggableNodes: q, over: D, measureDroppableContainers: Ie }), [ee, M, U, Le, E, se, q, D, Ie]);
|
|
4213
|
+
return ot.createElement(qi.Provider, { value: H }, ot.createElement(eo.Provider, { value: z }, ot.createElement(Vi.Provider, { value: g }, ot.createElement(To.Provider, { value: F }, p)), ot.createElement(rs, { disabled: l?.restoreFocus === !1 })), ot.createElement(za, { ...l, hiddenTextDescribedById: se }));
|
|
4214
4214
|
}), ls = kn(null), Kr = "button";
|
|
4215
4215
|
function as(e) {
|
|
4216
4216
|
let { id: t, data: n, disabled: r = !1, attributes: i } = e;
|
|
4217
4217
|
const o = Qn("Draggable"), { activators: l, activatorEvent: c, active: p, activeNodeRect: a, ariaDescribedById: C, draggableNodes: d, over: m } = Jt(eo), { role: S = Kr, roleDescription: b = "draggable", tabIndex: T = 0 } = i ?? {}, E = p?.id === t, j = Jt(E ? To : ls), [H, R] = po(), [O, v] = po(), w = (function(N, x) {
|
|
4218
|
-
return
|
|
4218
|
+
return Se(() => N.reduce((k, W) => {
|
|
4219
4219
|
let { eventName: U, handler: V } = W;
|
|
4220
4220
|
return k[U] = (L) => {
|
|
4221
4221
|
V(L, x);
|
|
@@ -4225,7 +4225,7 @@ function as(e) {
|
|
|
4225
4225
|
return Ut(() => (d.set(t, { id: t, key: o, node: H, activatorNode: O, data: q }), () => {
|
|
4226
4226
|
const N = d.get(t);
|
|
4227
4227
|
N && N.key === o && d.delete(t);
|
|
4228
|
-
}), [d, t]), { active: p, activatorEvent: c, activeNodeRect: a, attributes:
|
|
4228
|
+
}), [d, t]), { active: p, activatorEvent: c, activeNodeRect: a, attributes: Se(() => ({ role: S, tabIndex: T, "aria-disabled": r, "aria-pressed": !(!E || S !== Kr) || void 0, "aria-roledescription": b, "aria-describedby": C.draggable }), [r, S, T, E, b, C.draggable]), isDragging: E, listeners: r ? void 0 : w, node: H, over: m, setNodeRef: R, setActivatorNodeRef: v, transform: j };
|
|
4229
4229
|
}
|
|
4230
4230
|
function Pi() {
|
|
4231
4231
|
return Jt(Vi);
|
|
@@ -4297,7 +4297,7 @@ function fs(e) {
|
|
|
4297
4297
|
}
|
|
4298
4298
|
let Yr = 0;
|
|
4299
4299
|
function vs(e) {
|
|
4300
|
-
return
|
|
4300
|
+
return Se(() => {
|
|
4301
4301
|
if (e != null) return Yr++, Yr;
|
|
4302
4302
|
}, [e]);
|
|
4303
4303
|
}
|
|
@@ -4340,7 +4340,7 @@ const go = { scaleX: 1, scaleY: 1 }, bs = (e) => {
|
|
|
4340
4340
|
}, $i = "Sortable", Ui = ot.createContext({ activeIndex: -1, containerId: $i, disableTransforms: !1, items: [], overIndex: -1, useDragOverlay: !1, sortedRects: [], strategy: sr, disabled: { draggable: !1, droppable: !1 } });
|
|
4341
4341
|
function qs(e) {
|
|
4342
4342
|
let { children: t, id: n, items: r, strategy: i = sr, disabled: o = !1 } = e;
|
|
4343
|
-
const { active: l, dragOverlay: c, droppableRects: p, over: a, measureDroppableContainers: C } = Pi(), d = Qn($i, n), m = c.rect !== null, S =
|
|
4343
|
+
const { active: l, dragOverlay: c, droppableRects: p, over: a, measureDroppableContainers: C } = Pi(), d = Qn($i, n), m = c.rect !== null, S = Se(() => r.map((w) => typeof w == "object" && "id" in w ? w.id : w), [r]), b = l != null, T = l ? S.indexOf(l.id) : -1, E = a ? S.indexOf(a.id) : -1, j = Te(S), H = !(function(w, q) {
|
|
4344
4344
|
if (w === q) return !0;
|
|
4345
4345
|
if (w.length !== q.length) return !1;
|
|
4346
4346
|
for (let N = 0; N < w.length; N++) if (w[N] !== q[N]) return !1;
|
|
@@ -4353,7 +4353,7 @@ function qs(e) {
|
|
|
4353
4353
|
}, [H, S, b, C]), be(() => {
|
|
4354
4354
|
j.current = S;
|
|
4355
4355
|
}, [S]);
|
|
4356
|
-
const v =
|
|
4356
|
+
const v = Se(() => ({ activeIndex: T, containerId: d, disabled: O, disableTransforms: R, items: S, overIndex: E, useDragOverlay: m, sortedRects: ys(S, p), strategy: i }), [T, d, O.draggable, O.droppable, R, S, E, p, m, i]);
|
|
4357
4357
|
return ot.createElement(Ui.Provider, { value: v }, t);
|
|
4358
4358
|
}
|
|
4359
4359
|
const Cs = (e) => {
|
|
@@ -4365,56 +4365,56 @@ const Cs = (e) => {
|
|
|
4365
4365
|
}, xs = { duration: 200, easing: "ease" }, ji = "transform", ks = un.Transition.toString({ property: ji, duration: 0, easing: "linear" }), Rs = { roleDescription: "sortable" };
|
|
4366
4366
|
function Ts(e) {
|
|
4367
4367
|
let { animateLayoutChanges: t = Ss, attributes: n, disabled: r, data: i, getNewIndex: o = Cs, id: l, strategy: c, resizeObserverConfig: p, transition: a = xs } = e;
|
|
4368
|
-
const { items: C, containerId: d, activeIndex: m, disabled: S, disableTransforms: b, sortedRects: T, overIndex: E, useDragOverlay: j, strategy: H } = Jt(Ui), R = (function(K,
|
|
4368
|
+
const { items: C, containerId: d, activeIndex: m, disabled: S, disableTransforms: b, sortedRects: T, overIndex: E, useDragOverlay: j, strategy: H } = Jt(Ui), R = (function(K, oe) {
|
|
4369
4369
|
var re, he;
|
|
4370
|
-
return typeof K == "boolean" ? { draggable: K, droppable: !1 } : { draggable: (re = K?.draggable) != null ? re :
|
|
4371
|
-
})(r, S), O = C.indexOf(l), v =
|
|
4372
|
-
let { data:
|
|
4373
|
-
const
|
|
4370
|
+
return typeof K == "boolean" ? { draggable: K, droppable: !1 } : { draggable: (re = K?.draggable) != null ? re : oe.draggable, droppable: (he = K?.droppable) != null ? he : oe.droppable };
|
|
4371
|
+
})(r, S), O = C.indexOf(l), v = Se(() => ({ sortable: { containerId: d, index: O, items: C }, ...i }), [d, i, O, C]), w = Se(() => C.slice(C.indexOf(l)), [C, l]), { rect: q, node: N, isOver: x, setNodeRef: k } = (function(K) {
|
|
4372
|
+
let { data: oe, disabled: re = !1, id: he, resizeObserverConfig: xe } = K;
|
|
4373
|
+
const ae = Qn("Droppable"), { active: qe, dispatch: De, over: Ne, measureDroppableContainers: u } = Jt(eo), Be = Te({ disabled: re }), st = Te(!1), Ke = Te(null), Qe = Te(null), { disabled: ne, updateMeasurementsFor: Ee, timeout: Ve } = { ...ss, ...xe }, ke = Kn(Ee ?? he), Oe = bo({ callback: Ze(() => {
|
|
4374
4374
|
st.current ? (Qe.current != null && clearTimeout(Qe.current), Qe.current = setTimeout(() => {
|
|
4375
|
-
u(Array.isArray(
|
|
4375
|
+
u(Array.isArray(ke.current) ? ke.current : [ke.current]), Qe.current = null;
|
|
4376
4376
|
}, Ve)) : st.current = !0;
|
|
4377
|
-
}, [Ve]), disabled:
|
|
4377
|
+
}, [Ve]), disabled: ne || !qe }), D = Ze((s, y) => {
|
|
4378
4378
|
Oe && (y && (Oe.unobserve(y), st.current = !1), s && Oe.observe(s));
|
|
4379
|
-
}, [Oe]), [X, F] = po(D), _ = Kn(
|
|
4379
|
+
}, [Oe]), [X, F] = po(D), _ = Kn(oe);
|
|
4380
4380
|
return be(() => {
|
|
4381
4381
|
Oe && X.current && (Oe.disconnect(), st.current = !1, Oe.observe(X.current));
|
|
4382
|
-
}, [X, Oe]), be(() => (
|
|
4383
|
-
re !== Be.current.disabled && (
|
|
4384
|
-
}, [he,
|
|
4385
|
-
})({ id: l, data: v, disabled: R.droppable, resizeObserverConfig: { updateMeasurementsFor: w, ...p } }), { active: W, activatorEvent: U, activeNodeRect: V, attributes: L, setNodeRef: P, listeners:
|
|
4386
|
-
for (var K = arguments.length,
|
|
4387
|
-
return
|
|
4388
|
-
|
|
4389
|
-
},
|
|
4390
|
-
})(k, P),
|
|
4391
|
-
let { disabled:
|
|
4392
|
-
const [
|
|
4382
|
+
}, [X, Oe]), be(() => (De({ type: kt.RegisterDroppable, element: { id: he, key: ae, disabled: re, node: X, rect: Ke, data: _ } }), () => De({ type: kt.UnregisterDroppable, key: ae, id: he })), [he]), be(() => {
|
|
4383
|
+
re !== Be.current.disabled && (De({ type: kt.SetDroppableDisabled, id: he, key: ae, disabled: re }), Be.current.disabled = re);
|
|
4384
|
+
}, [he, ae, re, De]), { active: qe, rect: Ke, isOver: Ne?.id === he, node: X, over: Ne, setNodeRef: F };
|
|
4385
|
+
})({ id: l, data: v, disabled: R.droppable, resizeObserverConfig: { updateMeasurementsFor: w, ...p } }), { active: W, activatorEvent: U, activeNodeRect: V, attributes: L, setNodeRef: P, listeners: ee, isDragging: I, over: A, setActivatorNodeRef: se, transform: we } = as({ id: l, data: v, attributes: { ...Rs, ...n }, disabled: R.draggable }), Ge = (function() {
|
|
4386
|
+
for (var K = arguments.length, oe = new Array(K), re = 0; re < K; re++) oe[re] = arguments[re];
|
|
4387
|
+
return Se(() => (he) => {
|
|
4388
|
+
oe.forEach((xe) => xe(he));
|
|
4389
|
+
}, oe);
|
|
4390
|
+
})(k, P), Ae = !!W, ue = Ae && !b && uo(m) && uo(E), Ie = !j && I, Je = Ie && ue ? we : null, Ye = ue ? Je ?? (c ?? H)({ rects: T, activeNodeRect: V, activeIndex: m, overIndex: E, index: O }) : null, Fe = uo(m) && uo(E) ? o({ id: l, items: C, activeIndex: m, overIndex: E }) : O, ge = W?.id, $ = Te({ activeId: ge, items: C, newIndex: Fe, containerId: d }), Le = C !== $.current.items, ye = t({ active: W, containerId: d, isDragging: I, isSorting: Ae, id: l, index: O, items: C, newIndex: $.current.newIndex, previousItems: $.current.items, previousContainerId: $.current.containerId, transition: a, wasDragging: $.current.activeId != null }), Z = (function(K) {
|
|
4391
|
+
let { disabled: oe, index: re, node: he, rect: xe } = K;
|
|
4392
|
+
const [ae, qe] = me(null), De = Te(re);
|
|
4393
4393
|
return Ut(() => {
|
|
4394
|
-
if (!
|
|
4395
|
-
const Ne =
|
|
4394
|
+
if (!oe && re !== De.current && he.current) {
|
|
4395
|
+
const Ne = xe.current;
|
|
4396
4396
|
if (Ne) {
|
|
4397
4397
|
const u = Mn(he.current, { ignoreTransform: !0 }), Be = { x: Ne.left - u.left, y: Ne.top - u.top, scaleX: Ne.width / u.width, scaleY: Ne.height / u.height };
|
|
4398
|
-
(Be.x || Be.y) &&
|
|
4398
|
+
(Be.x || Be.y) && qe(Be);
|
|
4399
4399
|
}
|
|
4400
4400
|
}
|
|
4401
|
-
re !==
|
|
4402
|
-
}, [
|
|
4403
|
-
|
|
4404
|
-
}, [
|
|
4401
|
+
re !== De.current && (De.current = re);
|
|
4402
|
+
}, [oe, re, he, xe]), be(() => {
|
|
4403
|
+
ae && qe(null);
|
|
4404
|
+
}, [ae]), ae;
|
|
4405
4405
|
})({ disabled: !ye, index: O, node: N, rect: q });
|
|
4406
4406
|
return be(() => {
|
|
4407
|
-
|
|
4408
|
-
}, [
|
|
4407
|
+
Ae && $.current.newIndex !== Fe && ($.current.newIndex = Fe), d !== $.current.containerId && ($.current.containerId = d), C !== $.current.items && ($.current.items = C);
|
|
4408
|
+
}, [Ae, Fe, d, C]), be(() => {
|
|
4409
4409
|
if (ge === $.current.activeId) return;
|
|
4410
4410
|
if (ge != null && $.current.activeId == null) return void ($.current.activeId = ge);
|
|
4411
4411
|
const K = setTimeout(() => {
|
|
4412
4412
|
$.current.activeId = ge;
|
|
4413
4413
|
}, 50);
|
|
4414
4414
|
return () => clearTimeout(K);
|
|
4415
|
-
}, [ge]), { active: W, activeIndex: m, attributes: L, data: v, rect: q, index: O, newIndex: Fe, items: C, isOver: x, isSorting:
|
|
4415
|
+
}, [ge]), { active: W, activeIndex: m, attributes: L, data: v, rect: q, index: O, newIndex: Fe, items: C, isOver: x, isSorting: Ae, isDragging: I, listeners: ee, node: N, overIndex: E, over: A, setNodeRef: Ge, setActivatorNodeRef: se, setDroppableNodeRef: k, setDraggableNodeRef: P, transform: Z ?? Ye, transition: (function() {
|
|
4416
4416
|
if (Z || Le && $.current.newIndex === O) return ks;
|
|
4417
|
-
if (!(
|
|
4417
|
+
if (!(Ie && !ko(U) || !a) && (Ae || ye))
|
|
4418
4418
|
return un.Transition.toString({ ...a, property: ji });
|
|
4419
4419
|
})() };
|
|
4420
4420
|
}
|
|
@@ -4492,92 +4492,92 @@ const Es = (e) => {
|
|
|
4492
4492
|
k(m);
|
|
4493
4493
|
}, [m]);
|
|
4494
4494
|
const [W, U] = me(null), V = (function() {
|
|
4495
|
-
for (var A = arguments.length,
|
|
4496
|
-
return
|
|
4497
|
-
})($o(Ni, { activationConstraint: r }), $o(Li, { activationConstraint: r }), $o(ir, { scrollBehavior: "Cypress" in window ? "auto" : void 0, coordinateGetter: c })), L = x.indexOf.bind(x), P = W ? L(W) : -1,
|
|
4498
|
-
x.map((A,
|
|
4499
|
-
|
|
4500
|
-
const we = H?.({ key: "divider-" +
|
|
4501
|
-
we &&
|
|
4495
|
+
for (var A = arguments.length, se = new Array(A), we = 0; we < A; we++) se[we] = arguments[we];
|
|
4496
|
+
return Se(() => [...se].filter((Ge) => Ge != null), [...se]);
|
|
4497
|
+
})($o(Ni, { activationConstraint: r }), $o(Li, { activationConstraint: r }), $o(ir, { scrollBehavior: "Cypress" in window ? "auto" : void 0, coordinateGetter: c })), L = x.indexOf.bind(x), P = W ? L(W) : -1, ee = [];
|
|
4498
|
+
x.map((A, se) => {
|
|
4499
|
+
ee.push(f(Ns, { id: A, handle: d, index: se, style: a, wrapperStyle: N, disabled: b(A), renderItem: j, animateLayoutChanges: i, useDragOverlay: w, getNewIndex: C }, A + "-" + se));
|
|
4500
|
+
const we = H?.({ key: "divider-" + se });
|
|
4501
|
+
we && ee.push(we);
|
|
4502
4502
|
});
|
|
4503
4503
|
const { getPortalContainer: I } = gl();
|
|
4504
4504
|
return et(is, { sensors: V, collisionDetection: l, onDragStart: (A) => {
|
|
4505
|
-
const { active:
|
|
4506
|
-
|
|
4505
|
+
const { active: se } = A;
|
|
4506
|
+
se && (q?.(A), U(se.id));
|
|
4507
4507
|
}, autoScroll: { canScroll: (A) => !0 }, onDragEnd: (A) => {
|
|
4508
4508
|
if (U(null), A.over) {
|
|
4509
|
-
const
|
|
4510
|
-
P !==
|
|
4509
|
+
const se = L(A.over.id);
|
|
4510
|
+
P !== se && (k((we) => R(we, P, se)), S?.(P, se));
|
|
4511
4511
|
}
|
|
4512
4512
|
}, onDragCancel: () => {
|
|
4513
4513
|
U(null);
|
|
4514
|
-
}, measuring: T, modifiers: E, children: [f("div", { style: { display: "flex", justifyContent: "flex-start", boxSizing: "border-box", ...v }, className: Vt(n, $t.Wrapper), children: f(qs, { items: x, strategy: O, children: f(Is, { ref: t, children:
|
|
4514
|
+
}, measuring: T, modifiers: E, children: [f("div", { style: { display: "flex", justifyContent: "flex-start", boxSizing: "border-box", ...v }, className: Vt(n, $t.Wrapper), children: f(qs, { items: x, strategy: O, children: f(Is, { ref: t, children: ee }) }) }), w ? ui(f(ws, { adjustScale: o, dropAnimation: p, children: W ? f(Gi, { value: x[P], handle: d, renderItem: j, wrapperStyle: N({ index: P, isDragging: !0, id: x[P] }), index: P, dragging: !0, style: a({ id: x[P], index: P, isSorting: W !== null, isDragging: !0, overIndex: -1, isDragOverlay: !0 }), dragOverlay: !0 }) : null }), I()) : null] });
|
|
4515
4515
|
}));
|
|
4516
4516
|
function Ns({ disabled: e, animateLayoutChanges: t, getNewIndex: n, handle: r, id: i, index: o, onRemove: l, style: c, renderItem: p, useDragOverlay: a, wrapperStyle: C }) {
|
|
4517
4517
|
const { attributes: d, isDragging: m, isSorting: S, listeners: b, overIndex: T, setNodeRef: E, transform: j, transition: H } = Ts({ id: i, animateLayoutChanges: t, disabled: e, getNewIndex: n });
|
|
4518
4518
|
return f(Gi, { ref: E, value: i, disabled: e, dragging: m, sorting: S, handle: r, renderItem: p, index: o, style: c({ index: o, id: i, isDragging: m, isSorting: S, overIndex: T }), onRemove: l ? () => l(i) : void 0, transform: j, transition: H, wrapperStyle: C({ index: o, isDragging: m, id: i }), listeners: b, "data-index": o, "data-id": i, dragOverlay: !a && m, ...d });
|
|
4519
4519
|
}
|
|
4520
4520
|
const Ls = "_TabStrip_3x0dp_1", Os = new oi("rgb(33, 115, 70)"), Bs = "#eee", Vs = (e) => f(As, { ...e }), Hs = ft(yt((e, t) => {
|
|
4521
|
-
const { children: n, style: r, className: i, selectedTabIndex: o = 0, tabNames: l = [], onSelectedTabIndexChange: c, onTabNameChange: p, onTabMove: a, createScrollStartButton: C = hl, createScrollEndButton: d = ml, createScrollEdgeButton: m = pl, createTabButton: S = Vs, createTabDivider: b, editLabelProps: T, disabled: E = !1, disableDrag: j = !1, background: H = "white", activeColor: R = Os, borderColor: O = Bs, borderWidth: v = 1 } = e, [w, q] = me(o), [N, x] = me(l), k = Ze((
|
|
4522
|
-
const
|
|
4523
|
-
|
|
4521
|
+
const { children: n, style: r, className: i, selectedTabIndex: o = 0, tabNames: l = [], onSelectedTabIndexChange: c, onTabNameChange: p, onTabMove: a, createScrollStartButton: C = hl, createScrollEndButton: d = ml, createScrollEdgeButton: m = pl, createTabButton: S = Vs, createTabDivider: b, editLabelProps: T, disabled: E = !1, disableDrag: j = !1, background: H = "white", activeColor: R = Os, borderColor: O = Bs, borderWidth: v = 1 } = e, [w, q] = me(o), [N, x] = me(l), k = Ze((ae) => {
|
|
4522
|
+
const qe = I.current?.[ae]?.closest(".tab-item") ?? I.current?.[ae];
|
|
4523
|
+
qe && Ie.current?.scrollTo({ top: qe.offsetTop, left: qe.offsetLeft, behavior: "smooth" });
|
|
4524
4524
|
}, []);
|
|
4525
4525
|
be(() => {
|
|
4526
4526
|
k(o);
|
|
4527
4527
|
}, [o]);
|
|
4528
|
-
const W = Ze((
|
|
4529
|
-
|
|
4530
|
-
}, [c, w]), U = Ze((
|
|
4531
|
-
a?.(
|
|
4532
|
-
}, [a]), V =
|
|
4533
|
-
p?.(
|
|
4528
|
+
const W = Ze((ae, qe) => {
|
|
4529
|
+
qe !== w && (q(qe), c?.(qe)), k(qe);
|
|
4530
|
+
}, [c, w]), U = Ze((ae, qe) => {
|
|
4531
|
+
a?.(ae, qe);
|
|
4532
|
+
}, [a]), V = Te(null), [L, P] = me(-1), ee = Ze((ae, qe) => {
|
|
4533
|
+
p?.(ae, qe);
|
|
4534
4534
|
}, [p]);
|
|
4535
4535
|
Bt(() => {
|
|
4536
4536
|
q(o);
|
|
4537
4537
|
}, [o]), Bt(() => {
|
|
4538
4538
|
x(l);
|
|
4539
4539
|
}, [l]);
|
|
4540
|
-
const I =
|
|
4541
|
-
yl(t, () => Object.assign({ startEdit(
|
|
4542
|
-
I.current?.[
|
|
4543
|
-
}, cancel(
|
|
4544
|
-
I.current?.[
|
|
4540
|
+
const I = Te([]), A = Te(null);
|
|
4541
|
+
yl(t, () => Object.assign({ startEdit(ae) {
|
|
4542
|
+
I.current?.[ae]?.startEdit();
|
|
4543
|
+
}, cancel(ae) {
|
|
4544
|
+
I.current?.[ae]?.cancel();
|
|
4545
4545
|
} }, A.current), [w, L]);
|
|
4546
|
-
const
|
|
4546
|
+
const se = Ze(({ value: ae, index: qe, dragging: De }) => {
|
|
4547
4547
|
const { style: Ne, maxLength: u, ...Be } = T || {}, st = f(Ra, { ref: (Ke) => {
|
|
4548
|
-
I.current[
|
|
4549
|
-
}, value:
|
|
4548
|
+
I.current[qe] = Ke;
|
|
4549
|
+
}, value: ae, disabled: E, maxLength: u, style: { color: w === qe && R ? R?.toRGBA().toString() : "inherit", flex: "1 1 100%", paddingTop: "1px", paddingBottom: "1px", ...Ne }, styleHover: {}, onSubmit: (Ke) => (V.current = !1, P(-1), ee(qe, Ke)), onCancel: () => {
|
|
4550
4550
|
V.current = !1, P(-1);
|
|
4551
4551
|
}, onChange: (Ke) => {
|
|
4552
|
-
V.current = !0, P(
|
|
4552
|
+
V.current = !0, P(qe);
|
|
4553
4553
|
}, ...Be });
|
|
4554
|
-
return S({ onClick: (Ke) => W(Ke,
|
|
4555
|
-
}, [w,
|
|
4554
|
+
return S({ onClick: (Ke) => W(Ke, qe), value: ae, index: qe, editing: L === qe && V.current, editable: !0, disabled: E, selectedIndex: w, background: H, activeColor: R, borderColor: O, borderWidth: v, dragging: De, children: st });
|
|
4555
|
+
}, [w, ee, W, T, E, L, S]), [we, { width: Ge }] = cn(), [Ae, { width: ue }] = cn(), Ie = Te(null), [Je, Ye] = me({ left: 0, top: 0, width: 0, height: 0 }), [Fe, ge] = me(null);
|
|
4556
4556
|
be(() => {
|
|
4557
|
-
Fe !== null &&
|
|
4557
|
+
Fe !== null && Ie.current && Ie.current.scrollTo({ left: Fe, behavior: "smooth" });
|
|
4558
4558
|
}, [Fe]);
|
|
4559
|
-
const $ = Ze((
|
|
4560
|
-
if (!
|
|
4561
|
-
let
|
|
4562
|
-
return u =
|
|
4563
|
-
}, []), Le = Ze((
|
|
4564
|
-
if (!
|
|
4565
|
-
let
|
|
4559
|
+
const $ = Ze((ae, qe = !1) => {
|
|
4560
|
+
if (!Ie.current) return 0;
|
|
4561
|
+
let De = Ie.current.firstChild.getBoundingClientRect(), Ne = Ie.current.firstChild.firstChild.children, u = 0;
|
|
4562
|
+
return u = qe ? 0 : hr.getScrollTo(ae, De.left, Ne, !0, Math.max(0, ae - 200)), ge(u), Math.max(0, u);
|
|
4563
|
+
}, []), Le = Ze((ae, qe = !1) => {
|
|
4564
|
+
if (!Ie.current) return 0;
|
|
4565
|
+
let De = Ie.current.firstChild.getBoundingClientRect(), Ne = Ie.current.firstChild.firstChild.children, u = 0;
|
|
4566
4566
|
const Be = Math.ceil(ue - Ge);
|
|
4567
|
-
return u =
|
|
4568
|
-
}, [ue, Ge]), ye =
|
|
4567
|
+
return u = qe ? Be : hr.getScrollTo(ae, De.left, Ne, !1, Math.max(0, ae + 200)), ge(u), Math.min(Be, u);
|
|
4568
|
+
}, [ue, Ge]), ye = Te(null), Z = Te(null), K = Ze(() => {
|
|
4569
4569
|
Z.current && (clearTimeout(Z.current), Z.current = null, ye.current = null);
|
|
4570
|
-
}, []),
|
|
4571
|
-
ye.current =
|
|
4572
|
-
const Ne =
|
|
4573
|
-
Ne !== ye.current ?
|
|
4574
|
-
},
|
|
4570
|
+
}, []), oe = Ze((ae, qe, De = 260) => {
|
|
4571
|
+
ye.current = ae, Z.current = setTimeout(() => {
|
|
4572
|
+
const Ne = qe ? $(ye.current || ae) : Le(ye.current || ae);
|
|
4573
|
+
Ne !== ye.current ? oe(Ne, qe, 120) : K();
|
|
4574
|
+
}, De);
|
|
4575
4575
|
}, [$, Le, K]);
|
|
4576
4576
|
be(() => () => K(), [K]);
|
|
4577
|
-
const re =
|
|
4578
|
-
return et("div", { style: { ...r, display: "flex", alignItems: "stretch" }, className: Vt(Ls, i), ref: A, children: [f("div", { style: { borderTop: `solid ${O} ${v}px`, position: "absolute", width: "100%" } }), f("div", { style: { flex: "none", display: "flex", alignItems: "center" }, children:
|
|
4579
|
-
Ye({ left:
|
|
4580
|
-
}, children: f(Fs, { isDisabled: (
|
|
4577
|
+
const re = Se(() => ({ style: { marginLeft: "4px", marginRight: "6px" }, disabled: Math.floor(Je.left) <= 0 || Math.floor(ue - Ge) === 0, orientation: sn.Horizontal, onMouseUp: K, onMouseLeave: K, onMouseDown: () => oe(Ie.current.scrollLeft, !0), onClick: (ae) => $(Math.min(Ie.current.scrollLeft, Fe ?? Number.MAX_SAFE_INTEGER), ae.ctrlKey) }), [Je, Fe, ue, Ge]), he = Se(() => ({ style: { marginLeft: "6px", marginRight: "4px" }, disabled: Math.floor(ue - Ge) <= Math.ceil(Je.left), orientation: sn.Horizontal, onMouseUp: K, onMouseLeave: K, onMouseDown: () => oe(Ie.current.scrollLeft, !1), onClick: (ae) => Le(Math.max(Ie.current.scrollLeft, Fe ?? 0), ae.ctrlKey) }), [Je, Fe, ue, Ge]), xe = Se(() => et(xn, { children: [f("div", { style: { minWidth: "16px" } }), n, m?.(re)] }), [re, he, C, d, n, m]);
|
|
4578
|
+
return et("div", { style: { ...r, display: "flex", alignItems: "stretch" }, className: Vt(Ls, i), ref: A, children: [f("div", { style: { borderTop: `solid ${O} ${v}px`, position: "absolute", width: "100%" } }), f("div", { style: { flex: "none", display: "flex", alignItems: "center" }, children: xe }), f("div", { className: "Tabs", ref: we, style: { flex: "1 1 100%", display: "flex", position: "relative", overflow: "hidden" }, children: f("div", { style: { position: "relative", overflowY: "hidden", overflowX: "hidden", marginBottom: "3px" }, ref: Ie, onScroll: (ae) => {
|
|
4579
|
+
Ye({ left: ae.target.scrollLeft, top: ae.target.scrollTop, width: ae.target.scrollWidth, height: ae.target.scrollHeight });
|
|
4580
|
+
}, children: f(Fs, { isDisabled: (ae) => E || j, items: N, strategy: bs, modifiers: [Es], ref: Ae, renderItem: se, renderDivider: b, onMove: U, activationConstraint: { distance: 15 } }) }) }), f("div", { style: { flex: "none", display: "flex", alignItems: "center" }, children: m(he) })] });
|
|
4581
4581
|
}));
|
|
4582
4582
|
Hs.displayName = "TabStrip";
|
|
4583
4583
|
const ld = (e) => et("svg", { ...e, viewBox: "0 0 48 48", children: [f("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" }), f("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" }), f("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" }), f("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" })] }), ad = (e) => et("svg", { viewBox: "0,0,2048,2048", ...e, children: [f("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" }), f("path", { className: "styled background", d: "M 1728 1941 h -299 v -1706 h 299 m -811 1706 h -298 v -810 h 298 z" }), f("path", { className: "styled info_light", d: "M 619 1941 h -299 v -1322 h 299 z" }), f("path", { className: "styled info_dark", d: "M 640 1941 h -43 v -1301 h -256 v 1301 h -42 v -1344 h 341 z" }), f("path", { className: "styled secondary_light", d: "M 1429 1941 h -298 v -1066 h 298 z" }), f("path", { className: "styled secondary_dark", d: "M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z" }), f("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" })] }), sd = (e) => et("svg", { viewBox: "0,0,2048,2048", ...e, children: [f("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" }), f("path", { className: "styled background", d: "M 832 1941 h -469 v -554 h 469 m 768 554 h -469 v -810 h 469 z" }), f("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" }), f("path", { className: "styled info_light", d: "M 832 1387 h -469 v -640 h 469 z" }), f("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" }), f("path", { className: "styled secondary_light", d: "M 1600 1131 h -469 v -811 h 469 z" }), f("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" })] }), dd = (e) => et("svg", { viewBox: "0,0,2048,2048", ...e, children: [f("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" }), f("path", { className: "styled background", d: "M 832 1941 h -469 v -426 h 469 m 768 426 h -469 v -1066 h 469 z" }), f("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" }), f("path", { className: "styled info_light", d: "M 832 1515 h -469 v -1195 h 469 z" }), f("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" }), f("path", { className: "styled secondary_light", d: "M 1600 875 h -469 v -555 h 469 z" }), f("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" })] }), cd = (e) => et("svg", { viewBox: "0,0,2048,2048", ...e, children: [f("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" }), f("path", { className: "styled info", d: "M 122 1658 l -30 -30 l 1209 -1210 l 655 655 l -30 30 l -625 -625 z" }), f("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" })] }), ud = (e) => et("svg", { viewBox: "0,0,2048,2048", ...e, children: [f("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" }), f("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" }), f("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" })] }), gd = (e) => et("svg", { viewBox: "0,0,2048,2048", ...e, children: [f("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" }), f("path", { className: "styled info", d: "M 1877 299 h -1770 v -43 h 1770 z" }), f("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" })] }), hd = (e) => et("svg", { viewBox: "0,0,2048,2048", ...e, children: [f("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" }), f("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" }), f("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" })] }), md = (e) => et("svg", { viewBox: "0,0,2048,2048", ...e, children: [f("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" }), f("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" }), f("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" })] }), pd = (e) => et("svg", { viewBox: "0,0,2048,2048", ...e, children: [f("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" }), f("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" }), f("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" })] }), fd = (e) => et("svg", { viewBox: "0,0,2048,2048", ...e, children: [f("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" }), f("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" }), f("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" }), f("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" }), f("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" })] }), vd = (e) => et("svg", { viewBox: "0,0,2048,2048", ...e, children: [f("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" }), f("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" }), f("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" }), f("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" }), f("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" })] }), wd = (e) => et("svg", { viewBox: "0,0,2048,2048", ...e, children: [f("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" }), f("path", { className: "styled background", d: "M 1429 1387 v 298 h -1322 v -298 m 1066 -811 v 299 h -1066 v -299 z" }), f("path", { className: "styled info_light", d: "M 1813 277 v 299 h -1706 v -299 z" }), f("path", { className: "styled info_dark", d: "M 101 597 v -42 h 1691 v -256 h -1691 v -43 h 1734 v 341 z" }), f("path", { className: "styled secondary_light", d: "M 917 1088 v 299 h -810 v -299 z" }), f("path", { className: "styled secondary_dark", d: "M 896 1109 h -795 v -42 h 838 v 322 h -43 z" }), f("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" })] }), yd = (e) => et("svg", { viewBox: "0,0,2048,2048", ...e, children: [f("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" }), f("path", { className: "styled background", d: "M 107 832 v -469 h 597 v 469 m -597 768 v -469 h 810 v 469 z" }), f("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" }), f("path", { className: "styled info_light", d: "M 704 832 v -469 h 640 v 469 z" }), f("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" }), f("path", { className: "styled secondary_light", d: "M 917 1600 v -469 h 811 v 469 z" }), f("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" })] }), bd = (e) => et("svg", { viewBox: "0,0,2048,2048", ...e, children: [f("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" }), f("path", { className: "styled background", d: "M 107 832 v -469 h 426 v 469 m -426 768 v -469 h 1066 v 469 z" }), f("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" }), f("path", { className: "styled info_light", d: "M 533 832 v -469 h 1195 v 469 z" }), f("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" }), f("path", { className: "styled secondary_light", d: "M 1173 1600 v -469 h 555 v 469 z" }), f("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" })] }), qd = (e) => et("svg", { viewBox: "0,0,2048,2048", ...e, children: [f("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" }), f("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" }), f("path", { className: "styled info_light", d: "M 1939 923 v 658 l -288 -192 m -1272 -40 l 525 -312 l -374 474 z" }), f("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" }), f("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" })] }), Cd = (e) => et("svg", { viewBox: "0,0,2048,2048", ...e, children: [f("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" }), f("path", { className: "styled background", d: "M 1963 1941 h -1856 v -853 l 597 597 l 618 -704 l 641 555 z" }), f("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" }), f("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" }), f("path", { className: "styled current_color", d: "M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 z" })] }), Sd = (e) => et("svg", { viewBox: "0,0,2048,2048", ...e, children: [f("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" }), f("path", { className: "styled background", d: "M 1941 1941 h -1834 v -1834 h 1834 z" }), f("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" }), f("path", { className: "styled info_light", d: "M 1941 107 v 1493 l -810 -768 l -576 661 l -448 -448 v -938 z" }), f("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" })] }), xd = (e) => et("svg", { viewBox: "0,0,2048,2048", ...e, children: [f("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" }), f("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" }), f("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" }), f("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" })] }), kd = (e) => et("svg", { viewBox: "0,0,2048,2048", ...e, children: [f("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" }), f("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" }), f("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" }), f("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" })] }), Rd = (e) => et("svg", { viewBox: "0,0,2048,2048", ...e, children: [f("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" }), f("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" }), f("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" })] }), Td = (e) => et("svg", { viewBox: "0,0,2048,2048", ...e, children: [f("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" }), f("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" }), f("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" }), f("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" })] }), Md = (e) => et("svg", { viewBox: "0,0,2048,2048", ...e, children: [f("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" }), f("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" }), f("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" })] }), Dd = (e) => et("svg", { viewBox: "0,0,2048,2048", ...e, children: [f("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" }), f("path", { className: "styled background", d: "M 1728 1941 h -299 v -1706 h 299 m -811 1706 h -298 v -810 h 298 z" }), f("path", { className: "styled info_light", d: "M 619 1941 h -299 v -1322 h 299 z" }), f("path", { className: "styled info_dark", d: "M 640 1941 h -43 v -1301 h -256 v 1301 h -42 v -1344 h 341 z" }), f("path", { className: "styled secondary_light", d: "M 1429 1941 h -298 v -1066 h 298 z" }), f("path", { className: "styled secondary_dark", d: "M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z" }), f("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" })] }), Ed = (e) => et("svg", { viewBox: "0,0,2048,2048", ...e, children: [f("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" }), f("path", { className: "styled background", d: "M 1728 1941 h -299 v -1706 h 299 m -811 1706 h -298 v -810 h 298 z" }), f("path", { className: "styled info_light", d: "M 619 1941 h -299 v -1322 h 299 z" }), f("path", { className: "styled info_dark", d: "M 640 1941 h -43 v -1301 h -256 v 1301 h -42 v -1344 h 341 z" }), f("path", { className: "styled secondary_light", d: "M 1429 1941 h -298 v -1066 h 298 z" }), f("path", { className: "styled secondary_dark", d: "M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z" }), f("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" })] }), dr = kn(null);
|
|
@@ -4587,8 +4587,8 @@ const Ad = (e) => {
|
|
|
4587
4587
|
return f(dr.Provider, { value: t, children: n });
|
|
4588
4588
|
}, Id = () => {
|
|
4589
4589
|
const e = Jt(dr), [t] = me(() => new ll());
|
|
4590
|
-
return
|
|
4591
|
-
}, Ps = "_script-editor_iy654_5", Ws =
|
|
4590
|
+
return Se(() => e || t, [e]);
|
|
4591
|
+
}, Ps = "_script-editor_iy654_5", Ws = { 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" }, $s = ot.lazy(() => import("./CLyGkzbKPN5SnksR.mjs"));
|
|
4592
4592
|
let Bn, Vn, tn = ["define", "require"], Qr = !1;
|
|
4593
4593
|
const ei = async (e, t, n) => {
|
|
4594
4594
|
const r = e.getModel();
|
|
@@ -4658,7 +4658,7 @@ function js(e) {
|
|
|
4658
4658
|
return e.kind === "comment";
|
|
4659
4659
|
}
|
|
4660
4660
|
const zd = ft(yt((e, t) => {
|
|
4661
|
-
const { className: n, style: r, commands: i, readOnly: o = !1, onClose: l, darkMode: c, loadingPanel: p, autoFocus: a = !0, onStatusChange: C, ...d } = e, m =
|
|
4661
|
+
const { className: n, style: r, commands: i, readOnly: o = !1, onClose: l, darkMode: c, loadingPanel: p, autoFocus: a = !0, onStatusChange: C, ...d } = e, m = Te(null), S = le(l, [l]), b = Te(!1), T = Se(() => ({ contains(ge) {
|
|
4662
4662
|
if (!m.current) return;
|
|
4663
4663
|
const $ = m.current.editor;
|
|
4664
4664
|
return $ && $.getDomNode()?.contains(ge);
|
|
@@ -4666,8 +4666,8 @@ const zd = ft(yt((e, t) => {
|
|
|
4666
4666
|
if (!m.current) return;
|
|
4667
4667
|
const ge = m.current.editor;
|
|
4668
4668
|
return ge && ge.getDomNode()?.focus();
|
|
4669
|
-
} }), []), E =
|
|
4670
|
-
})], []), j =
|
|
4669
|
+
} }), []), E = Se(() => [new Y("help", T, { label: "Script Commands", description: "Open Editor Commands", shortcut: { key: "F1" } }, () => {
|
|
4670
|
+
})], []), j = Se(() => {
|
|
4671
4671
|
let ge = null;
|
|
4672
4672
|
const $ = () => T;
|
|
4673
4673
|
return ge = i ? i.createChildGroup($, "scriptEditor", !1) : new Co($, "scriptEditor"), ge.addCommands(E, !0), ge;
|
|
@@ -4700,21 +4700,21 @@ const zd = ft(yt((e, t) => {
|
|
|
4700
4700
|
}, [v]);
|
|
4701
4701
|
const U = le((ge) => {
|
|
4702
4702
|
R?.execute(ge);
|
|
4703
|
-
}, [R]), V =
|
|
4703
|
+
}, [R]), V = Te(""), [L, P] = me(!1), ee = le(async () => {
|
|
4704
4704
|
if (!m.current) return null;
|
|
4705
4705
|
const ge = m.current, $ = ge.editor;
|
|
4706
4706
|
if (!$) return null;
|
|
4707
|
-
const Le = ge.monaco, ye = await (async (Z, K,
|
|
4707
|
+
const Le = ge.monaco, ye = await (async (Z, K, oe = "export") => {
|
|
4708
4708
|
const re = Z.getModel();
|
|
4709
4709
|
if (!re) return null;
|
|
4710
|
-
const he = await K.languages.typescript.getTypeScriptWorker(),
|
|
4711
|
-
let
|
|
4712
|
-
const Ne =
|
|
4713
|
-
for (let u =
|
|
4714
|
-
const Be = cr(
|
|
4715
|
-
Be && (
|
|
4710
|
+
const he = await K.languages.typescript.getTypeScriptWorker(), xe = await he(re.uri), ae = await xe.getNavigationTree(re.uri.toString());
|
|
4711
|
+
let qe = null, De = Z.getSelection();
|
|
4712
|
+
const Ne = De.startLineNumber === De.endLineNumber && De.startColumn === De.endColumn ? re.getLineCount() : Math.min(De.endLineNumber, re.getLineCount());
|
|
4713
|
+
for (let u = De.startLineNumber; !qe && u <= Ne; u++) {
|
|
4714
|
+
const Be = cr(ae, re.getOffsetAt({ lineNumber: u, column: 1 }), "function", oe);
|
|
4715
|
+
Be && (qe = Be.text);
|
|
4716
4716
|
}
|
|
4717
|
-
return
|
|
4717
|
+
return qe;
|
|
4718
4718
|
})($, Le);
|
|
4719
4719
|
return k({ message: (ye ?? "").toUpperCase() }), ye ? { source: $.getValue(), name: ye } : null;
|
|
4720
4720
|
}, []);
|
|
@@ -4723,29 +4723,29 @@ const zd = ft(yt((e, t) => {
|
|
|
4723
4723
|
x((Z) => ({ ...Z, compiling: !0 }));
|
|
4724
4724
|
const ye = await v?.getScripts().createModule({ source: Le?.getValue(), declarationsOnly: !0 });
|
|
4725
4725
|
ye && ((async function(Z, K) {
|
|
4726
|
-
const
|
|
4726
|
+
const oe = [];
|
|
4727
4727
|
for (let re = 1; re < Z.getLineCount() + 1; re++) {
|
|
4728
|
-
const he = { startLineNumber: re, startColumn: 1, endLineNumber: re, endColumn: Z.getLineLength(re) + 1 },
|
|
4729
|
-
|
|
4728
|
+
const he = { startLineNumber: re, startColumn: 1, endLineNumber: re, endColumn: Z.getLineLength(re) + 1 }, xe = Z.getValueInRange(he).indexOf("modelt");
|
|
4729
|
+
xe !== -1 && oe.push({ message: "found 'modelt'", resource: "https://www.sheetxl.com", severity: K.MarkerSeverity.Hint, startLineNumber: he.startLineNumber, startColumn: xe + 1, endLineNumber: he.startLineNumber, endColumn: xe + 5 });
|
|
4730
4730
|
}
|
|
4731
|
-
K.editor.setModelMarkers(Z, "owner",
|
|
4732
|
-
})(ge, $), (async function(Z, K,
|
|
4733
|
-
const he = await K.languages.typescript.getTypeScriptWorker(),
|
|
4731
|
+
K.editor.setModelMarkers(Z, "owner", oe);
|
|
4732
|
+
})(ge, $), (async function(Z, K, oe, re) {
|
|
4733
|
+
const he = await K.languages.typescript.getTypeScriptWorker(), xe = await he(Z.uri), ae = await xe.getNavigationTree(Z.uri.toString()), qe = er(Z, K, re, ae).map((De) => {
|
|
4734
4734
|
let Ne = null, u = null;
|
|
4735
|
-
return
|
|
4735
|
+
return De.type === "formula" ? (Ne = "formula.margin-icon", u = "Formula") : De.type === "macro" ? (Ne = "macro.margin-icon", u = "Macro") : De.type === "autoRun" && (Ne = "autorun.margin-icon", u = "Auto Run"), { range: new K.Range(De.lineNumber, 1, De.lineNumber, 1), options: { isWholeLine: !1, glyphMarginClassName: Ne, glyphMarginHoverMessage: { value: u }, stickiness: K.editor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges } };
|
|
4736
4736
|
});
|
|
4737
|
-
ue.current && ue.current.clear(), ue.current =
|
|
4737
|
+
ue.current && ue.current.clear(), ue.current = oe.createDecorationsCollection(qe);
|
|
4738
4738
|
})(ge, $, Le, ye ? ye.getFunctions().getItems() : Xe.EmptyArray), x((Z) => ({ ...Z, compiling: !1 })));
|
|
4739
|
-
}, [v]), A = le(Xe.debounce(I, 580), []),
|
|
4739
|
+
}, [v]), A = le(Xe.debounce(I, 580), []), se = le(async (ge = void 0) => {
|
|
4740
4740
|
if (!m.current || !v) return;
|
|
4741
4741
|
const $ = m.current.editor.getPosition(), Le = { cursor: $ ? $.toString() : "" };
|
|
4742
4742
|
ge !== void 0 && (Le.message = ge), k(Le);
|
|
4743
|
-
const ye =
|
|
4743
|
+
const ye = ee();
|
|
4744
4744
|
v.setSelectedFunction(ye);
|
|
4745
4745
|
}, [v]);
|
|
4746
4746
|
be(() => {
|
|
4747
4747
|
}, [N]);
|
|
4748
|
-
const we =
|
|
4748
|
+
const we = Te(null), Ge = le(async () => {
|
|
4749
4749
|
await W(), S?.();
|
|
4750
4750
|
}, [S]);
|
|
4751
4751
|
be(() => {
|
|
@@ -4753,7 +4753,7 @@ const zd = ft(yt((e, t) => {
|
|
|
4753
4753
|
const ge = { insertSnippet: (Le) => {
|
|
4754
4754
|
m.current?.editor && ei(m.current.editor, m.current.monaco, Le);
|
|
4755
4755
|
}, close: () => Ge() };
|
|
4756
|
-
v.setEditor(ge), v.setSelectedFunction(
|
|
4756
|
+
v.setEditor(ge), v.setSelectedFunction(ee());
|
|
4757
4757
|
const $ = v.addContainerListener({ onBeforeSave: async () => {
|
|
4758
4758
|
W();
|
|
4759
4759
|
}, onReadonlyChange() {
|
|
@@ -4773,35 +4773,14 @@ const zd = ft(yt((e, t) => {
|
|
|
4773
4773
|
$ !== void 0 && clearTimeout($), we.current = null;
|
|
4774
4774
|
}
|
|
4775
4775
|
}, [L]);
|
|
4776
|
-
const
|
|
4776
|
+
const Ae = le((ge) => {
|
|
4777
4777
|
const $ = m.current?.editor;
|
|
4778
4778
|
return !!$ && ($.focus(ge), !0);
|
|
4779
|
-
}, [w]), ue =
|
|
4780
|
-
m.current = { monaco: $, editor: ge }, P(!0), (
|
|
4781
|
-
if (Qr) return;
|
|
4782
|
-
const Z = (ee, re) => {
|
|
4783
|
-
try {
|
|
4784
|
-
if (re === void 0) try {
|
|
4785
|
-
delete globalThis[ee];
|
|
4786
|
-
} catch {
|
|
4787
|
-
try {
|
|
4788
|
-
globalThis[ee] = void 0;
|
|
4789
|
-
} catch {
|
|
4790
|
-
}
|
|
4791
|
-
}
|
|
4792
|
-
else globalThis[ee] = re;
|
|
4793
|
-
} catch {
|
|
4794
|
-
}
|
|
4795
|
-
}, K = tn.length;
|
|
4796
|
-
for (let ee = 0; ee < K; ee++) {
|
|
4797
|
-
const re = tn[ee];
|
|
4798
|
-
Z(re, Bn[re]);
|
|
4799
|
-
}
|
|
4800
|
-
Bn = void 0, Qr = !0;
|
|
4801
|
-
})(), ae("Loading Types");
|
|
4779
|
+
}, [w]), ue = Te(null), Ie = le((ge, $) => {
|
|
4780
|
+
m.current = { monaco: $, editor: ge }, P(!0), se("Loading Types");
|
|
4802
4781
|
const Le = v.getScripts().getModules().getItems()[0]?.getSource() ?? "";
|
|
4803
|
-
ge.setValue(Le), import("./
|
|
4804
|
-
|
|
4782
|
+
ge.setValue(Le), import("./K8x4JdifuZb36Uw8.mjs").then((Z) => Z.c).then(async (Z) => {
|
|
4783
|
+
se(""), Z.AutoTypings.create(ge, { shareCache: !0, dontAdaptEditorOptions: !0, monaco: $, onUpdate: (K, oe) => {
|
|
4805
4784
|
if (K.type === "LookedUpPackage" && K.success !== void 0) {
|
|
4806
4785
|
const re = $.languages.typescript.typescriptDefaults.getDiagnosticsOptions();
|
|
4807
4786
|
$.languages.typescript.typescriptDefaults.setDiagnosticsOptions({ ...re, diagnosticCodesToIgnore: [] });
|
|
@@ -4810,24 +4789,45 @@ const zd = ft(yt((e, t) => {
|
|
|
4810
4789
|
K === "Not implemented yet" && (K = "Compile Errors"), console.warn("Error compiling types", K);
|
|
4811
4790
|
} }).then((K) => {
|
|
4812
4791
|
we.current = K;
|
|
4813
|
-
const
|
|
4814
|
-
A(
|
|
4792
|
+
const oe = ge.getModel();
|
|
4793
|
+
A(oe, $, ge), (() => {
|
|
4794
|
+
if (Qr) return;
|
|
4795
|
+
const re = (xe, ae) => {
|
|
4796
|
+
try {
|
|
4797
|
+
if (ae === void 0) try {
|
|
4798
|
+
delete globalThis[xe];
|
|
4799
|
+
} catch {
|
|
4800
|
+
try {
|
|
4801
|
+
globalThis[xe] = void 0;
|
|
4802
|
+
} catch {
|
|
4803
|
+
}
|
|
4804
|
+
}
|
|
4805
|
+
else globalThis[xe] = ae;
|
|
4806
|
+
} catch {
|
|
4807
|
+
}
|
|
4808
|
+
}, he = tn.length;
|
|
4809
|
+
for (let xe = 0; xe < he; xe++) {
|
|
4810
|
+
const ae = tn[xe];
|
|
4811
|
+
re(ae, Bn[ae]);
|
|
4812
|
+
}
|
|
4813
|
+
Bn = void 0, Qr = !0;
|
|
4814
|
+
})();
|
|
4815
4815
|
});
|
|
4816
4816
|
}), ge.addCommand("executeScript", function(Z, ...K) {
|
|
4817
4817
|
K?.[0] && U({ functionName: K?.[0] });
|
|
4818
4818
|
}, ""), ge.addAction({ id: "executeScript", label: "Execute", keybindings: [$.KeyCode.F8], run: async (Z) => {
|
|
4819
|
-
const K =
|
|
4819
|
+
const K = ee();
|
|
4820
4820
|
v.setSelectedFunction(K);
|
|
4821
|
-
const
|
|
4822
|
-
U(
|
|
4821
|
+
const oe = await K;
|
|
4822
|
+
U(oe);
|
|
4823
4823
|
} }), ge.addAction({ id: "saveScript", label: "Save Script", keybindings: [$.KeyMod.CtrlCmd | $.KeyCode.KeyS], run: (Z) => {
|
|
4824
4824
|
W();
|
|
4825
4825
|
} }), ge.onMouseDown(async (Z) => {
|
|
4826
4826
|
if (Z.target.type === $.editor.MouseTargetType.GUTTER_GLYPH_MARGIN) {
|
|
4827
|
-
const K = Z.target.position.lineNumber,
|
|
4828
|
-
if (
|
|
4829
|
-
const
|
|
4830
|
-
|
|
4827
|
+
const K = Z.target.position.lineNumber, oe = await $.languages.typescript.getTypeScriptWorker(), re = await oe(ye.uri), he = await re.getNavigationTree(ye.uri.toString()), xe = (await W()).getFunctions().getItems(), ae = er(ye, $, xe, he).find((qe) => qe.lineNumber === K);
|
|
4828
|
+
if (ae) {
|
|
4829
|
+
const qe = Z.event.browserEvent.button;
|
|
4830
|
+
qe === 0 ? ae.type === "macro" || ae.type === "autoRun" ? U({ functionName: ae.name }) : ae.type === "formula" && v.quickInsertFunction?.(ae.name) : qe === 2 && (console.log("Context menu for function:", ae.name), Z.event.browserEvent.preventDefault());
|
|
4831
4831
|
}
|
|
4832
4832
|
}
|
|
4833
4833
|
}), ge.onDidChangeModelContent(() => {
|
|
@@ -4837,22 +4837,22 @@ const zd = ft(yt((e, t) => {
|
|
|
4837
4837
|
});
|
|
4838
4838
|
const ye = ge.getModel();
|
|
4839
4839
|
(function(Z, K) {
|
|
4840
|
-
K.languages.registerInlayHintsProvider("typescript", { provideInlayHints(
|
|
4841
|
-
const
|
|
4842
|
-
for (let
|
|
4843
|
-
const
|
|
4844
|
-
Ne !== -1 &&
|
|
4840
|
+
K.languages.registerInlayHintsProvider("typescript", { provideInlayHints(oe, re, he) {
|
|
4841
|
+
const xe = [];
|
|
4842
|
+
for (let ae = 1; ae < oe.getLineCount() + 1; ae++) {
|
|
4843
|
+
const qe = { startLineNumber: ae, startColumn: 1, endLineNumber: ae, endColumn: oe.getLineLength(ae) + 1 }, De = "hint", Ne = oe.getValueInRange(qe).indexOf("hint");
|
|
4844
|
+
Ne !== -1 && xe.push({ kind: K.languages.InlayHintKind.Type, position: { lineNumber: qe.startLineNumber, column: Ne + De.length + 1 }, label: "[hint]" });
|
|
4845
4845
|
}
|
|
4846
|
-
return { hints:
|
|
4846
|
+
return { hints: xe, dispose: () => {
|
|
4847
4847
|
} };
|
|
4848
4848
|
} });
|
|
4849
4849
|
})(0, $), ye.onDidChangeContent((Z) => {
|
|
4850
|
-
const K = v?.getScripts().getModules().getByName("scripts"),
|
|
4850
|
+
const K = v?.getScripts().getModules().getByName("scripts"), oe = K?.getSource(), re = ge.getValue(), he = (oe?.length ?? 0) !== re.length || oe !== re;
|
|
4851
4851
|
k({ dirty: he });
|
|
4852
4852
|
}), ge.onDidChangeCursorPosition((Z) => {
|
|
4853
|
-
|
|
4853
|
+
se();
|
|
4854
4854
|
});
|
|
4855
|
-
}, [v]), Je =
|
|
4855
|
+
}, [v]), Je = Se(() => L ? null : p || f("div", { style: { position: "absolute", width: "100%", height: "100%" }, children: "Loading..." }), [L, p]), Ye = Se(() => {
|
|
4856
4856
|
if (!L) {
|
|
4857
4857
|
if (!Bn) {
|
|
4858
4858
|
Bn = {};
|
|
@@ -4871,7 +4871,7 @@ const zd = ft(yt((e, t) => {
|
|
|
4871
4871
|
}
|
|
4872
4872
|
}
|
|
4873
4873
|
const ge = v?.getScripts().getModules().getByName("scripts")?.getSource() ?? "";
|
|
4874
|
-
return et("div", { style: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "row", position: "relative", boxSizing: "border-box" }, children: [f(ai, { children: f(
|
|
4874
|
+
return et("div", { style: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "row", position: "relative", boxSizing: "border-box" }, children: [f(ai, { children: f($s, { theme: c ? "extended-dark" : "extended", options: { ...Ws, fixedOverflowWidgets: !0, readOnly: o }, language: "typescript", value: ge, onValidate: ($) => {
|
|
4875
4875
|
let Le = !1;
|
|
4876
4876
|
const ye = $ ? $.length : 0;
|
|
4877
4877
|
for (let Z = 0; !Le && Z < ye; Z++) $[Z].severity === 8 && (Le = !0);
|
|
@@ -4879,28 +4879,28 @@ const zd = ft(yt((e, t) => {
|
|
|
4879
4879
|
$.languages.typescript.typescriptDefaults.setDiagnosticsOptions({ noSemanticValidation: !1, noSyntaxValidation: !1, diagnosticCodesToIgnore: [2307] }), $.languages.json.jsonDefaults.setDiagnosticsOptions({ validate: !0 }), $.editor.defineTheme("extended", { base: "vs", inherit: !0, rules: [], colors: {} }), $.editor.defineTheme("extended-dark", { base: "vs-dark", inherit: !0, rules: [], colors: {} }), (async () => {
|
|
4880
4880
|
let Le = !1, ye = !1;
|
|
4881
4881
|
try {
|
|
4882
|
-
const Z = await (async () => await (await fetch("https://cdn.jsdelivr.net/npm/@sheetxl/sdk/types/scripting.d.ts")).text())(), K = $.Uri.parse('inmemory://model/"sheetxl-models".d.ts');
|
|
4883
|
-
let
|
|
4884
|
-
|
|
4882
|
+
const Z = await (async () => await (await fetch("https://cdn.jsdelivr.net/npm/@sheetxl/sdk@0.6.19/types/scripting.d.ts")).text())(), K = $.Uri.parse('inmemory://model/"sheetxl-models".d.ts');
|
|
4883
|
+
let oe = $.editor.getModel(K);
|
|
4884
|
+
oe ? ye = !0 : oe = $.editor.createModel(Z, "typescript", K), $.editor.setModelMarkers(oe, "default", []), Le = !0;
|
|
4885
4885
|
} catch (Z) {
|
|
4886
4886
|
console.warn("cant load types", Z);
|
|
4887
4887
|
}
|
|
4888
4888
|
if ($.languages.registerLinkProvider("*", { provideLinks: (Z, K) => {
|
|
4889
|
-
const
|
|
4890
|
-
for (let
|
|
4891
|
-
const
|
|
4889
|
+
const oe = [], re = { links: oe }, he = Z.getLinesContent(), xe = he.length;
|
|
4890
|
+
for (let ae = 1; ae <= xe; ae++) {
|
|
4891
|
+
const qe = he[ae - 1], De = $.editor.tokenize(qe, "typescript"), Ne = De[0].length;
|
|
4892
4892
|
for (let u = 0; u < Ne; u++) {
|
|
4893
|
-
const Be =
|
|
4893
|
+
const Be = De[0]?.[u];
|
|
4894
4894
|
if (Be && Be.type.startsWith("string")) {
|
|
4895
|
-
let st = Be.offset, Ke =
|
|
4896
|
-
const
|
|
4897
|
-
|
|
4898
|
-
const Ve =
|
|
4899
|
-
Ve !== "`" && Ve !== "'" && Ve !== '"' || (st++,
|
|
4895
|
+
let st = Be.offset, Ke = De[0]?.[u + 1]?.offset ?? qe.length, Qe = new $.Range(ae, st + 1, ae, Ke + 1), ne = Z.getValueInRange(Qe);
|
|
4896
|
+
const Ee = ne[0];
|
|
4897
|
+
Ee !== "`" && Ee !== "'" && Ee !== '"' || (st++, ne = ne.substring(1));
|
|
4898
|
+
const Ve = ne[ne.length - 1];
|
|
4899
|
+
Ve !== "`" && Ve !== "'" && Ve !== '"' || (st++, ne = ne.substring(0, ne.length - 1));
|
|
4900
4900
|
try {
|
|
4901
|
-
v.getRanges(
|
|
4902
|
-
} catch (
|
|
4903
|
-
console.warn(
|
|
4901
|
+
v.getRanges(ne) && oe.push({ range: { endColumn: Ke, endLineNumber: ae, startColumn: st, startLineNumber: ae }, tooltip: `Goto range '${ne}'`, url: `/range/${ne}` });
|
|
4902
|
+
} catch (ke) {
|
|
4903
|
+
console.warn(ke);
|
|
4904
4904
|
}
|
|
4905
4905
|
}
|
|
4906
4906
|
}
|
|
@@ -4926,14 +4926,14 @@ const zd = ft(yt((e, t) => {
|
|
|
4926
4926
|
Vn = {};
|
|
4927
4927
|
const Z = tn.length;
|
|
4928
4928
|
for (let K = 0; K < Z; K++) {
|
|
4929
|
-
const
|
|
4930
|
-
Vn[
|
|
4929
|
+
const oe = tn[K];
|
|
4930
|
+
Vn[oe] = globalThis[oe];
|
|
4931
4931
|
}
|
|
4932
4932
|
}
|
|
4933
4933
|
})();
|
|
4934
|
-
}, onMount:
|
|
4934
|
+
}, onMount: Ie }) }), Je] });
|
|
4935
4935
|
}, [v, j, o, Je, c]), Fe = Zt(t, () => ({ isScriptEditorElement: () => !0, focus: (ge) => {
|
|
4936
|
-
|
|
4936
|
+
Ae(ge);
|
|
4937
4937
|
}, close: () => Ge(), getEditor: () => v?.getEditor() }), [v]);
|
|
4938
4938
|
return be(() => (a && requestAnimationFrame(() => {
|
|
4939
4939
|
Fe.current?.focus();
|