@sheetxl/studio-mui 0.8.0-beta.9 → 1.0.2
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/LICENSE.md +17 -7
- package/browser/esm/{DT71hr6qq9QMKf7Q.mjs → -xbfcBB_r6yovwt0.mjs} +2 -2
- package/browser/esm/0Ui7wtwIglVNcnjK.mjs +975 -0
- package/browser/esm/0pDgMMkwtzP7yApV.mjs +294 -0
- package/browser/esm/3F82kokAv56WeIOp.mjs +94 -0
- package/browser/esm/B7rXnRqYPMeFo7lF.mjs +415 -0
- package/browser/esm/BDXrBgqLv2G_aBxW.mjs +8 -0
- package/browser/esm/{a5G-3nVFn86pvt8H.mjs → BEvHafOOTIvsHfzb.mjs} +82 -94
- package/browser/esm/{BscaD3SzYM6ysjgy.mjs → BF7tsgFfA5kiGqvA.mjs} +5 -5
- package/browser/esm/BGxILWytBh1gGIqX.mjs +1281 -0
- package/browser/esm/BMtcK4QQebSd-gg_.mjs +14 -0
- package/browser/esm/{DpdMtsE7oOAIJqFo.mjs → BN-SV9n15bsIT7UF.mjs} +14 -13
- package/browser/esm/BPw9ZOfyIYNPmxbo.mjs +252 -0
- package/browser/esm/Be-rw5ILGyBK1k5g.mjs +633 -0
- package/browser/esm/Bezw0tyQZcU_2PRi.mjs +242 -0
- package/browser/esm/BjHVW5_EgY2JEOYR.mjs +106 -0
- package/browser/esm/BsQHoNsrcsZZeolo.mjs +103 -0
- package/browser/esm/BtbpQMP61r1e5s6G.mjs +516 -0
- package/browser/esm/BvCt1gSMp3TNaras.mjs +424 -0
- package/browser/esm/By-REgl0FtVnNxzf.mjs +831 -0
- package/browser/esm/{DiKCs9R7e4MgyayQ.mjs → BzPrRiCDzZQnKqH4.mjs} +4 -4
- package/browser/esm/C2NKkLNVwF6qUNv1.mjs +94 -0
- package/browser/esm/C5Y1q7udZf2PwslP.mjs +973 -0
- package/browser/esm/CEbCLniKqzKNP6MP.mjs +392 -0
- package/browser/esm/CFz8KVBAQoF-AJHf.mjs +414 -0
- package/browser/esm/CKVZ-Qa6AcojcV6x.mjs +119 -0
- package/browser/esm/CPawgAiTfoCklxuh.mjs +267 -0
- package/browser/esm/CQyLZmquw7Cn-0Yv.mjs +14 -0
- package/browser/esm/{ipftNUxAU0HR-0YP.mjs → CS7kr0WaYPFpIH95.mjs} +3 -3
- package/browser/esm/CT8hUU9KN4TmEBld.mjs +8547 -0
- package/browser/esm/CX2LPfZw79Z0uRhG.mjs +386 -0
- package/browser/esm/CXViQNtqX1jITZyu.mjs +197 -0
- package/browser/esm/CbNQrqPTogPk-TRE.mjs +1550 -0
- package/browser/esm/{BdkeyaHAtiNa6jqW.mjs → CdeLvf6DfzWVbVw5.mjs} +33 -31
- package/browser/esm/{CawSvjLj4-2Qqyef.mjs → ChytgpwnPlu_VG4E.mjs} +2 -2
- package/browser/esm/CmAMY8rXqmvbCx1E.mjs +360 -0
- package/browser/esm/{BNYKPFICOYt2VRsP.mjs → CukQww6Fo8MyF56L.mjs} +2 -2
- package/browser/esm/Cupln-3vYNmxrrM2.mjs +13 -0
- package/browser/esm/Cy6Q7KGXWYIosYTX.mjs +31 -0
- package/browser/esm/{ffz9LGAgGiWQQav9.mjs → D4IXtjIE97zSR0kY.mjs} +156 -109
- package/browser/esm/D5IXaQlvCuPu8zeG.mjs +72 -0
- package/browser/esm/{CHLqCxo3afOV1Otw.mjs → D6Rur-jnQXX3jzQH.mjs} +4 -4
- package/browser/esm/D8sXey2okO2icU8d.mjs +2692 -0
- package/browser/esm/DE7H4jbuXYB08_dQ.mjs +225 -0
- package/browser/esm/DaISN0TvyxafPIve.mjs +490 -0
- package/browser/esm/{80XYmJwiiFLBmpH2.mjs → DpwtflGvQFbBSLdo.mjs} +47 -48
- package/browser/esm/DrdNTvMdXdsemC4B.mjs +225 -0
- package/browser/esm/DsxPHa5JNx8ovALW.mjs +442 -0
- package/browser/esm/DvJk84TQ-8JsgXcp.mjs +235 -0
- package/browser/esm/Dw9nScfNdZ0Cjwne.mjs +87 -0
- package/browser/esm/{BXQPMQyxdiYwawjE.mjs → PvQUVsO3tH532wV8.mjs} +20 -18
- package/browser/esm/RrujsbEgx2HUeD4s.mjs +161 -0
- package/browser/esm/S2tFDJI2wIBAgQaA.mjs +335 -0
- package/browser/esm/{Cykd-NaZAtHJlQmQ.mjs → STe4CGP-g8tCf7c5.mjs} +2 -2
- package/browser/esm/SgyjQbszb0ptsRk8.mjs +517 -0
- package/browser/esm/d1P5kwJg3I0rdzn5.mjs +318 -0
- package/browser/esm/hfHpykzxUMe5LvVF.mjs +141 -0
- package/browser/esm/{BIZX_0jxF9Fmaxuy.mjs → hjbPNszp95-0VCIw.mjs} +8 -6
- package/browser/esm/index.mjs +1910 -289
- package/browser/esm/sxqx9rjKZcYNC4Hx.mjs +77 -0
- package/browser/esm/{C--IZ8To0PhVLhoX.mjs → voMEQNZgdyO6soYo.mjs} +4 -4
- package/licenses/dependencies.txt +106 -359
- package/node/esm/{C5g2gBoUk3-cn94h.mjs → 1PN4BMQucW63NWcA.mjs} +2 -2
- package/node/esm/{BHuZQ-LJ2GgDLYSz.mjs → 4FcYpbmSwjqrMhol.mjs} +190 -141
- package/node/esm/{9k03YHFiw-wlUS8d.mjs → 6e2HZudCTjTzf6ih.mjs} +2 -2
- package/node/esm/{D4KDk-w7Khu7LrSi.mjs → B1MFTyLMh_SZnQbk.mjs} +70 -71
- package/node/esm/B2WLecbdSqMD1YVq.mjs +519 -0
- package/node/esm/BImYtxlBDnxbuYJQ.mjs +94 -0
- package/node/esm/{CNkqJbFlITxBA0t4.mjs → BQ_0nUqKSPxxzxTT.mjs} +29 -29
- package/node/esm/{Defb5qpSal98J5ay.mjs → BSJerjorDJ4w9N6r.mjs} +2 -2
- package/node/esm/{Dyd7va4aqC1jIzAk.mjs → C0KFwVu86wTgTd54.mjs} +21 -21
- package/node/esm/C0kd2sPUnsgdGUtj.mjs +197 -0
- package/node/esm/C4UnectGYMh-7x7y.mjs +267 -0
- package/node/esm/C5pD4ZSa_HiL9qxk.mjs +14 -0
- package/node/esm/C9W1LtNkMMtOs7Qg.mjs +73 -0
- package/node/esm/CAFHLlFMItMl9TpP.mjs +412 -0
- package/node/esm/CW3fvozHERUfT6Bc.mjs +294 -0
- package/node/esm/CWTDdTicFuH60csl.mjs +972 -0
- package/node/esm/ChO1UxVGRIBuNPOZ.mjs +489 -0
- package/node/esm/{BkoorcOtOEh_Y7ck.mjs → CkIf9KMnQ26-zlEa.mjs} +33 -31
- package/node/esm/CsI3f2TN7jrLwudM.mjs +106 -0
- package/node/esm/CvM_8IuzxswqHgRo.mjs +224 -0
- package/node/esm/D7iklNCWLGeAIvrP.mjs +142 -0
- package/node/esm/D9Inb0eBSow2sR6u.mjs +319 -0
- package/node/esm/DKpUHQxiykyKEuyT.mjs +638 -0
- package/node/esm/DL4-uvtWGuGAfnne.mjs +391 -0
- package/node/esm/{CTtj1NR0IrcN8PTy.mjs → DP_w1SJKb-yFCvb7.mjs} +10 -10
- package/node/esm/DR7dWTccTfAqn8m8.mjs +516 -0
- package/node/esm/DXRJq0Bn7sDr_vXm.mjs +242 -0
- package/node/esm/DZ57bmwliKKBEzB7.mjs +1276 -0
- package/node/esm/Df5VcbKeW9cXY1Lw.mjs +141 -0
- package/node/esm/{b05_u9WnJaVGO0nq.mjs → DxWAgNvtIylA_ta_.mjs} +2 -2
- package/node/esm/GsWeMsCRXwvvpe2Z.mjs +77 -0
- package/node/esm/ONS9B46FEPFzjQsi.mjs +425 -0
- package/node/esm/QfWVpAmFeAecSa0o.mjs +385 -0
- package/node/esm/{BiHw3x2LPWT-kK8G.mjs → RgfhTFBh6fACzrx4.mjs} +84 -96
- package/node/esm/UCHoCHXSYWtQeJ-9.mjs +118 -0
- package/node/esm/index.mjs +9717 -8954
- package/node/esm/mmKhNlIs2nFTMbl5.mjs +94 -0
- package/node/esm/stC67-iHu8jB-gTl.mjs +1831 -0
- package/node/esm/{DHHgNbakbpNnu0oW.mjs → uFGXjoHpIjHX5bT8.mjs} +23 -23
- package/node/esm/z_MOgf-yg9GWQtPj.mjs +975 -0
- package/package.json +16 -19
- package/resources/contents.json +6 -0
- package/resources/locales/contents.json +14 -0
- package/resources/locales/de/groups.cmd.json +59 -10
- package/resources/locales/de/ui.msg.json +267 -14
- package/resources/locales/de/workbookAnomalies.cmd.json +14 -0
- package/resources/locales/en/groups.cmd.json +63 -11
- package/resources/locales/en/ui.msg.json +272 -14
- package/resources/locales/en/workbookAnomalies.cmd.json +14 -0
- package/types/src/anchorItems/AnchorItemsDescriptor.d.ts +4 -4
- package/types/src/anomalies/AnomaliesCommands.d.ts +8 -0
- package/types/src/anomalies/AnomaliesMessages.d.ts +30 -0
- package/types/src/anomalies/AnomaliesPlugin.d.ts +12 -0
- package/types/src/anomalies/AnomaliesTaskPane.d.ts +17 -0
- package/types/src/anomalies/_source.d.ts +7 -0
- package/types/src/anomalies/index.d.ts +3 -0
- package/types/src/border/BorderPopupButton.d.ts +1 -1
- package/types/src/border/BorderTemplateIcon.d.ts +6 -1
- package/types/src/chart/ChartFormatPanel.d.ts +20 -0
- package/types/src/chart/ChartPlugin.d.ts +6 -0
- package/types/src/chart/index.d.ts +3 -0
- package/types/src/color/ColorPopupButton.d.ts +1 -1
- package/types/src/command/AccountingStyleCommandButton.d.ts +1 -1
- package/types/src/command/ColorCommandButton.d.ts +5 -0
- package/types/src/command/DocThemeCommandButton.d.ts +1 -1
- package/types/src/command/FontFamilyCommandButton.d.ts +1 -1
- package/types/src/command/FontSizeCommandButton.d.ts +1 -1
- package/types/src/command/InsertCellControlCommandButton.d.ts +17 -0
- package/types/src/command/LanguageCommandButton.d.ts +1 -1
- package/types/src/command/LocaleCommandButton.d.ts +1 -1
- package/types/src/command/PresetCellStylesCommandButton.d.ts +3 -3
- package/types/src/command/PresetPivotStylesCommandButton.d.ts +17 -0
- package/types/src/command/SheetZoomCommandButton.d.ts +4 -3
- package/types/src/command/index.d.ts +2 -0
- package/types/src/comments/CommentCard.d.ts +2 -2
- package/types/src/comments/CommentsPlugin.d.ts +1 -1
- package/types/src/conditionalFormat/ConditionalFormatPlugin.d.ts +1 -1
- package/types/src/conditionalFormat/ConditionalFormatStylePicker.d.ts +4 -4
- package/types/src/conditionalFormat/IconPickerPopupButton.d.ts +3 -3
- package/types/src/conditionalFormat/IconSetRulePanel.d.ts +1 -1
- package/types/src/conditions/CombinatorOption.d.ts +7 -0
- package/types/src/conditions/ConditionEditor.d.ts +55 -3
- package/types/src/conditions/ConditionUtils.d.ts +34 -6
- package/types/src/conditions/ExpressionOption.d.ts +6 -0
- package/types/src/conditions/MembershipOption.d.ts +67 -0
- package/types/src/conditions/OperatorAndParamEditor.d.ts +36 -1
- package/types/src/conditions/OperatorSelectPopupButton.d.ts +1 -1
- package/types/src/conditions/ScalarOption.d.ts +5 -4
- package/types/src/conditions/SelectorSelect.d.ts +16 -7
- package/types/src/conditions/index.d.ts +1 -1
- package/types/src/conditions/useFormulaOption.d.ts +2 -2
- package/types/src/dataValidation/DataValidationEditorPanel.d.ts +9 -5
- package/types/src/dataValidation/DataValidationIcon.d.ts +1 -1
- package/types/src/dataValidation/DataValidationPlugin.d.ts +1 -1
- package/types/src/dialog/HyperlinkDialog.d.ts +15 -0
- package/types/src/dialog/PivotTableNewDialog.d.ts +11 -0
- package/types/src/dialog/SparklineEditDialog.d.ts +10 -0
- package/types/src/dialog/SparklineNewDialog.d.ts +23 -0
- package/types/src/dialog/WorkbookStatisticsDialog.d.ts +1 -1
- package/types/src/dialog/_ShortcutSearch.d.ts +26 -0
- package/types/src/externalLink/ExternalLinkSettingsTab.d.ts +1 -1
- package/types/src/externalLink/ExternalLinksPlugin.d.ts +1 -1
- package/types/src/fill/GradientEditor.d.ts +15 -13
- package/types/src/fill/GradientStopsBar.d.ts +43 -0
- package/types/src/fill/PatternPopupButton.d.ts +1 -1
- package/types/src/fill/index.d.ts +1 -0
- package/types/src/filter/ColumnMenu.d.ts +31 -1
- package/types/src/filter/PivotMenu.d.ts +31 -0
- package/types/src/filter/index.d.ts +1 -1
- package/types/src/form/FormulaField.d.ts +4 -4
- package/types/src/form/InputField.d.ts +5 -5
- package/types/src/format/BorderPreview.d.ts +11 -4
- package/types/src/format/FillPanel.d.ts +42 -2
- package/types/src/format/FormatPanelParts.d.ts +3 -1
- package/types/src/format/FormatPlugin.d.ts +1 -6
- package/types/src/format/LinePanel.d.ts +53 -0
- package/types/src/format/LinePreviews.d.ts +71 -0
- package/types/src/format/index.d.ts +1 -0
- package/types/src/format/useFormatSelection.d.ts +6 -6
- package/types/src/formulaBar/IFormulaBar.d.ts +32 -3
- package/types/src/formulaBar/MobileFormulaBar.d.ts +42 -0
- package/types/src/formulaBar/MobileInputToolbar.d.ts +43 -0
- package/types/src/formulaBar/index.d.ts +3 -0
- package/types/src/formulaBar/useFormulaBarSession.d.ts +68 -0
- package/types/src/index.d.ts +19 -6
- package/types/src/itemsPanel/ItemCard.d.ts +50 -7
- package/types/src/itemsPanel/ItemsPanel.d.ts +5 -0
- package/types/src/itemsPanel/ItemsSearchField.d.ts +17 -0
- package/types/src/itemsPanel/index.d.ts +1 -0
- package/types/src/named/NamedDetailsPanel.d.ts +2 -2
- package/types/src/named/NamedPlugin.d.ts +1 -1
- package/types/src/picture/PicturePlugin.d.ts +6 -0
- package/types/src/picture/index.d.ts +2 -0
- package/types/src/pivot/PivotChipMenu.d.ts +10 -0
- package/types/src/pivot/PivotPlugin.d.ts +3 -0
- package/types/src/pivot/PivotStyleCanvasPreview.d.ts +23 -0
- package/types/src/pivot/PivotTableHeader.d.ts +12 -0
- package/types/src/pivot/PivotValueSettingsDialog.d.ts +15 -0
- package/types/src/pivot/_pivotSource.d.ts +7 -0
- package/types/src/presence/PresenceOverlay.d.ts +14 -0
- package/types/src/presence/PresencePlugin.d.ts +31 -0
- package/types/src/presence/PresenceStrip.d.ts +22 -0
- package/types/src/presence/PresenceTaskPane.d.ts +13 -0
- package/types/src/presence/Timeline.d.ts +29 -0
- package/types/src/presence/index.d.ts +5 -0
- package/types/src/protection/ProtectedCellsPanel.d.ts +3 -3
- package/types/src/protection/ProtectionPlugin.d.ts +1 -1
- package/types/src/protection/{SheetProtectionPanel.d.ts → WorksheetProtectionPanel.d.ts} +6 -6
- package/types/src/protection/index.d.ts +1 -1
- package/types/src/shape/ShapeFormatPanel.d.ts +11 -0
- package/types/src/shape/ShapeGalleryCommandButton.d.ts +18 -0
- package/types/src/shape/ShapePlugin.d.ts +8 -0
- package/types/src/shape/index.d.ts +2 -1
- package/types/src/slicer/InsertSlicerCommandButton.d.ts +13 -0
- package/types/src/slicer/PresetSlicerStylesCommandButton.d.ts +12 -0
- package/types/src/slicer/SlicerPlugin.d.ts +6 -0
- package/types/src/slicer/index.d.ts +3 -0
- package/types/src/statusBar/PendingStatus.d.ts +19 -0
- package/types/src/statusBar/SheetZoomScale.d.ts +6 -0
- package/types/src/statusBar/index.d.ts +1 -0
- package/types/src/studio/StudioProps.d.ts +62 -27
- package/types/src/studio/formulaBarPlacement.d.ts +35 -0
- package/types/src/studio/useStudioApp.d.ts +25 -24
- package/types/src/table/TablePlugin.d.ts +1 -1
- package/types/src/table/_drawStyleSwatch.d.ts +25 -0
- package/types/src/template/TemplateDialog.d.ts +1 -1
- package/types/src/template/TemplatePanel.d.ts +5 -1
- package/types/src/template/TemplateSearchField.d.ts +17 -1
- package/types/src/template/categoryColor.d.ts +8 -0
- package/types/src/template/useTemplateCatalog.d.ts +2 -0
- package/types/src/theme/ThemeSelectPopupButton.d.ts +1 -1
- package/types/src/theme/ThemeUtils.d.ts +8 -27
- package/types/src/toolbar/WorkbookToolbars.d.ts +2 -2
- package/types/src/workbook/DefaultRenderers.d.ts +42 -18
- package/types/src/workbook/WorkbookContextMenu.d.ts +4 -0
- package/types/src/workbook/WorkbookElement.d.ts +5 -4
- package/types/src/workbook/WorkbookStrip.d.ts +8 -7
- package/types/src/workbook/index.d.ts +1 -1
- package/browser/cjs/2tG9HJLr-WjsOCP3.cjs +0 -1
- package/browser/cjs/3RXtLkq7wTAV6y_e.cjs +0 -1
- package/browser/cjs/3k_KqDFr-AybPztc.cjs +0 -5
- package/browser/cjs/4_Zy3pR6YXkzISoK.cjs +0 -1
- package/browser/cjs/BD50lsTki7wvzb5g.cjs +0 -1
- package/browser/cjs/BJ-wdkCaXqJaejKf.cjs +0 -1
- package/browser/cjs/BQJKf40kttQWOzLw.cjs +0 -20
- package/browser/cjs/BTZ5uzK0wHzpiZGC.cjs +0 -1
- package/browser/cjs/Bc-YisjBtD56vBAW.cjs +0 -1
- package/browser/cjs/Bo9Kx3L_XQkGPBJ5.cjs +0 -1
- package/browser/cjs/BpG4iwTKbAnpi0wM.cjs +0 -1
- package/browser/cjs/ByIUHPOa02D7XbdC.cjs +0 -1
- package/browser/cjs/C97KHSuikAbr1qVM.cjs +0 -1
- package/browser/cjs/CMfoKJ3ehdXuld_7.cjs +0 -14
- package/browser/cjs/CPSc2VSYZeZ1B9mi.cjs +0 -1
- package/browser/cjs/CPcBvw4ZPwHVTUZF.cjs +0 -1
- package/browser/cjs/CdDYyAfccXme8w6m.cjs +0 -1
- package/browser/cjs/CkroJ2FmfFvk6Eyv.cjs +0 -1
- package/browser/cjs/CzJvR12QCQb-0Rtn.cjs +0 -1
- package/browser/cjs/D-Yo5aV9STT5KH4G.cjs +0 -1
- package/browser/cjs/DwkiLFWUtLC8ZcIQ.cjs +0 -1
- package/browser/cjs/HuPFsmz7kyZVo3c7.cjs +0 -1
- package/browser/cjs/KZvriGbhEOVkQD0b.cjs +0 -1
- package/browser/cjs/M0_dvdYwhikqP9kg.cjs +0 -2
- package/browser/cjs/g1WhGOz5epV7Hqsg.cjs +0 -8
- package/browser/cjs/iMWEL01eC83oU-YY.cjs +0 -1
- package/browser/cjs/index.cjs +0 -2
- package/browser/esm/BoLRDhnoO3gvviYD.mjs +0 -13811
- package/browser/esm/CH-Y2-p8GRvCHvd4.mjs +0 -52
- package/browser/esm/CUhtBLyaGSkcKB_1.mjs +0 -236
- package/browser/esm/D-Kit71xiitqCWVY.mjs +0 -5356
- package/browser/esm/DkUDZxFxx9n2Cked.mjs +0 -223
- package/browser/esm/F6kkwcBr0l-496tC.mjs +0 -152
- package/browser/esm/Q8r5yuh8Yx2ROnhC.mjs +0 -115
- package/browser/esm/iRFlbG6hQyKLVagS.mjs +0 -411
- package/browser/esm/lftI5b4ZCHVYc6OZ.mjs +0 -1150
- package/node/esm/BTZGnNrgV1na62gd.mjs +0 -415
- package/node/esm/Be0G9parvc2CTpFQ.mjs +0 -4504
- package/node/esm/CTJqjeq3smY8jw5J.mjs +0 -236
- package/node/esm/DbLFR_dnQQmZC_jm.mjs +0 -115
- package/types/src/conditions/DateTimeOption.d.ts +0 -43
- package/types/src/conditions/ListSourceOption.d.ts +0 -31
- package/types/src/filter/FilterList.d.ts +0 -32
- package/types/src/shape/InsertShapeCommandButton.d.ts +0 -10
|
@@ -0,0 +1,2692 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v1.0.2
|
|
3
|
+
*
|
|
4
|
+
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: MIT
|
|
6
|
+
*/
|
|
7
|
+
import { B as e, E as t, F as n, H as r, J as i, N as a, P as o, St as s, T as c, V as l, _t as u, at as d, d as f, g as p, ht as m, i as h, it as g, jt as _, r as ee, st as v, t as y, x as te } from "./CT8hUU9KN4TmEBld.mjs";
|
|
8
|
+
import { t as b } from "./hjbPNszp95-0VCIw.mjs";
|
|
9
|
+
import { n as x, t as ne } from "./Cy6Q7KGXWYIosYTX.mjs";
|
|
10
|
+
import { n as re } from "./DrdNTvMdXdsemC4B.mjs";
|
|
11
|
+
import { InputField as ie } from "./index.mjs";
|
|
12
|
+
import { CommandRootProvider as S, DefaultTaskPaneRegistry as C, LogoNoPaddingIcon as ae, PivotTablePane as oe, SHAPE_ICON_PACK as se, TaskPaneArea as ce, TaskPaneKey as w, TaskPaneProvider as le, ThemeRootStyles as ue, ThemeStateDefaults as de, ThemeStateKey as fe, WorkbookIO as T, WorkbookProvider as pe, createEditable as me, registerMovablePane as he, useDocThemes as ge, useModelSync as _e, useReferenceModeStore as ve, useResolvedWorkbook as ye, useTaskPaneArea as be, useWorkbookEncrypted as xe, useWorkbookName as Se, useWorkbookSaveState as Ce } from "@sheetxl/react";
|
|
13
|
+
import { Command as we, DefaultCommandButtonRegistry as Te, DefaultIconService as Ee, DynamicIcon as De, LanguageStateKey as Oe, NotifierType as ke, ReactErrorBoundary as Ae, ReactNotifierProvider as E, ReactUtils as je, RenderSlot as Me, ScrollUtils as Ne, SplitPane as Pe, ThemeStyle as Fe, UncaughtErrorBoundary as Ie, createBusyHandle as Le, useCallbackRef as D, useFullscreen as Re, useImperativeElement as ze, useKeyboardResize as Be, useLanguage as Ve, useMeasure as He, useNotifier as Ue, usePersistentState as We, useResolvedThemeMode as Ge, useTranslator as Ke } from "@sheetxl/utils-react";
|
|
14
|
+
import O, { Component as qe, Fragment as Je, cloneElement as Ye, createElement as Xe, forwardRef as k, isValidElement as Ze, memo as A, useCallback as j, useContext as Qe, useEffect as M, useLayoutEffect as $e, useMemo as N, useRef as P, useState as F } from "react";
|
|
15
|
+
import { AnimatedLoadingPanel as et, AnimatedTraversingEllipsisIcon as tt, CommandGroup as nt, ExhibitDivider as rt, ExhibitFloatProvider as it, ExhibitMenuItem as at, ExhibitTooltip as ot, ModalProvider as st, SelectedIcon as ct, SimpleTooltip as lt, StackTrace as ut, createExhibitTheme as dt, hideLoadingPanel as ft, lazyModal as pt, lazyPanel as mt, showLoadingPanel as ht, useInputDialog as I, useLazyWindow as gt, useModal as _t, useOptionsDialog as vt } from "@sheetxl/utils-mui";
|
|
16
|
+
import { Fragment as yt, jsx as L, jsxs as R } from "react/jsx-runtime";
|
|
17
|
+
import { Box as z, Card as bt, CardActions as xt, Collapse as St, CssBaseline as Ct, DialogTitle as B, IconButton as V, Paper as wt, SvgIcon as Tt, Tab as H, Tabs as U, ThemeProvider as Et, Typography as W, alpha as Dt, useMediaQuery as Ot, useTheme as kt } from "@mui/material";
|
|
18
|
+
import { CommonUtils as At, DOMUtils as jt, DefaultLanguagePackService as Mt, ErrorUtils as Nt, ExpectedError as Pt, PartialError as Ft, defineLazyModule as G, formatMessage as It, messageKey as K, t as q } from "@sheetxl/utils";
|
|
19
|
+
import { createPortal as Lt } from "react-dom";
|
|
20
|
+
var Rt = Object.defineProperty, zt = (e, t) => {
|
|
21
|
+
let n = {};
|
|
22
|
+
for (var r in e) Rt(n, r, {
|
|
23
|
+
get: e[r],
|
|
24
|
+
enumerable: !0
|
|
25
|
+
});
|
|
26
|
+
return t || Rt(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
27
|
+
}, Bt = mt(G("studio:conditionalFormatDetailsTaskPane", () => import("./BGxILWytBh1gGIqX.mjs"), { select: (e) => ({ default: e.ConditionalFormatDetailsTaskPane }) }).load), Vt = ["lines"], Ht = /^[A-Za-z_\\][\w.\\]*$/, Ut = /^\$?[A-Za-z]{1,3}\$?\d+$/, Wt = (e) => {
|
|
28
|
+
let t = e?.getReferences() ?? null;
|
|
29
|
+
if (!e || !t || t.getCount() !== 1) return null;
|
|
30
|
+
let n = e.getExpression().trim();
|
|
31
|
+
return Ht.test(n) && !Ut.test(n) ? n : t;
|
|
32
|
+
};
|
|
33
|
+
function Gt(e) {
|
|
34
|
+
var t, n, r = "";
|
|
35
|
+
if (typeof e == "string" || typeof e == "number") r += e;
|
|
36
|
+
else if (typeof e == "object") {
|
|
37
|
+
if (Array.isArray(e)) for (t = 0; t < e.length; t++) e[t] && (n = Gt(e[t])) && (r && (r += " "), r += n);
|
|
38
|
+
else for (t in e) e[t] && (r && (r += " "), r += t);
|
|
39
|
+
}
|
|
40
|
+
return r;
|
|
41
|
+
}
|
|
42
|
+
function Kt() {
|
|
43
|
+
for (var e, t, n = 0, r = ""; n < arguments.length;) (e = arguments[n++]) && (t = Gt(e)) && (r && (r += " "), r += t);
|
|
44
|
+
return r;
|
|
45
|
+
}
|
|
46
|
+
var qt = { data: "" }, Jt = (e) => {
|
|
47
|
+
if (typeof window == "object") {
|
|
48
|
+
let t = (e ? e.querySelector("#_goober") : window._goober) || Object.assign(document.createElement("style"), {
|
|
49
|
+
innerHTML: " ",
|
|
50
|
+
id: "_goober"
|
|
51
|
+
});
|
|
52
|
+
return t.nonce = window.__nonce__, t.parentNode || (e || document.head).appendChild(t), t.firstChild;
|
|
53
|
+
}
|
|
54
|
+
return e || qt;
|
|
55
|
+
}, Yt = /(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g, Xt = /\/\*[^]*?\*\/| +/g, Zt = /\n+/g, J = (e, t) => {
|
|
56
|
+
let n = "", r = "", i = "";
|
|
57
|
+
for (let a in e) {
|
|
58
|
+
let o = e[a];
|
|
59
|
+
a[0] == "@" ? a[1] == "i" ? n = a + " " + o + ";" : r += a[1] == "f" ? J(o, a) : a + "{" + J(o, a[1] == "k" ? "" : t) + "}" : typeof o == "object" ? r += J(o, t ? t.replace(/([^,])+/g, (e) => a.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g, (t) => /&/.test(t) ? t.replace(/&/g, e) : e ? e + " " + t : t)) : a) : o != null && (a = a[1] == "-" ? a : a.replace(/[A-Z]/g, "-$&").toLowerCase(), i += J.p ? J.p(a, o) : a + ":" + o + ";");
|
|
60
|
+
}
|
|
61
|
+
return n + (t && i ? t + "{" + i + "}" : i) + r;
|
|
62
|
+
}, Y = {}, Qt = (e) => {
|
|
63
|
+
if (typeof e == "object") {
|
|
64
|
+
let t = "";
|
|
65
|
+
for (let n in e) t += n + Qt(e[n]);
|
|
66
|
+
return t;
|
|
67
|
+
}
|
|
68
|
+
return e;
|
|
69
|
+
}, $t = (e, t, n, r, i) => {
|
|
70
|
+
let a = Qt(e), o = Y[a] || (Y[a] = ((e) => {
|
|
71
|
+
let t = 0, n = 11;
|
|
72
|
+
for (; t < e.length;) n = 101 * n + e.charCodeAt(t++) >>> 0;
|
|
73
|
+
return "go" + n;
|
|
74
|
+
})(a));
|
|
75
|
+
if (!Y[o]) {
|
|
76
|
+
let t = a === e ? ((e) => {
|
|
77
|
+
let t, n, r = [{}];
|
|
78
|
+
for (; t = Yt.exec(e.replace(Xt, ""));) t[4] ? r.shift() : t[3] ? (n = t[3].replace(Zt, " ").trim(), r.unshift(r[0][n] = r[0][n] || {})) : r[0][t[1]] = t[2].replace(Zt, " ").trim();
|
|
79
|
+
return r[0];
|
|
80
|
+
})(e) : e;
|
|
81
|
+
Y[o] = J(i ? { ["@keyframes " + o]: t } : t, n ? "" : "." + o);
|
|
82
|
+
}
|
|
83
|
+
let s = n && Y.g;
|
|
84
|
+
return n && (Y.g = Y[o]), ((e, t, n, r) => {
|
|
85
|
+
r ? t.data = t.data.replace(r, e) : t.data.indexOf(e) === -1 && (t.data = n ? e + t.data : t.data + e);
|
|
86
|
+
})(Y[o], t, r, s), o;
|
|
87
|
+
};
|
|
88
|
+
function en(e) {
|
|
89
|
+
let t = this || {}, n = e.call ? e(t.p) : e;
|
|
90
|
+
return $t(n.unshift ? n.raw ? ((e, t, n) => e.reduce((e, r, i) => {
|
|
91
|
+
let a = t[i];
|
|
92
|
+
if (a && a.call) {
|
|
93
|
+
let e = a(n), t = e && e.props && e.props.className || /^go/.test(e) && e;
|
|
94
|
+
a = t ? "." + t : e && typeof e == "object" ? e.props ? "" : J(e, "") : !1 === e ? "" : e;
|
|
95
|
+
}
|
|
96
|
+
return e + r + (a ?? "");
|
|
97
|
+
}, ""))(n, [].slice.call(arguments, 1), t.p) : n.reduce((e, n) => Object.assign(e, n && n.call ? n(t.p) : n), {}) : n, Jt(t.target), t.g, t.o, t.k);
|
|
98
|
+
}
|
|
99
|
+
en.bind({ g: 1 }), en.bind({ k: 1 });
|
|
100
|
+
function tn(e, t) {
|
|
101
|
+
for (var n = 0; n < t.length; n++) {
|
|
102
|
+
var r = t[n];
|
|
103
|
+
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
function nn(e, t, n) {
|
|
107
|
+
return t && tn(e.prototype, t), n && tn(e, n), e;
|
|
108
|
+
}
|
|
109
|
+
function X() {
|
|
110
|
+
return X = Object.assign || function(e) {
|
|
111
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
112
|
+
var n = arguments[t];
|
|
113
|
+
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
114
|
+
}
|
|
115
|
+
return e;
|
|
116
|
+
}, X.apply(this, arguments);
|
|
117
|
+
}
|
|
118
|
+
function rn(e, t) {
|
|
119
|
+
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, e.__proto__ = t;
|
|
120
|
+
}
|
|
121
|
+
function an(e, t) {
|
|
122
|
+
if (e == null) return {};
|
|
123
|
+
for (var n, r = {}, i = Object.keys(e), a = 0; a < i.length; a++) n = i[a], t.indexOf(n) >= 0 || (r[n] = e[n]);
|
|
124
|
+
return r;
|
|
125
|
+
}
|
|
126
|
+
function on(e) {
|
|
127
|
+
if (e === void 0) throw ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
128
|
+
return e;
|
|
129
|
+
}
|
|
130
|
+
var sn = function() {
|
|
131
|
+
return "";
|
|
132
|
+
}, cn = O.createContext({
|
|
133
|
+
enqueueSnackbar: sn,
|
|
134
|
+
closeSnackbar: sn
|
|
135
|
+
}), ln = "@media (max-width:599.95px)", Z = "@media (min-width:600px)", un = function(e) {
|
|
136
|
+
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
137
|
+
}, dn = function(e) {
|
|
138
|
+
return "" + un(e.vertical) + un(e.horizontal);
|
|
139
|
+
}, fn = function(e) {
|
|
140
|
+
return !!e || e === 0;
|
|
141
|
+
}, pn = "unmounted", Q = "exited", mn = "entering", hn = "entered", gn = "exiting", _n = function(e) {
|
|
142
|
+
function t(t) {
|
|
143
|
+
var n, r = e.call(this, t) || this, i = t.appear;
|
|
144
|
+
return r.appearStatus = null, t.in ? i ? (n = Q, r.appearStatus = mn) : n = hn : n = t.unmountOnExit || t.mountOnEnter ? pn : Q, r.state = { status: n }, r.nextCallback = null, r;
|
|
145
|
+
}
|
|
146
|
+
rn(t, e), t.getDerivedStateFromProps = function(e, t) {
|
|
147
|
+
return e.in && t.status === pn ? { status: Q } : null;
|
|
148
|
+
};
|
|
149
|
+
var n = t.prototype;
|
|
150
|
+
return n.componentDidMount = function() {
|
|
151
|
+
this.updateStatus(!0, this.appearStatus);
|
|
152
|
+
}, n.componentDidUpdate = function(e) {
|
|
153
|
+
var t = null;
|
|
154
|
+
if (e !== this.props) {
|
|
155
|
+
var n = this.state.status;
|
|
156
|
+
this.props.in ? n !== mn && n !== hn && (t = mn) : n !== mn && n !== hn || (t = gn);
|
|
157
|
+
}
|
|
158
|
+
this.updateStatus(!1, t);
|
|
159
|
+
}, n.componentWillUnmount = function() {
|
|
160
|
+
this.cancelNextCallback();
|
|
161
|
+
}, n.getTimeouts = function() {
|
|
162
|
+
var e = this.props.timeout, t = e, n = e;
|
|
163
|
+
return e != null && typeof e != "number" && typeof e != "string" && (n = e.exit, t = e.enter), {
|
|
164
|
+
exit: n,
|
|
165
|
+
enter: t
|
|
166
|
+
};
|
|
167
|
+
}, n.updateStatus = function(e, t) {
|
|
168
|
+
e === void 0 && (e = !1), t === null ? this.props.unmountOnExit && this.state.status === Q && this.setState({ status: pn }) : (this.cancelNextCallback(), t === mn ? this.performEnter(e) : this.performExit());
|
|
169
|
+
}, n.performEnter = function(e) {
|
|
170
|
+
var t = this, n = this.props.enter, r = e, i = this.getTimeouts();
|
|
171
|
+
e || n ? (this.props.onEnter && this.props.onEnter(this.node, r), this.safeSetState({ status: mn }, function() {
|
|
172
|
+
t.props.onEntering && t.props.onEntering(t.node, r), t.onTransitionEnd(i.enter, function() {
|
|
173
|
+
t.safeSetState({ status: hn }, function() {
|
|
174
|
+
t.props.onEntered && t.props.onEntered(t.node, r);
|
|
175
|
+
});
|
|
176
|
+
});
|
|
177
|
+
})) : this.safeSetState({ status: hn }, function() {
|
|
178
|
+
t.props.onEntered && t.props.onEntered(t.node, r);
|
|
179
|
+
});
|
|
180
|
+
}, n.performExit = function() {
|
|
181
|
+
var e = this, t = this.props.exit, n = this.getTimeouts();
|
|
182
|
+
t ? (this.props.onExit && this.props.onExit(this.node), this.safeSetState({ status: gn }, function() {
|
|
183
|
+
e.props.onExiting && e.props.onExiting(e.node), e.onTransitionEnd(n.exit, function() {
|
|
184
|
+
e.safeSetState({ status: Q }, function() {
|
|
185
|
+
e.props.onExited && e.props.onExited(e.node);
|
|
186
|
+
});
|
|
187
|
+
});
|
|
188
|
+
})) : this.safeSetState({ status: Q }, function() {
|
|
189
|
+
e.props.onExited && e.props.onExited(e.node);
|
|
190
|
+
});
|
|
191
|
+
}, n.cancelNextCallback = function() {
|
|
192
|
+
this.nextCallback !== null && this.nextCallback.cancel && (this.nextCallback.cancel(), this.nextCallback = null);
|
|
193
|
+
}, n.safeSetState = function(e, t) {
|
|
194
|
+
t = this.setNextCallback(t), this.setState(e, t);
|
|
195
|
+
}, n.setNextCallback = function(e) {
|
|
196
|
+
var t = this, n = !0;
|
|
197
|
+
return this.nextCallback = function() {
|
|
198
|
+
n && (n = !1, t.nextCallback = null, e());
|
|
199
|
+
}, this.nextCallback.cancel = function() {
|
|
200
|
+
n = !1;
|
|
201
|
+
}, this.nextCallback;
|
|
202
|
+
}, n.onTransitionEnd = function(e, t) {
|
|
203
|
+
this.setNextCallback(t);
|
|
204
|
+
var n = e == null && !this.props.addEndListener;
|
|
205
|
+
this.node && !n ? (this.props.addEndListener && this.props.addEndListener(this.node, this.nextCallback), e != null && setTimeout(this.nextCallback, e)) : setTimeout(this.nextCallback, 0);
|
|
206
|
+
}, n.render = function() {
|
|
207
|
+
var e = this.state.status;
|
|
208
|
+
if (e === pn) return null;
|
|
209
|
+
var t = this.props;
|
|
210
|
+
return (0, t.children)(e, an(t, [
|
|
211
|
+
"children",
|
|
212
|
+
"in",
|
|
213
|
+
"mountOnEnter",
|
|
214
|
+
"unmountOnExit",
|
|
215
|
+
"appear",
|
|
216
|
+
"enter",
|
|
217
|
+
"exit",
|
|
218
|
+
"timeout",
|
|
219
|
+
"addEndListener",
|
|
220
|
+
"onEnter",
|
|
221
|
+
"onEntering",
|
|
222
|
+
"onEntered",
|
|
223
|
+
"onExit",
|
|
224
|
+
"onExiting",
|
|
225
|
+
"onExited",
|
|
226
|
+
"nodeRef"
|
|
227
|
+
]));
|
|
228
|
+
}, nn(t, [{
|
|
229
|
+
key: "node",
|
|
230
|
+
get: function() {
|
|
231
|
+
var e = this.props.nodeRef?.current;
|
|
232
|
+
if (!e) throw Error("notistack - Custom snackbar is not refForwarding");
|
|
233
|
+
return e;
|
|
234
|
+
}
|
|
235
|
+
}]), t;
|
|
236
|
+
}(O.Component);
|
|
237
|
+
function vn() {}
|
|
238
|
+
function yn(e, t) {
|
|
239
|
+
typeof e == "function" ? e(t) : e && (e.current = t);
|
|
240
|
+
}
|
|
241
|
+
function bn(e, t) {
|
|
242
|
+
return N(function() {
|
|
243
|
+
return e == null && t == null ? null : function(n) {
|
|
244
|
+
yn(e, n), yn(t, n);
|
|
245
|
+
};
|
|
246
|
+
}, [e, t]);
|
|
247
|
+
}
|
|
248
|
+
function xn(e) {
|
|
249
|
+
var t = e.timeout, n = e.style, r = n === void 0 ? {} : n, i = e.mode;
|
|
250
|
+
return {
|
|
251
|
+
duration: typeof t == "object" ? t[i] || 0 : t,
|
|
252
|
+
easing: r.transitionTimingFunction,
|
|
253
|
+
delay: r.transitionDelay
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
_n.defaultProps = {
|
|
257
|
+
in: !1,
|
|
258
|
+
mountOnEnter: !1,
|
|
259
|
+
unmountOnExit: !1,
|
|
260
|
+
appear: !1,
|
|
261
|
+
enter: !0,
|
|
262
|
+
exit: !0,
|
|
263
|
+
onEnter: vn,
|
|
264
|
+
onEntering: vn,
|
|
265
|
+
onEntered: vn,
|
|
266
|
+
onExit: vn,
|
|
267
|
+
onExiting: vn,
|
|
268
|
+
onExited: vn
|
|
269
|
+
};
|
|
270
|
+
var Sn = "cubic-bezier(0.4, 0, 0.2, 1)", Cn = "cubic-bezier(0.0, 0, 0.2, 1)", wn = "cubic-bezier(0.4, 0, 0.6, 1)", Tn = function(e) {
|
|
271
|
+
e.scrollTop = e.scrollTop;
|
|
272
|
+
}, En = function(e) {
|
|
273
|
+
return Math.round(e) + "ms";
|
|
274
|
+
};
|
|
275
|
+
function Dn(e, t) {
|
|
276
|
+
e === void 0 && (e = ["all"]);
|
|
277
|
+
var n = t || {}, r = n.duration, i = r === void 0 ? 300 : r, a = n.easing, o = a === void 0 ? Sn : a, s = n.delay, c = s === void 0 ? 0 : s;
|
|
278
|
+
return (Array.isArray(e) ? e : [e]).map(function(e) {
|
|
279
|
+
var t = typeof i == "string" ? i : En(i), n = typeof c == "string" ? c : En(c);
|
|
280
|
+
return e + " " + t + " " + o + " " + n;
|
|
281
|
+
}).join(",");
|
|
282
|
+
}
|
|
283
|
+
function On(e) {
|
|
284
|
+
return function(e) {
|
|
285
|
+
return e && e.ownerDocument || document;
|
|
286
|
+
}(e).defaultView || window;
|
|
287
|
+
}
|
|
288
|
+
function kn(e, t) {
|
|
289
|
+
if (t) {
|
|
290
|
+
var n = function(e, t) {
|
|
291
|
+
var n, r = t.getBoundingClientRect(), i = On(t);
|
|
292
|
+
if (t.fakeTransform) n = t.fakeTransform;
|
|
293
|
+
else {
|
|
294
|
+
var a = i.getComputedStyle(t);
|
|
295
|
+
n = a.getPropertyValue("-webkit-transform") || a.getPropertyValue("transform");
|
|
296
|
+
}
|
|
297
|
+
var o = 0, s = 0;
|
|
298
|
+
if (n && n !== "none" && typeof n == "string") {
|
|
299
|
+
var c = n.split("(")[1].split(")")[0].split(",");
|
|
300
|
+
o = parseInt(c[4], 10), s = parseInt(c[5], 10);
|
|
301
|
+
}
|
|
302
|
+
switch (e) {
|
|
303
|
+
case "left": return "translateX(" + (i.innerWidth + o - r.left) + "px)";
|
|
304
|
+
case "right": return "translateX(-" + (r.left + r.width - o) + "px)";
|
|
305
|
+
case "up": return "translateY(" + (i.innerHeight + s - r.top) + "px)";
|
|
306
|
+
default: return "translateY(-" + (r.top + r.height - s) + "px)";
|
|
307
|
+
}
|
|
308
|
+
}(e, t);
|
|
309
|
+
n && (t.style.webkitTransform = n, t.style.transform = n);
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
var An = k(function(e, t) {
|
|
313
|
+
var n = e.children, r = e.direction, i = r === void 0 ? "down" : r, a = e.in, o = e.style, s = e.timeout, c = s === void 0 ? 0 : s, l = e.onEnter, u = e.onEntered, d = e.onExit, f = e.onExited, p = an(e, [
|
|
314
|
+
"children",
|
|
315
|
+
"direction",
|
|
316
|
+
"in",
|
|
317
|
+
"style",
|
|
318
|
+
"timeout",
|
|
319
|
+
"onEnter",
|
|
320
|
+
"onEntered",
|
|
321
|
+
"onExit",
|
|
322
|
+
"onExited"
|
|
323
|
+
]), m = P(null), h = bn(bn(n.ref, m), t), g = j(function() {
|
|
324
|
+
m.current && kn(i, m.current);
|
|
325
|
+
}, [i]);
|
|
326
|
+
return M(function() {
|
|
327
|
+
if (!a && i !== "down" && i !== "right") {
|
|
328
|
+
var e = function(e, t) {
|
|
329
|
+
var n;
|
|
330
|
+
function r() {
|
|
331
|
+
for (var r = this, i = arguments.length, a = Array(i), o = 0; o < i; o++) a[o] = arguments[o];
|
|
332
|
+
clearTimeout(n), n = setTimeout(function() {
|
|
333
|
+
e.apply(r, a);
|
|
334
|
+
}, t);
|
|
335
|
+
}
|
|
336
|
+
return t === void 0 && (t = 166), r.clear = function() {
|
|
337
|
+
clearTimeout(n);
|
|
338
|
+
}, r;
|
|
339
|
+
}(function() {
|
|
340
|
+
m.current && kn(i, m.current);
|
|
341
|
+
}), t = On(m.current);
|
|
342
|
+
return t.addEventListener("resize", e), function() {
|
|
343
|
+
e.clear(), t.removeEventListener("resize", e);
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
}, [i, a]), M(function() {
|
|
347
|
+
a || g();
|
|
348
|
+
}, [a, g]), Xe(_n, Object.assign({
|
|
349
|
+
appear: !0,
|
|
350
|
+
nodeRef: m,
|
|
351
|
+
onEnter: function(e, t) {
|
|
352
|
+
kn(i, e), Tn(e), l && l(e, t);
|
|
353
|
+
},
|
|
354
|
+
onEntered: u,
|
|
355
|
+
onEntering: function(e) {
|
|
356
|
+
var t = o?.transitionTimingFunction || Cn, n = xn({
|
|
357
|
+
timeout: c,
|
|
358
|
+
mode: "enter",
|
|
359
|
+
style: X({}, o, { transitionTimingFunction: t })
|
|
360
|
+
});
|
|
361
|
+
e.style.webkitTransition = Dn("-webkit-transform", n), e.style.transition = Dn("transform", n), e.style.webkitTransform = "none", e.style.transform = "none";
|
|
362
|
+
},
|
|
363
|
+
onExit: function(e) {
|
|
364
|
+
var t = o?.transitionTimingFunction || wn, n = xn({
|
|
365
|
+
timeout: c,
|
|
366
|
+
mode: "exit",
|
|
367
|
+
style: X({}, o, { transitionTimingFunction: t })
|
|
368
|
+
});
|
|
369
|
+
e.style.webkitTransition = Dn("-webkit-transform", n), e.style.transition = Dn("transform", n), kn(i, e), d && d(e);
|
|
370
|
+
},
|
|
371
|
+
onExited: function(e) {
|
|
372
|
+
e.style.webkitTransition = "", e.style.transition = "", f && f(e);
|
|
373
|
+
},
|
|
374
|
+
in: a,
|
|
375
|
+
timeout: c
|
|
376
|
+
}, p), function(e, t) {
|
|
377
|
+
return Ye(n, X({
|
|
378
|
+
ref: h,
|
|
379
|
+
style: X({ visibility: e !== "exited" || a ? void 0 : "hidden" }, o, {}, n.props.style)
|
|
380
|
+
}, t));
|
|
381
|
+
});
|
|
382
|
+
});
|
|
383
|
+
An.displayName = "Slide";
|
|
384
|
+
var jn = function(e) {
|
|
385
|
+
return O.createElement("svg", Object.assign({
|
|
386
|
+
viewBox: "0 0 24 24",
|
|
387
|
+
focusable: "false",
|
|
388
|
+
style: {
|
|
389
|
+
fontSize: 20,
|
|
390
|
+
marginInlineEnd: 8,
|
|
391
|
+
userSelect: "none",
|
|
392
|
+
width: "1em",
|
|
393
|
+
height: "1em",
|
|
394
|
+
display: "inline-block",
|
|
395
|
+
fill: "currentColor",
|
|
396
|
+
flexShrink: 0
|
|
397
|
+
}
|
|
398
|
+
}, e));
|
|
399
|
+
}, Mn = {
|
|
400
|
+
maxSnack: 3,
|
|
401
|
+
persist: !1,
|
|
402
|
+
hideIconVariant: !1,
|
|
403
|
+
disableWindowBlurListener: !1,
|
|
404
|
+
variant: "default",
|
|
405
|
+
autoHideDuration: 5e3,
|
|
406
|
+
iconVariant: {
|
|
407
|
+
default: void 0,
|
|
408
|
+
success: O.createElement(function() {
|
|
409
|
+
return O.createElement(jn, null, O.createElement("path", { d: "M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41\n 10.59L10 14.17L17.59 6.58L19 8L10 17Z" }));
|
|
410
|
+
}, null),
|
|
411
|
+
warning: O.createElement(function() {
|
|
412
|
+
return O.createElement(jn, null, O.createElement("path", { d: "M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z" }));
|
|
413
|
+
}, null),
|
|
414
|
+
error: O.createElement(function() {
|
|
415
|
+
return O.createElement(jn, null, O.createElement("path", { d: "M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,\n 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,\n 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z" }));
|
|
416
|
+
}, null),
|
|
417
|
+
info: O.createElement(function() {
|
|
418
|
+
return O.createElement(jn, null, O.createElement("path", { d: "M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,\n 0 22,12A10,10 0 0,0 12,2Z" }));
|
|
419
|
+
}, null)
|
|
420
|
+
},
|
|
421
|
+
anchorOrigin: {
|
|
422
|
+
vertical: "bottom",
|
|
423
|
+
horizontal: "left"
|
|
424
|
+
},
|
|
425
|
+
TransitionComponent: An,
|
|
426
|
+
transitionDuration: {
|
|
427
|
+
enter: 225,
|
|
428
|
+
exit: 195
|
|
429
|
+
}
|
|
430
|
+
}, Nn = function(e, t) {
|
|
431
|
+
return function(n, r) {
|
|
432
|
+
return r === void 0 && (r = !1), r ? X({}, Mn[n], {}, t[n], {}, e[n]) : n === "autoHideDuration" ? (i = e.autoHideDuration, a = t.autoHideDuration, (o = function(e) {
|
|
433
|
+
return typeof e == "number" || e === null;
|
|
434
|
+
})(i) ? i : o(a) ? a : Mn.autoHideDuration) : n === "transitionDuration" ? function(e, t) {
|
|
435
|
+
var n = function(e, t) {
|
|
436
|
+
return t.some(function(t) {
|
|
437
|
+
return typeof e === t;
|
|
438
|
+
});
|
|
439
|
+
};
|
|
440
|
+
return n(e, ["string", "number"]) ? e : n(e, ["object"]) ? X({}, Mn.transitionDuration, {}, n(t, ["object"]) && t, {}, e) : n(t, ["string", "number"]) ? t : n(t, ["object"]) ? X({}, Mn.transitionDuration, {}, t) : Mn.transitionDuration;
|
|
441
|
+
}(e.transitionDuration, t.transitionDuration) : e[n] || t[n] || Mn[n];
|
|
442
|
+
var i, a, o;
|
|
443
|
+
};
|
|
444
|
+
};
|
|
445
|
+
function Pn(e) {
|
|
446
|
+
return Object.entries(e).reduce(function(e, t) {
|
|
447
|
+
var n, r = t[0], i = t[1];
|
|
448
|
+
return X({}, e, ((n = {})[r] = en(i), n));
|
|
449
|
+
}, {});
|
|
450
|
+
}
|
|
451
|
+
var Fn = "notistack-SnackbarContainer", In = "notistack-Snackbar", Ln = "notistack-CollapseWrapper", Rn = "notistack-MuiContent", zn = function(e) {
|
|
452
|
+
return "notistack-MuiContent-" + e;
|
|
453
|
+
}, Bn = Pn({
|
|
454
|
+
root: { height: 0 },
|
|
455
|
+
entered: { height: "auto" }
|
|
456
|
+
}), Vn = "0px", Hn = k(function(e, t) {
|
|
457
|
+
var n = e.children, r = e.in, i = e.onExited, a = P(null), o = P(null), s = bn(t, o), c = function() {
|
|
458
|
+
return a.current ? a.current.clientHeight : 0;
|
|
459
|
+
};
|
|
460
|
+
return Xe(_n, {
|
|
461
|
+
in: r,
|
|
462
|
+
unmountOnExit: !0,
|
|
463
|
+
onEnter: function(e) {
|
|
464
|
+
e.style.height = Vn;
|
|
465
|
+
},
|
|
466
|
+
onEntered: function(e) {
|
|
467
|
+
e.style.height = "auto";
|
|
468
|
+
},
|
|
469
|
+
onEntering: function(e) {
|
|
470
|
+
var t = c(), n = xn({
|
|
471
|
+
timeout: 175,
|
|
472
|
+
mode: "enter"
|
|
473
|
+
}), r = n.duration, i = n.easing;
|
|
474
|
+
e.style.transitionDuration = typeof r == "string" ? r : r + "ms", e.style.height = t + "px", e.style.transitionTimingFunction = i || "";
|
|
475
|
+
},
|
|
476
|
+
onExit: function(e) {
|
|
477
|
+
e.style.height = c() + "px";
|
|
478
|
+
},
|
|
479
|
+
onExited: i,
|
|
480
|
+
onExiting: function(e) {
|
|
481
|
+
Tn(e);
|
|
482
|
+
var t = xn({
|
|
483
|
+
timeout: 175,
|
|
484
|
+
mode: "exit"
|
|
485
|
+
}), n = t.duration, r = t.easing;
|
|
486
|
+
e.style.transitionDuration = typeof n == "string" ? n : n + "ms", e.style.height = Vn, e.style.transitionTimingFunction = r || "";
|
|
487
|
+
},
|
|
488
|
+
nodeRef: o,
|
|
489
|
+
timeout: 175
|
|
490
|
+
}, function(e, t) {
|
|
491
|
+
return Xe("div", Object.assign({
|
|
492
|
+
ref: s,
|
|
493
|
+
className: Kt(Bn.root, e === "entered" && Bn.entered),
|
|
494
|
+
style: X({
|
|
495
|
+
pointerEvents: "all",
|
|
496
|
+
overflow: "hidden",
|
|
497
|
+
minHeight: Vn,
|
|
498
|
+
transition: Dn("height")
|
|
499
|
+
}, e === "entered" && { overflow: "visible" }, {}, e === "exited" && !r && { visibility: "hidden" })
|
|
500
|
+
}, t), Xe("div", {
|
|
501
|
+
ref: a,
|
|
502
|
+
className: Ln,
|
|
503
|
+
style: {
|
|
504
|
+
display: "flex",
|
|
505
|
+
width: "100%"
|
|
506
|
+
}
|
|
507
|
+
}, n));
|
|
508
|
+
});
|
|
509
|
+
});
|
|
510
|
+
Hn.displayName = "Collapse";
|
|
511
|
+
var Un = {
|
|
512
|
+
right: "left",
|
|
513
|
+
left: "right",
|
|
514
|
+
bottom: "up",
|
|
515
|
+
top: "down"
|
|
516
|
+
}, Wn = function(e) {
|
|
517
|
+
return "anchorOrigin" + dn(e);
|
|
518
|
+
}, Gn = function() {};
|
|
519
|
+
function Kn(e, t) {
|
|
520
|
+
return e.reduce(function(e, n) {
|
|
521
|
+
return n == null ? e : function() {
|
|
522
|
+
var r = [...arguments], i = [].concat(r);
|
|
523
|
+
t && i.indexOf(t) === -1 && i.push(t), e.apply(this, i), n.apply(this, i);
|
|
524
|
+
};
|
|
525
|
+
}, Gn);
|
|
526
|
+
}
|
|
527
|
+
var qn = typeof window < "u" ? $e : M;
|
|
528
|
+
function Jn(e) {
|
|
529
|
+
var t = P(e);
|
|
530
|
+
return qn(function() {
|
|
531
|
+
t.current = e;
|
|
532
|
+
}), j(function() {
|
|
533
|
+
return t.current.apply(void 0, arguments);
|
|
534
|
+
}, []);
|
|
535
|
+
}
|
|
536
|
+
var Yn, Xn = k(function(e, t) {
|
|
537
|
+
var n = e.children, r = e.className, i = e.autoHideDuration, a = e.disableWindowBlurListener, o = a !== void 0 && a, s = e.onClose, c = e.id, l = e.open, u = e.SnackbarProps, d = u === void 0 ? {} : u, f = P(), p = Jn(function() {
|
|
538
|
+
s && s.apply(void 0, arguments);
|
|
539
|
+
}), m = Jn(function(e) {
|
|
540
|
+
s && e != null && (f.current && clearTimeout(f.current), f.current = setTimeout(function() {
|
|
541
|
+
p(null, "timeout", c);
|
|
542
|
+
}, e));
|
|
543
|
+
});
|
|
544
|
+
M(function() {
|
|
545
|
+
return l && m(i), function() {
|
|
546
|
+
f.current && clearTimeout(f.current);
|
|
547
|
+
};
|
|
548
|
+
}, [
|
|
549
|
+
l,
|
|
550
|
+
i,
|
|
551
|
+
m
|
|
552
|
+
]);
|
|
553
|
+
var h = function() {
|
|
554
|
+
f.current && clearTimeout(f.current);
|
|
555
|
+
}, g = j(function() {
|
|
556
|
+
i != null && m(.5 * i);
|
|
557
|
+
}, [i, m]);
|
|
558
|
+
return M(function() {
|
|
559
|
+
if (!o && l) return window.addEventListener("focus", g), window.addEventListener("blur", h), function() {
|
|
560
|
+
window.removeEventListener("focus", g), window.removeEventListener("blur", h);
|
|
561
|
+
};
|
|
562
|
+
}, [
|
|
563
|
+
o,
|
|
564
|
+
g,
|
|
565
|
+
l
|
|
566
|
+
]), Xe("div", Object.assign({ ref: t }, d, {
|
|
567
|
+
className: Kt(In, r),
|
|
568
|
+
onMouseEnter: function(e) {
|
|
569
|
+
d.onMouseEnter && d.onMouseEnter(e), h();
|
|
570
|
+
},
|
|
571
|
+
onMouseLeave: function(e) {
|
|
572
|
+
d.onMouseLeave && d.onMouseLeave(e), g();
|
|
573
|
+
}
|
|
574
|
+
}), n);
|
|
575
|
+
});
|
|
576
|
+
Xn.displayName = "Snackbar";
|
|
577
|
+
var Zn = Pn({ root: (Yn = {
|
|
578
|
+
display: "flex",
|
|
579
|
+
flexWrap: "wrap",
|
|
580
|
+
flexGrow: 1
|
|
581
|
+
}, Yn[Z] = {
|
|
582
|
+
flexGrow: "initial",
|
|
583
|
+
minWidth: "288px"
|
|
584
|
+
}, Yn) }), Qn = k(function(e, t) {
|
|
585
|
+
var n = e.className, r = an(e, ["className"]);
|
|
586
|
+
return O.createElement("div", Object.assign({
|
|
587
|
+
ref: t,
|
|
588
|
+
className: Kt(Zn.root, n)
|
|
589
|
+
}, r));
|
|
590
|
+
});
|
|
591
|
+
Qn.displayName = "SnackbarContent";
|
|
592
|
+
var $n = Pn({
|
|
593
|
+
root: {
|
|
594
|
+
backgroundColor: "#313131",
|
|
595
|
+
fontSize: "0.875rem",
|
|
596
|
+
lineHeight: 1.43,
|
|
597
|
+
letterSpacing: "0.01071em",
|
|
598
|
+
color: "#fff",
|
|
599
|
+
alignItems: "center",
|
|
600
|
+
padding: "6px 16px",
|
|
601
|
+
borderRadius: "4px",
|
|
602
|
+
boxShadow: "0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"
|
|
603
|
+
},
|
|
604
|
+
lessPadding: { paddingLeft: "20px" },
|
|
605
|
+
default: { backgroundColor: "#313131" },
|
|
606
|
+
success: { backgroundColor: "#43a047" },
|
|
607
|
+
error: { backgroundColor: "#d32f2f" },
|
|
608
|
+
warning: { backgroundColor: "#ff9800" },
|
|
609
|
+
info: { backgroundColor: "#2196f3" },
|
|
610
|
+
message: {
|
|
611
|
+
display: "flex",
|
|
612
|
+
alignItems: "center",
|
|
613
|
+
padding: "8px 0"
|
|
614
|
+
},
|
|
615
|
+
action: {
|
|
616
|
+
display: "flex",
|
|
617
|
+
alignItems: "center",
|
|
618
|
+
marginLeft: "auto",
|
|
619
|
+
paddingLeft: "16px",
|
|
620
|
+
marginRight: "-8px"
|
|
621
|
+
}
|
|
622
|
+
}), er = "notistack-snackbar", tr = k(function(e, t) {
|
|
623
|
+
var n = e.id, r = e.message, i = e.action, a = e.iconVariant, o = e.variant, s = e.hideIconVariant, c = e.style, l = e.className, u = a[o], d = i;
|
|
624
|
+
return typeof d == "function" && (d = d(n)), O.createElement(Qn, {
|
|
625
|
+
ref: t,
|
|
626
|
+
role: "alert",
|
|
627
|
+
"aria-describedby": er,
|
|
628
|
+
style: c,
|
|
629
|
+
className: Kt(Rn, zn(o), $n.root, $n[o], l, !s && u && $n.lessPadding)
|
|
630
|
+
}, O.createElement("div", {
|
|
631
|
+
id: er,
|
|
632
|
+
className: $n.message
|
|
633
|
+
}, s ? null : u, r), d && O.createElement("div", { className: $n.action }, d));
|
|
634
|
+
});
|
|
635
|
+
tr.displayName = "MaterialDesignContent";
|
|
636
|
+
var nr, rr, ir, ar, or, sr = A(tr), cr = Pn({ wrappedRoot: {
|
|
637
|
+
width: "100%",
|
|
638
|
+
position: "relative",
|
|
639
|
+
transform: "translateX(0)",
|
|
640
|
+
top: 0,
|
|
641
|
+
right: 0,
|
|
642
|
+
bottom: 0,
|
|
643
|
+
left: 0,
|
|
644
|
+
minWidth: "288px"
|
|
645
|
+
} }), lr = function(e) {
|
|
646
|
+
var t = P(), n = F(!0), r = n[0], i = n[1], a = Kn([e.snack.onClose, e.onClose]), o = j(function() {
|
|
647
|
+
t.current = setTimeout(function() {
|
|
648
|
+
i(function(e) {
|
|
649
|
+
return !e;
|
|
650
|
+
});
|
|
651
|
+
}, 125);
|
|
652
|
+
}, []);
|
|
653
|
+
M(function() {
|
|
654
|
+
return function() {
|
|
655
|
+
t.current && clearTimeout(t.current);
|
|
656
|
+
};
|
|
657
|
+
}, []);
|
|
658
|
+
var s, c = e.snack, l = e.classes, u = e.Component, d = u === void 0 ? sr : u, f = N(function() {
|
|
659
|
+
return function(e) {
|
|
660
|
+
e === void 0 && (e = {});
|
|
661
|
+
var t = {
|
|
662
|
+
containerRoot: !0,
|
|
663
|
+
containerAnchorOriginTopCenter: !0,
|
|
664
|
+
containerAnchorOriginBottomCenter: !0,
|
|
665
|
+
containerAnchorOriginTopRight: !0,
|
|
666
|
+
containerAnchorOriginBottomRight: !0,
|
|
667
|
+
containerAnchorOriginTopLeft: !0,
|
|
668
|
+
containerAnchorOriginBottomLeft: !0
|
|
669
|
+
};
|
|
670
|
+
return Object.keys(e).filter(function(e) {
|
|
671
|
+
return !t[e];
|
|
672
|
+
}).reduce(function(t, n) {
|
|
673
|
+
var r;
|
|
674
|
+
return X({}, t, ((r = {})[n] = e[n], r));
|
|
675
|
+
}, {});
|
|
676
|
+
}(l);
|
|
677
|
+
}, [l]), p = c.open, m = c.SnackbarProps, h = c.TransitionComponent, g = c.TransitionProps, _ = c.transitionDuration, ee = c.disableWindowBlurListener, v = c.content, y = an(c, [
|
|
678
|
+
"open",
|
|
679
|
+
"SnackbarProps",
|
|
680
|
+
"TransitionComponent",
|
|
681
|
+
"TransitionProps",
|
|
682
|
+
"transitionDuration",
|
|
683
|
+
"disableWindowBlurListener",
|
|
684
|
+
"content",
|
|
685
|
+
"entered",
|
|
686
|
+
"requestClose",
|
|
687
|
+
"onEnter",
|
|
688
|
+
"onEntered",
|
|
689
|
+
"onExit",
|
|
690
|
+
"onExited"
|
|
691
|
+
]), te = X({
|
|
692
|
+
direction: (s = y.anchorOrigin, s.horizontal === "center" ? Un[s.vertical] : Un[s.horizontal]),
|
|
693
|
+
timeout: _
|
|
694
|
+
}, g), b = v;
|
|
695
|
+
typeof b == "function" && (b = b(y.id, y.message));
|
|
696
|
+
var x = [
|
|
697
|
+
"onEnter",
|
|
698
|
+
"onEntered",
|
|
699
|
+
"onExit",
|
|
700
|
+
"onExited"
|
|
701
|
+
].reduce(function(t, n) {
|
|
702
|
+
var r;
|
|
703
|
+
return X({}, t, ((r = {})[n] = Kn([e.snack[n], e[n]], y.id), r));
|
|
704
|
+
}, {});
|
|
705
|
+
return O.createElement(Hn, {
|
|
706
|
+
in: r,
|
|
707
|
+
onExited: x.onExited
|
|
708
|
+
}, O.createElement(Xn, {
|
|
709
|
+
open: p,
|
|
710
|
+
id: y.id,
|
|
711
|
+
disableWindowBlurListener: ee,
|
|
712
|
+
autoHideDuration: y.autoHideDuration,
|
|
713
|
+
className: Kt(cr.wrappedRoot, f.root, f[Wn(y.anchorOrigin)]),
|
|
714
|
+
SnackbarProps: m,
|
|
715
|
+
onClose: a
|
|
716
|
+
}, O.createElement(h, Object.assign({}, te, {
|
|
717
|
+
appear: !0,
|
|
718
|
+
in: p,
|
|
719
|
+
onExit: x.onExit,
|
|
720
|
+
onExited: o,
|
|
721
|
+
onEnter: x.onEnter,
|
|
722
|
+
onEntered: Kn([x.onEntered, function() {
|
|
723
|
+
e.snack.requestClose && a(null, "instructed", e.snack.id);
|
|
724
|
+
}], y.id)
|
|
725
|
+
}), b || O.createElement(d, Object.assign({}, y)))));
|
|
726
|
+
}, ur = {
|
|
727
|
+
default: 20,
|
|
728
|
+
dense: 4
|
|
729
|
+
}, dr = {
|
|
730
|
+
default: 6,
|
|
731
|
+
dense: 2
|
|
732
|
+
}, fr = "." + Ln, pr = Pn({
|
|
733
|
+
root: (nr = {
|
|
734
|
+
boxSizing: "border-box",
|
|
735
|
+
display: "flex",
|
|
736
|
+
maxHeight: "100%",
|
|
737
|
+
position: "fixed",
|
|
738
|
+
zIndex: 1400,
|
|
739
|
+
height: "auto",
|
|
740
|
+
width: "auto",
|
|
741
|
+
transition: Dn([
|
|
742
|
+
"top",
|
|
743
|
+
"right",
|
|
744
|
+
"bottom",
|
|
745
|
+
"left",
|
|
746
|
+
"max-width"
|
|
747
|
+
], {
|
|
748
|
+
duration: 300,
|
|
749
|
+
easing: "ease"
|
|
750
|
+
}),
|
|
751
|
+
pointerEvents: "none"
|
|
752
|
+
}, nr[fr] = {
|
|
753
|
+
padding: dr.default + "px 0px",
|
|
754
|
+
transition: "padding 300ms ease 0ms"
|
|
755
|
+
}, nr.maxWidth = "calc(100% - " + 2 * ur.default + "px)", nr[ln] = {
|
|
756
|
+
width: "100%",
|
|
757
|
+
maxWidth: "calc(100% - 32px)"
|
|
758
|
+
}, nr),
|
|
759
|
+
rootDense: (rr = {}, rr[fr] = { padding: dr.dense + "px 0px" }, rr),
|
|
760
|
+
top: {
|
|
761
|
+
top: ur.default - dr.default + "px",
|
|
762
|
+
flexDirection: "column"
|
|
763
|
+
},
|
|
764
|
+
bottom: {
|
|
765
|
+
bottom: ur.default - dr.default + "px",
|
|
766
|
+
flexDirection: "column-reverse"
|
|
767
|
+
},
|
|
768
|
+
left: (ir = { left: ur.default + "px" }, ir[Z] = { alignItems: "flex-start" }, ir[ln] = { left: "16px" }, ir),
|
|
769
|
+
right: (ar = { right: ur.default + "px" }, ar[Z] = { alignItems: "flex-end" }, ar[ln] = { right: "16px" }, ar),
|
|
770
|
+
center: (or = {
|
|
771
|
+
left: "50%",
|
|
772
|
+
transform: "translateX(-50%)"
|
|
773
|
+
}, or[Z] = { alignItems: "center" }, or)
|
|
774
|
+
}), mr = A(function(e) {
|
|
775
|
+
var t = e.classes, n = t === void 0 ? {} : t, r = e.anchorOrigin, i = e.dense, a = e.children, o = Kt(Fn, pr[r.vertical], pr[r.horizontal], pr.root, n.containerRoot, n["containerAnchorOrigin" + dn(r)], i && pr.rootDense);
|
|
776
|
+
return O.createElement("div", { className: o }, a);
|
|
777
|
+
}), hr = function(e) {
|
|
778
|
+
return !(typeof e == "string" || Ze(e));
|
|
779
|
+
}, gr = function(e) {
|
|
780
|
+
function t(t) {
|
|
781
|
+
var n = e.call(this, t) || this;
|
|
782
|
+
return n.enqueueSnackbar = function(e, t) {
|
|
783
|
+
if (t === void 0 && (t = {}), e == null) throw Error("enqueueSnackbar called with invalid argument");
|
|
784
|
+
var r = hr(e) ? e : t, i = hr(e) ? e.message : e, a = r.key, o = r.preventDuplicate, s = an(r, ["key", "preventDuplicate"]), c = fn(a), l = c ? a : (/* @__PURE__ */ new Date()).getTime() + Math.random(), u = Nn(s, n.props), d = X({ id: l }, s, {
|
|
785
|
+
message: i,
|
|
786
|
+
open: !0,
|
|
787
|
+
entered: !1,
|
|
788
|
+
requestClose: !1,
|
|
789
|
+
persist: u("persist"),
|
|
790
|
+
action: u("action"),
|
|
791
|
+
content: u("content"),
|
|
792
|
+
variant: u("variant"),
|
|
793
|
+
anchorOrigin: u("anchorOrigin"),
|
|
794
|
+
disableWindowBlurListener: u("disableWindowBlurListener"),
|
|
795
|
+
autoHideDuration: u("autoHideDuration"),
|
|
796
|
+
hideIconVariant: u("hideIconVariant"),
|
|
797
|
+
TransitionComponent: u("TransitionComponent"),
|
|
798
|
+
transitionDuration: u("transitionDuration"),
|
|
799
|
+
TransitionProps: u("TransitionProps", !0),
|
|
800
|
+
iconVariant: u("iconVariant", !0),
|
|
801
|
+
style: u("style", !0),
|
|
802
|
+
SnackbarProps: u("SnackbarProps", !0),
|
|
803
|
+
className: Kt(n.props.className, s.className)
|
|
804
|
+
});
|
|
805
|
+
return d.persist && (d.autoHideDuration = void 0), n.setState(function(e) {
|
|
806
|
+
if (o === void 0 && n.props.preventDuplicate || o) {
|
|
807
|
+
var t = function(e) {
|
|
808
|
+
return c ? e.id === l : e.message === i;
|
|
809
|
+
}, r = e.queue.findIndex(t) > -1, a = e.snacks.findIndex(t) > -1;
|
|
810
|
+
if (r || a) return e;
|
|
811
|
+
}
|
|
812
|
+
return n.handleDisplaySnack(X({}, e, { queue: [].concat(e.queue, [d]) }));
|
|
813
|
+
}), l;
|
|
814
|
+
}, n.handleDisplaySnack = function(e) {
|
|
815
|
+
return e.snacks.length >= n.maxSnack ? n.handleDismissOldest(e) : n.processQueue(e);
|
|
816
|
+
}, n.processQueue = function(e) {
|
|
817
|
+
var t = e.queue, n = e.snacks;
|
|
818
|
+
return t.length > 0 ? X({}, e, {
|
|
819
|
+
snacks: [].concat(n, [t[0]]),
|
|
820
|
+
queue: t.slice(1, t.length)
|
|
821
|
+
}) : e;
|
|
822
|
+
}, n.handleDismissOldest = function(e) {
|
|
823
|
+
if (e.snacks.some(function(e) {
|
|
824
|
+
return !e.open || e.requestClose;
|
|
825
|
+
})) return e;
|
|
826
|
+
var t = !1, r = !1;
|
|
827
|
+
e.snacks.reduce(function(e, t) {
|
|
828
|
+
return e + (t.open && t.persist ? 1 : 0);
|
|
829
|
+
}, 0) === n.maxSnack && (r = !0);
|
|
830
|
+
var i = e.snacks.map(function(e) {
|
|
831
|
+
return t || e.persist && !r ? X({}, e) : (t = !0, e.entered ? (e.onClose && e.onClose(null, "maxsnack", e.id), n.props.onClose && n.props.onClose(null, "maxsnack", e.id), X({}, e, { open: !1 })) : X({}, e, { requestClose: !0 }));
|
|
832
|
+
});
|
|
833
|
+
return X({}, e, { snacks: i });
|
|
834
|
+
}, n.handleEnteredSnack = function(e, t, r) {
|
|
835
|
+
if (!fn(r)) throw Error("handleEnteredSnack Cannot be called with undefined key");
|
|
836
|
+
n.setState(function(e) {
|
|
837
|
+
return { snacks: e.snacks.map(function(e) {
|
|
838
|
+
return e.id === r ? X({}, e, { entered: !0 }) : X({}, e);
|
|
839
|
+
}) };
|
|
840
|
+
});
|
|
841
|
+
}, n.handleCloseSnack = function(e, t, r) {
|
|
842
|
+
n.props.onClose && n.props.onClose(e, t, r);
|
|
843
|
+
var i = r === void 0;
|
|
844
|
+
n.setState(function(e) {
|
|
845
|
+
var t = e.snacks, n = e.queue;
|
|
846
|
+
return {
|
|
847
|
+
snacks: t.map(function(e) {
|
|
848
|
+
return i || e.id === r ? e.entered ? X({}, e, { open: !1 }) : X({}, e, { requestClose: !0 }) : X({}, e);
|
|
849
|
+
}),
|
|
850
|
+
queue: n.filter(function(e) {
|
|
851
|
+
return e.id !== r;
|
|
852
|
+
})
|
|
853
|
+
};
|
|
854
|
+
});
|
|
855
|
+
}, n.closeSnackbar = function(e) {
|
|
856
|
+
var t = n.state.snacks.find(function(t) {
|
|
857
|
+
return t.id === e;
|
|
858
|
+
});
|
|
859
|
+
fn(e) && t && t.onClose && t.onClose(null, "instructed", e), n.handleCloseSnack(null, "instructed", e);
|
|
860
|
+
}, n.handleExitedSnack = function(e, t) {
|
|
861
|
+
if (!fn(t)) throw Error("handleExitedSnack Cannot be called with undefined key");
|
|
862
|
+
n.setState(function(e) {
|
|
863
|
+
var r = n.processQueue(X({}, e, { snacks: e.snacks.filter(function(e) {
|
|
864
|
+
return e.id !== t;
|
|
865
|
+
}) }));
|
|
866
|
+
return r.queue.length === 0 ? r : n.handleDismissOldest(r);
|
|
867
|
+
});
|
|
868
|
+
}, n.enqueueSnackbar, n.closeSnackbar, n.state = {
|
|
869
|
+
snacks: [],
|
|
870
|
+
queue: [],
|
|
871
|
+
contextValue: {
|
|
872
|
+
enqueueSnackbar: n.enqueueSnackbar.bind(on(n)),
|
|
873
|
+
closeSnackbar: n.closeSnackbar.bind(on(n))
|
|
874
|
+
}
|
|
875
|
+
}, n;
|
|
876
|
+
}
|
|
877
|
+
return rn(t, e), t.prototype.render = function() {
|
|
878
|
+
var e = this, t = this.state.contextValue, n = this.props, r = n.domRoot, i = n.children, a = n.dense, o = a !== void 0 && a, s = n.Components, c = s === void 0 ? {} : s, l = n.classes, u = this.state.snacks.reduce(function(e, t) {
|
|
879
|
+
var n, r = dn(t.anchorOrigin), i = e[r] || [];
|
|
880
|
+
return X({}, e, ((n = {})[r] = [].concat(i, [t]), n));
|
|
881
|
+
}, {}), d = Object.keys(u).map(function(t) {
|
|
882
|
+
var n = u[t], r = n[0];
|
|
883
|
+
return O.createElement(mr, {
|
|
884
|
+
key: t,
|
|
885
|
+
dense: o,
|
|
886
|
+
anchorOrigin: r.anchorOrigin,
|
|
887
|
+
classes: l
|
|
888
|
+
}, n.map(function(t) {
|
|
889
|
+
return O.createElement(lr, {
|
|
890
|
+
key: t.id,
|
|
891
|
+
snack: t,
|
|
892
|
+
classes: l,
|
|
893
|
+
Component: c[t.variant],
|
|
894
|
+
onClose: e.handleCloseSnack,
|
|
895
|
+
onEnter: e.props.onEnter,
|
|
896
|
+
onExit: e.props.onExit,
|
|
897
|
+
onExited: Kn([e.handleExitedSnack, e.props.onExited], t.id),
|
|
898
|
+
onEntered: Kn([e.handleEnteredSnack, e.props.onEntered], t.id)
|
|
899
|
+
});
|
|
900
|
+
}));
|
|
901
|
+
});
|
|
902
|
+
return O.createElement(cn.Provider, { value: t }, i, r ? Lt(d, r) : d);
|
|
903
|
+
}, nn(t, [{
|
|
904
|
+
key: "maxSnack",
|
|
905
|
+
get: function() {
|
|
906
|
+
return this.props.maxSnack || Mn.maxSnack;
|
|
907
|
+
}
|
|
908
|
+
}]), t;
|
|
909
|
+
}(qe), _r = function() {
|
|
910
|
+
return Qe(cn);
|
|
911
|
+
}, $ = {
|
|
912
|
+
card: "_card_h0jnt_7",
|
|
913
|
+
actionRoot: "_actionRoot_h0jnt_11",
|
|
914
|
+
icons: "_icons_h0jnt_16",
|
|
915
|
+
expand: "_expand_h0jnt_22",
|
|
916
|
+
expandOpen: "_expandOpen_h0jnt_29",
|
|
917
|
+
stackTraceContainer: "_stackTraceContainer_h0jnt_33",
|
|
918
|
+
paper: "_paper_h0jnt_37",
|
|
919
|
+
checkIcon: "_checkIcon_h0jnt_42",
|
|
920
|
+
button: "_button_h0jnt_47"
|
|
921
|
+
}, vr = A(k((e, t) => {
|
|
922
|
+
let { id: n, message: r, iconVariant: i, error: a, hideIconVariant: o, ...s } = e, c = Ke(), { closeSnackbar: l } = _r(), [u, d] = F(!1), f = a ? Nt.collectErrorChain(a, !0)?.[0]?.error : void 0, p = f && !(f instanceof Pt), m = j(() => {
|
|
923
|
+
d((e) => !e);
|
|
924
|
+
}, []), h = j(() => {
|
|
925
|
+
l(n);
|
|
926
|
+
}, [n, l]), g = f?.message;
|
|
927
|
+
return !g && Ze(r) && (g = r), g || typeof r != "string" || (g = r), g ||= `Unknown Error: ${r}`, L(Qn, {
|
|
928
|
+
ref: t,
|
|
929
|
+
className: b($.root, "error-snackbar"),
|
|
930
|
+
children: R(bt, {
|
|
931
|
+
className: $.card,
|
|
932
|
+
style: {
|
|
933
|
+
backgroundColor: "var(--sxl-color-error)",
|
|
934
|
+
color: "var(--sxl-color-error-content)",
|
|
935
|
+
border: "1px solid var(--sxl-color-error)"
|
|
936
|
+
},
|
|
937
|
+
children: [R(xt, {
|
|
938
|
+
className: $.actionRoot,
|
|
939
|
+
children: [
|
|
940
|
+
o ? null : i?.error,
|
|
941
|
+
L(W, {
|
|
942
|
+
variant: "body2",
|
|
943
|
+
component: "div",
|
|
944
|
+
className: $.typography,
|
|
945
|
+
children: g
|
|
946
|
+
}),
|
|
947
|
+
L("div", { style: { flex: "1 1 auto" } }),
|
|
948
|
+
R("div", {
|
|
949
|
+
className: $.icons,
|
|
950
|
+
children: [p ? L(V, {
|
|
951
|
+
"aria-label": c("toast.showMore"),
|
|
952
|
+
size: "small",
|
|
953
|
+
className: b($.expand, { [$.expandOpen]: u }),
|
|
954
|
+
onClick: m,
|
|
955
|
+
children: L(De, { iconKey: "ExpandMore" })
|
|
956
|
+
}) : null, L(V, {
|
|
957
|
+
size: "small",
|
|
958
|
+
className: $.expand,
|
|
959
|
+
onClick: h,
|
|
960
|
+
children: L(De, {
|
|
961
|
+
iconKey: "Close",
|
|
962
|
+
style: { transform: "scale(0.8)" }
|
|
963
|
+
})
|
|
964
|
+
})]
|
|
965
|
+
})
|
|
966
|
+
]
|
|
967
|
+
}), p ? L(St, {
|
|
968
|
+
in: u,
|
|
969
|
+
timeout: "auto",
|
|
970
|
+
children: L("div", {
|
|
971
|
+
className: $.stackTraceContainer,
|
|
972
|
+
style: {
|
|
973
|
+
backgroundColor: "color-mix(in srgb, var(--sxl-color-error) 90%, var(--sxl-color-base-100))",
|
|
974
|
+
borderTop: "1px solid var(--sxl-color-error)"
|
|
975
|
+
},
|
|
976
|
+
children: L(ut, {
|
|
977
|
+
error: a,
|
|
978
|
+
hideLineNumbers: !0
|
|
979
|
+
})
|
|
980
|
+
})
|
|
981
|
+
}) : null]
|
|
982
|
+
})
|
|
983
|
+
});
|
|
984
|
+
}));
|
|
985
|
+
vr.displayName = "ToastError";
|
|
986
|
+
var yr = L(() => {
|
|
987
|
+
let e = Ke();
|
|
988
|
+
return L(ot, {
|
|
989
|
+
label: "SheetXL",
|
|
990
|
+
description: e("logo.description"),
|
|
991
|
+
children: L(z, {
|
|
992
|
+
component: "a",
|
|
993
|
+
href: "https://www.sheetxl.com",
|
|
994
|
+
target: "_blank",
|
|
995
|
+
rel: "noopener noreferrer",
|
|
996
|
+
sx: {
|
|
997
|
+
display: "inline-flex",
|
|
998
|
+
width: "24px",
|
|
999
|
+
height: "24px",
|
|
1000
|
+
marginBottom: "4px",
|
|
1001
|
+
marginLeft: "6px",
|
|
1002
|
+
cursor: "pointer"
|
|
1003
|
+
},
|
|
1004
|
+
children: L(ae, { style: {
|
|
1005
|
+
width: "24px",
|
|
1006
|
+
height: "24px"
|
|
1007
|
+
} })
|
|
1008
|
+
})
|
|
1009
|
+
});
|
|
1010
|
+
}, {}), br = A(k((e, t) => {
|
|
1011
|
+
let { workbook: n, className: r, logo: i = yr, mainElement: a, startElement: o, endElement: s, ...c } = e, [l, { width: u }] = He(), d = u < 530, f = P(null), p = x([
|
|
1012
|
+
f,
|
|
1013
|
+
l,
|
|
1014
|
+
t
|
|
1015
|
+
]);
|
|
1016
|
+
return L(z, {
|
|
1017
|
+
...c,
|
|
1018
|
+
ref: p,
|
|
1019
|
+
className: r,
|
|
1020
|
+
children: g({
|
|
1021
|
+
isCompact: d,
|
|
1022
|
+
wrapperSelect: (e) => R(z, {
|
|
1023
|
+
sx: {
|
|
1024
|
+
display: "grid",
|
|
1025
|
+
gridTemplateColumns: "1fr auto 1fr",
|
|
1026
|
+
flex: "1",
|
|
1027
|
+
alignItems: "stretch",
|
|
1028
|
+
gap: (e) => e.spacing(1),
|
|
1029
|
+
paddingLeft: (e) => e.spacing(1),
|
|
1030
|
+
paddingRight: (e) => e.spacing(1)
|
|
1031
|
+
},
|
|
1032
|
+
children: [
|
|
1033
|
+
R(z, {
|
|
1034
|
+
sx: {
|
|
1035
|
+
display: "flex",
|
|
1036
|
+
flexDirection: "row",
|
|
1037
|
+
alignItems: "center",
|
|
1038
|
+
justifyContent: "start",
|
|
1039
|
+
gap: (e) => e.spacing(.5)
|
|
1040
|
+
},
|
|
1041
|
+
children: [i, R(z, {
|
|
1042
|
+
sx: {
|
|
1043
|
+
display: "flex",
|
|
1044
|
+
flexDirection: "row",
|
|
1045
|
+
alignItems: "center",
|
|
1046
|
+
gap: (e) => e.spacing(.25)
|
|
1047
|
+
},
|
|
1048
|
+
children: [o, e]
|
|
1049
|
+
})]
|
|
1050
|
+
}),
|
|
1051
|
+
L(z, {
|
|
1052
|
+
sx: {
|
|
1053
|
+
display: "flex",
|
|
1054
|
+
flexDirection: "row",
|
|
1055
|
+
minWidth: 0,
|
|
1056
|
+
overflow: "hidden",
|
|
1057
|
+
alignItems: "center",
|
|
1058
|
+
justifyContent: "center"
|
|
1059
|
+
},
|
|
1060
|
+
children: a
|
|
1061
|
+
}),
|
|
1062
|
+
L(z, {
|
|
1063
|
+
sx: {
|
|
1064
|
+
display: "flex",
|
|
1065
|
+
alignItems: "center",
|
|
1066
|
+
justifyContent: "end"
|
|
1067
|
+
},
|
|
1068
|
+
children: s
|
|
1069
|
+
})
|
|
1070
|
+
]
|
|
1071
|
+
})
|
|
1072
|
+
})
|
|
1073
|
+
});
|
|
1074
|
+
}));
|
|
1075
|
+
br.displayName = "StudioToolbar";
|
|
1076
|
+
var xr = (e, t) => {
|
|
1077
|
+
let n = new URL(window.location.pathname, window.location.origin);
|
|
1078
|
+
e && n.searchParams.set("source", e), e && t && n.searchParams.set("title", t), window.open(n.toString(), "sheetxl-" + At.uuidV4(), "popup=true");
|
|
1079
|
+
};
|
|
1080
|
+
function Sr(e, t) {
|
|
1081
|
+
let { workbook: n, setWorkbook: r, workbookTitle: i = "export", isDirty: a, notifier: o, refSave: s } = t, c = !1, l = async (e = null, t = null, n = null) => {
|
|
1082
|
+
let r = [], i = {
|
|
1083
|
+
source: e && typeof e != "string" ? e : null,
|
|
1084
|
+
typedCreateWorkbookOptions: t ?? void 0,
|
|
1085
|
+
onPassword: async ({ origin: e, validate: t }) => {
|
|
1086
|
+
let n = await o.showInput({
|
|
1087
|
+
title: q("dialog.password.title"),
|
|
1088
|
+
description: q("dialog.password.open.description", { name: e.getName() ?? "" }),
|
|
1089
|
+
inputType: "password",
|
|
1090
|
+
options: [{
|
|
1091
|
+
id: "Open",
|
|
1092
|
+
label: () => q("dialog.open")
|
|
1093
|
+
}, "Cancel"],
|
|
1094
|
+
defaultOption: "Open",
|
|
1095
|
+
onValidateInput: async (e, n) => n === void 0 ? { valid: !0 } : e ? await t(e) ? { valid: !0 } : {
|
|
1096
|
+
valid: !1,
|
|
1097
|
+
message: q("dialog.password.open.retry")
|
|
1098
|
+
} : {
|
|
1099
|
+
valid: !1,
|
|
1100
|
+
message: q("dialog.password.open.required")
|
|
1101
|
+
}
|
|
1102
|
+
});
|
|
1103
|
+
return n?.option === "Open" ? n.input ?? null : null;
|
|
1104
|
+
},
|
|
1105
|
+
progress: { onWarning: (e) => {
|
|
1106
|
+
r.push(e);
|
|
1107
|
+
} }
|
|
1108
|
+
}, a;
|
|
1109
|
+
n && (i.progress.onStart = n);
|
|
1110
|
+
let s = -5;
|
|
1111
|
+
return T.read({
|
|
1112
|
+
...i,
|
|
1113
|
+
progress: {
|
|
1114
|
+
async onStart(e, t) {
|
|
1115
|
+
await i?.progress?.onStart?.(e, t), a = await o?.showBusy?.(q("workbook.opening", { name: e?.getName() ?? "" })), t && a?.setProgress?.(0, t);
|
|
1116
|
+
},
|
|
1117
|
+
onProgress(e, t) {
|
|
1118
|
+
if (!t) return;
|
|
1119
|
+
let n = Math.min(100, Math.round(e / t * 100));
|
|
1120
|
+
if (n >= 100) {
|
|
1121
|
+
if (s === 100) return;
|
|
1122
|
+
s = 100, a?.setProgress?.(e, t);
|
|
1123
|
+
} else n - s < 5 || (s = n, a?.setProgress?.(e, t));
|
|
1124
|
+
},
|
|
1125
|
+
onComplete() {
|
|
1126
|
+
a?.(), r.length > 0 && (o.showMessage(q("workbook.importWarnings")), console.warn("Import warnings:\n" + r.join("\n")));
|
|
1127
|
+
},
|
|
1128
|
+
onWarning(e, t) {
|
|
1129
|
+
i?.progress?.onWarning?.(e, t);
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
});
|
|
1133
|
+
}, u = async (e, t, n = !1, r) => {
|
|
1134
|
+
let a, s = {
|
|
1135
|
+
format: t?.key,
|
|
1136
|
+
progress: {
|
|
1137
|
+
async onStart(e) {
|
|
1138
|
+
a = await o?.showBusy?.(q("workbook.saving", { name: e?.getName() ?? "" }));
|
|
1139
|
+
},
|
|
1140
|
+
onComplete() {
|
|
1141
|
+
a?.();
|
|
1142
|
+
}
|
|
1143
|
+
},
|
|
1144
|
+
onWarnings: r ?? (async ({ warnings: e, origin: t, canCancel: n }) => {
|
|
1145
|
+
a?.(), console.warn(`Not written to '${t.getName()}':\n${e.map((e) => ` ${e.message}`).join("\n")}`);
|
|
1146
|
+
let r = q("dialog.writeWarnings.title"), i = t.getFormat(), s = (i ? (await T.getWriteFormats({ search: i }))[0] : void 0)?.description ?? i ?? "", c = q("dialog.writeWarnings.keep");
|
|
1147
|
+
return n ? await o.showOptions({
|
|
1148
|
+
title: r,
|
|
1149
|
+
type: ke.Warning,
|
|
1150
|
+
description: `${q("dialog.writeWarnings.confirm", { format: s })}\n\n${c}`,
|
|
1151
|
+
options: [{
|
|
1152
|
+
id: "Save",
|
|
1153
|
+
label: () => q("dialog.save")
|
|
1154
|
+
}, "Cancel"],
|
|
1155
|
+
defaultOption: "Cancel"
|
|
1156
|
+
}) === "Save" && (a = await o?.showBusy?.(q("workbook.saving", { name: t?.getName() ?? "" })), !0) : (o.showOptions({
|
|
1157
|
+
title: r,
|
|
1158
|
+
type: ke.Warning,
|
|
1159
|
+
description: `${q("dialog.writeWarnings.saved", { format: s })}\n\n${c}`,
|
|
1160
|
+
options: ["Ok"]
|
|
1161
|
+
}), !0);
|
|
1162
|
+
})
|
|
1163
|
+
}, c;
|
|
1164
|
+
if (n) {
|
|
1165
|
+
let n = e.getOrigin(), r = t?.exts?.[0] ?? (n.getExtension() || "sxl"), a = `${i || n.getName() || q("workbook.defaultName")}.${r}`;
|
|
1166
|
+
c = await T.writeAs(e, a, {
|
|
1167
|
+
...s,
|
|
1168
|
+
prompt: !0
|
|
1169
|
+
});
|
|
1170
|
+
} else c = await T.write(e, void 0, s);
|
|
1171
|
+
return c;
|
|
1172
|
+
}, d = null;
|
|
1173
|
+
return e.updateCommand("newWorkbook", { callback: async (e) => {
|
|
1174
|
+
let t = T.canRead() && !a();
|
|
1175
|
+
e?.source ? t && d ? await d({
|
|
1176
|
+
url: e.source,
|
|
1177
|
+
title: e.title
|
|
1178
|
+
}) : xr(e.source, e.title) : t ? r({}) : xr();
|
|
1179
|
+
} }), e.updateCommand("closeWorkbook", { callback: async () => {
|
|
1180
|
+
a() && await o.showOptions({
|
|
1181
|
+
title: q("dialog.confirm.title"),
|
|
1182
|
+
description: q("dialog.unsavedChanges"),
|
|
1183
|
+
options: [{
|
|
1184
|
+
id: "Close",
|
|
1185
|
+
label: () => q("dialog.close")
|
|
1186
|
+
}, "Cancel"],
|
|
1187
|
+
defaultOption: "Cancel"
|
|
1188
|
+
}) !== "Close" || window.close();
|
|
1189
|
+
} }), (async () => {
|
|
1190
|
+
let t = await T.getWriteFormats();
|
|
1191
|
+
if (c) return;
|
|
1192
|
+
let i = T.canWrite(), f = T.canRead();
|
|
1193
|
+
if (i) {
|
|
1194
|
+
let r = (e) => {
|
|
1195
|
+
let r = e ? t.find((t) => t.key === e) : void 0;
|
|
1196
|
+
u(n, r, !0).catch((e) => o.showError(e));
|
|
1197
|
+
};
|
|
1198
|
+
e.updateCommand("saveWorkbook", { callback: () => {
|
|
1199
|
+
u(n, void 0, !1).catch((e) => o.showError(e));
|
|
1200
|
+
} }), s && (s.current = (e) => u(n, void 0, !1, e?.onWarnings)), e.updateCommand("saveWorkbookAs", { callback: (e) => {
|
|
1201
|
+
r(e);
|
|
1202
|
+
} });
|
|
1203
|
+
for (let n of t) {
|
|
1204
|
+
let t = n.key;
|
|
1205
|
+
e.updateCommand(`saveWorkbookAs${t}`, {
|
|
1206
|
+
label: () => q("command.saveAsFormat.label", { format: n.description }),
|
|
1207
|
+
groupLabels: {
|
|
1208
|
+
workbook: () => q("command.saveAsFormat.workbook", { format: n.description }),
|
|
1209
|
+
saveWorkbookOptions: () => q("command.saveAsFormat.compact", { format: n.description })
|
|
1210
|
+
},
|
|
1211
|
+
tags: n.tags,
|
|
1212
|
+
description: () => q("command.saveAsFormat", { format: n.description }),
|
|
1213
|
+
icon: t === "CSV" ? "FileDownloadAsCSV" : t === "Excel" ? "FileDownloadAsExcel" : "FileDownloadAsSheet",
|
|
1214
|
+
callback: () => {
|
|
1215
|
+
r(t);
|
|
1216
|
+
}
|
|
1217
|
+
});
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
let p = async (e = null) => {
|
|
1221
|
+
let t = { csv: {
|
|
1222
|
+
date1904: n.getRuntime().isDate1904(),
|
|
1223
|
+
...n.options
|
|
1224
|
+
} };
|
|
1225
|
+
try {
|
|
1226
|
+
let r = "", i = await l(e, t, async (e) => {
|
|
1227
|
+
r = e?.getName() ?? "";
|
|
1228
|
+
});
|
|
1229
|
+
if (!i) return;
|
|
1230
|
+
let a = i.getWorksheets().getItems();
|
|
1231
|
+
await n.doBatch(async () => {
|
|
1232
|
+
for (let e = 0; e < a.length; e++) {
|
|
1233
|
+
let t = a[e], i = a.length === 1 ? r : t.getName(), o = n.findValidSheetName(i);
|
|
1234
|
+
await n.getWorksheets().add({
|
|
1235
|
+
name: o,
|
|
1236
|
+
autoSelect: e === a.length - 1
|
|
1237
|
+
}).getEntireRange().copyFrom(t.getEntireRange());
|
|
1238
|
+
}
|
|
1239
|
+
}, K("op.importData")), i.close();
|
|
1240
|
+
} catch (e) {
|
|
1241
|
+
o.showError(e);
|
|
1242
|
+
}
|
|
1243
|
+
};
|
|
1244
|
+
if (e.updateCommand("insertDataFromFile", {
|
|
1245
|
+
tags: ["noTransaction", "noRepeat"],
|
|
1246
|
+
callback: async (e = null) => {
|
|
1247
|
+
let t = e;
|
|
1248
|
+
if (t || T.canRead() || (t = await (async () => {
|
|
1249
|
+
let e = await T.getReadFormats(), t = [...new Set(e.flatMap((e) => e.exts))].map((e) => `.${e}`);
|
|
1250
|
+
return jt.openFileDialog(t.length ? t.join(",") : "*.*");
|
|
1251
|
+
})(), t)) return p(t);
|
|
1252
|
+
}
|
|
1253
|
+
}), e.updateCommand("insertDataFromURL", {
|
|
1254
|
+
tags: ["noTransaction", "noRepeat"],
|
|
1255
|
+
callback: async (e) => {
|
|
1256
|
+
if (!e) {
|
|
1257
|
+
let t = await o.showInput({
|
|
1258
|
+
title: q("dialog.importFromWeb.title"),
|
|
1259
|
+
description: q("dialog.importFromWeb.description"),
|
|
1260
|
+
inputLabel: q("dialog.webAddress.inputLabel"),
|
|
1261
|
+
initialValue: "https://www.sheetxl.com/docs/examples/loan-calculator.xlsx",
|
|
1262
|
+
propsInput: { style: { minWidth: "440px" } },
|
|
1263
|
+
options: [{
|
|
1264
|
+
id: "Import",
|
|
1265
|
+
label: () => q("dialog.import")
|
|
1266
|
+
}]
|
|
1267
|
+
});
|
|
1268
|
+
if (t.option !== "Import") return;
|
|
1269
|
+
e = t.input;
|
|
1270
|
+
}
|
|
1271
|
+
if (e) try {
|
|
1272
|
+
let t = await fetch(e);
|
|
1273
|
+
if (!t.ok) throw Error(`Could not fetch '${e}' (${t.status} ${t.statusText}).`);
|
|
1274
|
+
let n = await t.blob(), r = decodeURIComponent(e.split("/").pop()?.split("?")[0] || "") || "import.xlsx";
|
|
1275
|
+
await p(new File([n], r, { type: n.type }));
|
|
1276
|
+
} catch (e) {
|
|
1277
|
+
o.showError(e);
|
|
1278
|
+
}
|
|
1279
|
+
}
|
|
1280
|
+
}), f) {
|
|
1281
|
+
let t = async () => !a() || await o.showOptions({
|
|
1282
|
+
title: q("dialog.confirm.title"),
|
|
1283
|
+
description: q("dialog.unsavedChanges"),
|
|
1284
|
+
options: [{
|
|
1285
|
+
id: "Open",
|
|
1286
|
+
label: () => q("dialog.open")
|
|
1287
|
+
}, "Cancel"],
|
|
1288
|
+
defaultOption: "Cancel"
|
|
1289
|
+
}) === "Open", i = async (e = null) => {
|
|
1290
|
+
let t = { csv: {
|
|
1291
|
+
date1904: n.getRuntime().isDate1904(),
|
|
1292
|
+
...n.options
|
|
1293
|
+
} };
|
|
1294
|
+
try {
|
|
1295
|
+
let n = await l(e, t);
|
|
1296
|
+
if (!n) return;
|
|
1297
|
+
r(n);
|
|
1298
|
+
} catch (e) {
|
|
1299
|
+
o.showError(e);
|
|
1300
|
+
}
|
|
1301
|
+
};
|
|
1302
|
+
e.updateCommand("openWorkbook", { callback: async (e = null) => {
|
|
1303
|
+
await t() && await i(e);
|
|
1304
|
+
} }), d = async (e) => {
|
|
1305
|
+
let n = typeof e == "string" ? e : e?.url, r = typeof e == "string" ? void 0 : e?.title;
|
|
1306
|
+
if (!n) {
|
|
1307
|
+
let e = await o.showInput({
|
|
1308
|
+
title: q("dialog.openFromWeb.title"),
|
|
1309
|
+
description: q("dialog.openFromWeb.description"),
|
|
1310
|
+
inputLabel: q("dialog.webAddress.inputLabel"),
|
|
1311
|
+
initialValue: "https://www.sheetxl.com/docs/examples/loan-calculator.xlsx",
|
|
1312
|
+
propsInput: { style: { minWidth: "440px" } },
|
|
1313
|
+
options: [{
|
|
1314
|
+
id: "Open",
|
|
1315
|
+
label: () => q("dialog.open")
|
|
1316
|
+
}]
|
|
1317
|
+
});
|
|
1318
|
+
if (e.option !== "Open") return;
|
|
1319
|
+
n = e.input;
|
|
1320
|
+
}
|
|
1321
|
+
if (n && await t()) try {
|
|
1322
|
+
let e = await fetch(n);
|
|
1323
|
+
if (!e.ok) throw Error(`Could not fetch '${n}' (${e.status} ${e.statusText}).`);
|
|
1324
|
+
let t = await e.blob(), a = decodeURIComponent(n.split("/").pop()?.split("?")[0] || "") || "workbook.xlsx", o = a.match(/\.[^/.]+$/)?.[0] ?? "", s = r ? `${r}${o}` : a;
|
|
1325
|
+
await i(new File([t], s, { type: t.type }));
|
|
1326
|
+
} catch (e) {
|
|
1327
|
+
o.showError(e);
|
|
1328
|
+
}
|
|
1329
|
+
}, e.updateCommand("openWorkbookFromUrl", { callback: d });
|
|
1330
|
+
}
|
|
1331
|
+
})(), () => {
|
|
1332
|
+
c = !0, s && (s.current = null);
|
|
1333
|
+
};
|
|
1334
|
+
}
|
|
1335
|
+
var Cr = pt(G("studio:shortcutKeysDialog", () => import("./D4IXtjIE97zSR0kY.mjs")).load);
|
|
1336
|
+
_(), y();
|
|
1337
|
+
var wr = /* @__PURE__ */ new Set(["ui"]), Tr = (e) => {
|
|
1338
|
+
let t = (e) => {
|
|
1339
|
+
if (typeof e != "function") return e;
|
|
1340
|
+
try {
|
|
1341
|
+
return e();
|
|
1342
|
+
} catch {
|
|
1343
|
+
return;
|
|
1344
|
+
}
|
|
1345
|
+
}, n = (e, n) => {
|
|
1346
|
+
let r = t(e);
|
|
1347
|
+
return typeof r == "string" ? It(r, n, Mt.getActive()) : void 0;
|
|
1348
|
+
}, r = [];
|
|
1349
|
+
for (let i of e.names()) if (!wr.has(i)) for (let a of e.keys(i)) {
|
|
1350
|
+
let o = e.resolveDefinition(i, a);
|
|
1351
|
+
r.push({
|
|
1352
|
+
groupKey: i,
|
|
1353
|
+
command: {
|
|
1354
|
+
getLabel: () => n(o?.label, o?.params) ?? a,
|
|
1355
|
+
getIcon: () => t(o?.icon),
|
|
1356
|
+
getDescription: () => n(o?.description, o?.params) ?? "",
|
|
1357
|
+
getShortcut: () => t(o?.shortcut) ?? null,
|
|
1358
|
+
getScope: () => i,
|
|
1359
|
+
getScopeLabel: () => we.DefaultCommandCatalogService.getScopeLabel(i)
|
|
1360
|
+
}
|
|
1361
|
+
});
|
|
1362
|
+
}
|
|
1363
|
+
return { getAllCommands: () => r };
|
|
1364
|
+
}, Er = (e) => {
|
|
1365
|
+
let { children: t, workbook: n, setWorkbook: r, workbookTitle: i, isDirty: a, refSave: o, fullscreenTarget: s } = e, c = we.useCommandScope(), l = Ue(), { showModal: u } = _t(), d = Ke(), f = P(a);
|
|
1366
|
+
f.current = a;
|
|
1367
|
+
let p = D(() => {
|
|
1368
|
+
let e = c?.getRoot().getRegistry();
|
|
1369
|
+
if (!e) return;
|
|
1370
|
+
let t = u(Cr, {
|
|
1371
|
+
title: d("dialog.shortcutKeys.title"),
|
|
1372
|
+
commands: Tr(e),
|
|
1373
|
+
onDone: () => t.hide(),
|
|
1374
|
+
onLoadError: (e) => {
|
|
1375
|
+
t.destroy(), l.showError(e);
|
|
1376
|
+
}
|
|
1377
|
+
});
|
|
1378
|
+
}, [c, u]);
|
|
1379
|
+
M(() => {
|
|
1380
|
+
if (!c) return;
|
|
1381
|
+
let e = c.getRoot().contribution();
|
|
1382
|
+
return function(e, t) {
|
|
1383
|
+
let n = () => t.showShortcuts();
|
|
1384
|
+
e.updateCommand("showKeyboardShortcuts", { callback: n }), e.updateCommand("help", { callback: n });
|
|
1385
|
+
for (let [t, n] of Object.entries({
|
|
1386
|
+
gotoUrlGithub: "https://github.com/sheetxl/sheetxl",
|
|
1387
|
+
gotoUrlDiscord: "https://discord.gg/NTKdwUgK9p",
|
|
1388
|
+
gotoUrlDocumentation: "https://www.sheetxl.com/docs",
|
|
1389
|
+
gotoUrlIssue: "https://github.com/sheetxl/sheetxl/issues"
|
|
1390
|
+
})) e.updateCommand(t, { callback: () => {
|
|
1391
|
+
window?.open(n);
|
|
1392
|
+
} });
|
|
1393
|
+
}(e, { showShortcuts: p }), () => e.remove();
|
|
1394
|
+
}, [c, p]);
|
|
1395
|
+
let m = Ot("(prefers-color-scheme: dark)"), { themeMode: h } = Ge(), [g, _] = We(fe.Mode, de[fe.Mode]), [ee, v] = We(fe.DarkGrid, de[fe.DarkGrid]), [y, te] = We(fe.DarkImages, de[fe.DarkImages]);
|
|
1396
|
+
M(() => {
|
|
1397
|
+
if (!c) return;
|
|
1398
|
+
let e = c.getRoot().contribution();
|
|
1399
|
+
return function(e, t) {
|
|
1400
|
+
e.updateCommand("themeMode", {
|
|
1401
|
+
state: t.mode ?? null,
|
|
1402
|
+
params: { dark: t.isDark },
|
|
1403
|
+
icon: t.isDark ? "DarkMode" : "LightMode",
|
|
1404
|
+
callback: () => t.setMode(t.isDark ? "light" : "dark")
|
|
1405
|
+
}), e.updateCommand("defaultThemeMode", {
|
|
1406
|
+
state: !t.mode,
|
|
1407
|
+
icon: t.systemDefaultDark ? "SystemDefaultDarkMode" : "SystemDefaultLightMode",
|
|
1408
|
+
callback: () => t.setMode(null)
|
|
1409
|
+
}), e.updateCommand("enableDarkGrid", {
|
|
1410
|
+
state: t.enableDarkGrid,
|
|
1411
|
+
callback: () => t.setEnableDarkGrid((e) => !e)
|
|
1412
|
+
}), e.updateCommand("enableDarkImages", {
|
|
1413
|
+
state: t.enableDarkImages,
|
|
1414
|
+
callback: () => t.setEnableDarkImages((e) => !e)
|
|
1415
|
+
});
|
|
1416
|
+
}(e, {
|
|
1417
|
+
mode: g,
|
|
1418
|
+
setMode: _,
|
|
1419
|
+
isDark: g === "dark" || !g && h === "dark",
|
|
1420
|
+
systemDefaultDark: m,
|
|
1421
|
+
enableDarkGrid: ee,
|
|
1422
|
+
setEnableDarkGrid: v,
|
|
1423
|
+
enableDarkImages: y,
|
|
1424
|
+
setEnableDarkImages: te
|
|
1425
|
+
}), () => e.remove();
|
|
1426
|
+
}, [
|
|
1427
|
+
c,
|
|
1428
|
+
g,
|
|
1429
|
+
h,
|
|
1430
|
+
m,
|
|
1431
|
+
ee,
|
|
1432
|
+
y,
|
|
1433
|
+
_,
|
|
1434
|
+
v,
|
|
1435
|
+
te
|
|
1436
|
+
]);
|
|
1437
|
+
let [b, x] = We(Oe.Active, null), [ne, re] = F(() => Mt.getActive());
|
|
1438
|
+
M(() => Mt.addChangeListener(re), []), M(() => {
|
|
1439
|
+
b && b !== Mt.getActive() && Mt.setActive(b);
|
|
1440
|
+
}, [b]), M(() => {
|
|
1441
|
+
if (!c) return;
|
|
1442
|
+
let e = c.getRoot().contribution();
|
|
1443
|
+
return function(e, t) {
|
|
1444
|
+
e.updateCommand("language", {
|
|
1445
|
+
state: t.active,
|
|
1446
|
+
callback: (e) => {
|
|
1447
|
+
e && t.setActive(e);
|
|
1448
|
+
}
|
|
1449
|
+
});
|
|
1450
|
+
}(e, {
|
|
1451
|
+
active: ne,
|
|
1452
|
+
setActive: (e) => {
|
|
1453
|
+
x(e);
|
|
1454
|
+
}
|
|
1455
|
+
}), () => e.remove();
|
|
1456
|
+
}, [
|
|
1457
|
+
c,
|
|
1458
|
+
ne,
|
|
1459
|
+
x
|
|
1460
|
+
]);
|
|
1461
|
+
let ie = N(() => ({ current: s ?? null }), [s]), { isFullscreenAvailable: S, isFullscreenEnabled: C, toggleFullscreen: ae } = Re({ target: ie });
|
|
1462
|
+
M(() => {
|
|
1463
|
+
if (!c) return;
|
|
1464
|
+
let e = c.getRoot().contribution();
|
|
1465
|
+
return function(e, t) {
|
|
1466
|
+
e.updateCommand("fullScreenToggle", {
|
|
1467
|
+
state: t.isFullscreenEnabled,
|
|
1468
|
+
disabledReasons: t.isFullscreenAvailable ? [] : [K("reason.fullscreenUnavailable")],
|
|
1469
|
+
icon: t.isFullscreenEnabled ? "FullScreenOff" : "FullScreen",
|
|
1470
|
+
callback: () => {
|
|
1471
|
+
t.toggleFullscreen();
|
|
1472
|
+
}
|
|
1473
|
+
});
|
|
1474
|
+
}(e, {
|
|
1475
|
+
isFullscreenAvailable: S,
|
|
1476
|
+
isFullscreenEnabled: C,
|
|
1477
|
+
toggleFullscreen: ae
|
|
1478
|
+
}), () => e.remove();
|
|
1479
|
+
}, [
|
|
1480
|
+
c,
|
|
1481
|
+
S,
|
|
1482
|
+
C,
|
|
1483
|
+
ae
|
|
1484
|
+
]);
|
|
1485
|
+
let oe = be(!0);
|
|
1486
|
+
return M(() => {
|
|
1487
|
+
if (!c) return;
|
|
1488
|
+
let e = c.getRoot().contribution();
|
|
1489
|
+
return function(e, t) {
|
|
1490
|
+
e.updateCommand("protectWorkbook", {
|
|
1491
|
+
tags: ["noTransaction", "noRepeat"],
|
|
1492
|
+
callback: () => {
|
|
1493
|
+
t(w.Protection, { args: { tab: "workbook" } });
|
|
1494
|
+
}
|
|
1495
|
+
});
|
|
1496
|
+
}(e, (e, t) => oe.activate(e, t)), () => e.remove();
|
|
1497
|
+
}, [c, oe]), M(() => {
|
|
1498
|
+
if (!c || !n) return;
|
|
1499
|
+
let e = c.getRoot().contribution(), t = Sr(e, {
|
|
1500
|
+
workbook: n,
|
|
1501
|
+
setWorkbook: r,
|
|
1502
|
+
workbookTitle: i ?? void 0,
|
|
1503
|
+
isDirty: () => f.current?.() ?? !1,
|
|
1504
|
+
notifier: l,
|
|
1505
|
+
refSave: o
|
|
1506
|
+
});
|
|
1507
|
+
return () => {
|
|
1508
|
+
t(), e.remove();
|
|
1509
|
+
};
|
|
1510
|
+
}, [
|
|
1511
|
+
c,
|
|
1512
|
+
n,
|
|
1513
|
+
r,
|
|
1514
|
+
i,
|
|
1515
|
+
l,
|
|
1516
|
+
o
|
|
1517
|
+
]), t;
|
|
1518
|
+
};
|
|
1519
|
+
Er.displayName = "StudioCommandProvider";
|
|
1520
|
+
var Dr = ({ renderWorkbook: e }) => {
|
|
1521
|
+
let t = we.useCommandResolver(), n = P(null), r = Ke(), [i, a] = F(null), o = j((e) => {
|
|
1522
|
+
let n = e.dataTransfer;
|
|
1523
|
+
if (t && n) {
|
|
1524
|
+
if (e.type === "dragenter" || e.type === "dragover") {
|
|
1525
|
+
let e = n.types, t = n.items, r = !1;
|
|
1526
|
+
for (let e = 0; e < t.length; e++) if (t[e].type.startsWith("image/")) {
|
|
1527
|
+
r = !0;
|
|
1528
|
+
break;
|
|
1529
|
+
}
|
|
1530
|
+
r ? a("insertImage") : e.includes("Files") && t.length > 0 ? a("open") : (n.effectAllowed = "none", n.dropEffect = "none");
|
|
1531
|
+
} else if (e.type === "dragleave") {
|
|
1532
|
+
let t = e.relatedTarget;
|
|
1533
|
+
t && e.currentTarget.contains(t) || a(null);
|
|
1534
|
+
}
|
|
1535
|
+
e.preventDefault();
|
|
1536
|
+
}
|
|
1537
|
+
}, [t]), s = D((e) => {
|
|
1538
|
+
e.preventDefault();
|
|
1539
|
+
let r = i;
|
|
1540
|
+
if (a(null), r && t && (e.stopPropagation(), e.dataTransfer.files && e.dataTransfer.files.length > 0)) {
|
|
1541
|
+
let r = e.dataTransfer.files[0];
|
|
1542
|
+
if (!r) return;
|
|
1543
|
+
if (r?.type?.startsWith("image/")) {
|
|
1544
|
+
let i = n.current?.getSheetElement()?.getGridSurface().getPaneFromClient(e.clientX, e.clientY);
|
|
1545
|
+
if (!i) return;
|
|
1546
|
+
let a = i.getPanePointFromPointer(e.clientX, e.clientY);
|
|
1547
|
+
if (!a) return;
|
|
1548
|
+
let o = i.toAbsoluteBounds({
|
|
1549
|
+
x: a.x ?? 0,
|
|
1550
|
+
y: a.y ?? 0,
|
|
1551
|
+
width: 0,
|
|
1552
|
+
height: 0
|
|
1553
|
+
});
|
|
1554
|
+
t.execute("insertImageFromFile", {
|
|
1555
|
+
file: r,
|
|
1556
|
+
options: { bounds: {
|
|
1557
|
+
x: o.x,
|
|
1558
|
+
y: o.y
|
|
1559
|
+
} }
|
|
1560
|
+
});
|
|
1561
|
+
} else {
|
|
1562
|
+
if (!T.canRead()) return;
|
|
1563
|
+
let n = e.dataTransfer.items?.[0], i = typeof window < "u" && window.isSecureContext ? n?.getAsFileSystemHandle?.() : void 0;
|
|
1564
|
+
i ? i.then((e) => t.execute("openWorkbook", e?.kind === "file" ? e : r)).catch(() => t.execute("openWorkbook", r)) : t.execute("openWorkbook", r);
|
|
1565
|
+
}
|
|
1566
|
+
}
|
|
1567
|
+
}, [t, i]), c = N(() => {
|
|
1568
|
+
if (!i) return null;
|
|
1569
|
+
let e = i === "insertImage";
|
|
1570
|
+
return L(z, {
|
|
1571
|
+
className: "drop-overlay",
|
|
1572
|
+
sx: {
|
|
1573
|
+
position: "absolute",
|
|
1574
|
+
inset: 0,
|
|
1575
|
+
zIndex: 1,
|
|
1576
|
+
boxSizing: "border-box",
|
|
1577
|
+
pointerEvents: "none",
|
|
1578
|
+
display: "flex",
|
|
1579
|
+
justifyContent: "center",
|
|
1580
|
+
alignItems: "center",
|
|
1581
|
+
backgroundColor: (e) => Dt(e.palette.primary.main, .46),
|
|
1582
|
+
outline: (e) => `2px dashed ${e.palette.primary.main}`,
|
|
1583
|
+
outlineOffset: "-6px",
|
|
1584
|
+
borderRadius: 2
|
|
1585
|
+
},
|
|
1586
|
+
children: R(wt, {
|
|
1587
|
+
elevation: 6,
|
|
1588
|
+
sx: {
|
|
1589
|
+
display: "flex",
|
|
1590
|
+
alignItems: "center",
|
|
1591
|
+
gap: 1.5,
|
|
1592
|
+
px: 3,
|
|
1593
|
+
py: 2,
|
|
1594
|
+
borderRadius: 2,
|
|
1595
|
+
color: "text.primary",
|
|
1596
|
+
"& .drop-overlay-icon": { color: "primary.main" }
|
|
1597
|
+
},
|
|
1598
|
+
children: [L(De, {
|
|
1599
|
+
iconKey: e ? "InsertImage" : "FileOpen",
|
|
1600
|
+
className: "drop-overlay-icon",
|
|
1601
|
+
size: 32
|
|
1602
|
+
}), L(W, {
|
|
1603
|
+
variant: "h6",
|
|
1604
|
+
component: "span",
|
|
1605
|
+
children: r(e ? "drop.insertImage" : "drop.open")
|
|
1606
|
+
})]
|
|
1607
|
+
})
|
|
1608
|
+
});
|
|
1609
|
+
}, [i, r]);
|
|
1610
|
+
return R(yt, { children: [e({
|
|
1611
|
+
ref: n,
|
|
1612
|
+
onDragStart: (e) => {
|
|
1613
|
+
if (e.target.src) {
|
|
1614
|
+
let t = new Image();
|
|
1615
|
+
t.src = e.target.src, e.dataTransfer.setDragImage(t, 1, 1);
|
|
1616
|
+
}
|
|
1617
|
+
},
|
|
1618
|
+
onDragEnter: o,
|
|
1619
|
+
onDragLeave: o,
|
|
1620
|
+
onDragOver: o,
|
|
1621
|
+
onDrop: s
|
|
1622
|
+
}), c] });
|
|
1623
|
+
}, Or = A((e) => {
|
|
1624
|
+
let { workbook: t, setWorkbook: n, refDocumentTitle: r, titleWorkbook: i, setWorkbookTitle: a, isDirty: o, initialCommandAnchor: s, renderWorkbook: c, refSave: l, host: u } = e;
|
|
1625
|
+
return L(S, {
|
|
1626
|
+
initialAnchor: s,
|
|
1627
|
+
children: L(Er, {
|
|
1628
|
+
workbook: t,
|
|
1629
|
+
setWorkbook: n,
|
|
1630
|
+
workbookTitle: i,
|
|
1631
|
+
isDirty: o,
|
|
1632
|
+
refSave: l,
|
|
1633
|
+
fullscreenTarget: u,
|
|
1634
|
+
children: L(Dr, { renderWorkbook: c })
|
|
1635
|
+
})
|
|
1636
|
+
});
|
|
1637
|
+
});
|
|
1638
|
+
Or.displayName = "CommandsWrapper";
|
|
1639
|
+
var kr = {
|
|
1640
|
+
sort: G("studio:sortDialog", () => import("./BzPrRiCDzZQnKqH4.mjs")).load,
|
|
1641
|
+
hyperlink: G("studio:hyperlinkDialog", () => import("./Bezw0tyQZcU_2PRi.mjs")).load,
|
|
1642
|
+
find: G("studio:findReplaceWindow", () => import("./DpwtflGvQFbBSLdo.mjs")).load,
|
|
1643
|
+
tableNew: G("studio:tableNewDialog", () => import("./BF7tsgFfA5kiGqvA.mjs")).load,
|
|
1644
|
+
pivotTableNew: G("studio:pivotTableNewDialog", () => import("./CKVZ-Qa6AcojcV6x.mjs")).load,
|
|
1645
|
+
sparklineNew: G("studio:sparklineNewDialog", () => import("./3F82kokAv56WeIOp.mjs")).load,
|
|
1646
|
+
sparklineEdit: G("studio:sparklineEditDialog", () => import("./CQyLZmquw7Cn-0Yv.mjs")).load,
|
|
1647
|
+
namedDetails: G("studio:namedReferenceDialog", () => import("./voMEQNZgdyO6soYo.mjs")).load,
|
|
1648
|
+
insertFunction: G("studio:insertFunctionDialog", () => import("./BN-SV9n15bsIT7UF.mjs")).load,
|
|
1649
|
+
resizeHeader: G("studio:resizeHeaderDialog", () => import("./STe4CGP-g8tCf7c5.mjs")).load,
|
|
1650
|
+
outlineSettings: G("studio:outlineSettingsDialog", () => import("./CukQww6Fo8MyF56L.mjs")).load,
|
|
1651
|
+
fillSeries: G("studio:fillSeriesDialog", () => import("./ChytgpwnPlu_VG4E.mjs")).load,
|
|
1652
|
+
workbookStatistics: G("studio:workbookStatisticsDialog", () => import("./PvQUVsO3tH532wV8.mjs")).load,
|
|
1653
|
+
password: G("studio:passwordDialog", () => import("./C2NKkLNVwF6qUNv1.mjs")).load,
|
|
1654
|
+
pivotValueSettings: G("studio:pivotValueSettingsDialog", () => import("./0pDgMMkwtzP7yApV.mjs")).load
|
|
1655
|
+
}, Ar = ["find"], jr = A((e) => {
|
|
1656
|
+
let { children: t } = e, n = _r(), r = n ? n.enqueueSnackbar : () => {}, i = n ? n.closeSnackbar : () => {}, a = P(/* @__PURE__ */ new Set()), o = P(null), s = P(null), [c, l] = F({
|
|
1657
|
+
label: null,
|
|
1658
|
+
progress: null
|
|
1659
|
+
}), u = Ke(), d = At.EmptyObject, f = gt(d), p = vt(d), m = I(d), h = P(!1);
|
|
1660
|
+
M(() => {
|
|
1661
|
+
if (h.current) return;
|
|
1662
|
+
h.current = !0;
|
|
1663
|
+
let e = window, t = e.requestIdleCallback ?? ((e) => setTimeout(e, 500)), n = e.cancelIdleCallback ?? clearTimeout, r = t(() => {
|
|
1664
|
+
for (let e of Ar) f(e, kr[e], { prewarm: !0 }).catch(() => {});
|
|
1665
|
+
});
|
|
1666
|
+
return () => n(r);
|
|
1667
|
+
}, []);
|
|
1668
|
+
let g = P(/* @__PURE__ */ new Set()), _ = N(() => {
|
|
1669
|
+
let e = (e, t) => {
|
|
1670
|
+
if (t?.onceKey) {
|
|
1671
|
+
if (g.current.has(t.onceKey)) return;
|
|
1672
|
+
let e = new Set(g.current);
|
|
1673
|
+
e.add(t.onceKey), g.current = e;
|
|
1674
|
+
}
|
|
1675
|
+
let n = {
|
|
1676
|
+
variant: t?.type ?? ke.Info,
|
|
1677
|
+
anchorOrigin: {
|
|
1678
|
+
vertical: "top",
|
|
1679
|
+
horizontal: "center"
|
|
1680
|
+
},
|
|
1681
|
+
preventDuplicate: t?.preventDuplicate,
|
|
1682
|
+
persist: t?.persist ?? t?.type === ke.Error,
|
|
1683
|
+
action: (e) => L(V, {
|
|
1684
|
+
onClick: () => i(e),
|
|
1685
|
+
children: L(De, { iconKey: "Cancel" })
|
|
1686
|
+
})
|
|
1687
|
+
};
|
|
1688
|
+
t?.enqueueProps && Object.assign(n, t.enqueueProps), e || console.log("message is 'null'", t), r(e ?? "Alert", n);
|
|
1689
|
+
};
|
|
1690
|
+
return {
|
|
1691
|
+
showMessage: e,
|
|
1692
|
+
showBusy: (e, t) => {
|
|
1693
|
+
let n = Symbol("busy");
|
|
1694
|
+
a.current.add(n), s.current = e, e != null && typeof e != "string" && l((t) => t.label === e ? t : {
|
|
1695
|
+
...t,
|
|
1696
|
+
label: e
|
|
1697
|
+
});
|
|
1698
|
+
let r = Le(() => {
|
|
1699
|
+
a.current.delete(n) && (a.current.size > 0 || (ft(o.current), s.current = null, l((e) => e.label === null && e.progress === null ? e : {
|
|
1700
|
+
label: null,
|
|
1701
|
+
progress: null
|
|
1702
|
+
})));
|
|
1703
|
+
}, (e, t) => {
|
|
1704
|
+
let n = t && t > 0 && e != null ? Math.max(0, Math.min(1, e / t)) : null;
|
|
1705
|
+
l((e) => e.progress === n ? e : {
|
|
1706
|
+
...e,
|
|
1707
|
+
progress: n
|
|
1708
|
+
});
|
|
1709
|
+
}, (e) => {
|
|
1710
|
+
s.current = e, typeof e == "string" ? ht(o.current, e) : l((t) => ({
|
|
1711
|
+
...t,
|
|
1712
|
+
label: e
|
|
1713
|
+
}));
|
|
1714
|
+
}), i = ht(o.current, typeof e == "string" ? e : void 0);
|
|
1715
|
+
return i ? i.then(() => r) : r;
|
|
1716
|
+
},
|
|
1717
|
+
showWindow: (e, t) => {
|
|
1718
|
+
let n = t;
|
|
1719
|
+
return t = {
|
|
1720
|
+
...t,
|
|
1721
|
+
onKeyDown: (e) => {
|
|
1722
|
+
e.isDefaultPrevented() || e.isPropagationStopped() || n?.onKeyDown?.(e);
|
|
1723
|
+
}
|
|
1724
|
+
}, f(e, kr[e], t);
|
|
1725
|
+
},
|
|
1726
|
+
showOptions: p,
|
|
1727
|
+
showInput: m,
|
|
1728
|
+
showError: (t) => {
|
|
1729
|
+
let n, r = ke.Error, i = u("error.unknown");
|
|
1730
|
+
typeof t == "string" ? i = t : t instanceof Error && (n = t, t.message && (i = u(t.message))), t instanceof Ft && (r = ke.Info), e(i, {
|
|
1731
|
+
type: r,
|
|
1732
|
+
enqueueProps: { error: n }
|
|
1733
|
+
});
|
|
1734
|
+
}
|
|
1735
|
+
};
|
|
1736
|
+
}, [u]), ee = N(() => L(et, {
|
|
1737
|
+
ref: o,
|
|
1738
|
+
autoStart: !1,
|
|
1739
|
+
icon: L(tt, { sx: {
|
|
1740
|
+
transform: "scale(0.7)",
|
|
1741
|
+
marginLeft: "-6px"
|
|
1742
|
+
} }),
|
|
1743
|
+
panel: !0,
|
|
1744
|
+
label: c.label ?? (typeof s.current == "string" ? s.current : void 0),
|
|
1745
|
+
progress: c.progress,
|
|
1746
|
+
sx: {
|
|
1747
|
+
position: "absolute",
|
|
1748
|
+
left: "0",
|
|
1749
|
+
top: "0",
|
|
1750
|
+
width: "100%",
|
|
1751
|
+
height: "100%",
|
|
1752
|
+
zIndex: "9999",
|
|
1753
|
+
pointerEvents: "none"
|
|
1754
|
+
}
|
|
1755
|
+
}), [c.label, c.progress]);
|
|
1756
|
+
return R(E, {
|
|
1757
|
+
notifier: _,
|
|
1758
|
+
children: [ee, t]
|
|
1759
|
+
});
|
|
1760
|
+
});
|
|
1761
|
+
jr.displayName = "StudioNotifierProvider";
|
|
1762
|
+
var Mr = "var(--sxl-color-input-border, light-dark(rgba(0, 0, 0, 0.2), rgba(255, 255, 255, 0.2)))", Nr = A(k((e, t) => {
|
|
1763
|
+
let { children: n, title: r, taskPanes: i, onSelect: a, selected: o, registry: s = C, style: c, iconsOnly: l, side: u = "right", className: d, ...f } = e, p = u !== "right", m = Ve(), h = N(() => i.map((t) => {
|
|
1764
|
+
let n = s.getRegisteredTaskPane(t);
|
|
1765
|
+
if (!n) return null;
|
|
1766
|
+
let r = n.getIcon?.();
|
|
1767
|
+
typeof r == "string" && (r = L(De, { iconKey: r }));
|
|
1768
|
+
let i = t === o, a = r ? L(z, {
|
|
1769
|
+
sx: {
|
|
1770
|
+
display: "inline-block",
|
|
1771
|
+
transform: p ? "rotate(-90deg)" : "rotate(90deg)",
|
|
1772
|
+
transformOrigin: "center",
|
|
1773
|
+
color: (e) => e.palette.text.secondary
|
|
1774
|
+
},
|
|
1775
|
+
children: r
|
|
1776
|
+
}) : null, c = !r || !l && i, u = L(z, {
|
|
1777
|
+
sx: {
|
|
1778
|
+
display: "grid",
|
|
1779
|
+
gridTemplateColumns: c ? "1fr" : "0fr",
|
|
1780
|
+
opacity: +!!c,
|
|
1781
|
+
transition: (e) => e.transitions.create(["grid-template-columns", "opacity"], { duration: e.transitions.duration.short })
|
|
1782
|
+
},
|
|
1783
|
+
children: L(z, {
|
|
1784
|
+
sx: {
|
|
1785
|
+
overflow: "hidden",
|
|
1786
|
+
minWidth: 0,
|
|
1787
|
+
minHeight: 0
|
|
1788
|
+
},
|
|
1789
|
+
children: L(W, {
|
|
1790
|
+
component: "div",
|
|
1791
|
+
sx: {
|
|
1792
|
+
textTransform: "none",
|
|
1793
|
+
whiteSpace: "nowrap",
|
|
1794
|
+
transform: p ? "rotate(180deg)" : void 0,
|
|
1795
|
+
padding: "4px 0px",
|
|
1796
|
+
color: (e) => i ? e.palette.primary.main : e.palette.text.secondary
|
|
1797
|
+
},
|
|
1798
|
+
children: n.getTitle()
|
|
1799
|
+
})
|
|
1800
|
+
})
|
|
1801
|
+
});
|
|
1802
|
+
return L(H, {
|
|
1803
|
+
value: t,
|
|
1804
|
+
label: L(lt, {
|
|
1805
|
+
disableInteractive: !0,
|
|
1806
|
+
title: n.getTitle() ?? "",
|
|
1807
|
+
placement: "left-start",
|
|
1808
|
+
children: R(z, {
|
|
1809
|
+
sx: {
|
|
1810
|
+
padding: "0px 0px",
|
|
1811
|
+
writingMode: p ? "vertical-lr" : "vertical-rl",
|
|
1812
|
+
textOrientation: "mixed",
|
|
1813
|
+
display: "flex",
|
|
1814
|
+
alignItems: "center",
|
|
1815
|
+
justifyContent: "space-between",
|
|
1816
|
+
minWidth: "0px",
|
|
1817
|
+
color: (e) => e.palette.text.secondary
|
|
1818
|
+
},
|
|
1819
|
+
children: [p ? u : a, p ? a : u]
|
|
1820
|
+
})
|
|
1821
|
+
}),
|
|
1822
|
+
sx: {
|
|
1823
|
+
padding: "4px 4px",
|
|
1824
|
+
minWidth: "0px",
|
|
1825
|
+
minHeight: "0px",
|
|
1826
|
+
borderRadius: "4px"
|
|
1827
|
+
},
|
|
1828
|
+
className: b("taskpane-strip-item", { "Mui-selected": i }),
|
|
1829
|
+
onClick: () => e.onSelect(t)
|
|
1830
|
+
}, t);
|
|
1831
|
+
}), [
|
|
1832
|
+
i,
|
|
1833
|
+
o,
|
|
1834
|
+
a,
|
|
1835
|
+
s,
|
|
1836
|
+
p,
|
|
1837
|
+
l,
|
|
1838
|
+
m
|
|
1839
|
+
]), g = ze(t, () => ({ isTaskPaneStrip: () => !0 }), []), _ = N(() => b("taskpane-strip", d), [d]);
|
|
1840
|
+
return L(z, {
|
|
1841
|
+
ref: g,
|
|
1842
|
+
className: _,
|
|
1843
|
+
sx: {
|
|
1844
|
+
paddingLeft: p ? void 0 : "2px",
|
|
1845
|
+
paddingRight: p ? "2px" : void 0,
|
|
1846
|
+
paddingTop: "4px",
|
|
1847
|
+
...c
|
|
1848
|
+
},
|
|
1849
|
+
...f,
|
|
1850
|
+
children: L(U, {
|
|
1851
|
+
orientation: "vertical",
|
|
1852
|
+
variant: "scrollable",
|
|
1853
|
+
value: o,
|
|
1854
|
+
onChange: (e, t) => {
|
|
1855
|
+
a(t);
|
|
1856
|
+
},
|
|
1857
|
+
slotProps: {
|
|
1858
|
+
list: { sx: { gap: "2px" } },
|
|
1859
|
+
indicator: { sx: {
|
|
1860
|
+
left: p ? void 0 : "0px",
|
|
1861
|
+
right: p ? void 0 : "unset",
|
|
1862
|
+
bottom: p ? "0px" : void 0
|
|
1863
|
+
} }
|
|
1864
|
+
},
|
|
1865
|
+
children: h
|
|
1866
|
+
})
|
|
1867
|
+
});
|
|
1868
|
+
})), Pr = (e) => {
|
|
1869
|
+
let { title: t, icon: n, onClose: r, readOnly: i, focused: a, ...o } = e, s = P(null), c = Ke();
|
|
1870
|
+
return L(B, {
|
|
1871
|
+
className: b({ "Mui-selected": a }),
|
|
1872
|
+
sx: {
|
|
1873
|
+
display: "flex",
|
|
1874
|
+
flex: "1 1 %0",
|
|
1875
|
+
color: (e) => e.palette.text.secondary,
|
|
1876
|
+
boxSizing: "border-box",
|
|
1877
|
+
padding: "0 0",
|
|
1878
|
+
transitionProperty: "opacity",
|
|
1879
|
+
transitionDuration: (e) => `${e.transitions.duration.shortest}ms`,
|
|
1880
|
+
opacity: .7,
|
|
1881
|
+
"&.Mui-selected": {
|
|
1882
|
+
opacity: 1,
|
|
1883
|
+
transitionDuration: (e) => e.transitions.duration.shortest / 2 + "ms"
|
|
1884
|
+
},
|
|
1885
|
+
backgroundColor: (e) => Dt(e.palette.action.hover, .03),
|
|
1886
|
+
borderBottom: `solid ${Mr} 1px`
|
|
1887
|
+
},
|
|
1888
|
+
...o,
|
|
1889
|
+
children: R(z, {
|
|
1890
|
+
sx: {
|
|
1891
|
+
display: "flex",
|
|
1892
|
+
flex: "1 1 10%",
|
|
1893
|
+
flexDirection: "row",
|
|
1894
|
+
alignItems: "center",
|
|
1895
|
+
marginTop: (e) => e.spacing(.25),
|
|
1896
|
+
marginBottom: (e) => e.spacing(.25),
|
|
1897
|
+
marginLeft: (e) => e.spacing(1),
|
|
1898
|
+
marginRight: (e) => e.spacing(1)
|
|
1899
|
+
},
|
|
1900
|
+
children: [L(z, {
|
|
1901
|
+
sx: {
|
|
1902
|
+
flex: "1 1 100%",
|
|
1903
|
+
paddingLeft: (e) => e.spacing(1)
|
|
1904
|
+
},
|
|
1905
|
+
children: t
|
|
1906
|
+
}), L(ot, {
|
|
1907
|
+
label: c("taskPane.close"),
|
|
1908
|
+
children: L(V, {
|
|
1909
|
+
"aria-label": "close",
|
|
1910
|
+
sx: { color: (e) => e.palette.text.icon ?? e.palette.action.active },
|
|
1911
|
+
touchRippleRef: s,
|
|
1912
|
+
onPointerDown: (e) => {
|
|
1913
|
+
s.current?.start(e, { center: !1 }), e.stopPropagation(), e.preventDefault();
|
|
1914
|
+
},
|
|
1915
|
+
onPointerUp: () => {
|
|
1916
|
+
r();
|
|
1917
|
+
},
|
|
1918
|
+
children: L(De, { iconKey: "Close" })
|
|
1919
|
+
})
|
|
1920
|
+
})]
|
|
1921
|
+
})
|
|
1922
|
+
});
|
|
1923
|
+
}, Fr = k((e, t) => {
|
|
1924
|
+
let { model: n, side: r, ...i } = e, a = kt(), o = `solid ${Mr} 1px`, s = `${a.shape.borderRadius ?? 4}px`, c = `${a.spacing?.(.5) ?? 4}px`;
|
|
1925
|
+
return L(ce, {
|
|
1926
|
+
model: n,
|
|
1927
|
+
ref: t,
|
|
1928
|
+
propsFrame: { style: {
|
|
1929
|
+
border: o,
|
|
1930
|
+
borderRadius: s,
|
|
1931
|
+
marginBottom: c
|
|
1932
|
+
} },
|
|
1933
|
+
alwaysShowStrip: !0,
|
|
1934
|
+
componentTitle: Pr,
|
|
1935
|
+
componentStrip: Nr,
|
|
1936
|
+
side: r,
|
|
1937
|
+
...e,
|
|
1938
|
+
onOpen: () => {
|
|
1939
|
+
e?.onOpen?.();
|
|
1940
|
+
},
|
|
1941
|
+
onClose: () => {
|
|
1942
|
+
e?.onClose?.();
|
|
1943
|
+
},
|
|
1944
|
+
...i
|
|
1945
|
+
});
|
|
1946
|
+
}), Ir = "_styled-resizer_li52w_3", Lr = {}, Rr = {
|
|
1947
|
+
flex: "1 1 100%",
|
|
1948
|
+
display: "flex",
|
|
1949
|
+
boxSizing: "border-box"
|
|
1950
|
+
}, zr = A(k((e, t) => {
|
|
1951
|
+
let { mainElement: n, sidebarElement: r, position: i, persistKey: a, onPositionChange: o, className: s, style: c, taskSide: l = "right", ...u } = e, [d, f] = We(a ?? null, Lr), p = kt(), [m, { width: h }] = He(), g = h > 530 || h === 0, _ = P(null), ee, v, y = null, te = 4, ne = 13;
|
|
1952
|
+
g ? y = "m 3.6261898,11.36243 c 0,0.88365 -0.71627,1.59991 -1.59991,1.59991 -0.8836498,0 -1.60004965,-0.71626 -1.60004965,-1.59991 0,-0.88365 0.71639985,-1.6000508 1.60004965,-1.6000508 0.88364,0 1.59991,0.7164008 1.59991,1.6000508 m 0,-4.881294 c 0,0.88364 -0.71627,1.60004 -1.59991,1.60004 -0.8836498,0 -1.60004965,-0.7164 -1.60004965,-1.60004 0,-0.88365 0.71639985,-1.60005 1.60004965,-1.60005 0.88364,0 1.59991,0.7164 1.59991,1.60005 m 0,-4.881226 c 0,0.88365 -0.71627,1.60005 -1.59991,1.60005 C 1.14263,3.19996 0.42623015,2.48356 0.42623015,1.59991 0.42623015,0.71626 1.14263,0 2.0262798,0 c 0.88364,0 1.59991,0.71626 1.59991,1.59991" : (y = "M 1.59991,3.62619 C 0.71626,3.62619 0,2.90992 0,2.02628 0,1.1426301 0.71626,0.42623015 1.59991,0.42623015 c 0.88365,0 1.6000508,0.71639995 1.6000508,1.60004985 0,0.88364 -0.7164008,1.59991 -1.6000508,1.59991 m 4.881294,0 c -0.88364,0 -1.60004,-0.71627 -1.60004,-1.59991 0,-0.8836499 0.7164,-1.60004985 1.60004,-1.60004985 0.88365,0 1.60005,0.71639995 1.60005,1.60004985 0,0.88364 -0.7164,1.59991 -1.60005,1.59991 m 4.881226,0 c -0.88365,0 -1.60005,-0.71627 -1.60005,-1.59991 0,-0.8836499 0.7164,-1.60004985 1.60005,-1.60004985 0.88365,0 1.59991,0.71639995 1.59991,1.60004985 0,0.88364 -0.71626,1.59991 -1.59991,1.59991", te = 13, ne = 4);
|
|
1953
|
+
let re, ie = n, S = r, C = l !== "right", ae = g ? "row" : "column", oe = C && S ? "before" : "after", se = `${ae}:${oe}`, ce = a ? d[se] : void 0, w = ce == null ? ((e, t) => {
|
|
1954
|
+
if (e == null) return "40%";
|
|
1955
|
+
if (typeof e == "number" || typeof e == "string") return e;
|
|
1956
|
+
let n = e[t];
|
|
1957
|
+
return n == null ? "40%" : `${n}%`;
|
|
1958
|
+
})(i, se) : `${ce}%`, le = a || o ? (e) => {
|
|
1959
|
+
a && f((t) => ({
|
|
1960
|
+
...t,
|
|
1961
|
+
[se]: e.percent
|
|
1962
|
+
})), o?.(e, {
|
|
1963
|
+
orientation: ae,
|
|
1964
|
+
side: oe,
|
|
1965
|
+
key: se
|
|
1966
|
+
});
|
|
1967
|
+
} : void 0;
|
|
1968
|
+
C && S ? (ie = r, S = n, v = { style: {
|
|
1969
|
+
flexDirection: "column",
|
|
1970
|
+
boxSizing: "border-box",
|
|
1971
|
+
paddingRight: "2px"
|
|
1972
|
+
} }, ee = {}, re = {
|
|
1973
|
+
fixedPane: "before",
|
|
1974
|
+
position: w,
|
|
1975
|
+
minBefore: g ? "280px" : "120px",
|
|
1976
|
+
splitDirection: g ? "row" : "column"
|
|
1977
|
+
}) : (ee = { style: {
|
|
1978
|
+
flexDirection: "column",
|
|
1979
|
+
marginRight: r ? void 0 : "6px"
|
|
1980
|
+
} }, v = { style: {
|
|
1981
|
+
marginLeft: g ? "0px" : "4px",
|
|
1982
|
+
marginRight: g ? "8px" : "4px"
|
|
1983
|
+
} }, re = {
|
|
1984
|
+
fixedPane: "after",
|
|
1985
|
+
position: w,
|
|
1986
|
+
minAfter: g ? "280px" : "120px",
|
|
1987
|
+
splitDirection: g ? "row" : "column"
|
|
1988
|
+
});
|
|
1989
|
+
let ue = x([
|
|
1990
|
+
_,
|
|
1991
|
+
m,
|
|
1992
|
+
t
|
|
1993
|
+
]);
|
|
1994
|
+
return L(Pe, {
|
|
1995
|
+
ref: ue,
|
|
1996
|
+
className: s,
|
|
1997
|
+
style: c ? {
|
|
1998
|
+
...Rr,
|
|
1999
|
+
...c
|
|
2000
|
+
} : Rr,
|
|
2001
|
+
...u,
|
|
2002
|
+
...re,
|
|
2003
|
+
onPositionChange: le,
|
|
2004
|
+
propsResizer: {
|
|
2005
|
+
className: b("styled-resizer", Ir),
|
|
2006
|
+
style: {
|
|
2007
|
+
minWidth: g ? "7px" : void 0,
|
|
2008
|
+
minHeight: g ? void 0 : "6px",
|
|
2009
|
+
maskImage: `url("data:image/svg+xml,%3Csvg width='${te}' height='${ne}' viewBox='0 0 ${te} ${ne}' version='1.1' fill='${p.palette.text.icon ?? p.palette.action.active}' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cpath d='${y}' /%3E%3C/svg%3E%0A")`,
|
|
2010
|
+
maskRepeat: "no-repeat",
|
|
2011
|
+
maskPosition: C ? g ? "center center" : "bottom center" : g ? "left center" : "top center"
|
|
2012
|
+
}
|
|
2013
|
+
},
|
|
2014
|
+
elementBefore: ie,
|
|
2015
|
+
propsPaneBefore: ee,
|
|
2016
|
+
elementAfter: S,
|
|
2017
|
+
propsPaneAfter: v
|
|
2018
|
+
});
|
|
2019
|
+
}));
|
|
2020
|
+
zr.displayName = "StudioSplitPane";
|
|
2021
|
+
var Br = () => L("div", { style: {
|
|
2022
|
+
flex: "none",
|
|
2023
|
+
height: 0,
|
|
2024
|
+
borderTop: "solid var(--sxl-color-base-border, light-dark(rgba(0, 0, 0, 0.26), rgba(255, 255, 255, 0.3))) 1px"
|
|
2025
|
+
} }), Vr = (e, t) => {
|
|
2026
|
+
let n = (e) => L(O.Fragment, { children: t[e] }, e);
|
|
2027
|
+
if (e === "bottom") {
|
|
2028
|
+
let e = t.statusBar && t.formulaBar ? L(Br, {}, "divider") : null;
|
|
2029
|
+
return [
|
|
2030
|
+
n("toolbar"),
|
|
2031
|
+
n("main"),
|
|
2032
|
+
n("statusBar"),
|
|
2033
|
+
e,
|
|
2034
|
+
n("formulaBar")
|
|
2035
|
+
];
|
|
2036
|
+
}
|
|
2037
|
+
return [
|
|
2038
|
+
n("toolbar"),
|
|
2039
|
+
n("formulaBar"),
|
|
2040
|
+
n("main"),
|
|
2041
|
+
n("statusBar")
|
|
2042
|
+
];
|
|
2043
|
+
}, Hr = (e) => {
|
|
2044
|
+
let { groups: t } = e;
|
|
2045
|
+
return L(z, {
|
|
2046
|
+
role: "menu",
|
|
2047
|
+
sx: {
|
|
2048
|
+
paddingTop: "4px",
|
|
2049
|
+
paddingBottom: "4px"
|
|
2050
|
+
},
|
|
2051
|
+
children: t.map((e, t) => R(Je, { children: [t > 0 ? L(rt, { orientation: "horizontal" }) : null, e.map((e) => L(at, {
|
|
2052
|
+
role: e.checked === void 0 ? "menuitem" : "menuitemradio",
|
|
2053
|
+
"aria-checked": e.checked,
|
|
2054
|
+
disabled: e.disabled,
|
|
2055
|
+
selected: e.checked,
|
|
2056
|
+
icon: e.checked ? L(ct, {}) : void 0,
|
|
2057
|
+
onClick: e.run,
|
|
2058
|
+
children: e.label
|
|
2059
|
+
}, e.key))] }, t))
|
|
2060
|
+
});
|
|
2061
|
+
}, Ur = (e) => L(Hr, { ...e }), Wr = (e) => {
|
|
2062
|
+
let { pivot: t, name: n, source: r, onError: i } = e, a = Ke(), o = t.getWorksheet(), s = o.getProtection().isLocked(), c = N(() => ({ scope: o.getName() }), [o]), l = D((e, n) => {
|
|
2063
|
+
n.reason === "accept" && e !== t.getName() && t.setName(e).catch(i);
|
|
2064
|
+
}, [t, i]), u = D((e) => {
|
|
2065
|
+
if (e.length === 0 || e.length > 255) throw new Pt(a("error.pivotTable.nameInvalid"));
|
|
2066
|
+
let n = o.getPivotTables().getByName(e);
|
|
2067
|
+
if (n && n.getName() !== t.getName()) throw new Pt(a("error.pivotTable.nameExists"));
|
|
2068
|
+
}, [
|
|
2069
|
+
o,
|
|
2070
|
+
t,
|
|
2071
|
+
a
|
|
2072
|
+
]), d = D((e, n) => {
|
|
2073
|
+
if (n.reason !== "accept") return;
|
|
2074
|
+
let r = Wt(e);
|
|
2075
|
+
r && t.setSource(typeof r == "string" ? r : r.at(0)).catch(i);
|
|
2076
|
+
}, [t, i]);
|
|
2077
|
+
return R(z, {
|
|
2078
|
+
className: "sxl-pivot-table-header",
|
|
2079
|
+
sx: {
|
|
2080
|
+
display: "flex",
|
|
2081
|
+
flexDirection: "column",
|
|
2082
|
+
rowGap: (e) => e.spacing(1),
|
|
2083
|
+
paddingTop: (e) => e.spacing(1)
|
|
2084
|
+
},
|
|
2085
|
+
children: [L(ie, {
|
|
2086
|
+
formName: "name",
|
|
2087
|
+
value: n,
|
|
2088
|
+
changeOn: "done",
|
|
2089
|
+
onDone: l,
|
|
2090
|
+
onValidate: u,
|
|
2091
|
+
disabled: s
|
|
2092
|
+
}), L(re, {
|
|
2093
|
+
grammar: "reference",
|
|
2094
|
+
formName: "source",
|
|
2095
|
+
label: a("pivotTableNew.source"),
|
|
2096
|
+
value: r,
|
|
2097
|
+
allowMulti: !1,
|
|
2098
|
+
home: c,
|
|
2099
|
+
pickAs: "absolute",
|
|
2100
|
+
changeOn: "done",
|
|
2101
|
+
onDone: d,
|
|
2102
|
+
disabled: s || r === null
|
|
2103
|
+
})]
|
|
2104
|
+
});
|
|
2105
|
+
}, Gr = (e) => L(Wr, { ...e }), Kr = (e) => L(oe, {
|
|
2106
|
+
renderMenu: Ur,
|
|
2107
|
+
renderFilter: p,
|
|
2108
|
+
renderHeader: Gr,
|
|
2109
|
+
...e
|
|
2110
|
+
}), qr = mt(G("studio:dataValidationDetailsTaskPane", () => import("./CFz8KVBAQoF-AJHf.mjs"), { select: (e) => ({ default: e.DataValidationDetailsTaskPane }) }).load), Jr = zt({
|
|
2111
|
+
EagerStudio: () => Qr,
|
|
2112
|
+
default: () => Qr
|
|
2113
|
+
});
|
|
2114
|
+
s(), C.registerTaskPane({
|
|
2115
|
+
key: w.PivotTable,
|
|
2116
|
+
component: Kr
|
|
2117
|
+
}, !0), Te.register({
|
|
2118
|
+
key: "changeShapeGallery",
|
|
2119
|
+
contributions: { shapeToolbar: {
|
|
2120
|
+
order: -1,
|
|
2121
|
+
divider: "after"
|
|
2122
|
+
} },
|
|
2123
|
+
render: (e) => L(v, {
|
|
2124
|
+
...e,
|
|
2125
|
+
commandKey: "changeShape",
|
|
2126
|
+
excludeCategories: Vt
|
|
2127
|
+
})
|
|
2128
|
+
}, !0), he("shape", () => import("./D5IXaQlvCuPu8zeG.mjs").then((e) => e.ShapeFormatPanel)), he("chart", () => import("./BtbpQMP61r1e5s6G.mjs").then((e) => e.ChartFormatPanel)), (() => {
|
|
2129
|
+
let e = we.DefaultCommandButtonRegistry, t = [];
|
|
2130
|
+
t.push(e.register({
|
|
2131
|
+
key: "changePictureOptions",
|
|
2132
|
+
defaultKey: "changePictureFromFile",
|
|
2133
|
+
members: ["changePictureFromFile", "changePictureFromURL"],
|
|
2134
|
+
contributions: { pictureToolbar: { order: -3 } }
|
|
2135
|
+
}, !0)), t.push(e.register({
|
|
2136
|
+
key: "pictureHyperlinkOptions",
|
|
2137
|
+
defaultKey: "updatePictureHyperlink",
|
|
2138
|
+
members: [
|
|
2139
|
+
"updatePictureHyperlink",
|
|
2140
|
+
"openPictureHyperlink",
|
|
2141
|
+
"deletePictureHyperlink"
|
|
2142
|
+
],
|
|
2143
|
+
contributions: { pictureToolbar: { order: -2 } }
|
|
2144
|
+
}, !0)), t.push(e.register({
|
|
2145
|
+
key: "cropAspectOptions",
|
|
2146
|
+
members: [
|
|
2147
|
+
"cropAspect1x1",
|
|
2148
|
+
"-",
|
|
2149
|
+
"cropAspect2x3",
|
|
2150
|
+
"cropAspect3x4",
|
|
2151
|
+
"cropAspect3x5",
|
|
2152
|
+
"cropAspect4x5",
|
|
2153
|
+
"-",
|
|
2154
|
+
"cropAspect3x2",
|
|
2155
|
+
"cropAspect4x3",
|
|
2156
|
+
"cropAspect5x3",
|
|
2157
|
+
"cropAspect5x4",
|
|
2158
|
+
"cropAspect16x9",
|
|
2159
|
+
"cropAspect16x10"
|
|
2160
|
+
]
|
|
2161
|
+
}, !0)), t.push(e.register({
|
|
2162
|
+
key: "cropOptions",
|
|
2163
|
+
members: [
|
|
2164
|
+
{
|
|
2165
|
+
key: "cropToShapeGallery",
|
|
2166
|
+
render: (e) => L(v, {
|
|
2167
|
+
...e,
|
|
2168
|
+
commandKey: "cropToShape",
|
|
2169
|
+
excludeCategories: Vt
|
|
2170
|
+
})
|
|
2171
|
+
},
|
|
2172
|
+
"cropAspectOptions",
|
|
2173
|
+
"-",
|
|
2174
|
+
"cropFill",
|
|
2175
|
+
"cropFit"
|
|
2176
|
+
],
|
|
2177
|
+
contributions: { pictureToolbar: {
|
|
2178
|
+
order: -1,
|
|
2179
|
+
divider: "after"
|
|
2180
|
+
} }
|
|
2181
|
+
}, !0));
|
|
2182
|
+
})(), n(), C.registerTaskPane({
|
|
2183
|
+
key: w.DataValidation,
|
|
2184
|
+
component: qr
|
|
2185
|
+
}, !0), C.registerTaskPane({
|
|
2186
|
+
key: w.ConditionalFormat,
|
|
2187
|
+
component: Bt
|
|
2188
|
+
}, !0), a(), i(), r(), l(), e(), o(), d();
|
|
2189
|
+
var Yr = () => {
|
|
2190
|
+
let e, t, n = new Promise((n, r) => {
|
|
2191
|
+
e = n, t = r;
|
|
2192
|
+
}), r = {
|
|
2193
|
+
promise: n,
|
|
2194
|
+
settled: !1,
|
|
2195
|
+
resolve: (t) => {
|
|
2196
|
+
r.settled = !0, e(t);
|
|
2197
|
+
},
|
|
2198
|
+
reject: (e) => {
|
|
2199
|
+
r.settled = !0, t(e);
|
|
2200
|
+
}
|
|
2201
|
+
};
|
|
2202
|
+
return n.catch(() => {}), r;
|
|
2203
|
+
}, Xr = (e, t) => {
|
|
2204
|
+
if (!e) return {};
|
|
2205
|
+
let { colorSchemes: n, ...r } = e, i = n?.[t ? "dark" : "light"];
|
|
2206
|
+
return i && typeof i == "object" ? At.deepMerge(r, i) : r;
|
|
2207
|
+
}, Zr = "taskPanePosition", Qr = A(k((e, n) => {
|
|
2208
|
+
let { host: r, scopeClass: i, square: a, elevation: o, variant: s, onWorkbookLoad: l, onRenderSettled: d, prefetch: p, onDocumentError: g, renderDocumentError: _ = c, propsDocumentError: v, propsTaskPaneArea: y, renderTaskPaneArea: b = $r, taskPaneSide: x = "right", onKeyDown: re, workbook: ie, onWorkbookChange: S, logo: C, topLeft: ae, topRight: oe, muiTheme: ce, tokens: w, cssBaseline: he, autoFocus: be = !1, title: Te, onDirtyChange: ke, propsDocumentTitle: E, renderDocumentLoading: Pe = t, propsDocumentLoading: Le, propsWorkbook: Re, showFormulaBar: Ve, propsFormulaBar: He, renderFormulaBar: Ue, formulaBarPlacement: Ke, virtualKeyboard: O = "float", editable: qe, showStatusBar: Je, propsStatusBar: Ye, renderStatusBar: Xe, propsToolbar: k, renderToolbar: Ze } = e, A = P(null), Qe = P(null), $e = P(null), et = D(() => {
|
|
2209
|
+
$e.current?.getNamedCollectionEditorElement?.()?.focus?.();
|
|
2210
|
+
}, []), tt = ((e, t = typeof window > "u" ? "mouse" : je.detectIt().primaryInput) => e === "top" || e === "bottom" ? e : t === "touch" ? "bottom" : "top")(Ke), rt = tt === "bottom" ? O : "none", { inset: at, offsetTop: ot } = Be(rt === "resize"), ct = D(g ?? (() => {}), [g]), lt = D(ke ?? (() => {}), [ke]), ut = E?.placeHolder, [ft] = We(fe.Mode, de[fe.Mode]), { themeMode: pt } = Ge({ mode: ft ?? void 0 }), [mt] = We(Oe.Active, null), ht = P(mt);
|
|
2211
|
+
ht.current = mt;
|
|
2212
|
+
let I = N(() => ({
|
|
2213
|
+
light: dt(!1, At.deepMerge(Xr(ce, !1), u(w?.light?.app))),
|
|
2214
|
+
dark: dt(!0, At.deepMerge(Xr(ce, !0), u(w?.dark?.app)))
|
|
2215
|
+
}), [ce, w]), gt = pt === "dark", _t = N(() => m(I.light, I.dark, `.${i}`, w), [
|
|
2216
|
+
I,
|
|
2217
|
+
i,
|
|
2218
|
+
w
|
|
2219
|
+
]), vt = ge(), [yt, bt] = F(() => ie ?? null);
|
|
2220
|
+
M(() => {
|
|
2221
|
+
bt(ie ?? null);
|
|
2222
|
+
}, [ie]);
|
|
2223
|
+
let [xt, St] = F(0), B = P(null);
|
|
2224
|
+
B.current ||= Yr();
|
|
2225
|
+
let V = ye(yt, {
|
|
2226
|
+
io: T,
|
|
2227
|
+
defaultTheme: vt.getDefaultTheme(),
|
|
2228
|
+
reloadKey: xt
|
|
2229
|
+
}), H = V.status === "loaded" ? V.workbook : null, U = N(() => V.status === "error" ? {
|
|
2230
|
+
status: "error",
|
|
2231
|
+
error: V.error
|
|
2232
|
+
} : V.status === "loaded" ? {
|
|
2233
|
+
status: "loaded",
|
|
2234
|
+
workbook: V.workbook
|
|
2235
|
+
} : { status: "loading" }, [V]);
|
|
2236
|
+
M(() => {
|
|
2237
|
+
B.current.settled && (B.current = Yr());
|
|
2238
|
+
}, [yt, xt]), M(() => {
|
|
2239
|
+
if (U.status === "loaded") {
|
|
2240
|
+
let e = B.current, t = U.workbook;
|
|
2241
|
+
t.whenFontsReady().then(() => e.resolve(t), () => e.resolve(t));
|
|
2242
|
+
} else U.status === "error" && (ct?.(U.error), B.current.reject(U.error));
|
|
2243
|
+
}, [U]);
|
|
2244
|
+
let [W, Dt] = F(null);
|
|
2245
|
+
H && !W && Dt(H);
|
|
2246
|
+
let Ot = H && W && H !== W ? H : null, kt = P(Ot);
|
|
2247
|
+
kt.current = Ot;
|
|
2248
|
+
let jt = P(W);
|
|
2249
|
+
jt.current = W;
|
|
2250
|
+
let Nt = P([]), Pt = j((e) => {
|
|
2251
|
+
let t = jt.current;
|
|
2252
|
+
t && Nt.current.push(t), bt(e);
|
|
2253
|
+
}, []);
|
|
2254
|
+
M(() => {
|
|
2255
|
+
let e = Nt.current;
|
|
2256
|
+
if (e.length !== 0) {
|
|
2257
|
+
Nt.current = e.filter((e) => e === W);
|
|
2258
|
+
for (let t = 0; t < e.length; t++) {
|
|
2259
|
+
let n = e[t];
|
|
2260
|
+
if (n !== W) try {
|
|
2261
|
+
n.close();
|
|
2262
|
+
} catch (e) {
|
|
2263
|
+
console.warn("Unable to close the replaced workbook", e);
|
|
2264
|
+
}
|
|
2265
|
+
}
|
|
2266
|
+
}
|
|
2267
|
+
}, [W]);
|
|
2268
|
+
let Ft = qe ? null : W, G = ve(), It = N(() => {
|
|
2269
|
+
let e = Ft?.getSelectedWorksheet() ?? Ft?.getWorksheets().getItems({ visibility: "veryHidden" })[0];
|
|
2270
|
+
return e ? me(e, { referenceMode: G }) : null;
|
|
2271
|
+
}, [Ft, G]), K = qe ?? It, q = P(K);
|
|
2272
|
+
q.current = K, M(() => {
|
|
2273
|
+
if (!K) return;
|
|
2274
|
+
let e = K.getSession();
|
|
2275
|
+
return K.subscribe(() => {
|
|
2276
|
+
let t = e;
|
|
2277
|
+
if (e = K.getSession(), !t || e || t.getActiveEditorId() !== "formula-bar") return;
|
|
2278
|
+
let n = $e.current;
|
|
2279
|
+
(n?.isFocusWithin?.() ?? n?.contains?.(document.activeElement)) && A.current?.focus();
|
|
2280
|
+
});
|
|
2281
|
+
}, [K]);
|
|
2282
|
+
let Lt = Se(W), { isDirty: Rt, saveState: zt } = Ce(W, T), Bt = xe(W), Vt = P(zt), Ht = P(null);
|
|
2283
|
+
Vt.current = zt;
|
|
2284
|
+
let Ut = j(() => Vt.current?.isDirty() ?? !1, []), Wt = P(U);
|
|
2285
|
+
Wt.current = U;
|
|
2286
|
+
let [Gt, Kt] = F(null), qt = Te ?? E?.title, [Jt, Yt] = F(null);
|
|
2287
|
+
M(() => {
|
|
2288
|
+
Yt(null);
|
|
2289
|
+
}, [W]);
|
|
2290
|
+
let Xt = qt ?? Jt ?? Lt ?? "";
|
|
2291
|
+
M(() => {
|
|
2292
|
+
lt?.(Rt);
|
|
2293
|
+
}, [Rt]);
|
|
2294
|
+
let Zt = D(S ?? (() => {}), [S]);
|
|
2295
|
+
M(() => {
|
|
2296
|
+
Zt?.(H);
|
|
2297
|
+
}, [H]);
|
|
2298
|
+
let J = P(H);
|
|
2299
|
+
J.current = H, _e(W, "onViewChange");
|
|
2300
|
+
let Y = N(() => L(nt, {
|
|
2301
|
+
groupKey: "helpOptions",
|
|
2302
|
+
disableHover: !0,
|
|
2303
|
+
sx: { padding: "0" },
|
|
2304
|
+
propsButton: { sx: { maxHeight: "22px" } }
|
|
2305
|
+
}), []), [Qt, $t] = F(null), en = j((e) => {
|
|
2306
|
+
$t(e);
|
|
2307
|
+
}, []);
|
|
2308
|
+
M(() => {
|
|
2309
|
+
Ee.prefetch([Ee.getActive(), se]).catch((e) => {
|
|
2310
|
+
console.warn("Icons could not be loaded:", e);
|
|
2311
|
+
});
|
|
2312
|
+
}, []);
|
|
2313
|
+
let tn = P(null);
|
|
2314
|
+
tn.current ||= Yr();
|
|
2315
|
+
let nn = P(null), X = j(() => nn.current?.getSheetElement()?.getGridSurface()?.getPane()?.getElement() ?? tn.current.promise, []), rn = D(async (e) => {
|
|
2316
|
+
let t = ht.current;
|
|
2317
|
+
t && t !== Mt.getActive() && await Mt.setActive(t), await we.DefaultCommandCatalogService.prefetch(t ?? void 0), Kt(e), nn.current = e.source, tn.current.settled || tn.current.resolve(e.source.getSheetElement()?.getGridSurface()?.getPane()?.getElement() ?? null), l?.(e);
|
|
2318
|
+
}, []), an = P(null), on = j((e) => {
|
|
2319
|
+
let t = null, n = {
|
|
2320
|
+
readOnly: !0,
|
|
2321
|
+
...E
|
|
2322
|
+
};
|
|
2323
|
+
return E?.hidden || (t = L(ee, {
|
|
2324
|
+
...n,
|
|
2325
|
+
style: {
|
|
2326
|
+
maxWidth: "100%",
|
|
2327
|
+
...E?.style
|
|
2328
|
+
},
|
|
2329
|
+
workbook: e.workbook ?? A.current,
|
|
2330
|
+
ref: an,
|
|
2331
|
+
title: Xt,
|
|
2332
|
+
modified: Rt,
|
|
2333
|
+
encrypted: Bt,
|
|
2334
|
+
placeHolder: ut,
|
|
2335
|
+
onTitleChange: (e) => {
|
|
2336
|
+
Yt(e), E?.onTitleChange?.(e);
|
|
2337
|
+
}
|
|
2338
|
+
})), L(br, {
|
|
2339
|
+
...e,
|
|
2340
|
+
logo: C,
|
|
2341
|
+
mainElement: t,
|
|
2342
|
+
startElement: ae,
|
|
2343
|
+
endElement: oe
|
|
2344
|
+
});
|
|
2345
|
+
}, [
|
|
2346
|
+
C,
|
|
2347
|
+
Xt,
|
|
2348
|
+
Rt,
|
|
2349
|
+
Bt,
|
|
2350
|
+
E,
|
|
2351
|
+
ae,
|
|
2352
|
+
oe
|
|
2353
|
+
]);
|
|
2354
|
+
M(() => {
|
|
2355
|
+
let e = A.current;
|
|
2356
|
+
if (!e) return;
|
|
2357
|
+
let t = (t) => {
|
|
2358
|
+
(t.ctrlKey || t.metaKey || Ne.getWheelOwner(t, e) !== "native") && t.preventDefault();
|
|
2359
|
+
};
|
|
2360
|
+
return e.addEventListener("wheel", t, { passive: !1 }), () => {
|
|
2361
|
+
e.removeEventListener("wheel", t);
|
|
2362
|
+
};
|
|
2363
|
+
}, [Gt]);
|
|
2364
|
+
let [sn, cn] = F(null);
|
|
2365
|
+
M(() => {
|
|
2366
|
+
cn(Gt?.source?.getCommandScope?.() ?? null);
|
|
2367
|
+
}, [Gt]);
|
|
2368
|
+
let ln = N(() => ({
|
|
2369
|
+
"& .SnackbarContainer-root": { position: "absolute !important" },
|
|
2370
|
+
"& .notistack-SnackbarContainer > div": { maxWidth: "min(100%, 720px)" },
|
|
2371
|
+
"& .notistack-Snackbar": { minWidth: "unset" },
|
|
2372
|
+
"& .notistack-Snackbar > .error-snackbar .MuiTypography-root": { color: (e) => e.palette.getContrastText(e.palette.error.main) },
|
|
2373
|
+
"& .notistack-Snackbar > .error-snackbar .MuiCardActions-root": { color: (e) => e.palette.getContrastText(e.palette.error.main) },
|
|
2374
|
+
"& .notistack-Snackbar > .error-snackbar .MuiButtonBase-root": { color: (e) => e.palette.getContrastText(e.palette.error.main) },
|
|
2375
|
+
"& .notistack-MuiContent *": { fontFamily: (e) => e.typography.fontFamily },
|
|
2376
|
+
"& #notistack-snackbar": {
|
|
2377
|
+
maxWidth: "560px",
|
|
2378
|
+
whiteSpace: "pre-wrap"
|
|
2379
|
+
},
|
|
2380
|
+
"*": { userSelect: "none" }
|
|
2381
|
+
}), []), [Z, un] = F(null), [, dn] = We(null, !1);
|
|
2382
|
+
M(() => {
|
|
2383
|
+
dn(Z != null);
|
|
2384
|
+
}, [Z, dn]);
|
|
2385
|
+
let fn = j((e) => b({
|
|
2386
|
+
model: W,
|
|
2387
|
+
side: x,
|
|
2388
|
+
...e,
|
|
2389
|
+
...y
|
|
2390
|
+
}), [
|
|
2391
|
+
W,
|
|
2392
|
+
x,
|
|
2393
|
+
y
|
|
2394
|
+
]), pn = P(r);
|
|
2395
|
+
pn.current = r, ze(n, () => ({
|
|
2396
|
+
isStudioElement: () => !0,
|
|
2397
|
+
save: (e) => {
|
|
2398
|
+
let t = Ht.current;
|
|
2399
|
+
return t ? t(e) : Promise.reject(/* @__PURE__ */ Error("The studio cannot save: no workbook, or the backing store cannot write."));
|
|
2400
|
+
},
|
|
2401
|
+
getWorkbookElement: () => A.current,
|
|
2402
|
+
getWorkbook: () => J.current ?? null,
|
|
2403
|
+
isDirty: () => Vt.current?.isDirty() ?? !1,
|
|
2404
|
+
getEditable: () => q.current,
|
|
2405
|
+
getFormulaBarElement: () => $e.current ?? null,
|
|
2406
|
+
focus: () => A.current?.focus(),
|
|
2407
|
+
whenReady: () => (B.current ||= Yr(), B.current.promise),
|
|
2408
|
+
getWorkbookState: () => Wt.current,
|
|
2409
|
+
retry: () => St((e) => e + 1)
|
|
2410
|
+
}), [], r);
|
|
2411
|
+
let Q = P(!1), mn = D(async (e, t) => {
|
|
2412
|
+
t === kt.current && (Q.current = pn.current?.contains(document.activeElement) ?? !0, Dt(t), await rn(e), d?.(e));
|
|
2413
|
+
}, []);
|
|
2414
|
+
M(() => {
|
|
2415
|
+
Q.current && (Q.current = !1, A.current?.focus());
|
|
2416
|
+
}, [W]);
|
|
2417
|
+
let hn = j((e) => {
|
|
2418
|
+
let { ref: t, ...n } = e, r = gt ? I.dark : I.light, i = U.status === "error" && _ ? L(Me, {
|
|
2419
|
+
render: _,
|
|
2420
|
+
props: {
|
|
2421
|
+
...v,
|
|
2422
|
+
style: {
|
|
2423
|
+
width: "100%",
|
|
2424
|
+
height: "100%",
|
|
2425
|
+
...v?.style
|
|
2426
|
+
},
|
|
2427
|
+
error: U.error
|
|
2428
|
+
}
|
|
2429
|
+
}) : null;
|
|
2430
|
+
if (i && !W) return L(wt, {
|
|
2431
|
+
style: {
|
|
2432
|
+
width: "100%",
|
|
2433
|
+
height: "100%",
|
|
2434
|
+
position: "absolute",
|
|
2435
|
+
display: "flex",
|
|
2436
|
+
alignItems: "stretch",
|
|
2437
|
+
justifyContent: "stretch"
|
|
2438
|
+
},
|
|
2439
|
+
children: i
|
|
2440
|
+
});
|
|
2441
|
+
let c = null;
|
|
2442
|
+
if (W) {
|
|
2443
|
+
let e = W, i = e.getView(), a = Ve ?? i?.isShowFormulaBar(), o = Je ?? i?.isShowStatusBar(), s = Gt?.source ?? A.current, l = L(Me, {
|
|
2444
|
+
render: Ze === void 0 ? on : Ze,
|
|
2445
|
+
props: {
|
|
2446
|
+
workbook: s,
|
|
2447
|
+
...k
|
|
2448
|
+
}
|
|
2449
|
+
}), u = tt === "bottom", m = a ? L(Me, {
|
|
2450
|
+
render: Ue === void 0 ? f : Ue,
|
|
2451
|
+
props: {
|
|
2452
|
+
ref: $e,
|
|
2453
|
+
style: {
|
|
2454
|
+
marginTop: r.spacing(u ? .5 : .25),
|
|
2455
|
+
marginLeft: r.spacing(1),
|
|
2456
|
+
marginRight: r.spacing(1),
|
|
2457
|
+
marginBottom: r.spacing(u ? .5 : .75)
|
|
2458
|
+
},
|
|
2459
|
+
workbook: e,
|
|
2460
|
+
editable: K ?? void 0,
|
|
2461
|
+
placement: tt,
|
|
2462
|
+
floatOnKeyboard: rt === "float",
|
|
2463
|
+
...He,
|
|
2464
|
+
propsNamedCollectionEditor: {
|
|
2465
|
+
restoreFocus: (e) => s?.focus(e),
|
|
2466
|
+
...He?.propsNamedCollectionEditor
|
|
2467
|
+
}
|
|
2468
|
+
}
|
|
2469
|
+
}) : null, g = o ? L(Me, {
|
|
2470
|
+
render: Xe === void 0 ? te : Xe,
|
|
2471
|
+
props: {
|
|
2472
|
+
childrenEnd: Y,
|
|
2473
|
+
...Ye
|
|
2474
|
+
}
|
|
2475
|
+
}) : null, _ = (e, r) => L(h, {
|
|
2476
|
+
...Re,
|
|
2477
|
+
tabIndex: 0,
|
|
2478
|
+
autoFocus: !r && be,
|
|
2479
|
+
workbook: e,
|
|
2480
|
+
editable: r ? void 0 : K ?? void 0,
|
|
2481
|
+
focusNameBox: r ? void 0 : et,
|
|
2482
|
+
prefetch: !r && p,
|
|
2483
|
+
ref: r ? Qe : ne([t, A]),
|
|
2484
|
+
onWorkbookLoad: r ? void 0 : rn,
|
|
2485
|
+
onRenderSettled: r ? (t) => {
|
|
2486
|
+
mn(t, e);
|
|
2487
|
+
} : d,
|
|
2488
|
+
onKeyDown: (e) => {
|
|
2489
|
+
re?.(e);
|
|
2490
|
+
},
|
|
2491
|
+
propsWorkbookLoading: Le,
|
|
2492
|
+
renderWorkbookLoading: null,
|
|
2493
|
+
style: r ? {
|
|
2494
|
+
...Re?.style,
|
|
2495
|
+
position: "absolute",
|
|
2496
|
+
inset: 0,
|
|
2497
|
+
visibility: "hidden"
|
|
2498
|
+
} : {
|
|
2499
|
+
flex: "1 1 100%",
|
|
2500
|
+
minHeight: 0,
|
|
2501
|
+
...Re?.style
|
|
2502
|
+
},
|
|
2503
|
+
onContextMenu: (e) => e.preventDefault(),
|
|
2504
|
+
...r ? null : n
|
|
2505
|
+
}, e.getId());
|
|
2506
|
+
c = L("div", {
|
|
2507
|
+
style: {
|
|
2508
|
+
display: "flex",
|
|
2509
|
+
flexDirection: "column",
|
|
2510
|
+
flex: "1 1 100%",
|
|
2511
|
+
minWidth: 0,
|
|
2512
|
+
minHeight: 0
|
|
2513
|
+
},
|
|
2514
|
+
children: Vr(tt, {
|
|
2515
|
+
toolbar: l,
|
|
2516
|
+
formulaBar: m,
|
|
2517
|
+
statusBar: g,
|
|
2518
|
+
main: L(zr, {
|
|
2519
|
+
taskSide: x,
|
|
2520
|
+
persistKey: Zr,
|
|
2521
|
+
sidebarElement: Z ? L(we.CommandScopeProvider, {
|
|
2522
|
+
scope: sn,
|
|
2523
|
+
children: Z
|
|
2524
|
+
}) : void 0,
|
|
2525
|
+
mainElement: R("div", {
|
|
2526
|
+
style: {
|
|
2527
|
+
position: "relative",
|
|
2528
|
+
display: "flex",
|
|
2529
|
+
flexDirection: "column",
|
|
2530
|
+
flex: "1 1 100%",
|
|
2531
|
+
minWidth: 0,
|
|
2532
|
+
minHeight: 0
|
|
2533
|
+
},
|
|
2534
|
+
children: [[_(W, !1), Ot ? _(Ot, !0) : null], L(z, {
|
|
2535
|
+
ref: en,
|
|
2536
|
+
sx: {
|
|
2537
|
+
position: "absolute",
|
|
2538
|
+
top: "10%",
|
|
2539
|
+
left: 0,
|
|
2540
|
+
right: 0,
|
|
2541
|
+
bottom: 0,
|
|
2542
|
+
pointerEvents: "none",
|
|
2543
|
+
"& > :first-of-type": { position: "relative" }
|
|
2544
|
+
}
|
|
2545
|
+
})]
|
|
2546
|
+
})
|
|
2547
|
+
})
|
|
2548
|
+
})
|
|
2549
|
+
});
|
|
2550
|
+
}
|
|
2551
|
+
let l = !Gt && Pe ? L(Me, {
|
|
2552
|
+
render: Pe,
|
|
2553
|
+
props: { ...Le }
|
|
2554
|
+
}) : null;
|
|
2555
|
+
return R(wt, {
|
|
2556
|
+
sx: ln,
|
|
2557
|
+
style: {
|
|
2558
|
+
width: "100%",
|
|
2559
|
+
height: at ? `calc(100% - ${at}px)` : "100%",
|
|
2560
|
+
transform: ot ? `translateY(${ot}px)` : void 0,
|
|
2561
|
+
position: "absolute",
|
|
2562
|
+
display: "flex",
|
|
2563
|
+
alignItems: "stretch",
|
|
2564
|
+
justifyContent: "stretch",
|
|
2565
|
+
backgroundColor: "var(--sxl-color-base-200)"
|
|
2566
|
+
},
|
|
2567
|
+
className: "eager-studio",
|
|
2568
|
+
square: a,
|
|
2569
|
+
elevation: o,
|
|
2570
|
+
variant: s,
|
|
2571
|
+
children: [
|
|
2572
|
+
c,
|
|
2573
|
+
i ? L(wt, {
|
|
2574
|
+
style: {
|
|
2575
|
+
position: "absolute",
|
|
2576
|
+
inset: 0,
|
|
2577
|
+
display: "flex",
|
|
2578
|
+
alignItems: "stretch",
|
|
2579
|
+
justifyContent: "stretch"
|
|
2580
|
+
},
|
|
2581
|
+
children: i
|
|
2582
|
+
}) : null,
|
|
2583
|
+
l ? L("div", {
|
|
2584
|
+
style: {
|
|
2585
|
+
position: "absolute",
|
|
2586
|
+
inset: 0,
|
|
2587
|
+
display: "flex",
|
|
2588
|
+
alignItems: "center",
|
|
2589
|
+
justifyContent: "center",
|
|
2590
|
+
background: `var(--sxl-color-base-100, ${gt ? "#121212" : "#fff"})`
|
|
2591
|
+
},
|
|
2592
|
+
children: l
|
|
2593
|
+
}) : null
|
|
2594
|
+
]
|
|
2595
|
+
});
|
|
2596
|
+
}, [
|
|
2597
|
+
U,
|
|
2598
|
+
W,
|
|
2599
|
+
Ot,
|
|
2600
|
+
Gt,
|
|
2601
|
+
Xt,
|
|
2602
|
+
Pe,
|
|
2603
|
+
Le,
|
|
2604
|
+
Re,
|
|
2605
|
+
a,
|
|
2606
|
+
o,
|
|
2607
|
+
s,
|
|
2608
|
+
Y,
|
|
2609
|
+
_,
|
|
2610
|
+
v,
|
|
2611
|
+
on,
|
|
2612
|
+
ln,
|
|
2613
|
+
Z,
|
|
2614
|
+
x,
|
|
2615
|
+
sn,
|
|
2616
|
+
Ve,
|
|
2617
|
+
He,
|
|
2618
|
+
Ue,
|
|
2619
|
+
tt,
|
|
2620
|
+
K,
|
|
2621
|
+
Je,
|
|
2622
|
+
Ye,
|
|
2623
|
+
Xe,
|
|
2624
|
+
k,
|
|
2625
|
+
Ze,
|
|
2626
|
+
rt,
|
|
2627
|
+
at,
|
|
2628
|
+
ot,
|
|
2629
|
+
I,
|
|
2630
|
+
gt
|
|
2631
|
+
]), gn = L(gr, {
|
|
2632
|
+
maxSnack: 3,
|
|
2633
|
+
domRoot: Qt ?? void 0,
|
|
2634
|
+
anchorOrigin: {
|
|
2635
|
+
vertical: "bottom",
|
|
2636
|
+
horizontal: "right"
|
|
2637
|
+
},
|
|
2638
|
+
autoHideDuration: 3500,
|
|
2639
|
+
onClose: (e, t, n) => {
|
|
2640
|
+
A.current?.focus();
|
|
2641
|
+
},
|
|
2642
|
+
Components: { error: vr },
|
|
2643
|
+
iconVariant: {
|
|
2644
|
+
success: L(Tt, {
|
|
2645
|
+
style: { marginRight: "8px" },
|
|
2646
|
+
children: L("path", { d: "M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z" })
|
|
2647
|
+
}),
|
|
2648
|
+
error: L(De, {
|
|
2649
|
+
iconKey: "ErrorAlert",
|
|
2650
|
+
style: { marginRight: "8px" }
|
|
2651
|
+
})
|
|
2652
|
+
},
|
|
2653
|
+
children: L(pe, {
|
|
2654
|
+
workbook: W,
|
|
2655
|
+
children: L(le, {
|
|
2656
|
+
renderArea: fn,
|
|
2657
|
+
onUpdateArea: (e) => {
|
|
2658
|
+
un(e);
|
|
2659
|
+
},
|
|
2660
|
+
children: L(st, { children: L(jr, { children: L(Ie, { children: L(Ae, { children: L(Or, {
|
|
2661
|
+
workbook: W,
|
|
2662
|
+
initialCommandAnchor: X,
|
|
2663
|
+
renderWorkbook: hn,
|
|
2664
|
+
setWorkbook: Pt,
|
|
2665
|
+
titleWorkbook: Xt,
|
|
2666
|
+
setWorkbookTitle: Yt,
|
|
2667
|
+
refDocumentTitle: an,
|
|
2668
|
+
isDirty: Ut,
|
|
2669
|
+
refSave: Ht,
|
|
2670
|
+
host: r
|
|
2671
|
+
}) }) }) }) })
|
|
2672
|
+
})
|
|
2673
|
+
})
|
|
2674
|
+
});
|
|
2675
|
+
return gn = R(Et, {
|
|
2676
|
+
theme: gt ? I.dark : I.light,
|
|
2677
|
+
children: [
|
|
2678
|
+
he ? L(Ct, {}) : null,
|
|
2679
|
+
L(Fe, { css: _t }),
|
|
2680
|
+
L(ue, { scopeClass: i }),
|
|
2681
|
+
L(it, {
|
|
2682
|
+
themeScopeClass: i,
|
|
2683
|
+
themeSurface: "app",
|
|
2684
|
+
themeMode: pt,
|
|
2685
|
+
children: gn
|
|
2686
|
+
})
|
|
2687
|
+
]
|
|
2688
|
+
}), gn;
|
|
2689
|
+
}));
|
|
2690
|
+
Qr.displayName = "EagerStudio";
|
|
2691
|
+
var $r = (e) => L(Fr, { ...e });
|
|
2692
|
+
export { Qr as EagerStudio, Qr as default, Wt as n, Jr as t };
|