@marimo-team/frontend 0.21.1-dev17 → 0.21.1-dev18
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/dist/assets/{CellStatus-CoejXnCc.js → CellStatus-DSc0Rc57.js} +1 -1
- package/dist/assets/{Combination-CBJmtdux.js → Combination-Cs9nbinQ.js} +1 -1
- package/dist/assets/{ConnectedDataExplorerComponent-DsPvYWwS.js → ConnectedDataExplorerComponent-Buaffg3u.js} +1 -1
- package/dist/assets/{ErrorBoundary-H5EQrcAX.js → ErrorBoundary-Ba0LbbH4.js} +1 -1
- package/dist/assets/{ImperativeModal-CDxa8mJa.js → ImperativeModal-qEtcJ95s.js} +1 -1
- package/dist/assets/{JsonOutput-CBK4dhVh.js → JsonOutput-W5-HQRgs.js} +1 -1
- package/dist/assets/{LazyAnyLanguageCodeMirror-CrcxjfJR.js → LazyAnyLanguageCodeMirror-m8w66E4s.js} +2 -2
- package/dist/assets/{MarimoErrorOutput-B0nc63rx.js → MarimoErrorOutput-BveYcYDx.js} +1 -1
- package/dist/assets/{RenderHTML-Bp9XY06U.js → RenderHTML-C09cMP9E.js} +1 -1
- package/dist/assets/{add-cell-with-ai-CrnYAxuA.js → add-cell-with-ai-Ba8nxsB4.js} +1 -1
- package/dist/assets/{add-connection-dialog-I31C6j-5.js → add-connection-dialog-BSYAh68E.js} +1 -1
- package/dist/assets/{agent-panel-ufAvSbof.js → agent-panel-DbJ6N-vH.js} +1 -1
- package/dist/assets/{ai-model-dropdown-BYDC_z7s.js → ai-model-dropdown-Dbctse5A.js} +1 -1
- package/dist/assets/{alert-dialog-B31Yst9T.js → alert-dialog-9WfvUF7e.js} +1 -1
- package/dist/assets/{any-language-editor-BQW3AtUK.js → any-language-editor-DwQMnAM3.js} +1 -1
- package/dist/assets/{app-config-button-CRfW3S6Z.js → app-config-button-CFi8sxEh.js} +1 -1
- package/dist/assets/{assertNever-CTRGz-ul.js → assertNever-DWSyoPEi.js} +1 -1
- package/dist/assets/{azure-q5TZ9bt0.js → azure-LPiyHTZZ.js} +1 -1
- package/dist/assets/{button-BZAv3veu.js → button-Ej3vmCIF.js} +1 -1
- package/dist/assets/{cache-panel-BPbLoq59.js → cache-panel-qIxnndwr.js} +1 -1
- package/dist/assets/{capabilities-B1-dYWS8.js → capabilities-D3x_db9Y.js} +1 -1
- package/dist/assets/{capitalize-DcpkQwJe.js → capitalize-BfkXNxmI.js} +1 -1
- package/dist/assets/{cell-editor-I71mfVcF.js → cell-editor-BqdkLRyE.js} +13 -13
- package/dist/assets/{cell-link-DWQZUFhO.js → cell-link-B4VljPeB.js} +1 -1
- package/dist/assets/{cells-Dqou-uie.js → cells-D7VcaLU3.js} +45 -45
- package/dist/assets/{chat-display-Vedn01P6.js → chat-display-HM0AgnZw.js} +1 -1
- package/dist/assets/{chat-panel-udyCNql9.js → chat-panel-aUnpJ9lC.js} +1 -1
- package/dist/assets/{column-preview-DPhs4evg.js → column-preview-CUw46kd-.js} +1 -1
- package/dist/assets/{command-Ckfx4w5C.js → command-BsHOIlao.js} +1 -1
- package/dist/assets/{command-palette-Bgqtu-pE.js → command-palette-SXAvvfUG.js} +1 -1
- package/dist/assets/{common-DMx0N5jj.js → common-BPB-YQKC.js} +1 -1
- package/dist/assets/{components-CHO2M34L.js → components-CwkcA6Y-.js} +1 -1
- package/dist/assets/{components-Bgj5U8rZ.js → components-X1R06rgo.js} +1 -1
- package/dist/assets/{config-DeEqZTX7.js → config-3Aq84phF.js} +1 -1
- package/dist/assets/{context-aware-panel-TU7i7Ais.js → context-aware-panel-7Ek3tcW4.js} +1 -1
- package/dist/assets/{copy-B0pTwxmU.js → copy-YwM0Pd7v.js} +1 -1
- package/dist/assets/{copy-icon-Ditn6lfU.js → copy-icon-BgmMM9Zg.js} +1 -1
- package/dist/assets/{createReducer-DgaMD0B6.js → createReducer-Drh7NmIR.js} +1 -1
- package/dist/assets/{datasource-Cn-Wy4lo.js → datasource-BoUnF60v.js} +1 -1
- package/dist/assets/{dates-BcvJrESI.js → dates-CHaNfieI.js} +1 -1
- package/dist/assets/{dependency-graph-panel-Dd_ypMAw.js → dependency-graph-panel-DIowZga1.js} +1 -1
- package/dist/assets/{dialog-CyL4o0mA.js → dialog-CVN1lcMF.js} +1 -1
- package/dist/assets/{dist-D7GD2EM4.js → dist-BhNN2V5a.js} +1 -1
- package/dist/assets/{dist-D98wU_Qc.js → dist-DJBpXGro.js} +1 -1
- package/dist/assets/{documentation-panel-C1QC0dL_.js → documentation-panel-IyVcr9yY.js} +1 -1
- package/dist/assets/{download-D6Fv1GMQ.js → download-DZvj3fxW.js} +1 -1
- package/dist/assets/{dropdown-menu-CJ-Wwa2I.js → dropdown-menu-DdPu5Kfu.js} +1 -1
- package/dist/assets/{edit-page-DmVjpKhV.js → edit-page-BfhafCjx.js} +3 -3
- package/dist/assets/{error-banner-DQBz1e-2.js → error-banner-BRG6IPhC.js} +1 -1
- package/dist/assets/{error-panel-BfF_Pl3q.js → error-panel-z_rShOO3.js} +1 -1
- package/dist/assets/{es-997LzX0P.js → es-CzkousWe.js} +1 -1
- package/dist/assets/{field-qoWy8wEy.js → field-B1jGbQlH.js} +1 -1
- package/dist/assets/{file-explorer-panel-C6RCpRgm.js → file-explorer-panel-CXB9uU30.js} +1 -1
- package/dist/assets/{file-icons-0zZkfGbI.js → file-icons-CkKg3rgM.js} +1 -1
- package/dist/assets/{floating-outline-CNejeNGC.js → floating-outline-CflzXJDl.js} +1 -1
- package/dist/assets/{focus-CQRBseis.js → focus-D09k4iPD.js} +1 -1
- package/dist/assets/{form-B9Fj5Rl-.js → form-CQ7q9z52.js} +1 -1
- package/dist/assets/{formats-DzzQnJYt.js → formats-rhOJovGE.js} +1 -1
- package/dist/assets/{formatting-IErTLHRl.js → formatting-B4ZCH3ol.js} +1 -1
- package/dist/assets/{gallery-page-CzYOKRSH.js → gallery-page-eRea0yic.js} +1 -1
- package/dist/assets/{glide-data-editor-NQ4lbZ3N.js → glide-data-editor-xt5xNZeV.js} +1 -1
- package/dist/assets/{globals-DE7Q2ffe.js → globals-DZ47VMZE.js} +1 -1
- package/dist/assets/{home-page-C8mwmLAs.js → home-page-m5otUVrx.js} +1 -1
- package/dist/assets/{hooks-BjjG_ojV.js → hooks-CJxF1_T9.js} +1 -1
- package/dist/assets/{html-to-image-BFwmkFZ4.js → html-to-image-F0JQuH9e.js} +1 -1
- package/dist/assets/{index-CNvKxpKE.js → index-DWYj5xFo.js} +6 -6
- package/dist/assets/{input-BRZ8bt6P.js → input-CUwqpKjd.js} +1 -1
- package/dist/assets/{kiosk-mode-BO-KqM9l.js → kiosk-mode-B00Q9lAr.js} +1 -1
- package/dist/assets/{label-SLjr8zzy.js → label-TNNaT1M9.js} +1 -1
- package/dist/assets/{layout-pYw8vaT6.js → layout-9Y4vydnb.js} +3 -3
- package/dist/assets/{links-D1lqztbf.js → links-CIQwYQ48.js} +1 -1
- package/dist/assets/{logs-panel-BebwAaGv.js → logs-panel-qcsdupON.js} +1 -1
- package/dist/assets/{maps-CqKCrVZ8.js → maps-OKerBHH8.js} +1 -1
- package/dist/assets/{markdown-renderer-CdEqa6lQ.js → markdown-renderer-K106bu_A.js} +1 -1
- package/dist/assets/{menu-items-Z4F08mfP.js → menu-items-UxKrm8hS.js} +1 -1
- package/dist/assets/{mermaid-DkQrVBDR.js → mermaid-Djr3jUAB.js} +1 -1
- package/dist/assets/{mode-DSINUCzY.js → mode-DzQ0cSCz.js} +1 -1
- package/dist/assets/{multi-map-CJMleYLX.js → multi-map-Pp1P2DOX.js} +1 -1
- package/dist/assets/{name-cell-input-DaDgZhjE.js → name-cell-input-DRLWP5Jy.js} +1 -1
- package/dist/assets/{numbers-aIvy9Kr7.js → numbers-CYnquDho.js} +1 -1
- package/dist/assets/{outline-panel-DCpOiLnR.js → outline-panel-CQbaHloL.js} +1 -1
- package/dist/assets/{packages-panel-kOdMspq6.js → packages-panel-BHg9wsOC.js} +1 -1
- package/dist/assets/{panels-DVL7ce_r.js → panels-DezwU7hc.js} +1 -1
- package/dist/assets/{popover-Du6bDNYH.js → popover-BPGG2gPG.js} +1 -1
- package/dist/assets/{process-output-4ypD4fg7.js → process-output-ynDbqlYA.js} +1 -1
- package/dist/assets/{readonly-python-code-CysvH2Zj.js → readonly-python-code-BGz34qql.js} +1 -1
- package/dist/assets/{renderShortcut-Bgu3XVfT.js → renderShortcut-CnD1Dah5.js} +1 -1
- package/dist/assets/{run-page-CNdaj2P8.js → run-page-Cy2NhCwO.js} +1 -1
- package/dist/assets/{runs-DZ_uu7bP.js → runs-Bhy0tbWr.js} +1 -1
- package/dist/assets/{scratchpad-panel-C1sDAoTh.js → scratchpad-panel-Dt_zRcf9.js} +1 -1
- package/dist/assets/{secrets-panel-Ckqi3z-M.js → secrets-panel-B1Z-6dmz.js} +1 -1
- package/dist/assets/{select-Ch6m1k2G.js → select-CxT2Geqr.js} +1 -1
- package/dist/assets/{session-CXChHxAw.js → session-BrEm7qNv.js} +1 -1
- package/dist/assets/{session-panel-BACIy3wf.js → session-panel-HD2qSLlz.js} +1 -1
- package/dist/assets/{share-BYioqUE0.js → share-BdH_5I58.js} +1 -1
- package/dist/assets/{slides-component-y5hJNJFx.js → slides-component-Brm_TS4x.js} +1 -1
- package/dist/assets/{snippets-panel-BjUFMiXc.js → snippets-panel-zrwxNGtx.js} +1 -1
- package/dist/assets/{spec-CYMZZDXr.js → spec-DbmSqx09.js} +1 -1
- package/dist/assets/{state-BqEQgvo3.js → state-BDPnJei0.js} +1 -1
- package/dist/assets/{state-D59a73JQ.js → state-CBmCYWFH.js} +1 -1
- package/dist/assets/{state-Y7yVqxf_.js → state-Ce7CVShi.js} +1 -1
- package/dist/assets/{switch-JycgoJcn.js → switch-D8wpAzyc.js} +1 -1
- package/dist/assets/{terminal-vzbCncOF.js → terminal-Cr7wbEjz.js} +1 -1
- package/dist/assets/{toggle-BiIJZR6-.js → toggle-RCwU-rnE.js} +1 -1
- package/dist/assets/{tooltip-CNmaER6z.js → tooltip-D9723Brr.js} +1 -1
- package/dist/assets/{tracing-1AoHNFA-.js → tracing-DndaYcXU.js} +1 -1
- package/dist/assets/{tracing-panel-CrlCrmHo.js → tracing-panel-DlaMrQvA.js} +2 -2
- package/dist/assets/{tree-4weMpXk4.js → tree-Ch2-GuhG.js} +1 -1
- package/dist/assets/{useAddCell-BSbQWv3q.js → useAddCell-Be6i0MH0.js} +1 -1
- package/dist/assets/{useBoolean-Cm61eWz0.js → useBoolean-Cr8MjS_j.js} +1 -1
- package/dist/assets/useCellActionButton-DNY7402I.js +1 -0
- package/dist/assets/{useDeleteCell-DSpj4wDu.js → useDeleteCell-4j5HJ2j2.js} +1 -1
- package/dist/assets/{useDependencyPanelTab-1iAP2AMB.js → useDependencyPanelTab-OeYpqCXl.js} +1 -1
- package/dist/assets/useEventListener-Dy81QR4n.js +1 -0
- package/dist/assets/{useIframeCapabilities-DDlGrM1g.js → useIframeCapabilities-DTN9kFDq.js} +1 -1
- package/dist/assets/{useInstallPackage-CIJ1-EHx.js → useInstallPackage-C9V-on2J.js} +1 -1
- package/dist/assets/{useInterval-D7ibzbpc.js → useInterval-BJucVdV-.js} +1 -1
- package/dist/assets/{useLifecycle-CWjBWFMI.js → useLifecycle-DA9DjSPo.js} +1 -1
- package/dist/assets/{useNotebookActions-m1fxrzno.js → useNotebookActions-Bteks-RL.js} +1 -1
- package/dist/assets/{useRunCells-BSsgvk4y.js → useRunCells-CGSG8ACZ.js} +1 -1
- package/dist/assets/{useSplitCell-Ct7RykE3.js → useSplitCell-Su0XVN9R.js} +1 -1
- package/dist/assets/{useTheme-CM9j8dgy.js → useTheme-BYXBU1of.js} +1 -1
- package/dist/assets/{utils-BuPoTKhl.js → utils-CdjCA1J8.js} +1 -1
- package/dist/assets/{utils-BvPM6Bro.js → utils-tNbLd14P.js} +1 -1
- package/dist/assets/{vega-component-S1h0g70Q.js → vega-component-CRbeDmeM.js} +1 -1
- package/dist/assets/{write-secret-modal-VGPgwkTg.js → write-secret-modal-BCvuRAFb.js} +1 -1
- package/dist/index.html +75 -75
- package/package.json +1 -1
- package/src/components/editor/actions/useCellActionButton.tsx +38 -29
- package/src/components/editor/cell/code/cell-editor.tsx +9 -0
- package/src/core/codemirror/__tests__/setup.test.ts +1 -0
- package/src/core/codemirror/cells/state.ts +1 -0
- package/src/core/codemirror/extensions.ts +20 -0
- package/src/core/hotkeys/hotkeys.ts +8 -0
- package/dist/assets/useCellActionButton-DpdThmJR.js +0 -1
- package/dist/assets/useEventListener-BGihH8bs.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as A}from"./chunk-LvLJmgfZ.js";import{d as ee,p as te,u as F}from"./useEvent-O0nX5vok.js";import{t as re}from"./react-Bj1aDYRI.js";import{A as le,G as L,Zn as se,rr as ae}from"./cells-Dqou-uie.js";import"./react-dom-CSu739Rf.js";import{t as ie}from"./compiler-runtime-B3qBwwSJ.js";import{t as ne}from"./jsx-runtime-icT_Ltz2.js";import{t as oe}from"./cn-BoaCR37F.js";import"./dist-B_cxg-E4.js";import"./cjs-BU2qXMKx.js";import"./main-DrBRErTM.js";import"./useNonce-BtW-rR_1.js";import{t as de}from"./createLucideIcon-Cm-Z7dYr.js";import{n as ce,r as U}from"./CellStatus-CoejXnCc.js";import{r as me}from"./x-BI1M8X_v.js";import{t as pe}from"./chevron-right-D0GQBpTb.js";import{t as ue}from"./circle-check-gLIOLu8x.js";import{t as he}from"./circle-play-DYGULlKZ.js";import"./dist-BNC_tnlW.js";import"./dist-CXLJUPFl.js";import"./dist-CQqv2gQL.js";import"./dist-8UD0A5sU.js";import"./dist-apDpadc4.js";import"./session-CXChHxAw.js";import{r as fe}from"./useTheme-CM9j8dgy.js";import"./Combination-CBJmtdux.js";import{t as G}from"./tooltip-CNmaER6z.js";import"./purify.es-BBn8CPhf.js";import"./vega-loader.browser-CZV6_g2i.js";import{r as xe,t as ve}from"./react-vega-BZav_-2n.js";import"./defaultLocale-OkOxlkkM.js";import"./defaultLocale-DK1MWd7f.js";import{t as ge}from"./cell-link-DWQZUFhO.js";import{t as je}from"./bundle.esm-idScn0w0.js";import{n as ye,r as Ie,t as V}from"./react-resizable-panels.browser.esm-DDRqG5ui.js";import{t as Se}from"./empty-state-B_US46Us.js";import"./multi-icon-DEWnuZs2.js";import{r as be}from"./panel-context-BN0DQXiK.js";import{t as Ne}from"./clear-button-DrIF5o__.js";import{n as Te,t as we}from"./runs-DZ_uu7bP.js";var ke=de("circle-ellipsis",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M17 12h.01",key:"1m0b6t"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M7 12h.01",key:"eqddd0"}]]),H=ie(),C=A(re(),1);const Y="hoveredCellId",Z="cellHover";var Re="cellNum",J="cell",O="startTimestamp",K="endTimestamp",Q="status";function _e(t,e,r,a){let i="hoursminutessecondsmilliseconds";return{$schema:"https://vega.github.io/schema/vega-lite/v6.json",background:a==="dark"?"black":void 0,mark:{type:"bar",cornerRadius:2},params:[{name:Y,bind:{element:`#${e}`}},{name:Z,select:{type:"point",on:"mouseover",fields:[J],clear:"mouseout"}}],height:{step:r==="sideBySide"?26:21},encoding:{y:{field:Re,scale:{paddingInner:.2},sort:{field:"sortPriority"},title:"cell",axis:r==="sideBySide"?null:void 0},x:{field:O,type:"temporal",axis:{orient:"top",title:null}},x2:{field:K,type:"temporal"},tooltip:[{field:O,type:"temporal",timeUnit:i,title:"Start"},{field:K,type:"temporal",timeUnit:i,title:"End"}],size:{value:{expr:`${Y} == toString(datum.${J}) ? 19.5 : 18`}},color:{field:Q,scale:{domain:["success","error"],range:["#37BE5F","red"]},legend:null}},data:{values:t},transform:[{calculate:`datum.${Q} === 'queued' ? 9999999999999 : datum.${O}`,as:"sortPriority"}],config:{view:{stroke:"transparent"}}}}function W(t){try{let e=new Date(t*1e3);return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")} ${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}:${String(e.getSeconds()).padStart(2,"0")}.${String(e.getMilliseconds()).padStart(3,"0")}`}catch{return""}}var l=A(ne(),1),X=te(new Map);const Me=()=>{let t=(0,H.c)(34),{runIds:e,runMap:r}=F(we),a=F(X),{clearRuns:i}=Te(),{theme:n}=fe(),[s,w]=(0,C.useState)("above"),N=be(),c;t[0]===s?c=t[1]:(c=()=>{w(s==="above"?"sideBySide":"above")},t[0]=s,t[1]=c);let m=c;if(e.length===0){let p;return t[2]===Symbol.for("react.memo_cache_sentinel")?(p=(0,l.jsx)(Se,{title:"No traces",description:(0,l.jsx)("span",{children:"Cells that have ran will appear here."}),icon:(0,l.jsx)(ae,{})}),t[2]=p):p=t[2],p}let u;t[3]===Symbol.for("react.memo_cache_sentinel")?(u=(0,l.jsx)("label",{htmlFor:"chartPosition",className:"text-xs",children:"Inline chart"}),t[3]=u):u=t[3];let y=s==="sideBySide",o;t[4]!==y||t[5]!==m?(o=(0,l.jsxs)("div",{className:"flex flex-row gap-1 items-center",children:[u,(0,l.jsx)("input",{type:"checkbox",name:"chartPosition","data-testid":"chartPosition",onClick:m,defaultChecked:y,className:"h-3 cursor-pointer"})]}),t[4]=y,t[5]=m,t[6]=o):o=t[6];let h;t[7]===i?h=t[8]:(h=(0,l.jsx)(Ne,{dataTestId:"clear-traces-button",onClick:i}),t[7]=i,t[8]=h);let v;t[9]!==o||t[10]!==h?(v=(0,l.jsxs)("div",{className:"flex flex-row justify-start gap-3",children:[o,h]}),t[9]=o,t[10]=h,t[11]=v):v=t[11];let g;if(t[12]!==s||t[13]!==a||t[14]!==e||t[15]!==r||t[16]!==n){let p;t[18]!==s||t[19]!==a||t[20]!==r||t[21]!==n?(p=(_,E)=>{let R=r.get(_);return R?(0,l.jsx)($e,{run:R,isExpanded:a.get(R.runId),isMostRecentRun:E===0,chartPosition:s,theme:n},R.runId):null},t[18]=s,t[19]=a,t[20]=r,t[21]=n,t[22]=p):p=t[22],g=e.map(p),t[12]=s,t[13]=a,t[14]=e,t[15]=r,t[16]=n,t[17]=g}else g=t[17];let j;t[23]===g?j=t[24]:(j=(0,l.jsx)("div",{className:"flex flex-col gap-3",children:g}),t[23]=g,t[24]=j);let T;t[25]!==v||t[26]!==j?(T=(0,l.jsxs)("div",{className:"py-1 px-2 overflow-y-scroll h-full",children:[v,j]}),t[25]=v,t[26]=j,t[27]=T):T=t[27];let f=T;if(N==="sidebar")return f;let x;t[28]===f?x=t[29]:(x=(0,l.jsx)(V,{defaultSize:50,minSize:30,maxSize:80,children:f}),t[28]=f,t[29]=x);let d;t[30]===Symbol.for("react.memo_cache_sentinel")?(d=(0,l.jsx)(Ie,{className:"w-1 bg-border hover:bg-primary/50 transition-colors"}),t[30]=d):d=t[30];let I;t[31]===Symbol.for("react.memo_cache_sentinel")?(I=(0,l.jsx)(V,{defaultSize:50,children:(0,l.jsx)("div",{})}),t[31]=I):I=t[31];let S;return t[32]===x?S=t[33]:(S=(0,l.jsxs)(ye,{direction:"horizontal",className:"h-full",children:[x,d,I]}),t[32]=x,t[33]=S),S};var $e=({run:t,isMostRecentRun:e,chartPosition:r,isExpanded:a,theme:i})=>{let n=ee(X);a??(a=e);let s=()=>{n(c=>{let m=new Map(c);return m.set(t.runId,!a),m})},w=(0,l.jsx)(a?me:pe,{height:16,className:"inline"}),N=(0,l.jsxs)("span",{className:"text-sm cursor-pointer",onClick:s,children:["Run - ",L(t.runStartTime),w]});return a?(0,l.jsx)(ze,{run:t,chartPosition:r,theme:i,title:N},t.runId):(0,l.jsx)("div",{className:"flex flex-col",children:(0,l.jsx)("pre",{className:"font-mono font-semibold",children:N})},t.runId)},ze=t=>{let e=(0,H.c)(40),{run:r,chartPosition:a,theme:i,title:n}=t,[s,w]=(0,C.useState)(),N=(0,C.useRef)(null),{ref:c,width:m}=je(),u=m===void 0?300:m,y=le(),o,h;if(e[0]!==y||e[1]!==a||e[2]!==r.cellRuns||e[3]!==r.runId||e[4]!==i){let k=[...r.cellRuns.values()].map(b=>{let M=b.elapsedTime??0;return{cell:b.cellId,cellNum:y.inOrderIds.indexOf(b.cellId),startTimestamp:W(b.startTime),endTimestamp:W(b.startTime+M),elapsedTime:U(M*1e3),status:b.status}});o=`hiddenInputElement-${r.runId}`,h=xe(_e(k,o,a,i)),e[0]=y,e[1]=a,e[2]=r.cellRuns,e[3]=r.runId,e[4]=i,e[5]=o,e[6]=h}else o=e[5],h=e[6];let v=h.spec,g=i==="dark"?"dark":void 0,j=u-50,T=a==="above"?120:100,f;e[7]!==g||e[8]!==j||e[9]!==T?(f={theme:g,width:j,height:T,actions:!1,mode:"vega",renderer:"canvas"},e[7]=g,e[8]=j,e[9]=T,e[10]=f):f=e[10];let x;e[11]!==f||e[12]!==v?(x={ref:N,spec:v,options:f},e[11]=f,e[12]=v,e[13]=x):x=e[13];let d=ve(x),I;e[14]===(d==null?void 0:d.view)?I=e[15]:(I=()=>{let k=[{signalName:Z,handler:(b,M)=>{var q;let P=(q=M.cell)==null?void 0:q[0];w(P??null)}}];return k.forEach(b=>{let{signalName:M,handler:P}=b;d==null||d.view.addSignalListener(M,P)}),()=>{k.forEach(b=>{let{signalName:M,handler:P}=b;d==null||d.view.removeSignalListener(M,P)})}},e[14]=d==null?void 0:d.view,e[15]=I);let S;e[16]===d?S=e[17]:(S=[d],e[16]=d,e[17]=S),(0,C.useEffect)(I,S);let p;e[18]!==o||e[19]!==s||e[20]!==r?(p=(0,l.jsx)(Ce,{run:r,hoveredCellId:s,hiddenInputElementId:o}),e[18]=o,e[19]=s,e[20]=r,e[21]=p):p=e[21];let _=p,E=a==="sideBySide"?"-mt-0.5 flex-1":"",R;e[22]===Symbol.for("react.memo_cache_sentinel")?(R=(0,l.jsx)(C.Suspense,{children:(0,l.jsx)("div",{ref:N})}),e[22]=R):R=e[22];let B;e[23]!==c||e[24]!==E?(B=(0,l.jsx)("div",{className:E,ref:c,children:R}),e[23]=c,e[24]=E,e[25]=B):B=e[25];let $=B;if(a==="above"){let k;e[26]!==$||e[27]!==n||e[28]!==_?(k=(0,l.jsxs)("pre",{className:"font-mono font-semibold",children:[n,$,_]}),e[26]=$,e[27]=n,e[28]=_,e[29]=k):k=e[29];let b;return e[30]!==r.runId||e[31]!==k?(b=(0,l.jsx)("div",{className:"flex flex-col",children:k},r.runId),e[30]=r.runId,e[31]=k,e[32]=b):b=e[32],b}let z;e[33]!==n||e[34]!==_?(z=(0,l.jsxs)("pre",{className:"font-mono font-semibold",children:[n,_]}),e[33]=n,e[34]=_,e[35]=z):z=e[35];let D;return e[36]!==$||e[37]!==r.runId||e[38]!==z?(D=(0,l.jsxs)("div",{className:"flex flex-row",children:[z,$]},r.runId),e[36]=$,e[37]=r.runId,e[38]=z,e[39]=D):D=e[39],D},Ce=t=>{let e=(0,H.c)(12),{run:r,hoveredCellId:a,hiddenInputElementId:i}=t,n=(0,C.useRef)(null),s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=o=>{n.current&&(n.current.value=String(o),n.current.dispatchEvent(new Event("input",{bubbles:!0})))},e[0]=s):s=e[0];let w=s,N=a||"",c;e[1]!==i||e[2]!==N?(c=(0,l.jsx)("input",{type:"text",id:i,defaultValue:N,hidden:!0,ref:n}),e[1]=i,e[2]=N,e[3]=c):c=e[3];let m;e[4]===r.cellRuns?m=e[5]:(m=[...r.cellRuns.values()],e[4]=r.cellRuns,e[5]=m);let u;e[6]!==a||e[7]!==m?(u=m.map(o=>(0,l.jsx)(Pe,{cellRun:o,hovered:o.cellId===a,dispatchHoverEvent:w},o.cellId)),e[6]=a,e[7]=m,e[8]=u):u=e[8];let y;return e[9]!==c||e[10]!==u?(y=(0,l.jsxs)("div",{className:"text-xs mt-0.5 ml-3 flex flex-col gap-0.5",children:[c,u]}),e[9]=c,e[10]=u,e[11]=y):y=e[11],y},Ee={success:(0,l.jsx)(ue,{color:"green",size:14}),running:(0,l.jsx)(he,{color:"var(--blue-10)",size:14}),error:(0,l.jsx)(se,{color:"red",size:14}),queued:(0,l.jsx)(ke,{color:"grey",size:14})},Pe=t=>{let e=(0,H.c)(39),{cellRun:r,hovered:a,dispatchHoverEvent:i}=t,n;e[0]===r.elapsedTime?n=e[1]:(n=r.elapsedTime?U(r.elapsedTime*1e3):"-",e[0]=r.elapsedTime,e[1]=n);let s=n,w;e[2]!==r.elapsedTime||e[3]!==s?(w=r.elapsedTime?(0,l.jsxs)("span",{children:["This cell took ",(0,l.jsx)(ce,{elapsedTime:s})," to run"]}):(0,l.jsx)("span",{children:"This cell has not been run"}),e[2]=r.elapsedTime,e[3]=s,e[4]=w):w=e[4];let N=w,c;e[5]!==r.cellId||e[6]!==i?(c=()=>{i(r.cellId)},e[5]=r.cellId,e[6]=i,e[7]=c):c=e[7];let m=c,u;e[8]===i?u=e[9]:(u=()=>{i(null)},e[8]=i,e[9]=u);let y=u,o=a&&"bg-(--gray-3) opacity-100",h;e[10]===o?h=e[11]:(h=oe("flex flex-row gap-2 py-1 px-1 opacity-70 hover:bg-(--gray-3) hover:opacity-100",o),e[10]=o,e[11]=h);let v;e[12]===r.startTime?v=e[13]:(v=L(r.startTime),e[12]=r.startTime,e[13]=v);let g;e[14]===v?g=e[15]:(g=(0,l.jsxs)("span",{className:"text-(--gray-10) dark:text-(--gray-11)",children:["[",v,"]"]}),e[14]=v,e[15]=g);let j;e[16]===r.cellId?j=e[17]:(j=(0,l.jsxs)("span",{className:"text-(--gray-10) w-16 overflow-hidden",children:["(",(0,l.jsx)(ge,{cellId:r.cellId}),")"]}),e[16]=r.cellId,e[17]=j);let T;e[18]===r.code?T=e[19]:(T=(0,l.jsx)("span",{className:"w-40 truncate -ml-1",children:r.code}),e[18]=r.code,e[19]=T);let f;e[20]===s?f=e[21]:(f=(0,l.jsx)("span",{className:"text-(--gray-10) dark:text-(--gray-11)",children:s}),e[20]=s,e[21]=f);let x;e[22]!==N||e[23]!==f?(x=(0,l.jsx)(G,{content:N,children:f}),e[22]=N,e[23]=f,e[24]=x):x=e[24];let d=Ee[r.status],I;e[25]!==r.status||e[26]!==d?(I=(0,l.jsx)(G,{content:r.status,children:d}),e[25]=r.status,e[26]=d,e[27]=I):I=e[27];let S;e[28]!==x||e[29]!==I?(S=(0,l.jsxs)("div",{className:"flex flex-row gap-1 w-16 justify-end -ml-2",children:[x,I]}),e[28]=x,e[29]=I,e[30]=S):S=e[30];let p;return e[31]!==m||e[32]!==y||e[33]!==T||e[34]!==S||e[35]!==h||e[36]!==g||e[37]!==j?(p=(0,l.jsxs)("div",{className:h,onMouseEnter:m,onMouseLeave:y,children:[g,j,T,S]}),e[31]=m,e[32]=y,e[33]=T,e[34]=S,e[35]=h,e[36]=g,e[37]=j,e[38]=p):p=e[38],p};export{Me as Tracing};
|
|
1
|
+
import{s as A}from"./chunk-LvLJmgfZ.js";import{d as ee,p as te,u as F}from"./useEvent-O0nX5vok.js";import{t as re}from"./react-Bj1aDYRI.js";import{A as le,G as L,Zn as se,rr as ae}from"./cells-D7VcaLU3.js";import"./react-dom-CSu739Rf.js";import{t as ie}from"./compiler-runtime-B3qBwwSJ.js";import{t as ne}from"./jsx-runtime-icT_Ltz2.js";import{t as oe}from"./cn-BoaCR37F.js";import"./dist-B_cxg-E4.js";import"./cjs-BU2qXMKx.js";import"./main-DrBRErTM.js";import"./useNonce-BtW-rR_1.js";import{t as de}from"./createLucideIcon-Cm-Z7dYr.js";import{n as ce,r as U}from"./CellStatus-DSc0Rc57.js";import{r as me}from"./x-BI1M8X_v.js";import{t as pe}from"./chevron-right-D0GQBpTb.js";import{t as ue}from"./circle-check-gLIOLu8x.js";import{t as he}from"./circle-play-DYGULlKZ.js";import"./dist-BNC_tnlW.js";import"./dist-CXLJUPFl.js";import"./dist-CQqv2gQL.js";import"./dist-8UD0A5sU.js";import"./dist-apDpadc4.js";import"./session-BrEm7qNv.js";import{r as fe}from"./useTheme-BYXBU1of.js";import"./Combination-Cs9nbinQ.js";import{t as G}from"./tooltip-D9723Brr.js";import"./purify.es-BBn8CPhf.js";import"./vega-loader.browser-CZV6_g2i.js";import{r as xe,t as ve}from"./react-vega-BZav_-2n.js";import"./defaultLocale-OkOxlkkM.js";import"./defaultLocale-DK1MWd7f.js";import{t as ge}from"./cell-link-B4VljPeB.js";import{t as je}from"./bundle.esm-idScn0w0.js";import{n as ye,r as Ie,t as V}from"./react-resizable-panels.browser.esm-DDRqG5ui.js";import{t as Se}from"./empty-state-B_US46Us.js";import"./multi-icon-DEWnuZs2.js";import{r as be}from"./panel-context-BN0DQXiK.js";import{t as Ne}from"./clear-button-DrIF5o__.js";import{n as Te,t as we}from"./runs-Bhy0tbWr.js";var ke=de("circle-ellipsis",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M17 12h.01",key:"1m0b6t"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M7 12h.01",key:"eqddd0"}]]),H=ie(),C=A(re(),1);const Y="hoveredCellId",Z="cellHover";var Re="cellNum",J="cell",O="startTimestamp",K="endTimestamp",Q="status";function _e(t,e,r,a){let i="hoursminutessecondsmilliseconds";return{$schema:"https://vega.github.io/schema/vega-lite/v6.json",background:a==="dark"?"black":void 0,mark:{type:"bar",cornerRadius:2},params:[{name:Y,bind:{element:`#${e}`}},{name:Z,select:{type:"point",on:"mouseover",fields:[J],clear:"mouseout"}}],height:{step:r==="sideBySide"?26:21},encoding:{y:{field:Re,scale:{paddingInner:.2},sort:{field:"sortPriority"},title:"cell",axis:r==="sideBySide"?null:void 0},x:{field:O,type:"temporal",axis:{orient:"top",title:null}},x2:{field:K,type:"temporal"},tooltip:[{field:O,type:"temporal",timeUnit:i,title:"Start"},{field:K,type:"temporal",timeUnit:i,title:"End"}],size:{value:{expr:`${Y} == toString(datum.${J}) ? 19.5 : 18`}},color:{field:Q,scale:{domain:["success","error"],range:["#37BE5F","red"]},legend:null}},data:{values:t},transform:[{calculate:`datum.${Q} === 'queued' ? 9999999999999 : datum.${O}`,as:"sortPriority"}],config:{view:{stroke:"transparent"}}}}function W(t){try{let e=new Date(t*1e3);return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")} ${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}:${String(e.getSeconds()).padStart(2,"0")}.${String(e.getMilliseconds()).padStart(3,"0")}`}catch{return""}}var l=A(ne(),1),X=te(new Map);const Me=()=>{let t=(0,H.c)(34),{runIds:e,runMap:r}=F(we),a=F(X),{clearRuns:i}=Te(),{theme:n}=fe(),[s,w]=(0,C.useState)("above"),N=be(),c;t[0]===s?c=t[1]:(c=()=>{w(s==="above"?"sideBySide":"above")},t[0]=s,t[1]=c);let m=c;if(e.length===0){let p;return t[2]===Symbol.for("react.memo_cache_sentinel")?(p=(0,l.jsx)(Se,{title:"No traces",description:(0,l.jsx)("span",{children:"Cells that have ran will appear here."}),icon:(0,l.jsx)(ae,{})}),t[2]=p):p=t[2],p}let u;t[3]===Symbol.for("react.memo_cache_sentinel")?(u=(0,l.jsx)("label",{htmlFor:"chartPosition",className:"text-xs",children:"Inline chart"}),t[3]=u):u=t[3];let y=s==="sideBySide",o;t[4]!==y||t[5]!==m?(o=(0,l.jsxs)("div",{className:"flex flex-row gap-1 items-center",children:[u,(0,l.jsx)("input",{type:"checkbox",name:"chartPosition","data-testid":"chartPosition",onClick:m,defaultChecked:y,className:"h-3 cursor-pointer"})]}),t[4]=y,t[5]=m,t[6]=o):o=t[6];let h;t[7]===i?h=t[8]:(h=(0,l.jsx)(Ne,{dataTestId:"clear-traces-button",onClick:i}),t[7]=i,t[8]=h);let v;t[9]!==o||t[10]!==h?(v=(0,l.jsxs)("div",{className:"flex flex-row justify-start gap-3",children:[o,h]}),t[9]=o,t[10]=h,t[11]=v):v=t[11];let g;if(t[12]!==s||t[13]!==a||t[14]!==e||t[15]!==r||t[16]!==n){let p;t[18]!==s||t[19]!==a||t[20]!==r||t[21]!==n?(p=(_,E)=>{let R=r.get(_);return R?(0,l.jsx)($e,{run:R,isExpanded:a.get(R.runId),isMostRecentRun:E===0,chartPosition:s,theme:n},R.runId):null},t[18]=s,t[19]=a,t[20]=r,t[21]=n,t[22]=p):p=t[22],g=e.map(p),t[12]=s,t[13]=a,t[14]=e,t[15]=r,t[16]=n,t[17]=g}else g=t[17];let j;t[23]===g?j=t[24]:(j=(0,l.jsx)("div",{className:"flex flex-col gap-3",children:g}),t[23]=g,t[24]=j);let T;t[25]!==v||t[26]!==j?(T=(0,l.jsxs)("div",{className:"py-1 px-2 overflow-y-scroll h-full",children:[v,j]}),t[25]=v,t[26]=j,t[27]=T):T=t[27];let f=T;if(N==="sidebar")return f;let x;t[28]===f?x=t[29]:(x=(0,l.jsx)(V,{defaultSize:50,minSize:30,maxSize:80,children:f}),t[28]=f,t[29]=x);let d;t[30]===Symbol.for("react.memo_cache_sentinel")?(d=(0,l.jsx)(Ie,{className:"w-1 bg-border hover:bg-primary/50 transition-colors"}),t[30]=d):d=t[30];let I;t[31]===Symbol.for("react.memo_cache_sentinel")?(I=(0,l.jsx)(V,{defaultSize:50,children:(0,l.jsx)("div",{})}),t[31]=I):I=t[31];let S;return t[32]===x?S=t[33]:(S=(0,l.jsxs)(ye,{direction:"horizontal",className:"h-full",children:[x,d,I]}),t[32]=x,t[33]=S),S};var $e=({run:t,isMostRecentRun:e,chartPosition:r,isExpanded:a,theme:i})=>{let n=ee(X);a??(a=e);let s=()=>{n(c=>{let m=new Map(c);return m.set(t.runId,!a),m})},w=(0,l.jsx)(a?me:pe,{height:16,className:"inline"}),N=(0,l.jsxs)("span",{className:"text-sm cursor-pointer",onClick:s,children:["Run - ",L(t.runStartTime),w]});return a?(0,l.jsx)(ze,{run:t,chartPosition:r,theme:i,title:N},t.runId):(0,l.jsx)("div",{className:"flex flex-col",children:(0,l.jsx)("pre",{className:"font-mono font-semibold",children:N})},t.runId)},ze=t=>{let e=(0,H.c)(40),{run:r,chartPosition:a,theme:i,title:n}=t,[s,w]=(0,C.useState)(),N=(0,C.useRef)(null),{ref:c,width:m}=je(),u=m===void 0?300:m,y=le(),o,h;if(e[0]!==y||e[1]!==a||e[2]!==r.cellRuns||e[3]!==r.runId||e[4]!==i){let k=[...r.cellRuns.values()].map(b=>{let M=b.elapsedTime??0;return{cell:b.cellId,cellNum:y.inOrderIds.indexOf(b.cellId),startTimestamp:W(b.startTime),endTimestamp:W(b.startTime+M),elapsedTime:U(M*1e3),status:b.status}});o=`hiddenInputElement-${r.runId}`,h=xe(_e(k,o,a,i)),e[0]=y,e[1]=a,e[2]=r.cellRuns,e[3]=r.runId,e[4]=i,e[5]=o,e[6]=h}else o=e[5],h=e[6];let v=h.spec,g=i==="dark"?"dark":void 0,j=u-50,T=a==="above"?120:100,f;e[7]!==g||e[8]!==j||e[9]!==T?(f={theme:g,width:j,height:T,actions:!1,mode:"vega",renderer:"canvas"},e[7]=g,e[8]=j,e[9]=T,e[10]=f):f=e[10];let x;e[11]!==f||e[12]!==v?(x={ref:N,spec:v,options:f},e[11]=f,e[12]=v,e[13]=x):x=e[13];let d=ve(x),I;e[14]===(d==null?void 0:d.view)?I=e[15]:(I=()=>{let k=[{signalName:Z,handler:(b,M)=>{var q;let P=(q=M.cell)==null?void 0:q[0];w(P??null)}}];return k.forEach(b=>{let{signalName:M,handler:P}=b;d==null||d.view.addSignalListener(M,P)}),()=>{k.forEach(b=>{let{signalName:M,handler:P}=b;d==null||d.view.removeSignalListener(M,P)})}},e[14]=d==null?void 0:d.view,e[15]=I);let S;e[16]===d?S=e[17]:(S=[d],e[16]=d,e[17]=S),(0,C.useEffect)(I,S);let p;e[18]!==o||e[19]!==s||e[20]!==r?(p=(0,l.jsx)(Ce,{run:r,hoveredCellId:s,hiddenInputElementId:o}),e[18]=o,e[19]=s,e[20]=r,e[21]=p):p=e[21];let _=p,E=a==="sideBySide"?"-mt-0.5 flex-1":"",R;e[22]===Symbol.for("react.memo_cache_sentinel")?(R=(0,l.jsx)(C.Suspense,{children:(0,l.jsx)("div",{ref:N})}),e[22]=R):R=e[22];let B;e[23]!==c||e[24]!==E?(B=(0,l.jsx)("div",{className:E,ref:c,children:R}),e[23]=c,e[24]=E,e[25]=B):B=e[25];let $=B;if(a==="above"){let k;e[26]!==$||e[27]!==n||e[28]!==_?(k=(0,l.jsxs)("pre",{className:"font-mono font-semibold",children:[n,$,_]}),e[26]=$,e[27]=n,e[28]=_,e[29]=k):k=e[29];let b;return e[30]!==r.runId||e[31]!==k?(b=(0,l.jsx)("div",{className:"flex flex-col",children:k},r.runId),e[30]=r.runId,e[31]=k,e[32]=b):b=e[32],b}let z;e[33]!==n||e[34]!==_?(z=(0,l.jsxs)("pre",{className:"font-mono font-semibold",children:[n,_]}),e[33]=n,e[34]=_,e[35]=z):z=e[35];let D;return e[36]!==$||e[37]!==r.runId||e[38]!==z?(D=(0,l.jsxs)("div",{className:"flex flex-row",children:[z,$]},r.runId),e[36]=$,e[37]=r.runId,e[38]=z,e[39]=D):D=e[39],D},Ce=t=>{let e=(0,H.c)(12),{run:r,hoveredCellId:a,hiddenInputElementId:i}=t,n=(0,C.useRef)(null),s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=o=>{n.current&&(n.current.value=String(o),n.current.dispatchEvent(new Event("input",{bubbles:!0})))},e[0]=s):s=e[0];let w=s,N=a||"",c;e[1]!==i||e[2]!==N?(c=(0,l.jsx)("input",{type:"text",id:i,defaultValue:N,hidden:!0,ref:n}),e[1]=i,e[2]=N,e[3]=c):c=e[3];let m;e[4]===r.cellRuns?m=e[5]:(m=[...r.cellRuns.values()],e[4]=r.cellRuns,e[5]=m);let u;e[6]!==a||e[7]!==m?(u=m.map(o=>(0,l.jsx)(Pe,{cellRun:o,hovered:o.cellId===a,dispatchHoverEvent:w},o.cellId)),e[6]=a,e[7]=m,e[8]=u):u=e[8];let y;return e[9]!==c||e[10]!==u?(y=(0,l.jsxs)("div",{className:"text-xs mt-0.5 ml-3 flex flex-col gap-0.5",children:[c,u]}),e[9]=c,e[10]=u,e[11]=y):y=e[11],y},Ee={success:(0,l.jsx)(ue,{color:"green",size:14}),running:(0,l.jsx)(he,{color:"var(--blue-10)",size:14}),error:(0,l.jsx)(se,{color:"red",size:14}),queued:(0,l.jsx)(ke,{color:"grey",size:14})},Pe=t=>{let e=(0,H.c)(39),{cellRun:r,hovered:a,dispatchHoverEvent:i}=t,n;e[0]===r.elapsedTime?n=e[1]:(n=r.elapsedTime?U(r.elapsedTime*1e3):"-",e[0]=r.elapsedTime,e[1]=n);let s=n,w;e[2]!==r.elapsedTime||e[3]!==s?(w=r.elapsedTime?(0,l.jsxs)("span",{children:["This cell took ",(0,l.jsx)(ce,{elapsedTime:s})," to run"]}):(0,l.jsx)("span",{children:"This cell has not been run"}),e[2]=r.elapsedTime,e[3]=s,e[4]=w):w=e[4];let N=w,c;e[5]!==r.cellId||e[6]!==i?(c=()=>{i(r.cellId)},e[5]=r.cellId,e[6]=i,e[7]=c):c=e[7];let m=c,u;e[8]===i?u=e[9]:(u=()=>{i(null)},e[8]=i,e[9]=u);let y=u,o=a&&"bg-(--gray-3) opacity-100",h;e[10]===o?h=e[11]:(h=oe("flex flex-row gap-2 py-1 px-1 opacity-70 hover:bg-(--gray-3) hover:opacity-100",o),e[10]=o,e[11]=h);let v;e[12]===r.startTime?v=e[13]:(v=L(r.startTime),e[12]=r.startTime,e[13]=v);let g;e[14]===v?g=e[15]:(g=(0,l.jsxs)("span",{className:"text-(--gray-10) dark:text-(--gray-11)",children:["[",v,"]"]}),e[14]=v,e[15]=g);let j;e[16]===r.cellId?j=e[17]:(j=(0,l.jsxs)("span",{className:"text-(--gray-10) w-16 overflow-hidden",children:["(",(0,l.jsx)(ge,{cellId:r.cellId}),")"]}),e[16]=r.cellId,e[17]=j);let T;e[18]===r.code?T=e[19]:(T=(0,l.jsx)("span",{className:"w-40 truncate -ml-1",children:r.code}),e[18]=r.code,e[19]=T);let f;e[20]===s?f=e[21]:(f=(0,l.jsx)("span",{className:"text-(--gray-10) dark:text-(--gray-11)",children:s}),e[20]=s,e[21]=f);let x;e[22]!==N||e[23]!==f?(x=(0,l.jsx)(G,{content:N,children:f}),e[22]=N,e[23]=f,e[24]=x):x=e[24];let d=Ee[r.status],I;e[25]!==r.status||e[26]!==d?(I=(0,l.jsx)(G,{content:r.status,children:d}),e[25]=r.status,e[26]=d,e[27]=I):I=e[27];let S;e[28]!==x||e[29]!==I?(S=(0,l.jsxs)("div",{className:"flex flex-row gap-1 w-16 justify-end -ml-2",children:[x,I]}),e[28]=x,e[29]=I,e[30]=S):S=e[30];let p;return e[31]!==m||e[32]!==y||e[33]!==T||e[34]!==S||e[35]!==h||e[36]!==g||e[37]!==j?(p=(0,l.jsxs)("div",{className:h,onMouseEnter:m,onMouseLeave:y,children:[g,j,T,S]}),e[31]=m,e[32]=y,e[33]=T,e[34]=S,e[35]=h,e[36]=g,e[37]=j,e[38]=p):p=e[38],p};export{Me as Tracing};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./tracing-
|
|
2
|
-
import{s as m}from"./chunk-LvLJmgfZ.js";import{t as i}from"./react-Bj1aDYRI.js";import{t as n}from"./compiler-runtime-B3qBwwSJ.js";import{t as f}from"./jsx-runtime-icT_Ltz2.js";import{t as _}from"./spinner-C5JoisA7.js";import{t as p}from"./preload-helper-BW0IMuFq.js";let c,u=(async()=>{let a,l,r,o,s;a=n(),l=m(i(),1),r=m(f(),1),o=l.lazy(()=>p(()=>import("./tracing-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./tracing-DndaYcXU.js","./clear-button-DrIF5o__.js","./cn-BoaCR37F.js","./clsx-BDxNtGmi.js","./compiler-runtime-B3qBwwSJ.js","./react-Bj1aDYRI.js","./chunk-LvLJmgfZ.js","./jsx-runtime-icT_Ltz2.js","./cells-D7VcaLU3.js","./preload-helper-BW0IMuFq.js","./badge-hTpPIsMT.js","./button-Ej3vmCIF.js","./useEventListener-Dy81QR4n.js","./Combination-Cs9nbinQ.js","./react-dom-CSu739Rf.js","./select-CxT2Geqr.js","./menu-items-UxKrm8hS.js","./dist-DJBpXGro.js","./check-BE0hEwVo.js","./createLucideIcon-Cm-Z7dYr.js","./x-BI1M8X_v.js","./tooltip-D9723Brr.js","./use-toast-Hc8CXlvz.js","./utils-tNbLd14P.js","./useEvent-O0nX5vok.js","./_baseIsEqual-EYp9AUJI.js","./_Uint8Array-C0aUZfE0.js","./invariant-CQUIhlu2.js","./merge-CfcLlFFp.js","./isArrayLikeObject-Dx6-QZGQ.js","./zod-H_cgTO0M.js","./DeferredRequestRegistry-O6RDJKs0.js","./Deferred-BMfCOLaw.js","./uuid-ClFZlR7U.js","./config-3Aq84phF.js","./constants-Rz_lD4HK.js","./session-BrEm7qNv.js","./requests-Bgjtqo_1.js","./useLifecycle-DA9DjSPo.js","./assertNever-DWSyoPEi.js","./toString-lmrYznmk.js","./isSymbol-CiGN2w5X.js","./_baseSlice-39dTX4Wi.js","./_hasUnicode-QS_pSfjY.js","./_arrayReduce-BKEr35uH.js","./useNonce-BtW-rR_1.js","./useTheme-BYXBU1of.js","./once-CJOnx12W.js","./capabilities-D3x_db9Y.js","./createReducer-Drh7NmIR.js","./paths-D2lG83Oh.js","./dist-D0Vj4Kqc.js","./dist-B_cxg-E4.js","./dist-CtXb4bUU.js","./dist-BNC_tnlW.js","./dist-CXLJUPFl.js","./dist-CQqv2gQL.js","./dist-8UD0A5sU.js","./dist-apDpadc4.js","./dist-CEeVCRd_.js","./stex-0ac7Aukl.js","./toDate-BqKH-Jd9.js","./purify.es-BBn8CPhf.js","./cjs-BU2qXMKx.js","./debounce-DS_VtWMt.js","./toNumber-OnFQK5Wu.js","./now-8AYn-wiF.js","./toInteger-CO3ppIfA.js","./database-zap-DTWCDKdn.js","./main-DrBRErTM.js","./cells-jmgGt1lS.css","./CellStatus-DSc0Rc57.js","./multi-icon-DEWnuZs2.js","./multi-icon-pwGWVz3d.css","./useDateFormatter-CpE7XQLs.js","./context-CIAP2NOh.js","./SSRProvider-DC7ElCZZ.js","./en-US-BO8E69bZ.js","./ellipsis-0_zJdF6H.js","./refresh-cw-CHAHPgkx.js","./workflow-BmeqNuSH.js","./CellStatus-2Psjnl5F.css","./empty-state-B_US46Us.js","./panel-context-BN0DQXiK.js","./cell-link-B4VljPeB.js","./ImperativeModal-qEtcJ95s.js","./alert-dialog-9WfvUF7e.js","./dialog-CVN1lcMF.js","./input-CUwqpKjd.js","./useDebounce-B0dx2Gp0.js","./numbers-CYnquDho.js","./useNumberFormatter-DbDKSvEd.js","./usePress-BHGkpw8X.js","./runs-Bhy0tbWr.js","./react-vega-BZav_-2n.js","./precisionRound-BOmLQIKI.js","./defaultLocale-OkOxlkkM.js","./linear-BP9rwmWK.js","./timer-CPT_vXom.js","./init-XMA8CWhh.js","./time-D2GKc0U6.js","./defaultLocale-DK1MWd7f.js","./range-DNqFcYmr.js","./vega-loader.browser-CZV6_g2i.js","./treemap-Cf5pgJDk.js","./path-CkIaQHJO.js","./colors-WO6MvCS3.js","./ordinal-BjO5SoTk.js","./arc-BrTIAGt4.js","./math-CeGhAAgQ.js","./array-psg969PF.js","./step-BkfKj3CL.js","./line-BBSd2MUH.js","./chevron-right-D0GQBpTb.js","./circle-check-gLIOLu8x.js","./circle-play-DYGULlKZ.js","./react-resizable-panels.browser.esm-DDRqG5ui.js","./bundle.esm-idScn0w0.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{s as m}from"./chunk-LvLJmgfZ.js";import{t as i}from"./react-Bj1aDYRI.js";import{t as n}from"./compiler-runtime-B3qBwwSJ.js";import{t as f}from"./jsx-runtime-icT_Ltz2.js";import{t as _}from"./spinner-C5JoisA7.js";import{t as p}from"./preload-helper-BW0IMuFq.js";let c,u=(async()=>{let a,l,r,o,s;a=n(),l=m(i(),1),r=m(f(),1),o=l.lazy(()=>p(()=>import("./tracing-DndaYcXU.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117]),import.meta.url).then(t=>({default:t.Tracing}))),c=()=>{let t=(0,a.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,r.jsx)(l.Suspense,{fallback:(0,r.jsx)(s,{}),children:(0,r.jsx)(o,{})}),t[0]=e):e=t[0],e},s=()=>{let t=(0,a.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,r.jsx)("div",{className:"flex flex-col items-center justify-center h-full",children:(0,r.jsx)(_,{})}),t[0]=e):e=t[0],e}})();export{u as __tla,c as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{r as Ve,s as ue,t as Or}from"./chunk-LvLJmgfZ.js";import{t as Ir}from"./react-Bj1aDYRI.js";import{t as br}from"./jsx-runtime-icT_Ltz2.js";import{t as Sr}from"./createLucideIcon-Cm-Z7dYr.js";import{d as Dr}from"./popover-Du6bDNYH.js";import{t as Tr}from"./extends-DRbCSry7.js";var Er=Sr("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);function he(e,t){return he=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},he(e,t)}function wr(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,he(e,t)}function Ke(e){if(e===void 0)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var xr=Or(((e,t)=>{t.exports=function r(n,i){if(n===i)return!0;if(n&&i&&typeof n=="object"&&typeof i=="object"){if(n.constructor!==i.constructor)return!1;var s,o,a;if(Array.isArray(n)){if(s=n.length,s!=i.length)return!1;for(o=s;o--!==0;)if(!r(n[o],i[o]))return!1;return!0}if(n.constructor===RegExp)return n.source===i.source&&n.flags===i.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===i.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===i.toString();if(a=Object.keys(n),s=a.length,s!==Object.keys(i).length)return!1;for(o=s;o--!==0;)if(!Object.prototype.hasOwnProperty.call(i,a[o]))return!1;for(o=s;o--!==0;){var d=a[o];if(!r(n[d],i[d]))return!1}return!0}return n!==n&&i!==i}})),f=ue(Ir(),1);const Ye=(0,f.createContext)({dragDropManager:void 0});function R(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var qe=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),fe=function(){return Math.random().toString(36).substring(7).split("").join(".")},$e={INIT:"@@redux/INIT"+fe(),REPLACE:"@@redux/REPLACE"+fe(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+fe()}};function Cr(e){if(typeof e!="object"||!e)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Xe(e,t,r){var n;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw Error(R(0));if(typeof t=="function"&&r===void 0&&(r=t,t=void 0),r!==void 0){if(typeof r!="function")throw Error(R(1));return r(Xe)(e,t)}if(typeof e!="function")throw Error(R(2));var i=e,s=t,o=[],a=o,d=!1;function h(){a===o&&(a=o.slice())}function p(){if(d)throw Error(R(3));return s}function b(l){if(typeof l!="function")throw Error(R(4));if(d)throw Error(R(5));var u=!0;return h(),a.push(l),function(){if(u){if(d)throw Error(R(6));u=!1,h();var g=a.indexOf(l);a.splice(g,1),o=null}}}function I(l){if(!Cr(l))throw Error(R(7));if(l.type===void 0)throw Error(R(8));if(d)throw Error(R(9));try{d=!0,s=i(s,l)}finally{d=!1}for(var u=o=a,g=0;g<u.length;g++){var O=u[g];O()}return l}function v(l){if(typeof l!="function")throw Error(R(10));i=l,I({type:$e.REPLACE})}function c(){var l,u=b;return l={subscribe:function(g){if(typeof g!="object"||!g)throw Error(R(11));function O(){g.next&&g.next(p())}return O(),{unsubscribe:u(O)}}},l[qe]=function(){return this},l}return I({type:$e.INIT}),n={dispatch:I,subscribe:b,getState:p,replaceReducer:v},n[qe]=c,n}function y(e,t,...r){if(Nr()&&t===void 0)throw Error("invariant requires an error message argument");if(!e){let n;if(t===void 0)n=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let i=0;n=Error(t.replace(/%s/g,function(){return r[i++]})),n.name="Invariant Violation"}throw n.framesToPop=1,n}}function Nr(){return typeof process<"u"&&!0}function Rr(e,t,r){return t.split(".").reduce((n,i)=>n&&n[i]?n[i]:r||null,e)}function Pr(e,t){return e.filter(r=>r!==t)}function Je(e){return typeof e=="object"}function jr(e,t){let r=new Map,n=s=>{r.set(s,r.has(s)?r.get(s)+1:1)};e.forEach(n),t.forEach(n);let i=[];return r.forEach((s,o)=>{s===1&&i.push(o)}),i}function _r(e,t){return e.filter(r=>t.indexOf(r)>-1)}const ge="dnd-core/INIT_COORDS",J="dnd-core/BEGIN_DRAG",pe="dnd-core/PUBLISH_DRAG_SOURCE",Q="dnd-core/HOVER",Z="dnd-core/DROP",ee="dnd-core/END_DRAG";function Qe(e,t){return{type:ge,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}var Mr={type:ge,payload:{clientOffset:null,sourceClientOffset:null}};function Ar(e){return function(t=[],r={publishSource:!0}){let{publishSource:n=!0,clientOffset:i,getSourceClientOffset:s}=r,o=e.getMonitor(),a=e.getRegistry();e.dispatch(Qe(i)),Lr(t,o,a);let d=Fr(t,o);if(d==null){e.dispatch(Mr);return}let h=null;if(i){if(!s)throw Error("getSourceClientOffset must be defined");kr(s),h=s(d)}e.dispatch(Qe(i,h));let p=a.getSource(d).beginDrag(o,d);if(p!=null)return Hr(p),a.pinSource(d),{type:J,payload:{itemType:a.getSourceType(d),item:p,sourceId:d,clientOffset:i||null,sourceClientOffset:h||null,isSourcePublic:!!n}}}}function Lr(e,t,r){y(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(n){y(r.getSource(n),"Expected sourceIds to be registered.")})}function kr(e){y(typeof e=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function Hr(e){y(Je(e),"Item must be an object.")}function Fr(e,t){let r=null;for(let n=e.length-1;n>=0;n--)if(t.canDragSource(e[n])){r=e[n];break}return r}function Ur(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Br(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]==null?{}:arguments[t],n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){Ur(e,i,r[i])})}return e}function zr(e){return function(t={}){let r=e.getMonitor(),n=e.getRegistry();Wr(r),Kr(r).forEach((i,s)=>{let o={type:Z,payload:{dropResult:Br({},t,Gr(i,s,n,r))}};e.dispatch(o)})}}function Wr(e){y(e.isDragging(),"Cannot call drop while not dragging."),y(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function Gr(e,t,r,n){let i=r.getTarget(e),s=i?i.drop(n,e):void 0;return Vr(s),s===void 0&&(s=t===0?{}:n.getDropResult()),s}function Vr(e){y(e===void 0||Je(e),"Drop result must either be an object or undefined.")}function Kr(e){let t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function Yr(e){return function(){let t=e.getMonitor(),r=e.getRegistry();qr(t);let n=t.getSourceId();return n!=null&&(r.getSource(n,!0).endDrag(t,n),r.unpinSource()),{type:ee}}}function qr(e){y(e.isDragging(),"Cannot call endDrag while not dragging.")}function ve(e,t){return t===null?e===null:Array.isArray(e)?e.some(r=>r===t):e===t}function $r(e){return function(t,{clientOffset:r}={}){Xr(t);let n=t.slice(0),i=e.getMonitor(),s=e.getRegistry();return Qr(n,s,i.getItemType()),Jr(n,i,s),Zr(n,i,s),{type:Q,payload:{targetIds:n,clientOffset:r||null}}}}function Xr(e){y(Array.isArray(e),"Expected targetIds to be an array.")}function Jr(e,t,r){y(t.isDragging(),"Cannot call hover while not dragging."),y(!t.didDrop(),"Cannot call hover after drop.");for(let n=0;n<e.length;n++){let i=e[n];y(e.lastIndexOf(i)===n,"Expected targetIds to be unique in the passed array."),y(r.getTarget(i),"Expected targetIds to be registered.")}}function Qr(e,t,r){for(let n=e.length-1;n>=0;n--){let i=e[n];ve(t.getTargetType(i),r)||e.splice(n,1)}}function Zr(e,t,r){e.forEach(function(n){r.getTarget(n).hover(t,n)})}function en(e){return function(){if(e.getMonitor().isDragging())return{type:pe}}}function tn(e){return{beginDrag:Ar(e),publishDragSource:en(e),hover:$r(e),drop:zr(e),endDrag:Yr(e)}}var rn=class{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){let e=this,{dispatch:t}=this.store;function r(i){return(...s)=>{let o=i.apply(e,s);o!==void 0&&t(o)}}let n=tn(this);return Object.keys(n).reduce((i,s)=>{let o=n[s];return i[s]=r(o),i},{})}dispatch(e){this.store.dispatch(e)}constructor(e,t){this.isSetUp=!1,this.handleRefCountChange=()=>{let r=this.store.getState().refCount>0;this.backend&&(r&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!r&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=t,e.subscribe(this.handleRefCountChange)}};function nn(e,t){return{x:e.x+t.x,y:e.y+t.y}}function Ze(e,t){return{x:e.x-t.x,y:e.y-t.y}}function sn(e){let{clientOffset:t,initialClientOffset:r,initialSourceClientOffset:n}=e;return!t||!r||!n?null:Ze(nn(t,n),r)}function on(e){let{clientOffset:t,initialClientOffset:r}=e;return!t||!r?null:Ze(t,r)}const K=[],me=[];K.__IS_NONE__=!0,me.__IS_ALL__=!0;function an(e,t){return e===K?!1:e===me||t===void 0?!0:_r(t,e).length>0}var ln=class{subscribeToStateChange(e,t={}){let{handlerIds:r}=t;y(typeof e=="function","listener must be a function."),y(r===void 0||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let n=this.store.getState().stateId;return this.store.subscribe(()=>{let i=this.store.getState(),s=i.stateId;try{s===n||s===n+1&&!an(i.dirtyHandlerIds,r)||e()}finally{n=s}})}subscribeToOffsetChange(e){y(typeof e=="function","listener must be a function.");let t=this.store.getState().dragOffset;return this.store.subscribe(()=>{let r=this.store.getState().dragOffset;r!==t&&(t=r,e())})}canDragSource(e){if(!e)return!1;let t=this.registry.getSource(e);return y(t,`Expected to find a valid source. sourceId=${e}`),this.isDragging()?!1:t.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;let t=this.registry.getTarget(e);return y(t,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop()?!1:ve(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;let t=this.registry.getSource(e,!0);return y(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic()||this.registry.getSourceType(e)!==this.getItemType()?!1:t.isDragging(this,e)}isOverTarget(e,t={shallow:!1}){if(!e)return!1;let{shallow:r}=t;if(!this.isDragging())return!1;let n=this.registry.getTargetType(e),i=this.getItemType();if(i&&!ve(n,i))return!1;let s=this.getTargetIds();if(!s.length)return!1;let o=s.indexOf(e);return r?o===s.length-1:o>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return sn(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return on(this.store.getState().dragOffset)}constructor(e,t){this.store=e,this.registry=t}},et=typeof global<"u"?global:self,tt=et.MutationObserver||et.WebKitMutationObserver;function rt(e){return function(){let t=setTimeout(n,0),r=setInterval(n,50);function n(){clearTimeout(t),clearInterval(r),e()}}}function dn(e){let t=1,r=new tt(e),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){t=-t,n.data=t}}const cn=typeof tt=="function"?dn:rt;var un=class{enqueueTask(e){let{queue:t,requestFlush:r}=this;t.length||(r(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{let{queue:e}=this;for(;this.index<e.length;){let t=this.index;if(this.index++,e[t].call(),this.index>this.capacity){for(let r=0,n=e.length-this.index;r<n;r++)e[r]=e[r+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=cn(this.flush),this.requestErrorThrow=rt(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}},hn=class{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}},fn=class{create(e){let t=this.freeTasks,r=t.length?t.pop():new hn(this.onError,n=>t[t.length]=n);return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}},nt=new un,gn=new fn(nt.registerPendingError);function pn(e){nt.enqueueTask(gn.create(e))}const ye="dnd-core/ADD_SOURCE",Oe="dnd-core/ADD_TARGET",Ie="dnd-core/REMOVE_SOURCE",te="dnd-core/REMOVE_TARGET";function vn(e){return{type:ye,payload:{sourceId:e}}}function mn(e){return{type:Oe,payload:{targetId:e}}}function yn(e){return{type:Ie,payload:{sourceId:e}}}function On(e){return{type:te,payload:{targetId:e}}}function In(e){y(typeof e.canDrag=="function","Expected canDrag to be a function."),y(typeof e.beginDrag=="function","Expected beginDrag to be a function."),y(typeof e.endDrag=="function","Expected endDrag to be a function.")}function bn(e){y(typeof e.canDrop=="function","Expected canDrop to be a function."),y(typeof e.hover=="function","Expected hover to be a function."),y(typeof e.drop=="function","Expected beginDrag to be a function.")}function be(e,t){if(t&&Array.isArray(e)){e.forEach(r=>be(r,!1));return}y(typeof e=="string"||typeof e=="symbol",t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var P;(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(P||(P={}));var Sn=0;function Dn(){return Sn++}function Tn(e){let t=Dn().toString();switch(e){case P.SOURCE:return`S${t}`;case P.TARGET:return`T${t}`;default:throw Error(`Unknown Handler Role: ${e}`)}}function it(e){switch(e[0]){case"S":return P.SOURCE;case"T":return P.TARGET;default:throw Error(`Cannot parse handler ID: ${e}`)}}function st(e,t){let r=e.entries(),n=!1;do{let{done:i,value:[,s]}=r.next();if(s===t)return!0;n=!!i}while(!n);return!1}var En=class{addSource(e,t){be(e),In(t);let r=this.addHandler(P.SOURCE,e,t);return this.store.dispatch(vn(r)),r}addTarget(e,t){be(e,!0),bn(t);let r=this.addHandler(P.TARGET,e,t);return this.store.dispatch(mn(r)),r}containsHandler(e){return st(this.dragSources,e)||st(this.dropTargets,e)}getSource(e,t=!1){return y(this.isSourceId(e),"Expected a valid source ID."),t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return y(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return y(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return y(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return it(e)===P.SOURCE}isTargetId(e){return it(e)===P.TARGET}removeSource(e){y(this.getSource(e),"Expected an existing source."),this.store.dispatch(yn(e)),pn(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){y(this.getTarget(e),"Expected an existing target."),this.store.dispatch(On(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){let t=this.getSource(e);y(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}unpinSource(){y(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,t,r){let n=Tn(e);return this.types.set(n,t),e===P.SOURCE?this.dragSources.set(n,r):e===P.TARGET&&this.dropTargets.set(n,r),n}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}};const wn=(e,t)=>e===t;function xn(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function Cn(e,t,r=wn){if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(!r(e[n],t[n]))return!1;return!0}function Nn(e=K,t){switch(t.type){case Q:break;case ye:case Oe:case te:case Ie:return K;case J:case pe:case ee:case Z:default:return me}let{targetIds:r=[],prevTargetIds:n=[]}=t.payload,i=jr(r,n);if(!(i.length>0||!Cn(r,n)))return K;let s=n[n.length-1],o=r[r.length-1];return s!==o&&(s&&i.push(s),o&&i.push(o)),i}function Rn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Pn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]==null?{}:arguments[t],n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){Rn(e,i,r[i])})}return e}var ot={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function jn(e=ot,t){let{payload:r}=t;switch(t.type){case ge:case J:return{initialSourceClientOffset:r.sourceClientOffset,initialClientOffset:r.clientOffset,clientOffset:r.clientOffset};case Q:return xn(e.clientOffset,r.clientOffset)?e:Pn({},e,{clientOffset:r.clientOffset});case ee:case Z:return ot;default:return e}}function _n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function U(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]==null?{}:arguments[t],n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){_n(e,i,r[i])})}return e}var Mn={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function An(e=Mn,t){let{payload:r}=t;switch(t.type){case J:return U({},e,{itemType:r.itemType,item:r.item,sourceId:r.sourceId,isSourcePublic:r.isSourcePublic,dropResult:null,didDrop:!1});case pe:return U({},e,{isSourcePublic:!0});case Q:return U({},e,{targetIds:r.targetIds});case te:return e.targetIds.indexOf(r.targetId)===-1?e:U({},e,{targetIds:Pr(e.targetIds,r.targetId)});case Z:return U({},e,{dropResult:r.dropResult,didDrop:!0,targetIds:[]});case ee:return U({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function Ln(e=0,t){switch(t.type){case ye:case Oe:return e+1;case Ie:case te:return e-1;default:return e}}function kn(e=0){return e+1}function Hn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]==null?{}:arguments[t],n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){Hn(e,i,r[i])})}return e}function Un(e={},t){return{dirtyHandlerIds:Nn(e.dirtyHandlerIds,{type:t.type,payload:Fn({},t.payload,{prevTargetIds:Rr(e,"dragOperation.targetIds",[])})}),dragOffset:jn(e.dragOffset,t),refCount:Ln(e.refCount,t),dragOperation:An(e.dragOperation,t),stateId:kn(e.stateId)}}function Bn(e,t=void 0,r={},n=!1){let i=zn(n),s=new rn(i,new ln(i,new En(i))),o=e(s,t,r);return s.receiveBackend(o),s}function zn(e){let t=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return Xe(Un,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}var m=ue(br(),1);function Wn(e,t){if(e==null)return{};var r=Gn(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Gn(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,s;for(s=0;s<n.length;s++)i=n[s],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}var at=0,re=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__"),lt=(0,f.memo)(function(e){var{children:t}=e;let[r,n]=Vn(Wn(e,["children"]));return(0,f.useEffect)(()=>{if(n){let i=dt();return++at,()=>{--at===0&&(i[re]=null)}}},[]),(0,m.jsx)(Ye.Provider,{value:r,children:t})});function Vn(e){return"manager"in e?[{dragDropManager:e.manager},!1]:[Kn(e.backend,e.context,e.options,e.debugMode),!e.context]}function Kn(e,t=dt(),r,n){let i=t;return i[re]||(i[re]={dragDropManager:Bn(e,t,r,n)}),i[re]}function dt(){return typeof global<"u"?global:window}const k=typeof window<"u"?f.useLayoutEffect:f.useEffect;var Yn=ue(xr(),1);function ct(e,t,r){let[n,i]=(0,f.useState)(()=>t(e)),s=(0,f.useCallback)(()=>{let o=t(e);(0,Yn.default)(n,o)||(i(o),r&&r())},[n,e,r]);return k(s),[n,s]}function qn(e,t,r){let[n,i]=ct(e,t,r);return k(function(){let s=e.getHandlerId();if(s!=null)return e.subscribeToStateChange(i,{handlerIds:[s]})},[e,i]),n}function ut(e,t,r){return qn(t,e||(()=>({})),()=>r.reconnect())}function ht(e,t){let r=[...t||[]];return t==null&&typeof e!="function"&&r.push(e),(0,f.useMemo)(()=>typeof e=="function"?e():e,r)}function $n(e){return(0,f.useMemo)(()=>e.hooks.dragSource(),[e])}function Xn(e){return(0,f.useMemo)(()=>e.hooks.dragPreview(),[e])}var Se=!1,De=!1,Jn=class{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){y(!Se,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Se=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Se=!1}}isDragging(){if(!this.sourceId)return!1;y(!De,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return De=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{De=!1}}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,t){return this.internalMonitor.isOverTarget(e,t)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}},Te=!1,Qn=class{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}canDrop(){if(!this.targetId)return!1;y(!Te,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return Te=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Te=!1}}isOver(e){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,e):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}};function Zn(e,t,r){let n=r.getRegistry(),i=n.addTarget(e,t);return[i,()=>n.removeTarget(i)]}function ei(e,t,r){let n=r.getRegistry(),i=n.addSource(e,t);return[i,()=>n.removeSource(i)]}function Ee(e,t,r,n){let i=r?r.call(n,e,t):void 0;if(i!==void 0)return!!i;if(e===t)return!0;if(typeof e!="object"||!e||typeof t!="object"||!t)return!1;let s=Object.keys(e),o=Object.keys(t);if(s.length!==o.length)return!1;let a=Object.prototype.hasOwnProperty.bind(t);for(let d=0;d<s.length;d++){let h=s[d];if(!a(h))return!1;let p=e[h],b=t[h];if(i=r?r.call(n,p,b,h):void 0,i===!1||i===void 0&&p!==b)return!1}return!0}function we(e){return typeof e=="object"&&!!e&&Object.prototype.hasOwnProperty.call(e,"current")}function ti(e){if(typeof e.type=="string")return;let t=e.type.displayName||e.type.name||"the component";throw Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${t} into a <div>, or turn it into a drag source or a drop target itself.`)}function ri(e){return(t=null,r=null)=>{if(!(0,f.isValidElement)(t)){let i=t;return e(i,r),i}let n=t;return ti(n),ni(n,r?i=>e(i,r):e)}}function ft(e){let t={};return Object.keys(e).forEach(r=>{let n=e[r];if(r.endsWith("Ref"))t[r]=e[r];else{let i=ri(n);t[r]=()=>i}}),t}function gt(e,t){typeof e=="function"?e(t):e.current=t}function ni(e,t){let r=e.ref;return y(typeof r!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),r?(0,f.cloneElement)(e,{ref:n=>{gt(r,n),gt(t,n)}}):(0,f.cloneElement)(e,{ref:t})}var ii=class{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){let e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){let e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return t&&this.disconnectDragSource(),this.handlerId?e?(t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),t):(this.lastConnectedDragSource=e,t):t}reconnectDragPreview(e=!1){let t=this.dragPreview,r=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),this.handlerId){if(!t){this.lastConnectedDragPreview=t;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=t,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,t,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!Ee(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!Ee(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe=(this.dragSourceUnsubscribe(),void 0))}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=ft({dragSource:(t,r)=>{this.clearDragSource(),this.dragSourceOptions=r||null,we(t)?this.dragSourceRef=t:this.dragSourceNode=t,this.reconnectDragSource()},dragPreview:(t,r)=>{this.clearDragPreview(),this.dragPreviewOptions=r||null,we(t)?this.dragPreviewRef=t:this.dragPreviewNode=t,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}},si=class{get connectTarget(){return this.dropTarget}reconnect(){let e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();let t=this.dropTarget;if(this.handlerId){if(!t){this.lastConnectedDropTarget=t;return}e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions))}}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!Ee(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget=(this.unsubscribeDropTarget(),void 0))}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=ft({dropTarget:(t,r)=>{this.clearDropTarget(),this.dropTargetOptions=r,we(t)?this.dropTargetRef=t:this.dropTargetNode=t,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}};function A(){let{dragDropManager:e}=(0,f.useContext)(Ye);return y(e!=null,"Expected drag drop context"),e}function oi(e,t){let r=A(),n=(0,f.useMemo)(()=>new ii(r.getBackend()),[r]);return k(()=>(n.dragSourceOptions=e||null,n.reconnect(),()=>n.disconnectDragSource()),[n,e]),k(()=>(n.dragPreviewOptions=t||null,n.reconnect(),()=>n.disconnectDragPreview()),[n,t]),n}function ai(){let e=A();return(0,f.useMemo)(()=>new Jn(e),[e])}var li=class{beginDrag(){let e=this.spec,t=this.monitor,r=null;return r=typeof e.item=="object"?e.item:typeof e.item=="function"?e.item(t):{},r??null}canDrag(){let e=this.spec,t=this.monitor;return typeof e.canDrag=="boolean"?e.canDrag:typeof e.canDrag=="function"?e.canDrag(t):!0}isDragging(e,t){let r=this.spec,n=this.monitor,{isDragging:i}=r;return i?i(n):t===e.getSourceId()}endDrag(){let e=this.spec,t=this.monitor,r=this.connector,{end:n}=e;n&&n(t.getItem(),t),r.reconnect()}constructor(e,t,r){this.spec=e,this.monitor=t,this.connector=r}};function di(e,t,r){let n=(0,f.useMemo)(()=>new li(e,t,r),[t,r]);return(0,f.useEffect)(()=>{n.spec=e},[e]),n}function ci(e){return(0,f.useMemo)(()=>{let t=e.type;return y(t!=null,"spec.type must be defined"),t},[e])}function ui(e,t,r){let n=A(),i=di(e,t,r),s=ci(e);k(function(){if(s!=null){let[o,a]=ei(s,i,n);return t.receiveHandlerId(o),r.receiveHandlerId(o),a}},[n,t,r,i,s])}function hi(e,t){let r=ht(e,t);y(!r.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");let n=ai(),i=oi(r.options,r.previewOptions);return ui(r,n,i),[ut(r.collect,n,i),$n(i),Xn(i)]}function fi(e){let t=A().getMonitor(),[r,n]=ct(t,e);return(0,f.useEffect)(()=>t.subscribeToOffsetChange(n)),(0,f.useEffect)(()=>t.subscribeToStateChange(n)),r}function gi(e){return(0,f.useMemo)(()=>e.hooks.dropTarget(),[e])}function pi(e){let t=A(),r=(0,f.useMemo)(()=>new si(t.getBackend()),[t]);return k(()=>(r.dropTargetOptions=e||null,r.reconnect(),()=>r.disconnectDropTarget()),[e]),r}function vi(){let e=A();return(0,f.useMemo)(()=>new Qn(e),[e])}function mi(e){let{accept:t}=e;return(0,f.useMemo)(()=>(y(e.accept!=null,"accept must be defined"),Array.isArray(t)?t:[t]),[t])}var yi=class{canDrop(){let e=this.spec,t=this.monitor;return e.canDrop?e.canDrop(t.getItem(),t):!0}hover(){let e=this.spec,t=this.monitor;e.hover&&e.hover(t.getItem(),t)}drop(){let e=this.spec,t=this.monitor;if(e.drop)return e.drop(t.getItem(),t)}constructor(e,t){this.spec=e,this.monitor=t}};function Oi(e,t){let r=(0,f.useMemo)(()=>new yi(e,t),[t]);return(0,f.useEffect)(()=>{r.spec=e},[e]),r}function Ii(e,t,r){let n=A(),i=Oi(e,t),s=mi(e);k(function(){let[o,a]=Zn(s,i,n);return t.receiveHandlerId(o),r.receiveHandlerId(o),a},[n,t,i,r,s.map(o=>o.toString()).join("|")])}function pt(e,t){let r=ht(e,t),n=vi(),i=pi(r.options);return Ii(r,n,i),[ut(r.collect,n,i),gi(i)]}function vt(e){let t=null;return()=>(t??(t=e()),t)}function bi(e,t){return e.filter(r=>r!==t)}function Si(e,t){let r=new Set,n=s=>r.add(s);e.forEach(n),t.forEach(n);let i=[];return r.forEach(s=>i.push(s)),i}var Di=class{enter(e){let t=this.entered.length;return this.entered=Si(this.entered.filter(r=>this.isNodeInDocument(r)&&(!r.contains||r.contains(e))),[e]),t===0&&this.entered.length>0}leave(e){let t=this.entered.length;return this.entered=bi(this.entered.filter(this.isNodeInDocument),e),t>0&&this.entered.length===0}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}},Ti=class{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null}})})}loadDataTransfer(e){if(e){let t={};Object.keys(this.config.exposeProperties).forEach(r=>{let n=this.config.exposeProperties[r];n!=null&&(t[r]={value:n(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,t)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,t){return t===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}},mt=Ve({FILE:()=>yt,HTML:()=>bt,TEXT:()=>It,URL:()=>Ot},1);const yt="__NATIVE_FILE__",Ot="__NATIVE_URL__",It="__NATIVE_TEXT__",bt="__NATIVE_HTML__";function xe(e,t,r){return t.reduce((n,i)=>n||e.getData(i),"")??r}const Ce={[yt]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[bt]:{exposeProperties:{html:(e,t)=>xe(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[Ot]:{exposeProperties:{urls:(e,t)=>xe(e,t,"").split(`
|
|
1
|
+
import{r as Ve,s as ue,t as Or}from"./chunk-LvLJmgfZ.js";import{t as Ir}from"./react-Bj1aDYRI.js";import{t as br}from"./jsx-runtime-icT_Ltz2.js";import{t as Sr}from"./createLucideIcon-Cm-Z7dYr.js";import{d as Dr}from"./popover-BPGG2gPG.js";import{t as Tr}from"./extends-DRbCSry7.js";var Er=Sr("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);function he(e,t){return he=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},he(e,t)}function wr(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,he(e,t)}function Ke(e){if(e===void 0)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var xr=Or(((e,t)=>{t.exports=function r(n,i){if(n===i)return!0;if(n&&i&&typeof n=="object"&&typeof i=="object"){if(n.constructor!==i.constructor)return!1;var s,o,a;if(Array.isArray(n)){if(s=n.length,s!=i.length)return!1;for(o=s;o--!==0;)if(!r(n[o],i[o]))return!1;return!0}if(n.constructor===RegExp)return n.source===i.source&&n.flags===i.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===i.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===i.toString();if(a=Object.keys(n),s=a.length,s!==Object.keys(i).length)return!1;for(o=s;o--!==0;)if(!Object.prototype.hasOwnProperty.call(i,a[o]))return!1;for(o=s;o--!==0;){var d=a[o];if(!r(n[d],i[d]))return!1}return!0}return n!==n&&i!==i}})),f=ue(Ir(),1);const Ye=(0,f.createContext)({dragDropManager:void 0});function R(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var qe=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),fe=function(){return Math.random().toString(36).substring(7).split("").join(".")},$e={INIT:"@@redux/INIT"+fe(),REPLACE:"@@redux/REPLACE"+fe(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+fe()}};function Cr(e){if(typeof e!="object"||!e)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Xe(e,t,r){var n;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw Error(R(0));if(typeof t=="function"&&r===void 0&&(r=t,t=void 0),r!==void 0){if(typeof r!="function")throw Error(R(1));return r(Xe)(e,t)}if(typeof e!="function")throw Error(R(2));var i=e,s=t,o=[],a=o,d=!1;function h(){a===o&&(a=o.slice())}function p(){if(d)throw Error(R(3));return s}function b(l){if(typeof l!="function")throw Error(R(4));if(d)throw Error(R(5));var u=!0;return h(),a.push(l),function(){if(u){if(d)throw Error(R(6));u=!1,h();var g=a.indexOf(l);a.splice(g,1),o=null}}}function I(l){if(!Cr(l))throw Error(R(7));if(l.type===void 0)throw Error(R(8));if(d)throw Error(R(9));try{d=!0,s=i(s,l)}finally{d=!1}for(var u=o=a,g=0;g<u.length;g++){var O=u[g];O()}return l}function v(l){if(typeof l!="function")throw Error(R(10));i=l,I({type:$e.REPLACE})}function c(){var l,u=b;return l={subscribe:function(g){if(typeof g!="object"||!g)throw Error(R(11));function O(){g.next&&g.next(p())}return O(),{unsubscribe:u(O)}}},l[qe]=function(){return this},l}return I({type:$e.INIT}),n={dispatch:I,subscribe:b,getState:p,replaceReducer:v},n[qe]=c,n}function y(e,t,...r){if(Nr()&&t===void 0)throw Error("invariant requires an error message argument");if(!e){let n;if(t===void 0)n=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let i=0;n=Error(t.replace(/%s/g,function(){return r[i++]})),n.name="Invariant Violation"}throw n.framesToPop=1,n}}function Nr(){return typeof process<"u"&&!0}function Rr(e,t,r){return t.split(".").reduce((n,i)=>n&&n[i]?n[i]:r||null,e)}function Pr(e,t){return e.filter(r=>r!==t)}function Je(e){return typeof e=="object"}function jr(e,t){let r=new Map,n=s=>{r.set(s,r.has(s)?r.get(s)+1:1)};e.forEach(n),t.forEach(n);let i=[];return r.forEach((s,o)=>{s===1&&i.push(o)}),i}function _r(e,t){return e.filter(r=>t.indexOf(r)>-1)}const ge="dnd-core/INIT_COORDS",J="dnd-core/BEGIN_DRAG",pe="dnd-core/PUBLISH_DRAG_SOURCE",Q="dnd-core/HOVER",Z="dnd-core/DROP",ee="dnd-core/END_DRAG";function Qe(e,t){return{type:ge,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}var Mr={type:ge,payload:{clientOffset:null,sourceClientOffset:null}};function Ar(e){return function(t=[],r={publishSource:!0}){let{publishSource:n=!0,clientOffset:i,getSourceClientOffset:s}=r,o=e.getMonitor(),a=e.getRegistry();e.dispatch(Qe(i)),Lr(t,o,a);let d=Fr(t,o);if(d==null){e.dispatch(Mr);return}let h=null;if(i){if(!s)throw Error("getSourceClientOffset must be defined");kr(s),h=s(d)}e.dispatch(Qe(i,h));let p=a.getSource(d).beginDrag(o,d);if(p!=null)return Hr(p),a.pinSource(d),{type:J,payload:{itemType:a.getSourceType(d),item:p,sourceId:d,clientOffset:i||null,sourceClientOffset:h||null,isSourcePublic:!!n}}}}function Lr(e,t,r){y(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(n){y(r.getSource(n),"Expected sourceIds to be registered.")})}function kr(e){y(typeof e=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function Hr(e){y(Je(e),"Item must be an object.")}function Fr(e,t){let r=null;for(let n=e.length-1;n>=0;n--)if(t.canDragSource(e[n])){r=e[n];break}return r}function Ur(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Br(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]==null?{}:arguments[t],n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){Ur(e,i,r[i])})}return e}function zr(e){return function(t={}){let r=e.getMonitor(),n=e.getRegistry();Wr(r),Kr(r).forEach((i,s)=>{let o={type:Z,payload:{dropResult:Br({},t,Gr(i,s,n,r))}};e.dispatch(o)})}}function Wr(e){y(e.isDragging(),"Cannot call drop while not dragging."),y(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function Gr(e,t,r,n){let i=r.getTarget(e),s=i?i.drop(n,e):void 0;return Vr(s),s===void 0&&(s=t===0?{}:n.getDropResult()),s}function Vr(e){y(e===void 0||Je(e),"Drop result must either be an object or undefined.")}function Kr(e){let t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function Yr(e){return function(){let t=e.getMonitor(),r=e.getRegistry();qr(t);let n=t.getSourceId();return n!=null&&(r.getSource(n,!0).endDrag(t,n),r.unpinSource()),{type:ee}}}function qr(e){y(e.isDragging(),"Cannot call endDrag while not dragging.")}function ve(e,t){return t===null?e===null:Array.isArray(e)?e.some(r=>r===t):e===t}function $r(e){return function(t,{clientOffset:r}={}){Xr(t);let n=t.slice(0),i=e.getMonitor(),s=e.getRegistry();return Qr(n,s,i.getItemType()),Jr(n,i,s),Zr(n,i,s),{type:Q,payload:{targetIds:n,clientOffset:r||null}}}}function Xr(e){y(Array.isArray(e),"Expected targetIds to be an array.")}function Jr(e,t,r){y(t.isDragging(),"Cannot call hover while not dragging."),y(!t.didDrop(),"Cannot call hover after drop.");for(let n=0;n<e.length;n++){let i=e[n];y(e.lastIndexOf(i)===n,"Expected targetIds to be unique in the passed array."),y(r.getTarget(i),"Expected targetIds to be registered.")}}function Qr(e,t,r){for(let n=e.length-1;n>=0;n--){let i=e[n];ve(t.getTargetType(i),r)||e.splice(n,1)}}function Zr(e,t,r){e.forEach(function(n){r.getTarget(n).hover(t,n)})}function en(e){return function(){if(e.getMonitor().isDragging())return{type:pe}}}function tn(e){return{beginDrag:Ar(e),publishDragSource:en(e),hover:$r(e),drop:zr(e),endDrag:Yr(e)}}var rn=class{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){let e=this,{dispatch:t}=this.store;function r(i){return(...s)=>{let o=i.apply(e,s);o!==void 0&&t(o)}}let n=tn(this);return Object.keys(n).reduce((i,s)=>{let o=n[s];return i[s]=r(o),i},{})}dispatch(e){this.store.dispatch(e)}constructor(e,t){this.isSetUp=!1,this.handleRefCountChange=()=>{let r=this.store.getState().refCount>0;this.backend&&(r&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!r&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=t,e.subscribe(this.handleRefCountChange)}};function nn(e,t){return{x:e.x+t.x,y:e.y+t.y}}function Ze(e,t){return{x:e.x-t.x,y:e.y-t.y}}function sn(e){let{clientOffset:t,initialClientOffset:r,initialSourceClientOffset:n}=e;return!t||!r||!n?null:Ze(nn(t,n),r)}function on(e){let{clientOffset:t,initialClientOffset:r}=e;return!t||!r?null:Ze(t,r)}const K=[],me=[];K.__IS_NONE__=!0,me.__IS_ALL__=!0;function an(e,t){return e===K?!1:e===me||t===void 0?!0:_r(t,e).length>0}var ln=class{subscribeToStateChange(e,t={}){let{handlerIds:r}=t;y(typeof e=="function","listener must be a function."),y(r===void 0||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let n=this.store.getState().stateId;return this.store.subscribe(()=>{let i=this.store.getState(),s=i.stateId;try{s===n||s===n+1&&!an(i.dirtyHandlerIds,r)||e()}finally{n=s}})}subscribeToOffsetChange(e){y(typeof e=="function","listener must be a function.");let t=this.store.getState().dragOffset;return this.store.subscribe(()=>{let r=this.store.getState().dragOffset;r!==t&&(t=r,e())})}canDragSource(e){if(!e)return!1;let t=this.registry.getSource(e);return y(t,`Expected to find a valid source. sourceId=${e}`),this.isDragging()?!1:t.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;let t=this.registry.getTarget(e);return y(t,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop()?!1:ve(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;let t=this.registry.getSource(e,!0);return y(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic()||this.registry.getSourceType(e)!==this.getItemType()?!1:t.isDragging(this,e)}isOverTarget(e,t={shallow:!1}){if(!e)return!1;let{shallow:r}=t;if(!this.isDragging())return!1;let n=this.registry.getTargetType(e),i=this.getItemType();if(i&&!ve(n,i))return!1;let s=this.getTargetIds();if(!s.length)return!1;let o=s.indexOf(e);return r?o===s.length-1:o>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return sn(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return on(this.store.getState().dragOffset)}constructor(e,t){this.store=e,this.registry=t}},et=typeof global<"u"?global:self,tt=et.MutationObserver||et.WebKitMutationObserver;function rt(e){return function(){let t=setTimeout(n,0),r=setInterval(n,50);function n(){clearTimeout(t),clearInterval(r),e()}}}function dn(e){let t=1,r=new tt(e),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){t=-t,n.data=t}}const cn=typeof tt=="function"?dn:rt;var un=class{enqueueTask(e){let{queue:t,requestFlush:r}=this;t.length||(r(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{let{queue:e}=this;for(;this.index<e.length;){let t=this.index;if(this.index++,e[t].call(),this.index>this.capacity){for(let r=0,n=e.length-this.index;r<n;r++)e[r]=e[r+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=cn(this.flush),this.requestErrorThrow=rt(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}},hn=class{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}},fn=class{create(e){let t=this.freeTasks,r=t.length?t.pop():new hn(this.onError,n=>t[t.length]=n);return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}},nt=new un,gn=new fn(nt.registerPendingError);function pn(e){nt.enqueueTask(gn.create(e))}const ye="dnd-core/ADD_SOURCE",Oe="dnd-core/ADD_TARGET",Ie="dnd-core/REMOVE_SOURCE",te="dnd-core/REMOVE_TARGET";function vn(e){return{type:ye,payload:{sourceId:e}}}function mn(e){return{type:Oe,payload:{targetId:e}}}function yn(e){return{type:Ie,payload:{sourceId:e}}}function On(e){return{type:te,payload:{targetId:e}}}function In(e){y(typeof e.canDrag=="function","Expected canDrag to be a function."),y(typeof e.beginDrag=="function","Expected beginDrag to be a function."),y(typeof e.endDrag=="function","Expected endDrag to be a function.")}function bn(e){y(typeof e.canDrop=="function","Expected canDrop to be a function."),y(typeof e.hover=="function","Expected hover to be a function."),y(typeof e.drop=="function","Expected beginDrag to be a function.")}function be(e,t){if(t&&Array.isArray(e)){e.forEach(r=>be(r,!1));return}y(typeof e=="string"||typeof e=="symbol",t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var P;(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(P||(P={}));var Sn=0;function Dn(){return Sn++}function Tn(e){let t=Dn().toString();switch(e){case P.SOURCE:return`S${t}`;case P.TARGET:return`T${t}`;default:throw Error(`Unknown Handler Role: ${e}`)}}function it(e){switch(e[0]){case"S":return P.SOURCE;case"T":return P.TARGET;default:throw Error(`Cannot parse handler ID: ${e}`)}}function st(e,t){let r=e.entries(),n=!1;do{let{done:i,value:[,s]}=r.next();if(s===t)return!0;n=!!i}while(!n);return!1}var En=class{addSource(e,t){be(e),In(t);let r=this.addHandler(P.SOURCE,e,t);return this.store.dispatch(vn(r)),r}addTarget(e,t){be(e,!0),bn(t);let r=this.addHandler(P.TARGET,e,t);return this.store.dispatch(mn(r)),r}containsHandler(e){return st(this.dragSources,e)||st(this.dropTargets,e)}getSource(e,t=!1){return y(this.isSourceId(e),"Expected a valid source ID."),t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return y(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return y(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return y(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return it(e)===P.SOURCE}isTargetId(e){return it(e)===P.TARGET}removeSource(e){y(this.getSource(e),"Expected an existing source."),this.store.dispatch(yn(e)),pn(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){y(this.getTarget(e),"Expected an existing target."),this.store.dispatch(On(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){let t=this.getSource(e);y(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}unpinSource(){y(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,t,r){let n=Tn(e);return this.types.set(n,t),e===P.SOURCE?this.dragSources.set(n,r):e===P.TARGET&&this.dropTargets.set(n,r),n}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}};const wn=(e,t)=>e===t;function xn(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function Cn(e,t,r=wn){if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(!r(e[n],t[n]))return!1;return!0}function Nn(e=K,t){switch(t.type){case Q:break;case ye:case Oe:case te:case Ie:return K;case J:case pe:case ee:case Z:default:return me}let{targetIds:r=[],prevTargetIds:n=[]}=t.payload,i=jr(r,n);if(!(i.length>0||!Cn(r,n)))return K;let s=n[n.length-1],o=r[r.length-1];return s!==o&&(s&&i.push(s),o&&i.push(o)),i}function Rn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Pn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]==null?{}:arguments[t],n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){Rn(e,i,r[i])})}return e}var ot={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function jn(e=ot,t){let{payload:r}=t;switch(t.type){case ge:case J:return{initialSourceClientOffset:r.sourceClientOffset,initialClientOffset:r.clientOffset,clientOffset:r.clientOffset};case Q:return xn(e.clientOffset,r.clientOffset)?e:Pn({},e,{clientOffset:r.clientOffset});case ee:case Z:return ot;default:return e}}function _n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function U(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]==null?{}:arguments[t],n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){_n(e,i,r[i])})}return e}var Mn={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function An(e=Mn,t){let{payload:r}=t;switch(t.type){case J:return U({},e,{itemType:r.itemType,item:r.item,sourceId:r.sourceId,isSourcePublic:r.isSourcePublic,dropResult:null,didDrop:!1});case pe:return U({},e,{isSourcePublic:!0});case Q:return U({},e,{targetIds:r.targetIds});case te:return e.targetIds.indexOf(r.targetId)===-1?e:U({},e,{targetIds:Pr(e.targetIds,r.targetId)});case Z:return U({},e,{dropResult:r.dropResult,didDrop:!0,targetIds:[]});case ee:return U({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function Ln(e=0,t){switch(t.type){case ye:case Oe:return e+1;case Ie:case te:return e-1;default:return e}}function kn(e=0){return e+1}function Hn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]==null?{}:arguments[t],n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){Hn(e,i,r[i])})}return e}function Un(e={},t){return{dirtyHandlerIds:Nn(e.dirtyHandlerIds,{type:t.type,payload:Fn({},t.payload,{prevTargetIds:Rr(e,"dragOperation.targetIds",[])})}),dragOffset:jn(e.dragOffset,t),refCount:Ln(e.refCount,t),dragOperation:An(e.dragOperation,t),stateId:kn(e.stateId)}}function Bn(e,t=void 0,r={},n=!1){let i=zn(n),s=new rn(i,new ln(i,new En(i))),o=e(s,t,r);return s.receiveBackend(o),s}function zn(e){let t=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return Xe(Un,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}var m=ue(br(),1);function Wn(e,t){if(e==null)return{};var r=Gn(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Gn(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,s;for(s=0;s<n.length;s++)i=n[s],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}var at=0,re=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__"),lt=(0,f.memo)(function(e){var{children:t}=e;let[r,n]=Vn(Wn(e,["children"]));return(0,f.useEffect)(()=>{if(n){let i=dt();return++at,()=>{--at===0&&(i[re]=null)}}},[]),(0,m.jsx)(Ye.Provider,{value:r,children:t})});function Vn(e){return"manager"in e?[{dragDropManager:e.manager},!1]:[Kn(e.backend,e.context,e.options,e.debugMode),!e.context]}function Kn(e,t=dt(),r,n){let i=t;return i[re]||(i[re]={dragDropManager:Bn(e,t,r,n)}),i[re]}function dt(){return typeof global<"u"?global:window}const k=typeof window<"u"?f.useLayoutEffect:f.useEffect;var Yn=ue(xr(),1);function ct(e,t,r){let[n,i]=(0,f.useState)(()=>t(e)),s=(0,f.useCallback)(()=>{let o=t(e);(0,Yn.default)(n,o)||(i(o),r&&r())},[n,e,r]);return k(s),[n,s]}function qn(e,t,r){let[n,i]=ct(e,t,r);return k(function(){let s=e.getHandlerId();if(s!=null)return e.subscribeToStateChange(i,{handlerIds:[s]})},[e,i]),n}function ut(e,t,r){return qn(t,e||(()=>({})),()=>r.reconnect())}function ht(e,t){let r=[...t||[]];return t==null&&typeof e!="function"&&r.push(e),(0,f.useMemo)(()=>typeof e=="function"?e():e,r)}function $n(e){return(0,f.useMemo)(()=>e.hooks.dragSource(),[e])}function Xn(e){return(0,f.useMemo)(()=>e.hooks.dragPreview(),[e])}var Se=!1,De=!1,Jn=class{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){y(!Se,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Se=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Se=!1}}isDragging(){if(!this.sourceId)return!1;y(!De,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return De=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{De=!1}}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,t){return this.internalMonitor.isOverTarget(e,t)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}},Te=!1,Qn=class{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}canDrop(){if(!this.targetId)return!1;y(!Te,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return Te=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Te=!1}}isOver(e){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,e):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}};function Zn(e,t,r){let n=r.getRegistry(),i=n.addTarget(e,t);return[i,()=>n.removeTarget(i)]}function ei(e,t,r){let n=r.getRegistry(),i=n.addSource(e,t);return[i,()=>n.removeSource(i)]}function Ee(e,t,r,n){let i=r?r.call(n,e,t):void 0;if(i!==void 0)return!!i;if(e===t)return!0;if(typeof e!="object"||!e||typeof t!="object"||!t)return!1;let s=Object.keys(e),o=Object.keys(t);if(s.length!==o.length)return!1;let a=Object.prototype.hasOwnProperty.bind(t);for(let d=0;d<s.length;d++){let h=s[d];if(!a(h))return!1;let p=e[h],b=t[h];if(i=r?r.call(n,p,b,h):void 0,i===!1||i===void 0&&p!==b)return!1}return!0}function we(e){return typeof e=="object"&&!!e&&Object.prototype.hasOwnProperty.call(e,"current")}function ti(e){if(typeof e.type=="string")return;let t=e.type.displayName||e.type.name||"the component";throw Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${t} into a <div>, or turn it into a drag source or a drop target itself.`)}function ri(e){return(t=null,r=null)=>{if(!(0,f.isValidElement)(t)){let i=t;return e(i,r),i}let n=t;return ti(n),ni(n,r?i=>e(i,r):e)}}function ft(e){let t={};return Object.keys(e).forEach(r=>{let n=e[r];if(r.endsWith("Ref"))t[r]=e[r];else{let i=ri(n);t[r]=()=>i}}),t}function gt(e,t){typeof e=="function"?e(t):e.current=t}function ni(e,t){let r=e.ref;return y(typeof r!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),r?(0,f.cloneElement)(e,{ref:n=>{gt(r,n),gt(t,n)}}):(0,f.cloneElement)(e,{ref:t})}var ii=class{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){let e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){let e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return t&&this.disconnectDragSource(),this.handlerId?e?(t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),t):(this.lastConnectedDragSource=e,t):t}reconnectDragPreview(e=!1){let t=this.dragPreview,r=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),this.handlerId){if(!t){this.lastConnectedDragPreview=t;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=t,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,t,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!Ee(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!Ee(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe=(this.dragSourceUnsubscribe(),void 0))}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=ft({dragSource:(t,r)=>{this.clearDragSource(),this.dragSourceOptions=r||null,we(t)?this.dragSourceRef=t:this.dragSourceNode=t,this.reconnectDragSource()},dragPreview:(t,r)=>{this.clearDragPreview(),this.dragPreviewOptions=r||null,we(t)?this.dragPreviewRef=t:this.dragPreviewNode=t,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}},si=class{get connectTarget(){return this.dropTarget}reconnect(){let e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();let t=this.dropTarget;if(this.handlerId){if(!t){this.lastConnectedDropTarget=t;return}e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions))}}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!Ee(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget=(this.unsubscribeDropTarget(),void 0))}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=ft({dropTarget:(t,r)=>{this.clearDropTarget(),this.dropTargetOptions=r,we(t)?this.dropTargetRef=t:this.dropTargetNode=t,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}};function A(){let{dragDropManager:e}=(0,f.useContext)(Ye);return y(e!=null,"Expected drag drop context"),e}function oi(e,t){let r=A(),n=(0,f.useMemo)(()=>new ii(r.getBackend()),[r]);return k(()=>(n.dragSourceOptions=e||null,n.reconnect(),()=>n.disconnectDragSource()),[n,e]),k(()=>(n.dragPreviewOptions=t||null,n.reconnect(),()=>n.disconnectDragPreview()),[n,t]),n}function ai(){let e=A();return(0,f.useMemo)(()=>new Jn(e),[e])}var li=class{beginDrag(){let e=this.spec,t=this.monitor,r=null;return r=typeof e.item=="object"?e.item:typeof e.item=="function"?e.item(t):{},r??null}canDrag(){let e=this.spec,t=this.monitor;return typeof e.canDrag=="boolean"?e.canDrag:typeof e.canDrag=="function"?e.canDrag(t):!0}isDragging(e,t){let r=this.spec,n=this.monitor,{isDragging:i}=r;return i?i(n):t===e.getSourceId()}endDrag(){let e=this.spec,t=this.monitor,r=this.connector,{end:n}=e;n&&n(t.getItem(),t),r.reconnect()}constructor(e,t,r){this.spec=e,this.monitor=t,this.connector=r}};function di(e,t,r){let n=(0,f.useMemo)(()=>new li(e,t,r),[t,r]);return(0,f.useEffect)(()=>{n.spec=e},[e]),n}function ci(e){return(0,f.useMemo)(()=>{let t=e.type;return y(t!=null,"spec.type must be defined"),t},[e])}function ui(e,t,r){let n=A(),i=di(e,t,r),s=ci(e);k(function(){if(s!=null){let[o,a]=ei(s,i,n);return t.receiveHandlerId(o),r.receiveHandlerId(o),a}},[n,t,r,i,s])}function hi(e,t){let r=ht(e,t);y(!r.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");let n=ai(),i=oi(r.options,r.previewOptions);return ui(r,n,i),[ut(r.collect,n,i),$n(i),Xn(i)]}function fi(e){let t=A().getMonitor(),[r,n]=ct(t,e);return(0,f.useEffect)(()=>t.subscribeToOffsetChange(n)),(0,f.useEffect)(()=>t.subscribeToStateChange(n)),r}function gi(e){return(0,f.useMemo)(()=>e.hooks.dropTarget(),[e])}function pi(e){let t=A(),r=(0,f.useMemo)(()=>new si(t.getBackend()),[t]);return k(()=>(r.dropTargetOptions=e||null,r.reconnect(),()=>r.disconnectDropTarget()),[e]),r}function vi(){let e=A();return(0,f.useMemo)(()=>new Qn(e),[e])}function mi(e){let{accept:t}=e;return(0,f.useMemo)(()=>(y(e.accept!=null,"accept must be defined"),Array.isArray(t)?t:[t]),[t])}var yi=class{canDrop(){let e=this.spec,t=this.monitor;return e.canDrop?e.canDrop(t.getItem(),t):!0}hover(){let e=this.spec,t=this.monitor;e.hover&&e.hover(t.getItem(),t)}drop(){let e=this.spec,t=this.monitor;if(e.drop)return e.drop(t.getItem(),t)}constructor(e,t){this.spec=e,this.monitor=t}};function Oi(e,t){let r=(0,f.useMemo)(()=>new yi(e,t),[t]);return(0,f.useEffect)(()=>{r.spec=e},[e]),r}function Ii(e,t,r){let n=A(),i=Oi(e,t),s=mi(e);k(function(){let[o,a]=Zn(s,i,n);return t.receiveHandlerId(o),r.receiveHandlerId(o),a},[n,t,i,r,s.map(o=>o.toString()).join("|")])}function pt(e,t){let r=ht(e,t),n=vi(),i=pi(r.options);return Ii(r,n,i),[ut(r.collect,n,i),gi(i)]}function vt(e){let t=null;return()=>(t??(t=e()),t)}function bi(e,t){return e.filter(r=>r!==t)}function Si(e,t){let r=new Set,n=s=>r.add(s);e.forEach(n),t.forEach(n);let i=[];return r.forEach(s=>i.push(s)),i}var Di=class{enter(e){let t=this.entered.length;return this.entered=Si(this.entered.filter(r=>this.isNodeInDocument(r)&&(!r.contains||r.contains(e))),[e]),t===0&&this.entered.length>0}leave(e){let t=this.entered.length;return this.entered=bi(this.entered.filter(this.isNodeInDocument),e),t>0&&this.entered.length===0}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}},Ti=class{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null}})})}loadDataTransfer(e){if(e){let t={};Object.keys(this.config.exposeProperties).forEach(r=>{let n=this.config.exposeProperties[r];n!=null&&(t[r]={value:n(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,t)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,t){return t===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}},mt=Ve({FILE:()=>yt,HTML:()=>bt,TEXT:()=>It,URL:()=>Ot},1);const yt="__NATIVE_FILE__",Ot="__NATIVE_URL__",It="__NATIVE_TEXT__",bt="__NATIVE_HTML__";function xe(e,t,r){return t.reduce((n,i)=>n||e.getData(i),"")??r}const Ce={[yt]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[bt]:{exposeProperties:{html:(e,t)=>xe(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[Ot]:{exposeProperties:{urls:(e,t)=>xe(e,t,"").split(`
|
|
2
2
|
`),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[It]:{exposeProperties:{text:(e,t)=>xe(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function Ei(e,t){let r=Ce[e];if(!r)throw Error(`native type ${e} has no configuration`);let n=new Ti(r);return n.loadDataTransfer(t),n}function Ne(e){if(!e)return null;let t=Array.prototype.slice.call(e.types||[]);return Object.keys(Ce).filter(r=>{let n=Ce[r];return n!=null&&n.matchesTypes?n.matchesTypes.some(i=>t.indexOf(i)>-1):!1})[0]||null}const wi=vt(()=>/firefox/i.test(navigator.userAgent)),St=vt(()=>!!window.safari);var Dt=class{interpolate(e){let{xs:t,ys:r,c1s:n,c2s:i,c3s:s}=this,o=t.length-1;if(e===t[o])return r[o];let a=0,d=s.length-1,h;for(;a<=d;){h=Math.floor(.5*(a+d));let I=t[h];if(I<e)a=h+1;else if(I>e)d=h-1;else return r[h]}o=Math.max(0,d);let p=e-t[o],b=p*p;return r[o]+n[o]*p+i[o]*b+s[o]*p*b}constructor(e,t){let{length:r}=e,n=[];for(let v=0;v<r;v++)n.push(v);n.sort((v,c)=>e[v]<e[c]?-1:1);let i=[],s=[],o=[],a,d;for(let v=0;v<r-1;v++)a=e[v+1]-e[v],d=t[v+1]-t[v],s.push(a),i.push(d),o.push(d/a);let h=[o[0]];for(let v=0;v<s.length-1;v++){let c=o[v],l=o[v+1];if(c*l<=0)h.push(0);else{a=s[v];let u=s[v+1],g=a+u;h.push(3*g/((g+u)/c+(g+a)/l))}}h.push(o[o.length-1]);let p=[],b=[],I;for(let v=0;v<h.length-1;v++){I=o[v];let c=h[v],l=1/s[v],u=c+h[v+1]-I-I;p.push((I-c-u)*l),b.push(u*l*l)}this.xs=e,this.ys=t,this.c1s=h,this.c2s=p,this.c3s=b}},xi=1;function Tt(e){let t=e.nodeType===xi?e:e.parentElement;if(!t)return null;let{top:r,left:n}=t.getBoundingClientRect();return{x:n,y:r}}function ne(e){return{x:e.clientX,y:e.clientY}}function Ci(e){var t;return e.nodeName==="IMG"&&(wi()||!((t=document.documentElement)!=null&&t.contains(e)))}function Ni(e,t,r,n){let i=e?t.width:r,s=e?t.height:n;return St()&&e&&(s/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:s}}function Ri(e,t,r,n,i){let s=Ci(t),o=Tt(s?e:t),a={x:r.x-o.x,y:r.y-o.y},{offsetWidth:d,offsetHeight:h}=e,{anchorX:p,anchorY:b}=n,{dragPreviewWidth:I,dragPreviewHeight:v}=Ni(s,t,d,h),c=()=>{let D=new Dt([0,.5,1],[a.y,a.y/h*v,a.y+v-h]).interpolate(b);return St()&&s&&(D+=(window.devicePixelRatio-1)*v),D},l=()=>new Dt([0,.5,1],[a.x,a.x/d*I,a.x+I-d]).interpolate(p),{offsetX:u,offsetY:g}=i,O=u===0||u,S=g===0||g;return{x:O?u:l(),y:S?g:c()}}var Pi=class{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var e;if((e=this.globalContext)!=null&&e.document)return this.globalContext.document;if(this.window)return this.window.document}get rootElement(){var e;return((e=this.optionsArgs)==null?void 0:e.rootElement)||this.window}constructor(e,t){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=t}};function ji(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Et(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]==null?{}:arguments[t],n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){ji(e,i,r[i])})}return e}var _i=class{profile(){var e,t;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((e=this.dragStartSourceIds)==null?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((t=this.dragOverTargetIds)==null?void 0:t.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){let e=this.rootElement;if(e!==void 0){if(e.__isReactDndBackendSetUp)throw Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){let e=this.rootElement;if(e!==void 0&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var t;(t=this.window)==null||t.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(e,t,r){return this.sourcePreviewNodeOptions.set(e,r),this.sourcePreviewNodes.set(e,t),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,t,r){this.sourceNodes.set(e,t),this.sourceNodeOptions.set(e,r);let n=s=>this.handleDragStart(s,e),i=s=>this.handleSelectStart(s);return t.setAttribute("draggable","true"),t.addEventListener("dragstart",n),t.addEventListener("selectstart",i),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),t.removeEventListener("dragstart",n),t.removeEventListener("selectstart",i),t.setAttribute("draggable","false")}}connectDropTarget(e,t){let r=s=>this.handleDragEnter(s,e),n=s=>this.handleDragOver(s,e),i=s=>this.handleDrop(s,e);return t.addEventListener("dragenter",r),t.addEventListener("dragover",n),t.addEventListener("drop",i),()=>{t.removeEventListener("dragenter",r),t.removeEventListener("dragover",n),t.removeEventListener("drop",i)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){let e=this.monitor.getSourceId(),t=this.sourceNodeOptions.get(e);return Et({dropEffect:this.altKeyPressed?"copy":"move"},t||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){let e=this.monitor.getSourceId();return Et({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(e)||{})}isDraggingNativeItem(){let e=this.monitor.getItemType();return Object.keys(mt).some(t=>mt[t]===e)}beginDragNativeItem(e,t){this.clearCurrentDragSourceNode(),this.currentNativeSource=Ei(e,t),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e,this.mouseMoveTimeoutTimer=setTimeout(()=>{var t;return(t=this.rootElement)==null?void 0:t.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},1e3)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var e;(e=this.window)==null||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,t){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(t))}handleDragEnter(e,t){this.dragEnterTargetIds.unshift(t)}handleDragOver(e,t){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(t)}handleDrop(e,t){this.dropTargetIds.unshift(t)}constructor(e,t,r){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=n=>{let i=this.sourceNodes.get(n);return i&&Tt(i)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=n=>!!(n&&this.document&&this.document.body&&this.document.body.contains(n)),this.endDragIfSourceWasRemovedFromDOM=()=>{let n=this.currentDragSourceNode;n==null||this.isNodeInDocument(n)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=n=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(n||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=n=>{if(n.defaultPrevented)return;let{dragStartSourceIds:i}=this;this.dragStartSourceIds=null;let s=ne(n);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(i||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:s});let{dataTransfer:o}=n,a=Ne(o);if(this.monitor.isDragging()){if(o&&typeof o.setDragImage=="function"){let h=this.monitor.getSourceId(),p=this.sourceNodes.get(h),b=this.sourcePreviewNodes.get(h)||p;if(b){let{anchorX:I,anchorY:v,offsetX:c,offsetY:l}=this.getCurrentSourcePreviewNodeOptions(),u=Ri(p,b,s,{anchorX:I,anchorY:v},{offsetX:c,offsetY:l});o.setDragImage(b,u.x,u.y)}}try{o==null||o.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(n.target);let{captureDraggingState:d}=this.getCurrentSourcePreviewNodeOptions();d?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(a)this.beginDragNativeItem(a);else{if(o&&!o.types&&(n.target&&!n.target.hasAttribute||!n.target.hasAttribute("draggable")))return;n.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=n=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var i;(i=this.currentNativeSource)==null||i.loadDataTransfer(n.dataTransfer)}if(!this.enterLeaveCounter.enter(n.target)||this.monitor.isDragging())return;let{dataTransfer:s}=n,o=Ne(s);o&&this.beginDragNativeItem(o,s)},this.handleTopDragEnter=n=>{let{dragEnterTargetIds:i}=this;this.dragEnterTargetIds=[],this.monitor.isDragging()&&(this.altKeyPressed=n.altKey,i.length>0&&this.actions.hover(i,{clientOffset:ne(n)}),i.some(s=>this.monitor.canDropOnTarget(s))&&(n.preventDefault(),n.dataTransfer&&(n.dataTransfer.dropEffect=this.getCurrentDropEffect())))},this.handleTopDragOverCapture=n=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var i;(i=this.currentNativeSource)==null||i.loadDataTransfer(n.dataTransfer)}},this.handleTopDragOver=n=>{let{dragOverTargetIds:i}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){n.preventDefault(),n.dataTransfer&&(n.dataTransfer.dropEffect="none");return}this.altKeyPressed=n.altKey,this.lastClientOffset=ne(n),this.scheduleHover(i),(i||[]).some(s=>this.monitor.canDropOnTarget(s))?(n.preventDefault(),n.dataTransfer&&(n.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?n.preventDefault():(n.preventDefault(),n.dataTransfer&&(n.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=n=>{this.isDraggingNativeItem()&&n.preventDefault(),this.enterLeaveCounter.leave(n.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=n=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var i;n.preventDefault(),(i=this.currentNativeSource)==null||i.loadDataTransfer(n.dataTransfer)}else Ne(n.dataTransfer)&&n.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=n=>{let{dropTargetIds:i}=this;this.dropTargetIds=[],this.actions.hover(i,{clientOffset:ne(n)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=n=>{let i=n.target;typeof i.dragDrop=="function"&&(i.tagName==="INPUT"||i.tagName==="SELECT"||i.tagName==="TEXTAREA"||i.isContentEditable||(n.preventDefault(),i.dragDrop()))},this.options=new Pi(t,r),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new Di(this.isNodeInDocument)}},ie;function Mi(){return ie||(ie=new Image,ie.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),ie}const wt=function(e,t,r){return new _i(e,t,r)},xt=(0,f.createContext)(null);function N(){let e=(0,f.useContext)(xt);if(e===null)throw Error("No Tree Api Provided");return e}const Ct=(0,f.createContext)(null);function Ai(){let e=(0,f.useContext)(Ct);if(e===null)throw Error("Provide a NodesContext");return e}const Nt=(0,f.createContext)(null);function Li(){let e=(0,f.useContext)(Nt);if(e===null)throw Error("Provide a DnDContext");return e}const Rt=(0,f.createContext)(0);function Pt(){(0,f.useContext)(Rt)}var ki=Ve({access:()=>Y,bound:()=>se,dfs:()=>Re,focusNextElement:()=>kt,focusPrevElement:()=>Ht,getInsertIndex:()=>Wt,getInsertParentId:()=>Gt,identify:()=>H,identifyNull:()=>Ut,indexOf:()=>Lt,isClosed:()=>_t,isDescendant:()=>At,isItem:()=>jt,isOpenWithEmptyChildren:()=>Mt,mergeRefs:()=>Bi,noop:()=>Hi,safeRun:()=>Bt,waitFor:()=>zt,walk:()=>oe},1);function se(e,t,r){return Math.max(Math.min(e,r),t)}function jt(e){return e&&e.isLeaf}function _t(e){return e&&e.isInternal&&!e.isOpen}function Mt(e){var t;return e&&e.isOpen&&!((t=e.children)!=null&&t.length)}const At=(e,t)=>{let r=e;for(;r;){if(r.id===t.id)return!0;r=r.parent}return!1},Lt=e=>{if(!e.parent)throw Error("Node does not have a parent");return e.parent.children.findIndex(t=>t.id===e.id)};function Hi(){}function Re(e,t){if(!e)return null;if(e.id===t)return e;if(e.children)for(let r of e.children){let n=Re(r,t);if(n)return n}return null}function oe(e,t){if(t(e),e.children)for(let r of e.children)oe(r,t)}function kt(e){let t=Ft(e),r;for(let n=0;n<t.length;++n)if(t[n]===e){r=Fi(t,n);break}r==null||r.focus()}function Ht(e){let t=Ft(e),r;for(let n=0;n<t.length;++n)if(t[n]===e){r=Ui(t,n);break}r==null||r.focus()}function Fi(e,t){return t+1<e.length?e[t+1]:e[0]}function Ui(e,t){return t-1>=0?e[t-1]:e[e.length-1]}function Ft(e){return Array.from(document.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]):not([disabled]), details:not([disabled]), summary:not(:disabled)')).filter(t=>t===e||!e.contains(t))}function Y(e,t){return typeof t=="boolean"?t:typeof t=="string"?e[t]:t(e)}function Ut(e){return e===null?null:H(e)}function H(e){return typeof e=="string"?e:e.id}function Bi(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}function Bt(e,...t){if(e)return e(...t)}function zt(e){return new Promise((t,r)=>{let n=0;function i(){n+=1,n===100&&r(),e()?t():setTimeout(i,10)}i()})}function Wt(e){var r;let t=e.focusedNode;return t?t.isOpen?0:t.parent?t.childIndex+1:0:((r=e.root.children)==null?void 0:r.length)??0}function Gt(e){let t=e.focusedNode;return t?t.isOpen?t.id:t.parent&&!t.parent.isRoot?t.parent.id:null:null}var zi={display:"flex",alignItems:"center",zIndex:1},Wi={flex:1,height:"2px",background:"#4B91E2",borderRadius:"1px"},Gi={width:"4px",height:"4px",boxShadow:"0 0 0 3px #4B91E2",borderRadius:"50%"};const Vi=f.memo(function({top:e,left:t,indent:r}){let n={position:"absolute",pointerEvents:"none",top:e-2+"px",left:t+"px",right:r+"px"};return(0,m.jsxs)("div",{style:Object.assign(Object.assign({},zi),n),children:[(0,m.jsx)("div",{style:Object.assign({},Gi)}),(0,m.jsx)("div",{style:Object.assign({},Wi)})]})});function Ki({node:e,attrs:t,innerRef:r,children:n}){return(0,m.jsx)("div",Object.assign({},t,{ref:r,onFocus:i=>i.stopPropagation(),onClick:e.handleClick,children:n}))}function Yi(e){return(0,m.jsxs)("div",{ref:e.dragHandle,style:e.style,children:[(0,m.jsx)("span",{onClick:t=>{t.stopPropagation(),e.node.toggle()},children:e.node.isLeaf?"\u{1F333}":e.node.isOpen?"\u{1F5C1}":"\u{1F5C0}"})," ",e.node.isEditing?(0,m.jsx)($i,Object.assign({},e)):(0,m.jsx)(qi,Object.assign({},e))]})}function qi(e){return(0,m.jsx)(m.Fragment,{children:(0,m.jsx)("span",{children:e.node.data.name})})}function $i({node:e}){let t=(0,f.useRef)();return(0,f.useEffect)(()=>{var r,n;(r=t.current)==null||r.focus(),(n=t.current)==null||n.select()},[]),(0,m.jsx)("input",{ref:t,defaultValue:e.data.name,onBlur:()=>e.reset(),onKeyDown:r=>{var n;r.key==="Escape"&&e.reset(),r.key==="Enter"&&e.submit(((n=t.current)==null?void 0:n.value)||"")}})}function Pe(e){return{type:"EDIT",id:e}}function Xi(e={id:null},t){return t.type==="EDIT"?Object.assign(Object.assign({},e),{id:t.id}):e}function B(e){return{type:"FOCUS",id:e}}function Ji(){return{type:"TREE_BLUR"}}function Qi(e={id:null,treeFocused:!1},t){return t.type==="FOCUS"?Object.assign(Object.assign({},e),{id:t.id,treeFocused:!0}):t.type==="TREE_BLUR"?Object.assign(Object.assign({},e),{treeFocused:!1}):e}var Vt=class ur{constructor(t){this.handleClick=r=>{r.metaKey&&!this.tree.props.disableMultiSelection?this.isSelected?this.deselect():this.selectMulti():r.shiftKey&&!this.tree.props.disableMultiSelection?this.selectContiguous():(this.select(),this.activate())},this.tree=t.tree,this.id=t.id,this.data=t.data,this.level=t.level,this.children=t.children,this.parent=t.parent,this.isDraggable=t.isDraggable,this.rowIndex=t.rowIndex}get isRoot(){return this.id===je}get isLeaf(){return!Array.isArray(this.children)}get isInternal(){return!this.isLeaf}get isOpen(){return this.isLeaf?!1:this.tree.isOpen(this.id)}get isClosed(){return this.isLeaf?!1:!this.tree.isOpen(this.id)}get isEditable(){return this.tree.isEditable(this.data)}get isEditing(){return this.tree.editingId===this.id}get isSelected(){return this.tree.isSelected(this.id)}get isOnlySelection(){return this.isSelected&&this.tree.hasOneSelection}get isSelectedStart(){var t;return this.isSelected&&!((t=this.prev)!=null&&t.isSelected)}get isSelectedEnd(){var t;return this.isSelected&&!((t=this.next)!=null&&t.isSelected)}get isFocused(){return this.tree.isFocused(this.id)}get isDragging(){return this.tree.isDragging(this.id)}get willReceiveDrop(){return this.tree.willReceiveDrop(this.id)}get state(){return{isClosed:this.isClosed,isDragging:this.isDragging,isEditing:this.isEditing,isFocused:this.isFocused,isInternal:this.isInternal,isLeaf:this.isLeaf,isOpen:this.isOpen,isSelected:this.isSelected,isSelectedEnd:this.isSelectedEnd,isSelectedStart:this.isSelectedStart,willReceiveDrop:this.willReceiveDrop}}get childIndex(){return this.parent&&this.parent.children?this.parent.children.findIndex(t=>t.id===this.id):-1}get next(){return this.rowIndex===null?null:this.tree.at(this.rowIndex+1)}get prev(){return this.rowIndex===null?null:this.tree.at(this.rowIndex-1)}get nextSibling(){var r;let t=this.childIndex;return((r=this.parent)==null?void 0:r.children[t+1])??null}isAncestorOf(t){if(!t)return!1;let r=t;for(;r;){if(r.id===this.id)return!0;r=r.parent}return!1}select(){this.tree.select(this)}deselect(){this.tree.deselect(this)}selectMulti(){this.tree.selectMulti(this)}selectContiguous(){this.tree.selectContiguous(this)}activate(){this.tree.activate(this)}focus(){this.tree.focus(this)}toggle(){this.tree.toggle(this)}open(){this.tree.open(this)}openParents(){this.tree.openParents(this)}close(){this.tree.close(this)}submit(t){this.tree.submit(this,t)}reset(){this.tree.reset()}clone(){return new ur(Object.assign({},this))}edit(){return this.tree.edit(this)}};const je="__REACT_ARBORIST_INTERNAL_ROOT__";function Kt(e){function t(n,i,s){let o=new Vt({tree:e,data:n,level:i,parent:s,id:e.accessId(n),children:null,isDraggable:e.isDraggable(n),rowIndex:null}),a=e.accessChildren(n);return a&&(o.children=a.map(d=>t(d,i+1,o))),o}let r=new Vt({tree:e,id:je,data:{id:je},level:-1,parent:null,children:null,isDraggable:!0,rowIndex:null});return r.children=(e.props.data??[]).map(n=>t(n,0,r)),r}const _e={open(e,t){return{type:"VISIBILITY_OPEN",id:e,filtered:t}},close(e,t){return{type:"VISIBILITY_CLOSE",id:e,filtered:t}},toggle(e,t){return{type:"VISIBILITY_TOGGLE",id:e,filtered:t}},clear(e){return{type:"VISIBILITY_CLEAR",filtered:e}}};function Yt(e={},t){if(t.type==="VISIBILITY_OPEN")return Object.assign(Object.assign({},e),{[t.id]:!0});if(t.type==="VISIBILITY_CLOSE")return Object.assign(Object.assign({},e),{[t.id]:!1});if(t.type==="VISIBILITY_TOGGLE"){let r=e[t.id];return Object.assign(Object.assign({},e),{[t.id]:!r})}else return t.type==="VISIBILITY_CLEAR"?{}:e}function Zi(e={filtered:{},unfiltered:{}},t){return t.type.startsWith("VISIBILITY")?t.filtered?Object.assign(Object.assign({},e),{filtered:Yt(e.filtered,t)}):Object.assign(Object.assign({},e),{unfiltered:Yt(e.unfiltered,t)}):e}const z=e=>({nodes:{open:{filtered:{},unfiltered:(e==null?void 0:e.initialOpenState)??{}},focus:{id:null,treeFocused:!1},edit:{id:null},drag:{id:null,selectedIds:[],destinationParentId:null,destinationIndex:null},selection:{ids:new Set,anchor:null,mostRecent:null}},dnd:{cursor:{type:"none"},dragId:null,dragIds:[],parentId:null,index:-1}}),j={clear:()=>({type:"SELECTION_CLEAR"}),only:e=>({type:"SELECTION_ONLY",id:H(e)}),add:e=>({type:"SELECTION_ADD",ids:(Array.isArray(e)?e:[e]).map(H)}),remove:e=>({type:"SELECTION_REMOVE",ids:(Array.isArray(e)?e:[e]).map(H)}),set:e=>Object.assign({type:"SELECTION_SET"},e),mostRecent:e=>({type:"SELECTION_MOST_RECENT",id:e===null?null:H(e)}),anchor:e=>({type:"SELECTION_ANCHOR",id:e===null?null:H(e)})};function es(e=z().nodes.selection,t){let r=e.ids;switch(t.type){case"SELECTION_CLEAR":return Object.assign(Object.assign({},e),{ids:new Set});case"SELECTION_ONLY":return Object.assign(Object.assign({},e),{ids:new Set([t.id])});case"SELECTION_ADD":return t.ids.length===0?e:(t.ids.forEach(n=>r.add(n)),Object.assign(Object.assign({},e),{ids:new Set(r)}));case"SELECTION_REMOVE":return t.ids.length===0?e:(t.ids.forEach(n=>r.delete(n)),Object.assign(Object.assign({},e),{ids:new Set(r)}));case"SELECTION_SET":return Object.assign(Object.assign({},e),{ids:t.ids,mostRecent:t.mostRecent,anchor:t.anchor});case"SELECTION_MOST_RECENT":return Object.assign(Object.assign({},e),{mostRecent:t.id});case"SELECTION_ANCHOR":return Object.assign(Object.assign({},e),{anchor:t.id});default:return e}}const W={cursor(e){return{type:"DND_CURSOR",cursor:e}},dragStart(e,t){return{type:"DND_DRAG_START",id:e,dragIds:t}},dragEnd(){return{type:"DND_DRAG_END"}},hovering(e,t){return{type:"DND_HOVERING",parentId:e,index:t}}};function ts(e=z().dnd,t){switch(t.type){case"DND_CURSOR":return Object.assign(Object.assign({},e),{cursor:t.cursor});case"DND_DRAG_START":return Object.assign(Object.assign({},e),{dragId:t.id,dragIds:t.dragIds});case"DND_DRAG_END":return z().dnd;case"DND_HOVERING":return Object.assign(Object.assign({},e),{parentId:t.parentId,index:t.index});default:return e}}var rs={position:"fixed",pointerEvents:"none",zIndex:100,left:0,top:0,width:"100%",height:"100%"},ns=e=>{if(!e)return{display:"none"};let{x:t,y:r}=e;return{transform:`translate(${t}px, ${r}px)`}},is=e=>{if(!e)return{display:"none"};let{x:t,y:r}=e;return{transform:`translate(${t+10}px, ${r+10}px)`}};function qt({offset:e,mouse:t,id:r,dragIds:n,isDragging:i}){return(0,m.jsxs)(ss,{isDragging:i,children:[(0,m.jsx)(os,{offset:e,children:(0,m.jsx)(ls,{id:r,dragIds:n})}),(0,m.jsx)(as,{mouse:t,count:n.length})]})}var ss=(0,f.memo)(function(e){return e.isDragging?(0,m.jsx)("div",{style:rs,children:e.children}):null});function os(e){return(0,m.jsx)("div",{className:"row preview",style:ns(e.offset),children:e.children})}function as(e){let{count:t,mouse:r}=e;return t>1?(0,m.jsx)("div",{className:"selected-count",style:is(r),children:t}):null}var ls=(0,f.memo)(function(e){let t=N(),r=t.get(e.id);return r?(0,m.jsx)(t.renderNode,{preview:!0,node:r,style:{paddingLeft:r.level*t.indent,opacity:.2,background:"transparent"},tree:t}):null}),$t=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function ds(e,t){return!!(e===t||$t(e)&&$t(t))}function cs(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(!ds(e[r],t[r]))return!1;return!0}function us(e,t){t===void 0&&(t=cs);var r,n=[],i,s=!1;function o(){var a=[...arguments];return s&&r===this&&t(a,n)||(i=e.apply(this,a),s=!0,r=this,n=a),i}return o}var Me=us,Xt=typeof performance=="object"&&typeof performance.now=="function"?function(){return performance.now()}:function(){return Date.now()};function Jt(e){cancelAnimationFrame(e.id)}function hs(e,t){var r=Xt();function n(){Xt()-r>=t?e.call(null):i.id=requestAnimationFrame(n)}var i={id:requestAnimationFrame(n)};return i}var Ae=-1;function Qt(e){if(e===void 0&&(e=!1),Ae===-1||e){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",document.body.appendChild(t),Ae=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return Ae}var q=null;function Zt(e){if(e===void 0&&(e=!1),q===null||e){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",r.direction="rtl";var n=document.createElement("div"),i=n.style;return i.width="100px",i.height="100px",t.appendChild(n),document.body.appendChild(t),t.scrollLeft>0?q="positive-descending":(t.scrollLeft=1,q=t.scrollLeft===0?"negative":"positive-ascending"),document.body.removeChild(t),q}return q}var fs=150,gs=function(e,t){return e};function ps(e){var t,r=e.getItemOffset,n=e.getEstimatedTotalSize,i=e.getItemSize,s=e.getOffsetForIndexAndAlignment,o=e.getStartIndexForOffset,a=e.getStopIndexForStartIndex,d=e.initInstanceProps,h=e.shouldResetStyleCacheOnItemSizeChange,p=e.validateProps;return t=(function(b){wr(I,b);function I(c){var l=b.call(this,c)||this;return l._instanceProps=d(l.props,Ke(l)),l._outerRef=void 0,l._resetIsScrollingTimeoutId=null,l.state={instance:Ke(l),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof l.props.initialScrollOffset=="number"?l.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},l._callOnItemsRendered=void 0,l._callOnItemsRendered=Me(function(u,g,O,S){return l.props.onItemsRendered({overscanStartIndex:u,overscanStopIndex:g,visibleStartIndex:O,visibleStopIndex:S})}),l._callOnScroll=void 0,l._callOnScroll=Me(function(u,g,O){return l.props.onScroll({scrollDirection:u,scrollOffset:g,scrollUpdateWasRequested:O})}),l._getItemStyle=void 0,l._getItemStyle=function(u){var g=l.props,O=g.direction,S=g.itemSize,D=g.layout,T=l._getItemStyleCache(h&&S,h&&D,h&&O),x;if(T.hasOwnProperty(u))x=T[u];else{var C=r(l.props,u,l._instanceProps),L=i(l.props,u,l._instanceProps),F=O==="horizontal"||D==="horizontal",$=O==="rtl",X=F?C:0;T[u]=x={position:"absolute",left:$?void 0:X,right:$?X:void 0,top:F?0:C,height:F?"100%":L,width:F?L:"100%"}}return x},l._getItemStyleCache=void 0,l._getItemStyleCache=Me(function(u,g,O){return{}}),l._onScrollHorizontal=function(u){var g=u.currentTarget,O=g.clientWidth,S=g.scrollLeft,D=g.scrollWidth;l.setState(function(T){if(T.scrollOffset===S)return null;var x=l.props.direction,C=S;if(x==="rtl")switch(Zt()){case"negative":C=-S;break;case"positive-descending":C=D-O-S;break}return C=Math.max(0,Math.min(C,D-O)),{isScrolling:!0,scrollDirection:T.scrollOffset<C?"forward":"backward",scrollOffset:C,scrollUpdateWasRequested:!1}},l._resetIsScrollingDebounced)},l._onScrollVertical=function(u){var g=u.currentTarget,O=g.clientHeight,S=g.scrollHeight,D=g.scrollTop;l.setState(function(T){if(T.scrollOffset===D)return null;var x=Math.max(0,Math.min(D,S-O));return{isScrolling:!0,scrollDirection:T.scrollOffset<x?"forward":"backward",scrollOffset:x,scrollUpdateWasRequested:!1}},l._resetIsScrollingDebounced)},l._outerRefSetter=function(u){var g=l.props.outerRef;l._outerRef=u,typeof g=="function"?g(u):typeof g=="object"&&g&&g.hasOwnProperty("current")&&(g.current=u)},l._resetIsScrollingDebounced=function(){l._resetIsScrollingTimeoutId!==null&&Jt(l._resetIsScrollingTimeoutId),l._resetIsScrollingTimeoutId=hs(l._resetIsScrolling,fs)},l._resetIsScrolling=function(){l._resetIsScrollingTimeoutId=null,l.setState({isScrolling:!1},function(){l._getItemStyleCache(-1,null)})},l}I.getDerivedStateFromProps=function(c,l){return vs(c,l),p(c),null};var v=I.prototype;return v.scrollTo=function(c){c=Math.max(0,c),this.setState(function(l){return l.scrollOffset===c?null:{scrollDirection:l.scrollOffset<c?"forward":"backward",scrollOffset:c,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},v.scrollToItem=function(c,l){l===void 0&&(l="auto");var u=this.props,g=u.itemCount,O=u.layout,S=this.state.scrollOffset;c=Math.max(0,Math.min(c,g-1));var D=0;if(this._outerRef){var T=this._outerRef;D=O==="vertical"?T.scrollWidth>T.clientWidth?Qt():0:T.scrollHeight>T.clientHeight?Qt():0}this.scrollTo(s(this.props,c,l,S,this._instanceProps,D))},v.componentDidMount=function(){var c=this.props,l=c.direction,u=c.initialScrollOffset,g=c.layout;if(typeof u=="number"&&this._outerRef!=null){var O=this._outerRef;l==="horizontal"||g==="horizontal"?O.scrollLeft=u:O.scrollTop=u}this._callPropsCallbacks()},v.componentDidUpdate=function(){var c=this.props,l=c.direction,u=c.layout,g=this.state,O=g.scrollOffset;if(g.scrollUpdateWasRequested&&this._outerRef!=null){var S=this._outerRef;if(l==="horizontal"||u==="horizontal")if(l==="rtl")switch(Zt()){case"negative":S.scrollLeft=-O;break;case"positive-ascending":S.scrollLeft=O;break;default:var D=S.clientWidth;S.scrollLeft=S.scrollWidth-D-O;break}else S.scrollLeft=O;else S.scrollTop=O}this._callPropsCallbacks()},v.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&Jt(this._resetIsScrollingTimeoutId)},v.render=function(){var c=this.props,l=c.children,u=c.className,g=c.direction,O=c.height,S=c.innerRef,D=c.innerElementType,T=c.innerTagName,x=c.itemCount,C=c.itemData,L=c.itemKey,F=L===void 0?gs:L,$=c.layout,X=c.outerElementType,hr=c.outerTagName,fr=c.style,gr=c.useIsScrolling,pr=c.width,Be=this.state.isScrolling,ce=g==="horizontal"||$==="horizontal",vr=ce?this._onScrollHorizontal:this._onScrollVertical,ze=this._getRangeToRender(),mr=ze[0],yr=ze[1],We=[];if(x>0)for(var V=mr;V<=yr;V++)We.push((0,f.createElement)(l,{data:C,key:F(V,C),index:V,isScrolling:gr?Be:void 0,style:this._getItemStyle(V)}));var Ge=n(this.props,this._instanceProps);return(0,f.createElement)(X||hr||"div",{className:u,onScroll:vr,ref:this._outerRefSetter,style:Tr({position:"relative",height:O,width:pr,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:g},fr)},(0,f.createElement)(D||T||"div",{children:We,ref:S,style:{height:ce?"100%":Ge,pointerEvents:Be?"none":void 0,width:ce?Ge:"100%"}}))},v._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"&&this.props.itemCount>0){var c=this._getRangeToRender(),l=c[0],u=c[1],g=c[2],O=c[3];this._callOnItemsRendered(l,u,g,O)}if(typeof this.props.onScroll=="function"){var S=this.state,D=S.scrollDirection,T=S.scrollOffset,x=S.scrollUpdateWasRequested;this._callOnScroll(D,T,x)}},v._getRangeToRender=function(){var c=this.props,l=c.itemCount,u=c.overscanCount,g=this.state,O=g.isScrolling,S=g.scrollDirection,D=g.scrollOffset;if(l===0)return[0,0,0,0];var T=o(this.props,D,this._instanceProps),x=a(this.props,T,D,this._instanceProps),C=!O||S==="backward"?Math.max(1,u):1,L=!O||S==="forward"?Math.max(1,u):1;return[Math.max(0,T-C),Math.max(0,Math.min(l-1,x+L)),T,x]},I})(f.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var vs=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},ms=ps({getItemOffset:function(e,t){return t*e.itemSize},getItemSize:function(e,t){return e.itemSize},getEstimatedTotalSize:function(e){var t=e.itemCount;return e.itemSize*t},getOffsetForIndexAndAlignment:function(e,t,r,n,i,s){var o=e.direction,a=e.height,d=e.itemCount,h=e.itemSize,p=e.layout,b=e.width,I=o==="horizontal"||p==="horizontal"?b:a,v=Math.max(0,d*h-I),c=Math.min(v,t*h),l=Math.max(0,t*h-I+h+s);switch(r==="smart"&&(r=n>=l-I&&n<=c+I?"auto":"center"),r){case"start":return c;case"end":return l;case"center":var u=Math.round(l+(c-l)/2);return u<Math.ceil(I/2)?0:u>v+Math.floor(I/2)?v:u;default:return n>=l&&n<=c?n:n<l?l:c}},getStartIndexForOffset:function(e,t){var r=e.itemCount,n=e.itemSize;return Math.max(0,Math.min(r-1,Math.floor(t/n)))},getStopIndexForStartIndex:function(e,t,r){var n=e.direction,i=e.height,s=e.itemCount,o=e.itemSize,a=e.layout,d=e.width,h=n==="horizontal"||a==="horizontal",p=t*o,b=h?d:i,I=Math.ceil((b+r-p)/o);return Math.max(0,Math.min(s-1,t+I-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){e.itemSize}});function ys(){let e=N(),t=Li().cursor;if(!t||t.type!=="line")return null;let r=e.indent,n=e.rowHeight*t.index+(e.props.padding??e.props.paddingTop??0),i=r*t.level,s=e.renderCursor;return(0,m.jsx)(s,{top:n,left:i,indent:r})}var Os=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const Is=(0,f.forwardRef)(function(e,t){let{children:r}=e,n=Os(e,["children"]),i=N();return(0,m.jsxs)("div",Object.assign({ref:t},n,{onClick:s=>{s.currentTarget===s.target&&i.deselectAll()},children:[(0,m.jsx)(bs,{}),r]}))});var bs=()=>{let e=N();return(0,m.jsx)("div",{style:{height:e.visibleNodes.length*e.rowHeight,width:"100%",position:"absolute",left:"0",right:"0"},children:(0,m.jsx)(ys,{})})},Ss=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const Ds=(0,f.forwardRef)(function(e,t){var{style:r}=e,n=Ss(e,["style"]);let i=N(),s=i.props.padding??i.props.paddingTop??0,o=i.props.padding??i.props.paddingBottom??0;return(0,m.jsx)("div",Object.assign({ref:t,style:Object.assign(Object.assign({},r),{height:`${parseFloat(r.height)+s+o}px`})},n))});function Ts(e){let t=N(),r=t.selectedIds,[n,i,s]=hi(()=>({canDrag:()=>e.isDraggable,type:"NODE",item:()=>{let o=t.isSelected(e.id)?Array.from(r):[e.id];return t.dispatch(W.dragStart(e.id,o)),{id:e.id,dragIds:o}},end:()=>{t.hideCursor(),t.dispatch(W.dragEnd())}}),[r,e]);return(0,f.useEffect)(()=>{s(Mi())},[s]),i}function Es(e,t){let r=e.getBoundingClientRect(),n=t.x-Math.round(r.x),i=t.y-Math.round(r.y),s=r.height,o=i<s/2,a=!o,d=s/4,h=i>d&&i<s-d;return{x:n,inTopHalf:o,inBottomHalf:a,inMiddle:h,atTop:!h&&o,atBottom:!h&&a}}function ws(e,t,r,n){return e?e.isInternal?n.atTop?[t,e]:n.inMiddle?[e,e]:[e,r]:n.inTopHalf?[t,e]:[e,r]:[t,null]}function ae(e,t){return{parentId:e||null,index:t}}function G(e,t){return{type:"line",index:e,level:t}}function xs(e){return{type:"highlight",id:e}}function Le(e,t){var n;let r=e;for(;r.parent&&r.level>t;)r=r.parent;return{parentId:((n=r.parent)==null?void 0:n.id)||null,index:Lt(r)+1}}function er(e){var h;let t=Es(e.element,e.offset),r=e.indent,n=Math.round(Math.max(0,t.x-r)/r),{node:i,nextNode:s,prevNode:o}=e,[a,d]=ws(i,o,s,t);if(i&&i.isInternal&&t.inMiddle)return{drop:ae(i.id,null),cursor:xs(i.id)};if(!a)return{drop:ae((h=d==null?void 0:d.parent)==null?void 0:h.id,0),cursor:G(0,0)};if(jt(a)){let p=se(n,(d==null?void 0:d.level)||0,a.level);return{drop:Le(a,p),cursor:G(a.rowIndex+1,p)}}if(_t(a)){let p=se(n,(d==null?void 0:d.level)||0,a.level);return{drop:Le(a,p),cursor:G(a.rowIndex+1,p)}}if(Mt(a)){let p=se(n,0,a.level+1);return p>a.level?{drop:ae(a.id,0),cursor:G(a.rowIndex+1,p)}:{drop:Le(a,p),cursor:G(a.rowIndex+1,p)}}return{drop:ae(a==null?void 0:a.id,0),cursor:G(a.rowIndex+1,a.level+1)}}function Cs(e,t){let r=N(),[n,i]=pt(()=>({accept:"NODE",canDrop:()=>r.canDrop(),hover:(s,o)=>{let a=o.getClientOffset();if(!e.current||!a)return;let{cursor:d,drop:h}=er({element:e.current,offset:a,indent:r.indent,node:t,prevNode:t.prev,nextNode:t.next});h&&r.dispatch(W.hovering(h.parentId,h.index)),o.canDrop()?d&&r.showCursor(d):r.hideCursor()},drop:(s,o)=>{if(!o.canDrop())return null;let{parentId:a,index:d,dragIds:h}=r.state.dnd;Bt(r.props.onMove,{dragIds:h,parentId:a==="__REACT_ARBORIST_INTERNAL_ROOT__"?null:a,index:d===null?0:d,dragNodes:r.dragNodes,parentNode:r.get(a)}),r.open(a)}}),[t,e.current,r.props]);return i}function Ns(e){let t=N(),r=t.at(e);if(!r)throw Error(`Could not find node for index: ${e}`);return(0,f.useMemo)(()=>{let n=r.clone();return t.visibleNodes[e]=n,n},[...Object.values(r.state),r])}const Rs=f.memo(function({index:e,style:t}){Pt(),Ai();let r=N(),n=Ns(e),i=(0,f.useRef)(null),s=Ts(n),o=Cs(i,n),a=(0,f.useCallback)(c=>{i.current=c,o(c)},[o]),d=r.indent*n.level,h=(0,f.useMemo)(()=>({paddingLeft:d}),[d]),p=(0,f.useMemo)(()=>Object.assign(Object.assign({},t),{top:parseFloat(t.top)+(r.props.padding??r.props.paddingTop??0)}),[t,r.props.padding,r.props.paddingTop]),b={role:"treeitem","aria-level":n.level+1,"aria-selected":n.isSelected,"aria-expanded":n.isOpen,style:p,tabIndex:-1,className:r.props.rowClassName};(0,f.useEffect)(()=>{var c;!n.isEditing&&n.isFocused&&((c=i.current)==null||c.focus({preventScroll:!0}))},[n.isEditing,n.isFocused,i.current]);let I=r.renderNode,v=r.renderRow;return(0,m.jsx)(v,{node:n,innerRef:a,attrs:b,children:(0,m.jsx)(I,{node:n,tree:r,style:h,dragHandle:s})})});var ke="",tr=null;function rr(){Pt();let e=N();return(0,m.jsx)("div",{role:"tree",style:{height:e.height,width:e.width,minHeight:0,minWidth:0},onContextMenu:e.props.onContextMenu,onClick:e.props.onClick,tabIndex:0,onFocus:t=>{t.currentTarget.contains(t.relatedTarget)||e.onFocus()},onBlur:t=>{t.currentTarget.contains(t.relatedTarget)||e.onBlur()},onKeyDown:t=>{var n;if(e.isEditing)return;if(t.key==="Backspace"){if(!e.props.onDelete)return;let i=Array.from(e.selectedIds);if(i.length>1){let s=e.mostRecentNode;for(;s&&s.isSelected;)s=s.nextSibling;s||(s=e.lastNode),e.focus(s,{scroll:!1}),e.delete(Array.from(i))}else{let s=e.focusedNode;if(s){let o=s.nextSibling,a=s.parent;e.focus(o||a,{scroll:!1}),e.delete(s)}}return}if(t.key==="Tab"&&!t.shiftKey){t.preventDefault(),kt(t.currentTarget);return}if(t.key==="Tab"&&t.shiftKey){t.preventDefault(),Ht(t.currentTarget);return}if(t.key==="ArrowDown"){t.preventDefault();let i=e.nextNode;if(t.metaKey){e.select(e.focusedNode),e.activate(e.focusedNode);return}else if(!t.shiftKey||e.props.disableMultiSelection){e.focus(i);return}else{if(!i)return;let s=e.focusedNode;s?s.isSelected?e.selectContiguous(i):e.selectMulti(i):e.focus(e.firstNode);return}}if(t.key==="ArrowUp"){t.preventDefault();let i=e.prevNode;if(!t.shiftKey||e.props.disableMultiSelection){e.focus(i);return}else{if(!i)return;let s=e.focusedNode;s?s.isSelected?e.selectContiguous(i):e.selectMulti(i):e.focus(e.lastNode);return}}if(t.key==="ArrowRight"){let i=e.focusedNode;if(!i)return;i.isInternal&&i.isOpen?e.focus(e.nextNode):i.isInternal&&e.open(i.id);return}if(t.key==="ArrowLeft"){let i=e.focusedNode;if(!i||i.isRoot)return;i.isInternal&&i.isOpen?e.close(i.id):(n=i.parent)!=null&&n.isRoot||e.focus(i.parent);return}if(t.key==="a"&&t.metaKey&&!e.props.disableMultiSelection){t.preventDefault(),e.selectAll();return}if(t.key==="a"&&!t.metaKey&&e.props.onCreate){e.createLeaf();return}if(t.key==="A"&&!t.metaKey){if(!e.props.onCreate)return;e.createInternal();return}if(t.key==="Home"){t.preventDefault(),e.focus(e.firstNode);return}if(t.key==="End"){t.preventDefault(),e.focus(e.lastNode);return}if(t.key==="Enter"){let i=e.focusedNode;if(!i||!i.isEditable||!e.props.onRename)return;setTimeout(()=>{i&&e.edit(i)});return}if(t.key===" "){t.preventDefault();let i=e.focusedNode;if(!i)return;i.isLeaf?(i.select(),i.activate()):i.toggle();return}if(t.key==="*"){let i=e.focusedNode;if(!i)return;e.openSiblings(i);return}if(t.key==="PageUp"){t.preventDefault(),e.pageUp();return}t.key==="PageDown"&&(t.preventDefault(),e.pageDown()),clearTimeout(tr),ke+=t.key,tr=setTimeout(()=>{ke=""},600);let r=e.visibleNodes.find(i=>{let s=i.data.name;return typeof s=="string"?s.toLowerCase().startsWith(ke):!1});r&&e.focus(r.id)},children:(0,m.jsx)(ms,{className:e.props.className,outerRef:e.listEl,itemCount:e.visibleNodes.length,height:e.height,width:e.width,itemSize:e.rowHeight,overscanCount:e.overscanCount,itemKey:t=>{var r;return((r=e.visibleNodes[t])==null?void 0:r.id)||t},outerElementType:Is,innerElementType:Ds,onScroll:e.props.onScroll,onItemsRendered:e.onItemsRendered.bind(e),ref:e.list,children:Rs})})}function nr(e){return e.isFiltered?js(e.root,e.isMatch.bind(e)):Ps(e.root)}function Ps(e){let t=[];function r(n){var i;n.level>=0&&t.push(n),n.isOpen&&((i=n.children)==null||i.forEach(r))}return r(e),t.forEach(ir),t}function js(e,t){let r={},n=[];function i(o){if(!o.isRoot&&t(o)){r[o.id]=!0;let a=o.parent;for(;a;)r[a.id]=!0,a=a.parent}if(o.children)for(let a of o.children)i(a)}function s(o){var a;o.level>=0&&r[o.id]&&n.push(o),o.isOpen&&((a=o.children)==null||a.forEach(s))}return i(e),s(e),n.forEach(ir),n}function ir(e,t){e.rowIndex=t}const sr=e=>e.reduce((t,r,n)=>(t[r.id]=n,t),{});var He=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(p){try{h(n.next(p))}catch(b){o(b)}}function d(p){try{h(n.throw(p))}catch(b){o(b)}}function h(p){p.done?s(p.value):i(p.value).then(a,d)}h((n=n.apply(e,t||[])).next())})},{safeRun:E,identify:M,identifyNull:_}=ki,_s=class de{constructor(t,r,n,i){this.store=t,this.props=r,this.list=n,this.listEl=i,this.visibleStartIndex=0,this.visibleStopIndex=0,this.root=Kt(this),this.visibleNodes=nr(this),this.idToIndex=sr(this.visibleNodes)}update(t){this.props=t,this.root=Kt(this),this.visibleNodes=nr(this),this.idToIndex=sr(this.visibleNodes)}dispatch(t){return this.store.dispatch(t)}get state(){return this.store.getState()}get openState(){return this.state.nodes.open.unfiltered}get width(){return this.props.width??300}get height(){return this.props.height??500}get indent(){return this.props.indent??24}get rowHeight(){return this.props.rowHeight??24}get overscanCount(){return this.props.overscanCount??1}get searchTerm(){return(this.props.searchTerm||"").trim()}get matchFn(){let t=this.props.searchMatch??((r,n)=>JSON.stringify(Object.values(r.data)).toLocaleLowerCase().includes(n.toLocaleLowerCase()));return r=>t(r,this.searchTerm)}accessChildren(t){return Y(t,this.props.childrenAccessor||"children")??null}accessId(t){let r=Y(t,this.props.idAccessor||"id");if(!r)throw Error("Data must contain an 'id' property or props.idAccessor must return a string");return r}get firstNode(){return this.visibleNodes[0]??null}get lastNode(){return this.visibleNodes[this.visibleNodes.length-1]??null}get focusedNode(){return this.get(this.state.nodes.focus.id)??null}get mostRecentNode(){return this.get(this.state.nodes.selection.mostRecent)??null}get nextNode(){let t=this.indexOf(this.focusedNode);return t===null?null:this.at(t+1)}get prevNode(){let t=this.indexOf(this.focusedNode);return t===null?null:this.at(t-1)}get(t){return t&&t in this.idToIndex&&this.visibleNodes[this.idToIndex[t]]||null}at(t){return this.visibleNodes[t]||null}nodesBetween(t,r){if(t===null||r===null)return[];let n=this.indexOf(t)??0,i=this.indexOf(r);if(i===null)return[];let s=Math.min(n,i),o=Math.max(n,i);return this.visibleNodes.slice(s,o+1)}indexOf(t){let r=Ut(t);return r?this.idToIndex[r]:null}get editingId(){return this.state.nodes.edit.id}createInternal(){return this.create({type:"internal"})}createLeaf(){return this.create({type:"leaf"})}create(){return He(this,arguments,void 0,function*(t={}){let r=t.parentId===void 0?Gt(this):t.parentId,n=t.index??Wt(this),i=t.type??"leaf",s=yield E(this.props.onCreate,{type:i,parentId:r,index:n,parentNode:this.get(r)});s&&(this.focus(s),setTimeout(()=>{this.edit(s).then(()=>{this.select(s),this.activate(s)})}))})}delete(t){return He(this,void 0,void 0,function*(){if(!t)return;let r=(Array.isArray(t)?t:[t]).map(M),n=r.map(i=>this.get(i)).filter(i=>!!i);yield E(this.props.onDelete,{nodes:n,ids:r})})}edit(t){let r=M(t);return this.resolveEdit({cancelled:!0}),this.scrollTo(r),this.dispatch(Pe(r)),new Promise(n=>{de.editPromise=n})}submit(t,r){return He(this,void 0,void 0,function*(){if(!t)return;let n=M(t);yield E(this.props.onRename,{id:n,name:r,node:this.get(n)}),this.dispatch(Pe(null)),this.resolveEdit({cancelled:!1,value:r}),setTimeout(()=>this.onFocus())})}reset(){this.dispatch(Pe(null)),this.resolveEdit({cancelled:!0}),setTimeout(()=>this.onFocus())}activate(t){let r=this.get(_(t));r&&E(this.props.onActivate,r)}resolveEdit(t){let r=de.editPromise;r&&r(t),de.editPromise=null}get selectedIds(){return this.state.nodes.selection.ids}get selectedNodes(){let t=[];for(let r of Array.from(this.selectedIds)){let n=this.get(r);n&&t.push(n)}return t}focus(t,r={}){t&&(this.props.selectionFollowsFocus?this.select(t):(this.dispatch(B(M(t))),r.scroll!==!1&&this.scrollTo(t),this.focusedNode&&E(this.props.onFocus,this.focusedNode)))}pageUp(){var i;let t=this.visibleStartIndex,r=this.visibleStopIndex-t,n=((i=this.focusedNode)==null?void 0:i.rowIndex)??0;n=n>t?t:Math.max(t-r,0),this.focus(this.at(n))}pageDown(){var s;let t=this.visibleStartIndex,r=this.visibleStopIndex,n=r-t,i=((s=this.focusedNode)==null?void 0:s.rowIndex)??0;i=i<r?r:Math.min(i+n,this.visibleNodes.length-1),this.focus(this.at(i))}select(t,r={}){if(!t)return;let n=r.focus!==!1,i=M(t);n&&this.dispatch(B(i)),this.dispatch(j.only(i)),this.dispatch(j.anchor(i)),this.dispatch(j.mostRecent(i)),this.scrollTo(i,r.align),this.focusedNode&&n&&E(this.props.onFocus,this.focusedNode),E(this.props.onSelect,this.selectedNodes)}deselect(t){if(!t)return;let r=M(t);this.dispatch(j.remove(r)),E(this.props.onSelect,this.selectedNodes)}selectMulti(t){let r=this.get(_(t));r&&(this.dispatch(B(r.id)),this.dispatch(j.add(r.id)),this.dispatch(j.anchor(r.id)),this.dispatch(j.mostRecent(r.id)),this.scrollTo(r),this.focusedNode&&E(this.props.onFocus,this.focusedNode),E(this.props.onSelect,this.selectedNodes))}selectContiguous(t){if(!t)return;let r=M(t),{anchor:n,mostRecent:i}=this.state.nodes.selection;this.dispatch(B(r)),this.dispatch(j.remove(this.nodesBetween(n,i))),this.dispatch(j.add(this.nodesBetween(n,_(r)))),this.dispatch(j.mostRecent(r)),this.scrollTo(r),this.focusedNode&&E(this.props.onFocus,this.focusedNode),E(this.props.onSelect,this.selectedNodes)}deselectAll(){this.setSelection({ids:[],anchor:null,mostRecent:null}),E(this.props.onSelect,this.selectedNodes)}selectAll(){var t;this.setSelection({ids:Object.keys(this.idToIndex),anchor:this.firstNode,mostRecent:this.lastNode}),this.dispatch(B((t=this.lastNode)==null?void 0:t.id)),this.focusedNode&&E(this.props.onFocus,this.focusedNode),E(this.props.onSelect,this.selectedNodes)}setSelection(t){var s;let r=new Set((s=t.ids)==null?void 0:s.map(M)),n=_(t.anchor),i=_(t.mostRecent);this.dispatch(j.set({ids:r,anchor:n,mostRecent:i})),E(this.props.onSelect,this.selectedNodes)}get cursorParentId(){let{cursor:t}=this.state.dnd;return t.type==="highlight"?t.id:null}get cursorOverFolder(){return this.state.dnd.cursor.type==="highlight"}get dragNodes(){return this.state.dnd.dragIds.map(t=>this.get(t)).filter(t=>!!t)}get dragNode(){return this.get(this.state.nodes.drag.id)}get dragDestinationParent(){return this.get(this.state.nodes.drag.destinationParentId)}get dragDestinationIndex(){return this.state.nodes.drag.destinationIndex}canDrop(){if(this.isFiltered)return!1;let t=this.get(this.state.dnd.parentId)??this.root,r=this.dragNodes,n=this.props.disableDrop;for(let i of r)if(!i||!t||i.isInternal&&At(t,i))return!1;return typeof n=="function"?!n({parentNode:t,dragNodes:this.dragNodes,index:this.state.dnd.index||0}):typeof n=="string"?!t.data[n]:typeof n=="boolean"?!n:!0}hideCursor(){this.dispatch(W.cursor({type:"none"}))}showCursor(t){this.dispatch(W.cursor(t))}open(t){let r=_(t);r&&(this.isOpen(r)||(this.dispatch(_e.open(r,this.isFiltered)),E(this.props.onToggle,r)))}close(t){let r=_(t);r&&this.isOpen(r)&&(this.dispatch(_e.close(r,this.isFiltered)),E(this.props.onToggle,r))}toggle(t){let r=_(t);if(r)return this.isOpen(r)?this.close(r):this.open(r)}openParents(t){var i;let r=_(t);if(!r)return;let n=(i=Re(this.root,r))==null?void 0:i.parent;for(;n;)this.open(n.id),n=n.parent}openSiblings(t){let r=t.parent;if(!r)this.toggle(t.id);else if(r.children){let n=t.isOpen;for(let i of r.children)i.isInternal&&(n?this.close(i.id):this.open(i.id));this.scrollTo(this.focusedNode)}}openAll(){oe(this.root,t=>{t.isInternal&&t.open()})}closeAll(){oe(this.root,t=>{t.isInternal&&t.close()})}scrollTo(t,r="smart"){if(!t)return;let n=M(t);return this.openParents(n),zt(()=>n in this.idToIndex).then(()=>{var i;let s=this.idToIndex[n];s!==void 0&&((i=this.list.current)==null||i.scrollToItem(s,r))}).catch(()=>{})}get isEditing(){return this.state.nodes.edit.id!==null}get isFiltered(){var t;return!!((t=this.props.searchTerm)!=null&&t.trim())}get hasFocus(){return this.state.nodes.focus.treeFocused}get hasNoSelection(){return this.state.nodes.selection.ids.size===0}get hasOneSelection(){return this.state.nodes.selection.ids.size===1}get hasMultipleSelections(){return this.state.nodes.selection.ids.size>1}isSelected(t){return t?this.state.nodes.selection.ids.has(t):!1}isOpen(t){if(!t)return!1;if(t==="__REACT_ARBORIST_INTERNAL_ROOT__")return!0;let r=this.props.openByDefault??!0;return this.isFiltered?this.state.nodes.open.filtered[t]??!0:this.state.nodes.open.unfiltered[t]??r}isEditable(t){return!Y(t,this.props.disableEdit||(()=>!1))}isDraggable(t){return!Y(t,this.props.disableDrag||(()=>!1))}isDragging(t){let r=_(t);return r?this.state.nodes.drag.id===r:!1}isFocused(t){return this.hasFocus&&this.state.nodes.focus.id===t}isMatch(t){return this.matchFn(t)}willReceiveDrop(t){let r=_(t);if(!r)return!1;let{destinationParentId:n,destinationIndex:i}=this.state.nodes.drag;return r===n&&i===null}onFocus(){let t=this.focusedNode||this.firstNode;t&&this.dispatch(B(t.id))}onBlur(){this.dispatch(Ji())}onItemsRendered(t){this.visibleStartIndex=t.visibleStartIndex,this.visibleStopIndex=t.visibleStopIndex}get renderContainer(){return this.props.renderContainer||rr}get renderRow(){return this.props.renderRow||Ki}get renderNode(){return this.props.children||Yi}get renderDragPreview(){return this.props.renderDragPreview||qt}get renderCursor(){return this.props.renderCursor||Vi}};function w(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var or=typeof Symbol=="function"&&Symbol.observable||"@@observable",Fe=()=>Math.random().toString(36).substring(7).split("").join("."),le={INIT:`@@redux/INIT${Fe()}`,REPLACE:`@@redux/REPLACE${Fe()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Fe()}`};function Ms(e){if(typeof e!="object"||!e)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function ar(e,t,r){if(typeof e!="function")throw Error(w(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw Error(w(0));if(typeof t=="function"&&r===void 0&&(r=t,t=void 0),r!==void 0){if(typeof r!="function")throw Error(w(1));return r(ar)(e,t)}let n=e,i=t,s=new Map,o=s,a=0,d=!1;function h(){o===s&&(o=new Map,s.forEach((l,u)=>{o.set(u,l)}))}function p(){if(d)throw Error(w(3));return i}function b(l){if(typeof l!="function")throw Error(w(4));if(d)throw Error(w(5));let u=!0;h();let g=a++;return o.set(g,l),function(){if(u){if(d)throw Error(w(6));u=!1,h(),o.delete(g),s=null}}}function I(l){if(!Ms(l))throw Error(w(7));if(l.type===void 0)throw Error(w(8));if(typeof l.type!="string")throw Error(w(17));if(d)throw Error(w(9));try{d=!0,i=n(i,l)}finally{d=!1}return(s=o).forEach(u=>{u()}),l}function v(l){if(typeof l!="function")throw Error(w(10));n=l,I({type:le.REPLACE})}function c(){let l=b;return{subscribe(u){if(typeof u!="object"||!u)throw Error(w(11));function g(){let O=u;O.next&&O.next(p())}return g(),{unsubscribe:l(g)}},[or](){return this}}}return I({type:le.INIT}),{dispatch:I,subscribe:b,getState:p,replaceReducer:v,[or]:c}}function As(e){Object.keys(e).forEach(t=>{let r=e[t];if(r(void 0,{type:le.INIT})===void 0)throw Error(w(12));if(r(void 0,{type:le.PROBE_UNKNOWN_ACTION()})===void 0)throw Error(w(13))})}function lr(e){let t=Object.keys(e),r={};for(let s=0;s<t.length;s++){let o=t[s];typeof e[o]=="function"&&(r[o]=e[o])}let n=Object.keys(r),i;try{As(r)}catch(s){i=s}return function(s={},o){if(i)throw i;let a=!1,d={};for(let h=0;h<n.length;h++){let p=n[h],b=r[p],I=s[p],v=b(I,o);if(v===void 0)throw o&&o.type,Error(w(14));d[p]=v,a||(a=v!==I)}return a||(a=n.length!==Object.keys(s).length),a?d:s}}function Ls(e=z().nodes.drag,t){switch(t.type){case"DND_DRAG_START":return Object.assign(Object.assign({},e),{id:t.id,selectedIds:t.dragIds});case"DND_DRAG_END":return Object.assign(Object.assign({},e),{id:null,destinationParentId:null,destinationIndex:null,selectedIds:[]});case"DND_HOVERING":return t.parentId!==e.destinationParentId||t.index!=e.destinationIndex?Object.assign(Object.assign({},e),{destinationParentId:t.parentId,destinationIndex:t.index}):e;default:return e}}const ks=lr({nodes:lr({focus:Qi,edit:Xi,open:Zi,selection:es,drag:Ls}),dnd:ts});var Hs=Dr(),Fs=z();function Us({treeProps:e,imperativeHandle:t,children:r}){let n=(0,f.useRef)(null),i=(0,f.useRef)(null),s=(0,f.useRef)(ar(ks,z(e))),o=(0,Hs.useSyncExternalStore)(s.current.subscribe,s.current.getState,()=>Fs),a=(0,f.useMemo)(()=>new _s(s.current,e,n,i),[]),d=(0,f.useRef)(0);return(0,f.useMemo)(()=>{d.current+=1,a.update(e)},[...Object.values(e),o.nodes.open]),(0,f.useImperativeHandle)(t,()=>a),(0,f.useEffect)(()=>{a.props.selection?a.select(a.props.selection,{focus:!1}):a.deselectAll()},[a.props.selection]),(0,f.useEffect)(()=>{a.props.searchTerm||s.current.dispatch(_e.clear(!0))},[a.props.searchTerm]),(0,m.jsx)(xt.Provider,{value:a,children:(0,m.jsx)(Rt.Provider,{value:d.current,children:(0,m.jsx)(Ct.Provider,{value:o.nodes,children:(0,m.jsx)(Nt.Provider,{value:o.dnd,children:(0,m.jsx)(lt,Object.assign({backend:wt,options:{rootElement:a.props.dndRootElement||void 0}},e.dndManager&&{manager:e.dndManager},{children:r}))})})})})}function Bs(){let e=N(),[,t]=pt(()=>({accept:"NODE",canDrop:(r,n)=>n.isOver({shallow:!0})?e.canDrop():!1,hover:(r,n)=>{if(!n.isOver({shallow:!0}))return;let i=n.getClientOffset();if(!e.listEl.current||!i)return;let{cursor:s,drop:o}=er({element:e.listEl.current,offset:i,indent:e.indent,node:null,prevNode:e.visibleNodes[e.visibleNodes.length-1],nextNode:null});o&&e.dispatch(W.hovering(o.parentId,o.index)),n.canDrop()?s&&e.showCursor(s):e.hideCursor()}}),[e]);t(e.listEl)}function zs(e){return Bs(),e.children}function Ws(){return(0,m.jsx)(m.Fragment,{children:(0,m.jsx)(N().props.renderContainer||rr,{})})}function Gs(){let e=N(),{offset:t,mouse:r,item:n,isDragging:i}=fi(s=>({offset:s.getSourceClientOffset(),mouse:s.getClientOffset(),item:s.getItem(),isDragging:s.isDragging()}));return(0,m.jsx)(e.props.renderDragPreview||qt,{offset:t,mouse:r,id:(n==null?void 0:n.id)||null,dragIds:(n==null?void 0:n.dragIds)||[],isDragging:i})}var dr=class{constructor(e){this.root=Vs(e)}get data(){var e;return((e=this.root.children)==null?void 0:e.map(t=>t.data))??[]}create(e){let t=e.parentId?this.find(e.parentId):this.root;if(!t)return null;t.addChild(e.data,e.index)}move(e){let t=this.find(e.id),r=e.parentId?this.find(e.parentId):this.root;!t||!r||(r.addChild(t.data,e.index),t.drop())}update(e){let t=this.find(e.id);t&&t.update(e.changes)}drop(e){let t=this.find(e.id);t&&t.drop()}find(e,t=this.root){if(!t)return null;if(t.id===e)return t;if(t.children){for(let r of t.children){let n=this.find(e,r);if(n)return n}return null}return null}};function Vs(e){let t=new cr({id:"ROOT"},null);return t.children=e.map(r=>Ue(r,t)),t}function Ue(e,t){let r=new cr(e,t);return e.children&&(r.children=e.children.map(n=>Ue(n,r))),r}var cr=class{constructor(e,t){this.data=e,this.parent=t,this.id=e.id}hasParent(){return!!this.parent}get childIndex(){return this.hasParent()?this.parent.children.indexOf(this):-1}addChild(e,t){let r=Ue(e,this);this.children=this.children??[],this.children.splice(t,0,r),this.data.children=this.data.children??[],this.data.children.splice(t,0,e)}removeChild(e){var t,r;(t=this.children)==null||t.splice(e,1),(r=this.data.children)==null||r.splice(e,1)}update(e){if(this.hasParent()){let t=this.childIndex;this.parent.addChild(Object.assign(Object.assign({},this.data),e),t),this.drop()}}drop(){this.hasParent()&&this.parent.removeChild(this.childIndex)}},Ks=0;function Ys(e){let[t,r]=(0,f.useState)(e),n=(0,f.useMemo)(()=>new dr(t),[t]);return[t,{onMove:i=>{for(let s of i.dragIds)n.move({id:s,parentId:i.parentId,index:i.index});r(n.data)},onRename:({name:i,id:s})=>{n.update({id:s,changes:{name:i}}),r(n.data)},onCreate:({parentId:i,index:s,type:o})=>{let a={id:`simple-tree-id-${Ks++}`,name:""};return o==="internal"&&(a.children=[]),n.create({parentId:i,index:s,data:a}),r(n.data),a},onDelete:i=>{i.ids.forEach(s=>n.drop({id:s})),r(n.data)}}]}function qs(e){if(e.initialData&&e.data)throw Error("React Arborist Tree => Provide either a data or initialData prop, but not both.");if(e.initialData&&(e.onCreate||e.onDelete||e.onMove||e.onRename))throw Error(`React Arborist Tree => You passed the initialData prop along with a data handler.
|
|
3
3
|
Use the data prop if you want to provide your own handlers.`);if(e.initialData){let[t,r]=Ys(e.initialData);return Object.assign(Object.assign(Object.assign({},e),r),{data:t})}else return e}function $s(e,t){return(0,m.jsxs)(Us,{treeProps:qs(e),imperativeHandle:t,children:[(0,m.jsx)(zs,{children:(0,m.jsx)(Ws,{})}),(0,m.jsx)(Gs,{})]})}const Xs=(0,f.forwardRef)($s);export{lt as a,A as i,dr as n,Er as o,wt as r,Xs as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as l}from"./useEvent-O0nX5vok.js";import{T as s}from"./cells-
|
|
1
|
+
import{u as l}from"./useEvent-O0nX5vok.js";import{T as s}from"./cells-D7VcaLU3.js";import{t as i}from"./compiler-runtime-B3qBwwSJ.js";import{o as n}from"./utils-tNbLd14P.js";import{n as f}from"./html-to-image-F0JQuH9e.js";import{o as c}from"./focus-D09k4iPD.js";var p=i();function u(){let o=(0,p.c)(4),a=l(n),r=c(),{createNewCell:t}=s(),e;return o[0]!==a||o[1]!==t||o[2]!==r?(e=m=>{m.includes("alt")&&f({autoInstantiate:a,createNewCell:t,fromCellId:r}),t({code:m,before:!1,cellId:r??"__end__"})},o[0]=a,o[1]=t,o[2]=r,o[3]=e):e=o[3],e}export{u as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as k}from"./chunk-LvLJmgfZ.js";import{t as M}from"./react-Bj1aDYRI.js";import{t as A}from"./compiler-runtime-B3qBwwSJ.js";import{ot as F}from"./ai-model-dropdown-
|
|
1
|
+
import{s as k}from"./chunk-LvLJmgfZ.js";import{t as M}from"./react-Bj1aDYRI.js";import{t as A}from"./compiler-runtime-B3qBwwSJ.js";import{ot as F}from"./ai-model-dropdown-Dbctse5A.js";import{m as p,u as x}from"./useEventListener-Dy81QR4n.js";import{r as R}from"./constants-Rz_lD4HK.js";import{S as H}from"./config-3Aq84phF.js";import{t as I}from"./createLucideIcon-Cm-Z7dYr.js";import{F as y,I as K,L as P,j as T}from"./usePress-BHGkpw8X.js";var D=I("case-sensitive",[["path",{d:"m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16",key:"d5nyq2"}],["path",{d:"M22 9v7",key:"pvm9v3"}],["path",{d:"M3.304 13h6.392",key:"1q3zxz"}],["circle",{cx:"18.5",cy:"12.5",r:"3.5",key:"z97x68"}]]),O=typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,b=new WeakMap,c=[];function W(t,e){let s=P(t==null?void 0:t[0]),d=e instanceof s.Element?{root:e}:e,f=(d==null?void 0:d.root)??document.body,v=(d==null?void 0:d.shouldUseInert)&&O,l=new Set(t),u=new Set,w=n=>v&&n instanceof s.HTMLElement?n.inert:n.getAttribute("aria-hidden")==="true",a=(n,o)=>{v&&n instanceof s.HTMLElement?n.inert=o:o?n.setAttribute("aria-hidden","true"):(n.removeAttribute("aria-hidden"),n instanceof s.HTMLElement&&(n.inert=!1))},m=new Set;if(y())for(let n of t){let o=n;for(;o&&o!==f;){let i=o.getRootNode();"shadowRoot"in i&&m.add(i.shadowRoot),o=i.parentNode}}let S=n=>{for(let r of n.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))l.add(r);let o=r=>{if(u.has(r)||l.has(r)||r.parentElement&&u.has(r.parentElement)&&r.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let C of l)if(T(r,C))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},i=F(K(n),n,NodeFilter.SHOW_ELEMENT,{acceptNode:o}),h=o(n);if(h===NodeFilter.FILTER_ACCEPT&&N(n),h!==NodeFilter.FILTER_REJECT){let r=i.nextNode();for(;r!=null;)N(r),r=i.nextNode()}},N=n=>{let o=b.get(n)??0;w(n)&&o===0||(o===0&&a(n,!0),u.add(n),b.set(n,o+1))};c.length&&c[c.length-1].disconnect(),S(f);let E=new MutationObserver(n=>{for(let o of n)if(o.type==="childList"){if(o.target.isConnected&&![...l,...u].some(i=>T(i,o.target)))for(let i of o.addedNodes)(i instanceof HTMLElement||i instanceof SVGElement)&&(i.dataset.liveAnnouncer==="true"||i.dataset.reactAriaTopLayer==="true")?l.add(i):i instanceof Element&&S(i);if(y()){for(let i of m)if(!i.isConnected){E.disconnect();break}}}});E.observe(f,{childList:!0,subtree:!0});let _=new Set;if(y())for(let n of m){let o=new MutationObserver(i=>{for(let h of i)if(h.type==="childList"){if(h.target.isConnected&&![...l,...u].some(r=>T(r,h.target)))for(let r of h.addedNodes)(r instanceof HTMLElement||r instanceof SVGElement)&&(r.dataset.liveAnnouncer==="true"||r.dataset.reactAriaTopLayer==="true")?l.add(r):r instanceof Element&&S(r);if(y()){for(let r of m)if(!r.isConnected){E.disconnect();break}}}});o.observe(n,{childList:!0,subtree:!0}),_.add(o)}let L={visibleNodes:l,hiddenNodes:u,observe(){E.observe(f,{childList:!0,subtree:!0})},disconnect(){E.disconnect()}};return c.push(L),()=>{if(E.disconnect(),y())for(let n of _)n.disconnect();for(let n of u){let o=b.get(n);o!=null&&(o===1?(a(n,!1),b.delete(n)):b.set(n,o-1))}L===c[c.length-1]?(c.pop(),c.length&&c[c.length-1].observe()):c.splice(c.indexOf(L),1)}}function q(t){let e=c[c.length-1];if(e&&!e.visibleNodes.has(t))return e.visibleNodes.add(t),()=>{e.visibleNodes.delete(t)}}const z=typeof window<"u"&&window.parent!==window;function V(){new URLSearchParams(window.location.search).has(R.vscode)&&(!z||H()||(p.log("[vscode] Registering VS Code bindings"),J(),G(),U(),j()))}function G(){window.addEventListener("copy",()=>{var t;g({command:"copy",text:((t=window.getSelection())==null?void 0:t.toString())??""})}),window.addEventListener("cut",()=>{var e;let t=((e=window.getSelection())==null?void 0:e.toString())??"";x()&&document.execCommand("insertText",!1,""),g({command:"cut",text:t})}),window.addEventListener("message",async t=>{try{let e=t.data,s=x();switch(e.command){case"paste":if(p.log(`[vscode] Received paste mac=${s}`,e),s){let d=document.activeElement;if(!d){p.warn("[vscode] No active element to paste into"),document.execCommand("insertText",!1,e.text);return}let f=new DataTransfer;f.setData("text/plain",e.text),d.dispatchEvent(new ClipboardEvent("paste",{clipboardData:f}))}else p.log("[vscode] Not pasting on mac");return}}catch(e){p.error("Error in paste message handler",e)}})}function J(){document.addEventListener("keydown",t=>{var e,s;if((t.ctrlKey||t.metaKey)&&t.key==="c"){let d=((e=window.getSelection())==null?void 0:e.toString())??"";p.log("[vscode] Sending copy",d),g({command:"copy",text:d});return}if((t.ctrlKey||t.metaKey)&&t.key==="x"){let d=((s=window.getSelection())==null?void 0:s.toString())??"";x()&&document.execCommand("insertText",!1,""),p.log("[vscode] Sending cut",d),g({command:"cut",text:d});return}if((t.ctrlKey||t.metaKey)&&t.key==="v"){p.log("[vscode] Sending paste"),g({command:"paste"});return}})}function U(){document.addEventListener("click",t=>{let e=t.target;if(e.tagName!=="A")return;let s=e.getAttribute("href");s&&(s.startsWith("http://")||s.startsWith("https://"))&&(t.preventDefault(),g({command:"external_link",url:s}))})}function j(){document.addEventListener("contextmenu",t=>{t.preventDefault(),g({command:"context_menu"})})}function g(t){var e;(e=window.parent)==null||e.postMessage(t,"*")}var $=A(),B=k(M(),1);function Q(t){let e=(0,$.c)(6),[s,d]=(0,B.useState)(t),f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=a=>{var m;(m=a==null?void 0:a.stopPropagation)==null||m.call(a),d(!0)},e[0]=f):f=e[0];let v;e[1]===Symbol.for("react.memo_cache_sentinel")?(v=a=>{var m;(m=a==null?void 0:a.stopPropagation)==null||m.call(a),d(!1)},e[1]=v):v=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=a=>{var m;(m=a==null?void 0:a.stopPropagation)==null||m.call(a),d(X)},e[2]=l):l=e[2];let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u={setTrue:f,setFalse:v,toggle:l},e[3]=u):u=e[3];let w;return e[4]===s?w=e[5]:(w=[s,u],e[4]=s,e[5]=w),w}function X(t){return!t}export{W as a,q as i,V as n,D as o,g as r,Q as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as ae}from"./chunk-LvLJmgfZ.js";import{d as ie,u as b}from"./useEvent-O0nX5vok.js";import{Cn as ne,Jn as de,T as se,Yn as re,Zn as ce,kn as he,pt as F,qn as me,ui as pe,v as ke,wn as fe}from"./cells-D7VcaLU3.js";import{t as ue}from"./compiler-runtime-B3qBwwSJ.js";import{a as ye,o as be,r as xe}from"./utils-tNbLd14P.js";import{t as je}from"./jsx-runtime-icT_Ltz2.js";import{r as ve}from"./requests-Bgjtqo_1.js";import{t as f}from"./createLucideIcon-Cm-Z7dYr.js";import{n as Q,r as V}from"./x-BI1M8X_v.js";import{a as Ce,h as we}from"./download-DZvj3fxW.js";import{t as ge}from"./chevron-right-D0GQBpTb.js";import{t as G}from"./circle-plus-CGG-gArM.js";import{t as Ie}from"./code-xml-DwHPF_nL.js";import{t as ze}from"./eye-off-vwi9L975.js";import{t as We}from"./image-DXfkah9d.js";import{t as Me}from"./link-Cf10mh3t.js";import{t as _e}from"./play-DKSqmedg.js";import{a as Se,n as Ae}from"./state-BDPnJei0.js";import{t as Te}from"./trash-2-CAoNMkjq.js";import{t as Ne}from"./use-toast-Hc8CXlvz.js";import{r as De}from"./mode-DzQ0cSCz.js";import{a as Re,c as qe,n as Be}from"./dialog-CVN1lcMF.js";import{n as Ee}from"./ImperativeModal-qEtcJ95s.js";import{n as He}from"./copy-YwM0Pd7v.js";import{i as Le}from"./useRunCells-CGSG8ACZ.js";import{r as K}from"./html-to-image-F0JQuH9e.js";import{t as Oe}from"./label-TNNaT1M9.js";import{t as Pe}from"./useDeleteCell-4j5HJ2j2.js";import{n as Ue,t as Fe}from"./icons-CrUXojcA.js";import{n as J}from"./name-cell-input-DRLWP5Jy.js";import{t as Y}from"./multi-icon-DEWnuZs2.js";import{t as Qe}from"./useSplitCell-Su0XVN9R.js";var Z=f("chevrons-down",[["path",{d:"m7 6 5 5 5-5",key:"1lc07p"}],["path",{d:"m7 13 5 5 5-5",key:"1d48rs"}]]),$=f("chevrons-up",[["path",{d:"m17 11-5-5-5 5",key:"e8nh98"}],["path",{d:"m17 18-5-5-5 5",key:"2avn1x"}]]),X=f("scissors",[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]]),Ve=f("text-cursor-input",[["path",{d:"M12 20h-1a2 2 0 0 1-2-2 2 2 0 0 1-2 2H6",key:"1528k5"}],["path",{d:"M13 8h7a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-7",key:"13ksps"}],["path",{d:"M5 16H4a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h1",key:"1n9rhb"}],["path",{d:"M6 4h1a2 2 0 0 1 2 2 2 2 0 0 1 2-2h1",key:"1mj8rg"}],["path",{d:"M9 6v12",key:"velyjx"}]]),ee=f("zap-off",[["path",{d:"M10.513 4.856 13.12 2.17a.5.5 0 0 1 .86.46l-1.377 4.317",key:"193nxd"}],["path",{d:"M15.656 10H20a1 1 0 0 1 .78 1.63l-1.72 1.773",key:"27a7lr"}],["path",{d:"M16.273 16.273 10.88 21.83a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14H4a1 1 0 0 1-.78-1.63l4.507-4.643",key:"1e0qe9"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]),le=f("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function Ge(a){let e=new URL(window.location.href);return e.hash=`scrollTo=${encodeURIComponent(a)}`,e.toString()}function Ke(a){var c;let e=(c=a.match(/scrollTo=([^&]+)/))==null?void 0:c[1];return e?decodeURIComponent(e.split("&")[0]):null}function te(a){return a==="_"?!1:!!(a&&a.trim().length>0)}var Je=ue(),l=ae(je(),1);function Ye(a){let e=(0,Je.c)(47),{cell:c,closePopover:u}=a,{createNewCell:m,updateCellConfig:s,updateCellName:x,moveCell:p,sendToTop:W,sendToBottom:M,addColumnBreakpoint:_,clearCellOutput:S,markUntouched:A}=se(),T=Qe(),N=Le(c==null?void 0:c.cellId),D=!b(ke),R=Pe(),{openModal:j}=Ee(),q=ie(Ae),B=b(xe),v=b(be),oe=b(De),y=b(ye),{saveCellConfig:r}=ve();if(!c||oe){let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=[],e[0]=t):t=e[0],t}let{cellId:o,config:i,getEditorView:d,name:h,hasOutput:C,hasConsoleOutput:E,status:H}=c,w;e[1]!==o||e[2]!==i.disabled||e[3]!==r||e[4]!==s?(w=async()=>{let t={disabled:!i.disabled};await r({configs:{[o]:t}}),s({cellId:o,config:t})},e[1]=o,e[2]=i.disabled,e[3]=r,e[4]=s,e[5]=w):w=e[5];let L=w,g;e[6]!==o||e[7]!==i.hide_code||e[8]!==d||e[9]!==r||e[10]!==s?(g=async()=>{let t={hide_code:!i.hide_code};await r({configs:{[o]:t}}),s({cellId:o,config:t});let U=d();U&&(t.hide_code?U.contentDOM.blur():U.focus())},e[6]=o,e[7]=i.hide_code,e[8]=d,e[9]=r,e[10]=s,e[11]=g):g=e[11];let O=g,n=o===pe,I;e[12]===Symbol.for("react.memo_cache_sentinel")?(I=(0,l.jsx)(_e,{size:13,strokeWidth:1.5}),e[12]=I):I=e[12];let P=H==="running"||H==="queued"||H==="disabled-transitively"||i.disabled,k;e[13]===N?k=e[14]:(k=()=>N(),e[13]=N,e[14]=k);let z;return e[15]!==_||e[16]!==B||e[17]!==y||e[18]!==v||e[19]!==D||e[20]!==o||e[21]!==S||e[22]!==u||e[23]!==i.disabled||e[24]!==i.hide_code||e[25]!==m||e[26]!==R||e[27]!==d||e[28]!==E||e[29]!==C||e[30]!==n||e[31]!==A||e[32]!==p||e[33]!==h||e[34]!==j||e[35]!==r||e[36]!==M||e[37]!==W||e[38]!==q||e[39]!==T||e[40]!==P||e[41]!==k||e[42]!==L||e[43]!==O||e[44]!==s||e[45]!==x?(z=[[{icon:I,label:"Run cell",hotkey:"cell.run",hidden:P,redundant:!0,handle:k},{icon:(0,l.jsx)(Se,{size:13,strokeWidth:1.5}),label:"Refactor with AI",hidden:!B,handle:()=>{q(t=>(t==null?void 0:t.cellId)===o?null:{cellId:o})},hotkey:"cell.aiCompletion"},{icon:(0,l.jsx)(X,{size:13,strokeWidth:1.5}),label:"Split",hotkey:"cell.splitCell",handle:()=>T({cellId:o})},{icon:(0,l.jsx)(Ie,{size:13,strokeWidth:1.5}),label:"Format",hotkey:"cell.format",handle:()=>{let t=d();t&&he({[o]:t})}},{icon:i.hide_code?(0,l.jsx)(me,{size:13,strokeWidth:1.5}):(0,l.jsx)(ze,{size:13,strokeWidth:1.5}),label:i.hide_code?"Show code":"Hide code",handle:O,hotkey:"cell.hideCode"},{icon:i.disabled?(0,l.jsx)(ee,{size:13,strokeWidth:1.5}):(0,l.jsx)(le,{size:13,strokeWidth:1.5}),label:i.disabled?"Enable execution":"Disable execution",handle:L,hidden:n}],[{icon:(0,l.jsx)(Fe,{}),label:"Convert to Markdown",hotkey:"cell.viewAsMarkdown",handle:async()=>{let t=d();t&&(K({autoInstantiate:v,createNewCell:m}),F(t,{language:"markdown",keepCodeAsIs:!1}),i.hide_code||(await r({configs:{[o]:{hide_code:!0}}}),s({cellId:o,config:{hide_code:!0}}),A({cellId:o})))},hidden:n},ne(d())==="sql"?{icon:(0,l.jsx)(Ue,{}),label:"View as Python",hotkey:"cell.viewAsSQL",handle:()=>{let t=d();t&&fe(t,"python",{force:!0})},hidden:n}:{icon:(0,l.jsx)(de,{size:13,strokeWidth:1.5}),label:"Convert to SQL",hotkey:"cell.viewAsSQL",handle:()=>{let t=d();t&&(K({autoInstantiate:v,createNewCell:m}),F(t,{language:"sql",keepCodeAsIs:!1}))},hidden:n}],[{icon:(0,l.jsxs)(Y,{children:[(0,l.jsx)(G,{size:13,strokeWidth:1.5}),(0,l.jsx)(Q,{size:8,strokeWidth:2})]}),label:"Create cell above",hotkey:"cell.createAbove",handle:()=>m({cellId:o,before:!0}),hidden:n,redundant:!0},{icon:(0,l.jsxs)(Y,{children:[(0,l.jsx)(G,{size:13,strokeWidth:1.5}),(0,l.jsx)(V,{size:8,strokeWidth:2})]}),label:"Create cell below",hotkey:"cell.createBelow",handle:()=>m({cellId:o,before:!1}),redundant:!0},{icon:(0,l.jsx)(Q,{size:13,strokeWidth:1.5}),label:"Move cell up",hotkey:"cell.moveUp",handle:()=>p({cellId:o,before:!0}),hidden:n},{icon:(0,l.jsx)(V,{size:13,strokeWidth:1.5}),label:"Move cell down",hotkey:"cell.moveDown",handle:()=>p({cellId:o,before:!1}),hidden:n},{icon:(0,l.jsx)(we,{size:13,strokeWidth:1.5}),label:"Move cell left",hotkey:"cell.moveLeft",handle:()=>p({cellId:o,direction:"left"}),hidden:y!=="columns"||n},{icon:(0,l.jsx)(ge,{size:13,strokeWidth:1.5}),label:"Move cell right",hotkey:"cell.moveRight",handle:()=>p({cellId:o,direction:"right"}),hidden:y!=="columns"||n},{icon:(0,l.jsx)($,{size:13,strokeWidth:1.5}),label:"Send to top",hotkey:"cell.sendToTop",handle:()=>W({cellId:o,scroll:!1}),hidden:n},{icon:(0,l.jsx)(Z,{size:13,strokeWidth:1.5}),label:"Send to bottom",hotkey:"cell.sendToBottom",handle:()=>M({cellId:o,scroll:!1}),hidden:n},{icon:(0,l.jsx)(re,{size:13,strokeWidth:1.5}),label:"Break into new column",hotkey:"cell.addColumnBreakpoint",handle:()=>_({cellId:o}),hidden:y!=="columns"||n}],[{icon:(0,l.jsx)(We,{size:13,strokeWidth:1.5}),label:"Export output as PNG",hidden:!C,handle:()=>Ce(o,"result")},{icon:(0,l.jsx)(ce,{size:13,strokeWidth:1.5}),label:"Clear output",hidden:!(C||E),handle:()=>{S({cellId:o})}}],[{icon:(0,l.jsx)(Ve,{size:13,strokeWidth:1.5}),label:"Name",disableClick:!0,handle:el,handleHeadless:()=>{j((0,l.jsxs)(Be,{children:[(0,l.jsx)(Re,{children:(0,l.jsx)(qe,{children:"Rename cell"})}),(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsx)(Oe,{htmlFor:"cell-name",children:"Cell name"}),(0,l.jsx)(J,{placeholder:"cell name",value:h,onKeyDown:t=>{t.key==="Enter"&&(t.preventDefault(),t.stopPropagation(),j(null))},onChange:t=>x({cellId:o,name:t})})]})]}))},rightElement:(0,l.jsx)(J,{placeholder:"cell name",value:h,onChange:t=>x({cellId:o,name:t}),onEnterKey:()=>u==null?void 0:u()}),hidden:n},{icon:(0,l.jsx)(Me,{size:13,strokeWidth:1.5}),label:"Copy link to cell",disabled:!te(h),tooltip:te(h)?void 0:"Only named cells can be linked to",handle:async()=>{await He(Ge(h)),Ne({description:"Link copied to clipboard"})}}],[{label:"Delete",hidden:!D,variant:"danger",icon:(0,l.jsx)(Te,{size:13,strokeWidth:1.5}),handle:()=>{R({cellId:o})}}]].map($e).filter(Ze),e[15]=_,e[16]=B,e[17]=y,e[18]=v,e[19]=D,e[20]=o,e[21]=S,e[22]=u,e[23]=i.disabled,e[24]=i.hide_code,e[25]=m,e[26]=R,e[27]=d,e[28]=E,e[29]=C,e[30]=n,e[31]=A,e[32]=p,e[33]=h,e[34]=j,e[35]=r,e[36]=M,e[37]=W,e[38]=q,e[39]=T,e[40]=P,e[41]=k,e[42]=L,e[43]=O,e[44]=s,e[45]=x,e[46]=z):z=e[46],z}function Ze(a){return a.length>0}function $e(a){return a.filter(Xe)}function Xe(a){return!a.hidden}function el(a){a==null||a.stopPropagation(),a==null||a.preventDefault()}export{X as a,ee as i,Ke as n,$ as o,le as r,Z as s,Ye as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as v}from"./chunk-LvLJmgfZ.js";import{i as m,n as u}from"./useEvent-O0nX5vok.js";import{T as p,b as D,v as h}from"./cells-
|
|
1
|
+
import{s as v}from"./chunk-LvLJmgfZ.js";import{i as m,n as u}from"./useEvent-O0nX5vok.js";import{T as p,b as D,v as h}from"./cells-D7VcaLU3.js";import{t as C}from"./compiler-runtime-B3qBwwSJ.js";import{t as I}from"./useEventListener-Dy81QR4n.js";import{t as x}from"./jsx-runtime-icT_Ltz2.js";import{t as _}from"./button-Ej3vmCIF.js";import{r as b}from"./requests-Bgjtqo_1.js";import{t as g}from"./use-toast-Hc8CXlvz.js";import{n as j}from"./renderShortcut-CnD1Dah5.js";var w=C(),d=v(x(),1);const f=e=>{let t=(0,w.c)(7),l;t[0]===e?l=t[1]:(l=a=>{var s;(a.ctrlKey||a.metaKey)&&a.key==="z"&&(a.preventDefault(),a.stopPropagation(),(s=e.onClick)==null||s.call(e,a))},t[0]=e,t[1]=l);let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r={capture:!0},t[2]=r):r=t[2],I(window,"keydown",l,r);let o=e.children??"Undo",i;t[3]===Symbol.for("react.memo_cache_sentinel")?(i=(0,d.jsx)(j,{className:"ml-2",shortcut:"cmd-z"}),t[3]=i):i=t[3];let n;return t[4]!==o||t[5]!==e?(n=(0,d.jsxs)(_,{"data-testid":"undo-button",size:"sm",variant:"outline",...e,children:[o," ",i]}),t[4]=o,t[5]=e,t[6]=n):n=t[6],n};var y=C();function z(){let e=(0,y.c)(4),{deleteCell:t,undoDeleteCell:l}=p(),{sendDeleteCell:r}=b(),o;return e[0]!==t||e[1]!==r||e[2]!==l?(o=i=>{var s;if(m.get(h))return;let{cellId:n}=i,a=(((s=m.get(D).cellData[n])==null?void 0:s.code)??"").trim()==="";if(t({cellId:n}),r({cellId:n}).catch(()=>{l()}),!a){let{dismiss:c}=g({title:"Cell deleted",description:"You can bring it back by clicking undo or through the command palette.",action:(0,d.jsx)(f,{"data-testid":"undo-delete-button",onClick:()=>{l(),k()}})}),k=c}},e[0]=t,e[1]=r,e[2]=l,e[3]=o):o=e[3],u(o)}function K(){let e=(0,y.c)(4),{deleteCell:t,undoDeleteCell:l}=p(),{sendDeleteCell:r}=b(),o;return e[0]!==t||e[1]!==r||e[2]!==l?(o=async i=>{if(m.get(h))return;let{cellIds:n}=i;for(let c of n)await r({cellId:c}).then(()=>{t({cellId:c})});let{dismiss:a}=g({title:"Cells deleted",action:(0,d.jsx)(f,{"data-testid":"undo-delete-button",onClick:()=>{for(let c of n)l();s()}})}),s=a},e[0]=t,e[1]=r,e[2]=l,e[3]=o):o=e[3],u(o)}export{K as n,f as r,z as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as M}from"./chunk-LvLJmgfZ.js";import{d as X,l as Y,n as V,p as Z,u as $}from"./useEvent-O0nX5vok.js";import{t as ee}from"./react-Bj1aDYRI.js";import{W as te,vt as re}from"./cells-
|
|
1
|
+
import{s as M}from"./chunk-LvLJmgfZ.js";import{d as X,l as Y,n as V,p as Z,u as $}from"./useEvent-O0nX5vok.js";import{t as ee}from"./react-Bj1aDYRI.js";import{W as te,vt as re}from"./cells-D7VcaLU3.js";import{t as W}from"./compiler-runtime-B3qBwwSJ.js";import{t as le}from"./jsx-runtime-icT_Ltz2.js";import{t as ae}from"./cn-BoaCR37F.js";import{t as ne}from"./createLucideIcon-Cm-Z7dYr.js";import{t as se}from"./useCellActionButton-DNY7402I.js";import{a as oe,n as ie,o as ce,t as me}from"./tooltip-D9723Brr.js";import{d as de}from"./alert-dialog-9WfvUF7e.js";import{i as B,r as he,t as G}from"./popover-BPGG2gPG.js";import{a as pe,c as fe,i as ue,o as xe,r as je,t as be,u as ye}from"./command-BsHOIlao.js";import{n as ve}from"./focus-D09k4iPD.js";import{a as Ne,i as ge}from"./renderShortcut-CnD1Dah5.js";var we=ne("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),J=W(),h=M(ee(),1),t=M(le(),1);const K=h.memo(h.forwardRef((r,a)=>{let e=(0,J.c)(39),{children:n,showTooltip:c,...m}=r,p=c===void 0?!0:c,[d,I]=(0,h.useState)(!1),N;e[0]===Symbol.for("react.memo_cache_sentinel")?(N=()=>I(!1),e[0]=N):N=e[0];let U=N,D=(0,h.useRef)(null),E=se({cell:m,closePopover:U}).map(Ce).filter(_e),P=de(),g;e[1]===Symbol.for("react.memo_cache_sentinel")?(g=()=>{te(()=>{D.current&&D.current.scrollIntoView({behavior:"auto",block:"nearest"})})},e[1]=g):g=e[1];let T=V(g),w;e[2]===T?w=e[3]:(w=s=>{I(o=>{let l=typeof s=="function"?s(o):s;return l&&T(),l})},e[2]=T,e[3]=w);let i=V(w),k;e[4]===i?k=e[5]:(k=()=>({toggle:()=>i(Se)}),e[4]=i,e[5]=k),(0,h.useImperativeHandle)(a,k);let O=he,A=be,F=re(m.cellId),f;e[6]===F?f=e[7]:(f=(0,t.jsx)(pe,{placeholder:"Search actions...",className:"h-6 m-1",...F}),e[6]=F,e[7]=f);let H=ye,u;e[8]===Symbol.for("react.memo_cache_sentinel")?(u=(0,t.jsx)(je,{children:"No results"}),e[8]=u):u=e[8];let R=E.map((s,o)=>(0,t.jsxs)(h.Fragment,{children:[(0,t.jsx)(ue,{children:s.map(l=>{let z=(0,t.jsxs)("div",{className:"flex items-center flex-1",children:[l.icon&&(0,t.jsx)("div",{className:"mr-2 w-5 text-muted-foreground",children:l.icon}),(0,t.jsx)("div",{className:"flex-1",children:l.label}),(0,t.jsxs)("div",{className:"shrink-0 text-sm",children:[l.hotkey&&ge(l.hotkey),l.rightElement]})]});return l.tooltip&&(z=(0,t.jsx)(me,{content:l.tooltip,delayDuration:100,children:z})),(0,t.jsx)(xe,{className:ae(l.disabled&&"opacity-50!"),onSelect:()=>{l.disableClick||l.disabled||(l.handle(),I(!1))},variant:l.variant,children:z},l.label)})},o),o<E.length-1&&(0,t.jsx)(fe,{})]},o)),x;e[9]!==H||e[10]!==u||e[11]!==R?(x=(0,t.jsxs)(H,{children:[u,R]}),e[9]=H,e[10]=u,e[11]=R,e[12]=x):x=e[12];let j;e[13]!==A||e[14]!==x||e[15]!==f?(j=(0,t.jsxs)(A,{children:[f,x]}),e[13]=A,e[14]=x,e[15]=f,e[16]=j):j=e[16];let C;e[17]!==O||e[18]!==P||e[19]!==j?(C=(0,t.jsx)(O,{className:"w-[300px] p-0 pt-1 overflow-auto",scrollable:!0,...P,children:j}),e[17]=O,e[18]=P,e[19]=j,e[20]=C):C=e[20];let b=C;if(!p){let s;e[21]===n?s=e[22]:(s=(0,t.jsx)(B,{asChild:!0,children:n}),e[21]=n,e[22]=s);let o;return e[23]!==b||e[24]!==i||e[25]!==d||e[26]!==s?(o=(0,t.jsxs)(G,{open:d,onOpenChange:i,children:[s,b]}),e[23]=b,e[24]=i,e[25]=d,e[26]=s,e[27]=o):o=e[27],o}let _;e[28]===Symbol.for("react.memo_cache_sentinel")?(_=(0,t.jsx)(ie,{tabIndex:-1,children:Ne("cell.cellActions")}),e[28]=_):_=e[28];let q=!d&&_,y;e[29]===n?y=e[30]:(y=(0,t.jsx)(ce,{ref:D,children:(0,t.jsx)(B,{className:"flex",children:n})}),e[29]=n,e[30]=y);let v;e[31]!==q||e[32]!==y?(v=(0,t.jsxs)(oe,{delayDuration:200,disableHoverableContent:!0,children:[q,y]}),e[31]=q,e[32]=y,e[33]=v):v=e[33];let S;return e[34]!==b||e[35]!==i||e[36]!==d||e[37]!==v?(S=(0,t.jsxs)(G,{open:d,onOpenChange:i,children:[v,b]}),e[34]=b,e[35]=i,e[36]=d,e[37]=v,e[38]=S):S=e[38],S})),L=h.memo(r=>{let a=(0,J.c)(5),{children:e,cellId:n}=r,c;a[0]===n?c=a[1]:(c=ve(n),a[0]=n,a[1]=c);let m=$(c);if(!m)return null;let p;return a[2]!==e||a[3]!==m?(p=(0,t.jsx)(K,{showTooltip:!1,...m,children:e}),a[2]=e,a[3]=m,a[4]=p):p=a[4],p});L.displayName="ConnectionCellActionsDropdown";function ke(r){return!r.redundant}function Ce(r){return r.filter(ke)}function _e(r){return r.length>0}function Se(r){return!r}var Ie=W();const Q=Z("minimap");function De(){let r=(0,Ie.c)(3),[a,e]=Y(Q),n;return r[0]!==a||r[1]!==e?(n={dependencyPanelTab:a,setDependencyPanelTab:e},r[0]=a,r[1]=e,r[2]=n):n=r[2],n}function Pe(){return X(Q)}export{we as a,L as i,Pe as n,K as r,De as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as N}from"./chunk-LvLJmgfZ.js";import{t as T}from"./react-Bj1aDYRI.js";import{t as R}from"./compiler-runtime-B3qBwwSJ.js";const d={NOOP:()=>{},ASYNC_NOOP:async()=>{},THROW:()=>{throw Error("Should not be called")},asUpdater:e=>typeof e=="function"?e:()=>e,identity:e=>e};function D(){throw Error("Not implemented")}var b=(e,o)=>{let n=`[${e}]`;return{debug:(...t)=>console.debug(n,...t),log:(...t)=>o.log(n,...t),warn:(...t)=>o.warn(n,...t),error:(...t)=>o.error(n,...t),trace:(...t)=>o.trace(n,...t),get:t=>b(`${e}:${t}`,o),disabled:(t=!0)=>t?m:o}},k={debug:(...e)=>{console.debug(...e)},log:(...e)=>{console.log(...e)},warn:(...e)=>{console.warn(...e)},error:(...e)=>{console.error(...e)},trace:(...e)=>{console.trace(...e)},get:e=>b(`marimo:${e}`,k),disabled:(e=!0)=>e?m:k},m={debug:()=>d.NOOP,log:()=>d.NOOP,warn:()=>d.NOOP,error:()=>d.NOOP,trace:()=>d.NOOP,get:()=>m,disabled:()=>m};function L(){return typeof window<"u"&&window.Logger||k}const w=L();function h(){if(typeof window>"u")return w.warn("isPlatformMac() called without window"),!1;let e=window.navigator.userAgentData?window.navigator.userAgentData.platform:window.navigator.platform;return/mac/i.test(e)}function C(){if(typeof window>"u")return w.warn("isPlatformWindows() called without window"),!1;let e=window.navigator.userAgentData?window.navigator.userAgentData.platform:window.navigator.platform;return/win/i.test(e)}function B(e,o){let n=!0;for(let t of e){switch(t){case"mod":n&&(n=o.metaKey||o.ctrlKey);break;case"ctrl":n&&(n=o.ctrlKey);break;case"meta":n&&(n=o.metaKey);break;case"shift":n&&(n=o.shiftKey);break;case"alt":n&&(n=o.altKey);break;case"space":n&&(n=o.code==="Space");break;default:/^\d$/.test(t)&&o.shiftKey?n&&(n=o.code===`Digit${t}`):n&&(n=o.key.toLowerCase()===t);break}if(!n)return!1}return e.includes("shift")||n&&(n=!o.shiftKey),!e.includes("ctrl")&&!e.includes("mod")&&n&&(n=!o.ctrlKey),!e.includes("meta")&&!e.includes("mod")&&n&&(n=!o.metaKey),e.includes("alt")||n&&(n=!o.altKey),n}function P(e){return{control:"ctrl",command:"mod",cmd:"mod",option:"alt",return:"enter"}[e.toLowerCase()]||e.toLowerCase()}function F(e){if(e===s||e==="")return()=>!1;let o=e.includes("+")?"+":"-",n=e.split(o).map(P);return t=>B(n,t)}function S(){return h()?"mac":C()?"windows":"linux"}function U(e){var o;return!h()||!((o=e.key)!=null&&o.includes("Cmd"))||e.key.includes("Ctrl")?[e]:[e,{...e,key:e.key.replaceAll("Cmd","Ctrl")}]}const a={EMPTY:Object.freeze({}),mapValues(e,o){return e&&a.fromEntries(a.entries(e).map(([n,t])=>[n,o(t,n)]))},fromEntries(e){return Object.fromEntries(e)},entries(e){return Object.entries(e)},keys(e){return Object.keys(e)},size(e){return Object.keys(e).length},keyBy(e,o){let n={};for(let t of e){let r=o(t);r!==void 0&&(n[r]=t)}return n},collect(e,o,n){return a.mapValues(a.keyBy(e,o),n)},groupBy(e,o,n){let t={};for(let r of e){let l=o(r);if(l===void 0)continue;let i=n(r);l in t?t[l].push(i):t[l]=[i]}return t},filter(e,o){let n={};for(let[t,r]of a.entries(e))o(r,t)&&(n[t]=e[t]);return n},omit(e,o){let n=new Set(o);return a.filter(e,(t,r)=>!n.has(r))}},s=Symbol("NOT_SET");var p={"cell.focusUp":{name:"Go to previous cell",group:"Navigation",key:"Mod-Shift-k"},"cell.focusDown":{name:"Go to next cell",group:"Navigation",key:"Mod-Shift-j"},"cell.moveUp":{name:"Move cell up",group:"Creation and Ordering",key:"Mod-Shift-9"},"cell.moveDown":{name:"Move cell down",group:"Creation and Ordering",key:"Mod-Shift-0"},"cell.moveLeft":{name:"Move left",group:"Creation and Ordering",key:"Mod-Shift-7"},"cell.moveRight":{name:"Move right",group:"Creation and Ordering",key:"Mod-Shift-8"},"cell.createAbove":{name:"New cell above",group:"Creation and Ordering",key:"Mod-Shift-o"},"cell.createBelow":{name:"New cell below",group:"Creation and Ordering",key:"Mod-Shift-p"},"cell.sendToTop":{name:"Send to top",group:"Creation and Ordering",key:"Mod-Shift-1"},"cell.sendToBottom":{name:"Send to bottom",group:"Creation and Ordering",key:"Mod-Shift-2"},"cell.addColumnBreakpoint":{name:"Add column breakpoint",group:"Creation and Ordering",key:"Mod-Shift-3"},"cell.run":{name:"Run",group:"Running Cells",key:"Mod-Enter",additionalKeywords:["execute","submit"]},"cell.runAndNewBelow":{name:"Run and new below",group:"Running Cells",key:"Shift-Enter"},"cell.runAndNewAbove":{name:"Run and new above",group:"Running Cells",key:"Mod-Shift-Enter"},"global.runAll":{name:"Re-run all cells",group:"Running Cells",key:s},"cell.format":{name:"Format cell",group:"Editing",key:"Mod-b",additionalKeywords:["lint"]},"cell.viewAsMarkdown":{name:"View as Markdown",group:"Editing",key:"Mod-Shift-m"},"cell.viewAsSQL":{name:"Toggle SQL",group:"Editing",key:{windows:"Alt-Shift-l",main:"Mod-Shift-l"}},"cell.complete":{name:"Code completion",group:"Editing",key:"Ctrl-Space"},"cell.signatureHelp":{name:"Signature help",group:"Editing",key:"Mod-Shift-Space"},"cell.undo":{name:"Undo",group:"Editing",key:"Mod-z"},"cell.redo":{name:"Redo",group:"Editing",key:{main:"Mod-Shift-z",windows:"Mod-y"}},"cell.findAndReplace":{name:"Find and Replace",group:"Editing",key:"Mod-f"},"cell.selectNextOccurrence":{name:"Add selection to next Find match",group:"Editing",key:"Mod-d"},"cell.fold":{name:"Fold region",group:"Editing",key:{main:"Mod-Alt-[",windows:"Mod-Shift-["}},"cell.unfold":{name:"Unfold region",group:"Editing",key:{main:"Mod-Alt-]",windows:"Mod-Shift-]"}},"cell.foldAll":{name:"Fold all regions",group:"Editing",key:"Ctrl-Alt-["},"cell.unfoldAll":{name:"Unfold all regions",group:"Editing",key:"Ctrl-Alt-]"},"cell.delete":{name:"Delete cell",group:"Editing",key:"Shift-Backspace",additionalKeywords:["remove"]},"cell.hideCode":{name:"Hide cell code",group:"Editing",key:"Mod-h"},"cell.aiCompletion":{name:"AI completion",group:"Editing",key:"Mod-Shift-e"},"cell.cellActions":{name:"Open cell actions",group:"Editing",key:"Mod-p"},"cell.splitCell":{name:"Split cell",group:"Editing",key:"Mod-Shift-'"},"cell.toggleComment":{name:"Toggle comment",group:"Editing",key:"Mod-/"},"cell.toggleBlockComment":{name:"Toggle block comment",group:"Editing",key:"Alt-A"},"cell.renameSymbol":{name:"Rename symbol",group:"Editing",key:"F2"},"cell.copyLineUp":{name:"Copy line(s) up",group:"Editing",key:"Alt-Shift-ArrowUp",editable:!1},"cell.copyLineDown":{name:"Copy line(s) down",group:"Editing",key:"Alt-Shift-ArrowDown",editable:!1},"markdown.bold":{name:"Bold",group:"Markdown",key:"Mod-b"},"markdown.italic":{name:"Italic",group:"Markdown",key:"Mod-i"},"markdown.link":{name:"Convert to Link",group:"Markdown",key:"Mod-k"},"markdown.orderedList":{name:"Convert to Ordered list",group:"Markdown",key:"Mod-Shift-7"},"markdown.unorderedList":{name:"Convert to Unordered list",group:"Markdown",key:"Mod-Shift-8"},"markdown.blockquote":{name:"Convert to Blockquote",group:"Markdown",key:"Mod-Shift-9"},"markdown.code":{name:"Convert to Code",group:"Markdown",key:"Mod-Shift-0"},"global.hideCode":{name:"Toggle app view",group:"Other",key:"Mod-."},"global.foldCode":{name:"Fold all cells",group:"Editing",key:{main:"Ctrl-Cmd-l",windows:"Mod-Shift-l"}},"global.unfoldCode":{name:"Unfold all cells",group:"Editing",key:{main:"Ctrl-Cmd-;",windows:"Mod-Shift-:"}},"global.showHelp":{name:"Show keyboard shortcuts",group:"Other",key:"Mod-Shift-h"},"global.save":{name:"Save file",group:"Other",key:"Mod-s",additionalKeywords:["write","persist"]},"global.commandPalette":{name:"Show command palette",group:"Other",key:"Mod-k"},"global.runStale":{name:"Run all stale cells",group:"Running Cells",key:"Mod-Shift-r"},"global.interrupt":{name:"Stop (interrupt) execution",group:"Running Cells",key:"Mod-i"},"global.formatAll":{name:"Format all",group:"Editing",key:"Mod-Shift-b"},"global.toggleLanguage":{name:"Toggle language to markdown (if supported)",group:"Editing",key:"F4"},"global.toggleTerminal":{name:"Show integrated terminal",group:"Other",key:"Ctrl-`"},"global.togglePanel":{name:"Toggle developer panel",group:"Other",key:"Mod-j"},"global.collapseAllSections":{name:"Collapse all sections",group:"Editing",key:"Mod-Shift-\\"},"global.expandAllSections":{name:"Expand all sections",group:"Editing",key:"Mod-Shift-/"},"global.toggleMinimap":{name:"Toggle Minimap",group:"Other",key:"Mod-Shift-i"},"global.focusTop":{name:"Focus top",group:"Navigation",key:"Mod-Shift-f"},"global.focusBottom":{name:"Focus bottom",group:"Navigation",key:"Mod-Shift-g"},"global.toggleSidebar":{name:"Toggle helper panel",group:"Navigation",key:"Mod-Shift-s"},"cell.goToDefinition":{name:"Go to Definition",group:"Navigation",key:"F12"},"completion.moveDown":{name:"Move completion selection down",group:"Editing",key:"Ctrl-j"},"completion.moveUp":{name:"Move completion selection up",group:"Editing",key:"Ctrl-k"},"command.vimEnterCommandMode":{name:"Enter command mode (vim)",group:"Command",key:{main:"Mod-Escape",windows:"Shift-Escape"}},"command.createCellBefore":{name:"Create a cell before current cell",group:"Command",key:"a"},"command.createCellAfter":{name:"Create a cell after current cell",group:"Command",key:"b"},"command.copyCell":{name:"Copy cell",group:"Command",key:"c"},"command.pasteCell":{name:"Paste cell",group:"Command",key:"v"}};function j(e){return e in p}function x(e){return new v(p).getHotkey(e)}var v=class A{static create(o){return new A(p,{platform:o})}constructor(o,n={}){this.hotkeys=o,this.platform=n.platform??S(),this.mod=this.platform==="mac"?"Cmd":"Ctrl"}iterate(){return a.keys(this.hotkeys)}getHotkey(o){let{name:n,key:t,additionalKeywords:r}=this.hotkeys[o];return typeof t=="string"?{name:n,key:t.replace("Mod",this.mod),additionalKeywords:r}:t===s?{name:n,key:"",additionalKeywords:r}:{name:n,key:(t[this.platform]||t.main).replace("Mod",this.mod),additionalKeywords:r}}getHotkeyDisplay(o){return this.hotkeys[o].name}isEditable(o){return this.hotkeys[o].editable!==!1}getHotkeyGroups(){return a.groupBy(a.entries(this.hotkeys),([,o])=>o.group,([o])=>o)}},H=class extends v{constructor(e,o={}){super(p,o),this.overrides=e}getHotkey(e){let o=super.getHotkey(e),n=this.overrides[e];return{name:o.name,key:n?z(n):o.key,additionalKeywords:o.additionalKeywords}}},$=/^(cmd|ctrl|alt|shift|meta|mod)$/i;function z(e){let o=e.split("-"),n=o[o.length-1];return n.length>1&&!$.test(n)&&(o[o.length-1]=n.charAt(0).toUpperCase()+n.slice(1)),o.join("-")}var f=N(T(),1);function E(e,o){if(typeof e=="function")return e(o);e!=null&&(e.current=o)}function O(...e){return o=>{let n=!1,t=e.map(r=>{let l=E(r,o);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let r=0;r<t.length;r++){let l=t[r];typeof l=="function"?l():E(e[r],null)}}}}function G(...e){return f.useCallback(O(...e),e)}var V=R();function q(e){return typeof e=="object"&&!!e&&"current"in e}function I(e,o,n,t){let r=(0,V.c)(8),l=(0,f.useRef)(n),i,c;r[0]===n?(i=r[1],c=r[2]):(i=()=>{l.current=n},c=[n],r[0]=n,r[1]=i,r[2]=c),(0,f.useEffect)(i,c);let u,g;r[3]!==t||r[4]!==e||r[5]!==o?(u=()=>{let y=q(e)?e.current:e;if(!y)return;let M=K=>l.current(K);return y.addEventListener(o,M,t),()=>{y.removeEventListener(o,M,t)}},g=[o,e,t],r[3]=t,r[4]=e,r[5]=o,r[6]=u,r[7]=g):(u=r[6],g=r[7]),(0,f.useEffect)(u,g)}export{H as a,a as c,C as d,F as f,D as g,d as h,s as i,U as l,w as m,O as n,x as o,S as p,G as r,j as s,I as t,h as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-LvLJmgfZ.js";import{t as o}from"./react-Bj1aDYRI.js";import{t as m}from"./compiler-runtime-B3qBwwSJ.js";import{t as e}from"./capabilities-
|
|
1
|
+
import"./chunk-LvLJmgfZ.js";import{t as o}from"./react-Bj1aDYRI.js";import{t as m}from"./compiler-runtime-B3qBwwSJ.js";import{t as e}from"./capabilities-D3x_db9Y.js";var a=m();o();function i(){let t=(0,a.c)(1),r;return t[0]===Symbol.for("react.memo_cache_sentinel")?(r=e(),t[0]=r):r=t[0],r}export{i as t};
|