@stlite/desktop 0.95.0 → 0.97.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 +12 -0
- package/bin/dump_artifacts.js +1 -1
- package/build/assets/{ErrorOutline.esm-C-dv9Xq1-skkXNqDc.js → ErrorOutline.esm-lsdlHF0t-DG4LSxex.js} +1 -1
- package/build/assets/{FileDownload.esm-ORp-UC-S-BrsUfuH5.js → FileDownload.esm-B67hf_fm-CYQKuYJG.js} +1 -1
- package/build/assets/FileHelper-CfZ5yPb2-CNHTcjh9.js +5 -0
- package/build/assets/{FormClearHelper-DtwjWakY-CxfcniD6.js → FormClearHelper-XrLdNEJa-DVEjd1cV.js} +1 -1
- package/build/assets/IFrameUtil-8kJzIdKx-BKMrKnrz.js +1 -0
- package/build/assets/{InputInstructions-CshBE9XZ-BbegIdTI.js → InputInstructions-UPXPLzmg-Q7bu80af.js} +2 -2
- package/build/assets/Particles-BG5hjQKX-C7A0Knla.js +1 -0
- package/build/assets/ProgressBar-E3DTwBEC-BjaNqN1B.js +2 -0
- package/build/assets/StreamlitSyntaxHighlighter-CzihVVQU-DKtwdTjA.js +9 -0
- package/build/assets/TableChart.esm-DTCdMC22-C2aHYx-P.js +1 -0
- package/build/assets/{Toolbar-Cc8tCeKL-JHIp2NvW.js → Toolbar-DencJ98c--L3IVNu_.js} +1 -1
- package/build/assets/UploadFileInfo-DdcsXhjv-m2CBXl3F.js +1 -0
- package/build/assets/WidgetLabelHelpIconInline-DFAc7fKv-BB1k3kRL.js +1 -0
- package/build/assets/_baseAssignValue-D2hePX0_-CX8WO6Yp.js +1 -0
- package/build/assets/_baseIndexOf-OsCSwRmV--aVpkM1d.js +1 -0
- package/build/assets/{base-input-DbV2D5sF-DJkpBRM1.js → base-input-BPl9JMAl-yC1GT4Gd.js} +4 -4
- package/build/assets/{checkbox-CG80fxUD-CavQvTtP.js → checkbox-BCtTdZut-CgBE95kP.js} +2 -2
- package/build/assets/createDownloadLinkElement-D-zJ1ZGH-MUElf4MM.js +1 -0
- package/build/assets/createSuper-Csct9QVD-vLz3pY3G.js +1 -0
- package/build/assets/data-grid-overlay-editor-58Vv1cYM-BTQbyoqC.js +1 -0
- package/build/assets/{downloader-DcCTL3Wz-CqotLrf1.js → downloader-DcCTL3Wz-CCWe5qlA.js} +1 -1
- package/build/assets/embed-4M_Y1tyc-DYkZAF8O.js +195 -0
- package/build/assets/{es6--XPcqeHG-DdkxL8eW.js → es6--XPcqeHG-7ATg0sOb.js} +2 -2
- package/build/assets/formatMoment-DEtsTHwA-BeQagUzn.js +1 -0
- package/build/assets/formatNumber-ep44bWil-jKcj-W8C.js +1 -0
- package/build/assets/iconPosition-D6yC8Xnj-BF1h45AJ.js +1 -0
- package/build/assets/iframeResizer.contentWindow-nTwp-zqr-CtsMNeCZ.js +1 -0
- package/build/assets/index--TzMnXzp-DAvnEXlj.js +1 -0
- package/build/assets/index--qHBza9B-Cw3TTMgu.js +1 -0
- package/build/assets/index-B-mlHTWW-DxFrd5NG.js +1 -0
- package/build/assets/{index-CiBn_-AR-CMINgD7R.js → index-B-vlNoRi-Cx4hHKp7.js} +1 -1
- package/build/assets/index-B7jXK8tg-DQuHfWI9.js +1 -0
- package/build/assets/index-BFmSYBo1-C1-2gL1R.js +2 -0
- package/build/assets/{index-SbKh1OIB-BjfuWdcF.js → index-BIskStic-GEaJjVf4.js} +4 -4
- package/build/assets/index-BmOxzNZt-CNMeXzFc.js +1 -0
- package/build/assets/index-BmPxToPj-BM0EGyRT.js +1 -0
- package/build/assets/index-BmXuG0WA-D_Ql4e0d.js +3 -0
- package/build/assets/index-BtV4cH-G-DZqE8EFk.js +1 -0
- package/build/assets/index-BwXCTp7d-CbCsXHhb.js +6 -0
- package/build/assets/index-BwaRZjpn-BcW7Mc-p.js +1 -0
- package/build/assets/index-BzkAb_Ru-BoJQq1Du.js +1 -0
- package/build/assets/index-C5pyI-9n-BoqvCp9L.js +3 -0
- package/build/assets/index-CHTMxzEE-CdrOqTD2.js +1 -0
- package/build/assets/index-CJJUSpBk-Cjx3_stH.js +2 -0
- package/build/assets/index-CVld_lKx-CBWAU0gM.js +14 -0
- package/build/assets/index-CWwI7Day-CBbcYz7C.js +3 -0
- package/build/assets/{index-D2j0kQLw-67iH-2yA.js → index-CYKyPdc--DXQt2pbH.js} +1 -1
- package/build/assets/index-CYavJtAA-CEB9mFy5.js +11 -0
- package/build/assets/index-C_AtJDfm-C2sFKVUp.js +1 -0
- package/build/assets/index-Cc93rxqK-qmLHI1ce.js +1 -0
- package/build/assets/index-CgwImjw9-vhGwcoU0.js +1 -0
- package/build/assets/{index-BqCY3Zlk-mm_Bt8ZF.js → index-CiGWj_Vp-n6pbS_He.js} +1 -1
- package/build/assets/index-Cp9lKUfY-DCgJbJZE.js +1 -0
- package/build/assets/index-CrLOtTTY-_bXB7Npw.js +2 -0
- package/build/assets/{index-CNKtyIol-BPke8suV.js → index-CuAftQdk-D76l7Kt4.js} +1 -1
- package/build/assets/index-D0DUjycF-DZpBbVrj.js +263 -0
- package/build/assets/index-D1pkaPju-DGUZOgpo.js +1 -0
- package/build/assets/index-D6IEgvdJ-B-rltr1-.js +1 -0
- package/build/assets/index-D9TZavtE.css +1 -0
- package/build/assets/index-DQ7wfL_P-DAp2jN40.js +2 -0
- package/build/assets/{index-y3ITDERN-Ccy-wRE2.js → index-DR-j-FYy-DJdOMdE8.js} +1 -1
- package/build/assets/index-DUNdG0N4-BKyH_Fci.js +2 -0
- package/build/assets/index-Df-1Z3LJ-bsVAaBS1.js +1 -0
- package/build/assets/index-Dfye6cAn-CH-9suNF.js +1 -0
- package/build/assets/index-DhMU6AlU-DzPhysZa.js +3789 -0
- package/build/assets/index-DjAHjI25-oZ9XAxp1.js +27 -0
- package/build/assets/index-DlPzHASD-B0KSeIYY.js +1 -0
- package/build/assets/index-DrLK8ov3-Stod2ydK.js +2 -0
- package/build/assets/index-DtFJwl5H-Dn2VZIyI.js +1 -0
- package/build/assets/index-DuZXLtJ1-BxktJ87b.js +1 -0
- package/build/assets/index-H5hDyygX-DMvEgj-E.js +1 -0
- package/build/assets/index-LD7yKakY-9tfSlqzu.js +1 -0
- package/build/assets/index-LeNVxf2A-B46Z4XAZ.js +1 -0
- package/build/assets/index-QsvFitQg-IS60zSNc.js +1 -0
- package/build/assets/index-YCKUmi7k-wKVbmOTE.js +1 -0
- package/build/assets/{index-DeKEPgyN-DF3OyxuW.js → index-f_0uAugs-KaRkqnk8.js} +1 -1
- package/build/assets/index-nhNM5UeG.js +185 -0
- package/build/assets/index-pi_S-NOw-DHRw2FEx.js +198 -0
- package/build/assets/index-saRTHQRt-Cep0ox_U.js +1 -0
- package/build/assets/{input-DNUwcYWK-C9eVW6-S.js → input-BZGQFBY5-B-EqzVpf.js} +2 -2
- package/build/assets/main-DD_nsVBV-B-nG1zNN.js +13 -0
- package/build/assets/{memory-B3L1Fctl-CQ-Y_gc6.js → memory-B3L1Fctl-Dwxd_AN8.js} +1 -1
- package/build/assets/moment-CU6QKNej-DcQX_LE0.js +4 -0
- package/build/assets/number-overlay-editor--_WCmOH8-DebLrQQ4.js +9 -0
- package/build/assets/numbro-CBbENDeu-C6X7Pww4.js +1 -0
- package/build/assets/pandasStylerUtils-DlCnQunN-DDd07kWa.js +1 -0
- package/build/assets/possibleConstructorReturn-i7eTFBhJ-BnzuGOIJ.js +1 -0
- package/build/assets/record-CvRL89xC-Cpipd1Kv.js +1 -0
- package/build/assets/{sandbox-ChAzL-i--DqMwo4R7.js → sandbox-ChAzL-i--CrJOWfYj.js} +1 -1
- package/build/assets/styled-components-Dq_iSDU9-i1eh3pWs.js +1 -0
- package/build/assets/threshold-eWsxmMyL-jpRnj60B.js +1 -0
- package/build/assets/{timepicker-CkLW19xP-CTuglWU6.js → timepicker-CL-801So-Sc5MVKGZ.js} +3 -3
- package/build/assets/timer-DAAwtI0i-CB52lra-.js +1 -0
- package/build/assets/toConsumableArray-CCohTQYb-ClE5WF0y.js +3 -0
- package/build/assets/uniqueId-CWWNkcH4-CJJowNJ2.js +1 -0
- package/build/assets/urls-CuMqgoDl-BWqF1s4U.js +1 -0
- package/build/assets/{useBasicWidgetState-BTyLgyXa-DI96f9E0.js → useBasicWidgetState-BYeS5Lnw-COvJBdtg.js} +1 -1
- package/build/assets/useIntlLocale-D1zv6Q2y-BpOVDRdF.js +12 -0
- package/build/assets/{useTextInputAutoExpand-YLx_K1sh-DhWKaGOV.js → useTextInputAutoExpand-DEesfW0v-Cv12Lx8Q.js} +2 -2
- package/build/assets/{useUpdateUiValue-B9j1K8e5-CIeTAxHC.js → useUpdateUiValue-DDoOKBFH-DrpUtoEl.js} +1 -1
- package/build/assets/useWaveformController-Betfr4kn-B9JLTJ93.js +1 -0
- package/build/assets/value-DwxUZIyI-CNuykc50.js +1 -0
- package/build/assets/wavesurfer.esm-idh1jvYE-D4Wwdy60.js +74 -0
- package/build/assets/withCalculatedWidth-ZZ9bYZZd-CtbnrMaD.js +1 -0
- package/build/assets/withFullScreenWrapper-B-PKqZVg-DWJ8sEV7.js +1 -0
- package/build/index.html +2 -2
- package/package.json +3 -3
- package/wheels/streamlit-1.53.1-cp313-none-any.whl +0 -0
- package/build/assets/FileHelper-DQKV3o5U-qFf0CL_R.js +0 -5
- package/build/assets/Particles-DbEEaBdi-Cslh0fnd.js +0 -1
- package/build/assets/ProgressBar-ohpf-YR2-PWD0xacp.js +0 -2
- package/build/assets/UploadFileInfo-B5SttewO-BfvME59S.js +0 -1
- package/build/assets/createDownloadLinkElement-CbRjLJ8e-NbV49OP9.js +0 -1
- package/build/assets/createSuper-BlgWzn8_-h1vcwEzv.js +0 -1
- package/build/assets/data-grid-overlay-editor-DsmOmCoE-DU0EvyVM.js +0 -1
- package/build/assets/iframeResizer.contentWindow-DEXh82Lp-CG3rnwWO.js +0 -1
- package/build/assets/index-3Q8l-56I-Bp9UZWPZ.js +0 -27
- package/build/assets/index-8FM--PX3-C2rsm2es.js +0 -1
- package/build/assets/index-B1y_Hrx0-DDwLQ3XW.js +0 -1
- package/build/assets/index-BECG__WC-DerPiN--.js +0 -1
- package/build/assets/index-BQn4Faen-CVQ5ESXY.js +0 -3
- package/build/assets/index-BReUOw2L-emeACiGh.js +0 -1371
- package/build/assets/index-BiS_E3zu-CwIGZcqG.js +0 -1
- package/build/assets/index-BmlZuG1z-BtaDcb9o.js +0 -1
- package/build/assets/index-BvblFOYP.js +0 -691
- package/build/assets/index-Bzy7yu67-C3L4ShMk.js +0 -2
- package/build/assets/index-C7cG_aL6-BWm5S1-m.js +0 -3789
- package/build/assets/index-CO05R5cS-DHfFy15g.js +0 -1
- package/build/assets/index-CQfw52g6-BJ-a84bb.js +0 -1
- package/build/assets/index-CTvmRzFN-By1zFrdQ.js +0 -2
- package/build/assets/index-Cb_C2vCk-DrzTyNQF.js +0 -198
- package/build/assets/index-CnMc0ayy-CKIU12h5.js +0 -1
- package/build/assets/index-D0Ry9mHz-DBJluHQV.js +0 -3
- package/build/assets/index-D42P77wj-jZCT0fQL.js +0 -1
- package/build/assets/index-D7LfqMh3-DvKIa3UK.js +0 -1
- package/build/assets/index-DD64_I3e-Cxdt0Oji.js +0 -1
- package/build/assets/index-DEYeMrzr-DP5rSRot.js +0 -1
- package/build/assets/index-DTog-cZN-vTBq72Ci.js +0 -1
- package/build/assets/index-DU0kTHM_-CInhbPr8.js +0 -12
- package/build/assets/index-DnTjZ9IR.css +0 -1
- package/build/assets/index-DrS8S2M--C4mGh6T8.js +0 -1
- package/build/assets/index-DxTzjSNF-B-v_CQEN.js +0 -2
- package/build/assets/index-IXLMpVV4-D8dPiMEz.js +0 -2
- package/build/assets/index-Ray843Xd-CpBr9wfH.js +0 -1
- package/build/assets/index-S-A7KecP-DJ0BKtLt.js +0 -1
- package/build/assets/index-Uvv6so0Q-Lbl8GAad.js +0 -1
- package/build/assets/index-YbT2v6Cb-CoC81Jcm.js +0 -1
- package/build/assets/index-vRM8HrbM-CZbE9IiJ.js +0 -3
- package/build/assets/inherits-CYghrBFU-Cf4k8aUQ.js +0 -1
- package/build/assets/number-overlay-editor-C2e7pY6x-BnC-vP7l.js +0 -9
- package/build/assets/record-DJsfODTt-CK8X1liM.js +0 -1
- package/build/assets/slicedToArray-D4uL3Bzl-95JmZlNK.js +0 -2
- package/build/assets/uniqueId-C6wp_e1D-D_RnWRJW.js +0 -1
- package/build/assets/wavesurfer.esm-CzjpjtNs-CtBzisOM.js +0 -74
- package/build/assets/withFullScreenWrapper-DqrJMIkm-BwrYir6f.js +0 -1
- package/wheels/streamlit-1.51.0-cp313-none-any.whl +0 -0
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/data-grid-overlay-editor-58Vv1cYM-BTQbyoqC.js","assets/index-nhNM5UeG.js","assets/index-D9TZavtE.css","assets/withFullScreenWrapper-B-PKqZVg-DWJ8sEV7.js","assets/Toolbar-DencJ98c--L3IVNu_.js","assets/FormClearHelper-XrLdNEJa-DVEjd1cV.js","assets/moment-CU6QKNej-DcQX_LE0.js","assets/pandasStylerUtils-DlCnQunN-DDd07kWa.js","assets/numbro-CBbENDeu-C6X7Pww4.js","assets/_baseIndexOf-OsCSwRmV--aVpkM1d.js","assets/_baseAssignValue-D2hePX0_-CX8WO6Yp.js","assets/index-CVld_lKx-CBWAU0gM.js","assets/main-DD_nsVBV-B-nG1zNN.js","assets/toConsumableArray-CCohTQYb-ClE5WF0y.js","assets/possibleConstructorReturn-i7eTFBhJ-BnzuGOIJ.js","assets/createSuper-Csct9QVD-vLz3pY3G.js","assets/formatNumber-ep44bWil-jKcj-W8C.js","assets/sprintf-D5E86llw-6tzWM3a-.js","assets/formatMoment-DEtsTHwA-BeQagUzn.js","assets/checkbox-BCtTdZut-CgBE95kP.js","assets/createDownloadLinkElement-D-zJ1ZGH-MUElf4MM.js","assets/FileDownload.esm-B67hf_fm-CYQKuYJG.js","assets/number-overlay-editor--_WCmOH8-DebLrQQ4.js","assets/es6--XPcqeHG-7ATg0sOb.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{k as he,r as d,bU as Ou,A as Yt,G as Du,cX as Zp,cY as qp,H as Kp,Y as Jp,j as Me,y as Hn,aJ as Xd,cZ as Qp,ar as en,L as Yr,c_ as Gp,c$ as eg,au as yo,N as lt,ce as tg,O as nl,bG as ks,E as Ss,F as Ms,_ as Ve,az as Zd,ay as ng,d0 as rg,d1 as og,D as ig,aW as qd,a_ as ag,a4 as Er,Q as Ct,ab as Ta,ad as Oa,d2 as Kd,Z as ki,ac as Jd,d3 as lg,B as sg,a8 as ug,ae as Un,d4 as cg,d5 as Qd,d6 as dg,d7 as fg,d8 as hg,d9 as pg,da as gg,db as mg,dc as vg,aV as bg,dd as yg,P as wg,R as xg,b0 as Cg,de as kg,df as Gd,z as Sg,dg as Mg,b1 as Rg,bf as Eg,dh as Ig,di as Tg,af as Og,dj as ef,T as Dg,cI as Pg,dk as Ag,dl as Hg,dm as zg,aZ as Fg,aX as Lg,dn as ar,bH as Vg,dp as $g,cq as rl,a3 as li,bT as _g,dq as Bg,dr as tf,ds as Ng,dt as jg,aH as Wg,du as Ug,dv as Yg,dw as Xg,dx as Zg,dy as qg,dz as Kg,dA as ia,dB as Yo,dC as Ht,dD as Jg,dE as Qg,dF as Gg,dG as em,dH as tm,dI as nm,dJ as $r,dK as xt,dL as mn,dM as Pu,dN as Au,dO as da,dP as nf,dQ as rf,dR as rm,dS as os,dT as om,dU as im,dV as of,dW as am,dX as lm}from"./index-nhNM5UeG.js";import{v as sm,d as um}from"./withFullScreenWrapper-B-PKqZVg-DWJ8sEV7.js";import{y as cm,X as vo}from"./Toolbar-DencJ98c--L3IVNu_.js";import{m as dm}from"./FormClearHelper-XrLdNEJa-DVEjd1cV.js";import{l as Br}from"./moment-CU6QKNej-DcQX_LE0.js";import{f as fm,c as is,$ as hm,B as Hu,v as pm}from"./pandasStylerUtils-DlCnQunN-DDd07kWa.js";import{i as gm}from"./numbro-CBbENDeu-C6X7Pww4.js";import{w as mm,c as Da,d as vm,P as bm,o as ym,e as wm,l as xm,p as Cm,r as km,F as af,H as Sm,S as Mm,K as Rm,M as lf,q as Em,g as Im,b as Tm,s as Om}from"./_baseAssignValue-D2hePX0_-CX8WO6Yp.js";import{i as ol}from"./index-CVld_lKx-CBWAU0gM.js";import{D as Dm}from"./main-DD_nsVBV-B-nG1zNN.js";import{p as Pm,T as fr,x as Ro}from"./toConsumableArray-CCohTQYb-ClE5WF0y.js";import{_ as Am,b as Hm,y as zm}from"./possibleConstructorReturn-i7eTFBhJ-BnzuGOIJ.js";import{i as Fm}from"./createSuper-Csct9QVD-vLz3pY3G.js";import{l as fa}from"./formatNumber-ep44bWil-jKcj-W8C.js";import{s as zu}from"./formatMoment-DEtsTHwA-BeQagUzn.js";import{v as Lm,y as Vm,T as $m}from"./checkbox-BCtTdZut-CgBE95kP.js";import{s as _m}from"./createDownloadLinkElement-D-zJ1ZGH-MUElf4MM.js";import{o as Bm,i as Nm}from"./FileDownload.esm-B67hf_fm-CYQKuYJG.js";var jm="[object Map]",Wm="[object Set]",Um=Object.prototype,Ym=Um.hasOwnProperty;function Xm(e){if(e==null)return!0;if(dg(e)&&(Qd(e)||typeof e=="string"||typeof e.splice=="function"||fg(e)||hg(e)||pg(e)))return!e.length;var t=gg(e);if(t==jm||t==Wm)return!e.size;if(mg(e))return!vg(e).length;for(var n in e)if(Ym.call(e,n))return!1;return!0}var sf=d.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return d.createElement(Ms,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"}))});sf.displayName="Add";var uf=d.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return d.createElement(Ms,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"}))});uf.displayName="Search";var cf=d.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return d.createElement(Ms,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"}))});cf.displayName="Visibility";var il,Fu;function Zm(){if(Fu)return il;Fu=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r,o){return r!=null&&t.call(r,o)}return il=n,il}var al,Lu;function qm(){if(Lu)return al;Lu=1;var e=Zm(),t=xm();function n(r,o){return r!=null&&t(r,o,e)}return al=n,al}var Km=qm();const Jm=Er(Km);function df(e="This should not happen"){throw new Error(e)}function Pn(e,t="Assertion failed"){if(!e)return df(t)}function gi(e,t){return df(t??"Hell froze over")}function Qm(e,t){try{return e()}catch{return t}}const Vu=Object.prototype.hasOwnProperty;function Io(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--&&Io(e[r],t[r]););return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(Vu.call(e,n)&&++r&&!Vu.call(t,n)||!(n in t)||!Io(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}const ha=null,Rs=void 0;var Q;(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"})(Q||(Q={}));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 Yi(e){return"width"in e&&typeof e.width=="number"}async function _u(e){return typeof e=="object"?e:await e()}function wo(e){return!(e.kind===Q.Loading||e.kind===Q.Bubble||e.kind===Q.RowID||e.kind===Q.Protected||e.kind===Q.Drilldown)}function ko(e){return e.kind===_n.Marker||e.kind===_n.NewRow}function xo(e){if(!wo(e)||e.kind===Q.Image)return!1;switch(e.kind){case Q.Text:case Q.Number:case Q.Markdown:case Q.Uri:case Q.Custom:case Q.Boolean:return e.readonly!==!0;default:gi(e,"A cell was passed with an invalid kind")}}function Gm(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 ll(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 Je{items;constructor(t){this.items=t}static create=t=>new Je(ll(t));static empty=()=>Bu??(Bu=new Je([]));static fromSingleSelection=t=>Je.empty().add(t);static fromArray=t=>{if(t.length===0)return Je.empty();const n=t.map(o=>[o,o+1]),r=ll(n);return new Je(r)};offset(t){if(t===0)return this;const n=this.items.map(r=>[r[0]+t,r[1]+t]);return new Je(n)}add(t){const n=typeof t=="number"?[t,t+1]:t,r=ll([...this.items,n]);return new Je(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 Je(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 e0=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(" ")},Nu=e0,t0=e=>e.toUpperCase()===e,n0=e=>t=>e.indexOf(t)===-1,ff=(e,t)=>{const n={};return Object.keys(e).filter(n0(t)).forEach(r=>{n[r]=e[r]}),n};function r0(e,t,n){const r=ff(t,n);if(!e){const o=typeof rl=="function"?{default:rl}:rl;Object.keys(r).forEach(i=>{o.default(i)||delete r[i]})}return r}var o0=(e,t)=>{};function i0(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&&!t0(l[0])):n.propsAsIs,c=r0(u,i,["as","class"]);c.ref=a,c.className=n.atomic?Nu(n.class,c.className||s):Nu(c.className||s,n.class);const{vars:f}=n;if(f){const g={};for(const m in f){const w=f[m],y=w[0],v=w[1]||"",C=typeof y=="function"?y(i):y;o0(C,n.name),g[`--${m}`]=`${C}${v}`}const h=c.style||{},p=Object.keys(h);p.length>0&&p.forEach(m=>{g[m]=h[m]}),c.style=g}return e.__wyw_meta&&e!==l?(c.as=l,d.createElement(e,c)):d.createElement(l,c)},o=d.forwardRef?d.forwardRef(r):(i=>{const a=ff(i,["innerRef"]);return r(a,i.innerRef)});return o.displayName=n.name,o.__wyw_meta={className:n.class||t,extends:e},o}}var dn=i0;const a0=dn("div")({name:"ImageOverlayEditorStyle",class:"gdg-i2iowwq",propsAsIs:!1});var ju={},Xo={},sl={},ul={},Wu;function l0(){return Wu||(Wu=1,(function(e){(function(t,n){n(e,Ct,Wg())})(ul,function(t,n,r){Object.defineProperty(t,"__esModule",{value:!0}),t.setHasSupportToCaptureOption=p;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 C=1;C<arguments.length;C++){var E=arguments[C];for(var I in E)Object.prototype.hasOwnProperty.call(E,I)&&(v[I]=E[I])}return v};function s(v,C){var E={};for(var I in v)C.indexOf(I)>=0||Object.prototype.hasOwnProperty.call(v,I)&&(E[I]=v[I]);return E}function u(v,C){if(!(v instanceof C))throw new TypeError("Cannot call a class as a function")}var c=(function(){function v(C,E){for(var I=0;I<E.length;I++){var S=E[I];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(C,S.key,S)}}return function(C,E,I){return E&&v(C.prototype,E),I&&v(C,I),C}})();function f(v,C){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C&&(typeof C=="object"||typeof C=="function")?C:v}function g(v,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof C);v.prototype=Object.create(C&&C.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),C&&(Object.setPrototypeOf?Object.setPrototypeOf(v,C):v.__proto__=C)}var h=!1;function p(v){h=v}try{addEventListener("test",null,Object.defineProperty({},"capture",{get:function(){p(!0)}}))}catch{}function m(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{capture:!0};return h?v:v.capture}function w(v){if("touches"in v){var C=v.touches[0],E=C.pageX,I=C.pageY;return{x:E,y:I}}var S=v.screenX,P=v.screenY;return{x:S,y:P}}var y=(function(v){g(C,v);function C(){var E;u(this,C);for(var I=arguments.length,S=Array(I),P=0;P<I;P++)S[P]=arguments[P];var O=f(this,(E=C.__proto__||Object.getPrototypeOf(C)).call.apply(E,[this].concat(S)));return O._handleSwipeStart=O._handleSwipeStart.bind(O),O._handleSwipeMove=O._handleSwipeMove.bind(O),O._handleSwipeEnd=O._handleSwipeEnd.bind(O),O._onMouseDown=O._onMouseDown.bind(O),O._onMouseMove=O._onMouseMove.bind(O),O._onMouseUp=O._onMouseUp.bind(O),O._setSwiperRef=O._setSwiperRef.bind(O),O}return c(C,[{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 I=w(E),S=I.x,P=I.y;this.moveStart={x:S,y:P},this.props.onSwipeStart(E)}},{key:"_handleSwipeMove",value:function(E){if(this.moveStart){var I=w(E),S=I.x,P=I.y,O=S-this.moveStart.x,x=P-this.moveStart.y;this.moving=!0;var A=this.props.onSwipeMove({x:O,y:x},E);A&&E.cancelable&&E.preventDefault(),this.movePosition={deltaX:O,deltaY:x}}}},{key:"_handleSwipeEnd",value:function(E){this.props.onSwipeEnd(E);var I=this.props.tolerance;this.moving&&this.movePosition&&(this.movePosition.deltaX<-I?this.props.onSwipeLeft(1,E):this.movePosition.deltaX>I&&this.props.onSwipeRight(1,E),this.movePosition.deltaY<-I?this.props.onSwipeUp(1,E):this.movePosition.deltaY>I&&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 I=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 O=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:I,style:S},O),P)}}]),C})(n.Component);y.displayName="ReactSwipe",y.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},y.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=y})})(ul)),ul}var Uu;function hf(){return Uu||(Uu=1,(function(e){(function(t,n){n(e,l0())})(sl,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})})(sl)),sl}var Zo={},Yu;function pf(){if(Yu)return Zo;Yu=1,Object.defineProperty(Zo,"__esModule",{value:!0}),Zo.default=void 0;var e=t(Ng());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={},Xu;function s0(){if(Xu)return Ko;Xu=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 Jo={},Zu;function Is(){if(Zu)return Jo;Zu=1,Object.defineProperty(Jo,"__esModule",{value:!0}),Jo.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 Jo.default=e,Jo}var Qo={},qu;function gf(){if(qu)return Qo;qu=1,Object.defineProperty(Qo,"__esModule",{value:!0}),Qo.default=void 0;var e=function(){return window};return Qo.default=e,Qo}var Ku;function mf(){if(Ku)return qo;Ku=1,Object.defineProperty(qo,"__esModule",{value:!0}),qo.default=void 0;var e=s(Ct),t=a(pf()),n=s0(),r=a(Is()),o=a(hf()),i=a(gf());function a(O){return O&&O.__esModule?O:{default:O}}function l(){if(typeof WeakMap!="function")return null;var O=new WeakMap;return l=function(){return O},O}function s(O){if(O&&O.__esModule)return O;if(O===null||u(O)!=="object"&&typeof O!="function")return{default:O};var x=l();if(x&&x.has(O))return x.get(O);var A={},T=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var R in O)if(Object.prototype.hasOwnProperty.call(O,R)){var M=T?Object.getOwnPropertyDescriptor(O,R):null;M&&(M.get||M.set)?Object.defineProperty(A,R,M):A[R]=O[R]}return A.default=O,x&&x.set(O,A),A}function u(O){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(x){return typeof x}:u=function(x){return x&&typeof Symbol=="function"&&x.constructor===Symbol&&x!==Symbol.prototype?"symbol":typeof x},u(O)}function c(){return c=Object.assign||function(O){for(var x=1;x<arguments.length;x++){var A=arguments[x];for(var T in A)Object.prototype.hasOwnProperty.call(A,T)&&(O[T]=A[T])}return O},c.apply(this,arguments)}function f(O,x){if(!(O instanceof x))throw new TypeError("Cannot call a class as a function")}function g(O,x){for(var A=0;A<x.length;A++){var T=x[A];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(O,T.key,T)}}function h(O,x,A){return x&&g(O.prototype,x),O}function p(O,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function");O.prototype=Object.create(x&&x.prototype,{constructor:{value:O,writable:!0,configurable:!0}}),x&&m(O,x)}function m(O,x){return m=Object.setPrototypeOf||function(A,T){return A.__proto__=T,A},m(O,x)}function w(O){var x=C();return function(){var A=E(O),T;if(x){var R=E(this).constructor;T=Reflect.construct(A,arguments,R)}else T=A.apply(this,arguments);return y(this,T)}}function y(O,x){return x&&(u(x)==="object"||typeof x=="function")?x:v(O)}function v(O){if(O===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O}function C(){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(O){return E=Object.setPrototypeOf?Object.getPrototypeOf:function(x){return x.__proto__||Object.getPrototypeOf(x)},E(O)}function I(O,x,A){return x in O?Object.defineProperty(O,x,{value:A,enumerable:!0,configurable:!0,writable:!0}):O[x]=A,O}var S=function(O){return O.hasOwnProperty("key")},P=(function(O){p(A,O);var x=w(A);function A(T){var R;return f(this,A),R=x.call(this,T),I(v(R),"itemsWrapperRef",void 0),I(v(R),"itemsListRef",void 0),I(v(R),"thumbsRef",void 0),I(v(R),"setItemsWrapperRef",function(M){R.itemsWrapperRef=M}),I(v(R),"setItemsListRef",function(M){R.itemsListRef=M}),I(v(R),"setThumbsRef",function(M,D){R.thumbsRef||(R.thumbsRef=[]),R.thumbsRef[D]=M}),I(v(R),"updateSizes",function(){if(!(!R.props.children||!R.itemsWrapperRef||!R.thumbsRef)){var M=e.Children.count(R.props.children),D=R.itemsWrapperRef.clientWidth,k=R.props.thumbWidth?R.props.thumbWidth:(0,n.outerWidth)(R.thumbsRef[0]),X=Math.floor(D/k),$=X<M,K=$?M-X:0;R.setState(function(ie,ee){return{itemSize:k,visibleItems:X,firstItem:$?R.getFirstItem(ee.selectedItem):0,lastPosition:K,showArrows:$}})}}),I(v(R),"handleClickItem",function(M,D,k){if(!S(k)||k.key==="Enter"){var X=R.props.onSelectItem;typeof X=="function"&&X(M,D)}}),I(v(R),"onSwipeStart",function(){R.setState({swiping:!0})}),I(v(R),"onSwipeEnd",function(){R.setState({swiping:!1})}),I(v(R),"onSwipeMove",function(M){var D=M.x;if(!R.state.itemSize||!R.itemsWrapperRef||!R.state.visibleItems)return!1;var k=0,X=e.Children.count(R.props.children),$=-(R.state.firstItem*100)/R.state.visibleItems,K=Math.max(X-R.state.visibleItems,0),ie=-K*100/R.state.visibleItems;$===k&&D>0&&(D=0),$===ie&&D<0&&(D=0);var ee=R.itemsWrapperRef.clientWidth,J=$+100/(ee/D);return R.itemsListRef&&["WebkitTransform","MozTransform","MsTransform","OTransform","transform","msTransform"].forEach(function(ge){R.itemsListRef.style[ge]=(0,r.default)(J,"%",R.props.axis)}),!0}),I(v(R),"slideRight",function(M){R.moveTo(R.state.firstItem-(typeof M=="number"?M:1))}),I(v(R),"slideLeft",function(M){R.moveTo(R.state.firstItem+(typeof M=="number"?M:1))}),I(v(R),"moveTo",function(M){M=M<0?0:M,M=M>=R.state.lastPosition?R.state.lastPosition:M,R.setState({firstItem:M})}),R.state={selectedItem:T.selectedItem,swiping:!1,showArrows:!1,firstItem:0,visibleItems:0,lastPosition:0},R}return h(A,[{key:"componentDidMount",value:function(){this.setupThumbs()}},{key:"componentDidUpdate",value:function(T){this.props.selectedItem!==this.state.selectedItem&&this.setState({selectedItem:this.props.selectedItem,firstItem:this.getFirstItem(this.props.selectedItem)}),this.props.children!==T.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(T){var R=T;return T>=this.state.lastPosition&&(R=this.state.lastPosition),T<this.state.firstItem+this.state.visibleItems&&(R=this.state.firstItem),T<this.state.firstItem&&(R=T),R}},{key:"renderItems",value:function(){var T=this;return this.props.children.map(function(R,M){var D=t.default.ITEM(!1,M===T.state.selectedItem),k={key:M,ref:function(X){return T.setThumbsRef(X,M)},className:D,onClick:T.handleClickItem.bind(T,M,T.props.children[M]),onKeyDown:T.handleClickItem.bind(T,M,T.props.children[M]),"aria-label":"".concat(T.props.labels.item," ").concat(M+1),style:{width:T.props.thumbWidth}};return e.default.createElement("li",c({},k,{role:"button",tabIndex:0}),R)})}},{key:"render",value:function(){var T=this;if(!this.props.children)return null;var R=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={},X=-this.state.firstItem*(this.state.itemSize||0),$=(0,r.default)(X,"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 T.slideRight()},"aria-label":this.props.labels.leftArrow}),R?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 T.setItemsListRef(ie)},style:k},this.renderItems()),e.default.createElement("button",{type:"button",className:t.default.ARROW_NEXT(!D),onClick:function(){return T.slideLeft()},"aria-label":this.props.labels.rightArrow})))}}]),A})(e.Component);return qo.default=P,I(P,"displayName","Thumbs"),I(P,"defaultProps",{axis:"horizontal",labels:{leftArrow:"previous slide / item",rightArrow:"next slide / item",item:"slide item"},selectedItem:0,thumbWidth:80,transitionTime:350}),qo}var Go={},Ju;function u0(){if(Ju)return Go;Ju=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.default=void 0;var e=function(){return document};return Go.default=e,Go}var On={},Qu;function vf(){if(Qu)return On;Qu=1,Object.defineProperty(On,"__esModule",{value:!0}),On.setPosition=On.getPosition=On.isKeyboardEvent=On.defaultStatusFormatter=On.noop=void 0;var e=Ct,t=n(Is());function n(s){return s&&s.__esModule?s:{default:s}}var r=function(){};On.noop=r;var o=function(s,u){return"".concat(s," of ").concat(u)};On.defaultStatusFormatter=o;var i=function(s){return s?s.hasOwnProperty("key"):!1};On.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 f=-s*u.centerSlidePercentage,g=c-1;return s&&(s!==g||u.infiniteLoop)?f+=(100-u.centerSlidePercentage)/2:s===g&&(f+=100-u.centerSlidePercentage),f}return-s*100};On.getPosition=a;var l=function(s,u){var c={};return["WebkitTransform","MozTransform","MsTransform","OTransform","transform","msTransform"].forEach(function(f){c[f]=(0,t.default)(s,"%",u)}),c};return On.setPosition=l,On}var Wn={},Gu;function c0(){if(Gu)return Wn;Gu=1,Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.fadeAnimationHandler=Wn.slideStopSwipingHandler=Wn.slideSwipeAnimationHandler=Wn.slideAnimationHandler=void 0;var e=Ct,t=r(Is()),n=vf();function r(f){return f&&f.__esModule?f:{default:f}}function o(f,g){var h=Object.keys(f);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(f);g&&(p=p.filter(function(m){return Object.getOwnPropertyDescriptor(f,m).enumerable})),h.push.apply(h,p)}return h}function i(f){for(var g=1;g<arguments.length;g++){var h=arguments[g]!=null?arguments[g]:{};g%2?o(Object(h),!0).forEach(function(p){a(f,p,h[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(h)):o(Object(h)).forEach(function(p){Object.defineProperty(f,p,Object.getOwnPropertyDescriptor(h,p))})}return f}function a(f,g,h){return g in f?Object.defineProperty(f,g,{value:h,enumerable:!0,configurable:!0,writable:!0}):f[g]=h,f}var l=function(f,g){var h={},p=g.selectedItem,m=p,w=e.Children.count(f.children)-1,y=f.infiniteLoop&&(p<0||p>w);if(y)return m<0?f.centerMode&&f.centerSlidePercentage&&f.axis==="horizontal"?h.itemListStyle=(0,n.setPosition)(-(w+2)*f.centerSlidePercentage-(100-f.centerSlidePercentage)/2,f.axis):h.itemListStyle=(0,n.setPosition)(-(w+2)*100,f.axis):m>w&&(h.itemListStyle=(0,n.setPosition)(0,f.axis)),h;var v=(0,n.getPosition)(p,f),C=(0,t.default)(v,"%",f.axis),E=f.transitionTime+"ms";return h.itemListStyle={WebkitTransform:C,msTransform:C,OTransform:C,transform:C},g.swiping||(h.itemListStyle=i(i({},h.itemListStyle),{},{WebkitTransitionDuration:E,MozTransitionDuration:E,OTransitionDuration:E,transitionDuration:E,msTransitionDuration:E})),h};Wn.slideAnimationHandler=l;var s=function(f,g,h,p){var m={},w=g.axis==="horizontal",y=e.Children.count(g.children),v=0,C=(0,n.getPosition)(h.selectedItem,g),E=g.infiniteLoop?(0,n.getPosition)(y-1,g)-100:(0,n.getPosition)(y-1,g),I=w?f.x:f.y,S=I;C===v&&I>0&&(S=0),C===E&&I<0&&(S=0);var P=C+100/(h.itemSize/S),O=Math.abs(I)>g.swipeScrollTolerance;return g.infiniteLoop&&O&&(h.selectedItem===0&&P>-100?P-=y*100:h.selectedItem===y-1&&P<-y*100&&(P+=y*100)),(!g.preventMovementUntilSwipeScrollTolerance||O||h.swipeMovementStarted)&&(h.swipeMovementStarted||p({swipeMovementStarted:!0}),m.itemListStyle=(0,n.setPosition)(P,g.axis)),O&&!h.cancelClick&&p({cancelClick:!0}),m};Wn.slideSwipeAnimationHandler=s;var u=function(f,g){var h=(0,n.getPosition)(g.selectedItem,f),p=(0,n.setPosition)(h,f.axis);return{itemListStyle:p}};Wn.slideStopSwipingHandler=u;var c=function(f,g){var h=f.transitionTime+"ms",p="ease-in-out",m={position:"absolute",display:"block",zIndex:-2,minHeight:"100%",opacity:0,top:0,right:0,left:0,bottom:0,transitionTimingFunction:p,msTransitionTimingFunction:p,MozTransitionTimingFunction:p,WebkitTransitionTimingFunction:p,OTransitionTimingFunction:p};return g.swiping||(m=i(i({},m),{},{WebkitTransitionDuration:h,MozTransitionDuration:h,OTransitionDuration:h,transitionDuration:h,msTransitionDuration:h})),{slideStyle:m,selectedStyle:i(i({},m),{},{opacity:1,position:"relative"}),prevStyle:i({},m)}};return Wn.fadeAnimationHandler=c,Wn}var ec;function d0(){if(ec)return Xo;ec=1,Object.defineProperty(Xo,"__esModule",{value:!0}),Xo.default=void 0;var e=c(Ct),t=s(hf()),n=s(pf()),r=s(mf()),o=s(u0()),i=s(gf()),a=vf(),l=c0();function s(T){return T&&T.__esModule?T:{default:T}}function u(){if(typeof WeakMap!="function")return null;var T=new WeakMap;return u=function(){return T},T}function c(T){if(T&&T.__esModule)return T;if(T===null||f(T)!=="object"&&typeof T!="function")return{default:T};var R=u();if(R&&R.has(T))return R.get(T);var M={},D=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var k in T)if(Object.prototype.hasOwnProperty.call(T,k)){var X=D?Object.getOwnPropertyDescriptor(T,k):null;X&&(X.get||X.set)?Object.defineProperty(M,k,X):M[k]=T[k]}return M.default=T,R&&R.set(T,M),M}function f(T){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(R){return typeof R}:f=function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R},f(T)}function g(){return g=Object.assign||function(T){for(var R=1;R<arguments.length;R++){var M=arguments[R];for(var D in M)Object.prototype.hasOwnProperty.call(M,D)&&(T[D]=M[D])}return T},g.apply(this,arguments)}function h(T,R){var M=Object.keys(T);if(Object.getOwnPropertySymbols){var D=Object.getOwnPropertySymbols(T);R&&(D=D.filter(function(k){return Object.getOwnPropertyDescriptor(T,k).enumerable})),M.push.apply(M,D)}return M}function p(T){for(var R=1;R<arguments.length;R++){var M=arguments[R]!=null?arguments[R]:{};R%2?h(Object(M),!0).forEach(function(D){x(T,D,M[D])}):Object.getOwnPropertyDescriptors?Object.defineProperties(T,Object.getOwnPropertyDescriptors(M)):h(Object(M)).forEach(function(D){Object.defineProperty(T,D,Object.getOwnPropertyDescriptor(M,D))})}return T}function m(T,R){if(!(T instanceof R))throw new TypeError("Cannot call a class as a function")}function w(T,R){for(var M=0;M<R.length;M++){var D=R[M];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(T,D.key,D)}}function y(T,R,M){return R&&w(T.prototype,R),T}function v(T,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function");T.prototype=Object.create(R&&R.prototype,{constructor:{value:T,writable:!0,configurable:!0}}),R&&C(T,R)}function C(T,R){return C=Object.setPrototypeOf||function(M,D){return M.__proto__=D,M},C(T,R)}function E(T){var R=P();return function(){var M=O(T),D;if(R){var k=O(this).constructor;D=Reflect.construct(M,arguments,k)}else D=M.apply(this,arguments);return I(this,D)}}function I(T,R){return R&&(f(R)==="object"||typeof R=="function")?R:S(T)}function S(T){if(T===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T}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 O(T){return O=Object.setPrototypeOf?Object.getPrototypeOf:function(R){return R.__proto__||Object.getPrototypeOf(R)},O(T)}function x(T,R,M){return R in T?Object.defineProperty(T,R,{value:M,enumerable:!0,configurable:!0,writable:!0}):T[R]=M,T}var A=(function(T){v(M,T);var R=E(M);function M(D){var k;m(this,M),k=R.call(this,D),x(S(k),"thumbsRef",void 0),x(S(k),"carouselWrapperRef",void 0),x(S(k),"listRef",void 0),x(S(k),"itemsRef",void 0),x(S(k),"timer",void 0),x(S(k),"animationHandler",void 0),x(S(k),"setThumbsRef",function($){k.thumbsRef=$}),x(S(k),"setCarouselWrapperRef",function($){k.carouselWrapperRef=$}),x(S(k),"setListRef",function($){k.listRef=$}),x(S(k),"setItemsRef",function($,K){k.itemsRef||(k.itemsRef=[]),k.itemsRef[K]=$}),x(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)))}),x(S(k),"clearAutoPlay",function(){k.timer&&clearTimeout(k.timer)}),x(S(k),"resetAutoPlay",function(){k.clearAutoPlay(),k.autoPlay()}),x(S(k),"stopOnHover",function(){k.setState({isMouseEntered:!0},k.clearAutoPlay)}),x(S(k),"startOnLeave",function(){k.setState({isMouseEntered:!1},k.autoPlay)}),x(S(k),"isFocusWithinTheCarousel",function(){return k.carouselWrapperRef?!!((0,o.default)().activeElement===k.carouselWrapperRef||k.carouselWrapperRef.contains((0,o.default)().activeElement)):!1}),x(S(k),"navigateWithKeyboard",function($){if(k.isFocusWithinTheCarousel()){var K=k.props.axis,ie=K==="horizontal",ee={ArrowUp:38,ArrowRight:39,ArrowDown:40,ArrowLeft:37},J=ie?ee.ArrowRight:ee.ArrowDown,ge=ie?ee.ArrowLeft:ee.ArrowUp;J===$.keyCode?k.increment():ge===$.keyCode&&k.decrement()}}),x(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()}}}),x(S(k),"setMountState",function(){k.setState({hasMount:!0}),k.updateSizes()}),x(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:$})}}),x(S(k),"handleOnChange",function($,K){e.Children.count(k.props.children)<=1||k.props.onChange($,K)}),x(S(k),"handleClickThumb",function($,K){k.props.onClickThumb($,K),k.moveTo($)}),x(S(k),"onSwipeStart",function($){k.setState({swiping:!0}),k.props.onSwipeStart($)}),x(S(k),"onSwipeEnd",function($){k.setState({swiping:!1,cancelClick:!1,swipeMovementStarted:!1}),k.props.onSwipeEnd($),k.clearAutoPlay(),k.state.autoPlay&&k.autoPlay()}),x(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(p({},ie)),!!Object.keys(ie).length}),x(S(k),"decrement",function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;k.moveTo(k.state.selectedItem-(typeof $=="number"?$:1))}),x(S(k),"increment",function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;k.moveTo(k.state.selectedItem+(typeof $=="number"?$:1))}),x(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()}}),x(S(k),"onClickNext",function(){k.increment(1)}),x(S(k),"onClickPrev",function(){k.decrement(1)}),x(S(k),"onSwipeForward",function(){k.increment(1),k.props.emulateTouch&&k.setState({cancelClick:!0})}),x(S(k),"onSwipeBackwards",function(){k.decrement(1),k.props.emulateTouch&&k.setState({cancelClick:!0})}),x(S(k),"changeItem",function($){return function(K){(!(0,a.isKeyboardEvent)(K)||K.key==="Enter")&&k.moveTo($)}}),x(S(k),"selectItem",function($){k.setState(p({previousItem:k.state.selectedItem},$),function(){k.setState(k.animationHandler(k.props,k.state))}),k.handleOnChange($.selectedItem,e.Children.toArray(k.props.children)[$.selectedItem])}),x(S(k),"getInitialImage",function(){var $=k.props.selectedItem,K=k.itemsRef&&k.itemsRef[$],ie=K&&K.getElementsByTagName("img")||[];return ie[0]}),x(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 J=function de(){k.forceUpdate(),ee.removeEventListener("load",de)};ee.addEventListener("load",J)}}var ge=ie[0]||K.children[0],oe=ge.clientHeight;return oe>0?oe:null}return null});var X={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=p(p({},X),k.animationHandler(D,X)),k}return y(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(p({},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(X,$){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=p(p({},ee),{},{minWidth:k.props.centerSlidePercentage+"%"})),k.state.swiping&&k.state.swipeMovementStarted&&(ee=p(p({},ee),{},{pointerEvents:"none"}));var J={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,$,X),style:ee};return e.default.createElement("li",J,k.props.renderItem(X,{isSelected:$===k.state.selectedItem,isPrevious:$===k.state.previousItem}))}):[]}},{key:"renderControls",value:function(){var D=this,k=this.props,X=k.showIndicators,$=k.labels,K=k.renderIndicator,ie=k.children;return X?e.default.createElement("ul",{className:"control-dots"},e.Children.map(ie,function(ee,J){return K&&K(D.changeItem(J),J===D.state.selectedItem,J,$.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,X=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),J=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(X){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=p(p({},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&&J):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&&J)),this.props.renderArrowNext(this.onClickNext,ie,this.props.labels.rightArrow),this.renderStatus()),this.renderThumbs())}}]),M})(e.default.Component);return Xo.default=A,x(A,"displayName","Carousel"),x(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(T,R,M){return e.default.createElement("button",{type:"button","aria-label":M,className:n.default.ARROW_PREV(!R),onClick:T})},renderArrowNext:function(T,R,M){return e.default.createElement("button",{type:"button","aria-label":M,className:n.default.ARROW_NEXT(!R),onClick:T})},renderIndicator:function(T,R,M,D){return e.default.createElement("li",{className:n.default.DOT(R),onClick:T,onKeyDown:T,value:M,key:M,role:"button",tabIndex:0,"aria-label":"".concat(D," ").concat(M+1)})},renderItem:function(T){return T},renderThumbs:function(T){var R=e.Children.map(T,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 R.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"),[]):R},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}),Xo}var f0={};function h0(){return f0}var tc;function p0(){return tc||(tc=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(d0()),n=h0(),r=o(mf());function o(i){return i&&i.__esModule?i:{default:i}}})(ju)),ju}var g0=p0(),cl,nc;function m0(){if(nc)return cl;nc=1;var e=wm(),t=function(){return e.Date.now()};return cl=t,cl}var dl,rc;function v0(){if(rc)return dl;rc=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return dl=t,dl}var fl,oc;function b0(){if(oc)return fl;oc=1;var e=v0(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return fl=n,fl}var hl,ic;function Ts(){if(ic)return hl;ic=1;var e=b0(),t=Da(),n=ym(),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 f=i.test(u);return f||a.test(u)?l(u.slice(2),f?2:8):o.test(u)?r:+u}return hl=s,hl}var pl,ac;function bf(){if(ac)return pl;ac=1;var e=Da(),t=m0(),n=Ts(),r="Expected a function",o=Math.max,i=Math.min;function a(l,s,u){var c,f,g,h,p,m,w=0,y=!1,v=!1,C=!0;if(typeof l!="function")throw new TypeError(r);s=n(s)||0,e(u)&&(y=!!u.leading,v="maxWait"in u,g=v?o(n(u.maxWait)||0,s):g,C="trailing"in u?!!u.trailing:C);function E(M){var D=c,k=f;return c=f=void 0,w=M,h=l.apply(k,D),h}function I(M){return w=M,p=setTimeout(O,s),y?E(M):h}function S(M){var D=M-m,k=M-w,X=s-D;return v?i(X,g-k):X}function P(M){var D=M-m,k=M-w;return m===void 0||D>=s||D<0||v&&k>=g}function O(){var M=t();if(P(M))return x(M);p=setTimeout(O,S(M))}function x(M){return p=void 0,C&&c?E(M):(c=f=void 0,h)}function A(){p!==void 0&&clearTimeout(p),w=0,c=m=f=p=void 0}function T(){return p===void 0?h:x(t())}function R(){var M=t(),D=P(M);if(c=arguments,f=this,m=M,D){if(p===void 0)return I(m);if(v)return clearTimeout(p),p=setTimeout(O,s),E(m)}return p===void 0&&(p=setTimeout(O,s)),h}return R.cancel=A,R.flush=T,R}return pl=a,pl}var y0=bf();const yf=Er(y0);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 Cr(e,t){return e===void 0?void 0:t}const w0=Math.PI;function lc(e){return e*w0/180}const wf=(e,t,n)=>({x1:e-n/2,y1:t-n/2,x2:e+n/2,y2:t+n/2}),xf=(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}},Cf=(e,t,n)=>Math.min(e,t-n*2),kf=(e,t,n)=>n.x1<=e&&e<=n.x2&&n.y1<=t&&t<=n.y2,Os=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"}))},x0=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 C0(e,t,n){const[r,o]=d.useState(e),i=d.useRef(!0);d.useEffect(()=>()=>{i.current=!1},[]);const a=d.useRef(yf(l=>{i.current&&o(l)},n));return d.useLayoutEffect(()=>{i.current&&a.current(()=>e())},t),r}const k0="֑-߿יִ-﷽ﹰ-ﻼ",S0="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",M0=new RegExp("^[^"+S0+"]*["+k0+"]");function Ds(e){return M0.test(e)?"rtl":"not-rtl"}let Xi;function as(){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 _r=Symbol();function R0(e){const t=d.useRef([_r,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!==_r&&(l=typeof l=="function"?l(s):l,l===s)||(s!==_r&&o({}),r(u=>typeof l=="function"?l(s===_r?u:s):l),t.current[0]=_r)},[]),a=d.useCallback(()=>{t.current[0]=_r,o({})},[]);return[t.current[0]===_r?n:t.current[0],i,a]}function Sf(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 E0(e){const t=d.useRef(e);return Io(e,t.current)||(t.current=e),t.current}const I0=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(a0,{"data-testid":"GDG-default-image-overlay-editor"},d.createElement(g0.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(Os,null)))};function Ps(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Xr=Ps();function Mf(e){Xr=e}const Rf=/[&<>"']/,T0=new RegExp(Rf.source,"g"),Ef=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,O0=new RegExp(Ef.source,"g"),D0={"&":"&","<":"<",">":">",'"':""","'":"'"},sc=e=>D0[e];function Dn(e,t){if(t){if(Rf.test(e))return e.replace(T0,sc)}else if(Ef.test(e))return e.replace(O0,sc);return e}const P0=/(^|[^\[])\^/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(P0,"$1"),n=n.replace(o,a),r},getRegex:()=>new RegExp(n,t)};return r}function uc(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const ci={exec:()=>null};function cc(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 A0(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 dc(e,t,n,r){const o=t.href,i=t.title?Dn(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:Dn(a)}}function H0(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||Xr}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=H0(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
|
+
`),f=c.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,`
|
|
10
|
+
$1`).replace(/^ {0,3}>[ \t]?/gm,"");o=o?`${o}
|
|
11
|
+
${c}`:c,i=i?`${i}
|
|
12
|
+
${f}`:f;const g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(f,a,!0),this.lexer.state.top=g,r.length===0)break;const h=a[a.length-1];if(h?.type==="code")break;if(h?.type==="blockquote"){const p=h,m=p.raw+`
|
|
13
|
+
`+r.join(`
|
|
14
|
+
`),w=this.blockquote(m);a[a.length-1]=w,o=o.substring(0,o.length-p.raw.length)+w.raw,i=i.substring(0,i.length-p.text.length)+w.text;break}else if(h?.type==="list"){const p=h,m=p.raw+`
|
|
15
|
+
`+r.join(`
|
|
16
|
+
`),w=this.list(m);a[a.length-1]=w,o=o.substring(0,o.length-h.raw.length)+w.raw,i=i.substring(0,i.length-p.raw.length)+w.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 f=n[2].split(`
|
|
18
|
+
`,1)[0].replace(/^\t+/,y=>" ".repeat(3*y.length)),g=t.split(`
|
|
19
|
+
`,1)[0],h=!f.trim(),p=0;if(this.options.pedantic?(p=2,c=f.trimStart()):h?p=n[1].length+1:(p=n[2].search(/[^ ]/),p=p>4?1:p,c=f.slice(p),p+=n[1].length),h&&/^ *$/.test(g)&&(u+=g+`
|
|
20
|
+
`,t=t.substring(g.length+1),s=!0),!s){const y=new RegExp(`^ {0,${Math.min(3,p-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),v=new RegExp(`^ {0,${Math.min(3,p-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),C=new RegExp(`^ {0,${Math.min(3,p-1)}}(?:\`\`\`|~~~)`),E=new RegExp(`^ {0,${Math.min(3,p-1)}}#`);for(;t;){const I=t.split(`
|
|
21
|
+
`,1)[0];if(g=I,this.options.pedantic&&(g=g.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),C.test(g)||E.test(g)||y.test(g)||v.test(t))break;if(g.search(/[^ ]/)>=p||!g.trim())c+=`
|
|
22
|
+
`+g.slice(p);else{if(h||f.search(/[^ ]/)>=4||C.test(f)||E.test(f)||v.test(f))break;c+=`
|
|
23
|
+
`+g}!h&&!g.trim()&&(h=!0),u+=I+`
|
|
24
|
+
`,t=t.substring(I.length+1),f=g.slice(p)}}i.loose||(l?i.loose=!0:/\n *\n *$/.test(u)&&(l=!0));let m=null,w;this.options.gfm&&(m=/^\[[ xX]\] /.exec(c),m&&(w=m[0]!=="[ ] ",c=c.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:u,task:!!m,checked:w,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(f=>f.type==="space"),c=u.length>0&&u.some(f=>/\n.*\n/.test(f.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=cc(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(cc(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:Dn(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=A0(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)),dc(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 dc(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 f=[...o[0]][0].length,g=t.slice(0,i+o.index+f+l);if(Math.min(i,l)%2){const p=g.slice(1,-1);return{type:"em",raw:g,text:p,tokens:this.lexer.inlineTokens(p)}}const h=g.slice(2,-2);return{type:"strong",raw:g,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(/\n/g," ");const o=/[^ ]/.test(r),i=/^ /.test(r)&&/ $/.test(r);return o&&i&&(r=r.substring(1,r.length-1)),r=Dn(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=Dn(n[1]),o="mailto:"+r):(r=Dn(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=Dn(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=Dn(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=Dn(n[0]),{type:"text",raw:n[0],text:r}}}}const z0=/^(?: *(?:\n|$))+/,F0=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,L0=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Si=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,V0=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,If=/(?:[*+-]|\d{1,9}[.)])/,Tf=Pt(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,If).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(),As=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,$0=/^[^\n]+/,Hs=/(?!\s*\])(?:\\.|[^\[\]\\])+/,_0=Pt(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",Hs).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),B0=Pt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,If).getRegex(),Pa="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",zs=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,N0=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",zs).replace("tag",Pa).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Of=Pt(As).replace("hr",Si).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",Pa).getRegex(),j0=Pt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Of).getRegex(),Fs={blockquote:j0,code:F0,def:_0,fences:L0,heading:V0,hr:Si,html:N0,lheading:Tf,list:B0,newline:z0,paragraph:Of,table:ci,text:$0},fc=Pt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Si).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",Pa).getRegex(),W0={...Fs,table:fc,paragraph:Pt(As).replace("hr",Si).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",Pa).getRegex()},U0={...Fs,html:Pt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",zs).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(As).replace("hr",Si).replace("heading",` *#{1,6} *[^
|
|
27
|
+
]`).replace("lheading",Tf).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Df=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Y0=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Pf=/^( {2,}|\\)\n(?!\s*$)/,X0=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Mi="\\p{P}\\p{S}",Z0=Pt(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,Mi).getRegex(),q0=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,K0=Pt(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Mi).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,Mi).getRegex(),Q0=Pt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Mi).getRegex(),G0=Pt(/\\([punct])/,"gu").replace(/punct/g,Mi).getRegex(),ev=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(),tv=Pt(zs).replace("(?:-->|$)","-->").getRegex(),nv=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",tv).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),va=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,rv=Pt(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",va).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Af=Pt(/^!?\[(label)\]\[(ref)\]/).replace("label",va).replace("ref",Hs).getRegex(),Hf=Pt(/^!?\[(ref)\](?:\[\])?/).replace("ref",Hs).getRegex(),ov=Pt("reflink|nolink(?!\\()","g").replace("reflink",Af).replace("nolink",Hf).getRegex(),Ls={_backpedal:ci,anyPunctuation:G0,autolink:ev,blockSkip:q0,br:Pf,code:Y0,del:ci,emStrongLDelim:K0,emStrongRDelimAst:J0,emStrongRDelimUnd:Q0,escape:Df,link:rv,nolink:Hf,punctuation:Z0,reflink:Af,reflinkSearch:ov,tag:nv,text:X0,url:ci},iv={...Ls,link:Pt(/^!?\[(label)\]\((.*?)\)/).replace("label",va).getRegex(),reflink:Pt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",va).getRegex()},ls={...Ls,escape:Pt(Df).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.!#$%&'*+\/=?_`{\|}~-]+@)))/},av={...ls,br:Pt(Pf).replace("{2,}","*").getRegex(),text:Pt(ls.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Zi={normal:Fs,gfm:W0,pedantic:U0},ti={normal:Ls,gfm:ls,breaks:av,pedantic:iv};class or{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Xr,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:Zi.normal,inline:ti.normal};this.options.pedantic?(n.block=Zi.pedantic,n.inline=ti.pedantic):this.options.gfm&&(n.block=Zi.gfm,this.options.breaks?n.inline=ti.breaks:n.inline=ti.gfm),this.tokenizer.rules=n}static get rules(){return{block:Zi,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 f=t.slice(1);let g;this.options.extensions.startInline.forEach(h=>{g=h.call({lexer:this},f),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||Xr}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-'+Dn(o)+'">'+(r?i:Dn(i,!0))+`</code></pre>
|
|
39
|
+
`:"<pre><code>"+(r?i:Dn(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=uc(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=uc(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 Vs{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||Xr,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 Vs}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 aa{options;constructor(t){this.options=t||Xr}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}}class lv{defaults=Ps();options=this.setOptions;parse=this.parseMarkdown(or.lex,ir.parse);parseInline=this.parseMarkdown(or.lexInline,ir.parseInline);Parser=ir;Renderer=ba;TextRenderer=Vs;Lexer=or;Tokenizer=ma;Hooks=aa;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 f=s.apply(i,c);return f===!1&&(f=u.apply(i,c)),f||""}}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 f=s.apply(i,c);return f===!1&&(f=u.apply(i,c)),f}}o.tokenizer=i}if(r.hooks){const i=this.defaults.hooks||new aa;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];aa.passThroughHooks.has(a)?i[l]=c=>{if(this.defaults.async)return Promise.resolve(s.call(i,c)).then(g=>u.call(i,g));const f=s.call(i,c);return u.call(i,f)}:i[l]=(...c)=>{let f=s.apply(i,c);return f===!1&&(f=u.apply(i,c)),f}}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>"+Dn(r.message+"",!0)+"</pre>";return n?Promise.resolve(o):o}if(n)return Promise.reject(r);throw r}}}const Wr=new lv;function Et(e,t){return Wr.parse(e,t)}Et.options=Et.setOptions=function(e){return Wr.setOptions(e),Et.defaults=Wr.defaults,Mf(Et.defaults),Et};Et.getDefaults=Ps;Et.defaults=Xr;Et.use=function(...e){return Wr.use(...e),Et.defaults=Wr.defaults,Mf(Et.defaults),Et};Et.walkTokens=function(e,t){return Wr.walkTokens(e,t)};Et.parseInline=Wr.parseInline;Et.Parser=ir;Et.parser=ir.parse;Et.Renderer=ba;Et.TextRenderer=Vs;Et.Lexer=or;Et.lexer=or.lex;Et.Tokenizer=ma;Et.Hooks=aa;Et.parse=Et;Et.options;Et.setOptions;Et.use;Et.walkTokens;Et.parseInline;ir.parse;or.lex;const sv=dn("div")({name:"MarkdownContainer",class:"gdg-mnuv029",propsAsIs:!1});class uv extends Ct.PureComponent{targetElement=null;renderMarkdownIntoDiv(){const{targetElement:t,props:n}=this;if(t===null)return;const{contents:r,createNode:o}=n,i=Et(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(sv,{ref:this.containerRefHook})}}const cv=dn("textarea")({name:"InputBox",class:"gdg-izpuzkl",propsAsIs:!1}),dv=dn("div")({name:"ShadowBox",class:"gdg-s69h75o",propsAsIs:!1}),fv=dn("div")({name:"GrowingEntryStyle",class:"gdg-g1y0xocz",propsAsIs:!1});let hc=0;const Zr=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),f=n??"";Pn(s!==void 0,"GrowingEntry must be a controlled input area");const[g]=d.useState(()=>"input-box-"+(hc=(hc+1)%1e7));d.useEffect(()=>{const p=c.current;if(p===null||p.disabled)return;const m=f.toString().length;p.focus(),p.setSelectionRange(o?0:m,m)},[]),d.useLayoutEffect(()=>{if(a!==void 0){const p=typeof a=="number"?[a,null]:a;c.current?.setSelectionRange(p[0],p[1])}},[a]);const h=d.useCallback(p=>{p.key==="Enter"&&p.shiftKey&&i===!0||r?.(p)},[i,r]);return d.createElement(fv,{className:"gdg-growing-entry"},d.createElement(dv,{className:u},f+`
|
|
58
|
+
`),d.createElement(cv,{...l,className:(u??"")+" gdg-input",id:g,ref:c,onKeyDown:h,value:f,placeholder:t,dir:"auto"}))},gl={};let wr=null;function hv(){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(gl[t]!==void 0)return gl[t];wr=wr||hv(),wr.style.color="#000",wr.style.color=t;const n=getComputedStyle(wr).color;wr.style.color="#fff",wr.style.color=t;const r=getComputedStyle(wr).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),gl[t]=o,o}function Ur(e,t){const[n,r,o]=mi(e);return`rgba(${n}, ${r}, ${o}, ${t})`}const pc=new Map;function gc(e,t){const n=`${e}-${t}`,r=pc.get(n);if(r!==void 0)return r;const o=An(e,t);return pc.set(n,o),o}function An(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),f=(i*n+u*a*(1-i))/c,g=(i*r+u*l*(1-i))/c,h=(i*o+u*s*(1-i))/c;return`rgba(${f}, ${g}, ${h}, ${c})`}function ss(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 Co=new Map,So=new Map,us=new Map;function pv(){Co.clear(),us.clear(),So.clear()}function gv(e,t,n,r,o){var i,a,l;let s=0,u={};for(let f of e)s+=(i=n.get(f))!=null?i:o,u[f]=((a=u[f])!=null?a:0)+1;let c=t-s;for(let f of Object.keys(u)){let g=u[f],h=(l=n.get(f))!=null?l:o,p=h*g/s,m=c*p*r/g,w=h+m;n.set(f,w)}}function mv(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=So.get(n);if(r&&a!==void 0&&a.count>2e4){let u=us.get(n);if(u===void 0&&(u=mv(e,a.size),us.set(n,u)),a.count>5e5){let f=0;for(let g of t)f+=(o=u.get(g))!=null?o:a.size;return f*1.01}let c=e.measureText(t);return gv(t,c.width,u,Math.max(.05,1-a.count/2e5),a.size),So.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)So.set(n,{count:t.length,size:s});else{let u=s-a.size,c=t.length/(a.count+t.length),f=a.size+u*c;So.set(n,{count:a.count+t.length,size:f})}return l.width}function vv(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 bv(e,t,n,r,o,i){let a=`${t}_${n}_${r}px`,l=Co.get(a);if(l!==void 0)return l;if(r<=0)return[];let s=[],u=t.split(`
|
|
59
|
+
`),c=So.get(n),f=c===void 0?t.length:r/c.size*1.5,g=o&&c!==void 0&&c.count>2e4;for(let h of u){let p=di(e,h.slice(0,Math.max(0,f)),n,g),m=Math.min(h.length,f);if(p<=r)s.push(h);else{for(;p>r;){let w=vv(e,h,r,n,p,m,g),y=h.slice(0,Math.max(0,w));h=h.slice(y.length),s.push(y),p=di(e,h.slice(0,Math.max(0,f)),n,g),m=Math.min(h.length,f)}p>0&&s.push(h)}}return s=s.map((h,p)=>p===0?h.trimEnd():h.trim()),Co.set(a,s),Co.size>500&&Co.delete(Co.keys().next().value),s}function yv(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 wv(e,t){const[n,r]=t;if(e.columns.hasIndex(n)||e.rows.hasIndex(r))return!0;if(e.current!==void 0){if(fi(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 xv(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 zf(e,t){const[n,r]=e;return n>=t.x&&n<t.x+t.width&&r>=t.y&&r<t.y+t.height}function fi(e,t){return e?.[0]===t?.[0]&&e?.[1]===t?.[1]}function Ff(e){return[e.x+e.width-1,e.y+e.height-1]}function mc(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 Cv(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)&&mc(e,t,i)&&o++;for(const a of n.current.rangeStack)mc(e,t,a)&&o++;return o}function Lf(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 To(e,t){let n=0;const r=Lf(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 qr(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 cs(e,t,n,r,o){const i=Lf(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 kv(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 Sv(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 f=t;for(let p=0;p<u;p++){const m=i-1-p,w=typeof a=="number"?a:a(m);if(f-=w,e>=f)return m}const g=i-u,h=e-(s??0);if(typeof a=="number"){const p=Math.floor((h-c)/a)+l;return p>=g?void 0:p}else{let p=c;for(let m=l;m<g;m++){const w=a(m);if(h<=p+w)return m;p+=w}return}}let la=0,hi={};const Mv=typeof window>"u";async function Rv(){Mv||document?.fonts?.ready===void 0||(await document.fonts.ready,la=0,hi={},pv())}Rv();function Vf(e,t,n,r){return`${e}_${r??t?.font}_${n}`}function Ir(e,t,n,r="middle"){const o=Vf(e,t,r,n);let i=hi[o];return i===void 0&&(i=t.measureText(e),hi[o]=i,la++),la>1e4&&(hi={},la=0),i}function $f(e,t){const n=Vf(e,void 0,"middle",t);return hi[n]}function qn(e,t){return typeof t!="string"&&(t=t.baseFontFull),Ev(e,t)}function vc(e,t){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZ";e.save(),e.textBaseline=t;const r=e.measureText(n);return e.restore(),r}const bc=[];function Ev(e,t){for(const o of bc)if(o.key===t)return o.val;const n=vc(e,"alphabetic"),r=-(vc(e,"middle").actualBoundingBoxDescent-n.actualBoundingBoxDescent)+n.actualBoundingBoxAscent/2;return bc.push({key:t,val:r}),r}function Iv(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 f=1-u/c;a.globalAlpha=f,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 Ri(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 _f(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 _s(e,t){const n=Ir("ABCi09jgqpy",e,t);return n.actualBoundingBoxAscent+n.actualBoundingBoxDescent}function Tv(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 Ov(e,t,n,r,o,i,a,l,s,u){const c=l.baseFontFull,f=bv(e,t,c,o-l.cellHorizontalPadding*2,u??!1),g=_s(e,c),h=l.lineHeight*g,p=g+h*(f.length-1),m=p+l.cellVerticalPadding>i;m&&(e.save(),e.rect(n,r,o,i),e.clip());const w=r+i/2-p/2;let y=Math.max(r+l.cellVerticalPadding,w);for(const v of f)if(_f(e,v,n,y,o,g,a,l,s),y+=h,y>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:f}=a;r=r??!1,r||(t=Tv(t,c));const g=qn(i,l),h=Ds(t)==="rtl";if(n===void 0&&h&&(n="right"),h&&(i.direction="rtl"),t.length>0){let p=!1;n==="right"?(i.textAlign="right",p=!0):n!==void 0&&n!=="left"&&(i.textAlign=n,p=!0),r?Ov(i,t,s,u,c,f,g,l,n,o):_f(i,t,s,u,c,f,g,l,n),p&&(i.textAlign="start"),h&&(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 Dv(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 Pv(e,t,n){const r=function(l,s){const u=s.x-l.x,c=s.y-l.y,f=Math.sqrt(u*u+c*c),g=u/f,h=c/f;return{x:u,y:s.y-l.y,len:f,nx:g,ny:h,ang:Math.atan2(h,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),f=r(s,u),g=c.nx*f.ny-c.ny*f.nx,h=c.nx*f.nx-c.ny*-f.ny;let p=Math.asin(g<-1?-1:g>1?1:g),m=1,w=!1;h<0?p<0?p=Math.PI+p:(p=Math.PI-p,m=-1,w=!0):p>0&&(m=-1,w=!0),o=s.radius!==void 0?s.radius:n;const y=p/2;let v=Math.abs(Math.cos(y)*o/Math.sin(y)),C;v>Math.min(c.len/2,f.len/2)?(v=Math.min(c.len/2,f.len/2),C=Math.abs(v*Math.sin(y)/Math.cos(y))):C=o;let E=s.x+f.nx*v,I=s.y+f.ny*v;E+=-f.ny*C*m,I+=f.nx*C*m,e.arc(E,I,C,c.ang+Math.PI/2*m,f.ang-Math.PI/2*m,w),a=s,s=u}e.closePath()}function ds(e,t,n,r,o,i,a,l,s,u,c,f,g,h,p){const m={x:0,y:i+u,width:0,height:0};if(e>=h.length||t>=c||t<-2||e<0)return m;const w=i-o;if(e>=f){const y=a>e?-1:1,v=To(h);m.x+=v+s;for(let C=a;C!==e;C+=y)m.x+=h[y===1?C:C-1].width*y}else for(let y=0;y<e;y++)m.x+=h[y].width;if(m.width=h[e].width+1,t===-1)m.y=o,m.height=w;else if(t===-2){m.y=0,m.height=o;let y=e;const v=h[e].group,C=h[e].sticky;for(;y>0&&vi(h[y-1].group,v)&&h[y-1].sticky===C;){const I=h[y-1];m.x-=I.width,m.width+=I.width,y--}let E=e;for(;E+1<h.length&&vi(h[E+1].group,v)&&h[E+1].sticky===C;){const I=h[E+1];m.width+=I.width,E++}if(!C){const I=To(h),S=m.x-I;S<0&&(m.x-=S,m.width+=S),m.x+m.width>n&&(m.width=n-m.x)}}else if(t>=c-g){let y=c-t;for(m.y=r;y>0;){const v=t+y-1;m.height=typeof p=="number"?p:p(v),m.y-=m.height,y--}m.height+=1}else{const y=l>t?-1:1;if(typeof p=="number"){const v=t-l;m.y+=v*p}else for(let v=l;v!==t;v+=y)m.y+=p(v)*y;m.height=(typeof p=="number"?p:p(t))+1}return m}const Bs=1<<21;function Xn(e,t){return(t+2)*Bs+e}function Bf(e){return e%Bs}function Ns(e){return Math.floor(e/Bs)-2}function js(e){const t=Bf(e),n=Ns(e);return[t,n]}class Nf{visibleWindow={x:0,y:0,width:0,height:0};freezeCols=0;freezeRows=[];isInWindow=t=>{const n=Bf(t),r=Ns(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&&Io(this.freezeRows,r)||(this.visibleWindow=t,this.freezeCols=n,this.freezeRows=r,this.clearOutOfWindow())}}class Av extends Nf{cache=new Map;setValue=(t,n)=>{this.cache.set(Xn(t[0],t[1]),n)};getValue=t=>this.cache.get(Xn(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=>Xn(n[0],n[1])))}add(t){this.cells.add(Xn(t[0],t[1]))}has(t){return t===void 0?!1:this.cells.has(Xn(t[0],t[1]))}remove(t){this.cells.delete(Xn(t[0],t[1]))}clear(){this.cells.clear()}get size(){return this.cells.size}hasHeader(){for(const t of this.cells)if(Ns(t)<0)return!0;return!1}hasItemInRectangle(t){for(let n=t.y;n<t.y+t.height;n++)for(let r=t.x;r<t.x+t.width;r++)if(this.cells.has(Xn(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 js(t)}}function Hv(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 jf={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 Wf(){return jf}const Uf=Ct.createContext(jf);function Yf(){return Ct.useContext(Uf)}function hr(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]=An(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 Xf(e,t,n,r,o,i,a,l,s){let u=0;const c=o===void 0?[]:o.map(h=>{const p=zv(e,h[r],t,s);return u=Math.max(u,p),p});if(c.length>5&&l){u=0;let h=0;for(const m of c)h+=m;const p=h/c.length;for(let m=0;m<c.length;m++)c[m]>=p*2?c[m]=0:u=Math.max(u,c[m])}const f=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=f;const g=Math.max(Math.ceil(i),Math.min(Math.floor(a),Math.ceil(u)));return{...n,width:g}}function Fv(e,t,n,r,o,i,a,l,s){const u=d.useRef(t),c=d.useRef(n),f=d.useRef(a);u.current=t,c.current=n,f.current=a;const[g,h]=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 p=d.useRef({}),m=d.useRef(),[w,y]=d.useState();return d.useLayoutEffect(()=>{const v=c.current;if(v===void 0||e.every(Yi))return;let C=Math.max(1,10-Math.floor(e.length/1e4)),E=0;C<u.current&&C>1&&(C--,E=1);const I={x:0,y:0,width:e.length,height:Math.min(u.current,C)},S={x:0,y:u.current-1,width:e.length,height:1};(async()=>{const P=v(I,s.signal),O=E>0?v(S,s.signal):void 0;let x;typeof P=="object"?x=P:x=await _u(P),O!==void 0&&(typeof O=="object"?x=[...x,...O]:x=[...x,...await _u(O)]),m.current=e,y(x)})()},[s.signal,e]),d.useMemo(()=>{let v=e.every(Yi)?e:h===null?e.map(S=>Yi(S)?S:{...S,width:fs}):(h.font=f.current.baseFontFull,e.map((S,P)=>{if(Yi(S))return S;if(p.current[S.id]!==void 0)return{...S,width:p.current[S.id]};if(w===void 0||m.current!==e||S.id===void 0)return{...S,width:fs};const O=Xf(h,a,S,P,w,o,i,!0,l);return p.current[S.id]=O.width,O})),C=0,E=0;const I=[];for(const[S,P]of v.entries())C+=P.width,P.grow!==void 0&&P.grow>0&&(E+=P.grow,I.push(S));if(C<r&&I.length>0){const S=[...v],P=r-C;let O=P;for(let x=0;x<I.length;x++){const A=I[x],T=(v[A].grow??0)/E,R=x===I.length-1?O:Math.min(O,Math.floor(P*T));S[A]={...v[A],growOffset:R,width:v[A].width+R},O-=R}v=S}return{sizedColumns:v,nonGrowWidth:C}},[r,e,h,w,a,o,i,l])}var ml,yc;function Lv(){if(yc)return ml;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 ml=e,ml}var vl,wc;function Vv(){if(wc)return vl;wc=1;var e=Lv(),t=Ts();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 vl=n,vl}var $v=Vv();const $n=Er($v);var bl,xc;function _v(){if(xc)return bl;xc=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 bl=e,bl}var yl,Cc;function Bv(){if(Cc)return yl;Cc=1;function e(t){return t!==t}return yl=e,yl}var wl,kc;function Nv(){if(kc)return wl;kc=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 wl=e,wl}var xl,Sc;function jv(){if(Sc)return xl;Sc=1;var e=_v(),t=Bv(),n=Nv();function r(o,i,a){return i===i?n(o,i,a):e(o,t,a)}return xl=r,xl}var Cl,Mc;function Wv(){if(Mc)return Cl;Mc=1;var e=jv();function t(n,r){var o=n==null?0:n.length;return!!o&&e(n,r,0)>-1}return Cl=t,Cl}var kl,Rc;function Uv(){if(Rc)return kl;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 kl=e,kl}var Sl,Ec;function Yv(){if(Ec)return Sl;Ec=1;function e(){}return Sl=e,Sl}var Ml,Ic;function Xv(){if(Ic)return Ml;Ic=1;var e=km(),t=Yv(),n=af(),r=1/0,o=e&&1/n(new e([,-0]))[1]==r?function(i){return new e(i)}:t;return Ml=o,Ml}var Rl,Tc;function Zv(){if(Tc)return Rl;Tc=1;var e=Cm(),t=Wv(),n=Uv(),r=Om(),o=Xv(),i=af(),a=200;function l(s,u,c){var f=-1,g=t,h=s.length,p=!0,m=[],w=m;if(c)p=!1,g=n;else if(h>=a){var y=u?null:o(s);if(y)return i(y);p=!1,g=r,w=new e}else w=u?[]:m;e:for(;++f<h;){var v=s[f],C=u?u(v):v;if(v=c||v!==0?v:0,p&&C===C){for(var E=w.length;E--;)if(w[E]===C)continue e;u&&w.push(C),m.push(v)}else g(w,C,c)||(w!==m&&w.push(C),m.push(v))}return m}return Rl=l,Rl}var El,Oc;function qv(){if(Oc)return El;Oc=1;var e=Zv();function t(n){return n&&n.length?e(n):[]}return El=t,El}var Kv=qv();const Jv=Er(Kv);var Il,Dc;function Qv(){if(Dc)return Il;Dc=1;var e=Sm(),t=Mm(),n=lf(),r=e?e.isConcatSpreadable:void 0;function o(i){return n(i)||t(i)||!!(r&&i&&i[r])}return Il=o,Il}var Tl,Pc;function Gv(){if(Pc)return Tl;Pc=1;var e=Rm(),t=Qv();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 Tl=n,Tl}var Ol,Ac;function eb(){if(Ac)return Ol;Ac=1;var e=Gv();function t(n){var r=n==null?0:n.length;return r?e(n,1):[]}return Ol=t,Ol}var tb=eb();const Hc=Er(tb);var Dl,zc;function nb(){if(zc)return Dl;zc=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 Dl=n,Dl}var Pl,Fc;function rb(){if(Fc)return Pl;Fc=1;var e=vm(),t=mm(),n=bm(),r=Da();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 Pl=o,Pl}var Al,Lc;function ob(){if(Lc)return Al;Lc=1;var e=Ts(),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 Al=r,Al}var Hl,Vc;function ib(){if(Vc)return Hl;Vc=1;var e=nb(),t=rb(),n=ob();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 zl,$c;function ab(){if($c)return zl;$c=1;var e=ib(),t=e();return zl=t,zl}var lb=ab();const Mr=Er(lb),Ft='<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg">',sb=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>`},ub=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>`},cb=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>`},db=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>`},fb=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>`},Zf=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
|
+
`},hb=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
|
+
`},pb=Zf,gb=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>`},mb=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>`},vb=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>`},bb=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>`},yb=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>`},wb=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>`},xb=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>`},Cb=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>`},kb=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>`},Sb=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>`},Mb=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>`},Rb=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>`},Eb=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>`},Ib=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>`},Tb=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>`},Ob=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>`},Db=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>`},Pb=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>`},Ab=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>`},Hb=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
|
+
`},Fb={headerRowID:sb,headerNumber:cb,headerCode:ub,headerString:db,headerBoolean:fb,headerAudioUri:pb,headerVideoUri:gb,headerEmoji:mb,headerImage:vb,headerUri:Zf,headerPhone:bb,headerMarkdown:yb,headerDate:wb,headerTime:xb,headerEmail:Cb,headerReference:kb,headerIfThenElse:Sb,headerSingleValue:Mb,headerLookup:Rb,headerTextTemplate:Eb,headerMath:Ib,headerRollup:Tb,headerJoinStrings:Ob,headerSplitString:Db,headerGeoDistance:Pb,headerArray:Ab,rowOwnerOverlay:Hb,protectedColumnOverlay:zb,renameIcon:hb};function Lb(e,t){return e==="normal"?[t.bgIconHeader,t.fgIconHeader]:e==="selected"?["white",t.accentColor]:[t.accentColor,t.bgHeader]}class Vb{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]=Lb(n,l),f=a*Math.ceil(window.devicePixelRatio),g=`${u}_${c}_${f}_${t}`;let h=this.spriteMap.get(g);if(h===void 0){const p=this.headerIcons[t];if(p===void 0)return;h=document.createElement("canvas");const m=h.getContext("2d");if(m===null)return;const w=new Image;w.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(p({fgColor:c,bgColor:u}))}`,this.spriteMap.set(g,h);const y=w.decode();if(y===void 0)return;this.inFlight++,y.then(()=>{m.drawImage(w,0,0,f,f)}).finally(()=>{this.inFlight--,this.inFlight===0&&this.onSettled()})}else s<1&&(r.globalAlpha=s),r.drawImage(h,0,0,f,f,o,i,a,a),s<1&&(r.globalAlpha=1)}}function qf(e){if(e.length===0)return;let t;for(const n of e)t=Math.min(t??n.y,n.y);return t}function Aa(e,t,n,r,o,i,a,l,s){l=l??t;let u=t,c=e;const f=r-i;let g=!1;for(;u<n&&c<f;){const h=o(c);if(u+h>l&&s(u,c,h,!1,a&&c===r-1)===!0){g=!0;break}u+=h,c++}if(!g){u=n;for(let h=0;h<i;h++){c=r-1-h;const p=o(c);u-=p,s(u,c,p,!0,a&&c===r-1)}}}function Tr(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 Kf(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 f=s.sticky?0:n,g=i+f,h=s.sticky?0:Math.max(0,a-g),p=Math.min(c-h,t-(g+h));o([s.sourceIndex,e[u-1].sourceIndex],s.group??"",g+h,0,p,r),i+=c}}function Jf(e,t,n,r,o,i,a){const[l,s]=e;let u,c;const f=a.find(g=>!g.sticky)?.sourceIndex??0;if(s>f){const g=Math.max(l,f);let h=t,p=r;for(let m=i.sourceIndex-1;m>=g;m--)h-=a[m].width,p+=a[m].width;for(let m=i.sourceIndex+1;m<=s;m++)p+=a[m].width;c={x:h,y:n,width:p,height:o}}if(f>l){const g=Math.min(s,f-1);let h=t,p=r;for(let m=i.sourceIndex-1;m>=l;m--)h-=a[m].width,p+=a[m].width;for(let m=i.sourceIndex+1;m<=g;m++)p+=a[m].width;u={x:h,y:n,width:p,height:o}}return[u,c]}function $b(e,t,n,r){if(r==="any")return Qf(e,{x:t,y:n,width:1,height:1});if(r==="vertical"&&(t=e.x),r==="horizontal"&&(n=e.y),zf([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 jr(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height}function Qf(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 _b(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 Bb(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,f=e.y+e.height-l,g=s>0?e.x+Math.floor(s/r)*r:e.x,h=u>0?e.x+e.width-Math.floor(u/r)*r:e.x+e.width,p=c>0?e.y+Math.floor(c/r)*r:e.y,m=f>0?e.y+e.height-Math.floor(f/r)*r:e.y+e.height;return{x:g,y:p,width:h-g,height:m-p}}function Nb(e,t,n,r,o){const[i,a,l,s]=t,[u,c,f,g]=o,{x:h,y:p,width:m,height:w}=e,y=[];if(m<=0||w<=0)return y;const v=h+m,C=p+w,E=h<i,I=p<a,S=h+m>l,P=p+w>s,O=h>=i&&h<l||v>i&&v<=l||h<i&&v>l,x=p>=a&&p<s||C>a&&C<=s||p<a&&C>s;if(O&&x){const A=Math.max(h,i),T=Math.max(p,a),R=Math.min(v,l),M=Math.min(C,s);y.push({rect:{x:A,y:T,width:R-A,height:M-T},clip:{x:u,y:c,width:f-u+1,height:g-c+1}})}if(E&&I){const A=h,T=p,R=Math.min(v,i),M=Math.min(C,a);y.push({rect:{x:A,y:T,width:R-A,height:M-T},clip:{x:0,y:0,width:u+1,height:c+1}})}if(I&&O){const A=Math.max(h,i),T=p,R=Math.min(v,l),M=Math.min(C,a);y.push({rect:{x:A,y:T,width:R-A,height:M-T},clip:{x:u,y:0,width:f-u+1,height:c+1}})}if(I&&S){const A=Math.max(h,l),T=p,R=v,M=Math.min(C,a);y.push({rect:{x:A,y:T,width:R-A,height:M-T},clip:{x:f,y:0,width:n-f+1,height:c+1}})}if(E&&x){const A=h,T=Math.max(p,a),R=Math.min(v,i),M=Math.min(C,s);y.push({rect:{x:A,y:T,width:R-A,height:M-T},clip:{x:0,y:c,width:u+1,height:g-c+1}})}if(S&&x){const A=Math.max(h,l),T=Math.max(p,a),R=v,M=Math.min(C,s);y.push({rect:{x:A,y:T,width:R-A,height:M-T},clip:{x:f,y:c,width:n-f+1,height:g-c+1}})}if(E&&P){const A=h,T=Math.max(p,s),R=Math.min(v,i),M=C;y.push({rect:{x:A,y:T,width:R-A,height:M-T},clip:{x:0,y:g,width:u+1,height:r-g+1}})}if(P&&O){const A=Math.max(h,i),T=Math.max(p,s),R=Math.min(v,l),M=C;y.push({rect:{x:A,y:T,width:R-A,height:M-T},clip:{x:u,y:g,width:f-u+1,height:r-g+1}})}if(S&&P){const A=Math.max(h,l),T=Math.max(p,s),R=v,M=C;y.push({rect:{x:A,y:T,width:R-A,height:M-T},clip:{x:f,y:g,width:n-f+1,height:r-g+1}})}return y}const jb={kind:Q.Loading,allowOverlay:!1};function _c(e,t,n,r,o,i,a,l,s,u,c,f,g,h,p,m,w,y,v,C,E,I,S,P,O,x,A,T,R,M,D,k,X,$,K){let ie=C?.size??Number.MAX_SAFE_INTEGER;const ee=performance.now();let J=M.baseFontFull;e.font=J;const ge={ctx:e},oe=[0,0],de=w>0?qr(s,w,u):0;let pe,le;const V=qf(v);return Tr(t,l,i,a,o,(H,U,re,se,Oe)=>{const be=Math.max(0,se-U),Qe=U+be,Se=o+1,It=H.width-be,st=r-o-1;if(v.length>0){let Ae=!1;for(let He=0;He<v.length;He++){const rt=v[He];if(bi(Qe,Se,It,st,rt.x,rt.y,rt.width,rt.height)){Ae=!0;break}}if(!Ae)return}const Be=()=>{e.save(),e.beginPath(),e.rect(Qe,Se,It,st),e.clip()},ne=E.columns.hasIndex(H.sourceIndex),me=f(H.group??"").overrideTheme,ve=H.themeOverride===void 0&&me===void 0?M:hr(M,me,H.themeOverride),ce=ve.baseFontFull;ce!==J&&(J=ce,e.font=ce),Be();let ye;return Aa(Oe,re,r,s,u,w,y,V,(Ae,He,rt,De,we)=>{if(He<0||(oe[0]=H.sourceIndex,oe[1]=He,C!==void 0&&!C.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,Ae,H.width,rt,Tt.x,Tt.y,Tt.width,Tt.height)){Ee=!0;break}}if(!Ee)return}const ze=E.rows.hasIndex(He),ke=h.hasIndex(He),$e=He<s?c(oe):jb;let ut=U,dt=H.width,je=!1,ht=!1;if($e.span!==void 0){const[Ee,ct]=$e.span,Tt=`${He},${Ee},${ct},${H.sticky}`;if(le===void 0&&(le=new Set),le.has(Tt)){ie--;return}else{const vn=Jf($e.span,U,Ae,H.width,rt,H,n),tn=H.sticky?vn[0]:vn[1];if(!H.sticky&&vn[0]!==void 0&&(ht=!0),tn!==void 0){ut=tn.x,dt=tn.width,le.add(Tt),e.restore(),ye=void 0,e.save(),e.beginPath();const nn=Math.max(0,se-tn.x);e.rect(tn.x+nn,Ae,tn.width-nn,rt),pe===void 0&&(pe=[]),pe.push({x:tn.x+nn,y:Ae,width:tn.width-nn,height:rt}),e.clip(),je=!0}}}const $t=g?.(He),bt=we&&H.trailingRowOptions?.themeOverride!==void 0?H.trailingRowOptions?.themeOverride:void 0,Mt=$e.themeOverride===void 0&&$t===void 0&&bt===void 0?ve:hr(ve,$t,bt,$e.themeOverride);e.beginPath();const _t=xv(oe,$e,E);let Zt=Cv(oe,$e,E,m);const an=$e.span!==void 0&&E.columns.some(Ee=>$e.span!==void 0&&Ee>=$e.span[0]&&Ee<=$e.span[1]);_t&&!p&&m?Zt=0:_t&&m&&(Zt=Math.max(Zt,1)),an&&Zt++,_t||(ze&&Zt++,ne&&!we&&Zt++);const kt=$e.kind===Q.Protected?Mt.bgCellMedium:Mt.bgCell;let ft;if((De||kt!==M.bgCell)&&(ft=An(kt,ft)),Zt>0||ke){ke&&(ft=An(Mt.bgHeader,ft));for(let Ee=0;Ee<Zt;Ee++)ft=An(Mt.accentLight,ft)}else if(I!==void 0){for(const Ee of I)if(Ee[0]===H.sourceIndex&&Ee[1]===He){ft=An(Mt.bgSearchResult,ft);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<=H.sourceIndex&&H.sourceIndex<Tt.x+Tt.width&&Tt.y<=He&&He<Tt.y+Tt.height&&(ft=An(ct.color,ft))}let Nt=!1;if(C!==void 0){const Ee=Ae+1,ct=(De?Ee+rt-1:Math.min(Ee+rt-1,r-de))-Ee;(ct!==rt-1||ut+1<=se)&&(Nt=!0,e.save(),e.beginPath(),e.rect(ut+1,Ee,dt-1,ct),e.clip()),ft=ft===void 0?Mt.bgCell:An(ft,Mt.bgCell)}const mt=H.sourceIndex===n.length-1,ln=He===s-1;ft!==void 0&&(e.fillStyle=ft,ye!==void 0&&(ye.fillStyle=ft),C!==void 0?e.fillRect(ut+1,Ae+1,dt-(mt?2:1),rt-(ln?2:1)):e.fillRect(ut,Ae,dt,rt)),$e.style==="faded"&&(e.globalAlpha=.6);let Mn;for(let Ee=0;Ee<x.length;Ee++){const ct=x[Ee];if(ct.item[0]===H.sourceIndex&&ct.item[1]===He){Mn=ct;break}}if(dt>K&&!ht){const Ee=Mt.baseFontFull;Ee!==J&&(e.font=Ee,J=Ee),ye=Gf(e,$e,H.sourceIndex,He,mt,ln,ut,Ae,dt,rt,Zt>0,Mt,ft??Mt.bgCell,P,O,Mn?.hoverAmount??0,A,R,ee,T,ye,D,k,X,$)}return Nt&&e.restore(),$e.style==="faded"&&(e.globalAlpha=1),ie--,je&&(e.restore(),ye?.deprep?.(ge),ye=void 0,Be(),J=ce,e.font=ce),ie<=0}),e.restore(),ie<=0}),pe}const ni=[0,0],ri={x:0,y:0,width:0,height:0},Fl=[void 0,()=>{}];let hs=!1;function Wb(){hs=!0}function Gf(e,t,n,r,o,i,a,l,s,u,c,f,g,h,p,m,w,y,v,C,E,I,S,P,O){let x,A;w!==void 0&&w[0][0]===n&&w[0][1]===r&&(x=w[1][0],A=w[1][1]);let T;ni[0]=n,ni[1]=r,ri.x=a,ri.y=l,ri.width=s,ri.height=u,Fl[0]=S.getValue(ni),Fl[1]=k=>S.setValue(ni,k),hs=!1;const R={ctx:e,theme:f,col:n,row:r,cell:t,rect:ri,highlighted:c,cellFillColor:g,hoverAmount:m,frameTime:v,hoverX:x,drawState:Fl,hoverY:A,imageLoader:h,spriteManager:p,hyperWrapping:y,overrideCursor:x!==void 0?O:void 0,requestAnimationFrame:Wb},M=Iv(R,t.lastUpdated,v,E,o,i),D=P(t);if(D!==void 0){E?.renderer!==D&&(E?.deprep?.(R),E=void 0);const k=D.drawPrep?.(R,E);C!==void 0&&!ko(R.cell)?C(R,()=>D.draw(R,t)):D.draw(R,t),T=k===void 0?void 0:{deprep:k?.deprep,fillStyle:k?.fillStyle,font:k?.font,renderer:D}}return(M||hs)&&I?.(ni),T}function Ws(e,t,n,r,o,i,a,l,s=-20,u=-20,c=void 0,f="center",g="square"){const h=Math.floor(o+a/2),p=g==="circle"?1e4:t.roundingRadius??4;let m=Cf(c??t.checkboxMaxSize,a,t.cellVerticalPadding),w=m/2;const y=xf(f,r,i,t.cellHorizontalPadding,m),v=wf(y,h,m),C=kf(r+s,o+u,v);switch(n){case!0:{e.beginPath(),Zn(e,y-m/2,h-m/2,m,m,p),g==="circle"&&(w*=.8,m*=.8),e.fillStyle=l?t.accentColor:t.textMedium,e.fill(),e.beginPath(),e.moveTo(y-w+m/4.23,h-w+m/1.97),e.lineTo(y-w+m/2.42,h-w+m/1.44),e.lineTo(y-w+m/1.29,h-w+m/3.25),e.strokeStyle=t.bgCell,e.lineJoin="round",e.lineCap="round",e.lineWidth=1.9,e.stroke();break}case ha:case!1:{e.beginPath(),Zn(e,y-m/2+.5,h-m/2+.5,m-1,m-1,p),e.lineWidth=1,e.strokeStyle=C?t.textDark:t.textMedium,e.stroke();break}case Rs:{e.beginPath(),Zn(e,y-m/2,h-m/2,m,m,p),e.fillStyle=C?t.textMedium:t.textLight,e.fill(),g==="circle"&&(w*=.8,m*=.8),e.beginPath(),e.moveTo(y-m/3,h),e.lineTo(y+m/3,h),e.strokeStyle=t.bgCell,e.lineCap="round",e.lineWidth=1.9,e.stroke();break}default:gi()}}function Ub(e,t,n,r,o,i,a,l,s,u,c,f,g,h,p,m,w,y,v){const C=a+l;if(C<=0)return;e.fillStyle=f.bgHeader,e.fillRect(0,0,o,C);const E=r?.[0]?.[0],I=r?.[0]?.[1],S=r?.[1]?.[0],P=r?.[1]?.[1],O=f.headerFontFull;e.font=O,Tr(t,0,i,0,C,(x,A,T,R)=>{if(w!==void 0&&!w.has([x.sourceIndex,-1]))return;const M=Math.max(0,R-A);e.save(),e.beginPath(),e.rect(A+M,l,x.width-M,a),e.clip();const D=m(x.group??"").overrideTheme,k=x.themeOverride===void 0&&D===void 0?f:hr(f,D,x.themeOverride);k.bgHeader!==f.bgHeader&&(e.fillStyle=k.bgHeader,e.fill()),k!==f&&(e.font=k.headerFontFull);const X=c.columns.hasIndex(x.sourceIndex),$=s!==void 0||u||x.headerRowMarkerDisabled===!0,K=!$&&I===-1&&E===x.sourceIndex,ie=$?0:h.find(de=>de.item[0]===x.sourceIndex&&de.item[1]===-1)?.hoverAmount??0,ee=c?.current!==void 0&&c.current.cell[0]===x.sourceIndex,J=X?k.accentColor:ee?k.bgHeaderHasFocus:k.bgHeader,ge=n?l:0,oe=x.sourceIndex===0?0:1;X?(e.fillStyle=J,e.fillRect(A+oe,ge,x.width-oe,a)):(ee||ie>0)&&(e.beginPath(),e.rect(A+oe,ge,x.width-oe,a),ee&&(e.fillStyle=k.bgHeaderHasFocus,e.fill()),ie>0&&(e.globalAlpha=ie,e.fillStyle=k.bgHeaderHovered,e.fill(),e.globalAlpha=1)),nh(e,A,ge,x.width,a,x,X,k,K,K?S:void 0,K?P:void 0,ee,ie,g,y,v),e.restore()}),n&&Yb(e,t,o,i,l,r,f,g,h,p,m,w)}function Yb(e,t,n,r,o,i,a,l,s,u,c,f){const[g,h]=i?.[0]??[];let p=0;Kf(t,n,r,o,(m,w,y,v,C,E)=>{if(f!==void 0&&!f.hasItemInRectangle({x:m[0],y:-2,width:m[1]-m[0]+1,height:1}))return;e.save(),e.beginPath(),e.rect(y,v,C,E),e.clip();const I=c(w),S=I?.overrideTheme===void 0?a:hr(a,I.overrideTheme),P=h===-2&&g!==void 0&&g>=m[0]&&g<=m[1],O=P?S.bgGroupHeaderHovered??S.bgHeaderHovered:S.bgGroupHeader??S.bgHeader;if(O!==a.bgHeader&&(e.fillStyle=O,e.fill()),e.fillStyle=S.textGroupHeader??S.textHeader,I!==void 0){let x=y;if(I.icon!==void 0&&(l.drawSprite(I.icon,"normal",e,x+8,(o-20)/2,20,S),x+=26),e.fillText(I.name,x+8,o/2+qn(e,a.headerFontFull)),I.actions!==void 0&&P){const A=eh({x:y,y:v,width:C,height:E},I.actions);e.beginPath();const T=A[0].x-10,R=y+C-T;e.rect(T,0,R,o);const M=e.createLinearGradient(T,0,T+R,0),D=Ur(O,0);M.addColorStop(0,D),M.addColorStop(10/R,O),M.addColorStop(1,O),e.fillStyle=M,e.fill(),e.globalAlpha=.6;const[k,X]=i?.[1]??[-1,-1];for(let $=0;$<I.actions.length;$++){const K=I.actions[$],ie=A[$],ee=jr(ie,k+y,X);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}}y!==0&&u(m[0])&&(e.beginPath(),e.moveTo(y+.5,0),e.lineTo(y+.5,o),e.strokeStyle=a.borderColor,e.lineWidth=1,e.stroke()),e.restore(),p=y+C}),e.beginPath(),e.moveTo(p+.5,0),e.lineTo(p+.5,o),e.moveTo(0,o+.5),e.lineTo(n,o+.5),e.strokeStyle=a.borderColor,e.lineWidth=1,e.stroke()}const qi=30;function Xb(e,t,n,r,o){return{x:e+n-qi,y:Math.max(t,t+r/2-qi/2),width:qi,height:Math.min(qi,r)}}function eh(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 th(e,t,n,r,o,i,a,l){const s=a.cellHorizontalPadding,u=a.headerIconSize,c=Xb(n,r,o,i);let f=n+s;const g=t.icon===void 0?void 0:{x:f,y:r+(i-u)/2,width:u,height:u},h=g===void 0||t.overlayIcon===void 0?void 0:{x:g.x+9,y:g.y+6,width:18,height:18};g!==void 0&&(f+=Math.ceil(u*1.3));const p={x:f,y:r,width:o-f,height:i};let m;if(t.indicatorIcon!==void 0){const y=e===void 0?$f(t.title,a.headerFontFull)?.width??0:Ir(t.title,e,a.headerFontFull).width;p.width=y,f+=y+s,m={x:f,y:r+(i-u)/2,width:u,height:u}}const w=n+o/2;return{menuBounds:oi(c,w,l),iconBounds:oi(g,w,l),iconOverlayBounds:oi(h,w,l),textBounds:oi(p,w,l),indicatorIconBounds:oi(m,w,l)}}function Bc(e,t,n,r,o,i,a,l,s,u,c,f,g,h,p,m){if(i.rowMarker!==void 0&&i.headerRowMarkerDisabled!==!0){const v=i.rowMarkerChecked;v!==!0&&i.headerRowMarkerAlwaysVisible!==!0&&(e.globalAlpha=f);const C=i.headerRowMarkerTheme!==void 0?hr(l,i.headerRowMarkerTheme):l;Ws(e,C,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 w=a?l.textHeaderSelected:l.textHeader,y=i.hasMenu===!0&&(s||h&&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(y&&r>35){const v=p?35:r-35,C=p?35*.7:r-35*.7,E=v/r,I=C/r,S=e.createLinearGradient(t,0,t+r,0),P=Ur(w,0);S.addColorStop(p?1:0,w),S.addColorStop(E,w),S.addColorStop(I,P),S.addColorStop(p?0:1,P),e.fillStyle=S}else e.fillStyle=w;if(p&&(e.textAlign="right"),m.textBounds!==void 0&&e.fillText(i.title,p?m.textBounds.x+m.textBounds.width:m.textBounds.x,n+o/2+qn(e,l.headerFontFull)),p&&(e.textAlign="left"),i.indicatorIcon!==void 0&&m.indicatorIconBounds!==void 0&&(!y||!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(y&&m.menuBounds!==void 0){const v=m.menuBounds,C=u!==void 0&&c!==void 0&&jr(v,u+t,c+n);if(C||(e.globalAlpha=.7),i.menuIcon===void 0||i.menuIcon===pa.Triangle){e.beginPath();const E=v.x+v.width/2-5.5,I=v.y+v.height/2-3;Pv(e,[{x:E,y:I},{x:E+11,y:I},{x:E+5.5,y:I+6}],1),e.fillStyle=w,e.fill()}else if(i.menuIcon===pa.Dots){e.beginPath();const E=v.x+v.width/2,I=v.y+v.height/2;Dv(e,E,I),e.fillStyle=w,e.fill()}else{const E=v.x+(v.width-l.headerIconSize)/2,I=v.y+(v.height-l.headerIconSize)/2;g.drawSprite(i.menuIcon,"normal",e,E,I,l.headerIconSize,l)}C||(e.globalAlpha=1)}}function nh(e,t,n,r,o,i,a,l,s,u,c,f,g,h,p,m){const w=Ds(i.title)==="rtl",y=th(e,i,t,n,r,o,l,w);p!==void 0?p({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:f,spriteManager:h,menuBounds:y?.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,h,m,w,y)):Bc(e,t,n,r,o,i,a,l,s,u,c,g,h,m,w,y)}var Ll,Nc;function Zb(){if(Nc)return Ll;Nc=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 Ll=e,Ll}var Vl,jc;function qb(){if(jc)return Vl;jc=1;var e=Tm();function t(n,r,o,i){return e(n,function(a,l,s){r(i,a,o(a),s)}),i}return Vl=t,Vl}var $l,Wc;function Kb(){if(Wc)return $l;Wc=1;var e=Zb(),t=qb(),n=Im(),r=lf();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 _l,Uc;function Jb(){if(Uc)return _l;Uc=1;var e=Em(),t=Kb(),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 _l=o,_l}var Qb=Jb();const Gb=Er(Qb);function e1(e,t,n,r,o,i,a,l,s,u,c,f,g,h,p,m,w,y,v){if(y!==void 0||t[t.length-1]!==n[t.length-1])return;const C=qf(w);Tr(t,s,a,l,i,(E,I,S,P,O)=>{if(E!==t[t.length-1])return;I+=E.width;const x=Math.max(I,P);x>r||(e.save(),e.beginPath(),e.rect(x,i+1,1e4,o-i-1),e.clip(),Aa(O,S,o,u,c,p,m,C,(A,T,R,M)=>{if(!M&&w.length>0&&!w.some(K=>bi(I,A,1e4,R,K.x,K.y,K.width,K.height)))return;const D=g.hasIndex(T),k=h.hasIndex(T);e.beginPath();const X=f?.(T),$=X===void 0?v:hr(v,X);$.bgCell!==v.bgCell&&(e.fillStyle=$.bgCell,e.fillRect(I,A,1e4,R)),k&&(e.fillStyle=$.bgHeader,e.fillRect(I,A,1e4,R)),D&&(e.fillStyle=$.accentLight,e.fillRect(I,A,1e4,R))}),e.restore())})}function t1(e,t,n,r,o,i,a,l,s){let u=!1;for(const p of t)if(!p.sticky){u=a(p.sourceIndex);break}const c=s.horizontalBorderColor??s.borderColor,f=s.borderColor,g=u?To(t):0;let h;if(g!==0&&(h=gc(f,s.bgCell),e.beginPath(),e.moveTo(g+.5,0),e.lineTo(g+.5,r),e.strokeStyle=h,e.stroke()),o>0){const p=f===c&&h!==void 0?h:gc(c,s.bgCell),m=qr(i,o,l);e.beginPath(),e.moveTo(0,r-m+.5),e.lineTo(n,r-m+.5),e.strokeStyle=p,e.stroke()}}const rh=(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 n1(e,t,n,r,o,i,a,l,s,u,c,f,g,h,p){const m=p.bgCell,{minX:w,maxX:y,minY:v,maxY:C}=rh(l,i,a),E=[],I=a-qr(h,g,u);let S=s,P=n,O=0;for(;S+o<I;){const R=S+o,M=u(P);if(R>=v&&R<=C-1){const D=c?.(P)?.bgCell;D!==void 0&&D!==m&&P>=h-g&&E.push({x:w,y:R,w:y-w,h:M,color:D})}S+=M,P<h-g&&(O=S),P++}let x=0;const A=Math.min(I,C)-O;if(A>0)for(let R=0;R<t.length;R++){const M=t[R];if(M.width===0)continue;const D=M.sticky?x:x+r,k=M.themeOverride?.bgCell;k!==void 0&&k!==m&&D>=w&&D<=y&&f(R+1)&&E.push({x:D,y:O,w:M.width,h:A,color:k}),x+=M.width}if(E.length===0)return;let T;e.beginPath();for(let R=E.length-1;R>=0;R--){const M=E[R];T===void 0?T=M.color:M.color!==T&&(e.fillStyle=T,e.fill(),e.beginPath(),T=M.color),e.rect(M.x,M.y,M.w,M.h)}T!==void 0&&(e.fillStyle=T,e.fill()),e.beginPath()}function Yc(e,t,n,r,o,i,a,l,s,u,c,f,g,h,p,m,w,y=!1){if(s!==void 0){e.beginPath(),e.save(),e.rect(0,0,i,a);for(const R of s)e.rect(R.x+1,R.y+1,R.width-1,R.height-1);e.clip("evenodd")}const v=w.horizontalBorderColor??w.borderColor,C=w.borderColor,{minX:E,maxX:I,minY:S,maxY:P}=rh(l,i,a),O=[];e.beginPath();let x=.5;for(let R=0;R<t.length;R++){const M=t[R];if(M.width===0)continue;x+=M.width;const D=M.sticky?x:x+r;D>=E&&D<=I&&h(R+1)&&O.push({x1:D,y1:Math.max(u,S),x2:D,y2:Math.min(a,P),color:C})}let A=a+.5;for(let R=m-p;R<m;R++){const M=f(R);A-=M,O.push({x1:E,y1:A,x2:I,y2:A,color:v})}if(y!==!0){let R=c+.5,M=n;const D=A;for(;R+o<D;){const k=R+o;if(k>=S&&k<=P-1){const X=g?.(M);O.push({x1:E,y1:k,x2:I,y2:k,color:X?.horizontalBorderColor??X?.borderColor??v})}R+=f(M),M++}}const T=Gb(O,R=>R.color);for(const R of Object.keys(T)){e.strokeStyle=R;for(const M of T[R])e.moveTo(M.x1,M.y1),e.lineTo(M.x2,M.y2);e.stroke(),e.beginPath()}s!==void 0&&e.restore()}function r1(e,t,n,r,o,i,a,l,s,u,c,f,g,h,p,m,w,y,v){const C=[];e.imageSmoothingEnabled=!1;const E=Math.min(o.cellYOffset,a),I=Math.max(o.cellYOffset,a);let S=0;if(typeof y=="number")S+=(I-E)*y;else for(let D=E;D<I;D++)S+=y(D);a>o.cellYOffset&&(S=-S),S+=s-o.translateY;const P=Math.min(o.cellXOffset,i),O=Math.max(o.cellXOffset,i);let x=0;for(let D=P;D<O;D++)x+=m[D].width;i>o.cellXOffset&&(x=-x),x+=l-o.translateX;const A=To(w);if(x!==0&&S!==0)return{regions:[]};const T=u>0?qr(g,u,y):0,R=c-A-Math.abs(x),M=f-h-T-Math.abs(S)-1;if(R>150&&M>150){const D={sx:0,sy:0,sw:c*p,sh:f*p,dx:0,dy:0,dw:c*p,dh:f*p};if(S>0?(D.sy=(h+1)*p,D.sh=M*p,D.dy=(S+h+1)*p,D.dh=M*p,C.push({x:0,y:h,width:c,height:S+1})):S<0&&(D.sy=(-S+h+1)*p,D.sh=M*p,D.dy=(h+1)*p,D.dh=M*p,C.push({x:0,y:f+S-T,width:c,height:-S+T})),x>0?(D.sx=A*p,D.sw=R*p,D.dx=(x+A)*p,D.dw=R*p,C.push({x:A-1,y:0,width:x+2,height:f})):x<0&&(D.sx=(A-x)*p,D.sw=R*p,D.dx=A*p,D.dw=R*p,C.push({x:c+x,y:0,width:-x,height:f})),e.setTransform(1,0,0,1,0,0),v){if(A>0&&x!==0&&S===0&&(r===void 0||n?.[1]!==!1)){const k=A*p,X=f*p;e.drawImage(t,0,0,k,X,0,0,k,X)}if(T>0&&x===0&&S!==0&&(r===void 0||n?.[0]!==!1)){const k=(f-T)*p,X=c*p,$=T*p;e.drawImage(t,0,k,X,$,0,k,X,$)}}e.drawImage(t,D.sx,D.sy,D.sw,D.sh,D.dx,D.dy,D.dw,D.dh),e.scale(p,p)}return e.imageSmoothingEnabled=!0,{regions:C}}function o1(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||Tr(s,n,r,o,l,(f,g,h,p)=>{if(f.sourceIndex===u){const m=Math.max(g,p)+1;return c.push({x:m,y:0,width:i-m,height:a}),!0}}),c}function i1(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(Io(o,i))continue;if(n!==void 0||o.width===i.width)return!1;const{width:a,...l}=o,{width:s,...u}=i;if(!Io(l,u))return!1;n=r}return n===void 0?!0:n}return!0}function Xc(e,t,n,r,o,i,a,l,s,u,c,f,g,h,p,m){const w=p?.filter(P=>P.style!=="no-outline");if(w===void 0||w.length===0)return;const y=To(l),v=qr(h,g,f),C=[s,0,l.length,h-g],E=[y,0,t,n-v],I=w.map(P=>{const O=P.range,x=P.style??"dashed";return Nb(O,C,t,n,E).map(A=>{const T=A.rect,R=ds(T.x,T.y,t,n,c,u+c,r,o,i,a,h,s,g,l,f),M=T.width===1&&T.height===1?R:ds(T.x+T.width-1,T.y+T.height-1,t,n,c,u+c,r,o,i,a,h,s,g,l,f);return T.x+T.width>=l.length&&(M.width-=1),T.y+T.height>=h&&(M.height-=1),{color:P.color,style:x,clip:A.clip,rect:Bb({x:R.x,y:R.y,width:M.x+M.width-R.x,height:M.y+M.height-R.y},t,n,8)}})}),S=()=>{e.lineWidth=1;let P=!1;for(const O of I)for(const x of O)if(x?.rect!==void 0&&bi(0,0,t,n,x.rect.x,x.rect.y,x.rect.width,x.rect.height)){const A=P,T=!_b(x.clip,x.rect);e.beginPath(),T&&(e.save(),e.rect(x.clip.x,x.clip.y,x.clip.width,x.clip.height),e.clip()),x.style==="dashed"&&!P?(e.setLineDash([5,3]),P=!0):(x.style==="solid"||x.style==="solid-outline")&&P&&(e.setLineDash([]),P=!1),e.strokeStyle=x.style==="solid-outline"?An(An(x.color,m.borderColor),m.bgCell):Ur(x.color,1),e.closePath(),e.strokeRect(x.rect.x+.5,x.rect.y+.5,x.rect.width-1,x.rect.height-1),T&&(e.restore(),P=A)}P&&e.setLineDash([])};return S(),S}function Zc(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,f,g,h,p,m,w){if(c.current===void 0)return;const y=m!==!1&&m!==void 0;if(!y)return;const v=typeof m=="object"?{...ga,...m}:ga,C=c.current.range,E=c.current.cell,I=[C.x+C.width-1,C.y+C.height-1];if(E[1]>=w&&I[1]>=w||!a.some(k=>k.sourceIndex===E[0]||k.sourceIndex===I[0]))return;const[S,P]=c.current.cell,O=g(c.current.cell),x=O.span??[S,S],A=P>=w-h,T=h>0&&!A?qr(w,h,f)-1:0,R=I[1];let M;if(Tr(a,r,o,i,u,(k,X,$,K,ie)=>{if(k.sticky&&S>k.sourceIndex)return;const ee=k.sourceIndex<x[0],J=k.sourceIndex>x[1],ge=k.sourceIndex===I[0];if(!(!ge&&(ee||J)))return Aa(ie,$,n,w,f,h,p,void 0,(oe,de,pe)=>{if(de!==P&&de!==R)return;let le=X,V=k.width;if(O.span!==void 0){const H=Jf(O.span,X,oe,k.width,pe,k,l),U=k.sticky?H[0]:H[1];U!==void 0&&(le=U.x,V=U.width)}return de===R&&ge&&y&&(M=()=>{K>le&&!k.sticky&&(e.beginPath(),e.rect(K,0,t-K,n),e.clip());const H=v.size,U=H/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,H,H),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,H+v.outline,H+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-T),e.clip(),M?.(),e.restore()};return D(),D}function a1(e,t,n,r,o,i,a,l,s){s===void 0||s.size===0||(e.beginPath(),Kf(t,n,i,r,(u,c,f,g,h,p)=>{s.hasItemInRectangle({x:u[0],y:-2,width:u[1]-u[0]+1,height:1})&&e.rect(f,g,h,p)}),Tr(t,l,i,a,o,(u,c,f,g)=>{const h=Math.max(0,g-c),p=c+h+1,m=u.width-h-1;s.has([u.sourceIndex,-1])&&e.rect(p,r,m,o-r)}),e.clip())}function l1(e,t,n,r,o,i,a,l,s,u){let c=0;return Tr(e,i,r,o,n,(f,g,h,p,m)=>(Aa(m,h,t,a,l,s,u,void 0,(w,y,v,C)=>{C||(c=Math.max(y,c))}),!0)),c}function qc(e,t){const{canvasCtx:n,headerCanvasCtx:r,width:o,height:i,cellXOffset:a,cellYOffset:l,translateX:s,translateY:u,mappedColumns:c,enableGroups:f,freezeColumns:g,dragAndDropState:h,theme:p,drawFocus:m,headerHeight:w,groupHeaderHeight:y,disabledRows:v,rowHeight:C,verticalBorder:E,overrideCursor:I,isResizing:S,selection:P,fillHandle:O,freezeTrailingRows:x,rows:A,getCellContent:T,getGroupDetails:R,getRowThemeOverride:M,isFocused:D,drawHeaderCallback:k,prelightCells:X,drawCellCallback:$,highlightRegions:K,resizeCol:ie,imageLoader:ee,lastBlitData:J,hoverValues:ge,hyperWrapping:oe,hoverInfo:de,spriteManager:pe,maxScaleFactor:le,hasAppendRow:V,touchMode:H,enqueue:U,renderStateProvider:re,getCellRenderer:se,renderStrategy:Oe,bufferACtx:be,bufferBCtx:Qe,damage:Se,minimumCellWidth:It,resizeIndicator:st}=e;if(o===0||i===0)return;const Be=Oe==="double-buffer",ne=Math.min(le,Math.ceil(window.devicePixelRatio??1)),me=Oe!=="direct"&&i1(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,ye=f?y+w:w,Ae=ye+1;(ce.width!==o*ne||ce.height!==Ae*ne)&&(ce.width=o*ne,ce.height=Ae*ne,ce.style.width=o+"px",ce.style.height=Ae+"px");const He=be.canvas,rt=Qe.canvas;Be&&(He.width!==o*ne||He.height!==i*ne)&&(He.width=o*ne,He.height=i*ne,J.current!==void 0&&(J.current.aBufferScroll=void 0)),Be&&(rt.width!==o*ne||rt.height!==i*ne)&&(rt.width=o*ne,rt.height=i*ne,J.current!==void 0&&(J.current.bBufferScroll=void 0));const De=J.current;if(me===!0&&a===De?.cellXOffset&&l===De?.cellYOffset&&s===De?.translateX&&u===De?.translateY)return;let we=null;Be&&(we=n);const ze=r;let ke;Be?Se!==void 0?ke=De?.lastBuffer==="b"?Qe:be:ke=De?.lastBuffer==="b"?be:Qe:ke=n;const $e=ke.canvas,ut=Be?$e===He?rt:He:ve,dt=typeof C=="number"?()=>C:C;ze.save(),ke.save(),ze.beginPath(),ke.beginPath(),ze.textBaseline="middle",ke.textBaseline="middle",ne!==1&&(ze.scale(ne,ne),ke.scale(ne,ne));const je=cs(c,a,o,h,s);let ht=[];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=()=>{Ub(ze,je,f,de,o,s,w,y,h,S,P,p,pe,ge,E,R,Se,k,H),Yc(ze,je,l,s,u,o,i,void 0,void 0,y,ye,dt,M,E,x,A,p,!0),ze.beginPath(),ze.moveTo(0,Ae-.5),ze.lineTo(o,Ae-.5),ze.strokeStyle=An(p.headerBottomBorderColor??p.horizontalBorderColor??p.borderColor,p.bgHeader),ze.stroke(),bt&&Xc(ze,o,i,a,l,s,u,c,g,w,y,C,x,A,K,p),$t&&Bl(ze,o,i,l,s,u,je,c,p,ye,P,dt,T,x,V,O,A)};if(Se!==void 0){const mt=je[je.length-1].sourceIndex+1,ln=Se.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-x,width:mt,height:x,when:x>0}]),Mn=Ee=>{_c(Ee,je,c,i,ye,s,u,l,A,dt,T,R,M,v,D,m,x,V,ht,Se,P,X,K,ee,pe,ge,de,$,oe,p,U,re,se,I,It);const ct=P.current;O!==!1&&O!==void 0&&m&&ct!==void 0&&Se.has(Ff(ct.range))&&Bl(Ee,o,i,l,s,u,je,c,p,ye,P,dt,T,x,V,O,A)};ln&&(Mn(ke),we!==null&&(we.save(),we.scale(ne,ne),we.textBaseline="middle",Mn(we),we.restore()),Se.hasHeader()&&(a1(ze,je,o,y,ye,s,u,l,Se),Mt())),ke.restore(),ze.restore();return}if((me!==!0||a!==De?.cellXOffset||s!==De?.translateX||$t!==De?.mustDrawFocusOnHeader||bt!==De?.mustDrawHighlightRingsOnHeader)&&Mt(),me===!0){Pn(ut!==void 0&&De!==void 0);const{regions:mt}=r1(ke,ut,ut===He?De.aBufferScroll:De.bBufferScroll,ut===He?De.bBufferScroll:De.aBufferScroll,De,a,l,s,u,x,o,i,A,ye,ne,c,je,C,Be);ht=mt}else me!==!1&&(Pn(De!==void 0),ht=o1(De,a,l,s,u,o,i,ye,je,me));t1(ke,je,o,i,x,A,E,dt,p);const _t=Xc(ke,o,i,a,l,s,u,c,g,w,y,C,x,A,K,p),Zt=m?Bl(ke,o,i,l,s,u,je,c,p,ye,P,dt,T,x,V,O,A):void 0;if(ke.fillStyle=p.bgCell,ht.length>0){ke.beginPath();for(const mt of ht)ke.rect(mt.x,mt.y,mt.width,mt.height);ke.clip(),ke.fill(),ke.beginPath()}else ke.fillRect(0,0,o,i);const an=_c(ke,je,c,i,ye,s,u,l,A,dt,T,R,M,v,D,m,x,V,ht,Se,P,X,K,ee,pe,ge,de,$,oe,p,U,re,se,I,It);e1(ke,je,c,o,i,ye,s,u,l,A,dt,M,P.rows,v,x,V,ht,Se,p),n1(ke,je,l,s,u,o,i,ht,ye,dt,M,E,x,A,p),Yc(ke,je,l,s,u,o,i,ht,an,y,ye,dt,M,E,x,A,p),_t?.(),Zt?.(),S&&st!=="none"&&Tr(je,0,s,0,ye,(mt,ln)=>mt.sourceIndex===ie?(Zc(ze,ln+mt.width,0,ye+1,An(p.resizeIndicatorColor??p.accentLight,p.bgHeader)),st==="full"&&Zc(ke,ln+mt.width,ye,i,An(p.resizeIndicatorColor??p.accentLight,p.bgCell)),!0):!1),we!==null&&(we.fillStyle=p.bgCell,we.fillRect(0,0,o,i),we.drawImage(ke.canvas,0,0));const kt=l1(je,i,ye,s,u,l,A,dt,x,V);ee?.setWindow({x:a,y:l,width:je.length,height:kt-l},g,Array.from({length:x},(mt,ln)=>A-1-ln));const ft=De!==void 0&&(a!==De.cellXOffset||s!==De.translateX),Nt=De!==void 0&&(l!==De.cellYOffset||u!==De.translateY);J.current={cellXOffset:a,cellYOffset:l,translateX:s,translateY:u,mustDrawFocusOnHeader:$t,mustDrawHighlightRingsOnHeader:bt,lastBuffer:Be?$e===He?"a":"b":void 0,aBufferScroll:$e===He?[ft,Nt]:De?.aBufferScroll,bBufferScroll:$e===rt?[ft,Nt]:De?.bBufferScroll},ke.restore(),ze.restore()}const s1=80;function u1(e){const t=e-1;return t*t*t+1}class c1{callback;constructor(t){this.callback=t}currentHoveredItem=void 0;leavingItems=[];lastAnimationTime;addToLeavingItems=t=>{this.leavingItems.some(n=>fi(n.item,t.item))||this.leavingItems.push(t)};removeFromLeavingItems=t=>{const n=this.leavingItems.find(r=>fi(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:u1(t.hoverAmount)}));step=t=>{if(this.lastAnimationTime===void 0)this.lastAnimationTime=t;else{const n=(t-this.lastAnimationTime)/s1;for(const o of this.leavingItems)o.hoverAmount=$n(o.hoverAmount-n,0,1);this.currentHoveredItem!==void 0&&(this.currentHoveredItem.hoverAmount=$n(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(!fi(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 d1{fn;val;constructor(t){this.fn=t}get value(){return this.val??(this.val=this.fn())}}function Us(e){return new d1(e)}const f1=Us(()=>window.navigator.userAgent.includes("Firefox")),ya=Us(()=>window.navigator.userAgent.includes("Mac OS")&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome")),wa=Us(()=>window.navigator.platform.toLowerCase().startsWith("mac"));function h1(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(js);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=Xn(i[0],i[1]);t.current.includes(a)||t.current.push(a)},[o])}const kr="header",Yn="group-header",xa="out-of-bounds";var Mo;(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"})(Mo||(Mo={}));function oh(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 p1=(e,t)=>e.kind===Q.Custom?e.copyData:t?.(e)?.getAccessibilityString(e)??"",g1=(e,t)=>{const{width:n,height:r,accessibilityHeight:o,columns:i,cellXOffset:a,cellYOffset:l,headerHeight:s,fillHandle:u=!1,groupHeaderHeight:c,rowHeight:f,rows:g,getCellContent:h,getRowThemeOverride:p,onHeaderMenuClick:m,onHeaderIndicatorClick:w,enableGroups:y,isFilling:v,onCanvasFocused:C,onCanvasBlur:E,isFocused:I,selection:S,freezeColumns:P,onContextMenu:O,freezeTrailingRows:x,fixedShadowX:A=!0,fixedShadowY:T=!0,drawFocusRing:R,onMouseDown:M,onMouseUp:D,onMouseMoveRaw:k,onMouseMove:X,onItemHovered:$,dragAndDropState:K,firstColAccessible:ie,onKeyDown:ee,onKeyUp:J,highlightRegions:ge,canvasRef:oe,onDragStart:de,onDragEnd:pe,eventTargetRef:le,isResizing:V,resizeColumn:H,isDragging:U,isDraggable:re=!1,allowResize:se,disabledRows:Oe,hasAppendRow:be,getGroupDetails:Qe,theme:Se,prelightCells:It,headerIcons:st,verticalBorder:Be,drawCell:ne,drawHeader:me,onCellFocused:ve,onDragOverCell:ce,onDrop:ye,onDragLeave:Ae,imageWindowLoader:He,smoothScrollX:rt=!1,smoothScrollY:De=!1,experimental:we,getCellRenderer:ze,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),ht=d.useRef(we?.eventTarget??window),$t=ht.current,bt=He,Mt=d.useRef(),[_t,Zt]=d.useState(!1),an=d.useRef([]),kt=d.useRef(),[ft,Nt]=d.useState(),[mt,ln]=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 Vb(st,()=>{rn.current=void 0,wn.current()}),[st]),un=y?c+s:s,Lt=d.useRef(-1),Kt=(we?.enableFirefoxRescaling??!1)&&f1.value,Ne=(we?.enableSafariRescaling??!1)&&ya.value;d.useLayoutEffect(()=>{window.devicePixelRatio===1||!Kt&&!Ne||(Lt.current!==-1&&Zt(!0),window.clearTimeout(Lt.current),Lt.current=window.setTimeout(()=>{Zt(!1),Lt.current=-1},200))},[l,dt,$e,ut,Kt,Ne]);const yt=yv(i,P),En=d.useMemo(()=>A?To(yt,K):0,[yt,K,A]),Ot=d.useCallback((_,te,xe)=>{const Re=_.getBoundingClientRect();if(te>=yt.length||xe>=g)return;const ue=Re.width/n,fe=ds(te,xe,n,r,c,un,dt,l,$e,ut,g,P,x,yt,f);return ue!==1&&(fe.x*=ue,fe.y*=ue,fe.width*=ue,fe.height*=ue),fe.x+=Re.x,fe.y+=Re.y,fe},[n,r,c,un,dt,l,$e,ut,g,P,x,yt,f]),pt=d.useCallback((_,te,xe,Re)=>{const ue=_.getBoundingClientRect(),fe=ue.width/n,Ue=(te-ue.left)/fe,Ce=(xe-ue.top)/fe,qe=5,gt=cs(yt,dt,n,void 0,$e);let sn=0,Wt=0;const wt=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;wt&&(sn=Re.button,Wt=Re.buttons);const Ye=kv(Ue,gt,$e),at=Sv(Ce,r,y,s,c,g,f,l,ut,x),Vt=Re?.shiftKey===!0,ao=Re?.ctrlKey===!0,Ar=Re?.metaKey===!0,Jt=[Ue<0?-1:n<Ue?1:0,Ce<un?-1:r<Ce?1:0];let on;if(Ye===-1||Ce<0||Ue<0||at===void 0||Ue>n||Ce>r){const At=Ue>n?1:Ue<0?-1:0,Ln=Ce>r?1:Ce<0?-1:0;let hn=At*2,ur=Ln*2;At===0&&(hn=Ye===-1?Mo.EndPadding:Mo.Center),Ln===0&&(ur=at===void 0?Mo.EndPadding:Mo.Center);let cr=!1;if(Ye===-1&&at===-1){const Qt=Ot(_,yt.length-1,-1);Pn(Qt!==void 0),cr=te<Qt.x+Qt.width+qe}const it=Ue>n&&Ue<n+as()||Ce>r&&Ce<r+as();on={kind:xa,location:[Ye!==-1?Ye:Ue<0?0:yt.length-1,at??g-1],region:[hn,ur],shiftKey:Vt,ctrlKey:ao,metaKey:Ar,isEdge:cr,isTouch:ot,button:sn,buttons:Wt,scrollEdge:Jt,isMaybeScrollbar:it}}else if(at<=-1){let At=Ot(_,Ye,at);Pn(At!==void 0);let Ln=At!==void 0&&At.x+At.width-te<=qe;const hn=Ye-1;te-At.x<=qe&&hn>=0?(Ln=!0,At=Ot(_,hn,at),Pn(At!==void 0),on={kind:y&&at===-2?Yn:kr,location:[hn,at],bounds:At,group:yt[hn].group??"",isEdge:Ln,shiftKey:Vt,ctrlKey:ao,metaKey:Ar,isTouch:ot,localEventX:te-At.x,localEventY:xe-At.y,button:sn,buttons:Wt,scrollEdge:Jt}):on={kind:y&&at===-2?Yn:kr,group:yt[Ye].group??"",location:[Ye,at],bounds:At,isEdge:Ln,shiftKey:Vt,ctrlKey:ao,metaKey:Ar,isTouch:ot,localEventX:te-At.x,localEventY:xe-At.y,button:sn,buttons:Wt,scrollEdge:Jt}}else{const At=Ot(_,Ye,at);Pn(At!==void 0);const Ln=At!==void 0&&At.x+At.width-te<qe;let hn=!1;if(u!==!1&&u!==void 0&&S.current!==void 0){const ur=typeof u=="object"?{...ga,...u}:ga,cr=ur.size,it=cr/2,Qt=Ff(S.current.range),er=Ot(_,Qt[0],Qt[1]);if(er!==void 0){const Di=er.x+er.width+ur.offsetX-it+.5,dr=er.y+er.height+ur.offsetY-it+.5;hn=Math.abs(Di-te)<cr&&Math.abs(dr-xe)<cr}}on={kind:"cell",location:[Ye,at],bounds:At,isEdge:Ln,shiftKey:Vt,ctrlKey:ao,isFillHandle:hn,metaKey:Ar,isTouch:ot,localEventX:te-At.x,localEventY:xe-At.y,button:sn,buttons:Wt,scrollEdge:Jt}}return on},[n,yt,dt,$e,r,y,s,c,g,f,l,ut,x,Ot,u,S,un]),[bn]=ft??[],lr=d.useRef(()=>{}),Kn=d.useRef(ft);Kn.current=ft;const[N,_e]=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(!(N===null||_e===null))return document.documentElement.append(N.canvas),document.documentElement.append(_e.canvas),()=>{N.canvas.remove(),_e.canvas.remove()}},[N,_e]);const We=d.useMemo(()=>new Av,[]),Dt=Kt&&_t?1:Ne&&_t?2:5,qt=we?.disableMinimumCellWidth===!0?1:10,rn=d.useRef(),In=d.useRef(null),yn=d.useRef(null),jt=d.useCallback(()=>{const _=je.current,te=Mn.current;if(_===null||te===null||(In.current===null&&(In.current=_.getContext("2d",{alpha:!1}),_.width=0,_.height=0),yn.current===null&&(yn.current=te.getContext("2d",{alpha:!1}),te.width=0,te.height=0),In.current===null||yn.current===null||N===null||_e===null))return;let xe=!1;const Re=Ue=>{xe=!0,ct(Ue)},ue=rn.current,fe={headerCanvasCtx:yn.current,canvasCtx:In.current,bufferACtx:N,bufferBCtx:_e,width:n,height:r,cellXOffset:dt,cellYOffset:l,translateX:Math.round($e),translateY:Math.round(ut),mappedColumns:yt,enableGroups:y,freezeColumns:P,dragAndDropState:K,theme:Se,headerHeight:s,groupHeaderHeight:c,disabledRows:Oe??Je.empty(),rowHeight:f,verticalBorder:Be,isResizing:V,resizeCol:H,isFocused:I,selection:S,fillHandle:u,drawCellCallback:ne,hasAppendRow:be,overrideCursor:Re,maxScaleFactor:Dt,freezeTrailingRows:x,rows:g,drawFocus:R,getCellContent:h,getGroupDetails:Qe??(Ue=>({name:Ue})),getRowThemeOverride:p,drawHeaderCallback:me,prelightCells:It,highlightRegions:ge,imageLoader:bt,lastBlitData:kt,damage:Mt.current,hoverValues:an.current,hoverInfo:Kn.current,spriteManager:nn,scrolling:_t,hyperWrapping:we?.hyperWrapping??!1,touchMode:Tt,enqueue:lr.current,renderStateProvider:We,renderStrategy:we?.renderStrategy??(ya.value?"double-buffer":"single-buffer"),getCellRenderer:ze,minimumCellWidth:qt,resizeIndicator:ke};fe.damage===void 0?(rn.current=fe,qc(fe,ue)):qc(fe,void 0),!xe&&(fe.damage===void 0||fe.damage.has(Kn?.current?.[0]))&&ct(void 0)},[N,_e,n,r,dt,l,$e,ut,yt,y,P,K,Se,s,c,Oe,f,Be,V,be,H,I,S,u,x,g,R,Dt,h,Qe,p,ne,me,It,ge,bt,nn,_t,we?.hyperWrapping,we?.renderStrategy,Tt,We,ze,qt,ke]),wn=d.useRef(jt);d.useLayoutEffect(()=>{jt(),wn.current=jt},[jt]),d.useLayoutEffect(()=>{(async()=>document?.fonts?.ready!==void 0&&(await document.fonts.ready,rn.current=void 0,wn.current()))()},[]);const xn=d.useCallback(_=>{Mt.current=_,wn.current(),Mt.current=void 0},[]),Kr=h1(xn);lr.current=Kr;const Jr=d.useCallback(_=>{xn(new pi(_.map(te=>te.cell)))},[xn]);bt.setCallback(xn);const[Qr,Do]=d.useState(!1),[zn,Fn]=bn??[],Fe=zn!==void 0&&Fn===-1&&zn>=0&&zn<yt.length&&yt[zn].headerRowMarkerDisabled!==!0,cn=zn!==void 0&&Fn===-2;let Rn=!1,Po=!1,Jn=Ee;if(Jn===void 0&&zn!==void 0&&Fn!==void 0&&Fn>-1&&Fn<g){const _=h([zn,Fn],!0);Rn=_.kind===_n.NewRow||_.kind===_n.Marker&&_.markerKind!=="number",Po=_.kind===Q.Boolean&&Es(_),Jn=_.cursor}const Ao=U?"grabbing":(mt??!1)||V?"col-resize":Qr||v?"crosshair":Jn!==void 0?Jn:Fe||Rn||Po||cn?"pointer":"default",Ho=d.useMemo(()=>({contain:"strict",display:"block",cursor:Ao}),[Ao]),zo=d.useRef("default"),Bn=le?.current;Bn!=null&&zo.current!==Ho.cursor&&(Bn.style.cursor=zo.current=Ho.cursor);const fn=d.useCallback((_,te,xe,Re)=>{if(Qe===void 0)return;const ue=Qe(_);if(ue.actions!==void 0){const fe=eh(te,ue.actions);for(const[Ue,Ce]of fe.entries())if(jr(Ce,xe+te.x,Re+Ce.y))return ue.actions[Ue]}},[Qe]),pr=d.useCallback((_,te,xe,Re)=>{const ue=yt[te];if(!U&&!V&&!(mt??!1)){const fe=Ot(_,te,-1);Pn(fe!==void 0);const Ue=th(void 0,ue,fe.x,fe.y,fe.width,fe.height,Se,Ds(ue.title)==="rtl");if(ue.hasMenu===!0&&Ue.menuBounds!==void 0&&jr(Ue.menuBounds,xe,Re))return{area:"menu",bounds:Ue.menuBounds};if(ue.indicatorIcon!==void 0&&Ue.indicatorIconBounds!==void 0&&jr(Ue.indicatorIconBounds,xe,Re))return{area:"indicator",bounds:Ue.indicatorIconBounds}}},[yt,Ot,mt,U,V,Se]),Gr=d.useRef(0),gr=d.useRef(),eo=d.useRef(!1),Ei=d.useCallback(_=>{const te=je.current,xe=le?.current;if(te===null||_.target!==te&&_.target!==xe)return;eo.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 fe=pt(te,Re,ue,_);gr.current=fe.location,fe.isTouch&&(Gr.current=Date.now()),tn.current!==fe.isTouch&&vn(fe.isTouch),!(fe.kind===kr&&pr(te,fe.location[0],Re,ue)!==void 0)&&(fe.kind===Yn&&fn(fe.group,fe.bounds,fe.localEventX,fe.localEventY)!==void 0||(M?.(fe),!fe.isTouch&&re!==!0&&re!==fe.kind&&fe.button<3&&fe.button!==1&&_.preventDefault()))},[le,re,pt,fn,pr,M]);Sn("pointerdown",Ei,$t,!1);const Or=d.useRef(0),to=d.useCallback(_=>{const te=Or.current;Or.current=Date.now();const xe=je.current;if(eo.current=!1,D===void 0||xe===null)return;const Re=le?.current,ue=_.target!==xe&&_.target!==Re,fe=_.clientX,Ue=_.clientY,Ce=_.pointerType==="mouse"?_.button<3:!0;let qe=pt(xe,fe,Ue,_);qe.isTouch&&Gr.current!==0&&Date.now()-Gr.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,sn=pr(xe,gt,fe,Ue);if(qe.kind===kr&&sn!==void 0){(qe.button!==0||gr.current?.[0]!==gt||gr.current?.[1]!==-1)&&D(qe,!0);return}else if(qe.kind===Yn){const Wt=fn(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,pr,fn]);Sn("pointerup",to,$t,!1);const mr=d.useCallback(_=>{const te=je.current;if(te===null)return;const xe=le?.current,Re=_.target!==te&&_.target!==xe;let ue,fe,Ue=!0;_ instanceof MouseEvent?(ue=_.clientX,fe=_.clientY,Ue=_.button<3):(ue=_.changedTouches[0].clientX,fe=_.changedTouches[0].clientY);const Ce=pt(te,ue,fe,_);tn.current!==Ce.isTouch&&vn(Ce.isTouch),!Re&&_.cancelable&&Ue&&_.preventDefault();const[qe]=Ce.location;if(Ce.kind===kr){const gt=pr(te,qe,ue,fe);gt!==void 0&&Ce.button===0&&gr.current?.[0]===qe&&gr.current?.[1]===-1&&(gt.area==="menu"?m?.(qe,gt.bounds):gt.area==="indicator"&&w?.(qe,gt.bounds))}},[le,pt,pr,m,w]);Sn("click",mr,$t,!1);const no=d.useCallback(_=>{const te=je.current,xe=le?.current;if(te===null||_.target!==te&&_.target!==xe||O===void 0)return;const Re=pt(te,_.clientX,_.clientY,_);O(Re,()=>{_.cancelable&&_.preventDefault()})},[le,pt,O]);Sn("contextmenu",no,le?.current??null,!1);const Ii=d.useCallback(_=>{Mt.current=new pi(_.map(te=>te.item)),an.current=_,wn.current(),Mt.current=void 0},[]),Fo=d.useMemo(()=>new c1(Ii),[Ii]),Le=d.useRef(Fo);Le.current=Fo,d.useLayoutEffect(()=>{const _=Le.current;if(bn===void 0||bn[1]<0){_.setHovered(bn);return}const te=h(bn,!0),xe=ze(te),Re=xe===void 0&&te.kind===Q.Custom||xe?.needsHover!==void 0&&(typeof xe.needsHover=="boolean"?xe.needsHover:xe.needsHover(te));_.setHovered(Re?bn:void 0)},[h,ze,bn]);const Lo=d.useRef(),La=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&&!eo.current&&!ue.isTouch)return;const fe=(Ce,qe)=>{Nt(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(!oh(ue,Lo.current))ct(void 0),$?.(ue),fe(ue.kind===xa?void 0:[ue.location,[ue.localEventX,ue.localEventY]],!0),Lo.current=ue;else if(ue.kind==="cell"||ue.kind===kr||ue.kind===Yn){let Ce=!1,qe=!0;if(ue.kind==="cell"){const sn=h(ue.location);qe=ze(sn)?.needsHoverPosition??sn.kind===Q.Custom,Ce=qe}else Ce=!0;const gt=[ue.location,[ue.localEventX,ue.localEventY]];fe(gt,qe),Kn.current=gt,Ce&&xn(new pi([ue.location]))}const Ue=ue.location[0]>=(ie?0:1);ln(ue.kind===kr&&ue.isEdge&&Ue&&se===!0),Do(ue.kind==="cell"&&ue.isFillHandle),k?.(_),X(ue)},[le,pt,ie,se,k,X,$,h,ze,xn]);Sn("pointermove",La,$t,!0);const Dr=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]),Va=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),J?.({bounds:xe,stopPropagation:()=>_.stopPropagation(),preventDefault:()=>_.preventDefault(),cancel:()=>{},ctrlKey:_.ctrlKey,metaKey:_.metaKey,shiftKey:_.shiftKey,altKey:_.altKey,key:_.key,keyCode:_.keyCode,rawEvent:_,location:Re})},[J,S,Ot]),Qn=d.useCallback(_=>{if(je.current=_,oe!==void 0&&(oe.current=_),we?.eventTarget)ht.current=we.eventTarget;else if(_===null)ht.current=window;else{const te=_.getRootNode();te===document&&(ht.current=window),ht.current=te}},[oe,we?.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 fe=(Wt,wt)=>{xe=Wt,Re=wt};let Ue,Ce,qe;const gt=(Wt,wt,ot)=>{Ue=Wt,Ce=wt,qe=ot};let sn=!1;if(de?.({...ue,setData:fe,setDragImage:gt,preventDefault:()=>sn=!0,defaultPrevented:()=>sn}),!sn&&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,wt]=ue.location;if(wt!==void 0){const ot=document.createElement("canvas"),Ye=Ot(te,Wt,wt);Pn(Ye!==void 0);const at=Math.ceil(window.devicePixelRatio??1);ot.width=Ye.width*at,ot.height=Ye.height*at;const Vt=ot.getContext("2d");Vt!==null&&(Vt.scale(at,at),Vt.textBaseline="middle",wt===-1?(Vt.font=Se.headerFontFull,Vt.fillStyle=Se.bgHeader,Vt.fillRect(0,0,ot.width,ot.height),nh(Vt,0,0,Ye.width,Ye.height,yt[Wt],!1,Se,!1,void 0,void 0,!1,0,nn,me,!1)):(Vt.font=Se.baseFontFull,Vt.fillStyle=Se.bgCell,Vt.fillRect(0,0,ot.width,ot.height),Gf(Vt,h([Wt,wt]),0,wt,!1,!1,0,0,Ye.width,Ye.height,!1,Se,Se.bgCell,bt,nn,1,void 0,!1,0,void 0,void 0,void 0,We,ze,()=>{}))),ot.style.left="-100%",ot.style.position="absolute",ot.style.width=`${Ye.width}px`,ot.style.height=`${Ye.height}px`,document.body.append(ot),_.dataTransfer.setDragImage(ot,Ye.width/2,Ye.height/2),window.setTimeout(()=>{ot.remove()},0)}}else _.preventDefault()},[re,V,pt,de,Ot,Se,yt,nn,me,h,bt,We,ze]);Sn("dragstart",Vo,le?.current??null,!1,!1);const ro=d.useRef(),Ti=d.useCallback(_=>{const te=je.current;if(ye!==void 0&&_.preventDefault(),te===null||ce===void 0)return;const xe=pt(te,_.clientX,_.clientY),[Re,ue]=xe.location,fe=Re-(ie?0:1),[Ue,Ce]=ro.current??[];(Ue!==fe||Ce!==ue)&&(ro.current=[fe,ue],ce([fe,ue],_.dataTransfer))},[ie,pt,ce,ye]);Sn("dragover",Ti,le?.current??null,!1,!1);const $a=d.useCallback(()=>{ro.current=void 0,pe?.()},[pe]);Sn("dragend",$a,le?.current??null,!1,!1);const _a=d.useCallback(_=>{const te=je.current;if(te===null||ye===void 0)return;_.preventDefault();const xe=pt(te,_.clientX,_.clientY),[Re,ue]=xe.location,fe=Re-(ie?0:1);ye([fe,ue],_.dataTransfer)},[ie,pt,ye]);Sn("drop",_a,le?.current??null,!1,!1);const Gn=d.useCallback(()=>{Ae?.()},[Ae]);Sn("dragleave",Gn,le?.current??null,!1,!1);const sr=d.useRef(S);sr.current=S;const Cn=d.useRef(null),W=d.useCallback(_=>{je.current===null||!je.current.contains(document.activeElement)||(_===null&&sr.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:Jr,getMouseArgsForPosition:(_,te,xe)=>{if(!(oe===void 0||oe.current===null))return pt(oe.current,_,te,xe)}}),[oe,Jr,Ot,pt]);const zt=d.useRef(),Pr=C0(()=>{if(n<50||we?.disableAccessibilityTree===!0)return null;let _=cs(yt,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,fe=_.map(Ce=>Ce.sourceIndex),Ue=Mr(l,Math.min(g,l+o));return xe!==void 0&&Re!==void 0&&!(fe.includes(xe)&&Ue.includes(Re))&&W(null),d.createElement("table",{key:"access-tree",role:"grid","aria-rowcount":g+1,"aria-multiselectable":"true","aria-colcount":yt.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,sn=Xn(gt,Ce),Wt=xe===gt&&Re===Ce,wt=ue!==void 0&>>=ue.x&><ue.x+ue.width&&Ce>=ue.y&&Ce<ue.y+ue.height,ot=`glide-cell-${gt}-${Ce}`,Ye=[gt,Ce],at=h(Ye,!0);return d.createElement("td",{key:sn,role:"gridcell","aria-colindex":gt+1+te,"aria-selected":wt,"aria-readonly":ko(at)||!xo(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:Ye})},onFocusCapture:Vt=>{if(!(Vt.target===Cn.current||zt.current?.[0]===gt&&zt.current?.[1]===Ce))return zt.current=Ye,ve?.(Ye)},ref:Wt?W:void 0,tabIndex:-1},p1(at,ze))})))))},[n,yt,dt,K,$e,g,l,o,S,W,h,oe,ee,Ot,ve],200),oo=P===0||!A?0:dt>P?1:$n(-$e/100,0,1),Oi=-l*32+ut,io=T?$n(-Oi/100,0,1):0,Ba=d.useMemo(()=>{if(!oo&&!io)return null;const _={position:"absolute",top:0,left:En,width:n-En,height:r,opacity:oo,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:un,left:0,width:n,height:r,opacity:io,pointerEvents:"none",transition:De?void 0:"opacity 0.2s",boxShadow:"inset 0 13px 10px -13px rgba(0, 0, 0, 0.2)"};return d.createElement(d.Fragment,null,oo>0&&d.createElement("div",{id:"shadow-x",style:_}),io>0&&d.createElement("div",{id:"shadow-y",style:te}))},[oo,io,En,n,rt,un,r,De]),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:Dr,onKeyUp:Va,onFocus:C,onBlur:E,ref:Qn,style:Ho},Pr),d.createElement("canvas",{ref:Mn,style:Z}),Ba)},m1=d.memo(d.forwardRef(g1));function ii(e,t,n,r){return $n(Math.round(t-(e.growOffset??0)),Math.ceil(n),Math.floor(r))}const v1=e=>{const[t,n]=d.useState(),[r,o]=d.useState(),[i,a]=d.useState(),[l,s]=d.useState(),[u,c]=d.useState(!1),[f,g]=d.useState(),[h,p]=d.useState(),[m,w]=d.useState(),[y,v]=d.useState(!1),[C,E]=d.useState(),{onHeaderMenuClick:I,onHeaderIndicatorClick:S,getCellContent:P,onColumnMoved:O,onColumnResize:x,onColumnResizeStart:A,onColumnResizeEnd:T,gridRef:R,maxColumnWidth:M,minColumnWidth:D,onRowMoved:k,lockColumns:X,onColumnProposeMove:$,onMouseDown:K,onMouseUp:ie,onItemHovered:ee,onDragStart:J,canvasRef:ge}=e,oe=(x??T??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>=X?(c(!0),s(me)):h!==void 0&&ve!==void 0?(v(!0),w(Math.max(0,ve))):r===void 0&&!u&&!y&&ee?.(ne)},[i,h,l,ee,X,r,u,y]),H=O!==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=R?.current?.getBounds(de.length-1,-1);ce!==void 0&&(n(ce.x),o(de.length-1))}else if(ne.kind==="header"&&me>=X){const ce=ge?.current;if(ne.isEdge&&oe&&ce){n(ne.bounds.x),o(me);const ye=ce.getBoundingClientRect().width/ce.offsetWidth,Ae=ne.bounds.width/ye;A?.(de[me],Ae,me,Ae+(de[me].growOffset??0))}else ne.kind==="header"&&H&&(g(ne.bounds.x),a(me))}else ne.kind==="cell"&&X>0&&me===0&&ve!==void 0&&k!==void 0&&(E(ne.bounds.y),p(ve))}K?.(ne)},[K,oe,X,k,R,de,H,A,ge]),re=d.useCallback((ne,me)=>{u||y||I?.(ne,me)},[u,y,I]),se=d.useCallback((ne,me)=>{u||y||S?.(ne,me)},[u,y,S]),Oe=d.useRef(-1),be=d.useCallback(()=>{Oe.current=-1,p(void 0),w(void 0),E(void 0),v(!1),a(void 0),s(void 0),g(void 0),c(!1),o(void 0),n(void 0)},[]),Qe=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 ye=de[ce],Ae=ii(ye,Oe.current,D,M);x?.(ye,Ae,ce,Ae+(ye.growOffset??0))}const ve=ii(de[r],Oe.current,D,M);if(T?.(de[r],ve,r,ve+(de[r].growOffset??0)),le.hasIndex(r))for(const ce of le){if(ce===r)continue;const ye=de[ce],Ae=ii(ye,Oe.current,D,M);T?.(ye,Ae,ce,Ae+(ye.growOffset??0))}}be(),i!==void 0&&l!==void 0&&$?.(i,l)!==!1&&O?.(i,l),h!==void 0&&m!==void 0&&k?.(h,m)}ie?.(ne,me)},[ie,r,i,l,h,m,le,T,de,D,M,x,O,k,be,$]),Se=d.useMemo(()=>{if(!(i===void 0||l===void 0)&&i!==l&&$?.(i,l)!==!1)return{src:i,dest:l}},[i,l,$]),It=d.useCallback(ne=>{const me=ge?.current;if(i!==void 0&&f!==void 0)Math.abs(ne.clientX-f)>20&&c(!0);else if(h!==void 0&&C!==void 0)Math.abs(ne.clientY-C)>20&&v(!0);else if(r!==void 0&&t!==void 0&&me){const ve=me.getBoundingClientRect().width/me.offsetWidth,ce=(ne.clientX-t)/ve,ye=de[r],Ae=ii(ye,ce,D,M);if(x?.(ye,Ae,r,Ae+(ye.growOffset??0)),Oe.current=ce,le?.first()===r)for(const He of le){if(He===r)continue;const rt=de[He],De=ii(rt,Oe.current,D,M);x?.(rt,De,He,De+(rt.growOffset??0))}}},[i,f,h,C,r,t,de,D,M,x,le,ge]),st=d.useCallback((ne,me)=>{if(h===void 0||m===void 0)return P(ne,me);let[ve,ce]=ne;return ce===m?ce=h:(ce>m&&(ce-=1),ce>=h&&(ce+=1)),P([ve,ce],me)},[h,m,P]),Be=d.useCallback(ne=>{J?.(ne),ne.defaultPrevented()||be()},[be,J]);return d.createElement(m1,{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:Be,onMouseDown:U,allowResize:oe,onMouseUp:Qe,dragAndDropState:Se,onMouseMoveRaw:It,ref:R})};function b1(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 y1=(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)},f=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",f),()=>{g.removeEventListener("touchstart",c),g.removeEventListener("touchend",f),r.current!==null&&window.clearTimeout(r.current)}}},[e,s])},w1=()=>e=>e.isSafari?"scroll":"auto",x1=dn("div")({name:"ScrollRegionStyle",class:"gdg-s1dgczr6",propsAsIs:!1,vars:{"s1dgczr6-0":[w1()]}}),C1=33554400,k1=5e6;function S1(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 M1=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:f,rightElementProps:g,kineticScrollPerfHack:h=!1,scrollRef:p,initialSize:m}=e,w=[],y=g?.sticky??!1,v=g?.fill??!1,C=d.useRef(0),E=d.useRef(0),I=d.useRef(null),S=typeof window>"u"?1:window.devicePixelRatio,P=d.useRef(S);d.useEffect(()=>{if(P.current!==S){C.current=0,E.current=0,P.current=S;const pe=I.current;pe!==null&&k.current(pe.scrollLeft,pe.scrollTop)}},[S]);const O=d.useRef({scrollLeft:0,scrollTop:0,lockDirection:void 0}),x=d.useRef(null),A=S1(200),[T,R]=d.useState(!0),M=d.useRef(0);d.useLayoutEffect(()=>{if(!T||A||O.current.lockDirection===void 0)return;const pe=I.current;if(pe===null)return;const[le,V]=O.current.lockDirection;le!==void 0?pe.scrollLeft=le:V!==void 0&&(pe.scrollTop=V),O.current.lockDirection=void 0},[A,T]);const D=d.useCallback((pe,le)=>{const V=I.current;if(V===null)return;le=le??V.scrollTop,pe=pe??V.scrollLeft;const H=O.current.scrollTop,U=O.current.scrollLeft,re=pe-U,se=le-H;A&&re!==0&&se!==0&&(Math.abs(re)>3||Math.abs(se)>3)&&s&&O.current.lockDirection===void 0&&(O.current.lockDirection=Math.abs(re)<Math.abs(se)?[U,void 0]:[void 0,H]);const Oe=O.current.lockDirection;pe=Oe?.[0]??pe,le=Oe?.[1]??le,O.current.scrollLeft=pe,O.current.scrollTop=le;const be=V.clientWidth,Qe=V.clientHeight,Se=le,It=E.current-Se,st=V.scrollHeight-Qe;E.current=Se;let Be;if(st>0&&r>V.scrollHeight+5)if(Math.abs(It)>2e3||Se===0||Se===st){const ne=Math.max(0,Math.min(1,Se/st)),me=r-Qe;Be=ne*me,C.current=Be}else C.current-=It,Be=C.current;else Be=Se,C.current=Be;Be=Math.max(0,Math.min(Be,r-Qe)),C.current=Be,Oe!==void 0&&(window.clearTimeout(M.current),R(!1),M.current=window.setTimeout(()=>R(!0),200)),i({x:pe,y:Be,width:be-c,height:Qe-u,paddingRight:x.current?.clientWidth??0})},[u,c,r,i,s,A]);y1(h&&ya.value,D,I);const k=d.useRef(D);k.current=D;const X=d.useRef(),$=d.useRef(!1);d.useLayoutEffect(()=>{$.current?D():$.current=!0},[D,u,c]);const K=d.useCallback(pe=>{I.current=pe,p!==void 0&&(p.current=pe)},[p]);let ie=0,ee=0;const J=Math.min(r,C1);for(w.push(d.createElement("div",{key:ie++,style:{width:o,height:0}}));ee<J;){const pe=Math.min(k1,J-ee);w.push(d.createElement("div",{key:ie++,style:{width:0,height:pe}})),ee+=pe}const{ref:ge,width:oe,height:de}=b1(m);return typeof window<"u"&&(X.current?.height!==de||X.current?.width!==oe)&&(window.setTimeout(()=>k.current(),0),X.current={width:oe,height:de}),(oe??0)===0||(de??0)===0?d.createElement("div",{ref:ge}):d.createElement("div",{ref:ge},d.createElement(x1,{isSafari:ya.value},d.createElement("div",{className:"dvn-underlay"},t),d.createElement("div",{ref:K,style:X.current,draggable:a,onDragStart:pe=>{a||(pe.stopPropagation(),pe.preventDefault())},className:"dvn-scroller "+(l??""),onScroll:()=>D()},d.createElement("div",{className:"dvn-scroll-inner"+(f===void 0?" dvn-hidden":"")},d.createElement("div",{className:"dvn-stack"},w),f!==void 0&&d.createElement(d.Fragment,null,!v&&d.createElement("div",{className:"dvn-spacer"}),d.createElement("div",{ref:x,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:y?c??0:void 0,pointerEvents:"auto"}},f))))))},R1=e=>{const{columns:t,rows:n,rowHeight:r,headerHeight:o,groupHeaderHeight:i,enableGroups:a,freezeColumns:l,experimental:s,nonGrowWidth:u,clientSize:c,className:f,onVisibleRegionChanged:g,scrollRef:h,preventDiagonalScrolling:p,rightElement:m,rightElementProps:w,overscrollX:y,overscrollY:v,initialSize:C,smoothScrollX:E=!1,smoothScrollY:I=!1,isDraggable:S}=e,{paddingRight:P,paddingBottom:O}=s??{},[x,A]=c,T=d.useRef(),R=d.useRef(),M=d.useRef(),D=d.useRef(),k=u+Math.max(0,y??0);let X=a?o+i:o;if(typeof r=="number")X+=n*r;else for(let ee=0;ee<n;ee++)X+=r(ee);v!==void 0&&(X+=v);const $=d.useRef(),K=d.useCallback(()=>{if($.current===void 0)return;const ee={...$.current};let J=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 Oe=J-pe;if(ee.x>=Oe+se.width)J+=se.width,de++,oe++;else if(ee.x>Oe)J+=se.width,E?ge+=Oe-ee.x:de++,oe++;else if(ee.x+ee.width>Oe)J+=se.width,oe++;else break}let le=0,V=0,H=0;if(typeof r=="number")I?(V=Math.floor(ee.y/r),le=V*r-ee.y):V=Math.ceil(ee.y/r),H=Math.ceil(ee.height/r)+V,le<0&&H++;else{let se=0;for(let Oe=0;Oe<n;Oe++){const be=r(Oe),Qe=se+(I?0:be/2);if(ee.y>=se+be)se+=be,V++,H++;else if(ee.y>Qe)se+=be,I?le+=Qe-ee.y:V++,H++;else if(ee.y+ee.height>be/2+se)se+=be,H++;else break}}V=Math.max(0,Math.min(V,n-1)),H=Math.max(V,Math.min(H,n));const U={x:de,y:V,width:oe-de,height:H-V},re=T.current;(re===void 0||re.y!==U.y||re.x!==U.x||re.height!==U.height||re.width!==U.width||R.current!==ge||M.current!==le||ee.width!==D.current?.[0]||ee.height!==D.current?.[1])&&(g?.({x:de,y:V,width:oe-de,height:H-V},ee.width,ee.height,ee.paddingRight??0,ge,le),T.current=U,R.current=ge,M.current=le,D.current=[ee.width,ee.height])},[t,r,n,g,l,E,I]),ie=d.useCallback(ee=>{$.current=ee,K()},[K]);return d.useEffect(()=>{K()},[K]),d.createElement(M1,{scrollRef:h,className:f,kineticScrollPerfHack:s?.kineticScrollPerfHack,preventDiagonalScrolling:p,draggable:S===!0||typeof S=="string",scrollWidth:k+(P??0),scrollHeight:X+(O??0),clientHeight:A,rightElement:m,paddingBottom:O,paddingRight:P,rightElementProps:w,update:ie,initialSize:C},d.createElement(v1,{eventTargetRef:h,width:x,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}))},E1=dn("div")({name:"SearchWrapper",class:"gdg-seveqep",propsAsIs:!1}),I1=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"})),T1=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"})),O1=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"})),D1=10,P1=e=>{const{canvasRef:t,cellYOffset:n,rows:r,columns:o,searchInputRef:i,searchValue:a,searchResults:l,onSearchValueChange:s,getCellsForSelection:u,onSearchResultsChanged:c,showSearch:f=!1,onSearchClose:g}=e,[h]=d.useState(()=>"search-box-"+Math.round(Math.random()*1e3)),[p,m]=d.useState(""),w=a??p,y=d.useCallback(J=>{m(J),s?.(J)},[s]),[v,C]=d.useState(),E=d.useRef(v);E.current=v,d.useEffect(()=>{l!==void 0&&(l.length>0?C(J=>({rowsSearched:r,results:l.length,selectedIndex:J?.selectedIndex??-1})):C(void 0))},[r,l]);const I=d.useRef();I.current===void 0&&(I.current=new AbortController);const S=d.useRef(),[P,O]=d.useState([]),x=l??P,A=d.useCallback(()=>{S.current!==void 0&&(window.cancelAnimationFrame(S.current),S.current=void 0),I.current!==void 0&&I.current.abort(),I.current=new AbortController},[]),T=d.useRef(n);T.current=n;const R=d.useCallback(J=>{const ge=new RegExp(J.replace(/([$()*+.?[\\\]^{|}-])/g,"\\$1"),"i");let oe=T.current,de=Math.min(10,r),pe=0;C(void 0),O([]);const le=[],V=async()=>{if(u===void 0)return;const H=performance.now(),U=r-pe;let re=u({x:0,y:oe,width:o.length,height:Math.min(de,U,r-oe)},I.current.signal);typeof re=="function"&&(re=await re());let se=!1;for(const[st,Be]of re.entries())for(const[ne,me]of Be.entries()){let ve;switch(me.kind){case Q.Text:case Q.Number:ve=me.displayData;break;case Q.Uri:case Q.Markdown:ve=me.data;break;case Q.Boolean:ve=typeof me.data=="boolean"?me.data.toString():void 0;break;case Q.Image:case Q.Bubble:ve=me.data.join("🐳");break;case Q.Custom:ve=me.copyData;break}ve!==void 0&&ge.test(ve)&&(le.push([ne,st+oe]),se=!0)}const Oe=performance.now();se&&O([...le]),pe+=re.length,Pn(pe<=r);const be=E.current?.selectedIndex??-1;C({results:le.length,rowsSearched:pe,selectedIndex:be}),c?.(le,be),oe+de>=r?oe=0:oe+=de;const Qe=Oe-H,Se=Math.max(Qe,1),It=D1/Se;de=Math.ceil(de*It),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?.(),C(void 0),O([]),c?.([],-1),A(),t?.current?.focus()},[A,t,g,c]),D=d.useCallback(J=>{y(J.target.value),l===void 0&&(J.target.value===""?(C(void 0),O([]),A()):R(J.target.value))},[R,A,y,l]);d.useEffect(()=>{i.current!==null&&(y(""),C(void 0),P.length>0&&(O([]),c?.([],-1)),f?i.current.focus({preventScroll:!0}):A())},[f,i]);const k=d.useCallback(J=>{if(J?.stopPropagation?.(),v===void 0||v.results===0)return;const ge=(v.selectedIndex+1)%v.results;C({...v,selectedIndex:ge}),c?.(x,ge)},[v,c,x]),X=d.useCallback(J=>{if(J?.stopPropagation?.(),v===void 0||v.results===0)return;let ge=(v.selectedIndex-1)%v.results;ge<0&&(ge+=v.results),C({...v,selectedIndex:ge}),c?.(x,ge)},[c,x,v]),$=d.useCallback(J=>{(J.ctrlKey||J.metaKey)&&J.nativeEvent.code==="KeyF"||J.key==="Escape"?(M(),J.stopPropagation(),J.preventDefault()):J.key==="Enter"&&(J.shiftKey?X():k())},[M,k,X]);d.useEffect(()=>()=>{A()},[A]);const[K,ie]=d.useState(!1);d.useEffect(()=>{if(f)ie(!0);else{const J=setTimeout(()=>ie(!1),150);return()=>clearTimeout(J)}},[f]);const ee=d.useMemo(()=>{if(!f&&!K)return null;let J;v!==void 0&&(J=v.results>=1e3?"over 1000":`${v.results} result${v.results!==1?"s":""}`,v.selectedIndex>=0&&(J=`${v.selectedIndex+1} of ${J}`));const ge=de=>{de.stopPropagation()},oe={width:`${r>0?Math.floor((v?.rowsSearched??0)/r*100):0}%`};return d.createElement(E1,{className:"gdg-search-bar"+(f?"":" out"),onMouseDown:ge,onMouseMove:ge,onMouseUp:ge,onClick:ge},d.createElement("div",{className:"gdg-search-bar-inner"},d.createElement("input",{id:h,"aria-hidden":!f,"data-testid":"search-input",ref:i,onChange:D,value:w,tabIndex:f?void 0:-1,onKeyDownCapture:$}),d.createElement("button",{type:"button","aria-label":"Previous Result","aria-hidden":!f,tabIndex:f?void 0:-1,onClick:X,disabled:(v?.results??0)===0},I1),d.createElement("button",{type:"button","aria-label":"Next Result","aria-hidden":!f,tabIndex:f?void 0:-1,onClick:k,disabled:(v?.results??0)===0},T1),g!==void 0&&d.createElement("button",{type:"button","aria-label":"Close Search","aria-hidden":!f,"data-testid":"search-close-button",tabIndex:f?void 0:-1,onClick:M},O1)),v!==void 0?d.createElement(d.Fragment,null,d.createElement("div",{className:"gdg-search-status"},d.createElement("div",{"data-testid":"search-result-area"},J)),d.createElement("div",{className:"gdg-search-progress",style:oe})):d.createElement("div",{className:"gdg-search-status"},d.createElement("label",{htmlFor:h},"Type to search")))},[f,K,v,r,h,i,D,w,$,X,k,g,M]);return d.createElement(d.Fragment,null,d.createElement(R1,{prelightCells:x,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 A1 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 H1=()=>e=>Math.max(16,e.targetHeight-10),z1=dn("input")({name:"RenameInput",class:"gdg-r17m35ur",propsAsIs:!1,vars:{"r17m35ur-0":[H1(),"px"]}}),F1=e=>{const{bounds:t,group:n,onClose:r,canvasBounds:o,onFinish:i}=e,[a,l]=Ct.useState(n);return Ct.createElement(A1,{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 L1(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=ih(e,t);return r&&(n.didMatch=!0),r}function ih(e,t){if(e.length===0)return!1;if(e.includes("|")){const s=e.split("|");for(const u of s)if(ih(u,t))return!0;return!1}let n=!1,r=!1,o=!1,i=!1;const a=e.split("+"),l=a.pop();if(!L1(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":wa.value?i=!0:n=!0;break}return t.altKey===o&&t.ctrlKey===n&&t.shiftKey===r&&t.metaKey===i}function V1(e,t,n,r,o,i,a){const l=Ct.useCallback((c,f,g,h)=>{(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 p=n==="mixed"&&(g||h==="drag")||n==="additive",m=(r==="mixed"||r==="additive")&&p,w=(o==="mixed"||o==="additive")&&p;let y={current:c===void 0?void 0:{...c,rangeStack:h==="drag"?e.current?.rangeStack??[]:[]},columns:m?e.columns:Je.empty(),rows:w?e.rows:Je.empty()};g&&(i==="multi-rect"||i==="multi-cell")&&y.current!==void 0&&e.current!==void 0&&(y={...y,current:{...y.current,rangeStack:[...e.current.rangeStack,e.current.range]}}),t(y,f)},[r,e,n,i,a,o,t]),s=Ct.useCallback((c,f,g)=>{c=c??e.rows,f!==void 0&&(c=c.add(f));let h;if(o==="exclusive"&&c.length>0)h={current:void 0,columns:Je.empty(),rows:c};else{const p=g&&n==="mixed"||n==="additive",m=g&&r==="mixed"||r==="additive";h={current:p?e.current:void 0,columns:m?e.columns:Je.empty(),rows:c}}t(h,!1)},[r,e,n,o,t]),u=Ct.useCallback((c,f,g)=>{c=c??e.columns,f!==void 0&&(c=c.add(f));let h;if(r==="exclusive"&&c.length>0)h={current:void 0,rows:Je.empty(),columns:c};else{const p=g&&n==="mixed"||n==="additive",m=g&&o==="mixed"||o==="additive";h={current:p?e.current:void 0,rows:m?e.rows:Je.empty(),columns:c}}t(h,!1)},[r,e,n,o,t]);return[l,s,u]}function $1(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 f=[];for(let g=s.x;g<s.x+s.width;g++)g<0||c>=o?f.push({kind:Q.Loading,allowOverlay:!1}):f.push(t([g,c]));u.push(f)}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(f=>[{kind:Q.Loading,allowOverlay:!1},...f]):c.map(f=>[{kind:Q.Loading,allowOverlay:!1},...f])}return a(u,r.signal)},[r.signal,a,n]);return[e!==void 0?l:void 0,a]}function _1(e){if(e.copyData!==void 0)return{formatted:e.copyData,rawValue:e.copyData,format:"string",doNotEscape:!0};switch(e.kind){case Q.Boolean:return{formatted:e.data===!0?"TRUE":e.data===!1?"FALSE":e.data===Rs?"INDETERMINATE":"",rawValue:e.data,format:"boolean"};case Q.Custom:return{formatted:e.copyData,rawValue:e.copyData,format:"string"};case Q.Image:case Q.Bubble:return{formatted:e.data,rawValue:e.data,format:"string-array"};case Q.Drilldown:return{formatted:e.data.map(t=>t.text),rawValue:e.data.map(t=>t.text),format:"string-array"};case Q.Text:return{formatted:e.displayData??e.data,rawValue:e.data,format:"string"};case Q.Uri:return{formatted:e.displayData??e.data,rawValue:e.data,format:"url"};case Q.Markdown:case Q.RowID:return{formatted:e.data,rawValue:e.data,format:"string"};case Q.Number:return{formatted:e.displayData,rawValue:e.data,format:"number"};case Q.Loading:return{formatted:"#LOADING",rawValue:"",format:"string"};case Q.Protected:return{formatted:"************",rawValue:"",format:"string"};default:gi()}}function B1(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"}:_1(i))})}function Kc(e,t){return(t?/[\t\n",]/:/[\t\n"]/).test(e)&&(e=`"${e.replace(/"/g,'""')}"`),e}function N1(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=>Kc(i,!0)).join(",")):r.push(o.doNotEscape===!0?o.formatted:Kc(o.formatted,!1));t.push(r.join(" "))}return t.join(`
|
|
176
|
+
`)}function Nl(e){return e.replace(/\t/g," ").replace(/ {2,}/g,t=>"<span> </span>".repeat(t.length))}function Jc(e){return'"'+e.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")+'"'}function j1(e){return e.replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&")}function W1(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}">${Nl(r.formatted)}</a></td>`):r.format==="string-array"?t.push(`<td ${o}><ol>${r.formatted.map((i,a)=>`<li gdg-raw-value=${Jc(r.rawValue[a])}>`+Nl(i)+"</li>").join("")}</ol></td>`):t.push(`<td gdg-raw-value=${Jc(r.rawValue?.toString()??"")} ${o}>${Nl(r.formatted)}</td>`)}t.push("</tr>")}return t.push("</tbody></table>"),t.join("")}function U1(e,t){const n=B1(e,t),r=N1(n),o=W1(n);return{textPlain:r,textHtml:o}}function Qc(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 h of c)h.replaceWith(`
|
|
177
|
+
`);const f=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 h=l.querySelectorAll("li");i?.push({rawValue:[...h].map(p=>p.getAttribute("gdg-raw-value")??""),formatted:[...h].map(p=>p.textContent??""),format:"string-array"})}else if(f!==null)i?.push({rawValue:j1(f),formatted:l.textContent??"",format:g});else{let h=l.textContent??"";u&&(h=h.replace(/\n(?!\n)/g,"")),i?.push({rawValue:h??"",formatted:h??"",format:g})}}}return i!==void 0&&o.push(i),o}function Y1(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 f=t({x:l.x,y:l.y,width:1,height:l.height},o.signal);if(typeof f=="function")return i;s.push(...f);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 f=t({x:l.x,y:l.y,width:l.width,height:l.height},o.signal);if(typeof f=="function")return i;s.push(...f)}let u=l.x-n,c=l.x+l.width-1-n;for(const f of s)for(const g of f)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 Gc(e){return e.startsWith('"')&&e.endsWith('"')&&(e=e.slice(1,-1).replace(/""/g,'"')),e}function X1(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(Gc(e.slice(o,a))),o=a+1,l===`
|
|
182
|
+
`&&(n.push(r),r=[])),i=t.None);break}a++}return o<e.length&&r.push(Gc(e.slice(o,e.length))),n.push(r),n.map(l=>l.map(s=>({rawValue:s,formatted:s,format:"string"})))}function ed(e,t,n){const r=U1(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 ah(e){return e!==!0}function td(e){return typeof e=="string"?e:`${e}px`}const Z1=()=>e=>e.innerWidth,q1=()=>e=>e.innerHeight,K1=dn("div")({name:"Wrapper",class:"gdg-wmyidgi",propsAsIs:!1,vars:{"wmyidgi-0":[Z1()],"wmyidgi-1":[q1()]}}),J1=e=>{const{inWidth:t,inHeight:n,children:r,...o}=e;return d.createElement(K1,{innerHeight:td(n),innerWidth:td(t),...o},r)},Q1=2,G1=1300;function ey(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/G1);const f=r.current**1.618*c*Q1;t.current?.scrollBy(o*f,i*f),l=u,n?.()}window.requestAnimationFrame(s)}};return window.requestAnimationFrame(s),()=>{a=!0}},[t,o,i,n])}function ty({rowHeight:e,headerHeight:t,groupHeaderHeight:n,theme:r,overscrollX:o,overscrollY:i,scaleToRem:a,remSize:l}){const[s,u,c,f,g,h]=Ct.useMemo(()=>{if(!a||l===16)return[e,t,n,r,o,i];const p=l/16,m=e,w=Wf();return[typeof m=="number"?m*p:y=>Math.ceil(m(y)*p),Math.ceil(t*p),Math.ceil(n*p),{...r,headerIconSize:(r?.headerIconSize??w.headerIconSize)*p,cellHorizontalPadding:(r?.cellHorizontalPadding??w.cellHorizontalPadding)*p,cellVerticalPadding:(r?.cellVerticalPadding??w.cellVerticalPadding)*p},Math.ceil((o??0)*p),Math.ceil((i??0)*p)]},[n,t,o,i,l,e,a,r]);return{rowHeight:s,headerHeight:u,groupHeaderHeight:c,theme:f,overscrollX:g,overscrollY:h}}const xr={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 nd(e){const t=wa.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 ny(e){const t=E0(e);return Ct.useMemo(()=>{if(t===void 0)return nd(xr);const n={...t,goToNextPage:t?.goToNextPage??t?.pageDown??xr.goToNextPage,goToPreviousPage:t?.goToPreviousPage??t?.pageUp??xr.goToPreviousPage,goToFirstCell:t?.goToFirstCell??t?.first??xr.goToFirstCell,goToLastCell:t?.goToLastCell??t?.last??xr.goToLastCell,selectToFirstCell:t?.selectToFirstCell??t?.first??xr.selectToFirstCell,selectToLastCell:t?.selectToLastCell??t?.last??xr.selectToLastCell};return nd({...xr,...n})},[t])}function ry(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 f=0;f<l.subGroups.length;f++){const g=f<l.subGroups.length-1?l.subGroups[f+1].headerIndex:s;r(l.subGroups[f],g,u||l.isCollapsed)}}const o=ry(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 ps(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 oy(e,t,n,r){const o=Ct.useMemo(()=>e===void 0?void 0:Ys(e,t),[e,t]),i=Ct.useMemo(()=>o?.reduce((c,f)=>(c[f.rowIndex]=f,c),{}),[o]),a=Ct.useMemo(()=>o===void 0?t:o.reduce((c,f)=>c+(f.isCollapsed?1:f.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 f=c;for(const g of o){if(f===0)return;if(f--,!g.isCollapsed){if(f<g.rows)return g.contentIndex+f;f-=g.rows}}return c},[o]),u=Cr(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:f,contentIndex:g,groupIndex:h}=ps(c,o);return f?e.themeOverride:r?.(c,h,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 iy(e,t){const n=Ct.useMemo(()=>e===void 0?void 0:Ys(e,t),[e,t]);return{getRowGroupingForPath:sh,updateRowGroupingByPath:lh,mapper:Ct.useCallback(r=>{if(typeof r=="number")return ps(r,n);const o=ps(r[1],n);return{...o,originalIndex:[r[0],o.originalIndex]}},[n])}}function lh(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:lh(i.subGroups??[],o,n)}:i)}function sh(e,t){const[n,...r]=t;return r[0]===-1?e[n]:sh(e[n].subGroups??[],r)}function ay(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 ly(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]=R0(l),f=d.useRef(o);f.current=o;const g=ay(null,m=>{m!==null&&t!==void 0?m.scrollTop=t:m!==null&&e!==void 0&&(m.scrollLeft=e)}),h=(s.height??1)>1;d.useLayoutEffect(()=>{if(t!==void 0&&g.current!==null&&h){if(g.current.scrollTop===t)return;g.current.scrollTop=t,g.current.scrollTop!==t&&c(),f.current()}},[t,h,c,g]);const p=(s.width??1)>1;return d.useLayoutEffect(()=>{if(e!==void 0&&g.current!==null&&p){if(g.current.scrollLeft===e)return;g.current.scrollLeft=e,g.current.scrollLeft!==e&&c(),f.current()}},[e,p,c,g]),{visibleRegion:s,setVisibleRegion:u,scrollRef:g}}const sy=d.lazy(async()=>await ks(()=>import("./data-grid-overlay-editor-58Vv1cYM-BTQbyoqC.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 uy=0;function cy(e){return Jv(Hc(Hc(e).filter(t=>t.span!==void 0).map(t=>Mr((t.span?.[0]??0)+1,(t.span?.[1]??0)+1))))}function Ki(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 Ji={kind:Q.Loading,allowOverlay:!1},Qi={columns:Je.empty(),rows:Je.empty(),current:void 0},dy=(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(),f=typeof window>"u"?null:window,{imageEditorOverride:g,getRowThemeOverride:h,markdownDivCreateNode:p,width:m,height:w,columns:y,rows:v,getCellContent:C,onCellClicked:E,onCellActivated:I,onFillPattern:S,onFinishedEditing:P,coercePasteValue:O,drawHeader:x,drawCell:A,editorBloom:T,onHeaderClicked:R,onColumnProposeMove:M,rangeSelectionColumnSpanning:D=!0,spanRangeBehavior:k="default",onGroupHeaderClicked:X,onCellContextMenu:$,className:K,onHeaderContextMenu:ie,getCellsForSelection:ee,onGroupHeaderContextMenu:J,onGroupHeaderRenamed:ge,onCellEdited:oe,onCellsEdited:de,onSearchResultsChanged:pe,searchResults:le,onSearchValueChange:V,searchValue:H,onKeyDown:U,onKeyUp:re,keybindings:se,editOnType:Oe=!0,onRowAppended:be,onColumnAppended:Qe,onColumnMoved:Se,validateCell:It,highlightRegions:st,rangeSelect:Be="rect",columnSelect:ne="multi",rowSelect:me="multi",rangeSelectionBlending:ve="exclusive",columnSelectionBlending:ce="exclusive",rowSelectionBlending:ye="exclusive",onDelete:Ae,onDragStart:He,onMouseMove:rt,onPaste:De,copyHeaders:we=!1,freezeColumns:ze=0,cellActivationBehavior:ke="second-click",rowSelectionMode:$e="auto",columnSelectionMode:ut="auto",onHeaderMenuClick:dt,onHeaderIndicatorClick:je,getGroupDetails:ht,rowGrouping:$t,onSearchClose:bt,onItemHovered:Mt,onSelectionCleared:_t,showSearch:Zt,onVisibleRegionChanged:an,gridSelection:kt,onGridSelectionChange:ft,minColumnWidth:Nt=50,maxColumnWidth:mt=500,maxColumnAutoWidth:ln,provideEditor:Mn,trailingRowOptions:Ee,freezeTrailingRows:ct=0,allowedFillDirections:Tt="orthogonal",scrollOffsetX:vn,scrollOffsetY:tn,verticalBorder:nn,onDragOverCell:un,onDrop:Lt,onColumnResize:Kt,onColumnResizeEnd:Ne,onColumnResizeStart:yt,customRenderers:En,fillHandle:Ot,experimental:pt,fixedShadowX:bn,fixedShadowY:lr,headerIcons:Kn,imageWindowLoader:N,initialSize:_e,isDraggable:We,onDragLeave:Dt,onRowMoved:qt,overscrollX:rn,overscrollY:In,preventDiagonalScrolling:yn,rightElement:jt,rightElementProps:wn,trapFocus:xn=!1,smoothScrollX:Kr,smoothScrollY:Jr,scaleToRem:Qr=!1,rowHeight:Do=34,headerHeight:zn=36,groupHeaderHeight:Fn=zn,theme:Fe,isOutsideClick:cn,renderers:Rn,resizeIndicator:Po,scrollToActiveCell:Jn=!0,drawFocusRing:Ao=!0,portalElementRef:Ho}=e,zo=Ao==="no-editor"?o===void 0:Ao,Bn=typeof e.rowMarkers=="string"?void 0:e.rowMarkers,fn=Bn?.kind??e.rowMarkers??"none",pr=Bn?.width??e.rowMarkerWidth,Gr=Bn?.startIndex??e.rowMarkerStartIndex??1,gr=Bn?.theme??e.rowMarkerTheme,eo=Bn?.headerTheme,Ei=Bn?.headerAlwaysVisible,Or=me!=="multi"||Bn?.headerDisabled===!0,to=Bn?.checkboxStyle??"square",mr=Math.max(Nt,20),no=Math.max(mt,mr),Ii=Math.max(ln??no,mr),Fo=d.useMemo(()=>typeof window>"u"?{fontSize:"16px"}:window.getComputedStyle(document.documentElement),[]),{rows:Le,rowNumberMapper:Lo,rowHeight:La,getRowThemeOverride:Dr}=oy($t,v,Do,h),Va=d.useMemo(()=>Number.parseFloat(Fo.fontSize),[Fo]),{rowHeight:Qn,headerHeight:Vo,groupHeaderHeight:ro,theme:Ti,overscrollX:$a,overscrollY:_a}=ty({groupHeaderHeight:Fn,headerHeight:zn,overscrollX:rn,overscrollY:In,remSize:Va,rowHeight:La,scaleToRem:Qr,theme:Fe}),Gn=ny(se),sr=pr??(v>1e4?48:v>1e3?44:v>100?36:32),Cn=fn!=="none",W=Cn?1:0,zt=Ee!==void 0,Pr=Ee?.sticky===!0,[oo,Oi]=d.useState(!1),io=Zt??oo,Ba=d.useCallback(()=>{bt!==void 0?bt():Oi(!1)},[bt]),Z=d.useMemo(()=>kt===void 0?void 0:Ki(kt,W),[kt,W])??n,_=d.useRef();_.current===void 0&&(_.current=new AbortController),d.useEffect(()=>()=>_?.current.abort(),[]);const[te,xe]=$1(ee,C,W,_.current,Le),Re=d.useCallback((b,z,F)=>{if(It===void 0)return!0;const B=[b[0]-W,b[1]];return It?.(B,z,F)},[W,It]),ue=d.useRef(kt),fe=d.useCallback((b,z)=>{z&&(b=Y1(b,te,W,k,_.current)),ft!==void 0?(ue.current=Ki(b,-W),ft(ue.current)):r(b)},[ft,te,W,k]),Ue=Cr(Kt,d.useCallback((b,z,F,B)=>{Kt?.(y[F-W],z,F-W,B)},[Kt,W,y])),Ce=Cr(Ne,d.useCallback((b,z,F,B)=>{Ne?.(y[F-W],z,F-W,B)},[Ne,W,y])),qe=Cr(yt,d.useCallback((b,z,F,B)=>{yt?.(y[F-W],z,F-W,B)},[yt,W,y])),gt=Cr(x,d.useCallback((b,z)=>x?.({...b,columnIndex:b.columnIndex-W},z)??!1,[x,W])),sn=Cr(A,d.useCallback((b,z)=>A?.({...b,col:b.col-W},z)??!1,[A,W])),Wt=d.useCallback(b=>{if(Ae!==void 0){const z=Ae(Ki(b,-W));return typeof z=="boolean"?z:Ki(z,W)}return!0},[Ae,W]),[wt,ot,Ye]=V1(Z,fe,ve,ce,ye,Be,D),at=d.useMemo(()=>hr(Wf(),Ti),[Ti]),[Vt,ao]=d.useState([0,0,0]),Ar=d.useMemo(()=>{if(Rn===void 0)return{};const b={};for(const z of Rn)b[z.kind]=z;return b},[Rn]),Jt=d.useCallback(b=>b.kind!==Q.Custom?Ar[b.kind]:En?.find(z=>z.isMatch(b)),[En,Ar]);let{sizedColumns:on,nonGrowWidth:At}=Fv(y,Le,xe,Vt[0]-(W===0?0:sr)-Vt[2],mr,Ii,at,Jt,_.current);fn!=="none"&&(At+=sr);const Ln=d.useMemo(()=>on.some(b=>b.group!==void 0),[on]),hn=Ln?Vo+ro:Vo,ur=Z.rows.length,cr=fn==="none"?void 0:ur===0?!1:ur===Le?!0:void 0,it=d.useMemo(()=>fn==="none"?on:[{title:"",width:sr,icon:void 0,hasMenu:!1,style:"normal",themeOverride:gr,rowMarker:to,rowMarkerChecked:cr,headerRowMarkerTheme:eo,headerRowMarkerAlwaysVisible:Ei,headerRowMarkerDisabled:Or},...on],[fn,on,sr,gr,to,cr,eo,Ei,Or]),Qt=d.useRef({height:1,width:1,x:0,y:0}),er=d.useRef(!1),{setVisibleRegion:Di,visibleRegion:dr,scrollRef:Bt}=ly(vn,tn,Qn,Qt,()=>er.current=!0);Qt.current=dr;const vp=dr.x+W,Pi=dr.y,pn=d.useRef(null),kn=d.useCallback(b=>{b===!0?pn.current?.focus():window.requestAnimationFrame(()=>{pn.current?.focus()})},[]),gn=zt?Le+1:Le,Vn=d.useCallback(b=>{const z=W===0?b:b.map(B=>({...B,location:[B.location[0]-W,B.location[1]]})),F=de?.(z);if(F!==!0)for(const B of z)oe?.(B.location,B.value);return F},[oe,de,W]),[Hr,Na]=d.useState(),Ai=Z.current!==void 0&&Z.current.range.width*Z.current.range.height>1?Z.current.range:void 0,mu=zo?Z.current?.cell:void 0,Hi=mu?.[0],zi=mu?.[1],bp=d.useMemo(()=>{if((st===void 0||st.length===0)&&(Ai??Hi??zi??Hr)===void 0)return;const b=[];if(st!==void 0)for(const z of st){const F=it.length-z.range.x-W;F>0&&b.push({color:z.color,range:{...z.range,x:z.range.x+W,width:Math.min(F,z.range.width)},style:z.style})}return Hr!==void 0&&b.push({color:Ur(at.accentColor,0),range:Hr,style:"dashed"}),Ai!==void 0&&b.push({color:Ur(at.accentColor,.5),range:Ai,style:"solid-outline"}),Hi!==void 0&&zi!==void 0&&b.push({color:at.accentColor,range:{x:Hi,y:zi,width:1,height:1},style:"solid-outline"}),b.length>0?b:void 0},[Hr,Ai,Hi,zi,st,it.length,at.accentColor,W]),vu=d.useRef(it);vu.current=it;const Tn=d.useCallback(([b,z],F=!1)=>{const B=zt&&z===gn-1;if(b===0&&Cn){if(B)return Ji;const j=Lo(z);return j===void 0?Ji:{kind:_n.Marker,allowOverlay:!1,checkboxStyle:to,checked:Z?.rows.hasIndex(z)===!0,markerKind:fn==="clickable-number"?"number":fn,row:Gr+j,drawHandle:qt!==void 0,cursor:fn==="clickable-number"?"pointer":void 0}}else if(B){const j=b===W?Ee?.hint??"":"",q=vu.current[b];if(q?.trailingRowOptions?.disabled===!0)return Ji;{const L=q?.trailingRowOptions?.hint??j,Y=q?.trailingRowOptions?.addIcon??Ee?.addIcon;return{kind:_n.NewRow,hint:L,allowOverlay:!1,icon:Y}}}else{const j=b-W;if(F||pt?.strict===!0){const L=Qt.current,Y=L.x>j||j>L.x+L.width||L.y>z||z>L.y+L.height||z>=Ya.current,G=j===L.extras?.selected?.[0]&&z===L.extras?.selected[1];let ae=!1;if(L.extras?.freezeRegions!==void 0){for(const Ie of L.extras.freezeRegions)if(jr(Ie,j,z)){ae=!0;break}}if(Y&&!G&&!ae)return Ji}let q=C([j,z]);return W!==0&&q.span!==void 0&&(q={...q,span:[q.span[0]+W,q.span[1]+W]}),q}},[zt,gn,Cn,Lo,to,Z?.rows,fn,Gr,qt,W,Ee?.hint,Ee?.addIcon,pt?.strict,C]),ja=d.useCallback(b=>{let z=ht?.(b)??{name:b};return ge!==void 0&&b!==""&&(z={icon:z.icon,name:z.name,overrideTheme:z.overrideTheme,actions:[...z.actions??[],{title:"Rename",icon:"renameIcon",onClick:F=>Za({group:z.name,bounds:F.bounds})}]}),z},[ht,ge]),Fi=d.useCallback(b=>{const[z,F]=b.cell,B=it[z],j=B?.group!==void 0?ja(B.group)?.overrideTheme:void 0,q=B?.themeOverride,L=Dr?.(F);i({...b,theme:hr(at,j,q,L,b.content.themeOverride)})},[Dr,it,ja,at]),lo=d.useCallback((b,z,F)=>{if(Z.current===void 0)return;const[B,j]=Z.current.cell,q=Tn([B,j]);if(q.kind!==Q.Boolean&&q.allowOverlay){let L=q;if(F!==void 0)switch(L.kind){case Q.Number:{const Y=Qm(()=>F==="-"?-0:Number.parseFloat(F),0);L={...L,data:Number.isNaN(Y)?0:Y};break}case Q.Text:case Q.Markdown:case Q.Uri:L={...L,data:F};break}Fi({target:b,content:L,initialValue:F,cell:[B,j],highlight:F===void 0,forceEditMode:F!==void 0,activation:z})}else q.kind===Q.Boolean&&z.inputType==="keyboard"&&q.readonly!==!0&&(Vn([{location:Z.current.cell,value:{...q,data:ah(q.data)}}]),pn.current?.damage([{cell:Z.current.cell}]))},[Tn,Z,Vn,Fi]),bu=d.useCallback((b,z)=>{const F=pn.current?.getBounds(b,z);if(F===void 0||Bt.current===null)return;const B=Tn([b,z]);B.allowOverlay&&Fi({target:F,content:B,initialValue:void 0,highlight:!0,cell:[b,z],forceEditMode:!0,activation:{inputType:"keyboard",key:"Enter"}})},[Tn,Bt,Fi]),Ut=d.useCallback((b,z,F="both",B=0,j=0,q=void 0)=>{if(Bt.current!==null){const L=pn.current,Y=l.current,G=typeof b!="number"?b.unit==="cell"?b.amount:void 0:b,ae=typeof z!="number"?z.unit==="cell"?z.amount:void 0:z,Ie=typeof b!="number"&&b.unit==="px"?b.amount:void 0,Rt=typeof z!="number"&&z.unit==="px"?z.amount:void 0;if(L!==null&&Y!==null){let Ke={x:0,y:0,width:0,height:0},Xe=0,Ze=0;if((G!==void 0||ae!==void 0)&&(Ke=L.getBounds((G??0)+W,ae??0)??Ke,Ke.width===0||Ke.height===0))return;const Ge=Y.getBoundingClientRect(),vt=Ge.width/Y.offsetWidth;if(Ie!==void 0&&(Ke={...Ke,x:Ie-Ge.left-Bt.current.scrollLeft,width:1}),Rt!==void 0&&(Ke={...Ke,y:Rt+Ge.top-Bt.current.scrollTop,height:1}),Ke!==void 0){const Gt={x:Ke.x-B,y:Ke.y-j,width:Ke.width+2*B,height:Ke.height+2*j};let po=0;for(let tl=0;tl<ze;tl++)po+=on[tl].width;let ji=0;const Uo=ct+(Pr?1:0);Uo>0&&(ji=qr(gn,Uo,Qn));let nr=po*vt+Ge.left+W*sr*vt,go=Ge.right,Vr=Ge.top+hn*vt,mo=Ge.bottom-ji*vt;const Wi=Ke.width+B*2;switch(q?.hAlign){case"start":go=nr+Wi;break;case"end":nr=go-Wi;break;case"center":nr=Math.floor((nr+go)/2)-Wi/2,go=nr+Wi;break}const Ui=Ke.height+j*2;switch(q?.vAlign){case"start":mo=Vr+Ui;break;case"end":Vr=mo-Ui;break;case"center":Vr=Math.floor((Vr+mo)/2)-Ui/2,mo=Vr+Ui;break}nr>Gt.x?Xe=Gt.x-nr:go<Gt.x+Gt.width&&(Xe=Gt.x+Gt.width-go),Vr>Gt.y?Ze=Gt.y-Vr:mo<Gt.y+Gt.height&&(Ze=Gt.y+Gt.height-mo),F==="vertical"||typeof b=="number"&&b<ze?Xe=0:(F==="horizontal"||typeof z=="number"&&z>=gn-Uo)&&(Ze=0),(Xe!==0||Ze!==0)&&(vt!==1&&(Xe/=vt,Ze/=vt),Bt.current.scrollTo({left:Xe+Bt.current.scrollLeft,top:Ze+Bt.current.scrollTop,behavior:q?.behavior??"auto"}))}}}},[W,ct,sr,Bt,hn,ze,on,gn,Pr,Qn]),Wa=d.useRef(bu),Ua=d.useRef(C);Wa.current=bu,Ua.current=C;const Ya=d.useRef(Le);Ya.current=Le;const yu=d.useRef(it.length);yu.current=it.length;const vr=d.useCallback(async(b,z=!0,F)=>{if(it[b]?.trailingRowOptions?.disabled===!0)return;const B=be?.();let j,q=!0;B!==void 0&&(j=await B,j==="top"&&(q=!1),typeof j=="number"&&(q=!1));let L=0;const Y=()=>{if(Ya.current<=Le){L<500&&window.setTimeout(Y,L),L=50+L*2;return}const G=typeof j=="number"?j:q?Le:0;Ni.current(b-W,G,"both",0,0,F?{behavior:F}:void 0),wt({cell:[b,G],range:{x:b,y:G,width:1,height:1}},!1,!1,"edit");const ae=Ua.current([b-W,G]);ae.allowOverlay&&xo(ae)&&ae.readonly!==!0&&z&&window.setTimeout(()=>{Wa.current(b,G)},0)};Y()},[it,be,W,Le,wt]),Li=d.useCallback(async(b,z=!0)=>{const F=Qe?.();let B,j=!0;F!==void 0&&(B=await F,B==="left"&&(j=!1),typeof B=="number"&&(j=!1));let q=0;const L=()=>{if(yu.current<=it.length){q<500&&window.setTimeout(L,q),q=50+q*2;return}const Y=typeof B=="number"?B:j?it.length:0;Ut(Y-W,b),wt({cell:[Y,b],range:{x:Y,y:b,width:1,height:1}},!1,!1,"edit");const G=Ua.current([Y-W,b]);G.allowOverlay&&xo(G)&&G.readonly!==!0&&z&&window.setTimeout(()=>{Wa.current(Y,b)},0)};L()},[it,Qe,W,Ut,wt]),so=d.useCallback(b=>{const z=on[b]?.trailingRowOptions?.targetColumn??Ee?.targetColumn;if(typeof z=="number")return z+(Cn?1:0);if(typeof z=="object"){const F=y.indexOf(z);if(F>=0)return F+(Cn?1:0)}},[on,y,Cn,Ee?.targetColumn]),br=d.useRef(),uo=d.useRef(),$o=d.useCallback((b,z)=>{const[F,B]=z;return hr(at,it[F]?.themeOverride,Dr?.(B),b.themeOverride)},[Dr,it,at]),{mapper:zr}=iy($t,v),Nn=$t?.navigationBehavior,_o=d.useCallback(b=>{const z=wa.value?b.metaKey:b.ctrlKey,F=z&&me==="multi",[B,j]=b.location,q=Z.columns,L=Z.rows,[Y,G]=Z.current?.cell??[];if(b.kind==="cell"){if(uo.current=void 0,Fr.current=[B,j],B===0&&Cn){if(zt===!0&&j===Le||fn==="number"||me==="none")return;const ae=Tn(b.location);if(ae.kind!==_n.Marker)return;if(qt!==void 0){const Ke=Jt(ae);Pn(Ke?.kind===_n.Marker);const Xe=Ke?.onClick?.({...b,cell:ae,posX:b.localEventX,posY:b.localEventY,bounds:b.bounds,theme:$o(ae,b.location),preventDefault:()=>{}});if(Xe===void 0||Xe.checked===ae.checked)return}i(void 0),kn();const Ie=L.hasIndex(j),Rt=br.current;if(me==="multi"&&(b.shiftKey||b.isLongTouch===!0)&&Rt!==void 0&&L.hasIndex(Rt)){const Ke=[Math.min(Rt,j),Math.max(Rt,j)+1];F||$e==="multi"?ot(void 0,Ke,!0):ot(Je.fromSingleSelection(Ke),void 0,F)}else me==="multi"&&(F||b.isTouch||$e==="multi")?Ie?ot(L.remove(j),void 0,!0):(ot(void 0,j,!0),br.current=j):Ie&&L.length===1?ot(Je.empty(),void 0,z):(ot(Je.fromSingleSelection(j),void 0,z),br.current=j)}else if(B>=W&&zt&&j===Le){const ae=so(B);vr(ae??B)}else if(Y!==B||G!==j){const ae=Tn(b.location),Ie=Jt(ae);if(Ie?.onSelect!==void 0){let Xe=!1;if(Ie.onSelect({...b,cell:ae,posX:b.localEventX,posY:b.localEventY,bounds:b.bounds,preventDefault:()=>Xe=!0,theme:$o(ae,b.location)}),Xe)return}if(Nn==="block"&&zr(j).isGroupHeader)return;const Rt=Pr&&j===Le,Ke=Pr&&Z!==void 0&&Z.current?.cell[1]===Le;if((b.shiftKey||b.isLongTouch===!0)&&Y!==void 0&&G!==void 0&&Z.current!==void 0&&!Ke){if(Rt)return;const Xe=Math.min(B,Y),Ze=Math.max(B,Y),Ge=Math.min(j,G),vt=Math.max(j,G);wt({...Z.current,range:{x:Xe,y:Ge,width:Ze-Xe+1,height:vt-Ge+1}},!0,z,"click"),br.current=void 0,kn()}else wt({cell:[B,j],range:{x:B,y:j,width:1,height:1}},!0,z,"click"),br.current=void 0,i(void 0),kn()}}else if(b.kind==="header")if(Fr.current=[B,j],i(void 0),Cn&&B===0)br.current=void 0,uo.current=void 0,!Or&&me==="multi"&&(L.length!==Le?ot(Je.fromSingleSelection([0,Le]),void 0,z):ot(Je.empty(),void 0,z),kn());else{const ae=uo.current;if(ne==="multi"&&(b.shiftKey||b.isLongTouch===!0)&&ae!==void 0&&q.hasIndex(ae)){const Ie=[Math.min(ae,B),Math.max(ae,B)+1];z||b.isTouch||ut==="multi"?Ye(void 0,Ie,z):Ye(Je.fromSingleSelection(Ie),void 0,z)}else ne==="multi"&&(z||b.isTouch||ut==="multi")?(q.hasIndex(B)?Ye(q.remove(B),void 0,z):Ye(void 0,B,z),uo.current=B):ne!=="none"&&(q.hasIndex(B)?Ye(q.remove(B),void 0,z):Ye(Je.fromSingleSelection(B),void 0,z),uo.current=B);br.current=void 0,kn()}else b.kind===Yn?Fr.current=[B,j]:b.kind===xa&&!b.isMaybeScrollbar&&(fe(Qi,!1),i(void 0),kn(),_t?.(),br.current=void 0,uo.current=void 0)},[me,ne,Z,Cn,W,zt,Le,fn,Tn,qt,kn,$e,ut,Jt,$o,ot,so,vr,Nn,zr,Pr,wt,Or,Ye,fe,_t]),Bo=d.useRef(!1),Fr=d.useRef(),wu=d.useRef(dr),tr=d.useRef(),yp=d.useCallback(b=>{if(co.current=!1,wu.current=Qt.current,b.button!==0&&b.button!==1){tr.current=void 0;return}const z=performance.now();tr.current={button:b.button,time:z,location:b.location},b?.kind==="header"&&(Bo.current=!0);const F=b.kind==="cell"&&b.isFillHandle;!F&&b.kind!=="cell"&&b.isEdge||(u({previousSelection:Z,fillHandle:F}),Fr.current=void 0,!b.isTouch&&b.button===0&&!F?_o(b):!b.isTouch&&b.button===1&&(Fr.current=b.location))},[Z,_o]),[Xa,Za]=d.useState(),xu=d.useCallback(b=>{if(b.kind!==Yn||ne!=="multi")return;const z=wa.value?b.metaKey:b.ctrlKey,[F]=b.location,B=Z.columns;if(F<W)return;const j=it[F];let q=F,L=F;for(let Y=F-1;Y>=W&&vi(j.group,it[Y].group);Y--)q--;for(let Y=F+1;Y<it.length&&vi(j.group,it[Y].group);Y++)L++;if(kn(),z||b.isTouch||ut==="multi")if(B.hasAll([q,L+1])){let Y=B;for(let G=q;G<=L;G++)Y=Y.remove(G);Ye(Y,void 0,z)}else Ye(void 0,[q,L+1],z);else Ye(Je.fromSingleSelection([q,L+1]),void 0,z)},[ne,kn,Z.columns,it,W,Ye,ut]),co=d.useRef(!1),Vi=d.useCallback(async b=>{if(te!==void 0&&Ue!==void 0){const z=Qt.current.y,F=Qt.current.height;let B=te({x:b,y:z,width:1,height:Math.min(F,Le-z)},_.current.signal);typeof B!="object"&&(B=await B());const j=on[b-W],q=document.createElement("canvas").getContext("2d",{alpha:!1});if(q!==null){q.font=at.baseFontFull;const L=Xf(q,at,j,0,B,mr,no,!1,Jt);Ue?.(j,L.width,b,L.width)}}},[on,te,no,at,mr,Ue,W,Le,Jt]),[wp,qa]=d.useState(),fo=d.useCallback(async(b,z)=>{const F=b.current?.range;if(F===void 0||te===void 0||z.current===void 0)return;const B=z.current.range;if(S!==void 0){let Y=!1;if(S({fillDestination:{...B,x:B.x-W},patternSource:{...F,x:F.x-W},preventDefault:()=>Y=!0}),Y)return}let j=te(F,_.current.signal);typeof j!="object"&&(j=await j());const q=j,L=[];for(let Y=0;Y<B.width;Y++)for(let G=0;G<B.height;G++){const ae=[B.x+Y,B.y+G];if(zf(ae,F))continue;const Ie=q[G%F.height][Y%F.width];ko(Ie)||!xo(Ie)||L.push({location:ae,value:{...Ie}})}Vn(L),pn.current?.damage(L.map(Y=>({cell:Y.location})))},[te,Vn,S,W]),Cu=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}}};fo(b,Z)},[fo,Z]),ku=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}}};fo(b,Z)},[fo,Z]),xp=d.useCallback((b,z)=>{const F=s;if(u(void 0),Na(void 0),qa(void 0),Bo.current=!1,z)return;if(F?.fillHandle===!0&&Z.current!==void 0&&F.previousSelection?.current!==void 0){if(Hr===void 0)return;const Ie={...Z,current:{...Z.current,range:Qf(F.previousSelection.current.range,Hr)}};fo(F.previousSelection,Ie),fe(Ie,!0);return}const[B,j]=b.location,[q,L]=Fr.current??[],Y=()=>{co.current=!0},G=Ie=>{const Rt=Ie.isTouch||q===B&&L===j;if(Rt&&E?.([B-W,j],{...Ie,preventDefault:Y}),Ie.button===1)return!co.current;if(!co.current){const Ke=Tn(b.location),Xe=Jt(Ke);if(Xe!==void 0&&Xe.onClick!==void 0&&Rt){const Ge=Xe.onClick({...Ie,cell:Ke,posX:Ie.localEventX,posY:Ie.localEventY,bounds:Ie.bounds,theme:$o(Ke,b.location),preventDefault:Y});Ge!==void 0&&!ko(Ge)&&wo(Ge)&&(Vn([{location:Ie.location,value:Ge}]),pn.current?.damage([{cell:Ie.location}]))}if(co.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[Ge,vt]=Z.current.cell,[Gt,po]=F.previousSelection.current.cell;Ze=B===Ge&&B===Gt&&j===vt&&j===po&&(Ie.isDoubleClick===!0||ke==="second-click");break}case"single-click":{Ze=!0;break}}if(Ze){const Ge={inputType:"pointer",pointerActivation:Ie.isDoubleClick===!0?"double-click":Ke.activationBehaviorOverride??ke,pointerType:Ie.isTouch?"touch":"mouse"};return I?.([B-W,j],Ge),lo(Ie.bounds,Ge),!0}}return!1},ae=b.location[0]-W;if(b.isTouch){const Ie=Qt.current,Rt=wu.current;if(Ie.x!==Rt.x||Ie.y!==Rt.y)return;if(b.isLongTouch===!0){if(b.kind==="cell"&&fi(Z.current?.cell,b.location)){$?.([ae,b.location[1]],{...b,preventDefault:Y});return}else if(b.kind==="header"&&Z.columns.hasIndex(B)){ie?.(ae,{...b,preventDefault:Y});return}else if(b.kind===Yn){if(ae<0)return;J?.(ae,{...b,preventDefault:Y});return}}b.kind==="cell"?G(b)||_o(b):b.kind===Yn?X?.(ae,{...b,preventDefault:Y}):(b.kind===kr&&R?.(ae,{...b,preventDefault:Y}),_o(b));return}if(b.kind==="header"){if(ae<0)return;b.isEdge?b.isDoubleClick===!0&&Vi(B):b.button===0&&B===q&&j===L&&R?.(ae,{...b,preventDefault:Y})}if(b.kind===Yn){if(ae<0)return;b.button===0&&B===q&&j===L&&(X?.(ae,{...b,preventDefault:Y}),co.current||xu(b))}b.kind==="cell"&&(b.button===0||b.button===1)&&G(b),Fr.current=void 0},[s,Z,W,Hr,fo,fe,E,Tn,Jt,ke,$o,Vn,I,lo,$,ie,J,_o,X,R,Vi,xu]),Cp=d.useCallback(b=>{const z={...b,location:[b.location[0]-W,b.location[1]]};rt?.(z),s!==void 0&&b.buttons===0&&(u(void 0),Na(void 0),qa(void 0),Bo.current=!1),qa(F=>Bo.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]),kp=d.useCallback((b,z)=>{dt?.(b-W,z)},[dt,W]),Sp=d.useCallback((b,z)=>{je?.(b-W,z)},[je,W]),ho=Z?.current?.cell,Mp=d.useCallback((b,z,F,B,j,q)=>{er.current=!1;let L=ho;L!==void 0&&(L=[L[0]-W,L[1]]);const Y=ze===0?void 0:{x:0,y:b.y,width:ze,height:b.height},G=[];Y!==void 0&&G.push(Y),ct>0&&(G.push({x:b.x-W,y:Le-ct,width:b.width,height:ct}),ze>0&&G.push({x:0,y:Le-ct,width:ze,height:ct}));const ae={x:b.x-W,y:b.y,width:b.width,height:zt&&b.y+b.height>=Le?b.height-1:b.height,tx:j,ty:q,extras:{selected:L,freezeRegion:Y,freezeRegions:G}};Qt.current=ae,Di(ae),ao([z,F,B]),an?.(ae,ae.tx,ae.ty,ae.extras)},[ho,W,zt,Le,ze,ct,Di,an]),Rp=Cr(M,d.useCallback((b,z)=>M?.(b-W,z-W)!==!1,[M,W])),Ep=Cr(Se,d.useCallback((b,z)=>{Se?.(b-W,z-W),ne!=="none"&&Ye(Je.fromSingleSelection(z),void 0,!0)},[ne,Se,W,Ye])),Ka=d.useRef(!1),Ip=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()||(Ka.current=!0),u(void 0)},[He,W]),Tp=d.useCallback(()=>{Ka.current=!1},[]),Su=$t?.selectionBehavior,$i=d.useCallback(b=>{if(Su!=="block-spanning")return;const{isGroupHeader:z,path:F,groupRows:B}=zr(b);if(z)return[b,b];const j=F[F.length-1],q=b-j,L=b+B-j-1;return[q,L]},[zr,Su]),Ja=d.useRef(),Qa=d.useCallback(b=>{if(!oh(b,Ja.current)&&(Ja.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 z=Math.min(tr.current.location[1],b.location[1]),F=Math.max(tr.current.location[1],b.location[1])+1;ot(Je.fromSingleSelection([z,F]),void 0,!1)}else if(b.buttons!==0&&s!==void 0&&Z.current!==void 0&&!Ka.current&&!Bo.current&&(Be==="rect"||Be==="multi-rect")){const[z,F]=Z.current.cell;let[B,j]=b.location;if(j<0&&(j=Qt.current.y),s.fillHandle===!0&&s.previousSelection?.current!==void 0){const q=s.previousSelection.current.range;j=Math.min(j,zt?Le-1:Le);const L=$b(q,B,j,Tt);Na(L)}else{if(zt&&F===Le)return;if(zt&&j===Le)if(b.kind===xa)j--;else return;B=Math.max(B,W);const q=$i(F);j=q===void 0?j:$n(j,q[0],q[1]);const L=B-z,Y=j-F,G={x:L>=0?z:B,y:Y>=0?F:j,width:Math.abs(L)+1,height:Math.abs(Y)+1};wt({...Z.current,range:G},!0,!1,"drag")}}Mt?.({...b,location:[b.location[0]-W,b.location[1]]})}},[s,W,me,Z,Be,Mt,ot,zt,Le,Tt,$i,wt]),Op=d.useCallback(()=>{const b=Ja.current;if(b===void 0)return;const[z,F]=b.scrollEdge;let[B,j]=b.location;const q=Qt.current;z===-1?B=q.extras?.freezeRegion?.x??q.x:z===1&&(B=q.x+q.width),F===-1?j=Math.max(0,q.y):F===1&&(j=Math.min(Le-1,q.y+q.height)),B=$n(B,0,it.length-1),j=$n(j,0,Le-1),Qa({...b,location:[B,j]})},[it.length,Qa,Le]);ey(wp,Bt,Op);const jn=d.useCallback(b=>{if(Z.current===void 0)return;const[z,F]=b,[B,j]=Z.current.cell,q=Z.current.range;let L=q.x,Y=q.x+q.width,G=q.y,ae=q.y+q.height;const[Ie,Rt]=$i(j)??[0,Le-1],Ke=Rt+1;if(F!==0)switch(F){case 2:{ae=Ke,G=j,Ut(0,ae,"vertical");break}case-2:{G=Ie,ae=j+1,Ut(0,G,"vertical");break}case 1:{G<j?(G++,Ut(0,G,"vertical")):(ae=Math.min(Ke,ae+1),Ut(0,ae,"vertical"));break}case-1:{ae>j+1?(ae--,Ut(0,ae,"vertical")):(G=Math.max(Ie,G-1),Ut(0,G,"vertical"));break}default:gi()}if(z!==0)if(z===2)Y=it.length,L=B,Ut(Y-1-W,0,"horizontal");else if(z===-2)L=W,Y=B+1,Ut(L-W,0,"horizontal");else{let Xe=[];if(te!==void 0){const Ze=te({x:L,y:G,width:Y-L-W,height:ae-G},_.current.signal);typeof Ze=="object"&&(Xe=cy(Ze))}if(z===1){let Ze=!1;if(L<B){if(Xe.length>0){const Ge=Mr(L+1,B+1).find(vt=>!Xe.includes(vt-W));Ge!==void 0&&(L=Ge,Ze=!0)}else L++,Ze=!0;Ze&&Ut(L,0,"horizontal")}Ze||(Y=Math.min(it.length,Y+1),Ut(Y-1-W,0,"horizontal"))}else if(z===-1){let Ze=!1;if(Y>B+1){if(Xe.length>0){const Ge=Mr(Y-1,B,-1).find(vt=>!Xe.includes(vt-W));Ge!==void 0&&(Y=Ge,Ze=!0)}else Y--,Ze=!0;Ze&&Ut(Y-W,0,"horizontal")}Ze||(L=Math.max(W,L-1),Ut(L-W,0,"horizontal"))}else gi()}wt({cell:Z.current.cell,range:{x:L,y:G,width:Y-L,height:ae-G}},!0,!1,"keyboard-select")},[te,$i,Z,it.length,W,Le,Ut,wt]),Ga=d.useRef(Jn);Ga.current=Jn;const yr=d.useCallback((b,z,F,B)=>{const j=gn-(F?0:1);b=$n(b,W,on.length-1+W),z=$n(z,0,j);const q=ho?.[0],L=ho?.[1];if(b===q&&z===L)return!1;if(B&&Z.current!==void 0){const Y=[...Z.current.rangeStack];(Z.current.range.width>1||Z.current.range.height>1)&&Y.push(Z.current.range),fe({...Z,current:{cell:[b,z],range:{x:b,y:z,width:1,height:1},rangeStack:Y}},!0)}else wt({cell:[b,z],range:{x:b,y:z,width:1,height:1}},!0,!1,"keyboard-nav");return c.current!==void 0&&c.current[0]===b&&c.current[1]===z&&(c.current=void 0),Ga.current&&Ut(b-W,z),!0},[gn,W,on.length,ho,Z,Ut,fe,wt]),Dp=d.useCallback((b,z)=>{o?.cell!==void 0&&b!==void 0&&wo(b)&&(Vn([{location:o.cell,value:b}]),window.requestAnimationFrame(()=>{pn.current?.damage([{cell:o.cell}])})),kn(!0),i(void 0);const[F,B]=z;if(Z.current!==void 0&&(F!==0||B!==0)){const j=Z.current.cell[1]===gn-1&&b!==void 0,q=Z.current.cell[0]===it.length-1&&b!==void 0;let L=!0;if(j&&B===1&&be!==void 0){L=!1;const Y=Z.current.cell[0]+F,G=so(Y);vr(G??Y,!1)}if(q&&F===1&&Qe!==void 0){L=!1;const Y=Z.current.cell[1]+B;Li(Y,!1)}L&&yr($n(Z.current.cell[0]+F,0,it.length-1),$n(Z.current.cell[1]+B,0,gn-1),j,!1)}P?.(b,z)},[o?.cell,kn,Z,P,Vn,gn,yr,it.length,vr,Li,be,Qe,so]),Pp=d.useMemo(()=>`gdg-overlay-${uy++}`,[]),Lr=d.useCallback(b=>{kn();const z=[];for(let F=b.x;F<b.x+b.width;F++)for(let B=b.y;B<b.y+b.height;B++){const j=C([F-W,B]);if(!j.allowOverlay&&j.kind!==Q.Boolean)continue;let q;if(j.kind===Q.Custom){const L=Jt(j),Y=L?.provideEditor?.({...j,location:[F-W,B]});L?.onDelete!==void 0?q=L.onDelete(j):Gm(Y)&&(q=Y?.deletedValue?.(j))}else(wo(j)&&j.allowOverlay||j.kind===Q.Boolean)&&(q=Jt(j)?.onDelete?.(j));q!==void 0&&!ko(q)&&wo(q)&&z.push({location:[F,B],value:q})}Vn(z),pn.current?.damage(z.map(F=>({cell:F.location})))},[kn,C,Jt,Vn,W]),No=o!==void 0,Mu=d.useCallback(b=>{const z=()=>{b.stopPropagation(),b.preventDefault()},F={didMatch:!1},{bounds:B}=b,j=Z.columns,q=Z.rows,L=Gn;if(!No&&et(L.clear,b,F))fe(Qi,!1),_t?.();else if(!No&&et(L.selectAll,b,F))fe({columns:Je.empty(),rows:Je.empty(),current:{cell:Z.current?.cell??[W,0],range:{x:W,y:0,width:y.length,height:Le},rangeStack:[]}},!1);else if(et(L.search,b,F))a?.current?.focus({preventScroll:!0}),Oi(!0);else if(et(L.delete,b,F)){const Ze=Wt?.(Z)??!0;if(Ze!==!1){const Ge=Ze===!0?Z:Ze;if(Ge.current!==void 0){Lr(Ge.current.range);for(const vt of Ge.current.rangeStack)Lr(vt)}for(const vt of Ge.rows)Lr({x:W,y:vt,width:y.length,height:1});for(const vt of Ge.columns)Lr({x:vt,y:0,width:1,height:Le})}}if(F.didMatch)return z(),!0;if(Z.current===void 0)return!1;let[Y,G]=Z.current.cell;const[,ae]=Z.current.cell;let Ie=!1,Rt=!1;if(et(L.scrollToSelectedCell,b,F))Ni.current(Y-W,G);else if(ne!=="none"&&et(L.selectColumn,b,F))j.hasIndex(Y)?Ye(j.remove(Y),void 0,!0):ne==="single"?Ye(Je.fromSingleSelection(Y),void 0,!0):Ye(void 0,Y,!0);else if(me!=="none"&&et(L.selectRow,b,F))q.hasIndex(G)?ot(q.remove(G),void 0,!0):me==="single"?ot(Je.fromSingleSelection(G),void 0,!0):ot(void 0,G,!0);else if(!No&&B!==void 0&&et(L.activateCell,b,F))if(G===Le&&zt)window.setTimeout(()=>{const Ze=so(Y);vr(Ze??Y)},0);else{const Ze={inputType:"keyboard",key:b.key};I?.([Y-W,G],Ze),lo(B,Ze)}else Z.current.range.height>1&&et(L.downFill,b,F)?ku():Z.current.range.width>1&&et(L.rightFill,b,F)?Cu():et(L.goToNextPage,b,F)?G+=Math.max(1,Qt.current.height-4):et(L.goToPreviousPage,b,F)?G-=Math.max(1,Qt.current.height-4):et(L.goToFirstCell,b,F)?(i(void 0),G=0,Y=0):et(L.goToLastCell,b,F)?(i(void 0),G=Number.MAX_SAFE_INTEGER,Y=Number.MAX_SAFE_INTEGER):et(L.selectToFirstCell,b,F)?(i(void 0),jn([-2,-2])):et(L.selectToLastCell,b,F)?(i(void 0),jn([2,2])):No?(et(L.closeOverlay,b,F)&&i(void 0),et(L.acceptOverlayDown,b,F)&&(i(void 0),G++),et(L.acceptOverlayUp,b,F)&&(i(void 0),G--),et(L.acceptOverlayLeft,b,F)&&(i(void 0),Y--),et(L.acceptOverlayRight,b,F)&&(i(void 0),Y++)):(et(L.goDownCell,b,F)?G+=1:et(L.goUpCell,b,F)?G-=1:et(L.goRightCell,b,F)?Y+=1:et(L.goLeftCell,b,F)?Y-=1:et(L.goDownCellRetainSelection,b,F)?(G+=1,Ie=!0):et(L.goUpCellRetainSelection,b,F)?(G-=1,Ie=!0):et(L.goRightCellRetainSelection,b,F)?(Y+=1,Ie=!0):et(L.goLeftCellRetainSelection,b,F)?(Y-=1,Ie=!0):et(L.goToLastRow,b,F)?G=Le-1:et(L.goToFirstRow,b,F)?G=Number.MIN_SAFE_INTEGER:et(L.goToLastColumn,b,F)?Y=Number.MAX_SAFE_INTEGER:et(L.goToFirstColumn,b,F)?Y=Number.MIN_SAFE_INTEGER:(Be==="rect"||Be==="multi-rect")&&(et(L.selectGrowDown,b,F)?jn([0,1]):et(L.selectGrowUp,b,F)?jn([0,-1]):et(L.selectGrowRight,b,F)?jn([1,0]):et(L.selectGrowLeft,b,F)?jn([-1,0]):et(L.selectToLastRow,b,F)?jn([0,2]):et(L.selectToFirstRow,b,F)?jn([0,-2]):et(L.selectToLastColumn,b,F)?jn([2,0]):et(L.selectToFirstColumn,b,F)&&jn([-2,0])),Rt=F.didMatch);if(Nn!==void 0&&Nn!=="normal"&&G!==ae){const Ze=Nn==="skip-up"||Nn==="skip"||Nn==="block",Ge=Nn==="skip-down"||Nn==="skip"||Nn==="block",vt=G<ae;if(vt&&Ze){for(;G>=0&&zr(G).isGroupHeader;)G--;G<0&&(G=ae)}else if(!vt&&Ge){for(;G<Le&&zr(G).isGroupHeader;)G++;G>=Le&&(G=ae)}}const Ke=yr(Y,G,!1,Ie),Xe=F.didMatch;return Xe&&(Ke||!Rt||xn)&&z(),Xe},[Nn,No,Z,Gn,ne,me,Be,W,zr,Le,yr,fe,_t,y.length,Wt,xn,Lr,Ye,ot,zt,so,vr,I,lo,ku,Cu,jn]),jo=d.useCallback(b=>{let z=!1;if(U!==void 0&&U({...b,...b.location&&{location:[b.location[0]-W,b.location[1]]},cancel:()=>{z=!0}}),z||Mu(b)||Z.current===void 0)return;const[F,B]=Z.current.cell,j=Qt.current;if(Oe&&!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&&xo(C([F-W,Math.max(0,Math.min(B,Le-1))]))){if((!zt||B!==Le)&&(j.y>B||B>j.y+j.height||j.x>F||F>j.x+j.width))return;const q={inputType:"keyboard",key:b.key};I?.([F-W,B],q),lo(b.bounds,q,b.key),b.stopPropagation(),b.preventDefault()}},[Oe,U,Mu,Z,C,W,Le,zt,I,lo]),Ap=d.useCallback((b,z)=>{const F=b.location[0]-W;if(b.kind==="header"&&ie?.(F,{...b,preventDefault:z}),b.kind===Yn){if(F<0)return;J?.(F,{...b,preventDefault:z})}if(b.kind==="cell"){const[B,j]=b.location;$?.([F,j],{...b,preventDefault:z}),wv(Z,b.location)||yr(B,j,!1,!1)}},[Z,$,J,ie,W,yr]),el=d.useCallback(async b=>{if(!Gn.paste)return;function z(L,Y,G,ae){const Ie=typeof G=="object"?G?.join(`
|
|
183
|
+
`)??"":G?.toString()??"";if(!ko(L)&&xo(L)&&L.readonly!==!0){const Rt=O?.(Ie,L);if(Rt!==void 0&&wo(Rt))return{location:Y,value:Rt};const Ke=Jt(L);if(Ke===void 0)return;if(Ke.kind===Q.Custom){Pn(L.kind===Q.Custom);const Xe=Ke.onPaste?.(Ie,L.data);return Xe===void 0?void 0:{location:Y,value:{...L,data:Xe}}}else{const Xe=Ke.onPaste?.(Ie,L,{formatted:ae,formattedString:typeof ae=="string"?ae:ae?.join(`
|
|
184
|
+
`),rawValue:G});return Xe===void 0?void 0:(Pn(Xe.kind===L.kind),{location:Y,value:Xe})}}}const F=Z.columns,B=Z.rows,j=Bt.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]:B.length===1&&(q=[W,B.first()??0]),j&&q!==void 0){let L,Y;const G="text/plain",ae="text/html";if(navigator.clipboard.read!==void 0){const Xe=await navigator.clipboard.read();for(const Ze of Xe){if(Ze.types.includes(ae)){const Ge=await(await Ze.getType(ae)).text(),vt=Qc(Ge);if(vt!==void 0){L=vt;break}}Ze.types.includes(G)&&(Y=await(await Ze.getType(G)).text())}}else if(navigator.clipboard.readText!==void 0)Y=await navigator.clipboard.readText();else if(b!==void 0&&b?.clipboardData!==null){if(b.clipboardData.types.includes(ae)){const Xe=b.clipboardData.getData(ae);L=Qc(Xe)}L===void 0&&b.clipboardData.types.includes(G)&&(Y=b.clipboardData.getData(G))}else return;const[Ie,Rt]=q,Ke=[];do{if(De===void 0){const Xe=Tn(q),Ze=Y??L?.map(vt=>vt.map(Gt=>Gt.rawValue).join(" ")).join(" ")??"",Ge=z(Xe,q,Ze,void 0);Ge!==void 0&&Ke.push(Ge);break}if(L===void 0){if(Y===void 0)return;L=X1(Y)}if(De===!1||typeof De=="function"&&De?.([q[0]-W,q[1]],L.map(Xe=>Xe.map(Ze=>Ze.rawValue?.toString()??"")))!==!0)return;for(const[Xe,Ze]of L.entries()){if(Xe+Rt>=Le)break;for(const[Ge,vt]of Ze.entries()){const Gt=[Ge+Ie,Xe+Rt],[po,ji]=Gt;if(po>=it.length||ji>=gn)continue;const Uo=Tn(Gt),nr=z(Uo,Gt,vt.rawValue,vt.formatted);nr!==void 0&&Ke.push(nr)}}}while(!1);Vn(Ke),pn.current?.damage(Ke.map(Xe=>({cell:Xe.location})))}},[O,Jt,Tn,Z,Gn.paste,Bt,it.length,Vn,gn,De,W,Le]);Sn("paste",el,f,!1,!0);const Wo=d.useCallback(async(b,z)=>{if(!Gn.copy)return;const F=z===!0||Bt.current?.contains(document.activeElement)===!0||l.current?.contains(document.activeElement)===!0,B=Z.columns,j=Z.rows,q=(L,Y)=>{if(!we)ed(L,Y,b);else{const G=Y.map(ae=>({kind:Q.Text,data:y[ae].title,displayData:y[ae].title,allowOverlay:!1}));ed([G,...L],Y,b)}};if(F&&te!==void 0){if(Z.current!==void 0){let L=te(Z.current.range,_.current.signal);typeof L!="object"&&(L=await L()),q(L,Mr(Z.current.range.x-W,Z.current.range.x+Z.current.range.width-W))}else if(j!==void 0&&j.length>0){const L=[...j].map(Y=>{const G=te({x:W,y:Y,width:y.length,height:1},_.current.signal);return typeof G=="object"?G[0]:G().then(ae=>ae[0])});if(L.some(Y=>Y instanceof Promise)){const Y=await Promise.all(L);q(Y,Mr(y.length))}else q(L,Mr(y.length))}else if(B.length>0){const L=[],Y=[];for(const G of B){let ae=te({x:G,y:0,width:1,height:Le},_.current.signal);typeof ae!="object"&&(ae=await ae()),L.push(ae),Y.push(G-W)}if(L.length===1)q(L[0],Y);else{const G=L.reduce((ae,Ie)=>ae.map((Rt,Ke)=>[...Rt,...Ie[Ke]]));q(G,Y)}}}},[y,te,Z,Gn.copy,W,Bt,Le,we]);Sn("copy",Wo,f,!1,!1);const Hp=d.useCallback(async b=>{if(!(!Gn.cut||!(Bt.current?.contains(document.activeElement)===!0||l.current?.contains(document.activeElement)===!0))&&(await Wo(b),Z.current!==void 0)){let z={current:{cell:Z.current.cell,range:Z.current.range,rangeStack:[]},rows:Je.empty(),columns:Je.empty()};const F=Wt?.(z);if(F===!1||(z=F===!0?z:F,z.current===void 0))return;Lr(z.current.range)}},[Lr,Z,Gn.cut,Wo,Bt,Wt]);Sn("cut",Hp,f,!1,!1);const zp=d.useCallback((b,z)=>{if(pe!==void 0){W!==0&&(b=b.map(j=>[j[0]-W,j[1]])),pe(b,z);return}if(b.length===0||z===-1)return;const[F,B]=b[z];c.current!==void 0&&c.current[0]===F&&c.current[1]===B||(c.current=[F,B],yr(F,B,!1,!1))},[pe,W,yr]),[_i,Bi]=kt?.current?.cell??[],Ni=d.useRef(Ut);Ni.current=Ut,d.useLayoutEffect(()=>{Ga.current&&!er.current&&_i!==void 0&&Bi!==void 0&&(_i!==ue.current?.current?.cell[0]||Bi!==ue.current?.current?.cell[1])&&Ni.current(_i,Bi),er.current=!1},[_i,Bi]);const Ru=Z.current!==void 0&&(Z.current.cell[0]>=it.length||Z.current.cell[1]>=gn);d.useLayoutEffect(()=>{Ru&&fe(Qi,!1)},[Ru,fe]);const Fp=d.useMemo(()=>zt===!0&&Ee?.tint===!0?Je.fromSingleSelection(gn-1):Je.empty(),[gn,zt,Ee?.tint]),Lp=d.useCallback(b=>typeof nn=="boolean"?nn:nn?.(b-W)??!0,[W,nn]),Vp=d.useMemo(()=>{if(Xa===void 0||l.current===null)return null;const{bounds:b,group:z}=Xa,F=l.current.getBoundingClientRect();return d.createElement(F1,{bounds:b,group:z,canvasBounds:F,onClose:()=>Za(void 0),onFinish:B=>{Za(void 0),ge?.(z,B)}})},[ge,Xa]),$p=Math.min(it.length,ze+(Cn?1:0));d.useImperativeHandle(t,()=>({appendRow:(b,z)=>vr(b+W,z),appendColumn:(b,z)=>Li(b,z),updateCells:b=>(W!==0&&(b=b.map(z=>({cell:[z.cell[0]+W,z.cell[1]]}))),pn.current?.damage(b)),getBounds:(b,z)=>{if(!(l?.current===null||Bt?.current===null)){if(b===void 0&&z===void 0){const F=l.current.getBoundingClientRect(),B=F.width/Bt.current.clientWidth;return{x:F.x-Bt.current.scrollLeft*B,y:F.y-Bt.current.scrollTop*B,width:Bt.current.scrollWidth*B,height:Bt.current.scrollHeight*B}}return pn.current?.getBounds((b??0)+W,z)}},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 el();break}},scrollTo:Ut,remeasureColumns:b=>{for(const z of b)Vi(z+W)},getMouseArgsForPosition:(b,z,F)=>{if(pn?.current===null)return;const B=pn.current.getMouseArgsForPosition(b,z,F);if(B!==void 0)return{...B,location:[B.location[0]-W,B.location[1]]}}}),[vr,Li,Vi,Bt,Wo,jo,el,W,Ut]);const[Eu,Iu]=ho??[],_p=d.useCallback(b=>{const[z,F]=b;if(F===-1){ne!=="none"&&(Ye(Je.fromSingleSelection(z),void 0,!1),kn());return}Eu===z&&Iu===F||(wt({cell:b,range:{x:z,y:F,width:1,height:1}},!0,!1,"keyboard-nav"),Ut(z,F))},[ne,kn,Ut,Eu,Iu,wt,Ye]),[Bp,Np]=d.useState(!1),Tu=d.useRef(yf(b=>{Np(b)},5)),jp=d.useCallback(()=>{Tu.current(!0),Z.current===void 0&&Z.columns.length===0&&Z.rows.length===0&&s===void 0&&wt({cell:[W,Pi],range:{x:W,y:Pi,width:1,height:1}},!0,!1,"keyboard-select")},[Pi,Z,s,W,wt]),Wp=d.useCallback(()=>{Tu.current(!1)},[]),[Up,Yp]=d.useMemo(()=>{let b;const z=pt?.scrollbarWidthOverride??as(),F=Le+(zt?1:0);if(typeof Qn=="number")b=hn+F*Qn;else{let j=0;const q=Math.min(F,10);for(let L=0;L<q;L++)j+=Qn(L);j=Math.floor(j/q),b=hn+F*j}b+=z;const B=it.reduce((j,q)=>q.width+j,0)+z;return[`${Math.min(1e5,B)}px`,`${Math.min(1e5,b)}px`]},[it,pt?.scrollbarWidthOverride,Qn,Le,zt,hn]),Xp=d.useMemo(()=>Hv(at),[at]);return d.createElement(Uf.Provider,{value:at},d.createElement(J1,{style:Xp,className:K,inWidth:m??Up,inHeight:w??Yp},d.createElement(P1,{fillHandle:Ot,drawFocusRing:zo,experimental:pt,fixedShadowX:bn,fixedShadowY:lr,getRowThemeOverride:Dr,headerIcons:Kn,imageWindowLoader:N,initialSize:_e,isDraggable:We,onDragLeave:Dt,onRowMoved:qt,overscrollX:$a,overscrollY:_a,preventDiagonalScrolling:yn,rightElement:jt,rightElementProps:wn,smoothScrollX:Kr,smoothScrollY:Jr,className:K,enableGroups:Ln,onCanvasFocused:jp,onCanvasBlur:Wp,canvasRef:l,onContextMenu:Ap,theme:at,cellXOffset:vp,cellYOffset:Pi,accessibilityHeight:dr.height,onDragEnd:Tp,columns:it,nonGrowWidth:At,drawHeader:gt,onColumnProposeMove:Rp,drawCell:sn,disabledRows:Fp,freezeColumns:$p,lockColumns:W,firstColAccessible:W===0,getCellContent:Tn,minColumnWidth:mr,maxColumnWidth:no,searchInputRef:a,showSearch:io,onSearchClose:Ba,highlightRegions:bp,getCellsForSelection:te,getGroupDetails:ja,headerHeight:Vo,isFocused:Bp,groupHeaderHeight:Ln?ro:0,freezeTrailingRows:ct+(zt&&Ee?.sticky===!0?1:0),hasAppendRow:zt,onColumnResize:Ue,onColumnResizeEnd:Ce,onColumnResizeStart:qe,onCellFocused:_p,onColumnMoved:Ep,onDragStart:Ip,onHeaderMenuClick:kp,onHeaderIndicatorClick:Sp,onItemHovered:Qa,isFilling:s?.fillHandle===!0,onMouseMove:Cp,onKeyDown:jo,onKeyUp:re,onMouseDown:yp,onMouseUp:xp,onDragOverCell:un,onDrop:Lt,onSearchResultsChanged:zp,onVisibleRegionChanged:Mp,clientSize:Vt,rowHeight:Qn,searchResults:le,searchValue:H,onSearchValueChange:V,rows:gn,scrollRef:Bt,selection:Z,translateX:dr.tx,translateY:dr.ty,verticalBorder:Lp,gridRef:pn,getCellRenderer:Jt,resizeIndicator:Po}),Vp,o!==void 0&&d.createElement(d.Suspense,{fallback:null},d.createElement(sy,{...o,validateCell:Re,bloom:T,id:Pp,getCellRenderer:Jt,className:pt?.isSubGrid===!0?"click-outside-ignore":void 0,provideEditor:Mn,imageEditorOverride:g,portalElementRef:Ho,onFinishEditing:Dp,markdownDivCreateNode:p,isOutsideClick:cn,customEventTarget:pt?.eventTarget}))))},fy=d.forwardRef(dy);function rd(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,f=Math.floor(o.y+l/2),g=Cf(c,l,i.cellVerticalPadding),h=xf(t.contentAlign??"center",s,a,i.cellHorizontalPadding,g),p=wf(h,f,g),m=kf(s+n,u+r,p);return Es(t)&&m}const hy={getAccessibilityString:e=>e.data?.toString()??"false",kind:Q.Boolean,needsHover:!0,useLabel:!1,needsHoverPosition:!0,measure:()=>50,draw:e=>py(e,e.cell.data,Es(e.cell),e.cell.maxSize??e.theme.checkboxMaxSize,e.cell.hoverEffectIntensity??.35),onDelete:e=>({...e,data:!1}),onSelect:e=>{rd(e)&&e.preventDefault()},onClick:e=>{if(rd(e))return{...e.cell,data:ah(e.cell.data)}},onPaste:(e,t)=>{let n=ha;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 py(e,t,n,r,o){if(!n&&t===ha)return;const{ctx:i,hoverAmount:a,theme:l,rect:s,highlighted:u,hoverX:c,hoverY:f,cell:{contentAlign:g}}=e,{x:h,y:p,width:m,height:w}=s;let y=!1;if(o>0){let v=n?1-o+o*a:.4;if(t===ha&&(v*=a),v===0)return;v<1&&(y=!0,i.globalAlpha=v)}Ws(i,l,t,h,p,m,w,u,c,f,r,g),y&&(i.globalAlpha=1)}const gy=dn("div")({name:"BubblesOverlayEditorStyle",class:"gdg-b1ygi5by",propsAsIs:!1}),my=e=>{const{bubbles:t}=e;return d.createElement(gy,null,t.map((n,r)=>d.createElement("div",{key:r,className:"boe-bubble"},n)),d.createElement("textarea",{className:"gdg-input",autoFocus:!0}))},vy={getAccessibilityString:e=>Sf(e.data),kind:Q.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=>by(e,e.cell.data),provideEditor:()=>e=>{const{value:t}=e;return d.createElement(my,{bubbles:t.data})},onPaste:()=>{}};function by(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 f=[];for(const g of t){if(c>a+s)break;const h=Ir(g,o,r.baseFontFull).width;f.push({x:c,width:h}),c+=h+r.bubblePadding*2+r.bubbleMargin}o.beginPath();for(const g of f)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,h]of f.entries())o.beginPath(),o.fillStyle=r.textBubble,o.fillText(t[g],h.x+r.bubblePadding,l+u/2+qn(o,r))}const yy=dn("div")({name:"DrilldownOverlayEditorStyle",class:"gdg-d4zsq0x",propsAsIs:!1}),wy=e=>{const{drilldowns:t}=e;return d.createElement(yy,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))))},xy={getAccessibilityString:e=>Sf(e.data.map(t=>t.text)),kind:Q.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=>ky(e,e.cell.data),provideEditor:()=>e=>{const{value:t}=e;return d.createElement(wy,{drilldowns:t.data})},onPaste:()=>{}},jl={};function Cy(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,f=(c+i*2)*o,g=`${e},${t},${o},${n}`;if(jl[g]!==void 0)return{el:jl[g],height:s,width:f,middleWidth:l*o,sideWidth:u*o,padding:i*o,dpr:o};const h=document.createElement("canvas"),p=h.getContext("2d");return p===null?null:(h.width=f,h.height=s,p.scale(o,o),jl[g]=h,p.beginPath(),Zn(p,i,i,c,a,r),p.shadowColor="rgba(24, 25, 34, 0.4)",p.shadowBlur=1,p.fillStyle=e,p.fill(),p.shadowColor="rgba(24, 25, 34, 0.3)",p.shadowOffsetY=1,p.shadowBlur=5,p.fillStyle=e,p.fill(),p.shadowOffsetY=0,p.shadowBlur=0,p.shadowBlur=0,p.beginPath(),Zn(p,i+.5,i+.5,c,a,r),p.strokeStyle=t,p.lineWidth=1,p.stroke(),{el:h,height:s,width:f,sideWidth:u*o,middleWidth:r*o,padding:i*o,dpr:o})}function ky(e,t){const{rect:n,theme:r,ctx:o,imageLoader:i,col:a,row:l}=e,{x:s,width:u}=n,c=r.baseFontFull,f=_s(o,c),g=Math.min(n.height,Math.max(16,Math.ceil(f*r.lineHeight)*2)),h=Math.floor(n.y+(n.height-g)/2),p=g-10,m=r.bubblePadding,w=r.bubbleMargin;let y=s+r.cellHorizontalPadding;const v=r.roundingRadius??6,C=Cy(r.bgCell,r.drilldownBorder,g,v),E=[];for(const I of t){if(y>s+u)break;const S=Ir(I.text,o,c).width;let P=0;I.img!==void 0&&i.loadOrGetImage(I.img,a,l)!==void 0&&(P=p-8+4);const O=S+P+m*2;E.push({x:y,width:O}),y+=O+w}if(C!==null){const{el:I,height:S,middleWidth:P,sideWidth:O,width:x,dpr:A,padding:T}=C,R=O/A,M=T/A;for(const D of E){const k=Math.floor(D.x),X=Math.floor(D.width),$=X-(R-M)*2;o.imageSmoothingEnabled=!1,o.drawImage(I,0,0,O,S,k-M,h,R,g),$>0&&o.drawImage(I,O,0,P,S,k+(R-M),h,$,g),o.drawImage(I,x-O,0,O,S,k+X-(R-M),h,R,g),o.imageSmoothingEnabled=!0}}o.beginPath();for(const[I,S]of E.entries()){const P=t[I];let O=S.x+m;if(P.img!==void 0){const x=i.loadOrGetImage(P.img,a,l);if(x!==void 0){const A=p-8;let T=0,R=0,M=x.width,D=x.height;M>D?(T+=(M-D)/2,M=D):D>M&&(R+=(D-M)/2,D=M),o.beginPath(),Zn(o,O,h+g/2-A/2,A,A,r.roundingRadius??3),o.save(),o.clip(),o.drawImage(x,T,R,M,D,O,h+g/2-A/2,A,A),o.restore(),O+=A+4}}o.beginPath(),o.fillStyle=r.textBubble,o.fillText(P.text,O,h+g/2+qn(o,r))}}const Sy={getAccessibilityString:e=>e.data.join(", "),kind:Q.Image,needsHover:!1,useLabel:!1,needsHoverPosition:!1,draw:e=>My(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??I0;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}}},Wl=4;function My(e,t,n,r){const{rect:o,col:i,row:a,theme:l,ctx:s,imageLoader:u}=e,{x:c,y:f,height:g,width:h}=o,p=g-l.cellVerticalPadding*2,m=[];let w=0;for(let v=0;v<t.length;v++){const C=t[v];if(C.length===0)continue;const E=u.loadOrGetImage(C,i,a);if(E!==void 0){m[v]=E;const I=E.width*(p/E.height);w+=I+Wl}}if(w===0)return;w-=Wl;let y=c+l.cellHorizontalPadding;r==="right"?y=Math.floor(c+h-l.cellHorizontalPadding-w):r==="center"&&(y=Math.floor(c+h/2-w/2));for(const v of m){if(v===void 0)continue;const C=v.width*(p/v.height);n>0&&(s.beginPath(),Zn(s,y,f+l.cellVerticalPadding,C,p,n),s.save(),s.clip()),s.drawImage(v,y,f+l.cellVerticalPadding,C,p),n>0&&s.restore(),y+=C+Wl}}function Ry(e,t){let n=e*49632+t*325176;return n^=n<<13,n^=n>>17,n^=n<<5,n/4294967295*2}const Ey={getAccessibilityString:()=>"",kind:Q.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(Ry(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=Ur(a.textDark,.1),o.fill()},onPaste:()=>{}},Iy=()=>e=>e.targetWidth,od=dn("div")({name:"MarkdownOverlayEditorStyle",class:"gdg-m1pnx84e",propsAsIs:!1,vars:{"m1pnx84e-0":[Iy(),"px"]}}),Ty=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,f]=d.useState(s===""||r),g=d.useCallback(()=>{f(p=>!p)},[]),h=s?"gdg-ml-6":"";return c?d.createElement(od,{targetWidth:i.width-20},d.createElement(Zr,{autoFocus:!0,highlight:!1,validatedSelection:l,value:s,onKeyDown:p=>{p.key==="Enter"&&p.stopPropagation()},onChange:n}),d.createElement("div",{className:`gdg-edit-icon gdg-checkmark-hover ${h}`,onClick:()=>a(t)},d.createElement(x0,null))):d.createElement(od,{targetWidth:i.width},d.createElement(uv,{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 ${h}`,onClick:g},d.createElement(Os,null))),d.createElement("textarea",{className:"gdg-md-edit-textarea gdg-input",autoFocus:!0}))},Oy={getAccessibilityString:e=>e.data?.toString()??"",kind:Q.Markdown,needsHover:!1,needsHoverPosition:!1,drawPrep:Ri,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(Ty,{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}},Dy={getAccessibilityString:e=>e.row.toString(),kind:_n.Marker,needsHover:!0,needsHoverPosition:!1,drawPrep:Py,measure:()=>44,draw:e=>Hy(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 Py(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=Ay,n.textAlign="center",i}function Ay(e){const{ctx:t}=e;t.textAlign="start"}function Hy(e,t,n,r,o,i){const{ctx:a,rect:l,hoverAmount:s,theme:u}=e,{x:c,y:f,width:g,height:h}=l,p=n?1:r==="checkbox-visible"?.6+.4*s:s;if(r!=="number"&&p>0){a.globalAlpha=p;const m=7*(n?s:1);if(Ws(a,u,n,o?c+m:c,f,o?g-m:g,h,!0,void 0,void 0,u.checkboxMaxSize,"center",i),o){a.globalAlpha=s,a.beginPath();for(const w of[3,6])for(const y of[-5,-1,3])a.rect(c+w,f+h/2+y,2,2);a.fillStyle=u.textLight,a.fill(),a.beginPath()}a.globalAlpha=1}if(r==="number"||r==="both"&&!n){const m=t.toString(),w=u.markerFontFull,y=c+g/2;r==="both"&&s!==0&&(a.globalAlpha=1-s),a.fillStyle=u.textLight,a.font=w,a.fillText(m,y,f+h/2+qn(a,w)),s!==0&&(a.globalAlpha=1)}}const zy={getAccessibilityString:()=>"",kind:_n.NewRow,needsHover:!0,needsHoverPosition:!1,measure:()=>200,draw:e=>Fy(e,e.cell.hint,e.cell.icon),onPaste:()=>{}};function Fy(e,t,n){const{ctx:r,rect:o,hoverAmount:i,theme:a,spriteManager:l}=e,{x:s,y:u,width:c,height:f}=o;r.beginPath(),r.globalAlpha=i,r.rect(s+1,u+1,c,f-2),r.fillStyle=a.bgHeaderHovered,r.fill(),r.globalAlpha=1,r.beginPath();const g=t!=="";let h=0;if(n!==void 0){const p=f-8,m=s+8/2,w=u+8/2;l.drawSprite(n,"normal",r,m,w,p,a,g?1:i),h=p}else{h=24;const p=12,m=g?p:i*p,w=g?0:(1-i)*p*.5,y=a.cellHorizontalPadding+4;m>0&&(r.moveTo(s+y+w,u+f/2),r.lineTo(s+y+w+m,u+f/2),r.moveTo(s+y+w+m*.5,u+f/2-m*.5),r.lineTo(s+y+w+m*.5,u+f/2+m*.5),r.lineWidth=2,r.strokeStyle=a.bgIconHeader,r.lineCap="round",r.stroke())}r.fillStyle=a.textMedium,r.fillText(t,h+s+a.cellHorizontalPadding+.5,u+f/2+qn(r,a)),r.beginPath()}function uh(e,t,n,r,o,i,a){e.textBaseline="alphabetic";const l=Ly(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??Ur(t.textDark,.1),e.fill(),e.globalAlpha=1,e.fillStyle=t.textDark,e.textBaseline="middle",a?.("text")}function Ly(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=Ir(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 Vy=d.lazy(async()=>await ks(()=>import("./number-overlay-editor--_WCmOH8-DebLrQQ4.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]))),$y={getAccessibilityString:e=>e.data?.toString()??"",kind:Q.Number,needsHover:e=>e.hoverEffect===!0,needsHoverPosition:!1,useLabel:!0,drawPrep:Ri,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&&uh(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(Vy,{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}}},_y={getAccessibilityString:()=>"",measure:()=>108,kind:Q.Protected,needsHover:!1,needsHoverPosition:!1,draw:By,onPaste:()=>{}};function By(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(lc(30))*l,f=Math.sin(lc(30))*l;for(let g=0;g<12;g++)t.moveTo(s,u-l),t.lineTo(s,u+l),t.moveTo(s+c,u-f),t.lineTo(s-c,u+f),t.moveTo(s-c,u-f),t.lineTo(s+c,u+f),s+=8;t.lineWidth=1.1,t.lineCap="square",t.strokeStyle=n.textLight,t.stroke()}const Ny={getAccessibilityString:e=>e.data?.toString()??"",kind:Q.RowID,needsHover:!1,needsHoverPosition:!1,drawPrep:(e,t)=>Ri(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(Zr,{highlight:t,autoFocus:r.readonly!==!0,disabled:r.readonly!==!1,value:r.data,validatedSelection:o,onChange:i=>n({...r,data:i.target.value})})},onPaste:()=>{}},jy={getAccessibilityString:e=>e.data?.toString()??"",kind:Q.Text,needsHover:e=>e.hoverEffect===!0,needsHoverPosition:!1,drawPrep:Ri,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:f,hoverEffectTheme:g}=t;c===!0&&n>0&&uh(o,a,g,s,i,n,l),rr(e,s,u,f,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(Zr,{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}},Wy=dn("div")({name:"UriOverlayEditorStyle",class:"gdg-u1rrojo",propsAsIs:!1}),Uy=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(Zr,{validatedSelection:i,highlight:!0,autoFocus:!0,value:t,onChange:n}):d.createElement(Wy,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(Os,null)),d.createElement("textarea",{className:"gdg-input",autoFocus:!0}))};function ch(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 id(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=$f(a,i.baseFontFull);if(l===void 0)return!1;const s=ch(l,n,i,t.contentAlign);return jr({x:s.x-4,y:s.y-4,width:s.width+8,height:s.height+8},r,o)}const Yy={getAccessibilityString:e=>e.data?.toString()??"",kind:Q.Uri,needsHover:e=>e.hoverEffect===!0,needsHoverPosition:!0,useLabel:!0,drawPrep:Ri,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=Ir(s,l,n.baseFontFull),f=ch(c,a,n,t.contentAlign),{x:g,y:h,width:p,height:m}=f;if(o>=g-4&&o<=g-4+p+8&&i>=h-4&&i<=h-4+m+8){const w=qn(l,n.baseFontFull);r("pointer");const y=5,v=h-w;l.beginPath(),l.moveTo(a.x+g,Math.floor(a.y+v+m+y)+.5),l.lineTo(a.x+g+p,Math.floor(a.y+v+m+y)+.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=>{id(e)&&e.preventDefault()},onClick:e=>{const{cell:t}=e;id(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(Uy,{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}},Xy=[Dy,zy,hy,vy,xy,Sy,Ey,Oy,$y,_y,Ny,jy,Yy];var Ul,ad;function Zy(){if(ad)return Ul;ad=1;var e=bf(),t=Da(),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 Ul=r,Ul}var qy=Zy();const Ky=Er(qy),Yl=[];class Jy extends Nf{imageLoaded=()=>{};loadedLocations=[];cache={};setCallback(t){this.imageLoaded=t}sendLoaded=Ky(()=>{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:[Xn(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 f of c.cells)this.loadedLocations.push(js(f));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=Xn(n,r);return i.cells.includes(a)||i.cells.push(a),i.img}else this.loadImage(t,n,r,o)}}const Qy=(e,t)=>{const n=d.useMemo(()=>({...Fb,...e.headerIcons}),[e.headerIcons]),r=d.useMemo(()=>e.renderers??Xy,[e.renderers]),o=d.useMemo(()=>e.imageWindowLoader??new Jy,[e.imageWindowLoader]);return d.createElement(fy,{...e,renderers:r,headerIcons:n,ref:t,imageWindowLoader:o})},Gy=d.forwardRef(Qy);function dh(e,t){const n=d.useRef(null),r=d.useRef(),o=d.useCallback(()=>{n.current&&(clearTimeout(n.current),n.current=null)},[]);return d.useEffect(()=>o,[o]),{debouncedCallback:d.useCallback((...i)=>{r.current=i,o(),n.current=setTimeout(()=>{r.current&&(e(...r.current),r.current=void 0)},t)},[e,t,o]),cancel:o}}var gs={exports:{}},ew=gs.exports,ld;function tw(){return ld||(ld=1,(function(e,t){(function(n,r){try{e.exports=r(pm)}catch{e.exports=r}n&&(n.momentDurationFormatSetup=n.moment?r(n.moment):r)})(ew,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,H){return H.length>V.length?!1:V.indexOf(H)!==-1}function c(V){for(var H="";V;)H+="0",V-=1;return H}function f(V){for(var H=V.split("").reverse(),U=0,re=!0;re&&U<H.length;)U?H[U]==="9"?H[U]="0":(H[U]=(parseInt(H[U],10)+1).toString(),re=!1):(parseInt(H[U],10)<5&&(re=!1),H[U]="0"),U+=1;return re&&H.push("1"),H.reverse().join("")}function g(V,H){var U=P(k(H).sort(),function(se){return se+":"+H[se]}).join(","),re=V+"+"+U;return g.cache[re]||(g.cache[re]=Intl.NumberFormat(V,H)),g.cache[re]}g.cache={};function h(V,H,U){var re=H.useToLocaleString,se=H.useGrouping,Oe=se&&H.grouping.slice(),be=H.maximumSignificantDigits,Qe=H.minimumIntegerDigits||1,Se=H.fractionDigits||0,It=H.groupingSeparator,st=H.decimalSeparator;if(re&&U){var Be={minimumIntegerDigits:Qe,useGrouping:se};if(Se&&(Be.maximumFractionDigits=Se,Be.minimumFractionDigits=Se),be&&V>0&&(Be.maximumSignificantDigits=be),i){if(!a){var ne=D({},H);ne.useGrouping=!1,ne.decimalSeparator=".",V=parseFloat(h(V,ne),10)}return g(U,Be).format(V)}else{if(!o){var ne=D({},H);ne.useGrouping=!1,ne.decimalSeparator=".",V=parseFloat(h(V,ne),10)}return V.toLocaleString(U,Be)}}var me;be?me=V.toPrecision(be+1):me=V.toFixed(Se+1);var ve,ce,ye,Ae=me.split("e");ye=Ae[1]||"",Ae=Ae[0].split("."),ce=Ae[1]||"",ve=Ae[0]||"";var He=ve.length,rt=ce.length,De=He+rt,we=ve+ce;(be&&De===be+1||!be&&rt===Se+1)&&(we=f(we),we.length===De+1&&(He=He+1),rt&&(we=we.slice(0,-1)),ve=we.slice(0,He),ce=we.slice(He)),be&&(ce=ce.replace(/0*$/,""));var ze=parseInt(ye,10);ze>0?ce.length<=ze?(ce=ce+c(ze-ce.length),ve=ve+ce,ce=""):(ve=ve+ce.slice(0,ze),ce=ce.slice(ze)):ze<0&&(ce=c(Math.abs(ze)-ve.length)+ve+ce,ve="0"),be||(ce=ce.slice(0,Se),ce.length<Se&&(ce=ce+c(Se-ce.length)),ve.length<Qe&&(ve=c(Qe-ve.length)+ve));var ke="";if(se){Ae=ve;for(var $e;Ae.length;)Oe.length&&($e=Oe.shift()),ke&&(ke=It+ke),ke=Ae.slice(-$e)+ke,Ae=Ae.slice(0,-$e)}else ke=ve;return ce&&(ke=ke+st+ce),ke}function p(V,H){return V.label.length>H.label.length?-1:V.label.length<H.label.length?1:0}function m(V,H){var U=[];return S(k(H),function(re){if(re.slice(0,15)==="_durationLabels"){var se=re.slice(15).toLowerCase();S(k(H[re]),function(Oe){Oe.slice(0,1)===V&&U.push({type:se,key:Oe,label:H[re][Oe]})})}}),U}function w(V,H,U){return H===1&&U===null?V:V+V}var y={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:w};function v(V){return Object.prototype.toString.call(V)==="[object Array]"}function C(V){return Object.prototype.toString.call(V)==="[object Object]"}function E(V,H){for(var U=V.length;U-=1;)if(H(V[U]))return V[U]}function I(V,H){var U=0,re=V&&V.length||0,se;for(typeof H!="function"&&(se=H,H=function(Oe){return Oe===se});U<re;){if(H(V[U]))return V[U];U+=1}}function S(V,H){var U=0,re=V.length;if(!(!V||!re))for(;U<re;){if(H(V[U],U)===!1)return;U+=1}}function P(V,H){var U=0,re=V.length,se=[];if(!V||!re)return se;for(;U<re;)se[U]=H(V[U],U),U+=1;return se}function O(V,H){return P(V,function(U){return U[H]})}function x(V){var H=[];return S(V,function(U){U&&H.push(U)}),H}function A(V){var H=[];return S(V,function(U){I(H,U)||H.push(U)}),H}function T(V,H){var U=[];return S(V,function(re){S(H,function(se){re===se&&U.push(re)})}),A(U)}function R(V,H){var U=[];return S(V,function(re,se){if(!H(re))return U=V.slice(se),!1}),U}function M(V,H){var U=V.slice().reverse();return R(U,H).reverse()}function D(V,H){for(var U in H)H.hasOwnProperty(U)&&(V[U]=H[U]);return V}function k(V){var H=[];for(var U in V)V.hasOwnProperty(U)&&H.push(U);return H}function X(V,H){var U=0,re=V.length;if(!V||!re)return!1;for(;U<re;){if(H(V[U],U)===!0)return!0;U+=1}return!1}function $(V){var H=[];return S(V,function(U){H=H.concat(U)}),H}function K(){var V=0;try{V.toLocaleString("i")}catch(H){return H.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 H=!0;return H=H&&V(1,"en",{minimumIntegerDigits:1})==="1",H=H&&V(1,"en",{minimumIntegerDigits:2})==="01",H=H&&V(1,"en",{minimumIntegerDigits:3})==="001",!(!H||(H=H&&V(99.99,"en",{maximumFractionDigits:0,minimumFractionDigits:0})==="100",H=H&&V(99.99,"en",{maximumFractionDigits:1,minimumFractionDigits:1})==="100.0",H=H&&V(99.99,"en",{maximumFractionDigits:2,minimumFractionDigits:2})==="99.99",H=H&&V(99.99,"en",{maximumFractionDigits:3,minimumFractionDigits:3})==="99.990",!H)||(H=H&&V(99.99,"en",{maximumSignificantDigits:1})==="100",H=H&&V(99.99,"en",{maximumSignificantDigits:2})==="100",H=H&&V(99.99,"en",{maximumSignificantDigits:3})==="100",H=H&&V(99.99,"en",{maximumSignificantDigits:4})==="99.99",H=H&&V(99.99,"en",{maximumSignificantDigits:5})==="99.99",!H)||(H=H&&V(1e3,"en",{useGrouping:!0})==="1,000",H=H&&V(1e3,"en",{useGrouping:!1})==="1000",!H))}function J(){var V=[].slice.call(arguments),H={},U;if(S(V,function(be,Qe){if(!Qe){if(!v(be))throw"Expected array as the first argument to durationsFormat.";U=be}if(typeof be=="string"||typeof be=="function"){H.template=be;return}if(typeof be=="number"){H.precision=be;return}C(be)&&D(H,be)}),!U||!U.length)return[];H.returnMomentTypes=!0;var re=P(U,function(be){return be.format(H)}),se=T(l,A(O($(re),"type"))),Oe=H.largest;return Oe&&(se=se.slice(0,Oe)),H.returnMomentTypes=!1,H.outputTypes=se,P(U,function(be){return be.format(H)})}function ge(){var V=[].slice.call(arguments),H=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,Oe=n.duration(Math.abs(U),"milliseconds"),be=n.duration(Math.abs(re),"months");S(V,function(N){if(typeof N=="string"||typeof N=="function"){H.template=N;return}if(typeof N=="number"){H.precision=N;return}C(N)&&D(H,N)});var Qe={years:"y",months:"M",weeks:"w",days:"d",hours:"h",minutes:"m",seconds:"s",milliseconds:"S"},Se={escape:/\[(.+?)\]/,years:/\*?[Yy]+/,months:/\*?M+/,weeks:/\*?[Ww]+/,days:/\*?[Dd]+/,hours:/\*?[Hh]+/,minutes:/\*?m+/,seconds:/\*?s+/,milliseconds:/\*?S+/,general:/.+?/};H.types=l;var It=function(N){return I(l,function(_e){return Se[_e].test(N)})},st=new RegExp(P(l,function(N){return Se[N].source}).join("|"),"g");H.duration=this;var Be=typeof H.template=="function"?H.template.apply(H):H.template,ne=H.outputTypes,me=H.returnMomentTypes,ve=H.largest,ce=[];ne||(v(H.stopTrim)&&(H.stopTrim=H.stopTrim.join("")),H.stopTrim&&S(H.stopTrim.match(st),function(N){var _e=It(N);_e==="escape"||_e==="general"||ce.push(_e)}));var ye=n.localeData();ye||(ye={}),S(k(y),function(N){if(typeof y[N]=="function"){ye[N]||(ye[N]=y[N]);return}ye["_"+N]||(ye["_"+N]=y[N])}),S(k(ye._durationTimeTemplates),function(N){Be=Be.replace("_"+N+"_",ye._durationTimeTemplates[N])});var Ae=H.userLocale||n.locale(),He=H.useLeftUnits,rt=H.usePlural,De=H.precision,we=H.forceLength,ze=H.useGrouping,ke=H.trunc,$e=H.useSignificantDigits&&De>0,ut=$e?H.precision:0,dt=ut,je=H.minValue,ht=!1,$t=H.maxValue,bt=!1,Mt=H.useToLocaleString,_t=H.groupingSeparator,Zt=H.decimalSeparator,an=H.grouping;Mt=Mt&&(r||i);var kt=H.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 ft=function(N){return N.test(kt)},Nt=/large/,mt=/small/,ln=/both/,Mn=/mid/,Ee=/^all|[^sm]all/,ct=/final/,Tt=ve>0||X([Nt,ln,Ee],ft),vn=X([mt,ln,Ee],ft),tn=X([Mn,Ee],ft),nn=X([ct,Ee],ft),un=P(Be.match(st),function(N,_e){var We=It(N);return N.slice(0,1)==="*"&&(N=N.slice(1),We!=="escape"&&We!=="general"&&ce.push(We)),{index:_e,length:N.length,text:"",token:We==="escape"?N.replace(Se.escape,"$1"):N,type:We==="escape"||We==="general"?null:We}}),Lt={index:0,length:0,token:"",text:"",type:null},Kt=[];He&&un.reverse(),S(un,function(N){if(N.type){(Lt.type||Lt.text)&&Kt.push(Lt),Lt=N;return}He?Lt.text=N.token+Lt.text:Lt.text+=N.token}),(Lt.type||Lt.text)&&Kt.push(Lt),He&&Kt.reverse();var Ne=T(l,A(x(O(Kt,"type"))));if(!Ne.length)return O(Kt,"text").join("");Ne=P(Ne,function(N,_e){var We=_e+1===Ne.length,Dt=!_e,qt;N==="years"||N==="months"?qt=be.as(N):qt=Oe.as(N);var rn=Math.floor(qt),In=qt-rn,yn=I(Kt,function(jt){return N===jt.type});return Dt&&$t&&qt>$t&&(bt=!0),We&&je&&Math.abs(H.duration.as(N))<je&&(ht=!0),Dt&&we===null&&yn.length>1&&(we=!0),Oe.subtract(rn,N),be.subtract(rn,N),{rawValue:qt,wholeValue:rn,decimalValue:We?In:0,isSmallest:We,isLargest:Dt,type:N,tokenLength:yn.length}});var yt=ke?Math.floor:Math.round,En=function(N,_e){var We=Math.pow(10,_e);return yt(N*We)/We},Ot=!1,pt=!1,bn=function(N,_e){var We={useGrouping:ze,groupingSeparator:_t,decimalSeparator:Zt,grouping:an,useToLocaleString:Mt};return $e&&(ut<=0?(N.rawValue=0,N.wholeValue=0,N.decimalValue=0):(We.maximumSignificantDigits=ut,N.significantDigits=ut)),bt&&!pt&&(N.isLargest?(N.wholeValue=$t,N.decimalValue=0):(N.wholeValue=0,N.decimalValue=0)),ht&&!pt&&(N.isSmallest?(N.wholeValue=je,N.decimalValue=0):(N.wholeValue=0,N.decimalValue=0)),N.isSmallest||N.significantDigits&&N.significantDigits-N.wholeValue.toString().length<=0?De<0?N.value=En(N.wholeValue,De):De===0?N.value=yt(N.wholeValue+N.decimalValue):$e?(ke?N.value=En(N.rawValue,ut-N.wholeValue.toString().length):N.value=N.rawValue,N.wholeValue&&(ut-=N.wholeValue.toString().length)):(We.fractionDigits=De,ke?N.value=N.wholeValue+En(N.decimalValue,De):N.value=N.wholeValue+N.decimalValue):$e&&N.wholeValue?(N.value=Math.round(En(N.wholeValue,N.significantDigits-N.wholeValue.toString().length)),ut-=N.wholeValue.toString().length):N.value=N.wholeValue,N.tokenLength>1&&(we||Ot)&&(We.minimumIntegerDigits=N.tokenLength,pt&&We.maximumSignificantDigits<N.tokenLength&&delete We.maximumSignificantDigits),!Ot&&(N.value>0||kt===""||I(ce,N.type)||I(ne,N.type))&&(Ot=!0),N.formattedValue=h(N.value,We,Ae),We.useGrouping=!1,We.decimalSeparator=".",N.formattedValueEn=h(N.value,We,"en"),N.tokenLength===2&&N.type==="milliseconds"&&(N.formattedValueMS=h(N.value,{minimumIntegerDigits:3,useGrouping:!1},"en").slice(0,2)),N};if(Ne=P(Ne,bn),Ne=x(Ne),Ne.length>1){var lr=function(N){return I(Ne,function(_e){return _e.type===N})},Kn=function(N){var _e=lr(N.type);_e&&S(N.targets,function(We){var Dt=lr(We.type);Dt&&parseInt(_e.formattedValueEn,10)===We.value&&(_e.rawValue=0,_e.wholeValue=0,_e.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,Ne=P(Ne,bn),Ne=x(Ne)),ne&&!(bt&&!H.trim)?(Ne=P(Ne,function(N){return I(ne,function(_e){return N.type===_e})?N:null}),Ne=x(Ne)):(Tt&&(Ne=R(Ne,function(N){return!N.isSmallest&&!N.wholeValue&&!I(ce,N.type)})),ve&&Ne.length&&(Ne=Ne.slice(0,ve)),vn&&Ne.length>1&&(Ne=M(Ne,function(N){return!N.wholeValue&&!I(ce,N.type)&&!N.isLargest})),tn&&(Ne=P(Ne,function(N,_e){return _e>0&&_e<Ne.length-1&&!N.wholeValue?null:N}),Ne=x(Ne)),nn&&Ne.length===1&&!Ne[0].wholeValue&&!(!ke&&Ne[0].isSmallest&&Ne[0].rawValue<je)&&(Ne=[])),me?Ne:(S(Kt,function(N){var _e=Qe[N.type],We=I(Ne,function(jt){return jt.type===N.type});if(!(!_e||!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=ye.durationPluralKey(_e,Dt[0],Dt[1]),rn=m(_e,ye),In=!1,yn={};S(ye._durationLabelTypes,function(jt){var wn=I(rn,function(xn){return xn.type===jt.type&&xn.key===qt});wn&&(yn[wn.type]=wn.label,u(N.text,jt.string)&&(N.text=N.text.replace(jt.string,wn.label),In=!0))}),rt&&!In&&(rn.sort(p),S(rn,function(jt){if(yn[jt.type]===jt.label)return u(N.text,jt.label)?!1:void 0;if(u(N.text,jt.label))return N.text=N.text.replace(jt.label,yn[jt.type]),!1}))}}),Kt=P(Kt,function(N){if(!N.type)return N.text;var _e=I(Ne,function(Dt){return Dt.type===N.type});if(!_e)return"";var We="";return He&&(We+=N.text),(se&&bt||!se&&ht)&&(We+="< ",bt=!1,ht=!1),(se&&ht||!se&&bt)&&(We+="> ",bt=!1,ht=!1),se&&(_e.value>0||kt===""||I(ce,_e.type)||I(ne,_e.type))&&(We+="-",se=!1),N.type==="milliseconds"&&_e.formattedValueMS?We+=_e.formattedValueMS:We+=_e.formattedValue,He||(We+=N.text),We}),Kt.join("").replace(/(,| |:|\.)*$/,"").replace(/^(,| |:|\.)*/,""))}function oe(){var V=this.duration,H=function(se){return V._data[se]},U=I(this.types,H),re=E(this.types,H);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=J,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",y)}var pe=function(V,H,U){return V.toLocaleString(H,U)};r=K()&&ee(pe),o=r&&ie(pe);var le=function(V,H,U){if(typeof window<"u"&&window&&window.Intl&&window.Intl.NumberFormat)return window.Intl.NumberFormat(H,U).format(V)};return i=ee(le),a=i&&ie(le),de(n),de})})(gs)),gs.exports}tw();const nw=["true","t","yes","y","on","1"],rw=["false","f","no","n","off","0"];function St(e,t=""){return{kind:Q.Text,readonly:!0,allowOverlay:!0,data:e,displayData:e,errorDetails:t,isError:!0,style:"faded"}}function Eo(e){return Object.hasOwn(e,"isError")&&e.isError}function ow(e){return Object.hasOwn(e,"tooltip")&&e.tooltip!==""}function Xs(e){return Object.hasOwn(e,"isMissingValue")&&e.isMissingValue}function ms(e=!1){return e?{kind:Q.Loading,allowOverlay:!1,isMissingValue:!0,copyData:""}:{kind:Q.Loading,allowOverlay:!1,copyData:""}}function iw(e,t){const n=t?"faded":"normal";return{kind:Q.Text,data:"",displayData:"",allowOverlay:!0,readonly:e,style:n}}function vs(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 Oo(e,t){return Me(e)?t||{}:Me(t)?e||{}:Zd(e,t)}function Zs(e){if(Me(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 fh(e){return typeof e=="string"||e instanceof String?!0:(e instanceof $g&&(e=Array.from(e)),Array.isArray(e)&&e.every(t=>typeof t=="string"||t instanceof String))}function aw(e){return e?.startsWith("{")&&e.endsWith("}")}function nt(e){try{try{return Eg(e)}catch{return JSON.stringify(e,(t,n)=>typeof n=="bigint"?Number(n):n)}}catch{return`[${typeof e}]`}}function hh(e){if(Me(e))return null;if(typeof e=="boolean")return e;const t=nt(e).toLowerCase().trim();if(t==="")return null;if(nw.includes(t))return!0;if(rw.includes(t))return!1}function yi(e){if(Me(e))return null;if(Array.isArray(e))return NaN;if(typeof e=="string"){if(e.trim().length===0)return null;try{const t=gm.unformat(e.trim());if(lt(t))return t}catch{}}else if(e instanceof Int32Array)return Number(e[0]);return Number(e)}function ph(e){return Me(e)?"":nt(e.map(t=>typeof t=="string"&&t.includes(",")?t.replace(/,/g," "):t))}function Ca(e){if(Me(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(Me(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 gh(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 lw(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 sw=new RegExp(/(\r\n|\n|\r)/gm);function wi(e){return e.indexOf(`
|
|
187
|
+
`)!==-1?e.replace(sw," "):e}function uw(e,t){if(Me(t))return"";try{const n=t.match(e);return n?.[1]!==void 0?decodeURIComponent(n[1].replace(/\+/g,"%20")):t}catch{return t}}const cw=Hn("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"}}),""),qs=({jsonValue:e,theme:t})=>{let n;if(e)try{n=typeof e=="string"?ol.parse(e):ol.parse(ol.stringify(e))}catch{n=void 0}return Me(n)?he.jsx(Zr,{highlight:!0,autoFocus:!1,disabled:!0,value:Ca(e)??"",onChange:()=>{}}):he.jsx(cw,{"data-testid":"stJsonColumnViewer",children:he.jsx(Dm,{src:n,collapsed:2,theme:Tg(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(qs);const dw=e=>{const t=e.theme,n=e.value.data;return he.jsx(qs,{jsonValue:n.value||n.displayValue,theme:t})},fw=e=>{const t=e.theme,n=e.value;return he.jsx(qs,{jsonValue:n.data,theme:t})},hw={kind:Q.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:dw})};function sd(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 Te(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sd(Object(n),!0).forEach(function(r){li(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var pw=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function mh(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,f=e.onMenuClose,g=e.onMenuOpen,h=e.value,p=ar(e,pw),m=d.useState(l!==void 0?l:n),w=fr(m,2),y=w[0],v=w[1],C=d.useState(s!==void 0?s:o),E=fr(C,2),I=E[0],S=E[1],P=d.useState(h!==void 0?h:a),O=fr(P,2),x=O[0],A=O[1],T=d.useCallback(function(K,ie){typeof u=="function"&&u(K,ie),A(K)},[u]),R=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 f=="function"&&f(),S(!1)},[f]),k=l!==void 0?l:y,X=s!==void 0?s:I,$=h!==void 0?h:x;return Te(Te({},p),{},{inputValue:k,menuIsOpen:X,onChange:T,onInputChange:R,onMenuClose:D,onMenuOpen:M,value:$})}function gw(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 mw(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 vw=(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(mw(this));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var o=gw(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})(),bw=function(e,t,n){for(var r=0,o=0;r=o,o=os(),r===38&&o===12&&(t[n]=1),!rf(o);)nf();return im(e,of)},yw=function(e,t){var n=-1,r=44;do switch(rf(r)){case 0:r===38&&os()===12&&(t[n]=1),e[n]+=bw(of-1,t,n);break;case 2:e[n]+=om(r);break;case 4:if(r===44){e[++n]=os()===58?"&\f":"",t[n]=e[n].length;break}default:e[n]+=rm(r)}while(r=nf());return e},ww=function(e,t){return em(yw(tm(e),t))},ud=new WeakMap,xw=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&&!ud.get(n))&&!r){ud.set(e,!0);for(var o=[],i=ww(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]}}},Cw=function(e){if(e.type==="decl"){var t=e.value;t.charCodeAt(0)===108&&t.charCodeAt(2)===98&&(e.return="",e.value="")}};function vh(e,t){switch(nm(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+Ht(e,/(\w+).+(:[^]+)/,xt+"box-$1$2"+mn+"flex-$1$2")+e;case 5443:return xt+e+mn+"flex-item-"+Ht(e,/flex-|-self/,"")+e;case 4675:return xt+e+mn+"flex-line-pack"+Ht(e,/align-content|flex-|-self/,"")+e;case 5548:return xt+e+mn+Ht(e,"shrink","negative")+e;case 5292:return xt+e+mn+Ht(e,"basis","preferred-size")+e;case 6060:return xt+"box-"+Ht(e,"-grow","")+xt+e+mn+Ht(e,"grow","positive")+e;case 4554:return xt+Ht(e,/([^-])(transform)/g,"$1"+xt+"$2")+e;case 6187:return Ht(Ht(Ht(e,/(zoom-|grab)/,xt+"$1"),/(image-set)/,xt+"$1"),e,"")+e;case 5495:case 3959:return Ht(e,/(image-set\([^]*)/,xt+"$1$`$1");case 4968:return Ht(Ht(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 Ht(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(Pu(e)-1-t>6)switch($r(e,t+1)){case 109:if($r(e,t+4)!==45)break;case 102:return Ht(e,/(.+:)(.+)-([^]+)/,"$1"+xt+"$2-$3$1"+da+($r(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Au(e,"stretch")?vh(Ht(e,"stretch","fill-available"),t)+e:e}break;case 4949:if($r(e,t+1)!==115)break;case 6444:switch($r(e,Pu(e)-3-(~Au(e,"!important")&&10))){case 107:return Ht(e,":",":"+xt)+e;case 101:return Ht(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+Ht(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return xt+e+mn+Ht(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return xt+e+mn+Ht(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return xt+e+mn+e+e}return e}var kw=function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Jg:e.return=vh(e.value,e.length);break;case Kg:return ia([Yo(e,{value:Ht(e.value,"@","@"+xt)})],r);case Zg:if(e.length)return qg(e.props,function(o){switch(am(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ia([Yo(e,{props:[Ht(o,/:(read-\w+)/,":"+da+"$1")]})],r);case"::placeholder":return ia([Yo(e,{props:[Ht(o,/:(plac\w+)/,":"+xt+"input-$1")]}),Yo(e,{props:[Ht(o,/:(plac\w+)/,":"+da+"$1")]}),Yo(e,{props:[Ht(o,/:(plac\w+)/,mn+"input-$1")]})],r)}return""})}},Sw=[kw],Mw=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(p){var m=p.getAttribute("data-emotion");m.indexOf(" ")!==-1&&(document.head.appendChild(p),p.setAttribute("data-s",""))})}var r=e.stylisPlugins||Sw,o={},i,a=[];i=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(p){for(var m=p.getAttribute("data-emotion").split(" "),w=1;w<m.length;w++)o[m[w]]=!0;a.push(p)});var l,s=[xw,Cw];{var u,c=[Ug,Yg(function(p){u.insert(p)})],f=jg(s.concat(r,c)),g=function(p){return ia(lm(p),f)};l=function(p,m,w,y){u=w,g(p?p+"{"+m.styles+"}":m.styles),y&&(h.inserted[m.name]=!0)}}var h={key:t,sheet:new vw({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 h.sheet.hydrate(a),h},Rw=function(e){return e()},Ew=d.useInsertionEffect?d.useInsertionEffect:!1,Iw=Ew||Rw,Ks={}.hasOwnProperty,bh=d.createContext(typeof HTMLElement<"u"?Mw({key:"css"}):null);bh.Provider;var Tw=function(e){return d.forwardRef(function(t,n){var r=d.useContext(bh);return e(t,r,n)})},Ow=d.createContext({}),bs="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Dw=function(e,t){var n={};for(var r in t)Ks.call(t,r)&&(n[r]=t[r]);return n[bs]=e,n},Pw=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Qg(t,n,r),Iw(function(){return Gg(t,n,r)}),null},Aw=Tw(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var o=e[bs],i=[r],a="";typeof e.className=="string"?a=Xg(t.registered,i,e.className):e.className!=null&&(a=e.className+" ");var l=tf(i,void 0,d.useContext(Ow));a+=t.key+"-"+l.name;var s={};for(var u in e)Ks.call(e,u)&&u!=="css"&&u!==bs&&(s[u]=e[u]);return s.ref=n,s.className=a,d.createElement(d.Fragment,null,d.createElement(Pw,{cache:t,serialized:l,isStringTag:typeof o=="string"}),d.createElement(o,s))}),Hw=Aw,Pe=function(e,t){var n=arguments;if(t==null||!Ks.call(t,"css"))return d.createElement.apply(void 0,n);var r=n.length,o=new Array(r);o[0]=Hw,o[1]=Dw(e,t);for(var i=2;i<r;i++)o[i]=n[i];return d.createElement.apply(null,o)};function Js(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return tf(t)}var zw=function(){var e=Js.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 Fw(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const Lw=Math.min,Vw=Math.max,ka=Math.round,ea=Math.floor,ys=e=>({x:e,y:e});function $w(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 yh(e){return xh(e)?(e.nodeName||"").toLowerCase():"#document"}function Rr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function wh(e){var t;return(t=(xh(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function xh(e){return Ha()?e instanceof Node||e instanceof Rr(e).Node:!1}function _w(e){return Ha()?e instanceof Element||e instanceof Rr(e).Element:!1}function Qs(e){return Ha()?e instanceof HTMLElement||e instanceof Rr(e).HTMLElement:!1}function cd(e){return!Ha()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Rr(e).ShadowRoot}const Bw=new Set(["inline","contents"]);function Ch(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Gs(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Bw.has(o)}const Nw=new Set(["html","body","#document"]);function jw(e){return Nw.has(yh(e))}function Gs(e){return Rr(e).getComputedStyle(e)}function Ww(e){if(yh(e)==="html")return e;const t=e.assignedSlot||e.parentNode||cd(e)&&e.host||wh(e);return cd(t)?t.host:t}function kh(e){const t=Ww(e);return jw(t)?e.ownerDocument?e.ownerDocument.body:e.body:Qs(t)&&Ch(t)?t:kh(t)}function Sa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=kh(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=Rr(o);if(i){const l=ws(a);return t.concat(a,a.visualViewport||[],Ch(o)?o:[],l&&n?Sa(l):[])}return t.concat(o,Sa(o,[],n))}function ws(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Uw(e){const t=Gs(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Qs(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 eu(e){return _w(e)?e:e.contextElement}function dd(e){const t=eu(e);if(!Qs(t))return ys(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Uw(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=eu(e);let a=ys(1);t&&(a=dd(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,f=o.height/a.y;if(i){const g=Rr(i),h=r;let p=g,m=ws(p);for(;m&&r&&h!==p;){const w=dd(m),y=m.getBoundingClientRect(),v=Gs(m),C=y.left+(m.clientLeft+parseFloat(v.paddingLeft))*w.x,E=y.top+(m.clientTop+parseFloat(v.paddingTop))*w.y;s*=w.x,u*=w.y,c*=w.x,f*=w.y,s+=C,u+=E,p=Rr(m),m=ws(p)}}return $w({width:c,height:f,x:s,y:u})}function Sh(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Yw(e,t){let n=null,r;const o=wh(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:f,width:g,height:h}=u;if(l||t(),!g||!h)return;const p=ea(f),m=ea(o.clientWidth-(c+g)),w=ea(o.clientHeight-(f+h)),y=ea(c),v={rootMargin:-p+"px "+-m+"px "+-w+"px "+-y+"px",threshold:Vw(0,Lw(1,s))||1};let C=!0;function E(I){const S=I[0].intersectionRatio;if(S!==s){if(!C)return a();S?a(!1,S):r=setTimeout(()=>{a(!1,1e-7)},1e3)}S===1&&!Sh(u,e.getBoundingClientRect())&&a(),C=!1}try{n=new IntersectionObserver(E,{...v,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,v)}n.observe(e)}return a(!0),i}function Xw(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=eu(e),c=o||i?[...u?Sa(u):[],...Sa(t)]:[];c.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const f=u&&l?Yw(u,n):null;let g=-1,h=null;a&&(h=new ResizeObserver(y=>{let[v]=y;v&&v.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var C;(C=h)==null||C.observe(t)})),n()}),u&&!s&&h.observe(u),h.observe(t));let p,m=s?fd(e):null;s&&w();function w(){const y=fd(e);m&&!Sh(m,y)&&n(),m=y,p=requestAnimationFrame(w)}return n(),()=>{var y;c.forEach(v=>{o&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),f?.(),(y=h)==null||y.disconnect(),h=null,s&&cancelAnimationFrame(p)}}var xs=d.useLayoutEffect,Zw=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Ma=function(){};function qw(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function Kw(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(qw(e,a)));return i.filter(function(l){return l}).map(function(l){return String(l).trim()}).join(" ")}var Ra=function(e){return ix(e)?e.filter(Boolean):_g(e)==="object"&&e!==null?[e]:[]},Mh=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,Zw);return Te({},t)},Xt=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 za(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function Jw(e){return za(e)?window.innerHeight:e.clientHeight}function Rh(e){return za(e)?window.pageYOffset:e.scrollTop}function Ea(e,t){if(za(e)){window.scrollTo(0,t);return}e.scrollTop=t}function Qw(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 Gw(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function ta(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=Rh(e),i=t-o,a=10,l=0;function s(){l+=a;var u=Gw(l,o,i,n);Ea(e,u),l<n?window.requestAnimationFrame(s):r(e)}s()}function hd(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?Ea(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&Ea(e,Math.max(t.offsetTop-o,0))}function ex(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 pd(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function tx(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var Eh=!1,nx={get passive(){return Eh=!0}},na=typeof window<"u"?window:{};na.addEventListener&&na.removeEventListener&&(na.addEventListener("p",Ma,nx),na.removeEventListener("p",Ma,!1));var rx=Eh;function ox(e){return e!=null}function ix(e){return Array.isArray(e)}function si(e,t,n){return e?t:n}var ax=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},{})},lx=["children","innerProps"],sx=["children","innerProps"];function ux(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,i=e.shouldScroll,a=e.isFixedPosition,l=e.controlHeight,s=Qw(n),u={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return u;var c=s.getBoundingClientRect(),f=c.height,g=n.getBoundingClientRect(),h=g.bottom,p=g.height,m=g.top,w=n.offsetParent.getBoundingClientRect(),y=w.top,v=a?window.innerHeight:Jw(s),C=Rh(s),E=parseInt(getComputedStyle(n).marginBottom,10),I=parseInt(getComputedStyle(n).marginTop,10),S=y-I,P=v-m,O=S+C,x=f-C-m,A=h-v+C+E,T=C+m-I,R=160;switch(o){case"auto":case"bottom":if(P>=p)return{placement:"bottom",maxHeight:t};if(x>=p&&!a)return i&&ta(s,A,R),{placement:"bottom",maxHeight:t};if(!a&&x>=r||a&&P>=r){i&&ta(s,A,R);var M=a?P-E:x-E;return{placement:"bottom",maxHeight:M}}if(o==="auto"||a){var D=t,k=a?S:O;return k>=r&&(D=Math.min(k-E-l,t)),{placement:"top",maxHeight:D}}if(o==="bottom")return i&&Ea(s,A),{placement:"bottom",maxHeight:t};break;case"top":if(S>=p)return{placement:"top",maxHeight:t};if(O>=p&&!a)return i&&ta(s,T,R),{placement:"top",maxHeight:t};if(!a&&O>=r||a&&S>=r){var X=t;return(!a&&O>=r||a&&S>=r)&&(X=a?S-I:O-I),i&&ta(s,T,R),{placement:"top",maxHeight:X}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return u}function cx(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var Ih=function(e){return e==="auto"?"bottom":e},dx=function(e,t){var n,r=e.placement,o=e.theme,i=o.borderRadius,a=o.spacing,l=o.colors;return Te((n={label:"menu"},li(n,cx(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})},Th=d.createContext(null),fx=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(Th)||{},u=s.setPortalPlacement,c=d.useRef(null),f=d.useState(r),g=fr(f,2),h=g[0],p=g[1],m=d.useState(null),w=fr(m,2),y=w[0],v=w[1],C=l.spacing.controlHeight;return xs(function(){var E=c.current;if(E){var I=i==="fixed",S=a&&!I,P=ux({maxHeight:r,menuEl:E,minHeight:n,placement:o,shouldScroll:S,isFixedPosition:I,controlHeight:C});p(P.maxHeight),v(P.placement),u?.(P.placement)}},[r,o,i,a,n,u,C]),t({ref:c,placerProps:Te(Te({},e),{},{placement:y||Ih(o),maxHeight:h})})},hx=function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return Pe("div",Ve({},Xt(e,"menu",{menu:!0}),{ref:n},r),t)},px=hx,gx=function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return Te({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:r,paddingTop:r})},mx=function(e){var t=e.children,n=e.innerProps,r=e.innerRef,o=e.isMulti;return Pe("div",Ve({},Xt(e,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:r},n),t)},Oh=function(e,t){var n=e.theme,r=n.spacing.baseUnit,o=n.colors;return Te({textAlign:"center"},t?{}:{color:o.neutral40,padding:"".concat(r*2,"px ").concat(r*3,"px")})},vx=Oh,bx=Oh,yx=function(e){var t=e.children,n=t===void 0?"No options":t,r=e.innerProps,o=ar(e,lx);return Pe("div",Ve({},Xt(Te(Te({},o),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},wx=function(e){var t=e.children,n=t===void 0?"Loading...":t,r=e.innerProps,o=ar(e,sx);return Pe("div",Ve({},Xt(Te(Te({},o),{},{children:n,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},xx=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}},Cx=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(Ih(i)),c=fr(u,2),f=c[0],g=c[1],h=d.useMemo(function(){return{setPortalPlacement:g}},[]),p=d.useState(null),m=fr(p,2),w=m[0],y=m[1],v=d.useCallback(function(){if(r){var S=ex(r),P=a==="fixed"?0:window.pageYOffset,O=S[f]+P;(O!==w?.offset||S.left!==w?.rect.left||S.width!==w?.rect.width)&&y({offset:O,rect:S})}},[r,a,f,w?.offset,w?.rect.left,w?.rect.width]);xs(function(){v()},[v]);var C=d.useCallback(function(){typeof s.current=="function"&&(s.current(),s.current=null),r&&l.current&&(s.current=Xw(r,l.current,v,{elementResize:"ResizeObserver"in window}))},[r,v]);xs(function(){C()},[C]);var E=d.useCallback(function(S){l.current=S,C()},[C]);if(!t&&a!=="fixed"||!w)return null;var I=Pe("div",Ve({ref:E},Xt(Te(Te({},e),{},{offset:w.offset,position:a,rect:w.rect}),"menuPortal",{"menu-portal":!0}),o),n);return Pe(Th.Provider,{value:h},t?Xd.createPortal(I,t):I)},kx=function(e){var t=e.isDisabled,n=e.isRtl;return{label:"container",direction:n?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},Sx=function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,o=e.isRtl;return Pe("div",Ve({},Xt(e,"container",{"--is-disabled":r,"--is-rtl":o}),n),t)},Mx=function(e,t){var n=e.theme.spacing,r=e.isMulti,o=e.hasValue,i=e.selectProps.controlShouldRenderValue;return Te({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")})},Rx=function(e){var t=e.children,n=e.innerProps,r=e.isMulti,o=e.hasValue;return Pe("div",Ve({},Xt(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":o}),n),t)},Ex=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},Ix=function(e){var t=e.children,n=e.innerProps;return Pe("div",Ve({},Xt(e,"indicatorsContainer",{indicators:!0}),n),t)},gd,Tx=["size"],Ox=["innerProps","isRtl","size"],Dx={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Dh=function(e){var t=e.size,n=ar(e,Tx);return Pe("svg",Ve({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Dx},n))},tu=function(e){return Pe(Dh,Ve({size:20},e),Pe("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"}))},Ph=function(e){return Pe(Dh,Ve({size:20},e),Pe("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"}))},Ah=function(e,t){var n=e.isFocused,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return Te({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:o*2,":hover":{color:n?i.neutral80:i.neutral40}})},Px=Ah,Ax=function(e){var t=e.children,n=e.innerProps;return Pe("div",Ve({},Xt(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||Pe(Ph,null))},Hx=Ah,zx=function(e){var t=e.children,n=e.innerProps;return Pe("div",Ve({},Xt(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||Pe(tu,null))},Fx=function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return Te({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:o*2,marginTop:o*2})},Lx=function(e){var t=e.innerProps;return Pe("span",Ve({},t,Xt(e,"indicatorSeparator",{"indicator-separator":!0})))},Vx=zw(gd||(gd=Fw([`
|
|
188
|
+
0%, 80%, 100% { opacity: 0; }
|
|
189
|
+
40% { opacity: 1; }
|
|
190
|
+
`]))),$x=function(e,t){var n=e.isFocused,r=e.size,o=e.theme,i=o.colors,a=o.spacing.baseUnit;return Te({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})},Xl=function(e){var t=e.delay,n=e.offset;return Pe("span",{css:Js({animation:"".concat(Vx," 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"},"","")})},_x=function(e){var t=e.innerProps,n=e.isRtl,r=e.size,o=r===void 0?4:r,i=ar(e,Ox);return Pe("div",Ve({},Xt(Te(Te({},i),{},{innerProps:t,isRtl:n,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),Pe(Xl,{delay:0,offset:n}),Pe(Xl,{delay:160,offset:!0}),Pe(Xl,{delay:320,offset:!n}))},Bx=function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.theme,i=o.colors,a=o.borderRadius,l=o.spacing;return Te({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}})},Nx=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return Pe("div",Ve({ref:o},Xt(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":a}),i,{"aria-disabled":n||void 0}),t)},jx=Nx,Wx=["data"],Ux=function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:n.baseUnit*2,paddingTop:n.baseUnit*2}},Yx=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 Pe("div",Ve({},Xt(e,"group",{group:!0}),l),Pe(i,Ve({},a,{selectProps:c,theme:u,getStyles:r,getClassNames:o,cx:n}),s),Pe("div",null,t))},Xx=function(e,t){var n=e.theme,r=n.colors,o=n.spacing;return Te({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"})},Zx=function(e){var t=Mh(e);t.data;var n=ar(t,Wx);return Pe("div",Ve({},Xt(e,"groupHeading",{"group-heading":!0}),n))},qx=Yx,Kx=["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 Te(Te({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},Qx),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},Hh={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},Qx={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Te({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Hh)},Gx=function(e){return Te({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},Hh)},eC=function(e){var t=e.cx,n=e.value,r=Mh(e),o=r.innerRef,i=r.isDisabled,a=r.isHidden,l=r.inputClassName,s=ar(r,Kx);return Pe("div",Ve({},Xt(e,"input",{"input-container":!0}),{"data-value":n||""}),Pe("input",Ve({className:t({input:!0},l),ref:o,style:Gx(a),disabled:i},s)))},tC=eC,nC=function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors;return Te({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:o/2,margin:r.baseUnit/2})},rC=function(e,t){var n=e.theme,r=n.borderRadius,o=n.colors,i=e.cropWithEllipsis;return Te({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})},oC=function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors,a=e.isFocused;return Te({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}})},zh=function(e){var t=e.children,n=e.innerProps;return Pe("div",n,t)},iC=zh,aC=zh;function lC(e){var t=e.children,n=e.innerProps;return Pe("div",Ve({role:"button"},n),t||Pe(tu,{size:14}))}var sC=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 Pe(s,{data:r,innerProps:Te(Te({},Xt(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),o),selectProps:l},Pe(u,{data:r,innerProps:Te({},Xt(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},t),Pe(c,{data:r,innerProps:Te(Te({},Xt(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:l}))},uC=sC,cC=function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.theme,a=i.spacing,l=i.colors;return Te({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}})},dC=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.innerRef,a=e.innerProps;return Pe("div",Ve({},Xt(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":o}),{ref:i,"aria-disabled":n},a),t)},fC=dC,hC=function(e,t){var n=e.theme,r=n.spacing,o=n.colors;return Te({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:o.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},pC=function(e){var t=e.children,n=e.innerProps;return Pe("div",Ve({},Xt(e,"placeholder",{placeholder:!0}),n),t)},gC=pC,mC=function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing,i=r.colors;return Te({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})},vC=function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return Pe("div",Ve({},Xt(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),t)},bC=vC,Fa={ClearIndicator:zx,Control:jx,DropdownIndicator:Ax,DownChevron:Ph,CrossIcon:tu,Group:qx,GroupHeading:Zx,IndicatorsContainer:Ix,IndicatorSeparator:Lx,Input:tC,LoadingIndicator:_x,Menu:px,MenuList:mx,MenuPortal:Cx,LoadingMessage:wx,NoOptionsMessage:yx,MultiValue:uC,MultiValueContainer:iC,MultiValueLabel:aC,MultiValueRemove:lC,Option:fC,Placeholder:gC,SelectContainer:Sx,SingleValue:bC,ValueContainer:Rx},yC=function(e){return Te(Te({},Fa),e.components)},md=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function wC(e,t){return!!(e===t||md(e)&&md(t))}function xC(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!wC(e[n],t[n]))return!1;return!0}function CC(e,t){t===void 0&&(t=xC);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 kC={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"},SC=function(e){return Pe("span",Ve({css:kC},e))},vd=SC,MC={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(h,p){return h&&h.length?"".concat(h.indexOf(p)+1," of ").concat(h.length):""};if(t==="value"&&a)return"value ".concat(i," focused, ").concat(c(a,n),".");if(t==="menu"&&u){var f=l?" disabled":"",g="".concat(s?" selected":"").concat(f);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:"",".")}},RC=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,f=l.getOptionLabel,g=l.inputValue,h=l.isMulti,p=l.isOptionDisabled,m=l.isSearchable,w=l.menuIsOpen,y=l.options,v=l.screenReaderStatus,C=l.tabSelectsValue,E=l.isLoading,I=l["aria-label"],S=l["aria-live"],P=d.useMemo(function(){return Te(Te({},MC),c||{})},[c]),O=d.useMemo(function(){var D="";if(t&&P.onChange){var k=t.option,X=t.options,$=t.removedValue,K=t.removedValues,ie=t.value,ee=function(le){return Array.isArray(le)?null:le},J=$||k||ee(ie),ge=J?f(J):"",oe=X||K||void 0,de=oe?oe.map(f):[],pe=Te({isDisabled:J&&p(J,a),label:ge,labels:de},t);D=P.onChange(pe)}return D},[t,P,p,a,f]),x=d.useMemo(function(){var D="",k=n||r,X=!!(n&&a&&a.includes(n));if(k&&P.onFocus){var $={focused:k,label:f(k),isDisabled:p(k,a),isSelected:X,options:o,context:k===n?"menu":"value",selectValue:a,isAppleDevice:u};D=P.onFocus($)}return D},[n,r,f,p,P,o,a,u]),A=d.useMemo(function(){var D="";if(w&&y.length&&!E&&P.onFilter){var k=v({count:o.length});D=P.onFilter({inputValue:g,resultsMessage:k})}return D},[o,g,w,P,y,v,E]),T=t?.action==="initial-input-focus",R=d.useMemo(function(){var D="";if(P.guidance){var k=r?"value":w?"menu":"input";D=P.guidance({"aria-label":I,context:k,isDisabled:n&&p(n,a),isMulti:h,isSearchable:m,tabSelectsValue:C,isInitialFocus:T})}return D},[I,n,r,h,p,m,w,P,a,C,T]),M=Pe(d.Fragment,null,Pe("span",{id:"aria-selection"},O),Pe("span",{id:"aria-focused"},x),Pe("span",{id:"aria-results"},A),Pe("span",{id:"aria-guidance"},R));return Pe(d.Fragment,null,Pe(vd,{id:s},T&&M),Pe(vd,{"aria-live":S,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!T&&M))},EC=RC,Cs=[{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źẑżžẓẕƶȥɀⱬꝣ"}],IC=new RegExp("["+Cs.map(function(e){return e.letters}).join("")+"]","g"),Fh={};for(var Zl=0;Zl<Cs.length;Zl++)for(var ql=Cs[Zl],Kl=0;Kl<ql.letters.length;Kl++)Fh[ql.letters[Kl]]=ql.base;var Lh=function(e){return e.replace(IC,function(t){return Fh[t]})},TC=CC(Lh),bd=function(e){return e.replace(/^\s+|\s+$/g,"")},OC=function(e){return"".concat(e.label," ").concat(e.value)},DC=function(e){return function(t,n){if(t.data.__isNew__)return!0;var r=Te({ignoreCase:!0,ignoreAccents:!0,stringify:OC,trim:!0,matchFrom:"any"},e),o=r.ignoreCase,i=r.ignoreAccents,a=r.stringify,l=r.trim,s=r.matchFrom,u=l?bd(n):n,c=l?bd(a(t)):a(t);return o&&(u=u.toLowerCase(),c=c.toLowerCase()),i&&(u=TC(u),c=Lh(c)),s==="start"?c.substr(0,u.length)===u:c.indexOf(u)>-1}},PC=["innerRef"];function AC(e){var t=e.innerRef,n=ar(e,PC),r=ax(n,"onExited","in","enter","exit","appear");return Pe("input",Ve({ref:t},r,{css:Js({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 HC=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(w,y){if(u.current!==null){var v=u.current,C=v.scrollTop,E=v.scrollHeight,I=v.clientHeight,S=u.current,P=y>0,O=E-I-C,x=!1;O>y&&a.current&&(r&&r(w),a.current=!1),P&&l.current&&(i&&i(w),l.current=!1),P&&y>O?(n&&!a.current&&n(w),S.scrollTop=E,x=!0,a.current=!0):!P&&-y>C&&(o&&!l.current&&o(w),S.scrollTop=0,x=!0,l.current=!0),x&&HC(w)}},[n,r,o,i]),f=d.useCallback(function(w){c(w,w.deltaY)},[c]),g=d.useCallback(function(w){s.current=w.changedTouches[0].clientY},[]),h=d.useCallback(function(w){var y=s.current-w.changedTouches[0].clientY;c(w,y)},[c]),p=d.useCallback(function(w){if(w){var y=rx?{passive:!1}:!1;w.addEventListener("wheel",f,y),w.addEventListener("touchstart",g,y),w.addEventListener("touchmove",h,y)}},[h,g,f]),m=d.useCallback(function(w){w&&(w.removeEventListener("wheel",f,!1),w.removeEventListener("touchstart",g,!1),w.removeEventListener("touchmove",h,!1))},[h,g,f]);return d.useEffect(function(){if(t){var w=u.current;return p(w),function(){m(w)}}},[t,p,m]),function(w){u.current=w}}var yd=["boxSizing","height","overflow","paddingRight","position"],wd={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function xd(e){e.cancelable&&e.preventDefault()}function Cd(e){e.stopPropagation()}function kd(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Sd(){return"ontouchstart"in window||navigator.maxTouchPoints}var Md=!!(typeof window<"u"&&window.document&&window.document.createElement),ai=0,bo={capture:!1,passive:!1};function FC(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(Md){var u=document.body,c=u&&u.style;if(r&&yd.forEach(function(p){var m=c&&c[p];o.current[p]=m}),r&&ai<1){var f=parseInt(o.current.paddingRight,10)||0,g=document.body?document.body.clientWidth:0,h=window.innerWidth-g+f||0;Object.keys(wd).forEach(function(p){var m=wd[p];c&&(c[p]=m)}),c&&(c.paddingRight="".concat(h,"px"))}u&&Sd()&&(u.addEventListener("touchmove",xd,bo),s&&(s.addEventListener("touchstart",kd,bo),s.addEventListener("touchmove",Cd,bo))),ai+=1}},[r]),l=d.useCallback(function(s){if(Md){var u=document.body,c=u&&u.style;ai=Math.max(ai-1,0),r&&ai<1&&yd.forEach(function(f){var g=o.current[f];c&&(c[f]=g)}),u&&Sd()&&(u.removeEventListener("touchmove",xd,bo),s&&(s.removeEventListener("touchstart",kd,bo),s.removeEventListener("touchmove",Cd,bo)))}},[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 LC=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},VC={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function $C(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=FC({isEnabled:n}),f=function(g){u(g),c(g)};return Pe(d.Fragment,null,n&&Pe("div",{onClick:LC,css:VC}),t(f))}var _C={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},BC=function(e){var t=e.name,n=e.onFocus;return Pe("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:_C,value:"",onChange:function(){}})},NC=BC;function nu(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 jC(){return nu(/^iPhone/i)}function Vh(){return nu(/^Mac/i)}function WC(){return nu(/^iPad/i)||Vh()&&navigator.maxTouchPoints>1}function UC(){return jC()||WC()}function YC(){return Vh()||UC()}var XC=function(e){return e.label},$h=function(e){return e.label},_h=function(e){return e.value},ZC=function(e){return!!e.isDisabled},qC={clearIndicator:Hx,container:kx,control:Bx,dropdownIndicator:Px,group:Ux,groupHeading:Xx,indicatorsContainer:Ex,indicatorSeparator:Fx,input:Jx,loadingIndicator:$x,loadingMessage:bx,menu:dx,menuList:gx,menuPortal:xx,multiValue:nC,multiValueLabel:rC,multiValueRemove:oC,noOptionsMessage:vx,option:cC,placeholder:hC,singleValue:mC,valueContainer:Mx},KC={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,Bh=4,QC=38,GC=Bh*2,ek={baseUnit:Bh,controlHeight:QC,menuGutter:GC},Jl={borderRadius:JC,colors:KC,spacing:ek},tk={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:pd(),captureMenuScroll:!pd(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:DC(),formatGroupLabel:XC,getOptionLabel:$h,getOptionValue:_h,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:ZC,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!tx(),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=Wh(e,t,n),i=Uh(e,t,n),a=jh(e,t),l=Ia(e,t);return{type:"option",data:t,isDisabled:o,isSelected:i,label:a,value:l,index:r}}function sa(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 Id(e,a)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=Rd(e,n,t,r);return Id(e,i)?i:void 0}).filter(ox)}function Nh(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,Ro(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,Ro(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 nk(e,t){return Nh(sa(e,t))}function Id(e,t){var n=e.inputValue,r=n===void 0?"":n,o=t.data,i=t.isSelected,a=t.label,l=t.value;return(!Xh(e)||!i)&&Yh(e,{label:a,value:l,data:o},r)}function rk(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 ok(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var Ql=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},jh=function(e,t){return e.getOptionLabel(t)},Ia=function(e,t){return e.getOptionValue(t)};function Wh(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function Uh(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=Ia(e,t);return n.some(function(o){return Ia(e,o)===r})}function Yh(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var Xh=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return t===void 0?n:t},ik=1,ru=(function(e){Am(n,e);var t=Fm(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,f=c.onChange,g=c.name;u.name=g,o.ariaOnChange(s,u),f(s,u)},o.setValue=function(s,u,c){var f=o.props,g=f.closeMenuOnSelect,h=f.isMulti,p=f.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:p}),g&&(o.setState({inputIsHiddenAfterUpdate:!h}),o.onMenuClose()),o.setState({clearFocusValueOnUpdate:!0}),o.onChange(s,{action:u,option:c})},o.selectOption=function(s){var u=o.props,c=u.blurInputOnSelect,f=u.isMulti,g=u.name,h=o.state.selectValue,p=f&&o.isOptionSelected(s,h),m=o.isOptionDisabled(s,h);if(p){var w=o.getOptionValue(s);o.setValue(h.filter(function(y){return o.getOptionValue(y)!==w}),"deselect-option",s)}else if(!m)f?o.setValue([].concat(Ro(h),[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,f=o.getOptionValue(s),g=c.filter(function(p){return o.getOptionValue(p)!==f}),h=si(u,g,g[0]||null);o.onChange(h,{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],f=u.slice(0,u.length-1),g=si(s,f,f[0]||null);c&&o.onChange(g,{action:"pop-value",removedValue:c})},o.getFocusedOptionId=function(s){return Ql(o.state.focusableOptionsWithIds,s)},o.getFocusableOptionsWithIds=function(){return Ed(sa(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 Kw.apply(void 0,[o.props.classNamePrefix].concat(u))},o.getOptionLabel=function(s){return jh(o.props,s)},o.getOptionValue=function(s){return Ia(o.props,s)},o.getStyles=function(s,u){var c=o.props.unstyled,f=qC[s](u,c);f.boxSizing="border-box";var g=o.props.styles[s];return g?g(f,u):f},o.getClassNames=function(s,u){var c,f;return(c=(f=o.props.classNames)[s])===null||c===void 0?void 0:c.call(f,u)},o.getElementId=function(s){return"".concat(o.state.instancePrefix,"-").concat(s)},o.getComponents=function(){return yC(o.props)},o.buildCategorizedOptions=function(){return sa(o.props,o.state.selectValue)},o.getCategorizedOptions=function(){return o.props.menuIsOpen?o.buildCategorizedOptions():[]},o.buildFocusableOptions=function(){return Nh(o.buildCategorizedOptions())},o.getFocusableOptions=function(){return o.props.menuIsOpen?o.buildFocusableOptions():[]},o.ariaOnChange=function(s,u){o.setState({ariaSelection:Te({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,f=u.menuIsOpen;o.focusInput(),f?(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&&za(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 f=Math.abs(c.clientX-o.initialTouchX),g=Math.abs(c.clientY-o.initialTouchY),h=5;o.userIsDragging=f>h||g>h}},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 Xh(o.props)},o.onValueInputFocus=function(s){s.preventDefault(),s.stopPropagation(),o.focus()},o.onKeyDown=function(s){var u=o.props,c=u.isMulti,f=u.backspaceRemovesValue,g=u.escapeClearsValue,h=u.inputValue,p=u.isClearable,m=u.isDisabled,w=u.menuIsOpen,y=u.onKeyDown,v=u.tabSelectsValue,C=u.openMenuOnFocus,E=o.state,I=E.focusedOption,S=E.focusedValue,P=E.selectValue;if(!m&&!(typeof y=="function"&&(y(s),s.defaultPrevented))){switch(o.blockOptionHover=!0,s.key){case"ArrowLeft":if(!c||h)return;o.focusValue("previous");break;case"ArrowRight":if(!c||h)return;o.focusValue("next");break;case"Delete":case"Backspace":if(h)return;if(S)o.removeValue(S);else{if(!f)return;c?o.popValue():p&&o.clearValue()}break;case"Tab":if(o.isComposing||s.shiftKey||!w||!v||!I||C&&o.isOptionSelected(I,P))return;o.selectOption(I);break;case"Enter":if(s.keyCode===229)break;if(w){if(!I||o.isComposing)return;o.selectOption(I);break}return;case"Escape":w?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close",prevInputValue:h}),o.onMenuClose()):p&&g&&o.clearValue();break;case" ":if(h)return;if(!w){o.openMenu("first");break}if(!I)return;o.selectOption(I);break;case"ArrowUp":w?o.focusOption("up"):o.openMenu("last");break;case"ArrowDown":w?o.focusOption("down"):o.openMenu("first");break;case"PageUp":if(!w)return;o.focusOption("pageup");break;case"PageDown":if(!w)return;o.focusOption("pagedown");break;case"Home":if(!w)return;o.focusOption("first");break;case"End":if(!w)return;o.focusOption("last");break;default:return}s.preventDefault()}},o.state.instancePrefix="react-select-"+(o.props.instanceId||++ik),o.state.selectValue=Ra(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=Ql(i,a[l])}return o}return Hm(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&&hd(this.menuListRef,this.focusedOptionRef),YC()&&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&&(hd(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(Jl):Te(Te({},Jl),this.props.theme):Jl})},{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,f=c.isMulti,g=c.isRtl,h=c.options,p=this.hasValue();return{clearValue:r,cx:o,getStyles:i,getClassNames:a,getValue:l,hasValue:p,isMulti:f,isRtl:g,options:h,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 Wh(this.props,r,o)}},{key:"isOptionSelected",value:function(r,o){return Uh(this.props,r,o)}},{key:"filterOption",value:function(r,o){return Yh(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,f=r.required,g=this.getComponents(),h=g.Input,p=this.state,m=p.inputIsHidden,w=p.ariaSelection,y=this.commonProps,v=a||this.getElementId("input"),C=Te(Te(Te({"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":f,role:"combobox","aria-activedescendant":this.state.isAppleDevice?void 0:this.state.focusedOptionId||""},c&&{"aria-controls":this.getElementId("listbox")}),!i&&{"aria-readonly":!0}),this.hasValue()?w?.action==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return i?d.createElement(h,Ve({},y,{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},C)):d.createElement(AC,Ve({id:v,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Ma,onFocus:this.onInputFocus,disabled:o,tabIndex:s,inputMode:"none",form:u,value:""},C))})},{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,f=this.commonProps,g=this.props,h=g.controlShouldRenderValue,p=g.isDisabled,m=g.isMulti,w=g.inputValue,y=g.placeholder,v=this.state,C=v.selectValue,E=v.focusedValue,I=v.isFocused;if(!this.hasValue()||!h)return w?null:d.createElement(c,Ve({},f,{key:"placeholder",isDisabled:p,isFocused:I,innerProps:{id:this.getElementId("placeholder")}}),y);if(m)return C.map(function(P,O){var x=P===E,A="".concat(r.getOptionLabel(P),"-").concat(r.getOptionValue(P));return d.createElement(i,Ve({},f,{components:{Container:a,Label:l,Remove:s},isFocused:x,isDisabled:p,key:A,index:O,removeProps:{onClick:function(){return r.removeValue(P)},onTouchEnd:function(){return r.removeValue(P)},onMouseDown:function(T){T.preventDefault()}},data:P}),r.formatOptionLabel(P,"value"))});if(w)return null;var S=C[0];return d.createElement(u,Ve({},f,{data:S,isDisabled:p}),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,f=o.NoOptionsMessage,g=o.Option,h=this.commonProps,p=this.state.focusedOption,m=this.props,w=m.captureMenuScroll,y=m.inputValue,v=m.isLoading,C=m.loadingMessage,E=m.minMenuHeight,I=m.maxMenuHeight,S=m.menuIsOpen,P=m.menuPlacement,O=m.menuPosition,x=m.menuPortalTarget,A=m.menuShouldBlockScroll,T=m.menuShouldScrollIntoView,R=m.noOptionsMessage,M=m.onMenuScrollToTop,D=m.onMenuScrollToBottom;if(!S)return null;var k=function(J,ge){var oe=J.type,de=J.data,pe=J.isDisabled,le=J.isSelected,V=J.label,H=J.value,U=p===de,re=pe?void 0:function(){return r.onOptionHover(de)},se=pe?void 0:function(){return r.selectOption(de)},Oe="".concat(r.getElementId("option"),"-").concat(ge),be={id:Oe,onClick:se,onMouseMove:re,onMouseOver:re,tabIndex:-1,role:"option","aria-selected":r.state.isAppleDevice?void 0:le};return d.createElement(g,Ve({},h,{innerProps:be,data:de,isDisabled:pe,isSelected:le,key:Oe,label:V,type:oe,value:H,isFocused:U,innerRef:U?r.getFocusedOptionRef:void 0}),r.formatOptionLabel(J.data,"menu"))},X;if(this.hasOptions())X=this.getCategorizedOptions().map(function(J){if(J.type==="group"){var ge=J.data,oe=J.options,de=J.index,pe="".concat(r.getElementId("group"),"-").concat(de),le="".concat(pe,"-heading");return d.createElement(i,Ve({},h,{key:pe,data:ge,options:oe,Heading:a,headingProps:{id:le,data:J.data},label:r.formatGroupLabel(J.data)}),J.options.map(function(V){return k(V,"".concat(de,"-").concat(V.index))}))}else if(J.type==="option")return k(J,"".concat(J.index))});else if(v){var $=C({inputValue:y});if($===null)return null;X=d.createElement(c,h,$)}else{var K=R({inputValue:y});if(K===null)return null;X=d.createElement(f,h,K)}var ie={minMenuHeight:E,maxMenuHeight:I,menuPlacement:P,menuPosition:O,menuShouldScrollIntoView:T},ee=d.createElement(fx,Ve({},h,ie),function(J){var ge=J.ref,oe=J.placerProps,de=oe.placement,pe=oe.maxHeight;return d.createElement(l,Ve({},h,ie,{innerRef:ge,innerProps:{onMouseDown:r.onMenuMouseDown,onMouseMove:r.onMenuMouseMove},isLoading:v,placement:de}),d.createElement($C,{captureEnabled:w,onTopArrive:M,onBottomArrive:D,lockEnabled:A},function(le){return d.createElement(s,Ve({},h,{innerRef:function(V){r.getMenuListRef(V),le(V)},innerProps:{role:"listbox","aria-multiselectable":h.isMulti,id:r.getElementId("listbox")},isLoading:v,maxHeight:pe,focusedOption:p}),X)}))});return x||O==="fixed"?d.createElement(u,Ve({},h,{appendTo:x,controlElement:this.controlRef,menuPlacement:P,menuPosition:O}),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(NC,{name:s,onFocus:this.onValueInputFocus});if(!(!s||a))if(l)if(i){var f=c.map(function(p){return r.getOptionValue(p)}).join(i);return d.createElement("input",{name:s,type:"hidden",value:f})}else{var g=c.length>0?c.map(function(p,m){return d.createElement("input",{key:"i-".concat(m),name:s,type:"hidden",value:r.getOptionValue(p)})}):d.createElement("input",{name:s,type:"hidden",value:""});return d.createElement("div",null,g)}else{var h=c[0]?this.getOptionValue(c[0]):"";return d.createElement("input",{name:s,type:"hidden",value:h})}}},{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(EC,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,f=s.isDisabled,g=s.menuIsOpen,h=this.state.isFocused,p=this.commonProps=this.getCommonProps();return d.createElement(a,Ve({},p,{className:u,innerProps:{id:c,onKeyDown:this.onKeyDown},isDisabled:f,isFocused:h}),this.renderLiveRegion(),d.createElement(o,Ve({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:f,isFocused:h,menuIsOpen:g}),d.createElement(l,Ve({},p,{isDisabled:f}),this.renderPlaceholderOrValue(),this.renderInput()),d.createElement(i,Ve({},p,{isDisabled:f}),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,f=o.instancePrefix,g=r.options,h=r.value,p=r.menuIsOpen,m=r.inputValue,w=r.isMulti,y=Ra(h),v={};if(i&&(h!==i.value||g!==i.options||p!==i.menuIsOpen||m!==i.inputValue)){var C=p?nk(r,y):[],E=p?Ed(sa(r,y),"".concat(f,"-option")):[],I=a?rk(o,y):null,S=ok(o,C),P=Ql(E,S);v={selectValue:y,focusedOption:S,focusedOptionId:P,focusableOptionsWithIds:E,focusedValue:I,clearFocusValueOnUpdate:!1}}var O=l!=null&&r!==i?{inputIsHidden:l,inputIsHiddenAfterUpdate:void 0}:{},x=s,A=u&&c;return u&&!A&&(x={value:si(w,y,y[0]||null),options:y,action:"initial-input-focus"},A=!c),s?.action==="initial-input-focus"&&(x=null),Te(Te(Te({},v),O),{},{prevProps:r,ariaSelection:x,prevWasFocused:A})}}]),n})(d.Component);ru.defaultProps=tk;var ak=d.forwardRef(function(e,t){var n=mh(e);return d.createElement(ru,Ve({ref:t},n))}),Zh=ak,lk=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],Td=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},Gl={formatCreateLabel:function(e){return'Create "'.concat(e,'"')},isValidNewOption:function(e,t,n,r){return!(!e||t.some(function(o){return Td(e,o,r)})||n.some(function(o){return Td(e,o,r)}))},getNewOptionData:function(e,t){return{label:t,value:e,__isNew__:!0}}};function sk(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?Gl.formatCreateLabel:i,l=e.isValidNewOption,s=l===void 0?Gl.isValidNewOption:l,u=e.getNewOptionData,c=u===void 0?Gl.getNewOptionData:u,f=e.onCreateOption,g=e.options,h=g===void 0?[]:g,p=e.onChange,m=ar(e,lk),w=m.getOptionValue,y=w===void 0?_h:w,v=m.getOptionLabel,C=v===void 0?$h:v,E=m.inputValue,I=m.isLoading,S=m.isMulti,P=m.value,O=m.name,x=d.useMemo(function(){return s(E,Ra(P),h,{getOptionValue:y,getOptionLabel:C})?c(E,a(E)):void 0},[a,c,C,y,E,s,h,P]),A=d.useMemo(function(){return(n||!I)&&x?o==="first"?[x].concat(Ro(h)):[].concat(Ro(h),[x]):h},[n,o,I,x,h]),T=d.useCallback(function(R,M){if(M.action!=="select-option")return p(R,M);var D=Array.isArray(R)?R:[R];if(D[D.length-1]===x){if(f)f(E);else{var k=c(E,E),X={action:"create-option",name:O,option:k};p(si(S,[].concat(Ro(Ra(P)),[k]),k),X)}return}p(R,M)},[c,E,S,O,x,f,p,P]);return Te(Te({},m),{},{options:A,onChange:T})}var uk=d.forwardRef(function(e,t){var n=mh(e),r=sk(n);return d.createElement(ru,Ve({ref:t},r))}),ck=uk;const ou="__value",dk=new RegExp(`^${ou}\\d+__`),fk=Hn("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);}"}),hk=Hn("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);}"}),ua=e=>e.map(t=>typeof t=="string"?{value:t,label:t,color:void 0}:Me(t)?{value:"",label:"",color:void 0}:{value:t.value,label:t.label??t.value??"",color:t.color}),qh=(e,t,n)=>Me(e)?[]:e.map((r,o)=>{const i=n?`${ou}${o}__`:"",a=t.find(l=>l.value===r);return a?{...a,value:`${i}${a.value}`}:{value:`${i}${r}`,label:r}}),pk=e=>{const{Menu:t}=Fa,{children:n,...r}=e;return he.jsx(t,{...r,children:n})},gk=e=>{const t=e.innerProps,n={...t,onMouseDown:r=>{r.stopPropagation(),t?.onMouseDown?.(r)},onTouchEnd:r=>{r.stopPropagation(),t?.onTouchEnd?.(r)}};return he.jsx(Fa.MultiValueLabel,{...e,innerProps:n})},mk=()=>null,vk=()=>null,bk=e=>e.selectProps?.menuDisabled?null:he.jsx(hk,{children:he.jsx(pk,{...e,className:[e.className,"click-outside-ignore"].filter(Boolean).join(" ")})}),yk=e=>{const{value:t,initialValue:n,onChange:r,onFinishedEditing:o}=e,{options:i,values:a,allowCreation:l,allowDuplicates:s}=t.data,u=Yf(),[c,f]=d.useState(a),[g,h]=d.useState(!0),[p,m]=d.useState(n??""),[w]=d.useState(()=>document.getElementById("portal")),y=d.useMemo(()=>ua(i??[]),[i]),v=l&&s&&y.length===0,C=d.useCallback(M=>{g&&M.stopPropagation()},[g]),E=d.useCallback(()=>h(!0),[]),I=d.useCallback(()=>h(!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?ss(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:X})=>k?{display:"none"}:{...M,color:D.color?ss(D.color)>.5?"black":"white":u.textBubble,backgroundColor:void 0,borderRadius:X?`${u.roundingRadius??u.bubbleHeight/2}px`:void 0,":hover":{cursor:"pointer"}}}),[u]),O=d.useCallback(M=>{const D=M.map(k=>s&&k.startsWith(ou)?k.replace(new RegExp(dk),""):k);f(D),r({...t,data:{...t.data,values:D}})},[t,r,s]),x=M=>{switch(M.key){case"Enter":case"Tab":if(!p){o(t,[0,1]);return}s&&l&&(m(""),O([...c??[],p]),h(!1),M.preventDefault())}},A=d.useMemo(()=>({DropdownIndicator:mk,IndicatorSeparator:vk,MultiValueLabel:gk,Menu:bk}),[]),T=d.useCallback(M=>{M===null||!Array.isArray(M)||O(M.map(D=>D.value))},[O]),R=l?ck:Zh;return he.jsx(fk,{onKeyDown:C,"data-testid":"multi-select-cell",children:he.jsx(R,{className:"gdg-multi-select",isMulti:!0,isDisabled:t.readonly,isClearable:!0,isSearchable:!0,inputValue:p,onInputChange:m,options:y,placeholder:t.readonly?"":l?"Add...":void 0,noOptionsMessage:S,menuIsOpen:t.readonly?!1:g,onMenuOpen:E,onMenuClose:I,value:qh(c,y,s),onKeyDown:t.readonly?void 0:x,menuPlacement:"auto",menuPortalTarget:w,autoFocus:!0,openMenuOnFocus:!0,openMenuOnClick:!0,closeMenuOnSelect:!0,backspaceRemovesValue:!0,escapeClearsValue:!1,styles:P,components:A,onChange:T,menuDisabled:v})})},wk={kind:Q.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(Me(a))return!0;const s=ua(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:f}=u,g=1,h=c===1?u.y+(u.height-r.bubbleHeight)/2:u.y+(u.height-c*r.bubbleHeight-(c-1)*r.bubblePadding)/2;for(const p of a){const m=s.find(E=>E.value===p),w=m?.color??(i?r.bgBubbleSelected:r.bgBubble),y=m?.label??p,v=Ir(y,n).width+r.bubblePadding*2,C=r.bubbleHeight/2;if(f!==u.x&&f+v>u.x+u.width&&g<c&&(g++,h+=r.bubbleHeight+r.bubblePadding,f=u.x),n.fillStyle=w,n.beginPath(),Zn(n,f,h,v,r.bubbleHeight,r.roundingRadius??r.bubbleHeight/2),n.fill(),n.fillStyle=m?.color?ss(w)>.5?"#000000":"#ffffff":r.textBubble,n.fillText(y,f+r.bubblePadding,h+C+qn(n,r)),f+=v+r.bubbleMargin,f>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=qh(r,ua(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:yk,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=ua(t.options??[]);n=n.filter(o=>r.find(i=>i.value===o))}if(n.length!==0)return{...t,values:n}}},Kh="line_chart",xk="area_chart",Jh="bar_chart",Ck=e=>new Map(Object.entries({red:e.colors.redColor,blue:e.colors.blueColor,green:e.colors.greenColor,yellow:e.colors.yellowColor,violet:e.colors.violetColor,orange:e.colors.orangeColor,gray:e.colors.grayColor,grey:e.colors.grayColor,primary:e.colors.primary}));function iu(e,t,n,r){const o=Oo({y_min:null,y_max:null,color:void 0},t.columnTypeOptions),i=Ck(r);let a;o.color==="auto"||o.color==="auto-inverse"?a=r.colors.greenColor:a=o.color?i.get(o.color)??o.color:void 0;const l={kind:Q.Custom,allowOverlay:!1,copyData:"",contentAlign:t.contentAlignment,data:{kind:"sparkline-cell",values:[],displayValues:[],graphKind:n,color:a,yAxis:[o.y_min??0,o.y_max??1]}};return{...t,kind:e,typeIcon:e===Kh?":material/show_chart:":e===Jh?":material/bar_chart:":":material/area_chart:",sortMode:"default",isEditable:!1,getCell(s){if(Me(s))return ms();const u=Zs(s),c=[];let f=[];if(u.length===0)return ms();let g=Number.MIN_SAFE_INTEGER,h=Number.MAX_SAFE_INTEGER;for(let y=0;y<u.length;y++){const v=yi(u[y]);if(Number.isNaN(v)||Me(v))return St(nt(u),`The value cannot be interpreted as a numeric array. ${nt(v)} is not a number.`);v>g&&(g=v),v<h&&(h=v),c.push(v)}let p,m;if(u.length===1){let y;g<=0?y=g===0?1:0:y=g,p=o.y_max??y,m=o.y_min??(g>=0?0:g)}else p=o.y_max??g,m=o.y_min??h;if(Me(m)||Me(p)||Number.isNaN(m)||Number.isNaN(p)||m>=p)return St("Invalid min/max y-axis configuration",`The y_min (${m}) and y_max (${p}) configuration options must be valid numbers.`);c.length>0&&(g>p||h<m)?f=c.map(y=>g-h===0?g>(p||1)?p:m:(p-m)*((y-h)/(g-h))+m):f=c;let w=a;return(o.color==="auto"&&f[0]>f[f.length-1]||o.color==="auto-inverse"&&f[0]<f[f.length-1])&&(w=r.colors.redColor),{...l,copyData:c.join(","),data:{...l.data,values:f,displayValues:c.map(y=>fa(y)),yAxis:[m,p],color:w},isMissingValue:Me(s)}},getCellValue(s){return s.kind===Q.Loading||s.data?.values===void 0?null:s.data?.values}}}function Qh(e,t){return iu(Kh,e,"line",t)}Qh.isEditableType=!1;function Gh(e,t){return iu(Jh,e,"bar",t)}Gh.isEditableType=!1;function ep(e,t){return iu(xk,e,"area",t)}ep.isEditableType=!1;function au(e,t){const n={kind:Q.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.md),en(t.radii.maxCheckbox)))},getCell(r){let o=null;return o=hh(r),o===void 0?St(nt(r),"The value cannot be interpreted as boolean."):{...n,data:o,isMissingValue:Me(o)}},getCellValue(r){return r.data===void 0?null:r.data}}}au.isEditableType=!0;function Od(e,t){return t.startsWith("+")||t.startsWith("-")?e=e.utcOffset(t,!1):e=e.tz(t),e}function lu(e,t,n,r,o,i,a){const l=Oo({format:n,step:r,timezone:a},t.columnTypeOptions);let s;if(lt(l.timezone))try{s=Od(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 f={kind:Q.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=h=>{const p=Gi(h);return p===null?!t.isRequired:!(p===void 0||lt(u)&&i(p)<i(u)||lt(c)&&i(p)>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(h,p){if(p===!0){const C=g(h);if(C===!1)return St(nt(h),"Invalid input.");C instanceof Date&&(h=C)}const m=Gi(h);let w="",y="",v=s;if(m===void 0)return St(nt(h),"The value cannot be interpreted as a datetime object.");if(m!==null){let C=Hu.utc(m);if(!C.isValid())return St(nt(m),`Invalid moment date. This should never happen. Please report this bug.
|
|
191
|
+
Error: ${C.toString()}`);if(l.timezone){try{C=Od(C,l.timezone)}catch(E){return St(C.toISOString(),`Failed to adjust to the provided timezone: ${l.timezone}.
|
|
192
|
+
Error: ${E}`)}v=C.utcOffset()}try{y=zu(C,l.format||n,e)}catch(E){return St(C.toISOString(),`Failed to format the date for rendering with: ${l.format}.
|
|
193
|
+
Error: ${E}`)}w=zu(C,n,e)}return{...f,copyData:w,isMissingValue:Me(m),data:{...f.data,date:m,displayDate:y,timezoneOffset:v}}},getCellValue(h){return Me(h?.data?.date)?null:i(h.data.date)}}}function su(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=Dg(e.arrowType),r=lt(n)||lt(e?.columnTypeOptions?.timezone);return lu("datetime",e,r?t+"Z":t,1,"datetime-local",o=>r?o.toISOString():o.toISOString().replace("Z",""),n)}su.isEditableType=!0;function uu(e){let t="HH:mm:ss";return e.columnTypeOptions?.step>=60?t="HH:mm":e.columnTypeOptions?.step<1&&(t="HH:mm:ss.SSS"),lu("time",e,t,1,"time",n=>n.toISOString().split("T")[1].replace("Z",""))}uu.isEditableType=!0;function cu(e){return lu("date",e,"YYYY-MM-DD",1,"date",t=>t.toISOString().split("T")[0])}cu.isEditableType=!0;function tp(e){const t={kind:Q.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]}}}tp.isEditableType=!1;function np(e){const t={kind:Q.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)?wi(Ca(n)):"";return{...t,copyData:r,isMissingValue:Me(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}}}np.isEditableType=!1;function rp(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(!Me(o)){if(o.startsWith(":material/")&&Pg(o))o=Ag(o).icon,r=!0;else if(o.includes("(")&&o.includes(")"))try{i=new RegExp(o,"us")}catch{i=void 0}}const a={kind:Q.Uri,readonly:!e.isEditable,allowOverlay:!r,contentAlign:e.contentAlignment??(r?"center":void 0),style:"normal",hoverEffect:!0,data:"",displayData:"",copyData:"",...r&&{themeOverride:{fontFamily:Hg.iconFont,linkColor:void 0}}},l=s=>{if(Me(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(Me(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 f="";return c&&(i!==void 0?f=uw(i,c):f=o||c),{...a,data:c,displayData:f,isMissingValue:Me(c),onClickUri:g=>{window.open(c.startsWith("www.")?`https://${c}`:c,"_blank","noopener,noreferrer"),g.preventDefault()},copyData:c}},getCellValue(s){return Me(s.data)?null:s.data}}}rp.isEditableType=!0;function du(e){const t={kind:Q.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(Me(n))return{...t,data:{...t.data,values:null},isMissingValue:!0,copyData:""};const r=Zs(n);return{...t,data:{...t.data,values:r},copyData:ph(r),...e.isEditable&&!fh(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 Me(n.data?.values)?null:n.data.values}}}du.isEditableType=!0;const kk=e=>{const t=Bg(e);return new Map(Object.entries({red:t.redbg,blue:t.bluebg,green:t.greenbg,yellow:t.yellowbg,violet:t.violetbg,purple:t.purplebg,orange:t.orangebg,gray:t.graybg,grey:t.graybg,primary:t.primarybg}))},Sk=(e,t)=>{if(Me(e))return[];const n=kk(t),r=t.colors.chartCategoricalColors,o=ki(t);let i=0;return e.filter(a=>a!==null&&a!=="").map(a=>{if(typeof a=="string")return{value:nt(a).trim(),label:void 0,color:void 0};let l;a.color==="auto"?(l=yo(r[i%r.length],o?.7:.6),i+=1):a.color&&(l=n.get(a.color)??a.color);const s=l?Vg(l,t.colors.bgColor):void 0;return{value:nt(a.value).trim(),label:a.label??void 0,color:s}})};function op(e,t){const n=Oo({options:[],accept_new_options:!1},e.columnTypeOptions),r=Sk(n.options,t),o=new Set(r.map(a=>a.value)),i={kind:Q.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(Me(a))return{...i,data:{...i.data,values:null},isMissingValue:!0,copyData:""};let s=Zs(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:ph(s),...e.isEditable&&!fh(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 Me(a.data?.values)?null:a.data.values}}}op.isEditableType=!0;function fu(e){const t=Oo({step:ef(e.arrowType)?1:void 0,min_value:zg(e.arrowType)?0:void 0},e.columnTypeOptions),n=!t.format&&(Fg(e.arrowType)||Lg(e.arrowType)),r=Me(t.min_value)||t.min_value<0,o=lt(t.step)&&!Number.isNaN(t.step)?gh(t.step):void 0,i={kind:Q.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=yi(l);if(Me(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 f=a(l);if(f===!1)return St(nt(l),"Invalid input.");typeof f=="number"&&(l=f)}let u=yi(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=lw(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=is(u,e.arrowType):c=fa(u,t.format,o)}catch(f){return St(nt(u),lt(t.format)?`Failed to format the number based on the provided format configuration: (${t.format}). Error: ${f}`:`Failed to format the number. Error: ${f}`)}}return{...i,data:u,displayData:c,isMissingValue:Me(u),copyData:Me(u)?"":nt(u)}},getCellValue(l){return l.data===void 0?null:l.data}}}fu.isEditableType=!0;function xi(e){const t={kind:Q.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)?wi(r):"";return{...t,data:r,displayData:o,isMissingValue:Me(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;const Mk=e=>new Map(Object.entries({red:e.colors.redColor,blue:e.colors.blueColor,green:e.colors.greenColor,yellow:e.colors.yellowColor,violet:e.colors.violetColor,orange:e.colors.orangeColor,gray:e.colors.grayColor,grey:e.colors.grayColor,primary:e.colors.primary}));function ip(e,t){const n=ef(e.arrowType),r=Oo({min_value:0,max_value:n?100:1,format:n?"%3d%%":"percent",step:n?1:void 0,color:void 0},e.columnTypeOptions),o=Mk(t),i=Me(r.step)||Number.isNaN(r.step)?void 0:gh(r.step);let a;try{a=fa(r.max_value,r.format,i)}catch{a=nt(r.max_value)}const l={kind:Q.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:a}};return{...e,kind:"progress",sortMode:"smart",typeIcon:":material/commit:",isEditable:!1,getCell(s){if(Me(s))return ms();if(Me(r.min_value)||Me(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 u=yi(s);if(Number.isNaN(u)||Me(u))return St(nt(s),"The value cannot be interpreted as a number.");if(Number.isInteger(u)&&!Number.isSafeInteger(u))return St(nt(s),"The value is larger than the maximum supported integer values in number columns (2^53).");let c="";try{c=fa(u,r.format,i)}catch(h){return St(nt(u),lt(r.format)?`Failed to format the number based on the provided format configuration: (${r.format}). Error: ${h}`:`Failed to format the number. Error: ${h}`)}const f=Math.min(r.max_value,Math.max(r.min_value,u));let g;if(r.color==="auto"||r.color==="auto-inverse"){const h=r.max_value-r.min_value,p=(h===0?0:(f-r.min_value)/h)>.5;r.color==="auto"?g=p?t?.colors.greenColor:t?.colors.redColor:g=p?t?.colors.redColor:t?.colors.greenColor}else r.color&&(g=o.get(r.color)??r.color);return{...l,isMissingValue:Me(s),copyData:String(u),data:{...l.data,value:f,label:c,measureLabel:c.length>a.length?c:a,color:g}}},getCellValue(s){return s.kind===Q.Loading||s.data?.value===void 0?null:s.data?.value}}}ip.isEditableType=!1;const Rk=e=>Me(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 hu(e){let t="string";const n=Oo({options:Gd(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=Rk(n.options),l={kind:Q.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(f=>f===null?c===null:typeof f=="string"?f===c:typeof f=="object"&&"value"in f?f.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 Me(s.data?.value)||s.data?.value===""?null:t==="number"?yi(s.data?.value)??null:t==="boolean"?hh(s.data?.value)??null:s.data?.value}}}hu.isEditableType=!0;function pu(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:Q.Text,data:"",displayData:"",allowOverlay:!0,contentAlign:e.contentAlignment,allowWrapping:e.isWrappingAllowed,readonly:!e.isEditable,style:e.isPinned?"faded":"normal"},o=i=>{if(Me(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)?wi(l):"";return{...r,isMissingValue:Me(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}}}pu.isEditableType=!0;const Dd=Hn("img",{target:"e24uaba0"})({name:"6eya2z",styles:"max-width:100%;max-height:37.5rem;object-fit:scale-down"}),Ek=({urls:e})=>{const t=e&&e.length>0?e[0]:"";return t.startsWith("http")?he.jsx("a",{href:t,target:"_blank",rel:"noreferrer noopener",children:he.jsx(Dd,{src:t})}):he.jsx(Dd,{src:t})},Pd=new Map(Object.entries({object:xi,text:pu,checkbox:au,selectbox:hu,list:du,multiselect:op,number:fu,link:rp,datetime:su,date:cu,time:uu,line_chart:Qh,bar_chart:Gh,area_chart:ep,image:tp,progress:ip,json:np})),Ik=[hw,wk],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 Tk(e){return{changeColumnFormat:d.useCallback((t,n)=>{e(r=>Ci({columnId:t,columnConfigMapping:r,updatedProps:{type_config:{format:n}}}))},[e])}}function es(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 Ok(e,t,n){const r={};if(!n.includes(t))return e;const o=es(t,"color",n);o&&(r.textDark=o,(e.kind===Q.Bubble||e.kind===Q.Custom&&e.data?.kind==="multi-select-cell")&&(r.textBubble=o),e.kind===Q.Uri&&(r.linkColor=o));const i=es(t,"background-color",n);i&&(r.bgCell=i),i==="yellow"&&o===void 0&&(r.textDark="#31333F");const a=es(t,"font-weight",n);return a&&(r.baseFontStyle=`${a} ${Ig.sm}`),r?{...e,themeOverride:r}:e}function Dk(e){return bg(e)||yg(e)?pu:wg(e)?su:qd(e)?uu:xg(e)?cu:Cg(e)||kg(e)?xi:Gd(e)?au:Sg(e)?fu:Mg(e)?hu:Rg(e)?du:xi}function ap(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 gu(e){return{group:void 0,isEditable:!1,isIndex:!1,isPinned:!1,isHidden:!1,isStretched:!1,...e}}function Pk(e,t){const n=e.columnNames.map(l=>l[t]),{title:r,group:o}=ap(n),i=e.columnTypes[t];let a=!0;return cg(i)&&(a=!1),gu({id:`_index-${t}`,indexNumber:t,name:r,title:r,group:o,isEditable:a,arrowType:i,isIndex:!0,isPinned:!0})}function Ak(e,t){const n=e.columnNames.map(a=>a[t]),{title:r,group:o}=ap(n),i=e.columnTypes[t];return gu({id:`_column-${r}-${t}`,indexNumber:t,name:r,isEditable:!0,title:r,arrowType:i,group:o})}function lp(){return gu({id:"_empty-index",indexNumber:0,title:"",name:"",isEditable:!1,isIndex:!0,isPinned:!0,arrowType:{type:ig.INDEX,arrowField:new rg("",new og,!0),pandasType:void 0}})}function Ad(e){const t=[],{dimensions:n}=e,r=n.numIndexColumns,o=n.numDataColumns;if(r===0&&o===0)return t.push(lp()),t;for(let i=0;i<r;i++)t.push(Pk(e,i));for(let i=0;i<o;i++)t.push(Ak(e,i+r));return t}function Hk(e,t,n,r=void 0){let o;if(e.kind==="object"||e.kind==="json")o=e.getCell(lt(t.content)?wi(is(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=hm(t.content,t.field):i=Br.utc(Number(t.content)).toDate(),o=e.getCell(i)}else if(ag(t.contentType)){const i=Me(t.content)?null:is(t.content,t.contentType);o=e.getCell(i)}else o=e.getCell(t.content);if(Eo(o))return o;if(!e.isEditable){if(n&<(n?.displayContent)){const i=wi(n.displayContent);o.kind===Q.Text?o={...o,displayData:i}:o.kind===Q.Number&&Me(e.columnTypeOptions?.format)?o={...o,displayData:i}:o.kind===Q.Uri&&Me(e.columnTypeOptions?.display_text)?o={...o,displayData:i}:o.kind===Q.Custom&&o.data?.kind==="date-picker-cell"&&Me(e.columnTypeOptions?.format)&&(o={...o,data:{...o.data,displayDate:i}})}r&&n?.cssId&&(o=Ok(o,n.cssId,r))}return o}function sp(e,t){return t?t?.useStretch??!1:e.useContainerWidth??!1}function up(e,t){return t?t.pixelWidth?t.pixelWidth:void 0:e.width||void 0}function zk(e){return e?.useContent??!1}function Fk(e,t){return t?!1:e?.useStretch??!1}function Lk(e){return e?.useContent??!1}function Vk(e,t){return t?t.pixelHeight?t.pixelHeight:void 0:e.height||void 0}function ts({numRows:e,rowHeight:t,theme:n,numHeaderRows:r=1}){return e*t+r*n.defaultHeaderHeight+2*n.tableBorderWidth}const ca="_index",Hd="_pos:",zd={small:75,medium:200,large:400},cp=Ss.getLogger("useColumnLoader");function $k(e){if(!Me(e)){if(typeof e=="number")return e;if(e in zd)return zd[e]}}const ra=(e,t)=>ng(e,t,(n,r)=>{if(Qd(r))return r});function Fd(e,t){if(!t)return e;let n={};return e.isIndex&&t.has(ca)&&(n=ra(n,t.get(ca)??{})),t.has(`${Hd}${e.indexNumber}`)&&(n=ra(n,t.get(`${Hd}${e.indexNumber}`)??{})),t.has(e.name)&&e.name!==ca&&(n=ra(n,t.get(e.name)??{})),t.has(e.id)&&(n=ra(n,t.get(e.id)??{})),Xm(n)?e:Zd({...e},{title:n.label,width:$k(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 cp.error(t),new Map}}function Ld(e){const t=e.columnTypeOptions?.type;let n;return lt(t)&&(Pd.has(t)?n=Pd.get(t):cp.warn(`Unknown column type configured in column configuration: ${t}`)),Me(n)&&(n=Dk(e.arrowType)),n}function Bk(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(()=>sp(e,o),[e,o]),c=d.useMemo(()=>up(e,o),[e,o]),f=u||lt(c)&&c>0,g=lt(e.rowHeight)&&e.rowHeight>en("4rem"),h=d.useMemo(()=>Ad(t).map(p=>{let m={...p,...Fd(p,l),isStretched:f};const w=Ld(m);return(e.editingMode===Yt.EditingMode.READ_ONLY||n||w.isEditableType===!1)&&(m={...m,isEditable:!1}),e.editingMode!==Yt.EditingMode.READ_ONLY&&m.isEditable==!0&&(m={...m,icon:"editable"},m.isRequired&&e.editingMode===Yt.EditingMode.DYNAMIC&&(m={...m,isHidden:!1})),w(m,i)}),[t,l,f,e.editingMode,n,i]);return{columns:d.useMemo(()=>{const p=Ad(t).map(v=>{let C={...v,...Fd(v,l),isStretched:f,isWrappingAllowed:g};const E=Ld(C);return(e.editingMode===Yt.EditingMode.READ_ONLY||n||E.isEditableType===!1)&&(C={...C,isEditable:!1}),e.editingMode!==Yt.EditingMode.READ_ONLY&&C.isEditable==!0&&(C={...C,icon:"editable"},C.isRequired&&e.editingMode===Yt.EditingMode.DYNAMIC&&(C={...C,isHidden:!1})),E(C,i)}).filter(v=>!v.isHidden),m=[],w=[];r?.length?(p.forEach(v=>{v.isIndex&&!r.includes(v.name)&&!r.includes(v.id)&&v.isPinned!==!1&&m.push(v)}),r.forEach(v=>{const C=p.find(E=>E.name===v||E.id===v);C&&(C.isPinned?m.push(C):w.push(C))})):p.forEach(v=>{v.isPinned?m.push(v):w.push(v)});const y=[...m,...w];return y.length>0?y:[xi(lp())]},[t,l,g,f,n,e.editingMode,r,i]),allColumns:h,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 jk(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 Wk(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 Uk(e){switch(e.kind){case Q.Number:return e.data?.toString()??"";case Q.Boolean:return e.data?.toString()??"";case Q.Markdown:case Q.RowID:case Q.Text:case Q.Uri:return e.data??"";case Q.Bubble:case Q.Image:return e.data.join("");case Q.Drilldown:return e.data.map(t=>t.text).join("");case Q.Protected:case Q.Loading:return"";case Q.Custom:return e.copyData}}function Vd(e){if(typeof e=="number")return e;if(e.length>0){const t=Number(e);isNaN(t)||(e=t)}return e}function Yk(e,t){return e=Vd(e),t=Vd(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 Zk(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(f=>u.column===f||f.id!==void 0&&u.column.id===f.id);return c===-1?void 0:c}),[o,e.columns]),a=d.useMemo(()=>{const u=o.map((f,g)=>({sort:f,col:i[g]})).filter(f=>f.col!==void 0);if(u.length===0)return;const c=u.map(()=>new Array(n));for(let f=0;f<u.length;f++){const{col:g}=u[f],h=[g,0];for(let p=0;p<n;p++)h[1]=p,c[f][p]=Uk(r(h))}return Mr(n).sort((f,g)=>{for(let h=0;h<u.length;h++){const{sort:p}=u[h],m=c[h][f],w=c[h][g];let y;if(p.mode==="raw"?y=Xk(m,w):p.mode==="smart"?y=Yk(m,w):y=m.localeCompare(w),y!==0)return(p.direction??"asc")==="desc"&&(y=-y),y}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 qk(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 Kk(e,t,n){const[r,o]=d.useState(),{getCellContent:i,getOriginalIndex:a}=Zk({columns:t.map(u=>vs(u)),getCellContent:n,rows:e,sort:r}),l=d.useMemo(()=>qk(t,r),[t,r]),s=d.useCallback((u,c,f)=>{const g=l[u];let h;c==="auto"?(h="asc",r?.column.id===g.id&&(r.direction==="asc"?h="desc":h=void 0)):h=c,h===void 0||f&&h===r?.direction?o(void 0):o({column:vs(g),direction:h,mode:g.sortMode})},[r,l]);return{columns:l,sortColumn:s,getOriginalIndex:a,getCellContent:i}}function Jk(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===Q.Text&&e.readonly&&aw(e.data))return{editor:fw}},[])}}const Gk={kind:Q.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:f,hideAxis:g}=t.data;const[h,p]=s;if(l.length===0)return!0;l=l.map(S=>Math.min(1,Math.max(0,(S-h)/(p-h))));const m=r.cellHorizontalPadding,w=m+o.x,y=o.y+3,v=o.height-6,C=o.width-m*2,E=p-h,I=p<=0?y:h>=0?y+v:y+v*(p/E);if(!g&&h<=0&&p>=0&&(n.beginPath(),n.moveTo(w,I),n.lineTo(w+C,I),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,O=(C-P)/l.length;let x=w;for(const A of l){const T=y+v-A*v;n.moveTo(x,I),n.lineTo(x+O,I),n.lineTo(x+O,T),n.lineTo(x,T),x+=O+S}n.fillStyle=t.data.color??r.accentColor,n.fill()}else{l.length===1&&(l=[l[0],l[0]],f&&(f=[f[0],f[0]])),n.beginPath();const S=(o.width-16)/(l.length-1),P=l.map((x,A)=>({x:w+S*A,y:y+v-x*v}));n.moveTo(P[0].x,P[0].y);let O=0;if(P.length>2)for(O=1;O<P.length-2;O++){const x=(P[O].x+P[O+1].x)/2,A=(P[O].y+P[O+1].y)/2;n.quadraticCurveTo(P[O].x,P[O].y,x,A)}if(n.quadraticCurveTo(P[O].x,P[O].y,P[O+1].x,P[O+1].y),n.strokeStyle=u??r.accentColor,n.lineWidth=1+i*.5,n.stroke(),n.lineTo(o.x+o.width-m,I),n.lineTo(o.x+m,I),n.closePath(),c==="area"){n.globalAlpha=.2+.2*i;const x=n.createLinearGradient(0,y,0,y+v*1.4);x.addColorStop(0,u??r.accentColor);const[A,T,R]=mi(u??r.accentColor);x.addColorStop(1,`rgba(${A}, ${T}, ${R}, 0)`),n.fillStyle=x,n.fill(),n.globalAlpha=1}if(a!==void 0&&(c==="line"||c==="area")&&f!==void 0){n.beginPath();const x=Math.min(l.length-1,Math.max(0,Math.round((a-m)/S)));n.moveTo(w+x*S,o.y+1),n.lineTo(w+x*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(f[x],w,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 eS=e=>{const{Menu:t}=Fa,{children:n,...r}=e;return d.createElement(t,{...r},n)},tS=dn("div")({name:"Wrap",class:"gdg-wghi2zc",propsAsIs:!1}),nS=dn("div")({name:"PortalWrap",class:"gdg-p13nj8j0",propsAsIs:!1}),rS=dn("div")({name:"ReadOnlyWrap",class:"gdg-r6sia3g",propsAsIs:!1}),oS=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??""),f=Yf(),g=d.useMemo(()=>i.map(h=>typeof h=="string"||h===null||h===void 0?{value:h,label:h?.toString()??""}:h),[i]);return t.readonly?d.createElement(rS,null,d.createElement(Zr,{highlight:!0,autoFocus:!1,disabled:!0,value:l??"",onChange:()=>{}})):d.createElement(tS,null,d.createElement(Zh,{className:"glide-select",inputValue:u,onInputChange:c,menuPlacement:"auto",value:g.find(h=>h.value===l),styles:{control:h=>({...h,border:0,boxShadow:"none"}),option:(h,{isFocused:p})=>({...h,fontSize:f.editorFontSize,fontFamily:f.fontFamily,cursor:p?"pointer":void 0,paddingLeft:f.cellHorizontalPadding,paddingRight:f.cellHorizontalPadding,":active":{...h[":active"],color:f.accentFg},":empty::after":{content:'" "',visibility:"hidden"}})},theme:h=>({...h,colors:{...h.colors,neutral0:f.bgCell,neutral5:f.bgCell,neutral10:f.bgCell,neutral20:f.bgCellMedium,neutral30:f.bgCellMedium,neutral40:f.bgCellMedium,neutral50:f.textLight,neutral60:f.textMedium,neutral70:f.textMedium,neutral80:f.textDark,neutral90:f.textDark,neutral100:f.textDark,primary:f.accentColor,primary75:f.accentColor,primary50:f.accentColor,primary25:f.accentLight}}),menuPortalTarget:o?.current??document.getElementById("portal"),autoFocus:!0,openMenuOnFocus:!0,components:{DropdownIndicator:()=>null,IndicatorSeparator:()=>null,Menu:h=>d.createElement(nS,null,d.createElement(eS,{className:"click-outside-ignore",...h}))},options:g,onChange:async h=>{h!==null&&(s(h.value),await new Promise(p=>window.requestAnimationFrame(p)),n({...t,data:{...t.data,value:h.value}}))}}))},iS={kind:Q.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:oS,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 aS(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 lS={marginRight:8},sS={display:"flex",alignItems:"center",flexGrow:1},uS={kind:Q.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,f=o.x+r.cellHorizontalPadding,g=o.y+o.height/2,h=a-i,p=(l-i)/h,m=`${aS(r.baseFontStyle,.9)} ${r.fontFamily}`,w=_s(n,m)/2;n.save();let y=0;s!==void 0&&(n.font=m,y=Ir(u??s,n,m).width+r.cellHorizontalPadding);const v=o.width-r.cellHorizontalPadding*2-y;if(v>=w){const C=n.createLinearGradient(f,g,f+v,g),E=c??r.accentColor;C.addColorStop(0,E),C.addColorStop(p,E),C.addColorStop(p,r.bgBubble),C.addColorStop(1,r.bgBubble),n.beginPath(),n.fillStyle=C,$d(n,f,g-w/2,v,w,w/2),n.fill(),n.beginPath(),$d(n,f+.5,g-w/2+.5,v-1,w-1,(w-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:sS},d.createElement("input",{style:lS,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}}},cS=dn("input")({name:"StyledInputBox",class:"gdg-s1wtovjx",propsAsIs:!1}),ns=(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}`)}},dS=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?ns(n,t.min,i):t.min,l=t.max instanceof Date?ns(n,t.max,i):t.max,s=ns(n,t.date,i);return e.value.readonly?Ct.createElement(Zr,{highlight:!0,autoFocus:!1,disabled:!0,value:r??"",onChange:()=>{}}):Ct.createElement(cS,{"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)}})}})},fS={kind:Q.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:dS}),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 _d(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 pS=(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 gS(e,t){const n=d.useCallback((o,i)=>{const{cell:a,theme:l,ctx:s,rect:u}=o,c=o.col;if(Eo(a))_d(s,u,l);else if(Xs(a)&&c<e.length){const f=e[c],g=t??hS;["checkbox","line_chart","bar_chart","progress"].includes(f.kind)?i():pS(o,g),f.isRequired&&f.isEditable&&_d(s,u,l);return}i()},[e,t]),r=d.useMemo(()=>[Gk,iS,uS,fS,...Ik],[]);return{drawCell:n,customRenderers:r}}function mS(){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:yo(e.colors.primary,.9),borderColor:e.colors.dataframeBorderColor,horizontalBorderColor:e.colors.dataframeBorderColor,fontFamily:e.genericFonts.bodyFont,bgSearchResult:yo(e.colors.primary,.9),resizeIndicatorColor:e.colors.primary,bgIconHeader:e.colors.fadedText60,fgIconHeader:e.colors.white,bgHeader:e.colors.dataframeHeaderBackgroundColor,bgHeaderHasFocus:yo(e.colors.darkenedBgMix100,.9),bgHeaderHovered:yo(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:yo(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:eg(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:Gp(e.colors.bgColor,e.colors.secondaryBg,.3),headerIcons:t}},[e])}const vS=Ss.getLogger("useDataEditor");function bS({columns:e,canAddRows:t,canDeleteRows:n,editingState:r,getCellContent:o,getOriginalIndex:i,refreshCells:a,updateNumRows:l,syncEditState:s,clearSelection:u}){const c=d.useCallback(([w,y],v)=>{const C=e[w];if(!C.isEditable)return;const E=C.indexNumber,I=r.current.getOriginalRowIndex(i(y)),S=o([w,y]),P=C.getCellValue(S),O=C.getCellValue(v);if(!Eo(S)&&O===P)return;const x=C.getCell(O,!0);Eo(x)?vS.warn(`Not applying the cell edit since it causes this error:
|
|
196
|
+
${x.data}`):(r.current.setCell(E,I,{...x,lastUpdated:performance.now()}),s())},[e,r,i,o,s]),f=d.useCallback(()=>{if(!t)return;const w=new Map;e.forEach(y=>{w.set(y.indexNumber,y.getCell(y.defaultValue))}),r.current.addRow(w),l()},[e,r,t,l]),g=d.useCallback(()=>{t&&(f(),s())},[f,s,t]),h=d.useCallback(w=>{if(w.rows.length>0){if(!n)return!0;const y=w.rows.toArray().map(v=>r.current.getOriginalRowIndex(i(v)));return r.current.deleteRows(y),l(),u(),s(),!1}if(w.current?.range){const y=[],v=w.current.range;for(let C=v.y;C<v.y+v.height;C++)for(let E=v.x;E<v.x+v.width;E++){const I=e[E];I.isEditable&&!I.isRequired&&(y.push({cell:[E,C]}),c([E,C],I.getCell(null)))}return y.length>0&&(s(),a(y)),!1}return!0},[e,r,n,a,i,s,c,u,l]),p=d.useCallback((w,y)=>{const[v,C]=w,E=[];for(let I=0;I<y.length;I++){const S=y[I];if(I+C>=r.current.getNumRows()){if(!t)break;f()}for(let P=0;P<S.length;P++){const O=S[P],x=I+C,A=P+v;if(A>=e.length)break;const T=e[A];if(T.isEditable){const R=T.getCell(O,!0);if(lt(R)&&!Eo(R)){const M=T.indexNumber,D=r.current.getOriginalRowIndex(i(x)),k=T.getCellValue(o([A,x]));T.getCellValue(R)!==k&&(r.current.setCell(M,D,{...R,lastUpdated:performance.now()}),E.push({cell:[A,x]}))}}}E.length>0&&(s(),a(E))}return!1},[e,r,t,i,o,f,s,a]),m=d.useCallback((w,y)=>{const v=w[0];if(v>=e.length)return!0;const C=e[v];if(C.validateInput){const E=C.validateInput(C.getCellValue(y));return E===!0||E===!1?E:C.getCell(E)}return!0},[e]);return{onCellEdited:c,onPaste:p,onRowAppended:g,onDelete:h,validateCell:m}}const dp=",",ui='"',yS='"',fp=`
|
|
197
|
+
`,wS="\uFEFF",xS=new RegExp(`[${[dp,ui,fp].join("")}]`),Bd=Ss.getLogger("useDataExporter");function Nd(e){return e.map(t=>CS(t)).join(dp)+fp}function CS(e){if(Me(e))return"";const t=nt(e);return xS.test(t)?`${ui}${t.replace(new RegExp(ui,"g"),yS+ui)}${ui}`:t}async function jd(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(Nd(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(Nd(l)))}await e.close()}function kS(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 ks(()=>import("./es6--XPcqeHG-7ATg0sOb.js"),__vite__mapDeps([23,1,2])).then(a=>a.a)).showSaveFilePicker({suggestedName:o,types:[{accept:{"text/csv":[".csv"]}}],excludeAcceptAllOption:!1})).createWritable();await jd(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:f=>{a+=new TextDecoder("utf-8").decode(f)},close:async()=>{}});await jd(l.getWriter(),e,t,n);const s=new Blob([a],{type:"text/csv;charset=utf-8;"}),u=URL.createObjectURL(s),c=_m({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 SS(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),f=fm(e,s,l);return Hk(a,c,f,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 MS(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 RS(e,t,n,r,o){const[i,a]=d.useState({columns:Je.empty(),rows:Je.empty(),current:void 0}),l=!t&&!n&&(e.selectionMode.includes(Yt.SelectionMode.MULTI_ROW)||e.selectionMode.includes(Yt.SelectionMode.SINGLE_ROW)),s=l&&e.selectionMode.includes(Yt.SelectionMode.MULTI_ROW),u=!t&&!n&&(e.selectionMode.includes(Yt.SelectionMode.SINGLE_COLUMN)||e.selectionMode.includes(Yt.SelectionMode.MULTI_COLUMN)),c=u&&e.selectionMode.includes(Yt.SelectionMode.MULTI_COLUMN),f=!t&&!n&&(e.selectionMode.includes(Yt.SelectionMode.SINGLE_CELL)||e.selectionMode.includes(Yt.SelectionMode.MULTI_CELL)),g=f&&e.selectionMode.includes(Yt.SelectionMode.MULTI_CELL),h=i.rows.length>0,p=i.columns.length>0,m=i.current!==void 0,w=d.useCallback(v=>{const C=!nl(v.rows.toArray(),i.rows.toArray()),E=!nl(v.columns.toArray(),i.columns.toArray()),I=!nl(v.current,i.current),S=l&&C||u&&E||f&&I;let P=v;if(E&&P.columns.length>=0){let O=P.columns;r.forEach((x,A)=>{x.isIndex&&(O=O.remove(A))}),O.length<P.columns.length&&(P={...P,columns:O})}a(P),S&&o(P,f)},[i,l,u,f,o,r]),y=d.useCallback((v=!1,C=!1)=>{const E={columns:C?i.columns:Je.empty(),rows:v?i.rows:Je.empty(),current:void 0};a(E),(!v&&l||!C&&u||f)&&o(E,f)},[i,l,u,f,o]);return{gridSelection:i,isRowSelectionActivated:l,isMultiRowSelectionActivated:s,isColumnSelectionActivated:u,isMultiColumnSelectionActivated:c,isCellSelectionActivated:f,isMultiCellSelectionActivated:g,isRowSelected:h,isColumnSelected:p,isCellSelected:m,clearSelection:y,processSelectionChange:w}}function ES(e,t,n,r,o,i,a,l,s,u,c){const f=e.rowHeight??t.defaultRowHeight,g=r?2:1,h=e.editingMode===Yt.EditingMode.DYNAMIC||e.editingMode===Yt.EditingMode.ADD_ONLY?1:0,p=n+h,m=ts({numRows:p,rowHeight:f,theme:t,numHeaderRows:g}),w=Vk(e,s),y=Fk(s,c),v=Lk(s),C=y?Math.max(1,Math.min(n,3)):1,E=ts({numRows:C,rowHeight:f,theme:t}),I=1e4;let S=Math.max(m,E),P=Math.min(S,t.defaultTableHeight);if(y&&u&&u>0)S=Math.max(u,S);else if(v){const $=Math.ceil(I/f),K=Math.min(p,$),ie=ts({numRows:K,rowHeight:f,theme:t,numHeaderRows:g})+1;P=Math.max(ie,E),S=Math.max(P,S)}else w&&(P=Math.max(w,E),S=Math.max(P,S));i&&(P=Math.min(P,i),S=Math.min(S,i),w||(P=S));const O=t.minColumnWidth+2*t.tableBorderWidth,x=Math.max(o,O);let A,T=x;const R=sp(e,l),M=up(e,l),D=zk(l);R?A=x:M?(A=Math.min(Math.max(M,O),x),T=Math.min(Math.max(M,T),x)):D&&(A=void 0);const[k,X]=d.useState({width:A||"100%",height:y?"100%":P});return d.useLayoutEffect(()=>{R&&k.width==="100%"&&X($=>({...$,width:x}))},[x]),d.useLayoutEffect(()=>{X($=>({...$,width:A||"100%"}))},[A]),d.useLayoutEffect(()=>{X($=>({...$,height:y?"100%":P}))},[P,n,u,y,c]),d.useLayoutEffect(()=>{if(a){const $=R||lt(M)&&M>0;X({width:$?T:"100%",height:S})}else X({width:A||"100%",height:P})},[a]),{minHeight:E,maxHeight:S,minWidth:O,maxWidth:T,rowHeight:f,resizableSize:k,setResizableSize:X}}const IS=600,TS="⚠️ Please fill out this cell.";function OS(e,t,n=[]){const[r,o]=d.useState(),i=d.useRef(null),a=d.useCallback(s=>{if(clearTimeout(i.current),i.current=0,o(void 0),(s.kind==="header"||s.kind==="cell")&&s.location){const u=s.location[0],c=s.location[1];let f;if(u<0||u>=e.length||n.includes(c))return;const g=e[u];if(s.kind==="header"&<(g))f=g.help;else if(s.kind==="cell"){const h=t([u,c]);Eo(h)?f=h.errorDetails:g.isRequired&&g.isEditable&&Xs(h)?f=TS:ow(h)&&(f=h.tooltip)}f&&(i.current=setTimeout(()=>{f&&o({content:f,left:s.bounds.x+s.bounds.width/2,top:s.bounds.y})},IS))}},[e,t,o,i,n]),l=d.useCallback(()=>{o(void 0)},[o]);return{tooltip:r,clearTooltip:l,onItemHovered:a}}function Nr(e){return e.isIndex?ca:Me(e.name)?"":e.name}class oa{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[Nr(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 f=c.getCellValue(l);c.isRequired&&c.isEditable&&Xs(l)&&(a=!0),lt(f)&&(i[Nr(c)]=f)}}),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(Nr(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],f=i.get(u);if(f){const g=f.getCell(c);g&&(this.editedCells.has(l)||this.editedCells.set(l,new Map),this.editedCells.get(l)?.set(f.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 f=c.getCell(u);f&&l.set(c.indexNumber,f)}}),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(!(Me(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 hp=150;function DS({element:e,widgetMgr:t,fragmentId:n,originalNumRows:r,originalColumns:o}){const{READ_ONLY:i}=Yt.EditingMode,a=d.useRef(new oa(r)),[l,s]=d.useState(a.current.getNumRows());tg(()=>{a.current=new oa(r),s(a.current.getNumRows())},[r]);const u=d.useCallback(()=>{a.current=new oa(r),s(a.current.getNumRows())},[r]),c=d.useCallback(()=>{s(w=>{const y=a.current.getNumRows();return w!==y?y:w})},[]);d.useEffect(()=>{if(e.editingMode===i||!t)return;const w=t.getStringValue({id:e.id,formId:e.formId});w&&(a.current.fromJson(w,o),s(a.current.getNumRows()))},[]);const f=d.useCallback(()=>{if(!t)return;const w=a.current.toJson(o);let y=t.getStringValue({id:e.id,formId:e.formId});y===void 0&&(y=new oa(0).toJson([])),w!==y&&t.setStringValue({id:e.id,formId:e.formId},w,{fromUi:!0},n)},[o,e.id,e.formId,t,n]),{debouncedCallback:g}=dh(f,hp),h=d.useCallback((w,y)=>(v,C)=>{if(!t)return;const E={selection:{rows:[],columns:[],cells:[]}};if(E.selection.rows=v.rows.toArray().map(P=>y(P)),E.selection.columns=v.columns.toArray().map(P=>Nr(w[P])),C&&v.current){const{cell:P,range:O}=v.current;if(O)for(let x=O.y;x<O.y+O.height;x++)for(let A=O.x;A<O.x+O.width;A++)w[A].isIndex||E.selection.cells.push([y(x),Nr(w[A])]);else if(P){const[x,A]=P;w[x].isIndex||E.selection.cells.push([y(A),Nr(w[x])])}}const I=JSON.stringify(E),S=t.getStringValue({id:e.id,formId:e.formId});(S===void 0||S!==I)&&t.setStringValue({id:e.id,formId:e.formId},I,{fromUi:!0},n)},[e.id,e.formId,t,n]),p=d.useCallback(({columns:w,isRowSelectionActivated:y,isColumnSelectionActivated:v,isCellSelectionActivated:C,isMultiCellSelectionActivated:E})=>{if(!y&&!v&&!C||!t)return;const I=t.getStringValue({id:e.id,formId:e.formId});if(!I)return;const S=w.map(T=>Nr(T)),P=JSON.parse(I);let O=Je.empty(),x=Je.empty(),A;if(P.selection?.rows?.forEach(T=>{O=O.add(T)}),P.selection?.columns?.forEach(T=>{x=x.add(S.indexOf(T))}),C&&!E){const[T,R]=P.selection?.cells?.[0]??[];T!==void 0&&R!==void 0&&(A=[S.indexOf(R),T])}if(O.length>0||x.length>0||A!==void 0)return{rows:O,columns:x,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:h,onFormCleared:m,loadInitialSelectionState:p}}const pp=Hn("div",{target:"e1hnsd047"})(({theme:e})=>({paddingTop:e.spacing.xs,paddingBottom:e.spacing.xs}),""),Sr=Hn("div",{target:"e1hnsd046"})(({theme:e,isActive:t,hasSubmenu:n})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing.sm,paddingLeft:e.spacing.sm,paddingRight:e.spacing.sm,paddingTop:e.spacing.twoXS,paddingBottom:e.spacing.twoXS,cursor:"pointer",backgroundColor:t?e.colors.darkenedBgMix15:void 0,"&:hover":{backgroundColor:e.colors.darkenedBgMix15},minWidth:e.sizes.minMenuWidth,...n&&{justifyContent:"space-between","& > :first-of-type":{display:"flex",alignItems:"center",gap:e.spacing.sm}}}),""),gp=Hn("div",{target:"e1hnsd045"})(({theme:e})=>({height:e.sizes.borderWidth,backgroundColor:e.colors.borderColor,marginTop:e.spacing.xs,marginBottom:e.spacing.xs}),""),PS=Hn("div",{target:"e1hnsd044"})(({theme:e})=>({display:"flex",alignItems:"center",padding:`${e.spacing.sm} ${e.spacing.sm}`,cursor:"default",gap:e.spacing.twoXS}),""),AS=Hn("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.md,backgroundColor:"transparent",color:e.colors.bodyText,height:"fit-content"}),""),HS=Hn("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.md,backgroundColor:e.colors.secondaryBg,minWidth:0,overflow:"hidden"}),""),zS=Hn("span",{target:"e1hnsd041"})(({theme:e})=>({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flexGrow:1,margin:`0 ${e.spacing.xs}`,fontSize:e.fontSizes.twoSm,maxWidth:"4rem"}),""),FS=Hn("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.md,transition:"background-color 0.2s ease","&:hover":{backgroundColor:e.colors.fadedText05},"&:active":{backgroundColor:e.colors.fadedText10}}),""),Wd=[{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:"}],LS={number:Wd,progress:Wd,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 VS({columnKind:e,isOpen:t,onMouseEnter:n,onMouseLeave:r,onChangeFormat:o,onCloseMenu:i,children:a}){const l=Yr(),{colors:s,fontSizes:u,radii:c,fontWeights:f}=l,g=LS[e]||[];return g.length===0?he.jsx(he.Fragment,{}):he.jsx(Ta,{triggerType:Kd.hover,returnFocus:!0,autoFocus:!0,focusLock:!0,isOpen:t,onMouseEnter:n,onMouseLeave:r,ignoreBoundary:!0,content:he.jsx(pp,{role:"menu",children:g.map(h=>he.jsxs(Sr,{onClick:()=>{o(h.format),i()},role:"menuitem",children:[he.jsx(Un,{size:"base",iconValue:h.icon}),h.label]},h.format))}),placement:Oa.right,showArrow:!1,popoverMargin:2,overrides:{Body:{props:{"data-testid":"stDataFrameColumnFormattingMenu"},style:{borderTopLeftRadius:c.default,borderTopRightRadius:c.default,borderBottomLeftRadius:c.default,borderBottomRightRadius:c.default,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important",backgroundColor:"transparent",border:`${l.sizes.borderWidth} solid ${l.colors.borderColor}`}},Inner:{style:{backgroundColor:ki(l)?s.bgColor:s.secondaryBg,color:s.bodyText,fontSize:u.sm,fontWeight:f.normal,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"}}},children:a})}const $S=d.memo(VS);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 f=Yr(),[g,h]=d.useState(!1),{colors:p,fontSizes:m,radii:w,fontWeights:y}=f,{isCopied:v,copyToClipboard:C}=ug();d.useEffect(()=>{function S(P){P.preventDefault()}return document.addEventListener("wheel",S,{passive:!1}),document.addEventListener("touchmove",S,{passive:!1}),()=>{document.removeEventListener("wheel",S),document.removeEventListener("touchmove",S)}},[]);const E=d.useCallback(()=>{i()},[i]),I=d.useCallback(()=>{C(s.title)},[s.title,C]);return he.jsx(Ta,{autoFocus:!0,"aria-label":"Dataframe column menu",content:he.jsxs(pp,{children:[he.jsxs(PS,{children:[he.jsx(AS,{title:s.kind,children:he.jsx(Un,{size:"base",iconValue:s.typeIcon||":material/notes:"})}),he.jsxs(HS,{title:s.title,children:[he.jsx(zS,{children:s.title}),he.jsx(FS,{onClick:I,title:"Copy column name","aria-label":"Copy column name",children:he.jsx(Un,{size:"sm",iconValue:v?":material/check:":":material/content_copy:"})})]})]}),a&&he.jsxs(he.Fragment,{children:[he.jsxs(Sr,{onClick:()=>{a("asc"),E()},role:"menuitem",children:[he.jsx(Un,{size:"base",iconValue:":material/arrow_upward:"}),"Sort ascending"]}),he.jsxs(Sr,{onClick:()=>{a("desc"),E()},role:"menuitem",children:[he.jsx(Un,{size:"base",iconValue:":material/arrow_downward:"}),"Sort descending"]}),he.jsx(gp,{})]}),u&&he.jsx($S,{columnKind:s.kind,isOpen:g,onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),onChangeFormat:u,onCloseMenu:E,children:he.jsxs(Sr,{onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),isActive:g,hasSubmenu:!0,children:[he.jsxs("div",{children:[he.jsx(Un,{size:"base",iconValue:":material/format_list_numbered:"}),"Format"]}),he.jsx(Un,{size:"base",iconValue:":material/chevron_right:"})]})}),c&&he.jsxs(Sr,{onClick:()=>{c(),E()},children:[he.jsx(Un,{size:"base",iconValue:":material/arrows_outward:"}),"Autosize"]}),n&&he.jsxs(Sr,{onClick:()=>{o(),E()},children:[he.jsx(Un,{size:"base",iconValue:":material/keep_off:"}),"Unpin column"]}),!n&&he.jsxs(Sr,{onClick:()=>{r(),E()},children:[he.jsx(Un,{size:"base",iconValue:":material/keep:"}),"Pin column"]}),l&&he.jsxs(Sr,{onClick:()=>{l(),E()},children:[he.jsx(Un,{size:"base",iconValue:":material/visibility_off:"}),"Hide column"]})]}),placement:Oa.bottomRight,accessibilityType:Jd.menu,showArrow:!1,popoverMargin:en("0.375rem"),onClickOutside:g?void 0:E,onEsc:E,overrides:{Body:{props:{"data-testid":"stDataFrameColumnMenu"},style:{paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important",backgroundColor:"transparent"}},Inner:{style:{border:`${f.sizes.borderWidth} solid ${f.colors.borderColor}`,backgroundColor:ki(f)?p.bgColor:p.secondaryBg,color:p.bodyText,fontSize:m.sm,fontWeight:y.normal,borderTopLeftRadius:w.default,borderTopRightRadius:w.default,borderBottomLeftRadius:w.default,borderBottomRightRadius:w.default,overflow:"auto",paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"}}},isOpen:!0,children:he.jsx("div",{"data-testid":"stDataFrameColumnMenuTarget",style:{position:"fixed",top:e,left:t,visibility:"hidden",transform:"unset"}})})}const BS=d.memo(_S),NS="(index)";function rs(e,t){return!t.length||e.isIndex?!1:!t.includes(e.id)&&!t.includes(e.name)}const Ud=({label:e,initialValue:t,isIndeterminate:n,onChange:r})=>{const o=Yr();return he.jsx(Lm,{isIndeterminate:n,checked:t,onChange:i=>{r(i.target.checked)},"aria-label":e,checkmarkType:$m.default,labelPlacement:Vm.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)?Og(o):"",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})},jS=({columns:e,columnOrder:t,setColumnOrder:n,hideColumn:r,showColumn:o,children:i,isOpen:a,onClose:l})=>{const s=Yr(),u=h=>!(h.isHidden===!0||rs(h,t)),c=e.every(u),f=e.some(u)&&!c,g=h=>{e.forEach(p=>{const m=rs(p,t);h?(o(p.id),m&&n(w=>[...w,p.id])):r(p.id)})};return he.jsx(Ta,{triggerType:Kd.click,placement:Oa.bottomRight,autoFocus:!0,focusLock:!0,content:()=>he.jsxs("div",{style:{paddingTop:s.spacing.sm,paddingBottom:s.spacing.sm,maxHeight:s.sizes.maxDropdownHeight,overflow:"auto"},children:[he.jsx(Ud,{label:"Select all",isIndeterminate:f,initialValue:c,onChange:h=>{g(h)}}),he.jsx(gp,{}),he.jsx("div",{children:e.map(h=>{const p=rs(h,t);return he.jsx(Ud,{label:!h.title&&h.isIndex?NS:h.title,initialValue:!(h.isHidden===!0||p),onChange:m=>{m?(o(h.id),p&&n(w=>[...w,h.id])):r(h.id)}},h.id)})})]}),isOpen:a,onClickOutside:l,onClick:()=>a?l():void 0,onEsc:l,ignoreBoundary:!1,overrides:{Body:{props:{"data-testid":"stDataFrameColumnVisibilityMenu"},style:{borderTopLeftRadius:s.radii.default,borderTopRightRadius:s.radii.default,borderBottomLeftRadius:s.radii.default,borderBottomRightRadius:s.radii.default,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important",backgroundColor:"transparent",border:`${s.sizes.borderWidth} solid ${s.colors.borderColor}`}},Inner:{style:{backgroundColor:ki(s)?s.colors.bgColor:s.colors.secondaryBg,color:s.colors.bodyText,fontSize:s.fontSizes.sm,fontWeight:s.fontWeights.normal,minWidth:s.sizes.minMenuWidth,maxWidth:`calc(${s.sizes.minMenuWidth} * 2)`,maxHeight:s.sizes.maxDropdownHeight,overflow:"auto",paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"}}},children:he.jsx("div",{children:i})})},WS=d.memo(jS),Yd=Hn("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":{maxWidth:"19rem",width:"80%",minWidth:"6rem",top:e.spacing.sm,right:e.spacing.sm,padding:e.spacing.sm,borderRadius:e.radii.default,"& .gdg-search-status":{paddingTop:e.spacing.twoXS,fontSize:e.fontSizes.twoSm},"& .gdg-search-progress":{display:"none"},"& input":{width:"100%"},"& button":{width:e.iconSizes.xl,height:e.iconSizes.xl,"& .button-icon":{width:e.iconSizes.base,height:e.iconSizes.base}}}}),"");function US({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,f=d.useCallback(()=>{i(!1),r()},[r,i]);return he.jsx(Ta,{content:he.jsx(lg,{"data-testid":"stDataFrameTooltipContent",children:he.jsx(sg,{style:{fontSize:s.sm},source:n,allowHTML:!1})}),placement:Oa.top,accessibilityType:Jd.tooltip,showArrow:!1,popoverMargin:5,onClickOutside:f,onEsc:f,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:ki(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:he.jsx("div",{"data-testid":"stDataFrameTooltipTarget",style:{position:"fixed",top:e,left:t}})})}const YS=d.memo(US),XS=15e4,ZS="0.5rem";function qS({element:e,data:t,disabled:n,widgetMgr:r,disableFullscreenMode:o,fragmentId:i,customToolbarActions:a,widthConfig:l,heightConfig:s}){const{expanded:u,expand:c,collapse:f,width:g,height:h}=Du(um),{isInHorizontalLayout:p,isInRoot:m}=Du(Zp),w=d.useRef(null),y=d.useRef(null),v=qp(),{height:C,elementRef:E}=Kp(),I=mS(),{getRowThemeOverride:S,onItemHovered:P}=MS(I),{enforceDownloadInNewTab:O=!1}=d.useContext(Jp),[x,A]=d.useState(!0),[T,R]=d.useState(!1),[M,D]=d.useState(!1),[k,X]=d.useState(!1),[$,K]=d.useState(),[ie,ee]=d.useState(!1),J=d.useCallback(()=>ee(Fe=>!Fe),[]),ge=d.useCallback(()=>ee(!1),[]),oe=d.useMemo(()=>window.matchMedia&&window.matchMedia("(pointer: coarse)").matches,[]);Me(e.editingMode)&&(e.editingMode=Yt.EditingMode.READ_ONLY);const{READ_ONLY:de,DYNAMIC:pe,ADD_ONLY:le,DELETE_ONLY:V}=Yt.EditingMode,H=t.dimensions,U=Math.max(0,H.numDataRows),re=U===0&&!((e.editingMode===pe||e.editingMode===le)&&H.numDataColumns>0),se=U>XS,Oe=!se&&!re&&e.editingMode!==pe&&e.editingMode!==le,be=!re&&(e.editingMode===pe||e.editingMode===le)&&!n,Qe=!re&&(e.editingMode===pe||e.editingMode===V)&&!n,[Se,It]=d.useState(e.columnOrder);d.useEffect(()=>{It(e.columnOrder)},[e.columnOrder.join(",")]);const{columns:st,allColumns:Be,setColumnConfigMapping:ne}=Bk(e,t,n,Se,l),{editingState:me,numRows:ve,updateNumRows:ce,syncEditState:ye,createSyncSelectionState:Ae,onFormCleared:He,loadInitialSelectionState:rt}=DS({element:e,widgetMgr:r,fragmentId:i,originalNumRows:U,originalColumns:st}),{getCellContent:De}=SS(t,st,ve,me),{columns:we,sortColumn:ze,getOriginalIndex:ke,getCellContent:$e}=Kk(U,st,De),ut=d.useMemo(()=>Ae(we,ke),[Ae,we,ke]),{debouncedCallback:dt}=dh(ut,hp),{gridSelection:je,isRowSelectionActivated:ht,isMultiRowSelectionActivated:$t,isColumnSelectionActivated:bt,isMultiColumnSelectionActivated:Mt,isCellSelectionActivated:_t,isMultiCellSelectionActivated:Zt,isRowSelected:an,isColumnSelected:kt,isCellSelected:ft,clearSelection:Nt,processSelectionChange:mt}=RS(e,re,n,we,dt);d.useEffect(()=>{_t||Nt(!0,!0)},[u]);const ln=d.useCallback(Fe=>{y.current?.updateCells(Fe)},[]);d.useEffect(()=>{const Fe=rt({columns:we,isRowSelectionActivated:ht,isColumnSelectionActivated:bt,isCellSelectionActivated:_t,isMultiCellSelectionActivated:Zt});Fe&&mt(Fe)},[]);const{exportToCsv:Mn}=kS($e,we,ve,O),{onCellEdited:Ee,onPaste:ct,onRowAppended:Tt,onDelete:vn,validateCell:tn}=bS({columns:we,canAddRows:be,canDeleteRows:Qe,editingState:me,getCellContent:$e,getOriginalIndex:ke,refreshCells:ln,updateNumRows:ce,syncEditState:ye,clearSelection:Nt}),nn=d.useMemo(()=>re?[0]:be?[ve]:[],[re,be,ve]),{tooltip:un,clearTooltip:Lt,onItemHovered:Kt}=OS(we,$e,nn),{drawCell:Ne,customRenderers:yt}=gS(we,e.placeholder??void 0),{provideEditor:En}=Qk(),Ot=d.useCallback(Fe=>({...Fe,hasMenu:!re}),[re]),pt=d.useMemo(()=>we.map(Fe=>Ot(vs(Fe))),[we,Ot]),{columns:bn,onColumnResize:lr}=Wk(pt),Kn=t.dimensions.numHeaderRows>1,{minHeight:N,maxHeight:_e,minWidth:We,maxWidth:Dt,rowHeight:qt,resizableSize:rn,setResizableSize:In}=ES(e,I,ve,Kn,g||0,h,u,l,s,C,m),yn=d.useCallback(([Fe,cn])=>({...iw(!0,!1),displayData:"empty",contentAlign:"center",allowOverlay:!1,themeOverride:{textDark:I.glideTheme.textLight},span:[0,Math.max(we.length-1,0)]}),[we,I.glideTheme.textLight]),jt=d.useCallback(()=>{He(),Nt()},[He,Nt]);dm({element:e,widgetMgr:r,onFormCleared:jt});const{pinColumn:wn,unpinColumn:xn,freezeColumns:Kr}=Nk(we,re,g||0,I.minColumnWidth,Nt,ne),{changeColumnFormat:Jr}=Tk(ne),{hideColumn:Qr,showColumn:Do}=Jk(Nt,ne),{onColumnMoved:zn}=jk(we,Kr,wn,xn,It);d.useEffect(()=>{let Fe;const cn=requestAnimationFrame(()=>{Fe=setTimeout(()=>{if(E.current&&y.current){const Rn=E.current?.querySelector(".dvn-stack")?.getBoundingClientRect();Rn&&(D(Rn.height>E.current.clientHeight),X(Rn.width>E.current.clientWidth))}},0)});return()=>{cancelAnimationFrame(cn),Fe&&clearTimeout(Fe)}},[rn,ve,bn,E]),d.useEffect(()=>{Be.length==we.length&&ee(!1)},[Be.length,we.length]);const Fn=!!(p||l?.useContent&&!m);return he.jsxs(Yd,{className:"stDataFrame","data-testid":"stDataFrame",ref:E,isInHorizontalLayout:p,minHeight:N,disableResize:Fn,onPointerDown:Fe=>{if(E.current){const cn=E.current.getBoundingClientRect(),Rn=(v||Math.round(en(ZS)))+1;k&&cn.height-Rn<Fe.clientY-cn.top&&Fe.stopPropagation(),M&&cn.width-Rn<Fe.clientX-cn.left&&Fe.stopPropagation()}},onBlur:Fe=>{!x&&!oe&&!Fe.currentTarget.contains(Fe.relatedTarget)&&!_t&&Nt(!0,!0)},children:[he.jsxs(cm,{isFullScreen:u,disableFullscreenMode:o,locked:an&&!ht||ft||oe&&x||ie,onExpand:c,onCollapse:f,target:Yd,children:[a?.map(Fe=>Fe),(ht&&an||bt&&kt||_t&&ft)&&he.jsx(vo,{label:"Clear selection",icon:Pm,onClick:()=>{Nt(),Lt()}}),Qe&&an&&he.jsx(vo,{label:"Delete row(s)",icon:Bm,onClick:()=>{vn&&(vn(je),Lt())}}),be&&!an&&he.jsx(vo,{label:"Add row",icon:sf,onClick:()=>{Tt&&(A(!0),Tt(),Lt(),y.current?.scrollTo(0,ve,"vertical"))}}),!re&&Be.length>we.length&&he.jsx(WS,{columns:Be,columnOrder:Se,setColumnOrder:It,hideColumn:Qr,showColumn:Do,isOpen:ie,onClose:ge,children:he.jsx(vo,{label:"Show/hide columns",icon:cf,onClick:J})}),!se&&!re&&he.jsx(vo,{label:"Download as CSV",icon:Nm,onClick:Mn}),!re&&he.jsx(vo,{label:"Search",icon:uf,onClick:()=>{T?R(!1):(A(!0),R(!0)),Lt()}})]}),he.jsx(Qp,{"data-testid":"stDataFrameResizable",ref:w,defaultSize:rn,style:{border:`${I.tableBorderWidth}px solid ${I.glideTheme.borderColor}`,borderRadius:`${I.tableBorderRadius}`},minHeight:N,maxHeight:_e,minWidth:We,maxWidth:Fn?void 0:Dt,size:rn,enable:{top:!1,right:!1,bottom:!1,left:!1,topRight:!1,bottomRight:!Fn,bottomLeft:!1,topLeft:!1},grid:[1,qt],snapGap:qt/3,onResizeStop:(Fe,cn,Rn,Po)=>{if(w.current){const Jn=2*I.tableBorderWidth;In({width:w.current.size.width,height:_e-w.current.size.height===Jn?w.current.size.height+Jn:w.current.size.height})}},children:he.jsx(Gy,{className:"stDataFrameGlideDataEditor","data-testid":"stDataFrameGlideDataEditor",ref:y,columns:bn,rows:re?1:ve,minColumnWidth:I.minColumnWidth,maxColumnWidth:I.maxColumnWidth,maxColumnAutoWidth:I.maxColumnAutoWidth,rowHeight:qt,headerHeight:I.defaultHeaderHeight,getCellContent:re?yn:$e,onColumnResize:oe?void 0:lr,resizeIndicator:"header",freezeColumns:Kr,smoothScrollX:!0,smoothScrollY:!0,verticalBorder:!0,getCellsForSelection:!0,rowMarkers:"none",rangeSelect:oe?"cell":"rect",columnSelect:"none",rowSelect:"none",onColumnMoved:bt?void 0:zn,onItemHovered:Fe=>{P?.(Fe),Kt?.(Fe)},keybindings:{downFill:!0,..._t||se?{selectAll:!1}:{}},onKeyDown:Fe=>{(Fe.ctrlKey||Fe.metaKey)&&Fe.key==="f"&&(R(cn=>!cn),Fe.stopPropagation(),Fe.preventDefault())},showSearch:T,searchResults:T?void 0:[],onSearchClose:()=>{R(!1),Lt()},onHeaderClicked:(Fe,cn)=>{!Oe||bt||(T&&R(!1),ht&&an?Nt():Nt(!0,!0),ze(Fe,"auto"))},gridSelection:je,onGridSelectionChange:Fe=>{(x||oe)&&(mt(Fe),un!==void 0&&Lt(),K(void 0),ee(!1))},theme:I.glideTheme,getRowThemeOverride:S,onMouseMove:Fe=>{Fe.kind==="out-of-bounds"&&x?A(!1):Fe.kind!=="out-of-bounds"&&!x&&A(!0)},fixedShadowX:!0,fixedShadowY:!0,experimental:{scrollbarWidthOverride:0,paddingBottom:k?-v:void 0,paddingRight:M?-v:void 0},provideEditor:En,drawCell:Ne,customRenderers:yt,imageEditorOverride:Ek,headerIcons:I.headerIcons,validateCell:tn,onHeaderMenuClick:(Fe,cn)=>{ie||K({columnIdx:Fe,headerBounds:cn})},onPaste:!1,...ht&&{rowMarkers:{kind:"checkbox-visible",checkboxStyle:"square",theme:{bgCell:I.glideTheme.bgHeader,bgCellMedium:I.glideTheme.bgHeader,textMedium:I.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},...Qe&&{rowMarkers:{kind:"checkbox",checkboxStyle:"square",theme:{bgCell:I.glideTheme.bgHeader,bgCellMedium:I.glideTheme.bgHeader}},rowSelectionMode:"multi",rowSelect:n?"none":"multi"}})}),un?.content&&he.jsx(YS,{top:un.top,left:un.left,content:un.content,clearTooltip:Lt}),$&&Xd.createPortal(he.jsx(BS,{top:$.headerBounds.y+$.headerBounds.height,left:$.headerBounds.x+$.headerBounds.width,column:st[$.columnIdx],onCloseMenu:()=>K(void 0),onSortColumn:Oe?Fe=>{T&&R(!1),Nt(!(ht&&an),!0),ze($.columnIdx,Fe,!0)}:void 0,isColumnPinned:st[$.columnIdx].isPinned,onUnpinColumn:()=>{xn(st[$.columnIdx].id)},onPinColumn:()=>{wn(st[$.columnIdx].id)},onHideColumn:()=>{Qr(st[$.columnIdx].id)},onChangeFormat:Fe=>{Jr(st[$.columnIdx].id,Fe),setTimeout(()=>{y.current?.remeasureColumns(Je.fromSingleSelection($.columnIdx))},100)},onAutosize:()=>{y.current?.remeasureColumns(Je.fromSingleSelection($.columnIdx))}}),document.querySelector("#portal"))]})}const KS=sm(qS),mp=d.memo(KS),JS=({data:e,height:t,width:n,customToolbarActions:r})=>he.jsx(mp,{element:new Yt({useContainerWidth:!0,editingMode:Yt.EditingMode.READ_ONLY,disabled:!0,data:void 0,styler:null,width:void 0,height:t??null,id:"",columns:"",formId:"",columnOrder:[],selectionMode:[]}),data:e,widgetMgr:void 0,disabled:!0,fragmentId:void 0,disableFullscreenMode:!0,customToolbarActions:r,widthConfig:n??new Ou.WidthConfig({useStretch:!0}),heightConfig:t?new Ou.HeightConfig({pixelHeight:t}):void 0}),mM=Object.freeze(Object.defineProperty({__proto__:null,ReadOnlyGrid:JS,default:mp},Symbol.toStringTag,{value:"Module"}));export{wo as B,Uf as C,JS as I,ko as S,Gm as X,dn as a,Hv as d,mM as i,A1 as u};
|