@stlite/desktop 0.98.1 → 0.99.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/bin/dump_artifacts.js +1 -1
- package/build/assets/ArrowVegaLiteChart-B-Kd_jPH-Biiko0Ef.js +1 -0
- package/build/assets/Audio-B5gtg70U-Bh9tGjUY.js +1 -0
- package/build/assets/AudioInput-CgFzLi-y-C8cmY_cr.js +1 -0
- package/build/assets/{index-CKw_lXVb-3dsfAMaj.js → Balloons-CqQICrNd-BGoQrXhe.js} +2 -2
- package/build/assets/BidiComponent-CkI6DfPr-CbrqDKKX.js +2 -0
- package/build/assets/Button-BOmzB5Yb-Bpnf-WZl.js +1 -0
- package/build/assets/ButtonGroup-C5sVTynN-DPa0Tx1x.js +2 -0
- package/build/assets/CameraInput-C1f0GN0n-Bo12mEPo.js +1 -0
- package/build/assets/ChatInput-ClqoaQw2-PqG4grVV.js +1 -0
- package/build/assets/Checkbox-ClzElazy-D-AYf8eH.js +1 -0
- package/build/assets/{index-BXKF9Na4-e8_T7zol.js → ColorPicker-mCkrAGPa-CtUHNwYp.js} +3 -3
- package/build/assets/ComponentInstance-B_1vn-IY-BM9ElpU6.js +11 -0
- package/build/assets/DataFrame-CXPcdw96-Crfv7wfu.js +198 -0
- package/build/assets/DateInput-DzaFFasw-CiMjvLKg.js +1 -0
- package/build/assets/DateTimeInput-WmD8vSCU-K1wv6LRy.js +1 -0
- package/build/assets/{index-Dxtfs80M-s0TmhiEk.js → DeckGlJsonChart-CDmFrnUQ-CKLXTmyf.js} +217 -215
- package/build/assets/{index-D52Jf8Ey-SgTlRv8T.js → DownloadButton-g54AS0W2-qOKvF9wp.js} +1 -1
- package/build/assets/{ErrorOutline.esm-DV80JhHP-XkDmlp3T.js → ErrorOutline.esm-B1NqpuZN-D4cKYVYX.js} +1 -1
- package/build/assets/Feedback-DTXGrEzp-Dd_SGEH7.js +1 -0
- package/build/assets/{FileDownload.esm-Bg0DSX1Z-tYB-VhDd.js → FileDownload.esm-B_usFfyI-DvbGAuNe.js} +1 -1
- package/build/assets/FileUploader-CzCdIxed-CWWB6xZB.js +1 -0
- package/build/assets/FormSubmitContent-CstMuKlS-CwJlipqn.js +1 -0
- package/build/assets/{index-DuuHtz-x-Caurorud.js → GraphVizChart-nJ8rg3sZ-B_FsOCth.js} +2 -2
- package/build/assets/{index-B0C1EJi--C9vASPz3.js → Html-CkFoh4ns-BXVZGZ2C.js} +1 -1
- package/build/assets/IFrame-BklekJPV-_sg-kw0j.js +49 -0
- package/build/assets/ImageList-l3ue-eW1-CIwYKSdj.js +1 -0
- package/build/assets/{InputInstructions-GG_DznKT-BTS6NlIa.js → InputInstructions-C3LBp4_M-BIHPK8ho.js} +1 -1
- package/build/assets/Json-DmaVI2eK-CplwjZhb.js +2 -0
- package/build/assets/LinkButton-D87rEwzB-C31w_f7c.js +1 -0
- package/build/assets/MenuButton-DCWYT9Sm-Cjs_mH64.js +1 -0
- package/build/assets/Metric-B85kD6qx-D6Bt_A2_.js +1 -0
- package/build/assets/Multiselect-Dj9HMUjc-C1tpZV37.js +1 -0
- package/build/assets/NumberInput-Bz1Z4Olo-HwfUQwvD.js +1 -0
- package/build/assets/PageLink-DxIPOlCu-CAX1QvMp.js +1 -0
- package/build/assets/{Particles-ByFZ9kUC-B_aeMYcp.js → Particles-CgV8FzZe-CZFoM1Ot.js} +1 -1
- package/build/assets/{index-DlNfwH7j-Ciae2OLh.js → PlotlyChart-DApJXgoh-msWOSLU2.js} +105 -105
- package/build/assets/{index-CzaX93h_-B-_1QLd4.js → Progress-DXRywIcj-D00Siwwp.js} +1 -1
- package/build/assets/{ProgressBar-uLtuFXoi-C547ZD3U.js → ProgressBar-By08lmvS-BN2oE7g_.js} +2 -2
- package/build/assets/{index-C2tfS9CH-BRrFBwHT.js → Radio-DZEQy4hT-Cx0uGU2K.js} +3 -3
- package/build/assets/Selectbox-BywNaXj9-EovVNC_I.js +1 -0
- package/build/assets/Slider-sLEYxDUG-Bby7yVsF.js +2 -0
- package/build/assets/{index-DnMeTGk7-X2HPuQXI.js → Snow-MxXLnUX_-CCUTgEUd.js} +2 -2
- package/build/assets/{index-CxYiRuXO-CRK1FQiS.js → Spinner-D-YJYPV5-qoM-yuRL.js} +1 -1
- package/build/assets/{StreamlitSyntaxHighlighter-0BOUSobY-CgsoE1gN.js → StreamlitSyntaxHighlighter-y_BJ441X-Do55UoZC.js} +1 -1
- package/build/assets/Table-ah-SFAz4-BuzfN8wv.js +1 -0
- package/build/assets/{TableChart.esm-CoMoidiP-DrT_rrb0.js → TableChart.esm-x67iDGlj-hZSJidLi.js} +1 -1
- package/build/assets/TextArea-COwbG28l-yfu63ssv.js +1 -0
- package/build/assets/TextInput-CPqz-18c-DPGxqoCs.js +1 -0
- package/build/assets/TimeInput-BQ-fP8Yi-FMCqKedu.js +3 -0
- package/build/assets/{index-CrKJRmJv-Bg5NDALn.js → Toast-CGUHIZQI-39x9j5Rs.js} +1 -1
- package/build/assets/Video-CWomx7KF-nGUBPGaY.js +1 -0
- package/build/assets/{WidgetLabel-CoLw86qs-CNbX-e3H.js → WidgetLabel-DUaobbKW-DD-xWyXR.js} +1 -1
- package/build/assets/WidgetLabelHelpIcon-Dk_Qm9_8-CtMOr4fX.js +1 -0
- package/build/assets/WidgetLabelHelpIconInline-CkTH9muE-i_BwkvTR.js +1 -0
- package/build/assets/{_baseAssignValue-DQhmkaDt-Bl1quFU6.js → _baseAssignValue-DbpQ8D1L-D2c_-zPN.js} +1 -1
- package/build/assets/b1c37dc02f43b345-BK8hQpFn.woff2 +0 -0
- package/build/assets/{base-input-BdLA32iO-A9B9vy_-.js → base-input-CUlWnT-V-BhBQbzWk.js} +2 -2
- package/build/assets/{checkbox-DFREjf9t-Bj1xZr4O.js → checkbox-CEu7IJmq-3LmskyhR.js} +2 -2
- package/build/assets/{constants-Dj7RTpUo-BGkidDJo.js → constants-BFZIinC9-BhIl5GAK.js} +2 -2
- package/build/assets/{createDownloadLinkElement-DdPyJxB4-BwUogbJk.js → createDownloadLinkElement-CO9Q-pa0-BNUtAwjF.js} +1 -1
- package/build/assets/{createSuper-BZpABwIl-CzqIX_hj.js → createSuper-CPupKoXU-C5x8b8jJ.js} +1 -1
- package/build/assets/data-grid-overlay-editor-D7_bQukB-DqAp5wnt.js +1 -0
- package/build/assets/{downloader-DcCTL3Wz-BV_PV8FK.js → downloader-CZ7qD7NY-DGAnDDXL.js} +1 -1
- package/build/assets/{embed-DsUNNyuf-iklb31Eb.js → embed-Dc8baQ26-DAsqJZrc.js} +4 -4
- package/build/assets/{es6--XPcqeHG-CHWR2W_o.js → es6-BxevHr5y-DDD2E1qH.js} +2 -2
- package/build/assets/{formatNumber-C0_e-CAH-GlcLbdL6.js → formatNumber-DxMjoq14-D-XVTuz9.js} +1 -1
- package/build/assets/iconPosition-9UgvX_TD-BzkVt95G.js +1 -0
- package/build/assets/iframeResizer.contentWindow-CCqu70r3-2dQhJjwY.js +1 -0
- package/build/assets/{index-D8-_3_8b-1KPkAAUR.js → index-BV2WTlzI-BDu7x5w-.js} +1 -1
- package/build/assets/{index-rCmWIVzf.css → index-Bdx5V1kE.css} +1 -1
- package/build/assets/index-BoaYS_fk-BOYhDwkq.js +1 -0
- package/build/assets/{index-D84Izf2I-C_zQnNB2.js → index-CDNzkMOW-Ci5P-rfD.js} +1 -1
- package/build/assets/{index-DuHJMwJD-Bsr8Y8w7.js → index-CJ4tMOMA-DwN410du.js} +1 -1
- package/build/assets/{index-DXEnufEK-CPeh905k.js → index-Co96_X1M-Dl06Rnsd.js} +1 -1
- package/build/assets/index-DJf52eor.js +192 -0
- package/build/assets/{input-vJKt6Tqs-D1h27UxA.js → input-HUYzfsf9-BxmLV7Ek.js} +1 -1
- package/build/assets/{memory-B3L1Fctl-Cn5y4VWL.js → memory-C-LDMFc2-DmYLyk9H.js} +1 -1
- package/build/assets/{moment-CU6QKNej-DcQX_LE0.js → moment-C29_LcvN-BY3oO1nk.js} +1 -1
- package/build/assets/number-overlay-editor-BQXyYsVn-Dh7S4LVs.js +9 -0
- package/build/assets/{numbro-CBbENDeu-C6X7Pww4.js → numbro-CDdPhOTG-s-4vlRUZ.js} +1 -1
- package/build/assets/{pandasStylerUtils-GHHHScPD-CTKMoUtV.js → pandasStylerUtils-BVB-ECxE-CDURxvwo.js} +1 -1
- package/build/assets/{possibleConstructorReturn-E3G46ZYb-Lz9Rlt8w.js → possibleConstructorReturn-YeRoNy63-B2FGD3ja.js} +1 -1
- package/build/assets/reactJsonViewCompat-CeSrJm8p-le930912.js +13 -0
- package/build/assets/resolveDefaultExport-Cy5TTESD-D1yDGtVx.js +1 -0
- package/build/assets/{sandbox-ChAzL-i--BIq4nttm.js → sandbox-DbnteG5V-yqy_7sO8.js} +1 -1
- package/build/assets/select-haj_e3M_-P2nevO2w.js +11 -0
- package/build/assets/{sprintfjs-BB1ejNgh-D_XlFCD8.js → sprintfjs-DwuHM96D-Dbm-A0ro.js} +1 -1
- package/build/assets/stateful-menu-DhWFcRsJ-hkmyKt6q.js +4 -0
- package/build/assets/{styled-components-UJ_u5XUO-B68esmwJ.js → styled-components-BwoIjXty-eQCTyKeV.js} +1 -1
- package/build/assets/{styled-components-BF-9yHWP-Fq0Myn8O.js → styled-components-CRl5ROSi-CaifWlLZ.js} +1 -1
- package/build/assets/{styled-components-BPyosp2h-CHa8nolL.js → styled-components-CggDa8xh-DRn7YfuV.js} +1 -1
- package/build/assets/{threshold-eWsxmMyL-jpRnj60B.js → threshold-C_rop_uq-CSTNJaOo.js} +1 -1
- package/build/assets/timepicker-t1TdfIJG-CM4-XB8w.js +4 -0
- package/build/assets/{timer-DAAwtI0i-CB52lra-.js → timer-CuhnLtz1-DD8qTMUW.js} +1 -1
- package/build/assets/{toConsumableArray-fI4JT57_-CqtYDc1p.js → toConsumableArray-DtFGUM3A-BLxO6YGd.js} +1 -1
- package/build/assets/useBasicWidgetState-Bd8NTj87-Cqs9ZQAV.js +1 -0
- package/build/assets/{useIntlLocale-CYWMTZ3s-Bfz8l4j_.js → useIntlLocale-CXWYgGQX-B2q3sAu2.js} +9 -9
- package/build/assets/useSelectCommon-O2yZsfjb-6cuQoolB.js +1 -0
- package/build/assets/{useTextInputAutoExpand-DKFPNBDa-Cb0YY3m0.js → useTextInputAutoExpand-BTuNAk3V-5wcrsLsu.js} +2 -2
- package/build/assets/useUpdateUiValue-B574r2my-B36XHNQq.js +1 -0
- package/build/assets/useWaveformController-EemjKAv5-CT3VAgB8.js +1 -0
- package/build/assets/utils-DNbZWtPr-BHo82ec1.js +5 -0
- package/build/assets/{value-DwxUZIyI-CNuykc50.js → value-FXychKGJ-DfnNAqu8.js} +1 -1
- package/build/assets/wavesurfer.esm-BdCEnQA2-Cb5Yveqj.js +74 -0
- package/build/assets/withCalculatedWidth-CswVJ4Re-BeXEmgBt.js +1 -0
- package/build/assets/withFullScreenWrapper-CKo__VbV-B1HqecCF.js +1 -0
- package/build/assets/worker-DSGzx9v2-CeEZF0Hz.js +773 -0
- package/build/index.html +2 -2
- package/package.json +6 -6
- package/wheels/streamlit-1.56.0-cp313-none-any.whl +0 -0
- package/build/assets/9897c61aa169e10d-BSbTZIlv.woff2 +0 -0
- package/build/assets/FileHelper-6E1AHofU-qrMXF9BJ.js +0 -5
- package/build/assets/FormClearHelper-CbmTijuR-BhfBTvx4.js +0 -1
- package/build/assets/WidgetLabelHelpIcon-DGQ_r-QQ-BpBcjxpA.js +0 -1
- package/build/assets/WidgetLabelHelpIconInline-CBvJmNo2-CLxNkiVd.js +0 -1
- package/build/assets/data-grid-overlay-editor-QHhShSfm-3TuDDPoi.js +0 -1
- package/build/assets/iconPosition-DC20xXN5-Dq1FtUtw.js +0 -1
- package/build/assets/iframeResizer.contentWindow-CK2JqAeV-DqbaJEzN.js +0 -1
- package/build/assets/index-9BL32MjC-d0WHvbzb.js +0 -1
- package/build/assets/index-B4B1qPeD-B4iZ3Hle.js +0 -1
- package/build/assets/index-B5UL-R7r-CWJT9KeA.js +0 -1
- package/build/assets/index-BGnBFvx7-CovA4PPU.js +0 -1
- package/build/assets/index-BLF4SOe9-BATezQGi.js +0 -1
- package/build/assets/index-BVqn7psP-DOIOIfGO.js +0 -1
- package/build/assets/index-BWq44yej-BLlqoxJR.js +0 -2
- package/build/assets/index-BYY96E5j-Bp1H9cgU.js +0 -1
- package/build/assets/index-BZJBZSAA-DFqiOZai.js +0 -2
- package/build/assets/index-BjrlCNX2-LTYqrHHV.js +0 -1
- package/build/assets/index-BmK3aM70-BtZtyb9b.js +0 -2
- package/build/assets/index-BuOHAFyU-CgkpNrjG.js +0 -1
- package/build/assets/index-BwVivyUp-BMVGZ9_Q.js +0 -1
- package/build/assets/index-CDQEgcT1-DtNnQE5Q.js +0 -3
- package/build/assets/index-CSHbNsrd-CaeMETbK.js +0 -1
- package/build/assets/index-CStypS2h-ZcgczjKg.js +0 -1
- package/build/assets/index-CTUrfAxj--v8quZkn.js +0 -2
- package/build/assets/index-CYGEb27Q-2USI782v.js +0 -1
- package/build/assets/index-CZIHO3Hi-CIp8gy8I.js +0 -1
- package/build/assets/index-Cqst7YJT-C9v2_kdG.js +0 -1
- package/build/assets/index-DCNthJH_-DBm0ode_.js +0 -1
- package/build/assets/index-DKp3_2FO-qvF0epur.js +0 -1
- package/build/assets/index-Dd99Pbav-BGjrs667.js +0 -1
- package/build/assets/index-DegoUuPm.js +0 -171
- package/build/assets/index-DpazIH3n-D6BMkmZF.js +0 -1
- package/build/assets/index-LfSwL_C3-BhFtSxQv.js +0 -1
- package/build/assets/index-SfqmeEwF-Dq9F6PRu.js +0 -1
- package/build/assets/index-Zh4mTo6Q-BW_atvXh.js +0 -1
- package/build/assets/index-dDzvj0X4-DcwcRJ2U.js +0 -1
- package/build/assets/index-ebIdPrk5-uPj-BdYi.js +0 -1
- package/build/assets/index-glyZT6vh-DgW3Iulb.js +0 -11
- package/build/assets/index-hpzROwMA-mo9c0M0y.js +0 -1
- package/build/assets/index-t2JVnYeR-CxNAko6c.js +0 -198
- package/build/assets/main-B1Ej7gwo-CcTKNe5S.js +0 -13
- package/build/assets/number-overlay-editor-DJYV-edd-B_O-Ktcq.js +0 -9
- package/build/assets/select-Pj-68ff--fhVXPkd8.js +0 -14
- package/build/assets/timepicker-BJ4MpQyD-d8465QWp.js +0 -4
- package/build/assets/uniqueId-DvP0IaTe-DffbsNAr.js +0 -1
- package/build/assets/useBasicWidgetState-JbPrIror-Bu87DmaN.js +0 -1
- package/build/assets/useSelectCommon-DTdQ2TWs-DMezB-1T.js +0 -1
- package/build/assets/useUpdateUiValue-DMih0kWV-BWZ6Saew.js +0 -1
- package/build/assets/useWaveformController-BeUcMXLl-DLfXFMqt.js +0 -1
- package/build/assets/wavesurfer.esm-idh1jvYE-D4Wwdy60.js +0 -74
- package/build/assets/withCalculatedWidth-Du6RrD8E-CIxv0z4S.js +0 -1
- package/build/assets/withFullScreenWrapper-uh7txjJc-CYEgnXN4.js +0 -1
- package/build/assets/worker-DAN7Os1o-BP8Vk1l7.js +0 -106
- package/wheels/streamlit-1.55.0-cp313-none-any.whl +0 -0
- /package/build/assets/{index-BWXbSx5b-3ZGL6YOx.js → index-BKiUojFK-3ZGL6YOx.js} +0 -0
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/data-grid-overlay-editor-QHhShSfm-3TuDDPoi.js","assets/index-DegoUuPm.js","assets/index-rCmWIVzf.css","assets/withFullScreenWrapper-uh7txjJc-CYEgnXN4.js","assets/FormClearHelper-CbmTijuR-BhfBTvx4.js","assets/moment-CU6QKNej-DcQX_LE0.js","assets/pandasStylerUtils-GHHHScPD-CTKMoUtV.js","assets/numbro-CBbENDeu-C6X7Pww4.js","assets/_baseIndexOf-OsCSwRmV--aVpkM1d.js","assets/_baseAssignValue-DQhmkaDt-Bl1quFU6.js","assets/index-CVld_lKx-CBWAU0gM.js","assets/main-B1Ej7gwo-CcTKNe5S.js","assets/toConsumableArray-fI4JT57_-CqtYDc1p.js","assets/possibleConstructorReturn-E3G46ZYb-Lz9Rlt8w.js","assets/assertThisInitialized-C1dAyb4j-CzYfxWZp.js","assets/createSuper-BZpABwIl-CzqIX_hj.js","assets/formatNumber-C0_e-CAH-GlcLbdL6.js","assets/sprintfjs-BB1ejNgh-D_XlFCD8.js","assets/formatMoment-DEtsTHwA-BeQagUzn.js","assets/checkbox-DFREjf9t-Bj1xZr4O.js","assets/createDownloadLinkElement-DdPyJxB4-BwUogbJk.js","assets/FileDownload.esm-Bg0DSX1Z-tYB-VhDd.js","assets/number-overlay-editor-DJYV-edd-B_O-Ktcq.js","assets/es6--XPcqeHG-CHWR2W_o.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{j as fe,r as d,bT as Du,d2 as Xt,F as Pu,d3 as Gp,ck as Zd,G as Jp,a2 as eg,i as Se,aD as ca,x as An,aL as qd,L as tg,J as xo,d4 as ng,w as en,N as Yr,d5 as rg,d6 as og,aw as ko,P as lt,a6 as ig,R as rl,bG as Ss,B as Ms,c8 as Ta,E as Is,_ as Ve,aA as Kd,az as ag,d7 as lg,d8 as sg,D as ug,aW as Qd,a_ as cg,aa as Er,Q as Ct,ag as Oa,ai as Da,d9 as Gd,ah as Jd,a3 as eh,da as dg,z as hg,ad as fg,aj as Un,db as pg,cG as th,cL as gg,dc as mg,dd as vg,de as bg,df as wg,dg as yg,dh as xg,aV as Cg,di as kg,U as Sg,V as Mg,b0 as Ig,dj as Rg,dk as nh,y as Eg,dl as Tg,b1 as Og,bf as Dg,dm as Pg,dn as Ag,dp as rh,Y as oh,W as Lg,cQ as Hg,dq as Fg,dr as zg,ds as Vg,aZ as $g,aX as _g,dt as ar,du as Ng,bH as Bg,dv as jg,cl as ol,a9 as li,bS as Wg,dw as ih,dx as Ug,dy as Xg,aJ as Yg,dz as Zg,dA as qg,dB as Kg,dC as Qg,dD as Gg,dE as Jg,dF as oa,dG as Xo,dH as Lt,dI as em,dJ as tm,dK as nm,dL as rm,dM as om,dN as im,dO as _r,dP as xt,dQ as mn,dR as Au,dS as Lu,dT as da,dU as ah,dV as lh,dW as am,dX as is,dY as lm,dZ as sm,d_ as sh,d$ as um,e0 as cm}from"./index-DegoUuPm.js";import{v as dm,d as hm}from"./withFullScreenWrapper-uh7txjJc-CYEgnXN4.js";import{m as fm}from"./FormClearHelper-CbmTijuR-BhfBTvx4.js";import{l as Br}from"./moment-CU6QKNej-DcQX_LE0.js";import{f as pm,c as as,$ as gm,B as Hu,v as mm}from"./pandasStylerUtils-GHHHScPD-CTKMoUtV.js";import{i as vm}from"./numbro-CBbENDeu-C6X7Pww4.js";import{w as bm,c as Pa,d as wm,P as ym,o as xm,e as Cm,l as km,p as Sm,r as Mm,F as uh,H as Im,S as Rm,K as Em,M as ch,q as Tm,g as Om,b as Dm,s as Pm}from"./_baseAssignValue-DQhmkaDt-Bl1quFU6.js";import{i as il}from"./index-CVld_lKx-CBWAU0gM.js";import{D as Am}from"./main-B1Ej7gwo-CcTKNe5S.js";import{p as Lm,T as fr,x as Oo}from"./toConsumableArray-fI4JT57_-CqtYDc1p.js";import{d as Hm,_ as Fm,b as zm}from"./possibleConstructorReturn-E3G46ZYb-Lz9Rlt8w.js";import{i as Vm}from"./createSuper-BZpABwIl-CzqIX_hj.js";import{p as ha}from"./formatNumber-C0_e-CAH-GlcLbdL6.js";import{s as Fu}from"./formatMoment-DEtsTHwA-BeQagUzn.js";import{v as $m,y as _m,T as Nm}from"./checkbox-DFREjf9t-Bj1xZr4O.js";import{s as Bm}from"./createDownloadLinkElement-DdPyJxB4-BwUogbJk.js";import{o as jm,i as Wm}from"./FileDownload.esm-Bg0DSX1Z-tYB-VhDd.js";var Um="[object Map]",Xm="[object Set]",Ym=Object.prototype,Zm=Ym.hasOwnProperty;function qm(e){if(e==null)return!0;if(gg(e)&&(th(e)||typeof e=="string"||typeof e.splice=="function"||mg(e)||vg(e)||bg(e)))return!e.length;var t=wg(e);if(t==Um||t==Xm)return!e.size;if(yg(e))return!xg(e).length;for(var n in e)if(Zm.call(e,n))return!1;return!0}var dh=d.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return d.createElement(Is,Ve({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),d.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),d.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}))});dh.displayName="Add";var hh=d.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return d.createElement(Is,Ve({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),d.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),d.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"}))});hh.displayName="Search";var fh=d.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return d.createElement(Is,Ve({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),d.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),d.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"}))});fh.displayName="Visibility";var al,zu;function Km(){if(zu)return al;zu=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r,o){return r!=null&&t.call(r,o)}return al=n,al}var ll,Vu;function Qm(){if(Vu)return ll;Vu=1;var e=Km(),t=km();function n(r,o){return r!=null&&t(r,o,e)}return ll=n,ll}var Gm=Qm();const Jm=Er(Gm);function ph(e="This should not happen"){throw new Error(e)}function Dn(e,t="Assertion failed"){if(!e)return ph(t)}function gi(e,t){return ph(t??"Hell froze over")}function e0(e,t){try{return e()}catch{return t}}const $u=Object.prototype.hasOwnProperty;function Po(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--&&Po(e[r],t[r]););return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if($u.call(e,n)&&++r&&!$u.call(t,n)||!(n in t)||!Po(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}const fa=null,Rs=void 0;var G;(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"})(G||(G={}));var _u;(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"})(_u||(_u={}));var pa;(function(e){e.Triangle="triangle",e.Dots="dots"})(pa||(pa={}));function Ui(e){return"width"in e&&typeof e.width=="number"}async function Nu(e){return typeof e=="object"?e:await e()}function So(e){return!(e.kind===G.Loading||e.kind===G.Bubble||e.kind===G.RowID||e.kind===G.Protected||e.kind===G.Drilldown)}function Ro(e){return e.kind===$n.Marker||e.kind===$n.NewRow}function Mo(e){if(!So(e)||e.kind===G.Image)return!1;switch(e.kind){case G.Text:case G.Number:case G.Markdown:case G.Uri:case G.Custom:case G.Boolean:return e.readonly!==!0;default:gi(e,"A cell was passed with an invalid kind")}}function t0(e){return Jm(e,"editor")}function Es(e){return!(e.readonly??!1)}var $n;(function(e){e.NewRow="new-row",e.Marker="marker"})($n||($n={}));const ga={shape:"square",size:4,offsetX:-2,offsetY:-2,outline:0};function sl(e){if(e.length===0)return[];const t=[...e],n=[];t.sort(function(r,o){return r[0]-o[0]}),n.push([...t[0]]);for(const r of t.slice(1)){const o=n[n.length-1];o[1]<r[0]?n.push([...r]):o[1]<r[1]&&(o[1]=r[1])}return n}let Bu;class Qe{items;constructor(t){this.items=t}static create=t=>new Qe(sl(t));static empty=()=>Bu??(Bu=new Qe([]));static fromSingleSelection=t=>Qe.empty().add(t);static fromArray=t=>{if(t.length===0)return Qe.empty();const n=t.map(o=>[o,o+1]),r=sl(n);return new Qe(r)};offset(t){if(t===0)return this;const n=this.items.map(r=>[r[0]+t,r[1]+t]);return new Qe(n)}add(t){const n=typeof t=="number"?[t,t+1]:t,r=sl([...this.items,n]);return new Qe(r)}remove(t){const n=[...this.items],r=typeof t=="number"?t:t[0],o=typeof t=="number"?t+1:t[1];for(const[i,a]of n.entries()){const[l,s]=a;if(l<=o&&r<=s){const u=[];l<r&&u.push([l,r]),o<s&&u.push([o,s]),n.splice(i,1,...u)}}return new Qe(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,o]=this.items[n];if(t>=r&&t<o)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],o=this.items[n];if(r[0]!==o[0]||r[1]!==o[1])return!1}return!0}toArray(){const t=[];for(const[n,r]of this.items)for(let o=n;o<r;o++)t.push(o);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 n0=function(){const e=Array.prototype.slice.call(arguments).filter(Boolean),t={},n=[];e.forEach(o=>{(o?o.split(" "):[]).forEach(i=>{if(i.startsWith("atm_")){const[,a]=i.split("_");t[a]=i}else n.push(i)})});const r=[];for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&r.push(t[o]);return r.push(...n),r.join(" ")},ju=n0,r0=e=>e.toUpperCase()===e,o0=e=>t=>e.indexOf(t)===-1,gh=(e,t)=>{const n={};return Object.keys(e).filter(o0(t)).forEach(r=>{n[r]=e[r]}),n};function i0(e,t,n){const r=gh(t,n);if(!e){const o=typeof ol=="function"?{default:ol}:ol;Object.keys(r).forEach(i=>{o.default(i)||delete r[i]})}return r}var a0=(e,t)=>{};function l0(e){let t="";return n=>{const r=(i,a)=>{const{as:l=e,class:s=t}=i,u=n.propsAsIs===void 0?!(typeof l=="string"&&l.indexOf("-")===-1&&!r0(l[0])):n.propsAsIs,c=i0(u,i,["as","class"]);c.ref=a,c.className=n.atomic?ju(n.class,c.className||s):ju(c.className||s,n.class);const{vars:h}=n;if(h){const g={};for(const m in h){const y=h[m],w=y[0],v=y[1]||"",x=typeof w=="function"?w(i):w;a0(x,n.name),g[`--${m}`]=`${x}${v}`}const p=c.style||{},f=Object.keys(p);f.length>0&&f.forEach(m=>{g[m]=p[m]}),c.style=g}return e.__wyw_meta&&e!==l?(c.as=l,d.createElement(e,c)):d.createElement(l,c)},o=d.forwardRef?d.forwardRef(r):(i=>{const a=gh(i,["innerRef"]);return r(a,i.innerRef)});return o.displayName=n.name,o.__wyw_meta={className:n.class||t,extends:e},o}}var hn=l0;const s0=hn("div")({name:"ImageOverlayEditorStyle",class:"gdg-i2iowwq",propsAsIs:!1});var Wu={},Yo={},ul={},cl={},Uu;function u0(){return Uu||(Uu=1,(function(e){(function(t,n){n(e,Ct,Yg())})(cl,function(t,n,r){Object.defineProperty(t,"__esModule",{value:!0}),t.setHasSupportToCaptureOption=f;var o=a(n),i=a(r);function a(v){return v&&v.__esModule?v:{default:v}}var l=Object.assign||function(v){for(var x=1;x<arguments.length;x++){var E=arguments[x];for(var R in E)Object.prototype.hasOwnProperty.call(E,R)&&(v[R]=E[R])}return v};function s(v,x){var E={};for(var R in v)x.indexOf(R)>=0||Object.prototype.hasOwnProperty.call(v,R)&&(E[R]=v[R]);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 R=0;R<E.length;R++){var S=E[R];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(x,S.key,S)}}return function(x,E,R){return E&&v(x.prototype,E),R&&v(x,R),x}})();function h(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 p=!1;function f(v){p=v}try{addEventListener("test",null,Object.defineProperty({},"capture",{get:function(){f(!0)}}))}catch{}function m(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{capture:!0};return p?v:v.capture}function y(v){if("touches"in v){var x=v.touches[0],E=x.pageX,R=x.pageY;return{x:E,y:R}}var S=v.screenX,P=v.screenY;return{x:S,y:P}}var w=(function(v){g(x,v);function x(){var E;u(this,x);for(var R=arguments.length,S=Array(R),P=0;P<R;P++)S[P]=arguments[P];var T=h(this,(E=x.__proto__||Object.getPrototypeOf(x)).call.apply(E,[this].concat(S)));return T._handleSwipeStart=T._handleSwipeStart.bind(T),T._handleSwipeMove=T._handleSwipeMove.bind(T),T._handleSwipeEnd=T._handleSwipeEnd.bind(T),T._onMouseDown=T._onMouseDown.bind(T),T._onMouseMove=T._onMouseMove.bind(T),T._onMouseUp=T._onMouseUp.bind(T),T._setSwiperRef=T._setSwiperRef.bind(T),T}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(E){this.props.allowMouseEvents&&(this.mouseDown=!0,document.addEventListener("mouseup",this._onMouseUp),document.addEventListener("mousemove",this._onMouseMove),this._handleSwipeStart(E))}},{key:"_onMouseMove",value:function(E){this.mouseDown&&this._handleSwipeMove(E)}},{key:"_onMouseUp",value:function(E){this.mouseDown=!1,document.removeEventListener("mouseup",this._onMouseUp),document.removeEventListener("mousemove",this._onMouseMove),this._handleSwipeEnd(E)}},{key:"_handleSwipeStart",value:function(E){var R=y(E),S=R.x,P=R.y;this.moveStart={x:S,y:P},this.props.onSwipeStart(E)}},{key:"_handleSwipeMove",value:function(E){if(this.moveStart){var R=y(E),S=R.x,P=R.y,T=S-this.moveStart.x,C=P-this.moveStart.y;this.moving=!0;var A=this.props.onSwipeMove({x:T,y:C},E);A&&E.cancelable&&E.preventDefault(),this.movePosition={deltaX:T,deltaY:C}}}},{key:"_handleSwipeEnd",value:function(E){this.props.onSwipeEnd(E);var R=this.props.tolerance;this.moving&&this.movePosition&&(this.movePosition.deltaX<-R?this.props.onSwipeLeft(1,E):this.movePosition.deltaX>R&&this.props.onSwipeRight(1,E),this.movePosition.deltaY<-R?this.props.onSwipeUp(1,E):this.movePosition.deltaY>R&&this.props.onSwipeDown(1,E)),this.moveStart=null,this.moving=!1,this.movePosition=null}},{key:"_setSwiperRef",value:function(E){this.swiper=E,this.props.innerRef(E)}},{key:"render",value:function(){var E=this.props;E.tagName;var R=E.className,S=E.style,P=E.children;E.allowMouseEvents,E.onSwipeUp,E.onSwipeDown,E.onSwipeLeft,E.onSwipeRight,E.onSwipeStart,E.onSwipeMove,E.onSwipeEnd,E.innerRef,E.tolerance;var T=s(E,["tagName","className","style","children","allowMouseEvents","onSwipeUp","onSwipeDown","onSwipeLeft","onSwipeRight","onSwipeStart","onSwipeMove","onSwipeEnd","innerRef","tolerance"]);return o.default.createElement(this.props.tagName,l({ref:this._setSwiperRef,onMouseDown:this._onMouseDown,onTouchStart:this._handleSwipeStart,onTouchEnd:this._handleSwipeEnd,className:R,style:S},T),P)}}]),x})(n.Component);w.displayName="ReactSwipe",w.propTypes={tagName:i.default.string,className:i.default.string,style:i.default.object,children:i.default.node,allowMouseEvents:i.default.bool,onSwipeUp:i.default.func,onSwipeDown:i.default.func,onSwipeLeft:i.default.func,onSwipeRight:i.default.func,onSwipeStart:i.default.func,onSwipeMove:i.default.func,onSwipeEnd:i.default.func,innerRef:i.default.func,tolerance:i.default.number.isRequired},w.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=w})})(cl)),cl}var Xu;function mh(){return Xu||(Xu=1,(function(e){(function(t,n){n(e,u0())})(ul,function(t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=o(n);function o(i){return i&&i.__esModule?i:{default:i}}t.default=r.default})})(ul)),ul}var Zo={},Yu;function vh(){if(Yu)return Zo;Yu=1,Object.defineProperty(Zo,"__esModule",{value:!0}),Zo.default=void 0;var e=t(Ug());function t(o){return o&&o.__esModule?o:{default:o}}function n(o,i,a){return i in o?Object.defineProperty(o,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):o[i]=a,o}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,i){return(0,e.default)({"thumbs-wrapper":!o,"slider-wrapper":o,"axis-horizontal":i==="horizontal","axis-vertical":i!=="horizontal"})},SLIDER:function(o,i){return(0,e.default)({thumbs:!o,slider:o,animated:!i})},ITEM:function(o,i,a){return(0,e.default)({thumb:!o,slide:o,selected:i,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 Zo.default=r,Zo}var qo={},Ko={},Zu;function c0(){if(Zu)return Ko;Zu=1,Object.defineProperty(Ko,"__esModule",{value:!0}),Ko.outerWidth=void 0;var e=function(t){var n=t.offsetWidth,r=getComputedStyle(t);return n+=parseInt(r.marginLeft)+parseInt(r.marginRight),n};return Ko.outerWidth=e,Ko}var Qo={},qu;function Ts(){if(qu)return Qo;qu=1,Object.defineProperty(Qo,"__esModule",{value:!0}),Qo.default=void 0;var e=function(t,n,r){var o=t===0?t:t+n,i=r==="horizontal"?[o,0,0]:[0,o,0],a="translate3d",l="("+i.join(",")+")";return a+l};return Qo.default=e,Qo}var Go={},Ku;function bh(){if(Ku)return Go;Ku=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.default=void 0;var e=function(){return window};return Go.default=e,Go}var Qu;function wh(){if(Qu)return qo;Qu=1,Object.defineProperty(qo,"__esModule",{value:!0}),qo.default=void 0;var e=s(Ct),t=a(vh()),n=c0(),r=a(Ts()),o=a(mh()),i=a(bh());function a(T){return T&&T.__esModule?T:{default:T}}function l(){if(typeof WeakMap!="function")return null;var T=new WeakMap;return l=function(){return T},T}function s(T){if(T&&T.__esModule)return T;if(T===null||u(T)!=="object"&&typeof T!="function")return{default:T};var C=l();if(C&&C.has(T))return C.get(T);var A={},O=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var I in T)if(Object.prototype.hasOwnProperty.call(T,I)){var M=O?Object.getOwnPropertyDescriptor(T,I):null;M&&(M.get||M.set)?Object.defineProperty(A,I,M):A[I]=T[I]}return A.default=T,C&&C.set(T,A),A}function u(T){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(C){return typeof C}:u=function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},u(T)}function c(){return c=Object.assign||function(T){for(var C=1;C<arguments.length;C++){var A=arguments[C];for(var O in A)Object.prototype.hasOwnProperty.call(A,O)&&(T[O]=A[O])}return T},c.apply(this,arguments)}function h(T,C){if(!(T instanceof C))throw new TypeError("Cannot call a class as a function")}function g(T,C){for(var A=0;A<C.length;A++){var O=C[A];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(T,O.key,O)}}function p(T,C,A){return C&&g(T.prototype,C),T}function f(T,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function");T.prototype=Object.create(C&&C.prototype,{constructor:{value:T,writable:!0,configurable:!0}}),C&&m(T,C)}function m(T,C){return m=Object.setPrototypeOf||function(A,O){return A.__proto__=O,A},m(T,C)}function y(T){var C=x();return function(){var A=E(T),O;if(C){var I=E(this).constructor;O=Reflect.construct(A,arguments,I)}else O=A.apply(this,arguments);return w(this,O)}}function w(T,C){return C&&(u(C)==="object"||typeof C=="function")?C:v(T)}function v(T){if(T===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T}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(T){return E=Object.setPrototypeOf?Object.getPrototypeOf:function(C){return C.__proto__||Object.getPrototypeOf(C)},E(T)}function R(T,C,A){return C in T?Object.defineProperty(T,C,{value:A,enumerable:!0,configurable:!0,writable:!0}):T[C]=A,T}var S=function(T){return T.hasOwnProperty("key")},P=(function(T){f(A,T);var C=y(A);function A(O){var I;return h(this,A),I=C.call(this,O),R(v(I),"itemsWrapperRef",void 0),R(v(I),"itemsListRef",void 0),R(v(I),"thumbsRef",void 0),R(v(I),"setItemsWrapperRef",function(M){I.itemsWrapperRef=M}),R(v(I),"setItemsListRef",function(M){I.itemsListRef=M}),R(v(I),"setThumbsRef",function(M,D){I.thumbsRef||(I.thumbsRef=[]),I.thumbsRef[D]=M}),R(v(I),"updateSizes",function(){if(!(!I.props.children||!I.itemsWrapperRef||!I.thumbsRef)){var M=e.Children.count(I.props.children),D=I.itemsWrapperRef.clientWidth,k=I.props.thumbWidth?I.props.thumbWidth:(0,n.outerWidth)(I.thumbsRef[0]),Y=Math.floor(D/k),$=Y<M,K=$?M-Y:0;I.setState(function(ie,ee){return{itemSize:k,visibleItems:Y,firstItem:$?I.getFirstItem(ee.selectedItem):0,lastPosition:K,showArrows:$}})}}),R(v(I),"handleClickItem",function(M,D,k){if(!S(k)||k.key==="Enter"){var Y=I.props.onSelectItem;typeof Y=="function"&&Y(M,D)}}),R(v(I),"onSwipeStart",function(){I.setState({swiping:!0})}),R(v(I),"onSwipeEnd",function(){I.setState({swiping:!1})}),R(v(I),"onSwipeMove",function(M){var D=M.x;if(!I.state.itemSize||!I.itemsWrapperRef||!I.state.visibleItems)return!1;var k=0,Y=e.Children.count(I.props.children),$=-(I.state.firstItem*100)/I.state.visibleItems,K=Math.max(Y-I.state.visibleItems,0),ie=-K*100/I.state.visibleItems;$===k&&D>0&&(D=0),$===ie&&D<0&&(D=0);var ee=I.itemsWrapperRef.clientWidth,Q=$+100/(ee/D);return I.itemsListRef&&["WebkitTransform","MozTransform","MsTransform","OTransform","transform","msTransform"].forEach(function(ge){I.itemsListRef.style[ge]=(0,r.default)(Q,"%",I.props.axis)}),!0}),R(v(I),"slideRight",function(M){I.moveTo(I.state.firstItem-(typeof M=="number"?M:1))}),R(v(I),"slideLeft",function(M){I.moveTo(I.state.firstItem+(typeof M=="number"?M:1))}),R(v(I),"moveTo",function(M){M=M<0?0:M,M=M>=I.state.lastPosition?I.state.lastPosition:M,I.setState({firstItem:M})}),I.state={selectedItem:O.selectedItem,swiping:!1,showArrows:!1,firstItem:0,visibleItems:0,lastPosition:0},I}return p(A,[{key:"componentDidMount",value:function(){this.setupThumbs()}},{key:"componentDidUpdate",value:function(O){this.props.selectedItem!==this.state.selectedItem&&this.setState({selectedItem:this.props.selectedItem,firstItem:this.getFirstItem(this.props.selectedItem)}),this.props.children!==O.children&&this.updateSizes()}},{key:"componentWillUnmount",value:function(){this.destroyThumbs()}},{key:"setupThumbs",value:function(){(0,i.default)().addEventListener("resize",this.updateSizes),(0,i.default)().addEventListener("DOMContentLoaded",this.updateSizes),this.updateSizes()}},{key:"destroyThumbs",value:function(){(0,i.default)().removeEventListener("resize",this.updateSizes),(0,i.default)().removeEventListener("DOMContentLoaded",this.updateSizes)}},{key:"getFirstItem",value:function(O){var I=O;return O>=this.state.lastPosition&&(I=this.state.lastPosition),O<this.state.firstItem+this.state.visibleItems&&(I=this.state.firstItem),O<this.state.firstItem&&(I=O),I}},{key:"renderItems",value:function(){var O=this;return this.props.children.map(function(I,M){var D=t.default.ITEM(!1,M===O.state.selectedItem),k={key:M,ref:function(Y){return O.setThumbsRef(Y,M)},className:D,onClick:O.handleClickItem.bind(O,M,O.props.children[M]),onKeyDown:O.handleClickItem.bind(O,M,O.props.children[M]),"aria-label":"".concat(O.props.labels.item," ").concat(M+1),style:{width:O.props.thumbWidth}};return e.default.createElement("li",c({},k,{role:"button",tabIndex:0}),I)})}},{key:"render",value:function(){var O=this;if(!this.props.children)return null;var I=e.Children.count(this.props.children)>1,M=this.state.showArrows&&this.state.firstItem>0,D=this.state.showArrows&&this.state.firstItem<this.state.lastPosition,k={},Y=-this.state.firstItem*(this.state.itemSize||0),$=(0,r.default)(Y,"px",this.props.axis),K=this.props.transitionTime+"ms";return k={WebkitTransform:$,MozTransform:$,MsTransform:$,OTransform:$,transform:$,msTransform:$,WebkitTransitionDuration:K,MozTransitionDuration:K,MsTransitionDuration:K,OTransitionDuration:K,transitionDuration:K,msTransitionDuration:K},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(!M),onClick:function(){return O.slideRight()},"aria-label":this.props.labels.leftArrow}),I?e.default.createElement(o.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:k,innerRef:this.setItemsListRef,allowMouseEvents:this.props.emulateTouch},this.renderItems()):e.default.createElement("ul",{className:t.default.SLIDER(!1,this.state.swiping),ref:function(ie){return O.setItemsListRef(ie)},style:k},this.renderItems()),e.default.createElement("button",{type:"button",className:t.default.ARROW_NEXT(!D),onClick:function(){return O.slideLeft()},"aria-label":this.props.labels.rightArrow})))}}]),A})(e.Component);return qo.default=P,R(P,"displayName","Thumbs"),R(P,"defaultProps",{axis:"horizontal",labels:{leftArrow:"previous slide / item",rightArrow:"next slide / item",item:"slide item"},selectedItem:0,thumbWidth:80,transitionTime:350}),qo}var Jo={},Gu;function d0(){if(Gu)return Jo;Gu=1,Object.defineProperty(Jo,"__esModule",{value:!0}),Jo.default=void 0;var e=function(){return document};return Jo.default=e,Jo}var Tn={},Ju;function yh(){if(Ju)return Tn;Ju=1,Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.setPosition=Tn.getPosition=Tn.isKeyboardEvent=Tn.defaultStatusFormatter=Tn.noop=void 0;var e=Ct,t=n(Ts());function n(s){return s&&s.__esModule?s:{default:s}}var r=function(){};Tn.noop=r;var o=function(s,u){return"".concat(s," of ").concat(u)};Tn.defaultStatusFormatter=o;var i=function(s){return s?s.hasOwnProperty("key"):!1};Tn.isKeyboardEvent=i;var a=function(s,u){if(u.infiniteLoop&&++s,s===0)return 0;var c=e.Children.count(u.children);if(u.centerMode&&u.axis==="horizontal"){var h=-s*u.centerSlidePercentage,g=c-1;return s&&(s!==g||u.infiniteLoop)?h+=(100-u.centerSlidePercentage)/2:s===g&&(h+=100-u.centerSlidePercentage),h}return-s*100};Tn.getPosition=a;var l=function(s,u){var c={};return["WebkitTransform","MozTransform","MsTransform","OTransform","transform","msTransform"].forEach(function(h){c[h]=(0,t.default)(s,"%",u)}),c};return Tn.setPosition=l,Tn}var Wn={},ec;function h0(){if(ec)return Wn;ec=1,Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.fadeAnimationHandler=Wn.slideStopSwipingHandler=Wn.slideSwipeAnimationHandler=Wn.slideAnimationHandler=void 0;var e=Ct,t=r(Ts()),n=yh();function r(h){return h&&h.__esModule?h:{default:h}}function o(h,g){var p=Object.keys(h);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(h);g&&(f=f.filter(function(m){return Object.getOwnPropertyDescriptor(h,m).enumerable})),p.push.apply(p,f)}return p}function i(h){for(var g=1;g<arguments.length;g++){var p=arguments[g]!=null?arguments[g]:{};g%2?o(Object(p),!0).forEach(function(f){a(h,f,p[f])}):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(p)):o(Object(p)).forEach(function(f){Object.defineProperty(h,f,Object.getOwnPropertyDescriptor(p,f))})}return h}function a(h,g,p){return g in h?Object.defineProperty(h,g,{value:p,enumerable:!0,configurable:!0,writable:!0}):h[g]=p,h}var l=function(h,g){var p={},f=g.selectedItem,m=f,y=e.Children.count(h.children)-1,w=h.infiniteLoop&&(f<0||f>y);if(w)return m<0?h.centerMode&&h.centerSlidePercentage&&h.axis==="horizontal"?p.itemListStyle=(0,n.setPosition)(-(y+2)*h.centerSlidePercentage-(100-h.centerSlidePercentage)/2,h.axis):p.itemListStyle=(0,n.setPosition)(-(y+2)*100,h.axis):m>y&&(p.itemListStyle=(0,n.setPosition)(0,h.axis)),p;var v=(0,n.getPosition)(f,h),x=(0,t.default)(v,"%",h.axis),E=h.transitionTime+"ms";return p.itemListStyle={WebkitTransform:x,msTransform:x,OTransform:x,transform:x},g.swiping||(p.itemListStyle=i(i({},p.itemListStyle),{},{WebkitTransitionDuration:E,MozTransitionDuration:E,OTransitionDuration:E,transitionDuration:E,msTransitionDuration:E})),p};Wn.slideAnimationHandler=l;var s=function(h,g,p,f){var m={},y=g.axis==="horizontal",w=e.Children.count(g.children),v=0,x=(0,n.getPosition)(p.selectedItem,g),E=g.infiniteLoop?(0,n.getPosition)(w-1,g)-100:(0,n.getPosition)(w-1,g),R=y?h.x:h.y,S=R;x===v&&R>0&&(S=0),x===E&&R<0&&(S=0);var P=x+100/(p.itemSize/S),T=Math.abs(R)>g.swipeScrollTolerance;return g.infiniteLoop&&T&&(p.selectedItem===0&&P>-100?P-=w*100:p.selectedItem===w-1&&P<-w*100&&(P+=w*100)),(!g.preventMovementUntilSwipeScrollTolerance||T||p.swipeMovementStarted)&&(p.swipeMovementStarted||f({swipeMovementStarted:!0}),m.itemListStyle=(0,n.setPosition)(P,g.axis)),T&&!p.cancelClick&&f({cancelClick:!0}),m};Wn.slideSwipeAnimationHandler=s;var u=function(h,g){var p=(0,n.getPosition)(g.selectedItem,h),f=(0,n.setPosition)(p,h.axis);return{itemListStyle:f}};Wn.slideStopSwipingHandler=u;var c=function(h,g){var p=h.transitionTime+"ms",f="ease-in-out",m={position:"absolute",display:"block",zIndex:-2,minHeight:"100%",opacity:0,top:0,right:0,left:0,bottom:0,transitionTimingFunction:f,msTransitionTimingFunction:f,MozTransitionTimingFunction:f,WebkitTransitionTimingFunction:f,OTransitionTimingFunction:f};return g.swiping||(m=i(i({},m),{},{WebkitTransitionDuration:p,MozTransitionDuration:p,OTransitionDuration:p,transitionDuration:p,msTransitionDuration:p})),{slideStyle:m,selectedStyle:i(i({},m),{},{opacity:1,position:"relative"}),prevStyle:i({},m)}};return Wn.fadeAnimationHandler=c,Wn}var tc;function f0(){if(tc)return Yo;tc=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.default=void 0;var e=c(Ct),t=s(mh()),n=s(vh()),r=s(wh()),o=s(d0()),i=s(bh()),a=yh(),l=h0();function s(O){return O&&O.__esModule?O:{default:O}}function u(){if(typeof WeakMap!="function")return null;var O=new WeakMap;return u=function(){return O},O}function c(O){if(O&&O.__esModule)return O;if(O===null||h(O)!=="object"&&typeof O!="function")return{default:O};var I=u();if(I&&I.has(O))return I.get(O);var M={},D=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var k in O)if(Object.prototype.hasOwnProperty.call(O,k)){var Y=D?Object.getOwnPropertyDescriptor(O,k):null;Y&&(Y.get||Y.set)?Object.defineProperty(M,k,Y):M[k]=O[k]}return M.default=O,I&&I.set(O,M),M}function h(O){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?h=function(I){return typeof I}:h=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},h(O)}function g(){return g=Object.assign||function(O){for(var I=1;I<arguments.length;I++){var M=arguments[I];for(var D in M)Object.prototype.hasOwnProperty.call(M,D)&&(O[D]=M[D])}return O},g.apply(this,arguments)}function p(O,I){var M=Object.keys(O);if(Object.getOwnPropertySymbols){var D=Object.getOwnPropertySymbols(O);I&&(D=D.filter(function(k){return Object.getOwnPropertyDescriptor(O,k).enumerable})),M.push.apply(M,D)}return M}function f(O){for(var I=1;I<arguments.length;I++){var M=arguments[I]!=null?arguments[I]:{};I%2?p(Object(M),!0).forEach(function(D){C(O,D,M[D])}):Object.getOwnPropertyDescriptors?Object.defineProperties(O,Object.getOwnPropertyDescriptors(M)):p(Object(M)).forEach(function(D){Object.defineProperty(O,D,Object.getOwnPropertyDescriptor(M,D))})}return O}function m(O,I){if(!(O instanceof I))throw new TypeError("Cannot call a class as a function")}function y(O,I){for(var M=0;M<I.length;M++){var D=I[M];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(O,D.key,D)}}function w(O,I,M){return I&&y(O.prototype,I),O}function v(O,I){if(typeof I!="function"&&I!==null)throw new TypeError("Super expression must either be null or a function");O.prototype=Object.create(I&&I.prototype,{constructor:{value:O,writable:!0,configurable:!0}}),I&&x(O,I)}function x(O,I){return x=Object.setPrototypeOf||function(M,D){return M.__proto__=D,M},x(O,I)}function E(O){var I=P();return function(){var M=T(O),D;if(I){var k=T(this).constructor;D=Reflect.construct(M,arguments,k)}else D=M.apply(this,arguments);return R(this,D)}}function R(O,I){return I&&(h(I)==="object"||typeof I=="function")?I:S(O)}function S(O){if(O===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O}function P(){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 T(O){return T=Object.setPrototypeOf?Object.getPrototypeOf:function(I){return I.__proto__||Object.getPrototypeOf(I)},T(O)}function C(O,I,M){return I in O?Object.defineProperty(O,I,{value:M,enumerable:!0,configurable:!0,writable:!0}):O[I]=M,O}var A=(function(O){v(M,O);var I=E(M);function M(D){var k;m(this,M),k=I.call(this,D),C(S(k),"thumbsRef",void 0),C(S(k),"carouselWrapperRef",void 0),C(S(k),"listRef",void 0),C(S(k),"itemsRef",void 0),C(S(k),"timer",void 0),C(S(k),"animationHandler",void 0),C(S(k),"setThumbsRef",function($){k.thumbsRef=$}),C(S(k),"setCarouselWrapperRef",function($){k.carouselWrapperRef=$}),C(S(k),"setListRef",function($){k.listRef=$}),C(S(k),"setItemsRef",function($,K){k.itemsRef||(k.itemsRef=[]),k.itemsRef[K]=$}),C(S(k),"autoPlay",function(){e.Children.count(k.props.children)<=1||(k.clearAutoPlay(),k.props.autoPlay&&(k.timer=setTimeout(function(){k.increment()},k.props.interval)))}),C(S(k),"clearAutoPlay",function(){k.timer&&clearTimeout(k.timer)}),C(S(k),"resetAutoPlay",function(){k.clearAutoPlay(),k.autoPlay()}),C(S(k),"stopOnHover",function(){k.setState({isMouseEntered:!0},k.clearAutoPlay)}),C(S(k),"startOnLeave",function(){k.setState({isMouseEntered:!1},k.autoPlay)}),C(S(k),"isFocusWithinTheCarousel",function(){return k.carouselWrapperRef?!!((0,o.default)().activeElement===k.carouselWrapperRef||k.carouselWrapperRef.contains((0,o.default)().activeElement)):!1}),C(S(k),"navigateWithKeyboard",function($){if(k.isFocusWithinTheCarousel()){var K=k.props.axis,ie=K==="horizontal",ee={ArrowUp:38,ArrowRight:39,ArrowDown:40,ArrowLeft:37},Q=ie?ee.ArrowRight:ee.ArrowDown,ge=ie?ee.ArrowLeft:ee.ArrowUp;Q===$.keyCode?k.increment():ge===$.keyCode&&k.decrement()}}),C(S(k),"updateSizes",function(){if(!(!k.state.initialized||!k.itemsRef||k.itemsRef.length===0)){var $=k.props.axis==="horizontal",K=k.itemsRef[0];if(K){var ie=$?K.clientWidth:K.clientHeight;k.setState({itemSize:ie}),k.thumbsRef&&k.thumbsRef.updateSizes()}}}),C(S(k),"setMountState",function(){k.setState({hasMount:!0}),k.updateSizes()}),C(S(k),"handleClickItem",function($,K){if(e.Children.count(k.props.children)!==0){if(k.state.cancelClick){k.setState({cancelClick:!1});return}k.props.onClickItem($,K),$!==k.state.selectedItem&&k.setState({selectedItem:$})}}),C(S(k),"handleOnChange",function($,K){e.Children.count(k.props.children)<=1||k.props.onChange($,K)}),C(S(k),"handleClickThumb",function($,K){k.props.onClickThumb($,K),k.moveTo($)}),C(S(k),"onSwipeStart",function($){k.setState({swiping:!0}),k.props.onSwipeStart($)}),C(S(k),"onSwipeEnd",function($){k.setState({swiping:!1,cancelClick:!1,swipeMovementStarted:!1}),k.props.onSwipeEnd($),k.clearAutoPlay(),k.state.autoPlay&&k.autoPlay()}),C(S(k),"onSwipeMove",function($,K){k.props.onSwipeMove(K);var ie=k.props.swipeAnimationHandler($,k.props,k.state,k.setState.bind(S(k)));return k.setState(f({},ie)),!!Object.keys(ie).length}),C(S(k),"decrement",function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;k.moveTo(k.state.selectedItem-(typeof $=="number"?$:1))}),C(S(k),"increment",function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;k.moveTo(k.state.selectedItem+(typeof $=="number"?$:1))}),C(S(k),"moveTo",function($){if(typeof $=="number"){var K=e.Children.count(k.props.children)-1;$<0&&($=k.props.infiniteLoop?K:0),$>K&&($=k.props.infiniteLoop?0:K),k.selectItem({selectedItem:$}),k.state.autoPlay&&k.state.isMouseEntered===!1&&k.resetAutoPlay()}}),C(S(k),"onClickNext",function(){k.increment(1)}),C(S(k),"onClickPrev",function(){k.decrement(1)}),C(S(k),"onSwipeForward",function(){k.increment(1),k.props.emulateTouch&&k.setState({cancelClick:!0})}),C(S(k),"onSwipeBackwards",function(){k.decrement(1),k.props.emulateTouch&&k.setState({cancelClick:!0})}),C(S(k),"changeItem",function($){return function(K){(!(0,a.isKeyboardEvent)(K)||K.key==="Enter")&&k.moveTo($)}}),C(S(k),"selectItem",function($){k.setState(f({previousItem:k.state.selectedItem},$),function(){k.setState(k.animationHandler(k.props,k.state))}),k.handleOnChange($.selectedItem,e.Children.toArray(k.props.children)[$.selectedItem])}),C(S(k),"getInitialImage",function(){var $=k.props.selectedItem,K=k.itemsRef&&k.itemsRef[$],ie=K&&K.getElementsByTagName("img")||[];return ie[0]}),C(S(k),"getVariableItemHeight",function($){var K=k.itemsRef&&k.itemsRef[$];if(k.state.hasMount&&K&&K.children.length){var ie=K.children[0].getElementsByTagName("img")||[];if(ie.length>0){var ee=ie[0];if(!ee.complete){var Q=function de(){k.forceUpdate(),ee.removeEventListener("load",de)};ee.addEventListener("load",Q)}}var ge=ie[0]||K.children[0],oe=ge.clientHeight;return oe>0?oe:null}return null});var Y={initialized:!1,previousItem:D.selectedItem,selectedItem:D.selectedItem,hasMount:!1,isMouseEntered:!1,autoPlay:D.autoPlay,swiping:!1,swipeMovementStarted:!1,cancelClick:!1,itemSize:1,itemListStyle:{},slideStyle:{},selectedStyle:{},prevStyle:{}};return k.animationHandler=typeof D.animationHandler=="function"&&D.animationHandler||D.animationHandler==="fade"&&l.fadeAnimationHandler||l.slideAnimationHandler,k.state=f(f({},Y),k.animationHandler(D,Y)),k}return w(M,[{key:"componentDidMount",value:function(){this.props.children&&this.setupCarousel()}},{key:"componentDidUpdate",value:function(D,k){!D.children&&this.props.children&&!this.state.initialized&&this.setupCarousel(),!D.autoFocus&&this.props.autoFocus&&this.forceFocus(),k.swiping&&!this.state.swiping&&this.setState(f({},this.props.stopSwipingHandler(this.props,this.state))),(D.selectedItem!==this.props.selectedItem||D.centerMode!==this.props.centerMode)&&(this.updateSizes(),this.moveTo(this.props.selectedItem)),D.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 D=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 k=D.getInitialImage();k&&!k.complete?k.addEventListener("load",D.setMountState):D.setMountState()})}},{key:"destroyCarousel",value:function(){this.state.initialized&&(this.unbindEvents(),this.destroyAutoPlay())}},{key:"setupAutoPlay",value:function(){this.autoPlay();var D=this.carouselWrapperRef;this.props.stopOnHover&&D&&(D.addEventListener("mouseenter",this.stopOnHover),D.addEventListener("mouseleave",this.startOnLeave))}},{key:"destroyAutoPlay",value:function(){this.clearAutoPlay();var D=this.carouselWrapperRef;this.props.stopOnHover&&D&&(D.removeEventListener("mouseenter",this.stopOnHover),D.removeEventListener("mouseleave",this.startOnLeave))}},{key:"bindEvents",value:function(){(0,i.default)().addEventListener("resize",this.updateSizes),(0,i.default)().addEventListener("DOMContentLoaded",this.updateSizes),this.props.useKeyboardArrows&&(0,o.default)().addEventListener("keydown",this.navigateWithKeyboard)}},{key:"unbindEvents",value:function(){(0,i.default)().removeEventListener("resize",this.updateSizes),(0,i.default)().removeEventListener("DOMContentLoaded",this.updateSizes);var D=this.getInitialImage();D&&D.removeEventListener("load",this.setMountState),this.props.useKeyboardArrows&&(0,o.default)().removeEventListener("keydown",this.navigateWithKeyboard)}},{key:"forceFocus",value:function(){var D;(D=this.carouselWrapperRef)===null||D===void 0||D.focus()}},{key:"renderItems",value:function(D){var k=this;return this.props.children?e.Children.map(this.props.children,function(Y,$){var K=$===k.state.selectedItem,ie=$===k.state.previousItem,ee=K&&k.state.selectedStyle||ie&&k.state.prevStyle||k.state.slideStyle||{};k.props.centerMode&&k.props.axis==="horizontal"&&(ee=f(f({},ee),{},{minWidth:k.props.centerSlidePercentage+"%"})),k.state.swiping&&k.state.swipeMovementStarted&&(ee=f(f({},ee),{},{pointerEvents:"none"}));var Q={ref:function(ge){return k.setItemsRef(ge,$)},key:"itemKey"+$+(D?"clone":""),className:n.default.ITEM(!0,$===k.state.selectedItem,$===k.state.previousItem),onClick:k.handleClickItem.bind(k,$,Y),style:ee};return e.default.createElement("li",Q,k.props.renderItem(Y,{isSelected:$===k.state.selectedItem,isPrevious:$===k.state.previousItem}))}):[]}},{key:"renderControls",value:function(){var D=this,k=this.props,Y=k.showIndicators,$=k.labels,K=k.renderIndicator,ie=k.children;return Y?e.default.createElement("ul",{className:"control-dots"},e.Children.map(ie,function(ee,Q){return K&&K(D.changeItem(Q),Q===D.state.selectedItem,Q,$.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 D=this;if(!this.props.children||e.Children.count(this.props.children)===0)return null;var k=this.props.swipeable&&e.Children.count(this.props.children)>1,Y=this.props.axis==="horizontal",$=this.props.showArrows&&e.Children.count(this.props.children)>1,K=$&&(this.state.selectedItem>0||this.props.infiniteLoop)||!1,ie=$&&(this.state.selectedItem<e.Children.count(this.props.children)-1||this.props.infiniteLoop)||!1,ee=this.renderItems(!0),Q=ee.shift(),ge=ee.pop(),oe={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},de={};if(Y){if(oe.onSwipeLeft=this.onSwipeForward,oe.onSwipeRight=this.onSwipeBackwards,this.props.dynamicHeight){var pe=this.getVariableItemHeight(this.state.selectedItem);de.height=pe||"auto"}}else oe.onSwipeUp=this.props.verticalSwipe==="natural"?this.onSwipeBackwards:this.onSwipeForward,oe.onSwipeDown=this.props.verticalSwipe==="natural"?this.onSwipeForward:this.onSwipeBackwards,oe.style=f(f({},oe.style),{},{height:this.state.itemSize}),de.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,K,this.props.labels.leftArrow),e.default.createElement("div",{className:n.default.WRAPPER(!0,this.props.axis),style:de},k?e.default.createElement(t.default,g({tagName:"ul",innerRef:this.setListRef},oe,{allowMouseEvents:this.props.emulateTouch}),this.props.infiniteLoop&&ge,this.renderItems(),this.props.infiniteLoop&&Q):e.default.createElement("ul",{className:n.default.SLIDER(!0,this.state.swiping),ref:function(le){return D.setListRef(le)},style:this.state.itemListStyle||{}},this.props.infiniteLoop&&ge,this.renderItems(),this.props.infiniteLoop&&Q)),this.props.renderArrowNext(this.onClickNext,ie,this.props.labels.rightArrow),this.renderStatus()),this.renderThumbs())}}]),M})(e.default.Component);return Yo.default=A,C(A,"displayName","Carousel"),C(A,"defaultProps",{ariaLabel:void 0,axis:"horizontal",centerSlidePercentage:80,interval:3e3,labels:{leftArrow:"previous slide / item",rightArrow:"next slide / item",item:"slide item"},onClickItem:a.noop,onClickThumb:a.noop,onChange:a.noop,onSwipeStart:function(){},onSwipeEnd:function(){},onSwipeMove:function(){return!1},preventMovementUntilSwipeScrollTolerance:!1,renderArrowPrev:function(O,I,M){return e.default.createElement("button",{type:"button","aria-label":M,className:n.default.ARROW_PREV(!I),onClick:O})},renderArrowNext:function(O,I,M){return e.default.createElement("button",{type:"button","aria-label":M,className:n.default.ARROW_NEXT(!I),onClick:O})},renderIndicator:function(O,I,M,D){return e.default.createElement("li",{className:n.default.DOT(I),onClick:O,onKeyDown:O,value:M,key:M,role:"button",tabIndex:0,"aria-label":"".concat(D," ").concat(M+1)})},renderItem:function(O){return O},renderThumbs:function(O){var I=e.Children.map(O,function(M){var D=M;if(M.type!=="img"&&(D=e.Children.toArray(M.props.children).find(function(k){return k.type==="img"})),!!D)return D});return I.filter(function(M){return M}).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"),[]):I},statusFormatter:a.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:l.slideSwipeAnimationHandler,stopSwipingHandler:l.slideStopSwipingHandler}),Yo}var p0={};function g0(){return p0}var nc;function m0(){return nc||(nc=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=o(f0()),n=g0(),r=o(wh());function o(i){return i&&i.__esModule?i:{default:i}}})(Wu)),Wu}var v0=m0(),dl,rc;function b0(){if(rc)return dl;rc=1;var e=Cm(),t=function(){return e.Date.now()};return dl=t,dl}var hl,oc;function w0(){if(oc)return hl;oc=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return hl=t,hl}var fl,ic;function y0(){if(ic)return fl;ic=1;var e=w0(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return fl=n,fl}var pl,ac;function Os(){if(ac)return pl;ac=1;var e=y0(),t=Pa(),n=xm(),r=NaN,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,a=/^0o[0-7]+$/i,l=parseInt;function s(u){if(typeof u=="number")return u;if(n(u))return r;if(t(u)){var c=typeof u.valueOf=="function"?u.valueOf():u;u=t(c)?c+"":c}if(typeof u!="string")return u===0?u:+u;u=e(u);var h=i.test(u);return h||a.test(u)?l(u.slice(2),h?2:8):o.test(u)?r:+u}return pl=s,pl}var gl,lc;function xh(){if(lc)return gl;lc=1;var e=Pa(),t=b0(),n=Os(),r="Expected a function",o=Math.max,i=Math.min;function a(l,s,u){var c,h,g,p,f,m,y=0,w=!1,v=!1,x=!0;if(typeof l!="function")throw new TypeError(r);s=n(s)||0,e(u)&&(w=!!u.leading,v="maxWait"in u,g=v?o(n(u.maxWait)||0,s):g,x="trailing"in u?!!u.trailing:x);function E(M){var D=c,k=h;return c=h=void 0,y=M,p=l.apply(k,D),p}function R(M){return y=M,f=setTimeout(T,s),w?E(M):p}function S(M){var D=M-m,k=M-y,Y=s-D;return v?i(Y,g-k):Y}function P(M){var D=M-m,k=M-y;return m===void 0||D>=s||D<0||v&&k>=g}function T(){var M=t();if(P(M))return C(M);f=setTimeout(T,S(M))}function C(M){return f=void 0,x&&c?E(M):(c=h=void 0,p)}function A(){f!==void 0&&clearTimeout(f),y=0,c=m=h=f=void 0}function O(){return f===void 0?p:C(t())}function I(){var M=t(),D=P(M);if(c=arguments,h=this,m=M,D){if(f===void 0)return R(m);if(v)return clearTimeout(f),f=setTimeout(T,s),E(m)}return f===void 0&&(f=setTimeout(T,s)),p}return I.cancel=A,I.flush=O,I}return gl=a,gl}var x0=xh();const Ch=Er(x0);function Sn(e,t,n,r,o=!1){const i=d.useRef();i.current=t,d.useEffect(()=>{if(n===null||n.addEventListener===void 0)return;const a=n,l=s=>{i.current?.call(a,s)};return a.addEventListener(e,l,{passive:r,capture:o}),()=>{a.removeEventListener(e,l,{capture:o})}},[e,n,r,o])}function kr(e,t){return e===void 0?void 0:t}const C0=Math.PI;function sc(e){return e*C0/180}const kh=(e,t,n)=>({x1:e-n/2,y1:t-n/2,x2:e+n/2,y2:t+n/2}),Sh=(e,t,n,r,o)=>{switch(e){case"left":return Math.floor(t)+r+o/2;case"center":return Math.floor(t+n/2);case"right":return Math.floor(t+n)-r-o/2}},Mh=(e,t,n)=>Math.min(e,t-n*2),Ih=(e,t,n)=>n.x1<=e&&e<=n.x2&&n.y1<=t&&t<=n.y2,Ds=e=>{const t=e.fgColor??"currentColor";return d.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},d.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"}),d.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"}))},k0=e=>{const t=e.fgColor??"currentColor";return d.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},d.createElement("path",{d:"M19 6L10.3802 17L5.34071 11.8758",vectorEffect:"non-scaling-stroke",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))};function S0(e,t,n){const[r,o]=d.useState(e),i=d.useRef(!0);d.useEffect(()=>()=>{i.current=!1},[]);const a=d.useRef(Ch(l=>{i.current&&o(l)},n));return d.useLayoutEffect(()=>{i.current&&a.current(()=>e())},t),r}const M0="֑-߿יִ-﷽ﹰ-ﻼ",I0="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",R0=new RegExp("^[^"+I0+"]*["+M0+"]");function Ps(e){return R0.test(e)?"rtl":"not-rtl"}let Xi;function ls(){if(typeof document>"u")return 0;if(Xi!==void 0)return Xi;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(),Xi=n-r,Xi}const Nr=Symbol();function E0(e){const t=d.useRef([Nr,e]);t.current[1]!==e&&(t.current[0]=e),t.current[1]=e;const[n,r]=d.useState(e),[,o]=d.useState(),i=d.useCallback(l=>{const s=t.current[0];s!==Nr&&(l=typeof l=="function"?l(s):l,l===s)||(s!==Nr&&o({}),r(u=>typeof l=="function"?l(s===Nr?u:s):l),t.current[0]=Nr)},[]),a=d.useCallback(()=>{t.current[0]=Nr,o({})},[]);return[t.current[0]===Nr?n:t.current[0],i,a]}function Rh(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 T0(e){const t=d.useRef(e);return Po(e,t.current)||(t.current=e),t.current}const O0=e=>{const{urls:t,canWrite:n,onEditClick:r,renderImage:o}=e,i=t.filter(l=>l!=="");if(i.length===0)return null;const a=i.length>1;return d.createElement(s0,{"data-testid":"GDG-default-image-overlay-editor"},d.createElement(v0.Carousel,{showArrows:a,showThumbs:!1,swipeable:a,emulateTouch:a,infiniteLoop:a},i.map(l=>{const s=o?.(l)??d.createElement("img",{draggable:!1,src:l});return d.createElement("div",{className:"gdg-centering-container",key:l},s)})),n&&r&&d.createElement("button",{className:"gdg-edit-icon",onClick:r},d.createElement(Ds,null)))};function As(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Zr=As();function Eh(e){Zr=e}const Th=/[&<>"']/,D0=new RegExp(Th.source,"g"),Oh=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,P0=new RegExp(Oh.source,"g"),A0={"&":"&","<":"<",">":">",'"':""","'":"'"},uc=e=>A0[e];function On(e,t){if(t){if(Th.test(e))return e.replace(D0,uc)}else if(Oh.test(e))return e.replace(P0,uc);return e}const L0=/(^|[^\[])\^/g;function Pt(e,t){let n=typeof e=="string"?e:e.source;t=t||"";const r={replace:(o,i)=>{let a=typeof i=="string"?i:i.source;return a=a.replace(L0,"$1"),n=n.replace(o,a),r},getRegex:()=>new RegExp(n,t)};return r}function cc(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const ci={exec:()=>null};function dc(e,t){const n=e.replace(/\|/g,(i,a,l)=>{let s=!1,u=a;for(;--u>=0&&l[u]==="\\";)s=!s;return s?"|":" |"}),r=n.split(/ \|/);let o=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;o<r.length;o++)r[o]=r[o].trim().replace(/\\\|/g,"|");return r}function ei(e,t,n){const r=e.length;if(r===0)return"";let o=0;for(;o<r&&e.charAt(r-o-1)===t;)o++;return e.slice(0,r-o)}function H0(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return-1}function hc(e,t,n,r){const o=t.href,i=t.title?On(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){r.state.inLink=!0;const l={type:"link",raw:n,href:o,title:i,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,l}return{type:"image",raw:n,href:o,title:i,text:On(a)}}function F0(e,t){const n=e.match(/^(\s+)(?:```)/);if(n===null)return t;const r=n[1];return t.split(`
|
|
3
|
-
`).map(o=>{const i=o.match(/^\s+/);if(i===null)return o;const[a]=i;return a.length>=r.length?o.slice(r.length):o}).join(`
|
|
4
|
-
`)}class ma{options;rules;lexer;constructor(t){this.options=t||Zr}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:ei(r,`
|
|
5
|
-
`)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const r=n[0],o=F0(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):n[2],text:o}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(/#$/.test(r)){const o=ei(r,"#");(this.options.pedantic||!o||/ $/.test(o))&&(r=o.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:ei(n[0],`
|
|
6
|
-
`)}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){let r=ei(n[0],`
|
|
7
|
-
`).split(`
|
|
8
|
-
`),o="",i="";const a=[];for(;r.length>0;){let l=!1;const s=[];let u;for(u=0;u<r.length;u++)if(/^ {0,3}>/.test(r[u]))s.push(r[u]),l=!0;else if(!l)s.push(r[u]);else break;r=r.slice(u);const c=s.join(`
|
|
9
|
-
`),h=c.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,`
|
|
10
|
-
$1`).replace(/^ {0,3}>[ \t]?/gm,"");o=o?`${o}
|
|
11
|
-
${c}`:c,i=i?`${i}
|
|
12
|
-
${h}`:h;const g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,a,!0),this.lexer.state.top=g,r.length===0)break;const p=a[a.length-1];if(p?.type==="code")break;if(p?.type==="blockquote"){const f=p,m=f.raw+`
|
|
13
|
-
`+r.join(`
|
|
14
|
-
`),y=this.blockquote(m);a[a.length-1]=y,o=o.substring(0,o.length-f.raw.length)+y.raw,i=i.substring(0,i.length-f.text.length)+y.text;break}else if(p?.type==="list"){const f=p,m=f.raw+`
|
|
15
|
-
`+r.join(`
|
|
16
|
-
`),y=this.list(m);a[a.length-1]=y,o=o.substring(0,o.length-p.raw.length)+y.raw,i=i.substring(0,i.length-f.raw.length)+y.raw,r=m.substring(a[a.length-1].raw.length).split(`
|
|
17
|
-
`);continue}}return{type:"blockquote",raw:o,tokens:a,text:i}}}list(t){let n=this.rules.block.list.exec(t);if(n){let r=n[1].trim();const o=r.length>1,i={type:"list",raw:"",ordered:o,start:o?+r.slice(0,-1):"",loose:!1,items:[]};r=o?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=o?r:"[*+-]");const a=new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`);let l=!1;for(;t;){let s=!1,u="",c="";if(!(n=a.exec(t))||this.rules.block.hr.test(t))break;u=n[0],t=t.substring(u.length);let h=n[2].split(`
|
|
18
|
-
`,1)[0].replace(/^\t+/,w=>" ".repeat(3*w.length)),g=t.split(`
|
|
19
|
-
`,1)[0],p=!h.trim(),f=0;if(this.options.pedantic?(f=2,c=h.trimStart()):p?f=n[1].length+1:(f=n[2].search(/[^ ]/),f=f>4?1:f,c=h.slice(f),f+=n[1].length),p&&/^ *$/.test(g)&&(u+=g+`
|
|
20
|
-
`,t=t.substring(g.length+1),s=!0),!s){const w=new RegExp(`^ {0,${Math.min(3,f-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),v=new RegExp(`^ {0,${Math.min(3,f-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),x=new RegExp(`^ {0,${Math.min(3,f-1)}}(?:\`\`\`|~~~)`),E=new RegExp(`^ {0,${Math.min(3,f-1)}}#`);for(;t;){const R=t.split(`
|
|
21
|
-
`,1)[0];if(g=R,this.options.pedantic&&(g=g.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),x.test(g)||E.test(g)||w.test(g)||v.test(t))break;if(g.search(/[^ ]/)>=f||!g.trim())c+=`
|
|
22
|
-
`+g.slice(f);else{if(p||h.search(/[^ ]/)>=4||x.test(h)||E.test(h)||v.test(h))break;c+=`
|
|
23
|
-
`+g}!p&&!g.trim()&&(p=!0),u+=R+`
|
|
24
|
-
`,t=t.substring(R.length+1),h=g.slice(f)}}i.loose||(l?i.loose=!0:/\n *\n *$/.test(u)&&(l=!0));let m=null,y;this.options.gfm&&(m=/^\[[ xX]\] /.exec(c),m&&(y=m[0]!=="[ ] ",c=c.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:u,task:!!m,checked:y,loose:!1,text:c,tokens:[]}),i.raw+=u}i.items[i.items.length-1].raw=i.items[i.items.length-1].raw.trimEnd(),i.items[i.items.length-1].text=i.items[i.items.length-1].text.trimEnd(),i.raw=i.raw.trimEnd();for(let s=0;s<i.items.length;s++)if(this.lexer.state.top=!1,i.items[s].tokens=this.lexer.blockTokens(i.items[s].text,[]),!i.loose){const u=i.items[s].tokens.filter(h=>h.type==="space"),c=u.length>0&&u.some(h=>/\n.*\n/.test(h.raw));i.loose=c}if(i.loose)for(let s=0;s<i.items.length;s++)i.items[s].loose=!0;return i}}html(t){const n=this.rules.block.html.exec(t);if(n)return{type:"html",block:!0,raw:n[0],pre:n[1]==="pre"||n[1]==="script"||n[1]==="style",text:n[0]}}def(t){const n=this.rules.block.def.exec(t);if(n){const r=n[1].toLowerCase().replace(/\s+/g," "),o=n[2]?n[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:o,title:i}}}table(t){const n=this.rules.block.table.exec(t);if(!n||!/[:|]/.test(n[2]))return;const r=dc(n[1]),o=n[2].replace(/^\||\| *$/g,"").split("|"),i=n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(`
|
|
25
|
-
`):[],a={type:"table",raw:n[0],header:[],align:[],rows:[]};if(r.length===o.length){for(const l of o)/^ *-+: *$/.test(l)?a.align.push("right"):/^ *:-+: *$/.test(l)?a.align.push("center"):/^ *:-+ *$/.test(l)?a.align.push("left"):a.align.push(null);for(let l=0;l<r.length;l++)a.header.push({text:r[l],tokens:this.lexer.inline(r[l]),header:!0,align:a.align[l]});for(const l of i)a.rows.push(dc(l,a.header.length).map((s,u)=>({text:s,tokens:this.lexer.inline(s),header:!1,align:a.align[u]})));return a}}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)===`
|
|
26
|
-
`?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:On(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:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text: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 a=ei(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{const a=H0(n[2],"()");if(a>-1){const l=(n[0].indexOf("!")===0?5:4)+n[1].length+a;n[2]=n[2].substring(0,a),n[0]=n[0].substring(0,l).trim(),n[3]=""}}let o=n[2],i="";if(this.options.pedantic){const a=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o);a&&(o=a[1],i=a[3])}else i=n[3]?n[3].slice(1,-1):"";return o=o.trim(),/^</.test(o)&&(this.options.pedantic&&!/>$/.test(r)?o=o.slice(1):o=o.slice(1,-1)),hc(n,{href:o&&o.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$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))){const o=(r[2]||r[1]).replace(/\s+/g," "),i=n[o.toLowerCase()];if(!i){const a=r[0].charAt(0);return{type:"text",raw:a,text:a}}return hc(r,i,r[0],this.lexer)}}emStrong(t,n,r=""){let o=this.rules.inline.emStrongLDelim.exec(t);if(!(!o||o[3]&&r.match(/[\p{L}\p{N}]/u))&&(!(o[1]||o[2])||!r||this.rules.inline.punctuation.exec(r))){const i=[...o[0]].length-1;let a,l,s=i,u=0;const c=o[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,n=n.slice(-1*t.length+i);(o=c.exec(n))!=null;){if(a=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!a)continue;if(l=[...a].length,o[3]||o[4]){s+=l;continue}else if((o[5]||o[6])&&i%3&&!((i+l)%3)){u+=l;continue}if(s-=l,s>0)continue;l=Math.min(l,l+s+u);const h=[...o[0]][0].length,g=t.slice(0,i+o.index+h+l);if(Math.min(i,l)%2){const f=g.slice(1,-1);return{type:"em",raw:g,text:f,tokens:this.lexer.inlineTokens(f)}}const p=g.slice(2,-2);return{type:"strong",raw:g,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(/\n/g," ");const o=/[^ ]/.test(r),i=/^ /.test(r)&&/ $/.test(r);return o&&i&&(r=r.substring(1,r.length-1)),r=On(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){const n=this.rules.inline.autolink.exec(t);if(n){let r,o;return n[2]==="@"?(r=On(n[1]),o="mailto:"+r):(r=On(n[1]),o=r),{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}url(t){let n;if(n=this.rules.inline.url.exec(t)){let r,o;if(n[2]==="@")r=On(n[0]),o="mailto:"+r;else{let i;do i=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])?.[0]??"";while(i!==n[0]);r=On(n[0]),n[1]==="www."?o="http://"+n[0]:o=n[0]}return{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){const n=this.rules.inline.text.exec(t);if(n){let r;return this.lexer.state.inRawBlock?r=n[0]:r=On(n[0]),{type:"text",raw:n[0],text:r}}}}const z0=/^(?: *(?:\n|$))+/,V0=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,$0=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ki=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,_0=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Dh=/(?:[*+-]|\d{1,9}[.)])/,Ph=Pt(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,Dh).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),Ls=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,N0=/^[^\n]+/,Hs=/(?!\s*\])(?:\\.|[^\[\]\\])+/,B0=Pt(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",Hs).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),j0=Pt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Dh).getRegex(),Aa="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|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Fs=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,W0=Pt("^ {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|$))","i").replace("comment",Fs).replace("tag",Aa).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ah=Pt(Ls).replace("hr",ki).replace("heading"," {0,3}#{1,6}(?:\\s|$)").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",Aa).getRegex(),U0=Pt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ah).getRegex(),zs={blockquote:U0,code:V0,def:B0,fences:$0,heading:_0,hr:ki,html:W0,lheading:Ph,list:j0,newline:z0,paragraph:Ah,table:ci,text:N0},fc=Pt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ki).replace("heading"," {0,3}#{1,6}(?:\\s|$)").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",Aa).getRegex(),X0={...zs,table:fc,paragraph:Pt(Ls).replace("hr",ki).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",fc).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",Aa).getRegex()},Y0={...zs,html:Pt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Fs).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:ci,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Pt(Ls).replace("hr",ki).replace("heading",` *#{1,6} *[^
|
|
27
|
-
]`).replace("lheading",Ph).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Lh=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Z0=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Hh=/^( {2,}|\\)\n(?!\s*$)/,q0=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Si="\\p{P}\\p{S}",K0=Pt(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,Si).getRegex(),Q0=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,G0=Pt(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Si).getRegex(),J0=Pt("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Si).getRegex(),ev=Pt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Si).getRegex(),tv=Pt(/\\([punct])/,"gu").replace(/punct/g,Si).getRegex(),nv=Pt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("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])?)+(?![-_])/).getRegex(),rv=Pt(Fs).replace("(?:-->|$)","-->").getRegex(),ov=Pt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",rv).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),va=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,iv=Pt(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",va).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Fh=Pt(/^!?\[(label)\]\[(ref)\]/).replace("label",va).replace("ref",Hs).getRegex(),zh=Pt(/^!?\[(ref)\](?:\[\])?/).replace("ref",Hs).getRegex(),av=Pt("reflink|nolink(?!\\()","g").replace("reflink",Fh).replace("nolink",zh).getRegex(),Vs={_backpedal:ci,anyPunctuation:tv,autolink:nv,blockSkip:Q0,br:Hh,code:Z0,del:ci,emStrongLDelim:G0,emStrongRDelimAst:J0,emStrongRDelimUnd:ev,escape:Lh,link:iv,nolink:zh,punctuation:K0,reflink:Fh,reflinkSearch:av,tag:ov,text:q0,url:ci},lv={...Vs,link:Pt(/^!?\[(label)\]\((.*?)\)/).replace("label",va).getRegex(),reflink:Pt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",va).getRegex()},ss={...Vs,escape:Pt(Lh).replace("])","~|])").getRegex(),url:Pt(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_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.!#$%&'*+\/=?_`{\|}~-]+@)))/},sv={...ss,br:Pt(Hh).replace("{2,}","*").getRegex(),text:Pt(ss.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Yi={normal:zs,gfm:X0,pedantic:Y0},ti={normal:Vs,gfm:ss,breaks:sv,pedantic:lv};class or{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Zr,this.options.tokenizer=this.options.tokenizer||new ma,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:Yi.normal,inline:ti.normal};this.options.pedantic?(n.block=Yi.pedantic,n.inline=ti.pedantic):this.options.gfm&&(n.block=Yi.gfm,this.options.breaks?n.inline=ti.breaks:n.inline=ti.gfm),this.tokenizer.rules=n}static get rules(){return{block:Yi,inline:ti}}static lex(t,n){return new or(n).lex(t)}static lexInline(t,n){return new or(n).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,`
|
|
28
|
-
`),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){const r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],r=!1){this.options.pedantic?t=t.replace(/\t/g," ").replace(/^ +$/gm,""):t=t.replace(/^( *)(\t+)/gm,(l,s,u)=>s+" ".repeat(u.length));let o,i,a;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(l=>(o=l.call({lexer:this},t,n))?(t=t.substring(o.raw.length),n.push(o),!0):!1))){if(o=this.tokenizer.space(t)){t=t.substring(o.raw.length),o.raw.length===1&&n.length>0?n[n.length-1].raw+=`
|
|
29
|
-
`:n.push(o);continue}if(o=this.tokenizer.code(t)){t=t.substring(o.raw.length),i=n[n.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
|
|
30
|
-
`+o.raw,i.text+=`
|
|
31
|
-
`+o.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(o);continue}if(o=this.tokenizer.fences(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.heading(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.hr(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.blockquote(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.list(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.html(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.def(t)){t=t.substring(o.raw.length),i=n[n.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
|
|
32
|
-
`+o.raw,i.text+=`
|
|
33
|
-
`+o.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title});continue}if(o=this.tokenizer.table(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.lheading(t)){t=t.substring(o.raw.length),n.push(o);continue}if(a=t,this.options.extensions&&this.options.extensions.startBlock){let l=1/0;const s=t.slice(1);let u;this.options.extensions.startBlock.forEach(c=>{u=c.call({lexer:this},s),typeof u=="number"&&u>=0&&(l=Math.min(l,u))}),l<1/0&&l>=0&&(a=t.substring(0,l+1))}if(this.state.top&&(o=this.tokenizer.paragraph(a))){i=n[n.length-1],r&&i?.type==="paragraph"?(i.raw+=`
|
|
34
|
-
`+o.raw,i.text+=`
|
|
35
|
-
`+o.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(o),r=a.length!==t.length,t=t.substring(o.raw.length);continue}if(o=this.tokenizer.text(t)){t=t.substring(o.raw.length),i=n[n.length-1],i&&i.type==="text"?(i.raw+=`
|
|
36
|
-
`+o.raw,i.text+=`
|
|
37
|
-
`+o.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(o);continue}if(t){const l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let r,o,i,a=t,l,s,u;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(l=this.tokenizer.rules.inline.reflinkSearch.exec(a))!=null;)c.includes(l[0].slice(l[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(l=this.tokenizer.rules.inline.blockSkip.exec(a))!=null;)a=a.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(l=this.tokenizer.rules.inline.anyPunctuation.exec(a))!=null;)a=a.slice(0,l.index)+"++"+a.slice(this.tokenizer.rules.inline.anyPunctuation.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),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.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),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.emStrong(t,a,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)){t=t.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t))){t=t.substring(r.raw.length),n.push(r);continue}if(i=t,this.options.extensions&&this.options.extensions.startInline){let c=1/0;const h=t.slice(1);let g;this.options.extensions.startInline.forEach(p=>{g=p.call({lexer:this},h),typeof g=="number"&&g>=0&&(c=Math.min(c,g))}),c<1/0&&c>=0&&(i=t.substring(0,c+1))}if(r=this.tokenizer.inlineText(i)){t=t.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(u=r.raw.slice(-1)),s=!0,o=n[n.length-1],o&&o.type==="text"?(o.raw+=r.raw,o.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 ba{options;parser;constructor(t){this.options=t||Zr}space(t){return""}code({text:t,lang:n,escaped:r}){const o=(n||"").match(/^\S*/)?.[0],i=t.replace(/\n$/,"")+`
|
|
38
|
-
`;return o?'<pre><code class="language-'+On(o)+'">'+(r?i:On(i,!0))+`</code></pre>
|
|
39
|
-
`:"<pre><code>"+(r?i:On(i,!0))+`</code></pre>
|
|
40
|
-
`}blockquote({tokens:t}){return`<blockquote>
|
|
41
|
-
${this.parser.parse(t)}</blockquote>
|
|
42
|
-
`}html({text:t}){return t}heading({tokens:t,depth:n}){return`<h${n}>${this.parser.parseInline(t)}</h${n}>
|
|
43
|
-
`}hr(t){return`<hr>
|
|
44
|
-
`}list(t){const n=t.ordered,r=t.start;let o="";for(let l=0;l<t.items.length;l++){const s=t.items[l];o+=this.listitem(s)}const i=n?"ol":"ul",a=n&&r!==1?' start="'+r+'"':"";return"<"+i+a+`>
|
|
45
|
-
`+o+"</"+i+`>
|
|
46
|
-
`}listitem(t){let n="";if(t.task){const r=this.checkbox({checked:!!t.checked});t.loose?t.tokens.length>0&&t.tokens[0].type==="paragraph"?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=r+" "+t.tokens[0].tokens[0].text)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" "}):n+=r+" "}return n+=this.parser.parse(t.tokens,!!t.loose),`<li>${n}</li>
|
|
47
|
-
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
48
|
-
`}table(t){let n="",r="";for(let i=0;i<t.header.length;i++)r+=this.tablecell(t.header[i]);n+=this.tablerow({text:r});let o="";for(let i=0;i<t.rows.length;i++){const a=t.rows[i];r="";for(let l=0;l<a.length;l++)r+=this.tablecell(a[l]);o+=this.tablerow({text:r})}return o&&(o=`<tbody>${o}</tbody>`),`<table>
|
|
49
|
-
<thead>
|
|
50
|
-
`+n+`</thead>
|
|
51
|
-
`+o+`</table>
|
|
52
|
-
`}tablerow({text:t}){return`<tr>
|
|
53
|
-
${t}</tr>
|
|
54
|
-
`}tablecell(t){const n=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+n+`</${r}>
|
|
55
|
-
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${t}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:n,tokens:r}){const o=this.parser.parseInline(r),i=cc(t);if(i===null)return o;t=i;let a='<a href="'+t+'"';return n&&(a+=' title="'+n+'"'),a+=">"+o+"</a>",a}image({href:t,title:n,text:r}){const o=cc(t);if(o===null)return r;t=o;let i=`<img src="${t}" alt="${r}"`;return n&&(i+=` title="${n}"`),i+=">",i}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):t.text}}class $s{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}}class ir{options;renderer;textRenderer;constructor(t){this.options=t||Zr,this.options.renderer=this.options.renderer||new ba,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new $s}static parse(t,n){return new ir(n).parse(t)}static parseInline(t,n){return new ir(n).parseInline(t)}parse(t,n=!0){let r="";for(let o=0;o<t.length;o++){const i=t[o];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){const l=i,s=this.options.extensions.renderers[l.type].call({parser:this},l);if(s!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(l.type)){r+=s||"";continue}}const a=i;switch(a.type){case"space":{r+=this.renderer.space(a);continue}case"hr":{r+=this.renderer.hr(a);continue}case"heading":{r+=this.renderer.heading(a);continue}case"code":{r+=this.renderer.code(a);continue}case"table":{r+=this.renderer.table(a);continue}case"blockquote":{r+=this.renderer.blockquote(a);continue}case"list":{r+=this.renderer.list(a);continue}case"html":{r+=this.renderer.html(a);continue}case"paragraph":{r+=this.renderer.paragraph(a);continue}case"text":{let l=a,s=this.renderer.text(l);for(;o+1<t.length&&t[o+1].type==="text";)l=t[++o],s+=`
|
|
56
|
-
`+this.renderer.text(l);n?r+=this.renderer.paragraph({type:"paragraph",raw:s,text:s,tokens:[{type:"text",raw:s,text:s}]}):r+=s;continue}default:{const l='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return r}parseInline(t,n){n=n||this.renderer;let r="";for(let o=0;o<t.length;o++){const i=t[o];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){const l=this.options.extensions.renderers[i.type].call({parser:this},i);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){r+=l||"";continue}}const a=i;switch(a.type){case"escape":{r+=n.text(a);break}case"html":{r+=n.html(a);break}case"link":{r+=n.link(a);break}case"image":{r+=n.image(a);break}case"strong":{r+=n.strong(a);break}case"em":{r+=n.em(a);break}case"codespan":{r+=n.codespan(a);break}case"br":{r+=n.br(a);break}case"del":{r+=n.del(a);break}case"text":{r+=n.text(a);break}default:{const l='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return r}}class ia{options;constructor(t){this.options=t||Zr}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}}class uv{defaults=As();options=this.setOptions;parse=this.parseMarkdown(or.lex,ir.parse);parseInline=this.parseMarkdown(or.lexInline,ir.parseInline);Parser=ir;Renderer=ba;TextRenderer=$s;Lexer=or;Tokenizer=ma;Hooks=ia;constructor(...t){this.use(...t)}walkTokens(t,n){let r=[];for(const o of t)switch(r=r.concat(n.call(this,o)),o.type){case"table":{const i=o;for(const a of i.header)r=r.concat(this.walkTokens(a.tokens,n));for(const a of i.rows)for(const l of a)r=r.concat(this.walkTokens(l.tokens,n));break}case"list":{const i=o;r=r.concat(this.walkTokens(i.items,n));break}default:{const i=o;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(a=>{const l=i[a].flat(1/0);r=r.concat(this.walkTokens(l,n))}):i.tokens&&(r=r.concat(this.walkTokens(i.tokens,n)))}}return r}use(...t){const n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{const o={...r};if(o.async=this.defaults.async||o.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){const a=n.renderers[i.name];a?n.renderers[i.name]=function(...l){let s=i.renderer.apply(this,l);return s===!1&&(s=a.apply(this,l)),s}:n.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const a=n[i.level];a?a.unshift(i.tokenizer):n[i.level]=[i.tokenizer],i.start&&(i.level==="block"?n.startBlock?n.startBlock.push(i.start):n.startBlock=[i.start]:i.level==="inline"&&(n.startInline?n.startInline.push(i.start):n.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(n.childTokens[i.name]=i.childTokens)}),o.extensions=n),r.renderer){const i=this.defaults.renderer||new ba(this.defaults);for(const a in r.renderer){if(!(a in i))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;const l=a,s=r.renderer[l],u=i[l];i[l]=(...c)=>{let h=s.apply(i,c);return h===!1&&(h=u.apply(i,c)),h||""}}o.renderer=i}if(r.tokenizer){const i=this.defaults.tokenizer||new ma(this.defaults);for(const a in r.tokenizer){if(!(a in i))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;const l=a,s=r.tokenizer[l],u=i[l];i[l]=(...c)=>{let h=s.apply(i,c);return h===!1&&(h=u.apply(i,c)),h}}o.tokenizer=i}if(r.hooks){const i=this.defaults.hooks||new ia;for(const a in r.hooks){if(!(a in i))throw new Error(`hook '${a}' does not exist`);if(a==="options")continue;const l=a,s=r.hooks[l],u=i[l];ia.passThroughHooks.has(a)?i[l]=c=>{if(this.defaults.async)return Promise.resolve(s.call(i,c)).then(g=>u.call(i,g));const h=s.call(i,c);return u.call(i,h)}:i[l]=(...c)=>{let h=s.apply(i,c);return h===!1&&(h=u.apply(i,c)),h}}o.hooks=i}if(r.walkTokens){const i=this.defaults.walkTokens,a=r.walkTokens;o.walkTokens=function(l){let s=[];return s.push(a.call(this,l)),i&&(s=s.concat(i.call(this,l))),s}}this.defaults={...this.defaults,...o}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return or.lex(t,n??this.defaults)}parser(t,n){return ir.parse(t,n??this.defaults)}parseMarkdown(t,n){return(r,o)=>{const i={...o},a={...this.defaults,...i},l=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&i.async===!1)return l(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(a.hooks&&(a.hooks.options=a),a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(r):r).then(s=>t(s,a)).then(s=>a.hooks?a.hooks.processAllTokens(s):s).then(s=>a.walkTokens?Promise.all(this.walkTokens(s,a.walkTokens)).then(()=>s):s).then(s=>n(s,a)).then(s=>a.hooks?a.hooks.postprocess(s):s).catch(l);try{a.hooks&&(r=a.hooks.preprocess(r));let s=t(r,a);a.hooks&&(s=a.hooks.processAllTokens(s)),a.walkTokens&&this.walkTokens(s,a.walkTokens);let u=n(s,a);return a.hooks&&(u=a.hooks.postprocess(u)),u}catch(s){return l(s)}}}onError(t,n){return r=>{if(r.message+=`
|
|
57
|
-
Please report this to https://github.com/markedjs/marked.`,t){const o="<p>An error occurred:</p><pre>"+On(r.message+"",!0)+"</pre>";return n?Promise.resolve(o):o}if(n)return Promise.reject(r);throw r}}}const Ur=new uv;function Rt(e,t){return Ur.parse(e,t)}Rt.options=Rt.setOptions=function(e){return Ur.setOptions(e),Rt.defaults=Ur.defaults,Eh(Rt.defaults),Rt};Rt.getDefaults=As;Rt.defaults=Zr;Rt.use=function(...e){return Ur.use(...e),Rt.defaults=Ur.defaults,Eh(Rt.defaults),Rt};Rt.walkTokens=function(e,t){return Ur.walkTokens(e,t)};Rt.parseInline=Ur.parseInline;Rt.Parser=ir;Rt.parser=ir.parse;Rt.Renderer=ba;Rt.TextRenderer=$s;Rt.Lexer=or;Rt.lexer=or.lex;Rt.Tokenizer=ma;Rt.Hooks=ia;Rt.parse=Rt;Rt.options;Rt.setOptions;Rt.use;Rt.walkTokens;Rt.parseInline;ir.parse;or.lex;const cv=hn("div")({name:"MarkdownContainer",class:"gdg-mnuv029",propsAsIs:!1});class dv extends Ct.PureComponent{targetElement=null;renderMarkdownIntoDiv(){const{targetElement:t,props:n}=this;if(t===null)return;const{contents:r,createNode:o}=n,i=Rt(r),a=document.createRange();a.selectNodeContents(t),a.deleteContents();let l=o?.(i);if(l===void 0){const u=document.createElement("template");u.innerHTML=i,l=u.content}t.append(l);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(),Ct.createElement(cv,{ref:this.containerRefHook})}}const hv=hn("textarea")({name:"InputBox",class:"gdg-izpuzkl",propsAsIs:!1}),fv=hn("div")({name:"ShadowBox",class:"gdg-s69h75o",propsAsIs:!1}),pv=hn("div")({name:"GrowingEntryStyle",class:"gdg-g1y0xocz",propsAsIs:!1});let pc=0;const qr=e=>{const{placeholder:t,value:n,onKeyDown:r,highlight:o,altNewline:i,validatedSelection:a,...l}=e,{onChange:s,className:u}=l,c=d.useRef(null),h=n??"";Dn(s!==void 0,"GrowingEntry must be a controlled input area");const[g]=d.useState(()=>"input-box-"+(pc=(pc+1)%1e7));d.useEffect(()=>{const f=c.current;if(f===null||f.disabled)return;const m=h.toString().length;f.focus(),f.setSelectionRange(o?0:m,m)},[]),d.useLayoutEffect(()=>{if(a!==void 0){const f=typeof a=="number"?[a,null]:a;c.current?.setSelectionRange(f[0],f[1])}},[a]);const p=d.useCallback(f=>{f.key==="Enter"&&f.shiftKey&&i===!0||r?.(f)},[i,r]);return d.createElement(pv,{className:"gdg-growing-entry"},d.createElement(fv,{className:u},h+`
|
|
58
|
-
`),d.createElement(hv,{...l,className:(u??"")+" gdg-input",id:g,ref:c,onKeyDown:p,value:h,placeholder:t,dir:"auto"}))},ml={};let xr=null;function gv(){const e=document.createElement("div");return e.style.opacity="0",e.style.pointerEvents="none",e.style.position="fixed",document.body.append(e),e}function mi(e){const t=e.toLowerCase().trim();if(ml[t]!==void 0)return ml[t];xr=xr||gv(),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 o=r.replace(/[^\d.,]/g,"").split(",").map(Number.parseFloat);return o.length<4&&o.push(1),o=o.map(i=>Number.isNaN(i)?0:i),ml[t]=o,o}function Xr(e,t){const[n,r,o]=mi(e);return`rgba(${n}, ${r}, ${o}, ${t})`}const gc=new Map;function mc(e,t){const n=`${e}-${t}`,r=gc.get(n);if(r!==void 0)return r;const o=Pn(e,t);return gc.set(n,o),o}function Pn(e,t){if(t===void 0)return e;const[n,r,o,i]=mi(e);if(i===1)return e;const[a,l,s,u]=mi(t),c=i+u*(1-i),h=(i*n+u*a*(1-i))/c,g=(i*r+u*l*(1-i))/c,p=(i*o+u*s*(1-i))/c;return`rgba(${h}, ${g}, ${p}, ${c})`}function us(e){if(e==="transparent")return 0;function t(i){const a=i/255;return a<=.04045?a/12.92:Math.pow((a+.055)/1.055,2.4)}const[n,r,o]=mi(e);return .2126*t(n)+.7152*t(r)+.0722*t(o)}var Io=new Map,Eo=new Map,cs=new Map;function mv(){Io.clear(),cs.clear(),Eo.clear()}function vv(e,t,n,r,o){var i,a,l;let s=0,u={};for(let h of e)s+=(i=n.get(h))!=null?i:o,u[h]=((a=u[h])!=null?a:0)+1;let c=t-s;for(let h of Object.keys(u)){let g=u[h],p=(l=n.get(h))!=null?l:o,f=p*g/s,m=c*f*r/g,y=p+m;n.set(h,y)}}function bv(e,t){var n;let r=new Map,o=0;for(let u of"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890,.-+=?"){let c=e.measureText(u).width;r.set(u,c),o+=c}let i=o/r.size,a=3,l=(t/i+a)/(a+1),s=r.keys();for(let u of s)r.set(u,((n=r.get(u))!=null?n:i)*l);return r}function di(e,t,n,r){var o,i;let a=Eo.get(n);if(r&&a!==void 0&&a.count>2e4){let u=cs.get(n);if(u===void 0&&(u=bv(e,a.size),cs.set(n,u)),a.count>5e5){let h=0;for(let g of t)h+=(o=u.get(g))!=null?o:a.size;return h*1.01}let c=e.measureText(t);return vv(t,c.width,u,Math.max(.05,1-a.count/2e5),a.size),Eo.set(n,{count:a.count+t.length,size:a.size}),c.width}let l=e.measureText(t),s=l.width/t.length;if(((i=a?.count)!=null?i:0)>2e4)return l.width;if(a===void 0)Eo.set(n,{count:t.length,size:s});else{let u=s-a.size,c=t.length/(a.count+t.length),h=a.size+u*c;Eo.set(n,{count:a.count+t.length,size:h})}return l.width}function wv(e,t,n,r,o,i,a,l){if(t.length<=1)return t.length;if(o<n)return-1;let s=Math.floor(n/o*i),u=di(e,t.slice(0,Math.max(0,s)),r,a);if(u!==n)if(u<n){for(;u<n;)s++,u=di(e,t.slice(0,Math.max(0,s)),r,a);s--}else for(;u>n;){let c=t.lastIndexOf(" ",s-1);c>0?s=c:s--,u=di(e,t.slice(0,Math.max(0,s)),r,a)}if(t[s]!==" "){let c=0;c=t.lastIndexOf(" ",s),c>0&&(s=c)}return s}function yv(e,t,n,r,o,i){let a=`${t}_${n}_${r}px`,l=Io.get(a);if(l!==void 0)return l;if(r<=0)return[];let s=[],u=t.split(`
|
|
59
|
-
`),c=Eo.get(n),h=c===void 0?t.length:r/c.size*1.5,g=o&&c!==void 0&&c.count>2e4;for(let p of u){let f=di(e,p.slice(0,Math.max(0,h)),n,g),m=Math.min(p.length,h);if(f<=r)s.push(p);else{for(;f>r;){let y=wv(e,p,r,n,f,m,g),w=p.slice(0,Math.max(0,y));p=p.slice(w.length),s.push(w),f=di(e,p.slice(0,Math.max(0,h)),n,g),m=Math.min(p.length,h)}f>0&&s.push(p)}}return s=s.map((p,f)=>f===0?p.trimEnd():p.trim()),Io.set(a,s),Io.size>500&&Io.delete(Io.keys().next().value),s}function xv(e,t){return Ct.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 Cv(e,t){const[n,r]=t;if(e.columns.hasIndex(n)||e.rows.hasIndex(r))return!0;if(e.current!==void 0){if(hi(e.current.cell,t))return!0;const o=[e.current.range,...e.current.rangeStack];for(const i of o)if(n>=i.x&&n<i.x+i.width&&r>=i.y&&r<i.y+i.height)return!0}return!1}function vi(e,t){return(e??"")===(t??"")}function kv(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 Vh(e,t){const[n,r]=e;return n>=t.x&&n<t.x+t.width&&r>=t.y&&r<t.y+t.height}function hi(e,t){return e?.[0]===t?.[0]&&e?.[1]===t?.[1]}function $h(e){return[e.x+e.width-1,e.y+e.height-1]}function vc(e,t,n){const r=n.x,o=n.x+n.width-1,i=n.y,a=n.y+n.height-1,[l,s]=e;if(s<i||s>a)return!1;if(t.span===void 0)return l>=r&&l<=o;const[u,c]=t.span;return u>=r&&u<=o||c>=r&&u<=o||u<r&&c>o}function Sv(e,t,n,r){let o=0;if(n.current===void 0)return o;const i=n.current.range;(r||i.height*i.width>1)&&vc(e,t,i)&&o++;for(const a of n.current.rangeStack)vc(e,t,a)&&o++;return o}function _h(e,t){let n=e;if(t!==void 0){let r=[...e];const o=n[t.src];t.src>t.dest?(r.splice(t.src,1),r.splice(t.dest,0,o)):(r.splice(t.dest+1,0,o),r.splice(t.src,1)),r=r.map((i,a)=>({...i,sticky:e[a].sticky})),n=r}return n}function Ao(e,t){let n=0;const r=_h(e,t);for(let o=0;o<r.length;o++){const i=r[o];if(i.sticky)n+=i.width;else break}return n}function Kr(e,t,n){if(typeof n=="number")return t*n;{let r=0;for(let o=e-t;o<e;o++)r+=n(o);return r}}function ds(e,t,n,r,o){const i=_h(e,r),a=[];for(const u of i)if(u.sticky)a.push(u);else break;if(a.length>0)for(const u of a)n-=u.width;let l=t,s=o??0;for(;s<=n&&l<i.length;)s+=i[l].width,l++;for(let u=t;u<l;u++){const c=i[u];c.sticky||a.push(c)}return a}function Mv(e,t,n){let r=0;for(const o of t){const i=o.sticky?r:r+(n??0);if(e<=i+o.width)return o.sourceIndex;r+=o.width}return-1}function Iv(e,t,n,r,o,i,a,l,s,u){const c=r+o;if(n&&e<=o)return-2;if(e<=c)return-1;let h=t;for(let f=0;f<u;f++){const m=i-1-f,y=typeof a=="number"?a:a(m);if(h-=y,e>=h)return m}const g=i-u,p=e-(s??0);if(typeof a=="number"){const f=Math.floor((p-c)/a)+l;return f>=g?void 0:f}else{let f=c;for(let m=l;m<g;m++){const y=a(m);if(p<=f+y)return m;f+=y}return}}let aa=0,fi={};const Rv=typeof window>"u";async function Ev(){Rv||document?.fonts?.ready===void 0||(await document.fonts.ready,aa=0,fi={},mv())}Ev();function Nh(e,t,n,r){return`${e}_${r??t?.font}_${n}`}function Tr(e,t,n,r="middle"){const o=Nh(e,t,r,n);let i=fi[o];return i===void 0&&(i=t.measureText(e),fi[o]=i,aa++),aa>1e4&&(fi={},aa=0),i}function Bh(e,t){const n=Nh(e,void 0,"middle",t);return fi[n]}function qn(e,t){return typeof t!="string"&&(t=t.baseFontFull),Tv(e,t)}function bc(e,t){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZ";e.save(),e.textBaseline=t;const r=e.measureText(n);return e.restore(),r}const wc=[];function Tv(e,t){for(const o of wc)if(o.key===t)return o.val;const n=bc(e,"alphabetic"),r=-(bc(e,"middle").actualBoundingBoxDescent-n.actualBoundingBoxDescent)+n.actualBoundingBoxAscent/2;return wc.push({key:t,val:r}),r}function Ov(e,t,n,r,o,i){const{ctx:a,rect:l,theme:s}=e;let u=Number.MAX_SAFE_INTEGER;const c=500;if(t!==void 0&&(u=n-t,u<c)){const h=1-u/c;a.globalAlpha=h,a.fillStyle=s.bgSearchResult,a.fillRect(l.x+1,l.y+1,l.width-(o?2:1),l.height-(i?2:1)),a.globalAlpha=1,r!==void 0&&(r.fillStyle=s.bgSearchResult)}return u<c}function Mi(e,t,n){const{ctx:r,theme:o}=e,i=t??{},a=n??o.textDark;return a!==i.fillStyle&&(r.fillStyle=a,i.fillStyle=a),i}function _s(e,t,n,r,o){const{rect:i,ctx:a,theme:l}=e;a.fillStyle=l.textDark,rr({ctx:a,rect:i,theme:l},t,n,r,o)}function jh(e,t,n,r,o,i,a,l,s){s==="right"?e.fillText(t,n+o-(l.cellHorizontalPadding+.5),r+i/2+a):s==="center"?e.fillText(t,n+o/2,r+i/2+a):e.fillText(t,n+l.cellHorizontalPadding+.5,r+i/2+a)}function Ns(e,t){const n=Tr("ABCi09jgqpy",e,t);return n.actualBoundingBoxAscent+n.actualBoundingBoxDescent}function Dv(e,t){e.includes(`
|
|
60
|
-
`)&&(e=e.split(/\r?\n/,1)[0]);const n=t/4;return e.length>n&&(e=e.slice(0,n)),e}function Pv(e,t,n,r,o,i,a,l,s,u){const c=l.baseFontFull,h=yv(e,t,c,o-l.cellHorizontalPadding*2,u??!1),g=Ns(e,c),p=l.lineHeight*g,f=g+p*(h.length-1),m=f+l.cellVerticalPadding>i;m&&(e.save(),e.rect(n,r,o,i),e.clip());const y=r+i/2-f/2;let w=Math.max(r+l.cellVerticalPadding,y);for(const v of h)if(jh(e,v,n,w,o,g,a,l,s),w+=p,w>r+i)break;m&&e.restore()}function rr(e,t,n,r,o){const{ctx:i,rect:a,theme:l}=e,{x:s,y:u,width:c,height:h}=a;r=r??!1,r||(t=Dv(t,c));const g=qn(i,l),p=Ps(t)==="rtl";if(n===void 0&&p&&(n="right"),p&&(i.direction="rtl"),t.length>0){let f=!1;n==="right"?(i.textAlign="right",f=!0):n!==void 0&&n!=="left"&&(i.textAlign=n,f=!0),r?Pv(i,t,s,u,c,h,g,l,n,o):jh(i,t,s,u,c,h,g,l,n),f&&(i.textAlign="start"),p&&(i.direction="inherit")}}function Zn(e,t,n,r,o,i){typeof i=="number"&&(i={tl:i,tr:i,br:i,bl:i}),i={tl:Math.max(0,Math.min(i.tl,o/2,r/2)),tr:Math.max(0,Math.min(i.tr,o/2,r/2)),bl:Math.max(0,Math.min(i.bl,o/2,r/2)),br:Math.max(0,Math.min(i.br,o/2,r/2))},e.moveTo(t+i.tl,n),e.arcTo(t+r,n,t+r,n+i.tr,i.tr),e.arcTo(t+r,n+o,t+r-i.br,n+o,i.br),e.arcTo(t,n+o,t,n+o-i.bl,i.bl),e.arcTo(t,n,t+i.tl,n,i.tl)}function Av(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 Lv(e,t,n){const r=function(l,s){const u=s.x-l.x,c=s.y-l.y,h=Math.sqrt(u*u+c*c),g=u/h,p=c/h;return{x:u,y:s.y-l.y,len:h,nx:g,ny:p,ang:Math.atan2(p,g)}};let o;const i=t.length;let a=t[i-1];for(let l=0;l<i;l++){let s=t[l%i];const u=t[(l+1)%i],c=r(s,a),h=r(s,u),g=c.nx*h.ny-c.ny*h.nx,p=c.nx*h.nx-c.ny*-h.ny;let f=Math.asin(g<-1?-1:g>1?1:g),m=1,y=!1;p<0?f<0?f=Math.PI+f:(f=Math.PI-f,m=-1,y=!0):f>0&&(m=-1,y=!0),o=s.radius!==void 0?s.radius:n;const w=f/2;let v=Math.abs(Math.cos(w)*o/Math.sin(w)),x;v>Math.min(c.len/2,h.len/2)?(v=Math.min(c.len/2,h.len/2),x=Math.abs(v*Math.sin(w)/Math.cos(w))):x=o;let E=s.x+h.nx*v,R=s.y+h.ny*v;E+=-h.ny*x*m,R+=h.nx*x*m,e.arc(E,R,x,c.ang+Math.PI/2*m,h.ang-Math.PI/2*m,y),a=s,s=u}e.closePath()}function hs(e,t,n,r,o,i,a,l,s,u,c,h,g,p,f){const m={x:0,y:i+u,width:0,height:0};if(e>=p.length||t>=c||t<-2||e<0)return m;const y=i-o;if(e>=h){const w=a>e?-1:1,v=Ao(p);m.x+=v+s;for(let x=a;x!==e;x+=w)m.x+=p[w===1?x:x-1].width*w}else for(let w=0;w<e;w++)m.x+=p[w].width;if(m.width=p[e].width+1,t===-1)m.y=o,m.height=y;else if(t===-2){m.y=0,m.height=o;let w=e;const v=p[e].group,x=p[e].sticky;for(;w>0&&vi(p[w-1].group,v)&&p[w-1].sticky===x;){const R=p[w-1];m.x-=R.width,m.width+=R.width,w--}let E=e;for(;E+1<p.length&&vi(p[E+1].group,v)&&p[E+1].sticky===x;){const R=p[E+1];m.width+=R.width,E++}if(!x){const R=Ao(p),S=m.x-R;S<0&&(m.x-=S,m.width+=S),m.x+m.width>n&&(m.width=n-m.x)}}else if(t>=c-g){let w=c-t;for(m.y=r;w>0;){const v=t+w-1;m.height=typeof f=="number"?f:f(v),m.y-=m.height,w--}m.height+=1}else{const w=l>t?-1:1;if(typeof f=="number"){const v=t-l;m.y+=v*f}else for(let v=l;v!==t;v+=w)m.y+=f(v)*w;m.height=(typeof f=="number"?f:f(t))+1}return m}const Bs=1<<21;function Yn(e,t){return(t+2)*Bs+e}function Wh(e){return e%Bs}function js(e){return Math.floor(e/Bs)-2}function Ws(e){const t=Wh(e),n=js(e);return[t,n]}class Uh{visibleWindow={x:0,y:0,width:0,height:0};freezeCols=0;freezeRows=[];isInWindow=t=>{const n=Wh(t),r=js(t),o=this.visibleWindow,i=n>=o.x&&n<=o.x+o.width||n<this.freezeCols,a=r>=o.y&&r<=o.y+o.height||this.freezeRows.includes(r);return i&&a};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&&Po(this.freezeRows,r)||(this.visibleWindow=t,this.freezeCols=n,this.freezeRows=r,this.clearOutOfWindow())}}class Hv extends Uh{cache=new Map;setValue=(t,n)=>{this.cache.set(Yn(t[0],t[1]),n)};getValue=t=>this.cache.get(Yn(t[0],t[1]));clearOutOfWindow=()=>{for(const[t]of this.cache.entries())this.isInWindow(t)||this.cache.delete(t)}}class pi{cells;constructor(t=[]){this.cells=new Set(t.map(n=>Yn(n[0],n[1])))}add(t){this.cells.add(Yn(t[0],t[1]))}has(t){return t===void 0?!1:this.cells.has(Yn(t[0],t[1]))}remove(t){this.cells.delete(Yn(t[0],t[1]))}clear(){this.cells.clear()}get size(){return this.cells.size}hasHeader(){for(const t of this.cells)if(js(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(Yn(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 Ws(t)}}function Fv(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 Xh={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 Yh(){return Xh}const Zh=Ct.createContext(Xh);function qh(){return Ct.useContext(Zh)}function pr(e,...t){const n={...e};for(const r of t)if(r!==void 0)for(const o in r)r.hasOwnProperty(o)&&(o==="bgCell"?n[o]=Pn(r[o],n[o]):n[o]=r[o]);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 fs=150;function zv(e,t,n,r){return r(t)?.measure?.(e,t,n)??fs}function Kh(e,t,n,r,o,i,a,l,s){let u=0;const c=o===void 0?[]:o.map(p=>{const f=zv(e,p[r],t,s);return u=Math.max(u,f),f});if(c.length>5&&l){u=0;let p=0;for(const m of c)p+=m;const f=p/c.length;for(let m=0;m<c.length;m++)c[m]>=f*2?c[m]=0:u=Math.max(u,c[m])}const h=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=h;const g=Math.max(Math.ceil(i),Math.min(Math.floor(a),Math.ceil(u)));return{...n,width:g}}function Vv(e,t,n,r,o,i,a,l,s){const u=d.useRef(t),c=d.useRef(n),h=d.useRef(a);u.current=t,c.current=n,h.current=a;const[g,p]=d.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})]},[]);d.useLayoutEffect(()=>(g&&document.documentElement.append(g),()=>{g?.remove()}),[g]);const f=d.useRef({}),m=d.useRef(),[y,w]=d.useState();return d.useLayoutEffect(()=>{const v=c.current;if(v===void 0||e.every(Ui))return;let x=Math.max(1,10-Math.floor(e.length/1e4)),E=0;x<u.current&&x>1&&(x--,E=1);const R={x:0,y:0,width:e.length,height:Math.min(u.current,x)},S={x:0,y:u.current-1,width:e.length,height:1};(async()=>{const P=v(R,s.signal),T=E>0?v(S,s.signal):void 0;let C;typeof P=="object"?C=P:C=await Nu(P),T!==void 0&&(typeof T=="object"?C=[...C,...T]:C=[...C,...await Nu(T)]),m.current=e,w(C)})()},[s.signal,e]),d.useMemo(()=>{let v=e.every(Ui)?e:p===null?e.map(S=>Ui(S)?S:{...S,width:fs}):(p.font=h.current.baseFontFull,e.map((S,P)=>{if(Ui(S))return S;if(f.current[S.id]!==void 0)return{...S,width:f.current[S.id]};if(y===void 0||m.current!==e||S.id===void 0)return{...S,width:fs};const T=Kh(p,a,S,P,y,o,i,!0,l);return f.current[S.id]=T.width,T})),x=0,E=0;const R=[];for(const[S,P]of v.entries())x+=P.width,P.grow!==void 0&&P.grow>0&&(E+=P.grow,R.push(S));if(x<r&&R.length>0){const S=[...v],P=r-x;let T=P;for(let C=0;C<R.length;C++){const A=R[C],O=(v[A].grow??0)/E,I=C===R.length-1?T:Math.min(T,Math.floor(P*O));S[A]={...v[A],growOffset:I,width:v[A].width+I},T-=I}v=S}return{sizedColumns:v,nonGrowWidth:x}},[r,e,p,y,a,o,i,l])}var vl,yc;function $v(){if(yc)return vl;yc=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 vl=e,vl}var bl,xc;function _v(){if(xc)return bl;xc=1;var e=$v(),t=Os();function n(r,o,i){return i===void 0&&(i=o,o=void 0),i!==void 0&&(i=t(i),i=i===i?i:0),o!==void 0&&(o=t(o),o=o===o?o:0),e(t(r),o,i)}return bl=n,bl}var Nv=_v();const Vn=Er(Nv);var wl,Cc;function Bv(){if(Cc)return wl;Cc=1;function e(t,n,r,o){for(var i=t.length,a=r+(o?1:-1);o?a--:++a<i;)if(n(t[a],a,t))return a;return-1}return wl=e,wl}var yl,kc;function jv(){if(kc)return yl;kc=1;function e(t){return t!==t}return yl=e,yl}var xl,Sc;function Wv(){if(Sc)return xl;Sc=1;function e(t,n,r){for(var o=r-1,i=t.length;++o<i;)if(t[o]===n)return o;return-1}return xl=e,xl}var Cl,Mc;function Uv(){if(Mc)return Cl;Mc=1;var e=Bv(),t=jv(),n=Wv();function r(o,i,a){return i===i?n(o,i,a):e(o,t,a)}return Cl=r,Cl}var kl,Ic;function Xv(){if(Ic)return kl;Ic=1;var e=Uv();function t(n,r){var o=n==null?0:n.length;return!!o&&e(n,r,0)>-1}return kl=t,kl}var Sl,Rc;function Yv(){if(Rc)return Sl;Rc=1;function e(t,n,r){for(var o=-1,i=t==null?0:t.length;++o<i;)if(r(n,t[o]))return!0;return!1}return Sl=e,Sl}var Ml,Ec;function Zv(){if(Ec)return Ml;Ec=1;function e(){}return Ml=e,Ml}var Il,Tc;function qv(){if(Tc)return Il;Tc=1;var e=Mm(),t=Zv(),n=uh(),r=1/0,o=e&&1/n(new e([,-0]))[1]==r?function(i){return new e(i)}:t;return Il=o,Il}var Rl,Oc;function Kv(){if(Oc)return Rl;Oc=1;var e=Sm(),t=Xv(),n=Yv(),r=Pm(),o=qv(),i=uh(),a=200;function l(s,u,c){var h=-1,g=t,p=s.length,f=!0,m=[],y=m;if(c)f=!1,g=n;else if(p>=a){var w=u?null:o(s);if(w)return i(w);f=!1,g=r,y=new e}else y=u?[]:m;e:for(;++h<p;){var v=s[h],x=u?u(v):v;if(v=c||v!==0?v:0,f&&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 Rl=l,Rl}var El,Dc;function Qv(){if(Dc)return El;Dc=1;var e=Kv();function t(n){return n&&n.length?e(n):[]}return El=t,El}var Gv=Qv();const Jv=Er(Gv);var Tl,Pc;function eb(){if(Pc)return Tl;Pc=1;var e=Im(),t=Rm(),n=ch(),r=e?e.isConcatSpreadable:void 0;function o(i){return n(i)||t(i)||!!(r&&i&&i[r])}return Tl=o,Tl}var Ol,Ac;function tb(){if(Ac)return Ol;Ac=1;var e=Em(),t=eb();function n(r,o,i,a,l){var s=-1,u=r.length;for(i||(i=t),l||(l=[]);++s<u;){var c=r[s];o>0&&i(c)?o>1?n(c,o-1,i,a,l):e(l,c):a||(l[l.length]=c)}return l}return Ol=n,Ol}var Dl,Lc;function nb(){if(Lc)return Dl;Lc=1;var e=tb();function t(n){var r=n==null?0:n.length;return r?e(n,1):[]}return Dl=t,Dl}var rb=nb();const Hc=Er(rb);var Pl,Fc;function ob(){if(Fc)return Pl;Fc=1;var e=Math.ceil,t=Math.max;function n(r,o,i,a){for(var l=-1,s=t(e((o-r)/(i||1)),0),u=Array(s);s--;)u[a?s:++l]=r,r+=i;return u}return Pl=n,Pl}var Al,zc;function ib(){if(zc)return Al;zc=1;var e=wm(),t=bm(),n=ym(),r=Pa();function o(i,a,l){if(!r(l))return!1;var s=typeof a;return(s=="number"?t(l)&&n(a,l.length):s=="string"&&a in l)?e(l[a],i):!1}return Al=o,Al}var Ll,Vc;function ab(){if(Vc)return Ll;Vc=1;var e=Os(),t=1/0,n=17976931348623157e292;function r(o){if(!o)return o===0?o:0;if(o=e(o),o===t||o===-t){var i=o<0?-1:1;return i*n}return o===o?o:0}return Ll=r,Ll}var Hl,$c;function lb(){if($c)return Hl;$c=1;var e=ob(),t=ib(),n=ab();function r(o){return function(i,a,l){return l&&typeof l!="number"&&t(i,a,l)&&(a=l=void 0),i=n(i),a===void 0?(a=i,i=0):a=n(a),l=l===void 0?i<a?1:-1:n(l),e(i,a,l,o)}}return Hl=r,Hl}var Fl,_c;function sb(){if(_c)return Fl;_c=1;var e=lb(),t=e();return Fl=t,Fl}var ub=sb();const Ir=Er(ub),Ft='<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">',cb=e=>{const t=e.fgColor,n=e.bgColor;return`
|
|
61
|
-
${Ft}<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>`},db=e=>{const t=e.fgColor,n=e.bgColor;return`
|
|
62
|
-
${Ft}<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>`},hb=e=>{const t=e.fgColor,n=e.bgColor;return`${Ft}
|
|
63
|
-
<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}"/>
|
|
64
|
-
<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}"/>
|
|
65
|
-
</svg>`},fb=e=>{const t=e.fgColor,n=e.bgColor;return`${Ft}
|
|
66
|
-
<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}"/>
|
|
67
|
-
<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}"/>
|
|
68
|
-
</svg>`},pb=e=>{const t=e.fgColor,n=e.bgColor;return`${Ft}
|
|
69
|
-
<path
|
|
70
|
-
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"
|
|
71
|
-
fill="${n}"
|
|
72
|
-
/>
|
|
73
|
-
<path
|
|
74
|
-
fill-rule="evenodd"
|
|
75
|
-
clip-rule="evenodd"
|
|
76
|
-
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"
|
|
77
|
-
fill="${t}"
|
|
78
|
-
/>
|
|
79
|
-
</svg>`},Qh=e=>{const t=e.fgColor,n=e.bgColor;return`${Ft}
|
|
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="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}"/>
|
|
82
|
-
<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}"/>
|
|
83
|
-
</svg>
|
|
84
|
-
`},gb=e=>{const t=e.bgColor;return`${Ft}
|
|
85
|
-
<path stroke="${t}" stroke-width="2" d="M12 3v14"/>
|
|
86
|
-
<path stroke="${t}" stroke-width="2" stroke-linecap="round" d="M10 4h4m-4 12h4"/>
|
|
87
|
-
<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}"/>
|
|
88
|
-
</svg>
|
|
89
|
-
`},mb=Qh,vb=e=>{const t=e.fgColor,n=e.bgColor;return`${Ft}
|
|
90
|
-
<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}"/>
|
|
91
|
-
<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}"/>
|
|
92
|
-
</svg>`},bb=e=>{const t=e.fgColor,n=e.bgColor;return`
|
|
93
|
-
${Ft}
|
|
94
|
-
<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}"/>
|
|
95
|
-
<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}"/>
|
|
96
|
-
<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}"/>
|
|
97
|
-
<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}"/>
|
|
98
|
-
<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}"/>
|
|
99
|
-
<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}"/>
|
|
100
|
-
<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}"/>
|
|
101
|
-
</svg>`},wb=e=>{const t=e.fgColor,n=e.bgColor;return`${Ft}
|
|
102
|
-
<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}"/>
|
|
103
|
-
<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}"/>
|
|
104
|
-
<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}"/>
|
|
105
|
-
</svg>`},yb=e=>{const t=e.fgColor,n=e.bgColor;return`
|
|
106
|
-
${Ft}
|
|
107
|
-
<path fill="${t}" d="M3 3h14v14H3z"/>
|
|
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 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}"/>
|
|
109
|
-
</svg>`},xb=e=>{const t=e.fgColor,n=e.bgColor;return`
|
|
110
|
-
${Ft}
|
|
111
|
-
<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}"/>
|
|
112
|
-
<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}"/>
|
|
113
|
-
</svg>`},Cb=e=>{const t=e.fgColor,n=e.bgColor;return`${Ft}
|
|
114
|
-
<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}"/>
|
|
115
|
-
<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}"/>
|
|
116
|
-
</svg>`},kb=e=>{const t=e.fgColor,n=e.bgColor;return`
|
|
117
|
-
${Ft}
|
|
118
|
-
<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}"/>
|
|
119
|
-
<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}"/>
|
|
120
|
-
<path d="M10 7H9v3.93L12.5 13l.5-.8-3-1.76V7z" fill="${t}"/>
|
|
121
|
-
</svg>`},Sb=e=>{const t=e.fgColor,n=e.bgColor;return`${Ft}
|
|
122
|
-
<rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>
|
|
123
|
-
<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}"/>
|
|
124
|
-
<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}"/>
|
|
125
|
-
</svg>`},Mb=e=>{const t=e.fgColor,n=e.bgColor;return`
|
|
126
|
-
${Ft}
|
|
127
|
-
<rect x="2" y="8" width="10" height="8" rx="2" fill="${n}"/>
|
|
128
|
-
<rect x="8" y="4" width="10" height="8" rx="2" fill="${n}"/>
|
|
129
|
-
<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}"/>
|
|
130
|
-
</svg>`},Ib=e=>{const t=e.fgColor,n=e.bgColor;return`${Ft}
|
|
131
|
-
<path fill="${t}" d="M4 3h12v14H4z"/>
|
|
132
|
-
<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}"/>
|
|
133
|
-
</svg>`},Rb=e=>{const t=e.fgColor,n=e.bgColor;return`
|
|
134
|
-
${Ft}
|
|
135
|
-
<rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>
|
|
136
|
-
<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}"/>
|
|
137
|
-
</svg>`},Eb=e=>{const t=e.fgColor,n=e.bgColor;return`
|
|
138
|
-
${Ft}
|
|
139
|
-
<rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>
|
|
140
|
-
<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}"/>
|
|
141
|
-
</svg>`},Tb=e=>{const t=e.fgColor,n=e.bgColor;return`${Ft}
|
|
142
|
-
<rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>
|
|
143
|
-
<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}"/>
|
|
144
|
-
</svg>`},Ob=e=>{const t=e.fgColor,n=e.bgColor;return`${Ft}
|
|
145
|
-
<rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>
|
|
146
|
-
<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}"/>
|
|
147
|
-
<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}"/>
|
|
148
|
-
<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}"/>
|
|
149
|
-
<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}"/>
|
|
150
|
-
</svg>`},Db=e=>{const t=e.fgColor,n=e.bgColor;return`
|
|
151
|
-
${Ft}
|
|
152
|
-
<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}"/>
|
|
153
|
-
<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}"/>
|
|
154
|
-
</svg>`},Pb=e=>{const t=e.fgColor,n=e.bgColor;return`${Ft}
|
|
155
|
-
<rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>
|
|
156
|
-
<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}"/>
|
|
157
|
-
</svg>`},Ab=e=>{const t=e.fgColor,n=e.bgColor;return`
|
|
158
|
-
${Ft}
|
|
159
|
-
<rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>
|
|
160
|
-
<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}"/>
|
|
161
|
-
</svg>`},Lb=e=>{const t=e.fgColor,n=e.bgColor;return`${Ft}
|
|
162
|
-
<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}"/>
|
|
163
|
-
<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}"/>
|
|
164
|
-
<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}"/>
|
|
165
|
-
</svg>`},Hb=e=>{const t=e.fgColor,n=e.bgColor;return`${Ft}
|
|
166
|
-
<rect x="2" y="2" width="16" height="16" rx="2" fill="${n}"/>
|
|
167
|
-
<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}"/>
|
|
168
|
-
</svg>`},Fb=e=>{const t=e.fgColor;return`
|
|
169
|
-
<svg width="18" height="18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
170
|
-
<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"/>
|
|
171
|
-
</svg>`},zb=e=>{const t=e.fgColor;return`
|
|
172
|
-
<svg width="18" height="18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
173
|
-
<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"/>
|
|
174
|
-
</svg>
|
|
175
|
-
`},Vb={headerRowID:cb,headerNumber:hb,headerCode:db,headerString:fb,headerBoolean:pb,headerAudioUri:mb,headerVideoUri:vb,headerEmoji:bb,headerImage:wb,headerUri:Qh,headerPhone:yb,headerMarkdown:xb,headerDate:Cb,headerTime:kb,headerEmail:Sb,headerReference:Mb,headerIfThenElse:Ib,headerSingleValue:Rb,headerLookup:Eb,headerTextTemplate:Tb,headerMath:Ob,headerRollup:Db,headerJoinStrings:Pb,headerSplitString:Ab,headerGeoDistance:Lb,headerArray:Hb,rowOwnerOverlay:Fb,protectedColumnOverlay:zb,renameIcon:gb};function $b(e,t){return e==="normal"?[t.bgIconHeader,t.fgIconHeader]:e==="selected"?["white",t.accentColor]:[t.accentColor,t.bgHeader]}class _b{onSettled;spriteMap=new Map;headerIcons;inFlight=0;constructor(t,n){this.onSettled=n,this.headerIcons=t??{}}drawSprite(t,n,r,o,i,a,l,s=1){const[u,c]=$b(n,l),h=a*Math.ceil(window.devicePixelRatio),g=`${u}_${c}_${h}_${t}`;let p=this.spriteMap.get(g);if(p===void 0){const f=this.headerIcons[t];if(f===void 0)return;p=document.createElement("canvas");const m=p.getContext("2d");if(m===null)return;const y=new Image;y.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(f({fgColor:c,bgColor:u}))}`,this.spriteMap.set(g,p);const w=y.decode();if(w===void 0)return;this.inFlight++,w.then(()=>{m.drawImage(y,0,0,h,h)}).finally(()=>{this.inFlight--,this.inFlight===0&&this.onSettled()})}else s<1&&(r.globalAlpha=s),r.drawImage(p,0,0,h,h,o,i,a,a),s<1&&(r.globalAlpha=1)}}function Gh(e){if(e.length===0)return;let t;for(const n of e)t=Math.min(t??n.y,n.y);return t}function La(e,t,n,r,o,i,a,l,s){l=l??t;let u=t,c=e;const h=r-i;let g=!1;for(;u<n&&c<h;){const p=o(c);if(u+p>l&&s(u,c,p,!1,a&&c===r-1)===!0){g=!0;break}u+=p,c++}if(!g){u=n;for(let p=0;p<i;p++){c=r-1-p;const f=o(c);u-=f,s(u,c,f,!0,a&&c===r-1)}}}function Or(e,t,n,r,o,i){let a=0,l=0;const s=o+r;for(const u of e){const c=u.sticky?l:a+n;if(i(u,c,s,u.sticky?0:l,t)===!0)break;a+=u.width,l+=u.sticky?u.width:0}}function Jh(e,t,n,r,o){let i=0,a=0;for(let l=0;l<e.length;l++){const s=e[l];let u=l+1,c=s.width;for(s.sticky&&(a+=c);u<e.length&&vi(e[u].group,s.group)&&e[u].sticky===e[l].sticky;){const m=e[u];c+=m.width,u++,l++,m.sticky&&(a+=m.width)}const h=s.sticky?0:n,g=i+h,p=s.sticky?0:Math.max(0,a-g),f=Math.min(c-p,t-(g+p));o([s.sourceIndex,e[u-1].sourceIndex],s.group??"",g+p,0,f,r),i+=c}}function ef(e,t,n,r,o,i,a){const[l,s]=e;let u,c;const h=a.find(g=>!g.sticky)?.sourceIndex??0;if(s>h){const g=Math.max(l,h);let p=t,f=r;for(let m=i.sourceIndex-1;m>=g;m--)p-=a[m].width,f+=a[m].width;for(let m=i.sourceIndex+1;m<=s;m++)f+=a[m].width;c={x:p,y:n,width:f,height:o}}if(h>l){const g=Math.min(s,h-1);let p=t,f=r;for(let m=i.sourceIndex-1;m>=l;m--)p-=a[m].width,f+=a[m].width;for(let m=i.sourceIndex+1;m<=g;m++)f+=a[m].width;u={x:p,y:n,width:f,height:o}}return[u,c]}function Nb(e,t,n,r){if(r==="any")return tf(e,{x:t,y:n,width:1,height:1});if(r==="vertical"&&(t=e.x),r==="horizontal"&&(n=e.y),Vh([t,n],e))return;const o=t-e.x,i=e.x+e.width-t,a=n-e.y+1,l=e.y+e.height-n,s=Math.min(r==="vertical"?Number.MAX_SAFE_INTEGER:o,r==="vertical"?Number.MAX_SAFE_INTEGER:i,r==="horizontal"?Number.MAX_SAFE_INTEGER:a,r==="horizontal"?Number.MAX_SAFE_INTEGER:l);return s===l?{x:e.x,y:e.y+e.height,width:e.width,height:n-e.y-e.height+1}:s===a?{x:e.x,y:n,width:e.width,height:e.y-n}:s===i?{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 bi(e,t,n,r,o,i,a,l){return e<=o+a&&o<=e+n&&t<=i+l&&i<=t+r}function Wr(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height}function tf(e,t){const n=Math.min(e.x,t.x),r=Math.min(e.y,t.y),o=Math.max(e.x+e.width,t.x+t.width)-n,i=Math.max(e.y+e.height,t.y+t.height)-r;return{x:n,y:r,width:o,height:i}}function Bb(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 jb(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 o=-4,i=-4,a=t+4,l=n+4,s=o-e.x,u=e.x+e.width-a,c=i-e.y,h=e.y+e.height-l,g=s>0?e.x+Math.floor(s/r)*r:e.x,p=u>0?e.x+e.width-Math.floor(u/r)*r:e.x+e.width,f=c>0?e.y+Math.floor(c/r)*r:e.y,m=h>0?e.y+e.height-Math.floor(h/r)*r:e.y+e.height;return{x:g,y:f,width:p-g,height:m-f}}function Wb(e,t,n,r,o){const[i,a,l,s]=t,[u,c,h,g]=o,{x:p,y:f,width:m,height:y}=e,w=[];if(m<=0||y<=0)return w;const v=p+m,x=f+y,E=p<i,R=f<a,S=p+m>l,P=f+y>s,T=p>=i&&p<l||v>i&&v<=l||p<i&&v>l,C=f>=a&&f<s||x>a&&x<=s||f<a&&x>s;if(T&&C){const A=Math.max(p,i),O=Math.max(f,a),I=Math.min(v,l),M=Math.min(x,s);w.push({rect:{x:A,y:O,width:I-A,height:M-O},clip:{x:u,y:c,width:h-u+1,height:g-c+1}})}if(E&&R){const A=p,O=f,I=Math.min(v,i),M=Math.min(x,a);w.push({rect:{x:A,y:O,width:I-A,height:M-O},clip:{x:0,y:0,width:u+1,height:c+1}})}if(R&&T){const A=Math.max(p,i),O=f,I=Math.min(v,l),M=Math.min(x,a);w.push({rect:{x:A,y:O,width:I-A,height:M-O},clip:{x:u,y:0,width:h-u+1,height:c+1}})}if(R&&S){const A=Math.max(p,l),O=f,I=v,M=Math.min(x,a);w.push({rect:{x:A,y:O,width:I-A,height:M-O},clip:{x:h,y:0,width:n-h+1,height:c+1}})}if(E&&C){const A=p,O=Math.max(f,a),I=Math.min(v,i),M=Math.min(x,s);w.push({rect:{x:A,y:O,width:I-A,height:M-O},clip:{x:0,y:c,width:u+1,height:g-c+1}})}if(S&&C){const A=Math.max(p,l),O=Math.max(f,a),I=v,M=Math.min(x,s);w.push({rect:{x:A,y:O,width:I-A,height:M-O},clip:{x:h,y:c,width:n-h+1,height:g-c+1}})}if(E&&P){const A=p,O=Math.max(f,s),I=Math.min(v,i),M=x;w.push({rect:{x:A,y:O,width:I-A,height:M-O},clip:{x:0,y:g,width:u+1,height:r-g+1}})}if(P&&T){const A=Math.max(p,i),O=Math.max(f,s),I=Math.min(v,l),M=x;w.push({rect:{x:A,y:O,width:I-A,height:M-O},clip:{x:u,y:g,width:h-u+1,height:r-g+1}})}if(S&&P){const A=Math.max(p,l),O=Math.max(f,s),I=v,M=x;w.push({rect:{x:A,y:O,width:I-A,height:M-O},clip:{x:h,y:g,width:n-h+1,height:r-g+1}})}return w}const Ub={kind:G.Loading,allowOverlay:!1};function Nc(e,t,n,r,o,i,a,l,s,u,c,h,g,p,f,m,y,w,v,x,E,R,S,P,T,C,A,O,I,M,D,k,Y,$,K){let ie=x?.size??Number.MAX_SAFE_INTEGER;const ee=performance.now();let Q=M.baseFontFull;e.font=Q;const ge={ctx:e},oe=[0,0],de=y>0?Kr(s,y,u):0;let pe,le;const V=Gh(v);return Or(t,l,i,a,o,(L,U,re,se,De)=>{const be=Math.max(0,se-U),Ge=U+be,Me=o+1,Et=L.width-be,st=r-o-1;if(v.length>0){let Le=!1;for(let He=0;He<v.length;He++){const rt=v[He];if(bi(Ge,Me,Et,st,rt.x,rt.y,rt.width,rt.height)){Le=!0;break}}if(!Le)return}const $e=()=>{e.save(),e.beginPath(),e.rect(Ge,Me,Et,st),e.clip()},ne=E.columns.hasIndex(L.sourceIndex),me=h(L.group??"").overrideTheme,ve=L.themeOverride===void 0&&me===void 0?M:pr(M,me,L.themeOverride),ce=ve.baseFontFull;ce!==Q&&(Q=ce,e.font=ce),$e();let we;return La(De,re,r,s,u,y,w,V,(Le,He,rt,Pe,ye)=>{if(He<0||(oe[0]=L.sourceIndex,oe[1]=He,x!==void 0&&!x.has(oe)))return;if(v.length>0){let Ee=!1;for(let ct=0;ct<v.length;ct++){const Tt=v[ct];if(bi(U,Le,L.width,rt,Tt.x,Tt.y,Tt.width,Tt.height)){Ee=!0;break}}if(!Ee)return}const Fe=E.rows.hasIndex(He),ke=p.hasIndex(He),_e=He<s?c(oe):Ub;let ut=U,dt=L.width,je=!1,ft=!1;if(_e.span!==void 0){const[Ee,ct]=_e.span,Tt=`${He},${Ee},${ct},${L.sticky}`;if(le===void 0&&(le=new Set),le.has(Tt)){ie--;return}else{const vn=ef(_e.span,U,Le,L.width,rt,L,n),tn=L.sticky?vn[0]:vn[1];if(!L.sticky&&vn[0]!==void 0&&(ft=!0),tn!==void 0){ut=tn.x,dt=tn.width,le.add(Tt),e.restore(),we=void 0,e.save(),e.beginPath();const nn=Math.max(0,se-tn.x);e.rect(tn.x+nn,Le,tn.width-nn,rt),pe===void 0&&(pe=[]),pe.push({x:tn.x+nn,y:Le,width:tn.width-nn,height:rt}),e.clip(),je=!0}}}const $t=g?.(He),bt=ye&&L.trailingRowOptions?.themeOverride!==void 0?L.trailingRowOptions?.themeOverride:void 0,Mt=_e.themeOverride===void 0&&$t===void 0&&bt===void 0?ve:pr(ve,$t,bt,_e.themeOverride);e.beginPath();const _t=kv(oe,_e,E);let Zt=Sv(oe,_e,E,m);const ln=_e.span!==void 0&&E.columns.some(Ee=>_e.span!==void 0&&Ee>=_e.span[0]&&Ee<=_e.span[1]);_t&&!f&&m?Zt=0:_t&&m&&(Zt=Math.max(Zt,1)),ln&&Zt++,_t||(Fe&&Zt++,ne&&!ye&&Zt++);const kt=_e.kind===G.Protected?Mt.bgCellMedium:Mt.bgCell;let ht;if((Pe||kt!==M.bgCell)&&(ht=Pn(kt,ht)),Zt>0||ke){ke&&(ht=Pn(Mt.bgHeader,ht));for(let Ee=0;Ee<Zt;Ee++)ht=Pn(Mt.accentLight,ht)}else if(R!==void 0){for(const Ee of R)if(Ee[0]===L.sourceIndex&&Ee[1]===He){ht=Pn(Mt.bgSearchResult,ht);break}}if(S!==void 0)for(let Ee=0;Ee<S.length;Ee++){const ct=S[Ee],Tt=ct.range;ct.style!=="solid-outline"&&Tt.x<=L.sourceIndex&&L.sourceIndex<Tt.x+Tt.width&&Tt.y<=He&&He<Tt.y+Tt.height&&(ht=Pn(ct.color,ht))}let Bt=!1;if(x!==void 0){const Ee=Le+1,ct=(Pe?Ee+rt-1:Math.min(Ee+rt-1,r-de))-Ee;(ct!==rt-1||ut+1<=se)&&(Bt=!0,e.save(),e.beginPath(),e.rect(ut+1,Ee,dt-1,ct),e.clip()),ht=ht===void 0?Mt.bgCell:Pn(ht,Mt.bgCell)}const mt=L.sourceIndex===n.length-1,sn=He===s-1;ht!==void 0&&(e.fillStyle=ht,we!==void 0&&(we.fillStyle=ht),x!==void 0?e.fillRect(ut+1,Le+1,dt-(mt?2:1),rt-(sn?2:1)):e.fillRect(ut,Le,dt,rt)),_e.style==="faded"&&(e.globalAlpha=.6);let Mn;for(let Ee=0;Ee<C.length;Ee++){const ct=C[Ee];if(ct.item[0]===L.sourceIndex&&ct.item[1]===He){Mn=ct;break}}if(dt>K&&!ft){const Ee=Mt.baseFontFull;Ee!==Q&&(e.font=Ee,Q=Ee),we=nf(e,_e,L.sourceIndex,He,mt,sn,ut,Le,dt,rt,Zt>0,Mt,ht??Mt.bgCell,P,T,Mn?.hoverAmount??0,A,I,ee,O,we,D,k,Y,$)}return Bt&&e.restore(),_e.style==="faded"&&(e.globalAlpha=1),ie--,je&&(e.restore(),we?.deprep?.(ge),we=void 0,$e(),Q=ce,e.font=ce),ie<=0}),e.restore(),ie<=0}),pe}const ni=[0,0],ri={x:0,y:0,width:0,height:0},zl=[void 0,()=>{}];let ps=!1;function Xb(){ps=!0}function nf(e,t,n,r,o,i,a,l,s,u,c,h,g,p,f,m,y,w,v,x,E,R,S,P,T){let C,A;y!==void 0&&y[0][0]===n&&y[0][1]===r&&(C=y[1][0],A=y[1][1]);let O;ni[0]=n,ni[1]=r,ri.x=a,ri.y=l,ri.width=s,ri.height=u,zl[0]=S.getValue(ni),zl[1]=k=>S.setValue(ni,k),ps=!1;const I={ctx:e,theme:h,col:n,row:r,cell:t,rect:ri,highlighted:c,cellFillColor:g,hoverAmount:m,frameTime:v,hoverX:C,drawState:zl,hoverY:A,imageLoader:p,spriteManager:f,hyperWrapping:w,overrideCursor:C!==void 0?T:void 0,requestAnimationFrame:Xb},M=Ov(I,t.lastUpdated,v,E,o,i),D=P(t);if(D!==void 0){E?.renderer!==D&&(E?.deprep?.(I),E=void 0);const k=D.drawPrep?.(I,E);x!==void 0&&!Ro(I.cell)?x(I,()=>D.draw(I,t)):D.draw(I,t),O=k===void 0?void 0:{deprep:k?.deprep,fillStyle:k?.fillStyle,font:k?.font,renderer:D}}return(M||ps)&&R?.(ni),O}function Us(e,t,n,r,o,i,a,l,s=-20,u=-20,c=void 0,h="center",g="square"){const p=Math.floor(o+a/2),f=g==="circle"?1e4:t.roundingRadius??4;let m=Mh(c??t.checkboxMaxSize,a,t.cellVerticalPadding),y=m/2;const w=Sh(h,r,i,t.cellHorizontalPadding,m),v=kh(w,p,m),x=Ih(r+s,o+u,v);switch(n){case!0:{e.beginPath(),Zn(e,w-m/2,p-m/2,m,m,f),g==="circle"&&(y*=.8,m*=.8),e.fillStyle=l?t.accentColor:t.textMedium,e.fill(),e.beginPath(),e.moveTo(w-y+m/4.23,p-y+m/1.97),e.lineTo(w-y+m/2.42,p-y+m/1.44),e.lineTo(w-y+m/1.29,p-y+m/3.25),e.strokeStyle=t.bgCell,e.lineJoin="round",e.lineCap="round",e.lineWidth=1.9,e.stroke();break}case fa:case!1:{e.beginPath(),Zn(e,w-m/2+.5,p-m/2+.5,m-1,m-1,f),e.lineWidth=1,e.strokeStyle=x?t.textDark:t.textMedium,e.stroke();break}case Rs:{e.beginPath(),Zn(e,w-m/2,p-m/2,m,m,f),e.fillStyle=x?t.textMedium:t.textLight,e.fill(),g==="circle"&&(y*=.8,m*=.8),e.beginPath(),e.moveTo(w-m/3,p),e.lineTo(w+m/3,p),e.strokeStyle=t.bgCell,e.lineCap="round",e.lineWidth=1.9,e.stroke();break}default:gi()}}function Yb(e,t,n,r,o,i,a,l,s,u,c,h,g,p,f,m,y,w,v){const x=a+l;if(x<=0)return;e.fillStyle=h.bgHeader,e.fillRect(0,0,o,x);const E=r?.[0]?.[0],R=r?.[0]?.[1],S=r?.[1]?.[0],P=r?.[1]?.[1],T=h.headerFontFull;e.font=T,Or(t,0,i,0,x,(C,A,O,I)=>{if(y!==void 0&&!y.has([C.sourceIndex,-1]))return;const M=Math.max(0,I-A);e.save(),e.beginPath(),e.rect(A+M,l,C.width-M,a),e.clip();const D=m(C.group??"").overrideTheme,k=C.themeOverride===void 0&&D===void 0?h:pr(h,D,C.themeOverride);k.bgHeader!==h.bgHeader&&(e.fillStyle=k.bgHeader,e.fill()),k!==h&&(e.font=k.headerFontFull);const Y=c.columns.hasIndex(C.sourceIndex),$=s!==void 0||u||C.headerRowMarkerDisabled===!0,K=!$&&R===-1&&E===C.sourceIndex,ie=$?0:p.find(de=>de.item[0]===C.sourceIndex&&de.item[1]===-1)?.hoverAmount??0,ee=c?.current!==void 0&&c.current.cell[0]===C.sourceIndex,Q=Y?k.accentColor:ee?k.bgHeaderHasFocus:k.bgHeader,ge=n?l:0,oe=C.sourceIndex===0?0:1;Y?(e.fillStyle=Q,e.fillRect(A+oe,ge,C.width-oe,a)):(ee||ie>0)&&(e.beginPath(),e.rect(A+oe,ge,C.width-oe,a),ee&&(e.fillStyle=k.bgHeaderHasFocus,e.fill()),ie>0&&(e.globalAlpha=ie,e.fillStyle=k.bgHeaderHovered,e.fill(),e.globalAlpha=1)),af(e,A,ge,C.width,a,C,Y,k,K,K?S:void 0,K?P:void 0,ee,ie,g,w,v),e.restore()}),n&&Zb(e,t,o,i,l,r,h,g,p,f,m,y)}function Zb(e,t,n,r,o,i,a,l,s,u,c,h){const[g,p]=i?.[0]??[];let f=0;Jh(t,n,r,o,(m,y,w,v,x,E)=>{if(h!==void 0&&!h.hasItemInRectangle({x:m[0],y:-2,width:m[1]-m[0]+1,height:1}))return;e.save(),e.beginPath(),e.rect(w,v,x,E),e.clip();const R=c(y),S=R?.overrideTheme===void 0?a:pr(a,R.overrideTheme),P=p===-2&&g!==void 0&&g>=m[0]&&g<=m[1],T=P?S.bgGroupHeaderHovered??S.bgHeaderHovered:S.bgGroupHeader??S.bgHeader;if(T!==a.bgHeader&&(e.fillStyle=T,e.fill()),e.fillStyle=S.textGroupHeader??S.textHeader,R!==void 0){let C=w;if(R.icon!==void 0&&(l.drawSprite(R.icon,"normal",e,C+8,(o-20)/2,20,S),C+=26),e.fillText(R.name,C+8,o/2+qn(e,a.headerFontFull)),R.actions!==void 0&&P){const A=rf({x:w,y:v,width:x,height:E},R.actions);e.beginPath();const O=A[0].x-10,I=w+x-O;e.rect(O,0,I,o);const M=e.createLinearGradient(O,0,O+I,0),D=Xr(T,0);M.addColorStop(0,D),M.addColorStop(10/I,T),M.addColorStop(1,T),e.fillStyle=M,e.fill(),e.globalAlpha=.6;const[k,Y]=i?.[1]??[-1,-1];for(let $=0;$<R.actions.length;$++){const K=R.actions[$],ie=A[$],ee=Wr(ie,k+w,Y);ee&&(e.globalAlpha=1),l.drawSprite(K.icon,"normal",e,ie.x+ie.width/2-10,ie.y+ie.height/2-10,20,S),ee&&(e.globalAlpha=.6)}e.globalAlpha=1}}w!==0&&u(m[0])&&(e.beginPath(),e.moveTo(w+.5,0),e.lineTo(w+.5,o),e.strokeStyle=a.borderColor,e.lineWidth=1,e.stroke()),e.restore(),f=w+x}),e.beginPath(),e.moveTo(f+.5,0),e.lineTo(f+.5,o),e.moveTo(0,o+.5),e.lineTo(n,o+.5),e.strokeStyle=a.borderColor,e.lineWidth=1,e.stroke()}const Zi=30;function qb(e,t,n,r,o){return{x:e+n-Zi,y:Math.max(t,t+r/2-Zi/2),width:Zi,height:Math.min(Zi,r)}}function rf(e,t){const n=[];let r=e.x+e.width-26*t.length;const o=e.y+e.height/2-13,i=26,a=26;for(let l=0;l<t.length;l++)n.push({x:r,y:o,width:a,height:i}),r+=26;return n}function oi(e,t,n){return!n||e===void 0||(e.x=t-(e.x-t)-e.width),e}function of(e,t,n,r,o,i,a,l){const s=a.cellHorizontalPadding,u=a.headerIconSize,c=qb(n,r,o,i);let h=n+s;const g=t.icon===void 0?void 0:{x:h,y:r+(i-u)/2,width:u,height:u},p=g===void 0||t.overlayIcon===void 0?void 0:{x:g.x+9,y:g.y+6,width:18,height:18};g!==void 0&&(h+=Math.ceil(u*1.3));const f={x:h,y:r,width:o-h,height:i};let m;if(t.indicatorIcon!==void 0){const w=e===void 0?Bh(t.title,a.headerFontFull)?.width??0:Tr(t.title,e,a.headerFontFull).width;f.width=w,h+=w+s,m={x:h,y:r+(i-u)/2,width:u,height:u}}const y=n+o/2;return{menuBounds:oi(c,y,l),iconBounds:oi(g,y,l),iconOverlayBounds:oi(p,y,l),textBounds:oi(f,y,l),indicatorIconBounds:oi(m,y,l)}}function Bc(e,t,n,r,o,i,a,l,s,u,c,h,g,p,f,m){if(i.rowMarker!==void 0&&i.headerRowMarkerDisabled!==!0){const v=i.rowMarkerChecked;v!==!0&&i.headerRowMarkerAlwaysVisible!==!0&&(e.globalAlpha=h);const x=i.headerRowMarkerTheme!==void 0?pr(l,i.headerRowMarkerTheme):l;Us(e,x,v,t,n,r,o,!1,void 0,void 0,l.checkboxMaxSize,"center",i.rowMarker),v!==!0&&i.headerRowMarkerAlwaysVisible!==!0&&(e.globalAlpha=1);return}const y=a?l.textHeaderSelected:l.textHeader,w=i.hasMenu===!0&&(s||p&&a)&&m.menuBounds!==void 0;if(i.icon!==void 0&&m.iconBounds!==void 0){let v=a?"selected":"normal";i.style==="highlight"&&(v=a?"selected":"special"),g.drawSprite(i.icon,v,e,m.iconBounds.x,m.iconBounds.y,m.iconBounds.width,l),i.overlayIcon!==void 0&&m.iconOverlayBounds!==void 0&&g.drawSprite(i.overlayIcon,a?"selected":"special",e,m.iconOverlayBounds.x,m.iconOverlayBounds.y,m.iconOverlayBounds.width,l)}if(w&&r>35){const v=f?35:r-35,x=f?35*.7:r-35*.7,E=v/r,R=x/r,S=e.createLinearGradient(t,0,t+r,0),P=Xr(y,0);S.addColorStop(f?1:0,y),S.addColorStop(E,y),S.addColorStop(R,P),S.addColorStop(f?0:1,P),e.fillStyle=S}else e.fillStyle=y;if(f&&(e.textAlign="right"),m.textBounds!==void 0&&e.fillText(i.title,f?m.textBounds.x+m.textBounds.width:m.textBounds.x,n+o/2+qn(e,l.headerFontFull)),f&&(e.textAlign="left"),i.indicatorIcon!==void 0&&m.indicatorIconBounds!==void 0&&(!w||!bi(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=a?"selected":"normal";i.style==="highlight"&&(v=a?"selected":"special"),g.drawSprite(i.indicatorIcon,v,e,m.indicatorIconBounds.x,m.indicatorIconBounds.y,m.indicatorIconBounds.width,l)}if(w&&m.menuBounds!==void 0){const v=m.menuBounds,x=u!==void 0&&c!==void 0&&Wr(v,u+t,c+n);if(x||(e.globalAlpha=.7),i.menuIcon===void 0||i.menuIcon===pa.Triangle){e.beginPath();const E=v.x+v.width/2-5.5,R=v.y+v.height/2-3;Lv(e,[{x:E,y:R},{x:E+11,y:R},{x:E+5.5,y:R+6}],1),e.fillStyle=y,e.fill()}else if(i.menuIcon===pa.Dots){e.beginPath();const E=v.x+v.width/2,R=v.y+v.height/2;Av(e,E,R),e.fillStyle=y,e.fill()}else{const E=v.x+(v.width-l.headerIconSize)/2,R=v.y+(v.height-l.headerIconSize)/2;g.drawSprite(i.menuIcon,"normal",e,E,R,l.headerIconSize,l)}x||(e.globalAlpha=1)}}function af(e,t,n,r,o,i,a,l,s,u,c,h,g,p,f,m){const y=Ps(i.title)==="rtl",w=of(e,i,t,n,r,o,l,y);f!==void 0?f({ctx:e,theme:l,rect:{x:t,y:n,width:r,height:o},column:i,columnIndex:i.sourceIndex,isSelected:a,hoverAmount:g,isHovered:s,hasSelectedCell:h,spriteManager:p,menuBounds:w?.menuBounds??{x:0,y:0,height:0,width:0},hoverX:u,hoverY:c},()=>Bc(e,t,n,r,o,i,a,l,s,u,c,g,p,m,y,w)):Bc(e,t,n,r,o,i,a,l,s,u,c,g,p,m,y,w)}var Vl,jc;function Kb(){if(jc)return Vl;jc=1;function e(t,n,r,o){for(var i=-1,a=t==null?0:t.length;++i<a;){var l=t[i];n(o,l,r(l),t)}return o}return Vl=e,Vl}var $l,Wc;function Qb(){if(Wc)return $l;Wc=1;var e=Dm();function t(n,r,o,i){return e(n,function(a,l,s){r(i,a,o(a),s)}),i}return $l=t,$l}var _l,Uc;function Gb(){if(Uc)return _l;Uc=1;var e=Kb(),t=Qb(),n=Om(),r=ch();function o(i,a){return function(l,s){var u=r(l)?e:t,c=a?a():{};return u(l,i,n(s,2),c)}}return _l=o,_l}var Nl,Xc;function Jb(){if(Xc)return Nl;Xc=1;var e=Tm(),t=Gb(),n=Object.prototype,r=n.hasOwnProperty,o=t(function(i,a,l){r.call(i,l)?i[l].push(a):e(i,l,[a])});return Nl=o,Nl}var e1=Jb();const t1=Er(e1);function n1(e,t,n,r,o,i,a,l,s,u,c,h,g,p,f,m,y,w,v){if(w!==void 0||t[t.length-1]!==n[t.length-1])return;const x=Gh(y);Or(t,s,a,l,i,(E,R,S,P,T)=>{if(E!==t[t.length-1])return;R+=E.width;const C=Math.max(R,P);C>r||(e.save(),e.beginPath(),e.rect(C,i+1,1e4,o-i-1),e.clip(),La(T,S,o,u,c,f,m,x,(A,O,I,M)=>{if(!M&&y.length>0&&!y.some(K=>bi(R,A,1e4,I,K.x,K.y,K.width,K.height)))return;const D=g.hasIndex(O),k=p.hasIndex(O);e.beginPath();const Y=h?.(O),$=Y===void 0?v:pr(v,Y);$.bgCell!==v.bgCell&&(e.fillStyle=$.bgCell,e.fillRect(R,A,1e4,I)),k&&(e.fillStyle=$.bgHeader,e.fillRect(R,A,1e4,I)),D&&(e.fillStyle=$.accentLight,e.fillRect(R,A,1e4,I))}),e.restore())})}function r1(e,t,n,r,o,i,a,l,s){let u=!1;for(const f of t)if(!f.sticky){u=a(f.sourceIndex);break}const c=s.horizontalBorderColor??s.borderColor,h=s.borderColor,g=u?Ao(t):0;let p;if(g!==0&&(p=mc(h,s.bgCell),e.beginPath(),e.moveTo(g+.5,0),e.lineTo(g+.5,r),e.strokeStyle=p,e.stroke()),o>0){const f=h===c&&p!==void 0?p:mc(c,s.bgCell),m=Kr(i,o,l);e.beginPath(),e.moveTo(0,r-m+.5),e.lineTo(n,r-m+.5),e.strokeStyle=f,e.stroke()}}const lf=(e,t,n)=>{let r=0,o=t,i=0,a=n;if(e!==void 0&&e.length>0){r=Number.MAX_SAFE_INTEGER,i=Number.MAX_SAFE_INTEGER,o=Number.MIN_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER;for(const l of e)r=Math.min(r,l.x-1),o=Math.max(o,l.x+l.width+1),i=Math.min(i,l.y-1),a=Math.max(a,l.y+l.height+1)}return{minX:r,maxX:o,minY:i,maxY:a}};function o1(e,t,n,r,o,i,a,l,s,u,c,h,g,p,f){const m=f.bgCell,{minX:y,maxX:w,minY:v,maxY:x}=lf(l,i,a),E=[],R=a-Kr(p,g,u);let S=s,P=n,T=0;for(;S+o<R;){const I=S+o,M=u(P);if(I>=v&&I<=x-1){const D=c?.(P)?.bgCell;D!==void 0&&D!==m&&P>=p-g&&E.push({x:y,y:I,w:w-y,h:M,color:D})}S+=M,P<p-g&&(T=S),P++}let C=0;const A=Math.min(R,x)-T;if(A>0)for(let I=0;I<t.length;I++){const M=t[I];if(M.width===0)continue;const D=M.sticky?C:C+r,k=M.themeOverride?.bgCell;k!==void 0&&k!==m&&D>=y&&D<=w&&h(I+1)&&E.push({x:D,y:T,w:M.width,h:A,color:k}),C+=M.width}if(E.length===0)return;let O;e.beginPath();for(let I=E.length-1;I>=0;I--){const M=E[I];O===void 0?O=M.color:M.color!==O&&(e.fillStyle=O,e.fill(),e.beginPath(),O=M.color),e.rect(M.x,M.y,M.w,M.h)}O!==void 0&&(e.fillStyle=O,e.fill()),e.beginPath()}function Yc(e,t,n,r,o,i,a,l,s,u,c,h,g,p,f,m,y,w=!1){if(s!==void 0){e.beginPath(),e.save(),e.rect(0,0,i,a);for(const I of s)e.rect(I.x+1,I.y+1,I.width-1,I.height-1);e.clip("evenodd")}const v=y.horizontalBorderColor??y.borderColor,x=y.borderColor,{minX:E,maxX:R,minY:S,maxY:P}=lf(l,i,a),T=[];e.beginPath();let C=.5;for(let I=0;I<t.length;I++){const M=t[I];if(M.width===0)continue;C+=M.width;const D=M.sticky?C:C+r;D>=E&&D<=R&&p(I+1)&&T.push({x1:D,y1:Math.max(u,S),x2:D,y2:Math.min(a,P),color:x})}let A=a+.5;for(let I=m-f;I<m;I++){const M=h(I);A-=M,T.push({x1:E,y1:A,x2:R,y2:A,color:v})}if(w!==!0){let I=c+.5,M=n;const D=A;for(;I+o<D;){const k=I+o;if(k>=S&&k<=P-1){const Y=g?.(M);T.push({x1:E,y1:k,x2:R,y2:k,color:Y?.horizontalBorderColor??Y?.borderColor??v})}I+=h(M),M++}}const O=t1(T,I=>I.color);for(const I of Object.keys(O)){e.strokeStyle=I;for(const M of O[I])e.moveTo(M.x1,M.y1),e.lineTo(M.x2,M.y2);e.stroke(),e.beginPath()}s!==void 0&&e.restore()}function i1(e,t,n,r,o,i,a,l,s,u,c,h,g,p,f,m,y,w,v){const x=[];e.imageSmoothingEnabled=!1;const E=Math.min(o.cellYOffset,a),R=Math.max(o.cellYOffset,a);let S=0;if(typeof w=="number")S+=(R-E)*w;else for(let D=E;D<R;D++)S+=w(D);a>o.cellYOffset&&(S=-S),S+=s-o.translateY;const P=Math.min(o.cellXOffset,i),T=Math.max(o.cellXOffset,i);let C=0;for(let D=P;D<T;D++)C+=m[D].width;i>o.cellXOffset&&(C=-C),C+=l-o.translateX;const A=Ao(y);if(C!==0&&S!==0)return{regions:[]};const O=u>0?Kr(g,u,w):0,I=c-A-Math.abs(C),M=h-p-O-Math.abs(S)-1;if(I>150&&M>150){const D={sx:0,sy:0,sw:c*f,sh:h*f,dx:0,dy:0,dw:c*f,dh:h*f};if(S>0?(D.sy=(p+1)*f,D.sh=M*f,D.dy=(S+p+1)*f,D.dh=M*f,x.push({x:0,y:p,width:c,height:S+1})):S<0&&(D.sy=(-S+p+1)*f,D.sh=M*f,D.dy=(p+1)*f,D.dh=M*f,x.push({x:0,y:h+S-O,width:c,height:-S+O})),C>0?(D.sx=A*f,D.sw=I*f,D.dx=(C+A)*f,D.dw=I*f,x.push({x:A-1,y:0,width:C+2,height:h})):C<0&&(D.sx=(A-C)*f,D.sw=I*f,D.dx=A*f,D.dw=I*f,x.push({x:c+C,y:0,width:-C,height:h})),e.setTransform(1,0,0,1,0,0),v){if(A>0&&C!==0&&S===0&&(r===void 0||n?.[1]!==!1)){const k=A*f,Y=h*f;e.drawImage(t,0,0,k,Y,0,0,k,Y)}if(O>0&&C===0&&S!==0&&(r===void 0||n?.[0]!==!1)){const k=(h-O)*f,Y=c*f,$=O*f;e.drawImage(t,0,k,Y,$,0,k,Y,$)}}e.drawImage(t,D.sx,D.sy,D.sw,D.sh,D.dx,D.dy,D.dw,D.dh),e.scale(f,f)}return e.imageSmoothingEnabled=!0,{regions:x}}function a1(e,t,n,r,o,i,a,l,s,u){const c=[];return t!==e.cellXOffset||n!==e.cellYOffset||r!==e.translateX||o!==e.translateY||Or(s,n,r,o,l,(h,g,p,f)=>{if(h.sourceIndex===u){const m=Math.max(g,f)+1;return c.push({x:m,y:0,width:i-m,height:a}),!0}}),c}function l1(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 o=e.mappedColumns[r],i=t.mappedColumns[r];if(Po(o,i))continue;if(n!==void 0||o.width===i.width)return!1;const{width:a,...l}=o,{width:s,...u}=i;if(!Po(l,u))return!1;n=r}return n===void 0?!0:n}return!0}function Zc(e,t,n,r,o,i,a,l,s,u,c,h,g,p,f,m){const y=f?.filter(P=>P.style!=="no-outline");if(y===void 0||y.length===0)return;const w=Ao(l),v=Kr(p,g,h),x=[s,0,l.length,p-g],E=[w,0,t,n-v],R=y.map(P=>{const T=P.range,C=P.style??"dashed";return Wb(T,x,t,n,E).map(A=>{const O=A.rect,I=hs(O.x,O.y,t,n,c,u+c,r,o,i,a,p,s,g,l,h),M=O.width===1&&O.height===1?I:hs(O.x+O.width-1,O.y+O.height-1,t,n,c,u+c,r,o,i,a,p,s,g,l,h);return O.x+O.width>=l.length&&(M.width-=1),O.y+O.height>=p&&(M.height-=1),{color:P.color,style:C,clip:A.clip,rect:jb({x:I.x,y:I.y,width:M.x+M.width-I.x,height:M.y+M.height-I.y},t,n,8)}})}),S=()=>{e.lineWidth=1;let P=!1;for(const T of R)for(const C of T)if(C?.rect!==void 0&&bi(0,0,t,n,C.rect.x,C.rect.y,C.rect.width,C.rect.height)){const A=P,O=!Bb(C.clip,C.rect);e.beginPath(),O&&(e.save(),e.rect(C.clip.x,C.clip.y,C.clip.width,C.clip.height),e.clip()),C.style==="dashed"&&!P?(e.setLineDash([5,3]),P=!0):(C.style==="solid"||C.style==="solid-outline")&&P&&(e.setLineDash([]),P=!1),e.strokeStyle=C.style==="solid-outline"?Pn(Pn(C.color,m.borderColor),m.bgCell):Xr(C.color,1),e.closePath(),e.strokeRect(C.rect.x+.5,C.rect.y+.5,C.rect.width-1,C.rect.height-1),O&&(e.restore(),P=A)}P&&e.setLineDash([])};return S(),S}function qc(e,t,n,r,o){e.beginPath(),e.moveTo(t,n),e.lineTo(t,r),e.lineWidth=2,e.strokeStyle=o,e.stroke(),e.globalAlpha=1}function Bl(e,t,n,r,o,i,a,l,s,u,c,h,g,p,f,m,y){if(c.current===void 0)return;const w=m!==!1&&m!==void 0;if(!w)return;const v=typeof m=="object"?{...ga,...m}:ga,x=c.current.range,E=c.current.cell,R=[x.x+x.width-1,x.y+x.height-1];if(E[1]>=y&&R[1]>=y||!a.some(k=>k.sourceIndex===E[0]||k.sourceIndex===R[0]))return;const[S,P]=c.current.cell,T=g(c.current.cell),C=T.span??[S,S],A=P>=y-p,O=p>0&&!A?Kr(y,p,h)-1:0,I=R[1];let M;if(Or(a,r,o,i,u,(k,Y,$,K,ie)=>{if(k.sticky&&S>k.sourceIndex)return;const ee=k.sourceIndex<C[0],Q=k.sourceIndex>C[1],ge=k.sourceIndex===R[0];if(!(!ge&&(ee||Q)))return La(ie,$,n,y,h,p,f,void 0,(oe,de,pe)=>{if(de!==P&&de!==I)return;let le=Y,V=k.width;if(T.span!==void 0){const L=ef(T.span,Y,oe,k.width,pe,k,l),U=k.sticky?L[0]:L[1];U!==void 0&&(le=U.x,V=U.width)}return de===I&&ge&&w&&(M=()=>{K>le&&!k.sticky&&(e.beginPath(),e.rect(K,0,t-K,n),e.clip());const L=v.size,U=L/2,re=le+V+v.offsetX-U+.5,se=oe+pe+v.offsetY-U+.5;e.beginPath(),v.shape==="circle"?e.arc(re+U,se+U,U,0,Math.PI*2):e.rect(re,se,L,L),e.fillStyle=k.themeOverride?.accentColor??s.accentColor,e.fill(),v.outline>0&&(e.lineWidth=v.outline,e.strokeStyle=s.bgCell,v.shape==="circle"?(e.beginPath(),e.arc(re+U,se+U,U+v.outline/2,0,Math.PI*2),e.stroke()):e.strokeRect(re-v.outline/2,se-v.outline/2,L+v.outline,L+v.outline))}),M!==void 0}),M!==void 0}),M===void 0)return;const D=()=>{e.save(),e.beginPath(),e.rect(0,u,t,n-u-O),e.clip(),M?.(),e.restore()};return D(),D}function s1(e,t,n,r,o,i,a,l,s){s===void 0||s.size===0||(e.beginPath(),Jh(t,n,i,r,(u,c,h,g,p,f)=>{s.hasItemInRectangle({x:u[0],y:-2,width:u[1]-u[0]+1,height:1})&&e.rect(h,g,p,f)}),Or(t,l,i,a,o,(u,c,h,g)=>{const p=Math.max(0,g-c),f=c+p+1,m=u.width-p-1;s.has([u.sourceIndex,-1])&&e.rect(f,r,m,o-r)}),e.clip())}function u1(e,t,n,r,o,i,a,l,s,u){let c=0;return Or(e,i,r,o,n,(h,g,p,f,m)=>(La(m,p,t,a,l,s,u,void 0,(y,w,v,x)=>{x||(c=Math.max(w,c))}),!0)),c}function Kc(e,t){const{canvasCtx:n,headerCanvasCtx:r,width:o,height:i,cellXOffset:a,cellYOffset:l,translateX:s,translateY:u,mappedColumns:c,enableGroups:h,freezeColumns:g,dragAndDropState:p,theme:f,drawFocus:m,headerHeight:y,groupHeaderHeight:w,disabledRows:v,rowHeight:x,verticalBorder:E,overrideCursor:R,isResizing:S,selection:P,fillHandle:T,freezeTrailingRows:C,rows:A,getCellContent:O,getGroupDetails:I,getRowThemeOverride:M,isFocused:D,drawHeaderCallback:k,prelightCells:Y,drawCellCallback:$,highlightRegions:K,resizeCol:ie,imageLoader:ee,lastBlitData:Q,hoverValues:ge,hyperWrapping:oe,hoverInfo:de,spriteManager:pe,maxScaleFactor:le,hasAppendRow:V,touchMode:L,enqueue:U,renderStateProvider:re,getCellRenderer:se,renderStrategy:De,bufferACtx:be,bufferBCtx:Ge,damage:Me,minimumCellWidth:Et,resizeIndicator:st}=e;if(o===0||i===0)return;const $e=De==="double-buffer",ne=Math.min(le,Math.ceil(window.devicePixelRatio??1)),me=De!=="direct"&&l1(e,t),ve=n.canvas;(ve.width!==o*ne||ve.height!==i*ne)&&(ve.width=o*ne,ve.height=i*ne,ve.style.width=o+"px",ve.style.height=i+"px");const ce=r.canvas,we=h?w+y:y,Le=we+1;(ce.width!==o*ne||ce.height!==Le*ne)&&(ce.width=o*ne,ce.height=Le*ne,ce.style.width=o+"px",ce.style.height=Le+"px");const He=be.canvas,rt=Ge.canvas;$e&&(He.width!==o*ne||He.height!==i*ne)&&(He.width=o*ne,He.height=i*ne,Q.current!==void 0&&(Q.current.aBufferScroll=void 0)),$e&&(rt.width!==o*ne||rt.height!==i*ne)&&(rt.width=o*ne,rt.height=i*ne,Q.current!==void 0&&(Q.current.bBufferScroll=void 0));const Pe=Q.current;if(me===!0&&a===Pe?.cellXOffset&&l===Pe?.cellYOffset&&s===Pe?.translateX&&u===Pe?.translateY)return;let ye=null;$e&&(ye=n);const Fe=r;let ke;$e?Me!==void 0?ke=Pe?.lastBuffer==="b"?Ge:be:ke=Pe?.lastBuffer==="b"?be:Ge:ke=n;const _e=ke.canvas,ut=$e?_e===He?rt:He:ve,dt=typeof x=="number"?()=>x:x;Fe.save(),ke.save(),Fe.beginPath(),ke.beginPath(),Fe.textBaseline="middle",ke.textBaseline="middle",ne!==1&&(Fe.scale(ne,ne),ke.scale(ne,ne));const je=ds(c,a,o,p,s);let ft=[];const $t=m&&P.current?.cell[1]===l&&u===0;let bt=!1;if(K!==void 0){for(const mt of K)if(mt.style!=="no-outline"&&mt.range.y===l&&u===0){bt=!0;break}}const Mt=()=>{Yb(Fe,je,h,de,o,s,y,w,p,S,P,f,pe,ge,E,I,Me,k,L),Yc(Fe,je,l,s,u,o,i,void 0,void 0,w,we,dt,M,E,C,A,f,!0),Fe.beginPath(),Fe.moveTo(0,Le-.5),Fe.lineTo(o,Le-.5),Fe.strokeStyle=Pn(f.headerBottomBorderColor??f.horizontalBorderColor??f.borderColor,f.bgHeader),Fe.stroke(),bt&&Zc(Fe,o,i,a,l,s,u,c,g,y,w,x,C,A,K,f),$t&&Bl(Fe,o,i,l,s,u,je,c,f,we,P,dt,O,C,V,T,A)};if(Me!==void 0){const mt=je[je.length-1].sourceIndex+1,sn=Me.hasItemInRegion([{x:a,y:-2,width:mt,height:2},{x:a,y:l,width:mt,height:300},{x:0,y:l,width:g,height:300},{x:0,y:-2,width:g,height:2},{x:a,y:A-C,width:mt,height:C,when:C>0}]),Mn=Ee=>{Nc(Ee,je,c,i,we,s,u,l,A,dt,O,I,M,v,D,m,C,V,ft,Me,P,Y,K,ee,pe,ge,de,$,oe,f,U,re,se,R,Et);const ct=P.current;T!==!1&&T!==void 0&&m&&ct!==void 0&&Me.has($h(ct.range))&&Bl(Ee,o,i,l,s,u,je,c,f,we,P,dt,O,C,V,T,A)};sn&&(Mn(ke),ye!==null&&(ye.save(),ye.scale(ne,ne),ye.textBaseline="middle",Mn(ye),ye.restore()),Me.hasHeader()&&(s1(Fe,je,o,w,we,s,u,l,Me),Mt())),ke.restore(),Fe.restore();return}if((me!==!0||a!==Pe?.cellXOffset||s!==Pe?.translateX||$t!==Pe?.mustDrawFocusOnHeader||bt!==Pe?.mustDrawHighlightRingsOnHeader)&&Mt(),me===!0){Dn(ut!==void 0&&Pe!==void 0);const{regions:mt}=i1(ke,ut,ut===He?Pe.aBufferScroll:Pe.bBufferScroll,ut===He?Pe.bBufferScroll:Pe.aBufferScroll,Pe,a,l,s,u,C,o,i,A,we,ne,c,je,x,$e);ft=mt}else me!==!1&&(Dn(Pe!==void 0),ft=a1(Pe,a,l,s,u,o,i,we,je,me));r1(ke,je,o,i,C,A,E,dt,f);const _t=Zc(ke,o,i,a,l,s,u,c,g,y,w,x,C,A,K,f),Zt=m?Bl(ke,o,i,l,s,u,je,c,f,we,P,dt,O,C,V,T,A):void 0;if(ke.fillStyle=f.bgCell,ft.length>0){ke.beginPath();for(const mt of ft)ke.rect(mt.x,mt.y,mt.width,mt.height);ke.clip(),ke.fill(),ke.beginPath()}else ke.fillRect(0,0,o,i);const ln=Nc(ke,je,c,i,we,s,u,l,A,dt,O,I,M,v,D,m,C,V,ft,Me,P,Y,K,ee,pe,ge,de,$,oe,f,U,re,se,R,Et);n1(ke,je,c,o,i,we,s,u,l,A,dt,M,P.rows,v,C,V,ft,Me,f),o1(ke,je,l,s,u,o,i,ft,we,dt,M,E,C,A,f),Yc(ke,je,l,s,u,o,i,ft,ln,w,we,dt,M,E,C,A,f),_t?.(),Zt?.(),S&&st!=="none"&&Or(je,0,s,0,we,(mt,sn)=>mt.sourceIndex===ie?(qc(Fe,sn+mt.width,0,we+1,Pn(f.resizeIndicatorColor??f.accentLight,f.bgHeader)),st==="full"&&qc(ke,sn+mt.width,we,i,Pn(f.resizeIndicatorColor??f.accentLight,f.bgCell)),!0):!1),ye!==null&&(ye.fillStyle=f.bgCell,ye.fillRect(0,0,o,i),ye.drawImage(ke.canvas,0,0));const kt=u1(je,i,we,s,u,l,A,dt,C,V);ee?.setWindow({x:a,y:l,width:je.length,height:kt-l},g,Array.from({length:C},(mt,sn)=>A-1-sn));const ht=Pe!==void 0&&(a!==Pe.cellXOffset||s!==Pe.translateX),Bt=Pe!==void 0&&(l!==Pe.cellYOffset||u!==Pe.translateY);Q.current={cellXOffset:a,cellYOffset:l,translateX:s,translateY:u,mustDrawFocusOnHeader:$t,mustDrawHighlightRingsOnHeader:bt,lastBuffer:$e?_e===He?"a":"b":void 0,aBufferScroll:_e===He?[ht,Bt]:Pe?.aBufferScroll,bBufferScroll:_e===rt?[ht,Bt]:Pe?.bBufferScroll},ke.restore(),Fe.restore()}const c1=80;function d1(e){const t=e-1;return t*t*t+1}class h1{callback;constructor(t){this.callback=t}currentHoveredItem=void 0;leavingItems=[];lastAnimationTime;addToLeavingItems=t=>{this.leavingItems.some(n=>hi(n.item,t.item))||this.leavingItems.push(t)};removeFromLeavingItems=t=>{const n=this.leavingItems.find(r=>hi(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:d1(t.hoverAmount)}));step=t=>{if(this.lastAnimationTime===void 0)this.lastAnimationTime=t;else{const n=(t-this.lastAnimationTime)/c1;for(const o of this.leavingItems)o.hoverAmount=Vn(o.hoverAmount-n,0,1);this.currentHoveredItem!==void 0&&(this.currentHoveredItem.hoverAmount=Vn(this.currentHoveredItem.hoverAmount+n,0,1));const r=this.getAnimatingItems();this.callback(r),this.cleanUpLeavingElements()}this.shouldStep()?(this.lastAnimationTime=t,window.requestAnimationFrame(this.step)):this.lastAnimationTime=void 0};setHovered=t=>{if(!hi(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 f1{fn;val;constructor(t){this.fn=t}get value(){return this.val??(this.val=this.fn())}}function Xs(e){return new f1(e)}const p1=Xs(()=>window.navigator.userAgent.includes("Firefox")),wa=Xs(()=>window.navigator.userAgent.includes("Mac OS")&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome")),ya=Xs(()=>window.navigator.platform.toLowerCase().startsWith("mac"));function g1(e){const t=d.useRef([]),n=d.useRef(0),r=d.useRef(e);r.current=e;const o=d.useCallback(()=>{const i=()=>window.requestAnimationFrame(a),a=()=>{const l=t.current.map(Ws);t.current=[],r.current(new pi(l)),t.current.length>0?n.current++:n.current=0};window.requestAnimationFrame(n.current>600?i:a)},[]);return d.useCallback(i=>{t.current.length===0&&o();const a=Yn(i[0],i[1]);t.current.includes(a)||t.current.push(a)},[o])}const Sr="header",Xn="group-header",xa="out-of-bounds";var To;(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"})(To||(To={}));function sf(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 m1=(e,t)=>e.kind===G.Custom?e.copyData:t?.(e)?.getAccessibilityString(e)??"",v1=(e,t)=>{const{width:n,height:r,accessibilityHeight:o,columns:i,cellXOffset:a,cellYOffset:l,headerHeight:s,fillHandle:u=!1,groupHeaderHeight:c,rowHeight:h,rows:g,getCellContent:p,getRowThemeOverride:f,onHeaderMenuClick:m,onHeaderIndicatorClick:y,enableGroups:w,isFilling:v,onCanvasFocused:x,onCanvasBlur:E,isFocused:R,selection:S,freezeColumns:P,onContextMenu:T,freezeTrailingRows:C,fixedShadowX:A=!0,fixedShadowY:O=!0,drawFocusRing:I,onMouseDown:M,onMouseUp:D,onMouseMoveRaw:k,onMouseMove:Y,onItemHovered:$,dragAndDropState:K,firstColAccessible:ie,onKeyDown:ee,onKeyUp:Q,highlightRegions:ge,canvasRef:oe,onDragStart:de,onDragEnd:pe,eventTargetRef:le,isResizing:V,resizeColumn:L,isDragging:U,isDraggable:re=!1,allowResize:se,disabledRows:De,hasAppendRow:be,getGroupDetails:Ge,theme:Me,prelightCells:Et,headerIcons:st,verticalBorder:$e,drawCell:ne,drawHeader:me,onCellFocused:ve,onDragOverCell:ce,onDrop:we,onDragLeave:Le,imageWindowLoader:He,smoothScrollX:rt=!1,smoothScrollY:Pe=!1,experimental:ye,getCellRenderer:Fe,resizeIndicator:ke="full"}=e,_e=e.translateX??0,ut=e.translateY??0,dt=Math.max(P,Math.min(i.length-1,a)),je=d.useRef(null),ft=d.useRef(ye?.eventTarget??window),$t=ft.current,bt=He,Mt=d.useRef(),[_t,Zt]=d.useState(!1),ln=d.useRef([]),kt=d.useRef(),[ht,Bt]=d.useState(),[mt,sn]=d.useState(),Mn=d.useRef(null),[Ee,ct]=d.useState(),[Tt,vn]=d.useState(!1),tn=d.useRef(Tt);tn.current=Tt;const nn=d.useMemo(()=>new _b(st,()=>{rn.current=void 0,yn.current()}),[st]),cn=w?c+s:s,zt=d.useRef(-1),Kt=(ye?.enableFirefoxRescaling??!1)&&p1.value,Be=(ye?.enableSafariRescaling??!1)&&wa.value;d.useLayoutEffect(()=>{window.devicePixelRatio===1||!Kt&&!Be||(zt.current!==-1&&Zt(!0),window.clearTimeout(zt.current),zt.current=window.setTimeout(()=>{Zt(!1),zt.current=-1},200))},[l,dt,_e,ut,Kt,Be]);const wt=xv(i,P),In=d.useMemo(()=>A?Ao(wt,K):0,[wt,K,A]),Ot=d.useCallback((_,te,xe)=>{const Re=_.getBoundingClientRect();if(te>=wt.length||xe>=g)return;const ue=Re.width/n,he=hs(te,xe,n,r,c,cn,dt,l,_e,ut,g,P,C,wt,h);return ue!==1&&(he.x*=ue,he.y*=ue,he.width*=ue,he.height*=ue),he.x+=Re.x,he.y+=Re.y,he},[n,r,c,cn,dt,l,_e,ut,g,P,C,wt,h]),pt=d.useCallback((_,te,xe,Re)=>{const ue=_.getBoundingClientRect(),he=ue.width/n,Ue=(te-ue.left)/he,Ce=(xe-ue.top)/he,qe=5,gt=ds(wt,dt,n,void 0,_e);let un=0,Wt=0;const yt=typeof PointerEvent<"u"&&Re instanceof PointerEvent&&Re.pointerType==="mouse"||typeof MouseEvent<"u"&&Re instanceof MouseEvent,ot=typeof PointerEvent<"u"&&Re instanceof PointerEvent&&Re.pointerType==="touch"||typeof TouchEvent<"u"&&Re instanceof TouchEvent;yt&&(un=Re.button,Wt=Re.buttons);const Xe=Mv(Ue,gt,_e),at=Iv(Ce,r,w,s,c,g,h,l,ut,C),Vt=Re?.shiftKey===!0,co=Re?.ctrlKey===!0,Lr=Re?.metaKey===!0,Qt=[Ue<0?-1:n<Ue?1:0,Ce<cn?-1:r<Ce?1:0];let an;if(Xe===-1||Ce<0||Ue<0||at===void 0||Ue>n||Ce>r){const At=Ue>n?1:Ue<0?-1:0,Fn=Ce>r?1:Ce<0?-1:0;let fn=At*2,cr=Fn*2;At===0&&(fn=Xe===-1?To.EndPadding:To.Center),Fn===0&&(cr=at===void 0?To.EndPadding:To.Center);let dr=!1;if(Xe===-1&&at===-1){const Gt=Ot(_,wt.length-1,-1);Dn(Gt!==void 0),dr=te<Gt.x+Gt.width+qe}const it=Ue>n&&Ue<n+ls()||Ce>r&&Ce<r+ls();an={kind:xa,location:[Xe!==-1?Xe:Ue<0?0:wt.length-1,at??g-1],region:[fn,cr],shiftKey:Vt,ctrlKey:co,metaKey:Lr,isEdge:dr,isTouch:ot,button:un,buttons:Wt,scrollEdge:Qt,isMaybeScrollbar:it}}else if(at<=-1){let At=Ot(_,Xe,at);Dn(At!==void 0);let Fn=At!==void 0&&At.x+At.width-te<=qe;const fn=Xe-1;te-At.x<=qe&&fn>=0?(Fn=!0,At=Ot(_,fn,at),Dn(At!==void 0),an={kind:w&&at===-2?Xn:Sr,location:[fn,at],bounds:At,group:wt[fn].group??"",isEdge:Fn,shiftKey:Vt,ctrlKey:co,metaKey:Lr,isTouch:ot,localEventX:te-At.x,localEventY:xe-At.y,button:un,buttons:Wt,scrollEdge:Qt}):an={kind:w&&at===-2?Xn:Sr,group:wt[Xe].group??"",location:[Xe,at],bounds:At,isEdge:Fn,shiftKey:Vt,ctrlKey:co,metaKey:Lr,isTouch:ot,localEventX:te-At.x,localEventY:xe-At.y,button:un,buttons:Wt,scrollEdge:Qt}}else{const At=Ot(_,Xe,at);Dn(At!==void 0);const Fn=At!==void 0&&At.x+At.width-te<qe;let fn=!1;if(u!==!1&&u!==void 0&&S.current!==void 0){const cr=typeof u=="object"?{...ga,...u}:ga,dr=cr.size,it=dr/2,Gt=$h(S.current.range),er=Ot(_,Gt[0],Gt[1]);if(er!==void 0){const Oi=er.x+er.width+cr.offsetX-it+.5,hr=er.y+er.height+cr.offsetY-it+.5;fn=Math.abs(Oi-te)<dr&&Math.abs(hr-xe)<dr}}an={kind:"cell",location:[Xe,at],bounds:At,isEdge:Fn,shiftKey:Vt,ctrlKey:co,isFillHandle:fn,metaKey:Lr,isTouch:ot,localEventX:te-At.x,localEventY:xe-At.y,button:un,buttons:Wt,scrollEdge:Qt}}return an},[n,wt,dt,_e,r,w,s,c,g,h,l,ut,C,Ot,u,S,cn]),[bn]=ht??[],lr=d.useRef(()=>{}),Kn=d.useRef(ht);Kn.current=ht;const[B,Ne]=d.useMemo(()=>{const _=document.createElement("canvas"),te=document.createElement("canvas");return _.style.display="none",_.style.opacity="0",_.style.position="fixed",te.style.display="none",te.style.opacity="0",te.style.position="fixed",[_.getContext("2d",{alpha:!1}),te.getContext("2d",{alpha:!1})]},[]);d.useLayoutEffect(()=>{if(!(B===null||Ne===null))return document.documentElement.append(B.canvas),document.documentElement.append(Ne.canvas),()=>{B.canvas.remove(),Ne.canvas.remove()}},[B,Ne]);const We=d.useMemo(()=>new Hv,[]),Dt=Kt&&_t?1:Be&&_t?2:5,qt=ye?.disableMinimumCellWidth===!0?1:10,rn=d.useRef(),Rn=d.useRef(null),wn=d.useRef(null),jt=d.useCallback(()=>{const _=je.current,te=Mn.current;if(_===null||te===null||(Rn.current===null&&(Rn.current=_.getContext("2d",{alpha:!1}),_.width=0,_.height=0),wn.current===null&&(wn.current=te.getContext("2d",{alpha:!1}),te.width=0,te.height=0),Rn.current===null||wn.current===null||B===null||Ne===null))return;let xe=!1;const Re=Ue=>{xe=!0,ct(Ue)},ue=rn.current,he={headerCanvasCtx:wn.current,canvasCtx:Rn.current,bufferACtx:B,bufferBCtx:Ne,width:n,height:r,cellXOffset:dt,cellYOffset:l,translateX:Math.round(_e),translateY:Math.round(ut),mappedColumns:wt,enableGroups:w,freezeColumns:P,dragAndDropState:K,theme:Me,headerHeight:s,groupHeaderHeight:c,disabledRows:De??Qe.empty(),rowHeight:h,verticalBorder:$e,isResizing:V,resizeCol:L,isFocused:R,selection:S,fillHandle:u,drawCellCallback:ne,hasAppendRow:be,overrideCursor:Re,maxScaleFactor:Dt,freezeTrailingRows:C,rows:g,drawFocus:I,getCellContent:p,getGroupDetails:Ge??(Ue=>({name:Ue})),getRowThemeOverride:f,drawHeaderCallback:me,prelightCells:Et,highlightRegions:ge,imageLoader:bt,lastBlitData:kt,damage:Mt.current,hoverValues:ln.current,hoverInfo:Kn.current,spriteManager:nn,scrolling:_t,hyperWrapping:ye?.hyperWrapping??!1,touchMode:Tt,enqueue:lr.current,renderStateProvider:We,renderStrategy:ye?.renderStrategy??(wa.value?"double-buffer":"single-buffer"),getCellRenderer:Fe,minimumCellWidth:qt,resizeIndicator:ke};he.damage===void 0?(rn.current=he,Kc(he,ue)):Kc(he,void 0),!xe&&(he.damage===void 0||he.damage.has(Kn?.current?.[0]))&&ct(void 0)},[B,Ne,n,r,dt,l,_e,ut,wt,w,P,K,Me,s,c,De,h,$e,V,be,L,R,S,u,C,g,I,Dt,p,Ge,f,ne,me,Et,ge,bt,nn,_t,ye?.hyperWrapping,ye?.renderStrategy,Tt,We,Fe,qt,ke]),yn=d.useRef(jt);d.useLayoutEffect(()=>{jt(),yn.current=jt},[jt]),d.useLayoutEffect(()=>{(async()=>document?.fonts?.ready!==void 0&&(await document.fonts.ready,rn.current=void 0,yn.current()))()},[]);const xn=d.useCallback(_=>{Mt.current=_,yn.current(),Mt.current=void 0},[]),Qr=g1(xn);lr.current=Qr;const Gr=d.useCallback(_=>{xn(new pi(_.map(te=>te.cell)))},[xn]);bt.setCallback(xn);const[Jr,Ho]=d.useState(!1),[Ln,Qn]=bn??[],eo=Ln!==void 0&&Qn===-1&&Ln>=0&&Ln<wt.length&&wt[Ln].headerRowMarkerDisabled!==!0,to=Ln!==void 0&&Qn===-2;let _n=!1,no=!1,Nn=Ee;if(Nn===void 0&&Ln!==void 0&&Qn!==void 0&&Qn>-1&&Qn<g){const _=p([Ln,Qn],!0);_n=_.kind===$n.NewRow||_.kind===$n.Marker&&_.markerKind!=="number",no=_.kind===G.Boolean&&Es(_),Nn=_.cursor}const Ie=U?"grabbing":(mt??!1)||V?"col-resize":Jr||v?"crosshair":Nn!==void 0?Nn:eo||_n||no||to?"pointer":"default",dn=d.useMemo(()=>({contain:"strict",display:"block",cursor:Ie}),[Ie]),sr=d.useRef("default"),Hn=le?.current;Hn!=null&&sr.current!==dn.cursor&&(Hn.style.cursor=sr.current=dn.cursor);const on=d.useCallback((_,te,xe,Re)=>{if(Ge===void 0)return;const ue=Ge(_);if(ue.actions!==void 0){const he=rf(te,ue.actions);for(const[Ue,Ce]of he.entries())if(Wr(Ce,xe+te.x,Re+Ce.y))return ue.actions[Ue]}},[Ge]),gr=d.useCallback((_,te,xe,Re)=>{const ue=wt[te];if(!U&&!V&&!(mt??!1)){const he=Ot(_,te,-1);Dn(he!==void 0);const Ue=of(void 0,ue,he.x,he.y,he.width,he.height,Me,Ps(ue.title)==="rtl");if(ue.hasMenu===!0&&Ue.menuBounds!==void 0&&Wr(Ue.menuBounds,xe,Re))return{area:"menu",bounds:Ue.menuBounds};if(ue.indicatorIcon!==void 0&&Ue.indicatorIconBounds!==void 0&&Wr(Ue.indicatorIconBounds,xe,Re))return{area:"indicator",bounds:Ue.indicatorIconBounds}}},[wt,Ot,mt,U,V,Me]),ro=d.useRef(0),mr=d.useRef(),oo=d.useRef(!1),Ii=d.useCallback(_=>{const te=je.current,xe=le?.current;if(te===null||_.target!==te&&_.target!==xe)return;oo.current=!0;const Re=_.clientX,ue=_.clientY;if(_.target===xe&&xe!==null){const Ue=xe.getBoundingClientRect();if(Re>Ue.right||ue>Ue.bottom)return}const he=pt(te,Re,ue,_);mr.current=he.location,he.isTouch&&(ro.current=Date.now()),tn.current!==he.isTouch&&vn(he.isTouch),!(he.kind===Sr&&gr(te,he.location[0],Re,ue)!==void 0)&&(he.kind===Xn&&on(he.group,he.bounds,he.localEventX,he.localEventY)!==void 0||(M?.(he),!he.isTouch&&re!==!0&&re!==he.kind&&he.button<3&&he.button!==1&&_.preventDefault()))},[le,re,pt,on,gr,M]);Sn("pointerdown",Ii,$t,!1);const Dr=d.useRef(0),io=d.useCallback(_=>{const te=Dr.current;Dr.current=Date.now();const xe=je.current;if(oo.current=!1,D===void 0||xe===null)return;const Re=le?.current,ue=_.target!==xe&&_.target!==Re,he=_.clientX,Ue=_.clientY,Ce=_.pointerType==="mouse"?_.button<3:!0;let qe=pt(xe,he,Ue,_);qe.isTouch&&ro.current!==0&&Date.now()-ro.current>500&&(qe={...qe,isLongTouch:!0}),te!==0&&Date.now()-te<(qe.isTouch?1e3:500)&&(qe={...qe,isDoubleClick:!0}),tn.current!==qe.isTouch&&vn(qe.isTouch),!ue&&_.cancelable&&Ce&&_.preventDefault();const[gt]=qe.location,un=gr(xe,gt,he,Ue);if(qe.kind===Sr&&un!==void 0){(qe.button!==0||mr.current?.[0]!==gt||mr.current?.[1]!==-1)&&D(qe,!0);return}else if(qe.kind===Xn){const Wt=on(qe.group,qe.bounds,qe.localEventX,qe.localEventY);if(Wt!==void 0){qe.button===0&&Wt.onClick(qe);return}}D(qe,ue)},[D,le,pt,gr,on]);Sn("pointerup",io,$t,!1);const vr=d.useCallback(_=>{const te=je.current;if(te===null)return;const xe=le?.current,Re=_.target!==te&&_.target!==xe;let ue,he,Ue=!0;_ instanceof MouseEvent?(ue=_.clientX,he=_.clientY,Ue=_.button<3):(ue=_.changedTouches[0].clientX,he=_.changedTouches[0].clientY);const Ce=pt(te,ue,he,_);tn.current!==Ce.isTouch&&vn(Ce.isTouch),!Re&&_.cancelable&&Ue&&_.preventDefault();const[qe]=Ce.location;if(Ce.kind===Sr){const gt=gr(te,qe,ue,he);gt!==void 0&&Ce.button===0&&mr.current?.[0]===qe&&mr.current?.[1]===-1&&(gt.area==="menu"?m?.(qe,gt.bounds):gt.area==="indicator"&&y?.(qe,gt.bounds))}},[le,pt,gr,m,y]);Sn("click",vr,$t,!1);const ao=d.useCallback(_=>{const te=je.current,xe=le?.current;if(te===null||_.target!==te&&_.target!==xe||T===void 0)return;const Re=pt(te,_.clientX,_.clientY,_);T(Re,()=>{_.cancelable&&_.preventDefault()})},[le,pt,T]);Sn("contextmenu",ao,le?.current??null,!1);const Ri=d.useCallback(_=>{Mt.current=new pi(_.map(te=>te.item)),ln.current=_,yn.current(),Mt.current=void 0},[]),Fo=d.useMemo(()=>new h1(Ri),[Ri]),ze=d.useRef(Fo);ze.current=Fo,d.useLayoutEffect(()=>{const _=ze.current;if(bn===void 0||bn[1]<0){_.setHovered(bn);return}const te=p(bn,!0),xe=Fe(te),Re=xe===void 0&&te.kind===G.Custom||xe?.needsHover!==void 0&&(typeof xe.needsHover=="boolean"?xe.needsHover:xe.needsHover(te));_.setHovered(Re?bn:void 0)},[p,Fe,bn]);const zo=d.useRef(),Va=d.useCallback(_=>{const te=je.current;if(te===null)return;const xe=le?.current,Re=_.target!==te&&_.target!==xe,ue=pt(te,_.clientX,_.clientY,_);if(ue.kind!=="out-of-bounds"&&Re&&!oo.current&&!ue.isTouch)return;const he=(Ce,qe)=>{Bt(gt=>gt===Ce||gt?.[0][0]===Ce?.[0][0]&>?.[0][1]===Ce?.[0][1]&&(gt?.[1][0]===Ce?.[1][0]&>?.[1][1]===Ce?.[1][1]||!qe)?gt:Ce)};if(!sf(ue,zo.current))ct(void 0),$?.(ue),he(ue.kind===xa?void 0:[ue.location,[ue.localEventX,ue.localEventY]],!0),zo.current=ue;else if(ue.kind==="cell"||ue.kind===Sr||ue.kind===Xn){let Ce=!1,qe=!0;if(ue.kind==="cell"){const un=p(ue.location);qe=Fe(un)?.needsHoverPosition??un.kind===G.Custom,Ce=qe}else Ce=!0;const gt=[ue.location,[ue.localEventX,ue.localEventY]];he(gt,qe),Kn.current=gt,Ce&&xn(new pi([ue.location]))}const Ue=ue.location[0]>=(ie?0:1);sn(ue.kind===Sr&&ue.isEdge&&Ue&&se===!0),Ho(ue.kind==="cell"&&ue.isFillHandle),k?.(_),Y(ue)},[le,pt,ie,se,k,Y,$,p,Fe,xn]);Sn("pointermove",Va,$t,!0);const Pr=d.useCallback(_=>{const te=je.current;if(te===null)return;let xe,Re;S.current!==void 0&&(xe=Ot(te,S.current.cell[0],S.current.cell[1]),Re=S.current.cell),ee?.({bounds:xe,stopPropagation:()=>_.stopPropagation(),preventDefault:()=>_.preventDefault(),cancel:()=>{},ctrlKey:_.ctrlKey,metaKey:_.metaKey,shiftKey:_.shiftKey,altKey:_.altKey,key:_.key,keyCode:_.keyCode,rawEvent:_,location:Re})},[ee,S,Ot]),$a=d.useCallback(_=>{const te=je.current;if(te===null)return;let xe,Re;S.current!==void 0&&(xe=Ot(te,S.current.cell[0],S.current.cell[1]),Re=S.current.cell),Q?.({bounds:xe,stopPropagation:()=>_.stopPropagation(),preventDefault:()=>_.preventDefault(),cancel:()=>{},ctrlKey:_.ctrlKey,metaKey:_.metaKey,shiftKey:_.shiftKey,altKey:_.altKey,key:_.key,keyCode:_.keyCode,rawEvent:_,location:Re})},[Q,S,Ot]),Gn=d.useCallback(_=>{if(je.current=_,oe!==void 0&&(oe.current=_),ye?.eventTarget)ft.current=ye.eventTarget;else if(_===null)ft.current=window;else{const te=_.getRootNode();te===document&&(ft.current=window),ft.current=te}},[oe,ye?.eventTarget]),Vo=d.useCallback(_=>{const te=je.current;if(te===null||re===!1||V){_.preventDefault();return}let xe,Re;const ue=pt(te,_.clientX,_.clientY);if(re!==!0&&ue.kind!==re){_.preventDefault();return}const he=(Wt,yt)=>{xe=Wt,Re=yt};let Ue,Ce,qe;const gt=(Wt,yt,ot)=>{Ue=Wt,Ce=yt,qe=ot};let un=!1;if(de?.({...ue,setData:he,setDragImage:gt,preventDefault:()=>un=!0,defaultPrevented:()=>un}),!un&&xe!==void 0&&Re!==void 0&&_.dataTransfer!==null)if(_.dataTransfer.setData(xe,Re),_.dataTransfer.effectAllowed="copyLink",Ue!==void 0&&Ce!==void 0&&qe!==void 0)_.dataTransfer.setDragImage(Ue,Ce,qe);else{const[Wt,yt]=ue.location;if(yt!==void 0){const ot=document.createElement("canvas"),Xe=Ot(te,Wt,yt);Dn(Xe!==void 0);const at=Math.ceil(window.devicePixelRatio??1);ot.width=Xe.width*at,ot.height=Xe.height*at;const Vt=ot.getContext("2d");Vt!==null&&(Vt.scale(at,at),Vt.textBaseline="middle",yt===-1?(Vt.font=Me.headerFontFull,Vt.fillStyle=Me.bgHeader,Vt.fillRect(0,0,ot.width,ot.height),af(Vt,0,0,Xe.width,Xe.height,wt[Wt],!1,Me,!1,void 0,void 0,!1,0,nn,me,!1)):(Vt.font=Me.baseFontFull,Vt.fillStyle=Me.bgCell,Vt.fillRect(0,0,ot.width,ot.height),nf(Vt,p([Wt,yt]),0,yt,!1,!1,0,0,Xe.width,Xe.height,!1,Me,Me.bgCell,bt,nn,1,void 0,!1,0,void 0,void 0,void 0,We,Fe,()=>{}))),ot.style.left="-100%",ot.style.position="absolute",ot.style.width=`${Xe.width}px`,ot.style.height=`${Xe.height}px`,document.body.append(ot),_.dataTransfer.setDragImage(ot,Xe.width/2,Xe.height/2),window.setTimeout(()=>{ot.remove()},0)}}else _.preventDefault()},[re,V,pt,de,Ot,Me,wt,nn,me,p,bt,We,Fe]);Sn("dragstart",Vo,le?.current??null,!1,!1);const lo=d.useRef(),Ei=d.useCallback(_=>{const te=je.current;if(we!==void 0&&_.preventDefault(),te===null||ce===void 0)return;const xe=pt(te,_.clientX,_.clientY),[Re,ue]=xe.location,he=Re-(ie?0:1),[Ue,Ce]=lo.current??[];(Ue!==he||Ce!==ue)&&(lo.current=[he,ue],ce([he,ue],_.dataTransfer))},[ie,pt,ce,we]);Sn("dragover",Ei,le?.current??null,!1,!1);const _a=d.useCallback(()=>{lo.current=void 0,pe?.()},[pe]);Sn("dragend",_a,le?.current??null,!1,!1);const Na=d.useCallback(_=>{const te=je.current;if(te===null||we===void 0)return;_.preventDefault();const xe=pt(te,_.clientX,_.clientY),[Re,ue]=xe.location,he=Re-(ie?0:1);we([he,ue],_.dataTransfer)},[ie,pt,we]);Sn("drop",Na,le?.current??null,!1,!1);const Jn=d.useCallback(()=>{Le?.()},[Le]);Sn("dragleave",Jn,le?.current??null,!1,!1);const ur=d.useRef(S);ur.current=S;const Cn=d.useRef(null),W=d.useCallback(_=>{je.current===null||!je.current.contains(document.activeElement)||(_===null&&ur.current.current!==void 0?oe?.current?.focus({preventScroll:!0}):_!==null&&_.focus({preventScroll:!0}),Cn.current=_)},[oe]);d.useImperativeHandle(t,()=>({focus:()=>{const _=Cn.current;_===null||!document.contains(_)?oe?.current?.focus({preventScroll:!0}):_.focus({preventScroll:!0})},getBounds:(_,te)=>{if(!(oe===void 0||oe.current===null))return Ot(oe.current,_??0,te??-1)},damage:Gr,getMouseArgsForPosition:(_,te,xe)=>{if(!(oe===void 0||oe.current===null))return pt(oe.current,_,te,xe)}}),[oe,Gr,Ot,pt]);const Ht=d.useRef(),Ar=S0(()=>{if(n<50||ye?.disableAccessibilityTree===!0)return null;let _=ds(wt,dt,n,K,_e);const te=ie?0:-1;!ie&&_[0]?.sourceIndex===0&&(_=_.slice(1));const[xe,Re]=S.current?.cell??[],ue=S.current?.range,he=_.map(Ce=>Ce.sourceIndex),Ue=Ir(l,Math.min(g,l+o));return xe!==void 0&&Re!==void 0&&!(he.includes(xe)&&Ue.includes(Re))&&W(null),d.createElement("table",{key:"access-tree",role:"grid","aria-rowcount":g+1,"aria-multiselectable":"true","aria-colcount":wt.length+te},d.createElement("thead",{role:"rowgroup"},d.createElement("tr",{role:"row","aria-rowindex":1},_.map(Ce=>d.createElement("th",{role:"columnheader","aria-selected":S.columns.hasIndex(Ce.sourceIndex),"aria-colindex":Ce.sourceIndex+1+te,tabIndex:-1,onFocus:qe=>{if(qe.target!==Cn.current)return ve?.([Ce.sourceIndex,-1])},key:Ce.sourceIndex},Ce.title)))),d.createElement("tbody",{role:"rowgroup"},Ue.map(Ce=>d.createElement("tr",{role:"row","aria-selected":S.rows.hasIndex(Ce),key:Ce,"aria-rowindex":Ce+2},_.map(qe=>{const gt=qe.sourceIndex,un=Yn(gt,Ce),Wt=xe===gt&&Re===Ce,yt=ue!==void 0&>>=ue.x&><ue.x+ue.width&&Ce>=ue.y&&Ce<ue.y+ue.height,ot=`glide-cell-${gt}-${Ce}`,Xe=[gt,Ce],at=p(Xe,!0);return d.createElement("td",{key:un,role:"gridcell","aria-colindex":gt+1+te,"aria-selected":yt,"aria-readonly":Ro(at)||!Mo(at),id:ot,"data-testid":ot,onClick:()=>{const Vt=oe?.current;if(Vt!=null)return ee?.({bounds:Ot(Vt,gt,Ce),cancel:()=>{},preventDefault:()=>{},stopPropagation:()=>{},ctrlKey:!1,key:"Enter",keyCode:13,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:Xe})},onFocusCapture:Vt=>{if(!(Vt.target===Cn.current||Ht.current?.[0]===gt&&Ht.current?.[1]===Ce))return Ht.current=Xe,ve?.(Xe)},ref:Wt?W:void 0,tabIndex:-1},m1(at,Fe))})))))},[n,wt,dt,K,_e,g,l,o,S,W,p,oe,ee,Ot,ve],200),so=P===0||!A?0:dt>P?1:Vn(-_e/100,0,1),Ti=-l*32+ut,uo=O?Vn(-Ti/100,0,1):0,Ba=d.useMemo(()=>{if(!so&&!uo)return null;const _={position:"absolute",top:0,left:In,width:n-In,height:r,opacity:so,pointerEvents:"none",transition:rt?void 0:"opacity 0.2s",boxShadow:"inset 13px 0 10px -13px rgba(0, 0, 0, 0.2)"},te={position:"absolute",top:cn,left:0,width:n,height:r,opacity:uo,pointerEvents:"none",transition:Pe?void 0:"opacity 0.2s",boxShadow:"inset 0 13px 10px -13px rgba(0, 0, 0, 0.2)"};return d.createElement(d.Fragment,null,so>0&&d.createElement("div",{id:"shadow-x",style:_}),uo>0&&d.createElement("div",{id:"shadow-y",style:te}))},[so,uo,In,n,rt,cn,r,Pe]),Z=d.useMemo(()=>({position:"absolute",top:0,left:0}),[]);return d.createElement(d.Fragment,null,d.createElement("canvas",{"data-testid":"data-grid-canvas",tabIndex:0,onKeyDown:Pr,onKeyUp:$a,onFocus:x,onBlur:E,ref:Gn,style:dn},Ar),d.createElement("canvas",{ref:Mn,style:Z}),Ba)},b1=d.memo(d.forwardRef(v1));function ii(e,t,n,r){return Vn(Math.round(t-(e.growOffset??0)),Math.ceil(n),Math.floor(r))}const w1=e=>{const[t,n]=d.useState(),[r,o]=d.useState(),[i,a]=d.useState(),[l,s]=d.useState(),[u,c]=d.useState(!1),[h,g]=d.useState(),[p,f]=d.useState(),[m,y]=d.useState(),[w,v]=d.useState(!1),[x,E]=d.useState(),{onHeaderMenuClick:R,onHeaderIndicatorClick:S,getCellContent:P,onColumnMoved:T,onColumnResize:C,onColumnResizeStart:A,onColumnResizeEnd:O,gridRef:I,maxColumnWidth:M,minColumnWidth:D,onRowMoved:k,lockColumns:Y,onColumnProposeMove:$,onMouseDown:K,onMouseUp:ie,onItemHovered:ee,onDragStart:Q,canvasRef:ge}=e,oe=(C??O??A)!==void 0,{columns:de,selection:pe}=e,le=pe.columns,V=d.useCallback(ne=>{const[me,ve]=ne.location;i!==void 0&&l!==me&&me>=Y?(c(!0),s(me)):p!==void 0&&ve!==void 0?(v(!0),y(Math.max(0,ve))):r===void 0&&!u&&!w&&ee?.(ne)},[i,p,l,ee,Y,r,u,w]),L=T!==void 0,U=d.useCallback(ne=>{if(ne.button===0){const[me,ve]=ne.location;if(ne.kind==="out-of-bounds"&&ne.isEdge&&oe){const ce=I?.current?.getBounds(de.length-1,-1);ce!==void 0&&(n(ce.x),o(de.length-1))}else if(ne.kind==="header"&&me>=Y){const ce=ge?.current;if(ne.isEdge&&oe&&ce){n(ne.bounds.x),o(me);const we=ce.getBoundingClientRect().width/ce.offsetWidth,Le=ne.bounds.width/we;A?.(de[me],Le,me,Le+(de[me].growOffset??0))}else ne.kind==="header"&&L&&(g(ne.bounds.x),a(me))}else ne.kind==="cell"&&Y>0&&me===0&&ve!==void 0&&k!==void 0&&(E(ne.bounds.y),f(ve))}K?.(ne)},[K,oe,Y,k,I,de,L,A,ge]),re=d.useCallback((ne,me)=>{u||w||R?.(ne,me)},[u,w,R]),se=d.useCallback((ne,me)=>{u||w||S?.(ne,me)},[u,w,S]),De=d.useRef(-1),be=d.useCallback(()=>{De.current=-1,f(void 0),y(void 0),E(void 0),v(!1),a(void 0),s(void 0),g(void 0),c(!1),o(void 0),n(void 0)},[]),Ge=d.useCallback((ne,me)=>{if(ne.button===0){if(r!==void 0){if(le?.hasIndex(r)===!0)for(const ce of le){if(ce===r)continue;const we=de[ce],Le=ii(we,De.current,D,M);C?.(we,Le,ce,Le+(we.growOffset??0))}const ve=ii(de[r],De.current,D,M);if(O?.(de[r],ve,r,ve+(de[r].growOffset??0)),le.hasIndex(r))for(const ce of le){if(ce===r)continue;const we=de[ce],Le=ii(we,De.current,D,M);O?.(we,Le,ce,Le+(we.growOffset??0))}}be(),i!==void 0&&l!==void 0&&$?.(i,l)!==!1&&T?.(i,l),p!==void 0&&m!==void 0&&k?.(p,m)}ie?.(ne,me)},[ie,r,i,l,p,m,le,O,de,D,M,C,T,k,be,$]),Me=d.useMemo(()=>{if(!(i===void 0||l===void 0)&&i!==l&&$?.(i,l)!==!1)return{src:i,dest:l}},[i,l,$]),Et=d.useCallback(ne=>{const me=ge?.current;if(i!==void 0&&h!==void 0)Math.abs(ne.clientX-h)>20&&c(!0);else if(p!==void 0&&x!==void 0)Math.abs(ne.clientY-x)>20&&v(!0);else if(r!==void 0&&t!==void 0&&me){const ve=me.getBoundingClientRect().width/me.offsetWidth,ce=(ne.clientX-t)/ve,we=de[r],Le=ii(we,ce,D,M);if(C?.(we,Le,r,Le+(we.growOffset??0)),De.current=ce,le?.first()===r)for(const He of le){if(He===r)continue;const rt=de[He],Pe=ii(rt,De.current,D,M);C?.(rt,Pe,He,Pe+(rt.growOffset??0))}}},[i,h,p,x,r,t,de,D,M,C,le,ge]),st=d.useCallback((ne,me)=>{if(p===void 0||m===void 0)return P(ne,me);let[ve,ce]=ne;return ce===m?ce=p:(ce>m&&(ce-=1),ce>=p&&(ce+=1)),P([ve,ce],me)},[p,m,P]),$e=d.useCallback(ne=>{Q?.(ne),ne.defaultPrevented()||be()},[be,Q]);return d.createElement(b1,{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:st,isResizing:r!==void 0,onHeaderMenuClick:re,onHeaderIndicatorClick:se,isDragging:u,onItemHovered:V,onDragStart:$e,onMouseDown:U,allowResize:oe,onMouseUp:Ge,dragAndDropState:Me,onMouseMoveRaw:Et,ref:I})};function y1(e){const t=d.useRef(null),[n,r]=d.useState({width:e?.[0],height:e?.[1]});return d.useLayoutEffect(()=>{const o=a=>{for(const l of a){const{width:s,height:u}=l&&l.contentRect||{};r(c=>c.width===s&&c.height===u?c:{width:s,height:u})}},i=new window.ResizeObserver(o);return t.current&&i.observe(t.current,void 0),()=>{i.disconnect()}},[t.current]),{ref:t,...n}}const x1=(e,t,n)=>{const r=d.useRef(null),o=d.useRef(null),i=d.useRef(null),a=d.useRef(0),l=d.useRef(t);l.current=t;const s=n.current;d.useEffect(()=>{const u=()=>{if(o.current===!1&&s!==null){const g=[s.scrollLeft,s.scrollTop];if(i.current?.[0]===g[0]&&i.current?.[1]===g[1])if(a.current>10){i.current=null,o.current=null;return}else a.current++;else a.current=0,l.current(g[0],g[1]),i.current=g;r.current=window.setTimeout(u,8.333333333333334)}},c=()=>{o.current=!0,i.current=null,r.current!==null&&(window.clearTimeout(r.current),r.current=null)},h=g=>{g.touches.length===0&&(o.current=!1,a.current=0,r.current=window.setTimeout(u,8.333333333333334))};if(e&&s!==null){const g=s;return g.addEventListener("touchstart",c),g.addEventListener("touchend",h),()=>{g.removeEventListener("touchstart",c),g.removeEventListener("touchend",h),r.current!==null&&window.clearTimeout(r.current)}}},[e,s])},C1=()=>e=>e.isSafari?"scroll":"auto",k1=hn("div")({name:"ScrollRegionStyle",class:"gdg-s1dgczr6",propsAsIs:!1,vars:{"s1dgczr6-0":[C1()]}}),S1=33554400,M1=5e6;function I1(e){const[t,n]=d.useState(!1),r=typeof window>"u"?null:window,o=d.useRef(0);return Sn("touchstart",d.useCallback(()=>{window.clearTimeout(o.current),n(!0)},[]),r,!0,!1),Sn("touchend",d.useCallback(i=>{i.touches.length===0&&(o.current=window.setTimeout(()=>n(!1),e))},[e]),r,!0,!1),t}const R1=e=>{const{children:t,clientHeight:n,scrollHeight:r,scrollWidth:o,update:i,draggable:a,className:l,preventDiagonalScrolling:s=!1,paddingBottom:u=0,paddingRight:c=0,rightElement:h,rightElementProps:g,kineticScrollPerfHack:p=!1,scrollRef:f,initialSize:m}=e,y=[],w=g?.sticky??!1,v=g?.fill??!1,x=d.useRef(0),E=d.useRef(0),R=d.useRef(null),S=typeof window>"u"?1:window.devicePixelRatio,P=d.useRef(S);d.useEffect(()=>{if(P.current!==S){x.current=0,E.current=0,P.current=S;const pe=R.current;pe!==null&&k.current(pe.scrollLeft,pe.scrollTop)}},[S]);const T=d.useRef({scrollLeft:0,scrollTop:0,lockDirection:void 0}),C=d.useRef(null),A=I1(200),[O,I]=d.useState(!0),M=d.useRef(0);d.useLayoutEffect(()=>{if(!O||A||T.current.lockDirection===void 0)return;const pe=R.current;if(pe===null)return;const[le,V]=T.current.lockDirection;le!==void 0?pe.scrollLeft=le:V!==void 0&&(pe.scrollTop=V),T.current.lockDirection=void 0},[A,O]);const D=d.useCallback((pe,le)=>{const V=R.current;if(V===null)return;le=le??V.scrollTop,pe=pe??V.scrollLeft;const L=T.current.scrollTop,U=T.current.scrollLeft,re=pe-U,se=le-L;A&&re!==0&&se!==0&&(Math.abs(re)>3||Math.abs(se)>3)&&s&&T.current.lockDirection===void 0&&(T.current.lockDirection=Math.abs(re)<Math.abs(se)?[U,void 0]:[void 0,L]);const De=T.current.lockDirection;pe=De?.[0]??pe,le=De?.[1]??le,T.current.scrollLeft=pe,T.current.scrollTop=le;const be=V.clientWidth,Ge=V.clientHeight,Me=le,Et=E.current-Me,st=V.scrollHeight-Ge;E.current=Me;let $e;if(st>0&&r>V.scrollHeight+5)if(Math.abs(Et)>2e3||Me===0||Me===st){const ne=Math.max(0,Math.min(1,Me/st)),me=r-Ge;$e=ne*me,x.current=$e}else x.current-=Et,$e=x.current;else $e=Me,x.current=$e;$e=Math.max(0,Math.min($e,r-Ge)),x.current=$e,De!==void 0&&(window.clearTimeout(M.current),I(!1),M.current=window.setTimeout(()=>I(!0),200)),i({x:pe,y:$e,width:be-c,height:Ge-u,paddingRight:C.current?.clientWidth??0})},[u,c,r,i,s,A]);x1(p&&wa.value,D,R);const k=d.useRef(D);k.current=D;const Y=d.useRef(),$=d.useRef(!1);d.useLayoutEffect(()=>{$.current?D():$.current=!0},[D,u,c]);const K=d.useCallback(pe=>{R.current=pe,f!==void 0&&(f.current=pe)},[f]);let ie=0,ee=0;const Q=Math.min(r,S1);for(y.push(d.createElement("div",{key:ie++,style:{width:o,height:0}}));ee<Q;){const pe=Math.min(M1,Q-ee);y.push(d.createElement("div",{key:ie++,style:{width:0,height:pe}})),ee+=pe}const{ref:ge,width:oe,height:de}=y1(m);return typeof window<"u"&&(Y.current?.height!==de||Y.current?.width!==oe)&&(window.setTimeout(()=>k.current(),0),Y.current={width:oe,height:de}),(oe??0)===0||(de??0)===0?d.createElement("div",{ref:ge}):d.createElement("div",{ref:ge},d.createElement(k1,{isSafari:wa.value},d.createElement("div",{className:"dvn-underlay"},t),d.createElement("div",{ref:K,style:Y.current,draggable:a,onDragStart:pe=>{a||(pe.stopPropagation(),pe.preventDefault())},className:"dvn-scroller "+(l??""),onScroll:()=>D()},d.createElement("div",{className:"dvn-scroll-inner"+(h===void 0?" dvn-hidden":"")},d.createElement("div",{className:"dvn-stack"},y),h!==void 0&&d.createElement(d.Fragment,null,!v&&d.createElement("div",{className:"dvn-spacer"}),d.createElement("div",{ref:C,style:{height:de,maxHeight:n-Math.ceil(S%1),position:"sticky",top:0,paddingLeft:1,marginBottom:-40,marginRight:c,flexGrow:v?1:void 0,right:w?c??0:void 0,pointerEvents:"auto"}},h))))))},E1=e=>{const{columns:t,rows:n,rowHeight:r,headerHeight:o,groupHeaderHeight:i,enableGroups:a,freezeColumns:l,experimental:s,nonGrowWidth:u,clientSize:c,className:h,onVisibleRegionChanged:g,scrollRef:p,preventDiagonalScrolling:f,rightElement:m,rightElementProps:y,overscrollX:w,overscrollY:v,initialSize:x,smoothScrollX:E=!1,smoothScrollY:R=!1,isDraggable:S}=e,{paddingRight:P,paddingBottom:T}=s??{},[C,A]=c,O=d.useRef(),I=d.useRef(),M=d.useRef(),D=d.useRef(),k=u+Math.max(0,w??0);let Y=a?o+i:o;if(typeof r=="number")Y+=n*r;else for(let ee=0;ee<n;ee++)Y+=r(ee);v!==void 0&&(Y+=v);const $=d.useRef(),K=d.useCallback(()=>{if($.current===void 0)return;const ee={...$.current};let Q=0,ge=ee.x<0?-ee.x:0,oe=0,de=0;ee.x=ee.x<0?0:ee.x;let pe=0;for(let se=0;se<l;se++)pe+=t[se].width;for(const se of t){const De=Q-pe;if(ee.x>=De+se.width)Q+=se.width,de++,oe++;else if(ee.x>De)Q+=se.width,E?ge+=De-ee.x:de++,oe++;else if(ee.x+ee.width>De)Q+=se.width,oe++;else break}let le=0,V=0,L=0;if(typeof r=="number")R?(V=Math.floor(ee.y/r),le=V*r-ee.y):V=Math.ceil(ee.y/r),L=Math.ceil(ee.height/r)+V,le<0&&L++;else{let se=0;for(let De=0;De<n;De++){const be=r(De),Ge=se+(R?0:be/2);if(ee.y>=se+be)se+=be,V++,L++;else if(ee.y>Ge)se+=be,R?le+=Ge-ee.y:V++,L++;else if(ee.y+ee.height>be/2+se)se+=be,L++;else break}}V=Math.max(0,Math.min(V,n-1)),L=Math.max(V,Math.min(L,n));const U={x:de,y:V,width:oe-de,height:L-V},re=O.current;(re===void 0||re.y!==U.y||re.x!==U.x||re.height!==U.height||re.width!==U.width||I.current!==ge||M.current!==le||ee.width!==D.current?.[0]||ee.height!==D.current?.[1])&&(g?.({x:de,y:V,width:oe-de,height:L-V},ee.width,ee.height,ee.paddingRight??0,ge,le),O.current=U,I.current=ge,M.current=le,D.current=[ee.width,ee.height])},[t,r,n,g,l,E,R]),ie=d.useCallback(ee=>{$.current=ee,K()},[K]);return d.useEffect(()=>{K()},[K]),d.createElement(R1,{scrollRef:p,className:h,kineticScrollPerfHack:s?.kineticScrollPerfHack,preventDiagonalScrolling:f,draggable:S===!0||typeof S=="string",scrollWidth:k+(P??0),scrollHeight:Y+(T??0),clientHeight:A,rightElement:m,paddingBottom:T,paddingRight:P,rightElementProps:y,update:ie,initialSize:x},d.createElement(w1,{eventTargetRef:p,width:C,height:A,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}))},T1=hn("div")({name:"SearchWrapper",class:"gdg-seveqep",propsAsIs:!1}),O1=d.createElement("svg",{className:"button-icon",viewBox:"0 0 512 512"},d.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M112 244l144-144 144 144M256 120v292"})),D1=d.createElement("svg",{className:"button-icon",viewBox:"0 0 512 512"},d.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M112 268l144 144 144-144M256 392V100"})),P1=d.createElement("svg",{className:"button-icon",viewBox:"0 0 512 512"},d.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M368 368L144 144M368 144L144 368"})),A1=10,L1=e=>{const{canvasRef:t,cellYOffset:n,rows:r,columns:o,searchInputRef:i,searchValue:a,searchResults:l,onSearchValueChange:s,getCellsForSelection:u,onSearchResultsChanged:c,showSearch:h=!1,onSearchClose:g}=e,[p]=d.useState(()=>"search-box-"+Math.round(Math.random()*1e3)),[f,m]=d.useState(""),y=a??f,w=d.useCallback(Q=>{m(Q),s?.(Q)},[s]),[v,x]=d.useState(),E=d.useRef(v);E.current=v,d.useEffect(()=>{l!==void 0&&(l.length>0?x(Q=>({rowsSearched:r,results:l.length,selectedIndex:Q?.selectedIndex??-1})):x(void 0))},[r,l]);const R=d.useRef();R.current===void 0&&(R.current=new AbortController);const S=d.useRef(),[P,T]=d.useState([]),C=l??P,A=d.useCallback(()=>{S.current!==void 0&&(window.cancelAnimationFrame(S.current),S.current=void 0),R.current!==void 0&&R.current.abort(),R.current=new AbortController},[]),O=d.useRef(n);O.current=n;const I=d.useCallback(Q=>{const ge=new RegExp(Q.replace(/([$()*+.?[\\\]^{|}-])/g,"\\$1"),"i");let oe=O.current,de=Math.min(10,r),pe=0;x(void 0),T([]);const le=[],V=async()=>{if(u===void 0)return;const L=performance.now(),U=r-pe;let re=u({x:0,y:oe,width:o.length,height:Math.min(de,U,r-oe)},R.current.signal);typeof re=="function"&&(re=await re());let se=!1;for(const[st,$e]of re.entries())for(const[ne,me]of $e.entries()){let ve;switch(me.kind){case G.Text:case G.Number:ve=me.displayData;break;case G.Uri:case G.Markdown:ve=me.data;break;case G.Boolean:ve=typeof me.data=="boolean"?me.data.toString():void 0;break;case G.Image:case G.Bubble:ve=me.data.join("🐳");break;case G.Custom:ve=me.copyData;break}ve!==void 0&&ge.test(ve)&&(le.push([ne,st+oe]),se=!0)}const De=performance.now();se&&T([...le]),pe+=re.length,Dn(pe<=r);const be=E.current?.selectedIndex??-1;x({results:le.length,rowsSearched:pe,selectedIndex:be}),c?.(le,be),oe+de>=r?oe=0:oe+=de;const Ge=De-L,Me=Math.max(Ge,1),Et=A1/Me;de=Math.ceil(de*Et),pe<r&&le.length<1e3&&(S.current=window.requestAnimationFrame(V))};A(),S.current=window.requestAnimationFrame(V)},[A,o.length,u,c,r]),M=d.useCallback(()=>{g?.(),x(void 0),T([]),c?.([],-1),A(),t?.current?.focus()},[A,t,g,c]),D=d.useCallback(Q=>{w(Q.target.value),l===void 0&&(Q.target.value===""?(x(void 0),T([]),A()):I(Q.target.value))},[I,A,w,l]);d.useEffect(()=>{i.current!==null&&(w(""),x(void 0),P.length>0&&(T([]),c?.([],-1)),h?i.current.focus({preventScroll:!0}):A())},[h,i]);const k=d.useCallback(Q=>{if(Q?.stopPropagation?.(),v===void 0||v.results===0)return;const ge=(v.selectedIndex+1)%v.results;x({...v,selectedIndex:ge}),c?.(C,ge)},[v,c,C]),Y=d.useCallback(Q=>{if(Q?.stopPropagation?.(),v===void 0||v.results===0)return;let ge=(v.selectedIndex-1)%v.results;ge<0&&(ge+=v.results),x({...v,selectedIndex:ge}),c?.(C,ge)},[c,C,v]),$=d.useCallback(Q=>{(Q.ctrlKey||Q.metaKey)&&Q.nativeEvent.code==="KeyF"||Q.key==="Escape"?(M(),Q.stopPropagation(),Q.preventDefault()):Q.key==="Enter"&&(Q.shiftKey?Y():k())},[M,k,Y]);d.useEffect(()=>()=>{A()},[A]);const[K,ie]=d.useState(!1);d.useEffect(()=>{if(h)ie(!0);else{const Q=setTimeout(()=>ie(!1),150);return()=>clearTimeout(Q)}},[h]);const ee=d.useMemo(()=>{if(!h&&!K)return null;let Q;v!==void 0&&(Q=v.results>=1e3?"over 1000":`${v.results} result${v.results!==1?"s":""}`,v.selectedIndex>=0&&(Q=`${v.selectedIndex+1} of ${Q}`));const ge=de=>{de.stopPropagation()},oe={width:`${r>0?Math.floor((v?.rowsSearched??0)/r*100):0}%`};return d.createElement(T1,{className:"gdg-search-bar"+(h?"":" out"),onMouseDown:ge,onMouseMove:ge,onMouseUp:ge,onClick:ge},d.createElement("div",{className:"gdg-search-bar-inner"},d.createElement("input",{id:p,"aria-hidden":!h,"data-testid":"search-input",ref:i,onChange:D,value:y,tabIndex:h?void 0:-1,onKeyDownCapture:$}),d.createElement("button",{type:"button","aria-label":"Previous Result","aria-hidden":!h,tabIndex:h?void 0:-1,onClick:Y,disabled:(v?.results??0)===0},O1),d.createElement("button",{type:"button","aria-label":"Next Result","aria-hidden":!h,tabIndex:h?void 0:-1,onClick:k,disabled:(v?.results??0)===0},D1),g!==void 0&&d.createElement("button",{type:"button","aria-label":"Close Search","aria-hidden":!h,"data-testid":"search-close-button",tabIndex:h?void 0:-1,onClick:M},P1)),v!==void 0?d.createElement(d.Fragment,null,d.createElement("div",{className:"gdg-search-status"},d.createElement("div",{"data-testid":"search-result-area"},Q)),d.createElement("div",{className:"gdg-search-progress",style:oe})):d.createElement("div",{className:"gdg-search-status"},d.createElement("label",{htmlFor:p},"Type to search")))},[h,K,v,r,p,i,D,y,$,Y,k,g,M]);return d.createElement(d.Fragment,null,d.createElement(E1,{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}),ee)};class H1 extends d.PureComponent{wrapperRef=d.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,...o}=this.props;return d.createElement("div",{...o,ref:this.wrapperRef},this.props.children)}}const F1=()=>e=>Math.max(16,e.targetHeight-10),z1=hn("input")({name:"RenameInput",class:"gdg-r17m35ur",propsAsIs:!1,vars:{"r17m35ur-0":[F1(),"px"]}}),V1=e=>{const{bounds:t,group:n,onClose:r,canvasBounds:o,onFinish:i}=e,[a,l]=Ct.useState(n);return Ct.createElement(H1,{style:{position:"absolute",left:t.x-o.left+1,top:t.y-o.top,width:t.width-2,height:t.height},className:"gdg-c1tqibwd",onClickOutside:r},Ct.createElement(z1,{targetHeight:t.height,"data-testid":"group-rename-input",value:a,onBlur:r,onFocus:s=>s.target.setSelectionRange(0,a.length),onChange:s=>l(s.target.value),onKeyDown:s=>{s.key==="Enter"?i(a):s.key==="Escape"&&r()},autoFocus:!0}))};function $1(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 et(e,t,n){const r=uf(e,t);return r&&(n.didMatch=!0),r}function uf(e,t){if(e.length===0)return!1;if(e.includes("|")){const s=e.split("|");for(const u of s)if(uf(u,t))return!0;return!1}let n=!1,r=!1,o=!1,i=!1;const a=e.split("+"),l=a.pop();if(!$1(l,t))return!1;if(a[0]==="any")return!0;for(const s of a)switch(s){case"ctrl":n=!0;break;case"shift":r=!0;break;case"alt":o=!0;break;case"meta":i=!0;break;case"primary":ya.value?i=!0:n=!0;break}return t.altKey===o&&t.ctrlKey===n&&t.shiftKey===r&&t.metaKey===i}function _1(e,t,n,r,o,i,a){const l=Ct.useCallback((c,h,g,p)=>{(i==="cell"||i==="multi-cell")&&c!==void 0&&(c={...c,range:{x:c.cell[0],y:c.cell[1],width:1,height:1}}),!a&&c!==void 0&&c.range.width>1&&(c={...c,range:{...c.range,width:1,x:c.cell[0]}});const f=n==="mixed"&&(g||p==="drag")||n==="additive",m=(r==="mixed"||r==="additive")&&f,y=(o==="mixed"||o==="additive")&&f;let w={current:c===void 0?void 0:{...c,rangeStack:p==="drag"?e.current?.rangeStack??[]:[]},columns:m?e.columns:Qe.empty(),rows:y?e.rows:Qe.empty()};g&&(i==="multi-rect"||i==="multi-cell")&&w.current!==void 0&&e.current!==void 0&&(w={...w,current:{...w.current,rangeStack:[...e.current.rangeStack,e.current.range]}}),t(w,h)},[r,e,n,i,a,o,t]),s=Ct.useCallback((c,h,g)=>{c=c??e.rows,h!==void 0&&(c=c.add(h));let p;if(o==="exclusive"&&c.length>0)p={current:void 0,columns:Qe.empty(),rows:c};else{const f=g&&n==="mixed"||n==="additive",m=g&&r==="mixed"||r==="additive";p={current:f?e.current:void 0,columns:m?e.columns:Qe.empty(),rows:c}}t(p,!1)},[r,e,n,o,t]),u=Ct.useCallback((c,h,g)=>{c=c??e.columns,h!==void 0&&(c=c.add(h));let p;if(r==="exclusive"&&c.length>0)p={current:void 0,rows:Qe.empty(),columns:c};else{const f=g&&n==="mixed"||n==="additive",m=g&&o==="mixed"||o==="additive";p={current:f?e.current:void 0,rows:m?e.rows:Qe.empty(),columns:c}}t(p,!1)},[r,e,n,o,t]);return[l,s,u]}function N1(e,t,n,r,o){const i=d.useCallback(s=>{if(e===!0){const u=[];for(let c=s.y;c<s.y+s.height;c++){const h=[];for(let g=s.x;g<s.x+s.width;g++)g<0||c>=o?h.push({kind:G.Loading,allowOverlay:!1}):h.push(t([g,c]));u.push(h)}return u}return e?.(s,r.signal)??[]},[r.signal,t,e,o]),a=e!==void 0?i:void 0,l=d.useCallback(s=>{if(a===void 0)return[];const u={...s,x:s.x-n};if(u.x<0){u.x=0,u.width--;const c=a(u,r.signal);return typeof c=="function"?async()=>(await c()).map(h=>[{kind:G.Loading,allowOverlay:!1},...h]):c.map(h=>[{kind:G.Loading,allowOverlay:!1},...h])}return a(u,r.signal)},[r.signal,a,n]);return[e!==void 0?l:void 0,a]}function B1(e){if(e.copyData!==void 0)return{formatted:e.copyData,rawValue:e.copyData,format:"string",doNotEscape:!0};switch(e.kind){case G.Boolean:return{formatted:e.data===!0?"TRUE":e.data===!1?"FALSE":e.data===Rs?"INDETERMINATE":"",rawValue:e.data,format:"boolean"};case G.Custom:return{formatted:e.copyData,rawValue:e.copyData,format:"string"};case G.Image:case G.Bubble:return{formatted:e.data,rawValue:e.data,format:"string-array"};case G.Drilldown:return{formatted:e.data.map(t=>t.text),rawValue:e.data.map(t=>t.text),format:"string-array"};case G.Text:return{formatted:e.displayData??e.data,rawValue:e.data,format:"string"};case G.Uri:return{formatted:e.displayData??e.data,rawValue:e.data,format:"url"};case G.Markdown:case G.RowID:return{formatted:e.data,rawValue:e.data,format:"string"};case G.Number:return{formatted:e.displayData,rawValue:e.data,format:"number"};case G.Loading:return{formatted:"#LOADING",rawValue:"",format:"string"};case G.Protected:return{formatted:"************",rawValue:"",format:"string"};default:gi()}}function j1(e,t){return e.map((n,r)=>{const o=t[r];return n.map(i=>i.span!==void 0&&i.span[0]!==o?{formatted:"",rawValue:"",format:"string"}:B1(i))})}function Qc(e,t){return(t?/[\t\n",]/:/[\t\n"]/).test(e)&&(e=`"${e.replace(/"/g,'""')}"`),e}function W1(e){const t=[];for(const n of e){const r=[];for(const o of n)o.format==="url"?r.push(o.rawValue?.toString()??""):o.format==="string-array"?r.push(o.formatted.map(i=>Qc(i,!0)).join(",")):r.push(o.doNotEscape===!0?o.formatted:Qc(o.formatted,!1));t.push(r.join(" "))}return t.join(`
|
|
176
|
-
`)}function jl(e){return e.replace(/\t/g," ").replace(/ {2,}/g,t=>"<span> </span>".repeat(t.length))}function Gc(e){return'"'+e.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")+'"'}function U1(e){return e.replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&")}function X1(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 o=`gdg-format="${r.format}"`;r.format==="url"?t.push(`<td ${o}><a href="${r.rawValue}">${jl(r.formatted)}</a></td>`):r.format==="string-array"?t.push(`<td ${o}><ol>${r.formatted.map((i,a)=>`<li gdg-raw-value=${Gc(r.rawValue[a])}>`+jl(i)+"</li>").join("")}</ol></td>`):t.push(`<td gdg-raw-value=${Gc(r.rawValue?.toString()??"")} ${o}>${jl(r.formatted)}</td>`)}t.push("</tr>")}return t.push("</tbody></table>"),t.join("")}function Y1(e,t){const n=j1(e,t),r=W1(n),o=X1(n);return{textPlain:r,textHtml:o}}function Jc(e){const t=document.createElement("html");t.innerHTML=e.replace(/ /g," ");const n=t.querySelector("table");if(n===null)return;const r=[n],o=[];let i;for(;r.length>0;){const a=r.pop();if(a===void 0)break;if(a instanceof HTMLTableElement||a.nodeName==="TBODY")r.push(...[...a.children].reverse());else if(a instanceof HTMLTableRowElement)i!==void 0&&o.push(i),i=[],r.push(...[...a.children].reverse());else if(a instanceof HTMLTableCellElement){const l=a.cloneNode(!0),s=l.children.length===1&&l.children[0].nodeName==="P"?l.children[0]:null,u=s?.children.length===1&&s.children[0].nodeName==="FONT",c=l.querySelectorAll("br");for(const p of c)p.replaceWith(`
|
|
177
|
-
`);const h=l.getAttribute("gdg-raw-value"),g=l.getAttribute("gdg-format")??"string";if(l.querySelector("a")!==null)i?.push({rawValue:l.querySelector("a")?.getAttribute("href")??"",formatted:l.textContent??"",format:g});else if(l.querySelector("ol")!==null){const p=l.querySelectorAll("li");i?.push({rawValue:[...p].map(f=>f.getAttribute("gdg-raw-value")??""),formatted:[...p].map(f=>f.textContent??""),format:"string-array"})}else if(h!==null)i?.push({rawValue:U1(h),formatted:l.textContent??"",format:g});else{let p=l.textContent??"";u&&(p=p.replace(/\n(?!\n)/g,"")),i?.push({rawValue:p??"",formatted:p??"",format:g})}}}return i!==void 0&&o.push(i),o}function Z1(e,t,n,r,o){const i=e;if(r==="allowPartial"||e.current===void 0||t===void 0)return e;let a=!1;do{if(e?.current===void 0)break;const l=e.current?.range,s=[];if(l.width>2){const h=t({x:l.x,y:l.y,width:1,height:l.height},o.signal);if(typeof h=="function")return i;s.push(...h);const g=t({x:l.x+l.width-1,y:l.y,width:1,height:l.height},o.signal);if(typeof g=="function")return i;s.push(...g)}else{const h=t({x:l.x,y:l.y,width:l.width,height:l.height},o.signal);if(typeof h=="function")return i;s.push(...h)}let u=l.x-n,c=l.x+l.width-1-n;for(const h of s)for(const g of h)g.span!==void 0&&(u=Math.min(g.span[0],u),c=Math.max(g.span[1],c));u===l.x-n&&c===l.x+l.width-1-n?a=!0:e={current:{cell:e.current.cell??[0,0],range:{x:u+n,y:l.y,width:c-u+1,height:l.height},rangeStack:e.current.rangeStack},columns:e.columns,rows:e.rows}}while(!a);return e}function ed(e){return e.startsWith('"')&&e.endsWith('"')&&(e=e.slice(1,-1).replace(/""/g,'"')),e}function q1(e){let t;(function(l){l[l.None=0]="None",l[l.inString=1]="inString",l[l.inStringPostQuote=2]="inStringPostQuote"})(t||(t={}));const n=[];let r=[],o=0,i=t.None;e=e.replace(/\r\n/g,`
|
|
178
|
-
`);let a=0;for(const l of e){switch(i){case t.None:l===" "||l===`
|
|
179
|
-
`?(r.push(e.slice(o,a)),o=a+1,l===`
|
|
180
|
-
`&&(n.push(r),r=[])):l==='"'&&(i=t.inString);break;case t.inString:l==='"'&&(i=t.inStringPostQuote);break;case t.inStringPostQuote:l==='"'?i=t.inString:((l===" "||l===`
|
|
181
|
-
`)&&(r.push(ed(e.slice(o,a))),o=a+1,l===`
|
|
182
|
-
`&&(n.push(r),r=[])),i=t.None);break}a++}return o<e.length&&r.push(ed(e.slice(o,e.length))),n.push(r),n.map(l=>l.map(s=>({rawValue:s,formatted:s,format:"string"})))}function td(e,t,n){const r=Y1(e,t),o=l=>{window.navigator.clipboard?.writeText(l)},i=(l,s)=>window.navigator.clipboard?.write===void 0?!1:(window.navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([l],{type:"text/plain"}),"text/html":new Blob([s],{type:"text/html"})})]),!0),a=(l,s)=>{try{if(n===void 0||n.clipboardData===null)throw new Error("No clipboard data");n?.clipboardData?.setData("text/plain",l),n?.clipboardData?.setData("text/html",s)}catch{i(l,s)||o(l)}};window.navigator.clipboard?.write!==void 0||n?.clipboardData!==void 0?a(r.textPlain,r.textHtml):o(r.textPlain),n?.preventDefault()}function cf(e){return e!==!0}function nd(e){return typeof e=="string"?e:`${e}px`}const K1=()=>e=>e.innerWidth,Q1=()=>e=>e.innerHeight,G1=hn("div")({name:"Wrapper",class:"gdg-wmyidgi",propsAsIs:!1,vars:{"wmyidgi-0":[K1()],"wmyidgi-1":[Q1()]}}),J1=e=>{const{inWidth:t,inHeight:n,children:r,...o}=e;return d.createElement(G1,{innerHeight:nd(n),innerWidth:nd(t),...o},r)},ew=2,tw=1300;function nw(e,t,n){const r=Ct.useRef(0),[o,i]=e??[0,0];Ct.useEffect(()=>{if(o===0&&i===0){r.current=0;return}let a=!1,l=0;const s=u=>{if(!a){if(l===0)l=u;else{const c=u-l;r.current=Math.min(1,r.current+c/tw);const h=r.current**1.618*c*ew;t.current?.scrollBy(o*h,i*h),l=u,n?.()}window.requestAnimationFrame(s)}};return window.requestAnimationFrame(s),()=>{a=!0}},[t,o,i,n])}function rw({rowHeight:e,headerHeight:t,groupHeaderHeight:n,theme:r,overscrollX:o,overscrollY:i,scaleToRem:a,remSize:l}){const[s,u,c,h,g,p]=Ct.useMemo(()=>{if(!a||l===16)return[e,t,n,r,o,i];const f=l/16,m=e,y=Yh();return[typeof m=="number"?m*f:w=>Math.ceil(m(w)*f),Math.ceil(t*f),Math.ceil(n*f),{...r,headerIconSize:(r?.headerIconSize??y.headerIconSize)*f,cellHorizontalPadding:(r?.cellHorizontalPadding??y.cellHorizontalPadding)*f,cellVerticalPadding:(r?.cellVerticalPadding??y.cellVerticalPadding)*f},Math.ceil((o??0)*f),Math.ceil((i??0)*f)]},[n,t,o,i,l,e,a,r]);return{rowHeight:s,headerHeight:u,groupHeaderHeight:c,theme:h,overscrollX:g,overscrollY:p}}const Cr={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 tt(e,t){return e===!0?t:e===!1?"":e}function rd(e){const t=ya.value;return{activateCell:tt(e.activateCell," |Enter|shift+Enter"),clear:tt(e.clear,"any+Escape"),closeOverlay:tt(e.closeOverlay,"any+Escape"),acceptOverlayDown:tt(e.acceptOverlayDown,"Enter"),acceptOverlayUp:tt(e.acceptOverlayUp,"shift+Enter"),acceptOverlayLeft:tt(e.acceptOverlayLeft,"shift+Tab"),acceptOverlayRight:tt(e.acceptOverlayRight,"Tab"),copy:e.copy,cut:e.cut,delete:tt(e.delete,t?"Backspace|Delete":"Delete"),downFill:tt(e.downFill,"primary+_68"),scrollToSelectedCell:tt(e.scrollToSelectedCell,"primary+Enter"),goDownCell:tt(e.goDownCell,"ArrowDown"),goDownCellRetainSelection:tt(e.goDownCellRetainSelection,"alt+ArrowDown"),goLeftCell:tt(e.goLeftCell,"ArrowLeft|shift+Tab"),goLeftCellRetainSelection:tt(e.goLeftCellRetainSelection,"alt+ArrowLeft"),goRightCell:tt(e.goRightCell,"ArrowRight|Tab"),goRightCellRetainSelection:tt(e.goRightCellRetainSelection,"alt+ArrowRight"),goUpCell:tt(e.goUpCell,"ArrowUp"),goUpCellRetainSelection:tt(e.goUpCellRetainSelection,"alt+ArrowUp"),goToFirstCell:tt(e.goToFirstCell,"primary+Home"),goToFirstColumn:tt(e.goToFirstColumn,"Home|primary+ArrowLeft"),goToFirstRow:tt(e.goToFirstRow,"primary+ArrowUp"),goToLastCell:tt(e.goToLastCell,"primary+End"),goToLastColumn:tt(e.goToLastColumn,"End|primary+ArrowRight"),goToLastRow:tt(e.goToLastRow,"primary+ArrowDown"),goToNextPage:tt(e.goToNextPage,"PageDown"),goToPreviousPage:tt(e.goToPreviousPage,"PageUp"),paste:e.paste,rightFill:tt(e.rightFill,"primary+_82"),search:tt(e.search,"primary+f"),selectAll:tt(e.selectAll,"primary+a"),selectColumn:tt(e.selectColumn,"ctrl+ "),selectGrowDown:tt(e.selectGrowDown,"shift+ArrowDown"),selectGrowLeft:tt(e.selectGrowLeft,"shift+ArrowLeft"),selectGrowRight:tt(e.selectGrowRight,"shift+ArrowRight"),selectGrowUp:tt(e.selectGrowUp,"shift+ArrowUp"),selectRow:tt(e.selectRow,"shift+ "),selectToFirstCell:tt(e.selectToFirstCell,"primary+shift+Home"),selectToFirstColumn:tt(e.selectToFirstColumn,"primary+shift+ArrowLeft"),selectToFirstRow:tt(e.selectToFirstRow,"primary+shift+ArrowUp"),selectToLastCell:tt(e.selectToLastCell,"primary+shift+End"),selectToLastColumn:tt(e.selectToLastColumn,"primary+shift+ArrowRight"),selectToLastRow:tt(e.selectToLastRow,"primary+shift+ArrowDown")}}function ow(e){const t=T0(e);return Ct.useMemo(()=>{if(t===void 0)return rd(Cr);const n={...t,goToNextPage:t?.goToNextPage??t?.pageDown??Cr.goToNextPage,goToPreviousPage:t?.goToPreviousPage??t?.pageUp??Cr.goToPreviousPage,goToFirstCell:t?.goToFirstCell??t?.first??Cr.goToFirstCell,goToLastCell:t?.goToLastCell??t?.last??Cr.goToLastCell,selectToFirstCell:t?.selectToFirstCell??t?.first??Cr.selectToFirstCell,selectToLastCell:t?.selectToLastCell??t?.last??Cr.selectToLastCell};return rd({...Cr,...n})},[t])}function iw(e){function t(n,r,o){if(typeof n=="number")return{headerIndex:n,isCollapsed:!1,depth:r,path:o};const i={headerIndex:n.headerIndex,isCollapsed:n.isCollapsed,depth:r,path:o};return n.subGroups!==void 0&&(i.subGroups=n.subGroups.map((a,l)=>t(a,r+1,[...o,l])).sort((a,l)=>a.headerIndex-l.headerIndex)),i}return e.map((n,r)=>t(n,0,[r])).sort((n,r)=>n.headerIndex-r.headerIndex)}function Ys(e,t){const n=[];function r(l,s,u=!1){let c=s!==null?s-l.headerIndex:t-l.headerIndex;if(l.subGroups!==void 0&&(c=l.subGroups[0].headerIndex-l.headerIndex),c--,n.push({rowIndex:-1,headerIndex:l.headerIndex,contentIndex:-1,skip:u,isCollapsed:l.isCollapsed,depth:l.depth,path:l.path,rows:c}),l.subGroups)for(let h=0;h<l.subGroups.length;h++){const g=h<l.subGroups.length-1?l.subGroups[h+1].headerIndex:s;r(l.subGroups[h],g,u||l.isCollapsed)}}const o=iw(e.groups);for(let l=0;l<o.length;l++){const s=l<o.length-1?o[l+1].headerIndex:null;r(o[l],s)}let i=0,a=0;for(const l of n)l.contentIndex=a,a+=l.rows,l.rowIndex=i,i+=l.isCollapsed?1:l.rows+1;return n.filter(l=>l.skip===!1).map(l=>{const{skip:s,...u}=l;return u})}function gs(e,t){if(t===void 0||Ys.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 aw(e,t,n,r){const o=Ct.useMemo(()=>e===void 0?void 0:Ys(e,t),[e,t]),i=Ct.useMemo(()=>o?.reduce((c,h)=>(c[h.rowIndex]=h,c),{}),[o]),a=Ct.useMemo(()=>o===void 0?t:o.reduce((c,h)=>c+(h.isCollapsed?1:h.rows+1),0),[o,t]),l=Ct.useMemo(()=>e===void 0||typeof n=="number"&&e.height===n?n:c=>i?.[c]?e.height:typeof n=="number"?n:n(c),[i,e,n]),s=Ct.useCallback(c=>{if(o===void 0)return c;let h=c;for(const g of o){if(h===0)return;if(h--,!g.isCollapsed){if(h<g.rows)return g.contentIndex+h;h-=g.rows}}return c},[o]),u=kr(r??e?.themeOverride,Ct.useCallback(c=>{if(e===void 0)return r?.(c,c,c);if(r===void 0&&e?.themeOverride===void 0)return;const{isGroupHeader:h,contentIndex:g,groupIndex:p}=gs(c,o);return h?e.themeOverride:r?.(c,p,g)},[o,r,e]));return e===void 0?{rowHeight:l,rows:t,rowNumberMapper:s,getRowThemeOverride:u}:{rowHeight:l,rows:a,rowNumberMapper:s,getRowThemeOverride:u}}function lw(e,t){const n=Ct.useMemo(()=>e===void 0?void 0:Ys(e,t),[e,t]);return{getRowGroupingForPath:hf,updateRowGroupingByPath:df,mapper:Ct.useCallback(r=>{if(typeof r=="number")return gs(r,n);const o=gs(r[1],n);return{...o,originalIndex:[r[0],o.originalIndex]}},[n])}}function df(e,t,n){const[r,...o]=t;return o[0]===-1?e.map((i,a)=>a===r?{...i,...n}:i):e.map((i,a)=>a===r?{...i,subGroups:df(i.subGroups??[],o,n)}:i)}function hf(e,t){const[n,...r]=t;return r[0]===-1?e[n]:hf(e[n].subGroups??[],r)}function sw(e,t){const[n]=d.useState(()=>({value:e,callback:t,facade:{get current(){return n.value},set current(r){const o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}));return n.callback=t,n.facade}function uw(e,t,n,r,o){const[i,a]=d.useMemo(()=>[t!==void 0&&typeof n=="number"?Math.floor(t/n):0,t!==void 0&&typeof n=="number"?-(t%n):0],[t,n]),l=d.useMemo(()=>({x:r.current.x,y:i,width:r.current.width??1,height:r.current.height??1,ty:a}),[r,a,i]),[s,u,c]=E0(l),h=d.useRef(o);h.current=o;const g=sw(null,m=>{m!==null&&t!==void 0?m.scrollTop=t:m!==null&&e!==void 0&&(m.scrollLeft=e)}),p=(s.height??1)>1;d.useLayoutEffect(()=>{if(t!==void 0&&g.current!==null&&p){if(g.current.scrollTop===t)return;g.current.scrollTop=t,g.current.scrollTop!==t&&c(),h.current()}},[t,p,c,g]);const f=(s.width??1)>1;return d.useLayoutEffect(()=>{if(e!==void 0&&g.current!==null&&f){if(g.current.scrollLeft===e)return;g.current.scrollLeft=e,g.current.scrollLeft!==e&&c(),h.current()}},[e,f,c,g]),{visibleRegion:s,setVisibleRegion:u,scrollRef:g}}const cw=d.lazy(async()=>await Ss(()=>import("./data-grid-overlay-editor-QHhShSfm-3TuDDPoi.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])));let dw=0;function hw(e){return Jv(Hc(Hc(e).filter(t=>t.span!==void 0).map(t=>Ir((t.span?.[0]??0)+1,(t.span?.[1]??0)+1))))}function qi(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 Ki={kind:G.Loading,allowOverlay:!1},Qi={columns:Qe.empty(),rows:Qe.empty(),current:void 0},fw=(e,t)=>{const[n,r]=d.useState(Qi),[o,i]=d.useState(),a=d.useRef(null),l=d.useRef(null),[s,u]=d.useState(),c=d.useRef(),h=typeof window>"u"?null:window,{imageEditorOverride:g,getRowThemeOverride:p,markdownDivCreateNode:f,width:m,height:y,columns:w,rows:v,getCellContent:x,onCellClicked:E,onCellActivated:R,onFillPattern:S,onFinishedEditing:P,coercePasteValue:T,drawHeader:C,drawCell:A,editorBloom:O,onHeaderClicked:I,onColumnProposeMove:M,rangeSelectionColumnSpanning:D=!0,spanRangeBehavior:k="default",onGroupHeaderClicked:Y,onCellContextMenu:$,className:K,onHeaderContextMenu:ie,getCellsForSelection:ee,onGroupHeaderContextMenu:Q,onGroupHeaderRenamed:ge,onCellEdited:oe,onCellsEdited:de,onSearchResultsChanged:pe,searchResults:le,onSearchValueChange:V,searchValue:L,onKeyDown:U,onKeyUp:re,keybindings:se,editOnType:De=!0,onRowAppended:be,onColumnAppended:Ge,onColumnMoved:Me,validateCell:Et,highlightRegions:st,rangeSelect:$e="rect",columnSelect:ne="multi",rowSelect:me="multi",rangeSelectionBlending:ve="exclusive",columnSelectionBlending:ce="exclusive",rowSelectionBlending:we="exclusive",onDelete:Le,onDragStart:He,onMouseMove:rt,onPaste:Pe,copyHeaders:ye=!1,freezeColumns:Fe=0,cellActivationBehavior:ke="second-click",rowSelectionMode:_e="auto",columnSelectionMode:ut="auto",onHeaderMenuClick:dt,onHeaderIndicatorClick:je,getGroupDetails:ft,rowGrouping:$t,onSearchClose:bt,onItemHovered:Mt,onSelectionCleared:_t,showSearch:Zt,onVisibleRegionChanged:ln,gridSelection:kt,onGridSelectionChange:ht,minColumnWidth:Bt=50,maxColumnWidth:mt=500,maxColumnAutoWidth:sn,provideEditor:Mn,trailingRowOptions:Ee,freezeTrailingRows:ct=0,allowedFillDirections:Tt="orthogonal",scrollOffsetX:vn,scrollOffsetY:tn,verticalBorder:nn,onDragOverCell:cn,onDrop:zt,onColumnResize:Kt,onColumnResizeEnd:Be,onColumnResizeStart:wt,customRenderers:In,fillHandle:Ot,experimental:pt,fixedShadowX:bn,fixedShadowY:lr,headerIcons:Kn,imageWindowLoader:B,initialSize:Ne,isDraggable:We,onDragLeave:Dt,onRowMoved:qt,overscrollX:rn,overscrollY:Rn,preventDiagonalScrolling:wn,rightElement:jt,rightElementProps:yn,trapFocus:xn=!1,smoothScrollX:Qr,smoothScrollY:Gr,scaleToRem:Jr=!1,rowHeight:Ho=34,headerHeight:Ln=36,groupHeaderHeight:Qn=Ln,theme:eo,isOutsideClick:to,renderers:_n,resizeIndicator:no,scrollToActiveCell:Nn=!0,drawFocusRing:Ie=!0,portalElementRef:dn}=e,sr=Ie==="no-editor"?o===void 0:Ie,Hn=typeof e.rowMarkers=="string"?void 0:e.rowMarkers,on=Hn?.kind??e.rowMarkers??"none",gr=Hn?.width??e.rowMarkerWidth,ro=Hn?.startIndex??e.rowMarkerStartIndex??1,mr=Hn?.theme??e.rowMarkerTheme,oo=Hn?.headerTheme,Ii=Hn?.headerAlwaysVisible,Dr=me!=="multi"||Hn?.headerDisabled===!0,io=Hn?.checkboxStyle??"square",vr=Math.max(Bt,20),ao=Math.max(mt,vr),Ri=Math.max(sn??ao,vr),Fo=d.useMemo(()=>typeof window>"u"?{fontSize:"16px"}:window.getComputedStyle(document.documentElement),[]),{rows:ze,rowNumberMapper:zo,rowHeight:Va,getRowThemeOverride:Pr}=aw($t,v,Ho,p),$a=d.useMemo(()=>Number.parseFloat(Fo.fontSize),[Fo]),{rowHeight:Gn,headerHeight:Vo,groupHeaderHeight:lo,theme:Ei,overscrollX:_a,overscrollY:Na}=rw({groupHeaderHeight:Qn,headerHeight:Ln,overscrollX:rn,overscrollY:Rn,remSize:$a,rowHeight:Va,scaleToRem:Jr,theme:eo}),Jn=ow(se),ur=gr??(v>1e4?48:v>1e3?44:v>100?36:32),Cn=on!=="none",W=Cn?1:0,Ht=Ee!==void 0,Ar=Ee?.sticky===!0,[so,Ti]=d.useState(!1),uo=Zt??so,Ba=d.useCallback(()=>{bt!==void 0?bt():Ti(!1)},[bt]),Z=d.useMemo(()=>kt===void 0?void 0:qi(kt,W),[kt,W])??n,_=d.useRef();_.current===void 0&&(_.current=new AbortController),d.useEffect(()=>()=>_?.current.abort(),[]);const[te,xe]=N1(ee,x,W,_.current,ze),Re=d.useCallback((b,H,F)=>{if(Et===void 0)return!0;const N=[b[0]-W,b[1]];return Et?.(N,H,F)},[W,Et]),ue=d.useRef(kt),he=d.useCallback((b,H)=>{H&&(b=Z1(b,te,W,k,_.current)),ht!==void 0?(ue.current=qi(b,-W),ht(ue.current)):r(b)},[ht,te,W,k]),Ue=kr(Kt,d.useCallback((b,H,F,N)=>{Kt?.(w[F-W],H,F-W,N)},[Kt,W,w])),Ce=kr(Be,d.useCallback((b,H,F,N)=>{Be?.(w[F-W],H,F-W,N)},[Be,W,w])),qe=kr(wt,d.useCallback((b,H,F,N)=>{wt?.(w[F-W],H,F-W,N)},[wt,W,w])),gt=kr(C,d.useCallback((b,H)=>C?.({...b,columnIndex:b.columnIndex-W},H)??!1,[C,W])),un=kr(A,d.useCallback((b,H)=>A?.({...b,col:b.col-W},H)??!1,[A,W])),Wt=d.useCallback(b=>{if(Le!==void 0){const H=Le(qi(b,-W));return typeof H=="boolean"?H:qi(H,W)}return!0},[Le,W]),[yt,ot,Xe]=_1(Z,he,ve,ce,we,$e,D),at=d.useMemo(()=>pr(Yh(),Ei),[Ei]),[Vt,co]=d.useState([0,0,0]),Lr=d.useMemo(()=>{if(_n===void 0)return{};const b={};for(const H of _n)b[H.kind]=H;return b},[_n]),Qt=d.useCallback(b=>b.kind!==G.Custom?Lr[b.kind]:In?.find(H=>H.isMatch(b)),[In,Lr]);let{sizedColumns:an,nonGrowWidth:At}=Vv(w,ze,xe,Vt[0]-(W===0?0:ur)-Vt[2],vr,Ri,at,Qt,_.current);on!=="none"&&(At+=ur);const Fn=d.useMemo(()=>an.some(b=>b.group!==void 0),[an]),fn=Fn?Vo+lo:Vo,cr=Z.rows.length,dr=on==="none"?void 0:cr===0?!1:cr===ze?!0:void 0,it=d.useMemo(()=>on==="none"?an:[{title:"",width:ur,icon:void 0,hasMenu:!1,style:"normal",themeOverride:mr,rowMarker:io,rowMarkerChecked:dr,headerRowMarkerTheme:oo,headerRowMarkerAlwaysVisible:Ii,headerRowMarkerDisabled:Dr},...an],[on,an,ur,mr,io,dr,oo,Ii,Dr]),Gt=d.useRef({height:1,width:1,x:0,y:0}),er=d.useRef(!1),{setVisibleRegion:Oi,visibleRegion:hr,scrollRef:Nt}=uw(vn,tn,Gn,Gt,()=>er.current=!0);Gt.current=hr;const xp=hr.x+W,Di=hr.y,pn=d.useRef(null),kn=d.useCallback(b=>{b===!0?pn.current?.focus():window.requestAnimationFrame(()=>{pn.current?.focus()})},[]),gn=Ht?ze+1:ze,zn=d.useCallback(b=>{const H=W===0?b:b.map(N=>({...N,location:[N.location[0]-W,N.location[1]]})),F=de?.(H);if(F!==!0)for(const N of H)oe?.(N.location,N.value);return F},[oe,de,W]),[Hr,ja]=d.useState(),Pi=Z.current!==void 0&&Z.current.range.width*Z.current.range.height>1?Z.current.range:void 0,vu=sr?Z.current?.cell:void 0,Ai=vu?.[0],Li=vu?.[1],Cp=d.useMemo(()=>{if((st===void 0||st.length===0)&&(Pi??Ai??Li??Hr)===void 0)return;const b=[];if(st!==void 0)for(const H of st){const F=it.length-H.range.x-W;F>0&&b.push({color:H.color,range:{...H.range,x:H.range.x+W,width:Math.min(F,H.range.width)},style:H.style})}return Hr!==void 0&&b.push({color:Xr(at.accentColor,0),range:Hr,style:"dashed"}),Pi!==void 0&&b.push({color:Xr(at.accentColor,.5),range:Pi,style:"solid-outline"}),Ai!==void 0&&Li!==void 0&&b.push({color:at.accentColor,range:{x:Ai,y:Li,width:1,height:1},style:"solid-outline"}),b.length>0?b:void 0},[Hr,Pi,Ai,Li,st,it.length,at.accentColor,W]),bu=d.useRef(it);bu.current=it;const En=d.useCallback(([b,H],F=!1)=>{const N=Ht&&H===gn-1;if(b===0&&Cn){if(N)return Ki;const j=zo(H);return j===void 0?Ki:{kind:$n.Marker,allowOverlay:!1,checkboxStyle:io,checked:Z?.rows.hasIndex(H)===!0,markerKind:on==="clickable-number"?"number":on,row:ro+j,drawHandle:qt!==void 0,cursor:on==="clickable-number"?"pointer":void 0}}else if(N){const j=b===W?Ee?.hint??"":"",q=bu.current[b];if(q?.trailingRowOptions?.disabled===!0)return Ki;{const z=q?.trailingRowOptions?.hint??j,X=q?.trailingRowOptions?.addIcon??Ee?.addIcon;return{kind:$n.NewRow,hint:z,allowOverlay:!1,icon:X}}}else{const j=b-W;if(F||pt?.strict===!0){const z=Gt.current,X=z.x>j||j>z.x+z.width||z.y>H||H>z.y+z.height||H>=Ya.current,J=j===z.extras?.selected?.[0]&&H===z.extras?.selected[1];let ae=!1;if(z.extras?.freezeRegions!==void 0){for(const Te of z.extras.freezeRegions)if(Wr(Te,j,H)){ae=!0;break}}if(X&&!J&&!ae)return Ki}let q=x([j,H]);return W!==0&&q.span!==void 0&&(q={...q,span:[q.span[0]+W,q.span[1]+W]}),q}},[Ht,gn,Cn,zo,io,Z?.rows,on,ro,qt,W,Ee?.hint,Ee?.addIcon,pt?.strict,x]),Wa=d.useCallback(b=>{let H=ft?.(b)??{name:b};return ge!==void 0&&b!==""&&(H={icon:H.icon,name:H.name,overrideTheme:H.overrideTheme,actions:[...H.actions??[],{title:"Rename",icon:"renameIcon",onClick:F=>qa({group:H.name,bounds:F.bounds})}]}),H},[ft,ge]),Hi=d.useCallback(b=>{const[H,F]=b.cell,N=it[H],j=N?.group!==void 0?Wa(N.group)?.overrideTheme:void 0,q=N?.themeOverride,z=Pr?.(F);i({...b,theme:pr(at,j,q,z,b.content.themeOverride)})},[Pr,it,Wa,at]),ho=d.useCallback((b,H,F)=>{if(Z.current===void 0)return;const[N,j]=Z.current.cell,q=En([N,j]);if(q.kind!==G.Boolean&&q.allowOverlay){let z=q;if(F!==void 0)switch(z.kind){case G.Number:{const X=e0(()=>F==="-"?-0:Number.parseFloat(F),0);z={...z,data:Number.isNaN(X)?0:X};break}case G.Text:case G.Markdown:case G.Uri:z={...z,data:F};break}Hi({target:b,content:z,initialValue:F,cell:[N,j],highlight:F===void 0,forceEditMode:F!==void 0,activation:H})}else q.kind===G.Boolean&&H.inputType==="keyboard"&&q.readonly!==!0&&(zn([{location:Z.current.cell,value:{...q,data:cf(q.data)}}]),pn.current?.damage([{cell:Z.current.cell}]))},[En,Z,zn,Hi]),wu=d.useCallback((b,H)=>{const F=pn.current?.getBounds(b,H);if(F===void 0||Nt.current===null)return;const N=En([b,H]);N.allowOverlay&&Hi({target:F,content:N,initialValue:void 0,highlight:!0,cell:[b,H],forceEditMode:!0,activation:{inputType:"keyboard",key:"Enter"}})},[En,Nt,Hi]),Ut=d.useCallback((b,H,F="both",N=0,j=0,q=void 0)=>{if(Nt.current!==null){const z=pn.current,X=l.current,J=typeof b!="number"?b.unit==="cell"?b.amount:void 0:b,ae=typeof H!="number"?H.unit==="cell"?H.amount:void 0:H,Te=typeof b!="number"&&b.unit==="px"?b.amount:void 0,It=typeof H!="number"&&H.unit==="px"?H.amount:void 0;if(z!==null&&X!==null){let Ke={x:0,y:0,width:0,height:0},Ye=0,Ze=0;if((J!==void 0||ae!==void 0)&&(Ke=z.getBounds((J??0)+W,ae??0)??Ke,Ke.width===0||Ke.height===0))return;const Je=X.getBoundingClientRect(),vt=Je.width/X.offsetWidth;if(Te!==void 0&&(Ke={...Ke,x:Te-Je.left-Nt.current.scrollLeft,width:1}),It!==void 0&&(Ke={...Ke,y:It+Je.top-Nt.current.scrollTop,height:1}),Ke!==void 0){const Jt={x:Ke.x-N,y:Ke.y-j,width:Ke.width+2*N,height:Ke.height+2*j};let bo=0;for(let nl=0;nl<Fe;nl++)bo+=an[nl].width;let Bi=0;const Uo=ct+(Ar?1:0);Uo>0&&(Bi=Kr(gn,Uo,Gn));let nr=bo*vt+Je.left+W*ur*vt,wo=Je.right,$r=Je.top+fn*vt,yo=Je.bottom-Bi*vt;const ji=Ke.width+N*2;switch(q?.hAlign){case"start":wo=nr+ji;break;case"end":nr=wo-ji;break;case"center":nr=Math.floor((nr+wo)/2)-ji/2,wo=nr+ji;break}const Wi=Ke.height+j*2;switch(q?.vAlign){case"start":yo=$r+Wi;break;case"end":$r=yo-Wi;break;case"center":$r=Math.floor(($r+yo)/2)-Wi/2,yo=$r+Wi;break}nr>Jt.x?Ye=Jt.x-nr:wo<Jt.x+Jt.width&&(Ye=Jt.x+Jt.width-wo),$r>Jt.y?Ze=Jt.y-$r:yo<Jt.y+Jt.height&&(Ze=Jt.y+Jt.height-yo),F==="vertical"||typeof b=="number"&&b<Fe?Ye=0:(F==="horizontal"||typeof H=="number"&&H>=gn-Uo)&&(Ze=0),(Ye!==0||Ze!==0)&&(vt!==1&&(Ye/=vt,Ze/=vt),Nt.current.scrollTo({left:Ye+Nt.current.scrollLeft,top:Ze+Nt.current.scrollTop,behavior:q?.behavior??"auto"}))}}}},[W,ct,ur,Nt,fn,Fe,an,gn,Ar,Gn]),Ua=d.useRef(wu),Xa=d.useRef(x);Ua.current=wu,Xa.current=x;const Ya=d.useRef(ze);Ya.current=ze;const yu=d.useRef(it.length);yu.current=it.length;const br=d.useCallback(async(b,H=!0,F)=>{if(it[b]?.trailingRowOptions?.disabled===!0)return;const N=be?.();let j,q=!0;N!==void 0&&(j=await N,j==="top"&&(q=!1),typeof j=="number"&&(q=!1));let z=0;const X=()=>{if(Ya.current<=ze){z<500&&window.setTimeout(X,z),z=50+z*2;return}const J=typeof j=="number"?j:q?ze:0;Ni.current(b-W,J,"both",0,0,F?{behavior:F}:void 0),yt({cell:[b,J],range:{x:b,y:J,width:1,height:1}},!1,!1,"edit");const ae=Xa.current([b-W,J]);ae.allowOverlay&&Mo(ae)&&ae.readonly!==!0&&H&&window.setTimeout(()=>{Ua.current(b,J)},0)};X()},[it,be,W,ze,yt]),Fi=d.useCallback(async(b,H=!0)=>{const F=Ge?.();let N,j=!0;F!==void 0&&(N=await F,N==="left"&&(j=!1),typeof N=="number"&&(j=!1));let q=0;const z=()=>{if(yu.current<=it.length){q<500&&window.setTimeout(z,q),q=50+q*2;return}const X=typeof N=="number"?N:j?it.length:0;Ut(X-W,b),yt({cell:[X,b],range:{x:X,y:b,width:1,height:1}},!1,!1,"edit");const J=Xa.current([X-W,b]);J.allowOverlay&&Mo(J)&&J.readonly!==!0&&H&&window.setTimeout(()=>{Ua.current(X,b)},0)};z()},[it,Ge,W,Ut,yt]),fo=d.useCallback(b=>{const H=an[b]?.trailingRowOptions?.targetColumn??Ee?.targetColumn;if(typeof H=="number")return H+(Cn?1:0);if(typeof H=="object"){const F=w.indexOf(H);if(F>=0)return F+(Cn?1:0)}},[an,w,Cn,Ee?.targetColumn]),wr=d.useRef(),po=d.useRef(),$o=d.useCallback((b,H)=>{const[F,N]=H;return pr(at,it[F]?.themeOverride,Pr?.(N),b.themeOverride)},[Pr,it,at]),{mapper:Fr}=lw($t,v),Bn=$t?.navigationBehavior,_o=d.useCallback(b=>{const H=ya.value?b.metaKey:b.ctrlKey,F=H&&me==="multi",[N,j]=b.location,q=Z.columns,z=Z.rows,[X,J]=Z.current?.cell??[];if(b.kind==="cell"){if(po.current=void 0,zr.current=[N,j],N===0&&Cn){if(Ht===!0&&j===ze||on==="number"||me==="none")return;const ae=En(b.location);if(ae.kind!==$n.Marker)return;if(qt!==void 0){const Ke=Qt(ae);Dn(Ke?.kind===$n.Marker);const Ye=Ke?.onClick?.({...b,cell:ae,posX:b.localEventX,posY:b.localEventY,bounds:b.bounds,theme:$o(ae,b.location),preventDefault:()=>{}});if(Ye===void 0||Ye.checked===ae.checked)return}i(void 0),kn();const Te=z.hasIndex(j),It=wr.current;if(me==="multi"&&(b.shiftKey||b.isLongTouch===!0)&&It!==void 0&&z.hasIndex(It)){const Ke=[Math.min(It,j),Math.max(It,j)+1];F||_e==="multi"?ot(void 0,Ke,!0):ot(Qe.fromSingleSelection(Ke),void 0,F)}else me==="multi"&&(F||b.isTouch||_e==="multi")?Te?ot(z.remove(j),void 0,!0):(ot(void 0,j,!0),wr.current=j):Te&&z.length===1?ot(Qe.empty(),void 0,H):(ot(Qe.fromSingleSelection(j),void 0,H),wr.current=j)}else if(N>=W&&Ht&&j===ze){const ae=fo(N);br(ae??N)}else if(X!==N||J!==j){const ae=En(b.location),Te=Qt(ae);if(Te?.onSelect!==void 0){let Ye=!1;if(Te.onSelect({...b,cell:ae,posX:b.localEventX,posY:b.localEventY,bounds:b.bounds,preventDefault:()=>Ye=!0,theme:$o(ae,b.location)}),Ye)return}if(Bn==="block"&&Fr(j).isGroupHeader)return;const It=Ar&&j===ze,Ke=Ar&&Z!==void 0&&Z.current?.cell[1]===ze;if((b.shiftKey||b.isLongTouch===!0)&&X!==void 0&&J!==void 0&&Z.current!==void 0&&!Ke){if(It)return;const Ye=Math.min(N,X),Ze=Math.max(N,X),Je=Math.min(j,J),vt=Math.max(j,J);yt({...Z.current,range:{x:Ye,y:Je,width:Ze-Ye+1,height:vt-Je+1}},!0,H,"click"),wr.current=void 0,kn()}else yt({cell:[N,j],range:{x:N,y:j,width:1,height:1}},!0,H,"click"),wr.current=void 0,i(void 0),kn()}}else if(b.kind==="header")if(zr.current=[N,j],i(void 0),Cn&&N===0)wr.current=void 0,po.current=void 0,!Dr&&me==="multi"&&(z.length!==ze?ot(Qe.fromSingleSelection([0,ze]),void 0,H):ot(Qe.empty(),void 0,H),kn());else{const ae=po.current;if(ne==="multi"&&(b.shiftKey||b.isLongTouch===!0)&&ae!==void 0&&q.hasIndex(ae)){const Te=[Math.min(ae,N),Math.max(ae,N)+1];H||b.isTouch||ut==="multi"?Xe(void 0,Te,H):Xe(Qe.fromSingleSelection(Te),void 0,H)}else ne==="multi"&&(H||b.isTouch||ut==="multi")?(q.hasIndex(N)?Xe(q.remove(N),void 0,H):Xe(void 0,N,H),po.current=N):ne!=="none"&&(q.hasIndex(N)?Xe(q.remove(N),void 0,H):Xe(Qe.fromSingleSelection(N),void 0,H),po.current=N);wr.current=void 0,kn()}else b.kind===Xn?zr.current=[N,j]:b.kind===xa&&!b.isMaybeScrollbar&&(he(Qi,!1),i(void 0),kn(),_t?.(),wr.current=void 0,po.current=void 0)},[me,ne,Z,Cn,W,Ht,ze,on,En,qt,kn,_e,ut,Qt,$o,ot,fo,br,Bn,Fr,Ar,yt,Dr,Xe,he,_t]),No=d.useRef(!1),zr=d.useRef(),xu=d.useRef(hr),tr=d.useRef(),kp=d.useCallback(b=>{if(go.current=!1,xu.current=Gt.current,b.button!==0&&b.button!==1){tr.current=void 0;return}const H=performance.now();tr.current={button:b.button,time:H,location:b.location},b?.kind==="header"&&(No.current=!0);const F=b.kind==="cell"&&b.isFillHandle;!F&&b.kind!=="cell"&&b.isEdge||(u({previousSelection:Z,fillHandle:F}),zr.current=void 0,!b.isTouch&&b.button===0&&!F?_o(b):!b.isTouch&&b.button===1&&(zr.current=b.location))},[Z,_o]),[Za,qa]=d.useState(),Cu=d.useCallback(b=>{if(b.kind!==Xn||ne!=="multi")return;const H=ya.value?b.metaKey:b.ctrlKey,[F]=b.location,N=Z.columns;if(F<W)return;const j=it[F];let q=F,z=F;for(let X=F-1;X>=W&&vi(j.group,it[X].group);X--)q--;for(let X=F+1;X<it.length&&vi(j.group,it[X].group);X++)z++;if(kn(),H||b.isTouch||ut==="multi")if(N.hasAll([q,z+1])){let X=N;for(let J=q;J<=z;J++)X=X.remove(J);Xe(X,void 0,H)}else Xe(void 0,[q,z+1],H);else Xe(Qe.fromSingleSelection([q,z+1]),void 0,H)},[ne,kn,Z.columns,it,W,Xe,ut]),go=d.useRef(!1),zi=d.useCallback(async b=>{if(te!==void 0&&Ue!==void 0){const H=Gt.current.y,F=Gt.current.height;let N=te({x:b,y:H,width:1,height:Math.min(F,ze-H)},_.current.signal);typeof N!="object"&&(N=await N());const j=an[b-W],q=document.createElement("canvas").getContext("2d",{alpha:!1});if(q!==null){q.font=at.baseFontFull;const z=Kh(q,at,j,0,N,vr,ao,!1,Qt);Ue?.(j,z.width,b,z.width)}}},[an,te,ao,at,vr,Ue,W,ze,Qt]),[Sp,Ka]=d.useState(),mo=d.useCallback(async(b,H)=>{const F=b.current?.range;if(F===void 0||te===void 0||H.current===void 0)return;const N=H.current.range;if(S!==void 0){let X=!1;if(S({fillDestination:{...N,x:N.x-W},patternSource:{...F,x:F.x-W},preventDefault:()=>X=!0}),X)return}let j=te(F,_.current.signal);typeof j!="object"&&(j=await j());const q=j,z=[];for(let X=0;X<N.width;X++)for(let J=0;J<N.height;J++){const ae=[N.x+X,N.y+J];if(Vh(ae,F))continue;const Te=q[J%F.height][X%F.width];Ro(Te)||!Mo(Te)||z.push({location:ae,value:{...Te}})}zn(z),pn.current?.damage(z.map(X=>({cell:X.location})))},[te,zn,S,W]),ku=d.useCallback(()=>{if(Z.current===void 0||Z.current.range.width<=1)return;const b={...Z,current:{...Z.current,range:{...Z.current.range,width:1}}};mo(b,Z)},[mo,Z]),Su=d.useCallback(()=>{if(Z.current===void 0||Z.current.range.height<=1)return;const b={...Z,current:{...Z.current,range:{...Z.current.range,height:1}}};mo(b,Z)},[mo,Z]),Mp=d.useCallback((b,H)=>{const F=s;if(u(void 0),ja(void 0),Ka(void 0),No.current=!1,H)return;if(F?.fillHandle===!0&&Z.current!==void 0&&F.previousSelection?.current!==void 0){if(Hr===void 0)return;const Te={...Z,current:{...Z.current,range:tf(F.previousSelection.current.range,Hr)}};mo(F.previousSelection,Te),he(Te,!0);return}const[N,j]=b.location,[q,z]=zr.current??[],X=()=>{go.current=!0},J=Te=>{const It=Te.isTouch||q===N&&z===j;if(It&&E?.([N-W,j],{...Te,preventDefault:X}),Te.button===1)return!go.current;if(!go.current){const Ke=En(b.location),Ye=Qt(Ke);if(Ye!==void 0&&Ye.onClick!==void 0&&It){const Je=Ye.onClick({...Te,cell:Ke,posX:Te.localEventX,posY:Te.localEventY,bounds:Te.bounds,theme:$o(Ke,b.location),preventDefault:X});Je!==void 0&&!Ro(Je)&&So(Je)&&(zn([{location:Te.location,value:Je}]),pn.current?.damage([{cell:Te.location}]))}if(go.current||Z.current===void 0)return!1;let Ze=!1;switch(Ke.activationBehaviorOverride??ke){case"double-click":case"second-click":{if(F?.previousSelection?.current?.cell===void 0)break;const[Je,vt]=Z.current.cell,[Jt,bo]=F.previousSelection.current.cell;Ze=N===Je&&N===Jt&&j===vt&&j===bo&&(Te.isDoubleClick===!0||ke==="second-click");break}case"single-click":{Ze=!0;break}}if(Ze){const Je={inputType:"pointer",pointerActivation:Te.isDoubleClick===!0?"double-click":Ke.activationBehaviorOverride??ke,pointerType:Te.isTouch?"touch":"mouse"};return R?.([N-W,j],Je),ho(Te.bounds,Je),!0}}return!1},ae=b.location[0]-W;if(b.isTouch){const Te=Gt.current,It=xu.current;if(Te.x!==It.x||Te.y!==It.y)return;if(b.isLongTouch===!0){if(b.kind==="cell"&&hi(Z.current?.cell,b.location)){$?.([ae,b.location[1]],{...b,preventDefault:X});return}else if(b.kind==="header"&&Z.columns.hasIndex(N)){ie?.(ae,{...b,preventDefault:X});return}else if(b.kind===Xn){if(ae<0)return;Q?.(ae,{...b,preventDefault:X});return}}b.kind==="cell"?J(b)||_o(b):b.kind===Xn?Y?.(ae,{...b,preventDefault:X}):(b.kind===Sr&&I?.(ae,{...b,preventDefault:X}),_o(b));return}if(b.kind==="header"){if(ae<0)return;b.isEdge?b.isDoubleClick===!0&&zi(N):b.button===0&&N===q&&j===z&&I?.(ae,{...b,preventDefault:X})}if(b.kind===Xn){if(ae<0)return;b.button===0&&N===q&&j===z&&(Y?.(ae,{...b,preventDefault:X}),go.current||Cu(b))}b.kind==="cell"&&(b.button===0||b.button===1)&&J(b),zr.current=void 0},[s,Z,W,Hr,mo,he,E,En,Qt,ke,$o,zn,R,ho,$,ie,Q,_o,Y,I,zi,Cu]),Ip=d.useCallback(b=>{const H={...b,location:[b.location[0]-W,b.location[1]]};rt?.(H),s!==void 0&&b.buttons===0&&(u(void 0),ja(void 0),Ka(void 0),No.current=!1),Ka(F=>No.current?[b.scrollEdge[0],0]:b.scrollEdge[0]===F?.[0]&&b.scrollEdge[1]===F[1]?F:s===void 0||(tr.current?.location[0]??0)<W?void 0:b.scrollEdge)},[s,rt,W]),Rp=d.useCallback((b,H)=>{dt?.(b-W,H)},[dt,W]),Ep=d.useCallback((b,H)=>{je?.(b-W,H)},[je,W]),vo=Z?.current?.cell,Tp=d.useCallback((b,H,F,N,j,q)=>{er.current=!1;let z=vo;z!==void 0&&(z=[z[0]-W,z[1]]);const X=Fe===0?void 0:{x:0,y:b.y,width:Fe,height:b.height},J=[];X!==void 0&&J.push(X),ct>0&&(J.push({x:b.x-W,y:ze-ct,width:b.width,height:ct}),Fe>0&&J.push({x:0,y:ze-ct,width:Fe,height:ct}));const ae={x:b.x-W,y:b.y,width:b.width,height:Ht&&b.y+b.height>=ze?b.height-1:b.height,tx:j,ty:q,extras:{selected:z,freezeRegion:X,freezeRegions:J}};Gt.current=ae,Oi(ae),co([H,F,N]),ln?.(ae,ae.tx,ae.ty,ae.extras)},[vo,W,Ht,ze,Fe,ct,Oi,ln]),Op=kr(M,d.useCallback((b,H)=>M?.(b-W,H-W)!==!1,[M,W])),Dp=kr(Me,d.useCallback((b,H)=>{Me?.(b-W,H-W),ne!=="none"&&Xe(Qe.fromSingleSelection(H),void 0,!0)},[ne,Me,W,Xe])),Qa=d.useRef(!1),Pp=d.useCallback(b=>{if(b.location[0]===0&&W>0){b.preventDefault();return}He?.({...b,location:[b.location[0]-W,b.location[1]]}),b.defaultPrevented()||(Qa.current=!0),u(void 0)},[He,W]),Ap=d.useCallback(()=>{Qa.current=!1},[]),Mu=$t?.selectionBehavior,Vi=d.useCallback(b=>{if(Mu!=="block-spanning")return;const{isGroupHeader:H,path:F,groupRows:N}=Fr(b);if(H)return[b,b];const j=F[F.length-1],q=b-j,z=b+N-j-1;return[q,z]},[Fr,Mu]),Ga=d.useRef(),Ja=d.useCallback(b=>{if(!sf(b,Ga.current)&&(Ga.current=b,!(tr?.current?.button!==void 0&&tr.current.button>=1))){if(b.buttons!==0&&s!==void 0&&tr.current?.location[0]===0&&W===1&&me==="multi"&&s.previousSelection&&!s.previousSelection.rows.hasIndex(tr.current.location[1])&&Z.rows.hasIndex(tr.current.location[1])){const H=Math.min(tr.current.location[1],b.location[1]),F=Math.max(tr.current.location[1],b.location[1])+1;ot(Qe.fromSingleSelection([H,F]),void 0,!1)}else if(b.buttons!==0&&s!==void 0&&Z.current!==void 0&&!Qa.current&&!No.current&&($e==="rect"||$e==="multi-rect")){const[H,F]=Z.current.cell;let[N,j]=b.location;if(j<0&&(j=Gt.current.y),s.fillHandle===!0&&s.previousSelection?.current!==void 0){const q=s.previousSelection.current.range;j=Math.min(j,Ht?ze-1:ze);const z=Nb(q,N,j,Tt);ja(z)}else{if(Ht&&F===ze)return;if(Ht&&j===ze)if(b.kind===xa)j--;else return;N=Math.max(N,W);const q=Vi(F);j=q===void 0?j:Vn(j,q[0],q[1]);const z=N-H,X=j-F,J={x:z>=0?H:N,y:X>=0?F:j,width:Math.abs(z)+1,height:Math.abs(X)+1};yt({...Z.current,range:J},!0,!1,"drag")}}Mt?.({...b,location:[b.location[0]-W,b.location[1]]})}},[s,W,me,Z,$e,Mt,ot,Ht,ze,Tt,Vi,yt]),Lp=d.useCallback(()=>{const b=Ga.current;if(b===void 0)return;const[H,F]=b.scrollEdge;let[N,j]=b.location;const q=Gt.current;H===-1?N=q.extras?.freezeRegion?.x??q.x:H===1&&(N=q.x+q.width),F===-1?j=Math.max(0,q.y):F===1&&(j=Math.min(ze-1,q.y+q.height)),N=Vn(N,0,it.length-1),j=Vn(j,0,ze-1),Ja({...b,location:[N,j]})},[it.length,Ja,ze]);nw(Sp,Nt,Lp);const jn=d.useCallback(b=>{if(Z.current===void 0)return;const[H,F]=b,[N,j]=Z.current.cell,q=Z.current.range;let z=q.x,X=q.x+q.width,J=q.y,ae=q.y+q.height;const[Te,It]=Vi(j)??[0,ze-1],Ke=It+1;if(F!==0)switch(F){case 2:{ae=Ke,J=j,Ut(0,ae,"vertical");break}case-2:{J=Te,ae=j+1,Ut(0,J,"vertical");break}case 1:{J<j?(J++,Ut(0,J,"vertical")):(ae=Math.min(Ke,ae+1),Ut(0,ae,"vertical"));break}case-1:{ae>j+1?(ae--,Ut(0,ae,"vertical")):(J=Math.max(Te,J-1),Ut(0,J,"vertical"));break}default:gi()}if(H!==0)if(H===2)X=it.length,z=N,Ut(X-1-W,0,"horizontal");else if(H===-2)z=W,X=N+1,Ut(z-W,0,"horizontal");else{let Ye=[];if(te!==void 0){const Ze=te({x:z,y:J,width:X-z-W,height:ae-J},_.current.signal);typeof Ze=="object"&&(Ye=hw(Ze))}if(H===1){let Ze=!1;if(z<N){if(Ye.length>0){const Je=Ir(z+1,N+1).find(vt=>!Ye.includes(vt-W));Je!==void 0&&(z=Je,Ze=!0)}else z++,Ze=!0;Ze&&Ut(z,0,"horizontal")}Ze||(X=Math.min(it.length,X+1),Ut(X-1-W,0,"horizontal"))}else if(H===-1){let Ze=!1;if(X>N+1){if(Ye.length>0){const Je=Ir(X-1,N,-1).find(vt=>!Ye.includes(vt-W));Je!==void 0&&(X=Je,Ze=!0)}else X--,Ze=!0;Ze&&Ut(X-W,0,"horizontal")}Ze||(z=Math.max(W,z-1),Ut(z-W,0,"horizontal"))}else gi()}yt({cell:Z.current.cell,range:{x:z,y:J,width:X-z,height:ae-J}},!0,!1,"keyboard-select")},[te,Vi,Z,it.length,W,ze,Ut,yt]),el=d.useRef(Nn);el.current=Nn;const yr=d.useCallback((b,H,F,N)=>{const j=gn-(F?0:1);b=Vn(b,W,an.length-1+W),H=Vn(H,0,j);const q=vo?.[0],z=vo?.[1];if(b===q&&H===z)return!1;if(N&&Z.current!==void 0){const X=[...Z.current.rangeStack];(Z.current.range.width>1||Z.current.range.height>1)&&X.push(Z.current.range),he({...Z,current:{cell:[b,H],range:{x:b,y:H,width:1,height:1},rangeStack:X}},!0)}else yt({cell:[b,H],range:{x:b,y:H,width:1,height:1}},!0,!1,"keyboard-nav");return c.current!==void 0&&c.current[0]===b&&c.current[1]===H&&(c.current=void 0),el.current&&Ut(b-W,H),!0},[gn,W,an.length,vo,Z,Ut,he,yt]),Hp=d.useCallback((b,H)=>{o?.cell!==void 0&&b!==void 0&&So(b)&&(zn([{location:o.cell,value:b}]),window.requestAnimationFrame(()=>{pn.current?.damage([{cell:o.cell}])})),kn(!0),i(void 0);const[F,N]=H;if(Z.current!==void 0&&(F!==0||N!==0)){const j=Z.current.cell[1]===gn-1&&b!==void 0,q=Z.current.cell[0]===it.length-1&&b!==void 0;let z=!0;if(j&&N===1&&be!==void 0){z=!1;const X=Z.current.cell[0]+F,J=fo(X);br(J??X,!1)}if(q&&F===1&&Ge!==void 0){z=!1;const X=Z.current.cell[1]+N;Fi(X,!1)}z&&yr(Vn(Z.current.cell[0]+F,0,it.length-1),Vn(Z.current.cell[1]+N,0,gn-1),j,!1)}P?.(b,H)},[o?.cell,kn,Z,P,zn,gn,yr,it.length,br,Fi,be,Ge,fo]),Fp=d.useMemo(()=>`gdg-overlay-${dw++}`,[]),Vr=d.useCallback(b=>{kn();const H=[];for(let F=b.x;F<b.x+b.width;F++)for(let N=b.y;N<b.y+b.height;N++){const j=x([F-W,N]);if(!j.allowOverlay&&j.kind!==G.Boolean)continue;let q;if(j.kind===G.Custom){const z=Qt(j),X=z?.provideEditor?.({...j,location:[F-W,N]});z?.onDelete!==void 0?q=z.onDelete(j):t0(X)&&(q=X?.deletedValue?.(j))}else(So(j)&&j.allowOverlay||j.kind===G.Boolean)&&(q=Qt(j)?.onDelete?.(j));q!==void 0&&!Ro(q)&&So(q)&&H.push({location:[F,N],value:q})}zn(H),pn.current?.damage(H.map(F=>({cell:F.location})))},[kn,x,Qt,zn,W]),Bo=o!==void 0,Iu=d.useCallback(b=>{const H=()=>{b.stopPropagation(),b.preventDefault()},F={didMatch:!1},{bounds:N}=b,j=Z.columns,q=Z.rows,z=Jn;if(!Bo&&et(z.clear,b,F))he(Qi,!1),_t?.();else if(!Bo&&et(z.selectAll,b,F))he({columns:Qe.empty(),rows:Qe.empty(),current:{cell:Z.current?.cell??[W,0],range:{x:W,y:0,width:w.length,height:ze},rangeStack:[]}},!1);else if(et(z.search,b,F))a?.current?.focus({preventScroll:!0}),Ti(!0);else if(et(z.delete,b,F)){const Ze=Wt?.(Z)??!0;if(Ze!==!1){const Je=Ze===!0?Z:Ze;if(Je.current!==void 0){Vr(Je.current.range);for(const vt of Je.current.rangeStack)Vr(vt)}for(const vt of Je.rows)Vr({x:W,y:vt,width:w.length,height:1});for(const vt of Je.columns)Vr({x:vt,y:0,width:1,height:ze})}}if(F.didMatch)return H(),!0;if(Z.current===void 0)return!1;let[X,J]=Z.current.cell;const[,ae]=Z.current.cell;let Te=!1,It=!1;if(et(z.scrollToSelectedCell,b,F))Ni.current(X-W,J);else if(ne!=="none"&&et(z.selectColumn,b,F))j.hasIndex(X)?Xe(j.remove(X),void 0,!0):ne==="single"?Xe(Qe.fromSingleSelection(X),void 0,!0):Xe(void 0,X,!0);else if(me!=="none"&&et(z.selectRow,b,F))q.hasIndex(J)?ot(q.remove(J),void 0,!0):me==="single"?ot(Qe.fromSingleSelection(J),void 0,!0):ot(void 0,J,!0);else if(!Bo&&N!==void 0&&et(z.activateCell,b,F))if(J===ze&&Ht)window.setTimeout(()=>{const Ze=fo(X);br(Ze??X)},0);else{const Ze={inputType:"keyboard",key:b.key};R?.([X-W,J],Ze),ho(N,Ze)}else Z.current.range.height>1&&et(z.downFill,b,F)?Su():Z.current.range.width>1&&et(z.rightFill,b,F)?ku():et(z.goToNextPage,b,F)?J+=Math.max(1,Gt.current.height-4):et(z.goToPreviousPage,b,F)?J-=Math.max(1,Gt.current.height-4):et(z.goToFirstCell,b,F)?(i(void 0),J=0,X=0):et(z.goToLastCell,b,F)?(i(void 0),J=Number.MAX_SAFE_INTEGER,X=Number.MAX_SAFE_INTEGER):et(z.selectToFirstCell,b,F)?(i(void 0),jn([-2,-2])):et(z.selectToLastCell,b,F)?(i(void 0),jn([2,2])):Bo?(et(z.closeOverlay,b,F)&&i(void 0),et(z.acceptOverlayDown,b,F)&&(i(void 0),J++),et(z.acceptOverlayUp,b,F)&&(i(void 0),J--),et(z.acceptOverlayLeft,b,F)&&(i(void 0),X--),et(z.acceptOverlayRight,b,F)&&(i(void 0),X++)):(et(z.goDownCell,b,F)?J+=1:et(z.goUpCell,b,F)?J-=1:et(z.goRightCell,b,F)?X+=1:et(z.goLeftCell,b,F)?X-=1:et(z.goDownCellRetainSelection,b,F)?(J+=1,Te=!0):et(z.goUpCellRetainSelection,b,F)?(J-=1,Te=!0):et(z.goRightCellRetainSelection,b,F)?(X+=1,Te=!0):et(z.goLeftCellRetainSelection,b,F)?(X-=1,Te=!0):et(z.goToLastRow,b,F)?J=ze-1:et(z.goToFirstRow,b,F)?J=Number.MIN_SAFE_INTEGER:et(z.goToLastColumn,b,F)?X=Number.MAX_SAFE_INTEGER:et(z.goToFirstColumn,b,F)?X=Number.MIN_SAFE_INTEGER:($e==="rect"||$e==="multi-rect")&&(et(z.selectGrowDown,b,F)?jn([0,1]):et(z.selectGrowUp,b,F)?jn([0,-1]):et(z.selectGrowRight,b,F)?jn([1,0]):et(z.selectGrowLeft,b,F)?jn([-1,0]):et(z.selectToLastRow,b,F)?jn([0,2]):et(z.selectToFirstRow,b,F)?jn([0,-2]):et(z.selectToLastColumn,b,F)?jn([2,0]):et(z.selectToFirstColumn,b,F)&&jn([-2,0])),It=F.didMatch);if(Bn!==void 0&&Bn!=="normal"&&J!==ae){const Ze=Bn==="skip-up"||Bn==="skip"||Bn==="block",Je=Bn==="skip-down"||Bn==="skip"||Bn==="block",vt=J<ae;if(vt&&Ze){for(;J>=0&&Fr(J).isGroupHeader;)J--;J<0&&(J=ae)}else if(!vt&&Je){for(;J<ze&&Fr(J).isGroupHeader;)J++;J>=ze&&(J=ae)}}const Ke=yr(X,J,!1,Te),Ye=F.didMatch;return Ye&&(Ke||!It||xn)&&H(),Ye},[Bn,Bo,Z,Jn,ne,me,$e,W,Fr,ze,yr,he,_t,w.length,Wt,xn,Vr,Xe,ot,Ht,fo,br,R,ho,Su,ku,jn]),jo=d.useCallback(b=>{let H=!1;if(U!==void 0&&U({...b,...b.location&&{location:[b.location[0]-W,b.location[1]]},cancel:()=>{H=!0}}),H||Iu(b)||Z.current===void 0)return;const[F,N]=Z.current.cell,j=Gt.current;if(De&&!b.metaKey&&!b.ctrlKey&&Z.current!==void 0&&b.key.length===1&&/[\p{L}\p{M}\p{N}\p{S}\p{P}]/u.test(b.key)&&b.bounds!==void 0&&Mo(x([F-W,Math.max(0,Math.min(N,ze-1))]))){if((!Ht||N!==ze)&&(j.y>N||N>j.y+j.height||j.x>F||F>j.x+j.width))return;const q={inputType:"keyboard",key:b.key};R?.([F-W,N],q),ho(b.bounds,q,b.key),b.stopPropagation(),b.preventDefault()}},[De,U,Iu,Z,x,W,ze,Ht,R,ho]),zp=d.useCallback((b,H)=>{const F=b.location[0]-W;if(b.kind==="header"&&ie?.(F,{...b,preventDefault:H}),b.kind===Xn){if(F<0)return;Q?.(F,{...b,preventDefault:H})}if(b.kind==="cell"){const[N,j]=b.location;$?.([F,j],{...b,preventDefault:H}),Cv(Z,b.location)||yr(N,j,!1,!1)}},[Z,$,Q,ie,W,yr]),tl=d.useCallback(async b=>{if(!Jn.paste)return;function H(z,X,J,ae){const Te=typeof J=="object"?J?.join(`
|
|
183
|
-
`)??"":J?.toString()??"";if(!Ro(z)&&Mo(z)&&z.readonly!==!0){const It=T?.(Te,z);if(It!==void 0&&So(It))return{location:X,value:It};const Ke=Qt(z);if(Ke===void 0)return;if(Ke.kind===G.Custom){Dn(z.kind===G.Custom);const Ye=Ke.onPaste?.(Te,z.data);return Ye===void 0?void 0:{location:X,value:{...z,data:Ye}}}else{const Ye=Ke.onPaste?.(Te,z,{formatted:ae,formattedString:typeof ae=="string"?ae:ae?.join(`
|
|
184
|
-
`),rawValue:J});return Ye===void 0?void 0:(Dn(Ye.kind===z.kind),{location:X,value:Ye})}}}const F=Z.columns,N=Z.rows,j=Nt.current?.contains(document.activeElement)===!0||l.current?.contains(document.activeElement)===!0;let q;if(Z.current!==void 0?q=[Z.current.range.x,Z.current.range.y]:F.length===1?q=[F.first()??0,0]:N.length===1&&(q=[W,N.first()??0]),j&&q!==void 0){let z,X;const J="text/plain",ae="text/html";if(navigator.clipboard.read!==void 0){const Ye=await navigator.clipboard.read();for(const Ze of Ye){if(Ze.types.includes(ae)){const Je=await(await Ze.getType(ae)).text(),vt=Jc(Je);if(vt!==void 0){z=vt;break}}Ze.types.includes(J)&&(X=await(await Ze.getType(J)).text())}}else if(navigator.clipboard.readText!==void 0)X=await navigator.clipboard.readText();else if(b!==void 0&&b?.clipboardData!==null){if(b.clipboardData.types.includes(ae)){const Ye=b.clipboardData.getData(ae);z=Jc(Ye)}z===void 0&&b.clipboardData.types.includes(J)&&(X=b.clipboardData.getData(J))}else return;const[Te,It]=q,Ke=[];do{if(Pe===void 0){const Ye=En(q),Ze=X??z?.map(vt=>vt.map(Jt=>Jt.rawValue).join(" ")).join(" ")??"",Je=H(Ye,q,Ze,void 0);Je!==void 0&&Ke.push(Je);break}if(z===void 0){if(X===void 0)return;z=q1(X)}if(Pe===!1||typeof Pe=="function"&&Pe?.([q[0]-W,q[1]],z.map(Ye=>Ye.map(Ze=>Ze.rawValue?.toString()??"")))!==!0)return;for(const[Ye,Ze]of z.entries()){if(Ye+It>=ze)break;for(const[Je,vt]of Ze.entries()){const Jt=[Je+Te,Ye+It],[bo,Bi]=Jt;if(bo>=it.length||Bi>=gn)continue;const Uo=En(Jt),nr=H(Uo,Jt,vt.rawValue,vt.formatted);nr!==void 0&&Ke.push(nr)}}}while(!1);zn(Ke),pn.current?.damage(Ke.map(Ye=>({cell:Ye.location})))}},[T,Qt,En,Z,Jn.paste,Nt,it.length,zn,gn,Pe,W,ze]);Sn("paste",tl,h,!1,!0);const Wo=d.useCallback(async(b,H)=>{if(!Jn.copy)return;const F=H===!0||Nt.current?.contains(document.activeElement)===!0||l.current?.contains(document.activeElement)===!0,N=Z.columns,j=Z.rows,q=(z,X)=>{if(!ye)td(z,X,b);else{const J=X.map(ae=>({kind:G.Text,data:w[ae].title,displayData:w[ae].title,allowOverlay:!1}));td([J,...z],X,b)}};if(F&&te!==void 0){if(Z.current!==void 0){let z=te(Z.current.range,_.current.signal);typeof z!="object"&&(z=await z()),q(z,Ir(Z.current.range.x-W,Z.current.range.x+Z.current.range.width-W))}else if(j!==void 0&&j.length>0){const z=[...j].map(X=>{const J=te({x:W,y:X,width:w.length,height:1},_.current.signal);return typeof J=="object"?J[0]:J().then(ae=>ae[0])});if(z.some(X=>X instanceof Promise)){const X=await Promise.all(z);q(X,Ir(w.length))}else q(z,Ir(w.length))}else if(N.length>0){const z=[],X=[];for(const J of N){let ae=te({x:J,y:0,width:1,height:ze},_.current.signal);typeof ae!="object"&&(ae=await ae()),z.push(ae),X.push(J-W)}if(z.length===1)q(z[0],X);else{const J=z.reduce((ae,Te)=>ae.map((It,Ke)=>[...It,...Te[Ke]]));q(J,X)}}}},[w,te,Z,Jn.copy,W,Nt,ze,ye]);Sn("copy",Wo,h,!1,!1);const Vp=d.useCallback(async b=>{if(!(!Jn.cut||!(Nt.current?.contains(document.activeElement)===!0||l.current?.contains(document.activeElement)===!0))&&(await Wo(b),Z.current!==void 0)){let H={current:{cell:Z.current.cell,range:Z.current.range,rangeStack:[]},rows:Qe.empty(),columns:Qe.empty()};const F=Wt?.(H);if(F===!1||(H=F===!0?H:F,H.current===void 0))return;Vr(H.current.range)}},[Vr,Z,Jn.cut,Wo,Nt,Wt]);Sn("cut",Vp,h,!1,!1);const $p=d.useCallback((b,H)=>{if(pe!==void 0){W!==0&&(b=b.map(j=>[j[0]-W,j[1]])),pe(b,H);return}if(b.length===0||H===-1)return;const[F,N]=b[H];c.current!==void 0&&c.current[0]===F&&c.current[1]===N||(c.current=[F,N],yr(F,N,!1,!1))},[pe,W,yr]),[$i,_i]=kt?.current?.cell??[],Ni=d.useRef(Ut);Ni.current=Ut,d.useLayoutEffect(()=>{el.current&&!er.current&&$i!==void 0&&_i!==void 0&&($i!==ue.current?.current?.cell[0]||_i!==ue.current?.current?.cell[1])&&Ni.current($i,_i),er.current=!1},[$i,_i]);const Ru=Z.current!==void 0&&(Z.current.cell[0]>=it.length||Z.current.cell[1]>=gn);d.useLayoutEffect(()=>{Ru&&he(Qi,!1)},[Ru,he]);const _p=d.useMemo(()=>Ht===!0&&Ee?.tint===!0?Qe.fromSingleSelection(gn-1):Qe.empty(),[gn,Ht,Ee?.tint]),Np=d.useCallback(b=>typeof nn=="boolean"?nn:nn?.(b-W)??!0,[W,nn]),Bp=d.useMemo(()=>{if(Za===void 0||l.current===null)return null;const{bounds:b,group:H}=Za,F=l.current.getBoundingClientRect();return d.createElement(V1,{bounds:b,group:H,canvasBounds:F,onClose:()=>qa(void 0),onFinish:N=>{qa(void 0),ge?.(H,N)}})},[ge,Za]),jp=Math.min(it.length,Fe+(Cn?1:0));d.useImperativeHandle(t,()=>({appendRow:(b,H)=>br(b+W,H),appendColumn:(b,H)=>Fi(b,H),updateCells:b=>(W!==0&&(b=b.map(H=>({cell:[H.cell[0]+W,H.cell[1]]}))),pn.current?.damage(b)),getBounds:(b,H)=>{if(!(l?.current===null||Nt?.current===null)){if(b===void 0&&H===void 0){const F=l.current.getBoundingClientRect(),N=F.width/Nt.current.clientWidth;return{x:F.x-Nt.current.scrollLeft*N,y:F.y-Nt.current.scrollTop*N,width:Nt.current.scrollWidth*N,height:Nt.current.scrollHeight*N}}return pn.current?.getBounds((b??0)+W,H)}},focus:()=>pn.current?.focus(),emit:async b=>{switch(b){case"delete":jo({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":jo({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":jo({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 Wo(void 0,!0);break;case"paste":await tl();break}},scrollTo:Ut,remeasureColumns:b=>{for(const H of b)zi(H+W)},getMouseArgsForPosition:(b,H,F)=>{if(pn?.current===null)return;const N=pn.current.getMouseArgsForPosition(b,H,F);if(N!==void 0)return{...N,location:[N.location[0]-W,N.location[1]]}}}),[br,Fi,zi,Nt,Wo,jo,tl,W,Ut]);const[Eu,Tu]=vo??[],Wp=d.useCallback(b=>{const[H,F]=b;if(F===-1){ne!=="none"&&(Xe(Qe.fromSingleSelection(H),void 0,!1),kn());return}Eu===H&&Tu===F||(yt({cell:b,range:{x:H,y:F,width:1,height:1}},!0,!1,"keyboard-nav"),Ut(H,F))},[ne,kn,Ut,Eu,Tu,yt,Xe]),[Up,Xp]=d.useState(!1),Ou=d.useRef(Ch(b=>{Xp(b)},5)),Yp=d.useCallback(()=>{Ou.current(!0),Z.current===void 0&&Z.columns.length===0&&Z.rows.length===0&&s===void 0&&yt({cell:[W,Di],range:{x:W,y:Di,width:1,height:1}},!0,!1,"keyboard-select")},[Di,Z,s,W,yt]),Zp=d.useCallback(()=>{Ou.current(!1)},[]),[qp,Kp]=d.useMemo(()=>{let b;const H=pt?.scrollbarWidthOverride??ls(),F=ze+(Ht?1:0);if(typeof Gn=="number")b=fn+F*Gn;else{let j=0;const q=Math.min(F,10);for(let z=0;z<q;z++)j+=Gn(z);j=Math.floor(j/q),b=fn+F*j}b+=H;const N=it.reduce((j,q)=>q.width+j,0)+H;return[`${Math.min(1e5,N)}px`,`${Math.min(1e5,b)}px`]},[it,pt?.scrollbarWidthOverride,Gn,ze,Ht,fn]),Qp=d.useMemo(()=>Fv(at),[at]);return d.createElement(Zh.Provider,{value:at},d.createElement(J1,{style:Qp,className:K,inWidth:m??qp,inHeight:y??Kp},d.createElement(L1,{fillHandle:Ot,drawFocusRing:sr,experimental:pt,fixedShadowX:bn,fixedShadowY:lr,getRowThemeOverride:Pr,headerIcons:Kn,imageWindowLoader:B,initialSize:Ne,isDraggable:We,onDragLeave:Dt,onRowMoved:qt,overscrollX:_a,overscrollY:Na,preventDiagonalScrolling:wn,rightElement:jt,rightElementProps:yn,smoothScrollX:Qr,smoothScrollY:Gr,className:K,enableGroups:Fn,onCanvasFocused:Yp,onCanvasBlur:Zp,canvasRef:l,onContextMenu:zp,theme:at,cellXOffset:xp,cellYOffset:Di,accessibilityHeight:hr.height,onDragEnd:Ap,columns:it,nonGrowWidth:At,drawHeader:gt,onColumnProposeMove:Op,drawCell:un,disabledRows:_p,freezeColumns:jp,lockColumns:W,firstColAccessible:W===0,getCellContent:En,minColumnWidth:vr,maxColumnWidth:ao,searchInputRef:a,showSearch:uo,onSearchClose:Ba,highlightRegions:Cp,getCellsForSelection:te,getGroupDetails:Wa,headerHeight:Vo,isFocused:Up,groupHeaderHeight:Fn?lo:0,freezeTrailingRows:ct+(Ht&&Ee?.sticky===!0?1:0),hasAppendRow:Ht,onColumnResize:Ue,onColumnResizeEnd:Ce,onColumnResizeStart:qe,onCellFocused:Wp,onColumnMoved:Dp,onDragStart:Pp,onHeaderMenuClick:Rp,onHeaderIndicatorClick:Ep,onItemHovered:Ja,isFilling:s?.fillHandle===!0,onMouseMove:Ip,onKeyDown:jo,onKeyUp:re,onMouseDown:kp,onMouseUp:Mp,onDragOverCell:cn,onDrop:zt,onSearchResultsChanged:$p,onVisibleRegionChanged:Tp,clientSize:Vt,rowHeight:Gn,searchResults:le,searchValue:L,onSearchValueChange:V,rows:gn,scrollRef:Nt,selection:Z,translateX:hr.tx,translateY:hr.ty,verticalBorder:Np,gridRef:pn,getCellRenderer:Qt,resizeIndicator:no}),Bp,o!==void 0&&d.createElement(d.Suspense,{fallback:null},d.createElement(cw,{...o,validateCell:Re,bloom:O,id:Fp,getCellRenderer:Qt,className:pt?.isSubGrid===!0?"click-outside-ignore":void 0,provideEditor:Mn,imageEditorOverride:g,portalElementRef:dn,onFinishEditing:Hp,markdownDivCreateNode:f,isOutsideClick:to,customEventTarget:pt?.eventTarget}))))},pw=d.forwardRef(fw);function od(e){const{cell:t,posX:n,posY:r,bounds:o,theme:i}=e,{width:a,height:l,x:s,y:u}=o,c=t.maxSize??i.checkboxMaxSize,h=Math.floor(o.y+l/2),g=Mh(c,l,i.cellVerticalPadding),p=Sh(t.contentAlign??"center",s,a,i.cellHorizontalPadding,g),f=kh(p,h,g),m=Ih(s+n,u+r,f);return Es(t)&&m}const gw={getAccessibilityString:e=>e.data?.toString()??"false",kind:G.Boolean,needsHover:!0,useLabel:!1,needsHoverPosition:!0,measure:()=>50,draw:e=>mw(e,e.cell.data,Es(e.cell),e.cell.maxSize??e.theme.checkboxMaxSize,e.cell.hoverEffectIntensity??.35),onDelete:e=>({...e,data:!1}),onSelect:e=>{od(e)&&e.preventDefault()},onClick:e=>{if(od(e))return{...e.cell,data:cf(e.cell.data)}},onPaste:(e,t)=>{let n=fa;return e.toLowerCase()==="true"?n=!0:e.toLowerCase()==="false"?n=!1:e.toLowerCase()==="indeterminate"&&(n=Rs),n===t.data?void 0:{...t,data:n}}};function mw(e,t,n,r,o){if(!n&&t===fa)return;const{ctx:i,hoverAmount:a,theme:l,rect:s,highlighted:u,hoverX:c,hoverY:h,cell:{contentAlign:g}}=e,{x:p,y:f,width:m,height:y}=s;let w=!1;if(o>0){let v=n?1-o+o*a:.4;if(t===fa&&(v*=a),v===0)return;v<1&&(w=!0,i.globalAlpha=v)}Us(i,l,t,p,f,m,y,u,c,h,r,g),w&&(i.globalAlpha=1)}const vw=hn("div")({name:"BubblesOverlayEditorStyle",class:"gdg-b1ygi5by",propsAsIs:!1}),bw=e=>{const{bubbles:t}=e;return d.createElement(vw,null,t.map((n,r)=>d.createElement("div",{key:r,className:"boe-bubble"},n)),d.createElement("textarea",{className:"gdg-input",autoFocus:!0}))},ww={getAccessibilityString:e=>Rh(e.data),kind:G.Bubble,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:(e,t,n)=>{const r=t.data.reduce((o,i)=>e.measureText(i).width+o+n.bubblePadding*2+n.bubbleMargin,0);return t.data.length===0?n.cellHorizontalPadding*2:r+2*n.cellHorizontalPadding-n.bubbleMargin},draw:e=>yw(e,e.cell.data),provideEditor:()=>e=>{const{value:t}=e;return d.createElement(bw,{bubbles:t.data})},onPaste:()=>{}};function yw(e,t){const{rect:n,theme:r,ctx:o,highlighted:i}=e,{x:a,y:l,width:s,height:u}=n;let c=a+r.cellHorizontalPadding;const h=[];for(const g of t){if(c>a+s)break;const p=Tr(g,o,r.baseFontFull).width;h.push({x:c,width:p}),c+=p+r.bubblePadding*2+r.bubbleMargin}o.beginPath();for(const g of h)Zn(o,g.x,l+(u-r.bubbleHeight)/2,g.width+r.bubblePadding*2,r.bubbleHeight,r.roundingRadius??r.bubbleHeight/2);o.fillStyle=i?r.bgBubbleSelected:r.bgBubble,o.fill();for(const[g,p]of h.entries())o.beginPath(),o.fillStyle=r.textBubble,o.fillText(t[g],p.x+r.bubblePadding,l+u/2+qn(o,r))}const xw=hn("div")({name:"DrilldownOverlayEditorStyle",class:"gdg-d4zsq0x",propsAsIs:!1}),Cw=e=>{const{drilldowns:t}=e;return d.createElement(xw,null,t.map((n,r)=>d.createElement("div",{key:r,className:"doe-bubble"},n.img!==void 0&&d.createElement("img",{src:n.img}),d.createElement("div",null,n.text))))},kw={getAccessibilityString:e=>Rh(e.data.map(t=>t.text)),kind:G.Drilldown,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:(e,t,n)=>t.data.reduce((r,o)=>e.measureText(o.text).width+r+n.bubblePadding*2+n.bubbleMargin+(o.img!==void 0?18:0),0)+2*n.cellHorizontalPadding-4,draw:e=>Mw(e,e.cell.data),provideEditor:()=>e=>{const{value:t}=e;return d.createElement(Cw,{drilldowns:t.data})},onPaste:()=>{}},Wl={};function Sw(e,t,n,r){const o=Math.ceil(window.devicePixelRatio),i=5,a=n-i*2,l=4,s=n*o,u=r+i,c=r*3,h=(c+i*2)*o,g=`${e},${t},${o},${n}`;if(Wl[g]!==void 0)return{el:Wl[g],height:s,width:h,middleWidth:l*o,sideWidth:u*o,padding:i*o,dpr:o};const p=document.createElement("canvas"),f=p.getContext("2d");return f===null?null:(p.width=h,p.height=s,f.scale(o,o),Wl[g]=p,f.beginPath(),Zn(f,i,i,c,a,r),f.shadowColor="rgba(24, 25, 34, 0.4)",f.shadowBlur=1,f.fillStyle=e,f.fill(),f.shadowColor="rgba(24, 25, 34, 0.3)",f.shadowOffsetY=1,f.shadowBlur=5,f.fillStyle=e,f.fill(),f.shadowOffsetY=0,f.shadowBlur=0,f.shadowBlur=0,f.beginPath(),Zn(f,i+.5,i+.5,c,a,r),f.strokeStyle=t,f.lineWidth=1,f.stroke(),{el:p,height:s,width:h,sideWidth:u*o,middleWidth:r*o,padding:i*o,dpr:o})}function Mw(e,t){const{rect:n,theme:r,ctx:o,imageLoader:i,col:a,row:l}=e,{x:s,width:u}=n,c=r.baseFontFull,h=Ns(o,c),g=Math.min(n.height,Math.max(16,Math.ceil(h*r.lineHeight)*2)),p=Math.floor(n.y+(n.height-g)/2),f=g-10,m=r.bubblePadding,y=r.bubbleMargin;let w=s+r.cellHorizontalPadding;const v=r.roundingRadius??6,x=Sw(r.bgCell,r.drilldownBorder,g,v),E=[];for(const R of t){if(w>s+u)break;const S=Tr(R.text,o,c).width;let P=0;R.img!==void 0&&i.loadOrGetImage(R.img,a,l)!==void 0&&(P=f-8+4);const T=S+P+m*2;E.push({x:w,width:T}),w+=T+y}if(x!==null){const{el:R,height:S,middleWidth:P,sideWidth:T,width:C,dpr:A,padding:O}=x,I=T/A,M=O/A;for(const D of E){const k=Math.floor(D.x),Y=Math.floor(D.width),$=Y-(I-M)*2;o.imageSmoothingEnabled=!1,o.drawImage(R,0,0,T,S,k-M,p,I,g),$>0&&o.drawImage(R,T,0,P,S,k+(I-M),p,$,g),o.drawImage(R,C-T,0,T,S,k+Y-(I-M),p,I,g),o.imageSmoothingEnabled=!0}}o.beginPath();for(const[R,S]of E.entries()){const P=t[R];let T=S.x+m;if(P.img!==void 0){const C=i.loadOrGetImage(P.img,a,l);if(C!==void 0){const A=f-8;let O=0,I=0,M=C.width,D=C.height;M>D?(O+=(M-D)/2,M=D):D>M&&(I+=(D-M)/2,D=M),o.beginPath(),Zn(o,T,p+g/2-A/2,A,A,r.roundingRadius??3),o.save(),o.clip(),o.drawImage(C,O,I,M,D,T,p+g/2-A/2,A,A),o.restore(),T+=A+4}}o.beginPath(),o.fillStyle=r.textBubble,o.fillText(P.text,T,p+g/2+qn(o,r))}}const Iw={getAccessibilityString:e=>e.data.join(", "),kind:G.Image,needsHover:!1,useLabel:!1,needsHoverPosition:!1,draw:e=>Rw(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,o=r??O0;return d.createElement(o,{urls:t.data,canWrite:t.readonly!==!0,onCancel:n,onChange:i=>{n({...t,data:[i]})}})},onPaste:(e,t)=>{e=e.trim();const n=e.split(",").map(r=>{try{return new URL(r),r}catch{return}}).filter(r=>r!==void 0);if(!(n.length===t.data.length&&n.every((r,o)=>r===t.data[o])))return{...t,data:n}}},Ul=4;function Rw(e,t,n,r){const{rect:o,col:i,row:a,theme:l,ctx:s,imageLoader:u}=e,{x:c,y:h,height:g,width:p}=o,f=g-l.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,i,a);if(E!==void 0){m[v]=E;const R=E.width*(f/E.height);y+=R+Ul}}if(y===0)return;y-=Ul;let w=c+l.cellHorizontalPadding;r==="right"?w=Math.floor(c+p-l.cellHorizontalPadding-y):r==="center"&&(w=Math.floor(c+p/2-y/2));for(const v of m){if(v===void 0)continue;const x=v.width*(f/v.height);n>0&&(s.beginPath(),Zn(s,w,h+l.cellVerticalPadding,x,f,n),s.save(),s.clip()),s.drawImage(v,w,h+l.cellVerticalPadding,x,f),n>0&&s.restore(),w+=x+Ul}}function Ew(e,t){let n=e*49632+t*325176;return n^=n<<13,n^=n>>17,n^=n<<5,n/4294967295*2}const Tw={getAccessibilityString:()=>"",kind:G.Loading,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:()=>120,draw:e=>{const{cell:t,col:n,row:r,ctx:o,rect:i,theme:a}=e;if(t.skeletonWidth===void 0||t.skeletonWidth===0)return;let l=t.skeletonWidth;t.skeletonWidthVariability!==void 0&&t.skeletonWidthVariability>0&&(l+=Math.round(Ew(n,r)*t.skeletonWidthVariability));const s=a.cellHorizontalPadding;l+s*2>=i.width&&(l=i.width-s*2-1);const u=t.skeletonHeight??Math.min(18,i.height-2*a.cellVerticalPadding);Zn(o,i.x+s,i.y+(i.height-u)/2,l,u,a.roundingRadius??3),o.fillStyle=Xr(a.textDark,.1),o.fill()},onPaste:()=>{}},Ow=()=>e=>e.targetWidth,id=hn("div")({name:"MarkdownOverlayEditorStyle",class:"gdg-m1pnx84e",propsAsIs:!1,vars:{"m1pnx84e-0":[Ow(),"px"]}}),Dw=e=>{const{value:t,onChange:n,forceEditMode:r,createNode:o,targetRect:i,onFinish:a,validatedSelection:l}=e,s=t.data,u=t.readonly===!0,[c,h]=d.useState(s===""||r),g=d.useCallback(()=>{h(f=>!f)},[]),p=s?"gdg-ml-6":"";return c?d.createElement(id,{targetWidth:i.width-20},d.createElement(qr,{autoFocus:!0,highlight:!1,validatedSelection:l,value:s,onKeyDown:f=>{f.key==="Enter"&&f.stopPropagation()},onChange:n}),d.createElement("div",{className:`gdg-edit-icon gdg-checkmark-hover ${p}`,onClick:()=>a(t)},d.createElement(k0,null))):d.createElement(id,{targetWidth:i.width},d.createElement(dv,{contents:s,createNode:o}),!u&&d.createElement(d.Fragment,null,d.createElement("div",{className:"spacer"}),d.createElement("div",{className:`gdg-edit-icon gdg-edit-hover ${p}`,onClick:g},d.createElement(Ds,null))),d.createElement("textarea",{className:"gdg-md-edit-textarea gdg-input",autoFocus:!0}))},Pw={getAccessibilityString:e=>e.data?.toString()??"",kind:G.Markdown,needsHover:!1,needsHoverPosition:!1,drawPrep:Mi,measure:(e,t,n)=>{const r=t.data.split(`
|
|
185
|
-
`)[0];return e.measureText(r).width+2*n.cellHorizontalPadding},draw:e=>rr(e,e.cell.data,e.cell.contentAlign),onDelete:e=>({...e,data:""}),provideEditor:()=>e=>{const{onChange:t,value:n,target:r,onFinishedEditing:o,markdownDivCreateNode:i,forceEditMode:a,validatedSelection:l}=e;return d.createElement(Dw,{onFinish:o,targetRect:r,value:n,validatedSelection:l,onChange:s=>t({...n,data:s.target.value}),forceEditMode:a,createNode:i})},onPaste:(e,t)=>e===t.data?void 0:{...t,data:e}},Aw={getAccessibilityString:e=>e.row.toString(),kind:$n.Marker,needsHover:!0,needsHoverPosition:!1,drawPrep:Lw,measure:()=>44,draw:e=>Fw(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:o}=e,{width:i,height:a}=t,l=n.drawHandle?7+(i-7)/2:i/2,s=a/2;if(Math.abs(r-l)<=10&&Math.abs(o-s)<=10)return{...n,checked:!n.checked}},onPaste:()=>{}};function Lw(e,t){const{ctx:n,theme:r}=e,o=r.markerFontFull,i=t??{};return i?.font!==o&&(n.font=o,i.font=o),i.deprep=Hw,n.textAlign="center",i}function Hw(e){const{ctx:t}=e;t.textAlign="start"}function Fw(e,t,n,r,o,i){const{ctx:a,rect:l,hoverAmount:s,theme:u}=e,{x:c,y:h,width:g,height:p}=l,f=n?1:r==="checkbox-visible"?.6+.4*s:s;if(r!=="number"&&f>0){a.globalAlpha=f;const m=7*(n?s:1);if(Us(a,u,n,o?c+m:c,h,o?g-m:g,p,!0,void 0,void 0,u.checkboxMaxSize,"center",i),o){a.globalAlpha=s,a.beginPath();for(const y of[3,6])for(const w of[-5,-1,3])a.rect(c+y,h+p/2+w,2,2);a.fillStyle=u.textLight,a.fill(),a.beginPath()}a.globalAlpha=1}if(r==="number"||r==="both"&&!n){const m=t.toString(),y=u.markerFontFull,w=c+g/2;r==="both"&&s!==0&&(a.globalAlpha=1-s),a.fillStyle=u.textLight,a.font=y,a.fillText(m,w,h+p/2+qn(a,y)),s!==0&&(a.globalAlpha=1)}}const zw={getAccessibilityString:()=>"",kind:$n.NewRow,needsHover:!0,needsHoverPosition:!1,measure:()=>200,draw:e=>Vw(e,e.cell.hint,e.cell.icon),onPaste:()=>{}};function Vw(e,t,n){const{ctx:r,rect:o,hoverAmount:i,theme:a,spriteManager:l}=e,{x:s,y:u,width:c,height:h}=o;r.beginPath(),r.globalAlpha=i,r.rect(s+1,u+1,c,h-2),r.fillStyle=a.bgHeaderHovered,r.fill(),r.globalAlpha=1,r.beginPath();const g=t!=="";let p=0;if(n!==void 0){const f=h-8,m=s+8/2,y=u+8/2;l.drawSprite(n,"normal",r,m,y,f,a,g?1:i),p=f}else{p=24;const f=12,m=g?f:i*f,y=g?0:(1-i)*f*.5,w=a.cellHorizontalPadding+4;m>0&&(r.moveTo(s+w+y,u+h/2),r.lineTo(s+w+y+m,u+h/2),r.moveTo(s+w+y+m*.5,u+h/2-m*.5),r.lineTo(s+w+y+m*.5,u+h/2+m*.5),r.lineWidth=2,r.strokeStyle=a.bgIconHeader,r.lineCap="round",r.stroke())}r.fillStyle=a.textMedium,r.fillText(t,p+s+a.cellHorizontalPadding+.5,u+h/2+qn(r,a)),r.beginPath()}function ff(e,t,n,r,o,i,a){e.textBaseline="alphabetic";const l=$w(e,o,r,t,n?.fullSize??!1);e.beginPath(),Zn(e,l.x,l.y,l.width,l.height,t.roundingRadius??4),e.globalAlpha=i,e.fillStyle=n?.bgColor??Xr(t.textDark,.1),e.fill(),e.globalAlpha=1,e.fillStyle=t.textDark,e.textBaseline="middle",a?.("text")}function $w(e,t,n,r,o){const i=r.cellHorizontalPadding,a=r.cellVerticalPadding;if(o)return{x:t.x+i/2,y:t.y+a/2+1,width:t.width-i,height:t.height-a-1};const l=Tr(n,e,r.baseFontFull,"alphabetic"),s=t.height-a,u=Math.min(s,l.actualBoundingBoxAscent*2.5);return{x:t.x+i/2,y:t.y+(t.height-u)/2+1,width:l.width+i*3,height:u-1}}const _w=d.lazy(async()=>await Ss(()=>import("./number-overlay-editor-DJYV-edd-B_O-Ktcq.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]))),Nw={getAccessibilityString:e=>e.data?.toString()??"",kind:G.Number,needsHover:e=>e.hoverEffect===!0,needsHoverPosition:!1,useLabel:!0,drawPrep:Mi,draw:e=>{const{hoverAmount:t,cell:n,ctx:r,theme:o,rect:i,overrideCursor:a}=e,{hoverEffect:l,displayData:s,hoverEffectTheme:u}=n;l===!0&&t>0&&ff(r,o,u,s,i,t,a),rr(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:o}=e;return d.createElement(d.Suspense,{fallback:null},d.createElement(_w,{highlight:t,disabled:r.readonly===!0,value:r.data,fixedDecimals:r.fixedDecimals,allowNegative:r.allowNegative,thousandSeparator:r.thousandSeparator,decimalSeparator:r.decimalSeparator,validatedSelection:o,onChange:i=>n({...r,data:Number.isNaN(i.floatValue??0)?0:i.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}}},Bw={getAccessibilityString:()=>"",measure:()=>108,kind:G.Protected,needsHover:!1,needsHoverPosition:!1,draw:jw,onPaste:()=>{}};function jw(e){const{ctx:t,theme:n,rect:r}=e,{x:o,y:i,height:a}=r;t.beginPath();const l=2.5;let s=o+n.cellHorizontalPadding+l;const u=i+a/2,c=Math.cos(sc(30))*l,h=Math.sin(sc(30))*l;for(let g=0;g<12;g++)t.moveTo(s,u-l),t.lineTo(s,u+l),t.moveTo(s+c,u-h),t.lineTo(s-c,u+h),t.moveTo(s-c,u-h),t.lineTo(s+c,u+h),s+=8;t.lineWidth=1.1,t.lineCap="square",t.strokeStyle=n.textLight,t.stroke()}const Ww={getAccessibilityString:e=>e.data?.toString()??"",kind:G.RowID,needsHover:!1,needsHoverPosition:!1,drawPrep:(e,t)=>Mi(e,t,e.theme.textLight),draw:e=>rr(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:o}=e;return Ct.createElement(qr,{highlight:t,autoFocus:r.readonly!==!0,disabled:r.readonly!==!1,value:r.data,validatedSelection:o,onChange:i=>n({...r,data:i.target.value})})},onPaste:()=>{}},Uw={getAccessibilityString:e=>e.data?.toString()??"",kind:G.Text,needsHover:e=>e.hoverEffect===!0,needsHoverPosition:!1,drawPrep:Mi,useLabel:!0,draw:e=>{const{cell:t,hoverAmount:n,hyperWrapping:r,ctx:o,rect:i,theme:a,overrideCursor:l}=e,{displayData:s,contentAlign:u,hoverEffect:c,allowWrapping:h,hoverEffectTheme:g}=t;c===!0&&n>0&&ff(o,a,g,s,i,n,l),rr(e,s,u,h,r)},measure:(e,t,n)=>{const r=t.displayData.split(`
|
|
186
|
-
`,t.allowWrapping===!0?void 0:1);let o=0;for(const i of r)o=Math.max(o,e.measureText(i).width);return o+2*n.cellHorizontalPadding},onDelete:e=>({...e,data:""}),provideEditor:e=>({disablePadding:e.allowWrapping===!0,editor:t=>{const{isHighlighted:n,onChange:r,value:o,validatedSelection:i}=t;return d.createElement(qr,{style:e.allowWrapping===!0?{padding:"3px 8.5px"}:void 0,highlight:n,autoFocus:o.readonly!==!0,disabled:o.readonly===!0,altNewline:!0,value:o.data,validatedSelection:i,onChange:a=>r({...o,data:a.target.value})})}}),onPaste:(e,t,n)=>e===t.data?void 0:{...t,data:e,displayData:n.formattedString??t.displayData}},Xw=hn("div")({name:"UriOverlayEditorStyle",class:"gdg-u1rrojo",propsAsIs:!1}),Yw=e=>{const{uri:t,onChange:n,forceEditMode:r,readonly:o,validatedSelection:i,preview:a}=e,[l,s]=d.useState(!o&&(t===""||r)),u=d.useCallback(()=>{s(!0)},[]);return l?d.createElement(qr,{validatedSelection:i,highlight:!0,autoFocus:!0,value:t,onChange:n}):d.createElement(Xw,null,d.createElement("a",{className:"gdg-link-area",href:t,target:"_blank",rel:"noopener noreferrer"},a),!o&&d.createElement("div",{className:"gdg-edit-icon",onClick:u},d.createElement(Ds,null)),d.createElement("textarea",{className:"gdg-input",autoFocus:!0}))};function pf(e,t,n,r){let o=n.cellHorizontalPadding;const i=t.height/2-e.actualBoundingBoxAscent/2,a=e.width,l=e.actualBoundingBoxAscent;return r==="right"?o=t.width-a-n.cellHorizontalPadding:r==="center"&&(o=t.width/2-a/2),{x:o,y:i,width:a,height:l}}function ad(e){const{cell:t,bounds:n,posX:r,posY:o,theme:i}=e,a=t.displayData??t.data;if(t.hoverEffect!==!0||t.onClickUri===void 0)return!1;const l=Bh(a,i.baseFontFull);if(l===void 0)return!1;const s=pf(l,n,i,t.contentAlign);return Wr({x:s.x-4,y:s.y-4,width:s.width+8,height:s.height+8},r,o)}const Zw={getAccessibilityString:e=>e.data?.toString()??"",kind:G.Uri,needsHover:e=>e.hoverEffect===!0,needsHoverPosition:!0,useLabel:!0,drawPrep:Mi,draw:e=>{const{cell:t,theme:n,overrideCursor:r,hoverX:o,hoverY:i,rect:a,ctx:l}=e,s=t.displayData??t.data,u=t.hoverEffect===!0;if(r!==void 0&&u&&o!==void 0&&i!==void 0){const c=Tr(s,l,n.baseFontFull),h=pf(c,a,n,t.contentAlign),{x:g,y:p,width:f,height:m}=h;if(o>=g-4&&o<=g-4+f+8&&i>=p-4&&i<=p-4+m+8){const y=qn(l,n.baseFontFull);r("pointer");const w=5,v=p-y;l.beginPath(),l.moveTo(a.x+g,Math.floor(a.y+v+m+w)+.5),l.lineTo(a.x+g+f,Math.floor(a.y+v+m+w)+.5),l.strokeStyle=n.linkColor,l.stroke(),l.save(),l.fillStyle=e.cellFillColor,rr({...e,rect:{...a,x:a.x-1}},s,t.contentAlign),rr({...e,rect:{...a,x:a.x-2}},s,t.contentAlign),rr({...e,rect:{...a,x:a.x+1}},s,t.contentAlign),rr({...e,rect:{...a,x:a.x+2}},s,t.contentAlign),l.restore()}}l.fillStyle=u?n.linkColor:n.textDark,rr(e,s,t.contentAlign)},onSelect:e=>{ad(e)&&e.preventDefault()},onClick:e=>{const{cell:t}=e;ad(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:o,validatedSelection:i}=t;return d.createElement(Yw,{forceEditMode:r.readonly!==!0&&(o||e.hoverEffect===!0&&e.onClickUri!==void 0),uri:r.data,preview:r.displayData??r.data,validatedSelection:i,readonly:r.readonly===!0,onChange:a=>n({...r,data:a.target.value})})},onPaste:(e,t,n)=>e===t.data?void 0:{...t,data:e,displayData:n.formattedString??t.displayData}},qw=[Aw,zw,gw,ww,kw,Iw,Tw,Pw,Nw,Bw,Ww,Uw,Zw];var Xl,ld;function Kw(){if(ld)return Xl;ld=1;var e=xh(),t=Pa(),n="Expected a function";function r(o,i,a){var l=!0,s=!0;if(typeof o!="function")throw new TypeError(n);return t(a)&&(l="leading"in a?!!a.leading:l,s="trailing"in a?!!a.trailing:s),e(o,i,{leading:l,maxWait:i,trailing:s})}return Xl=r,Xl}var Qw=Kw();const Gw=Er(Qw),Yl=[];class Jw extends Uh{imageLoaded=()=>{};loadedLocations=[];cache={};setCallback(t){this.imageLoaded=t}sendLoaded=Gw(()=>{this.imageLoaded(new pi(this.loadedLocations)),this.loadedLocations=[]},20);clearOutOfWindow=()=>{const t=Object.keys(this.cache);for(const n of t){const r=this.cache[n];let o=!1;for(let i=0;i<r.cells.length;i++){const a=r.cells[i];if(this.isInWindow(a)){o=!0;break}}o?r.cells=r.cells.filter(this.isInWindow):(r.cancel(),delete this.cache[n])}};loadImage(t,n,r,o){let i=!1;const a=Yl.pop()??new Image;let l=!1;const s={img:void 0,cells:[Yn(n,r)],url:t,cancel:()=>{l||(l=!0,Yl.length<12?Yl.unshift(a):i||(a.src=""))}},u=new Promise(c=>a.addEventListener("load",()=>c(null)));requestAnimationFrame(async()=>{try{a.src=t,await u,await a.decode();const c=this.cache[o];if(c!==void 0&&!l){c.img=a;for(const h of c.cells)this.loadedLocations.push(Ws(h));i=!0,this.sendLoaded()}}catch{s.cancel()}}),this.cache[o]=s}loadOrGetImage(t,n,r){const o=t,i=this.cache[o];if(i!==void 0){const a=Yn(n,r);return i.cells.includes(a)||i.cells.push(a),i.img}else this.loadImage(t,n,r,o)}}const ey=(e,t)=>{const n=d.useMemo(()=>({...Vb,...e.headerIcons}),[e.headerIcons]),r=d.useMemo(()=>e.renderers??qw,[e.renderers]),o=d.useMemo(()=>e.imageWindowLoader??new Jw,[e.imageWindowLoader]);return d.createElement(pw,{...e,renderers:r,headerIcons:n,ref:t,imageWindowLoader:o})},ty=d.forwardRef(ey);function gf(e,t){const n=d.useRef(),r=d.useRef(e);d.useEffect(()=>{r.current=e},[e]);const{clear:o,restart:i}=ca(()=>{n.current&&(r.current(...n.current),n.current=void 0)},t,{autoStart:!1}),a=d.useCallback(()=>{o(),n.current=void 0},[o]);return{debouncedCallback:d.useCallback((...l)=>{n.current=l,i()},[i]),cancel:a}}var ms={exports:{}},ny=ms.exports,sd;function ry(){return sd||(sd=1,(function(e,t){(function(n,r){try{e.exports=r(mm)}catch{e.exports=r}n&&(n.momentDurationFormatSetup=n.moment?r(n.moment):r)})(ny,function(n){var r=!1,o=!1,i=!1,a=!1,l="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(V,L){return L.length>V.length?!1:V.indexOf(L)!==-1}function c(V){for(var L="";V;)L+="0",V-=1;return L}function h(V){for(var L=V.split("").reverse(),U=0,re=!0;re&&U<L.length;)U?L[U]==="9"?L[U]="0":(L[U]=(parseInt(L[U],10)+1).toString(),re=!1):(parseInt(L[U],10)<5&&(re=!1),L[U]="0"),U+=1;return re&&L.push("1"),L.reverse().join("")}function g(V,L){var U=P(k(L).sort(),function(se){return se+":"+L[se]}).join(","),re=V+"+"+U;return g.cache[re]||(g.cache[re]=Intl.NumberFormat(V,L)),g.cache[re]}g.cache={};function p(V,L,U){var re=L.useToLocaleString,se=L.useGrouping,De=se&&L.grouping.slice(),be=L.maximumSignificantDigits,Ge=L.minimumIntegerDigits||1,Me=L.fractionDigits||0,Et=L.groupingSeparator,st=L.decimalSeparator;if(re&&U){var $e={minimumIntegerDigits:Ge,useGrouping:se};if(Me&&($e.maximumFractionDigits=Me,$e.minimumFractionDigits=Me),be&&V>0&&($e.maximumSignificantDigits=be),i){if(!a){var ne=D({},L);ne.useGrouping=!1,ne.decimalSeparator=".",V=parseFloat(p(V,ne),10)}return g(U,$e).format(V)}else{if(!o){var ne=D({},L);ne.useGrouping=!1,ne.decimalSeparator=".",V=parseFloat(p(V,ne),10)}return V.toLocaleString(U,$e)}}var me;be?me=V.toPrecision(be+1):me=V.toFixed(Me+1);var ve,ce,we,Le=me.split("e");we=Le[1]||"",Le=Le[0].split("."),ce=Le[1]||"",ve=Le[0]||"";var He=ve.length,rt=ce.length,Pe=He+rt,ye=ve+ce;(be&&Pe===be+1||!be&&rt===Me+1)&&(ye=h(ye),ye.length===Pe+1&&(He=He+1),rt&&(ye=ye.slice(0,-1)),ve=ye.slice(0,He),ce=ye.slice(He)),be&&(ce=ce.replace(/0*$/,""));var Fe=parseInt(we,10);Fe>0?ce.length<=Fe?(ce=ce+c(Fe-ce.length),ve=ve+ce,ce=""):(ve=ve+ce.slice(0,Fe),ce=ce.slice(Fe)):Fe<0&&(ce=c(Math.abs(Fe)-ve.length)+ve+ce,ve="0"),be||(ce=ce.slice(0,Me),ce.length<Me&&(ce=ce+c(Me-ce.length)),ve.length<Ge&&(ve=c(Ge-ve.length)+ve));var ke="";if(se){Le=ve;for(var _e;Le.length;)De.length&&(_e=De.shift()),ke&&(ke=Et+ke),ke=Le.slice(-_e)+ke,Le=Le.slice(0,-_e)}else ke=ve;return ce&&(ke=ke+st+ce),ke}function f(V,L){return V.label.length>L.label.length?-1:V.label.length<L.label.length?1:0}function m(V,L){var U=[];return S(k(L),function(re){if(re.slice(0,15)==="_durationLabels"){var se=re.slice(15).toLowerCase();S(k(L[re]),function(De){De.slice(0,1)===V&&U.push({type:se,key:De,label:L[re][De]})})}}),U}function y(V,L,U){return L===1&&U===null?V:V+V}var w={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(V){return Object.prototype.toString.call(V)==="[object Array]"}function x(V){return Object.prototype.toString.call(V)==="[object Object]"}function E(V,L){for(var U=V.length;U-=1;)if(L(V[U]))return V[U]}function R(V,L){var U=0,re=V&&V.length||0,se;for(typeof L!="function"&&(se=L,L=function(De){return De===se});U<re;){if(L(V[U]))return V[U];U+=1}}function S(V,L){var U=0,re=V.length;if(!(!V||!re))for(;U<re;){if(L(V[U],U)===!1)return;U+=1}}function P(V,L){var U=0,re=V.length,se=[];if(!V||!re)return se;for(;U<re;)se[U]=L(V[U],U),U+=1;return se}function T(V,L){return P(V,function(U){return U[L]})}function C(V){var L=[];return S(V,function(U){U&&L.push(U)}),L}function A(V){var L=[];return S(V,function(U){R(L,U)||L.push(U)}),L}function O(V,L){var U=[];return S(V,function(re){S(L,function(se){re===se&&U.push(re)})}),A(U)}function I(V,L){var U=[];return S(V,function(re,se){if(!L(re))return U=V.slice(se),!1}),U}function M(V,L){var U=V.slice().reverse();return I(U,L).reverse()}function D(V,L){for(var U in L)L.hasOwnProperty(U)&&(V[U]=L[U]);return V}function k(V){var L=[];for(var U in V)V.hasOwnProperty(U)&&L.push(U);return L}function Y(V,L){var U=0,re=V.length;if(!V||!re)return!1;for(;U<re;){if(L(V[U],U)===!0)return!0;U+=1}return!1}function $(V){var L=[];return S(V,function(U){L=L.concat(U)}),L}function K(){var V=0;try{V.toLocaleString("i")}catch(L){return L.name==="RangeError"}return!1}function ie(V){return V(3.55,"en",{useGrouping:!1,minimumIntegerDigits:1,minimumFractionDigits:1,maximumFractionDigits:1})==="3.6"}function ee(V){var L=!0;return L=L&&V(1,"en",{minimumIntegerDigits:1})==="1",L=L&&V(1,"en",{minimumIntegerDigits:2})==="01",L=L&&V(1,"en",{minimumIntegerDigits:3})==="001",!(!L||(L=L&&V(99.99,"en",{maximumFractionDigits:0,minimumFractionDigits:0})==="100",L=L&&V(99.99,"en",{maximumFractionDigits:1,minimumFractionDigits:1})==="100.0",L=L&&V(99.99,"en",{maximumFractionDigits:2,minimumFractionDigits:2})==="99.99",L=L&&V(99.99,"en",{maximumFractionDigits:3,minimumFractionDigits:3})==="99.990",!L)||(L=L&&V(99.99,"en",{maximumSignificantDigits:1})==="100",L=L&&V(99.99,"en",{maximumSignificantDigits:2})==="100",L=L&&V(99.99,"en",{maximumSignificantDigits:3})==="100",L=L&&V(99.99,"en",{maximumSignificantDigits:4})==="99.99",L=L&&V(99.99,"en",{maximumSignificantDigits:5})==="99.99",!L)||(L=L&&V(1e3,"en",{useGrouping:!0})==="1,000",L=L&&V(1e3,"en",{useGrouping:!1})==="1000",!L))}function Q(){var V=[].slice.call(arguments),L={},U;if(S(V,function(be,Ge){if(!Ge){if(!v(be))throw"Expected array as the first argument to durationsFormat.";U=be}if(typeof be=="string"||typeof be=="function"){L.template=be;return}if(typeof be=="number"){L.precision=be;return}x(be)&&D(L,be)}),!U||!U.length)return[];L.returnMomentTypes=!0;var re=P(U,function(be){return be.format(L)}),se=O(l,A(T($(re),"type"))),De=L.largest;return De&&(se=se.slice(0,De)),L.returnMomentTypes=!1,L.outputTypes=se,P(U,function(be){return be.format(L)})}function ge(){var V=[].slice.call(arguments),L=D({},this.format.defaults),U=this.asMilliseconds(),re=this.asMonths();typeof this.isValid=="function"&&this.isValid()===!1&&(U=0,re=0);var se=U<0,De=n.duration(Math.abs(U),"milliseconds"),be=n.duration(Math.abs(re),"months");S(V,function(B){if(typeof B=="string"||typeof B=="function"){L.template=B;return}if(typeof B=="number"){L.precision=B;return}x(B)&&D(L,B)});var Ge={years:"y",months:"M",weeks:"w",days:"d",hours:"h",minutes:"m",seconds:"s",milliseconds:"S"},Me={escape:/\[(.+?)\]/,years:/\*?[Yy]+/,months:/\*?M+/,weeks:/\*?[Ww]+/,days:/\*?[Dd]+/,hours:/\*?[Hh]+/,minutes:/\*?m+/,seconds:/\*?s+/,milliseconds:/\*?S+/,general:/.+?/};L.types=l;var Et=function(B){return R(l,function(Ne){return Me[Ne].test(B)})},st=new RegExp(P(l,function(B){return Me[B].source}).join("|"),"g");L.duration=this;var $e=typeof L.template=="function"?L.template.apply(L):L.template,ne=L.outputTypes,me=L.returnMomentTypes,ve=L.largest,ce=[];ne||(v(L.stopTrim)&&(L.stopTrim=L.stopTrim.join("")),L.stopTrim&&S(L.stopTrim.match(st),function(B){var Ne=Et(B);Ne==="escape"||Ne==="general"||ce.push(Ne)}));var we=n.localeData();we||(we={}),S(k(w),function(B){if(typeof w[B]=="function"){we[B]||(we[B]=w[B]);return}we["_"+B]||(we["_"+B]=w[B])}),S(k(we._durationTimeTemplates),function(B){$e=$e.replace("_"+B+"_",we._durationTimeTemplates[B])});var Le=L.userLocale||n.locale(),He=L.useLeftUnits,rt=L.usePlural,Pe=L.precision,ye=L.forceLength,Fe=L.useGrouping,ke=L.trunc,_e=L.useSignificantDigits&&Pe>0,ut=_e?L.precision:0,dt=ut,je=L.minValue,ft=!1,$t=L.maxValue,bt=!1,Mt=L.useToLocaleString,_t=L.groupingSeparator,Zt=L.decimalSeparator,ln=L.grouping;Mt=Mt&&(r||i);var kt=L.trim;v(kt)&&(kt=kt.join(" ")),kt===null&&(ve||$t||_e)&&(kt="all"),(kt===null||kt===!0||kt==="left"||kt==="right")&&(kt="large"),kt===!1&&(kt="");var ht=function(B){return B.test(kt)},Bt=/large/,mt=/small/,sn=/both/,Mn=/mid/,Ee=/^all|[^sm]all/,ct=/final/,Tt=ve>0||Y([Bt,sn,Ee],ht),vn=Y([mt,sn,Ee],ht),tn=Y([Mn,Ee],ht),nn=Y([ct,Ee],ht),cn=P($e.match(st),function(B,Ne){var We=Et(B);return B.slice(0,1)==="*"&&(B=B.slice(1),We!=="escape"&&We!=="general"&&ce.push(We)),{index:Ne,length:B.length,text:"",token:We==="escape"?B.replace(Me.escape,"$1"):B,type:We==="escape"||We==="general"?null:We}}),zt={index:0,length:0,token:"",text:"",type:null},Kt=[];He&&cn.reverse(),S(cn,function(B){if(B.type){(zt.type||zt.text)&&Kt.push(zt),zt=B;return}He?zt.text=B.token+zt.text:zt.text+=B.token}),(zt.type||zt.text)&&Kt.push(zt),He&&Kt.reverse();var Be=O(l,A(C(T(Kt,"type"))));if(!Be.length)return T(Kt,"text").join("");Be=P(Be,function(B,Ne){var We=Ne+1===Be.length,Dt=!Ne,qt;B==="years"||B==="months"?qt=be.as(B):qt=De.as(B);var rn=Math.floor(qt),Rn=qt-rn,wn=R(Kt,function(jt){return B===jt.type});return Dt&&$t&&qt>$t&&(bt=!0),We&&je&&Math.abs(L.duration.as(B))<je&&(ft=!0),Dt&&ye===null&&wn.length>1&&(ye=!0),De.subtract(rn,B),be.subtract(rn,B),{rawValue:qt,wholeValue:rn,decimalValue:We?Rn:0,isSmallest:We,isLargest:Dt,type:B,tokenLength:wn.length}});var wt=ke?Math.floor:Math.round,In=function(B,Ne){var We=Math.pow(10,Ne);return wt(B*We)/We},Ot=!1,pt=!1,bn=function(B,Ne){var We={useGrouping:Fe,groupingSeparator:_t,decimalSeparator:Zt,grouping:ln,useToLocaleString:Mt};return _e&&(ut<=0?(B.rawValue=0,B.wholeValue=0,B.decimalValue=0):(We.maximumSignificantDigits=ut,B.significantDigits=ut)),bt&&!pt&&(B.isLargest?(B.wholeValue=$t,B.decimalValue=0):(B.wholeValue=0,B.decimalValue=0)),ft&&!pt&&(B.isSmallest?(B.wholeValue=je,B.decimalValue=0):(B.wholeValue=0,B.decimalValue=0)),B.isSmallest||B.significantDigits&&B.significantDigits-B.wholeValue.toString().length<=0?Pe<0?B.value=In(B.wholeValue,Pe):Pe===0?B.value=wt(B.wholeValue+B.decimalValue):_e?(ke?B.value=In(B.rawValue,ut-B.wholeValue.toString().length):B.value=B.rawValue,B.wholeValue&&(ut-=B.wholeValue.toString().length)):(We.fractionDigits=Pe,ke?B.value=B.wholeValue+In(B.decimalValue,Pe):B.value=B.wholeValue+B.decimalValue):_e&&B.wholeValue?(B.value=Math.round(In(B.wholeValue,B.significantDigits-B.wholeValue.toString().length)),ut-=B.wholeValue.toString().length):B.value=B.wholeValue,B.tokenLength>1&&(ye||Ot)&&(We.minimumIntegerDigits=B.tokenLength,pt&&We.maximumSignificantDigits<B.tokenLength&&delete We.maximumSignificantDigits),!Ot&&(B.value>0||kt===""||R(ce,B.type)||R(ne,B.type))&&(Ot=!0),B.formattedValue=p(B.value,We,Le),We.useGrouping=!1,We.decimalSeparator=".",B.formattedValueEn=p(B.value,We,"en"),B.tokenLength===2&&B.type==="milliseconds"&&(B.formattedValueMS=p(B.value,{minimumIntegerDigits:3,useGrouping:!1},"en").slice(0,2)),B};if(Be=P(Be,bn),Be=C(Be),Be.length>1){var lr=function(B){return R(Be,function(Ne){return Ne.type===B})},Kn=function(B){var Ne=lr(B.type);Ne&&S(B.targets,function(We){var Dt=lr(We.type);Dt&&parseInt(Ne.formattedValueEn,10)===We.value&&(Ne.rawValue=0,Ne.wholeValue=0,Ne.decimalValue=0,Dt.rawValue+=1,Dt.wholeValue+=1,Dt.decimalValue=0,Dt.formattedValueEn=Dt.wholeValue.toString(),pt=!0)})};S(s,Kn)}return pt&&(Ot=!1,ut=dt,Be=P(Be,bn),Be=C(Be)),ne&&!(bt&&!L.trim)?(Be=P(Be,function(B){return R(ne,function(Ne){return B.type===Ne})?B:null}),Be=C(Be)):(Tt&&(Be=I(Be,function(B){return!B.isSmallest&&!B.wholeValue&&!R(ce,B.type)})),ve&&Be.length&&(Be=Be.slice(0,ve)),vn&&Be.length>1&&(Be=M(Be,function(B){return!B.wholeValue&&!R(ce,B.type)&&!B.isLargest})),tn&&(Be=P(Be,function(B,Ne){return Ne>0&&Ne<Be.length-1&&!B.wholeValue?null:B}),Be=C(Be)),nn&&Be.length===1&&!Be[0].wholeValue&&!(!ke&&Be[0].isSmallest&&Be[0].rawValue<je)&&(Be=[])),me?Be:(S(Kt,function(B){var Ne=Ge[B.type],We=R(Be,function(jt){return jt.type===B.type});if(!(!Ne||!We)){var Dt=We.formattedValueEn.split(".");Dt[0]=parseInt(Dt[0],10),Dt[1]?Dt[1]=parseFloat("0."+Dt[1],10):Dt[1]=null;var qt=we.durationPluralKey(Ne,Dt[0],Dt[1]),rn=m(Ne,we),Rn=!1,wn={};S(we._durationLabelTypes,function(jt){var yn=R(rn,function(xn){return xn.type===jt.type&&xn.key===qt});yn&&(wn[yn.type]=yn.label,u(B.text,jt.string)&&(B.text=B.text.replace(jt.string,yn.label),Rn=!0))}),rt&&!Rn&&(rn.sort(f),S(rn,function(jt){if(wn[jt.type]===jt.label)return u(B.text,jt.label)?!1:void 0;if(u(B.text,jt.label))return B.text=B.text.replace(jt.label,wn[jt.type]),!1}))}}),Kt=P(Kt,function(B){if(!B.type)return B.text;var Ne=R(Be,function(Dt){return Dt.type===B.type});if(!Ne)return"";var We="";return He&&(We+=B.text),(se&&bt||!se&&ft)&&(We+="< ",bt=!1,ft=!1),(se&&ft||!se&&bt)&&(We+="> ",bt=!1,ft=!1),se&&(Ne.value>0||kt===""||R(ce,Ne.type)||R(ne,Ne.type))&&(We+="-",se=!1),B.type==="milliseconds"&&Ne.formattedValueMS?We+=Ne.formattedValueMS:We+=Ne.formattedValue,He||(We+=B.text),We}),Kt.join("").replace(/(,| |:|\.)*$/,"").replace(/^(,| |:|\.)*/,""))}function oe(){var V=this.duration,L=function(se){return V._data[se]},U=R(this.types,L),re=E(this.types,L);switch(U){case"milliseconds":return"S __";case"seconds":case"minutes":return"*_MS_";case"hours":return"_HMS_";case"days":if(U===re)return"d __";case"weeks":return U===re?"w __":(this.trim===null&&(this.trim="both"),"w __, d __, h __");case"months":if(U===re)return"M __";case"years":return U===re?"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(V){if(!V)throw"Moment Duration Format init cannot find moment instance.";V.duration.format=Q,V.duration.fn.format=ge,V.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:oe,useToLocaleString:!0,groupingSeparator:",",decimalSeparator:".",grouping:[3]},V.updateLocale("en",w)}var pe=function(V,L,U){return V.toLocaleString(L,U)};r=K()&&ee(pe),o=r&&ie(pe);var le=function(V,L,U){if(typeof window<"u"&&window&&window.Intl&&window.Intl.NumberFormat)return window.Intl.NumberFormat(L,U).format(V)};return i=ee(le),a=i&&ie(le),de(n),de})})(ms)),ms.exports}ry();const oy=["true","t","yes","y","on","1"],iy=["false","f","no","n","off","0"];function St(e,t=""){return{kind:G.Text,readonly:!0,allowOverlay:!0,data:e,displayData:e,errorDetails:t,isError:!0,style:"faded"}}function Do(e){return Object.hasOwn(e,"isError")&&e.isError}function ay(e){return Object.hasOwn(e,"tooltip")&&e.tooltip!==""}function Zs(e){return Object.hasOwn(e,"isMissingValue")&&e.isMissingValue}function vs(e=!1){return e?{kind:G.Loading,allowOverlay:!1,isMissingValue:!0,copyData:""}:{kind:G.Loading,allowOverlay:!1,copyData:""}}function ly(e,t){const n=t?"faded":"normal";return{kind:G.Text,data:"",displayData:"",allowOverlay:!0,readonly:e,style:n}}function bs(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 Lo(e,t){return Se(e)?t||{}:Se(t)?e||{}:Kd(e,t)}function qs(e){if(Se(e))return[];if(typeof e=="number"||typeof e=="boolean")return[e];if(e instanceof Uint8Array&&(e=new TextDecoder("utf-8").decode(e)),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:nt(n)):[nt(t)]}catch{return[nt(e)]}}function mf(e){return typeof e=="string"||e instanceof String?!0:(e instanceof jg&&(e=Array.from(e)),Array.isArray(e)&&e.every(t=>typeof t=="string"||t instanceof String))}function sy(e){return e?.startsWith("{")&&e.endsWith("}")}function nt(e){try{try{return Dg(e)}catch{return JSON.stringify(e,(t,n)=>typeof n=="bigint"?Number(n):n)}}catch{return`[${typeof e}]`}}function vf(e){if(Se(e))return null;if(typeof e=="boolean")return e;const t=nt(e).toLowerCase().trim();if(t==="")return null;if(oy.includes(t))return!0;if(iy.includes(t))return!1}function wi(e){if(Se(e))return null;if(Array.isArray(e))return NaN;if(typeof e=="string"){if(e.trim().length===0)return null;try{const t=vm.unformat(e.trim());if(lt(t))return t}catch{}}else if(e instanceof Int32Array)return Number(e[0]);return Number(e)}function bf(e){return Se(e)?"":nt(e.map(t=>typeof t=="string"&&t.includes(",")?t.replace(/,/g," "):t))}function Ca(e){if(Se(e))return"";if(typeof e=="string")return e;try{return JSON.stringify(e,(t,n)=>typeof n=="bigint"?Number(n):n)}catch{return nt(e)}}function Gi(e){if(Se(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=Br.unix(n).utc();if(r.isValid())return r.toDate()}if(typeof e=="string"){const n=Br.utc(e);if(n.isValid())return n.toDate();const r=Br.utc(e,[Br.HTML5_FMT.TIME_MS,Br.HTML5_FMT.TIME_SECONDS,Br.HTML5_FMT.TIME]);if(r.isValid())return r.toDate()}}catch{return}}function wf(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 uy(e,t){if(!Number.isFinite(e))return e;if(t<=0)return Math.trunc(e);const n=10**t,r=e*n,o=Number.EPSILON*Math.abs(r)*10;return Math.trunc(r+Math.sign(r)*o)/n}const cy=new RegExp(/(\r\n|\n|\r)/gm);function yi(e){return e.indexOf(`
|
|
187
|
-
`)!==-1?e.replace(cy," "):e}function dy(e,t){if(Se(t))return"";try{const n=t.match(e);return n?.[1]!==void 0?decodeURIComponent(n[1].replace(/\+/g,"%20")):t}catch{return t}}const hy=An("div",{target:"en99xsi0"})(({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"}}),""),Ks=({jsonValue:e,theme:t})=>{let n;if(e)try{n=typeof e=="string"?il.parse(e):il.parse(il.stringify(e))}catch{n=void 0}return Se(n)?fe.jsx(qr,{highlight:!0,autoFocus:!1,disabled:!0,value:Ca(e)??"",onChange:()=>{}}):fe.jsx(hy,{"data-testid":"stJsonColumnViewer",children:fe.jsx(Am,{src:n,collapsed:2,theme:Ag(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"}})})};d.memo(Ks);const fy=e=>{const t=e.theme,n=e.value.data;return fe.jsx(Ks,{jsonValue:n.value||n.displayValue,theme:t})},py=e=>{const t=e.theme,n=e.value;return fe.jsx(Ks,{jsonValue:n.data,theme:t})},gy={kind:G.Custom,isMatch:e=>e.data.kind==="json-cell",draw:(e,t)=>{const{value:n,displayValue:r}=t.data;return _s(e,r??Ca(n)??"",t.contentAlign),!0},measure:(e,t,n)=>{const{value:r,displayValue:o}=t.data,i=o??Ca(r)??"";return(i?e.measureText(i).width:0)+n.cellHorizontalPadding*2},provideEditor:()=>({editor:fy})};function ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Oe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ud(Object(n),!0).forEach(function(r){li(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ud(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var my=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function yf(e){var t=e.defaultInputValue,n=t===void 0?"":t,r=e.defaultMenuIsOpen,o=r===void 0?!1:r,i=e.defaultValue,a=i===void 0?null:i,l=e.inputValue,s=e.menuIsOpen,u=e.onChange,c=e.onInputChange,h=e.onMenuClose,g=e.onMenuOpen,p=e.value,f=ar(e,my),m=d.useState(l!==void 0?l:n),y=fr(m,2),w=y[0],v=y[1],x=d.useState(s!==void 0?s:o),E=fr(x,2),R=E[0],S=E[1],P=d.useState(p!==void 0?p:a),T=fr(P,2),C=T[0],A=T[1],O=d.useCallback(function(K,ie){typeof u=="function"&&u(K,ie),A(K)},[u]),I=d.useCallback(function(K,ie){var ee;typeof c=="function"&&(ee=c(K,ie)),v(ee!==void 0?ee:K)},[c]),M=d.useCallback(function(){typeof g=="function"&&g(),S(!0)},[g]),D=d.useCallback(function(){typeof h=="function"&&h(),S(!1)},[h]),k=l!==void 0?l:w,Y=s!==void 0?s:R,$=p!==void 0?p:C;return Oe(Oe({},f),{},{inputValue:k,menuIsOpen:Y,onChange:O,onInputChange:I,onMenuClose:D,onMenuOpen:M,value:$})}function vy(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function by(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var wy=(function(){function e(n){var r=this;this._insertTag=function(o){var i;r.tags.length===0?r.insertionPoint?i=r.insertionPoint.nextSibling:r.prepend?i=r.container.firstChild:i=r.before:i=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(o,i),r.tags.push(o)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(n){n.forEach(this._insertTag)},t.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(by(this));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var o=vy(r);try{o.insertRule(n,o.cssRules.length)}catch{}}else r.appendChild(document.createTextNode(n));this.ctr++},t.flush=function(){this.tags.forEach(function(n){return n.parentNode&&n.parentNode.removeChild(n)}),this.tags=[],this.ctr=0},e})(),yy=function(e,t,n){for(var r=0,o=0;r=o,o=is(),r===38&&o===12&&(t[n]=1),!lh(o);)ah();return sm(e,sh)},xy=function(e,t){var n=-1,r=44;do switch(lh(r)){case 0:r===38&&is()===12&&(t[n]=1),e[n]+=yy(sh-1,t,n);break;case 2:e[n]+=lm(r);break;case 4:if(r===44){e[++n]=is()===58?"&\f":"",t[n]=e[n].length;break}default:e[n]+=am(r)}while(r=ah());return e},Cy=function(e,t){return rm(xy(om(e),t))},cd=new WeakMap,ky=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(e.props.length===1&&t.charCodeAt(0)!==58&&!cd.get(n))&&!r){cd.set(e,!0);for(var o=[],i=Cy(t,o),a=n.props,l=0,s=0;l<i.length;l++)for(var u=0;u<a.length;u++,s++)e.props[s]=o[l]?i[l].replace(/&\f/g,a[u]):a[u]+" "+i[l]}}},Sy=function(e){if(e.type==="decl"){var t=e.value;t.charCodeAt(0)===108&&t.charCodeAt(2)===98&&(e.return="",e.value="")}};function xf(e,t){switch(im(e,t)){case 5103:return xt+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return xt+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return xt+e+da+e+mn+e+e;case 6828:case 4268:return xt+e+mn+e+e;case 6165:return xt+e+mn+"flex-"+e+e;case 5187:return xt+e+Lt(e,/(\w+).+(:[^]+)/,xt+"box-$1$2"+mn+"flex-$1$2")+e;case 5443:return xt+e+mn+"flex-item-"+Lt(e,/flex-|-self/,"")+e;case 4675:return xt+e+mn+"flex-line-pack"+Lt(e,/align-content|flex-|-self/,"")+e;case 5548:return xt+e+mn+Lt(e,"shrink","negative")+e;case 5292:return xt+e+mn+Lt(e,"basis","preferred-size")+e;case 6060:return xt+"box-"+Lt(e,"-grow","")+xt+e+mn+Lt(e,"grow","positive")+e;case 4554:return xt+Lt(e,/([^-])(transform)/g,"$1"+xt+"$2")+e;case 6187:return Lt(Lt(Lt(e,/(zoom-|grab)/,xt+"$1"),/(image-set)/,xt+"$1"),e,"")+e;case 5495:case 3959:return Lt(e,/(image-set\([^]*)/,xt+"$1$`$1");case 4968:return Lt(Lt(e,/(.+:)(flex-)?(.*)/,xt+"box-pack:$3"+mn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+xt+e+e;case 4095:case 3583:case 4068:case 2532:return Lt(e,/(.+)-inline(.+)/,xt+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Au(e)-1-t>6)switch(_r(e,t+1)){case 109:if(_r(e,t+4)!==45)break;case 102:return Lt(e,/(.+:)(.+)-([^]+)/,"$1"+xt+"$2-$3$1"+da+(_r(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Lu(e,"stretch")?xf(Lt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(_r(e,t+1)!==115)break;case 6444:switch(_r(e,Au(e)-3-(~Lu(e,"!important")&&10))){case 107:return Lt(e,":",":"+xt)+e;case 101:return Lt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+xt+(_r(e,14)===45?"inline-":"")+"box$3$1"+xt+"$2$3$1"+mn+"$2box$3")+e}break;case 5936:switch(_r(e,t+11)){case 114:return xt+e+mn+Lt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return xt+e+mn+Lt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return xt+e+mn+Lt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return xt+e+mn+e+e}return e}var My=function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case em:e.return=xf(e.value,e.length);break;case Jg:return oa([Xo(e,{value:Lt(e.value,"@","@"+xt)})],r);case Qg:if(e.length)return Gg(e.props,function(o){switch(um(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return oa([Xo(e,{props:[Lt(o,/:(read-\w+)/,":"+da+"$1")]})],r);case"::placeholder":return oa([Xo(e,{props:[Lt(o,/:(plac\w+)/,":"+xt+"input-$1")]}),Xo(e,{props:[Lt(o,/:(plac\w+)/,":"+da+"$1")]}),Xo(e,{props:[Lt(o,/:(plac\w+)/,mn+"input-$1")]})],r)}return""})}},Iy=[My],Ry=function(e){var t=e.key;if(t==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(f){var m=f.getAttribute("data-emotion");m.indexOf(" ")!==-1&&(document.head.appendChild(f),f.setAttribute("data-s",""))})}var r=e.stylisPlugins||Iy,o={},i,a=[];i=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(f){for(var m=f.getAttribute("data-emotion").split(" "),y=1;y<m.length;y++)o[m[y]]=!0;a.push(f)});var l,s=[ky,Sy];{var u,c=[Zg,qg(function(f){u.insert(f)})],h=Xg(s.concat(r,c)),g=function(f){return oa(cm(f),h)};l=function(f,m,y,w){u=y,g(f?f+"{"+m.styles+"}":m.styles),w&&(p.inserted[m.name]=!0)}}var p={key:t,sheet:new wy({key:t,container:i,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:l};return p.sheet.hydrate(a),p},Ey=function(e){return e()},Ty=d.useInsertionEffect?d.useInsertionEffect:!1,Oy=Ty||Ey,Qs={}.hasOwnProperty,Cf=d.createContext(typeof HTMLElement<"u"?Ry({key:"css"}):null);Cf.Provider;var Dy=function(e){return d.forwardRef(function(t,n){var r=d.useContext(Cf);return e(t,r,n)})},Py=d.createContext({}),ws="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Ay=function(e,t){var n={};for(var r in t)Qs.call(t,r)&&(n[r]=t[r]);return n[ws]=e,n},Ly=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return tm(t,n,r),Oy(function(){return nm(t,n,r)}),null},Hy=Dy(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var o=e[ws],i=[r],a="";typeof e.className=="string"?a=Kg(t.registered,i,e.className):e.className!=null&&(a=e.className+" ");var l=ih(i,void 0,d.useContext(Py));a+=t.key+"-"+l.name;var s={};for(var u in e)Qs.call(e,u)&&u!=="css"&&u!==ws&&(s[u]=e[u]);return s.ref=n,s.className=a,d.createElement(d.Fragment,null,d.createElement(Ly,{cache:t,serialized:l,isStringTag:typeof o=="string"}),d.createElement(o,s))}),Fy=Hy,Ae=function(e,t){var n=arguments;if(t==null||!Qs.call(t,"css"))return d.createElement.apply(void 0,n);var r=n.length,o=new Array(r);o[0]=Fy,o[1]=Ay(e,t);for(var i=2;i<r;i++)o[i]=n[i];return d.createElement.apply(null,o)};function Gs(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ih(t)}var zy=function(){var e=Gs.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}};function Vy(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const $y=Math.min,_y=Math.max,ka=Math.round,Ji=Math.floor,ys=e=>({x:e,y:e});function Ny(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Ha(){return typeof window<"u"}function kf(e){return Mf(e)?(e.nodeName||"").toLowerCase():"#document"}function Rr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Sf(e){var t;return(t=(Mf(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Mf(e){return Ha()?e instanceof Node||e instanceof Rr(e).Node:!1}function By(e){return Ha()?e instanceof Element||e instanceof Rr(e).Element:!1}function Js(e){return Ha()?e instanceof HTMLElement||e instanceof Rr(e).HTMLElement:!1}function dd(e){return!Ha()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Rr(e).ShadowRoot}const jy=new Set(["inline","contents"]);function If(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=eu(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!jy.has(o)}const Wy=new Set(["html","body","#document"]);function Uy(e){return Wy.has(kf(e))}function eu(e){return Rr(e).getComputedStyle(e)}function Xy(e){if(kf(e)==="html")return e;const t=e.assignedSlot||e.parentNode||dd(e)&&e.host||Sf(e);return dd(t)?t.host:t}function Rf(e){const t=Xy(e);return Uy(t)?e.ownerDocument?e.ownerDocument.body:e.body:Js(t)&&If(t)?t:Rf(t)}function Sa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Rf(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=Rr(o);if(i){const l=xs(a);return t.concat(a,a.visualViewport||[],If(o)?o:[],l&&n?Sa(l):[])}return t.concat(o,Sa(o,[],n))}function xs(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Yy(e){const t=eu(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Js(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,l=ka(n)!==i||ka(r)!==a;return l&&(n=i,r=a),{width:n,height:r,$:l}}function tu(e){return By(e)?e:e.contextElement}function hd(e){const t=tu(e);if(!Js(t))return ys(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Yy(t);let a=(i?ka(n.width):n.width)/r,l=(i?ka(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}function fd(e,t,n,r){t===void 0&&(t=!1);const o=e.getBoundingClientRect(),i=tu(e);let a=ys(1);t&&(a=hd(e));const l=ys(0);let s=(o.left+l.x)/a.x,u=(o.top+l.y)/a.y,c=o.width/a.x,h=o.height/a.y;if(i){const g=Rr(i),p=r;let f=g,m=xs(f);for(;m&&r&&p!==f;){const y=hd(m),w=m.getBoundingClientRect(),v=eu(m),x=w.left+(m.clientLeft+parseFloat(v.paddingLeft))*y.x,E=w.top+(m.clientTop+parseFloat(v.paddingTop))*y.y;s*=y.x,u*=y.y,c*=y.x,h*=y.y,s+=x,u+=E,f=Rr(m),m=xs(f)}}return Ny({width:c,height:h,x:s,y:u})}function Ef(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Zy(e,t){let n=null,r;const o=Sf(e);function i(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function a(l,s){l===void 0&&(l=!1),s===void 0&&(s=1),i();const u=e.getBoundingClientRect(),{left:c,top:h,width:g,height:p}=u;if(l||t(),!g||!p)return;const f=Ji(h),m=Ji(o.clientWidth-(c+g)),y=Ji(o.clientHeight-(h+p)),w=Ji(c),v={rootMargin:-f+"px "+-m+"px "+-y+"px "+-w+"px",threshold:_y(0,$y(1,s))||1};let x=!0;function E(R){const S=R[0].intersectionRatio;if(S!==s){if(!x)return a();S?a(!1,S):r=setTimeout(()=>{a(!1,1e-7)},1e3)}S===1&&!Ef(u,e.getBoundingClientRect())&&a(),x=!1}try{n=new IntersectionObserver(E,{...v,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,v)}n.observe(e)}return a(!0),i}function qy(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:s=!1}=r,u=tu(e),c=o||i?[...u?Sa(u):[],...Sa(t)]:[];c.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),i&&w.addEventListener("resize",n)});const h=u&&l?Zy(u,n):null;let g=-1,p=null;a&&(p=new ResizeObserver(w=>{let[v]=w;v&&v.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),n()}),u&&!s&&p.observe(u),p.observe(t));let f,m=s?fd(e):null;s&&y();function y(){const w=fd(e);m&&!Ef(m,w)&&n(),m=w,f=requestAnimationFrame(y)}return n(),()=>{var w;c.forEach(v=>{o&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),h?.(),(w=p)==null||w.disconnect(),p=null,s&&cancelAnimationFrame(f)}}var Cs=d.useLayoutEffect,Ky=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Ma=function(){};function Qy(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function Gy(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var i=[].concat(r);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&i.push("".concat(Qy(e,a)));return i.filter(function(l){return l}).map(function(l){return String(l).trim()}).join(" ")}var Ia=function(e){return lx(e)?e.filter(Boolean):Wg(e)==="object"&&e!==null?[e]:[]},Tf=function(e){e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme;var t=ar(e,Ky);return Oe({},t)},Yt=function(e,t,n){var r=e.cx,o=e.getStyles,i=e.getClassNames,a=e.className;return{css:o(t,e),className:r(n??{},i(t,e),a)}};function Fa(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function Jy(e){return Fa(e)?window.innerHeight:e.clientHeight}function Of(e){return Fa(e)?window.pageYOffset:e.scrollTop}function Ra(e,t){if(Fa(e)){window.scrollTo(0,t);return}e.scrollTop=t}function ex(e){var t=getComputedStyle(e),n=t.position==="absolute",r=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),!(n&&t.position==="static")&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.documentElement}function tx(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function ea(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Ma,o=Of(e),i=t-o,a=10,l=0;function s(){l+=a;var u=tx(l,o,i,n);Ra(e,u),l<n?window.requestAnimationFrame(s):r(e)}s()}function pd(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?Ra(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&Ra(e,Math.max(t.offsetTop-o,0))}function nx(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 gd(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function rx(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var Df=!1,ox={get passive(){return Df=!0}},ta=typeof window<"u"?window:{};ta.addEventListener&&ta.removeEventListener&&(ta.addEventListener("p",Ma,ox),ta.removeEventListener("p",Ma,!1));var ix=Df;function ax(e){return e!=null}function lx(e){return Array.isArray(e)}function si(e,t,n){return e?t:n}var sx=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=Object.entries(e).filter(function(i){var a=fr(i,1),l=a[0];return!n.includes(l)});return o.reduce(function(i,a){var l=fr(a,2),s=l[0],u=l[1];return i[s]=u,i},{})},ux=["children","innerProps"],cx=["children","innerProps"];function dx(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,i=e.shouldScroll,a=e.isFixedPosition,l=e.controlHeight,s=ex(n),u={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return u;var c=s.getBoundingClientRect(),h=c.height,g=n.getBoundingClientRect(),p=g.bottom,f=g.height,m=g.top,y=n.offsetParent.getBoundingClientRect(),w=y.top,v=a?window.innerHeight:Jy(s),x=Of(s),E=parseInt(getComputedStyle(n).marginBottom,10),R=parseInt(getComputedStyle(n).marginTop,10),S=w-R,P=v-m,T=S+x,C=h-x-m,A=p-v+x+E,O=x+m-R,I=160;switch(o){case"auto":case"bottom":if(P>=f)return{placement:"bottom",maxHeight:t};if(C>=f&&!a)return i&&ea(s,A,I),{placement:"bottom",maxHeight:t};if(!a&&C>=r||a&&P>=r){i&&ea(s,A,I);var M=a?P-E:C-E;return{placement:"bottom",maxHeight:M}}if(o==="auto"||a){var D=t,k=a?S:T;return k>=r&&(D=Math.min(k-E-l,t)),{placement:"top",maxHeight:D}}if(o==="bottom")return i&&Ra(s,A),{placement:"bottom",maxHeight:t};break;case"top":if(S>=f)return{placement:"top",maxHeight:t};if(T>=f&&!a)return i&&ea(s,O,I),{placement:"top",maxHeight:t};if(!a&&T>=r||a&&S>=r){var Y=t;return(!a&&T>=r||a&&S>=r)&&(Y=a?S-R:T-R),i&&ea(s,O,I),{placement:"top",maxHeight:Y}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return u}function hx(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var Pf=function(e){return e==="auto"?"bottom":e},fx=function(e,t){var n,r=e.placement,o=e.theme,i=o.borderRadius,a=o.spacing,l=o.colors;return Oe((n={label:"menu"},li(n,hx(r),"100%"),li(n,"position","absolute"),li(n,"width","100%"),li(n,"zIndex",1),n),t?{}:{backgroundColor:l.neutral0,borderRadius:i,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})},Af=d.createContext(null),px=function(e){var t=e.children,n=e.minMenuHeight,r=e.maxMenuHeight,o=e.menuPlacement,i=e.menuPosition,a=e.menuShouldScrollIntoView,l=e.theme,s=d.useContext(Af)||{},u=s.setPortalPlacement,c=d.useRef(null),h=d.useState(r),g=fr(h,2),p=g[0],f=g[1],m=d.useState(null),y=fr(m,2),w=y[0],v=y[1],x=l.spacing.controlHeight;return Cs(function(){var E=c.current;if(E){var R=i==="fixed",S=a&&!R,P=dx({maxHeight:r,menuEl:E,minHeight:n,placement:o,shouldScroll:S,isFixedPosition:R,controlHeight:x});f(P.maxHeight),v(P.placement),u?.(P.placement)}},[r,o,i,a,n,u,x]),t({ref:c,placerProps:Oe(Oe({},e),{},{placement:w||Pf(o),maxHeight:p})})},gx=function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return Ae("div",Ve({},Yt(e,"menu",{menu:!0}),{ref:n},r),t)},mx=gx,vx=function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return Oe({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:r,paddingTop:r})},bx=function(e){var t=e.children,n=e.innerProps,r=e.innerRef,o=e.isMulti;return Ae("div",Ve({},Yt(e,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:r},n),t)},Lf=function(e,t){var n=e.theme,r=n.spacing.baseUnit,o=n.colors;return Oe({textAlign:"center"},t?{}:{color:o.neutral40,padding:"".concat(r*2,"px ").concat(r*3,"px")})},wx=Lf,yx=Lf,xx=function(e){var t=e.children,n=t===void 0?"No options":t,r=e.innerProps,o=ar(e,ux);return Ae("div",Ve({},Yt(Oe(Oe({},o),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},Cx=function(e){var t=e.children,n=t===void 0?"Loading...":t,r=e.innerProps,o=ar(e,cx);return Ae("div",Ve({},Yt(Oe(Oe({},o),{},{children:n,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},kx=function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},Sx=function(e){var t=e.appendTo,n=e.children,r=e.controlElement,o=e.innerProps,i=e.menuPlacement,a=e.menuPosition,l=d.useRef(null),s=d.useRef(null),u=d.useState(Pf(i)),c=fr(u,2),h=c[0],g=c[1],p=d.useMemo(function(){return{setPortalPlacement:g}},[]),f=d.useState(null),m=fr(f,2),y=m[0],w=m[1],v=d.useCallback(function(){if(r){var S=nx(r),P=a==="fixed"?0:window.pageYOffset,T=S[h]+P;(T!==y?.offset||S.left!==y?.rect.left||S.width!==y?.rect.width)&&w({offset:T,rect:S})}},[r,a,h,y?.offset,y?.rect.left,y?.rect.width]);Cs(function(){v()},[v]);var x=d.useCallback(function(){typeof s.current=="function"&&(s.current(),s.current=null),r&&l.current&&(s.current=qy(r,l.current,v,{elementResize:"ResizeObserver"in window}))},[r,v]);Cs(function(){x()},[x]);var E=d.useCallback(function(S){l.current=S,x()},[x]);if(!t&&a!=="fixed"||!y)return null;var R=Ae("div",Ve({ref:E},Yt(Oe(Oe({},e),{},{offset:y.offset,position:a,rect:y.rect}),"menuPortal",{"menu-portal":!0}),o),n);return Ae(Af.Provider,{value:p},t?qd.createPortal(R,t):R)},Mx=function(e){var t=e.isDisabled,n=e.isRtl;return{label:"container",direction:n?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},Ix=function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,o=e.isRtl;return Ae("div",Ve({},Yt(e,"container",{"--is-disabled":r,"--is-rtl":o}),n),t)},Rx=function(e,t){var n=e.theme.spacing,r=e.isMulti,o=e.hasValue,i=e.selectProps.controlShouldRenderValue;return Oe({alignItems:"center",display:r&&o&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(n.baseUnit*2,"px")})},Ex=function(e){var t=e.children,n=e.innerProps,r=e.isMulti,o=e.hasValue;return Ae("div",Ve({},Yt(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":o}),n),t)},Tx=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},Ox=function(e){var t=e.children,n=e.innerProps;return Ae("div",Ve({},Yt(e,"indicatorsContainer",{indicators:!0}),n),t)},md,Dx=["size"],Px=["innerProps","isRtl","size"],Ax={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Hf=function(e){var t=e.size,n=ar(e,Dx);return Ae("svg",Ve({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Ax},n))},nu=function(e){return Ae(Hf,Ve({size:20},e),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(e){return Ae(Hf,Ve({size:20},e),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"}))},zf=function(e,t){var n=e.isFocused,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return Oe({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:o*2,":hover":{color:n?i.neutral80:i.neutral40}})},Lx=zf,Hx=function(e){var t=e.children,n=e.innerProps;return Ae("div",Ve({},Yt(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||Ae(Ff,null))},Fx=zf,zx=function(e){var t=e.children,n=e.innerProps;return Ae("div",Ve({},Yt(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||Ae(nu,null))},Vx=function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return Oe({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:o*2,marginTop:o*2})},$x=function(e){var t=e.innerProps;return Ae("span",Ve({},t,Yt(e,"indicatorSeparator",{"indicator-separator":!0})))},_x=zy(md||(md=Vy([`
|
|
188
|
-
0%, 80%, 100% { opacity: 0; }
|
|
189
|
-
40% { opacity: 1; }
|
|
190
|
-
`]))),Nx=function(e,t){var n=e.isFocused,r=e.size,o=e.theme,i=o.colors,a=o.spacing.baseUnit;return Oe({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:a*2})},Zl=function(e){var t=e.delay,n=e.offset;return Ae("span",{css:Gs({animation:"".concat(_x," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},Bx=function(e){var t=e.innerProps,n=e.isRtl,r=e.size,o=r===void 0?4:r,i=ar(e,Px);return Ae("div",Ve({},Yt(Oe(Oe({},i),{},{innerProps:t,isRtl:n,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),Ae(Zl,{delay:0,offset:n}),Ae(Zl,{delay:160,offset:!0}),Ae(Zl,{delay:320,offset:!n}))},jx=function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.theme,i=o.colors,a=o.borderRadius,l=o.spacing;return Oe({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?i.neutral5:i.neutral0,borderColor:n?i.neutral10:r?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:r?i.primary:i.neutral30}})},Wx=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return Ae("div",Ve({ref:o},Yt(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":a}),i,{"aria-disabled":n||void 0}),t)},Ux=Wx,Xx=["data"],Yx=function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:n.baseUnit*2,paddingTop:n.baseUnit*2}},Zx=function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.getClassNames,i=e.Heading,a=e.headingProps,l=e.innerProps,s=e.label,u=e.theme,c=e.selectProps;return Ae("div",Ve({},Yt(e,"group",{group:!0}),l),Ae(i,Ve({},a,{selectProps:c,theme:u,getStyles:r,getClassNames:o,cx:n}),s),Ae("div",null,t))},qx=function(e,t){var n=e.theme,r=n.colors,o=n.spacing;return Oe({label:"group",cursor:"default",display:"block"},t?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:o.baseUnit*3,paddingRight:o.baseUnit*3,textTransform:"uppercase"})},Kx=function(e){var t=Tf(e);t.data;var n=ar(t,Xx);return Ae("div",Ve({},Yt(e,"groupHeading",{"group-heading":!0}),n))},Qx=Zx,Gx=["innerRef","isDisabled","isHidden","inputClassName"],Jx=function(e,t){var n=e.isDisabled,r=e.value,o=e.theme,i=o.spacing,a=o.colors;return Oe(Oe({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},eC),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},Vf={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},eC={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Oe({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Vf)},tC=function(e){return Oe({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},Vf)},nC=function(e){var t=e.cx,n=e.value,r=Tf(e),o=r.innerRef,i=r.isDisabled,a=r.isHidden,l=r.inputClassName,s=ar(r,Gx);return Ae("div",Ve({},Yt(e,"input",{"input-container":!0}),{"data-value":n||""}),Ae("input",Ve({className:t({input:!0},l),ref:o,style:tC(a),disabled:i},s)))},rC=nC,oC=function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors;return Oe({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:o/2,margin:r.baseUnit/2})},iC=function(e,t){var n=e.theme,r=n.borderRadius,o=n.colors,i=e.cropWithEllipsis;return Oe({overflow:"hidden",textOverflow:i||i===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:r/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},aC=function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors,a=e.isFocused;return Oe({alignItems:"center",display:"flex"},t?{}:{borderRadius:o/2,backgroundColor:a?i.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},$f=function(e){var t=e.children,n=e.innerProps;return Ae("div",n,t)},lC=$f,sC=$f;function uC(e){var t=e.children,n=e.innerProps;return Ae("div",Ve({role:"button"},n),t||Ae(nu,{size:14}))}var cC=function(e){var t=e.children,n=e.components,r=e.data,o=e.innerProps,i=e.isDisabled,a=e.removeProps,l=e.selectProps,s=n.Container,u=n.Label,c=n.Remove;return Ae(s,{data:r,innerProps:Oe(Oe({},Yt(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),o),selectProps:l},Ae(u,{data:r,innerProps:Oe({},Yt(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},t),Ae(c,{data:r,innerProps:Oe(Oe({},Yt(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:l}))},dC=cC,hC=function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.theme,a=i.spacing,l=i.colors;return Oe({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:o?l.primary:r?l.primary25:"transparent",color:n?l.neutral20:o?l.neutral0:"inherit",padding:"".concat(a.baseUnit*2,"px ").concat(a.baseUnit*3,"px"),":active":{backgroundColor:n?void 0:o?l.primary:l.primary50}})},fC=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.innerRef,a=e.innerProps;return Ae("div",Ve({},Yt(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":o}),{ref:i,"aria-disabled":n},a),t)},pC=fC,gC=function(e,t){var n=e.theme,r=n.spacing,o=n.colors;return Oe({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:o.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},mC=function(e){var t=e.children,n=e.innerProps;return Ae("div",Ve({},Yt(e,"placeholder",{placeholder:!0}),n),t)},vC=mC,bC=function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing,i=r.colors;return Oe({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},wC=function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return Ae("div",Ve({},Yt(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),t)},yC=wC,za={ClearIndicator:zx,Control:Ux,DropdownIndicator:Hx,DownChevron:Ff,CrossIcon:nu,Group:Qx,GroupHeading:Kx,IndicatorsContainer:Ox,IndicatorSeparator:$x,Input:rC,LoadingIndicator:Bx,Menu:mx,MenuList:bx,MenuPortal:Sx,LoadingMessage:Cx,NoOptionsMessage:xx,MultiValue:dC,MultiValueContainer:lC,MultiValueLabel:sC,MultiValueRemove:uC,Option:pC,Placeholder:vC,SelectContainer:Ix,SingleValue:yC,ValueContainer:Ex},xC=function(e){return Oe(Oe({},za),e.components)},vd=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function CC(e,t){return!!(e===t||vd(e)&&vd(t))}function kC(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!CC(e[n],t[n]))return!1;return!0}function SC(e,t){t===void 0&&(t=kC);var n=null;function r(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];if(n&&n.lastThis===this&&t(o,n.lastArgs))return n.lastResult;var a=e.apply(this,o);return n={lastResult:a,lastArgs:o,lastThis:this},a}return r.clear=function(){n=null},r}var MC={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"},IC=function(e){return Ae("span",Ve({css:MC},e))},bd=IC,RC={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.tabSelectsValue,o=e.context,i=e.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(r?", press Tab to select the option and exit the menu":"",".");case"input":return i?"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" 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(e){var t=e.action,n=e.label,r=n===void 0?"":n,o=e.labels,i=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", 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 i?"option ".concat(r," is disabled. Select another option."):"option ".concat(r,", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,o=e.label,i=o===void 0?"":o,a=e.selectValue,l=e.isDisabled,s=e.isSelected,u=e.isAppleDevice,c=function(p,f){return p&&p.length?"".concat(p.indexOf(f)+1," of ").concat(p.length):""};if(t==="value"&&a)return"value ".concat(i," focused, ").concat(c(a,n),".");if(t==="menu"&&u){var h=l?" disabled":"",g="".concat(s?" selected":"").concat(h);return"".concat(i).concat(g,", ").concat(c(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},EC=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,o=e.focusableOptions,i=e.isFocused,a=e.selectValue,l=e.selectProps,s=e.id,u=e.isAppleDevice,c=l.ariaLiveMessages,h=l.getOptionLabel,g=l.inputValue,p=l.isMulti,f=l.isOptionDisabled,m=l.isSearchable,y=l.menuIsOpen,w=l.options,v=l.screenReaderStatus,x=l.tabSelectsValue,E=l.isLoading,R=l["aria-label"],S=l["aria-live"],P=d.useMemo(function(){return Oe(Oe({},RC),c||{})},[c]),T=d.useMemo(function(){var D="";if(t&&P.onChange){var k=t.option,Y=t.options,$=t.removedValue,K=t.removedValues,ie=t.value,ee=function(le){return Array.isArray(le)?null:le},Q=$||k||ee(ie),ge=Q?h(Q):"",oe=Y||K||void 0,de=oe?oe.map(h):[],pe=Oe({isDisabled:Q&&f(Q,a),label:ge,labels:de},t);D=P.onChange(pe)}return D},[t,P,f,a,h]),C=d.useMemo(function(){var D="",k=n||r,Y=!!(n&&a&&a.includes(n));if(k&&P.onFocus){var $={focused:k,label:h(k),isDisabled:f(k,a),isSelected:Y,options:o,context:k===n?"menu":"value",selectValue:a,isAppleDevice:u};D=P.onFocus($)}return D},[n,r,h,f,P,o,a,u]),A=d.useMemo(function(){var D="";if(y&&w.length&&!E&&P.onFilter){var k=v({count:o.length});D=P.onFilter({inputValue:g,resultsMessage:k})}return D},[o,g,y,P,w,v,E]),O=t?.action==="initial-input-focus",I=d.useMemo(function(){var D="";if(P.guidance){var k=r?"value":y?"menu":"input";D=P.guidance({"aria-label":R,context:k,isDisabled:n&&f(n,a),isMulti:p,isSearchable:m,tabSelectsValue:x,isInitialFocus:O})}return D},[R,n,r,p,f,m,y,P,a,x,O]),M=Ae(d.Fragment,null,Ae("span",{id:"aria-selection"},T),Ae("span",{id:"aria-focused"},C),Ae("span",{id:"aria-results"},A),Ae("span",{id:"aria-guidance"},I));return Ae(d.Fragment,null,Ae(bd,{id:s},O&&M),Ae(bd,{"aria-live":S,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!O&&M))},TC=EC,ks=[{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źẑżžẓẕƶȥɀⱬꝣ"}],OC=new RegExp("["+ks.map(function(e){return e.letters}).join("")+"]","g"),_f={};for(var ql=0;ql<ks.length;ql++)for(var Kl=ks[ql],Ql=0;Ql<Kl.letters.length;Ql++)_f[Kl.letters[Ql]]=Kl.base;var Nf=function(e){return e.replace(OC,function(t){return _f[t]})},DC=SC(Nf),wd=function(e){return e.replace(/^\s+|\s+$/g,"")},PC=function(e){return"".concat(e.label," ").concat(e.value)},AC=function(e){return function(t,n){if(t.data.__isNew__)return!0;var r=Oe({ignoreCase:!0,ignoreAccents:!0,stringify:PC,trim:!0,matchFrom:"any"},e),o=r.ignoreCase,i=r.ignoreAccents,a=r.stringify,l=r.trim,s=r.matchFrom,u=l?wd(n):n,c=l?wd(a(t)):a(t);return o&&(u=u.toLowerCase(),c=c.toLowerCase()),i&&(u=DC(u),c=Nf(c)),s==="start"?c.substr(0,u.length)===u:c.indexOf(u)>-1}},LC=["innerRef"];function HC(e){var t=e.innerRef,n=ar(e,LC),r=sx(n,"onExited","in","enter","exit","appear");return Ae("input",Ve({ref:t},r,{css:Gs({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 FC=function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()};function zC(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,i=e.onTopLeave,a=d.useRef(!1),l=d.useRef(!1),s=d.useRef(0),u=d.useRef(null),c=d.useCallback(function(y,w){if(u.current!==null){var v=u.current,x=v.scrollTop,E=v.scrollHeight,R=v.clientHeight,S=u.current,P=w>0,T=E-R-x,C=!1;T>w&&a.current&&(r&&r(y),a.current=!1),P&&l.current&&(i&&i(y),l.current=!1),P&&w>T?(n&&!a.current&&n(y),S.scrollTop=E,C=!0,a.current=!0):!P&&-w>x&&(o&&!l.current&&o(y),S.scrollTop=0,C=!0,l.current=!0),C&&FC(y)}},[n,r,o,i]),h=d.useCallback(function(y){c(y,y.deltaY)},[c]),g=d.useCallback(function(y){s.current=y.changedTouches[0].clientY},[]),p=d.useCallback(function(y){var w=s.current-y.changedTouches[0].clientY;c(y,w)},[c]),f=d.useCallback(function(y){if(y){var w=ix?{passive:!1}:!1;y.addEventListener("wheel",h,w),y.addEventListener("touchstart",g,w),y.addEventListener("touchmove",p,w)}},[p,g,h]),m=d.useCallback(function(y){y&&(y.removeEventListener("wheel",h,!1),y.removeEventListener("touchstart",g,!1),y.removeEventListener("touchmove",p,!1))},[p,g,h]);return d.useEffect(function(){if(t){var y=u.current;return f(y),function(){m(y)}}},[t,f,m]),function(y){u.current=y}}var yd=["boxSizing","height","overflow","paddingRight","position"],xd={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Cd(e){e.cancelable&&e.preventDefault()}function kd(e){e.stopPropagation()}function Sd(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Md(){return"ontouchstart"in window||navigator.maxTouchPoints}var Id=!!(typeof window<"u"&&window.document&&window.document.createElement),ai=0,Co={capture:!1,passive:!1};function VC(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,o=d.useRef({}),i=d.useRef(null),a=d.useCallback(function(s){if(Id){var u=document.body,c=u&&u.style;if(r&&yd.forEach(function(f){var m=c&&c[f];o.current[f]=m}),r&&ai<1){var h=parseInt(o.current.paddingRight,10)||0,g=document.body?document.body.clientWidth:0,p=window.innerWidth-g+h||0;Object.keys(xd).forEach(function(f){var m=xd[f];c&&(c[f]=m)}),c&&(c.paddingRight="".concat(p,"px"))}u&&Md()&&(u.addEventListener("touchmove",Cd,Co),s&&(s.addEventListener("touchstart",Sd,Co),s.addEventListener("touchmove",kd,Co))),ai+=1}},[r]),l=d.useCallback(function(s){if(Id){var u=document.body,c=u&&u.style;ai=Math.max(ai-1,0),r&&ai<1&&yd.forEach(function(h){var g=o.current[h];c&&(c[h]=g)}),u&&Md()&&(u.removeEventListener("touchmove",Cd,Co),s&&(s.removeEventListener("touchstart",Sd,Co),s.removeEventListener("touchmove",kd,Co)))}},[r]);return d.useEffect(function(){if(t){var s=i.current;return a(s),function(){l(s)}}},[t,a,l]),function(s){i.current=s}}var $C=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},_C={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function NC(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,o=r===void 0?!0:r,i=e.onBottomArrive,a=e.onBottomLeave,l=e.onTopArrive,s=e.onTopLeave,u=zC({isEnabled:o,onBottomArrive:i,onBottomLeave:a,onTopArrive:l,onTopLeave:s}),c=VC({isEnabled:n}),h=function(g){u(g),c(g)};return Ae(d.Fragment,null,n&&Ae("div",{onClick:$C,css:_C}),t(h))}var BC={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},jC=function(e){var t=e.name,n=e.onFocus;return Ae("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:BC,value:"",onChange:function(){}})},WC=jC;function ru(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 UC(){return ru(/^iPhone/i)}function Bf(){return ru(/^Mac/i)}function XC(){return ru(/^iPad/i)||Bf()&&navigator.maxTouchPoints>1}function YC(){return UC()||XC()}function ZC(){return Bf()||YC()}var qC=function(e){return e.label},jf=function(e){return e.label},Wf=function(e){return e.value},KC=function(e){return!!e.isDisabled},QC={clearIndicator:Fx,container:Mx,control:jx,dropdownIndicator:Lx,group:Yx,groupHeading:qx,indicatorsContainer:Tx,indicatorSeparator:Vx,input:Jx,loadingIndicator:Nx,loadingMessage:yx,menu:fx,menuList:vx,menuPortal:kx,multiValue:oC,multiValueLabel:iC,multiValueRemove:aC,noOptionsMessage:wx,option:hC,placeholder:gC,singleValue:bC,valueContainer:Rx},GC={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%)"},JC=4,Uf=4,ek=38,tk=Uf*2,nk={baseUnit:Uf,controlHeight:ek,menuGutter:tk},Gl={borderRadius:JC,colors:GC,spacing:nk},rk={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:gd(),captureMenuScroll:!gd(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:AC(),formatGroupLabel:qC,getOptionLabel:jf,getOptionValue:Wf,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:KC,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!rx(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(t!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function Rd(e,t,n,r){var o=Zf(e,t,n),i=qf(e,t,n),a=Yf(e,t),l=Ea(e,t);return{type:"option",data:t,isDisabled:o,isSelected:i,label:a,value:l,index:r}}function la(e,t){return e.options.map(function(n,r){if("options"in n){var o=n.options.map(function(a,l){return Rd(e,a,t,l)}).filter(function(a){return Td(e,a)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=Rd(e,n,t,r);return Td(e,i)?i:void 0}).filter(ax)}function Xf(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,Oo(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function Ed(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,Oo(r.options.map(function(o){return{data:o.data,id:"".concat(t,"-").concat(r.index,"-").concat(o.index)}}))):n.push({data:r.data,id:"".concat(t,"-").concat(r.index)}),n},[])}function ok(e,t){return Xf(la(e,t))}function Td(e,t){var n=e.inputValue,r=n===void 0?"":n,o=t.data,i=t.isSelected,a=t.label,l=t.value;return(!Qf(e)||!i)&&Kf(e,{label:a,value:l,data:o},r)}function ik(e,t){var n=e.focusedValue,r=e.selectValue,o=r.indexOf(n);if(o>-1){var i=t.indexOf(n);if(i>-1)return n;if(o<t.length)return t[o]}return null}function ak(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var Jl=function(e,t){var n,r=(n=e.find(function(o){return o.data===t}))===null||n===void 0?void 0:n.id;return r||null},Yf=function(e,t){return e.getOptionLabel(t)},Ea=function(e,t){return e.getOptionValue(t)};function Zf(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function qf(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=Ea(e,t);return n.some(function(o){return Ea(e,o)===r})}function Kf(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var Qf=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return t===void 0?n:t},lk=1,ou=(function(e){Hm(n,e);var t=Vm(n);function n(r){var o;if(zm(this,n),o=t.call(this,r),o.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:"",isAppleDevice:!1},o.blockOptionHover=!1,o.isComposing=!1,o.commonProps=void 0,o.initialTouchX=0,o.initialTouchY=0,o.openAfterFocus=!1,o.scrollToFocusedOptionOnUpdate=!1,o.userIsDragging=void 0,o.controlRef=null,o.getControlRef=function(s){o.controlRef=s},o.focusedOptionRef=null,o.getFocusedOptionRef=function(s){o.focusedOptionRef=s},o.menuListRef=null,o.getMenuListRef=function(s){o.menuListRef=s},o.inputRef=null,o.getInputRef=function(s){o.inputRef=s},o.focus=o.focusInput,o.blur=o.blurInput,o.onChange=function(s,u){var c=o.props,h=c.onChange,g=c.name;u.name=g,o.ariaOnChange(s,u),h(s,u)},o.setValue=function(s,u,c){var h=o.props,g=h.closeMenuOnSelect,p=h.isMulti,f=h.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:f}),g&&(o.setState({inputIsHiddenAfterUpdate:!p}),o.onMenuClose()),o.setState({clearFocusValueOnUpdate:!0}),o.onChange(s,{action:u,option:c})},o.selectOption=function(s){var u=o.props,c=u.blurInputOnSelect,h=u.isMulti,g=u.name,p=o.state.selectValue,f=h&&o.isOptionSelected(s,p),m=o.isOptionDisabled(s,p);if(f){var y=o.getOptionValue(s);o.setValue(p.filter(function(w){return o.getOptionValue(w)!==y}),"deselect-option",s)}else if(!m)h?o.setValue([].concat(Oo(p),[s]),"select-option",s):o.setValue(s,"select-option");else{o.ariaOnChange(s,{action:"select-option",option:s,name:g});return}c&&o.blurInput()},o.removeValue=function(s){var u=o.props.isMulti,c=o.state.selectValue,h=o.getOptionValue(s),g=c.filter(function(f){return o.getOptionValue(f)!==h}),p=si(u,g,g[0]||null);o.onChange(p,{action:"remove-value",removedValue:s}),o.focusInput()},o.clearValue=function(){var s=o.state.selectValue;o.onChange(si(o.props.isMulti,[],null),{action:"clear",removedValues:s})},o.popValue=function(){var s=o.props.isMulti,u=o.state.selectValue,c=u[u.length-1],h=u.slice(0,u.length-1),g=si(s,h,h[0]||null);c&&o.onChange(g,{action:"pop-value",removedValue:c})},o.getFocusedOptionId=function(s){return Jl(o.state.focusableOptionsWithIds,s)},o.getFocusableOptionsWithIds=function(){return Ed(la(o.props,o.state.selectValue),o.getElementId("option"))},o.getValue=function(){return o.state.selectValue},o.cx=function(){for(var s=arguments.length,u=new Array(s),c=0;c<s;c++)u[c]=arguments[c];return Gy.apply(void 0,[o.props.classNamePrefix].concat(u))},o.getOptionLabel=function(s){return Yf(o.props,s)},o.getOptionValue=function(s){return Ea(o.props,s)},o.getStyles=function(s,u){var c=o.props.unstyled,h=QC[s](u,c);h.boxSizing="border-box";var g=o.props.styles[s];return g?g(h,u):h},o.getClassNames=function(s,u){var c,h;return(c=(h=o.props.classNames)[s])===null||c===void 0?void 0:c.call(h,u)},o.getElementId=function(s){return"".concat(o.state.instancePrefix,"-").concat(s)},o.getComponents=function(){return xC(o.props)},o.buildCategorizedOptions=function(){return la(o.props,o.state.selectValue)},o.getCategorizedOptions=function(){return o.props.menuIsOpen?o.buildCategorizedOptions():[]},o.buildFocusableOptions=function(){return Xf(o.buildCategorizedOptions())},o.getFocusableOptions=function(){return o.props.menuIsOpen?o.buildFocusableOptions():[]},o.ariaOnChange=function(s,u){o.setState({ariaSelection:Oe({value:s},u)})},o.onMenuMouseDown=function(s){s.button===0&&(s.stopPropagation(),s.preventDefault(),o.focusInput())},o.onMenuMouseMove=function(s){o.blockOptionHover=!1},o.onControlMouseDown=function(s){if(!s.defaultPrevented){var u=o.props.openMenuOnClick;o.state.isFocused?o.props.menuIsOpen?s.target.tagName!=="INPUT"&&s.target.tagName!=="TEXTAREA"&&o.onMenuClose():u&&o.openMenu("first"):(u&&(o.openAfterFocus=!0),o.focusInput()),s.target.tagName!=="INPUT"&&s.target.tagName!=="TEXTAREA"&&s.preventDefault()}},o.onDropdownIndicatorMouseDown=function(s){if(!(s&&s.type==="mousedown"&&s.button!==0)&&!o.props.isDisabled){var u=o.props,c=u.isMulti,h=u.menuIsOpen;o.focusInput(),h?(o.setState({inputIsHiddenAfterUpdate:!c}),o.onMenuClose()):o.openMenu("first"),s.preventDefault()}},o.onClearIndicatorMouseDown=function(s){s&&s.type==="mousedown"&&s.button!==0||(o.clearValue(),s.preventDefault(),o.openAfterFocus=!1,s.type==="touchend"?o.focusInput():setTimeout(function(){return o.focusInput()}))},o.onScroll=function(s){typeof o.props.closeMenuOnScroll=="boolean"?s.target instanceof HTMLElement&&Fa(s.target)&&o.props.onMenuClose():typeof o.props.closeMenuOnScroll=="function"&&o.props.closeMenuOnScroll(s)&&o.props.onMenuClose()},o.onCompositionStart=function(){o.isComposing=!0},o.onCompositionEnd=function(){o.isComposing=!1},o.onTouchStart=function(s){var u=s.touches,c=u&&u.item(0);c&&(o.initialTouchX=c.clientX,o.initialTouchY=c.clientY,o.userIsDragging=!1)},o.onTouchMove=function(s){var u=s.touches,c=u&&u.item(0);if(c){var h=Math.abs(c.clientX-o.initialTouchX),g=Math.abs(c.clientY-o.initialTouchY),p=5;o.userIsDragging=h>p||g>p}},o.onTouchEnd=function(s){o.userIsDragging||(o.controlRef&&!o.controlRef.contains(s.target)&&o.menuListRef&&!o.menuListRef.contains(s.target)&&o.blurInput(),o.initialTouchX=0,o.initialTouchY=0)},o.onControlTouchEnd=function(s){o.userIsDragging||o.onControlMouseDown(s)},o.onClearIndicatorTouchEnd=function(s){o.userIsDragging||o.onClearIndicatorMouseDown(s)},o.onDropdownIndicatorTouchEnd=function(s){o.userIsDragging||o.onDropdownIndicatorMouseDown(s)},o.handleInputChange=function(s){var u=o.props.inputValue,c=s.currentTarget.value;o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange(c,{action:"input-change",prevInputValue:u}),o.props.menuIsOpen||o.onMenuOpen()},o.onInputFocus=function(s){o.props.onFocus&&o.props.onFocus(s),o.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(o.openAfterFocus||o.props.openMenuOnFocus)&&o.openMenu("first"),o.openAfterFocus=!1},o.onInputBlur=function(s){var u=o.props.inputValue;if(o.menuListRef&&o.menuListRef.contains(document.activeElement)){o.inputRef.focus();return}o.props.onBlur&&o.props.onBlur(s),o.onInputChange("",{action:"input-blur",prevInputValue:u}),o.onMenuClose(),o.setState({focusedValue:null,isFocused:!1})},o.onOptionHover=function(s){if(!(o.blockOptionHover||o.state.focusedOption===s)){var u=o.getFocusableOptions(),c=u.indexOf(s);o.setState({focusedOption:s,focusedOptionId:c>-1?o.getFocusedOptionId(s):null})}},o.shouldHideSelectedOptions=function(){return Qf(o.props)},o.onValueInputFocus=function(s){s.preventDefault(),s.stopPropagation(),o.focus()},o.onKeyDown=function(s){var u=o.props,c=u.isMulti,h=u.backspaceRemovesValue,g=u.escapeClearsValue,p=u.inputValue,f=u.isClearable,m=u.isDisabled,y=u.menuIsOpen,w=u.onKeyDown,v=u.tabSelectsValue,x=u.openMenuOnFocus,E=o.state,R=E.focusedOption,S=E.focusedValue,P=E.selectValue;if(!m&&!(typeof w=="function"&&(w(s),s.defaultPrevented))){switch(o.blockOptionHover=!0,s.key){case"ArrowLeft":if(!c||p)return;o.focusValue("previous");break;case"ArrowRight":if(!c||p)return;o.focusValue("next");break;case"Delete":case"Backspace":if(p)return;if(S)o.removeValue(S);else{if(!h)return;c?o.popValue():f&&o.clearValue()}break;case"Tab":if(o.isComposing||s.shiftKey||!y||!v||!R||x&&o.isOptionSelected(R,P))return;o.selectOption(R);break;case"Enter":if(s.keyCode===229)break;if(y){if(!R||o.isComposing)return;o.selectOption(R);break}return;case"Escape":y?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close",prevInputValue:p}),o.onMenuClose()):f&&g&&o.clearValue();break;case" ":if(p)return;if(!y){o.openMenu("first");break}if(!R)return;o.selectOption(R);break;case"ArrowUp":y?o.focusOption("up"):o.openMenu("last");break;case"ArrowDown":y?o.focusOption("down"):o.openMenu("first");break;case"PageUp":if(!y)return;o.focusOption("pageup");break;case"PageDown":if(!y)return;o.focusOption("pagedown");break;case"Home":if(!y)return;o.focusOption("first");break;case"End":if(!y)return;o.focusOption("last");break;default:return}s.preventDefault()}},o.state.instancePrefix="react-select-"+(o.props.instanceId||++lk),o.state.selectValue=Ia(r.value),r.menuIsOpen&&o.state.selectValue.length){var i=o.getFocusableOptionsWithIds(),a=o.buildFocusableOptions(),l=a.indexOf(o.state.selectValue[0]);o.state.focusableOptionsWithIds=i,o.state.focusedOption=a[l],o.state.focusedOptionId=Jl(i,a[l])}return o}return Fm(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&&pd(this.menuListRef,this.focusedOptionRef),ZC()&&this.setState({isAppleDevice:!0})}},{key:"componentDidUpdate",value:function(r){var o=this.props,i=o.isDisabled,a=o.menuIsOpen,l=this.state.isFocused;(l&&!i&&r.isDisabled||l&&a&&!r.menuIsOpen)&&this.focusInput(),l&&i&&!r.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!l&&!i&&r.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(pd(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(r,o){this.props.onInputChange(r,o)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(r){var o=this,i=this.state,a=i.selectValue,l=i.isFocused,s=this.buildFocusableOptions(),u=r==="first"?0:s.length-1;if(!this.props.isMulti){var c=s.indexOf(a[0]);c>-1&&(u=c)}this.scrollToFocusedOptionOnUpdate=!(l&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:s[u],focusedOptionId:this.getFocusedOptionId(s[u])},function(){return o.onMenuOpen()})}},{key:"focusValue",value:function(r){var o=this.state,i=o.selectValue,a=o.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var l=i.indexOf(a);a||(l=-1);var s=i.length-1,u=-1;if(i.length){switch(r){case"previous":l===0?u=0:l===-1?u=s:u=l-1;break;case"next":l>-1&&l<s&&(u=l+1);break}this.setState({inputIsHidden:u!==-1,focusedValue:i[u]})}}}},{key:"focusOption",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",o=this.props.pageSize,i=this.state.focusedOption,a=this.getFocusableOptions();if(a.length){var l=0,s=a.indexOf(i);i||(s=-1),r==="up"?l=s>0?s-1:a.length-1:r==="down"?l=(s+1)%a.length:r==="pageup"?(l=s-o,l<0&&(l=0)):r==="pagedown"?(l=s+o,l>a.length-1&&(l=a.length-1)):r==="last"&&(l=a.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:a[l],focusedValue:null,focusedOptionId:this.getFocusedOptionId(a[l])})}}},{key:"getTheme",value:(function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(Gl):Oe(Oe({},Gl),this.props.theme):Gl})},{key:"getCommonProps",value:function(){var r=this.clearValue,o=this.cx,i=this.getStyles,a=this.getClassNames,l=this.getValue,s=this.selectOption,u=this.setValue,c=this.props,h=c.isMulti,g=c.isRtl,p=c.options,f=this.hasValue();return{clearValue:r,cx:o,getStyles:i,getClassNames:a,getValue:l,hasValue:f,isMulti:h,isRtl:g,options:p,selectOption:s,selectProps:c,setValue:u,theme:this.getTheme()}}},{key:"hasValue",value:function(){var r=this.state.selectValue;return r.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var r=this.props,o=r.isClearable,i=r.isMulti;return o===void 0?i:o}},{key:"isOptionDisabled",value:function(r,o){return Zf(this.props,r,o)}},{key:"isOptionSelected",value:function(r,o){return qf(this.props,r,o)}},{key:"filterOption",value:function(r,o){return Kf(this.props,r,o)}},{key:"formatOptionLabel",value:function(r,o){if(typeof this.props.formatOptionLabel=="function"){var i=this.props.inputValue,a=this.state.selectValue;return this.props.formatOptionLabel(r,{context:o,inputValue:i,selectValue:a})}else return this.getOptionLabel(r)}},{key:"formatGroupLabel",value:function(r){return this.props.formatGroupLabel(r)}},{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 r=this.props,o=r.isDisabled,i=r.isSearchable,a=r.inputId,l=r.inputValue,s=r.tabIndex,u=r.form,c=r.menuIsOpen,h=r.required,g=this.getComponents(),p=g.Input,f=this.state,m=f.inputIsHidden,y=f.ariaSelection,w=this.commonProps,v=a||this.getElementId("input"),x=Oe(Oe(Oe({"aria-autocomplete":"list","aria-expanded":c,"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":h,role:"combobox","aria-activedescendant":this.state.isAppleDevice?void 0:this.state.focusedOptionId||""},c&&{"aria-controls":this.getElementId("listbox")}),!i&&{"aria-readonly":!0}),this.hasValue()?y?.action==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return i?d.createElement(p,Ve({},w,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:v,innerRef:this.getInputRef,isDisabled:o,isHidden:m,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:s,form:u,type:"text",value:l},x)):d.createElement(HC,Ve({id:v,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Ma,onFocus:this.onInputFocus,disabled:o,tabIndex:s,inputMode:"none",form:u,value:""},x))})},{key:"renderPlaceholderOrValue",value:function(){var r=this,o=this.getComponents(),i=o.MultiValue,a=o.MultiValueContainer,l=o.MultiValueLabel,s=o.MultiValueRemove,u=o.SingleValue,c=o.Placeholder,h=this.commonProps,g=this.props,p=g.controlShouldRenderValue,f=g.isDisabled,m=g.isMulti,y=g.inputValue,w=g.placeholder,v=this.state,x=v.selectValue,E=v.focusedValue,R=v.isFocused;if(!this.hasValue()||!p)return y?null:d.createElement(c,Ve({},h,{key:"placeholder",isDisabled:f,isFocused:R,innerProps:{id:this.getElementId("placeholder")}}),w);if(m)return x.map(function(P,T){var C=P===E,A="".concat(r.getOptionLabel(P),"-").concat(r.getOptionValue(P));return d.createElement(i,Ve({},h,{components:{Container:a,Label:l,Remove:s},isFocused:C,isDisabled:f,key:A,index:T,removeProps:{onClick:function(){return r.removeValue(P)},onTouchEnd:function(){return r.removeValue(P)},onMouseDown:function(O){O.preventDefault()}},data:P}),r.formatOptionLabel(P,"value"))});if(y)return null;var S=x[0];return d.createElement(u,Ve({},h,{data:S,isDisabled:f}),this.formatOptionLabel(S,"value"))}},{key:"renderClearIndicator",value:function(){var r=this.getComponents(),o=r.ClearIndicator,i=this.commonProps,a=this.props,l=a.isDisabled,s=a.isLoading,u=this.state.isFocused;if(!this.isClearable()||!o||l||!this.hasValue()||s)return null;var c={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return d.createElement(o,Ve({},i,{innerProps:c,isFocused:u}))}},{key:"renderLoadingIndicator",value:function(){var r=this.getComponents(),o=r.LoadingIndicator,i=this.commonProps,a=this.props,l=a.isDisabled,s=a.isLoading,u=this.state.isFocused;if(!o||!s)return null;var c={"aria-hidden":"true"};return d.createElement(o,Ve({},i,{innerProps:c,isDisabled:l,isFocused:u}))}},{key:"renderIndicatorSeparator",value:function(){var r=this.getComponents(),o=r.DropdownIndicator,i=r.IndicatorSeparator;if(!o||!i)return null;var a=this.commonProps,l=this.props.isDisabled,s=this.state.isFocused;return d.createElement(i,Ve({},a,{isDisabled:l,isFocused:s}))}},{key:"renderDropdownIndicator",value:function(){var r=this.getComponents(),o=r.DropdownIndicator;if(!o)return null;var i=this.commonProps,a=this.props.isDisabled,l=this.state.isFocused,s={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return d.createElement(o,Ve({},i,{innerProps:s,isDisabled:a,isFocused:l}))}},{key:"renderMenu",value:function(){var r=this,o=this.getComponents(),i=o.Group,a=o.GroupHeading,l=o.Menu,s=o.MenuList,u=o.MenuPortal,c=o.LoadingMessage,h=o.NoOptionsMessage,g=o.Option,p=this.commonProps,f=this.state.focusedOption,m=this.props,y=m.captureMenuScroll,w=m.inputValue,v=m.isLoading,x=m.loadingMessage,E=m.minMenuHeight,R=m.maxMenuHeight,S=m.menuIsOpen,P=m.menuPlacement,T=m.menuPosition,C=m.menuPortalTarget,A=m.menuShouldBlockScroll,O=m.menuShouldScrollIntoView,I=m.noOptionsMessage,M=m.onMenuScrollToTop,D=m.onMenuScrollToBottom;if(!S)return null;var k=function(Q,ge){var oe=Q.type,de=Q.data,pe=Q.isDisabled,le=Q.isSelected,V=Q.label,L=Q.value,U=f===de,re=pe?void 0:function(){return r.onOptionHover(de)},se=pe?void 0:function(){return r.selectOption(de)},De="".concat(r.getElementId("option"),"-").concat(ge),be={id:De,onClick:se,onMouseMove:re,onMouseOver:re,tabIndex:-1,role:"option","aria-selected":r.state.isAppleDevice?void 0:le};return d.createElement(g,Ve({},p,{innerProps:be,data:de,isDisabled:pe,isSelected:le,key:De,label:V,type:oe,value:L,isFocused:U,innerRef:U?r.getFocusedOptionRef:void 0}),r.formatOptionLabel(Q.data,"menu"))},Y;if(this.hasOptions())Y=this.getCategorizedOptions().map(function(Q){if(Q.type==="group"){var ge=Q.data,oe=Q.options,de=Q.index,pe="".concat(r.getElementId("group"),"-").concat(de),le="".concat(pe,"-heading");return d.createElement(i,Ve({},p,{key:pe,data:ge,options:oe,Heading:a,headingProps:{id:le,data:Q.data},label:r.formatGroupLabel(Q.data)}),Q.options.map(function(V){return k(V,"".concat(de,"-").concat(V.index))}))}else if(Q.type==="option")return k(Q,"".concat(Q.index))});else if(v){var $=x({inputValue:w});if($===null)return null;Y=d.createElement(c,p,$)}else{var K=I({inputValue:w});if(K===null)return null;Y=d.createElement(h,p,K)}var ie={minMenuHeight:E,maxMenuHeight:R,menuPlacement:P,menuPosition:T,menuShouldScrollIntoView:O},ee=d.createElement(px,Ve({},p,ie),function(Q){var ge=Q.ref,oe=Q.placerProps,de=oe.placement,pe=oe.maxHeight;return d.createElement(l,Ve({},p,ie,{innerRef:ge,innerProps:{onMouseDown:r.onMenuMouseDown,onMouseMove:r.onMenuMouseMove},isLoading:v,placement:de}),d.createElement(NC,{captureEnabled:y,onTopArrive:M,onBottomArrive:D,lockEnabled:A},function(le){return d.createElement(s,Ve({},p,{innerRef:function(V){r.getMenuListRef(V),le(V)},innerProps:{role:"listbox","aria-multiselectable":p.isMulti,id:r.getElementId("listbox")},isLoading:v,maxHeight:pe,focusedOption:f}),Y)}))});return C||T==="fixed"?d.createElement(u,Ve({},p,{appendTo:C,controlElement:this.controlRef,menuPlacement:P,menuPosition:T}),ee):ee}},{key:"renderFormField",value:function(){var r=this,o=this.props,i=o.delimiter,a=o.isDisabled,l=o.isMulti,s=o.name,u=o.required,c=this.state.selectValue;if(u&&!this.hasValue()&&!a)return d.createElement(WC,{name:s,onFocus:this.onValueInputFocus});if(!(!s||a))if(l)if(i){var h=c.map(function(f){return r.getOptionValue(f)}).join(i);return d.createElement("input",{name:s,type:"hidden",value:h})}else{var g=c.length>0?c.map(function(f,m){return d.createElement("input",{key:"i-".concat(m),name:s,type:"hidden",value:r.getOptionValue(f)})}):d.createElement("input",{name:s,type:"hidden",value:""});return d.createElement("div",null,g)}else{var p=c[0]?this.getOptionValue(c[0]):"";return d.createElement("input",{name:s,type:"hidden",value:p})}}},{key:"renderLiveRegion",value:function(){var r=this.commonProps,o=this.state,i=o.ariaSelection,a=o.focusedOption,l=o.focusedValue,s=o.isFocused,u=o.selectValue,c=this.getFocusableOptions();return d.createElement(TC,Ve({},r,{id:this.getElementId("live-region"),ariaSelection:i,focusedOption:a,focusedValue:l,isFocused:s,selectValue:u,focusableOptions:c,isAppleDevice:this.state.isAppleDevice}))}},{key:"render",value:function(){var r=this.getComponents(),o=r.Control,i=r.IndicatorsContainer,a=r.SelectContainer,l=r.ValueContainer,s=this.props,u=s.className,c=s.id,h=s.isDisabled,g=s.menuIsOpen,p=this.state.isFocused,f=this.commonProps=this.getCommonProps();return d.createElement(a,Ve({},f,{className:u,innerProps:{id:c,onKeyDown:this.onKeyDown},isDisabled:h,isFocused:p}),this.renderLiveRegion(),d.createElement(o,Ve({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:h,isFocused:p,menuIsOpen:g}),d.createElement(l,Ve({},f,{isDisabled:h}),this.renderPlaceholderOrValue(),this.renderInput()),d.createElement(i,Ve({},f,{isDisabled:h}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(r,o){var i=o.prevProps,a=o.clearFocusValueOnUpdate,l=o.inputIsHiddenAfterUpdate,s=o.ariaSelection,u=o.isFocused,c=o.prevWasFocused,h=o.instancePrefix,g=r.options,p=r.value,f=r.menuIsOpen,m=r.inputValue,y=r.isMulti,w=Ia(p),v={};if(i&&(p!==i.value||g!==i.options||f!==i.menuIsOpen||m!==i.inputValue)){var x=f?ok(r,w):[],E=f?Ed(la(r,w),"".concat(h,"-option")):[],R=a?ik(o,w):null,S=ak(o,x),P=Jl(E,S);v={selectValue:w,focusedOption:S,focusedOptionId:P,focusableOptionsWithIds:E,focusedValue:R,clearFocusValueOnUpdate:!1}}var T=l!=null&&r!==i?{inputIsHidden:l,inputIsHiddenAfterUpdate:void 0}:{},C=s,A=u&&c;return u&&!A&&(C={value:si(y,w,w[0]||null),options:w,action:"initial-input-focus"},A=!c),s?.action==="initial-input-focus"&&(C=null),Oe(Oe(Oe({},v),T),{},{prevProps:r,ariaSelection:C,prevWasFocused:A})}}]),n})(d.Component);ou.defaultProps=rk;var sk=d.forwardRef(function(e,t){var n=yf(e);return d.createElement(ou,Ve({ref:t},n))}),Gf=sk,uk=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],Od=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=String(e).toLowerCase(),o=String(n.getOptionValue(t)).toLowerCase(),i=String(n.getOptionLabel(t)).toLowerCase();return o===r||i===r},es={formatCreateLabel:function(e){return'Create "'.concat(e,'"')},isValidNewOption:function(e,t,n,r){return!(!e||t.some(function(o){return Od(e,o,r)})||n.some(function(o){return Od(e,o,r)}))},getNewOptionData:function(e,t){return{label:t,value:e,__isNew__:!0}}};function ck(e){var t=e.allowCreateWhileLoading,n=t===void 0?!1:t,r=e.createOptionPosition,o=r===void 0?"last":r,i=e.formatCreateLabel,a=i===void 0?es.formatCreateLabel:i,l=e.isValidNewOption,s=l===void 0?es.isValidNewOption:l,u=e.getNewOptionData,c=u===void 0?es.getNewOptionData:u,h=e.onCreateOption,g=e.options,p=g===void 0?[]:g,f=e.onChange,m=ar(e,uk),y=m.getOptionValue,w=y===void 0?Wf:y,v=m.getOptionLabel,x=v===void 0?jf:v,E=m.inputValue,R=m.isLoading,S=m.isMulti,P=m.value,T=m.name,C=d.useMemo(function(){return s(E,Ia(P),p,{getOptionValue:w,getOptionLabel:x})?c(E,a(E)):void 0},[a,c,x,w,E,s,p,P]),A=d.useMemo(function(){return(n||!R)&&C?o==="first"?[C].concat(Oo(p)):[].concat(Oo(p),[C]):p},[n,o,R,C,p]),O=d.useCallback(function(I,M){if(M.action!=="select-option")return f(I,M);var D=Array.isArray(I)?I:[I];if(D[D.length-1]===C){if(h)h(E);else{var k=c(E,E),Y={action:"create-option",name:T,option:k};f(si(S,[].concat(Oo(Ia(P)),[k]),k),Y)}return}f(I,M)},[c,E,S,T,C,h,f,P]);return Oe(Oe({},m),{},{options:A,onChange:O})}var dk=d.forwardRef(function(e,t){var n=yf(e),r=ck(n);return d.createElement(ou,Ve({ref:t},r))}),hk=dk;const iu="__value",fk=new RegExp(`^${iu}\\d+__`),pk=An("div",{target:"e1jrhwo91"})({name:"1rauklo",styles:"display:flex;flex-direction:column;align-items:stretch;margin-top:auto;margin-bottom:auto;.gdg-multi-select{font-family:var(--gdg-font-family);font-size:var(--gdg-editor-font-size);}"}),gk=An("div",{target:"e1jrhwo90"})({name:"hgyqdb",styles:"font-family:var(--gdg-font-family);font-size:var(--gdg-editor-font-size);color:var(--gdg-text-dark);>div{border-radius:0.25rem;border:1px solid var(--gdg-border-color);}"}),sa=e=>e.map(t=>typeof t=="string"?{value:t,label:t,color:void 0}:Se(t)?{value:"",label:"",color:void 0}:{value:t.value,label:t.label??t.value??"",color:t.color}),Jf=(e,t,n)=>Se(e)?[]:e.map((r,o)=>{const i=n?`${iu}${o}__`:"",a=t.find(l=>l.value===r);return a?{...a,value:`${i}${a.value}`}:{value:`${i}${r}`,label:r}}),mk=e=>{const{Menu:t}=za,{children:n,...r}=e;return fe.jsx(t,{...r,children:n})},vk=e=>{const t=e.innerProps,n={...t,onMouseDown:r=>{r.stopPropagation(),t?.onMouseDown?.(r)},onTouchEnd:r=>{r.stopPropagation(),t?.onTouchEnd?.(r)}};return fe.jsx(za.MultiValueLabel,{...e,innerProps:n})},bk=()=>null,wk=()=>null,yk=e=>e.selectProps?.menuDisabled?null:fe.jsx(gk,{children:fe.jsx(mk,{...e,className:[e.className,"click-outside-ignore"].filter(Boolean).join(" ")})}),xk=e=>{const{value:t,initialValue:n,onChange:r,onFinishedEditing:o}=e,{options:i,values:a,allowCreation:l,allowDuplicates:s}=t.data,u=qh(),[c,h]=d.useState(a),[g,p]=d.useState(!0),[f,m]=d.useState(n??""),[y]=d.useState(()=>document.getElementById("portal")),w=d.useMemo(()=>sa(i??[]),[i]),v=l&&s&&w.length===0,x=d.useCallback(M=>{g&&M.stopPropagation()},[g]),E=d.useCallback(()=>p(!0),[]),R=d.useCallback(()=>p(!1),[]),S=d.useCallback(M=>l&&s&&M.inputValue?`Create "${M.inputValue}"`:void 0,[l,s]),P=d.useMemo(()=>({control:(M,D)=>({...M,border:0,boxShadow:"none",backgroundColor:u.bgCell,pointerEvents:D.isDisabled?"auto":M.pointerEvents,cursor:D.isDisabled?"default":M.cursor}),valueContainer:M=>({...M,flexWrap:M.flexWrap??"wrap",overflowX:"auto",overflowY:"hidden"}),menu:M=>({...M,backgroundColor:u.bgCell}),option:(M,D)=>({...M,fontSize:u.editorFontSize,fontFamily:u.fontFamily,color:u.textDark,...D.isFocused?{backgroundColor:u.accentLight,cursor:"pointer"}:{},":active":{...M[":active"],color:u.accentFg,backgroundColor:u.accentColor}}),input:(M,{isDisabled:D})=>D?{display:"none"}:{...M,fontSize:u.editorFontSize,fontFamily:u.fontFamily,color:u.textDark},placeholder:M=>({...M,fontSize:u.editorFontSize,fontFamily:u.fontFamily,color:u.textLight}),noOptionsMessage:M=>({...M,fontSize:u.editorFontSize,fontFamily:u.fontFamily,color:u.textLight}),clearIndicator:M=>({...M,color:u.textLight,":hover":{color:u.textDark,cursor:"pointer"}}),multiValue:(M,{data:D})=>({...M,backgroundColor:D.color??u.bgBubble,borderRadius:`${u.roundingRadius??u.bubbleHeight/2}px`,flexShrink:0,whiteSpace:"nowrap"}),multiValueLabel:(M,{data:D,isDisabled:k})=>({...M,paddingRight:k?u.bubblePadding:0,paddingLeft:u.bubblePadding,paddingTop:0,paddingBottom:0,color:D.color?us(D.color)>.5?"black":"white":u.textBubble,fontSize:u.editorFontSize,fontFamily:u.fontFamily,justifyContent:"center",alignItems:"center",display:"flex",height:u.bubbleHeight,whiteSpace:"nowrap"}),multiValueRemove:(M,{data:D,isDisabled:k,isFocused:Y})=>k?{display:"none"}:{...M,color:D.color?us(D.color)>.5?"black":"white":u.textBubble,backgroundColor:void 0,borderRadius:Y?`${u.roundingRadius??u.bubbleHeight/2}px`:void 0,":hover":{cursor:"pointer"}}}),[u]),T=d.useCallback(M=>{const D=M.map(k=>s&&k.startsWith(iu)?k.replace(new RegExp(fk),""):k);h(D),r({...t,data:{...t.data,values:D}})},[t,r,s]),C=M=>{switch(M.key){case"Enter":case"Tab":if(!f){o(t,[0,1]);return}s&&l&&(m(""),T([...c??[],f]),p(!1),M.preventDefault())}},A=d.useMemo(()=>({DropdownIndicator:bk,IndicatorSeparator:wk,MultiValueLabel:vk,Menu:yk}),[]),O=d.useCallback(M=>{M===null||!Array.isArray(M)||T(M.map(D=>D.value))},[T]),I=l?hk:Gf;return fe.jsx(pk,{onKeyDown:x,"data-testid":"multi-select-cell",children:fe.jsx(I,{className:"gdg-multi-select",isMulti:!0,isDisabled:t.readonly,isClearable:!0,isSearchable:!0,inputValue:f,onInputChange:m,options:w,placeholder:t.readonly?"":l?"Add...":void 0,noOptionsMessage:S,menuIsOpen:t.readonly?!1:g,onMenuOpen:E,onMenuClose:R,value:Jf(c,w,s),onKeyDown:t.readonly?void 0:C,menuPlacement:"auto",menuPortalTarget:y,autoFocus:!0,openMenuOnFocus:!0,openMenuOnClick:!0,closeMenuOnSelect:!0,backspaceRemovesValue:!0,escapeClearsValue:!1,styles:P,components:A,onChange:O,menuDisabled:v})})},Ck={kind:G.Custom,isMatch:e=>e.data.kind==="multi-select-cell",draw:(e,t)=>{const{ctx:n,theme:r,rect:o,highlighted:i}=e,{values:a,options:l}=t.data;if(Se(a))return!0;const s=sa(l??[]),u={x:o.x+r.cellHorizontalPadding,y:o.y+r.cellVerticalPadding,width:o.width-2*r.cellHorizontalPadding,height:o.height-2*r.cellVerticalPadding},c=Math.max(1,Math.floor(u.height/(r.bubbleHeight+r.bubblePadding)));let{x:h}=u,g=1,p=c===1?u.y+(u.height-r.bubbleHeight)/2:u.y+(u.height-c*r.bubbleHeight-(c-1)*r.bubblePadding)/2;for(const f of a){const m=s.find(E=>E.value===f),y=m?.color??(i?r.bgBubbleSelected:r.bgBubble),w=m?.label??f,v=Tr(w,n).width+r.bubblePadding*2,x=r.bubbleHeight/2;if(h!==u.x&&h+v>u.x+u.width&&g<c&&(g++,p+=r.bubbleHeight+r.bubblePadding,h=u.x),n.fillStyle=y,n.beginPath(),Zn(n,h,p,v,r.bubbleHeight,r.roundingRadius??r.bubbleHeight/2),n.fill(),n.fillStyle=m?.color?us(y)>.5?"#000000":"#ffffff":r.textBubble,n.fillText(w,h+r.bubblePadding,p+x+qn(n,r)),h+=v+r.bubbleMargin,h>u.x+u.width+r.cellHorizontalPadding&&g>=c)break}return!0},measure:(e,t,n)=>{const{values:r,options:o}=t.data;if(!r)return n.cellHorizontalPadding*2;const i=Jf(r,sa(o??[]),t.data.allowDuplicates).map(l=>l.label??l.value),a=i.reduce((l,s)=>e.measureText(s).width+l+n.bubblePadding*2+n.bubbleMargin,0);return i.length===0?n.cellHorizontalPadding*2:a+2*n.cellHorizontalPadding-n.bubbleMargin},provideEditor:()=>({editor:xk,disablePadding:!0,deletedValue:e=>({...e,copyData:"",data:{...e.data,values:[]}})}),onPaste:(e,t)=>{if(!e?.trim())return{...t,values:[]};let n=e.split(",").map(r=>r.trim());if(t.allowDuplicates||(n=n.filter((r,o)=>n.indexOf(r)===o)),!t.allowCreation){const r=sa(t.options??[]);n=n.filter(o=>r.find(i=>i.value===o))}if(n.length!==0)return{...t,values:n}}},ep="line_chart",kk="area_chart",tp="bar_chart";function au(e,t,n,r){const o=Lo({y_min:null,y_max:null,color:void 0},t.columnTypeOptions);let i;o.color==="auto"||o.color==="auto-inverse"?i=r.colors.greenColor:i=o.color?oh(o.color,r):void 0;const a={kind:G.Custom,allowOverlay:!1,copyData:"",contentAlign:t.contentAlignment,data:{kind:"sparkline-cell",values:[],displayValues:[],graphKind:n,color:i,yAxis:[o.y_min??0,o.y_max??1]}};return{...t,kind:e,typeIcon:e===ep?":material/show_chart:":e===tp?":material/bar_chart:":":material/area_chart:",sortMode:"default",isEditable:!1,getCell(l){if(Se(l))return vs();const s=qs(l),u=[];let c=[];if(s.length===0)return vs();let h=Number.MIN_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER;for(let y=0;y<s.length;y++){const w=wi(s[y]);if(Number.isNaN(w)||Se(w))return St(nt(s),`The value cannot be interpreted as a numeric array. ${nt(w)} is not a number.`);w>h&&(h=w),w<g&&(g=w),u.push(w)}let p,f;if(g===h){let y;h<=0?y=h===0?1:0:y=h,p=o.y_max??y,f=o.y_min??(h>=0?0:h)}else p=o.y_max??h,f=o.y_min??g;if(Se(f)||Se(p)||Number.isNaN(f)||Number.isNaN(p)||f>=p)return St("Invalid min/max y-axis configuration",`The y_min (${f}) and y_max (${p}) configuration options must be valid numbers.`);u.length>0&&(h>p||g<f)?c=u.map(y=>h-g===0?h>(p||1)?p:f:(p-f)*((y-g)/(h-g))+f):c=u;let m=i;return(o.color==="auto"&&c[0]>c[c.length-1]||o.color==="auto-inverse"&&c[0]<c[c.length-1])&&(m=r.colors.redColor),{...a,copyData:u.join(","),data:{...a.data,values:c,displayValues:u.map(y=>ha(y)),yAxis:[f,p],color:m},isMissingValue:Se(l)}},getCellValue(l){return l.kind===G.Loading||l.data?.values===void 0?null:l.data?.values}}}function np(e,t){return au(ep,e,"line",t)}np.isEditableType=!1;function rp(e,t){return au(tp,e,"bar",t)}rp.isEditableType=!1;function op(e,t){return au(kk,e,"area",t)}op.isEditableType=!1;function lu(e,t){const n={kind:G.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(en(t.radii.sm),en(t.radii.maxCheckbox)))},getCell(r){let o=null;return o=vf(r),o===void 0?St(nt(r),"The value cannot be interpreted as boolean."):{...n,data:o,isMissingValue:Se(o)}},getCellValue(r){return r.data===void 0?null:r.data}}}lu.isEditableType=!0;function Dd(e,t){return t.startsWith("+")||t.startsWith("-")?e=e.utcOffset(t,!1):e=e.tz(t),e}function su(e,t,n,r,o,i,a){const l=Lo({format:n,step:r,timezone:a},t.columnTypeOptions);let s;if(lt(l.timezone))try{s=Dd(Hu(),l.timezone)?.utcOffset()||void 0}catch{}let u;lt(l.min_value)&&(u=Gi(l.min_value)||void 0);let c;lt(l.max_value)&&(c=Gi(l.max_value)||void 0);const h={kind:G.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:l.step?.toString()||"1",format:o,min:u,max:c}},g=p=>{const f=Gi(p);return f===null?!t.isRequired:!(f===void 0||lt(u)&&i(f)<i(u)||lt(c)&&i(f)>i(c))};return{...t,kind:e,typeIcon:e==="date"?":material/calendar_month:":e==="time"?":material/access_time:":":material/calendar_today:",sortMode:"default",validateInput:g,getCell(p,f){if(f===!0){const x=g(p);if(x===!1)return St(nt(p),"Invalid input.");x instanceof Date&&(p=x)}const m=Gi(p);let y="",w="",v=s;if(m===void 0)return St(nt(p),"The value cannot be interpreted as a datetime object.");if(m!==null){let x=Hu.utc(m);if(!x.isValid())return St(nt(m),`Invalid moment date. This should never happen. Please report this bug.
|
|
191
|
-
Error: ${x.toString()}`);if(l.timezone){try{x=Dd(x,l.timezone)}catch(E){return St(x.toISOString(),`Failed to adjust to the provided timezone: ${l.timezone}.
|
|
192
|
-
Error: ${E}`)}v=x.utcOffset()}try{w=Fu(x,l.format||n,e)}catch(E){return St(x.toISOString(),`Failed to format the date for rendering with: ${l.format}.
|
|
193
|
-
Error: ${E}`)}y=Fu(x,n,e)}return{...h,copyData:y,isMissingValue:Se(m),data:{...h.data,date:m,displayDate:w,timezoneOffset:v}}},getCellValue(p){return Se(p?.data?.date)?null:i(p.data.date)}}}function uu(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=Lg(e.arrowType),r=lt(n)||lt(e?.columnTypeOptions?.timezone);return su("datetime",e,r?t+"Z":t,1,"datetime-local",o=>r?o.toISOString():o.toISOString().replace("Z",""),n)}uu.isEditableType=!0;function cu(e){let t="HH:mm:ss";return e.columnTypeOptions?.step>=60?t="HH:mm":e.columnTypeOptions?.step<1&&(t="HH:mm:ss.SSS"),su("time",e,t,1,"time",n=>n.toISOString().split("T")[1].replace("Z",""))}cu.isEditableType=!0;function du(e){return su("date",e,"YYYY-MM-DD",1,"date",t=>t.toISOString().split("T")[0])}du.isEditableType=!0;function ip(e){const t={kind:G.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=lt(n)?[nt(n)]:[];return{...t,data:r,isMissingValue:!lt(n),displayData:r}},getCellValue(n){return n.data===void 0||n.data.length===0?null:n.data[0]}}}ip.isEditableType=!1;function ap(e){const t={kind:G.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=lt(n)?yi(Ca(n)):"";return{...t,copyData:r,isMissingValue:Se(n),data:{...t.data,value:n,displayValue:r}}}catch(r){return St(nt(n),`The value cannot be interpreted as a JSON string. Error: ${r}`)}},getCellValue(n){return n.data?.value??null}}}ap.isEditableType=!1;function lp(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}.
|
|
194
|
-
Error: ${s}`}let r=!1,o=t.display_text,i;if(!Se(o)){if(o.startsWith(":material/")&&Hg(o))o=Fg(o).icon,r=!0;else if(o.includes("(")&&o.includes(")"))try{i=new RegExp(o,"us")}catch{i=void 0}}const a={kind:G.Uri,readonly:!e.isEditable,allowOverlay:!r,contentAlign:e.contentAlignment??(r?"center":void 0),style:"normal",hoverEffect:!0,data:"",displayData:"",copyData:"",...r&&{themeOverride:{fontFamily:zg.iconFont,linkColor:void 0}}},l=s=>{if(Se(s))return!e.isRequired;const u=nt(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:l,getCell(s,u){if(Se(s))return{...a,data:null,isMissingValue:!0,onClickUri:()=>{},themeOverride:void 0};const c=s;if(typeof n=="string")return St(nt(c),n);if(u&&l(c)===!1)return St(nt(c),"Invalid input.");let h="";return c&&(i!==void 0?h=dy(i,c):h=o||c),{...a,data:c,displayData:h,isMissingValue:Se(c),onClickUri:g=>{window.open(c.startsWith("www.")?`https://${c}`:c,"_blank","noopener,noreferrer"),g.preventDefault()},copyData:c}},getCellValue(s){return Se(s.data)?null:s.data}}}lp.isEditableType=!0;function hu(e){const t={kind:G.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(Se(n))return{...t,data:{...t.data,values:null},isMissingValue:!0,copyData:""};const r=qs(n);return{...t,data:{...t.data,values:r},copyData:bf(r),...e.isEditable&&!mf(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 Se(n.data?.values)?null:n.data.values}}}hu.isEditableType=!0;const Sk=(e,t)=>{if(Se(e))return[];const n=t.colors.chartCategoricalColors,r=eh(t);let o=0;return e.filter(i=>i!==null&&i!=="").map(i=>{if(typeof i=="string")return{value:nt(i).trim(),label:void 0,color:void 0};let a;i.color==="auto"?(a=ko(n[o%n.length],r?.7:.6),o+=1):i.color&&(a=Ng(i.color,t));const l=a?Bg(a,t.colors.bgColor):void 0;return{value:nt(i.value).trim(),label:i.label??void 0,color:l}})};function sp(e,t){const n=Lo({options:[],accept_new_options:!1},e.columnTypeOptions),r=Sk(n.options,t),o=new Set(r.map(a=>a.value)),i={kind:G.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(a,l){if(Se(a))return{...i,data:{...i.data,values:null},isMissingValue:!0,copyData:""};let s=qs(a);return s=s.map(u=>nt(u).trim()),l&&s.length>0&&n.accept_new_options===!1&&(s=s.filter(u=>o.has(u)),s.length===0)?St(nt(a),"The values could not be matched with the configured options."):{...i,data:{...i.data,values:s},copyData:bf(s),...e.isEditable&&!mf(a)&&{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(a){return Se(a.data?.values)?null:a.data.values}}}sp.isEditableType=!0;function fu(e){const t=Lo({step:rh(e.arrowType)?1:void 0,min_value:Vg(e.arrowType)?0:void 0},e.columnTypeOptions),n=!t.format&&($g(e.arrowType)||_g(e.arrowType)),r=Se(t.min_value)||t.min_value<0,o=lt(t.step)&&!Number.isNaN(t.step)?wf(t.step):void 0,i={kind:G.Number,data:void 0,displayData:"",readonly:!e.isEditable,allowOverlay:!0,contentAlign:e.contentAlignment||n?"left":"right",style:e.isPinned?"faded":"normal",allowNegative:r,fixedDecimals:o,thousandSeparator:""},a=l=>{let s=wi(l);if(Se(s))return!e.isRequired;if(Number.isNaN(s))return!1;let u=!1;return lt(t.max_value)&&s>t.max_value&&(s=t.max_value,u=!0),lt(t.min_value)&&s<t.min_value?!1:u?s:!0};return{...e,kind:"number",sortMode:"smart",typeIcon:":material/tag:",validateInput:a,getCell(l,s){if(s===!0){const h=a(l);if(h===!1)return St(nt(l),"Invalid input.");typeof h=="number"&&(l=h)}let u=wi(l),c="";if(lt(u)){if(Number.isNaN(u))return St(nt(l),"The value cannot be interpreted as a number.");if(lt(o)&&(u=uy(u,o)),Number.isInteger(u)&&!Number.isSafeInteger(u))return St(nt(l),"The value is larger than the maximum supported integer values in number columns (2^53).");try{n?c=as(u,e.arrowType):c=ha(u,t.format,o)}catch(h){return St(nt(u),lt(t.format)?`Failed to format the number based on the provided format configuration: (${t.format}). Error: ${h}`:`Failed to format the number. Error: ${h}`)}}return{...i,data:u,displayData:c,isMissingValue:Se(u),copyData:Se(u)?"":nt(u)}},getCellValue(l){return l.data===void 0?null:l.data}}}fu.isEditableType=!0;function xi(e){const t={kind:G.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=lt(n)?nt(n):null,o=lt(r)?yi(r):"";return{...t,data:r,displayData:o,isMissingValue:Se(n)}}catch(r){return St(nt(n),`The value cannot be interpreted as a string. Error: ${r}`)}},getCellValue(n){return n.data===void 0?null:n.data}}}xi.isEditableType=!1;function up(e,t){const n=rh(e.arrowType),r=Lo({min_value:0,max_value:n?100:1,format:n?"%3d%%":"percent",step:n?1:void 0,color:void 0},e.columnTypeOptions),o=Se(r.step)||Number.isNaN(r.step)?void 0:wf(r.step);let i;try{i=ha(r.max_value,r.format,o)}catch{i=nt(r.max_value)}const a={kind:G.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:i}};return{...e,kind:"progress",sortMode:"smart",typeIcon:":material/commit:",isEditable:!1,getCell(l){if(Se(l))return vs();if(Se(r.min_value)||Se(r.max_value)||Number.isNaN(r.min_value)||Number.isNaN(r.max_value)||r.min_value>=r.max_value)return St("Invalid min/max parameters",`The min_value (${r.min_value}) and max_value (${r.max_value}) parameters must be valid numbers.`);if(lt(r.step)&&Number.isNaN(r.step))return St("Invalid step parameter",`The step parameter (${r.step}) must be a valid number.`);const s=wi(l);if(Number.isNaN(s)||Se(s))return St(nt(l),"The value cannot be interpreted as a number.");if(Number.isInteger(s)&&!Number.isSafeInteger(s))return St(nt(l),"The value is larger than the maximum supported integer values in number columns (2^53).");let u="";try{u=ha(s,r.format,o)}catch(g){return St(nt(s),lt(r.format)?`Failed to format the number based on the provided format configuration: (${r.format}). Error: ${g}`:`Failed to format the number. Error: ${g}`)}const c=Math.min(r.max_value,Math.max(r.min_value,s));let h;if(r.color==="auto"||r.color==="auto-inverse"){const g=r.max_value-r.min_value,p=(g===0?0:(c-r.min_value)/g)>.5;r.color==="auto"?h=p?t?.colors.greenColor:t?.colors.redColor:h=p?t?.colors.redColor:t?.colors.greenColor}else r.color&&(h=oh(r.color,t));return{...a,isMissingValue:Se(l),copyData:String(s),data:{...a.data,value:c,label:u,measureLabel:u.length>i.length?u:i,color:h}}},getCellValue(l){return l.kind===G.Loading||l.data?.value===void 0?null:l.data?.value}}}up.isEditableType=!1;const Mk=e=>Se(e)?[]:e.filter(t=>lt(t)&&t!=="").map(t=>{if(typeof t=="object"&&"value"in t){const r=nt(t.value).trim();return{value:r,label:t.label??r}}const n=nt(t).trim();return{value:n,label:n}});function pu(e){let t="string";const n=Lo({options:nh(e.arrowType)?[!0,!1]:e.arrowType.categoricalOptions??[]},e.columnTypeOptions),r=s=>typeof s=="object"&&s!==null&&"value"in s,o=s=>r(s)?typeof s.value:typeof s,i=new Set(n.options.map(o));i.size===1&&(i.has("number")||i.has("bigint")?t="number":i.has("boolean")&&(t="boolean"));const a=Mk(n.options),l={kind:G.Custom,allowOverlay:!0,copyData:"",contentAlign:e.contentAlignment,readonly:!e.isEditable,style:e.isPinned?"faded":"normal",data:{kind:"dropdown-cell",allowedValues:[...e.isRequired!==!0?[null]:[],...a],value:""}};return{...e,kind:"selectbox",sortMode:"default",typeIcon:":material/arrow_drop_down_circle:",getCell(s,u){let c=null;return lt(s)&&s!==""&&(c=nt(s)),u&&!l.data.allowedValues.some(h=>h===null?c===null:typeof h=="string"?h===c:typeof h=="object"&&"value"in h?h.value===c:!1)?St(nt(c),"The value is not part of the allowed options."):{...l,isMissingValue:c===null,copyData:c||"",data:{...l.data,value:c}}},getCellValue(s){return Se(s.data?.value)||s.data?.value===""?null:t==="number"?wi(s.data?.value)??null:t==="boolean"?vf(s.data?.value)??null:s.data?.value}}}pu.isEditableType=!0;function gu(e){const t=e.columnTypeOptions||{};let n;if(t.validate)try{n=new RegExp(t.validate,"us")}catch(i){n=`Invalid validate regex: ${t.validate}.
|
|
195
|
-
Error: ${i}`}const r={kind:G.Text,data:"",displayData:"",allowOverlay:!0,contentAlign:e.contentAlignment,allowWrapping:e.isWrappingAllowed,readonly:!e.isEditable,style:e.isPinned?"faded":"normal"},o=i=>{if(Se(i))return!e.isRequired;let a=nt(i),l=!1;return t.max_chars&&a.length>t.max_chars&&(a=a.slice(0,t.max_chars),l=!0),n instanceof RegExp&&n.test(a)===!1?!1:l?a:!0};return{...e,kind:"text",sortMode:"default",typeIcon:":material/notes:",validateInput:o,getCell(i,a){if(typeof n=="string")return St(nt(i),n);if(a){const l=o(i);if(l===!1)return St(nt(i),"Invalid input.");typeof l=="string"&&(i=l)}try{const l=lt(i)?nt(i):null,s=lt(l)?yi(l):"";return{...r,isMissingValue:Se(l),data:l,displayData:s}}catch(l){return St("Incompatible value",`The value cannot be interpreted as string. Error: ${l}`)}},getCellValue(i){return i.data===void 0?null:i.data}}}gu.isEditableType=!0;const Pd=An("img",{target:"e24uaba0"})({name:"6eya2z",styles:"max-width:100%;max-height:37.5rem;object-fit:scale-down"}),Ik=({urls:e})=>{const t=e&&e.length>0?e[0]:"";return t.startsWith("http")?fe.jsx("a",{href:t,target:"_blank",rel:"noreferrer noopener",children:fe.jsx(Pd,{src:t})}):fe.jsx(Pd,{src:t})},Ad=new Map(Object.entries({object:xi,text:gu,checkbox:lu,selectbox:pu,list:hu,multiselect:sp,number:fu,link:lp,datetime:uu,date:du,time:cu,line_chart:np,bar_chart:rp,area_chart:op,image:ip,progress:up,json:ap})),Rk=[gy,Ck],Ci=({columnId:e,columnConfigMapping:t,updatedProps:n})=>{const r=new Map(t),o=r.get(e),i={...o||{},...n||{}};return(o?.type_config||n?.type_config)&&(i.type_config={...o?.type_config||{},...n?.type_config||{}}),r.set(e,i),r};function Ek(e){return{changeColumnFormat:d.useCallback((t,n)=>{e(r=>Ci({columnId:t,columnConfigMapping:r,updatedProps:{type_config:{format:n}}}))},[e])}}function ts(e,t,n){if(!n.includes(t))return;const r=new RegExp(`${e}[,\\s].*{(?:[^}]*[\\s;]{1})?${t}:\\s*([^;}]+)[;]?.*}`,"gm");n=n.replace(/{/g," {");const o=r.exec(n);if(o)return o[1].trim()}function Tk(e,t,n){const r={};if(!n.includes(t))return e;const o=ts(t,"color",n);o&&(r.textDark=o,(e.kind===G.Bubble||e.kind===G.Custom&&e.data?.kind==="multi-select-cell")&&(r.textBubble=o),e.kind===G.Uri&&(r.linkColor=o));const i=ts(t,"background-color",n);i&&(r.bgCell=i),i==="yellow"&&o===void 0&&(r.textDark="#31333F");const a=ts(t,"font-weight",n);return a&&(r.baseFontStyle=`${a} ${Pg.sm}`),r?{...e,themeOverride:r}:e}function Ok(e){return Cg(e)||kg(e)?gu:Sg(e)?uu:Qd(e)?cu:Mg(e)?du:Ig(e)||Rg(e)?xi:nh(e)?lu:Eg(e)?fu:Tg(e)?pu:Og(e)?hu:xi}function cp(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 mu(e){return{group:void 0,isEditable:!1,isIndex:!1,isPinned:!1,isHidden:!1,isStretched:!1,...e}}function Dk(e,t){const n=e.columnNames.map(l=>l[t]),{title:r,group:o}=cp(n),i=e.columnTypes[t];let a=!0;return pg(i)&&(a=!1),mu({id:`_index-${t}`,indexNumber:t,name:r,title:r,group:o,isEditable:a,arrowType:i,isIndex:!0,isPinned:!0})}function Pk(e,t){const n=e.columnNames.map(a=>a[t]),{title:r,group:o}=cp(n),i=e.columnTypes[t];return mu({id:`_column-${r}-${t}`,indexNumber:t,name:r,isEditable:!0,title:r,arrowType:i,group:o})}function dp(){return mu({id:"_empty-index",indexNumber:0,title:"",name:"",isEditable:!1,isIndex:!0,isPinned:!0,arrowType:{type:ug.INDEX,arrowField:new lg("",new sg,!0),pandasType:void 0}})}function Ld(e){const t=[],{dimensions:n}=e,r=n.numIndexColumns,o=n.numDataColumns;if(r===0&&o===0)return t.push(dp()),t;for(let i=0;i<r;i++)t.push(Dk(e,i));for(let i=0;i<o;i++)t.push(Pk(e,i+r));return t}function Ak(e,t,n,r=void 0){let o;if(e.kind==="object"||e.kind==="json")o=e.getCell(lt(t.content)?yi(as(t.content,t.contentType)):null);else if(["time","date","datetime"].includes(e.kind)&<(t.content)&&(typeof t.content=="number"||typeof t.content=="bigint")){let i;Qd(t.contentType)&<(t.field?.type?.unit)?i=gm(t.content,t.field):i=Br.utc(Number(t.content)).toDate(),o=e.getCell(i)}else if(cg(t.contentType)){const i=Se(t.content)?null:as(t.content,t.contentType);o=e.getCell(i)}else o=e.getCell(t.content);if(Do(o))return o;if(!e.isEditable){if(n&<(n?.displayContent)){const i=yi(n.displayContent);o.kind===G.Text?o={...o,displayData:i}:o.kind===G.Number&&Se(e.columnTypeOptions?.format)?o={...o,displayData:i}:o.kind===G.Uri&&Se(e.columnTypeOptions?.display_text)?o={...o,displayData:i}:o.kind===G.Custom&&o.data?.kind==="date-picker-cell"&&Se(e.columnTypeOptions?.format)&&(o={...o,data:{...o.data,displayDate:i}})}r&&n?.cssId&&(o=Tk(o,n.cssId,r))}return o}function hp(e){return e?.useStretch??!1}function fp(e){if(e?.pixelWidth)return e.pixelWidth}function Lk(e){return e?.useContent??!1}function Hk(e,t){return t?!1:e?.useStretch??!1}function Fk(e){return e?.useContent??!1}function zk(e){if(e?.pixelHeight)return e.pixelHeight}function ns({numRows:e,rowHeight:t,theme:n,numHeaderRows:r=1}){return e*t+r*n.defaultHeaderHeight+2*n.tableBorderWidth}const ua="_index",Hd="_pos:",Fd={small:75,medium:200,large:400},pp=Ms.getLogger("useColumnLoader");function Vk(e){if(!Se(e)){if(typeof e=="number")return e;if(e in Fd)return Fd[e]}}const na=(e,t)=>ag(e,t,(n,r)=>{if(th(r))return r});function zd(e,t){if(!t)return e;let n={};return e.isIndex&&t.has(ua)&&(n=na(n,t.get(ua)??{})),t.has(`${Hd}${e.indexNumber}`)&&(n=na(n,t.get(`${Hd}${e.indexNumber}`)??{})),t.has(e.name)&&e.name!==ua&&(n=na(n,t.get(e.name)??{})),t.has(e.id)&&(n=na(n,t.get(e.id)??{})),qm(n)?e:Kd({...e},{title:n.label,width:Vk(n.width),isEditable:lt(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 $k(e){if(!e)return new Map;try{return new Map(Object.entries(JSON.parse(e)))}catch(t){return pp.error(t),new Map}}function Vd(e){const t=e.columnTypeOptions?.type;let n;return lt(t)&&(Ad.has(t)?n=Ad.get(t):pp.warn(`Unknown column type configured in column configuration: ${t}`)),Se(n)&&(n=Ok(e.arrowType)),n}function _k(e,t,n,r,o){const i=Yr(),a=d.useMemo(()=>$k(e.columns),[e.columns]),[l,s]=d.useState(a);d.useEffect(()=>{s(a)},[a]);const u=d.useMemo(()=>hp(o),[o]),c=d.useMemo(()=>fp(o),[o]),h=u||lt(c)&&c>0,g=lt(e.rowHeight)&&e.rowHeight>en("4rem"),p=d.useMemo(()=>Ld(t).map(f=>{let m={...f,...zd(f,l),isStretched:h};const y=Vd(m);return(e.editingMode===Xt.EditingMode.READ_ONLY||n||y.isEditableType===!1)&&(m={...m,isEditable:!1}),e.editingMode!==Xt.EditingMode.READ_ONLY&&m.isEditable==!0&&(m={...m,icon:"editable"},m.isRequired&&e.editingMode===Xt.EditingMode.DYNAMIC&&(m={...m,isHidden:!1})),y(m,i)}),[t,l,h,e.editingMode,n,i]);return{columns:d.useMemo(()=>{const f=Ld(t).map(v=>{let x={...v,...zd(v,l),isStretched:h,isWrappingAllowed:g};const E=Vd(x);return(e.editingMode===Xt.EditingMode.READ_ONLY||n||E.isEditableType===!1)&&(x={...x,isEditable:!1}),e.editingMode!==Xt.EditingMode.READ_ONLY&&x.isEditable==!0&&(x={...x,icon:"editable"},x.isRequired&&e.editingMode===Xt.EditingMode.DYNAMIC&&(x={...x,isHidden:!1})),E(x,i)}).filter(v=>!v.isHidden),m=[],y=[];r?.length?(f.forEach(v=>{v.isIndex&&!r.includes(v.name)&&!r.includes(v.id)&&v.isPinned!==!1&&m.push(v)}),r.forEach(v=>{const x=f.find(E=>E.name===v||E.id===v);x&&(x.isPinned?m.push(x):y.push(x))})):f.forEach(v=>{v.isPinned?m.push(v):y.push(v)});const w=[...m,...y];return w.length>0?w:[xi(dp())]},[t,l,g,h,n,e.editingMode,r,i]),allColumns:p,setColumnConfigMapping:s}}function Nk(e,t,n,r,o,i){const a=d.useMemo(()=>e.filter(u=>u.isPinned).reduce((u,c)=>u+(c.width??r*2),0)>n*.6,[e,n,r]),l=t||a?0:e.filter(u=>u.isPinned).length,s=d.useCallback(u=>{i(c=>Ci({columnId:u,columnConfigMapping:c,updatedProps:{pinned:!1}})),o(!0,!1)},[o,i]);return{pinColumn:d.useCallback(u=>{i(c=>Ci({columnId:u,columnConfigMapping:c,updatedProps:{pinned:!0}})),o(!0,!1)},[o,i]),unpinColumn:s,freezeColumns:l}}function Bk(e,t,n,r,o){return{onColumnMoved:d.useCallback((i,a)=>{const l=[...e],[s]=l.splice(i,1);l.splice(a,0,s),a<t&&!s.isPinned?n(s.id):a>=t&&s.isPinned&&r(s.id),o(l.map(u=>u.id))},[e,t,n,r,o])}}function jk(e){const[t,n]=d.useState(()=>new Map),r=d.useCallback((o,i,a,l)=>{o.id&&n(new Map(t).set(o.id,l))},[t]);return{columns:d.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 Wk(e){switch(e.kind){case G.Number:return e.data?.toString()??"";case G.Boolean:return e.data?.toString()??"";case G.Markdown:case G.RowID:case G.Text:case G.Uri:return e.data??"";case G.Bubble:case G.Image:return e.data.join("");case G.Drilldown:return e.data.map(t=>t.text).join("");case G.Protected:case G.Loading:return"";case G.Custom:return e.copyData}}function $d(e){if(typeof e=="number")return e;if(e.length>0){const t=Number(e);isNaN(t)||(e=t)}return e}function Uk(e,t){return e=$d(e),t=$d(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 Xk(e,t){return e>t?1:e===t?0:-1}function Yk(e){const{sort:t,rows:n,getCellContent:r}=e,o=d.useMemo(()=>t===void 0?[]:Array.isArray(t)?t:[t],[t]),i=d.useMemo(()=>o.map(u=>{const c=e.columns.findIndex(h=>u.column===h||h.id!==void 0&&u.column.id===h.id);return c===-1?void 0:c}),[o,e.columns]),a=d.useMemo(()=>{const u=o.map((h,g)=>({sort:h,col:i[g]})).filter(h=>h.col!==void 0);if(u.length===0)return;const c=u.map(()=>new Array(n));for(let h=0;h<u.length;h++){const{col:g}=u[h],p=[g,0];for(let f=0;f<n;f++)p[1]=f,c[h][f]=Wk(r(p))}return Ir(n).sort((h,g)=>{for(let p=0;p<u.length;p++){const{sort:f}=u[p],m=c[p][h],y=c[p][g];let w;if(f.mode==="raw"?w=Xk(m,y):f.mode==="smart"?w=Uk(m,y):w=m.localeCompare(y),w!==0)return(f.direction??"asc")==="desc"&&(w=-w),w}return 0})},[r,n,o,i]),l=d.useCallback(u=>a===void 0?u:a[u],[a]),s=d.useCallback(([u,c])=>a===void 0?r([u,c]):(c=a[c],r([u,c])),[r,a]);return a===void 0?{getCellContent:e.getCellContent,getOriginalIndex:l}:{getOriginalIndex:l,getCellContent:s}}function Zk(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 qk(e,t,n){const[r,o]=d.useState(),{getCellContent:i,getOriginalIndex:a}=Yk({columns:t.map(u=>bs(u)),getCellContent:n,rows:e,sort:r}),l=d.useMemo(()=>Zk(t,r),[t,r]),s=d.useCallback((u,c,h)=>{const g=l[u];let p;c==="auto"?(p="asc",r?.column.id===g.id&&(r.direction==="asc"?p="desc":p=void 0)):p=c,p===void 0||h&&p===r?.direction?o(void 0):o({column:bs(g),direction:p,mode:g.sortMode})},[r,l]);return{columns:l,sortColumn:s,getOriginalIndex:a,getCellContent:i}}function Kk(e,t){const n=d.useCallback(o=>{t(i=>Ci({columnId:o,columnConfigMapping:i,updatedProps:{hidden:!0}})),e(!0,!1)},[e,t]),r=d.useCallback(o=>{t(i=>Ci({columnId:o,columnConfigMapping:i,updatedProps:{hidden:!1}})),e(!0,!1)},[e,t]);return{hideColumn:n,showColumn:r}}function Qk(){return{provideEditor:d.useCallback(e=>{if(e.kind===G.Text&&e.readonly&&sy(e.data))return{editor:py}},[])}}const Gk={kind:G.Custom,isMatch:e=>e.data.kind==="sparkline-cell",needsHover:!0,needsHoverPosition:!0,draw:(e,t)=>{const{ctx:n,theme:r,rect:o,hoverAmount:i,hoverX:a}=e;let{values:l,yAxis:s,color:u,graphKind:c="area",displayValues:h,hideAxis:g}=t.data;const[p,f]=s;if(l.length===0)return!0;l=l.map(S=>Math.min(1,Math.max(0,(S-p)/(f-p))));const m=r.cellHorizontalPadding,y=m+o.x,w=o.y+3,v=o.height-6,x=o.width-m*2,E=f-p,R=f<=0?w:p>=0?w+v:w+v*(f/E);if(!g&&p<=0&&f>=0&&(n.beginPath(),n.moveTo(y,R),n.lineTo(y+x,R),n.globalAlpha=.4,n.lineWidth=1,n.strokeStyle=r.textLight,n.stroke(),n.globalAlpha=1),c==="bar"){n.beginPath();const S=2,P=(l.length-1)*S,T=(x-P)/l.length;let C=y;for(const A of l){const O=w+v-A*v;n.moveTo(C,R),n.lineTo(C+T,R),n.lineTo(C+T,O),n.lineTo(C,O),C+=T+S}n.fillStyle=t.data.color??r.accentColor,n.fill()}else{l.length===1&&(l=[l[0],l[0]],h&&(h=[h[0],h[0]])),n.beginPath();const S=(o.width-16)/(l.length-1),P=l.map((C,A)=>({x:y+S*A,y:w+v-C*v}));n.moveTo(P[0].x,P[0].y);let T=0;if(P.length>2)for(T=1;T<P.length-2;T++){const C=(P[T].x+P[T+1].x)/2,A=(P[T].y+P[T+1].y)/2;n.quadraticCurveTo(P[T].x,P[T].y,C,A)}if(n.quadraticCurveTo(P[T].x,P[T].y,P[T+1].x,P[T+1].y),n.strokeStyle=u??r.accentColor,n.lineWidth=1+i*.5,n.stroke(),n.lineTo(o.x+o.width-m,R),n.lineTo(o.x+m,R),n.closePath(),c==="area"){n.globalAlpha=.2+.2*i;const C=n.createLinearGradient(0,w,0,w+v*1.4);C.addColorStop(0,u??r.accentColor);const[A,O,I]=mi(u??r.accentColor);C.addColorStop(1,`rgba(${A}, ${O}, ${I}, 0)`),n.fillStyle=C,n.fill(),n.globalAlpha=1}if(a!==void 0&&(c==="line"||c==="area")&&h!==void 0){n.beginPath();const C=Math.min(l.length-1,Math.max(0,Math.round((a-m)/S)));n.moveTo(y+C*S,o.y+1),n.lineTo(y+C*S,o.y+o.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(h[C],y,o.y+r.cellVerticalPadding),n.restore()}}return!0},provideEditor:()=>{},onPaste:(e,t)=>t};function _d(e,t,n,r,o,i){if(!(r<=0||o<=0)){if(typeof i=="number"&&i<=0){e.rect(t,n,r,o);return}typeof i=="number"&&(i={tl:i,tr:i,br:i,bl:i}),i={tl:Math.min(i.tl,o/2,r/2),tr:Math.min(i.tr,o/2,r/2),bl:Math.min(i.bl,o/2,r/2),br:Math.min(i.br,o/2,r/2)},i.tl=Math.max(0,i.tl),i.tr=Math.max(0,i.tr),i.br=Math.max(0,i.br),i.bl=Math.max(0,i.bl),e.moveTo(t+i.tl,n),e.arcTo(t+r,n,t+r,n+i.tr,i.tr),e.arcTo(t+r,n+o,t+r-i.br,n+o,i.br),e.arcTo(t,n+o,t,n+o-i.bl,i.bl),e.arcTo(t,n,t+i.tl,n,i.tl)}}const Jk=e=>{const{Menu:t}=za,{children:n,...r}=e;return d.createElement(t,{...r},n)},eS=hn("div")({name:"Wrap",class:"gdg-wghi2zc",propsAsIs:!1}),tS=hn("div")({name:"PortalWrap",class:"gdg-p13nj8j0",propsAsIs:!1}),nS=hn("div")({name:"ReadOnlyWrap",class:"gdg-r6sia3g",propsAsIs:!1}),rS=e=>{const{value:t,onFinishedEditing:n,initialValue:r,portalElementRef:o}=e,{allowedValues:i,value:a}=t.data,[l,s]=d.useState(a),[u,c]=d.useState(r??""),h=qh(),g=d.useMemo(()=>i.map(p=>typeof p=="string"||p===null||p===void 0?{value:p,label:p?.toString()??""}:p),[i]);return t.readonly?d.createElement(nS,null,d.createElement(qr,{highlight:!0,autoFocus:!1,disabled:!0,value:l??"",onChange:()=>{}})):d.createElement(eS,null,d.createElement(Gf,{className:"glide-select",inputValue:u,onInputChange:c,menuPlacement:"auto",value:g.find(p=>p.value===l),styles:{control:p=>({...p,border:0,boxShadow:"none"}),option:(p,{isFocused:f})=>({...p,fontSize:h.editorFontSize,fontFamily:h.fontFamily,cursor:f?"pointer":void 0,paddingLeft:h.cellHorizontalPadding,paddingRight:h.cellHorizontalPadding,":active":{...p[":active"],color:h.accentFg},":empty::after":{content:'" "',visibility:"hidden"}})},theme:p=>({...p,colors:{...p.colors,neutral0:h.bgCell,neutral5:h.bgCell,neutral10:h.bgCell,neutral20:h.bgCellMedium,neutral30:h.bgCellMedium,neutral40:h.bgCellMedium,neutral50:h.textLight,neutral60:h.textMedium,neutral70:h.textMedium,neutral80:h.textDark,neutral90:h.textDark,neutral100:h.textDark,primary:h.accentColor,primary75:h.accentColor,primary50:h.accentColor,primary25:h.accentLight}}),menuPortalTarget:o?.current??document.getElementById("portal"),autoFocus:!0,openMenuOnFocus:!0,components:{DropdownIndicator:()=>null,IndicatorSeparator:()=>null,Menu:p=>d.createElement(tS,null,d.createElement(Jk,{className:"click-outside-ignore",...p}))},options:g,onChange:async p=>{p!==null&&(s(p.value),await new Promise(f=>window.requestAnimationFrame(f)),n({...t,data:{...t.data,value:p.value}}))}}))},oS={kind:G.Custom,isMatch:e=>e.data.kind==="dropdown-cell",draw:(e,t)=>{const{ctx:n,theme:r,rect:o}=e,{value:i}=t.data,a=t.data.allowedValues.find(s=>typeof s=="string"||s===null||s===void 0?s===i:s.value===i),l=typeof a=="string"?a:a?.label??"";return l&&(n.fillStyle=r.textDark,n.fillText(l,o.x+r.cellHorizontalPadding,o.y+o.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:rS,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 iS(e,t){const n=/(\d+\.?\d*)\s*(px|rem|em|%|pt)/,r=e.match(n);if(r){const o=parseFloat(r[1]),i=r[2],a=o*t;return e.replace(n,`${Number(a.toPrecision(3))}${i}`)}return e}const aS={marginRight:8},lS={display:"flex",alignItems:"center",flexGrow:1},sS={kind:G.Custom,isMatch:e=>e.data.kind==="range-cell",draw:(e,t)=>{const{ctx:n,theme:r,rect:o}=e,{min:i,max:a,value:l,label:s,measureLabel:u,color:c}=t.data,h=o.x+r.cellHorizontalPadding,g=o.y+o.height/2,p=a-i,f=(l-i)/p,m=`${iS(r.baseFontStyle,.9)} ${r.fontFamily}`,y=Ns(n,m)/2;n.save();let w=0;s!==void 0&&(n.font=m,w=Tr(u??s,n,m).width+r.cellHorizontalPadding);const v=o.width-r.cellHorizontalPadding*2-w;if(v>=y){const x=n.createLinearGradient(h,g,h+v,g),E=c??r.accentColor;x.addColorStop(0,E),x.addColorStop(f,E),x.addColorStop(f,r.bgBubble),x.addColorStop(1,r.bgBubble),n.beginPath(),n.fillStyle=x,_d(n,h,g-y/2,v,y,y/2),n.fill(),n.beginPath(),_d(n,h+.5,g-y/2+.5,v-1,y-1,(y-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,o.x+o.width-r.cellHorizontalPadding,g+qn(n,m))),n.restore(),!0},provideEditor:()=>e=>{const{data:t,readonly:n}=e.value,r=t.value.toString(),o=t.min.toString(),i=t.max.toString(),a=t.step.toString(),l=s=>{e.onChange({...e.value,data:{...t,value:Number(s.target.value)}})};return d.createElement("label",{style:lS},d.createElement("input",{style:aS,type:"range",value:r,min:o,max:i,step:a,onChange:l,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}}},uS=hn("input")({name:"StyledInputBox",class:"gdg-s1wtovjx",propsAsIs:!1}),rs=(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}`)}},cS=e=>{const t=e.value.data,{format:n,displayDate:r}=t,o=t.step!==void 0&&!Number.isNaN(Number(t.step))?Number(t.step):void 0,i=t.timezoneOffset?t.timezoneOffset*60*1e3:0,a=t.min instanceof Date?rs(n,t.min,i):t.min,l=t.max instanceof Date?rs(n,t.max,i):t.max,s=rs(n,t.date,i);return e.value.readonly?Ct.createElement(qr,{highlight:!0,autoFocus:!1,disabled:!0,value:r??"",onChange:()=>{}}):Ct.createElement(uS,{"data-testid":"date-picker-cell",required:!0,type:n,defaultValue:s,min:a,max:l,step:o,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-i)}})}})},dS={kind:G.Custom,isMatch:e=>e.data.kind==="date-picker-cell",draw:(e,t)=>{const{displayDate:n}=t.data;return _s(e,n,t.contentAlign),!0},measure:(e,t,n)=>{const{displayDate:r}=t.data;return e.measureText(r).width+n.cellHorizontalPadding*2},provideEditor:()=>({editor:cS}),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)}}},hS="None";function Nd(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 fS=(e,t)=>{const{cell:n,theme:r,ctx:o}=e;_s({...e,theme:{...r,textDark:r.textLight,headerFontFull:`${r.headerFontStyle} ${r.fontFamily}`,baseFontFull:`${r.baseFontStyle} ${r.fontFamily}`,markerFontFull:`${r.markerFontStyle} ${r.fontFamily}`}},t,n.contentAlign),o.fillStyle=r.textDark};function pS(e,t){const n=d.useCallback((o,i)=>{const{cell:a,theme:l,ctx:s,rect:u}=o,c=o.col;if(Do(a))Nd(s,u,l);else if(Zs(a)&&c<e.length){const h=e[c],g=t??hS;["checkbox","line_chart","bar_chart","progress"].includes(h.kind)?i():fS(o,g),h.isRequired&&h.isEditable&&Nd(s,u,l);return}i()},[e,t]),r=d.useMemo(()=>[Gk,oS,sS,dS,...Rk],[]);return{drawCell:n,customRenderers:r}}function gS(){const e=Yr();return d.useMemo(()=>{const t={editable:n=>`<svg xmlns="http://www.w3.org/2000/svg" height="40" viewBox="0 96 960 960" width="40" fill="${n.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:ko(e.colors.primary,.9),borderColor:e.colors.dataframeBorderColor,horizontalBorderColor:e.colors.dataframeBorderColor,fontFamily:e.genericFonts.bodyFont,bgSearchResult:ko(e.colors.primary,.9),resizeIndicatorColor:e.colors.primary,bgIconHeader:e.colors.fadedText60,fgIconHeader:e.colors.white,bgHeader:e.colors.dataframeHeaderBackgroundColor,bgHeaderHasFocus:ko(e.colors.darkenedBgMix100,.9),bgHeaderHovered:ko(e.colors.darkenedBgMix100,.9),textHeader:e.colors.fadedText60,textHeaderSelected:e.colors.white,textGroupHeader:e.colors.fadedText60,headerIconSize:Math.round(en("1.125rem")),headerFontStyle:`${e.fontWeights.normal} ${en(e.fontSizes.sm)}px`,baseFontStyle:`${e.fontWeights.normal} ${en(e.fontSizes.sm)}px`,editorFontSize:e.fontSizes.sm,textDark:e.colors.bodyText,textMedium:ko(e.colors.bodyText,.2),textLight:e.colors.fadedText40,bgCell:e.colors.bgColor,bgCellMedium:e.colors.bgColor,cellHorizontalPadding:Math.round(en(e.spacing.sm)),cellVerticalPadding:Math.round(en("0.1875rem")),textBubble:e.colors.fadedText60,bgBubble:e.colors.secondaryBg,bgBubbleSelected:og(e.colors.secondaryBg,.1),bubbleHeight:Math.round(en("1.25rem")),bubblePadding:Math.round(en(e.spacing.sm)),bubbleMargin:Math.round(en(e.spacing.twoXS)),linkColor:e.colors.link,drilldownBorder:e.colors.darkenedBgMix25,checkboxMaxSize:Math.round(en(e.sizes.checkbox))},tableBorderRadius:e.radii.default,tableBorderWidth:parseInt(e.sizes.borderWidth),defaultTableHeight:Math.round(en("25rem")),minColumnWidth:Math.round(en("3.125rem")),maxColumnWidth:Math.round(en("62.5rem")),maxColumnAutoWidth:Math.round(en("31.25rem")),defaultRowHeight:Math.round(en("2.1875rem")),defaultHeaderHeight:Math.round(en("2.1875rem")),bgRowHovered:rg(e.colors.bgColor,e.colors.secondaryBg,.3),headerIcons:t}},[e])}const mS=Ms.getLogger("useDataEditor");function vS({columns:e,allColumns:t,canAddRows:n,canDeleteRows:r,editingState:o,getCellContent:i,getOriginalIndex:a,refreshCells:l,updateNumRows:s,syncEditState:u,clearSelection:c}){const h=d.useCallback(([w,v],x)=>{const E=e[w];if(!E.isEditable)return;const R=E.indexNumber,S=o.current.getOriginalRowIndex(a(v)),P=i([w,v]),T=E.getCellValue(P),C=E.getCellValue(x);if(!Do(P)&&C===T)return;const A=E.getCell(C,!0);Do(A)?mS.warn(`Not applying the cell edit since it causes this error:
|
|
196
|
-
${A.data}`):(o.current.setCell(R,S,{...A,lastUpdated:performance.now()}),u())},[e,o,a,i,u]),g=d.useCallback(()=>{if(!n)return;const w=new Map;t.forEach(v=>{w.set(v.indexNumber,v.getCell(v.defaultValue))}),o.current.addRow(w),s()},[t,o,n,s]),p=d.useCallback(()=>{n&&(g(),u())},[g,u,n]),f=d.useCallback(w=>{if(w.rows.length>0){if(!r)return!0;const v=w.rows.toArray().map(x=>o.current.getOriginalRowIndex(a(x)));return o.current.deleteRows(v),s(),c(),u(),!1}if(w.current?.range){const v=[],x=w.current.range;for(let E=x.y;E<x.y+x.height;E++)for(let R=x.x;R<x.x+x.width;R++){const S=e[R];S.isEditable&&!S.isRequired&&(v.push({cell:[R,E]}),h([R,E],S.getCell(null)))}return v.length>0&&(u(),l(v)),!1}return!0},[e,o,r,l,a,u,h,c,s]),m=d.useCallback((w,v)=>{const[x,E]=w,R=[];for(let S=0;S<v.length;S++){const P=v[S];if(S+E>=o.current.getNumRows()){if(!n)break;g()}for(let T=0;T<P.length;T++){const C=P[T],A=S+E,O=T+x;if(O>=e.length)break;const I=e[O];if(I.isEditable){const M=I.getCell(C,!0);if(lt(M)&&!Do(M)){const D=I.indexNumber,k=o.current.getOriginalRowIndex(a(A)),Y=I.getCellValue(i([O,A]));I.getCellValue(M)!==Y&&(o.current.setCell(D,k,{...M,lastUpdated:performance.now()}),R.push({cell:[O,A]}))}}}R.length>0&&(u(),l(R))}return!1},[e,o,n,a,i,g,u,l]),y=d.useCallback((w,v)=>{const x=w[0];if(x>=e.length)return!0;const E=e[x];if(E.validateInput){const R=E.validateInput(E.getCellValue(v));return R===!0||R===!1?R:E.getCell(R)}return!0},[e]);return{onCellEdited:h,onPaste:m,onRowAppended:p,onDelete:f,validateCell:y}}const gp=",",ui='"',bS='"',mp=`
|
|
197
|
-
`,wS="\uFEFF",yS=new RegExp(`[${[gp,ui,mp].join("")}]`),Bd=Ms.getLogger("useDataExporter");function jd(e){return e.map(t=>xS(t)).join(gp)+mp}function xS(e){if(Se(e))return"";const t=nt(e);return yS.test(t)?`${ui}${t.replace(new RegExp(ui,"g"),bS+ui)}${ui}`:t}async function Wd(e,t,n,r){const o=new TextEncoder;await e.write(o.encode(wS));const i=n.map(a=>a.name);await e.write(o.encode(jd(i)));for(let a=0;a<r;a++){const l=[];n.forEach((s,u,c)=>{l.push(s.getCellValue(t([u,a])))}),await e.write(o.encode(jd(l)))}await e.close()}function CS(e,t,n,r){return{exportToCsv:d.useCallback(async()=>{const o=`${new Date().toISOString().slice(0,16).replace(":","-")}_export.csv`;try{const i=await(await(await Ss(()=>import("./es6--XPcqeHG-CHWR2W_o.js"),__vite__mapDeps([23,1,2])).then(a=>a.a)).showSaveFilePicker({suggestedName:o,types:[{accept:{"text/csv":[".csv"]}}],excludeAcceptAllOption:!1})).createWritable();await Wd(i,e,t,n)}catch(i){if(i instanceof Error&&i.name==="AbortError")return;try{Bd.warn("Failed to export data as CSV with FileSystem API, trying fallback method",i);let a="";const l=new WritableStream({write:h=>{a+=new TextDecoder("utf-8").decode(h)},close:async()=>{}});await Wd(l.getWriter(),e,t,n);const s=new Blob([a],{type:"text/csv;charset=utf-8;"}),u=URL.createObjectURL(s),c=Bm({enforceDownloadInNewTab:r,url:u,filename:o});c.style.display="none",document.body.appendChild(c),c.click(),document.body.removeChild(c),URL.revokeObjectURL(u)}catch(a){Bd.error("Failed to export data as CSV",a)}}},[t,n,e,r])}}function kS(e,t,n,r){return{getCellContent:d.useCallback(([o,i])=>{if(o>t.length-1)return St("Column index out of bounds","This error should never happen. Please report this bug.");if(i>n-1)return St("Row index out of bounds","This error should never happen. Please report this bug.");try{const a=t[o],l=a.indexNumber,s=r.current.getOriginalRowIndex(i),u=r.current.isAddedRow(s);if(a.isEditable||u){const g=r.current.getCell(l,s);if(lt(g))return{...a.getCell(a.getCellValue(g),!1),lastUpdated:g.lastUpdated};if(u)return St("Error during cell creation",`This error should never happen. Please report this bug. No cell found for an added row: col=${l}; row=${s}`)}const c=e.getCell(s,l),h=pm(e,s,l);return Ak(a,c,h,e.styler?.cssStyles)}catch(a){return St("Error during cell creation",`This error should never happen. Please report this bug.
|
|
198
|
-
Error: ${a}`)}},[t,n,e,r])}}function SS(e){const[t,n]=d.useState(void 0),r=d.useCallback(o=>{if(o.kind!=="cell")n(void 0);else{const[,i]=o.location;n(i)}},[n]);return{getRowThemeOverride:d.useCallback(o=>{if(o===t)return{bgCell:e.bgRowHovered,bgCellMedium:e.bgRowHovered}},[e.bgRowHovered,t]),onItemHovered:r}}function MS(e,t,n,r,o){const[i,a]=d.useState({columns:Qe.empty(),rows:Qe.empty(),current:void 0}),l=!t&&!n&&(e.selectionMode.includes(Xt.SelectionMode.MULTI_ROW)||e.selectionMode.includes(Xt.SelectionMode.SINGLE_ROW)),s=l&&e.selectionMode.includes(Xt.SelectionMode.MULTI_ROW),u=!t&&!n&&(e.selectionMode.includes(Xt.SelectionMode.SINGLE_COLUMN)||e.selectionMode.includes(Xt.SelectionMode.MULTI_COLUMN)),c=u&&e.selectionMode.includes(Xt.SelectionMode.MULTI_COLUMN),h=!t&&!n&&(e.selectionMode.includes(Xt.SelectionMode.SINGLE_CELL)||e.selectionMode.includes(Xt.SelectionMode.MULTI_CELL)),g=h&&e.selectionMode.includes(Xt.SelectionMode.MULTI_CELL),p=i.rows.length>0,f=i.columns.length>0,m=i.current!==void 0,y=d.useCallback(v=>{const x=!rl(v.rows.toArray(),i.rows.toArray()),E=!rl(v.columns.toArray(),i.columns.toArray()),R=!rl(v.current,i.current),S=l&&x||u&&E||h&&R;let P=v;if(E&&P.columns.length>=0){let T=P.columns;r.forEach((C,A)=>{C.isIndex&&(T=T.remove(A))}),T.length<P.columns.length&&(P={...P,columns:T})}a(P),S&&o(P,h)},[i,l,u,h,o,r]),w=d.useCallback((v=!1,x=!1)=>{const E={columns:x?i.columns:Qe.empty(),rows:v?i.rows:Qe.empty(),current:void 0};a(E),(!v&&l||!x&&u||h)&&o(E,h)},[i,l,u,h,o]);return{gridSelection:i,isRowSelectionActivated:l,isMultiRowSelectionActivated:s,isColumnSelectionActivated:u,isMultiColumnSelectionActivated:c,isCellSelectionActivated:h,isMultiCellSelectionActivated:g,isRowSelected:p,isColumnSelected:f,isCellSelected:m,clearSelection:w,processSelectionChange:y}}function IS(e,t,n,r,o,i,a,l,s,u,c){const h=e.rowHeight??t.defaultRowHeight,g=r?2:1,p=e.editingMode===Xt.EditingMode.DYNAMIC||e.editingMode===Xt.EditingMode.ADD_ONLY?1:0,f=n+p,m=ns({numRows:f,rowHeight:h,theme:t,numHeaderRows:g}),y=zk(s),w=Hk(s,c),v=Fk(s),x=w?Math.max(1,Math.min(n,3)):1,E=ns({numRows:x,rowHeight:h,theme:t}),R=1e4;let S=Math.max(m,E),P=Math.min(S,t.defaultTableHeight);if(w&&u&&u>0)S=Math.max(u,S);else if(v){const $=Math.ceil(R/h),K=Math.min(f,$),ie=ns({numRows:K,rowHeight:h,theme:t,numHeaderRows:g})+1;P=Math.max(ie,E),S=Math.max(P,S)}else y&&(P=Math.max(y,E),S=Math.max(P,S));i&&(P=Math.min(P,i),S=Math.min(S,i),y||(P=S));const T=t.minColumnWidth+2*t.tableBorderWidth,C=Math.max(o,T);let A,O=C;const I=hp(l),M=fp(l),D=Lk(l);I?A=C:M?(A=Math.min(Math.max(M,T),C),O=Math.min(Math.max(M,O),C)):D&&(A=void 0);const[k,Y]=d.useState({width:A||"100%",height:w?"100%":P});return d.useLayoutEffect(()=>{I&&k.width==="100%"&&Y($=>({...$,width:C}))},[C]),d.useLayoutEffect(()=>{Y($=>({...$,width:A||"100%"}))},[A]),d.useLayoutEffect(()=>{Y($=>({...$,height:w?"100%":P}))},[P,n,u,w,c]),d.useLayoutEffect(()=>{if(a){const $=I||lt(M)&&M>0;Y({width:$?O:"100%",height:S})}else Y({width:A||"100%",height:P})},[a]),{minHeight:E,maxHeight:S,minWidth:T,maxWidth:O,rowHeight:h,resizableSize:k,setResizableSize:Y}}const RS=600,ES="⚠️ Please fill out this cell.";function TS(e,t,n=[]){const[r,o]=d.useState(),i=d.useRef(),{clear:a,restart:l}=ca(()=>{i.current&&(o(i.current),i.current=void 0)},RS,{autoStart:!1}),s=d.useCallback(c=>{if(a(),i.current=void 0,o(void 0),(c.kind==="header"||c.kind==="cell")&&c.location){const h=c.location[0],g=c.location[1];let p;if(h<0||h>=e.length||n.includes(g))return;const f=e[h];if(c.kind==="header"&<(f))p=f.help;else if(c.kind==="cell"){const m=t([h,g]);Do(m)?p=m.errorDetails:f.isRequired&&f.isEditable&&Zs(m)?p=ES:ay(m)&&(p=m.tooltip)}p&&(i.current={content:p,left:c.bounds.x+c.bounds.width/2,top:c.bounds.y},l())}},[a,e,t,n,l]),u=d.useCallback(()=>{a(),i.current=void 0,o(void 0)},[a,o]);return{tooltip:r,clearTooltip:u,onItemHovered:s}}function jr(e){return e.isIndex?ua:Se(e.name)?"":e.name}class ra{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,i,a)=>{const l={};o.forEach((s,u)=>{const c=n.get(u);c&&(l[jr(c)]=c.getCellValue(s))}),r.edited_rows[i]=l}),this.addedRows.forEach(o=>{const i={};let a=!1;o.forEach((l,s,u)=>{const c=n.get(s);if(c){const h=c.getCellValue(l);c.isRequired&&c.isEditable&&Zs(l)&&(a=!0),lt(h)&&(i[jr(c)]=h)}}),a||r.added_rows.push(i)}),r.deleted_rows=this.deletedRows,JSON.stringify(r,(o,i)=>i===void 0?null:i)}fromJson(t,n){this.editedCells=new Map,this.addedRows=[],this.deletedRows=[];const r=JSON.parse(t),o=new Map;n.forEach(a=>{o.set(a.indexNumber,a)});const i=new Map;n.forEach(a=>{i.set(jr(a),a)}),Object.keys(r.edited_rows).forEach(a=>{const l=Number(a),s=r.edited_rows[a];Object.keys(s).forEach(u=>{const c=s[u],h=i.get(u);if(h){const g=h.getCell(c);g&&(this.editedCells.has(l)||this.editedCells.set(l,new Map),this.editedCells.get(l)?.set(h.indexNumber,g))}})}),r.added_rows.forEach(a=>{const l=new Map;n.forEach(s=>{l.set(s.indexNumber,s.getCell(null))}),Object.keys(a).forEach(s=>{const u=a[s],c=i.get(s);if(c){const h=c.getCell(u);h&&l.set(c.indexNumber,h)}}),this.addedRows.push(l)}),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(!(Se(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 vp=150;function OS({element:e,widgetMgr:t,fragmentId:n,originalNumRows:r,originalColumns:o}){const{READ_ONLY:i}=Xt.EditingMode,a=d.useRef(new ra(r)),[l,s]=d.useState(a.current.getNumRows());ig(()=>{a.current=new ra(r),s(a.current.getNumRows())},[r]);const u=d.useCallback(()=>{a.current=new ra(r),s(a.current.getNumRows())},[r]),c=d.useCallback(()=>{s(y=>{const w=a.current.getNumRows();return y!==w?w:y})},[]);d.useEffect(()=>{if(e.editingMode===i||!t)return;const y=t.getStringValue({id:e.id,formId:e.formId});y&&(a.current.fromJson(y,o),s(a.current.getNumRows()))},[]);const h=d.useCallback(()=>{if(!t)return;const y=a.current.toJson(o);let w=t.getStringValue({id:e.id,formId:e.formId});w===void 0&&(w=new ra(0).toJson([])),y!==w&&t.setStringValue({id:e.id,formId:e.formId},y,{fromUi:!0},n)},[o,e.id,e.formId,t,n]),{debouncedCallback:g}=gf(h,vp),p=d.useCallback((y,w)=>(v,x)=>{if(!t)return;const E={selection:{rows:[],columns:[],cells:[]}};if(E.selection.rows=v.rows.toArray().map(P=>w(P)),E.selection.columns=v.columns.toArray().map(P=>jr(y[P])),x&&v.current){const{cell:P,range:T}=v.current;if(T)for(let C=T.y;C<T.y+T.height;C++)for(let A=T.x;A<T.x+T.width;A++)y[A].isIndex||E.selection.cells.push([w(C),jr(y[A])]);else if(P){const[C,A]=P;y[C].isIndex||E.selection.cells.push([w(A),jr(y[C])])}}const R=JSON.stringify(E),S=t.getStringValue({id:e.id,formId:e.formId});(S===void 0||S!==R)&&t.setStringValue({id:e.id,formId:e.formId},R,{fromUi:!0},n)},[e.id,e.formId,t,n]),f=d.useCallback(({columns:y,isRowSelectionActivated:w,isColumnSelectionActivated:v,isCellSelectionActivated:x,isMultiCellSelectionActivated:E})=>{if(!w&&!v&&!x||!t)return;const R=t.getStringValue({id:e.id,formId:e.formId});if(!R)return;const S=y.map(O=>jr(O)),P=JSON.parse(R);let T=Qe.empty(),C=Qe.empty(),A;if(P.selection?.rows?.forEach(O=>{T=T.add(O)}),P.selection?.columns?.forEach(O=>{C=C.add(S.indexOf(O))}),x&&!E){const[O,I]=P.selection?.cells?.[0]??[];O!==void 0&&I!==void 0&&(A=[S.indexOf(I),O])}if(T.length>0||C.length>0||A!==void 0)return{rows:T,columns:C,current:A?{cell:A,range:{x:A[0],y:A[1],width:1,height:1},rangeStack:[]}:void 0}},[t,e.id,e.formId]),m=d.useCallback(()=>{u()},[u]);return{editingState:a,numRows:l,resetEditingState:u,updateNumRows:c,syncEditState:g,createSyncSelectionState:p,onFormCleared:m,loadInitialSelectionState:f}}const bp=An("div",{target:"e1hnsd047"})(({theme:e})=>({paddingTop:e.spacing.threeXS,paddingBottom:e.spacing.threeXS,paddingLeft:e.spacing.xs,paddingRight:e.spacing.xs}),""),Mr=An("div",{target:"e1hnsd046"})(({theme:e,isActive:t,hasSubmenu:n})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing.sm,marginTop:e.spacing.twoXS,marginBottom:e.spacing.twoXS,paddingLeft:e.spacing.sm,paddingRight:e.spacing.sm,paddingTop:e.spacing.threeXS,paddingBottom:e.spacing.threeXS,cursor:"pointer",borderRadius:e.radii.md2,backgroundColor:t?e.colors.darkenedBgMix15:"transparent","&:hover":{backgroundColor:e.colors.darkenedBgMix15},minWidth:e.sizes.minMenuWidth,...n&&{justifyContent:"space-between","& > :first-of-type":{display:"flex",alignItems:"center",gap:e.spacing.sm}}}),""),wp=An("div",{target:"e1hnsd045"})(({theme:e})=>({height:e.sizes.borderWidth,backgroundColor:e.colors.borderColor,marginTop:e.spacing.xs,marginBottom:e.spacing.xs,marginLeft:e.spacing.xs,marginRight:`max(0px, calc(${e.spacing.xs} - var(--scrollbar-gutter-size, 0px)))`}),""),DS=An("div",{target:"e1hnsd044"})(({theme:e})=>({display:"flex",alignItems:"center",padding:`${e.spacing.twoXS} ${e.spacing.none}`,cursor:"default",gap:e.spacing.twoXS}),""),PS=An("div",{target:"e1hnsd043"})(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",padding:e.spacing.twoXS,border:`${e.sizes.borderWidth} solid ${e.colors.borderColor}`,borderRadius:e.radii.md2,backgroundColor:"transparent",color:e.colors.bodyText,height:"fit-content"}),""),AS=An("div",{target:"e1hnsd042"})(({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.md2,backgroundColor:e.colors.secondaryBg,minWidth:0,overflow:"hidden"}),""),LS=An("span",{target:"e1hnsd041"})(({theme:e})=>({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flexGrow:1,margin:`0 ${e.spacing.xs}`,fontSize:e.fontSizes.twoSm,maxWidth:"4rem"}),""),HS=An("button",{target:"e1hnsd040"})(({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.sm,transition:"background-color 0.2s ease","&:hover":{backgroundColor:e.colors.fadedText05},"&:active":{backgroundColor:e.colors.fadedText10}}),""),Ud=[{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:"}],FS={number:Ud,progress:Ud,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 zS({columnKind:e,isOpen:t,onMouseEnter:n,onMouseLeave:r,onChangeFormat:o,onCloseMenu:i,children:a}){const l=Yr(),{colors:s,fontSizes:u,fontWeights:c}=l,h=FS[e]||[];return h.length===0?fe.jsx(fe.Fragment,{}):fe.jsx(Oa,{triggerType:Gd.hover,returnFocus:!0,autoFocus:!0,focusLock:!0,isOpen:t,onMouseEnter:n,onMouseLeave:r,ignoreBoundary:!0,content:fe.jsx(bp,{role:"menu",children:h.map(g=>fe.jsxs(Mr,{onClick:()=>{o(g.format),i()},role:"menuitem",children:[fe.jsx(Un,{size:"base",iconValue:g.icon}),g.label]},g.format))}),placement:Da.right,showArrow:!1,popoverMargin:2,overrides:{Body:{props:{"data-testid":"stDataFrameColumnFormattingMenu"},style:()=>({...Ta(l),paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important",backgroundColor:"transparent"})},Inner:{style:()=>({backgroundColor:s.bgColor,color:s.bodyText,fontSize:u.sm,fontWeight:c.normal,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"})}},children:a})}const VS=d.memo(zS);function $S({top:e,left:t,isColumnPinned:n,onPinColumn:r,onUnpinColumn:o,onCloseMenu:i,onSortColumn:a,onHideColumn:l,column:s,onChangeFormat:u,onAutosize:c}){const h=Yr(),[g,p]=d.useState(!1),{colors:f,fontSizes:m,fontWeights:y}=h,{isCopied:w,copyToClipboard:v}=fg();d.useEffect(()=>{function R(S){S.preventDefault()}return document.addEventListener("wheel",R,{passive:!1}),document.addEventListener("touchmove",R,{passive:!1}),()=>{document.removeEventListener("wheel",R),document.removeEventListener("touchmove",R)}},[]);const x=d.useCallback(()=>{i()},[i]),E=d.useCallback(()=>{v(s.title)},[s.title,v]);return fe.jsx(Oa,{autoFocus:!0,"aria-label":"Dataframe column menu",content:fe.jsxs(bp,{children:[fe.jsxs(DS,{children:[fe.jsx(PS,{title:s.kind,children:fe.jsx(Un,{size:"base",iconValue:s.typeIcon||":material/notes:"})}),fe.jsxs(AS,{title:s.title,children:[fe.jsx(LS,{children:s.title}),fe.jsx(HS,{onClick:E,title:"Copy column name","aria-label":"Copy column name",children:fe.jsx(Un,{size:"sm",iconValue:w?":material/check:":":material/content_copy:"})})]})]}),a&&fe.jsxs(fe.Fragment,{children:[fe.jsxs(Mr,{onClick:()=>{a("asc"),x()},role:"menuitem",children:[fe.jsx(Un,{size:"base",iconValue:":material/arrow_upward:"}),"Sort ascending"]}),fe.jsxs(Mr,{onClick:()=>{a("desc"),x()},role:"menuitem",children:[fe.jsx(Un,{size:"base",iconValue:":material/arrow_downward:"}),"Sort descending"]}),fe.jsx(wp,{})]}),u&&fe.jsx(VS,{columnKind:s.kind,isOpen:g,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),onChangeFormat:u,onCloseMenu:x,children:fe.jsxs(Mr,{onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),isActive:g,hasSubmenu:!0,children:[fe.jsxs("div",{children:[fe.jsx(Un,{size:"base",iconValue:":material/format_list_numbered:"}),"Format"]}),fe.jsx(Un,{size:"base",iconValue:":material/chevron_right:"})]})}),c&&fe.jsxs(Mr,{onClick:()=>{c(),x()},children:[fe.jsx(Un,{size:"base",iconValue:":material/arrows_outward:"}),"Autosize"]}),n&&fe.jsxs(Mr,{onClick:()=>{o(),x()},children:[fe.jsx(Un,{size:"base",iconValue:":material/keep_off:"}),"Unpin column"]}),!n&&fe.jsxs(Mr,{onClick:()=>{r(),x()},children:[fe.jsx(Un,{size:"base",iconValue:":material/keep:"}),"Pin column"]}),l&&fe.jsxs(Mr,{onClick:()=>{l(),x()},children:[fe.jsx(Un,{size:"base",iconValue:":material/visibility_off:"}),"Hide column"]})]}),placement:Da.bottomRight,accessibilityType:Jd.menu,showArrow:!1,popoverMargin:en("0.375rem"),onClickOutside:g?void 0:x,onEsc:x,overrides:{Body:{props:{"data-testid":"stDataFrameColumnMenu"},style:{paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important",backgroundColor:"transparent",boxShadow:"none"}},Inner:{style:()=>({...Ta(h),backgroundColor:f.bgColor,color:f.bodyText,fontSize:m.sm,fontWeight:y.normal,overflow:"auto",paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"})}},isOpen:!0,children:fe.jsx("div",{"data-testid":"stDataFrameColumnMenuTarget",style:{position:"fixed",top:e,left:t,visibility:"hidden",transform:"unset"}})})}const _S=d.memo($S),NS="(index)";function os(e,t){return!t.length||e.isIndex?!1:!t.includes(e.id)&&!t.includes(e.name)}const Xd=({label:e,initialValue:t,isIndeterminate:n,onChange:r})=>{const o=Yr();return fe.jsx($m,{isIndeterminate:n,checked:t,onChange:i=>{r(i.target.checked)},"aria-label":e,checkmarkType:Nm.default,labelPlacement:_m.right,overrides:{Root:{style:({$isFocusVisible:i})=>({marginBottom:o.spacing.none,marginTop:o.spacing.none,paddingLeft:o.spacing.md,paddingRight:o.spacing.md,paddingTop:o.spacing.twoXS,paddingBottom:o.spacing.twoXS,backgroundColor:i?o.colors.darkenedBgMix25:"",display:"flex",alignItems:"start"})},Checkmark:{style:({$isFocusVisible:i,$checked:a,$isIndeterminate:l})=>{const s=a||l?o.colors.primary:o.colors.borderColor;return{outline:0,width:o.sizes.checkbox,height:o.sizes.checkbox,marginTop:o.spacing.twoXS,marginLeft:0,marginBottom:0,boxShadow:i&&(a||l)?o.shadows.focusRing:"",borderLeftWidth:o.sizes.borderWidth,borderRightWidth:o.sizes.borderWidth,borderTopWidth:o.sizes.borderWidth,borderBottomWidth:o.sizes.borderWidth,borderLeftColor:s,borderRightColor:s,borderTopColor:s,borderBottomColor:s}}},Label:{style:{lineHeight:o.lineHeights.small,paddingLeft:o.spacing.sm,position:"relative",color:o.colors.bodyText,fontSize:o.fontSizes.sm,fontWeight:o.fontWeights.normal}}},children:e})},BS=({columns:e,columnOrder:t,setColumnOrder:n,hideColumn:r,showColumn:o,children:i,isOpen:a,onClose:l})=>{const s=Yr(),u=Zd(),c=f=>!(f.isHidden===!0||os(f,t)),h=e.every(c),g=e.some(c)&&!h,p=f=>{e.forEach(m=>{const y=os(m,t);f?(o(m.id),y&&n(w=>[...w,m.id])):r(m.id)})};return fe.jsx(Oa,{triggerType:Gd.click,placement:Da.bottomRight,autoFocus:!0,focusLock:!0,content:()=>fe.jsxs("div",{style:{paddingTop:s.spacing.sm,paddingBottom:s.spacing.sm,maxHeight:`min(${s.sizes.maxDropdownHeight}, 70vh)`,overflow:"auto","--scrollbar-gutter-size":`${u}px`},children:[fe.jsx(Xd,{label:"Select all",isIndeterminate:g,initialValue:h,onChange:f=>{p(f)}}),fe.jsx(wp,{}),fe.jsx("div",{children:e.map(f=>{const m=os(f,t);return fe.jsx(Xd,{label:!f.title&&f.isIndex?NS:f.title,initialValue:!(f.isHidden===!0||m),onChange:y=>{y?(o(f.id),m&&n(w=>[...w,f.id])):r(f.id)}},f.id)})})]}),isOpen:a,onClickOutside:l,onClick:()=>a?l():void 0,onEsc:l,ignoreBoundary:!1,overrides:{Body:{props:{"data-testid":"stDataFrameColumnVisibilityMenu"},style:()=>({...Ta(s),paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important",backgroundColor:"transparent",overflow:"hidden"})},Inner:{style:()=>({backgroundColor:s.colors.bgColor,color:s.colors.bodyText,fontSize:s.fontSizes.sm,fontWeight:s.fontWeights.normal,minWidth:s.sizes.minMenuWidth,maxWidth:`calc(${s.sizes.minMenuWidth} * 2)`,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"})}},children:fe.jsx("div",{children:i})})},jS=d.memo(BS),Yd=An("div",{target:"e1w7nams0"})(({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":{...Ta(e),maxWidth:"19rem",width:"80%",minWidth:"6rem",top:e.spacing.sm,right:e.spacing.sm,padding:e.spacing.sm,"& .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 WS({top:e,left:t,content:n,clearTooltip:r}){const[o,i]=d.useState(!0),a=Yr(),{colors:l,fontSizes:s,radii:u,fontWeights:c}=a,h=d.useCallback(()=>{i(!1),r()},[r,i]);return fe.jsx(Oa,{content:fe.jsx(dg,{"data-testid":"stDataFrameTooltipContent",children:fe.jsx(hg,{style:{fontSize:s.sm},source:n,allowHTML:!1})}),placement:Da.top,accessibilityType:Jd.tooltip,showArrow:!1,popoverMargin:5,onClickOutside:h,onEsc:h,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:eh(a)?l.bgColor:l.secondaryBg,color:l.bodyText,fontSize:s.sm,fontWeight:c.normal,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"}}},isOpen:o,children:fe.jsx("div",{"data-testid":"stDataFrameTooltipTarget",style:{position:"fixed",top:e,left:t}})})}const US=d.memo(WS),XS=15e4,YS="0.5rem";function ZS({element:e,data:t,disabled:n,widgetMgr:r,disableFullscreenMode:o,fragmentId:i,customToolbarActions:a,widthConfig:l,heightConfig:s}){const{expanded:u,expand:c,collapse:h,width:g,height:p}=Pu(hm),{isInHorizontalLayout:f,isInRoot:m}=Pu(Gp),y=d.useRef(null),w=d.useRef(null),v=Zd(),{height:x,elementRef:E}=Jp(),R=gS(),{getRowThemeOverride:S,onItemHovered:P}=SS(R),{enforceDownloadInNewTab:T=!1}=d.useContext(eg),[C,A]=d.useState(!0),[O,I]=d.useState(!1),[M,D]=d.useState(!1),[k,Y]=d.useState(!1),[$,K]=d.useState(),[ie,ee]=d.useState(!1),Q=d.useCallback(()=>ee(Ie=>!Ie),[]),ge=d.useCallback(()=>ee(!1),[]),oe=d.useMemo(()=>window.matchMedia&&window.matchMedia("(pointer: coarse)").matches,[]);Se(e.editingMode)&&(e.editingMode=Xt.EditingMode.READ_ONLY);const{READ_ONLY:de,DYNAMIC:pe,ADD_ONLY:le,DELETE_ONLY:V}=Xt.EditingMode,L=t.dimensions,U=Math.max(0,L.numDataRows),re=U===0&&!((e.editingMode===pe||e.editingMode===le)&&L.numDataColumns>0),se=U>XS,De=!se&&!re&&e.editingMode!==pe&&e.editingMode!==le,be=!re&&(e.editingMode===pe||e.editingMode===le)&&!n,Ge=!re&&(e.editingMode===pe||e.editingMode===V)&&!n,[Me,Et]=d.useState(e.columnOrder);d.useEffect(()=>{Et(e.columnOrder)},[e.columnOrder.join(",")]);const{columns:st,allColumns:$e,setColumnConfigMapping:ne}=_k(e,t,n,Me,l),{editingState:me,numRows:ve,updateNumRows:ce,syncEditState:we,createSyncSelectionState:Le,onFormCleared:He,loadInitialSelectionState:rt}=OS({element:e,widgetMgr:r,fragmentId:i,originalNumRows:U,originalColumns:st}),{getCellContent:Pe}=kS(t,st,ve,me),{columns:ye,sortColumn:Fe,getOriginalIndex:ke,getCellContent:_e}=qk(U,st,Pe),ut=d.useMemo(()=>Le(ye,ke),[Le,ye,ke]),{debouncedCallback:dt}=gf(ut,vp),{gridSelection:je,isRowSelectionActivated:ft,isMultiRowSelectionActivated:$t,isColumnSelectionActivated:bt,isMultiColumnSelectionActivated:Mt,isCellSelectionActivated:_t,isMultiCellSelectionActivated:Zt,isRowSelected:ln,isColumnSelected:kt,isCellSelected:ht,clearSelection:Bt,processSelectionChange:mt}=MS(e,re,n,ye,dt);d.useEffect(()=>{_t||Bt(!0,!0)},[u]);const sn=d.useCallback(Ie=>{w.current?.updateCells(Ie)},[]);d.useEffect(()=>{const Ie=rt({columns:ye,isRowSelectionActivated:ft,isColumnSelectionActivated:bt,isCellSelectionActivated:_t,isMultiCellSelectionActivated:Zt});Ie&&mt(Ie)},[]);const{exportToCsv:Mn}=CS(_e,ye,ve,T),{onCellEdited:Ee,onPaste:ct,onRowAppended:Tt,onDelete:vn,validateCell:tn}=vS({columns:ye,allColumns:$e,canAddRows:be,canDeleteRows:Ge,editingState:me,getCellContent:_e,getOriginalIndex:ke,refreshCells:sn,updateNumRows:ce,syncEditState:we,clearSelection:Bt}),nn=d.useMemo(()=>re?[0]:be?[ve]:[],[re,be,ve]),{tooltip:cn,clearTooltip:zt,onItemHovered:Kt}=TS(ye,_e,nn),{drawCell:Be,customRenderers:wt}=pS(ye,e.placeholder??void 0),{provideEditor:In}=Qk(),Ot=d.useCallback(Ie=>({...Ie,hasMenu:!re}),[re]),pt=d.useMemo(()=>ye.map(Ie=>Ot(bs(Ie))),[ye,Ot]),{columns:bn,onColumnResize:lr}=jk(pt),Kn=t.dimensions.numHeaderRows>1,{minHeight:B,maxHeight:Ne,minWidth:We,maxWidth:Dt,rowHeight:qt,resizableSize:rn,setResizableSize:Rn}=IS(e,R,ve,Kn,g||0,p,u,l,s,x,m),wn=d.useCallback(([Ie,dn])=>({...ly(!0,!1),displayData:"empty",contentAlign:"center",allowOverlay:!1,themeOverride:{textDark:R.glideTheme.textLight},span:[0,Math.max(ye.length-1,0)]}),[ye,R.glideTheme.textLight]),jt=d.useCallback(()=>{He(),Bt()},[He,Bt]);fm({element:e,widgetMgr:r,onFormCleared:jt});const{pinColumn:yn,unpinColumn:xn,freezeColumns:Qr}=Nk(ye,re,g||0,R.minColumnWidth,Bt,ne),{changeColumnFormat:Gr}=Ek(ne),{hideColumn:Jr,showColumn:Ho}=Kk(Bt,ne),{onColumnMoved:Ln}=Bk(ye,Qr,yn,xn,Et),Qn=d.useCallback(()=>{if(E.current&&w.current){const Ie=E.current?.querySelector(".dvn-stack")?.getBoundingClientRect();Ie&&(D(Ie.height>E.current.clientHeight),Y(Ie.width>E.current.clientWidth))}},[w,E]),{clear:eo,restart:to}=ca(Qn,0,{autoStart:!1}),_n=d.useRef(null),{restart:no}=ca(()=>{Se(_n.current)||(w.current?.remeasureColumns(Qe.fromSingleSelection(_n.current)),_n.current=null)},100,{autoStart:!1});d.useEffect(()=>{const Ie=requestAnimationFrame(()=>{to()});return()=>{cancelAnimationFrame(Ie),eo()}},[eo,bn,ve,E,rn,to]),d.useEffect(()=>{$e.length==ye.length&&ee(!1)},[$e.length,ye.length]);const Nn=!!(f||l?.useContent&&!m);return fe.jsxs(Yd,{className:"stDataFrame","data-testid":"stDataFrame",ref:E,isInHorizontalLayout:f,minHeight:B,disableResize:Nn,onPointerDown:Ie=>{if(E.current){const dn=E.current.getBoundingClientRect(),sr=(v||Math.round(en(YS)))+1;k&&dn.height-sr<Ie.clientY-dn.top&&Ie.stopPropagation(),M&&dn.width-sr<Ie.clientX-dn.left&&Ie.stopPropagation()}},onBlur:Ie=>{!C&&!oe&&!Ie.currentTarget.contains(Ie.relatedTarget)&&!_t&&Bt(!0,!0)},children:[fe.jsxs(tg,{isFullScreen:u,disableFullscreenMode:o,locked:ln&&!ft||ht||oe&&C||ie,onExpand:c,onCollapse:h,target:Yd,children:[a?.map(Ie=>Ie),(ft&&ln||bt&&kt||_t&&ht)&&fe.jsx(xo,{label:"Clear selection",icon:Lm,onClick:()=>{Bt(),zt()}}),Ge&&ln&&fe.jsx(xo,{label:"Delete row(s)",icon:jm,onClick:()=>{vn&&(vn(je),zt())}}),be&&!ln&&fe.jsx(xo,{label:"Add row",icon:dh,onClick:()=>{Tt&&(A(!0),Tt(),zt(),w.current?.scrollTo(0,ve,"vertical"))}}),!re&&$e.length>ye.length&&fe.jsx(jS,{columns:$e,columnOrder:Me,setColumnOrder:Et,hideColumn:Jr,showColumn:Ho,isOpen:ie,onClose:ge,children:fe.jsx(xo,{label:"Show/hide columns",icon:fh,onClick:Q})}),!se&&!re&&fe.jsx(xo,{label:"Download as CSV",icon:Wm,onClick:Mn}),!re&&fe.jsx(xo,{label:"Search",icon:hh,onClick:()=>{O?I(!1):(A(!0),I(!0)),zt()}})]}),fe.jsx(ng,{"data-testid":"stDataFrameResizable",ref:y,defaultSize:rn,style:{border:`${R.tableBorderWidth}px solid ${R.glideTheme.borderColor}`,borderRadius:`${R.tableBorderRadius}`},minHeight:B,maxHeight:Ne,minWidth:We,maxWidth:Nn?void 0:Dt,size:rn,enable:{top:!1,right:!1,bottom:!1,left:!1,topRight:!1,bottomRight:!Nn,bottomLeft:!1,topLeft:!1},grid:[1,qt],snapGap:qt/3,onResizeStop:(Ie,dn,sr,Hn)=>{if(y.current){const on=2*R.tableBorderWidth;Rn({width:y.current.size.width,height:Ne-y.current.size.height===on?y.current.size.height+on:y.current.size.height})}},children:fe.jsx(ty,{className:"stDataFrameGlideDataEditor","data-testid":"stDataFrameGlideDataEditor",ref:w,columns:bn,rows:re?1:ve,minColumnWidth:R.minColumnWidth,maxColumnWidth:R.maxColumnWidth,maxColumnAutoWidth:R.maxColumnAutoWidth,rowHeight:qt,headerHeight:R.defaultHeaderHeight,getCellContent:re?wn:_e,onColumnResize:oe?void 0:lr,resizeIndicator:"header",freezeColumns:Qr,smoothScrollX:!0,smoothScrollY:!0,verticalBorder:!0,getCellsForSelection:!0,rowMarkers:"none",rangeSelect:oe?"cell":"rect",columnSelect:"none",rowSelect:"none",onColumnMoved:bt?void 0:Ln,onItemHovered:Ie=>{P?.(Ie),Kt?.(Ie)},keybindings:{downFill:!0,..._t||se?{selectAll:!1}:{}},onKeyDown:Ie=>{(Ie.ctrlKey||Ie.metaKey)&&Ie.key==="f"&&(I(dn=>!dn),Ie.stopPropagation(),Ie.preventDefault())},showSearch:O,searchResults:O?void 0:[],onSearchClose:()=>{I(!1),zt()},onHeaderClicked:(Ie,dn)=>{!De||bt||(O&&I(!1),ft&&ln?Bt():Bt(!0,!0),Fe(Ie,"auto"))},gridSelection:je,onGridSelectionChange:Ie=>{(C||oe)&&(mt(Ie),cn!==void 0&&zt(),K(void 0),ee(!1))},theme:R.glideTheme,getRowThemeOverride:S,onMouseMove:Ie=>{Ie.kind==="out-of-bounds"&&C?A(!1):Ie.kind!=="out-of-bounds"&&!C&&A(!0)},fixedShadowX:!0,fixedShadowY:!0,experimental:{scrollbarWidthOverride:0,paddingBottom:k?-v:void 0,paddingRight:M?-v:void 0},provideEditor:In,drawCell:Be,customRenderers:wt,imageEditorOverride:Ik,headerIcons:R.headerIcons,validateCell:tn,onHeaderMenuClick:(Ie,dn)=>{ie||K({columnIdx:Ie,headerBounds:dn})},onPaste:!1,...ft&&{rowMarkers:{kind:"checkbox-visible",checkboxStyle:"square",theme:{bgCell:R.glideTheme.bgHeader,bgCellMedium:R.glideTheme.bgHeader,textMedium:R.glideTheme.textLight}},rowSelectionMode:$t?"multi":"auto",rowSelect:n?"none":$t?"multi":"single",rowSelectionBlending:"additive",rangeSelectionBlending:"additive"},...bt&&{columnSelect:n?"none":Mt?"multi":"single",columnSelectionBlending:"additive",columnSelectionMode:Mt?"multi":"auto",rangeSelectionBlending:"additive"},..._t&&{rangeSelect:Zt?"rect":"cell",rangeSelectionBlending:"additive"},...!re&&e.editingMode!==de&&!n&&{fillHandle:!oe,onCellEdited:Ee,onPaste:ct,onDelete:vn},...be&&{trailingRowOptions:{sticky:!1,tint:!0},onRowAppended:Tt,onHeaderClicked:void 0},...Ge&&{rowMarkers:{kind:"checkbox",checkboxStyle:"square",theme:{bgCell:R.glideTheme.bgHeader,bgCellMedium:R.glideTheme.bgHeader}},rowSelectionMode:"multi",rowSelect:n?"none":"multi"}})}),cn?.content&&fe.jsx(US,{top:cn.top,left:cn.left,content:cn.content,clearTooltip:zt}),$&&qd.createPortal(fe.jsx(_S,{top:$.headerBounds.y+$.headerBounds.height,left:$.headerBounds.x+$.headerBounds.width,column:st[$.columnIdx],onCloseMenu:()=>K(void 0),onSortColumn:De?Ie=>{O&&I(!1),Bt(!(ft&&ln),!0),Fe($.columnIdx,Ie,!0)}:void 0,isColumnPinned:st[$.columnIdx].isPinned,onUnpinColumn:()=>{xn(st[$.columnIdx].id)},onPinColumn:()=>{yn(st[$.columnIdx].id)},onHideColumn:()=>{Jr(st[$.columnIdx].id)},onChangeFormat:Ie=>{Gr(st[$.columnIdx].id,Ie),_n.current=$.columnIdx,no()},onAutosize:()=>{w.current?.remeasureColumns(Qe.fromSingleSelection($.columnIdx))}}),document.querySelector("#portal"))]})}const qS=dm(ZS),yp=d.memo(qS),KS=({data:e,height:t,width:n,customToolbarActions:r})=>fe.jsx(yp,{element:new Xt({editingMode:Xt.EditingMode.READ_ONLY,disabled:!0,arrowData:null,id:"",columns:"",formId:"",columnOrder:[],selectionMode:[]}),data:e,widgetMgr:void 0,disabled:!0,fragmentId:void 0,disableFullscreenMode:!0,customToolbarActions:r,widthConfig:n??new Du.WidthConfig({useStretch:!0}),heightConfig:t?new Du.HeightConfig({pixelHeight:t}):void 0}),pM=Object.freeze(Object.defineProperty({__proto__:null,ReadOnlyGrid:KS,default:yp},Symbol.toStringTag,{value:"Module"}));export{t0 as F,So as X,Fv as a,KS as b,hn as f,H1 as g,pM as i,Ro as k,Zh as y};
|