streamlit 1.51.0__py3-none-any.whl → 1.52.1__py3-none-any.whl
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.
- streamlit/__init__.py +1 -0
- streamlit/commands/execution_control.py +89 -14
- streamlit/components/v1/component_arrow.py +7 -7
- streamlit/components/v2/__init__.py +59 -3
- streamlit/components/v2/bidi_component/main.py +161 -13
- streamlit/components/v2/bidi_component/serialization.py +13 -6
- streamlit/components/v2/component_manager.py +11 -3
- streamlit/components/v2/component_registry.py +18 -1
- streamlit/components/v2/types.py +2 -2
- streamlit/connections/snowflake_connection.py +1 -1
- streamlit/connections/snowpark_connection.py +1 -1
- streamlit/dataframe_util.py +18 -18
- streamlit/delta_generator.py +7 -0
- streamlit/delta_generator_singletons.py +8 -14
- streamlit/elements/alert.py +16 -0
- streamlit/elements/arrow.py +36 -6
- streamlit/elements/bokeh_chart.py +10 -78
- streamlit/elements/code.py +2 -2
- streamlit/elements/deck_gl_json_chart.py +1 -1
- streamlit/elements/exception.py +1 -1
- streamlit/elements/form.py +27 -0
- streamlit/elements/heading.py +60 -5
- streamlit/elements/html.py +13 -2
- streamlit/elements/image.py +1 -1
- streamlit/elements/layouts.py +28 -22
- streamlit/elements/lib/built_in_chart_utils.py +49 -16
- streamlit/elements/lib/color_util.py +1 -1
- streamlit/elements/lib/column_config_utils.py +6 -5
- streamlit/elements/lib/layout_utils.py +50 -0
- streamlit/elements/lib/pandas_styler_utils.py +17 -9
- streamlit/elements/lib/shortcut_utils.py +152 -0
- streamlit/elements/markdown.py +50 -3
- streamlit/elements/metric.py +31 -1
- streamlit/elements/plotly_chart.py +75 -6
- streamlit/elements/spinner.py +1 -1
- streamlit/elements/text.py +20 -3
- streamlit/elements/toast.py +2 -0
- streamlit/elements/vega_charts.py +17 -1
- streamlit/elements/widgets/audio_input.py +8 -7
- streamlit/elements/widgets/button.py +279 -40
- streamlit/elements/widgets/button_group.py +27 -2
- streamlit/elements/widgets/camera_input.py +1 -1
- streamlit/elements/widgets/chat.py +300 -42
- streamlit/elements/widgets/color_picker.py +7 -0
- streamlit/elements/widgets/data_editor.py +68 -28
- streamlit/elements/widgets/file_uploader.py +4 -1
- streamlit/elements/widgets/number_input.py +2 -0
- streamlit/elements/widgets/text_widgets.py +2 -0
- streamlit/elements/widgets/time_widgets.py +581 -9
- streamlit/errors.py +22 -0
- streamlit/git_util.py +1 -1
- streamlit/navigation/page.py +7 -0
- streamlit/net_util.py +2 -2
- streamlit/proto/Alert_pb2.pyi +3 -3
- streamlit/proto/AppPage_pb2.pyi +7 -1
- streamlit/proto/ArrowData_pb2.pyi +7 -1
- streamlit/proto/ArrowNamedDataSet_pb2.pyi +7 -1
- streamlit/proto/ArrowVegaLiteChart_pb2.pyi +7 -1
- streamlit/proto/Arrow_pb2.py +10 -10
- streamlit/proto/Arrow_pb2.pyi +19 -12
- streamlit/proto/AudioInput_pb2.pyi +7 -1
- streamlit/proto/Audio_pb2.pyi +7 -1
- streamlit/proto/AuthRedirect_pb2.pyi +7 -1
- streamlit/proto/AutoRerun_pb2.pyi +7 -1
- streamlit/proto/BackMsg_pb2.py +4 -2
- streamlit/proto/BackMsg_pb2.pyi +34 -4
- streamlit/proto/Balloons_pb2.pyi +7 -1
- streamlit/proto/BidiComponent_pb2.pyi +10 -4
- streamlit/proto/Block_pb2.pyi +35 -35
- streamlit/proto/BokehChart_pb2.pyi +7 -1
- streamlit/proto/ButtonGroup_pb2.pyi +9 -9
- streamlit/proto/Button_pb2.py +2 -2
- streamlit/proto/Button_pb2.pyi +11 -2
- streamlit/proto/CameraInput_pb2.pyi +7 -1
- streamlit/proto/ChatInput_pb2.py +6 -6
- streamlit/proto/ChatInput_pb2.pyi +18 -6
- streamlit/proto/Checkbox_pb2.pyi +3 -3
- streamlit/proto/ClientState_pb2.pyi +10 -4
- streamlit/proto/Code_pb2.pyi +7 -1
- streamlit/proto/ColorPicker_pb2.pyi +7 -1
- streamlit/proto/Common_pb2.py +3 -3
- streamlit/proto/Common_pb2.pyi +35 -23
- streamlit/proto/Components_pb2.pyi +19 -13
- streamlit/proto/DataFrame_pb2.pyi +55 -49
- streamlit/proto/DateInput_pb2.pyi +7 -1
- streamlit/proto/DateTimeInput_pb2.py +28 -0
- streamlit/proto/DateTimeInput_pb2.pyi +92 -0
- streamlit/proto/DeckGlJsonChart_pb2.pyi +3 -3
- streamlit/proto/Delta_pb2.pyi +7 -1
- streamlit/proto/DocString_pb2.pyi +10 -4
- streamlit/proto/DownloadButton_pb2.py +2 -2
- streamlit/proto/DownloadButton_pb2.pyi +16 -2
- streamlit/proto/Element_pb2.py +5 -3
- streamlit/proto/Element_pb2.pyi +23 -5
- streamlit/proto/Empty_pb2.pyi +7 -1
- streamlit/proto/Exception_pb2.pyi +7 -1
- streamlit/proto/Favicon_pb2.pyi +7 -1
- streamlit/proto/FileUploader_pb2.pyi +7 -1
- streamlit/proto/ForwardMsg_pb2.py +12 -10
- streamlit/proto/ForwardMsg_pb2.pyi +42 -15
- streamlit/proto/GapSize_pb2.pyi +4 -4
- streamlit/proto/GitInfo_pb2.pyi +3 -3
- streamlit/proto/GraphVizChart_pb2.pyi +7 -1
- streamlit/proto/Heading_pb2.pyi +7 -1
- streamlit/proto/HeightConfig_pb2.pyi +7 -1
- streamlit/proto/Html_pb2.py +2 -2
- streamlit/proto/Html_pb2.pyi +11 -2
- streamlit/proto/IFrame_pb2.pyi +7 -1
- streamlit/proto/Image_pb2.pyi +10 -4
- streamlit/proto/Json_pb2.pyi +7 -1
- streamlit/proto/LabelVisibilityMessage_pb2.pyi +3 -3
- streamlit/proto/LinkButton_pb2.py +2 -2
- streamlit/proto/LinkButton_pb2.pyi +15 -2
- streamlit/proto/Logo_pb2.pyi +7 -1
- streamlit/proto/Markdown_pb2.pyi +3 -3
- streamlit/proto/Metric_pb2.pyi +7 -7
- streamlit/proto/MetricsEvent_pb2.pyi +10 -4
- streamlit/proto/MultiSelect_pb2.pyi +7 -1
- streamlit/proto/NamedDataSet_pb2.pyi +7 -1
- streamlit/proto/Navigation_pb2.pyi +3 -3
- streamlit/proto/NewSession_pb2.pyi +40 -40
- streamlit/proto/NumberInput_pb2.pyi +3 -3
- streamlit/proto/PageConfig_pb2.pyi +7 -7
- streamlit/proto/PageInfo_pb2.pyi +7 -1
- streamlit/proto/PageLink_pb2.py +2 -2
- streamlit/proto/PageLink_pb2.pyi +11 -2
- streamlit/proto/PageNotFound_pb2.pyi +7 -1
- streamlit/proto/PageProfile_pb2.pyi +13 -7
- streamlit/proto/PagesChanged_pb2.pyi +7 -1
- streamlit/proto/ParentMessage_pb2.pyi +7 -1
- streamlit/proto/PlotlyChart_pb2.pyi +6 -6
- streamlit/proto/Progress_pb2.pyi +7 -1
- streamlit/proto/Radio_pb2.pyi +7 -1
- streamlit/proto/RootContainer_pb2.pyi +1 -1
- streamlit/proto/Selectbox_pb2.pyi +7 -1
- streamlit/proto/SessionEvent_pb2.pyi +7 -1
- streamlit/proto/SessionStatus_pb2.pyi +7 -1
- streamlit/proto/Skeleton_pb2.pyi +3 -3
- streamlit/proto/Slider_pb2.pyi +5 -5
- streamlit/proto/Snow_pb2.pyi +7 -1
- streamlit/proto/Space_pb2.pyi +7 -1
- streamlit/proto/Spinner_pb2.pyi +7 -1
- streamlit/proto/TextAlignmentConfig_pb2.py +29 -0
- streamlit/proto/TextAlignmentConfig_pb2.pyi +68 -0
- streamlit/proto/TextArea_pb2.pyi +7 -1
- streamlit/proto/TextInput_pb2.pyi +3 -3
- streamlit/proto/Text_pb2.pyi +7 -1
- streamlit/proto/TimeInput_pb2.pyi +7 -1
- streamlit/proto/Toast_pb2.pyi +7 -1
- streamlit/proto/VegaLiteChart_pb2.pyi +7 -1
- streamlit/proto/Video_pb2.pyi +6 -6
- streamlit/proto/WidgetStates_pb2.pyi +10 -4
- streamlit/proto/WidthConfig_pb2.pyi +7 -1
- streamlit/proto/openmetrics_data_model_pb2.pyi +52 -52
- streamlit/runtime/app_session.py +38 -1
- streamlit/runtime/caching/cache_data_api.py +1 -1
- streamlit/runtime/caching/cache_resource_api.py +2 -2
- streamlit/runtime/caching/cache_utils.py +1 -1
- streamlit/runtime/caching/hashing.py +1 -1
- streamlit/runtime/download_data_util.py +53 -0
- streamlit/runtime/forward_msg_queue.py +1 -0
- streamlit/runtime/media_file_manager.py +178 -2
- streamlit/runtime/metrics_util.py +87 -3
- streamlit/runtime/scriptrunner/script_runner.py +3 -1
- streamlit/runtime/state/query_params.py +80 -29
- streamlit/runtime/state/session_state.py +2 -2
- streamlit/static/index.html +1 -1
- streamlit/static/manifest.json +530 -229
- streamlit/static/static/js/{ErrorOutline.esm.YoJdlW1p.js → ErrorOutline.esm.sMJdFExW.js} +1 -1
- streamlit/static/static/js/{FileDownload.esm.Ddx8VEYy.js → FileDownload.esm.CV-WYqBn.js} +1 -1
- streamlit/static/static/js/{FileHelper.90EtOmj9.js → FileHelper.5nCh9KDY.js} +3 -3
- streamlit/static/static/js/{FormClearHelper.BB1Km6eP.js → FormClearHelper.-9RbsnV0.js} +1 -1
- streamlit/static/static/js/IFrameUtil.DefezniK.js +1 -0
- streamlit/static/static/js/InputInstructions.2R3tBtW9.js +1 -0
- streamlit/static/static/js/Particles.DDHoXFxh.js +1 -0
- streamlit/static/static/js/{ProgressBar.DLY8H6nE.js → ProgressBar.BxmfHxKu.js} +2 -2
- streamlit/static/static/js/StreamlitSyntaxHighlighter.BFWV0oqR.js +20 -0
- streamlit/static/static/js/{Toolbar.D8nHCkuz.js → Toolbar.DMgU0Vgw.js} +1 -1
- streamlit/static/static/js/_arrayIncludes.B19Iyn2B.js +1 -0
- streamlit/static/static/js/_baseIndexOf.BTknn6Gb.js +1 -0
- streamlit/static/static/js/{base-input.CJGiNqed.js → base-input.BXTqYbyG.js} +4 -4
- streamlit/static/static/js/{checkbox.Cpdd482O.js → checkbox.5xWaqPqm.js} +1 -1
- streamlit/static/static/js/{createSuper.CuQIogbW.js → createSuper.OIgV8wc-.js} +1 -1
- streamlit/static/static/js/data-grid-overlay-editor.B4RIu9cw.js +1 -0
- streamlit/static/static/js/{downloader.CN0K7xlu.js → downloader.DwCJck8O.js} +1 -1
- streamlit/static/static/js/embed.HKcgTiLB.js +195 -0
- streamlit/static/static/js/{es6.BJcsVXQ0.js → es6.4AP97RGk.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.XzUvQqcZ.js → iframeResizer.contentWindow.BZAsvL9q.js} +1 -1
- streamlit/static/static/js/index.-3selq_5.js +2 -0
- streamlit/static/static/js/index.1ylynMAS.js +7 -0
- streamlit/static/static/js/{index.CxIUUfab.js → index.6UunrySF.js} +53 -122
- streamlit/static/static/js/index.8HslT92O.js +14 -0
- streamlit/static/static/js/index.B0TPxAZ1.js +1 -0
- streamlit/static/static/js/index.B0yp3bM1.js +6 -0
- streamlit/static/static/js/index.BHWBaOWH.js +1 -0
- streamlit/static/static/js/index.BJas6XzW.js +1 -0
- streamlit/static/static/js/index.BKIlG7Ng.js +3 -0
- streamlit/static/static/js/index.BMU6zZRk.js +1 -0
- streamlit/static/static/js/index.BNMLO-0p.js +2 -0
- streamlit/static/static/js/index.BPmBNTel.js +1 -0
- streamlit/static/static/js/index.BVuohWM1.js +1 -0
- streamlit/static/static/js/index.B_AvdOKC.js +1 -0
- streamlit/static/static/js/index.BjQIH-3U.js +1 -0
- streamlit/static/static/js/index.BrqtKtSu.js +2 -0
- streamlit/static/static/js/index.Buc7XrOl.js +188 -0
- streamlit/static/static/js/index.CIC9pLsG.js +2 -0
- streamlit/static/static/js/index.CP2YZ73v.js +1 -0
- streamlit/static/static/js/index.CSbah0y4.js +27 -0
- streamlit/static/static/js/index.CbiYVMT1.js +1 -0
- streamlit/static/static/js/index.CbxllBj8.js +1 -0
- streamlit/static/static/js/index.Cd1D2eGF.js +263 -0
- streamlit/static/static/js/index.Ckcqwai8.js +2 -0
- streamlit/static/static/js/index.CqTPbV5Y.js +151 -0
- streamlit/static/static/js/index.CxXo5UKy.js +1 -0
- streamlit/static/static/js/index.CxbL5FgL.js +1 -0
- streamlit/static/static/js/index.D52dMvK5.js +1 -0
- streamlit/static/static/js/index.DBUdji-9.js +3 -0
- streamlit/static/static/js/index.DMU3coc2.js +1 -0
- streamlit/static/static/js/index.DN4sfQLP.js +1 -0
- streamlit/static/static/js/{index.DPUXkcQL.js → index.DRDE9rnx.js} +1 -1
- streamlit/static/static/js/{index.B_dWA3vd.js → index.DY9Ac89e.js} +2 -2
- streamlit/static/static/js/index.DYKCsDvl.js +1 -0
- streamlit/static/static/js/index.Da9gznCC.js +1 -0
- streamlit/static/static/js/index.DfIRibXG.js +1 -0
- streamlit/static/static/js/{index.D3GPA5k4.js → index.Dg5zbEp2.js} +9 -40
- streamlit/static/static/js/index.Di9I2cid.js +1 -0
- streamlit/static/static/js/index.DkpEv0uV.js +1 -0
- streamlit/static/static/js/index.DwJ9Vhsl.js +1 -0
- streamlit/static/static/js/index.L7erTnMm.js +1 -0
- streamlit/static/static/js/{index.DOFlg3dS.js → index.NaDyAN1s.js} +1 -1
- streamlit/static/static/js/index.RNTPpVde.js +1 -0
- streamlit/static/static/js/index.VFDFuf_7.js +1 -0
- streamlit/static/static/js/index.W-bl3NDo.js +1 -0
- streamlit/static/static/js/index.XYozEjwK.js +1 -0
- streamlit/static/static/js/index.oyLQ4pue.js +1 -0
- streamlit/static/static/js/index.q4fLUQtC.js +11 -0
- streamlit/static/static/js/index.q9puCQgK.js +2 -0
- streamlit/static/static/js/index.xZBTXGNC.js +1 -0
- streamlit/static/static/js/{input.D4MN_FzN.js → input.CcvrgErO.js} +2 -2
- streamlit/static/static/js/main.eVHOp4Th.js +13 -0
- streamlit/static/static/js/{memory.DrZjtdGT.js → memory.Ck_sLv5Y.js} +1 -1
- streamlit/static/static/js/moment.C3j7ZXd7.js +4 -0
- streamlit/static/static/js/number-overlay-editor.DgcLMWOy.js +9 -0
- streamlit/static/static/js/pandasStylerUtils.DqP0h70z.js +1 -0
- streamlit/static/static/js/{possibleConstructorReturn.exeeJQEP.js → possibleConstructorReturn.C_51n46K.js} +1 -1
- streamlit/static/static/js/{sandbox.ClO3IuUr.js → sandbox.Q-g3QIZJ.js} +1 -1
- streamlit/static/static/js/styled-components.e0V96rJw.js +1 -0
- streamlit/static/static/js/threshold.Q1mXg5rX.js +1 -0
- streamlit/static/static/js/throttle.D3b5WILl.js +1 -0
- streamlit/static/static/js/{timepicker.DAhu-vcF.js → timepicker.Bpn70xGc.js} +1 -1
- streamlit/static/static/js/timer.C2hYhUse.js +1 -0
- streamlit/static/static/js/{toConsumableArray.DNbljYEC.js → toConsumableArray.DIN_ys1J.js} +1 -1
- streamlit/static/static/js/uniqueId.B27POWT6.js +1 -0
- streamlit/static/static/js/urls.BwSlolu9.js +1 -0
- streamlit/static/static/js/{useBasicWidgetState.D6sOH6oI.js → useBasicWidgetState.DA3_qaXD.js} +1 -1
- streamlit/static/static/js/useIntlLocale.BSq6SANa.js +12 -0
- streamlit/static/static/js/{useTextInputAutoExpand.4u3_GcuN.js → useTextInputAutoExpand.ytEW5QmA.js} +1 -1
- streamlit/static/static/js/useUpdateUiValue.DOxWBNiI.js +1 -0
- streamlit/static/static/js/useWaveformController.BCmk6WLk.js +1 -0
- streamlit/static/static/js/value.B4vHRSi7.js +1 -0
- streamlit/static/static/js/withCalculatedWidth.ChdrMItN.js +1 -0
- streamlit/static/static/js/withFullScreenWrapper.7j_lzlaF.js +1 -0
- streamlit/string_util.py +8 -1
- streamlit/testing/v1/app_test.py +15 -0
- streamlit/testing/v1/element_tree.py +62 -0
- streamlit/web/bootstrap.py +24 -0
- streamlit/web/server/oauth_authlib_routes.py +5 -2
- streamlit/web/server/upload_file_request_handler.py +16 -0
- {streamlit-1.51.0.dist-info → streamlit-1.52.1.dist-info}/METADATA +9 -5
- {streamlit-1.51.0.dist-info → streamlit-1.52.1.dist-info}/RECORD +274 -239
- streamlit/static/static/js/InputInstructions.jhH15PqV.js +0 -1
- streamlit/static/static/js/Particles.DUsputn1.js +0 -1
- streamlit/static/static/js/data-grid-overlay-editor.2Ufgxc6y.js +0 -1
- streamlit/static/static/js/index.B1ZQh4P1.js +0 -1
- streamlit/static/static/js/index.BKstZk0M.js +0 -27
- streamlit/static/static/js/index.BMcFsUee.js +0 -1
- streamlit/static/static/js/index.BR-IdcTb.js +0 -2
- streamlit/static/static/js/index.BgnZEMVh.js +0 -1
- streamlit/static/static/js/index.BohqXifI.js +0 -1
- streamlit/static/static/js/index.Br5nxKNj.js +0 -2
- streamlit/static/static/js/index.BrIKVbNc.js +0 -3
- streamlit/static/static/js/index.BtWUPzle.js +0 -1
- streamlit/static/static/js/index.C0RLraek.js +0 -1
- streamlit/static/static/js/index.CAIjskgG.js +0 -1
- streamlit/static/static/js/index.CAj-7vWz.js +0 -949
- streamlit/static/static/js/index.CMtEit2O.js +0 -1
- streamlit/static/static/js/index.CkRlykEE.js +0 -12
- streamlit/static/static/js/index.CmN3FXfI.js +0 -1617
- streamlit/static/static/js/index.CwbFI1_-.js +0 -1
- streamlit/static/static/js/index.D2KPNy7e.js +0 -1
- streamlit/static/static/js/index.DGAh7DMq.js +0 -1
- streamlit/static/static/js/index.DKb_NvmG.js +0 -197
- streamlit/static/static/js/index.DMqgUYKq.js +0 -1
- streamlit/static/static/js/index.DX1xY89g.js +0 -1
- streamlit/static/static/js/index.DYATBCsq.js +0 -2
- streamlit/static/static/js/index.DaSmGJ76.js +0 -3
- streamlit/static/static/js/index.Dd7bMeLP.js +0 -1
- streamlit/static/static/js/index.DjmmgI5U.js +0 -1
- streamlit/static/static/js/index.Dq56CyM2.js +0 -1
- streamlit/static/static/js/index.DuiXaS5_.js +0 -7
- streamlit/static/static/js/index.DvFidMLe.js +0 -2
- streamlit/static/static/js/index.DwkhC5Pc.js +0 -1
- streamlit/static/static/js/index.Q-3sFn1v.js +0 -1
- streamlit/static/static/js/index.QJ5QO9sJ.js +0 -1
- streamlit/static/static/js/index.VwTaeety.js +0 -1
- streamlit/static/static/js/index.YOqQbeX8.js +0 -1
- streamlit/static/static/js/number-overlay-editor.DRwAw1In.js +0 -9
- streamlit/static/static/js/uniqueId.oG4Gvj1v.js +0 -1
- streamlit/static/static/js/useUpdateUiValue.F2R3eTeR.js +0 -1
- streamlit/static/static/js/withFullScreenWrapper.zothJIsI.js +0 -1
- {streamlit-1.51.0.data → streamlit-1.52.1.data}/scripts/streamlit.cmd +0 -0
- {streamlit-1.51.0.dist-info → streamlit-1.52.1.dist-info}/WHEEL +0 -0
- {streamlit-1.51.0.dist-info → streamlit-1.52.1.dist-info}/entry_points.txt +0 -0
- {streamlit-1.51.0.dist-info → streamlit-1.52.1.dist-info}/top_level.txt +0 -0
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./data-grid-overlay-editor.2Ufgxc6y.js","./index.CAj-7vWz.js","../css/index.BpABIXK9.css","./withFullScreenWrapper.zothJIsI.js","./Toolbar.D8nHCkuz.js","./FormClearHelper.BB1Km6eP.js","./sprintf.D7DtBTRn.js","./checkbox.Cpdd482O.js","./createDownloadLinkElement.ZaXNnPK4.js","./toConsumableArray.DNbljYEC.js","./possibleConstructorReturn.exeeJQEP.js","./createSuper.CuQIogbW.js","./FileDownload.esm.Ddx8VEYy.js","./number-overlay-editor.DRwAw1In.js","./es6.BJcsVXQ0.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{r as f,E as Wl,_ as $e,ck as Fh,a2 as pr,cl as Ah,a_ as Co,a$ as Hh,cm as zh,cn as Vh,co as Bc,cp as Wc,aj as $t,cq as $h,cr as Uc,cs as Nh,ct as Bh,cu as Wh,cv as Uh,cw as qh,cx as Xh,a8 as Er,bb as Ul,a1 as Gh,cy as Yh,k as Le,b1 as qc,n as at,cz as io,br as Xr,cA as jh,ch as Ya,j as Ne,cB as Kh,cC as Zh,s as Jn,ax as tn,aM as Jh,cD as Ws,cE as Qh,cF as eg,cG as tg,h as So,t as Gr,bt as ng,cH as rg,cI as ig,cJ as Xc,cK as og,cL as ag,cM as El,cN as Gc,c3 as Yc,cO as lg,cP as sg,cQ as ug,cR as cg,cS as dg,cT as fg,cU as hg,cV as gg,cW as pg,cX as jc,cY as mg,cZ as vg,c_ as bg,c$ as wg,d0 as yg,aK as Cg,aL as Sg,d1 as xg,d2 as kg,aJ as Mg,d3 as Rg,d4 as Ig,d5 as Eg,aI as Tg,u as Zr,d6 as nn,w as ql,d7 as Dg,bO as oo,d8 as lr,d9 as Ae,aY as Og,a7 as Kc,da as Zc,Z as Pg,db as Lg,dc as _g,dd as Fg,aO as ja,F as Jc,bM as xa,de as Qc,e as wn,x as Yn,bK as ka,df as Ag,bN as ed,dg as Hg,S as zg,I as Us,dh as Vg,di as $g,a3 as Ng,L as Bg,dj as Wg,dk as qs}from"./index.CAj-7vWz.js";import{w as Ug,E as qg}from"./withFullScreenWrapper.zothJIsI.js";import{T as Xg,a as Ci}from"./Toolbar.D8nHCkuz.js";import{u as Gg}from"./FormClearHelper.BB1Km6eP.js";import{s as Yg}from"./sprintf.D7DtBTRn.js";import{L as jg,a as Kg,S as Zg}from"./checkbox.Cpdd482O.js";import{c as Jg}from"./createDownloadLinkElement.ZaXNnPK4.js";import{_ as fr,a as Ti,C as Qg}from"./toConsumableArray.DNbljYEC.js";import{d as ep,f as tp,e as np}from"./possibleConstructorReturn.exeeJQEP.js";import{_ as rp}from"./createSuper.CuQIogbW.js";import{D as ip,F as op}from"./FileDownload.esm.Ddx8VEYy.js";var td=f.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return f.createElement(Wl,$e({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),f.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),f.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}))});td.displayName="Add";var nd=f.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return f.createElement(Wl,$e({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),f.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),f.createElement("path",{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 109.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}))});nd.displayName="Search";var rd=f.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return f.createElement(Wl,$e({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),f.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),f.createElement("path",{d:"M12 6a9.77 9.77 0 018.82 5.5C19.17 14.87 15.79 17 12 17s-7.17-2.13-8.82-5.5A9.77 9.77 0 0112 6m0-2C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4zm0 5a2.5 2.5 0 010 5 2.5 2.5 0 010-5m0-2c-2.48 0-4.5 2.02-4.5 4.5S9.52 16 12 16s4.5-2.02 4.5-4.5S14.48 7 12 7z"}))});rd.displayName="Visibility";var Ka,Xs;function ap(){if(Xs)return Ka;Xs=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r,i){return r!=null&&t.call(r,i)}return Ka=n,Ka}var Za,Gs;function lp(){if(Gs)return Za;Gs=1;var e=ap(),t=Fh();function n(r,i){return r!=null&&t(r,i,e)}return Za=n,Za}var sp=lp();const up=pr(sp);function id(e="This should not happen"){throw new Error(e)}function An(e,t="Assertion failed"){if(!e)return id(t)}function ho(e,t){return id(t??"Hell froze over")}function cp(e,t){try{return e()}catch{return t}}const Ys=Object.prototype.hasOwnProperty;function Oi(e,t){let n,r;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&Oi(e[r],t[r]););return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(Ys.call(e,n)&&++r&&!Ys.call(t,n)||!(n in t)||!Oi(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}const la=null,Xl=void 0;var Z;(function(e){e.Uri="uri",e.Text="text",e.Image="image",e.RowID="row-id",e.Number="number",e.Bubble="bubble",e.Boolean="boolean",e.Loading="loading",e.Markdown="markdown",e.Drilldown="drilldown",e.Protected="protected",e.Custom="custom"})(Z||(Z={}));var js;(function(e){e.HeaderRowID="headerRowID",e.HeaderCode="headerCode",e.HeaderNumber="headerNumber",e.HeaderString="headerString",e.HeaderBoolean="headerBoolean",e.HeaderAudioUri="headerAudioUri",e.HeaderVideoUri="headerVideoUri",e.HeaderEmoji="headerEmoji",e.HeaderImage="headerImage",e.HeaderUri="headerUri",e.HeaderPhone="headerPhone",e.HeaderMarkdown="headerMarkdown",e.HeaderDate="headerDate",e.HeaderTime="headerTime",e.HeaderEmail="headerEmail",e.HeaderReference="headerReference",e.HeaderIfThenElse="headerIfThenElse",e.HeaderSingleValue="headerSingleValue",e.HeaderLookup="headerLookup",e.HeaderTextTemplate="headerTextTemplate",e.HeaderMath="headerMath",e.HeaderRollup="headerRollup",e.HeaderJoinStrings="headerJoinStrings",e.HeaderSplitString="headerSplitString",e.HeaderGeoDistance="headerGeoDistance",e.HeaderArray="headerArray",e.RowOwnerOverlay="rowOwnerOverlay",e.ProtectedColumnOverlay="protectedColumnOverlay"})(js||(js={}));var sa;(function(e){e.Triangle="triangle",e.Dots="dots"})(sa||(sa={}));function $o(e){return"width"in e&&typeof e.width=="number"}async function Ks(e){return typeof e=="object"?e:await e()}function xi(e){return!(e.kind===Z.Loading||e.kind===Z.Bubble||e.kind===Z.RowID||e.kind===Z.Protected||e.kind===Z.Drilldown)}function Ri(e){return e.kind===Bn.Marker||e.kind===Bn.NewRow}function ki(e){if(!xi(e)||e.kind===Z.Image)return!1;switch(e.kind){case Z.Text:case Z.Number:case Z.Markdown:case Z.Uri:case Z.Custom:case Z.Boolean:return e.readonly!==!0;default:ho(e,"A cell was passed with an invalid kind")}}function dp(e){return up(e,"editor")}function Gl(e){return!(e.readonly??!1)}var Bn;(function(e){e.NewRow="new-row",e.Marker="marker"})(Bn||(Bn={}));const ua={shape:"square",size:4,offsetX:-2,offsetY:-2,outline:0};function Ja(e){if(e.length===0)return[];const t=[...e],n=[];t.sort(function(r,i){return r[0]-i[0]}),n.push([...t[0]]);for(const r of t.slice(1)){const i=n[n.length-1];i[1]<r[0]?n.push([...r]):i[1]<r[1]&&(i[1]=r[1])}return n}let Zs;class et{items;constructor(t){this.items=t}static create=t=>new et(Ja(t));static empty=()=>Zs??(Zs=new et([]));static fromSingleSelection=t=>et.empty().add(t);static fromArray=t=>{if(t.length===0)return et.empty();const n=t.map(i=>[i,i+1]),r=Ja(n);return new et(r)};offset(t){if(t===0)return this;const n=this.items.map(r=>[r[0]+t,r[1]+t]);return new et(n)}add(t){const n=typeof t=="number"?[t,t+1]:t,r=Ja([...this.items,n]);return new et(r)}remove(t){const n=[...this.items],r=typeof t=="number"?t:t[0],i=typeof t=="number"?t+1:t[1];for(const[o,l]of n.entries()){const[a,s]=l;if(a<=i&&r<=s){const u=[];a<r&&u.push([a,r]),i<s&&u.push([i,s]),n.splice(o,1,...u)}}return new et(n)}first(){if(this.items.length!==0)return this.items[0][0]}last(){if(this.items.length!==0)return this.items.slice(-1)[0][1]-1}hasIndex(t){for(let n=0;n<this.items.length;n++){const[r,i]=this.items[n];if(t>=r&&t<i)return!0}return!1}hasAll(t){for(let n=t[0];n<t[1];n++)if(!this.hasIndex(n))return!1;return!0}some(t){for(const n of this)if(t(n))return!0;return!1}equals(t){if(t===this)return!0;if(t.items.length!==this.items.length)return!1;for(let n=0;n<this.items.length;n++){const r=t.items[n],i=this.items[n];if(r[0]!==i[0]||r[1]!==i[1])return!1}return!0}toArray(){const t=[];for(const[n,r]of this.items)for(let i=n;i<r;i++)t.push(i);return t}get length(){let t=0;for(const[n,r]of this.items)t+=r-n;return t}*[Symbol.iterator](){for(const[t,n]of this.items)for(let r=t;r<n;r++)yield r}}var fp=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Qa=Ah(function(e){return fp.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),hp=function(){const t=Array.prototype.slice.call(arguments).filter(Boolean),n={},r=[];t.forEach(o=>{(o?o.split(" "):[]).forEach(a=>{if(a.startsWith("atm_")){const[,s]=a.split("_");n[s]=a}else r.push(a)})});const i=[];for(const o in n)Object.prototype.hasOwnProperty.call(n,o)&&i.push(n[o]);return i.push(...r),i.join(" ")},Js=hp,gp=e=>e.toUpperCase()===e,pp=e=>t=>e.indexOf(t)===-1,od=(e,t)=>{const n={};return Object.keys(e).filter(pp(t)).forEach(r=>{n[r]=e[r]}),n};function mp(e,t,n){const r=od(t,n);if(!e){const i=typeof Qa=="function"?{default:Qa}:Qa;Object.keys(r).forEach(o=>{i.default(o)||delete r[o]})}return r}var vp=(e,t)=>{};function bp(e){let t="";return n=>{const r=(o,l)=>{const{as:a=e,class:s=t}=o,u=n.propsAsIs===void 0?!(typeof a=="string"&&a.indexOf("-")===-1&&!gp(a[0])):n.propsAsIs,c=mp(u,o,["as","class"]);c.ref=l,c.className=n.atomic?Js(n.class,c.className||s):Js(c.className||s,n.class);const{vars:d}=n;if(d){const g={};for(const m in d){const y=d[m],b=y[0],v=y[1]||"",x=typeof b=="function"?b(o):b;vp(x,n.name),g[`--${m}`]=`${x}${v}`}const h=c.style||{},p=Object.keys(h);p.length>0&&p.forEach(m=>{g[m]=h[m]}),c.style=g}return e.__wyw_meta&&e!==a?(c.as=a,f.createElement(e,c)):f.createElement(a,c)},i=f.forwardRef?f.forwardRef(r):o=>{const l=od(o,["innerRef"]);return r(l,o.innerRef)};return i.displayName=n.name,i.__wyw_meta={className:n.class||t,extends:e},i}}var sn=bp;const wp=sn("div")({name:"ImageOverlayEditorStyle",class:"gdg-i2iowwq",propsAsIs:!1});var el={},Xi={},No={},Bo={},Qs;function yp(){return Qs||(Qs=1,function(e){(function(t,n){n(e,Co(),Hh())})(Bo,function(t,n,r){Object.defineProperty(t,"__esModule",{value:!0}),t.setHasSupportToCaptureOption=p;var i=l(n),o=l(r);function l(v){return v&&v.__esModule?v:{default:v}}var a=Object.assign||function(v){for(var x=1;x<arguments.length;x++){var E=arguments[x];for(var M in E)Object.prototype.hasOwnProperty.call(E,M)&&(v[M]=E[M])}return v};function s(v,x){var E={};for(var M in v)x.indexOf(M)>=0||Object.prototype.hasOwnProperty.call(v,M)&&(E[M]=v[M]);return E}function u(v,x){if(!(v instanceof x))throw new TypeError("Cannot call a class as a function")}var c=function(){function v(x,E){for(var M=0;M<E.length;M++){var I=E[M];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(x,I.key,I)}}return function(x,E,M){return E&&v(x.prototype,E),M&&v(x,M),x}}();function d(v,x){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:v}function g(v,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);v.prototype=Object.create(x&&x.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(v,x):v.__proto__=x)}var h=!1;function p(v){h=v}try{addEventListener("test",null,Object.defineProperty({},"capture",{get:function(){p(!0)}}))}catch{}function m(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{capture:!0};return h?v:v.capture}function y(v){if("touches"in v){var x=v.touches[0],E=x.pageX,M=x.pageY;return{x:E,y:M}}var I=v.screenX,L=v.screenY;return{x:I,y:L}}var b=function(v){g(x,v);function x(){var E;u(this,x);for(var M=arguments.length,I=Array(M),L=0;L<M;L++)I[L]=arguments[L];var S=d(this,(E=x.__proto__||Object.getPrototypeOf(x)).call.apply(E,[this].concat(I)));return S._handleSwipeStart=S._handleSwipeStart.bind(S),S._handleSwipeMove=S._handleSwipeMove.bind(S),S._handleSwipeEnd=S._handleSwipeEnd.bind(S),S._onMouseDown=S._onMouseDown.bind(S),S._onMouseMove=S._onMouseMove.bind(S),S._onMouseUp=S._onMouseUp.bind(S),S._setSwiperRef=S._setSwiperRef.bind(S),S}return c(x,[{key:"componentDidMount",value:function(){this.swiper&&this.swiper.addEventListener("touchmove",this._handleSwipeMove,m({capture:!0,passive:!1}))}},{key:"componentWillUnmount",value:function(){this.swiper&&this.swiper.removeEventListener("touchmove",this._handleSwipeMove,m({capture:!0,passive:!1}))}},{key:"_onMouseDown",value:function(M){this.props.allowMouseEvents&&(this.mouseDown=!0,document.addEventListener("mouseup",this._onMouseUp),document.addEventListener("mousemove",this._onMouseMove),this._handleSwipeStart(M))}},{key:"_onMouseMove",value:function(M){this.mouseDown&&this._handleSwipeMove(M)}},{key:"_onMouseUp",value:function(M){this.mouseDown=!1,document.removeEventListener("mouseup",this._onMouseUp),document.removeEventListener("mousemove",this._onMouseMove),this._handleSwipeEnd(M)}},{key:"_handleSwipeStart",value:function(M){var I=y(M),L=I.x,S=I.y;this.moveStart={x:L,y:S},this.props.onSwipeStart(M)}},{key:"_handleSwipeMove",value:function(M){if(this.moveStart){var I=y(M),L=I.x,S=I.y,C=L-this.moveStart.x,_=S-this.moveStart.y;this.moving=!0;var D=this.props.onSwipeMove({x:C,y:_},M);D&&M.cancelable&&M.preventDefault(),this.movePosition={deltaX:C,deltaY:_}}}},{key:"_handleSwipeEnd",value:function(M){this.props.onSwipeEnd(M);var I=this.props.tolerance;this.moving&&this.movePosition&&(this.movePosition.deltaX<-I?this.props.onSwipeLeft(1,M):this.movePosition.deltaX>I&&this.props.onSwipeRight(1,M),this.movePosition.deltaY<-I?this.props.onSwipeUp(1,M):this.movePosition.deltaY>I&&this.props.onSwipeDown(1,M)),this.moveStart=null,this.moving=!1,this.movePosition=null}},{key:"_setSwiperRef",value:function(M){this.swiper=M,this.props.innerRef(M)}},{key:"render",value:function(){var M=this.props;M.tagName;var I=M.className,L=M.style,S=M.children;M.allowMouseEvents,M.onSwipeUp,M.onSwipeDown,M.onSwipeLeft,M.onSwipeRight,M.onSwipeStart,M.onSwipeMove,M.onSwipeEnd,M.innerRef,M.tolerance;var C=s(M,["tagName","className","style","children","allowMouseEvents","onSwipeUp","onSwipeDown","onSwipeLeft","onSwipeRight","onSwipeStart","onSwipeMove","onSwipeEnd","innerRef","tolerance"]);return i.default.createElement(this.props.tagName,a({ref:this._setSwiperRef,onMouseDown:this._onMouseDown,onTouchStart:this._handleSwipeStart,onTouchEnd:this._handleSwipeEnd,className:I,style:L},C),S)}}]),x}(n.Component);b.displayName="ReactSwipe",b.propTypes={tagName:o.default.string,className:o.default.string,style:o.default.object,children:o.default.node,allowMouseEvents:o.default.bool,onSwipeUp:o.default.func,onSwipeDown:o.default.func,onSwipeLeft:o.default.func,onSwipeRight:o.default.func,onSwipeStart:o.default.func,onSwipeMove:o.default.func,onSwipeEnd:o.default.func,innerRef:o.default.func,tolerance:o.default.number.isRequired},b.defaultProps={tagName:"div",allowMouseEvents:!1,onSwipeUp:function(){},onSwipeDown:function(){},onSwipeLeft:function(){},onSwipeRight:function(){},onSwipeStart:function(){},onSwipeMove:function(){},onSwipeEnd:function(){},innerRef:function(){},tolerance:0},t.default=b})}(Bo)),Bo}var eu;function ad(){return eu||(eu=1,function(e){(function(t,n){n(e,yp())})(No,function(t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=i(n);function i(o){return o&&o.__esModule?o:{default:o}}t.default=r.default})}(No)),No}var Gi={},tu;function ld(){if(tu)return Gi;tu=1,Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.default=void 0;var e=t(zh());function t(i){return i&&i.__esModule?i:{default:i}}function n(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}var r={ROOT:function(o){return(0,e.default)(n({"carousel-root":!0},o||"",!!o))},CAROUSEL:function(o){return(0,e.default)({carousel:!0,"carousel-slider":o})},WRAPPER:function(o,l){return(0,e.default)({"thumbs-wrapper":!o,"slider-wrapper":o,"axis-horizontal":l==="horizontal","axis-vertical":l!=="horizontal"})},SLIDER:function(o,l){return(0,e.default)({thumbs:!o,slider:o,animated:!l})},ITEM:function(o,l,a){return(0,e.default)({thumb:!o,slide:o,selected:l,previous:a})},ARROW_PREV:function(o){return(0,e.default)({"control-arrow control-prev":!0,"control-disabled":o})},ARROW_NEXT:function(o){return(0,e.default)({"control-arrow control-next":!0,"control-disabled":o})},DOT:function(o){return(0,e.default)({dot:!0,selected:o})}};return Gi.default=r,Gi}var Yi={},ji={},nu;function Cp(){if(nu)return ji;nu=1,Object.defineProperty(ji,"__esModule",{value:!0}),ji.outerWidth=void 0;var e=function(n){var r=n.offsetWidth,i=getComputedStyle(n);return r+=parseInt(i.marginLeft)+parseInt(i.marginRight),r};return ji.outerWidth=e,ji}var Ki={},ru;function Yl(){if(ru)return Ki;ru=1,Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.default=void 0;var e=function(n,r,i){var o=n===0?n:n+r,l=i==="horizontal"?[o,0,0]:[0,o,0],a="translate3d",s="("+l.join(",")+")";return a+s};return Ki.default=e,Ki}var Zi={},iu;function sd(){if(iu)return Zi;iu=1,Object.defineProperty(Zi,"__esModule",{value:!0}),Zi.default=void 0;var e=function(){return window};return Zi.default=e,Zi}var ou;function ud(){if(ou)return Yi;ou=1,Object.defineProperty(Yi,"__esModule",{value:!0}),Yi.default=void 0;var e=s(Co()),t=l(ld()),n=Cp(),r=l(Yl()),i=l(ad()),o=l(sd());function l(S){return S&&S.__esModule?S:{default:S}}function a(){if(typeof WeakMap!="function")return null;var S=new WeakMap;return a=function(){return S},S}function s(S){if(S&&S.__esModule)return S;if(S===null||u(S)!=="object"&&typeof S!="function")return{default:S};var C=a();if(C&&C.has(S))return C.get(S);var _={},D=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var k in S)if(Object.prototype.hasOwnProperty.call(S,k)){var T=D?Object.getOwnPropertyDescriptor(S,k):null;T&&(T.get||T.set)?Object.defineProperty(_,k,T):_[k]=S[k]}return _.default=S,C&&C.set(S,_),_}function u(S){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(_){return typeof _}:u=function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},u(S)}function c(){return c=Object.assign||function(S){for(var C=1;C<arguments.length;C++){var _=arguments[C];for(var D in _)Object.prototype.hasOwnProperty.call(_,D)&&(S[D]=_[D])}return S},c.apply(this,arguments)}function d(S,C){if(!(S instanceof C))throw new TypeError("Cannot call a class as a function")}function g(S,C){for(var _=0;_<C.length;_++){var D=C[_];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(S,D.key,D)}}function h(S,C,_){return C&&g(S.prototype,C),S}function p(S,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function");S.prototype=Object.create(C&&C.prototype,{constructor:{value:S,writable:!0,configurable:!0}}),C&&m(S,C)}function m(S,C){return m=Object.setPrototypeOf||function(D,k){return D.__proto__=k,D},m(S,C)}function y(S){var C=x();return function(){var D=E(S),k;if(C){var T=E(this).constructor;k=Reflect.construct(D,arguments,T)}else k=D.apply(this,arguments);return b(this,k)}}function b(S,C){return C&&(u(C)==="object"||typeof C=="function")?C:v(S)}function v(S){if(S===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S}function x(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function E(S){return E=Object.setPrototypeOf?Object.getPrototypeOf:function(_){return _.__proto__||Object.getPrototypeOf(_)},E(S)}function M(S,C,_){return C in S?Object.defineProperty(S,C,{value:_,enumerable:!0,configurable:!0,writable:!0}):S[C]=_,S}var I=function(C){return C.hasOwnProperty("key")},L=function(S){p(_,S);var C=y(_);function _(D){var k;return d(this,_),k=C.call(this,D),M(v(k),"itemsWrapperRef",void 0),M(v(k),"itemsListRef",void 0),M(v(k),"thumbsRef",void 0),M(v(k),"setItemsWrapperRef",function(T){k.itemsWrapperRef=T}),M(v(k),"setItemsListRef",function(T){k.itemsListRef=T}),M(v(k),"setThumbsRef",function(T,O){k.thumbsRef||(k.thumbsRef=[]),k.thumbsRef[O]=T}),M(v(k),"updateSizes",function(){if(!(!k.props.children||!k.itemsWrapperRef||!k.thumbsRef)){var T=e.Children.count(k.props.children),O=k.itemsWrapperRef.clientWidth,R=k.props.thumbWidth?k.props.thumbWidth:(0,n.outerWidth)(k.thumbsRef[0]),N=Math.floor(O/R),q=N<T,Y=q?T-N:0;k.setState(function(oe,Q){return{itemSize:R,visibleItems:N,firstItem:q?k.getFirstItem(Q.selectedItem):0,lastPosition:Y,showArrows:q}})}}),M(v(k),"handleClickItem",function(T,O,R){if(!I(R)||R.key==="Enter"){var N=k.props.onSelectItem;typeof N=="function"&&N(T,O)}}),M(v(k),"onSwipeStart",function(){k.setState({swiping:!0})}),M(v(k),"onSwipeEnd",function(){k.setState({swiping:!1})}),M(v(k),"onSwipeMove",function(T){var O=T.x;if(!k.state.itemSize||!k.itemsWrapperRef||!k.state.visibleItems)return!1;var R=0,N=e.Children.count(k.props.children),q=-(k.state.firstItem*100)/k.state.visibleItems,Y=Math.max(N-k.state.visibleItems,0),oe=-Y*100/k.state.visibleItems;q===R&&O>0&&(O=0),q===oe&&O<0&&(O=0);var Q=k.itemsWrapperRef.clientWidth,re=q+100/(Q/O);return k.itemsListRef&&["WebkitTransform","MozTransform","MsTransform","OTransform","transform","msTransform"].forEach(function(ue){k.itemsListRef.style[ue]=(0,r.default)(re,"%",k.props.axis)}),!0}),M(v(k),"slideRight",function(T){k.moveTo(k.state.firstItem-(typeof T=="number"?T:1))}),M(v(k),"slideLeft",function(T){k.moveTo(k.state.firstItem+(typeof T=="number"?T:1))}),M(v(k),"moveTo",function(T){T=T<0?0:T,T=T>=k.state.lastPosition?k.state.lastPosition:T,k.setState({firstItem:T})}),k.state={selectedItem:D.selectedItem,swiping:!1,showArrows:!1,firstItem:0,visibleItems:0,lastPosition:0},k}return h(_,[{key:"componentDidMount",value:function(){this.setupThumbs()}},{key:"componentDidUpdate",value:function(k){this.props.selectedItem!==this.state.selectedItem&&this.setState({selectedItem:this.props.selectedItem,firstItem:this.getFirstItem(this.props.selectedItem)}),this.props.children!==k.children&&this.updateSizes()}},{key:"componentWillUnmount",value:function(){this.destroyThumbs()}},{key:"setupThumbs",value:function(){(0,o.default)().addEventListener("resize",this.updateSizes),(0,o.default)().addEventListener("DOMContentLoaded",this.updateSizes),this.updateSizes()}},{key:"destroyThumbs",value:function(){(0,o.default)().removeEventListener("resize",this.updateSizes),(0,o.default)().removeEventListener("DOMContentLoaded",this.updateSizes)}},{key:"getFirstItem",value:function(k){var T=k;return k>=this.state.lastPosition&&(T=this.state.lastPosition),k<this.state.firstItem+this.state.visibleItems&&(T=this.state.firstItem),k<this.state.firstItem&&(T=k),T}},{key:"renderItems",value:function(){var k=this;return this.props.children.map(function(T,O){var R=t.default.ITEM(!1,O===k.state.selectedItem),N={key:O,ref:function(Y){return k.setThumbsRef(Y,O)},className:R,onClick:k.handleClickItem.bind(k,O,k.props.children[O]),onKeyDown:k.handleClickItem.bind(k,O,k.props.children[O]),"aria-label":"".concat(k.props.labels.item," ").concat(O+1),style:{width:k.props.thumbWidth}};return e.default.createElement("li",c({},N,{role:"button",tabIndex:0}),T)})}},{key:"render",value:function(){var k=this;if(!this.props.children)return null;var T=e.Children.count(this.props.children)>1,O=this.state.showArrows&&this.state.firstItem>0,R=this.state.showArrows&&this.state.firstItem<this.state.lastPosition,N={},q=-this.state.firstItem*(this.state.itemSize||0),Y=(0,r.default)(q,"px",this.props.axis),oe=this.props.transitionTime+"ms";return N={WebkitTransform:Y,MozTransform:Y,MsTransform:Y,OTransform:Y,transform:Y,msTransform:Y,WebkitTransitionDuration:oe,MozTransitionDuration:oe,MsTransitionDuration:oe,OTransitionDuration:oe,transitionDuration:oe,msTransitionDuration:oe},e.default.createElement("div",{className:t.default.CAROUSEL(!1)},e.default.createElement("div",{className:t.default.WRAPPER(!1),ref:this.setItemsWrapperRef},e.default.createElement("button",{type:"button",className:t.default.ARROW_PREV(!O),onClick:function(){return k.slideRight()},"aria-label":this.props.labels.leftArrow}),T?e.default.createElement(i.default,{tagName:"ul",className:t.default.SLIDER(!1,this.state.swiping),onSwipeLeft:this.slideLeft,onSwipeRight:this.slideRight,onSwipeMove:this.onSwipeMove,onSwipeStart:this.onSwipeStart,onSwipeEnd:this.onSwipeEnd,style:N,innerRef:this.setItemsListRef,allowMouseEvents:this.props.emulateTouch},this.renderItems()):e.default.createElement("ul",{className:t.default.SLIDER(!1,this.state.swiping),ref:function(re){return k.setItemsListRef(re)},style:N},this.renderItems()),e.default.createElement("button",{type:"button",className:t.default.ARROW_NEXT(!R),onClick:function(){return k.slideLeft()},"aria-label":this.props.labels.rightArrow})))}}]),_}(e.Component);return Yi.default=L,M(L,"displayName","Thumbs"),M(L,"defaultProps",{axis:"horizontal",labels:{leftArrow:"previous slide / item",rightArrow:"next slide / item",item:"slide item"},selectedItem:0,thumbWidth:80,transitionTime:350}),Yi}var Ji={},au;function Sp(){if(au)return Ji;au=1,Object.defineProperty(Ji,"__esModule",{value:!0}),Ji.default=void 0;var e=function(){return document};return Ji.default=e,Ji}var Fn={},lu;function cd(){if(lu)return Fn;lu=1,Object.defineProperty(Fn,"__esModule",{value:!0}),Fn.setPosition=Fn.getPosition=Fn.isKeyboardEvent=Fn.defaultStatusFormatter=Fn.noop=void 0;var e=Co(),t=n(Yl());function n(s){return s&&s.__esModule?s:{default:s}}var r=function(){};Fn.noop=r;var i=function(u,c){return"".concat(u," of ").concat(c)};Fn.defaultStatusFormatter=i;var o=function(u){return u?u.hasOwnProperty("key"):!1};Fn.isKeyboardEvent=o;var l=function(u,c){if(c.infiniteLoop&&++u,u===0)return 0;var d=e.Children.count(c.children);if(c.centerMode&&c.axis==="horizontal"){var g=-u*c.centerSlidePercentage,h=d-1;return u&&(u!==h||c.infiniteLoop)?g+=(100-c.centerSlidePercentage)/2:u===h&&(g+=100-c.centerSlidePercentage),g}return-u*100};Fn.getPosition=l;var a=function(u,c){var d={};return["WebkitTransform","MozTransform","MsTransform","OTransform","transform","msTransform"].forEach(function(g){d[g]=(0,t.default)(u,"%",c)}),d};return Fn.setPosition=a,Fn}var Gn={},su;function xp(){if(su)return Gn;su=1,Object.defineProperty(Gn,"__esModule",{value:!0}),Gn.fadeAnimationHandler=Gn.slideStopSwipingHandler=Gn.slideSwipeAnimationHandler=Gn.slideAnimationHandler=void 0;var e=Co(),t=r(Yl()),n=cd();function r(d){return d&&d.__esModule?d:{default:d}}function i(d,g){var h=Object.keys(d);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(d);g&&(p=p.filter(function(m){return Object.getOwnPropertyDescriptor(d,m).enumerable})),h.push.apply(h,p)}return h}function o(d){for(var g=1;g<arguments.length;g++){var h=arguments[g]!=null?arguments[g]:{};g%2?i(Object(h),!0).forEach(function(p){l(d,p,h[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(h)):i(Object(h)).forEach(function(p){Object.defineProperty(d,p,Object.getOwnPropertyDescriptor(h,p))})}return d}function l(d,g,h){return g in d?Object.defineProperty(d,g,{value:h,enumerable:!0,configurable:!0,writable:!0}):d[g]=h,d}var a=function(g,h){var p={},m=h.selectedItem,y=m,b=e.Children.count(g.children)-1,v=g.infiniteLoop&&(m<0||m>b);if(v)return y<0?g.centerMode&&g.centerSlidePercentage&&g.axis==="horizontal"?p.itemListStyle=(0,n.setPosition)(-(b+2)*g.centerSlidePercentage-(100-g.centerSlidePercentage)/2,g.axis):p.itemListStyle=(0,n.setPosition)(-(b+2)*100,g.axis):y>b&&(p.itemListStyle=(0,n.setPosition)(0,g.axis)),p;var x=(0,n.getPosition)(m,g),E=(0,t.default)(x,"%",g.axis),M=g.transitionTime+"ms";return p.itemListStyle={WebkitTransform:E,msTransform:E,OTransform:E,transform:E},h.swiping||(p.itemListStyle=o(o({},p.itemListStyle),{},{WebkitTransitionDuration:M,MozTransitionDuration:M,OTransitionDuration:M,transitionDuration:M,msTransitionDuration:M})),p};Gn.slideAnimationHandler=a;var s=function(g,h,p,m){var y={},b=h.axis==="horizontal",v=e.Children.count(h.children),x=0,E=(0,n.getPosition)(p.selectedItem,h),M=h.infiniteLoop?(0,n.getPosition)(v-1,h)-100:(0,n.getPosition)(v-1,h),I=b?g.x:g.y,L=I;E===x&&I>0&&(L=0),E===M&&I<0&&(L=0);var S=E+100/(p.itemSize/L),C=Math.abs(I)>h.swipeScrollTolerance;return h.infiniteLoop&&C&&(p.selectedItem===0&&S>-100?S-=v*100:p.selectedItem===v-1&&S<-v*100&&(S+=v*100)),(!h.preventMovementUntilSwipeScrollTolerance||C||p.swipeMovementStarted)&&(p.swipeMovementStarted||m({swipeMovementStarted:!0}),y.itemListStyle=(0,n.setPosition)(S,h.axis)),C&&!p.cancelClick&&m({cancelClick:!0}),y};Gn.slideSwipeAnimationHandler=s;var u=function(g,h){var p=(0,n.getPosition)(h.selectedItem,g),m=(0,n.setPosition)(p,g.axis);return{itemListStyle:m}};Gn.slideStopSwipingHandler=u;var c=function(g,h){var p=g.transitionTime+"ms",m="ease-in-out",y={position:"absolute",display:"block",zIndex:-2,minHeight:"100%",opacity:0,top:0,right:0,left:0,bottom:0,transitionTimingFunction:m,msTransitionTimingFunction:m,MozTransitionTimingFunction:m,WebkitTransitionTimingFunction:m,OTransitionTimingFunction:m};return h.swiping||(y=o(o({},y),{},{WebkitTransitionDuration:p,MozTransitionDuration:p,OTransitionDuration:p,transitionDuration:p,msTransitionDuration:p})),{slideStyle:y,selectedStyle:o(o({},y),{},{opacity:1,position:"relative"}),prevStyle:o({},y)}};return Gn.fadeAnimationHandler=c,Gn}var uu;function kp(){if(uu)return Xi;uu=1,Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.default=void 0;var e=c(Co()),t=s(ad()),n=s(ld()),r=s(ud()),i=s(Sp()),o=s(sd()),l=cd(),a=xp();function s(D){return D&&D.__esModule?D:{default:D}}function u(){if(typeof WeakMap!="function")return null;var D=new WeakMap;return u=function(){return D},D}function c(D){if(D&&D.__esModule)return D;if(D===null||d(D)!=="object"&&typeof D!="function")return{default:D};var k=u();if(k&&k.has(D))return k.get(D);var T={},O=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var R in D)if(Object.prototype.hasOwnProperty.call(D,R)){var N=O?Object.getOwnPropertyDescriptor(D,R):null;N&&(N.get||N.set)?Object.defineProperty(T,R,N):T[R]=D[R]}return T.default=D,k&&k.set(D,T),T}function d(D){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?d=function(T){return typeof T}:d=function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":typeof T},d(D)}function g(){return g=Object.assign||function(D){for(var k=1;k<arguments.length;k++){var T=arguments[k];for(var O in T)Object.prototype.hasOwnProperty.call(T,O)&&(D[O]=T[O])}return D},g.apply(this,arguments)}function h(D,k){var T=Object.keys(D);if(Object.getOwnPropertySymbols){var O=Object.getOwnPropertySymbols(D);k&&(O=O.filter(function(R){return Object.getOwnPropertyDescriptor(D,R).enumerable})),T.push.apply(T,O)}return T}function p(D){for(var k=1;k<arguments.length;k++){var T=arguments[k]!=null?arguments[k]:{};k%2?h(Object(T),!0).forEach(function(O){C(D,O,T[O])}):Object.getOwnPropertyDescriptors?Object.defineProperties(D,Object.getOwnPropertyDescriptors(T)):h(Object(T)).forEach(function(O){Object.defineProperty(D,O,Object.getOwnPropertyDescriptor(T,O))})}return D}function m(D,k){if(!(D instanceof k))throw new TypeError("Cannot call a class as a function")}function y(D,k){for(var T=0;T<k.length;T++){var O=k[T];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(D,O.key,O)}}function b(D,k,T){return k&&y(D.prototype,k),D}function v(D,k){if(typeof k!="function"&&k!==null)throw new TypeError("Super expression must either be null or a function");D.prototype=Object.create(k&&k.prototype,{constructor:{value:D,writable:!0,configurable:!0}}),k&&x(D,k)}function x(D,k){return x=Object.setPrototypeOf||function(O,R){return O.__proto__=R,O},x(D,k)}function E(D){var k=L();return function(){var O=S(D),R;if(k){var N=S(this).constructor;R=Reflect.construct(O,arguments,N)}else R=O.apply(this,arguments);return M(this,R)}}function M(D,k){return k&&(d(k)==="object"||typeof k=="function")?k:I(D)}function I(D){if(D===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return D}function L(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function S(D){return S=Object.setPrototypeOf?Object.getPrototypeOf:function(T){return T.__proto__||Object.getPrototypeOf(T)},S(D)}function C(D,k,T){return k in D?Object.defineProperty(D,k,{value:T,enumerable:!0,configurable:!0,writable:!0}):D[k]=T,D}var _=function(D){v(T,D);var k=E(T);function T(O){var R;m(this,T),R=k.call(this,O),C(I(R),"thumbsRef",void 0),C(I(R),"carouselWrapperRef",void 0),C(I(R),"listRef",void 0),C(I(R),"itemsRef",void 0),C(I(R),"timer",void 0),C(I(R),"animationHandler",void 0),C(I(R),"setThumbsRef",function(q){R.thumbsRef=q}),C(I(R),"setCarouselWrapperRef",function(q){R.carouselWrapperRef=q}),C(I(R),"setListRef",function(q){R.listRef=q}),C(I(R),"setItemsRef",function(q,Y){R.itemsRef||(R.itemsRef=[]),R.itemsRef[Y]=q}),C(I(R),"autoPlay",function(){e.Children.count(R.props.children)<=1||(R.clearAutoPlay(),R.props.autoPlay&&(R.timer=setTimeout(function(){R.increment()},R.props.interval)))}),C(I(R),"clearAutoPlay",function(){R.timer&&clearTimeout(R.timer)}),C(I(R),"resetAutoPlay",function(){R.clearAutoPlay(),R.autoPlay()}),C(I(R),"stopOnHover",function(){R.setState({isMouseEntered:!0},R.clearAutoPlay)}),C(I(R),"startOnLeave",function(){R.setState({isMouseEntered:!1},R.autoPlay)}),C(I(R),"isFocusWithinTheCarousel",function(){return R.carouselWrapperRef?!!((0,i.default)().activeElement===R.carouselWrapperRef||R.carouselWrapperRef.contains((0,i.default)().activeElement)):!1}),C(I(R),"navigateWithKeyboard",function(q){if(R.isFocusWithinTheCarousel()){var Y=R.props.axis,oe=Y==="horizontal",Q={ArrowUp:38,ArrowRight:39,ArrowDown:40,ArrowLeft:37},re=oe?Q.ArrowRight:Q.ArrowDown,ue=oe?Q.ArrowLeft:Q.ArrowUp;re===q.keyCode?R.increment():ue===q.keyCode&&R.decrement()}}),C(I(R),"updateSizes",function(){if(!(!R.state.initialized||!R.itemsRef||R.itemsRef.length===0)){var q=R.props.axis==="horizontal",Y=R.itemsRef[0];if(Y){var oe=q?Y.clientWidth:Y.clientHeight;R.setState({itemSize:oe}),R.thumbsRef&&R.thumbsRef.updateSizes()}}}),C(I(R),"setMountState",function(){R.setState({hasMount:!0}),R.updateSizes()}),C(I(R),"handleClickItem",function(q,Y){if(e.Children.count(R.props.children)!==0){if(R.state.cancelClick){R.setState({cancelClick:!1});return}R.props.onClickItem(q,Y),q!==R.state.selectedItem&&R.setState({selectedItem:q})}}),C(I(R),"handleOnChange",function(q,Y){e.Children.count(R.props.children)<=1||R.props.onChange(q,Y)}),C(I(R),"handleClickThumb",function(q,Y){R.props.onClickThumb(q,Y),R.moveTo(q)}),C(I(R),"onSwipeStart",function(q){R.setState({swiping:!0}),R.props.onSwipeStart(q)}),C(I(R),"onSwipeEnd",function(q){R.setState({swiping:!1,cancelClick:!1,swipeMovementStarted:!1}),R.props.onSwipeEnd(q),R.clearAutoPlay(),R.state.autoPlay&&R.autoPlay()}),C(I(R),"onSwipeMove",function(q,Y){R.props.onSwipeMove(Y);var oe=R.props.swipeAnimationHandler(q,R.props,R.state,R.setState.bind(I(R)));return R.setState(p({},oe)),!!Object.keys(oe).length}),C(I(R),"decrement",function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;R.moveTo(R.state.selectedItem-(typeof q=="number"?q:1))}),C(I(R),"increment",function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;R.moveTo(R.state.selectedItem+(typeof q=="number"?q:1))}),C(I(R),"moveTo",function(q){if(typeof q=="number"){var Y=e.Children.count(R.props.children)-1;q<0&&(q=R.props.infiniteLoop?Y:0),q>Y&&(q=R.props.infiniteLoop?0:Y),R.selectItem({selectedItem:q}),R.state.autoPlay&&R.state.isMouseEntered===!1&&R.resetAutoPlay()}}),C(I(R),"onClickNext",function(){R.increment(1)}),C(I(R),"onClickPrev",function(){R.decrement(1)}),C(I(R),"onSwipeForward",function(){R.increment(1),R.props.emulateTouch&&R.setState({cancelClick:!0})}),C(I(R),"onSwipeBackwards",function(){R.decrement(1),R.props.emulateTouch&&R.setState({cancelClick:!0})}),C(I(R),"changeItem",function(q){return function(Y){(!(0,l.isKeyboardEvent)(Y)||Y.key==="Enter")&&R.moveTo(q)}}),C(I(R),"selectItem",function(q){R.setState(p({previousItem:R.state.selectedItem},q),function(){R.setState(R.animationHandler(R.props,R.state))}),R.handleOnChange(q.selectedItem,e.Children.toArray(R.props.children)[q.selectedItem])}),C(I(R),"getInitialImage",function(){var q=R.props.selectedItem,Y=R.itemsRef&&R.itemsRef[q],oe=Y&&Y.getElementsByTagName("img")||[];return oe[0]}),C(I(R),"getVariableItemHeight",function(q){var Y=R.itemsRef&&R.itemsRef[q];if(R.state.hasMount&&Y&&Y.children.length){var oe=Y.children[0].getElementsByTagName("img")||[];if(oe.length>0){var Q=oe[0];if(!Q.complete){var re=function de(){R.forceUpdate(),Q.removeEventListener("load",de)};Q.addEventListener("load",re)}}var ue=oe[0]||Y.children[0],ae=ue.clientHeight;return ae>0?ae:null}return null});var N={initialized:!1,previousItem:O.selectedItem,selectedItem:O.selectedItem,hasMount:!1,isMouseEntered:!1,autoPlay:O.autoPlay,swiping:!1,swipeMovementStarted:!1,cancelClick:!1,itemSize:1,itemListStyle:{},slideStyle:{},selectedStyle:{},prevStyle:{}};return R.animationHandler=typeof O.animationHandler=="function"&&O.animationHandler||O.animationHandler==="fade"&&a.fadeAnimationHandler||a.slideAnimationHandler,R.state=p(p({},N),R.animationHandler(O,N)),R}return b(T,[{key:"componentDidMount",value:function(){this.props.children&&this.setupCarousel()}},{key:"componentDidUpdate",value:function(R,N){!R.children&&this.props.children&&!this.state.initialized&&this.setupCarousel(),!R.autoFocus&&this.props.autoFocus&&this.forceFocus(),N.swiping&&!this.state.swiping&&this.setState(p({},this.props.stopSwipingHandler(this.props,this.state))),(R.selectedItem!==this.props.selectedItem||R.centerMode!==this.props.centerMode)&&(this.updateSizes(),this.moveTo(this.props.selectedItem)),R.autoPlay!==this.props.autoPlay&&(this.props.autoPlay?this.setupAutoPlay():this.destroyAutoPlay(),this.setState({autoPlay:this.props.autoPlay}))}},{key:"componentWillUnmount",value:function(){this.destroyCarousel()}},{key:"setupCarousel",value:function(){var R=this;this.bindEvents(),this.state.autoPlay&&e.Children.count(this.props.children)>1&&this.setupAutoPlay(),this.props.autoFocus&&this.forceFocus(),this.setState({initialized:!0},function(){var N=R.getInitialImage();N&&!N.complete?N.addEventListener("load",R.setMountState):R.setMountState()})}},{key:"destroyCarousel",value:function(){this.state.initialized&&(this.unbindEvents(),this.destroyAutoPlay())}},{key:"setupAutoPlay",value:function(){this.autoPlay();var R=this.carouselWrapperRef;this.props.stopOnHover&&R&&(R.addEventListener("mouseenter",this.stopOnHover),R.addEventListener("mouseleave",this.startOnLeave))}},{key:"destroyAutoPlay",value:function(){this.clearAutoPlay();var R=this.carouselWrapperRef;this.props.stopOnHover&&R&&(R.removeEventListener("mouseenter",this.stopOnHover),R.removeEventListener("mouseleave",this.startOnLeave))}},{key:"bindEvents",value:function(){(0,o.default)().addEventListener("resize",this.updateSizes),(0,o.default)().addEventListener("DOMContentLoaded",this.updateSizes),this.props.useKeyboardArrows&&(0,i.default)().addEventListener("keydown",this.navigateWithKeyboard)}},{key:"unbindEvents",value:function(){(0,o.default)().removeEventListener("resize",this.updateSizes),(0,o.default)().removeEventListener("DOMContentLoaded",this.updateSizes);var R=this.getInitialImage();R&&R.removeEventListener("load",this.setMountState),this.props.useKeyboardArrows&&(0,i.default)().removeEventListener("keydown",this.navigateWithKeyboard)}},{key:"forceFocus",value:function(){var R;(R=this.carouselWrapperRef)===null||R===void 0||R.focus()}},{key:"renderItems",value:function(R){var N=this;return this.props.children?e.Children.map(this.props.children,function(q,Y){var oe=Y===N.state.selectedItem,Q=Y===N.state.previousItem,re=oe&&N.state.selectedStyle||Q&&N.state.prevStyle||N.state.slideStyle||{};N.props.centerMode&&N.props.axis==="horizontal"&&(re=p(p({},re),{},{minWidth:N.props.centerSlidePercentage+"%"})),N.state.swiping&&N.state.swipeMovementStarted&&(re=p(p({},re),{},{pointerEvents:"none"}));var ue={ref:function(de){return N.setItemsRef(de,Y)},key:"itemKey"+Y+(R?"clone":""),className:n.default.ITEM(!0,Y===N.state.selectedItem,Y===N.state.previousItem),onClick:N.handleClickItem.bind(N,Y,q),style:re};return e.default.createElement("li",ue,N.props.renderItem(q,{isSelected:Y===N.state.selectedItem,isPrevious:Y===N.state.previousItem}))}):[]}},{key:"renderControls",value:function(){var R=this,N=this.props,q=N.showIndicators,Y=N.labels,oe=N.renderIndicator,Q=N.children;return q?e.default.createElement("ul",{className:"control-dots"},e.Children.map(Q,function(re,ue){return oe&&oe(R.changeItem(ue),ue===R.state.selectedItem,ue,Y.item)})):null}},{key:"renderStatus",value:function(){return this.props.showStatus?e.default.createElement("p",{className:"carousel-status"},this.props.statusFormatter(this.state.selectedItem+1,e.Children.count(this.props.children))):null}},{key:"renderThumbs",value:function(){return!this.props.showThumbs||!this.props.children||e.Children.count(this.props.children)===0?null:e.default.createElement(r.default,{ref:this.setThumbsRef,onSelectItem:this.handleClickThumb,selectedItem:this.state.selectedItem,transitionTime:this.props.transitionTime,thumbWidth:this.props.thumbWidth,labels:this.props.labels,emulateTouch:this.props.emulateTouch},this.props.renderThumbs(this.props.children))}},{key:"render",value:function(){var R=this;if(!this.props.children||e.Children.count(this.props.children)===0)return null;var N=this.props.swipeable&&e.Children.count(this.props.children)>1,q=this.props.axis==="horizontal",Y=this.props.showArrows&&e.Children.count(this.props.children)>1,oe=Y&&(this.state.selectedItem>0||this.props.infiniteLoop)||!1,Q=Y&&(this.state.selectedItem<e.Children.count(this.props.children)-1||this.props.infiniteLoop)||!1,re=this.renderItems(!0),ue=re.shift(),ae=re.pop(),de={className:n.default.SLIDER(!0,this.state.swiping),onSwipeMove:this.onSwipeMove,onSwipeStart:this.onSwipeStart,onSwipeEnd:this.onSwipeEnd,style:this.state.itemListStyle,tolerance:this.props.swipeScrollTolerance},he={};if(q){if(de.onSwipeLeft=this.onSwipeForward,de.onSwipeRight=this.onSwipeBackwards,this.props.dynamicHeight){var ce=this.getVariableItemHeight(this.state.selectedItem);he.height=ce||"auto"}}else de.onSwipeUp=this.props.verticalSwipe==="natural"?this.onSwipeBackwards:this.onSwipeForward,de.onSwipeDown=this.props.verticalSwipe==="natural"?this.onSwipeForward:this.onSwipeBackwards,de.style=p(p({},de.style),{},{height:this.state.itemSize}),he.height=this.state.itemSize;return e.default.createElement("div",{"aria-label":this.props.ariaLabel,className:n.default.ROOT(this.props.className),ref:this.setCarouselWrapperRef,tabIndex:this.props.useKeyboardArrows?0:void 0},e.default.createElement("div",{className:n.default.CAROUSEL(!0),style:{width:this.props.width}},this.renderControls(),this.props.renderArrowPrev(this.onClickPrev,oe,this.props.labels.leftArrow),e.default.createElement("div",{className:n.default.WRAPPER(!0,this.props.axis),style:he},N?e.default.createElement(t.default,g({tagName:"ul",innerRef:this.setListRef},de,{allowMouseEvents:this.props.emulateTouch}),this.props.infiniteLoop&&ae,this.renderItems(),this.props.infiniteLoop&&ue):e.default.createElement("ul",{className:n.default.SLIDER(!0,this.state.swiping),ref:function(P){return R.setListRef(P)},style:this.state.itemListStyle||{}},this.props.infiniteLoop&&ae,this.renderItems(),this.props.infiniteLoop&&ue)),this.props.renderArrowNext(this.onClickNext,Q,this.props.labels.rightArrow),this.renderStatus()),this.renderThumbs())}}]),T}(e.default.Component);return Xi.default=_,C(_,"displayName","Carousel"),C(_,"defaultProps",{ariaLabel:void 0,axis:"horizontal",centerSlidePercentage:80,interval:3e3,labels:{leftArrow:"previous slide / item",rightArrow:"next slide / item",item:"slide item"},onClickItem:l.noop,onClickThumb:l.noop,onChange:l.noop,onSwipeStart:function(){},onSwipeEnd:function(){},onSwipeMove:function(){return!1},preventMovementUntilSwipeScrollTolerance:!1,renderArrowPrev:function(k,T,O){return e.default.createElement("button",{type:"button","aria-label":O,className:n.default.ARROW_PREV(!T),onClick:k})},renderArrowNext:function(k,T,O){return e.default.createElement("button",{type:"button","aria-label":O,className:n.default.ARROW_NEXT(!T),onClick:k})},renderIndicator:function(k,T,O,R){return e.default.createElement("li",{className:n.default.DOT(T),onClick:k,onKeyDown:k,value:O,key:O,role:"button",tabIndex:0,"aria-label":"".concat(R," ").concat(O+1)})},renderItem:function(k){return k},renderThumbs:function(k){var T=e.Children.map(k,function(O){var R=O;if(O.type!=="img"&&(R=e.Children.toArray(O.props.children).find(function(N){return N.type==="img"})),!!R)return R});return T.filter(function(O){return O}).length===0?(console.warn("No images found! Can't build the thumb list without images. If you don't need thumbs, set showThumbs={false} in the Carousel. Note that it's not possible to get images rendered inside custom components. More info at https://github.com/leandrowd/react-responsive-carousel/blob/master/TROUBLESHOOTING.md"),[]):T},statusFormatter:l.defaultStatusFormatter,selectedItem:0,showArrows:!0,showIndicators:!0,showStatus:!0,showThumbs:!0,stopOnHover:!0,swipeScrollTolerance:5,swipeable:!0,transitionTime:350,verticalSwipe:"standard",width:"100%",animationHandler:"slide",swipeAnimationHandler:a.slideSwipeAnimationHandler,stopSwipingHandler:a.slideStopSwipingHandler}),Xi}var cu={},du;function Mp(){return du||(du=1),cu}var fu;function Rp(){return fu||(fu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Carousel",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"CarouselProps",{enumerable:!0,get:function(){return n.CarouselProps}}),Object.defineProperty(e,"Thumbs",{enumerable:!0,get:function(){return r.default}});var t=i(kp()),n=Mp(),r=i(ud());function i(o){return o&&o.__esModule?o:{default:o}}}(el)),el}var Ip=Rp(),tl,hu;function Ep(){if(hu)return tl;hu=1;var e=Vh(),t=function(){return e.Date.now()};return tl=t,tl}var nl,gu;function dd(){if(gu)return nl;gu=1;var e=Bc(),t=Ep(),n=Wc(),r="Expected a function",i=Math.max,o=Math.min;function l(a,s,u){var c,d,g,h,p,m,y=0,b=!1,v=!1,x=!0;if(typeof a!="function")throw new TypeError(r);s=n(s)||0,e(u)&&(b=!!u.leading,v="maxWait"in u,g=v?i(n(u.maxWait)||0,s):g,x="trailing"in u?!!u.trailing:x);function E(T){var O=c,R=d;return c=d=void 0,y=T,h=a.apply(R,O),h}function M(T){return y=T,p=setTimeout(S,s),b?E(T):h}function I(T){var O=T-m,R=T-y,N=s-O;return v?o(N,g-R):N}function L(T){var O=T-m,R=T-y;return m===void 0||O>=s||O<0||v&&R>=g}function S(){var T=t();if(L(T))return C(T);p=setTimeout(S,I(T))}function C(T){return p=void 0,x&&c?E(T):(c=d=void 0,h)}function _(){p!==void 0&&clearTimeout(p),y=0,c=m=d=p=void 0}function D(){return p===void 0?h:C(t())}function k(){var T=t(),O=L(T);if(c=arguments,d=this,m=T,O){if(p===void 0)return M(m);if(v)return clearTimeout(p),p=setTimeout(S,s),E(m)}return p===void 0&&(p=setTimeout(S,s)),h}return k.cancel=_,k.flush=D,k}return nl=l,nl}var Tp=dd();const fd=pr(Tp);function Mn(e,t,n,r,i=!1){const o=f.useRef();o.current=t,f.useEffect(()=>{if(n===null||n.addEventListener===void 0)return;const l=n,a=s=>{o.current?.call(l,s)};return l.addEventListener(e,a,{passive:r,capture:i}),()=>{l.removeEventListener(e,a,{capture:i})}},[e,n,r,i])}function Mr(e,t){return e===void 0?void 0:t}const Dp=Math.PI;function pu(e){return e*Dp/180}const hd=(e,t,n)=>({x1:e-n/2,y1:t-n/2,x2:e+n/2,y2:t+n/2}),gd=(e,t,n,r,i)=>{switch(e){case"left":return Math.floor(t)+r+i/2;case"center":return Math.floor(t+n/2);case"right":return Math.floor(t+n)-r-i/2}},pd=(e,t,n)=>Math.min(e,t-n*2),md=(e,t,n)=>n.x1<=e&&e<=n.x2&&n.y1<=t&&t<=n.y2,jl=e=>{const t=e.fgColor??"currentColor";return f.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},f.createElement("path",{d:"M12.7073 7.05029C7.87391 11.8837 10.4544 9.30322 6.03024 13.7273C5.77392 13.9836 5.58981 14.3071 5.50189 14.6587L4.52521 18.5655C4.38789 19.1148 4.88543 19.6123 5.43472 19.475L9.34146 18.4983C9.69313 18.4104 10.0143 18.2286 10.2706 17.9722L16.9499 11.2929",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",vectorEffect:"non-scaling-stroke"}),f.createElement("path",{d:"M20.4854 4.92901L19.0712 3.5148C18.2901 2.73375 17.0238 2.73375 16.2428 3.5148L14.475 5.28257C15.5326 7.71912 16.4736 8.6278 18.7176 9.52521L20.4854 7.75744C21.2665 6.97639 21.2665 5.71006 20.4854 4.92901Z",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",vectorEffect:"non-scaling-stroke"}))},Op=e=>{const t=e.fgColor??"currentColor";return f.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},f.createElement("path",{d:"M19 6L10.3802 17L5.34071 11.8758",vectorEffect:"non-scaling-stroke",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))};function Pp(e,t,n){const[r,i]=f.useState(e),o=f.useRef(!0);f.useEffect(()=>()=>{o.current=!1},[]);const l=f.useRef(fd(a=>{o.current&&i(a)},n));return f.useLayoutEffect(()=>{o.current&&l.current(()=>e())},t),r}const Lp="֑-߿יִ-﷽ﹰ-ﻼ",_p="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",Fp=new RegExp("^[^"+_p+"]*["+Lp+"]");function Kl(e){return Fp.test(e)?"rtl":"not-rtl"}let Wo;function Tl(){if(typeof document>"u")return 0;if(Wo!==void 0)return Wo;const e=document.createElement("p");e.style.width="100%",e.style.height="200px";const t=document.createElement("div");t.id="testScrollbar",t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.style.visibility="hidden",t.style.width="200px",t.style.height="150px",t.style.overflow="hidden",t.append(e),document.body.append(t);const n=e.offsetWidth;t.style.overflow="scroll";let r=e.offsetWidth;return n===r&&(r=t.clientWidth),t.remove(),Wo=n-r,Wo}const Ur=Symbol();function Ap(e){const t=f.useRef([Ur,e]);t.current[1]!==e&&(t.current[0]=e),t.current[1]=e;const[n,r]=f.useState(e),[,i]=f.useState(),o=f.useCallback(a=>{const s=t.current[0];s!==Ur&&(a=typeof a=="function"?a(s):a,a===s)||(s!==Ur&&i({}),r(u=>typeof a=="function"?a(s===Ur?u:s):a),t.current[0]=Ur)},[]),l=f.useCallback(()=>{t.current[0]=Ur,i({})},[]);return[t.current[0]===Ur?n:t.current[0],o,l]}function vd(e){if(e.length===0)return"";let t=0,n=0;for(const r of e){if(n+=r.length,n>1e4)break;t++}return e.slice(0,t).join(", ")}function Hp(e){const t=f.useRef(e);return Oi(e,t.current)||(t.current=e),t.current}const zp=e=>{const{urls:t,canWrite:n,onEditClick:r,renderImage:i}=e,o=t.filter(a=>a!=="");if(o.length===0)return null;const l=o.length>1;return f.createElement(wp,{"data-testid":"GDG-default-image-overlay-editor"},f.createElement(Ip.Carousel,{showArrows:l,showThumbs:!1,swipeable:l,emulateTouch:l,infiniteLoop:l},o.map(a=>{const s=i?.(a)??f.createElement("img",{draggable:!1,src:a});return f.createElement("div",{className:"gdg-centering-container",key:a},s)})),n&&r&&f.createElement("button",{className:"gdg-edit-icon",onClick:r},f.createElement(jl,null)))};function bd(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let Jr=bd();function Vp(e){Jr=e}const wd=/[&<>"']/,$p=new RegExp(wd.source,"g"),yd=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Np=new RegExp(yd.source,"g"),Bp={"&":"&","<":"<",">":">",'"':""","'":"'"},mu=e=>Bp[e];function yn(e,t){if(t){if(wd.test(e))return e.replace($p,mu)}else if(yd.test(e))return e.replace(Np,mu);return e}const Wp=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Cd(e){return e.replace(Wp,(t,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const Up=/(^|[^\[])\^/g;function Ft(e,t){e=typeof e=="string"?e:e.source,t=t||"";const n={replace:(r,i)=>(i=i.source||i,i=i.replace(Up,"$1"),e=e.replace(r,i),n),getRegex:()=>new RegExp(e,t)};return n}const qp=/[^\w:]/g,Xp=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function vu(e,t,n){if(e){let r;try{r=decodeURIComponent(Cd(n)).replace(qp,"").toLowerCase()}catch{return null}if(r.indexOf("javascript:")===0||r.indexOf("vbscript:")===0||r.indexOf("data:")===0)return null}t&&!Xp.test(n)&&(n=Kp(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}const Uo={},Gp=/^[^:]+:\/*[^/]*$/,Yp=/^([^:]+:)[\s\S]*$/,jp=/^([^:]+:\/*[^/]*)[\s\S]*$/;function Kp(e,t){Uo[" "+e]||(Gp.test(e)?Uo[" "+e]=e+"/":Uo[" "+e]=ta(e,"/",!0)),e=Uo[" "+e];const n=e.indexOf(":")===-1;return t.substring(0,2)==="//"?n?t:e.replace(Yp,"$1")+t:t.charAt(0)==="/"?n?t:e.replace(jp,"$1")+t:e+t}const ca={exec:function(){}};function bu(e,t){const n=e.replace(/\|/g,(o,l,a)=>{let s=!1,u=l;for(;--u>=0&&a[u]==="\\";)s=!s;return s?"|":" |"}),r=n.split(/ \|/);let i=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(/\\\|/g,"|");return r}function ta(e,t,n){const r=e.length;if(r===0)return"";let i=0;for(;i<r;){const o=e.charAt(r-i-1);if(o===t&&!n)i++;else if(o!==t&&n)i++;else break}return e.slice(0,r-i)}function Zp(e,t){if(e.indexOf(t[1])===-1)return-1;const n=e.length;let r=0,i=0;for(;i<n;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return-1}function Jp(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function wu(e,t){if(t<1)return"";let n="";for(;t>1;)t&1&&(n+=e),t>>=1,e+=e;return n+e}function yu(e,t,n,r){const i=t.href,o=t.title?yn(t.title):null,l=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){r.state.inLink=!0;const a={type:"link",raw:n,href:i,title:o,text:l,tokens:r.inlineTokens(l)};return r.state.inLink=!1,a}return{type:"image",raw:n,href:i,title:o,text:yn(l)}}function Qp(e,t){const n=e.match(/^(\s+)(?:```)/);if(n===null)return t;const r=n[1];return t.split(`
|
|
3
|
-
`).map(i=>{const o=i.match(/^\s+/);if(o===null)return i;const[l]=o;return l.length>=r.length?i.slice(r.length):i}).join(`
|
|
4
|
-
`)}class Zl{constructor(t){this.options=t||Jr}space(t){const n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){const n=this.rules.block.code.exec(t);if(n){const r=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:ta(r,`
|
|
5
|
-
`)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const r=n[0],i=Qp(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline._escapes,"$1"):n[2],text:i}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(/#$/.test(r)){const i=ta(r,"#");(this.options.pedantic||!i||/ $/.test(i))&&(r=i.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){const n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:n[0]}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){const r=n[0].replace(/^ *>[ \t]?/gm,""),i=this.lexer.state.top;this.lexer.state.top=!0;const o=this.lexer.blockTokens(r);return this.lexer.state.top=i,{type:"blockquote",raw:n[0],tokens:o,text:r}}}list(t){let n=this.rules.block.list.exec(t);if(n){let r,i,o,l,a,s,u,c,d,g,h,p,m=n[1].trim();const y=m.length>1,b={type:"list",raw:"",ordered:y,start:y?+m.slice(0,-1):"",loose:!1,items:[]};m=y?`\\d{1,9}\\${m.slice(-1)}`:`\\${m}`,this.options.pedantic&&(m=y?m:"[*+-]");const v=new RegExp(`^( {0,3}${m})((?:[ ][^\\n]*)?(?:\\n|$))`);for(;t&&(p=!1,!(!(n=v.exec(t))||this.rules.block.hr.test(t)));){if(r=n[0],t=t.substring(r.length),c=n[2].split(`
|
|
6
|
-
`,1)[0].replace(/^\t+/,E=>" ".repeat(3*E.length)),d=t.split(`
|
|
7
|
-
`,1)[0],this.options.pedantic?(l=2,h=c.trimLeft()):(l=n[2].search(/[^ ]/),l=l>4?1:l,h=c.slice(l),l+=n[1].length),s=!1,!c&&/^ *$/.test(d)&&(r+=d+`
|
|
8
|
-
`,t=t.substring(d.length+1),p=!0),!p){const E=new RegExp(`^ {0,${Math.min(3,l-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),M=new RegExp(`^ {0,${Math.min(3,l-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),I=new RegExp(`^ {0,${Math.min(3,l-1)}}(?:\`\`\`|~~~)`),L=new RegExp(`^ {0,${Math.min(3,l-1)}}#`);for(;t&&(g=t.split(`
|
|
9
|
-
`,1)[0],d=g,this.options.pedantic&&(d=d.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(I.test(d)||L.test(d)||E.test(d)||M.test(t)));){if(d.search(/[^ ]/)>=l||!d.trim())h+=`
|
|
10
|
-
`+d.slice(l);else{if(s||c.search(/[^ ]/)>=4||I.test(c)||L.test(c)||M.test(c))break;h+=`
|
|
11
|
-
`+d}!s&&!d.trim()&&(s=!0),r+=g+`
|
|
12
|
-
`,t=t.substring(g.length+1),c=d.slice(l)}}b.loose||(u?b.loose=!0:/\n *\n *$/.test(r)&&(u=!0)),this.options.gfm&&(i=/^\[[ xX]\] /.exec(h),i&&(o=i[0]!=="[ ] ",h=h.replace(/^\[[ xX]\] +/,""))),b.items.push({type:"list_item",raw:r,task:!!i,checked:o,loose:!1,text:h}),b.raw+=r}b.items[b.items.length-1].raw=r.trimRight(),b.items[b.items.length-1].text=h.trimRight(),b.raw=b.raw.trimRight();const x=b.items.length;for(a=0;a<x;a++)if(this.lexer.state.top=!1,b.items[a].tokens=this.lexer.blockTokens(b.items[a].text,[]),!b.loose){const E=b.items[a].tokens.filter(I=>I.type==="space"),M=E.length>0&&E.some(I=>/\n.*\n/.test(I.raw));b.loose=M}if(b.loose)for(a=0;a<x;a++)b.items[a].loose=!0;return b}}html(t){const n=this.rules.block.html.exec(t);if(n){const r={type:"html",raw:n[0],pre:!this.options.sanitizer&&(n[1]==="pre"||n[1]==="script"||n[1]==="style"),text:n[0]};if(this.options.sanitize){const i=this.options.sanitizer?this.options.sanitizer(n[0]):yn(n[0]);r.type="paragraph",r.text=i,r.tokens=this.lexer.inline(i)}return r}}def(t){const n=this.rules.block.def.exec(t);if(n){const r=n[1].toLowerCase().replace(/\s+/g," "),i=n[2]?n[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",o=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline._escapes,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:i,title:o}}}table(t){const n=this.rules.block.table.exec(t);if(n){const r={type:"table",header:bu(n[1]).map(i=>({text:i})),align:n[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(`
|
|
13
|
-
`):[]};if(r.header.length===r.align.length){r.raw=n[0];let i=r.align.length,o,l,a,s;for(o=0;o<i;o++)/^ *-+: *$/.test(r.align[o])?r.align[o]="right":/^ *:-+: *$/.test(r.align[o])?r.align[o]="center":/^ *:-+ *$/.test(r.align[o])?r.align[o]="left":r.align[o]=null;for(i=r.rows.length,o=0;o<i;o++)r.rows[o]=bu(r.rows[o],r.header.length).map(u=>({text:u}));for(i=r.header.length,l=0;l<i;l++)r.header[l].tokens=this.lexer.inline(r.header[l].text);for(i=r.rows.length,l=0;l<i;l++)for(s=r.rows[l],a=0;a<s.length;a++)s[a].tokens=this.lexer.inline(s[a].text);return r}}}lheading(t){const n=this.rules.block.lheading.exec(t);if(n)return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:this.lexer.inline(n[1])}}paragraph(t){const n=this.rules.block.paragraph.exec(t);if(n){const r=n[1].charAt(n[1].length-1)===`
|
|
14
|
-
`?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:r,tokens:this.lexer.inline(r)}}}text(t){const n=this.rules.block.text.exec(t);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(t){const n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text:yn(n[1])}}tag(t){const n=this.rules.inline.tag.exec(t);if(n)return!this.lexer.state.inLink&&/^<a /i.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):yn(n[0]):n[0]}}link(t){const n=this.rules.inline.link.exec(t);if(n){const r=n[2].trim();if(!this.options.pedantic&&/^</.test(r)){if(!/>$/.test(r))return;const l=ta(r.slice(0,-1),"\\");if((r.length-l.length)%2===0)return}else{const l=Zp(n[2],"()");if(l>-1){const s=(n[0].indexOf("!")===0?5:4)+n[1].length+l;n[2]=n[2].substring(0,l),n[0]=n[0].substring(0,s).trim(),n[3]=""}}let i=n[2],o="";if(this.options.pedantic){const l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);l&&(i=l[1],o=l[3])}else o=n[3]?n[3].slice(1,-1):"";return i=i.trim(),/^</.test(i)&&(this.options.pedantic&&!/>$/.test(r)?i=i.slice(1):i=i.slice(1,-1)),yu(n,{href:i&&i.replace(this.rules.inline._escapes,"$1"),title:o&&o.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let i=(r[2]||r[1]).replace(/\s+/g," ");if(i=n[i.toLowerCase()],!i){const o=r[0].charAt(0);return{type:"text",raw:o,text:o}}return yu(r,i,r[0],this.lexer)}}emStrong(t,n,r=""){let i=this.rules.inline.emStrong.lDelim.exec(t);if(!i||i[3]&&r.match(/[\p{L}\p{N}]/u))return;const o=i[1]||i[2]||"";if(!o||o&&(r===""||this.rules.inline.punctuation.exec(r))){const l=i[0].length-1;let a,s,u=l,c=0;const d=i[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(d.lastIndex=0,n=n.slice(-1*t.length+l);(i=d.exec(n))!=null;){if(a=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!a)continue;if(s=a.length,i[3]||i[4]){u+=s;continue}else if((i[5]||i[6])&&l%3&&!((l+s)%3)){c+=s;continue}if(u-=s,u>0)continue;s=Math.min(s,s+u+c);const g=t.slice(0,l+i.index+(i[0].length-a.length)+s);if(Math.min(l,s)%2){const p=g.slice(1,-1);return{type:"em",raw:g,text:p,tokens:this.lexer.inlineTokens(p)}}const h=g.slice(2,-2);return{type:"strong",raw:g,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(/\n/g," ");const i=/[^ ]/.test(r),o=/^ /.test(r)&&/ $/.test(r);return i&&o&&(r=r.substring(1,r.length-1)),r=yn(r,!0),{type:"codespan",raw:n[0],text:r}}}br(t){const n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){const n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(t,n){const r=this.rules.inline.autolink.exec(t);if(r){let i,o;return r[2]==="@"?(i=yn(this.options.mangle?n(r[1]):r[1]),o="mailto:"+i):(i=yn(r[1]),o=i),{type:"link",raw:r[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}}url(t,n){let r;if(r=this.rules.inline.url.exec(t)){let i,o;if(r[2]==="@")i=yn(this.options.mangle?n(r[0]):r[0]),o="mailto:"+i;else{let l;do l=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0];while(l!==r[0]);i=yn(r[0]),r[1]==="www."?o="http://"+r[0]:o=r[0]}return{type:"link",raw:r[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t,n){const r=this.rules.inline.text.exec(t);if(r){let i;return this.lexer.state.inRawBlock?i=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):yn(r[0]):r[0]:i=yn(this.options.smartypants?n(r[0]):r[0]),{type:"text",raw:r[0],text:i}}}}const Be={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:ca,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};Be._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;Be._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;Be.def=Ft(Be.def).replace("label",Be._label).replace("title",Be._title).getRegex();Be.bullet=/(?:[*+-]|\d{1,9}[.)])/;Be.listItemStart=Ft(/^( *)(bull) */).replace("bull",Be.bullet).getRegex();Be.list=Ft(Be.list).replace(/bull/g,Be.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Be.def.source+")").getRegex();Be._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";Be._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/;Be.html=Ft(Be.html,"i").replace("comment",Be._comment).replace("tag",Be._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();Be.paragraph=Ft(Be._paragraph).replace("hr",Be.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Be._tag).getRegex();Be.blockquote=Ft(Be.blockquote).replace("paragraph",Be.paragraph).getRegex();Be.normal={...Be};Be.gfm={...Be.normal,table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"};Be.gfm.table=Ft(Be.gfm.table).replace("hr",Be.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Be._tag).getRegex();Be.gfm.paragraph=Ft(Be._paragraph).replace("hr",Be.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",Be.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Be._tag).getRegex();Be.pedantic={...Be.normal,html:Ft(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Be._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ca,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ft(Be.normal._paragraph).replace("hr",Be.hr).replace("heading",` *#{1,6} *[^
|
|
15
|
-
]`).replace("lheading",Be.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const be={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ca,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:ca,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};be._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~";be.punctuation=Ft(be.punctuation).replace(/punctuation/g,be._punctuation).getRegex();be.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;be.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g;be._comment=Ft(Be._comment).replace("(?:-->|$)","-->").getRegex();be.emStrong.lDelim=Ft(be.emStrong.lDelim).replace(/punct/g,be._punctuation).getRegex();be.emStrong.rDelimAst=Ft(be.emStrong.rDelimAst,"g").replace(/punct/g,be._punctuation).getRegex();be.emStrong.rDelimUnd=Ft(be.emStrong.rDelimUnd,"g").replace(/punct/g,be._punctuation).getRegex();be._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g;be._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;be._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;be.autolink=Ft(be.autolink).replace("scheme",be._scheme).replace("email",be._email).getRegex();be._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;be.tag=Ft(be.tag).replace("comment",be._comment).replace("attribute",be._attribute).getRegex();be._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;be._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;be._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;be.link=Ft(be.link).replace("label",be._label).replace("href",be._href).replace("title",be._title).getRegex();be.reflink=Ft(be.reflink).replace("label",be._label).replace("ref",Be._label).getRegex();be.nolink=Ft(be.nolink).replace("ref",Be._label).getRegex();be.reflinkSearch=Ft(be.reflinkSearch,"g").replace("reflink",be.reflink).replace("nolink",be.nolink).getRegex();be.normal={...be};be.pedantic={...be.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Ft(/^!?\[(label)\]\((.*?)\)/).replace("label",be._label).getRegex(),reflink:Ft(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",be._label).getRegex()};be.gfm={...be.normal,escape:Ft(be.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/};be.gfm.url=Ft(be.gfm.url,"i").replace("email",be.gfm._extended_email).getRegex();be.breaks={...be.gfm,br:Ft(be.br).replace("{2,}","*").getRegex(),text:Ft(be.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()};function em(e){return e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function Cu(e){let t="",n,r;const i=e.length;for(n=0;n<i;n++)r=e.charCodeAt(n),Math.random()>.5&&(r="x"+r.toString(16)),t+="&#"+r+";";return t}class Tr{constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Jr,this.options.tokenizer=this.options.tokenizer||new Zl,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={block:Be.normal,inline:be.normal};this.options.pedantic?(n.block=Be.pedantic,n.inline=be.pedantic):this.options.gfm&&(n.block=Be.gfm,this.options.breaks?n.inline=be.breaks:n.inline=be.gfm),this.tokenizer.rules=n}static get rules(){return{block:Be,inline:be}}static lex(t,n){return new Tr(n).lex(t)}static lexInline(t,n){return new Tr(n).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,`
|
|
16
|
-
`),this.blockTokens(t,this.tokens);let n;for(;n=this.inlineQueue.shift();)this.inlineTokens(n.src,n.tokens);return this.tokens}blockTokens(t,n=[]){this.options.pedantic?t=t.replace(/\t/g," ").replace(/^ +$/gm,""):t=t.replace(/^( *)(\t+)/gm,(a,s,u)=>s+" ".repeat(u.length));let r,i,o,l;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(a=>(r=a.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length),r.raw.length===1&&n.length>0?n[n.length-1].raw+=`
|
|
17
|
-
`:n.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
|
|
18
|
-
`+r.raw,i.text+=`
|
|
19
|
-
`+r.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
|
|
20
|
-
`+r.raw,i.text+=`
|
|
21
|
-
`+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(o=t,this.options.extensions&&this.options.extensions.startBlock){let a=1/0;const s=t.slice(1);let u;this.options.extensions.startBlock.forEach(function(c){u=c.call({lexer:this},s),typeof u=="number"&&u>=0&&(a=Math.min(a,u))}),a<1/0&&a>=0&&(o=t.substring(0,a+1))}if(this.state.top&&(r=this.tokenizer.paragraph(o))){i=n[n.length-1],l&&i.type==="paragraph"?(i.raw+=`
|
|
22
|
-
`+r.raw,i.text+=`
|
|
23
|
-
`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r),l=o.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&i.type==="text"?(i.raw+=`
|
|
24
|
-
`+r.raw,i.text+=`
|
|
25
|
-
`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r);continue}if(t){const a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let r,i,o,l=t,a,s,u;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(l))!=null;)c.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,a.index)+"["+wu("a",a[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.blockSkip.exec(l))!=null;)l=l.slice(0,a.index)+"["+wu("a",a[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(a=this.tokenizer.rules.inline.escapedEmSt.exec(l))!=null;)l=l.slice(0,a.index+a[0].length-2)+"++"+l.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;t;)if(s||(u=""),s=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(c=>(r=c.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length),i=n[n.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(r=this.tokenizer.emStrong(t,l,u)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.autolink(t,Cu)){t=t.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t,Cu))){t=t.substring(r.raw.length),n.push(r);continue}if(o=t,this.options.extensions&&this.options.extensions.startInline){let c=1/0;const d=t.slice(1);let g;this.options.extensions.startInline.forEach(function(h){g=h.call({lexer:this},d),typeof g=="number"&&g>=0&&(c=Math.min(c,g))}),c<1/0&&c>=0&&(o=t.substring(0,c+1))}if(r=this.tokenizer.inlineText(o,em)){t=t.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(u=r.raw.slice(-1)),s=!0,i=n[n.length-1],i&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(t){const c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return n}}class Jl{constructor(t){this.options=t||Jr}code(t,n,r){const i=(n||"").match(/\S*/)[0];if(this.options.highlight){const o=this.options.highlight(t,i);o!=null&&o!==t&&(r=!0,t=o)}return t=t.replace(/\n$/,"")+`
|
|
26
|
-
`,i?'<pre><code class="'+this.options.langPrefix+yn(i)+'">'+(r?t:yn(t,!0))+`</code></pre>
|
|
27
|
-
`:"<pre><code>"+(r?t:yn(t,!0))+`</code></pre>
|
|
28
|
-
`}blockquote(t){return`<blockquote>
|
|
29
|
-
${t}</blockquote>
|
|
30
|
-
`}html(t){return t}heading(t,n,r,i){if(this.options.headerIds){const o=this.options.headerPrefix+i.slug(r);return`<h${n} id="${o}">${t}</h${n}>
|
|
31
|
-
`}return`<h${n}>${t}</h${n}>
|
|
32
|
-
`}hr(){return this.options.xhtml?`<hr/>
|
|
33
|
-
`:`<hr>
|
|
34
|
-
`}list(t,n,r){const i=n?"ol":"ul",o=n&&r!==1?' start="'+r+'"':"";return"<"+i+o+`>
|
|
35
|
-
`+t+"</"+i+`>
|
|
36
|
-
`}listitem(t){return`<li>${t}</li>
|
|
37
|
-
`}checkbox(t){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(t){return`<p>${t}</p>
|
|
38
|
-
`}table(t,n){return n&&(n=`<tbody>${n}</tbody>`),`<table>
|
|
39
|
-
<thead>
|
|
40
|
-
`+t+`</thead>
|
|
41
|
-
`+n+`</table>
|
|
42
|
-
`}tablerow(t){return`<tr>
|
|
43
|
-
${t}</tr>
|
|
44
|
-
`}tablecell(t,n){const r=n.header?"th":"td";return(n.align?`<${r} align="${n.align}">`:`<${r}>`)+t+`</${r}>
|
|
45
|
-
`}strong(t){return`<strong>${t}</strong>`}em(t){return`<em>${t}</em>`}codespan(t){return`<code>${t}</code>`}br(){return this.options.xhtml?"<br/>":"<br>"}del(t){return`<del>${t}</del>`}link(t,n,r){if(t=vu(this.options.sanitize,this.options.baseUrl,t),t===null)return r;let i='<a href="'+t+'"';return n&&(i+=' title="'+n+'"'),i+=">"+r+"</a>",i}image(t,n,r){if(t=vu(this.options.sanitize,this.options.baseUrl,t),t===null)return r;let i=`<img src="${t}" alt="${r}"`;return n&&(i+=` title="${n}"`),i+=this.options.xhtml?"/>":">",i}text(t){return t}}class Sd{strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,n,r){return""+r}image(t,n,r){return""+r}br(){return""}}class xd{constructor(){this.seen={}}serialize(t){return t.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(t,n){let r=t,i=0;if(this.seen.hasOwnProperty(r)){i=this.seen[t];do i++,r=t+"-"+i;while(this.seen.hasOwnProperty(r))}return n||(this.seen[t]=i,this.seen[r]=0),r}slug(t,n={}){const r=this.serialize(t);return this.getNextSafeSlug(r,n.dryrun)}}class Dr{constructor(t){this.options=t||Jr,this.options.renderer=this.options.renderer||new Jl,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Sd,this.slugger=new xd}static parse(t,n){return new Dr(n).parse(t)}static parseInline(t,n){return new Dr(n).parseInline(t)}parse(t,n=!0){let r="",i,o,l,a,s,u,c,d,g,h,p,m,y,b,v,x,E,M,I;const L=t.length;for(i=0;i<L;i++){if(h=t[i],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[h.type]&&(I=this.options.extensions.renderers[h.type].call({parser:this},h),I!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(h.type))){r+=I||"";continue}switch(h.type){case"space":continue;case"hr":{r+=this.renderer.hr();continue}case"heading":{r+=this.renderer.heading(this.parseInline(h.tokens),h.depth,Cd(this.parseInline(h.tokens,this.textRenderer)),this.slugger);continue}case"code":{r+=this.renderer.code(h.text,h.lang,h.escaped);continue}case"table":{for(d="",c="",a=h.header.length,o=0;o<a;o++)c+=this.renderer.tablecell(this.parseInline(h.header[o].tokens),{header:!0,align:h.align[o]});for(d+=this.renderer.tablerow(c),g="",a=h.rows.length,o=0;o<a;o++){for(u=h.rows[o],c="",s=u.length,l=0;l<s;l++)c+=this.renderer.tablecell(this.parseInline(u[l].tokens),{header:!1,align:h.align[l]});g+=this.renderer.tablerow(c)}r+=this.renderer.table(d,g);continue}case"blockquote":{g=this.parse(h.tokens),r+=this.renderer.blockquote(g);continue}case"list":{for(p=h.ordered,m=h.start,y=h.loose,a=h.items.length,g="",o=0;o<a;o++)v=h.items[o],x=v.checked,E=v.task,b="",v.task&&(M=this.renderer.checkbox(x),y?v.tokens.length>0&&v.tokens[0].type==="paragraph"?(v.tokens[0].text=M+" "+v.tokens[0].text,v.tokens[0].tokens&&v.tokens[0].tokens.length>0&&v.tokens[0].tokens[0].type==="text"&&(v.tokens[0].tokens[0].text=M+" "+v.tokens[0].tokens[0].text)):v.tokens.unshift({type:"text",text:M}):b+=M),b+=this.parse(v.tokens,y),g+=this.renderer.listitem(b,E,x);r+=this.renderer.list(g,p,m);continue}case"html":{r+=this.renderer.html(h.text);continue}case"paragraph":{r+=this.renderer.paragraph(this.parseInline(h.tokens));continue}case"text":{for(g=h.tokens?this.parseInline(h.tokens):h.text;i+1<L&&t[i+1].type==="text";)h=t[++i],g+=`
|
|
46
|
-
`+(h.tokens?this.parseInline(h.tokens):h.text);r+=n?this.renderer.paragraph(g):g;continue}default:{const S='Token with "'+h.type+'" type was not found.';if(this.options.silent){console.error(S);return}else throw new Error(S)}}}return r}parseInline(t,n){n=n||this.renderer;let r="",i,o,l;const a=t.length;for(i=0;i<a;i++){if(o=t[i],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]&&(l=this.options.extensions.renderers[o.type].call({parser:this},o),l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type))){r+=l||"";continue}switch(o.type){case"escape":{r+=n.text(o.text);break}case"html":{r+=n.html(o.text);break}case"link":{r+=n.link(o.href,o.title,this.parseInline(o.tokens,n));break}case"image":{r+=n.image(o.href,o.title,o.text);break}case"strong":{r+=n.strong(this.parseInline(o.tokens,n));break}case"em":{r+=n.em(this.parseInline(o.tokens,n));break}case"codespan":{r+=n.codespan(o.text);break}case"br":{r+=n.br();break}case"del":{r+=n.del(this.parseInline(o.tokens,n));break}case"text":{r+=n.text(o.text);break}default:{const s='Token with "'+o.type+'" type was not found.';if(this.options.silent){console.error(s);return}else throw new Error(s)}}}return r}}class Dl{constructor(t){this.options=t||Jr}static passThroughHooks=new Set(["preprocess","postprocess"]);preprocess(t){return t}postprocess(t){return t}}function tm(e,t,n){return r=>{if(r.message+=`
|
|
47
|
-
Please report this to https://github.com/markedjs/marked.`,e){const i="<p>An error occurred:</p><pre>"+yn(r.message+"",!0)+"</pre>";if(t)return Promise.resolve(i);if(n){n(null,i);return}return i}if(t)return Promise.reject(r);if(n){n(r);return}throw r}}function kd(e,t){return(n,r,i)=>{typeof r=="function"&&(i=r,r=null);const o={...r};r={...We.defaults,...o};const l=tm(r.silent,r.async,i);if(typeof n>"u"||n===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(Jp(r),r.hooks&&(r.hooks.options=r),i){const a=r.highlight;let s;try{r.hooks&&(n=r.hooks.preprocess(n)),s=e(n,r)}catch(d){return l(d)}const u=function(d){let g;if(!d)try{r.walkTokens&&We.walkTokens(s,r.walkTokens),g=t(s,r),r.hooks&&(g=r.hooks.postprocess(g))}catch(h){d=h}return r.highlight=a,d?l(d):i(null,g)};if(!a||a.length<3||(delete r.highlight,!s.length))return u();let c=0;We.walkTokens(s,function(d){d.type==="code"&&(c++,setTimeout(()=>{a(d.text,d.lang,function(g,h){if(g)return u(g);h!=null&&h!==d.text&&(d.text=h,d.escaped=!0),c--,c===0&&u()})},0))}),c===0&&u();return}if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(n):n).then(a=>e(a,r)).then(a=>r.walkTokens?Promise.all(We.walkTokens(a,r.walkTokens)).then(()=>a):a).then(a=>t(a,r)).then(a=>r.hooks?r.hooks.postprocess(a):a).catch(l);try{r.hooks&&(n=r.hooks.preprocess(n));const a=e(n,r);r.walkTokens&&We.walkTokens(a,r.walkTokens);let s=t(a,r);return r.hooks&&(s=r.hooks.postprocess(s)),s}catch(a){return l(a)}}}function We(e,t,n){return kd(Tr.lex,Dr.parse)(e,t,n)}We.options=We.setOptions=function(e){return We.defaults={...We.defaults,...e},Vp(We.defaults),We};We.getDefaults=bd;We.defaults=Jr;We.use=function(...e){const t=We.defaults.extensions||{renderers:{},childTokens:{}};e.forEach(n=>{const r={...n};if(r.async=We.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if(i.renderer){const o=t.renderers[i.name];o?t.renderers[i.name]=function(...l){let a=i.renderer.apply(this,l);return a===!1&&(a=o.apply(this,l)),a}:t.renderers[i.name]=i.renderer}if(i.tokenizer){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");t[i.level]?t[i.level].unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]))}i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),r.extensions=t),n.renderer){const i=We.defaults.renderer||new Jl;for(const o in n.renderer){const l=i[o];i[o]=(...a)=>{let s=n.renderer[o].apply(i,a);return s===!1&&(s=l.apply(i,a)),s}}r.renderer=i}if(n.tokenizer){const i=We.defaults.tokenizer||new Zl;for(const o in n.tokenizer){const l=i[o];i[o]=(...a)=>{let s=n.tokenizer[o].apply(i,a);return s===!1&&(s=l.apply(i,a)),s}}r.tokenizer=i}if(n.hooks){const i=We.defaults.hooks||new Dl;for(const o in n.hooks){const l=i[o];Dl.passThroughHooks.has(o)?i[o]=a=>{if(We.defaults.async)return Promise.resolve(n.hooks[o].call(i,a)).then(u=>l.call(i,u));const s=n.hooks[o].call(i,a);return l.call(i,s)}:i[o]=(...a)=>{let s=n.hooks[o].apply(i,a);return s===!1&&(s=l.apply(i,a)),s}}r.hooks=i}if(n.walkTokens){const i=We.defaults.walkTokens;r.walkTokens=function(o){let l=[];return l.push(n.walkTokens.call(this,o)),i&&(l=l.concat(i.call(this,o))),l}}We.setOptions(r)})};We.walkTokens=function(e,t){let n=[];for(const r of e)switch(n=n.concat(t.call(We,r)),r.type){case"table":{for(const i of r.header)n=n.concat(We.walkTokens(i.tokens,t));for(const i of r.rows)for(const o of i)n=n.concat(We.walkTokens(o.tokens,t));break}case"list":{n=n.concat(We.walkTokens(r.items,t));break}default:We.defaults.extensions&&We.defaults.extensions.childTokens&&We.defaults.extensions.childTokens[r.type]?We.defaults.extensions.childTokens[r.type].forEach(function(i){n=n.concat(We.walkTokens(r[i],t))}):r.tokens&&(n=n.concat(We.walkTokens(r.tokens,t)))}return n};We.parseInline=kd(Tr.lexInline,Dr.parseInline);We.Parser=Dr;We.parser=Dr.parse;We.Renderer=Jl;We.TextRenderer=Sd;We.Lexer=Tr;We.lexer=Tr.lex;We.Tokenizer=Zl;We.Slugger=xd;We.Hooks=Dl;We.parse=We;We.options;We.setOptions;We.use;We.walkTokens;We.parseInline;Dr.parse;Tr.lex;const nm=sn("div")({name:"MarkdownContainer",class:"gdg-mnuv029",propsAsIs:!1});class rm extends $t.PureComponent{targetElement=null;renderMarkdownIntoDiv(){const{targetElement:t,props:n}=this;if(t===null)return;const{contents:r,createNode:i}=n,o=We(r),l=document.createRange();l.selectNodeContents(t),l.deleteContents();let a=i?.(o);if(a===void 0){const u=document.createElement("template");u.innerHTML=o,a=u.content}t.append(a);const s=t.getElementsByTagName("a");for(const u of s)u.target="_blank",u.rel="noreferrer noopener"}containerRefHook=t=>{this.targetElement=t,this.renderMarkdownIntoDiv()};render(){return this.renderMarkdownIntoDiv(),$t.createElement(nm,{ref:this.containerRefHook})}}const im=sn("textarea")({name:"InputBox",class:"gdg-izpuzkl",propsAsIs:!1}),om=sn("div")({name:"ShadowBox",class:"gdg-s69h75o",propsAsIs:!1}),am=sn("div")({name:"GrowingEntryStyle",class:"gdg-g1y0xocz",propsAsIs:!1});let Su=0;const Qr=e=>{const{placeholder:t,value:n,onKeyDown:r,highlight:i,altNewline:o,validatedSelection:l,...a}=e,{onChange:s,className:u}=a,c=f.useRef(null),d=n??"";An(s!==void 0,"GrowingEntry must be a controlled input area");const[g]=f.useState(()=>"input-box-"+(Su=(Su+1)%1e7));f.useEffect(()=>{const p=c.current;if(p===null||p.disabled)return;const m=d.toString().length;p.focus(),p.setSelectionRange(i?0:m,m)},[]),f.useLayoutEffect(()=>{if(l!==void 0){const p=typeof l=="number"?[l,null]:l;c.current?.setSelectionRange(p[0],p[1])}},[l]);const h=f.useCallback(p=>{p.key==="Enter"&&p.shiftKey&&o===!0||r?.(p)},[o,r]);return f.createElement(am,{className:"gdg-growing-entry"},f.createElement(om,{className:u},d+`
|
|
48
|
-
`),f.createElement(im,{...a,className:(u??"")+" gdg-input",id:g,ref:c,onKeyDown:h,value:d,placeholder:t,dir:"auto"}))},rl={};let xr=null;function lm(){const e=document.createElement("div");return e.style.opacity="0",e.style.pointerEvents="none",e.style.position="fixed",document.body.append(e),e}function go(e){const t=e.toLowerCase().trim();if(rl[t]!==void 0)return rl[t];xr=xr||lm(),xr.style.color="#000",xr.style.color=t;const n=getComputedStyle(xr).color;xr.style.color="#fff",xr.style.color=t;const r=getComputedStyle(xr).color;if(r!==n)return[0,0,0,1];let i=r.replace(/[^\d.,]/g,"").split(",").map(Number.parseFloat);return i.length<4&&i.push(1),i=i.map(o=>Number.isNaN(o)?0:o),rl[t]=i,i}function Kr(e,t){const[n,r,i]=go(e);return`rgba(${n}, ${r}, ${i}, ${t})`}const xu=new Map;function ku(e,t){const n=`${e}-${t}`,r=xu.get(n);if(r!==void 0)return r;const i=Hn(e,t);return xu.set(n,i),i}function Hn(e,t){if(t===void 0)return e;const[n,r,i,o]=go(e);if(o===1)return e;const[l,a,s,u]=go(t),c=o+u*(1-o),d=(o*n+u*l*(1-o))/c,g=(o*r+u*a*(1-o))/c,h=(o*i+u*s*(1-o))/c;return`rgba(${d}, ${g}, ${h}, ${c})`}function Ol(e){if(e==="transparent")return 0;function t(o){const l=o/255;return l<=.04045?l/12.92:Math.pow((l+.055)/1.055,2.4)}const[n,r,i]=go(e);return .2126*t(n)+.7152*t(r)+.0722*t(i)}var Mi=new Map,Ii=new Map,Pl=new Map;function sm(){Mi.clear(),Pl.clear(),Ii.clear()}function um(e,t,n,r,i){var o,l,a;let s=0,u={};for(let d of e)s+=(o=n.get(d))!=null?o:i,u[d]=((l=u[d])!=null?l:0)+1;let c=t-s;for(let d of Object.keys(u)){let g=u[d],h=(a=n.get(d))!=null?a:i,p=h*g/s,m=c*p*r/g,y=h+m;n.set(d,y)}}function cm(e,t){var n;let r=new Map,i=0;for(let u of"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890,.-+=?"){let c=e.measureText(u).width;r.set(u,c),i+=c}let o=i/r.size,l=3,a=(t/o+l)/(l+1),s=r.keys();for(let u of s)r.set(u,((n=r.get(u))!=null?n:o)*a);return r}function so(e,t,n,r){var i,o;let l=Ii.get(n);if(r&&l!==void 0&&l.count>2e4){let u=Pl.get(n);if(u===void 0&&(u=cm(e,l.size),Pl.set(n,u)),l.count>5e5){let d=0;for(let g of t)d+=(i=u.get(g))!=null?i:l.size;return d*1.01}let c=e.measureText(t);return um(t,c.width,u,Math.max(.05,1-l.count/2e5),l.size),Ii.set(n,{count:l.count+t.length,size:l.size}),c.width}let a=e.measureText(t),s=a.width/t.length;if(((o=l?.count)!=null?o:0)>2e4)return a.width;if(l===void 0)Ii.set(n,{count:t.length,size:s});else{let u=s-l.size,c=t.length/(l.count+t.length),d=l.size+u*c;Ii.set(n,{count:l.count+t.length,size:d})}return a.width}function dm(e,t,n,r,i,o,l,a){if(t.length<=1)return t.length;if(i<n)return-1;let s=Math.floor(n/i*o),u=so(e,t.slice(0,Math.max(0,s)),r,l);if(u!==n)if(u<n){for(;u<n;)s++,u=so(e,t.slice(0,Math.max(0,s)),r,l);s--}else for(;u>n;){let c=t.lastIndexOf(" ",s-1);c>0?s=c:s--,u=so(e,t.slice(0,Math.max(0,s)),r,l)}if(t[s]!==" "){let c=0;c=t.lastIndexOf(" ",s),c>0&&(s=c)}return s}function fm(e,t,n,r,i,o){let l=`${t}_${n}_${r}px`,a=Mi.get(l);if(a!==void 0)return a;if(r<=0)return[];let s=[],u=t.split(`
|
|
49
|
-
`),c=Ii.get(n),d=c===void 0?t.length:r/c.size*1.5,g=i&&c!==void 0&&c.count>2e4;for(let h of u){let p=so(e,h.slice(0,Math.max(0,d)),n,g),m=Math.min(h.length,d);if(p<=r)s.push(h);else{for(;p>r;){let y=dm(e,h,r,n,p,m,g),b=h.slice(0,Math.max(0,y));h=h.slice(b.length),s.push(b),p=so(e,h.slice(0,Math.max(0,d)),n,g),m=Math.min(h.length,d)}p>0&&s.push(h)}}return s=s.map((h,p)=>p===0?h.trimEnd():h.trim()),Mi.set(l,s),Mi.size>500&&Mi.delete(Mi.keys().next().value),s}function hm(e,t){return $t.useMemo(()=>e.map((n,r)=>({group:n.group,grow:n.grow,hasMenu:n.hasMenu,icon:n.icon,id:n.id,menuIcon:n.menuIcon,overlayIcon:n.overlayIcon,sourceIndex:r,sticky:r<t,indicatorIcon:n.indicatorIcon,style:n.style,themeOverride:n.themeOverride,title:n.title,trailingRowOptions:n.trailingRowOptions,width:n.width,growOffset:n.growOffset,rowMarker:n.rowMarker,rowMarkerChecked:n.rowMarkerChecked,headerRowMarkerTheme:n.headerRowMarkerTheme,headerRowMarkerAlwaysVisible:n.headerRowMarkerAlwaysVisible,headerRowMarkerDisabled:n.headerRowMarkerDisabled})),[e,t])}function gm(e,t){const[n,r]=t;if(e.columns.hasIndex(n)||e.rows.hasIndex(r))return!0;if(e.current!==void 0){if(uo(e.current.cell,t))return!0;const i=[e.current.range,...e.current.rangeStack];for(const o of i)if(n>=o.x&&n<o.x+o.width&&r>=o.y&&r<o.y+o.height)return!0}return!1}function po(e,t){return(e??"")===(t??"")}function pm(e,t,n){return n.current===void 0||e[1]!==n.current.cell[1]?!1:t.span===void 0?n.current.cell[0]===e[0]:n.current.cell[0]>=t.span[0]&&n.current.cell[0]<=t.span[1]}function Md(e,t){const[n,r]=e;return n>=t.x&&n<t.x+t.width&&r>=t.y&&r<t.y+t.height}function uo(e,t){return e?.[0]===t?.[0]&&e?.[1]===t?.[1]}function Rd(e){return[e.x+e.width-1,e.y+e.height-1]}function Mu(e,t,n){const r=n.x,i=n.x+n.width-1,o=n.y,l=n.y+n.height-1,[a,s]=e;if(s<o||s>l)return!1;if(t.span===void 0)return a>=r&&a<=i;const[u,c]=t.span;return u>=r&&u<=i||c>=r&&u<=i||u<r&&c>i}function mm(e,t,n,r){let i=0;if(n.current===void 0)return i;const o=n.current.range;(r||o.height*o.width>1)&&Mu(e,t,o)&&i++;for(const l of n.current.rangeStack)Mu(e,t,l)&&i++;return i}function Id(e,t){let n=e;if(t!==void 0){let r=[...e];const i=n[t.src];t.src>t.dest?(r.splice(t.src,1),r.splice(t.dest,0,i)):(r.splice(t.dest+1,0,i),r.splice(t.src,1)),r=r.map((o,l)=>({...o,sticky:e[l].sticky})),n=r}return n}function Pi(e,t){let n=0;const r=Id(e,t);for(let i=0;i<r.length;i++){const o=r[i];if(o.sticky)n+=o.width;else break}return n}function ei(e,t,n){if(typeof n=="number")return t*n;{let r=0;for(let i=e-t;i<e;i++)r+=n(i);return r}}function Ll(e,t,n,r,i){const o=Id(e,r),l=[];for(const u of o)if(u.sticky)l.push(u);else break;if(l.length>0)for(const u of l)n-=u.width;let a=t,s=i??0;for(;s<=n&&a<o.length;)s+=o[a].width,a++;for(let u=t;u<a;u++){const c=o[u];c.sticky||l.push(c)}return l}function vm(e,t,n){let r=0;for(const i of t){const o=i.sticky?r:r+(n??0);if(e<=o+i.width)return i.sourceIndex;r+=i.width}return-1}function bm(e,t,n,r,i,o,l,a,s,u){const c=r+i;if(n&&e<=i)return-2;if(e<=c)return-1;let d=t;for(let p=0;p<u;p++){const m=o-1-p,y=typeof l=="number"?l:l(m);if(d-=y,e>=d)return m}const g=o-u,h=e-(s??0);if(typeof l=="number"){const p=Math.floor((h-c)/l)+a;return p>=g?void 0:p}else{let p=c;for(let m=a;m<g;m++){const y=l(m);if(h<=p+y)return m;p+=y}return}}let na=0,co={};const wm=typeof window>"u";async function ym(){wm||document?.fonts?.ready===void 0||(await document.fonts.ready,na=0,co={},sm())}ym();function Ed(e,t,n,r){return`${e}_${r??t?.font}_${n}`}function Or(e,t,n,r="middle"){const i=Ed(e,t,r,n);let o=co[i];return o===void 0&&(o=t.measureText(e),co[i]=o,na++),na>1e4&&(co={},na=0),o}function Td(e,t){const n=Ed(e,void 0,"middle",t);return co[n]}function Qn(e,t){return typeof t!="string"&&(t=t.baseFontFull),Cm(e,t)}function Ru(e,t){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZ";e.save(),e.textBaseline=t;const r=e.measureText(n);return e.restore(),r}const Iu=[];function Cm(e,t){for(const o of Iu)if(o.key===t)return o.val;const n=Ru(e,"alphabetic"),i=-(Ru(e,"middle").actualBoundingBoxDescent-n.actualBoundingBoxDescent)+n.actualBoundingBoxAscent/2;return Iu.push({key:t,val:i}),i}function Sm(e,t,n,r,i,o){const{ctx:l,rect:a,theme:s}=e;let u=Number.MAX_SAFE_INTEGER;const c=500;if(t!==void 0&&(u=n-t,u<c)){const d=1-u/c;l.globalAlpha=d,l.fillStyle=s.bgSearchResult,l.fillRect(a.x+1,a.y+1,a.width-(i?2:1),a.height-(o?2:1)),l.globalAlpha=1,r!==void 0&&(r.fillStyle=s.bgSearchResult)}return u<c}function xo(e,t,n){const{ctx:r,theme:i}=e,o=t??{},l=n??i.textDark;return l!==o.fillStyle&&(r.fillStyle=l,o.fillStyle=l),o}function Ql(e,t,n,r,i){const{rect:o,ctx:l,theme:a}=e;l.fillStyle=a.textDark,ar({ctx:l,rect:o,theme:a},t,n,r,i)}function Dd(e,t,n,r,i,o,l,a,s){s==="right"?e.fillText(t,n+i-(a.cellHorizontalPadding+.5),r+o/2+l):s==="center"?e.fillText(t,n+i/2,r+o/2+l):e.fillText(t,n+a.cellHorizontalPadding+.5,r+o/2+l)}function es(e,t){const n=Or("ABCi09jgqpy",e,t);return n.actualBoundingBoxAscent+n.actualBoundingBoxDescent}function xm(e,t){e.includes(`
|
|
50
|
-
`)&&(e=e.split(/\r?\n/,1)[0]);const n=t/4;return e.length>n&&(e=e.slice(0,n)),e}function km(e,t,n,r,i,o,l,a,s,u){const c=a.baseFontFull,d=fm(e,t,c,i-a.cellHorizontalPadding*2,u??!1),g=es(e,c),h=a.lineHeight*g,p=g+h*(d.length-1),m=p+a.cellVerticalPadding>o;m&&(e.save(),e.rect(n,r,i,o),e.clip());const y=r+o/2-p/2;let b=Math.max(r+a.cellVerticalPadding,y);for(const v of d)if(Dd(e,v,n,b,i,g,l,a,s),b+=h,b>r+o)break;m&&e.restore()}function ar(e,t,n,r,i){const{ctx:o,rect:l,theme:a}=e,{x:s,y:u,width:c,height:d}=l;r=r??!1,r||(t=xm(t,c));const g=Qn(o,a),h=Kl(t)==="rtl";if(n===void 0&&h&&(n="right"),h&&(o.direction="rtl"),t.length>0){let p=!1;n==="right"?(o.textAlign="right",p=!0):n!==void 0&&n!=="left"&&(o.textAlign=n,p=!0),r?km(o,t,s,u,c,d,g,a,n,i):Dd(o,t,s,u,c,d,g,a,n),p&&(o.textAlign="start"),h&&(o.direction="inherit")}}function Zn(e,t,n,r,i,o){typeof o=="number"&&(o={tl:o,tr:o,br:o,bl:o}),o={tl:Math.max(0,Math.min(o.tl,i/2,r/2)),tr:Math.max(0,Math.min(o.tr,i/2,r/2)),bl:Math.max(0,Math.min(o.bl,i/2,r/2)),br:Math.max(0,Math.min(o.br,i/2,r/2))},e.moveTo(t+o.tl,n),e.arcTo(t+r,n,t+r,n+o.tr,o.tr),e.arcTo(t+r,n+i,t+r-o.br,n+i,o.br),e.arcTo(t,n+i,t,n+i-o.bl,o.bl),e.arcTo(t,n,t+o.tl,n,o.tl)}function Mm(e,t,n){e.arc(t,n-1.25*3.5,1.25,0,2*Math.PI,!1),e.arc(t,n,1.25,0,2*Math.PI,!1),e.arc(t,n+1.25*3.5,1.25,0,2*Math.PI,!1)}function Rm(e,t,n){const r=function(a,s){const u=s.x-a.x,c=s.y-a.y,d=Math.sqrt(u*u+c*c),g=u/d,h=c/d;return{x:u,y:s.y-a.y,len:d,nx:g,ny:h,ang:Math.atan2(h,g)}};let i;const o=t.length;let l=t[o-1];for(let a=0;a<o;a++){let s=t[a%o];const u=t[(a+1)%o],c=r(s,l),d=r(s,u),g=c.nx*d.ny-c.ny*d.nx,h=c.nx*d.nx-c.ny*-d.ny;let p=Math.asin(g<-1?-1:g>1?1:g),m=1,y=!1;h<0?p<0?p=Math.PI+p:(p=Math.PI-p,m=-1,y=!0):p>0&&(m=-1,y=!0),i=s.radius!==void 0?s.radius:n;const b=p/2;let v=Math.abs(Math.cos(b)*i/Math.sin(b)),x;v>Math.min(c.len/2,d.len/2)?(v=Math.min(c.len/2,d.len/2),x=Math.abs(v*Math.sin(b)/Math.cos(b))):x=i;let E=s.x+d.nx*v,M=s.y+d.ny*v;E+=-d.ny*x*m,M+=d.nx*x*m,e.arc(E,M,x,c.ang+Math.PI/2*m,d.ang-Math.PI/2*m,y),l=s,s=u}e.closePath()}function _l(e,t,n,r,i,o,l,a,s,u,c,d,g,h,p){const m={x:0,y:o+u,width:0,height:0};if(e>=h.length||t>=c||t<-2||e<0)return m;const y=o-i;if(e>=d){const b=l>e?-1:1,v=Pi(h);m.x+=v+s;for(let x=l;x!==e;x+=b)m.x+=h[b===1?x:x-1].width*b}else for(let b=0;b<e;b++)m.x+=h[b].width;if(m.width=h[e].width+1,t===-1)m.y=i,m.height=y;else if(t===-2){m.y=0,m.height=i;let b=e;const v=h[e].group,x=h[e].sticky;for(;b>0&&po(h[b-1].group,v)&&h[b-1].sticky===x;){const M=h[b-1];m.x-=M.width,m.width+=M.width,b--}let E=e;for(;E+1<h.length&&po(h[E+1].group,v)&&h[E+1].sticky===x;){const M=h[E+1];m.width+=M.width,E++}if(!x){const M=Pi(h),I=m.x-M;I<0&&(m.x-=I,m.width+=I),m.x+m.width>n&&(m.width=n-m.x)}}else if(t>=c-g){let b=c-t;for(m.y=r;b>0;){const v=t+b-1;m.height=typeof p=="number"?p:p(v),m.y-=m.height,b--}m.height+=1}else{const b=a>t?-1:1;if(typeof p=="number"){const v=t-a;m.y+=v*p}else for(let v=a;v!==t;v+=b)m.y+=p(v)*b;m.height=(typeof p=="number"?p:p(t))+1}return m}const ts=1<<21;function Kn(e,t){return(t+2)*ts+e}function Od(e){return e%ts}function ns(e){return Math.floor(e/ts)-2}function rs(e){const t=Od(e),n=ns(e);return[t,n]}class Pd{visibleWindow={x:0,y:0,width:0,height:0};freezeCols=0;freezeRows=[];isInWindow=t=>{const n=Od(t),r=ns(t),i=this.visibleWindow,o=n>=i.x&&n<=i.x+i.width||n<this.freezeCols,l=r>=i.y&&r<=i.y+i.height||this.freezeRows.includes(r);return o&&l};setWindow(t,n,r){this.visibleWindow.x===t.x&&this.visibleWindow.y===t.y&&this.visibleWindow.width===t.width&&this.visibleWindow.height===t.height&&this.freezeCols===n&&Oi(this.freezeRows,r)||(this.visibleWindow=t,this.freezeCols=n,this.freezeRows=r,this.clearOutOfWindow())}}class Im extends Pd{cache=new Map;setValue=(t,n)=>{this.cache.set(Kn(t[0],t[1]),n)};getValue=t=>this.cache.get(Kn(t[0],t[1]));clearOutOfWindow=()=>{for(const[t]of this.cache.entries())this.isInWindow(t)||this.cache.delete(t)}}class fo{cells;constructor(t=[]){this.cells=new Set(t.map(n=>Kn(n[0],n[1])))}add(t){this.cells.add(Kn(t[0],t[1]))}has(t){return t===void 0?!1:this.cells.has(Kn(t[0],t[1]))}remove(t){this.cells.delete(Kn(t[0],t[1]))}clear(){this.cells.clear()}get size(){return this.cells.size}hasHeader(){for(const t of this.cells)if(ns(t)<0)return!0;return!1}hasItemInRectangle(t){for(let n=t.y;n<t.y+t.height;n++)for(let r=t.x;r<t.x+t.width;r++)if(this.cells.has(Kn(r,n)))return!0;return!1}hasItemInRegion(t){for(const n of t)if(this.hasItemInRectangle(n))return!0;return!1}*values(){for(const t of this.cells)yield rs(t)}}function Em(e){return{"--gdg-accent-color":e.accentColor,"--gdg-accent-fg":e.accentFg,"--gdg-accent-light":e.accentLight,"--gdg-text-dark":e.textDark,"--gdg-text-medium":e.textMedium,"--gdg-text-light":e.textLight,"--gdg-text-bubble":e.textBubble,"--gdg-bg-icon-header":e.bgIconHeader,"--gdg-fg-icon-header":e.fgIconHeader,"--gdg-text-header":e.textHeader,"--gdg-text-group-header":e.textGroupHeader??e.textHeader,"--gdg-bg-group-header":e.bgGroupHeader??e.bgHeader,"--gdg-bg-group-header-hovered":e.bgGroupHeaderHovered??e.bgHeaderHovered,"--gdg-text-header-selected":e.textHeaderSelected,"--gdg-bg-cell":e.bgCell,"--gdg-bg-cell-medium":e.bgCellMedium,"--gdg-bg-header":e.bgHeader,"--gdg-bg-header-has-focus":e.bgHeaderHasFocus,"--gdg-bg-header-hovered":e.bgHeaderHovered,"--gdg-bg-bubble":e.bgBubble,"--gdg-bg-bubble-selected":e.bgBubbleSelected,"--gdg-bubble-height":`${e.bubbleHeight}px`,"--gdg-bubble-padding":`${e.bubblePadding}px`,"--gdg-bubble-margin":`${e.bubbleMargin}px`,"--gdg-bg-search-result":e.bgSearchResult,"--gdg-border-color":e.borderColor,"--gdg-horizontal-border-color":e.horizontalBorderColor??e.borderColor,"--gdg-drilldown-border":e.drilldownBorder,"--gdg-link-color":e.linkColor,"--gdg-cell-horizontal-padding":`${e.cellHorizontalPadding}px`,"--gdg-cell-vertical-padding":`${e.cellVerticalPadding}px`,"--gdg-header-font-style":e.headerFontStyle,"--gdg-base-font-style":e.baseFontStyle,"--gdg-marker-font-style":e.markerFontStyle,"--gdg-font-family":e.fontFamily,"--gdg-editor-font-size":e.editorFontSize,"--gdg-checkbox-max-size":`${e.checkboxMaxSize}px`,...e.resizeIndicatorColor===void 0?{}:{"--gdg-resize-indicator-color":e.resizeIndicatorColor},...e.headerBottomBorderColor===void 0?{}:{"--gdg-header-bottom-border-color":e.headerBottomBorderColor},...e.roundingRadius===void 0?{}:{"--gdg-rounding-radius":`${e.roundingRadius}px`}}}const Ld={accentColor:"#4F5DFF",accentFg:"#FFFFFF",accentLight:"rgba(62, 116, 253, 0.1)",textDark:"#313139",textMedium:"#737383",textLight:"#B2B2C0",textBubble:"#313139",bgIconHeader:"#737383",fgIconHeader:"#FFFFFF",textHeader:"#313139",textGroupHeader:"#313139BB",textHeaderSelected:"#FFFFFF",bgCell:"#FFFFFF",bgCellMedium:"#FAFAFB",bgHeader:"#F7F7F8",bgHeaderHasFocus:"#E9E9EB",bgHeaderHovered:"#EFEFF1",bgBubble:"#EDEDF3",bgBubbleSelected:"#FFFFFF",bubbleHeight:20,bubblePadding:6,bubbleMargin:4,bgSearchResult:"#fff9e3",borderColor:"rgba(115, 116, 131, 0.16)",drilldownBorder:"rgba(0, 0, 0, 0)",linkColor:"#353fb5",cellHorizontalPadding:8,cellVerticalPadding:3,headerIconSize:18,headerFontStyle:"600 13px",baseFontStyle:"13px",markerFontStyle:"9px",fontFamily:"Inter, Roboto, -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Ubuntu, noto, arial, sans-serif",editorFontSize:"13px",lineHeight:1.4,checkboxMaxSize:18};function _d(){return Ld}const Fd=$t.createContext(Ld);function Ad(){return $t.useContext(Fd)}function hr(e,...t){const n={...e};for(const r of t)if(r!==void 0)for(const i in r)r.hasOwnProperty(i)&&(i==="bgCell"?n[i]=Hn(r[i],n[i]):n[i]=r[i]);return(n.headerFontFull===void 0||e.fontFamily!==n.fontFamily||e.headerFontStyle!==n.headerFontStyle)&&(n.headerFontFull=`${n.headerFontStyle} ${n.fontFamily}`),(n.baseFontFull===void 0||e.fontFamily!==n.fontFamily||e.baseFontStyle!==n.baseFontStyle)&&(n.baseFontFull=`${n.baseFontStyle} ${n.fontFamily}`),(n.markerFontFull===void 0||e.fontFamily!==n.fontFamily||e.markerFontStyle!==n.markerFontStyle)&&(n.markerFontFull=`${n.markerFontStyle} ${n.fontFamily}`),n}const Fl=150;function Tm(e,t,n,r){return r(t)?.measure?.(e,t,n)??Fl}function Hd(e,t,n,r,i,o,l,a,s){let u=0;const c=i===void 0?[]:i.map(h=>{const p=Tm(e,h[r],t,s);return u=Math.max(u,p),p});if(c.length>5&&a){u=0;let h=0;for(const m of c)h+=m;const p=h/c.length;for(let m=0;m<c.length;m++)c[m]>=p*2?c[m]=0:u=Math.max(u,c[m])}const d=e.font;e.font=t.headerFontFull,u=Math.max(u,e.measureText(n.title).width+t.cellHorizontalPadding*2+(n.icon===void 0?0:28)),e.font=d;const g=Math.max(Math.ceil(o),Math.min(Math.floor(l),Math.ceil(u)));return{...n,width:g}}function Dm(e,t,n,r,i,o,l,a,s){const u=f.useRef(t),c=f.useRef(n),d=f.useRef(l);u.current=t,c.current=n,d.current=l;const[g,h]=f.useMemo(()=>{if(typeof window>"u")return[null,null];const v=document.createElement("canvas");return v.style.display="none",v.style.opacity="0",v.style.position="fixed",[v,v.getContext("2d",{alpha:!1})]},[]);f.useLayoutEffect(()=>(g&&document.documentElement.append(g),()=>{g?.remove()}),[g]);const p=f.useRef({}),m=f.useRef(),[y,b]=f.useState();return f.useLayoutEffect(()=>{const v=c.current;if(v===void 0||e.every($o))return;let x=Math.max(1,10-Math.floor(e.length/1e4)),E=0;x<u.current&&x>1&&(x--,E=1);const M={x:0,y:0,width:e.length,height:Math.min(u.current,x)},I={x:0,y:u.current-1,width:e.length,height:1};(async()=>{const S=v(M,s.signal),C=E>0?v(I,s.signal):void 0;let _;typeof S=="object"?_=S:_=await Ks(S),C!==void 0&&(typeof C=="object"?_=[..._,...C]:_=[..._,...await Ks(C)]),m.current=e,b(_)})()},[s.signal,e]),f.useMemo(()=>{let x=e.every($o)?e:h===null?e.map(L=>$o(L)?L:{...L,width:Fl}):(h.font=d.current.baseFontFull,e.map((L,S)=>{if($o(L))return L;if(p.current[L.id]!==void 0)return{...L,width:p.current[L.id]};if(y===void 0||m.current!==e||L.id===void 0)return{...L,width:Fl};const C=Hd(h,l,L,S,y,i,o,!0,a);return p.current[L.id]=C.width,C})),E=0,M=0;const I=[];for(const[L,S]of x.entries())E+=S.width,S.grow!==void 0&&S.grow>0&&(M+=S.grow,I.push(L));if(E<r&&I.length>0){const L=[...x],S=r-E;let C=S;for(let _=0;_<I.length;_++){const D=I[_],k=(x[D].grow??0)/M,T=_===I.length-1?C:Math.min(C,Math.floor(S*k));L[D]={...x[D],growOffset:T,width:x[D].width+T},C-=T}x=L}return{sizedColumns:x,nonGrowWidth:E}},[r,e,h,y,l,i,o,a])}var il,Eu;function Om(){if(Eu)return il;Eu=1;function e(t,n,r){return t===t&&(r!==void 0&&(t=t<=r?t:r),n!==void 0&&(t=t>=n?t:n)),t}return il=e,il}var ol,Tu;function Pm(){if(Tu)return ol;Tu=1;var e=Om(),t=Wc();function n(r,i,o){return o===void 0&&(o=i,i=void 0),o!==void 0&&(o=t(o),o=o===o?o:0),i!==void 0&&(i=t(i),i=i===i?i:0),e(t(r),i,o)}return ol=n,ol}var Lm=Pm();const Nn=pr(Lm);var al,Du;function _m(){if(Du)return al;Du=1;function e(){}return al=e,al}var ll,Ou;function Fm(){if(Ou)return ll;Ou=1;var e=$h(),t=_m(),n=Uc(),r=1/0,i=e&&1/n(new e([,-0]))[1]==r?function(o){return new e(o)}:t;return ll=i,ll}var sl,Pu;function Am(){if(Pu)return sl;Pu=1;var e=Nh(),t=Bh(),n=Uh(),r=Wh(),i=Fm(),o=Uc(),l=200;function a(s,u,c){var d=-1,g=t,h=s.length,p=!0,m=[],y=m;if(c)p=!1,g=n;else if(h>=l){var b=u?null:i(s);if(b)return o(b);p=!1,g=r,y=new e}else y=u?[]:m;e:for(;++d<h;){var v=s[d],x=u?u(v):v;if(v=c||v!==0?v:0,p&&x===x){for(var E=y.length;E--;)if(y[E]===x)continue e;u&&y.push(x),m.push(v)}else g(y,x,c)||(y!==m&&y.push(x),m.push(v))}return m}return sl=a,sl}var ul,Lu;function Hm(){if(Lu)return ul;Lu=1;var e=Am();function t(n){return n&&n.length?e(n):[]}return ul=t,ul}var zm=Hm();const Vm=pr(zm);var $m=qh();const _u=pr($m),Nt='<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">',Nm=e=>{const t=e.fgColor,n=e.bgColor;return`
|
|
51
|
-
${Nt}<rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/><path d="M15.75 4h-1.5a.25.25 0 0 0-.177.074L9.308 8.838a3.75 3.75 0 1 0 1.854 1.854l1.155-1.157.967.322a.5.5 0 0 0 .65-.55l-.18-1.208.363-.363.727.331a.5.5 0 0 0 .69-.59l-.254-.904.647-.647A.25.25 0 0 0 16 5.75v-1.5a.25.25 0 0 0-.25-.25zM7.5 13.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0z" fill="${t}"/></svg>`},Bm=e=>{const t=e.fgColor,n=e.bgColor;return`
|
|
52
|
-
${Nt}<rect x="2" y="2" width="16" height="16" rx="4" fill="${n}"/><path d="m12.223 13.314 3.052-2.826a.65.65 0 0 0 0-.984l-3.052-2.822c-.27-.25-.634-.242-.865.022-.232.263-.206.636.056.882l2.601 2.41-2.601 2.41c-.262.245-.288.619-.056.882.231.263.595.277.865.026Zm-4.444.005c.266.25.634.241.866-.027.231-.263.206-.636-.06-.882L5.983 10l2.602-2.405c.266-.25.291-.62.06-.887-.232-.263-.596-.272-.866-.022L4.723 9.51a.653.653 0 0 0 0 .983l3.056 2.827Z" fill="${t}"/></svg>`},Wm=e=>{const t=e.fgColor,n=e.bgColor;return`${Nt}
|
|
53
|
-
<path d="M16.22 2H3.78C2.8 2 2 2.8 2 3.78v12.44C2 17.2 2.8 18 3.78 18h12.44c.98 0 1.77-.8 1.77-1.78L18 3.78C18 2.8 17.2 2 16.22 2z" fill="${n}"/>
|
|
54
|
-
<path d="M6.52 12.78H5.51V8.74l-1.33.47v-.87l2.29-.83h.05v5.27zm5.2 0H8.15v-.69l1.7-1.83a6.38 6.38 0 0 0 .34-.4c.09-.11.16-.22.22-.32s.1-.19.12-.27a.9.9 0 0 0 0-.56.63.63 0 0 0-.15-.23.58.58 0 0 0-.22-.15.75.75 0 0 0-.29-.05c-.27 0-.48.08-.62.23a.95.95 0 0 0-.2.65H8.03c0-.24.04-.46.13-.67a1.67 1.67 0 0 1 .97-.91c.23-.1.49-.14.77-.14.26 0 .5.04.7.11.21.08.38.18.52.32.14.13.25.3.32.48a1.74 1.74 0 0 1 .03 1.13 2.05 2.05 0 0 1-.24.47 4.16 4.16 0 0 1-.35.47l-.47.5-1 1.05h2.32v.8zm1.8-3.08h.55c.28 0 .48-.06.61-.2a.76.76 0 0 0 .2-.55.8.8 0 0 0-.05-.28.56.56 0 0 0-.13-.22.6.6 0 0 0-.23-.15.93.93 0 0 0-.32-.05.92.92 0 0 0-.29.05.72.72 0 0 0-.23.12.57.57 0 0 0-.21.46H12.4a1.3 1.3 0 0 1 .5-1.04c.15-.13.33-.23.54-.3a2.48 2.48 0 0 1 1.4 0c.2.06.4.15.55.28.15.13.27.28.36.47.08.19.13.4.13.65a1.15 1.15 0 0 1-.2.65 1.36 1.36 0 0 1-.58.49c.15.05.28.12.38.2a1.14 1.14 0 0 1 .43.62c.03.13.05.26.05.4 0 .25-.05.47-.14.66a1.42 1.42 0 0 1-.4.49c-.16.13-.35.23-.58.3a2.51 2.51 0 0 1-.73.1c-.22 0-.44-.03-.65-.09a1.8 1.8 0 0 1-.57-.28 1.43 1.43 0 0 1-.4-.47 1.41 1.41 0 0 1-.15-.66h1a.66.66 0 0 0 .22.5.87.87 0 0 0 .58.2c.25 0 .45-.07.6-.2a.71.71 0 0 0 .21-.56.97.97 0 0 0-.06-.36.61.61 0 0 0-.18-.25.74.74 0 0 0-.28-.15 1.33 1.33 0 0 0-.37-.04h-.55V9.7z" fill="${t}"/>
|
|
55
|
-
</svg>`},Um=e=>{const t=e.fgColor,n=e.bgColor;return`${Nt}
|
|
56
|
-
<path d="M16.222 2H3.778C2.8 2 2 2.8 2 3.778v12.444C2 17.2 2.8 18 3.778 18h12.444c.978 0 1.77-.8 1.77-1.778L18 3.778C18 2.8 17.2 2 16.222 2z" fill="${n}"/>
|
|
57
|
-
<path d="M8.182 12.4h3.636l.655 1.6H14l-3.454-8H9.455L6 14h1.527l.655-1.6zM10 7.44l1.36 3.651H8.64L10 7.441z" fill="${t}"/>
|
|
58
|
-
</svg>`},qm=e=>{const t=e.fgColor,n=e.bgColor;return`${Nt}
|
|
59
|
-
<path
|
|
60
|
-
d="M16.2222 2H3.77778C2.8 2 2 2.8 2 3.77778V16.2222C2 17.2 2.8 18 3.77778 18H16.2222C17.2 18 17.9911 17.2 17.9911 16.2222L18 3.77778C18 2.8 17.2 2 16.2222 2Z"
|
|
61
|
-
fill="${n}"
|
|
62
|
-
/>
|
|
63
|
-
<path
|
|
64
|
-
fill-rule="evenodd"
|
|
65
|
-
clip-rule="evenodd"
|
|
66
|
-
d="M7.66667 6.66669C5.73368 6.66669 4.16667 8.15907 4.16667 10C4.16667 11.841 5.73368 13.3334 7.66667 13.3334H12.3333C14.2663 13.3334 15.8333 11.841 15.8333 10C15.8333 8.15907 14.2663 6.66669 12.3333 6.66669H7.66667ZM12.5 12.5C13.8807 12.5 15 11.3807 15 10C15 8.61931 13.8807 7.50002 12.5 7.50002C11.1193 7.50002 10 8.61931 10 10C10 11.3807 11.1193 12.5 12.5 12.5Z"
|
|
67
|
-
fill="${t}"
|
|
68
|
-
/>
|
|
69
|
-
</svg>`},zd=e=>{const t=e.fgColor,n=e.bgColor;return`${Nt}
|
|
70
|
-
<path d="M16.222 2H3.778C2.8 2 2 2.8 2 3.778v12.444C2 17.2 2.8 18 3.778 18h12.444c.978 0 1.77-.8 1.77-1.778L18 3.778C18 2.8 17.2 2 16.222 2z" fill="${n}"/>
|
|
71
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.29 4.947a3.368 3.368 0 014.723.04 3.375 3.375 0 01.041 4.729l-.009.009-1.596 1.597a3.367 3.367 0 01-5.081-.364.71.71 0 011.136-.85 1.95 1.95 0 002.942.21l1.591-1.593a1.954 1.954 0 00-.027-2.733 1.95 1.95 0 00-2.732-.027l-.91.907a.709.709 0 11-1.001-1.007l.915-.911.007-.007z" fill="${t}"/>
|
|
72
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.55 8.678a3.368 3.368 0 015.082.364.71.71 0 01-1.136.85 1.95 1.95 0 00-2.942-.21l-1.591 1.593a1.954 1.954 0 00.027 2.733 1.95 1.95 0 002.73.028l.906-.906a.709.709 0 111.003 1.004l-.91.91-.008.01a3.368 3.368 0 01-4.724-.042 3.375 3.375 0 01-.041-4.728l.009-.009L6.55 8.678z" fill="${t}"/>
|
|
73
|
-
</svg>
|
|
74
|
-
`},Xm=e=>{const t=e.bgColor;return`${Nt}
|
|
75
|
-
<path stroke="${t}" stroke-width="2" d="M12 3v14"/>
|
|
76
|
-
<path stroke="${t}" stroke-width="2" stroke-linecap="round" d="M10 4h4m-4 12h4"/>
|
|
77
|
-
<path d="M11 14h4a3 3 0 0 0 3-3V9a3 3 0 0 0-3-3h-4v2h4a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-4v2ZM9.5 8H5a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h4.5v2H5a3 3 0 0 1-3-3V9a3 3 0 0 1 3-3h4.5v2Z" fill="${t}"/>
|
|
78
|
-
</svg>
|
|
79
|
-
`},Gm=zd,Ym=e=>{const t=e.fgColor,n=e.bgColor;return`${Nt}
|
|
80
|
-
<path d="M16.222 2H3.778C2.8 2 2 2.8 2 3.778v12.444C2 17.2 2.8 18 3.778 18h12.444c.978 0 1.77-.8 1.77-1.778L18 3.778C18 2.8 17.2 2 16.222 2z" fill="${n}"/>
|
|
81
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M7 13.138a.5.5 0 00.748.434l5.492-3.138a.5.5 0 000-.868L7.748 6.427A.5.5 0 007 6.862v6.276z" fill="${t}"/>
|
|
82
|
-
</svg>`},jm=e=>{const t=e.fgColor,n=e.bgColor;return`
|
|
83
|
-
${Nt}
|
|
84
|
-
<path d="M10 5a5 5 0 1 0 0 10 5 5 0 0 0 0-10zm0 9.17A4.17 4.17 0 0 1 5.83 10 4.17 4.17 0 0 1 10 5.83 4.17 4.17 0 0 1 14.17 10 4.17 4.17 0 0 1 10 14.17z" fill="${t}"/>
|
|
85
|
-
<path d="M8.33 8.21a.83.83 0 1 0-.03 1.67.83.83 0 0 0 .03-1.67zm3.34 0a.83.83 0 1 0-.04 1.67.83.83 0 0 0 .04-1.67z" fill="${t}"/>
|
|
86
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.53 13.9a2.82 2.82 0 0 1-5.06 0l.77-.38a1.97 1.97 0 0 0 3.52 0l.77.39z" fill="${t}"/>
|
|
87
|
-
<path d="M16.22 2H3.78C2.8 2 2 2.8 2 3.78v12.44C2 17.2 2.8 18 3.78 18h12.44c.98 0 1.77-.8 1.77-1.78L18 3.78C18 2.8 17.2 2 16.22 2z" fill="${n}"/>
|
|
88
|
-
<path d="M10 4a6 6 0 1 0 0 12 6 6 0 0 0 0-12zm0 11a5 5 0 1 1 .01-10.01A5 5 0 0 1 10 15z" fill="${t}"/>
|
|
89
|
-
<path d="M8 7.86a1 1 0 1 0-.04 2 1 1 0 0 0 .04-2zm4 0a1 1 0 1 0-.04 2 1 1 0 0 0 .04-2z" fill="${t}"/>
|
|
90
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.53 11.9a2.82 2.82 0 0 1-5.06 0l.77-.38a1.97 1.97 0 0 0 3.52 0l.77.39z" fill="${t}"/>
|
|
91
|
-
</svg>`},Km=e=>{const t=e.fgColor,n=e.bgColor;return`${Nt}
|
|
92
|
-
<path d="M16.222 2H3.778C2.8 2 2 2.8 2 3.778v12.444C2 17.2 2.8 18 3.778 18h12.444c.978 0 1.77-.8 1.77-1.778L18 3.778C18 2.8 17.2 2 16.222 2z" fill="${n}"/>
|
|
93
|
-
<path opacity=".5" fill-rule="evenodd" clip-rule="evenodd" d="M12.499 10.801a.5.5 0 01.835 0l2.698 4.098a.5.5 0 01-.418.775H10.22a.5.5 0 01-.417-.775l2.697-4.098z" fill="${t}"/>
|
|
94
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.07 8.934a.5.5 0 01.824 0l4.08 5.958a.5.5 0 01-.412.782h-8.16a.5.5 0 01-.413-.782l4.08-5.958zM13.75 8.333a2.083 2.083 0 100-4.166 2.083 2.083 0 000 4.166z" fill="${t}"/>
|
|
95
|
-
</svg>`},Zm=e=>{const t=e.fgColor,n=e.bgColor;return`
|
|
96
|
-
${Nt}
|
|
97
|
-
<path fill="${t}" d="M3 3h14v14H3z"/>
|
|
98
|
-
<path d="M16.22 2H3.78C2.8 2 2 2.8 2 3.78v12.44C2 17.2 2.8 18 3.78 18h12.44c.98 0 1.77-.8 1.77-1.78L18 3.78C18 2.8 17.2 2 16.22 2zm-7.24 9.78h1.23c.15 0 .27.06.36.18l.98 1.28a.43.43 0 0 1-.05.58l-1.2 1.21a.45.45 0 0 1-.6.04A6.72 6.72 0 0 1 7.33 10c0-.61.1-1.2.25-1.78a6.68 6.68 0 0 1 2.12-3.3.44.44 0 0 1 .6.04l1.2 1.2c.16.17.18.42.05.59l-.98 1.29a.43.43 0 0 1-.36.17H8.98A5.38 5.38 0 0 0 8.67 10c0 .62.11 1.23.3 1.79z" fill="${n}"/>
|
|
99
|
-
</svg>`},Jm=e=>{const t=e.fgColor,n=e.bgColor;return`
|
|
100
|
-
${Nt}
|
|
101
|
-
<path d="M16.22 2H3.78C2.8 2 2 2.8 2 3.78v12.44C2 17.2 2.8 18 3.78 18h12.44c.98 0 1.77-.8 1.77-1.78L18 3.78C18 2.8 17.2 2 16.22 2z" fill="${n}"/>
|
|
102
|
-
<path d="m13.49 13.15-2.32-3.27h1.4V7h1.86v2.88h1.4l-2.34 3.27zM11 13H9v-3l-1.5 1.92L6 10v3H4V7h2l1.5 2L9 7h2v6z" fill="${t}"/>
|
|
103
|
-
</svg>`},Qm=e=>{const t=e.fgColor,n=e.bgColor;return`${Nt}
|
|
104
|
-
<path d="M16.222 2H3.778C2.8 2 2 2.8 2 3.778v12.444C2 17.2 2.8 18 3.778 18h12.444c.978 0 1.77-.8 1.77-1.778L18 3.778C18 2.8 17.2 2 16.222 2z" fill="${n}"/>
|
|
105
|
-
<path d="M14.8 4.182h-.6V3H13v1.182H7V3H5.8v1.182h-.6c-.66 0-1.2.532-1.2 1.182v9.454C4 15.468 4.54 16 5.2 16h9.6c.66 0 1.2-.532 1.2-1.182V5.364c0-.65-.54-1.182-1.2-1.182zm0 10.636H5.2V7.136h9.6v7.682z" fill="${t}"/>
|
|
106
|
-
</svg>`},e0=e=>{const t=e.fgColor,n=e.bgColor;return`
|
|
107
|
-
${Nt}
|
|
108
|
-
<path d="M16.22 2H3.78C2.8 2 2 2.8 2 3.78v12.44C2 17.2 2.8 18 3.78 18h12.44c.98 0 1.77-.8 1.77-1.78L18 3.78C18 2.8 17.2 2 16.22 2z" fill="${n}"/>
|
|
109
|
-
<path d="M10 4a6 6 0 0 0-6 6 6 6 0 0 0 6 6 6 6 0 0 0 6-6 6 6 0 0 0-6-6zm0 10.8A4.8 4.8 0 0 1 5.2 10a4.8 4.8 0 1 1 4.8 4.8z" fill="${t}"/>
|
|
110
|
-
<path d="M10 7H9v3.93L12.5 13l.5-.8-3-1.76V7z" fill="${t}"/>
|
|
111
|
-
</svg>`},t0=e=>{const t=e.fgColor,n=e.bgColor;return`${Nt}
|
|
112
|
-
<rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>
|
|
113
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M10 8.643a1.357 1.357 0 100 2.714 1.357 1.357 0 000-2.714zM7.357 10a2.643 2.643 0 115.286 0 2.643 2.643 0 01-5.286 0z" fill="${t}"/>
|
|
114
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.589 4.898A5.643 5.643 0 0115.643 10v.5a2.143 2.143 0 01-4.286 0V8a.643.643 0 011.286 0v2.5a.857.857 0 001.714 0V10a4.357 4.357 0 10-1.708 3.46.643.643 0 01.782 1.02 5.643 5.643 0 11-5.842-9.582z" fill="${t}"/>
|
|
115
|
-
</svg>`},n0=e=>{const t=e.fgColor,n=e.bgColor;return`
|
|
116
|
-
${Nt}
|
|
117
|
-
<rect x="2" y="8" width="10" height="8" rx="2" fill="${n}"/>
|
|
118
|
-
<rect x="8" y="4" width="10" height="8" rx="2" fill="${n}"/>
|
|
119
|
-
<path d="M10.68 7.73V6l2.97 3.02-2.97 3.02v-1.77c-2.13 0-3.62.7-4.68 2.2.43-2.15 1.7-4.31 4.68-4.74z" fill="${t}"/>
|
|
120
|
-
</svg>`},r0=e=>{const t=e.fgColor,n=e.bgColor;return`${Nt}
|
|
121
|
-
<path fill="${t}" d="M4 3h12v14H4z"/>
|
|
122
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.6 2A1.6 1.6 0 002 3.6v12.8A1.6 1.6 0 003.6 18h12.8a1.6 1.6 0 001.6-1.6V3.6A1.6 1.6 0 0016.4 2H3.6zm11.3 10.8a.7.7 0 01.7.7v1.4a.7.7 0 01-.7.7h-1.4a.7.7 0 01-.7-.7v-1.4a.7.7 0 01.6-.693.117.117 0 00.1-.115V10.35a.117.117 0 00-.117-.116h-2.8a.117.117 0 00-.117.116v2.333c0 .064.053.117.117.117h.117a.7.7 0 01.7.7v1.4a.7.7 0 01-.7.7H9.3a.7.7 0 01-.7-.7v-1.4a.7.7 0 01.7-.7h.117a.117.117 0 00.117-.117V10.35a.117.117 0 00-.117-.117h-2.8a.117.117 0 00-.117.117v2.342c0 .058.042.106.1.115a.7.7 0 01.6.693v1.4a.7.7 0 01-.7.7H5.1a.7.7 0 01-.7-.7v-1.4a.7.7 0 01.7-.7h.35a.116.116 0 00.116-.117v-2.45c0-.515.418-.933.934-.933h2.917a.117.117 0 00.117-.117V6.85a.117.117 0 00-.117-.116h-2.45a.7.7 0 01-.7-.7V5.1a.7.7 0 01.7-.7h6.067a.7.7 0 01.7.7v.934a.7.7 0 01-.7.7h-2.45a.117.117 0 00-.118.116v2.333c0 .064.053.117.117.117H13.5c.516 0 .934.418.934.934v2.45c0 .063.052.116.116.116h.35z" fill="${n}"/>
|
|
123
|
-
</svg>`},i0=e=>{const t=e.fgColor,n=e.bgColor;return`
|
|
124
|
-
${Nt}
|
|
125
|
-
<rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>
|
|
126
|
-
<path d="M9.98 13.33c.45 0 .74-.3.73-.75l-.01-.1-.16-1.67 1.45 1.05a.81.81 0 0 0 .5.18c.37 0 .72-.32.72-.76 0-.3-.17-.54-.49-.68l-1.63-.77 1.63-.77c.32-.14.49-.37.49-.67 0-.45-.34-.76-.71-.76a.81.81 0 0 0-.5.18l-1.47 1.03.16-1.74.01-.08c.01-.46-.27-.76-.72-.76-.46 0-.76.32-.75.76l.01.08.16 1.74-1.47-1.03a.77.77 0 0 0-.5-.18.74.74 0 0 0-.72.76c0 .3.17.53.49.67l1.63.77-1.62.77c-.32.14-.5.37-.5.68 0 .44.35.75.72.75a.78.78 0 0 0 .5-.17L9.4 10.8l-.16 1.68v.09c-.02.44.28.75.74.75z" fill="${t}"/>
|
|
127
|
-
</svg>`},o0=e=>{const t=e.fgColor,n=e.bgColor;return`
|
|
128
|
-
${Nt}
|
|
129
|
-
<rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>
|
|
130
|
-
<path d="M8 5.83H5.83a.83.83 0 0 0 0 1.67h1.69A4.55 4.55 0 0 1 8 5.83zm-.33 3.34H5.83a.83.83 0 0 0 0 1.66h2.72a4.57 4.57 0 0 1-.88-1.66zM5.83 12.5a.83.83 0 0 0 0 1.67h7.5a.83.83 0 1 0 0-1.67h-7.5zm8.8-2.9a3.02 3.02 0 0 0 .46-1.6c0-1.66-1.32-3-2.94-3C10.52 5 9.2 6.34 9.2 8s1.31 3 2.93 3c.58 0 1.11-.17 1.56-.47l2.04 2.08.93-.94-2.04-2.08zm-2.48.07c-.9 0-1.63-.75-1.63-1.67s.73-1.67 1.63-1.67c.9 0 1.63.75 1.63 1.67s-.73 1.67-1.63 1.67z" fill="${t}"/>
|
|
131
|
-
</svg>`},a0=e=>{const t=e.fgColor,n=e.bgColor;return`${Nt}
|
|
132
|
-
<rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>
|
|
133
|
-
<path d="M7.676 4.726V3l2.976 3.021-2.976 3.022v-1.77c-2.125 0-3.613.69-4.676 2.201.425-2.158 1.7-4.316 4.676-4.748zM10.182 14.4h3.636l.655 1.6H16l-3.454-8h-1.091L8 16h1.527l.655-1.6zM12 9.44l1.36 3.65h-2.72L12 9.44z" fill="${t}"/>
|
|
134
|
-
</svg>`},l0=e=>{const t=e.fgColor,n=e.bgColor;return`${Nt}
|
|
135
|
-
<rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>
|
|
136
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.167 5.417a.833.833 0 100 1.666h4.166a.833.833 0 100-1.666H4.167z" fill="${t}"/>
|
|
137
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.083 4.167a.833.833 0 10-1.666 0v4.166a.833.833 0 101.666 0V4.167zM11.667 5.417a.833.833 0 100 1.666h4.166a.833.833 0 100-1.666h-4.166zM5.367 11.688a.833.833 0 00-1.179 1.179l2.947 2.946a.833.833 0 001.178-1.178l-2.946-2.947z" fill="${t}"/>
|
|
138
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.313 12.867a.833.833 0 10-1.178-1.179l-2.947 2.947a.833.833 0 101.179 1.178l2.946-2.946z" fill="${t}"/>
|
|
139
|
-
<path d="M10.833 12.5c0-.46.373-.833.834-.833h4.166a.833.833 0 110 1.666h-4.166a.833.833 0 01-.834-.833zM10.833 15c0-.46.373-.833.834-.833h4.166a.833.833 0 110 1.666h-4.166a.833.833 0 01-.834-.833z" fill="${t}"/>
|
|
140
|
-
</svg>`},s0=e=>{const t=e.fgColor,n=e.bgColor;return`
|
|
141
|
-
${Nt}
|
|
142
|
-
<path d="M16.22 2H3.78C2.8 2 2 2.8 2 3.78v12.44C2 17.2 2.8 18 3.78 18h12.44c.98 0 1.77-.8 1.77-1.78L18 3.78C18 2.8 17.2 2 16.22 2z" fill="${n}"/>
|
|
143
|
-
<path d="M10 8.84a1.16 1.16 0 1 0 0 2.32 1.16 1.16 0 0 0 0-2.32zm3.02 3.61a3.92 3.92 0 0 0 .78-3.28.49.49 0 1 0-.95.2c.19.87-.02 1.78-.58 2.47a2.92 2.92 0 1 1-4.13-4.08 2.94 2.94 0 0 1 2.43-.62.49.49 0 1 0 .17-.96 3.89 3.89 0 1 0 2.28 6.27zM10 4.17a5.84 5.84 0 0 0-5.44 7.93.49.49 0 1 0 .9-.35 4.86 4.86 0 1 1 2.5 2.67.49.49 0 1 0-.4.88c.76.35 1.6.54 2.44.53a5.83 5.83 0 0 0 0-11.66zm3.02 3.5a.7.7 0 1 0-1.4 0 .7.7 0 0 0 1.4 0zm-6.97 5.35a.7.7 0 1 1 0 1.4.7.7 0 0 1 0-1.4z" fill="${t}"/>
|
|
144
|
-
</svg>`},u0=e=>{const t=e.fgColor,n=e.bgColor;return`${Nt}
|
|
145
|
-
<rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>
|
|
146
|
-
<path d="M12.4 13.565c1.865-.545 3.645-2.083 3.645-4.396 0-1.514-.787-2.604-2.071-2.604C12.69 6.565 12 7.63 12 8.939c1.114.072 1.865.726 1.865 1.683 0 .933-.8 1.647-1.84 2.023l.375.92zM4 5h6v2H4zM4 9h5v2H4zM4 13h4v2H4z" fill="${t}"/>
|
|
147
|
-
</svg>`},c0=e=>{const t=e.fgColor,n=e.bgColor;return`
|
|
148
|
-
${Nt}
|
|
149
|
-
<rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>
|
|
150
|
-
<path d="M12.4 13.56c1.86-.54 3.65-2.08 3.65-4.4 0-1.5-.8-2.6-2.08-2.6S12 7.64 12 8.95c1.11.07 1.86.73 1.86 1.68 0 .94-.8 1.65-1.83 2.03l.37.91zM4 5h6v2H4zm0 4h5v2H4zm0 4h4v2H4z" fill="${t}"/>
|
|
151
|
-
</svg>`},d0=e=>{const t=e.fgColor,n=e.bgColor;return`${Nt}
|
|
152
|
-
<path d="M16.222 2H3.778C2.8 2 2 2.8 2 3.778v12.444C2 17.2 2.8 18 3.778 18h12.444c.978 0 1.77-.8 1.77-1.778L18 3.778C18 2.8 17.2 2 16.222 2z" fill="${n}"/>
|
|
153
|
-
<path d="M10 7a1 1 0 100-2v2zm0 6a1 1 0 100 2v-2zm0-8H7v2h3V5zm-3 6h5V9H7v2zm5 2h-2v2h2v-2zm1-1a1 1 0 01-1 1v2a3 3 0 003-3h-2zm-1-1a1 1 0 011 1h2a3 3 0 00-3-3v2zM4 8a3 3 0 003 3V9a1 1 0 01-1-1H4zm3-3a3 3 0 00-3 3h2a1 1 0 011-1V5z" fill="${t}"/>
|
|
154
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.856 12.014a.5.5 0 00-.712.702L5.409 14l-1.265 1.284a.5.5 0 00.712.702l1.255-1.274 1.255 1.274a.5.5 0 00.712-.702L6.813 14l1.265-1.284a.5.5 0 00-.712-.702L6.11 13.288l-1.255-1.274zM12.856 4.014a.5.5 0 00-.712.702L13.409 6l-1.265 1.284a.5.5 0 10.712.702l1.255-1.274 1.255 1.274a.5.5 0 10.712-.702L14.813 6l1.265-1.284a.5.5 0 00-.712-.702L14.11 5.288l-1.255-1.274z" fill="${t}"/>
|
|
155
|
-
</svg>`},f0=e=>{const t=e.fgColor,n=e.bgColor;return`${Nt}
|
|
156
|
-
<rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>
|
|
157
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.25 7.25a.75.75 0 000-1.5h-6.5a.75.75 0 100 1.5h6.5zM15 10a.75.75 0 01-.75.75h-6.5a.75.75 0 010-1.5h6.5A.75.75 0 0115 10zm-.75 4.25a.75.75 0 000-1.5h-6.5a.75.75 0 000 1.5h6.5zm-8.987-7a.75.75 0 100-1.5.75.75 0 000 1.5zm.75 2.75a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm-.75 4.25a.75.75 0 100-1.5.75.75 0 000 1.5z" fill="${t}"/>
|
|
158
|
-
</svg>`},h0=e=>{const t=e.fgColor;return`
|
|
159
|
-
<svg width="18" height="18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
160
|
-
<path d="M2 15v1h14v-2.5c0-.87-.44-1.55-.98-2.04a6.19 6.19 0 0 0-1.9-1.14 12.1 12.1 0 0 0-2.48-.67A4 4 0 1 0 5 6a4 4 0 0 0 2.36 3.65c-.82.13-1.7.36-2.48.67-.69.28-1.37.65-1.9 1.13A2.8 2.8 0 0 0 2 13.5V15z" fill="${e.bgColor}" stroke="${t}" stroke-width="2"/>
|
|
161
|
-
</svg>`},g0=e=>{const t=e.fgColor;return`
|
|
162
|
-
<svg width="18" height="18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
163
|
-
<path d="M12.43 6.04v-.18a3.86 3.86 0 0 0-7.72 0v.18A2.15 2.15 0 0 0 3 8.14v5.72C3 15.04 3.96 16 5.14 16H12c1.18 0 2.14-.96 2.14-2.14V8.14c0-1.03-.73-1.9-1.71-2.1zM7.86 6v-.14a.71.71 0 1 1 1.43 0V6H7.86z" fill="${e.bgColor}" stroke="${t}" stroke-width="2"/>
|
|
164
|
-
</svg>
|
|
165
|
-
`},p0={headerRowID:Nm,headerNumber:Wm,headerCode:Bm,headerString:Um,headerBoolean:qm,headerAudioUri:Gm,headerVideoUri:Ym,headerEmoji:jm,headerImage:Km,headerUri:zd,headerPhone:Zm,headerMarkdown:Jm,headerDate:Qm,headerTime:e0,headerEmail:t0,headerReference:n0,headerIfThenElse:r0,headerSingleValue:i0,headerLookup:o0,headerTextTemplate:a0,headerMath:l0,headerRollup:s0,headerJoinStrings:u0,headerSplitString:c0,headerGeoDistance:d0,headerArray:f0,rowOwnerOverlay:h0,protectedColumnOverlay:g0,renameIcon:Xm};function m0(e,t){return e==="normal"?[t.bgIconHeader,t.fgIconHeader]:e==="selected"?["white",t.accentColor]:[t.accentColor,t.bgHeader]}class v0{onSettled;spriteMap=new Map;headerIcons;inFlight=0;constructor(t,n){this.onSettled=n,this.headerIcons=t??{}}drawSprite(t,n,r,i,o,l,a,s=1){const[u,c]=m0(n,a),d=l*Math.ceil(window.devicePixelRatio),g=`${u}_${c}_${d}_${t}`;let h=this.spriteMap.get(g);if(h===void 0){const p=this.headerIcons[t];if(p===void 0)return;h=document.createElement("canvas");const m=h.getContext("2d");if(m===null)return;const y=new Image;y.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(p({fgColor:c,bgColor:u}))}`,this.spriteMap.set(g,h);const b=y.decode();if(b===void 0)return;this.inFlight++,b.then(()=>{m.drawImage(y,0,0,d,d)}).finally(()=>{this.inFlight--,this.inFlight===0&&this.onSettled()})}else s<1&&(r.globalAlpha=s),r.drawImage(h,0,0,d,d,i,o,l,l),s<1&&(r.globalAlpha=1)}}function Vd(e){if(e.length===0)return;let t;for(const n of e)t=Math.min(t??n.y,n.y);return t}function Ma(e,t,n,r,i,o,l,a,s){a=a??t;let u=t,c=e;const d=r-o;let g=!1;for(;u<n&&c<d;){const h=i(c);if(u+h>a&&s(u,c,h,!1,l&&c===r-1)===!0){g=!0;break}u+=h,c++}if(!g){u=n;for(let h=0;h<o;h++){c=r-1-h;const p=i(c);u-=p,s(u,c,p,!0,l&&c===r-1)}}}function Pr(e,t,n,r,i,o){let l=0,a=0;const s=i+r;for(const u of e){const c=u.sticky?a:l+n;if(o(u,c,s,u.sticky?0:a,t)===!0)break;l+=u.width,a+=u.sticky?u.width:0}}function $d(e,t,n,r,i){let o=0,l=0;for(let a=0;a<e.length;a++){const s=e[a];let u=a+1,c=s.width;for(s.sticky&&(l+=c);u<e.length&&po(e[u].group,s.group)&&e[u].sticky===e[a].sticky;){const m=e[u];c+=m.width,u++,a++,m.sticky&&(l+=m.width)}const d=s.sticky?0:n,g=o+d,h=s.sticky?0:Math.max(0,l-g),p=Math.min(c-h,t-(g+h));i([s.sourceIndex,e[u-1].sourceIndex],s.group??"",g+h,0,p,r),o+=c}}function Nd(e,t,n,r,i,o,l){const[a,s]=e;let u,c;const d=l.find(g=>!g.sticky)?.sourceIndex??0;if(s>d){const g=Math.max(a,d);let h=t,p=r;for(let m=o.sourceIndex-1;m>=g;m--)h-=l[m].width,p+=l[m].width;for(let m=o.sourceIndex+1;m<=s;m++)p+=l[m].width;c={x:h,y:n,width:p,height:i}}if(d>a){const g=Math.min(s,d-1);let h=t,p=r;for(let m=o.sourceIndex-1;m>=a;m--)h-=l[m].width,p+=l[m].width;for(let m=o.sourceIndex+1;m<=g;m++)p+=l[m].width;u={x:h,y:n,width:p,height:i}}return[u,c]}function b0(e,t,n,r){if(r==="any")return Bd(e,{x:t,y:n,width:1,height:1});if(r==="vertical"&&(t=e.x),r==="horizontal"&&(n=e.y),Md([t,n],e))return;const i=t-e.x,o=e.x+e.width-t,l=n-e.y+1,a=e.y+e.height-n,s=Math.min(r==="vertical"?Number.MAX_SAFE_INTEGER:i,r==="vertical"?Number.MAX_SAFE_INTEGER:o,r==="horizontal"?Number.MAX_SAFE_INTEGER:l,r==="horizontal"?Number.MAX_SAFE_INTEGER:a);return s===a?{x:e.x,y:e.y+e.height,width:e.width,height:n-e.y-e.height+1}:s===l?{x:e.x,y:n,width:e.width,height:e.y-n}:s===o?{x:e.x+e.width,y:e.y,width:t-e.x-e.width+1,height:e.height}:{x:t,y:e.y,width:e.x-t,height:e.height}}function mo(e,t,n,r,i,o,l,a){return e<=i+l&&i<=e+n&&t<=o+a&&o<=t+r}function jr(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height}function Bd(e,t){const n=Math.min(e.x,t.x),r=Math.min(e.y,t.y),i=Math.max(e.x+e.width,t.x+t.width)-n,o=Math.max(e.y+e.height,t.y+t.height)-r;return{x:n,y:r,width:i,height:o}}function w0(e,t){return e.x<=t.x&&e.y<=t.y&&e.x+e.width>=t.x+t.width&&e.y+e.height>=t.y+t.height}function y0(e,t,n,r){if(e.x>t||e.y>n||e.x<0&&e.y<0&&e.x+e.width>t&&e.y+e.height>n)return;if(e.x>=0&&e.y>=0&&e.x+e.width<=t&&e.y+e.height<=n)return e;const i=-4,o=-4,l=t+4,a=n+4,s=i-e.x,u=e.x+e.width-l,c=o-e.y,d=e.y+e.height-a,g=s>0?e.x+Math.floor(s/r)*r:e.x,h=u>0?e.x+e.width-Math.floor(u/r)*r:e.x+e.width,p=c>0?e.y+Math.floor(c/r)*r:e.y,m=d>0?e.y+e.height-Math.floor(d/r)*r:e.y+e.height;return{x:g,y:p,width:h-g,height:m-p}}function C0(e,t,n,r,i){const[o,l,a,s]=t,[u,c,d,g]=i,{x:h,y:p,width:m,height:y}=e,b=[];if(m<=0||y<=0)return b;const v=h+m,x=p+y,E=h<o,M=p<l,I=h+m>a,L=p+y>s,S=h>=o&&h<a||v>o&&v<=a||h<o&&v>a,C=p>=l&&p<s||x>l&&x<=s||p<l&&x>s;if(S&&C){const D=Math.max(h,o),k=Math.max(p,l),T=Math.min(v,a),O=Math.min(x,s);b.push({rect:{x:D,y:k,width:T-D,height:O-k},clip:{x:u,y:c,width:d-u+1,height:g-c+1}})}if(E&&M){const D=h,k=p,T=Math.min(v,o),O=Math.min(x,l);b.push({rect:{x:D,y:k,width:T-D,height:O-k},clip:{x:0,y:0,width:u+1,height:c+1}})}if(M&&S){const D=Math.max(h,o),k=p,T=Math.min(v,a),O=Math.min(x,l);b.push({rect:{x:D,y:k,width:T-D,height:O-k},clip:{x:u,y:0,width:d-u+1,height:c+1}})}if(M&&I){const D=Math.max(h,a),k=p,T=v,O=Math.min(x,l);b.push({rect:{x:D,y:k,width:T-D,height:O-k},clip:{x:d,y:0,width:n-d+1,height:c+1}})}if(E&&C){const D=h,k=Math.max(p,l),T=Math.min(v,o),O=Math.min(x,s);b.push({rect:{x:D,y:k,width:T-D,height:O-k},clip:{x:0,y:c,width:u+1,height:g-c+1}})}if(I&&C){const D=Math.max(h,a),k=Math.max(p,l),T=v,O=Math.min(x,s);b.push({rect:{x:D,y:k,width:T-D,height:O-k},clip:{x:d,y:c,width:n-d+1,height:g-c+1}})}if(E&&L){const D=h,k=Math.max(p,s),T=Math.min(v,o),O=x;b.push({rect:{x:D,y:k,width:T-D,height:O-k},clip:{x:0,y:g,width:u+1,height:r-g+1}})}if(L&&S){const D=Math.max(h,o),k=Math.max(p,s),T=Math.min(v,a),O=x;b.push({rect:{x:D,y:k,width:T-D,height:O-k},clip:{x:u,y:g,width:d-u+1,height:r-g+1}})}if(I&&L){const D=Math.max(h,a),k=Math.max(p,s),T=v,O=x;b.push({rect:{x:D,y:k,width:T-D,height:O-k},clip:{x:d,y:g,width:n-d+1,height:r-g+1}})}return b}const S0={kind:Z.Loading,allowOverlay:!1};function Fu(e,t,n,r,i,o,l,a,s,u,c,d,g,h,p,m,y,b,v,x,E,M,I,L,S,C,_,D,k,T,O,R,N,q,Y){let oe=x?.size??Number.MAX_SAFE_INTEGER;const Q=performance.now();let re=T.baseFontFull;e.font=re;const ue={ctx:e},ae=[0,0],de=y>0?ei(s,y,u):0;let he,ce;const H=Vd(v);return Pr(t,a,o,l,i,(P,G,se,le,ve)=>{const ge=Math.max(0,le-G),Je=G+ge,ke=i+1,Pt=P.width-ge,xt=r-i-1;if(v.length>0){let Pe=!1;for(let Ee=0;Ee<v.length;Ee++){const st=v[Ee];if(mo(Je,ke,Pt,xt,st.x,st.y,st.width,st.height)){Pe=!0;break}}if(!Pe)return}const Oe=()=>{e.save(),e.beginPath(),e.rect(Je,ke,Pt,xt),e.clip()},te=E.columns.hasIndex(P.sourceIndex),me=d(P.group??"").overrideTheme,we=P.themeOverride===void 0&&me===void 0?T:hr(T,me,P.themeOverride),ne=we.baseFontFull;ne!==re&&(re=ne,e.font=ne),Oe();let ye;return Ma(ve,se,r,s,u,y,b,H,(Pe,Ee,st,_e,Ge)=>{if(Ee<0||(ae[0]=P.sourceIndex,ae[1]=Ee,x!==void 0&&!x.has(ae)))return;if(v.length>0){let Ie=!1;for(let mt=0;mt<v.length;mt++){const Tt=v[mt];if(mo(G,Pe,P.width,st,Tt.x,Tt.y,Tt.width,Tt.height)){Ie=!0;break}}if(!Ie)return}const Te=E.rows.hasIndex(Ee),Re=h.hasIndex(Ee),He=Ee<s?c(ae):S0;let ht=G,tt=P.width,Ye=!1,gt=!1;if(He.span!==void 0){const[Ie,mt]=He.span,Tt=`${Ee},${Ie},${mt},${P.sticky}`;if(ce===void 0&&(ce=new Set),ce.has(Tt)){oe--;return}else{const dn=Nd(He.span,G,Pe,P.width,st,P,n),Bt=P.sticky?dn[0]:dn[1];if(!P.sticky&&dn[0]!==void 0&&(gt=!0),Bt!==void 0){ht=Bt.x,tt=Bt.width,ce.add(Tt),e.restore(),ye=void 0,e.save(),e.beginPath();const rn=Math.max(0,le-Bt.x);e.rect(Bt.x+rn,Pe,Bt.width-rn,st),he===void 0&&(he=[]),he.push({x:Bt.x+rn,y:Pe,width:Bt.width-rn,height:st}),e.clip(),Ye=!0}}}const qt=g?.(Ee),Dt=Ge&&P.trailingRowOptions?.themeOverride!==void 0?P.trailingRowOptions?.themeOverride:void 0,ct=He.themeOverride===void 0&&qt===void 0&&Dt===void 0?we:hr(we,qt,Dt,He.themeOverride);e.beginPath();const jt=pm(ae,He,E);let Kt=mm(ae,He,E,m);const Dn=He.span!==void 0&&E.columns.some(Ie=>He.span!==void 0&&Ie>=He.span[0]&&Ie<=He.span[1]);jt&&!p&&m?Kt=0:jt&&m&&(Kt=Math.max(Kt,1)),Dn&&Kt++,jt||(Te&&Kt++,te&&!Ge&&Kt++);const It=He.kind===Z.Protected?ct.bgCellMedium:ct.bgCell;let pt;if((_e||It!==T.bgCell)&&(pt=Hn(It,pt)),Kt>0||Re){Re&&(pt=Hn(ct.bgHeader,pt));for(let Ie=0;Ie<Kt;Ie++)pt=Hn(ct.accentLight,pt)}else if(M!==void 0){for(const Ie of M)if(Ie[0]===P.sourceIndex&&Ie[1]===Ee){pt=Hn(ct.bgSearchResult,pt);break}}if(I!==void 0)for(let Ie=0;Ie<I.length;Ie++){const mt=I[Ie],Tt=mt.range;mt.style!=="solid-outline"&&Tt.x<=P.sourceIndex&&P.sourceIndex<Tt.x+Tt.width&&Tt.y<=Ee&&Ee<Tt.y+Tt.height&&(pt=Hn(mt.color,pt))}let On=!1;if(x!==void 0){const Ie=Pe+1,Tt=(_e?Ie+st-1:Math.min(Ie+st-1,r-de))-Ie;(Tt!==st-1||ht+1<=le)&&(On=!0,e.save(),e.beginPath(),e.rect(ht+1,Ie,tt-1,Tt),e.clip()),pt=pt===void 0?ct.bgCell:Hn(pt,ct.bgCell)}const Ct=P.sourceIndex===n.length-1,un=Ee===s-1;pt!==void 0&&(e.fillStyle=pt,ye!==void 0&&(ye.fillStyle=pt),x!==void 0?e.fillRect(ht+1,Pe+1,tt-(Ct?2:1),st-(un?2:1)):e.fillRect(ht,Pe,tt,st)),He.style==="faded"&&(e.globalAlpha=.6);let gn;for(let Ie=0;Ie<C.length;Ie++){const mt=C[Ie];if(mt.item[0]===P.sourceIndex&&mt.item[1]===Ee){gn=mt;break}}if(tt>Y&&!gt){const Ie=ct.baseFontFull;Ie!==re&&(e.font=Ie,re=Ie),ye=Wd(e,He,P.sourceIndex,Ee,Ct,un,ht,Pe,tt,st,Kt>0,ct,pt??ct.bgCell,L,S,gn?.hoverAmount??0,_,k,Q,D,ye,O,R,N,q)}return On&&e.restore(),He.style==="faded"&&(e.globalAlpha=1),oe--,Ye&&(e.restore(),ye?.deprep?.(ue),ye=void 0,Oe(),re=ne,e.font=ne),oe<=0}),e.restore(),oe<=0}),he}const Qi=[0,0],eo={x:0,y:0,width:0,height:0},cl=[void 0,()=>{}];let Al=!1;function x0(){Al=!0}function Wd(e,t,n,r,i,o,l,a,s,u,c,d,g,h,p,m,y,b,v,x,E,M,I,L,S){let C,_;y!==void 0&&y[0][0]===n&&y[0][1]===r&&(C=y[1][0],_=y[1][1]);let D;Qi[0]=n,Qi[1]=r,eo.x=l,eo.y=a,eo.width=s,eo.height=u,cl[0]=I.getValue(Qi),cl[1]=R=>I.setValue(Qi,R),Al=!1;const k={ctx:e,theme:d,col:n,row:r,cell:t,rect:eo,highlighted:c,cellFillColor:g,hoverAmount:m,frameTime:v,hoverX:C,drawState:cl,hoverY:_,imageLoader:h,spriteManager:p,hyperWrapping:b,overrideCursor:C!==void 0?S:void 0,requestAnimationFrame:x0},T=Sm(k,t.lastUpdated,v,E,i,o),O=L(t);if(O!==void 0){E?.renderer!==O&&(E?.deprep?.(k),E=void 0);const R=O.drawPrep?.(k,E);x!==void 0&&!Ri(k.cell)?x(k,()=>O.draw(k,t)):O.draw(k,t),D=R===void 0?void 0:{deprep:R?.deprep,fillStyle:R?.fillStyle,font:R?.font,renderer:O}}return(T||Al)&&M?.(Qi),D}function is(e,t,n,r,i,o,l,a,s=-20,u=-20,c=void 0,d="center",g="square"){const h=Math.floor(i+l/2),p=g==="circle"?1e4:t.roundingRadius??4;let m=pd(c??t.checkboxMaxSize,l,t.cellVerticalPadding),y=m/2;const b=gd(d,r,o,t.cellHorizontalPadding,m),v=hd(b,h,m),x=md(r+s,i+u,v);switch(n){case!0:{e.beginPath(),Zn(e,b-m/2,h-m/2,m,m,p),g==="circle"&&(y*=.8,m*=.8),e.fillStyle=a?t.accentColor:t.textMedium,e.fill(),e.beginPath(),e.moveTo(b-y+m/4.23,h-y+m/1.97),e.lineTo(b-y+m/2.42,h-y+m/1.44),e.lineTo(b-y+m/1.29,h-y+m/3.25),e.strokeStyle=t.bgCell,e.lineJoin="round",e.lineCap="round",e.lineWidth=1.9,e.stroke();break}case la:case!1:{e.beginPath(),Zn(e,b-m/2+.5,h-m/2+.5,m-1,m-1,p),e.lineWidth=1,e.strokeStyle=x?t.textDark:t.textMedium,e.stroke();break}case Xl:{e.beginPath(),Zn(e,b-m/2,h-m/2,m,m,p),e.fillStyle=x?t.textMedium:t.textLight,e.fill(),g==="circle"&&(y*=.8,m*=.8),e.beginPath(),e.moveTo(b-m/3,h),e.lineTo(b+m/3,h),e.strokeStyle=t.bgCell,e.lineCap="round",e.lineWidth=1.9,e.stroke();break}default:ho()}}function k0(e,t,n,r,i,o,l,a,s,u,c,d,g,h,p,m,y,b,v){const x=l+a;if(x<=0)return;e.fillStyle=d.bgHeader,e.fillRect(0,0,i,x);const E=r?.[0]?.[0],M=r?.[0]?.[1],I=r?.[1]?.[0],L=r?.[1]?.[1],S=d.headerFontFull;e.font=S,Pr(t,0,o,0,x,(C,_,D,k)=>{if(y!==void 0&&!y.has([C.sourceIndex,-1]))return;const T=Math.max(0,k-_);e.save(),e.beginPath(),e.rect(_+T,a,C.width-T,l),e.clip();const O=m(C.group??"").overrideTheme,R=C.themeOverride===void 0&&O===void 0?d:hr(d,O,C.themeOverride);R.bgHeader!==d.bgHeader&&(e.fillStyle=R.bgHeader,e.fill()),R!==d&&(e.font=R.headerFontFull);const N=c.columns.hasIndex(C.sourceIndex),q=s!==void 0||u||C.headerRowMarkerDisabled===!0,Y=!q&&M===-1&&E===C.sourceIndex,oe=q?0:h.find(de=>de.item[0]===C.sourceIndex&&de.item[1]===-1)?.hoverAmount??0,Q=c?.current!==void 0&&c.current.cell[0]===C.sourceIndex,re=N?R.accentColor:Q?R.bgHeaderHasFocus:R.bgHeader,ue=n?a:0,ae=C.sourceIndex===0?0:1;N?(e.fillStyle=re,e.fillRect(_+ae,ue,C.width-ae,l)):(Q||oe>0)&&(e.beginPath(),e.rect(_+ae,ue,C.width-ae,l),Q&&(e.fillStyle=R.bgHeaderHasFocus,e.fill()),oe>0&&(e.globalAlpha=oe,e.fillStyle=R.bgHeaderHovered,e.fill(),e.globalAlpha=1)),Xd(e,_,ue,C.width,l,C,N,R,Y,Y?I:void 0,Y?L:void 0,Q,oe,g,b,v),e.restore()}),n&&M0(e,t,i,o,a,r,d,g,h,p,m,y)}function M0(e,t,n,r,i,o,l,a,s,u,c,d){const[h,p]=o?.[0]??[];let m=0;$d(t,n,r,i,(y,b,v,x,E,M)=>{if(d!==void 0&&!d.hasItemInRectangle({x:y[0],y:-2,width:y[1]-y[0]+1,height:1}))return;e.save(),e.beginPath(),e.rect(v,x,E,M),e.clip();const I=c(b),L=I?.overrideTheme===void 0?l:hr(l,I.overrideTheme),S=p===-2&&h!==void 0&&h>=y[0]&&h<=y[1],C=S?L.bgGroupHeaderHovered??L.bgHeaderHovered:L.bgGroupHeader??L.bgHeader;if(C!==l.bgHeader&&(e.fillStyle=C,e.fill()),e.fillStyle=L.textGroupHeader??L.textHeader,I!==void 0){let _=v;if(I.icon!==void 0&&(a.drawSprite(I.icon,"normal",e,_+8,(i-20)/2,20,L),_+=26),e.fillText(I.name,_+8,i/2+Qn(e,l.headerFontFull)),I.actions!==void 0&&S){const D=Ud({x:v,y:x,width:E,height:M},I.actions);e.beginPath();const k=D[0].x-10,T=v+E-k;e.rect(k,0,T,i);const O=e.createLinearGradient(k,0,k+T,0),R=Kr(C,0);O.addColorStop(0,R),O.addColorStop(10/T,C),O.addColorStop(1,C),e.fillStyle=O,e.fill(),e.globalAlpha=.6;const[N,q]=o?.[1]??[-1,-1];for(let Y=0;Y<I.actions.length;Y++){const oe=I.actions[Y],Q=D[Y],re=jr(Q,N+v,q);re&&(e.globalAlpha=1),a.drawSprite(oe.icon,"normal",e,Q.x+Q.width/2-10,Q.y+Q.height/2-10,20,L),re&&(e.globalAlpha=.6)}e.globalAlpha=1}}v!==0&&u(y[0])&&(e.beginPath(),e.moveTo(v+.5,0),e.lineTo(v+.5,i),e.strokeStyle=l.borderColor,e.lineWidth=1,e.stroke()),e.restore(),m=v+E}),e.beginPath(),e.moveTo(m+.5,0),e.lineTo(m+.5,i),e.moveTo(0,i+.5),e.lineTo(n,i+.5),e.strokeStyle=l.borderColor,e.lineWidth=1,e.stroke()}const qo=30;function R0(e,t,n,r,i){return{x:e+n-qo,y:Math.max(t,t+r/2-qo/2),width:qo,height:Math.min(qo,r)}}function Ud(e,t){const n=[];let r=e.x+e.width-26*t.length;const i=e.y+e.height/2-13,o=26,l=26;for(let a=0;a<t.length;a++)n.push({x:r,y:i,width:l,height:o}),r+=26;return n}function to(e,t,n){return!n||e===void 0||(e.x=t-(e.x-t)-e.width),e}function qd(e,t,n,r,i,o,l,a){const s=l.cellHorizontalPadding,u=l.headerIconSize,c=R0(n,r,i,o);let d=n+s;const g=t.icon===void 0?void 0:{x:d,y:r+(o-u)/2,width:u,height:u},h=g===void 0||t.overlayIcon===void 0?void 0:{x:g.x+9,y:g.y+6,width:18,height:18};g!==void 0&&(d+=Math.ceil(u*1.3));const p={x:d,y:r,width:i-d,height:o};let m;if(t.indicatorIcon!==void 0){const b=e===void 0?Td(t.title,l.headerFontFull)?.width??0:Or(t.title,e,l.headerFontFull).width;p.width=b,d+=b+s,m={x:d,y:r+(o-u)/2,width:u,height:u}}const y=n+i/2;return{menuBounds:to(c,y,a),iconBounds:to(g,y,a),iconOverlayBounds:to(h,y,a),textBounds:to(p,y,a),indicatorIconBounds:to(m,y,a)}}function Au(e,t,n,r,i,o,l,a,s,u,c,d,g,h,p,m){if(o.rowMarker!==void 0&&o.headerRowMarkerDisabled!==!0){const v=o.rowMarkerChecked;v!==!0&&o.headerRowMarkerAlwaysVisible!==!0&&(e.globalAlpha=d);const x=o.headerRowMarkerTheme!==void 0?hr(a,o.headerRowMarkerTheme):a;is(e,x,v,t,n,r,i,!1,void 0,void 0,a.checkboxMaxSize,"center",o.rowMarker),v!==!0&&o.headerRowMarkerAlwaysVisible!==!0&&(e.globalAlpha=1);return}const y=l?a.textHeaderSelected:a.textHeader,b=o.hasMenu===!0&&(s||h&&l)&&m.menuBounds!==void 0;if(o.icon!==void 0&&m.iconBounds!==void 0){let v=l?"selected":"normal";o.style==="highlight"&&(v=l?"selected":"special"),g.drawSprite(o.icon,v,e,m.iconBounds.x,m.iconBounds.y,m.iconBounds.width,a),o.overlayIcon!==void 0&&m.iconOverlayBounds!==void 0&&g.drawSprite(o.overlayIcon,l?"selected":"special",e,m.iconOverlayBounds.x,m.iconOverlayBounds.y,m.iconOverlayBounds.width,a)}if(b&&r>35){const x=p?35:r-35,E=p?35*.7:r-35*.7,M=x/r,I=E/r,L=e.createLinearGradient(t,0,t+r,0),S=Kr(y,0);L.addColorStop(p?1:0,y),L.addColorStop(M,y),L.addColorStop(I,S),L.addColorStop(p?0:1,S),e.fillStyle=L}else e.fillStyle=y;if(p&&(e.textAlign="right"),m.textBounds!==void 0&&e.fillText(o.title,p?m.textBounds.x+m.textBounds.width:m.textBounds.x,n+i/2+Qn(e,a.headerFontFull)),p&&(e.textAlign="left"),o.indicatorIcon!==void 0&&m.indicatorIconBounds!==void 0&&(!b||!mo(m.menuBounds.x,m.menuBounds.y,m.menuBounds.width,m.menuBounds.height,m.indicatorIconBounds.x,m.indicatorIconBounds.y,m.indicatorIconBounds.width,m.indicatorIconBounds.height))){let v=l?"selected":"normal";o.style==="highlight"&&(v=l?"selected":"special"),g.drawSprite(o.indicatorIcon,v,e,m.indicatorIconBounds.x,m.indicatorIconBounds.y,m.indicatorIconBounds.width,a)}if(b&&m.menuBounds!==void 0){const v=m.menuBounds,x=u!==void 0&&c!==void 0&&jr(v,u+t,c+n);if(x||(e.globalAlpha=.7),o.menuIcon===void 0||o.menuIcon===sa.Triangle){e.beginPath();const E=v.x+v.width/2-5.5,M=v.y+v.height/2-3;Rm(e,[{x:E,y:M},{x:E+11,y:M},{x:E+5.5,y:M+6}],1),e.fillStyle=y,e.fill()}else if(o.menuIcon===sa.Dots){e.beginPath();const E=v.x+v.width/2,M=v.y+v.height/2;Mm(e,E,M),e.fillStyle=y,e.fill()}else{const E=v.x+(v.width-a.headerIconSize)/2,M=v.y+(v.height-a.headerIconSize)/2;g.drawSprite(o.menuIcon,"normal",e,E,M,a.headerIconSize,a)}x||(e.globalAlpha=1)}}function Xd(e,t,n,r,i,o,l,a,s,u,c,d,g,h,p,m){const y=Kl(o.title)==="rtl",b=qd(e,o,t,n,r,i,a,y);p!==void 0?p({ctx:e,theme:a,rect:{x:t,y:n,width:r,height:i},column:o,columnIndex:o.sourceIndex,isSelected:l,hoverAmount:g,isHovered:s,hasSelectedCell:d,spriteManager:h,menuBounds:b?.menuBounds??{x:0,y:0,height:0,width:0},hoverX:u,hoverY:c},()=>Au(e,t,n,r,i,o,l,a,s,u,c,g,h,m,y,b)):Au(e,t,n,r,i,o,l,a,s,u,c,g,h,m,y,b)}function I0(e,t,n,r,i,o,l,a,s,u,c,d,g,h,p,m,y,b,v){if(b!==void 0||t[t.length-1]!==n[t.length-1])return;const x=Vd(y);Pr(t,s,l,a,o,(E,M,I,L,S)=>{if(E!==t[t.length-1])return;M+=E.width;const C=Math.max(M,L);C>r||(e.save(),e.beginPath(),e.rect(C,o+1,1e4,i-o-1),e.clip(),Ma(S,I,i,u,c,p,m,x,(_,D,k,T)=>{if(!T&&y.length>0&&!y.some(Y=>mo(M,_,1e4,k,Y.x,Y.y,Y.width,Y.height)))return;const O=g.hasIndex(D),R=h.hasIndex(D);e.beginPath();const N=d?.(D),q=N===void 0?v:hr(v,N);q.bgCell!==v.bgCell&&(e.fillStyle=q.bgCell,e.fillRect(M,_,1e4,k)),R&&(e.fillStyle=q.bgHeader,e.fillRect(M,_,1e4,k)),O&&(e.fillStyle=q.accentLight,e.fillRect(M,_,1e4,k))}),e.restore())})}function E0(e,t,n,r,i,o,l,a,s){let u=!1;for(const p of t)if(!p.sticky){u=l(p.sourceIndex);break}const c=s.horizontalBorderColor??s.borderColor,d=s.borderColor,g=u?Pi(t):0;let h;if(g!==0&&(h=ku(d,s.bgCell),e.beginPath(),e.moveTo(g+.5,0),e.lineTo(g+.5,r),e.strokeStyle=h,e.stroke()),i>0){const p=d===c&&h!==void 0?h:ku(c,s.bgCell),m=ei(o,i,a);e.beginPath(),e.moveTo(0,r-m+.5),e.lineTo(n,r-m+.5),e.strokeStyle=p,e.stroke()}}const Gd=(e,t,n)=>{let r=0,i=t,o=0,l=n;if(e!==void 0&&e.length>0){r=Number.MAX_SAFE_INTEGER,o=Number.MAX_SAFE_INTEGER,i=Number.MIN_SAFE_INTEGER,l=Number.MIN_SAFE_INTEGER;for(const a of e)r=Math.min(r,a.x-1),i=Math.max(i,a.x+a.width+1),o=Math.min(o,a.y-1),l=Math.max(l,a.y+a.height+1)}return{minX:r,maxX:i,minY:o,maxY:l}};function T0(e,t,n,r,i,o,l,a,s,u,c,d,g,h,p){const m=p.bgCell,{minX:y,maxX:b,minY:v,maxY:x}=Gd(a,o,l),E=[],M=l-ei(h,g,u);let I=s,L=n,S=0;for(;I+i<M;){const k=I+i,T=u(L);if(k>=v&&k<=x-1){const R=c?.(L)?.bgCell;R!==void 0&&R!==m&&L>=h-g&&E.push({x:y,y:k,w:b-y,h:T,color:R})}I+=T,L<h-g&&(S=I),L++}let C=0;const _=Math.min(M,x)-S;if(_>0)for(let k=0;k<t.length;k++){const T=t[k];if(T.width===0)continue;const O=T.sticky?C:C+r,R=T.themeOverride?.bgCell;R!==void 0&&R!==m&&O>=y&&O<=b&&d(k+1)&&E.push({x:O,y:S,w:T.width,h:_,color:R}),C+=T.width}if(E.length===0)return;let D;e.beginPath();for(let k=E.length-1;k>=0;k--){const T=E[k];D===void 0?D=T.color:T.color!==D&&(e.fillStyle=D,e.fill(),e.beginPath(),D=T.color),e.rect(T.x,T.y,T.w,T.h)}D!==void 0&&(e.fillStyle=D,e.fill()),e.beginPath()}function Hu(e,t,n,r,i,o,l,a,s,u,c,d,g,h,p,m,y,b=!1){if(s!==void 0){e.beginPath(),e.save(),e.rect(0,0,o,l);for(const k of s)e.rect(k.x+1,k.y+1,k.width-1,k.height-1);e.clip("evenodd")}const v=y.horizontalBorderColor??y.borderColor,x=y.borderColor,{minX:E,maxX:M,minY:I,maxY:L}=Gd(a,o,l),S=[];e.beginPath();let C=.5;for(let k=0;k<t.length;k++){const T=t[k];if(T.width===0)continue;C+=T.width;const O=T.sticky?C:C+r;O>=E&&O<=M&&h(k+1)&&S.push({x1:O,y1:Math.max(u,I),x2:O,y2:Math.min(l,L),color:x})}let _=l+.5;for(let k=m-p;k<m;k++){const T=d(k);_-=T,S.push({x1:E,y1:_,x2:M,y2:_,color:v})}if(b!==!0){let k=c+.5,T=n;const O=_;for(;k+i<O;){const R=k+i;if(R>=I&&R<=L-1){const N=g?.(T);S.push({x1:E,y1:R,x2:M,y2:R,color:N?.horizontalBorderColor??N?.borderColor??v})}k+=d(T),T++}}const D=Xh(S,k=>k.color);for(const k of Object.keys(D)){e.strokeStyle=k;for(const T of D[k])e.moveTo(T.x1,T.y1),e.lineTo(T.x2,T.y2);e.stroke(),e.beginPath()}s!==void 0&&e.restore()}function D0(e,t,n,r,i,o,l,a,s,u,c,d,g,h,p,m,y,b,v){const x=[];e.imageSmoothingEnabled=!1;const E=Math.min(i.cellYOffset,l),M=Math.max(i.cellYOffset,l);let I=0;if(typeof b=="number")I+=(M-E)*b;else for(let O=E;O<M;O++)I+=b(O);l>i.cellYOffset&&(I=-I),I+=s-i.translateY;const L=Math.min(i.cellXOffset,o),S=Math.max(i.cellXOffset,o);let C=0;for(let O=L;O<S;O++)C+=m[O].width;o>i.cellXOffset&&(C=-C),C+=a-i.translateX;const _=Pi(y);if(C!==0&&I!==0)return{regions:[]};const D=u>0?ei(g,u,b):0,k=c-_-Math.abs(C),T=d-h-D-Math.abs(I)-1;if(k>150&&T>150){const O={sx:0,sy:0,sw:c*p,sh:d*p,dx:0,dy:0,dw:c*p,dh:d*p};if(I>0?(O.sy=(h+1)*p,O.sh=T*p,O.dy=(I+h+1)*p,O.dh=T*p,x.push({x:0,y:h,width:c,height:I+1})):I<0&&(O.sy=(-I+h+1)*p,O.sh=T*p,O.dy=(h+1)*p,O.dh=T*p,x.push({x:0,y:d+I-D,width:c,height:-I+D})),C>0?(O.sx=_*p,O.sw=k*p,O.dx=(C+_)*p,O.dw=k*p,x.push({x:_-1,y:0,width:C+2,height:d})):C<0&&(O.sx=(_-C)*p,O.sw=k*p,O.dx=_*p,O.dw=k*p,x.push({x:c+C,y:0,width:-C,height:d})),e.setTransform(1,0,0,1,0,0),v){if(_>0&&C!==0&&I===0&&(r===void 0||n?.[1]!==!1)){const R=_*p,N=d*p;e.drawImage(t,0,0,R,N,0,0,R,N)}if(D>0&&C===0&&I!==0&&(r===void 0||n?.[0]!==!1)){const R=(d-D)*p,N=c*p,q=D*p;e.drawImage(t,0,R,N,q,0,R,N,q)}}e.drawImage(t,O.sx,O.sy,O.sw,O.sh,O.dx,O.dy,O.dw,O.dh),e.scale(p,p)}return e.imageSmoothingEnabled=!0,{regions:x}}function O0(e,t,n,r,i,o,l,a,s,u){const c=[];return t!==e.cellXOffset||n!==e.cellYOffset||r!==e.translateX||i!==e.translateY||Pr(s,n,r,i,a,(d,g,h,p)=>{if(d.sourceIndex===u){const m=Math.max(g,p)+1;return c.push({x:m,y:0,width:o-m,height:l}),!0}}),c}function P0(e,t){if(t===void 0||e.width!==t.width||e.height!==t.height||e.theme!==t.theme||e.headerHeight!==t.headerHeight||e.rowHeight!==t.rowHeight||e.rows!==t.rows||e.freezeColumns!==t.freezeColumns||e.getRowThemeOverride!==t.getRowThemeOverride||e.isFocused!==t.isFocused||e.isResizing!==t.isResizing||e.verticalBorder!==t.verticalBorder||e.getCellContent!==t.getCellContent||e.highlightRegions!==t.highlightRegions||e.selection!==t.selection||e.dragAndDropState!==t.dragAndDropState||e.prelightCells!==t.prelightCells||e.touchMode!==t.touchMode||e.maxScaleFactor!==t.maxScaleFactor)return!1;if(e.mappedColumns!==t.mappedColumns){if(e.mappedColumns.length>100||e.mappedColumns.length!==t.mappedColumns.length)return!1;let n;for(let r=0;r<e.mappedColumns.length;r++){const i=e.mappedColumns[r],o=t.mappedColumns[r];if(Oi(i,o))continue;if(n!==void 0||i.width===o.width)return!1;const{width:l,...a}=i,{width:s,...u}=o;if(!Oi(a,u))return!1;n=r}return n===void 0?!0:n}return!0}function zu(e,t,n,r,i,o,l,a,s,u,c,d,g,h,p,m){const y=p?.filter(L=>L.style!=="no-outline");if(y===void 0||y.length===0)return;const b=Pi(a),v=ei(h,g,d),x=[s,0,a.length,h-g],E=[b,0,t,n-v],M=y.map(L=>{const S=L.range,C=L.style??"dashed";return C0(S,x,t,n,E).map(_=>{const D=_.rect,k=_l(D.x,D.y,t,n,c,u+c,r,i,o,l,h,s,g,a,d),T=D.width===1&&D.height===1?k:_l(D.x+D.width-1,D.y+D.height-1,t,n,c,u+c,r,i,o,l,h,s,g,a,d);return D.x+D.width>=a.length&&(T.width-=1),D.y+D.height>=h&&(T.height-=1),{color:L.color,style:C,clip:_.clip,rect:y0({x:k.x,y:k.y,width:T.x+T.width-k.x,height:T.y+T.height-k.y},t,n,8)}})}),I=()=>{e.lineWidth=1;let L=!1;for(const S of M)for(const C of S)if(C?.rect!==void 0&&mo(0,0,t,n,C.rect.x,C.rect.y,C.rect.width,C.rect.height)){const _=L,D=!w0(C.clip,C.rect);e.beginPath(),D&&(e.save(),e.rect(C.clip.x,C.clip.y,C.clip.width,C.clip.height),e.clip()),C.style==="dashed"&&!L?(e.setLineDash([5,3]),L=!0):(C.style==="solid"||C.style==="solid-outline")&&L&&(e.setLineDash([]),L=!1),e.strokeStyle=C.style==="solid-outline"?Hn(Hn(C.color,m.borderColor),m.bgCell):Kr(C.color,1),e.closePath(),e.strokeRect(C.rect.x+.5,C.rect.y+.5,C.rect.width-1,C.rect.height-1),D&&(e.restore(),L=_)}L&&e.setLineDash([])};return I(),I}function Vu(e,t,n,r,i){e.beginPath(),e.moveTo(t,n),e.lineTo(t,r),e.lineWidth=2,e.strokeStyle=i,e.stroke(),e.globalAlpha=1}function dl(e,t,n,r,i,o,l,a,s,u,c,d,g,h,p,m,y){if(c.current===void 0)return;const b=m!==!1&&m!==void 0;if(!b)return;const v=typeof m=="object"?{...ua,...m}:ua,x=c.current.range,E=c.current.cell,M=[x.x+x.width-1,x.y+x.height-1];if(E[1]>=y&&M[1]>=y||!l.some(N=>N.sourceIndex===E[0]||N.sourceIndex===M[0]))return;const[L,S]=c.current.cell,C=g(c.current.cell),_=C.span??[L,L],D=S>=y-h,k=h>0&&!D?ei(y,h,d)-1:0,T=M[1];let O;if(Pr(l,r,i,o,u,(N,q,Y,oe,Q)=>{if(N.sticky&&L>N.sourceIndex)return;const re=N.sourceIndex<_[0],ue=N.sourceIndex>_[1],ae=N.sourceIndex===M[0];if(!(!ae&&(re||ue)))return Ma(Q,Y,n,y,d,h,p,void 0,(de,he,ce)=>{if(he!==S&&he!==T)return;let H=q,P=N.width;if(C.span!==void 0){const se=Nd(C.span,q,de,N.width,ce,N,a),le=N.sticky?se[0]:se[1];le!==void 0&&(H=le.x,P=le.width)}return he===T&&ae&&b&&(O=()=>{oe>H&&!N.sticky&&(e.beginPath(),e.rect(oe,0,t-oe,n),e.clip());const se=v.size,le=se/2,ve=H+P+v.offsetX-le+.5,ge=de+ce+v.offsetY-le+.5;e.beginPath(),v.shape==="circle"?e.arc(ve+le,ge+le,le,0,Math.PI*2):e.rect(ve,ge,se,se),e.fillStyle=N.themeOverride?.accentColor??s.accentColor,e.fill(),v.outline>0&&(e.lineWidth=v.outline,e.strokeStyle=s.bgCell,v.shape==="circle"?(e.beginPath(),e.arc(ve+le,ge+le,le+v.outline/2,0,Math.PI*2),e.stroke()):e.strokeRect(ve-v.outline/2,ge-v.outline/2,se+v.outline,se+v.outline))}),O!==void 0}),O!==void 0}),O===void 0)return;const R=()=>{e.save(),e.beginPath(),e.rect(0,u,t,n-u-k),e.clip(),O?.(),e.restore()};return R(),R}function L0(e,t,n,r,i,o,l,a,s){s===void 0||s.size===0||(e.beginPath(),$d(t,n,o,r,(u,c,d,g,h,p)=>{s.hasItemInRectangle({x:u[0],y:-2,width:u[1]-u[0]+1,height:1})&&e.rect(d,g,h,p)}),Pr(t,a,o,l,i,(u,c,d,g)=>{const h=Math.max(0,g-c),p=c+h+1,m=u.width-h-1;s.has([u.sourceIndex,-1])&&e.rect(p,r,m,i-r)}),e.clip())}function _0(e,t,n,r,i,o,l,a,s,u){let c=0;return Pr(e,o,r,i,n,(d,g,h,p,m)=>(Ma(m,h,t,l,a,s,u,void 0,(y,b,v,x)=>{x||(c=Math.max(b,c))}),!0)),c}function $u(e,t){const{canvasCtx:n,headerCanvasCtx:r,width:i,height:o,cellXOffset:l,cellYOffset:a,translateX:s,translateY:u,mappedColumns:c,enableGroups:d,freezeColumns:g,dragAndDropState:h,theme:p,drawFocus:m,headerHeight:y,groupHeaderHeight:b,disabledRows:v,rowHeight:x,verticalBorder:E,overrideCursor:M,isResizing:I,selection:L,fillHandle:S,freezeTrailingRows:C,rows:_,getCellContent:D,getGroupDetails:k,getRowThemeOverride:T,isFocused:O,drawHeaderCallback:R,prelightCells:N,drawCellCallback:q,highlightRegions:Y,resizeCol:oe,imageLoader:Q,lastBlitData:re,hoverValues:ue,hyperWrapping:ae,hoverInfo:de,spriteManager:he,maxScaleFactor:ce,hasAppendRow:H,touchMode:P,enqueue:G,renderStateProvider:se,getCellRenderer:le,renderStrategy:ve,bufferACtx:ge,bufferBCtx:Je,damage:ke,minimumCellWidth:Pt,resizeIndicator:xt}=e;if(i===0||o===0)return;const Oe=ve==="double-buffer",te=Math.min(ce,Math.ceil(window.devicePixelRatio??1)),me=ve!=="direct"&&P0(e,t),we=n.canvas;(we.width!==i*te||we.height!==o*te)&&(we.width=i*te,we.height=o*te,we.style.width=i+"px",we.style.height=o+"px");const ne=r.canvas,ye=d?b+y:y,Pe=ye+1;(ne.width!==i*te||ne.height!==Pe*te)&&(ne.width=i*te,ne.height=Pe*te,ne.style.width=i+"px",ne.style.height=Pe+"px");const Ee=ge.canvas,st=Je.canvas;Oe&&(Ee.width!==i*te||Ee.height!==o*te)&&(Ee.width=i*te,Ee.height=o*te,re.current!==void 0&&(re.current.aBufferScroll=void 0)),Oe&&(st.width!==i*te||st.height!==o*te)&&(st.width=i*te,st.height=o*te,re.current!==void 0&&(re.current.bBufferScroll=void 0));const _e=re.current;if(me===!0&&l===_e?.cellXOffset&&a===_e?.cellYOffset&&s===_e?.translateX&&u===_e?.translateY)return;let Ge=null;Oe&&(Ge=n);const Te=r;let Re;Oe?ke!==void 0?Re=_e?.lastBuffer==="b"?Je:ge:Re=_e?.lastBuffer==="b"?ge:Je:Re=n;const He=Re.canvas,ht=Oe?He===Ee?st:Ee:we,tt=typeof x=="number"?()=>x:x;Te.save(),Re.save(),Te.beginPath(),Re.beginPath(),Te.textBaseline="middle",Re.textBaseline="middle",te!==1&&(Te.scale(te,te),Re.scale(te,te));const Ye=Ll(c,l,i,h,s);let gt=[];const qt=m&&L.current?.cell[1]===a&&u===0;let Dt=!1;if(Y!==void 0){for(const Ct of Y)if(Ct.style!=="no-outline"&&Ct.range.y===a&&u===0){Dt=!0;break}}const ct=()=>{k0(Te,Ye,d,de,i,s,y,b,h,I,L,p,he,ue,E,k,ke,R,P),Hu(Te,Ye,a,s,u,i,o,void 0,void 0,b,ye,tt,T,E,C,_,p,!0),Te.beginPath(),Te.moveTo(0,Pe-.5),Te.lineTo(i,Pe-.5),Te.strokeStyle=Hn(p.headerBottomBorderColor??p.horizontalBorderColor??p.borderColor,p.bgHeader),Te.stroke(),Dt&&zu(Te,i,o,l,a,s,u,c,g,y,b,x,C,_,Y,p),qt&&dl(Te,i,o,a,s,u,Ye,c,p,ye,L,tt,D,C,H,S,_)};if(ke!==void 0){const Ct=Ye[Ye.length-1].sourceIndex+1,un=ke.hasItemInRegion([{x:l,y:-2,width:Ct,height:2},{x:l,y:a,width:Ct,height:300},{x:0,y:a,width:g,height:300},{x:0,y:-2,width:g,height:2},{x:l,y:_-C,width:Ct,height:C,when:C>0}]),gn=Ie=>{Fu(Ie,Ye,c,o,ye,s,u,a,_,tt,D,k,T,v,O,m,C,H,gt,ke,L,N,Y,Q,he,ue,de,q,ae,p,G,se,le,M,Pt);const mt=L.current;S!==!1&&S!==void 0&&m&&mt!==void 0&&ke.has(Rd(mt.range))&&dl(Ie,i,o,a,s,u,Ye,c,p,ye,L,tt,D,C,H,S,_)};un&&(gn(Re),Ge!==null&&(Ge.save(),Ge.scale(te,te),Ge.textBaseline="middle",gn(Ge),Ge.restore()),ke.hasHeader()&&(L0(Te,Ye,i,b,ye,s,u,a,ke),ct())),Re.restore(),Te.restore();return}if((me!==!0||l!==_e?.cellXOffset||s!==_e?.translateX||qt!==_e?.mustDrawFocusOnHeader||Dt!==_e?.mustDrawHighlightRingsOnHeader)&&ct(),me===!0){An(ht!==void 0&&_e!==void 0);const{regions:Ct}=D0(Re,ht,ht===Ee?_e.aBufferScroll:_e.bBufferScroll,ht===Ee?_e.bBufferScroll:_e.aBufferScroll,_e,l,a,s,u,C,i,o,_,ye,te,c,Ye,x,Oe);gt=Ct}else me!==!1&&(An(_e!==void 0),gt=O0(_e,l,a,s,u,i,o,ye,Ye,me));E0(Re,Ye,i,o,C,_,E,tt,p);const jt=zu(Re,i,o,l,a,s,u,c,g,y,b,x,C,_,Y,p),Kt=m?dl(Re,i,o,a,s,u,Ye,c,p,ye,L,tt,D,C,H,S,_):void 0;if(Re.fillStyle=p.bgCell,gt.length>0){Re.beginPath();for(const Ct of gt)Re.rect(Ct.x,Ct.y,Ct.width,Ct.height);Re.clip(),Re.fill(),Re.beginPath()}else Re.fillRect(0,0,i,o);const Dn=Fu(Re,Ye,c,o,ye,s,u,a,_,tt,D,k,T,v,O,m,C,H,gt,ke,L,N,Y,Q,he,ue,de,q,ae,p,G,se,le,M,Pt);I0(Re,Ye,c,i,o,ye,s,u,a,_,tt,T,L.rows,v,C,H,gt,ke,p),T0(Re,Ye,a,s,u,i,o,gt,ye,tt,T,E,C,_,p),Hu(Re,Ye,a,s,u,i,o,gt,Dn,b,ye,tt,T,E,C,_,p),jt?.(),Kt?.(),I&&xt!=="none"&&Pr(Ye,0,s,0,ye,(Ct,un)=>Ct.sourceIndex===oe?(Vu(Te,un+Ct.width,0,ye+1,Hn(p.resizeIndicatorColor??p.accentLight,p.bgHeader)),xt==="full"&&Vu(Re,un+Ct.width,ye,o,Hn(p.resizeIndicatorColor??p.accentLight,p.bgCell)),!0):!1),Ge!==null&&(Ge.fillStyle=p.bgCell,Ge.fillRect(0,0,i,o),Ge.drawImage(Re.canvas,0,0));const It=_0(Ye,o,ye,s,u,a,_,tt,C,H);Q?.setWindow({x:l,y:a,width:Ye.length,height:It-a},g,Array.from({length:C},(Ct,un)=>_-1-un));const pt=_e!==void 0&&(l!==_e.cellXOffset||s!==_e.translateX),On=_e!==void 0&&(a!==_e.cellYOffset||u!==_e.translateY);re.current={cellXOffset:l,cellYOffset:a,translateX:s,translateY:u,mustDrawFocusOnHeader:qt,mustDrawHighlightRingsOnHeader:Dt,lastBuffer:Oe?He===Ee?"a":"b":void 0,aBufferScroll:He===Ee?[pt,On]:_e?.aBufferScroll,bBufferScroll:He===st?[pt,On]:_e?.bBufferScroll},Re.restore(),Te.restore()}const F0=80;function A0(e){const t=e-1;return t*t*t+1}class H0{callback;constructor(t){this.callback=t}currentHoveredItem=void 0;leavingItems=[];lastAnimationTime;addToLeavingItems=t=>{this.leavingItems.some(r=>uo(r.item,t.item))||this.leavingItems.push(t)};removeFromLeavingItems=t=>{const n=this.leavingItems.find(r=>uo(r.item,t));return this.leavingItems=this.leavingItems.filter(r=>r!==n),n?.hoverAmount??0};cleanUpLeavingElements=()=>{this.leavingItems=this.leavingItems.filter(t=>t.hoverAmount>0)};shouldStep=()=>{const t=this.leavingItems.length>0,n=this.currentHoveredItem!==void 0&&this.currentHoveredItem.hoverAmount<1;return t||n};getAnimatingItems=()=>this.currentHoveredItem!==void 0?[...this.leavingItems,this.currentHoveredItem]:this.leavingItems.map(t=>({...t,hoverAmount:A0(t.hoverAmount)}));step=t=>{if(this.lastAnimationTime===void 0)this.lastAnimationTime=t;else{const r=(t-this.lastAnimationTime)/F0;for(const o of this.leavingItems)o.hoverAmount=Nn(o.hoverAmount-r,0,1);this.currentHoveredItem!==void 0&&(this.currentHoveredItem.hoverAmount=Nn(this.currentHoveredItem.hoverAmount+r,0,1));const i=this.getAnimatingItems();this.callback(i),this.cleanUpLeavingElements()}this.shouldStep()?(this.lastAnimationTime=t,window.requestAnimationFrame(this.step)):this.lastAnimationTime=void 0};setHovered=t=>{if(!uo(this.currentHoveredItem?.item,t)){if(this.currentHoveredItem!==void 0&&this.addToLeavingItems(this.currentHoveredItem),t!==void 0){const n=this.removeFromLeavingItems(t);this.currentHoveredItem={item:t,hoverAmount:n}}else this.currentHoveredItem=void 0;this.lastAnimationTime===void 0&&window.requestAnimationFrame(this.step)}}}class z0{fn;val;constructor(t){this.fn=t}get value(){return this.val??(this.val=this.fn())}}function os(e){return new z0(e)}const V0=os(()=>window.navigator.userAgent.includes("Firefox")),da=os(()=>window.navigator.userAgent.includes("Mac OS")&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome")),fa=os(()=>window.navigator.platform.toLowerCase().startsWith("mac"));function $0(e){const t=f.useRef([]),n=f.useRef(0),r=f.useRef(e);r.current=e;const i=f.useCallback(()=>{const o=()=>window.requestAnimationFrame(l),l=()=>{const a=t.current.map(rs);t.current=[],r.current(new fo(a)),t.current.length>0?n.current++:n.current=0};window.requestAnimationFrame(n.current>600?o:l)},[]);return f.useCallback(o=>{t.current.length===0&&i();const l=Kn(o[0],o[1]);t.current.includes(l)||t.current.push(l)},[i])}const Rr="header",jn="group-header",ha="out-of-bounds";var Ei;(function(e){e[e.Start=-2]="Start",e[e.StartPadding=-1]="StartPadding",e[e.Center=0]="Center",e[e.EndPadding=1]="EndPadding",e[e.End=2]="End"})(Ei||(Ei={}));function Yd(e,t){return e===t?!0:e?.kind==="out-of-bounds"?e?.kind===t?.kind&&e?.location[0]===t?.location[0]&&e?.location[1]===t?.location[1]&&e?.region[0]===t?.region[0]&&e?.region[1]===t?.region[1]:e?.kind===t?.kind&&e?.location[0]===t?.location[0]&&e?.location[1]===t?.location[1]}const N0=(e,t)=>e.kind===Z.Custom?e.copyData:t?.(e)?.getAccessibilityString(e)??"",B0=(e,t)=>{const{width:n,height:r,accessibilityHeight:i,columns:o,cellXOffset:l,cellYOffset:a,headerHeight:s,fillHandle:u=!1,groupHeaderHeight:c,rowHeight:d,rows:g,getCellContent:h,getRowThemeOverride:p,onHeaderMenuClick:m,onHeaderIndicatorClick:y,enableGroups:b,isFilling:v,onCanvasFocused:x,onCanvasBlur:E,isFocused:M,selection:I,freezeColumns:L,onContextMenu:S,freezeTrailingRows:C,fixedShadowX:_=!0,fixedShadowY:D=!0,drawFocusRing:k,onMouseDown:T,onMouseUp:O,onMouseMoveRaw:R,onMouseMove:N,onItemHovered:q,dragAndDropState:Y,firstColAccessible:oe,onKeyDown:Q,onKeyUp:re,highlightRegions:ue,canvasRef:ae,onDragStart:de,onDragEnd:he,eventTargetRef:ce,isResizing:H,resizeColumn:P,isDragging:G,isDraggable:se=!1,allowResize:le,disabledRows:ve,hasAppendRow:ge,getGroupDetails:Je,theme:ke,prelightCells:Pt,headerIcons:xt,verticalBorder:Oe,drawCell:te,drawHeader:me,onCellFocused:we,onDragOverCell:ne,onDrop:ye,onDragLeave:Pe,imageWindowLoader:Ee,smoothScrollX:st=!1,smoothScrollY:_e=!1,experimental:Ge,getCellRenderer:Te,resizeIndicator:Re="full"}=e,He=e.translateX??0,ht=e.translateY??0,tt=Math.max(L,Math.min(o.length-1,l)),Ye=f.useRef(null),gt=f.useRef(Ge?.eventTarget??window),qt=gt.current,Dt=Ee,ct=f.useRef(),[jt,Kt]=f.useState(!1),Dn=f.useRef([]),It=f.useRef(),[pt,On]=f.useState(),[Ct,un]=f.useState(),gn=f.useRef(null),[Ie,mt]=f.useState(),[Tt,dn]=f.useState(!1),Bt=f.useRef(Tt);Bt.current=Tt;const rn=f.useMemo(()=>new v0(xt,()=>{fn.current=void 0,En.current()}),[xt]),Pn=b?c+s:s,on=f.useRef(-1),Zt=(Ge?.enableFirefoxRescaling??!1)&&V0.value,Ue=(Ge?.enableSafariRescaling??!1)&&da.value;f.useLayoutEffect(()=>{window.devicePixelRatio===1||!Zt&&!Ue||(on.current!==-1&&Kt(!0),window.clearTimeout(on.current),on.current=window.setTimeout(()=>{Kt(!1),on.current=-1},200))},[a,tt,He,ht,Zt,Ue]);const kt=hm(o,L),Rn=f.useMemo(()=>_?Pi(kt,Y):0,[kt,Y,_]),Lt=f.useCallback((V,ee,xe)=>{const De=V.getBoundingClientRect();if(ee>=kt.length||xe>=g)return;const fe=De.width/n,pe=_l(ee,xe,n,r,c,Pn,tt,a,He,ht,g,L,C,kt,d);return fe!==1&&(pe.x*=fe,pe.y*=fe,pe.width*=fe,pe.height*=fe),pe.x+=De.x,pe.y+=De.y,pe},[n,r,c,Pn,tt,a,He,ht,g,L,C,kt,d]),bt=f.useCallback((V,ee,xe,De)=>{const fe=V.getBoundingClientRect(),pe=fe.width/n,Xe=(ee-fe.left)/pe,Me=(xe-fe.top)/pe,Ze=5,vt=Ll(kt,tt,n,void 0,He);let cn=0,Ut=0;const Mt=typeof PointerEvent<"u"&&De instanceof PointerEvent&&De.pointerType==="mouse"||typeof MouseEvent<"u"&&De instanceof MouseEvent,ut=typeof PointerEvent<"u"&&De instanceof PointerEvent&&De.pointerType==="touch"||typeof TouchEvent<"u"&&De instanceof TouchEvent;Mt&&(cn=De.button,Ut=De.buttons);const je=vm(Xe,vt,He),dt=bm(Me,r,b,s,c,g,d,a,ht,C),zt=De?.shiftKey===!0,ci=De?.ctrlKey===!0,Hr=De?.metaKey===!0,Qt=[Xe<0?-1:n<Xe?1:0,Me<Pn?-1:r<Me?1:0];let ln;if(je===-1||Me<0||Xe<0||dt===void 0||Xe>n||Me>r){const _t=Xe>n?1:Xe<0?-1:0,Vn=Me>r?1:Me<0?-1:0;let mn=_t*2,di=Vn*2;_t===0&&(mn=je===-1?Ei.EndPadding:Ei.Center),Vn===0&&(di=dt===void 0?Ei.EndPadding:Ei.Center);let cr=!1;if(je===-1&&dt===-1){const en=Lt(V,kt.length-1,-1);An(en!==void 0),cr=ee<en.x+en.width+Ze}const nt=Xe>n&&Xe<n+Tl()||Me>r&&Me<r+Tl();ln={kind:ha,location:[je!==-1?je:Xe<0?0:kt.length-1,dt??g-1],region:[mn,di],shiftKey:zt,ctrlKey:ci,metaKey:Hr,isEdge:cr,isTouch:ut,button:cn,buttons:Ut,scrollEdge:Qt,isMaybeScrollbar:nt}}else if(dt<=-1){let _t=Lt(V,je,dt);An(_t!==void 0);let Vn=_t!==void 0&&_t.x+_t.width-ee<=Ze;const mn=je-1;ee-_t.x<=Ze&&mn>=0?(Vn=!0,_t=Lt(V,mn,dt),An(_t!==void 0),ln={kind:b&&dt===-2?jn:Rr,location:[mn,dt],bounds:_t,group:kt[mn].group??"",isEdge:Vn,shiftKey:zt,ctrlKey:ci,metaKey:Hr,isTouch:ut,localEventX:ee-_t.x,localEventY:xe-_t.y,button:cn,buttons:Ut,scrollEdge:Qt}):ln={kind:b&&dt===-2?jn:Rr,group:kt[je].group??"",location:[je,dt],bounds:_t,isEdge:Vn,shiftKey:zt,ctrlKey:ci,metaKey:Hr,isTouch:ut,localEventX:ee-_t.x,localEventY:xe-_t.y,button:cn,buttons:Ut,scrollEdge:Qt}}else{const _t=Lt(V,je,dt);An(_t!==void 0);const Vn=_t!==void 0&&_t.x+_t.width-ee<Ze;let mn=!1;if(u!==!1&&u!==void 0&&I.current!==void 0){const cr=typeof u=="object"?{...ua,...u}:ua,nt=cr.size,en=nt/2,zr=Rd(I.current.range),wr=Lt(V,zr[0],zr[1]);if(wr!==void 0){const dr=wr.x+wr.width+cr.offsetX-en+.5,Vt=wr.y+wr.height+cr.offsetY-en+.5;mn=Math.abs(dr-ee)<nt&&Math.abs(Vt-xe)<nt}}ln={kind:"cell",location:[je,dt],bounds:_t,isEdge:Vn,shiftKey:zt,ctrlKey:ci,isFillHandle:mn,metaKey:Hr,isTouch:ut,localEventX:ee-_t.x,localEventY:xe-_t.y,button:cn,buttons:Ut,scrollEdge:Qt}}return ln},[n,kt,tt,He,r,b,s,c,g,d,a,ht,C,Lt,u,I,Pn]),[Cn]=pt??[],er=f.useRef(()=>{}),tr=f.useRef(pt);tr.current=pt;const[B,ze]=f.useMemo(()=>{const V=document.createElement("canvas"),ee=document.createElement("canvas");return V.style.display="none",V.style.opacity="0",V.style.position="fixed",ee.style.display="none",ee.style.opacity="0",ee.style.position="fixed",[V.getContext("2d",{alpha:!1}),ee.getContext("2d",{alpha:!1})]},[]);f.useLayoutEffect(()=>{if(!(B===null||ze===null))return document.documentElement.append(B.canvas),document.documentElement.append(ze.canvas),()=>{B.canvas.remove(),ze.canvas.remove()}},[B,ze]);const qe=f.useMemo(()=>new Im,[]),Ot=Zt&&jt?1:Ue&&jt?2:5,an=Ge?.disableMinimumCellWidth===!0?1:10,fn=f.useRef(),In=f.useRef(null),pn=f.useRef(null),Wt=f.useCallback(()=>{const V=Ye.current,ee=gn.current;if(V===null||ee===null||(In.current===null&&(In.current=V.getContext("2d",{alpha:!1}),V.width=0,V.height=0),pn.current===null&&(pn.current=ee.getContext("2d",{alpha:!1}),ee.width=0,ee.height=0),In.current===null||pn.current===null||B===null||ze===null))return;let xe=!1;const De=Xe=>{xe=!0,mt(Xe)},fe=fn.current,pe={headerCanvasCtx:pn.current,canvasCtx:In.current,bufferACtx:B,bufferBCtx:ze,width:n,height:r,cellXOffset:tt,cellYOffset:a,translateX:Math.round(He),translateY:Math.round(ht),mappedColumns:kt,enableGroups:b,freezeColumns:L,dragAndDropState:Y,theme:ke,headerHeight:s,groupHeaderHeight:c,disabledRows:ve??et.empty(),rowHeight:d,verticalBorder:Oe,isResizing:H,resizeCol:P,isFocused:M,selection:I,fillHandle:u,drawCellCallback:te,hasAppendRow:ge,overrideCursor:De,maxScaleFactor:Ot,freezeTrailingRows:C,rows:g,drawFocus:k,getCellContent:h,getGroupDetails:Je??(Xe=>({name:Xe})),getRowThemeOverride:p,drawHeaderCallback:me,prelightCells:Pt,highlightRegions:ue,imageLoader:Dt,lastBlitData:It,damage:ct.current,hoverValues:Dn.current,hoverInfo:tr.current,spriteManager:rn,scrolling:jt,hyperWrapping:Ge?.hyperWrapping??!1,touchMode:Tt,enqueue:er.current,renderStateProvider:qe,renderStrategy:Ge?.renderStrategy??(da.value?"double-buffer":"single-buffer"),getCellRenderer:Te,minimumCellWidth:an,resizeIndicator:Re};pe.damage===void 0?(fn.current=pe,$u(pe,fe)):$u(pe,void 0),!xe&&(pe.damage===void 0||pe.damage.has(tr?.current?.[0]))&&mt(void 0)},[B,ze,n,r,tt,a,He,ht,kt,b,L,Y,ke,s,c,ve,d,Oe,H,ge,P,M,I,u,C,g,k,Ot,h,Je,p,te,me,Pt,ue,Dt,rn,jt,Ge?.hyperWrapping,Ge?.renderStrategy,Tt,qe,Te,an,Re]),En=f.useRef(Wt);f.useLayoutEffect(()=>{Wt(),En.current=Wt},[Wt]),f.useLayoutEffect(()=>{(async()=>{document?.fonts?.ready!==void 0&&(await document.fonts.ready,fn.current=void 0,En.current())})()},[]);const Sn=f.useCallback(V=>{ct.current=V,En.current(),ct.current=void 0},[]),_i=$0(Sn);er.current=_i;const ti=f.useCallback(V=>{Sn(new fo(V.map(ee=>ee.cell)))},[Sn]);Dt.setCallback(Sn);const[Lr,Ce]=f.useState(!1),[wt,At]=Cn??[],zn=wt!==void 0&&At===-1&&wt>=0&&wt<kt.length&&kt[wt].headerRowMarkerDisabled!==!0,Tn=wt!==void 0&&At===-2;let Jt=!1,Xt=!1,hn=Ie;if(hn===void 0&&wt!==void 0&&At!==void 0&&At>-1&&At<g){const V=h([wt,At],!0);Jt=V.kind===Bn.NewRow||V.kind===Bn.Marker&&V.markerKind!=="number",Xt=V.kind===Z.Boolean&&Gl(V),hn=V.cursor}const ko=G?"grabbing":(Ct??!1)||H?"col-resize":Lr||v?"crosshair":hn!==void 0?hn:zn||Jt||Xt||Tn?"pointer":"default",ni=f.useMemo(()=>({contain:"strict",display:"block",cursor:ko}),[ko]),Un=f.useRef("default"),xn=ce?.current;xn!=null&&Un.current!==ni.cursor&&(xn.style.cursor=Un.current=ni.cursor);const ri=f.useCallback((V,ee,xe,De)=>{if(Je===void 0)return;const fe=Je(V);if(fe.actions!==void 0){const pe=Ud(ee,fe.actions);for(const[Xe,Me]of pe.entries())if(jr(Me,xe+ee.x,De+Me.y))return fe.actions[Xe]}},[Je]),sr=f.useCallback((V,ee,xe,De)=>{const fe=kt[ee];if(!G&&!H&&!(Ct??!1)){const pe=Lt(V,ee,-1);An(pe!==void 0);const Xe=qd(void 0,fe,pe.x,pe.y,pe.width,pe.height,ke,Kl(fe.title)==="rtl");if(fe.hasMenu===!0&&Xe.menuBounds!==void 0&&jr(Xe.menuBounds,xe,De))return{area:"menu",bounds:Xe.menuBounds};if(fe.indicatorIcon!==void 0&&Xe.indicatorIconBounds!==void 0&&jr(Xe.indicatorIconBounds,xe,De))return{area:"indicator",bounds:Xe.indicatorIconBounds}}},[kt,Lt,Ct,G,H,ke]),ii=f.useRef(0),mr=f.useRef(),oi=f.useRef(!1),ai=f.useCallback(V=>{const ee=Ye.current,xe=ce?.current;if(ee===null||V.target!==ee&&V.target!==xe)return;oi.current=!0;const De=V.clientX,fe=V.clientY;if(V.target===xe&&xe!==null){const Xe=xe.getBoundingClientRect();if(De>Xe.right||fe>Xe.bottom)return}const pe=bt(ee,De,fe,V);mr.current=pe.location,pe.isTouch&&(ii.current=Date.now()),Bt.current!==pe.isTouch&&dn(pe.isTouch),!(pe.kind===Rr&&sr(ee,pe.location[0],De,fe)!==void 0)&&(pe.kind===jn&&ri(pe.group,pe.bounds,pe.localEventX,pe.localEventY)!==void 0||(T?.(pe),!pe.isTouch&&se!==!0&&se!==pe.kind&&pe.button<3&&pe.button!==1&&V.preventDefault()))},[ce,se,bt,ri,sr,T]);Mn("pointerdown",ai,qt,!1);const _r=f.useRef(0),vr=f.useCallback(V=>{const ee=_r.current;_r.current=Date.now();const xe=Ye.current;if(oi.current=!1,O===void 0||xe===null)return;const De=ce?.current,fe=V.target!==xe&&V.target!==De,pe=V.clientX,Xe=V.clientY,Me=V.pointerType==="mouse"?V.button<3:!0;let Ze=bt(xe,pe,Xe,V);Ze.isTouch&&ii.current!==0&&Date.now()-ii.current>500&&(Ze={...Ze,isLongTouch:!0}),ee!==0&&Date.now()-ee<(Ze.isTouch?1e3:500)&&(Ze={...Ze,isDoubleClick:!0}),Bt.current!==Ze.isTouch&&dn(Ze.isTouch),!fe&&V.cancelable&&Me&&V.preventDefault();const[vt]=Ze.location,cn=sr(xe,vt,pe,Xe);if(Ze.kind===Rr&&cn!==void 0){(Ze.button!==0||mr.current?.[0]!==vt||mr.current?.[1]!==-1)&&O(Ze,!0);return}else if(Ze.kind===jn){const Ut=ri(Ze.group,Ze.bounds,Ze.localEventX,Ze.localEventY);if(Ut!==void 0){Ze.button===0&&Ut.onClick(Ze);return}}O(Ze,fe)},[O,ce,bt,sr,ri]);Mn("pointerup",vr,qt,!1);const li=f.useCallback(V=>{const ee=Ye.current;if(ee===null)return;const xe=ce?.current,De=V.target!==ee&&V.target!==xe;let fe,pe,Xe=!0;V instanceof MouseEvent?(fe=V.clientX,pe=V.clientY,Xe=V.button<3):(fe=V.changedTouches[0].clientX,pe=V.changedTouches[0].clientY);const Me=bt(ee,fe,pe,V);Bt.current!==Me.isTouch&&dn(Me.isTouch),!De&&V.cancelable&&Xe&&V.preventDefault();const[Ze]=Me.location;if(Me.kind===Rr){const vt=sr(ee,Ze,fe,pe);vt!==void 0&&Me.button===0&&mr.current?.[0]===Ze&&mr.current?.[1]===-1&&(vt.area==="menu"?m?.(Ze,vt.bounds):vt.area==="indicator"&&y?.(Ze,vt.bounds))}},[ce,bt,sr,m,y]);Mn("click",li,qt,!1);const Ea=f.useCallback(V=>{const ee=Ye.current,xe=ce?.current;if(ee===null||V.target!==ee&&V.target!==xe||S===void 0)return;const De=bt(ee,V.clientX,V.clientY,V);S(De,()=>{V.cancelable&&V.preventDefault()})},[ce,bt,S]);Mn("contextmenu",Ea,ce?.current??null,!1);const Fi=f.useCallback(V=>{ct.current=new fo(V.map(ee=>ee.item)),Dn.current=V,En.current(),ct.current=void 0},[]),Ve=f.useMemo(()=>new H0(Fi),[Fi]),Ai=f.useRef(Ve);Ai.current=Ve,f.useLayoutEffect(()=>{const V=Ai.current;if(Cn===void 0||Cn[1]<0){V.setHovered(Cn);return}const ee=h(Cn,!0),xe=Te(ee),De=xe===void 0&&ee.kind===Z.Custom||xe?.needsHover!==void 0&&(typeof xe.needsHover=="boolean"?xe.needsHover:xe.needsHover(ee));V.setHovered(De?Cn:void 0)},[h,Te,Cn]);const Mo=f.useRef(),Fr=f.useCallback(V=>{const ee=Ye.current;if(ee===null)return;const xe=ce?.current,De=V.target!==ee&&V.target!==xe,fe=bt(ee,V.clientX,V.clientY,V);if(fe.kind!=="out-of-bounds"&&De&&!oi.current&&!fe.isTouch)return;const pe=(Me,Ze)=>{On(vt=>vt===Me||vt?.[0][0]===Me?.[0][0]&&vt?.[0][1]===Me?.[0][1]&&(vt?.[1][0]===Me?.[1][0]&&vt?.[1][1]===Me?.[1][1]||!Ze)?vt:Me)};if(!Yd(fe,Mo.current))mt(void 0),q?.(fe),pe(fe.kind===ha?void 0:[fe.location,[fe.localEventX,fe.localEventY]],!0),Mo.current=fe;else if(fe.kind==="cell"||fe.kind===Rr||fe.kind===jn){let Me=!1,Ze=!0;if(fe.kind==="cell"){const cn=h(fe.location);Ze=Te(cn)?.needsHoverPosition??cn.kind===Z.Custom,Me=Ze}else Me=!0;const vt=[fe.location,[fe.localEventX,fe.localEventY]];pe(vt,Ze),tr.current=vt,Me&&Sn(new fo([fe.location]))}const Xe=fe.location[0]>=(oe?0:1);un(fe.kind===Rr&&fe.isEdge&&Xe&&le===!0),Ce(fe.kind==="cell"&&fe.isFillHandle),R?.(V),N(fe)},[ce,bt,oe,le,R,N,q,h,Te,Sn]);Mn("pointermove",Fr,qt,!0);const Ta=f.useCallback(V=>{const ee=Ye.current;if(ee===null)return;let xe,De;I.current!==void 0&&(xe=Lt(ee,I.current.cell[0],I.current.cell[1]),De=I.current.cell),Q?.({bounds:xe,stopPropagation:()=>V.stopPropagation(),preventDefault:()=>V.preventDefault(),cancel:()=>{},ctrlKey:V.ctrlKey,metaKey:V.metaKey,shiftKey:V.shiftKey,altKey:V.altKey,key:V.key,keyCode:V.keyCode,rawEvent:V,location:De})},[Q,I,Lt]),nr=f.useCallback(V=>{const ee=Ye.current;if(ee===null)return;let xe,De;I.current!==void 0&&(xe=Lt(ee,I.current.cell[0],I.current.cell[1]),De=I.current.cell),re?.({bounds:xe,stopPropagation:()=>V.stopPropagation(),preventDefault:()=>V.preventDefault(),cancel:()=>{},ctrlKey:V.ctrlKey,metaKey:V.metaKey,shiftKey:V.shiftKey,altKey:V.altKey,key:V.key,keyCode:V.keyCode,rawEvent:V,location:De})},[re,I,Lt]),Hi=f.useCallback(V=>{if(Ye.current=V,ae!==void 0&&(ae.current=V),Ge?.eventTarget)gt.current=Ge.eventTarget;else if(V===null)gt.current=window;else{const ee=V.getRootNode();ee===document&&(gt.current=window),gt.current=ee}},[ae,Ge?.eventTarget]),Ro=f.useCallback(V=>{const ee=Ye.current;if(ee===null||se===!1||H){V.preventDefault();return}let xe,De;const fe=bt(ee,V.clientX,V.clientY);if(se!==!0&&fe.kind!==se){V.preventDefault();return}const pe=(Ut,Mt)=>{xe=Ut,De=Mt};let Xe,Me,Ze;const vt=(Ut,Mt,ut)=>{Xe=Ut,Me=Mt,Ze=ut};let cn=!1;if(de?.({...fe,setData:pe,setDragImage:vt,preventDefault:()=>cn=!0,defaultPrevented:()=>cn}),!cn&&xe!==void 0&&De!==void 0&&V.dataTransfer!==null)if(V.dataTransfer.setData(xe,De),V.dataTransfer.effectAllowed="copyLink",Xe!==void 0&&Me!==void 0&&Ze!==void 0)V.dataTransfer.setDragImage(Xe,Me,Ze);else{const[Ut,Mt]=fe.location;if(Mt!==void 0){const ut=document.createElement("canvas"),je=Lt(ee,Ut,Mt);An(je!==void 0);const dt=Math.ceil(window.devicePixelRatio??1);ut.width=je.width*dt,ut.height=je.height*dt;const zt=ut.getContext("2d");zt!==null&&(zt.scale(dt,dt),zt.textBaseline="middle",Mt===-1?(zt.font=ke.headerFontFull,zt.fillStyle=ke.bgHeader,zt.fillRect(0,0,ut.width,ut.height),Xd(zt,0,0,je.width,je.height,kt[Ut],!1,ke,!1,void 0,void 0,!1,0,rn,me,!1)):(zt.font=ke.baseFontFull,zt.fillStyle=ke.bgCell,zt.fillRect(0,0,ut.width,ut.height),Wd(zt,h([Ut,Mt]),0,Mt,!1,!1,0,0,je.width,je.height,!1,ke,ke.bgCell,Dt,rn,1,void 0,!1,0,void 0,void 0,void 0,qe,Te,()=>{}))),ut.style.left="-100%",ut.style.position="absolute",ut.style.width=`${je.width}px`,ut.style.height=`${je.height}px`,document.body.append(ut),V.dataTransfer.setDragImage(ut,je.width/2,je.height/2),window.setTimeout(()=>{ut.remove()},0)}}else V.preventDefault()},[se,H,bt,de,Lt,ke,kt,rn,me,h,Dt,qe,Te]);Mn("dragstart",Ro,ce?.current??null,!1,!1);const si=f.useRef(),Da=f.useCallback(V=>{const ee=Ye.current;if(ye!==void 0&&V.preventDefault(),ee===null||ne===void 0)return;const xe=bt(ee,V.clientX,V.clientY),[De,fe]=xe.location,pe=De-(oe?0:1),[Xe,Me]=si.current??[];(Xe!==pe||Me!==fe)&&(si.current=[pe,fe],ne([pe,fe],V.dataTransfer))},[oe,bt,ne,ye]);Mn("dragover",Da,ce?.current??null,!1,!1);const Oa=f.useCallback(()=>{si.current=void 0,he?.()},[he]);Mn("dragend",Oa,ce?.current??null,!1,!1);const rr=f.useCallback(V=>{const ee=Ye.current;if(ee===null||ye===void 0)return;V.preventDefault();const xe=bt(ee,V.clientX,V.clientY),[De,fe]=xe.location,pe=De-(oe?0:1);ye([pe,fe],V.dataTransfer)},[oe,bt,ye]);Mn("drop",rr,ce?.current??null,!1,!1);const br=f.useCallback(()=>{Pe?.()},[Pe]);Mn("dragleave",br,ce?.current??null,!1,!1);const Ln=f.useRef(I);Ln.current=I;const U=f.useRef(null),Ht=f.useCallback(V=>{Ye.current===null||!Ye.current.contains(document.activeElement)||(V===null&&Ln.current.current!==void 0?ae?.current?.focus({preventScroll:!0}):V!==null&&V.focus({preventScroll:!0}),U.current=V)},[ae]);f.useImperativeHandle(t,()=>({focus:()=>{const V=U.current;V===null||!document.contains(V)?ae?.current?.focus({preventScroll:!0}):V.focus({preventScroll:!0})},getBounds:(V,ee)=>{if(!(ae===void 0||ae.current===null))return Lt(ae.current,V??0,ee??-1)},damage:ti,getMouseArgsForPosition:(V,ee,xe)=>{if(!(ae===void 0||ae.current===null))return bt(ae.current,V,ee,xe)}}),[ae,ti,Lt,bt]);const ur=f.useRef(),Pa=Pp(()=>{if(n<50||Ge?.disableAccessibilityTree===!0)return null;let V=Ll(kt,tt,n,Y,He);const ee=oe?0:-1;!oe&&V[0]?.sourceIndex===0&&(V=V.slice(1));const[xe,De]=I.current?.cell??[],fe=I.current?.range,pe=V.map(Me=>Me.sourceIndex),Xe=Er(a,Math.min(g,a+i));return xe!==void 0&&De!==void 0&&!(pe.includes(xe)&&Xe.includes(De))&&Ht(null),f.createElement("table",{key:"access-tree",role:"grid","aria-rowcount":g+1,"aria-multiselectable":"true","aria-colcount":kt.length+ee},f.createElement("thead",{role:"rowgroup"},f.createElement("tr",{role:"row","aria-rowindex":1},V.map(Me=>f.createElement("th",{role:"columnheader","aria-selected":I.columns.hasIndex(Me.sourceIndex),"aria-colindex":Me.sourceIndex+1+ee,tabIndex:-1,onFocus:Ze=>{if(Ze.target!==U.current)return we?.([Me.sourceIndex,-1])},key:Me.sourceIndex},Me.title)))),f.createElement("tbody",{role:"rowgroup"},Xe.map(Me=>f.createElement("tr",{role:"row","aria-selected":I.rows.hasIndex(Me),key:Me,"aria-rowindex":Me+2},V.map(Ze=>{const vt=Ze.sourceIndex,cn=Kn(vt,Me),Ut=xe===vt&&De===Me,Mt=fe!==void 0&&vt>=fe.x&&vt<fe.x+fe.width&&Me>=fe.y&&Me<fe.y+fe.height,ut=`glide-cell-${vt}-${Me}`,je=[vt,Me],dt=h(je,!0);return f.createElement("td",{key:cn,role:"gridcell","aria-colindex":vt+1+ee,"aria-selected":Mt,"aria-readonly":Ri(dt)||!ki(dt),id:ut,"data-testid":ut,onClick:()=>{const zt=ae?.current;if(zt!=null)return Q?.({bounds:Lt(zt,vt,Me),cancel:()=>{},preventDefault:()=>{},stopPropagation:()=>{},ctrlKey:!1,key:"Enter",keyCode:13,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:je})},onFocusCapture:zt=>{if(!(zt.target===U.current||ur.current?.[0]===vt&&ur.current?.[1]===Me))return ur.current=je,we?.(je)},ref:Ut?Ht:void 0,tabIndex:-1},N0(dt,Te))})))))},[n,kt,tt,Y,He,g,a,i,I,Ht,h,ae,Q,Lt,we],200),Ar=L===0||!_?0:tt>L?1:Nn(-He/100,0,1),La=-a*32+ht,ui=D?Nn(-La/100,0,1):0,Es=f.useMemo(()=>{if(!Ar&&!ui)return null;const V={position:"absolute",top:0,left:Rn,width:n-Rn,height:r,opacity:Ar,pointerEvents:"none",transition:st?void 0:"opacity 0.2s",boxShadow:"inset 13px 0 10px -13px rgba(0, 0, 0, 0.2)"},ee={position:"absolute",top:Pn,left:0,width:n,height:r,opacity:ui,pointerEvents:"none",transition:_e?void 0:"opacity 0.2s",boxShadow:"inset 0 13px 10px -13px rgba(0, 0, 0, 0.2)"};return f.createElement(f.Fragment,null,Ar>0&&f.createElement("div",{id:"shadow-x",style:V}),ui>0&&f.createElement("div",{id:"shadow-y",style:ee}))},[Ar,ui,Rn,n,st,Pn,r,_e]),j=f.useMemo(()=>({position:"absolute",top:0,left:0}),[]);return f.createElement(f.Fragment,null,f.createElement("canvas",{"data-testid":"data-grid-canvas",tabIndex:0,onKeyDown:Ta,onKeyUp:nr,onFocus:x,onBlur:E,ref:Hi,style:ni},Pa),f.createElement("canvas",{ref:gn,style:j}),Es)},W0=f.memo(f.forwardRef(B0));function no(e,t,n,r){return Nn(Math.round(t-(e.growOffset??0)),Math.ceil(n),Math.floor(r))}const U0=e=>{const[t,n]=f.useState(),[r,i]=f.useState(),[o,l]=f.useState(),[a,s]=f.useState(),[u,c]=f.useState(!1),[d,g]=f.useState(),[h,p]=f.useState(),[m,y]=f.useState(),[b,v]=f.useState(!1),[x,E]=f.useState(),{onHeaderMenuClick:M,onHeaderIndicatorClick:I,getCellContent:L,onColumnMoved:S,onColumnResize:C,onColumnResizeStart:_,onColumnResizeEnd:D,gridRef:k,maxColumnWidth:T,minColumnWidth:O,onRowMoved:R,lockColumns:N,onColumnProposeMove:q,onMouseDown:Y,onMouseUp:oe,onItemHovered:Q,onDragStart:re,canvasRef:ue}=e,ae=(C??D??_)!==void 0,{columns:de,selection:he}=e,ce=he.columns,H=f.useCallback(te=>{const[me,we]=te.location;o!==void 0&&a!==me&&me>=N?(c(!0),s(me)):h!==void 0&&we!==void 0?(v(!0),y(Math.max(0,we))):r===void 0&&!u&&!b&&Q?.(te)},[o,h,a,Q,N,r,u,b]),P=S!==void 0,G=f.useCallback(te=>{if(te.button===0){const[me,we]=te.location;if(te.kind==="out-of-bounds"&&te.isEdge&&ae){const ne=k?.current?.getBounds(de.length-1,-1);ne!==void 0&&(n(ne.x),i(de.length-1))}else if(te.kind==="header"&&me>=N){const ne=ue?.current;if(te.isEdge&&ae&&ne){n(te.bounds.x),i(me);const Pe=ne.getBoundingClientRect().width/ne.offsetWidth,Ee=te.bounds.width/Pe;_?.(de[me],Ee,me,Ee+(de[me].growOffset??0))}else te.kind==="header"&&P&&(g(te.bounds.x),l(me))}else te.kind==="cell"&&N>0&&me===0&&we!==void 0&&R!==void 0&&(E(te.bounds.y),p(we))}Y?.(te)},[Y,ae,N,R,k,de,P,_,ue]),se=f.useCallback((te,me)=>{u||b||M?.(te,me)},[u,b,M]),le=f.useCallback((te,me)=>{u||b||I?.(te,me)},[u,b,I]),ve=f.useRef(-1),ge=f.useCallback(()=>{ve.current=-1,p(void 0),y(void 0),E(void 0),v(!1),l(void 0),s(void 0),g(void 0),c(!1),i(void 0),n(void 0)},[]),Je=f.useCallback((te,me)=>{if(te.button===0){if(r!==void 0){if(ce?.hasIndex(r)===!0)for(const ne of ce){if(ne===r)continue;const ye=de[ne],Pe=no(ye,ve.current,O,T);C?.(ye,Pe,ne,Pe+(ye.growOffset??0))}const we=no(de[r],ve.current,O,T);if(D?.(de[r],we,r,we+(de[r].growOffset??0)),ce.hasIndex(r))for(const ne of ce){if(ne===r)continue;const ye=de[ne],Pe=no(ye,ve.current,O,T);D?.(ye,Pe,ne,Pe+(ye.growOffset??0))}}ge(),o!==void 0&&a!==void 0&&q?.(o,a)!==!1&&S?.(o,a),h!==void 0&&m!==void 0&&R?.(h,m)}oe?.(te,me)},[oe,r,o,a,h,m,ce,D,de,O,T,C,S,R,ge,q]),ke=f.useMemo(()=>{if(!(o===void 0||a===void 0)&&o!==a&&q?.(o,a)!==!1)return{src:o,dest:a}},[o,a,q]),Pt=f.useCallback(te=>{const me=ue?.current;if(o!==void 0&&d!==void 0)Math.abs(te.clientX-d)>20&&c(!0);else if(h!==void 0&&x!==void 0)Math.abs(te.clientY-x)>20&&v(!0);else if(r!==void 0&&t!==void 0&&me){const ne=me.getBoundingClientRect().width/me.offsetWidth,ye=(te.clientX-t)/ne,Pe=de[r],Ee=no(Pe,ye,O,T);if(C?.(Pe,Ee,r,Ee+(Pe.growOffset??0)),ve.current=ye,ce?.first()===r)for(const st of ce){if(st===r)continue;const _e=de[st],Ge=no(_e,ve.current,O,T);C?.(_e,Ge,st,Ge+(_e.growOffset??0))}}},[o,d,h,x,r,t,de,O,T,C,ce,ue]),xt=f.useCallback((te,me)=>{if(h===void 0||m===void 0)return L(te,me);let[we,ne]=te;return ne===m?ne=h:(ne>m&&(ne-=1),ne>=h&&(ne+=1)),L([we,ne],me)},[h,m,L]),Oe=f.useCallback(te=>{re?.(te),te.defaultPrevented()||ge()},[ge,re]);return f.createElement(W0,{accessibilityHeight:e.accessibilityHeight,canvasRef:e.canvasRef,cellXOffset:e.cellXOffset,cellYOffset:e.cellYOffset,columns:e.columns,disabledRows:e.disabledRows,drawFocusRing:e.drawFocusRing,drawHeader:e.drawHeader,drawCell:e.drawCell,enableGroups:e.enableGroups,eventTargetRef:e.eventTargetRef,experimental:e.experimental,fillHandle:e.fillHandle,firstColAccessible:e.firstColAccessible,fixedShadowX:e.fixedShadowX,fixedShadowY:e.fixedShadowY,freezeColumns:e.freezeColumns,getCellRenderer:e.getCellRenderer,getGroupDetails:e.getGroupDetails,getRowThemeOverride:e.getRowThemeOverride,groupHeaderHeight:e.groupHeaderHeight,headerHeight:e.headerHeight,headerIcons:e.headerIcons,height:e.height,highlightRegions:e.highlightRegions,imageWindowLoader:e.imageWindowLoader,resizeColumn:r,isDraggable:e.isDraggable,isFilling:e.isFilling,isFocused:e.isFocused,onCanvasBlur:e.onCanvasBlur,onCanvasFocused:e.onCanvasFocused,onCellFocused:e.onCellFocused,onContextMenu:e.onContextMenu,onDragEnd:e.onDragEnd,onDragLeave:e.onDragLeave,onDragOverCell:e.onDragOverCell,onDrop:e.onDrop,onKeyDown:e.onKeyDown,onKeyUp:e.onKeyUp,onMouseMove:e.onMouseMove,prelightCells:e.prelightCells,rowHeight:e.rowHeight,rows:e.rows,selection:e.selection,smoothScrollX:e.smoothScrollX,smoothScrollY:e.smoothScrollY,theme:e.theme,freezeTrailingRows:e.freezeTrailingRows,hasAppendRow:e.hasAppendRow,translateX:e.translateX,translateY:e.translateY,resizeIndicator:e.resizeIndicator,verticalBorder:e.verticalBorder,width:e.width,getCellContent:xt,isResizing:r!==void 0,onHeaderMenuClick:se,onHeaderIndicatorClick:le,isDragging:u,onItemHovered:H,onDragStart:Oe,onMouseDown:G,allowResize:ae,onMouseUp:Je,dragAndDropState:ke,onMouseMoveRaw:Pt,ref:k})};function q0(e){const t=f.useRef(null),[n,r]=f.useState({width:e?.[0],height:e?.[1]});return f.useLayoutEffect(()=>{const i=l=>{for(const a of l){const{width:s,height:u}=a&&a.contentRect||{};r(c=>c.width===s&&c.height===u?c:{width:s,height:u})}},o=new window.ResizeObserver(i);return t.current&&o.observe(t.current,void 0),()=>{o.disconnect()}},[t.current]),{ref:t,...n}}const X0=(e,t,n)=>{const r=f.useRef(null),i=f.useRef(null),o=f.useRef(null),l=f.useRef(0),a=f.useRef(t);a.current=t;const s=n.current;f.useEffect(()=>{const u=()=>{if(i.current===!1&&s!==null){const g=[s.scrollLeft,s.scrollTop];if(o.current?.[0]===g[0]&&o.current?.[1]===g[1])if(l.current>10){o.current=null,i.current=null;return}else l.current++;else l.current=0,a.current(g[0],g[1]),o.current=g;r.current=window.setTimeout(u,8.333333333333334)}},c=()=>{i.current=!0,o.current=null,r.current!==null&&(window.clearTimeout(r.current),r.current=null)},d=g=>{g.touches.length===0&&(i.current=!1,l.current=0,r.current=window.setTimeout(u,8.333333333333334))};if(e&&s!==null){const g=s;return g.addEventListener("touchstart",c),g.addEventListener("touchend",d),()=>{g.removeEventListener("touchstart",c),g.removeEventListener("touchend",d),r.current!==null&&window.clearTimeout(r.current)}}},[e,s])},G0=()=>e=>e.isSafari?"scroll":"auto",Y0=sn("div")({name:"ScrollRegionStyle",class:"gdg-s1dgczr6",propsAsIs:!1,vars:{"s1dgczr6-0":[G0()]}}),j0=33554400,K0=5e6;function Z0(e){const[t,n]=f.useState(!1),r=typeof window>"u"?null:window,i=f.useRef(0);return Mn("touchstart",f.useCallback(()=>{window.clearTimeout(i.current),n(!0)},[]),r,!0,!1),Mn("touchend",f.useCallback(o=>{o.touches.length===0&&(i.current=window.setTimeout(()=>n(!1),e))},[e]),r,!0,!1),t}const J0=e=>{const{children:t,clientHeight:n,scrollHeight:r,scrollWidth:i,update:o,draggable:l,className:a,preventDiagonalScrolling:s=!1,paddingBottom:u=0,paddingRight:c=0,rightElement:d,rightElementProps:g,kineticScrollPerfHack:h=!1,scrollRef:p,initialSize:m}=e,y=[],b=g?.sticky??!1,v=g?.fill??!1,x=f.useRef(0),E=f.useRef(0),M=f.useRef(null),I=typeof window>"u"?1:window.devicePixelRatio,L=f.useRef(I);f.useEffect(()=>{if(L.current!==I){x.current=0,E.current=0,L.current=I;const he=M.current;he!==null&&R.current(he.scrollLeft,he.scrollTop)}},[I]);const S=f.useRef({scrollLeft:0,scrollTop:0,lockDirection:void 0}),C=f.useRef(null),_=Z0(200),[D,k]=f.useState(!0),T=f.useRef(0);f.useLayoutEffect(()=>{if(!D||_||S.current.lockDirection===void 0)return;const he=M.current;if(he===null)return;const[ce,H]=S.current.lockDirection;ce!==void 0?he.scrollLeft=ce:H!==void 0&&(he.scrollTop=H),S.current.lockDirection=void 0},[_,D]);const O=f.useCallback((he,ce)=>{const H=M.current;if(H===null)return;ce=ce??H.scrollTop,he=he??H.scrollLeft;const P=S.current.scrollTop,G=S.current.scrollLeft,se=he-G,le=ce-P;_&&se!==0&&le!==0&&(Math.abs(se)>3||Math.abs(le)>3)&&s&&S.current.lockDirection===void 0&&(S.current.lockDirection=Math.abs(se)<Math.abs(le)?[G,void 0]:[void 0,P]);const ve=S.current.lockDirection;he=ve?.[0]??he,ce=ve?.[1]??ce,S.current.scrollLeft=he,S.current.scrollTop=ce;const ge=H.clientWidth,Je=H.clientHeight,ke=ce,Pt=E.current-ke,xt=H.scrollHeight-Je;E.current=ke;let Oe;if(xt>0&&r>H.scrollHeight+5)if(Math.abs(Pt)>2e3||ke===0||ke===xt){const te=Math.max(0,Math.min(1,ke/xt)),me=r-Je;Oe=te*me,x.current=Oe}else x.current-=Pt,Oe=x.current;else Oe=ke,x.current=Oe;Oe=Math.max(0,Math.min(Oe,r-Je)),x.current=Oe,ve!==void 0&&(window.clearTimeout(T.current),k(!1),T.current=window.setTimeout(()=>k(!0),200)),o({x:he,y:Oe,width:ge-c,height:Je-u,paddingRight:C.current?.clientWidth??0})},[u,c,r,o,s,_]);X0(h&&da.value,O,M);const R=f.useRef(O);R.current=O;const N=f.useRef(),q=f.useRef(!1);f.useLayoutEffect(()=>{q.current?O():q.current=!0},[O,u,c]);const Y=f.useCallback(he=>{M.current=he,p!==void 0&&(p.current=he)},[p]);let oe=0,Q=0;const re=Math.min(r,j0);for(y.push(f.createElement("div",{key:oe++,style:{width:i,height:0}}));Q<re;){const he=Math.min(K0,re-Q);y.push(f.createElement("div",{key:oe++,style:{width:0,height:he}})),Q+=he}const{ref:ue,width:ae,height:de}=q0(m);return typeof window<"u"&&(N.current?.height!==de||N.current?.width!==ae)&&(window.setTimeout(()=>R.current(),0),N.current={width:ae,height:de}),(ae??0)===0||(de??0)===0?f.createElement("div",{ref:ue}):f.createElement("div",{ref:ue},f.createElement(Y0,{isSafari:da.value},f.createElement("div",{className:"dvn-underlay"},t),f.createElement("div",{ref:Y,style:N.current,draggable:l,onDragStart:he=>{l||(he.stopPropagation(),he.preventDefault())},className:"dvn-scroller "+(a??""),onScroll:()=>O()},f.createElement("div",{className:"dvn-scroll-inner"+(d===void 0?" dvn-hidden":"")},f.createElement("div",{className:"dvn-stack"},y),d!==void 0&&f.createElement(f.Fragment,null,!v&&f.createElement("div",{className:"dvn-spacer"}),f.createElement("div",{ref:C,style:{height:de,maxHeight:n-Math.ceil(I%1),position:"sticky",top:0,paddingLeft:1,marginBottom:-40,marginRight:c,flexGrow:v?1:void 0,right:b?c??0:void 0,pointerEvents:"auto"}},d))))))},Q0=e=>{const{columns:t,rows:n,rowHeight:r,headerHeight:i,groupHeaderHeight:o,enableGroups:l,freezeColumns:a,experimental:s,nonGrowWidth:u,clientSize:c,className:d,onVisibleRegionChanged:g,scrollRef:h,preventDiagonalScrolling:p,rightElement:m,rightElementProps:y,overscrollX:b,overscrollY:v,initialSize:x,smoothScrollX:E=!1,smoothScrollY:M=!1,isDraggable:I}=e,{paddingRight:L,paddingBottom:S}=s??{},[C,_]=c,D=f.useRef(),k=f.useRef(),T=f.useRef(),O=f.useRef(),R=u+Math.max(0,b??0);let N=l?i+o:i;if(typeof r=="number")N+=n*r;else for(let Q=0;Q<n;Q++)N+=r(Q);v!==void 0&&(N+=v);const q=f.useRef(),Y=f.useCallback(()=>{if(q.current===void 0)return;const Q={...q.current};let re=0,ue=Q.x<0?-Q.x:0,ae=0,de=0;Q.x=Q.x<0?0:Q.x;let he=0;for(let le=0;le<a;le++)he+=t[le].width;for(const le of t){const ve=re-he;if(Q.x>=ve+le.width)re+=le.width,de++,ae++;else if(Q.x>ve)re+=le.width,E?ue+=ve-Q.x:de++,ae++;else if(Q.x+Q.width>ve)re+=le.width,ae++;else break}let ce=0,H=0,P=0;if(typeof r=="number")M?(H=Math.floor(Q.y/r),ce=H*r-Q.y):H=Math.ceil(Q.y/r),P=Math.ceil(Q.height/r)+H,ce<0&&P++;else{let le=0;for(let ve=0;ve<n;ve++){const ge=r(ve),Je=le+(M?0:ge/2);if(Q.y>=le+ge)le+=ge,H++,P++;else if(Q.y>Je)le+=ge,M?ce+=Je-Q.y:H++,P++;else if(Q.y+Q.height>ge/2+le)le+=ge,P++;else break}}H=Math.max(0,Math.min(H,n-1)),P=Math.max(H,Math.min(P,n));const G={x:de,y:H,width:ae-de,height:P-H},se=D.current;(se===void 0||se.y!==G.y||se.x!==G.x||se.height!==G.height||se.width!==G.width||k.current!==ue||T.current!==ce||Q.width!==O.current?.[0]||Q.height!==O.current?.[1])&&(g?.({x:de,y:H,width:ae-de,height:P-H},Q.width,Q.height,Q.paddingRight??0,ue,ce),D.current=G,k.current=ue,T.current=ce,O.current=[Q.width,Q.height])},[t,r,n,g,a,E,M]),oe=f.useCallback(Q=>{q.current=Q,Y()},[Y]);return f.useEffect(()=>{Y()},[Y]),f.createElement(J0,{scrollRef:h,className:d,kineticScrollPerfHack:s?.kineticScrollPerfHack,preventDiagonalScrolling:p,draggable:I===!0||typeof I=="string",scrollWidth:R+(L??0),scrollHeight:N+(S??0),clientHeight:_,rightElement:m,paddingBottom:S,paddingRight:L,rightElementProps:y,update:oe,initialSize:x},f.createElement(U0,{eventTargetRef:h,width:C,height:_,accessibilityHeight:e.accessibilityHeight,canvasRef:e.canvasRef,cellXOffset:e.cellXOffset,cellYOffset:e.cellYOffset,columns:e.columns,disabledRows:e.disabledRows,enableGroups:e.enableGroups,fillHandle:e.fillHandle,firstColAccessible:e.firstColAccessible,fixedShadowX:e.fixedShadowX,fixedShadowY:e.fixedShadowY,freezeColumns:e.freezeColumns,getCellContent:e.getCellContent,getCellRenderer:e.getCellRenderer,getGroupDetails:e.getGroupDetails,getRowThemeOverride:e.getRowThemeOverride,groupHeaderHeight:e.groupHeaderHeight,headerHeight:e.headerHeight,highlightRegions:e.highlightRegions,imageWindowLoader:e.imageWindowLoader,isFilling:e.isFilling,isFocused:e.isFocused,lockColumns:e.lockColumns,maxColumnWidth:e.maxColumnWidth,minColumnWidth:e.minColumnWidth,onHeaderMenuClick:e.onHeaderMenuClick,onHeaderIndicatorClick:e.onHeaderIndicatorClick,onMouseMove:e.onMouseMove,prelightCells:e.prelightCells,rowHeight:e.rowHeight,rows:e.rows,selection:e.selection,theme:e.theme,freezeTrailingRows:e.freezeTrailingRows,hasAppendRow:e.hasAppendRow,translateX:e.translateX,translateY:e.translateY,onColumnProposeMove:e.onColumnProposeMove,verticalBorder:e.verticalBorder,drawFocusRing:e.drawFocusRing,drawHeader:e.drawHeader,drawCell:e.drawCell,experimental:e.experimental,gridRef:e.gridRef,headerIcons:e.headerIcons,isDraggable:e.isDraggable,onCanvasBlur:e.onCanvasBlur,onCanvasFocused:e.onCanvasFocused,onCellFocused:e.onCellFocused,onColumnMoved:e.onColumnMoved,onColumnResize:e.onColumnResize,onColumnResizeEnd:e.onColumnResizeEnd,onColumnResizeStart:e.onColumnResizeStart,onContextMenu:e.onContextMenu,onDragEnd:e.onDragEnd,onDragLeave:e.onDragLeave,onDragOverCell:e.onDragOverCell,onDragStart:e.onDragStart,onDrop:e.onDrop,onItemHovered:e.onItemHovered,onKeyDown:e.onKeyDown,onKeyUp:e.onKeyUp,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onRowMoved:e.onRowMoved,smoothScrollX:e.smoothScrollX,smoothScrollY:e.smoothScrollY,resizeIndicator:e.resizeIndicator}))},ev=sn("div")({name:"SearchWrapper",class:"gdg-seveqep",propsAsIs:!1}),tv=f.createElement("svg",{className:"button-icon",viewBox:"0 0 512 512"},f.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M112 244l144-144 144 144M256 120v292"})),nv=f.createElement("svg",{className:"button-icon",viewBox:"0 0 512 512"},f.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M112 268l144 144 144-144M256 392V100"})),rv=f.createElement("svg",{className:"button-icon",viewBox:"0 0 512 512"},f.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M368 368L144 144M368 144L144 368"})),iv=10,ov=e=>{const{canvasRef:t,cellYOffset:n,rows:r,columns:i,searchInputRef:o,searchValue:l,searchResults:a,onSearchValueChange:s,getCellsForSelection:u,onSearchResultsChanged:c,showSearch:d=!1,onSearchClose:g}=e,[h]=f.useState(()=>"search-box-"+Math.round(Math.random()*1e3)),[p,m]=f.useState(""),y=l??p,b=f.useCallback(re=>{m(re),s?.(re)},[s]),[v,x]=f.useState(),E=f.useRef(v);E.current=v,f.useEffect(()=>{a!==void 0&&(a.length>0?x(re=>({rowsSearched:r,results:a.length,selectedIndex:re?.selectedIndex??-1})):x(void 0))},[r,a]);const M=f.useRef();M.current===void 0&&(M.current=new AbortController);const I=f.useRef(),[L,S]=f.useState([]),C=a??L,_=f.useCallback(()=>{I.current!==void 0&&(window.cancelAnimationFrame(I.current),I.current=void 0),M.current!==void 0&&M.current.abort(),M.current=new AbortController},[]),D=f.useRef(n);D.current=n;const k=f.useCallback(re=>{const ue=new RegExp(re.replace(/([$()*+.?[\\\]^{|}-])/g,"\\$1"),"i");let ae=D.current,de=Math.min(10,r),he=0;x(void 0),S([]);const ce=[],H=async()=>{if(u===void 0)return;const P=performance.now(),G=r-he;let se=u({x:0,y:ae,width:i.length,height:Math.min(de,G,r-ae)},M.current.signal);typeof se=="function"&&(se=await se());let le=!1;for(const[xt,Oe]of se.entries())for(const[te,me]of Oe.entries()){let we;switch(me.kind){case Z.Text:case Z.Number:we=me.displayData;break;case Z.Uri:case Z.Markdown:we=me.data;break;case Z.Boolean:we=typeof me.data=="boolean"?me.data.toString():void 0;break;case Z.Image:case Z.Bubble:we=me.data.join("🐳");break;case Z.Custom:we=me.copyData;break}we!==void 0&&ue.test(we)&&(ce.push([te,xt+ae]),le=!0)}const ve=performance.now();le&&S([...ce]),he+=se.length,An(he<=r);const ge=E.current?.selectedIndex??-1;x({results:ce.length,rowsSearched:he,selectedIndex:ge}),c?.(ce,ge),ae+de>=r?ae=0:ae+=de;const Je=ve-P,ke=Math.max(Je,1),Pt=iv/ke;de=Math.ceil(de*Pt),he<r&&ce.length<1e3&&(I.current=window.requestAnimationFrame(H))};_(),I.current=window.requestAnimationFrame(H)},[_,i.length,u,c,r]),T=f.useCallback(()=>{g?.(),x(void 0),S([]),c?.([],-1),_(),t?.current?.focus()},[_,t,g,c]),O=f.useCallback(re=>{b(re.target.value),a===void 0&&(re.target.value===""?(x(void 0),S([]),_()):k(re.target.value))},[k,_,b,a]);f.useEffect(()=>{o.current!==null&&(b(""),x(void 0),L.length>0&&(S([]),c?.([],-1)),d?o.current.focus({preventScroll:!0}):_())},[d,o]);const R=f.useCallback(re=>{if(re?.stopPropagation?.(),v===void 0||v.results===0)return;const ue=(v.selectedIndex+1)%v.results;x({...v,selectedIndex:ue}),c?.(C,ue)},[v,c,C]),N=f.useCallback(re=>{if(re?.stopPropagation?.(),v===void 0||v.results===0)return;let ue=(v.selectedIndex-1)%v.results;ue<0&&(ue+=v.results),x({...v,selectedIndex:ue}),c?.(C,ue)},[c,C,v]),q=f.useCallback(re=>{(re.ctrlKey||re.metaKey)&&re.nativeEvent.code==="KeyF"||re.key==="Escape"?(T(),re.stopPropagation(),re.preventDefault()):re.key==="Enter"&&(re.shiftKey?N():R())},[T,R,N]);f.useEffect(()=>()=>{_()},[_]);const[Y,oe]=f.useState(!1);f.useEffect(()=>{if(d)oe(!0);else{const re=setTimeout(()=>oe(!1),150);return()=>clearTimeout(re)}},[d]);const Q=f.useMemo(()=>{if(!d&&!Y)return null;let re;v!==void 0&&(re=v.results>=1e3?"over 1000":`${v.results} result${v.results!==1?"s":""}`,v.selectedIndex>=0&&(re=`${v.selectedIndex+1} of ${re}`));const ue=he=>{he.stopPropagation()},de={width:`${r>0?Math.floor((v?.rowsSearched??0)/r*100):0}%`};return f.createElement(ev,{className:"gdg-search-bar"+(d?"":" out"),onMouseDown:ue,onMouseMove:ue,onMouseUp:ue,onClick:ue},f.createElement("div",{className:"gdg-search-bar-inner"},f.createElement("input",{id:h,"aria-hidden":!d,"data-testid":"search-input",ref:o,onChange:O,value:y,tabIndex:d?void 0:-1,onKeyDownCapture:q}),f.createElement("button",{type:"button","aria-label":"Previous Result","aria-hidden":!d,tabIndex:d?void 0:-1,onClick:N,disabled:(v?.results??0)===0},tv),f.createElement("button",{type:"button","aria-label":"Next Result","aria-hidden":!d,tabIndex:d?void 0:-1,onClick:R,disabled:(v?.results??0)===0},nv),g!==void 0&&f.createElement("button",{type:"button","aria-label":"Close Search","aria-hidden":!d,"data-testid":"search-close-button",tabIndex:d?void 0:-1,onClick:T},rv)),v!==void 0?f.createElement(f.Fragment,null,f.createElement("div",{className:"gdg-search-status"},f.createElement("div",{"data-testid":"search-result-area"},re)),f.createElement("div",{className:"gdg-search-progress",style:de})):f.createElement("div",{className:"gdg-search-status"},f.createElement("label",{htmlFor:h},"Type to search")))},[d,Y,v,r,h,o,O,y,q,N,R,g,T]);return f.createElement(f.Fragment,null,f.createElement(Q0,{prelightCells:C,accessibilityHeight:e.accessibilityHeight,canvasRef:e.canvasRef,cellXOffset:e.cellXOffset,cellYOffset:e.cellYOffset,className:e.className,clientSize:e.clientSize,columns:e.columns,disabledRows:e.disabledRows,enableGroups:e.enableGroups,fillHandle:e.fillHandle,firstColAccessible:e.firstColAccessible,nonGrowWidth:e.nonGrowWidth,fixedShadowX:e.fixedShadowX,fixedShadowY:e.fixedShadowY,freezeColumns:e.freezeColumns,getCellContent:e.getCellContent,getCellRenderer:e.getCellRenderer,getGroupDetails:e.getGroupDetails,getRowThemeOverride:e.getRowThemeOverride,groupHeaderHeight:e.groupHeaderHeight,headerHeight:e.headerHeight,highlightRegions:e.highlightRegions,imageWindowLoader:e.imageWindowLoader,initialSize:e.initialSize,isFilling:e.isFilling,isFocused:e.isFocused,lockColumns:e.lockColumns,maxColumnWidth:e.maxColumnWidth,minColumnWidth:e.minColumnWidth,onHeaderMenuClick:e.onHeaderMenuClick,onHeaderIndicatorClick:e.onHeaderIndicatorClick,onMouseMove:e.onMouseMove,onVisibleRegionChanged:e.onVisibleRegionChanged,overscrollX:e.overscrollX,overscrollY:e.overscrollY,preventDiagonalScrolling:e.preventDiagonalScrolling,rightElement:e.rightElement,rightElementProps:e.rightElementProps,rowHeight:e.rowHeight,rows:e.rows,scrollRef:e.scrollRef,selection:e.selection,theme:e.theme,freezeTrailingRows:e.freezeTrailingRows,hasAppendRow:e.hasAppendRow,translateX:e.translateX,translateY:e.translateY,verticalBorder:e.verticalBorder,onColumnProposeMove:e.onColumnProposeMove,drawFocusRing:e.drawFocusRing,drawCell:e.drawCell,drawHeader:e.drawHeader,experimental:e.experimental,gridRef:e.gridRef,headerIcons:e.headerIcons,isDraggable:e.isDraggable,onCanvasBlur:e.onCanvasBlur,onCanvasFocused:e.onCanvasFocused,onCellFocused:e.onCellFocused,onColumnMoved:e.onColumnMoved,onColumnResize:e.onColumnResize,onColumnResizeEnd:e.onColumnResizeEnd,onColumnResizeStart:e.onColumnResizeStart,onContextMenu:e.onContextMenu,onDragEnd:e.onDragEnd,onDragLeave:e.onDragLeave,onDragOverCell:e.onDragOverCell,onDragStart:e.onDragStart,onDrop:e.onDrop,onItemHovered:e.onItemHovered,onKeyDown:e.onKeyDown,onKeyUp:e.onKeyUp,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onRowMoved:e.onRowMoved,smoothScrollX:e.smoothScrollX,smoothScrollY:e.smoothScrollY,resizeIndicator:e.resizeIndicator}),Q)};class av extends f.PureComponent{wrapperRef=f.createRef();componentDidMount(){const t=this.props.customEventTarget??document;t.addEventListener("pointerdown",this.clickOutside,!0),t.addEventListener("contextmenu",this.clickOutside,!0)}componentWillUnmount(){const t=this.props.customEventTarget??document;t.removeEventListener("pointerdown",this.clickOutside,!0),t.removeEventListener("contextmenu",this.clickOutside,!0)}clickOutside=t=>{if(!(this.props.isOutsideClick&&!this.props.isOutsideClick(t))&&this.wrapperRef.current!==null&&!this.wrapperRef.current.contains(t.target)){let n=t.target;for(;n!==null;){if(n.classList.contains("click-outside-ignore"))return;n=n.parentElement}this.props.onClickOutside()}};render(){const{onClickOutside:t,isOutsideClick:n,customEventTarget:r,...i}=this.props;return f.createElement("div",{...i,ref:this.wrapperRef},this.props.children)}}const lv=()=>e=>Math.max(16,e.targetHeight-10),sv=sn("input")({name:"RenameInput",class:"gdg-r17m35ur",propsAsIs:!1,vars:{"r17m35ur-0":[lv(),"px"]}}),uv=e=>{const{bounds:t,group:n,onClose:r,canvasBounds:i,onFinish:o}=e,[l,a]=$t.useState(n);return $t.createElement(av,{style:{position:"absolute",left:t.x-i.left+1,top:t.y-i.top,width:t.width-2,height:t.height},className:"gdg-c1tqibwd",onClickOutside:r},$t.createElement(sv,{targetHeight:t.height,"data-testid":"group-rename-input",value:l,onBlur:r,onFocus:s=>s.target.setSelectionRange(0,l.length),onChange:s=>a(s.target.value),onKeyDown:s=>{s.key==="Enter"?o(l):s.key==="Escape"&&r()},autoFocus:!0}))};function cv(e,t){return e===void 0?!1:e.length>1&&e.startsWith("_")?Number.parseInt(e.slice(1))===t.keyCode:e.length===1&&e>="a"&&e<="z"?e.toUpperCase().codePointAt(0)===t.keyCode:e===t.key}function it(e,t,n){const r=jd(e,t);return r&&(n.didMatch=!0),r}function jd(e,t){if(e.length===0)return!1;if(e.includes("|")){const s=e.split("|");for(const u of s)if(jd(u,t))return!0;return!1}let n=!1,r=!1,i=!1,o=!1;const l=e.split("+"),a=l.pop();if(!cv(a,t))return!1;if(l[0]==="any")return!0;for(const s of l)switch(s){case"ctrl":n=!0;break;case"shift":r=!0;break;case"alt":i=!0;break;case"meta":o=!0;break;case"primary":fa.value?o=!0:n=!0;break}return t.altKey===i&&t.ctrlKey===n&&t.shiftKey===r&&t.metaKey===o}function dv(e,t,n,r,i,o,l){const a=$t.useCallback((c,d,g,h)=>{(o==="cell"||o==="multi-cell")&&c!==void 0&&(c={...c,range:{x:c.cell[0],y:c.cell[1],width:1,height:1}}),!l&&c!==void 0&&c.range.width>1&&(c={...c,range:{...c.range,width:1,x:c.cell[0]}});const p=n==="mixed"&&(g||h==="drag")||n==="additive",m=(r==="mixed"||r==="additive")&&p,y=(i==="mixed"||i==="additive")&&p;let b={current:c===void 0?void 0:{...c,rangeStack:h==="drag"?e.current?.rangeStack??[]:[]},columns:m?e.columns:et.empty(),rows:y?e.rows:et.empty()};g&&(o==="multi-rect"||o==="multi-cell")&&b.current!==void 0&&e.current!==void 0&&(b={...b,current:{...b.current,rangeStack:[...e.current.rangeStack,e.current.range]}}),t(b,d)},[r,e,n,o,l,i,t]),s=$t.useCallback((c,d,g)=>{c=c??e.rows,d!==void 0&&(c=c.add(d));let h;if(i==="exclusive"&&c.length>0)h={current:void 0,columns:et.empty(),rows:c};else{const p=g&&n==="mixed"||n==="additive",m=g&&r==="mixed"||r==="additive";h={current:p?e.current:void 0,columns:m?e.columns:et.empty(),rows:c}}t(h,!1)},[r,e,n,i,t]),u=$t.useCallback((c,d,g)=>{c=c??e.columns,d!==void 0&&(c=c.add(d));let h;if(r==="exclusive"&&c.length>0)h={current:void 0,rows:et.empty(),columns:c};else{const p=g&&n==="mixed"||n==="additive",m=g&&i==="mixed"||i==="additive";h={current:p?e.current:void 0,rows:m?e.rows:et.empty(),columns:c}}t(h,!1)},[r,e,n,i,t]);return[a,s,u]}function fv(e,t,n,r,i){const o=f.useCallback(u=>{if(e===!0){const c=[];for(let d=u.y;d<u.y+u.height;d++){const g=[];for(let h=u.x;h<u.x+u.width;h++)h<0||d>=i?g.push({kind:Z.Loading,allowOverlay:!1}):g.push(t([h,d]));c.push(g)}return c}return e?.(u,r.signal)??[]},[r.signal,t,e,i]),l=e!==void 0?o:void 0,a=f.useCallback(u=>{if(l===void 0)return[];const c={...u,x:u.x-n};if(c.x<0){c.x=0,c.width--;const d=l(c,r.signal);return typeof d=="function"?async()=>(await d()).map(g=>[{kind:Z.Loading,allowOverlay:!1},...g]):d.map(g=>[{kind:Z.Loading,allowOverlay:!1},...g])}return l(c,r.signal)},[r.signal,l,n]);return[e!==void 0?a:void 0,l]}function hv(e){if(e.copyData!==void 0)return{formatted:e.copyData,rawValue:e.copyData,format:"string",doNotEscape:!0};switch(e.kind){case Z.Boolean:return{formatted:e.data===!0?"TRUE":e.data===!1?"FALSE":e.data===Xl?"INDETERMINATE":"",rawValue:e.data,format:"boolean"};case Z.Custom:return{formatted:e.copyData,rawValue:e.copyData,format:"string"};case Z.Image:case Z.Bubble:return{formatted:e.data,rawValue:e.data,format:"string-array"};case Z.Drilldown:return{formatted:e.data.map(t=>t.text),rawValue:e.data.map(t=>t.text),format:"string-array"};case Z.Text:return{formatted:e.displayData??e.data,rawValue:e.data,format:"string"};case Z.Uri:return{formatted:e.displayData??e.data,rawValue:e.data,format:"url"};case Z.Markdown:case Z.RowID:return{formatted:e.data,rawValue:e.data,format:"string"};case Z.Number:return{formatted:e.displayData,rawValue:e.data,format:"number"};case Z.Loading:return{formatted:"#LOADING",rawValue:"",format:"string"};case Z.Protected:return{formatted:"************",rawValue:"",format:"string"};default:ho()}}function gv(e,t){return e.map((r,i)=>{const o=t[i];return r.map(l=>l.span!==void 0&&l.span[0]!==o?{formatted:"",rawValue:"",format:"string"}:hv(l))})}function Nu(e,t){return(t?/[\t\n",]/:/[\t\n"]/).test(e)&&(e=`"${e.replace(/"/g,'""')}"`),e}function pv(e){const t=[];for(const n of e){const r=[];for(const i of n)i.format==="url"?r.push(i.rawValue?.toString()??""):i.format==="string-array"?r.push(i.formatted.map(o=>Nu(o,!0)).join(",")):r.push(i.doNotEscape===!0?i.formatted:Nu(i.formatted,!1));t.push(r.join(" "))}return t.join(`
|
|
166
|
-
`)}function fl(e){return e.replace(/\t/g," ").replace(/ {2,}/g,t=>"<span> </span>".repeat(t.length))}function Bu(e){return'"'+e.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")+'"'}function mv(e){return e.replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&")}function vv(e){const t=[];t.push('<style type="text/css"><!--br {mso-data-placement:same-cell;}--></style>',"<table><tbody>");for(const n of e){t.push("<tr>");for(const r of n){const i=`gdg-format="${r.format}"`;r.format==="url"?t.push(`<td ${i}><a href="${r.rawValue}">${fl(r.formatted)}</a></td>`):r.format==="string-array"?t.push(`<td ${i}><ol>${r.formatted.map((o,l)=>`<li gdg-raw-value=${Bu(r.rawValue[l])}>`+fl(o)+"</li>").join("")}</ol></td>`):t.push(`<td gdg-raw-value=${Bu(r.rawValue?.toString()??"")} ${i}>${fl(r.formatted)}</td>`)}t.push("</tr>")}return t.push("</tbody></table>"),t.join("")}function bv(e,t){const n=gv(e,t),r=pv(n),i=vv(n);return{textPlain:r,textHtml:i}}function Wu(e){const t=document.createElement("html");t.innerHTML=e.replace(/ /g," ");const n=t.querySelector("table");if(n===null)return;const r=[n],i=[];let o;for(;r.length>0;){const l=r.pop();if(l===void 0)break;if(l instanceof HTMLTableElement||l.nodeName==="TBODY")r.push(...[...l.children].reverse());else if(l instanceof HTMLTableRowElement)o!==void 0&&i.push(o),o=[],r.push(...[...l.children].reverse());else if(l instanceof HTMLTableCellElement){const a=l.cloneNode(!0),u=a.children.length===1&&a.children[0].nodeName==="P"?a.children[0]:null,c=u?.children.length===1&&u.children[0].nodeName==="FONT",d=a.querySelectorAll("br");for(const p of d)p.replaceWith(`
|
|
167
|
-
`);const g=a.getAttribute("gdg-raw-value"),h=a.getAttribute("gdg-format")??"string";if(a.querySelector("a")!==null)o?.push({rawValue:a.querySelector("a")?.getAttribute("href")??"",formatted:a.textContent??"",format:h});else if(a.querySelector("ol")!==null){const p=a.querySelectorAll("li");o?.push({rawValue:[...p].map(m=>m.getAttribute("gdg-raw-value")??""),formatted:[...p].map(m=>m.textContent??""),format:"string-array"})}else if(g!==null)o?.push({rawValue:mv(g),formatted:a.textContent??"",format:h});else{let p=a.textContent??"";c&&(p=p.replace(/\n(?!\n)/g,"")),o?.push({rawValue:p??"",formatted:p??"",format:h})}}}return o!==void 0&&i.push(o),i}function wv(e,t,n,r,i){const o=e;if(r==="allowPartial"||e.current===void 0||t===void 0)return e;let l=!1;do{if(e?.current===void 0)break;const a=e.current?.range,s=[];if(a.width>2){const d=t({x:a.x,y:a.y,width:1,height:a.height},i.signal);if(typeof d=="function")return o;s.push(...d);const g=t({x:a.x+a.width-1,y:a.y,width:1,height:a.height},i.signal);if(typeof g=="function")return o;s.push(...g)}else{const d=t({x:a.x,y:a.y,width:a.width,height:a.height},i.signal);if(typeof d=="function")return o;s.push(...d)}let u=a.x-n,c=a.x+a.width-1-n;for(const d of s)for(const g of d)g.span!==void 0&&(u=Math.min(g.span[0],u),c=Math.max(g.span[1],c));u===a.x-n&&c===a.x+a.width-1-n?l=!0:e={current:{cell:e.current.cell??[0,0],range:{x:u+n,y:a.y,width:c-u+1,height:a.height},rangeStack:e.current.rangeStack},columns:e.columns,rows:e.rows}}while(!l);return e}function Uu(e){return e.startsWith('"')&&e.endsWith('"')&&(e=e.slice(1,-1).replace(/""/g,'"')),e}function yv(e){let t;(function(a){a[a.None=0]="None",a[a.inString=1]="inString",a[a.inStringPostQuote=2]="inStringPostQuote"})(t||(t={}));const n=[];let r=[],i=0,o=t.None;e=e.replace(/\r\n/g,`
|
|
168
|
-
`);let l=0;for(const a of e){switch(o){case t.None:a===" "||a===`
|
|
169
|
-
`?(r.push(e.slice(i,l)),i=l+1,a===`
|
|
170
|
-
`&&(n.push(r),r=[])):a==='"'&&(o=t.inString);break;case t.inString:a==='"'&&(o=t.inStringPostQuote);break;case t.inStringPostQuote:a==='"'?o=t.inString:((a===" "||a===`
|
|
171
|
-
`)&&(r.push(Uu(e.slice(i,l))),i=l+1,a===`
|
|
172
|
-
`&&(n.push(r),r=[])),o=t.None);break}l++}return i<e.length&&r.push(Uu(e.slice(i,e.length))),n.push(r),n.map(a=>a.map(s=>({rawValue:s,formatted:s,format:"string"})))}function qu(e,t,n){const r=bv(e,t),i=a=>{window.navigator.clipboard?.writeText(a)},o=(a,s)=>window.navigator.clipboard?.write===void 0?!1:(window.navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([a],{type:"text/plain"}),"text/html":new Blob([s],{type:"text/html"})})]),!0),l=(a,s)=>{try{if(n===void 0||n.clipboardData===null)throw new Error("No clipboard data");n?.clipboardData?.setData("text/plain",a),n?.clipboardData?.setData("text/html",s)}catch{o(a,s)||i(a)}};window.navigator.clipboard?.write!==void 0||n?.clipboardData!==void 0?l(r.textPlain,r.textHtml):i(r.textPlain),n?.preventDefault()}function Kd(e){return e!==!0}function Xu(e){return typeof e=="string"?e:`${e}px`}const Cv=()=>e=>e.innerWidth,Sv=()=>e=>e.innerHeight,xv=sn("div")({name:"Wrapper",class:"gdg-wmyidgi",propsAsIs:!1,vars:{"wmyidgi-0":[Cv()],"wmyidgi-1":[Sv()]}}),kv=e=>{const{inWidth:t,inHeight:n,children:r,...i}=e;return f.createElement(xv,{innerHeight:Xu(n),innerWidth:Xu(t),...i},r)},Mv=2,Rv=1300;function Iv(e,t,n){const r=$t.useRef(0),[i,o]=e??[0,0];$t.useEffect(()=>{if(i===0&&o===0){r.current=0;return}let l=!1,a=0;const s=u=>{if(!l){if(a===0)a=u;else{const c=u-a;r.current=Math.min(1,r.current+c/Rv);const d=r.current**1.618*c*Mv;t.current?.scrollBy(i*d,o*d),a=u,n?.()}window.requestAnimationFrame(s)}};return window.requestAnimationFrame(s),()=>{l=!0}},[t,i,o,n])}function Ev({rowHeight:e,headerHeight:t,groupHeaderHeight:n,theme:r,overscrollX:i,overscrollY:o,scaleToRem:l,remSize:a}){const[s,u,c,d,g,h]=$t.useMemo(()=>{if(!l||a===16)return[e,t,n,r,i,o];const p=a/16,m=e,y=_d();return[typeof m=="number"?m*p:b=>Math.ceil(m(b)*p),Math.ceil(t*p),Math.ceil(n*p),{...r,headerIconSize:(r?.headerIconSize??y.headerIconSize)*p,cellHorizontalPadding:(r?.cellHorizontalPadding??y.cellHorizontalPadding)*p,cellVerticalPadding:(r?.cellVerticalPadding??y.cellVerticalPadding)*p},Math.ceil((i??0)*p),Math.ceil((o??0)*p)]},[n,t,i,o,a,e,l,r]);return{rowHeight:s,headerHeight:u,groupHeaderHeight:c,theme:d,overscrollX:g,overscrollY:h}}const kr={downFill:!1,rightFill:!1,clear:!0,closeOverlay:!0,acceptOverlayDown:!0,acceptOverlayUp:!0,acceptOverlayLeft:!0,acceptOverlayRight:!0,copy:!0,paste:!0,cut:!0,search:!1,delete:!0,activateCell:!0,scrollToSelectedCell:!0,goToFirstCell:!0,goToFirstColumn:!0,goToFirstRow:!0,goToLastCell:!0,goToLastColumn:!0,goToLastRow:!0,goToNextPage:!0,goToPreviousPage:!0,selectToFirstCell:!0,selectToFirstColumn:!0,selectToFirstRow:!0,selectToLastCell:!0,selectToLastColumn:!0,selectToLastRow:!0,selectAll:!0,selectRow:!0,selectColumn:!0,goUpCell:!0,goRightCell:!0,goDownCell:!0,goLeftCell:!0,goUpCellRetainSelection:!0,goRightCellRetainSelection:!0,goDownCellRetainSelection:!0,goLeftCellRetainSelection:!0,selectGrowUp:!0,selectGrowRight:!0,selectGrowDown:!0,selectGrowLeft:!0};function ot(e,t){return e===!0?t:e===!1?"":e}function Gu(e){const t=fa.value;return{activateCell:ot(e.activateCell," |Enter|shift+Enter"),clear:ot(e.clear,"any+Escape"),closeOverlay:ot(e.closeOverlay,"any+Escape"),acceptOverlayDown:ot(e.acceptOverlayDown,"Enter"),acceptOverlayUp:ot(e.acceptOverlayUp,"shift+Enter"),acceptOverlayLeft:ot(e.acceptOverlayLeft,"shift+Tab"),acceptOverlayRight:ot(e.acceptOverlayRight,"Tab"),copy:e.copy,cut:e.cut,delete:ot(e.delete,t?"Backspace|Delete":"Delete"),downFill:ot(e.downFill,"primary+_68"),scrollToSelectedCell:ot(e.scrollToSelectedCell,"primary+Enter"),goDownCell:ot(e.goDownCell,"ArrowDown"),goDownCellRetainSelection:ot(e.goDownCellRetainSelection,"alt+ArrowDown"),goLeftCell:ot(e.goLeftCell,"ArrowLeft|shift+Tab"),goLeftCellRetainSelection:ot(e.goLeftCellRetainSelection,"alt+ArrowLeft"),goRightCell:ot(e.goRightCell,"ArrowRight|Tab"),goRightCellRetainSelection:ot(e.goRightCellRetainSelection,"alt+ArrowRight"),goUpCell:ot(e.goUpCell,"ArrowUp"),goUpCellRetainSelection:ot(e.goUpCellRetainSelection,"alt+ArrowUp"),goToFirstCell:ot(e.goToFirstCell,"primary+Home"),goToFirstColumn:ot(e.goToFirstColumn,"Home|primary+ArrowLeft"),goToFirstRow:ot(e.goToFirstRow,"primary+ArrowUp"),goToLastCell:ot(e.goToLastCell,"primary+End"),goToLastColumn:ot(e.goToLastColumn,"End|primary+ArrowRight"),goToLastRow:ot(e.goToLastRow,"primary+ArrowDown"),goToNextPage:ot(e.goToNextPage,"PageDown"),goToPreviousPage:ot(e.goToPreviousPage,"PageUp"),paste:e.paste,rightFill:ot(e.rightFill,"primary+_82"),search:ot(e.search,"primary+f"),selectAll:ot(e.selectAll,"primary+a"),selectColumn:ot(e.selectColumn,"ctrl+ "),selectGrowDown:ot(e.selectGrowDown,"shift+ArrowDown"),selectGrowLeft:ot(e.selectGrowLeft,"shift+ArrowLeft"),selectGrowRight:ot(e.selectGrowRight,"shift+ArrowRight"),selectGrowUp:ot(e.selectGrowUp,"shift+ArrowUp"),selectRow:ot(e.selectRow,"shift+ "),selectToFirstCell:ot(e.selectToFirstCell,"primary+shift+Home"),selectToFirstColumn:ot(e.selectToFirstColumn,"primary+shift+ArrowLeft"),selectToFirstRow:ot(e.selectToFirstRow,"primary+shift+ArrowUp"),selectToLastCell:ot(e.selectToLastCell,"primary+shift+End"),selectToLastColumn:ot(e.selectToLastColumn,"primary+shift+ArrowRight"),selectToLastRow:ot(e.selectToLastRow,"primary+shift+ArrowDown")}}function Tv(e){const t=Hp(e);return $t.useMemo(()=>{if(t===void 0)return Gu(kr);const n={...t,goToNextPage:t?.goToNextPage??t?.pageDown??kr.goToNextPage,goToPreviousPage:t?.goToPreviousPage??t?.pageUp??kr.goToPreviousPage,goToFirstCell:t?.goToFirstCell??t?.first??kr.goToFirstCell,goToLastCell:t?.goToLastCell??t?.last??kr.goToLastCell,selectToFirstCell:t?.selectToFirstCell??t?.first??kr.selectToFirstCell,selectToLastCell:t?.selectToLastCell??t?.last??kr.selectToLastCell};return Gu({...kr,...n})},[t])}function Dv(e){function t(r,i,o){if(typeof r=="number")return{headerIndex:r,isCollapsed:!1,depth:i,path:o};const l={headerIndex:r.headerIndex,isCollapsed:r.isCollapsed,depth:i,path:o};return r.subGroups!==void 0&&(l.subGroups=r.subGroups.map((a,s)=>t(a,i+1,[...o,s])).sort((a,s)=>a.headerIndex-s.headerIndex)),l}return e.map((r,i)=>t(r,0,[i])).sort((r,i)=>r.headerIndex-i.headerIndex)}function as(e,t){const n=[];function r(a,s,u=!1){let c=s!==null?s-a.headerIndex:t-a.headerIndex;if(a.subGroups!==void 0&&(c=a.subGroups[0].headerIndex-a.headerIndex),c--,n.push({rowIndex:-1,headerIndex:a.headerIndex,contentIndex:-1,skip:u,isCollapsed:a.isCollapsed,depth:a.depth,path:a.path,rows:c}),a.subGroups)for(let d=0;d<a.subGroups.length;d++){const g=d<a.subGroups.length-1?a.subGroups[d+1].headerIndex:s;r(a.subGroups[d],g,u||a.isCollapsed)}}const i=Dv(e.groups);for(let a=0;a<i.length;a++){const s=a<i.length-1?i[a+1].headerIndex:null;r(i[a],s)}let o=0,l=0;for(const a of n)a.contentIndex=l,l+=a.rows,a.rowIndex=o,o+=a.isCollapsed?1:a.rows+1;return n.filter(a=>a.skip===!1).map(a=>{const{skip:s,...u}=a;return u})}function Hl(e,t){if(t===void 0||as.length===0)return{path:[e],originalIndex:e,isGroupHeader:!1,groupIndex:e,contentIndex:e,groupRows:-1};let n=e;for(const r of t){if(n===0)return{path:[...r.path,-1],originalIndex:r.headerIndex,isGroupHeader:!0,groupIndex:-1,contentIndex:-1,groupRows:r.rows};if(r.isCollapsed)n--;else{if(n<=r.rows)return{path:[...r.path,n-1],originalIndex:r.headerIndex+n,isGroupHeader:!1,groupIndex:n-1,contentIndex:r.contentIndex+n-1,groupRows:r.rows};n=n-r.rows-1}}return{path:[e],originalIndex:e,isGroupHeader:!1,groupIndex:e,contentIndex:e,groupRows:-1}}function Ov(e,t,n,r){const i=$t.useMemo(()=>e===void 0?void 0:as(e,t),[e,t]),o=$t.useMemo(()=>i?.reduce((c,d)=>(c[d.rowIndex]=d,c),{}),[i]),l=$t.useMemo(()=>i===void 0?t:i.reduce((c,d)=>c+(d.isCollapsed?1:d.rows+1),0),[i,t]),a=$t.useMemo(()=>e===void 0||typeof n=="number"&&e.height===n?n:c=>o?.[c]?e.height:typeof n=="number"?n:n(c),[o,e,n]),s=$t.useCallback(c=>{if(i===void 0)return c;let d=c;for(const g of i){if(d===0)return;if(d--,!g.isCollapsed){if(d<g.rows)return g.contentIndex+d;d-=g.rows}}return c},[i]),u=Mr(r??e?.themeOverride,$t.useCallback(c=>{if(e===void 0)return r?.(c,c,c);if(r===void 0&&e?.themeOverride===void 0)return;const{isGroupHeader:d,contentIndex:g,groupIndex:h}=Hl(c,i);return d?e.themeOverride:r?.(c,h,g)},[i,r,e]));return e===void 0?{rowHeight:a,rows:t,rowNumberMapper:s,getRowThemeOverride:u}:{rowHeight:a,rows:l,rowNumberMapper:s,getRowThemeOverride:u}}function Pv(e,t){const n=$t.useMemo(()=>e===void 0?void 0:as(e,t),[e,t]);return{getRowGroupingForPath:Jd,updateRowGroupingByPath:Zd,mapper:$t.useCallback(r=>{if(typeof r=="number")return Hl(r,n);const i=Hl(r[1],n);return{...i,originalIndex:[r[0],i.originalIndex]}},[n])}}function Zd(e,t,n){const[r,...i]=t;return i[0]===-1?e.map((o,l)=>l===r?{...o,...n}:o):e.map((o,l)=>l===r?{...o,subGroups:Zd(o.subGroups??[],i,n)}:o)}function Jd(e,t){const[n,...r]=t;return r[0]===-1?e[n]:Jd(e[n].subGroups??[],r)}function Lv(e,t){const[n]=f.useState(()=>({value:e,callback:t,facade:{get current(){return n.value},set current(r){const i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}));return n.callback=t,n.facade}function _v(e,t,n,r,i){const[o,l]=f.useMemo(()=>[t!==void 0&&typeof n=="number"?Math.floor(t/n):0,t!==void 0&&typeof n=="number"?-(t%n):0],[t,n]),a=f.useMemo(()=>({x:r.current.x,y:o,width:r.current.width??1,height:r.current.height??1,ty:l}),[r,l,o]),[s,u,c]=Ap(a),d=f.useRef(i);d.current=i;const g=Lv(null,m=>{m!==null&&t!==void 0?m.scrollTop=t:m!==null&&e!==void 0&&(m.scrollLeft=e)}),h=(s.height??1)>1;f.useLayoutEffect(()=>{if(t!==void 0&&g.current!==null&&h){if(g.current.scrollTop===t)return;g.current.scrollTop=t,g.current.scrollTop!==t&&c(),d.current()}},[t,h,c,g]);const p=(s.width??1)>1;return f.useLayoutEffect(()=>{if(e!==void 0&&g.current!==null&&p){if(g.current.scrollLeft===e)return;g.current.scrollLeft=e,g.current.scrollLeft!==e&&c(),d.current()}},[e,p,c,g]),{visibleRegion:s,setVisibleRegion:u,scrollRef:g}}const Fv=f.lazy(async()=>await Ul(()=>import("./data-grid-overlay-editor.2Ufgxc6y.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]),import.meta.url));let Av=0;function Hv(e){return Vm(_u(_u(e).filter(t=>t.span!==void 0).map(t=>Er((t.span?.[0]??0)+1,(t.span?.[1]??0)+1))))}function Xo(e,t){return e===void 0||t===0||e.columns.length===0&&e.current===void 0?e:{current:e.current===void 0?void 0:{cell:[e.current.cell[0]+t,e.current.cell[1]],range:{...e.current.range,x:e.current.range.x+t},rangeStack:e.current.rangeStack.map(n=>({...n,x:n.x+t}))},rows:e.rows,columns:e.columns.offset(t)}}const Go={kind:Z.Loading,allowOverlay:!1},Yo={columns:et.empty(),rows:et.empty(),current:void 0},zv=(e,t)=>{const[n,r]=f.useState(Yo),[i,o]=f.useState(),l=f.useRef(null),a=f.useRef(null),[s,u]=f.useState(),c=f.useRef(),d=typeof window>"u"?null:window,{imageEditorOverride:g,getRowThemeOverride:h,markdownDivCreateNode:p,width:m,height:y,columns:b,rows:v,getCellContent:x,onCellClicked:E,onCellActivated:M,onFillPattern:I,onFinishedEditing:L,coercePasteValue:S,drawHeader:C,drawCell:_,editorBloom:D,onHeaderClicked:k,onColumnProposeMove:T,rangeSelectionColumnSpanning:O=!0,spanRangeBehavior:R="default",onGroupHeaderClicked:N,onCellContextMenu:q,className:Y,onHeaderContextMenu:oe,getCellsForSelection:Q,onGroupHeaderContextMenu:re,onGroupHeaderRenamed:ue,onCellEdited:ae,onCellsEdited:de,onSearchResultsChanged:he,searchResults:ce,onSearchValueChange:H,searchValue:P,onKeyDown:G,onKeyUp:se,keybindings:le,editOnType:ve=!0,onRowAppended:ge,onColumnAppended:Je,onColumnMoved:ke,validateCell:Pt,highlightRegions:xt,rangeSelect:Oe="rect",columnSelect:te="multi",rowSelect:me="multi",rangeSelectionBlending:we="exclusive",columnSelectionBlending:ne="exclusive",rowSelectionBlending:ye="exclusive",onDelete:Pe,onDragStart:Ee,onMouseMove:st,onPaste:_e,copyHeaders:Ge=!1,freezeColumns:Te=0,cellActivationBehavior:Re="second-click",rowSelectionMode:He="auto",columnSelectionMode:ht="auto",onHeaderMenuClick:tt,onHeaderIndicatorClick:Ye,getGroupDetails:gt,rowGrouping:qt,onSearchClose:Dt,onItemHovered:ct,onSelectionCleared:jt,showSearch:Kt,onVisibleRegionChanged:Dn,gridSelection:It,onGridSelectionChange:pt,minColumnWidth:On=50,maxColumnWidth:Ct=500,maxColumnAutoWidth:un,provideEditor:gn,trailingRowOptions:Ie,freezeTrailingRows:mt=0,allowedFillDirections:Tt="orthogonal",scrollOffsetX:dn,scrollOffsetY:Bt,verticalBorder:rn,onDragOverCell:Pn,onDrop:on,onColumnResize:Zt,onColumnResizeEnd:Ue,onColumnResizeStart:kt,customRenderers:Rn,fillHandle:Lt,experimental:bt,fixedShadowX:Cn,fixedShadowY:er,headerIcons:tr,imageWindowLoader:B,initialSize:ze,isDraggable:qe,onDragLeave:Ot,onRowMoved:an,overscrollX:fn,overscrollY:In,preventDiagonalScrolling:pn,rightElement:Wt,rightElementProps:En,trapFocus:Sn=!1,smoothScrollX:_i,smoothScrollY:ti,scaleToRem:Lr=!1,rowHeight:Ce=34,headerHeight:wt=36,groupHeaderHeight:At=wt,theme:zn,isOutsideClick:Tn,renderers:Jt,resizeIndicator:Xt,scrollToActiveCell:hn=!0,drawFocusRing:Wn=!0,portalElementRef:ko}=e,ni=Wn==="no-editor"?i===void 0:Wn,Un=typeof e.rowMarkers=="string"?void 0:e.rowMarkers,xn=Un?.kind??e.rowMarkers??"none",ri=Un?.width??e.rowMarkerWidth,sr=Un?.startIndex??e.rowMarkerStartIndex??1,ii=Un?.theme??e.rowMarkerTheme,mr=Un?.headerTheme,oi=Un?.headerAlwaysVisible,ai=me!=="multi"||Un?.headerDisabled===!0,_r=Un?.checkboxStyle??"square",vr=Math.max(On,20),li=Math.max(Ct,vr),Ea=Math.max(un??li,vr),Fi=f.useMemo(()=>typeof window>"u"?{fontSize:"16px"}:window.getComputedStyle(document.documentElement),[]),{rows:Ve,rowNumberMapper:Ai,rowHeight:Mo,getRowThemeOverride:Fr}=Ov(qt,v,Ce,h),Ta=f.useMemo(()=>Number.parseFloat(Fi.fontSize),[Fi]),{rowHeight:nr,headerHeight:Hi,groupHeaderHeight:Ro,theme:si,overscrollX:Da,overscrollY:Oa}=Ev({groupHeaderHeight:At,headerHeight:wt,overscrollX:fn,overscrollY:In,remSize:Ta,rowHeight:Mo,scaleToRem:Lr,theme:zn}),rr=Tv(le),br=ri??(v>1e4?48:v>1e3?44:v>100?36:32),Ln=xn!=="none",U=Ln?1:0,Ht=Ie!==void 0,ur=Ie?.sticky===!0,[Pa,Ar]=f.useState(!1),La=Kt??Pa,ui=f.useCallback(()=>{Dt!==void 0?Dt():Ar(!1)},[Dt]),j=f.useMemo(()=>It===void 0?void 0:Xo(It,U),[It,U])??n,V=f.useRef();V.current===void 0&&(V.current=new AbortController),f.useEffect(()=>()=>V?.current.abort(),[]);const[ee,xe]=fv(Q,x,U,V.current,Ve),De=f.useCallback((w,A,F)=>{if(Pt===void 0)return!0;const $=[w[0]-U,w[1]];return Pt?.($,A,F)},[U,Pt]),fe=f.useRef(It),pe=f.useCallback((w,A)=>{A&&(w=wv(w,ee,U,R,V.current)),pt!==void 0?(fe.current=Xo(w,-U),pt(fe.current)):r(w)},[pt,ee,U,R]),Xe=Mr(Zt,f.useCallback((w,A,F,$)=>{Zt?.(b[F-U],A,F-U,$)},[Zt,U,b])),Me=Mr(Ue,f.useCallback((w,A,F,$)=>{Ue?.(b[F-U],A,F-U,$)},[Ue,U,b])),Ze=Mr(kt,f.useCallback((w,A,F,$)=>{kt?.(b[F-U],A,F-U,$)},[kt,U,b])),vt=Mr(C,f.useCallback((w,A)=>C?.({...w,columnIndex:w.columnIndex-U},A)??!1,[C,U])),cn=Mr(_,f.useCallback((w,A)=>_?.({...w,col:w.col-U},A)??!1,[_,U])),Ut=f.useCallback(w=>{if(Pe!==void 0){const A=Pe(Xo(w,-U));return typeof A=="boolean"?A:Xo(A,U)}return!0},[Pe,U]),[Mt,ut,je]=dv(j,pe,we,ne,ye,Oe,O),dt=f.useMemo(()=>hr(_d(),si),[si]),[zt,ci]=f.useState([0,0,0]),Hr=f.useMemo(()=>{if(Jt===void 0)return{};const w={};for(const A of Jt)w[A.kind]=A;return w},[Jt]),Qt=f.useCallback(w=>w.kind!==Z.Custom?Hr[w.kind]:Rn?.find(A=>A.isMatch(w)),[Rn,Hr]);let{sizedColumns:ln,nonGrowWidth:_t}=Dm(b,Ve,xe,zt[0]-(U===0?0:br)-zt[2],vr,Ea,dt,Qt,V.current);xn!=="none"&&(_t+=br);const Vn=f.useMemo(()=>ln.some(w=>w.group!==void 0),[ln]),mn=Vn?Hi+Ro:Hi,di=j.rows.length,cr=xn==="none"?void 0:di===0?!1:di===Ve?!0:void 0,nt=f.useMemo(()=>xn==="none"?ln:[{title:"",width:br,icon:void 0,hasMenu:!1,style:"normal",themeOverride:ii,rowMarker:_r,rowMarkerChecked:cr,headerRowMarkerTheme:mr,headerRowMarkerAlwaysVisible:oi,headerRowMarkerDisabled:ai},...ln],[xn,ln,br,ii,_r,cr,mr,oi,ai]),en=f.useRef({height:1,width:1,x:0,y:0}),zr=f.useRef(!1),{setVisibleRegion:wr,visibleRegion:dr,scrollRef:Vt}=_v(dn,Bt,nr,en,()=>zr.current=!0);en.current=dr;const ih=dr.x+U,Io=dr.y,vn=f.useRef(null),kn=f.useCallback(w=>{w===!0?vn.current?.focus():window.requestAnimationFrame(()=>{vn.current?.focus()})},[]),bn=Ht?Ve+1:Ve,$n=f.useCallback(w=>{const A=U===0?w:w.map($=>({...$,location:[$.location[0]-U,$.location[1]]})),F=de?.(A);if(F!==!0)for(const $ of A)ae?.($.location,$.value);return F},[ae,de,U]),[Vr,_a]=f.useState(),Eo=j.current!==void 0&&j.current.range.width*j.current.range.height>1?j.current.range:void 0,Ts=ni?j.current?.cell:void 0,To=Ts?.[0],Do=Ts?.[1],oh=f.useMemo(()=>{if((xt===void 0||xt.length===0)&&(Eo??To??Do??Vr)===void 0)return;const w=[];if(xt!==void 0)for(const A of xt){const F=nt.length-A.range.x-U;F>0&&w.push({color:A.color,range:{...A.range,x:A.range.x+U,width:Math.min(F,A.range.width)},style:A.style})}return Vr!==void 0&&w.push({color:Kr(dt.accentColor,0),range:Vr,style:"dashed"}),Eo!==void 0&&w.push({color:Kr(dt.accentColor,.5),range:Eo,style:"solid-outline"}),To!==void 0&&Do!==void 0&&w.push({color:dt.accentColor,range:{x:To,y:Do,width:1,height:1},style:"solid-outline"}),w.length>0?w:void 0},[Vr,Eo,To,Do,xt,nt.length,dt.accentColor,U]),Ds=f.useRef(nt);Ds.current=nt;const _n=f.useCallback(([w,A],F=!1)=>{const $=Ht&&A===bn-1;if(w===0&&Ln){if($)return Go;const K=Ai(A);return K===void 0?Go:{kind:Bn.Marker,allowOverlay:!1,checkboxStyle:_r,checked:j?.rows.hasIndex(A)===!0,markerKind:xn==="clickable-number"?"number":xn,row:sr+K,drawHandle:an!==void 0,cursor:xn==="clickable-number"?"pointer":void 0}}else if($){const z=w===U?Ie?.hint??"":"",W=Ds.current[w];if(W?.trailingRowOptions?.disabled===!0)return Go;{const J=W?.trailingRowOptions?.hint??z,ie=W?.trailingRowOptions?.addIcon??Ie?.addIcon;return{kind:Bn.NewRow,hint:J,allowOverlay:!1,icon:ie}}}else{const K=w-U;if(F||bt?.strict===!0){const W=en.current,J=W.x>K||K>W.x+W.width||W.y>A||A>W.y+W.height||A>=za.current,ie=K===W.extras?.selected?.[0]&&A===W.extras?.selected[1];let Se=!1;if(W.extras?.freezeRegions!==void 0){for(const Rt of W.extras.freezeRegions)if(jr(Rt,K,A)){Se=!0;break}}if(J&&!ie&&!Se)return Go}let z=x([K,A]);return U!==0&&z.span!==void 0&&(z={...z,span:[z.span[0]+U,z.span[1]+U]}),z}},[Ht,bn,Ln,Ai,_r,j?.rows,xn,sr,an,U,Ie?.hint,Ie?.addIcon,bt?.strict,x]),Fa=f.useCallback(w=>{let A=gt?.(w)??{name:w};return ue!==void 0&&w!==""&&(A={icon:A.icon,name:A.name,overrideTheme:A.overrideTheme,actions:[...A.actions??[],{title:"Rename",icon:"renameIcon",onClick:F=>$a({group:A.name,bounds:F.bounds})}]}),A},[gt,ue]),Oo=f.useCallback(w=>{const[A,F]=w.cell,$=nt[A],X=$?.group!==void 0?Fa($.group)?.overrideTheme:void 0,K=$?.themeOverride,z=Fr?.(F);o({...w,theme:hr(dt,X,K,z,w.content.themeOverride)})},[Fr,nt,Fa,dt]),fi=f.useCallback((w,A,F)=>{if(j.current===void 0)return;const[$,X]=j.current.cell,K=_n([$,X]);if(K.kind!==Z.Boolean&&K.allowOverlay){let z=K;if(F!==void 0)switch(z.kind){case Z.Number:{const W=cp(()=>F==="-"?-0:Number.parseFloat(F),0);z={...z,data:Number.isNaN(W)?0:W};break}case Z.Text:case Z.Markdown:case Z.Uri:z={...z,data:F};break}Oo({target:w,content:z,initialValue:F,cell:[$,X],highlight:F===void 0,forceEditMode:F!==void 0,activation:A})}else K.kind===Z.Boolean&&A.inputType==="keyboard"&&K.readonly!==!0&&($n([{location:j.current.cell,value:{...K,data:Kd(K.data)}}]),vn.current?.damage([{cell:j.current.cell}]))},[_n,j,$n,Oo]),Os=f.useCallback((w,A)=>{const F=vn.current?.getBounds(w,A);if(F===void 0||Vt.current===null)return;const $=_n([w,A]);$.allowOverlay&&Oo({target:F,content:$,initialValue:void 0,highlight:!0,cell:[w,A],forceEditMode:!0,activation:{inputType:"keyboard",key:"Enter"}})},[_n,Vt,Oo]),Gt=f.useCallback((w,A,F="both",$=0,X=0,K=void 0)=>{if(Vt.current!==null){const z=vn.current,W=a.current,J=typeof w!="number"?w.unit==="cell"?w.amount:void 0:w,ie=typeof A!="number"?A.unit==="cell"?A.amount:void 0:A,Se=typeof w!="number"&&w.unit==="px"?w.amount:void 0,Rt=typeof A!="number"&&A.unit==="px"?A.amount:void 0;if(z!==null&&W!==null){let Qe={x:0,y:0,width:0,height:0},Ke=0,ft=0;if((J!==void 0||ie!==void 0)&&(Qe=z.getBounds((J??0)+U,ie??0)??Qe,Qe.width===0||Qe.height===0))return;const rt=W.getBoundingClientRect(),yt=rt.width/W.offsetWidth;if(Se!==void 0&&(Qe={...Qe,x:Se-rt.left-Vt.current.scrollLeft,width:1}),Rt!==void 0&&(Qe={...Qe,y:Rt+rt.top-Vt.current.scrollTop,height:1}),Qe!==void 0){const St={x:Qe.x-$,y:Qe.y-X,width:Qe.width+2*$,height:Qe.height+2*X};let bi=0;for(let Ga=0;Ga<Te;Ga++)bi+=ln[Ga].width;let Ui=0;const qi=mt+(ur?1:0);qi>0&&(Ui=ei(bn,qi,nr));let or=bi*yt+rt.left+U*br*yt,wi=rt.right,Wr=rt.top+mn*yt,yi=rt.bottom-Ui*yt;const zo=Qe.width+$*2;switch(K?.hAlign){case"start":wi=or+zo;break;case"end":or=wi-zo;break;case"center":or=Math.floor((or+wi)/2)-zo/2,wi=or+zo;break}const Vo=Qe.height+X*2;switch(K?.vAlign){case"start":yi=Wr+Vo;break;case"end":Wr=yi-Vo;break;case"center":Wr=Math.floor((Wr+yi)/2)-Vo/2,yi=Wr+Vo;break}or>St.x?Ke=St.x-or:wi<St.x+St.width&&(Ke=St.x+St.width-wi),Wr>St.y?ft=St.y-Wr:yi<St.y+St.height&&(ft=St.y+St.height-yi),F==="vertical"||typeof w=="number"&&w<Te?Ke=0:(F==="horizontal"||typeof A=="number"&&A>=bn-qi)&&(ft=0),(Ke!==0||ft!==0)&&(yt!==1&&(Ke/=yt,ft/=yt),Vt.current.scrollTo({left:Ke+Vt.current.scrollLeft,top:ft+Vt.current.scrollTop,behavior:K?.behavior??"auto"}))}}}},[U,mt,br,Vt,mn,Te,ln,bn,ur,nr]),Aa=f.useRef(Os),Ha=f.useRef(x);Aa.current=Os,Ha.current=x;const za=f.useRef(Ve);za.current=Ve;const Ps=f.useRef(nt.length);Ps.current=nt.length;const yr=f.useCallback(async(w,A=!0,F)=>{if(nt[w]?.trailingRowOptions?.disabled===!0)return;const X=ge?.();let K,z=!0;X!==void 0&&(K=await X,K==="top"&&(z=!1),typeof K=="number"&&(z=!1));let W=0;const J=()=>{if(za.current<=Ve){W<500&&window.setTimeout(J,W),W=50+W*2;return}const ie=typeof K=="number"?K:z?Ve:0;Ho.current(w-U,ie,"both",0,0,F?{behavior:F}:void 0),Mt({cell:[w,ie],range:{x:w,y:ie,width:1,height:1}},!1,!1,"edit");const Se=Ha.current([w-U,ie]);Se.allowOverlay&&ki(Se)&&Se.readonly!==!0&&A&&window.setTimeout(()=>{Aa.current(w,ie)},0)};J()},[nt,ge,U,Ve,Mt]),Po=f.useCallback(async(w,A=!0)=>{const F=Je?.();let $,X=!0;F!==void 0&&($=await F,$==="left"&&(X=!1),typeof $=="number"&&(X=!1));let K=0;const z=()=>{if(Ps.current<=nt.length){K<500&&window.setTimeout(z,K),K=50+K*2;return}const W=typeof $=="number"?$:X?nt.length:0;Gt(W-U,w),Mt({cell:[W,w],range:{x:W,y:w,width:1,height:1}},!1,!1,"edit");const J=Ha.current([W-U,w]);J.allowOverlay&&ki(J)&&J.readonly!==!0&&A&&window.setTimeout(()=>{Aa.current(W,w)},0)};z()},[nt,Je,U,Gt,Mt]),hi=f.useCallback(w=>{const A=ln[w]?.trailingRowOptions?.targetColumn??Ie?.targetColumn;if(typeof A=="number")return A+(Ln?1:0);if(typeof A=="object"){const F=b.indexOf(A);if(F>=0)return F+(Ln?1:0)}},[ln,b,Ln,Ie?.targetColumn]),Cr=f.useRef(),gi=f.useRef(),zi=f.useCallback((w,A)=>{const[F,$]=A;return hr(dt,nt[F]?.themeOverride,Fr?.($),w.themeOverride)},[Fr,nt,dt]),{mapper:$r}=Pv(qt,v),qn=qt?.navigationBehavior,Vi=f.useCallback(w=>{const A=fa.value?w.metaKey:w.ctrlKey,F=A&&me==="multi",[$,X]=w.location,K=j.columns,z=j.rows,[W,J]=j.current?.cell??[];if(w.kind==="cell"){if(gi.current=void 0,Nr.current=[$,X],$===0&&Ln){if(Ht===!0&&X===Ve||xn==="number"||me==="none")return;const ie=_n(w.location);if(ie.kind!==Bn.Marker)return;if(an!==void 0){const Qe=Qt(ie);An(Qe?.kind===Bn.Marker);const Ke=Qe?.onClick?.({...w,cell:ie,posX:w.localEventX,posY:w.localEventY,bounds:w.bounds,theme:zi(ie,w.location),preventDefault:()=>{}});if(Ke===void 0||Ke.checked===ie.checked)return}o(void 0),kn();const Se=z.hasIndex(X),Rt=Cr.current;if(me==="multi"&&(w.shiftKey||w.isLongTouch===!0)&&Rt!==void 0&&z.hasIndex(Rt)){const Qe=[Math.min(Rt,X),Math.max(Rt,X)+1];F||He==="multi"?ut(void 0,Qe,!0):ut(et.fromSingleSelection(Qe),void 0,F)}else me==="multi"&&(F||w.isTouch||He==="multi")?Se?ut(z.remove(X),void 0,!0):(ut(void 0,X,!0),Cr.current=X):Se&&z.length===1?ut(et.empty(),void 0,A):(ut(et.fromSingleSelection(X),void 0,A),Cr.current=X)}else if($>=U&&Ht&&X===Ve){const ie=hi($);yr(ie??$)}else if(W!==$||J!==X){const ie=_n(w.location),Se=Qt(ie);if(Se?.onSelect!==void 0){let Ke=!1;if(Se.onSelect({...w,cell:ie,posX:w.localEventX,posY:w.localEventY,bounds:w.bounds,preventDefault:()=>Ke=!0,theme:zi(ie,w.location)}),Ke)return}if(qn==="block"&&$r(X).isGroupHeader)return;const Rt=ur&&X===Ve,Qe=ur&&j!==void 0&&j.current?.cell[1]===Ve;if((w.shiftKey||w.isLongTouch===!0)&&W!==void 0&&J!==void 0&&j.current!==void 0&&!Qe){if(Rt)return;const Ke=Math.min($,W),ft=Math.max($,W),rt=Math.min(X,J),yt=Math.max(X,J);Mt({...j.current,range:{x:Ke,y:rt,width:ft-Ke+1,height:yt-rt+1}},!0,A,"click"),Cr.current=void 0,kn()}else Mt({cell:[$,X],range:{x:$,y:X,width:1,height:1}},!0,A,"click"),Cr.current=void 0,o(void 0),kn()}}else if(w.kind==="header")if(Nr.current=[$,X],o(void 0),Ln&&$===0)Cr.current=void 0,gi.current=void 0,!ai&&me==="multi"&&(z.length!==Ve?ut(et.fromSingleSelection([0,Ve]),void 0,A):ut(et.empty(),void 0,A),kn());else{const ie=gi.current;if(te==="multi"&&(w.shiftKey||w.isLongTouch===!0)&&ie!==void 0&&K.hasIndex(ie)){const Se=[Math.min(ie,$),Math.max(ie,$)+1];A||w.isTouch||ht==="multi"?je(void 0,Se,A):je(et.fromSingleSelection(Se),void 0,A)}else te==="multi"&&(A||w.isTouch||ht==="multi")?(K.hasIndex($)?je(K.remove($),void 0,A):je(void 0,$,A),gi.current=$):te!=="none"&&(K.hasIndex($)?je(K.remove($),void 0,A):je(et.fromSingleSelection($),void 0,A),gi.current=$);Cr.current=void 0,kn()}else w.kind===jn?Nr.current=[$,X]:w.kind===ha&&!w.isMaybeScrollbar&&(pe(Yo,!1),o(void 0),kn(),jt?.(),Cr.current=void 0,gi.current=void 0)},[me,te,j,Ln,U,Ht,Ve,xn,_n,an,kn,He,ht,Qt,zi,ut,hi,yr,qn,$r,ur,Mt,ai,je,pe,jt]),$i=f.useRef(!1),Nr=f.useRef(),Ls=f.useRef(dr),ir=f.useRef(),ah=f.useCallback(w=>{if(pi.current=!1,Ls.current=en.current,w.button!==0&&w.button!==1){ir.current=void 0;return}const A=performance.now();ir.current={button:w.button,time:A,location:w.location},w?.kind==="header"&&($i.current=!0);const F=w.kind==="cell"&&w.isFillHandle;!F&&w.kind!=="cell"&&w.isEdge||(u({previousSelection:j,fillHandle:F}),Nr.current=void 0,!w.isTouch&&w.button===0&&!F?Vi(w):!w.isTouch&&w.button===1&&(Nr.current=w.location))},[j,Vi]),[Va,$a]=f.useState(),_s=f.useCallback(w=>{if(w.kind!==jn||te!=="multi")return;const A=fa.value?w.metaKey:w.ctrlKey,[F]=w.location,$=j.columns;if(F<U)return;const X=nt[F];let K=F,z=F;for(let W=F-1;W>=U&&po(X.group,nt[W].group);W--)K--;for(let W=F+1;W<nt.length&&po(X.group,nt[W].group);W++)z++;if(kn(),A||w.isTouch||ht==="multi")if($.hasAll([K,z+1])){let W=$;for(let J=K;J<=z;J++)W=W.remove(J);je(W,void 0,A)}else je(void 0,[K,z+1],A);else je(et.fromSingleSelection([K,z+1]),void 0,A)},[te,kn,j.columns,nt,U,je,ht]),pi=f.useRef(!1),Lo=f.useCallback(async w=>{if(ee!==void 0&&Xe!==void 0){const A=en.current.y,F=en.current.height;let $=ee({x:w,y:A,width:1,height:Math.min(F,Ve-A)},V.current.signal);typeof $!="object"&&($=await $());const X=ln[w-U],z=document.createElement("canvas").getContext("2d",{alpha:!1});if(z!==null){z.font=dt.baseFontFull;const W=Hd(z,dt,X,0,$,vr,li,!1,Qt);Xe?.(X,W.width,w,W.width)}}},[ln,ee,li,dt,vr,Xe,U,Ve,Qt]),[lh,Na]=f.useState(),mi=f.useCallback(async(w,A)=>{const F=w.current?.range;if(F===void 0||ee===void 0||A.current===void 0)return;const $=A.current.range;if(I!==void 0){let W=!1;if(I({fillDestination:{...$,x:$.x-U},patternSource:{...F,x:F.x-U},preventDefault:()=>W=!0}),W)return}let X=ee(F,V.current.signal);typeof X!="object"&&(X=await X());const K=X,z=[];for(let W=0;W<$.width;W++)for(let J=0;J<$.height;J++){const ie=[$.x+W,$.y+J];if(Md(ie,F))continue;const Se=K[J%F.height][W%F.width];Ri(Se)||!ki(Se)||z.push({location:ie,value:{...Se}})}$n(z),vn.current?.damage(z.map(W=>({cell:W.location})))},[ee,$n,I,U]),Fs=f.useCallback(()=>{if(j.current===void 0||j.current.range.width<=1)return;const w={...j,current:{...j.current,range:{...j.current.range,width:1}}};mi(w,j)},[mi,j]),As=f.useCallback(()=>{if(j.current===void 0||j.current.range.height<=1)return;const w={...j,current:{...j.current,range:{...j.current.range,height:1}}};mi(w,j)},[mi,j]),sh=f.useCallback((w,A)=>{const F=s;if(u(void 0),_a(void 0),Na(void 0),$i.current=!1,A)return;if(F?.fillHandle===!0&&j.current!==void 0&&F.previousSelection?.current!==void 0){if(Vr===void 0)return;const Se={...j,current:{...j.current,range:Bd(F.previousSelection.current.range,Vr)}};mi(F.previousSelection,Se),pe(Se,!0);return}const[$,X]=w.location,[K,z]=Nr.current??[],W=()=>{pi.current=!0},J=Se=>{const Rt=Se.isTouch||K===$&&z===X;if(Rt&&E?.([$-U,X],{...Se,preventDefault:W}),Se.button===1)return!pi.current;if(!pi.current){const Qe=_n(w.location),Ke=Qt(Qe);if(Ke!==void 0&&Ke.onClick!==void 0&&Rt){const rt=Ke.onClick({...Se,cell:Qe,posX:Se.localEventX,posY:Se.localEventY,bounds:Se.bounds,theme:zi(Qe,w.location),preventDefault:W});rt!==void 0&&!Ri(rt)&&xi(rt)&&($n([{location:Se.location,value:rt}]),vn.current?.damage([{cell:Se.location}]))}if(pi.current||j.current===void 0)return!1;let ft=!1;switch(Qe.activationBehaviorOverride??Re){case"double-click":case"second-click":{if(F?.previousSelection?.current?.cell===void 0)break;const[rt,yt]=j.current.cell,[St,bi]=F.previousSelection.current.cell;ft=$===rt&&$===St&&X===yt&&X===bi&&(Se.isDoubleClick===!0||Re==="second-click");break}case"single-click":{ft=!0;break}}if(ft){const yt={inputType:"pointer",pointerActivation:Se.isDoubleClick===!0?"double-click":Qe.activationBehaviorOverride??Re,pointerType:Se.isTouch?"touch":"mouse"};return M?.([$-U,X],yt),fi(Se.bounds,yt),!0}}return!1},ie=w.location[0]-U;if(w.isTouch){const Se=en.current,Rt=Ls.current;if(Se.x!==Rt.x||Se.y!==Rt.y)return;if(w.isLongTouch===!0){if(w.kind==="cell"&&uo(j.current?.cell,w.location)){q?.([ie,w.location[1]],{...w,preventDefault:W});return}else if(w.kind==="header"&&j.columns.hasIndex($)){oe?.(ie,{...w,preventDefault:W});return}else if(w.kind===jn){if(ie<0)return;re?.(ie,{...w,preventDefault:W});return}}w.kind==="cell"?J(w)||Vi(w):w.kind===jn?N?.(ie,{...w,preventDefault:W}):(w.kind===Rr&&k?.(ie,{...w,preventDefault:W}),Vi(w));return}if(w.kind==="header"){if(ie<0)return;w.isEdge?w.isDoubleClick===!0&&Lo($):w.button===0&&$===K&&X===z&&k?.(ie,{...w,preventDefault:W})}if(w.kind===jn){if(ie<0)return;w.button===0&&$===K&&X===z&&(N?.(ie,{...w,preventDefault:W}),pi.current||_s(w))}w.kind==="cell"&&(w.button===0||w.button===1)&&J(w),Nr.current=void 0},[s,j,U,Vr,mi,pe,E,_n,Qt,Re,zi,$n,M,fi,q,oe,re,Vi,N,k,Lo,_s]),uh=f.useCallback(w=>{const A={...w,location:[w.location[0]-U,w.location[1]]};st?.(A),s!==void 0&&w.buttons===0&&(u(void 0),_a(void 0),Na(void 0),$i.current=!1),Na(F=>$i.current?[w.scrollEdge[0],0]:w.scrollEdge[0]===F?.[0]&&w.scrollEdge[1]===F[1]?F:s===void 0||(ir.current?.location[0]??0)<U?void 0:w.scrollEdge)},[s,st,U]),ch=f.useCallback((w,A)=>{tt?.(w-U,A)},[tt,U]),dh=f.useCallback((w,A)=>{Ye?.(w-U,A)},[Ye,U]),vi=j?.current?.cell,fh=f.useCallback((w,A,F,$,X,K)=>{zr.current=!1;let z=vi;z!==void 0&&(z=[z[0]-U,z[1]]);const W=Te===0?void 0:{x:0,y:w.y,width:Te,height:w.height},J=[];W!==void 0&&J.push(W),mt>0&&(J.push({x:w.x-U,y:Ve-mt,width:w.width,height:mt}),Te>0&&J.push({x:0,y:Ve-mt,width:Te,height:mt}));const ie={x:w.x-U,y:w.y,width:w.width,height:Ht&&w.y+w.height>=Ve?w.height-1:w.height,tx:X,ty:K,extras:{selected:z,freezeRegion:W,freezeRegions:J}};en.current=ie,wr(ie),ci([A,F,$]),Dn?.(ie,ie.tx,ie.ty,ie.extras)},[vi,U,Ht,Ve,Te,mt,wr,Dn]),hh=Mr(T,f.useCallback((w,A)=>T?.(w-U,A-U)!==!1,[T,U])),gh=Mr(ke,f.useCallback((w,A)=>{ke?.(w-U,A-U),te!=="none"&&je(et.fromSingleSelection(A),void 0,!0)},[te,ke,U,je])),Ba=f.useRef(!1),ph=f.useCallback(w=>{if(w.location[0]===0&&U>0){w.preventDefault();return}Ee?.({...w,location:[w.location[0]-U,w.location[1]]}),w.defaultPrevented()||(Ba.current=!0),u(void 0)},[Ee,U]),mh=f.useCallback(()=>{Ba.current=!1},[]),Hs=qt?.selectionBehavior,_o=f.useCallback(w=>{if(Hs!=="block-spanning")return;const{isGroupHeader:A,path:F,groupRows:$}=$r(w);if(A)return[w,w];const X=F[F.length-1],K=w-X,z=w+$-X-1;return[K,z]},[$r,Hs]),Wa=f.useRef(),Ua=f.useCallback(w=>{if(!Yd(w,Wa.current)&&(Wa.current=w,!(ir?.current?.button!==void 0&&ir.current.button>=1))){if(w.buttons!==0&&s!==void 0&&ir.current?.location[0]===0&&U===1&&me==="multi"&&s.previousSelection&&!s.previousSelection.rows.hasIndex(ir.current.location[1])&&j.rows.hasIndex(ir.current.location[1])){const A=Math.min(ir.current.location[1],w.location[1]),F=Math.max(ir.current.location[1],w.location[1])+1;ut(et.fromSingleSelection([A,F]),void 0,!1)}else if(w.buttons!==0&&s!==void 0&&j.current!==void 0&&!Ba.current&&!$i.current&&(Oe==="rect"||Oe==="multi-rect")){const[A,F]=j.current.cell;let[$,X]=w.location;if(X<0&&(X=en.current.y),s.fillHandle===!0&&s.previousSelection?.current!==void 0){const K=s.previousSelection.current.range;X=Math.min(X,Ht?Ve-1:Ve);const z=b0(K,$,X,Tt);_a(z)}else{if(Ht&&F===Ve)return;if(Ht&&X===Ve)if(w.kind===ha)X--;else return;$=Math.max($,U);const W=_o(F);X=W===void 0?X:Nn(X,W[0],W[1]);const J=$-A,ie=X-F,Se={x:J>=0?A:$,y:ie>=0?F:X,width:Math.abs(J)+1,height:Math.abs(ie)+1};Mt({...j.current,range:Se},!0,!1,"drag")}}ct?.({...w,location:[w.location[0]-U,w.location[1]]})}},[s,U,me,j,Oe,ct,ut,Ht,Ve,Tt,_o,Mt]),vh=f.useCallback(()=>{const w=Wa.current;if(w===void 0)return;const[A,F]=w.scrollEdge;let[$,X]=w.location;const K=en.current;A===-1?$=K.extras?.freezeRegion?.x??K.x:A===1&&($=K.x+K.width),F===-1?X=Math.max(0,K.y):F===1&&(X=Math.min(Ve-1,K.y+K.height)),$=Nn($,0,nt.length-1),X=Nn(X,0,Ve-1),Ua({...w,location:[$,X]})},[nt.length,Ua,Ve]);Iv(lh,Vt,vh);const Xn=f.useCallback(w=>{if(j.current===void 0)return;const[A,F]=w,[$,X]=j.current.cell,K=j.current.range;let z=K.x,W=K.x+K.width,J=K.y,ie=K.y+K.height;const[Se,Rt]=_o(X)??[0,Ve-1],Qe=Rt+1;if(F!==0)switch(F){case 2:{ie=Qe,J=X,Gt(0,ie,"vertical");break}case-2:{J=Se,ie=X+1,Gt(0,J,"vertical");break}case 1:{J<X?(J++,Gt(0,J,"vertical")):(ie=Math.min(Qe,ie+1),Gt(0,ie,"vertical"));break}case-1:{ie>X+1?(ie--,Gt(0,ie,"vertical")):(J=Math.max(Se,J-1),Gt(0,J,"vertical"));break}default:ho()}if(A!==0)if(A===2)W=nt.length,z=$,Gt(W-1-U,0,"horizontal");else if(A===-2)z=U,W=$+1,Gt(z-U,0,"horizontal");else{let Ke=[];if(ee!==void 0){const ft=ee({x:z,y:J,width:W-z-U,height:ie-J},V.current.signal);typeof ft=="object"&&(Ke=Hv(ft))}if(A===1){let ft=!1;if(z<$){if(Ke.length>0){const rt=Er(z+1,$+1).find(yt=>!Ke.includes(yt-U));rt!==void 0&&(z=rt,ft=!0)}else z++,ft=!0;ft&&Gt(z,0,"horizontal")}ft||(W=Math.min(nt.length,W+1),Gt(W-1-U,0,"horizontal"))}else if(A===-1){let ft=!1;if(W>$+1){if(Ke.length>0){const rt=Er(W-1,$,-1).find(yt=>!Ke.includes(yt-U));rt!==void 0&&(W=rt,ft=!0)}else W--,ft=!0;ft&&Gt(W-U,0,"horizontal")}ft||(z=Math.max(U,z-1),Gt(z-U,0,"horizontal"))}else ho()}Mt({cell:j.current.cell,range:{x:z,y:J,width:W-z,height:ie-J}},!0,!1,"keyboard-select")},[ee,_o,j,nt.length,U,Ve,Gt,Mt]),qa=f.useRef(hn);qa.current=hn;const Sr=f.useCallback((w,A,F,$)=>{const X=bn-(F?0:1);w=Nn(w,U,ln.length-1+U),A=Nn(A,0,X);const K=vi?.[0],z=vi?.[1];if(w===K&&A===z)return!1;if($&&j.current!==void 0){const W=[...j.current.rangeStack];(j.current.range.width>1||j.current.range.height>1)&&W.push(j.current.range),pe({...j,current:{cell:[w,A],range:{x:w,y:A,width:1,height:1},rangeStack:W}},!0)}else Mt({cell:[w,A],range:{x:w,y:A,width:1,height:1}},!0,!1,"keyboard-nav");return c.current!==void 0&&c.current[0]===w&&c.current[1]===A&&(c.current=void 0),qa.current&&Gt(w-U,A),!0},[bn,U,ln.length,vi,j,Gt,pe,Mt]),bh=f.useCallback((w,A)=>{i?.cell!==void 0&&w!==void 0&&xi(w)&&($n([{location:i.cell,value:w}]),window.requestAnimationFrame(()=>{vn.current?.damage([{cell:i.cell}])})),kn(!0),o(void 0);const[F,$]=A;if(j.current!==void 0&&(F!==0||$!==0)){const X=j.current.cell[1]===bn-1&&w!==void 0,K=j.current.cell[0]===nt.length-1&&w!==void 0;let z=!0;if(X&&$===1&&ge!==void 0){z=!1;const W=j.current.cell[0]+F,J=hi(W);yr(J??W,!1)}if(K&&F===1&&Je!==void 0){z=!1;const W=j.current.cell[1]+$;Po(W,!1)}z&&Sr(Nn(j.current.cell[0]+F,0,nt.length-1),Nn(j.current.cell[1]+$,0,bn-1),X,!1)}L?.(w,A)},[i?.cell,kn,j,L,$n,bn,Sr,nt.length,yr,Po,ge,Je,hi]),wh=f.useMemo(()=>`gdg-overlay-${Av++}`,[]),Br=f.useCallback(w=>{kn();const A=[];for(let F=w.x;F<w.x+w.width;F++)for(let $=w.y;$<w.y+w.height;$++){const X=x([F-U,$]);if(!X.allowOverlay&&X.kind!==Z.Boolean)continue;let K;if(X.kind===Z.Custom){const z=Qt(X),W=z?.provideEditor?.({...X,location:[F-U,$]});z?.onDelete!==void 0?K=z.onDelete(X):dp(W)&&(K=W?.deletedValue?.(X))}else(xi(X)&&X.allowOverlay||X.kind===Z.Boolean)&&(K=Qt(X)?.onDelete?.(X));K!==void 0&&!Ri(K)&&xi(K)&&A.push({location:[F,$],value:K})}$n(A),vn.current?.damage(A.map(F=>({cell:F.location})))},[kn,x,Qt,$n,U]),Ni=i!==void 0,zs=f.useCallback(w=>{const A=()=>{w.stopPropagation(),w.preventDefault()},F={didMatch:!1},{bounds:$}=w,X=j.columns,K=j.rows,z=rr;if(!Ni&&it(z.clear,w,F))pe(Yo,!1),jt?.();else if(!Ni&&it(z.selectAll,w,F))pe({columns:et.empty(),rows:et.empty(),current:{cell:j.current?.cell??[U,0],range:{x:U,y:0,width:b.length,height:Ve},rangeStack:[]}},!1);else if(it(z.search,w,F))l?.current?.focus({preventScroll:!0}),Ar(!0);else if(it(z.delete,w,F)){const rt=Ut?.(j)??!0;if(rt!==!1){const yt=rt===!0?j:rt;if(yt.current!==void 0){Br(yt.current.range);for(const St of yt.current.rangeStack)Br(St)}for(const St of yt.rows)Br({x:U,y:St,width:b.length,height:1});for(const St of yt.columns)Br({x:St,y:0,width:1,height:Ve})}}if(F.didMatch)return A(),!0;if(j.current===void 0)return!1;let[W,J]=j.current.cell;const[,ie]=j.current.cell;let Se=!1,Rt=!1;if(it(z.scrollToSelectedCell,w,F))Ho.current(W-U,J);else if(te!=="none"&&it(z.selectColumn,w,F))X.hasIndex(W)?je(X.remove(W),void 0,!0):te==="single"?je(et.fromSingleSelection(W),void 0,!0):je(void 0,W,!0);else if(me!=="none"&&it(z.selectRow,w,F))K.hasIndex(J)?ut(K.remove(J),void 0,!0):me==="single"?ut(et.fromSingleSelection(J),void 0,!0):ut(void 0,J,!0);else if(!Ni&&$!==void 0&&it(z.activateCell,w,F))if(J===Ve&&Ht)window.setTimeout(()=>{const rt=hi(W);yr(rt??W)},0);else{const rt={inputType:"keyboard",key:w.key};M?.([W-U,J],rt),fi($,rt)}else j.current.range.height>1&&it(z.downFill,w,F)?As():j.current.range.width>1&&it(z.rightFill,w,F)?Fs():it(z.goToNextPage,w,F)?J+=Math.max(1,en.current.height-4):it(z.goToPreviousPage,w,F)?J-=Math.max(1,en.current.height-4):it(z.goToFirstCell,w,F)?(o(void 0),J=0,W=0):it(z.goToLastCell,w,F)?(o(void 0),J=Number.MAX_SAFE_INTEGER,W=Number.MAX_SAFE_INTEGER):it(z.selectToFirstCell,w,F)?(o(void 0),Xn([-2,-2])):it(z.selectToLastCell,w,F)?(o(void 0),Xn([2,2])):Ni?(it(z.closeOverlay,w,F)&&o(void 0),it(z.acceptOverlayDown,w,F)&&(o(void 0),J++),it(z.acceptOverlayUp,w,F)&&(o(void 0),J--),it(z.acceptOverlayLeft,w,F)&&(o(void 0),W--),it(z.acceptOverlayRight,w,F)&&(o(void 0),W++)):(it(z.goDownCell,w,F)?J+=1:it(z.goUpCell,w,F)?J-=1:it(z.goRightCell,w,F)?W+=1:it(z.goLeftCell,w,F)?W-=1:it(z.goDownCellRetainSelection,w,F)?(J+=1,Se=!0):it(z.goUpCellRetainSelection,w,F)?(J-=1,Se=!0):it(z.goRightCellRetainSelection,w,F)?(W+=1,Se=!0):it(z.goLeftCellRetainSelection,w,F)?(W-=1,Se=!0):it(z.goToLastRow,w,F)?J=Ve-1:it(z.goToFirstRow,w,F)?J=Number.MIN_SAFE_INTEGER:it(z.goToLastColumn,w,F)?W=Number.MAX_SAFE_INTEGER:it(z.goToFirstColumn,w,F)?W=Number.MIN_SAFE_INTEGER:(Oe==="rect"||Oe==="multi-rect")&&(it(z.selectGrowDown,w,F)?Xn([0,1]):it(z.selectGrowUp,w,F)?Xn([0,-1]):it(z.selectGrowRight,w,F)?Xn([1,0]):it(z.selectGrowLeft,w,F)?Xn([-1,0]):it(z.selectToLastRow,w,F)?Xn([0,2]):it(z.selectToFirstRow,w,F)?Xn([0,-2]):it(z.selectToLastColumn,w,F)?Xn([2,0]):it(z.selectToFirstColumn,w,F)&&Xn([-2,0])),Rt=F.didMatch);if(qn!==void 0&&qn!=="normal"&&J!==ie){const rt=qn==="skip-up"||qn==="skip"||qn==="block",yt=qn==="skip-down"||qn==="skip"||qn==="block",St=J<ie;if(St&&rt){for(;J>=0&&$r(J).isGroupHeader;)J--;J<0&&(J=ie)}else if(!St&&yt){for(;J<Ve&&$r(J).isGroupHeader;)J++;J>=Ve&&(J=ie)}}const Ke=Sr(W,J,!1,Se),ft=F.didMatch;return ft&&(Ke||!Rt||Sn)&&A(),ft},[qn,Ni,j,rr,te,me,Oe,U,$r,Ve,Sr,pe,jt,b.length,Ut,Sn,Br,je,ut,Ht,hi,yr,M,fi,As,Fs,Xn]),Bi=f.useCallback(w=>{let A=!1;if(G!==void 0&&G({...w,...w.location&&{location:[w.location[0]-U,w.location[1]]},cancel:()=>{A=!0}}),A||zs(w)||j.current===void 0)return;const[F,$]=j.current.cell,X=en.current;if(ve&&!w.metaKey&&!w.ctrlKey&&j.current!==void 0&&w.key.length===1&&/[\p{L}\p{M}\p{N}\p{S}\p{P}]/u.test(w.key)&&w.bounds!==void 0&&ki(x([F-U,Math.max(0,Math.min($,Ve-1))]))){if((!Ht||$!==Ve)&&(X.y>$||$>X.y+X.height||X.x>F||F>X.x+X.width))return;const K={inputType:"keyboard",key:w.key};M?.([F-U,$],K),fi(w.bounds,K,w.key),w.stopPropagation(),w.preventDefault()}},[ve,G,zs,j,x,U,Ve,Ht,M,fi]),yh=f.useCallback((w,A)=>{const F=w.location[0]-U;if(w.kind==="header"&&oe?.(F,{...w,preventDefault:A}),w.kind===jn){if(F<0)return;re?.(F,{...w,preventDefault:A})}if(w.kind==="cell"){const[$,X]=w.location;q?.([F,X],{...w,preventDefault:A}),gm(j,w.location)||Sr($,X,!1,!1)}},[j,q,re,oe,U,Sr]),Xa=f.useCallback(async w=>{if(!rr.paste)return;function A(z,W,J,ie){const Se=typeof J=="object"?J?.join(`
|
|
173
|
-
`)??"":J?.toString()??"";if(!Ri(z)&&ki(z)&&z.readonly!==!0){const Rt=S?.(Se,z);if(Rt!==void 0&&xi(Rt))return{location:W,value:Rt};const Qe=Qt(z);if(Qe===void 0)return;if(Qe.kind===Z.Custom){An(z.kind===Z.Custom);const Ke=Qe.onPaste?.(Se,z.data);return Ke===void 0?void 0:{location:W,value:{...z,data:Ke}}}else{const Ke=Qe.onPaste?.(Se,z,{formatted:ie,formattedString:typeof ie=="string"?ie:ie?.join(`
|
|
174
|
-
`),rawValue:J});return Ke===void 0?void 0:(An(Ke.kind===z.kind),{location:W,value:Ke})}}}const F=j.columns,$=j.rows,X=Vt.current?.contains(document.activeElement)===!0||a.current?.contains(document.activeElement)===!0;let K;if(j.current!==void 0?K=[j.current.range.x,j.current.range.y]:F.length===1?K=[F.first()??0,0]:$.length===1&&(K=[U,$.first()??0]),X&&K!==void 0){let z,W;const J="text/plain",ie="text/html";if(navigator.clipboard.read!==void 0){const Ke=await navigator.clipboard.read();for(const ft of Ke){if(ft.types.includes(ie)){const yt=await(await ft.getType(ie)).text(),St=Wu(yt);if(St!==void 0){z=St;break}}ft.types.includes(J)&&(W=await(await ft.getType(J)).text())}}else if(navigator.clipboard.readText!==void 0)W=await navigator.clipboard.readText();else if(w!==void 0&&w?.clipboardData!==null){if(w.clipboardData.types.includes(ie)){const Ke=w.clipboardData.getData(ie);z=Wu(Ke)}z===void 0&&w.clipboardData.types.includes(J)&&(W=w.clipboardData.getData(J))}else return;const[Se,Rt]=K,Qe=[];do{if(_e===void 0){const Ke=_n(K),ft=W??z?.map(yt=>yt.map(St=>St.rawValue).join(" ")).join(" ")??"",rt=A(Ke,K,ft,void 0);rt!==void 0&&Qe.push(rt);break}if(z===void 0){if(W===void 0)return;z=yv(W)}if(_e===!1||typeof _e=="function"&&_e?.([K[0]-U,K[1]],z.map(Ke=>Ke.map(ft=>ft.rawValue?.toString()??"")))!==!0)return;for(const[Ke,ft]of z.entries()){if(Ke+Rt>=Ve)break;for(const[rt,yt]of ft.entries()){const St=[rt+Se,Ke+Rt],[bi,Ui]=St;if(bi>=nt.length||Ui>=bn)continue;const qi=_n(St),or=A(qi,St,yt.rawValue,yt.formatted);or!==void 0&&Qe.push(or)}}}while(!1);$n(Qe),vn.current?.damage(Qe.map(Ke=>({cell:Ke.location})))}},[S,Qt,_n,j,rr.paste,Vt,nt.length,$n,bn,_e,U,Ve]);Mn("paste",Xa,d,!1,!0);const Wi=f.useCallback(async(w,A)=>{if(!rr.copy)return;const F=A===!0||Vt.current?.contains(document.activeElement)===!0||a.current?.contains(document.activeElement)===!0,$=j.columns,X=j.rows,K=(z,W)=>{if(!Ge)qu(z,W,w);else{const J=W.map(ie=>({kind:Z.Text,data:b[ie].title,displayData:b[ie].title,allowOverlay:!1}));qu([J,...z],W,w)}};if(F&&ee!==void 0){if(j.current!==void 0){let z=ee(j.current.range,V.current.signal);typeof z!="object"&&(z=await z()),K(z,Er(j.current.range.x-U,j.current.range.x+j.current.range.width-U))}else if(X!==void 0&&X.length>0){const W=[...X].map(J=>{const ie=ee({x:U,y:J,width:b.length,height:1},V.current.signal);return typeof ie=="object"?ie[0]:ie().then(Se=>Se[0])});if(W.some(J=>J instanceof Promise)){const J=await Promise.all(W);K(J,Er(b.length))}else K(W,Er(b.length))}else if($.length>0){const z=[],W=[];for(const J of $){let ie=ee({x:J,y:0,width:1,height:Ve},V.current.signal);typeof ie!="object"&&(ie=await ie()),z.push(ie),W.push(J-U)}if(z.length===1)K(z[0],W);else{const J=z.reduce((ie,Se)=>ie.map((Rt,Qe)=>[...Rt,...Se[Qe]]));K(J,W)}}}},[b,ee,j,rr.copy,U,Vt,Ve,Ge]);Mn("copy",Wi,d,!1,!1);const Ch=f.useCallback(async w=>{if(!(!rr.cut||!(Vt.current?.contains(document.activeElement)===!0||a.current?.contains(document.activeElement)===!0))&&(await Wi(w),j.current!==void 0)){let F={current:{cell:j.current.cell,range:j.current.range,rangeStack:[]},rows:et.empty(),columns:et.empty()};const $=Ut?.(F);if($===!1||(F=$===!0?F:$,F.current===void 0))return;Br(F.current.range)}},[Br,j,rr.cut,Wi,Vt,Ut]);Mn("cut",Ch,d,!1,!1);const Sh=f.useCallback((w,A)=>{if(he!==void 0){U!==0&&(w=w.map(X=>[X[0]-U,X[1]])),he(w,A);return}if(w.length===0||A===-1)return;const[F,$]=w[A];c.current!==void 0&&c.current[0]===F&&c.current[1]===$||(c.current=[F,$],Sr(F,$,!1,!1))},[he,U,Sr]),[Fo,Ao]=It?.current?.cell??[],Ho=f.useRef(Gt);Ho.current=Gt,f.useLayoutEffect(()=>{qa.current&&!zr.current&&Fo!==void 0&&Ao!==void 0&&(Fo!==fe.current?.current?.cell[0]||Ao!==fe.current?.current?.cell[1])&&Ho.current(Fo,Ao),zr.current=!1},[Fo,Ao]);const Vs=j.current!==void 0&&(j.current.cell[0]>=nt.length||j.current.cell[1]>=bn);f.useLayoutEffect(()=>{Vs&&pe(Yo,!1)},[Vs,pe]);const xh=f.useMemo(()=>Ht===!0&&Ie?.tint===!0?et.fromSingleSelection(bn-1):et.empty(),[bn,Ht,Ie?.tint]),kh=f.useCallback(w=>typeof rn=="boolean"?rn:rn?.(w-U)??!0,[U,rn]),Mh=f.useMemo(()=>{if(Va===void 0||a.current===null)return null;const{bounds:w,group:A}=Va,F=a.current.getBoundingClientRect();return f.createElement(uv,{bounds:w,group:A,canvasBounds:F,onClose:()=>$a(void 0),onFinish:$=>{$a(void 0),ue?.(A,$)}})},[ue,Va]),Rh=Math.min(nt.length,Te+(Ln?1:0));f.useImperativeHandle(t,()=>({appendRow:(w,A)=>yr(w+U,A),appendColumn:(w,A)=>Po(w,A),updateCells:w=>(U!==0&&(w=w.map(A=>({cell:[A.cell[0]+U,A.cell[1]]}))),vn.current?.damage(w)),getBounds:(w,A)=>{if(!(a?.current===null||Vt?.current===null)){if(w===void 0&&A===void 0){const F=a.current.getBoundingClientRect(),$=F.width/Vt.current.clientWidth;return{x:F.x-Vt.current.scrollLeft*$,y:F.y-Vt.current.scrollTop*$,width:Vt.current.scrollWidth*$,height:Vt.current.scrollHeight*$}}return vn.current?.getBounds((w??0)+U,A)}},focus:()=>vn.current?.focus(),emit:async w=>{switch(w){case"delete":Bi({bounds:void 0,cancel:()=>{},stopPropagation:()=>{},preventDefault:()=>{},ctrlKey:!1,key:"Delete",keyCode:46,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:void 0});break;case"fill-right":Bi({bounds:void 0,cancel:()=>{},stopPropagation:()=>{},preventDefault:()=>{},ctrlKey:!0,key:"r",keyCode:82,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:void 0});break;case"fill-down":Bi({bounds:void 0,cancel:()=>{},stopPropagation:()=>{},preventDefault:()=>{},ctrlKey:!0,key:"d",keyCode:68,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:void 0});break;case"copy":await Wi(void 0,!0);break;case"paste":await Xa();break}},scrollTo:Gt,remeasureColumns:w=>{for(const A of w)Lo(A+U)},getMouseArgsForPosition:(w,A,F)=>{if(vn?.current===null)return;const $=vn.current.getMouseArgsForPosition(w,A,F);if($!==void 0)return{...$,location:[$.location[0]-U,$.location[1]]}}}),[yr,Po,Lo,Vt,Wi,Bi,Xa,U,Gt]);const[$s,Ns]=vi??[],Ih=f.useCallback(w=>{const[A,F]=w;if(F===-1){te!=="none"&&(je(et.fromSingleSelection(A),void 0,!1),kn());return}$s===A&&Ns===F||(Mt({cell:w,range:{x:A,y:F,width:1,height:1}},!0,!1,"keyboard-nav"),Gt(A,F))},[te,kn,Gt,$s,Ns,Mt,je]),[Eh,Th]=f.useState(!1),Bs=f.useRef(fd(w=>{Th(w)},5)),Dh=f.useCallback(()=>{Bs.current(!0),j.current===void 0&&j.columns.length===0&&j.rows.length===0&&s===void 0&&Mt({cell:[U,Io],range:{x:U,y:Io,width:1,height:1}},!0,!1,"keyboard-select")},[Io,j,s,U,Mt]),Oh=f.useCallback(()=>{Bs.current(!1)},[]),[Ph,Lh]=f.useMemo(()=>{let w;const A=bt?.scrollbarWidthOverride??Tl(),F=Ve+(Ht?1:0);if(typeof nr=="number")w=mn+F*nr;else{let X=0;const K=Math.min(F,10);for(let z=0;z<K;z++)X+=nr(z);X=Math.floor(X/K),w=mn+F*X}w+=A;const $=nt.reduce((X,K)=>K.width+X,0)+A;return[`${Math.min(1e5,$)}px`,`${Math.min(1e5,w)}px`]},[nt,bt?.scrollbarWidthOverride,nr,Ve,Ht,mn]),_h=f.useMemo(()=>Em(dt),[dt]);return f.createElement(Fd.Provider,{value:dt},f.createElement(kv,{style:_h,className:Y,inWidth:m??Ph,inHeight:y??Lh},f.createElement(ov,{fillHandle:Lt,drawFocusRing:ni,experimental:bt,fixedShadowX:Cn,fixedShadowY:er,getRowThemeOverride:Fr,headerIcons:tr,imageWindowLoader:B,initialSize:ze,isDraggable:qe,onDragLeave:Ot,onRowMoved:an,overscrollX:Da,overscrollY:Oa,preventDiagonalScrolling:pn,rightElement:Wt,rightElementProps:En,smoothScrollX:_i,smoothScrollY:ti,className:Y,enableGroups:Vn,onCanvasFocused:Dh,onCanvasBlur:Oh,canvasRef:a,onContextMenu:yh,theme:dt,cellXOffset:ih,cellYOffset:Io,accessibilityHeight:dr.height,onDragEnd:mh,columns:nt,nonGrowWidth:_t,drawHeader:vt,onColumnProposeMove:hh,drawCell:cn,disabledRows:xh,freezeColumns:Rh,lockColumns:U,firstColAccessible:U===0,getCellContent:_n,minColumnWidth:vr,maxColumnWidth:li,searchInputRef:l,showSearch:La,onSearchClose:ui,highlightRegions:oh,getCellsForSelection:ee,getGroupDetails:Fa,headerHeight:Hi,isFocused:Eh,groupHeaderHeight:Vn?Ro:0,freezeTrailingRows:mt+(Ht&&Ie?.sticky===!0?1:0),hasAppendRow:Ht,onColumnResize:Xe,onColumnResizeEnd:Me,onColumnResizeStart:Ze,onCellFocused:Ih,onColumnMoved:gh,onDragStart:ph,onHeaderMenuClick:ch,onHeaderIndicatorClick:dh,onItemHovered:Ua,isFilling:s?.fillHandle===!0,onMouseMove:uh,onKeyDown:Bi,onKeyUp:se,onMouseDown:ah,onMouseUp:sh,onDragOverCell:Pn,onDrop:on,onSearchResultsChanged:Sh,onVisibleRegionChanged:fh,clientSize:zt,rowHeight:nr,searchResults:ce,searchValue:P,onSearchValueChange:H,rows:bn,scrollRef:Vt,selection:j,translateX:dr.tx,translateY:dr.ty,verticalBorder:kh,gridRef:vn,getCellRenderer:Qt,resizeIndicator:Xt}),Mh,i!==void 0&&f.createElement(f.Suspense,{fallback:null},f.createElement(Fv,{...i,validateCell:De,bloom:D,id:wh,getCellRenderer:Qt,className:bt?.isSubGrid===!0?"click-outside-ignore":void 0,provideEditor:gn,imageEditorOverride:g,portalElementRef:ko,onFinishEditing:bh,markdownDivCreateNode:p,isOutsideClick:Tn,customEventTarget:bt?.eventTarget}))))},Vv=f.forwardRef(zv);function Yu(e){const{cell:t,posX:n,posY:r,bounds:i,theme:o}=e,{width:l,height:a,x:s,y:u}=i,c=t.maxSize??o.checkboxMaxSize,d=Math.floor(i.y+a/2),g=pd(c,a,o.cellVerticalPadding),h=gd(t.contentAlign??"center",s,l,o.cellHorizontalPadding,g),p=hd(h,d,g),m=md(s+n,u+r,p);return Gl(t)&&m}const $v={getAccessibilityString:e=>e.data?.toString()??"false",kind:Z.Boolean,needsHover:!0,useLabel:!1,needsHoverPosition:!0,measure:()=>50,draw:e=>Nv(e,e.cell.data,Gl(e.cell),e.cell.maxSize??e.theme.checkboxMaxSize,e.cell.hoverEffectIntensity??.35),onDelete:e=>({...e,data:!1}),onSelect:e=>{Yu(e)&&e.preventDefault()},onClick:e=>{if(Yu(e))return{...e.cell,data:Kd(e.cell.data)}},onPaste:(e,t)=>{let n=la;return e.toLowerCase()==="true"?n=!0:e.toLowerCase()==="false"?n=!1:e.toLowerCase()==="indeterminate"&&(n=Xl),n===t.data?void 0:{...t,data:n}}};function Nv(e,t,n,r,i){if(!n&&t===la)return;const{ctx:o,hoverAmount:l,theme:a,rect:s,highlighted:u,hoverX:c,hoverY:d,cell:{contentAlign:g}}=e,{x:h,y:p,width:m,height:y}=s;let b=!1;if(i>0){let v=n?1-i+i*l:.4;if(t===la&&(v*=l),v===0)return;v<1&&(b=!0,o.globalAlpha=v)}is(o,a,t,h,p,m,y,u,c,d,r,g),b&&(o.globalAlpha=1)}const Bv=sn("div")({name:"BubblesOverlayEditorStyle",class:"gdg-b1ygi5by",propsAsIs:!1}),Wv=e=>{const{bubbles:t}=e;return f.createElement(Bv,null,t.map((n,r)=>f.createElement("div",{key:r,className:"boe-bubble"},n)),f.createElement("textarea",{className:"gdg-input",autoFocus:!0}))},Uv={getAccessibilityString:e=>vd(e.data),kind:Z.Bubble,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:(e,t,n)=>{const r=t.data.reduce((i,o)=>e.measureText(o).width+i+n.bubblePadding*2+n.bubbleMargin,0);return t.data.length===0?n.cellHorizontalPadding*2:r+2*n.cellHorizontalPadding-n.bubbleMargin},draw:e=>qv(e,e.cell.data),provideEditor:()=>e=>{const{value:t}=e;return f.createElement(Wv,{bubbles:t.data})},onPaste:()=>{}};function qv(e,t){const{rect:n,theme:r,ctx:i,highlighted:o}=e,{x:l,y:a,width:s,height:u}=n;let c=l+r.cellHorizontalPadding;const d=[];for(const g of t){if(c>l+s)break;const h=Or(g,i,r.baseFontFull).width;d.push({x:c,width:h}),c+=h+r.bubblePadding*2+r.bubbleMargin}i.beginPath();for(const g of d)Zn(i,g.x,a+(u-r.bubbleHeight)/2,g.width+r.bubblePadding*2,r.bubbleHeight,r.roundingRadius??r.bubbleHeight/2);i.fillStyle=o?r.bgBubbleSelected:r.bgBubble,i.fill();for(const[g,h]of d.entries())i.beginPath(),i.fillStyle=r.textBubble,i.fillText(t[g],h.x+r.bubblePadding,a+u/2+Qn(i,r))}const Xv=sn("div")({name:"DrilldownOverlayEditorStyle",class:"gdg-d4zsq0x",propsAsIs:!1}),Gv=e=>{const{drilldowns:t}=e;return f.createElement(Xv,null,t.map((n,r)=>f.createElement("div",{key:r,className:"doe-bubble"},n.img!==void 0&&f.createElement("img",{src:n.img}),f.createElement("div",null,n.text))))},Yv={getAccessibilityString:e=>vd(e.data.map(t=>t.text)),kind:Z.Drilldown,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:(e,t,n)=>t.data.reduce((r,i)=>e.measureText(i.text).width+r+n.bubblePadding*2+n.bubbleMargin+(i.img!==void 0?18:0),0)+2*n.cellHorizontalPadding-4,draw:e=>Kv(e,e.cell.data),provideEditor:()=>e=>{const{value:t}=e;return f.createElement(Gv,{drilldowns:t.data})},onPaste:()=>{}},hl={};function jv(e,t,n,r){const i=Math.ceil(window.devicePixelRatio),o=5,l=n-o*2,a=4,s=n*i,u=r+o,c=r*3,d=(c+o*2)*i,g=`${e},${t},${i},${n}`;if(hl[g]!==void 0)return{el:hl[g],height:s,width:d,middleWidth:a*i,sideWidth:u*i,padding:o*i,dpr:i};const h=document.createElement("canvas"),p=h.getContext("2d");return p===null?null:(h.width=d,h.height=s,p.scale(i,i),hl[g]=h,p.beginPath(),Zn(p,o,o,c,l,r),p.shadowColor="rgba(24, 25, 34, 0.4)",p.shadowBlur=1,p.fillStyle=e,p.fill(),p.shadowColor="rgba(24, 25, 34, 0.3)",p.shadowOffsetY=1,p.shadowBlur=5,p.fillStyle=e,p.fill(),p.shadowOffsetY=0,p.shadowBlur=0,p.shadowBlur=0,p.beginPath(),Zn(p,o+.5,o+.5,c,l,r),p.strokeStyle=t,p.lineWidth=1,p.stroke(),{el:h,height:s,width:d,sideWidth:u*i,middleWidth:r*i,padding:o*i,dpr:i})}function Kv(e,t){const{rect:n,theme:r,ctx:i,imageLoader:o,col:l,row:a}=e,{x:s,width:u}=n,c=r.baseFontFull,d=es(i,c),g=Math.min(n.height,Math.max(16,Math.ceil(d*r.lineHeight)*2)),h=Math.floor(n.y+(n.height-g)/2),p=g-10,m=r.bubblePadding,y=r.bubbleMargin;let b=s+r.cellHorizontalPadding;const v=r.roundingRadius??6,x=jv(r.bgCell,r.drilldownBorder,g,v),E=[];for(const M of t){if(b>s+u)break;const L=Or(M.text,i,c).width;let S=0;M.img!==void 0&&o.loadOrGetImage(M.img,l,a)!==void 0&&(S=p-8+4);const C=L+S+m*2;E.push({x:b,width:C}),b+=C+y}if(x!==null){const{el:M,height:I,middleWidth:L,sideWidth:S,width:C,dpr:_,padding:D}=x,k=S/_,T=D/_;for(const O of E){const R=Math.floor(O.x),N=Math.floor(O.width),q=N-(k-T)*2;i.imageSmoothingEnabled=!1,i.drawImage(M,0,0,S,I,R-T,h,k,g),q>0&&i.drawImage(M,S,0,L,I,R+(k-T),h,q,g),i.drawImage(M,C-S,0,S,I,R+N-(k-T),h,k,g),i.imageSmoothingEnabled=!0}}i.beginPath();for(const[M,I]of E.entries()){const L=t[M];let S=I.x+m;if(L.img!==void 0){const C=o.loadOrGetImage(L.img,l,a);if(C!==void 0){const _=p-8;let D=0,k=0,T=C.width,O=C.height;T>O?(D+=(T-O)/2,T=O):O>T&&(k+=(O-T)/2,O=T),i.beginPath(),Zn(i,S,h+g/2-_/2,_,_,r.roundingRadius??3),i.save(),i.clip(),i.drawImage(C,D,k,T,O,S,h+g/2-_/2,_,_),i.restore(),S+=_+4}}i.beginPath(),i.fillStyle=r.textBubble,i.fillText(L.text,S,h+g/2+Qn(i,r))}}const Zv={getAccessibilityString:e=>e.data.join(", "),kind:Z.Image,needsHover:!1,useLabel:!1,needsHoverPosition:!1,draw:e=>Jv(e,e.cell.displayData??e.cell.data,e.cell.rounding??e.theme.roundingRadius??4,e.cell.contentAlign),measure:(e,t)=>t.data.length*50,onDelete:e=>({...e,data:[]}),provideEditor:()=>e=>{const{value:t,onFinishedEditing:n,imageEditorOverride:r}=e,i=r??zp;return f.createElement(i,{urls:t.data,canWrite:t.readonly!==!0,onCancel:n,onChange:o=>{n({...t,data:[o]})}})},onPaste:(e,t)=>{e=e.trim();const r=e.split(",").map(i=>{try{return new URL(i),i}catch{return}}).filter(i=>i!==void 0);if(!(r.length===t.data.length&&r.every((i,o)=>i===t.data[o])))return{...t,data:r}}},gl=4;function Jv(e,t,n,r){const{rect:i,col:o,row:l,theme:a,ctx:s,imageLoader:u}=e,{x:c,y:d,height:g,width:h}=i,p=g-a.cellVerticalPadding*2,m=[];let y=0;for(let v=0;v<t.length;v++){const x=t[v];if(x.length===0)continue;const E=u.loadOrGetImage(x,o,l);if(E!==void 0){m[v]=E;const M=E.width*(p/E.height);y+=M+gl}}if(y===0)return;y-=gl;let b=c+a.cellHorizontalPadding;r==="right"?b=Math.floor(c+h-a.cellHorizontalPadding-y):r==="center"&&(b=Math.floor(c+h/2-y/2));for(const v of m){if(v===void 0)continue;const x=v.width*(p/v.height);n>0&&(s.beginPath(),Zn(s,b,d+a.cellVerticalPadding,x,p,n),s.save(),s.clip()),s.drawImage(v,b,d+a.cellVerticalPadding,x,p),n>0&&s.restore(),b+=x+gl}}function Qv(e,t){let n=e*49632+t*325176;return n^=n<<13,n^=n>>17,n^=n<<5,n/4294967295*2}const eb={getAccessibilityString:()=>"",kind:Z.Loading,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:()=>120,draw:e=>{const{cell:t,col:n,row:r,ctx:i,rect:o,theme:l}=e;if(t.skeletonWidth===void 0||t.skeletonWidth===0)return;let a=t.skeletonWidth;t.skeletonWidthVariability!==void 0&&t.skeletonWidthVariability>0&&(a+=Math.round(Qv(n,r)*t.skeletonWidthVariability));const s=l.cellHorizontalPadding;a+s*2>=o.width&&(a=o.width-s*2-1);const u=t.skeletonHeight??Math.min(18,o.height-2*l.cellVerticalPadding);Zn(i,o.x+s,o.y+(o.height-u)/2,a,u,l.roundingRadius??3),i.fillStyle=Kr(l.textDark,.1),i.fill()},onPaste:()=>{}},tb=()=>e=>e.targetWidth,ju=sn("div")({name:"MarkdownOverlayEditorStyle",class:"gdg-m1pnx84e",propsAsIs:!1,vars:{"m1pnx84e-0":[tb(),"px"]}}),nb=e=>{const{value:t,onChange:n,forceEditMode:r,createNode:i,targetRect:o,onFinish:l,validatedSelection:a}=e,s=t.data,u=t.readonly===!0,[c,d]=f.useState(s===""||r),g=f.useCallback(()=>{d(p=>!p)},[]),h=s?"gdg-ml-6":"";return c?f.createElement(ju,{targetWidth:o.width-20},f.createElement(Qr,{autoFocus:!0,highlight:!1,validatedSelection:a,value:s,onKeyDown:p=>{p.key==="Enter"&&p.stopPropagation()},onChange:n}),f.createElement("div",{className:`gdg-edit-icon gdg-checkmark-hover ${h}`,onClick:()=>l(t)},f.createElement(Op,null))):f.createElement(ju,{targetWidth:o.width},f.createElement(rm,{contents:s,createNode:i}),!u&&f.createElement(f.Fragment,null,f.createElement("div",{className:"spacer"}),f.createElement("div",{className:`gdg-edit-icon gdg-edit-hover ${h}`,onClick:g},f.createElement(jl,null))),f.createElement("textarea",{className:"gdg-md-edit-textarea gdg-input",autoFocus:!0}))},rb={getAccessibilityString:e=>e.data?.toString()??"",kind:Z.Markdown,needsHover:!1,needsHoverPosition:!1,drawPrep:xo,measure:(e,t,n)=>{const r=t.data.split(`
|
|
175
|
-
`)[0];return e.measureText(r).width+2*n.cellHorizontalPadding},draw:e=>ar(e,e.cell.data,e.cell.contentAlign),onDelete:e=>({...e,data:""}),provideEditor:()=>e=>{const{onChange:t,value:n,target:r,onFinishedEditing:i,markdownDivCreateNode:o,forceEditMode:l,validatedSelection:a}=e;return f.createElement(nb,{onFinish:i,targetRect:r,value:n,validatedSelection:a,onChange:s=>t({...n,data:s.target.value}),forceEditMode:l,createNode:o})},onPaste:(e,t)=>e===t.data?void 0:{...t,data:e}},ib={getAccessibilityString:e=>e.row.toString(),kind:Bn.Marker,needsHover:!0,needsHoverPosition:!1,drawPrep:ob,measure:()=>44,draw:e=>lb(e,e.cell.row,e.cell.checked,e.cell.markerKind,e.cell.drawHandle,e.cell.checkboxStyle),onClick:e=>{const{bounds:t,cell:n,posX:r,posY:i}=e,{width:o,height:l}=t,a=n.drawHandle?7+(o-7)/2:o/2,s=l/2;if(Math.abs(r-a)<=10&&Math.abs(i-s)<=10)return{...n,checked:!n.checked}},onPaste:()=>{}};function ob(e,t){const{ctx:n,theme:r}=e,i=r.markerFontFull,o=t??{};return o?.font!==i&&(n.font=i,o.font=i),o.deprep=ab,n.textAlign="center",o}function ab(e){const{ctx:t}=e;t.textAlign="start"}function lb(e,t,n,r,i,o){const{ctx:l,rect:a,hoverAmount:s,theme:u}=e,{x:c,y:d,width:g,height:h}=a,p=n?1:r==="checkbox-visible"?.6+.4*s:s;if(r!=="number"&&p>0){l.globalAlpha=p;const m=7*(n?s:1);if(is(l,u,n,i?c+m:c,d,i?g-m:g,h,!0,void 0,void 0,u.checkboxMaxSize,"center",o),i){l.globalAlpha=s,l.beginPath();for(const y of[3,6])for(const b of[-5,-1,3])l.rect(c+y,d+h/2+b,2,2);l.fillStyle=u.textLight,l.fill(),l.beginPath()}l.globalAlpha=1}if(r==="number"||r==="both"&&!n){const m=t.toString(),y=u.markerFontFull,b=c+g/2;r==="both"&&s!==0&&(l.globalAlpha=1-s),l.fillStyle=u.textLight,l.font=y,l.fillText(m,b,d+h/2+Qn(l,y)),s!==0&&(l.globalAlpha=1)}}const sb={getAccessibilityString:()=>"",kind:Bn.NewRow,needsHover:!0,needsHoverPosition:!1,measure:()=>200,draw:e=>ub(e,e.cell.hint,e.cell.icon),onPaste:()=>{}};function ub(e,t,n){const{ctx:r,rect:i,hoverAmount:o,theme:l,spriteManager:a}=e,{x:s,y:u,width:c,height:d}=i;r.beginPath(),r.globalAlpha=o,r.rect(s+1,u+1,c,d-2),r.fillStyle=l.bgHeaderHovered,r.fill(),r.globalAlpha=1,r.beginPath();const g=t!=="";let h=0;if(n!==void 0){const m=d-8,y=s+8/2,b=u+8/2;a.drawSprite(n,"normal",r,y,b,m,l,g?1:o),h=m}else{h=24;const p=12,m=g?p:o*p,y=g?0:(1-o)*p*.5,b=l.cellHorizontalPadding+4;m>0&&(r.moveTo(s+b+y,u+d/2),r.lineTo(s+b+y+m,u+d/2),r.moveTo(s+b+y+m*.5,u+d/2-m*.5),r.lineTo(s+b+y+m*.5,u+d/2+m*.5),r.lineWidth=2,r.strokeStyle=l.bgIconHeader,r.lineCap="round",r.stroke())}r.fillStyle=l.textMedium,r.fillText(t,h+s+l.cellHorizontalPadding+.5,u+d/2+Qn(r,l)),r.beginPath()}function Qd(e,t,n,r,i,o,l){e.textBaseline="alphabetic";const a=cb(e,i,r,t,n?.fullSize??!1);e.beginPath(),Zn(e,a.x,a.y,a.width,a.height,t.roundingRadius??4),e.globalAlpha=o,e.fillStyle=n?.bgColor??Kr(t.textDark,.1),e.fill(),e.globalAlpha=1,e.fillStyle=t.textDark,e.textBaseline="middle",l?.("text")}function cb(e,t,n,r,i){const o=r.cellHorizontalPadding,l=r.cellVerticalPadding;if(i)return{x:t.x+o/2,y:t.y+l/2+1,width:t.width-o,height:t.height-l-1};const a=Or(n,e,r.baseFontFull,"alphabetic"),s=t.height-l,u=Math.min(s,a.actualBoundingBoxAscent*2.5);return{x:t.x+o/2,y:t.y+(t.height-u)/2+1,width:a.width+o*3,height:u-1}}const db=f.lazy(async()=>await Ul(()=>import("./number-overlay-editor.DRwAw1In.js"),__vite__mapDeps([13,1,2,3,4,5,6,7,8,9,10,11,12]),import.meta.url)),fb={getAccessibilityString:e=>e.data?.toString()??"",kind:Z.Number,needsHover:e=>e.hoverEffect===!0,needsHoverPosition:!1,useLabel:!0,drawPrep:xo,draw:e=>{const{hoverAmount:t,cell:n,ctx:r,theme:i,rect:o,overrideCursor:l}=e,{hoverEffect:a,displayData:s,hoverEffectTheme:u}=n;a===!0&&t>0&&Qd(r,i,u,s,o,t,l),ar(e,e.cell.displayData,e.cell.contentAlign)},measure:(e,t,n)=>e.measureText(t.displayData).width+n.cellHorizontalPadding*2,onDelete:e=>({...e,data:void 0}),provideEditor:()=>e=>{const{isHighlighted:t,onChange:n,value:r,validatedSelection:i}=e;return f.createElement(f.Suspense,{fallback:null},f.createElement(db,{highlight:t,disabled:r.readonly===!0,value:r.data,fixedDecimals:r.fixedDecimals,allowNegative:r.allowNegative,thousandSeparator:r.thousandSeparator,decimalSeparator:r.decimalSeparator,validatedSelection:i,onChange:o=>n({...r,data:Number.isNaN(o.floatValue??0)?0:o.floatValue})}))},onPaste:(e,t,n)=>{const r=typeof n.rawValue=="number"?n.rawValue:Number.parseFloat(typeof n.rawValue=="string"?n.rawValue:e);if(!(Number.isNaN(r)||t.data===r))return{...t,data:r,displayData:n.formattedString??t.displayData}}},hb={getAccessibilityString:()=>"",measure:()=>108,kind:Z.Protected,needsHover:!1,needsHoverPosition:!1,draw:gb,onPaste:()=>{}};function gb(e){const{ctx:t,theme:n,rect:r}=e,{x:i,y:o,height:l}=r;t.beginPath();const a=2.5;let s=i+n.cellHorizontalPadding+a;const u=o+l/2,c=Math.cos(pu(30))*a,d=Math.sin(pu(30))*a;for(let g=0;g<12;g++)t.moveTo(s,u-a),t.lineTo(s,u+a),t.moveTo(s+c,u-d),t.lineTo(s-c,u+d),t.moveTo(s-c,u-d),t.lineTo(s+c,u+d),s+=8;t.lineWidth=1.1,t.lineCap="square",t.strokeStyle=n.textLight,t.stroke()}const pb={getAccessibilityString:e=>e.data?.toString()??"",kind:Z.RowID,needsHover:!1,needsHoverPosition:!1,drawPrep:(e,t)=>xo(e,t,e.theme.textLight),draw:e=>ar(e,e.cell.data,e.cell.contentAlign),measure:(e,t,n)=>e.measureText(t.data).width+n.cellHorizontalPadding*2,provideEditor:()=>e=>{const{isHighlighted:t,onChange:n,value:r,validatedSelection:i}=e;return $t.createElement(Qr,{highlight:t,autoFocus:r.readonly!==!0,disabled:r.readonly!==!1,value:r.data,validatedSelection:i,onChange:o=>n({...r,data:o.target.value})})},onPaste:()=>{}},mb={getAccessibilityString:e=>e.data?.toString()??"",kind:Z.Text,needsHover:e=>e.hoverEffect===!0,needsHoverPosition:!1,drawPrep:xo,useLabel:!0,draw:e=>{const{cell:t,hoverAmount:n,hyperWrapping:r,ctx:i,rect:o,theme:l,overrideCursor:a}=e,{displayData:s,contentAlign:u,hoverEffect:c,allowWrapping:d,hoverEffectTheme:g}=t;c===!0&&n>0&&Qd(i,l,g,s,o,n,a),ar(e,s,u,d,r)},measure:(e,t,n)=>{const r=t.displayData.split(`
|
|
176
|
-
`,t.allowWrapping===!0?void 0:1);let i=0;for(const o of r)i=Math.max(i,e.measureText(o).width);return i+2*n.cellHorizontalPadding},onDelete:e=>({...e,data:""}),provideEditor:e=>({disablePadding:e.allowWrapping===!0,editor:t=>{const{isHighlighted:n,onChange:r,value:i,validatedSelection:o}=t;return f.createElement(Qr,{style:e.allowWrapping===!0?{padding:"3px 8.5px"}:void 0,highlight:n,autoFocus:i.readonly!==!0,disabled:i.readonly===!0,altNewline:!0,value:i.data,validatedSelection:o,onChange:l=>r({...i,data:l.target.value})})}}),onPaste:(e,t,n)=>e===t.data?void 0:{...t,data:e,displayData:n.formattedString??t.displayData}},vb=sn("div")({name:"UriOverlayEditorStyle",class:"gdg-u1rrojo",propsAsIs:!1}),bb=e=>{const{uri:t,onChange:n,forceEditMode:r,readonly:i,validatedSelection:o,preview:l}=e,[a,s]=f.useState(!i&&(t===""||r)),u=f.useCallback(()=>{s(!0)},[]);return a?f.createElement(Qr,{validatedSelection:o,highlight:!0,autoFocus:!0,value:t,onChange:n}):f.createElement(vb,null,f.createElement("a",{className:"gdg-link-area",href:t,target:"_blank",rel:"noopener noreferrer"},l),!i&&f.createElement("div",{className:"gdg-edit-icon",onClick:u},f.createElement(jl,null)),f.createElement("textarea",{className:"gdg-input",autoFocus:!0}))};function ef(e,t,n,r){let i=n.cellHorizontalPadding;const o=t.height/2-e.actualBoundingBoxAscent/2,l=e.width,a=e.actualBoundingBoxAscent;return r==="right"?i=t.width-l-n.cellHorizontalPadding:r==="center"&&(i=t.width/2-l/2),{x:i,y:o,width:l,height:a}}function Ku(e){const{cell:t,bounds:n,posX:r,posY:i,theme:o}=e,l=t.displayData??t.data;if(t.hoverEffect!==!0||t.onClickUri===void 0)return!1;const a=Td(l,o.baseFontFull);if(a===void 0)return!1;const s=ef(a,n,o,t.contentAlign);return jr({x:s.x-4,y:s.y-4,width:s.width+8,height:s.height+8},r,i)}const wb={getAccessibilityString:e=>e.data?.toString()??"",kind:Z.Uri,needsHover:e=>e.hoverEffect===!0,needsHoverPosition:!0,useLabel:!0,drawPrep:xo,draw:e=>{const{cell:t,theme:n,overrideCursor:r,hoverX:i,hoverY:o,rect:l,ctx:a}=e,s=t.displayData??t.data,u=t.hoverEffect===!0;if(r!==void 0&&u&&i!==void 0&&o!==void 0){const c=Or(s,a,n.baseFontFull),d=ef(c,l,n,t.contentAlign),{x:g,y:h,width:p,height:m}=d;if(i>=g-4&&i<=g-4+p+8&&o>=h-4&&o<=h-4+m+8){const y=Qn(a,n.baseFontFull);r("pointer");const b=5,v=h-y;a.beginPath(),a.moveTo(l.x+g,Math.floor(l.y+v+m+b)+.5),a.lineTo(l.x+g+p,Math.floor(l.y+v+m+b)+.5),a.strokeStyle=n.linkColor,a.stroke(),a.save(),a.fillStyle=e.cellFillColor,ar({...e,rect:{...l,x:l.x-1}},s,t.contentAlign),ar({...e,rect:{...l,x:l.x-2}},s,t.contentAlign),ar({...e,rect:{...l,x:l.x+1}},s,t.contentAlign),ar({...e,rect:{...l,x:l.x+2}},s,t.contentAlign),a.restore()}}a.fillStyle=u?n.linkColor:n.textDark,ar(e,s,t.contentAlign)},onSelect:e=>{Ku(e)&&e.preventDefault()},onClick:e=>{const{cell:t}=e;Ku(e)&&t.onClickUri?.(e)},measure:(e,t,n)=>e.measureText(t.displayData??t.data).width+n.cellHorizontalPadding*2,onDelete:e=>({...e,data:""}),provideEditor:e=>t=>{const{onChange:n,value:r,forceEditMode:i,validatedSelection:o}=t;return f.createElement(bb,{forceEditMode:r.readonly!==!0&&(i||e.hoverEffect===!0&&e.onClickUri!==void 0),uri:r.data,preview:r.displayData??r.data,validatedSelection:o,readonly:r.readonly===!0,onChange:l=>n({...r,data:l.target.value})})},onPaste:(e,t,n)=>e===t.data?void 0:{...t,data:e,displayData:n.formattedString??t.displayData}},yb=[ib,sb,$v,Uv,Yv,Zv,eb,rb,fb,hb,pb,mb,wb];var pl,Zu;function Cb(){if(Zu)return pl;Zu=1;var e=dd(),t=Bc(),n="Expected a function";function r(i,o,l){var a=!0,s=!0;if(typeof i!="function")throw new TypeError(n);return t(l)&&(a="leading"in l?!!l.leading:a,s="trailing"in l?!!l.trailing:s),e(i,o,{leading:a,maxWait:o,trailing:s})}return pl=r,pl}var Sb=Cb();const xb=pr(Sb),ml=[];class kb extends Pd{imageLoaded=()=>{};loadedLocations=[];cache={};setCallback(t){this.imageLoaded=t}sendLoaded=xb(()=>{this.imageLoaded(new fo(this.loadedLocations)),this.loadedLocations=[]},20);clearOutOfWindow=()=>{const t=Object.keys(this.cache);for(const n of t){const r=this.cache[n];let i=!1;for(let o=0;o<r.cells.length;o++){const l=r.cells[o];if(this.isInWindow(l)){i=!0;break}}i?r.cells=r.cells.filter(this.isInWindow):(r.cancel(),delete this.cache[n])}};loadImage(t,n,r,i){let o=!1;const l=ml.pop()??new Image;let a=!1;const s={img:void 0,cells:[Kn(n,r)],url:t,cancel:()=>{a||(a=!0,ml.length<12?ml.unshift(l):o||(l.src=""))}},u=new Promise(c=>l.addEventListener("load",()=>c(null)));requestAnimationFrame(async()=>{try{l.src=t,await u,await l.decode();const c=this.cache[i];if(c!==void 0&&!a){c.img=l;for(const d of c.cells)this.loadedLocations.push(rs(d));o=!0,this.sendLoaded()}}catch{s.cancel()}}),this.cache[i]=s}loadOrGetImage(t,n,r){const i=t,o=this.cache[i];if(o!==void 0){const l=Kn(n,r);return o.cells.includes(l)||o.cells.push(l),o.img}else this.loadImage(t,n,r,i)}}const Mb=(e,t)=>{const n=f.useMemo(()=>({...p0,...e.headerIcons}),[e.headerIcons]),r=f.useMemo(()=>e.renderers??yb,[e.renderers]),i=f.useMemo(()=>e.imageWindowLoader??new kb,[e.imageWindowLoader]);return f.createElement(Vv,{...e,renderers:r,headerIcons:n,ref:t,imageWindowLoader:i})},Rb=f.forwardRef(Mb);function Ju(e,t){const n=f.useRef(null),r=f.useRef(),i=f.useCallback(()=>{n.current&&(clearTimeout(n.current),n.current=null)},[]);return f.useEffect(()=>i,[i]),{debouncedCallback:f.useCallback((...l)=>{r.current=l,i(),n.current=setTimeout(()=>{r.current&&(e(...r.current),r.current=void 0)},t)},[e,t,i]),cancel:i}}var Ib=Gh();const Eb=pr(Ib);var ra={exports:{}};/*! Moment Duration Format v2.2.2
|
|
177
|
-
* https://github.com/jsmreese/moment-duration-format
|
|
178
|
-
* Date: 2018-02-16
|
|
179
|
-
*
|
|
180
|
-
* Duration format plugin function for the Moment.js library
|
|
181
|
-
* http://momentjs.com/
|
|
182
|
-
*
|
|
183
|
-
* Copyright 2018 John Madhavan-Reese
|
|
184
|
-
* Released under the MIT license
|
|
185
|
-
*/var Tb=ra.exports,Qu;function Db(){return Qu||(Qu=1,function(e,t){(function(n,r){try{e.exports=r(Yh)}catch{e.exports=r}n&&(n.momentDurationFormatSetup=n.moment?r(n.moment):r)})(Tb,function(n){var r=!1,i=!1,o=!1,l=!1,a="escape years months weeks days hours minutes seconds milliseconds general".split(" "),s=[{type:"seconds",targets:[{type:"minutes",value:60},{type:"hours",value:3600},{type:"days",value:86400},{type:"weeks",value:604800},{type:"months",value:2678400},{type:"years",value:31536e3}]},{type:"minutes",targets:[{type:"hours",value:60},{type:"days",value:1440},{type:"weeks",value:10080},{type:"months",value:44640},{type:"years",value:525600}]},{type:"hours",targets:[{type:"days",value:24},{type:"weeks",value:168},{type:"months",value:744},{type:"years",value:8760}]},{type:"days",targets:[{type:"weeks",value:7},{type:"months",value:31},{type:"years",value:365}]},{type:"months",targets:[{type:"years",value:12}]}];function u(H,P){return P.length>H.length?!1:H.indexOf(P)!==-1}function c(H){for(var P="";H;)P+="0",H-=1;return P}function d(H){for(var P=H.split("").reverse(),G=0,se=!0;se&&G<P.length;)G?P[G]==="9"?P[G]="0":(P[G]=(parseInt(P[G],10)+1).toString(),se=!1):(parseInt(P[G],10)<5&&(se=!1),P[G]="0"),G+=1;return se&&P.push("1"),P.reverse().join("")}function g(H,P){var G=L(R(P).sort(),function(le){return le+":"+P[le]}).join(","),se=H+"+"+G;return g.cache[se]||(g.cache[se]=Intl.NumberFormat(H,P)),g.cache[se]}g.cache={};function h(H,P,G){var se=P.useToLocaleString,le=P.useGrouping,ve=le&&P.grouping.slice(),ge=P.maximumSignificantDigits,Je=P.minimumIntegerDigits||1,ke=P.fractionDigits||0,Pt=P.groupingSeparator,xt=P.decimalSeparator;if(se&&G){var Oe={minimumIntegerDigits:Je,useGrouping:le};if(ke&&(Oe.maximumFractionDigits=ke,Oe.minimumFractionDigits=ke),ge&&H>0&&(Oe.maximumSignificantDigits=ge),o){if(!l){var te=O({},P);te.useGrouping=!1,te.decimalSeparator=".",H=parseFloat(h(H,te),10)}return g(G,Oe).format(H)}else{if(!i){var te=O({},P);te.useGrouping=!1,te.decimalSeparator=".",H=parseFloat(h(H,te),10)}return H.toLocaleString(G,Oe)}}var me;ge?me=H.toPrecision(ge+1):me=H.toFixed(ke+1);var we,ne,ye,Pe=me.split("e");ye=Pe[1]||"",Pe=Pe[0].split("."),ne=Pe[1]||"",we=Pe[0]||"";var Ee=we.length,st=ne.length,_e=Ee+st,Ge=we+ne;(ge&&_e===ge+1||!ge&&st===ke+1)&&(Ge=d(Ge),Ge.length===_e+1&&(Ee=Ee+1),st&&(Ge=Ge.slice(0,-1)),we=Ge.slice(0,Ee),ne=Ge.slice(Ee)),ge&&(ne=ne.replace(/0*$/,""));var Te=parseInt(ye,10);Te>0?ne.length<=Te?(ne=ne+c(Te-ne.length),we=we+ne,ne=""):(we=we+ne.slice(0,Te),ne=ne.slice(Te)):Te<0&&(ne=c(Math.abs(Te)-we.length)+we+ne,we="0"),ge||(ne=ne.slice(0,ke),ne.length<ke&&(ne=ne+c(ke-ne.length)),we.length<Je&&(we=c(Je-we.length)+we));var Re="";if(le){Pe=we;for(var He;Pe.length;)ve.length&&(He=ve.shift()),Re&&(Re=Pt+Re),Re=Pe.slice(-He)+Re,Pe=Pe.slice(0,-He)}else Re=we;return ne&&(Re=Re+xt+ne),Re}function p(H,P){return H.label.length>P.label.length?-1:H.label.length<P.label.length?1:0}function m(H,P){var G=[];return I(R(P),function(se){if(se.slice(0,15)==="_durationLabels"){var le=se.slice(15).toLowerCase();I(R(P[se]),function(ve){ve.slice(0,1)===H&&G.push({type:le,key:ve,label:P[se][ve]})})}}),G}function y(H,P,G){return P===1&&G===null?H:H+H}var b={durationLabelsStandard:{S:"millisecond",SS:"milliseconds",s:"second",ss:"seconds",m:"minute",mm:"minutes",h:"hour",hh:"hours",d:"day",dd:"days",w:"week",ww:"weeks",M:"month",MM:"months",y:"year",yy:"years"},durationLabelsShort:{S:"msec",SS:"msecs",s:"sec",ss:"secs",m:"min",mm:"mins",h:"hr",hh:"hrs",d:"dy",dd:"dys",w:"wk",ww:"wks",M:"mo",MM:"mos",y:"yr",yy:"yrs"},durationTimeTemplates:{HMS:"h:mm:ss",HM:"h:mm",MS:"m:ss"},durationLabelTypes:[{type:"standard",string:"__"},{type:"short",string:"_"}],durationPluralKey:y};function v(H){return Object.prototype.toString.call(H)==="[object Array]"}function x(H){return Object.prototype.toString.call(H)==="[object Object]"}function E(H,P){for(var G=H.length;G-=1;)if(P(H[G]))return H[G]}function M(H,P){var G=0,se=H&&H.length||0,le;for(typeof P!="function"&&(le=P,P=function(ve){return ve===le});G<se;){if(P(H[G]))return H[G];G+=1}}function I(H,P){var G=0,se=H.length;if(!(!H||!se))for(;G<se;){if(P(H[G],G)===!1)return;G+=1}}function L(H,P){var G=0,se=H.length,le=[];if(!H||!se)return le;for(;G<se;)le[G]=P(H[G],G),G+=1;return le}function S(H,P){return L(H,function(G){return G[P]})}function C(H){var P=[];return I(H,function(G){G&&P.push(G)}),P}function _(H){var P=[];return I(H,function(G){M(P,G)||P.push(G)}),P}function D(H,P){var G=[];return I(H,function(se){I(P,function(le){se===le&&G.push(se)})}),_(G)}function k(H,P){var G=[];return I(H,function(se,le){if(!P(se))return G=H.slice(le),!1}),G}function T(H,P){var G=H.slice().reverse();return k(G,P).reverse()}function O(H,P){for(var G in P)P.hasOwnProperty(G)&&(H[G]=P[G]);return H}function R(H){var P=[];for(var G in H)H.hasOwnProperty(G)&&P.push(G);return P}function N(H,P){var G=0,se=H.length;if(!H||!se)return!1;for(;G<se;){if(P(H[G],G)===!0)return!0;G+=1}return!1}function q(H){var P=[];return I(H,function(G){P=P.concat(G)}),P}function Y(){var H=0;try{H.toLocaleString("i")}catch(P){return P.name==="RangeError"}return!1}function oe(H){return H(3.55,"en",{useGrouping:!1,minimumIntegerDigits:1,minimumFractionDigits:1,maximumFractionDigits:1})==="3.6"}function Q(H){var P=!0;return P=P&&H(1,"en",{minimumIntegerDigits:1})==="1",P=P&&H(1,"en",{minimumIntegerDigits:2})==="01",P=P&&H(1,"en",{minimumIntegerDigits:3})==="001",!(!P||(P=P&&H(99.99,"en",{maximumFractionDigits:0,minimumFractionDigits:0})==="100",P=P&&H(99.99,"en",{maximumFractionDigits:1,minimumFractionDigits:1})==="100.0",P=P&&H(99.99,"en",{maximumFractionDigits:2,minimumFractionDigits:2})==="99.99",P=P&&H(99.99,"en",{maximumFractionDigits:3,minimumFractionDigits:3})==="99.990",!P)||(P=P&&H(99.99,"en",{maximumSignificantDigits:1})==="100",P=P&&H(99.99,"en",{maximumSignificantDigits:2})==="100",P=P&&H(99.99,"en",{maximumSignificantDigits:3})==="100",P=P&&H(99.99,"en",{maximumSignificantDigits:4})==="99.99",P=P&&H(99.99,"en",{maximumSignificantDigits:5})==="99.99",!P)||(P=P&&H(1e3,"en",{useGrouping:!0})==="1,000",P=P&&H(1e3,"en",{useGrouping:!1})==="1000",!P))}function re(){var H=[].slice.call(arguments),P={},G;if(I(H,function(ge,Je){if(!Je){if(!v(ge))throw"Expected array as the first argument to durationsFormat.";G=ge}if(typeof ge=="string"||typeof ge=="function"){P.template=ge;return}if(typeof ge=="number"){P.precision=ge;return}x(ge)&&O(P,ge)}),!G||!G.length)return[];P.returnMomentTypes=!0;var se=L(G,function(ge){return ge.format(P)}),le=D(a,_(S(q(se),"type"))),ve=P.largest;return ve&&(le=le.slice(0,ve)),P.returnMomentTypes=!1,P.outputTypes=le,L(G,function(ge){return ge.format(P)})}function ue(){var H=[].slice.call(arguments),P=O({},this.format.defaults),G=this.asMilliseconds(),se=this.asMonths();typeof this.isValid=="function"&&this.isValid()===!1&&(G=0,se=0);var le=G<0,ve=n.duration(Math.abs(G),"milliseconds"),ge=n.duration(Math.abs(se),"months");I(H,function(B){if(typeof B=="string"||typeof B=="function"){P.template=B;return}if(typeof B=="number"){P.precision=B;return}x(B)&&O(P,B)});var Je={years:"y",months:"M",weeks:"w",days:"d",hours:"h",minutes:"m",seconds:"s",milliseconds:"S"},ke={escape:/\[(.+?)\]/,years:/\*?[Yy]+/,months:/\*?M+/,weeks:/\*?[Ww]+/,days:/\*?[Dd]+/,hours:/\*?[Hh]+/,minutes:/\*?m+/,seconds:/\*?s+/,milliseconds:/\*?S+/,general:/.+?/};P.types=a;var Pt=function(B){return M(a,function(ze){return ke[ze].test(B)})},xt=new RegExp(L(a,function(B){return ke[B].source}).join("|"),"g");P.duration=this;var Oe=typeof P.template=="function"?P.template.apply(P):P.template,te=P.outputTypes,me=P.returnMomentTypes,we=P.largest,ne=[];te||(v(P.stopTrim)&&(P.stopTrim=P.stopTrim.join("")),P.stopTrim&&I(P.stopTrim.match(xt),function(B){var ze=Pt(B);ze==="escape"||ze==="general"||ne.push(ze)}));var ye=n.localeData();ye||(ye={}),I(R(b),function(B){if(typeof b[B]=="function"){ye[B]||(ye[B]=b[B]);return}ye["_"+B]||(ye["_"+B]=b[B])}),I(R(ye._durationTimeTemplates),function(B){Oe=Oe.replace("_"+B+"_",ye._durationTimeTemplates[B])});var Pe=P.userLocale||n.locale(),Ee=P.useLeftUnits,st=P.usePlural,_e=P.precision,Ge=P.forceLength,Te=P.useGrouping,Re=P.trunc,He=P.useSignificantDigits&&_e>0,ht=He?P.precision:0,tt=ht,Ye=P.minValue,gt=!1,qt=P.maxValue,Dt=!1,ct=P.useToLocaleString,jt=P.groupingSeparator,Kt=P.decimalSeparator,Dn=P.grouping;ct=ct&&(r||o);var It=P.trim;v(It)&&(It=It.join(" ")),It===null&&(we||qt||He)&&(It="all"),(It===null||It===!0||It==="left"||It==="right")&&(It="large"),It===!1&&(It="");var pt=function(B){return B.test(It)},On=/large/,Ct=/small/,un=/both/,gn=/mid/,Ie=/^all|[^sm]all/,mt=/final/,Tt=we>0||N([On,un,Ie],pt),dn=N([Ct,un,Ie],pt),Bt=N([gn,Ie],pt),rn=N([mt,Ie],pt),Pn=L(Oe.match(xt),function(B,ze){var qe=Pt(B);return B.slice(0,1)==="*"&&(B=B.slice(1),qe!=="escape"&&qe!=="general"&&ne.push(qe)),{index:ze,length:B.length,text:"",token:qe==="escape"?B.replace(ke.escape,"$1"):B,type:qe==="escape"||qe==="general"?null:qe}}),on={index:0,length:0,token:"",text:"",type:null},Zt=[];Ee&&Pn.reverse(),I(Pn,function(B){if(B.type){(on.type||on.text)&&Zt.push(on),on=B;return}Ee?on.text=B.token+on.text:on.text+=B.token}),(on.type||on.text)&&Zt.push(on),Ee&&Zt.reverse();var Ue=D(a,_(C(S(Zt,"type"))));if(!Ue.length)return S(Zt,"text").join("");Ue=L(Ue,function(B,ze){var qe=ze+1===Ue.length,Ot=!ze,an;B==="years"||B==="months"?an=ge.as(B):an=ve.as(B);var fn=Math.floor(an),In=an-fn,pn=M(Zt,function(Wt){return B===Wt.type});return Ot&&qt&&an>qt&&(Dt=!0),qe&&Ye&&Math.abs(P.duration.as(B))<Ye&&(gt=!0),Ot&&Ge===null&&pn.length>1&&(Ge=!0),ve.subtract(fn,B),ge.subtract(fn,B),{rawValue:an,wholeValue:fn,decimalValue:qe?In:0,isSmallest:qe,isLargest:Ot,type:B,tokenLength:pn.length}});var kt=Re?Math.floor:Math.round,Rn=function(B,ze){var qe=Math.pow(10,ze);return kt(B*qe)/qe},Lt=!1,bt=!1,Cn=function(B,ze){var qe={useGrouping:Te,groupingSeparator:jt,decimalSeparator:Kt,grouping:Dn,useToLocaleString:ct};return He&&(ht<=0?(B.rawValue=0,B.wholeValue=0,B.decimalValue=0):(qe.maximumSignificantDigits=ht,B.significantDigits=ht)),Dt&&!bt&&(B.isLargest?(B.wholeValue=qt,B.decimalValue=0):(B.wholeValue=0,B.decimalValue=0)),gt&&!bt&&(B.isSmallest?(B.wholeValue=Ye,B.decimalValue=0):(B.wholeValue=0,B.decimalValue=0)),B.isSmallest||B.significantDigits&&B.significantDigits-B.wholeValue.toString().length<=0?_e<0?B.value=Rn(B.wholeValue,_e):_e===0?B.value=kt(B.wholeValue+B.decimalValue):He?(Re?B.value=Rn(B.rawValue,ht-B.wholeValue.toString().length):B.value=B.rawValue,B.wholeValue&&(ht-=B.wholeValue.toString().length)):(qe.fractionDigits=_e,Re?B.value=B.wholeValue+Rn(B.decimalValue,_e):B.value=B.wholeValue+B.decimalValue):He&&B.wholeValue?(B.value=Math.round(Rn(B.wholeValue,B.significantDigits-B.wholeValue.toString().length)),ht-=B.wholeValue.toString().length):B.value=B.wholeValue,B.tokenLength>1&&(Ge||Lt)&&(qe.minimumIntegerDigits=B.tokenLength,bt&&qe.maximumSignificantDigits<B.tokenLength&&delete qe.maximumSignificantDigits),!Lt&&(B.value>0||It===""||M(ne,B.type)||M(te,B.type))&&(Lt=!0),B.formattedValue=h(B.value,qe,Pe),qe.useGrouping=!1,qe.decimalSeparator=".",B.formattedValueEn=h(B.value,qe,"en"),B.tokenLength===2&&B.type==="milliseconds"&&(B.formattedValueMS=h(B.value,{minimumIntegerDigits:3,useGrouping:!1},"en").slice(0,2)),B};if(Ue=L(Ue,Cn),Ue=C(Ue),Ue.length>1){var er=function(B){return M(Ue,function(ze){return ze.type===B})},tr=function(B){var ze=er(B.type);ze&&I(B.targets,function(qe){var Ot=er(qe.type);Ot&&parseInt(ze.formattedValueEn,10)===qe.value&&(ze.rawValue=0,ze.wholeValue=0,ze.decimalValue=0,Ot.rawValue+=1,Ot.wholeValue+=1,Ot.decimalValue=0,Ot.formattedValueEn=Ot.wholeValue.toString(),bt=!0)})};I(s,tr)}return bt&&(Lt=!1,ht=tt,Ue=L(Ue,Cn),Ue=C(Ue)),te&&!(Dt&&!P.trim)?(Ue=L(Ue,function(B){return M(te,function(ze){return B.type===ze})?B:null}),Ue=C(Ue)):(Tt&&(Ue=k(Ue,function(B){return!B.isSmallest&&!B.wholeValue&&!M(ne,B.type)})),we&&Ue.length&&(Ue=Ue.slice(0,we)),dn&&Ue.length>1&&(Ue=T(Ue,function(B){return!B.wholeValue&&!M(ne,B.type)&&!B.isLargest})),Bt&&(Ue=L(Ue,function(B,ze){return ze>0&&ze<Ue.length-1&&!B.wholeValue?null:B}),Ue=C(Ue)),rn&&Ue.length===1&&!Ue[0].wholeValue&&!(!Re&&Ue[0].isSmallest&&Ue[0].rawValue<Ye)&&(Ue=[])),me?Ue:(I(Zt,function(B){var ze=Je[B.type],qe=M(Ue,function(Wt){return Wt.type===B.type});if(!(!ze||!qe)){var Ot=qe.formattedValueEn.split(".");Ot[0]=parseInt(Ot[0],10),Ot[1]?Ot[1]=parseFloat("0."+Ot[1],10):Ot[1]=null;var an=ye.durationPluralKey(ze,Ot[0],Ot[1]),fn=m(ze,ye),In=!1,pn={};I(ye._durationLabelTypes,function(Wt){var En=M(fn,function(Sn){return Sn.type===Wt.type&&Sn.key===an});En&&(pn[En.type]=En.label,u(B.text,Wt.string)&&(B.text=B.text.replace(Wt.string,En.label),In=!0))}),st&&!In&&(fn.sort(p),I(fn,function(Wt){if(pn[Wt.type]===Wt.label)return u(B.text,Wt.label)?!1:void 0;if(u(B.text,Wt.label))return B.text=B.text.replace(Wt.label,pn[Wt.type]),!1}))}}),Zt=L(Zt,function(B){if(!B.type)return B.text;var ze=M(Ue,function(Ot){return Ot.type===B.type});if(!ze)return"";var qe="";return Ee&&(qe+=B.text),(le&&Dt||!le&>)&&(qe+="< ",Dt=!1,gt=!1),(le&>||!le&&Dt)&&(qe+="> ",Dt=!1,gt=!1),le&&(ze.value>0||It===""||M(ne,ze.type)||M(te,ze.type))&&(qe+="-",le=!1),B.type==="milliseconds"&&ze.formattedValueMS?qe+=ze.formattedValueMS:qe+=ze.formattedValue,Ee||(qe+=B.text),qe}),Zt.join("").replace(/(,| |:|\.)*$/,"").replace(/^(,| |:|\.)*/,""))}function ae(){var H=this.duration,P=function(ve){return H._data[ve]},G=M(this.types,P),se=E(this.types,P);switch(G){case"milliseconds":return"S __";case"seconds":case"minutes":return"*_MS_";case"hours":return"_HMS_";case"days":if(G===se)return"d __";case"weeks":return G===se?"w __":(this.trim===null&&(this.trim="both"),"w __, d __, h __");case"months":if(G===se)return"M __";case"years":return G===se?"y __":(this.trim===null&&(this.trim="both"),"y __, M __, d __");default:return this.trim===null&&(this.trim="both"),"y __, d __, h __, m __, s __"}}function de(H){if(!H)throw"Moment Duration Format init cannot find moment instance.";H.duration.format=re,H.duration.fn.format=ue,H.duration.fn.format.defaults={trim:null,stopTrim:null,largest:null,maxValue:null,minValue:null,precision:0,trunc:!1,forceLength:null,userLocale:null,usePlural:!0,useLeftUnits:!1,useGrouping:!0,useSignificantDigits:!1,template:ae,useToLocaleString:!0,groupingSeparator:",",decimalSeparator:".",grouping:[3]},H.updateLocale("en",b)}var he=function(H,P,G){return H.toLocaleString(P,G)};r=Y()&&Q(he),i=r&&oe(he);var ce=function(H,P,G){if(typeof window<"u"&&window&&window.Intl&&window.Intl.NumberFormat)return window.Intl.NumberFormat(P,G).format(H)};return o=Q(ce),l=o&&oe(ce),de(n),de})}(ra)),ra.exports}Db();const Ob=["true","t","yes","y","on","1"],Pb=["false","f","no","n","off","0"];function Et(e,t=""){return{kind:Z.Text,readonly:!0,allowOverlay:!0,data:e,displayData:e,errorDetails:t,isError:!0,style:"faded"}}function Di(e){return Object.hasOwn(e,"isError")&&e.isError}function Lb(e){return Object.hasOwn(e,"tooltip")&&e.tooltip!==""}function ls(e){return Object.hasOwn(e,"isMissingValue")&&e.isMissingValue}function zl(e=!1){return e?{kind:Z.Loading,allowOverlay:!1,isMissingValue:!0,copyData:""}:{kind:Z.Loading,allowOverlay:!1,copyData:""}}function _b(e,t){const n=t?"faded":"normal";return{kind:Z.Text,data:"",displayData:"",allowOverlay:!0,readonly:e,style:n}}function Vl(e){return{id:e.id,title:e.title,hasMenu:!1,menuIcon:"dots",themeOverride:e.themeOverride,icon:e.icon,group:e.group,...e.isStretched&&!e.isPinned&&{grow:1},...e.width&&{width:e.width}}}function Li(e,t){return Le(e)?t||{}:Le(t)?e||{}:qc(e,t)}function ss(e){if(Le(e))return[];if(typeof e=="number"||typeof e=="boolean")return[e];if(typeof e=="string"){if(e==="")return[];if(e.trim().startsWith("[")&&e.trim().endsWith("]"))try{return JSON.parse(e)}catch{return[e]}else return e.split(",")}try{const t=JSON.parse(JSON.stringify(e,(n,r)=>typeof r=="bigint"?Number(r):r));return Array.isArray(t)?t.map(n=>["string","number","boolean","null"].includes(typeof n)?n:lt(n)):[lt(t)]}catch{return[lt(e)]}}function tf(e){return typeof e=="string"||e instanceof String?!0:(e instanceof jh&&(e=Array.from(e)),Array.isArray(e)&&e.every(t=>typeof t=="string"||t instanceof String))}function Fb(e){return e?.startsWith("{")&&e.endsWith("}")}function lt(e){try{try{return Eb(e)}catch{return JSON.stringify(e,(n,r)=>typeof r=="bigint"?Number(r):r)}}catch{return`[${typeof e}]`}}function nf(e){if(Le(e))return null;if(typeof e=="boolean")return e;const t=lt(e).toLowerCase().trim();if(t==="")return null;if(Ob.includes(t))return!0;if(Pb.includes(t))return!1}function vo(e){if(Le(e))return null;if(Array.isArray(e))return NaN;if(typeof e=="string"){if(e.trim().length===0)return null;try{const t=io.unformat(e.trim());if(at(t))return t}catch{}}else if(e instanceof Int32Array)return Number(e[0]);return Number(e)}function rf(e){return Le(e)?"":lt(e.map(t=>typeof t=="string"&&t.includes(",")?t.replace(/,/g," "):t))}function ga(e){if(Le(e))return"";if(typeof e=="string")return e;try{return JSON.stringify(e,(t,n)=>typeof n=="bigint"?Number(n):n)}catch{return lt(e)}}function Ab(e){if(e===0||Math.abs(e)>=1e-4)return 4;const n=e.toExponential().split("e");return Math.abs(parseInt(n[1],10))}function qr(e,t={}){const n=navigator.languages;try{return new Intl.NumberFormat(n,t).format(e)}catch(r){if(r instanceof RangeError)return new Intl.NumberFormat(void 0,t).format(e);throw r}}function pa(e,t,n){return Number.isNaN(e)||!Number.isFinite(e)?"":Le(t)||t===""?at(n)?(n===0&&(e=Math.round(e)),io(e).format({thousandSeparated:!1,mantissa:n,trimMantissa:!1})):io(e).format({thousandSeparated:!1,mantissa:Ab(e),trimMantissa:!0}):t==="plain"?io(e).format({thousandSeparated:!1,mantissa:20,trimMantissa:!0}):t==="localized"?qr(e,{minimumFractionDigits:n??void 0,maximumFractionDigits:n??void 0}):t==="percent"?qr(e,{style:"percent",minimumFractionDigits:at(n)?Math.max(n-2,0):0,maximumFractionDigits:at(n)?Math.max(n-2,0):2}):t==="dollar"?qr(e,{style:"currency",currency:"USD",currencyDisplay:"narrowSymbol",minimumFractionDigits:n??2,maximumFractionDigits:n??2}):t==="euro"?qr(e,{style:"currency",currency:"EUR",currencyDisplay:"narrowSymbol",minimumFractionDigits:n??2,maximumFractionDigits:n??2}):t==="yen"?qr(e,{style:"currency",currency:"JPY",currencyDisplay:"narrowSymbol",minimumFractionDigits:n??0,maximumFractionDigits:n??0}):["compact","scientific","engineering"].includes(t)?qr(e,{notation:t}):t==="accounting"?io(e).format({thousandSeparated:!0,negative:"parenthesis",mantissa:n??2,trimMantissa:!1}):t==="bytes"?qr(e,{notation:"compact",style:"unit",unit:"byte",unitDisplay:"narrow",maximumFractionDigits:1}).replace("BB","GB"):Yg.sprintf(t,e)}function ec(e,t,n="datetime"){if(t==="localized"){const r=navigator.languages,i=n==="time"?void 0:"medium",o=n==="date"?void 0:"medium";try{return new Intl.DateTimeFormat(r,{dateStyle:i,timeStyle:o}).format(e.toDate())}catch(l){if(l instanceof RangeError)return new Intl.DateTimeFormat(void 0,{dateStyle:i,timeStyle:o}).format(e.toDate());throw l}}else{if(t==="distance")return e.fromNow();if(t==="calendar")return e.calendar();if(t==="iso8601")return n==="date"?e.format("YYYY-MM-DD"):n==="time"?e.format("HH:mm:ss.SSS[Z]"):e.toISOString()}return e.format(t)}function jo(e){if(Le(e))return null;if(e instanceof Date)return isNaN(e.getTime())?void 0:e;if(typeof e=="string"&&e.trim().length===0)return null;try{const t=Number(e);if(!isNaN(t)){let n=t;t>=10**18?n=t/1e3**3:t>=10**15?n=t/1e3**2:t>=10**12&&(n=t/1e3);const r=Xr.unix(n).utc();if(r.isValid())return r.toDate()}if(typeof e=="string"){const n=Xr.utc(e);if(n.isValid())return n.toDate();const r=Xr.utc(e,[Xr.HTML5_FMT.TIME_MS,Xr.HTML5_FMT.TIME_SECONDS,Xr.HTML5_FMT.TIME]);if(r.isValid())return r.toDate()}}catch{return}}function of(e){if(e%1===0)return 0;let t=e.toString();return t.indexOf("e")!==-1&&(t=e.toLocaleString("fullwide",{useGrouping:!1,maximumFractionDigits:20})),t.indexOf(".")===-1?0:t.split(".")[1].length}function Hb(e,t){if(!Number.isFinite(e))return e;if(t<=0)return Math.trunc(e);const n=10**t,r=e*n,i=Number.EPSILON*Math.abs(r)*10;return Math.trunc(r+Math.sign(r)*i)/n}const zb=new RegExp(/(\r\n|\n|\r)/gm);function bo(e){return e.indexOf(`
|
|
186
|
-
`)!==-1?e.replace(zb," "):e}function Vb(e,t){if(Le(t))return"";try{const n=t.match(e);return n?.[1]!==void 0?decodeURIComponent(n[1].replace(/\+/g,"%20")):t}catch{return t}}const $b=Jn("div",{target:"e1ugbj0f0"})(({theme:e})=>({overflowY:"auto",padding:e.spacing.sm,".react-json-view .copy-icon svg":{fontSize:"0.9em !important",marginRight:`${e.spacing.threeXS} !important`,verticalAlign:"middle !important"}})),af=({jsonValue:e,theme:t})=>{let n;if(e)try{n=typeof e=="string"?Ya.parse(e):Ya.parse(Ya.stringify(e))}catch{n=void 0}return Le(n)?Ne(Qr,{highlight:!0,autoFocus:!1,disabled:!0,value:ga(e)??"",onChange:()=>{}}):Ne($b,{"data-testid":"stJsonColumnViewer",children:Ne(Kh,{src:n,collapsed:2,theme:Zh(t.bgCell)>.5?"rjv-default":"monokai",displayDataTypes:!1,displayObjectSize:!1,name:!1,enableClipboard:!0,style:{fontFamily:t.fontFamily,fontSize:t.baseFontStyle,backgroundColor:t.bgCell,whiteSpace:"pre-wrap"}})})},Nb=e=>{const t=e.theme,n=e.value.data;return Ne(af,{jsonValue:n.value||n.displayValue,theme:t})},Bb=e=>{const t=e.theme,n=e.value;return Ne(af,{jsonValue:n.data,theme:t})},Wb={kind:Z.Custom,isMatch:e=>e.data.kind==="json-cell",draw:(e,t)=>{const{value:n,displayValue:r}=t.data;return Ql(e,r??ga(n)??"",t.contentAlign),!0},measure:(e,t,n)=>{const{value:r,displayValue:i}=t.data,o=i??ga(r)??"";return(o?e.measureText(o).width:0)+n.cellHorizontalPadding*2},provideEditor:()=>({editor:Nb})},lf="line_chart",Ub="area_chart",sf="bar_chart",qb=e=>new Map(Object.entries({red:e.colors.redColor,blue:e.colors.blueColor,green:e.colors.greenColor,yellow:e.colors.yellowColor,violet:e.colors.violetColor,orange:e.colors.orangeColor,gray:e.colors.grayColor,grey:e.colors.grayColor,primary:e.colors.primary}));function us(e,t,n,r){const i=Li({y_min:null,y_max:null,color:void 0},t.columnTypeOptions),o=qb(r);let l;i.color==="auto"||i.color==="auto-inverse"?l=r.colors.greenColor:l=i.color?o.get(i.color)??i.color:void 0;const a={kind:Z.Custom,allowOverlay:!1,copyData:"",contentAlign:t.contentAlignment,data:{kind:"sparkline-cell",values:[],displayValues:[],graphKind:n,color:l,yAxis:[i.y_min??0,i.y_max??1]}};return{...t,kind:e,typeIcon:e===lf?":material/show_chart:":e===sf?":material/bar_chart:":":material/area_chart:",sortMode:"default",isEditable:!1,getCell(s){if(Le(s))return zl();const u=ss(s),c=[];let d=[];if(u.length===0)return zl();let g=Number.MIN_SAFE_INTEGER,h=Number.MAX_SAFE_INTEGER;for(let b=0;b<u.length;b++){const v=vo(u[b]);if(Number.isNaN(v)||Le(v))return Et(lt(u),`The value cannot be interpreted as a numeric array. ${lt(v)} is not a number.`);v>g&&(g=v),v<h&&(h=v),c.push(v)}let p,m;if(u.length===1){let b;g<=0?b=g===0?1:0:b=g,p=i.y_max??b,m=i.y_min??(g>=0?0:g)}else p=i.y_max??g,m=i.y_min??h;if(Le(m)||Le(p)||Number.isNaN(m)||Number.isNaN(p)||m>=p)return Et("Invalid min/max y-axis configuration",`The y_min (${m}) and y_max (${p}) configuration options must be valid numbers.`);c.length>0&&(g>p||h<m)?d=c.map(b=>g-h===0?g>(p||1)?p:m:(p-m)*((b-h)/(g-h))+m):d=c;let y=l;return(i.color==="auto"&&d[0]>d[d.length-1]||i.color==="auto-inverse"&&d[0]<d[d.length-1])&&(y=r.colors.redColor),{...a,copyData:c.join(","),data:{...a.data,values:d,displayValues:c.map(b=>pa(b)),yAxis:[m,p],color:y},isMissingValue:Le(s)}},getCellValue(s){return s.kind===Z.Loading||s.data?.values===void 0?null:s.data?.values}}}function uf(e,t){return us(lf,e,"line",t)}uf.isEditableType=!1;function cf(e,t){return us(sf,e,"bar",t)}cf.isEditableType=!1;function df(e,t){return us(Ub,e,"area",t)}df.isEditableType=!1;function cs(e,t){const n={kind:Z.Boolean,data:!1,allowOverlay:!1,contentAlign:e.contentAlignment,readonly:!e.isEditable,style:"normal"};return{...e,kind:"checkbox",typeIcon:":material/check_box:",sortMode:"default",themeOverride:{roundingRadius:Math.round(Math.min(tn(t.radii.md),tn(t.radii.maxCheckbox)))},getCell(r){let i=null;return i=nf(r),i===void 0?Et(lt(r),"The value cannot be interpreted as boolean."):{...n,data:i,isMissingValue:Le(i)}},getCellValue(r){return r.data===void 0?null:r.data}}}cs.isEditableType=!0;function tc(e,t){return t.startsWith("+")||t.startsWith("-")?e=e.utcOffset(t,!1):e=e.tz(t),e}function ds(e,t,n,r,i,o,l){const a=Li({format:n,step:r,timezone:l},t.columnTypeOptions);let s;if(at(a.timezone))try{s=tc(Ws(),a.timezone)?.utcOffset()||void 0}catch{}let u;at(a.min_value)&&(u=jo(a.min_value)||void 0);let c;at(a.max_value)&&(c=jo(a.max_value)||void 0);const d={kind:Z.Custom,allowOverlay:!0,copyData:"",readonly:!t.isEditable,contentAlign:t.contentAlignment,style:t.isPinned?"faded":"normal",data:{kind:"date-picker-cell",date:void 0,displayDate:"",step:a.step?.toString()||"1",format:i,min:u,max:c}},g=h=>{const p=jo(h);return p===null?!t.isRequired:!(p===void 0||at(u)&&o(p)<o(u)||at(c)&&o(p)>o(c))};return{...t,kind:e,typeIcon:e==="date"?":material/calendar_month:":e==="time"?":material/access_time:":":material/calendar_today:",sortMode:"default",validateInput:g,getCell(h,p){if(p===!0){const x=g(h);if(x===!1)return Et(lt(h),"Invalid input.");x instanceof Date&&(h=x)}const m=jo(h);let y="",b="",v=s;if(m===void 0)return Et(lt(h),"The value cannot be interpreted as a datetime object.");if(m!==null){let x=Ws.utc(m);if(!x.isValid())return Et(lt(m),`Invalid moment date. This should never happen. Please report this bug.
|
|
187
|
-
Error: ${x.toString()}`);if(a.timezone){try{x=tc(x,a.timezone)}catch(E){return Et(x.toISOString(),`Failed to adjust to the provided timezone: ${a.timezone}.
|
|
188
|
-
Error: ${E}`)}v=x.utcOffset()}try{b=ec(x,a.format||n,e)}catch(E){return Et(x.toISOString(),`Failed to format the date for rendering with: ${a.format}.
|
|
189
|
-
Error: ${E}`)}y=ec(x,n,e)}return{...d,copyData:y,isMissingValue:Le(m),data:{...d.data,date:m,displayDate:b,timezoneOffset:v}}},getCellValue(h){return Le(h?.data?.date)?null:o(h.data.date)}}}function fs(e){let t="YYYY-MM-DD HH:mm:ss";e.columnTypeOptions?.step>=60?t="YYYY-MM-DD HH:mm":e.columnTypeOptions?.step<1&&(t="YYYY-MM-DD HH:mm:ss.SSS");const n=Jh(e.arrowType),r=at(n)||at(e?.columnTypeOptions?.timezone);return ds("datetime",e,r?t+"Z":t,1,"datetime-local",i=>r?i.toISOString():i.toISOString().replace("Z",""),n)}fs.isEditableType=!0;function hs(e){let t="HH:mm:ss";return e.columnTypeOptions?.step>=60?t="HH:mm":e.columnTypeOptions?.step<1&&(t="HH:mm:ss.SSS"),ds("time",e,t,1,"time",n=>n.toISOString().split("T")[1].replace("Z",""))}hs.isEditableType=!0;function gs(e){return ds("date",e,"YYYY-MM-DD",1,"date",t=>t.toISOString().split("T")[0])}gs.isEditableType=!0;function ff(e){const t={kind:Z.Image,data:[],displayData:[],readonly:!0,allowOverlay:!0,contentAlign:e.contentAlignment||"center",style:"normal"};return{...e,kind:"image",typeIcon:":material/image:",sortMode:"default",isEditable:!1,getCell(n){const r=at(n)?[lt(n)]:[];return{...t,data:r,isMissingValue:!at(n),displayData:r}},getCellValue(n){return n.data===void 0||n.data.length===0?null:n.data[0]}}}ff.isEditableType=!1;function hf(e){const t={kind:Z.Custom,allowOverlay:!0,contentAlign:e.contentAlignment,readonly:!0,style:e.isPinned?"faded":"normal",copyData:"",data:{kind:"json-cell",value:""}};return{...e,kind:"json",typeIcon:":material/code_blocks:",sortMode:"default",isEditable:!1,getCell(n){try{const r=at(n)?bo(ga(n)):"";return{...t,copyData:r,isMissingValue:Le(n),data:{...t.data,value:n,displayValue:r}}}catch(r){return Et(lt(n),`The value cannot be interpreted as a JSON string. Error: ${r}`)}},getCellValue(n){return n.data?.value??null}}}hf.isEditableType=!1;function gf(e){const t=e.columnTypeOptions||{};let n;if(t.validate)try{n=new RegExp(t.validate,"us")}catch(s){n=`Invalid validate regex: ${t.validate}.
|
|
190
|
-
Error: ${s}`}let r=!1,i=t.display_text,o;if(!Le(i)){if(i.startsWith(":material/")&&Qh(i))i=eg(i).icon,r=!0;else if(i.includes("(")&&i.includes(")"))try{o=new RegExp(i,"us")}catch{o=void 0}}const l={kind:Z.Uri,readonly:!e.isEditable,allowOverlay:!r,contentAlign:e.contentAlignment??(r?"center":void 0),style:"normal",hoverEffect:!0,data:"",displayData:"",copyData:"",...r&&{themeOverride:{fontFamily:tg.iconFont,linkColor:void 0}}},a=s=>{if(Le(s))return!e.isRequired;const u=lt(s);return!(t.max_chars&&u.length>t.max_chars||n instanceof RegExp&&n.test(u)===!1)};return{...e,kind:"link",typeIcon:":material/link:",sortMode:"default",validateInput:a,getCell(s,u){if(Le(s))return{...l,data:null,isMissingValue:!0,onClickUri:()=>{},themeOverride:void 0};const c=s;if(typeof n=="string")return Et(lt(c),n);if(u&&a(c)===!1)return Et(lt(c),"Invalid input.");let d="";return c&&(o!==void 0?d=Vb(o,c):d=i||c),{...l,data:c,displayData:d,isMissingValue:Le(c),onClickUri:g=>{window.open(c.startsWith("www.")?`https://${c}`:c,"_blank","noopener,noreferrer"),g.preventDefault()},copyData:c}},getCellValue(s){return Le(s.data)?null:s.data}}}gf.isEditableType=!0;function ps(e){const t={kind:Z.Custom,readonly:!e.isEditable,allowOverlay:!0,contentAlign:e.contentAlignment,style:"normal",copyData:"",data:{kind:"multi-select-cell",values:[],options:void 0,allowCreation:!0,allowDuplicates:!0}};return{...e,kind:"list",sortMode:"default",typeIcon:":material/list:",getCell(n){if(Le(n))return{...t,data:{...t.data,values:null},isMissingValue:!0,copyData:""};const r=ss(n);return{...t,data:{...t.data,values:r},copyData:rf(r),...e.isEditable&&!tf(n)&&{readonly:!0,isError:!0,errorDetails:"Editing of arrays with non-string values is not supported. Please disable editing or convert all values to strings."}}},getCellValue(n){return Le(n.data?.values)?null:n.data.values}}}ps.isEditableType=!0;const Xb=e=>{const t=rg(e);return new Map(Object.entries({red:t.redbg,blue:t.bluebg,green:t.greenbg,yellow:t.yellowbg,violet:t.violetbg,purple:t.purplebg,orange:t.orangebg,gray:t.graybg,grey:t.graybg,primary:t.primarybg}))},Gb=(e,t)=>{if(Le(e))return[];const n=Xb(t),r=t.colors.chartCategoricalColors,i=So(t);let o=0;return e.filter(l=>l!==null&&l!=="").map(l=>{if(typeof l=="string")return{value:lt(l).trim(),label:void 0,color:void 0};let a;l.color==="auto"?(a=Gr(r[o%r.length],i?.7:.6),o+=1):l.color&&(a=n.get(l.color)??l.color);const s=a?ng(a,t.colors.bgColor):void 0;return{value:lt(l.value).trim(),label:l.label??void 0,color:s}})};function pf(e,t){const n=Li({options:[],accept_new_options:!1},e.columnTypeOptions),r=Gb(n.options,t),i=new Set(r.map(l=>l.value)),o={kind:Z.Custom,readonly:!e.isEditable,allowOverlay:!0,contentAlign:e.contentAlignment,style:e.isIndex?"faded":"normal",data:{kind:"multi-select-cell",values:[],options:r,allowCreation:n.accept_new_options??!1,allowDuplicates:!1},copyData:""};return{...e,kind:"multiselect",sortMode:"default",typeIcon:":material/checklist:",getCell(l,a){if(Le(l))return{...o,data:{...o.data,values:null},isMissingValue:!0,copyData:""};let s=ss(l);return s=s.map(u=>lt(u).trim()),a&&s.length>0&&n.accept_new_options===!1&&(s=s.filter(u=>i.has(u)),s.length===0)?Et(lt(l),"The values could not be matched with the configured options."):{...o,data:{...o.data,values:s},copyData:rf(s),...e.isEditable&&!tf(l)&&{readonly:!0,isError:!0,errorDetails:"Editing of arrays with non-string values is not supported. Please disable editing or convert all values to strings."}}},getCellValue(l){return Le(l.data?.values)?null:l.data.values}}}pf.isEditableType=!0;function ms(e){const t=Li({step:Xc(e.arrowType)?1:void 0,min_value:ig(e.arrowType)?0:void 0},e.columnTypeOptions),n=!t.format&&(og(e.arrowType)||ag(e.arrowType)),r=Le(t.min_value)||t.min_value<0,i=at(t.step)&&!Number.isNaN(t.step)?of(t.step):void 0,o={kind:Z.Number,data:void 0,displayData:"",readonly:!e.isEditable,allowOverlay:!0,contentAlign:e.contentAlignment||n?"left":"right",style:e.isPinned?"faded":"normal",allowNegative:r,fixedDecimals:i,thousandSeparator:""},l=a=>{let s=vo(a);if(Le(s))return!e.isRequired;if(Number.isNaN(s))return!1;let u=!1;return at(t.max_value)&&s>t.max_value&&(s=t.max_value,u=!0),at(t.min_value)&&s<t.min_value?!1:u?s:!0};return{...e,kind:"number",sortMode:"smart",typeIcon:":material/tag:",validateInput:l,getCell(a,s){if(s===!0){const d=l(a);if(d===!1)return Et(lt(a),"Invalid input.");typeof d=="number"&&(a=d)}let u=vo(a),c="";if(at(u)){if(Number.isNaN(u))return Et(lt(a),"The value cannot be interpreted as a number.");if(at(i)&&(u=Hb(u,i)),Number.isInteger(u)&&!Number.isSafeInteger(u))return Et(lt(a),"The value is larger than the maximum supported integer values in number columns (2^53).");try{n?c=El(u,e.arrowType):c=pa(u,t.format,i)}catch(d){return Et(lt(u),at(t.format)?`Failed to format the number based on the provided format configuration: (${t.format}). Error: ${d}`:`Failed to format the number. Error: ${d}`)}}return{...o,data:u,displayData:c,isMissingValue:Le(u),copyData:Le(u)?"":lt(u)}},getCellValue(a){return a.data===void 0?null:a.data}}}ms.isEditableType=!0;function wo(e){const t={kind:Z.Text,data:"",displayData:"",allowOverlay:!0,contentAlign:e.contentAlignment,allowWrapping:e.isWrappingAllowed,readonly:!0,style:e.isPinned?"faded":"normal"};return{...e,kind:"object",sortMode:"default",typeIcon:":material/data_object:",isEditable:!1,getCell(n){try{const r=at(n)?lt(n):null,i=at(r)?bo(r):"";return{...t,data:r,displayData:i,isMissingValue:Le(n)}}catch(r){return Et(lt(n),`The value cannot be interpreted as a string. Error: ${r}`)}},getCellValue(n){return n.data===void 0?null:n.data}}}wo.isEditableType=!1;const Yb=e=>new Map(Object.entries({red:e.colors.redColor,blue:e.colors.blueColor,green:e.colors.greenColor,yellow:e.colors.yellowColor,violet:e.colors.violetColor,orange:e.colors.orangeColor,gray:e.colors.grayColor,grey:e.colors.grayColor,primary:e.colors.primary}));function mf(e,t){const n=Xc(e.arrowType),r=Li({min_value:0,max_value:n?100:1,format:n?"%3d%%":"percent",step:n?1:void 0,color:void 0},e.columnTypeOptions),i=Yb(t),o=Le(r.step)||Number.isNaN(r.step)?void 0:of(r.step);let l;try{l=pa(r.max_value,r.format,o)}catch{l=lt(r.max_value)}const a={kind:Z.Custom,allowOverlay:!1,copyData:"",contentAlign:e.contentAlignment,readonly:!0,data:{kind:"range-cell",min:r.min_value,max:r.max_value,step:r.step??.01,value:r.min_value,label:String(r.min_value),measureLabel:l}};return{...e,kind:"progress",sortMode:"smart",typeIcon:":material/commit:",isEditable:!1,getCell(s){if(Le(s))return zl();if(Le(r.min_value)||Le(r.max_value)||Number.isNaN(r.min_value)||Number.isNaN(r.max_value)||r.min_value>=r.max_value)return Et("Invalid min/max parameters",`The min_value (${r.min_value}) and max_value (${r.max_value}) parameters must be valid numbers.`);if(at(r.step)&&Number.isNaN(r.step))return Et("Invalid step parameter",`The step parameter (${r.step}) must be a valid number.`);const u=vo(s);if(Number.isNaN(u)||Le(u))return Et(lt(s),"The value cannot be interpreted as a number.");if(Number.isInteger(u)&&!Number.isSafeInteger(u))return Et(lt(s),"The value is larger than the maximum supported integer values in number columns (2^53).");let c="";try{c=pa(u,r.format,o)}catch(h){return Et(lt(u),at(r.format)?`Failed to format the number based on the provided format configuration: (${r.format}). Error: ${h}`:`Failed to format the number. Error: ${h}`)}const d=Math.min(r.max_value,Math.max(r.min_value,u));let g;if(r.color==="auto"||r.color==="auto-inverse"){const h=r.max_value-r.min_value,m=(h===0?0:(d-r.min_value)/h)>.5;r.color==="auto"?g=m?t?.colors.greenColor:t?.colors.redColor:g=m?t?.colors.redColor:t?.colors.greenColor}else r.color&&(g=i.get(r.color)??r.color);return{...a,isMissingValue:Le(s),copyData:String(u),data:{...a.data,value:d,label:c,measureLabel:c.length>l.length?c:l,color:g}}},getCellValue(s){return s.kind===Z.Loading||s.data?.value===void 0?null:s.data?.value}}}mf.isEditableType=!1;const jb=e=>Le(e)?[]:e.filter(t=>at(t)&&t!=="").map(t=>{if(typeof t=="object"&&"value"in t){const r=lt(t.value).trim();return{value:r,label:t.label??r}}const n=lt(t).trim();return{value:n,label:n}});function vs(e){let t="string";const n=Li({options:Gc(e.arrowType)?[!0,!1]:e.arrowType.categoricalOptions??[]},e.columnTypeOptions),r=s=>typeof s=="object"&&s!==null&&"value"in s,i=s=>r(s)?typeof s.value:typeof s,o=new Set(n.options.map(i));o.size===1&&(o.has("number")||o.has("bigint")?t="number":o.has("boolean")&&(t="boolean"));const l=jb(n.options),a={kind:Z.Custom,allowOverlay:!0,copyData:"",contentAlign:e.contentAlignment,readonly:!e.isEditable,style:e.isPinned?"faded":"normal",data:{kind:"dropdown-cell",allowedValues:[...e.isRequired!==!0?[null]:[],...l],value:""}};return{...e,kind:"selectbox",sortMode:"default",typeIcon:":material/arrow_drop_down_circle:",getCell(s,u){let c=null;return at(s)&&s!==""&&(c=lt(s)),u&&!a.data.allowedValues.some(g=>g===null?c===null:typeof g=="string"?g===c:typeof g=="object"&&"value"in g?g.value===c:!1)?Et(lt(c),"The value is not part of the allowed options."):{...a,isMissingValue:c===null,copyData:c||"",data:{...a.data,value:c}}},getCellValue(s){return Le(s.data?.value)||s.data?.value===""?null:t==="number"?vo(s.data?.value)??null:t==="boolean"?nf(s.data?.value)??null:s.data?.value}}}vs.isEditableType=!0;function bs(e){const t=e.columnTypeOptions||{};let n;if(t.validate)try{n=new RegExp(t.validate,"us")}catch(o){n=`Invalid validate regex: ${t.validate}.
|
|
191
|
-
Error: ${o}`}const r={kind:Z.Text,data:"",displayData:"",allowOverlay:!0,contentAlign:e.contentAlignment,allowWrapping:e.isWrappingAllowed,readonly:!e.isEditable,style:e.isPinned?"faded":"normal"},i=o=>{if(Le(o))return!e.isRequired;let l=lt(o),a=!1;return t.max_chars&&l.length>t.max_chars&&(l=l.slice(0,t.max_chars),a=!0),n instanceof RegExp&&n.test(l)===!1?!1:a?l:!0};return{...e,kind:"text",sortMode:"default",typeIcon:":material/notes:",validateInput:i,getCell(o,l){if(typeof n=="string")return Et(lt(o),n);if(l){const a=i(o);if(a===!1)return Et(lt(o),"Invalid input.");typeof a=="string"&&(o=a)}try{const a=at(o)?lt(o):null,s=at(a)?bo(a):"";return{...r,isMissingValue:Le(a),data:a,displayData:s}}catch(a){return Et("Incompatible value",`The value cannot be interpreted as string. Error: ${a}`)}},getCellValue(o){return o.data===void 0?null:o.data}}}bs.isEditableType=!0;const nc=Jn("img",{target:"e3b94od0"})({maxWidth:"100%",maxHeight:"37.5rem",objectFit:"scale-down"}),Kb=({urls:e})=>{const t=e&&e.length>0?e[0]:"";return t.startsWith("http")?Ne("a",{href:t,target:"_blank",rel:"noreferrer noopener",children:Ne(nc,{src:t})}):Ne(nc,{src:t})},rc=new Map(Object.entries({object:wo,text:bs,checkbox:cs,selectbox:vs,list:ps,multiselect:pf,number:ms,link:gf,datetime:fs,date:gs,time:hs,line_chart:uf,bar_chart:cf,area_chart:df,image:ff,progress:mf,json:hf})),Zb=[Wb];var Jb=Yc();const Qb=pr(Jb);var vl,ic;function e1(){if(ic)return vl;ic=1;var e=lg(),t=sg(),n=ug(),r=Yc(),i=cg(),o=dg(),l=fg(),a=hg(),s="[object Map]",u="[object Set]",c=Object.prototype,d=c.hasOwnProperty;function g(h){if(h==null)return!0;if(i(h)&&(r(h)||typeof h=="string"||typeof h.splice=="function"||o(h)||a(h)||n(h)))return!h.length;var p=t(h);if(p==s||p==u)return!h.size;if(l(h))return!e(h).length;for(var m in h)if(d.call(h,m))return!1;return!0}return vl=g,vl}var t1=e1();const n1=pr(t1);function bl(e,t,n){if(!n.includes(t))return;const r=new RegExp(`${e}[,\\s].*{(?:[^}]*[\\s;]{1})?${t}:\\s*([^;}]+)[;]?.*}`,"gm");n=n.replace(/{/g," {");const i=r.exec(n);if(i)return i[1].trim()}function r1(e,t,n){const r={};if(!n.includes(t))return e;const i=bl(t,"color",n);i&&(r.textDark=i,(e.kind===Z.Bubble||e.kind===Z.Custom&&e.data?.kind==="multi-select-cell")&&(r.textBubble=i),e.kind===Z.Uri&&(r.linkColor=i));const o=bl(t,"background-color",n);o&&(r.bgCell=o),o==="yellow"&&i===void 0&&(r.textDark="#31333F");const l=bl(t,"font-weight",n);return l&&(r.baseFontStyle=`${l} ${Eg.sm}`),r?{...e,themeOverride:r}:e}function i1(e){return wg(e)||yg(e)?bs:Cg(e)?fs:jc(e)?hs:Sg(e)?gs:xg(e)||kg(e)?wo:Gc(e)?cs:Mg(e)?ms:Rg(e)?vs:Ig(e)?ps:wo}function vf(e){const t=e.length>0?e[e.length-1]:"",n=e.length>1?e.slice(0,-1).filter(r=>r!=="").join(" / "):void 0;return{title:t,group:n}}function ws(e){return{group:void 0,isEditable:!1,isIndex:!1,isPinned:!1,isHidden:!1,isStretched:!1,...e}}function o1(e,t){const n=e.columnNames.map(a=>a[t]),{title:r,group:i}=vf(n),o=e.columnTypes[t];let l=!0;return bg(o)&&(l=!1),ws({id:`_index-${t}`,indexNumber:t,name:r,title:r,group:i,isEditable:l,arrowType:o,isIndex:!0,isPinned:!0})}function a1(e,t){const n=e.columnNames.map(l=>l[t]),{title:r,group:i}=vf(n),o=e.columnTypes[t];return ws({id:`_column-${r}-${t}`,indexNumber:t,name:r,isEditable:!0,title:r,arrowType:o,group:i})}function bf(){return ws({id:"_empty-index",indexNumber:0,title:"",name:"",isEditable:!1,isIndex:!0,isPinned:!0,arrowType:{type:Tg.INDEX,arrowField:new gg("",new pg,!0),pandasType:void 0}})}function oc(e){const t=[],{dimensions:n}=e,r=n.numIndexColumns,i=n.numDataColumns;if(r===0&&i===0)return t.push(bf()),t;for(let o=0;o<r;o++)t.push(o1(e,o));for(let o=0;o<i;o++)t.push(a1(e,o+r));return t}function l1(e,t,n,r=void 0){let i;if(e.kind==="object"||e.kind==="json")i=e.getCell(at(t.content)?bo(El(t.content,t.contentType)):null);else if(["time","date","datetime"].includes(e.kind)&&at(t.content)&&(typeof t.content=="number"||typeof t.content=="bigint")){let o;jc(t.contentType)&&at(t.field?.type?.unit)?o=mg(t.content,t.field):o=Xr.utc(Number(t.content)).toDate(),i=e.getCell(o)}else if(vg(t.contentType)){const o=Le(t.content)?null:El(t.content,t.contentType);i=e.getCell(o)}else i=e.getCell(t.content);if(Di(i))return i;if(!e.isEditable){if(n&&at(n?.displayContent)){const o=bo(n.displayContent);i.kind===Z.Text?i={...i,displayData:o}:i.kind===Z.Number&&Le(e.columnTypeOptions?.format)?i={...i,displayData:o}:i.kind===Z.Uri&&Le(e.columnTypeOptions?.display_text)?i={...i,displayData:o}:i.kind===Z.Custom&&i.data?.kind==="date-picker-cell"&&Le(e.columnTypeOptions?.format)&&(i={...i,data:{...i.data,displayDate:o}})}r&&n?.cssId&&(i=r1(i,n.cssId,r))}return i}function wf(e,t){return t?t?.useStretch??!1:e.useContainerWidth??!1}function yf(e,t){return t?t.pixelWidth?t.pixelWidth:void 0:e.width||void 0}function s1(e){return e?.useContent??!1}function u1(e,t){return t?!1:e?.useStretch??!1}function c1(e,t){return t?t.pixelHeight?t.pixelHeight:void 0:e.height||void 0}function ac({numRows:e,rowHeight:t,theme:n,numHeaderRows:r=1}){return e*t+r*n.defaultHeaderHeight+2*n.tableBorderWidth}const ia="_index",lc="_pos:",sc={small:75,medium:200,large:400},Cf=ql.getLogger("useColumnLoader");function d1(e){if(!Le(e)){if(typeof e=="number")return e;if(e in sc)return sc[e]}}const Ko=(e,t)=>Dg(e,t,(r,i)=>{if(Qb(i))return i});function uc(e,t){if(!t)return e;let n={};return e.isIndex&&t.has(ia)&&(n=Ko(n,t.get(ia)??{})),t.has(`${lc}${e.indexNumber}`)&&(n=Ko(n,t.get(`${lc}${e.indexNumber}`)??{})),t.has(e.name)&&e.name!==ia&&(n=Ko(n,t.get(e.name)??{})),t.has(e.id)&&(n=Ko(n,t.get(e.id)??{})),n1(n)?e:qc({...e},{title:n.label,width:d1(n.width),isEditable:at(n.disabled)?!n.disabled:void 0,isHidden:n.hidden,isPinned:n.pinned,isRequired:n.required,columnTypeOptions:n.type_config,contentAlignment:n.alignment,defaultValue:n.default,help:n.help})}function f1(e){if(!e)return new Map;try{return new Map(Object.entries(JSON.parse(e)))}catch(t){return Cf.error(t),new Map}}function cc(e){const t=e.columnTypeOptions?.type;let n;return at(t)&&(rc.has(t)?n=rc.get(t):Cf.warn(`Unknown column type configured in column configuration: ${t}`)),Le(n)&&(n=i1(e.arrowType)),n}function h1(e,t,n,r,i){const o=Zr(),l=f.useMemo(()=>f1(e.columns),[e.columns]),[a,s]=f.useState(l);f.useEffect(()=>{s(l)},[l]);const u=f.useMemo(()=>wf(e,i),[e,i]),c=f.useMemo(()=>yf(e,i),[e,i]),d=u||at(c)&&c>0,g=at(e.rowHeight)&&e.rowHeight>tn("4rem"),h=f.useMemo(()=>oc(t).map(m=>{let y={...m,...uc(m,a),isStretched:d};const b=cc(y);return(e.editingMode===nn.EditingMode.READ_ONLY||n||b.isEditableType===!1)&&(y={...y,isEditable:!1}),e.editingMode!==nn.EditingMode.READ_ONLY&&y.isEditable==!0&&(y={...y,icon:"editable"},y.isRequired&&e.editingMode===nn.EditingMode.DYNAMIC&&(y={...y,isHidden:!1})),b(y,o)}),[t,a,d,e.editingMode,n,o]);return{columns:f.useMemo(()=>{const m=oc(t).map(x=>{let E={...x,...uc(x,a),isStretched:d,isWrappingAllowed:g};const M=cc(E);return(e.editingMode===nn.EditingMode.READ_ONLY||n||M.isEditableType===!1)&&(E={...E,isEditable:!1}),e.editingMode!==nn.EditingMode.READ_ONLY&&E.isEditable==!0&&(E={...E,icon:"editable"},E.isRequired&&e.editingMode===nn.EditingMode.DYNAMIC&&(E={...E,isHidden:!1})),M(E,o)}).filter(x=>!x.isHidden),y=[],b=[];r?.length?(m.forEach(x=>{x.isIndex&&!r.includes(x.name)&&!r.includes(x.id)&&x.isPinned!==!1&&y.push(x)}),r.forEach(x=>{const E=m.find(M=>M.name===x||M.id===x);E&&(E.isPinned?y.push(E):b.push(E))})):m.forEach(x=>{x.isPinned?y.push(x):b.push(x)});const v=[...y,...b];return v.length>0?v:[wo(bf())]},[t,a,g,d,n,e.editingMode,r,o]),allColumns:h,setColumnConfigMapping:s}}function Yr(e){return e.isIndex?ia:Le(e.name)?"":e.name}class Zo{constructor(t){this.editedCells=new Map,this.addedRows=[],this.deletedRows=[],this.numRows=0,this.numRows=t}toJson(t){const n=new Map;t.forEach(o=>{n.set(o.indexNumber,o)});const r={edited_rows:{},added_rows:[],deleted_rows:[]};return this.editedCells.forEach((o,l,a)=>{const s={};o.forEach((u,c)=>{const d=n.get(c);d&&(s[Yr(d)]=d.getCellValue(u))}),r.edited_rows[l]=s}),this.addedRows.forEach(o=>{const l={};let a=!1;o.forEach((s,u,c)=>{const d=n.get(u);if(d){const g=d.getCellValue(s);d.isRequired&&d.isEditable&&ls(s)&&(a=!0),at(g)&&(l[Yr(d)]=g)}}),a||r.added_rows.push(l)}),r.deleted_rows=this.deletedRows,JSON.stringify(r,(o,l)=>l===void 0?null:l)}fromJson(t,n){this.editedCells=new Map,this.addedRows=[],this.deletedRows=[];const r=JSON.parse(t),i=new Map;n.forEach(l=>{i.set(l.indexNumber,l)});const o=new Map;n.forEach(l=>{o.set(Yr(l),l)}),Object.keys(r.edited_rows).forEach(l=>{const a=Number(l),s=r.edited_rows[l];Object.keys(s).forEach(u=>{const c=s[u],d=o.get(u);if(d){const g=d.getCell(c);g&&(this.editedCells.has(a)||this.editedCells.set(a,new Map),this.editedCells.get(a)?.set(d.indexNumber,g))}})}),r.added_rows.forEach(l=>{const a=new Map;n.forEach(s=>{a.set(s.indexNumber,s.getCell(null))}),Object.keys(l).forEach(s=>{const u=l[s],c=o.get(s);if(c){const d=c.getCell(u);d&&a.set(c.indexNumber,d)}}),this.addedRows.push(a)}),this.deletedRows=r.deleted_rows}isAddedRow(t){return t>=this.numRows}getCell(t,n){if(this.isAddedRow(n))return this.addedRows[n-this.numRows].get(t);const r=this.editedCells.get(n);if(r!==void 0)return r.get(t)}setCell(t,n,r){if(this.isAddedRow(n)){if(n-this.numRows>=this.addedRows.length)return;this.addedRows[n-this.numRows].set(t,r)}else this.editedCells.get(n)===void 0&&this.editedCells.set(n,new Map),this.editedCells.get(n).set(t,r)}addRow(t){this.addedRows.push(t)}deleteRows(t){t.sort((n,r)=>r-n).forEach(n=>{this.deleteRow(n)})}deleteRow(t){if(!(Le(t)||t<0)){if(this.isAddedRow(t)){this.addedRows.splice(t-this.numRows,1);return}this.deletedRows.includes(t)||(this.deletedRows.push(t),this.deletedRows=this.deletedRows.sort((n,r)=>n-r)),this.editedCells.delete(t)}}getOriginalRowIndex(t){let n=t;for(let r=0;r<this.deletedRows.length&&!(this.deletedRows[r]>n);r++)n+=1;return n}getNumRows(){return this.numRows+this.addedRows.length-this.deletedRows.length}}const yo=({columnId:e,columnConfigMapping:t,updatedProps:n})=>{const r=new Map(t),i=r.get(e),o={...i||{},...n||{}};return(i?.type_config||n?.type_config)&&(o.type_config={...i?.type_config||{},...n?.type_config||{}}),r.set(e,o),r};function g1(e){return{changeColumnFormat:f.useCallback((n,r)=>{e(i=>yo({columnId:n,columnConfigMapping:i,updatedProps:{type_config:{format:r}}}))},[e])}}function p1(e,t,n,r,i,o){const l=f.useMemo(()=>e.filter(c=>c.isPinned).reduce((c,d)=>c+(d.width??r*2),0)>n*.6,[e,n,r]),a=t||l?0:e.filter(c=>c.isPinned).length,s=f.useCallback(c=>{o(d=>yo({columnId:c,columnConfigMapping:d,updatedProps:{pinned:!1}})),i(!0,!1)},[i,o]);return{pinColumn:f.useCallback(c=>{o(d=>yo({columnId:c,columnConfigMapping:d,updatedProps:{pinned:!0}})),i(!0,!1)},[i,o]),unpinColumn:s,freezeColumns:a}}function m1(e,t,n,r,i){return{onColumnMoved:f.useCallback((l,a)=>{const s=[...e],[u]=s.splice(l,1);s.splice(a,0,u),a<t&&!u.isPinned?n(u.id):a>=t&&u.isPinned&&r(u.id),i(s.map(c=>c.id))},[e,t,n,r,i])}}function v1(e){const[t,n]=f.useState(()=>new Map),r=f.useCallback((o,l,a,s)=>{o.id&&n(new Map(t).set(o.id,s))},[t]);return{columns:f.useMemo(()=>e.map(o=>o.id&&t.has(o.id)&&t.get(o.id)!==void 0?{...o,width:t.get(o.id),grow:0}:o),[e,t]),onColumnResize:r}}function b1(e){switch(e.kind){case Z.Number:return e.data?.toString()??"";case Z.Boolean:return e.data?.toString()??"";case Z.Markdown:case Z.RowID:case Z.Text:case Z.Uri:return e.data??"";case Z.Bubble:case Z.Image:return e.data.join("");case Z.Drilldown:return e.data.map(t=>t.text).join("");case Z.Protected:case Z.Loading:return"";case Z.Custom:return e.copyData}}function dc(e){if(typeof e=="number")return e;if(e.length>0){const t=Number(e);isNaN(t)||(e=t)}return e}function w1(e,t){return e=dc(e),t=dc(t),typeof e=="string"&&typeof t=="string"?e.localeCompare(t):typeof e=="number"&&typeof t=="number"?e===t?0:e>t?1:-1:e==t?0:e>t?1:-1}function y1(e,t){return e>t?1:e===t?0:-1}function C1(e){const{sort:t,rows:n,getCellContent:r}=e,i=f.useMemo(()=>t===void 0?[]:Array.isArray(t)?t:[t],[t]),o=f.useMemo(()=>i.map(u=>{const c=e.columns.findIndex(d=>u.column===d||d.id!==void 0&&u.column.id===d.id);return c===-1?void 0:c}),[i,e.columns]),l=f.useMemo(()=>{const u=i.map((d,g)=>({sort:d,col:o[g]})).filter(d=>d.col!==void 0);if(u.length===0)return;const c=u.map(()=>new Array(n));for(let d=0;d<u.length;d++){const{col:g}=u[d],h=[g,0];for(let p=0;p<n;p++)h[1]=p,c[d][p]=b1(r(h))}return Er(n).sort((d,g)=>{for(let h=0;h<u.length;h++){const{sort:p}=u[h],m=c[h][d],y=c[h][g];let b;if(p.mode==="raw"?b=y1(m,y):p.mode==="smart"?b=w1(m,y):b=m.localeCompare(y),b!==0)return(p.direction??"asc")==="desc"&&(b=-b),b}return 0})},[r,n,i,o]),a=f.useCallback(u=>l===void 0?u:l[u],[l]),s=f.useCallback(([u,c])=>l===void 0?r([u,c]):(c=l[c],r([u,c])),[r,l]);return l===void 0?{getCellContent:e.getCellContent,getOriginalIndex:a}:{getOriginalIndex:a,getCellContent:s}}function S1(e,t){return t===void 0?e:e.map(n=>n.id===t.column.id?{...n,title:t.direction==="asc"?`↑ ${n.title}`:`↓ ${n.title}`}:n)}function x1(e,t,n){const[r,i]=f.useState(),{getCellContent:o,getOriginalIndex:l}=C1({columns:t.map(u=>Vl(u)),getCellContent:n,rows:e,sort:r}),a=f.useMemo(()=>S1(t,r),[t,r]),s=f.useCallback((u,c,d)=>{const g=a[u];let h;c==="auto"?(h="asc",r&&r.column.id===g.id&&(r.direction==="asc"?h="desc":h=void 0)):h=c,h===void 0||d&&h===r?.direction?i(void 0):i({column:Vl(g),direction:h,mode:g.sortMode})},[r,a]);return{columns:a,sortColumn:s,getOriginalIndex:l,getCellContent:o}}function k1(e,t){const n=f.useCallback(i=>{t(o=>yo({columnId:i,columnConfigMapping:o,updatedProps:{hidden:!0}})),e(!0,!1)},[e,t]),r=f.useCallback(i=>{t(o=>yo({columnId:i,columnConfigMapping:o,updatedProps:{hidden:!1}})),e(!0,!1)},[e,t]);return{hideColumn:n,showColumn:r}}function M1(){return{provideEditor:f.useCallback(t=>{if(t.kind===Z.Text&&t.readonly&&Fb(t.data))return{editor:Bb}},[])}}const R1={kind:Z.Custom,isMatch:e=>e.data.kind==="sparkline-cell",needsHover:!0,needsHoverPosition:!0,draw:(e,t)=>{const{ctx:n,theme:r,rect:i,hoverAmount:o,hoverX:l}=e;let{values:a,yAxis:s,color:u,graphKind:c="area",displayValues:d,hideAxis:g}=t.data;const[h,p]=s;if(a.length===0)return!0;a=a.map(I=>Math.min(1,Math.max(0,(I-h)/(p-h))));const m=r.cellHorizontalPadding,y=m+i.x,b=i.y+3,v=i.height-6,x=i.width-m*2,E=p-h,M=p<=0?b:h>=0?b+v:b+v*(p/E);if(!g&&h<=0&&p>=0&&(n.beginPath(),n.moveTo(y,M),n.lineTo(y+x,M),n.globalAlpha=.4,n.lineWidth=1,n.strokeStyle=r.textLight,n.stroke(),n.globalAlpha=1),c==="bar"){n.beginPath();const I=2,L=(a.length-1)*I,S=(x-L)/a.length;let C=y;for(const _ of a){const D=b+v-_*v;n.moveTo(C,M),n.lineTo(C+S,M),n.lineTo(C+S,D),n.lineTo(C,D),C+=S+I}n.fillStyle=t.data.color??r.accentColor,n.fill()}else{a.length===1&&(a=[a[0],a[0]],d&&(d=[d[0],d[0]])),n.beginPath();const I=(i.width-16)/(a.length-1),L=a.map((C,_)=>({x:y+I*_,y:b+v-C*v}));n.moveTo(L[0].x,L[0].y);let S=0;if(L.length>2)for(S=1;S<L.length-2;S++){const C=(L[S].x+L[S+1].x)/2,_=(L[S].y+L[S+1].y)/2;n.quadraticCurveTo(L[S].x,L[S].y,C,_)}if(n.quadraticCurveTo(L[S].x,L[S].y,L[S+1].x,L[S+1].y),n.strokeStyle=u??r.accentColor,n.lineWidth=1+o*.5,n.stroke(),n.lineTo(i.x+i.width-m,M),n.lineTo(i.x+m,M),n.closePath(),c==="area"){n.globalAlpha=.2+.2*o;const C=n.createLinearGradient(0,b,0,b+v*1.4);C.addColorStop(0,u??r.accentColor);const[_,D,k]=go(u??r.accentColor);C.addColorStop(1,`rgba(${_}, ${D}, ${k}, 0)`),n.fillStyle=C,n.fill(),n.globalAlpha=1}if(l!==void 0&&(c==="line"||c==="area")&&d!==void 0){n.beginPath();const C=Math.min(a.length-1,Math.max(0,Math.round((l-m)/I)));n.moveTo(y+C*I,i.y+1),n.lineTo(y+C*I,i.y+i.height),n.lineWidth=1,n.strokeStyle=r.textLight,n.stroke(),n.save(),n.font=`8px ${r.fontFamily}`,n.fillStyle=r.textMedium,n.textBaseline="top",n.fillText(d[C],y,i.y+r.cellVerticalPadding),n.restore()}}return!0},provideEditor:()=>{},onPaste:(e,t)=>t};function fc(e,t,n,r,i,o){if(!(r<=0||i<=0)){if(typeof o=="number"&&o<=0){e.rect(t,n,r,i);return}typeof o=="number"&&(o={tl:o,tr:o,br:o,bl:o}),o={tl:Math.min(o.tl,i/2,r/2),tr:Math.min(o.tr,i/2,r/2),bl:Math.min(o.bl,i/2,r/2),br:Math.min(o.br,i/2,r/2)},o.tl=Math.max(0,o.tl),o.tr=Math.max(0,o.tr),o.br=Math.max(0,o.br),o.bl=Math.max(0,o.bl),e.moveTo(t+o.tl,n),e.arcTo(t+r,n,t+r,n+o.tr,o.tr),e.arcTo(t+r,n+i,t+r-o.br,n+i,o.br),e.arcTo(t,n+i,t,n+i-o.bl,o.bl),e.arcTo(t,n,t+o.tl,n,o.tl)}}function hc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Fe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hc(Object(n),!0).forEach(function(r){oo(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hc(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var I1=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function Sf(e){var t=e.defaultInputValue,n=t===void 0?"":t,r=e.defaultMenuIsOpen,i=r===void 0?!1:r,o=e.defaultValue,l=o===void 0?null:o,a=e.inputValue,s=e.menuIsOpen,u=e.onChange,c=e.onInputChange,d=e.onMenuClose,g=e.onMenuOpen,h=e.value,p=lr(e,I1),m=f.useState(a!==void 0?a:n),y=fr(m,2),b=y[0],v=y[1],x=f.useState(s!==void 0?s:i),E=fr(x,2),M=E[0],I=E[1],L=f.useState(h!==void 0?h:l),S=fr(L,2),C=S[0],_=S[1],D=f.useCallback(function(Y,oe){typeof u=="function"&&u(Y,oe),_(Y)},[u]),k=f.useCallback(function(Y,oe){var Q;typeof c=="function"&&(Q=c(Y,oe)),v(Q!==void 0?Q:Y)},[c]),T=f.useCallback(function(){typeof g=="function"&&g(),I(!0)},[g]),O=f.useCallback(function(){typeof d=="function"&&d(),I(!1)},[d]),R=a!==void 0?a:b,N=s!==void 0?s:M,q=h!==void 0?h:C;return Fe(Fe({},p),{},{inputValue:R,menuIsOpen:N,onChange:D,onInputChange:k,onMenuClose:O,onMenuOpen:T,value:q})}function E1(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const T1=Math.min,D1=Math.max,ma=Math.round,Jo=Math.floor,va=e=>({x:e,y:e});function O1(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Ra(){return typeof window<"u"}function xf(e){return Mf(e)?(e.nodeName||"").toLowerCase():"#document"}function gr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function kf(e){var t;return(t=(Mf(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Mf(e){return Ra()?e instanceof Node||e instanceof gr(e).Node:!1}function P1(e){return Ra()?e instanceof Element||e instanceof gr(e).Element:!1}function ys(e){return Ra()?e instanceof HTMLElement||e instanceof gr(e).HTMLElement:!1}function gc(e){return!Ra()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof gr(e).ShadowRoot}function Rf(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Cs(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function L1(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function _1(e){return["html","body","#document"].includes(xf(e))}function Cs(e){return gr(e).getComputedStyle(e)}function F1(e){if(xf(e)==="html")return e;const t=e.assignedSlot||e.parentNode||gc(e)&&e.host||kf(e);return gc(t)?t.host:t}function If(e){const t=F1(e);return _1(t)?e.ownerDocument?e.ownerDocument.body:e.body:ys(t)&&Rf(t)?t:If(t)}function ba(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=If(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),l=gr(i);if(o){const a=$l(l);return t.concat(l,l.visualViewport||[],Rf(i)?i:[],a&&n?ba(a):[])}return t.concat(i,ba(i,[],n))}function $l(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function A1(e){const t=Cs(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=ys(e),o=i?e.offsetWidth:n,l=i?e.offsetHeight:r,a=ma(n)!==o||ma(r)!==l;return a&&(n=o,r=l),{width:n,height:r,$:a}}function Ss(e){return P1(e)?e:e.contextElement}function pc(e){const t=Ss(e);if(!ys(t))return va(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=A1(t);let l=(o?ma(n.width):n.width)/r,a=(o?ma(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!a||!Number.isFinite(a))&&(a=1),{x:l,y:a}}const H1=va(0);function z1(e){const t=gr(e);return!L1()||!t.visualViewport?H1:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function V1(e,t,n){return!1}function mc(e,t,n,r){t===void 0&&(t=!1);const i=e.getBoundingClientRect(),o=Ss(e);let l=va(1);t&&(l=pc(e));const a=V1()?z1(o):va(0);let s=(i.left+a.x)/l.x,u=(i.top+a.y)/l.y,c=i.width/l.x,d=i.height/l.y;if(o){const g=gr(o),h=r;let p=g,m=$l(p);for(;m&&r&&h!==p;){const y=pc(m),b=m.getBoundingClientRect(),v=Cs(m),x=b.left+(m.clientLeft+parseFloat(v.paddingLeft))*y.x,E=b.top+(m.clientTop+parseFloat(v.paddingTop))*y.y;s*=y.x,u*=y.y,c*=y.x,d*=y.y,s+=x,u+=E,p=gr(m),m=$l(p)}}return O1({width:c,height:d,x:s,y:u})}function $1(e,t){let n=null,r;const i=kf(e);function o(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function l(a,s){a===void 0&&(a=!1),s===void 0&&(s=1),o();const{left:u,top:c,width:d,height:g}=e.getBoundingClientRect();if(a||t(),!d||!g)return;const h=Jo(c),p=Jo(i.clientWidth-(u+d)),m=Jo(i.clientHeight-(c+g)),y=Jo(u),v={rootMargin:-h+"px "+-p+"px "+-m+"px "+-y+"px",threshold:D1(0,T1(1,s))||1};let x=!0;function E(M){const I=M[0].intersectionRatio;if(I!==s){if(!x)return l();I?l(!1,I):r=setTimeout(()=>{l(!1,1e-7)},1e3)}x=!1}try{n=new IntersectionObserver(E,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(E,v)}n.observe(e)}return l(!0),o}function N1(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:s=!1}=r,u=Ss(e),c=i||o?[...u?ba(u):[],...ba(t)]:[];c.forEach(b=>{i&&b.addEventListener("scroll",n,{passive:!0}),o&&b.addEventListener("resize",n)});const d=u&&a?$1(u,n):null;let g=-1,h=null;l&&(h=new ResizeObserver(b=>{let[v]=b;v&&v.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var x;(x=h)==null||x.observe(t)})),n()}),u&&!s&&h.observe(u),h.observe(t));let p,m=s?mc(e):null;s&&y();function y(){const b=mc(e);m&&(b.x!==m.x||b.y!==m.y||b.width!==m.width||b.height!==m.height)&&n(),m=b,p=requestAnimationFrame(y)}return n(),()=>{var b;c.forEach(v=>{i&&v.removeEventListener("scroll",n),o&&v.removeEventListener("resize",n)}),d?.(),(b=h)==null||b.disconnect(),h=null,s&&cancelAnimationFrame(p)}}var Nl=f.useLayoutEffect,B1=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],wa=function(){};function W1(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function U1(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var o=[].concat(r);if(t&&e)for(var l in t)t.hasOwnProperty(l)&&t[l]&&o.push("".concat(W1(e,l)));return o.filter(function(a){return a}).map(function(a){return String(a).trim()}).join(" ")}var ya=function(t){return Q1(t)?t.filter(Boolean):Og(t)==="object"&&t!==null?[t]:[]},Ef=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var n=lr(t,B1);return Fe({},n)},Yt=function(t,n,r){var i=t.cx,o=t.getStyles,l=t.getClassNames,a=t.className;return{css:o(n,t),className:i(r??{},l(n,t),a)}};function Ia(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function q1(e){return Ia(e)?window.innerHeight:e.clientHeight}function Tf(e){return Ia(e)?window.pageYOffset:e.scrollTop}function Ca(e,t){if(Ia(e)){window.scrollTo(0,t);return}e.scrollTop=t}function X1(e){var t=getComputedStyle(e),n=t.position==="absolute",r=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var i=e;i=i.parentElement;)if(t=getComputedStyle(i),!(n&&t.position==="static")&&r.test(t.overflow+t.overflowY+t.overflowX))return i;return document.documentElement}function G1(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function Qo(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:wa,i=Tf(e),o=t-i,l=10,a=0;function s(){a+=l;var u=G1(a,i,o,n);Ca(e,u),a<n?window.requestAnimationFrame(s):r(e)}s()}function vc(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=t.offsetHeight/3;r.bottom+i>n.bottom?Ca(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+i,e.scrollHeight)):r.top-i<n.top&&Ca(e,Math.max(t.offsetTop-i,0))}function Y1(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function bc(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function j1(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var Df=!1,K1={get passive(){return Df=!0}},ea=typeof window<"u"?window:{};ea.addEventListener&&ea.removeEventListener&&(ea.addEventListener("p",wa,K1),ea.removeEventListener("p",wa,!1));var Z1=Df;function J1(e){return e!=null}function Q1(e){return Array.isArray(e)}function ao(e,t,n){return e?t:n}var ew=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=Object.entries(t).filter(function(l){var a=fr(l,1),s=a[0];return!r.includes(s)});return o.reduce(function(l,a){var s=fr(a,2),u=s[0],c=s[1];return l[u]=c,l},{})},tw=["children","innerProps"],nw=["children","innerProps"];function rw(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,i=e.placement,o=e.shouldScroll,l=e.isFixedPosition,a=e.controlHeight,s=X1(n),u={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return u;var c=s.getBoundingClientRect(),d=c.height,g=n.getBoundingClientRect(),h=g.bottom,p=g.height,m=g.top,y=n.offsetParent.getBoundingClientRect(),b=y.top,v=l?window.innerHeight:q1(s),x=Tf(s),E=parseInt(getComputedStyle(n).marginBottom,10),M=parseInt(getComputedStyle(n).marginTop,10),I=b-M,L=v-m,S=I+x,C=d-x-m,_=h-v+x+E,D=x+m-M,k=160;switch(i){case"auto":case"bottom":if(L>=p)return{placement:"bottom",maxHeight:t};if(C>=p&&!l)return o&&Qo(s,_,k),{placement:"bottom",maxHeight:t};if(!l&&C>=r||l&&L>=r){o&&Qo(s,_,k);var T=l?L-E:C-E;return{placement:"bottom",maxHeight:T}}if(i==="auto"||l){var O=t,R=l?I:S;return R>=r&&(O=Math.min(R-E-a,t)),{placement:"top",maxHeight:O}}if(i==="bottom")return o&&Ca(s,_),{placement:"bottom",maxHeight:t};break;case"top":if(I>=p)return{placement:"top",maxHeight:t};if(S>=p&&!l)return o&&Qo(s,D,k),{placement:"top",maxHeight:t};if(!l&&S>=r||l&&I>=r){var N=t;return(!l&&S>=r||l&&I>=r)&&(N=l?I-M:S-M),o&&Qo(s,D,k),{placement:"top",maxHeight:N}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return u}function iw(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var Of=function(t){return t==="auto"?"bottom":t},ow=function(t,n){var r,i=t.placement,o=t.theme,l=o.borderRadius,a=o.spacing,s=o.colors;return Fe((r={label:"menu"},oo(r,iw(i),"100%"),oo(r,"position","absolute"),oo(r,"width","100%"),oo(r,"zIndex",1),r),n?{}:{backgroundColor:s.neutral0,borderRadius:l,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},Pf=f.createContext(null),aw=function(t){var n=t.children,r=t.minMenuHeight,i=t.maxMenuHeight,o=t.menuPlacement,l=t.menuPosition,a=t.menuShouldScrollIntoView,s=t.theme,u=f.useContext(Pf)||{},c=u.setPortalPlacement,d=f.useRef(null),g=f.useState(i),h=fr(g,2),p=h[0],m=h[1],y=f.useState(null),b=fr(y,2),v=b[0],x=b[1],E=s.spacing.controlHeight;return Nl(function(){var M=d.current;if(M){var I=l==="fixed",L=a&&!I,S=rw({maxHeight:i,menuEl:M,minHeight:r,placement:o,shouldScroll:L,isFixedPosition:I,controlHeight:E});m(S.maxHeight),x(S.placement),c?.(S.placement)}},[i,o,l,a,r,c,E]),n({ref:d,placerProps:Fe(Fe({},t),{},{placement:v||Of(o),maxHeight:p})})},lw=function(t){var n=t.children,r=t.innerRef,i=t.innerProps;return Ae("div",$e({},Yt(t,"menu",{menu:!0}),{ref:r},i),n)},sw=lw,uw=function(t,n){var r=t.maxHeight,i=t.theme.spacing.baseUnit;return Fe({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:i,paddingTop:i})},cw=function(t){var n=t.children,r=t.innerProps,i=t.innerRef,o=t.isMulti;return Ae("div",$e({},Yt(t,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:i},r),n)},Lf=function(t,n){var r=t.theme,i=r.spacing.baseUnit,o=r.colors;return Fe({textAlign:"center"},n?{}:{color:o.neutral40,padding:"".concat(i*2,"px ").concat(i*3,"px")})},dw=Lf,fw=Lf,hw=function(t){var n=t.children,r=n===void 0?"No options":n,i=t.innerProps,o=lr(t,tw);return Ae("div",$e({},Yt(Fe(Fe({},o),{},{children:r,innerProps:i}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),i),r)},gw=function(t){var n=t.children,r=n===void 0?"Loading...":n,i=t.innerProps,o=lr(t,nw);return Ae("div",$e({},Yt(Fe(Fe({},o),{},{children:r,innerProps:i}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),i),r)},pw=function(t){var n=t.rect,r=t.offset,i=t.position;return{left:n.left,position:i,top:r,width:n.width,zIndex:1}},mw=function(t){var n=t.appendTo,r=t.children,i=t.controlElement,o=t.innerProps,l=t.menuPlacement,a=t.menuPosition,s=f.useRef(null),u=f.useRef(null),c=f.useState(Of(l)),d=fr(c,2),g=d[0],h=d[1],p=f.useMemo(function(){return{setPortalPlacement:h}},[]),m=f.useState(null),y=fr(m,2),b=y[0],v=y[1],x=f.useCallback(function(){if(i){var L=Y1(i),S=a==="fixed"?0:window.pageYOffset,C=L[g]+S;(C!==b?.offset||L.left!==b?.rect.left||L.width!==b?.rect.width)&&v({offset:C,rect:L})}},[i,a,g,b?.offset,b?.rect.left,b?.rect.width]);Nl(function(){x()},[x]);var E=f.useCallback(function(){typeof u.current=="function"&&(u.current(),u.current=null),i&&s.current&&(u.current=N1(i,s.current,x,{elementResize:"ResizeObserver"in window}))},[i,x]);Nl(function(){E()},[E]);var M=f.useCallback(function(L){s.current=L,E()},[E]);if(!n&&a!=="fixed"||!b)return null;var I=Ae("div",$e({ref:M},Yt(Fe(Fe({},t),{},{offset:b.offset,position:a,rect:b.rect}),"menuPortal",{"menu-portal":!0}),o),r);return Ae(Pf.Provider,{value:p},n?Kc.createPortal(I,n):I)},vw=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},bw=function(t){var n=t.children,r=t.innerProps,i=t.isDisabled,o=t.isRtl;return Ae("div",$e({},Yt(t,"container",{"--is-disabled":i,"--is-rtl":o}),r),n)},ww=function(t,n){var r=t.theme.spacing,i=t.isMulti,o=t.hasValue,l=t.selectProps.controlShouldRenderValue;return Fe({alignItems:"center",display:i&&o&&l?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},yw=function(t){var n=t.children,r=t.innerProps,i=t.isMulti,o=t.hasValue;return Ae("div",$e({},Yt(t,"valueContainer",{"value-container":!0,"value-container--is-multi":i,"value-container--has-value":o}),r),n)},Cw=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},Sw=function(t){var n=t.children,r=t.innerProps;return Ae("div",$e({},Yt(t,"indicatorsContainer",{indicators:!0}),r),n)},wc,xw=["size"],kw=["innerProps","isRtl","size"],Mw={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},_f=function(t){var n=t.size,r=lr(t,xw);return Ae("svg",$e({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Mw},r))},xs=function(t){return Ae(_f,$e({size:20},t),Ae("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Ff=function(t){return Ae(_f,$e({size:20},t),Ae("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Af=function(t,n){var r=t.isFocused,i=t.theme,o=i.spacing.baseUnit,l=i.colors;return Fe({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?l.neutral60:l.neutral20,padding:o*2,":hover":{color:r?l.neutral80:l.neutral40}})},Rw=Af,Iw=function(t){var n=t.children,r=t.innerProps;return Ae("div",$e({},Yt(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||Ae(Ff,null))},Ew=Af,Tw=function(t){var n=t.children,r=t.innerProps;return Ae("div",$e({},Yt(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||Ae(xs,null))},Dw=function(t,n){var r=t.isDisabled,i=t.theme,o=i.spacing.baseUnit,l=i.colors;return Fe({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?l.neutral10:l.neutral20,marginBottom:o*2,marginTop:o*2})},Ow=function(t){var n=t.innerProps;return Ae("span",$e({},n,Yt(t,"indicatorSeparator",{"indicator-separator":!0})))},Pw=Pg(wc||(wc=E1([`
|
|
192
|
-
0%, 80%, 100% { opacity: 0; }
|
|
193
|
-
40% { opacity: 1; }
|
|
194
|
-
`]))),Lw=function(t,n){var r=t.isFocused,i=t.size,o=t.theme,l=o.colors,a=o.spacing.baseUnit;return Fe({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:i,lineHeight:1,marginRight:i,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?l.neutral60:l.neutral20,padding:a*2})},wl=function(t){var n=t.delay,r=t.offset;return Ae("span",{css:Zc({animation:"".concat(Pw," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},_w=function(t){var n=t.innerProps,r=t.isRtl,i=t.size,o=i===void 0?4:i,l=lr(t,kw);return Ae("div",$e({},Yt(Fe(Fe({},l),{},{innerProps:n,isRtl:r,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),Ae(wl,{delay:0,offset:r}),Ae(wl,{delay:160,offset:!0}),Ae(wl,{delay:320,offset:!r}))},Fw=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.theme,l=o.colors,a=o.borderRadius,s=o.spacing;return Fe({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:s.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?l.neutral5:l.neutral0,borderColor:r?l.neutral10:i?l.primary:l.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(l.primary):void 0,"&:hover":{borderColor:i?l.primary:l.neutral30}})},Aw=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.innerRef,l=t.innerProps,a=t.menuIsOpen;return Ae("div",$e({ref:o},Yt(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":i,"control--menu-is-open":a}),l,{"aria-disabled":r||void 0}),n)},Hw=Aw,zw=["data"],Vw=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},$w=function(t){var n=t.children,r=t.cx,i=t.getStyles,o=t.getClassNames,l=t.Heading,a=t.headingProps,s=t.innerProps,u=t.label,c=t.theme,d=t.selectProps;return Ae("div",$e({},Yt(t,"group",{group:!0}),s),Ae(l,$e({},a,{selectProps:d,theme:c,getStyles:i,getClassNames:o,cx:r}),u),Ae("div",null,n))},Nw=function(t,n){var r=t.theme,i=r.colors,o=r.spacing;return Fe({label:"group",cursor:"default",display:"block"},n?{}:{color:i.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:o.baseUnit*3,paddingRight:o.baseUnit*3,textTransform:"uppercase"})},Bw=function(t){var n=Ef(t);n.data;var r=lr(n,zw);return Ae("div",$e({},Yt(t,"groupHeading",{"group-heading":!0}),r))},Ww=$w,Uw=["innerRef","isDisabled","isHidden","inputClassName"],qw=function(t,n){var r=t.isDisabled,i=t.value,o=t.theme,l=o.spacing,a=o.colors;return Fe(Fe({visibility:r?"hidden":"visible",transform:i?"translateZ(0)":""},Xw),n?{}:{margin:l.baseUnit/2,paddingBottom:l.baseUnit/2,paddingTop:l.baseUnit/2,color:a.neutral80})},Hf={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},Xw={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Fe({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Hf)},Gw=function(t){return Fe({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},Hf)},Yw=function(t){var n=t.cx,r=t.value,i=Ef(t),o=i.innerRef,l=i.isDisabled,a=i.isHidden,s=i.inputClassName,u=lr(i,Uw);return Ae("div",$e({},Yt(t,"input",{"input-container":!0}),{"data-value":r||""}),Ae("input",$e({className:n({input:!0},s),ref:o,style:Gw(a),disabled:l},u)))},jw=Yw,Kw=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,l=r.colors;return Fe({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:l.neutral10,borderRadius:o/2,margin:i.baseUnit/2})},Zw=function(t,n){var r=t.theme,i=r.borderRadius,o=r.colors,l=t.cropWithEllipsis;return Fe({overflow:"hidden",textOverflow:l||l===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:i/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},Jw=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,l=r.colors,a=t.isFocused;return Fe({alignItems:"center",display:"flex"},n?{}:{borderRadius:o/2,backgroundColor:a?l.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:l.dangerLight,color:l.danger}})},zf=function(t){var n=t.children,r=t.innerProps;return Ae("div",r,n)},Qw=zf,ey=zf;function ty(e){var t=e.children,n=e.innerProps;return Ae("div",$e({role:"button"},n),t||Ae(xs,{size:14}))}var ny=function(t){var n=t.children,r=t.components,i=t.data,o=t.innerProps,l=t.isDisabled,a=t.removeProps,s=t.selectProps,u=r.Container,c=r.Label,d=r.Remove;return Ae(u,{data:i,innerProps:Fe(Fe({},Yt(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":l})),o),selectProps:s},Ae(c,{data:i,innerProps:Fe({},Yt(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},n),Ae(d,{data:i,innerProps:Fe(Fe({},Yt(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},a),selectProps:s}))},ry=ny,iy=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.isSelected,l=t.theme,a=l.spacing,s=l.colors;return Fe({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:o?s.primary:i?s.primary25:"transparent",color:r?s.neutral20:o?s.neutral0:"inherit",padding:"".concat(a.baseUnit*2,"px ").concat(a.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:o?s.primary:s.primary50}})},oy=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.isSelected,l=t.innerRef,a=t.innerProps;return Ae("div",$e({},Yt(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":i,"option--is-selected":o}),{ref:l,"aria-disabled":r},a),n)},ay=oy,ly=function(t,n){var r=t.theme,i=r.spacing,o=r.colors;return Fe({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:o.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},sy=function(t){var n=t.children,r=t.innerProps;return Ae("div",$e({},Yt(t,"placeholder",{placeholder:!0}),r),n)},uy=sy,cy=function(t,n){var r=t.isDisabled,i=t.theme,o=i.spacing,l=i.colors;return Fe({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?l.neutral40:l.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},dy=function(t){var n=t.children,r=t.isDisabled,i=t.innerProps;return Ae("div",$e({},Yt(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),i),n)},fy=dy,ks={ClearIndicator:Tw,Control:Hw,DropdownIndicator:Iw,DownChevron:Ff,CrossIcon:xs,Group:Ww,GroupHeading:Bw,IndicatorsContainer:Sw,IndicatorSeparator:Ow,Input:jw,LoadingIndicator:_w,Menu:sw,MenuList:cw,MenuPortal:mw,LoadingMessage:gw,NoOptionsMessage:hw,MultiValue:ry,MultiValueContainer:Qw,MultiValueLabel:ey,MultiValueRemove:ty,Option:ay,Placeholder:uy,SelectContainer:bw,SingleValue:fy,ValueContainer:yw},hy=function(t){return Fe(Fe({},ks),t.components)},yc=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function gy(e,t){return!!(e===t||yc(e)&&yc(t))}function py(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!gy(e[n],t[n]))return!1;return!0}function my(e,t){t===void 0&&(t=py);var n=null;function r(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(n&&n.lastThis===this&&t(i,n.lastArgs))return n.lastResult;var l=e.apply(this,i);return n={lastResult:l,lastArgs:i,lastThis:this},l}return r.clear=function(){n=null},r}var vy={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},by=function(t){return Ae("span",$e({css:vy},t))},Cc=by,wy={guidance:function(t){var n=t.isSearchable,r=t.isMulti,i=t.tabSelectsValue,o=t.context,l=t.isInitialFocus;switch(o){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(i?", press Tab to select the option and exit the menu":"",".");case"input":return l?"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var n=t.action,r=t.label,i=r===void 0?"":r,o=t.labels,l=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(i,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return l?"option ".concat(i," is disabled. Select another option."):"option ".concat(i,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,i=t.options,o=t.label,l=o===void 0?"":o,a=t.selectValue,s=t.isDisabled,u=t.isSelected,c=t.isAppleDevice,d=function(m,y){return m&&m.length?"".concat(m.indexOf(y)+1," of ").concat(m.length):""};if(n==="value"&&a)return"value ".concat(l," focused, ").concat(d(a,r),".");if(n==="menu"&&c){var g=s?" disabled":"",h="".concat(u?" selected":"").concat(g);return"".concat(l).concat(h,", ").concat(d(i,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},yy=function(t){var n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,o=t.focusableOptions,l=t.isFocused,a=t.selectValue,s=t.selectProps,u=t.id,c=t.isAppleDevice,d=s.ariaLiveMessages,g=s.getOptionLabel,h=s.inputValue,p=s.isMulti,m=s.isOptionDisabled,y=s.isSearchable,b=s.menuIsOpen,v=s.options,x=s.screenReaderStatus,E=s.tabSelectsValue,M=s.isLoading,I=s["aria-label"],L=s["aria-live"],S=f.useMemo(function(){return Fe(Fe({},wy),d||{})},[d]),C=f.useMemo(function(){var R="";if(n&&S.onChange){var N=n.option,q=n.options,Y=n.removedValue,oe=n.removedValues,Q=n.value,re=function(P){return Array.isArray(P)?null:P},ue=Y||N||re(Q),ae=ue?g(ue):"",de=q||oe||void 0,he=de?de.map(g):[],ce=Fe({isDisabled:ue&&m(ue,a),label:ae,labels:he},n);R=S.onChange(ce)}return R},[n,S,m,a,g]),_=f.useMemo(function(){var R="",N=r||i,q=!!(r&&a&&a.includes(r));if(N&&S.onFocus){var Y={focused:N,label:g(N),isDisabled:m(N,a),isSelected:q,options:o,context:N===r?"menu":"value",selectValue:a,isAppleDevice:c};R=S.onFocus(Y)}return R},[r,i,g,m,S,o,a,c]),D=f.useMemo(function(){var R="";if(b&&v.length&&!M&&S.onFilter){var N=x({count:o.length});R=S.onFilter({inputValue:h,resultsMessage:N})}return R},[o,h,b,S,v,x,M]),k=n?.action==="initial-input-focus",T=f.useMemo(function(){var R="";if(S.guidance){var N=i?"value":b?"menu":"input";R=S.guidance({"aria-label":I,context:N,isDisabled:r&&m(r,a),isMulti:p,isSearchable:y,tabSelectsValue:E,isInitialFocus:k})}return R},[I,r,i,p,m,y,b,S,a,E,k]),O=Ae(f.Fragment,null,Ae("span",{id:"aria-selection"},C),Ae("span",{id:"aria-focused"},_),Ae("span",{id:"aria-results"},D),Ae("span",{id:"aria-guidance"},T));return Ae(f.Fragment,null,Ae(Cc,{id:u},k&&O),Ae(Cc,{"aria-live":L,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},l&&!k&&O))},Cy=yy,Bl=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],Sy=new RegExp("["+Bl.map(function(e){return e.letters}).join("")+"]","g"),Vf={};for(var yl=0;yl<Bl.length;yl++)for(var Cl=Bl[yl],Sl=0;Sl<Cl.letters.length;Sl++)Vf[Cl.letters[Sl]]=Cl.base;var $f=function(t){return t.replace(Sy,function(n){return Vf[n]})},xy=my($f),Sc=function(t){return t.replace(/^\s+|\s+$/g,"")},ky=function(t){return"".concat(t.label," ").concat(t.value)},My=function(t){return function(n,r){if(n.data.__isNew__)return!0;var i=Fe({ignoreCase:!0,ignoreAccents:!0,stringify:ky,trim:!0,matchFrom:"any"},t),o=i.ignoreCase,l=i.ignoreAccents,a=i.stringify,s=i.trim,u=i.matchFrom,c=s?Sc(r):r,d=s?Sc(a(n)):a(n);return o&&(c=c.toLowerCase(),d=d.toLowerCase()),l&&(c=xy(c),d=$f(d)),u==="start"?d.substr(0,c.length)===c:d.indexOf(c)>-1}},Ry=["innerRef"];function Iy(e){var t=e.innerRef,n=lr(e,Ry),r=ew(n,"onExited","in","enter","exit","appear");return Ae("input",$e({ref:t},r,{css:Zc({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var Ey=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function Ty(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,i=e.onTopArrive,o=e.onTopLeave,l=f.useRef(!1),a=f.useRef(!1),s=f.useRef(0),u=f.useRef(null),c=f.useCallback(function(y,b){if(u.current!==null){var v=u.current,x=v.scrollTop,E=v.scrollHeight,M=v.clientHeight,I=u.current,L=b>0,S=E-M-x,C=!1;S>b&&l.current&&(r&&r(y),l.current=!1),L&&a.current&&(o&&o(y),a.current=!1),L&&b>S?(n&&!l.current&&n(y),I.scrollTop=E,C=!0,l.current=!0):!L&&-b>x&&(i&&!a.current&&i(y),I.scrollTop=0,C=!0,a.current=!0),C&&Ey(y)}},[n,r,i,o]),d=f.useCallback(function(y){c(y,y.deltaY)},[c]),g=f.useCallback(function(y){s.current=y.changedTouches[0].clientY},[]),h=f.useCallback(function(y){var b=s.current-y.changedTouches[0].clientY;c(y,b)},[c]),p=f.useCallback(function(y){if(y){var b=Z1?{passive:!1}:!1;y.addEventListener("wheel",d,b),y.addEventListener("touchstart",g,b),y.addEventListener("touchmove",h,b)}},[h,g,d]),m=f.useCallback(function(y){y&&(y.removeEventListener("wheel",d,!1),y.removeEventListener("touchstart",g,!1),y.removeEventListener("touchmove",h,!1))},[h,g,d]);return f.useEffect(function(){if(t){var y=u.current;return p(y),function(){m(y)}}},[t,p,m]),function(y){u.current=y}}var xc=["boxSizing","height","overflow","paddingRight","position"],kc={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Mc(e){e.cancelable&&e.preventDefault()}function Rc(e){e.stopPropagation()}function Ic(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Ec(){return"ontouchstart"in window||navigator.maxTouchPoints}var Tc=!!(typeof window<"u"&&window.document&&window.document.createElement),ro=0,Si={capture:!1,passive:!1};function Dy(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,i=f.useRef({}),o=f.useRef(null),l=f.useCallback(function(s){if(Tc){var u=document.body,c=u&&u.style;if(r&&xc.forEach(function(p){var m=c&&c[p];i.current[p]=m}),r&&ro<1){var d=parseInt(i.current.paddingRight,10)||0,g=document.body?document.body.clientWidth:0,h=window.innerWidth-g+d||0;Object.keys(kc).forEach(function(p){var m=kc[p];c&&(c[p]=m)}),c&&(c.paddingRight="".concat(h,"px"))}u&&Ec()&&(u.addEventListener("touchmove",Mc,Si),s&&(s.addEventListener("touchstart",Ic,Si),s.addEventListener("touchmove",Rc,Si))),ro+=1}},[r]),a=f.useCallback(function(s){if(Tc){var u=document.body,c=u&&u.style;ro=Math.max(ro-1,0),r&&ro<1&&xc.forEach(function(d){var g=i.current[d];c&&(c[d]=g)}),u&&Ec()&&(u.removeEventListener("touchmove",Mc,Si),s&&(s.removeEventListener("touchstart",Ic,Si),s.removeEventListener("touchmove",Rc,Si)))}},[r]);return f.useEffect(function(){if(t){var s=o.current;return l(s),function(){a(s)}}},[t,l,a]),function(s){o.current=s}}var Oy=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},Py={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function Ly(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,i=r===void 0?!0:r,o=e.onBottomArrive,l=e.onBottomLeave,a=e.onTopArrive,s=e.onTopLeave,u=Ty({isEnabled:i,onBottomArrive:o,onBottomLeave:l,onTopArrive:a,onTopLeave:s}),c=Dy({isEnabled:n}),d=function(h){u(h),c(h)};return Ae(f.Fragment,null,n&&Ae("div",{onClick:Oy,css:Py}),t(d))}var _y={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},Fy=function(t){var n=t.name,r=t.onFocus;return Ae("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:_y,value:"",onChange:function(){}})},Ay=Fy;function Ms(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function Hy(){return Ms(/^iPhone/i)}function Nf(){return Ms(/^Mac/i)}function zy(){return Ms(/^iPad/i)||Nf()&&navigator.maxTouchPoints>1}function Vy(){return Hy()||zy()}function $y(){return Nf()||Vy()}var Ny=function(t){return t.label},Bf=function(t){return t.label},Wf=function(t){return t.value},By=function(t){return!!t.isDisabled},Wy={clearIndicator:Ew,container:vw,control:Fw,dropdownIndicator:Rw,group:Vw,groupHeading:Nw,indicatorsContainer:Cw,indicatorSeparator:Dw,input:qw,loadingIndicator:Lw,loadingMessage:fw,menu:ow,menuList:uw,menuPortal:pw,multiValue:Kw,multiValueLabel:Zw,multiValueRemove:Jw,noOptionsMessage:dw,option:iy,placeholder:ly,singleValue:cy,valueContainer:ww},Uy={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},qy=4,Uf=4,Xy=38,Gy=Uf*2,Yy={baseUnit:Uf,controlHeight:Xy,menuGutter:Gy},xl={borderRadius:qy,colors:Uy,spacing:Yy},jy={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:bc(),captureMenuScroll:!bc(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:My(),formatGroupLabel:Ny,getOptionLabel:Bf,getOptionValue:Wf,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:By,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!j1(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function Dc(e,t,n,r){var i=Gf(e,t,n),o=Yf(e,t,n),l=Xf(e,t),a=Sa(e,t);return{type:"option",data:t,isDisabled:i,isSelected:o,label:l,value:a,index:r}}function oa(e,t){return e.options.map(function(n,r){if("options"in n){var i=n.options.map(function(l,a){return Dc(e,l,t,a)}).filter(function(l){return Pc(e,l)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var o=Dc(e,n,t,r);return Pc(e,o)?o:void 0}).filter(J1)}function qf(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,Ti(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function Oc(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,Ti(r.options.map(function(i){return{data:i.data,id:"".concat(t,"-").concat(r.index,"-").concat(i.index)}}))):n.push({data:r.data,id:"".concat(t,"-").concat(r.index)}),n},[])}function Ky(e,t){return qf(oa(e,t))}function Pc(e,t){var n=e.inputValue,r=n===void 0?"":n,i=t.data,o=t.isSelected,l=t.label,a=t.value;return(!Kf(e)||!o)&&jf(e,{label:l,value:a,data:i},r)}function Zy(e,t){var n=e.focusedValue,r=e.selectValue,i=r.indexOf(n);if(i>-1){var o=t.indexOf(n);if(o>-1)return n;if(i<t.length)return t[i]}return null}function Jy(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var kl=function(t,n){var r,i=(r=t.find(function(o){return o.data===n}))===null||r===void 0?void 0:r.id;return i||null},Xf=function(t,n){return t.getOptionLabel(n)},Sa=function(t,n){return t.getOptionValue(n)};function Gf(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function Yf(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=Sa(e,t);return n.some(function(i){return Sa(e,i)===r})}function jf(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var Kf=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},Qy=1,Rs=function(e){ep(n,e);var t=rp(n);function n(r){var i;if(np(this,n),i=t.call(this,r),i.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},i.blockOptionHover=!1,i.isComposing=!1,i.commonProps=void 0,i.initialTouchX=0,i.initialTouchY=0,i.openAfterFocus=!1,i.scrollToFocusedOptionOnUpdate=!1,i.userIsDragging=void 0,i.isAppleDevice=$y(),i.controlRef=null,i.getControlRef=function(s){i.controlRef=s},i.focusedOptionRef=null,i.getFocusedOptionRef=function(s){i.focusedOptionRef=s},i.menuListRef=null,i.getMenuListRef=function(s){i.menuListRef=s},i.inputRef=null,i.getInputRef=function(s){i.inputRef=s},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(s,u){var c=i.props,d=c.onChange,g=c.name;u.name=g,i.ariaOnChange(s,u),d(s,u)},i.setValue=function(s,u,c){var d=i.props,g=d.closeMenuOnSelect,h=d.isMulti,p=d.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:p}),g&&(i.setState({inputIsHiddenAfterUpdate:!h}),i.onMenuClose()),i.setState({clearFocusValueOnUpdate:!0}),i.onChange(s,{action:u,option:c})},i.selectOption=function(s){var u=i.props,c=u.blurInputOnSelect,d=u.isMulti,g=u.name,h=i.state.selectValue,p=d&&i.isOptionSelected(s,h),m=i.isOptionDisabled(s,h);if(p){var y=i.getOptionValue(s);i.setValue(h.filter(function(b){return i.getOptionValue(b)!==y}),"deselect-option",s)}else if(!m)d?i.setValue([].concat(Ti(h),[s]),"select-option",s):i.setValue(s,"select-option");else{i.ariaOnChange(s,{action:"select-option",option:s,name:g});return}c&&i.blurInput()},i.removeValue=function(s){var u=i.props.isMulti,c=i.state.selectValue,d=i.getOptionValue(s),g=c.filter(function(p){return i.getOptionValue(p)!==d}),h=ao(u,g,g[0]||null);i.onChange(h,{action:"remove-value",removedValue:s}),i.focusInput()},i.clearValue=function(){var s=i.state.selectValue;i.onChange(ao(i.props.isMulti,[],null),{action:"clear",removedValues:s})},i.popValue=function(){var s=i.props.isMulti,u=i.state.selectValue,c=u[u.length-1],d=u.slice(0,u.length-1),g=ao(s,d,d[0]||null);c&&i.onChange(g,{action:"pop-value",removedValue:c})},i.getFocusedOptionId=function(s){return kl(i.state.focusableOptionsWithIds,s)},i.getFocusableOptionsWithIds=function(){return Oc(oa(i.props,i.state.selectValue),i.getElementId("option"))},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var s=arguments.length,u=new Array(s),c=0;c<s;c++)u[c]=arguments[c];return U1.apply(void 0,[i.props.classNamePrefix].concat(u))},i.getOptionLabel=function(s){return Xf(i.props,s)},i.getOptionValue=function(s){return Sa(i.props,s)},i.getStyles=function(s,u){var c=i.props.unstyled,d=Wy[s](u,c);d.boxSizing="border-box";var g=i.props.styles[s];return g?g(d,u):d},i.getClassNames=function(s,u){var c,d;return(c=(d=i.props.classNames)[s])===null||c===void 0?void 0:c.call(d,u)},i.getElementId=function(s){return"".concat(i.state.instancePrefix,"-").concat(s)},i.getComponents=function(){return hy(i.props)},i.buildCategorizedOptions=function(){return oa(i.props,i.state.selectValue)},i.getCategorizedOptions=function(){return i.props.menuIsOpen?i.buildCategorizedOptions():[]},i.buildFocusableOptions=function(){return qf(i.buildCategorizedOptions())},i.getFocusableOptions=function(){return i.props.menuIsOpen?i.buildFocusableOptions():[]},i.ariaOnChange=function(s,u){i.setState({ariaSelection:Fe({value:s},u)})},i.onMenuMouseDown=function(s){s.button===0&&(s.stopPropagation(),s.preventDefault(),i.focusInput())},i.onMenuMouseMove=function(s){i.blockOptionHover=!1},i.onControlMouseDown=function(s){if(!s.defaultPrevented){var u=i.props.openMenuOnClick;i.state.isFocused?i.props.menuIsOpen?s.target.tagName!=="INPUT"&&s.target.tagName!=="TEXTAREA"&&i.onMenuClose():u&&i.openMenu("first"):(u&&(i.openAfterFocus=!0),i.focusInput()),s.target.tagName!=="INPUT"&&s.target.tagName!=="TEXTAREA"&&s.preventDefault()}},i.onDropdownIndicatorMouseDown=function(s){if(!(s&&s.type==="mousedown"&&s.button!==0)&&!i.props.isDisabled){var u=i.props,c=u.isMulti,d=u.menuIsOpen;i.focusInput(),d?(i.setState({inputIsHiddenAfterUpdate:!c}),i.onMenuClose()):i.openMenu("first"),s.preventDefault()}},i.onClearIndicatorMouseDown=function(s){s&&s.type==="mousedown"&&s.button!==0||(i.clearValue(),s.preventDefault(),i.openAfterFocus=!1,s.type==="touchend"?i.focusInput():setTimeout(function(){return i.focusInput()}))},i.onScroll=function(s){typeof i.props.closeMenuOnScroll=="boolean"?s.target instanceof HTMLElement&&Ia(s.target)&&i.props.onMenuClose():typeof i.props.closeMenuOnScroll=="function"&&i.props.closeMenuOnScroll(s)&&i.props.onMenuClose()},i.onCompositionStart=function(){i.isComposing=!0},i.onCompositionEnd=function(){i.isComposing=!1},i.onTouchStart=function(s){var u=s.touches,c=u&&u.item(0);c&&(i.initialTouchX=c.clientX,i.initialTouchY=c.clientY,i.userIsDragging=!1)},i.onTouchMove=function(s){var u=s.touches,c=u&&u.item(0);if(c){var d=Math.abs(c.clientX-i.initialTouchX),g=Math.abs(c.clientY-i.initialTouchY),h=5;i.userIsDragging=d>h||g>h}},i.onTouchEnd=function(s){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(s.target)&&i.menuListRef&&!i.menuListRef.contains(s.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(s){i.userIsDragging||i.onControlMouseDown(s)},i.onClearIndicatorTouchEnd=function(s){i.userIsDragging||i.onClearIndicatorMouseDown(s)},i.onDropdownIndicatorTouchEnd=function(s){i.userIsDragging||i.onDropdownIndicatorMouseDown(s)},i.handleInputChange=function(s){var u=i.props.inputValue,c=s.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(c,{action:"input-change",prevInputValue:u}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(s){i.props.onFocus&&i.props.onFocus(s),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(s){var u=i.props.inputValue;if(i.menuListRef&&i.menuListRef.contains(document.activeElement)){i.inputRef.focus();return}i.props.onBlur&&i.props.onBlur(s),i.onInputChange("",{action:"input-blur",prevInputValue:u}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1})},i.onOptionHover=function(s){if(!(i.blockOptionHover||i.state.focusedOption===s)){var u=i.getFocusableOptions(),c=u.indexOf(s);i.setState({focusedOption:s,focusedOptionId:c>-1?i.getFocusedOptionId(s):null})}},i.shouldHideSelectedOptions=function(){return Kf(i.props)},i.onValueInputFocus=function(s){s.preventDefault(),s.stopPropagation(),i.focus()},i.onKeyDown=function(s){var u=i.props,c=u.isMulti,d=u.backspaceRemovesValue,g=u.escapeClearsValue,h=u.inputValue,p=u.isClearable,m=u.isDisabled,y=u.menuIsOpen,b=u.onKeyDown,v=u.tabSelectsValue,x=u.openMenuOnFocus,E=i.state,M=E.focusedOption,I=E.focusedValue,L=E.selectValue;if(!m&&!(typeof b=="function"&&(b(s),s.defaultPrevented))){switch(i.blockOptionHover=!0,s.key){case"ArrowLeft":if(!c||h)return;i.focusValue("previous");break;case"ArrowRight":if(!c||h)return;i.focusValue("next");break;case"Delete":case"Backspace":if(h)return;if(I)i.removeValue(I);else{if(!d)return;c?i.popValue():p&&i.clearValue()}break;case"Tab":if(i.isComposing||s.shiftKey||!y||!v||!M||x&&i.isOptionSelected(M,L))return;i.selectOption(M);break;case"Enter":if(s.keyCode===229)break;if(y){if(!M||i.isComposing)return;i.selectOption(M);break}return;case"Escape":y?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:h}),i.onMenuClose()):p&&g&&i.clearValue();break;case" ":if(h)return;if(!y){i.openMenu("first");break}if(!M)return;i.selectOption(M);break;case"ArrowUp":y?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":y?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!y)return;i.focusOption("pageup");break;case"PageDown":if(!y)return;i.focusOption("pagedown");break;case"Home":if(!y)return;i.focusOption("first");break;case"End":if(!y)return;i.focusOption("last");break;default:return}s.preventDefault()}},i.state.instancePrefix="react-select-"+(i.props.instanceId||++Qy),i.state.selectValue=ya(r.value),r.menuIsOpen&&i.state.selectValue.length){var o=i.getFocusableOptionsWithIds(),l=i.buildFocusableOptions(),a=l.indexOf(i.state.selectValue[0]);i.state.focusableOptionsWithIds=o,i.state.focusedOption=l[a],i.state.focusedOptionId=kl(o,l[a])}return i}return tp(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&vc(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(i){var o=this.props,l=o.isDisabled,a=o.menuIsOpen,s=this.state.isFocused;(s&&!l&&i.isDisabled||s&&a&&!i.menuIsOpen)&&this.focusInput(),s&&l&&!i.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!s&&!l&&i.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(vc(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(i,o){this.props.onInputChange(i,o)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(i){var o=this,l=this.state,a=l.selectValue,s=l.isFocused,u=this.buildFocusableOptions(),c=i==="first"?0:u.length-1;if(!this.props.isMulti){var d=u.indexOf(a[0]);d>-1&&(c=d)}this.scrollToFocusedOptionOnUpdate=!(s&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:u[c],focusedOptionId:this.getFocusedOptionId(u[c])},function(){return o.onMenuOpen()})}},{key:"focusValue",value:function(i){var o=this.state,l=o.selectValue,a=o.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var s=l.indexOf(a);a||(s=-1);var u=l.length-1,c=-1;if(l.length){switch(i){case"previous":s===0?c=0:s===-1?c=u:c=s-1;break;case"next":s>-1&&s<u&&(c=s+1);break}this.setState({inputIsHidden:c!==-1,focusedValue:l[c]})}}}},{key:"focusOption",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",o=this.props.pageSize,l=this.state.focusedOption,a=this.getFocusableOptions();if(a.length){var s=0,u=a.indexOf(l);l||(u=-1),i==="up"?s=u>0?u-1:a.length-1:i==="down"?s=(u+1)%a.length:i==="pageup"?(s=u-o,s<0&&(s=0)):i==="pagedown"?(s=u+o,s>a.length-1&&(s=a.length-1)):i==="last"&&(s=a.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:a[s],focusedValue:null,focusedOptionId:this.getFocusedOptionId(a[s])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(xl):Fe(Fe({},xl),this.props.theme):xl}},{key:"getCommonProps",value:function(){var i=this.clearValue,o=this.cx,l=this.getStyles,a=this.getClassNames,s=this.getValue,u=this.selectOption,c=this.setValue,d=this.props,g=d.isMulti,h=d.isRtl,p=d.options,m=this.hasValue();return{clearValue:i,cx:o,getStyles:l,getClassNames:a,getValue:s,hasValue:m,isMulti:g,isRtl:h,options:p,selectOption:u,selectProps:d,setValue:c,theme:this.getTheme()}}},{key:"hasValue",value:function(){var i=this.state.selectValue;return i.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var i=this.props,o=i.isClearable,l=i.isMulti;return o===void 0?l:o}},{key:"isOptionDisabled",value:function(i,o){return Gf(this.props,i,o)}},{key:"isOptionSelected",value:function(i,o){return Yf(this.props,i,o)}},{key:"filterOption",value:function(i,o){return jf(this.props,i,o)}},{key:"formatOptionLabel",value:function(i,o){if(typeof this.props.formatOptionLabel=="function"){var l=this.props.inputValue,a=this.state.selectValue;return this.props.formatOptionLabel(i,{context:o,inputValue:l,selectValue:a})}else return this.getOptionLabel(i)}},{key:"formatGroupLabel",value:function(i){return this.props.formatGroupLabel(i)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var i=this.props,o=i.isDisabled,l=i.isSearchable,a=i.inputId,s=i.inputValue,u=i.tabIndex,c=i.form,d=i.menuIsOpen,g=i.required,h=this.getComponents(),p=h.Input,m=this.state,y=m.inputIsHidden,b=m.ariaSelection,v=this.commonProps,x=a||this.getElementId("input"),E=Fe(Fe(Fe({"aria-autocomplete":"list","aria-expanded":d,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":g,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},d&&{"aria-controls":this.getElementId("listbox")}),!l&&{"aria-readonly":!0}),this.hasValue()?b?.action==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return l?f.createElement(p,$e({},v,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:x,innerRef:this.getInputRef,isDisabled:o,isHidden:y,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:u,form:c,type:"text",value:s},E)):f.createElement(Iy,$e({id:x,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:wa,onFocus:this.onInputFocus,disabled:o,tabIndex:u,inputMode:"none",form:c,value:""},E))}},{key:"renderPlaceholderOrValue",value:function(){var i=this,o=this.getComponents(),l=o.MultiValue,a=o.MultiValueContainer,s=o.MultiValueLabel,u=o.MultiValueRemove,c=o.SingleValue,d=o.Placeholder,g=this.commonProps,h=this.props,p=h.controlShouldRenderValue,m=h.isDisabled,y=h.isMulti,b=h.inputValue,v=h.placeholder,x=this.state,E=x.selectValue,M=x.focusedValue,I=x.isFocused;if(!this.hasValue()||!p)return b?null:f.createElement(d,$e({},g,{key:"placeholder",isDisabled:m,isFocused:I,innerProps:{id:this.getElementId("placeholder")}}),v);if(y)return E.map(function(S,C){var _=S===M,D="".concat(i.getOptionLabel(S),"-").concat(i.getOptionValue(S));return f.createElement(l,$e({},g,{components:{Container:a,Label:s,Remove:u},isFocused:_,isDisabled:m,key:D,index:C,removeProps:{onClick:function(){return i.removeValue(S)},onTouchEnd:function(){return i.removeValue(S)},onMouseDown:function(T){T.preventDefault()}},data:S}),i.formatOptionLabel(S,"value"))});if(b)return null;var L=E[0];return f.createElement(c,$e({},g,{data:L,isDisabled:m}),this.formatOptionLabel(L,"value"))}},{key:"renderClearIndicator",value:function(){var i=this.getComponents(),o=i.ClearIndicator,l=this.commonProps,a=this.props,s=a.isDisabled,u=a.isLoading,c=this.state.isFocused;if(!this.isClearable()||!o||s||!this.hasValue()||u)return null;var d={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return f.createElement(o,$e({},l,{innerProps:d,isFocused:c}))}},{key:"renderLoadingIndicator",value:function(){var i=this.getComponents(),o=i.LoadingIndicator,l=this.commonProps,a=this.props,s=a.isDisabled,u=a.isLoading,c=this.state.isFocused;if(!o||!u)return null;var d={"aria-hidden":"true"};return f.createElement(o,$e({},l,{innerProps:d,isDisabled:s,isFocused:c}))}},{key:"renderIndicatorSeparator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator,l=i.IndicatorSeparator;if(!o||!l)return null;var a=this.commonProps,s=this.props.isDisabled,u=this.state.isFocused;return f.createElement(l,$e({},a,{isDisabled:s,isFocused:u}))}},{key:"renderDropdownIndicator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator;if(!o)return null;var l=this.commonProps,a=this.props.isDisabled,s=this.state.isFocused,u={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return f.createElement(o,$e({},l,{innerProps:u,isDisabled:a,isFocused:s}))}},{key:"renderMenu",value:function(){var i=this,o=this.getComponents(),l=o.Group,a=o.GroupHeading,s=o.Menu,u=o.MenuList,c=o.MenuPortal,d=o.LoadingMessage,g=o.NoOptionsMessage,h=o.Option,p=this.commonProps,m=this.state.focusedOption,y=this.props,b=y.captureMenuScroll,v=y.inputValue,x=y.isLoading,E=y.loadingMessage,M=y.minMenuHeight,I=y.maxMenuHeight,L=y.menuIsOpen,S=y.menuPlacement,C=y.menuPosition,_=y.menuPortalTarget,D=y.menuShouldBlockScroll,k=y.menuShouldScrollIntoView,T=y.noOptionsMessage,O=y.onMenuScrollToTop,R=y.onMenuScrollToBottom;if(!L)return null;var N=function(ae,de){var he=ae.type,ce=ae.data,H=ae.isDisabled,P=ae.isSelected,G=ae.label,se=ae.value,le=m===ce,ve=H?void 0:function(){return i.onOptionHover(ce)},ge=H?void 0:function(){return i.selectOption(ce)},Je="".concat(i.getElementId("option"),"-").concat(de),ke={id:Je,onClick:ge,onMouseMove:ve,onMouseOver:ve,tabIndex:-1,role:"option","aria-selected":i.isAppleDevice?void 0:P};return f.createElement(h,$e({},p,{innerProps:ke,data:ce,isDisabled:H,isSelected:P,key:Je,label:G,type:he,value:se,isFocused:le,innerRef:le?i.getFocusedOptionRef:void 0}),i.formatOptionLabel(ae.data,"menu"))},q;if(this.hasOptions())q=this.getCategorizedOptions().map(function(ue){if(ue.type==="group"){var ae=ue.data,de=ue.options,he=ue.index,ce="".concat(i.getElementId("group"),"-").concat(he),H="".concat(ce,"-heading");return f.createElement(l,$e({},p,{key:ce,data:ae,options:de,Heading:a,headingProps:{id:H,data:ue.data},label:i.formatGroupLabel(ue.data)}),ue.options.map(function(P){return N(P,"".concat(he,"-").concat(P.index))}))}else if(ue.type==="option")return N(ue,"".concat(ue.index))});else if(x){var Y=E({inputValue:v});if(Y===null)return null;q=f.createElement(d,p,Y)}else{var oe=T({inputValue:v});if(oe===null)return null;q=f.createElement(g,p,oe)}var Q={minMenuHeight:M,maxMenuHeight:I,menuPlacement:S,menuPosition:C,menuShouldScrollIntoView:k},re=f.createElement(aw,$e({},p,Q),function(ue){var ae=ue.ref,de=ue.placerProps,he=de.placement,ce=de.maxHeight;return f.createElement(s,$e({},p,Q,{innerRef:ae,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove},isLoading:x,placement:he}),f.createElement(Ly,{captureEnabled:b,onTopArrive:O,onBottomArrive:R,lockEnabled:D},function(H){return f.createElement(u,$e({},p,{innerRef:function(G){i.getMenuListRef(G),H(G)},innerProps:{role:"listbox","aria-multiselectable":p.isMulti,id:i.getElementId("listbox")},isLoading:x,maxHeight:ce,focusedOption:m}),q)}))});return _||C==="fixed"?f.createElement(c,$e({},p,{appendTo:_,controlElement:this.controlRef,menuPlacement:S,menuPosition:C}),re):re}},{key:"renderFormField",value:function(){var i=this,o=this.props,l=o.delimiter,a=o.isDisabled,s=o.isMulti,u=o.name,c=o.required,d=this.state.selectValue;if(c&&!this.hasValue()&&!a)return f.createElement(Ay,{name:u,onFocus:this.onValueInputFocus});if(!(!u||a))if(s)if(l){var g=d.map(function(m){return i.getOptionValue(m)}).join(l);return f.createElement("input",{name:u,type:"hidden",value:g})}else{var h=d.length>0?d.map(function(m,y){return f.createElement("input",{key:"i-".concat(y),name:u,type:"hidden",value:i.getOptionValue(m)})}):f.createElement("input",{name:u,type:"hidden",value:""});return f.createElement("div",null,h)}else{var p=d[0]?this.getOptionValue(d[0]):"";return f.createElement("input",{name:u,type:"hidden",value:p})}}},{key:"renderLiveRegion",value:function(){var i=this.commonProps,o=this.state,l=o.ariaSelection,a=o.focusedOption,s=o.focusedValue,u=o.isFocused,c=o.selectValue,d=this.getFocusableOptions();return f.createElement(Cy,$e({},i,{id:this.getElementId("live-region"),ariaSelection:l,focusedOption:a,focusedValue:s,isFocused:u,selectValue:c,focusableOptions:d,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var i=this.getComponents(),o=i.Control,l=i.IndicatorsContainer,a=i.SelectContainer,s=i.ValueContainer,u=this.props,c=u.className,d=u.id,g=u.isDisabled,h=u.menuIsOpen,p=this.state.isFocused,m=this.commonProps=this.getCommonProps();return f.createElement(a,$e({},m,{className:c,innerProps:{id:d,onKeyDown:this.onKeyDown},isDisabled:g,isFocused:p}),this.renderLiveRegion(),f.createElement(o,$e({},m,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:g,isFocused:p,menuIsOpen:h}),f.createElement(s,$e({},m,{isDisabled:g}),this.renderPlaceholderOrValue(),this.renderInput()),f.createElement(l,$e({},m,{isDisabled:g}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(i,o){var l=o.prevProps,a=o.clearFocusValueOnUpdate,s=o.inputIsHiddenAfterUpdate,u=o.ariaSelection,c=o.isFocused,d=o.prevWasFocused,g=o.instancePrefix,h=i.options,p=i.value,m=i.menuIsOpen,y=i.inputValue,b=i.isMulti,v=ya(p),x={};if(l&&(p!==l.value||h!==l.options||m!==l.menuIsOpen||y!==l.inputValue)){var E=m?Ky(i,v):[],M=m?Oc(oa(i,v),"".concat(g,"-option")):[],I=a?Zy(o,v):null,L=Jy(o,E),S=kl(M,L);x={selectValue:v,focusedOption:L,focusedOptionId:S,focusableOptionsWithIds:M,focusedValue:I,clearFocusValueOnUpdate:!1}}var C=s!=null&&i!==l?{inputIsHidden:s,inputIsHiddenAfterUpdate:void 0}:{},_=u,D=c&&d;return c&&!D&&(_={value:ao(b,v,v[0]||null),options:v,action:"initial-input-focus"},D=!d),u?.action==="initial-input-focus"&&(_=null),Fe(Fe(Fe({},x),C),{},{prevProps:i,ariaSelection:_,prevWasFocused:D})}}]),n}(f.Component);Rs.defaultProps=jy;var eC=f.forwardRef(function(e,t){var n=Sf(e);return f.createElement(Rs,$e({ref:t},n))}),Zf=eC;const tC=e=>{const{Menu:t}=ks,{children:n,...r}=e;return f.createElement(t,{...r},n)},nC=sn("div")({name:"Wrap",class:"gdg-wghi2zc",propsAsIs:!1}),rC=sn("div")({name:"PortalWrap",class:"gdg-p13nj8j0",propsAsIs:!1}),iC=sn("div")({name:"ReadOnlyWrap",class:"gdg-r6sia3g",propsAsIs:!1}),oC=e=>{const{value:t,onFinishedEditing:n,initialValue:r,portalElementRef:i}=e,{allowedValues:o,value:l}=t.data,[a,s]=f.useState(l),[u,c]=f.useState(r??""),d=Ad(),g=f.useMemo(()=>o.map(h=>typeof h=="string"||h===null||h===void 0?{value:h,label:h?.toString()??""}:h),[o]);return t.readonly?f.createElement(iC,null,f.createElement(Qr,{highlight:!0,autoFocus:!1,disabled:!0,value:a??"",onChange:()=>{}})):f.createElement(nC,null,f.createElement(Zf,{className:"glide-select",inputValue:u,onInputChange:c,menuPlacement:"auto",value:g.find(h=>h.value===a),styles:{control:h=>({...h,border:0,boxShadow:"none"}),option:(h,{isFocused:p})=>({...h,fontSize:d.editorFontSize,fontFamily:d.fontFamily,cursor:p?"pointer":void 0,paddingLeft:d.cellHorizontalPadding,paddingRight:d.cellHorizontalPadding,":active":{...h[":active"],color:d.accentFg},":empty::after":{content:'" "',visibility:"hidden"}})},theme:h=>({...h,colors:{...h.colors,neutral0:d.bgCell,neutral5:d.bgCell,neutral10:d.bgCell,neutral20:d.bgCellMedium,neutral30:d.bgCellMedium,neutral40:d.bgCellMedium,neutral50:d.textLight,neutral60:d.textMedium,neutral70:d.textMedium,neutral80:d.textDark,neutral90:d.textDark,neutral100:d.textDark,primary:d.accentColor,primary75:d.accentColor,primary50:d.accentColor,primary25:d.accentLight}}),menuPortalTarget:i?.current??document.getElementById("portal"),autoFocus:!0,openMenuOnFocus:!0,components:{DropdownIndicator:()=>null,IndicatorSeparator:()=>null,Menu:h=>f.createElement(rC,null,f.createElement(tC,{className:"click-outside-ignore",...h}))},options:g,onChange:async h=>{h!==null&&(s(h.value),await new Promise(p=>window.requestAnimationFrame(p)),n({...t,data:{...t.data,value:h.value}}))}}))},aC={kind:Z.Custom,isMatch:e=>e.data.kind==="dropdown-cell",draw:(e,t)=>{const{ctx:n,theme:r,rect:i}=e,{value:o}=t.data,l=t.data.allowedValues.find(s=>typeof s=="string"||s===null||s===void 0?s===o:s.value===o),a=typeof l=="string"?l:l?.label??"";return a&&(n.fillStyle=r.textDark,n.fillText(a,i.x+r.cellHorizontalPadding,i.y+i.height/2+Qn(n,r))),!0},measure:(e,t,n)=>{const{value:r}=t.data;return(r?e.measureText(r).width:0)+n.cellHorizontalPadding*2},provideEditor:()=>({editor:oC,disablePadding:!0,deletedValue:e=>({...e,copyData:"",data:{...e.data,value:""}})}),onPaste:(e,t)=>({...t,value:t.allowedValues.some(n=>n==null?!1:typeof n=="string"?n===e:n.value===e)?e:t.value})};function lC(e,t){const n=/(\d+\.?\d*)\s*(px|rem|em|%|pt)/,r=e.match(n);if(r){const i=parseFloat(r[1]),o=r[2],l=i*t;return e.replace(n,`${Number(l.toPrecision(3))}${o}`)}return e}const sC={marginRight:8},uC={display:"flex",alignItems:"center",flexGrow:1},cC={kind:Z.Custom,isMatch:e=>e.data.kind==="range-cell",draw:(e,t)=>{const{ctx:n,theme:r,rect:i}=e,{min:o,max:l,value:a,label:s,measureLabel:u,color:c}=t.data,d=i.x+r.cellHorizontalPadding,g=i.y+i.height/2,h=l-o,p=(a-o)/h,m=`${lC(r.baseFontStyle,.9)} ${r.fontFamily}`,b=es(n,m)/2;n.save();let v=0;s!==void 0&&(n.font=m,v=Or(u??s,n,m).width+r.cellHorizontalPadding);const x=i.width-r.cellHorizontalPadding*2-v;if(x>=b){const E=n.createLinearGradient(d,g,d+x,g),M=c??r.accentColor;E.addColorStop(0,M),E.addColorStop(p,M),E.addColorStop(p,r.bgBubble),E.addColorStop(1,r.bgBubble),n.beginPath(),n.fillStyle=E,fc(n,d,g-b/2,x,b,b/2),n.fill(),n.beginPath(),fc(n,d+.5,g-b/2+.5,x-1,b-1,(b-1)/2),n.strokeStyle=r.accentLight,n.lineWidth=1,n.stroke()}return s!==void 0&&(n.textAlign="right",n.fillStyle=r.textDark,n.fillText(s,i.x+i.width-r.cellHorizontalPadding,g+Qn(n,m))),n.restore(),!0},provideEditor:()=>e=>{const{data:t,readonly:n}=e.value,r=t.value.toString(),i=t.min.toString(),o=t.max.toString(),l=t.step.toString(),a=s=>{e.onChange({...e.value,data:{...t,value:Number(s.target.value)}})};return f.createElement("label",{style:uC},f.createElement("input",{style:sC,type:"range",value:r,min:i,max:o,step:l,onChange:a,disabled:n}),r)},onPaste:(e,t)=>{let n=Number.parseFloat(e);return n=Number.isNaN(n)?t.value:Math.max(t.min,Math.min(t.max,n)),{...t,value:n}}},dC=sn("input")({name:"StyledInputBox",class:"gdg-s1wtovjx",propsAsIs:!1}),Ml=(e,t,n)=>{if(t==null)return"";n&&(t=new Date(t.getTime()+n));const r=t.toISOString();switch(e){case"date":return r.split("T")[0];case"datetime-local":return r.replace("Z","");case"time":return r.split("T")[1].replace("Z","");default:throw new Error(`Unknown date kind ${e}`)}},fC=e=>{const t=e.value.data,{format:n,displayDate:r}=t,i=t.step!==void 0&&!Number.isNaN(Number(t.step))?Number(t.step):void 0,o=t.timezoneOffset?t.timezoneOffset*60*1e3:0,l=t.min instanceof Date?Ml(n,t.min,o):t.min,a=t.max instanceof Date?Ml(n,t.max,o):t.max,s=Ml(n,t.date,o);return e.value.readonly?$t.createElement(Qr,{highlight:!0,autoFocus:!1,disabled:!0,value:r??"",onChange:()=>{}}):$t.createElement(dC,{"data-testid":"date-picker-cell",required:!0,type:n,defaultValue:s,min:l,max:a,step:i,autoFocus:!0,onChange:u=>{isNaN(u.target.valueAsNumber)?e.onChange({...e.value,data:{...e.value.data,date:void 0}}):e.onChange({...e.value,data:{...e.value.data,date:new Date(u.target.valueAsNumber-o)}})}})},hC={kind:Z.Custom,isMatch:e=>e.data.kind==="date-picker-cell",draw:(e,t)=>{const{displayDate:n}=t.data;return Ql(e,n,t.contentAlign),!0},measure:(e,t,n)=>{const{displayDate:r}=t.data;return e.measureText(r).width+n.cellHorizontalPadding*2},provideEditor:()=>({editor:fC}),onPaste:(e,t)=>{let n=NaN;return e&&(n=Number(e).valueOf(),Number.isNaN(n)&&(n=Date.parse(e),t.format==="time"&&Number.isNaN(n)&&(n=Date.parse(`1970-01-01T${e}Z`)))),{...t,date:Number.isNaN(n)?void 0:new Date(n)}}};var gC=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],Lc=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,i=String(t).toLowerCase(),o=String(r.getOptionValue(n)).toLowerCase(),l=String(r.getOptionLabel(n)).toLowerCase();return o===i||l===i},Rl={formatCreateLabel:function(t){return'Create "'.concat(t,'"')},isValidNewOption:function(t,n,r,i){return!(!t||n.some(function(o){return Lc(t,o,i)})||r.some(function(o){return Lc(t,o,i)}))},getNewOptionData:function(t,n){return{label:n,value:t,__isNew__:!0}}};function pC(e){var t=e.allowCreateWhileLoading,n=t===void 0?!1:t,r=e.createOptionPosition,i=r===void 0?"last":r,o=e.formatCreateLabel,l=o===void 0?Rl.formatCreateLabel:o,a=e.isValidNewOption,s=a===void 0?Rl.isValidNewOption:a,u=e.getNewOptionData,c=u===void 0?Rl.getNewOptionData:u,d=e.onCreateOption,g=e.options,h=g===void 0?[]:g,p=e.onChange,m=lr(e,gC),y=m.getOptionValue,b=y===void 0?Wf:y,v=m.getOptionLabel,x=v===void 0?Bf:v,E=m.inputValue,M=m.isLoading,I=m.isMulti,L=m.value,S=m.name,C=f.useMemo(function(){return s(E,ya(L),h,{getOptionValue:b,getOptionLabel:x})?c(E,l(E)):void 0},[l,c,x,b,E,s,h,L]),_=f.useMemo(function(){return(n||!M)&&C?i==="first"?[C].concat(Ti(h)):[].concat(Ti(h),[C]):h},[n,i,M,C,h]),D=f.useCallback(function(k,T){if(T.action!=="select-option")return p(k,T);var O=Array.isArray(k)?k:[k];if(O[O.length-1]===C){if(d)d(E);else{var R=c(E,E),N={action:"create-option",name:S,option:R};p(ao(I,[].concat(Ti(ya(L)),[R]),R),N)}return}p(k,T)},[c,E,I,S,C,d,p,L]);return Fe(Fe({},m),{},{options:_,onChange:D})}var mC=f.forwardRef(function(e,t){var n=Sf(e),r=pC(n);return f.createElement(Rs,$e({ref:t},r))}),vC=mC;const Is="__value",bC=new RegExp(`^${Is}\\d+__`),wC=sn("div")({name:"Wrap",class:"gdg-w1i61rz",propsAsIs:!1}),yC=sn("div")({name:"PortalWrap",class:"gdg-phbadu4",propsAsIs:!1}),aa=e=>e.map(t=>typeof t=="string"||t===null||t===void 0?{value:t,label:t??"",color:void 0}:{value:t.value,label:t.label??t.value??"",color:t.color??void 0}),Jf=(e,t,n)=>e==null?[]:e.map((r,i)=>{const o=n?`${Is}${i}__`:"",l=t.find(a=>a.value===r);return l?{...l,value:`${o}${l.value}`}:{value:`${o}${r}`,label:r}}),CC=e=>{const{Menu:t}=ks,{children:n,...r}=e;return f.createElement(t,{...r},n)},SC=e=>{const{value:t,initialValue:n,onChange:r,onFinishedEditing:i,portalElementRef:o}=e,{options:l,values:a,allowCreation:s,allowDuplicates:u}=t.data,c=Ad(),[d,g]=f.useState(a),[h,p]=f.useState(!0),[m,y]=f.useState(n??""),b=f.useMemo(()=>aa(l??[]),[l]),v=s&&u&&b.length===0,x=f.useCallback(S=>{h&&S.stopPropagation()},[h]),E={control:(S,C)=>({...S,border:0,boxShadow:"none",backgroundColor:c.bgCell,pointerEvents:C.isDisabled?"auto":S.pointerEvents,cursor:C.isDisabled?"default":S.cursor}),valueContainer:S=>({...S,flexWrap:S.flexWrap??"wrap",overflowX:"auto",overflowY:"hidden"}),menu:S=>({...S,backgroundColor:c.bgCell}),option:(S,C)=>({...S,fontSize:c.editorFontSize,fontFamily:c.fontFamily,color:c.textDark,...C.isFocused?{backgroundColor:c.accentLight,cursor:"pointer"}:{},":active":{...S[":active"],color:c.accentFg,backgroundColor:c.accentColor}}),input:(S,{isDisabled:C})=>C?{display:"none"}:{...S,fontSize:c.editorFontSize,fontFamily:c.fontFamily,color:c.textDark},placeholder:S=>({...S,fontSize:c.editorFontSize,fontFamily:c.fontFamily,color:c.textLight}),noOptionsMessage:S=>({...S,fontSize:c.editorFontSize,fontFamily:c.fontFamily,color:c.textLight}),clearIndicator:S=>({...S,color:c.textLight,":hover":{color:c.textDark,cursor:"pointer"}}),multiValue:(S,{data:C})=>({...S,backgroundColor:C.color??c.bgBubble,borderRadius:`${c.roundingRadius??c.bubbleHeight/2}px`,flexShrink:0,whiteSpace:"nowrap"}),multiValueLabel:(S,{data:C,isDisabled:_})=>({...S,paddingRight:_?c.bubblePadding:0,paddingLeft:c.bubblePadding,paddingTop:0,paddingBottom:0,color:C.color?Ol(C.color)>.5?"black":"white":c.textBubble,fontSize:c.editorFontSize,fontFamily:c.fontFamily,justifyContent:"center",alignItems:"center",display:"flex",height:c.bubbleHeight,whiteSpace:"nowrap"}),multiValueRemove:(S,{data:C,isDisabled:_,isFocused:D})=>_?{display:"none"}:{...S,color:C.color?Ol(C.color)>.5?"black":"white":c.textBubble,backgroundColor:void 0,borderRadius:D?`${c.roundingRadius??c.bubbleHeight/2}px`:void 0,":hover":{cursor:"pointer"}}},M=f.useCallback(S=>{const C=S.map(_=>u&&_.startsWith(Is)?_.replace(new RegExp(bC),""):_);g(C),r({...t,data:{...t.data,values:C}})},[t,r,u]),I=S=>{switch(S.key){case"Enter":case"Tab":if(!m){i(t,[0,1]);return}u&&s&&(y(""),M([...d??[],m]),p(!1),S.preventDefault())}},L=s?vC:Zf;return f.createElement(wC,{onKeyDown:x,"data-testid":"multi-select-cell"},f.createElement(L,{className:"gdg-multi-select",isMulti:!0,isDisabled:t.readonly,isClearable:!0,isSearchable:!0,inputValue:m,onInputChange:y,options:b,placeholder:t.readonly?"":s?"Add...":void 0,noOptionsMessage:S=>s&&u&&S.inputValue?`Create "${S.inputValue}"`:void 0,menuIsOpen:t.readonly?!1:h,onMenuOpen:()=>p(!0),onMenuClose:()=>p(!1),value:Jf(d,b,u),onKeyDown:t.readonly?void 0:I,menuPlacement:"auto",menuPortalTarget:o?.current??document.getElementById("portal"),autoFocus:!0,openMenuOnFocus:!0,openMenuOnClick:!0,closeMenuOnSelect:!0,backspaceRemovesValue:!0,escapeClearsValue:!1,styles:E,components:{DropdownIndicator:()=>null,IndicatorSeparator:()=>null,Menu:S=>v?null:f.createElement(yC,null,f.createElement(CC,{className:"click-outside-ignore",...S}))},onChange:async S=>{S!==null&&M(S.map(C=>C.value))}}))},xC={kind:Z.Custom,isMatch:e=>e.data.kind==="multi-select-cell",draw:(e,t)=>{const{ctx:n,theme:r,rect:i,highlighted:o}=e,{values:l,options:a}=t.data;if(l==null)return!0;const s=aa(a??[]),u={x:i.x+r.cellHorizontalPadding,y:i.y+r.cellVerticalPadding,width:i.width-2*r.cellHorizontalPadding,height:i.height-2*r.cellVerticalPadding},c=Math.max(1,Math.floor(u.height/(r.bubbleHeight+r.bubblePadding)));let{x:d}=u,g=1,h=c===1?u.y+(u.height-r.bubbleHeight)/2:u.y+(u.height-c*r.bubbleHeight-(c-1)*r.bubblePadding)/2;for(const p of l){const m=s.find(M=>M.value===p),y=m?.color??(o?r.bgBubbleSelected:r.bgBubble),b=m?.label??p,x=Or(b,n).width+r.bubblePadding*2,E=r.bubbleHeight/2;if(d!==u.x&&d+x>u.x+u.width&&g<c&&(g++,h+=r.bubbleHeight+r.bubblePadding,d=u.x),n.fillStyle=y,n.beginPath(),Zn(n,d,h,x,r.bubbleHeight,r.roundingRadius??r.bubbleHeight/2),n.fill(),n.fillStyle=m?.color?Ol(y)>.5?"#000000":"#ffffff":r.textBubble,n.fillText(b,d+r.bubblePadding,h+E+Qn(n,r)),d+=x+r.bubbleMargin,d>u.x+u.width+r.cellHorizontalPadding&&g>=c)break}return!0},measure:(e,t,n)=>{const{values:r,options:i}=t.data;if(!r)return n.cellHorizontalPadding*2;const o=Jf(r,aa(i??[]),t.data.allowDuplicates).map(a=>a.label??a.value),l=o.reduce((a,s)=>e.measureText(s).width+a+n.bubblePadding*2+n.bubbleMargin,0);return o.length===0?n.cellHorizontalPadding*2:l+2*n.cellHorizontalPadding-n.bubbleMargin},provideEditor:()=>({editor:SC,disablePadding:!0,deletedValue:e=>({...e,copyData:"",data:{...e.data,values:[]}})}),onPaste:(e,t)=>{if(!e||!e.trim())return{...t,values:[]};let n=e.split(",").map(r=>r.trim());if(t.allowDuplicates||(n=n.filter((r,i)=>n.indexOf(r)===i)),!t.allowCreation){const r=aa(t.options??[]);n=n.filter(i=>r.find(o=>o.value===i))}if(n.length!==0)return{...t,values:n}}},kC="None";function _c(e,t,n){e.save(),e.beginPath(),e.moveTo(t.x+t.width-n.cellHorizontalPadding,t.y+1),e.lineTo(t.x+t.width,t.y+1),e.lineTo(t.x+t.width,t.y+1+n.cellHorizontalPadding),e.fillStyle=n.accentColor,e.fill(),e.restore()}const MC=e=>{const{cell:t,theme:n,ctx:r}=e;Ql({...e,theme:{...n,textDark:n.textLight,headerFontFull:`${n.headerFontStyle} ${n.fontFamily}`,baseFontFull:`${n.baseFontStyle} ${n.fontFamily}`,markerFontFull:`${n.markerFontStyle} ${n.fontFamily}`}},kC,t.contentAlign),r.fillStyle=n.textDark};function RC(e){const t=f.useCallback((r,i)=>{const{cell:o,theme:l,ctx:a,rect:s}=r,u=r.col;if(Di(o))_c(a,s,l);else if(ls(o)&&u<e.length){const c=e[u];["checkbox","line_chart","bar_chart","progress"].includes(c.kind)?i():MC(r),c.isRequired&&c.isEditable&&_c(a,s,l);return}i()},[e]),n=f.useMemo(()=>[R1,aC,cC,hC,xC,...Zb],[]);return{drawCell:t,customRenderers:n}}function IC(){const e=Zr();return f.useMemo(()=>{const n={editable:i=>`<svg xmlns="http://www.w3.org/2000/svg" height="40" viewBox="0 96 960 960" width="40" fill="${i.bgColor}"><path d="m800.641 679.743-64.384-64.384 29-29q7.156-6.948 17.642-6.948 10.485 0 17.742 6.948l29 29q6.948 7.464 6.948 17.95 0 10.486-6.948 17.434l-29 29Zm-310.64 246.256v-64.383l210.82-210.821 64.384 64.384-210.821 210.82h-64.383Zm-360-204.872v-50.254h289.743v50.254H130.001Zm0-162.564v-50.255h454.615v50.255H130.001Zm0-162.307v-50.255h454.615v50.255H130.001Z"/></svg>`};return{glideTheme:{accentColor:e.colors.primary,accentFg:e.colors.white,accentLight:Gr(e.colors.primary,.9),borderColor:e.colors.dataframeBorderColor,horizontalBorderColor:e.colors.dataframeBorderColor,fontFamily:e.genericFonts.bodyFont,bgSearchResult:Gr(e.colors.primary,.9),resizeIndicatorColor:e.colors.primary,bgIconHeader:e.colors.fadedText60,fgIconHeader:e.colors.white,bgHeader:e.colors.dataframeHeaderBackgroundColor,bgHeaderHasFocus:Gr(e.colors.darkenedBgMix100,.9),bgHeaderHovered:Gr(e.colors.darkenedBgMix100,.9),textHeader:e.colors.fadedText60,textHeaderSelected:e.colors.white,textGroupHeader:e.colors.fadedText60,headerIconSize:Math.round(tn("1.125rem")),headerFontStyle:`${e.fontWeights.normal} ${tn(e.fontSizes.sm)}px`,baseFontStyle:`${e.fontWeights.normal} ${tn(e.fontSizes.sm)}px`,editorFontSize:e.fontSizes.sm,textDark:e.colors.bodyText,textMedium:Gr(e.colors.bodyText,.2),textLight:e.colors.fadedText40,bgCell:e.colors.bgColor,bgCellMedium:e.colors.bgColor,cellHorizontalPadding:Math.round(tn(e.spacing.sm)),cellVerticalPadding:Math.round(tn("0.1875rem")),textBubble:e.colors.fadedText60,bgBubble:e.colors.secondaryBg,bgBubbleSelected:Lg(e.colors.secondaryBg,.1),bubbleHeight:Math.round(tn("1.25rem")),bubblePadding:Math.round(tn(e.spacing.sm)),bubbleMargin:Math.round(tn(e.spacing.twoXS)),linkColor:e.colors.link,drilldownBorder:e.colors.darkenedBgMix25,checkboxMaxSize:Math.round(tn(e.sizes.checkbox))},tableBorderRadius:e.radii.default,tableBorderWidth:1,defaultTableHeight:Math.round(tn("25rem")),minColumnWidth:Math.round(tn("3.125rem")),maxColumnWidth:Math.round(tn("62.5rem")),maxColumnAutoWidth:Math.round(tn("31.25rem")),defaultRowHeight:Math.round(tn("2.1875rem")),defaultHeaderHeight:Math.round(tn("2.1875rem")),bgRowHovered:_g(e.colors.bgColor,e.colors.secondaryBg,.3),headerIcons:n}},[e])}const EC=ql.getLogger("useDataEditor");function TC(e,t,n,r,i,o,l,a,s){const u=f.useCallback(([m,y],b)=>{const v=e[m];if(!v.isEditable)return;const x=v.indexNumber,E=n.current.getOriginalRowIndex(i(y)),M=r([m,y]),I=v.getCellValue(M),L=v.getCellValue(b);if(!Di(M)&&L===I)return;const S=v.getCell(L,!0);Di(S)?EC.warn(`Not applying the cell edit since it causes this error:
|
|
195
|
-
${S.data}`):(n.current.setCell(x,E,{...S,lastUpdated:performance.now()}),a())},[e,n,i,r,a]),c=f.useCallback(()=>{if(t)return;const m=new Map;e.forEach(y=>{m.set(y.indexNumber,y.getCell(y.defaultValue))}),n.current.addRow(m),l()},[e,n,t,l]),d=f.useCallback(()=>{t||(c(),a())},[c,a,t]),g=f.useCallback(m=>{if(m.rows.length>0){if(t)return!0;const y=m.rows.toArray().map(b=>n.current.getOriginalRowIndex(i(b)));return n.current.deleteRows(y),l(),s(),a(),!1}if(m.current?.range){const y=[],b=m.current.range;for(let v=b.y;v<b.y+b.height;v++)for(let x=b.x;x<b.x+b.width;x++){const E=e[x];E.isEditable&&!E.isRequired&&(y.push({cell:[x,v]}),u([x,v],E.getCell(null)))}return y.length>0&&(a(),o(y)),!1}return!0},[e,n,t,o,i,a,u,s,l]),h=f.useCallback((m,y)=>{const[b,v]=m,x=[];for(let E=0;E<y.length;E++){const M=y[E];if(E+v>=n.current.getNumRows()){if(t)break;c()}for(let I=0;I<M.length;I++){const L=M[I],S=E+v,C=I+b;if(C>=e.length)break;const _=e[C];if(_.isEditable){const D=_.getCell(L,!0);if(at(D)&&!Di(D)){const k=_.indexNumber,T=n.current.getOriginalRowIndex(i(S)),O=_.getCellValue(r([C,S]));_.getCellValue(D)!==O&&(n.current.setCell(k,T,{...D,lastUpdated:performance.now()}),x.push({cell:[C,S]}))}}}x.length>0&&(a(),o(x))}return!1},[e,n,t,i,r,c,a,o]),p=f.useCallback((m,y)=>{const b=m[0];if(b>=e.length)return!0;const v=e[b];if(v.validateInput){const x=v.validateInput(v.getCellValue(y));return x===!0||x===!1?x:v.getCell(x)}return!0},[e]);return{onCellEdited:u,onPaste:h,onRowAppended:d,onDelete:g,validateCell:p}}const Qf=",",lo='"',DC='"',eh=`
|
|
196
|
-
`,OC="\uFEFF",PC=new RegExp(`[${[Qf,lo,eh].join("")}]`),Fc=ql.getLogger("useDataExporter");function Ac(e){return e.map(t=>LC(t)).join(Qf)+eh}function LC(e){if(Le(e))return"";const t=lt(e);return PC.test(t)?`${lo}${t.replace(new RegExp(lo,"g"),DC+lo)}${lo}`:t}async function Hc(e,t,n,r){const i=new TextEncoder;await e.write(i.encode(OC));const o=n.map(l=>l.name);await e.write(i.encode(Ac(o)));for(let l=0;l<r;l++){const a=[];n.forEach((s,u,c)=>{a.push(s.getCellValue(t([u,l])))}),await e.write(i.encode(Ac(a)))}await e.close()}function _C(e,t,n,r){return{exportToCsv:f.useCallback(async()=>{const l=`${new Date().toISOString().slice(0,16).replace(":","-")}_export.csv`;try{const u=await(await(await Ul(()=>import("./es6.BJcsVXQ0.js").then(c=>c.a),__vite__mapDeps([14,1,2]),import.meta.url)).showSaveFilePicker({suggestedName:l,types:[{accept:{"text/csv":[".csv"]}}],excludeAcceptAllOption:!1})).createWritable();await Hc(u,e,t,n)}catch(a){if(a instanceof Error&&a.name==="AbortError")return;try{Fc.warn("Failed to export data as CSV with FileSystem API, trying fallback method",a);let s="";const u=new WritableStream({write:h=>{s+=new TextDecoder("utf-8").decode(h)},close:async()=>{}});await Hc(u.getWriter(),e,t,n);const c=new Blob([s],{type:"text/csv;charset=utf-8;"}),d=URL.createObjectURL(c),g=Jg({enforceDownloadInNewTab:r,url:d,filename:l});g.style.display="none",document.body.appendChild(g),g.click(),document.body.removeChild(g),URL.revokeObjectURL(d)}catch(s){Fc.error("Failed to export data as CSV",s)}}},[t,n,e,r])}}function FC(e,t,n,r){return{getCellContent:f.useCallback(([o,l])=>{if(o>t.length-1)return Et("Column index out of bounds","This error should never happen. Please report this bug.");if(l>n-1)return Et("Row index out of bounds","This error should never happen. Please report this bug.");try{const a=t[o],s=a.indexNumber,u=r.current.getOriginalRowIndex(l),c=r.current.isAddedRow(u);if(a.isEditable||c){const h=r.current.getCell(s,u);if(at(h))return{...a.getCell(a.getCellValue(h),!1),lastUpdated:h.lastUpdated};if(c)return Et("Error during cell creation",`This error should never happen. Please report this bug. No cell found for an added row: col=${s}; row=${u}`)}const d=e.getCell(u,s),g=Fg(e,u,s);return l1(a,d,g,e.styler?.cssStyles)}catch(a){return Et("Error during cell creation",`This error should never happen. Please report this bug.
|
|
197
|
-
Error: ${a}`)}},[t,n,e,r])}}function AC(e){const[t,n]=f.useState(void 0),r=f.useCallback(o=>{if(o.kind!=="cell")n(void 0);else{const[,l]=o.location;n(l)}},[n]);return{getRowThemeOverride:f.useCallback(o=>{if(o===t)return{bgCell:e.bgRowHovered,bgCellMedium:e.bgRowHovered}},[e.bgRowHovered,t]),onItemHovered:r}}function HC(e,t,n,r,i){const[o,l]=f.useState({columns:et.empty(),rows:et.empty(),current:void 0}),a=!t&&!n&&(e.selectionMode.includes(nn.SelectionMode.MULTI_ROW)||e.selectionMode.includes(nn.SelectionMode.SINGLE_ROW)),s=a&&e.selectionMode.includes(nn.SelectionMode.MULTI_ROW),u=!t&&!n&&(e.selectionMode.includes(nn.SelectionMode.SINGLE_COLUMN)||e.selectionMode.includes(nn.SelectionMode.MULTI_COLUMN)),c=u&&e.selectionMode.includes(nn.SelectionMode.MULTI_COLUMN),d=!t&&!n&&(e.selectionMode.includes(nn.SelectionMode.SINGLE_CELL)||e.selectionMode.includes(nn.SelectionMode.MULTI_CELL)),g=d&&e.selectionMode.includes(nn.SelectionMode.MULTI_CELL),h=o.rows.length>0,p=o.columns.length>0,m=o.current!==void 0,y=f.useCallback(v=>{const x=!ja(v.rows.toArray(),o.rows.toArray()),E=!ja(v.columns.toArray(),o.columns.toArray()),M=!ja(v.current,o.current),I=a&&x||u&&E||d&&M;let L=v;if(E&&L.columns.length>=0){let S=L.columns;r.forEach((C,_)=>{C.isIndex&&(S=S.remove(_))}),S.length<L.columns.length&&(L={...L,columns:S})}l(L),I&&i(L,d)},[o,a,u,d,i,r]),b=f.useCallback((v=!1,x=!1)=>{const E={columns:x?o.columns:et.empty(),rows:v?o.rows:et.empty(),current:void 0};l(E),(!v&&a||!x&&u||d)&&i(E,d)},[o,a,u,d,i]);return{gridSelection:o,isRowSelectionActivated:a,isMultiRowSelectionActivated:s,isColumnSelectionActivated:u,isMultiColumnSelectionActivated:c,isCellSelectionActivated:d,isMultiCellSelectionActivated:g,isRowSelected:h,isColumnSelected:p,isCellSelected:m,clearSelection:b,processSelectionChange:y}}function zC(e,t,n,r,i,o,l,a,s,u,c){const d=e.rowHeight??t.defaultRowHeight,g=r?2:1,h=e.editingMode===nn.EditingMode.DYNAMIC?1:0,p=n+h,m=ac({numRows:p,rowHeight:d,theme:t,numHeaderRows:g}),y=c1(e,s),b=u1(s,c),v=b?Math.max(1,Math.min(n,3)):1,x=ac({numRows:v,rowHeight:d,theme:t});let E=Math.max(m,x),M=Math.min(E,t.defaultTableHeight);b&&u&&u>0?E=Math.max(u,E):y&&(M=Math.max(y,x),E=Math.max(M,E)),o&&(M=Math.min(M,o),E=Math.min(E,o),y||(M=E));const I=t.minColumnWidth+2*t.tableBorderWidth,L=Math.max(i,I);let S,C=L;const _=wf(e,a),D=yf(e,a),k=s1(a);_?S=L:D?(S=Math.min(Math.max(D,I),L),C=Math.min(Math.max(D,C),L)):k&&(S=void 0);const[T,O]=f.useState({width:S||"100%",height:b?"100%":M});return f.useLayoutEffect(()=>{_&&T.width==="100%"&&O(R=>({...R,width:L}))},[L]),f.useLayoutEffect(()=>{O(R=>({...R,width:S||"100%"}))},[S]),f.useLayoutEffect(()=>{O(R=>({...R,height:b?"100%":M}))},[M,n,u,b,c]),f.useLayoutEffect(()=>{if(l){const R=_||at(D)&&D>0;O({width:R?C:"100%",height:E})}else O({width:S||"100%",height:M})},[l]),{minHeight:x,maxHeight:E,minWidth:I,maxWidth:C,rowHeight:d,resizableSize:T,setResizableSize:O}}const VC=600,$C="⚠️ Please fill out this cell.";function NC(e,t,n=[]){const[r,i]=f.useState(),o=f.useRef(null),l=f.useCallback(s=>{if(clearTimeout(o.current),o.current=0,i(void 0),(s.kind==="header"||s.kind==="cell")&&s.location){const u=s.location[0],c=s.location[1];let d;if(u<0||u>=e.length||n.includes(c))return;const g=e[u];if(s.kind==="header"&&at(g))d=g.help;else if(s.kind==="cell"){const h=t([u,c]);Di(h)?d=h.errorDetails:g.isRequired&&g.isEditable&&ls(h)?d=$C:Lb(h)&&(d=h.tooltip)}d&&(o.current=setTimeout(()=>{d&&i({content:d,left:s.bounds.x+s.bounds.width/2,top:s.bounds.y})},VC))}},[e,t,i,o,n]),a=f.useCallback(()=>{i(void 0)},[i]);return{tooltip:r,clearTooltip:a,onItemHovered:l}}const th=Jn("div",{target:"e32gfpu0"})(({theme:e})=>({paddingTop:e.spacing.xs,paddingBottom:e.spacing.xs})),Ir=Jn("div",{target:"e32gfpu1"})(({theme:e,isActive:t,hasSubmenu:n})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing.sm,paddingLeft:e.spacing.sm,paddingRight:e.spacing.sm,paddingTop:e.spacing.twoXS,paddingBottom:e.spacing.twoXS,cursor:"pointer",backgroundColor:t?e.colors.darkenedBgMix15:void 0,"&:hover":{backgroundColor:e.colors.darkenedBgMix15},minWidth:e.sizes.minMenuWidth,...n&&{justifyContent:"space-between","& > :first-of-type":{display:"flex",alignItems:"center",gap:e.spacing.sm}}})),nh=Jn("div",{target:"e32gfpu2"})(({theme:e})=>({height:e.sizes.borderWidth,backgroundColor:e.colors.borderColor,marginTop:e.spacing.xs,marginBottom:e.spacing.xs})),BC=Jn("div",{target:"e32gfpu3"})(({theme:e})=>({display:"flex",alignItems:"center",padding:`${e.spacing.sm} ${e.spacing.sm}`,cursor:"default",gap:e.spacing.twoXS})),WC=Jn("div",{target:"e32gfpu4"})(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",padding:e.spacing.twoXS,border:`${e.sizes.borderWidth} solid ${e.colors.borderColor}`,borderRadius:e.radii.md,backgroundColor:"transparent",color:e.colors.bodyText,height:"fit-content"})),UC=Jn("div",{target:"e32gfpu5"})(({theme:e})=>({display:"flex",alignItems:"center",flexGrow:1,padding:`${e.spacing.threeXS} ${e.spacing.threeXS}`,border:`${e.sizes.borderWidth} solid ${e.colors.borderColor}`,borderRadius:e.radii.md,backgroundColor:e.colors.secondaryBg,minWidth:0,overflow:"hidden"})),qC=Jn("span",{target:"e32gfpu6"})(({theme:e})=>({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flexGrow:1,margin:`0 ${e.spacing.xs}`,fontSize:e.fontSizes.twoSm,maxWidth:"4rem"})),XC=Jn("button",{target:"e32gfpu7"})(({theme:e})=>({background:"none",border:"none",padding:e.spacing.twoXS,cursor:"pointer",color:e.colors.bodyText,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:e.radii.md,transition:"background-color 0.2s ease","&:hover":{backgroundColor:e.colors.fadedText05},"&:active":{backgroundColor:e.colors.fadedText10}})),zc=[{format:"",label:"Automatic",icon:":material/123:"},{format:"localized",label:"Localized",icon:":material/translate:"},{format:"plain",label:"Plain",icon:":material/speed_1_75:"},{format:"compact",label:"Compact",icon:":material/1k:"},{format:"dollar",label:"Dollar",icon:":material/attach_money:"},{format:"euro",label:"Euro",icon:":material/euro:"},{format:"yen",label:"Yen",icon:":material/currency_yen:"},{format:"percent",label:"Percent",icon:":material/percent:"},{format:"scientific",label:"Scientific",icon:":material/experiment:"},{format:"accounting",label:"Accounting",icon:":material/finance_chip:"}],GC={number:zc,progress:zc,datetime:[{format:"",label:"Automatic",icon:":material/schedule:"},{format:"localized",label:"Localized",icon:":material/translate:"},{format:"distance",label:"Distance",icon:":material/search_activity:"},{format:"calendar",label:"Calendar",icon:":material/today:"}],date:[{format:"",label:"Automatic",icon:":material/schedule:"},{format:"localized",label:"Localized",icon:":material/translate:"},{format:"distance",label:"Distance",icon:":material/search_activity:"}],time:[{format:"",label:"Automatic",icon:":material/schedule:"},{format:"localized",label:"Localized",icon:":material/translate:"}]};function YC({columnKind:e,isOpen:t,onMouseEnter:n,onMouseLeave:r,onChangeFormat:i,onCloseMenu:o,children:l}){const a=Zr(),{colors:s,fontSizes:u,radii:c,fontWeights:d}=a,g=GC[e]||[];return g.length===0?Ne(Jc,{}):Ne(ka,{triggerType:Qc.hover,returnFocus:!0,autoFocus:!0,focusLock:!0,isOpen:t,onMouseEnter:n,onMouseLeave:r,ignoreBoundary:!0,content:Ne(th,{role:"menu",children:g.map(h=>wn(Ir,{onClick:()=>{i(h.format),o()},role:"menuitem",children:[Ne(Yn,{size:"base",margin:"0",color:"inherit",iconValue:h.icon}),h.label]},h.format))}),placement:xa.right,showArrow:!1,popoverMargin:2,overrides:{Body:{props:{"data-testid":"stDataFrameColumnFormattingMenu"},style:{borderTopLeftRadius:c.default,borderTopRightRadius:c.default,borderBottomLeftRadius:c.default,borderBottomRightRadius:c.default,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important",backgroundColor:"transparent",border:`${a.sizes.borderWidth} solid ${a.colors.borderColor}`}},Inner:{style:{backgroundColor:So(a)?s.bgColor:s.secondaryBg,color:s.bodyText,fontSize:u.sm,fontWeight:d.normal,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"}}},children:l})}const jC=f.memo(YC);function KC({top:e,left:t,isColumnPinned:n,onPinColumn:r,onUnpinColumn:i,onCloseMenu:o,onSortColumn:l,onHideColumn:a,column:s,onChangeFormat:u,onAutosize:c}){const d=Zr(),[g,h]=f.useState(!1),{colors:p,fontSizes:m,radii:y,fontWeights:b}=d,{isCopied:v,copyToClipboard:x}=Ag();f.useEffect(()=>{function I(L){L.preventDefault()}return document.addEventListener("wheel",I,{passive:!1}),document.addEventListener("touchmove",I,{passive:!1}),()=>{document.removeEventListener("wheel",I),document.removeEventListener("touchmove",I)}},[]);const E=f.useCallback(()=>{o()},[o]),M=f.useCallback(()=>{x(s.title)},[s.title,x]);return Ne(ka,{autoFocus:!0,"aria-label":"Dataframe column menu",content:wn(th,{children:[wn(BC,{children:[Ne(WC,{title:s.kind,children:Ne(Yn,{iconValue:s.typeIcon||":material/notes:",size:"base",color:"inherit"})}),wn(UC,{title:s.title,children:[Ne(qC,{children:s.title}),Ne(XC,{onClick:M,title:"Copy column name","aria-label":"Copy column name",children:Ne(Yn,{iconValue:v?":material/check:":":material/content_copy:",size:"sm",margin:"0",color:"inherit"})})]})]}),l&&wn(Jc,{children:[wn(Ir,{onClick:()=>{l("asc"),E()},role:"menuitem",children:[Ne(Yn,{size:"base",margin:"0",color:"inherit",iconValue:":material/arrow_upward:"}),"Sort ascending"]}),wn(Ir,{onClick:()=>{l("desc"),E()},role:"menuitem",children:[Ne(Yn,{size:"base",margin:"0",color:"inherit",iconValue:":material/arrow_downward:"}),"Sort descending"]}),Ne(nh,{})]}),u&&Ne(jC,{columnKind:s.kind,isOpen:g,onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),onChangeFormat:u,onCloseMenu:E,children:wn(Ir,{onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),isActive:g,hasSubmenu:!0,children:[wn("div",{children:[Ne(Yn,{size:"base",margin:"0",color:"inherit",iconValue:":material/format_list_numbered:"}),"Format"]}),Ne(Yn,{size:"base",margin:"0",color:"inherit",iconValue:":material/chevron_right:"})]})}),c&&wn(Ir,{onClick:()=>{c(),E()},children:[Ne(Yn,{size:"base",margin:"0",color:"inherit",iconValue:":material/arrows_outward:"}),"Autosize"]}),n&&wn(Ir,{onClick:()=>{i(),E()},children:[Ne(Yn,{size:"base",margin:"0",color:"inherit",iconValue:":material/keep_off:"}),"Unpin column"]}),!n&&wn(Ir,{onClick:()=>{r(),E()},children:[Ne(Yn,{size:"base",margin:"0",color:"inherit",iconValue:":material/keep:"}),"Pin column"]}),a&&wn(Ir,{onClick:()=>{a(),E()},children:[Ne(Yn,{size:"base",margin:"0",color:"inherit",iconValue:":material/visibility_off:"}),"Hide column"]})]}),placement:xa.bottomRight,accessibilityType:ed.menu,showArrow:!1,popoverMargin:tn("0.375rem"),onClickOutside:g?void 0:E,onEsc:E,overrides:{Body:{props:{"data-testid":"stDataFrameColumnMenu"},style:{paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important",backgroundColor:"transparent"}},Inner:{style:{border:`${d.sizes.borderWidth} solid ${d.colors.borderColor}`,backgroundColor:So(d)?p.bgColor:p.secondaryBg,color:p.bodyText,fontSize:m.sm,fontWeight:b.normal,borderTopLeftRadius:y.default,borderTopRightRadius:y.default,borderBottomLeftRadius:y.default,borderBottomRightRadius:y.default,overflow:"auto",paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"}}},isOpen:!0,children:Ne("div",{"data-testid":"stDataFrameColumnMenuTarget",style:{position:"fixed",top:e,left:t,visibility:"hidden",transform:"unset"}})})}const ZC=f.memo(KC),JC="(index)";function Il(e,t){return!t.length||e.isIndex?!1:!t.includes(e.id)&&!t.includes(e.name)}const Vc=({label:e,initialValue:t,isIndeterminate:n,onChange:r})=>{const i=Zr();return Ne(Zg,{isIndeterminate:n,checked:t,onChange:o=>{r(o.target.checked)},"aria-label":e,checkmarkType:Kg.default,labelPlacement:jg.right,overrides:{Root:{style:({$isFocusVisible:o})=>({marginBottom:i.spacing.none,marginTop:i.spacing.none,paddingLeft:i.spacing.md,paddingRight:i.spacing.md,paddingTop:i.spacing.twoXS,paddingBottom:i.spacing.twoXS,backgroundColor:o?i.colors.darkenedBgMix25:"",display:"flex",alignItems:"start"})},Checkmark:{style:({$isFocusVisible:o,$checked:l,$isIndeterminate:a})=>{const s=l||a?i.colors.primary:i.colors.fadedText40;return{outline:0,width:i.sizes.checkbox,height:i.sizes.checkbox,marginTop:i.spacing.twoXS,marginLeft:0,marginBottom:0,boxShadow:o&&(l||a)?`0 0 0 0.2rem ${Gr(i.colors.primary,.5)}`:"",borderLeftWidth:i.sizes.borderWidth,borderRightWidth:i.sizes.borderWidth,borderTopWidth:i.sizes.borderWidth,borderBottomWidth:i.sizes.borderWidth,borderLeftColor:s,borderRightColor:s,borderTopColor:s,borderBottomColor:s}}},Label:{style:{lineHeight:i.lineHeights.small,paddingLeft:i.spacing.sm,position:"relative",color:i.colors.bodyText,fontSize:i.fontSizes.sm,fontWeight:i.fontWeights.normal}}},children:e})},QC=({columns:e,columnOrder:t,setColumnOrder:n,hideColumn:r,showColumn:i,children:o,isOpen:l,onClose:a})=>{const s=Zr(),u=h=>!(h.isHidden===!0||Il(h,t)),c=e.every(u),d=e.some(u)&&!c,g=h=>{e.forEach(p=>{const m=Il(p,t);h?(i(p.id),m&&n(y=>[...y,p.id])):r(p.id)})};return Ne(ka,{triggerType:Qc.click,placement:xa.bottomRight,autoFocus:!0,focusLock:!0,content:()=>wn("div",{style:{paddingTop:s.spacing.sm,paddingBottom:s.spacing.sm,maxHeight:s.sizes.maxDropdownHeight,overflow:"auto"},children:[Ne(Vc,{label:"Select all",isIndeterminate:d,initialValue:c,onChange:h=>{g(h)}}),Ne(nh,{}),Ne("div",{children:e.map(h=>{const p=Il(h,t);return Ne(Vc,{label:!h.title&&h.isIndex?JC:h.title,initialValue:!(h.isHidden===!0||p),onChange:m=>{m?(i(h.id),p&&n(y=>[...y,h.id])):r(h.id)}},h.id)})})]}),isOpen:l,onClickOutside:a,onClick:()=>l?a():void 0,onEsc:a,ignoreBoundary:!1,overrides:{Body:{props:{"data-testid":"stDataFrameColumnVisibilityMenu"},style:{borderTopLeftRadius:s.radii.default,borderTopRightRadius:s.radii.default,borderBottomLeftRadius:s.radii.default,borderBottomRightRadius:s.radii.default,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important",backgroundColor:"transparent",border:`${s.sizes.borderWidth} solid ${s.colors.borderColor}`}},Inner:{style:{backgroundColor:So(s)?s.colors.bgColor:s.colors.secondaryBg,color:s.colors.bodyText,fontSize:s.fontSizes.sm,fontWeight:s.fontWeights.normal,minWidth:s.sizes.minMenuWidth,maxWidth:`calc(${s.sizes.minMenuWidth} * 2)`,maxHeight:s.sizes.maxDropdownHeight,overflow:"auto",paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"}}},children:Ne("div",{children:o})})},eS=f.memo(QC),$c=Jn("div",{target:"eofyeyo0"})(({theme:e,disableResize:t,minHeight:n})=>({position:"relative",display:t?"flex":"inline-block",height:"100%","& .stDataFrameGlideDataEditor":{height:"100%",minWidth:"100%",minHeight:n,borderRadius:e.radii.default},"& .dvn-scroller":{overflowX:"auto !important",overflowY:"auto !important"},"& .gdg-search-bar":{maxWidth:"19rem",width:"80%",minWidth:"6rem",top:e.spacing.sm,right:e.spacing.sm,padding:e.spacing.sm,borderRadius:e.radii.default,"& .gdg-search-status":{paddingTop:e.spacing.twoXS,fontSize:e.fontSizes.twoSm},"& .gdg-search-progress":{display:"none"},"& input":{width:"100%"},"& button":{width:e.iconSizes.xl,height:e.iconSizes.xl,"& .button-icon":{width:e.iconSizes.base,height:e.iconSizes.base}}}}));function tS({top:e,left:t,content:n,clearTooltip:r}){const[i,o]=f.useState(!0),l=Zr(),{colors:a,fontSizes:s,radii:u,fontWeights:c}=l,d=f.useCallback(()=>{o(!1),r()},[r,o]);return Ne(ka,{content:Ne(Hg,{"data-testid":"stDataFrameTooltipContent",children:Ne(zg,{style:{fontSize:s.sm},source:n,allowHTML:!1})}),placement:xa.top,accessibilityType:ed.tooltip,showArrow:!1,popoverMargin:5,onClickOutside:d,onEsc:d,overrides:{Body:{style:{borderTopLeftRadius:u.default,borderTopRightRadius:u.default,borderBottomLeftRadius:u.default,borderBottomRightRadius:u.default,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important",backgroundColor:"transparent"}},Inner:{style:{backgroundColor:So(l)?a.bgColor:a.secondaryBg,color:a.bodyText,fontSize:s.sm,fontWeight:c.normal,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"}}},isOpen:i,children:Ne("div",{"data-testid":"stDataFrameTooltipTarget",style:{position:"fixed",top:e,left:t}})})}const nS=f.memo(tS),Nc=150,rS=15e4,iS="0.5rem";function oS({element:e,data:t,disabled:n,widgetMgr:r,disableFullscreenMode:i,fragmentId:o,customToolbarActions:l,widthConfig:a,heightConfig:s}){const{expanded:u,expand:c,collapse:d,width:g,height:h}=Us(qg),{isInHorizontalLayout:p,isInRoot:m}=Us(Vg),y=f.useRef(null),b=f.useRef(null),v=$g(),{height:x,elementRef:E}=Ng(),M=IC(),{getRowThemeOverride:I,onItemHovered:L}=AC(M),{libConfig:{enforceDownloadInNewTab:S=!1}}=f.useContext(Bg),[C,_]=f.useState(!0),[D,k]=f.useState(!1),[T,O]=f.useState(!1),[R,N]=f.useState(!1),[q,Y]=f.useState(),[oe,Q]=f.useState(!1),re=f.useCallback(()=>Q(Ce=>!Ce),[]),ue=f.useCallback(()=>Q(!1),[]),ae=f.useMemo(()=>window.matchMedia&&window.matchMedia("(pointer: coarse)").matches,[]);Le(e.editingMode)&&(e.editingMode=nn.EditingMode.READ_ONLY);const{READ_ONLY:de,DYNAMIC:he}=nn.EditingMode,ce=t.dimensions,H=Math.max(0,ce.numDataRows),P=H===0&&!(e.editingMode===he&&ce.numDataColumns>0),G=H>rS,se=!G&&!P&&e.editingMode!==he,le=!P&&e.editingMode===he&&!n,ve=f.useRef(new Zo(H)),[ge,Je]=f.useState(ve.current.getNumRows());f.useEffect(()=>{ve.current=new Zo(H),Je(ve.current.getNumRows())},[H]);const ke=f.useCallback(()=>{ve.current=new Zo(H),Je(ve.current.getNumRows())},[H]),[Pt,xt]=f.useState(e.columnOrder);f.useEffect(()=>{xt(e.columnOrder)},[e.columnOrder.join(",")]);const{columns:Oe,allColumns:te,setColumnConfigMapping:me}=h1(e,t,n,Pt,a);f.useEffect(()=>{if(e.editingMode===de||!r)return;const Ce=r.getStringValue({id:e.id,formId:e.formId});Ce&&(ve.current.fromJson(Ce,Oe),Je(ve.current.getNumRows()))},[]);const{getCellContent:we}=FC(t,Oe,ge,ve),{columns:ne,sortColumn:ye,getOriginalIndex:Pe,getCellContent:Ee}=x1(H,Oe,we),st=f.useCallback((Ce,wt)=>{if(!r)return;const At={selection:{rows:[],columns:[],cells:[]}};if(At.selection.rows=Ce.rows.toArray().map(Jt=>Pe(Jt)),At.selection.columns=Ce.columns.toArray().map(Jt=>Yr(ne[Jt])),wt&&Ce.current){const{cell:Jt,range:Xt}=Ce.current;if(Xt)for(let hn=Xt.y;hn<Xt.y+Xt.height;hn++)for(let Wn=Xt.x;Wn<Xt.x+Xt.width;Wn++)ne[Wn].isIndex||At.selection.cells.push([Pe(hn),Yr(ne[Wn])]);else if(Jt){const[hn,Wn]=Jt;ne[hn].isIndex||At.selection.cells.push([Pe(Wn),Yr(ne[hn])])}}const zn=JSON.stringify(At),Tn=r.getStringValue({id:e.id,formId:e.formId});(Tn===void 0||Tn!==zn)&&r.setStringValue({id:e.id,formId:e.formId},zn,{fromUi:!0},o)},[ne,e.id,e.formId,r,o,Pe]),{debouncedCallback:_e}=Ju(st,Nc),{gridSelection:Ge,isRowSelectionActivated:Te,isMultiRowSelectionActivated:Re,isColumnSelectionActivated:He,isMultiColumnSelectionActivated:ht,isCellSelectionActivated:tt,isMultiCellSelectionActivated:Ye,isRowSelected:gt,isColumnSelected:qt,isCellSelected:Dt,clearSelection:ct,processSelectionChange:jt}=HC(e,P,n,ne,_e);f.useEffect(()=>{tt||ct(!0,!0)},[u]);const Kt=f.useCallback(Ce=>{b.current?.updateCells(Ce)},[]);f.useEffect(()=>{if(!Te&&!He&&!tt||!r)return;const Ce=r.getStringValue({id:e.id,formId:e.formId});if(Ce){const wt=ne.map(Xt=>Yr(Xt)),At=JSON.parse(Ce);let zn=et.empty(),Tn=et.empty(),Jt;if(At.selection?.rows?.forEach(Xt=>{zn=zn.add(Xt)}),At.selection?.columns?.forEach(Xt=>{Tn=Tn.add(wt.indexOf(Xt))}),tt&&!Ye){const[Xt,hn]=At.selection?.cells?.[0]??[];Xt!==void 0&&hn!==void 0&&(Jt=[wt.indexOf(hn),Xt])}if(zn.length>0||Tn.length>0||Jt!==void 0){const Xt={rows:zn,columns:Tn,current:Jt?{cell:Jt,range:{x:Jt[0],y:Jt[1],width:1,height:1},rangeStack:[]}:void 0};jt(Xt)}}},[]);const Dn=f.useCallback(()=>{ge!==ve.current.getNumRows()&&Je(ve.current.getNumRows())},[ge]),It=f.useCallback(()=>{if(!r)return;const Ce=ve.current.toJson(ne);let wt=r.getStringValue({id:e.id,formId:e.formId});wt===void 0&&(wt=new Zo(0).toJson([])),Ce!==wt&&r.setStringValue({id:e.id,formId:e.formId},Ce,{fromUi:!0},o)},[ne,e.id,e.formId,r,o]),{debouncedCallback:pt}=Ju(It,Nc),{exportToCsv:On}=_C(Ee,ne,ge,S),{onCellEdited:Ct,onPaste:un,onRowAppended:gn,onDelete:Ie,validateCell:mt}=TC(ne,e.editingMode!==he,ve,Ee,Pe,Kt,Dn,pt,ct),Tt=f.useMemo(()=>P?[0]:le?[ge]:[],[P,le,ge]),{tooltip:dn,clearTooltip:Bt,onItemHovered:rn}=NC(ne,Ee,Tt),{drawCell:Pn,customRenderers:on}=RC(ne),{provideEditor:Zt}=M1(),Ue=f.useCallback(Ce=>({...Ce,hasMenu:!P}),[P]),kt=f.useMemo(()=>ne.map(Ce=>Ue(Vl(Ce))),[ne,Ue]),{columns:Rn,onColumnResize:Lt}=v1(kt),bt=t.dimensions.numHeaderRows>1,{minHeight:Cn,maxHeight:er,minWidth:tr,maxWidth:B,rowHeight:ze,resizableSize:qe,setResizableSize:Ot}=zC(e,M,ge,bt,g||0,h,u,a,s,x,m),an=f.useCallback(([Ce,wt])=>({..._b(!0,!1),displayData:"empty",contentAlign:"center",allowOverlay:!1,themeOverride:{textDark:M.glideTheme.textLight},span:[0,Math.max(ne.length-1,0)]}),[ne,M.glideTheme.textLight]),fn=f.useCallback(()=>{ke(),ct()},[ke,ct]);Gg({element:e,widgetMgr:r,onFormCleared:fn});const{pinColumn:In,unpinColumn:pn,freezeColumns:Wt}=p1(ne,P,g||0,M.minColumnWidth,ct,me),{changeColumnFormat:En}=g1(me),{hideColumn:Sn,showColumn:_i}=k1(ct,me),{onColumnMoved:ti}=m1(ne,Wt,In,pn,xt);f.useEffect(()=>{let Ce;const wt=requestAnimationFrame(()=>{Ce=setTimeout(()=>{if(E.current&&b.current){const At=E.current?.querySelector(".dvn-stack")?.getBoundingClientRect();At&&(O(At.height>E.current.clientHeight),N(At.width>E.current.clientWidth))}},0)});return()=>{cancelAnimationFrame(wt),Ce&&clearTimeout(Ce)}},[qe,ge,Rn,E]),f.useEffect(()=>{te.length==ne.length&&Q(!1)},[te.length,ne.length]);const Lr=!!(p||a?.useContent&&!m);return wn($c,{className:"stDataFrame","data-testid":"stDataFrame",ref:E,isInHorizontalLayout:p,minHeight:Cn,disableResize:Lr,onPointerDown:Ce=>{if(E.current){const wt=E.current.getBoundingClientRect(),At=(v||Math.round(tn(iS)))+1;R&&wt.height-At<Ce.clientY-wt.top&&Ce.stopPropagation(),T&&wt.width-At<Ce.clientX-wt.left&&Ce.stopPropagation()}},onBlur:Ce=>{!C&&!ae&&!Ce.currentTarget.contains(Ce.relatedTarget)&&!tt&&ct(!0,!0)},children:[wn(Xg,{isFullScreen:u,disableFullscreenMode:i,locked:gt&&!Te||Dt||ae&&C||oe,onExpand:c,onCollapse:d,target:$c,children:[l?.map(Ce=>Ce),(Te&>||He&&qt||tt&&Dt)&&Ne(Ci,{label:"Clear selection",icon:Qg,onClick:()=>{ct(),Bt()}}),le&>&&Ne(Ci,{label:"Delete row(s)",icon:ip,onClick:()=>{Ie&&(Ie(Ge),Bt())}}),le&&!gt&&Ne(Ci,{label:"Add row",icon:td,onClick:()=>{gn&&(_(!0),gn(),Bt(),b.current?.scrollTo(0,ge,"vertical"))}}),!P&&te.length>ne.length&&Ne(eS,{columns:te,columnOrder:Pt,setColumnOrder:xt,hideColumn:Sn,showColumn:_i,isOpen:oe,onClose:ue,children:Ne(Ci,{label:"Show/hide columns",icon:rd,onClick:re})}),!G&&!P&&Ne(Ci,{label:"Download as CSV",icon:op,onClick:On}),!P&&Ne(Ci,{label:"Search",icon:nd,onClick:()=>{D?k(!1):(_(!0),k(!0)),Bt()}})]}),Ne(Wg,{"data-testid":"stDataFrameResizable",ref:y,defaultSize:qe,style:{border:`${M.tableBorderWidth}px solid ${M.glideTheme.borderColor}`,borderRadius:`${M.tableBorderRadius}`},minHeight:Cn,maxHeight:er,minWidth:tr,maxWidth:Lr?void 0:B,size:qe,enable:{top:!1,right:!1,bottom:!1,left:!1,topRight:!1,bottomRight:!Lr,bottomLeft:!1,topLeft:!1},grid:[1,ze],snapGap:ze/3,onResizeStop:(Ce,wt,At,zn)=>{if(y.current){const Tn=2*M.tableBorderWidth;Ot({width:y.current.size.width,height:er-y.current.size.height===Tn?y.current.size.height+Tn:y.current.size.height})}},children:Ne(Rb,{className:"stDataFrameGlideDataEditor","data-testid":"stDataFrameGlideDataEditor",ref:b,columns:Rn,rows:P?1:ge,minColumnWidth:M.minColumnWidth,maxColumnWidth:M.maxColumnWidth,maxColumnAutoWidth:M.maxColumnAutoWidth,rowHeight:ze,headerHeight:M.defaultHeaderHeight,getCellContent:P?an:Ee,onColumnResize:ae?void 0:Lt,resizeIndicator:"header",freezeColumns:Wt,smoothScrollX:!0,smoothScrollY:!0,verticalBorder:!0,getCellsForSelection:!0,rowMarkers:"none",rangeSelect:ae?"cell":"rect",columnSelect:"none",rowSelect:"none",onColumnMoved:He?void 0:ti,onItemHovered:Ce=>{L?.(Ce),rn?.(Ce)},keybindings:{downFill:!0,...tt||G?{selectAll:!1}:{}},onKeyDown:Ce=>{(Ce.ctrlKey||Ce.metaKey)&&Ce.key==="f"&&(k(wt=>!wt),Ce.stopPropagation(),Ce.preventDefault())},showSearch:D,searchResults:D?void 0:[],onSearchClose:()=>{k(!1),Bt()},onHeaderClicked:(Ce,wt)=>{!se||He||(D&&k(!1),Te&>?ct():ct(!0,!0),ye(Ce,"auto"))},gridSelection:Ge,onGridSelectionChange:Ce=>{(C||ae)&&(jt(Ce),dn!==void 0&&Bt(),Y(void 0),Q(!1))},theme:M.glideTheme,getRowThemeOverride:I,onMouseMove:Ce=>{Ce.kind==="out-of-bounds"&&C?_(!1):Ce.kind!=="out-of-bounds"&&!C&&_(!0)},fixedShadowX:!0,fixedShadowY:!0,experimental:{scrollbarWidthOverride:0,paddingBottom:R?-v:void 0,paddingRight:T?-v:void 0},provideEditor:Zt,drawCell:Pn,customRenderers:on,imageEditorOverride:Kb,headerIcons:M.headerIcons,validateCell:mt,onHeaderMenuClick:(Ce,wt)=>{oe||Y({columnIdx:Ce,headerBounds:wt})},onPaste:!1,...Te&&{rowMarkers:{kind:"checkbox-visible",checkboxStyle:"square",theme:{bgCell:M.glideTheme.bgHeader,bgCellMedium:M.glideTheme.bgHeader,textMedium:M.glideTheme.textLight}},rowSelectionMode:Re?"multi":"auto",rowSelect:n?"none":Re?"multi":"single",rowSelectionBlending:"additive",rangeSelectionBlending:"additive"},...He&&{columnSelect:n?"none":ht?"multi":"single",columnSelectionBlending:"additive",columnSelectionMode:ht?"multi":"auto",rangeSelectionBlending:"additive"},...tt&&{rangeSelect:Ye?"rect":"cell",rangeSelectionBlending:"additive"},...!P&&e.editingMode!==de&&!n&&{fillHandle:!ae,onCellEdited:Ct,onPaste:un,onDelete:Ie},...!P&&e.editingMode===he&&{trailingRowOptions:{sticky:!1,tint:!0},rowMarkers:{kind:"checkbox",checkboxStyle:"square",theme:{bgCell:M.glideTheme.bgHeader,bgCellMedium:M.glideTheme.bgHeader}},rowSelectionMode:"multi",rowSelect:n?"none":"multi",onRowAppended:n?void 0:gn,onHeaderClicked:void 0}})}),dn?.content&&Ne(nS,{top:dn.top,left:dn.left,content:dn.content,clearTooltip:Bt}),q&&Kc.createPortal(Ne(ZC,{top:q.headerBounds.y+q.headerBounds.height,left:q.headerBounds.x+q.headerBounds.width,column:Oe[q.columnIdx],onCloseMenu:()=>Y(void 0),onSortColumn:se?Ce=>{D&&k(!1),ct(!(Te&>),!0),ye(q.columnIdx,Ce,!0)}:void 0,isColumnPinned:Oe[q.columnIdx].isPinned,onUnpinColumn:()=>{pn(Oe[q.columnIdx].id)},onPinColumn:()=>{In(Oe[q.columnIdx].id)},onHideColumn:()=>{Sn(Oe[q.columnIdx].id)},onChangeFormat:Ce=>{En(Oe[q.columnIdx].id,Ce),setTimeout(()=>{b.current?.remeasureColumns(et.fromSingleSelection(q.columnIdx))},100)},onAutosize:()=>{b.current?.remeasureColumns(et.fromSingleSelection(q.columnIdx))}}),document.querySelector("#portal"))]})}const aS=Ug(oS),rh=f.memo(aS),lS=({data:e,height:t,width:n,customToolbarActions:r})=>Ne(rh,{element:new nn({useContainerWidth:!0,editingMode:nn.EditingMode.READ_ONLY,disabled:!0,data:void 0,styler:null,width:void 0,height:t??null,id:"",columns:"",formId:"",columnOrder:[],selectionMode:[]}),data:e,widgetMgr:void 0,disabled:!0,fragmentId:void 0,disableFullscreenMode:!0,customToolbarActions:r,widthConfig:n??new qs.WidthConfig({useStretch:!0}),heightConfig:t?new qs.HeightConfig({pixelHeight:t}):void 0}),wS=Object.freeze(Object.defineProperty({__proto__:null,ReadOnlyGrid:lS,default:rh},Symbol.toStringTag,{value:"Module"}));export{av as C,lS as R,Fd as T,Ri as a,dp as b,wS as c,xi as i,Em as m,sn as s};
|