@sheetxl/studio-mui 0.8.0-beta.10 → 0.8.0-beta.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. package/browser/esm/{ByeL_BZuJ2kl8gtf.mjs → 0IBZhOJaVmzJxuTv.mjs} +1 -1
  2. package/browser/esm/2nRxqrNYbmEn8fS8.mjs +386 -0
  3. package/browser/esm/{fb126BNj3F8URR19.mjs → 7fVZXXuonYb6Z7FU.mjs} +3 -3
  4. package/browser/esm/BAzhmMX4Fk_qnUTp.mjs +414 -0
  5. package/browser/esm/BGL3x0W74D7qZXlf.mjs +318 -0
  6. package/browser/esm/BHGr2gsFofTdAFxq.mjs +515 -0
  7. package/browser/esm/{DU3J8Gcf-WpBxNYg.mjs → BKhcJI-G15D3kGap.mjs} +4 -4
  8. package/browser/esm/BNbub9weuqm3mcoF.mjs +335 -0
  9. package/browser/esm/BSv9MVJaz1DVEffm.mjs +975 -0
  10. package/browser/esm/BWfLpYmd3cSgJ0C6.mjs +141 -0
  11. package/browser/esm/BZqwbIE8qzjSOYcJ.mjs +582 -0
  12. package/browser/esm/BZy9xUrYpAtnKeji.mjs +1288 -0
  13. package/browser/esm/{CIu1bjPJe_x31Oww.mjs → BnkwC5rsg9LZyhoP.mjs} +3 -3
  14. package/browser/esm/BpJsBv413cNQpyg0.mjs +319 -0
  15. package/browser/esm/BpVrgbVISiTDyFR3.mjs +197 -0
  16. package/browser/esm/BsngRDhvVYGVBJeK.mjs +1546 -0
  17. package/browser/esm/{C1Rp2hZrApo5MUc8.mjs → C29TKq47CbXs652l.mjs} +2 -2
  18. package/browser/esm/{CEvZe2cZK-voZTif.mjs → C8p2iMad_NNCwGI_.mjs} +5 -5
  19. package/browser/esm/CBzXksWnb-1gGEWZ.mjs +212 -0
  20. package/browser/esm/{IQLeaAbtGTipUsOD.mjs → CFIAWgpU3UyepLBn.mjs} +25 -24
  21. package/browser/esm/CJD4jF4m9cBGHzr_.mjs +31 -0
  22. package/browser/esm/{CjznclrKqJRi7u9O.mjs → CMc7G7cevxzPGxr9.mjs} +2 -2
  23. package/browser/esm/{B1Yp_uy1vFHcJB3U.mjs → CYtULLhY9M2m3DeH.mjs} +1 -1
  24. package/browser/esm/CeF35ZeFP28Do5Zx.mjs +1379 -0
  25. package/browser/esm/{xKiLJKiLxto8SayF.mjs → CjYKDxU4EP2Kf_vo.mjs} +2 -2
  26. package/browser/esm/{D8al_cJ4U-NgzwoK.mjs → Cq82lvdjyBvlJ8xJ.mjs} +19 -17
  27. package/browser/esm/{X1Db3b_7b_7OuCk6.mjs → CuRxFAO42JkQvMEx.mjs} +1 -1
  28. package/browser/esm/Cvk2yY90hpgXWMAt.mjs +103 -0
  29. package/browser/esm/D0slJycx3nq53qmf.mjs +14 -0
  30. package/browser/esm/{9eKCkvqpMQwqcXiw.mjs → D2jzliMwAo2ENpfi.mjs} +1 -1
  31. package/browser/esm/D5Fn0Hqllwv5HY6i.mjs +7581 -0
  32. package/browser/esm/D5N4nGaZsXtrHAOh.mjs +831 -0
  33. package/browser/esm/D7AqPfyhMiuda5l5.mjs +412 -0
  34. package/browser/esm/DHZA48ZMCETvHmeP.mjs +161 -0
  35. package/browser/esm/DX2_vf7WX6uRLaOZ.mjs +94 -0
  36. package/browser/esm/DaxpbAF1ShkT7hNU.mjs +490 -0
  37. package/browser/esm/{D6S8kVTzOjCn0-SK.mjs → Db3oHfXiRtcH015t.mjs} +162 -156
  38. package/browser/esm/Dt47Huh1l3C4_5_w.mjs +87 -0
  39. package/browser/esm/{DmCQbW4zwkT_Rq88.mjs → DtPt0phL7m56YfHZ.mjs} +1 -1
  40. package/browser/esm/{CoSiOS-og0zFw4Ws.mjs → DtTDaXmnWUoG4VBO.mjs} +2 -2
  41. package/browser/esm/{DHY19rkSiiRZxShC.mjs → DuuyN4-7K6_io2Py.mjs} +3 -3
  42. package/browser/esm/{yZxC4qUENOlMhVUH.mjs → NeGeLF3gbGMZyV6E.mjs} +1 -1
  43. package/browser/esm/PY3Br5Bo_TxcCnCU.mjs +252 -0
  44. package/browser/esm/WIhvQtBkGiw-oFUs.mjs +2566 -0
  45. package/browser/esm/WgIvwAENeO8LANax.mjs +437 -0
  46. package/browser/esm/{DBtc4lku0uHVcqWn.mjs → Yjq3p_7eVGFw2Jod.mjs} +3 -3
  47. package/browser/esm/index.mjs +1053 -192
  48. package/browser/esm/jFRFCWlkD7Dsrhkh.mjs +236 -0
  49. package/browser/esm/lKXEDVt2ow1NlWJj.mjs +392 -0
  50. package/browser/esm/{Blaj2R5hYxtLAW__.mjs → oC0OwOddhOD0OoCJ.mjs} +6 -6
  51. package/browser/esm/{sFOAxZpxXo-qvDSp.mjs → tIKqpsA0vNXH9EgU.mjs} +1 -1
  52. package/browser/esm/{5cbK03T_Oh3tNdR7.mjs → u84rSnESjxqB6gay.mjs} +1 -1
  53. package/licenses/dependencies.txt +94 -94
  54. package/node/esm/{BcwMb6CyVfvEwbHn.mjs → B8Ls4Eh1k8-Yiry_.mjs} +1 -1
  55. package/node/esm/{CKu1AtRgyltyEdEN.mjs → B9X3n8MglL4OitAV.mjs} +1 -1
  56. package/node/esm/{ETK6T6G0SIcFXDe5.mjs → BBGoyqs2L_ccSH1e.mjs} +40 -40
  57. package/node/esm/BLv99aovW4R3C5PE.mjs +515 -0
  58. package/node/esm/BUGU_5lUtnCRlp3n.mjs +519 -0
  59. package/node/esm/BalROFG_oa9PFs9Q.mjs +141 -0
  60. package/node/esm/{ah3CUg4-VmNstGk_.mjs → BqVxnA1mo52ubjdf.mjs} +2 -2
  61. package/node/esm/C3FCh9xju2SccUIE.mjs +1283 -0
  62. package/node/esm/{Bb1sLMqXWKjdve23.mjs → C4F6WY8M4nkLyxdb.mjs} +2 -2
  63. package/node/esm/CKWeipCqqpLnLE5e.mjs +391 -0
  64. package/node/esm/CTnVNfz4eqFnM92M.mjs +212 -0
  65. package/node/esm/Cfi_ly8fBDZZdiZT.mjs +72 -0
  66. package/node/esm/CgKa6JuyJ1tTodev.mjs +1703 -0
  67. package/node/esm/{cqzp431iNSLWictb.mjs → Cq53M7bAUSXMNq1f.mjs} +22 -22
  68. package/node/esm/{BYsG3KYVmxSe_CIQ.mjs → Cr8AYWUoU-XVt0hu.mjs} +1 -1
  69. package/node/esm/CyuOE595I2e-U4cG.mjs +236 -0
  70. package/node/esm/D72CupF9mfy2D1Xa.mjs +94 -0
  71. package/node/esm/{DNSjK5DAH3M14Qbc.mjs → DGDHFK8okuVbRCe5.mjs} +1 -1
  72. package/node/esm/{B8SQfjKjzYHLxzZR.mjs → DJFkALt4XrwkMbnU.mjs} +163 -157
  73. package/node/esm/DJpwI8PlKBI2rk0r.mjs +319 -0
  74. package/node/esm/{DZzvTQxIKr9LbEsA.mjs → DQaGPUYbgL4Y5YZW.mjs} +32 -30
  75. package/node/esm/{D9rzScOA9pEYFrtz.mjs → DsNYnq4NtYBxPmeA.mjs} +20 -20
  76. package/node/esm/DygDgOpa9sJ6YFVS.mjs +385 -0
  77. package/node/esm/Dz0Hg87UcJ-awwiI.mjs +489 -0
  78. package/node/esm/M7YxvRPGCuxuk9aK.mjs +142 -0
  79. package/node/esm/QNjtpX8rIpqGGLEJ.mjs +1379 -0
  80. package/node/esm/{B_jRGdwGFkudwmL-.mjs → ZzvsynJTCSuChYS-.mjs} +1 -1
  81. package/node/esm/{ci8d-mF1H9wnYzix.mjs → di_8-pXh90j4BO4j.mjs} +1 -1
  82. package/node/esm/dm8dmEaTIqfmgyeL.mjs +412 -0
  83. package/node/esm/{D6oQL8knsPpgdXuk.mjs → fmya3XQnTGyQisvT.mjs} +2 -2
  84. package/node/esm/gPYAb_A0T5ZwcQ1E.mjs +318 -0
  85. package/node/esm/index.mjs +8915 -13417
  86. package/node/esm/wB8xMpyJ_NvE16yG.mjs +975 -0
  87. package/node/esm/zGAcd4Jr7wkvXDBS.mjs +197 -0
  88. package/package.json +9 -9
  89. package/resources/locales/de/groups.cmd.json +4 -0
  90. package/resources/locales/de/ui.msg.json +100 -1
  91. package/resources/locales/en/groups.cmd.json +4 -0
  92. package/resources/locales/en/ui.msg.json +100 -1
  93. package/types/src/anchorItems/AnchorItemsDescriptor.d.ts +4 -4
  94. package/types/src/anomalies/AnomaliesPlugin.d.ts +5 -0
  95. package/types/src/anomalies/AnomaliesTaskPane.d.ts +17 -0
  96. package/types/src/anomalies/index.d.ts +3 -0
  97. package/types/src/border/BorderPopupButton.d.ts +1 -1
  98. package/types/src/border/BorderTemplateIcon.d.ts +6 -1
  99. package/types/src/chart/ChartFormatPanel.d.ts +20 -0
  100. package/types/src/chart/ChartPlugin.d.ts +6 -0
  101. package/types/src/chart/index.d.ts +3 -0
  102. package/types/src/color/ColorPopupButton.d.ts +1 -1
  103. package/types/src/command/AccountingStyleCommandButton.d.ts +1 -1
  104. package/types/src/command/DocThemeCommandButton.d.ts +1 -1
  105. package/types/src/command/FontFamilyCommandButton.d.ts +1 -1
  106. package/types/src/command/FontSizeCommandButton.d.ts +1 -1
  107. package/types/src/command/InsertCellControlCommandButton.d.ts +17 -0
  108. package/types/src/command/LanguageCommandButton.d.ts +1 -1
  109. package/types/src/command/LocaleCommandButton.d.ts +1 -1
  110. package/types/src/command/index.d.ts +1 -0
  111. package/types/src/comments/CommentCard.d.ts +2 -2
  112. package/types/src/conditionalFormat/IconPickerPopupButton.d.ts +1 -1
  113. package/types/src/conditions/ConditionEditor.d.ts +1 -1
  114. package/types/src/conditions/OperatorAndParamEditor.d.ts +1 -1
  115. package/types/src/conditions/OperatorSelectPopupButton.d.ts +1 -1
  116. package/types/src/conditions/useFormulaOption.d.ts +2 -2
  117. package/types/src/dialog/WorkbookStatisticsDialog.d.ts +1 -1
  118. package/types/src/fill/PatternPopupButton.d.ts +1 -1
  119. package/types/src/format/BorderPreview.d.ts +11 -4
  120. package/types/src/format/useFormatSelection.d.ts +4 -4
  121. package/types/src/formulaBar/IFormulaBar.d.ts +4 -2
  122. package/types/src/formulaBar/MobileFormulaBar.d.ts +18 -6
  123. package/types/src/formulaBar/MobileInputToolbar.d.ts +9 -3
  124. package/types/src/formulaBar/useFormulaBarSession.d.ts +6 -3
  125. package/types/src/index.d.ts +15 -6
  126. package/types/src/itemsPanel/ItemsPanel.d.ts +5 -0
  127. package/types/src/named/NamedDetailsPanel.d.ts +2 -2
  128. package/types/src/protection/ProtectedCellsPanel.d.ts +2 -2
  129. package/types/src/protection/{SheetProtectionPanel.d.ts → WorksheetProtectionPanel.d.ts} +6 -6
  130. package/types/src/protection/index.d.ts +1 -1
  131. package/types/src/slicer/PresetSlicerStylesCommandButton.d.ts +2 -2
  132. package/types/src/statusBar/PendingStatus.d.ts +19 -0
  133. package/types/src/statusBar/index.d.ts +1 -0
  134. package/types/src/studio/StudioProps.d.ts +10 -10
  135. package/types/src/template/TemplatePanel.d.ts +5 -1
  136. package/types/src/theme/ThemeSelectPopupButton.d.ts +1 -1
  137. package/types/src/toolbar/WorkbookToolbars.d.ts +1 -1
  138. package/types/src/workbook/DefaultRenderers.d.ts +31 -19
  139. package/types/src/workbook/WorkbookContextMenu.d.ts +4 -0
  140. package/types/src/workbook/WorkbookElement.d.ts +5 -4
  141. package/types/src/workbook/WorkbookStrip.d.ts +8 -7
  142. package/types/src/workbook/index.d.ts +1 -1
  143. package/browser/esm/Biy7bhzzzPb5sfRN.mjs +0 -152
  144. package/browser/esm/COv-m-c2byCgvU3M.mjs +0 -14861
  145. package/browser/esm/CtEFHbzYNvYjDYvi.mjs +0 -236
  146. package/browser/esm/Die9NXVFveHvcCT-.mjs +0 -4205
  147. package/browser/esm/sam1KGQZ59B_fADz.mjs +0 -1941
  148. package/node/esm/BYVLi0md4AYuDsB_.mjs +0 -236
  149. package/node/esm/BYwXhrEwkRAt9nJS.mjs +0 -71
  150. package/node/esm/Cmt8Wv806N7NmE4Y.mjs +0 -3344
@@ -1,65 +1,202 @@
1
- (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`._sheetxl-reset_11z3j_1{margin:0;padding:0;line-height:1;display:block}._sheetxl-reset_11z3j_1 table,._sheetxl-reset_11z3j_1 thead,._sheetxl-reset_11z3j_1 tbody,._sheetxl-reset_11z3j_1 tfoot,._sheetxl-reset_11z3j_1 tr,._sheetxl-reset_11z3j_1 th,._sheetxl-reset_11z3j_1 td{border-collapse:inherit;border-spacing:0;border:none;border-color:inherit;width:auto;height:auto;vertical-align:inherit;text-align:left;font-weight:inherit;-webkit-border-horizontal-spacing:0;-webkit-border-vertical-spacing:0;margin:0;padding:0;display:block}._sheetxl-reset_11z3j_1 th,._sheetxl-reset_11z3j_1 td{display:inline}html{color:initial}._table-style-options-container_1kfn2_1{container-type:inline-size}._table-style-options_1kfn2_1{user-select:none;grid-template-columns:1fr;display:grid;@container (width>600px){grid-template-rows:repeat(3,auto);grid-auto-columns:1fr;grid-auto-flow:column;gap:2px}}._range-row_1yps2_1{flex-direction:column;flex:100%;align-items:center;row-gap:8px;width:100%;display:flex;@container (width>600px){flex-direction:row;justify-content:space-between;gap:12px}}._action-row_1yps2_17{flex-direction:column;align-items:start;gap:4px;width:100%;display:flex;@container (width>600px){flex-direction:row;justify-content:space-evenly;align-items:center}}._details-panel_mdq6z_1{box-sizing:border-box;background:0 0;flex-direction:column;flex:auto;align-items:stretch;width:100%;height:100%;display:flex;overflow:hidden}._editor_mdq6z_13{flex-direction:column;height:100%;display:flex}._editor-panel_mdq6z_19{flex-direction:column;display:flex}._editor-buttons_mdq6z_24{justify-content:flex-end;display:flex}._card_mdq6z_29{flex-direction:column;display:flex}._stats-items_151a8_1{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:2px;min-width:0;max-height:1rem;display:flex;overflow:hidden}._stats-item_151a8_1{flex-shrink:0}._stats-item-label_151a8_15{user-select:none;white-space:nowrap;cursor:pointer;border-radius:2px;align-items:center;gap:4px;padding:0 4px;transition:background-color .2s;display:flex}._stats-item-label_151a8_15:hover{background-color:#0000000a}._stats-item-label_151a8_15:active{background-color:#00000014}._formula-bar_uer84_1{flex-direction:row;flex:100%;align-items:start;display:flex}._card_h0jnt_7{width:100%}._actionRoot_h0jnt_11{justify-content:space-between;padding:8px 8px 8px 16px}._icons_h0jnt_16{align-items:center;margin-left:auto;display:flex}._expand_h0jnt_22{color:var(--sxl-color-error-content);padding:8px;transition:all .2s ease-in-out;transform:rotate(0)}._expandOpen_h0jnt_29{transform:rotate(180deg)}._stackTraceContainer_h0jnt_33{padding:16px}._paper_h0jnt_37{background-color:#fff;padding:16px}._checkIcon_h0jnt_42{padding-right:4px;font-size:20px}._button_h0jnt_47{text-transform:none;padding:0}._styled-resizer_fdl5y_3{background-color:var(--sxl-color-neutral,grey)}._styled-resizer_fdl5y_3:hover,.splitPane.dragging ._styled-resizer_fdl5y_3{background-color:var(--sxl-color-primary,blue)}/*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
1
+ (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`._sheetxl-reset_11z3j_1{margin:0;padding:0;line-height:1;display:block}._sheetxl-reset_11z3j_1 table,._sheetxl-reset_11z3j_1 thead,._sheetxl-reset_11z3j_1 tbody,._sheetxl-reset_11z3j_1 tfoot,._sheetxl-reset_11z3j_1 tr,._sheetxl-reset_11z3j_1 th,._sheetxl-reset_11z3j_1 td{border-collapse:inherit;border-spacing:0;border:none;border-color:inherit;width:auto;height:auto;vertical-align:inherit;text-align:left;font-weight:inherit;-webkit-border-horizontal-spacing:0;-webkit-border-vertical-spacing:0;margin:0;padding:0;display:block}._sheetxl-reset_11z3j_1 th,._sheetxl-reset_11z3j_1 td{display:inline}html{color:initial}._stats-items_151a8_1{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:2px;min-width:0;max-height:1rem;display:flex;overflow:hidden}._stats-item_151a8_1{flex-shrink:0}._stats-item-label_151a8_15{user-select:none;white-space:nowrap;cursor:pointer;border-radius:2px;align-items:center;gap:4px;padding:0 4px;transition:background-color .2s;display:flex}._stats-item-label_151a8_15:hover{background-color:#0000000a}._stats-item-label_151a8_15:active{background-color:#00000014}._formula-bar_uer84_1{flex-direction:row;flex:100%;align-items:start;display:flex}._details-panel_mdq6z_1{box-sizing:border-box;background:0 0;flex-direction:column;flex:auto;align-items:stretch;width:100%;height:100%;display:flex;overflow:hidden}._editor_mdq6z_13{flex-direction:column;height:100%;display:flex}._editor-panel_mdq6z_19{flex-direction:column;display:flex}._editor-buttons_mdq6z_24{justify-content:flex-end;display:flex}._card_mdq6z_29{flex-direction:column;display:flex}._table-style-options-container_1kfn2_1{container-type:inline-size}._table-style-options_1kfn2_1{user-select:none;grid-template-columns:1fr;display:grid;@container (width>600px){grid-template-rows:repeat(3,auto);grid-auto-columns:1fr;grid-auto-flow:column;gap:2px}}._range-row_1yps2_1{flex-direction:column;flex:100%;align-items:center;row-gap:8px;width:100%;display:flex;@container (width>600px){flex-direction:row;justify-content:space-between;gap:12px}}._action-row_1yps2_17{flex-direction:column;align-items:start;gap:4px;width:100%;display:flex;@container (width>600px){flex-direction:row;justify-content:space-evenly;align-items:center}}._card_h0jnt_7{width:100%}._actionRoot_h0jnt_11{justify-content:space-between;padding:8px 8px 8px 16px}._icons_h0jnt_16{align-items:center;margin-left:auto;display:flex}._expand_h0jnt_22{color:var(--sxl-color-error-content);padding:8px;transition:all .2s ease-in-out;transform:rotate(0)}._expandOpen_h0jnt_29{transform:rotate(180deg)}._stackTraceContainer_h0jnt_33{padding:16px}._paper_h0jnt_37{background-color:#fff;padding:16px}._checkIcon_h0jnt_42{padding-right:4px;font-size:20px}._button_h0jnt_47{text-transform:none;padding:0}._styled-resizer_fdl5y_3{background-color:var(--sxl-color-neutral,grey)}._styled-resizer_fdl5y_3:hover,.splitPane.dragging ._styled-resizer_fdl5y_3{background-color:var(--sxl-color-primary,blue)}/*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
2
2
  /**
3
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.10
3
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.12
4
4
  *
5
5
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
6
6
  * License: The license can be found at https://www.sheetxl.com/license.
7
7
  */
8
- import { $ as e, $t as t, A as n, B as r, C as i, Cn as a, D as o, Dn as s, E as c, En as l, F as u, G as d, Gt as f, H as p, I as m, J as h, K as g, Kt as _, L as v, M as y, N as b, O as x, On as S, P as C, Q as w, Qt as T, R as E, S as ee, Sn as te, St as ne, T as re, Tn as ie, Tt as ae, U as oe, V as se, W as ce, X as le, Xt as ue, Y as de, Yt as fe, Z as pe, Zt as me, _ as he, _n as ge, _t as _e, an as ve, at as ye, b as be, bn as xe, bt as Se, c as Ce, ct as we, d as Te, dn as Ee, dt as De, en as Oe, et as ke, f as Ae, fn as je, ft as Me, g as Ne, gn as Pe, gt as Fe, h as Ie, hn as Le, ht as Re, i as ze, in as Be, it as Ve, j as He, k as Ue, kn as We, kt as Ge, lt as Ke, m as qe, mn as Je, mt as Ye, n as Xe, nn as Ze, nt as Qe, on as $e, ot as et, p as tt, pn as nt, pt as rt, q as it, qt as at, r as ot, rn as st, rt as ct, s as lt, sn as ut, st as dt, tn as ft, tt as pt, u as mt, un as ht, ut as gt, v as _t, vn as vt, vt as yt, w as bt, wn as xt, wt as St, x as Ct, xn as wt, xt as Tt, y as Et, yn as Dt, yt as Ot, z as kt } from "./COv-m-c2byCgvU3M.mjs";
9
- import { C as At, E as jt, T as Mt, _ as Nt, a as Pt, b as Ft, c as It, d as Lt, f as Rt, g as zt, h as Bt, i as Vt, l as Ht, m as Ut, n as Wt, o as Gt, p as Kt, r as qt, s as Jt, t as Yt, u as Xt, v as Zt, w as Qt, x as $t, y as en } from "./sam1KGQZ59B_fADz.mjs";
10
- import { t as tn } from "./5cbK03T_Oh3tNdR7.mjs";
11
- import { t as nn } from "./Biy7bhzzzPb5sfRN.mjs";
12
- import { n as rn, t as an } from "./fb126BNj3F8URR19.mjs";
13
- import { a as on, i as sn, n as cn, o as ln, r as un, t as dn } from "./CIu1bjPJe_x31Oww.mjs";
14
- import { t as fn } from "./IQLeaAbtGTipUsOD.mjs";
15
- import { LicenseManager as pn, LicenseManager as mn } from "@sheetxl/sdk";
16
- import { DefaultTaskPaneRegistry as hn, ThemeStateDefaults as gn, ThemeStateKey as D, WorkbookIO as _n, WorkbookIO as O, setPrintExamplesOnLoad as vn, useModelListener as yn, useRangeListener as bn, useWindowChrome as xn, useWorkbook as Sn, useWorkbookFormat as Cn, useWorkbookName as wn } from "@sheetxl/react";
17
- import { CommandButtonType as k, createThemeScopeClass as Tn, lazyComponent as En, useCallbackRef as A, useCommandButtonEntry as j, useCommandButtonRegistry as Dn, useCommands as M, useLocationSearch as On, usePersistentState as kn, useResolvedThemeMode as An, useTranslator as jn } from "@sheetxl/utils-react";
18
- import { Suspense as Mn, createElement as N, forwardRef as P, memo as F, useCallback as I, useEffect as L, useId as Nn, useMemo as R, useRef as z, useState as B } from "react";
19
- import { CommandButton as V, CommandGroup as Pn, CommandPopupButton as H, ExhibitDivider as U, LabelIcon as Fn, LazyLoadErrorPanel as In, OptionsDialog as Ln, defaultCreatePopupPanel as W, renderMembers as Rn } from "@sheetxl/utils-mui";
20
- import { Fragment as G, jsx as K, jsxs as q } from "react/jsx-runtime";
21
- import { Box as J, Paper as zn, TextField as Y, Typography as Bn, useMediaQuery as Vn } from "@mui/material";
22
- import { defineLazyModule as Hn } from "@sheetxl/utils";
23
- var X = Object.defineProperty, Un = (e, t) => {
24
- let n = {};
25
- for (var r in e) X(n, r, {
26
- get: e[r],
27
- enumerable: !0
8
+ import { $ as e, A as t, B as n, C as r, Ct as i, D as a, E as o, Et as s, F as c, G as l, H as u, I as d, J as f, K as p, L as m, M as h, N as g, O as _, P as v, Q as y, R as b, S as x, St as S, T as C, Tt as w, U as T, V as E, W as D, X as O, Y as k, Z as A, _ as j, _t as M, a as N, at as P, b as ee, bt as te, c as ne, ct as F, d as re, dt as ie, et as I, f as ae, ft as oe, g as se, gt as ce, h as le, ht as ue, i as de, it as fe, j as pe, k as me, l as he, lt as ge, m as _e, mt as ve, n as ye, nt as be, o as xe, ot as Se, p as Ce, pt as we, q as Te, r as Ee, s as De, st as Oe, tt as ke, u as Ae, ut as je, v as Me, vt as Ne, w as Pe, wt as Fe, x as Ie, xt as Le, y as Re, yt as ze, z as Be } from "./D5Fn0Hqllwv5HY6i.mjs";
9
+ import { c as Ve, i as He, l as Ue, n as We, o as Ge, r as Ke, s as qe, t as Je } from "./D5N4nGaZsXtrHAOh.mjs";
10
+ import { t as Ye } from "./Cvk2yY90hpgXWMAt.mjs";
11
+ import { a as Xe } from "./BNbub9weuqm3mcoF.mjs";
12
+ import { t as L } from "./u84rSnESjxqB6gay.mjs";
13
+ import { a as Ze, c as Qe, n as $e, o as et, s as tt, t as nt } from "./BZqwbIE8qzjSOYcJ.mjs";
14
+ import { n as rt, r as it, t as at } from "./WgIvwAENeO8LANax.mjs";
15
+ import { t as ot } from "./CYtULLhY9M2m3DeH.mjs";
16
+ import { n as st, t as ct } from "./7fVZXXuonYb6Z7FU.mjs";
17
+ import { t as lt } from "./DHZA48ZMCETvHmeP.mjs";
18
+ import { n as ut, r as dt, t as ft } from "./PY3Br5Bo_TxcCnCU.mjs";
19
+ import { a as pt, i as mt, n as ht, o as gt, r as _t, t as vt } from "./BnkwC5rsg9LZyhoP.mjs";
20
+ import { t as yt } from "./D7AqPfyhMiuda5l5.mjs";
21
+ import { t as bt } from "./Dt47Huh1l3C4_5_w.mjs";
22
+ import { Color as xt, IFill as R, LicenseManager as St, LicenseManager as Ct } from "@sheetxl/sdk";
23
+ import { DefaultTaskPaneRegistry as wt, ThemeStateDefaults as Tt, ThemeStateKey as Et, WorkbookIO as Dt, WorkbookIO as Ot, setPrintExamplesOnLoad as kt, useInputField as At, useModelListener as jt, useRangeListener as Mt, useWindowChrome as Nt, useWorkbook as Pt, useWorkbookFormat as Ft, useWorkbookName as It } from "@sheetxl/react";
24
+ import { CommandButtonType as Lt, DynamicIcon as z, RenderSlot as Rt, createThemeScopeClass as zt, lazyComponent as Bt, useCallbackRef as B, useCommandButtonEntry as Vt, useCommandButtonRegistry as Ht, useCommands as Ut, useFloatStack as Wt, useLocationSearch as Gt, usePersistentState as Kt, useResolvedThemeMode as qt, useTextSelectionDrag as Jt, useTranslator as V } from "@sheetxl/utils-react";
25
+ import { Suspense as Yt, createElement as Xt, forwardRef as H, memo as U, useCallback as W, useEffect as G, useId as Zt, useImperativeHandle as Qt, useLayoutEffect as $t, useMemo as K, useRef as q, useState as J } from "react";
26
+ import { CommandButton as Y, CommandGroup as en, CommandPopupButton as X, ExhibitDivider as tn, ExhibitIconButton as nn, ExhibitPopupIconButton as rn, ExhibitTooltip as an, LabelIcon as on, LazyLoadErrorPanel as sn, SimpleTooltip as cn, defaultRenderPopupPanel as ln, renderMembers as un } from "@sheetxl/utils-mui";
27
+ import { Fragment as dn, jsx as Z, jsxs as Q } from "react/jsx-runtime";
28
+ import { Box as $, FormControl as fn, InputAdornment as pn, InputLabel as mn, MenuItem as hn, Paper as gn, Select as _n, TextField as vn, Typography as yn, useMediaQuery as bn, useTheme as xn } from "@mui/material";
29
+ import { defineLazyModule as Sn } from "@sheetxl/utils";
30
+ var Cn = (e) => {
31
+ e.button === 0 && e.preventDefault();
32
+ }, wn = U(H((e, t) => {
33
+ let { disabled: n, className: r, sx: i, defaultInput: a, value: o, formName: s, formOptions: c, onChangeInput: l, onChangeText: u, onDone: d, changeOn: f, onValidate: p, apiRef: m, label: h, helperText: g, showError: _ = !0, onChangeError: v, hideAdornment: y, propsInput: b, onKeyDown: x, onFocus: S, ...C } = e, w = V(), T = Jt(), E = h ?? w("namedInput.label"), D = ot(), O = s && D ? D.register(s, c) : null, k = At({
34
+ value: o ?? "",
35
+ onChange: l,
36
+ onChangeText: u,
37
+ onDone: d,
38
+ changeOn: f,
39
+ onValidate: p,
40
+ disabled: n
28
41
  });
29
- return t || X(n, Symbol.toStringTag, { value: "Module" }), n;
30
- }, Z = F(P((e, t) => {
31
- let { groupKey: n = "workbook", disabled: r, ...i } = e, [a, o] = B([]), s = O.canWrite(), c = O.canRead();
32
- L(() => {
42
+ Qt(m, () => k, [k]);
43
+ let A = q(D);
44
+ A.current = D;
45
+ let j = q(v);
46
+ j.current = v;
47
+ let M = q(null);
48
+ G(() => {
49
+ if (k.error === M.current || (M.current = k.error, j.current?.(k.error), !s)) return;
50
+ let e = A.current;
51
+ e && (k.error ? e.setError(s, { message: w(k.error) }) : e.clearErrors(s));
52
+ }, [k.error, s]);
53
+ let N = f === "done", P = k.engaged && k.dirty, ee = K(() => {
54
+ if (!y && N) return Q(pn, {
55
+ tabIndex: -1,
56
+ onMouseDown: Cn,
57
+ "aria-hidden": !P,
58
+ sx: {
59
+ display: "flex",
60
+ position: "relative",
61
+ flex: "0",
62
+ ...P ? null : {
63
+ visibility: "hidden",
64
+ pointerEvents: "none"
65
+ }
66
+ },
67
+ position: "end",
68
+ children: [Z(nn, {
69
+ dense: !0,
70
+ outlined: !1,
71
+ color: "primary",
72
+ "aria-label": "commit-input",
73
+ icon: Z(z, { iconKey: "CheckSuccess" }),
74
+ propsTooltip: {
75
+ label: w("referenceInput.commit"),
76
+ simple: !0
77
+ },
78
+ disabled: !!k.error,
79
+ tabIndex: -1,
80
+ onMouseDown: Cn,
81
+ onClick: () => {
82
+ k.commit();
83
+ }
84
+ }), Z(nn, {
85
+ dense: !0,
86
+ outlined: !1,
87
+ color: "warning",
88
+ "aria-label": "cancel-input",
89
+ icon: Z(z, { iconKey: "CloseError" }),
90
+ propsTooltip: {
91
+ label: w("referenceInput.cancel"),
92
+ simple: !0
93
+ },
94
+ tabIndex: -1,
95
+ onMouseDown: Cn,
96
+ onClick: () => {
97
+ k.cancel();
98
+ }
99
+ })]
100
+ });
101
+ }, [
102
+ y,
103
+ N,
104
+ P,
105
+ k.commit,
106
+ k.cancel,
107
+ !!k.error
108
+ ]);
109
+ return Z(fn, {
110
+ sx: {
111
+ minWidth: 135,
112
+ width: "100%",
113
+ ...i
114
+ },
115
+ size: "small",
116
+ ref: t,
117
+ className: L("sxl-input-field", r),
118
+ ...C,
119
+ children: Z(vn, {
120
+ label: E,
121
+ placeholder: a,
122
+ disabled: n,
123
+ error: !!k.error,
124
+ helperText: k.error && _ ? w(k.error) : g === void 0 ? " " : g,
125
+ sx: { "& .MuiFormHelperText-root": { marginTop: (e) => e.spacing(.5) } },
126
+ slotProps: {
127
+ input: { endAdornment: ee },
128
+ inputLabel: { shrink: !0 },
129
+ htmlInput: {
130
+ spellCheck: !1,
131
+ autoComplete: "off",
132
+ onPointerDown: T.onPointerDown,
133
+ onDragStart: T.onDragStart,
134
+ ...b,
135
+ className: L("autoFocus", b?.className),
136
+ name: s,
137
+ readOnly: n,
138
+ sx: {
139
+ paddingTop: (e) => e.spacing(1.25),
140
+ paddingBottom: (e) => e.spacing(.75)
141
+ }
142
+ }
143
+ },
144
+ value: k.inputProps.value,
145
+ inputRef: (e) => {
146
+ k.inputProps.ref(e), O?.ref && O.ref(e);
147
+ },
148
+ onChange: (e) => {
149
+ k.inputProps.onChange(e), O?.onChange(e);
150
+ },
151
+ onKeyDown: (e) => {
152
+ k.inputProps.onKeyDown(e), e.defaultPrevented || x?.(e);
153
+ },
154
+ onFocus: (e) => {
155
+ k.inputProps.onFocus(e), S?.(e);
156
+ },
157
+ onBlur: (e) => {
158
+ k.inputProps.onBlur(e), O?.onBlur(e);
159
+ },
160
+ onContextMenu: (e) => {
161
+ e.stopPropagation();
162
+ }
163
+ })
164
+ });
165
+ }));
166
+ wn.displayName = "InputField";
167
+ var Tn = U(H((e, t) => {
168
+ let { groupKey: n = "workbook", disabled: r, ...i } = e, [a, o] = J([]), s = Ot.canWrite(), c = Ot.canRead();
169
+ G(() => {
33
170
  let e = !0;
34
- return O.getWriteFormats().then((t) => {
171
+ return Ot.getWriteFormats().then((t) => {
35
172
  e && o(t);
36
173
  }), () => {
37
174
  e = !1;
38
175
  };
39
176
  }, []);
40
- let l = Sn(), u = Cn(l), d = R(() => {
177
+ let l = Pt(), u = Ft(l), d = K(() => {
41
178
  if (a.length === 0) return null;
42
179
  let e = u?.toLowerCase();
43
180
  return (e ? a.find((t) => t.key.toLowerCase() === e) ?? a.find((t) => t.exts?.some((t) => t.toLowerCase() === e)) : void 0) ?? a.find((e) => e.exts?.some((e) => e.toLowerCase() === "sxl")) ?? a.find((e) => !e.advanced) ?? a[0];
44
- }, [a, u]), [f] = M(d ? `saveWorkbookAs${d.key}` : []), p = Dn(), m = p.resolveMembers("newWorkbookOptions") ?? ["newWorkbook"], h = A((e) => {
181
+ }, [a, u]), [f] = Ut(d ? `saveWorkbookAs${d.key}` : []), p = Ht(), m = p.resolveMembers("newWorkbookOptions") ?? ["newWorkbook"], h = B((e) => {
45
182
  let t = {
46
- variant: k.Menuitem,
183
+ variant: Lt.Menuitem,
47
184
  groupKey: n,
48
185
  disabled: r
49
- }, i = q(G, { children: [
50
- m.length > 1 ? K(H, {
186
+ }, i = Q(dn, { children: [
187
+ m.length > 1 ? Z(X, {
51
188
  ...t,
52
189
  quickCommand: "newWorkbook",
53
- createPopupPanel: (e) => {
54
- let t = Rn(m, {
55
- variant: k.Menuitem,
190
+ renderPopupPanel: (e) => {
191
+ let t = un(m, {
192
+ variant: Lt.Menuitem,
56
193
  dividerOrientation: "horizontal",
57
194
  groupKey: "newWorkbookOptions",
58
195
  registry: p,
59
196
  propsCommandButton: { disabled: r },
60
197
  propsCommandPopup: { disabled: r }
61
198
  });
62
- return W({
199
+ return ln({
63
200
  ...e,
64
201
  children: t,
65
202
  onClick: () => {
@@ -67,28 +204,28 @@ var X = Object.defineProperty, Un = (e, t) => {
67
204
  }
68
205
  });
69
206
  }
70
- }) : K(V, {
207
+ }) : Z(Y, {
71
208
  ...t,
72
209
  commandKey: "newWorkbook"
73
210
  }),
74
- K(U, { orientation: "horizontal" }),
75
- c ? K(H, {
211
+ Z(tn, { orientation: "horizontal" }),
212
+ c ? Z(X, {
76
213
  ...t,
77
214
  quickCommand: "openWorkbook",
78
- createPopupPanel: (e) => {
215
+ renderPopupPanel: (e) => {
79
216
  let n = {
80
217
  ...t,
81
218
  groupKey: "openWorkbookOptions"
82
- }, r = [N(V, {
219
+ }, r = [Xt(Y, {
83
220
  ...n,
84
221
  key: "device",
85
222
  commandKey: "openWorkbook"
86
- }), N(V, {
223
+ }), Xt(Y, {
87
224
  ...n,
88
225
  key: "web",
89
226
  commandKey: "openWorkbookFromUrl"
90
227
  })];
91
- return W({
228
+ return ln({
92
229
  ...e,
93
230
  children: r,
94
231
  onClick: () => {
@@ -97,28 +234,28 @@ var X = Object.defineProperty, Un = (e, t) => {
97
234
  });
98
235
  }
99
236
  }) : null,
100
- s && a.length > 0 ? K(H, {
237
+ s && a.length > 0 ? Z(X, {
101
238
  ...t,
102
239
  quickCommand: "saveWorkbook",
103
- createPopupPanel: (e) => {
240
+ renderPopupPanel: (e) => {
104
241
  let n = {
105
242
  ...t,
106
243
  groupKey: "saveWorkbookOptions"
107
- }, r = [N(V, {
244
+ }, r = [Xt(Y, {
108
245
  ...n,
109
246
  key: "saveWorkbookAs",
110
247
  commandKey: "saveWorkbookAs",
111
248
  label: f?.getLabel("saveWorkbookOptions"),
112
249
  icon: f?.getIcon("saveWorkbookOptions")
113
250
  })], i = a.filter((e) => !e.advanced && e.key !== d?.key);
114
- return i.length > 0 && r.push(K(U, { orientation: "horizontal" }, "divider")), i.forEach((e) => {
251
+ return i.length > 0 && r.push(Z(tn, { orientation: "horizontal" }, "divider")), i.forEach((e) => {
115
252
  let t = e.key, i = `saveWorkbookAs${t}`;
116
- r.push(N(V, {
253
+ r.push(Xt(Y, {
117
254
  ...n,
118
255
  key: t,
119
256
  commandKey: i
120
257
  }));
121
- }), W({
258
+ }), ln({
122
259
  ...e,
123
260
  children: r,
124
261
  onClick: () => {
@@ -128,7 +265,7 @@ var X = Object.defineProperty, Un = (e, t) => {
128
265
  }
129
266
  }) : null
130
267
  ] });
131
- return W({
268
+ return ln({
132
269
  ...e,
133
270
  children: i,
134
271
  onClick: (t) => {
@@ -143,8 +280,8 @@ var X = Object.defineProperty, Un = (e, t) => {
143
280
  f,
144
281
  m,
145
282
  p
146
- ]), g = j("fileOptions"), _ = g?.getLabel?.() ?? "File", v = g?.getDescription?.() ?? "Options for saving and loading the workbook.";
147
- return K(H, {
283
+ ]), g = Vt("fileOptions"), _ = g?.getLabel?.() ?? "File", v = g?.getDescription?.() ?? "Options for saving and loading the workbook.";
284
+ return Z(X, {
148
285
  disabled: r,
149
286
  groupKey: n,
150
287
  label: _,
@@ -158,41 +295,41 @@ var X = Object.defineProperty, Un = (e, t) => {
158
295
  }
159
296
  },
160
297
  ...i,
161
- createPopupPanel: h,
162
- icon: K(Fn, {
298
+ renderPopupPanel: h,
299
+ icon: Z(on, {
163
300
  className: "label",
164
301
  icon: null,
165
302
  label: _
166
303
  })
167
304
  });
168
305
  }));
169
- Z.displayName = "FileCommandButton";
170
- var Wn = F(P((e, t) => {
171
- let { groupKey: n, disabled: r, ...i } = e, [a] = M(["themeMode"]), o = j("appearanceOptions"), s = A((e) => {
306
+ Tn.displayName = "FileCommandButton";
307
+ var En = U(H((e, t) => {
308
+ let { groupKey: n, disabled: r, ...i } = e, [a] = Ut(["themeMode"]), o = Vt("appearanceOptions"), s = B((e) => {
172
309
  let t = {
173
- variant: k.Menuitem,
310
+ variant: Lt.Menuitem,
174
311
  groupKey: "appearanceOptions",
175
312
  disabled: r
176
- }, n = q(G, { children: [
177
- K(V, {
313
+ }, n = Q(dn, { children: [
314
+ Z(Y, {
178
315
  ...t,
179
316
  commandKey: "themeMode"
180
317
  }),
181
- K(V, {
318
+ Z(Y, {
182
319
  ...t,
183
320
  commandKey: "defaultThemeMode"
184
321
  }),
185
- K(U, { orientation: "horizontal" }),
186
- K(V, {
322
+ Z(tn, { orientation: "horizontal" }),
323
+ Z(Y, {
187
324
  ...t,
188
325
  commandKey: "enableDarkGrid"
189
326
  }),
190
- K(V, {
327
+ Z(Y, {
191
328
  ...t,
192
329
  commandKey: "enableDarkImages"
193
330
  })
194
331
  ] });
195
- return W({
332
+ return ln({
196
333
  ...e,
197
334
  children: n
198
335
  });
@@ -200,11 +337,11 @@ var Wn = F(P((e, t) => {
200
337
  r,
201
338
  a,
202
339
  n
203
- ]), c = a?.getState(), l = Vn("(prefers-color-scheme: dark)"), u = c === "dark" || c === null && l, d = a?.getState() !== null;
204
- return K(H, {
340
+ ]), c = a?.getState(), l = bn("(prefers-color-scheme: dark)"), u = c === "dark" || c === null && l, d = a?.getState() !== null;
341
+ return Z(X, {
205
342
  ref: t,
206
343
  quickCommand: "themeMode",
207
- createPopupPanel: s,
344
+ renderPopupPanel: s,
208
345
  label: o?.getLabel?.(),
209
346
  tooltip: o?.getDescription?.(),
210
347
  onQuickClick: () => {
@@ -213,111 +350,832 @@ var Wn = F(P((e, t) => {
213
350
  selected: d,
214
351
  ...i
215
352
  });
216
- })), Gn = F(P((e, t) => {
353
+ })), Dn = U(H((e, t) => {
217
354
  let { ...n } = e;
218
- return K(Pn, {
355
+ return Z(en, {
219
356
  ref: t,
220
357
  groupKey: "insertFunctionSumOptions",
221
358
  ...n
222
359
  });
223
360
  }));
224
- Gn.displayName = "InsertFunctionSumCommandPopupButton";
225
- var Kn = Un({
226
- PasswordDialog: () => Q,
227
- default: () => Q
228
- }), Q = (e) => {
229
- let t = jn(), { description: n, requireCurrent: r = !1, onApply: i, title: a, sx: o, ...s } = e, [c, l] = B(""), [u, d] = B(""), [f, p] = B(""), [m, h] = B(!1), g = u === "", _ = f !== u, v = !g && !_;
230
- return K(Ln, {
231
- title: a ?? t(r ? "password.titleChange" : "password.title"),
232
- options: ["Ok", "Cancel"],
233
- defaultOption: "Ok",
234
- cancelOption: "Cancel",
235
- autoFocusSel: ".autoFocus",
236
- sx: {
237
- width: "380px",
238
- ...o
361
+ function On(e, t, n) {
362
+ return e === R.BuiltInSheetPattern.Solid ? {
363
+ foreground: n,
364
+ background: t
365
+ } : {
366
+ foreground: t,
367
+ background: n
368
+ };
369
+ }
370
+ Dn.displayName = "InsertFunctionSumCommandPopupButton";
371
+ var kn = U((e) => {
372
+ let { patternType: t, foreground: n, background: r, createCell: i, darkMode: a = !1, className: o, style: s, ...c } = e, l = K(() => {
373
+ let e = On(t, n, r);
374
+ return i({ style: { fill: {
375
+ type: R.Type.Pattern,
376
+ patternType: t,
377
+ foreground: e.foreground ?? void 0,
378
+ background: e.background ?? void 0
379
+ } } })?.getStyle().getFill().toCSS(a) ?? {};
380
+ }, [
381
+ t,
382
+ n,
383
+ r,
384
+ i,
385
+ a
386
+ ]);
387
+ return Z("div", {
388
+ className: L("sxl-pattern-swatch", o),
389
+ style: {
390
+ width: "100%",
391
+ height: "100%",
392
+ ...l,
393
+ ...s
239
394
  },
240
- onValidateOption: (e) => e === "Cancel" || (h(!0), v),
241
- onOption: (e, t) => {
242
- if (!t && e === "Ok") return i(u, r ? c : void 0);
395
+ ...c
396
+ });
397
+ });
398
+ kn.displayName = "PatternSwatch";
399
+ var An = Object.freeze([
400
+ R.BuiltInSheetPattern.Solid,
401
+ R.BuiltInSheetPattern.DarkGray,
402
+ R.BuiltInSheetPattern.MediumGray,
403
+ R.BuiltInSheetPattern.LightGray,
404
+ R.BuiltInSheetPattern.Gray125,
405
+ R.BuiltInSheetPattern.Gray0625,
406
+ R.BuiltInSheetPattern.DarkHorizontal,
407
+ R.BuiltInSheetPattern.DarkVertical,
408
+ R.BuiltInSheetPattern.DarkDown,
409
+ R.BuiltInSheetPattern.DarkUp,
410
+ R.BuiltInSheetPattern.DarkGrid,
411
+ R.BuiltInSheetPattern.DarkTrellis,
412
+ R.BuiltInSheetPattern.LightHorizontal,
413
+ R.BuiltInSheetPattern.LightVertical,
414
+ R.BuiltInSheetPattern.LightDown,
415
+ R.BuiltInSheetPattern.LightUp,
416
+ R.BuiltInSheetPattern.LightGrid,
417
+ R.BuiltInSheetPattern.LightTrellis
418
+ ]);
419
+ function jn(e, t) {
420
+ switch (t) {
421
+ case R.BuiltInSheetPattern.None: return e("fill.pattern.none");
422
+ case R.BuiltInSheetPattern.Solid: return e("fill.pattern.solid");
423
+ case R.BuiltInSheetPattern.Gray0625: return e("fill.pattern.gray0625");
424
+ case R.BuiltInSheetPattern.Gray125: return e("fill.pattern.gray125");
425
+ case R.BuiltInSheetPattern.LightGray: return e("fill.pattern.lightGray");
426
+ case R.BuiltInSheetPattern.MediumGray: return e("fill.pattern.mediumGray");
427
+ case R.BuiltInSheetPattern.DarkGray: return e("fill.pattern.darkGray");
428
+ case R.BuiltInSheetPattern.LightHorizontal: return e("fill.pattern.lightHorizontal");
429
+ case R.BuiltInSheetPattern.LightVertical: return e("fill.pattern.lightVertical");
430
+ case R.BuiltInSheetPattern.LightDown: return e("fill.pattern.lightDown");
431
+ case R.BuiltInSheetPattern.LightUp: return e("fill.pattern.lightUp");
432
+ case R.BuiltInSheetPattern.LightGrid: return e("fill.pattern.lightGrid");
433
+ case R.BuiltInSheetPattern.LightTrellis: return e("fill.pattern.lightTrellis");
434
+ case R.BuiltInSheetPattern.DarkHorizontal: return e("fill.pattern.darkHorizontal");
435
+ case R.BuiltInSheetPattern.DarkVertical: return e("fill.pattern.darkVertical");
436
+ case R.BuiltInSheetPattern.DarkDown: return e("fill.pattern.darkDown");
437
+ case R.BuiltInSheetPattern.DarkUp: return e("fill.pattern.darkUp");
438
+ case R.BuiltInSheetPattern.DarkGrid: return e("fill.pattern.darkGrid");
439
+ case R.BuiltInSheetPattern.DarkTrellis: return e("fill.pattern.darkTrellis");
440
+ default: return t;
441
+ }
442
+ }
443
+ var Mn = U((e) => {
444
+ let { selectedPattern: t, foreground: n, background: r, onSelectPattern: i, createCell: a, darkMode: o = !1, disabled: s, ...c } = e, l = V(), u = B(i ?? ((e) => {}), [i]), d = W((e) => {
445
+ let { closeFloat: i } = e;
446
+ return Z($, {
447
+ sx: {
448
+ display: "grid",
449
+ gridTemplateColumns: "repeat(6, 34px)",
450
+ gap: "4px",
451
+ padding: "8px"
452
+ },
453
+ children: An.map((e) => Z(an, {
454
+ label: jn(l, e),
455
+ children: Z($, {
456
+ role: "button",
457
+ tabIndex: 0,
458
+ "aria-label": jn(l, e),
459
+ "aria-pressed": e === t,
460
+ onMouseDown: (e) => e.preventDefault(),
461
+ onMouseUp: () => {
462
+ i?.(), u(e);
463
+ },
464
+ onKeyDown: (t) => {
465
+ t.key !== "Enter" && t.key !== " " || (t.preventDefault(), i?.(), u(e));
466
+ },
467
+ sx: {
468
+ width: "34px",
469
+ height: "34px",
470
+ cursor: "pointer",
471
+ borderRadius: "2px",
472
+ outline: (n) => e === t ? `2px solid ${n.palette.primary.main}` : `1px solid ${n.palette.divider}`,
473
+ outlineOffset: "-1px",
474
+ "&:hover": { outline: (e) => `2px solid ${e.palette.primary.light}` }
475
+ },
476
+ children: Z(kn, {
477
+ patternType: e,
478
+ foreground: n,
479
+ background: r,
480
+ createCell: a,
481
+ darkMode: o
482
+ })
483
+ })
484
+ }, e))
485
+ });
486
+ }, [
487
+ t,
488
+ n,
489
+ r,
490
+ a,
491
+ o,
492
+ u,
493
+ l
494
+ ]);
495
+ return Z(rn, {
496
+ disabled: s,
497
+ tooltip: l("fill.patternTooltip", { pattern: jn(l, t) }),
498
+ renderPopupPanel: d,
499
+ icon: Z($, {
500
+ sx: {
501
+ width: "48px",
502
+ height: "20px",
503
+ borderRadius: "2px",
504
+ outline: (e) => `1px solid ${e.palette.divider}`,
505
+ outlineOffset: "-1px",
506
+ overflow: "hidden"
507
+ },
508
+ children: Z(kn, {
509
+ patternType: t,
510
+ foreground: n,
511
+ background: r,
512
+ createCell: a,
513
+ darkMode: o
514
+ })
515
+ }),
516
+ ...c
517
+ });
518
+ });
519
+ Mn.displayName = "PatternPopupButton";
520
+ var Nn = {
521
+ resizeOnOverflow: !1,
522
+ placement: "bottom",
523
+ offsets: [0, 2],
524
+ shift: { padding: 8 }
525
+ }, Pn = ((e) => {
526
+ let t = [], n = e.length;
527
+ for (let r = 0; r < n; r++) {
528
+ let [i, a] = e[(r + n - 1) % n], [o, s, c] = e[r], [l, u] = e[(r + 1) % n], d = (e, t) => {
529
+ let n = Math.hypot(e - o, t - s) || 1, r = Math.min(c, n / 2);
530
+ return [o + (e - o) / n * r, s + (t - s) / n * r];
531
+ }, [f, p] = d(i, a), [m, h] = d(l, u);
532
+ t.push(`${r === 0 ? "M" : "L"}${f.toFixed(2)} ${p.toFixed(2)} Q${o} ${s} ${m.toFixed(2)} ${h.toFixed(2)}`);
533
+ }
534
+ return t.join(" ") + " Z";
535
+ })([
536
+ [
537
+ 7,
538
+ .5,
539
+ 1
540
+ ],
541
+ [
542
+ 13.5,
543
+ 6,
544
+ 1.5
545
+ ],
546
+ [
547
+ 13.5,
548
+ 16.5,
549
+ 2
550
+ ],
551
+ [
552
+ .5,
553
+ 16.5,
554
+ 2
555
+ ],
556
+ [
557
+ .5,
558
+ 6,
559
+ 1.5
560
+ ]
561
+ ]), Fn = (e) => Math.max(0, Math.min(1, e)), In = (e, t, n) => {
562
+ try {
563
+ return (e instanceof xt ? e : new xt(e, t)).toCSS(n);
564
+ } catch {
565
+ return "transparent";
566
+ }
567
+ }, Ln = (e, t, n) => {
568
+ try {
569
+ let r = new xt(e, n).toRGBA(), i = new xt(t, n).toRGBA(), a = (e, t) => Math.round((e + t) / 2).toString(16).padStart(2, "0");
570
+ return `${a(r.red, i.red)}${a(r.green, i.green)}${a(r.blue, i.blue)}`;
571
+ } catch {
572
+ return e;
573
+ }
574
+ }, Rn = (e, t) => e.offset === t.offset && String(e.color) === String(t.color), zn = (e, t) => e.length === t.length && e.every((e, n) => Rn(e, t[n])), Bn = U((e) => {
575
+ let { percent: t, disabled: n, inputRef: r, onChange: i } = e, a = V(), [o, s] = J(String(t)), [c, l] = J(!1);
576
+ return G(() => {
577
+ c || s(String(t));
578
+ }, [t, c]), Z(vn, {
579
+ type: "number",
580
+ size: "small",
581
+ disabled: n,
582
+ inputRef: r,
583
+ label: a("fill.gradientPosition"),
584
+ value: o,
585
+ onFocus: () => l(!0),
586
+ onBlur: () => {
587
+ l(!1), s(String(t));
588
+ },
589
+ onChange: (e) => {
590
+ if (s(e.target.value), e.target.value === "") return;
591
+ let t = Math.max(0, Math.min(100, parseInt(e.target.value, 10) || 0));
592
+ i(t);
243
593
  },
244
- ...s,
245
- children: q(J, {
594
+ slotProps: {
595
+ htmlInput: {
596
+ min: 0,
597
+ max: 100,
598
+ step: 5,
599
+ style: { textAlign: "right" }
600
+ },
601
+ inputLabel: { shrink: !0 },
602
+ input: { endAdornment: Z(pn, {
603
+ position: "end",
604
+ disableTypography: !0,
605
+ children: "%"
606
+ }) }
607
+ },
608
+ sx: { width: 120 }
609
+ });
610
+ });
611
+ Bn.displayName = "StopPositionField";
612
+ var Vn = U((e) => {
613
+ let { index: t, stop: n, offset: r, schemeLookup: i, recentColors: a, darkMode: o, disabled: s, canRemove: c, rampRef: l, onDrag: u, onMove: d, onPreviewColor: f, onChangeColor: p, onRemove: m, onOpenChange: h } = e, g = V(), _ = xn(), v = K(() => new xt(n.color, i), [n.color, i]), [y, b] = J(void 0), [x, S] = J(null), [C, w] = J(!1), [T, E] = J(!1), [D, O] = J(!1), [k, A] = J(!1), j = q(null), M = q(!1), N = B((e) => {
614
+ b(e), f(t, e ?? null);
615
+ }, [t, f]), P = B((e) => {
616
+ d(t, e / 100);
617
+ }, [t, d]), ee = Math.round(100 * r), te = In(y ?? v, i, o), ne = W((e) => {
618
+ let { closeFloat: n } = e;
619
+ return Q($, {
620
+ className: "sxl-gradient-stop-popup",
246
621
  sx: {
247
622
  display: "flex",
248
- flexDirection: "column",
249
- gap: (e) => e.spacing(2),
250
- paddingTop: (e) => e.spacing(1)
623
+ flexDirection: "column"
251
624
  },
252
- children: [
253
- n ? K(Bn, {
254
- variant: "body2",
255
- sx: { color: "text.secondary" },
256
- children: n
257
- }) : null,
258
- r ? K(Y, {
259
- type: "password",
260
- size: "small",
261
- label: t("password.current"),
262
- value: c,
263
- onChange: (e) => l(e.target.value),
264
- slotProps: {
265
- inputLabel: { shrink: !0 },
266
- htmlInput: {
267
- className: "autoFocus",
268
- autoComplete: "current-password",
269
- spellCheck: !1
270
- }
271
- }
272
- }) : null,
273
- K(Y, {
274
- type: "password",
275
- size: "small",
276
- label: t(r ? "password.new" : "password.label"),
277
- value: u,
278
- error: m && g,
279
- helperText: m && g ? t("password.required") : " ",
280
- onChange: (e) => d(e.target.value),
281
- slotProps: {
282
- inputLabel: { shrink: !0 },
283
- htmlInput: {
284
- className: r ? void 0 : "autoFocus",
285
- autoComplete: "new-password",
286
- spellCheck: !1
287
- }
288
- }
289
- }),
290
- K(Y, {
291
- type: "password",
292
- size: "small",
293
- label: t("protection.passwordConfirm"),
294
- value: f,
295
- error: m && !g && _,
296
- helperText: m && !g && _ ? t("protection.passwordMismatch") : " ",
297
- onChange: (e) => p(e.target.value),
298
- slotProps: {
299
- inputLabel: { shrink: !0 },
300
- htmlInput: {
301
- autoComplete: "new-password",
302
- spellCheck: !1
303
- }
304
- }
625
+ children: [Z(He, {
626
+ selectedColor: v,
627
+ previewColor: y,
628
+ disableAlpha: !0,
629
+ schemeLookup: i,
630
+ recentColors: a,
631
+ darkMode: o,
632
+ onDone: n,
633
+ onPreviewColor: N,
634
+ onPreviewColorImmediate: N,
635
+ onSelectColor: (e) => {
636
+ N(void 0), e && p(t, e);
637
+ }
638
+ }), Z($, {
639
+ sx: {
640
+ display: "flex",
641
+ alignItems: "center",
642
+ gap: 1,
643
+ paddingX: 1,
644
+ paddingBottom: 1
645
+ },
646
+ children: Z(Bn, {
647
+ percent: ee,
648
+ disabled: s,
649
+ inputRef: j,
650
+ onChange: P
305
651
  })
306
- ]
652
+ })]
653
+ });
654
+ }, [
655
+ v,
656
+ y,
657
+ ee,
658
+ t,
659
+ i,
660
+ a,
661
+ o,
662
+ s,
663
+ N,
664
+ p,
665
+ P
666
+ ]), F = Wt({
667
+ anchor: x,
668
+ label: "gradient-stop",
669
+ renderPopupPanel: ne,
670
+ propsPopper: Nn,
671
+ onOpen: () => {
672
+ w(!0), h(t, !0), M.current && (M.current = !1, requestAnimationFrame(() => j.current?.focus()));
673
+ },
674
+ onClose: () => {
675
+ w(!1), h(t, !1), N(void 0);
676
+ }
677
+ }), re = B((e) => {
678
+ M.current = e, F.reference.open(0);
679
+ }, [F]), ie = B(() => {
680
+ C ? F.reference.close(0) : re(!1);
681
+ }, [
682
+ C,
683
+ F,
684
+ re
685
+ ]), I = q(null), ae = B((e) => {
686
+ s || e.button !== 0 || (e.currentTarget.setPointerCapture(e.pointerId), I.current = {
687
+ pointerId: e.pointerId,
688
+ startX: e.clientX,
689
+ startOffset: r,
690
+ moved: !1,
691
+ offset: r
692
+ });
693
+ }, [s, r]), oe = B((e) => {
694
+ let n = I.current;
695
+ if (!n || n.pointerId !== e.pointerId) return;
696
+ let r = e.clientX - n.startX;
697
+ if (!n.moved) {
698
+ if (Math.abs(r) < 3) return;
699
+ n.moved = !0, E(!0), A(!1), F.reference.close(0);
700
+ }
701
+ let i = l.current?.getBoundingClientRect().width ?? 0;
702
+ n.offset = i > 0 ? Fn(n.startOffset + r / i) : n.startOffset, u(t, n.offset, !1);
703
+ }, [
704
+ t,
705
+ l,
706
+ F,
707
+ u
708
+ ]), se = B((e) => {
709
+ let n = I.current;
710
+ if (n && n.pointerId === e.pointerId) {
711
+ if (I.current = null, n.moved) return E(!1), u(t, n.offset, !0), void d(t, n.offset);
712
+ ie();
713
+ }
714
+ }, [
715
+ t,
716
+ u,
717
+ d,
718
+ ie
719
+ ]), ce = B((e) => {
720
+ let n = I.current;
721
+ n && n.pointerId === e.pointerId && (I.current = null, n.moved && (E(!1), u(t, n.startOffset, !0)));
722
+ }, [t, u]), le = B((e) => {
723
+ if (s) return;
724
+ let n = e.shiftKey ? .1 : .01;
725
+ switch (e.key) {
726
+ case "ArrowLeft":
727
+ d(t, Fn(r - n));
728
+ break;
729
+ case "ArrowRight":
730
+ d(t, Fn(r + n));
731
+ break;
732
+ case "Home":
733
+ d(t, 0);
734
+ break;
735
+ case "End":
736
+ d(t, 1);
737
+ break;
738
+ case "Delete":
739
+ case "Backspace":
740
+ c && m(t);
741
+ break;
742
+ case "Enter":
743
+ case " ":
744
+ re(!0);
745
+ break;
746
+ case "Escape":
747
+ if (!C) return;
748
+ F.reference.close(0);
749
+ break;
750
+ default: return;
751
+ }
752
+ e.preventDefault();
753
+ }, [
754
+ s,
755
+ t,
756
+ r,
757
+ c,
758
+ C,
759
+ F,
760
+ re,
761
+ d,
762
+ m
763
+ ]), ue = C || T || D, de = !s && !T && !C && k, fe = Q($, {
764
+ className: "sxl-gradient-stop-toolbar",
765
+ onPointerDown: (e) => {
766
+ e.stopPropagation();
767
+ },
768
+ sx: {
769
+ display: "flex",
770
+ alignItems: "center",
771
+ gap: .25
772
+ },
773
+ children: [Z(nn, {
774
+ tabIndex: -1,
775
+ propsTooltip: {
776
+ label: g("fill.gradientStopColor"),
777
+ simple: !0
778
+ },
779
+ icon: Z($, {
780
+ className: "color-wrapper",
781
+ sx: {
782
+ lineHeight: 0,
783
+ "& .activeColor": { fill: te }
784
+ },
785
+ children: Z(z, { iconKey: "circle.colored" })
786
+ }),
787
+ onClick: () => {
788
+ A(!1), ie();
789
+ }
790
+ }), Z(nn, {
791
+ tabIndex: -1,
792
+ disabled: !c,
793
+ propsTooltip: {
794
+ label: g("fill.gradientRemoveStop"),
795
+ simple: !0
796
+ },
797
+ icon: Z(z, { iconKey: "Close" }),
798
+ onClick: () => m(t)
799
+ })]
800
+ });
801
+ return Q(dn, { children: [Z(cn, {
802
+ title: fe,
803
+ open: de,
804
+ onOpen: () => A(!0),
805
+ onClose: () => A(!1),
806
+ enterDelay: 250,
807
+ enterNextDelay: 250,
808
+ leaveDelay: 400,
809
+ placement: "bottom",
810
+ disableFocusListener: !0,
811
+ disableTouchListener: !0,
812
+ slotProps: { tooltip: { sx: {
813
+ backgroundColor: (e) => e.palette.background.paper,
814
+ color: (e) => e.palette.text.primary,
815
+ border: (e) => `1px solid ${e.palette.divider}`,
816
+ boxShadow: (e) => e.shadows[3],
817
+ padding: "2px",
818
+ marginTop: "4px !important"
819
+ } } },
820
+ children: Z($, {
821
+ ref: S,
822
+ role: "button",
823
+ tabIndex: s ? -1 : 0,
824
+ "aria-label": g("fill.gradientStop", { position: ee }),
825
+ "aria-disabled": s || void 0,
826
+ className: L("sxl-gradient-stop", {
827
+ "sxl-gradient-stop-open": C,
828
+ "sxl-gradient-stop-dragging": T
829
+ }),
830
+ onPointerDown: ae,
831
+ onPointerMove: oe,
832
+ onPointerUp: se,
833
+ onPointerCancel: ce,
834
+ onFocus: () => O(!0),
835
+ onBlur: () => O(!1),
836
+ onKeyDown: le,
837
+ sx: {
838
+ position: "absolute",
839
+ left: 100 * r + "%",
840
+ top: "calc(100% - 4px)",
841
+ width: 14,
842
+ height: 17,
843
+ transform: "translateX(-50%)",
844
+ transition: T ? "none" : "left 120ms ease-out",
845
+ lineHeight: 0,
846
+ cursor: s ? "default" : T ? "grabbing" : "grab",
847
+ touchAction: "none",
848
+ outline: "none",
849
+ zIndex: +!!T,
850
+ filter: ue ? `drop-shadow(0 1px 2px ${_.palette.action.active})` : void 0
851
+ },
852
+ children: Z("svg", {
853
+ width: 14,
854
+ height: 17,
855
+ viewBox: "0 0 14 17",
856
+ "aria-hidden": "true",
857
+ children: Z("path", {
858
+ d: Pn,
859
+ fill: te,
860
+ stroke: ue ? _.palette.primary.main : _.palette.text.secondary,
861
+ strokeWidth: ue ? 1.5 : 1,
862
+ strokeLinejoin: "round"
863
+ })
864
+ })
307
865
  })
866
+ }), F.component] });
867
+ });
868
+ Vn.displayName = "StopHandle";
869
+ var Hn = U((e) => {
870
+ let { stops: t, onChange: n, minStops: r = 2, maxStops: i = 8, schemeLookup: a, recentColors: o, darkMode: s = !1, disabled: c = !1, className: l, ...u } = e, d = V(), f = q(null), p = q({
871
+ known: [],
872
+ next: 1
873
+ }), m = K(() => {
874
+ let e = p.current, n = ((e, t, n) => {
875
+ for (let n of t) if (zn(e, n.stops)) return n.keys;
876
+ let r = /* @__PURE__ */ new Set();
877
+ return e.map((e) => {
878
+ for (let n of t) {
879
+ let t = n.stops.findIndex((t, i) => !r.has(n.keys[i]) && Rn(t, e));
880
+ if (t >= 0) return r.add(n.keys[t]), n.keys[t];
881
+ }
882
+ return -1;
883
+ }).map((e) => e >= 0 ? e : n());
884
+ })(t, e.known, () => e.next++);
885
+ return e.known[0]?.keys !== n && (e.known = [{
886
+ stops: t,
887
+ keys: n
888
+ }, ...e.known].slice(0, 3)), n;
889
+ }, [t]), [h, g] = J(null), [_, v] = J(null), [y, b] = J(null);
890
+ $t(() => {
891
+ g((e) => {
892
+ if (!e?.released) return e;
893
+ let n = m.indexOf(e.key);
894
+ return n >= 0 && t[n].offset === e.offset ? null : e;
895
+ });
896
+ }, [t, m]), $t(() => {
897
+ if (!h?.released) return;
898
+ let e = window.setTimeout(() => g((e) => e?.released ? null : e), 1e3);
899
+ return () => window.clearTimeout(e);
900
+ }, [h]);
901
+ let x = !c && t.length < i, S = !c && t.length > r, C = B((e) => {
902
+ let t = [...e].sort((e, t) => e.stop.offset - t.stop.offset), r = {
903
+ stops: t.map((e) => e.stop),
904
+ keys: t.map((e) => e.key)
905
+ }, i = p.current;
906
+ i.known = [r, ...i.known].slice(0, 3), n(r.stops.slice());
907
+ }, [n]), w = B(() => t.map((e, t) => ({
908
+ stop: e,
909
+ key: m[t]
910
+ })), [t, m]), T = B((e, t, n) => {
911
+ g({
912
+ key: m[e],
913
+ offset: t,
914
+ released: n
915
+ });
916
+ }, [m]), E = B((e, t) => {
917
+ C(w().map((n, r) => r === e ? {
918
+ ...n,
919
+ stop: {
920
+ ...n.stop,
921
+ offset: t
922
+ }
923
+ } : n));
924
+ }, [w, C]), D = B((e, t) => {
925
+ v(t ? {
926
+ key: m[e],
927
+ color: t
928
+ } : null);
929
+ }, [m]), O = B((e, t) => {
930
+ let n = m[e];
931
+ b((e) => t ? n : e === n ? null : e);
932
+ }, [m]), k = B((e, t) => {
933
+ C(w().map((n, r) => r === e ? {
934
+ ...n,
935
+ stop: {
936
+ ...n.stop,
937
+ color: t.toString()
938
+ }
939
+ } : n));
940
+ }, [w, C]), A = B((e) => {
941
+ t.length <= r || C(w().filter((t, n) => n !== e));
942
+ }, [
943
+ t,
944
+ r,
945
+ w,
946
+ C
947
+ ]), j = B((e) => {
948
+ if (t.length >= i) return;
949
+ let n = [...t].sort((e, t) => e.offset - t.offset), r = e;
950
+ if (r === void 0) {
951
+ let e = -1;
952
+ for (let t = 0; t + 1 < n.length; t++) {
953
+ let i = n[t + 1].offset - n[t].offset;
954
+ i > e && (e = i, r = (n[t].offset + n[t + 1].offset) / 2);
955
+ }
956
+ r === void 0 && (r = 1);
957
+ }
958
+ let o = [...n].reverse().find((e) => e.offset <= r) ?? n[0], s = n.find((e) => e.offset >= r) ?? n[n.length - 1];
959
+ C([...w(), {
960
+ stop: {
961
+ offset: r,
962
+ color: Ln(o.color, s.color, a)
963
+ },
964
+ key: p.current.next++
965
+ }]);
966
+ }, [
967
+ t,
968
+ i,
969
+ a,
970
+ w,
971
+ C
972
+ ]), M = B((e) => {
973
+ if (!x || e.button !== 0 || y !== null || e.target.closest(".sxl-gradient-stop")) return;
974
+ let t = e.currentTarget.getBoundingClientRect();
975
+ t.width <= 0 || j(Fn((e.clientX - t.left) / t.width));
976
+ }, [
977
+ x,
978
+ y,
979
+ j
980
+ ]), N = K(() => {
981
+ let e = t.map((e, t) => ({
982
+ offset: h?.key === m[t] ? h.offset : e.offset,
983
+ css: In(_?.key === m[t] ? _.color : e.color, a, s)
984
+ }));
985
+ return e.sort((e, t) => e.offset - t.offset), `linear-gradient(90deg, ${e.map((e) => `${e.css} ${(100 * e.offset).toFixed(2)}%`).join(", ")})`;
986
+ }, [
987
+ t,
988
+ m,
989
+ h,
990
+ _,
991
+ a,
992
+ s
993
+ ]);
994
+ return Q($, {
995
+ className: L("sxl-gradient-stops", l),
996
+ sx: {
997
+ display: "flex",
998
+ alignItems: "flex-start",
999
+ gap: .5,
1000
+ minWidth: 0
1001
+ },
1002
+ ...u,
1003
+ children: [Z($, {
1004
+ sx: {
1005
+ flex: 1,
1006
+ minWidth: 0,
1007
+ paddingX: "7px",
1008
+ paddingBottom: "15px"
1009
+ },
1010
+ children: Z($, {
1011
+ ref: f,
1012
+ className: "sxl-gradient-stops-ramp",
1013
+ onPointerDown: M,
1014
+ sx: {
1015
+ position: "relative",
1016
+ height: 18,
1017
+ borderRadius: 1,
1018
+ border: (e) => `1px solid ${e.palette.divider}`,
1019
+ backgroundImage: N,
1020
+ backgroundRepeat: "no-repeat",
1021
+ cursor: x ? "copy" : "default",
1022
+ opacity: c ? .5 : 1
1023
+ },
1024
+ children: t.map((e, t) => Z(Vn, {
1025
+ index: t,
1026
+ stop: e,
1027
+ offset: h?.key === m[t] ? h.offset : e.offset,
1028
+ schemeLookup: a,
1029
+ recentColors: o,
1030
+ darkMode: s,
1031
+ disabled: c,
1032
+ canRemove: S,
1033
+ rampRef: f,
1034
+ onDrag: T,
1035
+ onMove: E,
1036
+ onPreviewColor: D,
1037
+ onChangeColor: k,
1038
+ onRemove: A,
1039
+ onOpenChange: O
1040
+ }, m[t]))
1041
+ })
1042
+ }), Z(nn, {
1043
+ disabled: !x,
1044
+ propsTooltip: {
1045
+ label: d("fill.gradientAddStop"),
1046
+ simple: !0
1047
+ },
1048
+ icon: Z(z, { iconKey: "Add" }),
1049
+ onClick: () => j(),
1050
+ sx: { marginTop: "-3px" }
1051
+ })]
308
1052
  });
309
- }, qn = /* @__PURE__ */ new Set(/* @__PURE__ */ "square.elevation.variant.title.onKeyDown.workbook.onWorkbookChange.onDocumentError.propsDocumentError.renderDocumentError.propsDocumentLoading.renderDocumentLoading.propsWorkbook.onWorkbookLoad.propsTaskPaneArea.renderTaskPaneArea.taskPaneSide.logo.onDirtyChange.propsDocumentTitle.showFormulaBar.propsFormulaBar.renderFormulaBar.formulaBarPlacement.manageVisualViewport.editable.showStatusBar.propsStatusBar.renderStatusBar.propsToolbar.renderToolbar.topLeft.topRight.muiTheme.tokens.cssBaseline.autoFocus.licenseKey.prefetch".split(".")), Jn = () => K(G, {}), Yn = Hn("studio:eagerStudio", () => import("./Die9NXVFveHvcCT-.mjs")), Xn = ({ error: e, onShown: t }) => (L(() => {
1053
+ });
1054
+ Hn.displayName = "GradientStopsBar";
1055
+ var Un = U((e) => {
1056
+ let { value: t, onChange: n, minStops: r, maxStops: i, schemeLookup: a, recentColors: o, darkMode: s = !1, disabled: c = !1, className: l, ...u } = e, d = V(), f = B((e) => {
1057
+ n({
1058
+ ...t,
1059
+ ...e
1060
+ });
1061
+ }, [t, n]), p = t.gradientType === R.GradientType.Linear;
1062
+ return Q($, {
1063
+ className: L("sxl-gradient-editor", l),
1064
+ sx: {
1065
+ display: "flex",
1066
+ flexDirection: "column",
1067
+ gap: 1.25,
1068
+ minWidth: 0
1069
+ },
1070
+ ...u,
1071
+ children: [Q($, {
1072
+ sx: {
1073
+ display: "flex",
1074
+ flexWrap: "wrap",
1075
+ gap: 1,
1076
+ alignItems: "center"
1077
+ },
1078
+ children: [Q(fn, {
1079
+ size: "small",
1080
+ sx: {
1081
+ minWidth: 132,
1082
+ flex: "1 1 132px"
1083
+ },
1084
+ children: [Z(mn, {
1085
+ shrink: !0,
1086
+ children: d("fill.gradientStyle")
1087
+ }), Q(_n, {
1088
+ label: d("fill.gradientStyle"),
1089
+ notched: !0,
1090
+ disabled: c,
1091
+ value: t.gradientType,
1092
+ onChange: (e) => f({ gradientType: e.target.value }),
1093
+ children: [Z(hn, {
1094
+ value: R.GradientType.Linear,
1095
+ children: d("fill.gradientLinear")
1096
+ }), Z(hn, {
1097
+ value: R.GradientType.Path,
1098
+ children: d("fill.gradientRadial")
1099
+ })]
1100
+ })]
1101
+ }), Z(vn, {
1102
+ label: d("fill.gradientAngle"),
1103
+ type: "number",
1104
+ size: "small",
1105
+ disabled: c || !p,
1106
+ value: t.angle,
1107
+ onChange: (e) => {
1108
+ let t = parseInt(e.target.value, 10) || 0;
1109
+ f({ angle: (t % 360 + 360) % 360 });
1110
+ },
1111
+ slotProps: {
1112
+ htmlInput: {
1113
+ min: 0,
1114
+ max: 359,
1115
+ step: 15
1116
+ },
1117
+ inputLabel: { shrink: !0 }
1118
+ },
1119
+ sx: { width: 104 }
1120
+ })]
1121
+ }), Q($, {
1122
+ sx: {
1123
+ display: "flex",
1124
+ flexDirection: "column",
1125
+ gap: .5,
1126
+ minWidth: 0
1127
+ },
1128
+ children: [Z(yn, {
1129
+ variant: "caption",
1130
+ component: "div",
1131
+ sx: { color: "text.secondary" },
1132
+ children: d("fill.gradientStops")
1133
+ }), Z(Hn, {
1134
+ stops: t.stops,
1135
+ onChange: (e) => f({ stops: e }),
1136
+ minStops: r,
1137
+ maxStops: i,
1138
+ schemeLookup: a,
1139
+ recentColors: o,
1140
+ darkMode: s,
1141
+ disabled: c
1142
+ })]
1143
+ })]
1144
+ });
1145
+ });
1146
+ Un.displayName = "GradientEditor";
1147
+ var Wn = (e) => {
1148
+ let t = e.getStops();
1149
+ return {
1150
+ gradientType: e.getGradientType(),
1151
+ angle: e.getAngle() ?? 0,
1152
+ stops: t.length >= 2 ? t.map((e) => ({
1153
+ offset: e.getOffset(),
1154
+ color: e.getColor().toString()
1155
+ })) : [...Gn.stops]
1156
+ };
1157
+ }, Gn = Object.freeze({
1158
+ gradientType: R.GradientType.Linear,
1159
+ angle: 90,
1160
+ stops: [{
1161
+ offset: 0,
1162
+ color: "ffffff"
1163
+ }, {
1164
+ offset: 1,
1165
+ color: "4472c4"
1166
+ }]
1167
+ }), Kn = /* @__PURE__ */ new Set(/* @__PURE__ */ "square.elevation.variant.title.onKeyDown.workbook.onWorkbookChange.onDocumentError.propsDocumentError.renderDocumentError.propsDocumentLoading.renderDocumentLoading.propsWorkbook.onWorkbookLoad.propsTaskPaneArea.renderTaskPaneArea.taskPaneSide.logo.onDirtyChange.propsDocumentTitle.showFormulaBar.propsFormulaBar.renderFormulaBar.formulaBarPlacement.manageVisualViewport.editable.showStatusBar.propsStatusBar.renderStatusBar.propsToolbar.renderToolbar.topLeft.topRight.muiTheme.tokens.cssBaseline.autoFocus.licenseKey.prefetch".split(".")), qn = Sn("studio:eagerStudio", () => import("./WIhvQtBkGiw-oFUs.mjs")), Jn = ({ error: e, onShown: t }) => (G(() => {
310
1168
  t();
311
- }, []), K(In, { error: e })), $ = F(P((e, t) => {
312
- let { sx: n, style: r, className: i, licenseKey: a, renderDocumentLoading: o = lt, propsDocumentLoading: s, onWorkbookLoad: c, onDocumentError: l, ...u } = e, [d, f] = ((e) => {
1169
+ }, []), Z(sn, { error: e })), Yn = U(H((e, t) => {
1170
+ let { sx: n, style: i, className: a, licenseKey: o, renderDocumentLoading: s = r, propsDocumentLoading: c, onWorkbookLoad: l, onDocumentError: u, ...d } = e, [f, p] = ((e) => {
313
1171
  let t = {}, n = {};
314
- for (let r in e) (qn.has(r) ? t : n)[r] = e[r];
1172
+ for (let r in e) (Kn.has(r) ? t : n)[r] = e[r];
315
1173
  return [t, n];
316
- })(u);
317
- a && mn.setLicenseKey(a);
318
- let [p] = kn(D.Mode, gn[D.Mode]), { themeMode: m } = An({ mode: p ?? void 0 }), h = m === "dark", [g, _] = B(null), v = Tn("studio", Nn()), [y, b] = B(!1), x = R(() => !o || y ? null : K(zn, {
1174
+ })(d);
1175
+ o && Ct.setLicenseKey(o);
1176
+ let [m] = Kt(Et.Mode, Tt[Et.Mode]), { themeMode: h } = qt({ mode: m ?? void 0 }), g = h === "dark", [_, v] = J(null), y = zt("studio", Zt()), [b, x] = J(!1), S = K(() => !s || b ? null : Z(gn, {
319
1177
  style: {
320
- backgroundColor: `var(--sxl-color-base-100, ${h ? "#121212" : "#fff"})`,
1178
+ backgroundColor: `var(--sxl-color-base-100, ${g ? "#121212" : "#fff"})`,
321
1179
  inset: 0,
322
1180
  width: "100%",
323
1181
  height: "100%",
@@ -327,20 +1185,23 @@ var Kn = Un({
327
1185
  justifyContent: "center",
328
1186
  zIndex: 9900
329
1187
  },
330
- children: o(s ?? {})
1188
+ children: Z(Rt, {
1189
+ render: s,
1190
+ props: c ?? {}
1191
+ })
331
1192
  }), [
332
- o,
333
1193
  s,
334
- h,
335
- y
336
- ]), S = R(() => En(Yn.load, { renderError: (e) => K(Xn, {
1194
+ c,
1195
+ g,
1196
+ b
1197
+ ]), C = K(() => Bt(qn.load, { renderError: ({ error: e }) => Z(Jn, {
337
1198
  error: e,
338
- onShown: () => b(!0)
1199
+ onShown: () => x(!0)
339
1200
  }) }), []);
340
- return q(J, {
341
- ref: _,
342
- className: tn("sheetxl-studio", v, i),
343
- "data-sxl-theme-mode": m,
1201
+ return Q($, {
1202
+ ref: v,
1203
+ className: L("sheetxl-studio", y, a),
1204
+ "data-sxl-theme-mode": h,
344
1205
  sx: n,
345
1206
  style: {
346
1207
  display: "flex",
@@ -352,32 +1213,32 @@ var Kn = Un({
352
1213
  minHeight: 0,
353
1214
  position: "relative",
354
1215
  overflow: "hidden",
355
- ...r
1216
+ ...i
356
1217
  },
357
- ...f,
358
- children: [K(Mn, {
1218
+ ...p,
1219
+ children: [Z(Yt, {
359
1220
  fallback: null,
360
- children: K(S, {
361
- ...d,
362
- host: g,
363
- scopeClass: v,
364
- onWorkbookLoad: (e) => (requestAnimationFrame(() => requestAnimationFrame(() => b(!0))), c?.(e)),
365
- onDocumentError: (e) => (b(!0), l?.(e)),
366
- renderDocumentLoading: Jn,
1221
+ children: Z(C, {
1222
+ ...f,
1223
+ host: _,
1224
+ scopeClass: y,
1225
+ onWorkbookLoad: (e) => (requestAnimationFrame(() => requestAnimationFrame(() => x(!0))), l?.(e)),
1226
+ onDocumentError: (e) => (x(!0), u?.(e)),
1227
+ renderDocumentLoading: null,
367
1228
  ref: t
368
1229
  })
369
- }), x]
1230
+ }), S]
370
1231
  });
371
1232
  }));
372
- $.displayName = "Studio";
373
- var Zn = (e = {}) => {
374
- let { source: t, startWith: n, templatePath: r, onWorkbookLoad: i, onWorkbookChange: a, onDirtyChange: o, documentTitle: s, confirmOnClose: c, keyboardGuard: l, ...u } = e, d = On(), [f, p] = B(null), [m, h] = B(!1), g = wn(f);
375
- xn(g, m, {
1233
+ Yn.displayName = "Studio";
1234
+ var Xn = (e = {}) => {
1235
+ let { source: t, startWith: n, templatePath: r, onWorkbookLoad: i, onWorkbookChange: a, onDirtyChange: o, documentTitle: s, confirmOnClose: c, keyboardGuard: l, ...u } = e, d = Gt(), [f, p] = J(null), [m, h] = J(!1), g = It(f);
1236
+ Nt(g, m, {
376
1237
  documentTitle: s,
377
1238
  confirmOnClose: c,
378
1239
  keyboardGuard: l
379
1240
  });
380
- let { workbook: _, urlTitle: v } = R(() => {
1241
+ let { workbook: _, urlTitle: v } = K(() => {
381
1242
  if (t != null) return {
382
1243
  workbook: typeof t == "string" ? { source: t } : t,
383
1244
  urlTitle: null
@@ -393,29 +1254,29 @@ var Zn = (e = {}) => {
393
1254
  workbook: void 0,
394
1255
  urlTitle: null
395
1256
  };
396
- }, [t, d]), y = z(null);
397
- R(() => {
1257
+ }, [t, d]), y = q(null);
1258
+ K(() => {
398
1259
  y.current = v;
399
1260
  }, [v]);
400
- let b = z(a);
1261
+ let b = q(a);
401
1262
  b.current = a;
402
- let x = I((e) => {
1263
+ let x = W((e) => {
403
1264
  e && y.current && (e.getOrigin().setName(y.current), y.current = null), p(e), b.current?.(e);
404
- }, []), S = z(o);
1265
+ }, []), S = q(o);
405
1266
  S.current = o;
406
- let C = I((e) => {
1267
+ let C = W((e) => {
407
1268
  h(e), S.current?.(e);
408
1269
  }, []);
409
- L(() => {
410
- n === "welcome" && _ === void 0 && Xe(r);
1270
+ G(() => {
1271
+ n === "welcome" && _ === void 0 && ye(r);
411
1272
  }, [
412
1273
  n,
413
1274
  _,
414
1275
  r
415
1276
  ]);
416
- let w = z(!1), T = z(i);
1277
+ let w = q(!1), T = q(i);
417
1278
  T.current = i;
418
- let E = I((e) => (w.current || (w.current = !0, n === "welcome" && _ === void 0 && requestAnimationFrame(() => requestAnimationFrame(() => {
1279
+ let E = W((e) => (w.current || (w.current = !0, n === "welcome" && _ === void 0 && requestAnimationFrame(() => requestAnimationFrame(() => {
419
1280
  e.source?.getCommandScope?.()?.resolve("showWelcome")?.execute({
420
1281
  templatePath: r,
421
1282
  atStartup: !0
@@ -433,4 +1294,4 @@ var Zn = (e = {}) => {
433
1294
  onWorkbookLoad: E
434
1295
  };
435
1296
  };
436
- export { C as AlignmentPanel, Wn as AppearanceCommandButton, Mt as AutoColorPosition, xt as BorderCommandButton, x as BorderPanel, ie as BorderPopupButton, Ue as BorderPreview, Zt as BorderStylePopupButton, l as BorderTemplateIcon, p as COMMENTS_FILTER_KEY, ue as CalculationOptionsCommandButton, Ye as CalculationRequiredStatus, Re as CircularReferenceStatus, Qt as ColorButton, At as ColorButtonList, ge as ColorCommandButton, $t as ColorPanel, jt as ColorPanelType, Ft as ColorPopupButton, r as ColumnMenu, ce as CommentCard, se as CommentsPlugin, oe as CommentsTaskPane, Ht as DEFAULT_GRADIENT, hn as DefaultTaskPaneRegistry, yt as DefaultWorkbookToolbars, me as DocThemeCommandButton, ot as DocumentTitle, pe as ExternalLinkCardBody, le as ExternalLinkChip, de as ExternalLinkLocation, h as ExternalLinkSettingsTab, it as ExternalLinksPanel, d as ExternalLinksPlugin, g as ExternalLinksTaskPane, re as FORMAT_TAB_KEY, i as FORMAT_TASK_PANE_KEY, pt as FORMULA_BAR_EDITOR_ID, an as FORMULA_FIELD_ABOVE_LABEL_HEIGHT, Z as FileCommandButton, mt as FillMenu, Yt as FillPanel, Pe as FontFamilyCommandButton, b as FontPanel, a as FontSizeCommandButton, qt as FormatButtonGroup, m as FormatCellPreview, Vt as FormatNumberField, bt as FormatPlugin, Pt as FormatRow, Gt as FormatSection, c as FormatTab, o as FormatTaskPane, ke as FormulaBar, rn as FormulaField, on as FunctionArgumentsPanel, ln as FunctionSearchPanel, Xt as GradientEditor, Rt as GradientStopsBar, dn as INSERT_FUNCTION_PAGE_CLASS, nn as InputField, St as InsertFunctionCommandPopupButton, cn as InsertFunctionOption, Gn as InsertFunctionSumCommandPopupButton, un as InsertFunctionWizard, _ as ItemCard, at as ItemCardAction, f as ItemsSearchField, pn as LicenseManager, fn as LinePanel, Ne as ManageProtectionTaskPane, w as MobileFormulaBar, e as MobileInputToolbar, dt as NAMED_TYPE_FORMULA, Me as NamedCollectionEditor, ye as NamedDetailsPanel, Ve as NamedDetailsTaskPane, et as NamedEditorPanel, ct as NamedPlugin, Dt as NumberFormatCommandButton, xe as NumberFormatOption, u as NumberFormatPanel, Fe as NumberStats, Bt as PATTERN_GALLERY, n as PREVIEW_EDGES, Q as PasswordDialog, ee as PasswordField, Je as PasteCommandButton, Kt as PatternPopupButton, zt as PatternSwatch, nt as PresetCellStylesCommandButton, Ge as PresetChip, kt as PresetSlicerStylesCommandButton, Be as PresetTableStylesCommandButton, Et as ProtectedCellsPanel, he as ProtectedRangeDetailsTaskPane, Ie as ProtectionPlugin, be as SheetProtectionPanel, qe as SheetTabMenu, s as SheetZoomCommandButton, _e as SheetZoomScale, tt as SheetsAllMenu, E as SlicerPlugin, rt as StatusBar, $ as Studio, en as StyledStrokeIcon, ut as TableDetailsPanel, $e as TableDetailsTaskPane, ve as TablePlugin, Ee as TableStyleCanvasPreview, ht as TableStyleOptionsPanel, je as TableStylePreview, Le as TextEffectsCommandButton, S as TextRotateGroupButton, st as ThemeSelectButton, Ze as ThemeSelectPanel, ft as ThemeSelectPopupButton, vt as UndoRedoCommandButton, fe as WalkingCopyCommandButton, Te as WorkbookContextMenu, ze as WorkbookElement, _n as WorkbookIO, Ct as WorkbookProtectionPanel, _t as WorkbookProtectionTab, Ae as WorkbookStrip, Ot as WorkbookToolbars, we as createNamedDraft, T as createStudioThemeCSS, t as createThemeFromMUITheme, He as edgeLabel, y as edgesAt, Ke as expressionOf, Wt as fillSelectionOf, gt as isEditableNamed, wt as numberFormatCategoryLabel, te as numberFormatTypeLabel, Jt as onReselect, sn as optionsForPage, It as panelSx, Ut as patternLabel, ae as registerSheetCommandGroups, We as registerStudioCommandCatalogs, Tt as registerStudioCommandGroups, ne as registerWorkbookCommandGroups, Ce as renderWorkbookSheetTab, Se as renderWorkbookToolbars, De as saveNamedDraft, vn as setPrintExamplesOnLoad, Kn as t, Lt as toGradientValue, Nt as toPatternSlots, Oe as tokensToMuiOptions, v as useFormatSelection, Qe as useFormulaBarSession, yn as useModelListener, bn as useRangeListener, Zn as useStudioApp };
1297
+ export { d as AnomaliesPlugin, En as AppearanceCommandButton, Ve as AutoColorPosition, i as BorderCommandButton, Xe as BorderPopupButton, Je as BorderStylePopupButton, Ye as BorderTemplateIcon, ge as CalculationOptionsCommandButton, f as CalculationRequiredStatus, k as CircularReferenceStatus, qe as ColorButton, Ge as ColorButtonList, $e as ColorCommandButton, He as ColorPanel, Ue as ColorPanelType, Ke as ColorPopupButton, c as ColumnMenu, yt as CommentCard, m as CommentsPlugin, Gn as DEFAULT_GRADIENT, wt as DefaultTaskPaneRegistry, y as DefaultWorkbookToolbars, je as DocThemeCommandButton, Ee as DocumentTitle, b as ExternalLinksPlugin, pe as FORMAT_TASK_PANE_KEY, u as FORMULA_BAR_EDITOR_ID, ct as FORMULA_FIELD_ABOVE_LABEL_HEIGHT, Tn as FileCommandButton, C as FillMenu, nt as FontFamilyCommandButton, Qe as FontSizeCommandButton, h as FormatPlugin, E as FormulaBar, st as FormulaField, pt as FunctionArgumentsPanel, gt as FunctionSearchPanel, Un as GradientEditor, Hn as GradientStopsBar, fe as INSERT_CELL_CONTROL_OPTIONS_KEY, vt as INSERT_FUNCTION_PAGE_CLASS, wn as InputField, P as InsertCellControlCommandButton, Se as InsertFunctionCommandPopupButton, ht as InsertFunctionOption, Dn as InsertFunctionSumCommandPopupButton, _t as InsertFunctionWizard, ut as ItemCard, dt as ItemCardAction, ft as ItemsSearchField, St as LicenseManager, Be as MobileFormulaBar, n as MobileInputToolbar, l as NamedCollectionEditor, D as NamedPlugin, S as NumberFormatCommandButton, Ze as NumberFormatOption, O as NumberStats, An as PATTERN_GALLERY, bt as PasswordField, ze as PasteCommandButton, Mn as PatternPopupButton, kn as PatternSwatch, Te as PendingStatus, Ne as PresetCellStylesCommandButton, lt as PresetChip, v as PresetSlicerStylesCommandButton, at as PresetTableStylesCommandButton, t as ProtectionPlugin, me as SheetTabMenu, Fe as SheetZoomCommandButton, A as SheetZoomScale, _ as SheetsAllMenu, g as SlicerPlugin, p as StatusBar, Yn as Studio, We as StyledStrokeIcon, M as TablePlugin, rt as TableStyleCanvasPreview, it as TableStylePreview, N as TableToolbar, te as TextEffectsCommandButton, w as TextRotateGroupButton, ce as ThemeSelectButton, ue as ThemeSelectPanel, ve as ThemeSelectPopupButton, Le as UndoRedoCommandButton, F as WalkingCopyCommandButton, o as WorkbookContextMenu, de as WorkbookElement, Dt as WorkbookIO, a as WorkbookStrip, e as WorkbookToolbars, ie as createStudioThemeCSS, oe as createThemeFromMUITheme, xe as defaultRenderColumnMenu, De as defaultRenderCommentCard, ne as defaultRenderContextMenu, he as defaultRenderFillMenu, Ae as defaultRenderFormulaBar, re as defaultRenderHyperlinkCard, ae as defaultRenderMovableMenu, Ce as defaultRenderOutlineButton, _e as defaultRenderOutlineLevelButton, le as defaultRenderSheetTab, se as defaultRenderSheetTabMenu, j as defaultRenderSheetsAll, Me as defaultRenderStatusBar, Re as defaultRenderTableToolbar, ee as defaultRenderTabs, I as defaultRenderToolbar, Ie as defaultRenderTooltip, x as defaultRenderWorkbookError, r as defaultRenderWorkbookLoading, Pe as defaultRenderWorksheet, et as numberFormatCategoryLabel, tt as numberFormatTypeLabel, mt as optionsForPage, jn as patternLabel, Oe as registerSheetCommandGroups, s as registerStudioCommandCatalogs, ke as registerStudioCommandGroups, be as registerWorkbookCommandGroups, kt as setPrintExamplesOnLoad, Wn as toGradientValue, On as toPatternSlots, we as tokensToMuiOptions, T as useFormulaBarSession, jt as useModelListener, Mt as useRangeListener, Xn as useStudioApp };